diff --git a/.env.docker b/.env.docker index 778f842..e384e45 100644 --- a/.env.docker +++ b/.env.docker @@ -6,13 +6,13 @@ PORT=3000 # Database (MySQL container) MYSQL_ROOT_PASSWORD=rootpassword -MYSQL_DATABASE=openplace -MYSQL_USER=openplace -MYSQL_PASSWORD=openplacepassword +MYSQL_DATABASE=FurryPlace +MYSQL_USER=FurryPlace +MYSQL_PASSWORD=FurryPlacepassword MYSQL_PORT=3306 # Database URL (used by Prisma) -DATABASE_URL="mysql://openplace:openplacepassword@mysql:3306/openplace" +DATABASE_URL="mysql://FurryPlace:FurryPlacepassword@mysql:3306/FurryPlace" # JWT Secret (CHANGE THIS IN PRODUCTION!) JWT_SECRET="your-secret-key-change-in-production" diff --git a/.env.example b/.env.example index de178b9..1693ebd 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,9 @@ PORT=3000 -DATABASE_URL="mysql://root:password@localhost/openplace" +DATABASE_URL="mysql://root:password@localhost/FurryPlace" JWT_SECRET="your-secret-key" + +# Google OAuth +GOOGLE_CLIENT_ID="your-google-client-id" +GOOGLE_CLIENT_SECRET="your-google-client-secret" +GOOGLE_CALLBACK_URL="http://localhost:3000/auth/google/callback" diff --git a/.gitmodules b/.gitmodules index 52e7841..678fbc3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "frontend"] path = frontend - url = https://github.com/openplaceteam/frontend + url = https://github.com/FurryPlaceteam/frontend diff --git a/ADMIN-CONTENT-EDITOR.md b/ADMIN-CONTENT-EDITOR.md new file mode 100644 index 0000000..6ebbc01 --- /dev/null +++ b/ADMIN-CONTENT-EDITOR.md @@ -0,0 +1,84 @@ +# Admin Content Editor Access + +## Quick Access + +The site content management editor is now available at: + +**URL:** `http://localhost:3000/_app/admin-content-editor.html` + +Or for production: + +**URL:** `https://yourdomain.com/_app/admin-content-editor.html` + +## Requirements + +- Must be logged in as an admin user +- User account must have `role='admin'` in the database +- Valid JWT authentication cookie + +## Features + +✅ Edit modal content (rules, instructions, help text) +✅ Update footer links (Discord, GitHub, Instagram, etc.) +✅ Manage multiple locales (English, Chinese, etc.) +✅ Add/remove/edit individual content items +✅ Bulk save changes +✅ Initialize default content with one click + +## File Locations + +**Important:** The `frontend/` directory is regenerated on every build! + +- **Source (for frontend-src builds):** [frontend-src/static/_app/admin-content-editor.html](frontend-src/static/_app/admin-content-editor.html) +- **Backup (for USE_FRONTEND_BACKUP=true):** [frontend-backup/_app/admin-content-editor.html](frontend-backup/_app/admin-content-editor.html) +- **Active (auto-generated):** `frontend/_app/admin-content-editor.html` (copied during build - DO NOT EDIT) + +### Which File to Edit? + +- **If using frontend-src builds:** Edit `frontend-src/static/_app/admin-content-editor.html` +- **If using frontend-backup:** Edit `frontend-backup/_app/admin-content-editor.html` +- **Never edit** files in `frontend/` - they get deleted on every build! + +## Integration + +The content editor is: +1. A standalone HTML page (no build required) +2. Uses vanilla JavaScript (no framework dependencies) +3. Authenticates using existing JWT cookies +4. Calls the site-content API endpoints + +## Adding to Admin Panel Navigation + +Since the admin panel is a compiled SvelteKit app, to add a navigation link: + +1. Edit the source Svelte file in `frontend-src/src/routes/admin/+page.svelte` +2. Add a link/button to `/_app/admin-content-editor.html` +3. Rebuild the frontend: `cd frontend-src && npm run build` + +**Or** simply bookmark/share the direct URL with your admin team! + +## Build Process + +### When using frontend-src: +```bash +cd frontend-src +npm run build +# Copies files from frontend-src/static/_app/ to frontend/_app/ +``` + +### When using frontend-backup (Docker): +```bash +docker-compose up --build -d +# With USE_FRONTEND_BACKUP=true in docker-compose.yml +# Copies files from frontend-backup/_app/ to frontend/_app/ +``` + +## API Endpoints Used + +- `GET /api/admin/site-content` - Fetch all content +- `POST /api/admin/site-content` - Create/update item +- `POST /api/admin/site-content/bulk` - Bulk update +- `DELETE /api/admin/site-content/:key` - Delete item +- `POST /api/admin/site-content/initialize` - Load defaults + +See [CONTENT-MANAGEMENT.md](CONTENT-MANAGEMENT.md) for detailed documentation. diff --git a/CLAUDE.md b/CLAUDE.md index b1d03e8..7491946 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## Project Overview -Openplace is an unofficial open-source backend for wplace (a collaborative pixel art canvas), built with TypeScript, tinyhttp, Prisma, and MySQL. The system manages user authentication, pixel painting with charge-based rate limiting, alliances, leaderboards, and moderation features. +FurryPlace is an unofficial open-source backend for wplace (a collaborative pixel art canvas), built with TypeScript, tinyhttp, Prisma, and MySQL. The system manages user authentication, pixel painting with charge-based rate limiting, alliances, leaderboards, and moderation features. ## Development Commands diff --git a/CONTENT-MANAGEMENT.md b/CONTENT-MANAGEMENT.md new file mode 100644 index 0000000..a1c1508 --- /dev/null +++ b/CONTENT-MANAGEMENT.md @@ -0,0 +1,220 @@ +# Site Content Management System + +This document explains how to manage site content (modals, rules, etc.) using the new database-driven system. + +## Overview + +The site content management system allows administrators to modify: +- Modal content (welcome modal, rules, instructions) +- Help text (paint faster, map lagging) +- Footer links and contact information +- Site title and branding +- Any other text content on the site + +Content is stored in MySQL and can be edited through an admin interface, supporting multiple locales (English, Chinese, etc.). + +## Architecture + +### Database Schema + +**Table: `SiteContent`** +- `id`: Auto-incrementing primary key +- `key`: Unique string identifier (e.g., `modal.rules.title`) +- `value`: Text content +- `locale`: Language code (en, zh, etc.) +- `createdAt`: Creation timestamp +- `updatedAt`: Last update timestamp + +### Backend API Endpoints + +**Public Endpoint:** +- `GET /api/site-content?locale=en` - Fetch all content for a locale (used by frontend) + +**Admin Endpoints (require authentication & admin role):** +- `GET /api/admin/site-content` - Get all content items +- `POST /api/admin/site-content` - Create or update a single item +- `POST /api/admin/site-content/bulk` - Bulk update multiple items +- `DELETE /api/admin/site-content/:key` - Delete an item +- `POST /api/admin/site-content/initialize` - Initialize default content + +### Frontend Integration + +**File: `frontend/_app/info.js`** +- Automatically loads content from API on page load +- Falls back to hardcoded defaults if API fails +- Uses MutationObserver to patch modals when they appear +- Supports locale switching + +## Setup Instructions + +### 1. Database Migration + +Run the Prisma migration to create the `SiteContent` table: + +```bash +pnpm db:push +``` + +### 2. Initialize Default Content + +After the database is set up, initialize the default content by making a POST request: + +```bash +curl -X POST http://localhost:3000/api/admin/site-content/initialize \ + -H "Cookie: j=YOUR_ADMIN_JWT_TOKEN" +``` + +Or use the admin UI (see below). + +### 3. Access the Admin UI + +Navigate to: `http://localhost:3000/_app/admin-content-editor.html` + +**Note:** You must be logged in as an admin with a valid JWT token in cookies. + +## Using the Admin UI + +### Interface Features + +1. **Locale Selector** - Switch between languages (en, zh) +2. **Reload Button** - Refresh content from database +3. **Add New Item** - Create new content entries +4. **Initialize Defaults** - Populate database with default content +5. **Save All Changes** - Bulk save modified items +6. **Delete Button** - Remove individual items + +### Content Keys + +Content is organized using dot-notation keys: + +#### Modal Content Keys + +**Overview Section:** +- `modal.overview.title` - "Overview" heading +- `modal.overview.videoUrl` - YouTube embed URL + +**Paint Faster Section:** +- `modal.paintFaster.title` - Section heading +- `modal.paintFaster.mobile` - Instructions for mobile users +- `modal.paintFaster.desktop` - Instructions for desktop users + +**Map Lagging Section:** +- `modal.mapLagging.title` - Section heading +- `modal.mapLagging.text` - Help text +- `modal.mapLagging.link` - Link to hardware acceleration guide + +**Rules Section:** +- `modal.rules.title` - "Rules" heading +- `modal.rules.badge` - Badge text (e.g., "Important") +- `modal.rules.item.0` - First rule (with emoji) +- `modal.rules.item.1` - Second rule +- `modal.rules.item.N` - Additional rules (add as needed) +- `modal.rules.footer` - Footer warning text + +**Footer Section:** +- `modal.footer.email` - Contact email +- `modal.footer.discord.url` - Discord invite URL +- `modal.footer.discord.text` - Discord link text +- `modal.footer.github.url` - GitHub organization URL +- `modal.footer.github.text` - GitHub link text +- `modal.footer.instagram.url` - Instagram URL +- `modal.footer.instagram.text` - Instagram link text +- `modal.footer.terms.url` - Terms of service URL +- `modal.footer.terms.text` - Terms link text +- `modal.footer.privacy.url` - Privacy policy URL +- `modal.footer.privacy.text` - Privacy link text + +**Site-wide:** +- `site.title` - Site title/branding + +### Adding New Rules + +To add a new rule to the rules modal: + +1. Click "Add New Item" +2. Set key to `modal.rules.item.4` (or next available number) +3. Set value to `🚀 Your new rule text here` +4. Click "Add Item" +5. Repeat for other locales (en, zh, etc.) + +The frontend will automatically display all numbered rules in order. + +### Workflow Example + +1. **Login as admin** to your FurryPlace instance +2. **Navigate to** `/_app/admin-content-editor.html` +3. **Select locale** (e.g., English) +4. **Click "Initialize Defaults"** (first time only) +5. **Edit content** directly in the text fields +6. **Click "Save All Changes"** to persist to database +7. **Refresh your main site** - changes appear immediately! + +## Development Notes + +### Adding New Content Fields + +To add new editable content: + +1. Choose a unique key (e.g., `modal.newSection.title`) +2. Add to the initialize defaults in `src/routes/site-content.ts` +3. Update the monkey patch in `frontend/_app/info.js` to use the new key +4. Add documentation to this file + +### Locale Support + +Currently supports: +- `en` - English +- `zh` - Chinese + +To add a new locale: +1. Add option to locale selector in admin UI +2. Initialize default content for that locale +3. Update frontend locale detection in `info.js` + +### Caching Considerations + +- Frontend caches API response per page load +- No server-side caching (content always fresh from DB) +- Consider adding Redis/memory cache for production + +## Troubleshooting + +### Content Not Updating + +1. Check browser console for `[WPLACE_INFO]` logs +2. Verify API endpoint returns data: `GET /api/site-content?locale=en` +3. Clear browser cache and reload +4. Check database for content entries: `SELECT * FROM SiteContent;` + +### Admin UI Not Loading + +1. Verify you're logged in as admin +2. Check browser cookies for `j` JWT token +3. Verify `role` in User table is set to `admin` +4. Check browser console for authentication errors + +### Default Content Missing + +Run initialization endpoint: +```bash +curl -X POST http://localhost:3000/api/admin/site-content/initialize \ + -H "Cookie: j=YOUR_JWT_TOKEN" +``` + +## Security Notes + +- Admin endpoints require authentication AND `role='admin'` +- Input validation prevents injection attacks +- Keys restricted to alphanumeric + dots + underscores +- No HTML rendering (XSS protection via text replacement) + +## Future Enhancements + +- [ ] Add wysiwyg editor for formatted text +- [ ] Support for images/media uploads +- [ ] Version history and rollback +- [ ] Multi-tenant support (different content per domain) +- [ ] Import/export functionality (JSON/CSV) +- [ ] Preview changes before publishing +- [ ] Scheduled content changes +- [ ] Content approval workflow diff --git a/DOCKER.md b/DOCKER.md index cc31160..8dc96c7 100644 --- a/DOCKER.md +++ b/DOCKER.md @@ -1,6 +1,6 @@ # Docker Setup Guide -This guide explains how to build and run Openplace using Docker. +This guide explains how to build and run FurryPlace using Docker. ## Quick Start @@ -117,7 +117,7 @@ docker-compose ps ```bash # Access MySQL shell -docker-compose exec mysql mysql -u openplace -p +docker-compose exec mysql mysql -u FurryPlace -p # Run migrations docker-compose exec app pnpm db:push @@ -126,10 +126,10 @@ docker-compose exec app pnpm db:push docker-compose exec app pnpm seed # Backup database -docker-compose exec mysql mysqldump -u openplace -popenplacepassword openplace > backup.sql +docker-compose exec mysql mysqldump -u FurryPlace -pFurryPlacepassword FurryPlace > backup.sql # Restore database -docker-compose exec -T mysql mysql -u openplace -popenplacepassword openplace < backup.sql +docker-compose exec -T mysql mysql -u FurryPlace -pFurryPlacepassword FurryPlace < backup.sql ``` ### Maintenance @@ -142,7 +142,7 @@ docker-compose restart docker-compose restart app # View resource usage -docker stats openplace-app openplace-mysql +docker stats FurryPlace-app FurryPlace-mysql # Clean up unused images docker image prune @@ -154,15 +154,15 @@ If you prefer to build without docker-compose: ```bash # Build image -docker build -t openplace:latest . +docker build -t FurryPlace:latest . # Run container (requires existing MySQL) docker run -d \ - --name openplace \ + --name FurryPlace \ -p 3000:3000 \ - -e DATABASE_URL="mysql://user:pass@host:3306/openplace" \ + -e DATABASE_URL="mysql://user:pass@host:3306/FurryPlace" \ -e JWT_SECRET="your-secret" \ - openplace:latest + FurryPlace:latest ``` ## Development with Docker @@ -213,10 +213,10 @@ docker-compose up -d --build The Docker setup consists of: -- **openplace-app**: Node.js application container running the backend -- **openplace-mysql**: MySQL 8.0 database container +- **FurryPlace-app**: Node.js application container running the backend +- **FurryPlace-mysql**: MySQL 8.0 database container - **mysql-data**: Persistent volume for database storage -- **openplace-network**: Bridge network for container communication +- **FurryPlace-network**: Bridge network for container communication The application automatically runs database migrations on startup. diff --git a/Dockerfile b/Dockerfile index cfe174a..d12b80e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ WORKDIR /app COPY package.json pnpm-lock.yaml ./ # Install backend dependencies -RUN pnpm install --frozen-lockfile +RUN pnpm install # Copy source code and prisma schema COPY . . @@ -54,7 +54,7 @@ WORKDIR /app COPY package.json pnpm-lock.yaml ./ # Install production dependencies only -RUN pnpm install --frozen-lockfile --prod +RUN pnpm install --prod # Copy prisma schema for migrations COPY prisma ./prisma diff --git a/README.md b/README.md index 745f07e..294bc10 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ -# openplace -Openplace (styled lowercase) is a free unofficial open source backend for [wplace.](https://wplace.live) We aim to give the freedom and flexibility for all users to be able to make their own private wplace experience for themselves, their friends, or even their community. +# FurryPlace +FurryPlace (styled lowercase) is a free unofficial open source backend for [wplace.](https://wplace.live) We aim to give the freedom and flexibility for all users to be able to make their own private wplace experience for themselves, their friends, or even their community. > [!WARNING] > This is a work-in-progress. Expect unfinished features and bugs. Please help us by posting issues in #help-n-support on our [Discord server](https://discord.gg/ZRC4DnP9Z2) or by contributing pull requests. Thanks! ## macOS ### Getting Started -This is where you will be preparing your machine to run openplace. +This is where you will be preparing your machine to run FurryPlace. 1. install brew, node and git -2. run `git clone --recurse-submodules https://github.com/openplaceteam/openplace` -3. cd into the openplace directory +2. run `git clone --recurse-submodules https://github.com/FurryPlaceteam/FurryPlace` +3. cd into the FurryPlace directory 4. run ``npm i && brew install mariadb caddy nss`` 5. brew will then spit out a command to inform you on how to start it. if it doesn't, run `brew services start mariadb && brew services start caddy` #### Configuring and building the database @@ -29,7 +29,7 @@ This is where you will be preparing your machine to run openplace. 14. in another terminal, cd to the same root directory and run `caddy run --config Caddyfile` #### Spinning up your server -You will be required to configure an SSL certificate if you plan to use this in production. However, if you are only using this with you and your friends, you can simply navigate to `https://{IP}:8080` NOTE: openplace is only hosted over HTTPS. you will run into HTTP error 400 if you attempt to load the website over HTTP. +You will be required to configure an SSL certificate if you plan to use this in production. However, if you are only using this with you and your friends, you can simply navigate to `https://{IP}:8080` NOTE: FurryPlace is only hosted over HTTPS. you will run into HTTP error 400 if you attempt to load the website over HTTP. #### Updating your database In the event that the database schematic changes, you simply need to run `npm run db:push` to update your database schema. diff --git a/docker-compose.yml b/docker-compose.yml index 7e51464..677e4ca 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,13 +3,13 @@ version: '3.8' services: mysql: image: mysql:8.0 - container_name: openplace-mysql + container_name: FurryPlace-mysql restart: unless-stopped environment: MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-rootpassword} - MYSQL_DATABASE: ${MYSQL_DATABASE:-openplace} - MYSQL_USER: ${MYSQL_USER:-openplace} - MYSQL_PASSWORD: ${MYSQL_PASSWORD:-openplacepassword} + MYSQL_DATABASE: ${MYSQL_DATABASE:-FurryPlace} + MYSQL_USER: ${MYSQL_USER:-FurryPlace} + MYSQL_PASSWORD: ${MYSQL_PASSWORD:-FurryPlacepassword} # No ports exposed - only accessible within Docker network volumes: - mysql-data:/var/lib/mysql @@ -19,11 +19,11 @@ services: timeout: 5s retries: 5 networks: - - openplace-network + - FurryPlace-network adminer: image: adminer:latest - container_name: openplace-adminer + container_name: FurryPlace-adminer restart: unless-stopped ports: - "${ADMINER_PORT:-8080}:8080" @@ -32,7 +32,7 @@ services: depends_on: - mysql networks: - - openplace-network + - FurryPlace-network app: build: @@ -40,26 +40,29 @@ services: dockerfile: Dockerfile args: USE_FRONTEND_BACKUP: ${USE_FRONTEND_BACKUP:-false} - container_name: openplace-app + container_name: FurryPlace-app restart: unless-stopped ports: - "${PORT:-3000}:3000" environment: PORT: 3000 - DATABASE_URL: "mysql://${MYSQL_USER:-openplace}:${MYSQL_PASSWORD:-openplacepassword}@mysql:3306/${MYSQL_DATABASE:-openplace}" + DATABASE_URL: "mysql://${MYSQL_USER:-FurryPlace}:${MYSQL_PASSWORD:-FurryPlacepassword}@mysql:3306/${MYSQL_DATABASE:-FurryPlace}" JWT_SECRET: ${JWT_SECRET:-change-this-secret-in-production} NODE_ENV: production + GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID} + GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET} + GOOGLE_CALLBACK_URL: ${GOOGLE_CALLBACK_URL:-http://localhost:3000/auth/google/callback} depends_on: mysql: condition: service_healthy networks: - - openplace-network + - FurryPlace-network command: > sh -c " echo 'Waiting for database to be ready...' && sleep 5 && echo 'Running database migrations...' && - pnpm db:push && + pnpm db:push -- --accept-data-loss && echo 'Starting application...' && node dist/index.js " @@ -68,5 +71,5 @@ volumes: mysql-data: networks: - openplace-network: + FurryPlace-network: driver: bridge diff --git a/frontend-backup/.gitignore b/frontend-backup/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/frontend-backup/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/frontend-backup/26/2025/08/12/horse.png b/frontend-backup/26/2025/08/12/horse.png new file mode 100644 index 0000000..99d09f5 Binary files /dev/null and b/frontend-backup/26/2025/08/12/horse.png differ diff --git a/frontend-backup/404.html b/frontend-backup/404.html index 09390d1..496a7f5 100644 --- a/frontend-backup/404.html +++ b/frontend-backup/404.html @@ -5,124 +5,26 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - + - - -
Wplace logo wplace

Not found

Go to map
- - -
- - - +
Wplace logo FurryPlace

Not found

Go to map
diff --git a/frontend-backup/PixelifySans-latin.vdc2vUDH.woff2 b/frontend-backup/PixelifySans-latin.vdc2vUDH.woff2 deleted file mode 100644 index ea75ad5..0000000 Binary files a/frontend-backup/PixelifySans-latin.vdc2vUDH.woff2 and /dev/null differ diff --git a/frontend-backup/TODO.md b/frontend-backup/TODO.md deleted file mode 100644 index 84ea2d5..0000000 --- a/frontend-backup/TODO.md +++ /dev/null @@ -1,1458 +0,0 @@ -# Frontend Recreation TODO - -This document outlines all the necessary information to recreate the SvelteKit frontend for the Openplace/Wplace application. - -## Overview - -Openplace is a collaborative real-time pixel art canvas layered over a world map (similar to r/place). Users can paint pixels, join alliances, view leaderboards, and moderate content. The frontend is built with SvelteKit and integrates with the backend API documented below. - -## Tech Stack - -- **Framework**: SvelteKit (based on `index.html` module imports) -- **Language**: TypeScript (inferred from backend consistency) -- **Fonts**: - - PixelifySans (pixel art style font) - - Geist (modern sans-serif) - - NotoColorEmoji (for flag emojis) -- **Map Library**: Likely Leaflet or Mapbox (for world map integration) -- **PWA**: Progressive Web App with service worker -- **Build Tool**: Vite (standard for SvelteKit) - -## Project Structure - -Based on compiled output, the frontend likely has these routes: - -``` -/ - Main canvas view -/admin - Admin panel -/admin/* - Various admin sub-pages -/moderation - Moderation panel -/maps - Map-related pages -404.html - 404 error page -``` - -## API Endpoints Reference - -### Authentication (`/auth`) - -#### POST `/login` -- **Body**: `{ username: string, password: string }` -- **Response**: `{ success: boolean }` -- **Cookie**: Sets `j` cookie (JWT token, HttpOnly, 30 day expiry) -- **Note**: Auto-registers users if username doesn't exist - -#### POST `/auth/logout` -- **Headers**: Requires JWT cookie -- **Response**: `{ success: boolean }` -- **Cookie**: Clears `j` cookie - ---- - -### Pixel Operations (`/pixel`) - -#### GET `/:season/tile/random` -- **Purpose**: Get random tile coordinates to start viewing -- **Response**: `{ tileX: number, tileY: number }` - -#### GET `/:season/pixel/:tileX/:tileY?x=X&y=Y` -- **Purpose**: Get information about a specific pixel -- **Query Params**: - - `x` (0-999): pixel X within tile - - `y` (0-999): pixel Y within tile -- **Response**: -```typescript -{ - colorId: number, - paintedBy: number, - paintedAt: string, - user: { - id: number, - name: string, - level: number, - equippedFlag: number - } -} -``` - -#### GET `/files/:season/tiles/:tileX/:tileY.png` -- **Purpose**: Get rendered tile image (1000x1000 pixels) -- **Response**: PNG image -- **Cache**: 5 minutes (`Cache-Control: public, max-age=300`) - -#### POST `/:season/pixel/:tileX/:tileY` -- **Purpose**: Paint one or more pixels -- **Headers**: Requires JWT cookie -- **Body**: -```typescript -{ - colors: number[], // Array of colorIds (0-63) - coords: number[][] // Array of [x, y] coordinates within tile -} -``` -- **Response**: -```typescript -{ - success: boolean, - currentCharges: number, - maxCharges: number, - chargesLastUpdatedAt: string, - pixelsPainted: number, - level: number -} -``` -- **Errors**: - - 400: Invalid coordinates or colors - - 403: Not enough charges, color not unlocked, or timed out - ---- - -### User Profile (`/me`) - -#### GET `/me` -- **Headers**: Requires JWT cookie -- **Response**: -```typescript -{ - id: number, - name: string, - discord: string | null, - country: string, - droplets: number, - currentCharges: number, - maxCharges: number, - chargesCooldownMs: number, - chargesLastUpdatedAt: string, - pixelsPainted: number, - level: number, - equippedFlag: number, - extraColorsBitmap: string, // base64 encoded - flagsBitmap: string | null, // base64 encoded - showLastPixel: boolean, - picture: string | null, - allianceId: number | null, - allianceRole: string, - alliance: { - id: number, - name: string, - description: string, - pixelsPainted: number - } | null -} -``` - -#### POST `/me/update` -- **Headers**: Requires JWT cookie -- **Body**: -```typescript -{ - name?: string, // 3-20 chars - showLastPixel?: boolean, - discord?: string // Optional Discord username -} -``` -- **Response**: Updated user profile (same as GET /me) - -#### GET `/me/profile-pictures` -- **Headers**: Requires JWT cookie -- **Response**: -```typescript -{ - pictures: Array<{ - id: number, - url: string - }> -} -``` - ---- - -### Alliance System (`/alliance`) - -#### GET `/alliance` -- **Headers**: Requires JWT cookie -- **Response**: User's current alliance details or error if not in alliance - -#### POST `/alliance` -- **Purpose**: Create new alliance -- **Headers**: Requires JWT cookie -- **Body**: `{ name: string }` // 3-30 chars, unique -- **Response**: Alliance details - -#### POST `/alliance/update-description` -- **Headers**: Requires JWT cookie (must be alliance admin) -- **Body**: `{ description: string }` // Max 500 chars -- **Response**: Updated alliance - -#### GET `/alliance/invites` -- **Headers**: Requires JWT cookie (must be alliance admin) -- **Response**: -```typescript -{ - invites: Array<{ - id: string, // UUID - createdAt: string - }> -} -``` - -#### GET `/alliance/join/:invite` -- **Headers**: Requires JWT cookie -- **Response**: Joins alliance via invite code - -#### POST `/alliance/update-headquarters` -- **Headers**: Requires JWT cookie (must be alliance admin) -- **Body**: `{ latitude: number, longitude: number }` -- **Response**: Updated alliance - -#### GET `/alliance/members/:page` -- **Headers**: Requires JWT cookie -- **Params**: `page` (0-indexed) -- **Response**: -```typescript -{ - members: Array<{ - id: number, - name: string, - pixelsPainted: number, - level: number, - role: string, - equippedFlag: number - }>, - total: number, - page: number, - pageSize: number -} -``` - -#### GET `/alliance/members/banned/:page` -- **Headers**: Requires JWT cookie (must be alliance admin) -- **Response**: Paginated list of banned users - -#### POST `/alliance/give-admin` -- **Headers**: Requires JWT cookie (must be alliance owner) -- **Body**: `{ promotedUserId: number }` -- **Response**: 200 OK - -#### POST `/alliance/ban` -- **Headers**: Requires JWT cookie (must be alliance admin) -- **Body**: `{ bannedUserId: number }` -- **Response**: Updated alliance - -#### POST `/alliance/unban` -- **Headers**: Requires JWT cookie (must be alliance admin) -- **Body**: `{ unbannedUserId: number }` -- **Response**: Updated alliance - -#### GET `/alliance/leaderboard/:mode` -- **Headers**: Requires JWT cookie -- **Params**: `mode` - "today" | "week" | "month" | "all-time" -- **Response**: Top 50 alliances with pixel counts - ---- - -### Leaderboards (`/leaderboard`) - -#### GET `/leaderboard/player/:mode` -- **Params**: `mode` - "today" | "week" | "month" | "all-time" -- **Response**: -```typescript -Array<{ - id: number, - name: string, - allianceId: number, - allianceName: string, - equippedFlag: number, - pixelsPainted: number, - picture?: string, - discord: string -}> -``` - -#### GET `/leaderboard/alliance/:mode` -- **Params**: `mode` - "today" | "week" | "month" | "all-time" -- **Response**: -```typescript -Array<{ - id: number, - name: string, - pixelsPainted: number -}> -``` - -#### GET `/leaderboard/country/:mode` -- **Params**: `mode` - "today" | "week" | "month" | "all-time" -- **Response**: Array of countries with pixel counts -- **Note**: Currently returns mock data, needs implementation - -#### GET `/leaderboard/region/:mode/:country` -- **Params**: - - `mode` - "today" | "week" | "month" | "all-time" - - `country` - Country ID number -- **Response**: Array of regions with pixel counts -- **Note**: Currently returns mock data, needs implementation - -#### GET `/leaderboard/region/players/:city/:mode` -- **Params**: - - `city` - City ID - - `mode` - "today" | "week" | "month" | "all-time" -- **Response**: Top 50 players in region -- **Note**: City parameter currently unused - -#### GET `/leaderboard/region/alliances/:city/:mode` -- **Params**: - - `city` - City ID - - `mode` - "today" | "week" | "month" | "all-time" -- **Response**: Top 50 alliances in region -- **Note**: City parameter currently unused - ---- - -### Store (`/store`) - -#### POST `/purchase` -- **Headers**: Requires JWT cookie -- **Body**: -```typescript -{ - product: { - id: 70 | 80 | 100 | 110, - amount?: number, // Quantity (default 1) - variant?: number // For colors (32-63) or flags (1-251) - } -} -``` -- **Product IDs**: - - 70: +5 Max Charges (500 droplets) - - 80: +30 Paint Charges (500 droplets) - - 100: Unlock Paid Color (2000 droplets) - requires `variant` (32-63) - - 110: Unlock Flag (20,000 droplets) - requires `variant` (1-251) -- **Response**: `{ success: boolean }` -- **Errors**: 403 if insufficient droplets - -#### POST `/flag/equip/:id` -- **Headers**: Requires JWT cookie -- **Params**: `id` - Flag ID (1-251) -- **Response**: `{ success: boolean }` -- **Errors**: 403 if flag not unlocked - ---- - -### Admin Panel (`/admin/*`) - -**All admin endpoints require:** -- JWT cookie authentication -- User role = "admin" -- Returns 403 Forbidden otherwise - -#### GET `/admin/users?id=USER_ID` -- **Query**: `id` - User ID -- **Response**: -```typescript -{ - id: number, - name: string, - droplets: number, - picture: string | null, - role: string, - timeout_until: string, - ban_reason: null, // TODO: Not implemented - reported_times: 0, // TODO: Not implemented - timeouts_count: 0, // TODO: Not implemented - same_ip_accounts: 0, // TODO: Not implemented - alliance_id: number | null, - alliance_name: string | null, - pixels_painted: number, - phone_validated: false, // TODO: Not implemented - discord: string | null -} -``` - -#### GET `/admin/users/notes?userId=USER_ID` -- **Query**: `userId` - User ID -- **Response**: -```typescript -{ - notes: Array<{ - id: number, - author: { - role: string, - id: number, - name: string - }, - note: string, - createdAt: string - }> -} -``` - -#### POST `/admin/users/notes` -- **Body**: `{ userId: number, note: string }` -- **Response**: `{}` - -#### GET `/admin/users/tickets?id=USER_ID` -- **Query**: `id` - User ID -- **Response**: `{}` // TODO: Not implemented - -#### GET `/admin/users/purchases?userId=USER_ID` -- **Query**: `userId` - User ID -- **Response**: `{}` // TODO: Not implemented - -#### POST `/admin/users/set-user-droplets` -- **Body**: `{ userId: number, droplets: number }` // Adds droplets (can be negative) -- **Response**: `{ success: boolean }` - -#### GET `/admin/tickets` -- **Response**: Open tickets grouped by reported user -```typescript -{ - tickets: Array<{ - id: number, // Reported user ID - reportedUser: { - id: number, - name: string, - discord: string, - country: string, - banned: boolean - }, - createdAt: string, - reports: Array<{ - id: string, // Ticket ID (UUID) - latitude: number, - longitude: number, - zoom: number, - reason: string, - notes: string, - image: string, - createdAt: string - }> - }>, - status: 200 -} -``` - -#### GET `/admin/closed-tickets` -- **Response**: Same as `/admin/tickets` but for resolved tickets - -#### GET `/admin/open-tickets-count` -- **Response**: `{ tickets: number }` - -#### POST `/admin/severe-open-tickets-count` -- **Response**: `{ tickets: number }` - -#### POST `/admin/assign-new-tickets` -- **Response**: `{ newTicketsIds: [] }` // TODO: Not implemented - -#### GET `/admin/count-all-tickets` -- **Response**: -```typescript -{ - doxxing: number, - inappropriate_content: number, - hate_speech: number, - bot: number, - other: number, - griefing: number, - total_open_tickets: number -} -``` - -#### GET `/admin/count-all-reports` -- **Response**: Same as `/admin/count-all-tickets` // TODO: Uses same data - -#### GET `/admin/alliances/:id` -- **Params**: `id` - Alliance ID -- **Response**: -```typescript -{ - id: number, - name: string, - pixelsPainted: number -} -``` - -#### GET `/admin/alliances/:id/full` -- **Params**: `id` - Alliance ID -- **Response**: Full alliance details including members, bans, etc. - -#### GET `/admin/alliances/search?q=QUERY` -- **Query**: `q` - Search by name or ID -- **Response**: `{ results: Alliance[] }` // Top 20 results - ---- - -### Moderation Panel (`/moderator/*`) - -**All moderator endpoints require:** -- JWT cookie authentication -- User role = "moderator" or "admin" -- Returns 403 Forbidden otherwise - -#### GET `/moderator/tickets` -- **Response**: Same format as `/admin/tickets` - -#### GET `/moderator/users/tickets?userId=USER_ID` -- **Query**: `userId` - User ID -- **Response**: All tickets for a specific user - -#### GET `/moderator/open-tickets-count` -- **Response**: `{ tickets: number }` - -#### POST `/moderator/severe-open-tickets-count` -- **Response**: `{ tickets: number }` - -#### POST `/moderator/assign-new-tickets` -- **Response**: `{ newTicketsIds: [] }` // TODO: Not implemented - -#### GET `/moderator/count-my-tickets` -- **Response**: `0` // TODO: Not implemented - ---- - -## Core Frontend Features to Implement - -### 1. Authentication System - -**Components:** -- Login form (see `LoginForm` CSS asset) -- Registration flow (combined with login) -- Session management using JWT cookie -- Auto-redirect to login if unauthorized - -**Key Implementation Details:** -- Cookie name: `j` -- Cookie is HttpOnly (not accessible via JavaScript) -- 30-day expiration -- Auto-create account on first login with username/password - ---- - -### 2. Main Canvas View - -**Components:** -- Interactive world map (Leaflet/Mapbox) -- Tile-based pixel rendering system -- Zoom controls -- Color picker palette (32 free colors + 32 paid colors) -- Brush/paint tool -- Pixel info tooltip on hover/click -- Charge indicator (shows current/max charges) -- Level display - -**Technical Requirements:** -- Tiles are 1000x1000 pixels -- Fetch tiles as PNG images: `/files/:season/tiles/:tileX/:tileY.png` -- Cache tiles appropriately (5 min cache header) -- Calculate global coordinates: `globalX = tileX * 1000 + x`, `globalY = tileY * 1000 + y` -- Map global coordinates to lat/lng for world map overlay -- Handle painting multiple pixels in one request -- Show charge regeneration countdown (default: 1 charge per 30 seconds) -- Disable paid colors unless unlocked (check `extraColorsBitmap`) - -**Charge System:** -- Default: 20 max charges -- Regenerates 1 charge every 30 seconds (configurable per user) -- Painting consumes charges -- Must calculate current charges: `currentCharges + floor((now - lastUpdate) / cooldownMs)` -- 10% discount when painting in equipped flag's region (TODO: region system not implemented) - -**Color Palette (0-63):** -```typescript -// Colors 0-31: Free -// Colors 32-63: Paid (require purchase) -// Color 0: Transparent -// Check if color unlocked: extraColorsBitmap & (1 << (colorId - 32)) -``` - -Full color palette available in backend: `src/utils/colors.ts` - ---- - -### 3. User Profile Page - -**Components:** -- Profile avatar with level indicator (see `ProfileAvatarWithLevel` CSS asset) -- Username (editable) -- Discord username (editable) -- Show last pixel toggle -- Droplets balance -- Charges indicator -- Pixels painted count -- Level display -- Equipped flag display -- Alliance affiliation - -**Features:** -- Edit profile settings -- View unlocked colors -- View unlocked flags -- View alliance info -- View favorite locations (TODO: not implemented in backend) - ---- - -### 4. Alliance System - -**Components:** -- Alliance creation dialog -- Alliance info panel -- Member list (paginated, 50 per page) -- Admin controls (for alliance admins) -- Invite system -- Ban management -- Headquarters map marker - -**Features:** -- Create alliance (requires no current alliance) -- Join alliance via invite link -- Leave alliance -- Update description (admins only) -- Set headquarters location on map (admins only) -- Promote members to admin (owner only) -- Ban/unban members (admins only) -- View alliance leaderboard - ---- - -### 5. Leaderboards - -**Views:** -- Player leaderboard (top 50) -- Alliance leaderboard (top 50) -- Country leaderboard -- Region leaderboard -- Regional player leaderboard -- Regional alliance leaderboard - -**Time Filters:** -- Today -- Week (last 7 days) -- Month (current month) -- All-time - -**Display Fields:** -- Rank (1-50) -- Player name / Alliance name -- Equipped flag icon -- Pixels painted -- Alliance affiliation (for players) - ---- - -### 6. Store System - -**Products:** -1. **+5 Max Charges** (500 droplets) - - Increases maxCharges by 5 - - Can purchase multiple - -2. **+30 Paint Charges** (500 droplets) - - Adds 30 to currentCharges (up to max) - - Can purchase multiple - -3. **Unlock Paid Color** (2000 droplets each) - - Unlocks one of colors 32-63 - - Must select color variant - - Updates `extraColorsBitmap` - -4. **Unlock Flag** (20,000 droplets each) - - Unlocks one of 251 country flags - - Must select flag variant (1-251) - - Updates `flagsBitmap` - -**Implementation:** -- Display droplet balance -- Show which colors/flags are already unlocked -- Disable purchase if insufficient droplets -- Confirmation dialog before purchase -- Update UI after successful purchase - -**Flag Equipping:** -- Separate endpoint to equip owned flag -- Can only equip flags that are unlocked -- Equipped flag shown on profile and leaderboards - ---- - -### 7. Admin Panel - -**Pages:** -- User management -- Ticket management (reports) -- Alliance management -- Statistics dashboard - -**User Management:** -- Search users by ID -- View user details -- View user notes -- Add moderator notes -- Set droplets (add/subtract) -- View user tickets -- View purchase history (TODO) - -**Ticket Management:** -- View open tickets -- View closed tickets -- Tickets grouped by reported user -- Show ticket details (location, reason, image evidence) -- Assign tickets to moderators (TODO) -- Count tickets by reason - -**Alliance Management:** -- Search alliances -- View alliance details -- View full alliance info (members, bans) - ---- - -### 8. Moderation Panel - -**Features:** -- View assigned tickets -- View all open tickets -- View user ticket history -- Count severe tickets -- Count my assigned tickets (TODO) - -**Ticket Types:** -- Doxxing -- Inappropriate Content -- Hate Speech -- Bot -- Griefing -- Other - -**Ticket Details:** -- Reporter info -- Reported user info -- Canvas location (lat/lng, zoom) -- Reason -- Notes -- Evidence image -- Timestamp - ---- - -## Data Models - -### User -```typescript -{ - id: number - name: string - discord: string | null - country: string - email: string | null - banned: boolean - timeoutUntil: Date - role: "user" | "moderator" | "admin" - pixelsPainted: number - droplets: number - maxCharges: number - currentCharges: number - chargesCooldownMs: number - chargesLastUpdatedAt: Date - extraColorsBitmap: number // Bitmask for unlocked paid colors - flagsBitmap: Bytes | null // Bitmap for unlocked flags - equippedFlag: number // Currently equipped flag (0 = none) - showLastPixel: boolean - picture: string | null - level: number // floor(sqrt(pixelsPainted / 100)) + 1 - allianceId: number | null - allianceRole: "member" | "admin" | "owner" -} -``` - -### Alliance -```typescript -{ - id: number - name: string // Unique, 3-30 chars - description: string | null // Max 500 chars - hqLatitude: number | null - hqLongitude: number | null - pixelsPainted: number - members: User[] - bannedUsers: BannedUser[] - invites: AllianceInvite[] -} -``` - -### Pixel -```typescript -{ - id: number - tileX: number - tileY: number - x: number // 0-999 - y: number // 0-999 - colorId: number // 0-63 - paintedBy: number // User ID - paintedAt: Date -} -``` - -### Tile -```typescript -{ - id: number - x: number // Tile X coordinate - y: number // Tile Y coordinate - imageData: Bytes | null // Cached PNG (if applicable) - pixels: Pixel[] -} -``` - -### Ticket (Report) -```typescript -{ - id: string // UUID - userId: number // Reporter - reportedUserId: number // Reported user - latitude: number // Canvas location - longitude: number - zoom: number - reason: "doxxing" | "inappropriate_content" | "hate_speech" | "bot" | "griefing" | "other" - notes: string - image: string // Evidence image URL/path - resolved: boolean - severe: boolean - createdAt: Date -} -``` - -### Region -```typescript -{ - id: number - cityId: number - name: string - number: number - countryId: number - flagId: number -} -``` - ---- - -## Constants and Configuration - -### Season -- Default: `"s1"` (Season 1) -- Used in pixel API endpoints: `/:season/pixel/...` - -### Color Palette -- 64 total colors (0-63) -- 0-31: Free colors -- 32-63: Paid colors (2000 droplets each) -- Color 0: Transparent/eraser - -### Flags -- 251 total country flags (1-251) -- 20,000 droplets each -- Stored as bitmap in `flagsBitmap` - -### Charge System -- Default max charges: 20 -- Default cooldown: 30,000ms (30 seconds) -- Formula: `floor((now - lastUpdate) / cooldownMs)` charges regenerated - -### Level Calculation -```typescript -level = floor(sqrt(pixelsPainted / 100)) + 1 -``` - -### Pagination -- Default page size: 50 -- Pages are 0-indexed - -### Validation Rules -- Username: 3-20 characters -- Alliance name: 3-30 characters, unique -- Alliance description: Max 500 characters -- Coordinates: x, y must be 0-999 within tile -- Color ID: 0-63 - ---- - -## State Management - -**Client-side state to manage:** - -1. **User State** - - Current user profile - - Authentication status - - Charge count (auto-update based on time) - - Droplets balance - - Unlocked colors/flags - -2. **Canvas State** - - Current map position (lat/lng) - - Zoom level - - Visible tiles - - Selected color - - Brush mode - - Cached tile images - -3. **Alliance State** - - Current alliance - - Member list - - Invites (if admin) - - Leaderboard - -4. **UI State** - - Active modal/dialog - - Sidebar open/closed - - Selected leaderboard mode - - Selected leaderboard time filter - -**Real-time considerations:** -- Pixel updates from other users (consider WebSocket/polling) -- Charge regeneration countdown -- Leaderboard updates - ---- - -## UI/UX Guidelines - -### Theme -- Light theme only (from meta tag: `color-scheme: light only`) -- Theme color: `#f8f4f0` (from webmanifest) -- Background: `#ffffff` - -### Fonts -- **PixelifySans**: Use for headings, canvas UI elements, retro aesthetic -- **Geist**: Use for body text, modern UI -- **NotoColorEmoji**: Use for flag rendering - -### Responsive Design -- Mobile-first approach -- PWA optimized -- Touch-friendly controls for canvas -- Separate mobile/desktop layouts for complex pages (admin panel) - -### Key Interactions -- Hover over pixel: Show tooltip with painter info -- Click pixel: Show detailed pixel info modal -- Click map: Pan to location -- Click color: Select for painting -- Click canvas: Paint pixel(s) with selected color -- Right-click/long-press: Color picker (pick color from canvas) - ---- - -## Assets Required - -### Images -- Favicon (multiple sizes) -- App icons (192x192, 512x512) -- PWA screenshots -- Flag sprite sheet (flags.webp, flags@2x.webp @ 2x resolution) -- OG image for social sharing - -### Audio -- `notification.mp3` - For notification sounds - -### Existing Assets (in `/frontend` folder) -- `/img/*` - Various images -- `/maps/*` - Map-related assets -- `/download.png`, `/download.svg` - Download icons -- `PixelifySans-latin.vdc2vUDH.woff2` - Font file -- `css2.css` - Likely Google Fonts CSS - ---- - -## Service Worker & PWA - -**Features to implement:** -- Offline canvas viewing (cache tiles) -- Background sync for painted pixels -- Push notifications for alliance updates -- Install prompt handling (see `window.pwaInstallPrompt` in index.html) -- Cache strategy for static assets -- Network-first for API calls -- Cache-first for tile images - -**Service Worker Registration:** -```javascript -if ('serviceWorker' in navigator) { - navigator.serviceWorker.register('/service-worker.js'); -} -``` - ---- - -## WebSocket / Real-time Updates (Recommended) - -While not currently implemented in the backend, the frontend should be designed to support real-time updates: - -**Potential WebSocket events:** -- `pixel:painted` - Another user painted a pixel -- `tile:updated` - Tile has new pixels -- `alliance:member_joined` - New alliance member -- `charge:regenerated` - Charge regenerated (client-side timer is fine too) -- `leaderboard:updated` - Leaderboard changed - -**Implementation approach:** -1. Start with polling (GET tile images every 5 seconds for visible tiles) -2. Design component architecture to easily swap in WebSocket later -3. Use event emitter pattern for pixel updates - ---- - -## Routing Structure (SvelteKit) - -``` -src/routes/ -├── +page.svelte # Main canvas view -├── +layout.svelte # Root layout (auth check, header, etc.) -├── admin/ -│ ├── +page.svelte # Admin dashboard -│ ├── users/ -│ │ └── +page.svelte # User management -│ ├── tickets/ -│ │ ├── +page.svelte # Open tickets -│ │ └── closed/+page.svelte # Closed tickets -│ └── alliances/ -│ └── +page.svelte # Alliance management -├── moderation/ -│ ├── +page.svelte # Moderator dashboard -│ └── tickets/+page.svelte # Assigned tickets -├── leaderboard/ -│ └── +page.svelte # Leaderboard with tabs -├── profile/ -│ └── +page.svelte # User profile -├── alliance/ -│ ├── +page.svelte # Alliance view/create -│ └── [inviteId]/+page.svelte # Join alliance via invite -└── store/ - └── +page.svelte # Store page -``` - ---- - -## Component Architecture (Suggested) - -### Shared Components -``` -src/lib/components/ -├── auth/ -│ ├── LoginForm.svelte -│ └── AuthGuard.svelte -├── canvas/ -│ ├── MapCanvas.svelte -│ ├── TileLayer.svelte -│ ├── ColorPicker.svelte -│ ├── BrushTool.svelte -│ ├── PixelInfo.svelte -│ └── ChargeIndicator.svelte -├── user/ -│ ├── ProfileAvatar.svelte -│ ├── ProfileAvatarWithLevel.svelte # Existing CSS asset -│ ├── UserCard.svelte -│ └── UserStats.svelte -├── alliance/ -│ ├── AllianceCard.svelte -│ ├── AllianceMembers.svelte -│ ├── AllianceInvite.svelte -│ └── CreateAlliance.svelte -├── leaderboard/ -│ ├── LeaderboardTable.svelte -│ ├── LeaderboardFilters.svelte -│ └── LeaderboardEntry.svelte -├── store/ -│ ├── StoreItem.svelte -│ ├── ColorUnlockGrid.svelte -│ └── FlagSelector.svelte -├── admin/ -│ ├── UserSearch.svelte -│ ├── UserDetails.svelte -│ ├── TicketList.svelte -│ ├── TicketDetails.svelte -│ └── AllianceSearch.svelte -└── common/ - ├── Button.svelte - ├── Modal.svelte - ├── Pagination.svelte - ├── Toast.svelte - └── Tooltip.svelte -``` - ---- - -## Store (Svelte Stores) - -```typescript -// src/lib/stores/auth.ts -export const currentUser = writable(null); -export const isAuthenticated = derived(currentUser, $user => !!$user); - -// src/lib/stores/canvas.ts -export const selectedColor = writable(1); -export const currentCharges = writable(20); -export const canvasPosition = writable<{lat: number, lng: number, zoom: number}>(); -export const visibleTiles = writable>(); // "x,y" tile keys - -// src/lib/stores/alliance.ts -export const currentAlliance = writable(null); - -// src/lib/stores/ui.ts -export const activeModal = writable(null); -export const sidebarOpen = writable(false); -``` - ---- - -## API Client - -Create a typed API client for all backend endpoints: - -```typescript -// src/lib/api/client.ts -export class ApiClient { - private baseUrl = ''; // Same origin - - // Auth - async login(username: string, password: string) { ... } - async logout() { ... } - - // Pixels - async getRandomTile() { ... } - async getPixelInfo(tileX, tileY, x, y) { ... } - async paintPixels(tileX, tileY, colors, coords) { ... } - getTileImageUrl(tileX, tileY): string { ... } - - // User - async getProfile() { ... } - async updateProfile(data) { ... } - - // Alliance - async getAlliance() { ... } - async createAlliance(name) { ... } - // ... etc - - // Leaderboards - async getPlayerLeaderboard(mode) { ... } - // ... etc - - // Store - async purchase(productId, amount, variant?) { ... } - async equipFlag(flagId) { ... } - - // Admin (requires admin role) - async getUser(userId) { ... } - // ... etc -} - -export const api = new ApiClient(); -``` - ---- - -## Bitmap Utilities (Client-side) - -Implement bitmap helper for colors and flags: - -```typescript -// src/lib/utils/bitmap.ts -export class WplaceBitmap { - private bytes: Uint8Array; - - constructor(base64?: string) { - if (base64) { - this.bytes = Uint8Array.from(atob(base64), c => c.charCodeAt(0)); - } else { - this.bytes = new Uint8Array(0); - } - } - - get(index: number): boolean { - const byteIndex = Math.floor(index / 8); - const bitIndex = index % 8; - if (byteIndex >= this.bytes.length) return false; - const realIndex = this.bytes.length - 1 - byteIndex; - return (this.bytes[realIndex] & (1 << bitIndex)) !== 0; - } - - toBase64(): string { - return btoa(String.fromCharCode(...this.bytes)); - } -} - -export function isColorUnlocked(colorId: number, extraColorsBitmap: number): boolean { - if (colorId < 32) return true; - const mask = 1 << (colorId - 32); - return (extraColorsBitmap & mask) !== 0; -} -``` - ---- - -## Charge Calculation (Client-side) - -```typescript -// src/lib/utils/charges.ts -export function calculateCurrentCharges( - currentCharges: number, - maxCharges: number, - lastUpdate: Date, - cooldownMs: number -): number { - if (currentCharges >= maxCharges) return currentCharges; - - const timeSinceLastUpdate = Date.now() - lastUpdate.getTime(); - const chargesGenerated = Math.floor(timeSinceLastUpdate / cooldownMs); - - return Math.min(maxCharges, currentCharges + chargesGenerated); -} - -export function getNextChargeTime( - currentCharges: number, - maxCharges: number, - lastUpdate: Date, - cooldownMs: number -): Date | null { - if (currentCharges >= maxCharges) return null; - - const timeSinceLastUpdate = Date.now() - lastUpdate.getTime(); - const timeUntilNextCharge = cooldownMs - (timeSinceLastUpdate % cooldownMs); - - return new Date(Date.now() + timeUntilNextCharge); -} -``` - ---- - -## Level Calculation (Client-side) - -```typescript -// src/lib/utils/level.ts -export function calculateLevel(pixelsPainted: number): number { - return Math.floor(Math.sqrt(pixelsPainted / 100)) + 1; -} - -export function getPixelsForNextLevel(currentLevel: number): number { - return ((currentLevel + 1 - 1) ** 2) * 100; -} - -export function getLevelProgress(pixelsPainted: number): number { - const currentLevel = calculateLevel(pixelsPainted); - const pixelsForCurrentLevel = ((currentLevel - 1) ** 2) * 100; - const pixelsForNextLevel = (currentLevel ** 2) * 100; - const pixelsInCurrentLevel = pixelsPainted - pixelsForCurrentLevel; - const pixelsNeededForLevel = pixelsForNextLevel - pixelsForCurrentLevel; - - return pixelsInCurrentLevel / pixelsNeededForLevel; -} -``` - ---- - -## Color Palette (Client-side) - -```typescript -// src/lib/constants/colors.ts -export interface Color { - rgb: [number, number, number]; - paid: boolean; -} - -export const COLOR_PALETTE: Record = { - 0: { rgb: [0, 0, 0], paid: false }, // Transparent - 1: { rgb: [0, 0, 0], paid: false }, - 2: { rgb: [60, 60, 60], paid: false }, - // ... (copy from backend src/utils/colors.ts) - 63: { rgb: [205, 197, 158], paid: true } -}; - -export function getColorHex(colorId: number): string { - const color = COLOR_PALETTE[colorId]; - if (!color) return '#000000'; - const [r, g, b] = color.rgb; - return `#${r.toString(16).padStart(2, '0')}${g.toString(16).padStart(2, '0')}${b.toString(16).padStart(2, '0')}`; -} -``` - ---- - -## Testing Checklist - -### Authentication -- [ ] Login with existing account -- [ ] Register new account (auto-create on login) -- [ ] Logout -- [ ] Session persistence across page reloads -- [ ] Redirect to login on 401 - -### Canvas -- [ ] Load random tile on first visit -- [ ] Pan and zoom map -- [ ] Render tile images correctly -- [ ] Paint single pixel -- [ ] Paint multiple pixels -- [ ] Color picker selection -- [ ] Charge deduction after painting -- [ ] Charge regeneration countdown -- [ ] Hover tooltip with pixel info -- [ ] Cannot paint without charges -- [ ] Cannot paint with locked color - -### Profile -- [ ] View own profile -- [ ] Edit username -- [ ] Edit discord -- [ ] Toggle show last pixel -- [ ] View unlocked colors -- [ ] View unlocked flags -- [ ] Display correct level - -### Alliance -- [ ] Create alliance -- [ ] Join alliance via invite -- [ ] Leave alliance -- [ ] Update description (admin) -- [ ] Set HQ location (admin) -- [ ] View members list (paginated) -- [ ] Promote member (owner only) -- [ ] Ban member (admin) -- [ ] Unban member (admin) -- [ ] View alliance leaderboard - -### Leaderboards -- [ ] Player leaderboard (all time modes) -- [ ] Alliance leaderboard (all time modes) -- [ ] Correct sorting by pixels painted -- [ ] Display alliance affiliation for players -- [ ] Display equipped flags - -### Store -- [ ] Purchase max charges -- [ ] Purchase paint charges -- [ ] Purchase color unlock -- [ ] Purchase flag unlock -- [ ] Equip purchased flag -- [ ] Cannot purchase without droplets -- [ ] Cannot equip non-owned flag - -### Admin Panel -- [ ] Search user by ID -- [ ] View user details -- [ ] Add user note -- [ ] Set user droplets -- [ ] View open tickets -- [ ] View closed tickets -- [ ] Count tickets by reason -- [ ] Search alliances -- [ ] View alliance details - -### Moderation Panel -- [ ] View assigned tickets -- [ ] View all open tickets -- [ ] Count severe tickets -- [ ] View user ticket history - ---- - -## Known Limitations / TODOs - -**Backend TODOs (frontend should account for):** -1. Region system returns placeholder data -2. Country/region leaderboards not fully implemented -3. Ticket assignment system not implemented -4. Purchase history not tracked -5. User ban/timeout system incomplete -6. Phone verification not implemented -7. Same IP account detection not implemented -8. Report counts not implemented - -**Frontend recommendations:** -- Add WebSocket support for real-time pixel updates -- Implement efficient tile caching strategy -- Add undo/redo for painting -- Add eyedropper tool (pick color from canvas) -- Add minimap for navigation -- Add search functionality for map locations -- Add notification system for alliance events -- Add dark mode toggle (update meta tag) - ---- - -## Development Setup - -1. **Initialize SvelteKit project:** - ```bash - npm create svelte@latest frontend - cd frontend - npm install - ``` - -2. **Install dependencies:** - ```bash - npm install -D @sveltejs/adapter-static - npm install leaflet # or mapbox-gl - npm install @types/leaflet -D - ``` - -3. **Configure for static build:** - Update `svelte.config.js` to use `adapter-static` - -4. **Environment variables:** - Create `.env`: - ``` - PUBLIC_API_URL=http://localhost:3000 - PUBLIC_SEASON=s1 - ``` - -5. **Development:** - ```bash - npm run dev - ``` - -6. **Build:** - ```bash - npm run build - ``` - Output to `build/` directory, copy to backend's `frontend/` folder - ---- - -## API Response Error Handling - -All endpoints follow consistent error format: - -```typescript -{ - error: string, // Error message - status: number // HTTP status code -} -``` - -**Common status codes:** -- 400: Bad Request (validation error) -- 401: Unauthorized (not logged in) -- 403: Forbidden (insufficient permissions, banned, timed out, or not enough resources) -- 404: Not Found -- 500: Internal Server Error - -**Frontend should handle:** -- Display error messages from `error` field -- Redirect to login on 401 -- Show appropriate UI feedback for 403 (e.g., "You don't have permission") -- Retry on 500 with exponential backoff - ---- - -## Final Notes - -This TODO document provides a comprehensive reference for recreating the frontend. The backend API is fully functional and documented here. The frontend should be built as a SvelteKit static site that communicates with this backend via the documented API endpoints. - -Key priorities: -1. Authentication and session management -2. Main canvas view with painting functionality -3. User profile and settings -4. Alliance system -5. Leaderboards -6. Store -7. Admin/moderation panels - -The compiled frontend in the current `frontend/` folder can serve as a reference for styling and UX patterns, but the source code needs to be recreated from scratch based on this documentation. diff --git a/frontend-backup/_app/admin-content-editor.html b/frontend-backup/_app/admin-content-editor.html deleted file mode 100644 index 224ce9e..0000000 --- a/frontend-backup/_app/admin-content-editor.html +++ /dev/null @@ -1,532 +0,0 @@ - - - - - - Site Content Editor - Admin Panel - - - -
-

🎨 Site Content Editor

-

Manage modal content, rules, and site text

- -
-
- -
-
- Total Items - 0 -
-
- Current Locale - en -
-
- -
-
- - -
- - - - -
- -
-

Add New Content Item

-
- - -
- - -
- -
- Loading content... -
-
- - - - diff --git a/frontend-backup/_app/immutable/assets/0.0xfYb4uv.css b/frontend-backup/_app/immutable/assets/0.0xfYb4uv.css new file mode 100644 index 0000000..3ca34d0 --- /dev/null +++ b/frontend-backup/_app/immutable/assets/0.0xfYb4uv.css @@ -0,0 +1,7656 @@ +html[dir="ltr"], +[data-sonner-toaster][dir="ltr"] { + --toast-icon-margin-start: -3px; + --toast-icon-margin-end: 4px; + --toast-svg-margin-start: -1px; + --toast-svg-margin-end: 0px; + --toast-button-margin-start: auto; + --toast-button-margin-end: 0; + --toast-close-button-start: 0; + --toast-close-button-end: unset; + --toast-close-button-transform: translate(-35%, -35%); +} +html[dir="rtl"], +[data-sonner-toaster][dir="rtl"] { + --toast-icon-margin-start: 4px; + --toast-icon-margin-end: -3px; + --toast-svg-margin-start: 0px; + --toast-svg-margin-end: -1px; + --toast-button-margin-start: 0; + --toast-button-margin-end: auto; + --toast-close-button-start: unset; + --toast-close-button-end: 0; + --toast-close-button-transform: translate(35%, -35%); +} +[data-sonner-toaster] { + position: fixed; + width: var(--width); + font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, + Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, + Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji; + --gray1: hsl(0, 0%, 99%); + --gray2: hsl(0, 0%, 97.3%); + --gray3: hsl(0, 0%, 95.1%); + --gray4: hsl(0, 0%, 93%); + --gray5: hsl(0, 0%, 90.9%); + --gray6: hsl(0, 0%, 88.7%); + --gray7: hsl(0, 0%, 85.8%); + --gray8: hsl(0, 0%, 78%); + --gray9: hsl(0, 0%, 56.1%); + --gray10: hsl(0, 0%, 52.3%); + --gray11: hsl(0, 0%, 43.5%); + --gray12: hsl(0, 0%, 9%); + --border-radius: 8px; + box-sizing: border-box; + padding: 0; + margin: 0; + list-style: none; + outline: none; + z-index: 999999999; + transition: transform 0.4s ease; +} +@media (hover: none) and (pointer: coarse) { + [data-sonner-toaster][data-lifted="true"] { + transform: none; + } +} +[data-sonner-toaster][data-x-position="right"] { + right: var(--offset-right); +} +[data-sonner-toaster][data-x-position="left"] { + left: var(--offset-left); +} +[data-sonner-toaster][data-x-position="center"] { + left: 50%; + transform: translate(-50%); +} +[data-sonner-toaster][data-y-position="top"] { + top: var(--offset-top); +} +[data-sonner-toaster][data-y-position="bottom"] { + bottom: var(--offset-bottom); +} +[data-sonner-toast] { + --y: translateY(100%); + --lift-amount: calc(var(--lift) * var(--gap)); + z-index: var(--z-index); + position: absolute; + opacity: 0; + transform: var(--y); + touch-action: none; + transition: transform 0.4s, opacity 0.4s, height 0.4s, box-shadow 0.2s; + box-sizing: border-box; + outline: none; + overflow-wrap: anywhere; +} +[data-sonner-toast][data-styled="true"] { + padding: 16px; + background: var(--normal-bg); + border: 1px solid var(--normal-border); + color: var(--normal-text); + border-radius: var(--border-radius); + box-shadow: 0 4px 12px #0000001a; + width: var(--width); + font-size: 13px; + display: flex; + align-items: center; + gap: 6px; +} +[data-sonner-toast]:focus-visible { + box-shadow: 0 4px 12px #0000001a, 0 0 0 2px #0003; +} +[data-sonner-toast][data-y-position="top"] { + top: 0; + --y: translateY(-100%); + --lift: 1; + --lift-amount: calc(1 * var(--gap)); +} +[data-sonner-toast][data-y-position="bottom"] { + bottom: 0; + --y: translateY(100%); + --lift: -1; + --lift-amount: calc(var(--lift) * var(--gap)); +} +[data-sonner-toast][data-styled="true"] [data-description] { + font-weight: 400; + line-height: 1.4; + color: #3f3f3f; +} +[data-rich-colors="true"][data-sonner-toast][data-styled="true"] + [data-description] { + color: inherit; +} +[data-sonner-toaster][data-sonner-theme="dark"] [data-description] { + color: #e8e8e8; +} +[data-sonner-toast][data-styled="true"] [data-title] { + font-weight: 500; + line-height: 1.5; + color: inherit; +} +[data-sonner-toast][data-styled="true"] [data-icon] { + display: flex; + height: 16px; + width: 16px; + position: relative; + justify-content: flex-start; + align-items: center; + flex-shrink: 0; + margin-left: var(--toast-icon-margin-start); + margin-right: var(--toast-icon-margin-end); +} +[data-sonner-toast][data-promise="true"] [data-icon] > svg { + opacity: 0; + transform: scale(0.8); + transform-origin: center; + animation: sonner-fade-in 0.3s ease forwards; +} +[data-sonner-toast][data-styled="true"] [data-icon] > * { + flex-shrink: 0; +} +[data-sonner-toast][data-styled="true"] [data-icon] svg { + margin-left: var(--toast-svg-margin-start); + margin-right: var(--toast-svg-margin-end); +} +[data-sonner-toast][data-styled="true"] [data-content] { + display: flex; + flex-direction: column; + gap: 2px; +} +[data-sonner-toast][data-styled="true"] [data-button] { + border-radius: 4px; + padding-left: 8px; + padding-right: 8px; + height: 24px; + font-size: 12px; + color: var(--normal-bg); + background: var(--normal-text); + margin-left: var(--toast-button-margin-start); + margin-right: var(--toast-button-margin-end); + border: none; + font-weight: 500; + cursor: pointer; + outline: none; + display: flex; + align-items: center; + flex-shrink: 0; + transition: opacity 0.4s, box-shadow 0.2s; +} +[data-sonner-toast][data-styled="true"] [data-button]:focus-visible { + box-shadow: 0 0 0 2px #0006; +} +[data-sonner-toast][data-styled="true"] [data-button]:first-of-type { + margin-left: var(--toast-button-margin-start); + margin-right: var(--toast-button-margin-end); +} +[data-sonner-toast][data-styled="true"] [data-cancel] { + color: var(--normal-text); + background: #00000014; +} +[data-sonner-toaster][data-sonner-theme="dark"] + [data-sonner-toast][data-styled="true"] + [data-cancel] { + background: #ffffff4d; +} +[data-sonner-toast][data-styled="true"] [data-close-button] { + position: absolute; + left: var(--toast-close-button-start); + right: var(--toast-close-button-end); + top: 0; + height: 20px; + width: 20px; + display: flex; + justify-content: center; + align-items: center; + padding: 0; + color: var(--gray12); + background: var(--normal-bg); + border: 1px solid var(--gray4); + transform: var(--toast-close-button-transform); + border-radius: 50%; + cursor: pointer; + z-index: 1; + transition: opacity 0.1s, background 0.2s, border-color 0.2s; +} +[data-sonner-toast][data-styled="true"] [data-close-button]:focus-visible { + box-shadow: 0 4px 12px #0000001a, 0 0 0 2px #0003; +} +[data-sonner-toast][data-styled="true"] [data-disabled="true"] { + cursor: not-allowed; +} +[data-sonner-toast][data-styled="true"]:hover [data-close-button]:hover { + background: var(--gray2); + border-color: var(--gray5); +} +[data-sonner-toast][data-swiping="true"]:before { + content: ""; + position: absolute; + left: -100%; + right: -100%; + height: 100%; + z-index: -1; +} +[data-sonner-toast][data-y-position="top"][data-swiping="true"]:before { + bottom: 50%; + transform: scaleY(3) translateY(50%); +} +[data-sonner-toast][data-y-position="bottom"][data-swiping="true"]:before { + top: 50%; + transform: scaleY(3) translateY(-50%); +} +[data-sonner-toast][data-swiping="false"][data-removed="true"]:before { + content: ""; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + transform: scaleY(2); +} +[data-sonner-toast][data-expanded="true"]:after { + content: ""; + position: absolute; + left: 0; + height: calc(var(--gap) + 1px); + bottom: 100%; + width: 100%; +} +[data-sonner-toast][data-mounted="true"] { + --y: translateY(0); + opacity: 1; +} +[data-sonner-toast][data-expanded="false"][data-front="false"] { + --scale: var(--toasts-before) * 0.05 + 1; + --y: translateY(calc(var(--lift-amount) * var(--toasts-before))) + scale(calc(-1 * var(--scale))); + height: var(--front-toast-height); +} +[data-sonner-toast] > * { + transition: opacity 0.4s; +} +[data-sonner-toast][data-x-position="right"] { + right: 0; +} +[data-sonner-toast][data-x-position="left"] { + left: 0; +} +[data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"] + > * { + opacity: 0; +} +[data-sonner-toast][data-visible="false"] { + opacity: 0; + pointer-events: none; +} +[data-sonner-toast][data-mounted="true"][data-expanded="true"] { + --y: translateY(calc(var(--lift) * var(--offset))); + height: var(--initial-height); +} +[data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"] { + --y: translateY(calc(var(--lift) * -100%)); + opacity: 0; +} +[data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"] { + --y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%)); + opacity: 0; +} +[data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"] { + --y: translateY(40%); + opacity: 0; + transition: transform 0.5s, opacity 0.2s; +} +[data-sonner-toast][data-removed="true"][data-front="false"]:before { + height: calc(var(--initial-height) + 20%); +} +[data-sonner-toast][data-swiping="true"] { + transform: var(--y) translateY(var(--swipe-amount-y, 0px)) + translate(var(--swipe-amount-x, 0px)); + transition: none; +} +[data-sonner-toast][data-swiped="true"] { + -webkit-user-select: none; + user-select: none; +} +[data-sonner-toast][data-swipe-out="true"][data-y-position="bottom"], +[data-sonner-toast][data-swipe-out="true"][data-y-position="top"] { + animation-duration: 0.2s; + animation-timing-function: ease-out; + animation-fill-mode: forwards; +} +[data-sonner-toast][data-swipe-out="true"][data-swipe-direction="left"] { + animation-name: swipe-out-left; +} +[data-sonner-toast][data-swipe-out="true"][data-swipe-direction="right"] { + animation-name: swipe-out-right; +} +[data-sonner-toast][data-swipe-out="true"][data-swipe-direction="up"] { + animation-name: swipe-out-up; +} +[data-sonner-toast][data-swipe-out="true"][data-swipe-direction="down"] { + animation-name: swipe-out-down; +} +@keyframes swipe-out-left { + 0% { + transform: var(--y) translate(var(--swipe-amount-x)); + opacity: 1; + } + to { + transform: var(--y) translate(calc(var(--swipe-amount-x) - 100%)); + opacity: 0; + } +} +@keyframes swipe-out-right { + 0% { + transform: var(--y) translate(var(--swipe-amount-x)); + opacity: 1; + } + to { + transform: var(--y) translate(calc(var(--swipe-amount-x) + 100%)); + opacity: 0; + } +} +@keyframes swipe-out-up { + 0% { + transform: var(--y) translateY(var(--swipe-amount-y)); + opacity: 1; + } + to { + transform: var(--y) translateY(calc(var(--swipe-amount-y) - 100%)); + opacity: 0; + } +} +@keyframes swipe-out-down { + 0% { + transform: var(--y) translateY(var(--swipe-amount-y)); + opacity: 1; + } + to { + transform: var(--y) translateY(calc(var(--swipe-amount-y) + 100%)); + opacity: 0; + } +} +@media (max-width: 600px) { + [data-sonner-toaster] { + position: fixed; + right: var(--mobile-offset-right); + left: var(--mobile-offset-left); + width: 100%; + } + [data-sonner-toaster][dir="rtl"] { + left: calc(var(--mobile-offset-left) * -1); + } + [data-sonner-toaster] [data-sonner-toast] { + left: 0; + right: 0; + width: calc(100% - var(--mobile-offset-left) * 2); + } + [data-sonner-toaster][data-x-position="left"] { + left: var(--mobile-offset-left); + } + [data-sonner-toaster][data-y-position="bottom"] { + bottom: var(--mobile-offset-bottom); + } + [data-sonner-toaster][data-y-position="top"] { + top: var(--mobile-offset-top); + } + [data-sonner-toaster][data-x-position="center"] { + left: var(--mobile-offset-left); + right: var(--mobile-offset-right); + transform: none; + } +} +[data-sonner-toaster][data-sonner-theme="light"] { + --normal-bg: #fff; + --normal-border: var(--gray4); + --normal-text: var(--gray12); + --success-bg: hsl(143, 85%, 96%); + --success-border: hsl(145, 92%, 87%); + --success-text: hsl(140, 100%, 27%); + --info-bg: hsl(208, 100%, 97%); + --info-border: hsl(221, 91%, 93%); + --info-text: hsl(210, 92%, 45%); + --warning-bg: hsl(49, 100%, 97%); + --warning-border: hsl(49, 91%, 84%); + --warning-text: hsl(31, 92%, 45%); + --error-bg: hsl(359, 100%, 97%); + --error-border: hsl(359, 100%, 94%); + --error-text: hsl(360, 100%, 45%); +} +[data-sonner-toaster][data-sonner-theme="light"] + [data-sonner-toast][data-invert="true"] { + --normal-bg: #000; + --normal-border: hsl(0, 0%, 20%); + --normal-text: var(--gray1); +} +[data-sonner-toaster][data-sonner-theme="dark"] + [data-sonner-toast][data-invert="true"] { + --normal-bg: #fff; + --normal-border: var(--gray3); + --normal-text: var(--gray12); +} +[data-sonner-toaster][data-sonner-theme="dark"] { + --normal-bg: #000; + --normal-bg-hover: hsl(0, 0%, 12%); + --normal-border: hsl(0, 0%, 20%); + --normal-border-hover: hsl(0, 0%, 25%); + --normal-text: var(--gray1); + --success-bg: hsl(150, 100%, 6%); + --success-border: hsl(147, 100%, 12%); + --success-text: hsl(150, 86%, 65%); + --info-bg: hsl(215, 100%, 6%); + --info-border: hsl(223, 43%, 17%); + --info-text: hsl(216, 87%, 65%); + --warning-bg: hsl(64, 100%, 6%); + --warning-border: hsl(60, 100%, 9%); + --warning-text: hsl(46, 87%, 65%); + --error-bg: hsl(358, 76%, 10%); + --error-border: hsl(357, 89%, 16%); + --error-text: hsl(358, 100%, 81%); +} +[data-sonner-toaster][data-sonner-theme="dark"] + [data-sonner-toast] + [data-close-button] { + background: var(--normal-bg); + border-color: var(--normal-border); + color: var(--normal-text); +} +[data-sonner-toaster][data-sonner-theme="dark"] + [data-sonner-toast] + [data-close-button]:hover { + background: var(--normal-bg-hover); + border-color: var(--normal-border-hover); +} +[data-rich-colors="true"][data-sonner-toast][data-type="success"], +[data-rich-colors="true"][data-sonner-toast][data-type="success"] + [data-close-button] { + background: var(--success-bg); + border-color: var(--success-border); + color: var(--success-text); +} +[data-rich-colors="true"][data-sonner-toast][data-type="info"], +[data-rich-colors="true"][data-sonner-toast][data-type="info"] + [data-close-button] { + background: var(--info-bg); + border-color: var(--info-border); + color: var(--info-text); +} +[data-rich-colors="true"][data-sonner-toast][data-type="warning"], +[data-rich-colors="true"][data-sonner-toast][data-type="warning"] + [data-close-button] { + background: var(--warning-bg); + border-color: var(--warning-border); + color: var(--warning-text); +} +[data-rich-colors="true"][data-sonner-toast][data-type="error"], +[data-rich-colors="true"][data-sonner-toast][data-type="error"] + [data-close-button] { + background: var(--error-bg); + border-color: var(--error-border); + color: var(--error-text); +} +.sonner-loading-wrapper { + --size: 16px; + height: var(--size); + width: var(--size); + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 10; +} +.sonner-loading-wrapper[data-visible="false"] { + transform-origin: center; + animation: sonner-fade-out 0.2s ease forwards; +} +.sonner-spinner { + position: relative; + top: 50%; + left: 50%; + height: var(--size); + width: var(--size); +} +.sonner-loading-bar { + animation: sonner-spin 1.2s linear infinite; + background: var(--gray11); + border-radius: 6px; + height: 8%; + left: -10%; + position: absolute; + top: -3.9%; + width: 24%; +} +.sonner-loading-bar:nth-child(1) { + animation-delay: -1.2s; + transform: rotate(0.0001deg) translate(146%); +} +.sonner-loading-bar:nth-child(2) { + animation-delay: -1.1s; + transform: rotate(30deg) translate(146%); +} +.sonner-loading-bar:nth-child(3) { + animation-delay: -1s; + transform: rotate(60deg) translate(146%); +} +.sonner-loading-bar:nth-child(4) { + animation-delay: -0.9s; + transform: rotate(90deg) translate(146%); +} +.sonner-loading-bar:nth-child(5) { + animation-delay: -0.8s; + transform: rotate(120deg) translate(146%); +} +.sonner-loading-bar:nth-child(6) { + animation-delay: -0.7s; + transform: rotate(150deg) translate(146%); +} +.sonner-loading-bar:nth-child(7) { + animation-delay: -0.6s; + transform: rotate(180deg) translate(146%); +} +.sonner-loading-bar:nth-child(8) { + animation-delay: -0.5s; + transform: rotate(210deg) translate(146%); +} +.sonner-loading-bar:nth-child(9) { + animation-delay: -0.4s; + transform: rotate(240deg) translate(146%); +} +.sonner-loading-bar:nth-child(10) { + animation-delay: -0.3s; + transform: rotate(270deg) translate(146%); +} +.sonner-loading-bar:nth-child(11) { + animation-delay: -0.2s; + transform: rotate(300deg) translate(146%); +} +.sonner-loading-bar:nth-child(12) { + animation-delay: -0.1s; + transform: rotate(330deg) translate(146%); +} +@keyframes sonner-fade-in { + 0% { + opacity: 0; + transform: scale(0.8); + } + to { + opacity: 1; + transform: scale(1); + } +} +@keyframes sonner-fade-out { + 0% { + opacity: 1; + transform: scale(1); + } + to { + opacity: 0; + transform: scale(0.8); + } +} +@keyframes sonner-spin { + 0% { + opacity: 1; + } + to { + opacity: 0.15; + } +} +@media (prefers-reduced-motion) { + [data-sonner-toast], + [data-sonner-toast] > *, + .sonner-loading-bar { + transition: none !important; + animation: none !important; + } +} +.sonner-loader { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + transform-origin: center; + transition: opacity 0.2s, transform 0.2s; +} +.sonner-loader[data-visible="false"] { + opacity: 0; + transform: scale(0.8) translate(-50%, -50%); +} /*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */ +@layer properties { + @supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or + ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) { + *, + :before, + :after, + ::backdrop { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-translate-z: 0; + --tw-rotate-x: initial; + --tw-rotate-y: initial; + --tw-rotate-z: initial; + --tw-skew-x: initial; + --tw-skew-y: initial; + --tw-border-style: solid; + --tw-leading: initial; + --tw-font-weight: initial; + --tw-tracking: initial; + --tw-shadow: 0 0 #0000; + --tw-shadow-color: initial; + --tw-shadow-alpha: 100%; + --tw-inset-shadow: 0 0 #0000; + --tw-inset-shadow-color: initial; + --tw-inset-shadow-alpha: 100%; + --tw-ring-color: initial; + --tw-ring-shadow: 0 0 #0000; + --tw-inset-ring-color: initial; + --tw-inset-ring-shadow: 0 0 #0000; + --tw-ring-inset: initial; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-offset-shadow: 0 0 #0000; + --tw-backdrop-blur: initial; + --tw-backdrop-brightness: initial; + --tw-backdrop-contrast: initial; + --tw-backdrop-grayscale: initial; + --tw-backdrop-hue-rotate: initial; + --tw-backdrop-invert: initial; + --tw-backdrop-opacity: initial; + --tw-backdrop-saturate: initial; + --tw-backdrop-sepia: initial; + --tw-duration: initial; + --tw-content: ""; + --tw-blur: initial; + --tw-brightness: initial; + --tw-contrast: initial; + --tw-grayscale: initial; + --tw-hue-rotate: initial; + --tw-invert: initial; + --tw-opacity: initial; + --tw-saturate: initial; + --tw-sepia: initial; + --tw-drop-shadow: initial; + --tw-drop-shadow-color: initial; + --tw-drop-shadow-alpha: 100%; + --tw-drop-shadow-size: initial; + --tw-animation-delay: 0s; + --tw-animation-direction: normal; + --tw-animation-duration: initial; + --tw-animation-fill-mode: none; + --tw-animation-iteration-count: 1; + --tw-enter-blur: 0; + --tw-enter-opacity: 1; + --tw-enter-rotate: 0; + --tw-enter-scale: 1; + --tw-enter-translate-x: 0; + --tw-enter-translate-y: 0; + --tw-exit-blur: 0; + --tw-exit-opacity: 1; + --tw-exit-rotate: 0; + --tw-exit-scale: 1; + --tw-exit-translate-x: 0; + --tw-exit-translate-y: 0; + --tw-outline-style: solid; + } + } +} +@layer theme { + :root, + :host { + --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", + "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, + "Liberation Mono", "Courier New", monospace; + --color-red-400: oklch(70.4% 0.191 22.216); + --color-red-500: oklch(63.7% 0.237 25.331); + --color-red-600: oklch(57.7% 0.245 27.325); + --color-orange-500: oklch(70.5% 0.213 47.604); + --color-amber-500: oklch(76.9% 0.188 70.08); + --color-amber-600: oklch(66.6% 0.179 58.318); + --color-yellow-400: oklch(85.2% 0.199 91.936); + --color-yellow-500: oklch(79.5% 0.184 86.047); + --color-lime-500: oklch(76.8% 0.233 130.85); + --color-green-100: oklch(96.2% 0.044 156.743); + --color-green-500: oklch(72.3% 0.219 149.579); + --color-green-600: oklch(62.7% 0.194 149.214); + --color-emerald-500: oklch(69.6% 0.17 162.48); + --color-teal-500: oklch(70.4% 0.14 182.503); + --color-cyan-500: oklch(71.5% 0.143 215.221); + --color-sky-500: oklch(68.5% 0.169 237.323); + --color-blue-500: oklch(62.3% 0.214 259.815); + --color-blue-600: oklch(54.6% 0.245 262.881); + --color-blue-800: oklch(42.4% 0.199 265.638); + --color-indigo-500: oklch(58.5% 0.233 277.117); + --color-violet-500: oklch(60.6% 0.25 292.717); + --color-purple-500: oklch(62.7% 0.265 303.9); + --color-fuchsia-500: oklch(66.7% 0.295 322.15); + --color-pink-500: oklch(65.6% 0.241 354.308); + --color-rose-500: oklch(64.5% 0.246 16.439); + --color-black: #000; + --color-white: #fff; + --spacing: 0.25rem; + --container-xs: 20rem; + --container-sm: 24rem; + --container-md: 28rem; + --container-lg: 32rem; + --container-xl: 36rem; + --container-2xl: 42rem; + --container-3xl: 48rem; + --container-4xl: 56rem; + --container-5xl: 64rem; + --container-7xl: 80rem; + --text-xs: 0.75rem; + --text-xs--line-height: calc(1 / 0.75); + --text-sm: 0.875rem; + --text-sm--line-height: calc(1.25 / 0.875); + --text-base: 1rem; + --text-base--line-height: 1.5; + --text-lg: 1.125rem; + --text-lg--line-height: calc(1.75 / 1.125); + --text-xl: 1.25rem; + --text-xl--line-height: calc(1.75 / 1.25); + --text-2xl: 1.5rem; + --text-2xl--line-height: calc(2 / 1.5); + --text-3xl: 1.875rem; + --text-3xl--line-height: 1.2; + --text-4xl: 2.25rem; + --text-4xl--line-height: calc(2.5 / 2.25); + --text-5xl: 3rem; + --text-5xl--line-height: 1; + --text-7xl: 4.5rem; + --text-7xl--line-height: 1; + --font-weight-normal: 400; + --font-weight-medium: 500; + --font-weight-semibold: 600; + --font-weight-bold: 700; + --font-weight-extrabold: 800; + --tracking-widest: 0.1em; + --radius-xs: 0.125rem; + --radius-sm: 0.25rem; + --radius-md: 0.375rem; + --radius-lg: 0.5rem; + --radius-xl: 0.75rem; + --radius-2xl: 1rem; + --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; + --animate-bounce: bounce 1s infinite; + --blur-sm: 8px; + --aspect-video: 16/9; + --default-transition-duration: 0.15s; + --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + --default-font-family: var(--font-sans); + --default-mono-font-family: var(--font-mono); + } +} +@layer base { + *, + :after, + :before, + ::backdrop { + box-sizing: border-box; + border: 0 solid; + margin: 0; + padding: 0; + } + ::file-selector-button { + box-sizing: border-box; + border: 0 solid; + margin: 0; + padding: 0; + } + html, + :host { + -webkit-text-size-adjust: 100%; + -moz-tab-size: 4; + tab-size: 4; + line-height: 1.5; + font-family: var( + --default-font-family, + ui-sans-serif, + system-ui, + sans-serif, + "Apple Color Emoji", + "Segoe UI Emoji", + "Segoe UI Symbol", + "Noto Color Emoji" + ); + font-feature-settings: var(--default-font-feature-settings, normal); + font-variation-settings: var(--default-font-variation-settings, normal); + -webkit-tap-highlight-color: transparent; + } + hr { + height: 0; + color: inherit; + border-top-width: 1px; + } + abbr:where([title]) { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + h1, + h2, + h3, + h4, + h5, + h6 { + font-size: inherit; + font-weight: inherit; + } + a { + color: inherit; + -webkit-text-decoration: inherit; + text-decoration: inherit; + } + b, + strong { + font-weight: bolder; + } + code, + kbd, + samp, + pre { + font-family: var( + --default-mono-font-family, + ui-monospace, + SFMono-Regular, + Menlo, + Monaco, + Consolas, + "Liberation Mono", + "Courier New", + monospace + ); + font-feature-settings: var(--default-mono-font-feature-settings, normal); + font-variation-settings: var( + --default-mono-font-variation-settings, + normal + ); + font-size: 1em; + } + small { + font-size: 80%; + } + sub, + sup { + vertical-align: baseline; + font-size: 75%; + line-height: 0; + position: relative; + } + sub { + bottom: -0.25em; + } + sup { + top: -0.5em; + } + table { + text-indent: 0; + border-color: inherit; + border-collapse: collapse; + } + :-moz-focusring { + outline: auto; + } + progress { + vertical-align: baseline; + } + summary { + display: list-item; + } + ol, + ul, + menu { + list-style: none; + } + img, + svg, + video, + canvas, + audio, + iframe, + embed, + object { + vertical-align: middle; + display: block; + } + img, + video { + max-width: 100%; + height: auto; + } + button, + input, + select, + optgroup, + textarea { + font: inherit; + font-feature-settings: inherit; + font-variation-settings: inherit; + letter-spacing: inherit; + color: inherit; + opacity: 1; + background-color: #0000; + border-radius: 0; + } + ::file-selector-button { + font: inherit; + font-feature-settings: inherit; + font-variation-settings: inherit; + letter-spacing: inherit; + color: inherit; + opacity: 1; + background-color: #0000; + border-radius: 0; + } + :where(select:is([multiple], [size])) optgroup { + font-weight: bolder; + } + :where(select:is([multiple], [size])) optgroup option { + padding-inline-start: 20px; + } + ::file-selector-button { + margin-inline-end: 4px; + } + ::placeholder { + opacity: 1; + } + @supports (not ((-webkit-appearance: -apple-pay-button))) or + (contain-intrinsic-size: 1px) { + ::placeholder { + color: currentColor; + } + @supports (color: color-mix(in lab, red, red)) { + ::placeholder { + color: color-mix(in oklab, currentcolor 50%, transparent); + } + } + } + textarea { + resize: vertical; + } + ::-webkit-search-decoration { + -webkit-appearance: none; + } + ::-webkit-date-and-time-value { + min-height: 1lh; + text-align: inherit; + } + ::-webkit-datetime-edit { + display: inline-flex; + } + ::-webkit-datetime-edit-fields-wrapper { + padding: 0; + } + ::-webkit-datetime-edit { + padding-block: 0; + } + ::-webkit-datetime-edit-year-field { + padding-block: 0; + } + ::-webkit-datetime-edit-month-field { + padding-block: 0; + } + ::-webkit-datetime-edit-day-field { + padding-block: 0; + } + ::-webkit-datetime-edit-hour-field { + padding-block: 0; + } + ::-webkit-datetime-edit-minute-field { + padding-block: 0; + } + ::-webkit-datetime-edit-second-field { + padding-block: 0; + } + ::-webkit-datetime-edit-millisecond-field { + padding-block: 0; + } + ::-webkit-datetime-edit-meridiem-field { + padding-block: 0; + } + ::-webkit-calendar-picker-indicator { + line-height: 1; + } + :-moz-ui-invalid { + box-shadow: none; + } + button, + input:where([type="button"], [type="reset"], [type="submit"]) { + -webkit-appearance: button; + -moz-appearance: button; + appearance: button; + } + ::file-selector-button { + -webkit-appearance: button; + -moz-appearance: button; + appearance: button; + } + ::-webkit-inner-spin-button { + height: auto; + } + ::-webkit-outer-spin-button { + height: auto; + } + [hidden]:where(:not([hidden="until-found"])) { + display: none !important; + } + :root { + color-scheme: light only; + --version: 1.13; + } + html, + body { + height: 100%; + } + * { + overscroll-behavior: contain; + touch-action: manipulation; + } + .maplibregl-ctrl-bottom-right { + z-index: 1; + height: max-content; + top: 0; + left: 0; + right: unset !important; + } + .maplibregl-ctrl-attrib.maplibregl-compact { + margin: 10px 80px 10px 12px !important; + } + #map canvas { + cursor: default; + } + body { + background-color: var(--color-base-100); + font-family: "Geist", var(--font-sans); + } + input:focus, + textarea:focus, + label:has(:focus) { + outline-style: var(--tw-outline-style) !important; + outline-width: 0 !important; + } + button, + a { + cursor: pointer; + } + @supports selector(:-moz-focusring) { + :root { + --fx-noise: none !important; + } + } + @font-face { + font-family: Geist; + font-style: normal; + font-weight: 100 900; + font-display: swap; + src: url(./Geist-cyrillic.CHSlOQsW.woff2) format("woff2"); + unicode-range: U+301, U+400-45F, U+490-491, U+4B0-4B1, U+2116; + } + @font-face { + font-family: Geist; + font-style: normal; + font-weight: 100 900; + font-display: swap; + src: url(./Geist-latin-ext.DMtmJ5ZE.woff2) format("woff2"); + unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+304, + U+308, U+329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, + U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; + } + @font-face { + font-family: Geist; + font-style: normal; + font-weight: 100 900; + font-display: swap; + src: url(./Geist-latin.Dg_dQHbK.woff2) format("woff2"); + unicode-range: U+??, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, + U+308, U+329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, + U+FEFF, U+FFFD; + } + @font-face { + font-family: Geist Mono; + font-style: normal; + font-weight: 100 900; + font-display: swap; + src: url(./GeistMono-cyrillic.BZdD_g9V.woff2) format("woff2"); + unicode-range: U+301, U+400-45F, U+490-491, U+4B0-4B1, U+2116; + } + @font-face { + font-family: Geist Mono; + font-style: normal; + font-weight: 100 900; + font-display: swap; + src: url(./GeistMono-latin-ext.b6lpi8_2.woff2) format("woff2"); + unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+304, + U+308, U+329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, + U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; + } + @font-face { + font-family: Geist Mono; + font-style: normal; + font-weight: 100 900; + font-display: swap; + src: url(./GeistMono-latin.Cjtb1TV-.woff2) format("woff2"); + unicode-range: U+??, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, + U+308, U+329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, + U+FEFF, U+FFFD; + } + @font-face { + font-family: Pixelify Sans; + font-style: normal; + font-weight: 400 700; + font-display: swap; + src: url(./PixelifySans-cyrillic.CPPz0Qvd.woff2) format("woff2"); + unicode-range: U+301, U+400-45F, U+490-491, U+4B0-4B1, U+2116; + } + @font-face { + font-family: Pixelify Sans; + font-style: normal; + font-weight: 400 700; + font-display: swap; + src: url(./PixelifySans-cyrillic.CPPz0Qvd.woff2) format("woff2"); + unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+304, + U+308, U+329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, + U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; + } + @font-face { + font-family: Pixelify Sans; + font-style: normal; + font-weight: 400 700; + font-display: swap; + src: url(./PixelifySans-latin.vdc2vUDH.woff2) format("woff2"); + unicode-range: U+??, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, + U+308, U+329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, + U+FEFF, U+FFFD; + } + @font-face { + font-family: Noto Color Emoji; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(./NotoColorEmoji-flags.ClvgErYz.woff2) format("woff2"); + unicode-range: U+1F1E6-1F1FF; + } + .iti { + --iti-path-flags-1x: url(./flags.a2kmUSbF.webp); + --iti-path-flags-2x: url(./flags@2x.gR6KPp3x.webp); + --iti-path-globe-1x: url(data:image/webp;base64,UklGRvoBAABXRUJQVlA4TO4BAAAvE8AEENXIkiRZtZu7H33ql07cqTlilvbz9i4tosSMZma27zWzHRGyIEk2bcu2bdvGn23btm3btm3btm0/m5PqAEkLTYYwxTPAW84Tl6wNgmvIqptKKH9nYAr4xle+TML/BDI2LSg6QHKT/nngE4+ZMIUePUGeTvly+YoV8F1DtkGUzlfst2LUKTX6PaWZeMWiDqN6PgcciGa2boYPmxlR5bIIL5l6RVyDYMXmY1f10pGb7PmAN6sRTBTN3N9C9Zi/LbVhlL+Oo2M7RxoE/a4+/nDjeBrSVwtGYXGGMIrUbJzCU1LgFftP9K1hkpOXmBim30cIJ1hgOkSwMhYCMgmaw7rXcfT5/wQcFhrcuaOEBuq5ytYblLPBEhV0Aq/ZqcDn/6RUDgrUL0/0UZgK/p+rR8/4nZAqFfuXA6TbtFQyJSe4gpj6T19a5q+HLEkox0mlWXvbIGbuJw28fkozjybhT5oXHNY4py5rH1CflcyeB1fId9wXDAvFmz/8m6AE/8TgYzEVGoRMCKUhND7PQho7jGo1utkdV559cm3llGFs3sxBZrmGbEExop91jyfg5G7BmCCi6evNaSDFBrG3vyaRNzt+HJ9kQpVbgj+xFUoNgr3abxqGfH3WfQq9lp5UZPRW74ZbFgpq+EGo67dUAQ==); + --iti-path-globe-2x: url(data:image/webp;base64,UklGRlwFAABXRUJQVlA4TE8FAAAvJ8AJEEfHKJIkKdmcgvjj3wwill7QwKhtJEnOnIDmv/zJLAdGbSNJcuYENP/lT2Y5OGwjSZHmtL3wTFl9tp8SM/9xz47Ctm2b7mnwDggKFNd77jgHyxhIYVvLQBDEHEBKRQBIOXzQpAhiBQCIAMaIAACHhAQHIMFhhRkSRt1hlRIYDAZDhiE3CVrBS2gFkZGRYdA6mjQQBYAv6yOZSVAQCoPWMCWBIBQKwtCCUBANFARBlChBfPCG/dZUjxJECYJQECU+KGFQEC1YdN/NSUNRTDm4osQBGUwFjDFCBOYRo9QWxAmPlKQECRERMbVLCZapZ0owSrnz3hb6/P8auL9vAwr7/xeS5EV9q2sWU2vbtjla27Zt28akprq6a3bPtm2np87eJIvePUzd9fvoXkT0fwK4Vwdo8t6qyQW+O7Tn4k7NAdvi/jMR0fGpwhglhZBKm3B0pzvg3JcDrUuMEn7SDaUIRTLhhqb/AbDvw+bbJToMEq5QflFfv+QhJVPxcmkm/Ih9TzZfFxk/CJUnP7zMykJqnhsqQ51M6tTv2Pdgc/GKCuKmaI96HlhVAJy4vWVWWgRSfYJ9l4jv+4aB0F15Td3kH1YW4DiMnEJHGSaFOoOdw4LxOhCqPTf0JvLys6I8Wv/9BeeuhEkZfE+UZfNSOumqT+CArgHwbBHZw+ZB00AGeiYxIKKudH2zDxg97VK7FxdO6+9Pmt3l4J/bZR58rtyEOY6dtdhcMbPh2jsyNKr3mNnDy+c8Pig0od5wGXakg7DYgYgfU5648s0fC0Ljv9SigQVrHwUafXVgmNE92zBBBeYjsHn5L6Emz/6776EnxwJUsqKADMDmq8fG/T16fujr7lhknhheLG4PPwFD15IXs2xWFWBZVj4ndDW+fDItPRncssi75Fxv/iHQQL2PDbkg4k/zP/BfgfR1axxy59PM/IYdsypZWUCUiTlck2/zTz4fm3LzqkNlxxnzW+A4fK4vkbNrIbn7bgVoKn3djQu90krrllynQ1g7v2rpjUYsfeR6tdLSaqV5w5fR6E5+k8BVT/0aqqSXDAdV4wvpCplTCJnbFTLb9dTEHjoQQiTMC7Ah3PPuwbffOfD+xP4d3s7uMGDC+wcOvrs7kVKTZ6m4EMIVfn1O61JyrnuU3EM3A3znefrp142f5cnmnDXNyXecPFYUYNt2pVUlvot//qWFDszz9aTrCuGpQVX4Wn+KAw6rCrAgw/eqLZXQVQfmXZ5QnnCF2wrwdlJ5F8DhC1MP/itRnhv+wmHji7hpT+x0tekziRw7jxUF2LZznX3xOydH3e5fVhYWO5QOlClPzYFX9EMD65P9bBHZ16fLq7dHfrlal5vO2LxuKkTcfABvjZDxwsWvf9hs7pCv2ry5cowvB2/8iosq5YraWHw7JCxLyaAWZPoUrilMaRMKo8WwpQv0z2AXqnLzLA42H5gKEVcTuM76RfDtpVrzh9b5oTp0e5SI+Topy78hAzFm6QqRMN2gugNYLH0EoHF6Pyw3vm+OYQMRlwPpCd+sAep/WQ1OPGZZ13lO0ugpE0+m1xGRbdNKe67wzTN3Nouw3yfw03WH+nrnqUAnEul5YOXA5o20L4SnAiXjoX6f7Pm6RIeBl14EGe4a8VLad4UnvZTwysxR2DtOumEiUOpliLi7FWNb2vOEK4QQnnyoIav+Ko9XhGbUF1gZ7tWKcVBLX+T05HkOGmn0iA4WjsW9Ww6ny3WiTAjhyd41WWfGrv4sAof7t/l+ppGJlFeR7oBVr4kF2BYP0oYjDxsZpjuTsQDHsXjAUYxrrwwe9gGWRRRZ3CcA); + } + :root, + [data-theme] { + background-color: var(--root-bg, var(--color-base-100)); + color: var(--color-base-content); + } + :root { + --fx-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.34' numOctaves='4' stitchTiles='stitch'%3E%3C/feTurbulence%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)' opacity='0.2'%3E%3C/rect%3E%3C/svg%3E"); + } + @property --radialprogress { + syntax: ""; + inherits: true; + initial-value: 0%; + } + :root { + scrollbar-color: currentColor #0000; + } + @supports (color: color-mix(in lab, red, red)) { + :root { + scrollbar-color: color-mix(in oklch, currentColor 35%, #0000) #0000; + } + } + :root:has( + .modal-open, + .modal[open], + .modal:target, + .modal-toggle:checked, + .drawer:not([class*="drawer-open"]) > .drawer-toggle:checked + ) { + overflow: hidden; + } + :where(:root), + :root:has(input.theme-controller[value="custom-winter"]:checked), + [data-theme="custom-winter"] { + color-scheme: light; + --color-base-100: oklch(100% 0 0); + --color-base-200: oklch(97.466% 0.011 259.822); + --color-base-300: oklch(93.268% 0.016 262.751); + --color-base-content: oklch(41.886% 0.053 255.824); + --color-primary: oklch(56.86% 0.255 257.57); + --color-primary-content: oklch(100% 0.051 257.57); + --color-secondary: oklch(42.551% 0.161 282.339); + --color-secondary-content: oklch(88.51% 0.032 282.339); + --color-accent: oklch(59.939% 0.191 335.171); + --color-accent-content: oklch(11.988% 0.038 335.171); + --color-neutral: oklch(19.616% 0.063 257.651); + --color-neutral-content: oklch(83.923% 0.012 257.651); + --color-info: oklch(88.127% 0.085 214.515); + --color-info-content: oklch(17.625% 0.017 214.515); + --color-success: oklch(80.494% 0.077 197.823); + --color-success-content: oklch(16.098% 0.015 197.823); + --color-warning: oklch(89.172% 0.045 71.47); + --color-warning-content: oklch(17.834% 0.009 71.47); + --color-error: oklch(73.092% 0.11 20.076); + --color-error-content: oklch(14.618% 0.022 20.076); + --radius-selector: 2rem; + --radius-field: 2rem; + --radius-box: 2rem; + --size-selector: 0.25rem; + --size-field: 0.25rem; + --border: 2px; + --depth: 1; + --noise: 1; + } + :root:has(input.theme-controller[value="dark"]:checked), + [data-theme="dark"] { + color-scheme: dark; + --color-base-100: oklch(30.857% 0.023 264.149); + --color-base-200: oklch(28.036% 0.019 264.182); + --color-base-300: oklch(26.346% 0.018 262.177); + --color-base-content: oklch(97.807% 0.029 256.847); + --color-primary: oklch(58% 0.233 277.117); + --color-primary-content: oklch(96% 0.018 272.314); + --color-secondary: oklch(65% 0.241 354.308); + --color-secondary-content: oklch(94% 0.028 342.258); + --color-accent: oklch(77% 0.152 181.912); + --color-accent-content: oklch(38% 0.063 188.416); + --color-neutral: oklch(14% 0.005 285.823); + --color-neutral-content: oklch(92% 0.004 286.32); + --color-info: oklch(74% 0.16 232.661); + --color-info-content: oklch(29% 0.066 243.157); + --color-success: oklch(76% 0.177 163.223); + --color-success-content: oklch(37% 0.077 168.94); + --color-warning: oklch(82% 0.189 84.429); + --color-warning-content: oklch(41% 0.112 45.904); + --color-error: oklch(71% 0.194 13.428); + --color-error-content: oklch(27% 0.105 12.094); + --radius-selector: 2rem; + --radius-field: 2rem; + --radius-box: 2rem; + --size-selector: 0.25rem; + --size-field: 0.25rem; + --border: 2px; + --depth: 1; + --noise: 1; + } +} +@layer components; +@layer utilities { + .diff { + webkit-user-select: none; + -webkit-user-select: none; + user-select: none; + direction: ltr; + grid-template-columns: auto 1fr; + width: 100%; + display: grid; + position: relative; + overflow: hidden; + container-type: inline-size; + } + .diff:focus-visible, + .diff:has(.diff-item-1:focus-visible) { + outline-style: var(--tw-outline-style); + outline-offset: 1px; + outline-width: 2px; + outline-color: var(--color-base-content); + } + .diff:focus-visible .diff-resizer { + min-width: 90cqi; + max-width: 90cqi; + } + .diff:has(.diff-item-2:focus-visible) { + outline-style: var(--tw-outline-style); + outline-offset: 1px; + outline-width: 2px; + } + .diff:has(.diff-item-2:focus-visible) .diff-resizer { + min-width: 10cqi; + max-width: 10cqi; + } + @supports (-webkit-overflow-scrolling: touch) and (overflow: -webkit-paged-x) { + .diff:focus .diff-resizer { + min-width: 10cqi; + max-width: 10cqi; + } + .diff:has(.diff-item-1:focus) .diff-resizer { + min-width: 90cqi; + max-width: 90cqi; + } + } + .modal { + pointer-events: none; + visibility: hidden; + width: 100%; + max-width: none; + height: 100%; + max-height: none; + color: inherit; + transition: translate 0.3s ease-out, visibility 0.3s allow-discrete, + background-color 0.3s ease-out, opacity 0.1s ease-out; + overscroll-behavior: contain; + z-index: 999; + background-color: #0000; + place-items: center; + margin: 0; + padding: 0; + display: grid; + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + overflow: hidden; + } + .modal::backdrop { + display: none; + } + .modal.modal-open, + .modal[open], + .modal:target { + pointer-events: auto; + visibility: visible; + opacity: 1; + background-color: #0006; + } + :is(.modal.modal-open, .modal[open], .modal:target) .modal-box { + opacity: 1; + translate: 0; + scale: 1; + } + @starting-style { + .modal.modal-open, + .modal[open], + .modal:target { + visibility: hidden; + opacity: 0; + } + } + .tooltip { + --tt-bg: var(--color-neutral); + --tt-off: calc(100% + 0.5rem); + --tt-tail: calc(100% + 1px + 0.25rem); + display: inline-block; + position: relative; + } + .tooltip > :where(.tooltip-content), + .tooltip:where([data-tip]):before { + border-radius: var(--radius-field); + text-align: center; + white-space: normal; + max-width: 20rem; + color: var(--color-neutral-content); + opacity: 0; + background-color: var(--tt-bg); + pointer-events: none; + z-index: 2; + --tw-content: attr(data-tip); + content: var(--tw-content); + width: max-content; + padding-block: 0.25rem; + padding-inline: 0.5rem; + font-size: 0.875rem; + line-height: 1.25; + transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1) 75ms, + transform 0.2s cubic-bezier(0.4, 0, 0.2, 1) 75ms; + position: absolute; + } + .tooltip:after { + opacity: 0; + background-color: var(--tt-bg); + content: ""; + pointer-events: none; + --mask-tooltip: url("data:image/svg+xml,%3Csvg width='10' height='4' viewBox='0 0 8 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.500009 1C3.5 1 3.00001 4 5.00001 4C7 4 6.5 1 9.5 1C10 1 10 0.499897 10 0H0C-1.99338e-08 0.5 0 1 0.500009 1Z' fill='black'/%3E%3C/svg%3E%0A"); + width: 0.625rem; + height: 0.25rem; + -webkit-mask-position: -1px 0; + mask-position: -1px 0; + -webkit-mask-repeat: no-repeat; + mask-repeat: no-repeat; + -webkit-mask-image: var(--mask-tooltip); + mask-image: var(--mask-tooltip); + transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1) 75ms, + transform 0.2s cubic-bezier(0.4, 0, 0.2, 1) 75ms; + display: block; + position: absolute; + } + :is( + .tooltip.tooltip-open, + .tooltip[data-tip]:not([data-tip=""]):hover, + .tooltip:not(:has(.tooltip-content:empty)):has(.tooltip-content):hover, + .tooltip:has(:focus-visible) + ) + > .tooltip-content, + :is( + .tooltip.tooltip-open, + .tooltip[data-tip]:not([data-tip=""]):hover, + .tooltip:not(:has(.tooltip-content:empty)):has(.tooltip-content):hover, + .tooltip:has(:focus-visible) + )[data-tip]:before, + :is( + .tooltip.tooltip-open, + .tooltip[data-tip]:not([data-tip=""]):hover, + .tooltip:not(:has(.tooltip-content:empty)):has(.tooltip-content):hover, + .tooltip:has(:focus-visible) + ):after { + opacity: 1; + --tt-pos: 0rem; + transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), + transform 0.2s cubic-bezier(0.4, 0, 0.2, 1); + } + .tooltip > .tooltip-content, + .tooltip[data-tip]:before { + transform: translate(-50%) translateY(var(--tt-pos, 0.25rem)); + inset: auto auto var(--tt-off) 50%; + } + .tooltip:after { + transform: translate(-50%) translateY(var(--tt-pos, 0.25rem)); + inset: auto auto var(--tt-tail) 50%; + } + .tab { + cursor: pointer; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + text-align: center; + webkit-user-select: none; + -webkit-user-select: none; + user-select: none; + flex-wrap: wrap; + justify-content: center; + align-items: center; + display: inline-flex; + position: relative; + } + @media (hover: hover) { + .tab:hover { + color: var(--color-base-content); + } + } + .tab { + --tab-p: 1rem; + --tab-bg: var(--color-base-100); + --tab-border-color: var(--color-base-300); + --tab-radius-ss: 0; + --tab-radius-se: 0; + --tab-radius-es: 0; + --tab-radius-ee: 0; + --tab-order: 0; + --tab-radius-min: calc(0.75rem - var(--border)); + order: var(--tab-order); + height: var(--tab-height); + border-color: #0000; + padding-inline-start: var(--tab-p); + padding-inline-end: var(--tab-p); + font-size: 0.875rem; + } + .tab:is(input[type="radio"]) { + min-width: fit-content; + } + .tab:is(input[type="radio"]):after { + content: attr(aria-label); + } + .tab:is(label) { + position: relative; + } + .tab:is(label) input { + cursor: pointer; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + opacity: 0; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + } + :is( + .tab:checked, + .tab:is(label:has(:checked)), + .tab:is(.tab-active, [aria-selected="true"]) + ) + + .tab-content { + height: calc(100% - var(--tab-height) + var(--border)); + display: block; + } + .tab:not( + :checked, + label:has(:checked), + :hover, + .tab-active, + [aria-selected="true"] + ) { + color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .tab:not( + :checked, + label:has(:checked), + :hover, + .tab-active, + [aria-selected="true"] + ) { + color: color-mix(in oklab, var(--color-base-content) 50%, transparent); + } + } + .tab:not(input):empty { + cursor: default; + flex-grow: 1; + } + .tab:focus { + --tw-outline-style: none; + outline-style: none; + } + @media (forced-colors: active) { + .tab:focus { + outline-offset: 2px; + outline: 2px solid #0000; + } + } + .tab:focus-visible, + .tab:is(label:has(:checked:focus-visible)) { + outline-offset: -5px; + outline: 2px solid; + } + .tab[disabled] { + pointer-events: none; + opacity: 0.4; + } + .menu { + --menu-active-fg: var(--color-neutral-content); + --menu-active-bg: var(--color-neutral); + flex-flow: column wrap; + width: fit-content; + padding: 0.5rem; + font-size: 0.875rem; + display: flex; + } + .menu :where(li ul) { + white-space: nowrap; + margin-inline-start: 1rem; + padding-inline-start: 0.5rem; + position: relative; + } + .menu :where(li ul):before { + background-color: var(--color-base-content); + opacity: 0.1; + width: var(--border); + content: ""; + inset-inline-start: 0; + position: absolute; + top: 0.75rem; + bottom: 0.75rem; + } + .menu :where(li > .menu-dropdown:not(.menu-dropdown-show)) { + display: none; + } + .menu :where(li:not(.menu-title) > :not(ul, details, .menu-title, .btn)), + .menu :where(li:not(.menu-title) > details > summary:not(.menu-title)) { + border-radius: var(--radius-field); + text-align: start; + text-wrap: balance; + -webkit-user-select: none; + user-select: none; + grid-auto-columns: minmax(auto, max-content) auto max-content; + grid-auto-flow: column; + align-content: flex-start; + align-items: center; + gap: 0.5rem; + padding-block: 0.375rem; + padding-inline: 0.75rem; + transition-property: color, background-color, box-shadow; + transition-duration: 0.2s; + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); + display: grid; + } + .menu :where(li > details > summary) { + --tw-outline-style: none; + outline-style: none; + } + @media (forced-colors: active) { + .menu :where(li > details > summary) { + outline-offset: 2px; + outline: 2px solid #0000; + } + } + .menu :where(li > details > summary)::-webkit-details-marker { + display: none; + } + :is( + .menu :where(li > details > summary), + .menu :where(li > .menu-dropdown-toggle) + ):after { + content: ""; + transform-origin: 50%; + pointer-events: none; + justify-self: flex-end; + width: 0.375rem; + height: 0.375rem; + transition-property: rotate, translate; + transition-duration: 0.2s; + display: block; + translate: 0 -1px; + rotate: -135deg; + box-shadow: inset 2px 2px; + } + .menu :where(li > details[open] > summary):after, + .menu :where(li > .menu-dropdown-toggle.menu-dropdown-show):after { + translate: 0 1px; + rotate: 45deg; + } + .menu + :where( + li:not(.menu-title, .disabled) > :not(ul, details, .menu-title), + li:not(.menu-title, .disabled) > details > summary:not(.menu-title) + ):not(.menu-active, :active, .btn).menu-focus, + .menu + :where( + li:not(.menu-title, .disabled) > :not(ul, details, .menu-title), + li:not(.menu-title, .disabled) > details > summary:not(.menu-title) + ):not(.menu-active, :active, .btn):focus-visible { + cursor: pointer; + background-color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .menu + :where( + li:not(.menu-title, .disabled) > :not(ul, details, .menu-title), + li:not(.menu-title, .disabled) > details > summary:not(.menu-title) + ):not(.menu-active, :active, .btn).menu-focus, + .menu + :where( + li:not(.menu-title, .disabled) > :not(ul, details, .menu-title), + li:not(.menu-title, .disabled) > details > summary:not(.menu-title) + ):not(.menu-active, :active, .btn):focus-visible { + background-color: color-mix( + in oklab, + var(--color-base-content) 10%, + transparent + ); + } + } + .menu + :where( + li:not(.menu-title, .disabled) > :not(ul, details, .menu-title), + li:not(.menu-title, .disabled) > details > summary:not(.menu-title) + ):not(.menu-active, :active, .btn).menu-focus, + .menu + :where( + li:not(.menu-title, .disabled) > :not(ul, details, .menu-title), + li:not(.menu-title, .disabled) > details > summary:not(.menu-title) + ):not(.menu-active, :active, .btn):focus-visible { + color: var(--color-base-content); + --tw-outline-style: none; + outline-style: none; + } + @media (forced-colors: active) { + .menu + :where( + li:not(.menu-title, .disabled) > :not(ul, details, .menu-title), + li:not(.menu-title, .disabled) > details > summary:not(.menu-title) + ):not(.menu-active, :active, .btn).menu-focus, + .menu + :where( + li:not(.menu-title, .disabled) > :not(ul, details, .menu-title), + li:not(.menu-title, .disabled) > details > summary:not(.menu-title) + ):not(.menu-active, :active, .btn):focus-visible { + outline-offset: 2px; + outline: 2px solid #0000; + } + } + .menu + :where( + li:not(.menu-title, .disabled) + > :not(ul, details, .menu-title):not(.menu-active, :active, .btn):hover, + li:not(.menu-title, .disabled) + > details + > summary:not(.menu-title):not(.menu-active, :active, .btn):hover + ) { + cursor: pointer; + background-color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .menu + :where( + li:not(.menu-title, .disabled) + > :not(ul, details, .menu-title):not( + .menu-active, + :active, + .btn + ):hover, + li:not(.menu-title, .disabled) + > details + > summary:not(.menu-title):not(.menu-active, :active, .btn):hover + ) { + background-color: color-mix( + in oklab, + var(--color-base-content) 10%, + transparent + ); + } + } + .menu + :where( + li:not(.menu-title, .disabled) + > :not(ul, details, .menu-title):not(.menu-active, :active, .btn):hover, + li:not(.menu-title, .disabled) + > details + > summary:not(.menu-title):not(.menu-active, :active, .btn):hover + ) { + --tw-outline-style: none; + outline-style: none; + } + @media (forced-colors: active) { + .menu + :where( + li:not(.menu-title, .disabled) + > :not(ul, details, .menu-title):not( + .menu-active, + :active, + .btn + ):hover, + li:not(.menu-title, .disabled) + > details + > summary:not(.menu-title):not(.menu-active, :active, .btn):hover + ) { + outline-offset: 2px; + outline: 2px solid #0000; + } + } + .menu + :where( + li:not(.menu-title, .disabled) + > :not(ul, details, .menu-title):not(.menu-active, :active, .btn):hover, + li:not(.menu-title, .disabled) + > details + > summary:not(.menu-title):not(.menu-active, :active, .btn):hover + ) { + box-shadow: inset 0 1px #00000003, inset 0 -1px #ffffff03; + } + .menu :where(li:empty) { + background-color: var(--color-base-content); + opacity: 0.1; + height: 1px; + margin: 0.5rem 1rem; + } + .menu :where(li) { + flex-flow: column wrap; + flex-shrink: 0; + align-items: stretch; + display: flex; + position: relative; + } + .menu :where(li) .badge { + justify-self: flex-end; + } + .menu :where(li) > :not(ul, .menu-title, details, .btn):active, + .menu :where(li) > :not(ul, .menu-title, details, .btn).menu-active, + .menu :where(li) > details > summary:active { + --tw-outline-style: none; + outline-style: none; + } + @media (forced-colors: active) { + .menu :where(li) > :not(ul, .menu-title, details, .btn):active, + .menu :where(li) > :not(ul, .menu-title, details, .btn).menu-active, + .menu :where(li) > details > summary:active { + outline-offset: 2px; + outline: 2px solid #0000; + } + } + .menu :where(li) > :not(ul, .menu-title, details, .btn):active, + .menu :where(li) > :not(ul, .menu-title, details, .btn).menu-active, + .menu :where(li) > details > summary:active { + color: var(--menu-active-fg); + background-color: var(--menu-active-bg); + background-size: auto, calc(var(--noise) * 100%); + background-image: none, var(--fx-noise); + } + :is( + .menu :where(li) > :not(ul, .menu-title, details, .btn):active, + .menu :where(li) > :not(ul, .menu-title, details, .btn).menu-active, + .menu :where(li) > details > summary:active + ):not( + :is( + .menu :where(li) > :not(ul, .menu-title, details, .btn):active, + .menu :where(li) > :not(ul, .menu-title, details, .btn).menu-active, + .menu :where(li) > details > summary:active + ):active + ) { + box-shadow: 0 2px calc(var(--depth) * 3px) -2px var(--menu-active-bg); + } + .menu :where(li).menu-disabled { + pointer-events: none; + color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .menu :where(li).menu-disabled { + color: color-mix(in oklab, var(--color-base-content) 20%, transparent); + } + } + .menu .dropdown:focus-within .menu-dropdown-toggle:after { + translate: 0 1px; + rotate: 45deg; + } + .menu .dropdown-content { + margin-top: 0.5rem; + padding: 0.5rem; + } + .menu .dropdown-content:before { + display: none; + } + .dropdown { + position-area: var(--anchor-v, bottom) var(--anchor-h, span-right); + display: inline-block; + position: relative; + } + .dropdown > :not(summary):focus { + --tw-outline-style: none; + outline-style: none; + } + @media (forced-colors: active) { + .dropdown > :not(summary):focus { + outline-offset: 2px; + outline: 2px solid #0000; + } + } + .dropdown .dropdown-content { + position: absolute; + } + .dropdown:not(details, .dropdown-open, .dropdown-hover:hover, :focus-within) + .dropdown-content { + transform-origin: top; + opacity: 0; + display: none; + scale: 95%; + } + .dropdown[popover], + .dropdown .dropdown-content { + z-index: 999; + transition-behavior: allow-discrete; + transition-property: opacity, scale, display; + transition-duration: 0.2s; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + animation: 0.2s dropdown; + } + @starting-style { + .dropdown[popover], + .dropdown .dropdown-content { + opacity: 0; + scale: 95%; + } + } + :is( + .dropdown.dropdown-open, + .dropdown:not(.dropdown-hover):focus, + .dropdown:focus-within + ) + > [tabindex]:first-child { + pointer-events: none; + } + :is( + .dropdown.dropdown-open, + .dropdown:not(.dropdown-hover):focus, + .dropdown:focus-within + ) + .dropdown-content { + opacity: 1; + } + .dropdown.dropdown-hover:hover .dropdown-content { + opacity: 1; + scale: 100%; + } + .dropdown:is(details) summary::-webkit-details-marker { + display: none; + } + :is(.dropdown.dropdown-open, .dropdown:focus, .dropdown:focus-within) + .dropdown-content { + scale: 100%; + } + .dropdown:where([popover]) { + background: 0 0; + } + .dropdown[popover] { + color: inherit; + position: fixed; + } + @supports not (position-area: bottom) { + .dropdown[popover] { + margin: auto; + } + .dropdown[popover].dropdown-open:not(:popover-open) { + transform-origin: top; + opacity: 0; + display: none; + scale: 95%; + } + .dropdown[popover]::backdrop { + background-color: oklab(0% none none/.3); + } + } + .dropdown[popover]:not(.dropdown-open, :popover-open) { + transform-origin: top; + opacity: 0; + display: none; + scale: 95%; + } + :where(.btn) { + width: unset; + } + .btn { + cursor: pointer; + text-align: center; + vertical-align: middle; + outline-offset: 2px; + webkit-user-select: none; + -webkit-user-select: none; + user-select: none; + padding-inline: var(--btn-p); + color: var(--btn-fg); + --tw-prose-links: var(--btn-fg); + height: var(--size); + font-size: var(--fontsize, 0.875rem); + outline-color: var(--btn-color, var(--color-base-content)); + background-color: var(--btn-bg); + background-size: auto, calc(var(--noise) * 100%); + background-image: none, var(--btn-noise); + border-width: var(--border); + border-style: solid; + border-color: var(--btn-border); + text-shadow: 0 0.5px oklch(100% 0 0 / calc(var(--depth) * 0.15)); + touch-action: manipulation; + box-shadow: 0 0.5px 0 0.5px oklch(100% 0 0 / calc(var(--depth) * 6%)) inset, + var(--btn-shadow); + --size: calc(var(--size-field, 0.25rem) * 10); + --btn-bg: var(--btn-color, var(--color-base-200)); + --btn-fg: var(--color-base-content); + --btn-p: 1rem; + --btn-border: var(--btn-bg); + border-start-start-radius: var(--join-ss, var(--radius-field)); + border-start-end-radius: var(--join-se, var(--radius-field)); + border-end-end-radius: var(--join-ee, var(--radius-field)); + border-end-start-radius: var(--join-es, var(--radius-field)); + flex-wrap: nowrap; + flex-shrink: 0; + justify-content: center; + align-items: center; + gap: 0.375rem; + font-weight: 600; + transition-property: color, background-color, border-color, box-shadow; + transition-duration: 0.2s; + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); + display: inline-flex; + } + @supports (color: color-mix(in lab, red, red)) { + .btn { + --btn-border: color-mix( + in oklab, + var(--btn-bg), + #000 calc(var(--depth) * 5%) + ); + } + } + .btn { + --btn-shadow: 0 3px 2px -2px var(--btn-bg), 0 4px 3px -2px var(--btn-bg); + } + @supports (color: color-mix(in lab, red, red)) { + .btn { + --btn-shadow: 0 3px 2px -2px color-mix(in oklab, var(--btn-bg) + calc(var(--depth) * 30%), #0000), + 0 4px 3px -2px color-mix(in oklab, var(--btn-bg) + calc(var(--depth) * 30%), #0000); + } + } + .btn { + --btn-noise: var(--fx-noise); + } + .prose .btn { + text-decoration-line: none; + } + @media (hover: hover) { + .btn:hover { + --btn-bg: var(--btn-color, var(--color-base-200)); + } + @supports (color: color-mix(in lab, red, red)) { + .btn:hover { + --btn-bg: color-mix( + in oklab, + var(--btn-color, var(--color-base-200)), + #000 7% + ); + } + } + } + .btn:focus-visible { + isolation: isolate; + outline-width: 2px; + outline-style: solid; + } + .btn:active:not(.btn-active) { + --btn-bg: var(--btn-color, var(--color-base-200)); + translate: 0 0.5px; + } + @supports (color: color-mix(in lab, red, red)) { + .btn:active:not(.btn-active) { + --btn-bg: color-mix( + in oklab, + var(--btn-color, var(--color-base-200)), + #000 5% + ); + } + } + .btn:active:not(.btn-active) { + --btn-border: var(--btn-color, var(--color-base-200)); + } + @supports (color: color-mix(in lab, red, red)) { + .btn:active:not(.btn-active) { + --btn-border: color-mix( + in oklab, + var(--btn-color, var(--color-base-200)), + #000 7% + ); + } + } + .btn:active:not(.btn-active) { + --btn-shadow: 0 0 0 0 oklch(0% 0 0/0), 0 0 0 0 oklch(0% 0 0/0); + } + .btn:is(:disabled, [disabled], .btn-disabled):not(.btn-link, .btn-ghost) { + background-color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .btn:is(:disabled, [disabled], .btn-disabled):not(.btn-link, .btn-ghost) { + background-color: color-mix( + in oklab, + var(--color-base-content) 10%, + transparent + ); + } + } + .btn:is(:disabled, [disabled], .btn-disabled):not(.btn-link, .btn-ghost) { + box-shadow: none; + } + .btn:is(:disabled, [disabled], .btn-disabled) { + pointer-events: none; + --btn-border: #0000; + --btn-noise: none; + --btn-fg: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .btn:is(:disabled, [disabled], .btn-disabled) { + --btn-fg: color-mix(in oklch, var(--color-base-content) 20%, #0000); + } + } + @media (hover: hover) { + .btn:is(:disabled, [disabled], .btn-disabled):hover { + pointer-events: none; + background-color: var(--color-neutral); + } + @supports (color: color-mix(in lab, red, red)) { + .btn:is(:disabled, [disabled], .btn-disabled):hover { + background-color: color-mix( + in oklab, + var(--color-neutral) 20%, + transparent + ); + } + } + .btn:is(:disabled, [disabled], .btn-disabled):hover { + --btn-border: #0000; + --btn-fg: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .btn:is(:disabled, [disabled], .btn-disabled):hover { + --btn-fg: color-mix(in oklch, var(--color-base-content) 20%, #0000); + } + } + } + .btn:is(input[type="checkbox"], input[type="radio"]) { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + } + .btn:is(input[type="checkbox"], input[type="radio"]):after { + content: attr(aria-label); + } + .btn:where(input:checked:not(.filter .btn)) { + --btn-color: var(--color-primary); + --btn-fg: var(--color-primary-content); + isolation: isolate; + } + .\!loading { + pointer-events: none !important; + aspect-ratio: 1 !important; + vertical-align: middle !important; + width: calc(var(--size-selector, 0.25rem) * 6) !important; + background-color: currentColor !important; + display: inline-block !important; + -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E") !important; + mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E") !important; + -webkit-mask-position: 50% !important; + mask-position: 50% !important; + -webkit-mask-size: 100% !important; + mask-size: 100% !important; + -webkit-mask-repeat: no-repeat !important; + mask-repeat: no-repeat !important; + } + .loading { + pointer-events: none; + aspect-ratio: 1; + vertical-align: middle; + width: calc(var(--size-selector, 0.25rem) * 6); + background-color: currentColor; + display: inline-block; + -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E"); + mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E"); + -webkit-mask-position: 50%; + mask-position: 50%; + -webkit-mask-size: 100%; + mask-size: 100%; + -webkit-mask-repeat: no-repeat; + mask-repeat: no-repeat; + } + .pointer-events-none { + pointer-events: none; + } + .invisible { + visibility: hidden; + } + .visible { + visibility: visible; + } + .list { + flex-direction: column; + font-size: 0.875rem; + display: flex; + } + .list :where(.list-row) { + --list-grid-cols: minmax(0, auto) 1fr; + border-radius: var(--radius-box); + word-break: break-word; + grid-auto-flow: column; + grid-template-columns: var(--list-grid-cols); + gap: 1rem; + padding: 1rem; + display: grid; + position: relative; + } + .list :where(.list-row):has(.list-col-grow:first-child) { + --list-grid-cols: 1fr; + } + .list :where(.list-row):has(.list-col-grow:nth-child(2)) { + --list-grid-cols: minmax(0, auto) 1fr; + } + .list :where(.list-row):has(.list-col-grow:nth-child(3)) { + --list-grid-cols: minmax(0, auto) minmax(0, auto) 1fr; + } + .list :where(.list-row):has(.list-col-grow:nth-child(4)) { + --list-grid-cols: minmax(0, auto) minmax(0, auto) minmax(0, auto) 1fr; + } + .list :where(.list-row):has(.list-col-grow:nth-child(5)) { + --list-grid-cols: minmax(0, auto) minmax(0, auto) minmax(0, auto) + minmax(0, auto) 1fr; + } + .list :where(.list-row):has(.list-col-grow:nth-child(6)) { + --list-grid-cols: minmax(0, auto) minmax(0, auto) minmax(0, auto) + minmax(0, auto) minmax(0, auto) 1fr; + } + .list :where(.list-row) :not(.list-col-wrap) { + grid-row-start: 1; + } + :is( + .list > :not(:last-child).list-row, + .list > :not(:last-child) .list-row + ):after { + content: ""; + border-bottom: var(--border) solid; + inset-inline: var(--radius-box); + border-color: var(--color-base-content); + position: absolute; + bottom: 0; + } + @supports (color: color-mix(in lab, red, red)) { + :is( + .list > :not(:last-child).list-row, + .list > :not(:last-child) .list-row + ):after { + border-color: color-mix( + in oklab, + var(--color-base-content) 5%, + transparent + ); + } + } + .toast { + translate: var(--toast-x, 0) var(--toast-y, 0); + inset-inline: auto 1rem; + background-color: #0000; + flex-direction: column; + gap: 0.5rem; + width: max-content; + max-width: calc(100vw - 2rem); + display: flex; + position: fixed; + top: auto; + bottom: 1rem; + } + .toast > * { + animation: 0.25s ease-out toast; + } + .toast:where(.toast-start) { + --toast-x: 0; + inset-inline: 1rem auto; + } + .toast:where(.toast-center) { + --toast-x: -50%; + inset-inline: 50%; + } + .toast:where(.toast-end) { + --toast-x: 0; + inset-inline: auto 1rem; + } + .toast:where(.toast-bottom) { + --toast-y: 0; + top: auto; + bottom: 1rem; + } + .toast:where(.toast-middle) { + --toast-y: -50%; + top: 50%; + bottom: auto; + } + .toast:where(.toast-top) { + --toast-y: 0; + top: 1rem; + bottom: auto; + } + .input { + cursor: text; + border: var(--border) solid #0000; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-color: var(--color-base-100); + vertical-align: middle; + white-space: nowrap; + width: clamp(3rem, 20rem, 100%); + height: var(--size); + touch-action: manipulation; + border-color: var(--input-color); + box-shadow: 0 1px var(--input-color) inset, + 0 -1px oklch(100% 0 0 / calc(var(--depth) * 0.1)) inset; + border-start-start-radius: var(--join-ss, var(--radius-field)); + border-start-end-radius: var(--join-se, var(--radius-field)); + border-end-end-radius: var(--join-ee, var(--radius-field)); + border-end-start-radius: var(--join-es, var(--radius-field)); + flex-shrink: 1; + align-items: center; + gap: 0.5rem; + padding-inline: 0.75rem; + font-size: 0.875rem; + display: inline-flex; + position: relative; + } + @supports (color: color-mix(in lab, red, red)) { + .input { + box-shadow: 0 1px + color-mix( + in oklab, + var(--input-color) calc(var(--depth) * 10%), + #0000 + ) + inset, + 0 -1px oklch(100% 0 0 / calc(var(--depth) * 0.1)) inset; + } + } + .input { + --size: calc(var(--size-field, 0.25rem) * 10); + --input-color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .input { + --input-color: color-mix(in oklab, var(--color-base-content) 20%, #0000); + } + } + .input:where(input) { + display: inline-flex; + } + .input :where(input) { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-color: #0000; + border: none; + width: 100%; + height: 100%; + display: inline-flex; + } + .input :where(input):focus, + .input :where(input):focus-within { + --tw-outline-style: none; + outline-style: none; + } + @media (forced-colors: active) { + .input :where(input):focus, + .input :where(input):focus-within { + outline-offset: 2px; + outline: 2px solid #0000; + } + } + .input :where(input[type="url"]), + .input :where(input[type="email"]) { + direction: ltr; + } + .input :where(input[type="date"]) { + display: inline-block; + } + .input:focus, + .input:focus-within { + --input-color: var(--color-base-content); + box-shadow: 0 1px var(--input-color); + } + @supports (color: color-mix(in lab, red, red)) { + .input:focus, + .input:focus-within { + box-shadow: 0 1px + color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000); + } + } + .input:focus, + .input:focus-within { + outline: 2px solid var(--input-color); + outline-offset: 2px; + isolation: isolate; + z-index: 1; + } + .input:has(> input[disabled]), + .input:is(:disabled, [disabled]) { + cursor: not-allowed; + border-color: var(--color-base-200); + background-color: var(--color-base-200); + color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .input:has(> input[disabled]), + .input:is(:disabled, [disabled]) { + color: color-mix(in oklab, var(--color-base-content) 40%, transparent); + } + } + :is( + .input:has(> input[disabled]), + .input:is(:disabled, [disabled]) + )::placeholder { + color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + :is( + .input:has(> input[disabled]), + .input:is(:disabled, [disabled]) + )::placeholder { + color: color-mix(in oklab, var(--color-base-content) 20%, transparent); + } + } + .input:has(> input[disabled]), + .input:is(:disabled, [disabled]) { + box-shadow: none; + } + .input:has(> input[disabled]) > input[disabled] { + cursor: not-allowed; + } + .input::-webkit-date-and-time-value { + text-align: inherit; + } + .input[type="number"]::-webkit-inner-spin-button { + margin-block: -0.75rem; + margin-inline-end: -0.75rem; + } + .input::-webkit-calendar-picker-indicator { + position: absolute; + inset-inline-end: 0.75em; + } + .indicator { + width: max-content; + display: inline-flex; + position: relative; + } + .indicator :where(.indicator-item) { + z-index: 1; + white-space: nowrap; + top: var(--indicator-t, 0); + bottom: var(--indicator-b, auto); + left: var(--indicator-s, auto); + right: var(--indicator-e, 0); + translate: var(--indicator-x, 50%) var(--indicator-y, -50%); + position: absolute; + } + .table { + border-radius: var(--radius-box); + text-align: left; + width: 100%; + font-size: 0.875rem; + position: relative; + } + .table:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) { + text-align: right; + } + @media (hover: hover) { + :is(.table tr.row-hover, .table tr.row-hover:nth-child(2n)):hover { + background-color: var(--color-base-200); + } + } + .table :where(th, td) { + vertical-align: middle; + padding-block: 0.75rem; + padding-inline: 1rem; + } + .table :where(thead, tfoot) { + white-space: nowrap; + color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .table :where(thead, tfoot) { + color: color-mix(in oklab, var(--color-base-content) 60%, transparent); + } + } + .table :where(thead, tfoot) { + font-size: 0.875rem; + font-weight: 600; + } + .table :where(tfoot) { + border-top: var(--border) solid var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .table :where(tfoot) { + border-top: var(--border) solid + color-mix(in oklch, var(--color-base-content) 5%, #0000); + } + } + .table :where(.table-pin-rows thead tr) { + z-index: 1; + background-color: var(--color-base-100); + position: sticky; + top: 0; + } + .table :where(.table-pin-rows tfoot tr) { + z-index: 1; + background-color: var(--color-base-100); + position: sticky; + bottom: 0; + } + .table :where(.table-pin-cols tr th) { + background-color: var(--color-base-100); + position: sticky; + left: 0; + right: 0; + } + .table :where(thead tr, tbody tr:not(:last-child)) { + border-bottom: var(--border) solid var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .table :where(thead tr, tbody tr:not(:last-child)) { + border-bottom: var(--border) solid + color-mix(in oklch, var(--color-base-content) 5%, #0000); + } + } + .tabs-border .tab { + --tab-border-color: #0000 #0000 var(--tab-border-color) #0000; + border-radius: var(--radius-field); + position: relative; + } + .tabs-border .tab:before { + --tw-content: ""; + content: var(--tw-content); + background-color: var(--tab-border-color); + border-radius: var(--radius-field); + width: 80%; + height: 3px; + transition: background-color 0.2s; + position: absolute; + bottom: 0; + left: 10%; + } + :is( + .tabs-border + .tab:is(.tab-active, [aria-selected="true"]):not( + .tab-disabled, + [disabled] + ), + .tabs-border .tab:is(input:checked), + .tabs-border .tab:is(label:has(:checked)) + ):before { + --tab-border-color: currentColor; + border-top: 3px solid; + } + .select { + border: var(--border) solid #0000; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-color: var(--color-base-100); + vertical-align: middle; + width: clamp(3rem, 20rem, 100%); + height: var(--size); + touch-action: manipulation; + text-overflow: ellipsis; + box-shadow: 0 1px var(--input-color) inset, + 0 -1px oklch(100% 0 0 / calc(var(--depth) * 0.1)) inset; + background-image: linear-gradient(45deg, #0000 50%, currentColor 50%), + linear-gradient(135deg, currentColor 50%, #0000 50%); + background-position: calc(100% - 20px) calc(1px + 50%), + calc(100% - 16.1px) calc(1px + 50%); + background-repeat: no-repeat; + background-size: 4px 4px, 4px 4px; + border-start-start-radius: var(--join-ss, var(--radius-field)); + border-start-end-radius: var(--join-se, var(--radius-field)); + border-end-end-radius: var(--join-ee, var(--radius-field)); + border-end-start-radius: var(--join-es, var(--radius-field)); + flex-shrink: 1; + align-items: center; + gap: 0.375rem; + padding-inline: 1rem 1.75rem; + font-size: 0.875rem; + display: inline-flex; + position: relative; + } + @supports (color: color-mix(in lab, red, red)) { + .select { + box-shadow: 0 1px + color-mix( + in oklab, + var(--input-color) calc(var(--depth) * 10%), + #0000 + ) + inset, + 0 -1px oklch(100% 0 0 / calc(var(--depth) * 0.1)) inset; + } + } + .select { + border-color: var(--input-color); + --input-color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .select { + --input-color: color-mix(in oklab, var(--color-base-content) 20%, #0000); + } + } + .select { + --size: calc(var(--size-field, 0.25rem) * 10); + } + [dir="rtl"] .select { + background-position: 12px calc(1px + 50%), 16px calc(1px + 50%); + } + .select select { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background: inherit; + border-radius: inherit; + border-style: none; + width: calc(100% + 2.75rem); + height: calc(100% - 2px); + margin-inline: -1rem -1.75rem; + padding-inline: 1rem 1.75rem; + } + .select select:focus, + .select select:focus-within { + --tw-outline-style: none; + outline-style: none; + } + @media (forced-colors: active) { + .select select:focus, + .select select:focus-within { + outline-offset: 2px; + outline: 2px solid #0000; + } + } + .select select:not(:last-child) { + background-image: none; + margin-inline-end: -1.375rem; + } + .select:focus, + .select:focus-within { + --input-color: var(--color-base-content); + box-shadow: 0 1px var(--input-color); + } + @supports (color: color-mix(in lab, red, red)) { + .select:focus, + .select:focus-within { + box-shadow: 0 1px + color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000); + } + } + .select:focus, + .select:focus-within { + outline: 2px solid var(--input-color); + outline-offset: 2px; + isolation: isolate; + z-index: 1; + } + .select:has(> select[disabled]), + .select:is(:disabled, [disabled]) { + cursor: not-allowed; + border-color: var(--color-base-200); + background-color: var(--color-base-200); + color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .select:has(> select[disabled]), + .select:is(:disabled, [disabled]) { + color: color-mix(in oklab, var(--color-base-content) 40%, transparent); + } + } + :is( + .select:has(> select[disabled]), + .select:is(:disabled, [disabled]) + )::placeholder { + color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + :is( + .select:has(> select[disabled]), + .select:is(:disabled, [disabled]) + )::placeholder { + color: color-mix(in oklab, var(--color-base-content) 20%, transparent); + } + } + .select:has(> select[disabled]) > select[disabled] { + cursor: not-allowed; + } + .card { + border-radius: var(--radius-box); + outline-offset: 2px; + outline: 0 solid #0000; + flex-direction: column; + transition: outline 0.2s ease-in-out; + display: flex; + position: relative; + } + .card:focus { + --tw-outline-style: none; + outline-style: none; + } + @media (forced-colors: active) { + .card:focus { + outline-offset: 2px; + outline: 2px solid #0000; + } + } + .card:focus-visible { + outline-color: currentColor; + } + .card :where(figure:first-child) { + border-start-start-radius: inherit; + border-start-end-radius: inherit; + border-end-end-radius: unset; + border-end-start-radius: unset; + overflow: hidden; + } + .card :where(figure:last-child) { + border-start-start-radius: unset; + border-start-end-radius: unset; + border-end-end-radius: inherit; + border-end-start-radius: inherit; + overflow: hidden; + } + .card:where(.card-border) { + border: var(--border) solid var(--color-base-200); + } + .card:where(.card-dash) { + border: var(--border) dashed var(--color-base-200); + } + .card.image-full { + display: grid; + } + .card.image-full > * { + grid-row-start: 1; + grid-column-start: 1; + } + .card.image-full > .card-body { + color: var(--color-neutral-content); + position: relative; + } + .card.image-full :where(figure) { + border-radius: inherit; + overflow: hidden; + } + .card.image-full > figure img { + object-fit: cover; + filter: brightness(28%); + height: 100%; + } + .card figure { + justify-content: center; + align-items: center; + display: flex; + } + .card:has(> input:is(input[type="checkbox"], input[type="radio"])) { + cursor: pointer; + -webkit-user-select: none; + user-select: none; + } + .card:has(> :checked) { + outline: 2px solid; + } + .sr-only { + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; + width: 1px; + height: 1px; + margin: -1px; + padding: 0; + position: absolute; + overflow: hidden; + } + .avatar { + vertical-align: middle; + display: inline-flex; + position: relative; + } + .avatar > div { + aspect-ratio: 1; + display: block; + overflow: hidden; + } + .avatar img { + object-fit: cover; + width: 100%; + height: 100%; + } + .checkbox { + border: var(--border) solid var(--input-color, var(--color-base-content)); + } + @supports (color: color-mix(in lab, red, red)) { + .checkbox { + border: var(--border) solid + var( + --input-color, + color-mix(in oklab, var(--color-base-content) 20%, #0000) + ); + } + } + .checkbox { + cursor: pointer; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border-radius: var(--radius-selector); + vertical-align: middle; + color: var(--color-base-content); + box-shadow: 0 1px oklch(0% 0 0 / calc(var(--depth) * 0.1)) inset, + 0 0 #0000 inset, 0 0 #0000; + --size: calc(var(--size-selector, 0.25rem) * 6); + width: var(--size); + height: var(--size); + background-size: auto, calc(var(--noise) * 100%); + background-image: none, var(--fx-noise); + flex-shrink: 0; + padding: 0.25rem; + transition: background-color 0.2s, box-shadow 0.2s; + display: inline-block; + position: relative; + } + .checkbox:before { + --tw-content: ""; + content: var(--tw-content); + opacity: 0; + clip-path: polygon(20% 100%, 20% 80%, 50% 80%, 50% 80%, 70% 80%, 70% 100%); + width: 100%; + height: 100%; + box-shadow: 0 3px oklch(100% 0 0 / calc(var(--depth) * 0.1)) inset; + background-color: currentColor; + font-size: 1rem; + line-height: 0.75; + transition: clip-path 0.3s 0.1s, opacity 0.1s 0.1s, rotate 0.3s 0.1s, + translate 0.3s 0.1s; + display: block; + rotate: 45deg; + } + .checkbox:focus-visible { + outline: 2px solid var(--input-color, currentColor); + outline-offset: 2px; + } + .checkbox:checked, + .checkbox[aria-checked="true"] { + background-color: var(--input-color, var(--color-base-content)); + } + @supports (color: color-mix(in lab, red, red)) { + .checkbox:checked, + .checkbox[aria-checked="true"] { + background-color: var( + --input-color, + color-mix(in oklab, var(--color-base-content) 20%, #0000) + ); + } + } + .checkbox:checked, + .checkbox[aria-checked="true"] { + box-shadow: 0 0 #0000 inset, + 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * 0.1)) inset, + 0 1px oklch(0% 0 0 / calc(var(--depth) * 0.1)); + } + :is(.checkbox:checked, .checkbox[aria-checked="true"]):before { + clip-path: polygon(20% 100%, 20% 80%, 50% 80%, 50% 0%, 70% 0%, 70% 100%); + opacity: 1; + } + @media (forced-colors: active) { + :is(.checkbox:checked, .checkbox[aria-checked="true"]):before { + --tw-content: "✔︎"; + clip-path: none; + background-color: #0000; + rotate: none; + } + } + @media print { + :is(.checkbox:checked, .checkbox[aria-checked="true"]):before { + --tw-content: "✔︎"; + clip-path: none; + background-color: #0000; + rotate: none; + } + } + .checkbox:indeterminate { + background-color: var(--input-color, var(--color-base-content)); + } + @supports (color: color-mix(in lab, red, red)) { + .checkbox:indeterminate { + background-color: var( + --input-color, + color-mix(in oklab, var(--color-base-content) 20%, #0000) + ); + } + } + .checkbox:indeterminate:before { + opacity: 1; + clip-path: polygon(20% 100%, 20% 80%, 50% 80%, 50% 80%, 80% 80%, 80% 100%); + translate: 0 -35%; + rotate: none; + } + .checkbox:disabled { + cursor: not-allowed; + opacity: 0.2; + } + .radio { + cursor: pointer; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + vertical-align: middle; + border: var(--border) solid var(--input-color, currentColor); + border-radius: 3.40282e38px; + flex-shrink: 0; + padding: 0.25rem; + display: inline-block; + position: relative; + } + @supports (color: color-mix(in lab, red, red)) { + .radio { + border: var(--border) solid + var(--input-color, color-mix(in srgb, currentColor 20%, #0000)); + } + } + .radio { + box-shadow: 0 1px oklch(0% 0 0 / calc(var(--depth) * 0.1)) inset; + --size: calc(var(--size-selector, 0.25rem) * 6); + width: var(--size); + height: var(--size); + color: var(--input-color, currentColor); + } + .radio:before { + --tw-content: ""; + content: var(--tw-content); + background-size: auto, calc(var(--noise) * 100%); + background-image: none, var(--fx-noise); + border-radius: 3.40282e38px; + width: 100%; + height: 100%; + display: block; + } + .radio:focus-visible { + outline: 2px solid; + } + .radio:checked, + .radio[aria-checked="true"] { + background-color: var(--color-base-100); + border-color: currentColor; + animation: 0.2s ease-out radio; + } + :is(.radio:checked, .radio[aria-checked="true"]):before { + box-shadow: 0 -1px oklch(0% 0 0 / calc(var(--depth) * 0.1)) inset, + 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * 0.1)) inset, + 0 1px oklch(0% 0 0 / calc(var(--depth) * 0.1)); + background-color: currentColor; + } + @media (forced-colors: active) { + :is(.radio:checked, .radio[aria-checked="true"]):before { + outline-style: var(--tw-outline-style); + outline-offset: -1px; + outline-width: 1px; + } + } + @media print { + :is(.radio:checked, .radio[aria-checked="true"]):before { + outline-offset: -1rem; + outline: 0.25rem solid; + } + } + .radio:disabled { + cursor: not-allowed; + opacity: 0.2; + } + .rating { + vertical-align: middle; + display: inline-flex; + position: relative; + } + .rating input { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border: none; + } + .rating :where(*) { + background-color: var(--color-base-content); + opacity: 0.2; + border-radius: 0; + width: 1.5rem; + height: 1.5rem; + animation: 0.25s ease-out rating; + } + .rating :where(*):is(input) { + cursor: pointer; + } + .rating .rating-hidden { + background-color: #0000; + width: 0.5rem; + } + .rating input[type="radio"]:checked { + background-image: none; + } + .rating :checked, + .rating [aria-checked="true"], + .rating [aria-current="true"], + .rating :has(~ :checked, ~ [aria-checked="true"], ~ [aria-current="true"]) { + opacity: 1; + } + .rating :focus-visible { + transition: scale 0.2s ease-out; + scale: 1.1; + } + .rating :active:focus { + animation: none; + scale: 1.1; + } + .rating.rating-xs :where(:not(.rating-hidden)) { + width: 1rem; + height: 1rem; + } + .rating.rating-sm :where(:not(.rating-hidden)) { + width: 1.25rem; + height: 1.25rem; + } + .rating.rating-md :where(:not(.rating-hidden)) { + width: 1.5rem; + height: 1.5rem; + } + .rating.rating-lg :where(:not(.rating-hidden)) { + width: 1.75rem; + height: 1.75rem; + } + .rating.rating-xl :where(:not(.rating-hidden)) { + width: 2rem; + height: 2rem; + } + .stats { + border-radius: var(--radius-box); + grid-auto-flow: column; + display: inline-grid; + position: relative; + overflow-x: auto; + } + .absolute { + position: absolute; + } + .fixed { + position: fixed; + } + .relative { + position: relative; + } + .static { + position: static; + } + .sticky { + position: sticky; + } + .tooltip-bottom > .tooltip-content, + .tooltip-bottom[data-tip]:before { + transform: translate(-50%) translateY(var(--tt-pos, -0.25rem)); + inset: var(--tt-off) auto auto 50%; + } + .tooltip-bottom:after { + transform: translate(-50%) translateY(var(--tt-pos, -0.25rem)) + rotate(180deg); + inset: var(--tt-tail) auto auto 50%; + } + .tooltip-right > .tooltip-content, + .tooltip-right[data-tip]:before { + transform: translate(calc(var(--tt-pos, -0.25rem) + 0.25rem)) + translateY(-50%); + inset: 50% auto auto var(--tt-off); + } + .tooltip-right:after { + transform: translate(var(--tt-pos, -0.25rem)) translateY(-50%) rotate(90deg); + inset: 50% auto auto calc(var(--tt-tail) + 1px); + } + .inset-0 { + inset: calc(var(--spacing) * 0); + } + .dropdown-center { + --anchor-h: center; + } + .dropdown-center :where(.dropdown-content) { + inset-inline-end: 50%; + translate: 50%; + } + [dir="rtl"] :is(.dropdown-center :where(.dropdown-content)) { + translate: -50%; + } + .dropdown-center.dropdown-left { + --anchor-h: left; + --anchor-v: center; + } + .dropdown-center.dropdown-left .dropdown-content { + top: auto; + bottom: 50%; + translate: 0 50%; + } + .dropdown-center.dropdown-right { + --anchor-h: right; + --anchor-v: center; + } + .dropdown-center.dropdown-right .dropdown-content { + top: auto; + bottom: 50%; + translate: 0 50%; + } + .dropdown-end { + --anchor-h: span-left; + } + .dropdown-end :where(.dropdown-content) { + inset-inline-end: 0; + translate: 0; + } + [dir="rtl"] :is(.dropdown-end :where(.dropdown-content)) { + translate: 0; + } + .dropdown-end.dropdown-left { + --anchor-h: left; + --anchor-v: span-top; + } + .dropdown-end.dropdown-left .dropdown-content { + top: auto; + bottom: 0; + } + .dropdown-end.dropdown-right { + --anchor-h: right; + --anchor-v: span-top; + } + .dropdown-end.dropdown-right .dropdown-content { + top: auto; + bottom: 0; + } + .dropdown-top { + --anchor-v: top; + } + .dropdown-top .dropdown-content { + transform-origin: bottom; + top: auto; + bottom: 100%; + } + .center-absolute { + --tw-translate-x: -50%; + --tw-translate-y: -50%; + translate: var(--tw-translate-x) var(--tw-translate-y); + top: 50%; + left: 50%; + } + .\!top-15 { + top: calc(var(--spacing) * 15) !important; + } + .-top-4 { + top: calc(var(--spacing) * -4); + } + .-top-15 { + top: calc(var(--spacing) * -15); + } + .top-0 { + top: calc(var(--spacing) * 0); + } + .top-1\/2 { + top: 50%; + } + .top-2 { + top: calc(var(--spacing) * 2); + } + .top-4 { + top: calc(var(--spacing) * 4); + } + .top-8 { + top: calc(var(--spacing) * 8); + } + .top-10 { + top: calc(var(--spacing) * 10); + } + .top-\[50\%\] { + top: 50%; + } + .-right-1 { + right: calc(var(--spacing) * -1); + } + .-right-2 { + right: calc(var(--spacing) * -2); + } + .-right-4 { + right: calc(var(--spacing) * -4); + } + .right-0 { + right: calc(var(--spacing) * 0); + } + .right-1 { + right: calc(var(--spacing) * 1); + } + .right-2 { + right: calc(var(--spacing) * 2); + } + .right-3 { + right: calc(var(--spacing) * 3); + } + .right-4 { + right: calc(var(--spacing) * 4); + } + .right-5 { + right: calc(var(--spacing) * 5); + } + .-bottom-1 { + bottom: calc(var(--spacing) * -1); + } + .-bottom-4\.5 { + bottom: calc(var(--spacing) * -4.5); + } + .bottom-0 { + bottom: calc(var(--spacing) * 0); + } + .bottom-1 { + bottom: calc(var(--spacing) * 1); + } + .bottom-3 { + bottom: calc(var(--spacing) * 3); + } + .bottom-5 { + bottom: calc(var(--spacing) * 5); + } + .-left-1 { + left: calc(var(--spacing) * -1); + } + .-left-2 { + left: calc(var(--spacing) * -2); + } + .left-0 { + left: calc(var(--spacing) * 0); + } + .left-1\/2 { + left: 50%; + } + .left-2 { + left: calc(var(--spacing) * 2); + } + .left-3 { + left: calc(var(--spacing) * 3); + } + .left-\[50\%\] { + left: 50%; + } + .left-full { + left: 100%; + } + .textarea { + border: var(--border) solid #0000; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border-radius: var(--radius-field); + background-color: var(--color-base-100); + vertical-align: middle; + touch-action: manipulation; + border-color: var(--input-color); + width: clamp(3rem, 20rem, 100%); + min-height: 5rem; + box-shadow: 0 1px var(--input-color) inset, + 0 -1px oklch(100% 0 0 / calc(var(--depth) * 0.1)) inset; + flex-shrink: 1; + padding-block: 0.5rem; + padding-inline: 0.75rem; + font-size: 0.875rem; + } + @supports (color: color-mix(in lab, red, red)) { + .textarea { + box-shadow: 0 1px + color-mix( + in oklab, + var(--input-color) calc(var(--depth) * 10%), + #0000 + ) + inset, + 0 -1px oklch(100% 0 0 / calc(var(--depth) * 0.1)) inset; + } + } + .textarea { + --input-color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .textarea { + --input-color: color-mix(in oklab, var(--color-base-content) 20%, #0000); + } + } + .textarea textarea { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-color: #0000; + border: none; + } + .textarea textarea:focus, + .textarea textarea:focus-within { + --tw-outline-style: none; + outline-style: none; + } + @media (forced-colors: active) { + .textarea textarea:focus, + .textarea textarea:focus-within { + outline-offset: 2px; + outline: 2px solid #0000; + } + } + .textarea:focus, + .textarea:focus-within { + --input-color: var(--color-base-content); + box-shadow: 0 1px var(--input-color); + } + @supports (color: color-mix(in lab, red, red)) { + .textarea:focus, + .textarea:focus-within { + box-shadow: 0 1px + color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000); + } + } + .textarea:focus, + .textarea:focus-within { + outline: 2px solid var(--input-color); + outline-offset: 2px; + isolation: isolate; + } + .textarea:has(> textarea[disabled]), + .textarea:is(:disabled, [disabled]) { + cursor: not-allowed; + border-color: var(--color-base-200); + background-color: var(--color-base-200); + color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .textarea:has(> textarea[disabled]), + .textarea:is(:disabled, [disabled]) { + color: color-mix(in oklab, var(--color-base-content) 40%, transparent); + } + } + :is( + .textarea:has(> textarea[disabled]), + .textarea:is(:disabled, [disabled]) + )::placeholder { + color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + :is( + .textarea:has(> textarea[disabled]), + .textarea:is(:disabled, [disabled]) + )::placeholder { + color: color-mix(in oklab, var(--color-base-content) 20%, transparent); + } + } + .textarea:has(> textarea[disabled]), + .textarea:is(:disabled, [disabled]) { + box-shadow: none; + } + .textarea:has(> textarea[disabled]) > textarea[disabled] { + cursor: not-allowed; + } + .isolate { + isolation: isolate; + } + .modal-backdrop { + color: #0000; + z-index: -1; + grid-row-start: 1; + grid-column-start: 1; + place-self: stretch stretch; + display: grid; + } + .modal-backdrop button { + cursor: pointer; + } + .z-1 { + z-index: 1; + } + .z-10 { + z-index: 10; + } + .z-20 { + z-index: 20; + } + .z-30 { + z-index: 30; + } + .z-50 { + z-index: 50; + } + .z-100 { + z-index: 100; + } + .tab-content { + order: var(--tabcontent-order); + --tabcontent-radius-ss: 0; + --tabcontent-radius-se: 0; + --tabcontent-radius-es: 0; + --tabcontent-radius-ee: 0; + --tabcontent-order: 1; + width: 100%; + margin: var(--tabcontent-margin); + border-color: #0000; + border-width: var(--border); + border-start-start-radius: var(--tabcontent-radius-ss); + border-start-end-radius: var(--tabcontent-radius-se); + border-end-end-radius: var(--tabcontent-radius-ee); + border-end-start-radius: var(--tabcontent-radius-es); + display: none; + } + .modal-box { + background-color: var(--color-base-100); + border-top-left-radius: var(--modal-tl, var(--radius-box)); + border-top-right-radius: var(--modal-tr, var(--radius-box)); + border-bottom-left-radius: var(--modal-bl, var(--radius-box)); + border-bottom-right-radius: var(--modal-br, var(--radius-box)); + opacity: 0; + overscroll-behavior: contain; + grid-row-start: 1; + grid-column-start: 1; + width: 91.6667%; + max-width: 32rem; + max-height: 100vh; + padding: 1.5rem; + transition: translate 0.3s ease-out, scale 0.3s ease-out, + opacity 0.2s ease-out 50ms, box-shadow 0.3s ease-out; + overflow-y: auto; + scale: 95%; + box-shadow: 0 25px 50px -12px #00000040; + } + .container { + width: 100%; + } + @media (min-width: 40rem) { + .container { + max-width: 40rem; + } + } + @media (min-width: 48rem) { + .container { + max-width: 48rem; + } + } + @media (min-width: 64rem) { + .container { + max-width: 64rem; + } + } + @media (min-width: 80rem) { + .container { + max-width: 80rem; + } + } + @media (min-width: 96rem) { + .container { + max-width: 96rem; + } + } + .divider { + white-space: nowrap; + height: 1rem; + margin: var(--divider-m, 1rem 0); + --divider-color: var(--color-base-content); + flex-direction: row; + align-self: stretch; + align-items: center; + display: flex; + } + @supports (color: color-mix(in lab, red, red)) { + .divider { + --divider-color: color-mix( + in oklab, + var(--color-base-content) 10%, + transparent + ); + } + } + .divider:before, + .divider:after { + content: ""; + background-color: var(--divider-color); + flex-grow: 1; + width: 100%; + height: 0.125rem; + } + @media print { + .divider:before, + .divider:after { + border: 0.5px solid; + } + } + .divider:not(:empty) { + gap: 1rem; + } + .number-input[type="number"]::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + } + .number-input[type="number"]::-webkit-outer-spin-button { + -webkit-appearance: none; + margin: 0; + } + .number-input[type="number"] { + -moz-appearance: textfield; + } + .m-1 { + margin: calc(var(--spacing) * 1); + } + .-mx-1 { + margin-inline: calc(var(--spacing) * -1); + } + .mx-0\.5 { + margin-inline: calc(var(--spacing) * 0.5); + } + .mx-auto { + margin-inline: auto; + } + .input-sm { + --size: calc(var(--size-field, 0.25rem) * 8); + font-size: 0.75rem; + } + .input-sm[type="number"]::-webkit-inner-spin-button { + margin-block: -0.5rem; + margin-inline-end: -0.75rem; + } + .input-xs { + --size: calc(var(--size-field, 0.25rem) * 6); + font-size: 0.6875rem; + } + .input-xs[type="number"]::-webkit-inner-spin-button { + margin-block: -0.25rem; + margin-inline-end: -0.75rem; + } + .my-2 { + margin-block: calc(var(--spacing) * 2); + } + .my-3 { + margin-block: calc(var(--spacing) * 3); + } + .my-4 { + margin-block: calc(var(--spacing) * 4); + } + .my-6 { + margin-block: calc(var(--spacing) * 6); + } + .label { + white-space: nowrap; + color: currentColor; + align-items: center; + gap: 0.375rem; + display: inline-flex; + } + @supports (color: color-mix(in lab, red, red)) { + .label { + color: color-mix(in oklab, currentColor 60%, transparent); + } + } + .label:has(input) { + cursor: pointer; + } + .label:is(.input > *, .select > *) { + white-space: nowrap; + height: calc(100% - 0.5rem); + font-size: inherit; + align-items: center; + padding-inline: 0.75rem; + display: flex; + } + .label:is(.input > *, .select > *):first-child { + border-inline-end: var(--border) solid currentColor; + margin-inline: -0.75rem 0.75rem; + } + @supports (color: color-mix(in lab, red, red)) { + .label:is(.input > *, .select > *):first-child { + border-inline-end: var(--border) solid + color-mix(in oklab, currentColor 10%, #0000); + } + } + .label:is(.input > *, .select > *):last-child { + border-inline-start: var(--border) solid currentColor; + margin-inline: 0.75rem -0.75rem; + } + @supports (color: color-mix(in lab, red, red)) { + .label:is(.input > *, .select > *):last-child { + border-inline-start: var(--border) solid + color-mix(in oklab, currentColor 10%, #0000); + } + } + .join-horizontal { + flex-direction: row; + } + .join-horizontal > .join-item:first-child, + .join-horizontal :first-child:not(:last-child) .join-item { + --join-ss: var(--radius-field); + --join-se: 0; + --join-es: var(--radius-field); + --join-ee: 0; + } + .join-horizontal > .join-item:last-child, + .join-horizontal :last-child:not(:first-child) .join-item { + --join-ss: 0; + --join-se: var(--radius-field); + --join-es: 0; + --join-ee: var(--radius-field); + } + .join-horizontal > .join-item:only-child, + .join-horizontal :only-child .join-item { + --join-ss: var(--radius-field); + --join-se: var(--radius-field); + --join-es: var(--radius-field); + --join-ee: var(--radius-field); + } + .join-horizontal .join-item:where(:not(:first-child)), + .join-item:where(:not(:first-child, :disabled, [disabled], .btn-disabled)) { + margin-block-start: 0; + margin-inline-start: calc(var(--border, 1px) * -1); + } + .join-item:where(:is(:disabled, [disabled], .btn-disabled)) { + border-width: var(--border, 1px) 0 var(--border, 1px) var(--border, 1px); + } + .prose { + color: var(--tw-prose-body); + max-width: 65ch; + } + .prose :where(p):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + margin-top: 1.25em; + margin-bottom: 1.25em; + } + .prose + :where([class~="lead"]):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + color: var(--tw-prose-lead); + margin-top: 1.2em; + margin-bottom: 1.2em; + font-size: 1.25em; + line-height: 1.6; + } + .prose :where(a):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + color: var(--tw-prose-links); + font-weight: 500; + text-decoration: underline; + } + .prose + :where(strong):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + color: var(--tw-prose-bold); + font-weight: 600; + } + .prose + :where(a strong):not(:where([class~="not-prose"], [class~="not-prose"] *)), + .prose + :where(blockquote strong):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ), + .prose + :where(thead th strong):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + color: inherit; + } + .prose :where(ol):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + margin-top: 1.25em; + margin-bottom: 1.25em; + padding-inline-start: 1.625em; + list-style-type: decimal; + } + .prose + :where(ol[type="A"]):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + list-style-type: upper-alpha; + } + .prose + :where(ol[type="a"]):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + list-style-type: lower-alpha; + } + .prose + :where(ol[type="A s"]):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + list-style-type: upper-alpha; + } + .prose + :where(ol[type="a s"]):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + list-style-type: lower-alpha; + } + .prose + :where(ol[type="I"]):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + list-style-type: upper-roman; + } + .prose + :where(ol[type="i"]):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + list-style-type: lower-roman; + } + .prose + :where(ol[type="I s"]):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + list-style-type: upper-roman; + } + .prose + :where(ol[type="i s"]):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + list-style-type: lower-roman; + } + .prose + :where(ol[type="1"]):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + list-style-type: decimal; + } + .prose :where(ul):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + margin-top: 1.25em; + margin-bottom: 1.25em; + padding-inline-start: 1.625em; + list-style-type: disc; + } + .prose + :where(ol > li):not( + :where([class~="not-prose"], [class~="not-prose"] *) + )::marker { + color: var(--tw-prose-counters); + font-weight: 400; + } + .prose + :where(ul > li):not( + :where([class~="not-prose"], [class~="not-prose"] *) + )::marker { + color: var(--tw-prose-bullets); + } + .prose :where(dt):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + color: var(--tw-prose-headings); + margin-top: 1.25em; + font-weight: 600; + } + .prose :where(hr):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + border-color: var(--tw-prose-hr); + border-top-width: 1px; + margin-top: 3em; + margin-bottom: 3em; + } + .prose + :where(blockquote):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + color: var(--tw-prose-quotes); + border-inline-start-width: 0.25rem; + border-inline-start-color: var(--tw-prose-quote-borders); + quotes: "“" "”" "‘" "’"; + margin-top: 1.6em; + margin-bottom: 1.6em; + padding-inline-start: 1em; + font-style: italic; + font-weight: 500; + } + .prose + :where(blockquote p:first-of-type):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ):before { + content: open-quote; + } + .prose + :where(blockquote p:last-of-type):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ):after { + content: close-quote; + } + .prose :where(h1):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + color: var(--tw-prose-headings); + margin-top: 0; + margin-bottom: 0.888889em; + font-size: 2.25em; + font-weight: 800; + line-height: 1.11111; + } + .prose + :where(h1 strong):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + color: inherit; + font-weight: 900; + } + .prose :where(h2):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + color: var(--tw-prose-headings); + margin-top: 2em; + margin-bottom: 1em; + font-size: 1.5em; + font-weight: 700; + line-height: 1.33333; + } + .prose + :where(h2 strong):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + color: inherit; + font-weight: 800; + } + .prose :where(h3):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + color: var(--tw-prose-headings); + margin-top: 1.6em; + margin-bottom: 0.6em; + font-size: 1.25em; + font-weight: 600; + line-height: 1.6; + } + .prose + :where(h3 strong):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + color: inherit; + font-weight: 700; + } + .prose :where(h4):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + color: var(--tw-prose-headings); + margin-top: 1.5em; + margin-bottom: 0.5em; + font-weight: 600; + line-height: 1.5; + } + .prose + :where(h4 strong):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + color: inherit; + font-weight: 700; + } + .prose :where(img):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + margin-top: 2em; + margin-bottom: 2em; + } + .prose + :where(picture):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + margin-top: 2em; + margin-bottom: 2em; + display: block; + } + .prose + :where(video):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + margin-top: 2em; + margin-bottom: 2em; + } + .prose :where(kbd):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + color: var(--tw-prose-kbd); + box-shadow: 0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%), + 0 3px rgb(var(--tw-prose-kbd-shadows) / 10%); + padding-top: 0.1875em; + padding-inline-end: 0.375em; + padding-bottom: 0.1875em; + border-radius: 0.3125rem; + padding-inline-start: 0.375em; + font-family: inherit; + font-size: 0.875em; + font-weight: 500; + } + .prose + :where(code):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + color: var(--tw-prose-code); + font-size: 0.875em; + font-weight: 600; + } + .prose + :where(code):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ):before, + .prose + :where(code):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ):after { + content: "`"; + } + .prose + :where(a code):not(:where([class~="not-prose"], [class~="not-prose"] *)), + .prose + :where(h1 code):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + color: inherit; + } + .prose + :where(h2 code):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + color: inherit; + font-size: 0.875em; + } + .prose + :where(h3 code):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + color: inherit; + font-size: 0.9em; + } + .prose + :where(h4 code):not(:where([class~="not-prose"], [class~="not-prose"] *)), + .prose + :where(blockquote code):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ), + .prose + :where(thead th code):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + color: inherit; + } + .prose :where(pre):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + color: var(--tw-prose-pre-code); + background-color: var(--tw-prose-pre-bg); + padding-top: 0.857143em; + padding-inline-end: 1.14286em; + padding-bottom: 0.857143em; + border-radius: 0.375rem; + margin-top: 1.71429em; + margin-bottom: 1.71429em; + padding-inline-start: 1.14286em; + font-size: 0.875em; + font-weight: 400; + line-height: 1.71429; + overflow-x: auto; + } + .prose + :where(pre code):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + font-weight: inherit; + color: inherit; + font-size: inherit; + font-family: inherit; + line-height: inherit; + background-color: #0000; + border-width: 0; + border-radius: 0; + padding: 0; + } + .prose + :where(pre code):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ):before, + .prose + :where(pre code):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ):after { + content: none; + } + .prose + :where(table):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + table-layout: auto; + width: 100%; + margin-top: 2em; + margin-bottom: 2em; + font-size: 0.875em; + line-height: 1.71429; + } + .prose + :where(thead):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + border-bottom-width: 1px; + border-bottom-color: var(--tw-prose-th-borders); + } + .prose + :where(thead th):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + color: var(--tw-prose-headings); + vertical-align: bottom; + padding-inline-end: 0.571429em; + padding-bottom: 0.571429em; + padding-inline-start: 0.571429em; + font-weight: 600; + } + .prose + :where(tbody tr):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + border-bottom-width: 1px; + border-bottom-color: var(--tw-prose-td-borders); + } + .prose + :where(tbody tr:last-child):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + border-bottom-width: 0; + } + .prose + :where(tbody td):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + vertical-align: baseline; + } + .prose + :where(tfoot):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + border-top-width: 1px; + border-top-color: var(--tw-prose-th-borders); + } + .prose + :where(tfoot td):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + vertical-align: top; + } + .prose + :where(th, td):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + text-align: start; + } + .prose + :where(figure > *):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + margin-top: 0; + margin-bottom: 0; + } + .prose + :where(figcaption):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + color: var(--tw-prose-captions); + margin-top: 0.857143em; + font-size: 0.875em; + line-height: 1.42857; + } + .prose { + --tw-prose-body: oklch(37.3% 0.034 259.733); + --tw-prose-headings: oklch(21% 0.034 264.665); + --tw-prose-lead: oklch(44.6% 0.03 256.802); + --tw-prose-links: oklch(21% 0.034 264.665); + --tw-prose-bold: oklch(21% 0.034 264.665); + --tw-prose-counters: oklch(55.1% 0.027 264.364); + --tw-prose-bullets: oklch(87.2% 0.01 258.338); + --tw-prose-hr: oklch(92.8% 0.006 264.531); + --tw-prose-quotes: oklch(21% 0.034 264.665); + --tw-prose-quote-borders: oklch(92.8% 0.006 264.531); + --tw-prose-captions: oklch(55.1% 0.027 264.364); + --tw-prose-kbd: oklch(21% 0.034 264.665); + --tw-prose-kbd-shadows: NaN NaN NaN; + --tw-prose-code: oklch(21% 0.034 264.665); + --tw-prose-pre-code: oklch(92.8% 0.006 264.531); + --tw-prose-pre-bg: oklch(27.8% 0.033 256.848); + --tw-prose-th-borders: oklch(87.2% 0.01 258.338); + --tw-prose-td-borders: oklch(92.8% 0.006 264.531); + --tw-prose-invert-body: oklch(87.2% 0.01 258.338); + --tw-prose-invert-headings: #fff; + --tw-prose-invert-lead: oklch(70.7% 0.022 261.325); + --tw-prose-invert-links: #fff; + --tw-prose-invert-bold: #fff; + --tw-prose-invert-counters: oklch(70.7% 0.022 261.325); + --tw-prose-invert-bullets: oklch(44.6% 0.03 256.802); + --tw-prose-invert-hr: oklch(37.3% 0.034 259.733); + --tw-prose-invert-quotes: oklch(96.7% 0.003 264.542); + --tw-prose-invert-quote-borders: oklch(37.3% 0.034 259.733); + --tw-prose-invert-captions: oklch(70.7% 0.022 261.325); + --tw-prose-invert-kbd: #fff; + --tw-prose-invert-kbd-shadows: 255 255 255; + --tw-prose-invert-code: #fff; + --tw-prose-invert-pre-code: oklch(87.2% 0.01 258.338); + --tw-prose-invert-pre-bg: #00000080; + --tw-prose-invert-th-borders: oklch(44.6% 0.03 256.802); + --tw-prose-invert-td-borders: oklch(37.3% 0.034 259.733); + font-size: 1rem; + line-height: 1.75; + } + .prose + :where(picture > img):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + margin-top: 0; + margin-bottom: 0; + } + .prose :where(li):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + margin-top: 0.5em; + margin-bottom: 0.5em; + } + .prose + :where(ol > li):not(:where([class~="not-prose"], [class~="not-prose"] *)), + .prose + :where(ul > li):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + padding-inline-start: 0.375em; + } + .prose + :where(.prose > ul > li p):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + margin-top: 0.75em; + margin-bottom: 0.75em; + } + .prose + :where(.prose > ul > li > p:first-child):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + margin-top: 1.25em; + } + .prose + :where(.prose > ul > li > p:last-child):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + margin-bottom: 1.25em; + } + .prose + :where(.prose > ol > li > p:first-child):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + margin-top: 1.25em; + } + .prose + :where(.prose > ol > li > p:last-child):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + margin-bottom: 1.25em; + } + .prose + :where(ul ul, ul ol, ol ul, ol ol):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + margin-top: 0.75em; + margin-bottom: 0.75em; + } + .prose :where(dl):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + margin-top: 1.25em; + margin-bottom: 1.25em; + } + .prose :where(dd):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + margin-top: 0.5em; + padding-inline-start: 1.625em; + } + .prose + :where(hr + *):not(:where([class~="not-prose"], [class~="not-prose"] *)), + .prose + :where(h2 + *):not(:where([class~="not-prose"], [class~="not-prose"] *)), + .prose + :where(h3 + *):not(:where([class~="not-prose"], [class~="not-prose"] *)), + .prose + :where(h4 + *):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + margin-top: 0; + } + .prose + :where(thead th:first-child):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + padding-inline-start: 0; + } + .prose + :where(thead th:last-child):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + padding-inline-end: 0; + } + .prose + :where(tbody td, tfoot td):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + padding-top: 0.571429em; + padding-inline-end: 0.571429em; + padding-bottom: 0.571429em; + padding-inline-start: 0.571429em; + } + .prose + :where(tbody td:first-child, tfoot td:first-child):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + padding-inline-start: 0; + } + .prose + :where(tbody td:last-child, tfoot td:last-child):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + padding-inline-end: 0; + } + .prose + :where(figure):not(:where([class~="not-prose"], [class~="not-prose"] *)) { + margin-top: 2em; + margin-bottom: 2em; + } + .prose + :where(.prose > :first-child):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + margin-top: 0; + } + .prose + :where(.prose > :last-child):not( + :where([class~="not-prose"], [class~="not-prose"] *) + ) { + margin-bottom: 0; + } + .modal-action { + justify-content: flex-end; + gap: 0.5rem; + margin-top: 1.5rem; + display: flex; + } + .mt-0\.5 { + margin-top: calc(var(--spacing) * 0.5); + } + .mt-1 { + margin-top: calc(var(--spacing) * 1); + } + .mt-2 { + margin-top: calc(var(--spacing) * 2); + } + .mt-3 { + margin-top: calc(var(--spacing) * 3); + } + .mt-4 { + margin-top: calc(var(--spacing) * 4); + } + .mt-5 { + margin-top: calc(var(--spacing) * 5); + } + .mt-6 { + margin-top: calc(var(--spacing) * 6); + } + .mt-8 { + margin-top: calc(var(--spacing) * 8); + } + .mt-10 { + margin-top: calc(var(--spacing) * 10); + } + .mt-18 { + margin-top: calc(var(--spacing) * 18); + } + .mt-20 { + margin-top: calc(var(--spacing) * 20); + } + .mr-0\.5 { + margin-right: calc(var(--spacing) * 0.5); + } + .mr-1 { + margin-right: calc(var(--spacing) * 1); + } + .mr-2 { + margin-right: calc(var(--spacing) * 2); + } + .mr-4 { + margin-right: calc(var(--spacing) * 4); + } + .fieldset-legend { + color: var(--color-base-content); + justify-content: space-between; + align-items: center; + gap: 0.5rem; + margin-bottom: -0.25rem; + padding-block: 0.5rem; + font-weight: 600; + display: flex; + } + .mb-0\.5 { + margin-bottom: calc(var(--spacing) * 0.5); + } + .mb-1 { + margin-bottom: calc(var(--spacing) * 1); + } + .mb-2 { + margin-bottom: calc(var(--spacing) * 2); + } + .mb-3 { + margin-bottom: calc(var(--spacing) * 3); + } + .mb-4 { + margin-bottom: calc(var(--spacing) * 4); + } + .mb-6 { + margin-bottom: calc(var(--spacing) * 6); + } + .ml-0\.5 { + margin-left: calc(var(--spacing) * 0.5); + } + .ml-1 { + margin-left: calc(var(--spacing) * 1); + } + .ml-2 { + margin-left: calc(var(--spacing) * 2); + } + .ml-3 { + margin-left: calc(var(--spacing) * 3); + } + .ml-4 { + margin-left: calc(var(--spacing) * 4); + } + .ml-auto { + margin-left: auto; + } + .status { + aspect-ratio: 1; + border-radius: var(--radius-selector); + background-color: var(--color-base-content); + width: 0.5rem; + height: 0.5rem; + display: inline-block; + } + @supports (color: color-mix(in lab, red, red)) { + .status { + background-color: color-mix( + in oklab, + var(--color-base-content) 20%, + transparent + ); + } + } + .status { + vertical-align: middle; + color: #0000004d; + background-position: 50%; + background-repeat: no-repeat; + } + @supports (color: color-mix(in lab, red, red)) { + .status { + color: #0000004d; + } + @supports (color: color-mix(in lab, red, red)) { + .status { + color: color-mix(in oklab, var(--color-black) 30%, transparent); + } + } + } + .status { + background-image: radial-gradient( + circle at 35% 30%, + oklch(1 0 0 / calc(var(--depth) * 0.5)), + #0000 + ); + box-shadow: 0 2px 3px -1px; + } + @supports (color: color-mix(in lab, red, red)) { + .status { + box-shadow: 0 2px 3px -1px color-mix(in oklab, currentColor + calc(var(--depth) * 100%), #0000); + } + } + .badge { + border-radius: var(--radius-selector); + vertical-align: middle; + color: var(--badge-fg); + border: var(--border) solid var(--badge-color, var(--color-base-200)); + width: fit-content; + padding-inline: calc(0.25rem * 3 - var(--border)); + background-size: auto, calc(var(--noise) * 100%); + background-image: none, var(--fx-noise); + background-color: var(--badge-bg); + --badge-bg: var(--badge-color, var(--color-base-100)); + --badge-fg: var(--color-base-content); + --size: calc(var(--size-selector, 0.25rem) * 6); + height: var(--size); + justify-content: center; + align-items: center; + gap: 0.5rem; + font-size: 0.875rem; + display: inline-flex; + } + .kbd { + border-radius: var(--radius-field); + background-color: var(--color-base-200); + vertical-align: middle; + border: var(--border) solid var(--color-base-content); + justify-content: center; + align-items: center; + padding-left: 0.5em; + padding-right: 0.5em; + display: inline-flex; + } + @supports (color: color-mix(in lab, red, red)) { + .kbd { + border: var(--border) solid + color-mix(in srgb, var(--color-base-content) 20%, #0000); + } + } + .kbd { + border-bottom: calc(var(--border) + 1px) solid var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .kbd { + border-bottom: calc(var(--border) + 1px) solid + color-mix(in srgb, var(--color-base-content) 20%, #0000); + } + } + .kbd { + --size: calc(var(--size-selector, 0.25rem) * 6); + height: var(--size); + min-width: var(--size); + font-size: 0.875rem; + } + .tabs { + --tabs-height: auto; + --tabs-direction: row; + --tab-height: calc(var(--size-field, 0.25rem) * 10); + height: var(--tabs-height); + flex-wrap: wrap; + flex-direction: var(--tabs-direction); + display: flex; + } + .card-body { + padding: var(--card-p, 1.5rem); + font-size: var(--card-fs, 0.875rem); + flex-direction: column; + flex: auto; + gap: 0.5rem; + display: flex; + } + .card-body :where(p) { + flex-grow: 1; + } + .alert { + border-radius: var(--radius-box); + color: var(--color-base-content); + background-color: var(--alert-color, var(--color-base-200)); + text-align: start; + border: var(--border) solid var(--color-base-200); + background-size: auto, calc(var(--noise) * 100%); + background-image: none, var(--fx-noise); + box-shadow: 0 3px 0 -2px oklch(100% 0 0 / calc(var(--depth) * 0.08)) inset, + 0 1px #000, 0 4px 3px -2px oklch(0% 0 0 / calc(var(--depth) * 0.08)); + grid-template-columns: auto; + grid-auto-flow: column; + justify-content: start; + place-items: center start; + gap: 1rem; + padding-block: 0.75rem; + padding-inline: 1rem; + font-size: 0.875rem; + line-height: 1.25rem; + display: grid; + } + @supports (color: color-mix(in lab, red, red)) { + .alert { + box-shadow: 0 3px 0 -2px oklch(100% 0 0 / calc(var(--depth) * 0.08)) inset, + 0 1px + color-mix( + in oklab, + color-mix( + in oklab, + #000 20%, + var(--alert-color, var(--color-base-200)) + ) + calc(var(--depth) * 20%), + #0000 + ), + 0 4px 3px -2px oklch(0% 0 0 / calc(var(--depth) * 0.08)); + } + } + .alert:has(:nth-child(2)) { + grid-template-columns: auto minmax(auto, 1fr); + } + .alert.alert-outline { + color: var(--alert-color); + box-shadow: none; + background-color: #0000; + background-image: none; + } + .alert.alert-dash { + color: var(--alert-color); + box-shadow: none; + background-color: #0000; + background-image: none; + border-style: dashed; + } + .alert.alert-soft { + color: var(--alert-color, var(--color-base-content)); + background: var(--alert-color, var(--color-base-content)); + } + @supports (color: color-mix(in lab, red, red)) { + .alert.alert-soft { + background: color-mix( + in oklab, + var(--alert-color, var(--color-base-content)) 8%, + var(--color-base-100) + ); + } + } + .alert.alert-soft { + border-color: var(--alert-color, var(--color-base-content)); + } + @supports (color: color-mix(in lab, red, red)) { + .alert.alert-soft { + border-color: color-mix( + in oklab, + var(--alert-color, var(--color-base-content)) 10%, + var(--color-base-100) + ); + } + } + .alert.alert-soft { + box-shadow: none; + background-image: none; + } + .fieldset { + grid-template-columns: 1fr; + grid-auto-rows: max-content; + gap: 0.375rem; + padding-block: 0.25rem; + font-size: 0.75rem; + display: grid; + } + .join { + --join-ss: 0; + --join-se: 0; + --join-es: 0; + --join-ee: 0; + align-items: stretch; + display: inline-flex; + } + .join :where(.join-item) { + border-start-start-radius: var(--join-ss, 0); + border-start-end-radius: var(--join-se, 0); + border-end-end-radius: var(--join-ee, 0); + border-end-start-radius: var(--join-es, 0); + } + .join :where(.join-item) * { + --join-ss: var(--radius-field); + --join-se: var(--radius-field); + --join-es: var(--radius-field); + --join-ee: var(--radius-field); + } + .join > .join-item:where(:first-child), + .join :first-child:not(:last-child) :where(.join-item) { + --join-ss: var(--radius-field); + --join-se: 0; + --join-es: var(--radius-field); + --join-ee: 0; + } + .join > .join-item:where(:last-child), + .join :last-child:not(:first-child) :where(.join-item) { + --join-ss: 0; + --join-se: var(--radius-field); + --join-es: 0; + --join-ee: var(--radius-field); + } + .join > .join-item:where(:only-child), + .join :only-child :where(.join-item) { + --join-ss: var(--radius-field); + --join-se: var(--radius-field); + --join-es: var(--radius-field); + --join-ee: var(--radius-field); + } + .line-clamp-1 { + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; + display: -webkit-box; + overflow: hidden; + } + :root .prose { + --tw-prose-body: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + :root .prose { + --tw-prose-body: color-mix( + in oklab, + var(--color-base-content) 80%, + #0000 + ); + } + } + :root .prose { + --tw-prose-headings: var(--color-base-content); + --tw-prose-lead: var(--color-base-content); + --tw-prose-links: var(--color-base-content); + --tw-prose-bold: var(--color-base-content); + --tw-prose-counters: var(--color-base-content); + --tw-prose-bullets: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + :root .prose { + --tw-prose-bullets: color-mix( + in oklab, + var(--color-base-content) 50%, + #0000 + ); + } + } + :root .prose { + --tw-prose-hr: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + :root .prose { + --tw-prose-hr: color-mix(in oklab, var(--color-base-content) 20%, #0000); + } + } + :root .prose { + --tw-prose-quotes: var(--color-base-content); + --tw-prose-quote-borders: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + :root .prose { + --tw-prose-quote-borders: color-mix( + in oklab, + var(--color-base-content) 20%, + #0000 + ); + } + } + :root .prose { + --tw-prose-captions: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + :root .prose { + --tw-prose-captions: color-mix( + in oklab, + var(--color-base-content) 50%, + #0000 + ); + } + } + :root .prose { + --tw-prose-code: var(--color-base-content); + --tw-prose-pre-code: var(--color-neutral-content); + --tw-prose-pre-bg: var(--color-neutral); + --tw-prose-th-borders: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + :root .prose { + --tw-prose-th-borders: color-mix( + in oklab, + var(--color-base-content) 50%, + #0000 + ); + } + } + :root .prose { + --tw-prose-td-borders: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + :root .prose { + --tw-prose-td-borders: color-mix( + in oklab, + var(--color-base-content) 20%, + #0000 + ); + } + } + :root .prose { + --tw-prose-kbd: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + :root .prose { + --tw-prose-kbd: color-mix(in oklab, var(--color-base-content) 80%, #0000); + } + } + :root .prose :where(code):not(pre > code) { + background-color: var(--color-base-200); + border-radius: var(--radius-selector); + border: var(--border) solid var(--color-base-300); + font-weight: inherit; + padding-inline: 0.5em; + } + :root .prose :where(code):not(pre > code):before, + :root .prose :where(code):not(pre > code):after { + display: none; + } + .mask { + vertical-align: middle; + display: inline-block; + -webkit-mask-position: 50%; + mask-position: 50%; + -webkit-mask-size: contain; + mask-size: contain; + -webkit-mask-repeat: no-repeat; + mask-repeat: no-repeat; + } + .hide-scrollbar { + -ms-overflow-style: none; + scrollbar-width: none; + } + .hide-scrollbar::-webkit-scrollbar { + display: none; + } + .block { + display: block; + } + .contents { + display: contents; + } + .flex { + display: flex; + } + .grid { + display: grid; + } + .hidden { + display: none; + } + .inline { + display: inline; + } + .inline-block { + display: inline-block; + } + .table { + display: table; + } + .aspect-square { + aspect-ratio: 1; + } + .aspect-video { + aspect-ratio: var(--aspect-video); + } + .btn-circle { + width: var(--size); + height: var(--size); + border-radius: 3.40282e38px; + padding-inline: 0; + } + .btn-square { + width: var(--size); + height: var(--size); + padding-inline: 0; + } + .size-0 { + width: calc(var(--spacing) * 0); + height: calc(var(--spacing) * 0); + } + .size-3 { + width: calc(var(--spacing) * 3); + height: calc(var(--spacing) * 3); + } + .size-3\.5 { + width: calc(var(--spacing) * 3.5); + height: calc(var(--spacing) * 3.5); + } + .size-4 { + width: calc(var(--spacing) * 4); + height: calc(var(--spacing) * 4); + } + .size-4\.5 { + width: calc(var(--spacing) * 4.5); + height: calc(var(--spacing) * 4.5); + } + .size-5 { + width: calc(var(--spacing) * 5); + height: calc(var(--spacing) * 5); + } + .size-5\.5 { + width: calc(var(--spacing) * 5.5); + height: calc(var(--spacing) * 5.5); + } + .size-6 { + width: calc(var(--spacing) * 6); + height: calc(var(--spacing) * 6); + } + .size-7 { + width: calc(var(--spacing) * 7); + height: calc(var(--spacing) * 7); + } + .size-8 { + width: calc(var(--spacing) * 8); + height: calc(var(--spacing) * 8); + } + .size-10 { + width: calc(var(--spacing) * 10); + height: calc(var(--spacing) * 10); + } + .size-11 { + width: calc(var(--spacing) * 11); + height: calc(var(--spacing) * 11); + } + .size-12 { + width: calc(var(--spacing) * 12); + height: calc(var(--spacing) * 12); + } + .size-13 { + width: calc(var(--spacing) * 13); + height: calc(var(--spacing) * 13); + } + .size-14 { + width: calc(var(--spacing) * 14); + height: calc(var(--spacing) * 14); + } + .size-15 { + width: calc(var(--spacing) * 15); + height: calc(var(--spacing) * 15); + } + .size-16 { + width: calc(var(--spacing) * 16); + height: calc(var(--spacing) * 16); + } + .size-20 { + width: calc(var(--spacing) * 20); + height: calc(var(--spacing) * 20); + } + .size-26 { + width: calc(var(--spacing) * 26); + height: calc(var(--spacing) * 26); + } + .size-30 { + width: calc(var(--spacing) * 30); + height: calc(var(--spacing) * 30); + } + .size-32 { + width: calc(var(--spacing) * 32); + height: calc(var(--spacing) * 32); + } + .size-52 { + width: calc(var(--spacing) * 52); + height: calc(var(--spacing) * 52); + } + .size-\[95\%\] { + width: 95%; + height: 95%; + } + .size-full { + width: 100%; + height: 100%; + } + .h-4 { + height: calc(var(--spacing) * 4); + } + .h-5 { + height: calc(var(--spacing) * 5); + } + .h-7 { + height: calc(var(--spacing) * 7); + } + .h-9 { + height: calc(var(--spacing) * 9); + } + .h-10 { + height: calc(var(--spacing) * 10); + } + .h-11\/12 { + height: 91.6667%; + } + .h-12 { + height: calc(var(--spacing) * 12); + } + .h-14 { + height: calc(var(--spacing) * 14); + } + .h-20 { + height: calc(var(--spacing) * 20); + } + .h-24 { + height: calc(var(--spacing) * 24); + } + .h-72 { + height: calc(var(--spacing) * 72); + } + .h-96 { + height: calc(var(--spacing) * 96); + } + .h-\[90\%\] { + height: 90%; + } + .h-full { + height: 100%; + } + .h-max { + height: max-content; + } + .h-px { + height: 1px; + } + .h-screen { + height: 100vh; + } + .max-h-11\/12 { + max-height: 91.6667%; + } + .max-h-80 { + max-height: calc(var(--spacing) * 80); + } + .max-h-\[25vh\] { + max-height: 25vh; + } + .max-h-\[70vh\] { + max-height: 70vh; + } + .max-h-\[97\%\] { + max-height: 97%; + } + .max-h-\[300px\] { + max-height: 300px; + } + .max-h-\[360px\] { + max-height: 360px; + } + .max-h-\[520px\] { + max-height: 520px; + } + .min-h-\[420px\] { + min-height: 420px; + } + .min-h-screen { + min-height: 100vh; + } + .loading-lg { + width: calc(var(--size-selector, 0.25rem) * 7); + } + .loading-md { + width: calc(var(--size-selector, 0.25rem) * 6); + } + .loading-sm { + width: calc(var(--size-selector, 0.25rem) * 5); + } + .loading-xl { + width: calc(var(--size-selector, 0.25rem) * 8); + } + .loading-xs { + width: calc(var(--size-selector, 0.25rem) * 4); + } + .w-7 { + width: calc(var(--spacing) * 7); + } + .w-8 { + width: calc(var(--spacing) * 8); + } + .w-11\/12 { + width: 91.6667%; + } + .w-16 { + width: calc(var(--spacing) * 16); + } + .w-24 { + width: calc(var(--spacing) * 24); + } + .w-32 { + width: calc(var(--spacing) * 32); + } + .w-40 { + width: calc(var(--spacing) * 40); + } + .w-44 { + width: calc(var(--spacing) * 44); + } + .w-46 { + width: calc(var(--spacing) * 46); + } + .w-52 { + width: calc(var(--spacing) * 52); + } + .w-70 { + width: calc(var(--spacing) * 70); + } + .w-\[min\(100vw-24px\,400px\)\] { + width: min(100vw - 24px, 400px); + } + .w-auto { + width: auto; + } + .w-full { + width: 100%; + } + .w-max { + width: max-content; + } + .w-px { + width: 1px; + } + .w-screen { + width: 100vw; + } + .max-w-2xl { + max-width: var(--container-2xl); + } + .max-w-3xl { + max-width: var(--container-3xl); + } + .max-w-4xl { + max-width: var(--container-4xl); + } + .max-w-7xl { + max-width: var(--container-7xl); + } + .max-w-11\/12 { + max-width: 91.6667%; + } + .max-w-16 { + max-width: calc(var(--spacing) * 16); + } + .max-w-54 { + max-width: calc(var(--spacing) * 54); + } + .max-w-74 { + max-width: calc(var(--spacing) * 74); + } + .max-w-\[1920px\] { + max-width: 1920px; + } + .max-w-\[calc\(100\%-2rem\)\] { + max-width: calc(100% - 2rem); + } + .max-w-full { + max-width: 100%; + } + .max-w-lg { + max-width: var(--container-lg); + } + .max-w-md { + max-width: var(--container-md); + } + .max-w-sm { + max-width: var(--container-sm); + } + .max-w-xl { + max-width: var(--container-xl); + } + .min-w-10 { + min-width: calc(var(--spacing) * 10); + } + .grow { + flex-grow: 1; + } + .translate-1\/2 { + --tw-translate-x: 50%; + --tw-translate-y: 50%; + translate: var(--tw-translate-x) var(--tw-translate-y); + } + .-translate-x-1\/2 { + --tw-translate-x: -50%; + translate: var(--tw-translate-x) var(--tw-translate-y); + } + .-translate-x-full { + --tw-translate-x: -100%; + translate: var(--tw-translate-x) var(--tw-translate-y); + } + .translate-x-\[-50\%\] { + --tw-translate-x: -50%; + translate: var(--tw-translate-x) var(--tw-translate-y); + } + .\!-translate-y-1\/2 { + --tw-translate-y: -50% !important; + translate: var(--tw-translate-x) var(--tw-translate-y) !important; + } + .-translate-y-1\/2 { + --tw-translate-y: -50%; + translate: var(--tw-translate-x) var(--tw-translate-y); + } + .-translate-y-\[87\%\] { + --tw-translate-y: -87%; + translate: var(--tw-translate-x) var(--tw-translate-y); + } + .translate-y-0\.5 { + --tw-translate-y: calc(var(--spacing) * 0.5); + translate: var(--tw-translate-x) var(--tw-translate-y); + } + .translate-y-1 { + --tw-translate-y: calc(var(--spacing) * 1); + translate: var(--tw-translate-x) var(--tw-translate-y); + } + .translate-y-1\/2 { + --tw-translate-y: 50%; + translate: var(--tw-translate-x) var(--tw-translate-y); + } + .translate-y-2 { + --tw-translate-y: calc(var(--spacing) * 2); + translate: var(--tw-translate-x) var(--tw-translate-y); + } + .translate-y-\[-50\%\] { + --tw-translate-y: -50%; + translate: var(--tw-translate-x) var(--tw-translate-y); + } + .scale-\[1\.02\] { + scale: 1.02; + } + .scale-\[3\] { + scale: 3; + } + .rotate-\[215deg\] { + rotate: 215deg; + } + .transform { + transform: var(--tw-rotate-x) var(--tw-rotate-y) var(--tw-rotate-z) + var(--tw-skew-x) var(--tw-skew-y); + } + .skeleton { + border-radius: var(--radius-box); + background-color: var(--color-base-300); + } + @media (prefers-reduced-motion: reduce) { + .skeleton { + transition-duration: 15s; + } + } + .skeleton { + will-change: background-position; + background-image: linear-gradient( + 105deg, + #0000 0% 40%, + var(--color-base-100) 50%, + #0000 60% 100% + ); + background-position-x: -50%; + background-repeat: no-repeat; + background-size: 200%; + animation: 1.8s ease-in-out infinite skeleton; + } + .animate-bounce { + animation: var(--animate-bounce); + } + .animate-caret-blink { + animation: 1.25s ease-out infinite caret-blink; + } + .animate-pulse { + animation: var(--animate-pulse); + } + .highlight-link a { + cursor: pointer; + color: var(--color-primary); + text-decoration-line: none; + } + .link { + cursor: pointer; + text-decoration-line: underline; + } + .link:focus { + --tw-outline-style: none; + outline-style: none; + } + @media (forced-colors: active) { + .link:focus { + outline-offset: 2px; + outline: 2px solid #0000; + } + } + .link:focus-visible { + outline-offset: 2px; + outline: 2px solid; + } + .cursor-auto { + cursor: auto; + } + .cursor-default { + cursor: default; + } + .cursor-eraser { + cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAFxJREFUeNq107EJACAMRFEHyxSu4jbuZ+0IyhUS4ZDogYEr3++Svp+ZDUzGrRTMIwKmiIApImCKiBgbOXOEcRxQsQcW7rVKeA9gj5gD2D3mgC/GcQSLMEdO+/qtE+/GV5duYCOPAAAAAElFTkSuQmCC) + 2 14, + default; + } + .cursor-not-allowed { + cursor: not-allowed; + } + .cursor-pencil { + cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAAXNSR0IArs4c6QAAAAJ0Uk5TAAB2k804AAAAKklEQVR42mOAAhsbCA3n//9vQ74ApqE2QIAgwIqBykFaICwMAQwt9HEpAIf2Me1Ro5Q9AAAAAElFTkSuQmCC) + 8 8, + default; + } + .cursor-pointer { + cursor: pointer; + } + .touch-none { + touch-action: none; + } + .resize { + resize: both; + } + .scroll-py-1 { + scroll-padding-block: calc(var(--spacing) * 1); + } + .grid-cols-1 { + grid-template-columns: repeat(1, minmax(0, 1fr)); + } + .grid-cols-2 { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + .grid-cols-3 { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + .grid-cols-8 { + grid-template-columns: repeat(8, minmax(0, 1fr)); + } + .grid-cols-\[350px_1fr\] { + grid-template-columns: 350px 1fr; + } + .flex-col { + flex-direction: column; + } + .flex-col-reverse { + flex-direction: column-reverse; + } + .flex-wrap { + flex-wrap: wrap; + } + .items-baseline { + align-items: baseline; + } + .items-center { + align-items: center; + } + .items-end { + align-items: flex-end; + } + .items-start { + align-items: flex-start; + } + .justify-between { + justify-content: space-between; + } + .justify-center { + justify-content: center; + } + .justify-end { + justify-content: flex-end; + } + .gap-0\.5 { + gap: calc(var(--spacing) * 0.5); + } + .gap-1 { + gap: calc(var(--spacing) * 1); + } + .gap-1\.5 { + gap: calc(var(--spacing) * 1.5); + } + .gap-2 { + gap: calc(var(--spacing) * 2); + } + .gap-3 { + gap: calc(var(--spacing) * 3); + } + .gap-4 { + gap: calc(var(--spacing) * 4); + } + .gap-5 { + gap: calc(var(--spacing) * 5); + } + .gap-6 { + gap: calc(var(--spacing) * 6); + } + .gap-\[8px\] { + gap: 8px; + } + .overflow-auto { + overflow: auto; + } + .overflow-hidden { + overflow: hidden; + } + .overflow-x-auto { + overflow-x: auto; + } + .overflow-x-hidden { + overflow-x: hidden; + } + .overflow-y-auto { + overflow-y: auto; + } + .tabs-box { + background-color: var(--color-base-200); + --tabs-box-radius: calc( + var(--radius-field) + var(--radius-field) + var(--radius-field) + ); + border-radius: calc( + var(--radius-field) + min(0.25rem, var(--tabs-box-radius)) + ); + box-shadow: 0 -0.5px oklch(100% 0 0 / calc(var(--depth) * 0.1)) inset, + 0 0.5px oklch(0% 0 0 / calc(var(--depth) * 0.05)) inset; + padding: 0.25rem; + } + .tabs-box .tab { + border-radius: var(--radius-field); + border-style: none; + } + .tabs-box .tab:focus-visible, + .tabs-box .tab:is(label:has(:checked:focus-visible)) { + outline-offset: 2px; + } + .tabs-box + > :is(.tab-active, [aria-selected="true"]):not(.tab-disabled, [disabled]), + .tabs-box > :is(input:checked), + .tabs-box > :is(label:has(:checked)) { + background-color: var(--tab-bg, var(--color-base-100)); + box-shadow: 0 1px oklch(100% 0 0 / calc(var(--depth) * 0.1)) inset, + 0 1px 1px -1px var(--color-neutral), 0 1px 6px -4px var(--color-neutral); + } + @supports (color: color-mix(in lab, red, red)) { + .tabs-box + > :is(.tab-active, [aria-selected="true"]):not(.tab-disabled, [disabled]), + .tabs-box > :is(input:checked), + .tabs-box > :is(label:has(:checked)) { + box-shadow: 0 1px oklch(100% 0 0 / calc(var(--depth) * 0.1)) inset, + 0 1px 1px -1px color-mix(in oklab, var(--color-neutral) + calc(var(--depth) * 50%), #0000), + 0 1px 6px -4px color-mix(in oklab, var(--color-neutral) + calc(var(--depth) * 100%), #0000); + } + } + @media (forced-colors: active) { + .tabs-box + > :is(.tab-active, [aria-selected="true"]):not(.tab-disabled, [disabled]), + .tabs-box > :is(input:checked), + .tabs-box > :is(label:has(:checked)) { + border: 1px solid; + } + } + .rounded-2xl { + border-radius: var(--radius-2xl); + } + .rounded-box { + border-radius: var(--radius-box); + } + .rounded-field { + border-radius: var(--radius-field); + } + .rounded-full { + border-radius: 3.40282e38px; + } + .rounded-lg { + border-radius: var(--radius-lg); + } + .rounded-md { + border-radius: var(--radius-md); + } + .rounded-sm { + border-radius: var(--radius-sm); + } + .rounded-xl { + border-radius: var(--radius-xl); + } + .rounded-xs { + border-radius: var(--radius-xs); + } + .rounded-t-box { + border-top-left-radius: var(--radius-box); + border-top-right-radius: var(--radius-box); + } + .\!border { + border-style: var(--tw-border-style) !important; + border-width: 1px !important; + } + .border { + border-style: var(--tw-border-style); + border-width: 1px; + } + .border-0 { + border-style: var(--tw-border-style); + border-width: 0; + } + .border-1 { + border-style: var(--tw-border-style); + border-width: 1px; + } + .border-2 { + border-style: var(--tw-border-style); + border-width: 2px; + } + .border-3 { + border-style: var(--tw-border-style); + border-width: 3px; + } + .border-4 { + border-style: var(--tw-border-style); + border-width: 4px; + } + .border-6 { + border-style: var(--tw-border-style); + border-width: 6px; + } + .border-y { + border-block-style: var(--tw-border-style); + border-block-width: 1px; + } + .border-t { + border-top-style: var(--tw-border-style); + border-top-width: 1px; + } + .border-r { + border-right-style: var(--tw-border-style); + border-right-width: 1px; + } + .border-b { + border-bottom-style: var(--tw-border-style); + border-bottom-width: 1px; + } + .badge-ghost { + border-color: var(--color-base-200); + background-color: var(--color-base-200); + color: var(--color-base-content); + background-image: none; + } + .badge-soft { + color: var(--badge-color, var(--color-base-content)); + background-color: var(--badge-color, var(--color-base-content)); + } + @supports (color: color-mix(in lab, red, red)) { + .badge-soft { + background-color: color-mix( + in oklab, + var(--badge-color, var(--color-base-content)) 8%, + var(--color-base-100) + ); + } + } + .badge-soft { + border-color: var(--badge-color, var(--color-base-content)); + } + @supports (color: color-mix(in lab, red, red)) { + .badge-soft { + border-color: color-mix( + in oklab, + var(--badge-color, var(--color-base-content)) 10%, + var(--color-base-100) + ); + } + } + .badge-soft { + background-image: none; + } + .badge-outline { + color: var(--badge-color); + --badge-bg: #0000; + background-image: none; + border-color: currentColor; + } + .\!border-primary\/60 { + border-color: var(--color-primary) !important; + } + @supports (color: color-mix(in lab, red, red)) { + .\!border-primary\/60 { + border-color: color-mix( + in oklab, + var(--color-primary) 60%, + transparent + ) !important; + } + } + .border-base-200 { + border-color: var(--color-base-200); + } + .border-base-300 { + border-color: var(--color-base-300); + } + .border-base-content\/10 { + border-color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .border-base-content\/10 { + border-color: color-mix( + in oklab, + var(--color-base-content) 10%, + transparent + ); + } + } + .border-base-content\/20 { + border-color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .border-base-content\/20 { + border-color: color-mix( + in oklab, + var(--color-base-content) 20%, + transparent + ); + } + } + .border-base-content\/30 { + border-color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .border-base-content\/30 { + border-color: color-mix( + in oklab, + var(--color-base-content) 30%, + transparent + ); + } + } + .border-black { + border-color: var(--color-black); + } + .border-primary { + border-color: var(--color-primary); + } + .border-red-500 { + border-color: var(--color-red-500); + } + .\!bg-base-300 { + background-color: var(--color-base-300) !important; + } + .\!bg-black\/80 { + background-color: #000c !important; + } + @supports (color: color-mix(in lab, red, red)) { + .\!bg-black\/80 { + background-color: color-mix( + in oklab, + var(--color-black) 80%, + transparent + ) !important; + } + } + .\!bg-black\/90 { + background-color: #000000e6 !important; + } + @supports (color: color-mix(in lab, red, red)) { + .\!bg-black\/90 { + background-color: color-mix( + in oklab, + var(--color-black) 90%, + transparent + ) !important; + } + } + .\!bg-primary { + background-color: var(--color-primary) !important; + } + .bg-\[\#5865F2\] { + background-color: #5865f2; + } + .bg-amber-500\/10 { + background-color: #f99c001a; + } + @supports (color: color-mix(in lab, red, red)) { + .bg-amber-500\/10 { + background-color: color-mix( + in oklab, + var(--color-amber-500) 10%, + transparent + ); + } + } + .bg-base-100, + .bg-base-100\/60 { + background-color: var(--color-base-100); + } + @supports (color: color-mix(in lab, red, red)) { + .bg-base-100\/60 { + background-color: color-mix( + in oklab, + var(--color-base-100) 60%, + transparent + ); + } + } + .bg-base-100\/70 { + background-color: var(--color-base-100); + } + @supports (color: color-mix(in lab, red, red)) { + .bg-base-100\/70 { + background-color: color-mix( + in oklab, + var(--color-base-100) 70%, + transparent + ); + } + } + .bg-base-200 { + background-color: var(--color-base-200); + } + .bg-base-300 { + background-color: var(--color-base-300); + } + .bg-base-content\/10 { + background-color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .bg-base-content\/10 { + background-color: color-mix( + in oklab, + var(--color-base-content) 10%, + transparent + ); + } + } + .bg-base-content\/20 { + background-color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .bg-base-content\/20 { + background-color: color-mix( + in oklab, + var(--color-base-content) 20%, + transparent + ); + } + } + .bg-base-content\/80 { + background-color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .bg-base-content\/80 { + background-color: color-mix( + in oklab, + var(--color-base-content) 80%, + transparent + ); + } + } + .bg-black { + background-color: var(--color-black); + } + .bg-black\/50 { + background-color: #00000080; + } + @supports (color: color-mix(in lab, red, red)) { + .bg-black\/50 { + background-color: color-mix( + in oklab, + var(--color-black) 50%, + transparent + ); + } + } + .bg-blue-500\/10 { + background-color: #3080ff1a; + } + @supports (color: color-mix(in lab, red, red)) { + .bg-blue-500\/10 { + background-color: color-mix( + in oklab, + var(--color-blue-500) 10%, + transparent + ); + } + } + .bg-cyan-500\/10 { + background-color: #00b7d71a; + } + @supports (color: color-mix(in lab, red, red)) { + .bg-cyan-500\/10 { + background-color: color-mix( + in oklab, + var(--color-cyan-500) 10%, + transparent + ); + } + } + .bg-emerald-500\/10 { + background-color: #00bb7f1a; + } + @supports (color: color-mix(in lab, red, red)) { + .bg-emerald-500\/10 { + background-color: color-mix( + in oklab, + var(--color-emerald-500) 10%, + transparent + ); + } + } + .bg-fuchsia-500\/10 { + background-color: #e12afb1a; + } + @supports (color: color-mix(in lab, red, red)) { + .bg-fuchsia-500\/10 { + background-color: color-mix( + in oklab, + var(--color-fuchsia-500) 10%, + transparent + ); + } + } + .bg-green-500\/10 { + background-color: #00c7581a; + } + @supports (color: color-mix(in lab, red, red)) { + .bg-green-500\/10 { + background-color: color-mix( + in oklab, + var(--color-green-500) 10%, + transparent + ); + } + } + .bg-green-600 { + background-color: var(--color-green-600); + } + .bg-indigo-500\/10 { + background-color: #625fff1a; + } + @supports (color: color-mix(in lab, red, red)) { + .bg-indigo-500\/10 { + background-color: color-mix( + in oklab, + var(--color-indigo-500) 10%, + transparent + ); + } + } + .bg-lime-500\/10 { + background-color: #80cd001a; + } + @supports (color: color-mix(in lab, red, red)) { + .bg-lime-500\/10 { + background-color: color-mix( + in oklab, + var(--color-lime-500) 10%, + transparent + ); + } + } + .bg-orange-500\/10 { + background-color: #fe6e001a; + } + @supports (color: color-mix(in lab, red, red)) { + .bg-orange-500\/10 { + background-color: color-mix( + in oklab, + var(--color-orange-500) 10%, + transparent + ); + } + } + .bg-pink-500\/10 { + background-color: #f6339a1a; + } + @supports (color: color-mix(in lab, red, red)) { + .bg-pink-500\/10 { + background-color: color-mix( + in oklab, + var(--color-pink-500) 10%, + transparent + ); + } + } + .bg-primary\/10 { + background-color: var(--color-primary); + } + @supports (color: color-mix(in lab, red, red)) { + .bg-primary\/10 { + background-color: color-mix( + in oklab, + var(--color-primary) 10%, + transparent + ); + } + } + .bg-purple-500\/10 { + background-color: #ac4bff1a; + } + @supports (color: color-mix(in lab, red, red)) { + .bg-purple-500\/10 { + background-color: color-mix( + in oklab, + var(--color-purple-500) 10%, + transparent + ); + } + } + .bg-red-500 { + background-color: var(--color-red-500); + } + .bg-red-500\/10 { + background-color: #fb2c361a; + } + @supports (color: color-mix(in lab, red, red)) { + .bg-red-500\/10 { + background-color: color-mix( + in oklab, + var(--color-red-500) 10%, + transparent + ); + } + } + .bg-rose-500\/10 { + background-color: #ff23571a; + } + @supports (color: color-mix(in lab, red, red)) { + .bg-rose-500\/10 { + background-color: color-mix( + in oklab, + var(--color-rose-500) 10%, + transparent + ); + } + } + .bg-secondary { + background-color: var(--color-secondary); + } + .bg-sky-500\/10 { + background-color: #00a5ef1a; + } + @supports (color: color-mix(in lab, red, red)) { + .bg-sky-500\/10 { + background-color: color-mix( + in oklab, + var(--color-sky-500) 10%, + transparent + ); + } + } + .bg-teal-500\/10 { + background-color: #00baa71a; + } + @supports (color: color-mix(in lab, red, red)) { + .bg-teal-500\/10 { + background-color: color-mix( + in oklab, + var(--color-teal-500) 10%, + transparent + ); + } + } + .bg-transparent { + background-color: #0000; + } + .bg-violet-500\/10 { + background-color: #8d54ff1a; + } + @supports (color: color-mix(in lab, red, red)) { + .bg-violet-500\/10 { + background-color: color-mix( + in oklab, + var(--color-violet-500) 10%, + transparent + ); + } + } + .bg-warning { + background-color: var(--color-warning); + } + .bg-yellow-500\/10 { + background-color: #edb2001a; + } + @supports (color: color-mix(in lab, red, red)) { + .bg-yellow-500\/10 { + background-color: color-mix( + in oklab, + var(--color-yellow-500) 10%, + transparent + ); + } + } + .loading-dots { + -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='4' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' keySplines='.33,0,.66,.33;.33,.66,.66,1'/%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' keySplines='.33,0,.66,.33;.33,.66,.66,1' begin='0.1s'/%3E%3C/circle%3E%3Ccircle cx='20' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' keySplines='.33,0,.66,.33;.33,.66,.66,1' begin='0.2s'/%3E%3C/circle%3E%3C/svg%3E"); + mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='4' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' keySplines='.33,0,.66,.33;.33,.66,.66,1'/%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' keySplines='.33,0,.66,.33;.33,.66,.66,1' begin='0.1s'/%3E%3C/circle%3E%3Ccircle cx='20' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' keySplines='.33,0,.66,.33;.33,.66,.66,1' begin='0.2s'/%3E%3C/circle%3E%3C/svg%3E"); + } + .loading-spinner { + -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E"); + mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E"); + } + .fill-blue-800 { + fill: var(--color-blue-800); + } + .fill-primary { + fill: var(--color-primary); + } + .fill-red-400 { + fill: var(--color-red-400); + } + .checkbox-sm { + --size: calc(var(--size-selector, 0.25rem) * 5); + padding: 0.1875rem; + } + .checkbox-xs { + --size: calc(var(--size-selector, 0.25rem) * 4); + padding: 0.125rem; + } + .radio-sm { + padding: 0.1875rem; + } + .radio-sm[type="radio"] { + --size: calc(var(--size-selector, 0.25rem) * 5); + } + .p-0 { + padding: calc(var(--spacing) * 0); + } + .p-1 { + padding: calc(var(--spacing) * 1); + } + .p-2 { + padding: calc(var(--spacing) * 2); + } + .p-2\.5 { + padding: calc(var(--spacing) * 2.5); + } + .p-3 { + padding: calc(var(--spacing) * 3); + } + .p-4 { + padding: calc(var(--spacing) * 4); + } + .p-6 { + padding: calc(var(--spacing) * 6); + } + .table-sm :not(thead, tfoot) tr { + font-size: 0.75rem; + } + .table-sm :where(th, td) { + padding-block: 0.5rem; + padding-inline: 0.75rem; + } + .badge-lg { + --size: calc(var(--size-selector, 0.25rem) * 7); + padding-inline: calc(0.25rem * 3.5 - var(--border)); + font-size: 1rem; + } + .badge-sm { + --size: calc(var(--size-selector, 0.25rem) * 5); + padding-inline: calc(0.25rem * 2.5 - var(--border)); + font-size: 0.75rem; + } + .badge-xs { + --size: calc(var(--size-selector, 0.25rem) * 4); + padding-inline: calc(0.25rem * 2 - var(--border)); + font-size: 0.625rem; + } + .px-0 { + padding-inline: calc(var(--spacing) * 0); + } + .px-1 { + padding-inline: calc(var(--spacing) * 1); + } + .px-2 { + padding-inline: calc(var(--spacing) * 2); + } + .px-3 { + padding-inline: calc(var(--spacing) * 3); + } + .px-4 { + padding-inline: calc(var(--spacing) * 4); + } + .px-6 { + padding-inline: calc(var(--spacing) * 6); + } + .px-\[5px\] { + padding-inline: 5px; + } + .py-0 { + padding-block: calc(var(--spacing) * 0); + } + .py-1 { + padding-block: calc(var(--spacing) * 1); + } + .py-1\.5 { + padding-block: calc(var(--spacing) * 1.5); + } + .py-2 { + padding-block: calc(var(--spacing) * 2); + } + .py-3 { + padding-block: calc(var(--spacing) * 3); + } + .py-4 { + padding-block: calc(var(--spacing) * 4); + } + .py-6 { + padding-block: calc(var(--spacing) * 6); + } + .pt-1 { + padding-top: calc(var(--spacing) * 1); + } + .pt-2 { + padding-top: calc(var(--spacing) * 2); + } + .pt-3 { + padding-top: calc(var(--spacing) * 3); + } + .pt-4 { + padding-top: calc(var(--spacing) * 4); + } + .pt-6 { + padding-top: calc(var(--spacing) * 6); + } + .pt-20 { + padding-top: calc(var(--spacing) * 20); + } + .pr-1 { + padding-right: calc(var(--spacing) * 1); + } + .pr-2 { + padding-right: calc(var(--spacing) * 2); + } + .pr-2\.5 { + padding-right: calc(var(--spacing) * 2.5); + } + .pr-8 { + padding-right: calc(var(--spacing) * 8); + } + .pb-0\.5 { + padding-bottom: calc(var(--spacing) * 0.5); + } + .pb-1 { + padding-bottom: calc(var(--spacing) * 1); + } + .pb-2 { + padding-bottom: calc(var(--spacing) * 2); + } + .pb-3 { + padding-bottom: calc(var(--spacing) * 3); + } + .pb-4 { + padding-bottom: calc(var(--spacing) * 4); + } + .pb-6 { + padding-bottom: calc(var(--spacing) * 6); + } + .pb-8 { + padding-bottom: calc(var(--spacing) * 8); + } + .pl-1 { + padding-left: calc(var(--spacing) * 1); + } + .pl-4 { + padding-left: calc(var(--spacing) * 4); + } + .pl-12\! { + padding-left: calc(var(--spacing) * 12) !important; + } + .text-center { + text-align: center; + } + .text-left { + text-align: left; + } + .text-right { + text-align: right; + } + .text-start { + text-align: start; + } + .font-flag { + font-family: "Noto Color Emoji", "Geist", var(--font-sans); + } + .font-mono { + font-family: var(--font-mono); + } + .font-pixel { + font-family: "Pixelify Sans", var(--font-sans); + } + .text-2xl { + font-size: var(--text-2xl); + line-height: var(--tw-leading, var(--text-2xl--line-height)); + } + .text-3xl { + font-size: var(--text-3xl); + line-height: var(--tw-leading, var(--text-3xl--line-height)); + } + .text-4xl { + font-size: var(--text-4xl); + line-height: var(--tw-leading, var(--text-4xl--line-height)); + } + .text-5xl { + font-size: var(--text-5xl); + line-height: var(--tw-leading, var(--text-5xl--line-height)); + } + .text-7xl { + font-size: var(--text-7xl); + line-height: var(--tw-leading, var(--text-7xl--line-height)); + } + .text-base { + font-size: var(--text-base); + line-height: var(--tw-leading, var(--text-base--line-height)); + } + .text-lg { + font-size: var(--text-lg); + line-height: var(--tw-leading, var(--text-lg--line-height)); + } + .text-sm { + font-size: var(--text-sm); + line-height: var(--tw-leading, var(--text-sm--line-height)); + } + .text-xl { + font-size: var(--text-xl); + line-height: var(--tw-leading, var(--text-xl--line-height)); + } + .text-xs { + font-size: var(--text-xs); + line-height: var(--tw-leading, var(--text-xs--line-height)); + } + .kbd-sm { + --size: calc(var(--size-selector, 0.25rem) * 5); + font-size: 0.75rem; + } + .kbd-xs { + --size: calc(var(--size-selector, 0.25rem) * 4); + font-size: 0.625rem; + } + .select-sm { + --size: calc(var(--size-field, 0.25rem) * 8); + font-size: 0.75rem; + } + .text-\[10px\] { + font-size: 10px; + } + .leading-none { + --tw-leading: 1; + line-height: 1; + } + .font-bold { + --tw-font-weight: var(--font-weight-bold); + font-weight: var(--font-weight-bold); + } + .font-extrabold { + --tw-font-weight: var(--font-weight-extrabold); + font-weight: var(--font-weight-extrabold); + } + .font-medium { + --tw-font-weight: var(--font-weight-medium); + font-weight: var(--font-weight-medium); + } + .font-normal { + --tw-font-weight: var(--font-weight-normal); + font-weight: var(--font-weight-normal); + } + .font-semibold { + --tw-font-weight: var(--font-weight-semibold); + font-weight: var(--font-weight-semibold); + } + .tracking-widest { + --tw-tracking: var(--tracking-widest); + letter-spacing: var(--tracking-widest); + } + .text-nowrap { + text-wrap: nowrap; + } + .break-words { + overflow-wrap: break-word; + } + .text-ellipsis { + text-overflow: ellipsis; + } + .whitespace-nowrap { + white-space: nowrap; + } + .whitespace-pre-line { + white-space: pre-line; + } + .whitespace-pre-wrap { + white-space: pre-wrap; + } + .\!text-primary-content { + color: var(--color-primary-content) !important; + } + .text-amber-500 { + color: var(--color-amber-500); + } + .text-amber-600 { + color: var(--color-amber-600); + } + .text-base-content, + .text-base-content\/20 { + color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .text-base-content\/20 { + color: color-mix(in oklab, var(--color-base-content) 20%, transparent); + } + } + .text-base-content\/50 { + color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .text-base-content\/50 { + color: color-mix(in oklab, var(--color-base-content) 50%, transparent); + } + } + .text-base-content\/60 { + color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .text-base-content\/60 { + color: color-mix(in oklab, var(--color-base-content) 60%, transparent); + } + } + .text-base-content\/70 { + color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .text-base-content\/70 { + color: color-mix(in oklab, var(--color-base-content) 70%, transparent); + } + } + .text-base-content\/80 { + color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .text-base-content\/80 { + color: color-mix(in oklab, var(--color-base-content) 80%, transparent); + } + } + .text-black { + color: var(--color-black); + } + .text-blue-500 { + color: var(--color-blue-500); + } + .text-blue-600 { + color: var(--color-blue-600); + } + .text-cyan-500 { + color: var(--color-cyan-500); + } + .text-emerald-500 { + color: var(--color-emerald-500); + } + .text-error { + color: var(--color-error); + } + .text-fuchsia-500 { + color: var(--color-fuchsia-500); + } + .text-green-100 { + color: var(--color-green-100); + } + .text-green-500 { + color: var(--color-green-500); + } + .text-indigo-500 { + color: var(--color-indigo-500); + } + .text-lime-500 { + color: var(--color-lime-500); + } + .text-orange-500 { + color: var(--color-orange-500); + } + .text-pink-500 { + color: var(--color-pink-500); + } + .text-primary { + color: var(--color-primary); + } + .text-primary-content { + color: var(--color-primary-content); + } + .text-primary\/80 { + color: var(--color-primary); + } + @supports (color: color-mix(in lab, red, red)) { + .text-primary\/80 { + color: color-mix(in oklab, var(--color-primary) 80%, transparent); + } + } + .text-purple-500 { + color: var(--color-purple-500); + } + .text-red-400 { + color: var(--color-red-400); + } + .text-red-500 { + color: var(--color-red-500); + } + .text-red-600 { + color: var(--color-red-600); + } + .text-rose-500 { + color: var(--color-rose-500); + } + .text-secondary { + color: var(--color-secondary); + } + .text-sky-500 { + color: var(--color-sky-500); + } + .text-success { + color: var(--color-success); + } + .text-teal-500 { + color: var(--color-teal-500); + } + .text-violet-500 { + color: var(--color-violet-500); + } + .text-warning-content { + color: var(--color-warning-content); + } + .text-white { + color: var(--color-white); + } + .text-yellow-400 { + color: var(--color-yellow-400); + } + .text-yellow-500 { + color: var(--color-yellow-500); + } + .capitalize { + text-transform: capitalize; + } + .uppercase { + text-transform: uppercase; + } + .underline { + text-decoration-line: underline; + } + .opacity-30 { + opacity: 0.3; + } + .opacity-50 { + opacity: 0.5; + } + .opacity-70 { + opacity: 0.7; + } + .opacity-80 { + opacity: 0.8; + } + .\!shadow-md { + --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, #0000001a), + 0 2px 4px -2px var(--tw-shadow-color, #0000001a) !important; + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), + var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important; + } + .shadow { + --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, #0000001a), + 0 1px 2px -1px var(--tw-shadow-color, #0000001a); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), + var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + .shadow-lg { + --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, #0000001a), + 0 4px 6px -4px var(--tw-shadow-color, #0000001a); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), + var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + .shadow-md { + --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, #0000001a), + 0 2px 4px -2px var(--tw-shadow-color, #0000001a); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), + var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + .shadow-sm { + --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, #0000001a), + 0 1px 2px -1px var(--tw-shadow-color, #0000001a); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), + var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + .shadow-xl { + --tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, #0000001a), + 0 8px 10px -6px var(--tw-shadow-color, #0000001a); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), + var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + .ring-2 { + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 + calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), + var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + .ring-base-content\/40 { + --tw-ring-color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .ring-base-content\/40 { + --tw-ring-color: color-mix( + in oklab, + var(--color-base-content) 40%, + transparent + ); + } + } + .ring-primary { + --tw-ring-color: var(--color-primary); + } + .outline-hidden { + --tw-outline-style: none; + outline-style: none; + } + @media (forced-colors: active) { + .outline-hidden { + outline-offset: 2px; + outline: 2px solid #0000; + } + } + .btn-ghost:not(.btn-active, :hover, :active:focus, :focus-visible) { + --btn-shadow: ""; + --btn-bg: #0000; + --btn-border: #0000; + --btn-noise: none; + } + .btn-ghost:not(.btn-active, :hover, :active:focus, :focus-visible):not( + :disabled, + [disabled], + .btn-disabled + ) { + --btn-fg: currentColor; + outline-color: currentColor; + } + @media (hover: none) { + .btn-ghost:hover:not( + .btn-active, + :active, + :focus-visible, + :disabled, + [disabled], + .btn-disabled + ) { + --btn-shadow: ""; + --btn-bg: #0000; + --btn-border: #0000; + --btn-noise: none; + --btn-fg: currentColor; + } + } + .backdrop-blur-sm { + --tw-backdrop-blur: blur(var(--blur-sm)); + -webkit-backdrop-filter: var(--tw-backdrop-blur) + var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) + var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) + var(--tw-backdrop-invert) var(--tw-backdrop-opacity) + var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); + backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) + var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) + var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) + var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) + var(--tw-backdrop-sepia); + } + .transition { + transition-property: color, background-color, border-color, outline-color, + text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, + --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, + filter, -webkit-backdrop-filter, backdrop-filter, display, visibility, + content-visibility, overlay, pointer-events; + transition-timing-function: var( + --tw-ease, + var(--default-transition-timing-function) + ); + transition-duration: var(--tw-duration, var(--default-transition-duration)); + } + .transition-all { + transition-property: all; + transition-timing-function: var( + --tw-ease, + var(--default-transition-timing-function) + ); + transition-duration: var(--tw-duration, var(--default-transition-duration)); + } + .transition-opacity { + transition-property: opacity; + transition-timing-function: var( + --tw-ease, + var(--default-transition-timing-function) + ); + transition-duration: var(--tw-duration, var(--default-transition-duration)); + } + .duration-200 { + --tw-duration: 0.2s; + transition-duration: 0.2s; + } + .duration-1000 { + --tw-duration: 1s; + transition-duration: 1s; + } + .btn-outline:not( + .btn-active, + :hover, + :active:focus, + :focus-visible, + :disabled, + [disabled], + .btn-disabled, + :checked + ) { + --btn-shadow: ""; + --btn-bg: #0000; + --btn-fg: var(--btn-color); + --btn-border: var(--btn-color); + --btn-noise: none; + } + @media (hover: none) { + .btn-outline:hover:not( + .btn-active, + :active, + :focus-visible, + :disabled, + [disabled], + .btn-disabled, + :checked + ) { + --btn-shadow: ""; + --btn-bg: #0000; + --btn-fg: var(--btn-color); + --btn-border: var(--btn-color); + --btn-noise: none; + } + } + .btn-soft:not( + .btn-active, + :hover, + :active:focus, + :focus-visible, + :disabled, + [disabled], + .btn-disabled + ) { + --btn-shadow: ""; + --btn-fg: var(--btn-color, var(--color-base-content)); + --btn-bg: var(--btn-color, var(--color-base-content)); + } + @supports (color: color-mix(in lab, red, red)) { + .btn-soft:not( + .btn-active, + :hover, + :active:focus, + :focus-visible, + :disabled, + [disabled], + .btn-disabled + ) { + --btn-bg: color-mix( + in oklab, + var(--btn-color, var(--color-base-content)) 8%, + var(--color-base-100) + ); + } + } + .btn-soft:not( + .btn-active, + :hover, + :active:focus, + :focus-visible, + :disabled, + [disabled], + .btn-disabled + ) { + --btn-border: var(--btn-color, var(--color-base-content)); + } + @supports (color: color-mix(in lab, red, red)) { + .btn-soft:not( + .btn-active, + :hover, + :active:focus, + :focus-visible, + :disabled, + [disabled], + .btn-disabled + ) { + --btn-border: color-mix( + in oklab, + var(--btn-color, var(--color-base-content)) 10%, + var(--color-base-100) + ); + } + } + .btn-soft:not( + .btn-active, + :hover, + :active:focus, + :focus-visible, + :disabled, + [disabled], + .btn-disabled + ) { + --btn-noise: none; + } + @media (hover: none) { + .btn-soft:hover:not( + .btn-active, + :active, + :focus-visible, + :disabled, + [disabled], + .btn-disabled + ) { + --btn-shadow: ""; + --btn-fg: var(--btn-color, var(--color-base-content)); + --btn-bg: var(--btn-color, var(--color-base-content)); + } + @supports (color: color-mix(in lab, red, red)) { + .btn-soft:hover:not( + .btn-active, + :active, + :focus-visible, + :disabled, + [disabled], + .btn-disabled + ) { + --btn-bg: color-mix( + in oklab, + var(--btn-color, var(--color-base-content)) 8%, + var(--color-base-100) + ); + } + } + .btn-soft:hover:not( + .btn-active, + :active, + :focus-visible, + :disabled, + [disabled], + .btn-disabled + ) { + --btn-border: var(--btn-color, var(--color-base-content)); + } + @supports (color: color-mix(in lab, red, red)) { + .btn-soft:hover:not( + .btn-active, + :active, + :focus-visible, + :disabled, + [disabled], + .btn-disabled + ) { + --btn-border: color-mix( + in oklab, + var(--btn-color, var(--color-base-content)) 10%, + var(--color-base-100) + ); + } + } + .btn-soft:hover:not( + .btn-active, + :active, + :focus-visible, + :disabled, + [disabled], + .btn-disabled + ) { + --btn-noise: none; + } + } + .indicator-center { + --indicator-s: 50%; + --indicator-e: 50%; + --indicator-x: -50%; + } + [dir="rtl"] .indicator-center { + --indicator-x: 50%; + } + .btn-lg { + --fontsize: 1.125rem; + --btn-p: 1.25rem; + --size: calc(var(--size-field, 0.25rem) * 12); + } + .btn-sm { + --fontsize: 0.75rem; + --btn-p: 0.75rem; + --size: calc(var(--size-field, 0.25rem) * 8); + } + .btn-xl { + --fontsize: 1.375rem; + --btn-p: 1.5rem; + --size: calc(var(--size-field, 0.25rem) * 14); + } + .btn-xs { + --fontsize: 0.6875rem; + --btn-p: 0.5rem; + --size: calc(var(--size-field, 0.25rem) * 6); + } + .indicator-bottom { + --indicator-t: auto; + --indicator-b: 0; + --indicator-y: 50%; + } + .pixelated { + image-rendering: pixelated; + image-rendering: -moz-crisp-edges; + image-rendering: crisp-edges; + } + .badge-error { + --badge-color: var(--color-error); + --badge-fg: var(--color-error-content); + } + .badge-primary { + --badge-color: var(--color-primary); + --badge-fg: var(--color-primary-content); + } + .badge-secondary { + --badge-color: var(--color-secondary); + --badge-fg: var(--color-secondary-content); + } + .badge-success { + --badge-color: var(--color-success); + --badge-fg: var(--color-success-content); + } + .badge-warning { + --badge-color: var(--color-warning); + --badge-fg: var(--color-warning-content); + } + .btn-error { + --btn-color: var(--color-error); + --btn-fg: var(--color-error-content); + } + .btn-primary { + --btn-color: var(--color-primary); + --btn-fg: var(--color-primary-content); + } + .btn-success { + --btn-color: var(--color-success); + --btn-fg: var(--color-success-content); + } + .btn-warning { + --btn-color: var(--color-warning); + --btn-fg: var(--color-warning-content); + } + .select-none { + -webkit-user-select: none; + user-select: none; + } + .input-error, + .input-error:focus, + .input-error:focus-within, + .textarea-error, + .textarea-error:focus, + .textarea-error:focus-within { + --input-color: var(--color-error); + } + .not-hover\:text-error:not(:hover) { + color: var(--color-error); + } + @media not all and (hover: hover) { + .not-hover\:text-error { + color: var(--color-error); + } + } + @media not all and (pointer: coarse) { + .not-touchscreen\:hidden { + display: none; + } + .not-touchscreen\:-translate-x-\[10\%\] { + --tw-translate-x: -10%; + translate: var(--tw-translate-x) var(--tw-translate-y); + } + } + @media not all and (display-mode: standalone) { + .not-pwa\:hidden { + display: none; + } + } + .not-stuck\:border-transparent:not(.stuck) { + border-color: #0000; + } + .peer-focus\:block:is(:where(.peer):focus ~ *) { + display: block; + } + .before\:-translate-x-1\/3:before { + content: var(--tw-content); + --tw-translate-x: calc(calc(1 / 3 * 100%) * -1); + translate: var(--tw-translate-x) var(--tw-translate-y); + } + .before\:-translate-x-1\/4:before { + content: var(--tw-content); + --tw-translate-x: -25%; + translate: var(--tw-translate-x) var(--tw-translate-y); + } + .before\:translate-x-1\/3:before { + content: var(--tw-content); + --tw-translate-x: calc(1 / 3 * 100%); + translate: var(--tw-translate-x) var(--tw-translate-y); + } + .before\:translate-x-1\/4:before { + content: var(--tw-content); + --tw-translate-x: 25%; + translate: var(--tw-translate-x) var(--tw-translate-y); + } + .first\:rounded-l-md:first-child { + border-top-left-radius: var(--radius-md); + border-bottom-left-radius: var(--radius-md); + } + .first\:border-l:first-child { + border-left-style: var(--tw-border-style); + border-left-width: 1px; + } + .last\:rounded-r-md:last-child { + border-top-right-radius: var(--radius-md); + border-bottom-right-radius: var(--radius-md); + } + @media (hover: hover) { + .hover\:bg-base-200:hover { + background-color: var(--color-base-200); + } + .hover\:text-primary:hover { + color: var(--color-primary); + } + .hover\:opacity-100:hover { + opacity: 1; + } + .hover\:brightness-95:hover { + --tw-brightness: brightness(95%); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) + var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) + var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); + } + .hover\:brightness-105:hover { + --tw-brightness: brightness(105%); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) + var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) + var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); + } + } + .focus\:ring-2:focus { + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 + calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), + var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + .focus\:ring-offset-2:focus { + --tw-ring-offset-width: 2px; + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 + var(--tw-ring-offset-width) var(--tw-ring-offset-color); + } + .focus\:outline-hidden:focus { + --tw-outline-style: none; + outline-style: none; + } + @media (forced-colors: active) { + .focus\:outline-hidden:focus { + outline-offset: 2px; + outline: 2px solid #0000; + } + } + .disabled\:pointer-events-none:disabled { + pointer-events: none; + } + .disabled\:cursor-not-allowed:disabled { + cursor: not-allowed; + } + .disabled\:opacity-50:disabled, + .has-\[\:disabled\]\:opacity-50:has(:disabled) { + opacity: 0.5; + } + .aria-selected\:bg-accent[aria-selected="true"] { + background-color: var(--color-accent); + } + .aria-selected\:bg-base-300[aria-selected="true"] { + background-color: var(--color-base-300); + } + .data-\[disabled\]\:pointer-events-none[data-disabled] { + pointer-events: none; + } + .data-\[disabled\]\:opacity-50[data-disabled] { + opacity: 0.5; + } + .data-\[disabled\=true\]\:pointer-events-none[data-disabled="true"] { + pointer-events: none; + } + .data-\[disabled\=true\]\:opacity-50[data-disabled="true"] { + opacity: 0.5; + } + :is( + .\*\*\:data-\[slot\=command-input-wrapper\]\:h-12 * + )[data-slot="command-input-wrapper"] { + height: calc(var(--spacing) * 12); + } + .data-\[state\=closed\]\:animate-out[data-state="closed"] { + animation: exit var(--tw-animation-duration, var(--tw-duration, 0.15s)) + var(--tw-ease, ease) var(--tw-animation-delay, 0s) + var(--tw-animation-iteration-count, 1) + var(--tw-animation-direction, normal) var(--tw-animation-fill-mode, none); + } + .data-\[state\=closed\]\:fade-out-0[data-state="closed"] { + --tw-exit-opacity: 0; + } + .data-\[state\=closed\]\:zoom-out-95[data-state="closed"] { + --tw-exit-scale: 0.95; + } + .data-\[state\=open\]\:animate-in[data-state="open"] { + animation: enter var(--tw-animation-duration, var(--tw-duration, 0.15s)) + var(--tw-ease, ease) var(--tw-animation-delay, 0s) + var(--tw-animation-iteration-count, 1) + var(--tw-animation-direction, normal) var(--tw-animation-fill-mode, none); + } + .data-\[state\=open\]\:fade-in-0[data-state="open"] { + --tw-enter-opacity: 0; + } + .data-\[state\=open\]\:zoom-in-95[data-state="open"] { + --tw-enter-scale: 0.95; + } + @media not all and (min-width: 400px) { + .max-\[400px\]\:hidden { + display: none; + } + } + @media not all and (min-width: 380px) { + .max-\[380px\]\:px-3 { + padding-inline: calc(var(--spacing) * 3); + } + } + @media not all and (min-width: 80rem) { + .max-xl\:before\:-translate-x-1\/4:before { + content: var(--tw-content); + --tw-translate-x: -25%; + translate: var(--tw-translate-x) var(--tw-translate-y); + } + .max-xl\:before\:translate-x-1\/4:before { + content: var(--tw-content); + --tw-translate-x: 25%; + translate: var(--tw-translate-x) var(--tw-translate-y); + } + } + @media not all and (min-width: 64rem) { + .max-lg\:pointer-events-none { + pointer-events: none; + } + .max-lg\:invisible { + visibility: hidden; + } + } + @media not all and (min-width: 40rem) { + .max-sm\:absolute { + position: absolute; + } + .max-sm\:dropdown-left { + --anchor-h: left; + --anchor-v: span-bottom; + } + .max-sm\:dropdown-left .dropdown-content { + transform-origin: 100%; + inset-inline-end: 100%; + top: 0; + bottom: auto; + } + .max-sm\:dropdown-top { + --anchor-v: top; + } + .max-sm\:dropdown-top .dropdown-content { + transform-origin: bottom; + top: auto; + bottom: 100%; + } + .max-sm\:bottom-4 { + bottom: calc(var(--spacing) * 4); + } + .max-sm\:mt-1 { + margin-top: calc(var(--spacing) * 1); + } + .max-sm\:mt-4 { + margin-top: calc(var(--spacing) * 4); + } + .max-sm\:ml-2 { + margin-left: calc(var(--spacing) * 2); + } + .max-sm\:hidden { + display: none; + } + .max-sm\:size-6 { + width: calc(var(--spacing) * 6); + height: calc(var(--spacing) * 6); + } + .max-sm\:size-full { + width: 100%; + height: 100%; + } + .max-sm\:h-6 { + height: calc(var(--spacing) * 6); + } + .max-sm\:h-10 { + height: calc(var(--spacing) * 10); + } + .max-sm\:w-\[calc\(100\%-2rem\)\] { + width: calc(100% - 2rem); + } + .max-sm\:max-w-32 { + max-width: calc(var(--spacing) * 32); + } + .max-sm\:overflow-hidden { + overflow: hidden; + } + .max-sm\:overflow-x-hidden { + overflow-x: hidden; + } + .max-sm\:rounded-md { + border-radius: var(--radius-md); + } + .max-sm\:rounded-none { + border-radius: 0; + } + .max-sm\:px-1 { + padding-inline: calc(var(--spacing) * 1); + } + .max-sm\:px-3 { + padding-inline: calc(var(--spacing) * 3); + } + .max-sm\:px-4 { + padding-inline: calc(var(--spacing) * 4); + } + .max-sm\:py-5 { + padding-block: calc(var(--spacing) * 5); + } + .max-sm\:pb-4 { + padding-bottom: calc(var(--spacing) * 4); + } + .max-sm\:text-sm { + font-size: var(--text-sm); + line-height: var(--tw-leading, var(--text-sm--line-height)); + } + .max-sm\:text-xl { + font-size: var(--text-xl); + line-height: var(--tw-leading, var(--text-xl--line-height)); + } + .max-sm\:tabs-xs { + --tab-height: calc(var(--size-field, 0.25rem) * 6); + } + .max-sm\:tabs-xs :where(.tab) { + --tab-p: 0.375rem; + --tab-radius-min: calc(0.5rem - var(--border)); + font-size: 0.75rem; + } + .max-sm\:before\:-translate-x-1\/4:before { + content: var(--tw-content); + --tw-translate-x: -25%; + translate: var(--tw-translate-x) var(--tw-translate-y); + } + .max-sm\:before\:translate-x-1\/4:before { + content: var(--tw-content); + --tw-translate-x: 25%; + translate: var(--tw-translate-x) var(--tw-translate-y); + } + } + @media (min-width: 40rem) { + .sm\:right-4 { + right: calc(var(--spacing) * 4); + } + .sm\:left-1\/2 { + left: 50%; + } + .sm\:col-span-2 { + grid-column: span 2 / span 2; + } + .sm\:mt-\[1px\] { + margin-top: 1px; + } + .sm\:mb-3 { + margin-bottom: calc(var(--spacing) * 3); + } + .min-sm\:hidden { + display: none; + } + .sm\:flex { + display: flex; + } + .sm\:hidden { + display: none; + } + .sm\:size-6 { + width: calc(var(--spacing) * 6); + height: calc(var(--spacing) * 6); + } + .sm\:size-10 { + width: calc(var(--spacing) * 10); + height: calc(var(--spacing) * 10); + } + .sm\:size-12 { + width: calc(var(--spacing) * 12); + height: calc(var(--spacing) * 12); + } + .sm\:h-11\/12 { + height: 91.6667%; + } + .sm\:h-14 { + height: calc(var(--spacing) * 14); + } + .sm\:h-\[min\(50vw\,85vh\)\] { + height: min(50vw, 85vh); + } + .sm\:max-h-11\/12 { + max-height: 91.6667%; + } + .sm\:max-w-5xl { + max-width: var(--container-5xl); + } + .sm\:max-w-lg { + max-width: var(--container-lg); + } + .sm\:max-w-md { + max-width: var(--container-md); + } + .sm\:max-w-xs { + max-width: var(--container-xs); + } + .sm\:min-w-34 { + min-width: calc(var(--spacing) * 34); + } + .sm\:grow { + flex-grow: 1; + } + .sm\:-translate-x-1\/2 { + --tw-translate-x: -50%; + translate: var(--tw-translate-x) var(--tw-translate-y); + } + .sm\:auto-cols-max { + grid-auto-columns: max-content; + } + .sm\:grid-flow-col { + grid-auto-flow: column; + } + .sm\:grid-cols-2 { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + .sm\:grid-cols-3 { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + .sm\:grid-cols-4 { + grid-template-columns: repeat(4, minmax(0, 1fr)); + } + .sm\:grid-cols-6 { + grid-template-columns: repeat(6, minmax(0, 1fr)); + } + .sm\:grid-cols-16 { + grid-template-columns: repeat(16, minmax(0, 1fr)); + } + .sm\:grid-cols-\[auto_1fr\] { + grid-template-columns: auto 1fr; + } + .sm\:flex-col { + flex-direction: column; + } + .sm\:flex-row { + flex-direction: row; + } + .sm\:items-end { + align-items: flex-end; + } + .sm\:justify-between { + justify-content: space-between; + } + .sm\:justify-end { + justify-content: flex-end; + } + .sm\:gap-1 { + gap: calc(var(--spacing) * 1); + } + .sm\:gap-3 { + gap: calc(var(--spacing) * 3); + } + .sm\:gap-4 { + gap: calc(var(--spacing) * 4); + } + .sm\:gap-6 { + gap: calc(var(--spacing) * 6); + } + .sm\:overflow-x-hidden { + overflow-x: hidden; + } + .sm\:rounded-b-box { + border-bottom-right-radius: var(--radius-box); + border-bottom-left-radius: var(--radius-box); + } + .sm\:pb-3 { + padding-bottom: calc(var(--spacing) * 3); + } + .sm\:text-left { + text-align: left; + } + .sm\:text-2xl { + font-size: var(--text-2xl); + line-height: var(--tw-leading, var(--text-2xl--line-height)); + } + .sm\:text-3xl { + font-size: var(--text-3xl); + line-height: var(--tw-leading, var(--text-3xl--line-height)); + } + .sm\:text-5xl { + font-size: var(--text-5xl); + line-height: var(--tw-leading, var(--text-5xl--line-height)); + } + .sm\:text-base { + font-size: var(--text-base); + line-height: var(--tw-leading, var(--text-base--line-height)); + } + .sm\:text-lg { + font-size: var(--text-lg); + line-height: var(--tw-leading, var(--text-lg--line-height)); + } + .sm\:text-xl { + font-size: var(--text-xl); + line-height: var(--tw-leading, var(--text-xl--line-height)); + } + .sm\:shadow-xl { + --tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, #0000001a), + 0 8px 10px -6px var(--tw-shadow-color, #0000001a); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), + var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + .sm\:btn-lg { + --fontsize: 1.125rem; + --btn-p: 1.25rem; + --size: calc(var(--size-field, 0.25rem) * 12); + } + .sm\:btn-md { + --fontsize: 0.875rem; + --btn-p: 1rem; + --size: calc(var(--size-field, 0.25rem) * 10); + } + .sm\:btn-xl { + --fontsize: 1.375rem; + --btn-p: 1.5rem; + --size: calc(var(--size-field, 0.25rem) * 14); + } + } + @media (min-width: 48rem) { + .md\:max-w-lg { + max-width: var(--container-lg); + } + .md\:max-w-xl { + max-width: var(--container-xl); + } + .md\:grid-cols-6 { + grid-template-columns: repeat(6, minmax(0, 1fr)); + } + .md\:grid-cols-16 { + grid-template-columns: repeat(16, minmax(0, 1fr)); + } + .md\:grid-cols-\[320px_1fr\] { + grid-template-columns: 320px 1fr; + } + .md\:grid-cols-\[360px_1fr\] { + grid-template-columns: 360px 1fr; + } + .md\:flex-row { + flex-direction: row; + } + .md\:items-end { + align-items: flex-end; + } + .md\:justify-between { + justify-content: space-between; + } + } + @media (min-width: 64rem) { + .lg\:grid-cols-3 { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + .lg\:grid-cols-4 { + grid-template-columns: repeat(4, minmax(0, 1fr)); + } + .lg\:before\:-translate-x-1\/3:before { + content: var(--tw-content); + --tw-translate-x: calc(calc(1 / 3 * 100%) * -1); + translate: var(--tw-translate-x) var(--tw-translate-y); + } + .lg\:before\:translate-x-1\/3:before { + content: var(--tw-content); + --tw-translate-x: calc(1 / 3 * 100%); + translate: var(--tw-translate-x) var(--tw-translate-y); + } + } + @media (min-width: 80rem) { + .xl\:col-span-1 { + grid-column: span 1 / span 1; + } + .xl\:grid-cols-4 { + grid-template-columns: repeat(4, minmax(0, 1fr)); + } + .xl\:grid-cols-32 { + grid-template-columns: repeat(32, minmax(0, 1fr)); + } + .xl\:before\:-translate-x-1\/4:before { + content: var(--tw-content); + --tw-translate-x: -25%; + translate: var(--tw-translate-x) var(--tw-translate-y); + } + .xl\:before\:translate-x-1\/4:before { + content: var(--tw-content); + --tw-translate-x: 25%; + translate: var(--tw-translate-x) var(--tw-translate-y); + } + } + @media (min-width: 100rem) { + .min-\[100rem\]\:grid-cols-32 { + grid-template-columns: repeat(32, minmax(0, 1fr)); + } + } + @media (pointer: coarse) { + .touchscreen\:hidden { + display: none; + } + } + @media (display-mode: standalone) { + .pwa\:hidden { + display: none; + } + } + .stuck\:border-base-content\/10.stuck { + border-color: var(--color-base-content); + } + @supports (color: color-mix(in lab, red, red)) { + .stuck\:border-base-content\/10.stuck { + border-color: color-mix( + in oklab, + var(--color-base-content) 10%, + transparent + ); + } + } + .\[\&_\[data-command-group\]\]\:px-2 [data-command-group] { + padding-inline: calc(var(--spacing) * 2); + } + .\[\&_\[data-command-group\]\:not\(\[hidden\]\)_\~\[data-command-group\]\]\:pt-0 + [data-command-group]:not([hidden]) + ~ [data-command-group] { + padding-top: calc(var(--spacing) * 0); + } + .\[\&_\[data-command-input-wrapper\]_svg\]\:h-5 + [data-command-input-wrapper] + svg { + height: calc(var(--spacing) * 5); + } + .\[\&_\[data-command-input-wrapper\]_svg\]\:w-5 + [data-command-input-wrapper] + svg { + width: calc(var(--spacing) * 5); + } + .\[\&_\[data-command-input\]\]\:h-12 [data-command-input] { + height: calc(var(--spacing) * 12); + } + .\[\&_\[data-command-item\]\]\:px-2 [data-command-item] { + padding-inline: calc(var(--spacing) * 2); + } + .\[\&_\[data-command-item\]\]\:py-3 [data-command-item] { + padding-block: calc(var(--spacing) * 3); + } + .\[\&_\[data-command-item\]_svg\]\:h-5 [data-command-item] svg { + height: calc(var(--spacing) * 5); + } + .\[\&_\[data-command-item\]_svg\]\:w-5 [data-command-item] svg { + width: calc(var(--spacing) * 5); + } + .\[\&_input\]\:disabled\:cursor-not-allowed input:disabled { + cursor: not-allowed; + } + .\[\&_svg\]\:pointer-events-none svg { + pointer-events: none; + } + .\[\&_svg\]\:shrink-0 svg { + flex-shrink: 0; + } + .\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*="size-"]) { + width: calc(var(--spacing) * 4); + height: calc(var(--spacing) * 4); + } +} +@property --tw-animation-delay { + syntax: "*"; + inherits: false; + initial-value: 0s; +} +@property --tw-animation-direction { + syntax: "*"; + inherits: false; + initial-value: normal; +} +@property --tw-animation-duration { + syntax: "*"; + inherits: false; +} +@property --tw-animation-fill-mode { + syntax: "*"; + inherits: false; + initial-value: none; +} +@property --tw-animation-iteration-count { + syntax: "*"; + inherits: false; + initial-value: 1; +} +@property --tw-enter-blur { + syntax: "*"; + inherits: false; + initial-value: 0; +} +@property --tw-enter-opacity { + syntax: "*"; + inherits: false; + initial-value: 1; +} +@property --tw-enter-rotate { + syntax: "*"; + inherits: false; + initial-value: 0; +} +@property --tw-enter-scale { + syntax: "*"; + inherits: false; + initial-value: 1; +} +@property --tw-enter-translate-x { + syntax: "*"; + inherits: false; + initial-value: 0; +} +@property --tw-enter-translate-y { + syntax: "*"; + inherits: false; + initial-value: 0; +} +@property --tw-exit-blur { + syntax: "*"; + inherits: false; + initial-value: 0; +} +@property --tw-exit-opacity { + syntax: "*"; + inherits: false; + initial-value: 1; +} +@property --tw-exit-rotate { + syntax: "*"; + inherits: false; + initial-value: 0; +} +@property --tw-exit-scale { + syntax: "*"; + inherits: false; + initial-value: 1; +} +@property --tw-exit-translate-x { + syntax: "*"; + inherits: false; + initial-value: 0; +} +@property --tw-exit-translate-y { + syntax: "*"; + inherits: false; + initial-value: 0; +} +@keyframes progress { + 50% { + background-position-x: -115%; + } +} +@keyframes radio { + 0% { + padding: 5px; + } + 50% { + padding: 3px; + } +} +@keyframes toast { + 0% { + opacity: 0; + scale: 0.9; + } + to { + opacity: 1; + scale: 1; + } +} +@keyframes dropdown { + 0% { + opacity: 0; + } +} +@keyframes rating { + 0%, + 40% { + filter: brightness(1.05) contrast(1.05); + scale: 1.1; + } +} +@keyframes skeleton { + 0% { + background-position: 150%; + } + to { + background-position: -50%; + } +} +@property --tw-translate-x { + syntax: "*"; + inherits: false; + initial-value: 0; +} +@property --tw-translate-y { + syntax: "*"; + inherits: false; + initial-value: 0; +} +@property --tw-translate-z { + syntax: "*"; + inherits: false; + initial-value: 0; +} +@property --tw-rotate-x { + syntax: "*"; + inherits: false; +} +@property --tw-rotate-y { + syntax: "*"; + inherits: false; +} +@property --tw-rotate-z { + syntax: "*"; + inherits: false; +} +@property --tw-skew-x { + syntax: "*"; + inherits: false; +} +@property --tw-skew-y { + syntax: "*"; + inherits: false; +} +@property --tw-border-style { + syntax: "*"; + inherits: false; + initial-value: solid; +} +@property --tw-leading { + syntax: "*"; + inherits: false; +} +@property --tw-font-weight { + syntax: "*"; + inherits: false; +} +@property --tw-tracking { + syntax: "*"; + inherits: false; +} +@property --tw-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-shadow-color { + syntax: "*"; + inherits: false; +} +@property --tw-shadow-alpha { + syntax: ""; + inherits: false; + initial-value: 100%; +} +@property --tw-inset-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-inset-shadow-color { + syntax: "*"; + inherits: false; +} +@property --tw-inset-shadow-alpha { + syntax: ""; + inherits: false; + initial-value: 100%; +} +@property --tw-ring-color { + syntax: "*"; + inherits: false; +} +@property --tw-ring-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-inset-ring-color { + syntax: "*"; + inherits: false; +} +@property --tw-inset-ring-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-ring-inset { + syntax: "*"; + inherits: false; +} +@property --tw-ring-offset-width { + syntax: ""; + inherits: false; + initial-value: 0; +} +@property --tw-ring-offset-color { + syntax: "*"; + inherits: false; + initial-value: #fff; +} +@property --tw-ring-offset-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-backdrop-blur { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-brightness { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-contrast { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-grayscale { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-hue-rotate { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-invert { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-opacity { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-saturate { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-sepia { + syntax: "*"; + inherits: false; +} +@property --tw-duration { + syntax: "*"; + inherits: false; +} +@property --tw-content { + syntax: "*"; + inherits: false; + initial-value: ""; +} +@property --tw-blur { + syntax: "*"; + inherits: false; +} +@property --tw-brightness { + syntax: "*"; + inherits: false; +} +@property --tw-contrast { + syntax: "*"; + inherits: false; +} +@property --tw-grayscale { + syntax: "*"; + inherits: false; +} +@property --tw-hue-rotate { + syntax: "*"; + inherits: false; +} +@property --tw-invert { + syntax: "*"; + inherits: false; +} +@property --tw-opacity { + syntax: "*"; + inherits: false; +} +@property --tw-saturate { + syntax: "*"; + inherits: false; +} +@property --tw-sepia { + syntax: "*"; + inherits: false; +} +@property --tw-drop-shadow { + syntax: "*"; + inherits: false; +} +@property --tw-drop-shadow-color { + syntax: "*"; + inherits: false; +} +@property --tw-drop-shadow-alpha { + syntax: ""; + inherits: false; + initial-value: 100%; +} +@property --tw-drop-shadow-size { + syntax: "*"; + inherits: false; +} +@property --tw-outline-style { + syntax: "*"; + inherits: false; + initial-value: solid; +} +@keyframes pulse { + 50% { + opacity: 0.5; + } +} +@keyframes bounce { + 0%, + to { + animation-timing-function: cubic-bezier(0.8, 0, 1, 1); + transform: translateY(-25%); + } + 50% { + animation-timing-function: cubic-bezier(0, 0, 0.2, 1); + transform: none; + } +} +@keyframes enter { + 0% { + opacity: var(--tw-enter-opacity, 1); + transform: translate3d( + var(--tw-enter-translate-x, 0), + var(--tw-enter-translate-y, 0), + 0 + ) + scale3d( + var(--tw-enter-scale, 1), + var(--tw-enter-scale, 1), + var(--tw-enter-scale, 1) + ) + rotate(var(--tw-enter-rotate, 0)); + filter: blur(var(--tw-enter-blur, 0)); + } +} +@keyframes exit { + to { + opacity: var(--tw-exit-opacity, 1); + transform: translate3d( + var(--tw-exit-translate-x, 0), + var(--tw-exit-translate-y, 0), + 0 + ) + scale3d( + var(--tw-exit-scale, 1), + var(--tw-exit-scale, 1), + var(--tw-exit-scale, 1) + ) + rotate(var(--tw-exit-rotate, 0)); + filter: blur(var(--tw-exit-blur, 0)); + } +} +@keyframes caret-blink { + 0%, + 70%, + to { + opacity: 1; + } + 20%, + 50% { + opacity: 0; + } +} diff --git a/frontend-backup/_app/immutable/assets/0.CmqRY0au.css b/frontend-backup/_app/immutable/assets/0.CmqRY0au.css deleted file mode 100644 index b63e4b3..0000000 --- a/frontend-backup/_app/immutable/assets/0.CmqRY0au.css +++ /dev/null @@ -1 +0,0 @@ -html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}html[dir=rtl],[data-sonner-toaster][dir=rtl]{--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}@media (hover: none) and (pointer: coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translate(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}[data-sonner-toast][data-y-position=top]{top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px #0006}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:#00000014}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:#ffffff4d}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]:before{content:"";position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]:before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]:before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]:after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y: translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y: translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y: translateY( calc(var(--lift) * var(--offset) + var(--lift) * -100%) );opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]:before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 87%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 93%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 84%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 43%, 17%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 9%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;top:0;right:0;bottom:0;left:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-content:"";--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0;--tw-outline-style:solid}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-orange-500:oklch(70.5% .213 47.604);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-lime-500:oklch(76.8% .233 130.85);--color-green-500:oklch(72.3% .219 149.579);--color-emerald-500:oklch(69.6% .17 162.48);--color-teal-500:oklch(70.4% .14 182.503);--color-cyan-500:oklch(71.5% .143 215.221);--color-sky-500:oklch(68.5% .169 237.323);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-800:oklch(42.4% .199 265.638);--color-indigo-500:oklch(58.5% .233 277.117);--color-violet-500:oklch(60.6% .25 292.717);--color-purple-500:oklch(62.7% .265 303.9);--color-fuchsia-500:oklch(66.7% .295 322.15);--color-pink-500:oklch(65.6% .241 354.308);--color-rose-500:oklch(64.5% .246 16.439);--color-black:#000;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-widest:.1em;--radius-xs:.125rem;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--animate-bounce:bounce 1s infinite;--blur-sm:8px;--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:root{color-scheme:light only;--version:1.13}html,body{height:100%}*{overscroll-behavior:contain;touch-action:manipulation}.maplibregl-ctrl-bottom-right{z-index:1;height:max-content;top:0;left:0;right:unset!important}.maplibregl-ctrl-attrib.maplibregl-compact{margin:10px 80px 10px 12px!important}#map canvas{cursor:default}body{background-color:var(--color-base-100);font-family:"Geist",var(--font-sans)}input:focus,textarea:focus,label:has(:focus){outline-style:var(--tw-outline-style)!important;outline-width:0!important}button,a{cursor:pointer}@font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(Geist-cyrillic.CHSlOQsW.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(Geist-latin-ext.DMtmJ5ZE.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(Geist-latin.Dg_dQHbK.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(GeistMono-cyrillic.BZdD_g9V.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(GeistMono-latin-ext.b6lpi8_2.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(GeistMono-latin.Cjtb1TV-.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Pixelify Sans;font-style:normal;font-weight:400 700;font-display:swap;src:url(PixelifySans-cyrillic.CPPz0Qvd.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Pixelify Sans;font-style:normal;font-weight:400 700;font-display:swap;src:url(PixelifySans-cyrillic.CPPz0Qvd.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Pixelify Sans;font-style:normal;font-weight:400 700;font-display:swap;src:url(PixelifySans-latin.vdc2vUDH.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Noto Color Emoji;font-style:normal;font-weight:400;font-display:swap;src:url(NotoColorEmoji-flags.ClvgErYz.woff2)format("woff2");unicode-range:U+1F1E6-1F1FF}.iti{--iti-path-flags-1x:url(flags.a2kmUSbF.webp);--iti-path-flags-2x:url(flags@2x.gR6KPp3x.webp);--iti-path-globe-1x:url(data:image/webp;base64,UklGRvoBAABXRUJQVlA4TO4BAAAvE8AEENXIkiRZtZu7H33ql07cqTlilvbz9i4tosSMZma27zWzHRGyIEk2bcu2bdvGn23btm3btm3btm0/m5PqAEkLTYYwxTPAW84Tl6wNgmvIqptKKH9nYAr4xle+TML/BDI2LSg6QHKT/nngE4+ZMIUePUGeTvly+YoV8F1DtkGUzlfst2LUKTX6PaWZeMWiDqN6PgcciGa2boYPmxlR5bIIL5l6RVyDYMXmY1f10pGb7PmAN6sRTBTN3N9C9Zi/LbVhlL+Oo2M7RxoE/a4+/nDjeBrSVwtGYXGGMIrUbJzCU1LgFftP9K1hkpOXmBim30cIJ1hgOkSwMhYCMgmaw7rXcfT5/wQcFhrcuaOEBuq5ytYblLPBEhV0Aq/ZqcDn/6RUDgrUL0/0UZgK/p+rR8/4nZAqFfuXA6TbtFQyJSe4gpj6T19a5q+HLEkox0mlWXvbIGbuJw28fkozjybhT5oXHNY4py5rH1CflcyeB1fId9wXDAvFmz/8m6AE/8TgYzEVGoRMCKUhND7PQho7jGo1utkdV559cm3llGFs3sxBZrmGbEExop91jyfg5G7BmCCi6evNaSDFBrG3vyaRNzt+HJ9kQpVbgj+xFUoNgr3abxqGfH3WfQq9lp5UZPRW74ZbFgpq+EGo67dUAQ==);--iti-path-globe-2x:url(data:image/webp;base64,UklGRlwFAABXRUJQVlA4TE8FAAAvJ8AJEEfHKJIkKdmcgvjj3wwill7QwKhtJEnOnIDmv/zJLAdGbSNJcuYENP/lT2Y5OGwjSZHmtL3wTFl9tp8SM/9xz47Ctm2b7mnwDggKFNd77jgHyxhIYVvLQBDEHEBKRQBIOXzQpAhiBQCIAMaIAACHhAQHIMFhhRkSRt1hlRIYDAZDhiE3CVrBS2gFkZGRYdA6mjQQBYAv6yOZSVAQCoPWMCWBIBQKwtCCUBANFARBlChBfPCG/dZUjxJECYJQECU+KGFQEC1YdN/NSUNRTDm4osQBGUwFjDFCBOYRo9QWxAmPlKQECRERMbVLCZapZ0owSrnz3hb6/P8auL9vAwr7/xeS5EV9q2sWU2vbtjla27Zt28akprq6a3bPtm2np87eJIvePUzd9fvoXkT0fwK4Vwdo8t6qyQW+O7Tn4k7NAdvi/jMR0fGpwhglhZBKm3B0pzvg3JcDrUuMEn7SDaUIRTLhhqb/AbDvw+bbJToMEq5QflFfv+QhJVPxcmkm/Ih9TzZfFxk/CJUnP7zMykJqnhsqQ51M6tTv2Pdgc/GKCuKmaI96HlhVAJy4vWVWWgRSfYJ9l4jv+4aB0F15Td3kH1YW4DiMnEJHGSaFOoOdw4LxOhCqPTf0JvLys6I8Wv/9BeeuhEkZfE+UZfNSOumqT+CArgHwbBHZw+ZB00AGeiYxIKKudH2zDxg97VK7FxdO6+9Pmt3l4J/bZR58rtyEOY6dtdhcMbPh2jsyNKr3mNnDy+c8Pig0od5wGXakg7DYgYgfU5648s0fC0Ljv9SigQVrHwUafXVgmNE92zBBBeYjsHn5L6Emz/6776EnxwJUsqKADMDmq8fG/T16fujr7lhknhheLG4PPwFD15IXs2xWFWBZVj4ndDW+fDItPRncssi75Fxv/iHQQL2PDbkg4k/zP/BfgfR1axxy59PM/IYdsypZWUCUiTlck2/zTz4fm3LzqkNlxxnzW+A4fK4vkbNrIbn7bgVoKn3djQu90krrllynQ1g7v2rpjUYsfeR6tdLSaqV5w5fR6E5+k8BVT/0aqqSXDAdV4wvpCplTCJnbFTLb9dTEHjoQQiTMC7Ah3PPuwbffOfD+xP4d3s7uMGDC+wcOvrs7kVKTZ6m4EMIVfn1O61JyrnuU3EM3A3znefrp142f5cnmnDXNyXecPFYUYNt2pVUlvot//qWFDszz9aTrCuGpQVX4Wn+KAw6rCrAgw/eqLZXQVQfmXZ5QnnCF2wrwdlJ5F8DhC1MP/itRnhv+wmHji7hpT+x0tekziRw7jxUF2LZznX3xOydH3e5fVhYWO5QOlClPzYFX9EMD65P9bBHZ16fLq7dHfrlal5vO2LxuKkTcfABvjZDxwsWvf9hs7pCv2ry5cowvB2/8iosq5YraWHw7JCxLyaAWZPoUrilMaRMKo8WwpQv0z2AXqnLzLA42H5gKEVcTuM76RfDtpVrzh9b5oTp0e5SI+Topy78hAzFm6QqRMN2gugNYLH0EoHF6Pyw3vm+OYQMRlwPpCd+sAep/WQ1OPGZZ13lO0ugpE0+m1xGRbdNKe67wzTN3Nouw3yfw03WH+nrnqUAnEul5YOXA5o20L4SnAiXjoX6f7Pm6RIeBl14EGe4a8VLad4UnvZTwysxR2DtOumEiUOpliLi7FWNb2vOEK4QQnnyoIav+Ko9XhGbUF1gZ7tWKcVBLX+T05HkOGmn0iA4WjsW9Ww6ny3WiTAjhyd41WWfGrv4sAof7t/l+ppGJlFeR7oBVr4kF2BYP0oYjDxsZpjuTsQDHsXjAUYxrrwwe9gGWRRRZ3CcA)}:root,[data-theme]{background-color:var(--root-bg,var(--color-base-100));color:var(--color-base-content)}:root{--fx-noise:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.34' numOctaves='4' stitchTiles='stitch'%3E%3C/feTurbulence%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)' opacity='0.2'%3E%3C/rect%3E%3C/svg%3E")}@property --radialprogress{syntax: ""; inherits: true; initial-value: 0%;}:root{scrollbar-color:currentColor #0000}@supports (color:color-mix(in lab,red,red)){:root{scrollbar-color:color-mix(in oklch,currentColor 35%,#0000)#0000}}:root:has(.modal-open,.modal[open],.modal:target,.modal-toggle:checked,.drawer:not([class*=drawer-open])>.drawer-toggle:checked){overflow:hidden}:where(:root),:root:has(input.theme-controller[value=custom-winter]:checked),[data-theme=custom-winter]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97.466% .011 259.822);--color-base-300:oklch(93.268% .016 262.751);--color-base-content:oklch(41.886% .053 255.824);--color-primary:oklch(56.86% .255 257.57);--color-primary-content:oklch(100% .051 257.57);--color-secondary:oklch(42.551% .161 282.339);--color-secondary-content:oklch(88.51% .032 282.339);--color-accent:oklch(59.939% .191 335.171);--color-accent-content:oklch(11.988% .038 335.171);--color-neutral:oklch(19.616% .063 257.651);--color-neutral-content:oklch(83.923% .012 257.651);--color-info:oklch(88.127% .085 214.515);--color-info-content:oklch(17.625% .017 214.515);--color-success:oklch(80.494% .077 197.823);--color-success-content:oklch(16.098% .015 197.823);--color-warning:oklch(89.172% .045 71.47);--color-warning-content:oklch(17.834% .009 71.47);--color-error:oklch(73.092% .11 20.076);--color-error-content:oklch(14.618% .022 20.076);--radius-selector:2rem;--radius-field:2rem;--radius-box:2rem;--size-selector:.25rem;--size-field:.25rem;--border:2px;--depth:1;--noise:1}}@layer components;@layer utilities{.diff{webkit-user-select:none;-webkit-user-select:none;user-select:none;direction:ltr;grid-template-columns:auto 1fr;width:100%;display:grid;position:relative;overflow:hidden;container-type:inline-size}.diff:focus-visible,.diff:has(.diff-item-1:focus-visible){outline-style:var(--tw-outline-style);outline-offset:1px;outline-width:2px;outline-color:var(--color-base-content)}.diff:focus-visible .diff-resizer{min-width:90cqi;max-width:90cqi}.diff:has(.diff-item-2:focus-visible){outline-style:var(--tw-outline-style);outline-offset:1px;outline-width:2px}.diff:has(.diff-item-2:focus-visible) .diff-resizer{min-width:10cqi;max-width:10cqi}@supports (-webkit-overflow-scrolling:touch) and (overflow:-webkit-paged-x){.diff:focus .diff-resizer{min-width:10cqi;max-width:10cqi}.diff:has(.diff-item-1:focus) .diff-resizer{min-width:90cqi;max-width:90cqi}}.modal{pointer-events:none;visibility:hidden;width:100%;max-width:none;height:100%;max-height:none;color:inherit;transition:translate .3s ease-out,visibility .3s allow-discrete,background-color .3s ease-out,opacity .1s ease-out;overscroll-behavior:contain;z-index:999;background-color:#0000;place-items:center;margin:0;padding:0;display:grid;position:fixed;top:0;right:0;bottom:0;left:0;overflow:hidden}.modal::backdrop{display:none}.modal.modal-open,.modal[open],.modal:target{pointer-events:auto;visibility:visible;opacity:1;background-color:#0006}:is(.modal.modal-open,.modal[open],.modal:target) .modal-box{opacity:1;translate:0;scale:1}@starting-style{.modal.modal-open,.modal[open],.modal:target{visibility:hidden;opacity:0}}.tooltip{--tt-bg:var(--color-neutral);--tt-off: calc(100% + .5rem) ;--tt-tail: calc(100% + 1px + .25rem) ;display:inline-block;position:relative}.tooltip>:where(.tooltip-content),.tooltip:where([data-tip]):before{border-radius:var(--radius-field);text-align:center;white-space:normal;max-width:20rem;color:var(--color-neutral-content);opacity:0;background-color:var(--tt-bg);pointer-events:none;z-index:2;--tw-content:attr(data-tip);content:var(--tw-content);width:max-content;padding-block:.25rem;padding-inline:.5rem;font-size:.875rem;line-height:1.25;transition:opacity .2s cubic-bezier(.4,0,.2,1) 75ms,transform .2s cubic-bezier(.4,0,.2,1) 75ms;position:absolute}.tooltip:after{opacity:0;background-color:var(--tt-bg);content:"";pointer-events:none;--mask-tooltip:url("data:image/svg+xml,%3Csvg width='10' height='4' viewBox='0 0 8 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.500009 1C3.5 1 3.00001 4 5.00001 4C7 4 6.5 1 9.5 1C10 1 10 0.499897 10 0H0C-1.99338e-08 0.5 0 1 0.500009 1Z' fill='black'/%3E%3C/svg%3E%0A");width:.625rem;height:.25rem;-webkit-mask-position:-1px 0;mask-position:-1px 0;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-image:var(--mask-tooltip);mask-image:var(--mask-tooltip);transition:opacity .2s cubic-bezier(.4,0,.2,1) 75ms,transform .2s cubic-bezier(.4,0,.2,1) 75ms;display:block;position:absolute}:is(.tooltip.tooltip-open,.tooltip[data-tip]:not([data-tip=""]):hover,.tooltip:not(:has(.tooltip-content:empty)):has(.tooltip-content):hover,.tooltip:has(:focus-visible))>.tooltip-content,:is(.tooltip.tooltip-open,.tooltip[data-tip]:not([data-tip=""]):hover,.tooltip:not(:has(.tooltip-content:empty)):has(.tooltip-content):hover,.tooltip:has(:focus-visible))[data-tip]:before,:is(.tooltip.tooltip-open,.tooltip[data-tip]:not([data-tip=""]):hover,.tooltip:not(:has(.tooltip-content:empty)):has(.tooltip-content):hover,.tooltip:has(:focus-visible)):after{opacity:1;--tt-pos:0rem;transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}.tooltip>.tooltip-content,.tooltip[data-tip]:before{transform:translate(-50%)translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-off)50%}.tooltip:after{transform:translate(-50%)translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-tail)50%}.tab{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:center;webkit-user-select:none;-webkit-user-select:none;user-select:none;flex-wrap:wrap;justify-content:center;align-items:center;display:inline-flex;position:relative}@media (hover:hover){.tab:hover{color:var(--color-base-content)}}.tab{--tab-p:1rem;--tab-bg:var(--color-base-100);--tab-border-color:var(--color-base-300);--tab-radius-ss:0;--tab-radius-se:0;--tab-radius-es:0;--tab-radius-ee:0;--tab-order:0;--tab-radius-min:calc(.75rem - var(--border));order:var(--tab-order);height:var(--tab-height);border-color:#0000;padding-inline-start:var(--tab-p);padding-inline-end:var(--tab-p);font-size:.875rem}.tab:is(input[type=radio]){min-width:fit-content}.tab:is(input[type=radio]):after{content:attr(aria-label)}.tab:is(label){position:relative}.tab:is(label) input{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0;position:absolute;top:0;right:0;bottom:0;left:0}:is(.tab:checked,.tab:is(label:has(:checked)),.tab:is(.tab-active,[aria-selected=true]))+.tab-content{height:calc(100% - var(--tab-height) + var(--border));display:block}.tab:not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true]){color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.tab:not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true]){color:color-mix(in oklab,var(--color-base-content)50%,transparent)}}.tab:not(input):empty{cursor:default;flex-grow:1}.tab:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.tab:focus{outline-offset:2px;outline:2px solid #0000}}.tab:focus-visible,.tab:is(label:has(:checked:focus-visible)){outline-offset:-5px;outline:2px solid}.tab[disabled]{pointer-events:none;opacity:.4}.menu{--menu-active-fg:var(--color-neutral-content);--menu-active-bg:var(--color-neutral);flex-flow:column wrap;width:fit-content;padding:.5rem;font-size:.875rem;display:flex}.menu :where(li ul){white-space:nowrap;margin-inline-start:1rem;padding-inline-start:.5rem;position:relative}.menu :where(li ul):before{background-color:var(--color-base-content);opacity:.1;width:var(--border);content:"";inset-inline-start:0;position:absolute;top:.75rem;bottom:.75rem}.menu :where(li>.menu-dropdown:not(.menu-dropdown-show)){display:none}.menu :where(li:not(.menu-title)>:not(ul,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--radius-field);text-align:start;text-wrap:balance;-webkit-user-select:none;user-select:none;grid-auto-columns:minmax(auto,max-content) auto max-content;grid-auto-flow:column;align-content:flex-start;align-items:center;gap:.5rem;padding-block:.375rem;padding-inline:.75rem;transition-property:color,background-color,box-shadow;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);display:grid}.menu :where(li>details>summary){--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li>details>summary){outline-offset:2px;outline:2px solid #0000}}.menu :where(li>details>summary)::-webkit-details-marker{display:none}:is(.menu :where(li>details>summary),.menu :where(li>.menu-dropdown-toggle)):after{content:"";transform-origin:50%;pointer-events:none;justify-self:flex-end;width:.375rem;height:.375rem;transition-property:rotate,translate;transition-duration:.2s;display:block;translate:0 -1px;rotate:-135deg;box-shadow:inset 2px 2px}.menu :where(li>details[open]>summary):after,.menu :where(li>.menu-dropdown-toggle.menu-dropdown-show):after{translate:0 1px;rotate:45deg}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus,.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus,.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{background-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus,.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{color:var(--color-base-content);--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus,.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{outline-offset:2px;outline:2px solid #0000}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){background-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){outline-offset:2px;outline:2px solid #0000}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){box-shadow:inset 0 1px #00000003,inset 0 -1px #ffffff03}.menu :where(li:empty){background-color:var(--color-base-content);opacity:.1;height:1px;margin:.5rem 1rem}.menu :where(li){flex-flow:column wrap;flex-shrink:0;align-items:stretch;display:flex;position:relative}.menu :where(li) .badge{justify-self:flex-end}.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{outline-offset:2px;outline:2px solid #0000}}.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{color:var(--menu-active-fg);background-color:var(--menu-active-bg);background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise)}:is(.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active):not(:is(.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active):active){box-shadow:0 2px calc(var(--depth)*3px) -2px var(--menu-active-bg)}.menu :where(li).menu-disabled{pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.menu :where(li).menu-disabled{color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.menu .dropdown:focus-within .menu-dropdown-toggle:after{translate:0 1px;rotate:45deg}.menu .dropdown-content{margin-top:.5rem;padding:.5rem}.menu .dropdown-content:before{display:none}.dropdown{position-area:var(--anchor-v,bottom)var(--anchor-h,span-right);display:inline-block;position:relative}.dropdown>:not(summary):focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.dropdown>:not(summary):focus{outline-offset:2px;outline:2px solid #0000}}.dropdown .dropdown-content{position:absolute}.dropdown:not(details,.dropdown-open,.dropdown-hover:hover,:focus-within) .dropdown-content{transform-origin:top;opacity:0;display:none;scale:95%}.dropdown[popover],.dropdown .dropdown-content{z-index:999;transition-behavior:allow-discrete;transition-property:opacity,scale,display;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);animation:.2s dropdown}@starting-style{.dropdown[popover],.dropdown .dropdown-content{opacity:0;scale:95%}}:is(.dropdown.dropdown-open,.dropdown:not(.dropdown-hover):focus,.dropdown:focus-within)>[tabindex]:first-child{pointer-events:none}:is(.dropdown.dropdown-open,.dropdown:not(.dropdown-hover):focus,.dropdown:focus-within) .dropdown-content{opacity:1}.dropdown.dropdown-hover:hover .dropdown-content{opacity:1;scale:100%}.dropdown:is(details) summary::-webkit-details-marker{display:none}:is(.dropdown.dropdown-open,.dropdown:focus,.dropdown:focus-within) .dropdown-content{scale:100%}.dropdown:where([popover]){background:0 0}.dropdown[popover]{color:inherit;position:fixed}@supports not (position-area:bottom){.dropdown[popover]{margin:auto}.dropdown[popover].dropdown-open:not(:popover-open){transform-origin:top;opacity:0;display:none;scale:95%}.dropdown[popover]::backdrop{background-color:oklab(0% none none/.3)}}.dropdown[popover]:not(.dropdown-open,:popover-open){transform-origin:top;opacity:0;display:none;scale:95%}:where(.btn){width:unset}.btn{cursor:pointer;text-align:center;vertical-align:middle;outline-offset:2px;webkit-user-select:none;-webkit-user-select:none;user-select:none;padding-inline:var(--btn-p);color:var(--btn-fg);--tw-prose-links:var(--btn-fg);height:var(--size);font-size:var(--fontsize,.875rem);outline-color:var(--btn-color,var(--color-base-content));background-color:var(--btn-bg);background-size:auto,calc(var(--noise)*100%);background-image:none,var(--btn-noise);border-width:var(--border);border-style:solid;border-color:var(--btn-border);text-shadow:0 .5px oklch(100% 0 0/calc(var(--depth)*.15));touch-action:manipulation;box-shadow:0 .5px 0 .5px oklch(100% 0 0/calc(var(--depth)*6%)) inset,var(--btn-shadow);--size:calc(var(--size-field,.25rem)*10);--btn-bg:var(--btn-color,var(--color-base-200));--btn-fg:var(--color-base-content);--btn-p:1rem;--btn-border:var(--btn-bg);border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field));flex-wrap:nowrap;flex-shrink:0;justify-content:center;align-items:center;gap:.375rem;font-weight:600;transition-property:color,background-color,border-color,box-shadow;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);display:inline-flex}@supports (color:color-mix(in lab,red,red)){.btn{--btn-border:color-mix(in oklab,var(--btn-bg),#000 calc(var(--depth)*5%))}}.btn{--btn-shadow:0 3px 2px -2px var(--btn-bg),0 4px 3px -2px var(--btn-bg)}@supports (color:color-mix(in lab,red,red)){.btn{--btn-shadow:0 3px 2px -2px color-mix(in oklab,var(--btn-bg)calc(var(--depth)*30%),#0000),0 4px 3px -2px color-mix(in oklab,var(--btn-bg)calc(var(--depth)*30%),#0000)}}.btn{--btn-noise:var(--fx-noise)}.prose .btn{text-decoration-line:none}@media (hover:hover){.btn:hover{--btn-bg:var(--btn-color,var(--color-base-200))}@supports (color:color-mix(in lab,red,red)){.btn:hover{--btn-bg:color-mix(in oklab,var(--btn-color,var(--color-base-200)),#000 7%)}}}.btn:focus-visible{isolation:isolate;outline-width:2px;outline-style:solid}.btn:active:not(.btn-active){--btn-bg:var(--btn-color,var(--color-base-200));translate:0 .5px}@supports (color:color-mix(in lab,red,red)){.btn:active:not(.btn-active){--btn-bg:color-mix(in oklab,var(--btn-color,var(--color-base-200)),#000 5%)}}.btn:active:not(.btn-active){--btn-border:var(--btn-color,var(--color-base-200))}@supports (color:color-mix(in lab,red,red)){.btn:active:not(.btn-active){--btn-border:color-mix(in oklab,var(--btn-color,var(--color-base-200)),#000 7%)}}.btn:active:not(.btn-active){--btn-shadow:0 0 0 0 oklch(0% 0 0/0),0 0 0 0 oklch(0% 0 0/0)}.btn:is(:disabled,[disabled],.btn-disabled):not(.btn-link,.btn-ghost){background-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.btn:is(:disabled,[disabled],.btn-disabled):not(.btn-link,.btn-ghost){background-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.btn:is(:disabled,[disabled],.btn-disabled):not(.btn-link,.btn-ghost){box-shadow:none}.btn:is(:disabled,[disabled],.btn-disabled){pointer-events:none;--btn-border:#0000;--btn-noise:none;--btn-fg:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.btn:is(:disabled,[disabled],.btn-disabled){--btn-fg:color-mix(in oklch,var(--color-base-content)20%,#0000)}}@media (hover:hover){.btn:is(:disabled,[disabled],.btn-disabled):hover{pointer-events:none;background-color:var(--color-neutral)}@supports (color:color-mix(in lab,red,red)){.btn:is(:disabled,[disabled],.btn-disabled):hover{background-color:color-mix(in oklab,var(--color-neutral)20%,transparent)}}.btn:is(:disabled,[disabled],.btn-disabled):hover{--btn-border:#0000;--btn-fg:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.btn:is(:disabled,[disabled],.btn-disabled):hover{--btn-fg:color-mix(in oklch,var(--color-base-content)20%,#0000)}}}.btn:is(input[type=checkbox],input[type=radio]){-webkit-appearance:none;-moz-appearance:none;appearance:none}.btn:is(input[type=checkbox],input[type=radio]):after{content:attr(aria-label)}.btn:where(input:checked:not(.filter .btn)){--btn-color:var(--color-primary);--btn-fg:var(--color-primary-content);isolation:isolate}.\!loading{pointer-events:none!important;aspect-ratio:1!important;vertical-align:middle!important;width:calc(var(--size-selector,.25rem)*6)!important;background-color:currentColor!important;display:inline-block!important;-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")!important;mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")!important;-webkit-mask-position:50%!important;mask-position:50%!important;-webkit-mask-size:100%!important;mask-size:100%!important;-webkit-mask-repeat:no-repeat!important;mask-repeat:no-repeat!important}.loading{pointer-events:none;aspect-ratio:1;vertical-align:middle;width:calc(var(--size-selector,.25rem)*6);background-color:currentColor;display:inline-block;-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.list{flex-direction:column;font-size:.875rem;display:flex}.list :where(.list-row){--list-grid-cols:minmax(0,auto)1fr;border-radius:var(--radius-box);word-break:break-word;grid-auto-flow:column;grid-template-columns:var(--list-grid-cols);gap:1rem;padding:1rem;display:grid;position:relative}.list :where(.list-row):has(.list-col-grow:first-child){--list-grid-cols:1fr}.list :where(.list-row):has(.list-col-grow:nth-child(2)){--list-grid-cols:minmax(0,auto)1fr}.list :where(.list-row):has(.list-col-grow:nth-child(3)){--list-grid-cols:minmax(0,auto)minmax(0,auto)1fr}.list :where(.list-row):has(.list-col-grow:nth-child(4)){--list-grid-cols:minmax(0,auto)minmax(0,auto)minmax(0,auto)1fr}.list :where(.list-row):has(.list-col-grow:nth-child(5)){--list-grid-cols:minmax(0,auto)minmax(0,auto)minmax(0,auto)minmax(0,auto)1fr}.list :where(.list-row):has(.list-col-grow:nth-child(6)){--list-grid-cols:minmax(0,auto)minmax(0,auto)minmax(0,auto)minmax(0,auto)minmax(0,auto)1fr}.list :where(.list-row) :not(.list-col-wrap){grid-row-start:1}:is(.list>:not(:last-child).list-row,.list>:not(:last-child) .list-row):after{content:"";border-bottom:var(--border)solid;inset-inline:var(--radius-box);border-color:var(--color-base-content);position:absolute;bottom:0}@supports (color:color-mix(in lab,red,red)){:is(.list>:not(:last-child).list-row,.list>:not(:last-child) .list-row):after{border-color:color-mix(in oklab,var(--color-base-content)5%,transparent)}}.toast{translate:var(--toast-x,0)var(--toast-y,0);inset-inline:auto 1rem;background-color:#0000;flex-direction:column;gap:.5rem;width:max-content;max-width:calc(100vw - 2rem);display:flex;position:fixed;top:auto;bottom:1rem}.toast>*{animation:.25s ease-out toast}.toast:where(.toast-start){--toast-x:0;inset-inline:1rem auto}.toast:where(.toast-center){--toast-x:-50%;inset-inline:50%}.toast:where(.toast-end){--toast-x:0;inset-inline:auto 1rem}.toast:where(.toast-bottom){--toast-y:0;top:auto;bottom:1rem}.toast:where(.toast-middle){--toast-y:-50%;top:50%;bottom:auto}.toast:where(.toast-top){--toast-y:0;top:1rem;bottom:auto}.input{cursor:text;border:var(--border)solid #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--color-base-100);vertical-align:middle;white-space:nowrap;width:clamp(3rem,20rem,100%);height:var(--size);touch-action:manipulation;border-color:var(--input-color);box-shadow:0 1px var(--input-color) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset;border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field));flex-shrink:1;align-items:center;gap:.5rem;padding-inline:.75rem;font-size:.875rem;display:inline-flex;position:relative}@supports (color:color-mix(in lab,red,red)){.input{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset}}.input{--size:calc(var(--size-field,.25rem)*10);--input-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.input{--input-color:color-mix(in oklab,var(--color-base-content)20%,#0000)}}.input:where(input){display:inline-flex}.input :where(input){-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#0000;border:none;width:100%;height:100%;display:inline-flex}.input :where(input):focus,.input :where(input):focus-within{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.input :where(input):focus,.input :where(input):focus-within{outline-offset:2px;outline:2px solid #0000}}.input :where(input[type=url]),.input :where(input[type=email]){direction:ltr}.input :where(input[type=date]){display:inline-block}.input:focus,.input:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab,red,red)){.input:focus,.input:focus-within{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000)}}.input:focus,.input:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate;z-index:1}.input:has(>input[disabled]),.input:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.input:has(>input[disabled]),.input:is(:disabled,[disabled]){color:color-mix(in oklab,var(--color-base-content)40%,transparent)}}:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]))::placeholder{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]))::placeholder{color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.input:has(>input[disabled]),.input:is(:disabled,[disabled]){box-shadow:none}.input:has(>input[disabled])>input[disabled]{cursor:not-allowed}.input::-webkit-date-and-time-value{text-align:inherit}.input[type=number]::-webkit-inner-spin-button{margin-block:-.75rem;margin-inline-end:-.75rem}.input::-webkit-calendar-picker-indicator{position:absolute;inset-inline-end:.75em}.indicator{width:max-content;display:inline-flex;position:relative}.indicator :where(.indicator-item){z-index:1;white-space:nowrap;top:var(--indicator-t,0);bottom:var(--indicator-b,auto);left:var(--indicator-s,auto);right:var(--indicator-e,0);translate:var(--indicator-x,50%)var(--indicator-y,-50%);position:absolute}.table{border-radius:var(--radius-box);text-align:left;width:100%;font-size:.875rem;position:relative}.table:where(:dir(rtl),[dir=rtl],[dir=rtl] *){text-align:right}@media (hover:hover){:is(.table tr.row-hover,.table tr.row-hover:nth-child(2n)):hover{background-color:var(--color-base-200)}}.table :where(th,td){vertical-align:middle;padding-block:.75rem;padding-inline:1rem}.table :where(thead,tfoot){white-space:nowrap;color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.table :where(thead,tfoot){color:color-mix(in oklab,var(--color-base-content)60%,transparent)}}.table :where(thead,tfoot){font-size:.875rem;font-weight:600}.table :where(tfoot){border-top:var(--border)solid var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.table :where(tfoot){border-top:var(--border)solid color-mix(in oklch,var(--color-base-content)5%,#0000)}}.table :where(.table-pin-rows thead tr){z-index:1;background-color:var(--color-base-100);position:sticky;top:0}.table :where(.table-pin-rows tfoot tr){z-index:1;background-color:var(--color-base-100);position:sticky;bottom:0}.table :where(.table-pin-cols tr th){background-color:var(--color-base-100);position:sticky;left:0;right:0}.table :where(thead tr,tbody tr:not(:last-child)){border-bottom:var(--border)solid var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.table :where(thead tr,tbody tr:not(:last-child)){border-bottom:var(--border)solid color-mix(in oklch,var(--color-base-content)5%,#0000)}}.tabs-border .tab{--tab-border-color:#0000 #0000 var(--tab-border-color)#0000;border-radius:var(--radius-field);position:relative}.tabs-border .tab:before{--tw-content:"";content:var(--tw-content);background-color:var(--tab-border-color);border-radius:var(--radius-field);width:80%;height:3px;transition:background-color .2s;position:absolute;bottom:0;left:10%}:is(.tabs-border .tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled,[disabled]),.tabs-border .tab:is(input:checked),.tabs-border .tab:is(label:has(:checked))):before{--tab-border-color:currentColor;border-top:3px solid}.select{border:var(--border)solid #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--color-base-100);vertical-align:middle;width:clamp(3rem,20rem,100%);height:var(--size);touch-action:manipulation;text-overflow:ellipsis;box-shadow:0 1px var(--input-color) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset;background-image:linear-gradient(45deg,#0000 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,#0000 50%);background-position:calc(100% - 20px) calc(1px + 50%),calc(100% - 16.1px) calc(1px + 50%);background-repeat:no-repeat;background-size:4px 4px,4px 4px;border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field));flex-shrink:1;align-items:center;gap:.375rem;padding-inline:1rem 1.75rem;font-size:.875rem;display:inline-flex;position:relative}@supports (color:color-mix(in lab,red,red)){.select{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset}}.select{border-color:var(--input-color);--input-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.select{--input-color:color-mix(in oklab,var(--color-base-content)20%,#0000)}}.select{--size:calc(var(--size-field,.25rem)*10)}[dir=rtl] .select{background-position:12px calc(1px + 50%),16px calc(1px + 50%)}.select select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:inherit;border-radius:inherit;border-style:none;width:calc(100% + 2.75rem);height:calc(100% - 2px);margin-inline:-1rem -1.75rem;padding-inline:1rem 1.75rem}.select select:focus,.select select:focus-within{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.select select:focus,.select select:focus-within{outline-offset:2px;outline:2px solid #0000}}.select select:not(:last-child){background-image:none;margin-inline-end:-1.375rem}.select:focus,.select:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab,red,red)){.select:focus,.select:focus-within{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000)}}.select:focus,.select:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate;z-index:1}.select:has(>select[disabled]),.select:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.select:has(>select[disabled]),.select:is(:disabled,[disabled]){color:color-mix(in oklab,var(--color-base-content)40%,transparent)}}:is(.select:has(>select[disabled]),.select:is(:disabled,[disabled]))::placeholder{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:is(.select:has(>select[disabled]),.select:is(:disabled,[disabled]))::placeholder{color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.select:has(>select[disabled])>select[disabled]{cursor:not-allowed}.card{border-radius:var(--radius-box);outline-offset:2px;outline:0 solid #0000;flex-direction:column;transition:outline .2s ease-in-out;display:flex;position:relative}.card:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.card:focus{outline-offset:2px;outline:2px solid #0000}}.card:focus-visible{outline-color:currentColor}.card :where(figure:first-child){border-start-start-radius:inherit;border-start-end-radius:inherit;border-end-end-radius:unset;border-end-start-radius:unset;overflow:hidden}.card :where(figure:last-child){border-start-start-radius:unset;border-start-end-radius:unset;border-end-end-radius:inherit;border-end-start-radius:inherit;overflow:hidden}.card:where(.card-border){border:var(--border)solid var(--color-base-200)}.card:where(.card-dash){border:var(--border)dashed var(--color-base-200)}.card.image-full{display:grid}.card.image-full>*{grid-row-start:1;grid-column-start:1}.card.image-full>.card-body{color:var(--color-neutral-content);position:relative}.card.image-full :where(figure){border-radius:inherit;overflow:hidden}.card.image-full>figure img{object-fit:cover;filter:brightness(28%);height:100%}.card figure{justify-content:center;align-items:center;display:flex}.card:has(>input:is(input[type=checkbox],input[type=radio])){cursor:pointer;-webkit-user-select:none;user-select:none}.card:has(>:checked){outline:2px solid}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.avatar{vertical-align:middle;display:inline-flex;position:relative}.avatar>div{aspect-ratio:1;display:block;overflow:hidden}.avatar img{object-fit:cover;width:100%;height:100%}.checkbox{border:var(--border)solid var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.checkbox{border:var(--border)solid var(--input-color,color-mix(in oklab,var(--color-base-content)20%,#0000))}}.checkbox{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--radius-selector);vertical-align:middle;color:var(--color-base-content);box-shadow:0 1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 0 #0000 inset,0 0 #0000;--size:calc(var(--size-selector,.25rem)*6);width:var(--size);height:var(--size);background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise);flex-shrink:0;padding:.25rem;transition:background-color .2s,box-shadow .2s;display:inline-block;position:relative}.checkbox:before{--tw-content:"";content:var(--tw-content);opacity:0;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,70% 80%,70% 100%);width:100%;height:100%;box-shadow:0 3px oklch(100% 0 0/calc(var(--depth)*.1)) inset;background-color:currentColor;font-size:1rem;line-height:.75;transition:clip-path .3s .1s,opacity .1s .1s,rotate .3s .1s,translate .3s .1s;display:block;rotate:45deg}.checkbox:focus-visible{outline:2px solid var(--input-color,currentColor);outline-offset:2px}.checkbox:checked,.checkbox[aria-checked=true]{background-color:var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.checkbox:checked,.checkbox[aria-checked=true]{background-color:var(--input-color,color-mix(in oklab,var(--color-base-content)20%,#0000))}}.checkbox:checked,.checkbox[aria-checked=true]{box-shadow:0 0 #0000 inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px oklch(0% 0 0/calc(var(--depth)*.1))}:is(.checkbox:checked,.checkbox[aria-checked=true]):before{clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 0%,70% 0%,70% 100%);opacity:1}@media (forced-colors:active){:is(.checkbox:checked,.checkbox[aria-checked=true]):before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:none}}@media print{:is(.checkbox:checked,.checkbox[aria-checked=true]):before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:none}}.checkbox:indeterminate{background-color:var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.checkbox:indeterminate{background-color:var(--input-color,color-mix(in oklab,var(--color-base-content)20%,#0000))}}.checkbox:indeterminate:before{opacity:1;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,80% 80%,80% 100%);translate:0 -35%;rotate:none}.checkbox:disabled{cursor:not-allowed;opacity:.2}.radio{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;vertical-align:middle;border:var(--border)solid var(--input-color,currentColor);border-radius:3.40282e38px;flex-shrink:0;padding:.25rem;display:inline-block;position:relative}@supports (color:color-mix(in lab,red,red)){.radio{border:var(--border)solid var(--input-color,color-mix(in srgb,currentColor 20%,#0000))}}.radio{box-shadow:0 1px oklch(0% 0 0/calc(var(--depth)*.1)) inset;--size:calc(var(--size-selector,.25rem)*6);width:var(--size);height:var(--size);color:var(--input-color,currentColor)}.radio:before{--tw-content:"";content:var(--tw-content);background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise);border-radius:3.40282e38px;width:100%;height:100%;display:block}.radio:focus-visible{outline:2px solid}.radio:checked,.radio[aria-checked=true]{background-color:var(--color-base-100);border-color:currentColor;animation:.2s ease-out radio}:is(.radio:checked,.radio[aria-checked=true]):before{box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px oklch(0% 0 0/calc(var(--depth)*.1));background-color:currentColor}@media (forced-colors:active){:is(.radio:checked,.radio[aria-checked=true]):before{outline-style:var(--tw-outline-style);outline-offset:-1px;outline-width:1px}}@media print{:is(.radio:checked,.radio[aria-checked=true]):before{outline-offset:-1rem;outline:.25rem solid}}.radio:disabled{cursor:not-allowed;opacity:.2}.rating{vertical-align:middle;display:inline-flex;position:relative}.rating input{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none}.rating :where(*){background-color:var(--color-base-content);opacity:.2;border-radius:0;width:1.5rem;height:1.5rem;animation:.25s ease-out rating}.rating :where(*):is(input){cursor:pointer}.rating .rating-hidden{background-color:#0000;width:.5rem}.rating input[type=radio]:checked{background-image:none}.rating :checked,.rating [aria-checked=true],.rating [aria-current=true],.rating :has(~:checked,~[aria-checked=true],~[aria-current=true]){opacity:1}.rating :focus-visible{transition:scale .2s ease-out;scale:1.1}.rating :active:focus{animation:none;scale:1.1}.rating.rating-xs :where(:not(.rating-hidden)){width:1rem;height:1rem}.rating.rating-sm :where(:not(.rating-hidden)){width:1.25rem;height:1.25rem}.rating.rating-md :where(:not(.rating-hidden)){width:1.5rem;height:1.5rem}.rating.rating-lg :where(:not(.rating-hidden)){width:1.75rem;height:1.75rem}.rating.rating-xl :where(:not(.rating-hidden)){width:2rem;height:2rem}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.tooltip-bottom>.tooltip-content,.tooltip-bottom[data-tip]:before{transform:translate(-50%)translateY(var(--tt-pos,-.25rem));inset:var(--tt-off)auto auto 50%}.tooltip-bottom:after{transform:translate(-50%)translateY(var(--tt-pos,-.25rem))rotate(180deg);inset:var(--tt-tail)auto auto 50%}.tooltip-right>.tooltip-content,.tooltip-right[data-tip]:before{transform:translate(calc(var(--tt-pos,-.25rem) + .25rem))translateY(-50%);inset:50% auto auto var(--tt-off)}.tooltip-right:after{transform:translate(var(--tt-pos,-.25rem))translateY(-50%)rotate(90deg);inset:50% auto auto calc(var(--tt-tail) + 1px)}.inset-0{inset:calc(var(--spacing)*0)}.dropdown-center{--anchor-h:center}.dropdown-center :where(.dropdown-content){inset-inline-end:50%;translate:50%}[dir=rtl] :is(.dropdown-center :where(.dropdown-content)){translate:-50%}.dropdown-center.dropdown-left{--anchor-h:left;--anchor-v:center}.dropdown-center.dropdown-left .dropdown-content{top:auto;bottom:50%;translate:0 50%}.dropdown-center.dropdown-right{--anchor-h:right;--anchor-v:center}.dropdown-center.dropdown-right .dropdown-content{top:auto;bottom:50%;translate:0 50%}.dropdown-end{--anchor-h:span-left}.dropdown-end :where(.dropdown-content){inset-inline-end:0;translate:0}[dir=rtl] :is(.dropdown-end :where(.dropdown-content)){translate:0}.dropdown-end.dropdown-left{--anchor-h:left;--anchor-v:span-top}.dropdown-end.dropdown-left .dropdown-content{top:auto;bottom:0}.dropdown-end.dropdown-right{--anchor-h:right;--anchor-v:span-top}.dropdown-end.dropdown-right .dropdown-content{top:auto;bottom:0}.dropdown-top{--anchor-v:top}.dropdown-top .dropdown-content{transform-origin:bottom;top:auto;bottom:100%}.center-absolute{--tw-translate-x: -50% ;--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y);top:50%;left:50%}.\!top-15{top:calc(var(--spacing)*15)!important}.-top-4{top:calc(var(--spacing)*-4)}.-top-15{top:calc(var(--spacing)*-15)}.top-0{top:calc(var(--spacing)*0)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.top-4{top:calc(var(--spacing)*4)}.top-8{top:calc(var(--spacing)*8)}.top-10{top:calc(var(--spacing)*10)}.top-\[50\%\]{top:50%}.-right-1{right:calc(var(--spacing)*-1)}.-right-2{right:calc(var(--spacing)*-2)}.-right-4{right:calc(var(--spacing)*-4)}.right-0{right:calc(var(--spacing)*0)}.right-1{right:calc(var(--spacing)*1)}.right-2{right:calc(var(--spacing)*2)}.right-3{right:calc(var(--spacing)*3)}.right-4{right:calc(var(--spacing)*4)}.right-5{right:calc(var(--spacing)*5)}.-bottom-1{bottom:calc(var(--spacing)*-1)}.-bottom-4\.5{bottom:calc(var(--spacing)*-4.5)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-1{bottom:calc(var(--spacing)*1)}.bottom-3{bottom:calc(var(--spacing)*3)}.bottom-5{bottom:calc(var(--spacing)*5)}.-left-1{left:calc(var(--spacing)*-1)}.-left-2{left:calc(var(--spacing)*-2)}.left-0{left:calc(var(--spacing)*0)}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-3{left:calc(var(--spacing)*3)}.left-\[50\%\]{left:50%}.left-full{left:100%}.textarea{border:var(--border)solid #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--radius-field);background-color:var(--color-base-100);vertical-align:middle;touch-action:manipulation;border-color:var(--input-color);width:clamp(3rem,20rem,100%);min-height:5rem;box-shadow:0 1px var(--input-color) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset;flex-shrink:1;padding-block:.5rem;padding-inline:.75rem;font-size:.875rem}@supports (color:color-mix(in lab,red,red)){.textarea{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset}}.textarea{--input-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.textarea{--input-color:color-mix(in oklab,var(--color-base-content)20%,#0000)}}.textarea textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#0000;border:none}.textarea textarea:focus,.textarea textarea:focus-within{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.textarea textarea:focus,.textarea textarea:focus-within{outline-offset:2px;outline:2px solid #0000}}.textarea:focus,.textarea:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab,red,red)){.textarea:focus,.textarea:focus-within{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000)}}.textarea:focus,.textarea:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate}.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]){color:color-mix(in oklab,var(--color-base-content)40%,transparent)}}:is(.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]))::placeholder{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:is(.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]))::placeholder{color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]){box-shadow:none}.textarea:has(>textarea[disabled])>textarea[disabled]{cursor:not-allowed}.isolate{isolation:isolate}.modal-backdrop{color:#0000;z-index:-1;grid-row-start:1;grid-column-start:1;place-self:stretch stretch;display:grid}.modal-backdrop button{cursor:pointer}.z-1{z-index:1}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-100{z-index:100}.tab-content{order:var(--tabcontent-order);--tabcontent-radius-ss:0;--tabcontent-radius-se:0;--tabcontent-radius-es:0;--tabcontent-radius-ee:0;--tabcontent-order:1;width:100%;margin:var(--tabcontent-margin);border-color:#0000;border-width:var(--border);border-start-start-radius:var(--tabcontent-radius-ss);border-start-end-radius:var(--tabcontent-radius-se);border-end-end-radius:var(--tabcontent-radius-ee);border-end-start-radius:var(--tabcontent-radius-es);display:none}.modal-box{background-color:var(--color-base-100);border-top-left-radius:var(--modal-tl,var(--radius-box));border-top-right-radius:var(--modal-tr,var(--radius-box));border-bottom-left-radius:var(--modal-bl,var(--radius-box));border-bottom-right-radius:var(--modal-br,var(--radius-box));opacity:0;overscroll-behavior:contain;grid-row-start:1;grid-column-start:1;width:91.6667%;max-width:32rem;max-height:100vh;padding:1.5rem;transition:translate .3s ease-out,scale .3s ease-out,opacity .2s ease-out 50ms,box-shadow .3s ease-out;overflow-y:auto;scale:95%;box-shadow:0 25px 50px -12px #00000040}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.divider{white-space:nowrap;height:1rem;margin:var(--divider-m,1rem 0);--divider-color:var(--color-base-content);flex-direction:row;align-self:stretch;align-items:center;display:flex}@supports (color:color-mix(in lab,red,red)){.divider{--divider-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.divider:before,.divider:after{content:"";background-color:var(--divider-color);flex-grow:1;width:100%;height:.125rem}@media print{.divider:before,.divider:after{border:.5px solid}}.divider:not(:empty){gap:1rem}.number-input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.number-input[type=number]{-moz-appearance:textfield}.m-1{margin:calc(var(--spacing)*1)}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.mx-0\.5{margin-inline:calc(var(--spacing)*.5)}.mx-auto{margin-inline:auto}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.my-4{margin-block:calc(var(--spacing)*4)}.my-6{margin-block:calc(var(--spacing)*6)}.label{white-space:nowrap;color:currentColor;align-items:center;gap:.375rem;display:inline-flex}@supports (color:color-mix(in lab,red,red)){.label{color:color-mix(in oklab,currentColor 60%,transparent)}}.label:has(input){cursor:pointer}.label:is(.input>*,.select>*){white-space:nowrap;height:calc(100% - .5rem);font-size:inherit;align-items:center;padding-inline:.75rem;display:flex}.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border)solid currentColor;margin-inline:-.75rem .75rem}@supports (color:color-mix(in lab,red,red)){.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border)solid color-mix(in oklab,currentColor 10%,#0000)}}.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border)solid currentColor;margin-inline:.75rem -.75rem}@supports (color:color-mix(in lab,red,red)){.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border)solid color-mix(in oklab,currentColor 10%,#0000)}}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);margin-top:1.2em;margin-bottom:1.2em;font-size:1.25em;line-height:1.6}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);font-weight:500;text-decoration:underline}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:decimal}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:disc}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-counters);font-weight:400}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.25em;font-weight:600}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em;font-style:italic;font-weight:500}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:0;margin-bottom:.888889em;font-size:2.25em;font-weight:800;line-height:1.11111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:900}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:2em;margin-bottom:1em;font-size:1.5em;font-weight:700;line-height:1.33333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:800}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.6em;margin-bottom:.6em;font-size:1.25em;font-weight:600;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.5em;margin-bottom:.5em;font-weight:600;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em;display:block}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows)/10%),0 3px rgb(var(--tw-prose-kbd-shadows)/10%);padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;border-radius:.3125rem;padding-inline-start:.375em;font-family:inherit;font-size:.875em;font-weight:500}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-size:.875em;font-weight:600}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before,.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);padding-top:.857143em;padding-inline-end:1.14286em;padding-bottom:.857143em;border-radius:.375rem;margin-top:1.71429em;margin-bottom:1.71429em;padding-inline-start:1.14286em;font-size:.875em;font-weight:400;line-height:1.71429;overflow-x:auto}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit;background-color:#0000;border-width:0;border-radius:0;padding:0}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before,.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){table-layout:auto;width:100%;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.71429}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);vertical-align:bottom;padding-inline-end:.571429em;padding-bottom:.571429em;padding-inline-start:.571429em;font-weight:600}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);margin-top:.857143em;font-size:.875em;line-height:1.42857}.prose{--tw-prose-body:oklch(37.3% .034 259.733);--tw-prose-headings:oklch(21% .034 264.665);--tw-prose-lead:oklch(44.6% .03 256.802);--tw-prose-links:oklch(21% .034 264.665);--tw-prose-bold:oklch(21% .034 264.665);--tw-prose-counters:oklch(55.1% .027 264.364);--tw-prose-bullets:oklch(87.2% .01 258.338);--tw-prose-hr:oklch(92.8% .006 264.531);--tw-prose-quotes:oklch(21% .034 264.665);--tw-prose-quote-borders:oklch(92.8% .006 264.531);--tw-prose-captions:oklch(55.1% .027 264.364);--tw-prose-kbd:oklch(21% .034 264.665);--tw-prose-kbd-shadows:NaN NaN NaN;--tw-prose-code:oklch(21% .034 264.665);--tw-prose-pre-code:oklch(92.8% .006 264.531);--tw-prose-pre-bg:oklch(27.8% .033 256.848);--tw-prose-th-borders:oklch(87.2% .01 258.338);--tw-prose-td-borders:oklch(92.8% .006 264.531);--tw-prose-invert-body:oklch(87.2% .01 258.338);--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:oklch(70.7% .022 261.325);--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:oklch(70.7% .022 261.325);--tw-prose-invert-bullets:oklch(44.6% .03 256.802);--tw-prose-invert-hr:oklch(37.3% .034 259.733);--tw-prose-invert-quotes:oklch(96.7% .003 264.542);--tw-prose-invert-quote-borders:oklch(37.3% .034 259.733);--tw-prose-invert-captions:oklch(70.7% .022 261.325);--tw-prose-invert-kbd:#fff;--tw-prose-invert-kbd-shadows:255 255 255;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:oklch(87.2% .01 258.338);--tw-prose-invert-pre-bg:#00000080;--tw-prose-invert-th-borders:oklch(44.6% .03 256.802);--tw-prose-invert-td-borders:oklch(37.3% .034 259.733);font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.571429em;padding-inline-end:.571429em;padding-bottom:.571429em;padding-inline-start:.571429em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-5{margin-top:calc(var(--spacing)*5)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-8{margin-top:calc(var(--spacing)*8)}.mt-10{margin-top:calc(var(--spacing)*10)}.mt-18{margin-top:calc(var(--spacing)*18)}.mt-20{margin-top:calc(var(--spacing)*20)}.mr-0\.5{margin-right:calc(var(--spacing)*.5)}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.fieldset-legend{color:var(--color-base-content);justify-content:space-between;align-items:center;gap:.5rem;margin-bottom:-.25rem;padding-block:.5rem;font-weight:600;display:flex}.mb-0\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.ml-0\.5{margin-left:calc(var(--spacing)*.5)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-3{margin-left:calc(var(--spacing)*3)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.status{aspect-ratio:1;border-radius:var(--radius-selector);background-color:var(--color-base-content);width:.5rem;height:.5rem;display:inline-block}@supports (color:color-mix(in lab,red,red)){.status{background-color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.status{vertical-align:middle;color:#0000004d;background-position:50%;background-repeat:no-repeat}@supports (color:color-mix(in lab,red,red)){.status{color:#0000004d}@supports (color:color-mix(in lab,red,red)){.status{color:color-mix(in oklab,var(--color-black)30%,transparent)}}}.status{background-image:radial-gradient(circle at 35% 30%,oklch(1 0 0/calc(var(--depth)*.5)),#0000);box-shadow:0 2px 3px -1px}@supports (color:color-mix(in lab,red,red)){.status{box-shadow:0 2px 3px -1px color-mix(in oklab,currentColor calc(var(--depth)*100%),#0000)}}.badge{border-radius:var(--radius-selector);vertical-align:middle;color:var(--badge-fg);border:var(--border)solid var(--badge-color,var(--color-base-200));width:fit-content;padding-inline:calc(.25rem*3 - var(--border));background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise);background-color:var(--badge-bg);--badge-bg:var(--badge-color,var(--color-base-100));--badge-fg:var(--color-base-content);--size:calc(var(--size-selector,.25rem)*6);height:var(--size);justify-content:center;align-items:center;gap:.5rem;font-size:.875rem;display:inline-flex}.kbd{border-radius:var(--radius-field);background-color:var(--color-base-200);vertical-align:middle;border:var(--border)solid var(--color-base-content);justify-content:center;align-items:center;padding-left:.5em;padding-right:.5em;display:inline-flex}@supports (color:color-mix(in lab,red,red)){.kbd{border:var(--border)solid color-mix(in srgb,var(--color-base-content)20%,#0000)}}.kbd{border-bottom:calc(var(--border) + 1px)solid var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.kbd{border-bottom:calc(var(--border) + 1px)solid color-mix(in srgb,var(--color-base-content)20%,#0000)}}.kbd{--size:calc(var(--size-selector,.25rem)*6);height:var(--size);min-width:var(--size);font-size:.875rem}.tabs{--tabs-height:auto;--tabs-direction:row;--tab-height:calc(var(--size-field,.25rem)*10);height:var(--tabs-height);flex-wrap:wrap;flex-direction:var(--tabs-direction);display:flex}.card-body{padding:var(--card-p,1.5rem);font-size:var(--card-fs,.875rem);flex-direction:column;flex:auto;gap:.5rem;display:flex}.card-body :where(p){flex-grow:1}.alert{border-radius:var(--radius-box);color:var(--color-base-content);background-color:var(--alert-color,var(--color-base-200));text-align:start;border:var(--border)solid var(--color-base-200);background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise);box-shadow:0 3px 0 -2px oklch(100% 0 0/calc(var(--depth)*.08)) inset,0 1px #000,0 4px 3px -2px oklch(0% 0 0/calc(var(--depth)*.08));grid-template-columns:auto;grid-auto-flow:column;justify-content:start;place-items:center start;gap:1rem;padding-block:.75rem;padding-inline:1rem;font-size:.875rem;line-height:1.25rem;display:grid}@supports (color:color-mix(in lab,red,red)){.alert{box-shadow:0 3px 0 -2px oklch(100% 0 0/calc(var(--depth)*.08)) inset,0 1px color-mix(in oklab,color-mix(in oklab,#000 20%,var(--alert-color,var(--color-base-200)))calc(var(--depth)*20%),#0000),0 4px 3px -2px oklch(0% 0 0/calc(var(--depth)*.08))}}.alert:has(:nth-child(2)){grid-template-columns:auto minmax(auto,1fr)}.alert.alert-outline{color:var(--alert-color);box-shadow:none;background-color:#0000;background-image:none}.alert.alert-dash{color:var(--alert-color);box-shadow:none;background-color:#0000;background-image:none;border-style:dashed}.alert.alert-soft{color:var(--alert-color,var(--color-base-content));background:var(--alert-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.alert.alert-soft{background:color-mix(in oklab,var(--alert-color,var(--color-base-content))8%,var(--color-base-100))}}.alert.alert-soft{border-color:var(--alert-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.alert.alert-soft{border-color:color-mix(in oklab,var(--alert-color,var(--color-base-content))10%,var(--color-base-100))}}.alert.alert-soft{box-shadow:none;background-image:none}.fieldset{grid-template-columns:1fr;grid-auto-rows:max-content;gap:.375rem;padding-block:.25rem;font-size:.75rem;display:grid}.join{--join-ss:0;--join-se:0;--join-es:0;--join-ee:0;align-items:stretch;display:inline-flex}.join :where(.join-item){border-start-start-radius:var(--join-ss,0);border-start-end-radius:var(--join-se,0);border-end-end-radius:var(--join-ee,0);border-end-start-radius:var(--join-es,0)}.join :where(.join-item) *{--join-ss:var(--radius-field);--join-se:var(--radius-field);--join-es:var(--radius-field);--join-ee:var(--radius-field)}.join>.join-item:where(:first-child),.join :first-child:not(:last-child) :where(.join-item){--join-ss:var(--radius-field);--join-se:0;--join-es:var(--radius-field);--join-ee:0}.join>.join-item:where(:last-child),.join :last-child:not(:first-child) :where(.join-item){--join-ss:0;--join-se:var(--radius-field);--join-es:0;--join-ee:var(--radius-field)}.join>.join-item:where(:only-child),.join :only-child :where(.join-item){--join-ss:var(--radius-field);--join-se:var(--radius-field);--join-es:var(--radius-field);--join-ee:var(--radius-field)}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:root .prose{--tw-prose-body:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-body:color-mix(in oklab,var(--color-base-content)80%,#0000)}}:root .prose{--tw-prose-headings:var(--color-base-content);--tw-prose-lead:var(--color-base-content);--tw-prose-links:var(--color-base-content);--tw-prose-bold:var(--color-base-content);--tw-prose-counters:var(--color-base-content);--tw-prose-bullets:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-bullets:color-mix(in oklab,var(--color-base-content)50%,#0000)}}:root .prose{--tw-prose-hr:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-hr:color-mix(in oklab,var(--color-base-content)20%,#0000)}}:root .prose{--tw-prose-quotes:var(--color-base-content);--tw-prose-quote-borders:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-quote-borders:color-mix(in oklab,var(--color-base-content)20%,#0000)}}:root .prose{--tw-prose-captions:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-captions:color-mix(in oklab,var(--color-base-content)50%,#0000)}}:root .prose{--tw-prose-code:var(--color-base-content);--tw-prose-pre-code:var(--color-neutral-content);--tw-prose-pre-bg:var(--color-neutral);--tw-prose-th-borders:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-th-borders:color-mix(in oklab,var(--color-base-content)50%,#0000)}}:root .prose{--tw-prose-td-borders:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-td-borders:color-mix(in oklab,var(--color-base-content)20%,#0000)}}:root .prose{--tw-prose-kbd:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-kbd:color-mix(in oklab,var(--color-base-content)80%,#0000)}}:root .prose :where(code):not(pre>code){background-color:var(--color-base-200);border-radius:var(--radius-selector);border:var(--border)solid var(--color-base-300);font-weight:inherit;padding-inline:.5em}:root .prose :where(code):not(pre>code):before,:root .prose :where(code):not(pre>code):after{display:none}.mask{vertical-align:middle;display:inline-block;-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hide-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.hide-scrollbar::-webkit-scrollbar{display:none}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.table{display:table}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.btn-circle{width:var(--size);height:var(--size);border-radius:3.40282e38px;padding-inline:0}.btn-square{width:var(--size);height:var(--size);padding-inline:0}.size-0{width:calc(var(--spacing)*0);height:calc(var(--spacing)*0)}.size-3{width:calc(var(--spacing)*3);height:calc(var(--spacing)*3)}.size-3\.5{width:calc(var(--spacing)*3.5);height:calc(var(--spacing)*3.5)}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-4\.5{width:calc(var(--spacing)*4.5);height:calc(var(--spacing)*4.5)}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-5\.5{width:calc(var(--spacing)*5.5);height:calc(var(--spacing)*5.5)}.size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.size-7{width:calc(var(--spacing)*7);height:calc(var(--spacing)*7)}.size-8{width:calc(var(--spacing)*8);height:calc(var(--spacing)*8)}.size-10{width:calc(var(--spacing)*10);height:calc(var(--spacing)*10)}.size-11{width:calc(var(--spacing)*11);height:calc(var(--spacing)*11)}.size-12{width:calc(var(--spacing)*12);height:calc(var(--spacing)*12)}.size-13{width:calc(var(--spacing)*13);height:calc(var(--spacing)*13)}.size-14{width:calc(var(--spacing)*14);height:calc(var(--spacing)*14)}.size-15{width:calc(var(--spacing)*15);height:calc(var(--spacing)*15)}.size-16{width:calc(var(--spacing)*16);height:calc(var(--spacing)*16)}.size-20{width:calc(var(--spacing)*20);height:calc(var(--spacing)*20)}.size-26{width:calc(var(--spacing)*26);height:calc(var(--spacing)*26)}.size-30{width:calc(var(--spacing)*30);height:calc(var(--spacing)*30)}.size-32{width:calc(var(--spacing)*32);height:calc(var(--spacing)*32)}.size-52{width:calc(var(--spacing)*52);height:calc(var(--spacing)*52)}.size-\[95\%\]{width:95%;height:95%}.size-full{width:100%;height:100%}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-11\/12{height:91.6667%}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-20{height:calc(var(--spacing)*20)}.h-24{height:calc(var(--spacing)*24)}.h-72{height:calc(var(--spacing)*72)}.h-96{height:calc(var(--spacing)*96)}.h-\[90\%\]{height:90%}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-11\/12{max-height:91.6667%}.max-h-\[70vh\]{max-height:70vh}.max-h-\[97\%\]{max-height:97%}.max-h-\[300px\]{max-height:300px}.loading-lg{width:calc(var(--size-selector,.25rem)*7)}.loading-md{width:calc(var(--size-selector,.25rem)*6)}.loading-xl{width:calc(var(--size-selector,.25rem)*8)}.loading-xs{width:calc(var(--size-selector,.25rem)*4)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-11\/12{width:91.6667%}.w-16{width:calc(var(--spacing)*16)}.w-32{width:calc(var(--spacing)*32)}.w-40{width:calc(var(--spacing)*40)}.w-44{width:calc(var(--spacing)*44)}.w-46{width:calc(var(--spacing)*46)}.w-52{width:calc(var(--spacing)*52)}.w-70{width:calc(var(--spacing)*70)}.w-\[min\(100vw-24px\,400px\)\]{width:min(100vw - 24px,400px)}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-16{max-width:calc(var(--spacing)*16)}.max-w-54{max-width:calc(var(--spacing)*54)}.max-w-74{max-width:calc(var(--spacing)*74)}.max-w-\[1920px\]{max-width:1920px}.max-w-\[calc\(100\%-2rem\)\]{max-width:calc(100% - 2rem)}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.min-w-10{min-width:calc(var(--spacing)*10)}.grow{flex-grow:1}.translate-1\/2{--tw-translate-x: 50% ;--tw-translate-y: 50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.\!-translate-y-1\/2{--tw-translate-y: -50% !important;translate:var(--tw-translate-x)var(--tw-translate-y)!important}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-0\.5{--tw-translate-y:calc(var(--spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-1{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-1\/2{--tw-translate-y: 50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-2{--tw-translate-y:calc(var(--spacing)*2);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-\[3\]{scale:3}.rotate-\[215deg\]{rotate:215deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.skeleton{border-radius:var(--radius-box);background-color:var(--color-base-300)}@media (prefers-reduced-motion:reduce){.skeleton{transition-duration:15s}}.skeleton{will-change:background-position;background-image:linear-gradient(105deg,#0000 0% 40%,var(--color-base-100)50%,#0000 60% 100%);background-position-x:-50%;background-repeat:no-repeat;background-size:200%;animation:1.8s ease-in-out infinite skeleton}.animate-bounce{animation:var(--animate-bounce)}.animate-caret-blink{animation:1.25s ease-out infinite caret-blink}.animate-pulse{animation:var(--animate-pulse)}.highlight-link a{cursor:pointer;color:var(--color-primary);text-decoration-line:none}.link{cursor:pointer;text-decoration-line:underline}.link:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.link:focus{outline-offset:2px;outline:2px solid #0000}}.link:focus-visible{outline-offset:2px;outline:2px solid}.cursor-auto{cursor:auto}.cursor-default{cursor:default}.cursor-eraser{cursor:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAFxJREFUeNq107EJACAMRFEHyxSu4jbuZ+0IyhUS4ZDogYEr3++Svp+ZDUzGrRTMIwKmiIApImCKiBgbOXOEcRxQsQcW7rVKeA9gj5gD2D3mgC/GcQSLMEdO+/qtE+/GV5duYCOPAAAAAElFTkSuQmCC) 2 14,default}.cursor-not-allowed{cursor:not-allowed}.cursor-pencil{cursor:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAAXNSR0IArs4c6QAAAAJ0Uk5TAAB2k804AAAAKklEQVR42mOAAhsbCA3n//9vQ74ApqE2QIAgwIqBykFaICwMAQwt9HEpAIf2Me1Ro5Q9AAAAAElFTkSuQmCC) 8 8,default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.scroll-py-1{scroll-padding-block:calc(var(--spacing)*1)}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.grid-cols-\[350px_1fr\]{grid-template-columns:350px 1fr}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-5{gap:calc(var(--spacing)*5)}.gap-6{gap:calc(var(--spacing)*6)}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.tabs-box{background-color:var(--color-base-200);--tabs-box-radius:calc(var(--radius-field) + var(--radius-field) + var(--radius-field));border-radius:calc(var(--radius-field) + min(.25rem,var(--tabs-box-radius)));box-shadow:0 -.5px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 .5px oklch(0% 0 0/calc(var(--depth)*.05)) inset;padding:.25rem}.tabs-box .tab{border-radius:var(--radius-field);border-style:none}.tabs-box .tab:focus-visible,.tabs-box .tab:is(label:has(:checked:focus-visible)){outline-offset:2px}.tabs-box>:is(.tab-active,[aria-selected=true]):not(.tab-disabled,[disabled]),.tabs-box>:is(input:checked),.tabs-box>:is(label:has(:checked)){background-color:var(--tab-bg,var(--color-base-100));box-shadow:0 1px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px 1px -1px var(--color-neutral),0 1px 6px -4px var(--color-neutral)}@supports (color:color-mix(in lab,red,red)){.tabs-box>:is(.tab-active,[aria-selected=true]):not(.tab-disabled,[disabled]),.tabs-box>:is(input:checked),.tabs-box>:is(label:has(:checked)){box-shadow:0 1px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px 1px -1px color-mix(in oklab,var(--color-neutral)calc(var(--depth)*50%),#0000),0 1px 6px -4px color-mix(in oklab,var(--color-neutral)calc(var(--depth)*100%),#0000)}}@media (forced-colors:active){.tabs-box>:is(.tab-active,[aria-selected=true]):not(.tab-disabled,[disabled]),.tabs-box>:is(input:checked),.tabs-box>:is(label:has(:checked)){border:1px solid}}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-box{border-radius:var(--radius-box)}.rounded-field{border-radius:var(--radius-field)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-xs{border-radius:var(--radius-xs)}.rounded-t-box{border-top-left-radius:var(--radius-box);border-top-right-radius:var(--radius-box)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-6{border-style:var(--tw-border-style);border-width:6px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.badge-soft{color:var(--badge-color,var(--color-base-content));background-color:var(--badge-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.badge-soft{background-color:color-mix(in oklab,var(--badge-color,var(--color-base-content))8%,var(--color-base-100))}}.badge-soft{border-color:var(--badge-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.badge-soft{border-color:color-mix(in oklab,var(--badge-color,var(--color-base-content))10%,var(--color-base-100))}}.badge-soft{background-image:none}.border-base-200{border-color:var(--color-base-200)}.border-base-300{border-color:var(--color-base-300)}.border-base-content\/10{border-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.border-base-content\/10{border-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.border-base-content\/20{border-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.border-base-content\/20{border-color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.border-base-content\/30{border-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.border-base-content\/30{border-color:color-mix(in oklab,var(--color-base-content)30%,transparent)}}.border-black{border-color:var(--color-black)}.border-primary{border-color:var(--color-primary)}.\!bg-black\/80{background-color:#000c!important}@supports (color:color-mix(in lab,red,red)){.\!bg-black\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)!important}}.\!bg-black\/90{background-color:#000000e6!important}@supports (color:color-mix(in lab,red,red)){.\!bg-black\/90{background-color:color-mix(in oklab,var(--color-black)90%,transparent)!important}}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/10{background-color:color-mix(in oklab,var(--color-amber-500)10%,transparent)}}.bg-base-100,.bg-base-100\/60{background-color:var(--color-base-100)}@supports (color:color-mix(in lab,red,red)){.bg-base-100\/60{background-color:color-mix(in oklab,var(--color-base-100)60%,transparent)}}.bg-base-100\/70{background-color:var(--color-base-100)}@supports (color:color-mix(in lab,red,red)){.bg-base-100\/70{background-color:color-mix(in oklab,var(--color-base-100)70%,transparent)}}.bg-base-200{background-color:var(--color-base-200)}.bg-base-300{background-color:var(--color-base-300)}.bg-base-content\/10{background-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.bg-base-content\/10{background-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.bg-base-content\/20{background-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.bg-base-content\/20{background-color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.bg-base-content\/80{background-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.bg-base-content\/80{background-color:color-mix(in oklab,var(--color-base-content)80%,transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-blue-500\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/10{background-color:color-mix(in oklab,var(--color-blue-500)10%,transparent)}}.bg-cyan-500\/10{background-color:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/10{background-color:color-mix(in oklab,var(--color-cyan-500)10%,transparent)}}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/10{background-color:color-mix(in oklab,var(--color-emerald-500)10%,transparent)}}.bg-fuchsia-500\/10{background-color:#e12afb1a}@supports (color:color-mix(in lab,red,red)){.bg-fuchsia-500\/10{background-color:color-mix(in oklab,var(--color-fuchsia-500)10%,transparent)}}.bg-green-500\/10{background-color:#00c7581a}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/10{background-color:color-mix(in oklab,var(--color-green-500)10%,transparent)}}.bg-indigo-500\/10{background-color:#625fff1a}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/10{background-color:color-mix(in oklab,var(--color-indigo-500)10%,transparent)}}.bg-lime-500\/10{background-color:#80cd001a}@supports (color:color-mix(in lab,red,red)){.bg-lime-500\/10{background-color:color-mix(in oklab,var(--color-lime-500)10%,transparent)}}.bg-orange-500\/10{background-color:#fe6e001a}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/10{background-color:color-mix(in oklab,var(--color-orange-500)10%,transparent)}}.bg-pink-500\/10{background-color:#f6339a1a}@supports (color:color-mix(in lab,red,red)){.bg-pink-500\/10{background-color:color-mix(in oklab,var(--color-pink-500)10%,transparent)}}.bg-primary\/10{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\/10{background-color:color-mix(in oklab,var(--color-primary)10%,transparent)}}.bg-purple-500\/10{background-color:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/10{background-color:color-mix(in oklab,var(--color-purple-500)10%,transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.bg-rose-500\/10{background-color:#ff23571a}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/10{background-color:color-mix(in oklab,var(--color-rose-500)10%,transparent)}}.bg-secondary{background-color:var(--color-secondary)}.bg-sky-500\/10{background-color:#00a5ef1a}@supports (color:color-mix(in lab,red,red)){.bg-sky-500\/10{background-color:color-mix(in oklab,var(--color-sky-500)10%,transparent)}}.bg-teal-500\/10{background-color:#00baa71a}@supports (color:color-mix(in lab,red,red)){.bg-teal-500\/10{background-color:color-mix(in oklab,var(--color-teal-500)10%,transparent)}}.bg-transparent{background-color:#0000}.bg-violet-500\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/10{background-color:color-mix(in oklab,var(--color-violet-500)10%,transparent)}}.bg-warning{background-color:var(--color-warning)}.bg-yellow-500\/10{background-color:#edb2001a}@supports (color:color-mix(in lab,red,red)){.bg-yellow-500\/10{background-color:color-mix(in oklab,var(--color-yellow-500)10%,transparent)}}.loading-dots{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='4' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' keySplines='.33,0,.66,.33;.33,.66,.66,1'/%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' keySplines='.33,0,.66,.33;.33,.66,.66,1' begin='0.1s'/%3E%3C/circle%3E%3Ccircle cx='20' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' keySplines='.33,0,.66,.33;.33,.66,.66,1' begin='0.2s'/%3E%3C/circle%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='4' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' keySplines='.33,0,.66,.33;.33,.66,.66,1'/%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' keySplines='.33,0,.66,.33;.33,.66,.66,1' begin='0.1s'/%3E%3C/circle%3E%3Ccircle cx='20' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' keySplines='.33,0,.66,.33;.33,.66,.66,1' begin='0.2s'/%3E%3C/circle%3E%3C/svg%3E")}.loading-spinner{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}.fill-blue-800{fill:var(--color-blue-800)}.fill-primary{fill:var(--color-primary)}.fill-red-400{fill:var(--color-red-400)}.checkbox-xs{--size:calc(var(--size-selector,.25rem)*4);padding:.125rem}.radio-sm{padding:.1875rem}.radio-sm[type=radio]{--size:calc(var(--size-selector,.25rem)*5)}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-2\.5{padding:calc(var(--spacing)*2.5)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.badge-lg{--size:calc(var(--size-selector,.25rem)*7);padding-inline:calc(.25rem*3.5 - var(--border));font-size:1rem}.badge-sm{--size:calc(var(--size-selector,.25rem)*5);padding-inline:calc(.25rem*2.5 - var(--border));font-size:.75rem}.badge-xs{--size:calc(var(--size-selector,.25rem)*4);padding-inline:calc(.25rem*2 - var(--border));font-size:.625rem}.px-0{padding-inline:calc(var(--spacing)*0)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-\[5px\]{padding-inline:5px}.py-0{padding-block:calc(var(--spacing)*0)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-6{padding-top:calc(var(--spacing)*6)}.pt-20{padding-top:calc(var(--spacing)*20)}.pr-1{padding-right:calc(var(--spacing)*1)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-2\.5{padding-right:calc(var(--spacing)*2.5)}.pr-8{padding-right:calc(var(--spacing)*8)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-12\!{padding-left:calc(var(--spacing)*12)!important}.text-center{text-align:center}.text-start{text-align:start}.font-flag{font-family:"Noto Color Emoji","Geist",var(--font-sans)}.font-pixel{font-family:"Pixelify Sans",var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-7xl{font-size:var(--text-7xl);line-height:var(--tw-leading,var(--text-7xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.kbd-sm{--size:calc(var(--size-selector,.25rem)*5);font-size:.75rem}.kbd-xs{--size:calc(var(--size-selector,.25rem)*4);font-size:.625rem}.text-\[10px\]{font-size:10px}.leading-none{--tw-leading:1;line-height:1}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-nowrap{text-wrap:nowrap}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-base-content,.text-base-content\/20{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.text-base-content\/20{color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.text-base-content\/50{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.text-base-content\/50{color:color-mix(in oklab,var(--color-base-content)50%,transparent)}}.text-base-content\/60{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.text-base-content\/60{color:color-mix(in oklab,var(--color-base-content)60%,transparent)}}.text-base-content\/80{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.text-base-content\/80{color:color-mix(in oklab,var(--color-base-content)80%,transparent)}}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-cyan-500{color:var(--color-cyan-500)}.text-emerald-500{color:var(--color-emerald-500)}.text-error{color:var(--color-error)}.text-fuchsia-500{color:var(--color-fuchsia-500)}.text-green-500{color:var(--color-green-500)}.text-indigo-500{color:var(--color-indigo-500)}.text-lime-500{color:var(--color-lime-500)}.text-orange-500{color:var(--color-orange-500)}.text-pink-500{color:var(--color-pink-500)}.text-primary{color:var(--color-primary)}.text-primary-content{color:var(--color-primary-content)}.text-primary\/80{color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.text-primary\/80{color:color-mix(in oklab,var(--color-primary)80%,transparent)}}.text-purple-500{color:var(--color-purple-500)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-rose-500{color:var(--color-rose-500)}.text-secondary{color:var(--color-secondary)}.text-sky-500{color:var(--color-sky-500)}.text-teal-500{color:var(--color-teal-500)}.text-violet-500{color:var(--color-violet-500)}.text-warning-content{color:var(--color-warning-content)}.text-yellow-400{color:var(--color-yellow-400)}.text-yellow-500{color:var(--color-yellow-500)}.underline{text-decoration-line:underline}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-base-content\/40{--tw-ring-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.ring-base-content\/40{--tw-ring-color:color-mix(in oklab,var(--color-base-content)40%,transparent)}}.ring-primary{--tw-ring-color:var(--color-primary)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.btn-ghost:not(.btn-active,:hover,:active:focus,:focus-visible){--btn-shadow:"";--btn-bg:#0000;--btn-border:#0000;--btn-noise:none}.btn-ghost:not(.btn-active,:hover,:active:focus,:focus-visible):not(:disabled,[disabled],.btn-disabled){--btn-fg:currentColor;outline-color:currentColor}@media (hover:none){.btn-ghost:hover:not(.btn-active,:active,:focus-visible,:disabled,[disabled],.btn-disabled){--btn-shadow:"";--btn-bg:#0000;--btn-border:#0000;--btn-noise:none;--btn-fg:currentColor}}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-1000{--tw-duration:1s;transition-duration:1s}.btn-soft:not(.btn-active,:hover,:active:focus,:focus-visible,:disabled,[disabled],.btn-disabled){--btn-shadow:"";--btn-fg:var(--btn-color,var(--color-base-content));--btn-bg:var(--btn-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.btn-soft:not(.btn-active,:hover,:active:focus,:focus-visible,:disabled,[disabled],.btn-disabled){--btn-bg:color-mix(in oklab,var(--btn-color,var(--color-base-content))8%,var(--color-base-100))}}.btn-soft:not(.btn-active,:hover,:active:focus,:focus-visible,:disabled,[disabled],.btn-disabled){--btn-border:var(--btn-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.btn-soft:not(.btn-active,:hover,:active:focus,:focus-visible,:disabled,[disabled],.btn-disabled){--btn-border:color-mix(in oklab,var(--btn-color,var(--color-base-content))10%,var(--color-base-100))}}.btn-soft:not(.btn-active,:hover,:active:focus,:focus-visible,:disabled,[disabled],.btn-disabled){--btn-noise:none}@media (hover:none){.btn-soft:hover:not(.btn-active,:active,:focus-visible,:disabled,[disabled],.btn-disabled){--btn-shadow:"";--btn-fg:var(--btn-color,var(--color-base-content));--btn-bg:var(--btn-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.btn-soft:hover:not(.btn-active,:active,:focus-visible,:disabled,[disabled],.btn-disabled){--btn-bg:color-mix(in oklab,var(--btn-color,var(--color-base-content))8%,var(--color-base-100))}}.btn-soft:hover:not(.btn-active,:active,:focus-visible,:disabled,[disabled],.btn-disabled){--btn-border:var(--btn-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.btn-soft:hover:not(.btn-active,:active,:focus-visible,:disabled,[disabled],.btn-disabled){--btn-border:color-mix(in oklab,var(--btn-color,var(--color-base-content))10%,var(--color-base-100))}}.btn-soft:hover:not(.btn-active,:active,:focus-visible,:disabled,[disabled],.btn-disabled){--btn-noise:none}}.indicator-center{--indicator-s:50%;--indicator-e:50%;--indicator-x:-50%}[dir=rtl] .indicator-center{--indicator-x:50%}.btn-lg{--fontsize:1.125rem;--btn-p:1.25rem;--size:calc(var(--size-field,.25rem)*12)}.btn-sm{--fontsize:.75rem;--btn-p:.75rem;--size:calc(var(--size-field,.25rem)*8)}.btn-xl{--fontsize:1.375rem;--btn-p:1.5rem;--size:calc(var(--size-field,.25rem)*14)}.btn-xs{--fontsize:.6875rem;--btn-p:.5rem;--size:calc(var(--size-field,.25rem)*6)}.indicator-bottom{--indicator-t:auto;--indicator-b:0;--indicator-y:50%}.pixelated{image-rendering:pixelated;image-rendering:-moz-crisp-edges;image-rendering:crisp-edges}.badge-error{--badge-color:var(--color-error);--badge-fg:var(--color-error-content)}.badge-primary{--badge-color:var(--color-primary);--badge-fg:var(--color-primary-content)}.badge-secondary{--badge-color:var(--color-secondary);--badge-fg:var(--color-secondary-content)}.badge-warning{--badge-color:var(--color-warning);--badge-fg:var(--color-warning-content)}.btn-error{--btn-color:var(--color-error);--btn-fg:var(--color-error-content)}.btn-primary{--btn-color:var(--color-primary);--btn-fg:var(--color-primary-content)}.btn-success{--btn-color:var(--color-success);--btn-fg:var(--color-success-content)}.btn-warning{--btn-color:var(--color-warning);--btn-fg:var(--color-warning-content)}.select-none{-webkit-user-select:none;user-select:none}.input-error,.input-error:focus,.input-error:focus-within,.textarea-error,.textarea-error:focus,.textarea-error:focus-within{--input-color:var(--color-error)}.not-hover\:text-error:not(:hover){color:var(--color-error)}@media not all and (hover:hover){.not-hover\:text-error{color:var(--color-error)}}@media not all and (pointer:coarse){.not-touchscreen\:hidden{display:none}.not-touchscreen\:-translate-x-\[10\%\]{--tw-translate-x: -10% ;translate:var(--tw-translate-x)var(--tw-translate-y)}}@media not all and (display-mode:standalone){.not-pwa\:hidden{display:none}}.not-stuck\:border-transparent:not(.stuck){border-color:#0000}.peer-focus\:block:is(:where(.peer):focus~*){display:block}.before\:-translate-x-1\/3:before{content:var(--tw-content);--tw-translate-x:calc(calc(1/3*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.before\:-translate-x-1\/4:before{content:var(--tw-content);--tw-translate-x: -25% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.before\:translate-x-1\/4:before{content:var(--tw-content);--tw-translate-x: 25% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.first\:rounded-l-md:first-child{border-top-left-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md)}.first\:border-l:first-child{border-left-style:var(--tw-border-style);border-left-width:1px}.last\:rounded-r-md:last-child{border-top-right-radius:var(--radius-md);border-bottom-right-radius:var(--radius-md)}@media (hover:hover){.hover\:opacity-100:hover{opacity:1}.hover\:brightness-95:hover{--tw-brightness:brightness(95%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled,.has-\[\:disabled\]\:opacity-50:has(:disabled){opacity:.5}.aria-selected\:bg-accent[aria-selected=true]{background-color:var(--color-accent)}.aria-selected\:bg-base-300[aria-selected=true]{background-color:var(--color-base-300)}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}:is(.\*\*\:data-\[slot\=command-input-wrapper\]\:h-12 *)[data-slot=command-input-wrapper]{height:calc(var(--spacing)*12)}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=open\]\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}@media not all and (min-width:400px){.max-\[400px\]\:hidden{display:none}}@media not all and (min-width:380px){.max-\[380px\]\:px-3{padding-inline:calc(var(--spacing)*3)}}@media not all and (min-width:80rem){.max-xl\:before\:-translate-x-1\/4:before{content:var(--tw-content);--tw-translate-x: -25% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.max-xl\:before\:translate-x-1\/4:before{content:var(--tw-content);--tw-translate-x: 25% ;translate:var(--tw-translate-x)var(--tw-translate-y)}}@media not all and (min-width:64rem){.max-lg\:pointer-events-none{pointer-events:none}.max-lg\:invisible{visibility:hidden}}@media not all and (min-width:40rem){.max-sm\:absolute{position:absolute}.max-sm\:dropdown-left{--anchor-h:left;--anchor-v:span-bottom}.max-sm\:dropdown-left .dropdown-content{transform-origin:100%;inset-inline-end:100%;top:0;bottom:auto}.max-sm\:dropdown-top{--anchor-v:top}.max-sm\:dropdown-top .dropdown-content{transform-origin:bottom;top:auto;bottom:100%}.max-sm\:bottom-4{bottom:calc(var(--spacing)*4)}.max-sm\:mt-1{margin-top:calc(var(--spacing)*1)}.max-sm\:mt-4{margin-top:calc(var(--spacing)*4)}.max-sm\:ml-2{margin-left:calc(var(--spacing)*2)}.max-sm\:hidden{display:none}.max-sm\:size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.max-sm\:size-full{width:100%;height:100%}.max-sm\:h-6{height:calc(var(--spacing)*6)}.max-sm\:h-10{height:calc(var(--spacing)*10)}.max-sm\:w-\[calc\(100\%-2rem\)\]{width:calc(100% - 2rem)}.max-sm\:max-w-32{max-width:calc(var(--spacing)*32)}.max-sm\:overflow-hidden{overflow:hidden}.max-sm\:overflow-x-hidden{overflow-x:hidden}.max-sm\:rounded-md{border-radius:var(--radius-md)}.max-sm\:rounded-none{border-radius:0}.max-sm\:px-1{padding-inline:calc(var(--spacing)*1)}.max-sm\:px-3{padding-inline:calc(var(--spacing)*3)}.max-sm\:px-4{padding-inline:calc(var(--spacing)*4)}.max-sm\:py-5{padding-block:calc(var(--spacing)*5)}.max-sm\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.max-sm\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.max-sm\:tabs-xs{--tab-height:calc(var(--size-field,.25rem)*6)}.max-sm\:tabs-xs :where(.tab){--tab-p:.375rem;--tab-radius-min:calc(.5rem - var(--border));font-size:.75rem}.max-sm\:before\:-translate-x-1\/4:before{content:var(--tw-content);--tw-translate-x: -25% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.max-sm\:before\:translate-x-1\/4:before{content:var(--tw-content);--tw-translate-x: 25% ;translate:var(--tw-translate-x)var(--tw-translate-y)}}@media (min-width:40rem){.sm\:right-4{right:calc(var(--spacing)*4)}.sm\:left-1\/2{left:50%}.sm\:mt-\[1px\]{margin-top:1px}.sm\:mb-3{margin-bottom:calc(var(--spacing)*3)}.min-sm\:hidden{display:none}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.sm\:size-10{width:calc(var(--spacing)*10);height:calc(var(--spacing)*10)}.sm\:size-12{width:calc(var(--spacing)*12);height:calc(var(--spacing)*12)}.sm\:h-11\/12{height:91.6667%}.sm\:h-14{height:calc(var(--spacing)*14)}.sm\:h-\[min\(100\%\,_55vw\)\]{height:min(100%,55vw)}.sm\:max-h-11\/12{max-height:91.6667%}.sm\:max-w-5xl{max-width:var(--container-5xl)}.sm\:max-w-lg{max-width:var(--container-lg)}.sm\:max-w-md{max-width:var(--container-md)}.sm\:min-w-34{min-width:calc(var(--spacing)*34)}.sm\:grow{flex-grow:1}.sm\:-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.sm\:grid-cols-16{grid-template-columns:repeat(16,minmax(0,1fr))}.sm\:grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.sm\:flex-col{flex-direction:column}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:gap-1{gap:calc(var(--spacing)*1)}.sm\:gap-3{gap:calc(var(--spacing)*3)}.sm\:gap-4{gap:calc(var(--spacing)*4)}.sm\:gap-6{gap:calc(var(--spacing)*6)}.sm\:overflow-x-hidden{overflow-x:hidden}.sm\:rounded-b-box{border-bottom-right-radius:var(--radius-box);border-bottom-left-radius:var(--radius-box)}.sm\:pb-3{padding-bottom:calc(var(--spacing)*3)}.sm\:text-left{text-align:left}.sm\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.sm\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.sm\:text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.sm\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.sm\:text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.sm\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.sm\:shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.sm\:btn-lg{--fontsize:1.125rem;--btn-p:1.25rem;--size:calc(var(--size-field,.25rem)*12)}.sm\:btn-md{--fontsize:.875rem;--btn-p:1rem;--size:calc(var(--size-field,.25rem)*10)}.sm\:btn-xl{--fontsize:1.375rem;--btn-p:1.5rem;--size:calc(var(--size-field,.25rem)*14)}}@media (min-width:48rem){.md\:max-w-lg{max-width:var(--container-lg)}.md\:grid-cols-16{grid-template-columns:repeat(16,minmax(0,1fr))}}@media (min-width:64rem){.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (min-width:80rem){.xl\:grid-cols-32{grid-template-columns:repeat(32,minmax(0,1fr))}.xl\:before\:-translate-x-1\/4:before{content:var(--tw-content);--tw-translate-x: -25% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.xl\:before\:translate-x-1\/4:before{content:var(--tw-content);--tw-translate-x: 25% ;translate:var(--tw-translate-x)var(--tw-translate-y)}}@media (min-width:100rem){.min-\[100rem\]\:grid-cols-32{grid-template-columns:repeat(32,minmax(0,1fr))}}@media (pointer:coarse){.touchscreen\:hidden{display:none}}@media (display-mode:standalone){.pwa\:hidden{display:none}}.stuck\:border-base-content\/10.stuck{border-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.stuck\:border-base-content\/10.stuck{border-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.\[\&_\[data-command-group\]\]\:px-2 [data-command-group]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[data-command-group\]\:not\(\[hidden\]\)_\~\[data-command-group\]\]\:pt-0 [data-command-group]:not([hidden])~[data-command-group]{padding-top:calc(var(--spacing)*0)}.\[\&_\[data-command-input-wrapper\]_svg\]\:h-5 [data-command-input-wrapper] svg{height:calc(var(--spacing)*5)}.\[\&_\[data-command-input-wrapper\]_svg\]\:w-5 [data-command-input-wrapper] svg{width:calc(var(--spacing)*5)}.\[\&_\[data-command-input\]\]\:h-12 [data-command-input]{height:calc(var(--spacing)*12)}.\[\&_\[data-command-item\]\]\:px-2 [data-command-item]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[data-command-item\]\]\:py-3 [data-command-item]{padding-block:calc(var(--spacing)*3)}.\[\&_\[data-command-item\]_svg\]\:h-5 [data-command-item] svg{height:calc(var(--spacing)*5)}.\[\&_\[data-command-item\]_svg\]\:w-5 [data-command-item] svg{width:calc(var(--spacing)*5)}.\[\&_input\]\:disabled\:cursor-not-allowed input:disabled{cursor:not-allowed}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@keyframes progress{50%{background-position-x:-115%}}@keyframes radio{0%{padding:5px}50%{padding:3px}}@keyframes toast{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}@keyframes dropdown{0%{opacity:0}}@keyframes rating{0%,40%{filter:brightness(1.05)contrast(1.05);scale:1.1}}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}@keyframes caret-blink{0%,70%,to{opacity:1}20%,50%{opacity:0}} diff --git a/frontend-backup/_app/immutable/assets/0.DQCxyt33.css b/frontend-backup/_app/immutable/assets/0.DQCxyt33.css deleted file mode 100644 index ba2970e..0000000 --- a/frontend-backup/_app/immutable/assets/0.DQCxyt33.css +++ /dev/null @@ -1 +0,0 @@ -html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}html[dir=rtl],[data-sonner-toaster][dir=rtl]{--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}@media (hover: none) and (pointer: coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translate(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}[data-sonner-toast][data-y-position=top]{top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px #0006}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:#00000014}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:#ffffff4d}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]:before{content:"";position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]:before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]:before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]:after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y: translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y: translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y: translateY( calc(var(--lift) * var(--offset) + var(--lift) * -100%) );opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]:before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 87%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 93%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 84%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 43%, 17%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 9%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;top:0;right:0;bottom:0;left:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-content:"";--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0;--tw-outline-style:solid}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-orange-500:oklch(70.5% .213 47.604);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-lime-500:oklch(76.8% .233 130.85);--color-green-100:oklch(96.2% .044 156.743);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-emerald-500:oklch(69.6% .17 162.48);--color-teal-500:oklch(70.4% .14 182.503);--color-cyan-500:oklch(71.5% .143 215.221);--color-sky-500:oklch(68.5% .169 237.323);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-800:oklch(42.4% .199 265.638);--color-indigo-500:oklch(58.5% .233 277.117);--color-violet-500:oklch(60.6% .25 292.717);--color-purple-500:oklch(62.7% .265 303.9);--color-fuchsia-500:oklch(66.7% .295 322.15);--color-pink-500:oklch(65.6% .241 354.308);--color-rose-500:oklch(64.5% .246 16.439);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--tracking-widest:.1em;--radius-xs:.125rem;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--animate-bounce:bounce 1s infinite;--blur-sm:8px;--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:root{color-scheme:light only;--version:1.13}html,body{height:100%}*{overscroll-behavior:contain;touch-action:manipulation}.maplibregl-ctrl-bottom-right{z-index:1;height:max-content;top:0;left:0;right:unset!important}.maplibregl-ctrl-attrib.maplibregl-compact{margin:10px 80px 10px 12px!important}#map canvas{cursor:default}body{background-color:var(--color-base-100);font-family:"Geist",var(--font-sans)}input:focus,textarea:focus,label:has(:focus){outline-style:var(--tw-outline-style)!important;outline-width:0!important}button,a{cursor:pointer}@supports selector(:-moz-focusring){:root{--fx-noise:none!important}}@font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(./Geist-cyrillic.CHSlOQsW.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(./Geist-latin-ext.DMtmJ5ZE.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(./Geist-latin.Dg_dQHbK.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(./GeistMono-cyrillic.BZdD_g9V.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(./GeistMono-latin-ext.b6lpi8_2.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(./GeistMono-latin.Cjtb1TV-.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Pixelify Sans;font-style:normal;font-weight:400 700;font-display:swap;src:url(./PixelifySans-cyrillic.CPPz0Qvd.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Pixelify Sans;font-style:normal;font-weight:400 700;font-display:swap;src:url(./PixelifySans-cyrillic.CPPz0Qvd.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Pixelify Sans;font-style:normal;font-weight:400 700;font-display:swap;src:url(./PixelifySans-latin.vdc2vUDH.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Noto Color Emoji;font-style:normal;font-weight:400;font-display:swap;src:url(./NotoColorEmoji-flags.ClvgErYz.woff2)format("woff2");unicode-range:U+1F1E6-1F1FF}.iti{--iti-path-flags-1x:url(./flags.a2kmUSbF.webp);--iti-path-flags-2x:url(./flags@2x.gR6KPp3x.webp);--iti-path-globe-1x:url(data:image/webp;base64,UklGRvoBAABXRUJQVlA4TO4BAAAvE8AEENXIkiRZtZu7H33ql07cqTlilvbz9i4tosSMZma27zWzHRGyIEk2bcu2bdvGn23btm3btm3btm0/m5PqAEkLTYYwxTPAW84Tl6wNgmvIqptKKH9nYAr4xle+TML/BDI2LSg6QHKT/nngE4+ZMIUePUGeTvly+YoV8F1DtkGUzlfst2LUKTX6PaWZeMWiDqN6PgcciGa2boYPmxlR5bIIL5l6RVyDYMXmY1f10pGb7PmAN6sRTBTN3N9C9Zi/LbVhlL+Oo2M7RxoE/a4+/nDjeBrSVwtGYXGGMIrUbJzCU1LgFftP9K1hkpOXmBim30cIJ1hgOkSwMhYCMgmaw7rXcfT5/wQcFhrcuaOEBuq5ytYblLPBEhV0Aq/ZqcDn/6RUDgrUL0/0UZgK/p+rR8/4nZAqFfuXA6TbtFQyJSe4gpj6T19a5q+HLEkox0mlWXvbIGbuJw28fkozjybhT5oXHNY4py5rH1CflcyeB1fId9wXDAvFmz/8m6AE/8TgYzEVGoRMCKUhND7PQho7jGo1utkdV559cm3llGFs3sxBZrmGbEExop91jyfg5G7BmCCi6evNaSDFBrG3vyaRNzt+HJ9kQpVbgj+xFUoNgr3abxqGfH3WfQq9lp5UZPRW74ZbFgpq+EGo67dUAQ==);--iti-path-globe-2x:url(data:image/webp;base64,UklGRlwFAABXRUJQVlA4TE8FAAAvJ8AJEEfHKJIkKdmcgvjj3wwill7QwKhtJEnOnIDmv/zJLAdGbSNJcuYENP/lT2Y5OGwjSZHmtL3wTFl9tp8SM/9xz47Ctm2b7mnwDggKFNd77jgHyxhIYVvLQBDEHEBKRQBIOXzQpAhiBQCIAMaIAACHhAQHIMFhhRkSRt1hlRIYDAZDhiE3CVrBS2gFkZGRYdA6mjQQBYAv6yOZSVAQCoPWMCWBIBQKwtCCUBANFARBlChBfPCG/dZUjxJECYJQECU+KGFQEC1YdN/NSUNRTDm4osQBGUwFjDFCBOYRo9QWxAmPlKQECRERMbVLCZapZ0owSrnz3hb6/P8auL9vAwr7/xeS5EV9q2sWU2vbtjla27Zt28akprq6a3bPtm2np87eJIvePUzd9fvoXkT0fwK4Vwdo8t6qyQW+O7Tn4k7NAdvi/jMR0fGpwhglhZBKm3B0pzvg3JcDrUuMEn7SDaUIRTLhhqb/AbDvw+bbJToMEq5QflFfv+QhJVPxcmkm/Ih9TzZfFxk/CJUnP7zMykJqnhsqQ51M6tTv2Pdgc/GKCuKmaI96HlhVAJy4vWVWWgRSfYJ9l4jv+4aB0F15Td3kH1YW4DiMnEJHGSaFOoOdw4LxOhCqPTf0JvLys6I8Wv/9BeeuhEkZfE+UZfNSOumqT+CArgHwbBHZw+ZB00AGeiYxIKKudH2zDxg97VK7FxdO6+9Pmt3l4J/bZR58rtyEOY6dtdhcMbPh2jsyNKr3mNnDy+c8Pig0od5wGXakg7DYgYgfU5648s0fC0Ljv9SigQVrHwUafXVgmNE92zBBBeYjsHn5L6Emz/6776EnxwJUsqKADMDmq8fG/T16fujr7lhknhheLG4PPwFD15IXs2xWFWBZVj4ndDW+fDItPRncssi75Fxv/iHQQL2PDbkg4k/zP/BfgfR1axxy59PM/IYdsypZWUCUiTlck2/zTz4fm3LzqkNlxxnzW+A4fK4vkbNrIbn7bgVoKn3djQu90krrllynQ1g7v2rpjUYsfeR6tdLSaqV5w5fR6E5+k8BVT/0aqqSXDAdV4wvpCplTCJnbFTLb9dTEHjoQQiTMC7Ah3PPuwbffOfD+xP4d3s7uMGDC+wcOvrs7kVKTZ6m4EMIVfn1O61JyrnuU3EM3A3znefrp142f5cnmnDXNyXecPFYUYNt2pVUlvot//qWFDszz9aTrCuGpQVX4Wn+KAw6rCrAgw/eqLZXQVQfmXZ5QnnCF2wrwdlJ5F8DhC1MP/itRnhv+wmHji7hpT+x0tekziRw7jxUF2LZznX3xOydH3e5fVhYWO5QOlClPzYFX9EMD65P9bBHZ16fLq7dHfrlal5vO2LxuKkTcfABvjZDxwsWvf9hs7pCv2ry5cowvB2/8iosq5YraWHw7JCxLyaAWZPoUrilMaRMKo8WwpQv0z2AXqnLzLA42H5gKEVcTuM76RfDtpVrzh9b5oTp0e5SI+Topy78hAzFm6QqRMN2gugNYLH0EoHF6Pyw3vm+OYQMRlwPpCd+sAep/WQ1OPGZZ13lO0ugpE0+m1xGRbdNKe67wzTN3Nouw3yfw03WH+nrnqUAnEul5YOXA5o20L4SnAiXjoX6f7Pm6RIeBl14EGe4a8VLad4UnvZTwysxR2DtOumEiUOpliLi7FWNb2vOEK4QQnnyoIav+Ko9XhGbUF1gZ7tWKcVBLX+T05HkOGmn0iA4WjsW9Ww6ny3WiTAjhyd41WWfGrv4sAof7t/l+ppGJlFeR7oBVr4kF2BYP0oYjDxsZpjuTsQDHsXjAUYxrrwwe9gGWRRRZ3CcA)}:root,[data-theme]{background-color:var(--root-bg,var(--color-base-100));color:var(--color-base-content)}:root{--fx-noise:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.34' numOctaves='4' stitchTiles='stitch'%3E%3C/feTurbulence%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)' opacity='0.2'%3E%3C/rect%3E%3C/svg%3E")}@property --radialprogress{syntax: ""; inherits: true; initial-value: 0%;}:root{scrollbar-color:currentColor #0000}@supports (color:color-mix(in lab,red,red)){:root{scrollbar-color:color-mix(in oklch,currentColor 35%,#0000)#0000}}:root:has(.modal-open,.modal[open],.modal:target,.modal-toggle:checked,.drawer:not([class*=drawer-open])>.drawer-toggle:checked){overflow:hidden}:where(:root),:root:has(input.theme-controller[value=custom-winter]:checked),[data-theme=custom-winter]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97.466% .011 259.822);--color-base-300:oklch(93.268% .016 262.751);--color-base-content:oklch(41.886% .053 255.824);--color-primary:oklch(56.86% .255 257.57);--color-primary-content:oklch(100% .051 257.57);--color-secondary:oklch(42.551% .161 282.339);--color-secondary-content:oklch(88.51% .032 282.339);--color-accent:oklch(59.939% .191 335.171);--color-accent-content:oklch(11.988% .038 335.171);--color-neutral:oklch(19.616% .063 257.651);--color-neutral-content:oklch(83.923% .012 257.651);--color-info:oklch(88.127% .085 214.515);--color-info-content:oklch(17.625% .017 214.515);--color-success:oklch(80.494% .077 197.823);--color-success-content:oklch(16.098% .015 197.823);--color-warning:oklch(89.172% .045 71.47);--color-warning-content:oklch(17.834% .009 71.47);--color-error:oklch(73.092% .11 20.076);--color-error-content:oklch(14.618% .022 20.076);--radius-selector:2rem;--radius-field:2rem;--radius-box:2rem;--size-selector:.25rem;--size-field:.25rem;--border:2px;--depth:1;--noise:1}:root:has(input.theme-controller[value=dark]:checked),[data-theme=dark]{color-scheme:dark;--color-base-100:oklch(30.857% .023 264.149);--color-base-200:oklch(28.036% .019 264.182);--color-base-300:oklch(26.346% .018 262.177);--color-base-content:oklch(97.807% .029 256.847);--color-primary:oklch(58% .233 277.117);--color-primary-content:oklch(96% .018 272.314);--color-secondary:oklch(65% .241 354.308);--color-secondary-content:oklch(94% .028 342.258);--color-accent:oklch(77% .152 181.912);--color-accent-content:oklch(38% .063 188.416);--color-neutral:oklch(14% .005 285.823);--color-neutral-content:oklch(92% .004 286.32);--color-info:oklch(74% .16 232.661);--color-info-content:oklch(29% .066 243.157);--color-success:oklch(76% .177 163.223);--color-success-content:oklch(37% .077 168.94);--color-warning:oklch(82% .189 84.429);--color-warning-content:oklch(41% .112 45.904);--color-error:oklch(71% .194 13.428);--color-error-content:oklch(27% .105 12.094);--radius-selector:2rem;--radius-field:2rem;--radius-box:2rem;--size-selector:.25rem;--size-field:.25rem;--border:2px;--depth:1;--noise:1}}@layer components;@layer utilities{.diff{webkit-user-select:none;-webkit-user-select:none;user-select:none;direction:ltr;grid-template-columns:auto 1fr;width:100%;display:grid;position:relative;overflow:hidden;container-type:inline-size}.diff:focus-visible,.diff:has(.diff-item-1:focus-visible){outline-style:var(--tw-outline-style);outline-offset:1px;outline-width:2px;outline-color:var(--color-base-content)}.diff:focus-visible .diff-resizer{min-width:90cqi;max-width:90cqi}.diff:has(.diff-item-2:focus-visible){outline-style:var(--tw-outline-style);outline-offset:1px;outline-width:2px}.diff:has(.diff-item-2:focus-visible) .diff-resizer{min-width:10cqi;max-width:10cqi}@supports (-webkit-overflow-scrolling:touch) and (overflow:-webkit-paged-x){.diff:focus .diff-resizer{min-width:10cqi;max-width:10cqi}.diff:has(.diff-item-1:focus) .diff-resizer{min-width:90cqi;max-width:90cqi}}.modal{pointer-events:none;visibility:hidden;width:100%;max-width:none;height:100%;max-height:none;color:inherit;transition:translate .3s ease-out,visibility .3s allow-discrete,background-color .3s ease-out,opacity .1s ease-out;overscroll-behavior:contain;z-index:999;background-color:#0000;place-items:center;margin:0;padding:0;display:grid;position:fixed;top:0;right:0;bottom:0;left:0;overflow:hidden}.modal::backdrop{display:none}.modal.modal-open,.modal[open],.modal:target{pointer-events:auto;visibility:visible;opacity:1;background-color:#0006}:is(.modal.modal-open,.modal[open],.modal:target) .modal-box{opacity:1;translate:0;scale:1}@starting-style{.modal.modal-open,.modal[open],.modal:target{visibility:hidden;opacity:0}}.tooltip{--tt-bg:var(--color-neutral);--tt-off: calc(100% + .5rem) ;--tt-tail: calc(100% + 1px + .25rem) ;display:inline-block;position:relative}.tooltip>:where(.tooltip-content),.tooltip:where([data-tip]):before{border-radius:var(--radius-field);text-align:center;white-space:normal;max-width:20rem;color:var(--color-neutral-content);opacity:0;background-color:var(--tt-bg);pointer-events:none;z-index:2;--tw-content:attr(data-tip);content:var(--tw-content);width:max-content;padding-block:.25rem;padding-inline:.5rem;font-size:.875rem;line-height:1.25;transition:opacity .2s cubic-bezier(.4,0,.2,1) 75ms,transform .2s cubic-bezier(.4,0,.2,1) 75ms;position:absolute}.tooltip:after{opacity:0;background-color:var(--tt-bg);content:"";pointer-events:none;--mask-tooltip:url("data:image/svg+xml,%3Csvg width='10' height='4' viewBox='0 0 8 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.500009 1C3.5 1 3.00001 4 5.00001 4C7 4 6.5 1 9.5 1C10 1 10 0.499897 10 0H0C-1.99338e-08 0.5 0 1 0.500009 1Z' fill='black'/%3E%3C/svg%3E%0A");width:.625rem;height:.25rem;-webkit-mask-position:-1px 0;mask-position:-1px 0;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-image:var(--mask-tooltip);mask-image:var(--mask-tooltip);transition:opacity .2s cubic-bezier(.4,0,.2,1) 75ms,transform .2s cubic-bezier(.4,0,.2,1) 75ms;display:block;position:absolute}:is(.tooltip.tooltip-open,.tooltip[data-tip]:not([data-tip=""]):hover,.tooltip:not(:has(.tooltip-content:empty)):has(.tooltip-content):hover,.tooltip:has(:focus-visible))>.tooltip-content,:is(.tooltip.tooltip-open,.tooltip[data-tip]:not([data-tip=""]):hover,.tooltip:not(:has(.tooltip-content:empty)):has(.tooltip-content):hover,.tooltip:has(:focus-visible))[data-tip]:before,:is(.tooltip.tooltip-open,.tooltip[data-tip]:not([data-tip=""]):hover,.tooltip:not(:has(.tooltip-content:empty)):has(.tooltip-content):hover,.tooltip:has(:focus-visible)):after{opacity:1;--tt-pos:0rem;transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}.tooltip>.tooltip-content,.tooltip[data-tip]:before{transform:translate(-50%)translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-off)50%}.tooltip:after{transform:translate(-50%)translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-tail)50%}.tab{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:center;webkit-user-select:none;-webkit-user-select:none;user-select:none;flex-wrap:wrap;justify-content:center;align-items:center;display:inline-flex;position:relative}@media (hover:hover){.tab:hover{color:var(--color-base-content)}}.tab{--tab-p:1rem;--tab-bg:var(--color-base-100);--tab-border-color:var(--color-base-300);--tab-radius-ss:0;--tab-radius-se:0;--tab-radius-es:0;--tab-radius-ee:0;--tab-order:0;--tab-radius-min:calc(.75rem - var(--border));order:var(--tab-order);height:var(--tab-height);border-color:#0000;padding-inline-start:var(--tab-p);padding-inline-end:var(--tab-p);font-size:.875rem}.tab:is(input[type=radio]){min-width:fit-content}.tab:is(input[type=radio]):after{content:attr(aria-label)}.tab:is(label){position:relative}.tab:is(label) input{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0;position:absolute;top:0;right:0;bottom:0;left:0}:is(.tab:checked,.tab:is(label:has(:checked)),.tab:is(.tab-active,[aria-selected=true]))+.tab-content{height:calc(100% - var(--tab-height) + var(--border));display:block}.tab:not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true]){color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.tab:not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true]){color:color-mix(in oklab,var(--color-base-content)50%,transparent)}}.tab:not(input):empty{cursor:default;flex-grow:1}.tab:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.tab:focus{outline-offset:2px;outline:2px solid #0000}}.tab:focus-visible,.tab:is(label:has(:checked:focus-visible)){outline-offset:-5px;outline:2px solid}.tab[disabled]{pointer-events:none;opacity:.4}.menu{--menu-active-fg:var(--color-neutral-content);--menu-active-bg:var(--color-neutral);flex-flow:column wrap;width:fit-content;padding:.5rem;font-size:.875rem;display:flex}.menu :where(li ul){white-space:nowrap;margin-inline-start:1rem;padding-inline-start:.5rem;position:relative}.menu :where(li ul):before{background-color:var(--color-base-content);opacity:.1;width:var(--border);content:"";inset-inline-start:0;position:absolute;top:.75rem;bottom:.75rem}.menu :where(li>.menu-dropdown:not(.menu-dropdown-show)){display:none}.menu :where(li:not(.menu-title)>:not(ul,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--radius-field);text-align:start;text-wrap:balance;-webkit-user-select:none;user-select:none;grid-auto-columns:minmax(auto,max-content) auto max-content;grid-auto-flow:column;align-content:flex-start;align-items:center;gap:.5rem;padding-block:.375rem;padding-inline:.75rem;transition-property:color,background-color,box-shadow;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);display:grid}.menu :where(li>details>summary){--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li>details>summary){outline-offset:2px;outline:2px solid #0000}}.menu :where(li>details>summary)::-webkit-details-marker{display:none}:is(.menu :where(li>details>summary),.menu :where(li>.menu-dropdown-toggle)):after{content:"";transform-origin:50%;pointer-events:none;justify-self:flex-end;width:.375rem;height:.375rem;transition-property:rotate,translate;transition-duration:.2s;display:block;translate:0 -1px;rotate:-135deg;box-shadow:inset 2px 2px}.menu :where(li>details[open]>summary):after,.menu :where(li>.menu-dropdown-toggle.menu-dropdown-show):after{translate:0 1px;rotate:45deg}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus,.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus,.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{background-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus,.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{color:var(--color-base-content);--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus,.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{outline-offset:2px;outline:2px solid #0000}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){background-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){outline-offset:2px;outline:2px solid #0000}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){box-shadow:inset 0 1px #00000003,inset 0 -1px #ffffff03}.menu :where(li:empty){background-color:var(--color-base-content);opacity:.1;height:1px;margin:.5rem 1rem}.menu :where(li){flex-flow:column wrap;flex-shrink:0;align-items:stretch;display:flex;position:relative}.menu :where(li) .badge{justify-self:flex-end}.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{outline-offset:2px;outline:2px solid #0000}}.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{color:var(--menu-active-fg);background-color:var(--menu-active-bg);background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise)}:is(.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active):not(:is(.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active):active){box-shadow:0 2px calc(var(--depth)*3px) -2px var(--menu-active-bg)}.menu :where(li).menu-disabled{pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.menu :where(li).menu-disabled{color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.menu .dropdown:focus-within .menu-dropdown-toggle:after{translate:0 1px;rotate:45deg}.menu .dropdown-content{margin-top:.5rem;padding:.5rem}.menu .dropdown-content:before{display:none}.dropdown{position-area:var(--anchor-v,bottom)var(--anchor-h,span-right);display:inline-block;position:relative}.dropdown>:not(summary):focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.dropdown>:not(summary):focus{outline-offset:2px;outline:2px solid #0000}}.dropdown .dropdown-content{position:absolute}.dropdown:not(details,.dropdown-open,.dropdown-hover:hover,:focus-within) .dropdown-content{transform-origin:top;opacity:0;display:none;scale:95%}.dropdown[popover],.dropdown .dropdown-content{z-index:999;transition-behavior:allow-discrete;transition-property:opacity,scale,display;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);animation:.2s dropdown}@starting-style{.dropdown[popover],.dropdown .dropdown-content{opacity:0;scale:95%}}:is(.dropdown.dropdown-open,.dropdown:not(.dropdown-hover):focus,.dropdown:focus-within)>[tabindex]:first-child{pointer-events:none}:is(.dropdown.dropdown-open,.dropdown:not(.dropdown-hover):focus,.dropdown:focus-within) .dropdown-content{opacity:1}.dropdown.dropdown-hover:hover .dropdown-content{opacity:1;scale:100%}.dropdown:is(details) summary::-webkit-details-marker{display:none}:is(.dropdown.dropdown-open,.dropdown:focus,.dropdown:focus-within) .dropdown-content{scale:100%}.dropdown:where([popover]){background:0 0}.dropdown[popover]{color:inherit;position:fixed}@supports not (position-area:bottom){.dropdown[popover]{margin:auto}.dropdown[popover].dropdown-open:not(:popover-open){transform-origin:top;opacity:0;display:none;scale:95%}.dropdown[popover]::backdrop{background-color:oklab(0% none none/.3)}}.dropdown[popover]:not(.dropdown-open,:popover-open){transform-origin:top;opacity:0;display:none;scale:95%}:where(.btn){width:unset}.btn{cursor:pointer;text-align:center;vertical-align:middle;outline-offset:2px;webkit-user-select:none;-webkit-user-select:none;user-select:none;padding-inline:var(--btn-p);color:var(--btn-fg);--tw-prose-links:var(--btn-fg);height:var(--size);font-size:var(--fontsize,.875rem);outline-color:var(--btn-color,var(--color-base-content));background-color:var(--btn-bg);background-size:auto,calc(var(--noise)*100%);background-image:none,var(--btn-noise);border-width:var(--border);border-style:solid;border-color:var(--btn-border);text-shadow:0 .5px oklch(100% 0 0/calc(var(--depth)*.15));touch-action:manipulation;box-shadow:0 .5px 0 .5px oklch(100% 0 0/calc(var(--depth)*6%)) inset,var(--btn-shadow);--size:calc(var(--size-field,.25rem)*10);--btn-bg:var(--btn-color,var(--color-base-200));--btn-fg:var(--color-base-content);--btn-p:1rem;--btn-border:var(--btn-bg);border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field));flex-wrap:nowrap;flex-shrink:0;justify-content:center;align-items:center;gap:.375rem;font-weight:600;transition-property:color,background-color,border-color,box-shadow;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);display:inline-flex}@supports (color:color-mix(in lab,red,red)){.btn{--btn-border:color-mix(in oklab,var(--btn-bg),#000 calc(var(--depth)*5%))}}.btn{--btn-shadow:0 3px 2px -2px var(--btn-bg),0 4px 3px -2px var(--btn-bg)}@supports (color:color-mix(in lab,red,red)){.btn{--btn-shadow:0 3px 2px -2px color-mix(in oklab,var(--btn-bg)calc(var(--depth)*30%),#0000),0 4px 3px -2px color-mix(in oklab,var(--btn-bg)calc(var(--depth)*30%),#0000)}}.btn{--btn-noise:var(--fx-noise)}.prose .btn{text-decoration-line:none}@media (hover:hover){.btn:hover{--btn-bg:var(--btn-color,var(--color-base-200))}@supports (color:color-mix(in lab,red,red)){.btn:hover{--btn-bg:color-mix(in oklab,var(--btn-color,var(--color-base-200)),#000 7%)}}}.btn:focus-visible{isolation:isolate;outline-width:2px;outline-style:solid}.btn:active:not(.btn-active){--btn-bg:var(--btn-color,var(--color-base-200));translate:0 .5px}@supports (color:color-mix(in lab,red,red)){.btn:active:not(.btn-active){--btn-bg:color-mix(in oklab,var(--btn-color,var(--color-base-200)),#000 5%)}}.btn:active:not(.btn-active){--btn-border:var(--btn-color,var(--color-base-200))}@supports (color:color-mix(in lab,red,red)){.btn:active:not(.btn-active){--btn-border:color-mix(in oklab,var(--btn-color,var(--color-base-200)),#000 7%)}}.btn:active:not(.btn-active){--btn-shadow:0 0 0 0 oklch(0% 0 0/0),0 0 0 0 oklch(0% 0 0/0)}.btn:is(:disabled,[disabled],.btn-disabled):not(.btn-link,.btn-ghost){background-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.btn:is(:disabled,[disabled],.btn-disabled):not(.btn-link,.btn-ghost){background-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.btn:is(:disabled,[disabled],.btn-disabled):not(.btn-link,.btn-ghost){box-shadow:none}.btn:is(:disabled,[disabled],.btn-disabled){pointer-events:none;--btn-border:#0000;--btn-noise:none;--btn-fg:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.btn:is(:disabled,[disabled],.btn-disabled){--btn-fg:color-mix(in oklch,var(--color-base-content)20%,#0000)}}@media (hover:hover){.btn:is(:disabled,[disabled],.btn-disabled):hover{pointer-events:none;background-color:var(--color-neutral)}@supports (color:color-mix(in lab,red,red)){.btn:is(:disabled,[disabled],.btn-disabled):hover{background-color:color-mix(in oklab,var(--color-neutral)20%,transparent)}}.btn:is(:disabled,[disabled],.btn-disabled):hover{--btn-border:#0000;--btn-fg:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.btn:is(:disabled,[disabled],.btn-disabled):hover{--btn-fg:color-mix(in oklch,var(--color-base-content)20%,#0000)}}}.btn:is(input[type=checkbox],input[type=radio]){-webkit-appearance:none;-moz-appearance:none;appearance:none}.btn:is(input[type=checkbox],input[type=radio]):after{content:attr(aria-label)}.btn:where(input:checked:not(.filter .btn)){--btn-color:var(--color-primary);--btn-fg:var(--color-primary-content);isolation:isolate}.\!loading{pointer-events:none!important;aspect-ratio:1!important;vertical-align:middle!important;width:calc(var(--size-selector,.25rem)*6)!important;background-color:currentColor!important;display:inline-block!important;-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")!important;mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")!important;-webkit-mask-position:50%!important;mask-position:50%!important;-webkit-mask-size:100%!important;mask-size:100%!important;-webkit-mask-repeat:no-repeat!important;mask-repeat:no-repeat!important}.loading{pointer-events:none;aspect-ratio:1;vertical-align:middle;width:calc(var(--size-selector,.25rem)*6);background-color:currentColor;display:inline-block;-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.list{flex-direction:column;font-size:.875rem;display:flex}.list :where(.list-row){--list-grid-cols:minmax(0,auto)1fr;border-radius:var(--radius-box);word-break:break-word;grid-auto-flow:column;grid-template-columns:var(--list-grid-cols);gap:1rem;padding:1rem;display:grid;position:relative}.list :where(.list-row):has(.list-col-grow:first-child){--list-grid-cols:1fr}.list :where(.list-row):has(.list-col-grow:nth-child(2)){--list-grid-cols:minmax(0,auto)1fr}.list :where(.list-row):has(.list-col-grow:nth-child(3)){--list-grid-cols:minmax(0,auto)minmax(0,auto)1fr}.list :where(.list-row):has(.list-col-grow:nth-child(4)){--list-grid-cols:minmax(0,auto)minmax(0,auto)minmax(0,auto)1fr}.list :where(.list-row):has(.list-col-grow:nth-child(5)){--list-grid-cols:minmax(0,auto)minmax(0,auto)minmax(0,auto)minmax(0,auto)1fr}.list :where(.list-row):has(.list-col-grow:nth-child(6)){--list-grid-cols:minmax(0,auto)minmax(0,auto)minmax(0,auto)minmax(0,auto)minmax(0,auto)1fr}.list :where(.list-row) :not(.list-col-wrap){grid-row-start:1}:is(.list>:not(:last-child).list-row,.list>:not(:last-child) .list-row):after{content:"";border-bottom:var(--border)solid;inset-inline:var(--radius-box);border-color:var(--color-base-content);position:absolute;bottom:0}@supports (color:color-mix(in lab,red,red)){:is(.list>:not(:last-child).list-row,.list>:not(:last-child) .list-row):after{border-color:color-mix(in oklab,var(--color-base-content)5%,transparent)}}.toast{translate:var(--toast-x,0)var(--toast-y,0);inset-inline:auto 1rem;background-color:#0000;flex-direction:column;gap:.5rem;width:max-content;max-width:calc(100vw - 2rem);display:flex;position:fixed;top:auto;bottom:1rem}.toast>*{animation:.25s ease-out toast}.toast:where(.toast-start){--toast-x:0;inset-inline:1rem auto}.toast:where(.toast-center){--toast-x:-50%;inset-inline:50%}.toast:where(.toast-end){--toast-x:0;inset-inline:auto 1rem}.toast:where(.toast-bottom){--toast-y:0;top:auto;bottom:1rem}.toast:where(.toast-middle){--toast-y:-50%;top:50%;bottom:auto}.toast:where(.toast-top){--toast-y:0;top:1rem;bottom:auto}.input{cursor:text;border:var(--border)solid #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--color-base-100);vertical-align:middle;white-space:nowrap;width:clamp(3rem,20rem,100%);height:var(--size);touch-action:manipulation;border-color:var(--input-color);box-shadow:0 1px var(--input-color) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset;border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field));flex-shrink:1;align-items:center;gap:.5rem;padding-inline:.75rem;font-size:.875rem;display:inline-flex;position:relative}@supports (color:color-mix(in lab,red,red)){.input{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset}}.input{--size:calc(var(--size-field,.25rem)*10);--input-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.input{--input-color:color-mix(in oklab,var(--color-base-content)20%,#0000)}}.input:where(input){display:inline-flex}.input :where(input){-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#0000;border:none;width:100%;height:100%;display:inline-flex}.input :where(input):focus,.input :where(input):focus-within{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.input :where(input):focus,.input :where(input):focus-within{outline-offset:2px;outline:2px solid #0000}}.input :where(input[type=url]),.input :where(input[type=email]){direction:ltr}.input :where(input[type=date]){display:inline-block}.input:focus,.input:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab,red,red)){.input:focus,.input:focus-within{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000)}}.input:focus,.input:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate;z-index:1}.input:has(>input[disabled]),.input:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.input:has(>input[disabled]),.input:is(:disabled,[disabled]){color:color-mix(in oklab,var(--color-base-content)40%,transparent)}}:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]))::placeholder{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]))::placeholder{color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.input:has(>input[disabled]),.input:is(:disabled,[disabled]){box-shadow:none}.input:has(>input[disabled])>input[disabled]{cursor:not-allowed}.input::-webkit-date-and-time-value{text-align:inherit}.input[type=number]::-webkit-inner-spin-button{margin-block:-.75rem;margin-inline-end:-.75rem}.input::-webkit-calendar-picker-indicator{position:absolute;inset-inline-end:.75em}.indicator{width:max-content;display:inline-flex;position:relative}.indicator :where(.indicator-item){z-index:1;white-space:nowrap;top:var(--indicator-t,0);bottom:var(--indicator-b,auto);left:var(--indicator-s,auto);right:var(--indicator-e,0);translate:var(--indicator-x,50%)var(--indicator-y,-50%);position:absolute}.table{border-radius:var(--radius-box);text-align:left;width:100%;font-size:.875rem;position:relative}.table:where(:dir(rtl),[dir=rtl],[dir=rtl] *){text-align:right}@media (hover:hover){:is(.table tr.row-hover,.table tr.row-hover:nth-child(2n)):hover{background-color:var(--color-base-200)}}.table :where(th,td){vertical-align:middle;padding-block:.75rem;padding-inline:1rem}.table :where(thead,tfoot){white-space:nowrap;color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.table :where(thead,tfoot){color:color-mix(in oklab,var(--color-base-content)60%,transparent)}}.table :where(thead,tfoot){font-size:.875rem;font-weight:600}.table :where(tfoot){border-top:var(--border)solid var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.table :where(tfoot){border-top:var(--border)solid color-mix(in oklch,var(--color-base-content)5%,#0000)}}.table :where(.table-pin-rows thead tr){z-index:1;background-color:var(--color-base-100);position:sticky;top:0}.table :where(.table-pin-rows tfoot tr){z-index:1;background-color:var(--color-base-100);position:sticky;bottom:0}.table :where(.table-pin-cols tr th){background-color:var(--color-base-100);position:sticky;left:0;right:0}.table :where(thead tr,tbody tr:not(:last-child)){border-bottom:var(--border)solid var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.table :where(thead tr,tbody tr:not(:last-child)){border-bottom:var(--border)solid color-mix(in oklch,var(--color-base-content)5%,#0000)}}.tabs-border .tab{--tab-border-color:#0000 #0000 var(--tab-border-color)#0000;border-radius:var(--radius-field);position:relative}.tabs-border .tab:before{--tw-content:"";content:var(--tw-content);background-color:var(--tab-border-color);border-radius:var(--radius-field);width:80%;height:3px;transition:background-color .2s;position:absolute;bottom:0;left:10%}:is(.tabs-border .tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled,[disabled]),.tabs-border .tab:is(input:checked),.tabs-border .tab:is(label:has(:checked))):before{--tab-border-color:currentColor;border-top:3px solid}.select{border:var(--border)solid #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--color-base-100);vertical-align:middle;width:clamp(3rem,20rem,100%);height:var(--size);touch-action:manipulation;text-overflow:ellipsis;box-shadow:0 1px var(--input-color) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset;background-image:linear-gradient(45deg,#0000 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,#0000 50%);background-position:calc(100% - 20px) calc(1px + 50%),calc(100% - 16.1px) calc(1px + 50%);background-repeat:no-repeat;background-size:4px 4px,4px 4px;border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field));flex-shrink:1;align-items:center;gap:.375rem;padding-inline:1rem 1.75rem;font-size:.875rem;display:inline-flex;position:relative}@supports (color:color-mix(in lab,red,red)){.select{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset}}.select{border-color:var(--input-color);--input-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.select{--input-color:color-mix(in oklab,var(--color-base-content)20%,#0000)}}.select{--size:calc(var(--size-field,.25rem)*10)}[dir=rtl] .select{background-position:12px calc(1px + 50%),16px calc(1px + 50%)}.select select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:inherit;border-radius:inherit;border-style:none;width:calc(100% + 2.75rem);height:calc(100% - 2px);margin-inline:-1rem -1.75rem;padding-inline:1rem 1.75rem}.select select:focus,.select select:focus-within{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.select select:focus,.select select:focus-within{outline-offset:2px;outline:2px solid #0000}}.select select:not(:last-child){background-image:none;margin-inline-end:-1.375rem}.select:focus,.select:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab,red,red)){.select:focus,.select:focus-within{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000)}}.select:focus,.select:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate;z-index:1}.select:has(>select[disabled]),.select:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.select:has(>select[disabled]),.select:is(:disabled,[disabled]){color:color-mix(in oklab,var(--color-base-content)40%,transparent)}}:is(.select:has(>select[disabled]),.select:is(:disabled,[disabled]))::placeholder{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:is(.select:has(>select[disabled]),.select:is(:disabled,[disabled]))::placeholder{color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.select:has(>select[disabled])>select[disabled]{cursor:not-allowed}.card{border-radius:var(--radius-box);outline-offset:2px;outline:0 solid #0000;flex-direction:column;transition:outline .2s ease-in-out;display:flex;position:relative}.card:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.card:focus{outline-offset:2px;outline:2px solid #0000}}.card:focus-visible{outline-color:currentColor}.card :where(figure:first-child){border-start-start-radius:inherit;border-start-end-radius:inherit;border-end-end-radius:unset;border-end-start-radius:unset;overflow:hidden}.card :where(figure:last-child){border-start-start-radius:unset;border-start-end-radius:unset;border-end-end-radius:inherit;border-end-start-radius:inherit;overflow:hidden}.card:where(.card-border){border:var(--border)solid var(--color-base-200)}.card:where(.card-dash){border:var(--border)dashed var(--color-base-200)}.card.image-full{display:grid}.card.image-full>*{grid-row-start:1;grid-column-start:1}.card.image-full>.card-body{color:var(--color-neutral-content);position:relative}.card.image-full :where(figure){border-radius:inherit;overflow:hidden}.card.image-full>figure img{object-fit:cover;filter:brightness(28%);height:100%}.card figure{justify-content:center;align-items:center;display:flex}.card:has(>input:is(input[type=checkbox],input[type=radio])){cursor:pointer;-webkit-user-select:none;user-select:none}.card:has(>:checked){outline:2px solid}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.avatar{vertical-align:middle;display:inline-flex;position:relative}.avatar>div{aspect-ratio:1;display:block;overflow:hidden}.avatar img{object-fit:cover;width:100%;height:100%}.checkbox{border:var(--border)solid var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.checkbox{border:var(--border)solid var(--input-color,color-mix(in oklab,var(--color-base-content)20%,#0000))}}.checkbox{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--radius-selector);vertical-align:middle;color:var(--color-base-content);box-shadow:0 1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 0 #0000 inset,0 0 #0000;--size:calc(var(--size-selector,.25rem)*6);width:var(--size);height:var(--size);background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise);flex-shrink:0;padding:.25rem;transition:background-color .2s,box-shadow .2s;display:inline-block;position:relative}.checkbox:before{--tw-content:"";content:var(--tw-content);opacity:0;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,70% 80%,70% 100%);width:100%;height:100%;box-shadow:0 3px oklch(100% 0 0/calc(var(--depth)*.1)) inset;background-color:currentColor;font-size:1rem;line-height:.75;transition:clip-path .3s .1s,opacity .1s .1s,rotate .3s .1s,translate .3s .1s;display:block;rotate:45deg}.checkbox:focus-visible{outline:2px solid var(--input-color,currentColor);outline-offset:2px}.checkbox:checked,.checkbox[aria-checked=true]{background-color:var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.checkbox:checked,.checkbox[aria-checked=true]{background-color:var(--input-color,color-mix(in oklab,var(--color-base-content)20%,#0000))}}.checkbox:checked,.checkbox[aria-checked=true]{box-shadow:0 0 #0000 inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px oklch(0% 0 0/calc(var(--depth)*.1))}:is(.checkbox:checked,.checkbox[aria-checked=true]):before{clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 0%,70% 0%,70% 100%);opacity:1}@media (forced-colors:active){:is(.checkbox:checked,.checkbox[aria-checked=true]):before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:none}}@media print{:is(.checkbox:checked,.checkbox[aria-checked=true]):before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:none}}.checkbox:indeterminate{background-color:var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.checkbox:indeterminate{background-color:var(--input-color,color-mix(in oklab,var(--color-base-content)20%,#0000))}}.checkbox:indeterminate:before{opacity:1;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,80% 80%,80% 100%);translate:0 -35%;rotate:none}.checkbox:disabled{cursor:not-allowed;opacity:.2}.radio{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;vertical-align:middle;border:var(--border)solid var(--input-color,currentColor);border-radius:3.40282e38px;flex-shrink:0;padding:.25rem;display:inline-block;position:relative}@supports (color:color-mix(in lab,red,red)){.radio{border:var(--border)solid var(--input-color,color-mix(in srgb,currentColor 20%,#0000))}}.radio{box-shadow:0 1px oklch(0% 0 0/calc(var(--depth)*.1)) inset;--size:calc(var(--size-selector,.25rem)*6);width:var(--size);height:var(--size);color:var(--input-color,currentColor)}.radio:before{--tw-content:"";content:var(--tw-content);background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise);border-radius:3.40282e38px;width:100%;height:100%;display:block}.radio:focus-visible{outline:2px solid}.radio:checked,.radio[aria-checked=true]{background-color:var(--color-base-100);border-color:currentColor;animation:.2s ease-out radio}:is(.radio:checked,.radio[aria-checked=true]):before{box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px oklch(0% 0 0/calc(var(--depth)*.1));background-color:currentColor}@media (forced-colors:active){:is(.radio:checked,.radio[aria-checked=true]):before{outline-style:var(--tw-outline-style);outline-offset:-1px;outline-width:1px}}@media print{:is(.radio:checked,.radio[aria-checked=true]):before{outline-offset:-1rem;outline:.25rem solid}}.radio:disabled{cursor:not-allowed;opacity:.2}.rating{vertical-align:middle;display:inline-flex;position:relative}.rating input{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none}.rating :where(*){background-color:var(--color-base-content);opacity:.2;border-radius:0;width:1.5rem;height:1.5rem;animation:.25s ease-out rating}.rating :where(*):is(input){cursor:pointer}.rating .rating-hidden{background-color:#0000;width:.5rem}.rating input[type=radio]:checked{background-image:none}.rating :checked,.rating [aria-checked=true],.rating [aria-current=true],.rating :has(~:checked,~[aria-checked=true],~[aria-current=true]){opacity:1}.rating :focus-visible{transition:scale .2s ease-out;scale:1.1}.rating :active:focus{animation:none;scale:1.1}.rating.rating-xs :where(:not(.rating-hidden)){width:1rem;height:1rem}.rating.rating-sm :where(:not(.rating-hidden)){width:1.25rem;height:1.25rem}.rating.rating-md :where(:not(.rating-hidden)){width:1.5rem;height:1.5rem}.rating.rating-lg :where(:not(.rating-hidden)){width:1.75rem;height:1.75rem}.rating.rating-xl :where(:not(.rating-hidden)){width:2rem;height:2rem}.stats{border-radius:var(--radius-box);grid-auto-flow:column;display:inline-grid;position:relative;overflow-x:auto}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.tooltip-bottom>.tooltip-content,.tooltip-bottom[data-tip]:before{transform:translate(-50%)translateY(var(--tt-pos,-.25rem));inset:var(--tt-off)auto auto 50%}.tooltip-bottom:after{transform:translate(-50%)translateY(var(--tt-pos,-.25rem))rotate(180deg);inset:var(--tt-tail)auto auto 50%}.tooltip-right>.tooltip-content,.tooltip-right[data-tip]:before{transform:translate(calc(var(--tt-pos,-.25rem) + .25rem))translateY(-50%);inset:50% auto auto var(--tt-off)}.tooltip-right:after{transform:translate(var(--tt-pos,-.25rem))translateY(-50%)rotate(90deg);inset:50% auto auto calc(var(--tt-tail) + 1px)}.inset-0{inset:calc(var(--spacing)*0)}.dropdown-center{--anchor-h:center}.dropdown-center :where(.dropdown-content){inset-inline-end:50%;translate:50%}[dir=rtl] :is(.dropdown-center :where(.dropdown-content)){translate:-50%}.dropdown-center.dropdown-left{--anchor-h:left;--anchor-v:center}.dropdown-center.dropdown-left .dropdown-content{top:auto;bottom:50%;translate:0 50%}.dropdown-center.dropdown-right{--anchor-h:right;--anchor-v:center}.dropdown-center.dropdown-right .dropdown-content{top:auto;bottom:50%;translate:0 50%}.dropdown-end{--anchor-h:span-left}.dropdown-end :where(.dropdown-content){inset-inline-end:0;translate:0}[dir=rtl] :is(.dropdown-end :where(.dropdown-content)){translate:0}.dropdown-end.dropdown-left{--anchor-h:left;--anchor-v:span-top}.dropdown-end.dropdown-left .dropdown-content{top:auto;bottom:0}.dropdown-end.dropdown-right{--anchor-h:right;--anchor-v:span-top}.dropdown-end.dropdown-right .dropdown-content{top:auto;bottom:0}.dropdown-top{--anchor-v:top}.dropdown-top .dropdown-content{transform-origin:bottom;top:auto;bottom:100%}.center-absolute{--tw-translate-x: -50% ;--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y);top:50%;left:50%}.\!top-15{top:calc(var(--spacing)*15)!important}.-top-4{top:calc(var(--spacing)*-4)}.-top-15{top:calc(var(--spacing)*-15)}.top-0{top:calc(var(--spacing)*0)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.top-4{top:calc(var(--spacing)*4)}.top-8{top:calc(var(--spacing)*8)}.top-10{top:calc(var(--spacing)*10)}.top-\[50\%\]{top:50%}.-right-1{right:calc(var(--spacing)*-1)}.-right-2{right:calc(var(--spacing)*-2)}.-right-4{right:calc(var(--spacing)*-4)}.right-0{right:calc(var(--spacing)*0)}.right-1{right:calc(var(--spacing)*1)}.right-2{right:calc(var(--spacing)*2)}.right-3{right:calc(var(--spacing)*3)}.right-4{right:calc(var(--spacing)*4)}.right-5{right:calc(var(--spacing)*5)}.-bottom-1{bottom:calc(var(--spacing)*-1)}.-bottom-4\.5{bottom:calc(var(--spacing)*-4.5)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-1{bottom:calc(var(--spacing)*1)}.bottom-3{bottom:calc(var(--spacing)*3)}.bottom-5{bottom:calc(var(--spacing)*5)}.-left-1{left:calc(var(--spacing)*-1)}.-left-2{left:calc(var(--spacing)*-2)}.left-0{left:calc(var(--spacing)*0)}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-3{left:calc(var(--spacing)*3)}.left-\[50\%\]{left:50%}.left-full{left:100%}.textarea{border:var(--border)solid #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--radius-field);background-color:var(--color-base-100);vertical-align:middle;touch-action:manipulation;border-color:var(--input-color);width:clamp(3rem,20rem,100%);min-height:5rem;box-shadow:0 1px var(--input-color) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset;flex-shrink:1;padding-block:.5rem;padding-inline:.75rem;font-size:.875rem}@supports (color:color-mix(in lab,red,red)){.textarea{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset}}.textarea{--input-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.textarea{--input-color:color-mix(in oklab,var(--color-base-content)20%,#0000)}}.textarea textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#0000;border:none}.textarea textarea:focus,.textarea textarea:focus-within{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.textarea textarea:focus,.textarea textarea:focus-within{outline-offset:2px;outline:2px solid #0000}}.textarea:focus,.textarea:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab,red,red)){.textarea:focus,.textarea:focus-within{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000)}}.textarea:focus,.textarea:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate}.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]){color:color-mix(in oklab,var(--color-base-content)40%,transparent)}}:is(.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]))::placeholder{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:is(.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]))::placeholder{color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]){box-shadow:none}.textarea:has(>textarea[disabled])>textarea[disabled]{cursor:not-allowed}.isolate{isolation:isolate}.modal-backdrop{color:#0000;z-index:-1;grid-row-start:1;grid-column-start:1;place-self:stretch stretch;display:grid}.modal-backdrop button{cursor:pointer}.z-1{z-index:1}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-100{z-index:100}.tab-content{order:var(--tabcontent-order);--tabcontent-radius-ss:0;--tabcontent-radius-se:0;--tabcontent-radius-es:0;--tabcontent-radius-ee:0;--tabcontent-order:1;width:100%;margin:var(--tabcontent-margin);border-color:#0000;border-width:var(--border);border-start-start-radius:var(--tabcontent-radius-ss);border-start-end-radius:var(--tabcontent-radius-se);border-end-end-radius:var(--tabcontent-radius-ee);border-end-start-radius:var(--tabcontent-radius-es);display:none}.modal-box{background-color:var(--color-base-100);border-top-left-radius:var(--modal-tl,var(--radius-box));border-top-right-radius:var(--modal-tr,var(--radius-box));border-bottom-left-radius:var(--modal-bl,var(--radius-box));border-bottom-right-radius:var(--modal-br,var(--radius-box));opacity:0;overscroll-behavior:contain;grid-row-start:1;grid-column-start:1;width:91.6667%;max-width:32rem;max-height:100vh;padding:1.5rem;transition:translate .3s ease-out,scale .3s ease-out,opacity .2s ease-out 50ms,box-shadow .3s ease-out;overflow-y:auto;scale:95%;box-shadow:0 25px 50px -12px #00000040}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.divider{white-space:nowrap;height:1rem;margin:var(--divider-m,1rem 0);--divider-color:var(--color-base-content);flex-direction:row;align-self:stretch;align-items:center;display:flex}@supports (color:color-mix(in lab,red,red)){.divider{--divider-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.divider:before,.divider:after{content:"";background-color:var(--divider-color);flex-grow:1;width:100%;height:.125rem}@media print{.divider:before,.divider:after{border:.5px solid}}.divider:not(:empty){gap:1rem}.number-input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.number-input[type=number]{-moz-appearance:textfield}.m-1{margin:calc(var(--spacing)*1)}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.mx-0\.5{margin-inline:calc(var(--spacing)*.5)}.mx-auto{margin-inline:auto}.input-sm{--size:calc(var(--size-field,.25rem)*8);font-size:.75rem}.input-sm[type=number]::-webkit-inner-spin-button{margin-block:-.5rem;margin-inline-end:-.75rem}.input-xs{--size:calc(var(--size-field,.25rem)*6);font-size:.6875rem}.input-xs[type=number]::-webkit-inner-spin-button{margin-block:-.25rem;margin-inline-end:-.75rem}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.my-4{margin-block:calc(var(--spacing)*4)}.my-6{margin-block:calc(var(--spacing)*6)}.label{white-space:nowrap;color:currentColor;align-items:center;gap:.375rem;display:inline-flex}@supports (color:color-mix(in lab,red,red)){.label{color:color-mix(in oklab,currentColor 60%,transparent)}}.label:has(input){cursor:pointer}.label:is(.input>*,.select>*){white-space:nowrap;height:calc(100% - .5rem);font-size:inherit;align-items:center;padding-inline:.75rem;display:flex}.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border)solid currentColor;margin-inline:-.75rem .75rem}@supports (color:color-mix(in lab,red,red)){.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border)solid color-mix(in oklab,currentColor 10%,#0000)}}.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border)solid currentColor;margin-inline:.75rem -.75rem}@supports (color:color-mix(in lab,red,red)){.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border)solid color-mix(in oklab,currentColor 10%,#0000)}}.join-horizontal{flex-direction:row}.join-horizontal>.join-item:first-child,.join-horizontal :first-child:not(:last-child) .join-item{--join-ss:var(--radius-field);--join-se:0;--join-es:var(--radius-field);--join-ee:0}.join-horizontal>.join-item:last-child,.join-horizontal :last-child:not(:first-child) .join-item{--join-ss:0;--join-se:var(--radius-field);--join-es:0;--join-ee:var(--radius-field)}.join-horizontal>.join-item:only-child,.join-horizontal :only-child .join-item{--join-ss:var(--radius-field);--join-se:var(--radius-field);--join-es:var(--radius-field);--join-ee:var(--radius-field)}.join-horizontal .join-item:where(:not(:first-child)),.join-item:where(:not(:first-child,:disabled,[disabled],.btn-disabled)){margin-block-start:0;margin-inline-start:calc(var(--border,1px)*-1)}.join-item:where(:is(:disabled,[disabled],.btn-disabled)){border-width:var(--border,1px)0 var(--border,1px)var(--border,1px)}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);margin-top:1.2em;margin-bottom:1.2em;font-size:1.25em;line-height:1.6}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);font-weight:500;text-decoration:underline}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:decimal}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:disc}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-counters);font-weight:400}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.25em;font-weight:600}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em;font-style:italic;font-weight:500}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:0;margin-bottom:.888889em;font-size:2.25em;font-weight:800;line-height:1.11111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:900}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:2em;margin-bottom:1em;font-size:1.5em;font-weight:700;line-height:1.33333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:800}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.6em;margin-bottom:.6em;font-size:1.25em;font-weight:600;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.5em;margin-bottom:.5em;font-weight:600;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em;display:block}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows)/10%),0 3px rgb(var(--tw-prose-kbd-shadows)/10%);padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;border-radius:.3125rem;padding-inline-start:.375em;font-family:inherit;font-size:.875em;font-weight:500}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-size:.875em;font-weight:600}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before,.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);padding-top:.857143em;padding-inline-end:1.14286em;padding-bottom:.857143em;border-radius:.375rem;margin-top:1.71429em;margin-bottom:1.71429em;padding-inline-start:1.14286em;font-size:.875em;font-weight:400;line-height:1.71429;overflow-x:auto}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit;background-color:#0000;border-width:0;border-radius:0;padding:0}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before,.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){table-layout:auto;width:100%;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.71429}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);vertical-align:bottom;padding-inline-end:.571429em;padding-bottom:.571429em;padding-inline-start:.571429em;font-weight:600}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);margin-top:.857143em;font-size:.875em;line-height:1.42857}.prose{--tw-prose-body:oklch(37.3% .034 259.733);--tw-prose-headings:oklch(21% .034 264.665);--tw-prose-lead:oklch(44.6% .03 256.802);--tw-prose-links:oklch(21% .034 264.665);--tw-prose-bold:oklch(21% .034 264.665);--tw-prose-counters:oklch(55.1% .027 264.364);--tw-prose-bullets:oklch(87.2% .01 258.338);--tw-prose-hr:oklch(92.8% .006 264.531);--tw-prose-quotes:oklch(21% .034 264.665);--tw-prose-quote-borders:oklch(92.8% .006 264.531);--tw-prose-captions:oklch(55.1% .027 264.364);--tw-prose-kbd:oklch(21% .034 264.665);--tw-prose-kbd-shadows:NaN NaN NaN;--tw-prose-code:oklch(21% .034 264.665);--tw-prose-pre-code:oklch(92.8% .006 264.531);--tw-prose-pre-bg:oklch(27.8% .033 256.848);--tw-prose-th-borders:oklch(87.2% .01 258.338);--tw-prose-td-borders:oklch(92.8% .006 264.531);--tw-prose-invert-body:oklch(87.2% .01 258.338);--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:oklch(70.7% .022 261.325);--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:oklch(70.7% .022 261.325);--tw-prose-invert-bullets:oklch(44.6% .03 256.802);--tw-prose-invert-hr:oklch(37.3% .034 259.733);--tw-prose-invert-quotes:oklch(96.7% .003 264.542);--tw-prose-invert-quote-borders:oklch(37.3% .034 259.733);--tw-prose-invert-captions:oklch(70.7% .022 261.325);--tw-prose-invert-kbd:#fff;--tw-prose-invert-kbd-shadows:255 255 255;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:oklch(87.2% .01 258.338);--tw-prose-invert-pre-bg:#00000080;--tw-prose-invert-th-borders:oklch(44.6% .03 256.802);--tw-prose-invert-td-borders:oklch(37.3% .034 259.733);font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.571429em;padding-inline-end:.571429em;padding-bottom:.571429em;padding-inline-start:.571429em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.modal-action{justify-content:flex-end;gap:.5rem;margin-top:1.5rem;display:flex}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-5{margin-top:calc(var(--spacing)*5)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-8{margin-top:calc(var(--spacing)*8)}.mt-10{margin-top:calc(var(--spacing)*10)}.mt-18{margin-top:calc(var(--spacing)*18)}.mt-20{margin-top:calc(var(--spacing)*20)}.mr-0\.5{margin-right:calc(var(--spacing)*.5)}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.fieldset-legend{color:var(--color-base-content);justify-content:space-between;align-items:center;gap:.5rem;margin-bottom:-.25rem;padding-block:.5rem;font-weight:600;display:flex}.mb-0\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.ml-0\.5{margin-left:calc(var(--spacing)*.5)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-3{margin-left:calc(var(--spacing)*3)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.status{aspect-ratio:1;border-radius:var(--radius-selector);background-color:var(--color-base-content);width:.5rem;height:.5rem;display:inline-block}@supports (color:color-mix(in lab,red,red)){.status{background-color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.status{vertical-align:middle;color:#0000004d;background-position:50%;background-repeat:no-repeat}@supports (color:color-mix(in lab,red,red)){.status{color:#0000004d}@supports (color:color-mix(in lab,red,red)){.status{color:color-mix(in oklab,var(--color-black)30%,transparent)}}}.status{background-image:radial-gradient(circle at 35% 30%,oklch(1 0 0/calc(var(--depth)*.5)),#0000);box-shadow:0 2px 3px -1px}@supports (color:color-mix(in lab,red,red)){.status{box-shadow:0 2px 3px -1px color-mix(in oklab,currentColor calc(var(--depth)*100%),#0000)}}.badge{border-radius:var(--radius-selector);vertical-align:middle;color:var(--badge-fg);border:var(--border)solid var(--badge-color,var(--color-base-200));width:fit-content;padding-inline:calc(.25rem*3 - var(--border));background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise);background-color:var(--badge-bg);--badge-bg:var(--badge-color,var(--color-base-100));--badge-fg:var(--color-base-content);--size:calc(var(--size-selector,.25rem)*6);height:var(--size);justify-content:center;align-items:center;gap:.5rem;font-size:.875rem;display:inline-flex}.kbd{border-radius:var(--radius-field);background-color:var(--color-base-200);vertical-align:middle;border:var(--border)solid var(--color-base-content);justify-content:center;align-items:center;padding-left:.5em;padding-right:.5em;display:inline-flex}@supports (color:color-mix(in lab,red,red)){.kbd{border:var(--border)solid color-mix(in srgb,var(--color-base-content)20%,#0000)}}.kbd{border-bottom:calc(var(--border) + 1px)solid var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.kbd{border-bottom:calc(var(--border) + 1px)solid color-mix(in srgb,var(--color-base-content)20%,#0000)}}.kbd{--size:calc(var(--size-selector,.25rem)*6);height:var(--size);min-width:var(--size);font-size:.875rem}.tabs{--tabs-height:auto;--tabs-direction:row;--tab-height:calc(var(--size-field,.25rem)*10);height:var(--tabs-height);flex-wrap:wrap;flex-direction:var(--tabs-direction);display:flex}.card-body{padding:var(--card-p,1.5rem);font-size:var(--card-fs,.875rem);flex-direction:column;flex:auto;gap:.5rem;display:flex}.card-body :where(p){flex-grow:1}.alert{border-radius:var(--radius-box);color:var(--color-base-content);background-color:var(--alert-color,var(--color-base-200));text-align:start;border:var(--border)solid var(--color-base-200);background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise);box-shadow:0 3px 0 -2px oklch(100% 0 0/calc(var(--depth)*.08)) inset,0 1px #000,0 4px 3px -2px oklch(0% 0 0/calc(var(--depth)*.08));grid-template-columns:auto;grid-auto-flow:column;justify-content:start;place-items:center start;gap:1rem;padding-block:.75rem;padding-inline:1rem;font-size:.875rem;line-height:1.25rem;display:grid}@supports (color:color-mix(in lab,red,red)){.alert{box-shadow:0 3px 0 -2px oklch(100% 0 0/calc(var(--depth)*.08)) inset,0 1px color-mix(in oklab,color-mix(in oklab,#000 20%,var(--alert-color,var(--color-base-200)))calc(var(--depth)*20%),#0000),0 4px 3px -2px oklch(0% 0 0/calc(var(--depth)*.08))}}.alert:has(:nth-child(2)){grid-template-columns:auto minmax(auto,1fr)}.alert.alert-outline{color:var(--alert-color);box-shadow:none;background-color:#0000;background-image:none}.alert.alert-dash{color:var(--alert-color);box-shadow:none;background-color:#0000;background-image:none;border-style:dashed}.alert.alert-soft{color:var(--alert-color,var(--color-base-content));background:var(--alert-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.alert.alert-soft{background:color-mix(in oklab,var(--alert-color,var(--color-base-content))8%,var(--color-base-100))}}.alert.alert-soft{border-color:var(--alert-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.alert.alert-soft{border-color:color-mix(in oklab,var(--alert-color,var(--color-base-content))10%,var(--color-base-100))}}.alert.alert-soft{box-shadow:none;background-image:none}.fieldset{grid-template-columns:1fr;grid-auto-rows:max-content;gap:.375rem;padding-block:.25rem;font-size:.75rem;display:grid}.join{--join-ss:0;--join-se:0;--join-es:0;--join-ee:0;align-items:stretch;display:inline-flex}.join :where(.join-item){border-start-start-radius:var(--join-ss,0);border-start-end-radius:var(--join-se,0);border-end-end-radius:var(--join-ee,0);border-end-start-radius:var(--join-es,0)}.join :where(.join-item) *{--join-ss:var(--radius-field);--join-se:var(--radius-field);--join-es:var(--radius-field);--join-ee:var(--radius-field)}.join>.join-item:where(:first-child),.join :first-child:not(:last-child) :where(.join-item){--join-ss:var(--radius-field);--join-se:0;--join-es:var(--radius-field);--join-ee:0}.join>.join-item:where(:last-child),.join :last-child:not(:first-child) :where(.join-item){--join-ss:0;--join-se:var(--radius-field);--join-es:0;--join-ee:var(--radius-field)}.join>.join-item:where(:only-child),.join :only-child :where(.join-item){--join-ss:var(--radius-field);--join-se:var(--radius-field);--join-es:var(--radius-field);--join-ee:var(--radius-field)}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:root .prose{--tw-prose-body:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-body:color-mix(in oklab,var(--color-base-content)80%,#0000)}}:root .prose{--tw-prose-headings:var(--color-base-content);--tw-prose-lead:var(--color-base-content);--tw-prose-links:var(--color-base-content);--tw-prose-bold:var(--color-base-content);--tw-prose-counters:var(--color-base-content);--tw-prose-bullets:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-bullets:color-mix(in oklab,var(--color-base-content)50%,#0000)}}:root .prose{--tw-prose-hr:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-hr:color-mix(in oklab,var(--color-base-content)20%,#0000)}}:root .prose{--tw-prose-quotes:var(--color-base-content);--tw-prose-quote-borders:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-quote-borders:color-mix(in oklab,var(--color-base-content)20%,#0000)}}:root .prose{--tw-prose-captions:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-captions:color-mix(in oklab,var(--color-base-content)50%,#0000)}}:root .prose{--tw-prose-code:var(--color-base-content);--tw-prose-pre-code:var(--color-neutral-content);--tw-prose-pre-bg:var(--color-neutral);--tw-prose-th-borders:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-th-borders:color-mix(in oklab,var(--color-base-content)50%,#0000)}}:root .prose{--tw-prose-td-borders:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-td-borders:color-mix(in oklab,var(--color-base-content)20%,#0000)}}:root .prose{--tw-prose-kbd:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:root .prose{--tw-prose-kbd:color-mix(in oklab,var(--color-base-content)80%,#0000)}}:root .prose :where(code):not(pre>code){background-color:var(--color-base-200);border-radius:var(--radius-selector);border:var(--border)solid var(--color-base-300);font-weight:inherit;padding-inline:.5em}:root .prose :where(code):not(pre>code):before,:root .prose :where(code):not(pre>code):after{display:none}.mask{vertical-align:middle;display:inline-block;-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hide-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.hide-scrollbar::-webkit-scrollbar{display:none}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.table{display:table}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.btn-circle{width:var(--size);height:var(--size);border-radius:3.40282e38px;padding-inline:0}.btn-square{width:var(--size);height:var(--size);padding-inline:0}.size-0{width:calc(var(--spacing)*0);height:calc(var(--spacing)*0)}.size-3{width:calc(var(--spacing)*3);height:calc(var(--spacing)*3)}.size-3\.5{width:calc(var(--spacing)*3.5);height:calc(var(--spacing)*3.5)}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-4\.5{width:calc(var(--spacing)*4.5);height:calc(var(--spacing)*4.5)}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-5\.5{width:calc(var(--spacing)*5.5);height:calc(var(--spacing)*5.5)}.size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.size-7{width:calc(var(--spacing)*7);height:calc(var(--spacing)*7)}.size-8{width:calc(var(--spacing)*8);height:calc(var(--spacing)*8)}.size-10{width:calc(var(--spacing)*10);height:calc(var(--spacing)*10)}.size-11{width:calc(var(--spacing)*11);height:calc(var(--spacing)*11)}.size-12{width:calc(var(--spacing)*12);height:calc(var(--spacing)*12)}.size-13{width:calc(var(--spacing)*13);height:calc(var(--spacing)*13)}.size-14{width:calc(var(--spacing)*14);height:calc(var(--spacing)*14)}.size-15{width:calc(var(--spacing)*15);height:calc(var(--spacing)*15)}.size-16{width:calc(var(--spacing)*16);height:calc(var(--spacing)*16)}.size-20{width:calc(var(--spacing)*20);height:calc(var(--spacing)*20)}.size-26{width:calc(var(--spacing)*26);height:calc(var(--spacing)*26)}.size-30{width:calc(var(--spacing)*30);height:calc(var(--spacing)*30)}.size-32{width:calc(var(--spacing)*32);height:calc(var(--spacing)*32)}.size-52{width:calc(var(--spacing)*52);height:calc(var(--spacing)*52)}.size-\[95\%\]{width:95%;height:95%}.size-full{width:100%;height:100%}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-7{height:calc(var(--spacing)*7)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-11\/12{height:91.6667%}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-20{height:calc(var(--spacing)*20)}.h-24{height:calc(var(--spacing)*24)}.h-72{height:calc(var(--spacing)*72)}.h-96{height:calc(var(--spacing)*96)}.h-\[75vh\]{height:75vh}.h-\[90\%\]{height:90%}.h-full{height:100%}.h-max{height:max-content}.h-px{height:1px}.h-screen{height:100vh}.max-h-11\/12{max-height:91.6667%}.max-h-80{max-height:calc(var(--spacing)*80)}.max-h-\[25vh\]{max-height:25vh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[97\%\]{max-height:97%}.max-h-\[300px\]{max-height:300px}.max-h-\[360px\]{max-height:360px}.max-h-\[520px\]{max-height:520px}.min-h-\[420px\]{min-height:420px}.min-h-screen{min-height:100vh}.loading-lg{width:calc(var(--size-selector,.25rem)*7)}.loading-md{width:calc(var(--size-selector,.25rem)*6)}.loading-sm{width:calc(var(--size-selector,.25rem)*5)}.loading-xl{width:calc(var(--size-selector,.25rem)*8)}.loading-xs{width:calc(var(--size-selector,.25rem)*4)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-11\/12{width:91.6667%}.w-16{width:calc(var(--spacing)*16)}.w-24{width:calc(var(--spacing)*24)}.w-32{width:calc(var(--spacing)*32)}.w-40{width:calc(var(--spacing)*40)}.w-44{width:calc(var(--spacing)*44)}.w-46{width:calc(var(--spacing)*46)}.w-52{width:calc(var(--spacing)*52)}.w-70{width:calc(var(--spacing)*70)}.w-\[90\%\]{width:90%}.w-\[min\(100vw-24px\,400px\)\]{width:min(100vw - 24px,400px)}.w-auto{width:auto}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-7xl{max-width:var(--container-7xl)}.max-w-16{max-width:calc(var(--spacing)*16)}.max-w-54{max-width:calc(var(--spacing)*54)}.max-w-74{max-width:calc(var(--spacing)*74)}.max-w-\[1920px\]{max-width:1920px}.max-w-\[calc\(100\%-2rem\)\]{max-width:calc(100% - 2rem)}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.min-w-10{min-width:calc(var(--spacing)*10)}.grow{flex-grow:1}.translate-1\/2{--tw-translate-x: 50% ;--tw-translate-y: 50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.\!-translate-y-1\/2{--tw-translate-y: -50% !important;translate:var(--tw-translate-x)var(--tw-translate-y)!important}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-\[87\%\]{--tw-translate-y: -87% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-0\.5{--tw-translate-y:calc(var(--spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-1{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-1\/2{--tw-translate-y: 50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-2{--tw-translate-y:calc(var(--spacing)*2);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-\[1\.02\]{scale:1.02}.scale-\[3\]{scale:3}.rotate-\[215deg\]{rotate:215deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.skeleton{border-radius:var(--radius-box);background-color:var(--color-base-300)}@media (prefers-reduced-motion:reduce){.skeleton{transition-duration:15s}}.skeleton{will-change:background-position;background-image:linear-gradient(105deg,#0000 0% 40%,var(--color-base-100)50%,#0000 60% 100%);background-position-x:-50%;background-repeat:no-repeat;background-size:200%;animation:1.8s ease-in-out infinite skeleton}.animate-bounce{animation:var(--animate-bounce)}.animate-caret-blink{animation:1.25s ease-out infinite caret-blink}.animate-pulse{animation:var(--animate-pulse)}.highlight-link a{cursor:pointer;color:var(--color-primary);text-decoration-line:none}.link{cursor:pointer;text-decoration-line:underline}.link:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.link:focus{outline-offset:2px;outline:2px solid #0000}}.link:focus-visible{outline-offset:2px;outline:2px solid}.cursor-auto{cursor:auto}.cursor-default{cursor:default}.cursor-eraser{cursor:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAFxJREFUeNq107EJACAMRFEHyxSu4jbuZ+0IyhUS4ZDogYEr3++Svp+ZDUzGrRTMIwKmiIApImCKiBgbOXOEcRxQsQcW7rVKeA9gj5gD2D3mgC/GcQSLMEdO+/qtE+/GV5duYCOPAAAAAElFTkSuQmCC) 2 14,default}.cursor-not-allowed{cursor:not-allowed}.cursor-pencil{cursor:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAAXNSR0IArs4c6QAAAAJ0Uk5TAAB2k804AAAAKklEQVR42mOAAhsbCA3n//9vQ74ApqE2QIAgwIqBykFaICwMAQwt9HEpAIf2Me1Ro5Q9AAAAAElFTkSuQmCC) 8 8,default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.scroll-py-1{scroll-padding-block:calc(var(--spacing)*1)}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.grid-cols-\[350px_1fr\]{grid-template-columns:350px 1fr}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-5{gap:calc(var(--spacing)*5)}.gap-6{gap:calc(var(--spacing)*6)}.gap-\[8px\]{gap:8px}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.tabs-box{background-color:var(--color-base-200);--tabs-box-radius:calc(var(--radius-field) + var(--radius-field) + var(--radius-field));border-radius:calc(var(--radius-field) + min(.25rem,var(--tabs-box-radius)));box-shadow:0 -.5px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 .5px oklch(0% 0 0/calc(var(--depth)*.05)) inset;padding:.25rem}.tabs-box .tab{border-radius:var(--radius-field);border-style:none}.tabs-box .tab:focus-visible,.tabs-box .tab:is(label:has(:checked:focus-visible)){outline-offset:2px}.tabs-box>:is(.tab-active,[aria-selected=true]):not(.tab-disabled,[disabled]),.tabs-box>:is(input:checked),.tabs-box>:is(label:has(:checked)){background-color:var(--tab-bg,var(--color-base-100));box-shadow:0 1px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px 1px -1px var(--color-neutral),0 1px 6px -4px var(--color-neutral)}@supports (color:color-mix(in lab,red,red)){.tabs-box>:is(.tab-active,[aria-selected=true]):not(.tab-disabled,[disabled]),.tabs-box>:is(input:checked),.tabs-box>:is(label:has(:checked)){box-shadow:0 1px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px 1px -1px color-mix(in oklab,var(--color-neutral)calc(var(--depth)*50%),#0000),0 1px 6px -4px color-mix(in oklab,var(--color-neutral)calc(var(--depth)*100%),#0000)}}@media (forced-colors:active){.tabs-box>:is(.tab-active,[aria-selected=true]):not(.tab-disabled,[disabled]),.tabs-box>:is(input:checked),.tabs-box>:is(label:has(:checked)){border:1px solid}}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-box{border-radius:var(--radius-box)}.rounded-field{border-radius:var(--radius-field)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-xs{border-radius:var(--radius-xs)}.rounded-t-box{border-top-left-radius:var(--radius-box);border-top-right-radius:var(--radius-box)}.\!border{border-style:var(--tw-border-style)!important;border-width:1px!important}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-3{border-style:var(--tw-border-style);border-width:3px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-6{border-style:var(--tw-border-style);border-width:6px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.badge-ghost{border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content);background-image:none}.badge-soft{color:var(--badge-color,var(--color-base-content));background-color:var(--badge-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.badge-soft{background-color:color-mix(in oklab,var(--badge-color,var(--color-base-content))8%,var(--color-base-100))}}.badge-soft{border-color:var(--badge-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.badge-soft{border-color:color-mix(in oklab,var(--badge-color,var(--color-base-content))10%,var(--color-base-100))}}.badge-soft{background-image:none}.badge-outline{color:var(--badge-color);--badge-bg:#0000;background-image:none;border-color:currentColor}.\!border-primary\/60{border-color:var(--color-primary)!important}@supports (color:color-mix(in lab,red,red)){.\!border-primary\/60{border-color:color-mix(in oklab,var(--color-primary)60%,transparent)!important}}.border-base-200{border-color:var(--color-base-200)}.border-base-300{border-color:var(--color-base-300)}.border-base-content\/10{border-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.border-base-content\/10{border-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.border-base-content\/20{border-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.border-base-content\/20{border-color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.border-base-content\/30{border-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.border-base-content\/30{border-color:color-mix(in oklab,var(--color-base-content)30%,transparent)}}.border-black{border-color:var(--color-black)}.border-primary{border-color:var(--color-primary)}.border-red-500{border-color:var(--color-red-500)}.\!bg-base-300{background-color:var(--color-base-300)!important}.\!bg-black\/80{background-color:#000c!important}@supports (color:color-mix(in lab,red,red)){.\!bg-black\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)!important}}.\!bg-black\/90{background-color:#000000e6!important}@supports (color:color-mix(in lab,red,red)){.\!bg-black\/90{background-color:color-mix(in oklab,var(--color-black)90%,transparent)!important}}.\!bg-primary{background-color:var(--color-primary)!important}.bg-\[\#5865F2\]{background-color:#5865f2}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/10{background-color:color-mix(in oklab,var(--color-amber-500)10%,transparent)}}.bg-base-100,.bg-base-100\/60{background-color:var(--color-base-100)}@supports (color:color-mix(in lab,red,red)){.bg-base-100\/60{background-color:color-mix(in oklab,var(--color-base-100)60%,transparent)}}.bg-base-100\/70{background-color:var(--color-base-100)}@supports (color:color-mix(in lab,red,red)){.bg-base-100\/70{background-color:color-mix(in oklab,var(--color-base-100)70%,transparent)}}.bg-base-200{background-color:var(--color-base-200)}.bg-base-300{background-color:var(--color-base-300)}.bg-base-content\/10{background-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.bg-base-content\/10{background-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.bg-base-content\/20{background-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.bg-base-content\/20{background-color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.bg-base-content\/80{background-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.bg-base-content\/80{background-color:color-mix(in oklab,var(--color-base-content)80%,transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-blue-500\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/10{background-color:color-mix(in oklab,var(--color-blue-500)10%,transparent)}}.bg-cyan-500\/10{background-color:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/10{background-color:color-mix(in oklab,var(--color-cyan-500)10%,transparent)}}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/10{background-color:color-mix(in oklab,var(--color-emerald-500)10%,transparent)}}.bg-fuchsia-500\/10{background-color:#e12afb1a}@supports (color:color-mix(in lab,red,red)){.bg-fuchsia-500\/10{background-color:color-mix(in oklab,var(--color-fuchsia-500)10%,transparent)}}.bg-green-500\/10{background-color:#00c7581a}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/10{background-color:color-mix(in oklab,var(--color-green-500)10%,transparent)}}.bg-green-600{background-color:var(--color-green-600)}.bg-indigo-500\/10{background-color:#625fff1a}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/10{background-color:color-mix(in oklab,var(--color-indigo-500)10%,transparent)}}.bg-lime-500\/10{background-color:#80cd001a}@supports (color:color-mix(in lab,red,red)){.bg-lime-500\/10{background-color:color-mix(in oklab,var(--color-lime-500)10%,transparent)}}.bg-orange-500\/10{background-color:#fe6e001a}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/10{background-color:color-mix(in oklab,var(--color-orange-500)10%,transparent)}}.bg-pink-500\/10{background-color:#f6339a1a}@supports (color:color-mix(in lab,red,red)){.bg-pink-500\/10{background-color:color-mix(in oklab,var(--color-pink-500)10%,transparent)}}.bg-primary\/10{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\/10{background-color:color-mix(in oklab,var(--color-primary)10%,transparent)}}.bg-purple-500\/10{background-color:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/10{background-color:color-mix(in oklab,var(--color-purple-500)10%,transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.bg-rose-500\/10{background-color:#ff23571a}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/10{background-color:color-mix(in oklab,var(--color-rose-500)10%,transparent)}}.bg-secondary{background-color:var(--color-secondary)}.bg-sky-500\/10{background-color:#00a5ef1a}@supports (color:color-mix(in lab,red,red)){.bg-sky-500\/10{background-color:color-mix(in oklab,var(--color-sky-500)10%,transparent)}}.bg-teal-500\/10{background-color:#00baa71a}@supports (color:color-mix(in lab,red,red)){.bg-teal-500\/10{background-color:color-mix(in oklab,var(--color-teal-500)10%,transparent)}}.bg-transparent{background-color:#0000}.bg-violet-500\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/10{background-color:color-mix(in oklab,var(--color-violet-500)10%,transparent)}}.bg-warning{background-color:var(--color-warning)}.bg-yellow-500\/10{background-color:#edb2001a}@supports (color:color-mix(in lab,red,red)){.bg-yellow-500\/10{background-color:color-mix(in oklab,var(--color-yellow-500)10%,transparent)}}.loading-dots{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='4' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' keySplines='.33,0,.66,.33;.33,.66,.66,1'/%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' keySplines='.33,0,.66,.33;.33,.66,.66,1' begin='0.1s'/%3E%3C/circle%3E%3Ccircle cx='20' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' keySplines='.33,0,.66,.33;.33,.66,.66,1' begin='0.2s'/%3E%3C/circle%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='4' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' keySplines='.33,0,.66,.33;.33,.66,.66,1'/%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' keySplines='.33,0,.66,.33;.33,.66,.66,1' begin='0.1s'/%3E%3C/circle%3E%3Ccircle cx='20' cy='12' r='3'%3E%3Canimate attributeName='cy' values='12;6;12;12' keyTimes='0;0.286;0.571;1' dur='1.05s' repeatCount='indefinite' keySplines='.33,0,.66,.33;.33,.66,.66,1' begin='0.2s'/%3E%3C/circle%3E%3C/svg%3E")}.loading-spinner{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}.fill-blue-800{fill:var(--color-blue-800)}.fill-primary{fill:var(--color-primary)}.fill-red-400{fill:var(--color-red-400)}.checkbox-sm{--size:calc(var(--size-selector,.25rem)*5);padding:.1875rem}.checkbox-xs{--size:calc(var(--size-selector,.25rem)*4);padding:.125rem}.radio-sm{padding:.1875rem}.radio-sm[type=radio]{--size:calc(var(--size-selector,.25rem)*5)}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-2\.5{padding:calc(var(--spacing)*2.5)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.table-sm :not(thead,tfoot) tr{font-size:.75rem}.table-sm :where(th,td){padding-block:.5rem;padding-inline:.75rem}.badge-lg{--size:calc(var(--size-selector,.25rem)*7);padding-inline:calc(.25rem*3.5 - var(--border));font-size:1rem}.badge-sm{--size:calc(var(--size-selector,.25rem)*5);padding-inline:calc(.25rem*2.5 - var(--border));font-size:.75rem}.badge-xs{--size:calc(var(--size-selector,.25rem)*4);padding-inline:calc(.25rem*2 - var(--border));font-size:.625rem}.px-0{padding-inline:calc(var(--spacing)*0)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-\[5px\]{padding-inline:5px}.py-0{padding-block:calc(var(--spacing)*0)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-6{padding-top:calc(var(--spacing)*6)}.pt-20{padding-top:calc(var(--spacing)*20)}.pr-1{padding-right:calc(var(--spacing)*1)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-2\.5{padding-right:calc(var(--spacing)*2.5)}.pr-8{padding-right:calc(var(--spacing)*8)}.pb-0\.5{padding-bottom:calc(var(--spacing)*.5)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pb-8{padding-bottom:calc(var(--spacing)*8)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-12\!{padding-left:calc(var(--spacing)*12)!important}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.text-start{text-align:start}.font-flag{font-family:"Noto Color Emoji","Geist",var(--font-sans)}.font-mono{font-family:var(--font-mono)}.font-pixel{font-family:"Pixelify Sans",var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-7xl{font-size:var(--text-7xl);line-height:var(--tw-leading,var(--text-7xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.kbd-sm{--size:calc(var(--size-selector,.25rem)*5);font-size:.75rem}.kbd-xs{--size:calc(var(--size-selector,.25rem)*4);font-size:.625rem}.select-sm{--size:calc(var(--size-field,.25rem)*8);font-size:.75rem}.text-\[10px\]{font-size:10px}.leading-none{--tw-leading:1;line-height:1}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-nowrap{text-wrap:nowrap}.break-words{overflow-wrap:break-word}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.\!text-primary-content{color:var(--color-primary-content)!important}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-base-content,.text-base-content\/20{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.text-base-content\/20{color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.text-base-content\/50{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.text-base-content\/50{color:color-mix(in oklab,var(--color-base-content)50%,transparent)}}.text-base-content\/60{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.text-base-content\/60{color:color-mix(in oklab,var(--color-base-content)60%,transparent)}}.text-base-content\/70{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.text-base-content\/70{color:color-mix(in oklab,var(--color-base-content)70%,transparent)}}.text-base-content\/80{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.text-base-content\/80{color:color-mix(in oklab,var(--color-base-content)80%,transparent)}}.text-black{color:var(--color-black)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-cyan-500{color:var(--color-cyan-500)}.text-emerald-500{color:var(--color-emerald-500)}.text-error{color:var(--color-error)}.text-fuchsia-500{color:var(--color-fuchsia-500)}.text-green-100{color:var(--color-green-100)}.text-green-500{color:var(--color-green-500)}.text-indigo-500{color:var(--color-indigo-500)}.text-lime-500{color:var(--color-lime-500)}.text-orange-500{color:var(--color-orange-500)}.text-pink-500{color:var(--color-pink-500)}.text-primary{color:var(--color-primary)}.text-primary-content{color:var(--color-primary-content)}.text-primary\/80{color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.text-primary\/80{color:color-mix(in oklab,var(--color-primary)80%,transparent)}}.text-purple-500{color:var(--color-purple-500)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-rose-500{color:var(--color-rose-500)}.text-secondary{color:var(--color-secondary)}.text-sky-500{color:var(--color-sky-500)}.text-success{color:var(--color-success)}.text-teal-500{color:var(--color-teal-500)}.text-violet-500{color:var(--color-violet-500)}.text-warning-content{color:var(--color-warning-content)}.text-white{color:var(--color-white)}.text-yellow-400{color:var(--color-yellow-400)}.text-yellow-500{color:var(--color-yellow-500)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.underline{text-decoration-line:underline}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.\!shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-base-content\/40{--tw-ring-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.ring-base-content\/40{--tw-ring-color:color-mix(in oklab,var(--color-base-content)40%,transparent)}}.ring-primary{--tw-ring-color:var(--color-primary)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.btn-ghost:not(.btn-active,:hover,:active:focus,:focus-visible){--btn-shadow:"";--btn-bg:#0000;--btn-border:#0000;--btn-noise:none}.btn-ghost:not(.btn-active,:hover,:active:focus,:focus-visible):not(:disabled,[disabled],.btn-disabled){--btn-fg:currentColor;outline-color:currentColor}@media (hover:none){.btn-ghost:hover:not(.btn-active,:active,:focus-visible,:disabled,[disabled],.btn-disabled){--btn-shadow:"";--btn-bg:#0000;--btn-border:#0000;--btn-noise:none;--btn-fg:currentColor}}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-1000{--tw-duration:1s;transition-duration:1s}.btn-outline:not(.btn-active,:hover,:active:focus,:focus-visible,:disabled,[disabled],.btn-disabled,:checked){--btn-shadow:"";--btn-bg:#0000;--btn-fg:var(--btn-color);--btn-border:var(--btn-color);--btn-noise:none}@media (hover:none){.btn-outline:hover:not(.btn-active,:active,:focus-visible,:disabled,[disabled],.btn-disabled,:checked){--btn-shadow:"";--btn-bg:#0000;--btn-fg:var(--btn-color);--btn-border:var(--btn-color);--btn-noise:none}}.btn-soft:not(.btn-active,:hover,:active:focus,:focus-visible,:disabled,[disabled],.btn-disabled){--btn-shadow:"";--btn-fg:var(--btn-color,var(--color-base-content));--btn-bg:var(--btn-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.btn-soft:not(.btn-active,:hover,:active:focus,:focus-visible,:disabled,[disabled],.btn-disabled){--btn-bg:color-mix(in oklab,var(--btn-color,var(--color-base-content))8%,var(--color-base-100))}}.btn-soft:not(.btn-active,:hover,:active:focus,:focus-visible,:disabled,[disabled],.btn-disabled){--btn-border:var(--btn-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.btn-soft:not(.btn-active,:hover,:active:focus,:focus-visible,:disabled,[disabled],.btn-disabled){--btn-border:color-mix(in oklab,var(--btn-color,var(--color-base-content))10%,var(--color-base-100))}}.btn-soft:not(.btn-active,:hover,:active:focus,:focus-visible,:disabled,[disabled],.btn-disabled){--btn-noise:none}@media (hover:none){.btn-soft:hover:not(.btn-active,:active,:focus-visible,:disabled,[disabled],.btn-disabled){--btn-shadow:"";--btn-fg:var(--btn-color,var(--color-base-content));--btn-bg:var(--btn-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.btn-soft:hover:not(.btn-active,:active,:focus-visible,:disabled,[disabled],.btn-disabled){--btn-bg:color-mix(in oklab,var(--btn-color,var(--color-base-content))8%,var(--color-base-100))}}.btn-soft:hover:not(.btn-active,:active,:focus-visible,:disabled,[disabled],.btn-disabled){--btn-border:var(--btn-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.btn-soft:hover:not(.btn-active,:active,:focus-visible,:disabled,[disabled],.btn-disabled){--btn-border:color-mix(in oklab,var(--btn-color,var(--color-base-content))10%,var(--color-base-100))}}.btn-soft:hover:not(.btn-active,:active,:focus-visible,:disabled,[disabled],.btn-disabled){--btn-noise:none}}.indicator-center{--indicator-s:50%;--indicator-e:50%;--indicator-x:-50%}[dir=rtl] .indicator-center{--indicator-x:50%}.btn-lg{--fontsize:1.125rem;--btn-p:1.25rem;--size:calc(var(--size-field,.25rem)*12)}.btn-sm{--fontsize:.75rem;--btn-p:.75rem;--size:calc(var(--size-field,.25rem)*8)}.btn-xl{--fontsize:1.375rem;--btn-p:1.5rem;--size:calc(var(--size-field,.25rem)*14)}.btn-xs{--fontsize:.6875rem;--btn-p:.5rem;--size:calc(var(--size-field,.25rem)*6)}.indicator-bottom{--indicator-t:auto;--indicator-b:0;--indicator-y:50%}.pixelated{image-rendering:pixelated;image-rendering:-moz-crisp-edges;image-rendering:crisp-edges}.badge-error{--badge-color:var(--color-error);--badge-fg:var(--color-error-content)}.badge-primary{--badge-color:var(--color-primary);--badge-fg:var(--color-primary-content)}.badge-secondary{--badge-color:var(--color-secondary);--badge-fg:var(--color-secondary-content)}.badge-success{--badge-color:var(--color-success);--badge-fg:var(--color-success-content)}.badge-warning{--badge-color:var(--color-warning);--badge-fg:var(--color-warning-content)}.btn-error{--btn-color:var(--color-error);--btn-fg:var(--color-error-content)}.btn-primary{--btn-color:var(--color-primary);--btn-fg:var(--color-primary-content)}.btn-success{--btn-color:var(--color-success);--btn-fg:var(--color-success-content)}.btn-warning{--btn-color:var(--color-warning);--btn-fg:var(--color-warning-content)}.select-none{-webkit-user-select:none;user-select:none}.input-error,.input-error:focus,.input-error:focus-within,.textarea-error,.textarea-error:focus,.textarea-error:focus-within{--input-color:var(--color-error)}.not-hover\:text-error:not(:hover){color:var(--color-error)}@media not all and (hover:hover){.not-hover\:text-error{color:var(--color-error)}}@media not all and (pointer:coarse){.not-touchscreen\:hidden{display:none}.not-touchscreen\:-translate-x-\[10\%\]{--tw-translate-x: -10% ;translate:var(--tw-translate-x)var(--tw-translate-y)}}@media not all and (display-mode:standalone){.not-pwa\:hidden{display:none}}.not-stuck\:border-transparent:not(.stuck){border-color:#0000}.peer-focus\:block:is(:where(.peer):focus~*){display:block}.before\:-translate-x-1\/3:before{content:var(--tw-content);--tw-translate-x:calc(calc(1/3*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.before\:-translate-x-1\/4:before{content:var(--tw-content);--tw-translate-x: -25% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.before\:translate-x-1\/3:before{content:var(--tw-content);--tw-translate-x:calc(1/3*100%);translate:var(--tw-translate-x)var(--tw-translate-y)}.before\:translate-x-1\/4:before{content:var(--tw-content);--tw-translate-x: 25% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.first\:rounded-l-md:first-child{border-top-left-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md)}.first\:border-l:first-child{border-left-style:var(--tw-border-style);border-left-width:1px}.last\:rounded-r-md:last-child{border-top-right-radius:var(--radius-md);border-bottom-right-radius:var(--radius-md)}@media (hover:hover){.hover\:bg-base-200:hover{background-color:var(--color-base-200)}.hover\:text-primary:hover{color:var(--color-primary)}.hover\:opacity-100:hover{opacity:1}.hover\:brightness-95:hover{--tw-brightness:brightness(95%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.hover\:brightness-105:hover{--tw-brightness:brightness(105%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled,.has-\[\:disabled\]\:opacity-50:has(:disabled){opacity:.5}.aria-selected\:bg-accent[aria-selected=true]{background-color:var(--color-accent)}.aria-selected\:bg-base-300[aria-selected=true]{background-color:var(--color-base-300)}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}:is(.\*\*\:data-\[slot\=command-input-wrapper\]\:h-12 *)[data-slot=command-input-wrapper]{height:calc(var(--spacing)*12)}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=open\]\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}@media not all and (min-width:400px){.max-\[400px\]\:hidden{display:none}}@media not all and (min-width:380px){.max-\[380px\]\:px-3{padding-inline:calc(var(--spacing)*3)}}@media not all and (min-width:80rem){.max-xl\:before\:-translate-x-1\/4:before{content:var(--tw-content);--tw-translate-x: -25% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.max-xl\:before\:translate-x-1\/4:before{content:var(--tw-content);--tw-translate-x: 25% ;translate:var(--tw-translate-x)var(--tw-translate-y)}}@media not all and (min-width:64rem){.max-lg\:pointer-events-none{pointer-events:none}.max-lg\:invisible{visibility:hidden}}@media not all and (min-width:40rem){.max-sm\:absolute{position:absolute}.max-sm\:dropdown-left{--anchor-h:left;--anchor-v:span-bottom}.max-sm\:dropdown-left .dropdown-content{transform-origin:100%;inset-inline-end:100%;top:0;bottom:auto}.max-sm\:dropdown-top{--anchor-v:top}.max-sm\:dropdown-top .dropdown-content{transform-origin:bottom;top:auto;bottom:100%}.max-sm\:bottom-4{bottom:calc(var(--spacing)*4)}.max-sm\:mt-1{margin-top:calc(var(--spacing)*1)}.max-sm\:mt-4{margin-top:calc(var(--spacing)*4)}.max-sm\:ml-2{margin-left:calc(var(--spacing)*2)}.max-sm\:hidden{display:none}.max-sm\:size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.max-sm\:size-full{width:100%;height:100%}.max-sm\:h-6{height:calc(var(--spacing)*6)}.max-sm\:h-10{height:calc(var(--spacing)*10)}.max-sm\:w-\[calc\(100\%-2rem\)\]{width:calc(100% - 2rem)}.max-sm\:max-w-32{max-width:calc(var(--spacing)*32)}.max-sm\:overflow-hidden{overflow:hidden}.max-sm\:overflow-x-hidden{overflow-x:hidden}.max-sm\:rounded-md{border-radius:var(--radius-md)}.max-sm\:rounded-none{border-radius:0}.max-sm\:px-1{padding-inline:calc(var(--spacing)*1)}.max-sm\:px-3{padding-inline:calc(var(--spacing)*3)}.max-sm\:px-4{padding-inline:calc(var(--spacing)*4)}.max-sm\:py-5{padding-block:calc(var(--spacing)*5)}.max-sm\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.max-sm\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.max-sm\:tabs-xs{--tab-height:calc(var(--size-field,.25rem)*6)}.max-sm\:tabs-xs :where(.tab){--tab-p:.375rem;--tab-radius-min:calc(.5rem - var(--border));font-size:.75rem}.max-sm\:before\:-translate-x-1\/4:before{content:var(--tw-content);--tw-translate-x: -25% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.max-sm\:before\:translate-x-1\/4:before{content:var(--tw-content);--tw-translate-x: 25% ;translate:var(--tw-translate-x)var(--tw-translate-y)}}@media (min-width:40rem){.sm\:right-4{right:calc(var(--spacing)*4)}.sm\:left-1\/2{left:50%}.sm\:col-span-2{grid-column:span 2/span 2}.sm\:mt-\[1px\]{margin-top:1px}.sm\:mb-3{margin-bottom:calc(var(--spacing)*3)}.min-sm\:hidden{display:none}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.sm\:size-10{width:calc(var(--spacing)*10);height:calc(var(--spacing)*10)}.sm\:size-12{width:calc(var(--spacing)*12);height:calc(var(--spacing)*12)}.sm\:h-11\/12{height:91.6667%}.sm\:h-14{height:calc(var(--spacing)*14)}.sm\:h-\[min\(50vw\,85vh\)\]{height:min(50vw,85vh)}.sm\:max-h-11\/12{max-height:91.6667%}.sm\:max-w-5xl{max-width:var(--container-5xl)}.sm\:max-w-lg{max-width:var(--container-lg)}.sm\:max-w-md{max-width:var(--container-md)}.sm\:max-w-xs{max-width:var(--container-xs)}.sm\:min-w-34{min-width:calc(var(--spacing)*34)}.sm\:grow{flex-grow:1}.sm\:-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.sm\:auto-cols-max{grid-auto-columns:max-content}.sm\:grid-flow-col{grid-auto-flow:column}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.sm\:grid-cols-16{grid-template-columns:repeat(16,minmax(0,1fr))}.sm\:grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.sm\:flex-col{flex-direction:column}.sm\:flex-row{flex-direction:row}.sm\:items-end{align-items:flex-end}.sm\:justify-between{justify-content:space-between}.sm\:justify-end{justify-content:flex-end}.sm\:gap-1{gap:calc(var(--spacing)*1)}.sm\:gap-3{gap:calc(var(--spacing)*3)}.sm\:gap-4{gap:calc(var(--spacing)*4)}.sm\:gap-6{gap:calc(var(--spacing)*6)}.sm\:overflow-x-hidden{overflow-x:hidden}.sm\:rounded-b-box{border-bottom-right-radius:var(--radius-box);border-bottom-left-radius:var(--radius-box)}.sm\:pb-3{padding-bottom:calc(var(--spacing)*3)}.sm\:text-left{text-align:left}.sm\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.sm\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.sm\:text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.sm\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.sm\:text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.sm\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.sm\:shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.sm\:btn-lg{--fontsize:1.125rem;--btn-p:1.25rem;--size:calc(var(--size-field,.25rem)*12)}.sm\:btn-md{--fontsize:.875rem;--btn-p:1rem;--size:calc(var(--size-field,.25rem)*10)}.sm\:btn-xl{--fontsize:1.375rem;--btn-p:1.5rem;--size:calc(var(--size-field,.25rem)*14)}}@media (min-width:48rem){.md\:max-w-lg{max-width:var(--container-lg)}.md\:max-w-xl{max-width:var(--container-xl)}.md\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.md\:grid-cols-16{grid-template-columns:repeat(16,minmax(0,1fr))}.md\:grid-cols-\[320px_1fr\]{grid-template-columns:320px 1fr}.md\:grid-cols-\[360px_1fr\]{grid-template-columns:360px 1fr}.md\:flex-row{flex-direction:row}.md\:items-end{align-items:flex-end}.md\:justify-between{justify-content:space-between}}@media (min-width:64rem){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:before\:-translate-x-1\/3:before{content:var(--tw-content);--tw-translate-x:calc(calc(1/3*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.lg\:before\:translate-x-1\/3:before{content:var(--tw-content);--tw-translate-x:calc(1/3*100%);translate:var(--tw-translate-x)var(--tw-translate-y)}}@media (min-width:80rem){.xl\:col-span-1{grid-column:span 1/span 1}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-32{grid-template-columns:repeat(32,minmax(0,1fr))}.xl\:before\:-translate-x-1\/4:before{content:var(--tw-content);--tw-translate-x: -25% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.xl\:before\:translate-x-1\/4:before{content:var(--tw-content);--tw-translate-x: 25% ;translate:var(--tw-translate-x)var(--tw-translate-y)}}@media (min-width:100rem){.min-\[100rem\]\:grid-cols-32{grid-template-columns:repeat(32,minmax(0,1fr))}}@media (pointer:coarse){.touchscreen\:hidden{display:none}}@media (display-mode:standalone){.pwa\:hidden{display:none}}.stuck\:border-base-content\/10.stuck{border-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.stuck\:border-base-content\/10.stuck{border-color:color-mix(in oklab,var(--color-base-content)10%,transparent)}}.\[\&_\[data-command-group\]\]\:px-2 [data-command-group]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[data-command-group\]\:not\(\[hidden\]\)_\~\[data-command-group\]\]\:pt-0 [data-command-group]:not([hidden])~[data-command-group]{padding-top:calc(var(--spacing)*0)}.\[\&_\[data-command-input-wrapper\]_svg\]\:h-5 [data-command-input-wrapper] svg{height:calc(var(--spacing)*5)}.\[\&_\[data-command-input-wrapper\]_svg\]\:w-5 [data-command-input-wrapper] svg{width:calc(var(--spacing)*5)}.\[\&_\[data-command-input\]\]\:h-12 [data-command-input]{height:calc(var(--spacing)*12)}.\[\&_\[data-command-item\]\]\:px-2 [data-command-item]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[data-command-item\]\]\:py-3 [data-command-item]{padding-block:calc(var(--spacing)*3)}.\[\&_\[data-command-item\]_svg\]\:h-5 [data-command-item] svg{height:calc(var(--spacing)*5)}.\[\&_\[data-command-item\]_svg\]\:w-5 [data-command-item] svg{width:calc(var(--spacing)*5)}.\[\&_input\]\:disabled\:cursor-not-allowed input:disabled{cursor:not-allowed}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@keyframes progress{50%{background-position-x:-115%}}@keyframes radio{0%{padding:5px}50%{padding:3px}}@keyframes toast{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}@keyframes dropdown{0%{opacity:0}}@keyframes rating{0%,40%{filter:brightness(1.05)contrast(1.05);scale:1.1}}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}@keyframes caret-blink{0%,70%,to{opacity:1}20%,50%{opacity:0}} diff --git a/frontend-backup/_app/immutable/assets/18.BD1hRFPA.css b/frontend-backup/_app/immutable/assets/18.BD1hRFPA.css index a6aa5f1..5d5908b 100644 --- a/frontend-backup/_app/immutable/assets/18.BD1hRFPA.css +++ b/frontend-backup/_app/immutable/assets/18.BD1hRFPA.css @@ -1 +1,41 @@ -[data-custom-class=body].svelte-11vl9q8,[data-custom-class=body].svelte-11vl9q8 :where(.svelte-11vl9q8){background:transparent!important}[data-custom-class=title].svelte-11vl9q8,[data-custom-class=title].svelte-11vl9q8 :where(.svelte-11vl9q8){font-family:Arial!important;font-size:26px!important;color:#000!important}[data-custom-class=subtitle].svelte-11vl9q8,[data-custom-class=subtitle].svelte-11vl9q8 :where(.svelte-11vl9q8){font-family:Arial!important;color:#595959!important;font-size:14px!important}[data-custom-class=heading_1].svelte-11vl9q8,[data-custom-class=heading_1].svelte-11vl9q8 :where(.svelte-11vl9q8){font-family:Arial!important;font-size:19px!important;color:#000!important}[data-custom-class=heading_2].svelte-11vl9q8,[data-custom-class=heading_2].svelte-11vl9q8 :where(.svelte-11vl9q8){font-family:Arial!important;font-size:17px!important;color:#000!important}[data-custom-class=body_text].svelte-11vl9q8,[data-custom-class=body_text].svelte-11vl9q8 :where(.svelte-11vl9q8){color:#595959!important;font-size:14px!important;font-family:Arial!important}[data-custom-class=link].svelte-11vl9q8,[data-custom-class=link].svelte-11vl9q8 :where(.svelte-11vl9q8){color:#3030f1!important;font-size:14px!important;font-family:Arial!important;word-break:break-word!important} +[data-custom-class="body"].svelte-11vl9q8, +[data-custom-class="body"].svelte-11vl9q8 :where(.svelte-11vl9q8) { + background: transparent !important; +} +[data-custom-class="title"].svelte-11vl9q8, +[data-custom-class="title"].svelte-11vl9q8 :where(.svelte-11vl9q8) { + font-family: Arial !important; + font-size: 26px !important; + color: #000 !important; +} +[data-custom-class="subtitle"].svelte-11vl9q8, +[data-custom-class="subtitle"].svelte-11vl9q8 :where(.svelte-11vl9q8) { + font-family: Arial !important; + color: #595959 !important; + font-size: 14px !important; +} +[data-custom-class="heading_1"].svelte-11vl9q8, +[data-custom-class="heading_1"].svelte-11vl9q8 :where(.svelte-11vl9q8) { + font-family: Arial !important; + font-size: 19px !important; + color: #000 !important; +} +[data-custom-class="heading_2"].svelte-11vl9q8, +[data-custom-class="heading_2"].svelte-11vl9q8 :where(.svelte-11vl9q8) { + font-family: Arial !important; + font-size: 17px !important; + color: #000 !important; +} +[data-custom-class="body_text"].svelte-11vl9q8, +[data-custom-class="body_text"].svelte-11vl9q8 :where(.svelte-11vl9q8) { + color: #595959 !important; + font-size: 14px !important; + font-family: Arial !important; +} +[data-custom-class="link"].svelte-11vl9q8, +[data-custom-class="link"].svelte-11vl9q8 :where(.svelte-11vl9q8) { + color: #3030f1 !important; + font-size: 14px !important; + font-family: Arial !important; + word-break: break-word !important; +} diff --git a/frontend-backup/_app/immutable/assets/2.BtKF873c.css b/frontend-backup/_app/immutable/assets/2.BtKF873c.css deleted file mode 100644 index 6c0aa1f..0000000 --- a/frontend-backup/_app/immutable/assets/2.BtKF873c.css +++ /dev/null @@ -1 +0,0 @@ -.confetti-holder.svelte-15ksp55{position:relative}@keyframes svelte-15ksp55-rotate{0%{transform:skew(var(--skew)) rotate3d(var(--full-rotation))}to{transform:skew(var(--skew)) rotate3d(var(--rotation-xyz),calc(var(--rotation-deg) + 360deg))}}@keyframes svelte-15ksp55-translate{0%{opacity:1}8%{transform:translateY(calc(var(--translate-y) * .95)) translate(calc(var(--translate-x) * (var(--x-spread) * .9)));opacity:1}12%{transform:translateY(var(--translate-y)) translate(calc(var(--translate-x) * (var(--x-spread) * .95)));opacity:1}16%{transform:translateY(var(--translate-y)) translate(calc(var(--translate-x) * var(--x-spread)));opacity:1}to{transform:translateY(calc(var(--translate-y) + var(--fall-distance))) translate(var(--translate-x));opacity:0}}@keyframes svelte-15ksp55-no-gravity-translate{0%{opacity:1}to{transform:translateY(var(--translate-y)) translate(var(--translate-x));opacity:0}}.confetti.svelte-15ksp55{--translate-y: calc(-200px * var(--translate-y-multiplier));--translate-x: calc(200px * var(--translate-x-multiplier));position:absolute;height:calc(var(--size) * var(--scale));width:calc(var(--size) * var(--scale));animation:svelte-15ksp55-translate var(--transition-duration) var(--transition-delay) var(--transition-iteration-count) linear;opacity:0;pointer-events:none}.confetti.svelte-15ksp55:before{--full-rotation: var(--rotation-xyz), var(--rotation-deg);content:"";display:block;width:100%;height:100%;background:var(--color);background-size:contain;transform:skew(var(--skew)) rotate3d(var(--full-rotation));animation:svelte-15ksp55-rotate var(--transition-duration) var(--transition-delay) var(--transition-iteration-count) linear}.rounded.svelte-15ksp55 .confetti:where(.svelte-15ksp55):before{border-radius:50%}.cone.svelte-15ksp55 .confetti:where(.svelte-15ksp55){--translate-x: calc(200px * var(--translate-y-multiplier) * var(--translate-x-multiplier))}.no-gravity.svelte-15ksp55 .confetti:where(.svelte-15ksp55){animation-name:svelte-15ksp55-no-gravity-translate;animation-timing-function:ease-out}@media (prefers-reduced-motion){.reduced-motion.svelte-15ksp55 .confetti:where(.svelte-15ksp55),.reduced-motion.svelte-15ksp55 .confetti:where(.svelte-15ksp55):before{animation:none}}:root{--iti-hover-color:rgba(0, 0, 0, .05);--iti-border-color:#ccc;--iti-dialcode-color:#999;--iti-dropdown-bg:white;--iti-spacer-horizontal:8px;--iti-flag-height:12px;--iti-flag-width:16px;--iti-border-width:1px;--iti-arrow-height:4px;--iti-arrow-width:6px;--iti-triangle-border:calc(var(--iti-arrow-width) / 2);--iti-arrow-padding:6px;--iti-arrow-color:#555;--iti-path-flags-1x:url(flags.a2kmUSbF.webp);--iti-path-flags-2x:url(flags@2x.gR6KPp3x.webp);--iti-path-globe-1x:url(data:image/webp;base64,UklGRvoBAABXRUJQVlA4TO4BAAAvE8AEENXIkiRZtZu7H33ql07cqTlilvbz9i4tosSMZma27zWzHRGyIEk2bcu2bdvGn23btm3btm3btm0/m5PqAEkLTYYwxTPAW84Tl6wNgmvIqptKKH9nYAr4xle+TML/BDI2LSg6QHKT/nngE4+ZMIUePUGeTvly+YoV8F1DtkGUzlfst2LUKTX6PaWZeMWiDqN6PgcciGa2boYPmxlR5bIIL5l6RVyDYMXmY1f10pGb7PmAN6sRTBTN3N9C9Zi/LbVhlL+Oo2M7RxoE/a4+/nDjeBrSVwtGYXGGMIrUbJzCU1LgFftP9K1hkpOXmBim30cIJ1hgOkSwMhYCMgmaw7rXcfT5/wQcFhrcuaOEBuq5ytYblLPBEhV0Aq/ZqcDn/6RUDgrUL0/0UZgK/p+rR8/4nZAqFfuXA6TbtFQyJSe4gpj6T19a5q+HLEkox0mlWXvbIGbuJw28fkozjybhT5oXHNY4py5rH1CflcyeB1fId9wXDAvFmz/8m6AE/8TgYzEVGoRMCKUhND7PQho7jGo1utkdV559cm3llGFs3sxBZrmGbEExop91jyfg5G7BmCCi6evNaSDFBrG3vyaRNzt+HJ9kQpVbgj+xFUoNgr3abxqGfH3WfQq9lp5UZPRW74ZbFgpq+EGo67dUAQ==);--iti-path-globe-2x:url(data:image/webp;base64,UklGRlwFAABXRUJQVlA4TE8FAAAvJ8AJEEfHKJIkKdmcgvjj3wwill7QwKhtJEnOnIDmv/zJLAdGbSNJcuYENP/lT2Y5OGwjSZHmtL3wTFl9tp8SM/9xz47Ctm2b7mnwDggKFNd77jgHyxhIYVvLQBDEHEBKRQBIOXzQpAhiBQCIAMaIAACHhAQHIMFhhRkSRt1hlRIYDAZDhiE3CVrBS2gFkZGRYdA6mjQQBYAv6yOZSVAQCoPWMCWBIBQKwtCCUBANFARBlChBfPCG/dZUjxJECYJQECU+KGFQEC1YdN/NSUNRTDm4osQBGUwFjDFCBOYRo9QWxAmPlKQECRERMbVLCZapZ0owSrnz3hb6/P8auL9vAwr7/xeS5EV9q2sWU2vbtjla27Zt28akprq6a3bPtm2np87eJIvePUzd9fvoXkT0fwK4Vwdo8t6qyQW+O7Tn4k7NAdvi/jMR0fGpwhglhZBKm3B0pzvg3JcDrUuMEn7SDaUIRTLhhqb/AbDvw+bbJToMEq5QflFfv+QhJVPxcmkm/Ih9TzZfFxk/CJUnP7zMykJqnhsqQ51M6tTv2Pdgc/GKCuKmaI96HlhVAJy4vWVWWgRSfYJ9l4jv+4aB0F15Td3kH1YW4DiMnEJHGSaFOoOdw4LxOhCqPTf0JvLys6I8Wv/9BeeuhEkZfE+UZfNSOumqT+CArgHwbBHZw+ZB00AGeiYxIKKudH2zDxg97VK7FxdO6+9Pmt3l4J/bZR58rtyEOY6dtdhcMbPh2jsyNKr3mNnDy+c8Pig0od5wGXakg7DYgYgfU5648s0fC0Ljv9SigQVrHwUafXVgmNE92zBBBeYjsHn5L6Emz/6776EnxwJUsqKADMDmq8fG/T16fujr7lhknhheLG4PPwFD15IXs2xWFWBZVj4ndDW+fDItPRncssi75Fxv/iHQQL2PDbkg4k/zP/BfgfR1axxy59PM/IYdsypZWUCUiTlck2/zTz4fm3LzqkNlxxnzW+A4fK4vkbNrIbn7bgVoKn3djQu90krrllynQ1g7v2rpjUYsfeR6tdLSaqV5w5fR6E5+k8BVT/0aqqSXDAdV4wvpCplTCJnbFTLb9dTEHjoQQiTMC7Ah3PPuwbffOfD+xP4d3s7uMGDC+wcOvrs7kVKTZ6m4EMIVfn1O61JyrnuU3EM3A3znefrp142f5cnmnDXNyXecPFYUYNt2pVUlvot//qWFDszz9aTrCuGpQVX4Wn+KAw6rCrAgw/eqLZXQVQfmXZ5QnnCF2wrwdlJ5F8DhC1MP/itRnhv+wmHji7hpT+x0tekziRw7jxUF2LZznX3xOydH3e5fVhYWO5QOlClPzYFX9EMD65P9bBHZ16fLq7dHfrlal5vO2LxuKkTcfABvjZDxwsWvf9hs7pCv2ry5cowvB2/8iosq5YraWHw7JCxLyaAWZPoUrilMaRMKo8WwpQv0z2AXqnLzLA42H5gKEVcTuM76RfDtpVrzh9b5oTp0e5SI+Topy78hAzFm6QqRMN2gugNYLH0EoHF6Pyw3vm+OYQMRlwPpCd+sAep/WQ1OPGZZ13lO0ugpE0+m1xGRbdNKe67wzTN3Nouw3yfw03WH+nrnqUAnEul5YOXA5o20L4SnAiXjoX6f7Pm6RIeBl14EGe4a8VLad4UnvZTwysxR2DtOumEiUOpliLi7FWNb2vOEK4QQnnyoIav+Ko9XhGbUF1gZ7tWKcVBLX+T05HkOGmn0iA4WjsW9Ww6ny3WiTAjhyd41WWfGrv4sAof7t/l+ppGJlFeR7oBVr4kF2BYP0oYjDxsZpjuTsQDHsXjAUYxrrwwe9gGWRRRZ3CcA);--iti-flag-sprite-width:3904px;--iti-flag-sprite-height:12px;--iti-mobile-popup-margin:30px}.iti{position:relative;display:inline-block}.iti *{box-sizing:border-box}.iti__hide{display:none}.iti__v-hide{visibility:hidden}.iti__a11y-text{width:1px;height:1px;clip:rect(1px,1px,1px,1px);overflow:hidden;position:absolute}.iti input.iti__tel-input,.iti input.iti__tel-input[type=tel],.iti input.iti__tel-input[type=text]{position:relative;z-index:0;margin:0!important}.iti__country-container{position:absolute;top:0;bottom:0;padding:var(--iti-border-width)}.iti__selected-country{z-index:1;position:relative;display:flex;align-items:center;height:100%;background:0 0;border:0;margin:0;padding:0;font-family:inherit;font-size:inherit;color:inherit;border-radius:0;font-weight:inherit;line-height:inherit;text-decoration:none}.iti__selected-country-primary{display:flex;align-items:center;height:100%;padding:0 var(--iti-arrow-padding) 0 var(--iti-spacer-horizontal)}.iti__arrow{margin-left:var(--iti-arrow-padding);width:0;height:0;border-left:var(--iti-triangle-border) solid transparent;border-right:var(--iti-triangle-border) solid transparent;border-top:var(--iti-arrow-height) solid var(--iti-arrow-color)}[dir=rtl] .iti__arrow{margin-right:var(--iti-arrow-padding);margin-left:0}.iti__arrow--up{border-top:none;border-bottom:var(--iti-arrow-height) solid var(--iti-arrow-color)}.iti__dropdown-content{border-radius:3px;background-color:var(--iti-dropdown-bg)}.iti--inline-dropdown .iti__dropdown-content{position:absolute;z-index:2;margin-top:3px;margin-left:calc(var(--iti-border-width) * -1);border:var(--iti-border-width) solid var(--iti-border-color);box-shadow:1px 1px 4px #0003}.iti__search-input{width:100%;border-width:0;border-radius:3px}.iti__search-input+.iti__country-list{border-top:1px solid var(--iti-border-color)}.iti__country-list{list-style:none;padding:0;margin:0;overflow-y:scroll;-webkit-overflow-scrolling:touch}.iti--inline-dropdown .iti__country-list{max-height:185px}.iti--flexible-dropdown-width .iti__country-list{white-space:nowrap}@media (max-width:500px){.iti--flexible-dropdown-width .iti__country-list{white-space:normal}}.iti__country{display:flex;align-items:center;padding:8px var(--iti-spacer-horizontal);outline:0}.iti__dial-code{color:var(--iti-dialcode-color)}.iti__country.iti__highlight{background-color:var(--iti-hover-color)}.iti__country-list .iti__flag,.iti__country-name{margin-right:var(--iti-spacer-horizontal)}[dir=rtl] .iti__country-list .iti__flag,[dir=rtl] .iti__country-name{margin-right:0;margin-left:var(--iti-spacer-horizontal)}.iti--allow-dropdown .iti__country-container:not(:has(+input[disabled])):not(:has(+input[readonly])):hover,.iti--allow-dropdown .iti__country-container:not(:has(+input[disabled])):not(:has(+input[readonly])):hover button{cursor:pointer}.iti--allow-dropdown .iti__country-container:not(:has(+input[disabled])):not(:has(+input[readonly])) .iti__selected-country-primary:hover,.iti--allow-dropdown .iti__country-container:not(:has(+input[disabled])):not(:has(+input[readonly])) .iti__selected-country:has(+.iti__dropdown-content:hover) .iti__selected-country-primary{background-color:var(--iti-hover-color)}.iti .iti__selected-dial-code{margin-left:4px}[dir=rtl] .iti .iti__selected-dial-code{margin-left:0;margin-right:4px}.iti--container{position:fixed;top:-1000px;left:-1000px;z-index:1060;padding:var(--iti-border-width)}.iti--container:hover{cursor:pointer}.iti--fullscreen-popup.iti--container{background-color:#00000080;top:0;bottom:0;left:0;right:0;position:fixed;padding:var(--iti-mobile-popup-margin);display:flex;flex-direction:column;justify-content:flex-start}.iti--fullscreen-popup .iti__dropdown-content{display:flex;flex-direction:column;max-height:100%;position:relative}.iti--fullscreen-popup .iti__country{padding:10px;line-height:1.5em}.iti__flag{--iti-flag-offset:100px;height:var(--iti-flag-height);width:var(--iti-flag-width);border-radius:1px;box-shadow:0 0 1px #888;background-image:var(--iti-path-flags-1x);background-repeat:no-repeat;background-position:var(--iti-flag-offset) 0;background-size:var(--iti-flag-sprite-width) var(--iti-flag-sprite-height)}.iti__ac{--iti-flag-offset:0px}.iti__ad{--iti-flag-offset:-16px}.iti__ae{--iti-flag-offset:-32px}.iti__af{--iti-flag-offset:-48px}.iti__ag{--iti-flag-offset:-64px}.iti__ai{--iti-flag-offset:-80px}.iti__al{--iti-flag-offset:-96px}.iti__am{--iti-flag-offset:-112px}.iti__ao{--iti-flag-offset:-128px}.iti__ar{--iti-flag-offset:-144px}.iti__as{--iti-flag-offset:-160px}.iti__at{--iti-flag-offset:-176px}.iti__au{--iti-flag-offset:-192px}.iti__aw{--iti-flag-offset:-208px}.iti__ax{--iti-flag-offset:-224px}.iti__az{--iti-flag-offset:-240px}.iti__ba{--iti-flag-offset:-256px}.iti__bb{--iti-flag-offset:-272px}.iti__bd{--iti-flag-offset:-288px}.iti__be{--iti-flag-offset:-304px}.iti__bf{--iti-flag-offset:-320px}.iti__bg{--iti-flag-offset:-336px}.iti__bh{--iti-flag-offset:-352px}.iti__bi{--iti-flag-offset:-368px}.iti__bj{--iti-flag-offset:-384px}.iti__bl{--iti-flag-offset:-400px}.iti__bm{--iti-flag-offset:-416px}.iti__bn{--iti-flag-offset:-432px}.iti__bo{--iti-flag-offset:-448px}.iti__bq{--iti-flag-offset:-464px}.iti__br{--iti-flag-offset:-480px}.iti__bs{--iti-flag-offset:-496px}.iti__bt{--iti-flag-offset:-512px}.iti__bw{--iti-flag-offset:-528px}.iti__by{--iti-flag-offset:-544px}.iti__bz{--iti-flag-offset:-560px}.iti__ca{--iti-flag-offset:-576px}.iti__cc{--iti-flag-offset:-592px}.iti__cd{--iti-flag-offset:-608px}.iti__cf{--iti-flag-offset:-624px}.iti__cg{--iti-flag-offset:-640px}.iti__ch{--iti-flag-offset:-656px}.iti__ci{--iti-flag-offset:-672px}.iti__ck{--iti-flag-offset:-688px}.iti__cl{--iti-flag-offset:-704px}.iti__cm{--iti-flag-offset:-720px}.iti__cn{--iti-flag-offset:-736px}.iti__co{--iti-flag-offset:-752px}.iti__cr{--iti-flag-offset:-768px}.iti__cu{--iti-flag-offset:-784px}.iti__cv{--iti-flag-offset:-800px}.iti__cw{--iti-flag-offset:-816px}.iti__cx{--iti-flag-offset:-832px}.iti__cy{--iti-flag-offset:-848px}.iti__cz{--iti-flag-offset:-864px}.iti__de{--iti-flag-offset:-880px}.iti__dj{--iti-flag-offset:-896px}.iti__dk{--iti-flag-offset:-912px}.iti__dm{--iti-flag-offset:-928px}.iti__do{--iti-flag-offset:-944px}.iti__dz{--iti-flag-offset:-960px}.iti__ec{--iti-flag-offset:-976px}.iti__ee{--iti-flag-offset:-992px}.iti__eg{--iti-flag-offset:-1008px}.iti__eh{--iti-flag-offset:-1024px}.iti__er{--iti-flag-offset:-1040px}.iti__es{--iti-flag-offset:-1056px}.iti__et{--iti-flag-offset:-1072px}.iti__fi{--iti-flag-offset:-1088px}.iti__fj{--iti-flag-offset:-1104px}.iti__fk{--iti-flag-offset:-1120px}.iti__fm{--iti-flag-offset:-1136px}.iti__fo{--iti-flag-offset:-1152px}.iti__fr{--iti-flag-offset:-1168px}.iti__ga{--iti-flag-offset:-1184px}.iti__gb{--iti-flag-offset:-1200px}.iti__gd{--iti-flag-offset:-1216px}.iti__ge{--iti-flag-offset:-1232px}.iti__gf{--iti-flag-offset:-1248px}.iti__gg{--iti-flag-offset:-1264px}.iti__gh{--iti-flag-offset:-1280px}.iti__gi{--iti-flag-offset:-1296px}.iti__gl{--iti-flag-offset:-1312px}.iti__gm{--iti-flag-offset:-1328px}.iti__gn{--iti-flag-offset:-1344px}.iti__gp{--iti-flag-offset:-1360px}.iti__gq{--iti-flag-offset:-1376px}.iti__gr{--iti-flag-offset:-1392px}.iti__gt{--iti-flag-offset:-1408px}.iti__gu{--iti-flag-offset:-1424px}.iti__gw{--iti-flag-offset:-1440px}.iti__gy{--iti-flag-offset:-1456px}.iti__hk{--iti-flag-offset:-1472px}.iti__hn{--iti-flag-offset:-1488px}.iti__hr{--iti-flag-offset:-1504px}.iti__ht{--iti-flag-offset:-1520px}.iti__hu{--iti-flag-offset:-1536px}.iti__id{--iti-flag-offset:-1552px}.iti__ie{--iti-flag-offset:-1568px}.iti__il{--iti-flag-offset:-1584px}.iti__im{--iti-flag-offset:-1600px}.iti__in{--iti-flag-offset:-1616px}.iti__io{--iti-flag-offset:-1632px}.iti__iq{--iti-flag-offset:-1648px}.iti__ir{--iti-flag-offset:-1664px}.iti__is{--iti-flag-offset:-1680px}.iti__it{--iti-flag-offset:-1696px}.iti__je{--iti-flag-offset:-1712px}.iti__jm{--iti-flag-offset:-1728px}.iti__jo{--iti-flag-offset:-1744px}.iti__jp{--iti-flag-offset:-1760px}.iti__ke{--iti-flag-offset:-1776px}.iti__kg{--iti-flag-offset:-1792px}.iti__kh{--iti-flag-offset:-1808px}.iti__ki{--iti-flag-offset:-1824px}.iti__km{--iti-flag-offset:-1840px}.iti__kn{--iti-flag-offset:-1856px}.iti__kp{--iti-flag-offset:-1872px}.iti__kr{--iti-flag-offset:-1888px}.iti__kw{--iti-flag-offset:-1904px}.iti__ky{--iti-flag-offset:-1920px}.iti__kz{--iti-flag-offset:-1936px}.iti__la{--iti-flag-offset:-1952px}.iti__lb{--iti-flag-offset:-1968px}.iti__lc{--iti-flag-offset:-1984px}.iti__li{--iti-flag-offset:-2000px}.iti__lk{--iti-flag-offset:-2016px}.iti__lr{--iti-flag-offset:-2032px}.iti__ls{--iti-flag-offset:-2048px}.iti__lt{--iti-flag-offset:-2064px}.iti__lu{--iti-flag-offset:-2080px}.iti__lv{--iti-flag-offset:-2096px}.iti__ly{--iti-flag-offset:-2112px}.iti__ma{--iti-flag-offset:-2128px}.iti__mc{--iti-flag-offset:-2144px}.iti__md{--iti-flag-offset:-2160px}.iti__me{--iti-flag-offset:-2176px}.iti__mf{--iti-flag-offset:-2192px}.iti__mg{--iti-flag-offset:-2208px}.iti__mh{--iti-flag-offset:-2224px}.iti__mk{--iti-flag-offset:-2240px}.iti__ml{--iti-flag-offset:-2256px}.iti__mm{--iti-flag-offset:-2272px}.iti__mn{--iti-flag-offset:-2288px}.iti__mo{--iti-flag-offset:-2304px}.iti__mp{--iti-flag-offset:-2320px}.iti__mq{--iti-flag-offset:-2336px}.iti__mr{--iti-flag-offset:-2352px}.iti__ms{--iti-flag-offset:-2368px}.iti__mt{--iti-flag-offset:-2384px}.iti__mu{--iti-flag-offset:-2400px}.iti__mv{--iti-flag-offset:-2416px}.iti__mw{--iti-flag-offset:-2432px}.iti__mx{--iti-flag-offset:-2448px}.iti__my{--iti-flag-offset:-2464px}.iti__mz{--iti-flag-offset:-2480px}.iti__na{--iti-flag-offset:-2496px}.iti__nc{--iti-flag-offset:-2512px}.iti__ne{--iti-flag-offset:-2528px}.iti__nf{--iti-flag-offset:-2544px}.iti__ng{--iti-flag-offset:-2560px}.iti__ni{--iti-flag-offset:-2576px}.iti__nl{--iti-flag-offset:-2592px}.iti__no{--iti-flag-offset:-2608px}.iti__np{--iti-flag-offset:-2624px}.iti__nr{--iti-flag-offset:-2640px}.iti__nu{--iti-flag-offset:-2656px}.iti__nz{--iti-flag-offset:-2672px}.iti__om{--iti-flag-offset:-2688px}.iti__pa{--iti-flag-offset:-2704px}.iti__pe{--iti-flag-offset:-2720px}.iti__pf{--iti-flag-offset:-2736px}.iti__pg{--iti-flag-offset:-2752px}.iti__ph{--iti-flag-offset:-2768px}.iti__pk{--iti-flag-offset:-2784px}.iti__pl{--iti-flag-offset:-2800px}.iti__pm{--iti-flag-offset:-2816px}.iti__pr{--iti-flag-offset:-2832px}.iti__ps{--iti-flag-offset:-2848px}.iti__pt{--iti-flag-offset:-2864px}.iti__pw{--iti-flag-offset:-2880px}.iti__py{--iti-flag-offset:-2896px}.iti__qa{--iti-flag-offset:-2912px}.iti__re{--iti-flag-offset:-2928px}.iti__ro{--iti-flag-offset:-2944px}.iti__rs{--iti-flag-offset:-2960px}.iti__ru{--iti-flag-offset:-2976px}.iti__rw{--iti-flag-offset:-2992px}.iti__sa{--iti-flag-offset:-3008px}.iti__sb{--iti-flag-offset:-3024px}.iti__sc{--iti-flag-offset:-3040px}.iti__sd{--iti-flag-offset:-3056px}.iti__se{--iti-flag-offset:-3072px}.iti__sg{--iti-flag-offset:-3088px}.iti__sh{--iti-flag-offset:-3104px}.iti__si{--iti-flag-offset:-3120px}.iti__sj{--iti-flag-offset:-3136px}.iti__sk{--iti-flag-offset:-3152px}.iti__sl{--iti-flag-offset:-3168px}.iti__sm{--iti-flag-offset:-3184px}.iti__sn{--iti-flag-offset:-3200px}.iti__so{--iti-flag-offset:-3216px}.iti__sr{--iti-flag-offset:-3232px}.iti__ss{--iti-flag-offset:-3248px}.iti__st{--iti-flag-offset:-3264px}.iti__sv{--iti-flag-offset:-3280px}.iti__sx{--iti-flag-offset:-3296px}.iti__sy{--iti-flag-offset:-3312px}.iti__sz{--iti-flag-offset:-3328px}.iti__tc{--iti-flag-offset:-3344px}.iti__td{--iti-flag-offset:-3360px}.iti__tg{--iti-flag-offset:-3376px}.iti__th{--iti-flag-offset:-3392px}.iti__tj{--iti-flag-offset:-3408px}.iti__tk{--iti-flag-offset:-3424px}.iti__tl{--iti-flag-offset:-3440px}.iti__tm{--iti-flag-offset:-3456px}.iti__tn{--iti-flag-offset:-3472px}.iti__to{--iti-flag-offset:-3488px}.iti__tr{--iti-flag-offset:-3504px}.iti__tt{--iti-flag-offset:-3520px}.iti__tv{--iti-flag-offset:-3536px}.iti__tw{--iti-flag-offset:-3552px}.iti__tz{--iti-flag-offset:-3568px}.iti__ua{--iti-flag-offset:-3584px}.iti__ug{--iti-flag-offset:-3600px}.iti__us{--iti-flag-offset:-3616px}.iti__uy{--iti-flag-offset:-3632px}.iti__uz{--iti-flag-offset:-3648px}.iti__va{--iti-flag-offset:-3664px}.iti__vc{--iti-flag-offset:-3680px}.iti__ve{--iti-flag-offset:-3696px}.iti__vg{--iti-flag-offset:-3712px}.iti__vi{--iti-flag-offset:-3728px}.iti__vn{--iti-flag-offset:-3744px}.iti__vu{--iti-flag-offset:-3760px}.iti__wf{--iti-flag-offset:-3776px}.iti__ws{--iti-flag-offset:-3792px}.iti__xk{--iti-flag-offset:-3808px}.iti__ye{--iti-flag-offset:-3824px}.iti__yt{--iti-flag-offset:-3840px}.iti__za{--iti-flag-offset:-3856px}.iti__zm{--iti-flag-offset:-3872px}.iti__zw{--iti-flag-offset:-3888px}.iti__globe{background-image:var(--iti-path-globe-1x);background-size:contain;background-position:right;box-shadow:none;height:19px}@media (min-resolution:2x){.iti__flag{background-image:var(--iti-path-flags-2x)}.iti__globe{background-image:var(--iti-path-globe-2x)}}.iti__selected-country-primary{padding:0 8px 0 12px!important;border-radius:999px}.iti__search-input{padding:6px}.snoo-cls-11.svelte-1977t4s{stroke-width:0;fill:#ffc49c}.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0,0,0,0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px #0000001a}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:#0000000d}}.maplibregl-ctrl button:not(:disabled):active{background-color:#0000000d}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%23333' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%2333b5e5' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:#ffffff80;margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:#ffffff80;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:#0000000d}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:#000000bf;text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:#ffffffbf;border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:#0000000d}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px #0000001a;padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px #00000059;box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:#0006;color:#fff;display:flex;font-size:1.4em;top:0;right:0;bottom:0;left:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}.disable-pinch-zoom.svelte-6wmtgk{touch-action:pan-x pan-y} diff --git a/frontend-backup/_app/immutable/assets/4.BtKF873c.css b/frontend-backup/_app/immutable/assets/4.BtKF873c.css index 19811c1..3d80090 100644 --- a/frontend-backup/_app/immutable/assets/4.BtKF873c.css +++ b/frontend-backup/_app/immutable/assets/4.BtKF873c.css @@ -1 +1,1775 @@ -.confetti-holder.svelte-15ksp55{position:relative}@keyframes svelte-15ksp55-rotate{0%{transform:skew(var(--skew)) rotate3d(var(--full-rotation))}to{transform:skew(var(--skew)) rotate3d(var(--rotation-xyz),calc(var(--rotation-deg) + 360deg))}}@keyframes svelte-15ksp55-translate{0%{opacity:1}8%{transform:translateY(calc(var(--translate-y) * .95)) translate(calc(var(--translate-x) * (var(--x-spread) * .9)));opacity:1}12%{transform:translateY(var(--translate-y)) translate(calc(var(--translate-x) * (var(--x-spread) * .95)));opacity:1}16%{transform:translateY(var(--translate-y)) translate(calc(var(--translate-x) * var(--x-spread)));opacity:1}to{transform:translateY(calc(var(--translate-y) + var(--fall-distance))) translate(var(--translate-x));opacity:0}}@keyframes svelte-15ksp55-no-gravity-translate{0%{opacity:1}to{transform:translateY(var(--translate-y)) translate(var(--translate-x));opacity:0}}.confetti.svelte-15ksp55{--translate-y: calc(-200px * var(--translate-y-multiplier));--translate-x: calc(200px * var(--translate-x-multiplier));position:absolute;height:calc(var(--size) * var(--scale));width:calc(var(--size) * var(--scale));animation:svelte-15ksp55-translate var(--transition-duration) var(--transition-delay) var(--transition-iteration-count) linear;opacity:0;pointer-events:none}.confetti.svelte-15ksp55:before{--full-rotation: var(--rotation-xyz), var(--rotation-deg);content:"";display:block;width:100%;height:100%;background:var(--color);background-size:contain;transform:skew(var(--skew)) rotate3d(var(--full-rotation));animation:svelte-15ksp55-rotate var(--transition-duration) var(--transition-delay) var(--transition-iteration-count) linear}.rounded.svelte-15ksp55 .confetti:where(.svelte-15ksp55):before{border-radius:50%}.cone.svelte-15ksp55 .confetti:where(.svelte-15ksp55){--translate-x: calc(200px * var(--translate-y-multiplier) * var(--translate-x-multiplier))}.no-gravity.svelte-15ksp55 .confetti:where(.svelte-15ksp55){animation-name:svelte-15ksp55-no-gravity-translate;animation-timing-function:ease-out}@media (prefers-reduced-motion){.reduced-motion.svelte-15ksp55 .confetti:where(.svelte-15ksp55),.reduced-motion.svelte-15ksp55 .confetti:where(.svelte-15ksp55):before{animation:none}}:root{--iti-hover-color:rgba(0, 0, 0, .05);--iti-border-color:#ccc;--iti-dialcode-color:#999;--iti-dropdown-bg:white;--iti-spacer-horizontal:8px;--iti-flag-height:12px;--iti-flag-width:16px;--iti-border-width:1px;--iti-arrow-height:4px;--iti-arrow-width:6px;--iti-triangle-border:calc(var(--iti-arrow-width) / 2);--iti-arrow-padding:6px;--iti-arrow-color:#555;--iti-path-flags-1x:url(./flags.a2kmUSbF.webp);--iti-path-flags-2x:url(./flags@2x.gR6KPp3x.webp);--iti-path-globe-1x:url(data:image/webp;base64,UklGRvoBAABXRUJQVlA4TO4BAAAvE8AEENXIkiRZtZu7H33ql07cqTlilvbz9i4tosSMZma27zWzHRGyIEk2bcu2bdvGn23btm3btm3btm0/m5PqAEkLTYYwxTPAW84Tl6wNgmvIqptKKH9nYAr4xle+TML/BDI2LSg6QHKT/nngE4+ZMIUePUGeTvly+YoV8F1DtkGUzlfst2LUKTX6PaWZeMWiDqN6PgcciGa2boYPmxlR5bIIL5l6RVyDYMXmY1f10pGb7PmAN6sRTBTN3N9C9Zi/LbVhlL+Oo2M7RxoE/a4+/nDjeBrSVwtGYXGGMIrUbJzCU1LgFftP9K1hkpOXmBim30cIJ1hgOkSwMhYCMgmaw7rXcfT5/wQcFhrcuaOEBuq5ytYblLPBEhV0Aq/ZqcDn/6RUDgrUL0/0UZgK/p+rR8/4nZAqFfuXA6TbtFQyJSe4gpj6T19a5q+HLEkox0mlWXvbIGbuJw28fkozjybhT5oXHNY4py5rH1CflcyeB1fId9wXDAvFmz/8m6AE/8TgYzEVGoRMCKUhND7PQho7jGo1utkdV559cm3llGFs3sxBZrmGbEExop91jyfg5G7BmCCi6evNaSDFBrG3vyaRNzt+HJ9kQpVbgj+xFUoNgr3abxqGfH3WfQq9lp5UZPRW74ZbFgpq+EGo67dUAQ==);--iti-path-globe-2x:url(data:image/webp;base64,UklGRlwFAABXRUJQVlA4TE8FAAAvJ8AJEEfHKJIkKdmcgvjj3wwill7QwKhtJEnOnIDmv/zJLAdGbSNJcuYENP/lT2Y5OGwjSZHmtL3wTFl9tp8SM/9xz47Ctm2b7mnwDggKFNd77jgHyxhIYVvLQBDEHEBKRQBIOXzQpAhiBQCIAMaIAACHhAQHIMFhhRkSRt1hlRIYDAZDhiE3CVrBS2gFkZGRYdA6mjQQBYAv6yOZSVAQCoPWMCWBIBQKwtCCUBANFARBlChBfPCG/dZUjxJECYJQECU+KGFQEC1YdN/NSUNRTDm4osQBGUwFjDFCBOYRo9QWxAmPlKQECRERMbVLCZapZ0owSrnz3hb6/P8auL9vAwr7/xeS5EV9q2sWU2vbtjla27Zt28akprq6a3bPtm2np87eJIvePUzd9fvoXkT0fwK4Vwdo8t6qyQW+O7Tn4k7NAdvi/jMR0fGpwhglhZBKm3B0pzvg3JcDrUuMEn7SDaUIRTLhhqb/AbDvw+bbJToMEq5QflFfv+QhJVPxcmkm/Ih9TzZfFxk/CJUnP7zMykJqnhsqQ51M6tTv2Pdgc/GKCuKmaI96HlhVAJy4vWVWWgRSfYJ9l4jv+4aB0F15Td3kH1YW4DiMnEJHGSaFOoOdw4LxOhCqPTf0JvLys6I8Wv/9BeeuhEkZfE+UZfNSOumqT+CArgHwbBHZw+ZB00AGeiYxIKKudH2zDxg97VK7FxdO6+9Pmt3l4J/bZR58rtyEOY6dtdhcMbPh2jsyNKr3mNnDy+c8Pig0od5wGXakg7DYgYgfU5648s0fC0Ljv9SigQVrHwUafXVgmNE92zBBBeYjsHn5L6Emz/6776EnxwJUsqKADMDmq8fG/T16fujr7lhknhheLG4PPwFD15IXs2xWFWBZVj4ndDW+fDItPRncssi75Fxv/iHQQL2PDbkg4k/zP/BfgfR1axxy59PM/IYdsypZWUCUiTlck2/zTz4fm3LzqkNlxxnzW+A4fK4vkbNrIbn7bgVoKn3djQu90krrllynQ1g7v2rpjUYsfeR6tdLSaqV5w5fR6E5+k8BVT/0aqqSXDAdV4wvpCplTCJnbFTLb9dTEHjoQQiTMC7Ah3PPuwbffOfD+xP4d3s7uMGDC+wcOvrs7kVKTZ6m4EMIVfn1O61JyrnuU3EM3A3znefrp142f5cnmnDXNyXecPFYUYNt2pVUlvot//qWFDszz9aTrCuGpQVX4Wn+KAw6rCrAgw/eqLZXQVQfmXZ5QnnCF2wrwdlJ5F8DhC1MP/itRnhv+wmHji7hpT+x0tekziRw7jxUF2LZznX3xOydH3e5fVhYWO5QOlClPzYFX9EMD65P9bBHZ16fLq7dHfrlal5vO2LxuKkTcfABvjZDxwsWvf9hs7pCv2ry5cowvB2/8iosq5YraWHw7JCxLyaAWZPoUrilMaRMKo8WwpQv0z2AXqnLzLA42H5gKEVcTuM76RfDtpVrzh9b5oTp0e5SI+Topy78hAzFm6QqRMN2gugNYLH0EoHF6Pyw3vm+OYQMRlwPpCd+sAep/WQ1OPGZZ13lO0ugpE0+m1xGRbdNKe67wzTN3Nouw3yfw03WH+nrnqUAnEul5YOXA5o20L4SnAiXjoX6f7Pm6RIeBl14EGe4a8VLad4UnvZTwysxR2DtOumEiUOpliLi7FWNb2vOEK4QQnnyoIav+Ko9XhGbUF1gZ7tWKcVBLX+T05HkOGmn0iA4WjsW9Ww6ny3WiTAjhyd41WWfGrv4sAof7t/l+ppGJlFeR7oBVr4kF2BYP0oYjDxsZpjuTsQDHsXjAUYxrrwwe9gGWRRRZ3CcA);--iti-flag-sprite-width:3904px;--iti-flag-sprite-height:12px;--iti-mobile-popup-margin:30px}.iti{position:relative;display:inline-block}.iti *{box-sizing:border-box}.iti__hide{display:none}.iti__v-hide{visibility:hidden}.iti__a11y-text{width:1px;height:1px;clip:rect(1px,1px,1px,1px);overflow:hidden;position:absolute}.iti input.iti__tel-input,.iti input.iti__tel-input[type=tel],.iti input.iti__tel-input[type=text]{position:relative;z-index:0;margin:0!important}.iti__country-container{position:absolute;top:0;bottom:0;padding:var(--iti-border-width)}.iti__selected-country{z-index:1;position:relative;display:flex;align-items:center;height:100%;background:0 0;border:0;margin:0;padding:0;font-family:inherit;font-size:inherit;color:inherit;border-radius:0;font-weight:inherit;line-height:inherit;text-decoration:none}.iti__selected-country-primary{display:flex;align-items:center;height:100%;padding:0 var(--iti-arrow-padding) 0 var(--iti-spacer-horizontal)}.iti__arrow{margin-left:var(--iti-arrow-padding);width:0;height:0;border-left:var(--iti-triangle-border) solid transparent;border-right:var(--iti-triangle-border) solid transparent;border-top:var(--iti-arrow-height) solid var(--iti-arrow-color)}[dir=rtl] .iti__arrow{margin-right:var(--iti-arrow-padding);margin-left:0}.iti__arrow--up{border-top:none;border-bottom:var(--iti-arrow-height) solid var(--iti-arrow-color)}.iti__dropdown-content{border-radius:3px;background-color:var(--iti-dropdown-bg)}.iti--inline-dropdown .iti__dropdown-content{position:absolute;z-index:2;margin-top:3px;margin-left:calc(var(--iti-border-width) * -1);border:var(--iti-border-width) solid var(--iti-border-color);box-shadow:1px 1px 4px #0003}.iti__search-input{width:100%;border-width:0;border-radius:3px}.iti__search-input+.iti__country-list{border-top:1px solid var(--iti-border-color)}.iti__country-list{list-style:none;padding:0;margin:0;overflow-y:scroll;-webkit-overflow-scrolling:touch}.iti--inline-dropdown .iti__country-list{max-height:185px}.iti--flexible-dropdown-width .iti__country-list{white-space:nowrap}@media (max-width:500px){.iti--flexible-dropdown-width .iti__country-list{white-space:normal}}.iti__country{display:flex;align-items:center;padding:8px var(--iti-spacer-horizontal);outline:0}.iti__dial-code{color:var(--iti-dialcode-color)}.iti__country.iti__highlight{background-color:var(--iti-hover-color)}.iti__country-list .iti__flag,.iti__country-name{margin-right:var(--iti-spacer-horizontal)}[dir=rtl] .iti__country-list .iti__flag,[dir=rtl] .iti__country-name{margin-right:0;margin-left:var(--iti-spacer-horizontal)}.iti--allow-dropdown .iti__country-container:not(:has(+input[disabled])):not(:has(+input[readonly])):hover,.iti--allow-dropdown .iti__country-container:not(:has(+input[disabled])):not(:has(+input[readonly])):hover button{cursor:pointer}.iti--allow-dropdown .iti__country-container:not(:has(+input[disabled])):not(:has(+input[readonly])) .iti__selected-country-primary:hover,.iti--allow-dropdown .iti__country-container:not(:has(+input[disabled])):not(:has(+input[readonly])) .iti__selected-country:has(+.iti__dropdown-content:hover) .iti__selected-country-primary{background-color:var(--iti-hover-color)}.iti .iti__selected-dial-code{margin-left:4px}[dir=rtl] .iti .iti__selected-dial-code{margin-left:0;margin-right:4px}.iti--container{position:fixed;top:-1000px;left:-1000px;z-index:1060;padding:var(--iti-border-width)}.iti--container:hover{cursor:pointer}.iti--fullscreen-popup.iti--container{background-color:#00000080;top:0;bottom:0;left:0;right:0;position:fixed;padding:var(--iti-mobile-popup-margin);display:flex;flex-direction:column;justify-content:flex-start}.iti--fullscreen-popup .iti__dropdown-content{display:flex;flex-direction:column;max-height:100%;position:relative}.iti--fullscreen-popup .iti__country{padding:10px;line-height:1.5em}.iti__flag{--iti-flag-offset:100px;height:var(--iti-flag-height);width:var(--iti-flag-width);border-radius:1px;box-shadow:0 0 1px #888;background-image:var(--iti-path-flags-1x);background-repeat:no-repeat;background-position:var(--iti-flag-offset) 0;background-size:var(--iti-flag-sprite-width) var(--iti-flag-sprite-height)}.iti__ac{--iti-flag-offset:0px}.iti__ad{--iti-flag-offset:-16px}.iti__ae{--iti-flag-offset:-32px}.iti__af{--iti-flag-offset:-48px}.iti__ag{--iti-flag-offset:-64px}.iti__ai{--iti-flag-offset:-80px}.iti__al{--iti-flag-offset:-96px}.iti__am{--iti-flag-offset:-112px}.iti__ao{--iti-flag-offset:-128px}.iti__ar{--iti-flag-offset:-144px}.iti__as{--iti-flag-offset:-160px}.iti__at{--iti-flag-offset:-176px}.iti__au{--iti-flag-offset:-192px}.iti__aw{--iti-flag-offset:-208px}.iti__ax{--iti-flag-offset:-224px}.iti__az{--iti-flag-offset:-240px}.iti__ba{--iti-flag-offset:-256px}.iti__bb{--iti-flag-offset:-272px}.iti__bd{--iti-flag-offset:-288px}.iti__be{--iti-flag-offset:-304px}.iti__bf{--iti-flag-offset:-320px}.iti__bg{--iti-flag-offset:-336px}.iti__bh{--iti-flag-offset:-352px}.iti__bi{--iti-flag-offset:-368px}.iti__bj{--iti-flag-offset:-384px}.iti__bl{--iti-flag-offset:-400px}.iti__bm{--iti-flag-offset:-416px}.iti__bn{--iti-flag-offset:-432px}.iti__bo{--iti-flag-offset:-448px}.iti__bq{--iti-flag-offset:-464px}.iti__br{--iti-flag-offset:-480px}.iti__bs{--iti-flag-offset:-496px}.iti__bt{--iti-flag-offset:-512px}.iti__bw{--iti-flag-offset:-528px}.iti__by{--iti-flag-offset:-544px}.iti__bz{--iti-flag-offset:-560px}.iti__ca{--iti-flag-offset:-576px}.iti__cc{--iti-flag-offset:-592px}.iti__cd{--iti-flag-offset:-608px}.iti__cf{--iti-flag-offset:-624px}.iti__cg{--iti-flag-offset:-640px}.iti__ch{--iti-flag-offset:-656px}.iti__ci{--iti-flag-offset:-672px}.iti__ck{--iti-flag-offset:-688px}.iti__cl{--iti-flag-offset:-704px}.iti__cm{--iti-flag-offset:-720px}.iti__cn{--iti-flag-offset:-736px}.iti__co{--iti-flag-offset:-752px}.iti__cr{--iti-flag-offset:-768px}.iti__cu{--iti-flag-offset:-784px}.iti__cv{--iti-flag-offset:-800px}.iti__cw{--iti-flag-offset:-816px}.iti__cx{--iti-flag-offset:-832px}.iti__cy{--iti-flag-offset:-848px}.iti__cz{--iti-flag-offset:-864px}.iti__de{--iti-flag-offset:-880px}.iti__dj{--iti-flag-offset:-896px}.iti__dk{--iti-flag-offset:-912px}.iti__dm{--iti-flag-offset:-928px}.iti__do{--iti-flag-offset:-944px}.iti__dz{--iti-flag-offset:-960px}.iti__ec{--iti-flag-offset:-976px}.iti__ee{--iti-flag-offset:-992px}.iti__eg{--iti-flag-offset:-1008px}.iti__eh{--iti-flag-offset:-1024px}.iti__er{--iti-flag-offset:-1040px}.iti__es{--iti-flag-offset:-1056px}.iti__et{--iti-flag-offset:-1072px}.iti__fi{--iti-flag-offset:-1088px}.iti__fj{--iti-flag-offset:-1104px}.iti__fk{--iti-flag-offset:-1120px}.iti__fm{--iti-flag-offset:-1136px}.iti__fo{--iti-flag-offset:-1152px}.iti__fr{--iti-flag-offset:-1168px}.iti__ga{--iti-flag-offset:-1184px}.iti__gb{--iti-flag-offset:-1200px}.iti__gd{--iti-flag-offset:-1216px}.iti__ge{--iti-flag-offset:-1232px}.iti__gf{--iti-flag-offset:-1248px}.iti__gg{--iti-flag-offset:-1264px}.iti__gh{--iti-flag-offset:-1280px}.iti__gi{--iti-flag-offset:-1296px}.iti__gl{--iti-flag-offset:-1312px}.iti__gm{--iti-flag-offset:-1328px}.iti__gn{--iti-flag-offset:-1344px}.iti__gp{--iti-flag-offset:-1360px}.iti__gq{--iti-flag-offset:-1376px}.iti__gr{--iti-flag-offset:-1392px}.iti__gt{--iti-flag-offset:-1408px}.iti__gu{--iti-flag-offset:-1424px}.iti__gw{--iti-flag-offset:-1440px}.iti__gy{--iti-flag-offset:-1456px}.iti__hk{--iti-flag-offset:-1472px}.iti__hn{--iti-flag-offset:-1488px}.iti__hr{--iti-flag-offset:-1504px}.iti__ht{--iti-flag-offset:-1520px}.iti__hu{--iti-flag-offset:-1536px}.iti__id{--iti-flag-offset:-1552px}.iti__ie{--iti-flag-offset:-1568px}.iti__il{--iti-flag-offset:-1584px}.iti__im{--iti-flag-offset:-1600px}.iti__in{--iti-flag-offset:-1616px}.iti__io{--iti-flag-offset:-1632px}.iti__iq{--iti-flag-offset:-1648px}.iti__ir{--iti-flag-offset:-1664px}.iti__is{--iti-flag-offset:-1680px}.iti__it{--iti-flag-offset:-1696px}.iti__je{--iti-flag-offset:-1712px}.iti__jm{--iti-flag-offset:-1728px}.iti__jo{--iti-flag-offset:-1744px}.iti__jp{--iti-flag-offset:-1760px}.iti__ke{--iti-flag-offset:-1776px}.iti__kg{--iti-flag-offset:-1792px}.iti__kh{--iti-flag-offset:-1808px}.iti__ki{--iti-flag-offset:-1824px}.iti__km{--iti-flag-offset:-1840px}.iti__kn{--iti-flag-offset:-1856px}.iti__kp{--iti-flag-offset:-1872px}.iti__kr{--iti-flag-offset:-1888px}.iti__kw{--iti-flag-offset:-1904px}.iti__ky{--iti-flag-offset:-1920px}.iti__kz{--iti-flag-offset:-1936px}.iti__la{--iti-flag-offset:-1952px}.iti__lb{--iti-flag-offset:-1968px}.iti__lc{--iti-flag-offset:-1984px}.iti__li{--iti-flag-offset:-2000px}.iti__lk{--iti-flag-offset:-2016px}.iti__lr{--iti-flag-offset:-2032px}.iti__ls{--iti-flag-offset:-2048px}.iti__lt{--iti-flag-offset:-2064px}.iti__lu{--iti-flag-offset:-2080px}.iti__lv{--iti-flag-offset:-2096px}.iti__ly{--iti-flag-offset:-2112px}.iti__ma{--iti-flag-offset:-2128px}.iti__mc{--iti-flag-offset:-2144px}.iti__md{--iti-flag-offset:-2160px}.iti__me{--iti-flag-offset:-2176px}.iti__mf{--iti-flag-offset:-2192px}.iti__mg{--iti-flag-offset:-2208px}.iti__mh{--iti-flag-offset:-2224px}.iti__mk{--iti-flag-offset:-2240px}.iti__ml{--iti-flag-offset:-2256px}.iti__mm{--iti-flag-offset:-2272px}.iti__mn{--iti-flag-offset:-2288px}.iti__mo{--iti-flag-offset:-2304px}.iti__mp{--iti-flag-offset:-2320px}.iti__mq{--iti-flag-offset:-2336px}.iti__mr{--iti-flag-offset:-2352px}.iti__ms{--iti-flag-offset:-2368px}.iti__mt{--iti-flag-offset:-2384px}.iti__mu{--iti-flag-offset:-2400px}.iti__mv{--iti-flag-offset:-2416px}.iti__mw{--iti-flag-offset:-2432px}.iti__mx{--iti-flag-offset:-2448px}.iti__my{--iti-flag-offset:-2464px}.iti__mz{--iti-flag-offset:-2480px}.iti__na{--iti-flag-offset:-2496px}.iti__nc{--iti-flag-offset:-2512px}.iti__ne{--iti-flag-offset:-2528px}.iti__nf{--iti-flag-offset:-2544px}.iti__ng{--iti-flag-offset:-2560px}.iti__ni{--iti-flag-offset:-2576px}.iti__nl{--iti-flag-offset:-2592px}.iti__no{--iti-flag-offset:-2608px}.iti__np{--iti-flag-offset:-2624px}.iti__nr{--iti-flag-offset:-2640px}.iti__nu{--iti-flag-offset:-2656px}.iti__nz{--iti-flag-offset:-2672px}.iti__om{--iti-flag-offset:-2688px}.iti__pa{--iti-flag-offset:-2704px}.iti__pe{--iti-flag-offset:-2720px}.iti__pf{--iti-flag-offset:-2736px}.iti__pg{--iti-flag-offset:-2752px}.iti__ph{--iti-flag-offset:-2768px}.iti__pk{--iti-flag-offset:-2784px}.iti__pl{--iti-flag-offset:-2800px}.iti__pm{--iti-flag-offset:-2816px}.iti__pr{--iti-flag-offset:-2832px}.iti__ps{--iti-flag-offset:-2848px}.iti__pt{--iti-flag-offset:-2864px}.iti__pw{--iti-flag-offset:-2880px}.iti__py{--iti-flag-offset:-2896px}.iti__qa{--iti-flag-offset:-2912px}.iti__re{--iti-flag-offset:-2928px}.iti__ro{--iti-flag-offset:-2944px}.iti__rs{--iti-flag-offset:-2960px}.iti__ru{--iti-flag-offset:-2976px}.iti__rw{--iti-flag-offset:-2992px}.iti__sa{--iti-flag-offset:-3008px}.iti__sb{--iti-flag-offset:-3024px}.iti__sc{--iti-flag-offset:-3040px}.iti__sd{--iti-flag-offset:-3056px}.iti__se{--iti-flag-offset:-3072px}.iti__sg{--iti-flag-offset:-3088px}.iti__sh{--iti-flag-offset:-3104px}.iti__si{--iti-flag-offset:-3120px}.iti__sj{--iti-flag-offset:-3136px}.iti__sk{--iti-flag-offset:-3152px}.iti__sl{--iti-flag-offset:-3168px}.iti__sm{--iti-flag-offset:-3184px}.iti__sn{--iti-flag-offset:-3200px}.iti__so{--iti-flag-offset:-3216px}.iti__sr{--iti-flag-offset:-3232px}.iti__ss{--iti-flag-offset:-3248px}.iti__st{--iti-flag-offset:-3264px}.iti__sv{--iti-flag-offset:-3280px}.iti__sx{--iti-flag-offset:-3296px}.iti__sy{--iti-flag-offset:-3312px}.iti__sz{--iti-flag-offset:-3328px}.iti__tc{--iti-flag-offset:-3344px}.iti__td{--iti-flag-offset:-3360px}.iti__tg{--iti-flag-offset:-3376px}.iti__th{--iti-flag-offset:-3392px}.iti__tj{--iti-flag-offset:-3408px}.iti__tk{--iti-flag-offset:-3424px}.iti__tl{--iti-flag-offset:-3440px}.iti__tm{--iti-flag-offset:-3456px}.iti__tn{--iti-flag-offset:-3472px}.iti__to{--iti-flag-offset:-3488px}.iti__tr{--iti-flag-offset:-3504px}.iti__tt{--iti-flag-offset:-3520px}.iti__tv{--iti-flag-offset:-3536px}.iti__tw{--iti-flag-offset:-3552px}.iti__tz{--iti-flag-offset:-3568px}.iti__ua{--iti-flag-offset:-3584px}.iti__ug{--iti-flag-offset:-3600px}.iti__us{--iti-flag-offset:-3616px}.iti__uy{--iti-flag-offset:-3632px}.iti__uz{--iti-flag-offset:-3648px}.iti__va{--iti-flag-offset:-3664px}.iti__vc{--iti-flag-offset:-3680px}.iti__ve{--iti-flag-offset:-3696px}.iti__vg{--iti-flag-offset:-3712px}.iti__vi{--iti-flag-offset:-3728px}.iti__vn{--iti-flag-offset:-3744px}.iti__vu{--iti-flag-offset:-3760px}.iti__wf{--iti-flag-offset:-3776px}.iti__ws{--iti-flag-offset:-3792px}.iti__xk{--iti-flag-offset:-3808px}.iti__ye{--iti-flag-offset:-3824px}.iti__yt{--iti-flag-offset:-3840px}.iti__za{--iti-flag-offset:-3856px}.iti__zm{--iti-flag-offset:-3872px}.iti__zw{--iti-flag-offset:-3888px}.iti__globe{background-image:var(--iti-path-globe-1x);background-size:contain;background-position:right;box-shadow:none;height:19px}@media (min-resolution:2x){.iti__flag{background-image:var(--iti-path-flags-2x)}.iti__globe{background-image:var(--iti-path-globe-2x)}}.iti__selected-country-primary{padding:0 8px 0 12px!important;border-radius:999px}.iti__search-input{padding:6px}.snoo-cls-11.svelte-1977t4s{stroke-width:0;fill:#ffc49c}.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0,0,0,0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px #0000001a}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:#0000000d}}.maplibregl-ctrl button:not(:disabled):active{background-color:#0000000d}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%23333' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%2333b5e5' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:#ffffff80;margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:#ffffff80;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:#0000000d}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:#000000bf;text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:#ffffffbf;border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:#0000000d}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px #0000001a;padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px #00000059;box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:#0006;color:#fff;display:flex;font-size:1.4em;top:0;right:0;bottom:0;left:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}.disable-pinch-zoom.svelte-6wmtgk{touch-action:pan-x pan-y} +.confetti-holder.svelte-15ksp55 { + position: relative; +} +@keyframes svelte-15ksp55-rotate { + 0% { + transform: skew(var(--skew)) rotate3d(var(--full-rotation)); + } + to { + transform: skew(var(--skew)) + rotate3d(var(--rotation-xyz), calc(var(--rotation-deg) + 360deg)); + } +} +@keyframes svelte-15ksp55-translate { + 0% { + opacity: 1; + } + 8% { + transform: translateY(calc(var(--translate-y) * 0.95)) + translate(calc(var(--translate-x) * (var(--x-spread) * 0.9))); + opacity: 1; + } + 12% { + transform: translateY(var(--translate-y)) + translate(calc(var(--translate-x) * (var(--x-spread) * 0.95))); + opacity: 1; + } + 16% { + transform: translateY(var(--translate-y)) + translate(calc(var(--translate-x) * var(--x-spread))); + opacity: 1; + } + to { + transform: translateY(calc(var(--translate-y) + var(--fall-distance))) + translate(var(--translate-x)); + opacity: 0; + } +} +@keyframes svelte-15ksp55-no-gravity-translate { + 0% { + opacity: 1; + } + to { + transform: translateY(var(--translate-y)) translate(var(--translate-x)); + opacity: 0; + } +} +.confetti.svelte-15ksp55 { + --translate-y: calc(-200px * var(--translate-y-multiplier)); + --translate-x: calc(200px * var(--translate-x-multiplier)); + position: absolute; + height: calc(var(--size) * var(--scale)); + width: calc(var(--size) * var(--scale)); + animation: svelte-15ksp55-translate var(--transition-duration) + var(--transition-delay) var(--transition-iteration-count) linear; + opacity: 0; + pointer-events: none; +} +.confetti.svelte-15ksp55:before { + --full-rotation: var(--rotation-xyz), var(--rotation-deg); + content: ""; + display: block; + width: 100%; + height: 100%; + background: var(--color); + background-size: contain; + transform: skew(var(--skew)) rotate3d(var(--full-rotation)); + animation: svelte-15ksp55-rotate var(--transition-duration) + var(--transition-delay) var(--transition-iteration-count) linear; +} +.rounded.svelte-15ksp55 .confetti:where(.svelte-15ksp55):before { + border-radius: 50%; +} +.cone.svelte-15ksp55 .confetti:where(.svelte-15ksp55) { + --translate-x: calc( + 200px * var(--translate-y-multiplier) * var(--translate-x-multiplier) + ); +} +.no-gravity.svelte-15ksp55 .confetti:where(.svelte-15ksp55) { + animation-name: svelte-15ksp55-no-gravity-translate; + animation-timing-function: ease-out; +} +@media (prefers-reduced-motion) { + .reduced-motion.svelte-15ksp55 .confetti:where(.svelte-15ksp55), + .reduced-motion.svelte-15ksp55 .confetti:where(.svelte-15ksp55):before { + animation: none; + } +} +:root { + --iti-hover-color: rgba(0, 0, 0, 0.05); + --iti-border-color: #ccc; + --iti-dialcode-color: #999; + --iti-dropdown-bg: white; + --iti-spacer-horizontal: 8px; + --iti-flag-height: 12px; + --iti-flag-width: 16px; + --iti-border-width: 1px; + --iti-arrow-height: 4px; + --iti-arrow-width: 6px; + --iti-triangle-border: calc(var(--iti-arrow-width) / 2); + --iti-arrow-padding: 6px; + --iti-arrow-color: #555; + --iti-path-flags-1x: url(./flags.a2kmUSbF.webp); + --iti-path-flags-2x: url(./flags@2x.gR6KPp3x.webp); + --iti-path-globe-1x: url(data:image/webp;base64,UklGRvoBAABXRUJQVlA4TO4BAAAvE8AEENXIkiRZtZu7H33ql07cqTlilvbz9i4tosSMZma27zWzHRGyIEk2bcu2bdvGn23btm3btm3btm0/m5PqAEkLTYYwxTPAW84Tl6wNgmvIqptKKH9nYAr4xle+TML/BDI2LSg6QHKT/nngE4+ZMIUePUGeTvly+YoV8F1DtkGUzlfst2LUKTX6PaWZeMWiDqN6PgcciGa2boYPmxlR5bIIL5l6RVyDYMXmY1f10pGb7PmAN6sRTBTN3N9C9Zi/LbVhlL+Oo2M7RxoE/a4+/nDjeBrSVwtGYXGGMIrUbJzCU1LgFftP9K1hkpOXmBim30cIJ1hgOkSwMhYCMgmaw7rXcfT5/wQcFhrcuaOEBuq5ytYblLPBEhV0Aq/ZqcDn/6RUDgrUL0/0UZgK/p+rR8/4nZAqFfuXA6TbtFQyJSe4gpj6T19a5q+HLEkox0mlWXvbIGbuJw28fkozjybhT5oXHNY4py5rH1CflcyeB1fId9wXDAvFmz/8m6AE/8TgYzEVGoRMCKUhND7PQho7jGo1utkdV559cm3llGFs3sxBZrmGbEExop91jyfg5G7BmCCi6evNaSDFBrG3vyaRNzt+HJ9kQpVbgj+xFUoNgr3abxqGfH3WfQq9lp5UZPRW74ZbFgpq+EGo67dUAQ==); + --iti-path-globe-2x: url(data:image/webp;base64,UklGRlwFAABXRUJQVlA4TE8FAAAvJ8AJEEfHKJIkKdmcgvjj3wwill7QwKhtJEnOnIDmv/zJLAdGbSNJcuYENP/lT2Y5OGwjSZHmtL3wTFl9tp8SM/9xz47Ctm2b7mnwDggKFNd77jgHyxhIYVvLQBDEHEBKRQBIOXzQpAhiBQCIAMaIAACHhAQHIMFhhRkSRt1hlRIYDAZDhiE3CVrBS2gFkZGRYdA6mjQQBYAv6yOZSVAQCoPWMCWBIBQKwtCCUBANFARBlChBfPCG/dZUjxJECYJQECU+KGFQEC1YdN/NSUNRTDm4osQBGUwFjDFCBOYRo9QWxAmPlKQECRERMbVLCZapZ0owSrnz3hb6/P8auL9vAwr7/xeS5EV9q2sWU2vbtjla27Zt28akprq6a3bPtm2np87eJIvePUzd9fvoXkT0fwK4Vwdo8t6qyQW+O7Tn4k7NAdvi/jMR0fGpwhglhZBKm3B0pzvg3JcDrUuMEn7SDaUIRTLhhqb/AbDvw+bbJToMEq5QflFfv+QhJVPxcmkm/Ih9TzZfFxk/CJUnP7zMykJqnhsqQ51M6tTv2Pdgc/GKCuKmaI96HlhVAJy4vWVWWgRSfYJ9l4jv+4aB0F15Td3kH1YW4DiMnEJHGSaFOoOdw4LxOhCqPTf0JvLys6I8Wv/9BeeuhEkZfE+UZfNSOumqT+CArgHwbBHZw+ZB00AGeiYxIKKudH2zDxg97VK7FxdO6+9Pmt3l4J/bZR58rtyEOY6dtdhcMbPh2jsyNKr3mNnDy+c8Pig0od5wGXakg7DYgYgfU5648s0fC0Ljv9SigQVrHwUafXVgmNE92zBBBeYjsHn5L6Emz/6776EnxwJUsqKADMDmq8fG/T16fujr7lhknhheLG4PPwFD15IXs2xWFWBZVj4ndDW+fDItPRncssi75Fxv/iHQQL2PDbkg4k/zP/BfgfR1axxy59PM/IYdsypZWUCUiTlck2/zTz4fm3LzqkNlxxnzW+A4fK4vkbNrIbn7bgVoKn3djQu90krrllynQ1g7v2rpjUYsfeR6tdLSaqV5w5fR6E5+k8BVT/0aqqSXDAdV4wvpCplTCJnbFTLb9dTEHjoQQiTMC7Ah3PPuwbffOfD+xP4d3s7uMGDC+wcOvrs7kVKTZ6m4EMIVfn1O61JyrnuU3EM3A3znefrp142f5cnmnDXNyXecPFYUYNt2pVUlvot//qWFDszz9aTrCuGpQVX4Wn+KAw6rCrAgw/eqLZXQVQfmXZ5QnnCF2wrwdlJ5F8DhC1MP/itRnhv+wmHji7hpT+x0tekziRw7jxUF2LZznX3xOydH3e5fVhYWO5QOlClPzYFX9EMD65P9bBHZ16fLq7dHfrlal5vO2LxuKkTcfABvjZDxwsWvf9hs7pCv2ry5cowvB2/8iosq5YraWHw7JCxLyaAWZPoUrilMaRMKo8WwpQv0z2AXqnLzLA42H5gKEVcTuM76RfDtpVrzh9b5oTp0e5SI+Topy78hAzFm6QqRMN2gugNYLH0EoHF6Pyw3vm+OYQMRlwPpCd+sAep/WQ1OPGZZ13lO0ugpE0+m1xGRbdNKe67wzTN3Nouw3yfw03WH+nrnqUAnEul5YOXA5o20L4SnAiXjoX6f7Pm6RIeBl14EGe4a8VLad4UnvZTwysxR2DtOumEiUOpliLi7FWNb2vOEK4QQnnyoIav+Ko9XhGbUF1gZ7tWKcVBLX+T05HkOGmn0iA4WjsW9Ww6ny3WiTAjhyd41WWfGrv4sAof7t/l+ppGJlFeR7oBVr4kF2BYP0oYjDxsZpjuTsQDHsXjAUYxrrwwe9gGWRRRZ3CcA); + --iti-flag-sprite-width: 3904px; + --iti-flag-sprite-height: 12px; + --iti-mobile-popup-margin: 30px; +} +.iti { + position: relative; + display: inline-block; +} +.iti * { + box-sizing: border-box; +} +.iti__hide { + display: none; +} +.iti__v-hide { + visibility: hidden; +} +.iti__a11y-text { + width: 1px; + height: 1px; + clip: rect(1px, 1px, 1px, 1px); + overflow: hidden; + position: absolute; +} +.iti input.iti__tel-input, +.iti input.iti__tel-input[type="tel"], +.iti input.iti__tel-input[type="text"] { + position: relative; + z-index: 0; + margin: 0 !important; +} +.iti__country-container { + position: absolute; + top: 0; + bottom: 0; + padding: var(--iti-border-width); +} +.iti__selected-country { + z-index: 1; + position: relative; + display: flex; + align-items: center; + height: 100%; + background: 0 0; + border: 0; + margin: 0; + padding: 0; + font-family: inherit; + font-size: inherit; + color: inherit; + border-radius: 0; + font-weight: inherit; + line-height: inherit; + text-decoration: none; +} +.iti__selected-country-primary { + display: flex; + align-items: center; + height: 100%; + padding: 0 var(--iti-arrow-padding) 0 var(--iti-spacer-horizontal); +} +.iti__arrow { + margin-left: var(--iti-arrow-padding); + width: 0; + height: 0; + border-left: var(--iti-triangle-border) solid transparent; + border-right: var(--iti-triangle-border) solid transparent; + border-top: var(--iti-arrow-height) solid var(--iti-arrow-color); +} +[dir="rtl"] .iti__arrow { + margin-right: var(--iti-arrow-padding); + margin-left: 0; +} +.iti__arrow--up { + border-top: none; + border-bottom: var(--iti-arrow-height) solid var(--iti-arrow-color); +} +.iti__dropdown-content { + border-radius: 3px; + background-color: var(--iti-dropdown-bg); +} +.iti--inline-dropdown .iti__dropdown-content { + position: absolute; + z-index: 2; + margin-top: 3px; + margin-left: calc(var(--iti-border-width) * -1); + border: var(--iti-border-width) solid var(--iti-border-color); + box-shadow: 1px 1px 4px #0003; +} +.iti__search-input { + width: 100%; + border-width: 0; + border-radius: 3px; +} +.iti__search-input + .iti__country-list { + border-top: 1px solid var(--iti-border-color); +} +.iti__country-list { + list-style: none; + padding: 0; + margin: 0; + overflow-y: scroll; + -webkit-overflow-scrolling: touch; +} +.iti--inline-dropdown .iti__country-list { + max-height: 185px; +} +.iti--flexible-dropdown-width .iti__country-list { + white-space: nowrap; +} +@media (max-width: 500px) { + .iti--flexible-dropdown-width .iti__country-list { + white-space: normal; + } +} +.iti__country { + display: flex; + align-items: center; + padding: 8px var(--iti-spacer-horizontal); + outline: 0; +} +.iti__dial-code { + color: var(--iti-dialcode-color); +} +.iti__country.iti__highlight { + background-color: var(--iti-hover-color); +} +.iti__country-list .iti__flag, +.iti__country-name { + margin-right: var(--iti-spacer-horizontal); +} +[dir="rtl"] .iti__country-list .iti__flag, +[dir="rtl"] .iti__country-name { + margin-right: 0; + margin-left: var(--iti-spacer-horizontal); +} +.iti--allow-dropdown + .iti__country-container:not(:has(+ input[disabled])):not( + :has(+ input[readonly]) + ):hover, +.iti--allow-dropdown + .iti__country-container:not(:has(+ input[disabled])):not( + :has(+ input[readonly]) + ):hover + button { + cursor: pointer; +} +.iti--allow-dropdown + .iti__country-container:not(:has(+ input[disabled])):not( + :has(+ input[readonly]) + ) + .iti__selected-country-primary:hover, +.iti--allow-dropdown + .iti__country-container:not(:has(+ input[disabled])):not( + :has(+ input[readonly]) + ) + .iti__selected-country:has(+ .iti__dropdown-content:hover) + .iti__selected-country-primary { + background-color: var(--iti-hover-color); +} +.iti .iti__selected-dial-code { + margin-left: 4px; +} +[dir="rtl"] .iti .iti__selected-dial-code { + margin-left: 0; + margin-right: 4px; +} +.iti--container { + position: fixed; + top: -1000px; + left: -1000px; + z-index: 1060; + padding: var(--iti-border-width); +} +.iti--container:hover { + cursor: pointer; +} +.iti--fullscreen-popup.iti--container { + background-color: #00000080; + top: 0; + bottom: 0; + left: 0; + right: 0; + position: fixed; + padding: var(--iti-mobile-popup-margin); + display: flex; + flex-direction: column; + justify-content: flex-start; +} +.iti--fullscreen-popup .iti__dropdown-content { + display: flex; + flex-direction: column; + max-height: 100%; + position: relative; +} +.iti--fullscreen-popup .iti__country { + padding: 10px; + line-height: 1.5em; +} +.iti__flag { + --iti-flag-offset: 100px; + height: var(--iti-flag-height); + width: var(--iti-flag-width); + border-radius: 1px; + box-shadow: 0 0 1px #888; + background-image: var(--iti-path-flags-1x); + background-repeat: no-repeat; + background-position: var(--iti-flag-offset) 0; + background-size: var(--iti-flag-sprite-width) var(--iti-flag-sprite-height); +} +.iti__ac { + --iti-flag-offset: 0px; +} +.iti__ad { + --iti-flag-offset: -16px; +} +.iti__ae { + --iti-flag-offset: -32px; +} +.iti__af { + --iti-flag-offset: -48px; +} +.iti__ag { + --iti-flag-offset: -64px; +} +.iti__ai { + --iti-flag-offset: -80px; +} +.iti__al { + --iti-flag-offset: -96px; +} +.iti__am { + --iti-flag-offset: -112px; +} +.iti__ao { + --iti-flag-offset: -128px; +} +.iti__ar { + --iti-flag-offset: -144px; +} +.iti__as { + --iti-flag-offset: -160px; +} +.iti__at { + --iti-flag-offset: -176px; +} +.iti__au { + --iti-flag-offset: -192px; +} +.iti__aw { + --iti-flag-offset: -208px; +} +.iti__ax { + --iti-flag-offset: -224px; +} +.iti__az { + --iti-flag-offset: -240px; +} +.iti__ba { + --iti-flag-offset: -256px; +} +.iti__bb { + --iti-flag-offset: -272px; +} +.iti__bd { + --iti-flag-offset: -288px; +} +.iti__be { + --iti-flag-offset: -304px; +} +.iti__bf { + --iti-flag-offset: -320px; +} +.iti__bg { + --iti-flag-offset: -336px; +} +.iti__bh { + --iti-flag-offset: -352px; +} +.iti__bi { + --iti-flag-offset: -368px; +} +.iti__bj { + --iti-flag-offset: -384px; +} +.iti__bl { + --iti-flag-offset: -400px; +} +.iti__bm { + --iti-flag-offset: -416px; +} +.iti__bn { + --iti-flag-offset: -432px; +} +.iti__bo { + --iti-flag-offset: -448px; +} +.iti__bq { + --iti-flag-offset: -464px; +} +.iti__br { + --iti-flag-offset: -480px; +} +.iti__bs { + --iti-flag-offset: -496px; +} +.iti__bt { + --iti-flag-offset: -512px; +} +.iti__bw { + --iti-flag-offset: -528px; +} +.iti__by { + --iti-flag-offset: -544px; +} +.iti__bz { + --iti-flag-offset: -560px; +} +.iti__ca { + --iti-flag-offset: -576px; +} +.iti__cc { + --iti-flag-offset: -592px; +} +.iti__cd { + --iti-flag-offset: -608px; +} +.iti__cf { + --iti-flag-offset: -624px; +} +.iti__cg { + --iti-flag-offset: -640px; +} +.iti__ch { + --iti-flag-offset: -656px; +} +.iti__ci { + --iti-flag-offset: -672px; +} +.iti__ck { + --iti-flag-offset: -688px; +} +.iti__cl { + --iti-flag-offset: -704px; +} +.iti__cm { + --iti-flag-offset: -720px; +} +.iti__cn { + --iti-flag-offset: -736px; +} +.iti__co { + --iti-flag-offset: -752px; +} +.iti__cr { + --iti-flag-offset: -768px; +} +.iti__cu { + --iti-flag-offset: -784px; +} +.iti__cv { + --iti-flag-offset: -800px; +} +.iti__cw { + --iti-flag-offset: -816px; +} +.iti__cx { + --iti-flag-offset: -832px; +} +.iti__cy { + --iti-flag-offset: -848px; +} +.iti__cz { + --iti-flag-offset: -864px; +} +.iti__de { + --iti-flag-offset: -880px; +} +.iti__dj { + --iti-flag-offset: -896px; +} +.iti__dk { + --iti-flag-offset: -912px; +} +.iti__dm { + --iti-flag-offset: -928px; +} +.iti__do { + --iti-flag-offset: -944px; +} +.iti__dz { + --iti-flag-offset: -960px; +} +.iti__ec { + --iti-flag-offset: -976px; +} +.iti__ee { + --iti-flag-offset: -992px; +} +.iti__eg { + --iti-flag-offset: -1008px; +} +.iti__eh { + --iti-flag-offset: -1024px; +} +.iti__er { + --iti-flag-offset: -1040px; +} +.iti__es { + --iti-flag-offset: -1056px; +} +.iti__et { + --iti-flag-offset: -1072px; +} +.iti__fi { + --iti-flag-offset: -1088px; +} +.iti__fj { + --iti-flag-offset: -1104px; +} +.iti__fk { + --iti-flag-offset: -1120px; +} +.iti__fm { + --iti-flag-offset: -1136px; +} +.iti__fo { + --iti-flag-offset: -1152px; +} +.iti__fr { + --iti-flag-offset: -1168px; +} +.iti__ga { + --iti-flag-offset: -1184px; +} +.iti__gb { + --iti-flag-offset: -1200px; +} +.iti__gd { + --iti-flag-offset: -1216px; +} +.iti__ge { + --iti-flag-offset: -1232px; +} +.iti__gf { + --iti-flag-offset: -1248px; +} +.iti__gg { + --iti-flag-offset: -1264px; +} +.iti__gh { + --iti-flag-offset: -1280px; +} +.iti__gi { + --iti-flag-offset: -1296px; +} +.iti__gl { + --iti-flag-offset: -1312px; +} +.iti__gm { + --iti-flag-offset: -1328px; +} +.iti__gn { + --iti-flag-offset: -1344px; +} +.iti__gp { + --iti-flag-offset: -1360px; +} +.iti__gq { + --iti-flag-offset: -1376px; +} +.iti__gr { + --iti-flag-offset: -1392px; +} +.iti__gt { + --iti-flag-offset: -1408px; +} +.iti__gu { + --iti-flag-offset: -1424px; +} +.iti__gw { + --iti-flag-offset: -1440px; +} +.iti__gy { + --iti-flag-offset: -1456px; +} +.iti__hk { + --iti-flag-offset: -1472px; +} +.iti__hn { + --iti-flag-offset: -1488px; +} +.iti__hr { + --iti-flag-offset: -1504px; +} +.iti__ht { + --iti-flag-offset: -1520px; +} +.iti__hu { + --iti-flag-offset: -1536px; +} +.iti__id { + --iti-flag-offset: -1552px; +} +.iti__ie { + --iti-flag-offset: -1568px; +} +.iti__il { + --iti-flag-offset: -1584px; +} +.iti__im { + --iti-flag-offset: -1600px; +} +.iti__in { + --iti-flag-offset: -1616px; +} +.iti__io { + --iti-flag-offset: -1632px; +} +.iti__iq { + --iti-flag-offset: -1648px; +} +.iti__ir { + --iti-flag-offset: -1664px; +} +.iti__is { + --iti-flag-offset: -1680px; +} +.iti__it { + --iti-flag-offset: -1696px; +} +.iti__je { + --iti-flag-offset: -1712px; +} +.iti__jm { + --iti-flag-offset: -1728px; +} +.iti__jo { + --iti-flag-offset: -1744px; +} +.iti__jp { + --iti-flag-offset: -1760px; +} +.iti__ke { + --iti-flag-offset: -1776px; +} +.iti__kg { + --iti-flag-offset: -1792px; +} +.iti__kh { + --iti-flag-offset: -1808px; +} +.iti__ki { + --iti-flag-offset: -1824px; +} +.iti__km { + --iti-flag-offset: -1840px; +} +.iti__kn { + --iti-flag-offset: -1856px; +} +.iti__kp { + --iti-flag-offset: -1872px; +} +.iti__kr { + --iti-flag-offset: -1888px; +} +.iti__kw { + --iti-flag-offset: -1904px; +} +.iti__ky { + --iti-flag-offset: -1920px; +} +.iti__kz { + --iti-flag-offset: -1936px; +} +.iti__la { + --iti-flag-offset: -1952px; +} +.iti__lb { + --iti-flag-offset: -1968px; +} +.iti__lc { + --iti-flag-offset: -1984px; +} +.iti__li { + --iti-flag-offset: -2000px; +} +.iti__lk { + --iti-flag-offset: -2016px; +} +.iti__lr { + --iti-flag-offset: -2032px; +} +.iti__ls { + --iti-flag-offset: -2048px; +} +.iti__lt { + --iti-flag-offset: -2064px; +} +.iti__lu { + --iti-flag-offset: -2080px; +} +.iti__lv { + --iti-flag-offset: -2096px; +} +.iti__ly { + --iti-flag-offset: -2112px; +} +.iti__ma { + --iti-flag-offset: -2128px; +} +.iti__mc { + --iti-flag-offset: -2144px; +} +.iti__md { + --iti-flag-offset: -2160px; +} +.iti__me { + --iti-flag-offset: -2176px; +} +.iti__mf { + --iti-flag-offset: -2192px; +} +.iti__mg { + --iti-flag-offset: -2208px; +} +.iti__mh { + --iti-flag-offset: -2224px; +} +.iti__mk { + --iti-flag-offset: -2240px; +} +.iti__ml { + --iti-flag-offset: -2256px; +} +.iti__mm { + --iti-flag-offset: -2272px; +} +.iti__mn { + --iti-flag-offset: -2288px; +} +.iti__mo { + --iti-flag-offset: -2304px; +} +.iti__mp { + --iti-flag-offset: -2320px; +} +.iti__mq { + --iti-flag-offset: -2336px; +} +.iti__mr { + --iti-flag-offset: -2352px; +} +.iti__ms { + --iti-flag-offset: -2368px; +} +.iti__mt { + --iti-flag-offset: -2384px; +} +.iti__mu { + --iti-flag-offset: -2400px; +} +.iti__mv { + --iti-flag-offset: -2416px; +} +.iti__mw { + --iti-flag-offset: -2432px; +} +.iti__mx { + --iti-flag-offset: -2448px; +} +.iti__my { + --iti-flag-offset: -2464px; +} +.iti__mz { + --iti-flag-offset: -2480px; +} +.iti__na { + --iti-flag-offset: -2496px; +} +.iti__nc { + --iti-flag-offset: -2512px; +} +.iti__ne { + --iti-flag-offset: -2528px; +} +.iti__nf { + --iti-flag-offset: -2544px; +} +.iti__ng { + --iti-flag-offset: -2560px; +} +.iti__ni { + --iti-flag-offset: -2576px; +} +.iti__nl { + --iti-flag-offset: -2592px; +} +.iti__no { + --iti-flag-offset: -2608px; +} +.iti__np { + --iti-flag-offset: -2624px; +} +.iti__nr { + --iti-flag-offset: -2640px; +} +.iti__nu { + --iti-flag-offset: -2656px; +} +.iti__nz { + --iti-flag-offset: -2672px; +} +.iti__om { + --iti-flag-offset: -2688px; +} +.iti__pa { + --iti-flag-offset: -2704px; +} +.iti__pe { + --iti-flag-offset: -2720px; +} +.iti__pf { + --iti-flag-offset: -2736px; +} +.iti__pg { + --iti-flag-offset: -2752px; +} +.iti__ph { + --iti-flag-offset: -2768px; +} +.iti__pk { + --iti-flag-offset: -2784px; +} +.iti__pl { + --iti-flag-offset: -2800px; +} +.iti__pm { + --iti-flag-offset: -2816px; +} +.iti__pr { + --iti-flag-offset: -2832px; +} +.iti__ps { + --iti-flag-offset: -2848px; +} +.iti__pt { + --iti-flag-offset: -2864px; +} +.iti__pw { + --iti-flag-offset: -2880px; +} +.iti__py { + --iti-flag-offset: -2896px; +} +.iti__qa { + --iti-flag-offset: -2912px; +} +.iti__re { + --iti-flag-offset: -2928px; +} +.iti__ro { + --iti-flag-offset: -2944px; +} +.iti__rs { + --iti-flag-offset: -2960px; +} +.iti__ru { + --iti-flag-offset: -2976px; +} +.iti__rw { + --iti-flag-offset: -2992px; +} +.iti__sa { + --iti-flag-offset: -3008px; +} +.iti__sb { + --iti-flag-offset: -3024px; +} +.iti__sc { + --iti-flag-offset: -3040px; +} +.iti__sd { + --iti-flag-offset: -3056px; +} +.iti__se { + --iti-flag-offset: -3072px; +} +.iti__sg { + --iti-flag-offset: -3088px; +} +.iti__sh { + --iti-flag-offset: -3104px; +} +.iti__si { + --iti-flag-offset: -3120px; +} +.iti__sj { + --iti-flag-offset: -3136px; +} +.iti__sk { + --iti-flag-offset: -3152px; +} +.iti__sl { + --iti-flag-offset: -3168px; +} +.iti__sm { + --iti-flag-offset: -3184px; +} +.iti__sn { + --iti-flag-offset: -3200px; +} +.iti__so { + --iti-flag-offset: -3216px; +} +.iti__sr { + --iti-flag-offset: -3232px; +} +.iti__ss { + --iti-flag-offset: -3248px; +} +.iti__st { + --iti-flag-offset: -3264px; +} +.iti__sv { + --iti-flag-offset: -3280px; +} +.iti__sx { + --iti-flag-offset: -3296px; +} +.iti__sy { + --iti-flag-offset: -3312px; +} +.iti__sz { + --iti-flag-offset: -3328px; +} +.iti__tc { + --iti-flag-offset: -3344px; +} +.iti__td { + --iti-flag-offset: -3360px; +} +.iti__tg { + --iti-flag-offset: -3376px; +} +.iti__th { + --iti-flag-offset: -3392px; +} +.iti__tj { + --iti-flag-offset: -3408px; +} +.iti__tk { + --iti-flag-offset: -3424px; +} +.iti__tl { + --iti-flag-offset: -3440px; +} +.iti__tm { + --iti-flag-offset: -3456px; +} +.iti__tn { + --iti-flag-offset: -3472px; +} +.iti__to { + --iti-flag-offset: -3488px; +} +.iti__tr { + --iti-flag-offset: -3504px; +} +.iti__tt { + --iti-flag-offset: -3520px; +} +.iti__tv { + --iti-flag-offset: -3536px; +} +.iti__tw { + --iti-flag-offset: -3552px; +} +.iti__tz { + --iti-flag-offset: -3568px; +} +.iti__ua { + --iti-flag-offset: -3584px; +} +.iti__ug { + --iti-flag-offset: -3600px; +} +.iti__us { + --iti-flag-offset: -3616px; +} +.iti__uy { + --iti-flag-offset: -3632px; +} +.iti__uz { + --iti-flag-offset: -3648px; +} +.iti__va { + --iti-flag-offset: -3664px; +} +.iti__vc { + --iti-flag-offset: -3680px; +} +.iti__ve { + --iti-flag-offset: -3696px; +} +.iti__vg { + --iti-flag-offset: -3712px; +} +.iti__vi { + --iti-flag-offset: -3728px; +} +.iti__vn { + --iti-flag-offset: -3744px; +} +.iti__vu { + --iti-flag-offset: -3760px; +} +.iti__wf { + --iti-flag-offset: -3776px; +} +.iti__ws { + --iti-flag-offset: -3792px; +} +.iti__xk { + --iti-flag-offset: -3808px; +} +.iti__ye { + --iti-flag-offset: -3824px; +} +.iti__yt { + --iti-flag-offset: -3840px; +} +.iti__za { + --iti-flag-offset: -3856px; +} +.iti__zm { + --iti-flag-offset: -3872px; +} +.iti__zw { + --iti-flag-offset: -3888px; +} +.iti__globe { + background-image: var(--iti-path-globe-1x); + background-size: contain; + background-position: right; + box-shadow: none; + height: 19px; +} +@media (min-resolution: 2x) { + .iti__flag { + background-image: var(--iti-path-flags-2x); + } + .iti__globe { + background-image: var(--iti-path-globe-2x); + } +} +.iti__selected-country-primary { + padding: 0 8px 0 12px !important; + border-radius: 999px; +} +.iti__search-input { + padding: 6px; +} +.snoo-cls-11.svelte-1977t4s { + stroke-width: 0; + fill: #ffc49c; +} +.maplibregl-map { + font: 12px/20px Helvetica Neue, Arial, Helvetica, sans-serif; + overflow: hidden; + position: relative; + -webkit-tap-highlight-color: rgb(0, 0, 0, 0); +} +.maplibregl-canvas { + left: 0; + position: absolute; + top: 0; +} +.maplibregl-map:fullscreen { + height: 100%; + width: 100%; +} +.maplibregl-ctrl-group button.maplibregl-ctrl-compass { + touch-action: none; +} +.maplibregl-canvas-container.maplibregl-interactive, +.maplibregl-ctrl-group button.maplibregl-ctrl-compass { + cursor: grab; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; +} +.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer { + cursor: pointer; +} +.maplibregl-canvas-container.maplibregl-interactive:active, +.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active { + cursor: grabbing; +} +.maplibregl-canvas-container.maplibregl-touch-zoom-rotate, +.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas { + touch-action: pan-x pan-y; +} +.maplibregl-canvas-container.maplibregl-touch-drag-pan, +.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas { + touch-action: pinch-zoom; +} +.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan, +.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan + .maplibregl-canvas { + touch-action: none; +} +.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures, +.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures + .maplibregl-canvas { + touch-action: pan-x pan-y; +} +.maplibregl-ctrl-bottom-left, +.maplibregl-ctrl-bottom-right, +.maplibregl-ctrl-top-left, +.maplibregl-ctrl-top-right { + pointer-events: none; + position: absolute; + z-index: 2; +} +.maplibregl-ctrl-top-left { + left: 0; + top: 0; +} +.maplibregl-ctrl-top-right { + right: 0; + top: 0; +} +.maplibregl-ctrl-bottom-left { + bottom: 0; + left: 0; +} +.maplibregl-ctrl-bottom-right { + bottom: 0; + right: 0; +} +.maplibregl-ctrl { + clear: both; + pointer-events: auto; + transform: translate(0); +} +.maplibregl-ctrl-top-left .maplibregl-ctrl { + float: left; + margin: 10px 0 0 10px; +} +.maplibregl-ctrl-top-right .maplibregl-ctrl { + float: right; + margin: 10px 10px 0 0; +} +.maplibregl-ctrl-bottom-left .maplibregl-ctrl { + float: left; + margin: 0 0 10px 10px; +} +.maplibregl-ctrl-bottom-right .maplibregl-ctrl { + float: right; + margin: 0 10px 10px 0; +} +.maplibregl-ctrl-group { + background: #fff; + border-radius: 4px; +} +.maplibregl-ctrl-group:not(:empty) { + box-shadow: 0 0 0 2px #0000001a; +} +@media (forced-colors: active) { + .maplibregl-ctrl-group:not(:empty) { + box-shadow: 0 0 0 2px ButtonText; + } +} +.maplibregl-ctrl-group button { + background-color: transparent; + border: 0; + box-sizing: border-box; + cursor: pointer; + display: block; + height: 29px; + outline: none; + padding: 0; + width: 29px; +} +.maplibregl-ctrl-group button + button { + border-top: 1px solid #ddd; +} +.maplibregl-ctrl button .maplibregl-ctrl-icon { + background-position: 50%; + background-repeat: no-repeat; + display: block; + height: 100%; + width: 100%; +} +@media (forced-colors: active) { + .maplibregl-ctrl-icon { + background-color: transparent; + } + .maplibregl-ctrl-group button + button { + border-top: 1px solid ButtonText; + } +} +.maplibregl-ctrl button::-moz-focus-inner { + border: 0; + padding: 0; +} +.maplibregl-ctrl-attrib-button:focus, +.maplibregl-ctrl-group button:focus { + box-shadow: 0 0 2px 2px #0096ff; +} +.maplibregl-ctrl button:disabled { + cursor: not-allowed; +} +.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon { + opacity: 0.25; +} +@media (hover: hover) { + .maplibregl-ctrl button:not(:disabled):hover { + background-color: #0000000d; + } +} +.maplibregl-ctrl button:not(:disabled):active { + background-color: #0000000d; +} +.maplibregl-ctrl-group button:focus:focus-visible { + box-shadow: 0 0 2px 2px #0096ff; +} +.maplibregl-ctrl-group button:focus:not(:focus-visible) { + box-shadow: none; +} +.maplibregl-ctrl-group button:focus:first-child { + border-radius: 4px 4px 0 0; +} +.maplibregl-ctrl-group button:focus:last-child { + border-radius: 0 0 4px 4px; +} +.maplibregl-ctrl-group button:focus:only-child { + border-radius: inherit; +} +.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E"); +} +.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E"); +} +@media (forced-colors: active) { + .maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E"); + } + .maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E"); + } +} +@media (forced-colors: active) and (prefers-color-scheme: light) { + .maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E"); + } + .maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E"); + } +} +.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E"); +} +.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E"); +} +@media (forced-colors: active) { + .maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E"); + } + .maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E"); + } +} +@media (forced-colors: active) and (prefers-color-scheme: light) { + .maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E"); + } + .maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E"); + } +} +.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E"); +} +@media (forced-colors: active) { + .maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E"); + } +} +@media (forced-colors: active) and (prefers-color-scheme: light) { + .maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E"); + } +} +.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%23333' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E"); +} +.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%2333b5e5' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E"); +} +.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E"); +} +.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E"); +} +.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E"); +} +.maplibregl-ctrl + button.maplibregl-ctrl-geolocate:disabled + .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E"); +} +.maplibregl-ctrl + button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active + .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E"); +} +.maplibregl-ctrl + button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error + .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E"); +} +.maplibregl-ctrl + button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background + .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E"); +} +.maplibregl-ctrl + button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error + .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E"); +} +.maplibregl-ctrl + button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting + .maplibregl-ctrl-icon { + animation: maplibregl-spin 2s linear infinite; +} +@media (forced-colors: active) { + .maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E"); + } + .maplibregl-ctrl + button.maplibregl-ctrl-geolocate:disabled + .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E"); + } + .maplibregl-ctrl + button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active + .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E"); + } + .maplibregl-ctrl + button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error + .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E"); + } + .maplibregl-ctrl + button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background + .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E"); + } + .maplibregl-ctrl + button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error + .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E"); + } +} +@media (forced-colors: active) and (prefers-color-scheme: light) { + .maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E"); + } + .maplibregl-ctrl + button.maplibregl-ctrl-geolocate:disabled + .maplibregl-ctrl-icon { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E"); + } +} +@keyframes maplibregl-spin { + 0% { + transform: rotate(0); + } + to { + transform: rotate(1turn); + } +} +a.maplibregl-ctrl-logo { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E"); + background-repeat: no-repeat; + cursor: pointer; + display: block; + height: 23px; + margin: 0 0 -4px -4px; + overflow: hidden; + width: 88px; +} +a.maplibregl-ctrl-logo.maplibregl-compact { + width: 14px; +} +@media (forced-colors: active) { + a.maplibregl-ctrl-logo { + background-color: transparent; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E"); + } +} +@media (forced-colors: active) and (prefers-color-scheme: light) { + a.maplibregl-ctrl-logo { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E"); + } +} +.maplibregl-ctrl.maplibregl-ctrl-attrib { + background-color: #ffffff80; + margin: 0; + padding: 0 5px; +} +@media screen { + .maplibregl-ctrl-attrib.maplibregl-compact { + background-color: #fff; + border-radius: 12px; + box-sizing: content-box; + color: #000; + margin: 10px; + min-height: 20px; + padding: 2px 24px 2px 0; + position: relative; + } + .maplibregl-ctrl-attrib.maplibregl-compact-show { + padding: 2px 28px 2px 8px; + visibility: visible; + } + .maplibregl-ctrl-bottom-left + > .maplibregl-ctrl-attrib.maplibregl-compact-show, + .maplibregl-ctrl-top-left > .maplibregl-ctrl-attrib.maplibregl-compact-show { + border-radius: 12px; + padding: 2px 8px 2px 28px; + } + .maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner { + display: none; + } + .maplibregl-ctrl-attrib-button { + background-color: #ffffff80; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E"); + border: 0; + border-radius: 12px; + box-sizing: border-box; + cursor: pointer; + display: none; + height: 24px; + outline: none; + position: absolute; + right: 0; + top: 0; + width: 24px; + } + .maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + list-style: none; + } + .maplibregl-ctrl-attrib + summary.maplibregl-ctrl-attrib-button::-webkit-details-marker { + display: none; + } + .maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button, + .maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button { + left: 0; + } + .maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button, + .maplibregl-ctrl-attrib.maplibregl-compact-show + .maplibregl-ctrl-attrib-inner { + display: block; + } + .maplibregl-ctrl-attrib.maplibregl-compact-show + .maplibregl-ctrl-attrib-button { + background-color: #0000000d; + } + .maplibregl-ctrl-bottom-right + > .maplibregl-ctrl-attrib.maplibregl-compact:after { + bottom: 0; + right: 0; + } + .maplibregl-ctrl-top-right + > .maplibregl-ctrl-attrib.maplibregl-compact:after { + right: 0; + top: 0; + } + .maplibregl-ctrl-top-left > .maplibregl-ctrl-attrib.maplibregl-compact:after { + left: 0; + top: 0; + } + .maplibregl-ctrl-bottom-left + > .maplibregl-ctrl-attrib.maplibregl-compact:after { + bottom: 0; + left: 0; + } +} +@media screen and (forced-colors: active) { + .maplibregl-ctrl-attrib.maplibregl-compact:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E"); + } +} +@media screen and (forced-colors: active) and (prefers-color-scheme: light) { + .maplibregl-ctrl-attrib.maplibregl-compact:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E"); + } +} +.maplibregl-ctrl-attrib a { + color: #000000bf; + text-decoration: none; +} +.maplibregl-ctrl-attrib a:hover { + color: inherit; + text-decoration: underline; +} +.maplibregl-attrib-empty { + display: none; +} +.maplibregl-ctrl-scale { + background-color: #ffffffbf; + border: 2px solid #333; + border-top: #333; + box-sizing: border-box; + color: #333; + font-size: 10px; + padding: 0 5px; +} +.maplibregl-popup { + display: flex; + left: 0; + pointer-events: none; + position: absolute; + top: 0; + will-change: transform; +} +.maplibregl-popup-anchor-top, +.maplibregl-popup-anchor-top-left, +.maplibregl-popup-anchor-top-right { + flex-direction: column; +} +.maplibregl-popup-anchor-bottom, +.maplibregl-popup-anchor-bottom-left, +.maplibregl-popup-anchor-bottom-right { + flex-direction: column-reverse; +} +.maplibregl-popup-anchor-left { + flex-direction: row; +} +.maplibregl-popup-anchor-right { + flex-direction: row-reverse; +} +.maplibregl-popup-tip { + border: 10px solid transparent; + height: 0; + width: 0; + z-index: 1; +} +.maplibregl-popup-anchor-top .maplibregl-popup-tip { + align-self: center; + border-bottom-color: #fff; + border-top: none; +} +.maplibregl-popup-anchor-top-left .maplibregl-popup-tip { + align-self: flex-start; + border-bottom-color: #fff; + border-left: none; + border-top: none; +} +.maplibregl-popup-anchor-top-right .maplibregl-popup-tip { + align-self: flex-end; + border-bottom-color: #fff; + border-right: none; + border-top: none; +} +.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { + align-self: center; + border-bottom: none; + border-top-color: #fff; +} +.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip { + align-self: flex-start; + border-bottom: none; + border-left: none; + border-top-color: #fff; +} +.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { + align-self: flex-end; + border-bottom: none; + border-right: none; + border-top-color: #fff; +} +.maplibregl-popup-anchor-left .maplibregl-popup-tip { + align-self: center; + border-left: none; + border-right-color: #fff; +} +.maplibregl-popup-anchor-right .maplibregl-popup-tip { + align-self: center; + border-left-color: #fff; + border-right: none; +} +.maplibregl-popup-close-button { + background-color: transparent; + border: 0; + border-radius: 0 3px 0 0; + cursor: pointer; + position: absolute; + right: 0; + top: 0; +} +.maplibregl-popup-close-button:hover { + background-color: #0000000d; +} +.maplibregl-popup-content { + background: #fff; + border-radius: 3px; + box-shadow: 0 1px 2px #0000001a; + padding: 15px 10px; + pointer-events: auto; + position: relative; +} +.maplibregl-popup-anchor-top-left .maplibregl-popup-content { + border-top-left-radius: 0; +} +.maplibregl-popup-anchor-top-right .maplibregl-popup-content { + border-top-right-radius: 0; +} +.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content { + border-bottom-left-radius: 0; +} +.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content { + border-bottom-right-radius: 0; +} +.maplibregl-popup-track-pointer { + display: none; +} +.maplibregl-popup-track-pointer * { + pointer-events: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; +} +.maplibregl-map:hover .maplibregl-popup-track-pointer { + display: flex; +} +.maplibregl-map:active .maplibregl-popup-track-pointer { + display: none; +} +.maplibregl-marker { + left: 0; + position: absolute; + top: 0; + transition: opacity 0.2s; + will-change: transform; +} +.maplibregl-user-location-dot, +.maplibregl-user-location-dot:before { + background-color: #1da1f2; + border-radius: 50%; + height: 15px; + width: 15px; +} +.maplibregl-user-location-dot:before { + animation: maplibregl-user-location-dot-pulse 2s infinite; + content: ""; + position: absolute; +} +.maplibregl-user-location-dot:after { + border: 2px solid #fff; + border-radius: 50%; + box-shadow: 0 0 3px #00000059; + box-sizing: border-box; + content: ""; + height: 19px; + left: -2px; + position: absolute; + top: -2px; + width: 19px; +} +@keyframes maplibregl-user-location-dot-pulse { + 0% { + opacity: 1; + transform: scale(1); + } + 70% { + opacity: 0; + transform: scale(3); + } + to { + opacity: 0; + transform: scale(1); + } +} +.maplibregl-user-location-dot-stale { + background-color: #aaa; +} +.maplibregl-user-location-dot-stale:after { + display: none; +} +.maplibregl-user-location-accuracy-circle { + background-color: #1da1f233; + border-radius: 100%; + height: 1px; + width: 1px; +} +.maplibregl-crosshair, +.maplibregl-crosshair .maplibregl-interactive, +.maplibregl-crosshair .maplibregl-interactive:active { + cursor: crosshair; +} +.maplibregl-boxzoom { + background: #fff; + border: 2px dotted #202020; + height: 0; + left: 0; + opacity: 0.5; + position: absolute; + top: 0; + width: 0; +} +.maplibregl-cooperative-gesture-screen { + align-items: center; + background: #0006; + color: #fff; + display: flex; + font-size: 1.4em; + top: 0; + right: 0; + bottom: 0; + left: 0; + justify-content: center; + line-height: 1.2; + opacity: 0; + padding: 1rem; + pointer-events: none; + position: absolute; + transition: opacity 1s ease 1s; + z-index: 99999; +} +.maplibregl-cooperative-gesture-screen.maplibregl-show { + opacity: 1; + transition: opacity 0.05s; +} +.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message { + display: none; +} +@media (hover: none), (pointer: coarse) { + .maplibregl-cooperative-gesture-screen .maplibregl-desktop-message { + display: none; + } + .maplibregl-cooperative-gesture-screen .maplibregl-mobile-message { + display: block; + } +} +.maplibregl-pseudo-fullscreen { + height: 100% !important; + left: 0 !important; + position: fixed !important; + top: 0 !important; + width: 100% !important; + z-index: 99999; +} +.disable-pinch-zoom.svelte-6wmtgk { + touch-action: pan-x pan-y; +} diff --git a/frontend-backup/_app/immutable/assets/Geist-cyrillic.CHSlOQsW.woff2 b/frontend-backup/_app/immutable/assets/Geist-cyrillic.CHSlOQsW.woff2 new file mode 100644 index 0000000..2000e32 Binary files /dev/null and b/frontend-backup/_app/immutable/assets/Geist-cyrillic.CHSlOQsW.woff2 differ diff --git a/frontend-backup/_app/immutable/assets/Geist-latin-ext.DMtmJ5ZE.woff2 b/frontend-backup/_app/immutable/assets/Geist-latin-ext.DMtmJ5ZE.woff2 new file mode 100644 index 0000000..9608c47 Binary files /dev/null and b/frontend-backup/_app/immutable/assets/Geist-latin-ext.DMtmJ5ZE.woff2 differ diff --git a/frontend-backup/_app/immutable/assets/GeistMono-cyrillic.BZdD_g9V.woff2 b/frontend-backup/_app/immutable/assets/GeistMono-cyrillic.BZdD_g9V.woff2 new file mode 100644 index 0000000..dbd7964 Binary files /dev/null and b/frontend-backup/_app/immutable/assets/GeistMono-cyrillic.BZdD_g9V.woff2 differ diff --git a/frontend-backup/_app/immutable/assets/GeistMono-latin-ext.b6lpi8_2.woff2 b/frontend-backup/_app/immutable/assets/GeistMono-latin-ext.b6lpi8_2.woff2 new file mode 100644 index 0000000..f638b47 Binary files /dev/null and b/frontend-backup/_app/immutable/assets/GeistMono-latin-ext.b6lpi8_2.woff2 differ diff --git a/frontend-backup/_app/immutable/assets/GeistMono-latin.Cjtb1TV-.woff2 b/frontend-backup/_app/immutable/assets/GeistMono-latin.Cjtb1TV-.woff2 new file mode 100644 index 0000000..504be86 Binary files /dev/null and b/frontend-backup/_app/immutable/assets/GeistMono-latin.Cjtb1TV-.woff2 differ diff --git a/frontend-backup/_app/immutable/assets/LoginForm.CxMG0irz.css b/frontend-backup/_app/immutable/assets/LoginForm.CxMG0irz.css index d80834c..0c79710 100644 --- a/frontend-backup/_app/immutable/assets/LoginForm.CxMG0irz.css +++ b/frontend-backup/_app/immutable/assets/LoginForm.CxMG0irz.css @@ -1 +1,3 @@ -:where(.flexible.svelte-1gvfki5){width:100%} +:where(.flexible.svelte-1gvfki5) { + width: 100%; +} diff --git a/frontend-backup/_app/immutable/assets/PixelifySans-cyrillic.CPPz0Qvd.woff2 b/frontend-backup/_app/immutable/assets/PixelifySans-cyrillic.CPPz0Qvd.woff2 new file mode 100644 index 0000000..7a788b0 Binary files /dev/null and b/frontend-backup/_app/immutable/assets/PixelifySans-cyrillic.CPPz0Qvd.woff2 differ diff --git a/frontend-backup/_app/immutable/assets/ProfileAvatarWithLevel.6dmPRSfx.css b/frontend-backup/_app/immutable/assets/ProfileAvatarWithLevel.6dmPRSfx.css index 50eb5cc..fc6d64e 100644 --- a/frontend-backup/_app/immutable/assets/ProfileAvatarWithLevel.6dmPRSfx.css +++ b/frontend-backup/_app/immutable/assets/ProfileAvatarWithLevel.6dmPRSfx.css @@ -1 +1,9 @@ -.level-fill.svelte-zhy0pt{--angle: 180deg;--color: black;background:conic-gradient(var(--color),var(--color) var(--angle),transparent calc(var(--angle) + 3deg))} +.level-fill.svelte-zhy0pt { + --angle: 180deg; + --color: black; + background: conic-gradient( + var(--color), + var(--color) var(--angle), + transparent calc(var(--angle) + 3deg) + ); +} diff --git a/frontend-backup/_app/immutable/chunks/0.CnnlsrhC.js b/frontend-backup/_app/immutable/chunks/0.CnnlsrhC.js deleted file mode 100644 index 7025f30..0000000 --- a/frontend-backup/_app/immutable/chunks/0.CnnlsrhC.js +++ /dev/null @@ -1,1458 +0,0 @@ -var ke = (o) => { - throw TypeError(o); -}; -var He = (o, t, l) => t.has(o) || ke("Cannot " + l); -var gt = (o, t, l) => (He(o, t, "read from private field"), l ? l.call(o) : t.get(o)), - qt = (o, t, l) => (t.has(o) ? ke("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(o) : t.set(o, l)), - Qt = (o, t, l, S) => (He(o, t, "write to private field"), S ? S.call(o, l) : t.set(o, l), l); -import "../chunks/Bzak7iHL.js"; -import { o as pt, s as it } from "../chunks/ByKBPM-D.js"; -import { - p as de, - f as et, - d as ot, - b as n, - r as p, - t as J, - c as ue, - bo as le, - ay as pe, - ax as Re, - az as $e, - aR as R, - aG as Ue, - w as _t, - aH as f, - A as e, - aT as b, - x as $t, - s as Mt, - bj as Ve, - ap as ht, - aS as g, - a as v, - an as tn, - aU as Ne, - q as ne, - bk as en, -} from "../chunks/DUoKDNpf.js"; -import { s as Jt } from "../chunks/g8c1BvYP.js"; -import { v as nn } from "../chunks/F0pgzfyy.js"; -import { c as an, A as on, s as sn, a as rn } from "../chunks/D2m5UD3G.js"; -import { d as Z, e as xt, f as ln, g as Fe, u as cn } from "../chunks/1lh-LSvX.js"; -import "../chunks/C5GsJ62f.js"; -import { p as O, i as I, s as Me, r as dn } from "../chunks/5NasrULQ.js"; -import { e as Pe } from "../chunks/U908S-6f.js"; -import { c as It, s as Tt, b as A, d as Ae, a as un, S as fn } from "../chunks/B1GmkH4o.js"; -import { b as Ke } from "../chunks/CMs8vKjq.js"; -import { c as Ot } from "../chunks/BtP6pfnb.js"; -import "../chunks/D35KiPL1.js"; -const vn = !0, - Ia = Object.freeze(Object.defineProperty({ __proto__: null, prerender: vn }, Symbol.toStringTag, { value: "Module" })), - mn = Array(12).fill(0); -var gn = et('
'), - hn = et('
'); -function _n(o, t) { - de(t, !0); - var l = hn(), - S = ot(l); - Pe( - S, - 23, - () => mn, - (M, L) => `spinner-bar-${L}`, - (M, L) => { - var V = gn(); - n(M, V); - } - ), - p(S), - p(l), - J( - (M) => { - Tt(l, 1, M), A(l, "data-visible", t.visible); - }, - [() => It(["sonner-loading-wrapper", t.class].filter(Boolean).join(" "))] - ), - n(o, l), - ue(); -} -const bn = typeof window < "u" ? window : void 0; -function wn(o) { - let t = o.activeElement; - for (; t != null && t.shadowRoot; ) { - const l = t.shadowRoot.activeElement; - if (l === t) break; - t = l; - } - return t; -} -var jt, te; -class yn { - constructor(t = {}) { - qt(this, jt); - qt(this, te); - const { window: l = bn, document: S = l == null ? void 0 : l.document } = t; - l !== void 0 && - (Qt(this, jt, S), - Qt( - this, - te, - an((M) => { - const L = le(l, "focusin", M), - V = le(l, "focusout", M); - return () => { - L(), V(); - }; - }) - )); - } - get current() { - var t; - return (t = gt(this, te)) == null || t.call(this), gt(this, jt) ? wn(gt(this, jt)) : null; - } -} -(jt = new WeakMap()), (te = new WeakMap()); -new yn(); -var ee, St; -class xn { - constructor(t) { - qt(this, ee); - qt(this, St); - Qt(this, ee, t), Qt(this, St, Symbol(t)); - } - get key() { - return gt(this, St); - } - exists() { - return pe(gt(this, St)); - } - get() { - const t = Re(gt(this, St)); - if (t === void 0) throw new Error(`Context "${gt(this, ee)}" not found`); - return t; - } - getOr(t) { - const l = Re(gt(this, St)); - return l === void 0 ? t : l; - } - set(t) { - return $e(gt(this, St), t); - } -} -(ee = new WeakMap()), (St = new WeakMap()); -const In = new xn(""); -function ce(o) { - return o.label !== void 0; -} -function Tn() { - let o = R(Ue(typeof document < "u" ? document.hidden : !1)); - return ( - _t(() => - le(document, "visibilitychange", () => { - f(o, document.hidden, !0); - }) - ), - { - get current() { - return e(o); - }, - } - ); -} -const je = 4e3, - Sn = 14, - Bn = 45, - Dn = 200, - En = 0.05, - Mn = { toast: "", title: "", description: "", loader: "", closeButton: "", cancelButton: "", actionButton: "", action: "", warning: "", error: "", success: "", default: "", info: "", loading: "" }; -function An(o) { - const [t, l] = o.split("-"), - S = []; - return t && S.push(t), l && S.push(l), S; -} -function ze(o) { - return 1 / (1.5 + Math.abs(o) / 20); -} -var Cn = et("
"), - Pn = (o, t, l, S, M) => { - var L, V; - e(t) || !e(l) || (S(), (V = (L = M.toast).onDismiss) == null || V.call(L, M.toast)); - }, - On = et(''), - Ln = et('
'), - kn = et('
'), - Hn = (o, t, l, S) => { - var M, L; - ce(t.toast.cancel) && e(l) && ((L = (M = t.toast.cancel) == null ? void 0 : M.onClick) == null || L.call(M, o), S()); - }, - Rn = et(''), - Nn = (o, t, l) => { - var S; - ce(t.toast.action) && ((S = t.toast.action) == null || S.onClick(o), !o.defaultPrevented && l()); - }, - Fn = et(''), - jn = et('
', 1), - zn = et('
  • '); -function Un(o, t) { - de(t, !0); - const l = (s) => { - var c = g(), - x = v(c); - { - var T = (h) => { - var W = Cn(), - tt = ot(W); - it(tt, () => t.loadingIcon), - p(W), - J( - (Y) => { - Tt(W, 1, Y), A(W, "data-visible", e(E) === "loading"); - }, - [ - () => { - var Y, j, m; - return It(xt((Y = e(at)) == null ? void 0 : Y.loader, (m = (j = t.toast) == null ? void 0 : j.classes) == null ? void 0 : m.loader, "sonner-loader")); - }, - ] - ), - n(h, W); - }, - B = (h) => { - { - let W = b(() => { - var Y, j; - return xt((Y = e(at)) == null ? void 0 : Y.loader, (j = t.toast.classes) == null ? void 0 : j.loader); - }), - tt = b(() => e(E) === "loading"); - _n(h, { - get class() { - return e(W); - }, - get visible() { - return e(tt); - }, - }); - } - }; - I(x, (h) => { - t.loadingIcon ? h(T) : h(B, !1); - }); - } - n(s, c); - }; - let S = O(t, "cancelButtonStyle", 3, ""), - M = O(t, "actionButtonStyle", 3, ""), - L = O(t, "descriptionClass", 3, ""), - V = O(t, "unstyled", 3, !1), - Bt = O(t, "defaultRichColors", 3, !1); - const $ = { ...Mn }; - let N = R(!1), - q = R(!1), - Lt = R(!1), - zt = R(!1), - Ut = R(!1), - Q = R(0), - bt = R(0), - kt = t.toast.duration || t.duration || je, - nt = R(void 0), - ut = R(null), - Vt = R(null); - const fe = b(() => t.index === 0), - ve = b(() => t.index + 1 <= t.visibleToasts), - E = b(() => t.toast.type), - ft = b(() => t.toast.dismissable !== !1), - At = b(() => t.toast.class || ""), - Dt = b(() => t.toast.descriptionClass || ""), - vt = b(() => Z.heights.findIndex((s) => s.toastId === t.toast.id) || 0), - Ct = b(() => t.toast.closeButton ?? t.closeButton), - me = b(() => t.toast.duration ?? t.duration ?? je); - let Et = null; - const ae = b(() => t.position.split("-")), - ge = b(() => Z.heights.reduce((s, c, x) => (x >= e(vt) ? s : s + c.height), 0)), - he = Tn(), - _e = b(() => t.toast.invert || t.invert), - Kt = b(() => e(E) === "loading"), - at = b(() => ({ ...$, ...t.classes })), - be = b(() => t.toast.title), - Pt = b(() => t.toast.description); - let Wt = R(0), - oe = R(0); - const r = b(() => Math.round(e(vt) * Sn + e(ge))); - _t(() => { - e(be), e(Pt); - let s; - t.expanded || t.expandByDefault ? (s = 1) : (s = 1 - t.index * En); - const c = $t(() => e(nt)); - if (c === void 0) return; - c.style.setProperty("height", "auto"); - const x = c.offsetHeight, - T = c.getBoundingClientRect().height, - B = Math.round((T / s + Number.EPSILON) & 100) / 100; - c.style.removeProperty("height"); - let h; - Math.abs(B - x) < 1 ? (h = B) : (h = x), - f(bt, h, !0), - $t(() => { - Z.setHeight({ toastId: t.toast.id, height: h }); - }); - }); - function u() { - f(q, !0), - f(Q, e(r), !0), - Z.removeHeight(t.toast.id), - setTimeout(() => { - Z.remove(t.toast.id); - }, Dn); - } - let F; - const wt = b(() => (t.toast.promise && e(E) === "loading") || t.toast.duration === Number.POSITIVE_INFINITY); - function st() { - f(Wt, new Date().getTime(), !0), - (F = setTimeout(() => { - var s, c; - (c = (s = t.toast).onAutoClose) == null || c.call(s, t.toast), u(); - }, kt)); - } - function Ht() { - if (e(oe) < e(Wt)) { - const s = new Date().getTime() - e(Wt); - kt = kt - s; - } - f(oe, new Date().getTime(), !0); - } - _t(() => { - t.toast.updated && (clearTimeout(F), (kt = e(me)), st()); - }), - _t(() => (e(wt) || (t.expanded || t.interacting || he.current ? Ht() : st()), () => clearTimeout(F))), - pt(() => { - var c; - f(N, !0); - const s = (c = e(nt)) == null ? void 0 : c.getBoundingClientRect().height; - return ( - f(bt, s, !0), - Z.setHeight({ toastId: t.toast.id, height: s }), - () => { - Z.removeHeight(t.toast.id); - } - ); - }), - _t(() => { - t.toast.delete && - $t(() => { - var s, c; - u(), (c = (s = t.toast).onDismiss) == null || c.call(s, t.toast); - }); - }); - const Oe = (s) => { - if (e(Kt)) return; - f(Q, e(r), !0); - const c = s.target; - c.setPointerCapture(s.pointerId), c.tagName !== "BUTTON" && (f(Lt, !0), (Et = { x: s.clientX, y: s.clientY })); - }, - ie = () => { - var h, W, tt, Y, j, m; - if (e(zt) || !e(ft)) return; - Et = null; - const s = Number(((h = e(nt)) == null ? void 0 : h.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), - c = Number(((W = e(nt)) == null ? void 0 : W.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), - x = new Date().getTime() - 0, - T = e(ut) === "x" ? s : c, - B = Math.abs(T) / x; - if (Math.abs(T) >= Bn || B > 0.11) { - f(Q, e(r), !0), (Y = (tt = t.toast).onDismiss) == null || Y.call(tt, t.toast), e(ut) === "x" ? f(Vt, s > 0 ? "right" : "left", !0) : f(Vt, c > 0 ? "down" : "up", !0), u(), f(zt, !0); - return; - } else (j = e(nt)) == null || j.style.setProperty("--swipe-amount-x", "0px"), (m = e(nt)) == null || m.style.setProperty("--swipe-amount-y", "0px"); - f(Ut, !1), f(Lt, !1), f(ut, null); - }, - mt = (s) => { - var W, tt, Y; - if (!Et || !e(ft) || (((W = window.getSelection()) == null ? void 0 : W.toString().length) ?? -1) > 0) return; - const x = s.clientY - Et.y, - T = s.clientX - Et.x, - B = t.swipeDirections ?? An(t.position); - !e(ut) && (Math.abs(T) > 1 || Math.abs(x) > 1) && f(ut, Math.abs(T) > Math.abs(x) ? "x" : "y", !0); - let h = { x: 0, y: 0 }; - if (e(ut) === "y") { - if (B.includes("top") || B.includes("bottom")) - if ((B.includes("top") && x < 0) || (B.includes("bottom") && x > 0)) h.y = x; - else { - const j = x * ze(x); - h.y = Math.abs(j) < Math.abs(x) ? j : x; - } - } else if (e(ut) === "x" && (B.includes("left") || B.includes("right"))) - if ((B.includes("left") && T < 0) || (B.includes("right") && T > 0)) h.x = T; - else { - const j = T * ze(T); - h.x = Math.abs(j) < Math.abs(T) ? j : T; - } - (Math.abs(h.x) > 0 || Math.abs(h.y) > 0) && f(Ut, !0), (tt = e(nt)) == null || tt.style.setProperty("--swipe-amount-x", `${h.x}px`), (Y = e(nt)) == null || Y.style.setProperty("--swipe-amount-y", `${h.y}px`); - }, - yt = () => { - f(Lt, !1), f(ut, null), (Et = null); - }, - K = b(() => (t.toast.icon ? t.toast.icon : e(E) === "success" ? t.successIcon : e(E) === "error" ? t.errorIcon : e(E) === "warning" ? t.warningIcon : e(E) === "info" ? t.infoIcon : e(E) === "loading" ? t.loadingIcon : null)); - var w = zn(); - A(w, "tabindex", 0); - let se; - (w.__pointermove = mt), (w.__pointerup = ie), (w.__pointerdown = Oe); - var we = ot(w); - { - var ye = (s) => { - var c = On(); - c.__click = [Pn, Kt, ft, u, t]; - var x = ot(c); - it(x, () => t.closeIcon ?? ht), - p(c), - J( - (T) => { - A(c, "aria-label", t.closeButtonAriaLabel), A(c, "data-disabled", e(Kt)), Tt(c, 1, T); - }, - [ - () => { - var T, B, h; - return It(xt((T = e(at)) == null ? void 0 : T.closeButton, (h = (B = t.toast) == null ? void 0 : B.classes) == null ? void 0 : h.closeButton)); - }, - ] - ), - n(s, c); - }; - I(we, (s) => { - e(Ct) && !t.toast.component && e(E) !== "loading" && t.closeIcon !== null && s(ye); - }); - } - var xe = Mt(we, 2); - { - var Ie = (s) => { - const c = b(() => t.toast.component); - var x = g(), - T = v(x); - Ot( - T, - () => e(c), - (B, h) => { - h( - B, - Me(() => t.toast.componentProps, { closeToast: u }) - ); - } - ), - n(s, x); - }, - Te = (s) => { - var c = jn(), - x = v(c); - { - var T = (y) => { - var a = Ln(), - d = ot(a); - { - var D = (_) => { - var C = g(), - z = v(C); - { - var H = (G) => { - var U = g(), - ct = v(U); - Ot( - ct, - () => t.toast.icon, - (dt, Yt) => { - Yt(dt, {}); - } - ), - n(G, U); - }, - P = (G) => { - l(G); - }; - I(z, (G) => { - t.toast.icon ? G(H) : G(P, !1); - }); - } - n(_, C); - }; - I(d, (_) => { - (t.toast.promise || e(E) === "loading") && _(D); - }); - } - var k = Mt(d, 2); - { - var i = (_) => { - var C = g(), - z = v(C); - { - var H = (G) => { - var U = g(), - ct = v(U); - Ot( - ct, - () => t.toast.icon, - (dt, Yt) => { - Yt(dt, {}); - } - ), - n(G, U); - }, - P = (G) => { - var U = g(), - ct = v(U); - { - var dt = (Rt) => { - var Gt = g(), - Se = v(Gt); - it(Se, () => t.successIcon ?? ht), n(Rt, Gt); - }, - Yt = (Rt) => { - var Gt = g(), - Se = v(Gt); - { - var Ge = (Nt) => { - var Zt = g(), - Be = v(Zt); - it(Be, () => t.errorIcon ?? ht), n(Nt, Zt); - }, - Ze = (Nt) => { - var Zt = g(), - Be = v(Zt); - { - var Xe = (Ft) => { - var Xt = g(), - De = v(Xt); - it(De, () => t.warningIcon ?? ht), n(Ft, Xt); - }, - qe = (Ft) => { - var Xt = g(), - De = v(Xt); - { - var Qe = (Ee) => { - var Le = g(), - Je = v(Le); - it(Je, () => t.infoIcon ?? ht), n(Ee, Le); - }; - I( - De, - (Ee) => { - e(E) === "info" && Ee(Qe); - }, - !0 - ); - } - n(Ft, Xt); - }; - I( - Be, - (Ft) => { - e(E) === "warning" ? Ft(Xe) : Ft(qe, !1); - }, - !0 - ); - } - n(Nt, Zt); - }; - I( - Se, - (Nt) => { - e(E) === "error" ? Nt(Ge) : Nt(Ze, !1); - }, - !0 - ); - } - n(Rt, Gt); - }; - I( - ct, - (Rt) => { - e(E) === "success" ? Rt(dt) : Rt(Yt, !1); - }, - !0 - ); - } - n(G, U); - }; - I(z, (G) => { - t.toast.icon ? G(H) : G(P, !1); - }); - } - n(_, C); - }; - I(k, (_) => { - t.toast.type !== "loading" && _(i); - }); - } - p(a), - J((_) => Tt(a, 1, _), [ - () => { - var _, C, z; - return It(xt((_ = e(at)) == null ? void 0 : _.icon, (z = (C = t.toast) == null ? void 0 : C.classes) == null ? void 0 : z.icon)); - }, - ]), - n(y, a); - }; - I(x, (y) => { - (e(E) || t.toast.icon || t.toast.promise) && t.toast.icon !== null && (e(K) !== null || t.toast.icon) && y(T); - }); - } - var B = Mt(x, 2), - h = ot(B), - W = ot(h); - { - var tt = (y) => { - var a = g(), - d = v(a); - { - var D = (i) => { - const _ = b(() => t.toast.title); - var C = g(), - z = v(C); - Ot( - z, - () => e(_), - (H, P) => { - P( - H, - Me(() => t.toast.componentProps) - ); - } - ), - n(i, C); - }, - k = (i) => { - var _ = Ne(); - J(() => Jt(_, t.toast.title)), n(i, _); - }; - I(d, (i) => { - typeof t.toast.title != "string" ? i(D) : i(k, !1); - }); - } - n(y, a); - }; - I(W, (y) => { - t.toast.title && y(tt); - }); - } - p(h); - var Y = Mt(h, 2); - { - var j = (y) => { - var a = kn(), - d = ot(a); - { - var D = (i) => { - const _ = b(() => t.toast.description); - var C = g(), - z = v(C); - Ot( - z, - () => e(_), - (H, P) => { - P( - H, - Me(() => t.toast.componentProps) - ); - } - ), - n(i, C); - }, - k = (i) => { - var _ = Ne(); - J(() => Jt(_, t.toast.description)), n(i, _); - }; - I(d, (i) => { - typeof t.toast.description != "string" ? i(D) : i(k, !1); - }); - } - p(a), - J((i) => Tt(a, 1, i), [ - () => { - var i, _; - return It(xt(L(), e(Dt), (i = e(at)) == null ? void 0 : i.description, (_ = t.toast.classes) == null ? void 0 : _.description)); - }, - ]), - n(y, a); - }; - I(Y, (y) => { - t.toast.description && y(j); - }); - } - p(B); - var m = Mt(B, 2); - { - var X = (y) => { - var a = g(), - d = v(a); - { - var D = (i) => { - var _ = g(), - C = v(_); - Ot( - C, - () => t.toast.cancel, - (z, H) => { - H(z, {}); - } - ), - n(i, _); - }, - k = (i) => { - var _ = g(), - C = v(_); - { - var z = (H) => { - var P = Rn(); - P.__click = [Hn, t, ft, u]; - var G = ot(P, !0); - p(P), - J( - (U) => { - Ae(P, t.toast.cancelButtonStyle ?? S()), Tt(P, 1, U), Jt(G, t.toast.cancel.label); - }, - [ - () => { - var U, ct, dt; - return It(xt((U = e(at)) == null ? void 0 : U.cancelButton, (dt = (ct = t.toast) == null ? void 0 : ct.classes) == null ? void 0 : dt.cancelButton)); - }, - ] - ), - n(H, P); - }; - I( - C, - (H) => { - ce(t.toast.cancel) && H(z); - }, - !0 - ); - } - n(i, _); - }; - I(d, (i) => { - typeof t.toast.cancel == "function" ? i(D) : i(k, !1); - }); - } - n(y, a); - }; - I(m, (y) => { - t.toast.cancel && y(X); - }); - } - var rt = Mt(m, 2); - { - var lt = (y) => { - var a = g(), - d = v(a); - { - var D = (i) => { - var _ = g(), - C = v(_); - Ot( - C, - () => t.toast.action, - (z, H) => { - H(z, {}); - } - ), - n(i, _); - }, - k = (i) => { - var _ = g(), - C = v(_); - { - var z = (H) => { - var P = Fn(); - P.__click = [Nn, t, u]; - var G = ot(P, !0); - p(P), - J( - (U) => { - Ae(P, t.toast.actionButtonStyle ?? M()), Tt(P, 1, U), Jt(G, t.toast.action.label); - }, - [ - () => { - var U, ct, dt; - return It(xt((U = e(at)) == null ? void 0 : U.actionButton, (dt = (ct = t.toast) == null ? void 0 : ct.classes) == null ? void 0 : dt.actionButton)); - }, - ] - ), - n(H, P); - }; - I( - C, - (H) => { - ce(t.toast.action) && H(z); - }, - !0 - ); - } - n(i, _); - }; - I(d, (i) => { - typeof t.toast.action == "function" ? i(D) : i(k, !1); - }); - } - n(y, a); - }; - I(rt, (y) => { - t.toast.action && y(lt); - }); - } - J((y) => Tt(h, 1, y), [ - () => { - var y, a, d; - return It(xt((y = e(at)) == null ? void 0 : y.title, (d = (a = t.toast) == null ? void 0 : a.classes) == null ? void 0 : d.title)); - }, - ]), - n(s, c); - }; - I(xe, (s) => { - t.toast.component ? s(Ie) : s(Te, !1); - }); - } - p(w), - Ke( - w, - (s) => f(nt, s), - () => e(nt) - ), - J( - (s, c, x, T) => { - Tt(w, 1, s), - A(w, "data-rich-colors", t.toast.richColors ?? Bt()), - A(w, "data-styled", !(t.toast.component || t.toast.unstyled || V())), - A(w, "data-mounted", e(N)), - A(w, "data-promise", c), - A(w, "data-swiped", e(Ut)), - A(w, "data-removed", e(q)), - A(w, "data-visible", e(ve)), - A(w, "data-y-position", e(ae)[0]), - A(w, "data-x-position", e(ae)[1]), - A(w, "data-index", t.index), - A(w, "data-front", e(fe)), - A(w, "data-swiping", e(Lt)), - A(w, "data-dismissable", e(ft)), - A(w, "data-type", e(E)), - A(w, "data-invert", e(_e)), - A(w, "data-swipe-out", e(zt)), - A(w, "data-swipe-direction", e(Vt)), - A(w, "data-expanded", x), - (se = Ae(w, `${t.style} ${t.toast.style}`, se, T)); - }, - [ - () => { - var s, c, x, T, B, h; - return It( - xt( - t.class, - e(At), - (s = e(at)) == null ? void 0 : s.toast, - (x = (c = t.toast) == null ? void 0 : c.classes) == null ? void 0 : x.toast, - (T = e(at)) == null ? void 0 : T[e(E)], - (h = (B = t.toast) == null ? void 0 : B.classes) == null ? void 0 : h[e(E)] - ) - ); - }, - () => !!t.toast.promise, - () => !!(t.expanded || (t.expandByDefault && e(N))), - () => ({ "--index": t.index, "--toasts-before": t.index, "--z-index": Z.toasts.length - t.index, "--offset": `${e(q) ? e(Q) : e(r)}px`, "--initial-height": t.expandByDefault ? "auto" : `${e(bt)}px` }), - ] - ), - Ve("dragend", w, yt), - n(o, w), - ue(); -} -tn(["pointermove", "pointerup", "pointerdown", "click"]); -var Vn = ne( - '' -); -function Kn(o) { - var t = Vn(); - n(o, t); -} -var Wn = ne( - '' -); -function Yn(o) { - var t = Wn(); - n(o, t); -} -var Gn = ne( - '' -); -function Zn(o) { - var t = Gn(); - n(o, t); -} -var Xn = ne( - '' -); -function qn(o) { - var t = Xn(); - n(o, t); -} -var Qn = ne( - '' -); -function Jn(o) { - var t = Qn(); - n(o, t); -} -const pn = 3, - We = "24px", - Ye = "16px", - $n = 4e3, - ta = 356, - ea = 14, - Ce = "dark", - re = "light"; -function na(o, t) { - const l = {}; - return ( - [o, t].forEach((S, M) => { - const L = M === 1, - V = L ? "--mobile-offset" : "--offset", - Bt = L ? Ye : We; - function $(N) { - ["top", "right", "bottom", "left"].forEach((q) => { - l[`${V}-${q}`] = typeof N == "number" ? `${N}px` : N; - }); - } - typeof S == "number" || typeof S == "string" - ? $(S) - : typeof S == "object" - ? ["top", "right", "bottom", "left"].forEach((N) => { - const q = S[N]; - q === void 0 ? (l[`${V}-${N}`] = Bt) : (l[`${V}-${N}`] = typeof q == "number" ? `${q}px` : q); - }) - : $(Bt); - }), - l - ); -} -var aa = et("
      "), - oa = et('
      '); -function ia(o, t) { - de(t, !0); - function l(r) { - return r !== "system" ? r : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? Ce : re; - } - let S = O(t, "invert", 3, !1), - M = O(t, "position", 3, "bottom-right"), - L = O(t, "hotkey", 19, () => ["altKey", "KeyT"]), - V = O(t, "expand", 3, !1), - Bt = O(t, "closeButton", 3, !1), - $ = O(t, "offset", 3, We), - N = O(t, "mobileOffset", 3, Ye), - q = O(t, "theme", 3, "light"), - Lt = O(t, "richColors", 3, !1), - zt = O(t, "duration", 3, $n), - Ut = O(t, "visibleToasts", 3, pn), - Q = O(t, "toastOptions", 19, () => ({})), - bt = O(t, "dir", 7, "auto"), - kt = O(t, "gap", 3, ea), - nt = O(t, "containerAriaLabel", 3, "Notifications"), - ut = O(t, "closeButtonAriaLabel", 3, "Close toast"), - Vt = dn(t, [ - "$$slots", - "$$events", - "$$legacy", - "invert", - "position", - "hotkey", - "expand", - "closeButton", - "offset", - "mobileOffset", - "theme", - "richColors", - "duration", - "visibleToasts", - "toastOptions", - "dir", - "gap", - "loadingIcon", - "successIcon", - "errorIcon", - "warningIcon", - "closeIcon", - "infoIcon", - "containerAriaLabel", - "class", - "closeButtonAriaLabel", - "onblur", - "onfocus", - "onmouseenter", - "onmousemove", - "onmouseleave", - "ondragend", - "onpointerdown", - "onpointerup", - ]); - function fe() { - if (bt() !== "auto") return bt(); - if (typeof window > "u" || typeof document > "u") return "ltr"; - const r = document.documentElement.getAttribute("dir"); - return r === "auto" || !r ? ($t(() => bt(window.getComputedStyle(document.documentElement).direction ?? "ltr")), bt()) : ($t(() => bt(r)), r); - } - const ve = b(() => Array.from(new Set([M(), ...Z.toasts.filter((r) => r.position).map((r) => r.position)].filter(Boolean)))); - let E = R(!1), - ft = R(!1), - At = R(Ue(l(q()))), - Dt = R(void 0), - vt = R(null), - Ct = R(!1); - const me = b(() => L().join("+").replace(/Key/g, "").replace(/Digit/g, "")); - _t(() => { - Z.toasts.length <= 1 && f(E, !1); - }), - _t(() => { - const r = Z.toasts.filter((u) => u.dismiss && !u.delete); - if (r.length > 0) { - const u = Z.toasts.map((F) => (r.find((st) => st.id === F.id) ? { ...F, delete: !0 } : F)); - Z.toasts = u; - } - }), - _t(() => () => { - e(Dt) && e(vt) && (e(vt).focus({ preventScroll: !0 }), f(vt, null), f(Ct, !1)); - }), - pt( - () => ( - Z.reset(), - le(document, "keydown", (u) => { - var wt, st; - L().every((Ht) => u[Ht] || u.code === Ht) && (f(E, !0), (wt = e(Dt)) == null || wt.focus()), - u.code === "Escape" && (document.activeElement === e(Dt) || ((st = e(Dt)) != null && st.contains(document.activeElement))) && f(E, !1); - }) - ) - ), - _t(() => { - if ((q() !== "system" && f(At, q()), typeof window < "u")) { - q() === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? f(At, Ce) : f(At, re)); - const r = window.matchMedia("(prefers-color-scheme: dark)"), - u = ({ matches: F }) => { - f(At, F ? Ce : re, !0); - }; - "addEventListener" in r ? r.addEventListener("change", u) : r.addListener(u); - } - }); - const Et = (r) => { - var u; - (u = t.onblur) == null || u.call(t, r), e(Ct) && !r.currentTarget.contains(r.relatedTarget) && (f(Ct, !1), e(vt) && (e(vt).focus({ preventScroll: !0 }), f(vt, null))); - }, - ae = (r) => { - var F; - (F = t.onfocus) == null || F.call(t, r), !(r.target instanceof HTMLElement && r.target.dataset.dismissable === "false") && (e(Ct) || (f(Ct, !0), f(vt, r.relatedTarget, !0))); - }, - ge = (r) => { - var F; - (F = t.onpointerdown) == null || F.call(t, r), !(r.target instanceof HTMLElement && r.target.dataset.dismissable === "false") && f(ft, !0); - }, - he = (r) => { - var u; - (u = t.onmouseenter) == null || u.call(t, r), f(E, !0); - }, - _e = (r) => { - var u; - (u = t.onmouseleave) == null || u.call(t, r), e(ft) || f(E, !1); - }, - Kt = (r) => { - var u; - (u = t.onmousemove) == null || u.call(t, r), f(E, !0); - }, - at = (r) => { - var u; - (u = t.ondragend) == null || u.call(t, r), f(E, !1); - }, - be = (r) => { - var u; - (u = t.onpointerup) == null || u.call(t, r), f(ft, !1); - }; - In.set(new ln()); - var Pt = oa(); - A(Pt, "tabindex", -1); - var Wt = ot(Pt); - { - var oe = (r) => { - var u = g(), - F = v(u); - Pe( - F, - 18, - () => e(ve), - (wt) => wt, - (wt, st, Ht, Oe) => { - const ie = b(() => { - const [K, w] = st.split("-"); - return { y: K, x: w }; - }), - mt = b(() => na($(), N())); - var yt = aa(); - un( - yt, - (K, w) => ({ - tabindex: -1, - dir: K, - class: t.class, - "data-sonner-toaster": !0, - "data-sonner-theme": e(At), - "data-y-position": e(ie).y, - "data-x-position": e(ie).x, - style: t.style, - onblur: Et, - onfocus: ae, - onmouseenter: he, - onmousemove: Kt, - onmouseleave: _e, - ondragend: at, - onpointerdown: ge, - onpointerup: be, - ...Vt, - [fn]: w, - }), - [ - fe, - () => { - var K; - return { - "--front-toast-height": `${(K = Z.heights[0]) == null ? void 0 : K.height}px`, - "--width": `${ta}px`, - "--gap": `${kt()}px`, - "--offset-top": e(mt)["--offset-top"], - "--offset-right": e(mt)["--offset-right"], - "--offset-bottom": e(mt)["--offset-bottom"], - "--offset-left": e(mt)["--offset-left"], - "--mobile-offset-top": e(mt)["--mobile-offset-top"], - "--mobile-offset-right": e(mt)["--mobile-offset-right"], - "--mobile-offset-bottom": e(mt)["--mobile-offset-bottom"], - "--mobile-offset-left": e(mt)["--mobile-offset-left"], - }; - }, - ], - void 0, - "svelte-tppj9g" - ), - Pe( - yt, - 23, - () => Z.toasts.filter((K) => (!K.position && e(Ht) === 0) || K.position === st), - (K) => K.id, - (K, w, se, we) => { - { - const ye = (m) => { - var X = g(), - rt = v(X); - { - var lt = (a) => { - var d = g(), - D = v(d); - it(D, () => t.successIcon ?? ht), n(a, d); - }, - y = (a) => { - var d = g(), - D = v(d); - { - var k = (i) => { - Kn(i); - }; - I( - D, - (i) => { - t.successIcon !== null && i(k); - }, - !0 - ); - } - n(a, d); - }; - I(rt, (a) => { - t.successIcon ? a(lt) : a(y, !1); - }); - } - n(m, X); - }, - xe = (m) => { - var X = g(), - rt = v(X); - { - var lt = (a) => { - var d = g(), - D = v(d); - it(D, () => t.errorIcon ?? ht), n(a, d); - }, - y = (a) => { - var d = g(), - D = v(d); - { - var k = (i) => { - Yn(i); - }; - I( - D, - (i) => { - t.errorIcon !== null && i(k); - }, - !0 - ); - } - n(a, d); - }; - I(rt, (a) => { - t.errorIcon ? a(lt) : a(y, !1); - }); - } - n(m, X); - }, - Ie = (m) => { - var X = g(), - rt = v(X); - { - var lt = (a) => { - var d = g(), - D = v(d); - it(D, () => t.warningIcon ?? ht), n(a, d); - }, - y = (a) => { - var d = g(), - D = v(d); - { - var k = (i) => { - Zn(i); - }; - I( - D, - (i) => { - t.warningIcon !== null && i(k); - }, - !0 - ); - } - n(a, d); - }; - I(rt, (a) => { - t.warningIcon ? a(lt) : a(y, !1); - }); - } - n(m, X); - }, - Te = (m) => { - var X = g(), - rt = v(X); - { - var lt = (a) => { - var d = g(), - D = v(d); - it(D, () => t.infoIcon ?? ht), n(a, d); - }, - y = (a) => { - var d = g(), - D = v(d); - { - var k = (i) => { - qn(i); - }; - I( - D, - (i) => { - t.infoIcon !== null && i(k); - }, - !0 - ); - } - n(a, d); - }; - I(rt, (a) => { - t.infoIcon ? a(lt) : a(y, !1); - }); - } - n(m, X); - }, - s = (m) => { - var X = g(), - rt = v(X); - { - var lt = (a) => { - var d = g(), - D = v(d); - it(D, () => t.closeIcon ?? ht), n(a, d); - }, - y = (a) => { - var d = g(), - D = v(d); - { - var k = (i) => { - Jn(i); - }; - I( - D, - (i) => { - t.closeIcon !== null && i(k); - }, - !0 - ); - } - n(a, d); - }; - I(rt, (a) => { - t.closeIcon ? a(lt) : a(y, !1); - }); - } - n(m, X); - }; - let c = b(() => { - var m; - return ((m = Q()) == null ? void 0 : m.duration) ?? zt(); - }), - x = b(() => { - var m; - return ((m = Q()) == null ? void 0 : m.class) ?? ""; - }), - T = b(() => { - var m; - return ((m = Q()) == null ? void 0 : m.descriptionClass) || ""; - }), - B = b(() => { - var m; - return ((m = Q()) == null ? void 0 : m.style) ?? ""; - }), - h = b(() => Q().classes || {}), - W = b(() => Q().unstyled ?? !1), - tt = b(() => { - var m; - return ((m = Q()) == null ? void 0 : m.cancelButtonStyle) ?? ""; - }), - Y = b(() => { - var m; - return ((m = Q()) == null ? void 0 : m.actionButtonStyle) ?? ""; - }), - j = b(() => { - var m; - return ((m = Q()) == null ? void 0 : m.closeButtonAriaLabel) ?? ut(); - }); - Un(K, { - get index() { - return e(se); - }, - get toast() { - return e(w); - }, - get defaultRichColors() { - return Lt(); - }, - get duration() { - return e(c); - }, - get class() { - return e(x); - }, - get descriptionClass() { - return e(T); - }, - get invert() { - return S(); - }, - get visibleToasts() { - return Ut(); - }, - get closeButton() { - return Bt(); - }, - get interacting() { - return e(ft); - }, - get position() { - return st; - }, - get style() { - return e(B); - }, - get classes() { - return e(h); - }, - get unstyled() { - return e(W); - }, - get cancelButtonStyle() { - return e(tt); - }, - get actionButtonStyle() { - return e(Y); - }, - get closeButtonAriaLabel() { - return e(j); - }, - get expandByDefault() { - return V(); - }, - get expanded() { - return e(E); - }, - get loadingIcon() { - return t.loadingIcon; - }, - successIcon: ye, - errorIcon: xe, - warningIcon: Ie, - infoIcon: Te, - closeIcon: s, - $$slots: { successIcon: !0, errorIcon: !0, warningIcon: !0, infoIcon: !0, closeIcon: !0 }, - }); - } - } - ), - p(yt), - Ke( - yt, - (K) => f(Dt, K), - () => e(Dt) - ), - J(() => (yt.dir = yt.dir)), - n(wt, yt); - } - ), - n(r, u); - }; - I(Wt, (r) => { - Z.toasts.length > 0 && r(oe); - }); - } - p(Pt), J(() => A(Pt, "aria-label", `${nt() ?? ""} ${e(me) ?? ""}`)), n(o, Pt), ue(); -} -var sa = et(' ', 1); -function Ta(o, t) { - de(t, !0), - pt(() => { - cn.refresh(); - let $ = setInterval(() => { - sn(); - }, 5e3); - return () => { - clearTimeout($); - }; - }); - const l = "muted"; - pt(() => { - Fe.muted = localStorage.getItem(l) === "1"; - }), - _t(() => { - { - const $ = Fe.muted; - document.querySelectorAll("audio").forEach((N) => { - N.muted = $; - }); - for (const N of Object.values(on)) (N.muted = $), $ || (N.volume = 0.3); - localStorage.setItem(l, Number($).toString()); - } - }), - pt(() => {}); - var S = sa(); - Ve("beforeunload", en, () => { - rn(); - }); - var M = v(S), - L = ot(M); - p(M); - var V = Mt(M, 2); - it(V, () => t.children); - var Bt = Mt(V, 2); - ia(Bt, { closeButton: !0, richColors: !0, position: "top-right", class: "!top-15", duration: 3e3 }), J(() => Jt(L, `Version: ${nn}`)), n(o, S), ue(); -} -export { Ta as component, Ia as universal }; diff --git a/frontend-backup/_app/immutable/chunks/07L1R_bo.js b/frontend-backup/_app/immutable/chunks/07L1R_bo.js deleted file mode 100644 index b976c45..0000000 --- a/frontend-backup/_app/immutable/chunks/07L1R_bo.js +++ /dev/null @@ -1,38 +0,0 @@ -import "./Bzak7iHL.js"; -import { p as u, f as p, t as r, b as c, c as x, s as B, d as b, r as L } from "./DUoKDNpf.js"; -import { p as Q, i as S, r as _ } from "./5NasrULQ.js"; -import { a as R, s as m, b as h } from "./B1GmkH4o.js"; -const E = - "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAABJQTFRFAQEBAAAAHGHnRcxVStlbMXLnk8SHtQAAAAF0Uk5TAEDm2GYAAABMSURBVHjadc9JCgAhDERRa7r/lZs0ikawdv+tkvEYALS07U2QawmOTo1oQBKr8/cUMLY7JLEPYLW0oISSNLtgiojRBfv0AuB67vH3B+FjAY/0rrGiAAAAAElFTkSuQmCC"; -var T = p("wplace"), - U = p('
      Wplace logo
      '); -function Y(n, e) { - u(e, !0); - let a = Q(e, "size", 3, "default"), - f = _(e, ["$$slots", "$$events", "$$legacy", "hasText", "size"]); - var t = U(); - R(t, () => ({ ...f, class: `flex items-center gap-1.5 ${e.class ?? ""}` })); - var A = b(t); - let l; - var d = B(A, 2); - { - var g = (s) => { - var i = T(); - let o; - r((v) => (o = m(i, 1, "text-base-content font-pixel", null, o, v)), [() => ({ "text-4xl": a() === "default", "text-5xl": a() === "lg" || a() === "medium" })]), c(s, i); - }; - S(d, (s) => { - e.hasText && s(g); - }); - } - L(t), - r( - (s) => { - (l = m(A, 1, "pixelated", null, l, s)), h(A, "src", E); - }, - [() => ({ "size-10": a() === "default", "size-16": a() === "medium", "size-20": a() === "lg" })] - ), - c(n, t), - x(); -} -export { Y as L }; diff --git a/frontend-backup/_app/immutable/chunks/0wx1llIh.js b/frontend-backup/_app/immutable/chunks/0wx1llIh.js new file mode 100644 index 0000000..2c69d9b --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/0wx1llIh.js @@ -0,0 +1,63 @@ +import { ac as n, H as t, z as a, L as c, ad as y } from "./CMvZtFtm.js"; +(function () { + try { + var f = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + f.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var f = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + d = new f.Error().stack; + d && + ((f._sentryDebugIds = f._sentryDebugIds || {}), + (f._sentryDebugIds[d] = "554e06f2-a09e-496d-9df0-84ac5f964ff6"), + (f._sentryDebugIdIdentifier = + "sentry-dbid-554e06f2-a09e-496d-9df0-84ac5f964ff6")); + })(); +} catch {} +function r(f, d) { + return f === d || (f == null ? void 0 : f[y]) === d; +} +function g(f = {}, d, s, b) { + return ( + n(() => { + var e, i; + return ( + t(() => { + (e = i), + (i = []), + a(() => { + f !== s(...i) && + (d(f, ...i), e && r(s(...e), f) && d(null, ...e)); + }); + }), + () => { + c(() => { + i && r(s(...i), f) && d(null, ...i); + }); + } + ); + }), + f + ); +} +export { g as b }; diff --git a/frontend-backup/_app/immutable/chunks/1lh-LSvX.js b/frontend-backup/_app/immutable/chunks/1lh-LSvX.js deleted file mode 100644 index 2c52407..0000000 --- a/frontend-backup/_app/immutable/chunks/1lh-LSvX.js +++ /dev/null @@ -1,1467 +0,0 @@ -var H = Object.defineProperty; -var R = t => { - throw TypeError(t) -}; -var z = (t, e, a) => e in t ? H(t, e, { - enumerable: !0, - configurable: !0, - writable: !0, - value: a -}) : t[e] = a; -var u = (t, e, a) => z(t, typeof e != "symbol" ? e + "" : e, a), - Y = (t, e, a) => e.has(t) || R("Cannot " + a); -var d = (t, e, a) => (Y(t, e, "read from private field"), a ? a.call(t) : e.get(t)), - g = (t, e, a) => e.has(t) ? R("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, a); -import { - aG as q, - aR as y, - A as f, - aH as _, - x as U, - aT as L -} from "./DUoKDNpf.js"; -import { - g as o -} from "./C5GsJ62f.js"; -const Nt = "files", - Gt = "0x4AAAAAABpHqZ-6i7uL0nmG", - Z = "", - qt = "0x4AAAAAABpqJe8FO0N84q0F"; -let K = q({ - dropletsDialogOpen: !1, - muted: !1, - language: W(), - captcha: void 0, - now: Date.now(), - turnstatileLoaded: !1 -}); -setInterval(() => { - K.now = Date.now() -}, 500); - -function W() { - if (navigator.languages && navigator.languages.length > 0) { - const t = navigator.languages.find(e => e.length === 2); - if (t) return t - } - return (navigator.language || navigator.userLanguage || navigator.browserLanguage || "en").substring(0, 2) -} -const Q = () => "Unexpected server error. Try again later.", - X = () => "未知错误,请稍后重试.", - s = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? Q() : X(), - ee = () => "You need to be logged in to paint", - ae = () => "请先登录", - te = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? ee() : ae(), - ne = () => "You do not have enough charges to paint. Erase some pixels.", - re = () => "没有足够的点数", - oe = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? ne() : re(), - se = t => `Error while painting: ${t.err}`, - ie = t => `错误: ${t.err}`, - ce = (t, e = {}) => (e.locale ?? o()) === "en" ? se(t) : ie(t), - le = () => "Invalid phone number", - de = () => "无效的手机号", - ue = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? le() : de(), - ge = () => "Phone already used", - me = () => "手机号已被使用", - fe = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? ge() : me(), - he = () => "You have to wait to resend a code", - _e = () => "请稍后再重发验证码", - pe = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? he() : _e(), - we = () => "Invalid code", - ye = () => "无效的验证码", - be = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? we() : ye(), - Se = () => "Operation not allowed. Maybe you have too many favorite locations.", - ve = () => "你的收藏太多了。", - Ee = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? Se() : ve(), - Te = () => "Location name is too big (max. 128 characters)", - Me = () => "名字太长了(最长128个字符)", - Pe = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? Te() : Me(), - xe = () => "Couldn't complete the purchase. This item does not exist.", - Ae = () => "无法完成购买.", - ke = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? xe() : Ae(), - Ce = () => "You do not have enough droplets to buy this item.", - Ie = () => "你没有足够的水滴购买这个物品.", - Oe = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? Ce() : Ie(), - Be = () => "You already have this item. Please refresh the page.", - De = () => "你已经有这个物品了.", - Le = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? Be() : De(), - Ne = () => "Alliance name exceeded the maximum number of characters", - Ge = () => "工会名字过长", - qe = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? Ne() : Ge(), - Re = () => "Alliance name already taken", - Ue = () => "工会名字已被占用", - je = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? Re() : Ue(), - $e = () => "Alliance with empty name", - Fe = () => "不能为空", - Ke = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? $e() : Fe(), - Je = () => "You are already in an alliance", - Ve = () => "你已经在一个工会了", - He = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? Je() : Ve(), - ze = () => "You are not allowed to do this", - Ye = () => "禁止操作", - p = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? ze() : Ye(), - Ze = () => "Can't reach the server. Maybe you are without internet connection or the server is down. Try again later", - We = () => "无法连接到服务器,可能是你的网络问题或者服务器错误,请稍后重试", - Qe = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? Ze() : We(), - Xe = () => "You or someone in your network is making a lot of requests to the server. Try again later.", - ea = () => "请求过多.", - aa = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? Xe() : ea(), - ta = () => "No internet access or the servers are offline. Try again later.", - na = () => "无法连接到服务器,可能是你的网络问题或者服务器错误,请稍后重试.", - ra = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? ta() : na(), - oa = () => "We’re currently experiencing high traffic. Some requests may not be processed at this time—please try again later. Thank you for your patience.", - sa = () => "当前服务器请求过多,一些请求会被延迟,请稍等.", - ia = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? oa() : sa(), - ca = () => "Refresh your page to get the latest update", - la = () => "刷新页面获得更新", - da = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? ca() : la(), - ua = () => "Inappropriate content", - ga = () => "创作不当内容", - ma = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? ua() : ga(), - fa = () => "+18, inappropriate link, highly suggestive content, ...", - ha = () => "色情内容,不当链接,性暗示,政治内容等", - _a = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? fa() : ha(), - pa = () => "Botting", - wa = () => "作弊", - ya = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? pa() : wa(), - ba = () => "Use of software to completely automate painting", - Sa = () => "使用脚本自动完成绘画", - va = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? ba() : Sa(), - Ea = () => "Hate speech", - Ta = () => "言论", - Ma = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? Ea() : Ta(), - Pa = () => "Racism, hate groups, ...", - xa = () => "如发表种族歧视言论、政治内容等", - Aa = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? Pa() : xa(), - ka = () => "Griefing", - Ca = () => "恶意破坏", - Ia = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? ka() : Ca(), - Oa = () => "Messed up artworks for no reason", - Ba = () => "恶意破坏他人作品", - Da = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? Oa() : Ba(), - La = () => "Doxxing", - Na = () => "传播隐私信息", - Ga = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? La() : Na(), - qa = () => "Released other's personal information without their consent", - Ra = () => "传播他人隐私信息", - Ua = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? qa() : Ra(), - ja = () => "Leaderboard is temporarily disabled", - $a = () => "排行榜已被暂时金庸", - w = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? ja() : $a(), - Fa = () => "Multi-accounting", - Ka = () => "多账号", - Ja = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? Fa() : Ka(), - Va = () => "Use more than one account to paint pixels", - Ha = () => "使用多个账号绘画", - za = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? Va() : Ha(), - Ya = t => `Your account has been banned. Reason: ${t.reason} (${t.description})`, - Za = t => `你的账户已经被封禁: ${t.reason} (${t.description})`, - Wa = (t, e = {}) => (e.locale ?? o()) === "en" ? Ya(t) : Za(t), - Qa = t => `Your account has been suspended until ${t.until}. Reason: ${t.reason} (${t.description})`, - Xa = t => `你的账户已经被临时封禁直到 ${t.until}. 原因: ${t.reason} (${t.description})`, - et = (t, e = {}) => (e.locale ?? o()) === "en" ? Qa(t) : Xa(t), - at = () => "Breaking the rules", - tt = () => "违反规则", - nt = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? at() : tt(), - rt = () => "You have broken one of Wplace's rules", - ot = () => "你违反了wplace一个或多个规则", - st = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? rt() : ot(), - it = () => "Your account has been suspended for breaking the rules", - ct = () => "你已被封禁", - lt = (t = {}, e = {}) => (e.locale ?? o()) === "en" ? it() : ct(), - language_en = (t = {}, e = {}) => (e.locale ?? o()) === "en", - dt = { - griefing: Ia(), - "multi-accounting": Ja(), - "hate-speech": Ma(), - bot: ya(), - doxxing: Ga(), - "inappropriate-content": ma(), - other: nt() - }, - ut = { - doxxing: Ua(), - "hate-speech": Aa(), - griefing: Da(), - "multi-accounting": za(), - bot: va(), - "inappropriate-content": _a(), - other: st() - }, - Rt = { - doxxing: "text-red-600", - "hate-speech": "text-red-600", - "inappropriate-content": "text-amber-600", - "multi-accounting": "text-amber-600", - bot: "text-amber-600", - griefing: "text-amber-600", - other: "text-blue-600" - }, - j = { - doxxing: 0, - "hate-speech": 1, - "inappropriate-content": 2, - bot: 3, - "multi-accounting": 4, - griefing: 5, - other: 6 - }; -class D extends Error { - constructor(e, a) { - super(e), this.message = e, this.status = a - } -} - -function gt(t, e) { - const a = {}; - for (const n of t) { - const c = e(n); - let l = a[c]; - l ? l.push(n) : a[c] = [n] - } - return a -} -const mt = [{ - tileSize: 1e3, - zoom: 11 - }], - ft = 4, - ht = 6e3, - _t = [{ - name: "Transparent", - rgb: [0, 0, 0] - }, { - name: "Black", - rgb: [0, 0, 0] - }, { - name: "Dark Gray", - rgb: [60, 60, 60] - }, { - name: "Gray", - rgb: [120, 120, 120] - }, { - name: "Light Gray", - rgb: [210, 210, 210] - }, { - name: "White", - rgb: [255, 255, 255] - }, { - name: "Deep Red", - rgb: [96, 0, 24] - }, { - name: "Red", - rgb: [237, 28, 36] - }, { - name: "Orange", - rgb: [255, 127, 39] - }, { - name: "Gold", - rgb: [246, 170, 9] - }, { - name: "Yellow", - rgb: [249, 221, 59] - }, { - name: "Light Yellow", - rgb: [255, 250, 188] - }, { - name: "Dark Green", - rgb: [14, 185, 104] - }, { - name: "Green", - rgb: [19, 230, 123] - }, { - name: "Light Green", - rgb: [135, 255, 94] - }, { - name: "Dark Teal", - rgb: [12, 129, 110] - }, { - name: "Teal", - rgb: [16, 174, 166] - }, { - name: "Light Teal", - rgb: [19, 225, 190] - }, { - name: "Dark Blue", - rgb: [40, 80, 158] - }, { - name: "Blue", - rgb: [64, 147, 228] - }, { - name: "Cyan", - rgb: [96, 247, 242] - }, { - name: "Indigo", - rgb: [107, 80, 246] - }, { - name: "Light Indigo", - rgb: [153, 177, 251] - }, { - name: "Dark Purple", - rgb: [120, 12, 153] - }, { - name: "Purple", - rgb: [170, 56, 185] - }, { - name: "Light Purple", - rgb: [224, 159, 249] - }, { - name: "Dark Pink", - rgb: [203, 0, 122] - }, { - name: "Pink", - rgb: [236, 31, 128] - }, { - name: "Light Pink", - rgb: [243, 141, 169] - }, { - name: "Dark Brown", - rgb: [104, 70, 52] - }, { - name: "Brown", - rgb: [149, 104, 42] - }, { - name: "Beige", - rgb: [248, 178, 119] - }, { - name: "Medium Gray", - rgb: [170, 170, 170] - }, { - name: "Dark Red", - rgb: [165, 14, 30] - }, { - name: "Light Red", - rgb: [250, 128, 114] - }, { - name: "Dark Orange", - rgb: [228, 92, 26] - }, { - name: "Light Tan", - rgb: [214, 181, 148] - }, { - name: "Dark Goldenrod", - rgb: [156, 132, 49] - }, { - name: "Goldenrod", - rgb: [197, 173, 49] - }, { - name: "Light Goldenrod", - rgb: [232, 212, 95] - }, { - name: "Dark Olive", - rgb: [74, 107, 58] - }, { - name: "Olive", - rgb: [90, 148, 74] - }, { - name: "Light Olive", - rgb: [132, 197, 115] - }, { - name: "Dark Cyan", - rgb: [15, 121, 159] - }, { - name: "Light Cyan", - rgb: [187, 250, 242] - }, { - name: "Light Blue", - rgb: [125, 199, 255] - }, { - name: "Dark Indigo", - rgb: [77, 49, 184] - }, { - name: "Dark Slate Blue", - rgb: [74, 66, 132] - }, { - name: "Slate Blue", - rgb: [122, 113, 196] - }, { - name: "Light Slate Blue", - rgb: [181, 174, 241] - }, { - name: "Light Brown", - rgb: [219, 164, 99] - }, { - name: "Dark Beige", - rgb: [209, 128, 81] - }, { - name: "Light Beige", - rgb: [255, 197, 165] - }, { - name: "Dark Peach", - rgb: [155, 82, 73] - }, { - name: "Peach", - rgb: [209, 128, 120] - }, { - name: "Light Peach", - rgb: [250, 182, 164] - }, { - name: "Dark Tan", - rgb: [123, 99, 82] - }, { - name: "Tan", - rgb: [156, 132, 107] - }, { - name: "Dark Slate", - rgb: [51, 57, 65] - }, { - name: "Slate", - rgb: [109, 117, 141] - }, { - name: "Light Slate", - rgb: [179, 185, 209] - }, { - name: "Dark Stone", - rgb: [109, 100, 63] - }, { - name: "Stone", - rgb: [148, 140, 107] - }, { - name: "Light Stone", - rgb: [205, 197, 158] - }, { - name: "#66CCFF", - rgb: [102, 204, 255] - }, { - name: "Aquamarine", - rgb: [91, 191, 185] - }, { - name: "Maroon", - rgb: [128, 0, 0] - }, { - name: "Crimson", - rgb: [220, 20, 60] - }, { - name: "Coral", - rgb: [255, 127, 80] - }, { - name: "Salmon", - rgb: [250, 128, 114] - }, { - name: "Khaki", - rgb: [240, 230, 140] - }, { - name: "Mustard", - rgb: [255, 219, 88] - }, { - name: "Chartreuse", - rgb: [127, 255, 0] - }, { - name: "Lime", - rgb: [191, 255, 0] - }, { - name: "Sea Green", - rgb: [46, 139, 87] - }, { - name: "Turquoise", - rgb: [64, 224, 208] - }, { - name: "Aqua", - rgb: [0, 255, 255] - }, { - name: "Sky Blue", - rgb: [135, 206, 235] - }, { - name: "Royal Blue", - rgb: [65, 105, 225] - }, { - name: "Navy", - rgb: [0, 0, 128] - }, { - name: "Lavender", - rgb: [230, 230, 250] - }, { - name: "Magenta", - rgb: [255, 0, 255] - }, { - name: "Fuchsia", - rgb: [255, 119, 255] - }, { - name: "Ivory", - rgb: [255, 255, 240] - }, { - name: "Mint", - rgb: [189, 252, 201] - }, { - name: "Rose", - rgb: [255, 102, 204] - }, { - name: "Saddle Brown", - rgb: [146, 73, 0] - }, { - name: "Burgundy", - rgb: [128, 0, 32] - }, { - name: "Amber", - rgb: [255, 191, 0] - }, { - name: "Olive Drab", - rgb: [107, 142, 35] - }, { - name: "Periwinkle", - rgb: [204, 204, 255] - }, { - name: "Cerulean", - rgb: [42, 82, 190] - }, { - name: "Viridian", - rgb: [64, 130, 109] - }, { - name: "Mauve", - rgb: [224, 176, 255] - }, { - name: "Sepia", - rgb: [112, 66, 20] - }, { - name: "Darker Blue", - rgb: [0, 0, 144] - }], - pt = { - needsPhoneVerification: "needs_phone_verification" - }, - wt = { - Droplet: {}, - "Max. Charge": {}, - "Paint Charge": {}, - Color: {}, - Flag: {}, - "Profile Picture": {} - }, - yt = { - 10: { - name: "25,000 Droplets", - price: 500, - isDollar: !0, - lookupKey: "droplets_5", - items: [{ - name: "Droplet", - amount: 25e3 - }] - }, - 20: { - name: "78,750 Droplets", - price: 1500, - isDollar: !0, - lookupKey: "droplets_15", - items: [{ - name: "Droplet", - amount: 76750 - }] - }, - 30: { - name: "165,000 Droplets", - price: 3e3, - isDollar: !0, - lookupKey: "droplets_30", - items: [{ - name: "Droplet", - amount: 165e3 - }] - }, - 40: { - name: "287,500 Droplets", - price: 5e3, - isDollar: !0, - lookupKey: "droplets_50", - items: [{ - name: "Droplet", - amount: 287500 - }] - }, - 50: { - name: "450,000 Droplets", - price: 7500, - isDollar: !0, - lookupKey: "droplets_75", - items: [{ - name: "Droplet", - amount: 45e4 - }] - }, - 60: { - name: "625,000 Droplets", - price: 1e4, - isDollar: !0, - lookupKey: "droplets_100", - items: [{ - name: "Droplet", - amount: 625e3 - }] - }, - 70: { - name: "+5 Max. Charges", - price: 500, - isDollar: !1, - items: [{ - name: "Max. Charge", - amount: 5 - }] - }, - 80: { - name: "+30 Paint Charges", - price: 500, - isDollar: !1, - items: [{ - name: "Paint Charge", - amount: 30 - }] - }, - 100: { - name: "Unlock Color", - price: 2e3, - isDollar: !1, - items: [{ - name: "Color", - amount: 1 - }] - }, - 110: { - name: "Flag", - price: 2e4, - isDollar: !1, - items: [{ - name: "Flag", - amount: 1 - }] - }, - 120: { - name: "Profile Picture", - price: 2e4, - isDollar: !1, - items: [{ - name: "Profile Picture", - amount: 1 - }] - } - }, - bt = JSON.parse(language_en() ? `[{"id":1,"name":"Afghanistan","code":"AF","flag":"🇦🇫"},{"id":2,"name":"Albania","code":"AL","flag":"🇦🇱"},{"id":3,"name":"Algeria","code":"DZ","flag":"🇩🇿"},{"id":4,"name":"American Samoa","code":"AS","flag":"🇦🇸"},{"id":5,"name":"Andorra","code":"AD","flag":"🇦🇩"},{"id":6,"name":"Angola","code":"AO","flag":"🇦🇴"},{"id":7,"name":"Anguilla","code":"AI","flag":"🇦🇮"},{"id":8,"name":"Antarctica","code":"AQ","flag":"🇦🇶"},{"id":9,"name":"Antigua and Barbuda","code":"AG","flag":"🇦🇬"},{"id":10,"name":"Argentina","code":"AR","flag":"🇦🇷"},{"id":11,"name":"Armenia","code":"AM","flag":"🇦🇲"},{"id":12,"name":"Aruba","code":"AW","flag":"🇦🇼"},{"id":13,"name":"Australia","code":"AU","flag":"🇦🇺"},{"id":14,"name":"Austria","code":"AT","flag":"🇦🇹"},{"id":15,"name":"Azerbaijan","code":"AZ","flag":"🇦🇿"},{"id":16,"name":"Bahamas","code":"BS","flag":"🇧🇸"},{"id":17,"name":"Bahrain","code":"BH","flag":"🇧🇭"},{"id":18,"name":"Bangladesh","code":"BD","flag":"🇧🇩"},{"id":19,"name":"Barbados","code":"BB","flag":"🇧🇧"},{"id":20,"name":"Belarus","code":"BY","flag":"🇧🇾"},{"id":21,"name":"Belgium","code":"BE","flag":"🇧🇪"},{"id":22,"name":"Belize","code":"BZ","flag":"🇧🇿"},{"id":23,"name":"Benin","code":"BJ","flag":"🇧🇯"},{"id":24,"name":"Bermuda","code":"BM","flag":"🇧🇲"},{"id":25,"name":"Bhutan","code":"BT","flag":"🇧🇹"},{"id":26,"name":"Bolivia","code":"BO","flag":"🇧🇴"},{"id":27,"name":"Bonaire","code":"BQ","flag":"🇧🇶"},{"id":28,"name":"Bosnia and Herzegovina","code":"BA","flag":"🇧🇦"},{"id":29,"name":"Botswana","code":"BW","flag":"🇧🇼"},{"id":30,"name":"Bouvet Island","code":"BV","flag":"🇧🇻"},{"id":31,"name":"Brazil","code":"BR","flag":"🇧🇷"},{"id":32,"name":"British Indian Ocean Territory","code":"IO","flag":"🇮🇴"},{"id":33,"name":"Brunei Darussalam","code":"BN","flag":"🇧🇳"},{"id":34,"name":"Bulgaria","code":"BG","flag":"🇧🇬"},{"id":35,"name":"Burkina Faso","code":"BF","flag":"🇧🇫"},{"id":36,"name":"Burundi","code":"BI","flag":"🇧🇮"},{"id":37,"name":"Cabo Verde","code":"CV","flag":"🇨🇻"},{"id":38,"name":"Cambodia","code":"KH","flag":"🇰🇭"},{"id":39,"name":"Cameroon","code":"CM","flag":"🇨🇲"},{"id":40,"name":"Canada","code":"CA","flag":"🇨🇦"},{"id":41,"name":"Cayman Islands","code":"KY","flag":"🇰🇾"},{"id":42,"name":"Central African Republic","code":"CF","flag":"🇨🇫"},{"id":43,"name":"Chad","code":"TD","flag":"🇹🇩"},{"id":44,"name":"Chile","code":"CL","flag":"🇨🇱"},{"id":45,"name":"China","code":"CN","flag":"🇨🇳"},{"id":46,"name":"Christmas Island","code":"CX","flag":"🇨🇽"},{"id":47,"name":"Cocos (Keeling) Islands","code":"CC","flag":"🇨🇨"},{"id":48,"name":"Colombia","code":"CO","flag":"🇨🇴"},{"id":49,"name":"Comoros","code":"KM","flag":"🇰🇲"},{"id":50,"name":"Congo","code":"CG","flag":"🇨🇬"},{"id":51,"name":"Cook Islands","code":"CK","flag":"🇨🇰"},{"id":52,"name":"Costa Rica","code":"CR","flag":"🇨🇷"},{"id":53,"name":"Croatia","code":"HR","flag":"🇭🇷"},{"id":54,"name":"Cuba","code":"CU","flag":"🇨🇺"},{"id":55,"name":"Curaçao","code":"CW","flag":"🇨🇼"},{"id":56,"name":"Cyprus","code":"CY","flag":"🇨🇾"},{"id":57,"name":"Czechia","code":"CZ","flag":"🇨🇿"},{"id":58,"name":"Côte d'Ivoire","code":"CI","flag":"🇨🇮"},{"id":59,"name":"Denmark","code":"DK","flag":"🇩🇰"},{"id":60,"name":"Djibouti","code":"DJ","flag":"🇩🇯"},{"id":61,"name":"Dominica","code":"DM","flag":"🇩🇲"},{"id":62,"name":"Dominican Republic","code":"DO","flag":"🇩🇴"},{"id":63,"name":"Ecuador","code":"EC","flag":"🇪🇨"},{"id":64,"name":"Egypt","code":"EG","flag":"🇪🇬"},{"id":65,"name":"El Salvador","code":"SV","flag":"🇸🇻"},{"id":66,"name":"Equatorial Guinea","code":"GQ","flag":"🇬🇶"},{"id":67,"name":"Eritrea","code":"ER","flag":"🇪🇷"},{"id":68,"name":"Estonia","code":"EE","flag":"🇪🇪"},{"id":69,"name":"Eswatini","code":"SZ","flag":"🇸🇿"},{"id":70,"name":"Ethiopia","code":"ET","flag":"🇪🇹"},{"id":71,"name":"Falkland Islands (Malvinas)","code":"FK","flag":"🇫🇰"},{"id":72,"name":"Faroe Islands","code":"FO","flag":"🇫🇴"},{"id":73,"name":"Fiji","code":"FJ","flag":"🇫🇯"},{"id":74,"name":"Finland","code":"FI","flag":"🇫🇮"},{"id":75,"name":"France","code":"FR","flag":"🇫🇷"},{"id":76,"name":"French Guiana","code":"GF","flag":"🇬🇫"},{"id":77,"name":"French Polynesia","code":"PF","flag":"🇵🇫"},{"id":78,"name":"French Southern Territories","code":"TF","flag":"🇹🇫"},{"id":79,"name":"Gabon","code":"GA","flag":"🇬🇦"},{"id":80,"name":"Gambia","code":"GM","flag":"🇬🇲"},{"id":81,"name":"Georgia","code":"GE","flag":"🇬🇪"},{"id":82,"name":"Germany","code":"DE","flag":"🇩🇪"},{"id":83,"name":"Ghana","code":"GH","flag":"🇬🇭"},{"id":84,"name":"Gibraltar","code":"GI","flag":"🇬🇮"},{"id":85,"name":"Greece","code":"GR","flag":"🇬🇷"},{"id":86,"name":"Greenland","code":"GL","flag":"🇬🇱"},{"id":87,"name":"Grenada","code":"GD","flag":"🇬🇩"},{"id":88,"name":"Guadeloupe","code":"GP","flag":"🇬🇵"},{"id":89,"name":"Guam","code":"GU","flag":"🇬🇺"},{"id":90,"name":"Guatemala","code":"GT","flag":"🇬🇹"},{"id":91,"name":"Guernsey","code":"GG","flag":"🇬🇬"},{"id":92,"name":"Guinea","code":"GN","flag":"🇬🇳"},{"id":93,"name":"Guinea-Bissau","code":"GW","flag":"🇬🇼"},{"id":94,"name":"Guyana","code":"GY","flag":"🇬🇾"},{"id":95,"name":"Haiti","code":"HT","flag":"🇭🇹"},{"id":96,"name":"Heard Island and McDonald Islands","code":"HM","flag":"🇭🇲"},{"id":97,"name":"Honduras","code":"HN","flag":"🇭🇳"},{"id":98,"name":"Hong Kong","code":"HK","flag":"🇭🇰"},{"id":99,"name":"Hungary","code":"HU","flag":"🇭🇺"},{"id":100,"name":"Iceland","code":"IS","flag":"🇮🇸"},{"id":101,"name":"India","code":"IN","flag":"🇮🇳"},{"id":102,"name":"Indonesia","code":"ID","flag":"🇮🇩"},{"id":103,"name":"Iran","code":"IR","flag":"🇮🇷"},{"id":104,"name":"Iraq","code":"IQ","flag":"🇮🇶"},{"id":105,"name":"Ireland","code":"IE","flag":"🇮🇪"},{"id":106,"name":"Isle of Man","code":"IM","flag":"🇮🇲"},{"id":107,"name":"Israel","code":"IL","flag":"🇮🇱"},{"id":108,"name":"Italy","code":"IT","flag":"🇮🇹"},{"id":109,"name":"Jamaica","code":"JM","flag":"🇯🇲"},{"id":110,"name":"Japan","code":"JP","flag":"🇯🇵"},{"id":111,"name":"Jersey","code":"JE","flag":"🇯🇪"},{"id":112,"name":"Jordan","code":"JO","flag":"🇯🇴"},{"id":113,"name":"Kazakhstan","code":"KZ","flag":"🇰🇿"},{"id":114,"name":"Kenya","code":"KE","flag":"🇰🇪"},{"id":115,"name":"Kiribati","code":"KI","flag":"🇰🇮"},{"id":116,"name":"Kosovo","code":"XK","flag":"🇽🇰"},{"id":117,"name":"Kuwait","code":"KW","flag":"🇰🇼"},{"id":118,"name":"Kyrgyzstan","code":"KG","flag":"🇰🇬"},{"id":119,"name":"Laos","code":"LA","flag":"🇱🇦"},{"id":120,"name":"Latvia","code":"LV","flag":"🇱🇻"},{"id":121,"name":"Lebanon","code":"LB","flag":"🇱🇧"},{"id":122,"name":"Lesotho","code":"LS","flag":"🇱🇸"},{"id":123,"name":"Liberia","code":"LR","flag":"🇱🇷"},{"id":124,"name":"Libya","code":"LY","flag":"🇱🇾"},{"id":125,"name":"Liechtenstein","code":"LI","flag":"🇱🇮"},{"id":126,"name":"Lithuania","code":"LT","flag":"🇱🇹"},{"id":127,"name":"Luxembourg","code":"LU","flag":"🇱🇺"},{"id":128,"name":"Macao","code":"MO","flag":"🇲🇴"},{"id":129,"name":"Madagascar","code":"MG","flag":"🇲🇬"},{"id":130,"name":"Malawi","code":"MW","flag":"🇲🇼"},{"id":131,"name":"Malaysia","code":"MY","flag":"🇲🇾"},{"id":132,"name":"Maldives","code":"MV","flag":"🇲🇻"},{"id":133,"name":"Mali","code":"ML","flag":"🇲🇱"},{"id":134,"name":"Malta","code":"MT","flag":"🇲🇹"},{"id":135,"name":"Marshall Islands","code":"MH","flag":"🇲🇭"},{"id":136,"name":"Martinique","code":"MQ","flag":"🇲🇶"},{"id":137,"name":"Mauritania","code":"MR","flag":"🇲🇷"},{"id":138,"name":"Mauritius","code":"MU","flag":"🇲🇺"},{"id":139,"name":"Mayotte","code":"YT","flag":"🇾🇹"},{"id":140,"name":"Mexico","code":"MX","flag":"🇲🇽"},{"id":141,"name":"Micronesia","code":"FM","flag":"🇫🇲"},{"id":142,"name":"Moldova","code":"MD","flag":"🇲🇩"},{"id":143,"name":"Monaco","code":"MC","flag":"🇲🇨"},{"id":144,"name":"Mongolia","code":"MN","flag":"🇲🇳"},{"id":145,"name":"Montenegro","code":"ME","flag":"🇲🇪"},{"id":146,"name":"Montserrat","code":"MS","flag":"🇲🇸"},{"id":147,"name":"Morocco","code":"MA","flag":"🇲🇦"},{"id":148,"name":"Mozambique","code":"MZ","flag":"🇲🇿"},{"id":149,"name":"Myanmar","code":"MM","flag":"🇲🇲"},{"id":150,"name":"Namibia","code":"NA","flag":"🇳🇦"},{"id":151,"name":"Nauru","code":"NR","flag":"🇳🇷"},{"id":152,"name":"Nepal","code":"NP","flag":"🇳🇵"},{"id":153,"name":"Netherlands","code":"NL","flag":"🇳🇱"},{"id":154,"name":"New Caledonia","code":"NC","flag":"🇳🇨"},{"id":155,"name":"New Zealand","code":"NZ","flag":"🇳🇿"},{"id":156,"name":"Nicaragua","code":"NI","flag":"🇳🇮"},{"id":157,"name":"Niger","code":"NE","flag":"🇳🇪"},{"id":158,"name":"Nigeria","code":"NG","flag":"🇳🇬"},{"id":159,"name":"Niue","code":"NU","flag":"🇳🇺"},{"id":160,"name":"Norfolk Island","code":"NF","flag":"🇳🇫"},{"id":161,"name":"North Korea","code":"KP","flag":"🇰🇵"},{"id":162,"name":"North Macedonia","code":"MK","flag":"🇲🇰"},{"id":163,"name":"Northern Mariana Islands","code":"MP","flag":"🇲🇵"},{"id":164,"name":"Norway","code":"NO","flag":"🇳🇴"},{"id":165,"name":"Oman","code":"OM","flag":"🇴🇲"},{"id":166,"name":"Pakistan","code":"PK","flag":"🇵🇰"},{"id":167,"name":"Palau","code":"PW","flag":"🇵🇼"},{"id":168,"name":"Palestine","code":"PS","flag":"🇵🇸"},{"id":169,"name":"Panama","code":"PA","flag":"🇵🇦"},{"id":170,"name":"Papua New Guinea","code":"PG","flag":"🇵🇬"},{"id":171,"name":"Paraguay","code":"PY","flag":"🇵🇾"},{"id":172,"name":"Peru","code":"PE","flag":"🇵🇪"},{"id":173,"name":"Philippines","code":"PH","flag":"🇵🇭"},{"id":174,"name":"Pitcairn","code":"PN","flag":"🇵🇳"},{"id":175,"name":"Poland","code":"PL","flag":"🇵🇱"},{"id":176,"name":"Portugal","code":"PT","flag":"🇵🇹"},{"id":177,"name":"Puerto Rico","code":"PR","flag":"🇵🇷"},{"id":178,"name":"Qatar","code":"QA","flag":"🇶🇦"},{"id":179,"name":"Republic of the Congo","code":"CD","flag":"🇨🇩"},{"id":180,"name":"Romania","code":"RO","flag":"🇷🇴"},{"id":181,"name":"Russia","code":"RU","flag":"🇷🇺"},{"id":182,"name":"Rwanda","code":"RW","flag":"🇷🇼"},{"id":183,"name":"Réunion","code":"RE","flag":"🇷🇪"},{"id":184,"name":"Saint Barthélemy","code":"BL","flag":"🇧🇱"},{"id":185,"name":"Saint Helena","code":"SH","flag":"🇸🇭"},{"id":186,"name":"Saint Kitts and Nevis","code":"KN","flag":"🇰🇳"},{"id":187,"name":"Saint Lucia","code":"LC","flag":"🇱🇨"},{"id":188,"name":"Saint Martin (French part)","code":"MF","flag":"🇲🇫"},{"id":189,"name":"Saint Pierre and Miquelon","code":"PM","flag":"🇵🇲"},{"id":190,"name":"Saint Vincent and the Grenadines","code":"VC","flag":"🇻🇨"},{"id":191,"name":"Samoa","code":"WS","flag":"🇼🇸"},{"id":192,"name":"San Marino","code":"SM","flag":"🇸🇲"},{"id":193,"name":"Sao Tome and Principe","code":"ST","flag":"🇸🇹"},{"id":194,"name":"Saudi Arabia","code":"SA","flag":"🇸🇦"},{"id":195,"name":"Senegal","code":"SN","flag":"🇸🇳"},{"id":196,"name":"Serbia","code":"RS","flag":"🇷🇸"},{"id":197,"name":"Seychelles","code":"SC","flag":"🇸🇨"},{"id":198,"name":"Sierra Leone","code":"SL","flag":"🇸🇱"},{"id":199,"name":"Singapore","code":"SG","flag":"🇸🇬"},{"id":200,"name":"Sint Maarten (Dutch part)","code":"SX","flag":"🇸🇽"},{"id":201,"name":"Slovakia","code":"SK","flag":"🇸🇰"},{"id":202,"name":"Slovenia","code":"SI","flag":"🇸🇮"},{"id":203,"name":"Solomon Islands","code":"SB","flag":"🇸🇧"},{"id":204,"name":"Somalia","code":"SO","flag":"🇸🇴"},{"id":205,"name":"South Africa","code":"ZA","flag":"🇿🇦"},{"id":206,"name":"South Georgia and the South Sandwich Islands","code":"GS","flag":"🇬🇸"},{"id":207,"name":"South Korea","code":"KR","flag":"🇰🇷"},{"id":208,"name":"South Sudan","code":"SS","flag":"🇸🇸"},{"id":209,"name":"Spain","code":"ES","flag":"🇪🇸"},{"id":210,"name":"Sri Lanka","code":"LK","flag":"🇱🇰"},{"id":211,"name":"Sudan","code":"SD","flag":"🇸🇩"},{"id":212,"name":"Suriname","code":"SR","flag":"🇸🇷"},{"id":213,"name":"Svalbard and Jan Mayen","code":"SJ","flag":"🇸🇯"},{"id":214,"name":"Sweden","code":"SE","flag":"🇸🇪"},{"id":215,"name":"Switzerland","code":"CH","flag":"🇨🇭"},{"id":216,"name":"Syrian Arab Republic","code":"SY","flag":"🇸🇾"},{"id":217,"name":"Taiwan Province of China","code":"TW","flag":"🇨🇳"},{"id":218,"name":"Tajikistan","code":"TJ","flag":"🇹🇯"},{"id":219,"name":"Tanzania","code":"TZ","flag":"🇹🇿"},{"id":220,"name":"Thailand","code":"TH","flag":"🇹🇭"},{"id":221,"name":"Timor-Leste","code":"TL","flag":"🇹🇱"},{"id":222,"name":"Togo","code":"TG","flag":"🇹🇬"},{"id":223,"name":"Tokelau","code":"TK","flag":"🇹🇰"},{"id":224,"name":"Tonga","code":"TO","flag":"🇹🇴"},{"id":225,"name":"Trinidad and Tobago","code":"TT","flag":"🇹🇹"},{"id":226,"name":"Tunisia","code":"TN","flag":"🇹🇳"},{"id":227,"name":"Turkmenistan","code":"TM","flag":"🇹🇲"},{"id":228,"name":"Turks and Caicos Islands","code":"TC","flag":"🇹🇨"},{"id":229,"name":"Tuvalu","code":"TV","flag":"🇹🇻"},{"id":230,"name":"Türkiye","code":"TR","flag":"🇹🇷"},{"id":231,"name":"Uganda","code":"UG","flag":"🇺🇬"},{"id":232,"name":"Ukraine","code":"UA","flag":"🇺🇦"},{"id":233,"name":"United Arab Emirates","code":"AE","flag":"🇦🇪"},{"id":234,"name":"United Kingdom","code":"GB","flag":"🇬🇧"},{"id":235,"name":"United States","code":"US","flag":"🇺🇸"},{"id":236,"name":"United States Minor Outlying Islands","code":"UM","flag":"🇺🇲"},{"id":237,"name":"Uruguay","code":"UY","flag":"🇺🇾"},{"id":238,"name":"Uzbekistan","code":"UZ","flag":"🇺🇿"},{"id":239,"name":"Vanuatu","code":"VU","flag":"🇻🇺"},{"id":240,"name":"Vatican City","code":"VA","flag":"🇻🇦"},{"id":241,"name":"Venezuela","code":"VE","flag":"🇻🇪"},{"id":242,"name":"Viet Nam","code":"VN","flag":"🇻🇳"},{"id":243,"name":"Virgin Islands","code":"VG","flag":"🇻🇬"},{"id":244,"name":"Virgin Islands","code":"VI","flag":"🇻🇮"},{"id":245,"name":"Wallis and Futuna","code":"WF","flag":"🇼🇫"},{"id":246,"name":"Western Sahara","code":"EH","flag":"🇪🇭"},{"id":247,"name":"Yemen","code":"YE","flag":"🇾🇪"},{"id":248,"name":"Zambia","code":"ZM","flag":"🇿🇲"},{"id":249,"name":"Zimbabwe","code":"ZW","flag":"🇿🇼"},{"id":250,"name":"Åland Islands","code":"AX","flag":"🇦🇽"},{"id":251,"name":"Canary Islands","code":"IC","flag":"🇮🇨"}]` : `[{"id":1,"name":"阿富汗","code":"AF","flag":"🇦🇫"},{"id":2,"name":"阿尔巴尼亚","code":"AL","flag":"🇦🇱"},{"id":3,"name":"阿尔及利亚","code":"DZ","flag":"🇩🇿"},{"id":4,"name":"美属萨摩亚","code":"AS","flag":"🇦🇸"},{"id":5,"name":"安道尔","code":"AD","flag":"🇦🇩"},{"id":6,"name":"安哥拉","code":"AO","flag":"🇦🇴"},{"id":7,"name":"安圭拉","code":"AI","flag":"🇦🇮"},{"id":8,"name":"南极洲","code":"AQ","flag":"🇦🇶"},{"id":9,"name":"安提瓜和巴布达","code":"AG","flag":"🇦🇬"},{"id":10,"name":"阿根廷","code":"AR","flag":"🇦🇷"},{"id":11,"name":"亚美尼亚","code":"AM","flag":"🇦🇲"},{"id":12,"name":"阿鲁巴","code":"AW","flag":"🇦🇼"},{"id":13,"name":"澳大利亚","code":"AU","flag":"🇦🇺"},{"id":14,"name":"奥地利","code":"AT","flag":"🇦🇹"},{"id":15,"name":"阿塞拜疆","code":"AZ","flag":"🇦🇿"},{"id":16,"name":"巴哈马","code":"BS","flag":"🇧🇸"},{"id":17,"name":"巴林","code":"BH","flag":"🇧🇭"},{"id":18,"name":"孟加拉国","code":"BD","flag":"🇧🇩"},{"id":19,"name":"巴巴多斯","code":"BB","flag":"🇧🇧"},{"id":20,"name":"白俄罗斯","code":"BY","flag":"🇧🇾"},{"id":21,"name":"比利时","code":"BE","flag":"🇧🇪"},{"id":22,"name":"伯利兹","code":"BZ","flag":"🇧🇿"},{"id":23,"name":"贝宁","code":"BJ","flag":"🇧🇯"},{"id":24,"name":"百慕大","code":"BM","flag":"🇧🇲"},{"id":25,"name":"不丹","code":"BT","flag":"🇧🇹"},{"id":26,"name":"玻利维亚","code":"BO","flag":"🇧🇴"},{"id":27,"name":"荷兰加勒比区","code":"BQ","flag":"🇧🇶"},{"id":28,"name":"波黑","code":"BA","flag":"🇧🇦"},{"id":29,"name":"博茨瓦纳","code":"BW","flag":"🇧🇼"},{"id":30,"name":"布韦岛","code":"BV","flag":"🇧🇻"},{"id":31,"name":"巴西","code":"BR","flag":"🇧🇷"},{"id":32,"name":"英属印度洋领地","code":"IO","flag":"🇮🇴"},{"id":33,"name":"文莱","code":"BN","flag":"🇧🇳"},{"id":34,"name":"保加利亚","code":"BG","flag":"🇧🇬"},{"id":35,"name":"布基纳法索","code":"BF","flag":"🇧🇫"},{"id":36,"name":"布隆迪","code":"BI","flag":"🇧🇮"},{"id":37,"name":"佛得角","code":"CV","flag":"🇨🇻"},{"id":38,"name":"柬埔寨","code":"KH","flag":"🇰🇭"},{"id":39,"name":"喀麦隆","code":"CM","flag":"🇨🇲"},{"id":40,"name":"加拿大","code":"CA","flag":"🇨🇦"},{"id":41,"name":"开曼群岛","code":"KY","flag":"🇰🇾"},{"id":42,"name":"中非","code":"CF","flag":"🇨🇫"},{"id":43,"name":"乍得","code":"TD","flag":"🇹🇩"},{"id":44,"name":"智利","code":"CL","flag":"🇨🇱"},{"id":45,"name":"中国","code":"CN","flag":"🇨🇳"},{"id":46,"name":"圣诞岛","code":"CX","flag":"🇨🇽"},{"id":47,"name":"科科斯(基林)群岛","code":"CC","flag":"🇨🇨"},{"id":48,"name":"哥伦比亚","code":"CO","flag":"🇨🇴"},{"id":49,"name":"科摩罗","code":"KM","flag":"🇰🇲"},{"id":50,"name":"刚果(布)","code":"CG","flag":"🇨🇬"},{"id":51,"name":"库克群岛","code":"CK","flag":"🇨🇰"},{"id":52,"name":"哥斯达黎加","code":"CR","flag":"🇨🇷"},{"id":53,"name":"克罗地亚","code":"HR","flag":"🇭🇷"},{"id":54,"name":"古巴","code":"CU","flag":"🇨🇺"},{"id":55,"name":"库拉索","code":"CW","flag":"🇨🇼"},{"id":56,"name":"塞浦路斯","code":"CY","flag":"🇨🇾"},{"id":57,"name":"捷克","code":"CZ","flag":"🇨🇿"},{"id":58,"name":"科特迪瓦","code":"CI","flag":"🇨🇮"},{"id":59,"name":"丹麦","code":"DK","flag":"🇩🇰"},{"id":60,"name":"吉布提","code":"DJ","flag":"🇩🇯"},{"id":61,"name":"多米尼克","code":"DM","flag":"🇩🇲"},{"id":62,"name":"多米尼加","code":"DO","flag":"🇩🇴"},{"id":63,"name":"厄瓜多尔","code":"EC","flag":"🇪🇨"},{"id":64,"name":"埃及","code":"EG","flag":"🇪🇬"},{"id":65,"name":"萨尔瓦多","code":"SV","flag":"🇸🇻"},{"id":66,"name":"赤道几内亚","code":"GQ","flag":"🇬🇶"},{"id":67,"name":"厄立特里亚","code":"ER","flag":"🇪🇷"},{"id":68,"name":"爱沙尼亚","code":"EE","flag":"🇪🇪"},{"id":69,"name":"斯威士兰","code":"SZ","flag":"🇸🇿"},{"id":70,"name":"埃塞俄比亚","code":"ET","flag":"🇪🇹"},{"id":71,"name":"福克兰群岛","code":"FK","flag":"🇫🇰"},{"id":72,"name":"法罗群岛","code":"FO","flag":"🇫🇴"},{"id":73,"name":"斐济","code":"FJ","flag":"🇫🇯"},{"id":74,"name":"芬兰","code":"FI","flag":"🇫🇮"},{"id":75,"name":"法国","code":"FR","flag":"🇫🇷"},{"id":76,"name":"法属圭亚那","code":"GF","flag":"🇬🇫"},{"id":77,"name":"法属波利尼西亚","code":"PF","flag":"🇵🇫"},{"id":78,"name":"法属南部领地","code":"TF","flag":"🇹🇫"},{"id":79,"name":"加蓬","code":"GA","flag":"🇬🇦"},{"id":80,"name":"冈比亚","code":"GM","flag":"🇬🇲"},{"id":81,"name":"格鲁吉亚","code":"GE","flag":"🇬🇪"},{"id":82,"name":"德国","code":"DE","flag":"🇩🇪"},{"id":83,"name":"加纳","code":"GH","flag":"🇬🇭"},{"id":84,"name":"直布罗陀","code":"GI","flag":"🇬🇮"},{"id":85,"name":"希腊","code":"GR","flag":"🇬🇷"},{"id":86,"name":"格陵兰","code":"GL","flag":"🇬🇱"},{"id":87,"name":"格林纳达","code":"GD","flag":"🇬🇩"},{"id":88,"name":"瓜德罗普","code":"GP","flag":"🇬🇵"},{"id":89,"name":"关岛","code":"GU","flag":"🇬🇺"},{"id":90,"name":"危地马拉","code":"GT","flag":"🇬🇹"},{"id":91,"name":"根西","code":"GG","flag":"🇬🇬"},{"id":92,"name":"几内亚","code":"GN","flag":"🇬🇳"},{"id":93,"name":"几内亚比绍","code":"GW","flag":"🇬🇼"},{"id":94,"name":"圭亚那","code":"GY","flag":"🇬🇾"},{"id":95,"name":"海地","code":"HT","flag":"🇭🇹"},{"id":96,"name":"赫德岛和麦克唐纳群岛","code":"HM","flag":"🇭🇲"},{"id":97,"name":"洪都拉斯","code":"HN","flag":"🇭🇳"},{"id":98,"name":"中国香港","code":"HK","flag":"🇭🇰"},{"id":99,"name":"匈牙利","code":"HU","flag":"🇭🇺"},{"id":100,"name":"冰岛","code":"IS","flag":"🇮🇸"},{"id":101,"name":"印度","code":"IN","flag":"🇮🇳"},{"id":102,"name":"印尼","code":"ID","flag":"🇮🇩"},{"id":103,"name":"伊朗","code":"IR","flag":"🇮🇷"},{"id":104,"name":"伊拉克","code":"IQ","flag":"🇮🇶"},{"id":105,"name":"爱尔兰","code":"IE","flag":"🇮🇪"},{"id":106,"name":"马恩岛","code":"IM","flag":"🇮🇲"},{"id":107,"name":"以色列","code":"IL","flag":"🇮🇱"},{"id":108,"name":"意大利","code":"IT","flag":"🇮🇹"},{"id":109,"name":"牙买加","code":"JM","flag":"🇯🇲"},{"id":110,"name":"日本","code":"JP","flag":"🇯🇵"},{"id":111,"name":"泽西","code":"JE","flag":"🇯🇪"},{"id":112,"name":"约旦","code":"JO","flag":"🇯🇴"},{"id":113,"name":"哈萨克斯坦","code":"KZ","flag":"🇰🇿"},{"id":114,"name":"肯尼亚","code":"KE","flag":"🇰🇪"},{"id":115,"name":"基里巴斯","code":"KI","flag":"🇰🇮"},{"id":116,"name":"科索沃","code":"XK","flag":"🇽🇰"},{"id":117,"name":"科威特","code":"KW","flag":"🇰🇼"},{"id":118,"name":"吉尔吉斯斯坦","code":"KG","flag":"🇰🇬"},{"id":119,"name":"老挝","code":"LA","flag":"🇱🇦"},{"id":120,"name":"拉脱维亚","code":"LV","flag":"🇱🇻"},{"id":121,"name":"黎巴嫩","code":"LB","flag":"🇱🇧"},{"id":122,"name":"莱索托","code":"LS","flag":"🇱🇸"},{"id":123,"name":"利比里亚","code":"LR","flag":"🇱🇷"},{"id":124,"name":"利比亚","code":"LY","flag":"🇱🇾"},{"id":125,"name":"列支敦士登","code":"LI","flag":"🇱🇮"},{"id":126,"name":"立陶宛","code":"LT","flag":"🇱🇹"},{"id":127,"name":"卢森堡","code":"LU","flag":"🇱🇺"},{"id":128,"name":"中国澳门","code":"MO","flag":"🇲🇴"},{"id":129,"name":"马达加斯加","code":"MG","flag":"🇲🇬"},{"id":130,"name":"马拉维","code":"MW","flag":"🇲🇼"},{"id":131,"name":"马来西亚","code":"MY","flag":"🇲🇾"},{"id":132,"name":"马尔代夫","code":"MV","flag":"🇲🇻"},{"id":133,"name":"马里","code":"ML","flag":"🇲🇱"},{"id":134,"name":"马耳他","code":"MT","flag":"🇲🇹"},{"id":135,"name":"马绍尔群岛","code":"MH","flag":"🇲🇭"},{"id":136,"name":"马提尼克","code":"MQ","flag":"🇲🇶"},{"id":137,"name":"毛里塔尼亚","code":"MR","flag":"🇲🇷"},{"id":138,"name":"毛里求斯","code":"MU","flag":"🇲🇺"},{"id":139,"name":"马约特","code":"YT","flag":"🇾🇹"},{"id":140,"name":"墨西哥","code":"MX","flag":"🇲🇽"},{"id":141,"name":"密克罗尼西亚联邦","code":"FM","flag":"🇫🇲"},{"id":142,"name":"摩尔多瓦","code":"MD","flag":"🇲🇩"},{"id":143,"name":"摩纳哥","code":"MC","flag":"🇲🇨"},{"id":144,"name":"蒙古","code":"MN","flag":"🇲🇳"},{"id":145,"name":"黑山","code":"ME","flag":"🇲🇪"},{"id":146,"name":"蒙特塞拉特","code":"MS","flag":"🇲🇸"},{"id":147,"name":"摩洛哥","code":"MA","flag":"🇲🇦"},{"id":148,"name":"莫桑比克","code":"MZ","flag":"🇲🇿"},{"id":149,"name":"缅甸","code":"MM","flag":"🇲🇲"},{"id":150,"name":"纳米比亚","code":"NA","flag":"🇳🇦"},{"id":151,"name":"瑙鲁","code":"NR","flag":"🇳🇷"},{"id":152,"name":"尼泊尔","code":"NP","flag":"🇳🇵"},{"id":153,"name":"荷兰","code":"NL","flag":"🇳🇱"},{"id":154,"name":"新喀里多尼亚","code":"NC","flag":"🇳🇨"},{"id":155,"name":"新西兰","code":"NZ","flag":"🇳🇿"},{"id":156,"name":"尼加拉瓜","code":"NI","flag":"🇳🇮"},{"id":157,"name":"尼日尔","code":"NE","flag":"🇳🇪"},{"id":158,"name":"尼日利亚","code":"NG","flag":"🇳🇬"},{"id":159,"name":"纽埃","code":"NU","flag":"🇳🇺"},{"id":160,"name":"诺福克岛","code":"NF","flag":"🇳🇫"},{"id":161,"name":"朝鲜","code":"KP","flag":"🇰🇵"},{"id":162,"name":"北马其顿","code":"MK","flag":"🇲🇰"},{"id":163,"name":"北马里亚纳群岛","code":"MP","flag":"🇲🇵"},{"id":164,"name":"挪威","code":"NO","flag":"🇳🇴"},{"id":165,"name":"阿曼","code":"OM","flag":"🇴🇲"},{"id":166,"name":"巴基斯坦","code":"PK","flag":"🇵🇰"},{"id":167,"name":"帕劳","code":"PW","flag":"🇵🇼"},{"id":168,"name":"巴勒斯坦","code":"PS","flag":"🇵🇸"},{"id":169,"name":"巴拿马","code":"PA","flag":"🇵🇦"},{"id":170,"name":"巴布亚新几内亚","code":"PG","flag":"🇵🇬"},{"id":171,"name":"巴拉圭","code":"PY","flag":"🇵🇾"},{"id":172,"name":"秘鲁","code":"PE","flag":"🇵🇪"},{"id":173,"name":"菲律宾","code":"PH","flag":"🇵🇭"},{"id":174,"name":"皮特凯恩群岛","code":"PN","flag":"🇵🇳"},{"id":175,"name":"波兰","code":"PL","flag":"🇵🇱"},{"id":176,"name":"葡萄牙","code":"PT","flag":"🇵🇹"},{"id":177,"name":"波多黎各","code":"PR","flag":"🇵🇷"},{"id":178,"name":"卡塔尔","code":"QA","flag":"🇶🇦"},{"id":179,"name":"刚果(金)","code":"CD","flag":"🇨🇩"},{"id":180,"name":"罗马尼亚","code":"RO","flag":"🇷🇴"},{"id":181,"name":"俄罗斯","code":"RU","flag":"🇷🇺"},{"id":182,"name":"卢旺达","code":"RW","flag":"🇷🇼"},{"id":183,"name":"留尼汪","code":"RE","flag":"🇷🇪"},{"id":184,"name":"圣巴泰勒米","code":"BL","flag":"🇧🇱"},{"id":185,"name":"圣赫勒拿、阿森松和特里斯坦-达库尼亚","code":"SH","flag":"🇸🇭"},{"id":186,"name":"圣基茨和尼维斯","code":"KN","flag":"🇰🇳"},{"id":187,"name":"圣卢西亚","code":"LC","flag":"🇱🇨"},{"id":188,"name":"法属圣马丁","code":"MF","flag":"🇲🇫"},{"id":189,"name":"圣皮埃尔和密克隆","code":"PM","flag":"🇵🇲"},{"id":190,"name":"圣文森特和格林纳丁斯","code":"VC","flag":"🇻🇨"},{"id":191,"name":"萨摩亚","code":"WS","flag":"🇼🇸"},{"id":192,"name":"圣马力诺","code":"SM","flag":"🇸🇲"},{"id":193,"name":"圣多美和普林西比","code":"ST","flag":"🇸🇹"},{"id":194,"name":"沙特阿拉伯","code":"SA","flag":"🇸🇦"},{"id":195,"name":"塞内加尔","code":"SN","flag":"🇸🇳"},{"id":196,"name":"塞尔维亚","code":"RS","flag":"🇷🇸"},{"id":197,"name":"塞舌尔","code":"SC","flag":"🇸🇨"},{"id":198,"name":"塞拉利昂","code":"SL","flag":"🇸🇱"},{"id":199,"name":"新加坡","code":"SG","flag":"🇸🇬"},{"id":200,"name":"荷属圣马丁","code":"SX","flag":"🇸🇽"},{"id":201,"name":"斯洛伐克","code":"SK","flag":"🇸🇰"},{"id":202,"name":"斯洛文尼亚","code":"SI","flag":"🇸🇮"},{"id":203,"name":"所罗门群岛","code":"SB","flag":"🇸🇧"},{"id":204,"name":"索马里","code":"SO","flag":"🇸🇴"},{"id":205,"name":"南非","code":"ZA","flag":"🇿🇦"},{"id":206,"name":"南乔治亚和南桑威奇群岛","code":"GS","flag":"🇬🇸"},{"id":207,"name":"韩国","code":"KR","flag":"🇰🇷"},{"id":208,"name":"南苏丹","code":"SS","flag":"🇸🇸"},{"id":209,"name":"西班牙","code":"ES","flag":"🇪🇸"},{"id":210,"name":"斯里兰卡","code":"LK","flag":"🇱🇰"},{"id":211,"name":"苏丹","code":"SD","flag":"🇸🇩"},{"id":212,"name":"苏里南","code":"SR","flag":"🇸🇷"},{"id":213,"name":"斯瓦尔巴和扬马延","code":"SJ","flag":"🇸🇯"},{"id":214,"name":"瑞典","code":"SE","flag":"🇸🇪"},{"id":215,"name":"瑞士","code":"CH","flag":"🇨🇭"},{"id":216,"name":"叙利亚","code":"SY","flag":"🇸🇾"},{"id":217,"name":"中国台湾","code":"TW","flag":"🇨🇳"},{"id":218,"name":"塔吉克斯坦","code":"TJ","flag":"🇹🇯"},{"id":219,"name":"坦桑尼亚","code":"TZ","flag":"🇹🇿"},{"id":220,"name":"泰国","code":"TH","flag":"🇹🇭"},{"id":221,"name":"东帝汶","code":"TL","flag":"🇹🇱"},{"id":222,"name":"多哥","code":"TG","flag":"🇹🇬"},{"id":223,"name":"托克劳","code":"TK","flag":"🇹🇰"},{"id":224,"name":"汤加","code":"TO","flag":"🇹🇴"},{"id":225,"name":"特立尼达和多巴哥","code":"TT","flag":"🇹🇹"},{"id":226,"name":"突尼斯","code":"TN","flag":"🇹🇳"},{"id":227,"name":"土库曼斯坦","code":"TM","flag":"🇹🇲"},{"id":228,"name":"特克斯和凯科斯群岛","code":"TC","flag":"🇹🇨"},{"id":229,"name":"图瓦卢","code":"TV","flag":"🇹🇻"},{"id":230,"name":"土耳其","code":"TR","flag":"🇹🇷"},{"id":231,"name":"乌干达","code":"UG","flag":"🇺🇬"},{"id":232,"name":"乌克兰","code":"UA","flag":"🇺🇦"},{"id":233,"name":"阿联酋","code":"AE","flag":"🇦🇪"},{"id":234,"name":"英国","code":"GB","flag":"🇬🇧"},{"id":235,"name":"美国","code":"US","flag":"🇺🇸"},{"id":236,"name":"美国本土外小岛屿","code":"UM","flag":"🇺🇲"},{"id":237,"name":"乌拉圭","code":"UY","flag":"🇺🇾"},{"id":238,"name":"乌兹别克斯坦","code":"UZ","flag":"🇺🇿"},{"id":239,"name":"瓦努阿图","code":"VU","flag":"🇻🇺"},{"id":240,"name":"梵蒂冈","code":"VA","flag":"🇻🇦"},{"id":241,"name":"委内瑞拉","code":"VE","flag":"🇻🇪"},{"id":242,"name":"越南","code":"VN","flag":"🇻🇳"},{"id":243,"name":"英属维尔京群岛","code":"VG","flag":"🇻🇬"},{"id":244,"name":"美属维尔京群岛","code":"VI","flag":"🇻🇮"},{"id":245,"name":"瓦利斯和富图纳","code":"WF","flag":"🇼🇫"},{"id":246,"name":"阿拉伯撒哈拉民主共和国","code":"EH","flag":"🇪🇭"},{"id":247,"name":"也门","code":"YE","flag":"🇾🇪"},{"id":248,"name":"赞比亚","code":"ZM","flag":"🇿🇲"},{"id":249,"name":"津巴布韦","code":"ZW","flag":"🇿🇼"},{"id":250,"name":"奥兰","code":"AX","flag":"🇦🇽"},{"id":251,"name":"加那利群岛","code":"IC","flag":"🇮🇨"}]`), - G = { - seasons: mt, - regionSize: ft, - refreshIntervalMs: ht, - colors: _t, - errors: pt, - items: wt, - products: yt, - countries: bt - }, - St = G, - J = G.seasons.length - 1, - Ut = G.seasons[J].zoom, - jt = G.seasons[J].tileSize; - -function $t(t) { - return St.countries[t - 1] -} -var v; -class vt { - constructor(e) { - g(this, v, y(!0)); - this.url = e - } - get online() { - return f(d(this, v)) - } - set online(e) { - _(d(this, v), e, !0) - } - async paint(e, a) { - const n = gt(e, r => `t=(${r.tile[0]},${r.tile[1]}),s=${r.season}`), - l = (await Promise.all(Object.values(n).map(r => { - const [i, h] = r[0].tile, b = r[0].season, B = { - colors: r.map(S => S.colorIdx), - coords: r.flatMap(S => S.pixel), - t: a - }; - return this.request(`/s${b}/pixel/${i}/${h}`, { - method: "POST", - body: JSON.stringify(B), - credentials: "include" - }) - }))).filter(r => r.status !== 200); - if (l.length) { - const r = l[0]; - if (r.status === 401) throw new Error(te()); - if (r.status === 403) { - if (r.headers.get("cf-mitigated") === "challenge") throw new Error(ia()); - const i = await r.json(); - throw (i == null ? void 0 : i.error) === "refresh" ? new Error(da()) : (Ot.refresh(), new Error(oe())) - } else if (r.status === 451) { - const i = await l[0].json(), - h = (i == null ? void 0 : i.err) ?? "other", - b = dt[h], - B = ut[h], - S = i == null ? void 0 : i.suspension; - if (S === "ban") throw new Error(Wa({ - description: B, - reason: b - })); - if (S === "timeout") { - const V = new Date(Date.now() + ((i == null ? void 0 : i.durationMs) ?? 0)); - throw new Error(et({ - description: B, - reason: b, - until: V.toLocaleString() - })) - } else throw new Error(s()) - } else throw new Error(s()) - } - } - async getPixelInfo({ - season: e, - tile: [a, n], - pixel: [c, l] - }) { - const r = await this.request(`/s${e}/pixel/${a}/${n}?x=${c}&y=${l}`); - if (r.status !== 200) { - const i = await r.text(); - throw new Error(ce({ - err: i - })) - } - return r.json() - } - async me() { - const e = await this.request("/me", { - credentials: "include" - }); - if (e.status === 200) return await e.json() - } - async logout() { - const e = await this.request("/auth/logout", { - method: "POST", - credentials: "include" - }); - if (e.status !== 200) throw new Error(await e.text()); - return await e.json() - } - async refreshPaymentSession(e) { - return (await this.request(`/payment/refresh-session/${encodeURIComponent(e)}`, { - method: "POST", - credentials: "include" - })).status === 200 - } - async getOtpCooldown() { - const e = await this.request("/otp/cooldown", { - credentials: "include" - }); - if (e.status !== 200) throw new Error(s()); - return await e.json() - } - async sendOtp(e) { - const a = await this.request("/otp/send", { - method: "POST", - credentials: "include", - body: JSON.stringify({ - phone: e - }) - }); - if (a.status === 400) throw new Error(ue()); - if (a.status === 403) throw new Error(fe()); - if (a.status === 429) throw new Error(pe()); - if (a.status !== 200) throw new Error(s()); - return await a.json() - } - async verifyOtp(e) { - const a = await this.request("/otp/verify", { - method: "POST", - credentials: "include", - body: JSON.stringify({ - code: e - }) - }); - if (a.status === 400) throw new Error(be()); - if (a.status !== 200) throw new Error(s()); - return await a.json() - } - async updateMe(e) { - const a = await this.request("/me/update", { - method: "POST", - credentials: "include", - body: JSON.stringify(e) - }); - if (a.status === 400) { - const n = await a.json(); - throw new Error(n == null ? void 0 : n.error) - } else if (a.status !== 200) throw new Error(s()) - } - async deleteMe() { - if ((await this.request("/me/delete", { - method: "POST", - credentials: "include" - })).status !== 200) throw new Error(s()) - } - async favoriteLocation(e) { - const a = await this.request("/favorite-location", { - method: "POST", - body: JSON.stringify({ - latitude: e[0], - longitude: e[1] - }), - credentials: "include" - }); - if (a.status === 403) throw new Error(Ee()); - if (a.status !== 200) throw new Error(s()) - } - async deleteFavoriteLocation(e) { - if ((await this.request("/favorite-location/delete", { - method: "POST", - body: JSON.stringify({ - id: e - }), - credentials: "include" - })).status !== 200) throw new Error(s()) - } - async updateFavoriteLocation(e, a) { - const n = await this.request("/favorite-location/update", { - method: "POST", - body: JSON.stringify({ - id: e, - name: a - }), - credentials: "include" - }); - if (n.status === 400) throw new Error(Pe()); - if (n.status !== 200) throw new Error(s()) - } - async leaderboardPlayers(e) { - const a = await this.request(`/leaderboard/player/${e}`); - if (a.status !== 200) throw new Error(w()); - return a.json() - } - async leaderboardAlliances(e) { - const a = await this.request(`/leaderboard/alliance/${e}`); - if (a.status !== 200) throw new Error(w()); - return a.json() - } - async leaderboardRegions(e, a = 0) { - const n = await this.request(`/leaderboard/region/${e}/${a}`); - if (n.status === 200) return n.json(); - throw new Error(w()) - } - async leaderboardRegionPlayers(e, a) { - const n = await this.request(`/leaderboard/region/players/${e}/${a}`); - if (n.status === 200) return n.json(); - throw new Error(w()) - } - async leaderboardRegionAlliances(e, a) { - const n = await this.request(`/leaderboard/region/alliances/${e}/${a}`); - if (n.status === 200) return n.json(); - throw new Error(w()) - } - async leaderboardCountries(e) { - const a = await this.request(`/leaderboard/country/${e}`, { - credentials: "include" - }); - if (a.status === 200) return a.json(); - throw new Error(w()) - } - async getRandomTile(e) { - const a = await this.request(`/s${e}/tile/random`); - if (a.status !== 200) throw new Error(s()); - return a.json() - } - async purchase(e) { - const a = await this.request("/purchase", { - method: "POST", - credentials: "include", - body: JSON.stringify({ - product: e - }) - }); - if (a.status !== 200) throw a.status === 404 ? new Error(ke()) : a.status === 403 ? new Error(Oe()) : a.status === 409 ? new Error(Le()) : new Error(s()) - } - async getAlliance() { - const e = await this.request("/alliance", { - credentials: "include" - }); - if (e.status === 200) return e.json(); - if (e.status === 404) return; - throw new Error(s()) - } - async createAlliance(e) { - const a = await this.request("/alliance", { - method: "POST", - credentials: "include", - body: JSON.stringify({ - name: e - }) - }); - if (a.status === 200) return a.json(); - if (a.status === 400) { - const n = await a.json(); - throw n.error === "max_characters" ? new Error(qe()) : n.error === "name_taken" ? new Error(je()) : n.error == "empty_name" ? new Error(Ke()) : new Error(s()) - } else throw a.status === 403 ? new Error(He()) : new Error(s()) - } - async leaveAlliance() { - if ((await this.request("/alliance/leave", { - method: "POST", - credentials: "include" - })).status !== 200) throw new Error(s()) - } - async updateAllianceDescription(e) { - const a = await this.request("/alliance/update-description", { - method: "POST", - credentials: "include", - body: JSON.stringify({ - description: e - }) - }); - if (a.status !== 200) throw a.status === 403 ? new Error(p()) : new Error(s()) - } - async updateAllianceHeadquarters(e, a) { - const n = await this.request("/alliance/update-headquarters", { - method: "POST", - credentials: "include", - body: JSON.stringify({ - latitude: e, - longitude: a - }) - }); - if (n.status !== 200) throw n.status === 403 ? new Error(p()) : new Error(s()) - } - async allianceLeaderboard(e) { - const a = await this.request(`/alliance/leaderboard/${e}`, { - credentials: "include" - }); - if (a.status === 200) return a.json(); - throw a.status === 403 ? new Error(p()) : new Error(w()) - } - async getAllianceInvites() { - const e = await this.request("/alliance/invites", { - credentials: "include" - }); - if (e.status === 200) return e.json(); - throw e.status === 403 ? new Error(p()) : new Error(s()) - } - async joinAlliance(e) { - switch ((await this.request(`/alliance/join/${e}`, { - credentials: "include" - })).status) { - case 200: - return "success"; - case 208: - return "in-another-alliance"; - case 401: - return "not-logged-in"; - case 403: - return "banned"; - case 400: - case 404: - return "invalid-invite"; - default: - return "error" - } - } - async getAllianceMembers(e) { - const a = await this.request(`/alliance/members/${e}`, { - credentials: "include" - }); - if (a.status === 200) return a.json(); - throw new Error(s()) - } - async getAllianceBannedMembers(e) { - const a = await this.request(`/alliance/members/banned/${e}`, { - credentials: "include" - }); - if (a.status === 200) return a.json(); - throw new Error(s()) - } - async giveAllianceAdmin(e) { - const a = await this.request("/alliance/give-admin", { - body: JSON.stringify({ - promotedUserId: e - }), - method: "POST", - credentials: "include" - }); - if (a.status !== 200) throw a.status === 403 ? new Error(p()) : new Error(s()) - } - async banAllianceUser(e) { - const a = await this.request("/alliance/ban", { - body: JSON.stringify({ - bannedUserId: e - }), - method: "POST", - credentials: "include" - }); - if (a.status !== 200) throw a.status === 403 ? new Error(p()) : new Error(s()) - } - async equipFlag(e) { - if ((await this.request(`/flag/equip/${e}`, { - method: "POST", - credentials: "include" - })).status !== 200) throw new Error(s()) - } - async getMyProfilePictures() { - const e = await this.request("/me/profile-pictures", { - credentials: "include" - }); - if (e.status !== 200) throw new Error(s()); - return e.json() - } - async changeProfilePicture(e) { - if ((await this.request("/me/profile-picture/change", { - method: "POST", - credentials: "include", - body: JSON.stringify({ - pictureId: e - }) - })).status !== 200) throw new Error(s()) - } - async unbanAllianceUser(e) { - const a = await this.request("/alliance/unban", { - body: JSON.stringify({ - unbannedUserId: e - }), - method: "POST", - credentials: "include" - }); - if (a.status !== 200) throw a.status === 403 ? new Error(p()) : new Error(s()) - } - async health() { - return (await this.request("/health")).json() - } - async generatePixQrCode(e) { - const a = await this.request(`/payment/abacatepay/create/pix/${e}`, { - method: "POST", - credentials: "include" - }); - if (a.status === 400) { - const c = await a.json(); - throw new Error(c == null ? void 0 : c.error) - } else { - if (a.status === 451) throw new Error(lt()); - if (a.status !== 200) throw new Error(s()) - } - return await a.json() - } - async refreshPixPayment(e) { - const a = await this.request(`/payment/abacatepay/refresh/pix/${e}`, { - method: "POST", - credentials: "include" - }); - if (a.status === 400) { - const n = await a.json(); - throw new Error(n == null ? void 0 : n.error) - } else if (a.status !== 200) throw new Error("Unexpected error on the server. Try again later"); - return a.json() - } - async getPixStatus(e) { - const a = await this.request(`/payment/abacatepay/status/pix/${e}`, { - method: "GET", - credentials: "include" - }); - if (a.status !== 200) throw new Error("Erro inesperado. Tente atualizar a página."); - return a.json() - } - async getModeratorTickets() { - const e = await this.request("/moderator/tickets", { - method: "GET", - credentials: "include" - }); - if (e.status !== 200) throw new D(s(), e.status); - const a = await e.json(); - for (const n of a.tickets) n.reports.sort((c, l) => j[c.reason] - j[l.reason]); - return a - } - async getSevereOpenTicketsCount() { - const e = await this.request("/moderator/severe-open-tickets-count", { - method: "GET", - credentials: "include" - }); - if (e.status !== 200) throw new D(s(), e.status); - const { - tickets: a - } = await e.json(); - return a - } - async assignNewTickets() { - const e = await this.request("/moderator/assign-new-tickets", { - method: "POST", - credentials: "include" - }); - if (e.status !== 200) throw new D(s(), e.status); - return e.json() - } - async setTicketStatus(e, a) { - const n = await this.request("/moderator/set-ticket-status", { - method: "POST", - credentials: "include", - body: JSON.stringify({ - ticketId: e, - status: a - }) - }); - if (n.status !== 200) throw new D(s(), n.status) - } - async request(e, a) { - let n; - try { - n = await fetch(`${this.url}${e}`, a), this.online = !0 - } catch (c) { - throw console.error("Fetch error:", c), this.online = !1, new Error(Qe(), { - cause: c - }) - } - if (n.status === 429) throw new Error(aa()); - return n - } -} -v = new WeakMap; -let $ = new vt(Z); - -function Et(t) { - const e = atob(t), - a = new Uint8Array(e.length); - for (let n = 0; n < e.length; n++) a[n] = e.charCodeAt(n); - return a -} -class Tt { - constructor(e) { - u(this, "bytes"); - this.bytes = e ?? new Uint8Array - } - set(e, a) { - const n = Math.floor(e / 8), - c = e % 8; - if (n >= this.bytes.length) { - const r = new Uint8Array(n + 1), - i = r.length - this.bytes.length; - for (let h = 0; h < this.bytes.length; h++) r[h + i] = this.bytes[h]; - this.bytes = r - } - const l = this.bytes.length - 1 - n; - a ? this.bytes[l] = this.bytes[l] | 1 << c : this.bytes[l] = this.bytes[l] & ~(1 << c) - } - get(e) { - const a = Math.floor(e / 8), - n = e % 8, - c = this.bytes.length; - return a > c ? !1 : (this.bytes[c - 1 - a] & 1 << n) !== 0 - } -} - -function Ft(...t) { - return t.filter(Boolean).join(" ") -} -const Mt = typeof document < "u"; -let F = 0; -var E, T, M; -class Pt { - constructor() { - g(this, E, y(q([]))); - g(this, T, y(q([]))); - g(this, M, e => { - const a = this.toasts.findIndex(n => n.id === e); - return a === -1 ? null : a - }); - u(this, "addToast", e => { - Mt && this.toasts.unshift(e) - }); - u(this, "updateToast", ({ - id: e, - data: a, - type: n, - message: c - }) => { - const l = this.toasts.findIndex(i => i.id === e), - r = this.toasts[l]; - this.toasts[l] = { - ...r, - ...a, - id: e, - title: c, - type: n, - updated: !0 - } - }); - u(this, "create", e => { - var i; - const { - message: a, - ...n - } = e, c = typeof(e == null ? void 0 : e.id) == "number" || e.id && ((i = e.id) == null ? void 0 : i.length) > 0 ? e.id : F++, l = e.dismissable === void 0 ? !0 : e.dismissable, r = e.type === void 0 ? "default" : e.type; - return U(() => { - this.toasts.find(b => b.id === c) ? this.updateToast({ - id: c, - data: e, - type: r, - message: a, - dismissable: l - }) : this.addToast({ - ...n, - id: c, - title: a, - dismissable: l, - type: r - }) - }), c - }); - u(this, "dismiss", e => (U(() => { - if (e === void 0) { - this.toasts = this.toasts.map(n => ({ - ...n, - dismiss: !0 - })); - return - } - const a = this.toasts.findIndex(n => n.id === e); - this.toasts[a] && (this.toasts[a] = { - ...this.toasts[a], - dismiss: !0 - }) - }), e)); - u(this, "remove", e => { - if (e === void 0) { - this.toasts = []; - return - } - const a = d(this, M).call(this, e); - if (a !== null) return this.toasts.splice(a, 1), e - }); - u(this, "message", (e, a) => this.create({ - ...a, - type: "default", - message: e - })); - u(this, "error", (e, a) => this.create({ - ...a, - type: "error", - message: e - })); - u(this, "success", (e, a) => this.create({ - ...a, - type: "success", - message: e - })); - u(this, "info", (e, a) => this.create({ - ...a, - type: "info", - message: e - })); - u(this, "warning", (e, a) => this.create({ - ...a, - type: "warning", - message: e - })); - u(this, "loading", (e, a) => this.create({ - ...a, - type: "loading", - message: e - })); - u(this, "promise", (e, a) => { - if (!a) return; - let n; - a.loading !== void 0 && (n = this.create({ - ...a, - promise: e, - type: "loading", - message: typeof a.loading == "string" ? a.loading : a.loading() - })); - const c = e instanceof Promise ? e : e(); - let l = n !== void 0; - return c.then(r => { - if (typeof r == "object" && r && "ok" in r && typeof r.ok == "boolean" && !r.ok) { - l = !1; - const i = xt(r); - this.create({ - id: n, - type: "error", - message: i - }) - } else if (a.success !== void 0) { - l = !1; - const i = typeof a.success == "function" ? a.success(r) : a.success; - this.create({ - id: n, - type: "success", - message: i - }) - } - }).catch(r => { - if (a.error !== void 0) { - l = !1; - const i = typeof a.error == "function" ? a.error(r) : a.error; - this.create({ - id: n, - type: "error", - message: i - }) - } - }).finally(() => { - var r; - l && (this.dismiss(n), n = void 0), (r = a.finally) == null || r.call(a) - }), n - }); - u(this, "custom", (e, a) => { - const n = (a == null ? void 0 : a.id) || F++; - return this.create({ - component: e, - id: n, - ...a - }), n - }); - u(this, "removeHeight", e => { - this.heights = this.heights.filter(a => a.toastId !== e) - }); - u(this, "setHeight", e => { - const a = d(this, M).call(this, e.toastId); - if (a === null) { - this.heights.push(e); - return - } - this.heights[a] = e - }); - u(this, "reset", () => { - this.toasts = [], this.heights = [] - }) - } - get toasts() { - return f(d(this, E)) - } - set toasts(e) { - _(d(this, E), e, !0) - } - get heights() { - return f(d(this, T)) - } - set heights(e) { - _(d(this, T), e, !0) - } -} -E = new WeakMap, T = new WeakMap, M = new WeakMap; - -function xt(t) { - return t && typeof t == "object" && "status" in t ? `HTTP error! Status: ${t.status}` : `Error! ${t}` -} -const m = new Pt; - -function At(t, e) { - return m.create({ - message: t, - ...e - }) -} -var N; -class Kt { - constructor() { - g(this, N, L(() => m.toasts.filter(e => !e.dismiss))) - } - get toasts() { - return f(d(this, N)) - } -} -N = new WeakMap; -const kt = At, - Ct = Object.assign(kt, { - success: m.success, - info: m.info, - warning: m.warning, - error: m.error, - custom: m.custom, - message: m.message, - promise: m.promise, - dismiss: m.dismiss, - loading: m.loading, - getActiveToasts: () => m.toasts.filter(t => !t.dismiss) - }); -var P, x, A, k, C, I, O; -class It { - constructor() { - u(this, "channel", new BroadcastChannel("user-channel")); - g(this, P, y()); - g(this, x, y(!0)); - g(this, A, y(Date.now())); - g(this, k, y(Date.now())); - g(this, C, L(() => { - if (!this.data) return; - const e = this.data.charges; - if (e.count > e.max) return e.count; - const a = e.count + Math.max((K.now - this.lastFetch) / e.cooldownMs, 0); - return Math.min(e.max, a) - })); - g(this, I, L(() => this.charges !== void 0 && this.data ? (1 - this.charges % 1) * this.data.charges.cooldownMs : void 0)); - g(this, O, L(() => { - var e; - return new Tt(Et(((e = this.data) == null ? void 0 : e.flagsBitmap) ?? "AA==")) - })); - this.channel.onmessage = e => { - const a = JSON.parse(e.data); - a.type === "refresh" ? (this.data = a.data, this.lastFetch = Date.now()) : a.type === "logout" && (this.data = void 0) - } - } - get data() { - return f(d(this, P)) - } - set data(e) { - _(d(this, P), e, !0) - } - get loading() { - return f(d(this, x)) - } - set loading(e) { - _(d(this, x), e, !0) - } - get now() { - return f(d(this, A)) - } - set now(e) { - _(d(this, A), e) - } - get lastFetch() { - return f(d(this, k)) - } - set lastFetch(e) { - _(d(this, k), e) - } - get charges() { - return f(d(this, C)) - } - set charges(e) { - _(d(this, C), e) - } - get cooldown() { - return f(d(this, I)) - } - set cooldown(e) { - _(d(this, I), e) - } - get flagsBitmap() { - return f(d(this, O)) - } - set flagsBitmap(e) { - _(d(this, O), e) - } - async refresh() { - try { - this.loading = !0, this.data = await $.me(), this.lastFetch = Date.now(), this.channel.postMessage(JSON.stringify({ - type: "refresh", - data: this.data - })) - } catch (e) { - console.error(e), Ct.warning(ra(), { - duration: 1e4 - }) - } finally { - this.loading = !1 - } - } - async logout() { - await $.logout(), this.channel.postMessage(JSON.stringify({ - type: "logout" - })), this.data = void 0 - } - hasColor(e) { - if (e < 32) return true; - let raw = (this.data?.extraColorsBitmap) ?? 0; - const bitmap = typeof raw === "string" ? BigInt("0x" + raw) : BigInt(raw); - return (bitmap & (1n << BigInt(e - 32))) !== 0n; - } - -} -P = new WeakMap, x = new WeakMap, A = new WeakMap, k = new WeakMap, C = new WeakMap, I = new WeakMap, O = new WeakMap; -const Ot = new It; -export { - J as C, Gt as P, St as S, $ as a, s as b, Z as c, m as d, Ft as e, Kt as f, K as g, dt as h, $t as i, _a as j, ma as k, Aa as l, Ma as m, Ua as n, Ga as o, va as p, ya as q, Da as r, Rt as s, Ct as t, Ot as u, Ia as v, Ut as w, jt as x, Nt as y, qt as z -}; \ No newline at end of file diff --git a/frontend-backup/_app/immutable/chunks/2.BY7SdjrD.js b/frontend-backup/_app/immutable/chunks/2.BY7SdjrD.js deleted file mode 100644 index 8cb8a18..0000000 --- a/frontend-backup/_app/immutable/chunks/2.BY7SdjrD.js +++ /dev/null @@ -1,47015 +0,0 @@ -var ky = Object.defineProperty; -var ng = b => { - throw TypeError(b) -}; -var Ey = (b, l, _) => l in b ? ky(b, l, { - enumerable: !0, - configurable: !0, - writable: !0, - value: _ -}) : b[l] = _; -var lr = (b, l, _) => Ey(b, typeof l != "symbol" ? l + "" : l, _), - lf = (b, l, _) => l.has(b) || ng("Cannot " + _); -var et = (b, l, _) => (lf(b, l, "read from private field"), _ ? _.call(b) : l.get(b)), - br = (b, l, _) => l.has(b) ? ng("Cannot add the same private member more than once") : l instanceof WeakSet ? l.add(b) : l.set(b, _), - Jn = (b, l, _, C) => (lf(b, l, "write to private field"), C ? C.call(b, _) : l.set(b, _), _), - Fr = (b, l, _) => (lf(b, l, "access private method"), _); -import "../chunks/Bzak7iHL.js"; -import { - o as Ii, - s as Ji -} from "../chunks/ByKBPM-D.js"; -import { - Y as zy, - aZ as Ly, - bp as Dy, - a$ as Ry, - bq as By, - be as Fy, - aR as nt, - A as x, - aH as oe, - aG as zn, - p as Sr, - aT as lt, - w as Zr, - f as Ie, - d as k, - s as V, - br as Oy, - r as A, - t as Ge, - b as H, - c as Pr, - an as Wi, - o as fi, - bj as an, - q as Tr, - bo as Su, - v as Hf, - x as Go, - aS as Jt, - a as zt, - aU as Fn, - ay as Ny, - ax as ag, - az as jy, - aB as Mg, - bs as ts, - ap as fa, - bt as Ag, - ak as qy -} from "../chunks/DUoKDNpf.js"; -import { - s as fe -} from "../chunks/g8c1BvYP.js"; -import { - p as Et, - i as Ue, - r as Qt, - s as lo, - u as kg -} from "../chunks/5NasrULQ.js"; -import { - h as Vy -} from "../chunks/2CRhGZHc.js"; -import { - a as er, - C as Uy, - r as ea, - e as On, - s as Or, - f as Jl, - b as zr, - d as uc, - g as Tu, - c as Vo -} from "../chunks/B1GmkH4o.js"; -import { - d as Zy, - a as Zo, - f as $o, - L as Wf, - p as Xf, - k as Pu, - t as En, - C as $y, - T as Eg, - G as Gy -} from "../chunks/Y9es74tr.js"; -import { - p as La -} from "../chunks/Cp3o644A.js"; -import { - S as $n, - a as ni, - t as qr, - u as Dt, - i as ds, - j as Hy, - k as Wy, - l as Xy, - m as Ky, - n as Yy, - o as Jy, - p as Qy, - q as ex, - r as tx, - v as rx, - c as Cd, - g as oa, - C as sg, - w as og, - x as ix, - y as nx, - z as ax -} from "../chunks/1lh-LSvX.js"; -import { - c as zg, - A as pa, - a as yf, - g as cf, - p as sx, - b as ox -} from "../chunks/D2m5UD3G.js"; -import { - g as Lg, - b as lx -} from "../chunks/KvV259my.js"; -import { - h as cx -} from "../chunks/BMKgGW48.js"; -import { - b as ps -} from "../chunks/CMs8vKjq.js"; -import { - g as jd, - d as qd, - h as Vd, - A as Dg, - f as tc, - D as Rg, - a as Ud, - r as ux, - i as hx, - I as lg, - e as dx, - c as px, - j as fx, - P as Bg, - b as mx -} from "../chunks/CBqzI9hL.js"; -import { - g as Fe, - l as _x -} from "../chunks/C5GsJ62f.js"; -import { - e as nn, - i as Zd -} from "../chunks/U908S-6f.js"; -import { - P as es, - g as Zn, - A as gx, - t as Fg, - b as Kf, - c as vx, - d as yx -} from "../chunks/DsJqb9ei.js"; -import "../chunks/D35KiPL1.js"; -import { - i as Og -} from "../chunks/D1ivTjwA.js"; -import { - L as Ng -} from "../chunks/07L1R_bo.js"; -import { - c as _n -} from "../chunks/BtP6pfnb.js"; -import { - L as xx, - T as jg, - a as bx -} from "../chunks/CQklNc9N.js"; -import { - _ as wx -} from "../chunks/Dp1pzeXC.js"; -import { - R as Tx, - r as Cx -} from "../chunks/DkBFL3pa.js"; -import { - W as Sx -} from "../chunks/CeLr1p76.js"; -const Px = []; - -function Ix(b, l = !1, _ = !1) { - return Sd(b, new Map, "", Px, null, _) -} - -function Sd(b, l, _, C, L = null, F = !1) { - if (typeof b == "object" && b !== null) { - var T = l.get(b); - if (T !== void 0) return T; - if (b instanceof Map) return new Map(b); - if (b instanceof Set) return new Set(b); - if (zy(b)) { - var o = Array(b.length); - l.set(b, o), L !== null && l.set(L, o); - for (var $ = 0; $ < b.length; $ += 1) { - var W = b[$]; - $ in b && (o[$] = Sd(W, l, _, C, null, F)) - } - return o - } - if (Ly(b) === Dy) { - o = {}, l.set(b, o), L !== null && l.set(L, o); - for (var ie in b) o[ie] = Sd(b[ie], l, _, C, null, F); - return o - } - if (b instanceof Date) return structuredClone(b); - if (typeof b.toJSON == "function" && !F) return Sd(b.toJSON(), l, _, C, b) - } - if (b instanceof EventTarget) return b; - try { - return structuredClone(b) - } catch { - return b - } -} - -function Mx() { - return Symbol(Ry) -} - -function $d(b, l) { - By(window, ["resize"], () => Fy(() => l(window[b]))) -} -const Ax = () => "Log in", - kx = () => "登入", - Ex = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Ax() : kx(), - zx = () => "Store", - Lx = () => "商店", - qg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? zx() : Lx(), - Dx = () => "Alliance", - Rx = () => "工会", - Gd = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Dx() : Rx(), - Bx = () => "Leaderboard", - Fx = () => "排行榜", - Yf = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Bx() : Fx(), - Ox = () => "Unlock", - Nx = () => "解锁", - jx = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Ox() : Nx(), - qx = () => "Lock", - Vx = () => "锁定", - Ux = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? qx() : Vx(), - Zx = () => "Info", - $x = () => "信息", - Gx = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Zx() : $x(), - Hx = () => "Zoom in", - Wx = () => "放大", - Xx = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Hx() : Wx(), - Kx = () => "Zoom out", - Yx = () => "缩小", - Jx = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Kx() : Yx(), - Qx = () => "Previous location", - e1 = () => "上一个位置", - t1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Qx() : e1(), - r1 = () => "Offline", - i1 = () => "连接丢失", - n1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? r1() : i1(), - a1 = () => "Zoom in to see the pixels", - s1 = () => "放大以查看像素", - o1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? a1() : s1(), - l1 = () => "Phone verification required", - c1 = () => "需要手机号验证", - cg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? l1() : c1(), - u1 = () => "My location", - h1 = () => "我的位置", - d1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? u1() : h1(), - p1 = () => "You don't have charges to paint. Wait to recharge.", - f1 = () => "你没有足够的像素点,请等待恢复.", - m1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? p1() : f1(), - _1 = () => "Map powered by:", - g1 = () => "地图提供方:", - v1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? _1() : g1(), - y1 = () => "OpenMapTiles Data from", - x1 = () => "OpenMapTiles 出品方:", - b1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? y1() : x1(), - w1 = () => "Feedback and bugs", - T1 = () => "BUG反馈", - C1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? w1() : T1(), - S1 = () => "Overview", - P1 = () => "总览", - I1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? S1() : P1(), - M1 = () => "How to paint faster", - A1 = () => "如何画得更快?", - k1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? M1() : A1(), - E1 = () => "When painting, click on the button", - z1 = () => "在绘制时候按住按钮", - L1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? E1() : z1(), - D1 = () => "on the top right corner of the screen. This will lock the screen but it'll also enable painting by moving your finger over the map.", - R1 = () => "屏幕右上角。这将锁定屏幕,但也可以通过在地图上移动手指来绘画.", - B1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? D1() : R1(), - F1 = () => "Hold", - O1 = () => "按住", - N1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? F1() : O1(), - j1 = () => "SPACE", - q1 = () => "空格", - V1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? j1() : q1(), - U1 = () => "and move your cursor over the map.", - Z1 = () => "并且移动鼠标.", - $1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? U1() : Z1(), - G1 = () => "Explore", - H1 = () => "探索", - W1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? G1() : H1(), - X1 = () => "Recharge paint charges", - K1 = () => "立刻恢复像素点", - Y1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? X1() : K1(), - J1 = () => "Items", - Q1 = () => "物品", - eb = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? J1() : Q1(), - tb = () => "Get more charges", - rb = () => "获得更多像素点", - ib = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? tb() : rb(), - nb = b => `+${b.amount} Max. Charges`, - ab = b => `+${b.amount} 最大像素容量`, - sb = (b, l = {}) => (l.locale ?? Fe()) === "en" ? nb(b) : ab(b), - ob = () => "Increase your maximum paint charges capacity", - lb = () => "提高最大像素点容量", - cb = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? ob() : lb(), - ub = () => "Profile picture", - hb = () => "头像", - db = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? ub() : hb(), - pb = () => "Add a new 16x16 profile picture", - fb = () => "添加一个新的16x16头像", - mb = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? pb() : fb(), - _b = () => "Not enough droplets", - gb = () => "没有足够的水滴", - Hd = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? _b() : gb(), - vb = () => "Show profile", - yb = () => "显示个人资料", - xb = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? vb() : yb(), - bb = () => "Menu", - wb = () => "菜单", - Tb = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? bb() : wb(), - Cb = b => `Could not install the app: ${b.error}`, - Sb = b => `无法安装App: ${b.error}`, - Pb = (b, l = {}) => (l.locale ?? Fe()) === "en" ? Cb(b) : Sb(b), - Ib = () => "Install App", - Mb = () => "安装App", - Ab = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Ib() : Mb(), - kb = () => "Livestreams", - Eb = () => "直播", - zb = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? kb() : Eb(), - Lb = () => "Log Out", - Db = () => "退出登录", - Rb = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Lb() : Db(), - Bb = () => "Hide UI", - Fb = () => "隐藏UI", - Ob = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Bb() : Fb(), - Nb = () => "Change picture:", - jb = () => "更换头像:", - qb = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Nb() : jb(), - Vb = () => "Show last painted pixel on alliance", - Ub = () => "在工会排行榜中展示你最后一次绘画位置", - Zb = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Vb() : Ub(), - $b = () => "Delete Account", - Gb = () => "注销账号", - ug = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? $b() : Gb(), - Hb = () => "Save", - Wb = () => "保存", - Xb = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Hb() : Wb(), - Kb = () => "Are you absolutely sure?", - Yb = () => "你真的确定吗?", - Jb = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Kb() : Yb(), - Qb = () => "This will permanently delete your account and all associated data. This action cannot be undone.", - e2 = () => "这会永久删除你的账号和所有数据,并且无法撤销。", - t2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Qb() : e2(), - r2 = () => "Profile", - i2 = () => "资料", - n2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? r2() : i2(), - a2 = () => "Display your country’s flag next to your username. Plus, when painting in regions where you own the corresponding flag, you recover 10% of the charges spent.", - s2 = () => "在你的用户名旁边显示一个旗帜。而且,当你在拥有对应旗帜的区域绘制时,可以返还所消耗像素点的10%。", - o2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? a2() : s2(), - l2 = () => "Does not need to be equipped to provide the bonus", - c2 = () => "即使未装备,也能提供加成。", - u2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? l2() : c2(), - h2 = () => "Equipped", - d2 = () => "已装备", - p2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? h2() : d2(), - f2 = () => "Equip", - m2 = () => "装备", - _2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? f2() : m2(), - g2 = () => "Country", - v2 = () => "国家或地区", - Vg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? g2() : v2(), - y2 = () => "No country found.", - x2 = () => "没有找到地区.", - b2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? y2() : x2(), - w2 = () => "Welcome to", - T2 = () => "欢迎来到", - C2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? w2() : T2(), - S2 = () => "Rules", - P2 = () => "规则", - I2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? S2() : P2(), - M2 = () => "Important", - A2 = () => "重要", - k2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? M2() : A2(), - E2 = () => "🚫 No inappropriate content (+18, hate speech, inappropriate links, highly suggestive material, ...)", - z2 = () => "🚫 Conteúdo inapropriado não permitido (+18, discurso de ódio, links inapropriados, conteúdo altamente sugestivo, ...)", - L2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? E2() : z2(), - D2 = () => "😈 Do not paint over other artworks using random colors or patterns just to mess things up", - R2 = () => "😈 Não desenhe por cima de outras artes usando cores ou padrões aleatórios só para bagunçar", - B2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? D2() : R2(), - F2 = () => "✅ Paint with more than one account", - O2 = () => "✅ Não desenhe com mais de uma conta", - N2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? F2() : O2(), - j2 = () => "✅ Use of bots or scripts is allowed", - q2 = () => "✅ Usar bots não é permitido", - V2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? j2() : q2(), - U2 = () => "🙅 Disclosing other's personal information is not allowed", - Z2 = () => "🙅 Divulgar informações pessoais dos outros não é permitido", - $2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? U2() : Z2(), - G2 = () => "✅ Painting over other artworks to complement them or create a new drawing is allowed", - H2 = () => "✅ Desenhar sobre outras artes para complementar ou criar novas artes é permitido", - W2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? G2() : H2(), - X2 = () => "✅ Griefing political party flags or portraits of politicians is allowed", - K2 = () => "✅ Desenhar sobre bandeiras de partidos e retratos de políticos é permitido", - Y2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? X2() : K2(), - J2 = () => "Violations of these rules may result in suspension of your account.", - Q2 = () => "违反会导致你被封禁。", - ew = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? J2() : Q2(), - tw = () => "Understood", - rw = () => "我同意", - iw = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? tw() : rw(), - nw = () => "Toggle art opacity", - aw = () => "开关像素透明度", - Ug = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? nw() : aw(), - sw = () => "Paint", - ow = () => "绘画", - Zg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? sw() : ow(), - lw = () => "Select a color", - cw = () => "选择一个娅安瑟", - uw = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? lw() : cw(), - hw = () => "Select a pixel to erase", - dw = () => "选择一个像素来擦除", - pw = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? hw() : dw(), - fw = () => "Pick a color from the map", - mw = () => "从地图上选择一个颜色", - _w = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? fw() : mw(), - gw = () => "Click", - vw = () => "点击", - yw = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? gw() : vw(), - xw = () => "SPACE", - bw = () => "空格", - ww = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? xw() : bw(), - Tw = () => "or hold", - Cw = () => "或按住", - Sw = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Tw() : Cw(), - Pw = () => "to paint,", - Iw = () => "来绘画", - Mw = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Pw() : Iw(), - Aw = () => "You can paint more than 1 pixel", - kw = () => "你可以绘制多个像素", - Ew = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Aw() : kw(), - zw = () => "Paint pixel", - Lw = () => "已经绘制像素", - Dw = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? zw() : Lw(), - Rw = () => "Color Picker", - Bw = () => "取色器", - Fw = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Rw() : Bw(), - Ow = () => "+2 max. charge/level", - Nw = () => "+2 最大像素点/每次升级", - jw = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Ow() : Nw(), - qw = () => "Name", - Vw = () => "名字", - xf = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? qw() : Vw(), - Uw = () => "Discord Username", - Zw = () => "社交媒体", - $w = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Uw() : Zw(), - Gw = () => "Max. Charges", - Hw = () => "像素点上限", - hg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Gw() : Hw(), - Ww = () => "Paint Charges", - Xw = () => "像素点包", - Kw = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Ww() : Xw(), - Yw = b => `+${b.amount} Paint Charges`, - Jw = b => `+${b.amount} 像素点`, - Qw = (b, l = {}) => (l.locale ?? Fe()) === "en" ? Yw(b) : Jw(b), - e5 = () => "Leave alliance", - t5 = () => "离开工会", - r5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? e5() : t5(), - i5 = () => "Members", - n5 = () => "成员", - $g = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? i5() : n5(), - a5 = () => "Headquarters", - s5 = () => "总部", - o5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? a5() : s5(), - l5 = () => "Not set", - c5 = () => "未设置", - u5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? l5() : c5(), - h5 = () => "You are not in an alliance", - d5 = () => "你没有加入一个工会", - p5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? h5() : d5(), - f5 = () => "Get invited to an alliance", - m5 = () => "得到一个邀请", - _5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? f5() : m5(), - g5 = () => "OR", - v5 = () => "或", - y5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? g5() : v5(), - x5 = () => "Create an alliance", - b5 = () => "创建工会", - w5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? x5() : b5(), - T5 = () => "Invite link", - C5 = () => "邀请", - S5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? T5() : C5(), - P5 = () => "Send the link below to everybody you want to invite to the alliance", - I5 = () => "发送这个链接给你要邀请加入的人", - M5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? P5() : I5(), - A5 = () => "Copied", - k5 = () => "已复制", - Gg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? A5() : k5(), - E5 = () => "Copy", - z5 = () => "复制", - bf = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? E5() : z5(), - L5 = () => "No description", - D5 = () => "没有描述", - Hg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? L5() : D5(), - R5 = () => "Invite", - B5 = () => "邀请", - F5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? R5() : B5(), - O5 = () => "No pixels painted", - N5 = () => "没有绘制像素", - Jf = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? O5() : N5(), - j5 = () => "Today", - q5 = () => "今天", - Wd = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? j5() : q5(), - V5 = () => "Week", - U5 = () => "本周", - Z5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? V5() : U5(), - $5 = () => "Month", - G5 = () => "本月", - H5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? $5() : G5(), - W5 = () => "All time", - X5 = () => "总计", - K5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? W5() : X5(), - Y5 = () => "this week", - J5 = () => "本周", - Qf = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Y5() : J5(), - Q5 = () => "this month", - eT = () => "本月", - em = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Q5() : eT(), - tT = () => "Player", - rT = () => "玩家", - tm = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? tT() : rT(), - iT = () => "Last pixel", - nT = () => "最后一次绘制", - aT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? iT() : nT(), - sT = () => "Create alliance", - oT = () => "创建工会", - lT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? sT() : oT(), - cT = () => "Alliance Name", - uT = () => "公会名称", - hT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? cT() : uT(), - dT = () => "Create", - pT = () => "创建", - fT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? dT() : pT(), - mT = () => "Give admin", - _T = () => "设为管理员", - gT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? mT() : _T(), - vT = () => "Ban from alliance", - yT = () => "踢出工会", - Wg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? vT() : yT(), - xT = () => "No action", - bT = () => "没有操作", - wT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? xT() : bT(), - TT = () => "Unban", - CT = () => "解除黑名单", - ST = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? TT() : CT(), - PT = () => "No banned users", - IT = () => "没有被踢出的用户", - MT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? PT() : IT(), - AT = () => "Update", - kT = () => "更新", - ET = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? AT() : kT(), - zT = () => "Error giving admin to user", - LT = () => "设置管理员失败", - DT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? zT() : LT(), - RT = () => "Users", - BT = () => "玩家", - FT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? RT() : BT(), - OT = () => "Banned", - NT = () => "已封禁", - jT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? OT() : NT(), - qT = () => "Regions", - VT = () => "区域", - UT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? qT() : VT(), - ZT = () => "Countries", - $T = () => "国家或地区", - GT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? ZT() : $T(), - HT = () => "Players", - WT = () => "玩家", - Xg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? HT() : WT(), - XT = () => "Alliances", - KT = () => "工会", - Kg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? XT() : KT(), - YT = () => "Region", - JT = () => "区域", - QT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? YT() : JT(), - e3 = () => "Pixels", - t3 = () => "像素", - Ql = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? e3() : t3(), - r3 = () => "Painted", - i3 = () => "已绘制", - ec = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? r3() : i3(), - n3 = () => "Pixels painted inside the region", - a3 = () => "这个区域已绘制的像素", - s3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? n3() : a3(), - o3 = () => "Visit", - l3 = () => "查看", - c3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? o3() : l3(), - u3 = () => "Not painted", - h3 = () => "没有绘制", - d3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? u3() : h3(), - p3 = () => "Painted by", - f3 = () => "绘制者:", - m3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? p3() : f3(), - _3 = () => "Limit reached", - g3 = () => "已到达上限", - v3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? _3() : g3(), - y3 = () => "Favorite", - x3 = () => "收藏", - b3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? y3() : x3(), - w3 = () => "Share", - T3 = () => "分享", - C3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? w3() : T3(), - S3 = () => "Share place", - P3 = () => "分享位置", - I3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? S3() : P3(), - M3 = () => "Mute", - A3 = () => "静音", - k3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? M3() : A3(), - E3 = () => "Unmute", - z3 = () => "开启音效", - L3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? E3() : z3(), - D3 = () => "Select the headquarters location", - R3 = () => "选择总部位置", - B3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? D3() : R3(), - F3 = () => "Pixels painted inside the country", - O3 = () => "这个国家/地区已绘制的像素", - N3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? F3() : O3(), - j3 = () => "Username copied to clipboard", - q3 = () => "成功复制用户名", - V3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? j3() : q3(), - U3 = () => "No more charges", - Z3 = () => "没有更多像素点", - $3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? U3() : Z3(), - G3 = () => "You are not allowed to use multiple accounts. Use your main account to paint.", - H3 = () => "请勿使用多个账户绘制。", - W3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? G3() : H3(), - X3 = () => "SMS sent to", - K3 = () => "短信已发送到", - Y3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? X3() : K3(), - J3 = () => "Phone successfully verified", - Q3 = () => "手机验证成功", - eC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? J3() : Q3(), - tC = () => "Not a valid phone number", - rC = () => "手机号无效", - iC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? tC() : rC(), - nC = () => "Location unfavorited", - aC = () => "已取消收藏", - sC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? nC() : aC(), - oC = () => "Location favorited", - lC = () => "已收藏地区", - cC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? oC() : lC(), - uC = () => "Giving admin to user", - hC = () => "设为管理员", - dC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? uC() : hC(), - pC = () => "Profile updated", - fC = () => "资料已更新", - mC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? pC() : fC(), - _C = () => "Account successfully deleted", - gC = () => "账号注销成功", - vC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? _C() : gC(), - yC = () => "Logged out", - xC = () => "已退出登录", - bC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? yC() : xC(), - wC = () => "Could not logout. Try refreshing the page.", - TC = () => "退出失败,请尝试刷新页面。", - CC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? wC() : TC(), - SC = () => "You need to zoom in to select a pixel", - PC = () => "你需要放大才能选择像素", - IC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? SC() : PC(), - MC = () => "Phone verification", - AC = () => "手机号验证", - kC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? MC() : AC(), - EC = () => "Please verify your phone number to continue playing. This helps us keep bots out and ensure a safe, creative experience for everyone.", - zC = () => "如需继续游玩,请您验证手机号码。该操作有助于我们防范机器人账户,为全体用户创造安全的游戏体验.", - LC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? EC() : zC(), - DC = () => "Send Code", - RC = () => "发送验证码", - BC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? DC() : RC(), - FC = () => "Input the code", - OC = () => "请输入验证码", - NC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? FC() : OC(), - jC = () => "Sent to", - qC = () => "已发送到", - VC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? jC() : qC(), - UC = () => "Resend Code", - ZC = () => "重新发送验证码", - $C = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? UC() : ZC(), - GC = () => "Try another number", - HC = () => "请尝试其他手机号", - WC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? GC() : HC(), - XC = () => "Edit profile", - KC = () => "编辑资料", - YC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? XC() : KC(), - JC = () => "Image", - QC = () => "图像", - eS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? JC() : QC(), - tS = () => "Download", - rS = () => "下载", - iS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? tS() : rS(), - nS = () => "Image copied to clipboard", - aS = () => "图像已复制", - sS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? nS() : aS(), - oS = () => "My map is lagging", - lS = () => "地图卡顿", - cS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? oS() : lS(), - uS = () => "Verify if", - hS = () => "确保", - dS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? uS() : hS(), - pS = () => "Use hardware acceleration when available", - fS = () => "使用图形加速", - mS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? pS() : fS(), - _S = () => "is enabled on", - gS = () => "已启用", - vS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? _S() : gS(), - yS = () => "Follow the instructions to enable hardware acceleration", - xS = () => "按照说明启用硬件加速", - bS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? yS() : xS(), - wS = () => "Report User", - TS = () => "举报", - Yg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? wS() : TS(), - CS = () => "Ban User", - SS = () => "封禁用户", - Jg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? CS() : SS(), - PS = () => "Select the reason", - IS = () => "选择原因", - MS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? PS() : IS(), - AS = () => "Other", - kS = () => "其他", - ES = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? AS() : kS(), - zS = () => "Other reason not listed", - LS = () => "其他未列出的原因", - DS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? zS() : LS(), - RS = () => "Extra context on what happened (required)", - BS = () => "举报详情(必填)", - FS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? RS() : BS(), - OS = () => "Report", - NS = () => "提交举报", - jS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? OS() : NS(), - qS = () => "Report sent successfully", - VS = () => "举报成功", - US = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? qS() : VS(), - ZS = () => "Select the report reason", - $S = () => "选择举报原因", - GS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? ZS() : $S(), - HS = () => "Report failed. Please try again later", - WS = () => "举报失败,请稍后重试", - XS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? HS() : WS(), - KS = () => "Moderation", - YS = () => "管理", - JS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? KS() : YS(), - QS = () => "Terms", - eP = () => "用户协议", - tP = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? QS() : eP(), - rP = () => "Privacy", - iP = () => "隐私政策", - nP = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? rP() : iP(), - aP = () => "Clear area", - sP = () => "清除区域", - oP = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? aP() : sP(), - lP = () => "Select the area's first corner", - cP = () => "请选择第一个角", - uP = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? lP() : cP(), - hP = () => "Select the area's opposite corner", - dP = () => "请选择第二个角", - pP = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? hP() : dP(), - fP = () => "Required", - mP = () => "必须", - _P = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? fP() : mP(), - gP = b => `Min. characters: ${b.min}`, - vP = b => `最少${b.min}个字2`, - yP = (b, l = {}) => (l.locale ?? Fe()) === "en" ? gP(b) : vP(b), - xP = b => `Max. characters: ${b.max}`, - bP = b => `最多${b.max}个字`, - wP = (b, l = {}) => (l.locale ?? Fe()) === "en" ? xP(b) : bP(b), - TP = () => "封禁用户", - CP = () => "timeout_user", - Qg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? CP() : TP(), - language_en = (t = {}, e = {}) => (e.locale ?? o()) === "en", - - Text1_EN = () => "You don't have charges to paint.", - Text1_CN = () => "你没有足够的像素点.", - Text1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Text1_EN() : Text1_CN(), - Text2_EN = () => "Next charge in", - Text2_CN = () => "距离下一次恢复还有:", - Text2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Text2_EN() : Text2_CN(), - Text3_EN = () => "Droplets", - Text3_CN = () => "水滴", - Text3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Text3_EN() : Text3_CN(), - Text5_EN = () => "Unlock", - Text5_CN = () => "解锁颜色", - Text5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Text5_EN() : Text5_CN(), - Text6_EN = () => "Permanently unlock the color", - Text6_CN = () => "永久解锁这个颜色", - Text6 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Text6_EN() : Text6_CN(), - Text7_EN = () => "Close", - Text7_CN = () => "关闭", - Text7 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Text7_EN() : Text7_CN(), - Text8_EN = () => "Flags", - Text8_CN = () => "旗帜", - Text8 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Text8_EN() : Text8_CN(), - Text9_EN = () => "Level", - Text9_CN = () => "等级", - Text9 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Text9_EN() : Text9_CN(), - - Es = 2 * Math.PI * 6378137 / 2; - -class hc { - constructor(l = 256) { - lr(this, "initialResolution"); - this.tileSize = l, this.initialResolution = 2 * Es / this.tileSize - } - latLonToMeters(l, _) { - const C = _ / 180 * Es, - L = Math.log(Math.tan((90 + l) * Math.PI / 360)) / (Math.PI / 180) * Es / 180; - return [C, L] - } - metersToLatLon(l, _) { - const C = l / Es * 180; - let L = _ / Es * 180; - return L = 180 / Math.PI * (2 * Math.atan(Math.exp(L * Math.PI / 180)) - Math.PI / 2), [L, C] - } - pixelsToMeters(l, _, C) { - const L = this.resolution(C), - F = l * L - Es, - T = Es - _ * L; - return [F, T] - } - pixelsToLatLon(l, _, C) { - const [L, F] = this.pixelsToMeters(l, _, C); - return this.metersToLatLon(L, F) - } - latLonToPixels(l, _, C) { - const [L, F] = this.latLonToMeters(l, _); - return this.metersToPixels(L, F, C) - } - latLonToPixelsFloor(l, _, C) { - const [L, F] = this.latLonToPixels(l, _, C); - return [Math.floor(L), Math.floor(F)] - } - metersToPixels(l, _, C) { - const L = this.resolution(C), - F = (l + Es) / L, - T = (Es - _) / L; - return [F, T] - } - latLonToTile(l, _, C) { - const [L, F] = this.latLonToMeters(l, _); - return this.metersToTile(L, F, C) - } - metersToTile(l, _, C) { - const [L, F] = this.metersToPixels(l, _, C); - return this.pixelsToTile(L, F) - } - pixelsToTile(l, _) { - const C = Math.ceil(l / this.tileSize) - 1, - L = Math.ceil(_ / this.tileSize) - 1; - return [C, L] - } - pixelsToTileLocal(l, _) { - return { - tile: this.pixelsToTile(l, _), - pixel: [Math.floor(l) % this.tileSize, Math.floor(_) % this.tileSize] - } - } - tileBounds(l, _, C) { - const [L, F] = this.pixelsToMeters(l * this.tileSize, _ * this.tileSize, C), [T, o] = this.pixelsToMeters((l + 1) * this.tileSize, (_ + 1) * this.tileSize, C); - return { - min: [L, F], - max: [T, o] - } - } - tileBoundsLatLon(l, _, C) { - const L = this.tileBounds(l, _, C); - return { - min: this.metersToLatLon(L.min[0], L.min[1]), - max: this.metersToLatLon(L.max[0], L.max[1]) - } - } - resolution(l) { - return this.initialResolution / 2 ** l - } - latLonToTileAndPixel(l, _, C) { - const [L, F] = this.latLonToMeters(l, _), [T, o] = this.metersToTile(L, F, C), [$, W] = this.metersToPixels(L, F, C); - return { - tile: [T, o], - pixel: [Math.floor($) % this.tileSize, Math.floor(W) % this.tileSize] - } - } - pixelBounds(l, _, C) { - return { - min: this.pixelsToMeters(l, _, C), - max: this.pixelsToMeters(l + 1, _ + 1, C) - } - } - pixelToBoundsLatLon(l, _, C) { - const L = this.pixelBounds(l, _, C), - F = .001885, - T = (L.max[0] - L.min[0]) * F, - o = (L.max[1] - L.min[1]) * F; - return L.min[0] -= T, L.max[0] -= T, L.min[1] -= o, L.max[1] -= o, { - min: this.metersToLatLon(L.min[0], L.min[1]), - max: this.metersToLatLon(L.max[0], L.max[1]) - } - } - latLonToTileBoundsLatLon(l, _, C) { - const [L, F] = this.latLonToMeters(l, _), [T, o] = this.metersToTile(L, F, C); - return this.tileBoundsLatLon(T, o, C) - } - latLonToPixelBoundsLatLon(l, _, C) { - const [L, F] = this.latLonToMeters(l, _), [T, o] = this.metersToPixels(L, F, C); - return this.pixelToBoundsLatLon(Math.floor(T), Math.floor(o), C) - } - latLonToRegionAndPixel(l, _, C, L = $n.regionSize) { - const [F, T] = this.latLonToPixelsFloor(l, _, C), o = this.tileSize * L; - return { - region: [Math.floor(F / o), Math.floor(T / o)], - pixel: [F % o, T % o] - } - } -} - -function rm(b, l = !0) { - const { - min: _, - max: C - } = b; - return l ? [ - [_[1], C[0]], - [C[1], C[0]], - [C[1], _[0]], - [_[1], _[0]] - ] : [ - [_[0], C[1]], - [C[0], C[1]], - [C[0], _[1]], - [_[0], _[1]] - ] -} - -function im(b) { - return [(b.min[0] + b.max[0]) / 2, (b.min[1] + b.max[1]) / 2] -} -const SP = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAAAAACoWZBhAAAAAXNSR0IArs4c6QAAACpJREFUeNpj+AsEZ86ASIa/DAwMZ84ACRDzDBigMs/AARITq1oUwxBWAADaREUdDMswKwAAAABJRU5ErkJggg==", - dg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAAXNSR0IArs4c6QAAACVJREFUeNpj+A8FDEAAZwMRBAIBmIYLIgHcgkQDIs3E6SRsjgcABYFLtfTgakEAAAAASUVORK5CYII="; - -function PP(b) { - return Math.floor(Math.random() * b) -} -const wf = 14.5; -async function IP() { - const b = kP(); - if (b) return b; - try { - if ((await navigator.permissions.query({ - name: "geolocation" - })).state === "granted") { - const _ = await new Promise((C, L) => navigator.geolocation.getCurrentPosition(F => C(F), F => L(F))); - return { - lat: _.coords.latitude, - lng: _.coords.longitude, - zoom: wf - } - } - } catch (l) { - console.error(l) - } - return { - ...MP().pos, - zoom: wf - } -} - -function MP() { - const b = Object.entries(AP), - l = PP(b.length), - [_, C] = b[l]; - return { - city: _, - pos: C - } -} -const AP = { - tokyo: { - lat: 35.677545560719665, - lng: 139.76394445809638 - }, - paris: { - lat: 48.8537151734952, - lng: 2.3484026030630787 - }, - newYork: { - lat: 40.71283173786517, - lng: -74.00599771376795 - }, - saoPaulo: { - lat: -23.550584064565356, - lng: -46.63339720713918 - }, - sydney: { - lat: -33.86943325619071, - lng: 151.2083447239608 - } - }, - ev = "location"; - -function Qa(b, l) { - localStorage.setItem(ev, JSON.stringify({ - ...b, - zoom: l - })) -} - -function kP() { - const b = localStorage.getItem(ev); - if (!b) return; - const l = JSON.parse(b); - return l.zoom ?? (l.zoom = wf), l -} -var ku, Eu; -class EP { - constructor() { - br(this, ku, nt(-1)); - br(this, Eu, nt([])) - } - get idx() { - return x(et(this, ku)) - } - set idx(l) { - oe(et(this, ku), l, !0) - } - get entries() { - return x(et(this, Eu)) - } - set entries(l) { - oe(et(this, Eu), l) - } - hasNext() { - return this.idx < this.entries.length - 1 - } - goToNext(l) { - const _ = this.idx + 1, - C = this.entries[_]; - C && (this.idx = _, l.flyTo({ - center: C.pos, - zoom: C.zoom - })) - } - hasPrev() { - return this.idx > 0 - } - goToPrev(l) { - const _ = this.idx - 1, - C = this.entries[_]; - C && (this.idx = _, l.flyTo({ - center: C.pos, - zoom: C.zoom - })) - } - isEmpty() { - return this.entries.length === 0 - } - push(l) { - this.idx = this.idx + 1, this.entries = [...this.entries.slice(0, this.idx), l] - } -} -ku = new WeakMap, Eu = new WeakMap; -const Ho = new EP; - -function nm(b) { - return b && b.__esModule && Object.prototype.hasOwnProperty.call(b, "default") ? b.default : b -} -var Pd = { - exports: {} -}; -/** - * MapLibre GL JS - * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.6.2/LICENSE.txt - */ -var zP = Pd.exports, - pg; - -function LP() { - return pg || (pg = 1, (function(b, l) { - (function(_, C) { - b.exports = C() - })(zP, (function() { - var _ = {}, - C = {}; - - function L(T, o, $) { - if (C[T] = $, T === "index") { - var W = "var sharedModule = {}; (" + C.shared + ")(sharedModule); (" + C.worker + ")(sharedModule);", - ie = {}; - return C.shared(ie), C.index(_, ie), typeof window < "u" && _.setWorkerUrl(window.URL.createObjectURL(new Blob([W], { - type: "text/javascript" - }))), _ - } - } - L("shared", ["exports"], (function(T) { - function o(i, t, r, a) { - return new(r || (r = Promise))((function(c, p) { - function f(S) { - try { - v(a.next(S)) - } catch (I) { - p(I) - } - } - - function g(S) { - try { - v(a.throw(S)) - } catch (I) { - p(I) - } - } - - function v(S) { - var I; - S.done ? c(S.value) : (I = S.value, I instanceof r ? I : new r((function(E) { - E(I) - }))).then(f, g) - } - v((a = a.apply(i, t || [])).next()) - })) - } - - function $(i, t) { - this.x = i, this.y = t - } - - function W(i) { - return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i - } - var ie, pe; - typeof SuppressedError == "function" && SuppressedError, $.prototype = { - clone() { - return new $(this.x, this.y) - }, - add(i) { - return this.clone()._add(i) - }, - sub(i) { - return this.clone()._sub(i) - }, - multByPoint(i) { - return this.clone()._multByPoint(i) - }, - divByPoint(i) { - return this.clone()._divByPoint(i) - }, - mult(i) { - return this.clone()._mult(i) - }, - div(i) { - return this.clone()._div(i) - }, - rotate(i) { - return this.clone()._rotate(i) - }, - rotateAround(i, t) { - return this.clone()._rotateAround(i, t) - }, - matMult(i) { - return this.clone()._matMult(i) - }, - 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(i) { - return this.x === i.x && this.y === i.y - }, - dist(i) { - return Math.sqrt(this.distSqr(i)) - }, - distSqr(i) { - const t = i.x - this.x, - r = i.y - this.y; - return t * t + r * r - }, - angle() { - return Math.atan2(this.y, this.x) - }, - angleTo(i) { - return Math.atan2(this.y - i.y, this.x - i.x) - }, - angleWith(i) { - return this.angleWithSep(i.x, i.y) - }, - angleWithSep(i, t) { - return Math.atan2(this.x * t - this.y * i, this.x * i + this.y * t) - }, - _matMult(i) { - const t = i[2] * this.x + i[3] * this.y; - return this.x = i[0] * this.x + i[1] * this.y, this.y = t, this - }, - _add(i) { - return this.x += i.x, this.y += i.y, this - }, - _sub(i) { - return this.x -= i.x, this.y -= i.y, this - }, - _mult(i) { - return this.x *= i, this.y *= i, this - }, - _div(i) { - return this.x /= i, this.y /= i, this - }, - _multByPoint(i) { - return this.x *= i.x, this.y *= i.y, this - }, - _divByPoint(i) { - return this.x /= i.x, this.y /= i.y, this - }, - _unit() { - return this._div(this.mag()), this - }, - _perp() { - const i = this.y; - return this.y = this.x, this.x = -i, this - }, - _rotate(i) { - const t = Math.cos(i), - r = Math.sin(i), - a = r * this.x + t * this.y; - return this.x = t * this.x - r * this.y, this.y = a, this - }, - _rotateAround(i, t) { - const r = Math.cos(i), - a = Math.sin(i), - c = t.y + a * (this.x - t.x) + r * (this.y - t.y); - return this.x = t.x + r * (this.x - t.x) - a * (this.y - t.y), this.y = c, this - }, - _round() { - return this.x = Math.round(this.x), this.y = Math.round(this.y), this - }, - constructor: $ - }, $.convert = function(i) { - if (i instanceof $) return i; - if (Array.isArray(i)) return new $(+i[0], +i[1]); - if (i.x !== void 0 && i.y !== void 0) return new $(+i.x, +i.y); - throw new Error("Expected [x, y] or {x, y} point format") - }; - var ye = (function() { - if (pe) return ie; - - function i(t, r, a, c) { - this.cx = 3 * t, this.bx = 3 * (a - t) - this.cx, this.ax = 1 - this.cx - this.bx, this.cy = 3 * r, this.by = 3 * (c - r) - this.cy, this.ay = 1 - this.cy - this.by, this.p1x = t, this.p1y = r, this.p2x = a, this.p2y = c - } - return pe = 1, ie = i, i.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, r) { - if (r === void 0 && (r = 1e-6), t < 0) return 0; - if (t > 1) return 1; - for (var a = t, c = 0; c < 8; c++) { - var p = this.sampleCurveX(a) - t; - if (Math.abs(p) < r) return a; - var f = this.sampleCurveDerivativeX(a); - if (Math.abs(f) < 1e-6) break; - a -= p / f - } - var g = 0, - v = 1; - for (a = t, c = 0; c < 20 && (p = this.sampleCurveX(a), !(Math.abs(p - t) < r)); c++) t > p ? g = a : v = a, a = .5 * (v - g) + g; - return a - }, - solve: function(t, r) { - return this.sampleCurveY(this.solveCurveX(t, r)) - } - }, ie - })(), - X = W(ye); - let Se, we; - - function Re() { - return Se == null && (Se = typeof OffscreenCanvas < "u" && new OffscreenCanvas(1, 1).getContext("2d") && typeof createImageBitmap == "function"), Se - } - - function Ae() { - if (we == null && (we = !1, Re())) { - const t = new OffscreenCanvas(5, 5).getContext("2d", { - willReadFrequently: !0 - }); - if (t) { - for (let a = 0; a < 25; a++) { - const c = 4 * a; - t.fillStyle = `rgb(${c},${c+1},${c+2})`, t.fillRect(a % 5, Math.floor(a / 5), 1, 1) - } - const r = t.getImageData(0, 0, 5, 5).data; - for (let a = 0; a < 100; a++) - if (a % 4 != 3 && r[a] !== a) { - we = !0; - break - } - } - } - return we || !1 - } - var Oe = 1e-6, - Ee = typeof Float32Array < "u" ? Float32Array : Array; - - function Ne() { - var i = new Ee(9); - return Ee != Float32Array && (i[1] = 0, i[2] = 0, i[3] = 0, i[5] = 0, i[6] = 0, i[7] = 0), i[0] = 1, i[4] = 1, i[8] = 1, i - } - - function ft(i) { - return i[0] = 1, i[1] = 0, i[2] = 0, i[3] = 0, i[4] = 0, i[5] = 1, i[6] = 0, i[7] = 0, i[8] = 0, i[9] = 0, i[10] = 1, i[11] = 0, i[12] = 0, i[13] = 0, i[14] = 0, i[15] = 1, i - } - - function ht() { - var i = new Ee(3); - return Ee != Float32Array && (i[0] = 0, i[1] = 0, i[2] = 0), i - } - - function Xe(i) { - return Math.hypot(i[0], i[1], i[2]) - } - - function ct(i, t, r) { - var a = new Ee(3); - return a[0] = i, a[1] = t, a[2] = r, a - } - - function Je(i, t, r) { - return i[0] = t[0] + r[0], i[1] = t[1] + r[1], i[2] = t[2] + r[2], i - } - - function Be(i, t, r) { - return i[0] = t[0] * r, i[1] = t[1] * r, i[2] = t[2] * r, i - } - - function st(i, t, r) { - var a = t[0], - c = t[1], - p = t[2], - f = r[0], - g = r[1], - v = r[2]; - return i[0] = c * v - p * g, i[1] = p * f - a * v, i[2] = a * g - c * f, i - } - Math.hypot || (Math.hypot = function() { - for (var i = 0, t = arguments.length; t--;) i += arguments[t] * arguments[t]; - return Math.sqrt(i) - }); - var it, Qe = Xe; - - function ke(i, t, r) { - var a = t[0], - c = t[1], - p = t[2], - f = t[3]; - return i[0] = r[0] * a + r[4] * c + r[8] * p + r[12] * f, i[1] = r[1] * a + r[5] * c + r[9] * p + r[13] * f, i[2] = r[2] * a + r[6] * c + r[10] * p + r[14] * f, i[3] = r[3] * a + r[7] * c + r[11] * p + r[15] * f, i - } - - function vt() { - var i = new Ee(4); - return Ee != Float32Array && (i[0] = 0, i[1] = 0, i[2] = 0), i[3] = 1, i - } - - function Q(i, t, r, a) { - var c = .5 * Math.PI / 180; - t *= c, r *= c, a *= c; - var p = Math.sin(t), - f = Math.cos(t), - g = Math.sin(r), - v = Math.cos(r), - S = Math.sin(a), - I = Math.cos(a); - return i[0] = p * v * I - f * g * S, i[1] = f * g * I + p * v * S, i[2] = f * v * S - p * g * I, i[3] = f * v * I + p * g * S, i - } - - function te() { - var i = new Ee(2); - return Ee != Float32Array && (i[0] = 0, i[1] = 0), i - } - - function _e(i, t) { - var r = new Ee(2); - return r[0] = i, r[1] = t, r - } - ht(), it = new Ee(4), Ee != Float32Array && (it[0] = 0, it[1] = 0, it[2] = 0, it[3] = 0), ht(), ct(1, 0, 0), ct(0, 1, 0), vt(), vt(), Ne(), te(); - const ne = 8192; - - function Pe(i, t, r) { - return t * (ne / (i.tileSize * Math.pow(2, r - i.tileID.overscaledZ))) - } - - function Me(i, t) { - return (i % t + t) % t - } - - function at(i, t, r) { - return i * (1 - r) + t * r - } - - function We(i) { - if (i <= 0) return 0; - if (i >= 1) return 1; - const t = i * i, - r = t * i; - return 4 * (i < .5 ? r : 3 * (i - t) + r - .75) - } - - function Ct(i, t, r, a) { - const c = new X(i, t, r, a); - return p => c.solve(p) - } - const _t = Ct(.25, .1, .25, 1); - - function xt(i, t, r) { - return Math.min(r, Math.max(t, i)) - } - - function tt(i, t, r) { - const a = r - t, - c = ((i - t) % a + a) % a + t; - return c === t ? r : c - } - - function pt(i, ...t) { - for (const r of t) - for (const a in r) i[a] = r[a]; - return i - } - let It = 1; - - function ut(i, t, r) { - const a = {}; - for (const c in i) a[c] = t.call(this, i[c], c, i); - return a - } - - function bt(i, t, r) { - const a = {}; - for (const c in i) t.call(this, i[c], c, i) && (a[c] = i[c]); - return a - } - - function wt(i) { - return Array.isArray(i) ? i.map(wt) : typeof i == "object" && i ? ut(i, wt) : i - } - const dt = {}; - - function Lt(i) { - dt[i] || (typeof console < "u" && console.warn(i), dt[i] = !0) - } - - function Xt(i, t, r) { - return (r.y - i.y) * (t.x - i.x) > (t.y - i.y) * (r.x - i.x) - } - - function Yt(i) { - return typeof WorkerGlobalScope < "u" && i !== void 0 && i instanceof WorkerGlobalScope - } - let nr = null; - - function ar(i) { - return typeof ImageBitmap < "u" && i instanceof ImageBitmap - } - const Ft = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="; - - function dr(i, t, r, a, c) { - return o(this, void 0, void 0, (function*() { - if (typeof VideoFrame > "u") throw new Error("VideoFrame not supported"); - const p = new VideoFrame(i, { - timestamp: 0 - }); - try { - const f = p == null ? void 0 : p.format; - if (!f || !f.startsWith("BGR") && !f.startsWith("RGB")) throw new Error(`Unrecognized format ${f}`); - const g = f.startsWith("BGR"), - v = new Uint8ClampedArray(a * c * 4); - if (yield p.copyTo(v, (function(S, I, E, R, N) { - const j = 4 * Math.max(-I, 0), - Z = (Math.max(0, E) - E) * R * 4 + j, - Y = 4 * R, - ae = Math.max(0, I), - ze = Math.max(0, E); - return { - rect: { - x: ae, - y: ze, - width: Math.min(S.width, I + R) - ae, - height: Math.min(S.height, E + N) - ze - }, - layout: [{ - offset: Z, - stride: Y - }] - } - })(i, t, r, a, c)), g) - for (let S = 0; S < v.length; S += 4) { - const I = v[S]; - v[S] = v[S + 2], v[S + 2] = I - } - return v - } finally { - p.close() - } - })) - } - let _r, Ir; - - function jr(i, t, r, a) { - return i.addEventListener(t, r, a), { - unsubscribe: () => { - i.removeEventListener(t, r, a) - } - } - } - - function ur(i) { - return i * Math.PI / 180 - } - - function Mr(i) { - return i / Math.PI * 180 - } - const Ar = { - touchstart: !0, - touchmove: !0, - touchmoveWindow: !0, - touchend: !0, - touchcancel: !0 - }, - kr = { - dblclick: !0, - click: !0, - mouseover: !0, - mouseout: !0, - mousedown: !0, - mousemove: !0, - mousemoveWindow: !0, - mouseup: !0, - mouseupWindow: !0, - contextmenu: !0, - wheel: !0 - }, - Nr = "AbortError"; - - function ce() { - return new Error(Nr) - } - const O = { - MAX_PARALLEL_IMAGE_REQUESTS: 16, - MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME: 8, - MAX_TILE_CACHE_ZOOM_LEVELS: 5, - REGISTERED_PROTOCOLS: {}, - WORKER_URL: "" - }; - - function q(i) { - return O.REGISTERED_PROTOCOLS[i.substring(0, i.indexOf("://"))] - } - const G = "global-dispatcher"; - class K extends Error { - constructor(t, r, a, c) { - super(`AJAXError: ${r} (${t}): ${a}`), this.status = t, this.statusText = r, this.url = a, this.body = c - } - } - const le = () => Yt(self) ? self.worker && self.worker.referrer : (window.location.protocol === "blob:" ? window.parent : window).location.href, - ve = function(i, t) { - if (/:\/\//.test(i.url) && !/^https?:|^file:/.test(i.url)) { - const a = q(i.url); - if (a) return a(i, t); - if (Yt(self) && self.worker && self.worker.actor) return self.worker.actor.sendAsync({ - type: "GR", - data: i, - targetMapId: G - }, t) - } - if (!(/^file:/.test(r = i.url) || /^file:/.test(le()) && !/^\w+:/.test(r))) { - if (fetch && Request && AbortController && Object.prototype.hasOwnProperty.call(Request.prototype, "signal")) return (function(a, c) { - return o(this, void 0, void 0, (function*() { - const p = new Request(a.url, { - method: a.method || "GET", - body: a.body, - credentials: a.credentials, - headers: a.headers, - cache: a.cache, - referrer: le(), - signal: c.signal - }); - let f, g; - a.type !== "json" || p.headers.has("Accept") || p.headers.set("Accept", "application/json"); - try { - f = yield fetch(p) - } catch (S) { - throw new K(0, S.message, a.url, new Blob) - } - if (!f.ok) { - const S = yield f.blob(); - throw new K(f.status, f.statusText, a.url, S) - } - g = a.type === "arrayBuffer" || a.type === "image" ? f.arrayBuffer() : a.type === "json" ? f.json() : f.text(); - const v = yield g; - if (c.signal.aborted) throw ce(); - return { - data: v, - cacheControl: f.headers.get("Cache-Control"), - expires: f.headers.get("Expires") - } - })) - })(i, t); - if (Yt(self) && self.worker && self.worker.actor) return self.worker.actor.sendAsync({ - type: "GR", - data: i, - mustQueue: !0, - targetMapId: G - }, t) - } - var r; - return (function(a, c) { - return new Promise(((p, f) => { - var g; - const v = new XMLHttpRequest; - v.open(a.method || "GET", a.url, !0), a.type !== "arrayBuffer" && a.type !== "image" || (v.responseType = "arraybuffer"); - for (const S in a.headers) v.setRequestHeader(S, a.headers[S]); - a.type === "json" && (v.responseType = "text", !((g = a.headers) === null || g === void 0) && g.Accept || v.setRequestHeader("Accept", "application/json")), v.withCredentials = a.credentials === "include", v.onerror = () => { - f(new Error(v.statusText)) - }, v.onload = () => { - if (!c.signal.aborted) - if ((v.status >= 200 && v.status < 300 || v.status === 0) && v.response !== null) { - let S = v.response; - if (a.type === "json") try { - S = JSON.parse(v.response) - } catch (I) { - return void f(I) - } - p({ - data: S, - cacheControl: v.getResponseHeader("Cache-Control"), - expires: v.getResponseHeader("Expires") - }) - } else { - const S = new Blob([v.response], { - type: v.getResponseHeader("Content-Type") - }); - f(new K(v.status, v.statusText, a.url, S)) - } - }, c.signal.addEventListener("abort", (() => { - v.abort(), f(ce()) - })), v.send(a.body) - })) - })(i, t) - }; - - function Le(i) { - if (!i || i.indexOf("://") <= 0 || i.indexOf("data:image/") === 0 || i.indexOf("blob:") === 0) return !0; - const t = new URL(i), - r = window.location; - return t.protocol === r.protocol && t.host === r.host - } - - function Ce(i, t, r) { - r[i] && r[i].indexOf(t) !== -1 || (r[i] = r[i] || [], r[i].push(t)) - } - - function Ze(i, t, r) { - if (r && r[i]) { - const a = r[i].indexOf(t); - a !== -1 && r[i].splice(a, 1) - } - } - class ot { - constructor(t, r = {}) { - pt(this, r), this.type = t - } - } - class Ye extends ot { - constructor(t, r = {}) { - super("error", pt({ - error: t - }, r)) - } - } - class Ot { - on(t, r) { - return this._listeners = this._listeners || {}, Ce(t, r, this._listeners), { - unsubscribe: () => { - this.off(t, r) - } - } - } - off(t, r) { - return Ze(t, r, this._listeners), Ze(t, r, this._oneTimeListeners), this - } - once(t, r) { - return r ? (this._oneTimeListeners = this._oneTimeListeners || {}, Ce(t, r, this._oneTimeListeners), this) : new Promise((a => this.once(t, a))) - } - fire(t, r) { - typeof t == "string" && (t = new ot(t, r || {})); - const a = t.type; - if (this.listens(a)) { - t.target = this; - const c = this._listeners && this._listeners[a] ? this._listeners[a].slice() : []; - for (const g of c) g.call(this, t); - const p = this._oneTimeListeners && this._oneTimeListeners[a] ? this._oneTimeListeners[a].slice() : []; - for (const g of p) Ze(a, g, this._oneTimeListeners), g.call(this, t); - const f = this._eventedParent; - f && (pt(t, typeof this._eventedParentData == "function" ? this._eventedParentData() : this._eventedParentData), f.fire(t)) - } else t instanceof Ye && console.error(t.error); - return this - } - listens(t) { - return this._listeners && this._listeners[t] && this._listeners[t].length > 0 || this._oneTimeListeners && this._oneTimeListeners[t] && this._oneTimeListeners[t].length > 0 || this._eventedParent && this._eventedParent.listens(t) - } - setEventedParent(t, r) { - return this._eventedParent = t, this._eventedParentData = r, this - } - } - var xe = { - $version: 8, - $root: { - version: { - required: !0, - type: "enum", - values: [8] - }, - name: { - type: "string" - }, - metadata: { - type: "*" - }, - center: { - type: "array", - value: "number" - }, - 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" - }, - 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 - }, - "*": { - 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: "*" - }, - tolerance: { - type: "number", - default: .375 - }, - cluster: { - type: "boolean", - default: !1 - }, - clusterRadius: { - type: "number", - default: 50, - minimum: 0 - }, - 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", - "property-type": "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", - "property-type": "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", - "property-type": "constant" - } - }, - layout_heatmap: { - visibility: { - type: "enum", - values: { - visible: {}, - none: {} - }, - default: "visible", - "property-type": "constant" - } - }, - "layout_fill-extrusion": { - visibility: { - type: "enum", - values: { - visible: {}, - none: {} - }, - default: "visible", - "property-type": "constant" - } - }, - layout_line: { - "line-cap": { - type: "enum", - values: { - butt: {}, - round: {}, - square: {} - }, - default: "butt", - expression: { - interpolated: !1, - parameters: ["zoom"] - }, - "property-type": "data-constant" - }, - "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"] - }, - "property-type": "data-constant" - }, - "line-round-limit": { - type: "number", - default: 1.05, - requires: [{ - "line-join": "round" - }], - expression: { - interpolated: !0, - parameters: ["zoom"] - }, - "property-type": "data-constant" - }, - "line-sort-key": { - type: "number", - expression: { - interpolated: !1, - parameters: ["zoom", "feature"] - }, - "property-type": "data-driven" - }, - visibility: { - type: "enum", - values: { - visible: {}, - none: {} - }, - default: "visible", - "property-type": "constant" - } - }, - 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", - "property-type": "constant" - } - }, - layout_raster: { - visibility: { - type: "enum", - values: { - visible: {}, - none: {} - }, - default: "visible", - "property-type": "constant" - } - }, - layout_hillshade: { - visibility: { - type: "enum", - values: { - visible: {}, - none: {} - }, - default: "visible", - "property-type": "constant" - } - }, - "layout_color-relief": { - visibility: { - type: "enum", - values: { - visible: {}, - none: {} - }, - default: "visible", - "property-type": "constant" - } - }, - filter: { - type: "array", - value: "*" - }, - 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: "*", - 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" - }, - "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"] - }, - "property-type": "cross-faded" - }, - "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" - }, - "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" - } - }, - "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" - } - }, - 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" - } - } - }; - const At = ["type", "source", "source-layer", "minzoom", "maxzoom", "filter", "layout"]; - - function Pt(i, t) { - const r = {}; - for (const a in i) a !== "ref" && (r[a] = i[a]); - return At.forEach((a => { - a in t && (r[a] = t[a]) - })), r - } - - function kt(i, t) { - if (Array.isArray(i)) { - if (!Array.isArray(t) || i.length !== t.length) return !1; - for (let r = 0; r < i.length; r++) - if (!kt(i[r], t[r])) return !1; - return !0 - } - if (typeof i == "object" && i !== null && t !== null) { - if (typeof t != "object" || Object.keys(i).length !== Object.keys(t).length) return !1; - for (const r in i) - if (!kt(i[r], t[r])) return !1; - return !0 - } - return i === t - } - - function Wt(i, t) { - i.push(t) - } - - function Lr(i, t, r) { - Wt(r, { - command: "addSource", - args: [i, t[i]] - }) - } - - function Kr(i, t, r) { - Wt(t, { - command: "removeSource", - args: [i] - }), r[i] = !0 - } - - function Hr(i, t, r, a) { - Kr(i, r, a), Lr(i, t, r) - } - - function $r(i, t, r) { - let a; - for (a in i[r]) - if (Object.prototype.hasOwnProperty.call(i[r], a) && a !== "data" && !kt(i[r][a], t[r][a])) return !1; - for (a in t[r]) - if (Object.prototype.hasOwnProperty.call(t[r], a) && a !== "data" && !kt(i[r][a], t[r][a])) return !1; - return !0 - } - - function mr(i, t, r, a, c, p) { - i = i || {}, t = t || {}; - for (const f in i) Object.prototype.hasOwnProperty.call(i, f) && (kt(i[f], t[f]) || r.push({ - command: p, - args: [a, f, t[f], c] - })); - for (const f in t) Object.prototype.hasOwnProperty.call(t, f) && !Object.prototype.hasOwnProperty.call(i, f) && (kt(i[f], t[f]) || r.push({ - command: p, - args: [a, f, t[f], c] - })) - } - - function gr(i) { - return i.id - } - - function ai(i, t) { - return i[t.id] = t, i - } - class Tt { - constructor(t, r, a, c) { - this.message = (t ? `${t}: ` : "") + a, c && (this.identifier = c), r != null && r.__line__ && (this.line = r.__line__) - } - } - - function Ci(i, ...t) { - for (const r of t) - for (const a in r) i[a] = r[a]; - return i - } - class di extends Error { - constructor(t, r) { - super(r), this.message = r, this.key = t - } - } - class Pn { - constructor(t, r = []) { - this.parent = t, this.bindings = {}; - for (const [a, c] of r) this.bindings[a] = c - } - concat(t) { - return new Pn(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 Mt = { - kind: "null" - }, - Ke = { - kind: "number" - }, - jt = { - kind: "string" - }, - Gt = { - kind: "boolean" - }, - Dr = { - kind: "color" - }, - Gr = { - kind: "projectionDefinition" - }, - li = { - kind: "object" - }, - fr = { - kind: "value" - }, - bi = { - kind: "collator" - }, - Si = { - kind: "formatted" - }, - zi = { - kind: "padding" - }, - mi = { - kind: "colorArray" - }, - Li = { - kind: "numberArray" - }, - rr = { - kind: "resolvedImage" - }, - yi = { - kind: "variableAnchorOffsetCollection" - }; - - function Qr(i, t) { - return { - kind: "array", - itemType: i, - N: t - } - } - - function Yr(i) { - if (i.kind === "array") { - const t = Yr(i.itemType); - return typeof i.N == "number" ? `array<${t}, ${i.N}>` : i.itemType.kind === "value" ? "array" : `array<${t}>` - } - return i.kind - } - const la = [Mt, Ke, jt, Gt, Dr, Gr, Si, li, Qr(fr), zi, Li, mi, rr, yi]; - - function sn(i, t) { - if (t.kind === "error") return null; - if (i.kind === "array") { - if (t.kind === "array" && (t.N === 0 && t.itemType.kind === "value" || !sn(i.itemType, t.itemType)) && (typeof i.N != "number" || i.N === t.N)) return null - } else { - if (i.kind === t.kind) return null; - if (i.kind === "value") { - for (const r of la) - if (!sn(r, t)) return null - } - } - return `Expected ${Yr(i)} but found ${Yr(t)} instead.` - } - - function ta(i, t) { - return t.some((r => r.kind === i.kind)) - } - - function Fi(i, t) { - return t.some((r => r === "null" ? i === null : r === "array" ? Array.isArray(i) : r === "object" ? i && !Array.isArray(i) && typeof i == "object" : r === typeof i)) - } - - function Xi(i, t) { - return i.kind === "array" && t.kind === "array" ? i.itemType.kind === t.itemType.kind && typeof i.N == "number" : i.kind === t.kind - } - const Gn = .96422, - Hn = .82521, - Ln = 4 / 29, - gt = 6 / 29, - qt = 3 * gt * gt, - vr = gt * gt * gt, - _i = Math.PI / 180, - Di = 180 / Math.PI; - - function $i(i) { - return (i %= 360) < 0 && (i += 360), i - } - - function Mi([i, t, r, a]) { - let c, p; - const f = gn((.2225045 * (i = Cr(i)) + .7168786 * (t = Cr(t)) + .0606169 * (r = Cr(r))) / 1); - i === t && t === r ? c = p = f : (c = gn((.4360747 * i + .3850649 * t + .1430804 * r) / Gn), p = gn((.0139322 * i + .0971045 * t + .7141733 * r) / Hn)); - const g = 116 * f - 16; - return [g < 0 ? 0 : g, 500 * (c - f), 200 * (f - p), a] - } - - function Cr(i) { - return i <= .04045 ? i / 12.92 : Math.pow((i + .055) / 1.055, 2.4) - } - - function gn(i) { - return i > vr ? Math.pow(i, 1 / 3) : i / qt + Ln - } - - function tr([i, t, r, a]) { - let c = (i + 16) / 116, - p = isNaN(t) ? c : c + t / 500, - f = isNaN(r) ? c : c - r / 200; - return c = 1 * ei(c), p = Gn * ei(p), f = Hn * ei(f), [Ht(3.1338561 * p - 1.6168667 * c - .4906146 * f), Ht(-.9787684 * p + 1.9161415 * c + .033454 * f), Ht(.0719453 * p - .2289914 * c + 1.4052427 * f), a] - } - - function Ht(i) { - return (i = i <= .00304 ? 12.92 * i : 1.055 * Math.pow(i, 1 / 2.4) - .055) < 0 ? 0 : i > 1 ? 1 : i - } - - function ei(i) { - return i > gt ? i * i * i : qt * (i - Ln) - } - const ri = Object.hasOwn || function(i, t) { - return Object.prototype.hasOwnProperty.call(i, t) - }; - - function gi(i, t) { - return ri(i, t) ? i[t] : void 0 - } - - function ci(i) { - return parseInt(i.padEnd(2, i), 16) / 255 - } - - function pi(i, t) { - return Er(t ? i / 100 : i, 0, 1) - } - - function Er(i, t, r) { - return Math.min(Math.max(t, i), r) - } - - function Ri(i) { - return !i.some(Number.isNaN) - } - const ui = { - 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 Jr(i, t, r) { - return i + r * (t - i) - } - - function ti(i, t, r) { - return i.map(((a, c) => Jr(a, t[c], r))) - } - class yr { - constructor(t, r, a, c = 1, p = !0) { - this.r = t, this.g = r, this.b = a, this.a = c, p || (this.r *= c, this.g *= c, this.b *= c, c || this.overwriteGetter("rgb", [t, r, a, c])) - } - static parse(t) { - if (t instanceof yr) return t; - if (typeof t != "string") return; - const r = (function(a) { - if ((a = a.toLowerCase().trim()) === "transparent") return [0, 0, 0, 0]; - const c = gi(ui, a); - if (c) { - const [f, g, v] = c; - return [f / 255, g / 255, v / 255, 1] - } - if (a.startsWith("#") && /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(a)) { - const f = a.length < 6 ? 1 : 2; - let g = 1; - return [ci(a.slice(g, g += f)), ci(a.slice(g, g += f)), ci(a.slice(g, g += f)), ci(a.slice(g, g + f) || "ff")] - } - if (a.startsWith("rgb")) { - const f = a.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/); - if (f) { - const [g, v, S, I, E, R, N, j, Z, Y, ae, ze] = f, me = [I || " ", N || " ", Y].join(""); - if (me === " " || me === " /" || me === ",," || me === ",,,") { - const be = [S, R, Z].join(""), - Ve = be === "%%%" ? 100 : be === "" ? 255 : 0; - if (Ve) { - const rt = [Er(+v / Ve, 0, 1), Er(+E / Ve, 0, 1), Er(+j / Ve, 0, 1), ae ? pi(+ae, ze) : 1]; - if (Ri(rt)) return rt - } - } - return - } - } - const p = a.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/); - if (p) { - const [f, g, v, S, I, E, R, N, j] = p, Z = [v || " ", I || " ", R].join(""); - if (Z === " " || Z === " /" || Z === ",," || Z === ",,,") { - const Y = [+g, Er(+S, 0, 100), Er(+E, 0, 100), N ? pi(+N, j) : 1]; - if (Ri(Y)) return (function([ae, ze, me, be]) { - function Ve(rt) { - const St = (rt + ae / 30) % 12, - $t = ze * Math.min(me, 1 - me); - return me - $t * Math.max(-1, Math.min(St - 3, 9 - St, 1)) - } - return ae = $i(ae), ze /= 100, me /= 100, [Ve(0), Ve(8), Ve(4), be] - })(Y) - } - } - })(t); - return r ? new yr(...r, !1) : void 0 - } - get rgb() { - const { - r: t, - g: r, - b: a, - a: c - } = this, p = c || 1 / 0; - return this.overwriteGetter("rgb", [t / p, r / p, a / p, c]) - } - get hcl() { - return this.overwriteGetter("hcl", (function(t) { - const [r, a, c, p] = Mi(t), f = Math.sqrt(a * a + c * c); - return [Math.round(1e4 * f) ? $i(Math.atan2(c, a) * Di) : NaN, f, r, p] - })(this.rgb)) - } - get lab() { - return this.overwriteGetter("lab", Mi(this.rgb)) - } - overwriteGetter(t, r) { - return Object.defineProperty(this, t, { - value: r - }), r - } - toString() { - const [t, r, a, c] = this.rgb; - return `rgba(${[t,r,a].map((p=>Math.round(255*p))).join(",")},${c})` - } - static interpolate(t, r, a, c = "rgb") { - switch (c) { - case "rgb": { - const [p, f, g, v] = ti(t.rgb, r.rgb, a); - return new yr(p, f, g, v, !1) - } - case "hcl": { - const [p, f, g, v] = t.hcl, [S, I, E, R] = r.hcl; - let N, j; - if (isNaN(p) || isNaN(S)) isNaN(p) ? isNaN(S) ? N = NaN : (N = S, g !== 1 && g !== 0 || (j = I)) : (N = p, E !== 1 && E !== 0 || (j = f)); - else { - let me = S - p; - S > p && me > 180 ? me -= 360 : S < p && p - S > 180 && (me += 360), N = p + a * me - } - const [Z, Y, ae, ze] = (function([me, be, Ve, rt]) { - return me = isNaN(me) ? 0 : me * _i, tr([Ve, Math.cos(me) * be, Math.sin(me) * be, rt]) - })([N, j ?? Jr(f, I, a), Jr(g, E, a), Jr(v, R, a)]); - return new yr(Z, Y, ae, ze, !1) - } - case "lab": { - const [p, f, g, v] = tr(ti(t.lab, r.lab, a)); - return new yr(p, f, g, v, !1) - } - } - } - } - yr.black = new yr(0, 0, 0, 1), yr.white = new yr(1, 1, 1, 1), yr.transparent = new yr(0, 0, 0, 0), yr.red = new yr(1, 0, 0, 1); - class on { - constructor(t, r, a) { - this.sensitivity = t ? r ? "variant" : "case" : r ? "accent" : "base", this.locale = a, this.collator = new Intl.Collator(this.locale ? this.locale : [], { - sensitivity: this.sensitivity, - usage: "search" - }) - } - compare(t, r) { - return this.collator.compare(t, r) - } - resolvedLocale() { - return new Intl.Collator(this.locale ? this.locale : []).resolvedOptions().locale - } - } - const vn = ["bottom", "center", "top"]; - class _a { - constructor(t, r, a, c, p, f) { - this.text = t, this.image = r, this.scale = a, this.fontStack = c, this.textColor = p, this.verticalAlign = f - } - } - class ln { - constructor(t) { - this.sections = t - } - static fromString(t) { - return new ln([new _a(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 ln ? t : ln.fromString(t) - } - toString() { - return this.sections.length === 0 ? "" : this.sections.map((t => t.text)).join("") - } - } - class Ki { - constructor(t) { - this.values = t.slice() - } - static parse(t) { - if (t instanceof Ki) return t; - if (typeof t == "number") return new Ki([t, t, t, t]); - if (Array.isArray(t) && !(t.length < 1 || t.length > 4)) { - for (const r of t) - if (typeof r != "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 Ki(t) - } - } - toString() { - return JSON.stringify(this.values) - } - static interpolate(t, r, a) { - return new Ki(ti(t.values, r.values, a)) - } - } - class cn { - constructor(t) { - this.values = t.slice() - } - static parse(t) { - if (t instanceof cn) return t; - if (typeof t == "number") return new cn([t]); - if (Array.isArray(t)) { - for (const r of t) - if (typeof r != "number") return; - return new cn(t) - } - } - toString() { - return JSON.stringify(this.values) - } - static interpolate(t, r, a) { - return new cn(ti(t.values, r.values, a)) - } - } - class Ni { - constructor(t) { - this.values = t.slice() - } - static parse(t) { - if (t instanceof Ni) return t; - if (typeof t == "string") { - const a = yr.parse(t); - return a ? new Ni([a]) : void 0 - } - if (!Array.isArray(t)) return; - const r = []; - for (const a of t) { - if (typeof a != "string") return; - const c = yr.parse(a); - if (!c) return; - r.push(c) - } - return new Ni(r) - } - toString() { - return JSON.stringify(this.values) - } - static interpolate(t, r, a, c = "rgb") { - const p = []; - if (t.values.length != r.values.length) throw new Error(`colorArray: Arrays have mismatched length (${t.values.length} vs. ${r.values.length}), cannot interpolate.`); - for (let f = 0; f < t.values.length; f++) p.push(yr.interpolate(t.values[f], r.values[f], a, c)); - return new Ni(p) - } - } - class wi extends Error { - constructor(t) { - super(t), this.name = "RuntimeError" - } - toJSON() { - return this.message - } - } - const Ko = new Set(["center", "left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right"]); - class un { - constructor(t) { - this.values = t.slice() - } - static parse(t) { - if (t instanceof un) return t; - if (Array.isArray(t) && !(t.length < 1) && t.length % 2 == 0) { - for (let r = 0; r < t.length; r += 2) { - const a = t[r], - c = t[r + 1]; - if (typeof a != "string" || !Ko.has(a) || !Array.isArray(c) || c.length !== 2 || typeof c[0] != "number" || typeof c[1] != "number") return - } - return new un(t) - } - } - toString() { - return JSON.stringify(this.values) - } - static interpolate(t, r, a) { - const c = t.values, - p = r.values; - if (c.length !== p.length) throw new wi(`Cannot interpolate values of different length. from: ${t.toString()}, to: ${r.toString()}`); - const f = []; - for (let g = 0; g < c.length; g += 2) { - if (c[g] !== p[g]) throw new wi(`Cannot interpolate values containing mismatched anchors. from[${g}]: ${c[g]}, to[${g}]: ${p[g]}`); - f.push(c[g]); - const [v, S] = c[g + 1], [I, E] = p[g + 1]; - f.push([Jr(v, I, a), Jr(S, E, a)]) - } - return new un(f) - } - } - class Nn { - constructor(t) { - this.name = t.name, this.available = t.available - } - toString() { - return this.name - } - static fromString(t) { - return t ? new Nn({ - name: t, - available: !1 - }) : null - } - } - class hn { - constructor(t, r, a) { - this.from = t, this.to = r, this.transition = a - } - static interpolate(t, r, a) { - return new hn(t, r, a) - } - static parse(t) { - return t instanceof hn ? t : Array.isArray(t) && t.length === 3 && typeof t[0] == "string" && typeof t[1] == "string" && typeof t[2] == "number" ? new hn(t[0], t[1], t[2]) : typeof t == "object" && typeof t.from == "string" && typeof t.to == "string" && typeof t.transition == "number" ? new hn(t.from, t.to, t.transition) : typeof t == "string" ? new hn(t, t, 1) : void 0 - } - } - - function Ti(i, t, r, a) { - return typeof i == "number" && i >= 0 && i <= 255 && typeof t == "number" && t >= 0 && t <= 255 && typeof r == "number" && r >= 0 && r <= 255 ? a === void 0 || typeof a == "number" && a >= 0 && a <= 1 ? null : `Invalid rgba value [${[i,t,r,a].join(", ")}]: 'a' must be between 0 and 1.` : `Invalid rgba value [${(typeof a=="number"?[i,t,r,a]:[i,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.` - } - - function Za(i) { - if (i === null || typeof i == "string" || typeof i == "boolean" || typeof i == "number" || i instanceof hn || i instanceof yr || i instanceof on || i instanceof ln || i instanceof Ki || i instanceof cn || i instanceof Ni || i instanceof un || i instanceof Nn) return !0; - if (Array.isArray(i)) { - for (const t of i) - if (!Za(t)) return !1; - return !0 - } - if (typeof i == "object") { - for (const t in i) - if (!Za(i[t])) return !1; - return !0 - } - return !1 - } - - function wr(i) { - if (i === null) return Mt; - if (typeof i == "string") return jt; - if (typeof i == "boolean") return Gt; - if (typeof i == "number") return Ke; - if (i instanceof yr) return Dr; - if (i instanceof hn) return Gr; - if (i instanceof on) return bi; - if (i instanceof ln) return Si; - if (i instanceof Ki) return zi; - if (i instanceof cn) return Li; - if (i instanceof Ni) return mi; - if (i instanceof un) return yi; - if (i instanceof Nn) return rr; - if (Array.isArray(i)) { - const t = i.length; - let r; - for (const a of i) { - const c = wr(a); - if (r) { - if (r === c) continue; - r = fr; - break - } - r = c - } - return Qr(r || fr, t) - } - return li - } - - function Vr(i) { - const t = typeof i; - return i === null ? "" : t === "string" || t === "number" || t === "boolean" ? String(i) : i instanceof yr || i instanceof hn || i instanceof ln || i instanceof Ki || i instanceof cn || i instanceof Ni || i instanceof un || i instanceof Nn ? i.toString() : JSON.stringify(i) - } - class ga { - constructor(t, r) { - this.type = t, this.value = r - } - static parse(t, r) { - if (t.length !== 2) return r.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`); - if (!Za(t[1])) return r.error("invalid value"); - const a = t[1]; - let c = wr(a); - const p = r.expectedType; - return c.kind !== "array" || c.N !== 0 || !p || p.kind !== "array" || typeof p.N == "number" && p.N !== 0 || (c = p), new ga(c, a) - } - evaluate() { - return this.value - } - eachChild() {} - outputDefined() { - return !0 - } - } - const hi = { - string: jt, - number: Ke, - boolean: Gt, - object: li - }; - class ra { - constructor(t, r) { - this.type = t, this.args = r - } - static parse(t, r) { - if (t.length < 2) return r.error("Expected at least one argument."); - let a, c = 1; - const p = t[0]; - if (p === "array") { - let g, v; - if (t.length > 2) { - const S = t[1]; - if (typeof S != "string" || !(S in hi) || S === "object") return r.error('The item type argument of "array" must be one of string, number, boolean', 1); - g = hi[S], c++ - } else g = fr; - if (t.length > 3) { - if (t[2] !== null && (typeof t[2] != "number" || t[2] < 0 || t[2] !== Math.floor(t[2]))) return r.error('The length argument to "array" must be a positive integer literal', 2); - v = t[2], c++ - } - a = Qr(g, v) - } else { - if (!hi[p]) throw new Error(`Types doesn't contain name = ${p}`); - a = hi[p] - } - const f = []; - for (; c < t.length; c++) { - const g = r.parse(t[c], c, fr); - if (!g) return null; - f.push(g) - } - return new ra(a, f) - } - evaluate(t) { - for (let r = 0; r < this.args.length; r++) { - const a = this.args[r].evaluate(t); - if (!sn(this.type, wr(a))) return a; - if (r === this.args.length - 1) throw new wi(`Expected value to be of type ${Yr(this.type)}, but found ${Yr(wr(a))} instead.`) - } - throw new Error - } - eachChild(t) { - this.args.forEach(t) - } - outputDefined() { - return this.args.every((t => t.outputDefined())) - } - } - const Ra = { - "to-boolean": Gt, - "to-color": Dr, - "to-number": Ke, - "to-string": jt - }; - class Ba { - constructor(t, r) { - this.type = t, this.args = r - } - static parse(t, r) { - if (t.length < 2) return r.error("Expected at least one argument."); - const a = t[0]; - if (!Ra[a]) throw new Error(`Can't parse ${a} as it is not part of the known types`); - if ((a === "to-boolean" || a === "to-string") && t.length !== 2) return r.error("Expected one argument."); - const c = Ra[a], - p = []; - for (let f = 1; f < t.length; f++) { - const g = r.parse(t[f], f, fr); - if (!g) return null; - p.push(g) - } - return new Ba(c, p) - } - evaluate(t) { - switch (this.type.kind) { - case "boolean": - return !!this.args[0].evaluate(t); - case "color": { - let r, a; - for (const c of this.args) { - if (r = c.evaluate(t), a = null, r instanceof yr) return r; - if (typeof r == "string") { - const p = t.parseColor(r); - if (p) return p - } else if (Array.isArray(r) && (a = r.length < 3 || r.length > 4 ? `Invalid rgba value ${JSON.stringify(r)}: expected an array containing either three or four numeric values.` : Ti(r[0], r[1], r[2], r[3]), !a)) return new yr(r[0] / 255, r[1] / 255, r[2] / 255, r[3]) - } - throw new wi(a || `Could not parse color from value '${typeof r=="string"?r:JSON.stringify(r)}'`) - } - case "padding": { - let r; - for (const a of this.args) { - r = a.evaluate(t); - const c = Ki.parse(r); - if (c) return c - } - throw new wi(`Could not parse padding from value '${typeof r=="string"?r:JSON.stringify(r)}'`) - } - case "numberArray": { - let r; - for (const a of this.args) { - r = a.evaluate(t); - const c = cn.parse(r); - if (c) return c - } - throw new wi(`Could not parse numberArray from value '${typeof r=="string"?r:JSON.stringify(r)}'`) - } - case "colorArray": { - let r; - for (const a of this.args) { - r = a.evaluate(t); - const c = Ni.parse(r); - if (c) return c - } - throw new wi(`Could not parse colorArray from value '${typeof r=="string"?r:JSON.stringify(r)}'`) - } - case "variableAnchorOffsetCollection": { - let r; - for (const a of this.args) { - r = a.evaluate(t); - const c = un.parse(r); - if (c) return c - } - throw new wi(`Could not parse variableAnchorOffsetCollection from value '${typeof r=="string"?r:JSON.stringify(r)}'`) - } - case "number": { - let r = null; - for (const a of this.args) { - if (r = a.evaluate(t), r === null) return 0; - const c = Number(r); - if (!isNaN(c)) return c - } - throw new wi(`Could not convert ${JSON.stringify(r)} to number.`) - } - case "formatted": - return ln.fromString(Vr(this.args[0].evaluate(t))); - case "resolvedImage": - return Nn.fromString(Vr(this.args[0].evaluate(t))); - case "projectionDefinition": - return this.args[0].evaluate(t); - default: - return Vr(this.args[0].evaluate(t)) - } - } - eachChild(t) { - this.args.forEach(t) - } - outputDefined() { - return this.args.every((t => t.outputDefined())) - } - } - const Yo = ["Unknown", "Point", "LineString", "Polygon"]; - class mc { - 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" ? Yo[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 r = this._parseColorCache.get(t); - return r || (r = yr.parse(t), this._parseColorCache.set(t, r)), r - } - } - class Rs { - constructor(t, r, a = [], c, p = new Pn, f = []) { - this.registry = t, this.path = a, this.key = a.map((g => `[${g}]`)).join(""), this.scope = p, this.errors = f, this.expectedType = c, this._isConstant = r - } - parse(t, r, a, c, p = {}) { - return r ? this.concat(r, a, c)._parse(t, p) : this._parse(t, p) - } - _parse(t, r) { - function a(c, p, f) { - return f === "assert" ? new ra(p, [c]) : f === "coerce" ? new Ba(p, [c]) : c - } - 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 c = t[0]; - if (typeof c != "string") return this.error(`Expression name must be a string, but found ${typeof c} instead. If you wanted a literal array, use ["literal", [...]].`, 0), null; - const p = this.registry[c]; - if (p) { - let f = p.parse(t, this); - if (!f) return null; - if (this.expectedType) { - const g = this.expectedType, - v = f.type; - if (g.kind !== "string" && g.kind !== "number" && g.kind !== "boolean" && g.kind !== "object" && g.kind !== "array" || v.kind !== "value") { - if (g.kind === "projectionDefinition" && ["string", "array"].includes(v.kind) || ["color", "formatted", "resolvedImage"].includes(g.kind) && ["value", "string"].includes(v.kind) || ["padding", "numberArray"].includes(g.kind) && ["value", "number", "array"].includes(v.kind) || g.kind === "colorArray" && ["value", "string", "array"].includes(v.kind) || g.kind === "variableAnchorOffsetCollection" && ["value", "array"].includes(v.kind)) f = a(f, g, r.typeAnnotation || "coerce"); - else if (this.checkSubtype(g, v)) return null - } else f = a(f, g, r.typeAnnotation || "assert") - } - if (!(f instanceof ga) && f.type.kind !== "resolvedImage" && this._isConstant(f)) { - const g = new mc; - try { - f = new ga(f.type, f.evaluate(g)) - } catch (v) { - return this.error(v.message), null - } - } - return f - } - return this.error(`Unknown expression "${c}". 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, r, a) { - const c = typeof t == "number" ? this.path.concat(t) : this.path, - p = a ? this.scope.concat(a) : this.scope; - return new Rs(this.registry, this._isConstant, c, r || null, p, this.errors) - } - error(t, ...r) { - const a = `${this.key}${r.map((c=>`[${c}]`)).join("")}`; - this.errors.push(new di(a, t)) - } - checkSubtype(t, r) { - const a = sn(t, r); - return a && this.error(a), a - } - } - class co { - constructor(t, r) { - this.type = r.type, this.bindings = [].concat(t), this.result = r - } - evaluate(t) { - return this.result.evaluate(t) - } - eachChild(t) { - for (const r of this.bindings) t(r[1]); - t(this.result) - } - static parse(t, r) { - if (t.length < 4) return r.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`); - const a = []; - for (let p = 1; p < t.length - 1; p += 2) { - const f = t[p]; - if (typeof f != "string") return r.error(`Expected string, but found ${typeof f} instead.`, p); - if (/[^a-zA-Z0-9_]/.test(f)) return r.error("Variable names must contain only alphanumeric characters or '_'.", p); - const g = r.parse(t[p + 1], p + 1); - if (!g) return null; - a.push([f, g]) - } - const c = r.parse(t[t.length - 1], t.length - 1, r.expectedType, a); - return c ? new co(a, c) : null - } - outputDefined() { - return this.result.outputDefined() - } - } - class Jo { - constructor(t, r) { - this.type = r.type, this.name = t, this.boundExpression = r - } - static parse(t, r) { - if (t.length !== 2 || typeof t[1] != "string") return r.error("'var' expression requires exactly one string literal argument."); - const a = t[1]; - return r.scope.has(a) ? new Jo(a, r.scope.get(a)) : r.error(`Unknown variable "${a}". Make sure "${a}" has been bound in an enclosing "let" expression before using it.`, 1) - } - evaluate(t) { - return this.boundExpression.evaluate(t) - } - eachChild() {} - outputDefined() { - return !1 - } - } - class Qo { - constructor(t, r, a) { - this.type = t, this.index = r, this.input = a - } - static parse(t, r) { - if (t.length !== 3) return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`); - const a = r.parse(t[1], 1, Ke), - c = r.parse(t[2], 2, Qr(r.expectedType || fr)); - return a && c ? new Qo(c.type.itemType, a, c) : null - } - evaluate(t) { - const r = this.index.evaluate(t), - a = this.input.evaluate(t); - if (r < 0) throw new wi(`Array index out of bounds: ${r} < 0.`); - if (r >= a.length) throw new wi(`Array index out of bounds: ${r} > ${a.length-1}.`); - if (r !== Math.floor(r)) throw new wi(`Array index must be an integer, but found ${r} instead.`); - return a[r] - } - eachChild(t) { - t(this.index), t(this.input) - } - outputDefined() { - return !1 - } - } - class el { - constructor(t, r) { - this.type = Gt, this.needle = t, this.haystack = r - } - static parse(t, r) { - if (t.length !== 3) return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`); - const a = r.parse(t[1], 1, fr), - c = r.parse(t[2], 2, fr); - return a && c ? ta(a.type, [Gt, jt, Ke, Mt, fr]) ? new el(a, c) : r.error(`Expected first argument to be of type boolean, string, number or null, but found ${Yr(a.type)} instead`) : null - } - evaluate(t) { - const r = this.needle.evaluate(t), - a = this.haystack.evaluate(t); - if (!a) return !1; - if (!Fi(r, ["boolean", "string", "number", "null"])) throw new wi(`Expected first argument to be of type boolean, string, number or null, but found ${Yr(wr(r))} instead.`); - if (!Fi(a, ["string", "array"])) throw new wi(`Expected second argument to be of type array or string, but found ${Yr(wr(a))} instead.`); - return a.indexOf(r) >= 0 - } - eachChild(t) { - t(this.needle), t(this.haystack) - } - outputDefined() { - return !0 - } - } - class va { - constructor(t, r, a) { - this.type = Ke, this.needle = t, this.haystack = r, this.fromIndex = a - } - static parse(t, r) { - if (t.length <= 2 || t.length >= 5) return r.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`); - const a = r.parse(t[1], 1, fr), - c = r.parse(t[2], 2, fr); - if (!a || !c) return null; - if (!ta(a.type, [Gt, jt, Ke, Mt, fr])) return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${Yr(a.type)} instead`); - if (t.length === 4) { - const p = r.parse(t[3], 3, Ke); - return p ? new va(a, c, p) : null - } - return new va(a, c) - } - evaluate(t) { - const r = this.needle.evaluate(t), - a = this.haystack.evaluate(t); - if (!Fi(r, ["boolean", "string", "number", "null"])) throw new wi(`Expected first argument to be of type boolean, string, number or null, but found ${Yr(wr(r))} instead.`); - let c; - if (this.fromIndex && (c = this.fromIndex.evaluate(t)), Fi(a, ["string"])) { - const p = a.indexOf(r, c); - return p === -1 ? -1 : [...a.slice(0, p)].length - } - if (Fi(a, ["array"])) return a.indexOf(r, c); - throw new wi(`Expected second argument to be of type array or string, but found ${Yr(wr(a))} instead.`) - } - eachChild(t) { - t(this.needle), t(this.haystack), this.fromIndex && t(this.fromIndex) - } - outputDefined() { - return !1 - } - } - class yn { - constructor(t, r, a, c, p, f) { - this.inputType = t, this.type = r, this.input = a, this.cases = c, this.outputs = p, this.otherwise = f - } - static parse(t, r) { - if (t.length < 5) return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`); - if (t.length % 2 != 1) return r.error("Expected an even number of arguments."); - let a, c; - r.expectedType && r.expectedType.kind !== "value" && (c = r.expectedType); - const p = {}, - f = []; - for (let S = 2; S < t.length - 1; S += 2) { - let I = t[S]; - const E = t[S + 1]; - Array.isArray(I) || (I = [I]); - const R = r.concat(S); - if (I.length === 0) return R.error("Expected at least one branch label."); - for (const j of I) { - if (typeof j != "number" && typeof j != "string") return R.error("Branch labels must be numbers or strings."); - if (typeof j == "number" && Math.abs(j) > Number.MAX_SAFE_INTEGER) return R.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`); - if (typeof j == "number" && Math.floor(j) !== j) return R.error("Numeric branch labels must be integer values."); - if (a) { - if (R.checkSubtype(a, wr(j))) return null - } else a = wr(j); - if (p[String(j)] !== void 0) return R.error("Branch labels must be unique."); - p[String(j)] = f.length - } - const N = r.parse(E, S, c); - if (!N) return null; - c = c || N.type, f.push(N) - } - const g = r.parse(t[1], 1, fr); - if (!g) return null; - const v = r.parse(t[t.length - 1], t.length - 1, c); - return v ? g.type.kind !== "value" && r.concat(1).checkSubtype(a, g.type) ? null : new yn(a, c, g, p, f, v) : null - } - evaluate(t) { - const r = this.input.evaluate(t); - return (wr(r) === this.inputType && this.outputs[this.cases[r]] || 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 Bs { - constructor(t, r, a) { - this.type = t, this.branches = r, this.otherwise = a - } - static parse(t, r) { - if (t.length < 4) return r.error(`Expected at least 3 arguments, but found only ${t.length-1}.`); - if (t.length % 2 != 0) return r.error("Expected an odd number of arguments."); - let a; - r.expectedType && r.expectedType.kind !== "value" && (a = r.expectedType); - const c = []; - for (let f = 1; f < t.length - 1; f += 2) { - const g = r.parse(t[f], f, Gt); - if (!g) return null; - const v = r.parse(t[f + 1], f + 1, a); - if (!v) return null; - c.push([g, v]), a = a || v.type - } - const p = r.parse(t[t.length - 1], t.length - 1, a); - if (!p) return null; - if (!a) throw new Error("Can't infer output type"); - return new Bs(a, c, p) - } - evaluate(t) { - for (const [r, a] of this.branches) - if (r.evaluate(t)) return a.evaluate(t); - return this.otherwise.evaluate(t) - } - eachChild(t) { - for (const [r, a] of this.branches) t(r), t(a); - t(this.otherwise) - } - outputDefined() { - return this.branches.every((([t, r]) => r.outputDefined())) && this.otherwise.outputDefined() - } - } - class uo { - constructor(t, r, a, c) { - this.type = t, this.input = r, this.beginIndex = a, this.endIndex = c - } - static parse(t, r) { - if (t.length <= 2 || t.length >= 5) return r.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`); - const a = r.parse(t[1], 1, fr), - c = r.parse(t[2], 2, Ke); - if (!a || !c) return null; - if (!ta(a.type, [Qr(fr), jt, fr])) return r.error(`Expected first argument to be of type array or string, but found ${Yr(a.type)} instead`); - if (t.length === 4) { - const p = r.parse(t[3], 3, Ke); - return p ? new uo(a.type, a, c, p) : null - } - return new uo(a.type, a, c) - } - evaluate(t) { - const r = this.input.evaluate(t), - a = this.beginIndex.evaluate(t); - let c; - if (this.endIndex && (c = this.endIndex.evaluate(t)), Fi(r, ["string"])) return [...r].slice(a, c).join(""); - if (Fi(r, ["array"])) return r.slice(a, c); - throw new wi(`Expected first argument to be of type array or string, but found ${Yr(wr(r))} instead.`) - } - eachChild(t) { - t(this.input), t(this.beginIndex), this.endIndex && t(this.endIndex) - } - outputDefined() { - return !1 - } - } - - function fs(i, t) { - const r = i.length - 1; - let a, c, p = 0, - f = r, - g = 0; - for (; p <= f;) - if (g = Math.floor((p + f) / 2), a = i[g], c = i[g + 1], a <= t) { - if (g === r || t < c) return g; - p = g + 1 - } else { - if (!(a > t)) throw new wi("Input is not a number."); - f = g - 1 - } return 0 - } - class Gi { - constructor(t, r, a) { - this.type = t, this.input = r, this.labels = [], this.outputs = []; - for (const [c, p] of a) this.labels.push(c), this.outputs.push(p) - } - static parse(t, r) { - if (t.length - 1 < 4) return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`); - if ((t.length - 1) % 2 != 0) return r.error("Expected an even number of arguments."); - const a = r.parse(t[1], 1, Ke); - if (!a) return null; - const c = []; - let p = null; - r.expectedType && r.expectedType.kind !== "value" && (p = r.expectedType); - for (let f = 1; f < t.length; f += 2) { - const g = f === 1 ? -1 / 0 : t[f], - v = t[f + 1], - S = f, - I = f + 1; - if (typeof g != "number") return r.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.', S); - if (c.length && c[c.length - 1][0] >= g) return r.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.', S); - const E = r.parse(v, I, p); - if (!E) return null; - p = p || E.type, c.push([g, E]) - } - return new Gi(p, a, c) - } - evaluate(t) { - const r = this.labels, - a = this.outputs; - if (r.length === 1) return a[0].evaluate(t); - const c = this.input.evaluate(t); - if (c <= r[0]) return a[0].evaluate(t); - const p = r.length; - return c >= r[p - 1] ? a[p - 1].evaluate(t) : a[fs(r, c)].evaluate(t) - } - eachChild(t) { - t(this.input); - for (const r of this.outputs) t(r) - } - outputDefined() { - return this.outputs.every((t => t.outputDefined())) - } - } - - function _h(i) { - return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i - } - var ho, _c, Yd = (function() { - if (_c) return ho; - - function i(t, r, a, c) { - this.cx = 3 * t, this.bx = 3 * (a - t) - this.cx, this.ax = 1 - this.cx - this.bx, this.cy = 3 * r, this.by = 3 * (c - r) - this.cy, this.ay = 1 - this.cy - this.by, this.p1x = t, this.p1y = r, this.p2x = a, this.p2y = c - } - return _c = 1, ho = i, i.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, r) { - if (r === void 0 && (r = 1e-6), t < 0) return 0; - if (t > 1) return 1; - for (var a = t, c = 0; c < 8; c++) { - var p = this.sampleCurveX(a) - t; - if (Math.abs(p) < r) return a; - var f = this.sampleCurveDerivativeX(a); - if (Math.abs(f) < 1e-6) break; - a -= p / f - } - var g = 0, - v = 1; - for (a = t, c = 0; c < 20 && (p = this.sampleCurveX(a), !(Math.abs(p - t) < r)); c++) t > p ? g = a : v = a, a = .5 * (v - g) + g; - return a - }, - solve: function(t, r) { - return this.sampleCurveY(this.solveCurveX(t, r)) - } - }, ho - })(), - Fs = _h(Yd); - class In { - constructor(t, r, a, c, p) { - this.type = t, this.operator = r, this.interpolation = a, this.input = c, this.labels = [], this.outputs = []; - for (const [f, g] of p) this.labels.push(f), this.outputs.push(g) - } - static interpolationFactor(t, r, a, c) { - let p = 0; - if (t.name === "exponential") p = po(r, t.base, a, c); - else if (t.name === "linear") p = po(r, 1, a, c); - else if (t.name === "cubic-bezier") { - const f = t.controlPoints; - p = new Fs(f[0], f[1], f[2], f[3]).solve(po(r, 1, a, c)) - } - return p - } - static parse(t, r) { - let [a, c, p, ...f] = t; - if (!Array.isArray(c) || c.length === 0) return r.error("Expected an interpolation type expression.", 1); - if (c[0] === "linear") c = { - name: "linear" - }; - else if (c[0] === "exponential") { - const S = c[1]; - if (typeof S != "number") return r.error("Exponential interpolation requires a numeric base.", 1, 1); - c = { - name: "exponential", - base: S - } - } else { - if (c[0] !== "cubic-bezier") return r.error(`Unknown interpolation type ${String(c[0])}`, 1, 0); - { - const S = c.slice(1); - if (S.length !== 4 || S.some((I => typeof I != "number" || I < 0 || I > 1))) return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.", 1); - c = { - name: "cubic-bezier", - controlPoints: S - } - } - } - if (t.length - 1 < 4) return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`); - if ((t.length - 1) % 2 != 0) return r.error("Expected an even number of arguments."); - if (p = r.parse(p, 2, Ke), !p) return null; - const g = []; - let v = null; - a !== "interpolate-hcl" && a !== "interpolate-lab" || r.expectedType == mi ? r.expectedType && r.expectedType.kind !== "value" && (v = r.expectedType) : v = Dr; - for (let S = 0; S < f.length; S += 2) { - const I = f[S], - E = f[S + 1], - R = S + 3, - N = S + 4; - if (typeof I != "number") return r.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.', R); - if (g.length && g[g.length - 1][0] >= I) return r.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.', R); - const j = r.parse(E, N, v); - if (!j) return null; - v = v || j.type, g.push([I, j]) - } - return Xi(v, Ke) || Xi(v, Gr) || Xi(v, Dr) || Xi(v, zi) || Xi(v, Li) || Xi(v, mi) || Xi(v, yi) || Xi(v, Qr(Ke)) ? new In(v, a, c, p, g) : r.error(`Type ${Yr(v)} is not interpolatable.`) - } - evaluate(t) { - const r = this.labels, - a = this.outputs; - if (r.length === 1) return a[0].evaluate(t); - const c = this.input.evaluate(t); - if (c <= r[0]) return a[0].evaluate(t); - const p = r.length; - if (c >= r[p - 1]) return a[p - 1].evaluate(t); - const f = fs(r, c), - g = In.interpolationFactor(this.interpolation, c, r[f], r[f + 1]), - v = a[f].evaluate(t), - S = a[f + 1].evaluate(t); - switch (this.operator) { - case "interpolate": - switch (this.type.kind) { - case "number": - return Jr(v, S, g); - case "color": - return yr.interpolate(v, S, g); - case "padding": - return Ki.interpolate(v, S, g); - case "colorArray": - return Ni.interpolate(v, S, g); - case "numberArray": - return cn.interpolate(v, S, g); - case "variableAnchorOffsetCollection": - return un.interpolate(v, S, g); - case "array": - return ti(v, S, g); - case "projectionDefinition": - return hn.interpolate(v, S, g) - } - case "interpolate-hcl": - switch (this.type.kind) { - case "color": - return yr.interpolate(v, S, g, "hcl"); - case "colorArray": - return Ni.interpolate(v, S, g, "hcl") - } - case "interpolate-lab": - switch (this.type.kind) { - case "color": - return yr.interpolate(v, S, g, "lab"); - case "colorArray": - return Ni.interpolate(v, S, g, "lab") - } - } - } - eachChild(t) { - t(this.input); - for (const r of this.outputs) t(r) - } - outputDefined() { - return this.outputs.every((t => t.outputDefined())) - } - } - - function po(i, t, r, a) { - const c = a - r, - p = i - r; - return c === 0 ? 0 : t === 1 ? p / c : (Math.pow(t, p) - 1) / (Math.pow(t, c) - 1) - } - const Fa = { - color: yr.interpolate, - number: Jr, - padding: Ki.interpolate, - numberArray: cn.interpolate, - colorArray: Ni.interpolate, - variableAnchorOffsetCollection: un.interpolate, - array: ti - }; - class fo { - constructor(t, r) { - this.type = t, this.args = r - } - static parse(t, r) { - if (t.length < 2) return r.error("Expected at least one argument."); - let a = null; - const c = r.expectedType; - c && c.kind !== "value" && (a = c); - const p = []; - for (const g of t.slice(1)) { - const v = r.parse(g, 1 + p.length, a, void 0, { - typeAnnotation: "omit" - }); - if (!v) return null; - a = a || v.type, p.push(v) - } - if (!a) throw new Error("No output type"); - const f = c && p.some((g => sn(c, g.type))); - return new fo(f ? fr : a, p) - } - evaluate(t) { - let r, a = null, - c = 0; - for (const p of this.args) - if (c++, a = p.evaluate(t), a && a instanceof Nn && !a.available && (r || (r = a.name), a = null, c === this.args.length && (a = r)), a !== null) break; - return a - } - eachChild(t) { - this.args.forEach(t) - } - outputDefined() { - return this.args.every((t => t.outputDefined())) - } - } - - function mo(i, t) { - return i === "==" || i === "!=" ? 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 _o(i, t, r, a) { - return a.compare(t, r) === 0 - } - - function Dn(i, t, r) { - const a = i !== "==" && i !== "!="; - return class tv { - constructor(p, f, g) { - this.type = Gt, this.lhs = p, this.rhs = f, this.collator = g, this.hasUntypedArgument = p.type.kind === "value" || f.type.kind === "value" - } - static parse(p, f) { - if (p.length !== 3 && p.length !== 4) return f.error("Expected two or three arguments."); - const g = p[0]; - let v = f.parse(p[1], 1, fr); - if (!v) return null; - if (!mo(g, v.type)) return f.concat(1).error(`"${g}" comparisons are not supported for type '${Yr(v.type)}'.`); - let S = f.parse(p[2], 2, fr); - if (!S) return null; - if (!mo(g, S.type)) return f.concat(2).error(`"${g}" comparisons are not supported for type '${Yr(S.type)}'.`); - if (v.type.kind !== S.type.kind && v.type.kind !== "value" && S.type.kind !== "value") return f.error(`Cannot compare types '${Yr(v.type)}' and '${Yr(S.type)}'.`); - a && (v.type.kind === "value" && S.type.kind !== "value" ? v = new ra(S.type, [v]) : v.type.kind !== "value" && S.type.kind === "value" && (S = new ra(v.type, [S]))); - let I = null; - if (p.length === 4) { - if (v.type.kind !== "string" && S.type.kind !== "string" && v.type.kind !== "value" && S.type.kind !== "value") return f.error("Cannot use collator to compare non-string types."); - if (I = f.parse(p[3], 3, bi), !I) return null - } - return new tv(v, S, I) - } - evaluate(p) { - const f = this.lhs.evaluate(p), - g = this.rhs.evaluate(p); - if (a && this.hasUntypedArgument) { - const v = wr(f), - S = wr(g); - if (v.kind !== S.kind || v.kind !== "string" && v.kind !== "number") throw new wi(`Expected arguments for "${i}" to be (string, string) or (number, number), but found (${v.kind}, ${S.kind}) instead.`) - } - if (this.collator && !a && this.hasUntypedArgument) { - const v = wr(f), - S = wr(g); - if (v.kind !== "string" || S.kind !== "string") return t(p, f, g) - } - return this.collator ? r(p, f, g, this.collator.evaluate(p)) : t(p, f, g) - } - eachChild(p) { - p(this.lhs), p(this.rhs), this.collator && p(this.collator) - } - outputDefined() { - return !0 - } - } - } - const gh = Dn("==", (function(i, t, r) { - return t === r - }), _o), - tl = Dn("!=", (function(i, t, r) { - return t !== r - }), (function(i, t, r, a) { - return !_o(0, t, r, a) - })), - Jd = Dn("<", (function(i, t, r) { - return t < r - }), (function(i, t, r, a) { - return a.compare(t, r) < 0 - })), - gc = Dn(">", (function(i, t, r) { - return t > r - }), (function(i, t, r, a) { - return a.compare(t, r) > 0 - })), - Qd = Dn("<=", (function(i, t, r) { - return t <= r - }), (function(i, t, r, a) { - return a.compare(t, r) <= 0 - })), - ep = Dn(">=", (function(i, t, r) { - return t >= r - }), (function(i, t, r, a) { - return a.compare(t, r) >= 0 - })); - class rl { - constructor(t, r, a) { - this.type = bi, this.locale = a, this.caseSensitive = t, this.diacriticSensitive = r - } - static parse(t, r) { - if (t.length !== 2) return r.error("Expected one argument."); - const a = t[1]; - if (typeof a != "object" || Array.isArray(a)) return r.error("Collator options argument must be an object."); - const c = r.parse(a["case-sensitive"] !== void 0 && a["case-sensitive"], 1, Gt); - if (!c) return null; - const p = r.parse(a["diacritic-sensitive"] !== void 0 && a["diacritic-sensitive"], 1, Gt); - if (!p) return null; - let f = null; - return a.locale && (f = r.parse(a.locale, 1, jt), !f) ? null : new rl(c, p, f) - } - evaluate(t) { - return new on(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 vc { - constructor(t, r, a, c, p) { - this.type = jt, this.number = t, this.locale = r, this.currency = a, this.minFractionDigits = c, this.maxFractionDigits = p - } - static parse(t, r) { - if (t.length !== 3) return r.error("Expected two arguments."); - const a = r.parse(t[1], 1, Ke); - if (!a) return null; - const c = t[2]; - if (typeof c != "object" || Array.isArray(c)) return r.error("NumberFormat options argument must be an object."); - let p = null; - if (c.locale && (p = r.parse(c.locale, 1, jt), !p)) return null; - let f = null; - if (c.currency && (f = r.parse(c.currency, 1, jt), !f)) return null; - let g = null; - if (c["min-fraction-digits"] && (g = r.parse(c["min-fraction-digits"], 1, Ke), !g)) return null; - let v = null; - return c["max-fraction-digits"] && (v = r.parse(c["max-fraction-digits"], 1, Ke), !v) ? null : new vc(a, p, f, g, v) - } - evaluate(t) { - return new Intl.NumberFormat(this.locale ? this.locale.evaluate(t) : [], { - style: this.currency ? "currency" : "decimal", - currency: this.currency ? this.currency.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.minFractionDigits && t(this.minFractionDigits), this.maxFractionDigits && t(this.maxFractionDigits) - } - outputDefined() { - return !1 - } - } - class ms { - constructor(t) { - this.type = Si, this.sections = t - } - static parse(t, r) { - if (t.length < 2) return r.error("Expected at least one argument."); - const a = t[1]; - if (!Array.isArray(a) && typeof a == "object") return r.error("First argument must be an image or text section."); - const c = []; - let p = !1; - for (let f = 1; f <= t.length - 1; ++f) { - const g = t[f]; - if (p && typeof g == "object" && !Array.isArray(g)) { - p = !1; - let v = null; - if (g["font-scale"] && (v = r.parse(g["font-scale"], 1, Ke), !v)) return null; - let S = null; - if (g["text-font"] && (S = r.parse(g["text-font"], 1, Qr(jt)), !S)) return null; - let I = null; - if (g["text-color"] && (I = r.parse(g["text-color"], 1, Dr), !I)) return null; - let E = null; - if (g["vertical-align"]) { - if (typeof g["vertical-align"] == "string" && !vn.includes(g["vertical-align"])) return r.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${g["vertical-align"]}' instead.`); - if (E = r.parse(g["vertical-align"], 1, jt), !E) return null - } - const R = c[c.length - 1]; - R.scale = v, R.font = S, R.textColor = I, R.verticalAlign = E - } else { - const v = r.parse(t[f], 1, fr); - if (!v) return null; - const S = v.type.kind; - if (S !== "string" && S !== "value" && S !== "null" && S !== "resolvedImage") return r.error("Formatted text type must be 'string', 'value', 'image' or 'null'."); - p = !0, c.push({ - content: v, - scale: null, - font: null, - textColor: null, - verticalAlign: null - }) - } - } - return new ms(c) - } - evaluate(t) { - return new ln(this.sections.map((r => { - const a = r.content.evaluate(t); - return wr(a) === rr ? new _a("", a, null, null, null, r.verticalAlign ? r.verticalAlign.evaluate(t) : null) : new _a(Vr(a), null, r.scale ? r.scale.evaluate(t) : null, r.font ? r.font.evaluate(t).join(",") : null, r.textColor ? r.textColor.evaluate(t) : null, r.verticalAlign ? r.verticalAlign.evaluate(t) : null) - }))) - } - eachChild(t) { - for (const r of this.sections) t(r.content), r.scale && t(r.scale), r.font && t(r.font), r.textColor && t(r.textColor), r.verticalAlign && t(r.verticalAlign) - } - outputDefined() { - return !1 - } - } - class yc { - constructor(t) { - this.type = rr, this.input = t - } - static parse(t, r) { - if (t.length !== 2) return r.error("Expected two arguments."); - const a = r.parse(t[1], 1, jt); - return a ? new yc(a) : r.error("No image name provided.") - } - evaluate(t) { - const r = this.input.evaluate(t), - a = Nn.fromString(r); - return a && t.availableImages && (a.available = t.availableImages.indexOf(r) > -1), a - } - eachChild(t) { - t(this.input) - } - outputDefined() { - return !1 - } - } - class il { - constructor(t) { - this.type = Ke, this.input = t - } - static parse(t, r) { - if (t.length !== 2) return r.error(`Expected 1 argument, but found ${t.length-1} instead.`); - const a = r.parse(t[1], 1); - return a ? a.type.kind !== "array" && a.type.kind !== "string" && a.type.kind !== "value" ? r.error(`Expected argument of type string or array, but found ${Yr(a.type)} instead.`) : new il(a) : null - } - evaluate(t) { - const r = this.input.evaluate(t); - if (typeof r == "string") return [...r].length; - if (Array.isArray(r)) return r.length; - throw new wi(`Expected value to be of type string or array, but found ${Yr(wr(r))} instead.`) - } - eachChild(t) { - t(this.input) - } - outputDefined() { - return !1 - } - } - const ya = 8192; - - function tp(i, t) { - const r = (180 + i[0]) / 360, - a = (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + i[1] * Math.PI / 360))) / 360, - c = Math.pow(2, t.z); - return [Math.round(r * c * ya), Math.round(a * c * ya)] - } - - function nl(i, t) { - const r = Math.pow(2, t.z); - return [(c = (i[0] / ya + t.x) / r, 360 * c - 180), (a = (i[1] / ya + t.y) / r, 360 / Math.PI * Math.atan(Math.exp((180 - 360 * a) * Math.PI / 180)) - 90)]; - var a, c - } - - function go(i, t) { - i[0] = Math.min(i[0], t[0]), i[1] = Math.min(i[1], t[1]), i[2] = Math.max(i[2], t[0]), i[3] = Math.max(i[3], t[1]) - } - - function vo(i, t) { - return !(i[0] <= t[0] || i[2] >= t[2] || i[1] <= t[1] || i[3] >= t[3]) - } - - function rp(i, t, r) { - const a = i[0] - t[0], - c = i[1] - t[1], - p = i[0] - r[0], - f = i[1] - r[1]; - return a * f - p * c == 0 && a * p <= 0 && c * f <= 0 - } - - function al(i, t, r, a) { - return (c = [a[0] - r[0], a[1] - r[1]])[0] * (p = [t[0] - i[0], t[1] - i[1]])[1] - c[1] * p[0] != 0 && !(!yh(i, t, r, a) || !yh(r, a, i, t)); - var c, p - } - - function ip(i, t, r) { - for (const a of r) - for (let c = 0; c < a.length - 1; ++c) - if (al(i, t, a[c], a[c + 1])) return !0; - return !1 - } - - function _s(i, t, r = !1) { - let a = !1; - for (const g of t) - for (let v = 0; v < g.length - 1; v++) { - if (rp(i, g[v], g[v + 1])) return r; - (p = g[v])[1] > (c = i)[1] != (f = g[v + 1])[1] > c[1] && c[0] < (f[0] - p[0]) * (c[1] - p[1]) / (f[1] - p[1]) + p[0] && (a = !a) - } - var c, p, f; - return a - } - - function vh(i, t) { - for (const r of t) - if (_s(i, r)) return !0; - return !1 - } - - function xc(i, t) { - for (const r of i) - if (!_s(r, t)) return !1; - for (let r = 0; r < i.length - 1; ++r) - if (ip(i[r], i[r + 1], t)) return !1; - return !0 - } - - function np(i, t) { - for (const r of t) - if (xc(i, r)) return !0; - return !1 - } - - function yh(i, t, r, a) { - const c = a[0] - r[0], - p = a[1] - r[1], - f = (i[0] - r[0]) * p - c * (i[1] - r[1]), - g = (t[0] - r[0]) * p - c * (t[1] - r[1]); - return f > 0 && g < 0 || f < 0 && g > 0 - } - - function bc(i, t, r) { - const a = []; - for (let c = 0; c < i.length; c++) { - const p = []; - for (let f = 0; f < i[c].length; f++) { - const g = tp(i[c][f], r); - go(t, g), p.push(g) - } - a.push(p) - } - return a - } - - function xh(i, t, r) { - const a = []; - for (let c = 0; c < i.length; c++) { - const p = bc(i[c], t, r); - a.push(p) - } - return a - } - - function sl(i, t, r, a) { - if (i[0] < r[0] || i[0] > r[2]) { - const c = .5 * a; - let p = i[0] - r[0] > c ? -a : r[0] - i[0] > c ? a : 0; - p === 0 && (p = i[0] - r[2] > c ? -a : r[2] - i[0] > c ? a : 0), i[0] += p - } - go(t, i) - } - - function bh(i, t, r, a) { - const c = Math.pow(2, a.z) * ya, - p = [a.x * ya, a.y * ya], - f = []; - for (const g of i) - for (const v of g) { - const S = [v.x + p[0], v.y + p[1]]; - sl(S, t, r, c), f.push(S) - } - return f - } - - function wh(i, t, r, a) { - const c = Math.pow(2, a.z) * ya, - p = [a.x * ya, a.y * ya], - f = []; - for (const v of i) { - const S = []; - for (const I of v) { - const E = [I.x + p[0], I.y + p[1]]; - go(t, E), S.push(E) - } - f.push(S) - } - if (t[2] - t[0] <= c / 2) { - (g = t)[0] = g[1] = 1 / 0, g[2] = g[3] = -1 / 0; - for (const v of f) - for (const S of v) sl(S, t, r, c) - } - var g; - return f - } - class gs { - constructor(t, r) { - this.type = Gt, this.geojson = t, this.geometries = r - } - static parse(t, r) { - if (t.length !== 2) return r.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`); - if (Za(t[1])) { - const a = t[1]; - if (a.type === "FeatureCollection") { - const c = []; - for (const p of a.features) { - const { - type: f, - coordinates: g - } = p.geometry; - f === "Polygon" && c.push(g), f === "MultiPolygon" && c.push(...g) - } - if (c.length) return new gs(a, { - type: "MultiPolygon", - coordinates: c - }) - } else if (a.type === "Feature") { - const c = a.geometry.type; - if (c === "Polygon" || c === "MultiPolygon") return new gs(a, a.geometry) - } else if (a.type === "Polygon" || a.type === "MultiPolygon") return new gs(a, a) - } - return r.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(r, a) { - const c = [1 / 0, 1 / 0, -1 / 0, -1 / 0], - p = [1 / 0, 1 / 0, -1 / 0, -1 / 0], - f = r.canonicalID(); - if (a.type === "Polygon") { - const g = bc(a.coordinates, p, f), - v = bh(r.geometry(), c, p, f); - if (!vo(c, p)) return !1; - for (const S of v) - if (!_s(S, g)) return !1 - } - if (a.type === "MultiPolygon") { - const g = xh(a.coordinates, p, f), - v = bh(r.geometry(), c, p, f); - if (!vo(c, p)) return !1; - for (const S of v) - if (!vh(S, g)) return !1 - } - return !0 - })(t, this.geometries); - if (t.geometryType() === "LineString") return (function(r, a) { - const c = [1 / 0, 1 / 0, -1 / 0, -1 / 0], - p = [1 / 0, 1 / 0, -1 / 0, -1 / 0], - f = r.canonicalID(); - if (a.type === "Polygon") { - const g = bc(a.coordinates, p, f), - v = wh(r.geometry(), c, p, f); - if (!vo(c, p)) return !1; - for (const S of v) - if (!xc(S, g)) return !1 - } - if (a.type === "MultiPolygon") { - const g = xh(a.coordinates, p, f), - v = wh(r.geometry(), c, p, f); - if (!vo(c, p)) return !1; - for (const S of v) - if (!np(S, g)) return !1 - } - return !0 - })(t, this.geometries) - } - return !1 - } - eachChild() {} - outputDefined() { - return !0 - } - } - let wc = class { - constructor(i = [], t = (r, a) => r < a ? -1 : r > a ? 1 : 0) { - if (this.data = i, this.length = this.data.length, this.compare = t, this.length > 0) - for (let r = (this.length >> 1) - 1; r >= 0; r--) this._down(r) - } - push(i) { - this.data.push(i), this._up(this.length++) - } - pop() { - if (this.length === 0) return; - const i = this.data[0], - t = this.data.pop(); - return --this.length > 0 && (this.data[0] = t, this._down(0)), i - } - peek() { - return this.data[0] - } - _up(i) { - const { - data: t, - compare: r - } = this, a = t[i]; - for (; i > 0;) { - const c = i - 1 >> 1, - p = t[c]; - if (r(a, p) >= 0) break; - t[i] = p, i = c - } - t[i] = a - } - _down(i) { - const { - data: t, - compare: r - } = this, a = this.length >> 1, c = t[i]; - for (; i < a;) { - let p = 1 + (i << 1); - const f = p + 1; - if (f < this.length && r(t[f], t[p]) < 0 && (p = f), r(t[p], c) >= 0) break; - t[i] = t[p], i = p - } - t[i] = c - } - }; - - function Tc(i, t, r = 0, a = i.length - 1, c = ap) { - for (; a > r;) { - if (a - r > 600) { - const v = a - r + 1, - S = t - r + 1, - I = Math.log(v), - E = .5 * Math.exp(2 * I / 3), - R = .5 * Math.sqrt(I * E * (v - E) / v) * (S - v / 2 < 0 ? -1 : 1); - Tc(i, t, Math.max(r, Math.floor(t - S * E / v + R)), Math.min(a, Math.floor(t + (v - S) * E / v + R)), c) - } - const p = i[t]; - let f = r, - g = a; - for (yo(i, r, t), c(i[a], p) > 0 && yo(i, r, a); f < g;) { - for (yo(i, f, g), f++, g--; c(i[f], p) < 0;) f++; - for (; c(i[g], p) > 0;) g-- - } - c(i[r], p) === 0 ? yo(i, r, g) : (g++, yo(i, g, a)), g <= t && (r = g + 1), t <= g && (a = g - 1) - } - } - - function yo(i, t, r) { - const a = i[t]; - i[t] = i[r], i[r] = a - } - - function ap(i, t) { - return i < t ? -1 : i > t ? 1 : 0 - } - - function xo(i, t) { - if (i.length <= 1) return [i]; - const r = []; - let a, c; - for (const p of i) { - const f = sp(p); - f !== 0 && (p.area = Math.abs(f), c === void 0 && (c = f < 0), c === f < 0 ? (a && r.push(a), a = [p]) : a.push(p)) - } - if (a && r.push(a), t > 1) - for (let p = 0; p < r.length; p++) r[p].length <= t || (Tc(r[p], t, 1, r[p].length - 1, Th), r[p] = r[p].slice(0, t)); - return r - } - - function Th(i, t) { - return t.area - i.area - } - - function sp(i) { - let t = 0; - for (let r, a, c = 0, p = i.length, f = p - 1; c < p; f = c++) r = i[c], a = i[f], t += (a.x - r.x) * (r.y + a.y); - return t - } - const Ch = 1 / 298.257223563, - Sh = Ch * (2 - Ch), - Cc = Math.PI / 180; - class Sc { - constructor(t) { - const r = 6378.137 * Cc * 1e3, - a = Math.cos(t * Cc), - c = 1 / (1 - Sh * (1 - a * a)), - p = Math.sqrt(c); - this.kx = r * p * a, this.ky = r * p * c * (1 - Sh) - } - distance(t, r) { - const a = this.wrap(t[0] - r[0]) * this.kx, - c = (t[1] - r[1]) * this.ky; - return Math.sqrt(a * a + c * c) - } - pointOnLine(t, r) { - let a, c, p, f, g = 1 / 0; - for (let v = 0; v < t.length - 1; v++) { - let S = t[v][0], - I = t[v][1], - E = this.wrap(t[v + 1][0] - S) * this.kx, - R = (t[v + 1][1] - I) * this.ky, - N = 0; - E === 0 && R === 0 || (N = (this.wrap(r[0] - S) * this.kx * E + (r[1] - I) * this.ky * R) / (E * E + R * R), N > 1 ? (S = t[v + 1][0], I = t[v + 1][1]) : N > 0 && (S += E / this.kx * N, I += R / this.ky * N)), E = this.wrap(r[0] - S) * this.kx, R = (r[1] - I) * this.ky; - const j = E * E + R * R; - j < g && (g = j, a = S, c = I, p = v, f = N) - } - return { - point: [a, c], - index: p, - t: Math.max(0, Math.min(1, f)) - } - } - wrap(t) { - for (; t < -180;) t += 360; - for (; t > 180;) t -= 360; - return t - } - } - - function Ph(i, t) { - return t[0] - i[0] - } - - function ol(i) { - return i[1] - i[0] + 1 - } - - function $a(i, t) { - return i[1] >= i[0] && i[1] < t - } - - function vi(i, t) { - if (i[0] > i[1]) return [null, null]; - const r = ol(i); - if (t) { - if (r === 2) return [i, null]; - const c = Math.floor(r / 2); - return [ - [i[0], i[0] + c], - [i[0] + c, i[1]] - ] - } - if (r === 1) return [i, null]; - const a = Math.floor(r / 2) - 1; - return [ - [i[0], i[0] + a], - [i[0] + a + 1, i[1]] - ] - } - - function Pc(i, t) { - if (!$a(t, i.length)) return [1 / 0, 1 / 0, -1 / 0, -1 / 0]; - const r = [1 / 0, 1 / 0, -1 / 0, -1 / 0]; - for (let a = t[0]; a <= t[1]; ++a) go(r, i[a]); - return r - } - - function Ic(i) { - const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0]; - for (const r of i) - for (const a of r) go(t, a); - return t - } - - function Ih(i) { - return i[0] !== -1 / 0 && i[1] !== -1 / 0 && i[2] !== 1 / 0 && i[3] !== 1 / 0 - } - - function Mc(i, t, r) { - if (!Ih(i) || !Ih(t)) return NaN; - let a = 0, - c = 0; - return i[2] < t[0] && (a = t[0] - i[2]), i[0] > t[2] && (a = i[0] - t[2]), i[1] > t[3] && (c = i[1] - t[3]), i[3] < t[1] && (c = t[1] - i[3]), r.distance([0, 0], [a, c]) - } - - function vs(i, t, r) { - const a = r.pointOnLine(t, i); - return r.distance(i, a.point) - } - - function Ac(i, t, r, a, c) { - const p = Math.min(vs(i, [r, a], c), vs(t, [r, a], c)), - f = Math.min(vs(r, [i, t], c), vs(a, [i, t], c)); - return Math.min(p, f) - } - - function op(i, t, r, a, c) { - if (!$a(t, i.length) || !$a(a, r.length)) return 1 / 0; - let p = 1 / 0; - for (let f = t[0]; f < t[1]; ++f) { - const g = i[f], - v = i[f + 1]; - for (let S = a[0]; S < a[1]; ++S) { - const I = r[S], - E = r[S + 1]; - if (al(g, v, I, E)) return 0; - p = Math.min(p, Ac(g, v, I, E, c)) - } - } - return p - } - - function lp(i, t, r, a, c) { - if (!$a(t, i.length) || !$a(a, r.length)) return NaN; - let p = 1 / 0; - for (let f = t[0]; f <= t[1]; ++f) - for (let g = a[0]; g <= a[1]; ++g) - if (p = Math.min(p, c.distance(i[f], r[g])), p === 0) return p; - return p - } - - function cp(i, t, r) { - if (_s(i, t, !0)) return 0; - let a = 1 / 0; - for (const c of t) { - const p = c[0], - f = c[c.length - 1]; - if (p !== f && (a = Math.min(a, vs(i, [f, p], r)), a === 0)) return a; - const g = r.pointOnLine(c, i); - if (a = Math.min(a, r.distance(i, g.point)), a === 0) return a - } - return a - } - - function up(i, t, r, a) { - if (!$a(t, i.length)) return NaN; - for (let p = t[0]; p <= t[1]; ++p) - if (_s(i[p], r, !0)) return 0; - let c = 1 / 0; - for (let p = t[0]; p < t[1]; ++p) { - const f = i[p], - g = i[p + 1]; - for (const v of r) - for (let S = 0, I = v.length, E = I - 1; S < I; E = S++) { - const R = v[E], - N = v[S]; - if (al(f, g, R, N)) return 0; - c = Math.min(c, Ac(f, g, R, N, a)) - } - } - return c - } - - function Mh(i, t) { - for (const r of i) - for (const a of r) - if (_s(a, t, !0)) return !0; - return !1 - } - - function hp(i, t, r, a = 1 / 0) { - const c = Ic(i), - p = Ic(t); - if (a !== 1 / 0 && Mc(c, p, r) >= a) return a; - if (vo(c, p)) { - if (Mh(i, t)) return 0 - } else if (Mh(t, i)) return 0; - let f = 1 / 0; - for (const g of i) - for (let v = 0, S = g.length, I = S - 1; v < S; I = v++) { - const E = g[I], - R = g[v]; - for (const N of t) - for (let j = 0, Z = N.length, Y = Z - 1; j < Z; Y = j++) { - const ae = N[Y], - ze = N[j]; - if (al(E, R, ae, ze)) return 0; - f = Math.min(f, Ac(E, R, ae, ze, r)) - } - } - return f - } - - function Ah(i, t, r, a, c, p) { - if (!p) return; - const f = Mc(Pc(a, p), c, r); - f < t && i.push([f, p, [0, 0]]) - } - - function ll(i, t, r, a, c, p, f) { - if (!p || !f) return; - const g = Mc(Pc(a, p), Pc(c, f), r); - g < t && i.push([g, p, f]) - } - - function cl(i, t, r, a, c = 1 / 0) { - let p = Math.min(a.distance(i[0], r[0][0]), c); - if (p === 0) return p; - const f = new wc([ - [0, [0, i.length - 1], - [0, 0] - ] - ], Ph), - g = Ic(r); - for (; f.length > 0;) { - const v = f.pop(); - if (v[0] >= p) continue; - const S = v[1], - I = t ? 50 : 100; - if (ol(S) <= I) { - if (!$a(S, i.length)) return NaN; - if (t) { - const E = up(i, S, r, a); - if (isNaN(E) || E === 0) return E; - p = Math.min(p, E) - } else - for (let E = S[0]; E <= S[1]; ++E) { - const R = cp(i[E], r, a); - if (p = Math.min(p, R), p === 0) return 0 - } - } else { - const E = vi(S, t); - Ah(f, p, a, i, g, E[0]), Ah(f, p, a, i, g, E[1]) - } - } - return p - } - - function ul(i, t, r, a, c, p = 1 / 0) { - let f = Math.min(p, c.distance(i[0], r[0])); - if (f === 0) return f; - const g = new wc([ - [0, [0, i.length - 1], - [0, r.length - 1] - ] - ], Ph); - for (; g.length > 0;) { - const v = g.pop(); - if (v[0] >= f) continue; - const S = v[1], - I = v[2], - E = t ? 50 : 100, - R = a ? 50 : 100; - if (ol(S) <= E && ol(I) <= R) { - if (!$a(S, i.length) && $a(I, r.length)) return NaN; - let N; - if (t && a) N = op(i, S, r, I, c), f = Math.min(f, N); - else if (t && !a) { - const j = i.slice(S[0], S[1] + 1); - for (let Z = I[0]; Z <= I[1]; ++Z) - if (N = vs(r[Z], j, c), f = Math.min(f, N), f === 0) return f - } else if (!t && a) { - const j = r.slice(I[0], I[1] + 1); - for (let Z = S[0]; Z <= S[1]; ++Z) - if (N = vs(i[Z], j, c), f = Math.min(f, N), f === 0) return f - } else N = lp(i, S, r, I, c), f = Math.min(f, N) - } else { - const N = vi(S, t), - j = vi(I, a); - ll(g, f, c, i, r, N[0], j[0]), ll(g, f, c, i, r, N[0], j[1]), ll(g, f, c, i, r, N[1], j[0]), ll(g, f, c, i, r, N[1], j[1]) - } - } - return f - } - - function kc(i) { - return i.type === "MultiPolygon" ? i.coordinates.map((t => ({ - type: "Polygon", - coordinates: t - }))) : i.type === "MultiLineString" ? i.coordinates.map((t => ({ - type: "LineString", - coordinates: t - }))) : i.type === "MultiPoint" ? i.coordinates.map((t => ({ - type: "Point", - coordinates: t - }))) : [i] - } - class ys { - constructor(t, r) { - this.type = Ke, this.geojson = t, this.geometries = r - } - static parse(t, r) { - if (t.length !== 2) return r.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`); - if (Za(t[1])) { - const a = t[1]; - if (a.type === "FeatureCollection") return new ys(a, a.features.map((c => kc(c.geometry))).flat()); - if (a.type === "Feature") return new ys(a, kc(a.geometry)); - if ("type" in a && "coordinates" in a) return new ys(a, kc(a)) - } - return r.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(r, a) { - const c = r.geometry(), - p = c.flat().map((v => nl([v.x, v.y], r.canonical))); - if (c.length === 0) return NaN; - const f = new Sc(p[0][1]); - let g = 1 / 0; - for (const v of a) { - switch (v.type) { - case "Point": - g = Math.min(g, ul(p, !1, [v.coordinates], !1, f, g)); - break; - case "LineString": - g = Math.min(g, ul(p, !1, v.coordinates, !0, f, g)); - break; - case "Polygon": - g = Math.min(g, cl(p, !1, v.coordinates, f, g)) - } - if (g === 0) return g - } - return g - })(t, this.geometries); - if (t.geometryType() === "LineString") return (function(r, a) { - const c = r.geometry(), - p = c.flat().map((v => nl([v.x, v.y], r.canonical))); - if (c.length === 0) return NaN; - const f = new Sc(p[0][1]); - let g = 1 / 0; - for (const v of a) { - switch (v.type) { - case "Point": - g = Math.min(g, ul(p, !0, [v.coordinates], !1, f, g)); - break; - case "LineString": - g = Math.min(g, ul(p, !0, v.coordinates, !0, f, g)); - break; - case "Polygon": - g = Math.min(g, cl(p, !0, v.coordinates, f, g)) - } - if (g === 0) return g - } - return g - })(t, this.geometries); - if (t.geometryType() === "Polygon") return (function(r, a) { - const c = r.geometry(); - if (c.length === 0 || c[0].length === 0) return NaN; - const p = xo(c, 0).map((v => v.map((S => S.map((I => nl([I.x, I.y], r.canonical))))))), - f = new Sc(p[0][0][0][1]); - let g = 1 / 0; - for (const v of a) - for (const S of p) { - switch (v.type) { - case "Point": - g = Math.min(g, cl([v.coordinates], !1, S, f, g)); - break; - case "LineString": - g = Math.min(g, cl(v.coordinates, !0, S, f, g)); - break; - case "Polygon": - g = Math.min(g, hp(S, v.coordinates, f, g)) - } - if (g === 0) return g - } - return g - })(t, this.geometries) - } - return NaN - } - eachChild() {} - outputDefined() { - return !0 - } - } - class bo { - constructor(t) { - this.type = fr, this.key = t - } - static parse(t, r) { - if (t.length !== 2) return r.error(`Expected 1 argument, but found ${t.length-1} instead.`); - const a = t[1]; - return a == null ? r.error("Global state property must be defined.") : typeof a != "string" ? r.error(`Global state property must be string, but found ${typeof t[1]} instead.`) : new bo(a) - } - evaluate(t) { - var r; - const a = (r = t.globals) === null || r === void 0 ? void 0 : r.globalState; - return a && Object.keys(a).length !== 0 ? gi(a, this.key) : null - } - eachChild() {} - outputDefined() { - return !1 - } - } - const Os = { - "==": gh, - "!=": tl, - ">": gc, - "<": Jd, - ">=": ep, - "<=": Qd, - array: ra, - at: Qo, - boolean: ra, - case: Bs, - coalesce: fo, - collator: rl, - format: ms, - image: yc, - in: el, - "index-of": va, - interpolate: In, - "interpolate-hcl": In, - "interpolate-lab": In, - length: il, - let: co, - literal: ga, - match: yn, - number: ra, - "number-format": vc, - object: ra, - slice: uo, - step: Gi, - string: ra, - "to-boolean": Ba, - "to-color": Ba, - "to-number": Ba, - "to-string": Ba, - var: Jo, - within: gs, - distance: ys, - "global-state": bo - }; - class ca { - constructor(t, r, a, c) { - this.name = t, this.type = r, this._evaluate = a, this.args = c - } - evaluate(t) { - return this._evaluate(t, this.args) - } - eachChild(t) { - this.args.forEach(t) - } - outputDefined() { - return !1 - } - static parse(t, r) { - const a = t[0], - c = ca.definitions[a]; - if (!c) return r.error(`Unknown expression "${a}". If you wanted a literal array, use ["literal", [...]].`, 0); - const p = Array.isArray(c) ? c[0] : c.type, - f = Array.isArray(c) ? [ - [c[1], c[2]] - ] : c.overloads, - g = f.filter((([S]) => !Array.isArray(S) || S.length === t.length - 1)); - let v = null; - for (const [S, I] of g) { - v = new Rs(r.registry, hl, r.path, null, r.scope); - const E = []; - let R = !1; - for (let N = 1; N < t.length; N++) { - const j = t[N], - Z = Array.isArray(S) ? S[N - 1] : S.type, - Y = v.parse(j, 1 + E.length, Z); - if (!Y) { - R = !0; - break - } - E.push(Y) - } - if (!R) - if (Array.isArray(S) && S.length !== E.length) v.error(`Expected ${S.length} arguments, but found ${E.length} instead.`); - else { - for (let N = 0; N < E.length; N++) { - const j = Array.isArray(S) ? S[N] : S.type, - Z = E[N]; - v.concat(N + 1).checkSubtype(j, Z.type) - } - if (v.errors.length === 0) return new ca(a, p, I, E) - } - } - if (g.length === 1) r.errors.push(...v.errors); - else { - const S = (g.length ? g : f).map((([E]) => { - return R = E, Array.isArray(R) ? `(${R.map(Yr).join(", ")})` : `(${Yr(R.type)}...)`; - var R - })).join(" | "), - I = []; - for (let E = 1; E < t.length; E++) { - const R = r.parse(t[E], 1 + I.length); - if (!R) return null; - I.push(Yr(R.type)) - } - r.error(`Expected arguments of type ${S}, but found (${I.join(", ")}) instead.`) - } - return null - } - static register(t, r) { - ca.definitions = r; - for (const a in r) t[a] = ca - } - } - - function kh(i, [t, r, a, c]) { - t = t.evaluate(i), r = r.evaluate(i), a = a.evaluate(i); - const p = c ? c.evaluate(i) : 1, - f = Ti(t, r, a, p); - if (f) throw new wi(f); - return new yr(t / 255, r / 255, a / 255, p, !1) - } - - function Eh(i, t) { - return i in t - } - - function Ec(i, t) { - const r = t[i]; - return r === void 0 ? null : r - } - - function xs(i) { - return { - type: i - } - } - - function hl(i) { - if (i instanceof Jo) return hl(i.boundExpression); - if (i instanceof ca && i.name === "error" || i instanceof rl || i instanceof gs || i instanceof ys || i instanceof bo) return !1; - const t = i instanceof Ba || i instanceof ra; - let r = !0; - return i.eachChild((a => { - r = t ? r && hl(a) : r && a instanceof ga - })), !!r && dl(i) && pl(i, ["zoom", "heatmap-density", "elevation", "line-progress", "accumulated", "is-supported-script"]) - } - - function dl(i) { - if (i instanceof ca && (i.name === "get" && i.args.length === 1 || i.name === "feature-state" || i.name === "has" && i.args.length === 1 || i.name === "properties" || i.name === "geometry-type" || i.name === "id" || /^filter-/.test(i.name)) || i instanceof gs || i instanceof ys) return !1; - let t = !0; - return i.eachChild((r => { - t && !dl(r) && (t = !1) - })), t - } - - function wo(i) { - if (i instanceof ca && i.name === "feature-state") return !1; - let t = !0; - return i.eachChild((r => { - t && !wo(r) && (t = !1) - })), t - } - - function pl(i, t) { - if (i instanceof ca && t.indexOf(i.name) >= 0) return !1; - let r = !0; - return i.eachChild((a => { - r && !pl(a, t) && (r = !1) - })), r - } - - function zh(i) { - return { - result: "success", - value: i - } - } - - function Ns(i) { - return { - result: "error", - value: i - } - } - - function rs(i) { - return i["property-type"] === "data-driven" || i["property-type"] === "cross-faded-data-driven" - } - - function Lh(i) { - return !!i.expression && i.expression.parameters.indexOf("zoom") > -1 - } - - function zc(i) { - return !!i.expression && i.expression.interpolated - } - - function ii(i) { - return i instanceof Number ? "number" : i instanceof String ? "string" : i instanceof Boolean ? "boolean" : Array.isArray(i) ? "array" : i === null ? "null" : typeof i - } - - function To(i) { - return typeof i == "object" && i !== null && !Array.isArray(i) && wr(i) === li - } - - function dp(i) { - return i - } - - function Dh(i, t) { - const r = i.stops && typeof i.stops[0][0] == "object", - a = r || !(r || i.property !== void 0), - c = i.type || (zc(t) ? "exponential" : "interval"), - p = (function(I) { - switch (I.type) { - case "color": - return yr.parse; - case "padding": - return Ki.parse; - case "numberArray": - return cn.parse; - case "colorArray": - return Ni.parse; - default: - return null - } - })(t); - if (p && ((i = Ci({}, i)).stops && (i.stops = i.stops.map((I => [I[0], p(I[1])]))), i.default = p(i.default ? i.default : t.default)), i.colorSpace && (f = i.colorSpace) !== "rgb" && f !== "hcl" && f !== "lab") throw new Error(`Unknown color space: "${i.colorSpace}"`); - var f; - const g = (function(I) { - switch (I) { - case "exponential": - return Bh; - case "interval": - return pp; - case "categorical": - return Rh; - case "identity": - return fp; - default: - throw new Error(`Unknown function type "${I}"`) - } - })(c); - let v, S; - if (c === "categorical") { - v = Object.create(null); - for (const I of i.stops) v[I[0]] = I[1]; - S = typeof i.stops[0][0] - } - if (r) { - const I = {}, - E = []; - for (let j = 0; j < i.stops.length; j++) { - const Z = i.stops[j], - Y = Z[0].zoom; - I[Y] === void 0 && (I[Y] = { - zoom: Y, - type: i.type, - property: i.property, - default: i.default, - stops: [] - }, E.push(Y)), I[Y].stops.push([Z[0].value, Z[1]]) - } - const R = []; - for (const j of E) R.push([I[j].zoom, Dh(I[j], t)]); - const N = { - name: "linear" - }; - return { - kind: "composite", - interpolationType: N, - interpolationFactor: In.interpolationFactor.bind(void 0, N), - zoomStops: R.map((j => j[0])), - evaluate: ({ - zoom: j - }, Z) => Bh({ - stops: R, - base: i.base - }, t, j).evaluate(j, Z) - } - } - if (a) { - const I = c === "exponential" ? { - name: "exponential", - base: i.base !== void 0 ? i.base : 1 - } : null; - return { - kind: "camera", - interpolationType: I, - interpolationFactor: In.interpolationFactor.bind(void 0, I), - zoomStops: i.stops.map((E => E[0])), - evaluate: ({ - zoom: E - }) => g(i, t, E, v, S) - } - } - return { - kind: "source", - evaluate(I, E) { - const R = E && E.properties ? E.properties[i.property] : void 0; - return R === void 0 ? is(i.default, t.default) : g(i, t, R, v, S) - } - } - } - - function is(i, t, r) { - return i !== void 0 ? i : t !== void 0 ? t : r !== void 0 ? r : void 0 - } - - function Rh(i, t, r, a, c) { - return is(typeof r === c ? a[r] : void 0, i.default, t.default) - } - - function pp(i, t, r) { - if (ii(r) !== "number") return is(i.default, t.default); - const a = i.stops.length; - if (a === 1 || r <= i.stops[0][0]) return i.stops[0][1]; - if (r >= i.stops[a - 1][0]) return i.stops[a - 1][1]; - const c = fs(i.stops.map((p => p[0])), r); - return i.stops[c][1] - } - - function Bh(i, t, r) { - const a = i.base !== void 0 ? i.base : 1; - if (ii(r) !== "number") return is(i.default, t.default); - const c = i.stops.length; - if (c === 1 || r <= i.stops[0][0]) return i.stops[0][1]; - if (r >= i.stops[c - 1][0]) return i.stops[c - 1][1]; - const p = fs(i.stops.map((I => I[0])), r), - f = (function(I, E, R, N) { - const j = N - R, - Z = I - R; - return j === 0 ? 0 : E === 1 ? Z / j : (Math.pow(E, Z) - 1) / (Math.pow(E, j) - 1) - })(r, a, i.stops[p][0], i.stops[p + 1][0]), - g = i.stops[p][1], - v = i.stops[p + 1][1], - S = Fa[t.type] || dp; - return typeof g.evaluate == "function" ? { - evaluate(...I) { - const E = g.evaluate.apply(void 0, I), - R = v.evaluate.apply(void 0, I); - if (E !== void 0 && R !== void 0) return S(E, R, f, i.colorSpace) - } - } : S(g, v, f, i.colorSpace) - } - - function fp(i, t, r) { - switch (t.type) { - case "color": - r = yr.parse(r); - break; - case "formatted": - r = ln.fromString(r.toString()); - break; - case "resolvedImage": - r = Nn.fromString(r.toString()); - break; - case "padding": - r = Ki.parse(r); - break; - case "colorArray": - r = Ni.parse(r); - break; - case "numberArray": - r = cn.parse(r); - break; - default: - ii(r) === t.type || t.type === "enum" && t.values[r] || (r = void 0) - } - return is(r, i.default, t.default) - } - ca.register(Os, { - error: [{ - kind: "error" - }, - [jt], (i, [t]) => { - throw new wi(t.evaluate(i)) - } - ], - typeof: [jt, [fr], (i, [t]) => Yr(wr(t.evaluate(i)))], - "to-rgba": [Qr(Ke, 4), [Dr], (i, [t]) => { - const [r, a, c, p] = t.evaluate(i).rgb; - return [255 * r, 255 * a, 255 * c, p] - }], - rgb: [Dr, [Ke, Ke, Ke], kh], - rgba: [Dr, [Ke, Ke, Ke, Ke], kh], - has: { - type: Gt, - overloads: [ - [ - [jt], (i, [t]) => Eh(t.evaluate(i), i.properties()) - ], - [ - [jt, li], (i, [t, r]) => Eh(t.evaluate(i), r.evaluate(i)) - ] - ] - }, - get: { - type: fr, - overloads: [ - [ - [jt], (i, [t]) => Ec(t.evaluate(i), i.properties()) - ], - [ - [jt, li], (i, [t, r]) => Ec(t.evaluate(i), r.evaluate(i)) - ] - ] - }, - "feature-state": [fr, [jt], (i, [t]) => Ec(t.evaluate(i), i.featureState || {})], - properties: [li, [], i => i.properties()], - "geometry-type": [jt, [], i => i.geometryType()], - id: [fr, [], i => i.id()], - zoom: [Ke, [], i => i.globals.zoom], - "heatmap-density": [Ke, [], i => i.globals.heatmapDensity || 0], - elevation: [Ke, [], i => i.globals.elevation || 0], - "line-progress": [Ke, [], i => i.globals.lineProgress || 0], - accumulated: [fr, [], i => i.globals.accumulated === void 0 ? null : i.globals.accumulated], - "+": [Ke, xs(Ke), (i, t) => { - let r = 0; - for (const a of t) r += a.evaluate(i); - return r - }], - "*": [Ke, xs(Ke), (i, t) => { - let r = 1; - for (const a of t) r *= a.evaluate(i); - return r - }], - "-": { - type: Ke, - overloads: [ - [ - [Ke, Ke], (i, [t, r]) => t.evaluate(i) - r.evaluate(i) - ], - [ - [Ke], (i, [t]) => -t.evaluate(i) - ] - ] - }, - "/": [Ke, [Ke, Ke], (i, [t, r]) => t.evaluate(i) / r.evaluate(i)], - "%": [Ke, [Ke, Ke], (i, [t, r]) => t.evaluate(i) % r.evaluate(i)], - ln2: [Ke, [], () => Math.LN2], - pi: [Ke, [], () => Math.PI], - e: [Ke, [], () => Math.E], - "^": [Ke, [Ke, Ke], (i, [t, r]) => Math.pow(t.evaluate(i), r.evaluate(i))], - sqrt: [Ke, [Ke], (i, [t]) => Math.sqrt(t.evaluate(i))], - log10: [Ke, [Ke], (i, [t]) => Math.log(t.evaluate(i)) / Math.LN10], - ln: [Ke, [Ke], (i, [t]) => Math.log(t.evaluate(i))], - log2: [Ke, [Ke], (i, [t]) => Math.log(t.evaluate(i)) / Math.LN2], - sin: [Ke, [Ke], (i, [t]) => Math.sin(t.evaluate(i))], - cos: [Ke, [Ke], (i, [t]) => Math.cos(t.evaluate(i))], - tan: [Ke, [Ke], (i, [t]) => Math.tan(t.evaluate(i))], - asin: [Ke, [Ke], (i, [t]) => Math.asin(t.evaluate(i))], - acos: [Ke, [Ke], (i, [t]) => Math.acos(t.evaluate(i))], - atan: [Ke, [Ke], (i, [t]) => Math.atan(t.evaluate(i))], - min: [Ke, xs(Ke), (i, t) => Math.min(...t.map((r => r.evaluate(i))))], - max: [Ke, xs(Ke), (i, t) => Math.max(...t.map((r => r.evaluate(i))))], - abs: [Ke, [Ke], (i, [t]) => Math.abs(t.evaluate(i))], - round: [Ke, [Ke], (i, [t]) => { - const r = t.evaluate(i); - return r < 0 ? -Math.round(-r) : Math.round(r) - }], - floor: [Ke, [Ke], (i, [t]) => Math.floor(t.evaluate(i))], - ceil: [Ke, [Ke], (i, [t]) => Math.ceil(t.evaluate(i))], - "filter-==": [Gt, [jt, fr], (i, [t, r]) => i.properties()[t.value] === r.value], - "filter-id-==": [Gt, [fr], (i, [t]) => i.id() === t.value], - "filter-type-==": [Gt, [jt], (i, [t]) => i.geometryType() === t.value], - "filter-<": [Gt, [jt, fr], (i, [t, r]) => { - const a = i.properties()[t.value], - c = r.value; - return typeof a == typeof c && a < c - }], - "filter-id-<": [Gt, [fr], (i, [t]) => { - const r = i.id(), - a = t.value; - return typeof r == typeof a && r < a - }], - "filter->": [Gt, [jt, fr], (i, [t, r]) => { - const a = i.properties()[t.value], - c = r.value; - return typeof a == typeof c && a > c - }], - "filter-id->": [Gt, [fr], (i, [t]) => { - const r = i.id(), - a = t.value; - return typeof r == typeof a && r > a - }], - "filter-<=": [Gt, [jt, fr], (i, [t, r]) => { - const a = i.properties()[t.value], - c = r.value; - return typeof a == typeof c && a <= c - }], - "filter-id-<=": [Gt, [fr], (i, [t]) => { - const r = i.id(), - a = t.value; - return typeof r == typeof a && r <= a - }], - "filter->=": [Gt, [jt, fr], (i, [t, r]) => { - const a = i.properties()[t.value], - c = r.value; - return typeof a == typeof c && a >= c - }], - "filter-id->=": [Gt, [fr], (i, [t]) => { - const r = i.id(), - a = t.value; - return typeof r == typeof a && r >= a - }], - "filter-has": [Gt, [fr], (i, [t]) => t.value in i.properties()], - "filter-has-id": [Gt, [], i => i.id() !== null && i.id() !== void 0], - "filter-type-in": [Gt, [Qr(jt)], (i, [t]) => t.value.indexOf(i.geometryType()) >= 0], - "filter-id-in": [Gt, [Qr(fr)], (i, [t]) => t.value.indexOf(i.id()) >= 0], - "filter-in-small": [Gt, [jt, Qr(fr)], (i, [t, r]) => r.value.indexOf(i.properties()[t.value]) >= 0], - "filter-in-large": [Gt, [jt, Qr(fr)], (i, [t, r]) => (function(a, c, p, f) { - for (; p <= f;) { - const g = p + f >> 1; - if (c[g] === a) return !0; - c[g] > a ? f = g - 1 : p = g + 1 - } - return !1 - })(i.properties()[t.value], r.value, 0, r.value.length - 1)], - all: { - type: Gt, - overloads: [ - [ - [Gt, Gt], (i, [t, r]) => t.evaluate(i) && r.evaluate(i) - ], - [xs(Gt), (i, t) => { - for (const r of t) - if (!r.evaluate(i)) return !1; - return !0 - }] - ] - }, - any: { - type: Gt, - overloads: [ - [ - [Gt, Gt], (i, [t, r]) => t.evaluate(i) || r.evaluate(i) - ], - [xs(Gt), (i, t) => { - for (const r of t) - if (r.evaluate(i)) return !0; - return !1 - }] - ] - }, - "!": [Gt, [Gt], (i, [t]) => !t.evaluate(i)], - "is-supported-script": [Gt, [jt], (i, [t]) => { - const r = i.globals && i.globals.isSupportedScript; - return !r || r(t.evaluate(i)) - }], - upcase: [jt, [jt], (i, [t]) => t.evaluate(i).toUpperCase()], - downcase: [jt, [jt], (i, [t]) => t.evaluate(i).toLowerCase()], - concat: [jt, xs(fr), (i, t) => t.map((r => Vr(r.evaluate(i)))).join("")], - "resolved-locale": [jt, [bi], (i, [t]) => t.evaluate(i).resolvedLocale()] - }); - class Lc { - constructor(t, r) { - this.expression = t, this._warningHistory = {}, this._evaluator = new mc, this._defaultValue = r ? (function(a) { - if (a.type === "color" && To(a.default)) return new yr(0, 0, 0, 0); - switch (a.type) { - case "color": - return yr.parse(a.default) || null; - case "padding": - return Ki.parse(a.default) || null; - case "numberArray": - return cn.parse(a.default) || null; - case "colorArray": - return Ni.parse(a.default) || null; - case "variableAnchorOffsetCollection": - return un.parse(a.default) || null; - case "projectionDefinition": - return hn.parse(a.default) || null; - default: - return a.default === void 0 ? null : a.default - } - })(r) : null, this._enumValues = r && r.type === "enum" ? r.values : null - } - evaluateWithoutErrorHandling(t, r, a, c, p, f) { - return this._evaluator.globals = t, this._evaluator.feature = r, this._evaluator.featureState = a, this._evaluator.canonical = c, this._evaluator.availableImages = p || null, this._evaluator.formattedSection = f, this.expression.evaluate(this._evaluator) - } - evaluate(t, r, a, c, p, f) { - this._evaluator.globals = t, this._evaluator.feature = r || null, this._evaluator.featureState = a || null, this._evaluator.canonical = c, this._evaluator.availableImages = p || null, this._evaluator.formattedSection = f || null; - try { - const g = this.expression.evaluate(this._evaluator); - if (g == null || typeof g == "number" && g != g) return this._defaultValue; - if (this._enumValues && !(g in this._enumValues)) throw new wi(`Expected value to be one of ${Object.keys(this._enumValues).map((v=>JSON.stringify(v))).join(", ")}, but found ${JSON.stringify(g)} instead.`); - return g - } catch (g) { - return this._warningHistory[g.message] || (this._warningHistory[g.message] = !0, typeof console < "u" && console.warn(g.message)), this._defaultValue - } - } - } - - function fl(i) { - return Array.isArray(i) && i.length > 0 && typeof i[0] == "string" && i[0] in Os - } - - function Co(i, t) { - const r = new Rs(Os, hl, [], t ? (function(c) { - const p = { - color: Dr, - string: jt, - number: Ke, - enum: jt, - boolean: Gt, - formatted: Si, - padding: zi, - numberArray: Li, - colorArray: mi, - projectionDefinition: Gr, - resolvedImage: rr, - variableAnchorOffsetCollection: yi - }; - return c.type === "array" ? Qr(p[c.value] || fr, c.length) : p[c.type] - })(t) : void 0), - a = r.parse(i, void 0, void 0, void 0, t && t.type === "string" ? { - typeAnnotation: "coerce" - } : void 0); - return a ? zh(new Lc(a, t)) : Ns(r.errors) - } - class So { - constructor(t, r) { - this.kind = t, this._styleExpression = r, this.isStateDependent = t !== "constant" && !wo(r.expression), this.globalStateRefs = Mo(r.expression) - } - evaluateWithoutErrorHandling(t, r, a, c, p, f) { - return this._styleExpression.evaluateWithoutErrorHandling(t, r, a, c, p, f) - } - evaluate(t, r, a, c, p, f) { - return this._styleExpression.evaluate(t, r, a, c, p, f) - } - } - class Dc { - constructor(t, r, a, c) { - this.kind = t, this.zoomStops = a, this._styleExpression = r, this.isStateDependent = t !== "camera" && !wo(r.expression), this.globalStateRefs = Mo(r.expression), this.interpolationType = c - } - evaluateWithoutErrorHandling(t, r, a, c, p, f) { - return this._styleExpression.evaluateWithoutErrorHandling(t, r, a, c, p, f) - } - evaluate(t, r, a, c, p, f) { - return this._styleExpression.evaluate(t, r, a, c, p, f) - } - interpolationFactor(t, r, a) { - return this.interpolationType ? In.interpolationFactor(this.interpolationType, t, r, a) : 0 - } - } - - function Fh(i, t) { - const r = Co(i, t); - if (r.result === "error") return r; - const a = r.value.expression, - c = dl(a); - if (!c && !rs(t)) return Ns([new di("", "data expressions not supported")]); - const p = pl(a, ["zoom"]); - if (!p && !Lh(t)) return Ns([new di("", "zoom expressions not supported")]); - const f = Io(a); - return f || p ? f instanceof di ? Ns([f]) : f instanceof In && !zc(t) ? Ns([new di("", '"interpolate" expressions cannot be used with this property')]) : zh(f ? new Dc(c ? "camera" : "composite", r.value, f.labels, f instanceof In ? f.interpolation : void 0) : new So(c ? "constant" : "source", r.value)) : Ns([new di("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]) - } - class Po { - constructor(t, r) { - this._parameters = t, this._specification = r, Ci(this, Dh(this._parameters, this._specification)) - } - static deserialize(t) { - return new Po(t._parameters, t._specification) - } - static serialize(t) { - return { - _parameters: t._parameters, - _specification: t._specification - } - } - } - - function Io(i) { - let t = null; - if (i instanceof co) t = Io(i.result); - else if (i instanceof fo) { - for (const r of i.args) - if (t = Io(r), t) break - } else(i instanceof Gi || i instanceof In) && i.input instanceof ca && i.input.name === "zoom" && (t = i); - return t instanceof di || i.eachChild((r => { - const a = Io(r); - a instanceof di ? t = a : !t && a ? t = new di("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.') : t && a && t !== a && (t = new di("", 'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.')) - })), t - } - - function Mo(i, t = new Set) { - return i instanceof bo && t.add(i.key), i.eachChild((r => { - Mo(r, t) - })), t - } - - function ml(i) { - if (i === !0 || i === !1) return !0; - if (!Array.isArray(i) || i.length === 0) return !1; - switch (i[0]) { - case "has": - return i.length >= 2 && i[1] !== "$id" && i[1] !== "$type"; - case "in": - return i.length >= 3 && (typeof i[1] != "string" || Array.isArray(i[2])); - case "!in": - case "!has": - case "none": - return !1; - case "==": - case "!=": - case ">": - case ">=": - case "<": - case "<=": - return i.length !== 3 || Array.isArray(i[1]) || Array.isArray(i[2]); - case "any": - case "all": - for (const t of i.slice(1)) - if (!ml(t) && typeof t != "boolean") return !1; - return !0; - default: - return !0 - } - } - const Rc = { - type: "boolean", - default: !1, - transition: !1, - "property-type": "data-driven", - expression: { - interpolated: !1, - parameters: ["zoom", "feature"] - } - }; - - function bs(i) { - if (i == null) return { - filter: () => !0, - needGeometry: !1, - getGlobalStateRefs: () => new Set - }; - ml(i) || (i = ws(i)); - const t = Co(i, Rc); - if (t.result === "error") throw new Error(t.value.map((r => `${r.key}: ${r.message}`)).join(", ")); - return { - filter: (r, a, c) => t.value.evaluate(r, a, {}, c), - needGeometry: _l(i), - getGlobalStateRefs: () => Mo(t.value.expression) - } - } - - function Bc(i, t) { - return i < t ? -1 : i > t ? 1 : 0 - } - - function _l(i) { - if (!Array.isArray(i)) return !1; - if (i[0] === "within" || i[0] === "distance") return !0; - for (let t = 1; t < i.length; t++) - if (_l(i[t])) return !0; - return !1 - } - - function ws(i) { - if (!i) return !0; - const t = i[0]; - return i.length <= 1 ? t !== "any" : t === "==" ? Fc(i[1], i[2], "==") : t === "!=" ? gl(Fc(i[1], i[2], "==")) : t === "<" || t === ">" || t === "<=" || t === ">=" ? Fc(i[1], i[2], t) : t === "any" ? (r = i.slice(1), ["any"].concat(r.map(ws))) : t === "all" ? ["all"].concat(i.slice(1).map(ws)) : t === "none" ? ["all"].concat(i.slice(1).map(ws).map(gl)) : t === "in" ? Oh(i[1], i.slice(2)) : t === "!in" ? gl(Oh(i[1], i.slice(2))) : t === "has" ? Nh(i[1]) : t !== "!has" || gl(Nh(i[1])); - var r - } - - function Fc(i, t, r) { - switch (i) { - case "$type": - return [`filter-type-${r}`, t]; - case "$id": - return [`filter-id-${r}`, t]; - default: - return [`filter-${r}`, i, t] - } - } - - function Oh(i, t) { - if (t.length === 0) return !1; - switch (i) { - case "$type": - return ["filter-type-in", ["literal", t]]; - case "$id": - return ["filter-id-in", ["literal", t]]; - default: - return t.length > 200 && !t.some((r => typeof r != typeof t[0])) ? ["filter-in-large", i, ["literal", t.sort(Bc)]] : ["filter-in-small", i, ["literal", t]] - } - } - - function Nh(i) { - switch (i) { - case "$type": - return !0; - case "$id": - return ["filter-has-id"]; - default: - return ["filter-has", i] - } - } - - function gl(i) { - return ["!", i] - } - - function Oc(i) { - const t = typeof i; - if (t === "number" || t === "boolean" || t === "string" || i == null) return JSON.stringify(i); - if (Array.isArray(i)) { - let c = "["; - for (const p of i) c += `${Oc(p)},`; - return `${c}]` - } - const r = Object.keys(i).sort(); - let a = "{"; - for (let c = 0; c < r.length; c++) a += `${JSON.stringify(r[c])}:${Oc(i[r[c]])},`; - return `${a}}` - } - - function mp(i) { - let t = ""; - for (const r of At) t += `/${Oc(i[r])}`; - return t - } - - function Nc(i) { - const t = i.value; - return t ? [new Tt(i.key, t, "constants have been deprecated as of v8")] : [] - } - - function Vi(i) { - return i instanceof Number || i instanceof String || i instanceof Boolean ? i.valueOf() : i - } - - function Oa(i) { - if (Array.isArray(i)) return i.map(Oa); - if (i instanceof Object && !(i instanceof Number || i instanceof String || i instanceof Boolean)) { - const t = {}; - for (const r in i) t[r] = Oa(i[r]); - return t - } - return Vi(i) - } - - function ua(i) { - const t = i.key, - r = i.value, - a = i.valueSpec || {}, - c = i.objectElementValidators || {}, - p = i.style, - f = i.styleSpec, - g = i.validateSpec; - let v = []; - const S = ii(r); - if (S !== "object") return [new Tt(t, r, `object expected, ${S} found`)]; - for (const I in r) { - const E = I.split(".")[0], - R = gi(a, E) || a["*"]; - let N; - if (gi(c, E)) N = c[E]; - else if (gi(a, E)) N = g; - else if (c["*"]) N = c["*"]; - else { - if (!a["*"]) { - v.push(new Tt(t, r[I], `unknown property "${I}"`)); - continue - } - N = g - } - v = v.concat(N({ - key: (t && `${t}.`) + I, - value: r[I], - valueSpec: R, - style: p, - styleSpec: f, - object: r, - objectKey: I, - validateSpec: g - }, r)) - } - for (const I in a) c[I] || a[I].required && a[I].default === void 0 && r[I] === void 0 && v.push(new Tt(t, r, `missing required property "${I}"`)); - return v - } - - function vl(i) { - const t = i.value, - r = i.valueSpec, - a = i.style, - c = i.styleSpec, - p = i.key, - f = i.arrayElementValidator || i.validateSpec; - if (ii(t) !== "array") return [new Tt(p, t, `array expected, ${ii(t)} found`)]; - if (r.length && t.length !== r.length) return [new Tt(p, t, `array length ${r.length} expected, length ${t.length} found`)]; - if (r["min-length"] && t.length < r["min-length"]) return [new Tt(p, t, `array length at least ${r["min-length"]} expected, length ${t.length} found`)]; - let g = { - type: r.value, - values: r.values - }; - c.$version < 7 && (g.function = r.function), ii(r.value) === "object" && (g = r.value); - let v = []; - for (let S = 0; S < t.length; S++) v = v.concat(f({ - array: t, - arrayIndex: S, - value: t[S], - valueSpec: g, - validateSpec: i.validateSpec, - style: a, - styleSpec: c, - key: `${p}[${S}]` - })); - return v - } - - function Ao(i) { - const t = i.key, - r = i.value, - a = i.valueSpec; - let c = ii(r); - return c === "number" && r != r && (c = "NaN"), c !== "number" ? [new Tt(t, r, `number expected, ${c} found`)] : "minimum" in a && r < a.minimum ? [new Tt(t, r, `${r} is less than the minimum value ${a.minimum}`)] : "maximum" in a && r > a.maximum ? [new Tt(t, r, `${r} is greater than the maximum value ${a.maximum}`)] : [] - } - - function jh(i) { - const t = i.valueSpec, - r = Vi(i.value.type); - let a, c, p, f = {}; - const g = r !== "categorical" && i.value.property === void 0, - v = !g, - S = ii(i.value.stops) === "array" && ii(i.value.stops[0]) === "array" && ii(i.value.stops[0][0]) === "object", - I = ua({ - key: i.key, - value: i.value, - valueSpec: i.styleSpec.function, - validateSpec: i.validateSpec, - style: i.style, - styleSpec: i.styleSpec, - objectElementValidators: { - stops: function(N) { - if (r === "identity") return [new Tt(N.key, N.value, 'identity function may not have a "stops" property')]; - let j = []; - const Z = N.value; - return j = j.concat(vl({ - key: N.key, - value: Z, - valueSpec: N.valueSpec, - validateSpec: N.validateSpec, - style: N.style, - styleSpec: N.styleSpec, - arrayElementValidator: E - })), ii(Z) === "array" && Z.length === 0 && j.push(new Tt(N.key, Z, "array must have at least one stop")), j - }, - default: function(N) { - return N.validateSpec({ - key: N.key, - value: N.value, - valueSpec: t, - validateSpec: N.validateSpec, - style: N.style, - styleSpec: N.styleSpec - }) - } - } - }); - return r === "identity" && g && I.push(new Tt(i.key, i.value, 'missing required property "property"')), r === "identity" || i.value.stops || I.push(new Tt(i.key, i.value, 'missing required property "stops"')), r === "exponential" && i.valueSpec.expression && !zc(i.valueSpec) && I.push(new Tt(i.key, i.value, "exponential functions not supported")), i.styleSpec.$version >= 8 && (v && !rs(i.valueSpec) ? I.push(new Tt(i.key, i.value, "property functions not supported")) : g && !Lh(i.valueSpec) && I.push(new Tt(i.key, i.value, "zoom functions not supported"))), r !== "categorical" && !S || i.value.property !== void 0 || I.push(new Tt(i.key, i.value, '"property" property is required')), I; - - function E(N) { - let j = []; - const Z = N.value, - Y = N.key; - if (ii(Z) !== "array") return [new Tt(Y, Z, `array expected, ${ii(Z)} found`)]; - if (Z.length !== 2) return [new Tt(Y, Z, `array length 2 expected, length ${Z.length} found`)]; - if (S) { - if (ii(Z[0]) !== "object") return [new Tt(Y, Z, `object expected, ${ii(Z[0])} found`)]; - if (Z[0].zoom === void 0) return [new Tt(Y, Z, "object stop key must have zoom")]; - if (Z[0].value === void 0) return [new Tt(Y, Z, "object stop key must have value")]; - if (p && p > Vi(Z[0].zoom)) return [new Tt(Y, Z[0].zoom, "stop zoom values must appear in ascending order")]; - Vi(Z[0].zoom) !== p && (p = Vi(Z[0].zoom), c = void 0, f = {}), j = j.concat(ua({ - key: `${Y}[0]`, - value: Z[0], - valueSpec: { - zoom: {} - }, - validateSpec: N.validateSpec, - style: N.style, - styleSpec: N.styleSpec, - objectElementValidators: { - zoom: Ao, - value: R - } - })) - } else j = j.concat(R({ - key: `${Y}[0]`, - value: Z[0], - validateSpec: N.validateSpec, - style: N.style, - styleSpec: N.styleSpec - }, Z)); - return fl(Oa(Z[1])) ? j.concat([new Tt(`${Y}[1]`, Z[1], "expressions are not allowed in function stops.")]) : j.concat(N.validateSpec({ - key: `${Y}[1]`, - value: Z[1], - valueSpec: t, - validateSpec: N.validateSpec, - style: N.style, - styleSpec: N.styleSpec - })) - } - - function R(N, j) { - const Z = ii(N.value), - Y = Vi(N.value), - ae = N.value !== null ? N.value : j; - if (a) { - if (Z !== a) return [new Tt(N.key, ae, `${Z} stop domain type must match previous stop domain type ${a}`)] - } else a = Z; - if (Z !== "number" && Z !== "string" && Z !== "boolean") return [new Tt(N.key, ae, "stop domain value must be a number, string, or boolean")]; - if (Z !== "number" && r !== "categorical") { - let ze = `number expected, ${Z} found`; - return rs(t) && r === void 0 && (ze += '\nIf you intended to use a categorical function, specify `"type": "categorical"`.'), [new Tt(N.key, ae, ze)] - } - return r !== "categorical" || Z !== "number" || isFinite(Y) && Math.floor(Y) === Y ? r !== "categorical" && Z === "number" && c !== void 0 && Y < c ? [new Tt(N.key, ae, "stop domain values must appear in ascending order")] : (c = Y, r === "categorical" && Y in f ? [new Tt(N.key, ae, "stop domain values must be unique")] : (f[Y] = !0, [])) : [new Tt(N.key, ae, `integer expected, found ${Y}`)] - } - } - - function Ts(i) { - const t = (i.expressionContext === "property" ? Fh : Co)(Oa(i.value), i.valueSpec); - if (t.result === "error") return t.value.map((a => new Tt(`${i.key}${a.key}`, i.value, a.message))); - const r = t.value.expression || t.value._styleExpression.expression; - if (i.expressionContext === "property" && i.propertyKey === "text-font" && !r.outputDefined()) return [new Tt(i.key, i.value, `Invalid data expression for "${i.propertyKey}". Output values must be contained as literals within the expression.`)]; - if (i.expressionContext === "property" && i.propertyType === "layout" && !wo(r)) return [new Tt(i.key, i.value, '"feature-state" data expressions are not supported with layout properties.')]; - if (i.expressionContext === "filter" && !wo(r)) return [new Tt(i.key, i.value, '"feature-state" data expressions are not supported with filters.')]; - if (i.expressionContext && i.expressionContext.indexOf("cluster") === 0) { - if (!pl(r, ["zoom", "feature-state"])) return [new Tt(i.key, i.value, '"zoom" and "feature-state" expressions are not supported with cluster properties.')]; - if (i.expressionContext === "cluster-initial" && !dl(r)) return [new Tt(i.key, i.value, "Feature data expressions are not supported with initial expression part of cluster properties.")] - } - return [] - } - - function yl(i) { - const t = i.key, - r = i.value, - a = ii(r); - return a !== "string" ? [new Tt(t, r, `color expected, ${a} found`)] : yr.parse(String(r)) ? [] : [new Tt(t, r, `color expected, "${r}" found`)] - } - - function Ga(i) { - const t = i.key, - r = i.value, - a = i.valueSpec, - c = []; - return Array.isArray(a.values) ? a.values.indexOf(Vi(r)) === -1 && c.push(new Tt(t, r, `expected one of [${a.values.join(", ")}], ${JSON.stringify(r)} found`)) : Object.keys(a.values).indexOf(Vi(r)) === -1 && c.push(new Tt(t, r, `expected one of [${Object.keys(a.values).join(", ")}], ${JSON.stringify(r)} found`)), c - } - - function jc(i) { - return ml(Oa(i.value)) ? Ts(Ci({}, i, { - expressionContext: "filter", - valueSpec: { - value: "boolean" - } - })) : qh(i) - } - - function qh(i) { - const t = i.value, - r = i.key; - if (ii(t) !== "array") return [new Tt(r, t, `array expected, ${ii(t)} found`)]; - const a = i.styleSpec; - let c, p = []; - if (t.length < 1) return [new Tt(r, t, "filter array must have at least 1 element")]; - switch (p = p.concat(Ga({ - key: `${r}[0]`, - value: t[0], - valueSpec: a.filter_operator, - style: i.style, - styleSpec: i.styleSpec - })), Vi(t[0])) { - case "<": - case "<=": - case ">": - case ">=": - t.length >= 2 && Vi(t[1]) === "$type" && p.push(new Tt(r, t, `"$type" cannot be use with operator "${t[0]}"`)); - case "==": - case "!=": - t.length !== 3 && p.push(new Tt(r, t, `filter array for operator "${t[0]}" must have 3 elements`)); - case "in": - case "!in": - t.length >= 2 && (c = ii(t[1]), c !== "string" && p.push(new Tt(`${r}[1]`, t[1], `string expected, ${c} found`))); - for (let f = 2; f < t.length; f++) c = ii(t[f]), Vi(t[1]) === "$type" ? p = p.concat(Ga({ - key: `${r}[${f}]`, - value: t[f], - valueSpec: a.geometry_type, - style: i.style, - styleSpec: i.styleSpec - })) : c !== "string" && c !== "number" && c !== "boolean" && p.push(new Tt(`${r}[${f}]`, t[f], `string, number, or boolean expected, ${c} found`)); - break; - case "any": - case "all": - case "none": - for (let f = 1; f < t.length; f++) p = p.concat(qh({ - key: `${r}[${f}]`, - value: t[f], - style: i.style, - styleSpec: i.styleSpec - })); - break; - case "has": - case "!has": - c = ii(t[1]), t.length !== 2 ? p.push(new Tt(r, t, `filter array for "${t[0]}" operator must have 2 elements`)) : c !== "string" && p.push(new Tt(`${r}[1]`, t[1], `string expected, ${c} found`)) - } - return p - } - - function Vh(i, t) { - const r = i.key, - a = i.validateSpec, - c = i.style, - p = i.styleSpec, - f = i.value, - g = i.objectKey, - v = p[`${t}_${i.layerType}`]; - if (!v) return []; - const S = g.match(/^(.*)-transition$/); - if (t === "paint" && S && v[S[1]] && v[S[1]].transition) return a({ - key: r, - value: f, - valueSpec: p.transition, - style: c, - styleSpec: p - }); - const I = i.valueSpec || v[g]; - if (!I) return [new Tt(r, f, `unknown property "${g}"`)]; - let E; - if (ii(f) === "string" && rs(I) && !I.tokens && (E = /^{([^}]+)}$/.exec(f))) return [new Tt(r, f, `"${g}" does not support interpolation syntax -Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(E[1])} }\`.`)]; - const R = []; - return i.layerType === "symbol" && (g === "text-field" && c && !c.glyphs && R.push(new Tt(r, f, 'use of "text-field" requires a style "glyphs" property')), g === "text-font" && To(Oa(f)) && Vi(f.type) === "identity" && R.push(new Tt(r, f, '"text-font" does not support identity functions'))), R.concat(a({ - key: i.key, - value: f, - valueSpec: I, - style: c, - styleSpec: p, - expressionContext: "property", - propertyType: t, - propertyKey: g - })) - } - - function Uh(i) { - return Vh(i, "paint") - } - - function Zh(i) { - return Vh(i, "layout") - } - - function $h(i) { - let t = []; - const r = i.value, - a = i.key, - c = i.style, - p = i.styleSpec; - if (ii(r) !== "object") return [new Tt(a, r, `object expected, ${ii(r)} found`)]; - r.type || r.ref || t.push(new Tt(a, r, 'either "type" or "ref" is required')); - let f = Vi(r.type); - const g = Vi(r.ref); - if (r.id) { - const v = Vi(r.id); - for (let S = 0; S < i.arrayIndex; S++) { - const I = c.layers[S]; - Vi(I.id) === v && t.push(new Tt(a, r.id, `duplicate layer id "${r.id}", previously used at line ${I.id.__line__}`)) - } - } - if ("ref" in r) { - let v; - ["type", "source", "source-layer", "filter", "layout"].forEach((S => { - S in r && t.push(new Tt(a, r[S], `"${S}" is prohibited for ref layers`)) - })), c.layers.forEach((S => { - Vi(S.id) === g && (v = S) - })), v ? v.ref ? t.push(new Tt(a, r.ref, "ref cannot reference another ref layer")) : f = Vi(v.type) : t.push(new Tt(a, r.ref, `ref layer "${g}" not found`)) - } else if (f !== "background") - if (r.source) { - const v = c.sources && c.sources[r.source], - S = v && Vi(v.type); - v ? S === "vector" && f === "raster" ? t.push(new Tt(a, r.source, `layer "${r.id}" requires a raster source`)) : S !== "raster-dem" && f === "hillshade" || S !== "raster-dem" && f === "color-relief" ? t.push(new Tt(a, r.source, `layer "${r.id}" requires a raster-dem source`)) : S === "raster" && f !== "raster" ? t.push(new Tt(a, r.source, `layer "${r.id}" requires a vector source`)) : S !== "vector" || r["source-layer"] ? S === "raster-dem" && f !== "hillshade" && f !== "color-relief" ? t.push(new Tt(a, r.source, "raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")) : f !== "line" || !r.paint || !r.paint["line-gradient"] || S === "geojson" && v.lineMetrics || t.push(new Tt(a, r, `layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)) : t.push(new Tt(a, r, `layer "${r.id}" must specify a "source-layer"`)) : t.push(new Tt(a, r.source, `source "${r.source}" not found`)) - } else t.push(new Tt(a, r, 'missing required property "source"')); - return t = t.concat(ua({ - key: a, - value: r, - valueSpec: p.layer, - style: i.style, - styleSpec: i.styleSpec, - validateSpec: i.validateSpec, - objectElementValidators: { - "*": () => [], - type: () => i.validateSpec({ - key: `${a}.type`, - value: r.type, - valueSpec: p.layer.type, - style: i.style, - styleSpec: i.styleSpec, - validateSpec: i.validateSpec, - object: r, - objectKey: "type" - }), - filter: jc, - layout: v => ua({ - layer: r, - key: v.key, - value: v.value, - style: v.style, - styleSpec: v.styleSpec, - validateSpec: v.validateSpec, - objectElementValidators: { - "*": S => Zh(Ci({ - layerType: f - }, S)) - } - }), - paint: v => ua({ - layer: r, - key: v.key, - value: v.value, - style: v.style, - styleSpec: v.styleSpec, - validateSpec: v.validateSpec, - objectElementValidators: { - "*": S => Uh(Ci({ - layerType: f - }, S)) - } - }) - } - })), t - } - - function xa(i) { - const t = i.value, - r = i.key, - a = ii(t); - return a !== "string" ? [new Tt(r, t, `string expected, ${a} found`)] : [] - } - const js = { - promoteId: function({ - key: i, - value: t - }) { - if (ii(t) === "string") return xa({ - key: i, - value: t - }); - { - const r = []; - for (const a in t) r.push(...xa({ - key: `${i}.${a}`, - value: t[a] - })); - return r - } - } - }; - - function Wn(i) { - const t = i.value, - r = i.key, - a = i.styleSpec, - c = i.style, - p = i.validateSpec; - if (!t.type) return [new Tt(r, t, '"type" is required')]; - const f = Vi(t.type); - let g; - switch (f) { - case "vector": - case "raster": - return g = ua({ - key: r, - value: t, - valueSpec: a[`source_${f.replace("-","_")}`], - style: i.style, - styleSpec: a, - objectElementValidators: js, - validateSpec: p - }), g; - case "raster-dem": - return g = (function(v) { - var S; - const I = (S = v.sourceName) !== null && S !== void 0 ? S : "", - E = v.value, - R = v.styleSpec, - N = R.source_raster_dem, - j = v.style; - let Z = []; - const Y = ii(E); - if (E === void 0) return Z; - if (Y !== "object") return Z.push(new Tt("source_raster_dem", E, `object expected, ${Y} found`)), Z; - const ae = Vi(E.encoding) === "custom", - ze = ["redFactor", "greenFactor", "blueFactor", "baseShift"], - me = v.value.encoding ? `"${v.value.encoding}"` : "Default"; - for (const be in E) !ae && ze.includes(be) ? Z.push(new Tt(be, E[be], `In "${I}": "${be}" is only valid when "encoding" is set to "custom". ${me} encoding found`)) : N[be] ? Z = Z.concat(v.validateSpec({ - key: be, - value: E[be], - valueSpec: N[be], - validateSpec: v.validateSpec, - style: j, - styleSpec: R - })) : Z.push(new Tt(be, E[be], `unknown property "${be}"`)); - return Z - })({ - sourceName: r, - value: t, - style: i.style, - styleSpec: a, - validateSpec: p - }), g; - case "geojson": - if (g = ua({ - key: r, - value: t, - valueSpec: a.source_geojson, - style: c, - styleSpec: a, - validateSpec: p, - objectElementValidators: js - }), t.cluster) - for (const v in t.clusterProperties) { - const [S, I] = t.clusterProperties[v], E = typeof S == "string" ? [S, ["accumulated"], - ["get", v] - ] : S; - g.push(...Ts({ - key: `${r}.${v}.map`, - value: I, - expressionContext: "cluster-map" - })), g.push(...Ts({ - key: `${r}.${v}.reduce`, - value: E, - expressionContext: "cluster-reduce" - })) - } - return g; - case "video": - return ua({ - key: r, - value: t, - valueSpec: a.source_video, - style: c, - validateSpec: p, - styleSpec: a - }); - case "image": - return ua({ - key: r, - value: t, - valueSpec: a.source_image, - style: c, - validateSpec: p, - styleSpec: a - }); - case "canvas": - return [new Tt(r, null, "Please use runtime APIs to add canvas sources, rather than including them in stylesheets.", "source.canvas")]; - default: - return Ga({ - key: `${r}.type`, - value: t.type, - valueSpec: { - values: ["vector", "raster", "raster-dem", "geojson", "video", "image"] - } - }) - } - } - - function qs(i) { - const t = i.value, - r = i.styleSpec, - a = r.light, - c = i.style; - let p = []; - const f = ii(t); - if (t === void 0) return p; - if (f !== "object") return p = p.concat([new Tt("light", t, `object expected, ${f} found`)]), p; - for (const g in t) { - const v = g.match(/^(.*)-transition$/); - p = p.concat(v && a[v[1]] && a[v[1]].transition ? i.validateSpec({ - key: g, - value: t[g], - valueSpec: r.transition, - validateSpec: i.validateSpec, - style: c, - styleSpec: r - }) : a[g] ? i.validateSpec({ - key: g, - value: t[g], - valueSpec: a[g], - validateSpec: i.validateSpec, - style: c, - styleSpec: r - }) : [new Tt(g, t[g], `unknown property "${g}"`)]) - } - return p - } - - function qc(i) { - const t = i.value, - r = i.styleSpec, - a = r.sky, - c = i.style, - p = ii(t); - if (t === void 0) return []; - if (p !== "object") return [new Tt("sky", t, `object expected, ${p} found`)]; - let f = []; - for (const g in t) f = f.concat(a[g] ? i.validateSpec({ - key: g, - value: t[g], - valueSpec: a[g], - style: c, - styleSpec: r - }) : [new Tt(g, t[g], `unknown property "${g}"`)]); - return f - } - - function Gh(i) { - const t = i.value, - r = i.styleSpec, - a = r.terrain, - c = i.style; - let p = []; - const f = ii(t); - if (t === void 0) return p; - if (f !== "object") return p = p.concat([new Tt("terrain", t, `object expected, ${f} found`)]), p; - for (const g in t) p = p.concat(a[g] ? i.validateSpec({ - key: g, - value: t[g], - valueSpec: a[g], - validateSpec: i.validateSpec, - style: c, - styleSpec: r - }) : [new Tt(g, t[g], `unknown property "${g}"`)]); - return p - } - - function Hh(i) { - let t = []; - const r = i.value, - a = i.key; - if (Array.isArray(r)) { - const c = [], - p = []; - for (const f in r) r[f].id && c.includes(r[f].id) && t.push(new Tt(a, r, `all the sprites' ids must be unique, but ${r[f].id} is duplicated`)), c.push(r[f].id), r[f].url && p.includes(r[f].url) && t.push(new Tt(a, r, `all the sprites' URLs must be unique, but ${r[f].url} is duplicated`)), p.push(r[f].url), t = t.concat(ua({ - key: `${a}[${f}]`, - value: r[f], - valueSpec: { - id: { - type: "string", - required: !0 - }, - url: { - type: "string", - required: !0 - } - }, - validateSpec: i.validateSpec - })); - return t - } - return xa({ - key: a, - value: r - }) - } - - function Vs(i) { - return t = i.value, t && t.constructor === Object ? [] : [new Tt(i.key, i.value, `object expected, ${ii(i.value)} found`)]; - var t - } - const Vc = { - "*": () => [], - array: vl, - boolean: function(i) { - const t = i.value, - r = i.key, - a = ii(t); - return a !== "boolean" ? [new Tt(r, t, `boolean expected, ${a} found`)] : [] - }, - number: Ao, - color: yl, - constants: Nc, - enum: Ga, - filter: jc, - function: jh, - layer: $h, - object: ua, - source: Wn, - light: qs, - sky: qc, - terrain: Gh, - projection: function(i) { - const t = i.value, - r = i.styleSpec, - a = r.projection, - c = i.style, - p = ii(t); - if (t === void 0) return []; - if (p !== "object") return [new Tt("projection", t, `object expected, ${p} found`)]; - let f = []; - for (const g in t) f = f.concat(a[g] ? i.validateSpec({ - key: g, - value: t[g], - valueSpec: a[g], - style: c, - styleSpec: r - }) : [new Tt(g, t[g], `unknown property "${g}"`)]); - return f - }, - projectionDefinition: function(i) { - const t = i.key; - let r = i.value; - r = r instanceof String ? r.valueOf() : r; - const a = ii(r); - return a !== "array" || (function(c) { - return Array.isArray(c) && c.length === 3 && typeof c[0] == "string" && typeof c[1] == "string" && typeof c[2] == "number" - })(r) || (function(c) { - return !!["interpolate", "step", "literal"].includes(c[0]) - })(r) ? ["array", "string"].includes(a) ? [] : [new Tt(t, r, `projection expected, invalid type "${a}" found`)] : [new Tt(t, r, `projection expected, invalid array ${JSON.stringify(r)} found`)] - }, - string: xa, - formatted: function(i) { - return xa(i).length === 0 ? [] : Ts(i) - }, - resolvedImage: function(i) { - return xa(i).length === 0 ? [] : Ts(i) - }, - padding: function(i) { - const t = i.key, - r = i.value; - if (ii(r) === "array") { - if (r.length < 1 || r.length > 4) return [new Tt(t, r, `padding requires 1 to 4 values; ${r.length} values found`)]; - const a = { - type: "number" - }; - let c = []; - for (let p = 0; p < r.length; p++) c = c.concat(i.validateSpec({ - key: `${t}[${p}]`, - value: r[p], - validateSpec: i.validateSpec, - valueSpec: a - })); - return c - } - return Ao({ - key: t, - value: r, - valueSpec: {} - }) - }, - numberArray: function(i) { - const t = i.key, - r = i.value; - if (ii(r) === "array") { - const a = { - type: "number" - }; - if (r.length < 1) return [new Tt(t, r, "array length at least 1 expected, length 0 found")]; - let c = []; - for (let p = 0; p < r.length; p++) c = c.concat(i.validateSpec({ - key: `${t}[${p}]`, - value: r[p], - validateSpec: i.validateSpec, - valueSpec: a - })); - return c - } - return Ao({ - key: t, - value: r, - valueSpec: {} - }) - }, - colorArray: function(i) { - const t = i.key, - r = i.value; - if (ii(r) === "array") { - if (r.length < 1) return [new Tt(t, r, "array length at least 1 expected, length 0 found")]; - let a = []; - for (let c = 0; c < r.length; c++) a = a.concat(yl({ - key: `${t}[${c}]`, - value: r[c] - })); - return a - } - return yl({ - key: t, - value: r - }) - }, - variableAnchorOffsetCollection: function(i) { - const t = i.key, - r = i.value, - a = ii(r), - c = i.styleSpec; - if (a !== "array" || r.length < 1 || r.length % 2 != 0) return [new Tt(t, r, "variableAnchorOffsetCollection requires a non-empty array of even length")]; - let p = []; - for (let f = 0; f < r.length; f += 2) p = p.concat(Ga({ - key: `${t}[${f}]`, - value: r[f], - valueSpec: c.layout_symbol["text-anchor"] - })), p = p.concat(vl({ - key: `${t}[${f+1}]`, - value: r[f + 1], - valueSpec: { - length: 2, - value: "number" - }, - validateSpec: i.validateSpec, - style: i.style, - styleSpec: c - })); - return p - }, - sprite: Hh, - state: Vs - }; - - function Us(i) { - const t = i.value, - r = i.valueSpec, - a = i.styleSpec; - return i.validateSpec = Us, r.expression && To(Vi(t)) ? jh(i) : r.expression && fl(Oa(t)) ? Ts(i) : r.type && Vc[r.type] ? Vc[r.type](i) : ua(Ci({}, i, { - valueSpec: r.type ? a[r.type] : r - })) - } - - function Wh(i) { - const t = i.value, - r = i.key, - a = xa(i); - return a.length || (t.indexOf("{fontstack}") === -1 && a.push(new Tt(r, t, '"glyphs" url must include a "{fontstack}" token')), t.indexOf("{range}") === -1 && a.push(new Tt(r, t, '"glyphs" url must include a "{range}" token'))), a - } - - function Xn(i, t = xe) { - let r = []; - return r = r.concat(Us({ - key: "", - value: i, - valueSpec: t.$root, - styleSpec: t, - style: i, - validateSpec: Us, - objectElementValidators: { - glyphs: Wh, - "*": () => [] - } - })), i.constants && (r = r.concat(Nc({ - key: "constants", - value: i.constants - }))), Zs(r) - } - - function ba(i) { - return function(t) { - return i({ - ...t, - validateSpec: Us - }) - } - } - - function Zs(i) { - return [].concat(i).sort(((t, r) => t.line - r.line)) - } - - function wa(i) { - return function(...t) { - return Zs(i.apply(this, t)) - } - } - Xn.source = wa(ba(Wn)), Xn.sprite = wa(ba(Hh)), Xn.glyphs = wa(ba(Wh)), Xn.light = wa(ba(qs)), Xn.sky = wa(ba(qc)), Xn.terrain = wa(ba(Gh)), Xn.state = wa(ba(Vs)), Xn.layer = wa(ba($h)), Xn.filter = wa(ba(jc)), Xn.paintProperty = wa(ba(Uh)), Xn.layoutProperty = wa(ba(Zh)); - const $s = Xn, - _p = $s.light, - ko = $s.sky, - gp = $s.paintProperty, - vp = $s.layoutProperty; - - function Eo(i, t) { - let r = !1; - if (t && t.length) - for (const a of t) i.fire(new Ye(new Error(a.message))), r = !0; - return r - } - class zo { - constructor(t, r, a) { - const c = this.cells = []; - if (t instanceof ArrayBuffer) { - this.arrayBuffer = t; - const f = new Int32Array(this.arrayBuffer); - t = f[0], this.d = (r = f[1]) + 2 * (a = f[2]); - for (let v = 0; v < this.d * this.d; v++) { - const S = f[3 + v], - I = f[3 + v + 1]; - c.push(S === I ? null : f.subarray(S, I)) - } - const g = f[3 + c.length + 1]; - this.keys = f.subarray(f[3 + c.length], g), this.bboxes = f.subarray(g), this.insert = this._insertReadonly - } else { - this.d = r + 2 * a; - for (let f = 0; f < this.d * this.d; f++) c.push([]); - this.keys = [], this.bboxes = [] - } - this.n = r, this.extent = t, this.padding = a, this.scale = r / t, this.uid = 0; - const p = a / r * t; - this.min = -p, this.max = t + p - } - insert(t, r, a, c, p) { - this._forEachCell(r, a, c, p, this._insertCell, this.uid++, void 0, void 0), this.keys.push(t), this.bboxes.push(r), this.bboxes.push(a), this.bboxes.push(c), this.bboxes.push(p) - } - _insertReadonly() { - throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.") - } - _insertCell(t, r, a, c, p, f) { - this.cells[p].push(f) - } - query(t, r, a, c, p) { - const f = this.min, - g = this.max; - if (t <= f && r <= f && g <= a && g <= c && !p) return Array.prototype.slice.call(this.keys); - { - const v = []; - return this._forEachCell(t, r, a, c, this._queryCell, v, {}, p), v - } - } - _queryCell(t, r, a, c, p, f, g, v) { - const S = this.cells[p]; - if (S !== null) { - const I = this.keys, - E = this.bboxes; - for (let R = 0; R < S.length; R++) { - const N = S[R]; - if (g[N] === void 0) { - const j = 4 * N; - (v ? v(E[j + 0], E[j + 1], E[j + 2], E[j + 3]) : t <= E[j + 2] && r <= E[j + 3] && a >= E[j + 0] && c >= E[j + 1]) ? (g[N] = !0, f.push(I[N])) : g[N] = !1 - } - } - } - } - _forEachCell(t, r, a, c, p, f, g, v) { - const S = this._convertToCellCoord(t), - I = this._convertToCellCoord(r), - E = this._convertToCellCoord(a), - R = this._convertToCellCoord(c); - for (let N = S; N <= E; N++) - for (let j = I; j <= R; j++) { - const Z = this.d * j + N; - if ((!v || v(this._convertFromCellCoord(N), this._convertFromCellCoord(j), this._convertFromCellCoord(N + 1), this._convertFromCellCoord(j + 1))) && p.call(this, t, r, a, c, Z, f, g, v)) 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, - r = 3 + this.cells.length + 1 + 1; - let a = 0; - for (let f = 0; f < this.cells.length; f++) a += this.cells[f].length; - const c = new Int32Array(r + a + this.keys.length + this.bboxes.length); - c[0] = this.extent, c[1] = this.n, c[2] = this.padding; - let p = r; - for (let f = 0; f < t.length; f++) { - const g = t[f]; - c[3 + f] = p, c.set(g, p), p += g.length - } - return c[3 + t.length] = p, c.set(this.keys, p), p += this.keys.length, c[3 + t.length + 1] = p, c.set(this.bboxes, p), p += this.bboxes.length, c.buffer - } - static serialize(t, r) { - const a = t.toArrayBuffer(); - return r && r.push(a), { - buffer: a - } - } - static deserialize(t) { - return new zo(t.buffer) - } - } - const Ta = {}; - - function Kt(i, t, r = {}) { - if (Ta[i]) throw new Error(`${i} is already registered.`); - Object.defineProperty(t, "_classRegistryKey", { - value: i, - writeable: !1 - }), Ta[i] = { - klass: t, - omit: r.omit || [], - shallow: r.shallow || [] - } - } - Kt("Object", Object), Kt("Set", Set), Kt("TransferableGridIndex", zo), Kt("Color", yr), Kt("Error", Error), Kt("AJAXError", K), Kt("ResolvedImage", Nn), Kt("StylePropertyFunction", Po), Kt("StyleExpression", Lc, { - omit: ["_evaluator"] - }), Kt("ZoomDependentExpression", Dc), Kt("ZoomConstantExpression", So), Kt("CompoundExpression", ca, { - omit: ["_evaluate"] - }); - for (const i in Os) Os[i]._classRegistryKey || Kt(`Expression_${i}`, Os[i]); - - function Uc(i) { - return i && typeof ArrayBuffer < "u" && (i instanceof ArrayBuffer || i.constructor && i.constructor.name === "ArrayBuffer") - } - - function xl(i) { - return i.$name || i.constructor._classRegistryKey - } - - function Zc(i) { - return !(function(t) { - if (t === null || typeof t != "object") return !1; - const r = xl(t); - return !(!r || r === "Object") - })(i) && (i == null || typeof i == "boolean" || typeof i == "number" || typeof i == "string" || i instanceof Boolean || i instanceof Number || i instanceof String || i instanceof Date || i instanceof RegExp || i instanceof Blob || i instanceof Error || Uc(i) || ar(i) || ArrayBuffer.isView(i) || i instanceof ImageData) - } - - function Gs(i, t) { - if (Zc(i)) return (Uc(i) || ar(i)) && t && t.push(i), ArrayBuffer.isView(i) && t && t.push(i.buffer), i instanceof ImageData && t && t.push(i.data.buffer), i; - if (Array.isArray(i)) { - const p = []; - for (const f of i) p.push(Gs(f, t)); - return p - } - if (typeof i != "object") throw new Error("can't serialize object of type " + typeof i); - const r = xl(i); - if (!r) throw new Error(`can't serialize object of unregistered class ${i.constructor.name}`); - if (!Ta[r]) throw new Error(`${r} is not registered.`); - const { - klass: a - } = Ta[r], c = a.serialize ? a.serialize(i, t) : {}; - if (a.serialize) { - if (t && c === t[t.length - 1]) throw new Error("statically serialized object won't survive transfer of $name property") - } else { - for (const p in i) { - if (!i.hasOwnProperty(p) || Ta[r].omit.indexOf(p) >= 0) continue; - const f = i[p]; - c[p] = Ta[r].shallow.indexOf(p) >= 0 ? f : Gs(f, t) - } - i instanceof Error && (c.message = i.message) - } - if (c.$name) throw new Error("$name property is reserved for worker serialization logic."); - return r !== "Object" && (c.$name = r), c - } - - function Cs(i) { - if (Zc(i)) return i; - if (Array.isArray(i)) return i.map(Cs); - if (typeof i != "object") throw new Error("can't deserialize object of type " + typeof i); - const t = xl(i) || "Object"; - if (!Ta[t]) throw new Error(`can't deserialize unregistered class ${t}`); - const { - klass: r - } = Ta[t]; - if (!r) throw new Error(`can't deserialize unregistered class ${t}`); - if (r.deserialize) return r.deserialize(i); - const a = Object.create(r.prototype); - for (const c of Object.keys(i)) { - if (c === "$name") continue; - const p = i[c]; - a[c] = Ta[t].shallow.indexOf(c) >= 0 ? p : Cs(p) - } - return a - } - class bl { - constructor() { - this.first = !0 - } - update(t, r) { - const a = Math.floor(t); - return this.first ? (this.first = !1, this.lastIntegerZoom = a, this.lastIntegerZoomTime = 0, this.lastZoom = t, this.lastFloorZoom = a, !0) : (this.lastFloorZoom > a ? (this.lastIntegerZoom = a + 1, this.lastIntegerZoomTime = r) : this.lastFloorZoom < a && (this.lastIntegerZoom = a, this.lastIntegerZoomTime = r), t !== this.lastZoom && (this.lastZoom = t, this.lastFloorZoom = a, !0)) - } - } - const si = { - "Latin-1 Supplement": i => i >= 128 && i <= 255, - "Hangul Jamo": i => i >= 4352 && i <= 4607, - Khmer: i => i >= 6016 && i <= 6143, - "General Punctuation": i => i >= 8192 && i <= 8303, - "Letterlike Symbols": i => i >= 8448 && i <= 8527, - "Number Forms": i => i >= 8528 && i <= 8591, - "Miscellaneous Technical": i => i >= 8960 && i <= 9215, - "Control Pictures": i => i >= 9216 && i <= 9279, - "Optical Character Recognition": i => i >= 9280 && i <= 9311, - "Enclosed Alphanumerics": i => i >= 9312 && i <= 9471, - "Geometric Shapes": i => i >= 9632 && i <= 9727, - "Miscellaneous Symbols": i => i >= 9728 && i <= 9983, - "Miscellaneous Symbols and Arrows": i => i >= 11008 && i <= 11263, - "Ideographic Description Characters": i => i >= 12272 && i <= 12287, - "CJK Symbols and Punctuation": i => i >= 12288 && i <= 12351, - Hiragana: i => i >= 12352 && i <= 12447, - Katakana: i => i >= 12448 && i <= 12543, - Kanbun: i => i >= 12688 && i <= 12703, - "CJK Strokes": i => i >= 12736 && i <= 12783, - "Enclosed CJK Letters and Months": i => i >= 12800 && i <= 13055, - "CJK Compatibility": i => i >= 13056 && i <= 13311, - "Yijing Hexagram Symbols": i => i >= 19904 && i <= 19967, - "CJK Unified Ideographs": i => i >= 19968 && i <= 40959, - "Hangul Syllables": i => i >= 44032 && i <= 55215, - "Private Use Area": i => i >= 57344 && i <= 63743, - "Vertical Forms": i => i >= 65040 && i <= 65055, - "CJK Compatibility Forms": i => i >= 65072 && i <= 65103, - "Small Form Variants": i => i >= 65104 && i <= 65135, - "Halfwidth and Fullwidth Forms": i => i >= 65280 && i <= 65519 - }; - - function wl(i) { - for (const t of i) - if (Gc(t.charCodeAt(0))) return !0; - return !1 - } - - function yp(i) { - for (const t of i) - if (!Xh(t.charCodeAt(0))) return !1; - return !0 - } - - function Tl(i) { - const t = i.map((r => { - try { - return new RegExp(`\\p{sc=${r}}`, "u").source - } catch { - return null - } - })).filter((r => r)); - return new RegExp(t.join("|"), "u") - } - const xp = Tl(["Arab", "Dupl", "Mong", "Ougr", "Syrc"]); - - function Xh(i) { - return !xp.test(String.fromCodePoint(i)) - } - const $c = Tl(["Bopo", "Hani", "Hira", "Kana", "Kits", "Nshu", "Tang", "Yiii"]); - - function Gc(i) { - return !(i !== 746 && i !== 747 && (i < 4352 || !(si["CJK Compatibility Forms"](i) && !(i >= 65097 && i <= 65103) || si["CJK Compatibility"](i) || si["CJK Strokes"](i) || !(!si["CJK Symbols and Punctuation"](i) || i >= 12296 && i <= 12305 || i >= 12308 && i <= 12319 || i === 12336) || si["Enclosed CJK Letters and Months"](i) || si["Ideographic Description Characters"](i) || si.Kanbun(i) || si.Katakana(i) && i !== 12540 || !(!si["Halfwidth and Fullwidth Forms"](i) || i === 65288 || i === 65289 || i === 65293 || i >= 65306 && i <= 65310 || i === 65339 || i === 65341 || i === 65343 || i >= 65371 && i <= 65503 || i === 65507 || i >= 65512 && i <= 65519) || !(!si["Small Form Variants"](i) || i >= 65112 && i <= 65118 || i >= 65123 && i <= 65126) || si["Vertical Forms"](i) || si["Yijing Hexagram Symbols"](i) || new RegExp("\\p{sc=Cans}", "u").test(String.fromCodePoint(i)) || new RegExp("\\p{sc=Hang}", "u").test(String.fromCodePoint(i)) || $c.test(String.fromCodePoint(i))))) - } - - function Kh(i) { - return !(Gc(i) || (function(t) { - return !!(si["Latin-1 Supplement"](t) && (t === 167 || t === 169 || t === 174 || t === 177 || t === 188 || t === 189 || t === 190 || t === 215 || t === 247) || si["General Punctuation"](t) && (t === 8214 || t === 8224 || t === 8225 || t === 8240 || t === 8241 || t === 8251 || t === 8252 || t === 8258 || t === 8263 || t === 8264 || t === 8265 || t === 8273) || si["Letterlike Symbols"](t) || si["Number Forms"](t) || si["Miscellaneous Technical"](t) && (t >= 8960 && t <= 8967 || t >= 8972 && t <= 8991 || t >= 8996 && t <= 9e3 || t === 9003 || t >= 9085 && t <= 9114 || t >= 9150 && t <= 9165 || t === 9167 || t >= 9169 && t <= 9179 || t >= 9186 && t <= 9215) || si["Control Pictures"](t) && t !== 9251 || si["Optical Character Recognition"](t) || si["Enclosed Alphanumerics"](t) || si["Geometric Shapes"](t) || si["Miscellaneous Symbols"](t) && !(t >= 9754 && t <= 9759) || si["Miscellaneous Symbols and Arrows"](t) && (t >= 11026 && t <= 11055 || t >= 11088 && t <= 11097 || t >= 11192 && t <= 11243) || si["CJK Symbols and Punctuation"](t) || si.Katakana(t) || si["Private Use Area"](t) || si["CJK Compatibility Forms"](t) || si["Small Form Variants"](t) || si["Halfwidth and Fullwidth Forms"](t) || t === 8734 || t === 8756 || t === 8757 || t >= 9984 && t <= 10087 || t >= 10102 && t <= 10131 || t === 65532 || t === 65533) - })(i)) - } - const Yh = Tl(["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 Hc(i) { - return Yh.test(String.fromCodePoint(i)) - } - - function Jh(i, t) { - return !(!t && Hc(i) || i >= 2304 && i <= 3583 || i >= 3840 && i <= 4255 || si.Khmer(i)) - } - - function Qh(i) { - for (const t of i) - if (Hc(t.charCodeAt(0))) return !0; - return !1 - } - const Ca = new class { - constructor() { - this.TIMEOUT = 5e3, this.applyArabicShaping = null, this.processBidirectionalText = null, this.processStyledBidirectionalText = null, this.pluginStatus = "unavailable", this.pluginURL = null, this.loadScriptResolve = () => {} - } - setState(i) { - this.pluginStatus = i.pluginStatus, this.pluginURL = i.pluginURL - } - getState() { - return { - pluginStatus: this.pluginStatus, - pluginURL: this.pluginURL - } - } - setMethods(i) { - if (Ca.isParsed()) throw new Error("RTL text plugin already registered."); - this.applyArabicShaping = i.applyArabicShaping, this.processBidirectionalText = i.processBidirectionalText, this.processStyledBidirectionalText = i.processStyledBidirectionalText, this.loadScriptResolve() - } - isParsed() { - return this.applyArabicShaping != null && this.processBidirectionalText != null && this.processStyledBidirectionalText != null - } - getRTLTextPluginStatus() { - return this.pluginStatus - } - syncState(i, t) { - return o(this, void 0, void 0, (function*() { - if (this.isParsed()) return this.getState(); - if (i.pluginStatus !== "loading") return this.setState(i), i; - const r = i.pluginURL, - a = new Promise((p => { - this.loadScriptResolve = p - })); - t(r); - const c = new Promise((p => setTimeout((() => p()), this.TIMEOUT))); - if (yield Promise.race([a, c]), this.isParsed()) { - const p = { - pluginStatus: "loaded", - pluginURL: r - }; - return this.setState(p), p - } - throw this.setState({ - pluginStatus: "error", - pluginURL: "" - }), new Error(`RTL Text Plugin failed to import scripts from ${r}`) - })) - } - }; - class Oi { - constructor(t, r) { - this.zoom = t, r ? (this.now = r.now || 0, this.fadeDuration = r.fadeDuration || 0, this.zoomHistory = r.zoomHistory || new bl, this.transition = r.transition || {}, this.globalState = r.globalState || {}) : (this.now = 0, this.fadeDuration = 0, this.zoomHistory = new bl, this.transition = {}, this.globalState = {}) - } - isSupportedScript(t) { - return (function(r, a) { - for (const c of r) - if (!Jh(c.charCodeAt(0), a)) return !1; - return !0 - })(t, Ca.getRTLTextPluginStatus() === "loaded") - } - crossFadingFactor() { - return this.fadeDuration === 0 ? 1 : Math.min((this.now - this.zoomHistory.lastIntegerZoomTime) / this.fadeDuration, 1) - } - getCrossfadeParameters() { - const t = this.zoom, - r = t - Math.floor(t), - a = this.crossFadingFactor(); - return t > this.zoomHistory.lastIntegerZoom ? { - fromScale: 2, - toScale: 1, - t: r + (1 - r) * a - } : { - fromScale: .5, - toScale: 1, - t: 1 - (1 - a) * r - } - } - } - class Hs { - constructor(t, r) { - this.property = t, this.value = r, this.expression = (function(a, c) { - if (To(a)) return new Po(a, c); - if (fl(a)) { - const p = Fh(a, c); - if (p.result === "error") throw new Error(p.value.map((f => `${f.key}: ${f.message}`)).join(", ")); - return p.value - } { - let p = a; - return c.type === "color" && typeof a == "string" ? p = yr.parse(a) : c.type !== "padding" || typeof a != "number" && !Array.isArray(a) ? c.type !== "numberArray" || typeof a != "number" && !Array.isArray(a) ? c.type !== "colorArray" || typeof a != "string" && !Array.isArray(a) ? c.type === "variableAnchorOffsetCollection" && Array.isArray(a) ? p = un.parse(a) : c.type === "projectionDefinition" && typeof a == "string" && (p = hn.parse(a)) : p = Ni.parse(a) : p = cn.parse(a) : p = Ki.parse(a), { - globalStateRefs: new Set, - kind: "constant", - evaluate: () => p - } - } - })(r === void 0 ? t.specification.default : r, t.specification) - } - isDataDriven() { - return this.expression.kind === "source" || this.expression.kind === "composite" - } - getGlobalStateRefs() { - return this.expression.globalStateRefs || new Set - } - possiblyEvaluate(t, r, a) { - return this.property.possiblyEvaluate(this, t, r, a) - } - } - class Wc { - constructor(t) { - this.property = t, this.value = new Hs(t, void 0) - } - transitioned(t, r) { - return new Xc(this.property, this.value, r, pt({}, t.transition, this.transition), t.now) - } - untransitioned() { - return new Xc(this.property, this.value, null, {}, 0) - } - } - class ed { - constructor(t) { - this._properties = t, this._values = Object.create(t.defaultTransitionablePropertyValues) - } - getValue(t) { - return wt(this._values[t].value.value) - } - setValue(t, r) { - Object.prototype.hasOwnProperty.call(this._values, t) || (this._values[t] = new Wc(this._values[t].property)), this._values[t].value = new Hs(this._values[t].property, r === null ? void 0 : wt(r)) - } - getTransition(t) { - return wt(this._values[t].transition) - } - setTransition(t, r) { - Object.prototype.hasOwnProperty.call(this._values, t) || (this._values[t] = new Wc(this._values[t].property)), this._values[t].transition = wt(r) || void 0 - } - serialize() { - const t = {}; - for (const r of Object.keys(this._values)) { - const a = this.getValue(r); - a !== void 0 && (t[r] = a); - const c = this.getTransition(r); - c !== void 0 && (t[`${r}-transition`] = c) - } - return t - } - transitioned(t, r) { - const a = new Kc(this._properties); - for (const c of Object.keys(this._values)) a._values[c] = this._values[c].transitioned(t, r._values[c]); - return a - } - untransitioned() { - const t = new Kc(this._properties); - for (const r of Object.keys(this._values)) t._values[r] = this._values[r].untransitioned(); - return t - } - } - class Xc { - constructor(t, r, a, c, p) { - this.property = t, this.value = r, this.begin = p + c.delay || 0, this.end = this.begin + c.duration || 0, t.specification.transition && (c.delay || c.duration) && (this.prior = a) - } - possiblyEvaluate(t, r, a) { - const c = t.now || 0, - p = this.value.possiblyEvaluate(t, r, a), - f = this.prior; - if (f) { - if (c > this.end) return this.prior = null, p; - if (this.value.isDataDriven()) return this.prior = null, p; - if (c < this.begin) return f.possiblyEvaluate(t, r, a); - { - const g = (c - this.begin) / (this.end - this.begin); - return this.property.interpolate(f.possiblyEvaluate(t, r, a), p, We(g)) - } - } - return p - } - } - class Kc { - constructor(t) { - this._properties = t, this._values = Object.create(t.defaultTransitioningPropertyValues) - } - possiblyEvaluate(t, r, a) { - const c = new Cl(this._properties); - for (const p of Object.keys(this._values)) c._values[p] = this._values[p].possiblyEvaluate(t, r, a); - return c - } - hasTransition() { - for (const t of Object.keys(this._values)) - if (this._values[t].prior) return !0; - return !1 - } - } - class td { - constructor(t) { - this._properties = t, this._values = Object.create(t.defaultPropertyValues) - } - hasValue(t) { - return this._values[t].value !== void 0 - } - getValue(t) { - return wt(this._values[t].value) - } - setValue(t, r) { - this._values[t] = new Hs(this._values[t].property, r === null ? void 0 : wt(r)) - } - serialize() { - const t = {}; - for (const r of Object.keys(this._values)) { - const a = this.getValue(r); - a !== void 0 && (t[r] = a) - } - return t - } - possiblyEvaluate(t, r, a) { - const c = new Cl(this._properties); - for (const p of Object.keys(this._values)) c._values[p] = this._values[p].possiblyEvaluate(t, r, a); - return c - } - } - class Na { - constructor(t, r, a) { - this.property = t, this.value = r, this.parameters = a - } - isConstant() { - return this.value.kind === "constant" - } - constantOr(t) { - return this.value.kind === "constant" ? this.value.value : t - } - evaluate(t, r, a, c) { - return this.property.evaluate(this.value, this.parameters, t, r, a, c) - } - } - class Cl { - constructor(t) { - this._properties = t, this._values = Object.create(t.defaultPossiblyEvaluatedValues) - } - get(t) { - return this._values[t] - } - } - class hr { - constructor(t) { - this.specification = t - } - possiblyEvaluate(t, r) { - if (t.isDataDriven()) throw new Error("Value should not be data driven"); - return t.expression.evaluate(r) - } - interpolate(t, r, a) { - const c = Fa[this.specification.type]; - return c ? c(t, r, a) : t - } - } - class Rr { - constructor(t, r) { - this.specification = t, this.overrides = r - } - possiblyEvaluate(t, r, a, c) { - return new Na(this, t.expression.kind === "constant" || t.expression.kind === "camera" ? { - kind: "constant", - value: t.expression.evaluate(r, null, {}, a, c) - } : t.expression, r) - } - interpolate(t, r, a) { - if (t.value.kind !== "constant" || r.value.kind !== "constant") return t; - if (t.value.value === void 0 || r.value.value === void 0) return new Na(this, { - kind: "constant", - value: void 0 - }, t.parameters); - const c = Fa[this.specification.type]; - if (c) { - const p = c(t.value.value, r.value.value, a); - return new Na(this, { - kind: "constant", - value: p - }, t.parameters) - } - return t - } - evaluate(t, r, a, c, p, f) { - return t.kind === "constant" ? t.value : t.evaluate(r, a, c, p, f) - } - } - class Sl extends Rr { - possiblyEvaluate(t, r, a, c) { - if (t.value === void 0) return new Na(this, { - kind: "constant", - value: void 0 - }, r); - if (t.expression.kind === "constant") { - const p = t.expression.evaluate(r, null, {}, a, c), - f = t.property.specification.type === "resolvedImage" && typeof p != "string" ? p.name : p, - g = this._calculate(f, f, f, r); - return new Na(this, { - kind: "constant", - value: g - }, r) - } - if (t.expression.kind === "camera") { - const p = this._calculate(t.expression.evaluate({ - zoom: r.zoom - 1 - }), t.expression.evaluate({ - zoom: r.zoom - }), t.expression.evaluate({ - zoom: r.zoom + 1 - }), r); - return new Na(this, { - kind: "constant", - value: p - }, r) - } - return new Na(this, t.expression, r) - } - evaluate(t, r, a, c, p, f) { - if (t.kind === "source") { - const g = t.evaluate(r, a, c, p, f); - return this._calculate(g, g, g, r) - } - return t.kind === "composite" ? this._calculate(t.evaluate({ - zoom: Math.floor(r.zoom) - 1 - }, a, c), t.evaluate({ - zoom: Math.floor(r.zoom) - }, a, c), t.evaluate({ - zoom: Math.floor(r.zoom) + 1 - }, a, c), r) : t.value - } - _calculate(t, r, a, c) { - return c.zoom > c.zoomHistory.lastIntegerZoom ? { - from: t, - to: r - } : { - from: a, - to: r - } - } - interpolate(t) { - return t - } - } - class ns { - constructor(t) { - this.specification = t - } - possiblyEvaluate(t, r, a, c) { - if (t.value !== void 0) { - if (t.expression.kind === "constant") { - const p = t.expression.evaluate(r, null, {}, a, c); - return this._calculate(p, p, p, r) - } - return this._calculate(t.expression.evaluate(new Oi(Math.floor(r.zoom - 1), r)), t.expression.evaluate(new Oi(Math.floor(r.zoom), r)), t.expression.evaluate(new Oi(Math.floor(r.zoom + 1), r)), r) - } - } - _calculate(t, r, a, c) { - return c.zoom > c.zoomHistory.lastIntegerZoom ? { - from: t, - to: r - } : { - from: a, - to: r - } - } - interpolate(t) { - return t - } - } - class Pl { - constructor(t) { - this.specification = t - } - possiblyEvaluate(t, r, a, c) { - return !!t.expression.evaluate(r, null, {}, a, c) - } - interpolate() { - return !1 - } - } - class jn { - constructor(t) { - this.properties = t, this.defaultPropertyValues = {}, this.defaultTransitionablePropertyValues = {}, this.defaultTransitioningPropertyValues = {}, this.defaultPossiblyEvaluatedValues = {}, this.overridableProperties = []; - for (const r in t) { - const a = t[r]; - a.specification.overridable && this.overridableProperties.push(r); - const c = this.defaultPropertyValues[r] = new Hs(a, void 0), - p = this.defaultTransitionablePropertyValues[r] = new Wc(a); - this.defaultTransitioningPropertyValues[r] = p.untransitioned(), this.defaultPossiblyEvaluatedValues[r] = c.possiblyEvaluate({}) - } - } - } - Kt("DataDrivenProperty", Rr), Kt("DataConstantProperty", hr), Kt("CrossFadedDataDrivenProperty", Sl), Kt("CrossFadedProperty", ns), Kt("ColorRampProperty", Pl); - const rd = "-transition"; - class ha extends Ot { - constructor(t, r) { - if (super(), this.id = t.id, this.type = t.type, this._featureFilter = { - filter: () => !0, - needGeometry: !1, - getGlobalStateRefs: () => new Set - }, 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 = bs(t.filter)), r.layout && (this._unevaluatedLayout = new td(r.layout)), r.paint)) { - this._transitionablePaint = new ed(r.paint); - for (const a in t.paint) this.setPaintProperty(a, t.paint[a], { - validate: !1 - }); - for (const a in t.layout) this.setLayoutProperty(a, t.layout[a], { - validate: !1 - }); - this._transitioningPaint = this._transitionablePaint.untransitioned(), this.paint = new Cl(r.paint) - } - } - setFilter(t) { - this.filter = t, this._featureFilter = bs(t) - } - getCrossfadeParameters() { - return this._crossfadeParameters - } - getLayoutProperty(t) { - return t === "visibility" ? this.visibility : this._unevaluatedLayout.getValue(t) - } - getLayoutAffectingGlobalStateRefs() { - const t = new Set; - if (this._unevaluatedLayout) - for (const r in this._unevaluatedLayout._values) { - const a = this._unevaluatedLayout._values[r]; - for (const c of a.getGlobalStateRefs()) t.add(c) - } - for (const r of this._featureFilter.getGlobalStateRefs()) t.add(r); - return t - } - setLayoutProperty(t, r, a = {}) { - r != null && this._validate(vp, `layers.${this.id}.layout.${t}`, t, r, a) || (t !== "visibility" ? this._unevaluatedLayout.setValue(t, r) : this.visibility = r) - } - getPaintProperty(t) { - return t.endsWith(rd) ? this._transitionablePaint.getTransition(t.slice(0, -11)) : this._transitionablePaint.getValue(t) - } - setPaintProperty(t, r, a = {}) { - if (r != null && this._validate(gp, `layers.${this.id}.paint.${t}`, t, r, a)) return !1; - if (t.endsWith(rd)) return this._transitionablePaint.setTransition(t.slice(0, -11), r || void 0), !1; - { - const c = this._transitionablePaint._values[t], - p = c.property.specification["property-type"] === "cross-faded-data-driven", - f = c.value.isDataDriven(), - g = c.value; - this._transitionablePaint.setValue(t, r), this._handleSpecialPaintPropertyUpdate(t); - const v = this._transitionablePaint._values[t].value; - return v.isDataDriven() || f || p || this._handleOverridablePaintPropertyUpdate(t, g, v) - } - } - _handleSpecialPaintPropertyUpdate(t) {} - _handleOverridablePaintPropertyUpdate(t, r, a) { - return !1 - } - isHidden(t) { - return !!(this.minzoom && t < this.minzoom) || !!(this.maxzoom && t >= this.maxzoom) || this.visibility === "none" - } - updateTransitions(t) { - this._transitioningPaint = this._transitionablePaint.transitioned(t, this._transitioningPaint) - } - hasTransition() { - return this._transitioningPaint.hasTransition() - } - recalculate(t, r) { - t.getCrossfadeParameters && (this._crossfadeParameters = t.getCrossfadeParameters()), this._unevaluatedLayout && (this.layout = this._unevaluatedLayout.possiblyEvaluate(t, void 0, r)), this.paint = this._transitioningPaint.possiblyEvaluate(t, void 0, r) - } - serialize() { - const t = { - 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: this._unevaluatedLayout && this._unevaluatedLayout.serialize(), - paint: this._transitionablePaint && this._transitionablePaint.serialize() - }; - return this.visibility && (t.layout = t.layout || {}, t.layout.visibility = this.visibility), bt(t, ((r, a) => !(r === void 0 || a === "layout" && !Object.keys(r).length || a === "paint" && !Object.keys(r).length))) - } - _validate(t, r, a, c, p = {}) { - return (!p || p.validate !== !1) && Eo(this, t.call($s, { - key: r, - layerType: this.type, - objectKey: a, - value: c, - styleSpec: xe, - style: { - glyphs: !0, - sprite: !0 - } - })) - } - is3D() { - return !1 - } - isTileClipped() { - return !1 - } - hasOffscreenPass() { - return !1 - } - resize() {} - isStateDependent() { - for (const t in this.paint._values) { - const r = this.paint.get(t); - if (r instanceof Na && rs(r.property.specification) && (r.value.kind === "source" || r.value.kind === "composite") && r.value.isStateDependent) return !0 - } - return !1 - } - } - const bp = { - Int8: Int8Array, - Uint8: Uint8Array, - Int16: Int16Array, - Uint16: Uint16Array, - Int32: Int32Array, - Uint32: Uint32Array, - Float32: Float32Array - }; - class Lo { - constructor(t, r) { - this._structArray = t, this._pos1 = r * this.size, this._pos2 = this._pos1 / 2, this._pos4 = this._pos1 / 4, this._pos8 = this._pos1 / 8 - } - } - class Ai { - constructor() { - this.isTransferred = !1, this.capacity = -1, this.resize(0) - } - static serialize(t, r) { - return t._trim(), r && (t.isTransferred = !0, r.push(t.arrayBuffer)), { - length: t.length, - arrayBuffer: t.arrayBuffer - } - } - static deserialize(t) { - const r = Object.create(this.prototype); - return r.arrayBuffer = t.arrayBuffer, r.length = t.length, r.capacity = t.arrayBuffer.byteLength / r.bytesPerElement, r._refreshViews(), r - } - _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 r = this.uint8; - this._refreshViews(), r && this.uint8.set(r) - } - } - _refreshViews() { - throw new Error("_refreshViews() must be implemented by each concrete StructArray layout") - } - } - - function Hi(i, t = 1) { - let r = 0, - a = 0; - return { - members: i.map((c => { - const p = bp[c.type].BYTES_PER_ELEMENT, - f = r = Il(r, Math.max(t, p)), - g = c.components || 1; - return a = Math.max(a, p), r += p * g, { - name: c.name, - type: c.type, - components: g, - offset: f - } - })), - size: Il(r, Math.max(a, t)), - alignment: t - } - } - - function Il(i, t) { - return Math.ceil(i / t) * t - } - class Ws extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer) - } - emplaceBack(t, r) { - const a = this.length; - return this.resize(a + 1), this.emplace(a, t, r) - } - emplace(t, r, a) { - const c = 2 * t; - return this.int16[c + 0] = r, this.int16[c + 1] = a, t - } - } - Ws.prototype.bytesPerElement = 4, Kt("StructArrayLayout2i4", Ws); - class Xs extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer) - } - emplaceBack(t, r, a) { - const c = this.length; - return this.resize(c + 1), this.emplace(c, t, r, a) - } - emplace(t, r, a, c) { - const p = 3 * t; - return this.int16[p + 0] = r, this.int16[p + 1] = a, this.int16[p + 2] = c, t - } - } - Xs.prototype.bytesPerElement = 6, Kt("StructArrayLayout3i6", Xs); - class Yc extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer) - } - emplaceBack(t, r, a, c) { - const p = this.length; - return this.resize(p + 1), this.emplace(p, t, r, a, c) - } - emplace(t, r, a, c, p) { - const f = 4 * t; - return this.int16[f + 0] = r, this.int16[f + 1] = a, this.int16[f + 2] = c, this.int16[f + 3] = p, t - } - } - Yc.prototype.bytesPerElement = 8, Kt("StructArrayLayout4i8", Yc); - class Ks extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer) - } - emplaceBack(t, r, a, c, p, f) { - const g = this.length; - return this.resize(g + 1), this.emplace(g, t, r, a, c, p, f) - } - emplace(t, r, a, c, p, f, g) { - const v = 6 * t; - return this.int16[v + 0] = r, this.int16[v + 1] = a, this.int16[v + 2] = c, this.int16[v + 3] = p, this.int16[v + 4] = f, this.int16[v + 5] = g, t - } - } - Ks.prototype.bytesPerElement = 12, Kt("StructArrayLayout2i4i12", Ks); - class Ss extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer) - } - emplaceBack(t, r, a, c, p, f) { - const g = this.length; - return this.resize(g + 1), this.emplace(g, t, r, a, c, p, f) - } - emplace(t, r, a, c, p, f, g) { - const v = 4 * t, - S = 8 * t; - return this.int16[v + 0] = r, this.int16[v + 1] = a, this.uint8[S + 4] = c, this.uint8[S + 5] = p, this.uint8[S + 6] = f, this.uint8[S + 7] = g, t - } - } - Ss.prototype.bytesPerElement = 8, Kt("StructArrayLayout2i4ub8", Ss); - class Do extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer) - } - emplaceBack(t, r) { - const a = this.length; - return this.resize(a + 1), this.emplace(a, t, r) - } - emplace(t, r, a) { - const c = 2 * t; - return this.float32[c + 0] = r, this.float32[c + 1] = a, t - } - } - Do.prototype.bytesPerElement = 8, Kt("StructArrayLayout2f8", Do); - class Ml extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer) - } - emplaceBack(t, r, a, c, p, f, g, v, S, I) { - const E = this.length; - return this.resize(E + 1), this.emplace(E, t, r, a, c, p, f, g, v, S, I) - } - emplace(t, r, a, c, p, f, g, v, S, I, E) { - const R = 10 * t; - return this.uint16[R + 0] = r, this.uint16[R + 1] = a, this.uint16[R + 2] = c, this.uint16[R + 3] = p, this.uint16[R + 4] = f, this.uint16[R + 5] = g, this.uint16[R + 6] = v, this.uint16[R + 7] = S, this.uint16[R + 8] = I, this.uint16[R + 9] = E, t - } - } - Ml.prototype.bytesPerElement = 20, Kt("StructArrayLayout10ui20", Ml); - class Ps extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer) - } - emplaceBack(t, r, a, c, p, f, g, v, S, I, E, R) { - const N = this.length; - return this.resize(N + 1), this.emplace(N, t, r, a, c, p, f, g, v, S, I, E, R) - } - emplace(t, r, a, c, p, f, g, v, S, I, E, R, N) { - const j = 12 * t; - return this.int16[j + 0] = r, this.int16[j + 1] = a, this.int16[j + 2] = c, this.int16[j + 3] = p, this.uint16[j + 4] = f, this.uint16[j + 5] = g, this.uint16[j + 6] = v, this.uint16[j + 7] = S, this.int16[j + 8] = I, this.int16[j + 9] = E, this.int16[j + 10] = R, this.int16[j + 11] = N, t - } - } - Ps.prototype.bytesPerElement = 24, Kt("StructArrayLayout4i4ui4i24", Ps); - class Jc extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer) - } - emplaceBack(t, r, a) { - const c = this.length; - return this.resize(c + 1), this.emplace(c, t, r, a) - } - emplace(t, r, a, c) { - const p = 3 * t; - return this.float32[p + 0] = r, this.float32[p + 1] = a, this.float32[p + 2] = c, t - } - } - Jc.prototype.bytesPerElement = 12, Kt("StructArrayLayout3f12", Jc); - class Qc extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer) - } - emplaceBack(t) { - const r = this.length; - return this.resize(r + 1), this.emplace(r, t) - } - emplace(t, r) { - return this.uint32[1 * t + 0] = r, t - } - } - Qc.prototype.bytesPerElement = 4, Kt("StructArrayLayout1ul4", Qc); - class Al extends Ai { - _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, r, a, c, p, f, g, v, S) { - const I = this.length; - return this.resize(I + 1), this.emplace(I, t, r, a, c, p, f, g, v, S) - } - emplace(t, r, a, c, p, f, g, v, S, I) { - const E = 10 * t, - R = 5 * t; - return this.int16[E + 0] = r, this.int16[E + 1] = a, this.int16[E + 2] = c, this.int16[E + 3] = p, this.int16[E + 4] = f, this.int16[E + 5] = g, this.uint32[R + 3] = v, this.uint16[E + 8] = S, this.uint16[E + 9] = I, t - } - } - Al.prototype.bytesPerElement = 20, Kt("StructArrayLayout6i1ul2ui20", Al); - class eu extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer) - } - emplaceBack(t, r, a, c, p, f) { - const g = this.length; - return this.resize(g + 1), this.emplace(g, t, r, a, c, p, f) - } - emplace(t, r, a, c, p, f, g) { - const v = 6 * t; - return this.int16[v + 0] = r, this.int16[v + 1] = a, this.int16[v + 2] = c, this.int16[v + 3] = p, this.int16[v + 4] = f, this.int16[v + 5] = g, t - } - } - eu.prototype.bytesPerElement = 12, Kt("StructArrayLayout2i2i2i12", eu); - class h extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer) - } - emplaceBack(t, r, a, c, p) { - const f = this.length; - return this.resize(f + 1), this.emplace(f, t, r, a, c, p) - } - emplace(t, r, a, c, p, f) { - const g = 4 * t, - v = 8 * t; - return this.float32[g + 0] = r, this.float32[g + 1] = a, this.float32[g + 2] = c, this.int16[v + 6] = p, this.int16[v + 7] = f, t - } - } - h.prototype.bytesPerElement = 16, Kt("StructArrayLayout2f1f2i16", h); - class e extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer) - } - emplaceBack(t, r, a, c, p, f) { - const g = this.length; - return this.resize(g + 1), this.emplace(g, t, r, a, c, p, f) - } - emplace(t, r, a, c, p, f, g) { - const v = 16 * t, - S = 4 * t, - I = 8 * t; - return this.uint8[v + 0] = r, this.uint8[v + 1] = a, this.float32[S + 1] = c, this.float32[S + 2] = p, this.int16[I + 6] = f, this.int16[I + 7] = g, t - } - } - e.prototype.bytesPerElement = 16, Kt("StructArrayLayout2ub2f2i16", e); - class n extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer) - } - emplaceBack(t, r, a) { - const c = this.length; - return this.resize(c + 1), this.emplace(c, t, r, a) - } - emplace(t, r, a, c) { - const p = 3 * t; - return this.uint16[p + 0] = r, this.uint16[p + 1] = a, this.uint16[p + 2] = c, t - } - } - n.prototype.bytesPerElement = 6, Kt("StructArrayLayout3ui6", n); - class s extends Ai { - _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, r, a, c, p, f, g, v, S, I, E, R, N, j, Z, Y, ae) { - const ze = this.length; - return this.resize(ze + 1), this.emplace(ze, t, r, a, c, p, f, g, v, S, I, E, R, N, j, Z, Y, ae) - } - emplace(t, r, a, c, p, f, g, v, S, I, E, R, N, j, Z, Y, ae, ze) { - const me = 24 * t, - be = 12 * t, - Ve = 48 * t; - return this.int16[me + 0] = r, this.int16[me + 1] = a, this.uint16[me + 2] = c, this.uint16[me + 3] = p, this.uint32[be + 2] = f, this.uint32[be + 3] = g, this.uint32[be + 4] = v, this.uint16[me + 10] = S, this.uint16[me + 11] = I, this.uint16[me + 12] = E, this.float32[be + 7] = R, this.float32[be + 8] = N, this.uint8[Ve + 36] = j, this.uint8[Ve + 37] = Z, this.uint8[Ve + 38] = Y, this.uint32[be + 10] = ae, this.int16[me + 22] = ze, t - } - } - s.prototype.bytesPerElement = 48, Kt("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48", s); - class u extends Ai { - _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, r, a, c, p, f, g, v, S, I, E, R, N, j, Z, Y, ae, ze, me, be, Ve, rt, St, $t, Bt, Ut, pr, Vt) { - const Zt = this.length; - return this.resize(Zt + 1), this.emplace(Zt, t, r, a, c, p, f, g, v, S, I, E, R, N, j, Z, Y, ae, ze, me, be, Ve, rt, St, $t, Bt, Ut, pr, Vt) - } - emplace(t, r, a, c, p, f, g, v, S, I, E, R, N, j, Z, Y, ae, ze, me, be, Ve, rt, St, $t, Bt, Ut, pr, Vt, Zt) { - const mt = 32 * t, - Br = 16 * t; - return this.int16[mt + 0] = r, this.int16[mt + 1] = a, this.int16[mt + 2] = c, this.int16[mt + 3] = p, this.int16[mt + 4] = f, this.int16[mt + 5] = g, this.int16[mt + 6] = v, this.int16[mt + 7] = S, this.uint16[mt + 8] = I, this.uint16[mt + 9] = E, this.uint16[mt + 10] = R, this.uint16[mt + 11] = N, this.uint16[mt + 12] = j, this.uint16[mt + 13] = Z, this.uint16[mt + 14] = Y, this.uint16[mt + 15] = ae, this.uint16[mt + 16] = ze, this.uint16[mt + 17] = me, this.uint16[mt + 18] = be, this.uint16[mt + 19] = Ve, this.uint16[mt + 20] = rt, this.uint16[mt + 21] = St, this.uint16[mt + 22] = $t, this.uint32[Br + 12] = Bt, this.float32[Br + 13] = Ut, this.float32[Br + 14] = pr, this.uint16[mt + 30] = Vt, this.uint16[mt + 31] = Zt, t - } - } - u.prototype.bytesPerElement = 64, Kt("StructArrayLayout8i15ui1ul2f2ui64", u); - class d extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer) - } - emplaceBack(t) { - const r = this.length; - return this.resize(r + 1), this.emplace(r, t) - } - emplace(t, r) { - return this.float32[1 * t + 0] = r, t - } - } - d.prototype.bytesPerElement = 4, Kt("StructArrayLayout1f4", d); - class m extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer) - } - emplaceBack(t, r, a) { - const c = this.length; - return this.resize(c + 1), this.emplace(c, t, r, a) - } - emplace(t, r, a, c) { - const p = 3 * t; - return this.uint16[6 * t + 0] = r, this.float32[p + 1] = a, this.float32[p + 2] = c, t - } - } - m.prototype.bytesPerElement = 12, Kt("StructArrayLayout1ui2f12", m); - class y extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer) - } - emplaceBack(t, r, a) { - const c = this.length; - return this.resize(c + 1), this.emplace(c, t, r, a) - } - emplace(t, r, a, c) { - const p = 4 * t; - return this.uint32[2 * t + 0] = r, this.uint16[p + 2] = a, this.uint16[p + 3] = c, t - } - } - y.prototype.bytesPerElement = 8, Kt("StructArrayLayout1ul2ui8", y); - class w extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer) - } - emplaceBack(t, r) { - const a = this.length; - return this.resize(a + 1), this.emplace(a, t, r) - } - emplace(t, r, a) { - const c = 2 * t; - return this.uint16[c + 0] = r, this.uint16[c + 1] = a, t - } - } - w.prototype.bytesPerElement = 4, Kt("StructArrayLayout2ui4", w); - class P extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer) - } - emplaceBack(t) { - const r = this.length; - return this.resize(r + 1), this.emplace(r, t) - } - emplace(t, r) { - return this.uint16[1 * t + 0] = r, t - } - } - P.prototype.bytesPerElement = 2, Kt("StructArrayLayout1ui2", P); - class M extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer) - } - emplaceBack(t, r, a, c) { - const p = this.length; - return this.resize(p + 1), this.emplace(p, t, r, a, c) - } - emplace(t, r, a, c, p) { - const f = 4 * t; - return this.float32[f + 0] = r, this.float32[f + 1] = a, this.float32[f + 2] = c, this.float32[f + 3] = p, t - } - } - M.prototype.bytesPerElement = 16, Kt("StructArrayLayout4f16", M); - class D extends Lo { - 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] - } - get anchorPoint() { - return new $(this.anchorPointX, this.anchorPointY) - } - } - D.prototype.size = 20; - class z extends Al { - get(t) { - return new D(this, t) - } - } - Kt("CollisionBoxArray", z); - class B extends Lo { - 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 U extends s { - get(t) { - return new B(this, t) - } - } - Kt("PlacedSymbolArray", U); - class ee extends Lo { - 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] - } - } - ee.prototype.size = 64; - class J extends u { - get(t) { - return new ee(this, t) - } - } - Kt("SymbolInstanceArray", J); - class re extends d { - getoffsetX(t) { - return this.float32[1 * t + 0] - } - } - Kt("GlyphOffsetArray", re); - class se extends Xs { - getx(t) { - return this.int16[3 * t + 0] - } - gety(t) { - return this.int16[3 * t + 1] - } - gettileUnitDistanceFromAnchor(t) { - return this.int16[3 * t + 2] - } - } - Kt("SymbolLineVertexArray", se); - class de extends Lo { - 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] - } - } - de.prototype.size = 12; - class ue extends m { - get(t) { - return new de(this, t) - } - } - Kt("TextAnchorOffsetArray", ue); - class ge extends Lo { - 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] - } - } - ge.prototype.size = 8; - class Te extends y { - get(t) { - return new ge(this, t) - } - } - Kt("FeatureIndexArray", Te); - class he extends Ws {} - class De extends Ws {} - class He extends Ws {} - class je extends Ks {} - class qe extends Ss {} - class $e extends Do {} - class Rt extends Ml {} - class Nt extends Ps {} - class yt extends Jc {} - class sr extends Qc {} - class Xr extends eu {} - class xi extends e {} - class ki extends n {} - class Pi extends w {} - const ji = Hi([{ - name: "a_pos", - components: 2, - type: "Int16" - }], 4), - { - members: Ui - } = ji; - class Wr { - constructor(t = []) { - this._forceNewSegmentOnNextPrepare = !1, this.segments = t - } - prepareSegment(t, r, a, c) { - const p = this.segments[this.segments.length - 1]; - return t > Wr.MAX_VERTEX_ARRAY_LENGTH && Lt(`Max vertices per segment is ${Wr.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${Wr.MAX_VERTEX_ARRAY_LENGTH} vertices.`), this._forceNewSegmentOnNextPrepare || !p || p.vertexLength + t > Wr.MAX_VERTEX_ARRAY_LENGTH || p.sortKey !== c ? this.createNewSegment(r, a, c) : p - } - createNewSegment(t, r, a) { - const c = { - vertexOffset: t.length, - primitiveOffset: r.length, - vertexLength: 0, - primitiveLength: 0, - vaos: {} - }; - return a !== void 0 && (c.sortKey = a), this._forceNewSegmentOnNextPrepare = !1, this.segments.push(c), c - } - getOrCreateLatestSegment(t, r, a) { - return this.prepareSegment(0, t, r, a) - } - forceNewSegmentOnNextPrepare() { - this._forceNewSegmentOnNextPrepare = !0 - } - get() { - return this.segments - } - destroy() { - for (const t of this.segments) - for (const r in t.vaos) t.vaos[r].destroy() - } - static simpleSegment(t, r, a, c) { - return new Wr([{ - vertexOffset: t, - primitiveOffset: r, - vertexLength: a, - primitiveLength: c, - vaos: {}, - sortKey: 0 - }]) - } - } - - function Ei(i, t) { - return 256 * (i = xt(Math.floor(i), 0, 255)) + xt(Math.floor(t), 0, 255) - } - Wr.MAX_VERTEX_ARRAY_LENGTH = Math.pow(2, 16) - 1, Kt("SegmentVector", Wr); - const Qi = Hi([{ - 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" - }]); - var dn, xn, qn, Sa = { - exports: {} - }, - as = { - exports: {} - }, - ss = { - exports: {} - }, - Ys = (function() { - if (qn) return Sa.exports; - qn = 1; - var i = (dn || (dn = 1, as.exports = function(r, a) { - var c, p, f, g, v, S, I, E; - for (p = r.length - (c = 3 & r.length), f = a, v = 3432918353, S = 461845907, E = 0; E < p;) I = 255 & r.charCodeAt(E) | (255 & r.charCodeAt(++E)) << 8 | (255 & r.charCodeAt(++E)) << 16 | (255 & r.charCodeAt(++E)) << 24, ++E, f = 27492 + (65535 & (g = 5 * (65535 & (f = (f ^= I = (65535 & (I = (I = (65535 & I) * v + (((I >>> 16) * v & 65535) << 16) & 4294967295) << 15 | I >>> 17)) * S + (((I >>> 16) * S & 65535) << 16) & 4294967295) << 13 | f >>> 19)) + ((5 * (f >>> 16) & 65535) << 16) & 4294967295)) + ((58964 + (g >>> 16) & 65535) << 16); - switch (I = 0, c) { - case 3: - I ^= (255 & r.charCodeAt(E + 2)) << 16; - case 2: - I ^= (255 & r.charCodeAt(E + 1)) << 8; - case 1: - f ^= I = (65535 & (I = (I = (65535 & (I ^= 255 & r.charCodeAt(E))) * v + (((I >>> 16) * v & 65535) << 16) & 4294967295) << 15 | I >>> 17)) * S + (((I >>> 16) * S & 65535) << 16) & 4294967295 - } - return f ^= r.length, f = 2246822507 * (65535 & (f ^= f >>> 16)) + ((2246822507 * (f >>> 16) & 65535) << 16) & 4294967295, f = 3266489909 * (65535 & (f ^= f >>> 13)) + ((3266489909 * (f >>> 16) & 65535) << 16) & 4294967295, (f ^= f >>> 16) >>> 0 - }), as.exports), - t = (xn || (xn = 1, ss.exports = function(r, a) { - for (var c, p = r.length, f = a ^ p, g = 0; p >= 4;) c = 1540483477 * (65535 & (c = 255 & r.charCodeAt(g) | (255 & r.charCodeAt(++g)) << 8 | (255 & r.charCodeAt(++g)) << 16 | (255 & r.charCodeAt(++g)) << 24)) + ((1540483477 * (c >>> 16) & 65535) << 16), f = 1540483477 * (65535 & f) + ((1540483477 * (f >>> 16) & 65535) << 16) ^ (c = 1540483477 * (65535 & (c ^= c >>> 24)) + ((1540483477 * (c >>> 16) & 65535) << 16)), p -= 4, ++g; - switch (p) { - case 3: - f ^= (255 & r.charCodeAt(g + 2)) << 16; - case 2: - f ^= (255 & r.charCodeAt(g + 1)) << 8; - case 1: - f = 1540483477 * (65535 & (f ^= 255 & r.charCodeAt(g))) + ((1540483477 * (f >>> 16) & 65535) << 16) - } - return f = 1540483477 * (65535 & (f ^= f >>> 13)) + ((1540483477 * (f >>> 16) & 65535) << 16), (f ^= f >>> 15) >>> 0 - }), ss.exports); - return Sa.exports = i, Sa.exports.murmur3 = i, Sa.exports.murmur2 = t, Sa.exports - })(), - Js = W(Ys); - class Is { - constructor() { - this.ids = [], this.positions = [], this.indexed = !1 - } - add(t, r, a, c) { - this.ids.push(Ms(t)), this.positions.push(r, a, c) - } - getPositions(t) { - if (!this.indexed) throw new Error("Trying to get index, but feature positions are not indexed"); - const r = Ms(t); - let a = 0, - c = this.ids.length - 1; - for (; a < c;) { - const f = a + c >> 1; - this.ids[f] >= r ? c = f : a = f + 1 - } - const p = []; - for (; this.ids[a] === r;) p.push({ - index: this.positions[3 * a], - start: this.positions[3 * a + 1], - end: this.positions[3 * a + 2] - }), a++; - return p - } - static serialize(t, r) { - const a = new Float64Array(t.ids), - c = new Uint32Array(t.positions); - return Kn(a, c, 0, a.length - 1), r && r.push(a.buffer, c.buffer), { - ids: a, - positions: c - } - } - static deserialize(t) { - const r = new Is; - return r.ids = t.ids, r.positions = t.positions, r.indexed = !0, r - } - } - - function Ms(i) { - const t = +i; - return !isNaN(t) && t <= Number.MAX_SAFE_INTEGER ? t : Js(String(i)) - } - - function Kn(i, t, r, a) { - for (; r < a;) { - const c = i[r + a >> 1]; - let p = r - 1, - f = a + 1; - for (;;) { - do p++; while (i[p] < c); - do f--; while (i[f] > c); - if (p >= f) break; - Pa(i, p, f), Pa(t, 3 * p, 3 * f), Pa(t, 3 * p + 1, 3 * f + 1), Pa(t, 3 * p + 2, 3 * f + 2) - } - f - r < a - f ? (Kn(i, t, r, f), r = f + 1) : (Kn(i, t, f + 1, a), a = f) - } - } - - function Pa(i, t, r) { - const a = i[t]; - i[t] = i[r], i[r] = a - } - Kt("FeaturePositionMap", Is); - class Vn { - constructor(t, r) { - this.gl = t.gl, this.location = r - } - } - class os extends Vn { - constructor(t, r) { - super(t, r), this.current = 0 - } - set(t) { - this.current !== t && (this.current = t, this.gl.uniform1f(this.location, t)) - } - } - class en extends Vn { - constructor(t, r) { - super(t, r), 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 pn extends Vn { - constructor(t, r) { - super(t, r), this.current = yr.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 da = new Float32Array(16); - - function tn(i) { - return [Ei(255 * i.r, 255 * i.g), Ei(255 * i.b, 255 * i.a)] - } - class Ro { - constructor(t, r, a) { - this.value = t, this.uniformNames = r.map((c => `u_${c}`)), this.type = a - } - setUniform(t, r, a) { - t.set(a.constantOr(this.value)) - } - getBinding(t, r, a) { - return this.type === "color" ? new pn(t, r) : new os(t, r) - } - } - class Qs { - constructor(t, r) { - this.uniformNames = r.map((a => `u_${a}`)), this.patternFrom = null, this.patternTo = null, this.pixelRatioFrom = 1, this.pixelRatioTo = 1 - } - setConstantPatternPositions(t, r) { - this.pixelRatioFrom = r.pixelRatio, this.pixelRatioTo = t.pixelRatio, this.patternFrom = r.tlbr, this.patternTo = t.tlbr - } - setUniform(t, r, a, c) { - const p = c === "u_pattern_to" ? this.patternTo : c === "u_pattern_from" ? this.patternFrom : c === "u_pixel_ratio_to" ? this.pixelRatioTo : c === "u_pixel_ratio_from" ? this.pixelRatioFrom : null; - p && t.set(p) - } - getBinding(t, r, a) { - return a.substr(0, 9) === "u_pattern" ? new en(t, r) : new os(t, r) - } - } - class Ha { - constructor(t, r, a, c) { - this.expression = t, this.type = a, this.maxValue = 0, this.paintVertexAttributes = r.map((p => ({ - name: `a_${p}`, - type: "Float32", - components: a === "color" ? 2 : 1, - offset: 0 - }))), this.paintVertexArray = new c - } - populatePaintArray(t, r, a, c, p) { - const f = this.paintVertexArray.length, - g = this.expression.evaluate(new Oi(0), r, {}, c, [], p); - this.paintVertexArray.resize(t), this._setPaintValue(f, t, g) - } - updatePaintArray(t, r, a, c) { - const p = this.expression.evaluate({ - zoom: 0 - }, a, c); - this._setPaintValue(t, r, p) - } - _setPaintValue(t, r, a) { - if (this.type === "color") { - const c = tn(a); - for (let p = t; p < r; p++) this.paintVertexArray.emplace(p, c[0], c[1]) - } else { - for (let c = t; c < r; c++) this.paintVertexArray.emplace(c, a); - this.maxValue = Math.max(this.maxValue, Math.abs(a)) - } - } - upload(t) { - this.paintVertexArray && this.paintVertexArray.arrayBuffer && (this.paintVertexBuffer && this.paintVertexBuffer.buffer ? this.paintVertexBuffer.updateData(this.paintVertexArray) : this.paintVertexBuffer = t.createVertexBuffer(this.paintVertexArray, this.paintVertexAttributes, this.expression.isStateDependent)) - } - destroy() { - this.paintVertexBuffer && this.paintVertexBuffer.destroy() - } - } - class Ia { - constructor(t, r, a, c, p, f) { - this.expression = t, this.uniformNames = r.map((g => `u_${g}_t`)), this.type = a, this.useIntegerZoom = c, this.zoom = p, this.maxValue = 0, this.paintVertexAttributes = r.map((g => ({ - name: `a_${g}`, - type: "Float32", - components: a === "color" ? 4 : 2, - offset: 0 - }))), this.paintVertexArray = new f - } - populatePaintArray(t, r, a, c, p) { - const f = this.expression.evaluate(new Oi(this.zoom), r, {}, c, [], p), - g = this.expression.evaluate(new Oi(this.zoom + 1), r, {}, c, [], p), - v = this.paintVertexArray.length; - this.paintVertexArray.resize(t), this._setPaintValue(v, t, f, g) - } - updatePaintArray(t, r, a, c) { - const p = this.expression.evaluate({ - zoom: this.zoom - }, a, c), - f = this.expression.evaluate({ - zoom: this.zoom + 1 - }, a, c); - this._setPaintValue(t, r, p, f) - } - _setPaintValue(t, r, a, c) { - if (this.type === "color") { - const p = tn(a), - f = tn(c); - for (let g = t; g < r; g++) this.paintVertexArray.emplace(g, p[0], p[1], f[0], f[1]) - } else { - for (let p = t; p < r; p++) this.paintVertexArray.emplace(p, a, c); - this.maxValue = Math.max(this.maxValue, Math.abs(a), Math.abs(c)) - } - } - upload(t) { - this.paintVertexArray && this.paintVertexArray.arrayBuffer && (this.paintVertexBuffer && this.paintVertexBuffer.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, r) { - const a = this.useIntegerZoom ? Math.floor(r.zoom) : r.zoom, - c = xt(this.expression.interpolationFactor(a, this.zoom, this.zoom + 1), 0, 1); - t.set(c) - } - getBinding(t, r, a) { - return new os(t, r) - } - } - class ls { - constructor(t, r, a, c, p, f) { - this.expression = t, this.type = r, this.useIntegerZoom = a, this.zoom = c, this.layerId = f, this.zoomInPaintVertexArray = new p, this.zoomOutPaintVertexArray = new p - } - populatePaintArray(t, r, a) { - const c = this.zoomInPaintVertexArray.length; - this.zoomInPaintVertexArray.resize(t), this.zoomOutPaintVertexArray.resize(t), this._setPaintValues(c, t, r.patterns && r.patterns[this.layerId], a) - } - updatePaintArray(t, r, a, c, p) { - this._setPaintValues(t, r, a.patterns && a.patterns[this.layerId], p) - } - _setPaintValues(t, r, a, c) { - if (!c || !a) return; - const { - min: p, - mid: f, - max: g - } = a, v = c[p], S = c[f], I = c[g]; - if (v && S && I) - for (let E = t; E < r; E++) this.zoomInPaintVertexArray.emplace(E, S.tl[0], S.tl[1], S.br[0], S.br[1], v.tl[0], v.tl[1], v.br[0], v.br[1], S.pixelRatio, v.pixelRatio), this.zoomOutPaintVertexArray.emplace(E, S.tl[0], S.tl[1], S.br[0], S.br[1], I.tl[0], I.tl[1], I.br[0], I.br[1], S.pixelRatio, I.pixelRatio) - } - upload(t) { - this.zoomInPaintVertexArray && this.zoomInPaintVertexArray.arrayBuffer && this.zoomOutPaintVertexArray && this.zoomOutPaintVertexArray.arrayBuffer && (this.zoomInPaintVertexBuffer = t.createVertexBuffer(this.zoomInPaintVertexArray, Qi.members, this.expression.isStateDependent), this.zoomOutPaintVertexBuffer = t.createVertexBuffer(this.zoomOutPaintVertexArray, Qi.members, this.expression.isStateDependent)) - } - destroy() { - this.zoomOutPaintVertexBuffer && this.zoomOutPaintVertexBuffer.destroy(), this.zoomInPaintVertexBuffer && this.zoomInPaintVertexBuffer.destroy() - } - } - class id { - constructor(t, r, a) { - this.binders = {}, this._buffers = []; - const c = []; - for (const p in t.paint._values) { - if (!a(p)) continue; - const f = t.paint.get(p); - if (!(f instanceof Na && rs(f.property.specification))) continue; - const g = nd(p, t.type), - v = f.value, - S = f.property.specification.type, - I = f.property.useIntegerZoom, - E = f.property.specification["property-type"], - R = E === "cross-faded" || E === "cross-faded-data-driven"; - if (v.kind === "constant") this.binders[p] = R ? new Qs(v.value, g) : new Ro(v.value, g, S), c.push(`/u_${p}`); - else if (v.kind === "source" || R) { - const N = tu(p, S, "source"); - this.binders[p] = R ? new ls(v, S, I, r, N, t.id) : new Ha(v, g, S, N), c.push(`/a_${p}`) - } else { - const N = tu(p, S, "composite"); - this.binders[p] = new Ia(v, g, S, I, r, N), c.push(`/z_${p}`) - } - } - this.cacheKey = c.sort().join("") - } - getMaxValue(t) { - const r = this.binders[t]; - return r instanceof Ha || r instanceof Ia ? r.maxValue : 0 - } - populatePaintArrays(t, r, a, c, p) { - for (const f in this.binders) { - const g = this.binders[f]; - (g instanceof Ha || g instanceof Ia || g instanceof ls) && g.populatePaintArray(t, r, a, c, p) - } - } - setConstantPatternPositions(t, r) { - for (const a in this.binders) { - const c = this.binders[a]; - c instanceof Qs && c.setConstantPatternPositions(t, r) - } - } - updatePaintArrays(t, r, a, c, p) { - let f = !1; - for (const g in t) { - const v = r.getPositions(g); - for (const S of v) { - const I = a.feature(S.index); - for (const E in this.binders) { - const R = this.binders[E]; - if ((R instanceof Ha || R instanceof Ia || R instanceof ls) && R.expression.isStateDependent === !0) { - const N = c.paint.get(E); - R.expression = N.value, R.updatePaintArray(S.start, S.end, I, t[g], p), f = !0 - } - } - } - } - return f - } - defines() { - const t = []; - for (const r in this.binders) { - const a = this.binders[r]; - (a instanceof Ro || a instanceof Qs) && t.push(...a.uniformNames.map((c => `#define HAS_UNIFORM_${c}`))) - } - return t - } - getBinderAttributes() { - const t = []; - for (const r in this.binders) { - const a = this.binders[r]; - if (a instanceof Ha || a instanceof Ia) - for (let c = 0; c < a.paintVertexAttributes.length; c++) t.push(a.paintVertexAttributes[c].name); - else if (a instanceof ls) - for (let c = 0; c < Qi.members.length; c++) t.push(Qi.members[c].name) - } - return t - } - getBinderUniforms() { - const t = []; - for (const r in this.binders) { - const a = this.binders[r]; - if (a instanceof Ro || a instanceof Qs || a instanceof Ia) - for (const c of a.uniformNames) t.push(c) - } - return t - } - getPaintVertexBuffers() { - return this._buffers - } - getUniforms(t, r) { - const a = []; - for (const c in this.binders) { - const p = this.binders[c]; - if (p instanceof Ro || p instanceof Qs || p instanceof Ia) { - for (const f of p.uniformNames) - if (r[f]) { - const g = p.getBinding(t, r[f], f); - a.push({ - name: f, - property: c, - binding: g - }) - } - } - } - return a - } - setUniforms(t, r, a, c) { - for (const { - name: p, - property: f, - binding: g - } - of r) this.binders[f].setUniform(g, c, a.get(f), p) - } - updatePaintBuffers(t) { - this._buffers = []; - for (const r in this.binders) { - const a = this.binders[r]; - if (t && a instanceof ls) { - const c = t.fromScale === 2 ? a.zoomInPaintVertexBuffer : a.zoomOutPaintVertexBuffer; - c && this._buffers.push(c) - } else(a instanceof Ha || a instanceof Ia) && a.paintVertexBuffer && this._buffers.push(a.paintVertexBuffer) - } - } - upload(t) { - for (const r in this.binders) { - const a = this.binders[r]; - (a instanceof Ha || a instanceof Ia || a instanceof ls) && a.upload(t) - } - this.updatePaintBuffers() - } - destroy() { - for (const t in this.binders) { - const r = this.binders[t]; - (r instanceof Ha || r instanceof Ia || r instanceof ls) && r.destroy() - } - } - } - class ia { - constructor(t, r, a = () => !0) { - this.programConfigurations = {}; - for (const c of t) this.programConfigurations[c.id] = new id(c, r, a); - this.needsUpload = !1, this._featureMap = new Is, this._bufferOffset = 0 - } - populatePaintArrays(t, r, a, c, p, f) { - for (const g in this.programConfigurations) this.programConfigurations[g].populatePaintArrays(t, r, c, p, f); - r.id !== void 0 && this._featureMap.add(r.id, a, this._bufferOffset, t), this._bufferOffset = t, this.needsUpload = !0 - } - updatePaintArrays(t, r, a, c) { - for (const p of a) this.needsUpload = this.programConfigurations[p.id].updatePaintArrays(t, this._featureMap, r, p, c) || this.needsUpload - } - get(t) { - return this.programConfigurations[t] - } - upload(t) { - if (this.needsUpload) { - for (const r in this.programConfigurations) this.programConfigurations[r].upload(t); - this.needsUpload = !1 - } - } - destroy() { - for (const t in this.programConfigurations) this.programConfigurations[t].destroy() - } - } - - function nd(i, 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": ["gapwidth"], - "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"] - } [i] || [i.replace(`${t}-`, "").replace(/-/g, "_")] - } - - function tu(i, t, r) { - const a = { - color: { - source: Do, - composite: M - }, - number: { - source: d, - composite: Do - } - }, - c = (function(p) { - return { - "line-pattern": { - source: Rt, - composite: Rt - }, - "fill-pattern": { - source: Rt, - composite: Rt - }, - "fill-extrusion-pattern": { - source: Rt, - composite: Rt - } - } [p] - })(i); - return c && c[r] || a[t][r] - } - Kt("ConstantBinder", Ro), Kt("CrossFadedConstantBinder", Qs), Kt("SourceExpressionBinder", Ha), Kt("CrossFadedCompositeBinder", ls), Kt("CompositeExpressionBinder", Ia), Kt("ProgramConfiguration", id, { - omit: ["_buffers"] - }), Kt("ProgramConfigurationSet", ia); - const kl = Math.pow(2, 14) - 1, - El = -kl - 1; - - function cs(i) { - const t = ne / i.extent, - r = i.loadGeometry(); - for (let a = 0; a < r.length; a++) { - const c = r[a]; - for (let p = 0; p < c.length; p++) { - const f = c[p], - g = Math.round(f.x * t), - v = Math.round(f.y * t); - f.x = xt(g, El, kl), f.y = xt(v, El, kl), (g < f.x || g > f.x + 1 || v < f.y || v > f.y + 1) && Lt("Geometry exceeds allowed extent, reduce your vector tile buffer size") - } - } - return r - } - - function Wa(i, t) { - return { - type: i.type, - id: i.id, - properties: i.properties, - geometry: t ? cs(i) : [] - } - } - const Cm = -32768; - - function Bv(i, t, r, a, c) { - i.emplaceBack(Cm + 8 * t + a, Cm + 8 * r + c) - } - class wp { - constructor(t) { - this.zoom = t.zoom, this.globalState = t.globalState, this.overscaling = t.overscaling, this.layers = t.layers, this.layerIds = this.layers.map((r => r.id)), this.index = t.index, this.hasPattern = !1, this.layoutVertexArray = new De, this.indexArray = new ki, this.segments = new Wr, this.programConfigurations = new ia(t.layers, t.zoom), this.stateDependentLayerIds = this.layers.filter((r => r.isStateDependent())).map((r => r.id)) - } - populate(t, r, a) { - const c = this.layers[0], - p = []; - let f = null, - g = !1, - v = c.type === "heatmap"; - if (c.type === "circle") { - const I = c; - f = I.layout.get("circle-sort-key"), g = !f.isConstant(), v = v || I.paint.get("circle-pitch-alignment") === "map" - } - const S = v ? r.subdivisionGranularity.circle : 1; - for (const { - feature: I, - id: E, - index: R, - sourceLayerIndex: N - } - of t) { - const j = this.layers[0]._featureFilter.needGeometry, - Z = Wa(I, j); - if (!this.layers[0]._featureFilter.filter(new Oi(this.zoom, { - globalState: this.globalState - }), Z, a)) continue; - const Y = g ? f.evaluate(Z, {}, a) : void 0, - ae = { - id: E, - properties: I.properties, - type: I.type, - sourceLayerIndex: N, - index: R, - geometry: j ? Z.geometry : cs(I), - patterns: {}, - sortKey: Y - }; - p.push(ae) - } - g && p.sort(((I, E) => I.sortKey - E.sortKey)); - for (const I of p) { - const { - geometry: E, - index: R, - sourceLayerIndex: N - } = I, j = t[R].feature; - this.addFeature(I, E, R, a, S), r.featureIndex.insert(j, E, R, N, this.index) - } - } - update(t, r, a) { - this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(t, r, this.stateDependentLayers, a) - } - isEmpty() { - return this.layoutVertexArray.length === 0 - } - uploadPending() { - return !this.uploaded || this.programConfigurations.needsUpload - } - upload(t) { - this.uploaded || (this.layoutVertexBuffer = t.createVertexBuffer(this.layoutVertexArray, Ui), 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, r, a, c, p = 1) { - let f; - switch (p) { - case 1: - f = [0, 7]; - break; - case 3: - f = [0, 2, 5, 7]; - break; - case 5: - f = [0, 1, 3, 4, 6, 7]; - break; - case 7: - f = [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 g = f.length; - for (const v of r) - for (const S of v) { - const I = S.x, - E = S.y; - if (I < 0 || I >= ne || E < 0 || E >= ne) continue; - const R = this.segments.prepareSegment(g * g, this.layoutVertexArray, this.indexArray, t.sortKey), - N = R.vertexLength; - for (let j = 0; j < g; j++) - for (let Z = 0; Z < g; Z++) Bv(this.layoutVertexArray, I, E, f[Z], f[j]); - for (let j = 0; j < g - 1; j++) - for (let Z = 0; Z < g - 1; Z++) { - const Y = N + j * g + Z, - ae = N + (j + 1) * g + Z; - this.indexArray.emplaceBack(Y, ae + 1, Y + 1), this.indexArray.emplaceBack(Y, ae, ae + 1) - } - R.vertexLength += g * g, R.primitiveLength += (g - 1) * (g - 1) * 2 - } - this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, t, a, {}, c) - } - } - - function Sm(i, t) { - for (let r = 0; r < i.length; r++) - if (zl(t, i[r])) return !0; - for (let r = 0; r < t.length; r++) - if (zl(i, t[r])) return !0; - return !!Tp(i, t) - } - - function Fv(i, t, r) { - return !!zl(i, t) || !!Cp(t, i, r) - } - - function Pm(i, t) { - if (i.length === 1) return Mm(t, i[0]); - for (let r = 0; r < t.length; r++) { - const a = t[r]; - for (let c = 0; c < a.length; c++) - if (zl(i, a[c])) return !0 - } - for (let r = 0; r < i.length; r++) - if (Mm(t, i[r])) return !0; - for (let r = 0; r < t.length; r++) - if (Tp(i, t[r])) return !0; - return !1 - } - - function Ov(i, t, r) { - if (i.length > 1) { - if (Tp(i, t)) return !0; - for (let a = 0; a < t.length; a++) - if (Cp(t[a], i, r)) return !0 - } - for (let a = 0; a < i.length; a++) - if (Cp(i[a], t, r)) return !0; - return !1 - } - - function Tp(i, t) { - if (i.length === 0 || t.length === 0) return !1; - for (let r = 0; r < i.length - 1; r++) { - const a = i[r], - c = i[r + 1]; - for (let p = 0; p < t.length - 1; p++) - if (Nv(a, c, t[p], t[p + 1])) return !0 - } - return !1 - } - - function Nv(i, t, r, a) { - return Xt(i, r, a) !== Xt(t, r, a) && Xt(i, t, r) !== Xt(i, t, a) - } - - function Cp(i, t, r) { - const a = r * r; - if (t.length === 1) return i.distSqr(t[0]) < a; - for (let c = 1; c < t.length; c++) - if (Im(i, t[c - 1], t[c]) < a) return !0; - return !1 - } - - function Im(i, t, r) { - const a = t.distSqr(r); - if (a === 0) return i.distSqr(t); - const c = ((i.x - t.x) * (r.x - t.x) + (i.y - t.y) * (r.y - t.y)) / a; - return i.distSqr(c < 0 ? t : c > 1 ? r : r.sub(t)._mult(c)._add(t)) - } - - function Mm(i, t) { - let r, a, c, p = !1; - for (let f = 0; f < i.length; f++) { - r = i[f]; - for (let g = 0, v = r.length - 1; g < r.length; v = g++) a = r[g], c = r[v], a.y > t.y != c.y > t.y && t.x < (c.x - a.x) * (t.y - a.y) / (c.y - a.y) + a.x && (p = !p) - } - return p - } - - function zl(i, t) { - let r = !1; - for (let a = 0, c = i.length - 1; a < i.length; c = a++) { - const p = i[a], - f = i[c]; - p.y > t.y != f.y > t.y && t.x < (f.x - p.x) * (t.y - p.y) / (f.y - p.y) + p.x && (r = !r) - } - return r - } - - function jv(i, t, r) { - const a = r[0], - c = r[2]; - if (i.x < a.x && t.x < a.x || i.x > c.x && t.x > c.x || i.y < a.y && t.y < a.y || i.y > c.y && t.y > c.y) return !1; - const p = Xt(i, t, r[0]); - return p !== Xt(i, t, r[1]) || p !== Xt(i, t, r[2]) || p !== Xt(i, t, r[3]) - } - - function ru(i, t, r) { - const a = t.paint.get(i).value; - return a.kind === "constant" ? a.value : r.programConfigurations.get(t.id).getMaxValue(i) - } - - function ad(i) { - return Math.sqrt(i[0] * i[0] + i[1] * i[1]) - } - - function sd(i, t, r, a, c) { - if (!t[0] && !t[1]) return i; - const p = $.convert(t)._mult(c); - r === "viewport" && p._rotate(-a); - const f = []; - for (let g = 0; g < i.length; g++) f.push(i[g].sub(p)); - return f - } - let Am, km; - Kt("CircleBucket", wp, { - omit: ["layers"] - }); - var qv = { - get paint() { - return km = km || new jn({ - "circle-radius": new Rr(xe.paint_circle["circle-radius"]), - "circle-color": new Rr(xe.paint_circle["circle-color"]), - "circle-blur": new Rr(xe.paint_circle["circle-blur"]), - "circle-opacity": new Rr(xe.paint_circle["circle-opacity"]), - "circle-translate": new hr(xe.paint_circle["circle-translate"]), - "circle-translate-anchor": new hr(xe.paint_circle["circle-translate-anchor"]), - "circle-pitch-scale": new hr(xe.paint_circle["circle-pitch-scale"]), - "circle-pitch-alignment": new hr(xe.paint_circle["circle-pitch-alignment"]), - "circle-stroke-width": new Rr(xe.paint_circle["circle-stroke-width"]), - "circle-stroke-color": new Rr(xe.paint_circle["circle-stroke-color"]), - "circle-stroke-opacity": new Rr(xe.paint_circle["circle-stroke-opacity"]) - }) - }, - get layout() { - return Am = Am || new jn({ - "circle-sort-key": new Rr(xe.layout_circle["circle-sort-key"]) - }) - } - }; - class Vv extends ha { - constructor(t) { - super(t, qv) - } - createBucket(t) { - return new wp(t) - } - queryRadius(t) { - const r = t; - return ru("circle-radius", this, r) + ru("circle-stroke-width", this, r) + ad(this.paint.get("circle-translate")) - } - queryIntersectsFeature({ - queryGeometry: t, - feature: r, - featureState: a, - geometry: c, - transform: p, - pixelsToTileUnits: f, - unwrappedTileID: g, - getElevation: v - }) { - const S = sd(t, this.paint.get("circle-translate"), this.paint.get("circle-translate-anchor"), -p.bearingInRadians, f), - I = this.paint.get("circle-radius").evaluate(r, a) + this.paint.get("circle-stroke-width").evaluate(r, a), - E = this.paint.get("circle-pitch-alignment") === "map", - R = E ? S : (function(j, Z, Y, ae) { - return j.map((ze => Em(ze, Z, Y, ae))) - })(S, p, g, v), - N = E ? I * f : I; - for (const j of c) - for (const Z of j) { - const Y = E ? Z : Em(Z, p, g, v); - let ae = N; - const ze = p.projectTileCoordinates(Z.x, Z.y, g, v).signedDistanceFromCamera; - if (this.paint.get("circle-pitch-scale") === "viewport" && this.paint.get("circle-pitch-alignment") === "map" ? ae *= ze / p.cameraToCenterDistance : this.paint.get("circle-pitch-scale") === "map" && this.paint.get("circle-pitch-alignment") === "viewport" && (ae *= p.cameraToCenterDistance / ze), Fv(R, Y, ae)) return !0 - } - return !1 - } - } - - function Em(i, t, r, a) { - const c = t.projectTileCoordinates(i.x, i.y, r, a).point; - return new $((.5 * c.x + .5) * t.width, (.5 * -c.y + .5) * t.height) - } - class zm extends wp {} - let Lm; - Kt("HeatmapBucket", zm, { - omit: ["layers"] - }); - var Uv = { - get paint() { - return Lm = Lm || new jn({ - "heatmap-radius": new Rr(xe.paint_heatmap["heatmap-radius"]), - "heatmap-weight": new Rr(xe.paint_heatmap["heatmap-weight"]), - "heatmap-intensity": new hr(xe.paint_heatmap["heatmap-intensity"]), - "heatmap-color": new Pl(xe.paint_heatmap["heatmap-color"]), - "heatmap-opacity": new hr(xe.paint_heatmap["heatmap-opacity"]) - }) - } - }; - - function Sp(i, { - width: t, - height: r - }, a, c) { - if (c) { - if (c instanceof Uint8ClampedArray) c = new Uint8Array(c.buffer); - else if (c.length !== t * r * a) throw new RangeError(`mismatched image size. expected: ${c.length} but got: ${t*r*a}`) - } else c = new Uint8Array(t * r * a); - return i.width = t, i.height = r, i.data = c, i - } - - function Dm(i, { - width: t, - height: r - }, a) { - if (t === i.width && r === i.height) return; - const c = Sp({}, { - width: t, - height: r - }, a); - Pp(i, c, { - x: 0, - y: 0 - }, { - x: 0, - y: 0 - }, { - width: Math.min(i.width, t), - height: Math.min(i.height, r) - }, a), i.width = t, i.height = r, i.data = c.data - } - - function Pp(i, t, r, a, c, p) { - if (c.width === 0 || c.height === 0) return t; - if (c.width > i.width || c.height > i.height || r.x > i.width - c.width || r.y > i.height - c.height) throw new RangeError("out of range source coordinates for image copy"); - if (c.width > t.width || c.height > t.height || a.x > t.width - c.width || a.y > t.height - c.height) throw new RangeError("out of range destination coordinates for image copy"); - const f = i.data, - g = t.data; - if (f === g) throw new Error("srcData equals dstData, so image is already copied"); - for (let v = 0; v < c.height; v++) { - const S = ((r.y + v) * i.width + r.x) * p, - I = ((a.y + v) * t.width + a.x) * p; - for (let E = 0; E < c.width * p; E++) g[I + E] = f[S + E] - } - return t - } - class iu { - constructor(t, r) { - Sp(this, t, 1, r) - } - resize(t) { - Dm(this, t, 1) - } - clone() { - return new iu({ - width: this.width, - height: this.height - }, new Uint8Array(this.data)) - } - static copy(t, r, a, c, p) { - Pp(t, r, a, c, p, 1) - } - } - class na { - constructor(t, r) { - Sp(this, t, 4, r) - } - resize(t) { - Dm(this, t, 4) - } - replace(t, r) { - r ? this.data.set(t) : this.data = t instanceof Uint8ClampedArray ? new Uint8Array(t.buffer) : t - } - clone() { - return new na({ - width: this.width, - height: this.height - }, new Uint8Array(this.data)) - } - static copy(t, r, a, c, p) { - Pp(t, r, a, c, p, 4) - } - setPixel(t, r, a) { - const c = 4 * (t * this.width + r); - this.data[c + 0] = Math.round(255 * a.r / a.a), this.data[c + 1] = Math.round(255 * a.g / a.a), this.data[c + 2] = Math.round(255 * a.b / a.a), this.data[c + 3] = Math.round(255 * a.a) - } - } - - function Rm(i) { - const t = {}, - r = i.resolution || 256, - a = i.clips ? i.clips.length : 1, - c = i.image || new na({ - width: r, - height: a - }); - if (Math.log(r) / Math.LN2 % 1 != 0) throw new Error(`width is not a power of 2 - ${r}`); - const p = (f, g, v) => { - t[i.evaluationKey] = v; - const S = i.expression.evaluate(t); - c.setPixel(f / 4 / r, g / 4, S) - }; - if (i.clips) - for (let f = 0, g = 0; f < a; ++f, g += 4 * r) - for (let v = 0, S = 0; v < r; v++, S += 4) { - const I = v / (r - 1), - { - start: E, - end: R - } = i.clips[f]; - p(g, S, E * (1 - I) + R * I) - } else - for (let f = 0, g = 0; f < r; f++, g += 4) p(0, g, f / (r - 1)); - return c - } - Kt("AlphaImage", iu), Kt("RGBAImage", na); - const Ip = "big-fb"; - class Zv extends ha { - createBucket(t) { - return new zm(t) - } - constructor(t) { - super(t, Uv), this.heatmapFbos = new Map, this._updateColorRamp() - } - _handleSpecialPaintPropertyUpdate(t) { - t === "heatmap-color" && this._updateColorRamp() - } - _updateColorRamp() { - this.colorRamp = Rm({ - expression: this._transitionablePaint._values["heatmap-color"].value.expression, - evaluationKey: "heatmapDensity", - image: this.colorRamp - }), this.colorRampTexture = null - } - resize() { - this.heatmapFbos.has(Ip) && this.heatmapFbos.delete(Ip) - } - queryRadius() { - return 0 - } - queryIntersectsFeature() { - return !1 - } - hasOffscreenPass() { - return this.paint.get("heatmap-opacity") !== 0 && this.visibility !== "none" - } - } - let Bm; - var $v = { - get paint() { - return Bm = Bm || new jn({ - "hillshade-illumination-direction": new hr(xe.paint_hillshade["hillshade-illumination-direction"]), - "hillshade-illumination-altitude": new hr(xe.paint_hillshade["hillshade-illumination-altitude"]), - "hillshade-illumination-anchor": new hr(xe.paint_hillshade["hillshade-illumination-anchor"]), - "hillshade-exaggeration": new hr(xe.paint_hillshade["hillshade-exaggeration"]), - "hillshade-shadow-color": new hr(xe.paint_hillshade["hillshade-shadow-color"]), - "hillshade-highlight-color": new hr(xe.paint_hillshade["hillshade-highlight-color"]), - "hillshade-accent-color": new hr(xe.paint_hillshade["hillshade-accent-color"]), - "hillshade-method": new hr(xe.paint_hillshade["hillshade-method"]) - }) - } - }; - class Gv extends ha { - constructor(t) { - super(t, $v), this.recalculate({ - zoom: 0, - zoomHistory: {} - }, void 0) - } - getIlluminationProperties() { - let t = this.paint.get("hillshade-illumination-direction").values, - r = this.paint.get("hillshade-illumination-altitude").values, - a = this.paint.get("hillshade-highlight-color").values, - c = this.paint.get("hillshade-shadow-color").values; - const p = Math.max(t.length, r.length, a.length, c.length); - t = t.concat(Array(p - t.length).fill(t.at(-1))), r = r.concat(Array(p - r.length).fill(r.at(-1))), a = a.concat(Array(p - a.length).fill(a.at(-1))), c = c.concat(Array(p - c.length).fill(c.at(-1))); - const f = r.map(ur); - return { - directionRadians: t.map(ur), - altitudeRadians: f, - shadowColor: c, - highlightColor: a - } - } - hasOffscreenPass() { - return this.paint.get("hillshade-exaggeration") !== 0 && this.visibility !== "none" - } - } - let Fm; - var Hv = { - get paint() { - return Fm = Fm || new jn({ - "color-relief-opacity": new hr(xe["paint_color-relief"]["color-relief-opacity"]), - "color-relief-color": new Pl(xe["paint_color-relief"]["color-relief-color"]) - }) - } - }; - class Mp { - constructor(t, r, a, c) { - this.context = t, this.format = a, this.texture = t.gl.createTexture(), this.update(r, c) - } - update(t, r, a) { - const { - width: c, - height: p - } = t, f = !(this.size && this.size[0] === c && this.size[1] === p || a), { - context: g - } = this, { - gl: v - } = g; - if (this.useMipmap = !!(r && r.useMipmap), v.bindTexture(v.TEXTURE_2D, this.texture), g.pixelStoreUnpackFlipY.set(!1), g.pixelStoreUnpack.set(1), g.pixelStoreUnpackPremultiplyAlpha.set(this.format === v.RGBA && (!r || r.premultiply !== !1)), f) this.size = [c, p], t instanceof HTMLImageElement || t instanceof HTMLCanvasElement || t instanceof HTMLVideoElement || t instanceof ImageData || ar(t) ? v.texImage2D(v.TEXTURE_2D, 0, this.format, this.format, v.UNSIGNED_BYTE, t) : v.texImage2D(v.TEXTURE_2D, 0, this.format, c, p, 0, this.format, v.UNSIGNED_BYTE, t.data); - else { - const { - x: S, - y: I - } = a || { - x: 0, - y: 0 - }; - t instanceof HTMLImageElement || t instanceof HTMLCanvasElement || t instanceof HTMLVideoElement || t instanceof ImageData || ar(t) ? v.texSubImage2D(v.TEXTURE_2D, 0, S, I, v.RGBA, v.UNSIGNED_BYTE, t) : v.texSubImage2D(v.TEXTURE_2D, 0, S, I, c, p, v.RGBA, v.UNSIGNED_BYTE, t.data) - } - this.useMipmap && this.isSizePowerOfTwo() && v.generateMipmap(v.TEXTURE_2D), g.pixelStoreUnpackFlipY.setDefault(), g.pixelStoreUnpack.setDefault(), g.pixelStoreUnpackPremultiplyAlpha.setDefault() - } - bind(t, r, a) { - const { - context: c - } = this, { - gl: p - } = c; - p.bindTexture(p.TEXTURE_2D, this.texture), a !== p.LINEAR_MIPMAP_NEAREST || this.isSizePowerOfTwo() || (a = p.LINEAR), t !== this.filter && (p.texParameteri(p.TEXTURE_2D, p.TEXTURE_MAG_FILTER, t), p.texParameteri(p.TEXTURE_2D, p.TEXTURE_MIN_FILTER, a || t), this.filter = t), r !== this.wrap && (p.texParameteri(p.TEXTURE_2D, p.TEXTURE_WRAP_S, r), p.texParameteri(p.TEXTURE_2D, p.TEXTURE_WRAP_T, r), this.wrap = r) - } - 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 - } - } - class Om { - constructor(t, r, a, c = 1, p = 1, f = 1, g = 0) { - if (this.uid = t, r.height !== r.width) throw new RangeError("DEM tiles must be square"); - if (a && !["mapbox", "terrarium", "custom"].includes(a)) return void Lt(`"${a}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`); - this.stride = r.height; - const v = this.dim = r.height - 2; - switch (this.data = new Uint32Array(r.data.buffer), a) { - case "terrarium": - this.redFactor = 256, this.greenFactor = 1, this.blueFactor = 1 / 256, this.baseShift = 32768; - break; - case "custom": - this.redFactor = c, this.greenFactor = p, this.blueFactor = f, this.baseShift = g; - break; - default: - this.redFactor = 6553.6, this.greenFactor = 25.6, this.blueFactor = .1, this.baseShift = 1e4 - } - for (let S = 0; S < v; S++) this.data[this._idx(-1, S)] = this.data[this._idx(0, S)], this.data[this._idx(v, S)] = this.data[this._idx(v - 1, S)], this.data[this._idx(S, -1)] = this.data[this._idx(S, 0)], this.data[this._idx(S, v)] = this.data[this._idx(S, v - 1)]; - this.data[this._idx(-1, -1)] = this.data[this._idx(0, 0)], this.data[this._idx(v, -1)] = this.data[this._idx(v - 1, 0)], this.data[this._idx(-1, v)] = this.data[this._idx(0, v - 1)], this.data[this._idx(v, v)] = this.data[this._idx(v - 1, v - 1)], this.min = Number.MAX_SAFE_INTEGER, this.max = Number.MIN_SAFE_INTEGER; - for (let S = 0; S < v; S++) - for (let I = 0; I < v; I++) { - const E = this.get(S, I); - E > this.max && (this.max = E), E < this.min && (this.min = E) - } - } - get(t, r) { - const a = new Uint8Array(this.data.buffer), - c = 4 * this._idx(t, r); - return this.unpack(a[c], a[c + 1], a[c + 2]) - } - getUnpackVector() { - return [this.redFactor, this.greenFactor, this.blueFactor, this.baseShift] - } - _idx(t, r) { - if (t < -1 || t >= this.dim + 1 || r < -1 || r >= this.dim + 1) throw new RangeError("out of range source coordinates for DEM data"); - return (r + 1) * this.stride + (t + 1) - } - unpack(t, r, a) { - return t * this.redFactor + r * this.greenFactor + a * this.blueFactor - this.baseShift - } - pack(t) { - return Nm(t, this.getUnpackVector()) - } - getPixels() { - return new na({ - width: this.stride, - height: this.stride - }, new Uint8Array(this.data.buffer)) - } - backfillBorder(t, r, a) { - if (this.dim !== t.dim) throw new Error("dem dimension mismatch"); - let c = r * this.dim, - p = r * this.dim + this.dim, - f = a * this.dim, - g = a * this.dim + this.dim; - switch (r) { - case -1: - c = p - 1; - break; - case 1: - p = c + 1 - } - switch (a) { - case -1: - f = g - 1; - break; - case 1: - g = f + 1 - } - const v = -r * this.dim, - S = -a * this.dim; - for (let I = f; I < g; I++) - for (let E = c; E < p; E++) this.data[this._idx(E, I)] = t.data[this._idx(E + v, I + S)] - } - } - - function Nm(i, t) { - const r = t[0], - a = t[1], - c = t[2], - p = t[3], - f = Math.min(r, a, c), - g = Math.round((i + p) / f); - return { - r: Math.floor(g * f / r) % 256, - g: Math.floor(g * f / a) % 256, - b: Math.floor(g * f / c) % 256 - } - } - Kt("DEMData", Om); - class Wv extends ha { - constructor(t) { - super(t, Hv) - } - _createColorRamp(t) { - const r = { - elevationStops: [], - colorStops: [] - }, - a = this._transitionablePaint._values["color-relief-color"].value.expression; - if (a instanceof So && a._styleExpression.expression instanceof In) { - this.colorRampExpression = a; - const f = a._styleExpression.expression; - r.elevationStops = f.labels, r.colorStops = []; - for (const g of r.elevationStops) r.colorStops.push(f.evaluate({ - globals: { - elevation: g - } - })) - } - if (r.elevationStops.length < 1 && (r.elevationStops = [0], r.colorStops = [yr.transparent]), r.elevationStops.length < 2 && (r.elevationStops.push(r.elevationStops[0] + 1), r.colorStops.push(r.colorStops[0])), r.elevationStops.length <= t) return r; - const c = { - elevationStops: [], - colorStops: [] - }, - p = (r.elevationStops.length - 1) / (t - 1); - for (let f = 0; f < r.elevationStops.length - .5; f += p) c.elevationStops.push(r.elevationStops[Math.round(f)]), c.colorStops.push(r.colorStops[Math.round(f)]); - return Lt(`Too many colors in specification of ${this.id} color-relief layer, may not render properly.`), c - } - _colorRampChanged() { - return this.colorRampExpression != this._transitionablePaint._values["color-relief-color"].value.expression - } - getColorRampTextures(t, r, a) { - if (this.colorRampTextures && !this._colorRampChanged()) return this.colorRampTextures; - const c = this._createColorRamp(r), - p = new na({ - width: c.colorStops.length, - height: 1 - }), - f = new na({ - width: c.colorStops.length, - height: 1 - }); - for (let g = 0; g < c.elevationStops.length; g++) { - const v = Nm(c.elevationStops[g], a); - f.setPixel(0, g, new yr(v.r / 255, v.g / 255, v.b / 255, 1)), p.setPixel(0, g, c.colorStops[g]) - } - return this.colorRampTextures = { - elevationTexture: new Mp(t, f, t.gl.RGBA), - colorTexture: new Mp(t, p, t.gl.RGBA) - }, this.colorRampTextures - } - hasOffscreenPass() { - return this.visibility !== "none" && !!this.colorRampTextures - } - } - const Xv = Hi([{ - name: "a_pos", - components: 2, - type: "Int16" - }], 4), - { - members: Kv - } = Xv; - - function Ap(i, t, r) { - const a = r.patternDependencies; - let c = !1; - for (const p of t) { - const f = p.paint.get(`${i}-pattern`); - f.isConstant() || (c = !0); - const g = f.constantOr(null); - g && (c = !0, a[g.to] = !0, a[g.from] = !0) - } - return c - } - - function kp(i, t, r, a, c) { - const p = c.patternDependencies; - for (const f of t) { - const g = f.paint.get(`${i}-pattern`).value; - if (g.kind !== "constant") { - let v = g.evaluate({ - zoom: a - 1 - }, r, {}, c.availableImages), - S = g.evaluate({ - zoom: a - }, r, {}, c.availableImages), - I = g.evaluate({ - zoom: a + 1 - }, r, {}, c.availableImages); - v = v && v.name ? v.name : v, S = S && S.name ? S.name : S, I = I && I.name ? I.name : I, p[v] = !0, p[S] = !0, p[I] = !0, r.patterns[f.id] = { - min: v, - mid: S, - max: I - } - } - } - return r - } - - function jm(i, t, r, a, c) { - let p; - if (c === (function(f, g, v, S) { - let I = 0; - for (let E = g, R = v - S; E < v; E += S) I += (f[R] - f[E]) * (f[E + 1] + f[R + 1]), R = E; - return I - })(i, t, r, a) > 0) - for (let f = t; f < r; f += a) p = Zm(f / a | 0, i[f], i[f + 1], p); - else - for (let f = r - a; f >= t; f -= a) p = Zm(f / a | 0, i[f], i[f + 1], p); - return p && Ll(p, p.next) && (ou(p), p = p.next), p - } - - function Bo(i, t) { - if (!i) return i; - t || (t = i); - let r, a = i; - do - if (r = !1, a.steiner || !Ll(a, a.next) && Yi(a.prev, a, a.next) !== 0) a = a.next; - else { - if (ou(a), a = t = a.prev, a === a.next) break; - r = !0 - } while (r || a !== t); - return t - } - - function nu(i, t, r, a, c, p, f) { - if (!i) return; - !f && p && (function(v, S, I, E) { - let R = v; - do R.z === 0 && (R.z = Ep(R.x, R.y, S, I, E)), R.prevZ = R.prev, R.nextZ = R.next, R = R.next; while (R !== v); - R.prevZ.nextZ = null, R.prevZ = null, (function(N) { - let j, Z = 1; - do { - let Y, ae = N; - N = null; - let ze = null; - for (j = 0; ae;) { - j++; - let me = ae, - be = 0; - for (let rt = 0; rt < Z && (be++, me = me.nextZ, me); rt++); - let Ve = Z; - for (; be > 0 || Ve > 0 && me;) be !== 0 && (Ve === 0 || !me || ae.z <= me.z) ? (Y = ae, ae = ae.nextZ, be--) : (Y = me, me = me.nextZ, Ve--), ze ? ze.nextZ = Y : N = Y, Y.prevZ = ze, ze = Y; - ae = me - } - ze.nextZ = null, Z *= 2 - } while (j > 1) - })(R) - })(i, a, c, p); - let g = i; - for (; i.prev !== i.next;) { - const v = i.prev, - S = i.next; - if (p ? Jv(i, a, c, p) : Yv(i)) t.push(v.i, i.i, S.i), ou(i), i = S.next, g = S.next; - else if ((i = S) === g) { - f ? f === 1 ? nu(i = Qv(Bo(i), t), t, r, a, c, p, 2) : f === 2 && e0(i, t, r, a, c, p) : nu(Bo(i), t, r, a, c, p, 1); - break - } - } - } - - function Yv(i) { - const t = i.prev, - r = i, - a = i.next; - if (Yi(t, r, a) >= 0) return !1; - const c = t.x, - p = r.x, - f = a.x, - g = t.y, - v = r.y, - S = a.y, - I = Math.min(c, p, f), - E = Math.min(g, v, S), - R = Math.max(c, p, f), - N = Math.max(g, v, S); - let j = a.next; - for (; j !== t;) { - if (j.x >= I && j.x <= R && j.y >= E && j.y <= N && au(c, g, p, v, f, S, j.x, j.y) && Yi(j.prev, j, j.next) >= 0) return !1; - j = j.next - } - return !0 - } - - function Jv(i, t, r, a) { - const c = i.prev, - p = i, - f = i.next; - if (Yi(c, p, f) >= 0) return !1; - const g = c.x, - v = p.x, - S = f.x, - I = c.y, - E = p.y, - R = f.y, - N = Math.min(g, v, S), - j = Math.min(I, E, R), - Z = Math.max(g, v, S), - Y = Math.max(I, E, R), - ae = Ep(N, j, t, r, a), - ze = Ep(Z, Y, t, r, a); - let me = i.prevZ, - be = i.nextZ; - for (; me && me.z >= ae && be && be.z <= ze;) { - if (me.x >= N && me.x <= Z && me.y >= j && me.y <= Y && me !== c && me !== f && au(g, I, v, E, S, R, me.x, me.y) && Yi(me.prev, me, me.next) >= 0 || (me = me.prevZ, be.x >= N && be.x <= Z && be.y >= j && be.y <= Y && be !== c && be !== f && au(g, I, v, E, S, R, be.x, be.y) && Yi(be.prev, be, be.next) >= 0)) return !1; - be = be.nextZ - } - for (; me && me.z >= ae;) { - if (me.x >= N && me.x <= Z && me.y >= j && me.y <= Y && me !== c && me !== f && au(g, I, v, E, S, R, me.x, me.y) && Yi(me.prev, me, me.next) >= 0) return !1; - me = me.prevZ - } - for (; be && be.z <= ze;) { - if (be.x >= N && be.x <= Z && be.y >= j && be.y <= Y && be !== c && be !== f && au(g, I, v, E, S, R, be.x, be.y) && Yi(be.prev, be, be.next) >= 0) return !1; - be = be.nextZ - } - return !0 - } - - function Qv(i, t) { - let r = i; - do { - const a = r.prev, - c = r.next.next; - !Ll(a, c) && Vm(a, r, r.next, c) && su(a, c) && su(c, a) && (t.push(a.i, r.i, c.i), ou(r), ou(r.next), r = i = c), r = r.next - } while (r !== i); - return Bo(r) - } - - function e0(i, t, r, a, c, p) { - let f = i; - do { - let g = f.next.next; - for (; g !== f.prev;) { - if (f.i !== g.i && a0(f, g)) { - let v = Um(f, g); - return f = Bo(f, f.next), v = Bo(v, v.next), nu(f, t, r, a, c, p, 0), void nu(v, t, r, a, c, p, 0) - } - g = g.next - } - f = f.next - } while (f !== i) - } - - function t0(i, t) { - let r = i.x - t.x; - return r === 0 && (r = i.y - t.y, r === 0) && (r = (i.next.y - i.y) / (i.next.x - i.x) - (t.next.y - t.y) / (t.next.x - t.x)), r - } - - function r0(i, t) { - const r = (function(c, p) { - let f = p; - const g = c.x, - v = c.y; - let S, I = -1 / 0; - if (Ll(c, f)) return f; - do { - if (Ll(c, f.next)) return f.next; - if (v <= f.y && v >= f.next.y && f.next.y !== f.y) { - const Z = f.x + (v - f.y) * (f.next.x - f.x) / (f.next.y - f.y); - if (Z <= g && Z > I && (I = Z, S = f.x < f.next.x ? f : f.next, Z === g)) return S - } - f = f.next - } while (f !== p); - if (!S) return null; - const E = S, - R = S.x, - N = S.y; - let j = 1 / 0; - f = S; - do { - if (g >= f.x && f.x >= R && g !== f.x && qm(v < N ? g : I, v, R, N, v < N ? I : g, v, f.x, f.y)) { - const Z = Math.abs(v - f.y) / (g - f.x); - su(f, c) && (Z < j || Z === j && (f.x > S.x || f.x === S.x && i0(S, f))) && (S = f, j = Z) - } - f = f.next - } while (f !== E); - return S - })(i, t); - if (!r) return t; - const a = Um(r, i); - return Bo(a, a.next), Bo(r, r.next) - } - - function i0(i, t) { - return Yi(i.prev, i, t.prev) < 0 && Yi(t.next, i, i.next) < 0 - } - - function Ep(i, t, r, a, c) { - return (i = 1431655765 & ((i = 858993459 & ((i = 252645135 & ((i = 16711935 & ((i = (i - r) * c | 0) | i << 8)) | i << 4)) | i << 2)) | i << 1)) | (t = 1431655765 & ((t = 858993459 & ((t = 252645135 & ((t = 16711935 & ((t = (t - a) * c | 0) | t << 8)) | t << 4)) | t << 2)) | t << 1)) << 1 - } - - function n0(i) { - let t = i, - r = i; - do(t.x < r.x || t.x === r.x && t.y < r.y) && (r = t), t = t.next; while (t !== i); - return r - } - - function qm(i, t, r, a, c, p, f, g) { - return (c - f) * (t - g) >= (i - f) * (p - g) && (i - f) * (a - g) >= (r - f) * (t - g) && (r - f) * (p - g) >= (c - f) * (a - g) - } - - function au(i, t, r, a, c, p, f, g) { - return !(i === f && t === g) && qm(i, t, r, a, c, p, f, g) - } - - function a0(i, t) { - return i.next.i !== t.i && i.prev.i !== t.i && !(function(r, a) { - let c = r; - do { - if (c.i !== r.i && c.next.i !== r.i && c.i !== a.i && c.next.i !== a.i && Vm(c, c.next, r, a)) return !0; - c = c.next - } while (c !== r); - return !1 - })(i, t) && (su(i, t) && su(t, i) && (function(r, a) { - let c = r, - p = !1; - const f = (r.x + a.x) / 2, - g = (r.y + a.y) / 2; - do c.y > g != c.next.y > g && c.next.y !== c.y && f < (c.next.x - c.x) * (g - c.y) / (c.next.y - c.y) + c.x && (p = !p), c = c.next; while (c !== r); - return p - })(i, t) && (Yi(i.prev, i, t.prev) || Yi(i, t.prev, t)) || Ll(i, t) && Yi(i.prev, i, i.next) > 0 && Yi(t.prev, t, t.next) > 0) - } - - function Yi(i, t, r) { - return (t.y - i.y) * (r.x - t.x) - (t.x - i.x) * (r.y - t.y) - } - - function Ll(i, t) { - return i.x === t.x && i.y === t.y - } - - function Vm(i, t, r, a) { - const c = ld(Yi(i, t, r)), - p = ld(Yi(i, t, a)), - f = ld(Yi(r, a, i)), - g = ld(Yi(r, a, t)); - return c !== p && f !== g || !(c !== 0 || !od(i, r, t)) || !(p !== 0 || !od(i, a, t)) || !(f !== 0 || !od(r, i, a)) || !(g !== 0 || !od(r, t, a)) - } - - function od(i, t, r) { - return t.x <= Math.max(i.x, r.x) && t.x >= Math.min(i.x, r.x) && t.y <= Math.max(i.y, r.y) && t.y >= Math.min(i.y, r.y) - } - - function ld(i) { - return i > 0 ? 1 : i < 0 ? -1 : 0 - } - - function su(i, t) { - return Yi(i.prev, i, i.next) < 0 ? Yi(i, t, i.next) >= 0 && Yi(i, i.prev, t) >= 0 : Yi(i, t, i.prev) < 0 || Yi(i, i.next, t) < 0 - } - - function Um(i, t) { - const r = zp(i.i, i.x, i.y), - a = zp(t.i, t.x, t.y), - c = i.next, - p = t.prev; - return i.next = t, t.prev = i, r.next = c, c.prev = r, a.next = r, r.prev = a, p.next = a, a.prev = p, a - } - - function Zm(i, t, r, a) { - const c = zp(i, t, r); - return a ? (c.next = a.next, c.prev = a, a.next.prev = c, a.next = c) : (c.prev = c, c.next = c), c - } - - function ou(i) { - i.next.prev = i.prev, i.prev.next = i.next, i.prevZ && (i.prevZ.nextZ = i.nextZ), i.nextZ && (i.nextZ.prevZ = i.prevZ) - } - - function zp(i, t, r) { - return { - i, - x: t, - y: r, - prev: null, - next: null, - z: 0, - prevZ: null, - nextZ: null, - steiner: !1 - } - } - class Dl { - constructor(t, r) { - if (r > t) throw new Error("Min granularity must not be greater than base granularity."); - this._baseZoomGranularity = t, this._minGranularity = r - } - getGranularityForZoomLevel(t) { - return Math.max(Math.floor(this._baseZoomGranularity / (1 << t)), this._minGranularity, 1) - } - } - class cd { - constructor(t) { - this.fill = t.fill, this.line = t.line, this.tile = t.tile, this.stencil = t.stencil, this.circle = t.circle - } - } - cd.noSubdivision = new cd({ - fill: new Dl(0, 0), - line: new Dl(0, 0), - tile: new Dl(0, 0), - stencil: new Dl(0, 0), - circle: 1 - }), Kt("SubdivisionGranularityExpression", Dl), Kt("SubdivisionGranularitySetting", cd); - const Rl = -32768, - lu = 32767; - class s0 { - constructor(t, r) { - this._vertexBuffer = [], this._vertexDictionary = new Map, this._used = !1, this._granularity = t, this._granularityCellSize = ne / t, this._canonical = r - } - _getKey(t, r) { - return (t += 32768) << 16 | r + 32768 - } - _vertexToIndex(t, r) { - if (t < -32768 || r < -32768 || t > 32767 || r > 32767) throw new Error("Vertex coordinates are out of signed 16 bit integer range."); - const a = 0 | Math.round(t), - c = 0 | Math.round(r), - p = this._getKey(a, c); - if (this._vertexDictionary.has(p)) return this._vertexDictionary.get(p); - const f = this._vertexBuffer.length / 2; - return this._vertexDictionary.set(p, f), this._vertexBuffer.push(a, c), f - } - _subdivideTrianglesScanline(t) { - if (this._granularity < 2) return (function(c, p) { - const f = []; - for (let g = 0; g < p.length; g += 3) { - const v = p[g], - S = p[g + 1], - I = p[g + 2], - E = c[2 * v], - R = c[2 * v + 1]; - (c[2 * S] - E) * (c[2 * I + 1] - R) - (c[2 * S + 1] - R) * (c[2 * I] - E) > 0 ? (f.push(v), f.push(I), f.push(S)) : (f.push(v), f.push(S), f.push(I)) - } - return f - })(this._vertexBuffer, t); - const r = [], - a = t.length; - for (let c = 0; c < a; c += 3) { - const p = [t[c + 0], t[c + 1], t[c + 2]], - f = [this._vertexBuffer[2 * t[c + 0] + 0], this._vertexBuffer[2 * t[c + 0] + 1], this._vertexBuffer[2 * t[c + 1] + 0], this._vertexBuffer[2 * t[c + 1] + 1], this._vertexBuffer[2 * t[c + 2] + 0], this._vertexBuffer[2 * t[c + 2] + 1]]; - let g = 1 / 0, - v = 1 / 0, - S = -1 / 0, - I = -1 / 0; - for (let Z = 0; Z < 3; Z++) { - const Y = f[2 * Z], - ae = f[2 * Z + 1]; - g = Math.min(g, Y), S = Math.max(S, Y), v = Math.min(v, ae), I = Math.max(I, ae) - } - if (g === S || v === I) continue; - const E = Math.floor(g / this._granularityCellSize), - R = Math.ceil(S / this._granularityCellSize), - N = Math.floor(v / this._granularityCellSize), - j = Math.ceil(I / this._granularityCellSize); - if (E !== R || N !== j) - for (let Z = N; Z < j; Z++) { - const Y = this._scanlineGenerateVertexRingForCellRow(Z, f, p); - o0(this._vertexBuffer, Y, r) - } else r.push(...p) - } - return r - } - _scanlineGenerateVertexRingForCellRow(t, r, a) { - const c = t * this._granularityCellSize, - p = c + this._granularityCellSize, - f = []; - for (let g = 0; g < 3; g++) { - const v = r[2 * g], - S = r[2 * g + 1], - I = r[2 * (g + 1) % 6], - E = r[(2 * (g + 1) + 1) % 6], - R = r[2 * (g + 2) % 6], - N = r[(2 * (g + 2) + 1) % 6], - j = I - v, - Z = E - S, - Y = j === 0, - ae = Z === 0, - ze = (c - S) / Z, - me = (p - S) / Z, - be = Math.min(ze, me), - Ve = Math.max(ze, me); - if (!ae && (be >= 1 || Ve <= 0) || ae && (S < c || S > p)) { - E >= c && E <= p && f.push(a[(g + 1) % 3]); - continue - }!ae && be > 0 && f.push(this._vertexToIndex(v + j * be, S + Z * be)); - const rt = v + j * Math.max(be, 0), - St = v + j * Math.min(Ve, 1); - Y || this._generateIntraEdgeVertices(f, v, S, I, E, rt, St), !ae && Ve < 1 && f.push(this._vertexToIndex(v + j * Ve, S + Z * Ve)), (ae || E >= c && E <= p) && f.push(a[(g + 1) % 3]), !ae && (E <= c || E >= p) && this._generateInterEdgeVertices(f, v, S, I, E, R, N, St, c, p) - } - return f - } - _generateIntraEdgeVertices(t, r, a, c, p, f, g) { - const v = c - r, - S = p - a, - I = S === 0, - E = I ? Math.min(r, c) : Math.min(f, g), - R = I ? Math.max(r, c) : Math.max(f, g), - N = Math.floor(E / this._granularityCellSize) + 1, - j = Math.ceil(R / this._granularityCellSize) - 1; - if (I ? r < c : f < g) - for (let Z = N; Z <= j; Z++) { - const Y = Z * this._granularityCellSize; - t.push(this._vertexToIndex(Y, a + S * (Y - r) / v)) - } else - for (let Z = j; Z >= N; Z--) { - const Y = Z * this._granularityCellSize; - t.push(this._vertexToIndex(Y, a + S * (Y - r) / v)) - } - } - _generateInterEdgeVertices(t, r, a, c, p, f, g, v, S, I) { - const E = p - a, - R = f - c, - N = g - p, - j = (S - p) / N, - Z = (I - p) / N, - Y = Math.min(j, Z), - ae = Math.max(j, Z), - ze = c + R * Y; - let me = Math.floor(Math.min(ze, v) / this._granularityCellSize) + 1, - be = Math.ceil(Math.max(ze, v) / this._granularityCellSize) - 1, - Ve = v < ze; - const rt = N === 0; - if (rt && (g === S || g === I)) return; - if (rt || Y >= 1 || ae <= 0) { - const $t = a - g, - Bt = f + (r - f) * Math.min((S - g) / $t, (I - g) / $t); - me = Math.floor(Math.min(Bt, v) / this._granularityCellSize) + 1, be = Math.ceil(Math.max(Bt, v) / this._granularityCellSize) - 1, Ve = v < Bt - } - const St = E > 0 ? I : S; - if (Ve) - for (let $t = me; $t <= be; $t++) t.push(this._vertexToIndex($t * this._granularityCellSize, St)); - else - for (let $t = be; $t >= me; $t--) t.push(this._vertexToIndex($t * this._granularityCellSize, St)) - } - _generateOutline(t) { - const r = []; - for (const a of t) { - const c = Fo(a, this._granularity, !0), - p = this._pointArrayToIndices(c), - f = []; - for (let g = 1; g < p.length; g++) f.push(p[g - 1]), f.push(p[g]); - r.push(f) - } - return r - } - _handlePoles(t) { - let r = !1, - a = !1; - this._canonical && (this._canonical.y === 0 && (r = !0), this._canonical.y === (1 << this._canonical.z) - 1 && (a = !0)), (r || a) && this._fillPoles(t, r, a) - } - _ensureNoPoleVertices() { - const t = this._vertexBuffer; - for (let r = 0; r < t.length; r += 2) { - const a = t[r + 1]; - a === Rl && (t[r + 1] = -32767), a === lu && (t[r + 1] = 32766) - } - } - _generatePoleQuad(t, r, a, c, p, f) { - c > p != (f === Rl) ? (t.push(r), t.push(a), t.push(this._vertexToIndex(c, f)), t.push(a), t.push(this._vertexToIndex(p, f)), t.push(this._vertexToIndex(c, f))) : (t.push(a), t.push(r), t.push(this._vertexToIndex(c, f)), t.push(this._vertexToIndex(p, f)), t.push(a), t.push(this._vertexToIndex(c, f))) - } - _fillPoles(t, r, a) { - const c = this._vertexBuffer, - p = ne, - f = t.length; - for (let g = 2; g < f; g += 3) { - const v = t[g - 2], - S = t[g - 1], - I = t[g], - E = c[2 * v], - R = c[2 * v + 1], - N = c[2 * S], - j = c[2 * S + 1], - Z = c[2 * I], - Y = c[2 * I + 1]; - r && (R === 0 && j === 0 && this._generatePoleQuad(t, v, S, E, N, Rl), j === 0 && Y === 0 && this._generatePoleQuad(t, S, I, N, Z, Rl), Y === 0 && R === 0 && this._generatePoleQuad(t, I, v, Z, E, Rl)), a && (R === p && j === p && this._generatePoleQuad(t, v, S, E, N, lu), j === p && Y === p && this._generatePoleQuad(t, S, I, N, Z, lu), Y === p && R === p && this._generatePoleQuad(t, I, v, Z, E, lu)) - } - } - _initializeVertices(t) { - for (let r = 0; r < t.length; r += 2) this._vertexToIndex(t[r], t[r + 1]) - } - subdividePolygonInternal(t, r) { - if (this._used) throw new Error("Subdivision: multiple use not allowed."); - this._used = !0; - const { - flattened: a, - holeIndices: c - } = (function(g) { - const v = [], - S = []; - for (const I of g) - if (I.length !== 0) { - I !== g[0] && v.push(S.length / 2); - for (let E = 0; E < I.length; E++) S.push(I[E].x), S.push(I[E].y) - } return { - flattened: S, - holeIndices: v - } - })(t); - let p; - this._initializeVertices(a); - try { - const g = (function(S, I, E = 2) { - const R = I && I.length, - N = R ? I[0] * E : S.length; - let j = jm(S, 0, N, E, !0); - const Z = []; - if (!j || j.next === j.prev) return Z; - let Y, ae, ze; - if (R && (j = (function(me, be, Ve, rt) { - const St = []; - for (let $t = 0, Bt = be.length; $t < Bt; $t++) { - const Ut = jm(me, be[$t] * rt, $t < Bt - 1 ? be[$t + 1] * rt : me.length, rt, !1); - Ut === Ut.next && (Ut.steiner = !0), St.push(n0(Ut)) - } - St.sort(t0); - for (let $t = 0; $t < St.length; $t++) Ve = r0(St[$t], Ve); - return Ve - })(S, I, j, E)), S.length > 80 * E) { - Y = S[0], ae = S[1]; - let me = Y, - be = ae; - for (let Ve = E; Ve < N; Ve += E) { - const rt = S[Ve], - St = S[Ve + 1]; - rt < Y && (Y = rt), St < ae && (ae = St), rt > me && (me = rt), St > be && (be = St) - } - ze = Math.max(me - Y, be - ae), ze = ze !== 0 ? 32767 / ze : 0 - } - return nu(j, Z, E, Y, ae, ze, 0), Z - })(a, c), - v = this._convertIndices(a, g); - p = this._subdivideTrianglesScanline(v) - } catch (g) { - console.error(g) - } - let f = []; - return r && (f = this._generateOutline(t)), this._ensureNoPoleVertices(), this._handlePoles(p), { - verticesFlattened: this._vertexBuffer, - indicesTriangles: p, - indicesLineList: f - } - } - _convertIndices(t, r) { - const a = []; - for (let c = 0; c < r.length; c++) a.push(this._vertexToIndex(t[2 * r[c]], t[2 * r[c] + 1])); - return a - } - _pointArrayToIndices(t) { - const r = []; - for (let a = 0; a < t.length; a++) { - const c = t[a]; - r.push(this._vertexToIndex(c.x, c.y)) - } - return r - } - } - - function $m(i, t, r, a = !0) { - return new s0(r, t).subdividePolygonInternal(i, a) - } - - function Fo(i, t, r = !1) { - if (!i || i.length < 1) return []; - if (i.length < 2) return []; - const a = i[0], - c = i[i.length - 1], - p = r && (a.x !== c.x || a.y !== c.y); - if (t < 2) return p ? [...i, i[0]] : [...i]; - const f = Math.floor(ne / t), - g = []; - g.push(new $(i[0].x, i[0].y)); - const v = i.length, - S = p ? v : v - 1; - for (let I = 0; I < S; I++) { - const E = i[I], - R = I < v - 1 ? i[I + 1] : i[0], - N = E.x, - j = E.y, - Z = R.x, - Y = R.y, - ae = N !== Z, - ze = j !== Y; - if (!ae && !ze) continue; - const me = Z - N, - be = Y - j, - Ve = Math.abs(me), - rt = Math.abs(be); - let St = N, - $t = j; - for (;;) { - const Ut = me > 0 ? (Math.floor(St / f) + 1) * f : (Math.ceil(St / f) - 1) * f, - pr = be > 0 ? (Math.floor($t / f) + 1) * f : (Math.ceil($t / f) - 1) * f, - Vt = Math.abs(St - Ut), - Zt = Math.abs($t - pr), - mt = Math.abs(St - Z), - Br = Math.abs($t - Y), - Ur = ae ? Vt / Ve : Number.POSITIVE_INFINITY, - xr = ze ? Zt / rt : Number.POSITIVE_INFINITY; - if ((mt <= Vt || !ae) && (Br <= Zt || !ze)) break; - if (Ur < xr && ae || !ze) { - St = Ut, $t += be * Ur; - const or = new $(St, Math.round($t)); - g[g.length - 1].x === or.x && g[g.length - 1].y === or.y || g.push(or) - } else { - St += me * xr, $t = pr; - const or = new $(Math.round(St), $t); - g[g.length - 1].x === or.x && g[g.length - 1].y === or.y || g.push(or) - } - } - const Bt = new $(Z, Y); - g[g.length - 1].x === Bt.x && g[g.length - 1].y === Bt.y || g.push(Bt) - } - return g - } - - function o0(i, t, r) { - if (t.length === 0) throw new Error("Subdivision vertex ring is empty."); - let a = 0, - c = i[2 * t[0]]; - for (let v = 1; v < t.length; v++) { - const S = i[2 * t[v]]; - S < c && (c = S, a = v) - } - const p = t.length; - let f = a, - g = (f + 1) % p; - for (;;) { - const v = f - 1 >= 0 ? f - 1 : p - 1, - S = (g + 1) % p, - I = i[2 * t[v]], - E = i[2 * t[S]], - R = i[2 * t[f]], - N = i[2 * t[f] + 1], - j = i[2 * t[g] + 1]; - let Z = !1; - if (I < E) Z = !0; - else if (I > E) Z = !1; - else { - const Y = j - N, - ae = -(i[2 * t[g]] - R), - ze = N < j ? 1 : -1; - ((I - R) * Y + (i[2 * t[v] + 1] - N) * ae) * ze > ((E - R) * Y + (i[2 * t[S] + 1] - N) * ae) * ze && (Z = !0) - } - if (Z) { - const Y = t[v], - ae = t[f], - ze = t[g]; - Y !== ae && Y !== ze && ae !== ze && r.push(ze, ae, Y), f--, f < 0 && (f = p - 1) - } else { - const Y = t[S], - ae = t[f], - ze = t[g]; - Y !== ae && Y !== ze && ae !== ze && r.push(ze, ae, Y), g++, g >= p && (g = 0) - } - if (v === S) break - } - } - - function Gm(i, t, r, a, c, p, f, g, v) { - const S = c.length / 2, - I = f && g && v; - if (S < Wr.MAX_VERTEX_ARRAY_LENGTH) { - const E = t.prepareSegment(S, r, a), - R = E.vertexLength; - for (let Z = 0; Z < p.length; Z += 3) a.emplaceBack(R + p[Z], R + p[Z + 1], R + p[Z + 2]); - let N, j; - E.vertexLength += S, E.primitiveLength += p.length / 3, I && (j = f.prepareSegment(S, r, g), N = j.vertexLength, j.vertexLength += S); - for (let Z = 0; Z < c.length; Z += 2) i(c[Z], c[Z + 1]); - if (I) - for (let Z = 0; Z < v.length; Z++) { - const Y = v[Z]; - for (let ae = 1; ae < Y.length; ae += 2) g.emplaceBack(N + Y[ae - 1], N + Y[ae]); - j.primitiveLength += Y.length / 2 - } - } else(function(E, R, N, j, Z, Y) { - const ae = []; - for (let rt = 0; rt < j.length / 2; rt++) ae.push(-1); - const ze = { - count: 0 - }; - let me = 0, - be = E.getOrCreateLatestSegment(R, N), - Ve = be.vertexLength; - for (let rt = 2; rt < Z.length; rt += 3) { - const St = Z[rt - 2], - $t = Z[rt - 1], - Bt = Z[rt]; - let Ut = ae[St] < me, - pr = ae[$t] < me, - Vt = ae[Bt] < me; - be.vertexLength + ((Ut ? 1 : 0) + (pr ? 1 : 0) + (Vt ? 1 : 0)) > Wr.MAX_VERTEX_ARRAY_LENGTH && (be = E.createNewSegment(R, N), me = ze.count, Ut = !0, pr = !0, Vt = !0, Ve = 0); - const Zt = cu(ae, j, Y, ze, St, Ut, be), - mt = cu(ae, j, Y, ze, $t, pr, be), - Br = cu(ae, j, Y, ze, Bt, Vt, be); - N.emplaceBack(Ve + Zt - me, Ve + mt - me, Ve + Br - me), be.primitiveLength++ - } - })(t, r, a, c, p, i), I && (function(E, R, N, j, Z, Y) { - const ae = []; - for (let rt = 0; rt < j.length / 2; rt++) ae.push(-1); - const ze = { - count: 0 - }; - let me = 0, - be = E.getOrCreateLatestSegment(R, N), - Ve = be.vertexLength; - for (let rt = 0; rt < Z.length; rt++) { - const St = Z[rt]; - for (let $t = 1; $t < Z[rt].length; $t += 2) { - const Bt = St[$t - 1], - Ut = St[$t]; - let pr = ae[Bt] < me, - Vt = ae[Ut] < me; - be.vertexLength + ((pr ? 1 : 0) + (Vt ? 1 : 0)) > Wr.MAX_VERTEX_ARRAY_LENGTH && (be = E.createNewSegment(R, N), me = ze.count, pr = !0, Vt = !0, Ve = 0); - const Zt = cu(ae, j, Y, ze, Bt, pr, be), - mt = cu(ae, j, Y, ze, Ut, Vt, be); - N.emplaceBack(Ve + Zt - me, Ve + mt - me), be.primitiveLength++ - } - } - })(f, r, g, c, v, i), t.forceNewSegmentOnNextPrepare(), f == null || f.forceNewSegmentOnNextPrepare() - } - - function cu(i, t, r, a, c, p, f) { - if (p) { - const g = a.count; - return r(t[2 * c], t[2 * c + 1]), i[c] = a.count, a.count++, f.vertexLength++, g - } - return i[c] - } - class Lp { - constructor(t) { - this.zoom = t.zoom, this.globalState = t.globalState, this.overscaling = t.overscaling, this.layers = t.layers, this.layerIds = this.layers.map((r => r.id)), this.index = t.index, this.hasPattern = !1, this.patternFeatures = [], this.layoutVertexArray = new He, this.indexArray = new ki, this.indexArray2 = new Pi, this.programConfigurations = new ia(t.layers, t.zoom), this.segments = new Wr, this.segments2 = new Wr, this.stateDependentLayerIds = this.layers.filter((r => r.isStateDependent())).map((r => r.id)) - } - populate(t, r, a) { - this.hasPattern = Ap("fill", this.layers, r); - const c = this.layers[0].layout.get("fill-sort-key"), - p = !c.isConstant(), - f = []; - for (const { - feature: g, - id: v, - index: S, - sourceLayerIndex: I - } - of t) { - const E = this.layers[0]._featureFilter.needGeometry, - R = Wa(g, E); - if (!this.layers[0]._featureFilter.filter(new Oi(this.zoom, { - globalState: this.globalState - }), R, a)) continue; - const N = p ? c.evaluate(R, {}, a, r.availableImages) : void 0, - j = { - id: v, - properties: g.properties, - type: g.type, - sourceLayerIndex: I, - index: S, - geometry: E ? R.geometry : cs(g), - patterns: {}, - sortKey: N - }; - f.push(j) - } - p && f.sort(((g, v) => g.sortKey - v.sortKey)); - for (const g of f) { - const { - geometry: v, - index: S, - sourceLayerIndex: I - } = g; - if (this.hasPattern) { - const E = kp("fill", this.layers, g, this.zoom, r); - this.patternFeatures.push(E) - } else this.addFeature(g, v, S, a, {}, r.subdivisionGranularity); - r.featureIndex.insert(t[S].feature, v, S, I, this.index) - } - } - update(t, r, a) { - this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(t, r, this.stateDependentLayers, a) - } - addFeatures(t, r, a) { - for (const c of this.patternFeatures) this.addFeature(c, c.geometry, c.index, r, a, 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, Kv), 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, r, a, c, p, f) { - for (const g of xo(r, 500)) { - const v = $m(g, c, f.fill.getGranularityForZoomLevel(c.z)), - S = this.layoutVertexArray; - Gm(((I, E) => { - S.emplaceBack(I, E) - }), this.segments, this.layoutVertexArray, this.indexArray, v.verticesFlattened, v.indicesTriangles, this.segments2, this.indexArray2, v.indicesLineList) - } - this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, t, a, p, c) - } - } - let Hm, Wm; - Kt("FillBucket", Lp, { - omit: ["layers", "patternFeatures"] - }); - var l0 = { - get paint() { - return Wm = Wm || new jn({ - "fill-antialias": new hr(xe.paint_fill["fill-antialias"]), - "fill-opacity": new Rr(xe.paint_fill["fill-opacity"]), - "fill-color": new Rr(xe.paint_fill["fill-color"]), - "fill-outline-color": new Rr(xe.paint_fill["fill-outline-color"]), - "fill-translate": new hr(xe.paint_fill["fill-translate"]), - "fill-translate-anchor": new hr(xe.paint_fill["fill-translate-anchor"]), - "fill-pattern": new Sl(xe.paint_fill["fill-pattern"]) - }) - }, - get layout() { - return Hm = Hm || new jn({ - "fill-sort-key": new Rr(xe.layout_fill["fill-sort-key"]) - }) - } - }; - class c0 extends ha { - constructor(t) { - super(t, l0) - } - recalculate(t, r) { - super.recalculate(t, r); - const a = this.paint._values["fill-outline-color"]; - a.value.kind === "constant" && a.value.value === void 0 && (this.paint._values["fill-outline-color"] = this.paint._values["fill-color"]) - } - createBucket(t) { - return new Lp(t) - } - queryRadius() { - return ad(this.paint.get("fill-translate")) - } - queryIntersectsFeature({ - queryGeometry: t, - geometry: r, - transform: a, - pixelsToTileUnits: c - }) { - return Pm(sd(t, this.paint.get("fill-translate"), this.paint.get("fill-translate-anchor"), -a.bearingInRadians, c), r) - } - isTileClipped() { - return !0 - } - } - const u0 = Hi([{ - name: "a_pos", - components: 2, - type: "Int16" - }, { - name: "a_normal_ed", - components: 4, - type: "Int16" - }], 4), - h0 = Hi([{ - name: "a_centroid", - components: 2, - type: "Int16" - }], 4), - { - members: d0 - } = u0; - class Bl { - constructor(t, r, a, c, p) { - this.properties = {}, this.extent = a, this.type = 0, this.id = void 0, this._pbf = t, this._geometry = -1, this._keys = c, this._values = p, t.readFields(p0, this, r) - } - loadGeometry() { - const t = this._pbf; - t.pos = this._geometry; - const r = t.readVarint() + t.pos, - a = []; - let c, p = 1, - f = 0, - g = 0, - v = 0; - for (; t.pos < r;) { - if (f <= 0) { - const S = t.readVarint(); - p = 7 & S, f = S >> 3 - } - if (f--, p === 1 || p === 2) g += t.readSVarint(), v += t.readSVarint(), p === 1 && (c && a.push(c), c = []), c && c.push(new $(g, v)); - else { - if (p !== 7) throw new Error(`unknown command ${p}`); - c && c.push(c[0].clone()) - } - } - return c && a.push(c), a - } - bbox() { - const t = this._pbf; - t.pos = this._geometry; - const r = t.readVarint() + t.pos; - let a = 1, - c = 0, - p = 0, - f = 0, - g = 1 / 0, - v = -1 / 0, - S = 1 / 0, - I = -1 / 0; - for (; t.pos < r;) { - if (c <= 0) { - const E = t.readVarint(); - a = 7 & E, c = E >> 3 - } - if (c--, a === 1 || a === 2) p += t.readSVarint(), f += t.readSVarint(), p < g && (g = p), p > v && (v = p), f < S && (S = f), f > I && (I = f); - else if (a !== 7) throw new Error(`unknown command ${a}`) - } - return [g, S, v, I] - } - toGeoJSON(t, r, a) { - const c = this.extent * Math.pow(2, a), - p = this.extent * t, - f = this.extent * r, - g = this.loadGeometry(); - - function v(R) { - return [360 * (R.x + p) / c - 180, 360 / Math.PI * Math.atan(Math.exp((1 - 2 * (R.y + f) / c) * Math.PI)) - 90] - } - - function S(R) { - return R.map(v) - } - let I; - if (this.type === 1) { - const R = []; - for (const j of g) R.push(j[0]); - const N = S(R); - I = R.length === 1 ? { - type: "Point", - coordinates: N[0] - } : { - type: "MultiPoint", - coordinates: N - } - } else if (this.type === 2) { - const R = g.map(S); - I = R.length === 1 ? { - type: "LineString", - coordinates: R[0] - } : { - type: "MultiLineString", - coordinates: R - } - } else { - if (this.type !== 3) throw new Error("unknown feature type"); - { - const R = (function(j) { - const Z = j.length; - if (Z <= 1) return [j]; - const Y = []; - let ae, ze; - for (let me = 0; me < Z; me++) { - const be = f0(j[me]); - be !== 0 && (ze === void 0 && (ze = be < 0), ze === be < 0 ? (ae && Y.push(ae), ae = [j[me]]) : ae && ae.push(j[me])) - } - return ae && Y.push(ae), Y - })(g), - N = []; - for (const j of R) N.push(j.map(S)); - I = N.length === 1 ? { - type: "Polygon", - coordinates: N[0] - } : { - type: "MultiPolygon", - coordinates: N - } - } - } - const E = { - type: "Feature", - geometry: I, - properties: this.properties - }; - return this.id != null && (E.id = this.id), E - } - } - - function p0(i, t, r) { - i === 1 ? t.id = r.readVarint() : i === 2 ? (function(a, c) { - const p = a.readVarint() + a.pos; - for (; a.pos < p;) { - const f = c._keys[a.readVarint()], - g = c._values[a.readVarint()]; - c.properties[f] = g - } - })(r, t) : i === 3 ? t.type = r.readVarint() : i === 4 && (t._geometry = r.pos) - } - - function f0(i) { - let t = 0; - for (let r, a, c = 0, p = i.length, f = p - 1; c < p; f = c++) r = i[c], a = i[f], t += (a.x - r.x) * (r.y + a.y); - return t - } - Bl.types = ["Unknown", "Point", "LineString", "Polygon"]; - class Xm { - constructor(t, r) { - this.version = 1, this.name = "", this.extent = 4096, this.length = 0, this._pbf = t, this._keys = [], this._values = [], this._features = [], t.readFields(m0, this, r), 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 r = this._pbf.readVarint() + this._pbf.pos; - return new Bl(this._pbf, r, this.extent, this._keys, this._values) - } - } - - function m0(i, t, r) { - i === 15 ? t.version = r.readVarint() : i === 1 ? t.name = r.readString() : i === 5 ? t.extent = r.readVarint() : i === 2 ? t._features.push(r.pos) : i === 3 ? t._keys.push(r.readString()) : i === 4 && t._values.push((function(a) { - let c = null; - const p = a.readVarint() + a.pos; - for (; a.pos < p;) { - const f = a.readVarint() >> 3; - c = f === 1 ? a.readString() : f === 2 ? a.readFloat() : f === 3 ? a.readDouble() : f === 4 ? a.readVarint64() : f === 5 ? a.readVarint() : f === 6 ? a.readSVarint() : f === 7 ? a.readBoolean() : null - } - if (c == null) throw new Error("unknown feature value"); - return c - })(r)) - } - class Km { - constructor(t, r) { - this.layers = t.readFields(_0, {}, r) - } - } - - function _0(i, t, r) { - if (i === 3) { - const a = new Xm(r, r.readVarint() + r.pos); - a.length && (t[a.name] = a) - } - } - const Dp = Math.pow(2, 13); - - function uu(i, t, r, a, c, p, f, g) { - i.emplaceBack(t, r, 2 * Math.floor(a * Dp) + f, c * Dp * 2, p * Dp * 2, Math.round(g)) - } - class Rp { - constructor(t) { - this.zoom = t.zoom, this.globalState = t.globalState, this.overscaling = t.overscaling, this.layers = t.layers, this.layerIds = this.layers.map((r => r.id)), this.index = t.index, this.hasPattern = !1, this.layoutVertexArray = new je, this.centroidVertexArray = new he, this.indexArray = new ki, this.programConfigurations = new ia(t.layers, t.zoom), this.segments = new Wr, this.stateDependentLayerIds = this.layers.filter((r => r.isStateDependent())).map((r => r.id)) - } - populate(t, r, a) { - this.features = [], this.hasPattern = Ap("fill-extrusion", this.layers, r); - for (const { - feature: c, - id: p, - index: f, - sourceLayerIndex: g - } - of t) { - const v = this.layers[0]._featureFilter.needGeometry, - S = Wa(c, v); - if (!this.layers[0]._featureFilter.filter(new Oi(this.zoom, { - globalState: this.globalState - }), S, a)) continue; - const I = { - id: p, - sourceLayerIndex: g, - index: f, - geometry: v ? S.geometry : cs(c), - properties: c.properties, - type: c.type, - patterns: {} - }; - this.hasPattern ? this.features.push(kp("fill-extrusion", this.layers, I, this.zoom, r)) : this.addFeature(I, I.geometry, f, a, {}, r.subdivisionGranularity), r.featureIndex.insert(c, I.geometry, f, g, this.index, !0) - } - } - addFeatures(t, r, a) { - for (const c of this.features) { - const { - geometry: p - } = c; - this.addFeature(c, p, c.index, r, a, t.subdivisionGranularity) - } - } - update(t, r, a) { - this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(t, r, this.stateDependentLayers, a) - } - 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, d0), this.centroidVertexBuffer = t.createVertexBuffer(this.centroidVertexArray, h0.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, r, a, c, p, f) { - for (const g of xo(r, 500)) { - const v = { - x: 0, - y: 0, - sampleCount: 0 - }, - S = this.layoutVertexArray.length; - this.processPolygon(v, c, t, g, f); - const I = this.layoutVertexArray.length - S, - E = Math.floor(v.x / v.sampleCount), - R = Math.floor(v.y / v.sampleCount); - for (let N = 0; N < I; N++) this.centroidVertexArray.emplaceBack(E, R) - } - this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, t, a, p, c) - } - processPolygon(t, r, a, c, p) { - if (c.length < 1 || Ym(c[0])) return; - for (const E of c) E.length !== 0 && g0(t, E); - const f = { - segment: this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray) - }, - g = p.fill.getGranularityForZoomLevel(r.z), - v = Bl.types[a.type] === "Polygon"; - for (const E of c) { - if (E.length === 0 || Ym(E)) continue; - const R = Fo(E, g, v); - this._generateSideFaces(R, f) - } - if (!v) return; - const S = $m(c, r, g, !1), - I = this.layoutVertexArray; - Gm(((E, R) => { - uu(I, E, R, 0, 0, 1, 1, 0) - }), this.segments, this.layoutVertexArray, this.indexArray, S.verticesFlattened, S.indicesTriangles) - } - _generateSideFaces(t, r) { - let a = 0; - for (let c = 1; c < t.length; c++) { - const p = t[c], - f = t[c - 1]; - if (v0(p, f)) continue; - r.segment.vertexLength + 4 > Wr.MAX_VERTEX_ARRAY_LENGTH && (r.segment = this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray)); - const g = p.sub(f)._perp()._unit(), - v = f.dist(p); - a + v > 32768 && (a = 0), uu(this.layoutVertexArray, p.x, p.y, g.x, g.y, 0, 0, a), uu(this.layoutVertexArray, p.x, p.y, g.x, g.y, 0, 1, a), a += v, uu(this.layoutVertexArray, f.x, f.y, g.x, g.y, 0, 0, a), uu(this.layoutVertexArray, f.x, f.y, g.x, g.y, 0, 1, a); - const S = r.segment.vertexLength; - this.indexArray.emplaceBack(S, S + 2, S + 1), this.indexArray.emplaceBack(S + 1, S + 2, S + 3), r.segment.vertexLength += 4, r.segment.primitiveLength += 2 - } - } - } - - function g0(i, t) { - for (let r = 0; r < t.length; r++) { - const a = t[r]; - r === t.length - 1 && t[0].x === a.x && t[0].y === a.y || (i.x += a.x, i.y += a.y, i.sampleCount++) - } - } - - function v0(i, t) { - return i.x === t.x && (i.x < 0 || i.x > ne) || i.y === t.y && (i.y < 0 || i.y > ne) - } - - function Ym(i) { - return i.every((t => t.x < 0)) || i.every((t => t.x > ne)) || i.every((t => t.y < 0)) || i.every((t => t.y > ne)) - } - let Jm; - Kt("FillExtrusionBucket", Rp, { - omit: ["layers", "features"] - }); - var y0 = { - get paint() { - return Jm = Jm || new jn({ - "fill-extrusion-opacity": new hr(xe["paint_fill-extrusion"]["fill-extrusion-opacity"]), - "fill-extrusion-color": new Rr(xe["paint_fill-extrusion"]["fill-extrusion-color"]), - "fill-extrusion-translate": new hr(xe["paint_fill-extrusion"]["fill-extrusion-translate"]), - "fill-extrusion-translate-anchor": new hr(xe["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]), - "fill-extrusion-pattern": new Sl(xe["paint_fill-extrusion"]["fill-extrusion-pattern"]), - "fill-extrusion-height": new Rr(xe["paint_fill-extrusion"]["fill-extrusion-height"]), - "fill-extrusion-base": new Rr(xe["paint_fill-extrusion"]["fill-extrusion-base"]), - "fill-extrusion-vertical-gradient": new hr(xe["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"]) - }) - } - }; - class x0 extends ha { - constructor(t) { - super(t, y0) - } - createBucket(t) { - return new Rp(t) - } - queryRadius() { - return ad(this.paint.get("fill-extrusion-translate")) - } - is3D() { - return !0 - } - queryIntersectsFeature({ - queryGeometry: t, - feature: r, - featureState: a, - geometry: c, - transform: p, - pixelsToTileUnits: f, - pixelPosMatrix: g - }) { - const v = sd(t, this.paint.get("fill-extrusion-translate"), this.paint.get("fill-extrusion-translate-anchor"), -p.bearingInRadians, f), - S = this.paint.get("fill-extrusion-height").evaluate(r, a), - I = this.paint.get("fill-extrusion-base").evaluate(r, a), - E = (function(N, j) { - const Z = []; - for (const Y of N) { - const ae = [Y.x, Y.y, 0, 1]; - ke(ae, ae, j), Z.push(new $(ae[0] / ae[3], ae[1] / ae[3])) - } - return Z - })(v, g), - R = (function(N, j, Z, Y) { - const ae = [], - ze = [], - me = Y[8] * j, - be = Y[9] * j, - Ve = Y[10] * j, - rt = Y[11] * j, - St = Y[8] * Z, - $t = Y[9] * Z, - Bt = Y[10] * Z, - Ut = Y[11] * Z; - for (const pr of N) { - const Vt = [], - Zt = []; - for (const mt of pr) { - const Br = mt.x, - Ur = mt.y, - xr = Y[0] * Br + Y[4] * Ur + Y[12], - or = Y[1] * Br + Y[5] * Ur + Y[13], - oi = Y[2] * Br + Y[6] * Ur + Y[14], - Zi = Y[3] * Br + Y[7] * Ur + Y[15], - fn = oi + Ve, - Bn = Zi + rt, - Aa = xr + St, - aa = or + $t, - Mn = oi + Bt, - qi = Zi + Ut, - wn = new $((xr + me) / Bn, (or + be) / Bn); - wn.z = fn / Bn, Vt.push(wn); - const An = new $(Aa / qi, aa / qi); - An.z = Mn / qi, Zt.push(An) - } - ae.push(Vt), ze.push(Zt) - } - return [ae, ze] - })(c, I, S, g); - return (function(N, j, Z) { - let Y = 1 / 0; - Pm(Z, j) && (Y = Qm(Z, j[0])); - for (let ae = 0; ae < j.length; ae++) { - const ze = j[ae], - me = N[ae]; - for (let be = 0; be < ze.length - 1; be++) { - const Ve = ze[be], - rt = [Ve, ze[be + 1], me[be + 1], me[be], Ve]; - Sm(Z, rt) && (Y = Math.min(Y, Qm(Z, rt))) - } - } - return Y !== 1 / 0 && Y - })(R[0], R[1], E) - } - } - - function hu(i, t) { - return i.x * t.x + i.y * t.y - } - - function Qm(i, t) { - if (i.length === 1) { - let r = 0; - const a = t[r++]; - let c; - for (; !c || a.equals(c);) - if (c = t[r++], !c) return 1 / 0; - for (; r < t.length; r++) { - const p = t[r], - f = i[0], - g = c.sub(a), - v = p.sub(a), - S = f.sub(a), - I = hu(g, g), - E = hu(g, v), - R = hu(v, v), - N = hu(S, g), - j = hu(S, v), - Z = I * R - E * E, - Y = (R * N - E * j) / Z, - ae = (I * j - E * N) / Z, - ze = a.z * (1 - Y - ae) + c.z * Y + p.z * ae; - if (isFinite(ze)) return ze - } - return 1 / 0 - } { - let r = 1 / 0; - for (const a of t) r = Math.min(r, a.z); - return r - } - } - const b0 = Hi([{ - name: "a_pos_normal", - components: 2, - type: "Int16" - }, { - name: "a_data", - components: 4, - type: "Uint8" - }], 4), - { - members: w0 - } = b0, - T0 = Hi([{ - name: "a_uv_x", - components: 1, - type: "Float32" - }, { - name: "a_split_index", - components: 1, - type: "Float32" - }]), - { - members: C0 - } = T0, - S0 = Math.cos(Math.PI / 180 * 37.5), - e_ = Math.pow(2, 14) / .5; - class Bp { - constructor(t) { - this.zoom = t.zoom, this.globalState = t.globalState, this.overscaling = t.overscaling, this.layers = t.layers, this.layerIds = this.layers.map((r => r.id)), this.index = t.index, this.hasPattern = !1, this.patternFeatures = [], this.lineClipsArray = [], this.gradients = {}, this.layers.forEach((r => { - this.gradients[r.id] = {} - })), this.layoutVertexArray = new qe, this.layoutVertexArray2 = new $e, this.indexArray = new ki, this.programConfigurations = new ia(t.layers, t.zoom), this.segments = new Wr, this.maxLineLength = 0, this.stateDependentLayerIds = this.layers.filter((r => r.isStateDependent())).map((r => r.id)) - } - populate(t, r, a) { - this.hasPattern = Ap("line", this.layers, r); - const c = this.layers[0].layout.get("line-sort-key"), - p = !c.isConstant(), - f = []; - for (const { - feature: g, - id: v, - index: S, - sourceLayerIndex: I - } - of t) { - const E = this.layers[0]._featureFilter.needGeometry, - R = Wa(g, E); - if (!this.layers[0]._featureFilter.filter(new Oi(this.zoom, { - globalState: this.globalState - }), R, a)) continue; - const N = p ? c.evaluate(R, {}, a) : void 0, - j = { - id: v, - properties: g.properties, - type: g.type, - sourceLayerIndex: I, - index: S, - geometry: E ? R.geometry : cs(g), - patterns: {}, - sortKey: N - }; - f.push(j) - } - p && f.sort(((g, v) => g.sortKey - v.sortKey)); - for (const g of f) { - const { - geometry: v, - index: S, - sourceLayerIndex: I - } = g; - if (this.hasPattern) { - const E = kp("line", this.layers, g, this.zoom, r); - this.patternFeatures.push(E) - } else this.addFeature(g, v, S, a, {}, r.subdivisionGranularity); - r.featureIndex.insert(t[S].feature, v, S, I, this.index) - } - } - update(t, r, a) { - this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(t, r, this.stateDependentLayers, a) - } - addFeatures(t, r, a) { - for (const c of this.patternFeatures) this.addFeature(c, c.geometry, c.index, r, a, 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, C0)), this.layoutVertexBuffer = t.createVertexBuffer(this.layoutVertexArray, w0), 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.prototype.hasOwnProperty.call(t.properties, "mapbox_clip_start") && Object.prototype.hasOwnProperty.call(t.properties, "mapbox_clip_end")) return { - start: +t.properties.mapbox_clip_start, - end: +t.properties.mapbox_clip_end - } - } - addFeature(t, r, a, c, p, f) { - const g = this.layers[0].layout, - v = g.get("line-join").evaluate(t, {}), - S = g.get("line-cap"), - I = g.get("line-miter-limit"), - E = g.get("line-round-limit"); - this.lineClips = this.lineFeatureClips(t); - for (const R of r) this.addLine(R, t, v, S, I, E, c, f); - this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, t, a, p, c) - } - addLine(t, r, a, c, p, f, g, v) { - if (this.distance = 0, this.scaledDistance = 0, this.totalDistance = 0, t = Fo(t, g ? v.line.getGranularityForZoomLevel(g.z) : 1), this.lineClips) { - this.lineClipsArray.push(this.lineClips); - for (let me = 0; me < t.length - 1; me++) this.totalDistance += t[me].dist(t[me + 1]); - this.updateScaledDistance(), this.maxLineLength = Math.max(this.maxLineLength, this.totalDistance) - } - const S = Bl.types[r.type] === "Polygon"; - let I = t.length; - for (; I >= 2 && t[I - 1].equals(t[I - 2]);) I--; - let E = 0; - for (; E < I - 1 && t[E].equals(t[E + 1]);) E++; - if (I < (S ? 3 : 2)) return; - a === "bevel" && (p = 1.05); - const R = this.overscaling <= 16 ? 122880 / (512 * this.overscaling) : 0, - N = this.segments.prepareSegment(10 * I, this.layoutVertexArray, this.indexArray); - let j, Z, Y, ae, ze; - this.e1 = this.e2 = -1, S && (j = t[I - 2], ze = t[E].sub(j)._unit()._perp()); - for (let me = E; me < I; me++) { - if (Y = me === I - 1 ? S ? t[E + 1] : void 0 : t[me + 1], Y && t[me].equals(Y)) continue; - ze && (ae = ze), j && (Z = j), j = t[me], ze = Y ? Y.sub(j)._unit()._perp() : ae, ae = ae || ze; - let be = ae.add(ze); - be.x === 0 && be.y === 0 || be._unit(); - const Ve = ae.x * ze.x + ae.y * ze.y, - rt = be.x * ze.x + be.y * ze.y, - St = rt !== 0 ? 1 / rt : 1 / 0, - $t = 2 * Math.sqrt(2 - 2 * rt), - Bt = rt < S0 && Z && Y, - Ut = ae.x * ze.y - ae.y * ze.x > 0; - if (Bt && me > E) { - const Zt = j.dist(Z); - if (Zt > 2 * R) { - const mt = j.sub(j.sub(Z)._mult(R / Zt)._round()); - this.updateDistance(Z, mt), this.addCurrentVertex(mt, ae, 0, 0, N), Z = mt - } - } - const pr = Z && Y; - let Vt = pr ? a : S ? "butt" : c; - if (pr && Vt === "round" && (St < f ? Vt = "miter" : St <= 2 && (Vt = "fakeround")), Vt === "miter" && St > p && (Vt = "bevel"), Vt === "bevel" && (St > 2 && (Vt = "flipbevel"), St < p && (Vt = "miter")), Z && this.updateDistance(Z, j), Vt === "miter") be._mult(St), this.addCurrentVertex(j, be, 0, 0, N); - else if (Vt === "flipbevel") { - if (St > 100) be = ze.mult(-1); - else { - const Zt = St * ae.add(ze).mag() / ae.sub(ze).mag(); - be._perp()._mult(Zt * (Ut ? -1 : 1)) - } - this.addCurrentVertex(j, be, 0, 0, N), this.addCurrentVertex(j, be.mult(-1), 0, 0, N) - } else if (Vt === "bevel" || Vt === "fakeround") { - const Zt = -Math.sqrt(St * St - 1), - mt = Ut ? Zt : 0, - Br = Ut ? 0 : Zt; - if (Z && this.addCurrentVertex(j, ae, mt, Br, N), Vt === "fakeround") { - const Ur = Math.round(180 * $t / Math.PI / 20); - for (let xr = 1; xr < Ur; xr++) { - let or = xr / Ur; - if (or !== .5) { - const Zi = or - .5; - or += or * Zi * (or - 1) * ((1.0904 + Ve * (Ve * (3.55645 - 1.43519 * Ve) - 3.2452)) * Zi * Zi + (.848013 + Ve * (.215638 * Ve - 1.06021))) - } - const oi = ze.sub(ae)._mult(or)._add(ae)._unit()._mult(Ut ? -1 : 1); - this.addHalfVertex(j, oi.x, oi.y, !1, Ut, 0, N) - } - } - Y && this.addCurrentVertex(j, ze, -mt, -Br, N) - } else if (Vt === "butt") this.addCurrentVertex(j, be, 0, 0, N); - else if (Vt === "square") { - const Zt = Z ? 1 : -1; - this.addCurrentVertex(j, be, Zt, Zt, N) - } else Vt === "round" && (Z && (this.addCurrentVertex(j, ae, 0, 0, N), this.addCurrentVertex(j, ae, 1, 1, N, !0)), Y && (this.addCurrentVertex(j, ze, -1, -1, N, !0), this.addCurrentVertex(j, ze, 0, 0, N))); - if (Bt && me < I - 1) { - const Zt = j.dist(Y); - if (Zt > 2 * R) { - const mt = j.add(Y.sub(j)._mult(R / Zt)._round()); - this.updateDistance(j, mt), this.addCurrentVertex(mt, ze, 0, 0, N), j = mt - } - } - } - } - addCurrentVertex(t, r, a, c, p, f = !1) { - const g = r.y * c - r.x, - v = -r.y - r.x * c; - this.addHalfVertex(t, r.x + r.y * a, r.y - r.x * a, f, !1, a, p), this.addHalfVertex(t, g, v, f, !0, -c, p), this.distance > e_ / 2 && this.totalDistance === 0 && (this.distance = 0, this.updateScaledDistance(), this.addCurrentVertex(t, r, a, c, p, f)) - } - addHalfVertex({ - x: t, - y: r - }, a, c, p, f, g, v) { - const S = .5 * (this.lineClips ? this.scaledDistance * (e_ - 1) : this.scaledDistance); - this.layoutVertexArray.emplaceBack((t << 1) + (p ? 1 : 0), (r << 1) + (f ? 1 : 0), Math.round(63 * a) + 128, Math.round(63 * c) + 128, 1 + (g === 0 ? 0 : g < 0 ? -1 : 1) | (63 & S) << 2, S >> 6), this.lineClips && this.layoutVertexArray2.emplaceBack((this.scaledDistance - this.lineClips.start) / (this.lineClips.end - this.lineClips.start), this.lineClipsArray.length); - const I = v.vertexLength++; - this.e1 >= 0 && this.e2 >= 0 && (this.indexArray.emplaceBack(this.e1, I, this.e2), v.primitiveLength++), f ? this.e2 = I : this.e1 = I - } - updateScaledDistance() { - this.scaledDistance = this.lineClips ? this.lineClips.start + (this.lineClips.end - this.lineClips.start) * this.distance / this.totalDistance : this.distance - } - updateDistance(t, r) { - this.distance += t.dist(r), this.updateScaledDistance() - } - } - let t_, r_; - Kt("LineBucket", Bp, { - omit: ["layers", "patternFeatures"] - }); - var i_ = { - get paint() { - return r_ = r_ || new jn({ - "line-opacity": new Rr(xe.paint_line["line-opacity"]), - "line-color": new Rr(xe.paint_line["line-color"]), - "line-translate": new hr(xe.paint_line["line-translate"]), - "line-translate-anchor": new hr(xe.paint_line["line-translate-anchor"]), - "line-width": new Rr(xe.paint_line["line-width"]), - "line-gap-width": new Rr(xe.paint_line["line-gap-width"]), - "line-offset": new Rr(xe.paint_line["line-offset"]), - "line-blur": new Rr(xe.paint_line["line-blur"]), - "line-dasharray": new ns(xe.paint_line["line-dasharray"]), - "line-pattern": new Sl(xe.paint_line["line-pattern"]), - "line-gradient": new Pl(xe.paint_line["line-gradient"]) - }) - }, - get layout() { - return t_ = t_ || new jn({ - "line-cap": new hr(xe.layout_line["line-cap"]), - "line-join": new Rr(xe.layout_line["line-join"]), - "line-miter-limit": new hr(xe.layout_line["line-miter-limit"]), - "line-round-limit": new hr(xe.layout_line["line-round-limit"]), - "line-sort-key": new Rr(xe.layout_line["line-sort-key"]) - }) - } - }; - class P0 extends Rr { - possiblyEvaluate(t, r) { - return r = new Oi(Math.floor(r.zoom), { - now: r.now, - fadeDuration: r.fadeDuration, - zoomHistory: r.zoomHistory, - transition: r.transition - }), super.possiblyEvaluate(t, r) - } - evaluate(t, r, a, c) { - return r = pt({}, r, { - zoom: Math.floor(r.zoom) - }), super.evaluate(t, r, a, c) - } - } - let ud; - class I0 extends ha { - constructor(t) { - super(t, i_), this.gradientVersion = 0, ud || (ud = new P0(i_.paint.properties["line-width"].specification), ud.useIntegerZoom = !0) - } - _handleSpecialPaintPropertyUpdate(t) { - if (t === "line-gradient") { - const r = this.gradientExpression(); - this.stepInterpolant = !!(function(a) { - return a._styleExpression !== void 0 - })(r) && r._styleExpression.expression instanceof Gi, this.gradientVersion = (this.gradientVersion + 1) % Number.MAX_SAFE_INTEGER - } - } - gradientExpression() { - return this._transitionablePaint._values["line-gradient"].value.expression - } - recalculate(t, r) { - super.recalculate(t, r), this.paint._values["line-floorwidth"] = ud.possiblyEvaluate(this._transitioningPaint._values["line-width"].value, t) - } - createBucket(t) { - return new Bp(t) - } - queryRadius(t) { - const r = t, - a = n_(ru("line-width", this, r), ru("line-gap-width", this, r)), - c = ru("line-offset", this, r); - return a / 2 + Math.abs(c) + ad(this.paint.get("line-translate")) - } - queryIntersectsFeature({ - queryGeometry: t, - feature: r, - featureState: a, - geometry: c, - transform: p, - pixelsToTileUnits: f - }) { - const g = sd(t, this.paint.get("line-translate"), this.paint.get("line-translate-anchor"), -p.bearingInRadians, f), - v = f / 2 * n_(this.paint.get("line-width").evaluate(r, a), this.paint.get("line-gap-width").evaluate(r, a)), - S = this.paint.get("line-offset").evaluate(r, a); - return S && (c = (function(I, E) { - const R = []; - for (let N = 0; N < I.length; N++) { - const j = I[N], - Z = []; - for (let Y = 0; Y < j.length; Y++) { - const ae = j[Y - 1], - ze = j[Y], - me = j[Y + 1], - be = Y === 0 ? new $(0, 0) : ze.sub(ae)._unit()._perp(), - Ve = Y === j.length - 1 ? new $(0, 0) : me.sub(ze)._unit()._perp(), - rt = be._add(Ve)._unit(), - St = rt.x * Ve.x + rt.y * Ve.y; - St !== 0 && rt._mult(1 / St), Z.push(rt._mult(E)._add(ze)) - } - R.push(Z) - } - return R - })(c, S * f)), (function(I, E, R) { - for (let N = 0; N < E.length; N++) { - const j = E[N]; - if (I.length >= 3) { - for (let Z = 0; Z < j.length; Z++) - if (zl(I, j[Z])) return !0 - } - if (Ov(I, j, R)) return !0 - } - return !1 - })(g, c, v) - } - isTileClipped() { - return !0 - } - } - - function n_(i, t) { - return t > 0 ? t + 2 * i : i - } - const M0 = Hi([{ - name: "a_pos_offset", - components: 4, - type: "Int16" - }, { - name: "a_data", - components: 4, - type: "Uint16" - }, { - name: "a_pixeloffset", - components: 4, - type: "Int16" - }], 4), - A0 = Hi([{ - name: "a_projected_pos", - components: 3, - type: "Float32" - }], 4); - Hi([{ - name: "a_fade_opacity", - components: 1, - type: "Uint32" - }], 4); - const k0 = Hi([{ - name: "a_placed", - components: 2, - type: "Uint8" - }, { - name: "a_shift", - components: 2, - type: "Float32" - }, { - name: "a_box_real", - components: 2, - type: "Int16" - }]); - Hi([{ - 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 a_ = Hi([{ - name: "a_pos", - components: 2, - type: "Int16" - }, { - name: "a_anchor_pos", - components: 2, - type: "Int16" - }, { - name: "a_extrude", - components: 2, - type: "Int16" - }], 4), - E0 = Hi([{ - name: "a_pos", - components: 2, - type: "Float32" - }, { - name: "a_radius", - components: 1, - type: "Float32" - }, { - name: "a_flags", - components: 2, - type: "Int16" - }], 4); - - function z0(i, t, r) { - return i.sections.forEach((a => { - a.text = (function(c, p, f) { - const g = p.layout.get("text-transform").evaluate(f, {}); - return g === "uppercase" ? c = c.toLocaleUpperCase() : g === "lowercase" && (c = c.toLocaleLowerCase()), Ca.applyArabicShaping && (c = Ca.applyArabicShaping(c)), c - })(a.text, t, r) - })), i - } - Hi([{ - name: "triangle", - components: 3, - type: "Uint16" - }]), Hi([{ - 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" - }]), Hi([{ - 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" - }]), Hi([{ - type: "Float32", - name: "offsetX" - }]), Hi([{ - type: "Int16", - name: "x" - }, { - type: "Int16", - name: "y" - }, { - type: "Int16", - name: "tileUnitDistanceFromAnchor" - }]), Hi([{ - type: "Uint16", - name: "textAnchor" - }, { - type: "Float32", - components: 2, - name: "textOffset" - }]); - const du = { - "!": "︕", - "#": "#", - $: "$", - "%": "%", - "&": "&", - "(": "︵", - ")": "︶", - "*": "*", - "+": "+", - ",": "︐", - "-": "︲", - ".": "・", - "/": "/", - ":": "︓", - ";": "︔", - "<": "︿", - "=": "=", - ">": "﹀", - "?": "︖", - "@": "@", - "[": "﹇", - "\\": "\", - "]": "﹈", - "^": "^", - _: "︳", - "`": "`", - "{": "︷", - "|": "―", - "}": "︸", - "~": "~", - "¢": "¢", - "£": "£", - "¥": "¥", - "¦": "¦", - "¬": "¬", - "¯": " ̄", - "–": "︲", - "—": "︱", - "‘": "﹃", - "’": "﹄", - "“": "﹁", - "”": "﹂", - "…": "︙", - "‧": "・", - "₩": "₩", - "、": "︑", - "。": "︒", - "〈": "︿", - "〉": "﹀", - "《": "︽", - "》": "︾", - "「": "﹁", - "」": "﹂", - "『": "﹃", - "』": "﹄", - "【": "︻", - "】": "︼", - "〔": "︹", - "〕": "︺", - "〖": "︗", - "〗": "︘", - "!": "︕", - "(": "︵", - ")": "︶", - ",": "︐", - "-": "︲", - ".": "・", - ":": "︓", - ";": "︔", - "<": "︿", - ">": "﹀", - "?": "︖", - "[": "﹇", - "]": "﹈", - "_": "︳", - "{": "︷", - "|": "―", - "}": "︸", - "⦅": "︵", - "⦆": "︶", - "。": "︒", - "「": "﹁", - "」": "﹂" - }; - var bn = 24; - const Fp = 4294967296, - s_ = 1 / Fp, - o_ = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8"); - class Op { - 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, r, a = this.length) { - for (; this.pos < a;) { - const c = this.readVarint(), - p = c >> 3, - f = this.pos; - this.type = 7 & c, t(p, r, this), this.pos === f && this.skip(c) - } - return r - } - readMessage(t, r) { - return this.readFields(t, r, 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) * Fp; - return this.pos += 8, t - } - readSFixed64() { - const t = this.dataView.getUint32(this.pos, !0) + this.dataView.getInt32(this.pos + 4, !0) * Fp; - 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 r = this.buf; - let a, c; - return c = r[this.pos++], a = 127 & c, c < 128 ? a : (c = r[this.pos++], a |= (127 & c) << 7, c < 128 ? a : (c = r[this.pos++], a |= (127 & c) << 14, c < 128 ? a : (c = r[this.pos++], a |= (127 & c) << 21, c < 128 ? a : (c = r[this.pos], a |= (15 & c) << 28, (function(p, f, g) { - const v = g.buf; - let S, I; - if (I = v[g.pos++], S = (112 & I) >> 4, I < 128 || (I = v[g.pos++], S |= (127 & I) << 3, I < 128) || (I = v[g.pos++], S |= (127 & I) << 10, I < 128) || (I = v[g.pos++], S |= (127 & I) << 17, I < 128) || (I = v[g.pos++], S |= (127 & I) << 24, I < 128) || (I = v[g.pos++], S |= (1 & I) << 31, I < 128)) return Fl(p, S, f); - throw new Error("Expected varint not more than 10 bytes") - })(a, 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, - r = this.pos; - return this.pos = t, t - r >= 12 && o_ ? o_.decode(this.buf.subarray(r, t)) : (function(a, c, p) { - let f = "", - g = c; - for (; g < p;) { - const v = a[g]; - let S, I, E, R = null, - N = v > 239 ? 4 : v > 223 ? 3 : v > 191 ? 2 : 1; - if (g + N > p) break; - N === 1 ? v < 128 && (R = v) : N === 2 ? (S = a[g + 1], (192 & S) == 128 && (R = (31 & v) << 6 | 63 & S, R <= 127 && (R = null))) : N === 3 ? (S = a[g + 1], I = a[g + 2], (192 & S) == 128 && (192 & I) == 128 && (R = (15 & v) << 12 | (63 & S) << 6 | 63 & I, (R <= 2047 || R >= 55296 && R <= 57343) && (R = null))) : N === 4 && (S = a[g + 1], I = a[g + 2], E = a[g + 3], (192 & S) == 128 && (192 & I) == 128 && (192 & E) == 128 && (R = (15 & v) << 18 | (63 & S) << 12 | (63 & I) << 6 | 63 & E, (R <= 65535 || R >= 1114112) && (R = null))), R === null ? (R = 65533, N = 1) : R > 65535 && (R -= 65536, f += String.fromCharCode(R >>> 10 & 1023 | 55296), R = 56320 | 1023 & R), f += String.fromCharCode(R), g += N - } - return f - })(this.buf, r, t) - } - readBytes() { - const t = this.readVarint() + this.pos, - r = this.buf.subarray(this.pos, t); - return this.pos = t, r - } - readPackedVarint(t = [], r) { - const a = this.readPackedEnd(); - for (; this.pos < a;) t.push(this.readVarint(r)); - return t - } - readPackedSVarint(t = []) { - const r = this.readPackedEnd(); - for (; this.pos < r;) t.push(this.readSVarint()); - return t - } - readPackedBoolean(t = []) { - const r = this.readPackedEnd(); - for (; this.pos < r;) t.push(this.readBoolean()); - return t - } - readPackedFloat(t = []) { - const r = this.readPackedEnd(); - for (; this.pos < r;) t.push(this.readFloat()); - return t - } - readPackedDouble(t = []) { - const r = this.readPackedEnd(); - for (; this.pos < r;) t.push(this.readDouble()); - return t - } - readPackedFixed32(t = []) { - const r = this.readPackedEnd(); - for (; this.pos < r;) t.push(this.readFixed32()); - return t - } - readPackedSFixed32(t = []) { - const r = this.readPackedEnd(); - for (; this.pos < r;) t.push(this.readSFixed32()); - return t - } - readPackedFixed64(t = []) { - const r = this.readPackedEnd(); - for (; this.pos < r;) t.push(this.readFixed64()); - return t - } - readPackedSFixed64(t = []) { - const r = this.readPackedEnd(); - for (; this.pos < r;) t.push(this.readSFixed64()); - return t - } - readPackedEnd() { - return this.type === 2 ? this.readVarint() + this.pos : this.pos + 1 - } - skip(t) { - const r = 7 & t; - if (r === 0) - for (; this.buf[this.pos++] > 127;); - else if (r === 2) this.pos = this.readVarint() + this.pos; - else if (r === 5) this.pos += 4; - else { - if (r !== 1) throw new Error(`Unimplemented type: ${r}`); - this.pos += 8 - } - } - writeTag(t, r) { - this.writeVarint(t << 3 | r) - } - realloc(t) { - let r = this.length || 16; - for (; r < this.pos + t;) r *= 2; - if (r !== this.length) { - const a = new Uint8Array(r); - a.set(this.buf), this.buf = a, this.dataView = new DataView(a.buffer), this.length = r - } - } - 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 * s_), !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 * s_), !0), this.pos += 8 - } - writeVarint(t) { - (t = +t || 0) > 268435455 || t < 0 ? (function(r, a) { - let c, p; - if (r >= 0 ? (c = r % 4294967296 | 0, p = r / 4294967296 | 0) : (c = ~(-r % 4294967296), p = ~(-r / 4294967296), 4294967295 ^ c ? c = c + 1 | 0 : (c = 0, p = p + 1 | 0)), r >= 18446744073709552e3 || r < -18446744073709552e3) throw new Error("Given varint doesn't fit into 10 bytes"); - a.realloc(10), (function(f, g, v) { - v.buf[v.pos++] = 127 & f | 128, f >>>= 7, v.buf[v.pos++] = 127 & f | 128, f >>>= 7, v.buf[v.pos++] = 127 & f | 128, f >>>= 7, v.buf[v.pos++] = 127 & f | 128, v.buf[v.pos] = 127 & (f >>>= 7) - })(c, 0, a), (function(f, g) { - const v = (7 & f) << 4; - g.buf[g.pos++] |= v | ((f >>>= 3) ? 128 : 0), f && (g.buf[g.pos++] = 127 & f | ((f >>>= 7) ? 128 : 0), f && (g.buf[g.pos++] = 127 & f | ((f >>>= 7) ? 128 : 0), f && (g.buf[g.pos++] = 127 & f | ((f >>>= 7) ? 128 : 0), f && (g.buf[g.pos++] = 127 & f | ((f >>>= 7) ? 128 : 0), f && (g.buf[g.pos++] = 127 & f))))) - })(p, a) - })(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 r = this.pos; - this.pos = (function(c, p, f) { - for (let g, v, S = 0; S < p.length; S++) { - if (g = p.charCodeAt(S), g > 55295 && g < 57344) { - if (!v) { - g > 56319 || S + 1 === p.length ? (c[f++] = 239, c[f++] = 191, c[f++] = 189) : v = g; - continue - } - if (g < 56320) { - c[f++] = 239, c[f++] = 191, c[f++] = 189, v = g; - continue - } - g = v - 55296 << 10 | g - 56320 | 65536, v = null - } else v && (c[f++] = 239, c[f++] = 191, c[f++] = 189, v = null); - g < 128 ? c[f++] = g : (g < 2048 ? c[f++] = g >> 6 | 192 : (g < 65536 ? c[f++] = g >> 12 | 224 : (c[f++] = g >> 18 | 240, c[f++] = g >> 12 & 63 | 128), c[f++] = g >> 6 & 63 | 128), c[f++] = 63 & g | 128) - } - return f - })(this.buf, t, this.pos); - const a = this.pos - r; - a >= 128 && l_(r, a, this), this.pos = r - 1, this.writeVarint(a), this.pos += a - } - 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 r = t.length; - this.writeVarint(r), this.realloc(r); - for (let a = 0; a < r; a++) this.buf[this.pos++] = t[a] - } - writeRawMessage(t, r) { - this.pos++; - const a = this.pos; - t(r, this); - const c = this.pos - a; - c >= 128 && l_(a, c, this), this.pos = a - 1, this.writeVarint(c), this.pos += c - } - writeMessage(t, r, a) { - this.writeTag(t, 2), this.writeRawMessage(r, a) - } - writePackedVarint(t, r) { - r.length && this.writeMessage(t, L0, r) - } - writePackedSVarint(t, r) { - r.length && this.writeMessage(t, D0, r) - } - writePackedBoolean(t, r) { - r.length && this.writeMessage(t, F0, r) - } - writePackedFloat(t, r) { - r.length && this.writeMessage(t, R0, r) - } - writePackedDouble(t, r) { - r.length && this.writeMessage(t, B0, r) - } - writePackedFixed32(t, r) { - r.length && this.writeMessage(t, O0, r) - } - writePackedSFixed32(t, r) { - r.length && this.writeMessage(t, N0, r) - } - writePackedFixed64(t, r) { - r.length && this.writeMessage(t, j0, r) - } - writePackedSFixed64(t, r) { - r.length && this.writeMessage(t, q0, r) - } - writeBytesField(t, r) { - this.writeTag(t, 2), this.writeBytes(r) - } - writeFixed32Field(t, r) { - this.writeTag(t, 5), this.writeFixed32(r) - } - writeSFixed32Field(t, r) { - this.writeTag(t, 5), this.writeSFixed32(r) - } - writeFixed64Field(t, r) { - this.writeTag(t, 1), this.writeFixed64(r) - } - writeSFixed64Field(t, r) { - this.writeTag(t, 1), this.writeSFixed64(r) - } - writeVarintField(t, r) { - this.writeTag(t, 0), this.writeVarint(r) - } - writeSVarintField(t, r) { - this.writeTag(t, 0), this.writeSVarint(r) - } - writeStringField(t, r) { - this.writeTag(t, 2), this.writeString(r) - } - writeFloatField(t, r) { - this.writeTag(t, 5), this.writeFloat(r) - } - writeDoubleField(t, r) { - this.writeTag(t, 1), this.writeDouble(r) - } - writeBooleanField(t, r) { - this.writeVarintField(t, +r) - } - } - - function Fl(i, t, r) { - return r ? 4294967296 * t + (i >>> 0) : 4294967296 * (t >>> 0) + (i >>> 0) - } - - function l_(i, t, r) { - const a = t <= 16383 ? 1 : t <= 2097151 ? 2 : t <= 268435455 ? 3 : Math.floor(Math.log(t) / (7 * Math.LN2)); - r.realloc(a); - for (let c = r.pos - 1; c >= i; c--) r.buf[c + a] = r.buf[c] - } - - function L0(i, t) { - for (let r = 0; r < i.length; r++) t.writeVarint(i[r]) - } - - function D0(i, t) { - for (let r = 0; r < i.length; r++) t.writeSVarint(i[r]) - } - - function R0(i, t) { - for (let r = 0; r < i.length; r++) t.writeFloat(i[r]) - } - - function B0(i, t) { - for (let r = 0; r < i.length; r++) t.writeDouble(i[r]) - } - - function F0(i, t) { - for (let r = 0; r < i.length; r++) t.writeBoolean(i[r]) - } - - function O0(i, t) { - for (let r = 0; r < i.length; r++) t.writeFixed32(i[r]) - } - - function N0(i, t) { - for (let r = 0; r < i.length; r++) t.writeSFixed32(i[r]) - } - - function j0(i, t) { - for (let r = 0; r < i.length; r++) t.writeFixed64(i[r]) - } - - function q0(i, t) { - for (let r = 0; r < i.length; r++) t.writeSFixed64(i[r]) - } - - function V0(i, t, r) { - i === 1 && r.readMessage(U0, t) - } - - function U0(i, t, r) { - if (i === 3) { - const { - id: a, - bitmap: c, - width: p, - height: f, - left: g, - top: v, - advance: S - } = r.readMessage(Z0, {}); - t.push({ - id: a, - bitmap: new iu({ - width: p + 6, - height: f + 6 - }, c), - metrics: { - width: p, - height: f, - left: g, - top: v, - advance: S - } - }) - } - } - - function Z0(i, t, r) { - i === 1 ? t.id = r.readVarint() : i === 2 ? t.bitmap = r.readBytes() : i === 3 ? t.width = r.readVarint() : i === 4 ? t.height = r.readVarint() : i === 5 ? t.left = r.readSVarint() : i === 6 ? t.top = r.readSVarint() : i === 7 && (t.advance = r.readVarint()) - } - - function c_(i) { - let t = 0, - r = 0; - for (const f of i) t += f.w * f.h, r = Math.max(r, f.w); - i.sort(((f, g) => g.h - f.h)); - const a = [{ - x: 0, - y: 0, - w: Math.max(Math.ceil(Math.sqrt(t / .95)), r), - h: 1 / 0 - }]; - let c = 0, - p = 0; - for (const f of i) - for (let g = a.length - 1; g >= 0; g--) { - const v = a[g]; - if (!(f.w > v.w || f.h > v.h)) { - if (f.x = v.x, f.y = v.y, p = Math.max(p, f.y + f.h), c = Math.max(c, f.x + f.w), f.w === v.w && f.h === v.h) { - const S = a.pop(); - S && g < a.length && (a[g] = S) - } else f.h === v.h ? (v.x += f.w, v.w -= f.w) : f.w === v.w ? (v.y += f.h, v.h -= f.h) : (a.push({ - x: v.x + f.w, - y: v.y, - w: v.w - f.w, - h: f.h - }), v.y += f.h, v.h -= f.h); - break - } - } - return { - w: c, - h: p, - fill: t / (c * p) || 0 - } - } - class Np { - constructor(t, { - pixelRatio: r, - version: a, - stretchX: c, - stretchY: p, - content: f, - textFitWidth: g, - textFitHeight: v - }) { - this.paddedRect = t, this.pixelRatio = r, this.stretchX = c, this.stretchY = p, this.content = f, this.version = a, this.textFitWidth = g, this.textFitHeight = v - } - get 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 u_ { - constructor(t, r) { - const a = {}, - c = {}; - this.haveRenderCallbacks = []; - const p = []; - this.addImages(t, a, p), this.addImages(r, c, p); - const { - w: f, - h: g - } = c_(p), v = new na({ - width: f || 1, - height: g || 1 - }); - for (const S in t) { - const I = t[S], - E = a[S].paddedRect; - na.copy(I.data, v, { - x: 0, - y: 0 - }, { - x: E.x + 1, - y: E.y + 1 - }, I.data) - } - for (const S in r) { - const I = r[S], - E = c[S].paddedRect, - R = E.x + 1, - N = E.y + 1, - j = I.data.width, - Z = I.data.height; - na.copy(I.data, v, { - x: 0, - y: 0 - }, { - x: R, - y: N - }, I.data), na.copy(I.data, v, { - x: 0, - y: Z - 1 - }, { - x: R, - y: N - 1 - }, { - width: j, - height: 1 - }), na.copy(I.data, v, { - x: 0, - y: 0 - }, { - x: R, - y: N + Z - }, { - width: j, - height: 1 - }), na.copy(I.data, v, { - x: j - 1, - y: 0 - }, { - x: R - 1, - y: N - }, { - width: 1, - height: Z - }), na.copy(I.data, v, { - x: 0, - y: 0 - }, { - x: R + j, - y: N - }, { - width: 1, - height: Z - }) - } - this.image = v, this.iconPositions = a, this.patternPositions = c - } - addImages(t, r, a) { - for (const c in t) { - const p = t[c], - f = { - x: 0, - y: 0, - w: p.data.width + 2, - h: p.data.height + 2 - }; - a.push(f), r[c] = new Np(f, p), p.hasRenderCallback && this.haveRenderCallbacks.push(c) - } - } - patchUpdatedImages(t, r) { - t.dispatchRenderCallbacks(this.haveRenderCallbacks); - for (const a in t.updatedImages) this.patchUpdatedImage(this.iconPositions[a], t.getImage(a), r), this.patchUpdatedImage(this.patternPositions[a], t.getImage(a), r) - } - patchUpdatedImage(t, r, a) { - if (!t || !r || t.version === r.version) return; - t.version = r.version; - const [c, p] = t.tl; - a.update(r.data, void 0, { - x: c, - y: p - }) - } - } - var eo; - Kt("ImagePosition", Np), Kt("ImageAtlas", u_), T.ao = void 0, (eo = T.ao || (T.ao = {}))[eo.none = 0] = "none", eo[eo.horizontal = 1] = "horizontal", eo[eo.vertical = 2] = "vertical", eo[eo.horizontalOnly = 3] = "horizontalOnly"; - class pu { - constructor() { - this.scale = 1, this.fontStack = "", this.imageName = null, this.verticalAlign = "bottom" - } - static forText(t, r, a) { - const c = new pu; - return c.scale = t || 1, c.fontStack = r, c.verticalAlign = a || "bottom", c - } - static forImage(t, r) { - const a = new pu; - return a.imageName = t, a.verticalAlign = r || "bottom", a - } - } - class Ol { - constructor() { - this.text = "", this.sectionIndex = [], this.sections = [], this.imageSectionID = null - } - static fromFeature(t, r) { - const a = new Ol; - for (let c = 0; c < t.sections.length; c++) { - const p = t.sections[c]; - p.image ? a.addImageSection(p) : a.addTextSection(p, r) - } - return a - } - length() { - return this.text.length - } - getSection(t) { - return this.sections[this.sectionIndex[t]] - } - getSectionIndex(t) { - return this.sectionIndex[t] - } - getCharCode(t) { - return this.text.charCodeAt(t) - } - verticalizePunctuation() { - this.text = (function(t) { - let r = ""; - for (let a = 0; a < t.length; a++) { - const c = t.charCodeAt(a + 1) || null, - p = t.charCodeAt(a - 1) || null; - r += c && Kh(c) && !du[t[a + 1]] || p && Kh(p) && !du[t[a - 1]] || !du[t[a]] ? t[a] : du[t[a]] - } - return r - })(this.text) - } - trim() { - let t = 0; - for (let a = 0; a < this.text.length && dd[this.text.charCodeAt(a)]; a++) t++; - let r = this.text.length; - for (let a = this.text.length - 1; a >= 0 && a >= t && dd[this.text.charCodeAt(a)]; a--) r--; - this.text = this.text.substring(t, r), this.sectionIndex = this.sectionIndex.slice(t, r) - } - substring(t, r) { - const a = new Ol; - return a.text = this.text.substring(t, r), a.sectionIndex = this.sectionIndex.slice(t, r), a.sections = this.sections, a - } - toString() { - return this.text - } - getMaxScale() { - return this.sectionIndex.reduce(((t, r) => Math.max(t, this.sections[r].scale)), 0) - } - getMaxImageSize(t) { - let r = 0, - a = 0; - for (let c = 0; c < this.length(); c++) { - const p = this.getSection(c); - if (p.imageName) { - const f = t[p.imageName]; - if (!f) continue; - const g = f.displaySize; - r = Math.max(r, g[0]), a = Math.max(a, g[1]) - } - } - return { - maxImageWidth: r, - maxImageHeight: a - } - } - addTextSection(t, r) { - this.text += t.text, this.sections.push(pu.forText(t.scale, t.fontStack || r, t.verticalAlign)); - const a = this.sections.length - 1; - for (let c = 0; c < t.text.length; ++c) this.sectionIndex.push(a) - } - addImageSection(t) { - const r = t.image ? t.image.name : ""; - if (r.length === 0) return void Lt("Can't add FormattedSection with an empty image."); - const a = this.getNextImageSectionCharCode(); - a ? (this.text += String.fromCharCode(a), this.sections.push(pu.forImage(r, t.verticalAlign)), this.sectionIndex.push(this.sections.length - 1)) : Lt("Reached maximum number of images 6401") - } - getNextImageSectionCharCode() { - return this.imageSectionID ? this.imageSectionID >= 63743 ? null : ++this.imageSectionID : (this.imageSectionID = 57344, this.imageSectionID) - } - } - - function hd(i, t, r, a, c, p, f, g, v, S, I, E, R, N, j) { - const Z = Ol.fromFeature(i, c); - let Y; - E === T.ao.vertical && Z.verticalizePunctuation(); - const { - processBidirectionalText: ae, - processStyledBidirectionalText: ze - } = Ca; - if (ae && Z.sections.length === 1) { - Y = []; - const Ve = ae(Z.toString(), jp(Z, S, p, t, a, N)); - for (const rt of Ve) { - const St = new Ol; - St.text = rt, St.sections = Z.sections; - for (let $t = 0; $t < rt.length; $t++) St.sectionIndex.push(0); - Y.push(St) - } - } else if (ze) { - Y = []; - const Ve = ze(Z.text, Z.sectionIndex, jp(Z, S, p, t, a, N)); - for (const rt of Ve) { - const St = new Ol; - St.text = rt[0], St.sectionIndex = rt[1], St.sections = Z.sections, Y.push(St) - } - } else Y = (function(Ve, rt) { - const St = [], - $t = Ve.text; - let Bt = 0; - for (const Ut of rt) St.push(Ve.substring(Bt, Ut)), Bt = Ut; - return Bt < $t.length && St.push(Ve.substring(Bt, $t.length)), St - })(Z, jp(Z, S, p, t, a, N)); - const me = [], - be = { - positionedLines: me, - text: Z.toString(), - top: I[1], - bottom: I[1], - left: I[0], - right: I[0], - writingMode: E, - iconsInText: !1, - verticalizable: !1 - }; - return (function(Ve, rt, St, $t, Bt, Ut, pr, Vt, Zt, mt, Br, Ur) { - let xr = 0, - or = 0, - oi = 0, - Zi = 0; - const fn = Vt === "right" ? 1 : Vt === "left" ? 0 : .5, - Bn = bn / Ur; - let Aa = 0; - for (const qi of Bt) { - qi.trim(); - const wn = qi.getMaxScale(), - An = { - positionedGlyphs: [], - lineOffset: 0 - }; - Ve.positionedLines[Aa] = An; - const kn = An.positionedGlyphs; - let Yn = 0; - if (!qi.length()) { - or += Ut, ++Aa; - continue - } - const ka = W0($t, qi, Bn); - for (let sa = 0; sa < qi.length(); sa++) { - const mn = qi.getSection(sa), - Cn = qi.getSectionIndex(sa), - Sn = qi.getCharCode(sa), - rn = X0(Zt, Br, Sn); - let Bi; - if (mn.imageName) { - if (Ve.iconsInText = !0, mn.scale = mn.scale * Bn, Bi = Y0(mn, rn, wn, ka, $t), !Bi) continue; - Yn = Math.max(Yn, Bi.imageOffset) - } else if (Bi = K0(mn, Sn, rn, ka, rt, St), !Bi) continue; - const { - rect: Xa, - metrics: Vl, - baselineOffset: Ka - } = Bi; - kn.push({ - glyph: Sn, - imageName: mn.imageName, - x: xr, - y: or + Ka + -17, - vertical: rn, - scale: mn.scale, - fontStack: mn.fontStack, - sectionIndex: Cn, - metrics: Vl, - rect: Xa - }), rn ? (Ve.verticalizable = !0, xr += (mn.imageName ? Vl.advance : bn) * mn.scale + mt) : xr += Vl.advance * mn.scale + mt - } - kn.length !== 0 && (oi = Math.max(xr - mt, oi), J0(kn, 0, kn.length - 1, fn)), xr = 0, An.lineOffset = Math.max(Yn, (wn - 1) * bn); - const Tn = Ut * wn + Yn; - or += Tn, Zi = Math.max(Tn, Zi), ++Aa - } - const { - horizontalAlign: aa, - verticalAlign: Mn - } = qp(pr); - (function(qi, wn, An, kn, Yn, ka, Tn, sa, mn) { - const Cn = (wn - An) * Yn; - let Sn = 0; - Sn = ka !== Tn ? -sa * kn - -17 : -kn * mn * Tn + .5 * Tn; - for (const rn of qi) - for (const Bi of rn.positionedGlyphs) Bi.x += Cn, Bi.y += Sn - })(Ve.positionedLines, fn, aa, Mn, oi, Zi, Ut, or, Bt.length), Ve.top += -Mn * or, Ve.bottom = Ve.top + or, Ve.left += -aa * oi, Ve.right = Ve.left + oi - })(be, t, r, a, Y, f, g, v, E, S, R, j), !(function(Ve) { - for (const rt of Ve) - if (rt.positionedGlyphs.length !== 0) return !1; - return !0 - })(me) && be - } - const dd = { - 9: !0, - 10: !0, - 11: !0, - 12: !0, - 13: !0, - 32: !0 - }, - $0 = { - 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 - }, - G0 = { - 40: !0 - }; - - function h_(i, t, r, a, c, p) { - if (t.imageName) { - const f = a[t.imageName]; - return f ? f.displaySize[0] * t.scale * bn / p + c : 0 - } { - const f = r[t.fontStack], - g = f && f[i]; - return g ? g.metrics.advance * t.scale + c : 0 - } - } - - function d_(i, t, r, a) { - const c = Math.pow(i - t, 2); - return a ? i < t ? c / 2 : 2 * c : c + Math.abs(r) * r - } - - function H0(i, t, r) { - let a = 0; - return i === 10 && (a -= 1e4), r && (a += 150), i !== 40 && i !== 65288 || (a += 50), t !== 41 && t !== 65289 || (a += 50), a - } - - function p_(i, t, r, a, c, p) { - let f = null, - g = d_(t, r, c, p); - for (const v of a) { - const S = d_(t - v.x, r, c, p) + v.badness; - S <= g && (f = v, g = S) - } - return { - index: i, - x: t, - priorBreak: f, - badness: g - } - } - - function f_(i) { - return i ? f_(i.priorBreak).concat(i.index) : [] - } - - function jp(i, t, r, a, c, p) { - if (!i) return []; - const f = [], - g = (function(E, R, N, j, Z, Y) { - let ae = 0; - for (let ze = 0; ze < E.length(); ze++) { - const me = E.getSection(ze); - ae += h_(E.getCharCode(ze), me, j, Z, R, Y) - } - return ae / Math.max(1, Math.ceil(ae / N)) - })(i, t, r, a, c, p), - v = i.text.indexOf("​") >= 0; - let S = 0; - for (let E = 0; E < i.length(); E++) { - const R = i.getSection(E), - N = i.getCharCode(E); - if (dd[N] || (S += h_(N, R, a, c, t, p)), E < i.length() - 1) { - const j = !((I = N) < 11904) && (!!si["CJK Compatibility Forms"](I) || !!si["CJK Compatibility"](I) || !!si["CJK Strokes"](I) || !!si["CJK Symbols and Punctuation"](I) || !!si["Enclosed CJK Letters and Months"](I) || !!si["Halfwidth and Fullwidth Forms"](I) || !!si["Ideographic Description Characters"](I) || !!si["Vertical Forms"](I) || $c.test(String.fromCodePoint(I))); - ($0[N] || j || R.imageName || E !== i.length() - 2 && G0[i.getCharCode(E + 1)]) && f.push(p_(E + 1, S, g, f, H0(N, i.getCharCode(E + 1), j && v), !1)) - } - } - var I; - return f_(p_(i.length(), S, g, f, 0, !0)) - } - - function qp(i) { - let t = .5, - r = .5; - switch (i) { - case "right": - case "top-right": - case "bottom-right": - t = 1; - break; - case "left": - case "top-left": - case "bottom-left": - t = 0 - } - switch (i) { - case "bottom": - case "bottom-right": - case "bottom-left": - r = 1; - break; - case "top": - case "top-right": - case "top-left": - r = 0 - } - return { - horizontalAlign: t, - verticalAlign: r - } - } - - function W0(i, t, r) { - const a = t.getMaxScale() * bn, - { - maxImageWidth: c, - maxImageHeight: p - } = t.getMaxImageSize(i), - f = Math.max(a, p * r); - return { - verticalLineContentWidth: Math.max(a, c * r), - horizontalLineContentHeight: f - } - } - - function m_(i) { - switch (i) { - case "top": - return 0; - case "center": - return .5; - default: - return 1 - } - } - - function X0(i, t, r) { - return !(i === T.ao.horizontal || !t && !Gc(r) || t && (dd[r] || (a = r, new RegExp("\\p{sc=Arab}", "u").test(String.fromCodePoint(a))))); - var a - } - - function K0(i, t, r, a, c, p) { - const f = p[i.fontStack], - g = (function(S, I, E, R) { - if (S && S.rect) return S; - const N = I[E.fontStack], - j = N && N[R]; - return j ? { - rect: null, - metrics: j.metrics - } : null - })(f && f[t], c, i, t); - if (g === null) return null; - let v; - if (r) v = a.verticalLineContentWidth - i.scale * bn; - else { - const S = m_(i.verticalAlign); - v = (a.horizontalLineContentHeight - i.scale * bn) * S - } - return { - rect: g.rect, - metrics: g.metrics, - baselineOffset: v - } - } - - function Y0(i, t, r, a, c) { - const p = c[i.imageName]; - if (!p) return null; - const f = p.paddedRect, - g = p.displaySize, - v = { - width: g[0], - height: g[1], - left: 1, - top: -3, - advance: t ? g[1] : g[0] - }; - let S; - if (t) S = a.verticalLineContentWidth - g[1] * i.scale; - else { - const I = m_(i.verticalAlign); - S = (a.horizontalLineContentHeight - g[1] * i.scale) * I - } - return { - rect: f, - metrics: v, - baselineOffset: S, - imageOffset: (t ? g[0] : g[1]) * i.scale - bn * r - } - } - - function J0(i, t, r, a) { - if (a === 0) return; - const c = i[r], - p = (i[r].x + c.metrics.advance * c.scale) * a; - for (let f = t; f <= r; f++) i[f].x -= p - } - - function Q0(i, t, r) { - const { - horizontalAlign: a, - verticalAlign: c - } = qp(r), p = t[0] - i.displaySize[0] * a, f = t[1] - i.displaySize[1] * c; - return { - image: i, - top: f, - bottom: f + i.displaySize[1], - left: p, - right: p + i.displaySize[0] - } - } - - function __(i) { - var t, r; - let a = i.left, - c = i.top, - p = i.right - a, - f = i.bottom - c; - const g = (t = i.image.textFitWidth) !== null && t !== void 0 ? t : "stretchOrShrink", - v = (r = i.image.textFitHeight) !== null && r !== void 0 ? r : "stretchOrShrink", - S = (i.image.content[2] - i.image.content[0]) / (i.image.content[3] - i.image.content[1]); - if (v === "proportional") { - if (g === "stretchOnly" && p / f < S || g === "proportional") { - const I = Math.ceil(f * S); - a *= I / p, p = I - } - } else if (g === "proportional" && v === "stretchOnly" && S !== 0 && p / f > S) { - const I = Math.ceil(p / S); - c *= I / f, f = I - } - return { - x1: a, - y1: c, - x2: a + p, - y2: c + f - } - } - - function g_(i, t, r, a, c, p) { - const f = i.image; - let g; - if (f.content) { - const Y = f.content, - ae = f.pixelRatio || 1; - g = [Y[0] / ae, Y[1] / ae, f.displaySize[0] - Y[2] / ae, f.displaySize[1] - Y[3] / ae] - } - const v = t.left * p, - S = t.right * p; - let I, E, R, N; - r === "width" || r === "both" ? (N = c[0] + v - a[3], E = c[0] + S + a[1]) : (N = c[0] + (v + S - f.displaySize[0]) / 2, E = N + f.displaySize[0]); - const j = t.top * p, - Z = t.bottom * p; - return r === "height" || r === "both" ? (I = c[1] + j - a[0], R = c[1] + Z + a[2]) : (I = c[1] + (j + Z - f.displaySize[1]) / 2, R = I + f.displaySize[1]), { - image: f, - top: I, - right: E, - bottom: R, - left: N, - collisionPadding: g - } - } - const As = 128, - to = 32640; - - function v_(i, t) { - const { - expression: r - } = t; - if (r.kind === "constant") return { - kind: "constant", - layoutSize: r.evaluate(new Oi(i + 1)) - }; - if (r.kind === "source") return { - kind: "source" - }; - { - const { - zoomStops: a, - interpolationType: c - } = r; - let p = 0; - for (; p < a.length && a[p] <= i;) p++; - p = Math.max(0, p - 1); - let f = p; - for (; f < a.length && a[f] < i + 1;) f++; - f = Math.min(a.length - 1, f); - const g = a[p], - v = a[f]; - return r.kind === "composite" ? { - kind: "composite", - minZoom: g, - maxZoom: v, - interpolationType: c - } : { - kind: "camera", - minZoom: g, - maxZoom: v, - minSize: r.evaluate(new Oi(g)), - maxSize: r.evaluate(new Oi(v)), - interpolationType: c - } - } - } - - function Vp(i, t, r) { - let a = "never"; - const c = i.get(t); - return c ? a = c : i.get(r) && (a = "always"), a - } - const ey = [{ - name: "a_fade_opacity", - components: 1, - type: "Uint8", - offset: 0 - }]; - - function pd(i, t, r, a, c, p, f, g, v, S, I, E, R) { - const N = g ? Math.min(to, Math.round(g[0])) : 0, - j = g ? Math.min(to, Math.round(g[1])) : 0; - i.emplaceBack(t, r, Math.round(32 * a), Math.round(32 * c), p, f, (N << 1) + (v ? 1 : 0), j, 16 * S, 16 * I, 256 * E, 256 * R) - } - - function Up(i, t, r) { - i.emplaceBack(t.x, t.y, r), i.emplaceBack(t.x, t.y, r), i.emplaceBack(t.x, t.y, r), i.emplaceBack(t.x, t.y, r) - } - - function ty(i) { - for (const t of i.sections) - if (Qh(t.text)) return !0; - return !1 - } - class Zp { - constructor(t) { - this.layoutVertexArray = new Nt, this.indexArray = new ki, this.programConfigurations = t, this.segments = new Wr, this.dynamicLayoutVertexArray = new yt, this.opacityVertexArray = new sr, this.hasVisibleVertices = !1, this.placedSymbolArray = new U - } - isEmpty() { - return this.layoutVertexArray.length === 0 && this.indexArray.length === 0 && this.dynamicLayoutVertexArray.length === 0 && this.opacityVertexArray.length === 0 - } - upload(t, r, a, c) { - this.isEmpty() || (a && (this.layoutVertexBuffer = t.createVertexBuffer(this.layoutVertexArray, M0.members), this.indexBuffer = t.createIndexBuffer(this.indexArray, r), this.dynamicLayoutVertexBuffer = t.createVertexBuffer(this.dynamicLayoutVertexArray, A0.members, !0), this.opacityVertexBuffer = t.createVertexBuffer(this.opacityVertexArray, ey, !0), this.opacityVertexBuffer.itemSize = 1), (a || c) && 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()) - } - } - Kt("SymbolBuffers", Zp); - class $p { - constructor(t, r, a) { - this.layoutVertexArray = new t, this.layoutAttributes = r, this.indexArray = new a, this.segments = new Wr, this.collisionVertexArray = new xi - } - upload(t) { - this.layoutVertexBuffer = t.createVertexBuffer(this.layoutVertexArray, this.layoutAttributes), this.indexBuffer = t.createIndexBuffer(this.indexArray), this.collisionVertexBuffer = t.createVertexBuffer(this.collisionVertexArray, k0.members, !0) - } - destroy() { - this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.segments.destroy(), this.collisionVertexBuffer.destroy()) - } - } - Kt("CollisionBuffers", $p); - class Nl { - constructor(t) { - this.collisionBoxArray = t.collisionBoxArray, this.zoom = t.zoom, this.globalState = t.globalState, this.overscaling = t.overscaling, this.layers = t.layers, this.layerIds = this.layers.map((f => f.id)), this.index = t.index, this.pixelRatio = t.pixelRatio, this.sourceLayerIndex = t.sourceLayerIndex, this.hasPattern = !1, this.hasRTLText = !1, this.sortKeyRanges = [], this.collisionCircleArray = []; - const r = this.layers[0]._unevaluatedLayout._values; - this.textSizeData = v_(this.zoom, r["text-size"]), this.iconSizeData = v_(this.zoom, r["icon-size"]); - const a = this.layers[0].layout, - c = a.get("symbol-sort-key"), - p = a.get("symbol-z-order"); - this.canOverlap = Vp(a, "text-overlap", "text-allow-overlap") !== "never" || Vp(a, "icon-overlap", "icon-allow-overlap") !== "never" || a.get("text-ignore-placement") || a.get("icon-ignore-placement"), this.sortFeaturesByKey = p !== "viewport-y" && !c.isConstant(), this.sortFeaturesByY = (p === "viewport-y" || p === "auto" && !this.sortFeaturesByKey) && this.canOverlap, a.get("symbol-placement") === "point" && (this.writingModes = a.get("text-writing-mode").map((f => T.ao[f]))), this.stateDependentLayerIds = this.layers.filter((f => f.isStateDependent())).map((f => f.id)), this.sourceID = t.sourceID - } - createArrays() { - this.text = new Zp(new ia(this.layers, this.zoom, (t => /^text/.test(t)))), this.icon = new Zp(new ia(this.layers, this.zoom, (t => /^icon/.test(t)))), this.glyphOffsetArray = new re, this.lineVertexArray = new se, this.symbolInstances = new J, this.textAnchorOffsets = new ue - } - calculateGlyphDependencies(t, r, a, c, p) { - for (let f = 0; f < t.length; f++) - if (r[t.charCodeAt(f)] = !0, (a || c) && p) { - const g = du[t.charAt(f)]; - g && (r[g.charCodeAt(0)] = !0) - } - } - populate(t, r, a) { - const c = this.layers[0], - p = c.layout, - f = p.get("text-font"), - g = p.get("text-field"), - v = p.get("icon-image"), - S = (g.value.kind !== "constant" || g.value.value instanceof ln && !g.value.value.isEmpty() || g.value.value.toString().length > 0) && (f.value.kind !== "constant" || f.value.value.length > 0), - I = v.value.kind !== "constant" || !!v.value.value || Object.keys(v.parameters).length > 0, - E = p.get("symbol-sort-key"); - if (this.features = [], !S && !I) return; - const R = r.iconDependencies, - N = r.glyphDependencies, - j = r.availableImages, - Z = new Oi(this.zoom, { - globalState: this.globalState - }); - for (const { - feature: Y, - id: ae, - index: ze, - sourceLayerIndex: me - } - of t) { - const be = c._featureFilter.needGeometry, - Ve = Wa(Y, be); - if (!c._featureFilter.filter(Z, Ve, a)) continue; - let rt, St; - if (be || (Ve.geometry = cs(Y)), S) { - const Bt = c.getValueAndResolveTokens("text-field", Ve, a, j), - Ut = ln.factory(Bt), - pr = this.hasRTLText = this.hasRTLText || ty(Ut); - (!pr || Ca.getRTLTextPluginStatus() === "unavailable" || pr && Ca.isParsed()) && (rt = z0(Ut, c, Ve)) - } - if (I) { - const Bt = c.getValueAndResolveTokens("icon-image", Ve, a, j); - St = Bt instanceof Nn ? Bt : Nn.fromString(Bt) - } - if (!rt && !St) continue; - const $t = this.sortFeaturesByKey ? E.evaluate(Ve, {}, a) : void 0; - if (this.features.push({ - id: ae, - text: rt, - icon: St, - index: ze, - sourceLayerIndex: me, - geometry: Ve.geometry, - properties: Y.properties, - type: Bl.types[Y.type], - sortKey: $t - }), St && (R[St.name] = !0), rt) { - const Bt = f.evaluate(Ve, {}, a).join(","), - Ut = p.get("text-rotation-alignment") !== "viewport" && p.get("symbol-placement") !== "point"; - this.allowVerticalPlacement = this.writingModes && this.writingModes.indexOf(T.ao.vertical) >= 0; - for (const pr of rt.sections) - if (pr.image) R[pr.image.name] = !0; - else { - const Vt = wl(rt.toString()), - Zt = pr.fontStack || Bt, - mt = N[Zt] = N[Zt] || {}; - this.calculateGlyphDependencies(pr.text, mt, Ut, this.allowVerticalPlacement, Vt) - } - } - } - p.get("symbol-placement") === "line" && (this.features = (function(Y) { - const ae = {}, - ze = {}, - me = []; - let be = 0; - - function Ve(Bt) { - me.push(Y[Bt]), be++ - } - - function rt(Bt, Ut, pr) { - const Vt = ze[Bt]; - return delete ze[Bt], ze[Ut] = Vt, me[Vt].geometry[0].pop(), me[Vt].geometry[0] = me[Vt].geometry[0].concat(pr[0]), Vt - } - - function St(Bt, Ut, pr) { - const Vt = ae[Ut]; - return delete ae[Ut], ae[Bt] = Vt, me[Vt].geometry[0].shift(), me[Vt].geometry[0] = pr[0].concat(me[Vt].geometry[0]), Vt - } - - function $t(Bt, Ut, pr) { - const Vt = pr ? Ut[0][Ut[0].length - 1] : Ut[0][0]; - return `${Bt}:${Vt.x}:${Vt.y}` - } - for (let Bt = 0; Bt < Y.length; Bt++) { - const Ut = Y[Bt], - pr = Ut.geometry, - Vt = Ut.text ? Ut.text.toString() : null; - if (!Vt) { - Ve(Bt); - continue - } - const Zt = $t(Vt, pr), - mt = $t(Vt, pr, !0); - if (Zt in ze && mt in ae && ze[Zt] !== ae[mt]) { - const Br = St(Zt, mt, pr), - Ur = rt(Zt, mt, me[Br].geometry); - delete ae[Zt], delete ze[mt], ze[$t(Vt, me[Ur].geometry, !0)] = Ur, me[Br].geometry = null - } else Zt in ze ? rt(Zt, mt, pr) : mt in ae ? St(Zt, mt, pr) : (Ve(Bt), ae[Zt] = be - 1, ze[mt] = be - 1) - } - return me.filter((Bt => Bt.geometry)) - })(this.features)), this.sortFeaturesByKey && this.features.sort(((Y, ae) => Y.sortKey - ae.sortKey)) - } - update(t, r, a) { - this.stateDependentLayers.length && (this.text.programConfigurations.updatePaintArrays(t, r, this.layers, a), this.icon.programConfigurations.updatePaintArrays(t, r, this.layers, a)) - } - 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, r) { - const a = this.lineVertexArray.length; - if (t.segment !== void 0) { - let c = t.dist(r[t.segment + 1]), - p = t.dist(r[t.segment]); - const f = {}; - for (let g = t.segment + 1; g < r.length; g++) f[g] = { - x: r[g].x, - y: r[g].y, - tileUnitDistanceFromAnchor: c - }, g < r.length - 1 && (c += r[g + 1].dist(r[g])); - for (let g = t.segment || 0; g >= 0; g--) f[g] = { - x: r[g].x, - y: r[g].y, - tileUnitDistanceFromAnchor: p - }, g > 0 && (p += r[g - 1].dist(r[g])); - for (let g = 0; g < r.length; g++) { - const v = f[g]; - this.lineVertexArray.emplaceBack(v.x, v.y, v.tileUnitDistanceFromAnchor) - } - } - return { - lineStartIndex: a, - lineLength: this.lineVertexArray.length - a - } - } - addSymbols(t, r, a, c, p, f, g, v, S, I, E, R) { - const N = t.indexArray, - j = t.layoutVertexArray, - Z = t.segments.prepareSegment(4 * r.length, j, N, this.canOverlap ? f.sortKey : void 0), - Y = this.glyphOffsetArray.length, - ae = Z.vertexLength, - ze = this.allowVerticalPlacement && g === T.ao.vertical ? Math.PI / 2 : 0, - me = f.text && f.text.sections; - for (let be = 0; be < r.length; be++) { - const { - tl: Ve, - tr: rt, - bl: St, - br: $t, - tex: Bt, - pixelOffsetTL: Ut, - pixelOffsetBR: pr, - minFontScaleX: Vt, - minFontScaleY: Zt, - glyphOffset: mt, - isSDF: Br, - sectionIndex: Ur - } = r[be], xr = Z.vertexLength, or = mt[1]; - pd(j, v.x, v.y, Ve.x, or + Ve.y, Bt.x, Bt.y, a, Br, Ut.x, Ut.y, Vt, Zt), pd(j, v.x, v.y, rt.x, or + rt.y, Bt.x + Bt.w, Bt.y, a, Br, pr.x, Ut.y, Vt, Zt), pd(j, v.x, v.y, St.x, or + St.y, Bt.x, Bt.y + Bt.h, a, Br, Ut.x, pr.y, Vt, Zt), pd(j, v.x, v.y, $t.x, or + $t.y, Bt.x + Bt.w, Bt.y + Bt.h, a, Br, pr.x, pr.y, Vt, Zt), Up(t.dynamicLayoutVertexArray, v, ze), N.emplaceBack(xr, xr + 2, xr + 1), N.emplaceBack(xr + 1, xr + 2, xr + 3), Z.vertexLength += 4, Z.primitiveLength += 2, this.glyphOffsetArray.emplaceBack(mt[0]), be !== r.length - 1 && Ur === r[be + 1].sectionIndex || t.programConfigurations.populatePaintArrays(j.length, f, f.index, {}, R, me && me[Ur]) - } - t.placedSymbolArray.emplaceBack(v.x, v.y, Y, this.glyphOffsetArray.length - Y, ae, S, I, v.segment, a ? a[0] : 0, a ? a[1] : 0, c[0], c[1], g, 0, !1, 0, E) - } - _addCollisionDebugVertex(t, r, a, c, p, f) { - return r.emplaceBack(0, 0), t.emplaceBack(a.x, a.y, c, p, Math.round(f.x), Math.round(f.y)) - } - addCollisionDebugVertices(t, r, a, c, p, f, g) { - const v = p.segments.prepareSegment(4, p.layoutVertexArray, p.indexArray), - S = v.vertexLength, - I = p.layoutVertexArray, - E = p.collisionVertexArray, - R = g.anchorX, - N = g.anchorY; - this._addCollisionDebugVertex(I, E, f, R, N, new $(t, r)), this._addCollisionDebugVertex(I, E, f, R, N, new $(a, r)), this._addCollisionDebugVertex(I, E, f, R, N, new $(a, c)), this._addCollisionDebugVertex(I, E, f, R, N, new $(t, c)), v.vertexLength += 4; - const j = p.indexArray; - j.emplaceBack(S, S + 1), j.emplaceBack(S + 1, S + 2), j.emplaceBack(S + 2, S + 3), j.emplaceBack(S + 3, S), v.primitiveLength += 4 - } - addDebugCollisionBoxes(t, r, a, c) { - for (let p = t; p < r; p++) { - const f = this.collisionBoxArray.get(p); - this.addCollisionDebugVertices(f.x1, f.y1, f.x2, f.y2, c ? this.textCollisionBox : this.iconCollisionBox, f.anchorPoint, a) - } - } - generateCollisionDebugBuffers() { - this.hasDebugData() && this.destroyDebugData(), this.textCollisionBox = new $p(Xr, a_.members, Pi), this.iconCollisionBox = new $p(Xr, a_.members, Pi); - for (let t = 0; t < this.symbolInstances.length; t++) { - const r = this.symbolInstances.get(t); - this.addDebugCollisionBoxes(r.textBoxStartIndex, r.textBoxEndIndex, r, !0), this.addDebugCollisionBoxes(r.verticalTextBoxStartIndex, r.verticalTextBoxEndIndex, r, !0), this.addDebugCollisionBoxes(r.iconBoxStartIndex, r.iconBoxEndIndex, r, !1), this.addDebugCollisionBoxes(r.verticalIconBoxStartIndex, r.verticalIconBoxEndIndex, r, !1) - } - } - _deserializeCollisionBoxesForSymbol(t, r, a, c, p, f, g, v, S) { - const I = {}; - for (let E = r; E < a; E++) { - const R = t.get(E); - I.textBox = { - x1: R.x1, - y1: R.y1, - x2: R.x2, - y2: R.y2, - anchorPointX: R.anchorPointX, - anchorPointY: R.anchorPointY - }, I.textFeatureIndex = R.featureIndex; - break - } - for (let E = c; E < p; E++) { - const R = t.get(E); - I.verticalTextBox = { - x1: R.x1, - y1: R.y1, - x2: R.x2, - y2: R.y2, - anchorPointX: R.anchorPointX, - anchorPointY: R.anchorPointY - }, I.verticalTextFeatureIndex = R.featureIndex; - break - } - for (let E = f; E < g; E++) { - const R = t.get(E); - I.iconBox = { - x1: R.x1, - y1: R.y1, - x2: R.x2, - y2: R.y2, - anchorPointX: R.anchorPointX, - anchorPointY: R.anchorPointY - }, I.iconFeatureIndex = R.featureIndex; - break - } - for (let E = v; E < S; E++) { - const R = t.get(E); - I.verticalIconBox = { - x1: R.x1, - y1: R.y1, - x2: R.x2, - y2: R.y2, - anchorPointX: R.anchorPointX, - anchorPointY: R.anchorPointY - }, I.verticalIconFeatureIndex = R.featureIndex; - break - } - return I - } - deserializeCollisionBoxes(t) { - this.collisionArrays = []; - for (let r = 0; r < this.symbolInstances.length; r++) { - const a = this.symbolInstances.get(r); - this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t, a.textBoxStartIndex, a.textBoxEndIndex, a.verticalTextBoxStartIndex, a.verticalTextBoxEndIndex, a.iconBoxStartIndex, a.iconBoxEndIndex, a.verticalIconBoxStartIndex, a.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, r) { - const a = t.placedSymbolArray.get(r), - c = a.vertexStartIndex + 4 * a.numGlyphs; - for (let p = a.vertexStartIndex; p < c; p += 4) t.indexArray.emplaceBack(p, p + 2, p + 1), t.indexArray.emplaceBack(p + 1, p + 2, p + 3) - } - getSortedSymbolIndexes(t) { - if (this.sortedAngle === t && this.symbolInstanceIndexes !== void 0) return this.symbolInstanceIndexes; - const r = Math.sin(t), - a = Math.cos(t), - c = [], - p = [], - f = []; - for (let g = 0; g < this.symbolInstances.length; ++g) { - f.push(g); - const v = this.symbolInstances.get(g); - c.push(0 | Math.round(r * v.anchorX + a * v.anchorY)), p.push(v.featureIndex) - } - return f.sort(((g, v) => c[g] - c[v] || p[v] - p[g])), f - } - addToSortKeyRanges(t, r) { - const a = this.sortKeyRanges[this.sortKeyRanges.length - 1]; - a && a.sortKey === r ? a.symbolInstanceEnd = t + 1 : this.sortKeyRanges.push({ - sortKey: r, - 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 r of this.symbolInstanceIndexes) { - const a = this.symbolInstances.get(r); - this.featureSortOrder.push(a.featureIndex), [a.rightJustifiedTextSymbolIndex, a.centerJustifiedTextSymbolIndex, a.leftJustifiedTextSymbolIndex].forEach(((c, p, f) => { - c >= 0 && f.indexOf(c) === p && this.addIndicesForPlacedSymbol(this.text, c) - })), a.verticalPlacedTextSymbolIndex >= 0 && this.addIndicesForPlacedSymbol(this.text, a.verticalPlacedTextSymbolIndex), a.placedIconSymbolIndex >= 0 && this.addIndicesForPlacedSymbol(this.icon, a.placedIconSymbolIndex), a.verticalPlacedIconSymbolIndex >= 0 && this.addIndicesForPlacedSymbol(this.icon, a.verticalPlacedIconSymbolIndex) - } - this.text.indexBuffer && this.text.indexBuffer.updateData(this.text.indexArray), this.icon.indexBuffer && this.icon.indexBuffer.updateData(this.icon.indexArray) - } - } - } - let y_, x_; - Kt("SymbolBucket", Nl, { - omit: ["layers", "collisionBoxArray", "features", "compareText"] - }), Nl.MAX_GLYPHS = 65535, Nl.addDynamicAttributes = Up; - var Gp = { - get paint() { - return x_ = x_ || new jn({ - "icon-opacity": new Rr(xe.paint_symbol["icon-opacity"]), - "icon-color": new Rr(xe.paint_symbol["icon-color"]), - "icon-halo-color": new Rr(xe.paint_symbol["icon-halo-color"]), - "icon-halo-width": new Rr(xe.paint_symbol["icon-halo-width"]), - "icon-halo-blur": new Rr(xe.paint_symbol["icon-halo-blur"]), - "icon-translate": new hr(xe.paint_symbol["icon-translate"]), - "icon-translate-anchor": new hr(xe.paint_symbol["icon-translate-anchor"]), - "text-opacity": new Rr(xe.paint_symbol["text-opacity"]), - "text-color": new Rr(xe.paint_symbol["text-color"], { - runtimeType: Dr, - getOverride: i => i.textColor, - hasOverride: i => !!i.textColor - }), - "text-halo-color": new Rr(xe.paint_symbol["text-halo-color"]), - "text-halo-width": new Rr(xe.paint_symbol["text-halo-width"]), - "text-halo-blur": new Rr(xe.paint_symbol["text-halo-blur"]), - "text-translate": new hr(xe.paint_symbol["text-translate"]), - "text-translate-anchor": new hr(xe.paint_symbol["text-translate-anchor"]) - }) - }, - get layout() { - return y_ = y_ || new jn({ - "symbol-placement": new hr(xe.layout_symbol["symbol-placement"]), - "symbol-spacing": new hr(xe.layout_symbol["symbol-spacing"]), - "symbol-avoid-edges": new hr(xe.layout_symbol["symbol-avoid-edges"]), - "symbol-sort-key": new Rr(xe.layout_symbol["symbol-sort-key"]), - "symbol-z-order": new hr(xe.layout_symbol["symbol-z-order"]), - "icon-allow-overlap": new hr(xe.layout_symbol["icon-allow-overlap"]), - "icon-overlap": new hr(xe.layout_symbol["icon-overlap"]), - "icon-ignore-placement": new hr(xe.layout_symbol["icon-ignore-placement"]), - "icon-optional": new hr(xe.layout_symbol["icon-optional"]), - "icon-rotation-alignment": new hr(xe.layout_symbol["icon-rotation-alignment"]), - "icon-size": new Rr(xe.layout_symbol["icon-size"]), - "icon-text-fit": new hr(xe.layout_symbol["icon-text-fit"]), - "icon-text-fit-padding": new hr(xe.layout_symbol["icon-text-fit-padding"]), - "icon-image": new Rr(xe.layout_symbol["icon-image"]), - "icon-rotate": new Rr(xe.layout_symbol["icon-rotate"]), - "icon-padding": new Rr(xe.layout_symbol["icon-padding"]), - "icon-keep-upright": new hr(xe.layout_symbol["icon-keep-upright"]), - "icon-offset": new Rr(xe.layout_symbol["icon-offset"]), - "icon-anchor": new Rr(xe.layout_symbol["icon-anchor"]), - "icon-pitch-alignment": new hr(xe.layout_symbol["icon-pitch-alignment"]), - "text-pitch-alignment": new hr(xe.layout_symbol["text-pitch-alignment"]), - "text-rotation-alignment": new hr(xe.layout_symbol["text-rotation-alignment"]), - "text-field": new Rr(xe.layout_symbol["text-field"]), - "text-font": new Rr(xe.layout_symbol["text-font"]), - "text-size": new Rr(xe.layout_symbol["text-size"]), - "text-max-width": new Rr(xe.layout_symbol["text-max-width"]), - "text-line-height": new hr(xe.layout_symbol["text-line-height"]), - "text-letter-spacing": new Rr(xe.layout_symbol["text-letter-spacing"]), - "text-justify": new Rr(xe.layout_symbol["text-justify"]), - "text-radial-offset": new Rr(xe.layout_symbol["text-radial-offset"]), - "text-variable-anchor": new hr(xe.layout_symbol["text-variable-anchor"]), - "text-variable-anchor-offset": new Rr(xe.layout_symbol["text-variable-anchor-offset"]), - "text-anchor": new Rr(xe.layout_symbol["text-anchor"]), - "text-max-angle": new hr(xe.layout_symbol["text-max-angle"]), - "text-writing-mode": new hr(xe.layout_symbol["text-writing-mode"]), - "text-rotate": new Rr(xe.layout_symbol["text-rotate"]), - "text-padding": new hr(xe.layout_symbol["text-padding"]), - "text-keep-upright": new hr(xe.layout_symbol["text-keep-upright"]), - "text-transform": new Rr(xe.layout_symbol["text-transform"]), - "text-offset": new Rr(xe.layout_symbol["text-offset"]), - "text-allow-overlap": new hr(xe.layout_symbol["text-allow-overlap"]), - "text-overlap": new hr(xe.layout_symbol["text-overlap"]), - "text-ignore-placement": new hr(xe.layout_symbol["text-ignore-placement"]), - "text-optional": new hr(xe.layout_symbol["text-optional"]) - }) - } - }; - class b_ { - 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 : Mt, this.defaultValue = t - } - evaluate(t) { - if (t.formattedSection) { - const r = this.defaultValue.property.overrides; - if (r && r.hasOverride(t.formattedSection)) return r.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 - } - } - Kt("FormatSectionOverride", b_, { - omit: ["defaultValue"] - }); - class fd extends ha { - constructor(t) { - super(t, Gp) - } - recalculate(t, r) { - if (super.recalculate(t, r), 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 a = this.layout.get("text-writing-mode"); - if (a) { - const c = []; - for (const p of a) c.indexOf(p) < 0 && c.push(p); - this.layout._values["text-writing-mode"] = c - } else this.layout._values["text-writing-mode"] = ["horizontal"] - } - this._setPaintOverrides() - } - getValueAndResolveTokens(t, r, a, c) { - const p = this.layout.get(t).evaluate(r, {}, a, c), - f = this._unevaluatedLayout._values[t]; - return f.isDataDriven() || fl(f.value) || !p ? p : (function(g, v) { - return v.replace(/{([^{}]+)}/g, ((S, I) => g && I in g ? String(g[I]) : "")) - })(r.properties, p) - } - createBucket(t) { - return new Nl(t) - } - queryRadius() { - return 0 - } - queryIntersectsFeature() { - throw new Error("Should take a different path in FeatureIndex") - } - _setPaintOverrides() { - for (const t of Gp.paint.overridableProperties) { - if (!fd.hasPaintOverride(this.layout, t)) continue; - const r = this.paint.get(t), - a = new b_(r), - c = new Lc(a, r.property.specification); - let p = null; - p = r.value.kind === "constant" || r.value.kind === "source" ? new So("source", c) : new Dc("composite", c, r.value.zoomStops), this.paint._values[t] = new Na(r.property, p, r.parameters) - } - } - _handleOverridablePaintPropertyUpdate(t, r, a) { - return !(!this.layout || r.isDataDriven() || a.isDataDriven()) && fd.hasPaintOverride(this.layout, t) - } - static hasPaintOverride(t, r) { - const a = t.get("text-field"), - c = Gp.paint.properties[r]; - let p = !1; - const f = g => { - for (const v of g) - if (c.overrides && c.overrides.hasOverride(v)) return void(p = !0) - }; - if (a.value.kind === "constant" && a.value.value instanceof ln) f(a.value.value.sections); - else if (a.value.kind === "source") { - const g = S => { - p || (S instanceof ga && wr(S.value) === Si ? f(S.value.sections) : S instanceof ms ? f(S.sections) : S.eachChild(g)) - }, - v = a.value; - v._styleExpression && g(v._styleExpression.expression) - } - return p - } - } - let w_; - var ry = { - get paint() { - return w_ = w_ || new jn({ - "background-color": new hr(xe.paint_background["background-color"]), - "background-pattern": new ns(xe.paint_background["background-pattern"]), - "background-opacity": new hr(xe.paint_background["background-opacity"]) - }) - } - }; - class iy extends ha { - constructor(t) { - super(t, ry) - } - } - let T_; - var ny = { - get paint() { - return T_ = T_ || new jn({ - "raster-opacity": new hr(xe.paint_raster["raster-opacity"]), - "raster-hue-rotate": new hr(xe.paint_raster["raster-hue-rotate"]), - "raster-brightness-min": new hr(xe.paint_raster["raster-brightness-min"]), - "raster-brightness-max": new hr(xe.paint_raster["raster-brightness-max"]), - "raster-saturation": new hr(xe.paint_raster["raster-saturation"]), - "raster-contrast": new hr(xe.paint_raster["raster-contrast"]), - "raster-resampling": new hr(xe.paint_raster["raster-resampling"]), - "raster-fade-duration": new hr(xe.paint_raster["raster-fade-duration"]) - }) - } - }; - class ay extends ha { - constructor(t) { - super(t, ny) - } - } - class sy extends ha { - constructor(t) { - super(t, {}), this.onAdd = r => { - this.implementation.onAdd && this.implementation.onAdd(r, r.painter.context.gl) - }, this.onRemove = r => { - this.implementation.onRemove && this.implementation.onRemove(r, r.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 oy { - constructor(t) { - this._methodToThrottle = t, this._triggered = !1, typeof MessageChannel < "u" && (this._channel = new MessageChannel, this._channel.port2.onmessage = () => { - this._triggered = !1, this._methodToThrottle() - }) - } - trigger() { - this._triggered || (this._triggered = !0, this._channel ? this._channel.port1.postMessage(!0) : setTimeout((() => { - this._triggered = !1, this._methodToThrottle() - }), 0)) - } - remove() { - delete this._channel, this._methodToThrottle = () => {} - } - } - const ly = { - once: !0 - }, - Hp = 63710088e-1; - class ro { - constructor(t, r) { - if (isNaN(t) || isNaN(r)) throw new Error(`Invalid LngLat object: (${t}, ${r})`); - if (this.lng = +t, this.lat = +r, this.lat > 90 || this.lat < -90) throw new Error("Invalid LngLat latitude value: must be between -90 and 90") - } - wrap() { - return new ro(tt(this.lng, -180, 180), this.lat) - } - toArray() { - return [this.lng, this.lat] - } - toString() { - return `LngLat(${this.lng}, ${this.lat})` - } - distanceTo(t) { - const r = Math.PI / 180, - a = this.lat * r, - c = t.lat * r, - p = Math.sin(a) * Math.sin(c) + Math.cos(a) * Math.cos(c) * Math.cos((t.lng - this.lng) * r); - return Hp * Math.acos(Math.min(p, 1)) - } - static convert(t) { - if (t instanceof ro) return t; - if (Array.isArray(t) && (t.length === 2 || t.length === 3)) return new ro(Number(t[0]), Number(t[1])); - if (!Array.isArray(t) && typeof t == "object" && t !== null) return new ro(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: , lat: }, an object {lon: , lat: }, or an array of [, ]") - } - } - const C_ = 2 * Math.PI * Hp; - - function S_(i) { - return C_ * Math.cos(i * Math.PI / 180) - } - - function P_(i) { - return (180 + i) / 360 - } - - function I_(i) { - return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + i * Math.PI / 360))) / 360 - } - - function M_(i, t) { - return i / S_(t) - } - - function Wp(i) { - return 360 / Math.PI * Math.atan(Math.exp((180 - 360 * i) * Math.PI / 180)) - 90 - } - - function A_(i, t) { - return i * S_(Wp(t)) - } - class fu { - constructor(t, r, a = 0) { - this.x = +t, this.y = +r, this.z = +a - } - static fromLngLat(t, r = 0) { - const a = ro.convert(t); - return new fu(P_(a.lng), I_(a.lat), M_(r, a.lat)) - } - toLngLat() { - return new ro(360 * this.x - 180, Wp(this.y)) - } - toAltitude() { - return A_(this.z, this.y) - } - meterInMercatorCoordinateUnits() { - return 1 / C_ * (t = Wp(this.y), 1 / Math.cos(t * Math.PI / 180)); - var t - } - } - - function k_(i, t, r) { - var a = 2 * Math.PI * 6378137 / 256 / Math.pow(2, r); - return [i * a - 2 * Math.PI * 6378137 / 2, t * a - 2 * Math.PI * 6378137 / 2] - } - class Xp { - constructor(t, r, a) { - if (!(function(c, p, f) { - return !(c < 0 || c > 25 || f < 0 || f >= Math.pow(2, c) || p < 0 || p >= Math.pow(2, c)) - })(t, r, a)) throw new Error(`x=${r}, y=${a}, 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 = r, this.y = a, this.key = jl(0, t, t, r, a) - } - equals(t) { - return this.z === t.z && this.x === t.x && this.y === t.y - } - url(t, r, a) { - const c = (f = this.y, g = this.z, v = k_(256 * (p = this.x), 256 * (f = Math.pow(2, g) - f - 1), g), S = k_(256 * (p + 1), 256 * (f + 1), g), v[0] + "," + v[1] + "," + S[0] + "," + S[1]); - var p, f, g, v, S; - const I = (function(E, R, N) { - let j, Z = ""; - for (let Y = E; Y > 0; Y--) j = 1 << Y - 1, Z += (R & j ? 1 : 0) + (N & j ? 2 : 0); - return Z - })(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(a === "tms" ? Math.pow(2, this.z) - this.y - 1 : this.y)).replace(/{ratio}/g, r > 1 ? "@2x" : "").replace(/{quadkey}/g, I).replace(/{bbox-epsg-3857}/g, c) - } - isChildOf(t) { - const r = this.z - t.z; - return r > 0 && t.x === this.x >> r && t.y === this.y >> r - } - getTilePoint(t) { - const r = Math.pow(2, this.z); - return new $((t.x * r - this.x) * ne, (t.y * r - this.y) * ne) - } - toString() { - return `${this.z}/${this.x}/${this.y}` - } - } - class E_ { - constructor(t, r) { - this.wrap = t, this.canonical = r, this.key = jl(t, r.z, r.z, r.x, r.y) - } - } - class Ma { - constructor(t, r, a, c, p) { - if (this.terrainRttPosMatrix32f = null, t < a) throw new Error(`overscaledZ should be >= z; overscaledZ = ${t}; z = ${a}`); - this.overscaledZ = t, this.wrap = r, this.canonical = new Xp(a, +c, +p), this.key = jl(r, t, a, c, p) - } - clone() { - return new Ma(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 r = this.canonical.z - t; - return t > this.canonical.z ? new Ma(t, this.wrap, this.canonical.z, this.canonical.x, this.canonical.y) : new Ma(t, this.wrap, t, this.canonical.x >> r, this.canonical.y >> r) - } - calculateScaledKey(t, r) { - if (t > this.overscaledZ) throw new Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`); - const a = this.canonical.z - t; - return t > this.canonical.z ? jl(this.wrap * +r, t, this.canonical.z, this.canonical.x, this.canonical.y) : jl(this.wrap * +r, t, t, this.canonical.x >> a, this.canonical.y >> a) - } - isChildOf(t) { - if (t.wrap !== this.wrap) return !1; - const r = this.canonical.z - t.canonical.z; - return t.overscaledZ === 0 || t.overscaledZ < this.overscaledZ && t.canonical.x === this.canonical.x >> r && t.canonical.y === this.canonical.y >> r - } - children(t) { - if (this.overscaledZ >= t) return [new Ma(this.overscaledZ + 1, this.wrap, this.canonical.z, this.canonical.x, this.canonical.y)]; - const r = this.canonical.z + 1, - a = 2 * this.canonical.x, - c = 2 * this.canonical.y; - return [new Ma(r, this.wrap, r, a, c), new Ma(r, this.wrap, r, a + 1, c), new Ma(r, this.wrap, r, a, c + 1), new Ma(r, this.wrap, r, a + 1, c + 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 Ma(this.overscaledZ, 0, this.canonical.z, this.canonical.x, this.canonical.y) - } - unwrapTo(t) { - return new Ma(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 E_(this.wrap, this.canonical) - } - toString() { - return `${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}` - } - getTilePoint(t) { - return this.canonical.getTilePoint(new fu(t.x - this.wrap, t.y)) - } - } - - function jl(i, t, r, a, c) { - (i *= 2) < 0 && (i = -1 * i - 1); - const p = 1 << r; - return (p * p * i + p * c + a).toString(36) + r.toString(36) + t.toString(36) - } - - function mu(i, t) { - return t ? i.properties[t] : i.id - } - Kt("CanonicalTileID", Xp), Kt("OverscaledTileID", Ma, { - omit: ["terrainRttPosMatrix32f"] - }); - class Oo { - 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 r = new Oo; - return r.extend(t(new $(this.minX, this.minY))), r.extend(t(new $(this.maxX, this.minY))), r.extend(t(new $(this.minX, this.maxY))), r.extend(t(new $(this.maxX, this.maxY))), r - } - static fromPoints(t) { - const r = new Oo; - for (const a of t) r.extend(a); - return r - } - 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 z_ { - constructor(t) { - this._stringToNumber = {}, this._numberToString = []; - for (let r = 0; r < t.length; r++) { - const a = t[r]; - this._stringToNumber[a] = r, this._numberToString[r] = a - } - } - 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 L_ { - constructor(t, r, a, c, p) { - this.type = "Feature", this._vectorTileFeature = t, t._z = r, t._x = a, t._y = c, this.properties = t.properties, this.id = p - } - get geometry() { - return this._geometry === void 0 && (this._geometry = this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x, this._vectorTileFeature._y, this._vectorTileFeature._z).geometry), this._geometry - } - set geometry(t) { - this._geometry = t - } - toJSON() { - const t = { - geometry: this.geometry - }; - for (const r in this) r !== "_geometry" && r !== "_vectorTileFeature" && (t[r] = this[r]); - return t - } - } - class D_ { - constructor(t, r) { - this.tileID = t, this.x = t.canonical.x, this.y = t.canonical.y, this.z = t.canonical.z, this.grid = new zo(ne, 16, 0), this.grid3D = new zo(ne, 16, 0), this.featureIndexArray = new Te, this.promoteId = r - } - insert(t, r, a, c, p, f) { - const g = this.featureIndexArray.length; - this.featureIndexArray.emplaceBack(a, c, p); - const v = f ? this.grid3D : this.grid; - for (let S = 0; S < r.length; S++) { - const I = r[S], - E = [1 / 0, 1 / 0, -1 / 0, -1 / 0]; - for (let R = 0; R < I.length; R++) { - const N = I[R]; - E[0] = Math.min(E[0], N.x), E[1] = Math.min(E[1], N.y), E[2] = Math.max(E[2], N.x), E[3] = Math.max(E[3], N.y) - } - E[0] < ne && E[1] < ne && E[2] >= 0 && E[3] >= 0 && v.insert(g, E[0], E[1], E[2], E[3]) - } - } - loadVTLayers() { - return this.vtLayers || (this.vtLayers = new Km(new Op(this.rawTileData)).layers, this.sourceLayerCoder = new z_(this.vtLayers ? Object.keys(this.vtLayers).sort() : ["_geojsonTileLayer"])), this.vtLayers - } - query(t, r, a, c) { - this.loadVTLayers(); - const p = t.params, - f = ne / t.tileSize / t.scale, - g = bs(p.filter), - v = t.queryGeometry, - S = t.queryPadding * f, - I = Oo.fromPoints(v), - E = this.grid.query(I.minX - S, I.minY - S, I.maxX + S, I.maxY + S), - R = Oo.fromPoints(t.cameraQueryGeometry).expandBy(S), - N = this.grid3D.query(R.minX, R.minY, R.maxX, R.maxY, ((Y, ae, ze, me) => (function(be, Ve, rt, St, $t) { - for (const Ut of be) - if (Ve <= Ut.x && rt <= Ut.y && St >= Ut.x && $t >= Ut.y) return !0; - const Bt = [new $(Ve, rt), new $(Ve, $t), new $(St, $t), new $(St, rt)]; - if (be.length > 2) { - for (const Ut of Bt) - if (zl(be, Ut)) return !0 - } - for (let Ut = 0; Ut < be.length - 1; Ut++) - if (jv(be[Ut], be[Ut + 1], Bt)) return !0; - return !1 - })(t.cameraQueryGeometry, Y - S, ae - S, ze + S, me + S))); - for (const Y of N) E.push(Y); - E.sort(cy); - const j = {}; - let Z; - for (let Y = 0; Y < E.length; Y++) { - const ae = E[Y]; - if (ae === Z) continue; - Z = ae; - const ze = this.featureIndexArray.get(ae); - let me = null; - this.loadMatchingFeature(j, ze.bucketIndex, ze.sourceLayerIndex, ze.featureIndex, g, p.layers, p.availableImages, r, a, c, ((be, Ve, rt) => (me || (me = cs(be)), Ve.queryIntersectsFeature({ - queryGeometry: v, - feature: be, - featureState: rt, - geometry: me, - zoom: this.z, - transform: t.transform, - pixelsToTileUnits: f, - pixelPosMatrix: t.pixelPosMatrix, - unwrappedTileID: this.tileID.toUnwrapped(), - getElevation: t.getElevation - })))) - } - return j - } - loadMatchingFeature(t, r, a, c, p, f, g, v, S, I, E) { - const R = this.bucketLayerIDs[r]; - if (f && !R.some((Y => f.has(Y)))) return; - const N = this.sourceLayerCoder.decode(a), - j = this.vtLayers[N].feature(c); - if (p.needGeometry) { - const Y = Wa(j, !0); - if (!p.filter(new Oi(this.tileID.overscaledZ), Y, this.tileID.canonical)) return - } else if (!p.filter(new Oi(this.tileID.overscaledZ), j)) return; - const Z = this.getId(j, N); - for (let Y = 0; Y < R.length; Y++) { - const ae = R[Y]; - if (f && !f.has(ae)) continue; - const ze = v[ae]; - if (!ze) continue; - let me = {}; - Z && I && (me = I.getState(ze.sourceLayer || "_geojsonTileLayer", Z)); - const be = pt({}, S[ae]); - be.paint = R_(be.paint, ze.paint, j, me, g), be.layout = R_(be.layout, ze.layout, j, me, g); - const Ve = !E || E(j, ze, me); - if (!Ve) continue; - const rt = new L_(j, this.z, this.x, this.y, Z); - rt.layer = be; - let St = t[ae]; - St === void 0 && (St = t[ae] = []), St.push({ - featureIndex: c, - feature: rt, - intersectionZ: Ve - }) - } - } - lookupSymbolFeatures(t, r, a, c, p, f, g, v) { - const S = {}; - this.loadVTLayers(); - const I = bs(p); - for (const E of t) this.loadMatchingFeature(S, a, c, E, I, f, g, v, r); - return S - } - hasLayer(t) { - for (const r of this.bucketLayerIDs) - for (const a of r) - if (t === a) return !0; - return !1 - } - getId(t, r) { - var a; - let c = t.id; - return this.promoteId && (c = t.properties[typeof this.promoteId == "string" ? this.promoteId : this.promoteId[r]], typeof c == "boolean" && (c = Number(c)), c === void 0 && (!((a = t.properties) === null || a === void 0) && a.cluster) && this.promoteId && (c = Number(t.properties.cluster_id))), c - } - } - - function R_(i, t, r, a, c) { - return ut(i, ((p, f) => { - const g = t instanceof Cl ? t.get(f) : null; - return g && g.evaluate ? g.evaluate(r, a, c) : g - })) - } - - function cy(i, t) { - return t - i - } - - function B_(i, t, r, a, c) { - const p = []; - for (let f = 0; f < i.length; f++) { - const g = i[f]; - let v; - for (let S = 0; S < g.length - 1; S++) { - let I = g[S], - E = g[S + 1]; - I.x < t && E.x < t || (I.x < t ? I = new $(t, I.y + (t - I.x) / (E.x - I.x) * (E.y - I.y))._round() : E.x < t && (E = new $(t, I.y + (t - I.x) / (E.x - I.x) * (E.y - I.y))._round()), I.y < r && E.y < r || (I.y < r ? I = new $(I.x + (r - I.y) / (E.y - I.y) * (E.x - I.x), r)._round() : E.y < r && (E = new $(I.x + (r - I.y) / (E.y - I.y) * (E.x - I.x), r)._round()), I.x >= a && E.x >= a || (I.x >= a ? I = new $(a, I.y + (a - I.x) / (E.x - I.x) * (E.y - I.y))._round() : E.x >= a && (E = new $(a, I.y + (a - I.x) / (E.x - I.x) * (E.y - I.y))._round()), I.y >= c && E.y >= c || (I.y >= c ? I = new $(I.x + (c - I.y) / (E.y - I.y) * (E.x - I.x), c)._round() : E.y >= c && (E = new $(I.x + (c - I.y) / (E.y - I.y) * (E.x - I.x), c)._round()), v && I.equals(v[v.length - 1]) || (v = [I], p.push(v)), v.push(E))))) - } - } - return p - } - Kt("FeatureIndex", D_, { - omit: ["rawTileData", "sourceLayerCoder"] - }); - class io extends $ { - constructor(t, r, a, c) { - super(t, r), this.angle = a, c !== void 0 && (this.segment = c) - } - clone() { - return new io(this.x, this.y, this.angle, this.segment) - } - } - - function F_(i, t, r, a, c) { - if (t.segment === void 0 || r === 0) return !0; - let p = t, - f = t.segment + 1, - g = 0; - for (; g > -r / 2;) { - if (f--, f < 0) return !1; - g -= i[f].dist(p), p = i[f] - } - g += i[f].dist(i[f + 1]), f++; - const v = []; - let S = 0; - for (; g < r / 2;) { - const I = i[f], - E = i[f + 1]; - if (!E) return !1; - let R = i[f - 1].angleTo(I) - I.angleTo(E); - for (R = Math.abs((R + 3 * Math.PI) % (2 * Math.PI) - Math.PI), v.push({ - distance: g, - angleDelta: R - }), S += R; g - v[0].distance > a;) S -= v.shift().angleDelta; - if (S > c) return !1; - f++, g += I.dist(E) - } - return !0 - } - - function O_(i) { - let t = 0; - for (let r = 0; r < i.length - 1; r++) t += i[r].dist(i[r + 1]); - return t - } - - function N_(i, t, r) { - return i ? .6 * t * r : 0 - } - - function j_(i, t) { - return Math.max(i ? i.right - i.left : 0, t ? t.right - t.left : 0) - } - - function uy(i, t, r, a, c, p) { - const f = N_(r, c, p), - g = j_(r, a) * p; - let v = 0; - const S = O_(i) / 2; - for (let I = 0; I < i.length - 1; I++) { - const E = i[I], - R = i[I + 1], - N = E.dist(R); - if (v + N > S) { - const j = (S - v) / N, - Z = Fa.number(E.x, R.x, j), - Y = Fa.number(E.y, R.y, j), - ae = new io(Z, Y, R.angleTo(E), I); - return ae._round(), !f || F_(i, ae, g, f, t) ? ae : void 0 - } - v += N - } - } - - function hy(i, t, r, a, c, p, f, g, v) { - const S = N_(a, p, f), - I = j_(a, c), - E = I * f, - R = i[0].x === 0 || i[0].x === v || i[0].y === 0 || i[0].y === v; - return t - E < t / 4 && (t = E + t / 4), q_(i, R ? t / 2 * g % t : (I / 2 + 2 * p) * f * g % t, t, S, r, E, R, !1, v) - } - - function q_(i, t, r, a, c, p, f, g, v) { - const S = p / 2, - I = O_(i); - let E = 0, - R = t - r, - N = []; - for (let j = 0; j < i.length - 1; j++) { - const Z = i[j], - Y = i[j + 1], - ae = Z.dist(Y), - ze = Y.angleTo(Z); - for (; R + r < E + ae;) { - R += r; - const me = (R - E) / ae, - be = Fa.number(Z.x, Y.x, me), - Ve = Fa.number(Z.y, Y.y, me); - if (be >= 0 && be < v && Ve >= 0 && Ve < v && R - S >= 0 && R + S <= I) { - const rt = new io(be, Ve, ze, j); - rt._round(), a && !F_(i, rt, p, a, c) || N.push(rt) - } - } - E += ae - } - return g || N.length || f || (N = q_(i, E / 2, r, a, c, p, f, !0, v)), N - } - - function V_(i, t, r, a) { - const c = [], - p = i.image, - f = p.pixelRatio, - g = p.paddedRect.w - 2, - v = p.paddedRect.h - 2; - let S = { - x1: i.left, - y1: i.top, - x2: i.right, - y2: i.bottom - }; - const I = p.stretchX || [ - [0, g] - ], - E = p.stretchY || [ - [0, v] - ], - R = (mt, Br) => mt + Br[1] - Br[0], - N = I.reduce(R, 0), - j = E.reduce(R, 0), - Z = g - N, - Y = v - j; - let ae = 0, - ze = N, - me = 0, - be = j, - Ve = 0, - rt = Z, - St = 0, - $t = Y; - if (p.content && a) { - const mt = p.content, - Br = mt[2] - mt[0], - Ur = mt[3] - mt[1]; - (p.textFitWidth || p.textFitHeight) && (S = __(i)), ae = md(I, 0, mt[0]), me = md(E, 0, mt[1]), ze = md(I, mt[0], mt[2]), be = md(E, mt[1], mt[3]), Ve = mt[0] - ae, St = mt[1] - me, rt = Br - ze, $t = Ur - be - } - const Bt = S.x1, - Ut = S.y1, - pr = S.x2 - Bt, - Vt = S.y2 - Ut, - Zt = (mt, Br, Ur, xr) => { - const or = _d(mt.stretch - ae, ze, pr, Bt), - oi = gd(mt.fixed - Ve, rt, mt.stretch, N), - Zi = _d(Br.stretch - me, be, Vt, Ut), - fn = gd(Br.fixed - St, $t, Br.stretch, j), - Bn = _d(Ur.stretch - ae, ze, pr, Bt), - Aa = gd(Ur.fixed - Ve, rt, Ur.stretch, N), - aa = _d(xr.stretch - me, be, Vt, Ut), - Mn = gd(xr.fixed - St, $t, xr.stretch, j), - qi = new $(or, Zi), - wn = new $(Bn, Zi), - An = new $(Bn, aa), - kn = new $(or, aa), - Yn = new $(oi / f, fn / f), - ka = new $(Aa / f, Mn / f), - Tn = t * Math.PI / 180; - if (Tn) { - const Cn = Math.sin(Tn), - Sn = Math.cos(Tn), - rn = [Sn, -Cn, Cn, Sn]; - qi._matMult(rn), wn._matMult(rn), kn._matMult(rn), An._matMult(rn) - } - const sa = mt.stretch + mt.fixed, - mn = Br.stretch + Br.fixed; - return { - tl: qi, - tr: wn, - bl: kn, - br: An, - tex: { - x: p.paddedRect.x + 1 + sa, - y: p.paddedRect.y + 1 + mn, - w: Ur.stretch + Ur.fixed - sa, - h: xr.stretch + xr.fixed - mn - }, - writingMode: void 0, - glyphOffset: [0, 0], - sectionIndex: 0, - pixelOffsetTL: Yn, - pixelOffsetBR: ka, - minFontScaleX: rt / f / pr, - minFontScaleY: $t / f / Vt, - isSDF: r - } - }; - if (a && (p.stretchX || p.stretchY)) { - const mt = U_(I, Z, N), - Br = U_(E, Y, j); - for (let Ur = 0; Ur < mt.length - 1; Ur++) { - const xr = mt[Ur], - or = mt[Ur + 1]; - for (let oi = 0; oi < Br.length - 1; oi++) c.push(Zt(xr, Br[oi], or, Br[oi + 1])) - } - } else c.push(Zt({ - fixed: 0, - stretch: -1 - }, { - fixed: 0, - stretch: -1 - }, { - fixed: 0, - stretch: g + 1 - }, { - fixed: 0, - stretch: v + 1 - })); - return c - } - - function md(i, t, r) { - let a = 0; - for (const c of i) a += Math.max(t, Math.min(r, c[1])) - Math.max(t, Math.min(r, c[0])); - return a - } - - function U_(i, t, r) { - const a = [{ - fixed: -1, - stretch: 0 - }]; - for (const [c, p] of i) { - const f = a[a.length - 1]; - a.push({ - fixed: c - f.stretch, - stretch: f.stretch - }), a.push({ - fixed: c - f.stretch, - stretch: f.stretch + (p - c) - }) - } - return a.push({ - fixed: t + 1, - stretch: r - }), a - } - - function _d(i, t, r, a) { - return i / t * r + a - } - - function gd(i, t, r, a) { - return i - t * r / a - } - Kt("Anchor", io); - class vd { - constructor(t, r, a, c, p, f, g, v, S, I) { - var E; - if (this.boxStartIndex = t.length, S) { - let R = f.top, - N = f.bottom; - const j = f.collisionPadding; - j && (R -= j[1], N += j[3]); - let Z = N - R; - Z > 0 && (Z = Math.max(10, Z), this.circleDiameter = Z) - } else { - const R = !((E = f.image) === null || E === void 0) && E.content && (f.image.textFitWidth || f.image.textFitHeight) ? __(f) : { - x1: f.left, - y1: f.top, - x2: f.right, - y2: f.bottom - }; - R.y1 = R.y1 * g - v[0], R.y2 = R.y2 * g + v[2], R.x1 = R.x1 * g - v[3], R.x2 = R.x2 * g + v[1]; - const N = f.collisionPadding; - if (N && (R.x1 -= N[0] * g, R.y1 -= N[1] * g, R.x2 += N[2] * g, R.y2 += N[3] * g), I) { - const j = new $(R.x1, R.y1), - Z = new $(R.x2, R.y1), - Y = new $(R.x1, R.y2), - ae = new $(R.x2, R.y2), - ze = I * Math.PI / 180; - j._rotate(ze), Z._rotate(ze), Y._rotate(ze), ae._rotate(ze), R.x1 = Math.min(j.x, Z.x, Y.x, ae.x), R.x2 = Math.max(j.x, Z.x, Y.x, ae.x), R.y1 = Math.min(j.y, Z.y, Y.y, ae.y), R.y2 = Math.max(j.y, Z.y, Y.y, ae.y) - } - t.emplaceBack(r.x, r.y, R.x1, R.y1, R.x2, R.y2, a, c, p) - } - this.boxEndIndex = t.length - } - } - class dy { - constructor(t = [], r = (a, c) => a < c ? -1 : a > c ? 1 : 0) { - if (this.data = t, this.length = this.data.length, this.compare = r, this.length > 0) - for (let a = (this.length >> 1) - 1; a >= 0; a--) this._down(a) - } - push(t) { - this.data.push(t), this._up(this.length++) - } - pop() { - if (this.length === 0) return; - const t = this.data[0], - r = this.data.pop(); - return --this.length > 0 && (this.data[0] = r, this._down(0)), t - } - peek() { - return this.data[0] - } - _up(t) { - const { - data: r, - compare: a - } = this, c = r[t]; - for (; t > 0;) { - const p = t - 1 >> 1, - f = r[p]; - if (a(c, f) >= 0) break; - r[t] = f, t = p - } - r[t] = c - } - _down(t) { - const { - data: r, - compare: a - } = this, c = this.length >> 1, p = r[t]; - for (; t < c;) { - let f = 1 + (t << 1); - const g = f + 1; - if (g < this.length && a(r[g], r[f]) < 0 && (f = g), a(r[f], p) >= 0) break; - r[t] = r[f], t = f - } - r[t] = p - } - } - - function py(i, t = 1, r = !1) { - const a = Oo.fromPoints(i[0]), - c = Math.min(a.width(), a.height()); - let p = c / 2; - const f = new dy([], fy), - { - minX: g, - minY: v, - maxX: S, - maxY: I - } = a; - if (c === 0) return new $(g, v); - for (let N = g; N < S; N += c) - for (let j = v; j < I; j += c) f.push(new ql(N + p, j + p, p, i)); - let E = (function(N) { - let j = 0, - Z = 0, - Y = 0; - const ae = N[0]; - for (let ze = 0, me = ae.length, be = me - 1; ze < me; be = ze++) { - const Ve = ae[ze], - rt = ae[be], - St = Ve.x * rt.y - rt.x * Ve.y; - Z += (Ve.x + rt.x) * St, Y += (Ve.y + rt.y) * St, j += 3 * St - } - return new ql(Z / j, Y / j, 0, N) - })(i), - R = f.length; - for (; f.length;) { - const N = f.pop(); - (N.d > E.d || !E.d) && (E = N, r && console.log("found best %d after %d probes", Math.round(1e4 * N.d) / 1e4, R)), N.max - E.d <= t || (p = N.h / 2, f.push(new ql(N.p.x - p, N.p.y - p, p, i)), f.push(new ql(N.p.x + p, N.p.y - p, p, i)), f.push(new ql(N.p.x - p, N.p.y + p, p, i)), f.push(new ql(N.p.x + p, N.p.y + p, p, i)), R += 4) - } - return r && (console.log(`num probes: ${R}`), console.log(`best distance: ${E.d}`)), E.p - } - - function fy(i, t) { - return t.max - i.max - } - - function ql(i, t, r, a) { - this.p = new $(i, t), this.h = r, this.d = (function(c, p) { - let f = !1, - g = 1 / 0; - for (let v = 0; v < p.length; v++) { - const S = p[v]; - for (let I = 0, E = S.length, R = E - 1; I < E; R = I++) { - const N = S[I], - j = S[R]; - N.y > c.y != j.y > c.y && c.x < (j.x - N.x) * (c.y - N.y) / (j.y - N.y) + N.x && (f = !f), g = Math.min(g, Im(c, N, j)) - } - } - return (f ? 1 : -1) * Math.sqrt(g) - })(this.p, a), this.max = this.d + this.h * Math.SQRT2 - } - var Rn; - T.aE = void 0, (Rn = T.aE || (T.aE = {}))[Rn.center = 1] = "center", Rn[Rn.left = 2] = "left", Rn[Rn.right = 3] = "right", Rn[Rn.top = 4] = "top", Rn[Rn.bottom = 5] = "bottom", Rn[Rn["top-left"] = 6] = "top-left", Rn[Rn["top-right"] = 7] = "top-right", Rn[Rn["bottom-left"] = 8] = "bottom-left", Rn[Rn["bottom-right"] = 9] = "bottom-right"; - const Kp = Number.POSITIVE_INFINITY; - - function Z_(i, t) { - return t[1] !== Kp ? (function(r, a, c) { - let p = 0, - f = 0; - switch (a = Math.abs(a), c = Math.abs(c), r) { - case "top-right": - case "top-left": - case "top": - f = c - 7; - break; - case "bottom-right": - case "bottom-left": - case "bottom": - f = 7 - c - } - switch (r) { - case "top-right": - case "bottom-right": - case "right": - p = -a; - break; - case "top-left": - case "bottom-left": - case "left": - p = a - } - return [p, f] - })(i, t[0], t[1]) : (function(r, a) { - let c = 0, - p = 0; - a < 0 && (a = 0); - const f = a / Math.SQRT2; - switch (r) { - case "top-right": - case "top-left": - p = f - 7; - break; - case "bottom-right": - case "bottom-left": - p = 7 - f; - break; - case "bottom": - p = 7 - a; - break; - case "top": - p = a - 7 - } - switch (r) { - case "top-right": - case "bottom-right": - c = -f; - break; - case "top-left": - case "bottom-left": - c = f; - break; - case "left": - c = a; - break; - case "right": - c = -a - } - return [c, p] - })(i, t[0]) - } - - function $_(i, t, r) { - var a; - const c = i.layout, - p = (a = c.get("text-variable-anchor-offset")) === null || a === void 0 ? void 0 : a.evaluate(t, {}, r); - if (p) { - const g = p.values, - v = []; - for (let S = 0; S < g.length; S += 2) { - const I = v[S] = g[S], - E = g[S + 1].map((R => R * bn)); - I.startsWith("top") ? E[1] -= 7 : I.startsWith("bottom") && (E[1] += 7), v[S + 1] = E - } - return new un(v) - } - const f = c.get("text-variable-anchor"); - if (f) { - let g; - g = i._unevaluatedLayout.getValue("text-radial-offset") !== void 0 ? [c.get("text-radial-offset").evaluate(t, {}, r) * bn, Kp] : c.get("text-offset").evaluate(t, {}, r).map((S => S * bn)); - const v = []; - for (const S of f) v.push(S, Z_(S, g)); - return new un(v) - } - return null - } - - function Yp(i) { - switch (i) { - case "right": - case "top-right": - case "bottom-right": - return "right"; - case "left": - case "top-left": - case "bottom-left": - return "left" - } - return "center" - } - - function my(i, t, r, a, c, p, f, g, v, S, I, E) { - let R = p.textMaxSize.evaluate(t, {}); - R === void 0 && (R = f); - const N = i.layers[0].layout, - j = N.get("icon-offset").evaluate(t, {}, I), - Z = H_(r.horizontal), - Y = f / 24, - ae = i.tilePixelRatio * Y, - ze = i.tilePixelRatio * R / 24, - me = i.tilePixelRatio * g, - be = i.tilePixelRatio * N.get("symbol-spacing"), - Ve = N.get("text-padding") * i.tilePixelRatio, - rt = (function(Ur, xr, or, oi = 1) { - const Zi = Ur.get("icon-padding").evaluate(xr, {}, or), - fn = Zi && Zi.values; - return [fn[0] * oi, fn[1] * oi, fn[2] * oi, fn[3] * oi] - })(N, t, I, i.tilePixelRatio), - St = N.get("text-max-angle") / 180 * Math.PI, - $t = N.get("text-rotation-alignment") !== "viewport" && N.get("symbol-placement") !== "point", - Bt = N.get("icon-rotation-alignment") === "map" && N.get("symbol-placement") !== "point", - Ut = N.get("symbol-placement"), - pr = be / 2, - Vt = N.get("icon-text-fit"); - let Zt; - a && Vt !== "none" && (i.allowVerticalPlacement && r.vertical && (Zt = g_(a, r.vertical, Vt, N.get("icon-text-fit-padding"), j, Y)), Z && (a = g_(a, Z, Vt, N.get("icon-text-fit-padding"), j, Y))); - const mt = I ? E.line.getGranularityForZoomLevel(I.z) : 1, - Br = (Ur, xr) => { - xr.x < 0 || xr.x >= ne || xr.y < 0 || xr.y >= ne || (function(or, oi, Zi, fn, Bn, Aa, aa, Mn, qi, wn, An, kn, Yn, ka, Tn, sa, mn, Cn, Sn, rn, Bi, Xa, Vl, Ka, vy) { - const Ul = or.addToLineVertexArray(oi, Zi); - let No, Zl, $l, Gl, Y_ = 0, - J_ = 0, - Q_ = 0, - eg = 0, - sf = -1, - of = -1; - const ks = {}; - let tg = Js(""); - if (or.allowVerticalPlacement && fn.vertical) { - const Un = Mn.layout.get("text-rotate").evaluate(Bi, {}, Ka) + 90; - $l = new vd(qi, oi, wn, An, kn, fn.vertical, Yn, ka, Tn, Un), aa && (Gl = new vd(qi, oi, wn, An, kn, aa, mn, Cn, Tn, Un)) - } - if (Bn) { - const Un = Mn.layout.get("icon-rotate").evaluate(Bi, {}), - Ea = Mn.layout.get("icon-text-fit") !== "none", - jo = V_(Bn, Un, Vl, Ea), - Ja = aa ? V_(aa, Un, Vl, Ea) : void 0; - Zl = new vd(qi, oi, wn, An, kn, Bn, mn, Cn, !1, Un), Y_ = 4 * jo.length; - const qo = or.iconSizeData; - let us = null; - qo.kind === "source" ? (us = [As * Mn.layout.get("icon-size").evaluate(Bi, {})], us[0] > to && Lt(`${or.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)) : qo.kind === "composite" && (us = [As * Xa.compositeIconSizes[0].evaluate(Bi, {}, Ka), As * Xa.compositeIconSizes[1].evaluate(Bi, {}, Ka)], (us[0] > to || us[1] > to) && Lt(`${or.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)), or.addSymbols(or.icon, jo, us, rn, Sn, Bi, T.ao.none, oi, Ul.lineStartIndex, Ul.lineLength, -1, Ka), sf = or.icon.placedSymbolArray.length - 1, Ja && (J_ = 4 * Ja.length, or.addSymbols(or.icon, Ja, us, rn, Sn, Bi, T.ao.vertical, oi, Ul.lineStartIndex, Ul.lineLength, -1, Ka), of = or.icon.placedSymbolArray.length - 1) - } - const rg = Object.keys(fn.horizontal); - for (const Un of rg) { - const Ea = fn.horizontal[Un]; - if (!No) { - tg = Js(Ea.text); - const Ja = Mn.layout.get("text-rotate").evaluate(Bi, {}, Ka); - No = new vd(qi, oi, wn, An, kn, Ea, Yn, ka, Tn, Ja) - } - const jo = Ea.positionedLines.length === 1; - if (Q_ += G_(or, oi, Ea, Aa, Mn, Tn, Bi, sa, Ul, fn.vertical ? T.ao.horizontal : T.ao.horizontalOnly, jo ? rg : [Un], ks, sf, Xa, Ka), jo) break - } - fn.vertical && (eg += G_(or, oi, fn.vertical, Aa, Mn, Tn, Bi, sa, Ul, T.ao.vertical, ["vertical"], ks, of, Xa, Ka)); - const yy = No ? No.boxStartIndex : or.collisionBoxArray.length, - xy = No ? No.boxEndIndex : or.collisionBoxArray.length, - by = $l ? $l.boxStartIndex : or.collisionBoxArray.length, - wy = $l ? $l.boxEndIndex : or.collisionBoxArray.length, - Ty = Zl ? Zl.boxStartIndex : or.collisionBoxArray.length, - Cy = Zl ? Zl.boxEndIndex : or.collisionBoxArray.length, - Sy = Gl ? Gl.boxStartIndex : or.collisionBoxArray.length, - Py = Gl ? Gl.boxEndIndex : or.collisionBoxArray.length; - let Ya = -1; - const xd = (Un, Ea) => Un && Un.circleDiameter ? Math.max(Un.circleDiameter, Ea) : Ea; - Ya = xd(No, Ya), Ya = xd($l, Ya), Ya = xd(Zl, Ya), Ya = xd(Gl, Ya); - const ig = Ya > -1 ? 1 : 0; - ig && (Ya *= vy / bn), or.glyphOffsetArray.length >= Nl.MAX_GLYPHS && Lt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"), Bi.sortKey !== void 0 && or.addToSortKeyRanges(or.symbolInstances.length, Bi.sortKey); - const Iy = $_(Mn, Bi, Ka), - [My, Ay] = (function(Un, Ea) { - const jo = Un.length, - Ja = Ea == null ? void 0 : Ea.values; - if ((Ja == null ? void 0 : Ja.length) > 0) - for (let qo = 0; qo < Ja.length; qo += 2) { - const us = Ja[qo + 1]; - Un.emplaceBack(T.aE[Ja[qo]], us[0], us[1]) - } - return [jo, Un.length] - })(or.textAnchorOffsets, Iy); - or.symbolInstances.emplaceBack(oi.x, oi.y, ks.right >= 0 ? ks.right : -1, ks.center >= 0 ? ks.center : -1, ks.left >= 0 ? ks.left : -1, ks.vertical || -1, sf, of, tg, yy, xy, by, wy, Ty, Cy, Sy, Py, wn, Q_, eg, Y_, J_, ig, 0, Yn, Ya, My, Ay) - })(i, xr, Ur, r, a, c, Zt, i.layers[0], i.collisionBoxArray, t.index, t.sourceLayerIndex, i.index, ae, [Ve, Ve, Ve, Ve], $t, v, me, rt, Bt, j, t, p, S, I, f) - }; - if (Ut === "line") - for (const Ur of B_(t.geometry, 0, 0, ne, ne)) { - const xr = Fo(Ur, mt), - or = hy(xr, be, St, r.vertical || Z, a, 24, ze, i.overscaling, ne); - for (const oi of or) Z && _y(i, Z.text, pr, oi) || Br(xr, oi) - } else if (Ut === "line-center") { - for (const Ur of t.geometry) - if (Ur.length > 1) { - const xr = Fo(Ur, mt), - or = uy(xr, St, r.vertical || Z, a, 24, ze); - or && Br(xr, or) - } - } else if (t.type === "Polygon") - for (const Ur of xo(t.geometry, 0)) { - const xr = py(Ur, 16); - Br(Fo(Ur[0], mt, !0), new io(xr.x, xr.y, 0)) - } else if (t.type === "LineString") - for (const Ur of t.geometry) { - const xr = Fo(Ur, mt); - Br(xr, new io(xr[0].x, xr[0].y, 0)) - } else if (t.type === "Point") - for (const Ur of t.geometry) - for (const xr of Ur) Br([xr], new io(xr.x, xr.y, 0)) - } - - function G_(i, t, r, a, c, p, f, g, v, S, I, E, R, N, j) { - const Z = (function(ze, me, be, Ve, rt, St, $t, Bt) { - const Ut = Ve.layout.get("text-rotate").evaluate(St, {}) * Math.PI / 180, - pr = []; - for (const Vt of me.positionedLines) - for (const Zt of Vt.positionedGlyphs) { - if (!Zt.rect) continue; - const mt = Zt.rect || {}; - let Br = 4, - Ur = !0, - xr = 1, - or = 0; - const oi = (rt || Bt) && Zt.vertical, - Zi = Zt.metrics.advance * Zt.scale / 2; - if (Bt && me.verticalizable && (or = Vt.lineOffset / 2 - (Zt.imageName ? -(bn - Zt.metrics.width * Zt.scale) / 2 : (Zt.scale - 1) * bn)), Zt.imageName) { - const Cn = $t[Zt.imageName]; - Ur = Cn.sdf, xr = Cn.pixelRatio, Br = 1 / xr - } - const fn = rt ? [Zt.x + Zi, Zt.y] : [0, 0]; - let Bn = rt ? [0, 0] : [Zt.x + Zi + be[0], Zt.y + be[1] - or], - Aa = [0, 0]; - oi && (Aa = Bn, Bn = [0, 0]); - const aa = Zt.metrics.isDoubleResolution ? 2 : 1, - Mn = (Zt.metrics.left - Br) * Zt.scale - Zi + Bn[0], - qi = (-Zt.metrics.top - Br) * Zt.scale + Bn[1], - wn = Mn + mt.w / aa * Zt.scale / xr, - An = qi + mt.h / aa * Zt.scale / xr, - kn = new $(Mn, qi), - Yn = new $(wn, qi), - ka = new $(Mn, An), - Tn = new $(wn, An); - if (oi) { - const Cn = new $(-Zi, Zi - -17), - Sn = -Math.PI / 2, - rn = 12 - Zi, - Bi = new $(22 - rn, -(Zt.imageName ? rn : 0)), - Xa = new $(...Aa); - kn._rotateAround(Sn, Cn)._add(Bi)._add(Xa), Yn._rotateAround(Sn, Cn)._add(Bi)._add(Xa), ka._rotateAround(Sn, Cn)._add(Bi)._add(Xa), Tn._rotateAround(Sn, Cn)._add(Bi)._add(Xa) - } - if (Ut) { - const Cn = Math.sin(Ut), - Sn = Math.cos(Ut), - rn = [Sn, -Cn, Cn, Sn]; - kn._matMult(rn), Yn._matMult(rn), ka._matMult(rn), Tn._matMult(rn) - } - const sa = new $(0, 0), - mn = new $(0, 0); - pr.push({ - tl: kn, - tr: Yn, - bl: ka, - br: Tn, - tex: mt, - writingMode: me.writingMode, - glyphOffset: fn, - sectionIndex: Zt.sectionIndex, - isSDF: Ur, - pixelOffsetTL: sa, - pixelOffsetBR: mn, - minFontScaleX: 0, - minFontScaleY: 0 - }) - } - return pr - })(0, r, g, c, p, f, a, i.allowVerticalPlacement), - Y = i.textSizeData; - let ae = null; - Y.kind === "source" ? (ae = [As * c.layout.get("text-size").evaluate(f, {})], ae[0] > to && Lt(`${i.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)) : Y.kind === "composite" && (ae = [As * N.compositeTextSizes[0].evaluate(f, {}, j), As * N.compositeTextSizes[1].evaluate(f, {}, j)], (ae[0] > to || ae[1] > to) && Lt(`${i.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)), i.addSymbols(i.text, Z, ae, g, p, f, S, t, v.lineStartIndex, v.lineLength, R, j); - for (const ze of I) E[ze] = i.text.placedSymbolArray.length - 1; - return 4 * Z.length - } - - function H_(i) { - for (const t in i) return i[t]; - return null - } - - function _y(i, t, r, a) { - const c = i.compareText; - if (t in c) { - const p = c[t]; - for (let f = p.length - 1; f >= 0; f--) - if (a.dist(p[f]) < r) return !0 - } else c[t] = []; - return c[t].push(a), !1 - } - const W_ = [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array]; - class Jp { - static from(t) { - if (!(t instanceof ArrayBuffer)) throw new Error("Data must be an instance of ArrayBuffer."); - const [r, a] = new Uint8Array(t, 0, 2); - if (r !== 219) throw new Error("Data does not appear to be in a KDBush format."); - const c = a >> 4; - if (c !== 1) throw new Error(`Got v${c} data when expected v1.`); - const p = W_[15 & a]; - if (!p) throw new Error("Unrecognized array type."); - const [f] = new Uint16Array(t, 2, 1), [g] = new Uint32Array(t, 4, 1); - return new Jp(g, f, p, t) - } - constructor(t, r = 64, a = Float64Array, c) { - if (isNaN(t) || t < 0) throw new Error(`Unpexpected numItems value: ${t}.`); - this.numItems = +t, this.nodeSize = Math.min(Math.max(+r, 2), 65535), this.ArrayType = a, this.IndexArrayType = t < 65536 ? Uint16Array : Uint32Array; - const p = W_.indexOf(this.ArrayType), - f = 2 * t * this.ArrayType.BYTES_PER_ELEMENT, - g = t * this.IndexArrayType.BYTES_PER_ELEMENT, - v = (8 - g % 8) % 8; - if (p < 0) throw new Error(`Unexpected typed array class: ${a}.`); - c && c instanceof ArrayBuffer ? (this.data = c, this.ids = new this.IndexArrayType(this.data, 8, t), this.coords = new this.ArrayType(this.data, 8 + g + v, 2 * t), this._pos = 2 * t, this._finished = !0) : (this.data = new ArrayBuffer(8 + f + g + v), this.ids = new this.IndexArrayType(this.data, 8, t), this.coords = new this.ArrayType(this.data, 8 + g + v, 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] = r, new Uint32Array(this.data, 4, 1)[0] = t) - } - add(t, r) { - const a = this._pos >> 1; - return this.ids[a] = a, this.coords[this._pos++] = t, this.coords[this._pos++] = r, a - } - finish() { - const t = this._pos >> 1; - if (t !== this.numItems) throw new Error(`Added ${t} items when expected ${this.numItems}.`); - return Qp(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0), this._finished = !0, this - } - range(t, r, a, c) { - if (!this._finished) throw new Error("Data not yet indexed - call index.finish()."); - const { - ids: p, - coords: f, - nodeSize: g - } = this, v = [0, p.length - 1, 0], S = []; - for (; v.length;) { - const I = v.pop() || 0, - E = v.pop() || 0, - R = v.pop() || 0; - if (E - R <= g) { - for (let Y = R; Y <= E; Y++) { - const ae = f[2 * Y], - ze = f[2 * Y + 1]; - ae >= t && ae <= a && ze >= r && ze <= c && S.push(p[Y]) - } - continue - } - const N = R + E >> 1, - j = f[2 * N], - Z = f[2 * N + 1]; - j >= t && j <= a && Z >= r && Z <= c && S.push(p[N]), (I === 0 ? t <= j : r <= Z) && (v.push(R), v.push(N - 1), v.push(1 - I)), (I === 0 ? a >= j : c >= Z) && (v.push(N + 1), v.push(E), v.push(1 - I)) - } - return S - } - within(t, r, a) { - if (!this._finished) throw new Error("Data not yet indexed - call index.finish()."); - const { - ids: c, - coords: p, - nodeSize: f - } = this, g = [0, c.length - 1, 0], v = [], S = a * a; - for (; g.length;) { - const I = g.pop() || 0, - E = g.pop() || 0, - R = g.pop() || 0; - if (E - R <= f) { - for (let Y = R; Y <= E; Y++) K_(p[2 * Y], p[2 * Y + 1], t, r) <= S && v.push(c[Y]); - continue - } - const N = R + E >> 1, - j = p[2 * N], - Z = p[2 * N + 1]; - K_(j, Z, t, r) <= S && v.push(c[N]), (I === 0 ? t - a <= j : r - a <= Z) && (g.push(R), g.push(N - 1), g.push(1 - I)), (I === 0 ? t + a >= j : r + a >= Z) && (g.push(N + 1), g.push(E), g.push(1 - I)) - } - return v - } - } - - function Qp(i, t, r, a, c, p) { - if (c - a <= r) return; - const f = a + c >> 1; - X_(i, t, f, a, c, p), Qp(i, t, r, a, f - 1, 1 - p), Qp(i, t, r, f + 1, c, 1 - p) - } - - function X_(i, t, r, a, c, p) { - for (; c > a;) { - if (c - a > 600) { - const S = c - a + 1, - I = r - a + 1, - E = Math.log(S), - R = .5 * Math.exp(2 * E / 3), - N = .5 * Math.sqrt(E * R * (S - R) / S) * (I - S / 2 < 0 ? -1 : 1); - X_(i, t, r, Math.max(a, Math.floor(r - I * R / S + N)), Math.min(c, Math.floor(r + (S - I) * R / S + N)), p) - } - const f = t[2 * r + p]; - let g = a, - v = c; - for (_u(i, t, a, r), t[2 * c + p] > f && _u(i, t, a, c); g < v;) { - for (_u(i, t, g, v), g++, v--; t[2 * g + p] < f;) g++; - for (; t[2 * v + p] > f;) v-- - } - t[2 * a + p] === f ? _u(i, t, a, v) : (v++, _u(i, t, v, c)), v <= r && (a = v + 1), r <= v && (c = v - 1) - } - } - - function _u(i, t, r, a) { - ef(i, r, a), ef(t, 2 * r, 2 * a), ef(t, 2 * r + 1, 2 * a + 1) - } - - function ef(i, t, r) { - const a = i[t]; - i[t] = i[r], i[r] = a - } - - function K_(i, t, r, a) { - const c = i - r, - p = t - a; - return c * c + p * p - } - var tf; - T.cx = void 0, (tf = T.cx || (T.cx = {})).create = "create", tf.load = "load", tf.fullLoad = "fullLoad"; - let yd = null, - gu = []; - const rf = 1e3 / 60, - nf = "loadTime", - af = "fullLoadTime", - gy = { - mark(i) { - performance.mark(i) - }, - frame(i) { - const t = i; - yd != null && gu.push(t - yd), yd = t - }, - clearMetrics() { - yd = null, gu = [], performance.clearMeasures(nf), performance.clearMeasures(af); - for (const i in T.cx) performance.clearMarks(T.cx[i]) - }, - getPerformanceMetrics() { - performance.measure(nf, T.cx.create, T.cx.load), performance.measure(af, T.cx.create, T.cx.fullLoad); - const i = performance.getEntriesByName(nf)[0].duration, - t = performance.getEntriesByName(af)[0].duration, - r = gu.length, - a = 1 / (gu.reduce(((p, f) => p + f), 0) / r / 1e3), - c = gu.filter((p => p > rf)).reduce(((p, f) => p + (f - rf) / rf), 0); - return { - loadTime: i, - fullLoadTime: t, - fps: a, - percentDroppedFrames: c / (r + c) * 100, - totalFrames: r - } - } - }; - T.$ = ne, T.A = Ee, T.B = function([i, t, r]) { - return t += 90, t *= Math.PI / 180, r *= Math.PI / 180, { - x: i * Math.cos(t) * Math.sin(r), - y: i * Math.sin(t) * Math.sin(r), - z: i * Math.cos(r) - } - }, T.C = Fa, T.D = hr, T.E = Ot, T.F = Oi, T.G = ko, T.H = function(i) { - if (nr == null) { - const t = i.navigator ? i.navigator.userAgent : null; - nr = !!i.safari || !(!t || !(/\b(iPad|iPhone|iPod)\b/.test(t) || t.match("Safari") && !t.match("Chrome"))) - } - return nr - }, T.I = Np, T.J = class { - constructor(i, t) { - this.target = i, this.mapId = t, this.resolveRejects = {}, this.tasks = {}, this.taskQueue = [], this.abortControllers = {}, this.messageHandlers = {}, this.invoker = new oy((() => this.process())), this.subscription = jr(this.target, "message", (r => this.receive(r)), !1), this.globalScope = Yt(self) ? i : window - } - registerMessageHandler(i, t) { - this.messageHandlers[i] = t - } - sendAsync(i, t) { - return new Promise(((r, a) => { - const c = Math.round(1e18 * Math.random()).toString(36).substring(0, 10), - p = t ? jr(t.signal, "abort", (() => { - p == null || p.unsubscribe(), delete this.resolveRejects[c]; - const v = { - id: c, - type: "", - origin: location.origin, - targetMapId: i.targetMapId, - sourceMapId: this.mapId - }; - this.target.postMessage(v) - }), ly) : null; - this.resolveRejects[c] = { - resolve: v => { - p == null || p.unsubscribe(), r(v) - }, - reject: v => { - p == null || p.unsubscribe(), a(v) - } - }; - const f = [], - g = Object.assign(Object.assign({}, i), { - id: c, - sourceMapId: this.mapId, - origin: location.origin, - data: Gs(i.data, f) - }); - this.target.postMessage(g, { - transfer: f - }) - })) - } - receive(i) { - const t = i.data, - r = t.id; - if (!(t.origin !== "file://" && location.origin !== "file://" && t.origin !== "resource://android" && location.origin !== "resource://android" && t.origin !== location.origin || t.targetMapId && this.mapId !== t.targetMapId)) { - if (t.type === "") { - delete this.tasks[r]; - const a = this.abortControllers[r]; - return delete this.abortControllers[r], void(a && a.abort()) - } - if (Yt(self) || t.mustQueue) return this.tasks[r] = t, this.taskQueue.push(r), void this.invoker.trigger(); - this.processTask(r, t) - } - } - process() { - if (this.taskQueue.length === 0) return; - const i = this.taskQueue.shift(), - t = this.tasks[i]; - delete this.tasks[i], this.taskQueue.length > 0 && this.invoker.trigger(), t && this.processTask(i, t) - } - processTask(i, t) { - return o(this, void 0, void 0, (function*() { - if (t.type === "") { - const c = this.resolveRejects[i]; - return delete this.resolveRejects[i], c ? void(t.error ? c.reject(Cs(t.error)) : c.resolve(Cs(t.data))) : void 0 - } - if (!this.messageHandlers[t.type]) return void this.completeTask(i, new Error(`Could not find a registered handler for ${t.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`)); - const r = Cs(t.data), - a = new AbortController; - this.abortControllers[i] = a; - try { - const c = yield this.messageHandlers[t.type](t.sourceMapId, r, a); - this.completeTask(i, null, c) - } catch (c) { - this.completeTask(i, c) - } - })) - } - completeTask(i, t, r) { - const a = []; - delete this.abortControllers[i]; - const c = { - id: i, - type: "", - sourceMapId: this.mapId, - origin: location.origin, - error: t ? Gs(t) : null, - data: Gs(r, a) - }; - this.target.postMessage(c, { - transfer: a - }) - } - remove() { - this.invoker.remove(), this.subscription.unsubscribe() - } - }, T.K = G, T.L = function() { - var i = new Ee(16); - return Ee != Float32Array && (i[1] = 0, i[2] = 0, i[3] = 0, i[4] = 0, i[6] = 0, i[7] = 0, i[8] = 0, i[9] = 0, i[11] = 0, i[12] = 0, i[13] = 0, i[14] = 0), i[0] = 1, i[5] = 1, i[10] = 1, i[15] = 1, i - }, T.M = function(i, t, r) { - var a, c, p, f, g, v, S, I, E, R, N, j, Z = r[0], - Y = r[1], - ae = r[2]; - return t === i ? (i[12] = t[0] * Z + t[4] * Y + t[8] * ae + t[12], i[13] = t[1] * Z + t[5] * Y + t[9] * ae + t[13], i[14] = t[2] * Z + t[6] * Y + t[10] * ae + t[14], i[15] = t[3] * Z + t[7] * Y + t[11] * ae + t[15]) : (c = t[1], p = t[2], f = t[3], g = t[4], v = t[5], S = t[6], I = t[7], E = t[8], R = t[9], N = t[10], j = t[11], i[0] = a = t[0], i[1] = c, i[2] = p, i[3] = f, i[4] = g, i[5] = v, i[6] = S, i[7] = I, i[8] = E, i[9] = R, i[10] = N, i[11] = j, i[12] = a * Z + g * Y + E * ae + t[12], i[13] = c * Z + v * Y + R * ae + t[13], i[14] = p * Z + S * Y + N * ae + t[14], i[15] = f * Z + I * Y + j * ae + t[15]), i - }, T.N = function(i, t, r) { - var a = r[0], - c = r[1], - p = r[2]; - return i[0] = t[0] * a, i[1] = t[1] * a, i[2] = t[2] * a, i[3] = t[3] * a, i[4] = t[4] * c, i[5] = t[5] * c, i[6] = t[6] * c, i[7] = t[7] * c, i[8] = t[8] * p, i[9] = t[9] * p, i[10] = t[10] * p, i[11] = t[11] * p, i[12] = t[12], i[13] = t[13], i[14] = t[14], i[15] = t[15], i - }, T.O = function(i, t, r) { - var a = t[0], - c = t[1], - p = t[2], - f = t[3], - g = t[4], - v = t[5], - S = t[6], - I = t[7], - E = t[8], - R = t[9], - N = t[10], - j = t[11], - Z = t[12], - Y = t[13], - ae = t[14], - ze = t[15], - me = r[0], - be = r[1], - Ve = r[2], - rt = r[3]; - return i[0] = me * a + be * g + Ve * E + rt * Z, i[1] = me * c + be * v + Ve * R + rt * Y, i[2] = me * p + be * S + Ve * N + rt * ae, i[3] = me * f + be * I + Ve * j + rt * ze, i[4] = (me = r[4]) * a + (be = r[5]) * g + (Ve = r[6]) * E + (rt = r[7]) * Z, i[5] = me * c + be * v + Ve * R + rt * Y, i[6] = me * p + be * S + Ve * N + rt * ae, i[7] = me * f + be * I + Ve * j + rt * ze, i[8] = (me = r[8]) * a + (be = r[9]) * g + (Ve = r[10]) * E + (rt = r[11]) * Z, i[9] = me * c + be * v + Ve * R + rt * Y, i[10] = me * p + be * S + Ve * N + rt * ae, i[11] = me * f + be * I + Ve * j + rt * ze, i[12] = (me = r[12]) * a + (be = r[13]) * g + (Ve = r[14]) * E + (rt = r[15]) * Z, i[13] = me * c + be * v + Ve * R + rt * Y, i[14] = me * p + be * S + Ve * N + rt * ae, i[15] = me * f + be * I + Ve * j + rt * ze, i - }, T.P = $, T.Q = function(i, t) { - const r = {}; - for (let a = 0; a < t.length; a++) { - const c = t[a]; - c in i && (r[c] = i[c]) - } - return r - }, T.R = na, T.S = ro, T.T = Mp, T.U = I_, T.V = P_, T.W = Re, T.X = Ae, T.Y = dr, T.Z = Ma, T._ = o, T.a = O, T.a$ = Qe, T.a0 = function(i, t) { - var r, a, c, p; - if (!i) return t ?? {}; - if (!t) return i; - const f = Object.assign({}, i); - if (t.removeAll && (f.removeAll = !0), t.remove) { - const g = new Set(f.remove ? f.remove.concat(t.remove) : t.remove); - f.remove = Array.from(g.values()) - } - if (t.add) { - const g = f.add ? f.add.concat(t.add) : t.add, - v = new Map(g.map((S => [S.id, S]))); - f.add = Array.from(v.values()) - } - if (t.update) { - const g = new Map((r = f.update) === null || r === void 0 ? void 0 : r.map((v => [v.id, v]))); - for (const v of t.update) { - const S = (a = g.get(v.id)) !== null && a !== void 0 ? a : { - id: v.id - }; - v.newGeometry && (S.newGeometry = v.newGeometry), v.addOrUpdateProperties && (S.addOrUpdateProperties = ((c = S.addOrUpdateProperties) !== null && c !== void 0 ? c : []).concat(v.addOrUpdateProperties)), v.removeProperties && (S.removeProperties = ((p = S.removeProperties) !== null && p !== void 0 ? p : []).concat(v.removeProperties)), v.removeAllProperties && (S.removeAllProperties = !0), g.set(v.id, S) - } - f.update = Array.from(g.values()) - } - return f - }, T.a1 = fu, T.a2 = Oo, T.a3 = 25, T.a4 = Xp, T.a5 = i => { - const t = window.document.createElement("video"); - return t.muted = !0, new Promise((r => { - t.onloadstart = () => { - r(t) - }; - for (const a of i) { - const c = window.document.createElement("source"); - Le(a) || (t.crossOrigin = "Anonymous"), c.src = a, t.appendChild(c) - } - })) - }, T.a6 = Tt, T.a7 = function() { - return It++ - }, T.a8 = z, T.a9 = Nl, T.aA = function(i) { - let t = 1 / 0, - r = 1 / 0, - a = -1 / 0, - c = -1 / 0; - for (const p of i) t = Math.min(t, p.x), r = Math.min(r, p.y), a = Math.max(a, p.x), c = Math.max(c, p.y); - return [t, r, a, c] - }, T.aB = bn, T.aC = Pe, T.aD = function(i, t, r, a, c = !1) { - if (!r[0] && !r[1]) return [0, 0]; - const p = c ? a === "map" ? -i.bearingInRadians : 0 : a === "viewport" ? i.bearingInRadians : 0; - if (p) { - const f = Math.sin(p), - g = Math.cos(p); - r = [r[0] * g - r[1] * f, r[0] * f + r[1] * g] - } - return [c ? r[0] : Pe(t, r[0], i.zoom), c ? r[1] : Pe(t, r[1], i.zoom)] - }, T.aF = Vp, T.aG = Yp, T.aH = qp, T.aI = Jp, T.aJ = Hi, T.aK = cd, T.aL = he, T.aM = Wr, T.aN = ki, T.aO = tt, T.aP = Mr, T.aQ = A_, T.aR = Be, T.aS = Je, T.aT = function(i) { - var t = new Ee(3); - return t[0] = i[0], t[1] = i[1], t[2] = i[2], t - }, T.aU = function(i, t, r) { - return i[0] = t[0] - r[0], i[1] = t[1] - r[1], i[2] = t[2] - r[2], i - }, T.aV = function(i, t) { - var r = t[0], - a = t[1], - c = t[2], - p = r * r + a * a + c * c; - return p > 0 && (p = 1 / Math.sqrt(p)), i[0] = t[0] * p, i[1] = t[1] * p, i[2] = t[2] * p, i - }, T.aW = st, T.aX = function(i, t) { - return i[0] * t[0] + i[1] * t[1] + i[2] * t[2] - }, T.aY = function(i, t, r) { - return i[0] = t[0] * r[0], i[1] = t[1] * r[1], i[2] = t[2] * r[2], i[3] = t[3] * r[3], i - }, T.aZ = Xe, T.a_ = function(i, t, r) { - const a = t[0] * r[0] + t[1] * r[1] + t[2] * r[2]; - return a === 0 ? null : (-(i[0] * r[0] + i[1] * r[1] + i[2] * r[2]) - r[3]) / a - }, T.aa = bs, T.ab = Wa, T.ac = L_, T.ad = function(i) { - const t = {}; - if (i.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g, ((r, a, c, p) => { - const f = c || p; - return t[a] = !f || f.toLowerCase(), "" - })), t["max-age"]) { - const r = parseInt(t["max-age"], 10); - isNaN(r) ? delete t["max-age"] : t["max-age"] = r - } - return t - }, T.ae = ur, T.af = function(i) { - return Math.pow(2, i) - }, T.ag = ft, T.ah = xt, T.ai = 85.051129, T.aj = M_, T.ak = function(i) { - return Math.log(i) / Math.LN2 - }, T.al = function(i) { - var t = i[0], - r = i[1]; - return t * t + r * r - }, T.am = function(i, t) { - const r = []; - for (const a in i) a in t || r.push(a); - return r - }, T.an = function(i, t) { - let r = 0, - a = 0; - if (i.kind === "constant") a = i.layoutSize; - else if (i.kind !== "source") { - const { - interpolationType: c, - minZoom: p, - maxZoom: f - } = i, g = c ? xt(In.interpolationFactor(c, t, p, f), 0, 1) : 0; - i.kind === "camera" ? a = Fa.number(i.minSize, i.maxSize, g) : r = g - } - return { - uSizeT: r, - uSize: a - } - }, T.ap = function(i, { - uSize: t, - uSizeT: r - }, { - lowerSize: a, - upperSize: c - }) { - return i.kind === "source" ? a / As : i.kind === "composite" ? Fa.number(a / As, c / As, r) : t - }, T.aq = function(i, t) { - var r = t[0], - a = t[1], - c = t[2], - p = t[3], - f = t[4], - g = t[5], - v = t[6], - S = t[7], - I = t[8], - E = t[9], - R = t[10], - N = t[11], - j = t[12], - Z = t[13], - Y = t[14], - ae = t[15], - ze = r * g - a * f, - me = r * v - c * f, - be = r * S - p * f, - Ve = a * v - c * g, - rt = a * S - p * g, - St = c * S - p * v, - $t = I * Z - E * j, - Bt = I * Y - R * j, - Ut = I * ae - N * j, - pr = E * Y - R * Z, - Vt = E * ae - N * Z, - Zt = R * ae - N * Y, - mt = ze * Zt - me * Vt + be * pr + Ve * Ut - rt * Bt + St * $t; - return mt ? (i[0] = (g * Zt - v * Vt + S * pr) * (mt = 1 / mt), i[1] = (c * Vt - a * Zt - p * pr) * mt, i[2] = (Z * St - Y * rt + ae * Ve) * mt, i[3] = (R * rt - E * St - N * Ve) * mt, i[4] = (v * Ut - f * Zt - S * Bt) * mt, i[5] = (r * Zt - c * Ut + p * Bt) * mt, i[6] = (Y * be - j * St - ae * me) * mt, i[7] = (I * St - R * be + N * me) * mt, i[8] = (f * Vt - g * Ut + S * $t) * mt, i[9] = (a * Ut - r * Vt - p * $t) * mt, i[10] = (j * rt - Z * be + ae * ze) * mt, i[11] = (E * be - I * rt - N * ze) * mt, i[12] = (g * Bt - f * pr - v * $t) * mt, i[13] = (r * pr - a * Bt + c * $t) * mt, i[14] = (Z * me - j * Ve - Y * ze) * mt, i[15] = (I * Ve - E * me + R * ze) * mt, i) : null - }, T.ar = te, T.as = function(i) { - return Math.hypot(i[0], i[1]) - }, T.at = function(i) { - return i[0] = 0, i[1] = 0, i - }, T.au = function(i, t, r) { - return i[0] = t[0] * r, i[1] = t[1] * r, i - }, T.av = Up, T.aw = ke, T.ax = function(i, t, r, a) { - const c = t.y - i.y, - p = t.x - i.x, - f = a.y - r.y, - g = a.x - r.x, - v = f * p - g * c; - if (v === 0) return null; - const S = (g * (i.y - r.y) - f * (i.x - r.x)) / v; - return new $(i.x + S * p, i.y + S * c) - }, T.ay = B_, T.az = Sm, T.b = ar, T.b$ = class extends h {}, T.b0 = function(i, t, r) { - return i[0] = t[0] * r, i[1] = t[1] * r, i[2] = t[2] * r, i[3] = t[3] * r, i - }, T.b1 = function(i, t) { - return i[0] * t[0] + i[1] * t[1] + i[2] * t[2] + i[3] - }, T.b2 = E_, T.b3 = jl, T.b4 = function(i, t, r, a, c) { - var p, f = 1 / Math.tan(t / 2); - return i[0] = f / r, i[1] = 0, i[2] = 0, i[3] = 0, i[4] = 0, i[5] = f, i[6] = 0, i[7] = 0, i[8] = 0, i[9] = 0, i[11] = -1, i[12] = 0, i[13] = 0, i[15] = 0, c != null && c !== 1 / 0 ? (i[10] = (c + a) * (p = 1 / (a - c)), i[14] = 2 * c * a * p) : (i[10] = -1, i[14] = -2 * a), i - }, T.b5 = function(i) { - var t = new Ee(16); - return t[0] = i[0], t[1] = i[1], t[2] = i[2], t[3] = i[3], t[4] = i[4], t[5] = i[5], t[6] = i[6], t[7] = i[7], t[8] = i[8], t[9] = i[9], t[10] = i[10], t[11] = i[11], t[12] = i[12], t[13] = i[13], t[14] = i[14], t[15] = i[15], t - }, T.b6 = function(i, t, r) { - var a = Math.sin(r), - c = Math.cos(r), - p = t[0], - f = t[1], - g = t[2], - v = t[3], - S = t[4], - I = t[5], - E = t[6], - R = t[7]; - return t !== i && (i[8] = t[8], i[9] = t[9], i[10] = t[10], i[11] = t[11], i[12] = t[12], i[13] = t[13], i[14] = t[14], i[15] = t[15]), i[0] = p * c + S * a, i[1] = f * c + I * a, i[2] = g * c + E * a, i[3] = v * c + R * a, i[4] = S * c - p * a, i[5] = I * c - f * a, i[6] = E * c - g * a, i[7] = R * c - v * a, i - }, T.b7 = function(i, t, r) { - var a = Math.sin(r), - c = Math.cos(r), - p = t[4], - f = t[5], - g = t[6], - v = t[7], - S = t[8], - I = t[9], - E = t[10], - R = t[11]; - return t !== i && (i[0] = t[0], i[1] = t[1], i[2] = t[2], i[3] = t[3], i[12] = t[12], i[13] = t[13], i[14] = t[14], i[15] = t[15]), i[4] = p * c + S * a, i[5] = f * c + I * a, i[6] = g * c + E * a, i[7] = v * c + R * a, i[8] = S * c - p * a, i[9] = I * c - f * a, i[10] = E * c - g * a, i[11] = R * c - v * a, i - }, T.b8 = function() { - const i = new Float32Array(16); - return ft(i), i - }, T.b9 = function() { - const i = new Float64Array(16); - return ft(i), i - }, T.bA = function(i, t) { - const r = Me(i, 360), - a = Me(t, 360), - c = a - r, - p = a > r ? c - 360 : c + 360; - return Math.abs(c) < Math.abs(p) ? c : p - }, T.bB = function(i) { - return i[0] = 0, i[1] = 0, i[2] = 0, i - }, T.bC = function(i, t, r, a) { - const c = Math.sqrt(i * i + t * t), - p = Math.sqrt(r * r + a * a); - i /= c, t /= c, r /= p, a /= p; - const f = Math.acos(i * r + t * a); - return -t * r + i * a > 0 ? f : -f - }, T.bD = function(i, t) { - const r = Me(i, 2 * Math.PI), - a = Me(t, 2 * Math.PI); - return Math.min(Math.abs(r - a), Math.abs(r - a + 2 * Math.PI), Math.abs(r - a - 2 * Math.PI)) - }, T.bE = function() { - const i = {}, - t = xe.$version; - for (const r in xe.$root) { - const a = xe.$root[r]; - if (a.required) { - let c = null; - c = r === "version" ? t : a.type === "array" ? [] : {}, c != null && (i[r] = c) - } - } - return i - }, T.bF = bl, T.bG = le, T.bH = function i(t, r) { - if (Array.isArray(t)) { - if (!Array.isArray(r) || t.length !== r.length) return !1; - for (let a = 0; a < t.length; a++) - if (!i(t[a], r[a])) return !1; - return !0 - } - if (typeof t == "object" && t !== null && r !== null) { - if (typeof r != "object" || Object.keys(t).length !== Object.keys(r).length) return !1; - for (const a in t) - if (!i(t[a], r[a])) return !1; - return !0 - } - return t === r - }, T.bI = function(i) { - i = i.slice(); - const t = Object.create(null); - for (let r = 0; r < i.length; r++) t[i[r].id] = i[r]; - for (let r = 0; r < i.length; r++) "ref" in i[r] && (i[r] = Pt(i[r], t[i[r].ref])); - return i - }, T.bJ = function(i) { - if (i.type === "custom") return new sy(i); - switch (i.type) { - case "background": - return new iy(i); - case "circle": - return new Vv(i); - case "color-relief": - return new Wv(i); - case "fill": - return new c0(i); - case "fill-extrusion": - return new x0(i); - case "heatmap": - return new Zv(i); - case "hillshade": - return new Gv(i); - case "line": - return new I0(i); - case "raster": - return new ay(i); - case "symbol": - return new fd(i) - } - }, T.bK = wt, T.bL = function(i, t) { - if (!i) return [{ - command: "setStyle", - args: [t] - }]; - let r = []; - try { - if (!kt(i.version, t.version)) return [{ - command: "setStyle", - args: [t] - }]; - kt(i.center, t.center) || r.push({ - command: "setCenter", - args: [t.center] - }), kt(i.state, t.state) || r.push({ - command: "setGlobalState", - args: [t.state] - }), kt(i.centerAltitude, t.centerAltitude) || r.push({ - command: "setCenterAltitude", - args: [t.centerAltitude] - }), kt(i.zoom, t.zoom) || r.push({ - command: "setZoom", - args: [t.zoom] - }), kt(i.bearing, t.bearing) || r.push({ - command: "setBearing", - args: [t.bearing] - }), kt(i.pitch, t.pitch) || r.push({ - command: "setPitch", - args: [t.pitch] - }), kt(i.roll, t.roll) || r.push({ - command: "setRoll", - args: [t.roll] - }), kt(i.sprite, t.sprite) || r.push({ - command: "setSprite", - args: [t.sprite] - }), kt(i.glyphs, t.glyphs) || r.push({ - command: "setGlyphs", - args: [t.glyphs] - }), kt(i.transition, t.transition) || r.push({ - command: "setTransition", - args: [t.transition] - }), kt(i.light, t.light) || r.push({ - command: "setLight", - args: [t.light] - }), kt(i.terrain, t.terrain) || r.push({ - command: "setTerrain", - args: [t.terrain] - }), kt(i.sky, t.sky) || r.push({ - command: "setSky", - args: [t.sky] - }), kt(i.projection, t.projection) || r.push({ - command: "setProjection", - args: [t.projection] - }); - const a = {}, - c = []; - (function(f, g, v, S) { - let I; - for (I in g = g || {}, f = f || {}) Object.prototype.hasOwnProperty.call(f, I) && (Object.prototype.hasOwnProperty.call(g, I) || Kr(I, v, S)); - for (I in g) Object.prototype.hasOwnProperty.call(g, I) && (Object.prototype.hasOwnProperty.call(f, I) ? kt(f[I], g[I]) || (f[I].type === "geojson" && g[I].type === "geojson" && $r(f, g, I) ? Wt(v, { - command: "setGeoJSONSourceData", - args: [I, g[I].data] - }) : Hr(I, g, v, S)) : Lr(I, g, v)) - })(i.sources, t.sources, c, a); - const p = []; - i.layers && i.layers.forEach((f => { - "source" in f && a[f.source] ? r.push({ - command: "removeLayer", - args: [f.id] - }) : p.push(f) - })), r = r.concat(c), (function(f, g, v) { - g = g || []; - const S = (f = f || []).map(gr), - I = g.map(gr), - E = f.reduce(ai, {}), - R = g.reduce(ai, {}), - N = S.slice(), - j = Object.create(null); - let Z, Y, ae, ze, me; - for (let be = 0, Ve = 0; be < S.length; be++) Z = S[be], Object.prototype.hasOwnProperty.call(R, Z) ? Ve++ : (Wt(v, { - command: "removeLayer", - args: [Z] - }), N.splice(N.indexOf(Z, Ve), 1)); - for (let be = 0, Ve = 0; be < I.length; be++) Z = I[I.length - 1 - be], N[N.length - 1 - be] !== Z && (Object.prototype.hasOwnProperty.call(E, Z) ? (Wt(v, { - command: "removeLayer", - args: [Z] - }), N.splice(N.lastIndexOf(Z, N.length - Ve), 1)) : Ve++, ze = N[N.length - be], Wt(v, { - command: "addLayer", - args: [R[Z], ze] - }), N.splice(N.length - be, 0, Z), j[Z] = !0); - for (let be = 0; be < I.length; be++) - if (Z = I[be], Y = E[Z], ae = R[Z], !j[Z] && !kt(Y, ae)) - if (kt(Y.source, ae.source) && kt(Y["source-layer"], ae["source-layer"]) && kt(Y.type, ae.type)) { - for (me in mr(Y.layout, ae.layout, v, Z, null, "setLayoutProperty"), mr(Y.paint, ae.paint, v, Z, null, "setPaintProperty"), kt(Y.filter, ae.filter) || Wt(v, { - command: "setFilter", - args: [Z, ae.filter] - }), kt(Y.minzoom, ae.minzoom) && kt(Y.maxzoom, ae.maxzoom) || Wt(v, { - command: "setLayerZoomRange", - args: [Z, ae.minzoom, ae.maxzoom] - }), Y) Object.prototype.hasOwnProperty.call(Y, me) && me !== "layout" && me !== "paint" && me !== "filter" && me !== "metadata" && me !== "minzoom" && me !== "maxzoom" && (me.indexOf("paint.") === 0 ? mr(Y[me], ae[me], v, Z, me.slice(6), "setPaintProperty") : kt(Y[me], ae[me]) || Wt(v, { - command: "setLayerProperty", - args: [Z, me, ae[me]] - })); - for (me in ae) Object.prototype.hasOwnProperty.call(ae, me) && !Object.prototype.hasOwnProperty.call(Y, me) && me !== "layout" && me !== "paint" && me !== "filter" && me !== "metadata" && me !== "minzoom" && me !== "maxzoom" && (me.indexOf("paint.") === 0 ? mr(Y[me], ae[me], v, Z, me.slice(6), "setPaintProperty") : kt(Y[me], ae[me]) || Wt(v, { - command: "setLayerProperty", - args: [Z, me, ae[me]] - })) - } else Wt(v, { - command: "removeLayer", - args: [Z] - }), ze = N[N.lastIndexOf(Z) + 1], Wt(v, { - command: "addLayer", - args: [ae, ze] - }) - })(p, t.layers, r) - } catch (a) { - console.warn("Unable to compute style diff:", a), r = [{ - command: "setStyle", - args: [t] - }] - } - return r - }, T.bM = function(i) { - const t = [], - r = i.id; - return r === void 0 && t.push({ - message: `layers.${r}: missing required property "id"` - }), i.render === void 0 && t.push({ - message: `layers.${r}: missing required method "render"` - }), i.renderingMode && i.renderingMode !== "2d" && i.renderingMode !== "3d" && t.push({ - message: `layers.${r}: property "renderingMode" must be either "2d" or "3d"` - }), t - }, T.bN = ut, T.bO = bt, T.bP = class extends Vn { - constructor(i, t) { - super(i, t), this.current = 0 - } - set(i) { - this.current !== i && (this.current = i, this.gl.uniform1i(this.location, i)) - } - }, T.bQ = pn, T.bR = class extends Vn { - constructor(i, t) { - super(i, t), this.current = da - } - set(i) { - if (i[12] !== this.current[12] || i[0] !== this.current[0]) return this.current = i, void this.gl.uniformMatrix4fv(this.location, !1, i); - for (let t = 1; t < 16; t++) - if (i[t] !== this.current[t]) { - this.current = i, this.gl.uniformMatrix4fv(this.location, !1, i); - break - } - } - }, T.bS = en, T.bT = class extends Vn { - constructor(i, t) { - super(i, t), this.current = [0, 0, 0] - } - set(i) { - i[0] === this.current[0] && i[1] === this.current[1] && i[2] === this.current[2] || (this.current = i, this.gl.uniform3f(this.location, i[0], i[1], i[2])) - } - }, T.bU = class extends Vn { - constructor(i, t) { - super(i, t), this.current = [0, 0] - } - set(i) { - i[0] === this.current[0] && i[1] === this.current[1] || (this.current = i, this.gl.uniform2f(this.location, i[0], i[1])) - } - }, T.bV = Ne, T.bW = function(i, t) { - var r = Math.sin(t), - a = Math.cos(t); - return i[0] = a, i[1] = r, i[2] = 0, i[3] = -r, i[4] = a, i[5] = 0, i[6] = 0, i[7] = 0, i[8] = 1, i - }, T.bX = function(i, t, r) { - var a = t[0], - c = t[1], - p = t[2]; - return i[0] = a * r[0] + c * r[3] + p * r[6], i[1] = a * r[1] + c * r[4] + p * r[7], i[2] = a * r[2] + c * r[5] + p * r[8], i - }, T.bY = function(i, t, r, a, c, p, f) { - var g = 1 / (t - r), - v = 1 / (a - c), - S = 1 / (p - f); - return i[0] = -2 * g, i[1] = 0, i[2] = 0, i[3] = 0, i[4] = 0, i[5] = -2 * v, i[6] = 0, i[7] = 0, i[8] = 0, i[9] = 0, i[10] = 2 * S, i[11] = 0, i[12] = (t + r) * g, i[13] = (c + a) * v, i[14] = (f + p) * S, i[15] = 1, i - }, T.bZ = class extends Vn { - constructor(i, t) { - super(i, t), this.current = new Array - } - set(i) { - if (i != this.current) { - this.current = i; - const t = new Float32Array(4 * i.length); - for (let r = 0; r < i.length; r++) t[4 * r] = i[r].r, t[4 * r + 1] = i[r].g, t[4 * r + 2] = i[r].b, t[4 * r + 3] = i[r].a; - this.gl.uniform4fv(this.location, t) - } - } - }, T.b_ = class extends Vn { - constructor(i, t) { - super(i, t), this.current = new Array - } - set(i) { - if (i != this.current) { - this.current = i; - const t = new Float32Array(i); - this.gl.uniform1fv(this.location, t) - } - } - }, T.ba = function() { - return new Float64Array(16) - }, T.bb = function(i, t, r) { - const a = new Float64Array(4); - return Q(a, i, t - 90, r), a - }, T.bc = function(i, t, r, a) { - var c, p, f, g, v, S = t[0], - I = t[1], - E = t[2], - R = t[3], - N = r[0], - j = r[1], - Z = r[2], - Y = r[3]; - return (p = S * N + I * j + E * Z + R * Y) < 0 && (p = -p, N = -N, j = -j, Z = -Z, Y = -Y), 1 - p > Oe ? (c = Math.acos(p), f = Math.sin(c), g = Math.sin((1 - a) * c) / f, v = Math.sin(a * c) / f) : (g = 1 - a, v = a), i[0] = g * S + v * N, i[1] = g * I + v * j, i[2] = g * E + v * Z, i[3] = g * R + v * Y, i - }, T.bd = function(i) { - const t = new Float64Array(9); - var r, a, c, p, f, g, v, S, I, E, R, N, j, Z, Y, ae, ze, me; - E = (c = (a = i)[0]) * (v = c + c), R = (p = a[1]) * v, j = (f = a[2]) * v, Z = f * (S = p + p), ae = (g = a[3]) * v, ze = g * S, me = g * (I = f + f), (r = t)[0] = 1 - (N = p * S) - (Y = f * I), r[3] = R - me, r[6] = j + ze, r[1] = R + me, r[4] = 1 - E - Y, r[7] = Z - ae, r[2] = j - ze, r[5] = Z + ae, r[8] = 1 - E - N; - const be = Mr(-Math.asin(xt(t[2], -1, 1))); - let Ve, rt; - return Math.hypot(t[5], t[8]) < .001 ? (Ve = 0, rt = -Mr(Math.atan2(t[3], t[4]))) : (Ve = Mr(t[5] === 0 && t[8] === 0 ? 0 : Math.atan2(t[5], t[8])), rt = Mr(t[1] === 0 && t[0] === 0 ? 0 : Math.atan2(t[1], t[0]))), { - roll: Ve, - pitch: be + 90, - bearing: rt - } - }, T.be = function(i, t) { - return i.roll == t.roll && i.pitch == t.pitch && i.bearing == t.bearing - }, T.bf = yr, T.bg = os, T.bh = Rl, T.bi = lu, T.bj = Dl, T.bk = at, T.bl = We, T.bm = hn, T.bn = function(i, t, r, a, c) { - return at(a, c, xt((i - t) / (r - t), 0, 1)) - }, T.bo = Me, T.bp = function() { - return new Float64Array(3) - }, T.bq = function(i, t, r, a) { - return i[0] = t[0] + r[0] * a, i[1] = t[1] + r[1] * a, i[2] = t[2] + r[2] * a, i - }, T.br = Q, T.bs = function(i, t, r) { - var a = r[0], - c = r[1], - p = r[2], - f = t[0], - g = t[1], - v = t[2], - S = c * v - p * g, - I = p * f - a * v, - E = a * g - c * f, - R = c * E - p * I, - N = p * S - a * E, - j = a * I - c * S, - Z = 2 * r[3]; - return I *= Z, E *= Z, N *= 2, j *= 2, i[0] = f + (S *= Z) + (R *= 2), i[1] = g + I + N, i[2] = v + E + j, i - }, T.bt = function(i, t, r) { - const a = (c = [i[0], i[1], i[2], t[0], t[1], t[2], r[0], r[1], r[2]])[0] * ((I = c[8]) * (f = c[4]) - (g = c[5]) * (S = c[7])) + c[1] * (-I * (p = c[3]) + g * (v = c[6])) + c[2] * (S * p - f * v); - var c, p, f, g, v, S, I; - if (a === 0) return null; - const E = st([], [t[0], t[1], t[2]], [r[0], r[1], r[2]]), - R = st([], [r[0], r[1], r[2]], [i[0], i[1], i[2]]), - N = st([], [i[0], i[1], i[2]], [t[0], t[1], t[2]]), - j = Be([], E, -i[3]); - return Je(j, j, Be([], R, -t[3])), Je(j, j, Be([], N, -r[3])), Be(j, j, 1 / a), j - }, T.bu = Hp, T.bv = function() { - return new Float64Array(4) - }, T.bw = function(i, t, r, a) { - var c = [], - p = []; - return c[0] = t[0] - r[0], c[1] = t[1] - r[1], c[2] = t[2] - r[2], p[0] = c[0] * Math.cos(a) - c[1] * Math.sin(a), p[1] = c[0] * Math.sin(a) + c[1] * Math.cos(a), p[2] = c[2], i[0] = p[0] + r[0], i[1] = p[1] + r[1], i[2] = p[2] + r[2], i - }, T.bx = function(i, t, r, a) { - var c = [], - p = []; - return c[0] = t[0] - r[0], c[1] = t[1] - r[1], c[2] = t[2] - r[2], p[0] = c[0], p[1] = c[1] * Math.cos(a) - c[2] * Math.sin(a), p[2] = c[1] * Math.sin(a) + c[2] * Math.cos(a), i[0] = p[0] + r[0], i[1] = p[1] + r[1], i[2] = p[2] + r[2], i - }, T.by = function(i, t, r, a) { - var c = [], - p = []; - return c[0] = t[0] - r[0], c[1] = t[1] - r[1], c[2] = t[2] - r[2], p[0] = c[2] * Math.sin(a) + c[0] * Math.cos(a), p[1] = c[1], p[2] = c[2] * Math.cos(a) - c[0] * Math.sin(a), i[0] = p[0] + r[0], i[1] = p[1] + r[1], i[2] = p[2] + r[2], i - }, T.bz = function(i, t, r) { - var a = Math.sin(r), - c = Math.cos(r), - p = t[0], - f = t[1], - g = t[2], - v = t[3], - S = t[8], - I = t[9], - E = t[10], - R = t[11]; - return t !== i && (i[4] = t[4], i[5] = t[5], i[6] = t[6], i[7] = t[7], i[12] = t[12], i[13] = t[13], i[14] = t[14], i[15] = t[15]), i[0] = p * c - S * a, i[1] = f * c - I * a, i[2] = g * c - E * a, i[3] = v * c - R * a, i[8] = p * a + S * c, i[9] = f * a + I * c, i[10] = g * a + E * c, i[11] = v * a + R * c, i - }, T.c = ce, T.c0 = E0, T.c1 = class extends n {}, T.c2 = Ip, T.c3 = function(i) { - return i <= 1 ? 1 : Math.pow(2, Math.ceil(Math.log(i) / Math.LN2)) - }, T.c4 = Rm, T.c5 = function(i, t, r) { - var a = t[0], - c = t[1], - p = t[2], - f = r[3] * a + r[7] * c + r[11] * p + r[15]; - return i[0] = (r[0] * a + r[4] * c + r[8] * p + r[12]) / (f = f || 1), i[1] = (r[1] * a + r[5] * c + r[9] * p + r[13]) / f, i[2] = (r[2] * a + r[6] * c + r[10] * p + r[14]) / f, i - }, T.c6 = class extends Yc {}, T.c7 = class extends P {}, T.c8 = function(i, t) { - return i[0] === t[0] && i[1] === t[1] && i[2] === t[2] && i[3] === t[3] && i[4] === t[4] && i[5] === t[5] && i[6] === t[6] && i[7] === t[7] && i[8] === t[8] && i[9] === t[9] && i[10] === t[10] && i[11] === t[11] && i[12] === t[12] && i[13] === t[13] && i[14] === t[14] && i[15] === t[15] - }, T.c9 = function(i, t) { - var r = i[0], - a = i[1], - c = i[2], - p = i[3], - f = i[4], - g = i[5], - v = i[6], - S = i[7], - I = i[8], - E = i[9], - R = i[10], - N = i[11], - j = i[12], - Z = i[13], - Y = i[14], - ae = i[15], - ze = t[0], - me = t[1], - be = t[2], - Ve = t[3], - rt = t[4], - St = t[5], - $t = t[6], - Bt = t[7], - Ut = t[8], - pr = t[9], - Vt = t[10], - Zt = t[11], - mt = t[12], - Br = t[13], - Ur = t[14], - xr = t[15]; - return Math.abs(r - ze) <= Oe * Math.max(1, Math.abs(r), Math.abs(ze)) && Math.abs(a - me) <= Oe * Math.max(1, Math.abs(a), Math.abs(me)) && Math.abs(c - be) <= Oe * Math.max(1, Math.abs(c), Math.abs(be)) && Math.abs(p - Ve) <= Oe * Math.max(1, Math.abs(p), Math.abs(Ve)) && Math.abs(f - rt) <= Oe * Math.max(1, Math.abs(f), Math.abs(rt)) && Math.abs(g - St) <= Oe * Math.max(1, Math.abs(g), Math.abs(St)) && Math.abs(v - $t) <= Oe * Math.max(1, Math.abs(v), Math.abs($t)) && Math.abs(S - Bt) <= Oe * Math.max(1, Math.abs(S), Math.abs(Bt)) && Math.abs(I - Ut) <= Oe * Math.max(1, Math.abs(I), Math.abs(Ut)) && Math.abs(E - pr) <= Oe * Math.max(1, Math.abs(E), Math.abs(pr)) && Math.abs(R - Vt) <= Oe * Math.max(1, Math.abs(R), Math.abs(Vt)) && Math.abs(N - Zt) <= Oe * Math.max(1, Math.abs(N), Math.abs(Zt)) && Math.abs(j - mt) <= Oe * Math.max(1, Math.abs(j), Math.abs(mt)) && Math.abs(Z - Br) <= Oe * Math.max(1, Math.abs(Z), Math.abs(Br)) && Math.abs(Y - Ur) <= Oe * Math.max(1, Math.abs(Y), Math.abs(Ur)) && Math.abs(ae - xr) <= Oe * Math.max(1, Math.abs(ae), Math.abs(xr)) - }, T.cA = function(i, t) { - O.REGISTERED_PROTOCOLS[i] = t - }, T.cB = function(i) { - delete O.REGISTERED_PROTOCOLS[i] - }, T.cC = function(i, t) { - const r = {}; - for (let c = 0; c < i.length; c++) { - const p = t && t[i[c].id] || mp(i[c]); - t && (t[i[c].id] = p); - let f = r[p]; - f || (f = r[p] = []), f.push(i[c]) - } - const a = []; - for (const c in r) a.push(r[c]); - return a - }, T.cD = Kt, T.cE = z_, T.cF = D_, T.cG = u_, T.cH = function(i) { - i.bucket.createArrays(), i.bucket.tilePixelRatio = ne / (512 * i.bucket.overscaling), i.bucket.compareText = {}, i.bucket.iconsNeedLinear = !1; - const t = i.bucket.layers[0], - r = t.layout, - a = t._unevaluatedLayout._values, - c = { - layoutIconSize: a["icon-size"].possiblyEvaluate(new Oi(i.bucket.zoom + 1), i.canonical), - layoutTextSize: a["text-size"].possiblyEvaluate(new Oi(i.bucket.zoom + 1), i.canonical), - textMaxSize: a["text-size"].possiblyEvaluate(new Oi(18)) - }; - if (i.bucket.textSizeData.kind === "composite") { - const { - minZoom: S, - maxZoom: I - } = i.bucket.textSizeData; - c.compositeTextSizes = [a["text-size"].possiblyEvaluate(new Oi(S), i.canonical), a["text-size"].possiblyEvaluate(new Oi(I), i.canonical)] - } - if (i.bucket.iconSizeData.kind === "composite") { - const { - minZoom: S, - maxZoom: I - } = i.bucket.iconSizeData; - c.compositeIconSizes = [a["icon-size"].possiblyEvaluate(new Oi(S), i.canonical), a["icon-size"].possiblyEvaluate(new Oi(I), i.canonical)] - } - const p = r.get("text-line-height") * bn, - f = r.get("text-rotation-alignment") !== "viewport" && r.get("symbol-placement") !== "point", - g = r.get("text-keep-upright"), - v = r.get("text-size"); - for (const S of i.bucket.features) { - const I = r.get("text-font").evaluate(S, {}, i.canonical).join(","), - E = v.evaluate(S, {}, i.canonical), - R = c.layoutTextSize.evaluate(S, {}, i.canonical), - N = c.layoutIconSize.evaluate(S, {}, i.canonical), - j = { - horizontal: {}, - vertical: void 0 - }, - Z = S.text; - let Y, ae = [0, 0]; - if (Z) { - const be = Z.toString(), - Ve = r.get("text-letter-spacing").evaluate(S, {}, i.canonical) * bn, - rt = yp(be) ? Ve : 0, - St = r.get("text-anchor").evaluate(S, {}, i.canonical), - $t = $_(t, S, i.canonical); - if (!$t) { - const Vt = r.get("text-radial-offset").evaluate(S, {}, i.canonical); - ae = Vt ? Z_(St, [Vt * bn, Kp]) : r.get("text-offset").evaluate(S, {}, i.canonical).map((Zt => Zt * bn)) - } - let Bt = f ? "center" : r.get("text-justify").evaluate(S, {}, i.canonical); - const Ut = r.get("symbol-placement") === "point" ? r.get("text-max-width").evaluate(S, {}, i.canonical) * bn : 1 / 0, - pr = () => { - i.bucket.allowVerticalPlacement && wl(be) && (j.vertical = hd(Z, i.glyphMap, i.glyphPositions, i.imagePositions, I, Ut, p, St, "left", rt, ae, T.ao.vertical, !0, R, E)) - }; - if (!f && $t) { - const Vt = new Set; - if (Bt === "auto") - for (let mt = 0; mt < $t.values.length; mt += 2) Vt.add(Yp($t.values[mt])); - else Vt.add(Bt); - let Zt = !1; - for (const mt of Vt) - if (!j.horizontal[mt]) - if (Zt) j.horizontal[mt] = j.horizontal[0]; - else { - const Br = hd(Z, i.glyphMap, i.glyphPositions, i.imagePositions, I, Ut, p, "center", mt, rt, ae, T.ao.horizontal, !1, R, E); - Br && (j.horizontal[mt] = Br, Zt = Br.positionedLines.length === 1) - } pr() - } else { - Bt === "auto" && (Bt = Yp(St)); - const Vt = hd(Z, i.glyphMap, i.glyphPositions, i.imagePositions, I, Ut, p, St, Bt, rt, ae, T.ao.horizontal, !1, R, E); - Vt && (j.horizontal[Bt] = Vt), pr(), wl(be) && f && g && (j.vertical = hd(Z, i.glyphMap, i.glyphPositions, i.imagePositions, I, Ut, p, St, Bt, rt, ae, T.ao.vertical, !1, R, E)) - } - } - let ze = !1; - if (S.icon && S.icon.name) { - const be = i.imageMap[S.icon.name]; - be && (Y = Q0(i.imagePositions[S.icon.name], r.get("icon-offset").evaluate(S, {}, i.canonical), r.get("icon-anchor").evaluate(S, {}, i.canonical)), ze = !!be.sdf, i.bucket.sdfIcons === void 0 ? i.bucket.sdfIcons = ze : i.bucket.sdfIcons !== ze && Lt("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"), (be.pixelRatio !== i.bucket.pixelRatio || r.get("icon-rotate").constantOr(1) !== 0) && (i.bucket.iconsNeedLinear = !0)) - } - const me = H_(j.horizontal) || j.vertical; - i.bucket.iconsInText = !!me && me.iconsInText, (me || Y) && my(i.bucket, S, j, Y, i.imageMap, c, R, N, ae, ze, i.canonical, i.subdivisionGranularity) - } - i.showCollisionBoxes && i.bucket.generateCollisionDebugBuffers() - }, T.cI = Bp, T.cJ = Lp, T.cK = Rp, T.cL = Km, T.cM = Op, T.cN = class { - constructor(i) { - this._marks = { - start: [i.url, "start"].join("#"), - end: [i.url, "end"].join("#"), - measure: i.url.toString() - }, performance.mark(this._marks.start) - } - finish() { - performance.mark(this._marks.end); - let i = performance.getEntriesByName(this._marks.measure); - return i.length === 0 && (performance.measure(this._marks.measure, this._marks.start, this._marks.end), i = performance.getEntriesByName(this._marks.measure), performance.clearMarks(this._marks.start), performance.clearMarks(this._marks.end), performance.clearMeasures(this._marks.measure)), i - } - }, T.cO = function(i, t, r, a, c) { - return o(this, void 0, void 0, (function*() { - if (Ae()) try { - return yield dr(i, t, r, a, c) - } catch {} - return (function(p, f, g, v, S) { - const I = p.width, - E = p.height; - _r && Ir || (_r = new OffscreenCanvas(I, E), Ir = _r.getContext("2d", { - willReadFrequently: !0 - })), _r.width = I, _r.height = E, Ir.drawImage(p, 0, 0, I, E); - const R = Ir.getImageData(f, g, v, S); - return Ir.clearRect(0, 0, I, E), R.data - })(i, t, r, a, c) - })) - }, T.cP = Om, T.cQ = W, T.cR = Xm, T.cS = Bl, T.cT = Co, T.cU = function(i, t) { - const r = new Map; - if (i != null) - if (i.type === "Feature") r.set(mu(i, t), i); - else - for (const a of i.features) r.set(mu(a, t), a); - return r - }, T.cV = function(i, t) { - if (i == null) return !0; - if (i.type === "Feature") return mu(i, t) != null; - if (i.type === "FeatureCollection") { - const r = new Set; - for (const a of i.features) { - const c = mu(a, t); - if (c == null || r.has(c)) return !1; - r.add(c) - } - return !0 - } - return !1 - }, T.cW = function(i, t, r) { - var a, c, p, f; - if (t.removeAll && i.clear(), t.remove) - for (const g of t.remove) i.delete(g); - if (t.add) - for (const g of t.add) { - const v = mu(g, r); - v != null && i.set(v, g) - } - if (t.update) - for (const g of t.update) { - let v = i.get(g.id); - if (v == null) continue; - const S = !g.removeAllProperties && (((a = g.removeProperties) === null || a === void 0 ? void 0 : a.length) > 0 || ((c = g.addOrUpdateProperties) === null || c === void 0 ? void 0 : c.length) > 0); - if ((g.newGeometry || g.removeAllProperties || S) && (v = Object.assign({}, v), i.set(g.id, v), S && (v.properties = Object.assign({}, v.properties))), g.newGeometry && (v.geometry = g.newGeometry), g.removeAllProperties) v.properties = {}; - else if (((p = g.removeProperties) === null || p === void 0 ? void 0 : p.length) > 0) - for (const I of g.removeProperties) Object.prototype.hasOwnProperty.call(v.properties, I) && delete v.properties[I]; - if (((f = g.addOrUpdateProperties) === null || f === void 0 ? void 0 : f.length) > 0) - for (const { - key: I, - value: E - } - of g.addOrUpdateProperties) v.properties[I] = E - } - }, T.cX = Ca, T.ca = function(i, t) { - return i[0] = t[0], i[1] = t[1], i[2] = t[2], i[3] = t[3], i[4] = t[4], i[5] = t[5], i[6] = t[6], i[7] = t[7], i[8] = t[8], i[9] = t[9], i[10] = t[10], i[11] = t[11], i[12] = t[12], i[13] = t[13], i[14] = t[14], i[15] = t[15], i - }, T.cb = i => i.type === "symbol", T.cc = i => i.type === "circle", T.cd = i => i.type === "heatmap", T.ce = i => i.type === "line", T.cf = i => i.type === "fill", T.cg = i => i.type === "fill-extrusion", T.ch = i => i.type === "hillshade", T.ci = i => i.type === "color-relief", T.cj = i => i.type === "raster", T.ck = i => i.type === "background", T.cl = i => i.type === "custom", T.cm = Ct, T.cn = function(i, t, r) { - const a = _e(t.x - r.x, t.y - r.y), - c = _e(i.x - r.x, i.y - r.y); - var p, f; - return Mr(Math.atan2(a[0] * c[1] - a[1] * c[0], (p = a)[0] * (f = c)[0] + p[1] * f[1])) - }, T.co = _t, T.cp = function(i, t) { - return kr[t] && (i instanceof MouseEvent || i instanceof WheelEvent) - }, T.cq = function(i, t) { - return Ar[t] && "touches" in i - }, T.cr = function(i) { - return Ar[i] || kr[i] - }, T.cs = function(i, t, r) { - var a = t[0], - c = t[1]; - return i[0] = r[0] * a + r[4] * c + r[12], i[1] = r[1] * a + r[5] * c + r[13], i - }, T.ct = function(i, t) { - const { - x: r, - y: a - } = fu.fromLngLat(t); - return !(i < 0 || i > 25 || a < 0 || a >= 1 || r < 0 || r >= 1) - }, T.cu = function(i, t) { - return i[0] = t[0], i[1] = 0, i[2] = 0, i[3] = 0, i[4] = 0, i[5] = t[1], i[6] = 0, i[7] = 0, i[8] = 0, i[9] = 0, i[10] = t[2], i[11] = 0, i[12] = 0, i[13] = 0, i[14] = 0, i[15] = 1, i - }, T.cv = class extends Xs {}, T.cw = gy, T.cy = function(i) { - return i.message === Nr - }, T.cz = K, T.d = Le, T.e = pt, T.f = i => o(void 0, void 0, void 0, (function*() { - if (i.byteLength === 0) return createImageBitmap(new ImageData(1, 1)); - const t = new Blob([new Uint8Array(i)], { - type: "image/png" - }); - try { - return createImageBitmap(t) - } catch (r) { - throw new Error(`Could not load image because of ${r.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`) - } - })), T.g = q, T.h = i => new Promise(((t, r) => { - const a = new Image; - a.onload = () => { - t(a), URL.revokeObjectURL(a.src), a.onload = null, window.requestAnimationFrame((() => { - a.src = Ft - })) - }, a.onerror = () => r(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 c = new Blob([new Uint8Array(i)], { - type: "image/png" - }); - a.src = i.byteLength ? URL.createObjectURL(c) : Ft - })), T.i = Yt, T.j = (i, t) => ve(pt(i, { - type: "json" - }), t), T.k = Ye, T.l = ot, T.m = ve, T.n = (i, t) => ve(pt(i, { - type: "arrayBuffer" - }), t), T.o = function(i) { - return new Op(i).readFields(V0, []) - }, T.p = c_, T.q = iu, T.r = jn, T.s = jr, T.t = ed, T.u = si, T.v = xe, T.w = Lt, T.x = _p, T.y = Eo, T.z = $s - })), L("worker", ["./shared"], (function(T) { - class o { - constructor(O) { - this.keyCache = {}, O && this.replace(O) - } - replace(O) { - this._layerConfigs = {}, this._layers = {}, this.update(O, []) - } - update(O, q) { - for (const K of O) { - this._layerConfigs[K.id] = K; - const le = this._layers[K.id] = T.bJ(K); - le._featureFilter = T.aa(le.filter), this.keyCache[K.id] && delete this.keyCache[K.id] - } - for (const K of q) delete this.keyCache[K], delete this._layerConfigs[K], delete this._layers[K]; - this.familiesBySource = {}; - const G = T.cC(Object.values(this._layerConfigs), this.keyCache); - for (const K of G) { - const le = K.map((Ye => this._layers[Ye.id])), - ve = le[0]; - if (ve.visibility === "none") continue; - const Le = ve.source || ""; - let Ce = this.familiesBySource[Le]; - Ce || (Ce = this.familiesBySource[Le] = {}); - const Ze = ve.sourceLayer || "_geojsonTileLayer"; - let ot = Ce[Ze]; - ot || (ot = Ce[Ze] = []), ot.push(le) - } - } - } - class $ { - constructor(O) { - const q = {}, - G = []; - for (const Le in O) { - const Ce = O[Le], - Ze = q[Le] = {}; - for (const ot in Ce) { - const Ye = Ce[+ot]; - if (!Ye || Ye.bitmap.width === 0 || Ye.bitmap.height === 0) continue; - const Ot = { - x: 0, - y: 0, - w: Ye.bitmap.width + 2, - h: Ye.bitmap.height + 2 - }; - G.push(Ot), Ze[ot] = { - rect: Ot, - metrics: Ye.metrics - } - } - } - const { - w: K, - h: le - } = T.p(G), ve = new T.q({ - width: K || 1, - height: le || 1 - }); - for (const Le in O) { - const Ce = O[Le]; - for (const Ze in Ce) { - const ot = Ce[+Ze]; - if (!ot || ot.bitmap.width === 0 || ot.bitmap.height === 0) continue; - const Ye = q[Le][Ze].rect; - T.q.copy(ot.bitmap, ve, { - x: 0, - y: 0 - }, { - x: Ye.x + 1, - y: Ye.y + 1 - }, ot.bitmap) - } - } - this.image = ve, this.positions = q - } - } - T.cD("GlyphAtlas", $); - class W { - constructor(O) { - this.tileID = new T.Z(O.tileID.overscaledZ, O.tileID.wrap, O.tileID.canonical.z, O.tileID.canonical.x, O.tileID.canonical.y), this.uid = O.uid, this.zoom = O.zoom, this.pixelRatio = O.pixelRatio, this.tileSize = O.tileSize, this.source = O.source, this.overscaling = this.tileID.overscaleFactor(), this.showCollisionBoxes = O.showCollisionBoxes, this.collectResourceTiming = !!O.collectResourceTiming, this.returnDependencies = !!O.returnDependencies, this.promoteId = O.promoteId, this.inFlightDependencies = [], this.globalState = O.globalState - } - parse(O, q, G, K, le) { - return T._(this, void 0, void 0, (function*() { - this.status = "parsing", this.data = O, this.collisionBoxArray = new T.a8; - const ve = new T.cE(Object.keys(O.layers).sort()), - Le = new T.cF(this.tileID, this.promoteId); - Le.bucketLayerIDs = []; - const Ce = {}, - Ze = { - featureIndex: Le, - iconDependencies: {}, - patternDependencies: {}, - glyphDependencies: {}, - availableImages: G, - subdivisionGranularity: le - }, - ot = q.familiesBySource[this.source]; - for (const mr in ot) { - const gr = O.layers[mr]; - if (!gr) continue; - gr.version === 1 && T.w(`Vector tile source "${this.source}" layer "${mr}" does not use vector tile spec v2 and therefore may have some rendering errors.`); - const ai = ve.encode(mr), - Tt = []; - for (let Ci = 0; Ci < gr.length; Ci++) { - const di = gr.feature(Ci), - Pn = Le.getId(di, mr); - Tt.push({ - feature: di, - id: Pn, - index: Ci, - sourceLayerIndex: ai - }) - } - for (const Ci of ot[mr]) { - const di = Ci[0]; - di.source !== this.source && T.w(`layer.source = ${di.source} does not equal this.source = ${this.source}`), di.minzoom && this.zoom < Math.floor(di.minzoom) || di.maxzoom && this.zoom >= di.maxzoom || di.visibility !== "none" && (ie(Ci, this.zoom, G), (Ce[di.id] = di.createBucket({ - index: Le.bucketLayerIDs.length, - layers: Ci, - zoom: this.zoom, - pixelRatio: this.pixelRatio, - overscaling: this.overscaling, - collisionBoxArray: this.collisionBoxArray, - sourceLayerIndex: ai, - sourceID: this.source, - globalState: this.globalState - })).populate(Tt, Ze, this.tileID.canonical), Le.bucketLayerIDs.push(Ci.map((Pn => Pn.id)))) - } - } - const Ye = T.bN(Ze.glyphDependencies, (mr => Object.keys(mr).map(Number))); - this.inFlightDependencies.forEach((mr => mr == null ? void 0 : mr.abort())), this.inFlightDependencies = []; - let Ot = Promise.resolve({}); - if (Object.keys(Ye).length) { - const mr = new AbortController; - this.inFlightDependencies.push(mr), Ot = K.sendAsync({ - type: "GG", - data: { - stacks: Ye, - source: this.source, - tileID: this.tileID, - type: "glyphs" - } - }, mr) - } - const xe = Object.keys(Ze.iconDependencies); - let At = Promise.resolve({}); - if (xe.length) { - const mr = new AbortController; - this.inFlightDependencies.push(mr), At = K.sendAsync({ - type: "GI", - data: { - icons: xe, - source: this.source, - tileID: this.tileID, - type: "icons" - } - }, mr) - } - const Pt = Object.keys(Ze.patternDependencies); - let kt = Promise.resolve({}); - if (Pt.length) { - const mr = new AbortController; - this.inFlightDependencies.push(mr), kt = K.sendAsync({ - type: "GI", - data: { - icons: Pt, - source: this.source, - tileID: this.tileID, - type: "patterns" - } - }, mr) - } - const [Wt, Lr, Kr] = yield Promise.all([Ot, At, kt]), Hr = new $(Wt), $r = new T.cG(Lr, Kr); - for (const mr in Ce) { - const gr = Ce[mr]; - gr instanceof T.a9 ? (ie(gr.layers, this.zoom, G), T.cH({ - bucket: gr, - glyphMap: Wt, - glyphPositions: Hr.positions, - imageMap: Lr, - imagePositions: $r.iconPositions, - showCollisionBoxes: this.showCollisionBoxes, - canonical: this.tileID.canonical, - subdivisionGranularity: Ze.subdivisionGranularity - })) : gr.hasPattern && (gr instanceof T.cI || gr instanceof T.cJ || gr instanceof T.cK) && (ie(gr.layers, this.zoom, G), gr.addFeatures(Ze, this.tileID.canonical, $r.patternPositions)) - } - return this.status = "done", { - buckets: Object.values(Ce).filter((mr => !mr.isEmpty())), - featureIndex: Le, - collisionBoxArray: this.collisionBoxArray, - glyphAtlasImage: Hr.image, - imageAtlas: $r, - glyphMap: this.returnDependencies ? Wt : null, - iconMap: this.returnDependencies ? Lr : null, - glyphPositions: this.returnDependencies ? Hr.positions : null - } - })) - } - } - - function ie(ce, O, q) { - const G = new T.F(O); - for (const K of ce) K.recalculate(G, q) - } - class pe { - constructor(O, q, G) { - this.actor = O, this.layerIndex = q, this.availableImages = G, this.fetching = {}, this.loading = {}, this.loaded = {} - } - loadVectorTile(O, q) { - return T._(this, void 0, void 0, (function*() { - const G = yield T.n(O.request, q); - try { - return { - vectorTile: new T.cL(new T.cM(G.data)), - rawData: G.data, - cacheControl: G.cacheControl, - expires: G.expires - } - } catch (K) { - const le = new Uint8Array(G.data); - let ve = `Unable to parse the tile at ${O.request.url}, `; - throw ve += le[0] === 31 && le[1] === 139 ? "please make sure the data is not gzipped and that you have configured the relevant header in the server" : `got error: ${K.message}`, new Error(ve) - } - })) - } - loadTile(O) { - return T._(this, void 0, void 0, (function*() { - const q = O.uid, - G = !!(O && O.request && O.request.collectResourceTiming) && new T.cN(O.request), - K = new W(O); - this.loading[q] = K; - const le = new AbortController; - K.abort = le; - try { - const ve = yield this.loadVectorTile(O, le); - if (delete this.loading[q], !ve) return null; - const Le = ve.rawData, - Ce = {}; - ve.expires && (Ce.expires = ve.expires), ve.cacheControl && (Ce.cacheControl = ve.cacheControl); - const Ze = {}; - if (G) { - const Ye = G.finish(); - Ye && (Ze.resourceTiming = JSON.parse(JSON.stringify(Ye))) - } - K.vectorTile = ve.vectorTile; - const ot = K.parse(ve.vectorTile, this.layerIndex, this.availableImages, this.actor, O.subdivisionGranularity); - this.loaded[q] = K, this.fetching[q] = { - rawTileData: Le, - cacheControl: Ce, - resourceTiming: Ze - }; - try { - const Ye = yield ot; - return T.e({ - rawTileData: Le.slice(0) - }, Ye, Ce, Ze) - } finally { - delete this.fetching[q] - } - } catch (ve) { - throw delete this.loading[q], K.status = "done", this.loaded[q] = K, ve - } - })) - } - reloadTile(O) { - return T._(this, void 0, void 0, (function*() { - const q = O.uid; - if (!this.loaded || !this.loaded[q]) throw new Error("Should not be trying to reload a tile that was never loaded or has been removed"); - const G = this.loaded[q]; - if (G.showCollisionBoxes = O.showCollisionBoxes, G.globalState = O.globalState, G.status === "parsing") { - const K = yield G.parse(G.vectorTile, this.layerIndex, this.availableImages, this.actor, O.subdivisionGranularity); - let le; - if (this.fetching[q]) { - const { - rawTileData: ve, - cacheControl: Le, - resourceTiming: Ce - } = this.fetching[q]; - delete this.fetching[q], le = T.e({ - rawTileData: ve.slice(0) - }, K, Le, Ce) - } else le = K; - return le - } - if (G.status === "done" && G.vectorTile) return G.parse(G.vectorTile, this.layerIndex, this.availableImages, this.actor, O.subdivisionGranularity) - })) - } - abortTile(O) { - return T._(this, void 0, void 0, (function*() { - const q = this.loading, - G = O.uid; - q && q[G] && q[G].abort && (q[G].abort.abort(), delete q[G]) - })) - } - removeTile(O) { - return T._(this, void 0, void 0, (function*() { - this.loaded && this.loaded[O.uid] && delete this.loaded[O.uid] - })) - } - } - class ye { - constructor() { - this.loaded = {} - } - loadTile(O) { - return T._(this, void 0, void 0, (function*() { - const { - uid: q, - encoding: G, - rawImageData: K, - redFactor: le, - greenFactor: ve, - blueFactor: Le, - baseShift: Ce - } = O, Ze = K.width + 2, ot = K.height + 2, Ye = T.b(K) ? new T.R({ - width: Ze, - height: ot - }, yield T.cO(K, -1, -1, Ze, ot)) : K, Ot = new T.cP(q, Ye, G, le, ve, Le, Ce); - return this.loaded = this.loaded || {}, this.loaded[q] = Ot, Ot - })) - } - removeTile(O) { - const q = this.loaded, - G = O.uid; - q && q[G] && delete q[G] - } - } - var X, Se, we = (function() { - if (Se) return X; - - function ce(q, G) { - if (q.length !== 0) { - O(q[0], G); - for (var K = 1; K < q.length; K++) O(q[K], !G) - } - } - - function O(q, G) { - for (var K = 0, le = 0, ve = 0, Le = q.length, Ce = Le - 1; ve < Le; Ce = ve++) { - var Ze = (q[ve][0] - q[Ce][0]) * (q[Ce][1] + q[ve][1]), - ot = K + Ze; - le += Math.abs(K) >= Math.abs(Ze) ? K - ot + Ze : Ze - ot + K, K = ot - } - K + le >= 0 != !!G && q.reverse() - } - return Se = 1, X = function q(G, K) { - var le, ve = G && G.type; - if (ve === "FeatureCollection") - for (le = 0; le < G.features.length; le++) q(G.features[le], K); - else if (ve === "GeometryCollection") - for (le = 0; le < G.geometries.length; le++) q(G.geometries[le], K); - else if (ve === "Feature") q(G.geometry, K); - else if (ve === "Polygon") ce(G.coordinates, K); - else if (ve === "MultiPolygon") - for (le = 0; le < G.coordinates.length; le++) ce(G.coordinates[le], K); - return G - } - })(), - Re = T.cQ(we); - class Ae extends T.cS { - constructor(O, q) { - super(new T.cM, 0, q, [], []), this.feature = O, this.type = O.type, this.properties = O.tags ? O.tags : {}, "id" in O && (typeof O.id == "string" ? this.id = parseInt(O.id, 10) : typeof O.id != "number" || isNaN(O.id) || (this.id = O.id)) - } - loadGeometry() { - const O = [], - q = this.feature.type === 1 ? [this.feature.geometry] : this.feature.geometry; - for (const G of q) { - const K = []; - for (const le of G) K.push(new T.P(le[0], le[1])); - O.push(K) - } - return O - } - } - class Oe extends T.cR { - constructor(O, q) { - super(new T.cM), this.layers = { - _geojsonTileLayer: this - }, this.name = "_geojsonTileLayer", this.version = q ? q.version : 1, this.extent = q ? q.extent : 4096, this.length = O.length, this.features = O - } - feature(O) { - return new Ae(this.features[O], this.extent) - } - } - - function Ee(ce, O) { - O.writeVarintField(15, ce.version || 1), O.writeStringField(1, ce.name || ""), O.writeVarintField(5, ce.extent || 4096); - const q = { - keys: [], - values: [], - keycache: {}, - valuecache: {} - }; - for (let le = 0; le < ce.length; le++) q.feature = ce.feature(le), O.writeMessage(2, Ne, q); - const G = q.keys; - for (const le of G) O.writeStringField(3, le); - const K = q.values; - for (const le of K) O.writeMessage(4, Je, le) - } - - function Ne(ce, O) { - if (!ce.feature) return; - const q = ce.feature; - q.id !== void 0 && O.writeVarintField(1, q.id), O.writeMessage(2, ft, ce), O.writeVarintField(3, q.type), O.writeMessage(4, ct, q) - } - - function ft(ce, O) { - var q; - for (const G in (q = ce.feature) == null ? void 0 : q.properties) { - let K = ce.feature.properties[G], - le = ce.keycache[G]; - if (K === null) continue; - le === void 0 && (ce.keys.push(G), le = ce.keys.length - 1, ce.keycache[G] = le), O.writeVarint(le), typeof K != "string" && typeof K != "boolean" && typeof K != "number" && (K = JSON.stringify(K)); - const ve = typeof K + ":" + K; - let Le = ce.valuecache[ve]; - Le === void 0 && (ce.values.push(K), Le = ce.values.length - 1, ce.valuecache[ve] = Le), O.writeVarint(Le) - } - } - - function ht(ce, O) { - return (O << 3) + (7 & ce) - } - - function Xe(ce) { - return ce << 1 ^ ce >> 31 - } - - function ct(ce, O) { - const q = ce.loadGeometry(), - G = ce.type; - let K = 0, - le = 0; - for (const ve of q) { - let Le = 1; - G === 1 && (Le = ve.length), O.writeVarint(ht(1, Le)); - const Ce = G === 3 ? ve.length - 1 : ve.length; - for (let Ze = 0; Ze < Ce; Ze++) { - Ze === 1 && G !== 1 && O.writeVarint(ht(2, Ce - 1)); - const ot = ve[Ze].x - K, - Ye = ve[Ze].y - le; - O.writeVarint(Xe(ot)), O.writeVarint(Xe(Ye)), K += ot, le += Ye - } - ce.type === 3 && O.writeVarint(ht(7, 1)) - } - } - - function Je(ce, O) { - const q = typeof ce; - q === "string" ? O.writeStringField(1, ce) : q === "boolean" ? O.writeBooleanField(7, ce) : q === "number" && (ce % 1 != 0 ? O.writeDoubleField(3, ce) : ce < 0 ? O.writeSVarintField(6, ce) : O.writeVarintField(5, ce)) - } - const Be = { - minZoom: 0, - maxZoom: 16, - minPoints: 2, - radius: 40, - extent: 512, - nodeSize: 64, - log: !1, - generateId: !1, - reduce: null, - map: ce => ce - }, - st = Math.fround || (it = new Float32Array(1), ce => (it[0] = +ce, it[0])); - var it; - class Qe { - constructor(O) { - this.options = Object.assign(Object.create(Be), O), this.trees = new Array(this.options.maxZoom + 1), this.stride = this.options.reduce ? 7 : 6, this.clusterProps = [] - } - load(O) { - const { - log: q, - minZoom: G, - maxZoom: K - } = this.options; - q && console.time("total time"); - const le = `prepare ${O.length} points`; - q && console.time(le), this.points = O; - const ve = []; - for (let Ce = 0; Ce < O.length; Ce++) { - const Ze = O[Ce]; - if (!Ze.geometry) continue; - const [ot, Ye] = Ze.geometry.coordinates, Ot = st(Q(ot)), xe = st(te(Ye)); - ve.push(Ot, xe, 1 / 0, Ce, -1, 1), this.options.reduce && ve.push(0) - } - let Le = this.trees[K + 1] = this._createTree(ve); - q && console.timeEnd(le); - for (let Ce = K; Ce >= G; Ce--) { - const Ze = +Date.now(); - Le = this.trees[Ce] = this._createTree(this._cluster(Le, Ce)), q && console.log("z%d: %d clusters in %dms", Ce, Le.numItems, +Date.now() - Ze) - } - return q && console.timeEnd("total time"), this - } - getClusters(O, q) { - let G = ((O[0] + 180) % 360 + 360) % 360 - 180; - const K = Math.max(-90, Math.min(90, O[1])); - let le = O[2] === 180 ? 180 : ((O[2] + 180) % 360 + 360) % 360 - 180; - const ve = Math.max(-90, Math.min(90, O[3])); - if (O[2] - O[0] >= 360) G = -180, le = 180; - else if (G > le) { - const Ye = this.getClusters([G, K, 180, ve], q), - Ot = this.getClusters([-180, K, le, ve], q); - return Ye.concat(Ot) - } - const Le = this.trees[this._limitZoom(q)], - Ce = Le.range(Q(G), te(ve), Q(le), te(K)), - Ze = Le.data, - ot = []; - for (const Ye of Ce) { - const Ot = this.stride * Ye; - ot.push(Ze[Ot + 5] > 1 ? ke(Ze, Ot, this.clusterProps) : this.points[Ze[Ot + 3]]) - } - return ot - } - getChildren(O) { - const q = this._getOriginId(O), - G = this._getOriginZoom(O), - K = "No cluster with the specified id.", - le = this.trees[G]; - if (!le) throw new Error(K); - const ve = le.data; - if (q * this.stride >= ve.length) throw new Error(K); - const Le = this.options.radius / (this.options.extent * Math.pow(2, G - 1)), - Ce = le.within(ve[q * this.stride], ve[q * this.stride + 1], Le), - Ze = []; - for (const ot of Ce) { - const Ye = ot * this.stride; - ve[Ye + 4] === O && Ze.push(ve[Ye + 5] > 1 ? ke(ve, Ye, this.clusterProps) : this.points[ve[Ye + 3]]) - } - if (Ze.length === 0) throw new Error(K); - return Ze - } - getLeaves(O, q, G) { - const K = []; - return this._appendLeaves(K, O, q = q || 10, G = G || 0, 0), K - } - getTile(O, q, G) { - const K = this.trees[this._limitZoom(O)], - le = Math.pow(2, O), - { - extent: ve, - radius: Le - } = this.options, - Ce = Le / ve, - Ze = (G - Ce) / le, - ot = (G + 1 + Ce) / le, - Ye = { - features: [] - }; - return this._addTileFeatures(K.range((q - Ce) / le, Ze, (q + 1 + Ce) / le, ot), K.data, q, G, le, Ye), q === 0 && this._addTileFeatures(K.range(1 - Ce / le, Ze, 1, ot), K.data, le, G, le, Ye), q === le - 1 && this._addTileFeatures(K.range(0, Ze, Ce / le, ot), K.data, -1, G, le, Ye), Ye.features.length ? Ye : null - } - getClusterExpansionZoom(O) { - let q = this._getOriginZoom(O) - 1; - for (; q <= this.options.maxZoom;) { - const G = this.getChildren(O); - if (q++, G.length !== 1) break; - O = G[0].properties.cluster_id - } - return q - } - _appendLeaves(O, q, G, K, le) { - const ve = this.getChildren(q); - for (const Le of ve) { - const Ce = Le.properties; - if (Ce && Ce.cluster ? le + Ce.point_count <= K ? le += Ce.point_count : le = this._appendLeaves(O, Ce.cluster_id, G, K, le) : le < K ? le++ : O.push(Le), O.length === G) break - } - return le - } - _createTree(O) { - const q = new T.aI(O.length / this.stride | 0, this.options.nodeSize, Float32Array); - for (let G = 0; G < O.length; G += this.stride) q.add(O[G], O[G + 1]); - return q.finish(), q.data = O, q - } - _addTileFeatures(O, q, G, K, le, ve) { - for (const Le of O) { - const Ce = Le * this.stride, - Ze = q[Ce + 5] > 1; - let ot, Ye, Ot; - if (Ze) ot = vt(q, Ce, this.clusterProps), Ye = q[Ce], Ot = q[Ce + 1]; - else { - const Pt = this.points[q[Ce + 3]]; - ot = Pt.properties; - const [kt, Wt] = Pt.geometry.coordinates; - Ye = Q(kt), Ot = te(Wt) - } - const xe = { - type: 1, - geometry: [ - [Math.round(this.options.extent * (Ye * le - G)), Math.round(this.options.extent * (Ot * le - K))] - ], - tags: ot - }; - let At; - At = Ze || this.options.generateId ? q[Ce + 3] : this.points[q[Ce + 3]].id, At !== void 0 && (xe.id = At), ve.features.push(xe) - } - } - _limitZoom(O) { - return Math.max(this.options.minZoom, Math.min(Math.floor(+O), this.options.maxZoom + 1)) - } - _cluster(O, q) { - const { - radius: G, - extent: K, - reduce: le, - minPoints: ve - } = this.options, Le = G / (K * Math.pow(2, q)), Ce = O.data, Ze = [], ot = this.stride; - for (let Ye = 0; Ye < Ce.length; Ye += ot) { - if (Ce[Ye + 2] <= q) continue; - Ce[Ye + 2] = q; - const Ot = Ce[Ye], - xe = Ce[Ye + 1], - At = O.within(Ce[Ye], Ce[Ye + 1], Le), - Pt = Ce[Ye + 5]; - let kt = Pt; - for (const Wt of At) { - const Lr = Wt * ot; - Ce[Lr + 2] > q && (kt += Ce[Lr + 5]) - } - if (kt > Pt && kt >= ve) { - let Wt, Lr = Ot * Pt, - Kr = xe * Pt, - Hr = -1; - const $r = (Ye / ot << 5) + (q + 1) + this.points.length; - for (const mr of At) { - const gr = mr * ot; - if (Ce[gr + 2] <= q) continue; - Ce[gr + 2] = q; - const ai = Ce[gr + 5]; - Lr += Ce[gr] * ai, Kr += Ce[gr + 1] * ai, Ce[gr + 4] = $r, le && (Wt || (Wt = this._map(Ce, Ye, !0), Hr = this.clusterProps.length, this.clusterProps.push(Wt)), le(Wt, this._map(Ce, gr))) - } - Ce[Ye + 4] = $r, Ze.push(Lr / kt, Kr / kt, 1 / 0, $r, -1, kt), le && Ze.push(Hr) - } else { - for (let Wt = 0; Wt < ot; Wt++) Ze.push(Ce[Ye + Wt]); - if (kt > 1) - for (const Wt of At) { - const Lr = Wt * ot; - if (!(Ce[Lr + 2] <= q)) { - Ce[Lr + 2] = q; - for (let Kr = 0; Kr < ot; Kr++) Ze.push(Ce[Lr + Kr]) - } - } - } - } - return Ze - } - _getOriginId(O) { - return O - this.points.length >> 5 - } - _getOriginZoom(O) { - return (O - this.points.length) % 32 - } - _map(O, q, G) { - if (O[q + 5] > 1) { - const ve = this.clusterProps[O[q + 6]]; - return G ? Object.assign({}, ve) : ve - } - const K = this.points[O[q + 3]].properties, - le = this.options.map(K); - return G && le === K ? Object.assign({}, le) : le - } - } - - function ke(ce, O, q) { - return { - type: "Feature", - id: ce[O + 3], - properties: vt(ce, O, q), - geometry: { - type: "Point", - coordinates: [(G = ce[O], 360 * (G - .5)), _e(ce[O + 1])] - } - }; - var G - } - - function vt(ce, O, q) { - const G = ce[O + 5], - K = G >= 1e4 ? `${Math.round(G/1e3)}k` : G >= 1e3 ? Math.round(G / 100) / 10 + "k" : G, - le = ce[O + 6], - ve = le === -1 ? {} : Object.assign({}, q[le]); - return Object.assign(ve, { - cluster: !0, - cluster_id: ce[O + 3], - point_count: G, - point_count_abbreviated: K - }) - } - - function Q(ce) { - return ce / 360 + .5 - } - - function te(ce) { - const O = Math.sin(ce * Math.PI / 180), - q = .5 - .25 * Math.log((1 + O) / (1 - O)) / Math.PI; - return q < 0 ? 0 : q > 1 ? 1 : q - } - - function _e(ce) { - const O = (180 - 360 * ce) * Math.PI / 180; - return 360 * Math.atan(Math.exp(O)) / Math.PI - 90 - } - - function ne(ce, O, q, G) { - let K = G; - const le = O + (q - O >> 1); - let ve, Le = q - O; - const Ce = ce[O], - Ze = ce[O + 1], - ot = ce[q], - Ye = ce[q + 1]; - for (let Ot = O + 3; Ot < q; Ot += 3) { - const xe = Pe(ce[Ot], ce[Ot + 1], Ce, Ze, ot, Ye); - if (xe > K) ve = Ot, K = xe; - else if (xe === K) { - const At = Math.abs(Ot - le); - At < Le && (ve = Ot, Le = At) - } - } - K > G && (ve - O > 3 && ne(ce, O, ve, G), ce[ve + 2] = K, q - ve > 3 && ne(ce, ve, q, G)) - } - - function Pe(ce, O, q, G, K, le) { - let ve = K - q, - Le = le - G; - if (ve !== 0 || Le !== 0) { - const Ce = ((ce - q) * ve + (O - G) * Le) / (ve * ve + Le * Le); - Ce > 1 ? (q = K, G = le) : Ce > 0 && (q += ve * Ce, G += Le * Ce) - } - return ve = ce - q, Le = O - G, ve * ve + Le * Le - } - - function Me(ce, O, q, G) { - const K = { - id: ce ?? null, - type: O, - geometry: q, - tags: G, - minX: 1 / 0, - minY: 1 / 0, - maxX: -1 / 0, - maxY: -1 / 0 - }; - if (O === "Point" || O === "MultiPoint" || O === "LineString") at(K, q); - else if (O === "Polygon") at(K, q[0]); - else if (O === "MultiLineString") - for (const le of q) at(K, le); - else if (O === "MultiPolygon") - for (const le of q) at(K, le[0]); - return K - } - - function at(ce, O) { - for (let q = 0; q < O.length; q += 3) ce.minX = Math.min(ce.minX, O[q]), ce.minY = Math.min(ce.minY, O[q + 1]), ce.maxX = Math.max(ce.maxX, O[q]), ce.maxY = Math.max(ce.maxY, O[q + 1]) - } - - function We(ce, O, q, G) { - if (!O.geometry) return; - const K = O.geometry.coordinates; - if (K && K.length === 0) return; - const le = O.geometry.type, - ve = Math.pow(q.tolerance / ((1 << q.maxZoom) * q.extent), 2); - let Le = [], - Ce = O.id; - if (q.promoteId ? Ce = O.properties[q.promoteId] : q.generateId && (Ce = G || 0), le === "Point") Ct(K, Le); - else if (le === "MultiPoint") - for (const Ze of K) Ct(Ze, Le); - else if (le === "LineString") _t(K, Le, ve, !1); - else if (le === "MultiLineString") { - if (q.lineMetrics) { - for (const Ze of K) Le = [], _t(Ze, Le, ve, !1), ce.push(Me(Ce, "LineString", Le, O.properties)); - return - } - xt(K, Le, ve, !1) - } else if (le === "Polygon") xt(K, Le, ve, !0); - else { - if (le !== "MultiPolygon") { - if (le === "GeometryCollection") { - for (const Ze of O.geometry.geometries) We(ce, { - id: Ce, - geometry: Ze, - properties: O.properties - }, q, G); - return - } - throw new Error("Input data is not a valid GeoJSON object.") - } - for (const Ze of K) { - const ot = []; - xt(Ze, ot, ve, !0), Le.push(ot) - } - } - ce.push(Me(Ce, le, Le, O.properties)) - } - - function Ct(ce, O) { - O.push(tt(ce[0]), pt(ce[1]), 0) - } - - function _t(ce, O, q, G) { - let K, le, ve = 0; - for (let Ce = 0; Ce < ce.length; Ce++) { - const Ze = tt(ce[Ce][0]), - ot = pt(ce[Ce][1]); - O.push(Ze, ot, 0), Ce > 0 && (ve += G ? (K * ot - Ze * le) / 2 : Math.sqrt(Math.pow(Ze - K, 2) + Math.pow(ot - le, 2))), K = Ze, le = ot - } - const Le = O.length - 3; - O[2] = 1, ne(O, 0, Le, q), O[Le + 2] = 1, O.size = Math.abs(ve), O.start = 0, O.end = O.size - } - - function xt(ce, O, q, G) { - for (let K = 0; K < ce.length; K++) { - const le = []; - _t(ce[K], le, q, G), O.push(le) - } - } - - function tt(ce) { - return ce / 360 + .5 - } - - function pt(ce) { - const O = Math.sin(ce * Math.PI / 180), - q = .5 - .25 * Math.log((1 + O) / (1 - O)) / Math.PI; - return q < 0 ? 0 : q > 1 ? 1 : q - } - - function It(ce, O, q, G, K, le, ve, Le) { - if (G /= O, le >= (q /= O) && ve < G) return ce; - if (ve < q || le >= G) return null; - const Ce = []; - for (const Ze of ce) { - const ot = Ze.geometry; - let Ye = Ze.type; - const Ot = K === 0 ? Ze.minX : Ze.minY, - xe = K === 0 ? Ze.maxX : Ze.maxY; - if (Ot >= q && xe < G) { - Ce.push(Ze); - continue - } - if (xe < q || Ot >= G) continue; - let At = []; - if (Ye === "Point" || Ye === "MultiPoint") ut(ot, At, q, G, K); - else if (Ye === "LineString") bt(ot, At, q, G, K, !1, Le.lineMetrics); - else if (Ye === "MultiLineString") dt(ot, At, q, G, K, !1); - else if (Ye === "Polygon") dt(ot, At, q, G, K, !0); - else if (Ye === "MultiPolygon") - for (const Pt of ot) { - const kt = []; - dt(Pt, kt, q, G, K, !0), kt.length && At.push(kt) - } - if (At.length) { - if (Le.lineMetrics && Ye === "LineString") { - for (const Pt of At) Ce.push(Me(Ze.id, Ye, Pt, Ze.tags)); - continue - } - Ye !== "LineString" && Ye !== "MultiLineString" || (At.length === 1 ? (Ye = "LineString", At = At[0]) : Ye = "MultiLineString"), Ye !== "Point" && Ye !== "MultiPoint" || (Ye = At.length === 3 ? "Point" : "MultiPoint"), Ce.push(Me(Ze.id, Ye, At, Ze.tags)) - } - } - return Ce.length ? Ce : null - } - - function ut(ce, O, q, G, K) { - for (let le = 0; le < ce.length; le += 3) { - const ve = ce[le + K]; - ve >= q && ve <= G && Lt(O, ce[le], ce[le + 1], ce[le + 2]) - } - } - - function bt(ce, O, q, G, K, le, ve) { - let Le = wt(ce); - const Ce = K === 0 ? Xt : Yt; - let Ze, ot, Ye = ce.start; - for (let kt = 0; kt < ce.length - 3; kt += 3) { - const Wt = ce[kt], - Lr = ce[kt + 1], - Kr = ce[kt + 2], - Hr = ce[kt + 3], - $r = ce[kt + 4], - mr = K === 0 ? Wt : Lr, - gr = K === 0 ? Hr : $r; - let ai = !1; - ve && (Ze = Math.sqrt(Math.pow(Wt - Hr, 2) + Math.pow(Lr - $r, 2))), mr < q ? gr > q && (ot = Ce(Le, Wt, Lr, Hr, $r, q), ve && (Le.start = Ye + Ze * ot)) : mr > G ? gr < G && (ot = Ce(Le, Wt, Lr, Hr, $r, G), ve && (Le.start = Ye + Ze * ot)) : Lt(Le, Wt, Lr, Kr), gr < q && mr >= q && (ot = Ce(Le, Wt, Lr, Hr, $r, q), ai = !0), gr > G && mr <= G && (ot = Ce(Le, Wt, Lr, Hr, $r, G), ai = !0), !le && ai && (ve && (Le.end = Ye + Ze * ot), O.push(Le), Le = wt(ce)), ve && (Ye += Ze) - } - let Ot = ce.length - 3; - const xe = ce[Ot], - At = ce[Ot + 1], - Pt = K === 0 ? xe : At; - Pt >= q && Pt <= G && Lt(Le, xe, At, ce[Ot + 2]), Ot = Le.length - 3, le && Ot >= 3 && (Le[Ot] !== Le[0] || Le[Ot + 1] !== Le[1]) && Lt(Le, Le[0], Le[1], Le[2]), Le.length && O.push(Le) - } - - function wt(ce) { - const O = []; - return O.size = ce.size, O.start = ce.start, O.end = ce.end, O - } - - function dt(ce, O, q, G, K, le) { - for (const ve of ce) bt(ve, O, q, G, K, le, !1) - } - - function Lt(ce, O, q, G) { - ce.push(O, q, G) - } - - function Xt(ce, O, q, G, K, le) { - const ve = (le - O) / (G - O); - return Lt(ce, le, q + (K - q) * ve, 1), ve - } - - function Yt(ce, O, q, G, K, le) { - const ve = (le - q) / (K - q); - return Lt(ce, O + (G - O) * ve, le, 1), ve - } - - function nr(ce, O) { - const q = []; - for (let G = 0; G < ce.length; G++) { - const K = ce[G], - le = K.type; - let ve; - if (le === "Point" || le === "MultiPoint" || le === "LineString") ve = ar(K.geometry, O); - else if (le === "MultiLineString" || le === "Polygon") { - ve = []; - for (const Le of K.geometry) ve.push(ar(Le, O)) - } else if (le === "MultiPolygon") { - ve = []; - for (const Le of K.geometry) { - const Ce = []; - for (const Ze of Le) Ce.push(ar(Ze, O)); - ve.push(Ce) - } - } - q.push(Me(K.id, le, ve, K.tags)) - } - return q - } - - function ar(ce, O) { - const q = []; - q.size = ce.size, ce.start !== void 0 && (q.start = ce.start, q.end = ce.end); - for (let G = 0; G < ce.length; G += 3) q.push(ce[G] + O, ce[G + 1], ce[G + 2]); - return q - } - - function Ft(ce, O) { - if (ce.transformed) return ce; - const q = 1 << ce.z, - G = ce.x, - K = ce.y; - for (const le of ce.features) { - const ve = le.geometry, - Le = le.type; - if (le.geometry = [], Le === 1) - for (let Ce = 0; Ce < ve.length; Ce += 2) le.geometry.push(dr(ve[Ce], ve[Ce + 1], O, q, G, K)); - else - for (let Ce = 0; Ce < ve.length; Ce++) { - const Ze = []; - for (let ot = 0; ot < ve[Ce].length; ot += 2) Ze.push(dr(ve[Ce][ot], ve[Ce][ot + 1], O, q, G, K)); - le.geometry.push(Ze) - } - } - return ce.transformed = !0, ce - } - - function dr(ce, O, q, G, K, le) { - return [Math.round(q * (ce * G - K)), Math.round(q * (O * G - le))] - } - - function _r(ce, O, q, G, K) { - const le = O === K.maxZoom ? 0 : K.tolerance / ((1 << O) * K.extent), - ve = { - features: [], - numPoints: 0, - numSimplified: 0, - numFeatures: ce.length, - source: null, - x: q, - y: G, - z: O, - transformed: !1, - minX: 2, - minY: 1, - maxX: -1, - maxY: 0 - }; - for (const Le of ce) Ir(ve, Le, le, K); - return ve - } - - function Ir(ce, O, q, G) { - const K = O.geometry, - le = O.type, - ve = []; - if (ce.minX = Math.min(ce.minX, O.minX), ce.minY = Math.min(ce.minY, O.minY), ce.maxX = Math.max(ce.maxX, O.maxX), ce.maxY = Math.max(ce.maxY, O.maxY), le === "Point" || le === "MultiPoint") - for (let Le = 0; Le < K.length; Le += 3) ve.push(K[Le], K[Le + 1]), ce.numPoints++, ce.numSimplified++; - else if (le === "LineString") jr(ve, K, ce, q, !1, !1); - else if (le === "MultiLineString" || le === "Polygon") - for (let Le = 0; Le < K.length; Le++) jr(ve, K[Le], ce, q, le === "Polygon", Le === 0); - else if (le === "MultiPolygon") - for (let Le = 0; Le < K.length; Le++) { - const Ce = K[Le]; - for (let Ze = 0; Ze < Ce.length; Ze++) jr(ve, Ce[Ze], ce, q, !0, Ze === 0) - } - if (ve.length) { - let Le = O.tags || null; - if (le === "LineString" && G.lineMetrics) { - Le = {}; - for (const Ze in O.tags) Le[Ze] = O.tags[Ze]; - Le.mapbox_clip_start = K.start / K.size, Le.mapbox_clip_end = K.end / K.size - } - const Ce = { - geometry: ve, - type: le === "Polygon" || le === "MultiPolygon" ? 3 : le === "LineString" || le === "MultiLineString" ? 2 : 1, - tags: Le - }; - O.id !== null && (Ce.id = O.id), ce.features.push(Ce) - } - } - - function jr(ce, O, q, G, K, le) { - const ve = G * G; - if (G > 0 && O.size < (K ? ve : G)) return void(q.numPoints += O.length / 3); - const Le = []; - for (let Ce = 0; Ce < O.length; Ce += 3)(G === 0 || O[Ce + 2] > ve) && (q.numSimplified++, Le.push(O[Ce], O[Ce + 1])), q.numPoints++; - K && (function(Ce, Ze) { - let ot = 0; - for (let Ye = 0, Ot = Ce.length, xe = Ot - 2; Ye < Ot; xe = Ye, Ye += 2) ot += (Ce[Ye] - Ce[xe]) * (Ce[Ye + 1] + Ce[xe + 1]); - if (ot > 0 === Ze) - for (let Ye = 0, Ot = Ce.length; Ye < Ot / 2; Ye += 2) { - const xe = Ce[Ye], - At = Ce[Ye + 1]; - Ce[Ye] = Ce[Ot - 2 - Ye], Ce[Ye + 1] = Ce[Ot - 1 - Ye], Ce[Ot - 2 - Ye] = xe, Ce[Ot - 1 - Ye] = At - } - })(Le, le), ce.push(Le) - } - const ur = { - maxZoom: 14, - indexMaxZoom: 5, - indexMaxPoints: 1e5, - tolerance: 3, - extent: 4096, - buffer: 64, - lineMetrics: !1, - promoteId: null, - generateId: !1, - debug: 0 - }; - class Mr { - constructor(O, q) { - const G = (q = this.options = (function(le, ve) { - for (const Le in ve) le[Le] = ve[Le]; - return le - })(Object.create(ur), q)).debug; - if (G && console.time("preprocess data"), q.maxZoom < 0 || q.maxZoom > 24) throw new Error("maxZoom should be in the 0-24 range"); - if (q.promoteId && q.generateId) throw new Error("promoteId and generateId cannot be used together."); - let K = (function(le, ve) { - const Le = []; - if (le.type === "FeatureCollection") - for (let Ce = 0; Ce < le.features.length; Ce++) We(Le, le.features[Ce], ve, Ce); - else We(Le, le.type === "Feature" ? le : { - geometry: le - }, ve); - return Le - })(O, q); - this.tiles = {}, this.tileCoords = [], G && (console.timeEnd("preprocess data"), console.log("index: maxZoom: %d, maxPoints: %d", q.indexMaxZoom, q.indexMaxPoints), console.time("generate tiles"), this.stats = {}, this.total = 0), K = (function(le, ve) { - const Le = ve.buffer / ve.extent; - let Ce = le; - const Ze = It(le, 1, -1 - Le, Le, 0, -1, 2, ve), - ot = It(le, 1, 1 - Le, 2 + Le, 0, -1, 2, ve); - return (Ze || ot) && (Ce = It(le, 1, -Le, 1 + Le, 0, -1, 2, ve) || [], Ze && (Ce = nr(Ze, 1).concat(Ce)), ot && (Ce = Ce.concat(nr(ot, -1)))), Ce - })(K, q), K.length && this.splitTile(K, 0, 0, 0), G && (K.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))) - } - splitTile(O, q, G, K, le, ve, Le) { - const Ce = [O, q, G, K], - Ze = this.options, - ot = Ze.debug; - for (; Ce.length;) { - K = Ce.pop(), G = Ce.pop(), q = Ce.pop(), O = Ce.pop(); - const Ye = 1 << q, - Ot = Ar(q, G, K); - let xe = this.tiles[Ot]; - if (!xe && (ot > 1 && console.time("creation"), xe = this.tiles[Ot] = _r(O, q, G, K, Ze), this.tileCoords.push({ - z: q, - x: G, - y: K - }), ot)) { - ot > 1 && (console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)", q, G, K, xe.numFeatures, xe.numPoints, xe.numSimplified), console.timeEnd("creation")); - const ai = `z${q}`; - this.stats[ai] = (this.stats[ai] || 0) + 1, this.total++ - } - if (xe.source = O, le == null) { - if (q === Ze.indexMaxZoom || xe.numPoints <= Ze.indexMaxPoints) continue - } else { - if (q === Ze.maxZoom || q === le) continue; - if (le != null) { - const ai = le - q; - if (G !== ve >> ai || K !== Le >> ai) continue - } - } - if (xe.source = null, O.length === 0) continue; - ot > 1 && console.time("clipping"); - const At = .5 * Ze.buffer / Ze.extent, - Pt = .5 - At, - kt = .5 + At, - Wt = 1 + At; - let Lr = null, - Kr = null, - Hr = null, - $r = null, - mr = It(O, Ye, G - At, G + kt, 0, xe.minX, xe.maxX, Ze), - gr = It(O, Ye, G + Pt, G + Wt, 0, xe.minX, xe.maxX, Ze); - O = null, mr && (Lr = It(mr, Ye, K - At, K + kt, 1, xe.minY, xe.maxY, Ze), Kr = It(mr, Ye, K + Pt, K + Wt, 1, xe.minY, xe.maxY, Ze), mr = null), gr && (Hr = It(gr, Ye, K - At, K + kt, 1, xe.minY, xe.maxY, Ze), $r = It(gr, Ye, K + Pt, K + Wt, 1, xe.minY, xe.maxY, Ze), gr = null), ot > 1 && console.timeEnd("clipping"), Ce.push(Lr || [], q + 1, 2 * G, 2 * K), Ce.push(Kr || [], q + 1, 2 * G, 2 * K + 1), Ce.push(Hr || [], q + 1, 2 * G + 1, 2 * K), Ce.push($r || [], q + 1, 2 * G + 1, 2 * K + 1) - } - } - getTile(O, q, G) { - O = +O, q = +q, G = +G; - const K = this.options, - { - extent: le, - debug: ve - } = K; - if (O < 0 || O > 24) return null; - const Le = 1 << O, - Ce = Ar(O, q = q + Le & Le - 1, G); - if (this.tiles[Ce]) return Ft(this.tiles[Ce], le); - ve > 1 && console.log("drilling down to z%d-%d-%d", O, q, G); - let Ze, ot = O, - Ye = q, - Ot = G; - for (; !Ze && ot > 0;) ot--, Ye >>= 1, Ot >>= 1, Ze = this.tiles[Ar(ot, Ye, Ot)]; - return Ze && Ze.source ? (ve > 1 && (console.log("found parent tile z%d-%d-%d", ot, Ye, Ot), console.time("drilling down")), this.splitTile(Ze.source, ot, Ye, Ot, O, q, G), ve > 1 && console.timeEnd("drilling down"), this.tiles[Ce] ? Ft(this.tiles[Ce], le) : null) : null - } - } - - function Ar(ce, O, q) { - return 32 * ((1 << ce) * q + O) + ce - } - class kr extends pe { - constructor() { - super(...arguments), this._dataUpdateable = new Map - } - loadVectorTile(O, q) { - return T._(this, void 0, void 0, (function*() { - const G = O.tileID.canonical; - if (!this._geoJSONIndex) throw new Error("Unable to parse the data into a cluster or geojson"); - const K = this._geoJSONIndex.getTile(G.z, G.x, G.y); - if (!K) return null; - const le = new Oe(K.features, { - version: 2, - extent: T.$ - }); - let ve = (function(Le) { - const Ce = new T.cM; - return (function(Ze, ot) { - for (const Ye in Ze.layers) ot.writeMessage(3, Ee, Ze.layers[Ye]) - })(Le, Ce), Ce.finish() - })(le); - return ve.byteOffset === 0 && ve.byteLength === ve.buffer.byteLength || (ve = new Uint8Array(ve)), { - vectorTile: le, - rawData: ve.buffer - } - })) - } - loadData(O) { - return T._(this, void 0, void 0, (function*() { - var q; - (q = this._pendingRequest) === null || q === void 0 || q.abort(); - const G = !!(O && O.request && O.request.collectResourceTiming) && new T.cN(O.request); - this._pendingRequest = new AbortController; - try { - this._pendingData = this.loadAndProcessGeoJSON(O, this._pendingRequest); - const K = yield this._pendingData; - this._geoJSONIndex = O.cluster ? new Qe((function({ - superclusterOptions: ve, - clusterProperties: Le - }) { - if (!Le || !ve) return ve; - const Ce = {}, - Ze = {}, - ot = { - accumulated: null, - zoom: 0 - }, - Ye = { - properties: null - }, - Ot = Object.keys(Le); - for (const xe of Ot) { - const [At, Pt] = Le[xe], kt = T.cT(Pt), Wt = T.cT(typeof At == "string" ? [At, ["accumulated"], - ["get", xe] - ] : At); - Ce[xe] = kt.value, Ze[xe] = Wt.value - } - return ve.map = xe => { - Ye.properties = xe; - const At = {}; - for (const Pt of Ot) At[Pt] = Ce[Pt].evaluate(ot, Ye); - return At - }, ve.reduce = (xe, At) => { - Ye.properties = At; - for (const Pt of Ot) ot.accumulated = xe[Pt], xe[Pt] = Ze[Pt].evaluate(ot, Ye) - }, ve - })(O)).load(K.features) : (function(ve, Le) { - return new Mr(ve, Le) - })(K, O.geojsonVtOptions), this.loaded = {}; - const le = { - data: K - }; - if (G) { - const ve = G.finish(); - ve && (le.resourceTiming = {}, le.resourceTiming[O.source] = JSON.parse(JSON.stringify(ve))) - } - return le - } catch (K) { - if (delete this._pendingRequest, T.cy(K)) return { - abandoned: !0 - }; - throw K - } - })) - } - getData() { - return T._(this, void 0, void 0, (function*() { - return this._pendingData - })) - } - reloadTile(O) { - const q = this.loaded; - return q && q[O.uid] ? super.reloadTile(O) : this.loadTile(O) - } - loadAndProcessGeoJSON(O, q) { - return T._(this, void 0, void 0, (function*() { - let G = yield this.loadGeoJSON(O, q); - if (delete this._pendingRequest, typeof G != "object") throw new Error(`Input data given to '${O.source}' is not a valid GeoJSON object.`); - if (Re(G, !0), O.filter) { - const K = T.cT(O.filter, { - type: "boolean", - "property-type": "data-driven", - overridable: !1, - transition: !1 - }); - if (K.result === "error") throw new Error(K.value.map((ve => `${ve.key}: ${ve.message}`)).join(", ")); - G = { - type: "FeatureCollection", - features: G.features.filter((ve => K.value.evaluate({ - zoom: 0 - }, ve))) - } - } - return G - })) - } - loadGeoJSON(O, q) { - return T._(this, void 0, void 0, (function*() { - const { - promoteId: G - } = O; - if (O.request) { - const K = yield T.j(O.request, q); - return this._dataUpdateable = T.cV(K.data, G) ? T.cU(K.data, G) : void 0, K.data - } - if (typeof O.data == "string") try { - const K = JSON.parse(O.data); - return this._dataUpdateable = T.cV(K, G) ? T.cU(K, G) : void 0, K - } catch { - throw new Error(`Input data given to '${O.source}' is not a valid GeoJSON object.`) - } - if (!O.dataDiff) throw new Error(`Input data given to '${O.source}' is not a valid GeoJSON object.`); - if (!this._dataUpdateable) throw new Error(`Cannot update existing geojson data in ${O.source}`); - return T.cW(this._dataUpdateable, O.dataDiff, G), { - type: "FeatureCollection", - features: Array.from(this._dataUpdateable.values()) - } - })) - } - removeSource(O) { - return T._(this, void 0, void 0, (function*() { - this._pendingRequest && this._pendingRequest.abort() - })) - } - getClusterExpansionZoom(O) { - return this._geoJSONIndex.getClusterExpansionZoom(O.clusterId) - } - getClusterChildren(O) { - return this._geoJSONIndex.getChildren(O.clusterId) - } - getClusterLeaves(O) { - return this._geoJSONIndex.getLeaves(O.clusterId, O.limit, O.offset) - } - } - class Nr { - constructor(O) { - this.self = O, this.actor = new T.J(O), this.layerIndexes = {}, this.availableImages = {}, this.workerSources = {}, this.demWorkerSources = {}, this.externalWorkerSourceTypes = {}, this.self.registerWorkerSource = (q, G) => { - if (this.externalWorkerSourceTypes[q]) throw new Error(`Worker source with name "${q}" already registered.`); - this.externalWorkerSourceTypes[q] = G - }, this.self.addProtocol = T.cA, this.self.removeProtocol = T.cB, this.self.registerRTLTextPlugin = q => { - T.cX.setMethods(q) - }, this.actor.registerMessageHandler("LDT", ((q, G) => this._getDEMWorkerSource(q, G.source).loadTile(G))), this.actor.registerMessageHandler("RDT", ((q, G) => T._(this, void 0, void 0, (function*() { - this._getDEMWorkerSource(q, G.source).removeTile(G) - })))), this.actor.registerMessageHandler("GCEZ", ((q, G) => T._(this, void 0, void 0, (function*() { - return this._getWorkerSource(q, G.type, G.source).getClusterExpansionZoom(G) - })))), this.actor.registerMessageHandler("GCC", ((q, G) => T._(this, void 0, void 0, (function*() { - return this._getWorkerSource(q, G.type, G.source).getClusterChildren(G) - })))), this.actor.registerMessageHandler("GCL", ((q, G) => T._(this, void 0, void 0, (function*() { - return this._getWorkerSource(q, G.type, G.source).getClusterLeaves(G) - })))), this.actor.registerMessageHandler("LD", ((q, G) => this._getWorkerSource(q, G.type, G.source).loadData(G))), this.actor.registerMessageHandler("GD", ((q, G) => this._getWorkerSource(q, G.type, G.source).getData())), this.actor.registerMessageHandler("LT", ((q, G) => this._getWorkerSource(q, G.type, G.source).loadTile(G))), this.actor.registerMessageHandler("RT", ((q, G) => this._getWorkerSource(q, G.type, G.source).reloadTile(G))), this.actor.registerMessageHandler("AT", ((q, G) => this._getWorkerSource(q, G.type, G.source).abortTile(G))), this.actor.registerMessageHandler("RMT", ((q, G) => this._getWorkerSource(q, G.type, G.source).removeTile(G))), this.actor.registerMessageHandler("RS", ((q, G) => T._(this, void 0, void 0, (function*() { - if (!this.workerSources[q] || !this.workerSources[q][G.type] || !this.workerSources[q][G.type][G.source]) return; - const K = this.workerSources[q][G.type][G.source]; - delete this.workerSources[q][G.type][G.source], K.removeSource !== void 0 && K.removeSource(G) - })))), this.actor.registerMessageHandler("RM", (q => T._(this, void 0, void 0, (function*() { - delete this.layerIndexes[q], delete this.availableImages[q], delete this.workerSources[q], delete this.demWorkerSources[q] - })))), this.actor.registerMessageHandler("SR", ((q, G) => T._(this, void 0, void 0, (function*() { - this.referrer = G - })))), this.actor.registerMessageHandler("SRPS", ((q, G) => this._syncRTLPluginState(q, G))), this.actor.registerMessageHandler("IS", ((q, G) => T._(this, void 0, void 0, (function*() { - this.self.importScripts(G) - })))), this.actor.registerMessageHandler("SI", ((q, G) => this._setImages(q, G))), this.actor.registerMessageHandler("UL", ((q, G) => T._(this, void 0, void 0, (function*() { - this._getLayerIndex(q).update(G.layers, G.removedIds) - })))), this.actor.registerMessageHandler("SL", ((q, G) => T._(this, void 0, void 0, (function*() { - this._getLayerIndex(q).replace(G) - })))) - } - _setImages(O, q) { - return T._(this, void 0, void 0, (function*() { - this.availableImages[O] = q; - for (const G in this.workerSources[O]) { - const K = this.workerSources[O][G]; - for (const le in K) K[le].availableImages = q - } - })) - } - _syncRTLPluginState(O, q) { - return T._(this, void 0, void 0, (function*() { - return yield T.cX.syncState(q, this.self.importScripts) - })) - } - _getAvailableImages(O) { - let q = this.availableImages[O]; - return q || (q = []), q - } - _getLayerIndex(O) { - let q = this.layerIndexes[O]; - return q || (q = this.layerIndexes[O] = new o), q - } - _getWorkerSource(O, q, G) { - if (this.workerSources[O] || (this.workerSources[O] = {}), this.workerSources[O][q] || (this.workerSources[O][q] = {}), !this.workerSources[O][q][G]) { - const K = { - sendAsync: (le, ve) => (le.targetMapId = O, this.actor.sendAsync(le, ve)) - }; - switch (q) { - case "vector": - this.workerSources[O][q][G] = new pe(K, this._getLayerIndex(O), this._getAvailableImages(O)); - break; - case "geojson": - this.workerSources[O][q][G] = new kr(K, this._getLayerIndex(O), this._getAvailableImages(O)); - break; - default: - this.workerSources[O][q][G] = new this.externalWorkerSourceTypes[q](K, this._getLayerIndex(O), this._getAvailableImages(O)) - } - } - return this.workerSources[O][q][G] - } - _getDEMWorkerSource(O, q) { - return this.demWorkerSources[O] || (this.demWorkerSources[O] = {}), this.demWorkerSources[O][q] || (this.demWorkerSources[O][q] = new ye), this.demWorkerSources[O][q] - } - } - return T.i(self) && (self.worker = new Nr(self)), Nr - })), L("index", ["exports", "./shared"], (function(T, o) { - var $ = "5.6.2"; - - function W() { - var h = new o.A(4); - return o.A != Float32Array && (h[1] = 0, h[2] = 0), h[0] = 1, h[3] = 1, h - } - let ie, pe; - const ye = { - now: typeof performance < "u" && performance && performance.now ? performance.now.bind(performance) : Date.now.bind(Date), - frame(h, e, n) { - const s = requestAnimationFrame((d => { - u(), e(d) - })), - { - unsubscribe: u - } = o.s(h.signal, "abort", (() => { - u(), cancelAnimationFrame(s), n(o.c()) - }), !1) - }, - frameAsync(h) { - return new Promise(((e, n) => { - this.frame(h, e, n) - })) - }, - getImageData(h, e = 0) { - return this.getImageCanvasContext(h).getImageData(-e, -e, h.width + 2 * e, h.height + 2 * e) - }, - getImageCanvasContext(h) { - const e = window.document.createElement("canvas"), - n = e.getContext("2d", { - willReadFrequently: !0 - }); - if (!n) throw new Error("failed to create canvas 2d context"); - return e.width = h.width, e.height = h.height, n.drawImage(h, 0, 0, h.width, h.height), n - }, - resolveURL: h => (ie || (ie = document.createElement("a")), ie.href = h, ie.href), - hardwareConcurrency: typeof navigator < "u" && navigator.hardwareConcurrency || 4, - get prefersReducedMotion() { - return !!matchMedia && (pe == null && (pe = matchMedia("(prefers-reduced-motion: reduce)")), pe.matches) - } - }; - class X { - static testProp(e) { - if (!X.docStyle) return e[0]; - for (let n = 0; n < e.length; n++) - if (e[n] in X.docStyle) return e[n]; - return e[0] - } - static create(e, n, s) { - const u = window.document.createElement(e); - return n !== void 0 && (u.className = n), s && s.appendChild(u), u - } - static createNS(e, n) { - return window.document.createElementNS(e, n) - } - static disableDrag() { - X.docStyle && X.selectProp && (X.userSelect = X.docStyle[X.selectProp], X.docStyle[X.selectProp] = "none") - } - static enableDrag() { - X.docStyle && X.selectProp && (X.docStyle[X.selectProp] = X.userSelect) - } - static setTransform(e, n) { - e.style[X.transformProp] = n - } - static addEventListener(e, n, s, u = {}) { - e.addEventListener(n, s, "passive" in u ? u : u.capture) - } - static removeEventListener(e, n, s, u = {}) { - e.removeEventListener(n, s, "passive" in u ? u : u.capture) - } - static suppressClickInternal(e) { - e.preventDefault(), e.stopPropagation(), window.removeEventListener("click", X.suppressClickInternal, !0) - } - static suppressClick() { - window.addEventListener("click", X.suppressClickInternal, !0), window.setTimeout((() => { - window.removeEventListener("click", X.suppressClickInternal, !0) - }), 0) - } - static getScale(e) { - const n = e.getBoundingClientRect(); - return { - x: n.width / e.offsetWidth || 1, - y: n.height / e.offsetHeight || 1, - boundingClientRect: n - } - } - static getPoint(e, n, s) { - const u = n.boundingClientRect; - return new o.P((s.clientX - u.left) / n.x - e.clientLeft, (s.clientY - u.top) / n.y - e.clientTop) - } - static mousePos(e, n) { - const s = X.getScale(e); - return X.getPoint(e, s, n) - } - static touchPos(e, n) { - const s = [], - u = X.getScale(e); - for (let d = 0; d < n.length; d++) s.push(X.getPoint(e, u, n[d])); - return s - } - static mouseButton(e) { - return e.button - } - static remove(e) { - e.parentNode && e.parentNode.removeChild(e) - } - static sanitize(e) { - const n = new DOMParser().parseFromString(e, "text/html").body || document.createElement("body"), - s = n.querySelectorAll("script"); - for (const u of s) u.remove(); - return X.clean(n), n.innerHTML - } - static isPossiblyDangerous(e, n) { - const s = n.replace(/\s+/g, "").toLowerCase(); - return !(!["src", "href", "xlink:href"].includes(e) || !s.includes("javascript:") && !s.includes("data:")) || !!e.startsWith("on") || void 0 - } - static clean(e) { - const n = e.children; - for (const s of n) X.removeAttributes(s), X.clean(s) - } - static removeAttributes(e) { - for (const { - name: n, - value: s - } - of e.attributes) X.isPossiblyDangerous(n, s) && e.removeAttribute(n) - } - } - X.docStyle = typeof window < "u" && window.document && window.document.documentElement.style, X.selectProp = X.testProp(["userSelect", "MozUserSelect", "WebkitUserSelect", "msUserSelect"]), X.transformProp = X.testProp(["transform", "WebkitTransform"]); - const Se = { - supported: !1, - testSupport: function(h) { - !Ae && Re && (Oe ? Ee(h) : we = h) - } - }; - let we, Re, Ae = !1, - Oe = !1; - - function Ee(h) { - const e = h.createTexture(); - h.bindTexture(h.TEXTURE_2D, e); - try { - if (h.texImage2D(h.TEXTURE_2D, 0, h.RGBA, h.RGBA, h.UNSIGNED_BYTE, Re), h.isContextLost()) return; - Se.supported = !0 - } catch {} - h.deleteTexture(e), Ae = !0 - } - var Ne; - typeof document < "u" && (Re = document.createElement("img"), Re.onload = () => { - we && Ee(we), we = null, Oe = !0 - }, Re.onerror = () => { - Ae = !0, we = null - }, Re.src = "data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="), (function(h) { - let e, n, s, u; - h.resetRequestQueue = () => { - e = [], n = 0, s = 0, u = {} - }, h.addThrottleControl = w => { - const P = s++; - return u[P] = w, P - }, h.removeThrottleControl = w => { - delete u[w], m() - }, h.getImage = (w, P, M = !0) => new Promise(((D, z) => { - Se.supported && (w.headers || (w.headers = {}), w.headers.accept = "image/webp,*/*"), o.e(w, { - type: "image" - }), e.push({ - abortController: P, - requestParameters: w, - supportImageRefresh: M, - state: "queued", - onError: B => { - z(B) - }, - onSuccess: B => { - D(B) - } - }), m() - })); - const d = w => o._(this, void 0, void 0, (function*() { - w.state = "running"; - const { - requestParameters: P, - supportImageRefresh: M, - onError: D, - onSuccess: z, - abortController: B - } = w, U = M === !1 && !o.i(self) && !o.g(P.url) && (!P.headers || Object.keys(P.headers).reduce(((re, se) => re && se === "accept"), !0)); - n++; - const ee = U ? y(P, B) : o.m(P, B); - try { - const re = yield ee; - delete w.abortController, w.state = "completed", re.data instanceof HTMLImageElement || o.b(re.data) ? z(re) : re.data && z({ - data: yield(J = re.data, typeof createImageBitmap == "function" ? o.f(J) : o.h(J)), - cacheControl: re.cacheControl, - expires: re.expires - }) - } catch (re) { - delete w.abortController, D(re) - } finally { - n--, m() - } - var J - })), - m = () => { - const w = (() => { - for (const P of Object.keys(u)) - if (u[P]()) return !0; - return !1 - })() ? o.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME : o.a.MAX_PARALLEL_IMAGE_REQUESTS; - for (let P = n; P < w && e.length > 0; P++) { - const M = e.shift(); - M.abortController.signal.aborted ? P-- : d(M) - } - }, - y = (w, P) => new Promise(((M, D) => { - const z = new Image, - B = w.url, - U = w.credentials; - U && U === "include" ? z.crossOrigin = "use-credentials" : (U && U === "same-origin" || !o.d(B)) && (z.crossOrigin = "anonymous"), P.signal.addEventListener("abort", (() => { - z.src = "", D(o.c()) - })), z.fetchPriority = "high", z.onload = () => { - z.onerror = z.onload = null, M({ - data: z - }) - }, z.onerror = () => { - z.onerror = z.onload = null, P.signal.aborted || D(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.")) - }, z.src = B - })) - })(Ne || (Ne = {})), Ne.resetRequestQueue(); - class ft { - constructor(e) { - this._transformRequestFn = e ?? null - } - transformRequest(e, n) { - return this._transformRequestFn && this._transformRequestFn(e, n) || { - url: e - } - } - setTransformRequest(e) { - this._transformRequestFn = e - } - } - - function ht(h) { - const e = []; - if (typeof h == "string") e.push({ - id: "default", - url: h - }); - else if (h && h.length > 0) { - const n = []; - for (const { - id: s, - url: u - } - of h) { - const d = `${s}${u}`; - n.indexOf(d) === -1 && (n.push(d), e.push({ - id: s, - url: u - })) - } - } - return e - } - - function Xe(h, e, n) { - try { - const s = new URL(h); - return s.pathname += `${e}${n}`, s.toString() - } catch { - throw new Error(`Invalid sprite URL "${h}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`) - } - } - - function ct(h) { - const { - userImage: e - } = h; - return !!(e && e.render && e.render()) && (h.data.replace(new Uint8Array(e.data.buffer)), !0) - } - class Je extends o.E { - constructor() { - super(), this.images = {}, this.updatedImages = {}, this.callbackDispatchedThisFrame = {}, this.loaded = !1, this.requestors = [], this.patterns = {}, this.atlasImage = new o.R({ - width: 1, - height: 1 - }), this.dirty = !0 - } - isLoaded() { - return this.loaded - } - setLoaded(e) { - if (this.loaded !== e && (this.loaded = e, e)) { - for (const { - ids: n, - promiseResolve: s - } - of this.requestors) s(this._getImagesForIds(n)); - this.requestors = [] - } - } - getImage(e) { - const n = this.images[e]; - if (n && !n.data && n.spriteData) { - const s = n.spriteData; - n.data = new o.R({ - width: s.width, - height: s.height - }, s.context.getImageData(s.x, s.y, s.width, s.height).data), n.spriteData = null - } - return n - } - addImage(e, n) { - if (this.images[e]) throw new Error(`Image id ${e} already exist, use updateImage instead`); - this._validate(e, n) && (this.images[e] = n) - } - _validate(e, n) { - let s = !0; - const u = n.data || n.spriteData; - return this._validateStretch(n.stretchX, u && u.width) || (this.fire(new o.k(new Error(`Image "${e}" has invalid "stretchX" value`))), s = !1), this._validateStretch(n.stretchY, u && u.height) || (this.fire(new o.k(new Error(`Image "${e}" has invalid "stretchY" value`))), s = !1), this._validateContent(n.content, n) || (this.fire(new o.k(new Error(`Image "${e}" has invalid "content" value`))), s = !1), s - } - _validateStretch(e, n) { - if (!e) return !0; - let s = 0; - for (const u of e) { - if (u[0] < s || u[1] < u[0] || n < u[1]) return !1; - s = u[1] - } - return !0 - } - _validateContent(e, n) { - if (!e) return !0; - if (e.length !== 4) return !1; - const s = n.spriteData, - u = s && s.width || n.data.width, - d = s && s.height || n.data.height; - return !(e[0] < 0 || u < e[0] || e[1] < 0 || d < e[1] || e[2] < 0 || u < e[2] || e[3] < 0 || d < e[3] || e[2] < e[0] || e[3] < e[1]) - } - updateImage(e, n, s = !0) { - const u = this.getImage(e); - if (s && (u.data.width !== n.data.width || u.data.height !== n.data.height)) throw new Error(`size mismatch between old image (${u.data.width}x${u.data.height}) and new image (${n.data.width}x${n.data.height}).`); - n.version = u.version + 1, this.images[e] = n, this.updatedImages[e] = !0 - } - removeImage(e) { - const n = this.images[e]; - delete this.images[e], delete this.patterns[e], n.userImage && n.userImage.onRemove && n.userImage.onRemove() - } - listImages() { - return Object.keys(this.images) - } - getImages(e) { - return new Promise(((n, s) => { - let u = !0; - if (!this.isLoaded()) - for (const d of e) this.images[d] || (u = !1); - this.isLoaded() || u ? n(this._getImagesForIds(e)) : this.requestors.push({ - ids: e, - promiseResolve: n - }) - })) - } - _getImagesForIds(e) { - const n = {}; - for (const s of e) { - let u = this.getImage(s); - u || (this.fire(new o.l("styleimagemissing", { - id: s - })), u = this.getImage(s)), u ? n[s] = { - data: u.data.clone(), - pixelRatio: u.pixelRatio, - sdf: u.sdf, - version: u.version, - stretchX: u.stretchX, - stretchY: u.stretchY, - content: u.content, - textFitWidth: u.textFitWidth, - textFitHeight: u.textFitHeight, - hasRenderCallback: !!(u.userImage && u.userImage.render) - } : o.w(`Image "${s}" 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 n - } - getPixelSize() { - const { - width: e, - height: n - } = this.atlasImage; - return { - width: e, - height: n - } - } - getPattern(e) { - const n = this.patterns[e], - s = this.getImage(e); - if (!s) return null; - if (n && n.position.version === s.version) return n.position; - if (n) n.position.version = s.version; - else { - const u = { - w: s.data.width + 2, - h: s.data.height + 2, - x: 0, - y: 0 - }, - d = new o.I(u, s); - this.patterns[e] = { - bin: u, - position: d - } - } - return this._updatePatternAtlas(), this.patterns[e].position - } - bind(e) { - const n = e.gl; - this.atlasTexture ? this.dirty && (this.atlasTexture.update(this.atlasImage), this.dirty = !1) : this.atlasTexture = new o.T(e, this.atlasImage, n.RGBA), this.atlasTexture.bind(n.LINEAR, n.CLAMP_TO_EDGE) - } - _updatePatternAtlas() { - const e = []; - for (const d in this.patterns) e.push(this.patterns[d].bin); - const { - w: n, - h: s - } = o.p(e), u = this.atlasImage; - u.resize({ - width: n || 1, - height: s || 1 - }); - for (const d in this.patterns) { - const { - bin: m - } = this.patterns[d], y = m.x + 1, w = m.y + 1, P = this.getImage(d).data, M = P.width, D = P.height; - o.R.copy(P, u, { - x: 0, - y: 0 - }, { - x: y, - y: w - }, { - width: M, - height: D - }), o.R.copy(P, u, { - x: 0, - y: D - 1 - }, { - x: y, - y: w - 1 - }, { - width: M, - height: 1 - }), o.R.copy(P, u, { - x: 0, - y: 0 - }, { - x: y, - y: w + D - }, { - width: M, - height: 1 - }), o.R.copy(P, u, { - x: M - 1, - y: 0 - }, { - x: y - 1, - y: w - }, { - width: 1, - height: D - }), o.R.copy(P, u, { - x: 0, - y: 0 - }, { - x: y + M, - y: w - }, { - width: 1, - height: D - }) - } - this.dirty = !0 - } - beginFrame() { - this.callbackDispatchedThisFrame = {} - } - dispatchRenderCallbacks(e) { - for (const n of e) { - if (this.callbackDispatchedThisFrame[n]) continue; - this.callbackDispatchedThisFrame[n] = !0; - const s = this.getImage(n); - s || o.w(`Image with ID: "${n}" was not found`), ct(s) && this.updateImage(n, s) - } - } - } - const Be = 1e20; - - function st(h, e, n, s, u, d, m, y, w) { - for (let P = e; P < e + s; P++) it(h, n * d + P, d, u, m, y, w); - for (let P = n; P < n + u; P++) it(h, P * d + e, 1, s, m, y, w) - } - - function it(h, e, n, s, u, d, m) { - d[0] = 0, m[0] = -Be, m[1] = Be, u[0] = h[e]; - for (let y = 1, w = 0, P = 0; y < s; y++) { - u[y] = h[e + y * n]; - const M = y * y; - do { - const D = d[w]; - P = (u[y] - u[D] + M - D * D) / (y - D) / 2 - } while (P <= m[w] && --w > -1); - w++, d[w] = y, m[w] = P, m[w + 1] = Be - } - for (let y = 0, w = 0; y < s; y++) { - for (; m[w + 1] < y;) w++; - const P = d[w], - M = y - P; - h[e + y * n] = u[P] + M * M - } - } - class Qe { - constructor(e, n) { - this.requestManager = e, this.localIdeographFontFamily = n, this.entries = {} - } - setURL(e) { - this.url = e - } - getGlyphs(e) { - return o._(this, void 0, void 0, (function*() { - const n = []; - for (const d in e) - for (const m of e[d]) n.push(this._getAndCacheGlyphsPromise(d, m)); - const s = yield Promise.all(n), u = {}; - for (const { - stack: d, - id: m, - glyph: y - } - of s) u[d] || (u[d] = {}), u[d][m] = y && { - id: y.id, - bitmap: y.bitmap.clone(), - metrics: y.metrics - }; - return u - })) - } - _getAndCacheGlyphsPromise(e, n) { - return o._(this, void 0, void 0, (function*() { - let s = this.entries[e]; - s || (s = this.entries[e] = { - glyphs: {}, - requests: {}, - ranges: {} - }); - let u = s.glyphs[n]; - if (u !== void 0) return { - stack: e, - id: n, - glyph: u - }; - if (u = this._tinySDF(s, e, n), u) return s.glyphs[n] = u, { - stack: e, - id: n, - glyph: u - }; - const d = Math.floor(n / 256); - if (256 * d > 65535) throw new Error("glyphs > 65535 not supported"); - if (s.ranges[d]) return { - stack: e, - id: n, - glyph: u - }; - if (!this.url) throw new Error("glyphsUrl is not set"); - if (!s.requests[d]) { - const y = Qe.loadGlyphRange(e, d, this.url, this.requestManager); - s.requests[d] = y - } - const m = yield s.requests[d]; - for (const y in m) this._doesCharSupportLocalGlyph(+y) || (s.glyphs[+y] = m[+y]); - return s.ranges[d] = !0, { - stack: e, - id: n, - glyph: m[n] || null - } - })) - } - _doesCharSupportLocalGlyph(e) { - return !!this.localIdeographFontFamily && (new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}", "u").test(String.fromCodePoint(e)) || o.u["CJK Unified Ideographs"](e) || o.u["Hangul Syllables"](e) || o.u.Hiragana(e) || o.u.Katakana(e) || o.u["CJK Symbols and Punctuation"](e) || o.u["Halfwidth and Fullwidth Forms"](e)) - } - _tinySDF(e, n, s) { - const u = this.localIdeographFontFamily; - if (!u || !this._doesCharSupportLocalGlyph(s)) return; - let d = e.tinySDF; - if (!d) { - let y = "400"; - /bold/i.test(n) ? y = "900" : /medium/i.test(n) ? y = "500" : /light/i.test(n) && (y = "200"), d = e.tinySDF = new Qe.TinySDF({ - fontSize: 48, - buffer: 6, - radius: 16, - cutoff: .25, - fontFamily: u, - fontWeight: y - }) - } - const m = d.draw(String.fromCharCode(s)); - return { - id: s, - bitmap: new o.q({ - width: m.width || 60, - height: m.height || 60 - }, m.data), - metrics: { - width: m.glyphWidth / 2 || 24, - height: m.glyphHeight / 2 || 24, - left: m.glyphLeft / 2 + .5 || 0, - top: m.glyphTop / 2 - 27.5 || -8, - advance: m.glyphAdvance / 2 || 24, - isDoubleResolution: !0 - } - } - } - } - Qe.loadGlyphRange = function(h, e, n, s) { - return o._(this, void 0, void 0, (function*() { - const u = 256 * e, - d = u + 255, - m = s.transformRequest(n.replace("{fontstack}", h).replace("{range}", `${u}-${d}`), "Glyphs"), - y = yield o.n(m, new AbortController); - if (!y || !y.data) throw new Error(`Could not load glyph range. range: ${e}, ${u}-${d}`); - const w = {}; - for (const P of o.o(y.data)) w[P.id] = P; - return w - })) - }, Qe.TinySDF = class { - constructor({ - fontSize: h = 24, - buffer: e = 3, - radius: n = 8, - cutoff: s = .25, - fontFamily: u = "sans-serif", - fontWeight: d = "normal", - fontStyle: m = "normal", - lang: y = null - } = {}) { - this.buffer = e, this.cutoff = s, this.radius = n, this.lang = y; - const w = this.size = h + 4 * e, - P = this._createCanvas(w), - M = this.ctx = P.getContext("2d", { - willReadFrequently: !0 - }); - M.font = `${m} ${d} ${h}px ${u}`, M.textBaseline = "alphabetic", M.textAlign = "left", M.fillStyle = "black", this.gridOuter = new Float64Array(w * w), this.gridInner = new Float64Array(w * w), this.f = new Float64Array(w), this.z = new Float64Array(w + 1), this.v = new Uint16Array(w) - } - _createCanvas(h) { - const e = document.createElement("canvas"); - return e.width = e.height = h, e - } - draw(h) { - const { - width: e, - actualBoundingBoxAscent: n, - actualBoundingBoxDescent: s, - actualBoundingBoxLeft: u, - actualBoundingBoxRight: d - } = this.ctx.measureText(h), m = Math.ceil(n), y = Math.max(0, Math.min(this.size - this.buffer, Math.ceil(d - u))), w = Math.min(this.size - this.buffer, m + Math.ceil(s)), P = y + 2 * this.buffer, M = w + 2 * this.buffer, D = Math.max(P * M, 0), z = new Uint8ClampedArray(D), B = { - data: z, - width: P, - height: M, - glyphWidth: y, - glyphHeight: w, - glyphTop: m, - glyphLeft: 0, - glyphAdvance: e - }; - if (y === 0 || w === 0) return B; - const { - ctx: U, - buffer: ee, - gridInner: J, - gridOuter: re - } = this; - this.lang && (U.lang = this.lang), U.clearRect(ee, ee, y, w), U.fillText(h, ee, ee + m); - const se = U.getImageData(ee, ee, y, w); - re.fill(Be, 0, D), J.fill(0, 0, D); - for (let de = 0; de < w; de++) - for (let ue = 0; ue < y; ue++) { - const ge = se.data[4 * (de * y + ue) + 3] / 255; - if (ge === 0) continue; - const Te = (de + ee) * P + ue + ee; - if (ge === 1) re[Te] = 0, J[Te] = Be; - else { - const he = .5 - ge; - re[Te] = he > 0 ? he * he : 0, J[Te] = he < 0 ? he * he : 0 - } - } - st(re, 0, 0, P, M, P, this.f, this.v, this.z), st(J, ee, ee, y, w, P, this.f, this.v, this.z); - for (let de = 0; de < D; de++) { - const ue = Math.sqrt(re[de]) - Math.sqrt(J[de]); - z[de] = Math.round(255 - 255 * (ue / this.radius + this.cutoff)) - } - return B - } - }; - class ke { - constructor() { - this.specification = o.v.light.position - } - possiblyEvaluate(e, n) { - return o.B(e.expression.evaluate(n)) - } - interpolate(e, n, s) { - return { - x: o.C.number(e.x, n.x, s), - y: o.C.number(e.y, n.y, s), - z: o.C.number(e.z, n.z, s) - } - } - } - let vt; - class Q extends o.E { - constructor(e) { - super(), vt = vt || new o.r({ - anchor: new o.D(o.v.light.anchor), - position: new ke, - color: new o.D(o.v.light.color), - intensity: new o.D(o.v.light.intensity) - }), this._transitionable = new o.t(vt), this.setLight(e), this._transitioning = this._transitionable.untransitioned() - } - getLight() { - return this._transitionable.serialize() - } - setLight(e, n = {}) { - if (!this._validate(o.x, e, n)) - for (const s in e) { - const u = e[s]; - s.endsWith("-transition") ? this._transitionable.setTransition(s.slice(0, -11), u) : this._transitionable.setValue(s, u) - } - } - updateTransitions(e) { - this._transitioning = this._transitionable.transitioned(e, this._transitioning) - } - hasTransition() { - return this._transitioning.hasTransition() - } - recalculate(e) { - this.properties = this._transitioning.possiblyEvaluate(e) - } - _validate(e, n, s) { - return (!s || s.validate !== !1) && o.y(this, e.call(o.z, { - value: n, - style: { - glyphs: !0, - sprite: !0 - }, - styleSpec: o.v - })) - } - } - const te = new o.r({ - "sky-color": new o.D(o.v.sky["sky-color"]), - "horizon-color": new o.D(o.v.sky["horizon-color"]), - "fog-color": new o.D(o.v.sky["fog-color"]), - "fog-ground-blend": new o.D(o.v.sky["fog-ground-blend"]), - "horizon-fog-blend": new o.D(o.v.sky["horizon-fog-blend"]), - "sky-horizon-blend": new o.D(o.v.sky["sky-horizon-blend"]), - "atmosphere-blend": new o.D(o.v.sky["atmosphere-blend"]) - }); - class _e extends o.E { - constructor(e) { - super(), this._transitionable = new o.t(te), this.setSky(e), this._transitioning = this._transitionable.untransitioned(), this.recalculate(new o.F(0)) - } - setSky(e, n = {}) { - if (!this._validate(o.G, e, n)) { - e || (e = { - "sky-color": "transparent", - "horizon-color": "transparent", - "fog-color": "transparent", - "fog-ground-blend": 1, - "atmosphere-blend": 0 - }); - for (const s in e) { - const u = e[s]; - s.endsWith("-transition") ? this._transitionable.setTransition(s.slice(0, -11), u) : this._transitionable.setValue(s, u) - } - } - } - getSky() { - return this._transitionable.serialize() - } - updateTransitions(e) { - this._transitioning = this._transitionable.transitioned(e, this._transitioning) - } - hasTransition() { - return this._transitioning.hasTransition() - } - recalculate(e) { - this.properties = this._transitioning.possiblyEvaluate(e) - } - _validate(e, n, s = {}) { - return (s == null ? void 0 : s.validate) !== !1 && o.y(this, e.call(o.z, o.e({ - value: n, - style: { - glyphs: !0, - sprite: !0 - }, - styleSpec: o.v - }))) - } - calculateFogBlendOpacity(e) { - return e < 60 ? 0 : e < 70 ? (e - 60) / 10 : 1 - } - } - class ne { - constructor(e, n) { - this.width = e, this.height = n, this.nextRow = 0, this.data = new Uint8Array(this.width * this.height), this.dashEntry = {} - } - getDash(e, n) { - const s = e.join(",") + String(n); - return this.dashEntry[s] || (this.dashEntry[s] = this.addDash(e, n)), this.dashEntry[s] - } - getDashRanges(e, n, s) { - const u = []; - let d = e.length % 2 == 1 ? -e[e.length - 1] * s : 0, - m = e[0] * s, - y = !0; - u.push({ - left: d, - right: m, - isDash: y, - zeroLength: e[0] === 0 - }); - let w = e[0]; - for (let P = 1; P < e.length; P++) { - y = !y; - const M = e[P]; - d = w * s, w += M, m = w * s, u.push({ - left: d, - right: m, - isDash: y, - zeroLength: M === 0 - }) - } - return u - } - addRoundDash(e, n, s) { - const u = n / 2; - for (let d = -s; d <= s; d++) { - const m = this.width * (this.nextRow + s + d); - let y = 0, - w = e[y]; - for (let P = 0; P < this.width; P++) { - P / w.right > 1 && (w = e[++y]); - const M = Math.abs(P - w.left), - D = Math.abs(P - w.right), - z = Math.min(M, D); - let B; - const U = d / s * (u + 1); - if (w.isDash) { - const ee = u - Math.abs(U); - B = Math.sqrt(z * z + ee * ee) - } else B = u - Math.sqrt(z * z + U * U); - this.data[m + P] = Math.max(0, Math.min(255, B + 128)) - } - } - } - addRegularDash(e) { - for (let y = e.length - 1; y >= 0; --y) { - const w = e[y], - P = e[y + 1]; - w.zeroLength ? e.splice(y, 1) : P && P.isDash === w.isDash && (P.left = w.left, e.splice(y, 1)) - } - const n = e[0], - s = e[e.length - 1]; - n.isDash === s.isDash && (n.left = s.left - this.width, s.right = n.right + this.width); - const u = this.width * this.nextRow; - let d = 0, - m = e[d]; - for (let y = 0; y < this.width; y++) { - y / m.right > 1 && (m = e[++d]); - const w = Math.abs(y - m.left), - P = Math.abs(y - m.right), - M = Math.min(w, P); - this.data[u + y] = Math.max(0, Math.min(255, (m.isDash ? M : -M) + 128)) - } - } - addDash(e, n) { - const s = n ? 7 : 0, - u = 2 * s + 1; - if (this.nextRow + u > this.height) return o.w("LineAtlas out of space"), null; - let d = 0; - for (let y = 0; y < e.length; y++) d += e[y]; - if (d !== 0) { - const y = this.width / d, - w = this.getDashRanges(e, this.width, y); - n ? this.addRoundDash(w, y, s) : this.addRegularDash(w) - } - const m = { - y: (this.nextRow + s + .5) / this.height, - height: 2 * s / this.height, - width: d - }; - return this.nextRow += u, this.dirty = !0, m - } - bind(e) { - const n = e.gl; - this.texture ? (n.bindTexture(n.TEXTURE_2D, this.texture), this.dirty && (this.dirty = !1, n.texSubImage2D(n.TEXTURE_2D, 0, 0, 0, this.width, this.height, n.ALPHA, n.UNSIGNED_BYTE, this.data))) : (this.texture = n.createTexture(), n.bindTexture(n.TEXTURE_2D, this.texture), n.texParameteri(n.TEXTURE_2D, n.TEXTURE_WRAP_S, n.REPEAT), n.texParameteri(n.TEXTURE_2D, n.TEXTURE_WRAP_T, n.REPEAT), n.texParameteri(n.TEXTURE_2D, n.TEXTURE_MIN_FILTER, n.LINEAR), n.texParameteri(n.TEXTURE_2D, n.TEXTURE_MAG_FILTER, n.LINEAR), n.texImage2D(n.TEXTURE_2D, 0, n.ALPHA, this.width, this.height, 0, n.ALPHA, n.UNSIGNED_BYTE, this.data)) - } - } - const Pe = "maplibre_preloaded_worker_pool"; - class Me { - constructor() { - this.active = {} - } - acquire(e) { - if (!this.workers) - for (this.workers = []; this.workers.length < Me.workerCount;) this.workers.push(new Worker(o.a.WORKER_URL)); - return this.active[e] = !0, this.workers.slice() - } - release(e) { - delete this.active[e], this.numActive() === 0 && (this.workers.forEach((n => { - n.terminate() - })), this.workers = null) - } - isPreloaded() { - return !!this.active[Pe] - } - numActive() { - return Object.keys(this.active).length - } - } - const at = Math.floor(ye.hardwareConcurrency / 2); - let We, Ct; - - function _t() { - return We || (We = new Me), We - } - Me.workerCount = o.H(globalThis) ? Math.max(Math.min(at, 3), 1) : 1; - class xt { - constructor(e, n) { - this.workerPool = e, this.actors = [], this.currentActor = 0, this.id = n; - const s = this.workerPool.acquire(n); - for (let u = 0; u < s.length; u++) { - const d = new o.J(s[u], n); - d.name = `Worker ${u}`, this.actors.push(d) - } - if (!this.actors.length) throw new Error("No actors found") - } - broadcast(e, n) { - const s = []; - for (const u of this.actors) s.push(u.sendAsync({ - type: e, - data: n - })); - return Promise.all(s) - } - getActor() { - return this.currentActor = (this.currentActor + 1) % this.actors.length, this.actors[this.currentActor] - } - remove(e = !0) { - this.actors.forEach((n => { - n.remove() - })), this.actors = [], e && this.workerPool.release(this.id) - } - registerMessageHandler(e, n) { - for (const s of this.actors) s.registerMessageHandler(e, n) - } - } - - function tt() { - return Ct || (Ct = new xt(_t(), o.K), Ct.registerMessageHandler("GR", ((h, e, n) => o.m(e, n)))), Ct - } - - function pt(h, e) { - const n = o.L(); - return o.M(n, n, [1, 1, 0]), o.N(n, n, [.5 * h.width, .5 * h.height, 1]), h.calculatePosMatrix ? o.O(n, n, h.calculatePosMatrix(e.toUnwrapped())) : n - } - - function It(h, e, n, s, u, d, m) { - var y; - const w = (function(z, B, U) { - if (z) - for (const ee of z) { - const J = B[ee]; - if (J && J.source === U && J.type === "fill-extrusion") return !0 - } else - for (const ee in B) { - const J = B[ee]; - if (J.source === U && J.type === "fill-extrusion") return !0 - } - return !1 - })((y = u == null ? void 0 : u.layers) !== null && y !== void 0 ? y : null, e, h.id), - P = d.maxPitchScaleFactor(), - M = h.tilesIn(s, P, w); - M.sort(ut); - const D = []; - for (const z of M) D.push({ - wrappedTileID: z.tileID.wrapped().key, - queryResults: z.tile.queryRenderedFeatures(e, n, h._state, z.queryGeometry, z.cameraQueryGeometry, z.scale, u, d, P, pt(h.transform, z.tileID), m ? (B, U) => m(z.tileID, B, U) : void 0) - }); - return (function(z, B) { - for (const U in z) - for (const ee of z[U]) bt(ee, B); - return z - })((function(z) { - const B = {}, - U = {}; - for (const ee of z) { - const J = ee.queryResults, - re = ee.wrappedTileID, - se = U[re] = U[re] || {}; - for (const de in J) { - const ue = J[de], - ge = se[de] = se[de] || {}, - Te = B[de] = B[de] || []; - for (const he of ue) ge[he.featureIndex] || (ge[he.featureIndex] = !0, Te.push(he)) - } - } - return B - })(D), h) - } - - function ut(h, e) { - const n = h.tileID, - s = e.tileID; - return n.overscaledZ - s.overscaledZ || n.canonical.y - s.canonical.y || n.wrap - s.wrap || n.canonical.x - s.canonical.x - } - - function bt(h, e) { - const n = h.feature, - s = e.getFeatureState(n.layer["source-layer"], n.id); - n.source = n.layer.source, n.layer["source-layer"] && (n.sourceLayer = n.layer["source-layer"]), n.state = s - } - - function wt(h, e, n) { - return o._(this, void 0, void 0, (function*() { - let s = h; - if (h.url ? s = (yield o.j(e.transformRequest(h.url, "Source"), n)).data : yield ye.frameAsync(n), !s) return null; - const u = o.Q(o.e(s, h), ["tiles", "minzoom", "maxzoom", "attribution", "bounds", "scheme", "tileSize", "encoding"]); - return "vector_layers" in s && s.vector_layers && (u.vectorLayerIds = s.vector_layers.map((d => d.id))), u - })) - } - class dt { - constructor(e, n) { - e && (n ? this.setSouthWest(e).setNorthEast(n) : Array.isArray(e) && (e.length === 4 ? this.setSouthWest([e[0], e[1]]).setNorthEast([e[2], e[3]]) : this.setSouthWest(e[0]).setNorthEast(e[1]))) - } - setNorthEast(e) { - return this._ne = e instanceof o.S ? new o.S(e.lng, e.lat) : o.S.convert(e), this - } - setSouthWest(e) { - return this._sw = e instanceof o.S ? new o.S(e.lng, e.lat) : o.S.convert(e), this - } - extend(e) { - const n = this._sw, - s = this._ne; - let u, d; - if (e instanceof o.S) u = e, d = e; - else { - if (!(e instanceof dt)) return Array.isArray(e) ? e.length === 4 || e.every(Array.isArray) ? this.extend(dt.convert(e)) : this.extend(o.S.convert(e)) : e && ("lng" in e || "lon" in e) && "lat" in e ? this.extend(o.S.convert(e)) : this; - if (u = e._sw, d = e._ne, !u || !d) return this - } - return n || s ? (n.lng = Math.min(u.lng, n.lng), n.lat = Math.min(u.lat, n.lat), s.lng = Math.max(d.lng, s.lng), s.lat = Math.max(d.lat, s.lat)) : (this._sw = new o.S(u.lng, u.lat), this._ne = new o.S(d.lng, d.lat)), this - } - getCenter() { - return new o.S((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 o.S(this.getWest(), this.getNorth()) - } - getSouthEast() { - return new o.S(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(e) { - const { - lng: n, - lat: s - } = o.S.convert(e); - let u = this._sw.lng <= n && n <= this._ne.lng; - return this._sw.lng > this._ne.lng && (u = this._sw.lng >= n && n >= this._ne.lng), this._sw.lat <= s && s <= this._ne.lat && u - } - static convert(e) { - return e instanceof dt ? e : e && new dt(e) - } - static fromLngLat(e, n = 0) { - const s = 360 * n / 40075017, - u = s / Math.cos(Math.PI / 180 * e.lat); - return new dt(new o.S(e.lng - u, e.lat - s), new o.S(e.lng + u, e.lat + s)) - } - adjustAntiMeridian() { - const e = new o.S(this._sw.lng, this._sw.lat), - n = new o.S(this._ne.lng, this._ne.lat); - return new dt(e, e.lng > n.lng ? new o.S(n.lng + 360, n.lat) : n) - } - } - class Lt { - constructor(e, n, s) { - this.bounds = dt.convert(this.validateBounds(e)), this.minzoom = n || 0, this.maxzoom = s || 24 - } - validateBounds(e) { - return Array.isArray(e) && e.length === 4 ? [Math.max(-180, e[0]), Math.max(-90, e[1]), Math.min(180, e[2]), Math.min(90, e[3])] : [-180, -90, 180, 90] - } - contains(e) { - const n = Math.pow(2, e.z), - s = Math.floor(o.V(this.bounds.getWest()) * n), - u = Math.floor(o.U(this.bounds.getNorth()) * n), - d = Math.ceil(o.V(this.bounds.getEast()) * n), - m = Math.ceil(o.U(this.bounds.getSouth()) * n); - return e.x >= s && e.x < d && e.y >= u && e.y < m - } - } - class Xt extends o.E { - constructor(e, n, s, u) { - if (super(), this.id = e, this.dispatcher = s, this.type = "vector", this.minzoom = 0, this.maxzoom = 22, this.scheme = "xyz", this.tileSize = 512, this.reparseOverscaled = !0, this.isTileClipped = !0, this._loaded = !1, o.e(this, o.Q(n, ["url", "scheme", "tileSize", "promoteId"])), this._options = o.e({ - type: "vector" - }, n), this._collectResourceTiming = n.collectResourceTiming, this.tileSize !== 512) throw new Error("vector tile sources must have a tileSize of 512"); - this.setEventedParent(u) - } - load() { - return o._(this, void 0, void 0, (function*() { - this._loaded = !1, this.fire(new o.l("dataloading", { - dataType: "source" - })), this._tileJSONRequest = new AbortController; - try { - const e = yield wt(this._options, this.map._requestManager, this._tileJSONRequest); - this._tileJSONRequest = null, this._loaded = !0, this.map.style.sourceCaches[this.id].clearTiles(), e && (o.e(this, e), e.bounds && (this.tileBounds = new Lt(e.bounds, this.minzoom, this.maxzoom)), this.fire(new o.l("data", { - dataType: "source", - sourceDataType: "metadata" - })), this.fire(new o.l("data", { - dataType: "source", - sourceDataType: "content" - }))) - } catch (e) { - this._tileJSONRequest = null, this.fire(new o.k(e)) - } - })) - } - loaded() { - return this._loaded - } - hasTile(e) { - return !this.tileBounds || this.tileBounds.contains(e.canonical) - } - onAdd(e) { - this.map = e, this.load() - } - setSourceProperty(e) { - this._tileJSONRequest && this._tileJSONRequest.abort(), e(), this.load() - } - setTiles(e) { - return this.setSourceProperty((() => { - this._options.tiles = e - })), this - } - setUrl(e) { - return this.setSourceProperty((() => { - this.url = e, this._options.url = e - })), this - } - onRemove() { - this._tileJSONRequest && (this._tileJSONRequest.abort(), this._tileJSONRequest = null) - } - serialize() { - return o.e({}, this._options) - } - loadTile(e) { - return o._(this, void 0, void 0, (function*() { - const n = e.tileID.canonical.url(this.tiles, this.map.getPixelRatio(), this.scheme), - s = { - request: this.map._requestManager.transformRequest(n, "Tile"), - uid: e.uid, - tileID: e.tileID, - zoom: e.tileID.overscaledZ, - tileSize: this.tileSize * e.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, - globalState: this.map.getGlobalState() - }; - s.request.collectResourceTiming = this._collectResourceTiming; - let u = "RT"; - if (e.actor && e.state !== "expired") { - if (e.state === "loading") return new Promise(((d, m) => { - e.reloadPromise = { - resolve: d, - reject: m - } - })) - } else e.actor = this.dispatcher.getActor(), u = "LT"; - e.abortController = new AbortController; - try { - const d = yield e.actor.sendAsync({ - type: u, - data: s - }, e.abortController); - if (delete e.abortController, e.aborted) return; - this._afterTileLoadWorkerResponse(e, d) - } catch (d) { - if (delete e.abortController, e.aborted) return; - if (d && d.status !== 404) throw d; - this._afterTileLoadWorkerResponse(e, null) - } - })) - } - _afterTileLoadWorkerResponse(e, n) { - if (n && n.resourceTiming && (e.resourceTiming = n.resourceTiming), n && this.map._refreshExpiredTiles && e.setExpiryData(n), e.loadVectorData(n, this.map.painter), e.reloadPromise) { - const s = e.reloadPromise; - e.reloadPromise = null, this.loadTile(e).then(s.resolve).catch(s.reject) - } - } - abortTile(e) { - return o._(this, void 0, void 0, (function*() { - e.abortController && (e.abortController.abort(), delete e.abortController), e.actor && (yield e.actor.sendAsync({ - type: "AT", - data: { - uid: e.uid, - type: this.type, - source: this.id - } - })) - })) - } - unloadTile(e) { - return o._(this, void 0, void 0, (function*() { - e.unloadVectorData(), e.actor && (yield e.actor.sendAsync({ - type: "RMT", - data: { - uid: e.uid, - type: this.type, - source: this.id - } - })) - })) - } - hasTransition() { - return !1 - } - } - class Yt extends o.E { - constructor(e, n, s, u) { - super(), this.id = e, this.dispatcher = s, this.setEventedParent(u), this.type = "raster", this.minzoom = 0, this.maxzoom = 22, this.roundZoom = !0, this.scheme = "xyz", this.tileSize = 512, this._loaded = !1, this._options = o.e({ - type: "raster" - }, n), o.e(this, o.Q(n, ["url", "scheme", "tileSize"])) - } - load() { - return o._(this, arguments, void 0, (function*(e = !1) { - this._loaded = !1, this.fire(new o.l("dataloading", { - dataType: "source" - })), this._tileJSONRequest = new AbortController; - try { - const n = yield wt(this._options, this.map._requestManager, this._tileJSONRequest); - this._tileJSONRequest = null, this._loaded = !0, n && (o.e(this, n), n.bounds && (this.tileBounds = new Lt(n.bounds, this.minzoom, this.maxzoom)), this.fire(new o.l("data", { - dataType: "source", - sourceDataType: "metadata" - })), this.fire(new o.l("data", { - dataType: "source", - sourceDataType: "content", - sourceDataChanged: e - }))) - } catch (n) { - this._tileJSONRequest = null, this.fire(new o.k(n)) - } - })) - } - loaded() { - return this._loaded - } - onAdd(e) { - this.map = e, this.load() - } - onRemove() { - this._tileJSONRequest && (this._tileJSONRequest.abort(), this._tileJSONRequest = null) - } - setSourceProperty(e) { - this._tileJSONRequest && (this._tileJSONRequest.abort(), this._tileJSONRequest = null), e(), this.load(!0) - } - setTiles(e) { - return this.setSourceProperty((() => { - this._options.tiles = e - })), this - } - setUrl(e) { - return this.setSourceProperty((() => { - this.url = e, this._options.url = e - })), this - } - serialize() { - return o.e({}, this._options) - } - hasTile(e) { - return !this.tileBounds || this.tileBounds.contains(e.canonical) - } - loadTile(e) { - return o._(this, void 0, void 0, (function*() { - const n = e.tileID.canonical.url(this.tiles, this.map.getPixelRatio(), this.scheme); - e.abortController = new AbortController; - try { - const s = yield Ne.getImage(this.map._requestManager.transformRequest(n, "Tile"), e.abortController, this.map._refreshExpiredTiles); - if (delete e.abortController, e.aborted) return void(e.state = "unloaded"); - if (s && s.data) { - this.map._refreshExpiredTiles && (s.cacheControl || s.expires) && e.setExpiryData({ - cacheControl: s.cacheControl, - expires: s.expires - }); - const u = this.map.painter.context, - d = u.gl, - m = s.data; - e.texture = this.map.painter.getTileTexture(m.width), e.texture ? e.texture.update(m, { - useMipmap: !0 - }) : (e.texture = new o.T(u, m, d.RGBA, { - useMipmap: !0 - }), e.texture.bind(d.LINEAR, d.CLAMP_TO_EDGE, d.LINEAR_MIPMAP_NEAREST)), e.state = "loaded" - } - } catch (s) { - if (delete e.abortController, e.aborted) e.state = "unloaded"; - else if (s) throw e.state = "errored", s - } - })) - } - abortTile(e) { - return o._(this, void 0, void 0, (function*() { - e.abortController && (e.abortController.abort(), delete e.abortController) - })) - } - unloadTile(e) { - return o._(this, void 0, void 0, (function*() { - e.texture && this.map.painter.saveTileTexture(e.texture) - })) - } - hasTransition() { - return !1 - } - } - class nr extends Yt { - constructor(e, n, s, u) { - super(e, n, s, u), this.type = "raster-dem", this.maxzoom = 22, this._options = o.e({ - type: "raster-dem" - }, n), this.encoding = n.encoding || "mapbox", this.redFactor = n.redFactor, this.greenFactor = n.greenFactor, this.blueFactor = n.blueFactor, this.baseShift = n.baseShift - } - loadTile(e) { - return o._(this, void 0, void 0, (function*() { - const n = e.tileID.canonical.url(this.tiles, this.map.getPixelRatio(), this.scheme), - s = this.map._requestManager.transformRequest(n, "Tile"); - e.neighboringTiles = this._getNeighboringTiles(e.tileID), e.abortController = new AbortController; - try { - const u = yield Ne.getImage(s, e.abortController, this.map._refreshExpiredTiles); - if (delete e.abortController, e.aborted) return void(e.state = "unloaded"); - if (u && u.data) { - const d = u.data; - this.map._refreshExpiredTiles && (u.cacheControl || u.expires) && e.setExpiryData({ - cacheControl: u.cacheControl, - expires: u.expires - }); - const m = o.b(d) && o.W() ? d : yield this.readImageNow(d), y = { - type: this.type, - uid: e.uid, - source: this.id, - rawImageData: m, - encoding: this.encoding, - redFactor: this.redFactor, - greenFactor: this.greenFactor, - blueFactor: this.blueFactor, - baseShift: this.baseShift - }; - if (!e.actor || e.state === "expired") { - e.actor = this.dispatcher.getActor(); - const w = yield e.actor.sendAsync({ - type: "LDT", - data: y - }); - e.dem = w, e.needsHillshadePrepare = !0, e.needsTerrainPrepare = !0, e.state = "loaded" - } - } - } catch (u) { - if (delete e.abortController, e.aborted) e.state = "unloaded"; - else if (u) throw e.state = "errored", u - } - })) - } - readImageNow(e) { - return o._(this, void 0, void 0, (function*() { - if (typeof VideoFrame < "u" && o.X()) { - const n = e.width + 2, - s = e.height + 2; - try { - return new o.R({ - width: n, - height: s - }, yield o.Y(e, -1, -1, n, s)) - } catch {} - } - return ye.getImageData(e, 1) - })) - } - _getNeighboringTiles(e) { - const n = e.canonical, - s = Math.pow(2, n.z), - u = (n.x - 1 + s) % s, - d = n.x === 0 ? e.wrap - 1 : e.wrap, - m = (n.x + 1 + s) % s, - y = n.x + 1 === s ? e.wrap + 1 : e.wrap, - w = {}; - return w[new o.Z(e.overscaledZ, d, n.z, u, n.y).key] = { - backfilled: !1 - }, w[new o.Z(e.overscaledZ, y, n.z, m, n.y).key] = { - backfilled: !1 - }, n.y > 0 && (w[new o.Z(e.overscaledZ, d, n.z, u, n.y - 1).key] = { - backfilled: !1 - }, w[new o.Z(e.overscaledZ, e.wrap, n.z, n.x, n.y - 1).key] = { - backfilled: !1 - }, w[new o.Z(e.overscaledZ, y, n.z, m, n.y - 1).key] = { - backfilled: !1 - }), n.y + 1 < s && (w[new o.Z(e.overscaledZ, d, n.z, u, n.y + 1).key] = { - backfilled: !1 - }, w[new o.Z(e.overscaledZ, e.wrap, n.z, n.x, n.y + 1).key] = { - backfilled: !1 - }, w[new o.Z(e.overscaledZ, y, n.z, m, n.y + 1).key] = { - backfilled: !1 - }), w - } - unloadTile(e) { - return o._(this, void 0, void 0, (function*() { - e.demTexture && this.map.painter.saveTileTexture(e.demTexture), e.fbo && (e.fbo.destroy(), delete e.fbo), e.dem && delete e.dem, delete e.neighboringTiles, e.state = "unloaded", e.actor && (yield e.actor.sendAsync({ - type: "RDT", - data: { - type: this.type, - uid: e.uid, - source: this.id - } - })) - })) - } - } - class ar extends o.E { - constructor(e, n, s, u) { - super(), this.id = e, 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: n.data - }, this.actor = s.getActor(), this.setEventedParent(u), this._data = n.data, this._options = o.e({}, n), this._collectResourceTiming = n.collectResourceTiming, n.maxzoom !== void 0 && (this.maxzoom = n.maxzoom), n.type && (this.type = n.type), n.attribution && (this.attribution = n.attribution), this.promoteId = n.promoteId, n.clusterMaxZoom !== void 0 && this.maxzoom <= n.clusterMaxZoom && o.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${n.clusterMaxZoom}".`), this.workerOptions = o.e({ - source: this.id, - cluster: n.cluster || !1, - geojsonVtOptions: { - buffer: this._pixelsToTileUnits(n.buffer !== void 0 ? n.buffer : 128), - tolerance: this._pixelsToTileUnits(n.tolerance !== void 0 ? n.tolerance : .375), - extent: o.$, - maxZoom: this.maxzoom, - lineMetrics: n.lineMetrics || !1, - generateId: n.generateId || !1 - }, - superclusterOptions: { - maxZoom: this._getClusterMaxZoom(n.clusterMaxZoom), - minPoints: Math.max(2, n.clusterMinPoints || 2), - extent: o.$, - radius: this._pixelsToTileUnits(n.clusterRadius || 50), - log: !1, - generateId: n.generateId || !1 - }, - clusterProperties: n.clusterProperties, - filter: n.filter - }, n.workerOptions), typeof this.promoteId == "string" && (this.workerOptions.promoteId = this.promoteId) - } - _pixelsToTileUnits(e) { - return e * (o.$ / this.tileSize) - } - _getClusterMaxZoom(e) { - const n = e ? Math.round(e) : this.maxzoom - 1; - return Number.isInteger(e) || e === void 0 || o.w(`Integer expected for option 'clusterMaxZoom': provided value "${e}" rounded to "${n}"`), n - } - load() { - return o._(this, void 0, void 0, (function*() { - yield this._updateWorkerData() - })) - } - onAdd(e) { - this.map = e, this.load() - } - setData(e) { - return this._data = e, this._pendingWorkerUpdate = { - data: e - }, this._updateWorkerData(), this - } - updateData(e) { - return this._pendingWorkerUpdate.diff = o.a0(this._pendingWorkerUpdate.diff, e), this._updateWorkerData(), this - } - getData() { - return o._(this, void 0, void 0, (function*() { - const e = o.e({ - type: this.type - }, this.workerOptions); - return this.actor.sendAsync({ - type: "GD", - data: e - }) - })) - } - getCoordinatesFromGeometry(e) { - return e.type === "GeometryCollection" ? e.geometries.map((n => n.coordinates)).flat(1 / 0) : e.coordinates.flat(1 / 0) - } - getBounds() { - return o._(this, void 0, void 0, (function*() { - const e = new dt, - n = yield this.getData(); - let s; - switch (n.type) { - case "FeatureCollection": - s = n.features.map((u => this.getCoordinatesFromGeometry(u.geometry))).flat(1 / 0); - break; - case "Feature": - s = this.getCoordinatesFromGeometry(n.geometry); - break; - default: - s = this.getCoordinatesFromGeometry(n) - } - if (s.length == 0) return e; - for (let u = 0; u < s.length - 1; u += 2) e.extend([s[u], s[u + 1]]); - return e - })) - } - setClusterOptions(e) { - return this.workerOptions.cluster = e.cluster, e && (e.clusterRadius !== void 0 && (this.workerOptions.superclusterOptions.radius = this._pixelsToTileUnits(e.clusterRadius)), e.clusterMaxZoom !== void 0 && (this.workerOptions.superclusterOptions.maxZoom = this._getClusterMaxZoom(e.clusterMaxZoom))), this._updateWorkerData(), this - } - getClusterExpansionZoom(e) { - return this.actor.sendAsync({ - type: "GCEZ", - data: { - type: this.type, - clusterId: e, - source: this.id - } - }) - } - getClusterChildren(e) { - return this.actor.sendAsync({ - type: "GCC", - data: { - type: this.type, - clusterId: e, - source: this.id - } - }) - } - getClusterLeaves(e, n, s) { - return this.actor.sendAsync({ - type: "GCL", - data: { - type: this.type, - source: this.id, - clusterId: e, - limit: n, - offset: s - } - }) - } - _updateWorkerData() { - return o._(this, void 0, void 0, (function*() { - if (this._isUpdatingWorker) return; - const { - data: e, - diff: n - } = this._pendingWorkerUpdate; - if (!e && !n) return void o.w(`No data or diff provided to GeoJSONSource ${this.id}.`); - const s = o.e({ - type: this.type - }, this.workerOptions); - e ? (typeof e == "string" ? (s.request = this.map._requestManager.transformRequest(ye.resolveURL(e), "Source"), s.request.collectResourceTiming = this._collectResourceTiming) : s.data = JSON.stringify(e), this._pendingWorkerUpdate.data = void 0) : n && (s.dataDiff = n, this._pendingWorkerUpdate.diff = void 0), this._isUpdatingWorker = !0, this.fire(new o.l("dataloading", { - dataType: "source" - })); - try { - const u = yield this.actor.sendAsync({ - type: "LD", - data: s - }); - if (this._isUpdatingWorker = !1, this._removed || u.abandoned) return void this.fire(new o.l("dataabort", { - dataType: "source" - })); - this._data = u.data; - let d = null; - u.resourceTiming && u.resourceTiming[this.id] && (d = u.resourceTiming[this.id].slice(0)); - const m = { - dataType: "source" - }; - this._collectResourceTiming && d && d.length > 0 && o.e(m, { - resourceTiming: d - }), this.fire(new o.l("data", Object.assign(Object.assign({}, m), { - sourceDataType: "metadata" - }))), this.fire(new o.l("data", Object.assign(Object.assign({}, m), { - sourceDataType: "content" - }))) - } catch (u) { - if (this._isUpdatingWorker = !1, this._removed) return void this.fire(new o.l("dataabort", { - dataType: "source" - })); - this.fire(new o.k(u)) - } finally { - (this._pendingWorkerUpdate.data || this._pendingWorkerUpdate.diff) && this._updateWorkerData() - } - })) - } - loaded() { - return !this._isUpdatingWorker && this._pendingWorkerUpdate.data === void 0 && this._pendingWorkerUpdate.diff === void 0 - } - loadTile(e) { - return o._(this, void 0, void 0, (function*() { - const n = e.actor ? "RT" : "LT"; - e.actor = this.actor; - const s = { - type: this.type, - uid: e.uid, - tileID: e.tileID, - zoom: e.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, - globalState: this.map.getGlobalState() - }; - e.abortController = new AbortController; - const u = yield this.actor.sendAsync({ - type: n, - data: s - }, e.abortController); - delete e.abortController, e.unloadVectorData(), e.aborted || e.loadVectorData(u, this.map.painter, n === "RT") - })) - } - abortTile(e) { - return o._(this, void 0, void 0, (function*() { - e.abortController && (e.abortController.abort(), delete e.abortController), e.aborted = !0 - })) - } - unloadTile(e) { - return o._(this, void 0, void 0, (function*() { - e.unloadVectorData(), yield this.actor.sendAsync({ - type: "RMT", - data: { - uid: e.uid, - type: this.type, - source: this.id - } - }) - })) - } - onRemove() { - this._removed = !0, this.actor.sendAsync({ - type: "RS", - data: { - type: this.type, - source: this.id - } - }) - } - serialize() { - return o.e({}, this._options, { - type: this.type, - data: this._data - }) - } - hasTransition() { - return !1 - } - } - class Ft extends o.E { - constructor(e, n, s, u) { - super(), this.flippedWindingOrder = !1, this.id = e, this.dispatcher = s, this.coordinates = n.coordinates, this.type = "image", this.minzoom = 0, this.maxzoom = 22, this.tileSize = 512, this.tiles = {}, this._loaded = !1, this.setEventedParent(u), this.options = n - } - load(e) { - return o._(this, void 0, void 0, (function*() { - this._loaded = !1, this.fire(new o.l("dataloading", { - dataType: "source" - })), this.url = this.options.url, this._request = new AbortController; - try { - const n = yield Ne.getImage(this.map._requestManager.transformRequest(this.url, "Image"), this._request); - this._request = null, this._loaded = !0, n && n.data && (this.image = n.data, e && (this.coordinates = e), this._finishLoading()) - } catch (n) { - this._request = null, this._loaded = !0, this.fire(new o.k(n)) - } - })) - } - loaded() { - return this._loaded - } - updateImage(e) { - return e.url ? (this._request && (this._request.abort(), this._request = null), this.options.url = e.url, this.load(e.coordinates).finally((() => { - this.texture = null - })), this) : this - } - _finishLoading() { - this.map && (this.setCoordinates(this.coordinates), this.fire(new o.l("data", { - dataType: "source", - sourceDataType: "metadata" - }))) - } - onAdd(e) { - this.map = e, this.load() - } - onRemove() { - this._request && (this._request.abort(), this._request = null) - } - setCoordinates(e) { - this.coordinates = e; - const n = e.map(o.a1.fromLngLat); - var s; - return this.tileID = (function(u) { - const d = o.a2.fromPoints(u), - m = d.width(), - y = d.height(), - w = Math.max(m, y), - P = Math.max(0, Math.floor(-Math.log(w) / Math.LN2)), - M = Math.pow(2, P); - return new o.a4(P, Math.floor((d.minX + d.maxX) / 2 * M), Math.floor((d.minY + d.maxY) / 2 * M)) - })(n), this.terrainTileRanges = this._getOverlappingTileRanges(n), this.minzoom = this.maxzoom = this.tileID.z, this.tileCoords = n.map((u => this.tileID.getTilePoint(u)._round())), this.flippedWindingOrder = ((s = this.tileCoords)[1].x - s[0].x) * (s[2].y - s[0].y) - (s[1].y - s[0].y) * (s[2].x - s[0].x) < 0, this.fire(new o.l("data", { - dataType: "source", - sourceDataType: "content" - })), this - } - prepare() { - if (Object.keys(this.tiles).length === 0 || !this.image) return; - const e = this.map.painter.context, - n = e.gl; - this.texture || (this.texture = new o.T(e, this.image, n.RGBA), this.texture.bind(n.LINEAR, n.CLAMP_TO_EDGE)); - let s = !1; - for (const u in this.tiles) { - const d = this.tiles[u]; - d.state !== "loaded" && (d.state = "loaded", d.texture = this.texture, s = !0) - } - s && this.fire(new o.l("data", { - dataType: "source", - sourceDataType: "idle", - sourceId: this.id - })) - } - loadTile(e) { - return o._(this, void 0, void 0, (function*() { - this.tileID && this.tileID.equals(e.tileID.canonical) ? (this.tiles[String(e.tileID.wrap)] = e, e.buckets = {}) : e.state = "errored" - })) - } - serialize() { - return { - type: "image", - url: this.options.url, - coordinates: this.coordinates - } - } - hasTransition() { - return !1 - } - _getOverlappingTileRanges(e) { - const { - minX: n, - minY: s, - maxX: u, - maxY: d - } = o.a2.fromPoints(e), m = {}; - for (let y = 0; y <= o.a3; y++) { - const w = Math.pow(2, y), - P = Math.floor(n * w), - M = Math.floor(s * w), - D = Math.floor(u * w), - z = Math.floor(d * w); - m[y] = { - minTileX: P, - minTileY: M, - maxTileX: D, - maxTileY: z - } - } - return m - } - } - class dr extends Ft { - constructor(e, n, s, u) { - super(e, n, s, u), this.roundZoom = !0, this.type = "video", this.options = n - } - load() { - return o._(this, void 0, void 0, (function*() { - this._loaded = !1; - const e = this.options; - this.urls = []; - for (const n of e.urls) this.urls.push(this.map._requestManager.transformRequest(n, "Source").url); - try { - const n = yield o.a5(this.urls); - if (this._loaded = !0, !n) return; - this.video = n, this.video.loop = !0, this.video.addEventListener("playing", (() => { - this.map.triggerRepaint() - })), this.map && this.video.play(), this._finishLoading() - } catch (n) { - this.fire(new o.k(n)) - } - })) - } - pause() { - this.video && this.video.pause() - } - play() { - this.video && this.video.play() - } - seek(e) { - if (this.video) { - const n = this.video.seekable; - e < n.start(0) || e > n.end(0) ? this.fire(new o.k(new o.a6(`sources.${this.id}`, null, `Playback for this video can be set only between the ${n.start(0)} and ${n.end(0)}-second mark.`))) : this.video.currentTime = e - } - } - getVideo() { - return this.video - } - onAdd(e) { - this.map || (this.map = e, this.load(), this.video && (this.video.play(), this.setCoordinates(this.coordinates))) - } - prepare() { - if (Object.keys(this.tiles).length === 0 || this.video.readyState < 2) return; - const e = this.map.painter.context, - n = e.gl; - this.texture ? this.video.paused || (this.texture.bind(n.LINEAR, n.CLAMP_TO_EDGE), n.texSubImage2D(n.TEXTURE_2D, 0, 0, 0, n.RGBA, n.UNSIGNED_BYTE, this.video)) : (this.texture = new o.T(e, this.video, n.RGBA), this.texture.bind(n.LINEAR, n.CLAMP_TO_EDGE)); - let s = !1; - for (const u in this.tiles) { - const d = this.tiles[u]; - d.state !== "loaded" && (d.state = "loaded", d.texture = this.texture, s = !0) - } - s && this.fire(new o.l("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 _r extends Ft { - constructor(e, n, s, u) { - super(e, n, s, u), n.coordinates ? Array.isArray(n.coordinates) && n.coordinates.length === 4 && !n.coordinates.some((d => !Array.isArray(d) || d.length !== 2 || d.some((m => typeof m != "number")))) || this.fire(new o.k(new o.a6(`sources.${e}`, null, '"coordinates" property must be an array of 4 longitude/latitude array pairs'))) : this.fire(new o.k(new o.a6(`sources.${e}`, null, 'missing required property "coordinates"'))), n.animate && typeof n.animate != "boolean" && this.fire(new o.k(new o.a6(`sources.${e}`, null, 'optional "animate" property must be a boolean value'))), n.canvas ? typeof n.canvas == "string" || n.canvas instanceof HTMLCanvasElement || this.fire(new o.k(new o.a6(`sources.${e}`, 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 o.k(new o.a6(`sources.${e}`, null, 'missing required property "canvas"'))), this.options = n, this.animate = n.animate === void 0 || n.animate - } - load() { - return o._(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 o.k(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(e) { - this.map = e, this.load(), this.canvas && this.animate && this.play() - } - onRemove() { - this.pause() - } - prepare() { - let e = !1; - if (this.canvas.width !== this.width && (this.width = this.canvas.width, e = !0), this.canvas.height !== this.height && (this.height = this.canvas.height, e = !0), this._hasInvalidDimensions() || Object.keys(this.tiles).length === 0) return; - const n = this.map.painter.context, - s = n.gl; - this.texture ? (e || this._playing) && this.texture.update(this.canvas, { - premultiply: !0 - }) : this.texture = new o.T(n, this.canvas, s.RGBA, { - premultiply: !0 - }); - let u = !1; - for (const d in this.tiles) { - const m = this.tiles[d]; - m.state !== "loaded" && (m.state = "loaded", m.texture = this.texture, u = !0) - } - u && this.fire(new o.l("data", { - dataType: "source", - sourceDataType: "idle", - sourceId: this.id - })) - } - serialize() { - return { - type: "canvas", - coordinates: this.coordinates - } - } - hasTransition() { - return this._playing - } - _hasInvalidDimensions() { - for (const e of [this.canvas.width, this.canvas.height]) - if (isNaN(e) || e <= 0) return !0; - return !1 - } - } - const Ir = {}, - jr = h => { - switch (h) { - case "geojson": - return ar; - case "image": - return Ft; - case "raster": - return Yt; - case "raster-dem": - return nr; - case "vector": - return Xt; - case "video": - return dr; - case "canvas": - return _r - } - return Ir[h] - }, - ur = "RTLPluginLoaded"; - class Mr extends o.E { - constructor() { - super(...arguments), this.status = "unavailable", this.url = null, this.dispatcher = tt() - } - _syncState(e) { - return this.status = e, this.dispatcher.broadcast("SRPS", { - pluginStatus: e, - pluginURL: this.url - }).catch((n => { - throw this.status = "error", n - })) - } - getRTLTextPluginStatus() { - return this.status - } - clearRTLTextPlugin() { - this.status = "unavailable", this.url = null - } - setRTLTextPlugin(e) { - return o._(this, arguments, void 0, (function*(n, s = !1) { - if (this.url) throw new Error("setRTLTextPlugin cannot be called multiple times."); - if (this.url = ye.resolveURL(n), !this.url) throw new Error(`requested url ${n} is invalid`); - if (this.status === "unavailable") { - if (!s) return this._requestImport(); - this.status = "deferred", this._syncState(this.status) - } else if (this.status === "requested") return this._requestImport() - })) - } - _requestImport() { - return o._(this, void 0, void 0, (function*() { - yield this._syncState("loading"), this.status = "loaded", this.fire(new o.l(ur)) - })) - } - lazyLoad() { - this.status === "unavailable" ? this.status = "requested" : this.status === "deferred" && this._requestImport() - } - } - let Ar = null; - - function kr() { - return Ar || (Ar = new Mr), Ar - } - class Nr { - constructor(e, n) { - this.timeAdded = 0, this.fadeEndTime = 0, this.tileID = e, this.uid = o.a7(), this.uses = 0, this.tileSize = n, this.buckets = {}, this.expirationTime = null, this.queryPadding = 0, this.hasSymbolBuckets = !1, this.hasRTLText = !1, this.dependencies = {}, this.rtt = [], this.rttCoords = {}, this.expiredRequestCount = 0, this.state = "loading" - } - registerFadeDuration(e) { - const n = e + this.timeAdded; - n < this.fadeEndTime || (this.fadeEndTime = n) - } - wasRequested() { - return this.state === "errored" || this.state === "loaded" || this.state === "reloading" - } - clearTextures(e) { - this.demTexture && e.saveTileTexture(this.demTexture), this.demTexture = null - } - loadVectorData(e, n, s) { - if (this.hasData() && this.unloadVectorData(), this.state = "loaded", e) { - e.featureIndex && (this.latestFeatureIndex = e.featureIndex, e.rawTileData ? (this.latestRawTileData = e.rawTileData, this.latestFeatureIndex.rawTileData = e.rawTileData) : this.latestRawTileData && (this.latestFeatureIndex.rawTileData = this.latestRawTileData)), this.collisionBoxArray = e.collisionBoxArray, this.buckets = (function(u, d) { - const m = {}; - if (!d) return m; - for (const y of u) { - const w = y.layerIds.map((P => d.getLayer(P))).filter(Boolean); - if (w.length !== 0) { - y.layers = w, y.stateDependentLayerIds && (y.stateDependentLayers = y.stateDependentLayerIds.map((P => w.filter((M => M.id === P))[0]))); - for (const P of w) m[P.id] = y - } - } - return m - })(e.buckets, n == null ? void 0 : n.style), this.hasSymbolBuckets = !1; - for (const u in this.buckets) { - const d = this.buckets[u]; - if (d instanceof o.a9) { - if (this.hasSymbolBuckets = !0, !s) break; - d.justReloaded = !0 - } - } - if (this.hasRTLText = !1, this.hasSymbolBuckets) - for (const u in this.buckets) { - const d = this.buckets[u]; - if (d instanceof o.a9 && d.hasRTLText) { - this.hasRTLText = !0, kr().lazyLoad(); - break - } - } - this.queryPadding = 0; - for (const u in this.buckets) { - const d = this.buckets[u]; - this.queryPadding = Math.max(this.queryPadding, n.style.getLayer(u).queryRadius(d)) - } - e.imageAtlas && (this.imageAtlas = e.imageAtlas), e.glyphAtlasImage && (this.glyphAtlasImage = e.glyphAtlasImage) - } else this.collisionBoxArray = new o.a8 - } - unloadVectorData() { - for (const e in this.buckets) this.buckets[e].destroy(); - this.buckets = {}, this.imageAtlasTexture && this.imageAtlasTexture.destroy(), this.imageAtlas && (this.imageAtlas = null), this.glyphAtlasTexture && this.glyphAtlasTexture.destroy(), this.latestFeatureIndex = null, this.state = "unloaded" - } - getBucket(e) { - return this.buckets[e.id] - } - upload(e) { - for (const s in this.buckets) { - const u = this.buckets[s]; - u.uploadPending() && u.upload(e) - } - const n = e.gl; - this.imageAtlas && !this.imageAtlas.uploaded && (this.imageAtlasTexture = new o.T(e, this.imageAtlas.image, n.RGBA), this.imageAtlas.uploaded = !0), this.glyphAtlasImage && (this.glyphAtlasTexture = new o.T(e, this.glyphAtlasImage, n.ALPHA), this.glyphAtlasImage = null) - } - prepare(e) { - this.imageAtlas && this.imageAtlas.patchUpdatedImages(e, this.imageAtlasTexture) - } - queryRenderedFeatures(e, n, s, u, d, m, y, w, P, M, D) { - return this.latestFeatureIndex && this.latestFeatureIndex.rawTileData ? this.latestFeatureIndex.query({ - queryGeometry: u, - cameraQueryGeometry: d, - scale: m, - tileSize: this.tileSize, - pixelPosMatrix: M, - transform: w, - params: y, - queryPadding: this.queryPadding * P, - getElevation: D - }, e, n, s) : {} - } - querySourceFeatures(e, n) { - const s = this.latestFeatureIndex; - if (!s || !s.rawTileData) return; - const u = s.loadVTLayers(), - d = n && n.sourceLayer ? n.sourceLayer : "", - m = u._geojsonTileLayer || u[d]; - if (!m) return; - const y = o.aa(n && n.filter), - { - z: w, - x: P, - y: M - } = this.tileID.canonical, - D = { - z: w, - x: P, - y: M - }; - for (let z = 0; z < m.length; z++) { - const B = m.feature(z); - if (y.needGeometry) { - const J = o.ab(B, !0); - if (!y.filter(new o.F(this.tileID.overscaledZ), J, this.tileID.canonical)) continue - } else if (!y.filter(new o.F(this.tileID.overscaledZ), B)) continue; - const U = s.getId(B, d), - ee = new o.ac(B, w, P, M, U); - ee.tile = D, e.push(ee) - } - } - hasData() { - return this.state === "loaded" || this.state === "reloading" || this.state === "expired" - } - patternsLoaded() { - return this.imageAtlas && !!Object.keys(this.imageAtlas.patternPositions).length - } - setExpiryData(e) { - const n = this.expirationTime; - if (e.cacheControl) { - const s = o.ad(e.cacheControl); - s["max-age"] && (this.expirationTime = Date.now() + 1e3 * s["max-age"]) - } else e.expires && (this.expirationTime = new Date(e.expires).getTime()); - if (this.expirationTime) { - const s = Date.now(); - let u = !1; - if (this.expirationTime > s) u = !1; - else if (n) - if (this.expirationTime < n) u = !0; - else { - const d = this.expirationTime - n; - d ? this.expirationTime = s + Math.max(d, 3e4) : u = !0 - } - else u = !0; - u ? (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(e, n) { - if (!this.latestFeatureIndex || !this.latestFeatureIndex.rawTileData || Object.keys(e).length === 0) return; - const s = this.latestFeatureIndex.loadVTLayers(); - for (const u in this.buckets) { - if (!n.style.hasLayer(u)) continue; - const d = this.buckets[u], - m = d.layers[0].sourceLayer || "_geojsonTileLayer", - y = s[m], - w = e[m]; - if (!y || !w || Object.keys(w).length === 0) continue; - d.update(w, y, this.imageAtlas && this.imageAtlas.patternPositions || {}); - const P = n && n.style && n.style.getLayer(u); - P && (this.queryPadding = Math.max(this.queryPadding, P.queryRadius(d))) - } - } - holdingForFade() { - return this.symbolFadeHoldUntil !== void 0 - } - symbolFadeFinished() { - return !this.symbolFadeHoldUntil || this.symbolFadeHoldUntil < ye.now() - } - clearFadeHold() { - this.symbolFadeHoldUntil = void 0 - } - setHoldDuration(e) { - this.symbolFadeHoldUntil = ye.now() + e - } - setDependencies(e, n) { - const s = {}; - for (const u of n) s[u] = !0; - this.dependencies[e] = s - } - hasDependency(e, n) { - for (const s of e) { - const u = this.dependencies[s]; - if (u) { - for (const d of n) - if (u[d]) return !0 - } - } - return !1 - } - } - class ce { - constructor(e, n) { - this.max = e, this.onRemove = n, this.reset() - } - reset() { - for (const e in this.data) - for (const n of this.data[e]) n.timeout && clearTimeout(n.timeout), this.onRemove(n.value); - return this.data = {}, this.order = [], this - } - add(e, n, s) { - const u = e.wrapped().key; - this.data[u] === void 0 && (this.data[u] = []); - const d = { - value: n, - timeout: void 0 - }; - if (s !== void 0 && (d.timeout = setTimeout((() => { - this.remove(e, d) - }), s)), this.data[u].push(d), this.order.push(u), this.order.length > this.max) { - const m = this._getAndRemoveByKey(this.order[0]); - m && this.onRemove(m) - } - return this - } - has(e) { - return e.wrapped().key in this.data - } - getAndRemove(e) { - return this.has(e) ? this._getAndRemoveByKey(e.wrapped().key) : null - } - _getAndRemoveByKey(e) { - const n = this.data[e].shift(); - return n.timeout && clearTimeout(n.timeout), this.data[e].length === 0 && delete this.data[e], this.order.splice(this.order.indexOf(e), 1), n.value - } - getByKey(e) { - const n = this.data[e]; - return n ? n[0].value : null - } - get(e) { - return this.has(e) ? this.data[e.wrapped().key][0].value : null - } - remove(e, n) { - if (!this.has(e)) return this; - const s = e.wrapped().key, - u = n === void 0 ? 0 : this.data[s].indexOf(n), - d = this.data[s][u]; - return this.data[s].splice(u, 1), d.timeout && clearTimeout(d.timeout), this.data[s].length === 0 && delete this.data[s], this.onRemove(d.value), this.order.splice(this.order.indexOf(s), 1), this - } - setMaxSize(e) { - for (this.max = e; this.order.length > this.max;) { - const n = this._getAndRemoveByKey(this.order[0]); - n && this.onRemove(n) - } - return this - } - filter(e) { - const n = []; - for (const s in this.data) - for (const u of this.data[s]) e(u.value) || n.push(u); - for (const s of n) this.remove(s.value.tileID, s) - } - } - class O { - constructor() { - this.state = {}, this.stateChanges = {}, this.deletedStates = {} - } - updateState(e, n, s) { - const u = String(n); - if (this.stateChanges[e] = this.stateChanges[e] || {}, this.stateChanges[e][u] = this.stateChanges[e][u] || {}, o.e(this.stateChanges[e][u], s), this.deletedStates[e] === null) { - this.deletedStates[e] = {}; - for (const d in this.state[e]) d !== u && (this.deletedStates[e][d] = null) - } else if (this.deletedStates[e] && this.deletedStates[e][u] === null) { - this.deletedStates[e][u] = {}; - for (const d in this.state[e][u]) s[d] || (this.deletedStates[e][u][d] = null) - } else - for (const d in s) this.deletedStates[e] && this.deletedStates[e][u] && this.deletedStates[e][u][d] === null && delete this.deletedStates[e][u][d] - } - removeFeatureState(e, n, s) { - if (this.deletedStates[e] === null) return; - const u = String(n); - if (this.deletedStates[e] = this.deletedStates[e] || {}, s && n !== void 0) this.deletedStates[e][u] !== null && (this.deletedStates[e][u] = this.deletedStates[e][u] || {}, this.deletedStates[e][u][s] = null); - else if (n !== void 0) - if (this.stateChanges[e] && this.stateChanges[e][u]) - for (s in this.deletedStates[e][u] = {}, this.stateChanges[e][u]) this.deletedStates[e][u][s] = null; - else this.deletedStates[e][u] = null; - else this.deletedStates[e] = null - } - getState(e, n) { - const s = String(n), - u = o.e({}, (this.state[e] || {})[s], (this.stateChanges[e] || {})[s]); - if (this.deletedStates[e] === null) return {}; - if (this.deletedStates[e]) { - const d = this.deletedStates[e][n]; - if (d === null) return {}; - for (const m in d) delete u[m] - } - return u - } - initializeTileState(e, n) { - e.setFeatureState(this.state, n) - } - coalesceChanges(e, n) { - const s = {}; - for (const u in this.stateChanges) { - this.state[u] = this.state[u] || {}; - const d = {}; - for (const m in this.stateChanges[u]) this.state[u][m] || (this.state[u][m] = {}), o.e(this.state[u][m], this.stateChanges[u][m]), d[m] = this.state[u][m]; - s[u] = d - } - for (const u in this.deletedStates) { - this.state[u] = this.state[u] || {}; - const d = {}; - if (this.deletedStates[u] === null) - for (const m in this.state[u]) d[m] = {}, this.state[u][m] = {}; - else - for (const m in this.deletedStates[u]) { - if (this.deletedStates[u][m] === null) this.state[u][m] = {}; - else - for (const y of Object.keys(this.deletedStates[u][m])) delete this.state[u][m][y]; - d[m] = this.state[u][m] - } - s[u] = s[u] || {}, o.e(s[u], d) - } - if (this.stateChanges = {}, this.deletedStates = {}, Object.keys(s).length !== 0) - for (const u in e) e[u].setFeatureState(s, n) - } - } - const q = 89.25; - - function G(h, e) { - const n = o.ah(e.lat, -o.ai, o.ai); - return new o.P(o.V(e.lng) * h, o.U(n) * h) - } - - function K(h, e) { - return new o.a1(e.x / h, e.y / h).toLngLat() - } - - function le(h) { - return h.cameraToCenterDistance * Math.min(.85 * Math.tan(o.ae(90 - h.pitch)), Math.tan(o.ae(q - h.pitch))) - } - - function ve(h, e) { - const n = h.canonical, - s = e / o.af(n.z), - u = n.x + Math.pow(2, n.z) * h.wrap, - d = o.ag(new Float64Array(16)); - return o.M(d, d, [u * s, n.y * s, 0]), o.N(d, d, [s / o.$, s / o.$, 1]), d - } - - function Le(h, e, n, s, u) { - const d = o.a1.fromLngLat(h, e), - m = u * o.aj(1, h.lat), - y = m * Math.cos(o.ae(n)), - w = Math.sqrt(m * m - y * y), - P = w * Math.sin(o.ae(-s)), - M = w * Math.cos(o.ae(-s)); - return new o.a1(d.x + P, d.y + M, d.z + y) - } - - function Ce(h, e, n) { - const s = e.intersectsFrustum(h); - if (!n || s === 0) return s; - const u = e.intersectsPlane(n); - return u === 0 ? 0 : s === 2 && u === 2 ? 2 : 1 - } - - function Ze(h, e, n) { - let s = 0; - const u = (n - e) / 10; - for (let d = 0; d < 10; d++) s += u * Math.pow(Math.cos(e + (d + .5) / 10 * (n - e)), h); - return s - } - - function ot(h, e) { - return function(n, s, u, d, m) { - const y = 2 * ((h - 1) / o.ak(Math.cos(o.ae(q - m)) / Math.cos(o.ae(q))) - 1), - w = Math.acos(u / d), - P = 2 * Ze(y - 1, 0, o.ae(m / 2)), - M = Math.min(o.ae(q), w + o.ae(m / 2)), - D = Ze(y - 1, Math.min(M, w - o.ae(m / 2)), M), - z = Math.atan(s / u), - B = Math.hypot(s, u); - let U = n; - return U += o.ak(d / B / Math.max(.5, Math.cos(o.ae(m / 2)))), U += y * o.ak(Math.cos(z)) / 2, U -= o.ak(Math.max(1, D / P / e)) / 2, U - } - } - const Ye = ot(9.314, 3); - - function Ot(h, e) { - const n = (e.roundZoom ? Math.round : Math.floor)(h.zoom + o.ak(h.tileSize / e.tileSize)); - return Math.max(0, n) - } - - function xe(h, e) { - const n = h.getCameraFrustum(), - s = h.getClippingPlane(), - u = h.screenPointToMercatorCoordinate(h.getCameraPoint()), - d = o.a1.fromLngLat(h.center, h.elevation); - u.z = d.z + Math.cos(h.pitchInRadians) * h.cameraToCenterDistance / h.worldSize; - const m = h.getCoveringTilesDetailsProvider(), - y = m.allowVariableZoom(h, e), - w = Ot(h, e), - P = e.minzoom || 0, - M = e.maxzoom !== void 0 ? e.maxzoom : h.maxZoom, - D = Math.min(Math.max(0, w), M), - z = Math.pow(2, D), - B = [z * u.x, z * u.y, 0], - U = [z * d.x, z * d.y, 0], - ee = Math.hypot(d.x - u.x, d.y - u.y), - J = Math.abs(d.z - u.z), - re = Math.hypot(ee, J), - se = ge => ({ - zoom: 0, - x: 0, - y: 0, - wrap: ge, - fullyVisible: !1 - }), - de = [], - ue = []; - if (h.renderWorldCopies && m.allowWorldCopies()) - for (let ge = 1; ge <= 3; ge++) de.push(se(-ge)), de.push(se(ge)); - for (de.push(se(0)); de.length > 0;) { - const ge = de.pop(), - Te = ge.x, - he = ge.y; - let De = ge.fullyVisible; - const He = { - x: Te, - y: he, - z: ge.zoom - }, - je = m.getTileBoundingVolume(He, ge.wrap, h.elevation, e); - if (!De) { - const Nt = Ce(n, je, s); - if (Nt === 0) continue; - De = Nt === 2 - } - const qe = m.distanceToTile2d(u.x, u.y, He, je); - let $e = w; - y && ($e = (e.calculateTileZoom || Ye)(h.zoom + o.ak(h.tileSize / e.tileSize), qe, J, re, h.fov)), $e = (e.roundZoom ? Math.round : Math.floor)($e), $e = Math.max(0, $e); - const Rt = Math.min($e, M); - if (ge.wrap = m.getWrap(d, He, ge.wrap), ge.zoom >= Rt) { - if (ge.zoom < P) continue; - const Nt = D - ge.zoom, - yt = B[0] - .5 - (Te << Nt), - sr = B[1] - .5 - (he << Nt), - Xr = e.reparseOverscaled ? Math.max(ge.zoom, $e) : ge.zoom; - ue.push({ - tileID: new o.Z(ge.zoom === M ? Xr : ge.zoom, ge.wrap, ge.zoom, Te, he), - distanceSq: o.al([U[0] - .5 - Te, U[1] - .5 - he]), - tileDistanceToCamera: Math.sqrt(yt * yt + sr * sr) - }) - } else - for (let Nt = 0; Nt < 4; Nt++) de.push({ - zoom: ge.zoom + 1, - x: (Te << 1) + Nt % 2, - y: (he << 1) + (Nt >> 1), - wrap: ge.wrap, - fullyVisible: De - }) - } - return ue.sort(((ge, Te) => ge.distanceSq - Te.distanceSq)).map((ge => ge.tileID)) - } - const At = o.a2.fromPoints([new o.P(0, 0), new o.P(o.$, o.$)]); - class Pt extends o.E { - constructor(e, n, s) { - super(), this.id = e, this.dispatcher = s, this.on("data", (u => this._dataHandler(u))), this.on("dataloading", (() => { - this._sourceErrored = !1 - })), this.on("error", (() => { - this._sourceErrored = this._source.loaded() - })), this._source = ((u, d, m, y) => { - const w = new(jr(d.type))(u, d, m, y); - if (w.id !== u) throw new Error(`Expected Source id to be ${u} instead of ${w.id}`); - return w - })(e, n, s, this), this._tiles = {}, this._cache = new ce(0, (u => this._unloadTile(u))), this._timers = {}, this._cacheTimers = {}, this._maxTileCacheSize = null, this._maxTileCacheZoomLevels = null, this._loadedParentTiles = {}, this._coveredTiles = {}, this._state = new O, this._didEmitContent = !1, this._updated = !1 - } - onAdd(e) { - this.map = e, this._maxTileCacheSize = e ? e._maxTileCacheSize : null, this._maxTileCacheZoomLevels = e ? e._maxTileCacheZoomLevels : null, this._source && this._source.onAdd && this._source.onAdd(e) - } - onRemove(e) { - this.clearTiles(), this._source && this._source.onRemove && this._source.onRemove(e) - } - 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 e in this._tiles) { - const n = this._tiles[e]; - if (n.state !== "loaded" && n.state !== "errored") return !1 - } - return !0 - } - getSource() { - return this._source - } - pause() { - this._paused = !0 - } - resume() { - if (!this._paused) return; - const e = this._shouldReloadOnResume; - this._paused = !1, this._shouldReloadOnResume = !1, e && this.reload(), this.transform && this.update(this.transform, this.terrain) - } - _loadTile(e, n, s) { - return o._(this, void 0, void 0, (function*() { - try { - yield this._source.loadTile(e), this._tileLoaded(e, n, s) - } catch (u) { - e.state = "errored", u.status !== 404 ? this._source.fire(new o.k(u, { - tile: e - })) : this.update(this.transform, this.terrain) - } - })) - } - _unloadTile(e) { - this._source.unloadTile && this._source.unloadTile(e) - } - _abortTile(e) { - this._source.abortTile && this._source.abortTile(e), this._source.fire(new o.l("dataabort", { - tile: e, - coord: e.tileID, - dataType: "source" - })) - } - serialize() { - return this._source.serialize() - } - prepare(e) { - this._source.prepare && this._source.prepare(), this._state.coalesceChanges(this._tiles, this.map ? this.map.painter : null); - for (const n in this._tiles) { - const s = this._tiles[n]; - s.upload(e), s.prepare(this.map.style.imageManager) - } - } - getIds() { - return Object.values(this._tiles).map((e => e.tileID)).sort(kt).map((e => e.key)) - } - getRenderableIds(e) { - const n = []; - for (const s in this._tiles) this._isIdRenderable(s, e) && n.push(this._tiles[s]); - return e ? n.sort(((s, u) => { - const d = s.tileID, - m = u.tileID, - y = new o.P(d.canonical.x, d.canonical.y)._rotate(-this.transform.bearingInRadians), - w = new o.P(m.canonical.x, m.canonical.y)._rotate(-this.transform.bearingInRadians); - return d.overscaledZ - m.overscaledZ || w.y - y.y || w.x - y.x - })).map((s => s.tileID.key)) : n.map((s => s.tileID)).sort(kt).map((s => s.key)) - } - hasRenderableParent(e) { - const n = this.findLoadedParent(e, 0); - return !!n && this._isIdRenderable(n.tileID.key) - } - _isIdRenderable(e, n) { - return this._tiles[e] && this._tiles[e].hasData() && !this._coveredTiles[e] && (n || !this._tiles[e].holdingForFade()) - } - reload(e) { - if (this._paused) this._shouldReloadOnResume = !0; - else { - this._cache.reset(); - for (const n in this._tiles) e ? this._reloadTile(n, "expired") : this._tiles[n].state !== "errored" && this._reloadTile(n, "reloading") - } - } - _reloadTile(e, n) { - return o._(this, void 0, void 0, (function*() { - const s = this._tiles[e]; - s && (s.state !== "loading" && (s.state = n), yield this._loadTile(s, e, n)) - })) - } - _tileLoaded(e, n, s) { - e.timeAdded = ye.now(), s === "expired" && (e.refreshedUponExpiration = !0), this._setTileReloadTimer(n, e), this.getSource().type === "raster-dem" && e.dem && this._backfillDEM(e), this._state.initializeTileState(e, this.map ? this.map.painter : null), e.aborted || this._source.fire(new o.l("data", { - dataType: "source", - tile: e, - coord: e.tileID - })) - } - _backfillDEM(e) { - const n = this.getRenderableIds(); - for (let u = 0; u < n.length; u++) { - const d = n[u]; - if (e.neighboringTiles && e.neighboringTiles[d]) { - const m = this.getTileByID(d); - s(e, m), s(m, e) - } - } - - function s(u, d) { - u.needsHillshadePrepare = !0, u.needsTerrainPrepare = !0; - let m = d.tileID.canonical.x - u.tileID.canonical.x; - const y = d.tileID.canonical.y - u.tileID.canonical.y, - w = Math.pow(2, u.tileID.canonical.z), - P = d.tileID.key; - m === 0 && y === 0 || Math.abs(y) > 1 || (Math.abs(m) > 1 && (Math.abs(m + w) === 1 ? m += w : Math.abs(m - w) === 1 && (m -= w)), d.dem && u.dem && (u.dem.backfillBorder(d.dem, m, y), u.neighboringTiles && u.neighboringTiles[P] && (u.neighboringTiles[P].backfilled = !0))) - } - } - getTile(e) { - return this.getTileByID(e.key) - } - getTileByID(e) { - return this._tiles[e] - } - _retainLoadedChildren(e, n, s, u) { - for (const d in this._tiles) { - let m = this._tiles[d]; - if (u[d] || !m.hasData() || m.tileID.overscaledZ <= n || m.tileID.overscaledZ > s) continue; - let y = m.tileID; - for (; m && m.tileID.overscaledZ > n + 1;) { - const P = m.tileID.scaledTo(m.tileID.overscaledZ - 1); - m = this._tiles[P.key], m && m.hasData() && (y = P) - } - let w = y; - for (; w.overscaledZ > n;) - if (w = w.scaledTo(w.overscaledZ - 1), e[w.key] || e[w.canonical.key]) { - u[y.key] = y; - break - } - } - } - findLoadedParent(e, n) { - if (e.key in this._loadedParentTiles) { - const s = this._loadedParentTiles[e.key]; - return s && s.tileID.overscaledZ >= n ? s : null - } - for (let s = e.overscaledZ - 1; s >= n; s--) { - const u = e.scaledTo(s), - d = this._getLoadedTile(u); - if (d) return d - } - } - findLoadedSibling(e) { - return this._getLoadedTile(e) - } - _getLoadedTile(e) { - const n = this._tiles[e.key]; - return n && n.hasData() ? n : this._cache.getByKey(e.wrapped().key) - } - updateCacheSize(e) { - const n = Math.ceil(e.width / this._source.tileSize) + 1, - s = Math.ceil(e.height / this._source.tileSize) + 1, - u = Math.floor(n * s * (this._maxTileCacheZoomLevels === null ? o.a.MAX_TILE_CACHE_ZOOM_LEVELS : this._maxTileCacheZoomLevels)), - d = typeof this._maxTileCacheSize == "number" ? Math.min(this._maxTileCacheSize, u) : u; - this._cache.setMaxSize(d) - } - handleWrapJump(e) { - const n = Math.round((e - (this._prevLng === void 0 ? e : this._prevLng)) / 360); - if (this._prevLng = e, n) { - const s = {}; - for (const u in this._tiles) { - const d = this._tiles[u]; - d.tileID = d.tileID.unwrapTo(d.tileID.wrap + n), s[d.tileID.key] = d - } - this._tiles = s; - for (const u in this._timers) clearTimeout(this._timers[u]), delete this._timers[u]; - for (const u in this._tiles) this._setTileReloadTimer(u, this._tiles[u]) - } - } - _updateCoveredAndRetainedTiles(e, n, s, u, d, m) { - const y = {}, - w = {}, - P = Object.keys(e), - M = ye.now(); - for (const D of P) { - const z = e[D], - B = this._tiles[D]; - if (!B || B.fadeEndTime !== 0 && B.fadeEndTime <= M) continue; - const U = this.findLoadedParent(z, n), - ee = this.findLoadedSibling(z), - J = U || ee || null; - J && (this._addTile(J.tileID), y[J.tileID.key] = J.tileID), w[D] = z - } - this._retainLoadedChildren(w, u, s, e); - for (const D in y) e[D] || (this._coveredTiles[D] = !0, e[D] = y[D]); - if (m) { - const D = {}, - z = {}; - for (const B of d) this._tiles[B.key].hasData() ? D[B.key] = B : z[B.key] = B; - for (const B in z) { - const U = z[B].children(this._source.maxzoom); - this._tiles[U[0].key] && this._tiles[U[1].key] && this._tiles[U[2].key] && this._tiles[U[3].key] && (D[U[0].key] = e[U[0].key] = U[0], D[U[1].key] = e[U[1].key] = U[1], D[U[2].key] = e[U[2].key] = U[2], D[U[3].key] = e[U[3].key] = U[3], delete z[B]) - } - for (const B in z) { - const U = z[B], - ee = this.findLoadedParent(U, this._source.minzoom), - J = this.findLoadedSibling(U), - re = ee || J || null; - if (re) { - D[re.tileID.key] = e[re.tileID.key] = re.tileID; - for (const se in D) D[se].isChildOf(re.tileID) && delete D[se] - } - } - for (const B in this._tiles) D[B] || (this._coveredTiles[B] = !0) - } - } - update(e, n) { - if (!this._sourceLoaded || this._paused) return; - let s; - this.transform = e, this.terrain = n, this.updateCacheSize(e), this.handleWrapJump(this.transform.center.lng), this._coveredTiles = {}, this.used || this.usedForTerrain ? this._source.tileID ? s = e.getVisibleUnwrappedCoordinates(this._source.tileID).map((M => new o.Z(M.canonical.z, M.wrap, M.canonical.z, M.canonical.x, M.canonical.y))) : (s = xe(e, { - tileSize: this.usedForTerrain ? this.tileSize : this._source.tileSize, - minzoom: this._source.minzoom, - maxzoom: this._source.maxzoom, - roundZoom: !this.usedForTerrain && this._source.roundZoom, - reparseOverscaled: this._source.reparseOverscaled, - terrain: n, - calculateTileZoom: this._source.calculateTileZoom - }), this._source.hasTile && (s = s.filter((M => this._source.hasTile(M))))) : s = []; - const u = Ot(e, this._source), - d = Math.max(u - Pt.maxOverzooming, this._source.minzoom), - m = Math.max(u + Pt.maxUnderzooming, this._source.minzoom); - if (this.usedForTerrain) { - const M = {}; - for (const D of s) - if (D.canonical.z > this._source.minzoom) { - const z = D.scaledTo(D.canonical.z - 1); - M[z.key] = z; - const B = D.scaledTo(Math.max(this._source.minzoom, Math.min(D.canonical.z, 5))); - M[B.key] = B - } s = s.concat(Object.values(M)) - } - const y = s.length === 0 && !this._updated && this._didEmitContent; - this._updated = !0, y && this.fire(new o.l("data", { - sourceDataType: "idle", - dataType: "source", - sourceId: this.id - })); - const w = this._updateRetainedTiles(s, u); - Wt(this._source.type) && this._updateCoveredAndRetainedTiles(w, d, m, u, s, n); - for (const M in w) this._tiles[M].clearFadeHold(); - const P = o.am(this._tiles, w); - for (const M of P) { - const D = this._tiles[M]; - D.hasSymbolBuckets && !D.holdingForFade() ? D.setHoldDuration(this.map._fadeDuration) : D.hasSymbolBuckets && !D.symbolFadeFinished() || this._removeTile(M) - } - this._updateLoadedParentTileCache(), this._updateLoadedSiblingTileCache() - } - releaseSymbolFadeTiles() { - for (const e in this._tiles) this._tiles[e].holdingForFade() && this._removeTile(e) - } - _updateRetainedTiles(e, n) { - var s; - const u = {}, - d = {}, - m = Math.max(n - Pt.maxOverzooming, this._source.minzoom), - y = Math.max(n + Pt.maxUnderzooming, this._source.minzoom), - w = {}; - for (const P of e) { - const M = this._addTile(P); - u[P.key] = P, M.hasData() || n < this._source.maxzoom && (w[P.key] = P) - } - this._retainLoadedChildren(w, n, y, u); - for (const P of e) { - let M = this._tiles[P.key]; - if (M.hasData()) continue; - if (n + 1 > this._source.maxzoom) { - const z = P.children(this._source.maxzoom)[0], - B = this.getTile(z); - if (B && B.hasData()) { - u[z.key] = z; - continue - } - } else { - const z = P.children(this._source.maxzoom); - if (u[z[0].key] && u[z[1].key] && u[z[2].key] && u[z[3].key]) continue - } - let D = M.wasRequested(); - for (let z = P.overscaledZ - 1; z >= m; --z) { - const B = P.scaledTo(z); - if (d[B.key]) break; - if (d[B.key] = !0, M = this.getTile(B), !M && D && (M = this._addTile(B)), M) { - const U = M.hasData(); - if ((U || !(!((s = this.map) === null || s === void 0) && s.cancelPendingTileRequestsWhileZooming) || D) && (u[B.key] = B), D = M.wasRequested(), U) break - } - } - } - return u - } - _updateLoadedParentTileCache() { - this._loadedParentTiles = {}; - for (const e in this._tiles) { - const n = []; - let s, u = this._tiles[e].tileID; - for (; u.overscaledZ > 0;) { - if (u.key in this._loadedParentTiles) { - s = this._loadedParentTiles[u.key]; - break - } - n.push(u.key); - const d = u.scaledTo(u.overscaledZ - 1); - if (s = this._getLoadedTile(d), s) break; - u = d - } - for (const d of n) this._loadedParentTiles[d] = s - } - } - _updateLoadedSiblingTileCache() { - this._loadedSiblingTiles = {}; - for (const e in this._tiles) { - const n = this._tiles[e].tileID, - s = this._getLoadedTile(n); - this._loadedSiblingTiles[n.key] = s - } - } - _addTile(e) { - let n = this._tiles[e.key]; - if (n) return n; - n = this._cache.getAndRemove(e), n && (this._setTileReloadTimer(e.key, n), n.tileID = e, this._state.initializeTileState(n, this.map ? this.map.painter : null), this._cacheTimers[e.key] && (clearTimeout(this._cacheTimers[e.key]), delete this._cacheTimers[e.key], this._setTileReloadTimer(e.key, n))); - const s = n; - return n || (n = new Nr(e, this._source.tileSize * e.overscaleFactor()), this._loadTile(n, e.key, n.state)), n.uses++, this._tiles[e.key] = n, s || this._source.fire(new o.l("dataloading", { - tile: n, - coord: n.tileID, - dataType: "source" - })), n - } - _setTileReloadTimer(e, n) { - e in this._timers && (clearTimeout(this._timers[e]), delete this._timers[e]); - const s = n.getExpiryTimeout(); - s && (this._timers[e] = setTimeout((() => { - this._reloadTile(e, "expired"), delete this._timers[e] - }), s)) - } - refreshTiles(e) { - for (const n in this._tiles)(this._isIdRenderable(n) || this._tiles[n].state == "errored") && e.some((s => s.equals(this._tiles[n].tileID.canonical))) && this._reloadTile(n, "expired") - } - _removeTile(e) { - const n = this._tiles[e]; - n && (n.uses--, delete this._tiles[e], this._timers[e] && (clearTimeout(this._timers[e]), delete this._timers[e]), n.uses > 0 || (n.hasData() && n.state !== "reloading" ? this._cache.add(n.tileID, n, n.getExpiryTimeout()) : (n.aborted = !0, this._abortTile(n), this._unloadTile(n)))) - } - _dataHandler(e) { - const n = e.sourceDataType; - e.dataType === "source" && n === "metadata" && (this._sourceLoaded = !0), this._sourceLoaded && !this._paused && e.dataType === "source" && n === "content" && (this.reload(e.sourceDataChanged), this.transform && this.update(this.transform, this.terrain), this._didEmitContent = !0) - } - clearTiles() { - this._shouldReloadOnResume = !1, this._paused = !1; - for (const e in this._tiles) this._removeTile(e); - this._cache.reset() - } - tilesIn(e, n, s) { - const u = [], - d = this.transform; - if (!d) return u; - const m = d.getCoveringTilesDetailsProvider().allowWorldCopies(), - y = s ? d.getCameraQueryGeometry(e) : e, - w = B => d.screenPointToMercatorCoordinate(B, this.terrain), - P = this.transformBbox(e, w, !m), - M = this.transformBbox(y, w, !m), - D = this.getIds(), - z = o.a2.fromPoints(M); - for (let B = 0; B < D.length; B++) { - const U = this._tiles[D[B]]; - if (U.holdingForFade()) continue; - const ee = m ? [U.tileID] : [U.tileID.unwrapTo(-1), U.tileID.unwrapTo(0)], - J = Math.pow(2, d.zoom - U.tileID.overscaledZ), - re = n * U.queryPadding * o.$ / U.tileSize / J; - for (const se of ee) { - const de = z.map((ue => se.getTilePoint(new o.a1(ue.x, ue.y)))); - if (de.expandBy(re), de.intersects(At)) { - const ue = P.map((Te => se.getTilePoint(Te))), - ge = M.map((Te => se.getTilePoint(Te))); - u.push({ - tile: U, - tileID: m ? se : se.unwrapTo(0), - queryGeometry: ue, - cameraQueryGeometry: ge, - scale: J - }) - } - } - } - return u - } - transformBbox(e, n, s) { - let u = e.map(n); - if (s) { - const d = o.a2.fromPoints(e); - d.shrinkBy(.001 * Math.min(d.width(), d.height())); - const m = d.map(n); - o.a2.fromPoints(u).covers(m) || (u = u.map((y => y.x > .5 ? new o.a1(y.x - 1, y.y, y.z) : y))) - } - return u - } - getVisibleCoordinates(e) { - const n = this.getRenderableIds(e).map((s => this._tiles[s].tileID)); - return this.transform && this.transform.populateCache(n), n - } - hasTransition() { - if (this._source.hasTransition()) return !0; - if (Wt(this._source.type)) { - const e = ye.now(); - for (const n in this._tiles) - if (this._tiles[n].fadeEndTime >= e) return !0 - } - return !1 - } - setFeatureState(e, n, s) { - this._state.updateState(e = e || "_geojsonTileLayer", n, s) - } - removeFeatureState(e, n, s) { - this._state.removeFeatureState(e = e || "_geojsonTileLayer", n, s) - } - getFeatureState(e, n) { - return this._state.getState(e = e || "_geojsonTileLayer", n) - } - setDependencies(e, n, s) { - const u = this._tiles[e]; - u && u.setDependencies(n, s) - } - reloadTilesForDependencies(e, n) { - for (const s in this._tiles) this._tiles[s].hasDependency(e, n) && this._reloadTile(s, "reloading"); - this._cache.filter((s => !s.hasDependency(e, n))) - } - } - - function kt(h, e) { - const n = Math.abs(2 * h.wrap) - +(h.wrap < 0), - s = Math.abs(2 * e.wrap) - +(e.wrap < 0); - return h.overscaledZ - e.overscaledZ || s - n || e.canonical.y - h.canonical.y || e.canonical.x - h.canonical.x - } - - function Wt(h) { - return h === "raster" || h === "image" || h === "video" - } - Pt.maxOverzooming = 10, Pt.maxUnderzooming = 3; - class Lr { - constructor(e, n) { - this.reset(e, n) - } - reset(e, n) { - this.points = e || [], this._distances = [0]; - for (let s = 1; s < this.points.length; s++) this._distances[s] = this._distances[s - 1] + this.points[s].dist(this.points[s - 1]); - this.length = this._distances[this._distances.length - 1], this.padding = Math.min(n || 0, .5 * this.length), this.paddedLength = this.length - 2 * this.padding - } - lerp(e) { - if (this.points.length === 1) return this.points[0]; - e = o.ah(e, 0, 1); - let n = 1, - s = this._distances[n]; - const u = e * this.paddedLength + this.padding; - for (; s < u && n < this._distances.length;) s = this._distances[++n]; - const d = n - 1, - m = this._distances[d], - y = s - m, - w = y > 0 ? (u - m) / y : 0; - return this.points[d].mult(1 - w).add(this.points[n].mult(w)) - } - } - - function Kr(h, e) { - let n = !0; - return h === "always" || h !== "never" && e !== "never" || (n = !1), n - } - class Hr { - constructor(e, n, s) { - const u = this.boxCells = [], - d = this.circleCells = []; - this.xCellCount = Math.ceil(e / s), this.yCellCount = Math.ceil(n / s); - for (let m = 0; m < this.xCellCount * this.yCellCount; m++) u.push([]), d.push([]); - this.circleKeys = [], this.boxKeys = [], this.bboxes = [], this.circles = [], this.width = e, this.height = n, this.xScale = this.xCellCount / e, this.yScale = this.yCellCount / n, this.boxUid = 0, this.circleUid = 0 - } - keysLength() { - return this.boxKeys.length + this.circleKeys.length - } - insert(e, n, s, u, d) { - this._forEachCell(n, s, u, d, this._insertBoxCell, this.boxUid++), this.boxKeys.push(e), this.bboxes.push(n), this.bboxes.push(s), this.bboxes.push(u), this.bboxes.push(d) - } - insertCircle(e, n, s, u) { - this._forEachCell(n - u, s - u, n + u, s + u, this._insertCircleCell, this.circleUid++), this.circleKeys.push(e), this.circles.push(n), this.circles.push(s), this.circles.push(u) - } - _insertBoxCell(e, n, s, u, d, m) { - this.boxCells[d].push(m) - } - _insertCircleCell(e, n, s, u, d, m) { - this.circleCells[d].push(m) - } - _query(e, n, s, u, d, m, y) { - if (s < 0 || e > this.width || u < 0 || n > this.height) return []; - const w = []; - if (e <= 0 && n <= 0 && this.width <= s && this.height <= u) { - if (d) return [{ - key: null, - x1: e, - y1: n, - x2: s, - y2: u - }]; - for (let P = 0; P < this.boxKeys.length; P++) w.push({ - key: this.boxKeys[P], - x1: this.bboxes[4 * P], - y1: this.bboxes[4 * P + 1], - x2: this.bboxes[4 * P + 2], - y2: this.bboxes[4 * P + 3] - }); - for (let P = 0; P < this.circleKeys.length; P++) { - const M = this.circles[3 * P], - D = this.circles[3 * P + 1], - z = this.circles[3 * P + 2]; - w.push({ - key: this.circleKeys[P], - x1: M - z, - y1: D - z, - x2: M + z, - y2: D + z - }) - } - } else this._forEachCell(e, n, s, u, this._queryCell, w, { - hitTest: d, - overlapMode: m, - seenUids: { - box: {}, - circle: {} - } - }, y); - return w - } - query(e, n, s, u) { - return this._query(e, n, s, u, !1, null) - } - hitTest(e, n, s, u, d, m) { - return this._query(e, n, s, u, !0, d, m).length > 0 - } - hitTestCircle(e, n, s, u, d) { - const m = e - s, - y = e + s, - w = n - s, - P = n + s; - if (y < 0 || m > this.width || P < 0 || w > this.height) return !1; - const M = []; - return this._forEachCell(m, w, y, P, this._queryCellCircle, M, { - hitTest: !0, - overlapMode: u, - circle: { - x: e, - y: n, - radius: s - }, - seenUids: { - box: {}, - circle: {} - } - }, d), M.length > 0 - } - _queryCell(e, n, s, u, d, m, y, w) { - const { - seenUids: P, - hitTest: M, - overlapMode: D - } = y, z = this.boxCells[d]; - if (z !== null) { - const U = this.bboxes; - for (const ee of z) - if (!P.box[ee]) { - P.box[ee] = !0; - const J = 4 * ee, - re = this.boxKeys[ee]; - if (e <= U[J + 2] && n <= U[J + 3] && s >= U[J + 0] && u >= U[J + 1] && (!w || w(re)) && (!M || !Kr(D, re.overlapMode)) && (m.push({ - key: re, - x1: U[J], - y1: U[J + 1], - x2: U[J + 2], - y2: U[J + 3] - }), M)) return !0 - } - } - const B = this.circleCells[d]; - if (B !== null) { - const U = this.circles; - for (const ee of B) - if (!P.circle[ee]) { - P.circle[ee] = !0; - const J = 3 * ee, - re = this.circleKeys[ee]; - if (this._circleAndRectCollide(U[J], U[J + 1], U[J + 2], e, n, s, u) && (!w || w(re)) && (!M || !Kr(D, re.overlapMode))) { - const se = U[J], - de = U[J + 1], - ue = U[J + 2]; - if (m.push({ - key: re, - x1: se - ue, - y1: de - ue, - x2: se + ue, - y2: de + ue - }), M) return !0 - } - } - } - return !1 - } - _queryCellCircle(e, n, s, u, d, m, y, w) { - const { - circle: P, - seenUids: M, - overlapMode: D - } = y, z = this.boxCells[d]; - if (z !== null) { - const U = this.bboxes; - for (const ee of z) - if (!M.box[ee]) { - M.box[ee] = !0; - const J = 4 * ee, - re = this.boxKeys[ee]; - if (this._circleAndRectCollide(P.x, P.y, P.radius, U[J + 0], U[J + 1], U[J + 2], U[J + 3]) && (!w || w(re)) && !Kr(D, re.overlapMode)) return m.push(!0), !0 - } - } - const B = this.circleCells[d]; - if (B !== null) { - const U = this.circles; - for (const ee of B) - if (!M.circle[ee]) { - M.circle[ee] = !0; - const J = 3 * ee, - re = this.circleKeys[ee]; - if (this._circlesCollide(U[J], U[J + 1], U[J + 2], P.x, P.y, P.radius) && (!w || w(re)) && !Kr(D, re.overlapMode)) return m.push(!0), !0 - } - } - } - _forEachCell(e, n, s, u, d, m, y, w) { - const P = this._convertToXCellCoord(e), - M = this._convertToYCellCoord(n), - D = this._convertToXCellCoord(s), - z = this._convertToYCellCoord(u); - for (let B = P; B <= D; B++) - for (let U = M; U <= z; U++) - if (d.call(this, e, n, s, u, this.xCellCount * U + B, m, y, w)) return - } - _convertToXCellCoord(e) { - return Math.max(0, Math.min(this.xCellCount - 1, Math.floor(e * this.xScale))) - } - _convertToYCellCoord(e) { - return Math.max(0, Math.min(this.yCellCount - 1, Math.floor(e * this.yScale))) - } - _circlesCollide(e, n, s, u, d, m) { - const y = u - e, - w = d - n, - P = s + m; - return P * P > y * y + w * w - } - _circleAndRectCollide(e, n, s, u, d, m, y) { - const w = (m - u) / 2, - P = Math.abs(e - (u + w)); - if (P > w + s) return !1; - const M = (y - d) / 2, - D = Math.abs(n - (d + M)); - if (D > M + s) return !1; - if (P <= w || D <= M) return !0; - const z = P - w, - B = D - M; - return z * z + B * B <= s * s - } - } - - function $r(h, e, n) { - const s = o.L(); - if (!h) { - const { - vecSouth: D, - vecEast: z - } = gr(e), B = W(); - B[0] = z[0], B[1] = z[1], B[2] = D[0], B[3] = D[1], u = B, (M = (m = (d = B)[0]) * (P = d[3]) - (w = d[2]) * (y = d[1])) && (u[0] = P * (M = 1 / M), u[1] = -y * M, u[2] = -w * M, u[3] = m * M), s[0] = B[0], s[1] = B[1], s[4] = B[2], s[5] = B[3] - } - var u, d, m, y, w, P, M; - return o.N(s, s, [1 / n, 1 / n, 1]), s - } - - function mr(h, e, n, s) { - if (h) { - const u = o.L(); - if (!e) { - const { - vecSouth: d, - vecEast: m - } = gr(n); - u[0] = m[0], u[1] = m[1], u[4] = d[0], u[5] = d[1] - } - return o.N(u, u, [s, s, 1]), u - } - return n.pixelsToClipSpaceMatrix - } - - function gr(h) { - const e = Math.cos(h.rollInRadians), - n = Math.sin(h.rollInRadians), - s = Math.cos(h.pitchInRadians), - u = Math.cos(h.bearingInRadians), - d = Math.sin(h.bearingInRadians), - m = o.ar(); - m[0] = -u * s * n - d * e, m[1] = -d * s * n + u * e; - const y = o.as(m); - y < 1e-9 ? o.at(m) : o.au(m, m, 1 / y); - const w = o.ar(); - w[0] = u * s * e - d * n, w[1] = d * s * e + u * n; - const P = o.as(w); - return P < 1e-9 ? o.at(w) : o.au(w, w, 1 / P), { - vecEast: w, - vecSouth: m - } - } - - function ai(h, e, n, s) { - let u; - s ? (u = [h, e, s(h, e), 1], o.aw(u, u, n)) : (u = [h, e, 0, 1], Li(u, u, n)); - const d = u[3]; - return { - point: new o.P(u[0] / d, u[1] / d), - signedDistanceFromCamera: d, - isOccluded: !1 - } - } - - function Tt(h, e) { - return .5 + h / e * .5 - } - - function Ci(h, e) { - return h.x >= -e[0] && h.x <= e[0] && h.y >= -e[1] && h.y <= e[1] - } - - function di(h, e, n, s, u, d, m, y, w, P, M, D, z) { - const B = n ? h.textSizeData : h.iconSizeData, - U = o.an(B, e.transform.zoom), - ee = [256 / e.width * 2 + 1, 256 / e.height * 2 + 1], - J = n ? h.text.dynamicLayoutVertexArray : h.icon.dynamicLayoutVertexArray; - J.clear(); - const re = h.lineVertexArray, - se = n ? h.text.placedSymbolArray : h.icon.placedSymbolArray, - de = e.transform.width / e.transform.height; - let ue = !1; - for (let ge = 0; ge < se.length; ge++) { - const Te = se.get(ge); - if (Te.hidden || Te.writingMode === o.ao.vertical && !ue) { - mi(Te.numGlyphs, J); - continue - } - ue = !1; - const he = new o.P(Te.anchorX, Te.anchorY), - De = { - getElevation: z, - pitchedLabelPlaneMatrix: s, - lineVertexArray: re, - pitchWithMap: d, - projectionCache: { - projections: {}, - offsets: {}, - cachedAnchorPoint: void 0, - anyProjectionOccluded: !1 - }, - transform: e.transform, - tileAnchorPoint: he, - unwrappedTileID: w, - width: P, - height: M, - translation: D - }, - He = li(Te.anchorX, Te.anchorY, De); - if (!Ci(He.point, ee)) { - mi(Te.numGlyphs, J); - continue - } - const je = Tt(e.transform.cameraToCenterDistance, He.signedDistanceFromCamera), - qe = o.ap(B, U, Te), - $e = d ? qe * e.transform.getPitchedTextCorrection(Te.anchorX, Te.anchorY, w) / je : qe * je, - Rt = Ke({ - projectionContext: De, - pitchedLabelPlaneMatrixInverse: u, - symbol: Te, - fontSize: $e, - flip: !1, - keepUpright: m, - glyphOffsetArray: h.glyphOffsetArray, - dynamicLayoutVertexArray: J, - aspectRatio: de, - rotateToLine: y - }); - ue = Rt.useVertical, (Rt.notEnoughRoom || ue || Rt.needsFlipping && Ke({ - projectionContext: De, - pitchedLabelPlaneMatrixInverse: u, - symbol: Te, - fontSize: $e, - flip: !0, - keepUpright: m, - glyphOffsetArray: h.glyphOffsetArray, - dynamicLayoutVertexArray: J, - aspectRatio: de, - rotateToLine: y - }).notEnoughRoom) && mi(Te.numGlyphs, J) - } - n ? h.text.dynamicLayoutVertexBuffer.updateData(J) : h.icon.dynamicLayoutVertexBuffer.updateData(J) - } - - function Pn(h, e, n, s, u, d, m, y) { - const w = d.glyphStartIndex + d.numGlyphs, - P = d.lineStartIndex, - M = d.lineStartIndex + d.lineLength, - D = e.getoffsetX(d.glyphStartIndex), - z = e.getoffsetX(w - 1), - B = Si(h * D, n, s, u, d.segment, P, M, y, m); - if (!B) return null; - const U = Si(h * z, n, s, u, d.segment, P, M, y, m); - return U ? y.projectionCache.anyProjectionOccluded ? null : { - first: B, - last: U - } : null - } - - function Mt(h, e, n, s) { - return h === o.ao.horizontal && Math.abs(n.y - e.y) > Math.abs(n.x - e.x) * s ? { - useVertical: !0 - } : (h === o.ao.vertical ? e.y < n.y : e.x > n.x) ? { - needsFlipping: !0 - } : null - } - - function Ke(h) { - const { - projectionContext: e, - pitchedLabelPlaneMatrixInverse: n, - symbol: s, - fontSize: u, - flip: d, - keepUpright: m, - glyphOffsetArray: y, - dynamicLayoutVertexArray: w, - aspectRatio: P, - rotateToLine: M - } = h, D = u / 24, z = s.lineOffsetX * D, B = s.lineOffsetY * D; - let U; - if (s.numGlyphs > 1) { - const ee = s.glyphStartIndex + s.numGlyphs, - J = s.lineStartIndex, - re = s.lineStartIndex + s.lineLength, - se = Pn(D, y, z, B, d, s, M, e); - if (!se) return { - notEnoughRoom: !0 - }; - const de = Gr(se.first.point.x, se.first.point.y, e, n), - ue = Gr(se.last.point.x, se.last.point.y, e, n); - if (m && !d) { - const ge = Mt(s.writingMode, de, ue, P); - if (ge) return ge - } - U = [se.first]; - for (let ge = s.glyphStartIndex + 1; ge < ee - 1; ge++) { - const Te = Si(D * y.getoffsetX(ge), z, B, d, s.segment, J, re, e, M); - if (!Te) return { - notEnoughRoom: !0 - }; - U.push(Te) - } - U.push(se.last) - } else { - if (m && !d) { - const J = Dr(e.tileAnchorPoint.x, e.tileAnchorPoint.y, e).point, - re = s.lineStartIndex + s.segment + 1, - se = new o.P(e.lineVertexArray.getx(re), e.lineVertexArray.gety(re)), - de = Dr(se.x, se.y, e), - ue = de.signedDistanceFromCamera > 0 ? de.point : jt(e.tileAnchorPoint, se, J, 1, e), - ge = Gr(J.x, J.y, e, n), - Te = Gr(ue.x, ue.y, e, n), - he = Mt(s.writingMode, ge, Te, P); - if (he) return he - } - const ee = Si(D * y.getoffsetX(s.glyphStartIndex), z, B, d, s.segment, s.lineStartIndex, s.lineStartIndex + s.lineLength, e, M); - if (!ee || e.projectionCache.anyProjectionOccluded) return { - notEnoughRoom: !0 - }; - U = [ee] - } - for (const ee of U) o.av(w, ee.point, ee.angle); - return {} - } - - function jt(h, e, n, s, u) { - const d = h.add(h.sub(e)._unit()), - m = Dr(d.x, d.y, u).point, - y = n.sub(m); - return n.add(y._mult(s / y.mag())) - } - - function Gt(h, e, n) { - const s = e.projectionCache; - if (s.projections[h]) return s.projections[h]; - const u = new o.P(e.lineVertexArray.getx(h), e.lineVertexArray.gety(h)), - d = Dr(u.x, u.y, e); - if (d.signedDistanceFromCamera > 0) return s.projections[h] = d.point, s.anyProjectionOccluded = s.anyProjectionOccluded || d.isOccluded, d.point; - const m = h - n.direction; - return jt(n.distanceFromAnchor === 0 ? e.tileAnchorPoint : new o.P(e.lineVertexArray.getx(m), e.lineVertexArray.gety(m)), u, n.previousVertex, n.absOffsetX - n.distanceFromAnchor + 1, e) - } - - function Dr(h, e, n) { - const s = h + n.translation[0], - u = e + n.translation[1]; - let d; - return n.pitchWithMap ? (d = ai(s, u, n.pitchedLabelPlaneMatrix, n.getElevation), d.isOccluded = !1) : (d = n.transform.projectTileCoordinates(s, u, n.unwrappedTileID, n.getElevation), d.point.x = (.5 * d.point.x + .5) * n.width, d.point.y = (.5 * -d.point.y + .5) * n.height), d - } - - function Gr(h, e, n, s) { - if (n.pitchWithMap) { - const u = [h, e, 0, 1]; - return o.aw(u, u, s), n.transform.projectTileCoordinates(u[0] / u[3], u[1] / u[3], n.unwrappedTileID, n.getElevation).point - } - return { - x: h / n.width * 2 - 1, - y: 1 - e / n.height * 2 - } - } - - function li(h, e, n) { - return n.transform.projectTileCoordinates(h, e, n.unwrappedTileID, n.getElevation) - } - - function fr(h, e, n) { - return h._unit()._perp()._mult(e * n) - } - - function bi(h, e, n, s, u, d, m, y, w) { - if (y.projectionCache.offsets[h]) return y.projectionCache.offsets[h]; - const P = n.add(e); - if (h + w.direction < s || h + w.direction >= u) return y.projectionCache.offsets[h] = P, P; - const M = Gt(h + w.direction, y, w), - D = fr(M.sub(n), m, w.direction), - z = n.add(D), - B = M.add(D); - return y.projectionCache.offsets[h] = o.ax(d, P, z, B) || P, y.projectionCache.offsets[h] - } - - function Si(h, e, n, s, u, d, m, y, w) { - const P = s ? h - e : h + e; - let M = P > 0 ? 1 : -1, - D = 0; - s && (M *= -1, D = Math.PI), M < 0 && (D += Math.PI); - let z, B = M > 0 ? d + u : d + u + 1; - y.projectionCache.cachedAnchorPoint ? z = y.projectionCache.cachedAnchorPoint : (z = Dr(y.tileAnchorPoint.x, y.tileAnchorPoint.y, y).point, y.projectionCache.cachedAnchorPoint = z); - let U, ee, J = z, - re = z, - se = 0, - de = 0; - const ue = Math.abs(P), - ge = []; - let Te; - for (; se + de <= ue;) { - if (B += M, B < d || B >= m) return null; - se += de, re = J, ee = U; - const He = { - absOffsetX: ue, - direction: M, - distanceFromAnchor: se, - previousVertex: re - }; - if (J = Gt(B, y, He), n === 0) ge.push(re), Te = J.sub(re); - else { - let je; - const qe = J.sub(re); - je = qe.mag() === 0 ? fr(Gt(B + M, y, He).sub(J), n, M) : fr(qe, n, M), ee || (ee = re.add(je)), U = bi(B, je, J, d, m, ee, n, y, He), ge.push(ee), Te = U.sub(ee) - } - de = Te.mag() - } - const he = Te._mult((ue - se) / de)._add(ee || re), - De = D + Math.atan2(J.y - re.y, J.x - re.x); - return ge.push(he), { - point: he, - angle: w ? De : 0, - path: ge - } - } - const zi = new Float32Array([-1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0]); - - function mi(h, e) { - for (let n = 0; n < h; n++) { - const s = e.length; - e.resize(s + 4), e.float32.set(zi, 3 * s) - } - } - - function Li(h, e, n) { - const s = e[0], - u = e[1]; - return h[0] = n[0] * s + n[4] * u + n[12], h[1] = n[1] * s + n[5] * u + n[13], h[3] = n[3] * s + n[7] * u + n[15], h - } - const rr = 100; - class yi { - constructor(e, n = new Hr(e.width + 200, e.height + 200, 25), s = new Hr(e.width + 200, e.height + 200, 25)) { - this.transform = e, this.grid = n, this.ignoredGrid = s, this.pitchFactor = Math.cos(e.pitch * Math.PI / 180) * e.cameraToCenterDistance, this.screenRightBoundary = e.width + rr, this.screenBottomBoundary = e.height + rr, this.gridRightBoundary = e.width + 200, this.gridBottomBoundary = e.height + 200, this.perspectiveRatioCutoff = .6 - } - placeCollisionBox(e, n, s, u, d, m, y, w, P, M, D, z) { - const B = this.projectAndGetPerspectiveRatio(e.anchorPointX + w[0], e.anchorPointY + w[1], d, M, z), - U = s * B.perspectiveRatio; - let ee; - if (m || y) ee = this._projectCollisionBox(e, U, u, d, m, y, w, B, M, D, z); - else { - const Te = B.x + (D ? D.x * U : 0), - he = B.y + (D ? D.y * U : 0); - ee = { - allPointsOccluded: !1, - box: [Te + e.x1 * U, he + e.y1 * U, Te + e.x2 * U, he + e.y2 * U] - } - } - const [J, re, se, de] = ee.box, ue = m ? ee.allPointsOccluded : B.isOccluded; - let ge = ue; - return ge || (ge = B.perspectiveRatio < this.perspectiveRatioCutoff), ge || (ge = !this.isInsideGrid(J, re, se, de)), ge || n !== "always" && this.grid.hitTest(J, re, se, de, n, P) ? { - box: [J, re, se, de], - placeable: !1, - offscreen: !1, - occluded: ue - } : { - box: [J, re, se, de], - placeable: !0, - offscreen: this.isOffscreen(J, re, se, de), - occluded: ue - } - } - placeCollisionCircles(e, n, s, u, d, m, y, w, P, M, D, z, B, U) { - const ee = [], - J = new o.P(n.anchorX, n.anchorY), - re = this.getPerspectiveRatio(J.x, J.y, m, U), - se = (P ? d * this.transform.getPitchedTextCorrection(n.anchorX, n.anchorY, m) / re : d * re) / o.aB, - de = { - getElevation: U, - pitchedLabelPlaneMatrix: y, - lineVertexArray: s, - pitchWithMap: P, - projectionCache: { - projections: {}, - offsets: {}, - cachedAnchorPoint: void 0, - anyProjectionOccluded: !1 - }, - transform: this.transform, - tileAnchorPoint: J, - unwrappedTileID: m, - width: this.transform.width, - height: this.transform.height, - translation: B - }, - ue = Pn(se, u, n.lineOffsetX * se, n.lineOffsetY * se, !1, n, !1, de); - let ge = !1, - Te = !1, - he = !0; - if (ue) { - const De = .5 * D * re + z, - He = new o.P(-100, -100), - je = new o.P(this.screenRightBoundary, this.screenBottomBoundary), - qe = new Lr, - $e = ue.first, - Rt = ue.last; - let Nt = []; - for (let Xr = $e.path.length - 1; Xr >= 1; Xr--) Nt.push($e.path[Xr]); - for (let Xr = 1; Xr < Rt.path.length; Xr++) Nt.push(Rt.path[Xr]); - const yt = 2.5 * De; - if (P) { - const Xr = this.projectPathToScreenSpace(Nt, de); - Nt = Xr.some((xi => xi.signedDistanceFromCamera <= 0)) ? [] : Xr.map((xi => xi.point)) - } - let sr = []; - if (Nt.length > 0) { - const Xr = Nt[0].clone(), - xi = Nt[0].clone(); - for (let ki = 1; ki < Nt.length; ki++) Xr.x = Math.min(Xr.x, Nt[ki].x), Xr.y = Math.min(Xr.y, Nt[ki].y), xi.x = Math.max(xi.x, Nt[ki].x), xi.y = Math.max(xi.y, Nt[ki].y); - sr = Xr.x >= He.x && xi.x <= je.x && Xr.y >= He.y && xi.y <= je.y ? [Nt] : xi.x < He.x || Xr.x > je.x || xi.y < He.y || Xr.y > je.y ? [] : o.ay([Nt], He.x, He.y, je.x, je.y) - } - for (const Xr of sr) { - qe.reset(Xr, .25 * De); - let xi = 0; - xi = qe.length <= .5 * De ? 1 : Math.ceil(qe.paddedLength / yt) + 1; - for (let ki = 0; ki < xi; ki++) { - const Pi = ki / Math.max(xi - 1, 1), - ji = qe.lerp(Pi), - Ui = ji.x + rr, - Wr = ji.y + rr; - ee.push(Ui, Wr, De, 0); - const Ei = Ui - De, - Qi = Wr - De, - dn = Ui + De, - xn = Wr + De; - if (he = he && this.isOffscreen(Ei, Qi, dn, xn), Te = Te || this.isInsideGrid(Ei, Qi, dn, xn), e !== "always" && this.grid.hitTestCircle(Ui, Wr, De, e, M) && (ge = !0, !w)) return { - circles: [], - offscreen: !1, - collisionDetected: ge - } - } - } - } - return { - circles: !w && ge || !Te || re < this.perspectiveRatioCutoff ? [] : ee, - offscreen: he, - collisionDetected: ge - } - } - projectPathToScreenSpace(e, n) { - const s = (function(u, d) { - const m = o.L(); - return o.aq(m, d.pitchedLabelPlaneMatrix), u.map((y => { - const w = ai(y.x, y.y, m, d.getElevation), - P = d.transform.projectTileCoordinates(w.point.x, w.point.y, d.unwrappedTileID, d.getElevation); - return P.point.x = (.5 * P.point.x + .5) * d.width, P.point.y = (.5 * -P.point.y + .5) * d.height, P - })) - })(e, n); - return (function(u) { - let d = 0, - m = 0, - y = 0, - w = 0; - for (let P = 0; P < u.length; P++) u[P].isOccluded ? (y = P + 1, w = 0) : (w++, w > m && (m = w, d = y)); - return u.slice(d, d + m) - })(s) - } - queryRenderedSymbols(e) { - if (e.length === 0 || this.grid.keysLength() === 0 && this.ignoredGrid.keysLength() === 0) return {}; - const n = [], - s = new o.a2; - for (const D of e) { - const z = new o.P(D.x + rr, D.y + rr); - s.extend(z), n.push(z) - } - const { - minX: u, - minY: d, - maxX: m, - maxY: y - } = s, w = this.grid.query(u, d, m, y).concat(this.ignoredGrid.query(u, d, m, y)), P = {}, M = {}; - for (const D of w) { - const z = D.key; - if (P[z.bucketInstanceId] === void 0 && (P[z.bucketInstanceId] = {}), P[z.bucketInstanceId][z.featureIndex]) continue; - const B = [new o.P(D.x1, D.y1), new o.P(D.x2, D.y1), new o.P(D.x2, D.y2), new o.P(D.x1, D.y2)]; - o.az(n, B) && (P[z.bucketInstanceId][z.featureIndex] = !0, M[z.bucketInstanceId] === void 0 && (M[z.bucketInstanceId] = []), M[z.bucketInstanceId].push(z.featureIndex)) - } - return M - } - insertCollisionBox(e, n, s, u, d, m) { - (s ? this.ignoredGrid : this.grid).insert({ - bucketInstanceId: u, - featureIndex: d, - collisionGroupID: m, - overlapMode: n - }, e[0], e[1], e[2], e[3]) - } - insertCollisionCircles(e, n, s, u, d, m) { - const y = s ? this.ignoredGrid : this.grid, - w = { - bucketInstanceId: u, - featureIndex: d, - collisionGroupID: m, - overlapMode: n - }; - for (let P = 0; P < e.length; P += 4) y.insertCircle(w, e[P], e[P + 1], e[P + 2]) - } - projectAndGetPerspectiveRatio(e, n, s, u, d) { - if (d) { - let m; - u ? (m = [e, n, u(e, n), 1], o.aw(m, m, d)) : (m = [e, n, 0, 1], Li(m, m, d)); - const y = m[3]; - return { - x: (m[0] / y + 1) / 2 * this.transform.width + rr, - y: (-m[1] / y + 1) / 2 * this.transform.height + rr, - perspectiveRatio: .5 + this.transform.cameraToCenterDistance / y * .5, - isOccluded: !1, - signedDistanceFromCamera: y - } - } { - const m = this.transform.projectTileCoordinates(e, n, s, u); - return { - x: (m.point.x + 1) / 2 * this.transform.width + rr, - y: (1 - m.point.y) / 2 * this.transform.height + rr, - perspectiveRatio: .5 + this.transform.cameraToCenterDistance / m.signedDistanceFromCamera * .5, - isOccluded: m.isOccluded, - signedDistanceFromCamera: m.signedDistanceFromCamera - } - } - } - getPerspectiveRatio(e, n, s, u) { - const d = this.transform.projectTileCoordinates(e, n, s, u); - return .5 + this.transform.cameraToCenterDistance / d.signedDistanceFromCamera * .5 - } - isOffscreen(e, n, s, u) { - return s < rr || e >= this.screenRightBoundary || u < rr || n > this.screenBottomBoundary - } - isInsideGrid(e, n, s, u) { - return s >= 0 && e < this.gridRightBoundary && u >= 0 && n < this.gridBottomBoundary - } - getViewportMatrix() { - const e = o.ag([]); - return o.M(e, e, [-100, -100, 0]), e - } - _projectCollisionBox(e, n, s, u, d, m, y, w, P, M, D) { - let z = 1, - B = 0, - U = 0, - ee = 1; - const J = e.anchorPointX + y[0], - re = e.anchorPointY + y[1]; - if (m && !d) { - const Nt = this.projectAndGetPerspectiveRatio(J + 1, re, u, P, D), - yt = Nt.x - w.x, - sr = Math.atan((Nt.y - w.y) / yt) + (yt < 0 ? Math.PI : 0), - Xr = Math.sin(sr), - xi = Math.cos(sr); - z = xi, B = Xr, U = -Xr, ee = xi - } else if (!m && d) { - const Nt = gr(this.transform); - z = Nt.vecEast[0], B = Nt.vecEast[1], U = Nt.vecSouth[0], ee = Nt.vecSouth[1] - } - let se = w.x, - de = w.y, - ue = n; - d && (se = J, de = re, ue = Math.pow(2, -(this.transform.zoom - s.overscaledZ)), ue *= this.transform.getPitchedTextCorrection(J, re, u), M || (ue *= o.ah(.5 + w.signedDistanceFromCamera / this.transform.cameraToCenterDistance * .5, 0, 4))), M && (se += z * M.x * ue + U * M.y * ue, de += B * M.x * ue + ee * M.y * ue); - const ge = e.x1 * ue, - Te = e.x2 * ue, - he = (ge + Te) / 2, - De = e.y1 * ue, - He = e.y2 * ue, - je = (De + He) / 2, - qe = [{ - offsetX: ge, - offsetY: De - }, { - offsetX: he, - offsetY: De - }, { - offsetX: Te, - offsetY: De - }, { - offsetX: Te, - offsetY: je - }, { - offsetX: Te, - offsetY: He - }, { - offsetX: he, - offsetY: He - }, { - offsetX: ge, - offsetY: He - }, { - offsetX: ge, - offsetY: je - }]; - let $e = []; - for (const { - offsetX: Nt, - offsetY: yt - } - of qe) $e.push(new o.P(se + z * Nt + U * yt, de + B * Nt + ee * yt)); - let Rt = !1; - if (d) { - const Nt = $e.map((yt => this.projectAndGetPerspectiveRatio(yt.x, yt.y, u, P, D))); - Rt = Nt.some((yt => !yt.isOccluded)), $e = Nt.map((yt => new o.P(yt.x, yt.y))) - } else Rt = !0; - return { - box: o.aA($e), - allPointsOccluded: !Rt - } - } - } - class Qr { - constructor(e, n, s, u) { - this.opacity = e ? Math.max(0, Math.min(1, e.opacity + (e.placed ? n : -n))) : u && s ? 1 : 0, this.placed = s - } - isHidden() { - return this.opacity === 0 && !this.placed - } - } - class Yr { - constructor(e, n, s, u, d) { - this.text = new Qr(e ? e.text : null, n, s, d), this.icon = new Qr(e ? e.icon : null, n, u, d) - } - isHidden() { - return this.text.isHidden() && this.icon.isHidden() - } - } - class la { - constructor(e, n, s) { - this.text = e, this.icon = n, this.skipFade = s - } - } - class sn { - constructor(e, n, s, u, d) { - this.bucketInstanceId = e, this.featureIndex = n, this.sourceLayerIndex = s, this.bucketIndex = u, this.tileID = d - } - } - class ta { - constructor(e) { - this.crossSourceCollisions = e, this.maxGroupID = 0, this.collisionGroups = {} - } - get(e) { - if (this.crossSourceCollisions) return { - ID: 0, - predicate: null - }; - if (!this.collisionGroups[e]) { - const n = ++this.maxGroupID; - this.collisionGroups[e] = { - ID: n, - predicate: s => s.collisionGroupID === n - } - } - return this.collisionGroups[e] - } - } - - function Fi(h, e, n, s, u) { - const { - horizontalAlign: d, - verticalAlign: m - } = o.aH(h); - return new o.P(-(d - .5) * e + s[0] * u, -(m - .5) * n + s[1] * u) - } - class Xi { - constructor(e, n, s, u, d) { - this.transform = e.clone(), this.terrain = n, this.collisionIndex = new yi(this.transform), this.placements = {}, this.opacities = {}, this.variableOffsets = {}, this.stale = !1, this.commitTime = 0, this.fadeDuration = s, this.retainedQueryData = {}, this.collisionGroups = new ta(u), this.collisionCircleArrays = {}, this.collisionBoxArrays = new Map, this.prevPlacement = d, d && (d.prevPlacement = void 0), this.placedOrientations = {} - } - _getTerrainElevationFunc(e) { - const n = this.terrain; - return n ? (s, u) => n.getElevation(e, s, u) : null - } - getBucketParts(e, n, s, u) { - const d = s.getBucket(n), - m = s.latestFeatureIndex; - if (!d || !m || n.id !== d.layerIds[0]) return; - const y = s.collisionBoxArray, - w = d.layers[0].layout, - P = d.layers[0].paint, - M = Math.pow(2, this.transform.zoom - s.tileID.overscaledZ), - D = s.tileSize / o.$, - z = s.tileID.toUnwrapped(), - B = w.get("text-rotation-alignment") === "map", - U = o.aC(s, 1, this.transform.zoom), - ee = o.aD(this.collisionIndex.transform, s, P.get("text-translate"), P.get("text-translate-anchor")), - J = o.aD(this.collisionIndex.transform, s, P.get("icon-translate"), P.get("icon-translate-anchor")), - re = $r(B, this.transform, U); - this.retainedQueryData[d.bucketInstanceId] = new sn(d.bucketInstanceId, m, d.sourceLayerIndex, d.index, s.tileID); - const se = { - bucket: d, - layout: w, - translationText: ee, - translationIcon: J, - unwrappedTileID: z, - pitchedLabelPlaneMatrix: re, - scale: M, - textPixelRatio: D, - holdingForFade: s.holdingForFade(), - collisionBoxArray: y, - partiallyEvaluatedTextSize: o.an(d.textSizeData, this.transform.zoom), - collisionGroup: this.collisionGroups.get(d.sourceID) - }; - if (u) - for (const de of d.sortKeyRanges) { - const { - sortKey: ue, - symbolInstanceStart: ge, - symbolInstanceEnd: Te - } = de; - e.push({ - sortKey: ue, - symbolInstanceStart: ge, - symbolInstanceEnd: Te, - parameters: se - }) - } else e.push({ - symbolInstanceStart: 0, - symbolInstanceEnd: d.symbolInstances.length, - parameters: se - }) - } - attemptAnchorPlacement(e, n, s, u, d, m, y, w, P, M, D, z, B, U, ee, J, re, se, de, ue) { - const ge = o.aE[e.textAnchor], - Te = [e.textOffset0, e.textOffset1], - he = Fi(ge, s, u, Te, d), - De = this.collisionIndex.placeCollisionBox(n, z, w, P, M, y, m, J, D.predicate, de, he, ue); - if ((!se || this.collisionIndex.placeCollisionBox(se, z, w, P, M, y, m, re, D.predicate, de, he, ue).placeable) && De.placeable) { - let He; - if (this.prevPlacement && this.prevPlacement.variableOffsets[B.crossTileID] && this.prevPlacement.placements[B.crossTileID] && this.prevPlacement.placements[B.crossTileID].text && (He = this.prevPlacement.variableOffsets[B.crossTileID].anchor), B.crossTileID === 0) throw new Error("symbolInstance.crossTileID can't be 0"); - return this.variableOffsets[B.crossTileID] = { - textOffset: Te, - width: s, - height: u, - anchor: ge, - textBoxScale: d, - prevAnchor: He - }, this.markUsedJustification(U, ge, B, ee), U.allowVerticalPlacement && (this.markUsedOrientation(U, ee, B), this.placedOrientations[B.crossTileID] = ee), { - shift: he, - placedGlyphBoxes: De - } - } - } - placeLayerBucketPart(e, n, s) { - const { - bucket: u, - layout: d, - translationText: m, - translationIcon: y, - unwrappedTileID: w, - pitchedLabelPlaneMatrix: P, - textPixelRatio: M, - holdingForFade: D, - collisionBoxArray: z, - partiallyEvaluatedTextSize: B, - collisionGroup: U - } = e.parameters, ee = d.get("text-optional"), J = d.get("icon-optional"), re = o.aF(d, "text-overlap", "text-allow-overlap"), se = re === "always", de = o.aF(d, "icon-overlap", "icon-allow-overlap"), ue = de === "always", ge = d.get("text-rotation-alignment") === "map", Te = d.get("text-pitch-alignment") === "map", he = d.get("icon-text-fit") !== "none", De = d.get("symbol-z-order") === "viewport-y", He = se && (ue || !u.hasIconData() || J), je = ue && (se || !u.hasTextData() || ee); - !u.collisionArrays && z && u.deserializeCollisionBoxes(z); - const qe = this.retainedQueryData[u.bucketInstanceId].tileID, - $e = this._getTerrainElevationFunc(qe), - Rt = this.transform.getFastPathSimpleProjectionMatrix(qe), - Nt = (yt, sr, Xr) => { - var xi, ki; - if (n[yt.crossTileID]) return; - if (D) return void(this.placements[yt.crossTileID] = new la(!1, !1, !1)); - let Pi = !1, - ji = !1, - Ui = !0, - Wr = null, - Ei = { - box: null, - placeable: !1, - offscreen: null, - occluded: !1 - }, - Qi = { - placeable: !1 - }, - dn = null, - xn = null, - qn = null, - Sa = 0, - as = 0, - ss = 0; - sr.textFeatureIndex ? Sa = sr.textFeatureIndex : yt.useRuntimeCollisionCircles && (Sa = yt.featureIndex), sr.verticalTextFeatureIndex && (as = sr.verticalTextFeatureIndex); - const Ys = sr.textBox; - if (Ys) { - const Kn = en => { - let pn = o.ao.horizontal; - if (u.allowVerticalPlacement && !en && this.prevPlacement) { - const da = this.prevPlacement.placedOrientations[yt.crossTileID]; - da && (this.placedOrientations[yt.crossTileID] = da, pn = da, this.markUsedOrientation(u, pn, yt)) - } - return pn - }, - Pa = (en, pn) => { - if (u.allowVerticalPlacement && yt.numVerticalGlyphVertices > 0 && sr.verticalTextBox) { - for (const da of u.writingModes) - if (da === o.ao.vertical ? (Ei = pn(), Qi = Ei) : Ei = en(), Ei && Ei.placeable) break - } else Ei = en() - }, - Vn = yt.textAnchorOffsetStartIndex, - os = yt.textAnchorOffsetEndIndex; - if (os === Vn) { - const en = (pn, da) => { - const tn = this.collisionIndex.placeCollisionBox(pn, re, M, qe, w, Te, ge, m, U.predicate, $e, void 0, Rt); - return tn && tn.placeable && (this.markUsedOrientation(u, da, yt), this.placedOrientations[yt.crossTileID] = da), tn - }; - Pa((() => en(Ys, o.ao.horizontal)), (() => { - const pn = sr.verticalTextBox; - return u.allowVerticalPlacement && yt.numVerticalGlyphVertices > 0 && pn ? en(pn, o.ao.vertical) : { - box: null, - offscreen: null - } - })), Kn(Ei && Ei.placeable) - } else { - let en = o.aE[(ki = (xi = this.prevPlacement) === null || xi === void 0 ? void 0 : xi.variableOffsets[yt.crossTileID]) === null || ki === void 0 ? void 0 : ki.anchor]; - const pn = (tn, Ro, Qs) => { - const Ha = tn.x2 - tn.x1, - Ia = tn.y2 - tn.y1, - ls = yt.textBoxScale, - id = he && de === "never" ? Ro : null; - let ia = null, - nd = re === "never" ? 1 : 2, - tu = "never"; - en && nd++; - for (let kl = 0; kl < nd; kl++) { - for (let El = Vn; El < os; El++) { - const cs = u.textAnchorOffsets.get(El); - if (en && cs.textAnchor !== en) continue; - const Wa = this.attemptAnchorPlacement(cs, tn, Ha, Ia, ls, ge, Te, M, qe, w, U, tu, yt, u, Qs, m, y, id, $e); - if (Wa && (ia = Wa.placedGlyphBoxes, ia && ia.placeable)) return Pi = !0, Wr = Wa.shift, ia - } - en ? en = null : tu = re - } - return s && !ia && (ia = { - box: this.collisionIndex.placeCollisionBox(Ys, "always", M, qe, w, Te, ge, m, U.predicate, $e, void 0, Rt).box, - offscreen: !1, - placeable: !1, - occluded: !1 - }), ia - }; - Pa((() => pn(Ys, sr.iconBox, o.ao.horizontal)), (() => { - const tn = sr.verticalTextBox; - return u.allowVerticalPlacement && (!Ei || !Ei.placeable) && yt.numVerticalGlyphVertices > 0 && tn ? pn(tn, sr.verticalIconBox, o.ao.vertical) : { - box: null, - occluded: !0, - offscreen: null - } - })), Ei && (Pi = Ei.placeable, Ui = Ei.offscreen); - const da = Kn(Ei && Ei.placeable); - if (!Pi && this.prevPlacement) { - const tn = this.prevPlacement.variableOffsets[yt.crossTileID]; - tn && (this.variableOffsets[yt.crossTileID] = tn, this.markUsedJustification(u, tn.anchor, yt, da)) - } - } - } - if (dn = Ei, Pi = dn && dn.placeable, Ui = dn && dn.offscreen, yt.useRuntimeCollisionCircles) { - const Kn = u.text.placedSymbolArray.get(yt.centerJustifiedTextSymbolIndex), - Pa = o.ap(u.textSizeData, B, Kn), - Vn = d.get("text-padding"); - xn = this.collisionIndex.placeCollisionCircles(re, Kn, u.lineVertexArray, u.glyphOffsetArray, Pa, w, P, s, Te, U.predicate, yt.collisionCircleDiameter, Vn, m, $e), xn.circles.length && xn.collisionDetected && !s && o.w("Collisions detected, but collision boxes are not shown"), Pi = se || xn.circles.length > 0 && !xn.collisionDetected, Ui = Ui && xn.offscreen - } - if (sr.iconFeatureIndex && (ss = sr.iconFeatureIndex), sr.iconBox) { - const Kn = Pa => this.collisionIndex.placeCollisionBox(Pa, de, M, qe, w, Te, ge, y, U.predicate, $e, he && Wr ? Wr : void 0, Rt); - Qi && Qi.placeable && sr.verticalIconBox ? (qn = Kn(sr.verticalIconBox), ji = qn.placeable) : (qn = Kn(sr.iconBox), ji = qn.placeable), Ui = Ui && qn.offscreen - } - const Js = ee || yt.numHorizontalGlyphVertices === 0 && yt.numVerticalGlyphVertices === 0, - Is = J || yt.numIconVertices === 0; - Js || Is ? Is ? Js || (ji = ji && Pi) : Pi = ji && Pi : ji = Pi = ji && Pi; - const Ms = ji && qn.placeable; - if (Pi && dn.placeable && this.collisionIndex.insertCollisionBox(dn.box, re, d.get("text-ignore-placement"), u.bucketInstanceId, Qi && Qi.placeable && as ? as : Sa, U.ID), Ms && this.collisionIndex.insertCollisionBox(qn.box, de, d.get("icon-ignore-placement"), u.bucketInstanceId, ss, U.ID), xn && Pi && this.collisionIndex.insertCollisionCircles(xn.circles, re, d.get("text-ignore-placement"), u.bucketInstanceId, Sa, U.ID), s && this.storeCollisionData(u.bucketInstanceId, Xr, sr, dn, qn, xn), yt.crossTileID === 0) throw new Error("symbolInstance.crossTileID can't be 0"); - if (u.bucketInstanceId === 0) throw new Error("bucket.bucketInstanceId can't be 0"); - this.placements[yt.crossTileID] = new la((Pi || He) && !(dn != null && dn.occluded), (ji || je) && !(qn != null && qn.occluded), Ui || u.justReloaded), n[yt.crossTileID] = !0 - }; - if (De) { - if (e.symbolInstanceStart !== 0) throw new Error("bucket.bucketInstanceId should be 0"); - const yt = u.getSortedSymbolIndexes(-this.transform.bearingInRadians); - for (let sr = yt.length - 1; sr >= 0; --sr) { - const Xr = yt[sr]; - Nt(u.symbolInstances.get(Xr), u.collisionArrays[Xr], Xr) - } - } else - for (let yt = e.symbolInstanceStart; yt < e.symbolInstanceEnd; yt++) Nt(u.symbolInstances.get(yt), u.collisionArrays[yt], yt); - u.justReloaded = !1 - } - storeCollisionData(e, n, s, u, d, m) { - if (s.textBox || s.iconBox) { - let y, w; - this.collisionBoxArrays.has(e) ? y = this.collisionBoxArrays.get(e) : (y = new Map, this.collisionBoxArrays.set(e, y)), y.has(n) ? w = y.get(n) : (w = { - text: null, - icon: null - }, y.set(n, w)), s.textBox && (w.text = u.box), s.iconBox && (w.icon = d.box) - } - if (m) { - let y = this.collisionCircleArrays[e]; - y === void 0 && (y = this.collisionCircleArrays[e] = []); - for (let w = 0; w < m.circles.length; w += 4) y.push(m.circles[w + 0] - rr), y.push(m.circles[w + 1] - rr), y.push(m.circles[w + 2]), y.push(m.collisionDetected ? 1 : 0) - } - } - markUsedJustification(e, n, s, u) { - let d; - d = u === o.ao.vertical ? s.verticalPlacedTextSymbolIndex : { - left: s.leftJustifiedTextSymbolIndex, - center: s.centerJustifiedTextSymbolIndex, - right: s.rightJustifiedTextSymbolIndex - } [o.aG(n)]; - const m = [s.leftJustifiedTextSymbolIndex, s.centerJustifiedTextSymbolIndex, s.rightJustifiedTextSymbolIndex, s.verticalPlacedTextSymbolIndex]; - for (const y of m) y >= 0 && (e.text.placedSymbolArray.get(y).crossTileID = d >= 0 && y !== d ? 0 : s.crossTileID) - } - markUsedOrientation(e, n, s) { - const u = n === o.ao.horizontal || n === o.ao.horizontalOnly ? n : 0, - d = n === o.ao.vertical ? n : 0, - m = [s.leftJustifiedTextSymbolIndex, s.centerJustifiedTextSymbolIndex, s.rightJustifiedTextSymbolIndex]; - for (const y of m) e.text.placedSymbolArray.get(y).placedOrientation = u; - s.verticalPlacedTextSymbolIndex && (e.text.placedSymbolArray.get(s.verticalPlacedTextSymbolIndex).placedOrientation = d) - } - commit(e) { - this.commitTime = e, this.zoomAtLastRecencyCheck = this.transform.zoom; - const n = this.prevPlacement; - let s = !1; - this.prevZoomAdjustment = n ? n.zoomAdjustment(this.transform.zoom) : 0; - const u = n ? n.symbolFadeChange(e) : 1, - d = n ? n.opacities : {}, - m = n ? n.variableOffsets : {}, - y = n ? n.placedOrientations : {}; - for (const w in this.placements) { - const P = this.placements[w], - M = d[w]; - M ? (this.opacities[w] = new Yr(M, u, P.text, P.icon), s = s || P.text !== M.text.placed || P.icon !== M.icon.placed) : (this.opacities[w] = new Yr(null, u, P.text, P.icon, P.skipFade), s = s || P.text || P.icon) - } - for (const w in d) { - const P = d[w]; - if (!this.opacities[w]) { - const M = new Yr(P, u, !1, !1); - M.isHidden() || (this.opacities[w] = M, s = s || P.text.placed || P.icon.placed) - } - } - for (const w in m) this.variableOffsets[w] || !this.opacities[w] || this.opacities[w].isHidden() || (this.variableOffsets[w] = m[w]); - for (const w in y) this.placedOrientations[w] || !this.opacities[w] || this.opacities[w].isHidden() || (this.placedOrientations[w] = y[w]); - if (n && n.lastPlacementChangeTime === void 0) throw new Error("Last placement time for previous placement is not defined"); - s ? this.lastPlacementChangeTime = e : typeof this.lastPlacementChangeTime != "number" && (this.lastPlacementChangeTime = n ? n.lastPlacementChangeTime : e) - } - updateLayerOpacities(e, n) { - const s = {}; - for (const u of n) { - const d = u.getBucket(e); - d && u.latestFeatureIndex && e.id === d.layerIds[0] && this.updateBucketOpacities(d, u.tileID, s, u.collisionBoxArray) - } - } - updateBucketOpacities(e, n, s, u) { - e.hasTextData() && (e.text.opacityVertexArray.clear(), e.text.hasVisibleVertices = !1), e.hasIconData() && (e.icon.opacityVertexArray.clear(), e.icon.hasVisibleVertices = !1), e.hasIconCollisionBoxData() && e.iconCollisionBox.collisionVertexArray.clear(), e.hasTextCollisionBoxData() && e.textCollisionBox.collisionVertexArray.clear(); - const d = e.layers[0], - m = d.layout, - y = new Yr(null, 0, !1, !1, !0), - w = m.get("text-allow-overlap"), - P = m.get("icon-allow-overlap"), - M = d._unevaluatedLayout.hasValue("text-variable-anchor") || d._unevaluatedLayout.hasValue("text-variable-anchor-offset"), - D = m.get("text-rotation-alignment") === "map", - z = m.get("text-pitch-alignment") === "map", - B = m.get("icon-text-fit") !== "none", - U = new Yr(null, 0, w && (P || !e.hasIconData() || m.get("icon-optional")), P && (w || !e.hasTextData() || m.get("text-optional")), !0); - !e.collisionArrays && u && (e.hasIconCollisionBoxData() || e.hasTextCollisionBoxData()) && e.deserializeCollisionBoxes(u); - const ee = (re, se, de) => { - for (let ue = 0; ue < se / 4; ue++) re.opacityVertexArray.emplaceBack(de); - re.hasVisibleVertices = re.hasVisibleVertices || de !== Mi - }, - J = this.collisionBoxArrays.get(e.bucketInstanceId); - for (let re = 0; re < e.symbolInstances.length; re++) { - const se = e.symbolInstances.get(re), - { - numHorizontalGlyphVertices: de, - numVerticalGlyphVertices: ue, - crossTileID: ge - } = se; - let Te = this.opacities[ge]; - s[ge] ? Te = y : Te || (Te = U, this.opacities[ge] = Te), s[ge] = !0; - const he = se.numIconVertices > 0, - De = this.placedOrientations[se.crossTileID], - He = De === o.ao.vertical, - je = De === o.ao.horizontal || De === o.ao.horizontalOnly; - if (de > 0 || ue > 0) { - const $e = $i(Te.text); - ee(e.text, de, He ? Mi : $e), ee(e.text, ue, je ? Mi : $e); - const Rt = Te.text.isHidden(); - [se.rightJustifiedTextSymbolIndex, se.centerJustifiedTextSymbolIndex, se.leftJustifiedTextSymbolIndex].forEach((sr => { - sr >= 0 && (e.text.placedSymbolArray.get(sr).hidden = Rt || He ? 1 : 0) - })), se.verticalPlacedTextSymbolIndex >= 0 && (e.text.placedSymbolArray.get(se.verticalPlacedTextSymbolIndex).hidden = Rt || je ? 1 : 0); - const Nt = this.variableOffsets[se.crossTileID]; - Nt && this.markUsedJustification(e, Nt.anchor, se, De); - const yt = this.placedOrientations[se.crossTileID]; - yt && (this.markUsedJustification(e, "left", se, yt), this.markUsedOrientation(e, yt, se)) - } - if (he) { - const $e = $i(Te.icon), - Rt = !(B && se.verticalPlacedIconSymbolIndex && He); - se.placedIconSymbolIndex >= 0 && (ee(e.icon, se.numIconVertices, Rt ? $e : Mi), e.icon.placedSymbolArray.get(se.placedIconSymbolIndex).hidden = Te.icon.isHidden()), se.verticalPlacedIconSymbolIndex >= 0 && (ee(e.icon, se.numVerticalIconVertices, Rt ? Mi : $e), e.icon.placedSymbolArray.get(se.verticalPlacedIconSymbolIndex).hidden = Te.icon.isHidden()) - } - const qe = J && J.has(re) ? J.get(re) : { - text: null, - icon: null - }; - if (e.hasIconCollisionBoxData() || e.hasTextCollisionBoxData()) { - const $e = e.collisionArrays[re]; - if ($e) { - let Rt = new o.P(0, 0); - if ($e.textBox || $e.verticalTextBox) { - let Nt = !0; - if (M) { - const yt = this.variableOffsets[ge]; - yt ? (Rt = Fi(yt.anchor, yt.width, yt.height, yt.textOffset, yt.textBoxScale), D && Rt._rotate(z ? -this.transform.bearingInRadians : this.transform.bearingInRadians)) : Nt = !1 - } - if ($e.textBox || $e.verticalTextBox) { - let yt; - $e.textBox && (yt = He), $e.verticalTextBox && (yt = je), Gn(e.textCollisionBox.collisionVertexArray, Te.text.placed, !Nt || yt, qe.text, Rt.x, Rt.y) - } - } - if ($e.iconBox || $e.verticalIconBox) { - const Nt = !!(!je && $e.verticalIconBox); - let yt; - $e.iconBox && (yt = Nt), $e.verticalIconBox && (yt = !Nt), Gn(e.iconCollisionBox.collisionVertexArray, Te.icon.placed, yt, qe.icon, B ? Rt.x : 0, B ? Rt.y : 0) - } - } - } - } - if (e.sortFeatures(-this.transform.bearingInRadians), this.retainedQueryData[e.bucketInstanceId] && (this.retainedQueryData[e.bucketInstanceId].featureSortOrder = e.featureSortOrder), e.hasTextData() && e.text.opacityVertexBuffer && e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray), e.hasIconData() && e.icon.opacityVertexBuffer && e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray), e.hasIconCollisionBoxData() && e.iconCollisionBox.collisionVertexBuffer && e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray), e.hasTextCollisionBoxData() && e.textCollisionBox.collisionVertexBuffer && e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray), e.text.opacityVertexArray.length !== e.text.layoutVertexArray.length / 4) throw new Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`); - if (e.icon.opacityVertexArray.length !== e.icon.layoutVertexArray.length / 4) throw new Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`); - e.bucketInstanceId in this.collisionCircleArrays && (e.collisionCircleArray = this.collisionCircleArrays[e.bucketInstanceId], delete this.collisionCircleArrays[e.bucketInstanceId]) - } - symbolFadeChange(e) { - return this.fadeDuration === 0 ? 1 : (e - this.commitTime) / this.fadeDuration + this.prevZoomAdjustment - } - zoomAdjustment(e) { - return Math.max(0, (this.transform.zoom - e) / 1.5) - } - hasTransitions(e) { - return this.stale || e - this.lastPlacementChangeTime < this.fadeDuration - } - stillRecent(e, n) { - const s = this.zoomAtLastRecencyCheck === n ? 1 - this.zoomAdjustment(n) : 1; - return this.zoomAtLastRecencyCheck = n, this.commitTime + this.fadeDuration * s > e - } - setStale() { - this.stale = !0 - } - } - - function Gn(h, e, n, s, u, d) { - s && s.length !== 0 || (s = [0, 0, 0, 0]); - const m = s[0] - rr, - y = s[1] - rr, - w = s[2] - rr, - P = s[3] - rr; - h.emplaceBack(e ? 1 : 0, n ? 1 : 0, u || 0, d || 0, m, y), h.emplaceBack(e ? 1 : 0, n ? 1 : 0, u || 0, d || 0, w, y), h.emplaceBack(e ? 1 : 0, n ? 1 : 0, u || 0, d || 0, w, P), h.emplaceBack(e ? 1 : 0, n ? 1 : 0, u || 0, d || 0, m, P) - } - const Hn = Math.pow(2, 25), - Ln = Math.pow(2, 24), - gt = Math.pow(2, 17), - qt = Math.pow(2, 16), - vr = Math.pow(2, 9), - _i = Math.pow(2, 8), - Di = Math.pow(2, 1); - - function $i(h) { - if (h.opacity === 0 && !h.placed) return 0; - if (h.opacity === 1 && h.placed) return 4294967295; - const e = h.placed ? 1 : 0, - n = Math.floor(127 * h.opacity); - return n * Hn + e * Ln + n * gt + e * qt + n * vr + e * _i + n * Di + e - } - const Mi = 0; - class Cr { - constructor(e) { - this._sortAcrossTiles = e.layout.get("symbol-z-order") !== "viewport-y" && !e.layout.get("symbol-sort-key").isConstant(), this._currentTileIndex = 0, this._currentPartIndex = 0, this._seenCrossTileIDs = {}, this._bucketParts = [] - } - continuePlacement(e, n, s, u, d) { - const m = this._bucketParts; - for (; this._currentTileIndex < e.length;) - if (n.getBucketParts(m, u, e[this._currentTileIndex], this._sortAcrossTiles), this._currentTileIndex++, d()) return !0; - for (this._sortAcrossTiles && (this._sortAcrossTiles = !1, m.sort(((y, w) => y.sortKey - w.sortKey))); this._currentPartIndex < m.length;) - if (n.placeLayerBucketPart(m[this._currentPartIndex], this._seenCrossTileIDs, s), this._currentPartIndex++, d()) return !0; - return !1 - } - } - class gn { - constructor(e, n, s, u, d, m, y, w) { - this.placement = new Xi(e, n, m, y, w), this._currentPlacementIndex = s.length - 1, this._forceFullPlacement = u, this._showCollisionBoxes = d, this._done = !1 - } - isDone() { - return this._done - } - continuePlacement(e, n, s) { - const u = ye.now(), - d = () => !this._forceFullPlacement && ye.now() - u > 2; - for (; this._currentPlacementIndex >= 0;) { - const m = n[e[this._currentPlacementIndex]], - y = this.placement.collisionIndex.transform.zoom; - if (m.type === "symbol" && (!m.minzoom || m.minzoom <= y) && (!m.maxzoom || m.maxzoom > y)) { - if (this._inProgressLayer || (this._inProgressLayer = new Cr(m)), this._inProgressLayer.continuePlacement(s[m.source], this.placement, this._showCollisionBoxes, m, d)) return; - delete this._inProgressLayer - } - this._currentPlacementIndex-- - } - this._done = !0 - } - commit(e) { - return this.placement.commit(e), this.placement - } - } - const tr = 512 / o.$ / 2; - class Ht { - constructor(e, n, s) { - this.tileID = e, this.bucketInstanceId = s, this._symbolsByKey = {}; - const u = new Map; - for (let d = 0; d < n.length; d++) { - const m = n.get(d), - y = m.key, - w = u.get(y); - w ? w.push(m) : u.set(y, [m]) - } - for (const [d, m] of u) { - const y = { - positions: m.map((w => ({ - x: Math.floor(w.anchorX * tr), - y: Math.floor(w.anchorY * tr) - }))), - crossTileIDs: m.map((w => w.crossTileID)) - }; - if (y.positions.length > 128) { - const w = new o.aI(y.positions.length, 16, Uint16Array); - for (const { - x: P, - y: M - } - of y.positions) w.add(P, M); - w.finish(), delete y.positions, y.index = w - } - this._symbolsByKey[d] = y - } - } - getScaledCoordinates(e, n) { - const { - x: s, - y: u, - z: d - } = this.tileID.canonical, { - x: m, - y, - z: w - } = n.canonical, P = tr / Math.pow(2, w - d), M = (y * o.$ + e.anchorY) * P, D = u * o.$ * tr; - return { - x: Math.floor((m * o.$ + e.anchorX) * P - s * o.$ * tr), - y: Math.floor(M - D) - } - } - findMatches(e, n, s) { - const u = this.tileID.canonical.z < n.canonical.z ? 1 : Math.pow(2, this.tileID.canonical.z - n.canonical.z); - for (let d = 0; d < e.length; d++) { - const m = e.get(d); - if (m.crossTileID) continue; - const y = this._symbolsByKey[m.key]; - if (!y) continue; - const w = this.getScaledCoordinates(m, n); - if (y.index) { - const P = y.index.range(w.x - u, w.y - u, w.x + u, w.y + u).sort(); - for (const M of P) { - const D = y.crossTileIDs[M]; - if (!s[D]) { - s[D] = !0, m.crossTileID = D; - break - } - } - } else if (y.positions) - for (let P = 0; P < y.positions.length; P++) { - const M = y.positions[P], - D = y.crossTileIDs[P]; - if (Math.abs(M.x - w.x) <= u && Math.abs(M.y - w.y) <= u && !s[D]) { - s[D] = !0, m.crossTileID = D; - break - } - } - } - } - getCrossTileIDsLists() { - return Object.values(this._symbolsByKey).map((({ - crossTileIDs: e - }) => e)) - } - } - class ei { - constructor() { - this.maxCrossTileID = 0 - } - generate() { - return ++this.maxCrossTileID - } - } - class ri { - constructor() { - this.indexes = {}, this.usedCrossTileIDs = {}, this.lng = 0 - } - handleWrapJump(e) { - const n = Math.round((e - this.lng) / 360); - if (n !== 0) - for (const s in this.indexes) { - const u = this.indexes[s], - d = {}; - for (const m in u) { - const y = u[m]; - y.tileID = y.tileID.unwrapTo(y.tileID.wrap + n), d[y.tileID.key] = y - } - this.indexes[s] = d - } - this.lng = e - } - addBucket(e, n, s) { - if (this.indexes[e.overscaledZ] && this.indexes[e.overscaledZ][e.key]) { - if (this.indexes[e.overscaledZ][e.key].bucketInstanceId === n.bucketInstanceId) return !1; - this.removeBucketCrossTileIDs(e.overscaledZ, this.indexes[e.overscaledZ][e.key]) - } - for (let d = 0; d < n.symbolInstances.length; d++) n.symbolInstances.get(d).crossTileID = 0; - this.usedCrossTileIDs[e.overscaledZ] || (this.usedCrossTileIDs[e.overscaledZ] = {}); - const u = this.usedCrossTileIDs[e.overscaledZ]; - for (const d in this.indexes) { - const m = this.indexes[d]; - if (Number(d) > e.overscaledZ) - for (const y in m) { - const w = m[y]; - w.tileID.isChildOf(e) && w.findMatches(n.symbolInstances, e, u) - } else { - const y = m[e.scaledTo(Number(d)).key]; - y && y.findMatches(n.symbolInstances, e, u) - } - } - for (let d = 0; d < n.symbolInstances.length; d++) { - const m = n.symbolInstances.get(d); - m.crossTileID || (m.crossTileID = s.generate(), u[m.crossTileID] = !0) - } - return this.indexes[e.overscaledZ] === void 0 && (this.indexes[e.overscaledZ] = {}), this.indexes[e.overscaledZ][e.key] = new Ht(e, n.symbolInstances, n.bucketInstanceId), !0 - } - removeBucketCrossTileIDs(e, n) { - for (const s of n.getCrossTileIDsLists()) - for (const u of s) delete this.usedCrossTileIDs[e][u] - } - removeStaleBuckets(e) { - let n = !1; - for (const s in this.indexes) { - const u = this.indexes[s]; - for (const d in u) e[u[d].bucketInstanceId] || (this.removeBucketCrossTileIDs(s, u[d]), delete u[d], n = !0) - } - return n - } - } - class gi { - constructor() { - this.layerIndexes = {}, this.crossTileIDs = new ei, this.maxBucketInstanceId = 0, this.bucketsInCurrentPlacement = {} - } - addLayer(e, n, s) { - let u = this.layerIndexes[e.id]; - u === void 0 && (u = this.layerIndexes[e.id] = new ri); - let d = !1; - const m = {}; - u.handleWrapJump(s); - for (const y of n) { - const w = y.getBucket(e); - w && e.id === w.layerIds[0] && (w.bucketInstanceId || (w.bucketInstanceId = ++this.maxBucketInstanceId), u.addBucket(y.tileID, w, this.crossTileIDs) && (d = !0), m[w.bucketInstanceId] = !0) - } - return u.removeStaleBuckets(m) && (d = !0), d - } - pruneUnusedLayers(e) { - const n = {}; - e.forEach((s => { - n[s] = !0 - })); - for (const s in this.layerIndexes) n[s] || delete this.layerIndexes[s] - } - } - var ci = "void main() {fragColor=vec4(1.0);}"; - const pi = { - prelude: Er(`#ifdef GL_ES -precision mediump float; -#else -#if !defined(lowp) -#define lowp -#endif -#if !defined(mediump) -#define mediump -#endif -#if !defined(highp) -#define highp -#endif -#endif -out highp vec4 fragColor;`, `#ifdef GL_ES -precision highp float; -#else -#if !defined(lowp) -#define lowp -#endif -#if !defined(mediump) -#define mediump -#endif -#if !defined(highp) -#define highp -#endif -#endif -vec2 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 -);}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);return (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 -);} -#ifdef TERRAIN3D -uniform 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; -#endif -const 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) { -#ifdef TERRAIN3D -highp 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)); -#else -return 1.0; -#endif -}float calculate_visibility(vec4 pos) { -#ifdef TERRAIN3D -vec3 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; -#else -return 1.0; -#endif -}float ele(vec2 pos) { -#ifdef TERRAIN3D -vec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; -#else -return 0.0; -#endif -}float get_elevation(vec2 pos) { -#ifdef TERRAIN3D -#ifdef GLOBE -if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;} -#endif -vec2 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; -#else -return 0.0; -#endif -}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`), - projectionMercator: Er("", "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: Er("", `#define GLOBE_RADIUS 6371008.8 -uniform 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 -);}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); -if (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 -);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: Er(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, "in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"), - backgroundPattern: Er(`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;uniform 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; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, "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: Er(`in vec3 v_data;in float v_visibility; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define mediump float radius -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define highp vec4 stroke_color -#pragma mapbox: define mediump float stroke_width -#pragma mapbox: define lowp float stroke_opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize mediump float radius -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize highp vec4 stroke_color -#pragma mapbox: initialize mediump float stroke_width -#pragma mapbox: initialize lowp float stroke_opacity -vec2 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;} -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, `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; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define mediump float radius -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define highp vec4 stroke_color -#pragma mapbox: define mediump float stroke_width -#pragma mapbox: define lowp float stroke_opacity -void main(void) { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize mediump float radius -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize highp vec4 stroke_color -#pragma mapbox: initialize mediump float stroke_width -#pragma mapbox: initialize lowp float stroke_opacity -vec2 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) { -#ifdef GLOBE -vec3 center_vector=projectToSphere(circle_center); -#endif -float 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 { -#ifdef GLOBE -vec4 projected_center=interpolateProjection(circle_center,center_vector,ele); -#else -vec4 projected_center=projectTileWithElevation(circle_center,ele); -#endif -corner_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);} -#ifdef GLOBE -vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele); -#else -gl_Position=projectTileWithElevation(corner_position,ele); -#endif -} 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: Er(ci, "in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"), - heatmap: Er(`uniform highp float u_intensity;in vec2 v_extrude; -#pragma mapbox: define highp float weight -#define GAUSS_COEF 0.3989422804014327 -void main() { -#pragma mapbox: initialize highp float weight -float 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); -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, `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; -#pragma mapbox: define highp float weight -#pragma mapbox: define mediump float radius -const highp float ZERO=1.0/255.0/16.0; -#define GAUSS_COEF 0.3989422804014327 -void main(void) { -#pragma mapbox: initialize highp float weight -#pragma mapbox: initialize mediump float radius -vec2 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); -#ifdef GLOBE -vec2 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); -#else -gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center)); -#endif -}`), - heatmapTexture: Er(`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; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(0.0); -#endif -}`, "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: Er("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: Er("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: Er(`#ifdef GL_ES -precision highp float; -#endif -uniform 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 -{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)); -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, "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: Er("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: Er(ci, `in vec2 a_pos;void main() { -#ifdef GLOBE -gl_Position=projectTileFor3D(a_pos,0.0); -#else -gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0); -#endif -}`), - fill: Er(`#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float opacity -fragColor=color*opacity; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, `uniform vec2 u_fill_translate;in vec2 a_pos; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float opacity -gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`), - fillOutline: Er(`in vec2 v_pos; -#ifdef GLOBE -in float v_depth; -#endif -#pragma mapbox: define highp vec4 outline_color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 outline_color -#pragma mapbox: initialize lowp float opacity -float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity); -#ifdef GLOBE -if (v_depth > 1.0) {discard;} -#endif -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, `uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos; -#ifdef GLOBE -out float v_depth; -#endif -#pragma mapbox: define highp vec4 outline_color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 outline_color -#pragma mapbox: initialize lowp float opacity -gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; -#ifdef GLOBE -v_depth=gl_Position.z/gl_Position.w; -#endif -}`), - fillOutlinePattern: Er(`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; -#ifdef GLOBE -in float v_depth; -#endif -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -vec2 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; -#ifdef GLOBE -if (v_depth > 1.0) {discard;} -#endif -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, `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; -#ifdef GLOBE -out float v_depth; -#endif -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 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; -#ifdef GLOBE -v_depth=gl_Position.z/gl_Position.w; -#endif -}`), - fillPattern: Er(`#ifdef GL_ES -precision highp float; -#endif -uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b; -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -vec2 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; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, `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; -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 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;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: Er(`in vec4 v_color;void main() {fragColor=v_color; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, `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; -#ifdef TERRAIN3D -in vec2 a_centroid; -#endif -out vec4 v_color; -#pragma mapbox: define highp float base -#pragma mapbox: define highp float height -#pragma mapbox: define highp vec4 color -void main() { -#pragma mapbox: initialize highp float base -#pragma mapbox: initialize highp float height -#pragma mapbox: initialize highp vec4 color -vec3 normal=a_normal_ed.xyz; -#ifdef TERRAIN3D -float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); -#else -float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; -#endif -base=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; -#ifdef GLOBE -vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); -#else -gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); -#endif -float 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); -#ifdef GLOBE -mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition); -#endif -directional=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: Er(`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; -#pragma mapbox: define lowp float base -#pragma mapbox: define lowp float height -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float base -#pragma mapbox: initialize lowp float height -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 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; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, `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; -#ifdef TERRAIN3D -in vec2 a_centroid; -#endif -#ifdef GLOBE -out vec3 v_sphere_pos; -#endif -out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting; -#pragma mapbox: define lowp float base -#pragma mapbox: define lowp float height -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float base -#pragma mapbox: initialize lowp float height -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 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; -#ifdef TERRAIN3D -float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); -#else -float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; -#endif -base=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; -#ifdef GLOBE -vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); -#else -gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); -#endif -vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 -? a_pos -: 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: Er(`#ifdef GL_ES -precision highp float; -#endif -uniform 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/pow(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); -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, "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: Er(`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]; -#define PI 3.141592653589793 -#define STANDARD 0 -#define COMBINED 1 -#define IGOR 2 -#define MULTIDIRECTIONAL 3 -#define BASIC 4 -float 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 -{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 -{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);} -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, "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: Er(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale; -#ifdef GLOBE -in float v_depth; -#endif -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -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);fragColor=color*(alpha*opacity); -#ifdef GLOBE -if (v_depth > 1.0) {discard;} -#endif -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, ` -#define scale 0.015873016 -in 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; -#ifdef GLOBE -out float v_depth; -#endif -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float width -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float width -float 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);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; -#ifdef GLOBE -v_depth=gl_Position.z/gl_Position.w; -#endif -#ifdef TERRAIN3D -v_gamma_scale=1.0; -#else -float 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; -#endif -v_width2=vec2(outset,inset);}`), - lineGradient: Er(`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; -#ifdef GLOBE -in float v_depth; -#endif -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -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);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity); -#ifdef GLOBE -if (v_depth > 1.0) {discard;} -#endif -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, ` -#define scale 0.015873016 -in 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; -#ifdef GLOBE -out float v_depth; -#endif -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float width -void main() { -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float width -float 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; -#ifdef GLOBE -v_depth=gl_Position.z/gl_Position.w; -#endif -#ifdef TERRAIN3D -v_gamma_scale=1.0; -#else -float 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; -#endif -v_width2=vec2(outset,inset);}`), - linePattern: Er(`#ifdef GL_ES -precision highp float; -#endif -uniform 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; -#ifdef GLOBE -in float v_depth; -#endif -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -vec2 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; -#ifdef GLOBE -if (v_depth > 1.0) {discard;} -#endif -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, ` -#define scale 0.015873016 -#define LINE_DISTANCE_SCALE 2.0 -in 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; -#ifdef GLOBE -out float v_depth; -#endif -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define mediump float width -#pragma mapbox: define lowp float floorwidth -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize mediump float width -#pragma mapbox: initialize lowp float floorwidth -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -float 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; -#ifdef GLOBE -v_depth=gl_Position.z/gl_Position.w; -#endif -#ifdef TERRAIN3D -v_gamma_scale=1.0; -#else -float 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; -#endif -v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`), - lineSDF: Er(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;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; -#ifdef GLOBE -in float v_depth; -#endif -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float width -#pragma mapbox: define lowp float floorwidth -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float width -#pragma mapbox: initialize lowp float floorwidth -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 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);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity); -#ifdef GLOBE -if (v_depth > 1.0) {discard;} -#endif -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, ` -#define scale 0.015873016 -#define LINE_DISTANCE_SCALE 2.0 -in 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_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale; -#ifdef GLOBE -out float v_depth; -#endif -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float width -#pragma mapbox: define lowp float floorwidth -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float width -#pragma mapbox: initialize lowp float floorwidth -float 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; -#ifdef GLOBE -v_depth=gl_Position.z/gl_Position.w; -#endif -#ifdef TERRAIN3D -v_gamma_scale=1.0; -#else -float 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; -#endif -v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`), - raster: Er(`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); -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, `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; -#ifdef GLOBE -if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;} -#endif -v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`), - symbolIcon: Er(`uniform sampler2D u_texture;in vec2 v_tex;in float v_fade_opacity; -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize lowp float opacity -lowp float alpha=opacity*v_fade_opacity;fragColor=texture(u_texture,v_tex)*alpha; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, `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_fade_opacity; -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize lowp float opacity -vec2 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);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? -camera_to_anchor_distance/u_camera_to_center_distance : -u_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; -#ifdef GLOBE -if(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);} -#endif -vec4 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;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_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`), - symbolSDF: Er(`#define SDF_PX 8.0 -uniform bool u_is_halo;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; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -float 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 fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}fragColor=color*(alpha*opacity*fade_opacity); -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, `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; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -vec2 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;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);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? -camera_to_anchor_distance/u_camera_to_center_distance : -u_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; -#ifdef GLOBE -if(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);} -#endif -vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*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;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));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`), - symbolTextAndIcon: Er(`#define SDF_PX 8.0 -#define SDF 1.0 -#define ICON 0.0 -uniform bool u_is_halo;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; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;fragColor=texture(u_texture_icon,tex_icon)*alpha; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -return;}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;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);fragColor=color*(alpha*opacity*fade_opacity); -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, `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; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -vec2 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);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? -camera_to_anchor_distance/u_camera_to_center_distance : -u_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; -#ifdef GLOBE -if(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);} -#endif -vec4 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;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));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`), - terrain: Er("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 && 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);float 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,get_elevation(a_pos3d.xy)-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: Er("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: Er("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: Er("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: Er(`in 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 -);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: Er("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);}") - }; - - function Er(h, e) { - const n = /#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g, - s = e.match(/in ([\w]+) ([\w]+)/g), - u = h.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g), - d = e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g), - m = d ? d.concat(u) : u, - y = {}; - return { - fragmentSource: h = h.replace(n, ((w, P, M, D, z) => (y[z] = !0, P === "define" ? ` -#ifndef HAS_UNIFORM_u_${z} -in ${M} ${D} ${z}; -#else -uniform ${M} ${D} u_${z}; -#endif -` : ` -#ifdef HAS_UNIFORM_u_${z} - ${M} ${D} ${z} = u_${z}; -#endif -`))), - vertexSource: e = e.replace(n, ((w, P, M, D, z) => { - const B = D === "float" ? "vec2" : "vec4", - U = z.match(/color/) ? "color" : B; - return y[z] ? P === "define" ? ` -#ifndef HAS_UNIFORM_u_${z} -uniform lowp float u_${z}_t; -in ${M} ${B} a_${z}; -out ${M} ${D} ${z}; -#else -uniform ${M} ${D} u_${z}; -#endif -` : U === "vec4" ? ` -#ifndef HAS_UNIFORM_u_${z} - ${z} = a_${z}; -#else - ${M} ${D} ${z} = u_${z}; -#endif -` : ` -#ifndef HAS_UNIFORM_u_${z} - ${z} = unpack_mix_${U}(a_${z}, u_${z}_t); -#else - ${M} ${D} ${z} = u_${z}; -#endif -` : P === "define" ? ` -#ifndef HAS_UNIFORM_u_${z} -uniform lowp float u_${z}_t; -in ${M} ${B} a_${z}; -#else -uniform ${M} ${D} u_${z}; -#endif -` : U === "vec4" ? ` -#ifndef HAS_UNIFORM_u_${z} - ${M} ${D} ${z} = a_${z}; -#else - ${M} ${D} ${z} = u_${z}; -#endif -` : ` -#ifndef HAS_UNIFORM_u_${z} - ${M} ${D} ${z} = unpack_mix_${U}(a_${z}, u_${z}_t); -#else - ${M} ${D} ${z} = u_${z}; -#endif -` - })), - staticAttributes: s, - staticUniforms: m - } - } - class Ri { - constructor(e, n, s) { - this.vertexBuffer = e, this.indexBuffer = n, this.segments = s - } - destroy() { - this.vertexBuffer.destroy(), this.indexBuffer.destroy(), this.segments.destroy(), this.vertexBuffer = null, this.indexBuffer = null, this.segments = null - } - } - var ui = o.aJ([{ - name: "a_pos", - type: "Int16", - components: 2 - }]); - const Jr = "#define PROJECTION_MERCATOR", - ti = "mercator"; - class yr { - constructor() { - this._cachedMesh = null - } - get name() { - return "mercator" - } - get useSubdivision() { - return !1 - } - get shaderVariantName() { - return ti - } - get shaderDefine() { - return Jr - } - get shaderPreludeCode() { - return pi.projectionMercator - } - get vertexShaderPreludeCode() { - return pi.projectionMercator.vertexSource - } - get subdivisionGranularity() { - return o.aK.noSubdivision - } - get useGlobeControls() { - return !1 - } - get transitionState() { - return 0 - } - get latitudeErrorCorrectionRadians() { - return 0 - } - destroy() {} - updateGPUdependent(e) {} - getMeshFromTileID(e, n, s, u, d) { - if (this._cachedMesh) return this._cachedMesh; - const m = new o.aL; - m.emplaceBack(0, 0), m.emplaceBack(o.$, 0), m.emplaceBack(0, o.$), m.emplaceBack(o.$, o.$); - const y = e.createVertexBuffer(m, ui.members), - w = o.aM.simpleSegment(0, 0, 4, 2), - P = new o.aN; - P.emplaceBack(1, 0, 2), P.emplaceBack(1, 2, 3); - const M = e.createIndexBuffer(P); - return this._cachedMesh = new Ri(y, M, w), this._cachedMesh - } - recalculate() {} - hasTransition() { - return !1 - } - setErrorQueryLatitudeDegrees(e) {} - } - class on { - constructor(e = 0, n = 0, s = 0, u = 0) { - if (isNaN(e) || e < 0 || isNaN(n) || n < 0 || isNaN(s) || s < 0 || isNaN(u) || u < 0) throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers"); - this.top = e, this.bottom = n, this.left = s, this.right = u - } - interpolate(e, n, s) { - return n.top != null && e.top != null && (this.top = o.C.number(e.top, n.top, s)), n.bottom != null && e.bottom != null && (this.bottom = o.C.number(e.bottom, n.bottom, s)), n.left != null && e.left != null && (this.left = o.C.number(e.left, n.left, s)), n.right != null && e.right != null && (this.right = o.C.number(e.right, n.right, s)), this - } - getCenter(e, n) { - const s = o.ah((this.left + e - this.right) / 2, 0, e), - u = o.ah((this.top + n - this.bottom) / 2, 0, n); - return new o.P(s, u) - } - equals(e) { - return this.top === e.top && this.bottom === e.bottom && this.left === e.left && this.right === e.right - } - clone() { - return new on(this.top, this.bottom, this.left, this.right) - } - toJSON() { - return { - top: this.top, - bottom: this.bottom, - left: this.left, - right: this.right - } - } - } - - function vn(h, e) { - if (!h.renderWorldCopies || h.lngRange) return; - const n = e.lng - h.center.lng; - e.lng += n > 180 ? -360 : n < -180 ? 360 : 0 - } - - function _a(h) { - return Math.max(0, Math.floor(h)) - } - class ln { - constructor(e, n, s, u, d, m) { - this._callbacks = e, this._tileSize = 512, this._renderWorldCopies = m === void 0 || !!m, this._minZoom = n || 0, this._maxZoom = s || 22, this._minPitch = u ?? 0, this._maxPitch = d ?? 60, this.setMaxBounds(), this._width = 0, this._height = 0, this._center = new o.S(0, 0), this._elevation = 0, this._zoom = 0, this._tileZoom = _a(this._zoom), this._scale = o.af(this._zoom), this._bearingInRadians = 0, this._fovInRadians = .6435011087932844, this._pitchInRadians = 0, this._rollInRadians = 0, this._unmodified = !0, this._edgeInsets = new on, this._minElevationForCurrentTile = 0, this._autoCalculateNearFarZ = !0 - } - apply(e, n, s) { - this._latRange = e.latRange, this._lngRange = e.lngRange, this._width = e.width, this._height = e.height, this._center = e.center, this._elevation = e.elevation, this._minElevationForCurrentTile = e.minElevationForCurrentTile, this._zoom = e.zoom, this._tileZoom = _a(this._zoom), this._scale = o.af(this._zoom), this._bearingInRadians = e.bearingInRadians, this._fovInRadians = e.fovInRadians, this._pitchInRadians = e.pitchInRadians, this._rollInRadians = e.rollInRadians, this._unmodified = e.unmodified, this._edgeInsets = new on(e.padding.top, e.padding.bottom, e.padding.left, e.padding.right), this._minZoom = e.minZoom, this._maxZoom = e.maxZoom, this._minPitch = e.minPitch, this._maxPitch = e.maxPitch, this._renderWorldCopies = e.renderWorldCopies, this._cameraToCenterDistance = e.cameraToCenterDistance, this._nearZ = e.nearZ, this._farZ = e.farZ, this._autoCalculateNearFarZ = !s && e.autoCalculateNearFarZ, n && this._constrain(), this._calcMatrices() - } - get pixelsToClipSpaceMatrix() { - return this._pixelsToClipSpaceMatrix - } - get clipSpaceToPixelsMatrix() { - return this._clipSpaceToPixelsMatrix - } - get minElevationForCurrentTile() { - return this._minElevationForCurrentTile - } - setMinElevationForCurrentTile(e) { - this._minElevationForCurrentTile = e - } - 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(e) { - this._minZoom !== e && (this._minZoom = e, this.setZoom(this.getConstrained(this._center, this.zoom).zoom)) - } - get maxZoom() { - return this._maxZoom - } - setMaxZoom(e) { - this._maxZoom !== e && (this._maxZoom = e, this.setZoom(this.getConstrained(this._center, this.zoom).zoom)) - } - get minPitch() { - return this._minPitch - } - setMinPitch(e) { - this._minPitch !== e && (this._minPitch = e, this.setPitch(Math.max(this.pitch, e))) - } - get maxPitch() { - return this._maxPitch - } - setMaxPitch(e) { - this._maxPitch !== e && (this._maxPitch = e, this.setPitch(Math.min(this.pitch, e))) - } - get renderWorldCopies() { - return this._renderWorldCopies - } - setRenderWorldCopies(e) { - e === void 0 ? e = !0 : e === null && (e = !1), this._renderWorldCopies = e - } - get worldSize() { - return this._tileSize * this._scale - } - get centerOffset() { - return this.centerPoint._sub(this.size._div(2)) - } - get size() { - return new o.P(this._width, this._height) - } - get bearing() { - return this._bearingInRadians / Math.PI * 180 - } - setBearing(e) { - const n = o.aO(e, -180, 180) * Math.PI / 180; - var s, u, d, m, y, w, P, M, D; - this._bearingInRadians !== n && (this._unmodified = !1, this._bearingInRadians = n, this._calcMatrices(), this._rotationMatrix = W(), s = this._rotationMatrix, d = -this._bearingInRadians, m = (u = this._rotationMatrix)[0], y = u[1], w = u[2], P = u[3], M = Math.sin(d), D = Math.cos(d), s[0] = m * D + w * M, s[1] = y * D + P * M, s[2] = m * -M + w * D, s[3] = y * -M + P * D) - } - get rotationMatrix() { - return this._rotationMatrix - } - get pitchInRadians() { - return this._pitchInRadians - } - get pitch() { - return this._pitchInRadians / Math.PI * 180 - } - setPitch(e) { - const n = o.ah(e, this.minPitch, this.maxPitch) / 180 * Math.PI; - this._pitchInRadians !== n && (this._unmodified = !1, this._pitchInRadians = n, this._calcMatrices()) - } - get rollInRadians() { - return this._rollInRadians - } - get roll() { - return this._rollInRadians / Math.PI * 180 - } - setRoll(e) { - const n = e / 180 * Math.PI; - this._rollInRadians !== n && (this._unmodified = !1, this._rollInRadians = n, this._calcMatrices()) - } - get fovInRadians() { - return this._fovInRadians - } - get fov() { - return o.aP(this._fovInRadians) - } - setFov(e) { - e = o.ah(e, .1, 150), this.fov !== e && (this._unmodified = !1, this._fovInRadians = o.ae(e), this._calcMatrices()) - } - get zoom() { - return this._zoom - } - setZoom(e) { - const n = this.getConstrained(this._center, e).zoom; - this._zoom !== n && (this._unmodified = !1, this._zoom = n, this._tileZoom = Math.max(0, Math.floor(n)), this._scale = o.af(n), this._constrain(), this._calcMatrices()) - } - get center() { - return this._center - } - setCenter(e) { - e.lat === this._center.lat && e.lng === this._center.lng || (this._unmodified = !1, this._center = e, this._constrain(), this._calcMatrices()) - } - get elevation() { - return this._elevation - } - setElevation(e) { - e !== this._elevation && (this._elevation = e, this._constrain(), this._calcMatrices()) - } - get padding() { - return this._edgeInsets.toJSON() - } - setPadding(e) { - this._edgeInsets.equals(e) || (this._unmodified = !1, this._edgeInsets.interpolate(this._edgeInsets, e, 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(e, n) { - this._autoCalculateNearFarZ = !1, this._nearZ = e, this._farZ = n, this._calcMatrices() - } - clearNearFarZOverride() { - this._autoCalculateNearFarZ = !0, this._calcMatrices() - } - isPaddingEqual(e) { - return this._edgeInsets.equals(e) - } - interpolatePadding(e, n, s) { - this._unmodified = !1, this._edgeInsets.interpolate(e, n, s), this._constrain(), this._calcMatrices() - } - resize(e, n, s = !0) { - this._width = e, this._height = n, s && this._constrain(), this._calcMatrices() - } - getMaxBounds() { - return this._latRange && this._latRange.length === 2 && this._lngRange && this._lngRange.length === 2 ? new dt([this._lngRange[0], this._latRange[0]], [this._lngRange[1], this._latRange[1]]) : null - } - setMaxBounds(e) { - e ? (this._lngRange = [e.getWest(), e.getEast()], this._latRange = [e.getSouth(), e.getNorth()], this._constrain()) : (this._lngRange = null, this._latRange = [-o.ai, o.ai]) - } - getConstrained(e, n) { - return this._callbacks.getConstrained(e, n) - } - getCameraQueryGeometry(e, n) { - if (n.length === 1) return [n[0], e]; - { - const { - minX: s, - minY: u, - maxX: d, - maxY: m - } = o.a2.fromPoints(n).extend(e); - return [new o.P(s, u), new o.P(d, u), new o.P(d, m), new o.P(s, m), new o.P(s, u)] - } - } - _constrain() { - if (!this.center || !this._width || !this._height || this._constraining) return; - this._constraining = !0; - const e = this._unmodified, - { - center: n, - zoom: s - } = this.getConstrained(this.center, this.zoom); - this.setCenter(n), this.setZoom(s), this._unmodified = e, this._constraining = !1 - } - _calcMatrices() { - if (this._width && this._height) { - this._pixelsToGLUnits = [2 / this._width, -2 / this._height]; - let e = o.ag(new Float64Array(16)); - o.N(e, e, [this._width / 2, -this._height / 2, 1]), o.M(e, e, [1, -1, 0]), this._clipSpaceToPixelsMatrix = e, e = o.ag(new Float64Array(16)), o.N(e, e, [1, -1, 1]), o.M(e, e, [-1, -1, 0]), o.N(e, e, [2 / this._width, 2 / this._height, 1]), this._pixelsToClipSpaceMatrix = e, this._cameraToCenterDistance = .5 / Math.tan(this.fovInRadians / 2) * this._height - } - this._callbacks.calcMatrices() - } - calculateCenterFromCameraLngLatAlt(e, n, s, u) { - const d = s !== void 0 ? s : this.bearing, - m = u = u !== void 0 ? u : this.pitch, - y = o.a1.fromLngLat(e, n), - w = -Math.cos(o.ae(m)), - P = Math.sin(o.ae(m)), - M = P * Math.sin(o.ae(d)), - D = -P * Math.cos(o.ae(d)); - let z = this.elevation; - const B = n - z; - let U; - w * B >= 0 || Math.abs(w) < .1 ? (U = 1e4, z = n + U * w) : U = -B / w; - let ee, J, re = o.aQ(1, y.y), - se = 0; - do { - if (se += 1, se > 10) break; - J = U / re, ee = new o.a1(y.x + M * J, y.y + D * J), re = 1 / ee.meterInMercatorCoordinateUnits() - } while (Math.abs(U - J * re) > 1e-12); - return { - center: ee.toLngLat(), - elevation: z, - zoom: o.ak(this.height / 2 / Math.tan(this.fovInRadians / 2) / J / this.tileSize) - } - } - recalculateZoomAndCenter(e) { - if (this.elevation - e == 0) return; - const n = o.aj(1, this.center.lat) * this.worldSize, - s = this.cameraToCenterDistance / n, - u = o.a1.fromLngLat(this.center, this.elevation), - d = Le(this.center, this.elevation, this.pitch, this.bearing, s); - this._elevation = e; - const m = this.calculateCenterFromCameraLngLatAlt(d.toLngLat(), o.aQ(d.z, u.y), this.bearing, this.pitch); - this._elevation = m.elevation, this._center = m.center, this.setZoom(m.zoom) - } - getCameraPoint() { - const e = Math.tan(this.pitchInRadians) * (this.cameraToCenterDistance || 1); - return this.centerPoint.add(new o.P(e * Math.sin(this.rollInRadians), e * Math.cos(this.rollInRadians))) - } - getCameraAltitude() { - return Math.cos(this.pitchInRadians) * this._cameraToCenterDistance / this._pixelPerMeter + this.elevation - } - getCameraLngLat() { - const e = o.aj(1, this.center.lat) * this.worldSize; - return Le(this.center, this.elevation, this.pitch, this.bearing, this.cameraToCenterDistance / e).toLngLat() - } - getMercatorTileCoordinates(e) { - if (!e) return [0, 0, 1, 1]; - const n = e.canonical.z >= 0 ? 1 << e.canonical.z : Math.pow(2, e.canonical.z); - return [e.canonical.x / n, e.canonical.y / n, 1 / n / o.$, 1 / n / o.$] - } - } - class Ki { - constructor(e, n) { - this.min = e, this.max = n, this.center = o.aR([], o.aS([], this.min, this.max), .5) - } - quadrant(e) { - const n = [e % 2 == 0, e < 2], - s = o.aT(this.min), - u = o.aT(this.max); - for (let d = 0; d < n.length; d++) s[d] = n[d] ? this.min[d] : this.center[d], u[d] = n[d] ? this.center[d] : this.max[d]; - return u[2] = this.max[2], new Ki(s, u) - } - distanceX(e) { - return Math.max(Math.min(this.max[0], e[0]), this.min[0]) - e[0] - } - distanceY(e) { - return Math.max(Math.min(this.max[1], e[1]), this.min[1]) - e[1] - } - intersectsFrustum(e) { - let n = !0; - for (let s = 0; s < e.planes.length; s++) { - const u = this.intersectsPlane(e.planes[s]); - if (u === 0) return 0; - u === 1 && (n = !1) - } - return n ? 2 : e.aabb.min[0] > this.max[0] || e.aabb.min[1] > this.max[1] || e.aabb.min[2] > this.max[2] || e.aabb.max[0] < this.min[0] || e.aabb.max[1] < this.min[1] || e.aabb.max[2] < this.min[2] ? 0 : 1 - } - intersectsPlane(e) { - let n = e[3], - s = e[3]; - for (let u = 0; u < 3; u++) e[u] > 0 ? (n += e[u] * this.min[u], s += e[u] * this.max[u]) : (s += e[u] * this.min[u], n += e[u] * this.max[u]); - return n >= 0 ? 2 : s < 0 ? 0 : 1 - } - } - class cn { - distanceToTile2d(e, n, s, u) { - const d = u.distanceX([e, n]), - m = u.distanceY([e, n]); - return Math.hypot(d, m) - } - getWrap(e, n, s) { - return s - } - getTileBoundingVolume(e, n, s, u) { - var d, m; - let y = 0, - w = 0; - if (u != null && u.terrain) { - const M = new o.Z(e.z, n, e.z, e.x, e.y), - D = u.terrain.getMinMaxElevation(M); - y = (d = D.minElevation) !== null && d !== void 0 ? d : Math.min(0, s), w = (m = D.maxElevation) !== null && m !== void 0 ? m : Math.max(0, s) - } - const P = 1 << e.z; - return new Ki([n + e.x / P, e.y / P, y], [n + (e.x + 1) / P, (e.y + 1) / P, w]) - } - allowVariableZoom(e, n) { - const s = e.fov * (Math.abs(Math.cos(e.rollInRadians)) * e.height + Math.abs(Math.sin(e.rollInRadians)) * e.width) / e.height, - u = o.ah(78.5 - s / 2, 0, 60); - return !!n.terrain || e.pitch > u - } - allowWorldCopies() { - return !0 - } - prepareNextFrame() {} - } - class Ni { - constructor(e, n, s) { - this.points = e, this.planes = n, this.aabb = s - } - static fromInvProjectionMatrix(e, n = 1, s = 0, u, d) { - const m = d ? [ - [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] - ], - y = Math.pow(2, s), - w = [ - [-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((z => (function(B, U, ee, J) { - const re = o.aw([], B, U), - se = 1 / re[3] / ee * J; - return o.aY(re, re, [se, se, 1 / re[3], se]) - })(z, e, n, y))); - u && (function(z, B, U, ee) { - const J = ee ? 4 : 0, - re = ee ? 0 : 4; - let se = 0; - const de = [], - ue = []; - for (let he = 0; he < 4; he++) { - const De = o.aU([], z[he + re], z[he + J]), - He = o.aZ(De); - o.aR(De, De, 1 / He), de.push(He), ue.push(De) - } - for (let he = 0; he < 4; he++) { - const De = o.a_(z[he + J], ue[he], U); - se = De !== null && De >= 0 ? Math.max(se, De) : Math.max(se, de[he]) - } - const ge = (function(he, De) { - const He = o.aU([], he[De[0]], he[De[1]]), - je = o.aU([], he[De[2]], he[De[1]]), - qe = [0, 0, 0, 0]; - return o.aV(qe, o.aW([], He, je)), qe[3] = -o.aX(qe, he[De[0]]), qe - })(z, B), - Te = (function(he, De) { - const He = o.a$(he), - je = o.b0([], he, 1 / He), - qe = o.aU([], De, o.aR([], je, o.aX(De, je))), - $e = o.a$(qe); - if ($e > 0) { - const Rt = Math.sqrt(1 - je[3] * je[3]), - Nt = o.aR([], je, -je[3]), - yt = o.aS([], Nt, o.aR([], qe, Rt / $e)); - return o.b1(De, yt) - } - return null - })(U, ge); - if (Te !== null) { - const he = Te / o.aX(ue[0], ge); - se = Math.min(se, he) - } - for (let he = 0; he < 4; he++) { - const De = Math.min(se, de[he]); - z[he + re] = [z[he + J][0] + ue[he][0] * De, z[he + J][1] + ue[he][1] * De, z[he + J][2] + ue[he][2] * De, 1] - } - })(w, m[0], u, d); - const P = m.map((z => { - const B = o.aU([], w[z[0]], w[z[1]]), - U = o.aU([], w[z[2]], w[z[1]]), - ee = o.aV([], o.aW([], B, U)), - J = -o.aX(ee, w[z[1]]); - return ee.concat(J) - })), - M = [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY], - D = [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY]; - for (const z of w) - for (let B = 0; B < 3; B++) M[B] = Math.min(M[B], z[B]), D[B] = Math.max(D[B], z[B]); - return new Ni(w, P, new Ki(M, D)) - } - } - class wi { - 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(e) { - this._helper.setMinZoom(e) - } - setMaxZoom(e) { - this._helper.setMaxZoom(e) - } - setMinPitch(e) { - this._helper.setMinPitch(e) - } - setMaxPitch(e) { - this._helper.setMaxPitch(e) - } - setRenderWorldCopies(e) { - this._helper.setRenderWorldCopies(e) - } - setBearing(e) { - this._helper.setBearing(e) - } - setPitch(e) { - this._helper.setPitch(e) - } - setRoll(e) { - this._helper.setRoll(e) - } - setFov(e) { - this._helper.setFov(e) - } - setZoom(e) { - this._helper.setZoom(e) - } - setCenter(e) { - this._helper.setCenter(e) - } - setElevation(e) { - this._helper.setElevation(e) - } - setMinElevationForCurrentTile(e) { - this._helper.setMinElevationForCurrentTile(e) - } - setPadding(e) { - this._helper.setPadding(e) - } - interpolatePadding(e, n, s) { - return this._helper.interpolatePadding(e, n, s) - } - isPaddingEqual(e) { - return this._helper.isPaddingEqual(e) - } - resize(e, n, s = !0) { - this._helper.resize(e, n, s) - } - getMaxBounds() { - return this._helper.getMaxBounds() - } - setMaxBounds(e) { - this._helper.setMaxBounds(e) - } - overrideNearFarZ(e, n) { - this._helper.overrideNearFarZ(e, n) - } - clearNearFarZOverride() { - this._helper.clearNearFarZOverride() - } - getCameraQueryGeometry(e) { - return this._helper.getCameraQueryGeometry(this.getCameraPoint(), e) - } - 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 nearZ() { - return this._helper.nearZ - } - get farZ() { - return this._helper.farZ - } - get autoCalculateNearFarZ() { - return this._helper.autoCalculateNearFarZ - } - setTransitionState(e, n) {} - constructor(e, n, s, u, d) { - this._posMatrixCache = new Map, this._alignedPosMatrixCache = new Map, this._fogMatrixCacheF32 = new Map, this._helper = new ln({ - calcMatrices: () => { - this._calcMatrices() - }, - getConstrained: (m, y) => this.getConstrained(m, y) - }, e, n, s, u, d), this._coveringTilesDetailsProvider = new cn - } - clone() { - const e = new wi; - return e.apply(this), e - } - apply(e, n, s) { - this._helper.apply(e, n, s) - } - 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(e) { - const n = [new o.b2(0, e)]; - if (this._helper._renderWorldCopies) { - const s = this.screenPointToMercatorCoordinate(new o.P(0, 0)), - u = this.screenPointToMercatorCoordinate(new o.P(this._helper._width, 0)), - d = this.screenPointToMercatorCoordinate(new o.P(this._helper._width, this._helper._height)), - m = this.screenPointToMercatorCoordinate(new o.P(0, this._helper._height)), - y = Math.floor(Math.min(s.x, u.x, d.x, m.x)), - w = Math.floor(Math.max(s.x, u.x, d.x, m.x)), - P = 1; - for (let M = y - P; M <= w + P; M++) M !== 0 && n.push(new o.b2(M, e)) - } - return n - } - getCameraFrustum() { - return Ni.fromInvProjectionMatrix(this._invViewProjMatrix, this.worldSize) - } - getClippingPlane() { - return null - } - getCoveringTilesDetailsProvider() { - return this._coveringTilesDetailsProvider - } - recalculateZoomAndCenter(e) { - const n = this.screenPointToLocation(this.centerPoint, e), - s = e ? e.getElevationForLngLatZoom(n, this._helper._tileZoom) : 0; - this._helper.recalculateZoomAndCenter(s) - } - setLocationAtPoint(e, n) { - const s = o.aj(this.elevation, this.center.lat), - u = this.screenPointToMercatorCoordinateAtZ(n, s), - d = this.screenPointToMercatorCoordinateAtZ(this.centerPoint, s), - m = o.a1.fromLngLat(e), - y = new o.a1(m.x - (u.x - d.x), m.y - (u.y - d.y)); - this.setCenter(y == null ? void 0 : y.toLngLat()), this._helper._renderWorldCopies && this.setCenter(this.center.wrap()) - } - locationToScreenPoint(e, n) { - return n ? this.coordinatePoint(o.a1.fromLngLat(e), n.getElevationForLngLatZoom(e, this._helper._tileZoom), this._pixelMatrix3D) : this.coordinatePoint(o.a1.fromLngLat(e)) - } - screenPointToLocation(e, n) { - var s; - return (s = this.screenPointToMercatorCoordinate(e, n)) === null || s === void 0 ? void 0 : s.toLngLat() - } - screenPointToMercatorCoordinate(e, n) { - if (n) { - const s = n.pointCoordinate(e); - if (s != null) return s - } - return this.screenPointToMercatorCoordinateAtZ(e) - } - screenPointToMercatorCoordinateAtZ(e, n) { - const s = n || 0, - u = [e.x, e.y, 0, 1], - d = [e.x, e.y, 1, 1]; - o.aw(u, u, this._pixelMatrixInverse), o.aw(d, d, this._pixelMatrixInverse); - const m = u[3], - y = d[3], - w = u[1] / m, - P = d[1] / y, - M = u[2] / m, - D = d[2] / y, - z = M === D ? 0 : (s - M) / (D - M); - return new o.a1(o.C.number(u[0] / m, d[0] / y, z) / this.worldSize, o.C.number(w, P, z) / this.worldSize, s) - } - coordinatePoint(e, n = 0, s = this._pixelMatrix) { - const u = [e.x * this.worldSize, e.y * this.worldSize, n, 1]; - return o.aw(u, u, s), new o.P(u[0] / u[3], u[1] / u[3]) - } - getBounds() { - const e = Math.max(0, this._helper._height / 2 - le(this)); - return new dt().extend(this.screenPointToLocation(new o.P(0, e))).extend(this.screenPointToLocation(new o.P(this._helper._width, e))).extend(this.screenPointToLocation(new o.P(this._helper._width, this._helper._height))).extend(this.screenPointToLocation(new o.P(0, this._helper._height))) - } - isPointOnMapSurface(e, n) { - return n ? n.pointCoordinate(e) != null : e.y > this.height / 2 - le(this) - } - calculatePosMatrix(e, n = !1, s) { - var u; - const d = (u = e.key) !== null && u !== void 0 ? u : o.b3(e.wrap, e.canonical.z, e.canonical.z, e.canonical.x, e.canonical.y), - m = n ? this._alignedPosMatrixCache : this._posMatrixCache; - if (m.has(d)) { - const P = m.get(d); - return s ? P.f32 : P.f64 - } - const y = ve(e, this.worldSize); - o.O(y, n ? this._alignedProjMatrix : this._viewProjMatrix, y); - const w = { - f64: y, - f32: new Float32Array(y) - }; - return m.set(d, w), s ? w.f32 : w.f64 - } - calculateFogMatrix(e) { - const n = e.key, - s = this._fogMatrixCacheF32; - if (s.has(n)) return s.get(n); - const u = ve(e, this.worldSize); - return o.O(u, this._fogMatrix, u), s.set(n, new Float32Array(u)), s.get(n) - } - getConstrained(e, n) { - n = o.ah(+n, this.minZoom, this.maxZoom); - const s = { - center: new o.S(e.lng, e.lat), - zoom: n - }; - let u = this._helper._lngRange; - if (!this._helper._renderWorldCopies && u === null) { - const de = 179.9999999999; - u = [-de, de] - } - const d = this.tileSize * o.af(s.zoom); - let m = 0, - y = d, - w = 0, - P = d, - M = 0, - D = 0; - const { - x: z, - y: B - } = this.size; - if (this._helper._latRange) { - const de = this._helper._latRange; - m = o.U(de[1]) * d, y = o.U(de[0]) * d, y - m < B && (M = B / (y - m)) - } - u && (w = o.aO(o.V(u[0]) * d, 0, d), P = o.aO(o.V(u[1]) * d, 0, d), P < w && (P += d), P - w < z && (D = z / (P - w))); - const { - x: U, - y: ee - } = G(d, e); - let J, re; - const se = Math.max(D || 0, M || 0); - if (se) { - const de = new o.P(D ? (P + w) / 2 : U, M ? (y + m) / 2 : ee); - return s.center = K(d, de).wrap(), s.zoom += o.ak(se), s - } - if (this._helper._latRange) { - const de = B / 2; - ee - de < m && (re = m + de), ee + de > y && (re = y - de) - } - if (u) { - const de = (w + P) / 2; - let ue = U; - this._helper._renderWorldCopies && (ue = o.aO(U, de - d / 2, de + d / 2)); - const ge = z / 2; - ue - ge < w && (J = w + ge), ue + ge > P && (J = P - ge) - } - if (J !== void 0 || re !== void 0) { - const de = new o.P(J ?? U, re ?? ee); - s.center = K(d, de).wrap() - } - return s - } - calculateCenterFromCameraLngLatAlt(e, n, s, u) { - return this._helper.calculateCenterFromCameraLngLatAlt(e, n, s, u) - } - _calculateNearFarZIfNeeded(e, n, s) { - if (!this._helper.autoCalculateNearFarZ) return; - const u = Math.min(this.elevation, this.minElevationForCurrentTile, this.getCameraAltitude() - 100), - d = e - u * this._helper._pixelPerMeter / Math.cos(n), - m = u < 0 ? d : e, - y = Math.PI / 2 + this.pitchInRadians, - w = o.ae(this.fov) * (Math.abs(Math.cos(o.ae(this.roll))) * this.height + Math.abs(Math.sin(o.ae(this.roll))) * this.width) / this.height * (.5 + s.y / this.height), - P = Math.sin(w) * m / Math.sin(o.ah(Math.PI - y - w, .01, Math.PI - .01)), - M = le(this), - D = Math.atan(M / this._helper.cameraToCenterDistance), - z = o.ae(.75), - B = D > z ? 2 * D * (.5 + s.y / (2 * M)) : z, - U = Math.sin(B) * m / Math.sin(o.ah(Math.PI - y - B, .01, Math.PI - .01)), - ee = Math.min(P, U); - this._helper._farZ = 1.01 * (Math.cos(Math.PI / 2 - n) * ee + m), this._helper._nearZ = this._helper._height / 50 - } - _calcMatrices() { - if (!this._helper._height) return; - const e = this.centerOffset, - n = G(this.worldSize, this.center), - s = n.x, - u = n.y; - this._helper._pixelPerMeter = o.aj(1, this.center.lat) * this.worldSize; - const d = o.ae(Math.min(this.pitch, q)), - m = Math.max(this._helper.cameraToCenterDistance / 2, this._helper.cameraToCenterDistance + this._helper._elevation * this._helper._pixelPerMeter / Math.cos(d)); - let y; - this._calculateNearFarZIfNeeded(m, d, e), y = new Float64Array(16), o.b4(y, this.fovInRadians, this._helper._width / this._helper._height, this._helper._nearZ, this._helper._farZ), this._invProjMatrix = new Float64Array(16), o.aq(this._invProjMatrix, y), y[8] = 2 * -e.x / this._helper._width, y[9] = 2 * e.y / this._helper._height, this._projectionMatrix = o.b5(y), o.N(y, y, [1, -1, 1]), o.M(y, y, [0, 0, -this._helper.cameraToCenterDistance]), o.b6(y, y, -this.rollInRadians), o.b7(y, y, this.pitchInRadians), o.b6(y, y, -this.bearingInRadians), o.M(y, y, [-s, -u, 0]), this._mercatorMatrix = o.N([], y, [this.worldSize, this.worldSize, this.worldSize]), o.N(y, y, [1, 1, this._helper._pixelPerMeter]), this._pixelMatrix = o.O(new Float64Array(16), this.clipSpaceToPixelsMatrix, y), o.M(y, y, [0, 0, -this.elevation]), this._viewProjMatrix = y, this._invViewProjMatrix = o.aq([], y); - const w = [0, 0, -1, 1]; - o.aw(w, w, this._invViewProjMatrix), this._cameraPosition = [w[0] / w[3], w[1] / w[3], w[2] / w[3]], this._fogMatrix = new Float64Array(16), o.b4(this._fogMatrix, this.fovInRadians, this.width / this.height, m, this._helper._farZ), this._fogMatrix[8] = 2 * -e.x / this.width, this._fogMatrix[9] = 2 * e.y / this.height, o.N(this._fogMatrix, this._fogMatrix, [1, -1, 1]), o.M(this._fogMatrix, this._fogMatrix, [0, 0, -this.cameraToCenterDistance]), o.b6(this._fogMatrix, this._fogMatrix, -this.rollInRadians), o.b7(this._fogMatrix, this._fogMatrix, this.pitchInRadians), o.b6(this._fogMatrix, this._fogMatrix, -this.bearingInRadians), o.M(this._fogMatrix, this._fogMatrix, [-s, -u, 0]), o.N(this._fogMatrix, this._fogMatrix, [1, 1, this._helper._pixelPerMeter]), o.M(this._fogMatrix, this._fogMatrix, [0, 0, -this.elevation]), this._pixelMatrix3D = o.O(new Float64Array(16), this.clipSpaceToPixelsMatrix, y); - const P = this._helper._width % 2 / 2, - M = this._helper._height % 2 / 2, - D = Math.cos(this.bearingInRadians), - z = Math.sin(-this.bearingInRadians), - B = s - Math.round(s) + D * P + z * M, - U = u - Math.round(u) + D * M + z * P, - ee = new Float64Array(y); - if (o.M(ee, ee, [B > .5 ? B - 1 : B, U > .5 ? U - 1 : U, 0]), this._alignedProjMatrix = ee, y = o.aq(new Float64Array(16), this._pixelMatrix), !y) throw new Error("failed to invert matrix"); - this._pixelMatrixInverse = y, this._clearMatrixCaches() - } - _clearMatrixCaches() { - this._posMatrixCache.clear(), this._alignedPosMatrixCache.clear(), this._fogMatrixCacheF32.clear() - } - maxPitchScaleFactor() { - if (!this._pixelMatrixInverse) return 1; - const e = this.screenPointToMercatorCoordinate(new o.P(0, 0)), - n = [e.x * this.worldSize, e.y * this.worldSize, 0, 1]; - return o.aw(n, n, this._pixelMatrix)[3] / this._helper.cameraToCenterDistance - } - getCameraPoint() { - return this._helper.getCameraPoint() - } - getCameraAltitude() { - return this._helper.getCameraAltitude() - } - getCameraLngLat() { - const e = o.aj(1, this.center.lat) * this.worldSize; - return Le(this.center, this.elevation, this.pitch, this.bearing, this._helper.cameraToCenterDistance / e).toLngLat() - } - lngLatToCameraDepth(e, n) { - const s = o.a1.fromLngLat(e), - u = [s.x * this.worldSize, s.y * this.worldSize, n, 1]; - return o.aw(u, u, this._viewProjMatrix), u[2] / u[3] - } - getProjectionData(e) { - const { - overscaledTileID: n, - aligned: s, - applyTerrainMatrix: u - } = e, d = this._helper.getMercatorTileCoordinates(n), m = n ? this.calculatePosMatrix(n, s, !0) : null; - let y; - return y = n && n.terrainRttPosMatrix32f && u ? n.terrainRttPosMatrix32f : m || o.b8(), { - mainMatrix: y, - tileMercatorCoords: d, - clippingPlane: [0, 0, 0, 0], - projectionTransition: 0, - fallbackMatrix: y - } - } - isLocationOccluded(e) { - return !1 - } - getPixelScale() { - return 1 - } - getCircleRadiusCorrection() { - return 1 - } - getPitchedTextCorrection(e, n, s) { - return 1 - } - transformLightDirection(e) { - return o.aT(e) - } - getRayDirectionFromPixel(e) { - throw new Error("Not implemented.") - } - projectTileCoordinates(e, n, s, u) { - const d = this.calculatePosMatrix(s); - let m; - u ? (m = [e, n, u(e, n), 1], o.aw(m, m, d)) : (m = [e, n, 0, 1], Li(m, m, d)); - const y = m[3]; - return { - point: new o.P(m[0] / y, m[1] / y), - signedDistanceFromCamera: y, - isOccluded: !1 - } - } - populateCache(e) { - for (const n of e) this.calculatePosMatrix(n) - } - getMatrixForModel(e, n) { - const s = o.a1.fromLngLat(e, n), - u = s.meterInMercatorCoordinateUnits(), - d = o.b9(); - return o.M(d, d, [s.x, s.y, s.z]), o.b6(d, d, Math.PI), o.b7(d, d, Math.PI / 2), o.N(d, d, [-u, u, u]), d - } - getProjectionDataForCustomLayer(e = !0) { - const n = new o.Z(0, 0, 0, 0, 0), - s = this.getProjectionData({ - overscaledTileID: n, - applyGlobeMatrix: e - }), - u = ve(n, this.worldSize); - o.O(u, this._viewProjMatrix, u), s.tileMercatorCoords = [0, 0, 1, 1]; - const d = [o.$, o.$, this.worldSize / this._helper.pixelsPerMeter], - m = o.ba(); - return o.N(m, u, d), s.fallbackMatrix = m, s.mainMatrix = m, s - } - getFastPathSimpleProjectionMatrix(e) { - return this.calculatePosMatrix(e) - } - } - - function Ko() { - o.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.") - } - - function un(h) { - if (h.useSlerp) - if (h.k < 1) { - const e = o.bb(h.startEulerAngles.roll, h.startEulerAngles.pitch, h.startEulerAngles.bearing), - n = o.bb(h.endEulerAngles.roll, h.endEulerAngles.pitch, h.endEulerAngles.bearing), - s = new Float64Array(4); - o.bc(s, e, n, h.k); - const u = o.bd(s); - h.tr.setRoll(u.roll), h.tr.setPitch(u.pitch), h.tr.setBearing(u.bearing) - } else h.tr.setRoll(h.endEulerAngles.roll), h.tr.setPitch(h.endEulerAngles.pitch), h.tr.setBearing(h.endEulerAngles.bearing); - else h.tr.setRoll(o.C.number(h.startEulerAngles.roll, h.endEulerAngles.roll, h.k)), h.tr.setPitch(o.C.number(h.startEulerAngles.pitch, h.endEulerAngles.pitch, h.k)), h.tr.setBearing(o.C.number(h.startEulerAngles.bearing, h.endEulerAngles.bearing, h.k)) - } - - function Nn(h, e, n, s, u) { - const d = u.padding, - m = G(u.worldSize, n.getNorthWest()), - y = G(u.worldSize, n.getNorthEast()), - w = G(u.worldSize, n.getSouthEast()), - P = G(u.worldSize, n.getSouthWest()), - M = o.ae(-s), - D = m.rotate(M), - z = y.rotate(M), - B = w.rotate(M), - U = P.rotate(M), - ee = new o.P(Math.max(D.x, z.x, U.x, B.x), Math.max(D.y, z.y, U.y, B.y)), - J = new o.P(Math.min(D.x, z.x, U.x, B.x), Math.min(D.y, z.y, U.y, B.y)), - re = ee.sub(J), - se = (u.width - (d.left + d.right + e.left + e.right)) / re.x, - de = (u.height - (d.top + d.bottom + e.top + e.bottom)) / re.y; - if (de < 0 || se < 0) return void Ko(); - const ue = Math.min(o.ak(u.scale * Math.min(se, de)), h.maxZoom), - ge = o.P.convert(h.offset), - Te = new o.P((e.left - e.right) / 2, (e.top - e.bottom) / 2).rotate(o.ae(s)), - he = ge.add(Te).mult(u.scale / o.af(ue)); - return { - center: K(u.worldSize, m.add(w).div(2).sub(he)), - zoom: ue, - bearing: s - } - } - class hn { - get useGlobeControls() { - return !1 - } - handlePanInertia(e, n) { - return { - easingOffset: e, - easingCenter: n.center - } - } - handleMapControlsRollPitchBearingZoom(e, n) { - e.bearingDelta && n.setBearing(n.bearing + e.bearingDelta), e.pitchDelta && n.setPitch(n.pitch + e.pitchDelta), e.rollDelta && n.setRoll(n.roll + e.rollDelta), e.zoomDelta && n.setZoom(n.zoom + e.zoomDelta) - } - handleMapControlsPan(e, n, s) { - e.around.distSqr(n.centerPoint) < .01 || n.setLocationAtPoint(s, e.around) - } - cameraForBoxAndBearing(e, n, s, u, d) { - return Nn(e, n, s, u, d) - } - handleJumpToCenterZoom(e, n) { - e.zoom !== (n.zoom !== void 0 ? +n.zoom : e.zoom) && e.setZoom(+n.zoom), n.center !== void 0 && e.setCenter(o.S.convert(n.center)) - } - handleEaseTo(e, n) { - const s = e.zoom, - u = e.padding, - d = { - roll: e.roll, - pitch: e.pitch, - bearing: e.bearing - }, - m = { - roll: n.roll === void 0 ? e.roll : n.roll, - pitch: n.pitch === void 0 ? e.pitch : n.pitch, - bearing: n.bearing === void 0 ? e.bearing : n.bearing - }, - y = n.zoom !== void 0, - w = !e.isPaddingEqual(n.padding); - let P = !1; - const M = y ? +n.zoom : e.zoom; - let D = e.centerPoint.add(n.offsetAsPoint); - const z = e.screenPointToLocation(D), - { - center: B, - zoom: U - } = e.getConstrained(o.S.convert(n.center || z), M ?? s); - vn(e, B); - const ee = G(e.worldSize, z), - J = G(e.worldSize, B).sub(ee), - re = o.af(U - s); - return P = U !== s, { - easeFunc: se => { - if (P && e.setZoom(o.C.number(s, U, se)), o.be(d, m) || un({ - startEulerAngles: d, - endEulerAngles: m, - tr: e, - k: se, - useSlerp: d.roll != m.roll - }), w && (e.interpolatePadding(u, n.padding, se), D = e.centerPoint.add(n.offsetAsPoint)), n.around) e.setLocationAtPoint(n.around, n.aroundPoint); - else { - const de = o.af(e.zoom - s), - ue = U > s ? Math.min(2, re) : Math.max(.5, re), - ge = Math.pow(ue, 1 - se), - Te = K(e.worldSize, ee.add(J.mult(se * ge)).mult(de)); - e.setLocationAtPoint(e.renderWorldCopies ? Te.wrap() : Te, D) - } - }, - isZooming: P, - elevationCenter: B - } - } - handleFlyTo(e, n) { - const s = n.zoom !== void 0, - u = e.zoom, - d = e.getConstrained(o.S.convert(n.center || n.locationAtOffset), s ? +n.zoom : u), - m = d.center, - y = d.zoom; - vn(e, m); - const w = G(e.worldSize, n.locationAtOffset), - P = G(e.worldSize, m).sub(w), - M = P.mag(), - D = o.af(y - u); - let z; - if (n.minZoom !== void 0) { - const B = Math.min(+n.minZoom, u, y), - U = e.getConstrained(m, B).zoom; - z = o.af(U - u) - } - return { - easeFunc: (B, U, ee, J) => { - e.setZoom(B === 1 ? y : u + o.ak(U)); - const re = B === 1 ? m : K(e.worldSize, w.add(P.mult(ee)).mult(U)); - e.setLocationAtPoint(e.renderWorldCopies ? re.wrap() : re, J) - }, - scaleOfZoom: D, - targetCenter: m, - scaleOfMinZoom: z, - pixelPathLength: M - } - } - } - class Ti { - constructor(e, n, s) { - this.blendFunction = e, this.blendColor = n, this.mask = s - } - } - Ti.Replace = [1, 0], Ti.disabled = new Ti(Ti.Replace, o.bf.transparent, [!1, !1, !1, !1]), Ti.unblended = new Ti(Ti.Replace, o.bf.transparent, [!0, !0, !0, !0]), Ti.alphaBlended = new Ti([1, 771], o.bf.transparent, [!0, !0, !0, !0]); - const Za = 2305; - class wr { - constructor(e, n, s) { - this.enable = e, this.mode = n, this.frontFace = s - } - } - wr.disabled = new wr(!1, 1029, Za), wr.backCCW = new wr(!0, 1029, Za), wr.frontCCW = new wr(!0, 1028, Za); - class Vr { - constructor(e, n, s) { - this.func = e, this.mask = n, this.range = s - } - } - Vr.ReadOnly = !1, Vr.ReadWrite = !0, Vr.disabled = new Vr(519, Vr.ReadOnly, [0, 1]); - const ga = 7680; - class hi { - constructor(e, n, s, u, d, m) { - this.test = e, this.ref = n, this.mask = s, this.fail = u, this.depthFail = d, this.pass = m - } - } - hi.disabled = new hi({ - func: 519, - mask: 0 - }, 0, 0, ga, ga, ga); - const ra = new WeakMap; - - function Ra(h) { - var e; - if (ra.has(h)) return ra.get(h); - { - const n = (e = h.getParameter(h.VERSION)) === null || e === void 0 ? void 0 : e.startsWith("WebGL 2.0"); - return ra.set(h, n), n - } - } - class Ba { - get awaitingQuery() { - return !!this._readbackQueue - } - constructor(e) { - 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 = e; - const n = e.context, - s = n.gl; - this._texFormat = s.RGBA, this._texType = s.UNSIGNED_BYTE; - const u = new o.aL; - u.emplaceBack(-1, -1), u.emplaceBack(2, -1), u.emplaceBack(-1, 2); - const d = new o.aN; - d.emplaceBack(0, 1, 2), this._fullscreenTriangle = new Ri(n.createVertexBuffer(u, ui.members), n.createIndexBuffer(d), o.aM.simpleSegment(0, 0, u.length, d.length)), this._resultBuffer = new Uint8Array(4), n.activeTexture.set(s.TEXTURE1); - const m = s.createTexture(); - s.bindTexture(s.TEXTURE_2D, m), s.texParameteri(s.TEXTURE_2D, s.TEXTURE_WRAP_S, s.CLAMP_TO_EDGE), s.texParameteri(s.TEXTURE_2D, s.TEXTURE_WRAP_T, s.CLAMP_TO_EDGE), s.texParameteri(s.TEXTURE_2D, s.TEXTURE_MIN_FILTER, s.NEAREST), s.texParameteri(s.TEXTURE_2D, s.TEXTURE_MAG_FILTER, s.NEAREST), s.texImage2D(s.TEXTURE_2D, 0, this._texFormat, this._texWidth, this._texHeight, 0, this._texFormat, this._texType, null), this._fbo = n.createFramebuffer(this._texWidth, this._texHeight, !1, !1), this._fbo.colorAttachment.set(m), Ra(s) && (this._pbo = s.createBuffer(), s.bindBuffer(s.PIXEL_PACK_BUFFER, this._pbo), s.bufferData(s.PIXEL_PACK_BUFFER, 4, s.STREAM_READ), s.bindBuffer(s.PIXEL_PACK_BUFFER, null)) - } - destroy() { - const e = this._cachedRenderContext.context.gl; - this._fullscreenTriangle.destroy(), this._fbo.destroy(), e.deleteBuffer(this._pbo), this._fullscreenTriangle = null, this._fbo = null, this._pbo = null, this._resultBuffer = null - } - updateErrorLoop(e, n) { - const s = this._updateCount; - return this._readbackQueue ? s >= this._readbackQueue.frameNumberIssued + this._readbackWaitFrames && this._tryReadback() : s >= this._lastReadbackFrame + this._measureWaitFrames && this._renderErrorTexture(e, n), this._updateCount++, this._measuredError - } - _bindFramebuffer() { - const e = this._cachedRenderContext.context, - n = e.gl; - e.activeTexture.set(n.TEXTURE1), n.bindTexture(n.TEXTURE_2D, this._fbo.colorAttachment.get()), e.bindFramebuffer.set(this._fbo.framebuffer) - } - _renderErrorTexture(e, n) { - const s = this._cachedRenderContext.context, - u = s.gl; - if (this._bindFramebuffer(), s.viewport.set([0, 0, this._texWidth, this._texHeight]), s.clear({ - color: o.bf.transparent - }), this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(s, u.TRIANGLES, Vr.disabled, hi.disabled, Ti.unblended, wr.disabled, ((d, m) => ({ - u_input: d, - u_output_expected: m - }))(e, n), null, null, "$clipping", this._fullscreenTriangle.vertexBuffer, this._fullscreenTriangle.indexBuffer, this._fullscreenTriangle.segments), this._pbo && Ra(u)) { - u.bindBuffer(u.PIXEL_PACK_BUFFER, this._pbo), u.readBuffer(u.COLOR_ATTACHMENT0), u.readPixels(0, 0, this._texWidth, this._texHeight, this._texFormat, this._texType, 0), u.bindBuffer(u.PIXEL_PACK_BUFFER, null); - const d = u.fenceSync(u.SYNC_GPU_COMMANDS_COMPLETE, 0); - u.flush(), this._readbackQueue = { - frameNumberIssued: this._updateCount, - sync: d - } - } else this._readbackQueue = { - frameNumberIssued: this._updateCount, - sync: null - } - } - _tryReadback() { - const e = this._cachedRenderContext.context.gl; - if (this._pbo && this._readbackQueue && Ra(e)) { - const n = e.clientWaitSync(this._readbackQueue.sync, 0, 0); - if (n === e.WAIT_FAILED) return o.w("WebGL2 clientWaitSync failed."), this._readbackQueue = null, void(this._lastReadbackFrame = this._updateCount); - if (n === e.TIMEOUT_EXPIRED) return; - e.bindBuffer(e.PIXEL_PACK_BUFFER, this._pbo), e.getBufferSubData(e.PIXEL_PACK_BUFFER, 0, this._resultBuffer, 0, 4), e.bindBuffer(e.PIXEL_PACK_BUFFER, null) - } else this._bindFramebuffer(), e.readPixels(0, 0, this._texWidth, this._texHeight, this._texFormat, this._texType, this._resultBuffer); - this._readbackQueue = null, this._measuredError = Ba._parseRGBA8float(this._resultBuffer), this._lastReadbackFrame = this._updateCount - } - static _parseRGBA8float(e) { - let n = 0; - return n += e[0] / 256, n += e[1] / 65536, n += e[2] / 16777216, e[3] < 127 && (n = -n), n / 128 - } - } - const Yo = o.$ / 128; - - function mc(h, e) { - const n = h.granularity !== void 0 ? Math.max(h.granularity, 1) : 1, - s = n + (h.generateBorders ? 2 : 0), - u = n + (h.extendToNorthPole || h.generateBorders ? 1 : 0) + (h.extendToSouthPole || h.generateBorders ? 1 : 0), - d = s + 1, - m = u + 1, - y = h.generateBorders ? -1 : 0, - w = h.generateBorders || h.extendToNorthPole ? -1 : 0, - P = n + (h.generateBorders ? 1 : 0), - M = n + (h.generateBorders || h.extendToSouthPole ? 1 : 0), - D = d * m, - z = s * u * 6, - B = d * m > 65536; - if (B && e === "16bit") throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices."); - const U = B || e === "32bit", - ee = new Int16Array(2 * D); - let J = 0; - for (let de = w; de <= M; de++) - for (let ue = y; ue <= P; ue++) { - let ge = ue / n * o.$; - ue === -1 && (ge = -Yo), ue === n + 1 && (ge = o.$ + Yo); - let Te = de / n * o.$; - de === -1 && (Te = h.extendToNorthPole ? o.bh : -Yo), de === n + 1 && (Te = h.extendToSouthPole ? o.bi : o.$ + Yo), ee[J++] = ge, ee[J++] = Te - } - const re = U ? new Uint32Array(z) : new Uint16Array(z); - let se = 0; - for (let de = 0; de < u; de++) - for (let ue = 0; ue < s; ue++) { - const ge = ue + 1 + de * d, - Te = ue + (de + 1) * d, - he = ue + 1 + (de + 1) * d; - re[se++] = ue + de * d, re[se++] = Te, re[se++] = ge, re[se++] = ge, re[se++] = Te, re[se++] = he - } - return { - vertices: ee.buffer.slice(0), - indices: re.buffer.slice(0), - uses32bitIndices: U - } - } - const Rs = new o.aK({ - fill: new o.bj(128, 2), - line: new o.bj(512, 0), - tile: new o.bj(128, 32), - stencil: new o.bj(128, 1), - circle: 3 - }); - class co { - 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 pi.projectionGlobe - } - get vertexShaderPreludeCode() { - return pi.projectionMercator.vertexSource - } - get subdivisionGranularity() { - return Rs - } - get useGlobeControls() { - return !0 - } - get latitudeErrorCorrectionRadians() { - return this._errorCorrectionUsable - } - destroy() { - this._errorMeasurement && this._errorMeasurement.destroy() - } - updateGPUdependent(e) { - this._errorMeasurement || (this._errorMeasurement = new Ba(e)); - const n = o.U(this._errorQueryLatitudeDegrees), - s = 2 * Math.atan(Math.exp(Math.PI - n * Math.PI * 2)) - .5 * Math.PI, - u = this._errorMeasurement.updateErrorLoop(n, s), - d = ye.now(); - u !== this._errorMeasurementLastValue && (this._errorCorrectionPreviousValue = this._errorCorrectionUsable, this._errorMeasurementLastValue = u, this._errorMeasurementLastChangeTime = d); - const m = Math.min(Math.max((d - this._errorMeasurementLastChangeTime) / 1e3 / .5, 0), 1); - this._errorCorrectionUsable = o.bk(this._errorCorrectionPreviousValue, -this._errorMeasurementLastValue, o.bl(m)) - } - _getMeshKey(e) { - return `${e.granularity.toString(36)}_${e.generateBorders?"b":""}${e.extendToNorthPole?"n":""}${e.extendToSouthPole?"s":""}` - } - getMeshFromTileID(e, n, s, u, d) { - const m = (d === "stencil" ? Rs.stencil : Rs.tile).getGranularityForZoomLevel(n.z); - return this._getMesh(e, { - granularity: m, - generateBorders: s, - extendToNorthPole: n.y === 0 && u, - extendToSouthPole: n.y === (1 << n.z) - 1 && u - }) - } - _getMesh(e, n) { - const s = this._getMeshKey(n); - if (s in this._tileMeshCache) return this._tileMeshCache[s]; - const u = (function(d, m) { - const y = mc(m, "16bit"), - w = o.aL.deserialize({ - arrayBuffer: y.vertices, - length: y.vertices.byteLength / 2 / 2 - }), - P = o.aN.deserialize({ - arrayBuffer: y.indices, - length: y.indices.byteLength / 2 / 3 - }); - return new Ri(d.createVertexBuffer(w, ui.members), d.createIndexBuffer(P), o.aM.simpleSegment(0, 0, w.length, P.length)) - })(e, n); - return this._tileMeshCache[s] = u, u - } - recalculate(e) {} - hasTransition() { - const e = ye.now(); - let n = !1; - return n = n || (e - this._errorMeasurementLastChangeTime) / 1e3 < .7, n = n || this._errorMeasurement && this._errorMeasurement.awaitingQuery, n - } - setErrorQueryLatitudeDegrees(e) { - this._errorQueryLatitudeDegrees = e - } - } - const Jo = new o.r({ - type: new o.D(o.v.projection.type) - }); - class Qo extends o.E { - constructor(e) { - super(), this._transitionable = new o.t(Jo), this.setProjection(e), this._transitioning = this._transitionable.untransitioned(), this.recalculate(new o.F(0)), this._mercatorProjection = new yr, this._verticalPerspectiveProjection = new co - } - get transitionState() { - const e = this.properties.get("type"); - if (typeof e == "string" && e === "mercator") return 0; - if (typeof e == "string" && e === "vertical-perspective") return 1; - if (e instanceof o.bm) { - if (e.from === "vertical-perspective" && e.to === "mercator") return 1 - e.transition; - if (e.from === "mercator" && e.to === "vertical-perspective") return e.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(e) { - this._mercatorProjection.updateGPUdependent(e), this._verticalPerspectiveProjection.updateGPUdependent(e) - } - getMeshFromTileID(e, n, s, u, d) { - return this.currentProjection.getMeshFromTileID(e, n, s, u, d) - } - setProjection(e) { - this._transitionable.setValue("type", (e == null ? void 0 : e.type) || "mercator") - } - updateTransitions(e) { - this._transitioning = this._transitionable.transitioned(e, this._transitioning) - } - hasTransition() { - return this._transitioning.hasTransition() || this.currentProjection.hasTransition() - } - recalculate(e) { - this.properties = this._transitioning.possiblyEvaluate(e) - } - setErrorQueryLatitudeDegrees(e) { - this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(e), this._mercatorProjection.setErrorQueryLatitudeDegrees(e) - } - } - - function el(h) { - const e = Bs(h.worldSize, h.center.lat); - return 2 * Math.PI * e - } - - function va(h, e, n, s, u) { - const d = 1 / (1 << u), - m = e / o.$ * d + s * d, - y = o.bo((h / o.$ * d + n * d) * Math.PI * 2 + Math.PI, 2 * Math.PI), - w = 2 * Math.atan(Math.exp(Math.PI - m * Math.PI * 2)) - .5 * Math.PI, - P = Math.cos(w), - M = new Float64Array(3); - return M[0] = Math.sin(y) * P, M[1] = Math.sin(w), M[2] = Math.cos(y) * P, M - } - - function yn(h) { - return (function(e, n) { - const s = Math.cos(n), - u = new Float64Array(3); - return u[0] = Math.sin(e) * s, u[1] = Math.sin(n), u[2] = Math.cos(e) * s, u - })(h.lng * Math.PI / 180, h.lat * Math.PI / 180) - } - - function Bs(h, e) { - return h / (2 * Math.PI) / Math.cos(e * Math.PI / 180) - } - - function uo(h) { - const e = Math.asin(h[1]) / Math.PI * 180, - n = Math.sqrt(h[0] * h[0] + h[2] * h[2]); - if (n > 1e-6) { - const s = h[0] / n, - u = Math.acos(h[2] / n), - d = (s > 0 ? u : -u) / Math.PI * 180; - return new o.S(o.aO(d, -180, 180), e) - } - return new o.S(0, e) - } - - function fs(h) { - return Math.cos(h * Math.PI / 180) - } - - function Gi(h, e) { - const n = fs(h), - s = fs(e); - return o.ak(s / n) - } - - function _h(h, e) { - const n = h.rotate(e.bearingInRadians), - s = e.zoom + Gi(e.center.lat, 0), - u = o.bk(1 / fs(e.center.lat), 1 / fs(Math.min(Math.abs(e.center.lat), 60)), o.bn(s, 7, 3, 0, 1)), - d = 360 / el({ - worldSize: e.worldSize, - center: { - lat: e.center.lat - } - }); - return new o.S(e.center.lng - n.x * d * u, o.ah(e.center.lat + n.y * d, -o.ai, o.ai)) - } - - function ho(h) { - const e = .5 * h, - n = Math.sin(e), - s = Math.cos(e); - return Math.log(n + s) - Math.log(s - n) - } - - function _c(h, e, n, s) { - const u = h.lat + n * s; - if (Math.abs(n) > 1) { - const d = (Math.sign(h.lat + n) !== Math.sign(h.lat) ? -Math.abs(h.lat) : Math.abs(h.lat)) * Math.PI / 180, - m = Math.abs(h.lat + n) * Math.PI / 180, - y = ho(d + s * (m - d)), - w = ho(d), - P = ho(m); - return new o.S(h.lng + e * ((y - w) / (P - w)), u) - } - return new o.S(h.lng + e * s, u) - } - class Yd { - constructor(e) { - this._cachePrevious = new Map, this._cache = new Map, this._hadAnyChanges = !1, this._boundingVolumeFactory = e - } - swapBuffers() { - if (!this._hadAnyChanges) return; - const e = this._cachePrevious; - this._cachePrevious = this._cache, this._cache = e, this._cache.clear(), this._hadAnyChanges = !1 - } - getTileBoundingVolume(e, n, s, u) { - const d = `${e.z}_${e.x}_${e.y}_${u!=null&&u.terrain?"t":""}`, - m = this._cache.get(d); - if (m) return m; - const y = this._cachePrevious.get(d); - if (y) return this._cache.set(d, y), y; - const w = this._boundingVolumeFactory(e, n, s, u); - return this._cache.set(d, w), this._hadAnyChanges = !0, w - } - } - class Fs { - constructor(e, n, s, u) { - this.min = s, this.max = u, this.points = e, this.planes = n - } - static fromAabb(e, n) { - const s = []; - for (let u = 0; u < 8; u++) s.push([1 & ~u ? e[0] : n[0], (u >> 1 & 1) == 1 ? n[1] : e[1], (u >> 2 & 1) == 1 ? n[2] : e[2]]); - return new Fs(s, [ - [-1, 0, 0, n[0]], - [1, 0, 0, -e[0]], - [0, -1, 0, n[1]], - [0, 1, 0, -e[1]], - [0, 0, -1, n[2]], - [0, 0, 1, -e[2]] - ], e, n) - } - static fromCenterSizeAngles(e, n, s) { - const u = o.br([], s[0], s[1], s[2]), - d = o.bs([], [n[0], 0, 0], u), - m = o.bs([], [0, n[1], 0], u), - y = o.bs([], [0, 0, n[2]], u), - w = [...e], - P = [...e]; - for (let D = 0; D < 8; D++) - for (let z = 0; z < 3; z++) { - const B = e[z] + d[z] * (1 & ~D ? -1 : 1) + m[z] * ((D >> 1 & 1) == 1 ? 1 : -1) + y[z] * ((D >> 2 & 1) == 1 ? 1 : -1); - w[z] = Math.min(w[z], B), P[z] = Math.max(P[z], B) - } - const M = []; - for (let D = 0; D < 8; D++) { - const z = [...e]; - o.aS(z, z, o.aR([], d, 1 & ~D ? -1 : 1)), o.aS(z, z, o.aR([], m, (D >> 1 & 1) == 1 ? 1 : -1)), o.aS(z, z, o.aR([], y, (D >> 2 & 1) == 1 ? 1 : -1)), M.push(z) - } - return new Fs(M, [ - [...d, -o.aX(d, M[0])], - [...m, -o.aX(m, M[0])], - [...y, -o.aX(y, M[0])], - [-d[0], -d[1], -d[2], -o.aX(d, M[7])], - [-m[0], -m[1], -m[2], -o.aX(m, M[7])], - [-y[0], -y[1], -y[2], -o.aX(y, M[7])] - ], w, P) - } - intersectsFrustum(e) { - let n = !0; - const s = this.points.length, - u = this.planes.length, - d = e.planes.length, - m = e.points.length; - for (let y = 0; y < d; y++) { - const w = e.planes[y]; - let P = 0; - for (let M = 0; M < s; M++) { - const D = this.points[M]; - w[0] * D[0] + w[1] * D[1] + w[2] * D[2] + w[3] >= 0 && P++ - } - if (P === 0) return 0; - P < s && (n = !1) - } - if (n) return 2; - for (let y = 0; y < u; y++) { - const w = this.planes[y]; - let P = 0; - for (let M = 0; M < m; M++) { - const D = e.points[M]; - w[0] * D[0] + w[1] * D[1] + w[2] * D[2] + w[3] >= 0 && P++ - } - if (P === 0) return 0 - } - return 1 - } - intersectsPlane(e) { - const n = this.points.length; - let s = 0; - for (let u = 0; u < n; u++) { - const d = this.points[u]; - e[0] * d[0] + e[1] * d[1] + e[2] * d[2] + e[3] >= 0 && s++ - } - return s === n ? 2 : s === 0 ? 0 : 1 - } - } - - function In(h, e, n) { - const s = h - e; - return s < 0 ? -s : Math.max(0, s - n) - } - - function po(h, e, n, s, u) { - const d = h - n; - let m; - return m = d < 0 ? Math.min(-d, 1 + d - u) : d > 1 ? Math.min(Math.max(d - u, 0), 1 - d) : 0, Math.max(m, In(e, s, u)) - } - class Fa { - constructor() { - this._boundingVolumeCache = new Yd(this._computeTileBoundingVolume) - } - prepareNextFrame() { - this._boundingVolumeCache.swapBuffers() - } - distanceToTile2d(e, n, s, u) { - const d = 1 << s.z, - m = 1 / d, - y = s.x / d, - w = s.y / d; - let P = 2; - return P = Math.min(P, po(e, n, y, w, m)), P = Math.min(P, po(e, n, y + .5, -w - m, m)), P = Math.min(P, po(e, n, y + .5, 2 - w - m, m)), P - } - getWrap(e, n, s) { - const u = 1 << n.z, - d = 1 / u, - m = n.x / u, - y = In(e.x, m, d), - w = In(e.x, m - 1, d), - P = In(e.x, m + 1, d), - M = Math.min(y, w, P); - return M === P ? 1 : M === w ? -1 : 0 - } - allowVariableZoom(e, n) { - return Ot(e, n) > 4 - } - allowWorldCopies() { - return !1 - } - getTileBoundingVolume(e, n, s, u) { - return this._boundingVolumeCache.getTileBoundingVolume(e, n, s, u) - } - _computeTileBoundingVolume(e, n, s, u) { - var d, m; - let y = 0, - w = 0; - if (u != null && u.terrain) { - const P = new o.Z(e.z, n, e.z, e.x, e.y), - M = u.terrain.getMinMaxElevation(P); - y = (d = M.minElevation) !== null && d !== void 0 ? d : Math.min(0, s), w = (m = M.maxElevation) !== null && m !== void 0 ? m : Math.max(0, s) - } - if (y /= o.bu, w /= o.bu, y += 1, w += 1, e.z <= 0) return Fs.fromAabb([-w, -w, -w], [w, w, w]); - if (e.z === 1) return Fs.fromAabb([e.x === 0 ? -w : 0, e.y === 0 ? 0 : -w, -w], [e.x === 0 ? 0 : w, e.y === 0 ? w : 0, w]); - { - const P = [va(0, 0, e.x, e.y, e.z), va(o.$, 0, e.x, e.y, e.z), va(o.$, o.$, e.x, e.y, e.z), va(0, o.$, e.x, e.y, e.z)], - M = []; - for (const qe of P) M.push(o.aR([], qe, w)); - if (w !== y) - for (const qe of P) M.push(o.aR([], qe, y)); - e.y === 0 && M.push([0, 1, 0]), e.y === (1 << e.z) - 1 && M.push([0, -1, 0]); - const D = [1, 1, 1], - z = [-1, -1, -1]; - for (const qe of M) - for (let $e = 0; $e < 3; $e++) D[$e] = Math.min(D[$e], qe[$e]), z[$e] = Math.max(z[$e], qe[$e]); - const B = va(o.$ / 2, o.$ / 2, e.x, e.y, e.z), - U = o.aW([], [0, 1, 0], B); - o.aV(U, U); - const ee = o.aW([], B, U); - o.aV(ee, ee); - const J = o.aW([], P[2], P[1]); - o.aV(J, J); - const re = o.aW([], P[0], P[3]); - o.aV(re, re), M.push(o.aR([], B, w)), e.y >= (1 << e.z) / 2 && M.push(o.aR([], va(o.$ / 2, 0, e.x, e.y, e.z), w)), e.y < (1 << e.z) / 2 && M.push(o.aR([], va(o.$ / 2, o.$, e.x, e.y, e.z), w)); - const se = fo(B, M), - de = fo(ee, M), - ue = [-B[0], -B[1], -B[2], se.max], - ge = [B[0], B[1], B[2], -se.min], - Te = [-ee[0], -ee[1], -ee[2], de.max], - he = [ee[0], ee[1], ee[2], -de.min], - De = [...J, 0], - He = [...re, 0], - je = []; - return e.y === 0 ? je.push(o.bt(He, De, ue), o.bt(He, De, ge)) : je.push(o.bt(Te, De, ue), o.bt(Te, De, ge), o.bt(Te, He, ue), o.bt(Te, He, ge)), e.y === (1 << e.z) - 1 ? je.push(o.bt(He, De, ue), o.bt(He, De, ge)) : je.push(o.bt(he, De, ue), o.bt(he, De, ge), o.bt(he, He, ue), o.bt(he, He, ge)), new Fs(je, [ue, ge, Te, he, De, He], D, z) - } - } - } - - function fo(h, e) { - let n = 1 / 0, - s = -1 / 0; - for (const u of e) { - const d = o.aX(h, u); - n = Math.min(n, d), s = Math.max(s, d) - } - return { - min: n, - max: s - } - } - class mo { - 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(e) { - this._helper.setMinZoom(e) - } - setMaxZoom(e) { - this._helper.setMaxZoom(e) - } - setMinPitch(e) { - this._helper.setMinPitch(e) - } - setMaxPitch(e) { - this._helper.setMaxPitch(e) - } - setRenderWorldCopies(e) { - this._helper.setRenderWorldCopies(e) - } - setBearing(e) { - this._helper.setBearing(e) - } - setPitch(e) { - this._helper.setPitch(e) - } - setRoll(e) { - this._helper.setRoll(e) - } - setFov(e) { - this._helper.setFov(e) - } - setZoom(e) { - this._helper.setZoom(e) - } - setCenter(e) { - this._helper.setCenter(e) - } - setElevation(e) { - this._helper.setElevation(e) - } - setMinElevationForCurrentTile(e) { - this._helper.setMinElevationForCurrentTile(e) - } - setPadding(e) { - this._helper.setPadding(e) - } - interpolatePadding(e, n, s) { - return this._helper.interpolatePadding(e, n, s) - } - isPaddingEqual(e) { - return this._helper.isPaddingEqual(e) - } - resize(e, n) { - this._helper.resize(e, n) - } - getMaxBounds() { - return this._helper.getMaxBounds() - } - setMaxBounds(e) { - this._helper.setMaxBounds(e) - } - overrideNearFarZ(e, n) { - this._helper.overrideNearFarZ(e, n) - } - clearNearFarZOverride() { - this._helper.clearNearFarZOverride() - } - getCameraQueryGeometry(e) { - return this._helper.getCameraQueryGeometry(this.getCameraPoint(), e) - } - 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 nearZ() { - return this._helper.nearZ - } - get farZ() { - return this._helper.farZ - } - get autoCalculateNearFarZ() { - return this._helper.autoCalculateNearFarZ - } - setTransitionState(e) {} - constructor() { - this._cachedClippingPlane = o.bv(), this._projectionMatrix = o.b9(), this._globeViewProjMatrix32f = o.b8(), this._globeViewProjMatrixNoCorrection = o.b9(), this._globeViewProjMatrixNoCorrectionInverted = o.b9(), this._globeProjMatrixInverted = o.b9(), this._cameraPosition = o.bp(), this._globeLatitudeErrorCorrectionRadians = 0, this._helper = new ln({ - calcMatrices: () => { - this._calcMatrices() - }, - getConstrained: (e, n) => this.getConstrained(e, n) - }), this._coveringTilesDetailsProvider = new Fa - } - clone() { - const e = new mo; - return e.apply(this), e - } - apply(e, n) { - this._globeLatitudeErrorCorrectionRadians = n || 0, this._helper.apply(e) - } - get projectionMatrix() { - return this._projectionMatrix - } - get modelViewProjectionMatrix() { - return this._globeViewProjMatrixNoCorrection - } - get inverseProjectionMatrix() { - return this._globeProjMatrixInverted - } - get cameraPosition() { - const e = o.bp(); - return e[0] = this._cameraPosition[0], e[1] = this._cameraPosition[1], e[2] = this._cameraPosition[2], e - } - get cameraToCenterDistance() { - return this._helper.cameraToCenterDistance - } - getProjectionData(e) { - const { - overscaledTileID: n, - applyGlobeMatrix: s - } = e, u = this._helper.getMercatorTileCoordinates(n); - return { - mainMatrix: this._globeViewProjMatrix32f, - tileMercatorCoords: u, - clippingPlane: this._cachedClippingPlane, - projectionTransition: s ? 1 : 0, - fallbackMatrix: this._globeViewProjMatrix32f - } - } - _computeClippingPlane(e) { - const n = this.pitchInRadians, - s = this.cameraToCenterDistance / e, - u = Math.sin(n) * s, - d = Math.cos(n) * s + 1, - m = 1 / Math.sqrt(u * u + d * d) * 1; - let y = -u, - w = d; - const P = Math.sqrt(y * y + w * w); - y /= P, w /= P; - const M = [0, y, w]; - o.bw(M, M, [0, 0, 0], -this.bearingInRadians), o.bx(M, M, [0, 0, 0], -1 * this.center.lat * Math.PI / 180), o.by(M, M, [0, 0, 0], this.center.lng * Math.PI / 180); - const D = 1 / o.aZ(M); - return o.aR(M, M, D), [...M, -m * D] - } - isLocationOccluded(e) { - return !this.isSurfacePointVisible(yn(e)) - } - transformLightDirection(e) { - const n = this._helper._center.lng * Math.PI / 180, - s = this._helper._center.lat * Math.PI / 180, - u = Math.cos(s), - d = [Math.sin(n) * u, Math.sin(s), Math.cos(n) * u], - m = [d[2], 0, -d[0]], - y = [0, 0, 0]; - o.aW(y, m, d), o.aV(m, m), o.aV(y, y); - const w = [0, 0, 0]; - return o.aV(w, [m[0] * e[0] + y[0] * e[1] + d[0] * e[2], m[1] * e[0] + y[1] * e[1] + d[1] * e[2], m[2] * e[0] + y[2] * e[1] + d[2] * e[2]]), w - } - getPixelScale() { - return 1 / Math.cos(this._helper._center.lat * Math.PI / 180) - } - getCircleRadiusCorrection() { - return Math.cos(this._helper._center.lat * Math.PI / 180) - } - getPitchedTextCorrection(e, n, s) { - const u = (function(y, w, P) { - const M = 1 / (1 << P.z); - return new o.a1(y / o.$ * M + P.x * M, w / o.$ * M + P.y * M) - })(e, n, s.canonical), - d = (m = u.y, [o.bo(u.x * Math.PI * 2 + Math.PI, 2 * Math.PI), 2 * Math.atan(Math.exp(Math.PI - m * Math.PI * 2)) - .5 * Math.PI]); - var m; - return this.getCircleRadiusCorrection() / Math.cos(d[1]) - } - projectTileCoordinates(e, n, s, u) { - const d = s.canonical, - m = va(e, n, d.x, d.y, d.z), - y = 1 + (u ? u(e, n) : 0) / o.bu, - w = [m[0] * y, m[1] * y, m[2] * y, 1]; - o.aw(w, w, this._globeViewProjMatrixNoCorrection); - const P = this._cachedClippingPlane, - M = P[0] * m[0] + P[1] * m[1] + P[2] * m[2] + P[3] < 0; - return { - point: new o.P(w[0] / w[3], w[1] / w[3]), - signedDistanceFromCamera: w[3], - isOccluded: M - } - } - _calcMatrices() { - if (!this._helper._width || !this._helper._height) return; - const e = Bs(this.worldSize, this.center.lat), - n = o.ba(), - s = o.ba(); - this._helper.autoCalculateNearFarZ && (this._helper._nearZ = .5, this._helper._farZ = this.cameraToCenterDistance + 2 * e), o.b4(n, this.fovInRadians, this.width / this.height, this._helper._nearZ, this._helper._farZ); - const u = this.centerOffset; - n[8] = 2 * -u.x / this._helper._width, n[9] = 2 * u.y / this._helper._height, this._projectionMatrix = o.b5(n), this._globeProjMatrixInverted = o.ba(), o.aq(this._globeProjMatrixInverted, n), o.M(n, n, [0, 0, -this.cameraToCenterDistance]), o.b6(n, n, this.rollInRadians), o.b7(n, n, -this.pitchInRadians), o.b6(n, n, this.bearingInRadians), o.M(n, n, [0, 0, -e]); - const d = o.bp(); - d[0] = e, d[1] = e, d[2] = e, o.b7(s, n, this.center.lat * Math.PI / 180), o.bz(s, s, -this.center.lng * Math.PI / 180), o.N(s, s, d), this._globeViewProjMatrixNoCorrection = s, o.b7(n, n, this.center.lat * Math.PI / 180 - this._globeLatitudeErrorCorrectionRadians), o.bz(n, n, -this.center.lng * Math.PI / 180), o.N(n, n, d), this._globeViewProjMatrix32f = new Float32Array(n), this._globeViewProjMatrixNoCorrectionInverted = o.ba(), o.aq(this._globeViewProjMatrixNoCorrectionInverted, s); - const m = o.bp(); - this._cameraPosition = o.bp(), this._cameraPosition[2] = this.cameraToCenterDistance / e, o.bw(this._cameraPosition, this._cameraPosition, m, -this.rollInRadians), o.bx(this._cameraPosition, this._cameraPosition, m, this.pitchInRadians), o.bw(this._cameraPosition, this._cameraPosition, m, -this.bearingInRadians), o.aS(this._cameraPosition, this._cameraPosition, [0, 0, 1]), o.bx(this._cameraPosition, this._cameraPosition, m, -this.center.lat * Math.PI / 180), o.by(this._cameraPosition, this._cameraPosition, m, this.center.lng * Math.PI / 180), this._cachedClippingPlane = this._computeClippingPlane(e); - const y = o.b5(this._globeViewProjMatrixNoCorrectionInverted); - o.N(y, y, [1, 1, -1]), this._cachedFrustum = Ni.fromInvProjectionMatrix(y, 1, 0, this._cachedClippingPlane, !0) - } - calculateFogMatrix(e) { - o.w("calculateFogMatrix is not supported on globe projection."); - const n = o.ba(); - return o.ag(n), n - } - getVisibleUnwrappedCoordinates(e) { - return [new o.b2(0, e)] - } - getCameraFrustum() { - return this._cachedFrustum - } - getClippingPlane() { - return this._cachedClippingPlane - } - getCoveringTilesDetailsProvider() { - return this._coveringTilesDetailsProvider - } - recalculateZoomAndCenter(e) { - e && o.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(e, n) { - if (!this._globeViewProjMatrixNoCorrection) return 1; - const s = yn(e); - o.aR(s, s, 1 + n / o.bu); - const u = o.bv(); - return o.aw(u, [s[0], s[1], s[2], 1], this._globeViewProjMatrixNoCorrection), u[2] / u[3] - } - populateCache(e) {} - getBounds() { - const e = .5 * this.width, - n = .5 * this.height, - s = [new o.P(0, 0), new o.P(e, 0), new o.P(this.width, 0), new o.P(this.width, n), new o.P(this.width, this.height), new o.P(e, this.height), new o.P(0, this.height), new o.P(0, n)], - u = []; - for (const D of s) u.push(this.unprojectScreenPoint(D)); - let d = 0, - m = 0, - y = 0, - w = 0; - const P = this.center; - for (const D of u) { - const z = o.bA(P.lng, D.lng), - B = o.bA(P.lat, D.lat); - z < m && (m = z), z > d && (d = z), B < w && (w = B), B > y && (y = B) - } - const M = [P.lng + m, P.lat + w, P.lng + d, P.lat + y]; - return this.isSurfacePointOnScreen([0, 1, 0]) && (M[3] = 90, M[0] = -180, M[2] = 180), this.isSurfacePointOnScreen([0, -1, 0]) && (M[1] = -90, M[0] = -180, M[2] = 180), new dt(M) - } - getConstrained(e, n) { - const s = o.ah(e.lat, -o.ai, o.ai), - u = o.ah(+n, this.minZoom + Gi(0, s), this.maxZoom); - return { - center: new o.S(e.lng, s), - zoom: u - } - } - calculateCenterFromCameraLngLatAlt(e, n, s, u) { - return this._helper.calculateCenterFromCameraLngLatAlt(e, n, s, u) - } - setLocationAtPoint(e, n) { - const s = yn(this.unprojectScreenPoint(n)), - u = yn(e), - d = o.bp(); - o.bB(d); - const m = o.bp(); - o.by(m, s, d, -this.center.lng * Math.PI / 180), o.bx(m, m, d, this.center.lat * Math.PI / 180); - const y = u[0] * u[0] + u[2] * u[2], - w = m[0] * m[0]; - if (y < w) return; - const P = Math.sqrt(y - w), - M = -P, - D = o.bC(u[0], u[2], m[0], P), - z = o.bC(u[0], u[2], m[0], M), - B = o.bp(); - o.by(B, u, d, -D); - const U = o.bC(B[1], B[2], m[1], m[2]), - ee = o.bp(); - o.by(ee, u, d, -z); - const J = o.bC(ee[1], ee[2], m[1], m[2]), - re = .5 * Math.PI, - se = U >= -re && U <= re, - de = J >= -re && J <= re; - let ue, ge; - if (se && de) { - const He = this.center.lng * Math.PI / 180, - je = this.center.lat * Math.PI / 180; - o.bD(D, He) + o.bD(U, je) < o.bD(z, He) + o.bD(J, je) ? (ue = D, ge = U) : (ue = z, ge = J) - } else if (se) ue = D, ge = U; - else { - if (!de) return; - ue = z, ge = J - } - const Te = ue / Math.PI * 180, - he = ge / Math.PI * 180, - De = this.center.lat; - this.setCenter(new o.S(Te, o.ah(he, -90, 90))), this.setZoom(this.zoom + Gi(De, this.center.lat)) - } - locationToScreenPoint(e, n) { - const s = yn(e); - if (n) { - const u = n.getElevationForLngLatZoom(e, this._helper._tileZoom); - o.aR(s, s, 1 + u / o.bu) - } - return this._projectSurfacePointToScreen(s) - } - _projectSurfacePointToScreen(e) { - const n = o.bv(); - return o.aw(n, [...e, 1], this._globeViewProjMatrixNoCorrection), n[0] /= n[3], n[1] /= n[3], new o.P((.5 * n[0] + .5) * this.width, (.5 * -n[1] + .5) * this.height) - } - screenPointToMercatorCoordinate(e, n) { - if (n) { - const s = n.pointCoordinate(e); - if (s) return s - } - return o.a1.fromLngLat(this.unprojectScreenPoint(e)) - } - screenPointToLocation(e, n) { - var s; - return (s = this.screenPointToMercatorCoordinate(e, n)) === null || s === void 0 ? void 0 : s.toLngLat() - } - isPointOnMapSurface(e, n) { - const s = this._cameraPosition, - u = this.getRayDirectionFromPixel(e); - return !!this.rayPlanetIntersection(s, u) - } - getRayDirectionFromPixel(e) { - const n = o.bv(); - n[0] = e.x / this.width * 2 - 1, n[1] = -1 * (e.y / this.height * 2 - 1), n[2] = 1, n[3] = 1, o.aw(n, n, this._globeViewProjMatrixNoCorrectionInverted), n[0] /= n[3], n[1] /= n[3], n[2] /= n[3]; - const s = o.bp(); - s[0] = n[0] - this._cameraPosition[0], s[1] = n[1] - this._cameraPosition[1], s[2] = n[2] - this._cameraPosition[2]; - const u = o.bp(); - return o.aV(u, s), u - } - isSurfacePointVisible(e) { - const n = this._cachedClippingPlane; - return n[0] * e[0] + n[1] * e[1] + n[2] * e[2] + n[3] >= 0 - } - isSurfacePointOnScreen(e) { - if (!this.isSurfacePointVisible(e)) return !1; - const n = o.bv(); - return o.aw(n, [...e, 1], this._globeViewProjMatrixNoCorrection), n[0] /= n[3], n[1] /= n[3], n[2] /= n[3], n[0] > -1 && n[0] < 1 && n[1] > -1 && n[1] < 1 && n[2] > -1 && n[2] < 1 - } - rayPlanetIntersection(e, n) { - const s = o.aX(e, n), - u = o.bp(), - d = o.bp(); - o.aR(d, n, s), o.aU(u, e, d); - const m = 1 - o.aX(u, u); - if (m < 0) return null; - const y = o.aX(e, e) - 1, - w = -s + (s < 0 ? 1 : -1) * Math.sqrt(m), - P = y / w, - M = w; - return { - tMin: Math.min(P, M), - tMax: Math.max(P, M) - } - } - unprojectScreenPoint(e) { - const n = this._cameraPosition, - s = this.getRayDirectionFromPixel(e), - u = this.rayPlanetIntersection(n, s); - if (u) { - const M = o.bp(); - o.aS(M, n, [s[0] * u.tMin, s[1] * u.tMin, s[2] * u.tMin]); - const D = o.bp(); - return o.aV(D, M), uo(D) - } - const d = this._cachedClippingPlane, - m = d[0] * s[0] + d[1] * s[1] + d[2] * s[2], - y = -o.b1(d, n) / m, - w = o.bp(); - if (y > 0) o.aS(w, n, [s[0] * y, s[1] * y, s[2] * y]); - else { - const M = o.bp(); - o.aS(M, n, [2 * s[0], 2 * s[1], 2 * s[2]]); - const D = o.b1(this._cachedClippingPlane, M); - o.aU(w, M, [this._cachedClippingPlane[0] * D, this._cachedClippingPlane[1] * D, this._cachedClippingPlane[2] * D]) - } - const P = (function(M) { - const D = o.bp(); - return D[0] = M[0] * -M[3], D[1] = M[1] * -M[3], D[2] = M[2] * -M[3], { - center: D, - radius: Math.sqrt(1 - M[3] * M[3]) - } - })(d); - return uo((function(M, D, z) { - const B = o.bp(); - o.aU(B, z, M); - const U = o.bp(); - return o.bq(U, M, B, D / o.a$(B)), U - })(P.center, P.radius, w)) - } - getMatrixForModel(e, n) { - const s = o.S.convert(e), - u = 1 / o.bu, - d = o.b9(); - return o.bz(d, d, s.lng / 180 * Math.PI), o.b7(d, d, -s.lat / 180 * Math.PI), o.M(d, d, [0, 0, 1 + n / o.bu]), o.b7(d, d, .5 * Math.PI), o.N(d, d, [u, u, u]), d - } - getProjectionDataForCustomLayer(e = !0) { - const n = this.getProjectionData({ - overscaledTileID: new o.Z(0, 0, 0, 0, 0), - applyGlobeMatrix: e - }); - return n.tileMercatorCoords = [0, 0, 1, 1], n - } - getFastPathSimpleProjectionMatrix(e) {} - } - class _o { - 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(e) { - this._helper.setMinZoom(e) - } - setMaxZoom(e) { - this._helper.setMaxZoom(e) - } - setMinPitch(e) { - this._helper.setMinPitch(e) - } - setMaxPitch(e) { - this._helper.setMaxPitch(e) - } - setRenderWorldCopies(e) { - this._helper.setRenderWorldCopies(e) - } - setBearing(e) { - this._helper.setBearing(e) - } - setPitch(e) { - this._helper.setPitch(e) - } - setRoll(e) { - this._helper.setRoll(e) - } - setFov(e) { - this._helper.setFov(e) - } - setZoom(e) { - this._helper.setZoom(e) - } - setCenter(e) { - this._helper.setCenter(e) - } - setElevation(e) { - this._helper.setElevation(e) - } - setMinElevationForCurrentTile(e) { - this._helper.setMinElevationForCurrentTile(e) - } - setPadding(e) { - this._helper.setPadding(e) - } - interpolatePadding(e, n, s) { - return this._helper.interpolatePadding(e, n, s) - } - isPaddingEqual(e) { - return this._helper.isPaddingEqual(e) - } - resize(e, n, s = !0) { - this._helper.resize(e, n, s) - } - getMaxBounds() { - return this._helper.getMaxBounds() - } - setMaxBounds(e) { - this._helper.setMaxBounds(e) - } - overrideNearFarZ(e, n) { - this._helper.overrideNearFarZ(e, n) - } - clearNearFarZOverride() { - this._helper.clearNearFarZOverride() - } - getCameraQueryGeometry(e) { - return this._helper.getCameraQueryGeometry(this.getCameraPoint(), e) - } - 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 nearZ() { - return this._helper.nearZ - } - get farZ() { - return this._helper.farZ - } - get autoCalculateNearFarZ() { - return this._helper.autoCalculateNearFarZ - } - get isGlobeRendering() { - return this._globeness > 0 - } - setTransitionState(e, n) { - this._globeness = e, this._globeLatitudeErrorCorrectionRadians = n, this._calcMatrices(), this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(), this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame() - } - get currentTransform() { - return this.isGlobeRendering ? this._verticalPerspectiveTransform : this._mercatorTransform - } - constructor() { - this._globeLatitudeErrorCorrectionRadians = 0, this._globeness = 1, this._helper = new ln({ - calcMatrices: () => { - this._calcMatrices() - }, - getConstrained: (e, n) => this.getConstrained(e, n) - }), this._globeness = 1, this._mercatorTransform = new wi, this._verticalPerspectiveTransform = new mo - } - clone() { - const e = new _o; - return e._globeness = this._globeness, e._globeLatitudeErrorCorrectionRadians = this._globeLatitudeErrorCorrectionRadians, e.apply(this), e - } - apply(e) { - this._helper.apply(e), this._mercatorTransform.apply(this), this._verticalPerspectiveTransform.apply(this, 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(e) { - const n = this._mercatorTransform.getProjectionData(e), - s = this._verticalPerspectiveTransform.getProjectionData(e); - return { - mainMatrix: this.isGlobeRendering ? s.mainMatrix : n.mainMatrix, - clippingPlane: s.clippingPlane, - tileMercatorCoords: s.tileMercatorCoords, - projectionTransition: e.applyGlobeMatrix ? this._globeness : 0, - fallbackMatrix: n.fallbackMatrix - } - } - isLocationOccluded(e) { - return this.currentTransform.isLocationOccluded(e) - } - transformLightDirection(e) { - return this.currentTransform.transformLightDirection(e) - } - getPixelScale() { - return o.bk(this._mercatorTransform.getPixelScale(), this._verticalPerspectiveTransform.getPixelScale(), this._globeness) - } - getCircleRadiusCorrection() { - return o.bk(this._mercatorTransform.getCircleRadiusCorrection(), this._verticalPerspectiveTransform.getCircleRadiusCorrection(), this._globeness) - } - getPitchedTextCorrection(e, n, s) { - const u = this._mercatorTransform.getPitchedTextCorrection(e, n, s), - d = this._verticalPerspectiveTransform.getPitchedTextCorrection(e, n, s); - return o.bk(u, d, this._globeness) - } - projectTileCoordinates(e, n, s, u) { - return this.currentTransform.projectTileCoordinates(e, n, s, u) - } - _calcMatrices() { - this._helper._width && this._helper._height && (this._verticalPerspectiveTransform.apply(this, 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(e) { - return this.currentTransform.calculateFogMatrix(e) - } - getVisibleUnwrappedCoordinates(e) { - return this.currentTransform.getVisibleUnwrappedCoordinates(e) - } - getCameraFrustum() { - return this.currentTransform.getCameraFrustum() - } - getClippingPlane() { - return this.currentTransform.getClippingPlane() - } - getCoveringTilesDetailsProvider() { - return this.currentTransform.getCoveringTilesDetailsProvider() - } - recalculateZoomAndCenter(e) { - this._mercatorTransform.recalculateZoomAndCenter(e), this._verticalPerspectiveTransform.recalculateZoomAndCenter(e) - } - maxPitchScaleFactor() { - return this._mercatorTransform.maxPitchScaleFactor() - } - getCameraPoint() { - return this._helper.getCameraPoint() - } - getCameraAltitude() { - return this._helper.getCameraAltitude() - } - getCameraLngLat() { - return this._helper.getCameraLngLat() - } - lngLatToCameraDepth(e, n) { - return this.currentTransform.lngLatToCameraDepth(e, n) - } - populateCache(e) { - this._mercatorTransform.populateCache(e), this._verticalPerspectiveTransform.populateCache(e) - } - getBounds() { - return this.currentTransform.getBounds() - } - getConstrained(e, n) { - return this.currentTransform.getConstrained(e, n) - } - calculateCenterFromCameraLngLatAlt(e, n, s, u) { - return this._helper.calculateCenterFromCameraLngLatAlt(e, n, s, u) - } - setLocationAtPoint(e, n) { - if (!this.isGlobeRendering) return this._mercatorTransform.setLocationAtPoint(e, n), void this.apply(this._mercatorTransform); - this._verticalPerspectiveTransform.setLocationAtPoint(e, n), this.apply(this._verticalPerspectiveTransform) - } - locationToScreenPoint(e, n) { - return this.currentTransform.locationToScreenPoint(e, n) - } - screenPointToMercatorCoordinate(e, n) { - return this.currentTransform.screenPointToMercatorCoordinate(e, n) - } - screenPointToLocation(e, n) { - return this.currentTransform.screenPointToLocation(e, n) - } - isPointOnMapSurface(e, n) { - return this.currentTransform.isPointOnMapSurface(e, n) - } - getRayDirectionFromPixel(e) { - return this._verticalPerspectiveTransform.getRayDirectionFromPixel(e) - } - getMatrixForModel(e, n) { - return this.currentTransform.getMatrixForModel(e, n) - } - getProjectionDataForCustomLayer(e = !0) { - const n = this._mercatorTransform.getProjectionDataForCustomLayer(e); - if (!this.isGlobeRendering) return n; - const s = this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(e); - return s.fallbackMatrix = n.mainMatrix, s - } - getFastPathSimpleProjectionMatrix(e) { - return this.currentTransform.getFastPathSimpleProjectionMatrix(e) - } - } - class Dn { - get useGlobeControls() { - return !0 - } - handlePanInertia(e, n) { - const s = _h(e, n); - return Math.abs(s.lng - n.center.lng) > 180 && (s.lng = n.center.lng + 179.5 * Math.sign(s.lng - n.center.lng)), { - easingCenter: s, - easingOffset: new o.P(0, 0) - } - } - handleMapControlsRollPitchBearingZoom(e, n) { - const s = e.around, - u = n.screenPointToLocation(s); - e.bearingDelta && n.setBearing(n.bearing + e.bearingDelta), e.pitchDelta && n.setPitch(n.pitch + e.pitchDelta), e.rollDelta && n.setRoll(n.roll + e.rollDelta); - const d = n.zoom; - e.zoomDelta && n.setZoom(n.zoom + e.zoomDelta); - const m = n.zoom - d; - if (m === 0) return; - const y = o.bA(n.center.lng, u.lng), - w = y / (Math.abs(y / 180) + 1), - P = o.bA(n.center.lat, u.lat), - M = n.getRayDirectionFromPixel(s), - D = n.cameraPosition, - z = -1 * o.aX(D, M), - B = o.bp(); - o.aS(B, D, [M[0] * z, M[1] * z, M[2] * z]); - const U = o.aZ(B) - 1, - ee = Math.exp(.5 * -Math.max(U - .3, 0)), - J = Bs(n.worldSize, n.center.lat) / Math.min(n.width, n.height), - re = o.bn(J, .9, .5, 1, .25), - se = (1 - o.af(-m)) * Math.min(ee, re), - de = n.center.lat, - ue = n.zoom, - ge = new o.S(n.center.lng + w * se, o.ah(n.center.lat + P * se, -o.ai, o.ai)); - n.setLocationAtPoint(u, s); - const Te = n.center, - he = o.bn(Math.abs(y), 45, 85, 0, 1), - De = o.bn(J, .75, .35, 0, 1), - He = Math.pow(Math.max(he, De), .25), - je = o.bA(Te.lng, ge.lng), - qe = o.bA(Te.lat, ge.lat); - n.setCenter(new o.S(Te.lng + je * He, Te.lat + qe * He).wrap()), n.setZoom(ue + Gi(de, n.center.lat)) - } - handleMapControlsPan(e, n, s) { - if (!e.panDelta) return; - const u = n.center.lat, - d = n.zoom; - n.setCenter(_h(e.panDelta, n).wrap()), n.setZoom(d + Gi(u, n.center.lat)) - } - cameraForBoxAndBearing(e, n, s, u, d) { - const m = Nn(e, n, s, u, d), - y = n.left / d.width * 2 - 1, - w = (d.width - n.right) / d.width * 2 - 1, - P = n.top / d.height * -2 + 1, - M = (d.height - n.bottom) / d.height * -2 + 1, - D = o.bA(s.getWest(), s.getEast()) < 0, - z = D ? s.getEast() : s.getWest(), - B = D ? s.getWest() : s.getEast(), - U = Math.max(s.getNorth(), s.getSouth()), - ee = Math.min(s.getNorth(), s.getSouth()), - J = z + .5 * o.bA(z, B), - re = U + .5 * o.bA(U, ee), - se = d.clone(); - se.setCenter(m.center), se.setBearing(m.bearing), se.setPitch(0), se.setRoll(0), se.setZoom(m.zoom); - const de = se.modelViewProjectionMatrix, - ue = [yn(s.getNorthWest()), yn(s.getNorthEast()), yn(s.getSouthWest()), yn(s.getSouthEast()), yn(new o.S(B, re)), yn(new o.S(z, re)), yn(new o.S(J, U)), yn(new o.S(J, ee))], - ge = yn(m.center); - let Te = Number.POSITIVE_INFINITY; - for (const he of ue) y < 0 && (Te = Dn.getLesserNonNegativeNonNull(Te, Dn.solveVectorScale(he, ge, de, "x", y))), w > 0 && (Te = Dn.getLesserNonNegativeNonNull(Te, Dn.solveVectorScale(he, ge, de, "x", w))), P > 0 && (Te = Dn.getLesserNonNegativeNonNull(Te, Dn.solveVectorScale(he, ge, de, "y", P))), M < 0 && (Te = Dn.getLesserNonNegativeNonNull(Te, Dn.solveVectorScale(he, ge, de, "y", M))); - if (Number.isFinite(Te) && Te !== 0) return m.zoom = se.zoom + o.ak(Te), m; - Ko() - } - handleJumpToCenterZoom(e, n) { - const s = e.center.lat, - u = e.getConstrained(n.center ? o.S.convert(n.center) : e.center, e.zoom).center; - e.setCenter(u.wrap()); - const d = n.zoom !== void 0 ? +n.zoom : e.zoom + Gi(s, u.lat); - e.zoom !== d && e.setZoom(d) - } - handleEaseTo(e, n) { - const s = e.zoom, - u = e.center, - d = e.padding, - m = { - roll: e.roll, - pitch: e.pitch, - bearing: e.bearing - }, - y = { - roll: n.roll === void 0 ? e.roll : n.roll, - pitch: n.pitch === void 0 ? e.pitch : n.pitch, - bearing: n.bearing === void 0 ? e.bearing : n.bearing - }, - w = n.zoom !== void 0, - P = !e.isPaddingEqual(n.padding); - let M = !1; - const D = n.center ? o.S.convert(n.center) : u, - z = e.getConstrained(D, s).center; - vn(e, z); - const B = e.clone(); - B.setCenter(z), B.setZoom(w ? +n.zoom : s + Gi(u.lat, D.lat)), B.setBearing(n.bearing); - const U = new o.P(o.ah(e.centerPoint.x + n.offsetAsPoint.x, 0, e.width), o.ah(e.centerPoint.y + n.offsetAsPoint.y, 0, e.height)); - B.setLocationAtPoint(z, U); - const ee = (n.offset && n.offsetAsPoint.mag()) > 0 ? B.center : z, - J = w ? +n.zoom : s + Gi(u.lat, ee.lat), - re = s + Gi(u.lat, 0), - se = J + Gi(ee.lat, 0), - de = o.bA(u.lng, ee.lng), - ue = o.bA(u.lat, ee.lat), - ge = o.af(se - re); - return M = J !== s, { - easeFunc: Te => { - if (o.be(m, y) || un({ - startEulerAngles: m, - endEulerAngles: y, - tr: e, - k: Te, - useSlerp: m.roll != y.roll - }), P && e.interpolatePadding(d, n.padding, Te), n.around) o.w("Easing around a point is not supported under globe projection."), e.setLocationAtPoint(n.around, n.aroundPoint); - else { - const he = se > re ? Math.min(2, ge) : Math.max(.5, ge), - De = Math.pow(he, 1 - Te), - He = _c(u, de, ue, Te * De); - e.setCenter(He.wrap()) - } - if (M) { - const he = o.C.number(re, se, Te) + Gi(0, e.center.lat); - e.setZoom(he) - } - }, - isZooming: M, - elevationCenter: ee - } - } - handleFlyTo(e, n) { - const s = n.zoom !== void 0, - u = e.center, - d = e.zoom, - m = e.padding, - y = !e.isPaddingEqual(n.padding), - w = e.getConstrained(o.S.convert(n.center || n.locationAtOffset), d).center, - P = s ? +n.zoom : e.zoom + Gi(e.center.lat, w.lat), - M = e.clone(); - M.setCenter(w), M.setZoom(P), M.setBearing(n.bearing); - const D = new o.P(o.ah(e.centerPoint.x + n.offsetAsPoint.x, 0, e.width), o.ah(e.centerPoint.y + n.offsetAsPoint.y, 0, e.height)); - M.setLocationAtPoint(w, D); - const z = M.center; - vn(e, z); - const B = (function(ue, ge, Te) { - const he = yn(ge), - De = yn(Te), - He = o.aX(he, De), - je = Math.acos(He), - qe = el(ue); - return je / (2 * Math.PI) * qe - })(e, u, z), - U = d + Gi(u.lat, 0), - ee = P + Gi(z.lat, 0), - J = o.af(ee - U); - let re; - if (typeof n.minZoom == "number") { - const ue = +n.minZoom + Gi(z.lat, 0), - ge = Math.min(ue, U, ee) + Gi(0, z.lat), - Te = e.getConstrained(z, ge).zoom + Gi(z.lat, 0); - re = o.af(Te - U) - } - const se = o.bA(u.lng, z.lng), - de = o.bA(u.lat, z.lat); - return { - easeFunc: (ue, ge, Te, he) => { - const De = _c(u, se, de, Te); - y && e.interpolatePadding(m, n.padding, ue); - const He = ue === 1 ? z : De; - e.setCenter(He.wrap()); - const je = U + o.ak(ge); - e.setZoom(ue === 1 ? P : je + Gi(0, He.lat)) - }, - scaleOfZoom: J, - targetCenter: z, - scaleOfMinZoom: re, - pixelPathLength: B - } - } - static solveVectorScale(e, n, s, u, d) { - const m = u === "x" ? [s[0], s[4], s[8], s[12]] : [s[1], s[5], s[9], s[13]], - y = [s[3], s[7], s[11], s[15]], - w = e[0] * m[0] + e[1] * m[1] + e[2] * m[2], - P = e[0] * y[0] + e[1] * y[1] + e[2] * y[2], - M = n[0] * m[0] + n[1] * m[1] + n[2] * m[2], - D = n[0] * y[0] + n[1] * y[1] + n[2] * y[2]; - return M + d * P === w + d * D || y[3] * (w - M) + m[3] * (D - P) + w * D == M * P ? null : (M + m[3] - d * D - d * y[3]) / (M - w - d * D + d * P) - } - static getLesserNonNegativeNonNull(e, n) { - return n !== null && n >= 0 && n < e ? n : e - } - } - class gh { - constructor(e) { - this._globe = e, this._mercatorCameraHelper = new hn, this._verticalPerspectiveCameraHelper = new Dn - } - get useGlobeControls() { - return this._globe.useGlobeRendering - } - get currentHelper() { - return this.useGlobeControls ? this._verticalPerspectiveCameraHelper : this._mercatorCameraHelper - } - handlePanInertia(e, n) { - return this.currentHelper.handlePanInertia(e, n) - } - handleMapControlsRollPitchBearingZoom(e, n) { - return this.currentHelper.handleMapControlsRollPitchBearingZoom(e, n) - } - handleMapControlsPan(e, n, s) { - this.currentHelper.handleMapControlsPan(e, n, s) - } - cameraForBoxAndBearing(e, n, s, u, d) { - return this.currentHelper.cameraForBoxAndBearing(e, n, s, u, d) - } - handleJumpToCenterZoom(e, n) { - this.currentHelper.handleJumpToCenterZoom(e, n) - } - handleEaseTo(e, n) { - return this.currentHelper.handleEaseTo(e, n) - } - handleFlyTo(e, n) { - return this.currentHelper.handleFlyTo(e, n) - } - } - const tl = (h, e) => o.y(h, e && e.filter((n => n.identifier !== "source.canvas"))), - Jd = o.bE(); - class gc extends o.E { - constructor(e, n = {}) { - super(), this._rtlPluginLoaded = () => { - for (const s in this.sourceCaches) { - const u = this.sourceCaches[s].getSource().type; - u !== "vector" && u !== "geojson" || this.sourceCaches[s].reload() - } - }, this.map = e, this.dispatcher = new xt(_t(), e._getMapId()), this.dispatcher.registerMessageHandler("GG", ((s, u) => this.getGlyphs(s, u))), this.dispatcher.registerMessageHandler("GI", ((s, u) => this.getImages(s, u))), this.imageManager = new Je, this.imageManager.setEventedParent(this), this.glyphManager = new Qe(e._requestManager, n.localIdeographFontFamily), this.lineAtlas = new ne(256, 512), this.crossTileSymbolIndex = new gi, this._spritesImagesIds = {}, this._layers = {}, this._order = [], this.sourceCaches = {}, this.zoomHistory = new o.bF, this._loaded = !1, this._availableImages = [], this._globalState = {}, this._resetUpdates(), this.dispatcher.broadcast("SR", o.bG()), kr().on(ur, this._rtlPluginLoaded), this.on("data", (s => { - if (s.dataType !== "source" || s.sourceDataType !== "metadata") return; - const u = this.sourceCaches[s.sourceId]; - if (!u) return; - const d = u.getSource(); - if (d && d.vectorLayerIds) - for (const m in this._layers) { - const y = this._layers[m]; - y.source === d.id && this._validateLayer(y) - } - })) - } - setGlobalStateProperty(e, n) { - var s, u, d; - this._checkLoaded(); - const m = n === null ? (d = (u = (s = this.stylesheet.state) === null || s === void 0 ? void 0 : s[e]) === null || u === void 0 ? void 0 : u.default) !== null && d !== void 0 ? d : null : n; - if (o.bH(m, this._globalState[e])) return this; - this._globalState[e] = m; - const y = this._findGlobalStateAffectedSources([e]); - for (const w in this.sourceCaches) y.has(w) && (this._reloadSource(w), this._changed = !0) - } - getGlobalState() { - return this._globalState - } - setGlobalState(e) { - this._checkLoaded(); - const n = []; - for (const u in e) !o.bH(this._globalState[u], e[u].default) && (n.push(u), this._globalState[u] = e[u].default); - const s = this._findGlobalStateAffectedSources(n); - for (const u in this.sourceCaches) s.has(u) && (this._reloadSource(u), this._changed = !0) - } - _findGlobalStateAffectedSources(e) { - if (e.length === 0) return new Set; - const n = new Set; - for (const s in this._layers) { - const u = this._layers[s], - d = u.getLayoutAffectingGlobalStateRefs(); - for (const m of e) d.has(m) && n.add(u.source) - } - return n - } - loadURL(e, n = {}, s) { - this.fire(new o.l("dataloading", { - dataType: "style" - })), n.validate = typeof n.validate != "boolean" || n.validate; - const u = this.map._requestManager.transformRequest(e, "Style"); - this._loadStyleRequest = new AbortController; - const d = this._loadStyleRequest; - o.j(u, this._loadStyleRequest).then((m => { - this._loadStyleRequest = null, this._load(m.data, n, s) - })).catch((m => { - this._loadStyleRequest = null, m && !d.signal.aborted && this.fire(new o.k(m)) - })) - } - loadJSON(e, n = {}, s) { - this.fire(new o.l("dataloading", { - dataType: "style" - })), this._frameRequest = new AbortController, ye.frameAsync(this._frameRequest).then((() => { - this._frameRequest = null, n.validate = n.validate !== !1, this._load(e, n, s) - })).catch((() => {})) - } - loadEmpty() { - this.fire(new o.l("dataloading", { - dataType: "style" - })), this._load(Jd, { - validate: !1 - }) - } - _load(e, n, s) { - var u, d, m; - const y = n.transformStyle ? n.transformStyle(s, e) : e; - if (!n.validate || !tl(this, o.z(y))) { - this._loaded = !0, this.stylesheet = y; - for (const w in y.sources) this.addSource(w, y.sources[w], { - validate: !1 - }); - y.sprite ? this._loadSprite(y.sprite) : this.imageManager.setLoaded(!0), this.glyphManager.setURL(y.glyphs), this._createLayers(), this.light = new Q(this.stylesheet.light), this._setProjectionInternal(((u = this.stylesheet.projection) === null || u === void 0 ? void 0 : u.type) || "mercator"), this.sky = new _e(this.stylesheet.sky), this.map.setTerrain((d = this.stylesheet.terrain) !== null && d !== void 0 ? d : null), this.setGlobalState((m = this.stylesheet.state) !== null && m !== void 0 ? m : null), this.fire(new o.l("data", { - dataType: "style" - })), this.fire(new o.l("style.load")) - } - } - _createLayers() { - const e = o.bI(this.stylesheet.layers); - this.dispatcher.broadcast("SL", e), this._order = e.map((n => n.id)), this._layers = {}, this._serializedLayers = null; - for (const n of e) { - const s = o.bJ(n); - s.setEventedParent(this, { - layer: { - id: n.id - } - }), this._layers[n.id] = s - } - } - _loadSprite(e, n = !1, s = void 0) { - let u; - this.imageManager.setLoaded(!1), this._spriteRequest = new AbortController, (function(d, m, y, w) { - return o._(this, void 0, void 0, (function*() { - const P = ht(d), - M = y > 1 ? "@2x" : "", - D = {}, - z = {}; - for (const { - id: B, - url: U - } - of P) { - const ee = m.transformRequest(Xe(U, M, ".json"), "SpriteJSON"); - D[B] = o.j(ee, w); - const J = m.transformRequest(Xe(U, M, ".png"), "SpriteImage"); - z[B] = Ne.getImage(J, w) - } - return yield Promise.all([...Object.values(D), ...Object.values(z)]), (function(B, U) { - return o._(this, void 0, void 0, (function*() { - const ee = {}; - for (const J in B) { - ee[J] = {}; - const re = ye.getImageCanvasContext((yield U[J]).data), - se = (yield B[J]).data; - for (const de in se) { - const { - width: ue, - height: ge, - x: Te, - y: he, - sdf: De, - pixelRatio: He, - stretchX: je, - stretchY: qe, - content: $e, - textFitWidth: Rt, - textFitHeight: Nt - } = se[de]; - ee[J][de] = { - data: null, - pixelRatio: He, - sdf: De, - stretchX: je, - stretchY: qe, - content: $e, - textFitWidth: Rt, - textFitHeight: Nt, - spriteData: { - width: ue, - height: ge, - x: Te, - y: he, - context: re - } - } - } - } - return ee - })) - })(D, z) - })) - })(e, this.map._requestManager, this.map.getPixelRatio(), this._spriteRequest).then((d => { - if (this._spriteRequest = null, d) - for (const m in d) { - this._spritesImagesIds[m] = []; - const y = this._spritesImagesIds[m] ? this._spritesImagesIds[m].filter((w => !(w in d))) : []; - for (const w of y) this.imageManager.removeImage(w), this._changedImages[w] = !0; - for (const w in d[m]) { - const P = m === "default" ? w : `${m}:${w}`; - this._spritesImagesIds[m].push(P), P in this.imageManager.images ? this.imageManager.updateImage(P, d[m][w], !1) : this.imageManager.addImage(P, d[m][w]), n && (this._changedImages[P] = !0) - } - } - })).catch((d => { - this._spriteRequest = null, u = d, this.fire(new o.k(u)) - })).finally((() => { - this.imageManager.setLoaded(!0), this._availableImages = this.imageManager.listImages(), n && (this._changed = !0), this.dispatcher.broadcast("SI", this._availableImages), this.fire(new o.l("data", { - dataType: "style" - })), s && s(u) - })) - } - _unloadSprite() { - for (const e of Object.values(this._spritesImagesIds).flat()) this.imageManager.removeImage(e), this._changedImages[e] = !0; - this._spritesImagesIds = {}, this._availableImages = this.imageManager.listImages(), this._changed = !0, this.dispatcher.broadcast("SI", this._availableImages), this.fire(new o.l("data", { - dataType: "style" - })) - } - _validateLayer(e) { - const n = this.sourceCaches[e.source]; - if (!n) return; - const s = e.sourceLayer; - if (!s) return; - const u = n.getSource(); - (u.type === "geojson" || u.vectorLayerIds && u.vectorLayerIds.indexOf(s) === -1) && this.fire(new o.k(new Error(`Source layer "${s}" does not exist on source "${u.id}" as specified by style layer "${e.id}".`))) - } - loaded() { - if (!this._loaded || Object.keys(this._updatedSources).length) return !1; - for (const e in this.sourceCaches) - if (!this.sourceCaches[e].loaded()) return !1; - return !!this.imageManager.isLoaded() - } - _serializeByIds(e, n = !1) { - const s = this._serializedAllLayers(); - if (!e || e.length === 0) return Object.values(n ? o.bK(s) : s); - const u = []; - for (const d of e) - if (s[d]) { - const m = n ? o.bK(s[d]) : s[d]; - u.push(m) - } return u - } - _serializedAllLayers() { - let e = this._serializedLayers; - if (e) return e; - e = this._serializedLayers = {}; - const n = Object.keys(this._layers); - for (const s of n) { - const u = this._layers[s]; - u.type !== "custom" && (e[s] = u.serialize()) - } - return e - } - hasTransitions() { - var e, n, s; - if (!((e = this.light) === null || e === void 0) && e.hasTransition() || !((n = this.sky) === null || n === void 0) && n.hasTransition() || !((s = this.projection) === null || s === void 0) && s.hasTransition()) return !0; - for (const u in this.sourceCaches) - if (this.sourceCaches[u].hasTransition()) return !0; - for (const u in this._layers) - if (this._layers[u].hasTransition()) return !0; - return !1 - } - _checkLoaded() { - if (!this._loaded) throw new Error("Style is not done loading.") - } - update(e) { - if (!this._loaded) return; - const n = this._changed; - if (n) { - const u = Object.keys(this._updatedLayers), - d = Object.keys(this._removedLayers); - (u.length || d.length) && this._updateWorkerLayers(u, d); - for (const m in this._updatedSources) { - const y = this._updatedSources[m]; - if (y === "reload") this._reloadSource(m); - else { - if (y !== "clear") throw new Error(`Invalid action ${y}`); - this._clearSource(m) - } - } - this._updateTilesForChangedImages(), this._updateTilesForChangedGlyphs(); - for (const m in this._updatedPaintProps) this._layers[m].updateTransitions(e); - this.light.updateTransitions(e), this.sky.updateTransitions(e), this._resetUpdates() - } - const s = {}; - for (const u in this.sourceCaches) { - const d = this.sourceCaches[u]; - s[u] = d.used, d.used = !1 - } - for (const u of this._order) { - const d = this._layers[u]; - d.recalculate(e, this._availableImages), !d.isHidden(e.zoom) && d.source && (this.sourceCaches[d.source].used = !0) - } - for (const u in s) { - const d = this.sourceCaches[u]; - !!s[u] != !!d.used && d.fire(new o.l("data", { - sourceDataType: "visibility", - dataType: "source", - sourceId: u - })) - } - this.light.recalculate(e), this.sky.recalculate(e), this.projection.recalculate(e), this.z = e.zoom, n && this.fire(new o.l("data", { - dataType: "style" - })) - } - _updateTilesForChangedImages() { - const e = Object.keys(this._changedImages); - if (e.length) { - for (const n in this.sourceCaches) this.sourceCaches[n].reloadTilesForDependencies(["icons", "patterns"], e); - this._changedImages = {} - } - } - _updateTilesForChangedGlyphs() { - if (this._glyphsDidChange) { - for (const e in this.sourceCaches) this.sourceCaches[e].reloadTilesForDependencies(["glyphs"], [""]); - this._glyphsDidChange = !1 - } - } - _updateWorkerLayers(e, n) { - this.dispatcher.broadcast("UL", { - layers: this._serializeByIds(e, !1), - removedIds: n - }) - } - _resetUpdates() { - this._changed = !1, this._updatedLayers = {}, this._removedLayers = {}, this._updatedSources = {}, this._updatedPaintProps = {}, this._changedImages = {}, this._glyphsDidChange = !1 - } - setState(e, n = {}) { - var s; - this._checkLoaded(); - const u = this.serialize(); - if (e = n.transformStyle ? n.transformStyle(u, e) : e, ((s = n.validate) === null || s === void 0 || s) && tl(this, o.z(e))) return !1; - (e = o.bK(e)).layers = o.bI(e.layers); - const d = o.bL(u, e), - m = this._getOperationsToPerform(d); - if (m.unimplemented.length > 0) throw new Error(`Unimplemented: ${m.unimplemented.join(", ")}.`); - if (m.operations.length === 0) return !1; - for (const y of m.operations) y(); - return this.stylesheet = e, this._serializedLayers = null, !0 - } - _getOperationsToPerform(e) { - const n = [], - s = []; - for (const u of e) switch (u.command) { - case "setCenter": - case "setZoom": - case "setBearing": - case "setPitch": - case "setRoll": - continue; - case "addLayer": - n.push((() => this.addLayer.apply(this, u.args))); - break; - case "removeLayer": - n.push((() => this.removeLayer.apply(this, u.args))); - break; - case "setPaintProperty": - n.push((() => this.setPaintProperty.apply(this, u.args))); - break; - case "setLayoutProperty": - n.push((() => this.setLayoutProperty.apply(this, u.args))); - break; - case "setFilter": - n.push((() => this.setFilter.apply(this, u.args))); - break; - case "addSource": - n.push((() => this.addSource.apply(this, u.args))); - break; - case "removeSource": - n.push((() => this.removeSource.apply(this, u.args))); - break; - case "setLayerZoomRange": - n.push((() => this.setLayerZoomRange.apply(this, u.args))); - break; - case "setLight": - n.push((() => this.setLight.apply(this, u.args))); - break; - case "setGeoJSONSourceData": - n.push((() => this.setGeoJSONSourceData.apply(this, u.args))); - break; - case "setGlyphs": - n.push((() => this.setGlyphs.apply(this, u.args))); - break; - case "setSprite": - n.push((() => this.setSprite.apply(this, u.args))); - break; - case "setTerrain": - n.push((() => this.map.setTerrain.apply(this, u.args))); - break; - case "setSky": - n.push((() => this.setSky.apply(this, u.args))); - break; - case "setProjection": - this.setProjection.apply(this, u.args); - break; - case "setGlobalState": - n.push((() => this.setGlobalState.apply(this, u.args))); - break; - case "setTransition": - n.push((() => {})); - break; - default: - s.push(u.command) - } - return { - operations: n, - unimplemented: s - } - } - addImage(e, n) { - if (this.getImage(e)) return this.fire(new o.k(new Error(`An image named "${e}" already exists.`))); - this.imageManager.addImage(e, n), this._afterImageUpdated(e) - } - updateImage(e, n) { - this.imageManager.updateImage(e, n) - } - getImage(e) { - return this.imageManager.getImage(e) - } - removeImage(e) { - if (!this.getImage(e)) return this.fire(new o.k(new Error(`An image named "${e}" does not exist.`))); - this.imageManager.removeImage(e), this._afterImageUpdated(e) - } - _afterImageUpdated(e) { - this._availableImages = this.imageManager.listImages(), this._changedImages[e] = !0, this._changed = !0, this.dispatcher.broadcast("SI", this._availableImages), this.fire(new o.l("data", { - dataType: "style" - })) - } - listImages() { - return this._checkLoaded(), this.imageManager.listImages() - } - addSource(e, n, s = {}) { - if (this._checkLoaded(), this.sourceCaches[e] !== void 0) throw new Error(`Source "${e}" already exists.`); - if (!n.type) throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(n).join(", ")}.`); - if (["vector", "raster", "geojson", "video", "image"].indexOf(n.type) >= 0 && this._validate(o.z.source, `sources.${e}`, n, null, s)) return; - this.map && this.map._collectResourceTiming && (n.collectResourceTiming = !0); - const u = this.sourceCaches[e] = new Pt(e, n, this.dispatcher); - u.style = this, u.setEventedParent(this, (() => ({ - isSourceLoaded: u.loaded(), - source: u.serialize(), - sourceId: e - }))), u.onAdd(this.map), this._changed = !0 - } - removeSource(e) { - if (this._checkLoaded(), this.sourceCaches[e] === void 0) throw new Error("There is no source with this ID"); - for (const s in this._layers) - if (this._layers[s].source === e) return this.fire(new o.k(new Error(`Source "${e}" cannot be removed while layer "${s}" is using it.`))); - const n = this.sourceCaches[e]; - delete this.sourceCaches[e], delete this._updatedSources[e], n.fire(new o.l("data", { - sourceDataType: "metadata", - dataType: "source", - sourceId: e - })), n.setEventedParent(null), n.onRemove(this.map), this._changed = !0 - } - setGeoJSONSourceData(e, n) { - if (this._checkLoaded(), this.sourceCaches[e] === void 0) throw new Error(`There is no source with this ID=${e}`); - const s = this.sourceCaches[e].getSource(); - if (s.type !== "geojson") throw new Error(`geojsonSource.type is ${s.type}, which is !== 'geojson`); - s.setData(n), this._changed = !0 - } - getSource(e) { - return this.sourceCaches[e] && this.sourceCaches[e].getSource() - } - addLayer(e, n, s = {}) { - this._checkLoaded(); - const u = e.id; - if (this.getLayer(u)) return void this.fire(new o.k(new Error(`Layer "${u}" already exists on this map.`))); - let d; - if (e.type === "custom") { - if (tl(this, o.bM(e))) return; - d = o.bJ(e) - } else { - if ("source" in e && typeof e.source == "object" && (this.addSource(u, e.source), e = o.bK(e), e = o.e(e, { - source: u - })), this._validate(o.z.layer, `layers.${u}`, e, { - arrayIndex: -1 - }, s)) return; - d = o.bJ(e), this._validateLayer(d), d.setEventedParent(this, { - layer: { - id: u - } - }) - } - const m = n ? this._order.indexOf(n) : this._order.length; - if (n && m === -1) this.fire(new o.k(new Error(`Cannot add layer "${u}" before non-existing layer "${n}".`))); - else { - if (this._order.splice(m, 0, u), this._layerOrderChanged = !0, this._layers[u] = d, this._removedLayers[u] && d.source && d.type !== "custom") { - const y = this._removedLayers[u]; - delete this._removedLayers[u], y.type !== d.type ? this._updatedSources[d.source] = "clear" : (this._updatedSources[d.source] = "reload", this.sourceCaches[d.source].pause()) - } - this._updateLayer(d), d.onAdd && d.onAdd(this.map) - } - } - moveLayer(e, n) { - if (this._checkLoaded(), this._changed = !0, !this._layers[e]) return void this.fire(new o.k(new Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`))); - if (e === n) return; - const s = this._order.indexOf(e); - this._order.splice(s, 1); - const u = n ? this._order.indexOf(n) : this._order.length; - n && u === -1 ? this.fire(new o.k(new Error(`Cannot move layer "${e}" before non-existing layer "${n}".`))) : (this._order.splice(u, 0, e), this._layerOrderChanged = !0) - } - removeLayer(e) { - this._checkLoaded(); - const n = this._layers[e]; - if (!n) return void this.fire(new o.k(new Error(`Cannot remove non-existing layer "${e}".`))); - n.setEventedParent(null); - const s = this._order.indexOf(e); - this._order.splice(s, 1), this._layerOrderChanged = !0, this._changed = !0, this._removedLayers[e] = n, delete this._layers[e], this._serializedLayers && delete this._serializedLayers[e], delete this._updatedLayers[e], delete this._updatedPaintProps[e], n.onRemove && n.onRemove(this.map) - } - getLayer(e) { - return this._layers[e] - } - getLayersOrder() { - return [...this._order] - } - hasLayer(e) { - return e in this._layers - } - setLayerZoomRange(e, n, s) { - this._checkLoaded(); - const u = this.getLayer(e); - u ? u.minzoom === n && u.maxzoom === s || (n != null && (u.minzoom = n), s != null && (u.maxzoom = s), this._updateLayer(u)) : this.fire(new o.k(new Error(`Cannot set the zoom range of non-existing layer "${e}".`))) - } - setFilter(e, n, s = {}) { - this._checkLoaded(); - const u = this.getLayer(e); - if (u) { - if (!o.bH(u.filter, n)) return n == null ? (u.setFilter(void 0), void this._updateLayer(u)) : void(this._validate(o.z.filter, `layers.${u.id}.filter`, n, null, s) || (u.setFilter(o.bK(n)), this._updateLayer(u))) - } else this.fire(new o.k(new Error(`Cannot filter non-existing layer "${e}".`))) - } - getFilter(e) { - return o.bK(this.getLayer(e).filter) - } - setLayoutProperty(e, n, s, u = {}) { - this._checkLoaded(); - const d = this.getLayer(e); - d ? o.bH(d.getLayoutProperty(n), s) || (d.setLayoutProperty(n, s, u), this._updateLayer(d)) : this.fire(new o.k(new Error(`Cannot style non-existing layer "${e}".`))) - } - getLayoutProperty(e, n) { - const s = this.getLayer(e); - if (s) return s.getLayoutProperty(n); - this.fire(new o.k(new Error(`Cannot get style of non-existing layer "${e}".`))) - } - setPaintProperty(e, n, s, u = {}) { - this._checkLoaded(); - const d = this.getLayer(e); - d ? o.bH(d.getPaintProperty(n), s) || (d.setPaintProperty(n, s, u) && this._updateLayer(d), this._changed = !0, this._updatedPaintProps[e] = !0, this._serializedLayers = null) : this.fire(new o.k(new Error(`Cannot style non-existing layer "${e}".`))) - } - getPaintProperty(e, n) { - return this.getLayer(e).getPaintProperty(n) - } - setFeatureState(e, n) { - this._checkLoaded(); - const s = e.source, - u = e.sourceLayer, - d = this.sourceCaches[s]; - if (d === void 0) return void this.fire(new o.k(new Error(`The source '${s}' does not exist in the map's style.`))); - const m = d.getSource().type; - m === "geojson" && u ? this.fire(new o.k(new Error("GeoJSON sources cannot have a sourceLayer parameter."))) : m !== "vector" || u ? (e.id === void 0 && this.fire(new o.k(new Error("The feature id parameter must be provided."))), d.setFeatureState(u, e.id, n)) : this.fire(new o.k(new Error("The sourceLayer parameter must be provided for vector source types."))) - } - removeFeatureState(e, n) { - this._checkLoaded(); - const s = e.source, - u = this.sourceCaches[s]; - if (u === void 0) return void this.fire(new o.k(new Error(`The source '${s}' does not exist in the map's style.`))); - const d = u.getSource().type, - m = d === "vector" ? e.sourceLayer : void 0; - d !== "vector" || m ? n && typeof e.id != "string" && typeof e.id != "number" ? this.fire(new o.k(new Error("A feature id is required to remove its specific state property."))) : u.removeFeatureState(m, e.id, n) : this.fire(new o.k(new Error("The sourceLayer parameter must be provided for vector source types."))) - } - getFeatureState(e) { - this._checkLoaded(); - const n = e.source, - s = e.sourceLayer, - u = this.sourceCaches[n]; - if (u !== void 0) return u.getSource().type !== "vector" || s ? (e.id === void 0 && this.fire(new o.k(new Error("The feature id parameter must be provided."))), u.getFeatureState(s, e.id)) : void this.fire(new o.k(new Error("The sourceLayer parameter must be provided for vector source types."))); - this.fire(new o.k(new Error(`The source '${n}' does not exist in the map's style.`))) - } - getTransition() { - return o.e({ - duration: 300, - delay: 0 - }, this.stylesheet && this.stylesheet.transition) - } - serialize() { - if (!this._loaded) return; - const e = o.bN(this.sourceCaches, (d => d.serialize())), - n = this._serializeByIds(this._order, !0), - s = this.map.getTerrain() || void 0, - u = this.stylesheet; - return o.bO({ - version: u.version, - name: u.name, - metadata: u.metadata, - light: u.light, - sky: u.sky, - center: u.center, - zoom: u.zoom, - bearing: u.bearing, - pitch: u.pitch, - sprite: u.sprite, - glyphs: u.glyphs, - transition: u.transition, - projection: u.projection, - sources: e, - layers: n, - terrain: s - }, (d => d !== void 0)) - } - _updateLayer(e) { - this._updatedLayers[e.id] = !0, e.source && !this._updatedSources[e.source] && this.sourceCaches[e.source].getSource().type !== "raster" && (this._updatedSources[e.source] = "reload", this.sourceCaches[e.source].pause()), this._serializedLayers = null, this._changed = !0 - } - _flattenAndSortRenderedFeatures(e) { - const n = m => this._layers[m].type === "fill-extrusion", - s = {}, - u = []; - for (let m = this._order.length - 1; m >= 0; m--) { - const y = this._order[m]; - if (n(y)) { - s[y] = m; - for (const w of e) { - const P = w[y]; - if (P) - for (const M of P) u.push(M) - } - } - } - u.sort(((m, y) => y.intersectionZ - m.intersectionZ)); - const d = []; - for (let m = this._order.length - 1; m >= 0; m--) { - const y = this._order[m]; - if (n(y)) - for (let w = u.length - 1; w >= 0; w--) { - const P = u[w].feature; - if (s[P.layer.id] < m) break; - d.push(P), u.pop() - } else - for (const w of e) { - const P = w[y]; - if (P) - for (const M of P) d.push(M.feature) - } - } - return d - } - queryRenderedFeatures(e, n, s) { - n && n.filter && this._validate(o.z.filter, "queryRenderedFeatures.filter", n.filter, null, n); - const u = {}; - if (n && n.layers) { - if (!(Array.isArray(n.layers) || n.layers instanceof Set)) return this.fire(new o.k(new Error("parameters.layers must be an Array or a Set of strings"))), []; - for (const P of n.layers) { - const M = this._layers[P]; - if (!M) return this.fire(new o.k(new Error(`The layer '${P}' does not exist in the map's style and cannot be queried for features.`))), []; - u[M.source] = !0 - } - } - const d = []; - n.availableImages = this._availableImages; - const m = this._serializedAllLayers(), - y = n.layers instanceof Set ? n.layers : Array.isArray(n.layers) ? new Set(n.layers) : null, - w = Object.assign(Object.assign({}, n), { - layers: y - }); - for (const P in this.sourceCaches) n.layers && !u[P] || d.push(It(this.sourceCaches[P], this._layers, m, e, w, s, this.map.terrain ? (M, D, z) => this.map.terrain.getElevation(M, D, z) : void 0)); - return this.placement && d.push((function(P, M, D, z, B, U, ee) { - const J = {}, - re = U.queryRenderedSymbols(z), - se = []; - for (const de of Object.keys(re).map(Number)) se.push(ee[de]); - se.sort(ut); - for (const de of se) { - const ue = de.featureIndex.lookupSymbolFeatures(re[de.bucketInstanceId], M, de.bucketIndex, de.sourceLayerIndex, B.filter, B.layers, B.availableImages, P); - for (const ge in ue) { - const Te = J[ge] = J[ge] || [], - he = ue[ge]; - he.sort(((De, He) => { - const je = de.featureSortOrder; - if (je) { - const qe = je.indexOf(De.featureIndex); - return je.indexOf(He.featureIndex) - qe - } - return He.featureIndex - De.featureIndex - })); - for (const De of he) Te.push(De) - } - } - return (function(de, ue, ge) { - for (const Te in de) - for (const he of de[Te]) bt(he, ge[ue[Te].source]); - return de - })(J, P, D) - })(this._layers, m, this.sourceCaches, e, w, this.placement.collisionIndex, this.placement.retainedQueryData)), this._flattenAndSortRenderedFeatures(d) - } - querySourceFeatures(e, n) { - n && n.filter && this._validate(o.z.filter, "querySourceFeatures.filter", n.filter, null, n); - const s = this.sourceCaches[e]; - return s ? (function(u, d) { - const m = u.getRenderableIds().map((P => u.getTileByID(P))), - y = [], - w = {}; - for (let P = 0; P < m.length; P++) { - const M = m[P], - D = M.tileID.canonical.key; - w[D] || (w[D] = !0, M.querySourceFeatures(y, d)) - } - return y - })(s, n) : [] - } - getLight() { - return this.light.getLight() - } - setLight(e, n = {}) { - this._checkLoaded(); - const s = this.light.getLight(); - let u = !1; - for (const m in e) - if (!o.bH(e[m], s[m])) { - u = !0; - break - } if (!u) return; - const d = { - now: ye.now(), - transition: o.e({ - duration: 300, - delay: 0 - }, this.stylesheet.transition) - }; - this.light.setLight(e, n), this.light.updateTransitions(d) - } - getProjection() { - var e; - return (e = this.stylesheet) === null || e === void 0 ? void 0 : e.projection - } - setProjection(e) { - if (this._checkLoaded(), this.projection) { - if (this.projection.name === e.type) return; - this.projection.destroy(), delete this.projection - } - this.stylesheet.projection = e, this._setProjectionInternal(e.type) - } - getSky() { - var e; - return (e = this.stylesheet) === null || e === void 0 ? void 0 : e.sky - } - setSky(e, n = {}) { - this._checkLoaded(); - const s = this.getSky(); - let u = !1; - if (!e && !s) return; - if (e && !s) u = !0; - else if (!e && s) u = !0; - else - for (const m in e) - if (!o.bH(e[m], s[m])) { - u = !0; - break - } if (!u) return; - const d = { - now: ye.now(), - transition: o.e({ - duration: 300, - delay: 0 - }, this.stylesheet.transition) - }; - this.stylesheet.sky = e, this.sky.setSky(e, n), this.sky.updateTransitions(d) - } - _setProjectionInternal(e) { - const n = (function(s) { - if (Array.isArray(s)) { - const u = new Qo({ - type: s - }); - return { - projection: u, - transform: new _o, - cameraHelper: new gh(u) - } - } - switch (s) { - case "mercator": - return { - projection: new yr, transform: new wi, cameraHelper: new hn - }; - case "globe": { - const u = new Qo({ - type: ["interpolate", ["linear"], - ["zoom"], 11, "vertical-perspective", 12, "mercator" - ] - }); - return { - projection: u, - transform: new _o, - cameraHelper: new gh(u) - } - } - case "vertical-perspective": - return { - projection: new co, transform: new mo, cameraHelper: new Dn - }; - default: - return o.w(`Unknown projection name: ${s}. Falling back to mercator projection.`), { - projection: new yr, - transform: new wi, - cameraHelper: new hn - } - } - })(e); - this.projection = n.projection, this.map.migrateProjection(n.transform, n.cameraHelper); - for (const s in this.sourceCaches) this.sourceCaches[s].reload() - } - _validate(e, n, s, u, d = {}) { - return (!d || d.validate !== !1) && tl(this, e.call(o.z, o.e({ - key: n, - style: this.serialize(), - value: s, - styleSpec: o.v - }, u))) - } - _remove(e = !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), kr().off(ur, this._rtlPluginLoaded); - for (const n in this._layers) this._layers[n].setEventedParent(null); - for (const n in this.sourceCaches) { - const s = this.sourceCaches[n]; - s.setEventedParent(null), s.onRemove(this.map) - } - this.imageManager.setEventedParent(null), this.setEventedParent(null), e && this.dispatcher.broadcast("RM", void 0), this.dispatcher.remove(e) - } - _clearSource(e) { - this.sourceCaches[e].clearTiles() - } - _reloadSource(e) { - this.sourceCaches[e].resume(), this.sourceCaches[e].reload() - } - _updateSources(e) { - for (const n in this.sourceCaches) this.sourceCaches[n].update(e, this.map.terrain) - } - _generateCollisionBoxes() { - for (const e in this.sourceCaches) this._reloadSource(e) - } - _updatePlacement(e, n, s, u, d = !1) { - let m = !1, - y = !1; - const w = {}; - for (const P of this._order) { - const M = this._layers[P]; - if (M.type !== "symbol") continue; - if (!w[M.source]) { - const z = this.sourceCaches[M.source]; - w[M.source] = z.getRenderableIds(!0).map((B => z.getTileByID(B))).sort(((B, U) => U.tileID.overscaledZ - B.tileID.overscaledZ || (B.tileID.isLessThan(U.tileID) ? -1 : 1))) - } - const D = this.crossTileSymbolIndex.addLayer(M, w[M.source], e.center.lng); - m = m || D - } - if (this.crossTileSymbolIndex.pruneUnusedLayers(this._order), ((d = d || this._layerOrderChanged || s === 0) || !this.pauseablePlacement || this.pauseablePlacement.isDone() && !this.placement.stillRecent(ye.now(), e.zoom)) && (this.pauseablePlacement = new gn(e, this.map.terrain, this._order, d, n, s, u, this.placement), this._layerOrderChanged = !1), this.pauseablePlacement.isDone() ? this.placement.setStale() : (this.pauseablePlacement.continuePlacement(this._order, this._layers, w), this.pauseablePlacement.isDone() && (this.placement = this.pauseablePlacement.commit(ye.now()), y = !0), m && this.pauseablePlacement.placement.setStale()), y || m) - for (const P of this._order) { - const M = this._layers[P]; - M.type === "symbol" && this.placement.updateLayerOpacities(M, w[M.source]) - } - return !this.pauseablePlacement.isDone() || this.placement.hasTransitions(ye.now()) - } - _releaseSymbolFadeTiles() { - for (const e in this.sourceCaches) this.sourceCaches[e].releaseSymbolFadeTiles() - } - getImages(e, n) { - return o._(this, void 0, void 0, (function*() { - const s = yield this.imageManager.getImages(n.icons); - this._updateTilesForChangedImages(); - const u = this.sourceCaches[n.source]; - return u && u.setDependencies(n.tileID.key, n.type, n.icons), s - })) - } - getGlyphs(e, n) { - return o._(this, void 0, void 0, (function*() { - const s = yield this.glyphManager.getGlyphs(n.stacks), u = this.sourceCaches[n.source]; - return u && u.setDependencies(n.tileID.key, n.type, [""]), s - })) - } - getGlyphsUrl() { - return this.stylesheet.glyphs || null - } - setGlyphs(e, n = {}) { - this._checkLoaded(), e && this._validate(o.z.glyphs, "glyphs", e, null, n) || (this._glyphsDidChange = !0, this.stylesheet.glyphs = e, this.glyphManager.entries = {}, this.glyphManager.setURL(e)) - } - addSprite(e, n, s = {}, u) { - this._checkLoaded(); - const d = [{ - id: e, - url: n - }], - m = [...ht(this.stylesheet.sprite), ...d]; - this._validate(o.z.sprite, "sprite", m, null, s) || (this.stylesheet.sprite = m, this._loadSprite(d, !0, u)) - } - removeSprite(e) { - this._checkLoaded(); - const n = ht(this.stylesheet.sprite); - if (n.find((s => s.id === e))) { - if (this._spritesImagesIds[e]) - for (const s of this._spritesImagesIds[e]) this.imageManager.removeImage(s), this._changedImages[s] = !0; - n.splice(n.findIndex((s => s.id === e)), 1), this.stylesheet.sprite = n.length > 0 ? n : void 0, delete this._spritesImagesIds[e], this._availableImages = this.imageManager.listImages(), this._changed = !0, this.dispatcher.broadcast("SI", this._availableImages), this.fire(new o.l("data", { - dataType: "style" - })) - } else this.fire(new o.k(new Error(`Sprite "${e}" doesn't exists on this map.`))) - } - getSprite() { - return ht(this.stylesheet.sprite) - } - setSprite(e, n = {}, s) { - this._checkLoaded(), e && this._validate(o.z.sprite, "sprite", e, null, n) || (this.stylesheet.sprite = e, e ? this._loadSprite(e, !0, s) : (this._unloadSprite(), s && s(null))) - } - } - var Qd = o.aJ([{ - name: "a_pos", - type: "Int16", - components: 2 - }, { - name: "a_texture_pos", - type: "Int16", - components: 2 - }]); - class ep { - constructor() { - this.boundProgram = null, this.boundLayoutVertexBuffer = null, this.boundPaintVertexBuffers = [], this.boundIndexBuffer = null, this.boundVertexOffset = null, this.boundDynamicVertexBuffer = null, this.vao = null - } - bind(e, n, s, u, d, m, y, w, P) { - this.context = e; - let M = this.boundPaintVertexBuffers.length !== u.length; - for (let D = 0; !M && D < u.length; D++) this.boundPaintVertexBuffers[D] !== u[D] && (M = !0); - !this.vao || this.boundProgram !== n || this.boundLayoutVertexBuffer !== s || M || this.boundIndexBuffer !== d || this.boundVertexOffset !== m || this.boundDynamicVertexBuffer !== y || this.boundDynamicVertexBuffer2 !== w || this.boundDynamicVertexBuffer3 !== P ? this.freshBind(n, s, u, d, m, y, w, P) : (e.bindVertexArray.set(this.vao), y && y.bind(), d && d.dynamicDraw && d.bind(), w && w.bind(), P && P.bind()) - } - freshBind(e, n, s, u, d, m, y, w) { - const P = e.numAttributes, - M = this.context, - D = M.gl; - this.vao && this.destroy(), this.vao = M.createVertexArray(), M.bindVertexArray.set(this.vao), this.boundProgram = e, this.boundLayoutVertexBuffer = n, this.boundPaintVertexBuffers = s, this.boundIndexBuffer = u, this.boundVertexOffset = d, this.boundDynamicVertexBuffer = m, this.boundDynamicVertexBuffer2 = y, this.boundDynamicVertexBuffer3 = w, n.enableAttributes(D, e); - for (const z of s) z.enableAttributes(D, e); - m && m.enableAttributes(D, e), y && y.enableAttributes(D, e), w && w.enableAttributes(D, e), n.bind(), n.setVertexAttribPointers(D, e, d); - for (const z of s) z.bind(), z.setVertexAttribPointers(D, e, d); - m && (m.bind(), m.setVertexAttribPointers(D, e, d)), u && u.bind(), y && (y.bind(), y.setVertexAttribPointers(D, e, d)), w && (w.bind(), w.setVertexAttribPointers(D, e, d)), M.currentNumAttributes = P - } - destroy() { - this.vao && (this.context.deleteVertexArray(this.vao), this.vao = null) - } - } - const rl = (h, e, n, s, u) => ({ - u_texture: 0, - u_ele_delta: h, - u_fog_matrix: e, - u_fog_color: n ? n.properties.get("fog-color") : o.bf.white, - u_fog_ground_blend: n ? n.properties.get("fog-ground-blend") : 1, - u_fog_ground_blend_opacity: u ? 0 : n ? n.calculateFogBlendOpacity(s) : 0, - u_horizon_color: n ? n.properties.get("horizon-color") : o.bf.white, - u_horizon_fog_blend: n ? n.properties.get("horizon-fog-blend") : 1, - u_is_globe_mode: u ? 1 : 0 - }), - vc = { - 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 ms(h) { - const e = []; - for (let n = 0; n < h.length; n++) { - if (h[n] === null) continue; - const s = h[n].split(" "); - e.push(s.pop()) - } - return e - } - class yc { - constructor(e, n, s, u, d, m, y, w, P = []) { - const M = e.gl; - this.program = M.createProgram(); - const D = ms(n.staticAttributes), - z = s ? s.getBinderAttributes() : [], - B = D.concat(z), - U = pi.prelude.staticUniforms ? ms(pi.prelude.staticUniforms) : [], - ee = y.staticUniforms ? ms(y.staticUniforms) : [], - J = n.staticUniforms ? ms(n.staticUniforms) : [], - re = s ? s.getBinderUniforms() : [], - se = U.concat(ee).concat(J).concat(re), - de = []; - for (const je of se) de.indexOf(je) < 0 && de.push(je); - const ue = s ? s.defines() : []; - Ra(M) && ue.unshift("#version 300 es"), d && ue.push("#define OVERDRAW_INSPECTOR;"), m && ue.push("#define TERRAIN3D;"), w && ue.push(w), P && ue.push(...P); - let ge = ue.concat(pi.prelude.fragmentSource, y.fragmentSource, n.fragmentSource).join(` -`), - Te = ue.concat(pi.prelude.vertexSource, y.vertexSource, n.vertexSource).join(` -`); - Ra(M) || (ge = (function(je) { - return je.replace(/\bin\s/g, "varying ").replace("out highp vec4 fragColor;", "").replace(/fragColor/g, "gl_FragColor").replace(/texture\(/g, "texture2D(") - })(ge), Te = (function(je) { - return je.replace(/\bin\s/g, "attribute ").replace(/\bout\s/g, "varying ").replace(/texture\(/g, "texture2D(") - })(Te)); - const he = M.createShader(M.FRAGMENT_SHADER); - if (M.isContextLost()) return void(this.failedToCreate = !0); - if (M.shaderSource(he, ge), M.compileShader(he), !M.getShaderParameter(he, M.COMPILE_STATUS)) throw new Error(`Could not compile fragment shader: ${M.getShaderInfoLog(he)}`); - M.attachShader(this.program, he); - const De = M.createShader(M.VERTEX_SHADER); - if (M.isContextLost()) return void(this.failedToCreate = !0); - if (M.shaderSource(De, Te), M.compileShader(De), !M.getShaderParameter(De, M.COMPILE_STATUS)) throw new Error(`Could not compile vertex shader: ${M.getShaderInfoLog(De)}`); - M.attachShader(this.program, De), this.attributes = {}; - const He = {}; - this.numAttributes = B.length; - for (let je = 0; je < this.numAttributes; je++) B[je] && (M.bindAttribLocation(this.program, je, B[je]), this.attributes[B[je]] = je); - if (M.linkProgram(this.program), !M.getProgramParameter(this.program, M.LINK_STATUS)) throw new Error(`Program failed to link: ${M.getProgramInfoLog(this.program)}`); - M.deleteShader(De), M.deleteShader(he); - for (let je = 0; je < de.length; je++) { - const qe = de[je]; - if (qe && !He[qe]) { - const $e = M.getUniformLocation(this.program, qe); - $e && (He[qe] = $e) - } - } - this.fixedUniforms = u(e, He), this.terrainUniforms = ((je, qe) => ({ - u_depth: new o.bP(je, qe.u_depth), - u_terrain: new o.bP(je, qe.u_terrain), - u_terrain_dim: new o.bg(je, qe.u_terrain_dim), - u_terrain_matrix: new o.bR(je, qe.u_terrain_matrix), - u_terrain_unpack: new o.bS(je, qe.u_terrain_unpack), - u_terrain_exaggeration: new o.bg(je, qe.u_terrain_exaggeration) - }))(e, He), this.projectionUniforms = ((je, qe) => ({ - u_projection_matrix: new o.bR(je, qe.u_projection_matrix), - u_projection_tile_mercator_coords: new o.bS(je, qe.u_projection_tile_mercator_coords), - u_projection_clipping_plane: new o.bS(je, qe.u_projection_clipping_plane), - u_projection_transition: new o.bg(je, qe.u_projection_transition), - u_projection_fallback_matrix: new o.bR(je, qe.u_projection_fallback_matrix) - }))(e, He), this.binderUniforms = s ? s.getUniforms(e, He) : [] - } - draw(e, n, s, u, d, m, y, w, P, M, D, z, B, U, ee, J, re, se, de) { - const ue = e.gl; - if (this.failedToCreate) return; - if (e.program.set(this.program), e.setDepthMode(s), e.setStencilMode(u), e.setColorMode(d), e.setCullFace(m), w) { - e.activeTexture.set(ue.TEXTURE2), ue.bindTexture(ue.TEXTURE_2D, w.depthTexture), e.activeTexture.set(ue.TEXTURE3), ue.bindTexture(ue.TEXTURE_2D, w.texture); - for (const Te in this.terrainUniforms) this.terrainUniforms[Te].set(w[Te]) - } - if (P) - for (const Te in P) this.projectionUniforms[vc[Te]].set(P[Te]); - if (y) - for (const Te in this.fixedUniforms) this.fixedUniforms[Te].set(y[Te]); - J && J.setUniforms(e, this.binderUniforms, U, { - zoom: ee - }); - let ge = 0; - switch (n) { - case ue.LINES: - ge = 2; - break; - case ue.TRIANGLES: - ge = 3; - break; - case ue.LINE_STRIP: - ge = 1 - } - for (const Te of B.get()) { - const he = Te.vaos || (Te.vaos = {}); - (he[M] || (he[M] = new ep)).bind(e, this, D, J ? J.getPaintVertexBuffers() : [], z, Te.vertexOffset, re, se, de), ue.drawElements(n, Te.primitiveLength * ge, ue.UNSIGNED_SHORT, Te.primitiveOffset * ge * 2) - } - } - } - - function il(h, e, n) { - const s = 1 / o.aC(n, 1, e.transform.tileZoom), - u = Math.pow(2, n.tileID.overscaledZ), - d = n.tileSize * Math.pow(2, e.transform.tileZoom) / u, - m = d * (n.tileID.canonical.x + n.tileID.wrap * u), - y = d * n.tileID.canonical.y; - return { - u_image: 0, - u_texsize: n.imageAtlasTexture.size, - u_scale: [s, h.fromScale, h.toScale], - u_fade: h.t, - u_pixel_coord_upper: [m >> 16, y >> 16], - u_pixel_coord_lower: [65535 & m, 65535 & y] - } - } - const ya = (h, e, n, s) => { - const u = h.style.light, - d = u.properties.get("position"), - m = [d.x, d.y, d.z], - y = o.bV(); - u.properties.get("anchor") === "viewport" && o.bW(y, h.transform.bearingInRadians), o.bX(m, m, y); - const w = h.transform.transformLightDirection(m), - P = u.properties.get("color"); - return { - u_lightpos: m, - u_lightpos_globe: w, - u_lightintensity: u.properties.get("intensity"), - u_lightcolor: [P.r, P.g, P.b], - u_vertical_gradient: +e, - u_opacity: n, - u_fill_translate: s - } - }, - tp = (h, e, n, s, u, d, m) => o.e(ya(h, e, n, s), il(d, h, m), { - u_height_factor: -Math.pow(2, u.overscaledZ) / m.tileSize / 8 - }), - nl = (h, e, n, s) => o.e(il(e, h, n), { - u_fill_translate: s - }), - go = (h, e) => ({ - u_world: h, - u_fill_translate: e - }), - vo = (h, e, n, s, u) => o.e(nl(h, e, n, u), { - u_world: s - }), - rp = (h, e, n, s, u) => { - const d = h.transform; - let m, y, w = 0; - if (n.paint.get("circle-pitch-alignment") === "map") { - const P = o.aC(e, 1, d.zoom); - m = !0, y = [P, P], w = P / (o.$ * Math.pow(2, e.tileID.overscaledZ)) * 2 * Math.PI * u - } else m = !1, y = d.pixelsToGLUnits; - return { - u_camera_to_center_distance: d.cameraToCenterDistance, - u_scale_with_map: +(n.paint.get("circle-pitch-scale") === "map"), - u_pitch_with_map: +m, - u_device_pixel_ratio: h.pixelRatio, - u_extrude_scale: y, - u_globe_extrude_scale: w, - u_translate: s - } - }, - al = h => ({ - u_pixel_extrude_scale: [1 / h.width, 1 / h.height] - }), - ip = h => ({ - u_viewport_size: [h.width, h.height] - }), - _s = (h, e = 1) => ({ - u_color: h, - u_overlay: 0, - u_overlay_scale: e - }), - vh = (h, e, n, s) => { - const u = o.aC(h, 1, e) / (o.$ * Math.pow(2, h.tileID.overscaledZ)) * 2 * Math.PI * s; - return { - u_extrude_scale: o.aC(h, 1, e), - u_intensity: n, - u_globe_extrude_scale: u - } - }, - xc = (h, e, n, s) => { - const u = o.L(); - o.bY(u, 0, h.width, h.height, 0, 0, 1); - const d = h.context.gl; - return { - u_matrix: u, - u_world: [d.drawingBufferWidth, d.drawingBufferHeight], - u_image: n, - u_color_ramp: s, - u_opacity: e.paint.get("heatmap-opacity") - } - }, - np = (h, e, n) => { - const s = n.paint.get("hillshade-accent-color"); - let u; - switch (n.paint.get("hillshade-method")) { - case "basic": - u = 4; - break; - case "combined": - u = 1; - break; - case "igor": - u = 2; - break; - case "multidirectional": - u = 3; - break; - default: - u = 0 - } - const d = n.getIlluminationProperties(); - for (let m = 0; m < d.directionRadians.length; m++) n.paint.get("hillshade-illumination-anchor") === "viewport" && (d.directionRadians[m] += h.transform.bearingInRadians); - return { - u_image: 0, - u_latrange: bc(0, e.tileID), - u_exaggeration: n.paint.get("hillshade-exaggeration"), - u_altitudes: d.altitudeRadians, - u_azimuths: d.directionRadians, - u_accent: s, - u_method: u, - u_highlights: d.highlightColor, - u_shadows: d.shadowColor - } - }, - yh = (h, e) => { - const n = e.stride, - s = o.L(); - return o.bY(s, 0, o.$, -o.$, 0, 0, 1), o.M(s, s, [0, -o.$, 0]), { - u_matrix: s, - u_image: 1, - u_dimension: [n, n], - u_zoom: h.overscaledZ, - u_unpack: e.getUnpackVector() - } - }; - - function bc(h, e) { - const n = Math.pow(2, e.canonical.z), - s = e.canonical.y; - return [new o.a1(0, s / n).toLngLat().lat, new o.a1(0, (s + 1) / n).toLngLat().lat] - } - const xh = (h, e, n = 0) => ({ - u_image: 0, - u_unpack: e.getUnpackVector(), - u_dimension: [e.stride, e.stride], - u_elevation_stops: 1, - u_color_stops: 4, - u_color_ramp_size: n, - u_opacity: h.paint.get("color-relief-opacity") - }), - sl = (h, e, n, s) => { - const u = h.transform; - return { - u_translation: Tc(h, e, n), - u_ratio: s / o.aC(e, 1, u.zoom), - u_device_pixel_ratio: h.pixelRatio, - u_units_to_pixels: [1 / u.pixelsToGLUnits[0], 1 / u.pixelsToGLUnits[1]] - } - }, - bh = (h, e, n, s, u) => o.e(sl(h, e, n, s), { - u_image: 0, - u_image_height: u - }), - wh = (h, e, n, s, u) => { - const d = h.transform, - m = wc(e, d); - return { - u_translation: Tc(h, e, n), - u_texsize: e.imageAtlasTexture.size, - u_ratio: s / o.aC(e, 1, d.zoom), - u_device_pixel_ratio: h.pixelRatio, - u_image: 0, - u_scale: [m, u.fromScale, u.toScale], - u_fade: u.t, - u_units_to_pixels: [1 / d.pixelsToGLUnits[0], 1 / d.pixelsToGLUnits[1]] - } - }, - gs = (h, e, n, s, u, d) => { - const m = h.lineAtlas, - y = wc(e, h.transform), - w = n.layout.get("line-cap") === "round", - P = m.getDash(u.from, w), - M = m.getDash(u.to, w), - D = P.width * d.fromScale, - z = M.width * d.toScale; - return o.e(sl(h, e, n, s), { - u_patternscale_a: [y / D, -P.height / 2], - u_patternscale_b: [y / z, -M.height / 2], - u_sdfgamma: m.width / (256 * Math.min(D, z) * h.pixelRatio) / 2, - u_image: 0, - u_tex_y_a: P.y, - u_tex_y_b: M.y, - u_mix: d.t - }) - }; - - function wc(h, e) { - return 1 / o.aC(h, 1, e.tileZoom) - } - - function Tc(h, e, n) { - return o.aD(h.transform, e, n.paint.get("line-translate"), n.paint.get("line-translate-anchor")) - } - const yo = (h, e, n, s, u) => { - return { - u_tl_parent: h, - u_scale_parent: e, - u_buffer_scale: 1, - u_fade_t: n.mix, - u_opacity: n.opacity * s.paint.get("raster-opacity"), - u_image0: 0, - u_image1: 1, - u_brightness_low: s.paint.get("raster-brightness-min"), - u_brightness_high: s.paint.get("raster-brightness-max"), - u_saturation_factor: (m = s.paint.get("raster-saturation"), m > 0 ? 1 - 1 / (1.001 - m) : -m), - u_contrast_factor: (d = s.paint.get("raster-contrast"), d > 0 ? 1 / (1 - d) : 1 + d), - u_spin_weights: ap(s.paint.get("raster-hue-rotate")), - u_coords_top: [u[0].x, u[0].y, u[1].x, u[1].y], - u_coords_bottom: [u[3].x, u[3].y, u[2].x, u[2].y] - }; - var d, m - }; - - function ap(h) { - h *= Math.PI / 180; - const e = Math.sin(h), - n = Math.cos(h); - return [(2 * n + 1) / 3, (-Math.sqrt(3) * e - n + 1) / 3, (Math.sqrt(3) * e - n + 1) / 3] - } - const xo = (h, e, n, s, u, d, m, y, w, P, M, D, z) => { - const B = m.transform; - return { - u_is_size_zoom_constant: +(h === "constant" || h === "source"), - u_is_size_feature_constant: +(h === "constant" || h === "camera"), - u_size_t: e ? e.uSizeT : 0, - u_size: e ? e.uSize : 0, - u_camera_to_center_distance: B.cameraToCenterDistance, - u_pitch: B.pitch / 360 * 2 * Math.PI, - u_rotate_symbol: +n, - u_aspect_ratio: B.width / B.height, - u_fade_change: m.options.fadeDuration ? m.symbolFadeChange : 1, - u_label_plane_matrix: y, - u_coord_matrix: w, - u_is_text: +M, - u_pitch_with_map: +s, - u_is_along_line: u, - u_is_variable_anchor: d, - u_texsize: D, - u_texture: 0, - u_translation: P, - u_pitched_scale: z - } - }, - Th = (h, e, n, s, u, d, m, y, w, P, M, D, z, B) => { - const U = m.transform; - return o.e(xo(h, e, n, s, u, d, m, y, w, P, M, D, B), { - u_gamma_scale: s ? Math.cos(U.pitch * Math.PI / 180) * U.cameraToCenterDistance : 1, - u_device_pixel_ratio: m.pixelRatio, - u_is_halo: 1 - }) - }, - sp = (h, e, n, s, u, d, m, y, w, P, M, D, z) => o.e(Th(h, e, n, s, u, d, m, y, w, P, !0, M, 0, z), { - u_texsize_icon: D, - u_texture_icon: 1 - }), - Ch = (h, e) => ({ - u_opacity: h, - u_color: e - }), - Sh = (h, e, n, s, u) => o.e((function(d, m, y, w) { - const P = y.imageManager.getPattern(d.from.toString()), - M = y.imageManager.getPattern(d.to.toString()), - { - width: D, - height: z - } = y.imageManager.getPixelSize(), - B = Math.pow(2, w.tileID.overscaledZ), - U = w.tileSize * Math.pow(2, y.transform.tileZoom) / B, - ee = U * (w.tileID.canonical.x + w.tileID.wrap * B), - J = U * w.tileID.canonical.y; - return { - u_image: 0, - u_pattern_tl_a: P.tl, - u_pattern_br_a: P.br, - u_pattern_tl_b: M.tl, - u_pattern_br_b: M.br, - u_texsize: [D, z], - u_mix: m.t, - u_pattern_size_a: P.displaySize, - u_pattern_size_b: M.displaySize, - u_scale_a: m.fromScale, - u_scale_b: m.toScale, - u_tile_units_to_pixels: 1 / o.aC(w, 1, y.transform.tileZoom), - u_pixel_coord_upper: [ee >> 16, J >> 16], - u_pixel_coord_lower: [65535 & ee, 65535 & J] - } - })(n, u, e, s), { - u_opacity: h - }), - Cc = (h, e) => {}, - Sc = { - fillExtrusion: (h, e) => ({ - u_lightpos: new o.bT(h, e.u_lightpos), - u_lightpos_globe: new o.bT(h, e.u_lightpos_globe), - u_lightintensity: new o.bg(h, e.u_lightintensity), - u_lightcolor: new o.bT(h, e.u_lightcolor), - u_vertical_gradient: new o.bg(h, e.u_vertical_gradient), - u_opacity: new o.bg(h, e.u_opacity), - u_fill_translate: new o.bU(h, e.u_fill_translate) - }), - fillExtrusionPattern: (h, e) => ({ - u_lightpos: new o.bT(h, e.u_lightpos), - u_lightpos_globe: new o.bT(h, e.u_lightpos_globe), - u_lightintensity: new o.bg(h, e.u_lightintensity), - u_lightcolor: new o.bT(h, e.u_lightcolor), - u_vertical_gradient: new o.bg(h, e.u_vertical_gradient), - u_height_factor: new o.bg(h, e.u_height_factor), - u_opacity: new o.bg(h, e.u_opacity), - u_fill_translate: new o.bU(h, e.u_fill_translate), - u_image: new o.bP(h, e.u_image), - u_texsize: new o.bU(h, e.u_texsize), - u_pixel_coord_upper: new o.bU(h, e.u_pixel_coord_upper), - u_pixel_coord_lower: new o.bU(h, e.u_pixel_coord_lower), - u_scale: new o.bT(h, e.u_scale), - u_fade: new o.bg(h, e.u_fade) - }), - fill: (h, e) => ({ - u_fill_translate: new o.bU(h, e.u_fill_translate) - }), - fillPattern: (h, e) => ({ - u_image: new o.bP(h, e.u_image), - u_texsize: new o.bU(h, e.u_texsize), - u_pixel_coord_upper: new o.bU(h, e.u_pixel_coord_upper), - u_pixel_coord_lower: new o.bU(h, e.u_pixel_coord_lower), - u_scale: new o.bT(h, e.u_scale), - u_fade: new o.bg(h, e.u_fade), - u_fill_translate: new o.bU(h, e.u_fill_translate) - }), - fillOutline: (h, e) => ({ - u_world: new o.bU(h, e.u_world), - u_fill_translate: new o.bU(h, e.u_fill_translate) - }), - fillOutlinePattern: (h, e) => ({ - u_world: new o.bU(h, e.u_world), - u_image: new o.bP(h, e.u_image), - u_texsize: new o.bU(h, e.u_texsize), - u_pixel_coord_upper: new o.bU(h, e.u_pixel_coord_upper), - u_pixel_coord_lower: new o.bU(h, e.u_pixel_coord_lower), - u_scale: new o.bT(h, e.u_scale), - u_fade: new o.bg(h, e.u_fade), - u_fill_translate: new o.bU(h, e.u_fill_translate) - }), - circle: (h, e) => ({ - u_camera_to_center_distance: new o.bg(h, e.u_camera_to_center_distance), - u_scale_with_map: new o.bP(h, e.u_scale_with_map), - u_pitch_with_map: new o.bP(h, e.u_pitch_with_map), - u_extrude_scale: new o.bU(h, e.u_extrude_scale), - u_device_pixel_ratio: new o.bg(h, e.u_device_pixel_ratio), - u_globe_extrude_scale: new o.bg(h, e.u_globe_extrude_scale), - u_translate: new o.bU(h, e.u_translate) - }), - collisionBox: (h, e) => ({ - u_pixel_extrude_scale: new o.bU(h, e.u_pixel_extrude_scale) - }), - collisionCircle: (h, e) => ({ - u_viewport_size: new o.bU(h, e.u_viewport_size) - }), - debug: (h, e) => ({ - u_color: new o.bQ(h, e.u_color), - u_overlay: new o.bP(h, e.u_overlay), - u_overlay_scale: new o.bg(h, e.u_overlay_scale) - }), - depth: Cc, - clippingMask: Cc, - heatmap: (h, e) => ({ - u_extrude_scale: new o.bg(h, e.u_extrude_scale), - u_intensity: new o.bg(h, e.u_intensity), - u_globe_extrude_scale: new o.bg(h, e.u_globe_extrude_scale) - }), - heatmapTexture: (h, e) => ({ - u_matrix: new o.bR(h, e.u_matrix), - u_world: new o.bU(h, e.u_world), - u_image: new o.bP(h, e.u_image), - u_color_ramp: new o.bP(h, e.u_color_ramp), - u_opacity: new o.bg(h, e.u_opacity) - }), - hillshade: (h, e) => ({ - u_image: new o.bP(h, e.u_image), - u_latrange: new o.bU(h, e.u_latrange), - u_exaggeration: new o.bg(h, e.u_exaggeration), - u_altitudes: new o.b_(h, e.u_altitudes), - u_azimuths: new o.b_(h, e.u_azimuths), - u_accent: new o.bQ(h, e.u_accent), - u_method: new o.bP(h, e.u_method), - u_shadows: new o.bZ(h, e.u_shadows), - u_highlights: new o.bZ(h, e.u_highlights) - }), - hillshadePrepare: (h, e) => ({ - u_matrix: new o.bR(h, e.u_matrix), - u_image: new o.bP(h, e.u_image), - u_dimension: new o.bU(h, e.u_dimension), - u_zoom: new o.bg(h, e.u_zoom), - u_unpack: new o.bS(h, e.u_unpack) - }), - colorRelief: (h, e) => ({ - u_image: new o.bP(h, e.u_image), - u_unpack: new o.bS(h, e.u_unpack), - u_dimension: new o.bU(h, e.u_dimension), - u_elevation_stops: new o.bP(h, e.u_elevation_stops), - u_color_stops: new o.bP(h, e.u_color_stops), - u_color_ramp_size: new o.bP(h, e.u_color_ramp_size), - u_opacity: new o.bg(h, e.u_opacity) - }), - line: (h, e) => ({ - u_translation: new o.bU(h, e.u_translation), - u_ratio: new o.bg(h, e.u_ratio), - u_device_pixel_ratio: new o.bg(h, e.u_device_pixel_ratio), - u_units_to_pixels: new o.bU(h, e.u_units_to_pixels) - }), - lineGradient: (h, e) => ({ - u_translation: new o.bU(h, e.u_translation), - u_ratio: new o.bg(h, e.u_ratio), - u_device_pixel_ratio: new o.bg(h, e.u_device_pixel_ratio), - u_units_to_pixels: new o.bU(h, e.u_units_to_pixels), - u_image: new o.bP(h, e.u_image), - u_image_height: new o.bg(h, e.u_image_height) - }), - linePattern: (h, e) => ({ - u_translation: new o.bU(h, e.u_translation), - u_texsize: new o.bU(h, e.u_texsize), - u_ratio: new o.bg(h, e.u_ratio), - u_device_pixel_ratio: new o.bg(h, e.u_device_pixel_ratio), - u_image: new o.bP(h, e.u_image), - u_units_to_pixels: new o.bU(h, e.u_units_to_pixels), - u_scale: new o.bT(h, e.u_scale), - u_fade: new o.bg(h, e.u_fade) - }), - lineSDF: (h, e) => ({ - u_translation: new o.bU(h, e.u_translation), - u_ratio: new o.bg(h, e.u_ratio), - u_device_pixel_ratio: new o.bg(h, e.u_device_pixel_ratio), - u_units_to_pixels: new o.bU(h, e.u_units_to_pixels), - u_patternscale_a: new o.bU(h, e.u_patternscale_a), - u_patternscale_b: new o.bU(h, e.u_patternscale_b), - u_sdfgamma: new o.bg(h, e.u_sdfgamma), - u_image: new o.bP(h, e.u_image), - u_tex_y_a: new o.bg(h, e.u_tex_y_a), - u_tex_y_b: new o.bg(h, e.u_tex_y_b), - u_mix: new o.bg(h, e.u_mix) - }), - raster: (h, e) => ({ - u_tl_parent: new o.bU(h, e.u_tl_parent), - u_scale_parent: new o.bg(h, e.u_scale_parent), - u_buffer_scale: new o.bg(h, e.u_buffer_scale), - u_fade_t: new o.bg(h, e.u_fade_t), - u_opacity: new o.bg(h, e.u_opacity), - u_image0: new o.bP(h, e.u_image0), - u_image1: new o.bP(h, e.u_image1), - u_brightness_low: new o.bg(h, e.u_brightness_low), - u_brightness_high: new o.bg(h, e.u_brightness_high), - u_saturation_factor: new o.bg(h, e.u_saturation_factor), - u_contrast_factor: new o.bg(h, e.u_contrast_factor), - u_spin_weights: new o.bT(h, e.u_spin_weights), - u_coords_top: new o.bS(h, e.u_coords_top), - u_coords_bottom: new o.bS(h, e.u_coords_bottom) - }), - symbolIcon: (h, e) => ({ - u_is_size_zoom_constant: new o.bP(h, e.u_is_size_zoom_constant), - u_is_size_feature_constant: new o.bP(h, e.u_is_size_feature_constant), - u_size_t: new o.bg(h, e.u_size_t), - u_size: new o.bg(h, e.u_size), - u_camera_to_center_distance: new o.bg(h, e.u_camera_to_center_distance), - u_pitch: new o.bg(h, e.u_pitch), - u_rotate_symbol: new o.bP(h, e.u_rotate_symbol), - u_aspect_ratio: new o.bg(h, e.u_aspect_ratio), - u_fade_change: new o.bg(h, e.u_fade_change), - u_label_plane_matrix: new o.bR(h, e.u_label_plane_matrix), - u_coord_matrix: new o.bR(h, e.u_coord_matrix), - u_is_text: new o.bP(h, e.u_is_text), - u_pitch_with_map: new o.bP(h, e.u_pitch_with_map), - u_is_along_line: new o.bP(h, e.u_is_along_line), - u_is_variable_anchor: new o.bP(h, e.u_is_variable_anchor), - u_texsize: new o.bU(h, e.u_texsize), - u_texture: new o.bP(h, e.u_texture), - u_translation: new o.bU(h, e.u_translation), - u_pitched_scale: new o.bg(h, e.u_pitched_scale) - }), - symbolSDF: (h, e) => ({ - u_is_size_zoom_constant: new o.bP(h, e.u_is_size_zoom_constant), - u_is_size_feature_constant: new o.bP(h, e.u_is_size_feature_constant), - u_size_t: new o.bg(h, e.u_size_t), - u_size: new o.bg(h, e.u_size), - u_camera_to_center_distance: new o.bg(h, e.u_camera_to_center_distance), - u_pitch: new o.bg(h, e.u_pitch), - u_rotate_symbol: new o.bP(h, e.u_rotate_symbol), - u_aspect_ratio: new o.bg(h, e.u_aspect_ratio), - u_fade_change: new o.bg(h, e.u_fade_change), - u_label_plane_matrix: new o.bR(h, e.u_label_plane_matrix), - u_coord_matrix: new o.bR(h, e.u_coord_matrix), - u_is_text: new o.bP(h, e.u_is_text), - u_pitch_with_map: new o.bP(h, e.u_pitch_with_map), - u_is_along_line: new o.bP(h, e.u_is_along_line), - u_is_variable_anchor: new o.bP(h, e.u_is_variable_anchor), - u_texsize: new o.bU(h, e.u_texsize), - u_texture: new o.bP(h, e.u_texture), - u_gamma_scale: new o.bg(h, e.u_gamma_scale), - u_device_pixel_ratio: new o.bg(h, e.u_device_pixel_ratio), - u_is_halo: new o.bP(h, e.u_is_halo), - u_translation: new o.bU(h, e.u_translation), - u_pitched_scale: new o.bg(h, e.u_pitched_scale) - }), - symbolTextAndIcon: (h, e) => ({ - u_is_size_zoom_constant: new o.bP(h, e.u_is_size_zoom_constant), - u_is_size_feature_constant: new o.bP(h, e.u_is_size_feature_constant), - u_size_t: new o.bg(h, e.u_size_t), - u_size: new o.bg(h, e.u_size), - u_camera_to_center_distance: new o.bg(h, e.u_camera_to_center_distance), - u_pitch: new o.bg(h, e.u_pitch), - u_rotate_symbol: new o.bP(h, e.u_rotate_symbol), - u_aspect_ratio: new o.bg(h, e.u_aspect_ratio), - u_fade_change: new o.bg(h, e.u_fade_change), - u_label_plane_matrix: new o.bR(h, e.u_label_plane_matrix), - u_coord_matrix: new o.bR(h, e.u_coord_matrix), - u_is_text: new o.bP(h, e.u_is_text), - u_pitch_with_map: new o.bP(h, e.u_pitch_with_map), - u_is_along_line: new o.bP(h, e.u_is_along_line), - u_is_variable_anchor: new o.bP(h, e.u_is_variable_anchor), - u_texsize: new o.bU(h, e.u_texsize), - u_texsize_icon: new o.bU(h, e.u_texsize_icon), - u_texture: new o.bP(h, e.u_texture), - u_texture_icon: new o.bP(h, e.u_texture_icon), - u_gamma_scale: new o.bg(h, e.u_gamma_scale), - u_device_pixel_ratio: new o.bg(h, e.u_device_pixel_ratio), - u_is_halo: new o.bP(h, e.u_is_halo), - u_translation: new o.bU(h, e.u_translation), - u_pitched_scale: new o.bg(h, e.u_pitched_scale) - }), - background: (h, e) => ({ - u_opacity: new o.bg(h, e.u_opacity), - u_color: new o.bQ(h, e.u_color) - }), - backgroundPattern: (h, e) => ({ - u_opacity: new o.bg(h, e.u_opacity), - u_image: new o.bP(h, e.u_image), - u_pattern_tl_a: new o.bU(h, e.u_pattern_tl_a), - u_pattern_br_a: new o.bU(h, e.u_pattern_br_a), - u_pattern_tl_b: new o.bU(h, e.u_pattern_tl_b), - u_pattern_br_b: new o.bU(h, e.u_pattern_br_b), - u_texsize: new o.bU(h, e.u_texsize), - u_mix: new o.bg(h, e.u_mix), - u_pattern_size_a: new o.bU(h, e.u_pattern_size_a), - u_pattern_size_b: new o.bU(h, e.u_pattern_size_b), - u_scale_a: new o.bg(h, e.u_scale_a), - u_scale_b: new o.bg(h, e.u_scale_b), - u_pixel_coord_upper: new o.bU(h, e.u_pixel_coord_upper), - u_pixel_coord_lower: new o.bU(h, e.u_pixel_coord_lower), - u_tile_units_to_pixels: new o.bg(h, e.u_tile_units_to_pixels) - }), - terrain: (h, e) => ({ - u_texture: new o.bP(h, e.u_texture), - u_ele_delta: new o.bg(h, e.u_ele_delta), - u_fog_matrix: new o.bR(h, e.u_fog_matrix), - u_fog_color: new o.bQ(h, e.u_fog_color), - u_fog_ground_blend: new o.bg(h, e.u_fog_ground_blend), - u_fog_ground_blend_opacity: new o.bg(h, e.u_fog_ground_blend_opacity), - u_horizon_color: new o.bQ(h, e.u_horizon_color), - u_horizon_fog_blend: new o.bg(h, e.u_horizon_fog_blend), - u_is_globe_mode: new o.bg(h, e.u_is_globe_mode) - }), - terrainDepth: (h, e) => ({ - u_ele_delta: new o.bg(h, e.u_ele_delta) - }), - terrainCoords: (h, e) => ({ - u_texture: new o.bP(h, e.u_texture), - u_terrain_coords_id: new o.bg(h, e.u_terrain_coords_id), - u_ele_delta: new o.bg(h, e.u_ele_delta) - }), - projectionErrorMeasurement: (h, e) => ({ - u_input: new o.bg(h, e.u_input), - u_output_expected: new o.bg(h, e.u_output_expected) - }), - atmosphere: (h, e) => ({ - u_sun_pos: new o.bT(h, e.u_sun_pos), - u_atmosphere_blend: new o.bg(h, e.u_atmosphere_blend), - u_globe_position: new o.bT(h, e.u_globe_position), - u_globe_radius: new o.bg(h, e.u_globe_radius), - u_inv_proj_matrix: new o.bR(h, e.u_inv_proj_matrix) - }), - sky: (h, e) => ({ - u_sky_color: new o.bQ(h, e.u_sky_color), - u_horizon_color: new o.bQ(h, e.u_horizon_color), - u_horizon: new o.bU(h, e.u_horizon), - u_horizon_normal: new o.bU(h, e.u_horizon_normal), - u_sky_horizon_blend: new o.bg(h, e.u_sky_horizon_blend), - u_sky_blend: new o.bg(h, e.u_sky_blend) - }) - }; - class Ph { - constructor(e, n, s) { - this.context = e; - const u = e.gl; - this.buffer = u.createBuffer(), this.dynamicDraw = !!s, this.context.unbindVAO(), e.bindElementBuffer.set(this.buffer), u.bufferData(u.ELEMENT_ARRAY_BUFFER, n.arrayBuffer, this.dynamicDraw ? u.DYNAMIC_DRAW : u.STATIC_DRAW), this.dynamicDraw || delete n.arrayBuffer - } - bind() { - this.context.bindElementBuffer.set(this.buffer) - } - updateData(e) { - const n = this.context.gl; - if (!this.dynamicDraw) throw new Error("Attempted to update data while not in dynamic mode."); - this.context.unbindVAO(), this.bind(), n.bufferSubData(n.ELEMENT_ARRAY_BUFFER, 0, e.arrayBuffer) - } - destroy() { - this.buffer && (this.context.gl.deleteBuffer(this.buffer), delete this.buffer) - } - } - const ol = { - Int8: "BYTE", - Uint8: "UNSIGNED_BYTE", - Int16: "SHORT", - Uint16: "UNSIGNED_SHORT", - Int32: "INT", - Uint32: "UNSIGNED_INT", - Float32: "FLOAT" - }; - class $a { - constructor(e, n, s, u) { - this.length = n.length, this.attributes = s, this.itemSize = n.bytesPerElement, this.dynamicDraw = u, this.context = e; - const d = e.gl; - this.buffer = d.createBuffer(), e.bindVertexBuffer.set(this.buffer), d.bufferData(d.ARRAY_BUFFER, n.arrayBuffer, this.dynamicDraw ? d.DYNAMIC_DRAW : d.STATIC_DRAW), this.dynamicDraw || delete n.arrayBuffer - } - bind() { - this.context.bindVertexBuffer.set(this.buffer) - } - updateData(e) { - if (e.length !== this.length) throw new Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`); - const n = this.context.gl; - this.bind(), n.bufferSubData(n.ARRAY_BUFFER, 0, e.arrayBuffer) - } - enableAttributes(e, n) { - for (let s = 0; s < this.attributes.length; s++) { - const u = n.attributes[this.attributes[s].name]; - u !== void 0 && e.enableVertexAttribArray(u) - } - } - setVertexAttribPointers(e, n, s) { - for (let u = 0; u < this.attributes.length; u++) { - const d = this.attributes[u], - m = n.attributes[d.name]; - m !== void 0 && e.vertexAttribPointer(m, d.components, e[ol[d.type]], !1, this.itemSize, d.offset + this.itemSize * (s || 0)) - } - } - destroy() { - this.buffer && (this.context.gl.deleteBuffer(this.buffer), delete this.buffer) - } - } - class vi { - constructor(e) { - this.gl = e.gl, this.default = this.getDefault(), this.current = this.default, this.dirty = !1 - } - get() { - return this.current - } - set(e) {} - getDefault() { - return this.default - } - setDefault() { - this.set(this.default) - } - } - class Pc extends vi { - getDefault() { - return o.bf.transparent - } - set(e) { - const n = this.current; - (e.r !== n.r || e.g !== n.g || e.b !== n.b || e.a !== n.a || this.dirty) && (this.gl.clearColor(e.r, e.g, e.b, e.a), this.current = e, this.dirty = !1) - } - } - class Ic extends vi { - getDefault() { - return 1 - } - set(e) { - (e !== this.current || this.dirty) && (this.gl.clearDepth(e), this.current = e, this.dirty = !1) - } - } - class Ih extends vi { - getDefault() { - return 0 - } - set(e) { - (e !== this.current || this.dirty) && (this.gl.clearStencil(e), this.current = e, this.dirty = !1) - } - } - class Mc extends vi { - getDefault() { - return [!0, !0, !0, !0] - } - set(e) { - const n = this.current; - (e[0] !== n[0] || e[1] !== n[1] || e[2] !== n[2] || e[3] !== n[3] || this.dirty) && (this.gl.colorMask(e[0], e[1], e[2], e[3]), this.current = e, this.dirty = !1) - } - } - class vs extends vi { - getDefault() { - return !0 - } - set(e) { - (e !== this.current || this.dirty) && (this.gl.depthMask(e), this.current = e, this.dirty = !1) - } - } - class Ac extends vi { - getDefault() { - return 255 - } - set(e) { - (e !== this.current || this.dirty) && (this.gl.stencilMask(e), this.current = e, this.dirty = !1) - } - } - class op extends vi { - getDefault() { - return { - func: this.gl.ALWAYS, - ref: 0, - mask: 255 - } - } - set(e) { - const n = this.current; - (e.func !== n.func || e.ref !== n.ref || e.mask !== n.mask || this.dirty) && (this.gl.stencilFunc(e.func, e.ref, e.mask), this.current = e, this.dirty = !1) - } - } - class lp extends vi { - getDefault() { - const e = this.gl; - return [e.KEEP, e.KEEP, e.KEEP] - } - set(e) { - const n = this.current; - (e[0] !== n[0] || e[1] !== n[1] || e[2] !== n[2] || this.dirty) && (this.gl.stencilOp(e[0], e[1], e[2]), this.current = e, this.dirty = !1) - } - } - class cp extends vi { - getDefault() { - return !1 - } - set(e) { - if (e === this.current && !this.dirty) return; - const n = this.gl; - e ? n.enable(n.STENCIL_TEST) : n.disable(n.STENCIL_TEST), this.current = e, this.dirty = !1 - } - } - class up extends vi { - getDefault() { - return [0, 1] - } - set(e) { - const n = this.current; - (e[0] !== n[0] || e[1] !== n[1] || this.dirty) && (this.gl.depthRange(e[0], e[1]), this.current = e, this.dirty = !1) - } - } - class Mh extends vi { - getDefault() { - return !1 - } - set(e) { - if (e === this.current && !this.dirty) return; - const n = this.gl; - e ? n.enable(n.DEPTH_TEST) : n.disable(n.DEPTH_TEST), this.current = e, this.dirty = !1 - } - } - class hp extends vi { - getDefault() { - return this.gl.LESS - } - set(e) { - (e !== this.current || this.dirty) && (this.gl.depthFunc(e), this.current = e, this.dirty = !1) - } - } - class Ah extends vi { - getDefault() { - return !1 - } - set(e) { - if (e === this.current && !this.dirty) return; - const n = this.gl; - e ? n.enable(n.BLEND) : n.disable(n.BLEND), this.current = e, this.dirty = !1 - } - } - class ll extends vi { - getDefault() { - const e = this.gl; - return [e.ONE, e.ZERO] - } - set(e) { - const n = this.current; - (e[0] !== n[0] || e[1] !== n[1] || this.dirty) && (this.gl.blendFunc(e[0], e[1]), this.current = e, this.dirty = !1) - } - } - class cl extends vi { - getDefault() { - return o.bf.transparent - } - set(e) { - const n = this.current; - (e.r !== n.r || e.g !== n.g || e.b !== n.b || e.a !== n.a || this.dirty) && (this.gl.blendColor(e.r, e.g, e.b, e.a), this.current = e, this.dirty = !1) - } - } - class ul extends vi { - getDefault() { - return this.gl.FUNC_ADD - } - set(e) { - (e !== this.current || this.dirty) && (this.gl.blendEquation(e), this.current = e, this.dirty = !1) - } - } - class kc extends vi { - getDefault() { - return !1 - } - set(e) { - if (e === this.current && !this.dirty) return; - const n = this.gl; - e ? n.enable(n.CULL_FACE) : n.disable(n.CULL_FACE), this.current = e, this.dirty = !1 - } - } - class ys extends vi { - getDefault() { - return this.gl.BACK - } - set(e) { - (e !== this.current || this.dirty) && (this.gl.cullFace(e), this.current = e, this.dirty = !1) - } - } - class bo extends vi { - getDefault() { - return this.gl.CCW - } - set(e) { - (e !== this.current || this.dirty) && (this.gl.frontFace(e), this.current = e, this.dirty = !1) - } - } - class Os extends vi { - getDefault() { - return null - } - set(e) { - (e !== this.current || this.dirty) && (this.gl.useProgram(e), this.current = e, this.dirty = !1) - } - } - class ca extends vi { - getDefault() { - return this.gl.TEXTURE0 - } - set(e) { - (e !== this.current || this.dirty) && (this.gl.activeTexture(e), this.current = e, this.dirty = !1) - } - } - class kh extends vi { - getDefault() { - const e = this.gl; - return [0, 0, e.drawingBufferWidth, e.drawingBufferHeight] - } - set(e) { - const n = this.current; - (e[0] !== n[0] || e[1] !== n[1] || e[2] !== n[2] || e[3] !== n[3] || this.dirty) && (this.gl.viewport(e[0], e[1], e[2], e[3]), this.current = e, this.dirty = !1) - } - } - class Eh extends vi { - getDefault() { - return null - } - set(e) { - if (e === this.current && !this.dirty) return; - const n = this.gl; - n.bindFramebuffer(n.FRAMEBUFFER, e), this.current = e, this.dirty = !1 - } - } - class Ec extends vi { - getDefault() { - return null - } - set(e) { - if (e === this.current && !this.dirty) return; - const n = this.gl; - n.bindRenderbuffer(n.RENDERBUFFER, e), this.current = e, this.dirty = !1 - } - } - class xs extends vi { - getDefault() { - return null - } - set(e) { - if (e === this.current && !this.dirty) return; - const n = this.gl; - n.bindTexture(n.TEXTURE_2D, e), this.current = e, this.dirty = !1 - } - } - class hl extends vi { - getDefault() { - return null - } - set(e) { - if (e === this.current && !this.dirty) return; - const n = this.gl; - n.bindBuffer(n.ARRAY_BUFFER, e), this.current = e, this.dirty = !1 - } - } - class dl extends vi { - getDefault() { - return null - } - set(e) { - const n = this.gl; - n.bindBuffer(n.ELEMENT_ARRAY_BUFFER, e), this.current = e, this.dirty = !1 - } - } - class wo extends vi { - getDefault() { - return null - } - set(e) { - var n; - if (e === this.current && !this.dirty) return; - const s = this.gl; - Ra(s) ? s.bindVertexArray(e) : (n = s.getExtension("OES_vertex_array_object")) === null || n === void 0 || n.bindVertexArrayOES(e), this.current = e, this.dirty = !1 - } - } - class pl extends vi { - getDefault() { - return 4 - } - set(e) { - if (e === this.current && !this.dirty) return; - const n = this.gl; - n.pixelStorei(n.UNPACK_ALIGNMENT, e), this.current = e, this.dirty = !1 - } - } - class zh extends vi { - getDefault() { - return !1 - } - set(e) { - if (e === this.current && !this.dirty) return; - const n = this.gl; - n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL, e), this.current = e, this.dirty = !1 - } - } - class Ns extends vi { - getDefault() { - return !1 - } - set(e) { - if (e === this.current && !this.dirty) return; - const n = this.gl; - n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL, e), this.current = e, this.dirty = !1 - } - } - class rs extends vi { - constructor(e, n) { - super(e), this.context = e, this.parent = n - } - getDefault() { - return null - } - } - class Lh extends rs { - setDirty() { - this.dirty = !0 - } - set(e) { - if (e === this.current && !this.dirty) return; - this.context.bindFramebuffer.set(this.parent); - const n = this.gl; - n.framebufferTexture2D(n.FRAMEBUFFER, n.COLOR_ATTACHMENT0, n.TEXTURE_2D, e, 0), this.current = e, this.dirty = !1 - } - } - class zc extends rs { - set(e) { - if (e === this.current && !this.dirty) return; - this.context.bindFramebuffer.set(this.parent); - const n = this.gl; - n.framebufferRenderbuffer(n.FRAMEBUFFER, n.DEPTH_ATTACHMENT, n.RENDERBUFFER, e), this.current = e, this.dirty = !1 - } - } - class ii extends rs { - set(e) { - if (e === this.current && !this.dirty) return; - this.context.bindFramebuffer.set(this.parent); - const n = this.gl; - n.framebufferRenderbuffer(n.FRAMEBUFFER, n.DEPTH_STENCIL_ATTACHMENT, n.RENDERBUFFER, e), this.current = e, this.dirty = !1 - } - } - const To = "Framebuffer is not complete"; - class dp { - constructor(e, n, s, u, d) { - this.context = e, this.width = n, this.height = s; - const m = e.gl, - y = this.framebuffer = m.createFramebuffer(); - if (this.colorAttachment = new Lh(e, y), u) this.depthAttachment = d ? new ii(e, y) : new zc(e, y); - else if (d) throw new Error("Stencil cannot be set without depth"); - if (m.checkFramebufferStatus(m.FRAMEBUFFER) !== m.FRAMEBUFFER_COMPLETE) throw new Error(To) - } - destroy() { - const e = this.context.gl, - n = this.colorAttachment.get(); - if (n && e.deleteTexture(n), this.depthAttachment) { - const s = this.depthAttachment.get(); - s && e.deleteRenderbuffer(s) - } - e.deleteFramebuffer(this.framebuffer) - } - } - class Dh { - constructor(e) { - var n, s; - if (this.gl = e, this.clearColor = new Pc(this), this.clearDepth = new Ic(this), this.clearStencil = new Ih(this), this.colorMask = new Mc(this), this.depthMask = new vs(this), this.stencilMask = new Ac(this), this.stencilFunc = new op(this), this.stencilOp = new lp(this), this.stencilTest = new cp(this), this.depthRange = new up(this), this.depthTest = new Mh(this), this.depthFunc = new hp(this), this.blend = new Ah(this), this.blendFunc = new ll(this), this.blendColor = new cl(this), this.blendEquation = new ul(this), this.cullFace = new kc(this), this.cullFaceSide = new ys(this), this.frontFace = new bo(this), this.program = new Os(this), this.activeTexture = new ca(this), this.viewport = new kh(this), this.bindFramebuffer = new Eh(this), this.bindRenderbuffer = new Ec(this), this.bindTexture = new xs(this), this.bindVertexBuffer = new hl(this), this.bindElementBuffer = new dl(this), this.bindVertexArray = new wo(this), this.pixelStoreUnpack = new pl(this), this.pixelStoreUnpackPremultiplyAlpha = new zh(this), this.pixelStoreUnpackFlipY = new Ns(this), this.extTextureFilterAnisotropic = e.getExtension("EXT_texture_filter_anisotropic") || e.getExtension("MOZ_EXT_texture_filter_anisotropic") || e.getExtension("WEBKIT_EXT_texture_filter_anisotropic"), this.extTextureFilterAnisotropic && (this.extTextureFilterAnisotropicMax = e.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)), this.maxTextureSize = e.getParameter(e.MAX_TEXTURE_SIZE), Ra(e)) { - this.HALF_FLOAT = e.HALF_FLOAT; - const u = e.getExtension("EXT_color_buffer_half_float"); - this.RGBA16F = (n = e.RGBA16F) !== null && n !== void 0 ? n : u == null ? void 0 : u.RGBA16F_EXT, this.RGB16F = (s = e.RGB16F) !== null && s !== void 0 ? s : u == null ? void 0 : u.RGB16F_EXT, e.getExtension("EXT_color_buffer_float") - } else { - e.getExtension("EXT_color_buffer_half_float"), e.getExtension("OES_texture_half_float_linear"); - const u = e.getExtension("OES_texture_half_float"); - this.HALF_FLOAT = u == null ? void 0 : u.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(e, n) { - return new Ph(this, e, n) - } - createVertexBuffer(e, n, s) { - return new $a(this, e, n, s) - } - createRenderbuffer(e, n, s) { - const u = this.gl, - d = u.createRenderbuffer(); - return this.bindRenderbuffer.set(d), u.renderbufferStorage(u.RENDERBUFFER, e, n, s), this.bindRenderbuffer.set(null), d - } - createFramebuffer(e, n, s, u) { - return new dp(this, e, n, s, u) - } - clear({ - color: e, - depth: n, - stencil: s - }) { - const u = this.gl; - let d = 0; - e && (d |= u.COLOR_BUFFER_BIT, this.clearColor.set(e), this.colorMask.set([!0, !0, !0, !0])), n !== void 0 && (d |= u.DEPTH_BUFFER_BIT, this.depthRange.set([0, 1]), this.clearDepth.set(n), this.depthMask.set(!0)), s !== void 0 && (d |= u.STENCIL_BUFFER_BIT, this.clearStencil.set(s), this.stencilMask.set(255)), u.clear(d) - } - setCullFace(e) { - e.enable === !1 ? this.cullFace.set(!1) : (this.cullFace.set(!0), this.cullFaceSide.set(e.mode), this.frontFace.set(e.frontFace)) - } - setDepthMode(e) { - e.func !== this.gl.ALWAYS || e.mask ? (this.depthTest.set(!0), this.depthFunc.set(e.func), this.depthMask.set(e.mask), this.depthRange.set(e.range)) : this.depthTest.set(!1) - } - setStencilMode(e) { - e.test.func !== this.gl.ALWAYS || e.mask ? (this.stencilTest.set(!0), this.stencilMask.set(e.mask), this.stencilOp.set([e.fail, e.depthFail, e.pass]), this.stencilFunc.set({ - func: e.test.func, - ref: e.ref, - mask: e.test.mask - })) : this.stencilTest.set(!1) - } - setColorMode(e) { - o.bH(e.blendFunction, Ti.Replace) ? this.blend.set(!1) : (this.blend.set(!0), this.blendFunc.set(e.blendFunction), this.blendColor.set(e.blendColor)), this.colorMask.set(e.mask) - } - createVertexArray() { - var e; - return Ra(this.gl) ? this.gl.createVertexArray() : (e = this.gl.getExtension("OES_vertex_array_object")) === null || e === void 0 ? void 0 : e.createVertexArrayOES() - } - deleteVertexArray(e) { - var n; - return Ra(this.gl) ? this.gl.deleteVertexArray(e) : (n = this.gl.getExtension("OES_vertex_array_object")) === null || n === void 0 ? void 0 : n.deleteVertexArrayOES(e) - } - unbindVAO() { - this.bindVertexArray.set(null) - } - } - let is; - - function Rh(h, e, n, s, u) { - const d = h.context, - m = h.transform, - y = d.gl, - w = h.useProgram("collisionBox"), - P = []; - let M = 0, - D = 0; - for (let re = 0; re < s.length; re++) { - const se = s[re], - de = e.getTile(se).getBucket(n); - if (!de) continue; - const ue = u ? de.textCollisionBox : de.iconCollisionBox, - ge = de.collisionCircleArray; - ge.length > 0 && (P.push({ - circleArray: ge, - circleOffset: D, - coord: se - }), M += ge.length / 4, D = M), ue && w.draw(d, y.LINES, Vr.disabled, hi.disabled, h.colorModeForRenderPass(), wr.disabled, al(h.transform), h.style.map.terrain && h.style.map.terrain.getTerrainData(se), m.getProjectionData({ - overscaledTileID: se, - applyGlobeMatrix: !0, - applyTerrainMatrix: !0 - }), n.id, ue.layoutVertexBuffer, ue.indexBuffer, ue.segments, null, h.transform.zoom, null, null, ue.collisionVertexBuffer) - } - if (!u || !P.length) return; - const z = h.useProgram("collisionCircle"), - B = new o.b$; - B.resize(4 * M), B._trim(); - let U = 0; - for (const re of P) - for (let se = 0; se < re.circleArray.length / 4; se++) { - const de = 4 * se, - ue = re.circleArray[de + 0], - ge = re.circleArray[de + 1], - Te = re.circleArray[de + 2], - he = re.circleArray[de + 3]; - B.emplace(U++, ue, ge, Te, he, 0), B.emplace(U++, ue, ge, Te, he, 1), B.emplace(U++, ue, ge, Te, he, 2), B.emplace(U++, ue, ge, Te, he, 3) - }(!is || is.length < 2 * M) && (is = (function(re) { - const se = 2 * re, - de = new o.c1; - de.resize(se), de._trim(); - for (let ue = 0; ue < se; ue++) { - const ge = 6 * ue; - de.uint16[ge + 0] = 4 * ue + 0, de.uint16[ge + 1] = 4 * ue + 1, de.uint16[ge + 2] = 4 * ue + 2, de.uint16[ge + 3] = 4 * ue + 2, de.uint16[ge + 4] = 4 * ue + 3, de.uint16[ge + 5] = 4 * ue + 0 - } - return de - })(M)); - const ee = d.createIndexBuffer(is, !0), - J = d.createVertexBuffer(B, o.c0.members, !0); - for (const re of P) { - const se = ip(h.transform); - z.draw(d, y.TRIANGLES, Vr.disabled, hi.disabled, h.colorModeForRenderPass(), wr.disabled, se, h.style.map.terrain && h.style.map.terrain.getTerrainData(re.coord), null, n.id, J, ee, o.aM.simpleSegment(0, 2 * re.circleOffset, re.circleArray.length, re.circleArray.length / 2), null, h.transform.zoom, null, null, null) - } - J.destroy(), ee.destroy() - } - const pp = o.ag(new Float32Array(16)); - - function Bh(h, e, n, s, u, d) { - const { - horizontalAlign: m, - verticalAlign: y - } = o.aH(h); - return new o.P((-(m - .5) * e / u + s[0]) * d, (-(y - .5) * n / u + s[1]) * d) - } - - function fp(h, e, n, s, u, d) { - const m = e.tileAnchorPoint.add(new o.P(e.translation[0], e.translation[1])); - if (e.pitchWithMap) { - let y = s.mult(d); - n || (y = y.rotate(-u)); - const w = m.add(y); - return ai(w.x, w.y, e.pitchedLabelPlaneMatrix, e.getElevation).point - } - if (n) { - const y = Dr(e.tileAnchorPoint.x + 1, e.tileAnchorPoint.y, e).point.sub(h), - w = Math.atan(y.y / y.x) + (y.x < 0 ? Math.PI : 0); - return h.add(s.rotate(w)) - } - return h.add(s) - } - - function Lc(h, e, n, s, u, d, m, y, w, P, M, D) { - const z = h.text.placedSymbolArray, - B = h.text.dynamicLayoutVertexArray, - U = h.icon.dynamicLayoutVertexArray, - ee = {}; - B.clear(); - for (let J = 0; J < z.length; J++) { - const re = z.get(J), - se = re.hidden || !re.crossTileID || h.allowVerticalPlacement && !re.placedOrientation ? null : s[re.crossTileID]; - if (se) { - const de = new o.P(re.anchorX, re.anchorY), - ue = { - getElevation: D, - width: u.width, - height: u.height, - pitchedLabelPlaneMatrix: d, - pitchWithMap: n, - transform: u, - tileAnchorPoint: de, - translation: P, - unwrappedTileID: M - }, - ge = n ? li(de.x, de.y, ue) : Dr(de.x, de.y, ue), - Te = Tt(u.cameraToCenterDistance, ge.signedDistanceFromCamera); - let he = o.ap(h.textSizeData, y, re) * Te / o.aB; - n && (he *= h.tilePixelRatio / m); - const { - width: De, - height: He, - anchor: je, - textOffset: qe, - textBoxScale: $e - } = se, Rt = Bh(je, De, He, qe, $e, he), Nt = u.getPitchedTextCorrection(de.x + P[0], de.y + P[1], M), yt = fp(ge.point, ue, e, Rt, -u.bearingInRadians, Nt), sr = h.allowVerticalPlacement && re.placedOrientation === o.ao.vertical ? Math.PI / 2 : 0; - for (let Xr = 0; Xr < re.numGlyphs; Xr++) o.av(B, yt, sr); - w && re.associatedIconIndex >= 0 && (ee[re.associatedIconIndex] = { - shiftedAnchor: yt, - angle: sr - }) - } else mi(re.numGlyphs, B) - } - if (w) { - U.clear(); - const J = h.icon.placedSymbolArray; - for (let re = 0; re < J.length; re++) { - const se = J.get(re); - if (se.hidden) mi(se.numGlyphs, U); - else { - const de = ee[re]; - if (de) - for (let ue = 0; ue < se.numGlyphs; ue++) o.av(U, de.shiftedAnchor, de.angle); - else mi(se.numGlyphs, U) - } - } - h.icon.dynamicLayoutVertexBuffer.updateData(U) - } - h.text.dynamicLayoutVertexBuffer.updateData(B) - } - - function fl(h, e, n) { - return n.iconsInText && e ? "symbolTextAndIcon" : h ? "symbolSDF" : "symbolIcon" - } - - function Co(h, e, n, s, u, d, m, y, w, P, M, D, z) { - const B = h.context, - U = B.gl, - ee = h.transform, - J = y === "map", - re = w === "map", - se = y !== "viewport" && n.layout.get("symbol-placement") !== "point", - de = J && !re && !se, - ue = !n.layout.get("symbol-sort-key").isConstant(); - let ge = !1; - const Te = h.getDepthModeForSublayer(0, Vr.ReadOnly), - he = n._unevaluatedLayout.hasValue("text-variable-anchor") || n._unevaluatedLayout.hasValue("text-variable-anchor-offset"), - De = [], - He = ee.getCircleRadiusCorrection(); - for (const je of s) { - const qe = e.getTile(je), - $e = qe.getBucket(n); - if (!$e) continue; - const Rt = u ? $e.text : $e.icon; - if (!Rt || !Rt.segments.get().length || !Rt.hasVisibleVertices) continue; - const Nt = Rt.programConfigurations.get(n.id), - yt = u || $e.sdfIcons, - sr = u ? $e.textSizeData : $e.iconSizeData, - Xr = re || ee.pitch !== 0, - xi = h.useProgram(fl(yt, u, $e), Nt), - ki = o.an(sr, ee.zoom), - Pi = h.style.map.terrain && h.style.map.terrain.getTerrainData(je); - let ji, Ui, Wr, Ei, Qi = [0, 0], - dn = null; - if (u) Ui = qe.glyphAtlasTexture, Wr = U.LINEAR, ji = qe.glyphAtlasTexture.size, $e.iconsInText && (Qi = qe.imageAtlasTexture.size, dn = qe.imageAtlasTexture, Ei = Xr || h.options.rotating || h.options.zooming || sr.kind === "composite" || sr.kind === "camera" ? U.LINEAR : U.NEAREST); - else { - const en = n.layout.get("icon-size").constantOr(0) !== 1 || $e.iconsNeedLinear; - Ui = qe.imageAtlasTexture, Wr = yt || h.options.rotating || h.options.zooming || en || Xr ? U.LINEAR : U.NEAREST, ji = qe.imageAtlasTexture.size - } - const xn = o.aC(qe, 1, h.transform.zoom), - qn = $r(J, h.transform, xn), - Sa = o.L(); - o.aq(Sa, qn); - const as = mr(re, J, h.transform, xn), - ss = o.aD(ee, qe, d, m), - Ys = ee.getProjectionData({ - overscaledTileID: je, - applyGlobeMatrix: !z, - applyTerrainMatrix: !0 - }), - Js = he && $e.hasTextData(), - Is = n.layout.get("icon-text-fit") !== "none" && Js && $e.hasIconData(); - if (se) { - const en = h.style.map.terrain ? (da, tn) => h.style.map.terrain.getElevation(je, da, tn) : null, - pn = n.layout.get("text-rotation-alignment") === "map"; - di($e, h, u, qn, Sa, re, P, pn, je.toUnwrapped(), ee.width, ee.height, ss, en) - } - const Ms = u && he || Is, - Kn = se || Ms ? pp : re ? qn : h.transform.clipSpaceToPixelsMatrix, - Pa = yt && n.paint.get(u ? "text-halo-width" : "icon-halo-width").constantOr(1) !== 0; - let Vn; - Vn = yt ? $e.iconsInText ? sp(sr.kind, ki, de, re, se, Ms, h, Kn, as, ss, ji, Qi, He) : Th(sr.kind, ki, de, re, se, Ms, h, Kn, as, ss, u, ji, 0, He) : xo(sr.kind, ki, de, re, se, Ms, h, Kn, as, ss, u, ji, He); - const os = { - program: xi, - buffers: Rt, - uniformValues: Vn, - projectionData: Ys, - atlasTexture: Ui, - atlasTextureIcon: dn, - atlasInterpolation: Wr, - atlasInterpolationIcon: Ei, - isSDF: yt, - hasHalo: Pa - }; - if (ue && $e.canOverlap) { - ge = !0; - const en = Rt.segments.get(); - for (const pn of en) De.push({ - segments: new o.aM([pn]), - sortKey: pn.sortKey, - state: os, - terrainData: Pi - }) - } else De.push({ - segments: Rt.segments, - sortKey: 0, - state: os, - terrainData: Pi - }) - } - ge && De.sort(((je, qe) => je.sortKey - qe.sortKey)); - for (const je of De) { - const qe = je.state; - if (B.activeTexture.set(U.TEXTURE0), qe.atlasTexture.bind(qe.atlasInterpolation, U.CLAMP_TO_EDGE), qe.atlasTextureIcon && (B.activeTexture.set(U.TEXTURE1), qe.atlasTextureIcon && qe.atlasTextureIcon.bind(qe.atlasInterpolationIcon, U.CLAMP_TO_EDGE)), qe.isSDF) { - const $e = qe.uniformValues; - qe.hasHalo && ($e.u_is_halo = 1, So(qe.buffers, je.segments, n, h, qe.program, Te, M, D, $e, qe.projectionData, je.terrainData)), $e.u_is_halo = 0 - } - So(qe.buffers, je.segments, n, h, qe.program, Te, M, D, qe.uniformValues, qe.projectionData, je.terrainData) - } - } - - function So(h, e, n, s, u, d, m, y, w, P, M) { - const D = s.context; - u.draw(D, D.gl.TRIANGLES, d, m, y, wr.backCCW, w, M, P, n.id, h.layoutVertexBuffer, h.indexBuffer, e, n.paint, s.transform.zoom, h.programConfigurations.get(n.id), h.dynamicLayoutVertexBuffer, h.opacityVertexBuffer) - } - - function Dc(h, e, n, s, u) { - const d = h.context, - m = d.gl, - y = hi.disabled, - w = new Ti([m.ONE, m.ONE], o.bf.transparent, [!0, !0, !0, !0]), - P = e.getBucket(n); - if (!P) return; - const M = s.key; - let D = n.heatmapFbos.get(M); - D || (D = Po(d, e.tileSize, e.tileSize), n.heatmapFbos.set(M, D)), d.bindFramebuffer.set(D.framebuffer), d.viewport.set([0, 0, e.tileSize, e.tileSize]), d.clear({ - color: o.bf.transparent - }); - const z = P.programConfigurations.get(n.id), - B = h.useProgram("heatmap", z, !u), - U = h.transform.getProjectionData({ - overscaledTileID: e.tileID, - applyGlobeMatrix: !0, - applyTerrainMatrix: !0 - }), - ee = h.style.map.terrain.getTerrainData(s); - B.draw(d, m.TRIANGLES, Vr.disabled, y, w, wr.disabled, vh(e, h.transform.zoom, n.paint.get("heatmap-intensity"), 1), ee, U, n.id, P.layoutVertexBuffer, P.indexBuffer, P.segments, n.paint, h.transform.zoom, z) - } - - function Fh(h, e, n, s, u) { - const d = h.context, - m = d.gl, - y = h.transform; - d.setColorMode(h.colorModeForRenderPass()); - const w = Io(d, e), - P = n.key, - M = e.heatmapFbos.get(P); - if (!M) return; - d.activeTexture.set(m.TEXTURE0), m.bindTexture(m.TEXTURE_2D, M.colorAttachment.get()), d.activeTexture.set(m.TEXTURE1), w.bind(m.LINEAR, m.CLAMP_TO_EDGE); - const D = y.getProjectionData({ - overscaledTileID: n, - applyTerrainMatrix: u, - applyGlobeMatrix: !s - }); - h.useProgram("heatmapTexture").draw(d, m.TRIANGLES, Vr.disabled, hi.disabled, h.colorModeForRenderPass(), wr.disabled, xc(h, e, 0, 1), null, D, e.id, h.rasterBoundsBuffer, h.quadTriangleIndexBuffer, h.rasterBoundsSegments, e.paint, y.zoom), M.destroy(), e.heatmapFbos.delete(P) - } - - function Po(h, e, n) { - var s, u; - const d = h.gl, - m = d.createTexture(); - d.bindTexture(d.TEXTURE_2D, m), d.texParameteri(d.TEXTURE_2D, d.TEXTURE_WRAP_S, d.CLAMP_TO_EDGE), d.texParameteri(d.TEXTURE_2D, d.TEXTURE_WRAP_T, d.CLAMP_TO_EDGE), d.texParameteri(d.TEXTURE_2D, d.TEXTURE_MIN_FILTER, d.LINEAR), d.texParameteri(d.TEXTURE_2D, d.TEXTURE_MAG_FILTER, d.LINEAR); - const y = (s = h.HALF_FLOAT) !== null && s !== void 0 ? s : d.UNSIGNED_BYTE, - w = (u = h.RGBA16F) !== null && u !== void 0 ? u : d.RGBA; - d.texImage2D(d.TEXTURE_2D, 0, w, e, n, 0, d.RGBA, y, null); - const P = h.createFramebuffer(e, n, !1, !1); - return P.colorAttachment.set(m), P - } - - function Io(h, e) { - return e.colorRampTexture || (e.colorRampTexture = new o.T(h, e.colorRamp, h.gl.RGBA)), e.colorRampTexture - } - - function Mo(h, e, n, s, u) { - if (!n || !s || !s.imageAtlas) return; - const d = s.imageAtlas.patternPositions; - let m = d[n.to.toString()], - y = d[n.from.toString()]; - if (!m && y && (m = y), !y && m && (y = m), !m || !y) { - const w = u.getPaintProperty(e); - m = d[w], y = d[w] - } - m && y && h.setConstantPatternPositions(m, y) - } - - function ml(h, e, n, s, u, d, m, y) { - const w = h.context.gl, - P = "fill-pattern", - M = n.paint.get(P), - D = M && M.constantOr(1), - z = n.getCrossfadeParameters(); - let B, U, ee, J, re; - const se = h.transform, - de = n.paint.get("fill-translate"), - ue = n.paint.get("fill-translate-anchor"); - m ? (U = D && !n.getPaintProperty("fill-outline-color") ? "fillOutlinePattern" : "fillOutline", B = w.LINES) : (U = D ? "fillPattern" : "fill", B = w.TRIANGLES); - const ge = M.constantOr(null); - for (const Te of s) { - const he = e.getTile(Te); - if (D && !he.patternsLoaded()) continue; - const De = he.getBucket(n); - if (!De) continue; - const He = De.programConfigurations.get(n.id), - je = h.useProgram(U, He), - qe = h.style.map.terrain && h.style.map.terrain.getTerrainData(Te); - D && (h.context.activeTexture.set(w.TEXTURE0), he.imageAtlasTexture.bind(w.LINEAR, w.CLAMP_TO_EDGE), He.updatePaintBuffers(z)), Mo(He, P, ge, he, n); - const $e = se.getProjectionData({ - overscaledTileID: Te, - applyGlobeMatrix: !y, - applyTerrainMatrix: !0 - }), - Rt = o.aD(se, he, de, ue); - if (m) { - J = De.indexBuffer2, re = De.segments2; - const yt = [w.drawingBufferWidth, w.drawingBufferHeight]; - ee = U === "fillOutlinePattern" && D ? vo(h, z, he, yt, Rt) : go(yt, Rt) - } else J = De.indexBuffer, re = De.segments, ee = D ? nl(h, z, he, Rt) : { - u_fill_translate: Rt - }; - const Nt = h.stencilModeForClipping(Te); - je.draw(h.context, B, u, Nt, d, wr.backCCW, ee, qe, $e, n.id, De.layoutVertexBuffer, J, re, n.paint, h.transform.zoom, He) - } - } - - function Rc(h, e, n, s, u, d, m, y) { - const w = h.context, - P = w.gl, - M = "fill-extrusion-pattern", - D = n.paint.get(M), - z = D.constantOr(1), - B = n.getCrossfadeParameters(), - U = n.paint.get("fill-extrusion-opacity"), - ee = D.constantOr(null), - J = h.transform; - for (const re of s) { - const se = e.getTile(re), - de = se.getBucket(n); - if (!de) continue; - const ue = h.style.map.terrain && h.style.map.terrain.getTerrainData(re), - ge = de.programConfigurations.get(n.id), - Te = h.useProgram(z ? "fillExtrusionPattern" : "fillExtrusion", ge); - z && (h.context.activeTexture.set(P.TEXTURE0), se.imageAtlasTexture.bind(P.LINEAR, P.CLAMP_TO_EDGE), ge.updatePaintBuffers(B)); - const he = J.getProjectionData({ - overscaledTileID: re, - applyGlobeMatrix: !y, - applyTerrainMatrix: !0 - }); - Mo(ge, M, ee, se, n); - const De = o.aD(J, se, n.paint.get("fill-extrusion-translate"), n.paint.get("fill-extrusion-translate-anchor")), - He = n.paint.get("fill-extrusion-vertical-gradient"), - je = z ? tp(h, He, U, De, re, B, se) : ya(h, He, U, De); - Te.draw(w, w.gl.TRIANGLES, u, d, m, wr.backCCW, je, ue, he, n.id, de.layoutVertexBuffer, de.indexBuffer, de.segments, n.paint, h.transform.zoom, ge, h.style.map.terrain && de.centroidVertexBuffer) - } - } - - function bs(h, e, n, s, u, d, m, y, w) { - var P; - const M = h.style.projection, - D = h.context, - z = h.transform, - B = D.gl, - U = [`#define NUM_ILLUMINATION_SOURCES ${n.paint.get("hillshade-highlight-color").values.length}`], - ee = h.useProgram("hillshade", null, !1, U), - J = !h.options.moving; - for (const re of s) { - const se = e.getTile(re), - de = se.fbo; - if (!de) continue; - const ue = M.getMeshFromTileID(D, re.canonical, y, !0, "raster"), - ge = (P = h.style.map.terrain) === null || P === void 0 ? void 0 : P.getTerrainData(re); - D.activeTexture.set(B.TEXTURE0), B.bindTexture(B.TEXTURE_2D, de.colorAttachment.get()); - const Te = z.getProjectionData({ - overscaledTileID: re, - aligned: J, - applyGlobeMatrix: !w, - applyTerrainMatrix: !0 - }); - ee.draw(D, B.TRIANGLES, d, u[re.overscaledZ], m, wr.backCCW, np(h, se, n), ge, Te, n.id, ue.vertexBuffer, ue.indexBuffer, ue.segments) - } - } - - function Bc(h, e, n, s, u, d, m, y, w) { - var P; - const M = h.style.projection, - D = h.context, - z = h.transform, - B = D.gl, - U = h.useProgram("colorRelief"), - ee = !h.options.moving; - let J = !0, - re = 0; - for (const se of s) { - const de = e.getTile(se), - ue = de.dem; - if (J) { - const je = B.getParameter(B.MAX_TEXTURE_SIZE), - { - elevationTexture: qe, - colorTexture: $e - } = n.getColorRampTextures(D, je, ue.getUnpackVector()); - D.activeTexture.set(B.TEXTURE1), qe.bind(B.NEAREST, B.CLAMP_TO_EDGE), D.activeTexture.set(B.TEXTURE4), $e.bind(B.LINEAR, B.CLAMP_TO_EDGE), J = !1, re = qe.size[0] - } - if (!ue || !ue.data) continue; - const ge = ue.stride, - Te = ue.getPixels(); - if (D.activeTexture.set(B.TEXTURE0), D.pixelStoreUnpackPremultiplyAlpha.set(!1), de.demTexture = de.demTexture || h.getTileTexture(ge), de.demTexture) { - const je = de.demTexture; - je.update(Te, { - premultiply: !1 - }), je.bind(B.LINEAR, B.CLAMP_TO_EDGE) - } else de.demTexture = new o.T(D, Te, B.RGBA, { - premultiply: !1 - }), de.demTexture.bind(B.LINEAR, B.CLAMP_TO_EDGE); - const he = M.getMeshFromTileID(D, se.canonical, y, !0, "raster"), - De = (P = h.style.map.terrain) === null || P === void 0 ? void 0 : P.getTerrainData(se), - He = z.getProjectionData({ - overscaledTileID: se, - aligned: ee, - applyGlobeMatrix: !w, - applyTerrainMatrix: !0 - }); - U.draw(D, B.TRIANGLES, d, u[se.overscaledZ], m, wr.backCCW, xh(n, de.dem, re), De, He, n.id, he.vertexBuffer, he.indexBuffer, he.segments) - } - } - const _l = [new o.P(0, 0), new o.P(o.$, 0), new o.P(o.$, o.$), new o.P(0, o.$)]; - - function ws(h, e, n, s, u, d, m, y, w = !1, P = !1) { - const M = s[s.length - 1].overscaledZ, - D = h.context, - z = D.gl, - B = h.useProgram("raster"), - U = h.transform, - ee = h.style.projection, - J = h.colorModeForRenderPass(), - re = !h.options.moving; - for (const se of s) { - const de = h.getDepthModeForSublayer(se.overscaledZ - M, n.paint.get("raster-opacity") === 1 ? Vr.ReadWrite : Vr.ReadOnly, z.LESS), - ue = e.getTile(se); - ue.registerFadeDuration(n.paint.get("raster-fade-duration")); - const ge = e.findLoadedParent(se, 0), - Te = e.findLoadedSibling(se), - he = Fc(ue, ge || Te || null, e, n, h.transform, h.style.map.terrain); - let De, He; - const je = n.paint.get("raster-resampling") === "nearest" ? z.NEAREST : z.LINEAR; - D.activeTexture.set(z.TEXTURE0), ue.texture.bind(je, z.CLAMP_TO_EDGE, z.LINEAR_MIPMAP_NEAREST), D.activeTexture.set(z.TEXTURE1), ge ? (ge.texture.bind(je, z.CLAMP_TO_EDGE, z.LINEAR_MIPMAP_NEAREST), De = Math.pow(2, ge.tileID.overscaledZ - ue.tileID.overscaledZ), He = [ue.tileID.canonical.x * De % 1, ue.tileID.canonical.y * De % 1]) : ue.texture.bind(je, z.CLAMP_TO_EDGE, z.LINEAR_MIPMAP_NEAREST), ue.texture.useMipmap && D.extTextureFilterAnisotropic && h.transform.pitch > 20 && z.texParameterf(z.TEXTURE_2D, D.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT, D.extTextureFilterAnisotropicMax); - const qe = h.style.map.terrain && h.style.map.terrain.getTerrainData(se), - $e = U.getProjectionData({ - overscaledTileID: se, - aligned: re, - applyGlobeMatrix: !P, - applyTerrainMatrix: !0 - }), - Rt = yo(He || [0, 0], De || 1, he, n, y), - Nt = ee.getMeshFromTileID(D, se.canonical, d, m, "raster"); - B.draw(D, z.TRIANGLES, de, u ? u[se.overscaledZ] : hi.disabled, J, w ? wr.frontCCW : wr.backCCW, Rt, qe, $e, n.id, Nt.vertexBuffer, Nt.indexBuffer, Nt.segments) - } - } - - function Fc(h, e, n, s, u, d) { - const m = s.paint.get("raster-fade-duration"); - if (!d && m > 0) { - const y = ye.now(), - w = (y - h.timeAdded) / m, - P = e ? (y - e.timeAdded) / m : -1, - M = n.getSource(), - D = Ot(u, { - tileSize: M.tileSize, - roundZoom: M.roundZoom - }), - z = !e || Math.abs(e.tileID.overscaledZ - D) > Math.abs(h.tileID.overscaledZ - D), - B = z && h.refreshedUponExpiration ? 1 : o.ah(z ? w : 1 - P, 0, 1); - return h.refreshedUponExpiration && w >= 1 && (h.refreshedUponExpiration = !1), e ? { - opacity: 1, - mix: 1 - B - } : { - opacity: B, - mix: 0 - } - } - return { - opacity: 1, - mix: 0 - } - } - const Oh = new o.bf(1, 0, 0, 1), - Nh = new o.bf(0, 1, 0, 1), - gl = new o.bf(0, 0, 1, 1), - Oc = new o.bf(1, 0, 1, 1), - mp = new o.bf(0, 1, 1, 1); - - function Nc(h, e, n, s) { - Oa(h, 0, e + n / 2, h.transform.width, n, s) - } - - function Vi(h, e, n, s) { - Oa(h, e - n / 2, 0, n, h.transform.height, s) - } - - function Oa(h, e, n, s, u, d) { - const m = h.context, - y = m.gl; - y.enable(y.SCISSOR_TEST), y.scissor(e * h.pixelRatio, n * h.pixelRatio, s * h.pixelRatio, u * h.pixelRatio), m.clear({ - color: d - }), y.disable(y.SCISSOR_TEST) - } - - function ua(h, e, n) { - const s = h.context, - u = s.gl, - d = h.useProgram("debug"), - m = Vr.disabled, - y = hi.disabled, - w = h.colorModeForRenderPass(), - P = "$debug", - M = h.style.map.terrain && h.style.map.terrain.getTerrainData(n); - s.activeTexture.set(u.TEXTURE0); - const D = e.getTileByID(n.key).latestRawTileData, - z = Math.floor((D && D.byteLength || 0) / 1024), - B = e.getTile(n).tileSize, - U = 512 / Math.min(B, 512) * (n.overscaledZ / h.transform.zoom) * .5; - let ee = n.canonical.toString(); - n.overscaledZ !== n.canonical.z && (ee += ` => ${n.overscaledZ}`), (function(re, se) { - re.initDebugOverlayCanvas(); - const de = re.debugOverlayCanvas, - ue = re.context.gl, - ge = re.debugOverlayCanvas.getContext("2d"); - ge.clearRect(0, 0, de.width, de.height), ge.shadowColor = "white", ge.shadowBlur = 2, ge.lineWidth = 1.5, ge.strokeStyle = "white", ge.textBaseline = "top", ge.font = "bold 36px Open Sans, sans-serif", ge.fillText(se, 5, 5), ge.strokeText(se, 5, 5), re.debugOverlayTexture.update(de), re.debugOverlayTexture.bind(ue.LINEAR, ue.CLAMP_TO_EDGE) - })(h, `${ee} ${z}kB`); - const J = h.transform.getProjectionData({ - overscaledTileID: n, - applyGlobeMatrix: !0, - applyTerrainMatrix: !0 - }); - d.draw(s, u.TRIANGLES, m, y, Ti.alphaBlended, wr.disabled, _s(o.bf.transparent, U), null, J, P, h.debugBuffer, h.quadTriangleIndexBuffer, h.debugSegments), d.draw(s, u.LINE_STRIP, m, y, w, wr.disabled, _s(o.bf.red), M, J, P, h.debugBuffer, h.tileBorderIndexBuffer, h.debugSegments) - } - - function vl(h, e, n, s) { - const { - isRenderingGlobe: u - } = s, d = h.context, m = d.gl, y = h.transform, w = h.colorModeForRenderPass(), P = h.getDepthModeFor3D(), M = h.useProgram("terrain"); - d.bindFramebuffer.set(null), d.viewport.set([0, 0, h.width, h.height]); - for (const D of n) { - const z = e.getTerrainMesh(D.tileID), - B = h.renderToTexture.getTexture(D), - U = e.getTerrainData(D.tileID); - d.activeTexture.set(m.TEXTURE0), m.bindTexture(m.TEXTURE_2D, B.texture); - const ee = e.getMeshFrameDelta(y.zoom), - J = y.calculateFogMatrix(D.tileID.toUnwrapped()), - re = rl(ee, J, h.style.sky, y.pitch, u), - se = y.getProjectionData({ - overscaledTileID: D.tileID, - applyTerrainMatrix: !1, - applyGlobeMatrix: !0 - }); - M.draw(d, m.TRIANGLES, P, hi.disabled, w, wr.backCCW, re, U, se, "terrain", z.vertexBuffer, z.indexBuffer, z.segments) - } - } - - function Ao(h, e) { - if (!e.mesh) { - const n = new o.aL; - n.emplaceBack(-1, -1), n.emplaceBack(1, -1), n.emplaceBack(1, 1), n.emplaceBack(-1, 1); - const s = new o.aN; - s.emplaceBack(0, 1, 2), s.emplaceBack(0, 2, 3), e.mesh = new Ri(h.createVertexBuffer(n, ui.members), h.createIndexBuffer(s), o.aM.simpleSegment(0, 0, n.length, s.length)) - } - return e.mesh - } - class jh { - constructor(e, n) { - this.context = new Dh(e), this.transform = n, this._tileTextures = {}, this.terrainFacilitator = { - dirty: !0, - matrix: o.ag(new Float64Array(16)), - renderTime: 0 - }, this.setup(), this.numSublayers = Pt.maxUnderzooming + Pt.maxOverzooming + 1, this.depthEpsilon = 1 / Math.pow(2, 16), this.crossTileSymbolIndex = new gi - } - resize(e, n, s) { - if (this.width = Math.floor(e * s), this.height = Math.floor(n * s), this.pixelRatio = s, this.context.viewport.set([0, 0, this.width, this.height]), this.style) - for (const u of this.style._order) this.style._layers[u].resize() - } - setup() { - const e = this.context, - n = new o.aL; - n.emplaceBack(0, 0), n.emplaceBack(o.$, 0), n.emplaceBack(0, o.$), n.emplaceBack(o.$, o.$), this.tileExtentBuffer = e.createVertexBuffer(n, ui.members), this.tileExtentSegments = o.aM.simpleSegment(0, 0, 4, 2); - const s = new o.aL; - s.emplaceBack(0, 0), s.emplaceBack(o.$, 0), s.emplaceBack(0, o.$), s.emplaceBack(o.$, o.$), this.debugBuffer = e.createVertexBuffer(s, ui.members), this.debugSegments = o.aM.simpleSegment(0, 0, 4, 5); - const u = new o.c6; - u.emplaceBack(0, 0, 0, 0), u.emplaceBack(o.$, 0, o.$, 0), u.emplaceBack(0, o.$, 0, o.$), u.emplaceBack(o.$, o.$, o.$, o.$), this.rasterBoundsBuffer = e.createVertexBuffer(u, Qd.members), this.rasterBoundsSegments = o.aM.simpleSegment(0, 0, 4, 2); - const d = new o.aL; - d.emplaceBack(0, 0), d.emplaceBack(o.$, 0), d.emplaceBack(0, o.$), d.emplaceBack(o.$, o.$), this.rasterBoundsBufferPosOnly = e.createVertexBuffer(d, ui.members), this.rasterBoundsSegmentsPosOnly = o.aM.simpleSegment(0, 0, 4, 5); - const m = new o.aL; - m.emplaceBack(0, 0), m.emplaceBack(1, 0), m.emplaceBack(0, 1), m.emplaceBack(1, 1), this.viewportBuffer = e.createVertexBuffer(m, ui.members), this.viewportSegments = o.aM.simpleSegment(0, 0, 4, 2); - const y = new o.c7; - y.emplaceBack(0), y.emplaceBack(1), y.emplaceBack(3), y.emplaceBack(2), y.emplaceBack(0), this.tileBorderIndexBuffer = e.createIndexBuffer(y); - const w = new o.aN; - w.emplaceBack(1, 0, 2), w.emplaceBack(1, 2, 3), this.quadTriangleIndexBuffer = e.createIndexBuffer(w); - const P = this.context.gl; - this.stencilClearMode = new hi({ - func: P.ALWAYS, - mask: 0 - }, 0, 255, P.ZERO, P.ZERO, P.ZERO), this.tileExtentMesh = new Ri(this.tileExtentBuffer, this.quadTriangleIndexBuffer, this.tileExtentSegments) - } - clearStencil() { - const e = this.context, - n = e.gl; - this.nextStencilID = 1, this.currentStencilSource = void 0; - const s = o.L(); - o.bY(s, 0, this.width, this.height, 0, 0, 1), o.N(s, s, [n.drawingBufferWidth, n.drawingBufferHeight, 0]); - const u = { - mainMatrix: s, - tileMercatorCoords: [0, 0, 1, 1], - clippingPlane: [0, 0, 0, 0], - projectionTransition: 0, - fallbackMatrix: s - }; - this.useProgram("clippingMask", null, !0).draw(e, n.TRIANGLES, Vr.disabled, this.stencilClearMode, Ti.disabled, wr.disabled, null, null, u, "$clipping", this.viewportBuffer, this.quadTriangleIndexBuffer, this.viewportSegments) - } - _renderTileClippingMasks(e, n, s) { - if (this.currentStencilSource === e.source || !e.isTileClipped() || !n || !n.length) return; - this.currentStencilSource = e.source, this.nextStencilID + n.length > 256 && this.clearStencil(); - const u = this.context; - u.setColorMode(Ti.disabled), u.setDepthMode(Vr.disabled); - const d = {}; - for (const m of n) d[m.key] = this.nextStencilID++; - this._renderTileMasks(d, n, s, !0), this._renderTileMasks(d, n, s, !1), this._tileClippingMaskIDs = d - } - _renderTileMasks(e, n, s, u) { - const d = this.context, - m = d.gl, - y = this.style.projection, - w = this.transform, - P = this.useProgram("clippingMask"); - for (const M of n) { - const D = e[M.key], - z = this.style.map.terrain && this.style.map.terrain.getTerrainData(M), - B = y.getMeshFromTileID(this.context, M.canonical, u, !0, "stencil"), - U = w.getProjectionData({ - overscaledTileID: M, - applyGlobeMatrix: !s, - applyTerrainMatrix: !0 - }); - P.draw(d, m.TRIANGLES, Vr.disabled, new hi({ - func: m.ALWAYS, - mask: 0 - }, D, 255, m.KEEP, m.KEEP, m.REPLACE), Ti.disabled, s ? wr.disabled : wr.backCCW, null, z, U, "$clipping", B.vertexBuffer, B.indexBuffer, B.segments) - } - } - _renderTilesDepthBuffer() { - const e = this.context, - n = e.gl, - s = this.style.projection, - u = this.transform, - d = this.useProgram("depth"), - m = this.getDepthModeFor3D(), - y = xe(u, { - tileSize: u.tileSize - }); - for (const w of y) { - const P = this.style.map.terrain && this.style.map.terrain.getTerrainData(w), - M = s.getMeshFromTileID(this.context, w.canonical, !0, !0, "raster"), - D = u.getProjectionData({ - overscaledTileID: w, - applyGlobeMatrix: !0, - applyTerrainMatrix: !0 - }); - d.draw(e, n.TRIANGLES, m, hi.disabled, Ti.disabled, wr.backCCW, null, P, D, "$clipping", M.vertexBuffer, M.indexBuffer, M.segments) - } - } - stencilModeFor3D() { - this.currentStencilSource = void 0, this.nextStencilID + 1 > 256 && this.clearStencil(); - const e = this.nextStencilID++, - n = this.context.gl; - return new hi({ - func: n.NOTEQUAL, - mask: 255 - }, e, 255, n.KEEP, n.KEEP, n.REPLACE) - } - stencilModeForClipping(e) { - const n = this.context.gl; - return new hi({ - func: n.EQUAL, - mask: 255 - }, this._tileClippingMaskIDs[e.key], 0, n.KEEP, n.KEEP, n.REPLACE) - } - getStencilConfigForOverlapAndUpdateStencilID(e) { - const n = this.context.gl, - s = e.sort(((m, y) => y.overscaledZ - m.overscaledZ)), - u = s[s.length - 1].overscaledZ, - d = s[0].overscaledZ - u + 1; - if (d > 1) { - this.currentStencilSource = void 0, this.nextStencilID + d > 256 && this.clearStencil(); - const m = {}; - for (let y = 0; y < d; y++) m[y + u] = new hi({ - func: n.GEQUAL, - mask: 255 - }, y + this.nextStencilID, 255, n.KEEP, n.KEEP, n.REPLACE); - return this.nextStencilID += d, [m, s] - } - return [{ - [u]: hi.disabled - }, s] - } - stencilConfigForOverlapTwoPass(e) { - const n = this.context.gl, - s = e.sort(((m, y) => y.overscaledZ - m.overscaledZ)), - u = s[s.length - 1].overscaledZ, - d = s[0].overscaledZ - u + 1; - if (this.clearStencil(), d > 1) { - const m = {}, - y = {}; - for (let w = 0; w < d; w++) m[w + u] = new hi({ - func: n.GREATER, - mask: 255 - }, d + 1 + w, 255, n.KEEP, n.KEEP, n.REPLACE), y[w + u] = new hi({ - func: n.GREATER, - mask: 255 - }, 1 + w, 255, n.KEEP, n.KEEP, n.REPLACE); - return this.nextStencilID = 2 * d + 1, [m, y, s] - } - return this.nextStencilID = 3, [{ - [u]: new hi({ - func: n.GREATER, - mask: 255 - }, 2, 255, n.KEEP, n.KEEP, n.REPLACE) - }, { - [u]: new hi({ - func: n.GREATER, - mask: 255 - }, 1, 255, n.KEEP, n.KEEP, n.REPLACE) - }, s] - } - colorModeForRenderPass() { - const e = this.context.gl; - return this._showOverdrawInspector ? new Ti([e.CONSTANT_COLOR, e.ONE], new o.bf(.125, .125, .125, 0), [!0, !0, !0, !0]) : this.renderPass === "opaque" ? Ti.unblended : Ti.alphaBlended - } - getDepthModeForSublayer(e, n, s) { - if (!this.opaquePassEnabledForLayer()) return Vr.disabled; - const u = 1 - ((1 + this.currentLayer) * this.numSublayers + e) * this.depthEpsilon; - return new Vr(s || this.context.gl.LEQUAL, n, [u, u]) - } - getDepthModeFor3D() { - return new Vr(this.context.gl.LEQUAL, Vr.ReadWrite, this.depthRangeFor3D) - } - opaquePassEnabledForLayer() { - return this.currentLayer < this.opaquePassCutoff - } - render(e, n) { - var s, u; - this.style = e, this.options = n, this.lineAtlas = e.lineAtlas, this.imageManager = e.imageManager, this.glyphManager = e.glyphManager, this.symbolFadeChange = e.placement.symbolFadeChange(ye.now()), this.imageManager.beginFrame(); - const d = this.style._order, - m = this.style.sourceCaches, - y = {}, - w = {}, - P = {}, - M = { - isRenderingToTexture: !1, - isRenderingGlobe: ((s = e.projection) === null || s === void 0 ? void 0 : s.transitionState) > 0 - }; - for (const z in m) { - const B = m[z]; - B.used && B.prepare(this.context), y[z] = B.getVisibleCoordinates(!1), w[z] = y[z].slice().reverse(), P[z] = B.getVisibleCoordinates(!0).reverse() - } - this.opaquePassCutoff = 1 / 0; - for (let z = 0; z < d.length; z++) - if (this.style._layers[d[z]].is3D()) { - this.opaquePassCutoff = z; - break - } this.maybeDrawDepthAndCoords(!1), this.renderToTexture && (this.renderToTexture.prepareForRender(this.style, this.transform.zoom), this.opaquePassCutoff = 0), this.renderPass = "offscreen"; - for (const z of d) { - const B = this.style._layers[z]; - if (!B.hasOffscreenPass() || B.isHidden(this.transform.zoom)) continue; - const U = w[B.source]; - (B.type === "custom" || U.length) && this.renderLayer(this, m[B.source], B, U, M) - } - if ((u = this.style.projection) === null || u === void 0 || u.updateGPUdependent({ - context: this.context, - useProgram: z => this.useProgram(z) - }), this.context.viewport.set([0, 0, this.width, this.height]), this.context.bindFramebuffer.set(null), this.context.clear({ - color: n.showOverdrawInspector ? o.bf.black : o.bf.transparent, - depth: 1 - }), this.clearStencil(), this.style.sky && (function(z, B) { - const U = z.context, - ee = U.gl, - J = ((Te, he, De) => { - const He = Math.cos(he.rollInRadians), - je = Math.sin(he.rollInRadians), - qe = le(he), - $e = he.getProjectionData({ - overscaledTileID: null, - applyGlobeMatrix: !0, - applyTerrainMatrix: !0 - }).projectionTransition; - return { - u_sky_color: Te.properties.get("sky-color"), - u_horizon_color: Te.properties.get("horizon-color"), - u_horizon: [(he.width / 2 - qe * je) * De, (he.height / 2 + qe * He) * De], - u_horizon_normal: [-je, He], - u_sky_horizon_blend: Te.properties.get("sky-horizon-blend") * he.height / 2 * De, - u_sky_blend: $e - } - })(B, z.style.map.transform, z.pixelRatio), - re = new Vr(ee.LEQUAL, Vr.ReadWrite, [0, 1]), - se = hi.disabled, - de = z.colorModeForRenderPass(), - ue = z.useProgram("sky"), - ge = Ao(U, B); - ue.draw(U, ee.TRIANGLES, re, se, de, wr.disabled, J, null, void 0, "sky", ge.vertexBuffer, ge.indexBuffer, ge.segments) - })(this, this.style.sky), this._showOverdrawInspector = n.showOverdrawInspector, this.depthRangeFor3D = [0, 1 - (e._order.length + 2) * this.numSublayers * this.depthEpsilon], !this.renderToTexture) - for (this.renderPass = "opaque", this.currentLayer = d.length - 1; this.currentLayer >= 0; this.currentLayer--) { - const z = this.style._layers[d[this.currentLayer]], - B = m[z.source], - U = y[z.source]; - this._renderTileClippingMasks(z, U, !1), this.renderLayer(this, B, z, U, M) - } - this.renderPass = "translucent"; - let D = !1; - for (this.currentLayer = 0; this.currentLayer < d.length; this.currentLayer++) { - const z = this.style._layers[d[this.currentLayer]], - B = m[z.source]; - if (this.renderToTexture && this.renderToTexture.renderLayer(z, M)) continue; - this.opaquePassEnabledForLayer() || D || (D = !0, M.isRenderingGlobe && !this.style.map.terrain && this._renderTilesDepthBuffer()); - const U = (z.type === "symbol" ? P : w)[z.source]; - this._renderTileClippingMasks(z, y[z.source], !!this.renderToTexture), this.renderLayer(this, B, z, U, M) - } - if (M.isRenderingGlobe && (function(z, B, U) { - const ee = z.context, - J = ee.gl, - re = z.useProgram("atmosphere"), - se = new Vr(J.LEQUAL, Vr.ReadOnly, [0, 1]), - de = z.transform, - ue = (function($e, Rt) { - const Nt = $e.properties.get("position"), - yt = [-Nt.x, -Nt.y, -Nt.z], - sr = o.ag(new Float64Array(16)); - return $e.properties.get("anchor") === "map" && (o.b6(sr, sr, Rt.rollInRadians), o.b7(sr, sr, -Rt.pitchInRadians), o.b6(sr, sr, Rt.bearingInRadians), o.b7(sr, sr, Rt.center.lat * Math.PI / 180), o.bz(sr, sr, -Rt.center.lng * Math.PI / 180)), o.c5(yt, yt, sr), yt - })(U, z.transform), - ge = de.getProjectionData({ - overscaledTileID: null, - applyGlobeMatrix: !0, - applyTerrainMatrix: !0 - }), - Te = B.properties.get("atmosphere-blend") * ge.projectionTransition; - if (Te === 0) return; - const he = Bs(de.worldSize, de.center.lat), - De = de.inverseProjectionMatrix, - He = new Float64Array(4); - He[3] = 1, o.aw(He, He, de.modelViewProjectionMatrix), He[0] /= He[3], He[1] /= He[3], He[2] /= He[3], He[3] = 1, o.aw(He, He, De), He[0] /= He[3], He[1] /= He[3], He[2] /= He[3], He[3] = 1; - const je = (($e, Rt, Nt, yt, sr) => ({ - u_sun_pos: $e, - u_atmosphere_blend: Rt, - u_globe_position: Nt, - u_globe_radius: yt, - u_inv_proj_matrix: sr - }))(ue, Te, [He[0], He[1], He[2]], he, De), - qe = Ao(ee, B); - re.draw(ee, J.TRIANGLES, se, hi.disabled, Ti.alphaBlended, wr.disabled, je, null, null, "atmosphere", qe.vertexBuffer, qe.indexBuffer, qe.segments) - })(this, this.style.sky, this.style.light), this.options.showTileBoundaries) { - const z = (function(B, U) { - let ee = null; - const J = Object.values(B._layers).flatMap((ue => ue.source && !ue.isHidden(U) ? [B.sourceCaches[ue.source]] : [])), - re = J.filter((ue => ue.getSource().type === "vector")), - se = J.filter((ue => ue.getSource().type !== "vector")), - de = ue => { - (!ee || ee.getSource().maxzoom < ue.getSource().maxzoom) && (ee = ue) - }; - return re.forEach((ue => de(ue))), ee || se.forEach((ue => de(ue))), ee - })(this.style, this.transform.zoom); - z && (function(B, U, ee) { - for (let J = 0; J < ee.length; J++) ua(B, U, ee[J]) - })(this, z, z.getVisibleCoordinates()) - } - this.options.showPadding && (function(z) { - const B = z.transform.padding; - Nc(z, z.transform.height - (B.top || 0), 3, Oh), Nc(z, B.bottom || 0, 3, Nh), Vi(z, B.left || 0, 3, gl), Vi(z, z.transform.width - (B.right || 0), 3, Oc); - const U = z.transform.centerPoint; - (function(ee, J, re, se) { - Oa(ee, J - 1, re - 10, 2, 20, se), Oa(ee, J - 10, re - 1, 20, 2, se) - })(z, U.x, z.transform.height - U.y, mp) - })(this), this.context.setDefault() - } - maybeDrawDepthAndCoords(e) { - if (!this.style || !this.style.map || !this.style.map.terrain) return; - const n = this.terrainFacilitator.matrix, - s = this.transform.modelViewProjectionMatrix; - let u = this.terrainFacilitator.dirty; - u || (u = e ? !o.c8(n, s) : !o.c9(n, s)), u || (u = this.style.map.terrain.sourceCache.anyTilesAfterTime(this.terrainFacilitator.renderTime)), u && (o.ca(n, s), this.terrainFacilitator.renderTime = Date.now(), this.terrainFacilitator.dirty = !1, (function(d, m) { - const y = d.context, - w = y.gl, - P = d.transform, - M = Ti.unblended, - D = new Vr(w.LEQUAL, Vr.ReadWrite, [0, 1]), - z = m.sourceCache.getRenderableTiles(), - B = d.useProgram("terrainDepth"); - y.bindFramebuffer.set(m.getFramebuffer("depth").framebuffer), y.viewport.set([0, 0, d.width / devicePixelRatio, d.height / devicePixelRatio]), y.clear({ - color: o.bf.transparent, - depth: 1 - }); - for (const U of z) { - const ee = m.getTerrainMesh(U.tileID), - J = m.getTerrainData(U.tileID), - re = P.getProjectionData({ - overscaledTileID: U.tileID, - applyTerrainMatrix: !1, - applyGlobeMatrix: !0 - }), - se = { - u_ele_delta: m.getMeshFrameDelta(P.zoom) - }; - B.draw(y, w.TRIANGLES, D, hi.disabled, M, wr.backCCW, se, J, re, "terrain", ee.vertexBuffer, ee.indexBuffer, ee.segments) - } - y.bindFramebuffer.set(null), y.viewport.set([0, 0, d.width, d.height]) - })(this, this.style.map.terrain), (function(d, m) { - const y = d.context, - w = y.gl, - P = d.transform, - M = Ti.unblended, - D = new Vr(w.LEQUAL, Vr.ReadWrite, [0, 1]), - z = m.getCoordsTexture(), - B = m.sourceCache.getRenderableTiles(), - U = d.useProgram("terrainCoords"); - y.bindFramebuffer.set(m.getFramebuffer("coords").framebuffer), y.viewport.set([0, 0, d.width / devicePixelRatio, d.height / devicePixelRatio]), y.clear({ - color: o.bf.transparent, - depth: 1 - }), m.coordsIndex = []; - for (const ee of B) { - const J = m.getTerrainMesh(ee.tileID), - re = m.getTerrainData(ee.tileID); - y.activeTexture.set(w.TEXTURE0), w.bindTexture(w.TEXTURE_2D, z.texture); - const se = { - u_terrain_coords_id: (255 - m.coordsIndex.length) / 255, - u_texture: 0, - u_ele_delta: m.getMeshFrameDelta(P.zoom) - }, - de = P.getProjectionData({ - overscaledTileID: ee.tileID, - applyTerrainMatrix: !1, - applyGlobeMatrix: !0 - }); - U.draw(y, w.TRIANGLES, D, hi.disabled, M, wr.backCCW, se, re, de, "terrain", J.vertexBuffer, J.indexBuffer, J.segments), m.coordsIndex.push(ee.tileID.key) - } - y.bindFramebuffer.set(null), y.viewport.set([0, 0, d.width, d.height]) - })(this, this.style.map.terrain)) - } - renderLayer(e, n, s, u, d) { - s.isHidden(this.transform.zoom) || (s.type === "background" || s.type === "custom" || (u || []).length) && (this.id = s.id, o.cb(s) ? (function(m, y, w, P, M, D) { - if (m.renderPass !== "translucent") return; - const { - isRenderingToTexture: z - } = D, B = hi.disabled, U = m.colorModeForRenderPass(); - (w._unevaluatedLayout.hasValue("text-variable-anchor") || w._unevaluatedLayout.hasValue("text-variable-anchor-offset")) && (function(ee, J, re, se, de, ue, ge, Te, he) { - const De = J.transform, - He = J.style.map.terrain, - je = de === "map", - qe = ue === "map"; - for (const $e of ee) { - const Rt = se.getTile($e), - Nt = Rt.getBucket(re); - if (!Nt || !Nt.text || !Nt.text.segments.get().length) continue; - const yt = o.an(Nt.textSizeData, De.zoom), - sr = o.aC(Rt, 1, J.transform.zoom), - Xr = $r(je, J.transform, sr), - xi = re.layout.get("icon-text-fit") !== "none" && Nt.hasIconData(); - if (yt) { - const ki = Math.pow(2, De.zoom - Rt.tileID.overscaledZ), - Pi = He ? (ji, Ui) => He.getElevation($e, ji, Ui) : null; - Lc(Nt, je, qe, he, De, Xr, ki, yt, xi, o.aD(De, Rt, ge, Te), $e.toUnwrapped(), Pi) - } - } - })(P, m, w, y, w.layout.get("text-rotation-alignment"), w.layout.get("text-pitch-alignment"), w.paint.get("text-translate"), w.paint.get("text-translate-anchor"), M), w.paint.get("icon-opacity").constantOr(1) !== 0 && Co(m, y, w, P, !1, w.paint.get("icon-translate"), w.paint.get("icon-translate-anchor"), w.layout.get("icon-rotation-alignment"), w.layout.get("icon-pitch-alignment"), w.layout.get("icon-keep-upright"), B, U, z), w.paint.get("text-opacity").constantOr(1) !== 0 && Co(m, y, w, P, !0, w.paint.get("text-translate"), w.paint.get("text-translate-anchor"), w.layout.get("text-rotation-alignment"), w.layout.get("text-pitch-alignment"), w.layout.get("text-keep-upright"), B, U, z), y.map.showCollisionBoxes && (Rh(m, y, w, P, !0), Rh(m, y, w, P, !1)) - })(e, n, s, u, this.style.placement.variableOffsets, d) : o.cc(s) ? (function(m, y, w, P, M) { - if (m.renderPass !== "translucent") return; - const { - isRenderingToTexture: D - } = M, z = w.paint.get("circle-opacity"), B = w.paint.get("circle-stroke-width"), U = w.paint.get("circle-stroke-opacity"), ee = !w.layout.get("circle-sort-key").isConstant(); - if (z.constantOr(1) === 0 && (B.constantOr(1) === 0 || U.constantOr(1) === 0)) return; - const J = m.context, - re = J.gl, - se = m.transform, - de = m.getDepthModeForSublayer(0, Vr.ReadOnly), - ue = hi.disabled, - ge = m.colorModeForRenderPass(), - Te = [], - he = se.getCircleRadiusCorrection(); - for (let De = 0; De < P.length; De++) { - const He = P[De], - je = y.getTile(He), - qe = je.getBucket(w); - if (!qe) continue; - const $e = w.paint.get("circle-translate"), - Rt = w.paint.get("circle-translate-anchor"), - Nt = o.aD(se, je, $e, Rt), - yt = qe.programConfigurations.get(w.id), - sr = m.useProgram("circle", yt), - Xr = qe.layoutVertexBuffer, - xi = qe.indexBuffer, - ki = m.style.map.terrain && m.style.map.terrain.getTerrainData(He), - Pi = { - programConfiguration: yt, - program: sr, - layoutVertexBuffer: Xr, - indexBuffer: xi, - uniformValues: rp(m, je, w, Nt, he), - terrainData: ki, - projectionData: se.getProjectionData({ - overscaledTileID: He, - applyGlobeMatrix: !D, - applyTerrainMatrix: !0 - }) - }; - if (ee) { - const ji = qe.segments.get(); - for (const Ui of ji) Te.push({ - segments: new o.aM([Ui]), - sortKey: Ui.sortKey, - state: Pi - }) - } else Te.push({ - segments: qe.segments, - sortKey: 0, - state: Pi - }) - } - ee && Te.sort(((De, He) => De.sortKey - He.sortKey)); - for (const De of Te) { - const { - programConfiguration: He, - program: je, - layoutVertexBuffer: qe, - indexBuffer: $e, - uniformValues: Rt, - terrainData: Nt, - projectionData: yt - } = De.state; - je.draw(J, re.TRIANGLES, de, ue, ge, wr.backCCW, Rt, Nt, yt, w.id, qe, $e, De.segments, w.paint, m.transform.zoom, He) - } - })(e, n, s, u, d) : o.cd(s) ? (function(m, y, w, P, M) { - if (w.paint.get("heatmap-opacity") === 0) return; - const D = m.context, - { - isRenderingToTexture: z, - isRenderingGlobe: B - } = M; - if (m.style.map.terrain) { - for (const U of P) { - const ee = y.getTile(U); - y.hasRenderableParent(U) || (m.renderPass === "offscreen" ? Dc(m, ee, w, U, B) : m.renderPass === "translucent" && Fh(m, w, U, z, B)) - } - D.viewport.set([0, 0, m.width, m.height]) - } else m.renderPass === "offscreen" ? (function(U, ee, J, re) { - const se = U.context, - de = se.gl, - ue = U.transform, - ge = hi.disabled, - Te = new Ti([de.ONE, de.ONE], o.bf.transparent, [!0, !0, !0, !0]); - (function(he, De, He) { - const je = he.gl; - he.activeTexture.set(je.TEXTURE1), he.viewport.set([0, 0, De.width / 4, De.height / 4]); - let qe = He.heatmapFbos.get(o.c2); - qe ? (je.bindTexture(je.TEXTURE_2D, qe.colorAttachment.get()), he.bindFramebuffer.set(qe.framebuffer)) : (qe = Po(he, De.width / 4, De.height / 4), He.heatmapFbos.set(o.c2, qe)) - })(se, U, J), se.clear({ - color: o.bf.transparent - }); - for (let he = 0; he < re.length; he++) { - const De = re[he]; - if (ee.hasRenderableParent(De)) continue; - const He = ee.getTile(De), - je = He.getBucket(J); - if (!je) continue; - const qe = je.programConfigurations.get(J.id), - $e = U.useProgram("heatmap", qe), - Rt = ue.getProjectionData({ - overscaledTileID: De, - applyGlobeMatrix: !0, - applyTerrainMatrix: !1 - }), - Nt = ue.getCircleRadiusCorrection(); - $e.draw(se, de.TRIANGLES, Vr.disabled, ge, Te, wr.backCCW, vh(He, ue.zoom, J.paint.get("heatmap-intensity"), Nt), null, Rt, J.id, je.layoutVertexBuffer, je.indexBuffer, je.segments, J.paint, ue.zoom, qe) - } - se.viewport.set([0, 0, U.width, U.height]) - })(m, y, w, P) : m.renderPass === "translucent" && (function(U, ee) { - const J = U.context, - re = J.gl; - J.setColorMode(U.colorModeForRenderPass()); - const se = ee.heatmapFbos.get(o.c2); - se && (J.activeTexture.set(re.TEXTURE0), re.bindTexture(re.TEXTURE_2D, se.colorAttachment.get()), J.activeTexture.set(re.TEXTURE1), Io(J, ee).bind(re.LINEAR, re.CLAMP_TO_EDGE), U.useProgram("heatmapTexture").draw(J, re.TRIANGLES, Vr.disabled, hi.disabled, U.colorModeForRenderPass(), wr.disabled, xc(U, ee, 0, 1), null, null, ee.id, U.viewportBuffer, U.quadTriangleIndexBuffer, U.viewportSegments, ee.paint, U.transform.zoom)) - })(m, w) - })(e, n, s, u, d) : o.ce(s) ? (function(m, y, w, P, M) { - if (m.renderPass !== "translucent") return; - const { - isRenderingToTexture: D - } = M, z = w.paint.get("line-opacity"), B = w.paint.get("line-width"); - if (z.constantOr(1) === 0 || B.constantOr(1) === 0) return; - const U = m.getDepthModeForSublayer(0, Vr.ReadOnly), - ee = m.colorModeForRenderPass(), - J = w.paint.get("line-dasharray"), - re = w.paint.get("line-pattern"), - se = re.constantOr(1), - de = w.paint.get("line-gradient"), - ue = w.getCrossfadeParameters(), - ge = se ? "linePattern" : J ? "lineSDF" : de ? "lineGradient" : "line", - Te = m.context, - he = Te.gl, - De = m.transform; - let He = !0; - for (const je of P) { - const qe = y.getTile(je); - if (se && !qe.patternsLoaded()) continue; - const $e = qe.getBucket(w); - if (!$e) continue; - const Rt = $e.programConfigurations.get(w.id), - Nt = m.context.program.get(), - yt = m.useProgram(ge, Rt), - sr = He || yt.program !== Nt, - Xr = m.style.map.terrain && m.style.map.terrain.getTerrainData(je), - xi = re.constantOr(null); - if (xi && qe.imageAtlas) { - const Wr = qe.imageAtlas, - Ei = Wr.patternPositions[xi.to.toString()], - Qi = Wr.patternPositions[xi.from.toString()]; - Ei && Qi && Rt.setConstantPatternPositions(Ei, Qi) - } - const ki = De.getProjectionData({ - overscaledTileID: je, - applyGlobeMatrix: !D, - applyTerrainMatrix: !0 - }), - Pi = De.getPixelScale(), - ji = se ? wh(m, qe, w, Pi, ue) : J ? gs(m, qe, w, Pi, J, ue) : de ? bh(m, qe, w, Pi, $e.lineClipsArray.length) : sl(m, qe, w, Pi); - if (se) Te.activeTexture.set(he.TEXTURE0), qe.imageAtlasTexture.bind(he.LINEAR, he.CLAMP_TO_EDGE), Rt.updatePaintBuffers(ue); - else if (J && (sr || m.lineAtlas.dirty)) Te.activeTexture.set(he.TEXTURE0), m.lineAtlas.bind(Te); - else if (de) { - const Wr = $e.gradients[w.id]; - let Ei = Wr.texture; - if (w.gradientVersion !== Wr.version) { - let Qi = 256; - if (w.stepInterpolant) { - const dn = y.getSource().maxzoom, - xn = je.canonical.z === dn ? Math.ceil(1 << m.transform.maxZoom - je.canonical.z) : 1; - Qi = o.ah(o.c3($e.maxLineLength / o.$ * 1024 * xn), 256, Te.maxTextureSize) - } - Wr.gradient = o.c4({ - expression: w.gradientExpression(), - evaluationKey: "lineProgress", - resolution: Qi, - image: Wr.gradient || void 0, - clips: $e.lineClipsArray - }), Wr.texture ? Wr.texture.update(Wr.gradient) : Wr.texture = new o.T(Te, Wr.gradient, he.RGBA), Wr.version = w.gradientVersion, Ei = Wr.texture - } - Te.activeTexture.set(he.TEXTURE0), Ei.bind(w.stepInterpolant ? he.NEAREST : he.LINEAR, he.CLAMP_TO_EDGE) - } - const Ui = m.stencilModeForClipping(je); - yt.draw(Te, he.TRIANGLES, U, Ui, ee, wr.disabled, ji, Xr, ki, w.id, $e.layoutVertexBuffer, $e.indexBuffer, $e.segments, w.paint, m.transform.zoom, Rt, $e.layoutVertexBuffer2), He = !1 - } - })(e, n, s, u, d) : o.cf(s) ? (function(m, y, w, P, M) { - const D = w.paint.get("fill-color"), - z = w.paint.get("fill-opacity"); - if (z.constantOr(1) === 0) return; - const { - isRenderingToTexture: B - } = M, U = m.colorModeForRenderPass(), ee = w.paint.get("fill-pattern"), J = m.opaquePassEnabledForLayer() && !ee.constantOr(1) && D.constantOr(o.bf.transparent).a === 1 && z.constantOr(0) === 1 ? "opaque" : "translucent"; - if (m.renderPass === J) { - const re = m.getDepthModeForSublayer(1, m.renderPass === "opaque" ? Vr.ReadWrite : Vr.ReadOnly); - ml(m, y, w, P, re, U, !1, B) - } - if (m.renderPass === "translucent" && w.paint.get("fill-antialias")) { - const re = m.getDepthModeForSublayer(w.getPaintProperty("fill-outline-color") ? 2 : 0, Vr.ReadOnly); - ml(m, y, w, P, re, U, !0, B) - } - })(e, n, s, u, d) : o.cg(s) ? (function(m, y, w, P, M) { - const D = w.paint.get("fill-extrusion-opacity"); - if (D === 0) return; - const { - isRenderingToTexture: z - } = M; - if (m.renderPass === "translucent") { - const B = new Vr(m.context.gl.LEQUAL, Vr.ReadWrite, m.depthRangeFor3D); - if (D !== 1 || w.paint.get("fill-extrusion-pattern").constantOr(1)) Rc(m, y, w, P, B, hi.disabled, Ti.disabled, z), Rc(m, y, w, P, B, m.stencilModeFor3D(), m.colorModeForRenderPass(), z); - else { - const U = m.colorModeForRenderPass(); - Rc(m, y, w, P, B, hi.disabled, U, z) - } - } - })(e, n, s, u, d) : o.ch(s) ? (function(m, y, w, P, M) { - if (m.renderPass !== "offscreen" && m.renderPass !== "translucent") return; - const { - isRenderingToTexture: D - } = M, z = m.context, B = m.style.projection.useSubdivision, U = m.getDepthModeForSublayer(0, Vr.ReadOnly), ee = m.colorModeForRenderPass(); - if (m.renderPass === "offscreen")(function(J, re, se, de, ue, ge, Te) { - const he = J.context, - De = he.gl; - for (const He of se) { - const je = re.getTile(He), - qe = je.dem; - if (!qe || !qe.data || !je.needsHillshadePrepare) continue; - const $e = qe.dim, - Rt = qe.stride, - Nt = qe.getPixels(); - if (he.activeTexture.set(De.TEXTURE1), he.pixelStoreUnpackPremultiplyAlpha.set(!1), je.demTexture = je.demTexture || J.getTileTexture(Rt), je.demTexture) { - const sr = je.demTexture; - sr.update(Nt, { - premultiply: !1 - }), sr.bind(De.NEAREST, De.CLAMP_TO_EDGE) - } else je.demTexture = new o.T(he, Nt, De.RGBA, { - premultiply: !1 - }), je.demTexture.bind(De.NEAREST, De.CLAMP_TO_EDGE); - he.activeTexture.set(De.TEXTURE0); - let yt = je.fbo; - if (!yt) { - const sr = new o.T(he, { - width: $e, - height: $e, - data: null - }, De.RGBA); - sr.bind(De.LINEAR, De.CLAMP_TO_EDGE), yt = je.fbo = he.createFramebuffer($e, $e, !0, !1), yt.colorAttachment.set(sr.texture) - } - he.bindFramebuffer.set(yt.framebuffer), he.viewport.set([0, 0, $e, $e]), J.useProgram("hillshadePrepare").draw(he, De.TRIANGLES, ue, ge, Te, wr.disabled, yh(je.tileID, qe), null, null, de.id, J.rasterBoundsBuffer, J.quadTriangleIndexBuffer, J.rasterBoundsSegments), je.needsHillshadePrepare = !1 - } - })(m, y, P, w, U, hi.disabled, ee), z.viewport.set([0, 0, m.width, m.height]); - else if (m.renderPass === "translucent") - if (B) { - const [J, re, se] = m.stencilConfigForOverlapTwoPass(P); - bs(m, y, w, se, J, U, ee, !1, D), bs(m, y, w, se, re, U, ee, !0, D) - } else { - const [J, re] = m.getStencilConfigForOverlapAndUpdateStencilID(P); - bs(m, y, w, re, J, U, ee, !1, D) - } - })(e, n, s, u, d) : o.ci(s) ? (function(m, y, w, P, M) { - if (m.renderPass !== "translucent" || !P.length) return; - const { - isRenderingToTexture: D - } = M, z = m.style.projection.useSubdivision, B = m.getDepthModeForSublayer(0, Vr.ReadOnly), U = m.colorModeForRenderPass(); - if (z) { - const [ee, J, re] = m.stencilConfigForOverlapTwoPass(P); - Bc(m, y, w, re, ee, B, U, !1, D), Bc(m, y, w, re, J, B, U, !0, D) - } else { - const [ee, J] = m.getStencilConfigForOverlapAndUpdateStencilID(P); - Bc(m, y, w, J, ee, B, U, !1, D) - } - })(e, n, s, u, d) : o.cj(s) ? (function(m, y, w, P, M) { - if (m.renderPass !== "translucent" || w.paint.get("raster-opacity") === 0 || !P.length) return; - const { - isRenderingToTexture: D - } = M, z = y.getSource(), B = m.style.projection.useSubdivision; - if (z instanceof Ft) ws(m, y, w, P, null, !1, !1, z.tileCoords, z.flippedWindingOrder, D); - else if (B) { - const [U, ee, J] = m.stencilConfigForOverlapTwoPass(P); - ws(m, y, w, J, U, !1, !0, _l, !1, D), ws(m, y, w, J, ee, !0, !0, _l, !1, D) - } else { - const [U, ee] = m.getStencilConfigForOverlapAndUpdateStencilID(P); - ws(m, y, w, ee, U, !1, !0, _l, !1, D) - } - })(e, n, s, u, d) : o.ck(s) ? (function(m, y, w, P, M) { - const D = w.paint.get("background-color"), - z = w.paint.get("background-opacity"); - if (z === 0) return; - const { - isRenderingToTexture: B - } = M, U = m.context, ee = U.gl, J = m.style.projection, re = m.transform, se = re.tileSize, de = w.paint.get("background-pattern"); - if (m.isPatternMissing(de)) return; - const ue = !de && D.a === 1 && z === 1 && m.opaquePassEnabledForLayer() ? "opaque" : "translucent"; - if (m.renderPass !== ue) return; - const ge = hi.disabled, - Te = m.getDepthModeForSublayer(0, ue === "opaque" ? Vr.ReadWrite : Vr.ReadOnly), - he = m.colorModeForRenderPass(), - De = m.useProgram(de ? "backgroundPattern" : "background"), - He = P || xe(re, { - tileSize: se, - terrain: m.style.map.terrain - }); - de && (U.activeTexture.set(ee.TEXTURE0), m.imageManager.bind(m.context)); - const je = w.getCrossfadeParameters(); - for (const qe of He) { - const $e = re.getProjectionData({ - overscaledTileID: qe, - applyGlobeMatrix: !B, - applyTerrainMatrix: !0 - }), - Rt = de ? Sh(z, m, de, { - tileID: qe, - tileSize: se - }, je) : Ch(z, D), - Nt = m.style.map.terrain && m.style.map.terrain.getTerrainData(qe), - yt = J.getMeshFromTileID(U, qe.canonical, !1, !0, "raster"); - De.draw(U, ee.TRIANGLES, Te, ge, he, wr.backCCW, Rt, Nt, $e, w.id, yt.vertexBuffer, yt.indexBuffer, yt.segments) - } - })(e, 0, s, u, d) : o.cl(s) && (function(m, y, w, P) { - const { - isRenderingGlobe: M - } = P, D = m.context, z = w.implementation, B = m.style.projection, U = m.transform, ee = U.getProjectionDataForCustomLayer(M), J = { - farZ: U.farZ, - nearZ: U.nearZ, - fov: U.fov * Math.PI / 180, - modelViewProjectionMatrix: U.modelViewProjectionMatrix, - projectionMatrix: U.projectionMatrix, - shaderData: { - variantName: B.shaderVariantName, - vertexShaderPrelude: `const float PI = 3.141592653589793; -uniform mat4 u_projection_matrix; -${B.shaderPreludeCode.vertexSource}`, - define: B.shaderDefine - }, - defaultProjectionData: ee - }, re = z.renderingMode ? z.renderingMode : "2d"; - if (m.renderPass === "offscreen") { - const se = z.prerender; - se && (m.setCustomLayerDefaults(), D.setColorMode(m.colorModeForRenderPass()), se.call(z, D.gl, J), D.setDirty(), m.setBaseState()) - } else if (m.renderPass === "translucent") { - m.setCustomLayerDefaults(), D.setColorMode(m.colorModeForRenderPass()), D.setStencilMode(hi.disabled); - const se = re === "3d" ? m.getDepthModeFor3D() : m.getDepthModeForSublayer(0, Vr.ReadOnly); - D.setDepthMode(se), z.render(D.gl, J), D.setDirty(), m.setBaseState(), D.bindFramebuffer.set(null) - } - })(e, 0, s, d)) - } - saveTileTexture(e) { - const n = this._tileTextures[e.size[0]]; - n ? n.push(e) : this._tileTextures[e.size[0]] = [e] - } - getTileTexture(e) { - const n = this._tileTextures[e]; - return n && n.length > 0 ? n.pop() : null - } - isPatternMissing(e) { - if (!e) return !1; - if (!e.from || !e.to) return !0; - const n = this.imageManager.getPattern(e.from.toString()), - s = this.imageManager.getPattern(e.to.toString()); - return !n || !s - } - useProgram(e, n, s = !1, u = []) { - this.cache = this.cache || {}; - const d = !!this.style.map.terrain, - m = this.style.projection, - y = s ? pi.projectionMercator : m.shaderPreludeCode, - w = s ? Jr : m.shaderDefine, - P = e + (n ? n.cacheKey : "") + `/${s?ti:m.shaderVariantName}` + (this._showOverdrawInspector ? "/overdraw" : "") + (d ? "/terrain" : "") + (u ? `/${u.join("/")}` : ""); - return this.cache[P] || (this.cache[P] = new yc(this.context, pi[e], n, Sc[e], this._showOverdrawInspector, d, y, w, u)), this.cache[P] - } - 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 e = this.context.gl; - this.context.cullFace.set(!1), this.context.viewport.set([0, 0, this.width, this.height]), this.context.blendEquation.set(e.FUNC_ADD) - } - initDebugOverlayCanvas() { - this.debugOverlayCanvas == null && (this.debugOverlayCanvas = document.createElement("canvas"), this.debugOverlayCanvas.width = 512, this.debugOverlayCanvas.height = 512, this.debugOverlayTexture = new o.T(this.context, this.debugOverlayCanvas, this.context.gl.RGBA)) - } - destroy() { - this.debugOverlayTexture && this.debugOverlayTexture.destroy() - } - overLimit() { - const { - drawingBufferWidth: e, - drawingBufferHeight: n - } = this.context.gl; - return this.width !== e || this.height !== n - } - } - - function Ts(h, e) { - let n, s = !1, - u = null, - d = null; - const m = () => { - u = null, s && (h.apply(d, n), u = setTimeout(m, e), s = !1) - }; - return (...y) => (s = !0, d = this, n = y, u || m(), u) - } - class yl { - constructor(e) { - this._getCurrentHash = () => { - const n = window.location.hash.replace("#", ""); - if (this._hashName) { - let s; - return n.split("&").map((u => u.split("="))).forEach((u => { - u[0] === this._hashName && (s = u) - })), (s && s[1] || "").split("/") - } - return n.split("/") - }, this._onHashChange = () => { - const n = this._getCurrentHash(); - if (!this._isValidHash(n)) return !1; - const s = this._map.dragRotate.isEnabled() && this._map.touchZoomRotate.isEnabled() ? +(n[3] || 0) : this._map.getBearing(); - return this._map.jumpTo({ - center: [+n[2], +n[1]], - zoom: +n[0], - bearing: s, - pitch: +(n[4] || 0) - }), !0 - }, this._updateHashUnthrottled = () => { - const n = window.location.href.replace(/(#.*)?$/, this.getHashString()); - window.history.replaceState(window.history.state, null, n) - }, this._removeHash = () => { - const n = this._getCurrentHash(); - if (n.length === 0) return; - const s = n.join("/"); - let u = s; - u.split("&").length > 0 && (u = u.split("&")[0]), this._hashName && (u = `${this._hashName}=${s}`); - let d = window.location.hash.replace(u, ""); - d.startsWith("#&") ? d = d.slice(0, 1) + d.slice(2) : d === "#" && (d = ""); - let m = window.location.href.replace(/(#.+)?$/, d); - m = m.replace("&&", "&"), window.history.replaceState(window.history.state, null, m) - }, this._updateHash = Ts(this._updateHashUnthrottled, 300), this._hashName = e && encodeURIComponent(e) - } - addTo(e) { - return this._map = e, 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(e) { - const n = this._map.getCenter(), - s = Math.round(100 * this._map.getZoom()) / 100, - u = Math.ceil((s * Math.LN2 + Math.log(512 / 360 / .5)) / Math.LN10), - d = Math.pow(10, u), - m = Math.round(n.lng * d) / d, - y = Math.round(n.lat * d) / d, - w = this._map.getBearing(), - P = this._map.getPitch(); - let M = ""; - if (M += e ? `/${m}/${y}/${s}` : `${s}/${y}/${m}`, (w || P) && (M += "/" + Math.round(10 * w) / 10), P && (M += `/${Math.round(P)}`), this._hashName) { - const D = this._hashName; - let z = !1; - const B = window.location.hash.slice(1).split("&").map((U => { - const ee = U.split("=")[0]; - return ee === D ? (z = !0, `${ee}=${M}`) : U - })).filter((U => U)); - return z || B.push(`${D}=${M}`), `#${B.join("&")}` - } - return `#${M}` - } - _isValidHash(e) { - if (e.length < 3 || e.some(isNaN)) return !1; - try { - new o.S(+e[2], +e[1]) - } catch { - return !1 - } - const n = +e[0], - s = +(e[3] || 0), - u = +(e[4] || 0); - return n >= this._map.getMinZoom() && n <= this._map.getMaxZoom() && s >= -180 && s <= 180 && u >= this._map.getMinPitch() && u <= this._map.getMaxPitch() - } - } - const Ga = { - linearity: .3, - easing: o.cm(0, 0, .3, 1) - }, - jc = o.e({ - deceleration: 2500, - maxSpeed: 1400 - }, Ga), - qh = o.e({ - deceleration: 20, - maxSpeed: 1400 - }, Ga), - Vh = o.e({ - deceleration: 1e3, - maxSpeed: 360 - }, Ga), - Uh = o.e({ - deceleration: 1e3, - maxSpeed: 90 - }, Ga), - Zh = o.e({ - deceleration: 1e3, - maxSpeed: 360 - }, Ga); - class $h { - constructor(e) { - this._map = e, this.clear() - } - clear() { - this._inertiaBuffer = [] - } - record(e) { - this._drainInertiaBuffer(), this._inertiaBuffer.push({ - time: ye.now(), - settings: e - }) - } - _drainInertiaBuffer() { - const e = this._inertiaBuffer, - n = ye.now(); - for (; e.length > 0 && n - e[0].time > 160;) e.shift() - } - _onMoveEnd(e) { - if (this._drainInertiaBuffer(), this._inertiaBuffer.length < 2) return; - const n = { - zoom: 0, - bearing: 0, - pitch: 0, - roll: 0, - pan: new o.P(0, 0), - pinchAround: void 0, - around: void 0 - }; - for (const { - settings: d - } - of this._inertiaBuffer) n.zoom += d.zoomDelta || 0, n.bearing += d.bearingDelta || 0, n.pitch += d.pitchDelta || 0, n.roll += d.rollDelta || 0, d.panDelta && n.pan._add(d.panDelta), d.around && (n.around = d.around), d.pinchAround && (n.pinchAround = d.pinchAround); - const s = this._inertiaBuffer[this._inertiaBuffer.length - 1].time - this._inertiaBuffer[0].time, - u = {}; - if (n.pan.mag()) { - const d = js(n.pan.mag(), s, o.e({}, jc, e || {})), - m = n.pan.mult(d.amount / n.pan.mag()), - y = this._map.cameraHelper.handlePanInertia(m, this._map.transform); - u.center = y.easingCenter, u.offset = y.easingOffset, xa(u, d) - } - if (n.zoom) { - const d = js(n.zoom, s, qh); - u.zoom = this._map.transform.zoom + d.amount, xa(u, d) - } - if (n.bearing) { - const d = js(n.bearing, s, Vh); - u.bearing = this._map.transform.bearing + o.ah(d.amount, -179, 179), xa(u, d) - } - if (n.pitch) { - const d = js(n.pitch, s, Uh); - u.pitch = this._map.transform.pitch + d.amount, xa(u, d) - } - if (n.roll) { - const d = js(n.roll, s, Zh); - u.roll = this._map.transform.roll + o.ah(d.amount, -179, 179), xa(u, d) - } - if (u.zoom || u.bearing) { - const d = n.pinchAround === void 0 ? n.around : n.pinchAround; - u.around = d ? this._map.unproject(d) : this._map.getCenter() - } - return this.clear(), o.e(u, { - noMoveStart: !0 - }) - } - } - - function xa(h, e) { - (!h.duration || h.duration < e.duration) && (h.duration = e.duration, h.easing = e.easing) - } - - function js(h, e, n) { - const { - maxSpeed: s, - linearity: u, - deceleration: d - } = n, m = o.ah(h * u / (e / 1e3), -s, s), y = Math.abs(m) / (d * u); - return { - easing: n.easing, - duration: 1e3 * y, - amount: m * (y / 2) - } - } - class Wn extends o.l { - preventDefault() { - this._defaultPrevented = !0 - } - get defaultPrevented() { - return this._defaultPrevented - } - constructor(e, n, s, u = {}) { - s = s instanceof MouseEvent ? s : new MouseEvent(e, s); - const d = X.mousePos(n.getCanvas(), s), - m = n.unproject(d); - super(e, o.e({ - point: d, - lngLat: m, - originalEvent: s - }, u)), this._defaultPrevented = !1, this.target = n - } - } - class qs extends o.l { - preventDefault() { - this._defaultPrevented = !0 - } - get defaultPrevented() { - return this._defaultPrevented - } - constructor(e, n, s) { - const u = e === "touchend" ? s.changedTouches : s.touches, - d = X.touchPos(n.getCanvasContainer(), u), - m = d.map((w => n.unproject(w))), - y = d.reduce(((w, P, M, D) => w.add(P.div(D.length))), new o.P(0, 0)); - super(e, { - points: d, - point: y, - lngLats: m, - lngLat: n.unproject(y), - originalEvent: s - }), this._defaultPrevented = !1 - } - } - class qc extends o.l { - preventDefault() { - this._defaultPrevented = !0 - } - get defaultPrevented() { - return this._defaultPrevented - } - constructor(e, n, s) { - super(e, { - originalEvent: s - }), this._defaultPrevented = !1 - } - } - class Gh { - constructor(e, n) { - this._map = e, this._clickTolerance = n.clickTolerance - } - reset() { - delete this._mousedownPos - } - wheel(e) { - return this._firePreventable(new qc(e.type, this._map, e)) - } - mousedown(e, n) { - return this._mousedownPos = n, this._firePreventable(new Wn(e.type, this._map, e)) - } - mouseup(e) { - this._map.fire(new Wn(e.type, this._map, e)) - } - click(e, n) { - this._mousedownPos && this._mousedownPos.dist(n) >= this._clickTolerance || this._map.fire(new Wn(e.type, this._map, e)) - } - dblclick(e) { - return this._firePreventable(new Wn(e.type, this._map, e)) - } - mouseover(e) { - this._map.fire(new Wn(e.type, this._map, e)) - } - mouseout(e) { - this._map.fire(new Wn(e.type, this._map, e)) - } - touchstart(e) { - return this._firePreventable(new qs(e.type, this._map, e)) - } - touchmove(e) { - this._map.fire(new qs(e.type, this._map, e)) - } - touchend(e) { - this._map.fire(new qs(e.type, this._map, e)) - } - touchcancel(e) { - this._map.fire(new qs(e.type, this._map, e)) - } - _firePreventable(e) { - if (this._map.fire(e), e.defaultPrevented) return {} - } - isEnabled() { - return !0 - } - isActive() { - return !1 - } - enable() {} - disable() {} - } - class Hh { - constructor(e) { - this._map = e - } - reset() { - this._delayContextMenu = !1, this._ignoreContextMenu = !0, delete this._contextMenuEvent - } - mousemove(e) { - this._map.fire(new Wn(e.type, this._map, e)) - } - mousedown() { - this._delayContextMenu = !0, this._ignoreContextMenu = !1 - } - mouseup() { - this._delayContextMenu = !1, this._contextMenuEvent && (this._map.fire(new Wn("contextmenu", this._map, this._contextMenuEvent)), delete this._contextMenuEvent) - } - contextmenu(e) { - this._delayContextMenu ? this._contextMenuEvent = e : this._ignoreContextMenu || this._map.fire(new Wn(e.type, this._map, e)), this._map.listens("contextmenu") && e.preventDefault() - } - isEnabled() { - return !0 - } - isActive() { - return !1 - } - enable() {} - disable() {} - } - class Vs { - constructor(e) { - this._map = e - } - 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(e) { - return this.transform.screenPointToLocation(o.P.convert(e), this._map.terrain) - } - } - class Vc { - constructor(e, n) { - this._map = e, this._tr = new Vs(e), this._el = e.getCanvasContainer(), this._container = e.getContainer(), this._clickTolerance = n.clickTolerance || 1 - } - isEnabled() { - return !!this._enabled - } - isActive() { - return !!this._active - } - enable() { - this.isEnabled() || (this._enabled = !0) - } - disable() { - this.isEnabled() && (this._enabled = !1) - } - mousedown(e, n) { - this.isEnabled() && e.shiftKey && e.button === 0 && (X.disableDrag(), this._startPos = this._lastPos = n, this._active = !0) - } - mousemoveWindow(e, n) { - if (!this._active) return; - const s = n; - if (this._lastPos.equals(s) || !this._box && s.dist(this._startPos) < this._clickTolerance) return; - const u = this._startPos; - this._lastPos = s, this._box || (this._box = X.create("div", "maplibregl-boxzoom", this._container), this._container.classList.add("maplibregl-crosshair"), this._fireEvent("boxzoomstart", e)); - const d = Math.min(u.x, s.x), - m = Math.max(u.x, s.x), - y = Math.min(u.y, s.y), - w = Math.max(u.y, s.y); - X.setTransform(this._box, `translate(${d}px,${y}px)`), this._box.style.width = m - d + "px", this._box.style.height = w - y + "px" - } - mouseupWindow(e, n) { - if (!this._active || e.button !== 0) return; - const s = this._startPos, - u = n; - if (this.reset(), X.suppressClick(), s.x !== u.x || s.y !== u.y) return this._map.fire(new o.l("boxzoomend", { - originalEvent: e - })), { - cameraAnimation: d => d.fitScreenCoordinates(s, u, this._tr.bearing, { - linear: !0 - }) - }; - this._fireEvent("boxzoomcancel", e) - } - keydown(e) { - this._active && e.keyCode === 27 && (this.reset(), this._fireEvent("boxzoomcancel", e)) - } - reset() { - this._active = !1, this._container.classList.remove("maplibregl-crosshair"), this._box && (X.remove(this._box), this._box = null), X.enableDrag(), delete this._startPos, delete this._lastPos - } - _fireEvent(e, n) { - return this._map.fire(new o.l(e, { - originalEvent: n - })) - } - } - - function Us(h, e) { - if (h.length !== e.length) throw new Error(`The number of touches and points are not equal - touches ${h.length}, points ${e.length}`); - const n = {}; - for (let s = 0; s < h.length; s++) n[h[s].identifier] = e[s]; - return n - } - class Wh { - constructor(e) { - this.reset(), this.numTouches = e.numTouches - } - reset() { - delete this.centroid, delete this.startTime, delete this.touches, this.aborted = !1 - } - touchstart(e, n, s) { - (this.centroid || s.length > this.numTouches) && (this.aborted = !0), this.aborted || (this.startTime === void 0 && (this.startTime = e.timeStamp), s.length === this.numTouches && (this.centroid = (function(u) { - const d = new o.P(0, 0); - for (const m of u) d._add(m); - return d.div(u.length) - })(n), this.touches = Us(s, n))) - } - touchmove(e, n, s) { - if (this.aborted || !this.centroid) return; - const u = Us(s, n); - for (const d in this.touches) { - const m = u[d]; - (!m || m.dist(this.touches[d]) > 30) && (this.aborted = !0) - } - } - touchend(e, n, s) { - if ((!this.centroid || e.timeStamp - this.startTime > 500) && (this.aborted = !0), s.length === 0) { - const u = !this.aborted && this.centroid; - if (this.reset(), u) return u - } - } - } - class Xn { - constructor(e) { - this.singleTap = new Wh(e), this.numTaps = e.numTaps, this.reset() - } - reset() { - this.lastTime = 1 / 0, delete this.lastTap, this.count = 0, this.singleTap.reset() - } - touchstart(e, n, s) { - this.singleTap.touchstart(e, n, s) - } - touchmove(e, n, s) { - this.singleTap.touchmove(e, n, s) - } - touchend(e, n, s) { - const u = this.singleTap.touchend(e, n, s); - if (u) { - const d = e.timeStamp - this.lastTime < 500, - m = !this.lastTap || this.lastTap.dist(u) < 30; - if (d && m || this.reset(), this.count++, this.lastTime = e.timeStamp, this.lastTap = u, this.count === this.numTaps) return this.reset(), u - } - } - } - class ba { - constructor(e) { - this._tr = new Vs(e), this._zoomIn = new Xn({ - numTouches: 1, - numTaps: 2 - }), this._zoomOut = new Xn({ - numTouches: 2, - numTaps: 1 - }), this.reset() - } - reset() { - this._active = !1, this._zoomIn.reset(), this._zoomOut.reset() - } - touchstart(e, n, s) { - this._zoomIn.touchstart(e, n, s), this._zoomOut.touchstart(e, n, s) - } - touchmove(e, n, s) { - this._zoomIn.touchmove(e, n, s), this._zoomOut.touchmove(e, n, s) - } - touchend(e, n, s) { - const u = this._zoomIn.touchend(e, n, s), - d = this._zoomOut.touchend(e, n, s), - m = this._tr; - return u ? (this._active = !0, e.preventDefault(), setTimeout((() => this.reset()), 0), { - cameraAnimation: y => y.easeTo({ - duration: 300, - zoom: m.zoom + 1, - around: m.unproject(u) - }, { - originalEvent: e - }) - }) : d ? (this._active = !0, e.preventDefault(), setTimeout((() => this.reset()), 0), { - cameraAnimation: y => y.easeTo({ - duration: 300, - zoom: m.zoom - 1, - around: m.unproject(d) - }, { - originalEvent: e - }) - }) : void 0 - } - touchcancel() { - this.reset() - } - enable() { - this._enabled = !0 - } - disable() { - this._enabled = !1, this.reset() - } - isEnabled() { - return this._enabled - } - isActive() { - return this._active - } - } - class Zs { - constructor(e) { - this._enabled = !!e.enable, this._moveStateManager = e.moveStateManager, this._clickTolerance = e.clickTolerance || 1, this._moveFunction = e.move, this._activateOnStart = !!e.activateOnStart, e.assignEvents(this), this.reset() - } - reset(e) { - this._active = !1, this._moved = !1, delete this._lastPoint, this._moveStateManager.endMove(e) - } - _move(...e) { - const n = this._moveFunction(...e); - if (n.bearingDelta || n.pitchDelta || n.rollDelta || n.around || n.panDelta) return this._active = !0, n - } - dragStart(e, n) { - this.isEnabled() && !this._lastPoint && this._moveStateManager.isValidStartEvent(e) && (this._moveStateManager.startMove(e), this._lastPoint = Array.isArray(n) ? n[0] : n, this._activateOnStart && this._lastPoint && (this._active = !0)) - } - dragMove(e, n) { - if (!this.isEnabled()) return; - const s = this._lastPoint; - if (!s) return; - if (e.preventDefault(), !this._moveStateManager.isValidMoveEvent(e)) return void this.reset(e); - const u = Array.isArray(n) ? n[0] : n; - return !this._moved && u.dist(s) < this._clickTolerance ? void 0 : (this._moved = !0, this._lastPoint = u, this._move(s, u)) - } - dragEnd(e) { - this.isEnabled() && this._lastPoint && this._moveStateManager.isValidEndEvent(e) && (this._moved && X.suppressClick(), this.reset(e)) - } - enable() { - this._enabled = !0 - } - disable() { - this._enabled = !1, this.reset() - } - isEnabled() { - return this._enabled - } - isActive() { - return this._active - } - getClickTolerance() { - return this._clickTolerance - } - } - const wa = 0, - $s = 2, - _p = { - [wa]: 1, - [$s]: 2 - }; - class ko { - constructor(e) { - this._correctEvent = e.checkCorrectEvent - } - startMove(e) { - const n = X.mouseButton(e); - this._eventButton = n - } - endMove(e) { - delete this._eventButton - } - isValidStartEvent(e) { - return this._correctEvent(e) - } - isValidMoveEvent(e) { - return !(function(n, s) { - const u = _p[s]; - return n.buttons === void 0 || (n.buttons & u) !== u - })(e, this._eventButton) - } - isValidEndEvent(e) { - return X.mouseButton(e) === this._eventButton - } - } - class gp { - constructor() { - this._firstTouch = void 0 - } - _isOneFingerTouch(e) { - return e.targetTouches.length === 1 - } - _isSameTouchEvent(e) { - return e.targetTouches[0].identifier === this._firstTouch - } - startMove(e) { - this._firstTouch = e.targetTouches[0].identifier - } - endMove(e) { - delete this._firstTouch - } - isValidStartEvent(e) { - return this._isOneFingerTouch(e) - } - isValidMoveEvent(e) { - return this._isOneFingerTouch(e) && this._isSameTouchEvent(e) - } - isValidEndEvent(e) { - return this._isOneFingerTouch(e) && this._isSameTouchEvent(e) - } - } - class vp { - constructor(e = new ko({ - checkCorrectEvent: () => !0 - }), n = new gp) { - this.mouseMoveStateManager = e, this.oneFingerTouchMoveStateManager = n - } - _executeRelevantHandler(e, n, s) { - return e instanceof MouseEvent ? n(e) : typeof TouchEvent < "u" && e instanceof TouchEvent ? s(e) : void 0 - } - startMove(e) { - this._executeRelevantHandler(e, (n => this.mouseMoveStateManager.startMove(n)), (n => this.oneFingerTouchMoveStateManager.startMove(n))) - } - endMove(e) { - this._executeRelevantHandler(e, (n => this.mouseMoveStateManager.endMove(n)), (n => this.oneFingerTouchMoveStateManager.endMove(n))) - } - isValidStartEvent(e) { - return this._executeRelevantHandler(e, (n => this.mouseMoveStateManager.isValidStartEvent(n)), (n => this.oneFingerTouchMoveStateManager.isValidStartEvent(n))) - } - isValidMoveEvent(e) { - return this._executeRelevantHandler(e, (n => this.mouseMoveStateManager.isValidMoveEvent(n)), (n => this.oneFingerTouchMoveStateManager.isValidMoveEvent(n))) - } - isValidEndEvent(e) { - return this._executeRelevantHandler(e, (n => this.mouseMoveStateManager.isValidEndEvent(n)), (n => this.oneFingerTouchMoveStateManager.isValidEndEvent(n))) - } - } - const Eo = h => { - h.mousedown = h.dragStart, h.mousemoveWindow = h.dragMove, h.mouseup = h.dragEnd, h.contextmenu = e => { - e.preventDefault() - } - }; - class zo { - constructor(e, n) { - this._clickTolerance = e.clickTolerance || 1, this._map = n, this.reset() - } - reset() { - this._active = !1, this._touches = {}, this._sum = new o.P(0, 0) - } - _shouldBePrevented(e) { - return e < (this._map.cooperativeGestures.isEnabled() ? 2 : 1) - } - touchstart(e, n, s) { - return this._calculateTransform(e, n, s) - } - touchmove(e, n, s) { - if (this._active) { - if (!this._shouldBePrevented(s.length)) return e.preventDefault(), this._calculateTransform(e, n, s); - this._map.cooperativeGestures.notifyGestureBlocked("touch_pan", e) - } - } - touchend(e, n, s) { - this._calculateTransform(e, n, s), this._active && this._shouldBePrevented(s.length) && this.reset() - } - touchcancel() { - this.reset() - } - _calculateTransform(e, n, s) { - s.length > 0 && (this._active = !0); - const u = Us(s, n), - d = new o.P(0, 0), - m = new o.P(0, 0); - let y = 0; - for (const P in u) { - const M = u[P], - D = this._touches[P]; - D && (d._add(M), m._add(M.sub(D)), y++, u[P] = M) - } - if (this._touches = u, this._shouldBePrevented(y) || !m.mag()) return; - const w = m.div(y); - return this._sum._add(w), this._sum.mag() < this._clickTolerance ? void 0 : { - around: d.div(y), - panDelta: w - } - } - enable() { - this._enabled = !0 - } - disable() { - this._enabled = !1, this.reset() - } - isEnabled() { - return this._enabled - } - isActive() { - return this._active - } - } - class Ta { - constructor() { - this.reset() - } - reset() { - this._active = !1, delete this._firstTwoTouches - } - touchstart(e, n, s) { - this._firstTwoTouches || s.length < 2 || (this._firstTwoTouches = [s[0].identifier, s[1].identifier], this._start([n[0], n[1]])) - } - touchmove(e, n, s) { - if (!this._firstTwoTouches) return; - e.preventDefault(); - const [u, d] = this._firstTwoTouches, m = Kt(s, n, u), y = Kt(s, n, d); - if (!m || !y) return; - const w = this._aroundCenter ? null : m.add(y).div(2); - return this._move([m, y], w, e) - } - touchend(e, n, s) { - if (!this._firstTwoTouches) return; - const [u, d] = this._firstTwoTouches, m = Kt(s, n, u), y = Kt(s, n, d); - m && y || (this._active && X.suppressClick(), this.reset()) - } - touchcancel() { - this.reset() - } - enable(e) { - this._enabled = !0, this._aroundCenter = !!e && e.around === "center" - } - disable() { - this._enabled = !1, this.reset() - } - isEnabled() { - return !!this._enabled - } - isActive() { - return !!this._active - } - } - - function Kt(h, e, n) { - for (let s = 0; s < h.length; s++) - if (h[s].identifier === n) return e[s] - } - - function Uc(h, e) { - return Math.log(h / e) / Math.LN2 - } - class xl extends Ta { - reset() { - super.reset(), delete this._distance, delete this._startDistance - } - _start(e) { - this._startDistance = this._distance = e[0].dist(e[1]) - } - _move(e, n) { - const s = this._distance; - if (this._distance = e[0].dist(e[1]), this._active || !(Math.abs(Uc(this._distance, this._startDistance)) < .1)) return this._active = !0, { - zoomDelta: Uc(this._distance, s), - pinchAround: n - } - } - } - - function Zc(h, e) { - return 180 * h.angleWith(e) / Math.PI - } - class Gs extends Ta { - reset() { - super.reset(), delete this._minDiameter, delete this._startVector, delete this._vector - } - _start(e) { - this._startVector = this._vector = e[0].sub(e[1]), this._minDiameter = e[0].dist(e[1]) - } - _move(e, n, s) { - const u = this._vector; - if (this._vector = e[0].sub(e[1]), this._active || !this._isBelowThreshold(this._vector)) return this._active = !0, { - bearingDelta: Zc(this._vector, u), - pinchAround: n - } - } - _isBelowThreshold(e) { - this._minDiameter = Math.min(this._minDiameter, e.mag()); - const n = 25 / (Math.PI * this._minDiameter) * 360, - s = Zc(e, this._startVector); - return Math.abs(s) < n - } - } - - function Cs(h) { - return Math.abs(h.y) > Math.abs(h.x) - } - class bl extends Ta { - constructor(e) { - super(), this._currentTouchCount = 0, this._map = e - } - reset() { - super.reset(), this._valid = void 0, delete this._firstMove, delete this._lastPoints - } - touchstart(e, n, s) { - super.touchstart(e, n, s), this._currentTouchCount = s.length - } - _start(e) { - this._lastPoints = e, Cs(e[0].sub(e[1])) && (this._valid = !1) - } - _move(e, n, s) { - if (this._map.cooperativeGestures.isEnabled() && this._currentTouchCount < 3) return; - const u = e[0].sub(this._lastPoints[0]), - d = e[1].sub(this._lastPoints[1]); - return this._valid = this.gestureBeginsVertically(u, d, s.timeStamp), this._valid ? (this._lastPoints = e, this._active = !0, { - pitchDelta: (u.y + d.y) / 2 * -.5 - }) : void 0 - } - gestureBeginsVertically(e, n, s) { - if (this._valid !== void 0) return this._valid; - const u = e.mag() >= 2, - d = n.mag() >= 2; - if (!u && !d) return; - if (!u || !d) return this._firstMove === void 0 && (this._firstMove = s), s - this._firstMove < 100 && void 0; - const m = e.y > 0 == n.y > 0; - return Cs(e) && Cs(n) && m - } - } - const si = { - panStep: 100, - bearingStep: 15, - pitchStep: 10 - }; - class wl { - constructor(e) { - this._tr = new Vs(e); - const n = si; - this._panStep = n.panStep, this._bearingStep = n.bearingStep, this._pitchStep = n.pitchStep, this._rotationDisabled = !1 - } - reset() { - this._active = !1 - } - keydown(e) { - if (e.altKey || e.ctrlKey || e.metaKey) return; - let n = 0, - s = 0, - u = 0, - d = 0, - m = 0; - switch (e.keyCode) { - case 61: - case 107: - case 171: - case 187: - n = 1; - break; - case 189: - case 109: - case 173: - n = -1; - break; - case 37: - e.shiftKey ? s = -1 : (e.preventDefault(), d = -1); - break; - case 39: - e.shiftKey ? s = 1 : (e.preventDefault(), d = 1); - break; - case 38: - e.shiftKey ? u = 1 : (e.preventDefault(), m = -1); - break; - case 40: - e.shiftKey ? u = -1 : (e.preventDefault(), m = 1); - break; - default: - return - } - return this._rotationDisabled && (s = 0, u = 0), { - cameraAnimation: y => { - const w = this._tr; - y.easeTo({ - duration: 300, - easeId: "keyboardHandler", - easing: yp, - zoom: n ? Math.round(w.zoom) + n * (e.shiftKey ? 2 : 1) : w.zoom, - bearing: w.bearing + s * this._bearingStep, - pitch: w.pitch + u * this._pitchStep, - offset: [-d * this._panStep, -m * this._panStep], - center: w.center - }, { - originalEvent: e - }) - } - } - } - 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 yp(h) { - return h * (2 - h) - } - const Tl = 4.000244140625, - xp = 1 / 450; - class Xh { - constructor(e, n) { - this._onTimeout = s => { - this._type = "wheel", this._delta -= this._lastValue, this._active || this._start(s) - }, this._map = e, this._tr = new Vs(e), this._triggerRenderFrame = n, this._delta = 0, this._defaultZoomRate = .01, this._wheelZoomRate = xp - } - setZoomRate(e) { - this._defaultZoomRate = e - } - setWheelZoomRate(e) { - this._wheelZoomRate = e - } - isEnabled() { - return !!this._enabled - } - isActive() { - return !!this._active || this._finishTimeout !== void 0 - } - isZooming() { - return !!this._zooming - } - enable(e) { - this.isEnabled() || (this._enabled = !0, this._aroundCenter = !!e && e.around === "center") - } - disable() { - this.isEnabled() && (this._enabled = !1) - } - _shouldBePrevented(e) { - return !!this._map.cooperativeGestures.isEnabled() && !(e.ctrlKey || this._map.cooperativeGestures.isBypassed(e)) - } - wheel(e) { - if (!this.isEnabled()) return; - if (this._shouldBePrevented(e)) return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom", e); - let n = e.deltaMode === WheelEvent.DOM_DELTA_LINE ? 40 * e.deltaY : e.deltaY; - const s = ye.now(), - u = s - (this._lastWheelEventTime || 0); - this._lastWheelEventTime = s, n !== 0 && n % Tl == 0 ? this._type = "wheel" : n !== 0 && Math.abs(n) < 4 ? this._type = "trackpad" : u > 400 ? (this._type = null, this._lastValue = n, this._timeout = setTimeout(this._onTimeout, 40, e)) : this._type || (this._type = Math.abs(u * n) < 200 ? "trackpad" : "wheel", this._timeout && (clearTimeout(this._timeout), this._timeout = null, n += this._lastValue)), e.shiftKey && n && (n /= 4), this._type && (this._lastWheelEvent = e, this._delta -= n, this._active || this._start(e)), e.preventDefault() - } - _start(e) { - if (!this._delta) return; - this._frameId && (this._frameId = null), this._active = !0, this.isZooming() || (this._zooming = !0), this._finishTimeout && (clearTimeout(this._finishTimeout), delete this._finishTimeout); - const n = X.mousePos(this._map.getCanvas(), e), - s = this._tr; - this._aroundPoint = this._aroundCenter ? s.transform.locationToScreenPoint(o.S.convert(s.center)) : n, this._frameId || (this._frameId = !0, this._triggerRenderFrame()) - } - renderFrame() { - if (!this._frameId || (this._frameId = null, !this.isActive())) return; - const e = this._tr.transform; - if (typeof this._lastExpectedZoom == "number") { - const y = e.zoom - this._lastExpectedZoom; - typeof this._startZoom == "number" && (this._startZoom += y), typeof this._targetZoom == "number" && (this._targetZoom += y) - } - if (this._delta !== 0) { - const y = this._type === "wheel" && Math.abs(this._delta) > Tl ? this._wheelZoomRate : this._defaultZoomRate; - let w = 2 / (1 + Math.exp(-Math.abs(this._delta * y))); - this._delta < 0 && w !== 0 && (w = 1 / w); - const P = typeof this._targetZoom != "number" ? e.scale : o.af(this._targetZoom); - this._targetZoom = e.getConstrained(e.getCameraLngLat(), o.ak(P * w)).zoom, this._type === "wheel" && (this._startZoom = e.zoom, this._easing = this._smoothOutEasing(200)), this._delta = 0 - } - const n = typeof this._targetZoom != "number" ? e.zoom : this._targetZoom, - s = this._startZoom, - u = this._easing; - let d, m = !1; - if (this._type === "wheel" && s && u) { - const y = ye.now() - this._lastWheelEventTime, - w = Math.min((y + 5) / 200, 1), - P = u(w); - d = o.C.number(s, n, P), w < 1 ? this._frameId || (this._frameId = !0) : m = !0 - } else d = n, m = !0; - return this._active = !0, m && (this._active = !1, this._finishTimeout = setTimeout((() => { - this._zooming = !1, this._triggerRenderFrame(), delete this._targetZoom, delete this._lastExpectedZoom, delete this._finishTimeout - }), 200)), this._lastExpectedZoom = d, { - noInertia: !0, - needsRenderFrame: !m, - zoomDelta: d - e.zoom, - around: this._aroundPoint, - originalEvent: this._lastWheelEvent - } - } - _smoothOutEasing(e) { - let n = o.co; - if (this._prevEase) { - const s = this._prevEase, - u = (ye.now() - s.start) / s.duration, - d = s.easing(u + .01) - s.easing(u), - m = .27 / Math.sqrt(d * d + 1e-4) * .01, - y = Math.sqrt(.0729 - m * m); - n = o.cm(m, y, .25, 1) - } - return this._prevEase = { - start: ye.now(), - duration: e, - easing: n - }, n - } - reset() { - this._active = !1, this._zooming = !1, delete this._targetZoom, delete this._lastExpectedZoom, this._finishTimeout && (clearTimeout(this._finishTimeout), delete this._finishTimeout) - } - } - class $c { - constructor(e, n) { - this._clickZoom = e, this._tapZoom = n - } - 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 Gc { - constructor(e) { - this._tr = new Vs(e), this.reset() - } - reset() { - this._active = !1 - } - dblclick(e, n) { - return e.preventDefault(), { - cameraAnimation: s => { - s.easeTo({ - duration: 300, - zoom: this._tr.zoom + (e.shiftKey ? -1 : 1), - around: this._tr.unproject(n) - }, { - originalEvent: e - }) - } - } - } - enable() { - this._enabled = !0 - } - disable() { - this._enabled = !1, this.reset() - } - isEnabled() { - return this._enabled - } - isActive() { - return this._active - } - } - class Kh { - constructor() { - this._tap = new Xn({ - numTouches: 1, - numTaps: 1 - }), this.reset() - } - reset() { - this._active = !1, delete this._swipePoint, delete this._swipeTouch, delete this._tapTime, delete this._tapPoint, this._tap.reset() - } - touchstart(e, n, s) { - if (!this._swipePoint) - if (this._tapTime) { - const u = n[0], - d = e.timeStamp - this._tapTime < 500, - m = this._tapPoint.dist(u) < 30; - d && m ? s.length > 0 && (this._swipePoint = u, this._swipeTouch = s[0].identifier) : this.reset() - } else this._tap.touchstart(e, n, s) - } - touchmove(e, n, s) { - if (this._tapTime) { - if (this._swipePoint) { - if (s[0].identifier !== this._swipeTouch) return; - const u = n[0], - d = u.y - this._swipePoint.y; - return this._swipePoint = u, e.preventDefault(), this._active = !0, { - zoomDelta: d / 128 - } - } - } else this._tap.touchmove(e, n, s) - } - touchend(e, n, s) { - if (this._tapTime) this._swipePoint && s.length === 0 && this.reset(); - else { - const u = this._tap.touchend(e, n, s); - u && (this._tapTime = e.timeStamp, this._tapPoint = u) - } - } - touchcancel() { - this.reset() - } - enable() { - this._enabled = !0 - } - disable() { - this._enabled = !1, this.reset() - } - isEnabled() { - return this._enabled - } - isActive() { - return this._active - } - } - class Yh { - constructor(e, n, s) { - this._el = e, this._mousePan = n, this._touchPan = s - } - enable(e) { - this._inertiaOptions = e || {}, 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 Hc { - constructor(e, n, s, u) { - this._pitchWithRotate = e.pitchWithRotate, this._rollEnabled = e.rollEnabled, this._mouseRotate = n, this._mousePitch = s, this._mouseRoll = u - } - 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 Jh { - constructor(e, n, s, u) { - this._el = e, this._touchZoom = n, this._touchRotate = s, this._tapDragZoom = u, this._rotationDisabled = !1, this._enabled = !0 - } - enable(e) { - this._touchZoom.enable(e), this._rotationDisabled || this._touchRotate.enable(e), 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() - } - disableRotation() { - this._rotationDisabled = !0, this._touchRotate.disable() - } - enableRotation() { - this._rotationDisabled = !1, this._touchZoom.isEnabled() && this._touchRotate.enable() - } - } - class Qh { - constructor(e, n) { - this._bypassKey = navigator.userAgent.indexOf("Mac") !== -1 ? "metaKey" : "ctrlKey", this._map = e, this._options = n, this._enabled = !1 - } - isActive() { - return !1 - } - reset() {} - _setupUI() { - if (this._container) return; - const e = this._map.getCanvasContainer(); - e.classList.add("maplibregl-cooperative-gestures"), this._container = X.create("div", "maplibregl-cooperative-gesture-screen", e); - let n = this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText"); - this._bypassKey === "metaKey" && (n = this._map._getUIString("CooperativeGesturesHandler.MacHelpText")); - const s = this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"), - u = document.createElement("div"); - u.className = "maplibregl-desktop-message", u.textContent = n, this._container.appendChild(u); - const d = document.createElement("div"); - d.className = "maplibregl-mobile-message", d.textContent = s, this._container.appendChild(d), this._container.setAttribute("aria-hidden", "true") - } - _destroyUI() { - this._container && (X.remove(this._container), 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(e) { - return e[this._bypassKey] - } - notifyGestureBlocked(e, n) { - this._enabled && (this._map.fire(new o.l("cooperativegestureprevented", { - gestureType: e, - originalEvent: n - })), this._container.classList.add("maplibregl-show"), setTimeout((() => { - this._container.classList.remove("maplibregl-show") - }), 100)) - } - } - const Ca = h => h.zoom || h.drag || h.roll || h.pitch || h.rotate; - class Oi extends o.l {} - - function Hs(h) { - return h.panDelta && h.panDelta.mag() || h.zoomDelta || h.bearingDelta || h.pitchDelta || h.rollDelta - } - class Wc { - constructor(e, n) { - this.handleWindowEvent = u => { - this.handleEvent(u, `${u.type}Window`) - }, this.handleEvent = (u, d) => { - if (u.type === "blur") return void this.stop(!0); - this._updatingCamera = !0; - const m = u.type === "renderFrame" ? void 0 : u, - y = { - needsRenderFrame: !1 - }, - w = {}, - P = {}; - for (const { - handlerName: z, - handler: B, - allowed: U - } - of this._handlers) { - if (!B.isEnabled()) continue; - let ee; - if (this._blockedByActive(P, U, z)) B.reset(); - else if (B[d || u.type]) { - if (o.cp(u, d || u.type)) { - const J = X.mousePos(this._map.getCanvas(), u); - ee = B[d || u.type](u, J) - } else if (o.cq(u, d || u.type)) { - const J = this._getMapTouches(u.touches), - re = X.touchPos(this._map.getCanvas(), J); - ee = B[d || u.type](u, re, J) - } else o.cr(d || u.type) || (ee = B[d || u.type](u)); - this.mergeHandlerResult(y, w, ee, z, m), ee && ee.needsRenderFrame && this._triggerRenderFrame() - }(ee || B.isActive()) && (P[z] = B) - } - const M = {}; - for (const z in this._previousActiveHandlers) P[z] || (M[z] = m); - this._previousActiveHandlers = P, (Object.keys(M).length || Hs(y)) && (this._changes.push([y, w, M]), this._triggerRenderFrame()), (Object.keys(P).length || Hs(y)) && this._map._stop(!0), this._updatingCamera = !1; - const { - cameraAnimation: D - } = y; - D && (this._inertia.clear(), this._fireEvents({}, {}, !0), this._changes = [], D(this._map)) - }, this._map = e, this._el = this._map.getCanvasContainer(), this._handlers = [], this._handlersById = {}, this._changes = [], this._inertia = new $h(e), this._bearingSnap = n.bearingSnap, this._previousActiveHandlers = {}, this._eventsInProgress = {}, this._addDefaultHandlers(n); - const s = this._el; - this._listeners = [ - [s, "touchstart", { - passive: !0 - }], - [s, "touchmove", { - passive: !1 - }], - [s, "touchend", void 0], - [s, "touchcancel", void 0], - [s, "mousedown", void 0], - [s, "mousemove", void 0], - [s, "mouseup", void 0], - [document, "mousemove", { - capture: !0 - }], - [document, "mouseup", void 0], - [s, "mouseover", void 0], - [s, "mouseout", void 0], - [s, "dblclick", void 0], - [s, "click", void 0], - [s, "keydown", { - capture: !1 - }], - [s, "keyup", void 0], - [s, "wheel", { - passive: !1 - }], - [s, "contextmenu", void 0], - [window, "blur", void 0] - ]; - for (const [u, d, m] of this._listeners) X.addEventListener(u, d, u === document ? this.handleWindowEvent : this.handleEvent, m) - } - destroy() { - for (const [e, n, s] of this._listeners) X.removeEventListener(e, n, e === document ? this.handleWindowEvent : this.handleEvent, s) - } - _addDefaultHandlers(e) { - const n = this._map, - s = n.getCanvasContainer(); - this._add("mapEvent", new Gh(n, e)); - const u = n.boxZoom = new Vc(n, e); - this._add("boxZoom", u), e.interactive && e.boxZoom && u.enable(); - const d = n.cooperativeGestures = new Qh(n, e.cooperativeGestures); - this._add("cooperativeGestures", d), e.cooperativeGestures && d.enable(); - const m = new ba(n), - y = new Gc(n); - n.doubleClickZoom = new $c(y, m), this._add("tapZoom", m), this._add("clickZoom", y), e.interactive && e.doubleClickZoom && n.doubleClickZoom.enable(); - const w = new Kh; - this._add("tapDragZoom", w); - const P = n.touchPitch = new bl(n); - this._add("touchPitch", P), e.interactive && e.touchPitch && n.touchPitch.enable(e.touchPitch); - const M = () => n.project(n.getCenter()), - D = (function({ - enable: ue, - clickTolerance: ge, - aroundCenter: Te = !0, - minPixelCenterThreshold: he = 100, - rotateDegreesPerPixelMoved: De = .8 - }, He) { - const je = new ko({ - checkCorrectEvent: qe => X.mouseButton(qe) === 0 && qe.ctrlKey || X.mouseButton(qe) === 2 && !qe.ctrlKey - }); - return new Zs({ - clickTolerance: ge, - move: (qe, $e) => { - const Rt = He(); - if (Te && Math.abs(Rt.y - qe.y) > he) return { - bearingDelta: o.cn(new o.P(qe.x, $e.y), $e, Rt) - }; - let Nt = ($e.x - qe.x) * De; - return Te && $e.y < Rt.y && (Nt = -Nt), { - bearingDelta: Nt - } - }, - moveStateManager: je, - enable: ue, - assignEvents: Eo - }) - })(e, M), - z = (function({ - enable: ue, - clickTolerance: ge, - pitchDegreesPerPixelMoved: Te = -.5 - }) { - const he = new ko({ - checkCorrectEvent: De => X.mouseButton(De) === 0 && De.ctrlKey || X.mouseButton(De) === 2 - }); - return new Zs({ - clickTolerance: ge, - move: (De, He) => ({ - pitchDelta: (He.y - De.y) * Te - }), - moveStateManager: he, - enable: ue, - assignEvents: Eo - }) - })(e), - B = (function({ - enable: ue, - clickTolerance: ge, - rollDegreesPerPixelMoved: Te = .3 - }, he) { - const De = new ko({ - checkCorrectEvent: He => X.mouseButton(He) === 2 && He.ctrlKey - }); - return new Zs({ - clickTolerance: ge, - move: (He, je) => { - const qe = he(); - let $e = (je.x - He.x) * Te; - return je.y < qe.y && ($e = -$e), { - rollDelta: $e - } - }, - moveStateManager: De, - enable: ue, - assignEvents: Eo - }) - })(e, M); - n.dragRotate = new Hc(e, D, z, B), this._add("mouseRotate", D, ["mousePitch"]), this._add("mousePitch", z, ["mouseRotate", "mouseRoll"]), this._add("mouseRoll", B, ["mousePitch"]), e.interactive && e.dragRotate && n.dragRotate.enable(); - const U = (function({ - enable: ue, - clickTolerance: ge - }) { - const Te = new ko({ - checkCorrectEvent: he => X.mouseButton(he) === 0 && !he.ctrlKey - }); - return new Zs({ - clickTolerance: ge, - move: (he, De) => ({ - around: De, - panDelta: De.sub(he) - }), - activateOnStart: !0, - moveStateManager: Te, - enable: ue, - assignEvents: Eo - }) - })(e), - ee = new zo(e, n); - n.dragPan = new Yh(s, U, ee), this._add("mousePan", U), this._add("touchPan", ee, ["touchZoom", "touchRotate"]), e.interactive && e.dragPan && n.dragPan.enable(e.dragPan); - const J = new Gs, - re = new xl; - n.touchZoomRotate = new Jh(s, re, J, w), this._add("touchRotate", J, ["touchPan", "touchZoom"]), this._add("touchZoom", re, ["touchPan", "touchRotate"]), e.interactive && e.touchZoomRotate && n.touchZoomRotate.enable(e.touchZoomRotate); - const se = n.scrollZoom = new Xh(n, (() => this._triggerRenderFrame())); - this._add("scrollZoom", se, ["mousePan"]), e.interactive && e.scrollZoom && n.scrollZoom.enable(e.scrollZoom); - const de = n.keyboard = new wl(n); - this._add("keyboard", de), e.interactive && e.keyboard && n.keyboard.enable(), this._add("blockableMapEvent", new Hh(n)) - } - _add(e, n, s) { - this._handlers.push({ - handlerName: e, - handler: n, - allowed: s - }), this._handlersById[e] = n - } - stop(e) { - if (!this._updatingCamera) { - for (const { - handler: n - } - of this._handlers) n.reset(); - this._inertia.clear(), this._fireEvents({}, {}, e), this._changes = [] - } - } - isActive() { - for (const { - handler: e - } - of this._handlers) - if (e.isActive()) return !0; - return !1 - } - isZooming() { - return !!this._eventsInProgress.zoom || this._map.scrollZoom.isZooming() - } - isRotating() { - return !!this._eventsInProgress.rotate - } - isMoving() { - return !!Ca(this._eventsInProgress) || this.isZooming() - } - _blockedByActive(e, n, s) { - for (const u in e) - if (u !== s && (!n || n.indexOf(u) < 0)) return !0; - return !1 - } - _getMapTouches(e) { - const n = []; - for (const s of e) this._el.contains(s.target) && n.push(s); - return n - } - mergeHandlerResult(e, n, s, u, d) { - if (!s) return; - o.e(e, s); - const m = { - handlerName: u, - originalEvent: s.originalEvent || d - }; - s.zoomDelta !== void 0 && (n.zoom = m), s.panDelta !== void 0 && (n.drag = m), s.rollDelta !== void 0 && (n.roll = m), s.pitchDelta !== void 0 && (n.pitch = m), s.bearingDelta !== void 0 && (n.rotate = m) - } - _applyChanges() { - const e = {}, - n = {}, - s = {}; - for (const [u, d, m] of this._changes) u.panDelta && (e.panDelta = (e.panDelta || new o.P(0, 0))._add(u.panDelta)), u.zoomDelta && (e.zoomDelta = (e.zoomDelta || 0) + u.zoomDelta), u.bearingDelta && (e.bearingDelta = (e.bearingDelta || 0) + u.bearingDelta), u.pitchDelta && (e.pitchDelta = (e.pitchDelta || 0) + u.pitchDelta), u.rollDelta && (e.rollDelta = (e.rollDelta || 0) + u.rollDelta), u.around !== void 0 && (e.around = u.around), u.pinchAround !== void 0 && (e.pinchAround = u.pinchAround), u.noInertia && (e.noInertia = u.noInertia), o.e(n, d), o.e(s, m); - this._updateMapTransform(e, n, s), this._changes = [] - } - _updateMapTransform(e, n, s) { - const u = this._map, - d = u._getTransformForUpdate(), - m = u.terrain; - if (!(Hs(e) || m && this._terrainMovement)) return this._fireEvents(n, s, !0); - u._stop(!0); - let { - panDelta: y, - zoomDelta: w, - bearingDelta: P, - pitchDelta: M, - rollDelta: D, - around: z, - pinchAround: B - } = e; - B !== void 0 && (z = B), z = z || u.transform.centerPoint, m && !d.isPointOnMapSurface(z) && (z = d.centerPoint); - const U = { - panDelta: y, - zoomDelta: w, - rollDelta: D, - pitchDelta: M, - bearingDelta: P, - around: z - }; - this._map.cameraHelper.useGlobeControls && !d.isPointOnMapSurface(z) && (z = d.centerPoint); - const ee = z.distSqr(d.centerPoint) < .01 ? d.center : d.screenPointToLocation(y ? z.sub(y) : z); - m ? (this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(U, d), this._terrainMovement || !n.drag && !n.zoom ? n.drag && this._terrainMovement ? d.setCenter(d.screenPointToLocation(d.centerPoint.sub(y))) : this._map.cameraHelper.handleMapControlsPan(U, d, ee) : (this._terrainMovement = !0, this._map._elevationFreeze = !0, this._map.cameraHelper.handleMapControlsPan(U, d, ee))) : (this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(U, d), this._map.cameraHelper.handleMapControlsPan(U, d, ee)), u._applyUpdatedTransform(d), this._map._update(), e.noInertia || this._inertia.record(e), this._fireEvents(n, s, !0) - } - _fireEvents(e, n, s) { - const u = Ca(this._eventsInProgress), - d = Ca(e), - m = {}; - for (const D in e) { - const { - originalEvent: z - } = e[D]; - this._eventsInProgress[D] || (m[`${D}start`] = z), this._eventsInProgress[D] = e[D] - }!u && d && this._fireEvent("movestart", d.originalEvent); - for (const D in m) this._fireEvent(D, m[D]); - d && this._fireEvent("move", d.originalEvent); - for (const D in e) { - const { - originalEvent: z - } = e[D]; - this._fireEvent(D, z) - } - const y = {}; - let w; - for (const D in this._eventsInProgress) { - const { - handlerName: z, - originalEvent: B - } = this._eventsInProgress[D]; - this._handlersById[z].isActive() || (delete this._eventsInProgress[D], w = n[z] || B, y[`${D}end`] = w) - } - for (const D in y) this._fireEvent(D, y[D]); - const P = Ca(this._eventsInProgress), - M = (u || d) && !P; - if (M && this._terrainMovement) { - this._map._elevationFreeze = !1, this._terrainMovement = !1; - const D = this._map._getTransformForUpdate(); - this._map.getCenterClampedToGround() && D.recalculateZoomAndCenter(this._map.terrain), this._map._applyUpdatedTransform(D) - } - if (s && M) { - this._updatingCamera = !0; - const D = this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions), - z = B => B !== 0 && -this._bearingSnap < B && B < this._bearingSnap; - !D || !D.essential && ye.prefersReducedMotion ? (this._map.fire(new o.l("moveend", { - originalEvent: w - })), z(this._map.getBearing()) && this._map.resetNorth()) : (z(D.bearing || this._map.getBearing()) && (D.bearing = 0), D.freezeElevation = !0, this._map.easeTo(D, { - originalEvent: w - })), this._updatingCamera = !1 - } - } - _fireEvent(e, n) { - this._map.fire(new o.l(e, n ? { - originalEvent: n - } : {})) - } - _requestFrame() { - return this._map.triggerRepaint(), this._map._renderTaskQueue.add((e => { - delete this._frameId, this.handleEvent(new Oi("renderFrame", { - timeStamp: e - })), this._applyChanges() - })) - } - _triggerRenderFrame() { - this._frameId === void 0 && (this._frameId = this._requestFrame()) - } - } - class ed extends o.E { - constructor(e, n, s) { - super(), this._renderFrameCallback = () => { - const u = Math.min((ye.now() - this._easeStart) / this._easeOptions.duration, 1); - this._onEaseFrame(this._easeOptions.easing(u)), u < 1 && this._easeFrameId ? this._easeFrameId = this._requestRenderFrame(this._renderFrameCallback) : this.stop() - }, this._moving = !1, this._zooming = !1, this.transform = e, this._bearingSnap = s.bearingSnap, this.cameraHelper = n, this.on("moveend", (() => { - delete this._requestedCameraState - })) - } - migrateProjection(e, n) { - e.apply(this.transform), this.transform = e, this.cameraHelper = n - } - getCenter() { - return new o.S(this.transform.center.lng, this.transform.center.lat) - } - setCenter(e, n) { - return this.jumpTo({ - center: e - }, n) - } - getCenterElevation() { - return this.transform.elevation - } - setCenterElevation(e, n) { - return this.jumpTo({ - elevation: e - }, n), this - } - getCenterClampedToGround() { - return this._centerClampedToGround - } - setCenterClampedToGround(e) { - this._centerClampedToGround = e - } - panBy(e, n, s) { - return e = o.P.convert(e).mult(-1), this.panTo(this.transform.center, o.e({ - offset: e - }, n), s) - } - panTo(e, n, s) { - return this.easeTo(o.e({ - center: e - }, n), s) - } - getZoom() { - return this.transform.zoom - } - setZoom(e, n) { - return this.jumpTo({ - zoom: e - }, n), this - } - zoomTo(e, n, s) { - return this.easeTo(o.e({ - zoom: e - }, n), s) - } - zoomIn(e, n) { - return this.zoomTo(this.getZoom() + 1, e, n), this - } - zoomOut(e, n) { - return this.zoomTo(this.getZoom() - 1, e, n), this - } - getVerticalFieldOfView() { - return this.transform.fov - } - setVerticalFieldOfView(e, n) { - return e != this.transform.fov && (this.transform.setFov(e), this.fire(new o.l("movestart", n)).fire(new o.l("move", n)).fire(new o.l("moveend", n))), this - } - getBearing() { - return this.transform.bearing - } - setBearing(e, n) { - return this.jumpTo({ - bearing: e - }, n), this - } - getPadding() { - return this.transform.padding - } - setPadding(e, n) { - return this.jumpTo({ - padding: e - }, n), this - } - rotateTo(e, n, s) { - return this.easeTo(o.e({ - bearing: e - }, n), s) - } - resetNorth(e, n) { - return this.rotateTo(0, o.e({ - duration: 1e3 - }, e), n), this - } - resetNorthPitch(e, n) { - return this.easeTo(o.e({ - bearing: 0, - pitch: 0, - roll: 0, - duration: 1e3 - }, e), n), this - } - snapToNorth(e, n) { - return Math.abs(this.getBearing()) < this._bearingSnap ? this.resetNorth(e, n) : this - } - getPitch() { - return this.transform.pitch - } - setPitch(e, n) { - return this.jumpTo({ - pitch: e - }, n), this - } - getRoll() { - return this.transform.roll - } - setRoll(e, n) { - return this.jumpTo({ - roll: e - }, n), this - } - cameraForBounds(e, n) { - e = dt.convert(e).adjustAntiMeridian(); - const s = n && n.bearing || 0; - return this._cameraForBoxAndBearing(e.getNorthWest(), e.getSouthEast(), s, n) - } - _cameraForBoxAndBearing(e, n, s, u) { - const d = { - top: 0, - bottom: 0, - right: 0, - left: 0 - }; - if (typeof(u = o.e({ - padding: d, - offset: [0, 0], - maxZoom: this.transform.maxZoom - }, u)).padding == "number") { - const P = u.padding; - u.padding = { - top: P, - bottom: P, - right: P, - left: P - } - } - const m = o.e(d, u.padding); - u.padding = m; - const y = this.transform, - w = new dt(e, n); - return this.cameraHelper.cameraForBoxAndBearing(u, m, w, s, y) - } - fitBounds(e, n, s) { - return this._fitInternal(this.cameraForBounds(e, n), n, s) - } - fitScreenCoordinates(e, n, s, u, d) { - return this._fitInternal(this._cameraForBoxAndBearing(this.transform.screenPointToLocation(o.P.convert(e)), this.transform.screenPointToLocation(o.P.convert(n)), s, u), u, d) - } - _fitInternal(e, n, s) { - return e ? (delete(n = o.e(e, n)).padding, n.linear ? this.easeTo(n, s) : this.flyTo(n, s)) : this - } - jumpTo(e, n) { - this.stop(); - const s = this._getTransformForUpdate(); - let u = !1, - d = !1, - m = !1; - const y = s.zoom; - this.cameraHelper.handleJumpToCenterZoom(s, e); - const w = s.zoom !== y; - return "elevation" in e && s.elevation !== +e.elevation && s.setElevation(+e.elevation), "bearing" in e && s.bearing !== +e.bearing && (u = !0, s.setBearing(+e.bearing)), "pitch" in e && s.pitch !== +e.pitch && (d = !0, s.setPitch(+e.pitch)), "roll" in e && s.roll !== +e.roll && (m = !0, s.setRoll(+e.roll)), e.padding == null || s.isPaddingEqual(e.padding) || s.setPadding(e.padding), this._applyUpdatedTransform(s), this.fire(new o.l("movestart", n)).fire(new o.l("move", n)), w && this.fire(new o.l("zoomstart", n)).fire(new o.l("zoom", n)).fire(new o.l("zoomend", n)), u && this.fire(new o.l("rotatestart", n)).fire(new o.l("rotate", n)).fire(new o.l("rotateend", n)), d && this.fire(new o.l("pitchstart", n)).fire(new o.l("pitch", n)).fire(new o.l("pitchend", n)), m && this.fire(new o.l("rollstart", n)).fire(new o.l("roll", n)).fire(new o.l("rollend", n)), this.fire(new o.l("moveend", n)) - } - calculateCameraOptionsFromTo(e, n, s, u = 0) { - const d = o.a1.fromLngLat(e, n), - m = o.a1.fromLngLat(s, u), - y = m.x - d.x, - w = m.y - d.y, - P = m.z - d.z, - M = Math.hypot(y, w, P); - if (M === 0) throw new Error("Can't calculate camera options with same From and To"); - const D = Math.hypot(y, w), - z = o.ak(this.transform.cameraToCenterDistance / M / this.transform.tileSize), - B = 180 * Math.atan2(y, -w) / Math.PI; - let U = 180 * Math.acos(D / M) / Math.PI; - return U = P < 0 ? 90 - U : 90 + U, { - center: m.toLngLat(), - elevation: u, - zoom: z, - pitch: U, - bearing: B - } - } - calculateCameraOptionsFromCameraLngLatAltRotation(e, n, s, u, d) { - const m = this.transform.calculateCenterFromCameraLngLatAlt(e, n, s, u); - return { - center: m.center, - elevation: m.elevation, - zoom: m.zoom, - bearing: s, - pitch: u, - roll: d - } - } - easeTo(e, n) { - this._stop(!1, e.easeId), ((e = o.e({ - offset: [0, 0], - duration: 500, - easing: o.co - }, e)).animate === !1 || !e.essential && ye.prefersReducedMotion) && (e.duration = 0); - const s = this._getTransformForUpdate(), - u = this.getBearing(), - d = s.pitch, - m = s.roll, - y = "bearing" in e ? this._normalizeBearing(e.bearing, u) : u, - w = "pitch" in e ? +e.pitch : d, - P = "roll" in e ? this._normalizeBearing(e.roll, m) : m, - M = "padding" in e ? e.padding : s.padding, - D = o.P.convert(e.offset); - let z, B; - e.around && (z = o.S.convert(e.around), B = s.locationToScreenPoint(z)); - const U = { - moving: this._moving, - zooming: this._zooming, - rotating: this._rotating, - pitching: this._pitching, - rolling: this._rolling - }, - ee = this.cameraHelper.handleEaseTo(s, { - bearing: y, - pitch: w, - roll: P, - padding: M, - around: z, - aroundPoint: B, - offsetAsPoint: D, - offset: e.offset, - zoom: e.zoom, - center: e.center - }); - return this._rotating = this._rotating || u !== y, this._pitching = this._pitching || w !== d, this._rolling = this._rolling || P !== m, this._padding = !s.isPaddingEqual(M), this._zooming = this._zooming || ee.isZooming, this._easeId = e.easeId, this._prepareEase(n, e.noMoveStart, U), this.terrain && this._prepareElevation(ee.elevationCenter), this._ease((J => { - ee.easeFunc(J), this.terrain && !e.freezeElevation && this._updateElevation(J), this._applyUpdatedTransform(s), this._fireMoveEvents(n) - }), (J => { - this.terrain && e.freezeElevation && this._finalizeElevation(), this._afterEase(n, J) - }), e), this - } - _prepareEase(e, n, s = {}) { - this._moving = !0, n || s.moving || this.fire(new o.l("movestart", e)), this._zooming && !s.zooming && this.fire(new o.l("zoomstart", e)), this._rotating && !s.rotating && this.fire(new o.l("rotatestart", e)), this._pitching && !s.pitching && this.fire(new o.l("pitchstart", e)), this._rolling && !s.rolling && this.fire(new o.l("rollstart", e)) - } - _prepareElevation(e) { - this._elevationCenter = e, this._elevationStart = this.transform.elevation, this._elevationTarget = this.terrain.getElevationForLngLatZoom(e, this.transform.tileZoom), this._elevationFreeze = !0 - } - _updateElevation(e) { - this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter, this.transform.tileZoom)); - const n = this.terrain.getElevationForLngLatZoom(this._elevationCenter, this.transform.tileZoom); - if (e < 1 && n !== this._elevationTarget) { - const s = this._elevationTarget - this._elevationStart; - this._elevationStart += e * (s - (n - (s * e + this._elevationStart)) / (1 - e)), this._elevationTarget = n - } - this.transform.setElevation(o.C.number(this._elevationStart, this._elevationTarget, e)) - } - _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(e) { - if (!this.terrain && e.elevation >= 0 && e.pitch <= 90) return {}; - const n = e.getCameraLngLat(), - s = e.getCameraAltitude(), - u = this.terrain ? this.terrain.getElevationForLngLatZoom(n, e.zoom) : 0; - if (s < u) { - const d = this.calculateCameraOptionsFromTo(n, u, e.center, e.elevation); - return { - pitch: d.pitch, - zoom: d.zoom - } - } - return {} - } - _applyUpdatedTransform(e) { - const n = []; - if (n.push((u => this._elevateCameraIfInsideTerrain(u))), this.transformCameraUpdate && n.push((u => this.transformCameraUpdate(u))), !n.length) return; - const s = e.clone(); - for (const u of n) { - const d = s.clone(), - { - center: m, - zoom: y, - roll: w, - pitch: P, - bearing: M, - elevation: D - } = u(d); - m && d.setCenter(m), D !== void 0 && d.setElevation(D), y !== void 0 && d.setZoom(y), w !== void 0 && d.setRoll(w), P !== void 0 && d.setPitch(P), M !== void 0 && d.setBearing(M), s.apply(d) - } - this.transform.apply(s) - } - _fireMoveEvents(e) { - this.fire(new o.l("move", e)), this._zooming && this.fire(new o.l("zoom", e)), this._rotating && this.fire(new o.l("rotate", e)), this._pitching && this.fire(new o.l("pitch", e)), this._rolling && this.fire(new o.l("roll", e)) - } - _afterEase(e, n) { - if (this._easeId && n && this._easeId === n) return; - delete this._easeId; - const s = this._zooming, - u = this._rotating, - d = this._pitching, - m = this._rolling; - this._moving = !1, this._zooming = !1, this._rotating = !1, this._pitching = !1, this._rolling = !1, this._padding = !1, s && this.fire(new o.l("zoomend", e)), u && this.fire(new o.l("rotateend", e)), d && this.fire(new o.l("pitchend", e)), m && this.fire(new o.l("rollend", e)), this.fire(new o.l("moveend", e)) - } - flyTo(e, n) { - if (!e.essential && ye.prefersReducedMotion) { - const $e = o.Q(e, ["center", "zoom", "bearing", "pitch", "roll", "elevation"]); - return this.jumpTo($e, n) - } - this.stop(), e = o.e({ - offset: [0, 0], - speed: 1.2, - curve: 1.42, - easing: o.co - }, e); - const s = this._getTransformForUpdate(), - u = s.bearing, - d = s.pitch, - m = s.roll, - y = s.padding, - w = "bearing" in e ? this._normalizeBearing(e.bearing, u) : u, - P = "pitch" in e ? +e.pitch : d, - M = "roll" in e ? this._normalizeBearing(e.roll, m) : m, - D = "padding" in e ? e.padding : s.padding, - z = o.P.convert(e.offset); - let B = s.centerPoint.add(z); - const U = s.screenPointToLocation(B), - ee = this.cameraHelper.handleFlyTo(s, { - bearing: w, - pitch: P, - roll: M, - padding: D, - locationAtOffset: U, - offsetAsPoint: z, - center: e.center, - minZoom: e.minZoom, - zoom: e.zoom - }); - let J = e.curve; - const re = Math.max(s.width, s.height), - se = re / ee.scaleOfZoom, - de = ee.pixelPathLength; - typeof ee.scaleOfMinZoom == "number" && (J = Math.sqrt(re / ee.scaleOfMinZoom / de * 2)); - const ue = J * J; - - function ge($e) { - const Rt = (se * se - re * re + ($e ? -1 : 1) * ue * ue * de * de) / (2 * ($e ? se : re) * ue * de); - return Math.log(Math.sqrt(Rt * Rt + 1) - Rt) - } - - function Te($e) { - return (Math.exp($e) - Math.exp(-$e)) / 2 - } - - function he($e) { - return (Math.exp($e) + Math.exp(-$e)) / 2 - } - const De = ge(!1); - let He = function($e) { - return he(De) / he(De + J * $e) - }, - je = function($e) { - return re * ((he(De) * (Te(Rt = De + J * $e) / he(Rt)) - Te(De)) / ue) / de; - var Rt - }, - qe = (ge(!0) - De) / J; - if (Math.abs(de) < 2e-6 || !isFinite(qe)) { - if (Math.abs(re - se) < 1e-6) return this.easeTo(e, n); - const $e = se < re ? -1 : 1; - qe = Math.abs(Math.log(se / re)) / J, je = () => 0, He = Rt => Math.exp($e * J * Rt) - } - return e.duration = "duration" in e ? +e.duration : 1e3 * qe / ("screenSpeed" in e ? +e.screenSpeed / J : +e.speed), e.maxDuration && e.duration > e.maxDuration && (e.duration = 0), this._zooming = !0, this._rotating = u !== w, this._pitching = P !== d, this._rolling = M !== m, this._padding = !s.isPaddingEqual(D), this._prepareEase(n, !1), this.terrain && this._prepareElevation(ee.targetCenter), this._ease(($e => { - const Rt = $e * qe, - Nt = 1 / He(Rt), - yt = je(Rt); - this._rotating && s.setBearing(o.C.number(u, w, $e)), this._pitching && s.setPitch(o.C.number(d, P, $e)), this._rolling && s.setRoll(o.C.number(m, M, $e)), this._padding && (s.interpolatePadding(y, D, $e), B = s.centerPoint.add(z)), ee.easeFunc($e, Nt, yt, B), this.terrain && !e.freezeElevation && this._updateElevation($e), this._applyUpdatedTransform(s), this._fireMoveEvents(n) - }), (() => { - this.terrain && e.freezeElevation && this._finalizeElevation(), this._afterEase(n) - }), e), this - } - isEasing() { - return !!this._easeFrameId - } - stop() { - return this._stop() - } - _stop(e, n) { - var s; - if (this._easeFrameId && (this._cancelRenderFrame(this._easeFrameId), delete this._easeFrameId, delete this._onEaseFrame), this._onEaseEnd) { - const u = this._onEaseEnd; - delete this._onEaseEnd, u.call(this, n) - } - return e || (s = this.handlers) === null || s === void 0 || s.stop(!1), this - } - _ease(e, n, s) { - s.animate === !1 || s.duration === 0 ? (e(1), n()) : (this._easeStart = ye.now(), this._easeOptions = s, this._onEaseFrame = e, this._onEaseEnd = n, this._easeFrameId = this._requestRenderFrame(this._renderFrameCallback)) - } - _normalizeBearing(e, n) { - e = o.aO(e, -180, 180); - const s = Math.abs(e - n); - return Math.abs(e - 360 - n) < s && (e -= 360), Math.abs(e + 360 - n) < s && (e += 360), e - } - queryTerrainElevation(e) { - return this.terrain ? this.terrain.getElevationForLngLatZoom(o.S.convert(e), this.transform.tileZoom) : null - } - } - const Xc = { - compact: !0, - customAttribution: 'MapLibre' - }; - class Kc { - constructor(e = Xc) { - 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 = n => { - !n || n.sourceDataType !== "metadata" && n.sourceDataType !== "visibility" && n.dataType !== "style" && n.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 = e - } - getDefaultPosition() { - return "bottom-right" - } - onAdd(e) { - return this._map = e, this._compact = this.options.compact, this._container = X.create("details", "maplibregl-ctrl maplibregl-ctrl-attrib"), this._compactButton = X.create("summary", "maplibregl-ctrl-attrib-button", this._container), this._compactButton.addEventListener("click", this._toggleAttribution), this._setElementTitle(this._compactButton, "ToggleAttribution"), this._innerContainer = X.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() { - X.remove(this._container), 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(e, n) { - const s = this._map._getUIString(`AttributionControl.${n}`); - e.title = s, e.setAttribute("aria-label", s) - } - _updateAttributions() { - if (!this._map.style) return; - let e = []; - if (this.options.customAttribution && (Array.isArray(this.options.customAttribution) ? e = e.concat(this.options.customAttribution.map((u => typeof u != "string" ? "" : u))) : typeof this.options.customAttribution == "string" && e.push(this.options.customAttribution)), this._map.style.stylesheet) { - const u = this._map.style.stylesheet; - this.styleOwner = u.owner, this.styleId = u.id - } - const n = this._map.style.sourceCaches; - for (const u in n) { - const d = n[u]; - if (d.used || d.usedForTerrain) { - const m = d.getSource(); - m.attribution && e.indexOf(m.attribution) < 0 && e.push(m.attribution) - } - } - e = e.filter((u => String(u).trim())), e.sort(((u, d) => u.length - d.length)), e = e.filter(((u, d) => { - for (let m = d + 1; m < e.length; m++) - if (e[m].indexOf(u) >= 0) return !1; - return !0 - })); - const s = e.join(" | "); - s !== this._attribHTML && (this._attribHTML = s, e.length ? (this._innerContainer.innerHTML = X.sanitize(s), this._container.classList.remove("maplibregl-attrib-empty")) : this._container.classList.add("maplibregl-attrib-empty"), this._updateCompact(), this._editLink = null) - } - } - class td { - constructor(e = {}) { - this._updateCompact = () => { - const n = this._container.children; - if (n.length) { - const s = n[0]; - this._map.getCanvasContainer().offsetWidth <= 640 || this._compact ? this._compact !== !1 && s.classList.add("maplibregl-compact") : s.classList.remove("maplibregl-compact") - } - }, this.options = e - } - getDefaultPosition() { - return "bottom-left" - } - onAdd(e) { - this._map = e, this._compact = this.options && this.options.compact, this._container = X.create("div", "maplibregl-ctrl"); - const n = X.create("a", "maplibregl-ctrl-logo"); - return n.target = "_blank", n.rel = "noopener nofollow", n.href = "https://maplibre.org/", n.setAttribute("aria-label", this._map._getUIString("LogoControl.Title")), n.setAttribute("rel", "noopener nofollow"), this._container.appendChild(n), this._container.style.display = "block", this._map.on("resize", this._updateCompact), this._updateCompact(), this._container - } - onRemove() { - X.remove(this._container), this._map.off("resize", this._updateCompact), this._map = void 0, this._compact = void 0 - } - } - class Na { - constructor() { - this._queue = [], this._id = 0, this._cleared = !1, this._currentlyRunning = !1 - } - add(e) { - const n = ++this._id; - return this._queue.push({ - callback: e, - id: n, - cancelled: !1 - }), n - } - remove(e) { - const n = this._currentlyRunning, - s = n ? this._queue.concat(n) : this._queue; - for (const u of s) - if (u.id === e) return void(u.cancelled = !0) - } - run(e = 0) { - if (this._currentlyRunning) throw new Error("Attempting to run(), but is already running."); - const n = this._currentlyRunning = this._queue; - this._queue = []; - for (const s of n) - if (!s.cancelled && (s.callback(e), this._cleared)) break; - this._cleared = !1, this._currentlyRunning = !1 - } - clear() { - this._currentlyRunning && (this._cleared = !0), this._queue = [] - } - } - var Cl = o.aJ([{ - name: "a_pos3d", - type: "Int16", - components: 3 - }]); - class hr extends o.E { - constructor(e) { - super(), this._lastTilesetChange = ye.now(), this.sourceCache = e, this._tiles = {}, this._renderableTilesKeys = [], this._sourceTileCache = {}, this.minzoom = 0, this.maxzoom = 22, this.deltaZoom = 1, this.tileSize = e._source.tileSize * 2 ** this.deltaZoom, e.usedForTerrain = !0, e.tileSize = this.tileSize - } - destruct() { - this.sourceCache.usedForTerrain = !1, this.sourceCache.tileSize = null - } - update(e, n) { - this.sourceCache.update(e, n), this._renderableTilesKeys = []; - const s = {}; - for (const u of xe(e, { - tileSize: this.tileSize, - minzoom: this.minzoom, - maxzoom: this.maxzoom, - reparseOverscaled: !1, - terrain: n, - calculateTileZoom: this.sourceCache._source.calculateTileZoom - })) s[u.key] = !0, this._renderableTilesKeys.push(u.key), this._tiles[u.key] || (u.terrainRttPosMatrix32f = new Float64Array(16), o.bY(u.terrainRttPosMatrix32f, 0, o.$, o.$, 0, 0, 1), this._tiles[u.key] = new Nr(u, this.tileSize), this._lastTilesetChange = ye.now()); - for (const u in this._tiles) s[u] || delete this._tiles[u] - } - freeRtt(e) { - for (const n in this._tiles) { - const s = this._tiles[n]; - (!e || s.tileID.equals(e) || s.tileID.isChildOf(e) || e.isChildOf(s.tileID)) && (s.rtt = []) - } - } - getRenderableTiles() { - return this._renderableTilesKeys.map((e => this.getTileByID(e))) - } - getTileByID(e) { - return this._tiles[e] - } - getTerrainCoords(e, n) { - return n ? this._getTerrainCoordsForTileRanges(e, n) : this._getTerrainCoordsForRegularTile(e) - } - _getTerrainCoordsForRegularTile(e) { - const n = {}; - for (const s of this._renderableTilesKeys) { - const u = this._tiles[s].tileID, - d = e.clone(), - m = o.ba(); - if (u.canonical.equals(e.canonical)) o.bY(m, 0, o.$, o.$, 0, 0, 1); - else if (u.canonical.isChildOf(e.canonical)) { - const y = u.canonical.z - e.canonical.z, - w = u.canonical.x - (u.canonical.x >> y << y), - P = u.canonical.y - (u.canonical.y >> y << y), - M = o.$ >> y; - o.bY(m, 0, M, M, 0, 0, 1), o.M(m, m, [-w * M, -P * M, 0]) - } else { - if (!e.canonical.isChildOf(u.canonical)) continue; - { - const y = e.canonical.z - u.canonical.z, - w = e.canonical.x - (e.canonical.x >> y << y), - P = e.canonical.y - (e.canonical.y >> y << y), - M = o.$ >> y; - o.bY(m, 0, o.$, o.$, 0, 0, 1), o.M(m, m, [w * M, P * M, 0]), o.N(m, m, [1 / 2 ** y, 1 / 2 ** y, 0]) - } - } - d.terrainRttPosMatrix32f = new Float32Array(m), n[s] = d - } - return n - } - _getTerrainCoordsForTileRanges(e, n) { - const s = {}; - for (const u of this._renderableTilesKeys) { - const d = this._tiles[u].tileID; - if (!this._isWithinTileRanges(d, n)) continue; - const m = e.clone(), - y = o.ba(); - if (d.canonical.z === e.canonical.z) { - const w = e.canonical.x - d.canonical.x, - P = e.canonical.y - d.canonical.y; - o.bY(y, 0, o.$, o.$, 0, 0, 1), o.M(y, y, [w * o.$, P * o.$, 0]) - } else if (d.canonical.z > e.canonical.z) { - const w = d.canonical.z - e.canonical.z, - P = d.canonical.x - (d.canonical.x >> w << w), - M = d.canonical.y - (d.canonical.y >> w << w), - D = e.canonical.x - (d.canonical.x >> w), - z = e.canonical.y - (d.canonical.y >> w), - B = o.$ >> w; - o.bY(y, 0, B, B, 0, 0, 1), o.M(y, y, [-P * B + D * o.$, -M * B + z * o.$, 0]) - } else { - const w = e.canonical.z - d.canonical.z, - P = e.canonical.x - (e.canonical.x >> w << w), - M = e.canonical.y - (e.canonical.y >> w << w), - D = (e.canonical.x >> w) - d.canonical.x, - z = (e.canonical.y >> w) - d.canonical.y, - B = o.$ << w; - o.bY(y, 0, B, B, 0, 0, 1), o.M(y, y, [P * o.$ + D * B, M * o.$ + z * B, 0]) - } - m.terrainRttPosMatrix32f = new Float32Array(y), s[u] = m - } - return s - } - getSourceTile(e, n) { - const s = this.sourceCache._source; - let u = e.overscaledZ - this.deltaZoom; - if (u > s.maxzoom && (u = s.maxzoom), u < s.minzoom) return null; - this._sourceTileCache[e.key] || (this._sourceTileCache[e.key] = e.scaledTo(u).key); - let d = this.sourceCache.getTileByID(this._sourceTileCache[e.key]); - if ((!d || !d.dem) && n) - for (; u >= s.minzoom && (!d || !d.dem);) d = this.sourceCache.getTileByID(e.scaledTo(u--).key); - return d - } - anyTilesAfterTime(e = Date.now()) { - return this._lastTilesetChange >= e - } - _isWithinTileRanges(e, n) { - return n[e.canonical.z] && e.canonical.x >= n[e.canonical.z].minTileX && e.canonical.x <= n[e.canonical.z].maxTileX && e.canonical.y >= n[e.canonical.z].minTileY && e.canonical.y <= n[e.canonical.z].maxTileY - } - } - class Rr { - constructor(e, n, s) { - this._meshCache = {}, this.painter = e, this.sourceCache = new hr(n), this.options = s, this.exaggeration = typeof s.exaggeration == "number" ? s.exaggeration : 1, this.qualityFactor = 2, this.meshSize = 128, this._demMatrixCache = {}, this.coordsIndex = [], this._coordsTextureSize = 1024 - } - getDEMElevation(e, n, s, u = o.$) { - var d; - if (!(n >= 0 && n < u && s >= 0 && s < u)) return 0; - const m = this.getTerrainData(e), - y = (d = m.tile) === null || d === void 0 ? void 0 : d.dem; - if (!y) return 0; - const w = o.cs([], [n / u * o.$, s / u * o.$], m.u_terrain_matrix), - P = [w[0] * y.dim, w[1] * y.dim], - M = Math.floor(P[0]), - D = Math.floor(P[1]), - z = P[0] - M, - B = P[1] - D; - return y.get(M, D) * (1 - z) * (1 - B) + y.get(M + 1, D) * z * (1 - B) + y.get(M, D + 1) * (1 - z) * B + y.get(M + 1, D + 1) * z * B - } - getElevationForLngLatZoom(e, n) { - if (!o.ct(n, e.wrap())) return 0; - const { - tileID: s, - mercatorX: u, - mercatorY: d - } = this._getOverscaledTileIDFromLngLatZoom(e, n); - return this.getElevation(s, u % o.$, d % o.$, o.$) - } - getElevation(e, n, s, u = o.$) { - return this.getDEMElevation(e, n, s, u) * this.exaggeration - } - getTerrainData(e) { - if (!this._emptyDemTexture) { - const u = this.painter.context, - d = new o.R({ - width: 1, - height: 1 - }, new Uint8Array(4)); - this._emptyDepthTexture = new o.T(u, d, u.gl.RGBA, { - premultiply: !1 - }), this._emptyDemUnpack = [0, 0, 0, 0], this._emptyDemTexture = new o.T(u, new o.R({ - width: 1, - height: 1 - }), u.gl.RGBA, { - premultiply: !1 - }), this._emptyDemTexture.bind(u.gl.NEAREST, u.gl.CLAMP_TO_EDGE), this._emptyDemMatrix = o.ag([]) - } - const n = this.sourceCache.getSourceTile(e, !0); - if (n && n.dem && (!n.demTexture || n.needsTerrainPrepare)) { - const u = this.painter.context; - n.demTexture = this.painter.getTileTexture(n.dem.stride), n.demTexture ? n.demTexture.update(n.dem.getPixels(), { - premultiply: !1 - }) : n.demTexture = new o.T(u, n.dem.getPixels(), u.gl.RGBA, { - premultiply: !1 - }), n.demTexture.bind(u.gl.NEAREST, u.gl.CLAMP_TO_EDGE), n.needsTerrainPrepare = !1 - } - const s = n && n + n.tileID.key + e.key; - if (s && !this._demMatrixCache[s]) { - const u = this.sourceCache.sourceCache._source.maxzoom; - let d = e.canonical.z - n.tileID.canonical.z; - e.overscaledZ > e.canonical.z && (e.canonical.z >= u ? d = e.canonical.z - u : o.w("cannot calculate elevation if elevation maxzoom > source.maxzoom")); - const m = e.canonical.x - (e.canonical.x >> d << d), - y = e.canonical.y - (e.canonical.y >> d << d), - w = o.cu(new Float64Array(16), [1 / (o.$ << d), 1 / (o.$ << d), 0]); - o.M(w, w, [m * o.$, y * o.$, 0]), this._demMatrixCache[e.key] = { - matrix: w, - coord: e - } - } - return { - u_depth: 2, - u_terrain: 3, - u_terrain_dim: n && n.dem && n.dem.dim || 1, - u_terrain_matrix: s ? this._demMatrixCache[e.key].matrix : this._emptyDemMatrix, - u_terrain_unpack: n && n.dem && n.dem.getUnpackVector() || this._emptyDemUnpack, - u_terrain_exaggeration: this.exaggeration, - texture: (n && n.demTexture || this._emptyDemTexture).texture, - depthTexture: (this._fboDepthTexture || this._emptyDepthTexture).texture, - tile: n - } - } - getFramebuffer(e) { - const n = this.painter, - s = n.width / devicePixelRatio, - u = n.height / devicePixelRatio; - return !this._fbo || this._fbo.width === s && this._fbo.height === u || (this._fbo.destroy(), this._fboCoordsTexture.destroy(), this._fboDepthTexture.destroy(), delete this._fbo, delete this._fboDepthTexture, delete this._fboCoordsTexture), this._fboCoordsTexture || (this._fboCoordsTexture = new o.T(n.context, { - width: s, - height: u, - data: null - }, n.context.gl.RGBA, { - premultiply: !1 - }), this._fboCoordsTexture.bind(n.context.gl.NEAREST, n.context.gl.CLAMP_TO_EDGE)), this._fboDepthTexture || (this._fboDepthTexture = new o.T(n.context, { - width: s, - height: u, - data: null - }, n.context.gl.RGBA, { - premultiply: !1 - }), this._fboDepthTexture.bind(n.context.gl.NEAREST, n.context.gl.CLAMP_TO_EDGE)), this._fbo || (this._fbo = n.context.createFramebuffer(s, u, !0, !1), this._fbo.depthAttachment.set(n.context.createRenderbuffer(n.context.gl.DEPTH_COMPONENT16, s, u))), this._fbo.colorAttachment.set(e === "coords" ? this._fboCoordsTexture.texture : this._fboDepthTexture.texture), this._fbo - } - getCoordsTexture() { - const e = this.painter.context; - if (this._coordsTexture) return this._coordsTexture; - const n = new Uint8Array(this._coordsTextureSize * this._coordsTextureSize * 4); - for (let d = 0, m = 0; d < this._coordsTextureSize; d++) - for (let y = 0; y < this._coordsTextureSize; y++, m += 4) n[m + 0] = 255 & y, n[m + 1] = 255 & d, n[m + 2] = y >> 8 << 4 | d >> 8, n[m + 3] = 0; - const s = new o.R({ - width: this._coordsTextureSize, - height: this._coordsTextureSize - }, new Uint8Array(n.buffer)), - u = new o.T(e, s, e.gl.RGBA, { - premultiply: !1 - }); - return u.bind(e.gl.NEAREST, e.gl.CLAMP_TO_EDGE), this._coordsTexture = u, u - } - pointCoordinate(e) { - this.painter.maybeDrawDepthAndCoords(!0); - const n = new Uint8Array(4), - s = this.painter.context, - u = s.gl, - d = Math.round(e.x * this.painter.pixelRatio / devicePixelRatio), - m = Math.round(e.y * this.painter.pixelRatio / devicePixelRatio), - y = Math.round(this.painter.height / devicePixelRatio); - s.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer), u.readPixels(d, y - m - 1, 1, 1, u.RGBA, u.UNSIGNED_BYTE, n), s.bindFramebuffer.set(null); - const w = n[0] + (n[2] >> 4 << 8), - P = n[1] + ((15 & n[2]) << 8), - M = this.coordsIndex[255 - n[3]], - D = M && this.sourceCache.getTileByID(M); - if (!D) return null; - const z = this._coordsTextureSize, - B = (1 << D.tileID.canonical.z) * z; - return new o.a1((D.tileID.canonical.x * z + w) / B + D.tileID.wrap, (D.tileID.canonical.y * z + P) / B, this.getElevation(D.tileID, w, P, z)) - } - depthAtPoint(e) { - const n = new Uint8Array(4), - s = this.painter.context, - u = s.gl; - return s.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer), u.readPixels(e.x, this.painter.height / devicePixelRatio - e.y - 1, 1, 1, u.RGBA, u.UNSIGNED_BYTE, n), s.bindFramebuffer.set(null), (n[0] / 16777216 + n[1] / 65536 + n[2] / 256 + n[3]) / 256 - } - getTerrainMesh(e) { - var n; - const s = ((n = this.painter.style.projection) === null || n === void 0 ? void 0 : n.transitionState) > 0, - u = s && e.canonical.y === 0, - d = s && e.canonical.y === (1 << e.canonical.z) - 1, - m = `m_${u?"n":""}_${d?"s":""}`; - if (this._meshCache[m]) return this._meshCache[m]; - const y = this.painter.context, - w = new o.cv, - P = new o.aN, - M = this.meshSize, - D = o.$ / M, - z = M * M; - for (let he = 0; he <= M; he++) - for (let De = 0; De <= M; De++) w.emplaceBack(De * D, he * D, 0); - for (let he = 0; he < z; he += M + 1) - for (let De = 0; De < M; De++) P.emplaceBack(De + he, M + De + he + 1, M + De + he + 2), P.emplaceBack(De + he, M + De + he + 2, De + he + 1); - const B = w.length, - U = B + (M + 1), - ee = (M + 1) * M, - J = u ? o.bh : 0, - re = u ? 0 : 1, - se = d ? o.bi : o.$, - de = d ? 0 : 1; - for (let he = 0; he <= M; he++) w.emplaceBack(he * D, J, re); - for (let he = 0; he <= M; he++) w.emplaceBack(he * D, se, de); - for (let he = 0; he < M; he++) P.emplaceBack(ee + he, U + he, U + he + 1), P.emplaceBack(ee + he, U + he + 1, ee + he + 1), P.emplaceBack(0 + he, B + he + 1, B + he), P.emplaceBack(0 + he, 0 + he + 1, B + he + 1); - const ue = w.length, - ge = ue + 2 * (M + 1); - for (const he of [0, 1]) - for (let De = 0; De <= M; De++) - for (const He of [0, 1]) w.emplaceBack(he * o.$, De * D, He); - for (let he = 0; he < 2 * M; he += 2) P.emplaceBack(ue + he, ue + he + 1, ue + he + 3), P.emplaceBack(ue + he, ue + he + 3, ue + he + 2), P.emplaceBack(ge + he, ge + he + 3, ge + he + 1), P.emplaceBack(ge + he, ge + he + 2, ge + he + 3); - const Te = new Ri(y.createVertexBuffer(w, Cl.members), y.createIndexBuffer(P), o.aM.simpleSegment(0, 0, w.length, P.length)); - return this._meshCache[m] = Te, Te - } - getMeshFrameDelta(e) { - return 2 * Math.PI * o.bu / Math.pow(2, Math.max(e, 0)) / 5 - } - getMinTileElevationForLngLatZoom(e, n) { - var s; - const { - tileID: u - } = this._getOverscaledTileIDFromLngLatZoom(e, n); - return (s = this.getMinMaxElevation(u).minElevation) !== null && s !== void 0 ? s : 0 - } - getMinMaxElevation(e) { - const n = this.getTerrainData(e).tile, - s = { - minElevation: null, - maxElevation: null - }; - return n && n.dem && (s.minElevation = n.dem.min * this.exaggeration, s.maxElevation = n.dem.max * this.exaggeration), s - } - _getOverscaledTileIDFromLngLatZoom(e, n) { - const s = o.a1.fromLngLat(e.wrap()), - u = (1 << n) * o.$, - d = s.x * u, - m = s.y * u, - y = Math.floor(d / o.$), - w = Math.floor(m / o.$); - return { - tileID: new o.Z(n, 0, n, y, w), - mercatorX: d, - mercatorY: m - } - } - } - class Sl { - constructor(e, n, s) { - this._context = e, this._size = n, this._tileSize = s, this._objects = [], this._recentlyUsed = [], this._stamp = 0 - } - destruct() { - for (const e of this._objects) e.texture.destroy(), e.fbo.destroy() - } - _createObject(e) { - const n = this._context.createFramebuffer(this._tileSize, this._tileSize, !0, !0), - s = new o.T(this._context, { - width: this._tileSize, - height: this._tileSize, - data: null - }, this._context.gl.RGBA); - return s.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), n.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL, this._tileSize, this._tileSize)), n.colorAttachment.set(s.texture), { - id: e, - fbo: n, - texture: s, - stamp: -1, - inUse: !1 - } - } - getObjectForId(e) { - return this._objects[e] - } - useObject(e) { - e.inUse = !0, this._recentlyUsed = this._recentlyUsed.filter((n => e.id !== n)), this._recentlyUsed.push(e.id) - } - stampObject(e) { - e.stamp = ++this._stamp - } - getOrCreateFreeObject() { - for (const n of this._recentlyUsed) - if (!this._objects[n].inUse) return this._objects[n]; - if (this._objects.length >= this._size) throw new Error("No free RenderPool available, call freeAllObjects() required!"); - const e = this._createObject(this._objects.length); - return this._objects.push(e), e - } - freeObject(e) { - e.inUse = !1 - } - freeAllObjects() { - for (const e of this._objects) this.freeObject(e) - } - isFull() { - return !(this._objects.length < this._size) && this._objects.some((e => !e.inUse)) === !1 - } - } - const ns = { - background: !0, - fill: !0, - line: !0, - raster: !0, - hillshade: !0, - "color-relief": !0 - }; - class Pl { - constructor(e, n) { - this.painter = e, this.terrain = n, this.pool = new Sl(e.context, 30, n.sourceCache.tileSize * n.qualityFactor) - } - destruct() { - this.pool.destruct() - } - getTexture(e) { - return this.pool.getObjectForId(e.rtt[this._stacks.length - 1].id).texture - } - prepareForRender(e, n) { - this._stacks = [], this._prevType = null, this._rttTiles = [], this._renderableTiles = this.terrain.sourceCache.getRenderableTiles(), this._renderableLayerIds = e._order.filter((s => !e._layers[s].isHidden(n))), this._coordsAscending = {}; - for (const s in e.sourceCaches) { - this._coordsAscending[s] = {}; - const u = e.sourceCaches[s].getVisibleCoordinates(), - d = e.sourceCaches[s].getSource(), - m = d instanceof Ft ? d.terrainTileRanges : null; - for (const y of u) { - const w = this.terrain.sourceCache.getTerrainCoords(y, m); - for (const P in w) this._coordsAscending[s][P] || (this._coordsAscending[s][P] = []), this._coordsAscending[s][P].push(w[P]) - } - } - this._coordsAscendingStr = {}; - for (const s of e._order) { - const u = e._layers[s], - d = u.source; - if (ns[u.type] && !this._coordsAscendingStr[d]) { - this._coordsAscendingStr[d] = {}; - for (const m in this._coordsAscending[d]) this._coordsAscendingStr[d][m] = this._coordsAscending[d][m].map((y => y.key)).sort().join() - } - } - for (const s of this._renderableTiles) - for (const u in this._coordsAscendingStr) { - const d = this._coordsAscendingStr[u][s.tileID.key]; - d && d !== s.rttCoords[u] && (s.rtt = []) - } - } - renderLayer(e, n) { - if (e.isHidden(this.painter.transform.zoom)) return !1; - const s = Object.assign(Object.assign({}, n), { - isRenderingToTexture: !0 - }), - u = e.type, - d = this.painter, - m = this._renderableLayerIds[this._renderableLayerIds.length - 1] === e.id; - if (ns[u] && (this._prevType && ns[this._prevType] || this._stacks.push([]), this._prevType = u, this._stacks[this._stacks.length - 1].push(e.id), !m)) return !0; - if (ns[this._prevType] || ns[u] && m) { - this._prevType = u; - const y = this._stacks.length - 1, - w = this._stacks[y] || []; - for (const P of this._renderableTiles) { - if (this.pool.isFull() && (vl(this.painter, this.terrain, this._rttTiles, s), this._rttTiles = [], this.pool.freeAllObjects()), this._rttTiles.push(P), P.rtt[y]) { - const D = this.pool.getObjectForId(P.rtt[y].id); - if (D.stamp === P.rtt[y].stamp) { - this.pool.useObject(D); - continue - } - } - const M = this.pool.getOrCreateFreeObject(); - this.pool.useObject(M), this.pool.stampObject(M), P.rtt[y] = { - id: M.id, - stamp: M.stamp - }, d.context.bindFramebuffer.set(M.fbo.framebuffer), d.context.clear({ - color: o.bf.transparent, - stencil: 0 - }), d.currentStencilSource = void 0; - for (let D = 0; D < w.length; D++) { - const z = d.style._layers[w[D]], - B = z.source ? this._coordsAscending[z.source][P.tileID.key] : [P.tileID]; - d.context.viewport.set([0, 0, M.fbo.width, M.fbo.height]), d._renderTileClippingMasks(z, B, !0), d.renderLayer(d, d.style.sourceCaches[z.source], z, B, s), z.source && (P.rttCoords[z.source] = this._coordsAscendingStr[z.source][P.tileID.key]) - } - } - return vl(this.painter, this.terrain, this._rttTiles, s), this._rttTiles = [], this.pool.freeAllObjects(), ns[u] - } - return !1 - } - } - const jn = { - "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": "Reset bearing to 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" - }, - rd = $, - ha = { - hash: !1, - interactive: !0, - bearingSnap: 7, - attributionControl: Xc, - 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, - maxTileCacheSize: null, - maxTileCacheZoomLevels: o.a.MAX_TILE_CACHE_ZOOM_LEVELS, - transformRequest: null, - transformCameraUpdate: null, - fadeDuration: 300, - crossSourceCollisions: !0, - clickTolerance: 3, - localIdeographFontFamily: "sans-serif", - pitchWithRotate: !0, - rollEnabled: !1, - validateStyle: !0, - maxCanvasSize: [4096, 4096], - cancelPendingTileRequestsWhileZooming: !0, - centerClampedToGround: !0 - }, - bp = { - showCompass: !0, - showZoom: !0, - visualizePitch: !1, - visualizeRoll: !0 - }; - class Lo { - constructor(e, n, s = !1) { - this.mousedown = d => { - this.startMove(d, X.mousePos(this.element, d)), X.addEventListener(window, "mousemove", this.mousemove), X.addEventListener(window, "mouseup", this.mouseup) - }, this.mousemove = d => { - this.move(d, X.mousePos(this.element, d)) - }, this.mouseup = d => { - this._rotatePitchHandler.dragEnd(d), this.offTemp() - }, this.touchstart = d => { - d.targetTouches.length !== 1 ? this.reset() : (this._startPos = this._lastPos = X.touchPos(this.element, d.targetTouches)[0], this.startMove(d, this._startPos), X.addEventListener(window, "touchmove", this.touchmove, { - passive: !1 - }), X.addEventListener(window, "touchend", this.touchend)) - }, this.touchmove = d => { - d.targetTouches.length !== 1 ? this.reset() : (this._lastPos = X.touchPos(this.element, d.targetTouches)[0], this.move(d, this._lastPos)) - }, this.touchend = d => { - d.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 = n; - const u = new vp; - this._rotatePitchHandler = new Zs({ - clickTolerance: 3, - move: (d, m) => { - const y = n.getBoundingClientRect(), - w = new o.P((y.bottom - y.top) / 2, (y.right - y.left) / 2); - return { - bearingDelta: o.cn(new o.P(d.x, m.y), m, w), - pitchDelta: s ? -.5 * (m.y - d.y) : void 0 - } - }, - moveStateManager: u, - enable: !0, - assignEvents: () => {} - }), this.map = e, X.addEventListener(n, "mousedown", this.mousedown), X.addEventListener(n, "touchstart", this.touchstart, { - passive: !1 - }), X.addEventListener(n, "touchcancel", this.reset) - } - startMove(e, n) { - this._rotatePitchHandler.dragStart(e, n), X.disableDrag() - } - move(e, n) { - const s = this.map, - { - bearingDelta: u, - pitchDelta: d - } = this._rotatePitchHandler.dragMove(e, n) || {}; - u && s.setBearing(s.getBearing() + u), d && s.setPitch(s.getPitch() + d) - } - off() { - const e = this.element; - X.removeEventListener(e, "mousedown", this.mousedown), X.removeEventListener(e, "touchstart", this.touchstart, { - passive: !1 - }), X.removeEventListener(window, "touchmove", this.touchmove, { - passive: !1 - }), X.removeEventListener(window, "touchend", this.touchend), X.removeEventListener(e, "touchcancel", this.reset), this.offTemp() - } - offTemp() { - X.enableDrag(), X.removeEventListener(window, "mousemove", this.mousemove), X.removeEventListener(window, "mouseup", this.mouseup), X.removeEventListener(window, "touchmove", this.touchmove, { - passive: !1 - }), X.removeEventListener(window, "touchend", this.touchend) - } - } - let Ai; - - function Hi(h, e, n, s = !1) { - if (s || !n.getCoveringTilesDetailsProvider().allowWorldCopies()) return h == null ? void 0 : h.wrap(); - const u = new o.S(h.lng, h.lat); - if (h = new o.S(h.lng, h.lat), e) { - const d = new o.S(h.lng - 360, h.lat), - m = new o.S(h.lng + 360, h.lat), - y = n.locationToScreenPoint(h).distSqr(e); - n.locationToScreenPoint(d).distSqr(e) < y ? h = d : n.locationToScreenPoint(m).distSqr(e) < y && (h = m) - } - for (; Math.abs(h.lng - n.center.lng) > 180;) { - const d = n.locationToScreenPoint(h); - if (d.x >= 0 && d.y >= 0 && d.x <= n.width && d.y <= n.height) break; - h.lng > n.center.lng ? h.lng -= 360 : h.lng += 360 - } - return h.lng !== u.lng && n.isPointOnMapSurface(n.locationToScreenPoint(h)) ? h : u - } - const Il = { - 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 Ws(h, e, n) { - const s = h.classList; - for (const u in Il) s.remove(`maplibregl-${n}-anchor-${u}`); - s.add(`maplibregl-${n}-anchor-${e}`) - } - class Xs extends o.E { - constructor(e) { - if (super(), this._onKeyPress = n => { - const s = n.code, - u = n.charCode || n.keyCode; - s !== "Space" && s !== "Enter" && u !== 32 && u !== 13 || this.togglePopup() - }, this._onMapClick = n => { - const s = n.originalEvent.target, - u = this._element; - this._popup && (s === u || u.contains(s)) && this.togglePopup() - }, this._update = n => { - if (!this._map) return; - const s = this._map.loaded() && !this._map.isMoving(); - ((n == null ? void 0 : n.type) === "terrain" || (n == null ? void 0 : n.type) === "render" && !s) && this._map.once("render", this._update), this._lngLat = Hi(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 u = ""; - this._rotationAlignment === "viewport" || this._rotationAlignment === "auto" ? u = `rotateZ(${this._rotation}deg)` : this._rotationAlignment === "map" && (u = `rotateZ(${this._rotation-this._map.getBearing()}deg)`); - let d = ""; - this._pitchAlignment === "viewport" || this._pitchAlignment === "auto" ? d = "rotateX(0deg)" : this._pitchAlignment === "map" && (d = `rotateX(${this._map.getPitch()}deg)`), this._subpixelPositioning || n && n.type !== "moveend" || (this._pos = this._pos.round()), X.setTransform(this._element, `${Il[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${d} ${u}`), ye.frameAsync(new AbortController).then((() => { - this._updateOpacity(n && n.type === "moveend") - })).catch((() => {})) - }, this._onMove = n => { - if (!this._isDragging) { - const s = this._clickTolerance || this._map._clickTolerance; - this._isDragging = n.point.dist(this._pointerdownPos) >= s - } - this._isDragging && (this._pos = n.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 o.l("dragstart"))), this.fire(new o.l("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 o.l("dragend")), this._state = "inactive" - }, this._addDragHandler = n => { - this._element.contains(n.originalEvent.target) && (n.preventDefault(), this._positionDelta = n.point.sub(this._pos).add(this._offset), this._pointerdownPos = n.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 = e && e.anchor || "center", this._color = e && e.color || "#3FB1CE", this._scale = e && e.scale || 1, this._draggable = e && e.draggable || !1, this._clickTolerance = e && e.clickTolerance || 0, this._subpixelPositioning = e && e.subpixelPositioning || !1, this._isDragging = !1, this._state = "inactive", this._rotation = e && e.rotation || 0, this._rotationAlignment = e && e.rotationAlignment || "auto", this._pitchAlignment = e && e.pitchAlignment && e.pitchAlignment !== "auto" ? e.pitchAlignment : this._rotationAlignment, this.setOpacity(e == null ? void 0 : e.opacity, e == null ? void 0 : e.opacityWhenCovered), e && e.element) this._element = e.element, this._offset = o.P.convert(e && e.offset || [0, 0]); - else { - this._defaultMarker = !0, this._element = X.create("div"); - const n = X.createNS("http://www.w3.org/2000/svg", "svg"), - s = 41, - u = 27; - n.setAttributeNS(null, "display", "block"), n.setAttributeNS(null, "height", `${s}px`), n.setAttributeNS(null, "width", `${u}px`), n.setAttributeNS(null, "viewBox", `0 0 ${u} ${s}`); - const d = X.createNS("http://www.w3.org/2000/svg", "g"); - d.setAttributeNS(null, "stroke", "none"), d.setAttributeNS(null, "stroke-width", "1"), d.setAttributeNS(null, "fill", "none"), d.setAttributeNS(null, "fill-rule", "evenodd"); - const m = X.createNS("http://www.w3.org/2000/svg", "g"); - m.setAttributeNS(null, "fill-rule", "nonzero"); - const y = X.createNS("http://www.w3.org/2000/svg", "g"); - y.setAttributeNS(null, "transform", "translate(3.0, 29.0)"), y.setAttributeNS(null, "fill", "#000000"); - const w = [{ - 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 re of w) { - const se = X.createNS("http://www.w3.org/2000/svg", "ellipse"); - se.setAttributeNS(null, "opacity", "0.04"), se.setAttributeNS(null, "cx", "10.5"), se.setAttributeNS(null, "cy", "5.80029008"), se.setAttributeNS(null, "rx", re.rx), se.setAttributeNS(null, "ry", re.ry), y.appendChild(se) - } - const P = X.createNS("http://www.w3.org/2000/svg", "g"); - P.setAttributeNS(null, "fill", this._color); - const M = X.createNS("http://www.w3.org/2000/svg", "path"); - M.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"), P.appendChild(M); - const D = X.createNS("http://www.w3.org/2000/svg", "g"); - D.setAttributeNS(null, "opacity", "0.25"), D.setAttributeNS(null, "fill", "#000000"); - const z = X.createNS("http://www.w3.org/2000/svg", "path"); - z.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"), D.appendChild(z); - const B = X.createNS("http://www.w3.org/2000/svg", "g"); - B.setAttributeNS(null, "transform", "translate(6.0, 7.0)"), B.setAttributeNS(null, "fill", "#FFFFFF"); - const U = X.createNS("http://www.w3.org/2000/svg", "g"); - U.setAttributeNS(null, "transform", "translate(8.0, 8.0)"); - const ee = X.createNS("http://www.w3.org/2000/svg", "circle"); - ee.setAttributeNS(null, "fill", "#000000"), ee.setAttributeNS(null, "opacity", "0.25"), ee.setAttributeNS(null, "cx", "5.5"), ee.setAttributeNS(null, "cy", "5.5"), ee.setAttributeNS(null, "r", "5.4999962"); - const J = X.createNS("http://www.w3.org/2000/svg", "circle"); - J.setAttributeNS(null, "fill", "#FFFFFF"), J.setAttributeNS(null, "cx", "5.5"), J.setAttributeNS(null, "cy", "5.5"), J.setAttributeNS(null, "r", "5.4999962"), U.appendChild(ee), U.appendChild(J), m.appendChild(y), m.appendChild(P), m.appendChild(D), m.appendChild(B), m.appendChild(U), n.appendChild(m), n.setAttributeNS(null, "height", s * this._scale + "px"), n.setAttributeNS(null, "width", u * this._scale + "px"), this._element.appendChild(n), this._offset = o.P.convert(e && e.offset || [0, -14]) - } - if (this._element.classList.add("maplibregl-marker"), this._element.addEventListener("dragstart", (n => { - n.preventDefault() - })), this._element.addEventListener("mousedown", (n => { - n.preventDefault() - })), Ws(this._element, this._anchor, "marker"), e && e.className) - for (const n of e.className.split(" ")) this._element.classList.add(n); - this._popup = null - } - addTo(e) { - return this.remove(), this._map = e, this._element.hasAttribute("aria-label") || this._element.setAttribute("aria-label", e._getUIString("Marker.Title")), e.getCanvasContainer().appendChild(this._element), e.on("move", this._update), e.on("moveend", this._update), e.on("terrain", this._update), e.on("projectiontransition", this._update), 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), X.remove(this._element), this._popup && this._popup.remove(), this - } - getLngLat() { - return this._lngLat - } - setLngLat(e) { - return this._lngLat = o.S.convert(e), this._pos = null, this._popup && this._popup.setLngLat(this._lngLat), this._update(), this - } - getElement() { - return this._element - } - setPopup(e) { - if (this._popup && (this._popup.remove(), this._popup = null, this._element.removeEventListener("keypress", this._onKeyPress), this._originalTabIndex || this._element.removeAttribute("tabindex")), e) { - if (!("offset" in e.options)) { - const u = Math.abs(13.5) / Math.SQRT2; - e.options.offset = this._defaultMarker ? { - top: [0, 0], - "top-left": [0, 0], - "top-right": [0, 0], - bottom: [0, -38.1], - "bottom-left": [u, -1 * (38.1 - 13.5 + u)], - "bottom-right": [-u, -1 * (38.1 - 13.5 + u)], - left: [13.5, -1 * (38.1 - 13.5)], - right: [-13.5, -1 * (38.1 - 13.5)] - } : this._offset - } - this._popup = e, this._originalTabIndex = this._element.getAttribute("tabindex"), this._originalTabIndex || this._element.setAttribute("tabindex", "0"), this._element.addEventListener("keypress", this._onKeyPress) - } - return this - } - setSubpixelPositioning(e) { - return this._subpixelPositioning = e, this - } - getPopup() { - return this._popup - } - togglePopup() { - const e = this._popup; - return this._element.style.opacity === this._opacityWhenCovered ? this : e ? (e.isOpen() ? e.remove() : (e.setLngLat(this._lngLat), e.addTo(this._map)), this) : this - } - _updateOpacity(e = !1) { - var n, s; - const u = (n = this._map) === null || n === void 0 ? void 0 : n.terrain, - d = this._map.transform.isLocationOccluded(this._lngLat); - if (!u || d) { - const B = d ? this._opacityWhenCovered : this._opacity; - return void(this._element.style.opacity !== B && (this._element.style.opacity = B)) - } - if (e) this._opacityTimeout = null; - else { - if (this._opacityTimeout) return; - this._opacityTimeout = setTimeout((() => { - this._opacityTimeout = null - }), 100) - } - const m = this._map, - y = m.terrain.depthAtPoint(this._pos), - w = m.terrain.getElevationForLngLatZoom(this._lngLat, m.transform.tileZoom); - if (m.transform.lngLatToCameraDepth(this._lngLat, w) - y < .006) return void(this._element.style.opacity = this._opacity); - const P = -this._offset.y / m.transform.pixelsPerMeter, - M = Math.sin(m.getPitch() * Math.PI / 180) * P, - D = m.terrain.depthAtPoint(new o.P(this._pos.x, this._pos.y - this._offset.y)), - z = m.transform.lngLatToCameraDepth(this._lngLat, w + M) - D > .006; - !((s = this._popup) === null || s === void 0) && s.isOpen() && z && this._popup.remove(), this._element.style.opacity = z ? this._opacityWhenCovered : this._opacity - } - getOffset() { - return this._offset - } - setOffset(e) { - return this._offset = o.P.convert(e), this._update(), this - } - addClassName(e) { - this._element.classList.add(e) - } - removeClassName(e) { - this._element.classList.remove(e) - } - toggleClassName(e) { - return this._element.classList.toggle(e) - } - setDraggable(e) { - return this._draggable = !!e, this._map && (e ? (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(e) { - return this._rotation = e || 0, this._update(), this - } - getRotation() { - return this._rotation - } - setRotationAlignment(e) { - return this._rotationAlignment = e || "auto", this._update(), this - } - getRotationAlignment() { - return this._rotationAlignment - } - setPitchAlignment(e) { - return this._pitchAlignment = e && e !== "auto" ? e : this._rotationAlignment, this._update(), this - } - getPitchAlignment() { - return this._pitchAlignment - } - setOpacity(e, n) { - return (this._opacity === void 0 || e === void 0 && n === void 0) && (this._opacity = "1", this._opacityWhenCovered = "0.2"), e !== void 0 && (this._opacity = e), n !== void 0 && (this._opacityWhenCovered = n), this._map && this._updateOpacity(!0), this - } - } - const Yc = { - positionOptions: { - enableHighAccuracy: !1, - maximumAge: 0, - timeout: 6e3 - }, - fitBoundsOptions: { - maxZoom: 15 - }, - trackUserLocation: !1, - showAccuracyCircle: !0, - showUserLocation: !0 - }; - let Ks = 0, - Ss = !1; - const Do = { - maxWidth: 100, - unit: "metric" - }; - - function Ml(h, e, n) { - const s = n && n.maxWidth || 100, - u = h._container.clientHeight / 2, - d = h._container.clientWidth / 2, - m = h.unproject([d - s / 2, u]), - y = h.unproject([d + s / 2, u]), - w = Math.round(h.project(y).x - h.project(m).x), - P = Math.min(s, w, h._container.clientWidth), - M = m.distanceTo(y); - if (n && n.unit === "imperial") { - const D = 3.2808 * M; - D > 5280 ? Ps(e, P, D / 5280, h._getUIString("ScaleControl.Miles")) : Ps(e, P, D, h._getUIString("ScaleControl.Feet")) - } else n && n.unit === "nautical" ? Ps(e, P, M / 1852, h._getUIString("ScaleControl.NauticalMiles")) : M >= 1e3 ? Ps(e, P, M / 1e3, h._getUIString("ScaleControl.Kilometers")) : Ps(e, P, M, h._getUIString("ScaleControl.Meters")) - } - - function Ps(h, e, n, s) { - const u = (function(d) { - const m = Math.pow(10, `${Math.floor(d)}`.length - 1); - let y = d / m; - return y = y >= 10 ? 10 : y >= 5 ? 5 : y >= 3 ? 3 : y >= 2 ? 2 : y >= 1 ? 1 : (function(w) { - const P = Math.pow(10, Math.ceil(-Math.log(w) / Math.LN10)); - return Math.round(w * P) / P - })(y), m * y - })(n); - h.style.width = e * (u / n) + "px", h.innerHTML = `${u} ${s}` - } - const Jc = { - closeButton: !0, - closeOnClick: !0, - focusAfterOpen: !0, - className: "", - maxWidth: "240px", - subpixelPositioning: !1, - locationOccludedOpacity: void 0 - }, - Qc = ["a[href]", "[tabindex]:not([tabindex='-1'])", "[contenteditable]:not([contenteditable='false'])", "button:not([disabled])", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].join(", "); - - function Al(h) { - if (h) { - if (typeof h == "number") { - const e = Math.round(Math.abs(h) / Math.SQRT2); - return { - center: new o.P(0, 0), - top: new o.P(0, h), - "top-left": new o.P(e, e), - "top-right": new o.P(-e, e), - bottom: new o.P(0, -h), - "bottom-left": new o.P(e, -e), - "bottom-right": new o.P(-e, -e), - left: new o.P(h, 0), - right: new o.P(-h, 0) - } - } - if (h instanceof o.P || Array.isArray(h)) { - const e = o.P.convert(h); - return { - center: e, - top: e, - "top-left": e, - "top-right": e, - bottom: e, - "bottom-left": e, - "bottom-right": e, - left: e, - right: e - } - } - return { - center: o.P.convert(h.center || [0, 0]), - top: o.P.convert(h.top || [0, 0]), - "top-left": o.P.convert(h["top-left"] || [0, 0]), - "top-right": o.P.convert(h["top-right"] || [0, 0]), - bottom: o.P.convert(h.bottom || [0, 0]), - "bottom-left": o.P.convert(h["bottom-left"] || [0, 0]), - "bottom-right": o.P.convert(h["bottom-right"] || [0, 0]), - left: o.P.convert(h.left || [0, 0]), - right: o.P.convert(h.right || [0, 0]) - } - } - return Al(new o.P(0, 0)) - } - const eu = $; - T.AJAXError = o.cz, T.Event = o.l, T.Evented = o.E, T.LngLat = o.S, T.MercatorCoordinate = o.a1, T.Point = o.P, T.addProtocol = o.cA, T.config = o.a, T.removeProtocol = o.cB, T.AttributionControl = Kc, T.BoxZoomHandler = Vc, T.CanvasSource = _r, T.CooperativeGesturesHandler = Qh, T.DoubleClickZoomHandler = $c, T.DragPanHandler = Yh, T.DragRotateHandler = Hc, T.EdgeInsets = on, T.FullscreenControl = class extends o.E { - constructor(h = {}) { - super(), this._onFullscreenChange = () => { - var e; - let n = window.document.fullscreenElement || window.document.mozFullScreenElement || window.document.webkitFullscreenElement || window.document.msFullscreenElement; - for (; !((e = n == null ? void 0 : n.shadowRoot) === null || e === void 0) && e.fullscreenElement;) n = n.shadowRoot.fullscreenElement; - n === this._container !== this._fullscreen && this._handleFullscreenChange() - }, this._onClickFullscreen = () => { - this._isFullscreen() ? this._exitFullscreen() : this._requestFullscreen() - }, this._fullscreen = !1, h && h.container && (h.container instanceof HTMLElement ? this._container = h.container : o.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(h) { - return this._map = h, this._container || (this._container = this._map.getContainer()), this._controlContainer = X.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._setupUI(), this._controlContainer - } - onRemove() { - X.remove(this._controlContainer), this._map = null, window.document.removeEventListener(this._fullscreenchange, this._onFullscreenChange) - } - _setupUI() { - const h = this._fullscreenButton = X.create("button", "maplibregl-ctrl-fullscreen", this._controlContainer); - X.create("span", "maplibregl-ctrl-icon", h).setAttribute("aria-hidden", "true"), h.type = "button", this._updateTitle(), this._fullscreenButton.addEventListener("click", this._onClickFullscreen), window.document.addEventListener(this._fullscreenchange, this._onFullscreenChange) - } - _updateTitle() { - const h = this._getTitle(); - this._fullscreenButton.setAttribute("aria-label", h), this._fullscreenButton.title = h - } - _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 o.l("fullscreenstart")), this._prevCooperativeGesturesEnabled = this._map.cooperativeGestures.isEnabled(), this._map.cooperativeGestures.disable()) : (this.fire(new o.l("fullscreenend")), this._prevCooperativeGesturesEnabled && this._map.cooperativeGestures.enable()) - } - _exitFullscreen() { - window.document.exitFullscreen ? window.document.exitFullscreen() : window.document.mozCancelFullScreen ? window.document.mozCancelFullScreen() : window.document.msExitFullscreen ? window.document.msExitFullscreen() : window.document.webkitCancelFullScreen ? window.document.webkitCancelFullScreen() : this._togglePseudoFullScreen() - } - _requestFullscreen() { - this._container.requestFullscreen ? this._container.requestFullscreen() : this._container.mozRequestFullScreen ? this._container.mozRequestFullScreen() : this._container.msRequestFullscreen ? this._container.msRequestFullscreen() : this._container.webkitRequestFullscreen ? this._container.webkitRequestFullscreen() : this._togglePseudoFullScreen() - } - _togglePseudoFullScreen() { - this._container.classList.toggle("maplibregl-pseudo-fullscreen"), this._handleFullscreenChange(), this._map.resize() - } - }, T.GeoJSONSource = ar, T.GeolocateControl = class extends o.E { - constructor(h) { - super(), this._onSuccess = e => { - if (this._map) { - if (this._isOutOfMapMaxBounds(e)) return this._setErrorState(), this.fire(new o.l("outofmaxbounds", e)), this._updateMarker(), void this._finish(); - if (this.options.trackUserLocation) switch (this._lastKnownPosition = e, this._watchState) { - case "WAITING_ACTIVE": - case "ACTIVE_LOCK": - case "ACTIVE_ERROR": - 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(e), this.options.trackUserLocation && this._watchState !== "ACTIVE_LOCK" || this._updateCamera(e), this.options.showUserLocation && this._dotElement.classList.remove("maplibregl-user-location-dot-stale"), this.fire(new o.l("geolocate", e)), this._finish() - } - }, this._updateCamera = e => { - const n = new o.S(e.coords.longitude, e.coords.latitude), - s = e.coords.accuracy, - u = this._map.getBearing(), - d = o.e({ - bearing: u - }, this.options.fitBoundsOptions), - m = dt.fromLngLat(n, s); - this._map.fitBounds(m, d, { - geolocateSource: !0 - }) - }, this._updateMarker = e => { - if (e) { - const n = new o.S(e.coords.longitude, e.coords.latitude); - this._accuracyCircleMarker.setLngLat(n).addTo(this._map), this._userLocationDotMarker.setLngLat(n).addTo(this._map), this._accuracy = e.coords.accuracy, this.options.showUserLocation && this.options.showAccuracyCircle && this._updateCircleRadius() - } else this._userLocationDotMarker.remove(), this._accuracyCircleMarker.remove() - }, this._onZoom = () => { - this.options.showUserLocation && this.options.showAccuracyCircle && this._updateCircleRadius() - }, this._onError = e => { - if (this._map) { - if (e.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 n = this._map._getUIString("GeolocateControl.LocationNotAvailable"); - this._geolocateButton.title = n, this._geolocateButton.setAttribute("aria-label", n), this._geolocationWatchID !== void 0 && this._clearWatch() - } else { - if (e.code === 3 && Ss) return; - this.options.trackUserLocation && this._setErrorState() - } - this._watchState !== "OFF" && this.options.showUserLocation && this._dotElement.classList.add("maplibregl-user-location-dot-stale"), this.fire(new o.l("error", e)), this._finish() - } - }, this._finish = () => { - this._timeoutId && clearTimeout(this._timeoutId), this._timeoutId = void 0 - }, this._setupUI = () => { - this._map && (this._container.addEventListener("contextmenu", (e => e.preventDefault())), this._geolocateButton = X.create("button", "maplibregl-ctrl-geolocate", this._container), X.create("span", "maplibregl-ctrl-icon", this._geolocateButton).setAttribute("aria-hidden", "true"), this._geolocateButton.type = "button", this._geolocateButton.disabled = !0) - }, this._finishSetupUI = e => { - if (this._map) { - if (e === !1) { - o.w("Geolocation support is not available so the GeolocateControl will be disabled."); - const n = this._map._getUIString("GeolocateControl.LocationNotAvailable"); - this._geolocateButton.disabled = !0, this._geolocateButton.title = n, this._geolocateButton.setAttribute("aria-label", n) - } else { - const n = this._map._getUIString("GeolocateControl.FindMyLocation"); - this._geolocateButton.disabled = !1, this._geolocateButton.title = n, this._geolocateButton.setAttribute("aria-label", n) - } - this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement = X.create("div", "maplibregl-user-location-dot"), this._userLocationDotMarker = new Xs({ - element: this._dotElement - }), this._circleElement = X.create("div", "maplibregl-user-location-accuracy-circle"), this._accuracyCircleMarker = new Xs({ - element: this._circleElement, - pitchAlignment: "map" - }), this.options.trackUserLocation && (this._watchState = "OFF"), this._map.on("zoom", this._onZoom)), this._geolocateButton.addEventListener("click", (() => this.trigger())), this._setup = !0, this.options.trackUserLocation && this._map.on("movestart", (n => { - const s = (n == null ? void 0 : n[0]) instanceof ResizeObserverEntry; - n.geolocateSource || this._watchState !== "ACTIVE_LOCK" || s || 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 o.l("trackuserlocationend")), this.fire(new o.l("userlocationlostfocus"))) - })) - } - }, this.options = o.e({}, Yc, h) - } - onAdd(h) { - return this._map = h, this._container = X.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._setupUI(), (function() { - return o._(this, arguments, void 0, (function*(e = !1) { - if (Ai !== void 0 && !e) return Ai; - if (window.navigator.permissions === void 0) return Ai = !!window.navigator.geolocation, Ai; - try { - Ai = (yield window.navigator.permissions.query({ - name: "geolocation" - })).state !== "denied" - } catch { - Ai = !!window.navigator.geolocation - } - return Ai - })) - })().then((e => this._finishSetupUI(e))), 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(), X.remove(this._container), this._map.off("zoom", this._onZoom), this._map = void 0, Ks = 0, Ss = !1 - } - _isOutOfMapMaxBounds(h) { - const e = this._map.getMaxBounds(), - n = h.coords; - return e && (n.longitude < e.getWest() || n.longitude > e.getEast() || n.latitude < e.getSouth() || n.latitude > e.getNorth()) - } - _setErrorState() { - switch (this._watchState) { - case "WAITING_ACTIVE": - this._watchState = "ACTIVE_ERROR", 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": - break; - default: - throw new Error(`Unexpected watchState ${this._watchState}`) - } - } - _updateCircleRadius() { - const h = this._map.getBounds(), - e = h.getSouthEast(), - n = h.getNorthEast(), - s = e.distanceTo(n), - u = Math.ceil(this._accuracy / (s / this._map._container.clientHeight) * 2); - this._circleElement.style.width = `${u}px`, this._circleElement.style.height = `${u}px` - } - trigger() { - if (!this._setup) return o.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 o.l("trackuserlocationstart")); - break; - case "WAITING_ACTIVE": - case "ACTIVE_LOCK": - case "ACTIVE_ERROR": - case "BACKGROUND_ERROR": - Ks--, Ss = !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 o.l("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 o.l("trackuserlocationstart")), this.fire(new o.l("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 h; - this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"), this._geolocateButton.setAttribute("aria-pressed", "true"), Ks++, Ks > 1 ? (h = { - maximumAge: 6e5, - timeout: 0 - }, Ss = !0) : (h = this.options.positionOptions, Ss = !1), this._geolocationWatchID = window.navigator.geolocation.watchPosition(this._onSuccess, this._onError, h) - } - } 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) - } - }, T.GlobeControl = class { - constructor() { - this._toggleProjection = () => { - var h; - const e = (h = this._map.getProjection()) === null || h === void 0 ? void 0 : h.type; - this._map.setProjection(e !== "mercator" && e ? { - type: "mercator" - } : { - type: "globe" - }), this._updateGlobeIcon() - }, this._updateGlobeIcon = () => { - var h; - this._globeButton.classList.remove("maplibregl-ctrl-globe"), this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"), ((h = this._map.getProjection()) === null || h === void 0 ? void 0 : h.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(h) { - return this._map = h, this._container = X.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._globeButton = X.create("button", "maplibregl-ctrl-globe", this._container), X.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._container - } - onRemove() { - X.remove(this._container), this._map.off("styledata", this._updateGlobeIcon), this._globeButton.removeEventListener("click", this._toggleProjection), this._map = void 0 - } - }, T.Hash = yl, T.ImageSource = Ft, T.KeyboardHandler = wl, T.LngLatBounds = dt, T.LogoControl = td, T.Map = class extends ed { - constructor(h) { - var e, n; - o.cw.mark(o.cx.create); - const s = Object.assign(Object.assign(Object.assign({}, ha), h), { - canvasContextAttributes: Object.assign(Object.assign({}, ha.canvasContextAttributes), h.canvasContextAttributes) - }); - if (s.minZoom != null && s.maxZoom != null && s.minZoom > s.maxZoom) throw new Error("maxZoom must be greater than or equal to minZoom"); - if (s.minPitch != null && s.maxPitch != null && s.minPitch > s.maxPitch) throw new Error("maxPitch must be greater than or equal to minPitch"); - if (s.minPitch != null && s.minPitch < 0) throw new Error("minPitch must be greater than or equal to 0"); - if (s.maxPitch != null && s.maxPitch > 180) throw new Error("maxPitch must be less than or equal to 180"); - const u = new wi, - d = new hn; - if (s.minZoom !== void 0 && u.setMinZoom(s.minZoom), s.maxZoom !== void 0 && u.setMaxZoom(s.maxZoom), s.minPitch !== void 0 && u.setMinPitch(s.minPitch), s.maxPitch !== void 0 && u.setMaxPitch(s.maxPitch), s.renderWorldCopies !== void 0 && u.setRenderWorldCopies(s.renderWorldCopies), super(u, d, { - bearingSnap: s.bearingSnap - }), this._idleTriggered = !1, this._crossFadingFactor = 1, this._renderTaskQueue = new Na, this._controls = [], this._mapId = o.a7(), this._contextLost = y => { - y.preventDefault(), this._frameRequest && (this._frameRequest.abort(), this._frameRequest = null), this.fire(new o.l("webglcontextlost", { - originalEvent: y - })) - }, this._contextRestored = y => { - this._setupPainter(), this.resize(), this._update(), this.fire(new o.l("webglcontextrestored", { - originalEvent: y - })) - }, this._onMapScroll = y => { - if (y.target === this._container) return this._container.scrollTop = 0, this._container.scrollLeft = 0, !1 - }, this._onWindowOnline = () => { - this._update() - }, this._interactive = s.interactive, this._maxTileCacheSize = s.maxTileCacheSize, this._maxTileCacheZoomLevels = s.maxTileCacheZoomLevels, this._canvasContextAttributes = Object.assign({}, s.canvasContextAttributes), this._trackResize = s.trackResize === !0, this._bearingSnap = s.bearingSnap, this._centerClampedToGround = s.centerClampedToGround, this._refreshExpiredTiles = s.refreshExpiredTiles === !0, this._fadeDuration = s.fadeDuration, this._crossSourceCollisions = s.crossSourceCollisions === !0, this._collectResourceTiming = s.collectResourceTiming === !0, this._locale = Object.assign(Object.assign({}, jn), s.locale), this._clickTolerance = s.clickTolerance, this._overridePixelRatio = s.pixelRatio, this._maxCanvasSize = s.maxCanvasSize, this.transformCameraUpdate = s.transformCameraUpdate, this.cancelPendingTileRequestsWhileZooming = s.cancelPendingTileRequestsWhileZooming === !0, this._imageQueueHandle = Ne.addThrottleControl((() => this.isMoving())), this._requestManager = new ft(s.transformRequest), typeof s.container == "string") { - if (this._container = document.getElementById(s.container), !this._container) throw new Error(`Container '${s.container}' not found.`) - } else { - if (!(s.container instanceof HTMLElement)) throw new Error("Invalid type: 'container' must be a String or HTMLElement."); - this._container = s.container - } - if (s.maxBounds && this.setMaxBounds(s.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.dirty = !0, this._update(!0) - })), this.once("idle", (() => { - this._idleTriggered = !0 - })), typeof window < "u") { - addEventListener("online", this._onWindowOnline, !1); - let y = !1; - const w = Ts((P => { - this._trackResize && !this._removed && (this.resize(P), this.redraw()) - }), 50); - this._resizeObserver = new ResizeObserver((P => { - y ? w(P) : y = !0 - })), this._resizeObserver.observe(this._container) - } - this.handlers = new Wc(this, s), this._hash = s.hash && new yl(typeof s.hash == "string" && s.hash || void 0).addTo(this), this._hash && this._hash._onHashChange() || (this.jumpTo({ - center: s.center, - elevation: s.elevation, - zoom: s.zoom, - bearing: s.bearing, - pitch: s.pitch, - roll: s.roll - }), s.bounds && (this.resize(), this.fitBounds(s.bounds, o.e({}, s.fitBoundsOptions, { - duration: 0 - })))); - const m = typeof s.style == "string" || ((n = (e = s.style) === null || e === void 0 ? void 0 : e.projection) === null || n === void 0 ? void 0 : n.type) !== "globe"; - this.resize(null, m), this._localIdeographFontFamily = s.localIdeographFontFamily, this._validateStyle = s.validateStyle, s.style && this.setStyle(s.style, { - localIdeographFontFamily: s.localIdeographFontFamily - }), s.attributionControl && this.addControl(new Kc(typeof s.attributionControl == "boolean" ? void 0 : s.attributionControl)), s.maplibreLogo && this.addControl(new td, s.logoPosition), this.on("style.load", (() => { - if (m || this._resizeTransform(), this.transform.unmodified) { - const y = o.Q(this.style.stylesheet, ["center", "zoom", "bearing", "pitch", "roll"]); - this.jumpTo(y) - } - })), this.on("data", (y => { - this._update(y.dataType === "style"), this.fire(new o.l(`${y.dataType}data`, y)) - })), this.on("dataloading", (y => { - this.fire(new o.l(`${y.dataType}dataloading`, y)) - })), this.on("dataabort", (y => { - this.fire(new o.l("sourcedataabort", y)) - })) - } - _getMapId() { - return this._mapId - } - setGlobalStateProperty(h, e) { - return this.style.setGlobalStateProperty(h, e), this._update(!0) - } - getGlobalState() { - return this.style.getGlobalState() - } - addControl(h, e) { - if (e === void 0 && (e = h.getDefaultPosition ? h.getDefaultPosition() : "top-right"), !h || !h.onAdd) return this.fire(new o.k(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods."))); - const n = h.onAdd(this); - this._controls.push(h); - const s = this._controlPositions[e]; - return e.indexOf("bottom") !== -1 ? s.insertBefore(n, s.firstChild) : s.appendChild(n), this - } - removeControl(h) { - if (!h || !h.onRemove) return this.fire(new o.k(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods."))); - const e = this._controls.indexOf(h); - return e > -1 && this._controls.splice(e, 1), h.onRemove(this), this - } - hasControl(h) { - return this._controls.indexOf(h) > -1 - } - calculateCameraOptionsFromTo(h, e, n, s) { - return s == null && this.terrain && (s = this.terrain.getElevationForLngLatZoom(n, this.transform.tileZoom)), super.calculateCameraOptionsFromTo(h, e, n, s) - } - resize(h, e = !0) { - const [n, s] = this._containerDimensions(), u = this._getClampedPixelRatio(n, s); - if (this._resizeCanvas(n, s, u), this.painter.resize(n, s, u), this.painter.overLimit()) { - const m = this.painter.context.gl; - this._maxCanvasSize = [m.drawingBufferWidth, m.drawingBufferHeight]; - const y = this._getClampedPixelRatio(n, s); - this._resizeCanvas(n, s, y), this.painter.resize(n, s, y) - } - this._resizeTransform(e); - const d = !this._moving; - return d && (this.stop(), this.fire(new o.l("movestart", h)).fire(new o.l("move", h))), this.fire(new o.l("resize", h)), d && this.fire(new o.l("moveend", h)), this - } - _resizeTransform(h = !0) { - var e; - const [n, s] = this._containerDimensions(); - this.transform.resize(n, s, h), (e = this._requestedCameraState) === null || e === void 0 || e.resize(n, s, h) - } - _getClampedPixelRatio(h, e) { - const { - 0: n, - 1: s - } = this._maxCanvasSize, u = this.getPixelRatio(), d = h * u, m = e * u; - return Math.min(d > n ? n / d : 1, m > s ? s / m : 1) * u - } - getPixelRatio() { - var h; - return (h = this._overridePixelRatio) !== null && h !== void 0 ? h : devicePixelRatio - } - setPixelRatio(h) { - this._overridePixelRatio = h, this.resize() - } - getBounds() { - return this.transform.getBounds() - } - getMaxBounds() { - return this.transform.getMaxBounds() - } - setMaxBounds(h) { - return this.transform.setMaxBounds(dt.convert(h)), this._update() - } - setMinZoom(h) { - if ((h = h ?? -2) >= -2 && h <= this.transform.maxZoom) return this.transform.setMinZoom(h), this._update(), this.getZoom() < h && this.setZoom(h), this; - throw new Error("minZoom must be between -2 and the current maxZoom, inclusive") - } - getMinZoom() { - return this.transform.minZoom - } - setMaxZoom(h) { - if ((h = h ?? 22) >= this.transform.minZoom) return this.transform.setMaxZoom(h), this._update(), this.getZoom() > h && this.setZoom(h), this; - throw new Error("maxZoom must be greater than the current minZoom") - } - getMaxZoom() { - return this.transform.maxZoom - } - setMinPitch(h) { - if ((h = h ?? 0) < 0) throw new Error("minPitch must be greater than or equal to 0"); - if (h >= 0 && h <= this.transform.maxPitch) return this.transform.setMinPitch(h), this._update(), this.getPitch() < h && this.setPitch(h), this; - throw new Error("minPitch must be between 0 and the current maxPitch, inclusive") - } - getMinPitch() { - return this.transform.minPitch - } - setMaxPitch(h) { - if ((h = h ?? 60) > 180) throw new Error("maxPitch must be less than or equal to 180"); - if (h >= this.transform.minPitch) return this.transform.setMaxPitch(h), this._update(), this.getPitch() > h && this.setPitch(h), this; - throw new Error("maxPitch must be greater than the current minPitch") - } - getMaxPitch() { - return this.transform.maxPitch - } - getRenderWorldCopies() { - return this.transform.renderWorldCopies - } - setRenderWorldCopies(h) { - return this.transform.setRenderWorldCopies(h), this._update() - } - project(h) { - return this.transform.locationToScreenPoint(o.S.convert(h), this.style && this.terrain) - } - unproject(h) { - return this.transform.screenPointToLocation(o.P.convert(h), this.terrain) - } - isMoving() { - var h; - return this._moving || ((h = this.handlers) === null || h === void 0 ? void 0 : h.isMoving()) - } - isZooming() { - var h; - return this._zooming || ((h = this.handlers) === null || h === void 0 ? void 0 : h.isZooming()) - } - isRotating() { - var h; - return this._rotating || ((h = this.handlers) === null || h === void 0 ? void 0 : h.isRotating()) - } - _createDelegatedListener(h, e, n) { - if (h === "mouseenter" || h === "mouseover") { - let s = !1; - return { - layers: e, - listener: n, - delegates: { - mousemove: d => { - const m = e.filter((w => this.getLayer(w))), - y = m.length !== 0 ? this.queryRenderedFeatures(d.point, { - layers: m - }) : []; - y.length ? s || (s = !0, n.call(this, new Wn(h, this, d.originalEvent, { - features: y - }))) : s = !1 - }, - mouseout: () => { - s = !1 - } - } - } - } - if (h === "mouseleave" || h === "mouseout") { - let s = !1; - return { - layers: e, - listener: n, - delegates: { - mousemove: m => { - const y = e.filter((w => this.getLayer(w))); - (y.length !== 0 ? this.queryRenderedFeatures(m.point, { - layers: y - }) : []).length ? s = !0 : s && (s = !1, n.call(this, new Wn(h, this, m.originalEvent))) - }, - mouseout: m => { - s && (s = !1, n.call(this, new Wn(h, this, m.originalEvent))) - } - } - } - } { - const s = u => { - const d = e.filter((y => this.getLayer(y))), - m = d.length !== 0 ? this.queryRenderedFeatures(u.point, { - layers: d - }) : []; - m.length && (u.features = m, n.call(this, u), delete u.features) - }; - return { - layers: e, - listener: n, - delegates: { - [h]: s - } - } - } - } - _saveDelegatedListener(h, e) { - this._delegatedListeners = this._delegatedListeners || {}, this._delegatedListeners[h] = this._delegatedListeners[h] || [], this._delegatedListeners[h].push(e) - } - _removeDelegatedListener(h, e, n) { - if (!this._delegatedListeners || !this._delegatedListeners[h]) return; - const s = this._delegatedListeners[h]; - for (let u = 0; u < s.length; u++) { - const d = s[u]; - if (d.listener === n && d.layers.length === e.length && d.layers.every((m => e.includes(m)))) { - for (const m in d.delegates) this.off(m, d.delegates[m]); - return void s.splice(u, 1) - } - } - } - on(h, e, n) { - if (n === void 0) return super.on(h, e); - const s = typeof e == "string" ? [e] : e, - u = this._createDelegatedListener(h, s, n); - this._saveDelegatedListener(h, u); - for (const d in u.delegates) this.on(d, u.delegates[d]); - return { - unsubscribe: () => { - this._removeDelegatedListener(h, s, n) - } - } - } - once(h, e, n) { - if (n === void 0) return super.once(h, e); - const s = typeof e == "string" ? [e] : e, - u = this._createDelegatedListener(h, s, n); - for (const d in u.delegates) { - const m = u.delegates[d]; - u.delegates[d] = (...y) => { - this._removeDelegatedListener(h, s, n), m(...y) - } - } - this._saveDelegatedListener(h, u); - for (const d in u.delegates) this.once(d, u.delegates[d]); - return this - } - off(h, e, n) { - return n === void 0 ? super.off(h, e) : (this._removeDelegatedListener(h, typeof e == "string" ? [e] : e, n), this) - } - queryRenderedFeatures(h, e) { - if (!this.style) return []; - let n; - const s = h instanceof o.P || Array.isArray(h), - u = s ? h : [ - [0, 0], - [this.transform.width, this.transform.height] - ]; - if (e = e || (s ? {} : h) || {}, u instanceof o.P || typeof u[0] == "number") n = [o.P.convert(u)]; - else { - const d = o.P.convert(u[0]), - m = o.P.convert(u[1]); - n = [d, new o.P(m.x, d.y), m, new o.P(d.x, m.y), d] - } - return this.style.queryRenderedFeatures(n, e, this.transform) - } - querySourceFeatures(h, e) { - return this.style.querySourceFeatures(h, e) - } - setStyle(h, e) { - return (e = o.e({}, { - localIdeographFontFamily: this._localIdeographFontFamily, - validate: this._validateStyle - }, e)).diff !== !1 && e.localIdeographFontFamily === this._localIdeographFontFamily && this.style && h ? (this._diffStyle(h, e), this) : (this._localIdeographFontFamily = e.localIdeographFontFamily, this._updateStyle(h, e)) - } - setTransformRequest(h) { - return this._requestManager.setTransformRequest(h), this - } - _getUIString(h) { - const e = this._locale[h]; - if (e == null) throw new Error(`Missing UI string '${h}'`); - return e - } - _updateStyle(h, e) { - var n, s; - if (e.transformStyle && this.style && !this.style._loaded) return void this.style.once("style.load", (() => this._updateStyle(h, e))); - const u = this.style && e.transformStyle ? this.style.serialize() : void 0; - return this.style && (this.style.setEventedParent(null), this.style._remove(!h)), h ? (this.style = new gc(this, e || {}), this.style.setEventedParent(this, { - style: this.style - }), typeof h == "string" ? this.style.loadURL(h, e, u) : this.style.loadJSON(h, e, u), this) : ((s = (n = this.style) === null || n === void 0 ? void 0 : n.projection) === null || s === void 0 || s.destroy(), delete this.style, this) - } - _lazyInitEmptyStyle() { - this.style || (this.style = new gc(this, {}), this.style.setEventedParent(this, { - style: this.style - }), this.style.loadEmpty()) - } - _diffStyle(h, e) { - if (typeof h == "string") { - const n = this._requestManager.transformRequest(h, "Style"); - o.j(n, new AbortController).then((s => { - this._updateDiff(s.data, e) - })).catch((s => { - s && this.fire(new o.k(s)) - })) - } else typeof h == "object" && this._updateDiff(h, e) - } - _updateDiff(h, e) { - try { - this.style.setState(h, e) && this._update(!0) - } catch (n) { - o.w(`Unable to perform style diff: ${n.message||n.error||n}. Rebuilding the style from scratch.`), this._updateStyle(h, e) - } - } - getStyle() { - if (this.style) return this.style.serialize() - } - isStyleLoaded() { - return this.style ? this.style.loaded() : o.w("There is no style added to the map.") - } - addSource(h, e) { - return this._lazyInitEmptyStyle(), this.style.addSource(h, e), this._update(!0) - } - isSourceLoaded(h) { - const e = this.style && this.style.sourceCaches[h]; - if (e !== void 0) return e.loaded(); - this.fire(new o.k(new Error(`There is no source with ID '${h}'`))) - } - setTerrain(h) { - if (this.style._checkLoaded(), this._terrainDataCallback && this.style.off("data", this._terrainDataCallback), h) { - const e = this.style.sourceCaches[h.source]; - if (!e) throw new Error(`cannot load terrain, because there exists no source with ID: ${h.source}`); - this.terrain === null && e.reload(); - for (const n in this.style._layers) { - const s = this.style._layers[n]; - s.type === "hillshade" && s.source === h.source && o.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."), s.type === "color-relief" && s.source === h.source && o.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 Rr(this.painter, e, h), this.painter.renderToTexture = new Pl(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 = n => { - var s; - n.dataType === "style" ? this.terrain.sourceCache.freeRtt() : n.dataType === "source" && n.tile && (n.sourceId !== h.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))), ((s = n.source) === null || s === void 0 ? void 0 : s.type) === "image" ? this.terrain.sourceCache.freeRtt() : this.terrain.sourceCache.freeRtt(n.tile.tileID)) - }, this.style.on("data", this._terrainDataCallback) - } else this.terrain && this.terrain.sourceCache.destruct(), this.terrain = null, this.painter.renderToTexture && this.painter.renderToTexture.destruct(), this.painter.renderToTexture = null, this.transform.setMinElevationForCurrentTile(0), this._centerClampedToGround && this.transform.setElevation(0); - return this.fire(new o.l("terrain", { - terrain: h - })), this - } - getTerrain() { - var h, e; - return (e = (h = this.terrain) === null || h === void 0 ? void 0 : h.options) !== null && e !== void 0 ? e : null - } - areTilesLoaded() { - const h = this.style && this.style.sourceCaches; - for (const e in h) { - const n = h[e]._tiles; - for (const s in n) { - const u = n[s]; - if (u.state !== "loaded" && u.state !== "errored") return !1 - } - } - return !0 - } - removeSource(h) { - return this.style.removeSource(h), this._update(!0) - } - getSource(h) { - return this.style.getSource(h) - } - setSourceTileLodParams(h, e, n) { - if (n) { - const s = this.getSource(n); - if (!s) throw new Error(`There is no source with ID "${n}", cannot set LOD parameters`); - s.calculateTileZoom = ot(Math.max(1, h), Math.max(1, e)) - } else - for (const s in this.style.sourceCaches) this.style.sourceCaches[s].getSource().calculateTileZoom = ot(Math.max(1, h), Math.max(1, e)); - return this._update(!0), this - } - refreshTiles(h, e) { - const n = this.style.sourceCaches[h]; - if (!n) throw new Error(`There is no source cache with ID "${h}", cannot refresh tile`); - e === void 0 ? n.reload(!0) : n.refreshTiles(e.map((s => new o.a4(s.z, s.x, s.y)))) - } - addImage(h, e, n = {}) { - const { - pixelRatio: s = 1, - sdf: u = !1, - stretchX: d, - stretchY: m, - content: y, - textFitWidth: w, - textFitHeight: P - } = n; - if (this._lazyInitEmptyStyle(), !(e instanceof HTMLImageElement || o.b(e))) { - if (e.width === void 0 || e.height === void 0) return this.fire(new o.k(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: M, - height: D, - data: z - } = e, B = e; - return this.style.addImage(h, { - data: new o.R({ - width: M, - height: D - }, new Uint8Array(z)), - pixelRatio: s, - stretchX: d, - stretchY: m, - content: y, - textFitWidth: w, - textFitHeight: P, - sdf: u, - version: 0, - userImage: B - }), B.onAdd && B.onAdd(this, h), this - } - } { - const { - width: M, - height: D, - data: z - } = ye.getImageData(e); - this.style.addImage(h, { - data: new o.R({ - width: M, - height: D - }, z), - pixelRatio: s, - stretchX: d, - stretchY: m, - content: y, - textFitWidth: w, - textFitHeight: P, - sdf: u, - version: 0 - }) - } - } - updateImage(h, e) { - const n = this.style.getImage(h); - if (!n) return this.fire(new o.k(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead."))); - const s = e instanceof HTMLImageElement || o.b(e) ? ye.getImageData(e) : e, - { - width: u, - height: d, - data: m - } = s; - if (u === void 0 || d === void 0) return this.fire(new o.k(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 (u !== n.data.width || d !== n.data.height) return this.fire(new o.k(new Error("The width and height of the updated image must be that same as the previous version of the image"))); - const y = !(e instanceof HTMLImageElement || o.b(e)); - return n.data.replace(m, y), this.style.updateImage(h, n), this - } - getImage(h) { - return this.style.getImage(h) - } - hasImage(h) { - return h ? !!this.style.getImage(h) : (this.fire(new o.k(new Error("Missing required image id"))), !1) - } - removeImage(h) { - this.style.removeImage(h) - } - loadImage(h) { - return Ne.getImage(this._requestManager.transformRequest(h, "Image"), new AbortController) - } - listImages() { - return this.style.listImages() - } - addLayer(h, e) { - return this._lazyInitEmptyStyle(), this.style.addLayer(h, e), this._update(!0) - } - moveLayer(h, e) { - return this.style.moveLayer(h, e), this._update(!0) - } - removeLayer(h) { - return this.style.removeLayer(h), this._update(!0) - } - getLayer(h) { - return this.style.getLayer(h) - } - getLayersOrder() { - return this.style.getLayersOrder() - } - setLayerZoomRange(h, e, n) { - return this.style.setLayerZoomRange(h, e, n), this._update(!0) - } - setFilter(h, e, n = {}) { - return this.style.setFilter(h, e, n), this._update(!0) - } - getFilter(h) { - return this.style.getFilter(h) - } - setPaintProperty(h, e, n, s = {}) { - return this.style.setPaintProperty(h, e, n, s), this._update(!0) - } - getPaintProperty(h, e) { - return this.style.getPaintProperty(h, e) - } - setLayoutProperty(h, e, n, s = {}) { - return this.style.setLayoutProperty(h, e, n, s), this._update(!0) - } - getLayoutProperty(h, e) { - return this.style.getLayoutProperty(h, e) - } - setGlyphs(h, e = {}) { - return this._lazyInitEmptyStyle(), this.style.setGlyphs(h, e), this._update(!0) - } - getGlyphs() { - return this.style.getGlyphsUrl() - } - addSprite(h, e, n = {}) { - return this._lazyInitEmptyStyle(), this.style.addSprite(h, e, n, (s => { - s || this._update(!0) - })), this - } - removeSprite(h) { - return this._lazyInitEmptyStyle(), this.style.removeSprite(h), this._update(!0) - } - getSprite() { - return this.style.getSprite() - } - setSprite(h, e = {}) { - return this._lazyInitEmptyStyle(), this.style.setSprite(h, e, (n => { - n || this._update(!0) - })), this - } - setLight(h, e = {}) { - return this._lazyInitEmptyStyle(), this.style.setLight(h, e), this._update(!0) - } - getLight() { - return this.style.getLight() - } - setSky(h, e = {}) { - return this._lazyInitEmptyStyle(), this.style.setSky(h, e), this._update(!0) - } - getSky() { - return this.style.getSky() - } - setFeatureState(h, e) { - return this.style.setFeatureState(h, e), this._update() - } - removeFeatureState(h, e) { - return this.style.removeFeatureState(h, e), this._update() - } - getFeatureState(h) { - return this.style.getFeatureState(h) - } - getContainer() { - return this._container - } - getCanvasContainer() { - return this._canvasContainer - } - getCanvas() { - return this._canvas - } - _containerDimensions() { - let h = 0, - e = 0; - return this._container && (h = this._container.clientWidth || 400, e = this._container.clientHeight || 300), [h, e] - } - _setupContainer() { - const h = this._container; - h.classList.add("maplibregl-map"); - const e = this._canvasContainer = X.create("div", "maplibregl-canvas-container", h); - this._interactive && e.classList.add("maplibregl-interactive"), this._canvas = X.create("canvas", "maplibregl-canvas", e), 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 n = this._containerDimensions(), - s = this._getClampedPixelRatio(n[0], n[1]); - this._resizeCanvas(n[0], n[1], s); - const u = this._controlContainer = X.create("div", "maplibregl-control-container", h), - d = this._controlPositions = {}; - ["top-left", "top-right", "bottom-left", "bottom-right"].forEach((m => { - d[m] = X.create("div", `maplibregl-ctrl-${m} `, u) - })), this._container.addEventListener("scroll", this._onMapScroll, !1) - } - _resizeCanvas(h, e, n) { - this._canvas.width = Math.floor(n * h), this._canvas.height = Math.floor(n * e), this._canvas.style.width = `${h}px`, this._canvas.style.height = `${e}px` - } - _setupPainter() { - const h = Object.assign(Object.assign({}, this._canvasContextAttributes), { - alpha: !0, - depth: !0, - stencil: !0, - premultipliedAlpha: !0 - }); - let e = null; - this._canvas.addEventListener("webglcontextcreationerror", (s => { - e = { - requestedAttributes: h - }, s && (e.statusMessage = s.statusMessage, e.type = s.type) - }), { - once: !0 - }); - let n = null; - if (n = this._canvasContextAttributes.contextType ? this._canvas.getContext(this._canvasContextAttributes.contextType, h) : this._canvas.getContext("webgl2", h) || this._canvas.getContext("webgl", h), !n) { - const s = "Failed to initialize WebGL"; - throw e ? (e.message = s, new Error(JSON.stringify(e))) : new Error(s) - } - this.painter = new jh(n, this.transform), Se.testSupport(n) - } - migrateProjection(h, e) { - super.migrateProjection(h, e), this.painter.transform = h, this.fire(new o.l("projectiontransition", { - newProjection: this.style.projection.name - })) - } - loaded() { - return !this._styleDirty && !this._sourcesDirty && !!this.style && this.style.loaded() - } - _update(h) { - return this.style && this.style._loaded ? (this._styleDirty = this._styleDirty || h, this._sourcesDirty = !0, this.triggerRepaint(), this) : this - } - _requestRenderFrame(h) { - return this._update(), this._renderTaskQueue.add(h) - } - _cancelRenderFrame(h) { - this._renderTaskQueue.remove(h) - } - _render(h) { - var e, n, s, u, d; - const m = this._idleTriggered ? this._fadeDuration : 0, - y = ((e = this.style.projection) === null || e === void 0 ? void 0 : e.transitionState) > 0; - if (this.painter.context.setDirty(), this.painter.setBaseState(), this._renderTaskQueue.run(h), this._removed) return; - let w = !1; - if (this.style && this._styleDirty) { - this._styleDirty = !1; - const D = this.transform.zoom, - z = ye.now(); - this.style.zoomHistory.update(D, z); - const B = new o.F(D, { - now: z, - fadeDuration: m, - zoomHistory: this.style.zoomHistory, - transition: this.style.getTransition(), - globalState: this.style.getGlobalState() - }), - U = B.crossFadingFactor(); - U === 1 && U === this._crossFadingFactor || (w = !0, this._crossFadingFactor = U), this.style.update(B) - } - const P = ((n = this.style.projection) === null || n === void 0 ? void 0 : n.transitionState) > 0 !== y; - (s = this.style.projection) === null || s === void 0 || s.setErrorQueryLatitudeDegrees(this.transform.center.lat), this.transform.setTransitionState((u = this.style.projection) === null || u === void 0 ? void 0 : u.transitionState, (d = this.style.projection) === null || d === void 0 ? void 0 : d.latitudeErrorCorrectionRadians), this.style && (this._sourcesDirty || P) && (this._sourcesDirty = !1, this.style._updateSources(this.transform)), this.terrain ? (this.terrain.sourceCache.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._centerClampedToGround && this.transform.setElevation(0)), this._placementDirty = this.style && this.style._updatePlacement(this.transform, this.showCollisionBoxes, m, this._crossSourceCollisions, P), this.painter.render(this.style, { - showTileBoundaries: this.showTileBoundaries, - showOverdrawInspector: this._showOverdrawInspector, - rotating: this.isRotating(), - zooming: this.isZooming(), - moving: this.isMoving(), - fadeDuration: m, - showPadding: this.showPadding - }), this.fire(new o.l("render")), this.loaded() && !this._loaded && (this._loaded = !0, o.cw.mark(o.cx.load), this.fire(new o.l("load"))), this.style && (this.style.hasTransitions() || w) && (this._styleDirty = !0), this.style && !this._placementDirty && this.style._releaseSymbolFadeTiles(); - const M = this._sourcesDirty || this._styleDirty || this._placementDirty; - return M || this._repaint ? this.triggerRepaint() : !this.isMoving() && this.loaded() && this.fire(new o.l("idle")), !this._loaded || this._fullyLoaded || M || (this._fullyLoaded = !0, o.cw.mark(o.cx.fullLoad)), this - } - redraw() { - return this.style && (this._frameRequest && (this._frameRequest.abort(), this._frameRequest = null), this._render(0)), this - } - remove() { - var h; - this._hash && this._hash.remove(); - for (const n of this._controls) n.onRemove(this); - this._controls = [], this._frameRequest && (this._frameRequest.abort(), this._frameRequest = null), this._renderTaskQueue.clear(), this.painter.destroy(), this.handlers.destroy(), delete this.handlers, this.setStyle(null), typeof window < "u" && removeEventListener("online", this._onWindowOnline, !1), Ne.removeThrottleControl(this._imageQueueHandle), (h = this._resizeObserver) === null || h === void 0 || h.disconnect(); - const e = this.painter.context.gl.getExtension("WEBGL_lose_context"); - e != null && e.loseContext && e.loseContext(), this._canvas.removeEventListener("webglcontextrestored", this._contextRestored, !1), this._canvas.removeEventListener("webglcontextlost", this._contextLost, !1), X.remove(this._canvasContainer), X.remove(this._controlContainer), this._container.removeEventListener("scroll", this._onMapScroll, !1), this._container.classList.remove("maplibregl-map"), o.cw.clearMetrics(), this._removed = !0, this.fire(new o.l("remove")) - } - triggerRepaint() { - this.style && !this._frameRequest && (this._frameRequest = new AbortController, ye.frame(this._frameRequest, (h => { - o.cw.frame(h), this._frameRequest = null; - try { - this._render(h) - } catch (e) { - if (!o.cy(e) && !(function(n) { - return n.message === To - })(e)) throw e - } - }), (() => {}))) - } - get showTileBoundaries() { - return !!this._showTileBoundaries - } - set showTileBoundaries(h) { - this._showTileBoundaries !== h && (this._showTileBoundaries = h, this._update()) - } - get showPadding() { - return !!this._showPadding - } - set showPadding(h) { - this._showPadding !== h && (this._showPadding = h, this._update()) - } - get showCollisionBoxes() { - return !!this._showCollisionBoxes - } - set showCollisionBoxes(h) { - this._showCollisionBoxes !== h && (this._showCollisionBoxes = h, h ? this.style._generateCollisionBoxes() : this._update()) - } - get showOverdrawInspector() { - return !!this._showOverdrawInspector - } - set showOverdrawInspector(h) { - this._showOverdrawInspector !== h && (this._showOverdrawInspector = h, this._update()) - } - get repaint() { - return !!this._repaint - } - set repaint(h) { - this._repaint !== h && (this._repaint = h, this.triggerRepaint()) - } - get vertices() { - return !!this._vertices - } - set vertices(h) { - this._vertices = h, this._update() - } - get version() { - return rd - } - getCameraTargetElevation() { - return this.transform.elevation - } - getProjection() { - return this.style.getProjection() - } - setProjection(h) { - return this._lazyInitEmptyStyle(), this.style.setProjection(h), this._update(!0) - } - }, T.MapMouseEvent = Wn, T.MapTouchEvent = qs, T.MapWheelEvent = qc, T.Marker = Xs, T.NavigationControl = class { - constructor(h) { - this._updateZoomButtons = () => { - const e = this._map.getZoom(), - n = e === this._map.getMaxZoom(), - s = e === this._map.getMinZoom(); - this._zoomInButton.disabled = n, this._zoomOutButton.disabled = s, this._zoomInButton.setAttribute("aria-disabled", n.toString()), this._zoomOutButton.setAttribute("aria-disabled", s.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 = (e, n) => { - const s = this._map._getUIString(`NavigationControl.${n}`); - e.title = s, e.setAttribute("aria-label", s) - }, this.options = o.e({}, bp, h), this._container = X.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._container.addEventListener("contextmenu", (e => e.preventDefault())), this.options.showZoom && (this._zoomInButton = this._createButton("maplibregl-ctrl-zoom-in", (e => this._map.zoomIn({}, { - originalEvent: e - }))), X.create("span", "maplibregl-ctrl-icon", this._zoomInButton).setAttribute("aria-hidden", "true"), this._zoomOutButton = this._createButton("maplibregl-ctrl-zoom-out", (e => this._map.zoomOut({}, { - originalEvent: e - }))), X.create("span", "maplibregl-ctrl-icon", this._zoomOutButton).setAttribute("aria-hidden", "true")), this.options.showCompass && (this._compass = this._createButton("maplibregl-ctrl-compass", (e => { - this.options.visualizePitch ? this._map.resetNorthPitch({}, { - originalEvent: e - }) : this._map.resetNorth({}, { - originalEvent: e - }) - })), this._compassIcon = X.create("span", "maplibregl-ctrl-icon", this._compass), this._compassIcon.setAttribute("aria-hidden", "true")) - } - onAdd(h) { - return this._map = h, 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 Lo(this._map, this._compass, this.options.visualizePitch)), this._container - } - onRemove() { - X.remove(this._container), 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(h, e) { - const n = X.create("button", h, this._container); - return n.type = "button", n.addEventListener("click", e), n - } - }, T.Popup = class extends o.E { - constructor(h) { - 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 && X.remove(this._content), this._container && (X.remove(this._container), 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("mousemove", this._onMouseMove), this._map.off("mouseup", this._onMouseUp), this._map.off("drag", this._onDrag), this._map._canvasContainer.classList.remove("maplibregl-track-pointer"), delete this._map, this.fire(new o.l("close"))), this), this._onMouseUp = e => { - this._update(e.point) - }, this._onMouseMove = e => { - this._update(e.point) - }, this._onDrag = e => { - this._update(e.point) - }, this._update = e => { - if (!this._map || !this._lngLat && !this._trackPointer || !this._content) return; - if (!this._container) { - if (this._container = X.create("div", "maplibregl-popup", this._map.getContainer()), this._tip = X.create("div", "maplibregl-popup-tip", this._container), this._container.appendChild(this._content), this.options.className) - for (const m of this.options.className.split(" ")) this._container.classList.add(m); - this._closeButton && this._closeButton.setAttribute("aria-label", this._map._getUIString("Popup.Close")), this._trackPointer && this._container.classList.add("maplibregl-popup-track-pointer") - } - if (this.options.maxWidth && this._container.style.maxWidth !== this.options.maxWidth && (this._container.style.maxWidth = this.options.maxWidth), this._lngLat = Hi(this._lngLat, this._flatPos, this._map.transform, this._trackPointer), this._trackPointer && !e) return; - const n = this._flatPos = this._pos = this._trackPointer && e ? e : this._map.project(this._lngLat); - this._map.terrain && (this._flatPos = this._trackPointer && e ? e : this._map.transform.locationToScreenPoint(this._lngLat)); - let s = this.options.anchor; - const u = Al(this.options.offset); - if (!s) { - const m = this._container.offsetWidth, - y = this._container.offsetHeight; - let w; - w = n.y + u.bottom.y < y ? ["top"] : n.y > this._map.transform.height - y ? ["bottom"] : [], n.x < m / 2 ? w.push("left") : n.x > this._map.transform.width - m / 2 && w.push("right"), s = w.length === 0 ? "bottom" : w.join("-") - } - let d = n.add(u[s]); - this.options.subpixelPositioning || (d = d.round()), X.setTransform(this._container, `${Il[s]} translate(${d.x}px,${d.y}px)`), Ws(this._container, s, "popup"), this._updateOpacity() - }, this._onClose = () => { - this.remove() - }, this.options = o.e(Object.create(Jc), h) - } - addTo(h) { - return this._map && this.remove(), this._map = h, 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._update(), this._focusFirstElement(), this._trackPointer ? (this._map.on("mousemove", this._onMouseMove), this._map.on("mouseup", this._onMouseUp), 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 o.l("open")), this - } - isOpen() { - return !!this._map - } - getLngLat() { - return this._lngLat - } - setLngLat(h) { - return this._lngLat = o.S.convert(h), this._pos = null, this._flatPos = null, this._trackPointer = !1, this._update(), this._map && (this._map.on("move", this._update), this._map.off("mousemove", this._onMouseMove), 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._onMouseMove), this._map.on("drag", this._onDrag), this._container && this._container.classList.add("maplibregl-popup-track-pointer"), this._map._canvasContainer.classList.add("maplibregl-track-pointer")), this - } - getElement() { - return this._container - } - setText(h) { - return this.setDOMContent(document.createTextNode(h)) - } - setHTML(h) { - const e = document.createDocumentFragment(), - n = document.createElement("body"); - let s; - for (n.innerHTML = h; s = n.firstChild, s;) e.appendChild(s); - return this.setDOMContent(e) - } - getMaxWidth() { - var h; - return (h = this._container) === null || h === void 0 ? void 0 : h.style.maxWidth - } - setMaxWidth(h) { - return this.options.maxWidth = h, this._update(), this - } - setDOMContent(h) { - if (this._content) - for (; this._content.hasChildNodes();) this._content.firstChild && this._content.removeChild(this._content.firstChild); - else this._content = X.create("div", "maplibregl-popup-content", this._container); - return this._content.appendChild(h), this._createCloseButton(), this._update(), this._focusFirstElement(), this - } - addClassName(h) { - return this._container && this._container.classList.add(h), this - } - removeClassName(h) { - return this._container && this._container.classList.remove(h), this - } - setOffset(h) { - return this.options.offset = h, this._update(), this - } - toggleClassName(h) { - if (this._container) return this._container.classList.toggle(h) - } - setSubpixelPositioning(h) { - this.options.subpixelPositioning = h - } - _createCloseButton() { - this.options.closeButton && (this._closeButton = X.create("button", "maplibregl-popup-close-button", this._content), this._closeButton.type = "button", this._closeButton.innerHTML = "×", this._closeButton.addEventListener("click", this._onClose)) - } - _focusFirstElement() { - if (!this.options.focusAfterOpen || !this._container) return; - const h = this._container.querySelector(Qc); - h && h.focus() - } - }, T.RasterDEMTileSource = nr, T.RasterTileSource = Yt, T.ScaleControl = class { - constructor(h) { - this._onMove = () => { - Ml(this._map, this._container, this.options) - }, this.setUnit = e => { - this.options.unit = e, Ml(this._map, this._container, this.options) - }, this.options = Object.assign(Object.assign({}, Do), h) - } - getDefaultPosition() { - return "bottom-left" - } - onAdd(h) { - return this._map = h, this._container = X.create("div", "maplibregl-ctrl maplibregl-ctrl-scale", h.getContainer()), this._map.on("move", this._onMove), this._onMove(), this._container - } - onRemove() { - X.remove(this._container), this._map.off("move", this._onMove), this._map = void 0 - } - }, T.ScrollZoomHandler = Xh, T.Style = gc, T.TerrainControl = class { - constructor(h) { - 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 = h - } - onAdd(h) { - return this._map = h, this._container = X.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._terrainButton = X.create("button", "maplibregl-ctrl-terrain", this._container), X.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() { - X.remove(this._container), this._map.off("terrain", this._updateTerrainIcon), this._map = void 0 - } - }, T.TwoFingersTouchPitchHandler = bl, T.TwoFingersTouchRotateHandler = Gs, T.TwoFingersTouchZoomHandler = xl, T.TwoFingersTouchZoomRotateHandler = Jh, T.VectorTileSource = Xt, T.VideoSource = dr, T.addSourceType = (h, e) => o._(void 0, void 0, void 0, (function*() { - if (jr(h)) throw new Error(`A source type called "${h}" already exists.`); - ((n, s) => { - Ir[n] = s - })(h, e) - })), T.clearPrewarmedResources = function() { - const h = We; - h && (h.isPreloaded() && h.numActive() === 1 ? (h.release(Pe), We = 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()")) - }, T.createTileMesh = mc, T.getMaxParallelImageRequests = function() { - return o.a.MAX_PARALLEL_IMAGE_REQUESTS - }, T.getRTLTextPluginStatus = function() { - return kr().getRTLTextPluginStatus() - }, T.getVersion = function() { - return eu - }, T.getWorkerCount = function() { - return Me.workerCount - }, T.getWorkerUrl = function() { - return o.a.WORKER_URL - }, T.importScriptInWorkers = function(h) { - return tt().broadcast("IS", h) - }, T.prewarm = function() { - _t().acquire(Pe) - }, T.setMaxParallelImageRequests = function(h) { - o.a.MAX_PARALLEL_IMAGE_REQUESTS = h - }, T.setRTLTextPlugin = function(h, e) { - return kr().setRTLTextPlugin(h, e) - }, T.setWorkerCount = function(h) { - Me.workerCount = h - }, T.setWorkerUrl = function(h) { - o.a.WORKER_URL = h - } - })); - var F = _; - return F - })) - })(Pd)), Pd.exports -} -var DP = LP(); -const bd = nm(DP); -class fg { - constructor(l) { - lr(this, "gm"); - lr(this, "markers", new Map); - lr(this, "canvases", new Map); - lr(this, "canvasSize"); - lr(this, "canvasOpacity", .8); - this.input = l, this.gm = new hc(this.input.tileSize); - const _ = rv(l.img); - this.canvasSize = Math.ceil(2e3 / _) - } - place([l, _]) { - const C = this.gm.latLonToPixelsFloor(l, _, this.input.zoom), - L = this.getMarkerId(C), - F = this.gm.latLonToPixelBoundsLatLon(l, _, this.input.zoom), - T = this.input.map; - if (this.input.markerFn && !this.markers.has(L)) { - const pe = this.input.markerFn(); - pe.setLngLat({ - lat: F.min[0], - lng: (F.max[1] + F.min[1]) / 2 - }).addTo(T), this.markers.set(L, pe) - } - const { - key: o, - pos: $, - innerPos: W - } = this.getCanvasPos(C); - let ie = this.canvases.get(o); - if (!ie) { - const pe = this.canvasSize, - ye = $.x * pe, - X = $.y * pe, - Se = ye + pe - 1, - we = X + pe - 1, - Re = this.gm.pixelsToLatLon(ye, we + 1, this.input.zoom), - Ae = this.gm.pixelsToLatLon(Se + 1, X, this.input.zoom); - ie = new RP({ - id: `${this.input.id}-${o}`, - img: this.input.img, - canvasSize: this.canvasSize, - coordinates: rm({ - min: Re, - max: Ae - }), - layerPaint: { - "raster-resampling": "nearest", - "raster-opacity": this.canvasOpacity - } - }), ie.addTo(this.input.map), this.canvases.set(o, ie) - } - ie.place(W.x, W.y) - } - clear() { - const l = this.input.map; - for (const _ of this.canvases.values()) _.removeFrom(l), _.removeDOM(); - this.canvases.clear(); - for (const _ of this.markers.values()) _.remove(); - this.markers.clear() - } - clearAndPlace(l) { - this.clear(), this.place(l) - } - remove([l, _]) { - let C = !1; - const L = this.gm.latLonToPixelsFloor(l, _, this.input.zoom), - { - key: F, - innerPos: T - } = this.getCanvasPos(L), - o = this.canvases.get(F); - o && (C = o.remove(T.x, T.y), o.annotationsCount() === 0 && (this.canvases.delete(F), o.removeFrom(this.input.map), o.removeDOM())); - const $ = this.getMarkerId(L), - W = this.markers.get($); - return W == null || W.remove(), this.markers.delete($), C - } - setCanvasOpacity(l) { - this.canvasOpacity = l; - for (const _ of this.canvases.values()) _.setOpacity(l) - } - getMarkerId([l, _]) { - return `${this.input.id}:${l},${_}` - } - getCanvasPos([l, _]) { - const C = { - x: Math.floor(l / this.canvasSize), - y: Math.floor(_ / this.canvasSize) - }, - L = { - x: l % this.canvasSize, - y: _ % this.canvasSize - }, - F = `${C.x},${C.y}`; - return { - pos: C, - innerPos: L, - key: F - } - } -} -class RP { - constructor(l) { - lr(this, "annotations", new Set); - lr(this, "canvas"); - lr(this, "imgSize"); - lr(this, "maps", new Set); - this.input = l, this.imgSize = rv(l.img), this.canvas = document.createElement("canvas"), this.canvas.width = this.input.canvasSize * this.imgSize, this.canvas.height = this.input.canvasSize * this.imgSize - } - place(l, _) { - const C = this.getPixelKey(l, _); - if (this.annotations.has(C)) return !1; - const L = this.canvas.getContext("2d"); - if (L) { - const F = l * this.imgSize, - T = _ * this.imgSize; - L.drawImage(this.input.img, F, T) - } - return this.annotations.add(C), !0 - } - remove(l, _) { - const C = this.getPixelKey(l, _); - if (!this.annotations.has(C)) return !1; - const L = this.canvas.getContext("2d"); - if (L) { - const F = l * this.imgSize, - T = _ * this.imgSize; - L.clearRect(F, T, this.imgSize, this.imgSize) - } - return this.annotations.delete(C), !0 - } - addTo(l) { - const _ = this.input.id; - l.getSource(_) || l.addSource(_, { - type: "canvas", - canvas: this.canvas, - coordinates: this.input.coordinates - }), l.getLayer(_) || l.addLayer({ - id: _, - type: "raster", - source: _, - paint: this.input.layerPaint - }), this.maps.add(l) - } - removeFrom(l) { - const { - id: _ - } = this.input; - l.getLayer(_) && l.removeLayer(_), l.getSource(_) && l.removeSource(_), this.maps.delete(l) - } - removeDOM() { - this.canvas.remove() - } - annotationsCount() { - return this.annotations.size - } - setOpacity(l) { - for (const _ of this.maps.values()) _.setPaintProperty(this.input.id, "raster-opacity", l) - } - getPixelKey(l, _) { - return `${l},${_}` - } -} - -function rv(b) { - return Math.max(b.naturalWidth, b.naturalHeight) -} - -function BP() { - return window.matchMedia("(display-mode: standalone)").matches || "standalone" in window.navigator && window.navigator.standalone === !0 -} - -function Cu(b, l) { - return l.includes(b) -} - -function FP(b) { - const l = { - opaque: !0 - }, - _ = b.searchParams.get("lat"), - C = b.searchParams.get("lng"); - _ && C && (l.pos = { - lat: parseFloat(_), - lng: parseFloat(C) - }); - const L = b.searchParams.get("zoom"); - L && (l.zoom = parseFloat(L)); - const F = b.searchParams.get("season"); - F && (l.season = parseInt(F)); - const T = b.searchParams.get("opaque"); - return T && (l.opaque = T !== "0"), b.searchParams.get("select") && (l.select = !0), l.newUser = !!b.searchParams.get("new-user"), l.alliance = !!b.searchParams.get("alliance"), l -} - -function OP(b, l) { - return b = new URL(b), l.pos !== void 0 && (b.searchParams.set("lat", l.pos.lat.toString()), b.searchParams.set("lng", l.pos.lng.toString())), l.zoom !== void 0 && b.searchParams.set("zoom", l.zoom.toString()), l.season !== void 0 && b.searchParams.set("season", l.season.toString()), l.opaque !== void 0 && b.searchParams.set("opaque", l.opaque ? "1" : "0"), l.newUser !== void 0 && b.searchParams.set("new-user", l.newUser ? "1" : "0"), l.alliance !== void 0 && b.searchParams.set("alliance", l.alliance ? "1" : "0"), l.select && b.searchParams.set("alliance", "1"), b -} -const Id = zn({ - shouldReload: !0 -}); -var NP = Ie(' '), - jP = Ie(' '), - qP = Ie('
      '); - -function iv(b, l) { - Sr(l, !0); - let _ = Et(l, "value", 15), - C = Et(l, "validate", 15), - L = Qt(l, ["$$slots", "$$events", "$$legacy", "label", "placeholder", "value", "max", "min", "validate"]), - F = nt(""); - const T = lt(() => { - var Ae; - return ((Ae = _()) == null ? void 0 : Ae.length) ?? 0 - }); - C(o); - - function o() { - return l.min !== void 0 && x(T) < l.min ? (oe(F, l.min === 1 ? _P() : yP({ - min: l.min - }), !0), !1) : l.max !== void 0 && x(T) > l.max ? (oe(F, wP({ - max: l.max - }), !0), !1) : !0 - } - Zr(() => { - var Ae; - l.max !== void 0 && x(T) > l.max && _((Ae = _()) == null ? void 0 : Ae.substring(0, l.max)) - }); - var $ = qP(), - W = k($); - { - var ie = Ae => { - var Oe = NP(), - Ee = k(Oe, !0); - A(Oe), Ge(() => fe(Ee, l.label)), H(Ae, Oe) - }; - Ue(W, Ae => { - l.label && Ae(ie) - }) - } - var pe = V(W, 2); - Oy(pe), er(pe, Ae => ({ - ...L, - class: `textarea w-full ${l.class??""}`, - placeholder: l.placeholder, - [Uy]: Ae - }), [() => ({ - "textarea-error": !!x(F) - })]); - var ye = V(pe, 2), - X = k(ye), - Se = k(X, !0); - A(X); - var we = V(X, 2); - { - var Re = Ae => { - var Oe = jP(), - Ee = k(Oe, !0); - A(Oe), Ge(() => fe(Ee, l.max - x(T))), H(Ae, Oe) - }; - Ue(we, Ae => { - l.max !== void 0 && Ae(Re) - }) - } - A(ye), A($), Ge(() => fe(Se, x(F))), jd(pe, _), H(b, $), Pr() -} -var VP = (b, l) => { - var _; - (_ = l()) == null || _.close() - }, - UP = Ie(' '); - -function ZP(b, l) { - Sr(l, !0); - let _ = Et(l, "ref", 15), - C = nt(!1), - L = nt(zn(l.description)), - F = nt(void 0); - Ii(() => { - const Oe = Ee => { - var Ne; - Ee.key === "Escape" && ((Ne = _()) == null || Ne.close()) - }; - return document.addEventListener("keydown", Oe), () => document.removeEventListener("keydown", Oe) - }); - var T = UP(), - o = k(T), - $ = k(o), - W = k($, !0); - A($); - var ie = V($, 2), - pe = k(ie), - ye = k(pe); - { - let Oe = lt(() => Hg()); - iv(ye, { - class: "h-24 rounded-lg", - get placeholder() { - return x(Oe) - }, - max: 512, - get value() { - return x(L) - }, - set value(Ee) { - oe(L, Ee, !0) - }, - get validate() { - return x(F) - }, - set validate(Ee) { - oe(F, Ee, !0) - } - }) - } - A(pe); - var X = V(pe, 2), - Se = k(X); - Se.__click = [VP, _]; - var we = k(Se, !0); - A(Se); - var Re = V(Se, 2), - Ae = k(Re, !0); - A(Re), A(X), A(ie), A(o), fi(2), A(T), ps(T, Oe => _(Oe), () => _()), Ge((Oe, Ee, Ne) => { - fe(W, Oe), Se.disabled = x(C), fe(we, Ee), Re.disabled = x(C), fe(Ae, Ne) - }, [() => Zy(), () => qd(), () => ET()]), an("submit", ie, async () => { - var Oe, Ee, Ne; - try { - if (!((Oe = x(F)) != null && Oe())) return; - oe(C, !0), l.description !== x(L) && await ni.updateAllianceDescription(x(L)), await ((Ee = l.onsuccess) == null ? void 0 : Ee.call(l, x(L))), (Ne = _()) == null || Ne.close() - } catch (ft) { - qr.error(ft.message) - } finally { - oe(C, !1) - } - }), H(b, T), Pr() -} -Wi(["click"]); -var $P = (b, l, _) => { - navigator.clipboard.writeText(x(l).toString()), oe(_, !0), setTimeout(() => { - oe(_, !1) - }, 1e3) - }, - GP = Ie(''), - HP = Ie(' '); - -function WP(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15), - C = nt(""), - L = nt(!1); - const F = lt(() => La.url.origin + `/join?id=${x(C)}`); - Zr(() => { - _() && ni.getAllianceInvites().then(ht => { - oe(C, ht[0], !0) - }).catch(ht => { - qr.error(ht.message) - }) - }), Ii(() => { - const ht = Xe => { - Xe.key === "Escape" && _(!1) - }; - return document.addEventListener("keydown", ht), () => document.removeEventListener("keydown", ht) - }); - var T = HP(), - o = k(T), - $ = V(k(o), 2), - W = k($, !0); - A($); - var ie = V($, 2), - pe = k(ie, !0); - A(ie); - var ye = V(ie, 2), - X = k(ye); - let Se; - var we = k(X); - ea(we); - var Re = V(we, 2), - Ae = k(Re); - let Oe; - Ae.__click = [$P, F, L]; - var Ee = k(Ae, !0); - A(Ae), A(Re), A(X); - var Ne = V(X, 2); - { - var ft = ht => { - var Xe = GP(); - H(ht, Xe) - }; - Ue(Ne, ht => { - x(C) || ht(ft) - }) - } - A(ye), A(o), fi(2), A(T), On(T, () => ht => { - Zr(() => { - _() ? ht.show() : ht.close() - }) - }), Ge((ht, Xe, ct, Je, Be, st) => { - fe(W, ht), fe(pe, Xe), Se = Or(X, 1, "border-base-content/20 rounded-field relative flex w-full items-center gap-1 border-2 py-1.5 pl-4 pr-2.5", null, Se, ct), Jl(we, Je), Oe = Or(Ae, 1, "btn btn-primary", null, Oe, Be), fe(Ee, st) - }, [() => S5(), () => M5(), () => ({ - invisible: !x(C) - }), () => x(F).toString(), () => ({ - "btn-success": x(L) - }), () => x(L) ? Gg() : bf()]), an("close", T, () => _(!1)), H(b, T), Pr() -} -Wi(["click"]); -var XP = Tr(''); - -function am(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = XP(); - er(C, () => ({ - viewBox: "0 0 256 199", - width: "256", - height: "199", - xmlns: "http://www.w3.org/2000/svg", - preserveAspectRatio: "xMidYMid", - ..._ - })), H(b, C) -} -var KP = async (b, l) => { - await navigator.clipboard.writeText(l.username), qr.info(V3()) -}, YP = Ie(''); - -function ph(b, l) { - Sr(l, !0); - var _ = YP(), - C = k(_); - C.__click = [KP, l]; - var L = k(C); - am(L, { - class: "size-4 opacity-70" - }), A(C), A(_), Ge(() => zr(_, "data-tip", `Discord: ${l.username}`)), H(b, _), Pr() -} -Wi(["click"]); -var JP = Ie(''), - QP = Ie('
      '); - -function sm(b, l) { - Sr(l, !0); - const _ = []; - let C = Et(l, "value", 15, "today"), - L = [{ - value: "today", - label: Wd() - }, { - value: "week", - label: Z5() - }, { - value: "month", - label: H5() - }, { - value: "all-time", - label: K5() - }]; - var F = QP(); - nn(F, 21, () => L, T => T.value, (T, o) => { - var $ = JP(); - ea($); - var W; - Ge(() => { - zr($, "aria-label", x(o).label), W !== (W = x(o).value) && ($.value = ($.__value = x(o).value) ?? "") - }), Vd(_, [], $, () => (x(o).value, C()), C), H(T, $) - }), A(F), H(b, F), Pr() -} -const eI = typeof window < "u" ? window : void 0; - -function tI(b) { - let l = b.activeElement; - for (; l != null && l.shadowRoot;) { - const _ = l.shadowRoot.activeElement; - if (_ === l) break; - l = _ - } - return l -} -var rc, zu, Ig; -let rI = (Ig = class { - constructor(l = {}) { - br(this, rc); - br(this, zu); - const { - window: _ = eI, - document: C = _ == null ? void 0 : _.document - } = l; - _ !== void 0 && (Jn(this, rc, C), Jn(this, zu, zg(L => { - const F = Su(_, "focusin", L), - T = Su(_, "focusout", L); - return () => { - F(), T() - } - }))) - } - get current() { - var l; - return (l = et(this, zu)) == null || l.call(this), et(this, rc) ? tI(et(this, rc)) : null - } -}, rc = new WeakMap, zu = new WeakMap, Ig); -new rI; - -function iI(b, l) { - switch (b) { - case "post": - Zr(l); - break; - case "pre": - Hf(l); - break - } -} - -function nv(b, l, _, C = {}) { - const { - lazy: L = !1 - } = C; - let F = !L, - T = Array.isArray(b) ? [] : void 0; - iI(l, () => { - const o = Array.isArray(b) ? b.map(W => W()) : b(); - if (!F) { - F = !0, T = o; - return - } - const $ = Go(() => _(o, T)); - return T = o, $ - }) -} - -function dc(b, l, _) { - nv(b, "post", l, _) -} - -function nI(b, l, _) { - nv(b, "pre", l, _) -} -dc.pre = nI; -var aI = Ie(''), - sI = Ie('
      '), - oI = Ie(' '), - lI = (b, l, _) => { - l.onlastpixelclick({ - lat: x(_).lastLatitude ?? 0, - lng: x(_).lastLongitude ?? 0 - }) - }, - cI = Ie(""), - uI = Ie('
      '), - hI = Ie('
      '), - dI = Ie('
      '); - -function pI(b, l) { - Sr(l, !0); - let _ = Et(l, "reload", 15), - C = nt(!0), - L = nt([]), - F = nt(0), - T = nt("today"), - o = {}; - _($); - - function $() { - const we = x(T); - ni.allianceLeaderboard(we).then(Re => { - oe(L, Re), o = { - [we]: Re - }, oe(C, !1) - }).catch(Re => { - qr.error(Re.message) - }) - } - dc(() => [x(T)], () => { - const we = x(T), - Re = o[we]; - if (Re) { - oe(L, Re), oe(C, !1); - return - } - oe(C, !0), ni.allianceLeaderboard(we).then(Ae => { - oe(L, Ae), o[we] = Ae, oe(C, !1) - }).catch(Ae => { - qr.error(Ae.message) - }) - }); - var W = dI(), - ie = k(W); - sm(ie, { - get value() { - return x(T) - }, - set value(we) { - oe(T, we, !0) - } - }); - var pe = V(ie, 2), - ye = k(pe); - { - var X = we => { - var Re = aI(); - H(we, Re) - }, - Se = we => { - var Re = Jt(), - Ae = zt(Re); - { - var Oe = Ne => { - var ft = sI(), - ht = k(ft), - Xe = V(ht); - { - var ct = Be => { - var st = Fn(); - Ge(it => fe(st, it), [() => Wd().toLowerCase()]), H(Be, st) - }, - Je = Be => { - var st = Jt(), - it = zt(st); - { - var Qe = vt => { - var Q = Fn(); - Ge(te => fe(Q, te), [() => Qf()]), H(vt, Q) - }, - ke = vt => { - var Q = Jt(), - te = zt(Q); - { - var _e = ne => { - var Pe = Fn(); - Ge(Me => fe(Pe, Me), [() => em()]), H(ne, Pe) - }; - Ue(te, ne => { - x(T) === "month" && ne(_e) - }, !0) - } - H(vt, Q) - }; - Ue(it, vt => { - x(T) === "week" ? vt(Qe) : vt(ke, !1) - }, !0) - } - H(Be, st) - }; - Ue(Xe, Be => { - x(T) === "today" ? Be(ct) : Be(Je, !1) - }) - } - A(ft), Ge(Be => fe(ht, `${Be??""} `), [() => Jf()]), H(Ne, ft) - }, - Ee = Ne => { - var ft = hI(), - ht = k(ft), - Xe = k(ht), - ct = V(k(Xe)), - Je = k(ct, !0); - A(ct); - var Be = V(ct), - st = k(Be, !0); - A(Be), A(Xe), A(ht); - var it = V(ht); - nn(it, 31, () => x(L), Qe => Qe.userId, (Qe, ke, vt) => { - const Q = lt(() => { - var Yt; - return ((Yt = Dt.data) == null ? void 0 : Yt.id) === x(ke).userId - }); - var te = uI(); - let _e; - var ne = k(te), - Pe = k(ne, !0); - A(ne); - var Me = V(ne), - at = k(Me), - We = k(at); - es(We, { - class: "size-10 border", - get userId() { - return x(ke).userId - }, - get pictureUrl() { - return x(ke).picture - } - }); - var Ct = V(We, 2), - _t = k(Ct), - xt = V(_t), - tt = k(xt); - A(xt), A(Ct); - var pt = V(Ct, 2); - { - var It = Yt => { - const nr = lt(() => ds(x(ke).equippedFlag)); - var ar = oI(), - Ft = k(ar, !0); - A(ar), Ge(() => { - zr(ar, "data-tip", x(nr).name), fe(Ft, x(nr).flag) - }), H(Yt, ar) - }; - Ue(pt, Yt => { - x(ke).equippedFlag && Yt(It) - }) - } - var ut = V(pt, 2); - { - var bt = Yt => { - ph(Yt, { - get username() { - return x(ke).discord - } - }) - }; - Ue(ut, Yt => { - x(ke).discord && Yt(bt) - }) - } - A(at), A(Me); - var wt = V(Me), - dt = k(wt), - Lt = V(dt); - { - var Xt = Yt => { - var nr = cI(); - let ar; - nr.__click = [lI, l, ke]; - var Ft = k(nr); - Wf(Ft, { - class: "size-4" - }), A(nr), Ge((dr, _r) => { - ar = Or(nr, 1, "btn btn-sm btn-ghost absolute -right-2 top-1/2 !-translate-y-1/2 sm:right-4", null, ar, dr), zr(nr, "data-tip", _r) - }, [() => ({ - tooltip: x(F) > 640 - }), () => aT()]), H(Yt, nr) - }; - Ue(Lt, Yt => { - x(ke).lastLatitude && x(ke).lastLongitude && Yt(Xt) - }) - } - A(wt), A(te), Ge((Yt, nr, ar) => { - var Ft; - _e = Or(te, 1, "", null, _e, Yt), fe(Pe, x(vt) + 1), Or(Ct, 1, `font-semibold ${nr??""} flex gap-1`), fe(_t, `${(x(Q)?((Ft=Dt.data)==null?void 0:Ft.name)??x(ke).name:x(ke).name)??""} `), fe(tt, `#${x(ke).userId??""}`), fe(dt, `${ar??""} `) - }, [() => ({ - "bg-base-200": x(Q) - }), () => Zn(x(ke).userId), () => x(ke).pixelsPainted.toLocaleString("en-US")]), Zo(te, () => $o, () => ({ - duration: 200 - })), H(Qe, te) - }), A(it), A(ft), Ge((Qe, ke) => { - fe(Je, Qe), fe(st, ke) - }, [() => tm(), () => Xf()]), H(Ne, ft) - }; - Ue(Ae, Ne => { - x(L).length === 0 ? Ne(Oe) : Ne(Ee, !1) - }, !0) - } - H(we, Re) - }; - Ue(ye, we => { - x(C) ? we(X) : we(Se, !1) - }) - } - A(pe), A(W), $d("innerWidth", we => oe(F, we, !0)), H(b, W), Pr() -} -Wi(["click"]); -var fI = Tr(''); - -function om(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = fI(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var mI = (b, l) => l.onclickback(), - _I = Ie('
      ADMIN
      '), - gI = async (b, l) => { - try { - x(l).loading = !0, await ni.giveAllianceAdmin(x(l).id), x(l).role = "admin" - } catch { - qr.error(dC()) - } finally { - x(l).loading = !1 - } - }, vI = async (b, l, _) => { - try { - x(l).loading = !0, await ni.banAllianceUser(x(l).id), _.data = _.data.filter(C => C.id !== x(l).id) - } catch { - qr.error(DT()) - } finally { - x(l).loading = !1 - } - }, yI = Ie('
    1. ', 1), xI = Ie('
    2. '), bI = Ie('
      '), wI = Ie('
      '), TI = (b, l, _) => { - ni.unbanAllianceUser(x(l).id).then(() => { - _.data = _.data.filter(C => C.id !== x(l).id) - }).catch(C => qr.error(C.message)).finally(() => { - x(l).loading = !1 - }) - }, CI = Ie('
      '), SI = Ie('
      '), PI = Ie('
      '), II = Ie('

      '); - -function MI(b, l) { - Sr(l, !0); - let _ = zn({ - data: [], - page: 0, - hasNextPage: !0, - loading: !1 - }), - C = zn({ - data: [], - page: 0, - hasNextPage: !0, - loading: !1 - }); - var L = II(), - F = k(L), - T = k(F); - T.__click = [mI, l]; - var o = k(T); - gx(o, { - class: "size-5" - }), A(T); - var $ = V(T, 2), - W = k($, !0); - A($), A(F); - var ie = V(F, 2), - pe = k(ie); - ea(pe); - var ye = V(pe, 2), - X = k(ye), - Se = k(X); - nn(Se, 21, () => _.data, Je => Je.id, (Je, Be, st) => { - const it = lt(() => { - var It; - return ((It = Dt.data) == null ? void 0 : It.id) === x(Be).id - }); - var Qe = bI(), - ke = k(Qe), - vt = k(ke), - Q = k(vt); - es(Q, { - class: "size-10 border", - get userId() { - return x(Be).id - }, - get pictureUrl() { - return x(Be).picture - } - }); - var te = V(Q, 2), - _e = k(te); - A(te); - var ne = V(te, 2); - { - var Pe = It => { - var ut = _I(); - H(It, ut) - }; - Ue(ne, It => { - x(Be).role === "admin" && It(Pe) - }) - } - A(vt), A(ke); - var Me = V(ke), - at = k(Me), - We = k(at), - Ct = k(We); - om(Ct, { - class: "size-4" - }), A(We); - var _t = V(We, 2), - xt = k(_t); - { - var tt = It => { - var ut = yI(), - bt = zt(ut), - wt = k(bt); - wt.__click = [gI, Be]; - var dt = k(wt, !0); - A(wt), A(bt); - var Lt = V(bt, 2), - Xt = k(Lt); - Xt.__click = [vI, Be, _]; - var Yt = k(Xt, !0); - A(Xt), A(Lt), Ge((nr, ar) => { - wt.disabled = x(Be).loading, fe(dt, nr), Xt.disabled = x(Be).loading, fe(Yt, ar) - }, [() => gT(), () => Wg()]), H(It, ut) - }, - pt = It => { - var ut = xI(), - bt = k(ut); - bt.disabled = !0; - var wt = k(bt, !0); - A(bt), A(ut), Ge(dt => fe(wt, dt), [() => wT()]), H(It, ut) - }; - Ue(xt, It => { - x(Be).role === "member" ? It(tt) : It(pt, !1) - }) - } - A(_t), A(at), A(Me), A(Qe), Ge(It => { - var ut; - Or(te, 1, `font-semibold ${It??""}`), fe(_e, `${(x(it)?((ut=Dt.data)==null?void 0:ut.name)??x(Be).name:x(Be).name)??""} #${x(Be).id??""}`) - }, [() => Zn(x(Be).id)]), H(Je, Qe) - }), A(Se), A(X); - var we = V(X, 2); - { - var Re = Je => { - var Be = Jt(), - st = zt(Be); - Pu(st, () => _.page, it => { - var Qe = wI(); - On(Qe, () => ke => { - const vt = new IntersectionObserver(Q => { - Q[0].isIntersecting && !_.loading && (_.loading = !0, ni.getAllianceMembers(_.page).then(te => { - _.data = [..._.data, ...te.data], _.hasNextPage = te.hasNext, _.page++ - }).catch(te => { - qr.error(te.message) - }).finally(() => { - _.loading = !1 - })) - }); - return vt.observe(ke), () => { - vt.disconnect() - } - }), H(it, Qe) - }), H(Je, Be) - }; - Ue(we, Je => { - _.hasNextPage && Je(Re) - }) - } - A(ye); - var Ae = V(ye, 2), - Oe = V(Ae, 2), - Ee = k(Oe), - Ne = k(Ee); - nn(Ne, 21, () => C.data, Je => Je.id, (Je, Be, st) => { - var it = CI(), - Qe = k(it), - ke = k(Qe), - vt = k(ke); - es(vt, { - class: "size-10 border", - get userId() { - return x(Be).id - }, - get pictureUrl() { - return x(Be).picture - } - }); - var Q = V(vt, 2), - te = k(Q); - A(Q), A(ke), A(Qe); - var _e = V(Qe), - ne = k(_e); - ne.__click = [TI, Be, C]; - var Pe = k(ne, !0); - A(ne), A(_e), A(it), Ge((Me, at) => { - Or(Q, 1, `font-semibold ${Me??""}`), fe(te, `${x(Be).name??""} #${x(Be).id??""}`), ne.disabled = x(Be).loading, fe(Pe, at) - }, [() => Zn(x(Be).id), () => ST()]), H(Je, it) - }), A(Ne), A(Ee); - var ft = V(Ee, 2); - { - var ht = Je => { - var Be = SI(), - st = k(Be, !0); - A(Be), Ge(it => fe(st, it), [() => MT()]), H(Je, Be) - }; - Ue(ft, Je => { - !C.hasNextPage && C.data.length === 0 && Je(ht) - }) - } - var Xe = V(ft, 2); - { - var ct = Je => { - var Be = Jt(), - st = zt(Be); - Pu(st, () => C.page, it => { - var Qe = PI(); - On(Qe, () => ke => { - const vt = new IntersectionObserver(Q => { - Q[0].isIntersecting && !C.loading && (C.loading = !0, ni.getAllianceBannedMembers(C.page).then(te => { - C.data = [...C.data, ...te.data], C.hasNextPage = te.hasNext, C.page++ - }).catch(te => { - qr.error(te.message) - }).finally(() => { - C.loading = !1 - })) - }); - return vt.observe(ke), () => { - vt.disconnect() - } - }), H(it, Qe) - }), H(Je, Be) - }; - Ue(Xe, Je => { - C.hasNextPage && Je(ct) - }) - } - A(Oe), A(ie), A(L), Ge((Je, Be, st) => { - fe(W, Je), zr(pe, "aria-label", Be), zr(Ae, "aria-label", st) - }, [() => $g(), () => FT(), () => jT()]), H(b, L), Pr() -} -Wi(["click"]); -var AI = Ie(' '), - kI = Ie(''), - EI = Ie('

      '), - zI = Ie('
      '); - -function Tf(b, l) { - Sr(l, !0); - let _ = Et(l, "value", 15), - C = Et(l, "validate", 15), - L = nt(""); - const F = lt(() => { - var Ae; - return ((Ae = _()) == null ? void 0 : Ae.length) ?? 0 - }); - C(T); - - function T() { - return l.min !== void 0 && x(F) < l.min ? (oe(L, x(F) === 0 ? "Required" : `Min. characters: ${l.min}`, !0), !1) : l.max !== void 0 && x(F) > l.max ? (oe(L, `Max. characters: ${l.max}`), !1) : !0 - } - Zr(() => { - var Ae; - l.max !== void 0 && x(F) > l.max && _((Ae = _()) == null ? void 0 : Ae.substring(0, l.max)) - }); - var o = zI(), - $ = k(o); - let W; - var ie = k($); - { - var pe = Ae => { - var Oe = AI(), - Ee = k(Oe, !0); - A(Oe), Ge(() => fe(Ee, l.label)), H(Ae, Oe) - }; - Ue(ie, Ae => { - l.label && Ae(pe) - }) - } - var ye = V(ie, 2); - ea(ye); - var X = V(ye, 2); - { - var Se = Ae => { - var Oe = kI(), - Ee = k(Oe, !0); - A(Oe), Ge(() => fe(Ee, l.max - x(F))), H(Ae, Oe) - }; - Ue(X, Ae => { - l.max !== void 0 && Ae(Se) - }) - } - A($); - var we = V($, 2); - { - var Re = Ae => { - var Oe = EI(), - Ee = k(Oe, !0); - A(Oe), Ge(() => fe(Ee, x(L))), H(Ae, Oe) - }; - Ue(we, Ae => { - x(L) && Ae(Re) - }) - } - A(o), Ge(Ae => { - W = Or($, 1, "input w-full", null, W, Ae), zr(ye, "placeholder", l.placeholder), zr(ye, "maxlength", l.max) - }, [() => ({ - "input-error": !!x(L) - })]), jd(ye, _), H(b, o), Pr() -} -var LI = (b, l) => { - var _; - (_ = l()) == null || _.close() - }, - DI = Ie(' '); - -function RI(b, l) { - Sr(l, !0); - let _ = Et(l, "ref", 15), - C = nt(!1), - L = nt(""), - F = nt(void 0); - Ii(() => { - const Oe = Ee => { - var Ne; - Ee.key === "Escape" && ((Ne = _()) == null || Ne.close()) - }; - return document.addEventListener("keydown", Oe), () => document.removeEventListener("keydown", Oe) - }); - var T = DI(), - o = k(T), - $ = k(o), - W = k($, !0); - A($); - var ie = V($, 2), - pe = k(ie), - ye = k(pe); - { - let Oe = lt(() => xf()), - Ee = lt(() => hT()); - Tf(ye, { - get label() { - return x(Oe) - }, - get placeholder() { - return x(Ee) - }, - min: 1, - max: 16, - get value() { - return x(L) - }, - set value(Ne) { - oe(L, Ne, !0) - }, - get validate() { - return x(F) - }, - set validate(Ne) { - oe(F, Ne, !0) - } - }) - } - A(pe); - var X = V(pe, 2), - Se = k(X); - Se.__click = [LI, _]; - var we = k(Se, !0); - A(Se); - var Re = V(Se, 2), - Ae = k(Re, !0); - A(Re), A(X), A(ie), A(o), fi(2), A(T), ps(T, Oe => _(Oe), () => _()), Ge((Oe, Ee, Ne) => { - fe(W, Oe), Se.disabled = x(C), fe(we, Ee), Re.disabled = x(C), fe(Ae, Ne) - }, [() => lT(), () => qd(), () => fT()]), an("submit", ie, async () => { - var Oe, Ee; - try { - if (!((Oe = x(F)) != null && Oe())) return; - oe(C, !0); - const { - id: Ne - } = await ni.createAlliance(x(L)); - await l.onsuccess(Ne), (Ee = _()) == null || Ee.close() - } catch (Ne) { - qr.error(Ne.message) - } finally { - oe(C, !1) - } - }), H(b, T), Pr() -} -Wi(["click"]); -var BI = Tr(''); - -function fh(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = BI(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var FI = Tr(''), - OI = Tr(''); - -function Cf(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy", "filled"]); - var C = Jt(), - L = zt(C); - { - var F = o => { - var $ = FI(); - er($, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(o, $) - }, - T = o => { - var $ = OI(); - er($, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(o, $) - }; - Ue(L, o => { - l.filled ? o(F) : o(T, !1) - }) - } - H(b, C) -} -var NI = Tr(''); - -function jI(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = NI(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var qI = Tr(''); - -function VI(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = qI(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var UI = Tr(''); - -function ZI(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = UI(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var $I = Tr(''); - -function Xd(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = $I(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} - -function GI(b, l = "_blank") { - return b.replaceAll(/https?:\/\/[^\s]+/g, _ => `${_}`) -} -var HI = Ie('
      '), - WI = async (b, l, _, C) => { - try { - oe(l, !0), await ni.leaveAlliance(), oe(_, !0), await C() - } catch (L) { - qr.error(L.message) - } finally { - oe(l, !1) - } - }, XI = (b, l) => { - oe(l, !0) - }, KI = Ie('
      '), YI = (b, l) => { - var _; - (_ = x(l)) == null || _.show() - }, JI = Ie(''), QI = Ie(''), eM = Ie(' '), tM = (b, l) => oe(l, !0), rM = Ie(''), iM = (b, l, _) => { - var C; - (C = x(l)) != null && C.hq ? _.onhqclick({ - lat: x(l).hq.latitude, - lng: x(l).hq.longitude - }) : _.onhqchange() - }, nM = Ie(' '), aM = Ie(' '), sM = Ie(''), oM = Ie('
      '), lM = Ie('

      ', 1), cM = (b, l) => { - var _; - (_ = x(l)) == null || _.show() - }, uM = Ie('
      ', 1), hM = Ie('
      '); - -function dM(b, l) { - Sr(l, !0); - let _ = nt(void 0), - C = nt(!0), - L = nt(void 0), - F = nt(!1), - T = nt(void 0), - o = nt(!1), - $ = nt(!1), - W = nt(() => {}); - dc(() => l.open, () => { - l.open && Id.shouldReload && ie() - }), Ii(() => { - const we = setInterval(() => { - Id.shouldReload = !0 - }, 1e4); - return () => { - clearTimeout(we) - } - }); - async function ie() { - try { - oe(_, await ni.getAlliance(), !0), x(_) && x(W)(), oe(C, !1), Id.shouldReload = !1 - } catch (we) { - qr.error(we.message) - } - } - var pe = hM(), - ye = k(pe); - { - var X = we => { - var Re = HI(); - H(we, Re) - }, - Se = we => { - var Re = Jt(), - Ae = zt(Re); - { - var Oe = Ne => { - MI(Ne, { - onclickback: () => oe($, !1) - }) - }, - Ee = Ne => { - var ft = Jt(), - ht = zt(ft); - { - var Xe = Je => { - var Be = lM(), - st = zt(Be), - it = k(st), - Qe = k(it, !0); - A(it); - var ke = V(it, 2), - vt = k(ke), - Q = k(vt), - te = k(Q); - om(te, { - class: "size-4" - }), A(Q); - var _e = V(Q, 2), - ne = k(_e), - Pe = k(ne); - Pe.__click = [WI, F, C, ie]; - var Me = k(Pe, !0); - A(Pe), A(ne), A(_e), A(vt); - var at = V(vt, 2); - { - var We = ce => { - var O = KI(), - q = k(O); - q.__click = [XI, o]; - var G = k(q); - ZI(G, { - class: "size-4" - }), A(q), A(O), Ge(K => zr(O, "data-tip", K), [() => F5()]), H(ce, O) - }; - Ue(at, ce => { - x(_).role == "admin" && ce(We) - }) - } - A(ke), A(st); - var Ct = V(st, 2); - { - var _t = ce => { - var O = QI(), - q = k(O); - cx(q, () => GI(x(_).description || Hg())); - var G = V(q, 2); - { - var K = le => { - var ve = JI(); - ve.__click = [YI, T]; - var Le = k(ve); - Cf(Le, { - class: "size-4" - }), A(ve), H(le, ve) - }; - Ue(G, le => { - x(_).role === "admin" && le(K) - }) - } - A(O), H(ce, O) - }; - Ue(Ct, ce => { - (x(_).description || x(_).role === "admin") && ce(_t) - }) - } - var xt = V(Ct, 2), - tt = k(xt), - pt = k(tt); - fh(pt, { - class: "inline size-4" - }); - var It = V(pt, 2), - ut = k(It), - bt = V(ut), - wt = k(bt, !0); - A(bt), A(It), A(tt); - var dt = V(tt, 2), - Lt = k(dt); - Xd(Lt, { - class: "inline size-4" - }); - var Xt = V(Lt, 2), - Yt = k(Xt), - nr = V(Yt); - { - var ar = ce => { - var O = eM(), - q = k(O, !0); - A(O), Ge(G => fe(q, G), [() => x(_).members.toLocaleString("en-US")]), H(ce, O) - }, - Ft = ce => { - var O = rM(); - O.__click = [tM, $]; - var q = k(O, !0); - A(O), Ge(G => fe(q, G), [() => x(_).members.toLocaleString("en-US")]), H(ce, O) - }; - Ue(nr, ce => { - x(_).role === "member" ? ce(ar) : ce(Ft, !1) - }) - } - A(Xt), A(dt); - var dr = V(dt, 2); - { - var _r = ce => { - var O = oM(), - q = k(O); - jI(q, { - class: "inline size-4" - }); - var G = V(q, 2), - K = k(G), - le = V(K); - le.__click = [iM, _, l]; - var ve = k(le); - { - var Le = Ye => { - var Ot = nM(), - xe = k(Ot); - A(Ot), Ge((At, Pt) => fe(xe, `${At??""}, ${Pt??""}`), [() => x(_).hq.latitude.toFixed(3), () => x(_).hq.longitude.toFixed(3)]), H(Ye, Ot) - }, - Ce = Ye => { - var Ot = aM(), - xe = k(Ot, !0); - A(Ot), Ge(At => fe(xe, At), [() => u5()]), H(Ye, Ot) - }; - Ue(ve, Ye => { - x(_).hq ? Ye(Le) : Ye(Ce, !1) - }) - } - A(le), A(G); - var Ze = V(G, 2); - { - var ot = Ye => { - var Ot = sM(); - Ot.__click = function(...At) { - var Pt; - (Pt = l.onhqchange) == null || Pt.apply(this, At) - }; - var xe = k(Ot); - Cf(xe, { - class: "text-base-content/50 size-4" - }), A(Ot), H(Ye, Ot) - }; - Ue(Ze, Ye => { - x(_).role === "admin" && Ye(ot) - }) - } - A(O), Ge(Ye => fe(K, `${Ye??""}: `), [() => o5()]), H(ce, O) - }; - Ue(dr, ce => { - (x(_).hq || x(_).role === "admin") && ce(_r) - }) - } - A(xt); - var Ir = V(xt, 2), - jr = k(Ir), - ur = k(jr, !0); - A(jr); - var Mr = V(jr, 2), - Ar = k(Mr); - pI(Ar, { - get allianceId() { - return x(_).id - }, - get onlastpixelclick() { - return l.onlastpixelclick - }, - get reload() { - return x(W) - }, - set reload(ce) { - oe(W, ce, !0) - } - }), A(Mr), A(Ir); - var kr = V(Ir, 2); - ZP(kr, { - get description() { - return x(_).description - }, - onsuccess: async ce => { - x(_) && (x(_).description = ce) - }, - get ref() { - return x(T) - }, - set ref(ce) { - oe(T, ce, !0) - } - }); - var Nr = V(kr, 2); - WP(Nr, { - get open() { - return x(o) - }, - set open(ce) { - oe(o, ce, !0) - } - }), Ge((ce, O, q, G, K) => { - fe(Qe, x(_).name), Pe.disabled = x(F), fe(Me, ce), fe(ut, `${O??""}: `), fe(wt, q), fe(Yt, `${G??""}: `), fe(ur, K) - }, [() => r5(), () => Xf(), () => x(_).pixelsPainted.toLocaleString("en-US"), () => $g(), () => Yf()]), H(Je, Be) - }, - ct = Je => { - var Be = uM(), - st = zt(Be), - it = k(st), - Qe = k(it); - A(it); - var ke = V(it, 2), - vt = k(ke); - VI(vt, { - class: "size-5" - }); - var Q = V(vt, 1, !0); - A(ke); - var te = V(ke, 2), - _e = k(te), - ne = k(_e, !0); - A(_e), A(te); - var Pe = V(te, 2); - Pe.__click = [cM, L]; - var Me = k(Pe); - Dg(Me, { - class: "size-6" - }); - var at = V(Me); - A(Pe), A(st); - var We = V(st, 2); - RI(We, { - onsuccess: ie, - get ref() { - return x(L) - }, - set ref(Ct) { - oe(L, Ct, !0) - } - }), Ge((Ct, _t, xt, tt) => { - fe(Qe, `${Ct??""}:`), fe(Q, _t), fe(ne, xt), fe(at, ` ${tt??""}`) - }, [() => p5(), () => _5(), () => y5(), () => w5()]), H(Je, Be) - }; - Ue(ht, Je => { - x(_) ? Je(Xe) : Je(ct, !1) - }, !0) - } - H(Ne, ft) - }; - Ue(Ae, Ne => { - x($) ? Ne(Oe) : Ne(Ee, !1) - }, !0) - } - H(we, Re) - }; - Ue(ye, we => { - x(C) ? we(X) : we(Se, !1) - }) - } - A(pe), H(b, pe), Pr() -} -Wi(["click"]); -var pM = Tr(''); - -function Kd(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = pM(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -const fM = b => b; - -function mM(b) { - const l = b - 1; - return l * l * l + 1 -} - -function Qn(b, { - delay: l = 0, - duration: _ = 400, - easing: C = fM -} = {}) { - const L = +getComputedStyle(b).opacity; - return { - delay: l, - duration: _, - easing: C, - css: F => `opacity: ${F*L}` - } -} - -function uf(b, { - delay: l = 0, - duration: _ = 400, - easing: C = mM, - axis: L = "y" -} = {}) { - const F = getComputedStyle(b), - T = +F.opacity, - o = L === "y" ? "height" : "width", - $ = parseFloat(F[o]), - W = L === "y" ? ["top", "bottom"] : ["left", "right"], - ie = W.map(Ae => `${Ae[0].toUpperCase()}${Ae.slice(1)}`), - pe = parseFloat(F[`padding${ie[0]}`]), - ye = parseFloat(F[`padding${ie[1]}`]), - X = parseFloat(F[`margin${ie[0]}`]), - Se = parseFloat(F[`margin${ie[1]}`]), - we = parseFloat(F[`border${ie[0]}Width`]), - Re = parseFloat(F[`border${ie[1]}Width`]); - return { - delay: l, - duration: _, - easing: C, - css: Ae => `overflow: hidden;opacity: ${Math.min(Ae*20,1)*T};${o}: ${Ae*$}px;padding-${W[0]}: ${Ae*pe}px;padding-${W[1]}: ${Ae*ye}px;margin-${W[0]}: ${Ae*X}px;margin-${W[1]}: ${Ae*Se}px;border-${W[0]}-width: ${Ae*we}px;border-${W[1]}-width: ${Ae*Re}px;min-${o}: 0` - } -} -var _M = Ie(' '); - -function gM(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15); - Ii(() => { - const pe = ye => { - ye.key === "Escape" && _(!1) - }; - return document.addEventListener("keydown", pe), () => document.removeEventListener("keydown", pe) - }); - var C = _M(), - L = k(C), - F = V(k(L), 2), - T = k(F); - Kd(T, { - class: "size-5 max-sm:size-6" - }); - var o = V(T, 2), - $ = k(o, !0); - A(o), A(F); - var W = V(F, 2), - ie = k(W); - dM(ie, { - get open() { - return _() - }, - get onhqchange() { - return l.onhqchange - }, - get onhqclick() { - return l.onhqclick - }, - get onlastpixelclick() { - return l.onlastpixelclick - } - }), A(W), A(L), fi(2), A(C), On(C, () => pe => { - Zr(() => { - _() ? (pe.show(), La.url.searchParams.get("alliance") && (La.url.searchParams.delete("alliance"), Lg(La.url.toString()))) : pe.close() - }) - }), Ge(pe => fe($, pe), [() => Gd()]), an("close", C, () => _(!1)), En(2, W, () => Qn, () => ({ - duration: 300 - })), H(b, C), Pr() -} -var vM = Ie(''), - yM = (b, l) => { - l(!1) - }, - xM = Ie(' '); - -function bM(b, l) { - Sr(l, !0); - const _ = []; - let C = Et(l, "open", 15), - L = nt(!1), - F = nt(""), - T = nt(""), - o = nt(null), - $ = nt(null); - const W = [{ - value: "inappropriate-content", - label: Wy(), - description: Hy() - }, { - value: "hate-speech", - label: Ky(), - description: Xy() - }, { - value: "doxxing", - label: Jy(), - description: Yy() - }, { - value: "bot", - label: ex(), - description: Qy() - }, { - value: "griefing", - label: rx(), - description: tx() - }, { - value: "other", - label: ES(), - description: DS() - }]; - Ii(() => { - const _t = xt => { - xt.key === "Escape" && C(!1) - }; - return document.addEventListener("keydown", _t), () => document.removeEventListener("keydown", _t) - }), Zr(() => { - C() || (oe(F, ""), oe(T, "")) - }); - const ie = { - "report-user": `${Cd}/report-user`, - timeout: `${Cd}/moderator/timeout-user`, - ban: `${Cd}/admin/ban-user` - }; - var pe = xM(), - ye = k(pe), - X = V(k(ye), 2), - Se = k(X); - ea(Se); - var we = V(Se, 2); - ea(we); - var Re = V(we, 2); - ea(Re); - var Ae = V(Re, 2); - ea(Ae); - var Oe = V(Ae, 2), - Ee = k(Oe); - es(Ee, { - get userId() { - return l.paintedBy.id - }, - get pictureUrl() { - return l.paintedBy.picture - }, - class: "size-14" - }); - var Ne = V(Ee, 2), - ft = k(Ne), - ht = k(ft); - { - var Xe = _t => { - var xt = Fn(); - Ge(tt => fe(xt, tt), [() => Yg()]), H(_t, xt) - }, - ct = _t => { - var xt = Jt(), - tt = zt(xt); - { - var pt = ut => { - var bt = Fn(); - Ge(wt => fe(bt, wt), [() => Qg()]), H(ut, bt) - }, - It = ut => { - var bt = Jt(), - wt = zt(bt); - { - var dt = Lt => { - var Xt = Fn(); - Ge(Yt => fe(Xt, Yt), [() => Jg()]), H(Lt, Xt) - }; - Ue(wt, Lt => { - l.action === "ban" && Lt(dt) - }, !0) - } - H(ut, bt) - }; - Ue(tt, ut => { - l.action === "timeout" ? ut(pt) : ut(It, !1) - }, !0) - } - H(_t, xt) - }; - Ue(ht, _t => { - l.action === "report-user" ? _t(Xe) : _t(ct, !1) - }) - } - A(ft); - var Je = V(ft, 2), - Be = k(Je), - st = k(Be, !0); - A(Be); - var it = V(Be, 2), - Qe = k(it); - A(it), A(Je), A(Ne), A(Oe); - var ke = V(Oe, 2), - vt = k(ke), - Q = k(vt); - A(vt); - var te = V(vt, 2); - nn(te, 21, () => W, _t => _t.value, (_t, xt) => { - var tt = vM(), - pt = k(tt); - ea(pt); - var It, ut = V(pt, 2), - bt = k(ut), - wt = k(bt, !0); - A(bt); - var dt = V(bt, 2), - Lt = k(dt, !0); - A(dt), A(ut), A(tt), Ge(() => { - zr(pt, "aria-label", x(xt).label), It !== (It = x(xt).value) && (pt.value = (pt.__value = x(xt).value) ?? ""), fe(wt, x(xt).label), fe(Lt, x(xt).description) - }), Vd(_, [], pt, () => (x(xt).value, x(F)), Xt => oe(F, Xt)), H(_t, tt) - }), A(te), A(ke); - var _e = V(ke, 2), - ne = k(_e); - { - let _t = lt(() => FS()); - iv(ne, { - class: "h-20 rounded-lg", - name: "notes", - get placeholder() { - return x(_t) - }, - max: 2056, - min: 5, - get value() { - return x(T) - }, - set value(xt) { - oe(T, xt, !0) - }, - get validate() { - return x($) - }, - set validate(xt) { - oe($, xt, !0) - } - }) - } - A(_e); - var Pe = V(_e, 2), - Me = k(Pe); - Me.__click = [yM, C]; - var at = k(Me, !0); - A(Me); - var We = V(Me, 2), - Ct = k(We, !0); - A(We), A(Pe), A(X), ps(X, _t => oe(o, _t), () => x(o)), A(ye), fi(2), A(pe), On(pe, () => _t => { - Zr(() => { - C() ? _t.show() : _t.close() - }) - }), Ge((_t, xt, tt, pt) => { - zr(X, "action", ie[l.action]), Jl(Se, l.paintedBy.id), Jl(we, l.latLon[0]), Jl(Re, l.latLon[1]), Jl(Ae, l.zoom), Or(Je, 1, `font-medium ${_t??""} flex gap-1.5`), fe(st, l.paintedBy.name), fe(Qe, `#${l.paintedBy.id??""}`), fe(Q, `${xt??""}:`), fe(at, tt), We.disabled = x(L), fe(Ct, pt) - }, [() => Zn(l.paintedBy.id), () => MS(), () => qd(), () => jS()]), an("close", pe, () => C(!1)), an("submit", X, async _t => { - if (_t.preventDefault(), !x(L) && x($)()) try { - oe(L, !0); - const xt = new FormData(x(o)); - if (!xt.get("reason")) { - qr.error(GS()); - return - } - const tt = await l.image; - xt.append("image", tt, `report-${Date.now()}.jpeg`); - const pt = await fetch(x(o).action, { - method: "POST", - body: xt, - credentials: "include" - }); - pt.status === 200 || pt.status === 409 ? (qr.info(US()), C(!1)) : qr.error(XS()) - } finally { - oe(L, !1) - } - }), H(b, pe), Pr() -} -Wi(["click"]); - -function wM(b, l, _) { - return new Promise((C, L) => { - b.once("render", () => { - const F = b.getCanvas().toDataURL(), - T = document.createElement("img"); - T.src = F, T.onload = () => { - const o = document.createElement("canvas"); - o.width = T.width, o.height = T.height; - const $ = o.getContext("2d"); - if ($) { - $.drawImage(T, 0, 0); - const [W, ie, pe, ye] = $.getImageData(l, _, 1, 1).data; - C([W, ie, pe, ye]) - } else L(new Error("Could not get 2d context from canvas")); - T.remove(), o.remove() - } - }), b.triggerRepaint() - }) -} - -function av(b, l) { - return new Promise((_, C) => { - b.once("render", () => { - const L = b.getCanvas(); - let F = L; - if (l != null && l.maxWidth || l != null && l.maxHeight) { - const T = L.width, - o = L.height, - $ = (l == null ? void 0 : l.maxWidth) ?? T, - W = (l == null ? void 0 : l.maxHeight) ?? o; - F = document.createElement("canvas"); - const ie = Math.min($ / T, W / o); - F.width = Math.floor(T * ie), F.height = Math.floor(o * ie); - const pe = F.getContext("2d"); - pe && pe.drawImage(L, 0, 0, F.width, F.height) - } - try { - F.toBlob(T => { - T && _(T) - }, (l == null ? void 0 : l.type) ?? "image/png", (l == null ? void 0 : l.quality) ?? 1) - } catch (T) { - C(T) - } finally { - F !== L && F.remove() - } - }) - }) -} -var TM = Tr(''); - -function sv(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = TM(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var CM = Tr(''); - -function SM(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = CM(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - height: "24px", - viewBox: "0 -960 960 960", - width: "24px", - fill: "currentColor", - ..._ - })), H(b, C) -} -var PM = Tr(''); - -function ov(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = PM(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -const Yl = { - hour: 3600 * 1e3, - min: 60 * 1e3, - sec: 1e3 -}; - -function zd(b) { - const l = Math.floor(b / Yl.hour); - b -= l * Yl.hour; - const _ = Math.floor(b / Yl.min); - b -= _ * Yl.min; - const L = Math.floor(b / Yl.sec).toString().padStart(2, "0"); - return l > 0 ? `${l}:${_.toString().padStart(2,"0")}:${L}` : `${_}:${L}` -} - -function IM(b) { - const l = new Date, - _ = l.getFullYear(), - C = String(l.getMonth() + 1).padStart(2, "0"), - L = String(l.getDate()).padStart(2, "0"), - F = String(l.getHours()).padStart(2, "0"), - T = String(l.getMinutes()).padStart(2, "0"), - o = String(l.getSeconds()).padStart(2, "0"); - return `${_}-${C}-${L} ${F}:${T}:${o}` -} -var MM = (b, l, _) => { - navigator.clipboard.writeText(l.url.toString()), oe(_, !0), setTimeout(() => { - oe(_, !1) - }, 1e3) - }, - AM = Ie('Screenshot'), - kM = Ie('
      '), - EM = async (b, l) => { - x(l) && (await navigator.clipboard.write([new ClipboardItem({ - "image/png": x(l) - })]), qr.info(sS())) - }, zM = Ie(''), LM = Ie(' '); - -function DM(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15), - C = nt(!1); - Ii(() => { - const Ee = Ne => { - Ne.key === "Escape" && _(!1) - }; - return document.addEventListener("keydown", Ee), () => document.removeEventListener("keydown", Ee) - }); - let L = nt(null), - F = nt(""); - Zr(() => { - _() ? (l.hideHover(), setTimeout(async () => { - av(l.map).then(Ee => { - oe(L, Ee, !0), oe(F, URL.createObjectURL(x(L)), !0) - }).finally(() => { - l.showHover() - }) - }, 500)) : x(F) && (URL.revokeObjectURL(x(F)), oe(L, null), oe(F, "")) - }); - var T = LM(), - o = k(T), - $ = V(k(o), 2), - W = k($); - ov(W, { - class: "size-5" - }); - var ie = V(W); - A($); - var pe = V($, 2), - ye = k(pe); - ea(ye); - var X = V(ye, 2), - Se = k(X); - let we; - Se.__click = [MM, l, C]; - var Re = k(Se, !0); - A(Se), A(X), A(pe); - var Ae = V(pe, 2); - { - var Oe = Ee => { - const Ne = lt(() => { - var ne; - return (ne = l.map) == null ? void 0 : ne.getCanvas() - }); - var ft = zM(), - ht = k(ft), - Xe = k(ht); - SM(Xe, { - class: "inline size-5" - }); - var ct = V(Xe); - A(ht); - var Je = V(ht, 2); - { - var Be = ne => { - var Pe = AM(); - Ge(() => { - zr(Pe, "src", x(F)), zr(Pe, "width", x(Ne).width), zr(Pe, "height", x(Ne).height) - }), H(ne, Pe) - }, - st = ne => { - var Pe = kM(); - Ge(() => uc(Pe, `aspect-ratio: ${x(Ne).width/x(Ne).height}`)), H(ne, Pe) - }; - Ue(Je, ne => { - x(F) ? ne(Be) : ne(st, !1) - }) - } - var it = V(Je, 2), - Qe = k(it); - Qe.__click = [EM, L]; - var ke = k(Qe); - $y(ke, { - class: "size-5" - }); - var vt = V(ke); - A(Qe); - var Q = V(Qe, 2), - te = k(Q); - sv(te, { - class: "size-5" - }); - var _e = V(te); - A(Q), A(it), A(ft), Ge((ne, Pe, Me, at) => { - fe(ct, ` ${ne??""}`), fe(vt, ` ${Pe??""}`), zr(Q, "href", x(F)), zr(Q, "download", `wplace_${Me??""}.png`), fe(_e, ` ${at??""}`) - }, [() => eS(), () => bf(), () => IM().replaceAll(" ", "_").replaceAll(":", "-"), () => iS()]), En(2, ft, () => Qn, () => ({ - duration: 300 - })), H(Ee, ft) - }; - Ue(Ae, Ee => { - _() && Ee(Oe) - }) - } - A(o), fi(2), A(T), On(T, () => Ee => { - Zr(() => { - _() ? Ee.show() : Ee.close() - }) - }), Ge((Ee, Ne, ft, ht) => { - fe(ie, ` ${Ee??""}`), Jl(ye, Ne), we = Or(Se, 1, "btn btn-primary", null, we, ft), fe(Re, ht) - }, [() => I3(), () => l.url.toString(), () => ({ - "btn-success": x(C) - }), () => x(C) ? Gg() : bf()]), an("close", T, () => _(!1)), H(b, T), Pr() -} -Wi(["click"]); -var RM = Tr(''); - -function BM(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = RM(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var FM = Ie('
    3. '), - OM = Ie('

        '); - -function lm(b, l) { - Sr(l, !1); - const _ = ["📜 All users are responsible for the content they post. The platform reserves the right of final interpretation.", "🛑 Any violation may result in immediate removal of content and permanent ban of the account", "😈 Do not paint over other artworks using random colors or patterns just to mess things up", "� Disclosing other's personal information is not allowed"]; - Og(); - var C = OM(), - L = k(C), - F = k(L); - BM(F, { - class: "size-5" - }); - var T = V(F, 2), - o = k(T), - $ = V(o), - W = k($, !0); - A($), A(T), A(L); - var ie = V(L, 2), - pe = k(ie); - nn(pe, 5, () => _, Zd, (Se, we) => { - var Re = FM(), - Ae = k(Re, !0); - A(Re), Ge(() => fe(Ae, x(we))), H(Se, Re) - }), A(pe); - var ye = V(pe, 2), - X = k(ye, !0); - A(ye), A(ie), A(C), Ge((Se, we, Re) => { - fe(o, `${Se??""} `), fe(W, we), fe(X, Re) - }, [() => I2(), () => k2(), () => ew()]), H(b, C), Pr() -} -var NM = (b, l) => { - l(!1) - }, - jM = Ie(' '); - -function qM(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15); - Ii(() => { - const W = ie => { - ie.key === "Escape" && _(!1) - }; - return document.addEventListener("keydown", W), () => document.removeEventListener("keydown", W) - }); - var C = jM(), - L = k(C), - F = V(k(L), 2), - T = V(k(F), 2), - o = k(T); - lm(o, {}), A(T); - var $ = V(T, 2); - $.__click = [NM, _], A(F), A(L), fi(2), A(C), On(C, () => W => { - Zr(() => { - _() ? W.show() : W.close() - }) - }), an("close", C, () => _(!1)), H(b, C), Pr() -} -Wi(["click"]); -var VM = () => { - La.url.searchParams.delete("new-user"), Lg(La.url.toString()) - }, - UM = Ie(''); - -function ZM(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15); - Ii(() => { - const we = Re => { - Re.key === "Escape" && _(!1) - }; - return document.addEventListener("keydown", we), () => document.removeEventListener("keydown", we) - }); - var C = UM(), - L = k(C), - F = k(L), - T = k(F), - o = k(T), - $ = k(o, !0); - A(o); - var W = V(o, 2); - Ng(W, { - hasText: !0, - size: "medium" - }), A(T), A(F); - var ie = V(F, 2), - pe = k(ie); - lm(pe, {}), A(ie); - var ye = V(ie, 2), - X = k(ye); - X.__click = [VM]; - var Se = k(X, !0); - A(X), A(ye), A(L), A(C), On(C, () => we => { - Zr(() => { - _() ? we.show() : we.close() - }) - }), Ge((we, Re) => { - fe($, we), fe(Se, Re) - }, [() => C2(), () => iw()]), an("close", C, () => _(!1)), H(b, C), Pr() -} -Wi(["click"]); - -function $M() { - const b = navigator.userAgent, - l = navigator.vendor; - return /Chrome/.test(b) && /Google Inc/.test(l) ? "Chrome" : /Safari/.test(b) && /Apple Computer/.test(l) ? "Safari" : /Firefox/.test(b) ? "Firefox" : /Edge/.test(b) ? "Edge" : /Opera|OPR/.test(b) ? "Opera" : "Unknown" -} -var GM = Tr(''); - -function HM(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = GM(); -} -var WM = Tr(''); - -function XM(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = WM(); -} -var KM = Tr(''); - -function Ld(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = KM(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var YM = Ie(' link', 1), - JM = Ie('chrome://settings/system.', 1), - QM = Ie('edge://settings/system/manageSystem.', 1), - e4 = Ie(' ', 1), - t4 = Ie(''), - r4 = Ie(' '); - -function i4(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15); - Ii(() => { - const pe = ye => { - ye.key === "Escape" && _(!1) - }; - return document.addEventListener("keydown", pe), () => document.removeEventListener("keydown", pe) - }); - const C = $M(); - var L = r4(), - F = k(L), - T = V(k(F), 2); - { - var o = pe => { - var ye = t4(), - X = k(ye), - Se = k(X); - Ng(Se, { - hasText: !0, - size: "medium" - }); - var we = V(Se, 2), - Re = k(we), - Ae = V(Re, 4); - fi(), A(we); - var Oe = V(we, 2), - Ee = k(Oe), - Ne = k(Ee), - ft = k(Ne, !0); - A(Ne); - var ht = V(Ne, 4), - Xe = k(ht); - am(Xe, { - class: "mr-0.5 inline size-4" - }), fi(2), A(ht); - var ct = V(ht, 4), - Je = k(ct); - HM(Je, { - class: "mr-0.5 inline size-4" - }), fi(2), A(ct); - var Be = V(ct, 4), - st = k(Be); - XM(st, { - class: "mr-0.5 inline size-4" - }), fi(2), A(Be), A(Ee), A(Oe), A(X); - var it = V(X, 2), - Qe = k(it), - ke = k(Qe, !0); - A(Qe); - var vt = V(Qe, 2); - A(it); - var Q = V(it, 2), - te = k(Q), - _e = k(te, !0); - A(te); - var ne = V(te, 2), - Pe = k(ne), - Me = V(Pe), - at = k(Me); - Ld(at, { - class: "size-5" - }), A(Me); - var We = V(Me); - A(ne); - var Ct = V(ne, 2), - _t = k(Ct), - xt = V(_t), - tt = k(xt, !0); - A(xt); - var pt = V(xt); - A(Ct), A(Q); - var It = V(Q, 2), - ut = k(It), - bt = k(ut, !0); - A(ut); - var wt = V(ut, 2), - dt = k(wt); - { - var Lt = jr => { - var ur = YM(), - Mr = zt(ur); - fi(), Ge(Ar => fe(Mr, `${Ar??""}: `), [() => bS()]), H(jr, ur) - }, - Xt = jr => { - var ur = e4(), - Mr = zt(ur), - Ar = V(Mr), - kr = k(Ar, !0); - A(Ar); - var Nr = V(Ar), - ce = V(Nr); - { - var O = G => { - var K = JM(); - fi(), H(G, K) - }, - q = G => { - var K = Jt(), - le = zt(K); - { - var ve = Le => { - var Ce = QM(); - fi(), H(Le, Ce) - }; - Ue(le, Le => { - C === "Edge" && Le(ve) - }, !0) - } - H(G, K) - }; - Ue(ce, G => { - C === "Chrome" ? G(O) : G(q, !1) - }) - } - Ge((G, K, le) => { - fe(Mr, `${G??""} `), fe(kr, K), fe(Nr, ` ${le??""} `) - }, [() => dS(), () => mS(), () => vS()]), H(jr, ur) - }; - Ue(dt, jr => { - C !== "Chrome" && C !== "Edge" ? jr(Lt) : jr(Xt, !1) - }) - } - A(wt), A(It); - var Yt = V(It, 2), - nr = k(Yt); - lm(nr, {}), A(Yt); - var ar = V(Yt, 4), - Ft = V(k(ar), 2), - dr = k(Ft, !0); - A(Ft); - var _r = V(Ft, 2), - Ir = k(_r, !0); - A(_r), A(ar), A(ye), Ge((jr, ur, Mr, Ar, kr, Nr, ce, O, q, G, K, le, ve) => { - fe(Re, `${jr??""} `), fe(Ae, ` © - ${ur??""} `), fe(ft, Mr), fe(ke, Ar), zr(vt, "src", oa.language === "pt" ? "https://www.youtube.com/embed/AcE85QM4iPQ?si=wbeZD8vxOzvlB_Z9" : "https://www.youtube.com/embed/xOXtd-WzRxA?si=fHz8Z6ecXGYrDhkN"), fe(_e, kr), fe(Pe, `${Nr??""} `), fe(We, ` ${ce??""}`), fe(_t, `${O??""} `), fe(tt, q), fe(pt, ` ${G??""}`), fe(bt, K), fe(dr, le), fe(Ir, ve) - }, [() => v1(), () => b1(), () => C1(), () => I1(), () => k1(), () => L1(), () => B1(), () => N1(), () => V1(), () => $1(), () => cS(), () => tP(), () => nP()]), En(2, ye, () => Qn, () => ({ - duration: 300 - })), H(pe, ye) - }; - Ue(T, pe => { - _() && pe(o) - }) - } - A(F); - var $ = V(F, 2), - W = k($), - ie = k(W, !0); - A(W), A($), A(L), On(L, () => pe => { - Zr(() => { - _() ? pe.show() : pe.close() - }) - }), Ge(pe => fe(ie, pe), [() => tc()]), an("close", L, () => _(!1)), H(b, L), Pr() -} - -function n4(b) { - return typeof b == "function" -} - -function mh(b) { - return b !== null && typeof b == "object" -} -const a4 = ["string", "number", "bigint", "boolean"]; - -function Sf(b) { - return b == null || a4.includes(typeof b) ? !0 : Array.isArray(b) ? b.every(l => Sf(l)) : typeof b == "object" ? Object.getPrototypeOf(b) === Object.prototype : !1 -} -const Iu = Symbol("box"), - cm = Symbol("is-writable"); - -function s4(b) { - return mh(b) && Iu in b -} - -function o4(b) { - return cr.isBox(b) && cm in b -} - -function cr(b) { - let l = nt(zn(b)); - return { - [Iu]: !0, - [cm]: !0, - get current() { - return x(l) - }, - set current(_) { - oe(l, _, !0) - } - } -} - -function l4(b, l) { - const _ = lt(b); - return l ? { - [Iu]: !0, - [cm]: !0, - get current() { - return x(_) - }, - set current(C) { - l(C) - } - } : { - [Iu]: !0, - get current() { - return b() - } - } -} - -function c4(b) { - return cr.isBox(b) ? b : n4(b) ? cr.with(b) : cr(b) -} - -function u4(b) { - return Object.entries(b).reduce((l, [_, C]) => cr.isBox(C) ? (cr.isWritableBox(C) ? Object.defineProperty(l, _, { - get() { - return C.current - }, - set(L) { - C.current = L - } - }) : Object.defineProperty(l, _, { - get() { - return C.current - } - }), l) : Object.assign(l, { - [_]: C - }), {}) -} - -function h4(b) { - return cr.isWritableBox(b) ? { - [Iu]: !0, - get current() { - return b.current - } - } : b -} -cr.from = c4; -cr.with = l4; -cr.flatten = u4; -cr.readonly = h4; -cr.isBox = s4; -cr.isWritableBox = o4; - -function d4(...b) { - return function(l) { - var _; - for (const C of b) - if (C) { - if (l.defaultPrevented) return; - typeof C == "function" ? C.call(this, l) : (_ = C.current) == null || _.call(this, l) - } - } -} -var Hl = {}, - hf, mg; - -function p4() { - if (mg) return hf; - mg = 1; - var b = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, - l = /\n/g, - _ = /^\s*/, - C = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, - L = /^:\s*/, - F = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, - T = /^[;\s]*/, - o = /^\s+|\s+$/g, - $ = ` -`, - W = "/", - ie = "*", - pe = "", - ye = "comment", - X = "declaration"; - hf = function(we, Re) { - if (typeof we != "string") throw new TypeError("First argument must be a string"); - if (!we) return []; - Re = Re || {}; - var Ae = 1, - Oe = 1; - - function Ee(Qe) { - var ke = Qe.match(l); - ke && (Ae += ke.length); - var vt = Qe.lastIndexOf($); - Oe = ~vt ? Qe.length - vt : Oe + Qe.length - } - - function Ne() { - var Qe = { - line: Ae, - column: Oe - }; - return function(ke) { - return ke.position = new ft(Qe), ct(), ke - } - } - - function ft(Qe) { - this.start = Qe, this.end = { - line: Ae, - column: Oe - }, this.source = Re.source - } - ft.prototype.content = we; - - function ht(Qe) { - var ke = new Error(Re.source + ":" + Ae + ":" + Oe + ": " + Qe); - if (ke.reason = Qe, ke.filename = Re.source, ke.line = Ae, ke.column = Oe, ke.source = we, !Re.silent) throw ke - } - - function Xe(Qe) { - var ke = Qe.exec(we); - if (ke) { - var vt = ke[0]; - return Ee(vt), we = we.slice(vt.length), ke - } - } - - function ct() { - Xe(_) - } - - function Je(Qe) { - var ke; - for (Qe = Qe || []; ke = Be();) ke !== !1 && Qe.push(ke); - return Qe - } - - function Be() { - var Qe = Ne(); - if (!(W != we.charAt(0) || ie != we.charAt(1))) { - for (var ke = 2; pe != we.charAt(ke) && (ie != we.charAt(ke) || W != we.charAt(ke + 1));) ++ke; - if (ke += 2, pe === we.charAt(ke - 1)) return ht("End of comment missing"); - var vt = we.slice(2, ke - 2); - return Oe += 2, Ee(vt), we = we.slice(ke), Oe += 2, Qe({ - type: ye, - comment: vt - }) - } - } - - function st() { - var Qe = Ne(), - ke = Xe(C); - if (ke) { - if (Be(), !Xe(L)) return ht("property missing ':'"); - var vt = Xe(F), - Q = Qe({ - type: X, - property: Se(ke[0].replace(b, pe)), - value: vt ? Se(vt[0].replace(b, pe)) : pe - }); - return Xe(T), Q - } - } - - function it() { - var Qe = []; - Je(Qe); - for (var ke; ke = st();) ke !== !1 && (Qe.push(ke), Je(Qe)); - return Qe - } - return ct(), it() - }; - - function Se(we) { - return we ? we.replace(o, pe) : pe - } - return hf -} -var _g; - -function f4() { - if (_g) return Hl; - _g = 1; - var b = Hl && Hl.__importDefault || function(C) { - return C && C.__esModule ? C : { - default: C - } - }; - Object.defineProperty(Hl, "__esModule", { - value: !0 - }), Hl.default = _; - var l = b(p4()); - - function _(C, L) { - var F = null; - if (!C || typeof C != "string") return F; - var T = (0, l.default)(C), - o = typeof L == "function"; - return T.forEach(function($) { - if ($.type === "declaration") { - var W = $.property, - ie = $.value; - o ? L(W, ie, $) : ie && (F = F || {}, F[W] = ie) - } - }), F - } - return Hl -} -var m4 = f4(); -const gg = nm(m4), - _4 = gg.default || gg, - g4 = /\d/, - v4 = ["-", "_", "/", "."]; - -function y4(b = "") { - if (!g4.test(b)) return b !== b.toLowerCase() -} - -function x4(b) { - const l = []; - let _ = "", - C, L; - for (const F of b) { - const T = v4.includes(F); - if (T === !0) { - l.push(_), _ = "", C = void 0; - continue - } - const o = y4(F); - if (L === !1) { - if (C === !1 && o === !0) { - l.push(_), _ = F, C = o; - continue - } - if (C === !0 && o === !1 && _.length > 1) { - const $ = _.at(-1); - l.push(_.slice(0, Math.max(0, _.length - 1))), _ = $ + F, C = o; - continue - } - } - _ += F, C = o, L = T - } - return l.push(_), l -} - -function lv(b) { - return b ? x4(b).map(l => w4(l)).join("") : "" -} - -function b4(b) { - return T4(lv(b || "")) -} - -function w4(b) { - return b ? b[0].toUpperCase() + b.slice(1) : "" -} - -function T4(b) { - return b ? b[0].toLowerCase() + b.slice(1) : "" -} - -function wd(b) { - if (!b) return {}; - const l = {}; - - function _(C, L) { - if (C.startsWith("-moz-") || C.startsWith("-webkit-") || C.startsWith("-ms-") || C.startsWith("-o-")) { - l[lv(C)] = L; - return - } - if (C.startsWith("--")) { - l[C] = L; - return - } - l[b4(C)] = L - } - return _4(b, _), l -} - -function C4(...b) { - return (...l) => { - for (const _ of b) typeof _ == "function" && _(...l) - } -} - -function S4(b, l) { - const _ = RegExp(b, "g"); - return C => { - if (typeof C != "string") throw new TypeError(`expected an argument of type string, but got ${typeof C}`); - return C.match(_) ? C.replace(_, l) : C - } -} -const P4 = S4(/[A-Z]/, b => `-${b.toLowerCase()}`); - -function I4(b) { - if (!b || typeof b != "object" || Array.isArray(b)) throw new TypeError(`expected an argument of type object, but got ${typeof b}`); - return Object.keys(b).map(l => `${P4(l)}: ${b[l]};`).join(` -`) -} - -function cv(b = {}) { - return I4(b).replace(` -`, " ") -} -const uv = { - position: "absolute", - width: "1px", - height: "1px", - padding: "0", - margin: "-1px", - overflow: "hidden", - clip: "rect(0, 0, 0, 0)", - whiteSpace: "nowrap", - borderWidth: "0", - transform: "translateX(-100%)" -}; -cv(uv); -const M4 = ["onabort", "onanimationcancel", "onanimationend", "onanimationiteration", "onanimationstart", "onauxclick", "onbeforeinput", "onbeforetoggle", "onblur", "oncancel", "oncanplay", "oncanplaythrough", "onchange", "onclick", "onclose", "oncompositionend", "oncompositionstart", "oncompositionupdate", "oncontextlost", "oncontextmenu", "oncontextrestored", "oncopy", "oncuechange", "oncut", "ondblclick", "ondrag", "ondragend", "ondragenter", "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onerror", "onfocus", "onfocusin", "onfocusout", "onformdata", "ongotpointercapture", "oninput", "oninvalid", "onkeydown", "onkeypress", "onkeyup", "onload", "onloadeddata", "onloadedmetadata", "onloadstart", "onlostpointercapture", "onmousedown", "onmouseenter", "onmouseleave", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onpaste", "onpause", "onplay", "onplaying", "onpointercancel", "onpointerdown", "onpointerenter", "onpointerleave", "onpointermove", "onpointerout", "onpointerover", "onpointerup", "onprogress", "onratechange", "onreset", "onresize", "onscroll", "onscrollend", "onsecuritypolicyviolation", "onseeked", "onseeking", "onselect", "onselectionchange", "onselectstart", "onslotchange", "onstalled", "onsubmit", "onsuspend", "ontimeupdate", "ontoggle", "ontouchcancel", "ontouchend", "ontouchmove", "ontouchstart", "ontransitioncancel", "ontransitionend", "ontransitionrun", "ontransitionstart", "onvolumechange", "onwaiting", "onwebkitanimationend", "onwebkitanimationiteration", "onwebkitanimationstart", "onwebkittransitionend", "onwheel"], - A4 = new Set(M4); - -function k4(b) { - return A4.has(b) -} - -function Da(...b) { - const l = { - ...b[0] - }; - for (let _ = 1; _ < b.length; _++) { - const C = b[_]; - if (C) { - for (const L of Object.keys(C)) { - const F = l[L], - T = C[L], - o = typeof F == "function", - $ = typeof T == "function"; - if (o && k4(L)) { - const W = F, - ie = T; - l[L] = d4(W, ie) - } else if (o && $) l[L] = C4(F, T); - else if (L === "class") { - const W = Sf(F), - ie = Sf(T); - W && ie ? l[L] = Tu(F, T) : W ? l[L] = Tu(F) : ie && (l[L] = Tu(T)) - } else if (L === "style") { - const W = typeof F == "object", - ie = typeof T == "object", - pe = typeof F == "string", - ye = typeof T == "string"; - if (W && ie) l[L] = { - ...F, - ...T - }; - else if (W && ye) { - const X = wd(T); - l[L] = { - ...F, - ...X - } - } else if (pe && ie) { - const X = wd(F); - l[L] = { - ...X, - ...T - } - } else if (pe && ye) { - const X = wd(F), - Se = wd(T); - l[L] = { - ...X, - ...Se - } - } else W ? l[L] = F : ie ? l[L] = T : pe ? l[L] = F : ye && (l[L] = T) - } else l[L] = T !== void 0 ? T : F - } - for (const L of Object.getOwnPropertySymbols(C)) { - const F = l[L], - T = C[L]; - l[L] = T !== void 0 ? T : F - } - } - } - return typeof l.style == "object" && (l.style = cv(l.style).replaceAll(` -`, " ")), l.hidden !== !0 && (l.hidden = void 0, delete l.hidden), l.disabled !== !0 && (l.disabled = void 0, delete l.disabled), l -} -const E4 = typeof window < "u" ? window : void 0; - -function z4(b) { - let l = b.activeElement; - for (; l != null && l.shadowRoot;) { - const _ = l.shadowRoot.activeElement; - if (_ === l) break; - l = _ - } - return l -} -var ic, Lu; -class L4 { - constructor(l = {}) { - br(this, ic); - br(this, Lu); - const { - window: _ = E4, - document: C = _ == null ? void 0 : _.document - } = l; - _ !== void 0 && (Jn(this, ic, C), Jn(this, Lu, zg(L => { - const F = Su(_, "focusin", L), - T = Su(_, "focusout", L); - return () => { - F(), T() - } - }))) - } - get current() { - var l; - return (l = et(this, Lu)) == null || l.call(this), et(this, ic) ? z4(et(this, ic)) : null - } -} -ic = new WeakMap, Lu = new WeakMap; -new L4; -var Du, zs; -class um { - constructor(l) { - br(this, Du); - br(this, zs); - Jn(this, Du, l), Jn(this, zs, Symbol(l)) - } - get key() { - return et(this, zs) - } - exists() { - return Ny(et(this, zs)) - } - get() { - const l = ag(et(this, zs)); - if (l === void 0) throw new Error(`Context "${et(this,Du)}" not found`); - return l - } - getOr(l) { - const _ = ag(et(this, zs)); - return _ === void 0 ? l : _ - } - set(l) { - return jy(et(this, zs), l) - } -} -Du = new WeakMap, zs = new WeakMap; - -function D4(b, l) { - switch (b) { - case "post": - Zr(l); - break; - case "pre": - Hf(l); - break - } -} - -function hv(b, l, _, C = {}) { - const { - lazy: L = !1 - } = C; - let F = !L, - T = Array.isArray(b) ? [] : void 0; - D4(l, () => { - const o = Array.isArray(b) ? b.map(W => W()) : b(); - if (!F) { - F = !0, T = o; - return - } - const $ = Go(() => _(o, T)); - return T = o, $ - }) -} - -function oo(b, l, _) { - hv(b, "post", l, _) -} - -function R4(b, l, _) { - hv(b, "pre", l, _) -} -oo.pre = R4; -var nc; -class B4 { - constructor(l, _) { - br(this, nc, nt(void 0)); - _ !== void 0 && oe(et(this, nc), _, !0), oo(() => l(), (C, L) => { - oe(et(this, nc), L, !0) - }) - } - get current() { - return x(et(this, nc)) - } -} -nc = new WeakMap; - -function F4(b, l) { - return setTimeout(l, b) -} - -function Wl(b) { - Mg().then(b) -} -const O4 = 1, - N4 = 9, - j4 = 11; - -function q4(b) { - return mh(b) && b.nodeType === O4 && typeof b.nodeName == "string" -} - -function dv(b) { - return mh(b) && b.nodeType === N4 -} - -function V4(b) { - var l; - return mh(b) && ((l = b.constructor) == null ? void 0 : l.name) === "VisualViewport" -} - -function U4(b) { - return mh(b) && b.nodeType !== void 0 -} - -function Z4(b) { - return U4(b) && b.nodeType === j4 && "host" in b -} - -function $4(b) { - return dv(b) ? b : V4(b) ? b.document : (b == null ? void 0 : b.ownerDocument) ?? document -} - -function pv(b) { - var l; - return Z4(b) ? pv(b.host) : dv(b) ? b.defaultView ?? window : q4(b) ? ((l = b.ownerDocument) == null ? void 0 : l.defaultView) ?? window : window -} - -function G4(b) { - let l = b.activeElement; - for (; l != null && l.shadowRoot;) { - const _ = l.shadowRoot.activeElement; - if (_ === l) break; - l = _ - } - return l -} -var Ru; -class H4 { - constructor(l) { - lr(this, "element"); - br(this, Ru, lt(() => this.element.current ? this.element.current.getRootNode() ?? document : document)); - lr(this, "getDocument", () => $4(this.root)); - lr(this, "getWindow", () => this.getDocument().defaultView ?? window); - lr(this, "getActiveElement", () => G4(this.root)); - lr(this, "isActiveElement", l => l === this.getActiveElement()); - lr(this, "querySelector", l => this.root ? this.root.querySelector(l) : null); - lr(this, "querySelectorAll", l => this.root ? this.root.querySelectorAll(l) : []); - lr(this, "setTimeout", (l, _) => this.getWindow().setTimeout(l, _)); - lr(this, "clearTimeout", l => this.getWindow().clearTimeout(l)); - typeof l == "function" ? this.element = cr.with(l) : this.element = l - } - get root() { - return x(et(this, Ru)) - } - set root(l) { - oe(et(this, Ru), l) - } - getElementById(l) { - return this.root.getElementById(l) - } -} -Ru = new WeakMap; - -function Va(b, l) { - return { - [Mx()]: _ => cr.isBox(b) ? (b.current = _, Go(() => l == null ? void 0 : l(_)), () => { - "isConnected" in _ && _.isConnected || (b.current = null, l == null || l(null)) - }) : (b(_), Go(() => l == null ? void 0 : l(_)), () => { - "isConnected" in _ && _.isConnected || (b(null), l == null || l(null)) - }) - } -} - -function W4(b) { - return b ? "true" : "false" -} - -function X4(b) { - return b ? "true" : "false" -} - -function K4(b) { - return b ? "" : void 0 -} - -function Y4(b) { - return b ? "true" : "false" -} - -function J4(b) { - return b ? "" : void 0 -} - -function Q4(b) { - return b ? !0 : void 0 -} -var ac, Bu; -class e6 { - constructor(l) { - br(this, ac); - br(this, Bu); - lr(this, "attrs"); - Jn(this, ac, l.getVariant ? l.getVariant() : null), Jn(this, Bu, et(this, ac) ? `data-${et(this,ac)}-` : `data-${l.component}-`), this.getAttr = this.getAttr.bind(this), this.selector = this.selector.bind(this), this.attrs = Object.fromEntries(l.parts.map(_ => [_, this.getAttr(_)])) - } - getAttr(l, _) { - return _ ? `data-${_}-${l}` : `${et(this,Bu)}${l}` - } - selector(l, _) { - return `[${this.getAttr(l,_)}]` - } -} -ac = new WeakMap, Bu = new WeakMap; - -function fv(b) { - const l = new e6(b); - return { - ...l.attrs, - selector: l.selector, - getAttr: l.getAttr - } -} -const t6 = "ArrowDown", - r6 = "ArrowLeft", - i6 = "ArrowRight", - n6 = "ArrowUp", - a6 = "End", - s6 = "Enter", - o6 = "Home", - l6 = "p", - c6 = "n", - u6 = "j", - h6 = "k", - d6 = "h", - p6 = "l"; - -function Mu() {} - -function Ua(b, l) { - return `bits-${b}` -} - -function f6(b) { - if (!b) return null; - for (const l of b.childNodes) - if (l.nodeType !== Node.COMMENT_NODE) return l; - return null -} -globalThis.bitsIdCounter ?? (globalThis.bitsIdCounter = { - current: 0 -}); - -function m6(b = "bits") { - return globalThis.bitsIdCounter.current++, `${b}-${globalThis.bitsIdCounter.current}` -} - -function _6(b, l) { - let _ = b.nextElementSibling; - for (; _;) { - if (_.matches(l)) return _; - _ = _.nextElementSibling - } -} - -function g6(b, l) { - let _ = b.previousElementSibling; - for (; _;) { - if (_.matches(l)) return _; - _ = _.previousElementSibling - } -} - -function mv(b) { - if (typeof CSS < "u" && typeof CSS.escape == "function") return CSS.escape(b); - const l = b.length; - let _ = -1, - C, L = ""; - const F = b.charCodeAt(0); - if (l === 1 && F === 45) return "\\" + b; - for (; ++_ < l;) { - if (C = b.charCodeAt(_), C === 0) { - L += "�"; - continue - } - if (C >= 1 && C <= 31 || C === 127 || _ === 0 && C >= 48 && C <= 57 || _ === 1 && C >= 48 && C <= 57 && F === 45) { - L += "\\" + C.toString(16) + " "; - continue - } - if (C >= 128 || C === 45 || C === 95 || C >= 48 && C <= 57 || C >= 65 && C <= 90 || C >= 97 && C <= 122) { - L += b.charAt(_); - continue - } - L += "\\" + b.charAt(_) - } - return L -} -const Uo = "data-value", - ma = fv({ - component: "command", - parts: ["root", "list", "input", "separator", "loading", "empty", "group", "group-items", "group-heading", "item", "viewport", "input-label"] - }), - Xl = ma.selector("group"), - df = ma.selector("group-items"), - vg = ma.selector("group-heading"), - _v = ma.selector("item"), - pf = `${ma.selector("item")}:not([aria-disabled="true"])`, - Xo = new um("Command.Root"), - v6 = new um("Command.List"), - Au = new um("Command.Group"), - yg = { - search: "", - value: "", - filtered: { - count: 0, - items: new Map, - groups: new Set - } - }; -var sc, Fu, Ou, Nu, ju, qu, Vu, Uu, ir, gv, Md, If, Ad, kd, Ed, no, vv, yv, Mf, yu, Af, kf, xv, xu, Ef, zf, bv, bu, wu, Zu; -const pm = class pm { - constructor(l) { - br(this, ir); - lr(this, "opts"); - lr(this, "attachment"); - br(this, sc, !1); - br(this, Fu, !0); - lr(this, "sortAfterTick", !1); - lr(this, "sortAndFilterAfterTick", !1); - lr(this, "allItems", new Set); - lr(this, "allGroups", new Map); - lr(this, "allIds", new Map); - br(this, Ou, nt(0)); - br(this, Nu, nt(null)); - br(this, ju, nt(null)); - br(this, qu, nt(null)); - br(this, Vu, nt(yg)); - br(this, Uu, nt(zn(yg))); - br(this, Zu, lt(() => ({ - id: this.opts.id.current, - role: "application", - [ma.root]: "", - tabindex: -1, - onkeydown: this.onkeydown, - ...this.attachment - }))); - this.opts = l, this.attachment = Va(this.opts.ref); - const _ = { - ...this._commandState, - value: this.opts.value.current ?? "" - }; - this._commandState = _, this.commandState = _, this.onkeydown = this.onkeydown.bind(this) - } - static create(l) { - return Xo.set(new pm(l)) - } - get key() { - return x(et(this, Ou)) - } - set key(l) { - oe(et(this, Ou), l, !0) - } - get viewportNode() { - return x(et(this, Nu)) - } - set viewportNode(l) { - oe(et(this, Nu), l, !0) - } - get inputNode() { - return x(et(this, ju)) - } - set inputNode(l) { - oe(et(this, ju), l, !0) - } - get labelNode() { - return x(et(this, qu)) - } - set labelNode(l) { - oe(et(this, qu), l, !0) - } - get commandState() { - return x(et(this, Vu)) - } - set commandState(l) { - oe(et(this, Vu), l) - } - get _commandState() { - return x(et(this, Uu)) - } - set _commandState(l) { - oe(et(this, Uu), l, !0) - } - setState(l, _, C) { - Object.is(this._commandState[l], _) || (this._commandState[l] = _, l === "search" ? (Fr(this, ir, Ed).call(this), Fr(this, ir, Ad).call(this)) : l === "value" && (C || Fr(this, ir, vv).call(this)), Fr(this, ir, Md).call(this)) - } - setValue(l, _) { - l !== this.opts.value.current && l === "" && Wl(() => { - this.key++ - }), this.setState("value", l, _), this.opts.value.current = l - } - getValidItems() { - const l = this.opts.ref.current; - return l ? Array.from(l.querySelectorAll(pf)).filter(C => !!C) : [] - } - getVisibleItems() { - const l = this.opts.ref.current; - return l ? Array.from(l.querySelectorAll(_v)).filter(C => !!C) : [] - } - get itemsGrid() { - var o, $, W, ie; - if (!this.isGrid) return []; - const l = this.opts.columns.current ?? 1, - _ = this.getVisibleItems(), - C = [ - [] - ]; - let L = (o = _[0]) == null ? void 0 : o.getAttribute("data-group"), - F = 0, - T = 0; - for (let pe = 0; pe < _.length; pe++) { - const ye = _[pe], - X = ye == null ? void 0 : ye.getAttribute("data-group"); - L !== X ? (L = X, F = 1, T++, C.push([{ - index: pe, - firstRowOfGroup: !0, - ref: ye - }])) : (F++, F > l && (T++, F = 1, C.push([])), (ie = C[T]) == null || ie.push({ - index: pe, - firstRowOfGroup: ((W = ($ = C[T]) == null ? void 0 : $[0]) == null ? void 0 : W.firstRowOfGroup) ?? pe === 0, - ref: ye - })) - } - return C - } - updateSelectedToIndex(l) { - const _ = this.getValidItems()[l]; - _ && this.setValue(_.getAttribute(Uo) ?? "") - } - updateSelectedByItem(l) { - const _ = Fr(this, ir, no).call(this), - C = this.getValidItems(), - L = C.findIndex(T => T === _); - let F = C[L + l]; - this.opts.loop.current && (F = L + l < 0 ? C[C.length - 1] : L + l === C.length ? C[0] : C[L + l]), F && this.setValue(F.getAttribute(Uo) ?? "") - } - updateSelectedByGroup(l) { - const _ = Fr(this, ir, no).call(this); - let C = _ == null ? void 0 : _.closest(Xl), - L; - for (; C && !L;) C = l > 0 ? _6(C, Xl) : g6(C, Xl), L = C == null ? void 0 : C.querySelector(pf); - L ? this.setValue(L.getAttribute(Uo) ?? "") : this.updateSelectedByItem(l) - } - registerValue(l, _) { - var C; - return l && l === ((C = this.allIds.get(l)) == null ? void 0 : C.value) || this.allIds.set(l, { - value: l, - keywords: _ - }), this._commandState.filtered.items.set(l, Fr(this, ir, If).call(this, l, _)), this.sortAfterTick || (this.sortAfterTick = !0, Wl(() => { - Fr(this, ir, Ad).call(this), this.sortAfterTick = !1 - })), () => { - this.allIds.delete(l) - } - } - registerItem(l, _) { - return this.allItems.add(l), _ && (this.allGroups.has(_) ? this.allGroups.get(_).add(l) : this.allGroups.set(_, new Set([l]))), this.sortAndFilterAfterTick || (this.sortAndFilterAfterTick = !0, Wl(() => { - Fr(this, ir, Ed).call(this), Fr(this, ir, Ad).call(this), this.sortAndFilterAfterTick = !1 - })), Fr(this, ir, Md).call(this), () => { - const C = Fr(this, ir, no).call(this); - this.allIds.delete(l), this.allItems.delete(l), this.commandState.filtered.items.delete(l), Fr(this, ir, Ed).call(this), (C == null ? void 0 : C.getAttribute("id")) === l && Fr(this, ir, kd).call(this), Fr(this, ir, Md).call(this) - } - } - registerGroup(l) { - return this.allGroups.has(l) || this.allGroups.set(l, new Set), () => { - this.allIds.delete(l), this.allGroups.delete(l) - } - } - get isGrid() { - return this.opts.columns.current !== null - } - onkeydown(l) { - const _ = this.opts.vimBindings.current && l.ctrlKey; - switch (l.key) { - case c6: - case u6: { - _ && (this.isGrid ? Fr(this, ir, Af).call(this, l) : Fr(this, ir, yu).call(this, l)); - break - } - case p6: { - _ && this.isGrid && Fr(this, ir, yu).call(this, l); - break - } - case t6: - this.isGrid ? Fr(this, ir, Af).call(this, l) : Fr(this, ir, yu).call(this, l); - break; - case i6: - if (!this.isGrid) break; - Fr(this, ir, yu).call(this, l); - break; - case l6: - case h6: { - _ && (this.isGrid ? Fr(this, ir, zf).call(this, l) : Fr(this, ir, wu).call(this, l)); - break - } - case d6: { - _ && this.isGrid && Fr(this, ir, wu).call(this, l); - break - } - case n6: - this.isGrid ? Fr(this, ir, zf).call(this, l) : Fr(this, ir, wu).call(this, l); - break; - case r6: - if (!this.isGrid) break; - Fr(this, ir, wu).call(this, l); - break; - case o6: - l.preventDefault(), this.updateSelectedToIndex(0); - break; - case a6: - l.preventDefault(), Fr(this, ir, Mf).call(this); - break; - case s6: - if (!l.isComposing && l.keyCode !== 229) { - l.preventDefault(); - const C = Fr(this, ir, no).call(this); - C && (C == null || C.click()) - } - } - } - get props() { - return x(et(this, Zu)) - } - set props(l) { - oe(et(this, Zu), l) - } -}; -sc = new WeakMap, Fu = new WeakMap, Ou = new WeakMap, Nu = new WeakMap, ju = new WeakMap, qu = new WeakMap, Vu = new WeakMap, Uu = new WeakMap, ir = new WeakSet, gv = function() { - return Ix(this._commandState) -}, Md = function() { - et(this, sc) || (Jn(this, sc, !0), Wl(() => { - var C, L; - Jn(this, sc, !1); - const l = Fr(this, ir, gv).call(this); - !Object.is(this.commandState, l) && (this.commandState = l, (L = (C = this.opts.onStateChange) == null ? void 0 : C.current) == null || L.call(C, l)) - })) -}, If = function(l, _) { - const C = this.opts.filter.current ?? Cv; - return l ? C(l, this._commandState.search, _) : 0 -}, Ad = function() { - var T; - if (!this._commandState.search || this.opts.shouldFilter.current === !1) { - Fr(this, ir, kd).call(this); - return - } - const l = this._commandState.filtered.items, - _ = []; - for (const o of this._commandState.filtered.groups) { - const $ = this.allGroups.get(o); - let W = 0; - if (!$) { - _.push([o, W]); - continue - } - for (const ie of $) { - const pe = l.get(ie); - W = Math.max(pe ?? 0, W) - } - _.push([o, W]) - } - const C = this.viewportNode, - L = this.getValidItems().sort((o, $) => { - const W = o.getAttribute("data-value"), - ie = $.getAttribute("data-value"), - pe = l.get(W) ?? 0; - return (l.get(ie) ?? 0) - pe - }); - for (const o of L) { - const $ = o.closest(df); - if ($) { - const W = o.parentElement === $ ? o : o.closest(`${df} > *`); - W && $.appendChild(W) - } else { - const W = o.parentElement === C ? o : o.closest(`${df} > *`); - W && (C == null || C.appendChild(W)) - } - } - const F = _.sort((o, $) => $[1] - o[1]); - for (const o of F) { - const $ = C == null ? void 0 : C.querySelector(`${Xl}[${Uo}="${mv(o[0])}"]`); - (T = $ == null ? void 0 : $.parentElement) == null || T.appendChild($) - } - Fr(this, ir, kd).call(this) -}, kd = function() { - Wl(() => { - const l = this.getValidItems().find(L => L.getAttribute("aria-disabled") !== "true"), - _ = l == null ? void 0 : l.getAttribute(Uo), - C = et(this, Fu) && this.opts.disableInitialScroll.current; - this.setValue(_ ?? "", C), Jn(this, Fu, !1) - }) -}, Ed = function() { - var _, C; - if (!this._commandState.search || this.opts.shouldFilter.current === !1) { - this._commandState.filtered.count = this.allItems.size; - return - } - this._commandState.filtered.groups = new Set; - let l = 0; - for (const L of this.allItems) { - const F = ((_ = this.allIds.get(L)) == null ? void 0 : _.value) ?? "", - T = ((C = this.allIds.get(L)) == null ? void 0 : C.keywords) ?? [], - o = Fr(this, ir, If).call(this, F, T); - this._commandState.filtered.items.set(L, o), o > 0 && l++ - } - for (const [L, F] of this.allGroups) - for (const T of F) { - const o = this._commandState.filtered.items.get(T); - if (o && o > 0) { - this._commandState.filtered.groups.add(L); - break - } - } - this._commandState.filtered.count = l -}, no = function() { - const l = this.opts.ref.current; - if (!l) return; - const _ = l.querySelector(`${pf}[data-selected]`); - if (_) return _ -}, vv = function() { - Wl(() => { - var C, L, F, T, o; - const l = Fr(this, ir, no).call(this); - if (!l) return; - const _ = (C = l.parentElement) == null ? void 0 : C.parentElement; - if (_) { - if (this.isGrid) { - const $ = Fr(this, ir, yv).call(this, l); - if (l.scrollIntoView({ - block: "nearest" - }), $) { - const W = (L = l == null ? void 0 : l.closest(Xl)) == null ? void 0 : L.querySelector(vg); - W == null || W.scrollIntoView({ - block: "nearest" - }); - return - } - } else { - const $ = f6(_); - if ($ && ((F = $.dataset) == null ? void 0 : F.value) === ((T = l.dataset) == null ? void 0 : T.value)) { - const W = (o = l == null ? void 0 : l.closest(Xl)) == null ? void 0 : o.querySelector(vg); - W == null || W.scrollIntoView({ - block: "nearest" - }); - return - } - } - l.scrollIntoView({ - block: "nearest" - }) - } - }) -}, yv = function(l) { - const _ = this.itemsGrid; - if (_.length === 0) return !1; - for (let C = 0; C < _.length; C++) { - const L = _[C]; - if (L !== void 0) - for (let F = 0; F < L.length; F++) { - const T = L[F]; - if (!(T === void 0 || T.ref !== l)) return T.firstRowOfGroup - } - } - return !1 -}, Mf = function() { - return this.updateSelectedToIndex(this.getValidItems().length - 1) -}, yu = function(l) { - l.preventDefault(), l.metaKey ? Fr(this, ir, Mf).call(this) : l.altKey ? this.updateSelectedByGroup(1) : this.updateSelectedByItem(1) -}, Af = function(l) { - this.opts.columns.current !== null && (l.preventDefault(), l.metaKey ? this.updateSelectedByGroup(1) : this.updateSelectedByItem(Fr(this, ir, xv).call(this, l))) -}, kf = function(l, _) { - if (_.length === 0) return null; - for (let C = 0; C < _.length; C++) { - const L = _[C]; - if (L !== void 0) - for (let F = 0; F < L.length; F++) { - const T = L[F]; - if (!(T === void 0 || T.ref !== l)) return { - columnIndex: F, - rowIndex: C - } - } - } - return null -}, xv = function(l) { - const _ = this.itemsGrid, - C = Fr(this, ir, no).call(this); - if (!C) return 0; - const L = Fr(this, ir, kf).call(this, C, _); - if (!L) return 0; - let F = null; - const T = l.altKey ? 1 : 0; - if (l.altKey && L.rowIndex === _.length - 2 && !this.opts.loop.current) F = Fr(this, ir, xu).call(this, { - start: _.length - 1, - end: _.length, - expectedColumnIndex: L.columnIndex, - grid: _ - }); - else if (L.rowIndex === _.length - 1) { - if (!this.opts.loop.current) return 0; - F = Fr(this, ir, xu).call(this, { - start: 0 + T, - end: L.rowIndex, - expectedColumnIndex: L.columnIndex, - grid: _ - }) - } else F = Fr(this, ir, xu).call(this, { - start: L.rowIndex + 1 + T, - end: _.length, - expectedColumnIndex: L.columnIndex, - grid: _ - }), F === null && this.opts.loop.current && (F = Fr(this, ir, xu).call(this, { - start: 0, - end: L.rowIndex, - expectedColumnIndex: L.columnIndex, - grid: _ - })); - return Fr(this, ir, Ef).call(this, C, F) -}, xu = function({ - start: l, - end: _, - grid: C, - expectedColumnIndex: L -}) { - var T; - let F = null; - for (let o = l; o < _; o++) { - const $ = C[o]; - if (F = ((T = $[L]) == null ? void 0 : T.ref) ?? null, F !== null && Td(F)) { - F = null; - continue - } - if (F === null) - for (let W = $.length - 1; W >= 0; W--) { - const ie = $[$.length - 1]; - if (!(ie === void 0 || Td(ie.ref))) { - F = ie.ref; - break - } - } - break - } - return F -}, Ef = function(l, _) { - if (_ === null) return 0; - const C = this.getValidItems(), - L = C.findIndex(T => T === l); - return C.findIndex(T => T === _) - L -}, zf = function(l) { - this.opts.columns.current !== null && (l.preventDefault(), l.metaKey ? this.updateSelectedByGroup(-1) : this.updateSelectedByItem(Fr(this, ir, bv).call(this, l))) -}, bv = function(l) { - const _ = this.itemsGrid, - C = Fr(this, ir, no).call(this); - if (C === void 0) return 0; - const L = Fr(this, ir, kf).call(this, C, _); - if (L === null) return 0; - let F = null; - const T = l.altKey ? 1 : 0; - if (l.altKey && L.rowIndex === 1 && this.opts.loop.current === !1) F = Fr(this, ir, bu).call(this, { - start: 0, - end: 0, - expectedColumnIndex: L.columnIndex, - grid: _ - }); - else if (L.rowIndex === 0) { - if (this.opts.loop.current === !1) return 0; - F = Fr(this, ir, bu).call(this, { - start: _.length - 1 - T, - end: L.rowIndex + 1, - expectedColumnIndex: L.columnIndex, - grid: _ - }) - } else F = Fr(this, ir, bu).call(this, { - start: L.rowIndex - 1 - T, - end: 0, - expectedColumnIndex: L.columnIndex, - grid: _ - }), F === null && this.opts.loop.current && (F = Fr(this, ir, bu).call(this, { - start: _.length - 1, - end: L.rowIndex + 1, - expectedColumnIndex: L.columnIndex, - grid: _ - })); - return Fr(this, ir, Ef).call(this, C, F) -}, bu = function({ - start: l, - end: _, - grid: C, - expectedColumnIndex: L -}) { - var T; - let F = null; - for (let o = l; o >= _; o--) { - const $ = C[o]; - if ($ !== void 0) { - if (F = ((T = $[L]) == null ? void 0 : T.ref) ?? null, F !== null && Td(F)) { - F = null; - continue - } - if (F === null) - for (let W = $.length - 1; W >= 0; W--) { - const ie = $[$.length - 1]; - if (!(ie === void 0 || Td(ie.ref))) { - F = ie.ref; - break - } - } - break - } - } - return F -}, wu = function(l) { - l.preventDefault(), l.metaKey ? this.updateSelectedToIndex(0) : l.altKey ? this.updateSelectedByGroup(-1) : this.updateSelectedByItem(-1) -}, Zu = new WeakMap; -let Pf = pm; - -function Td(b) { - return b.getAttribute("aria-disabled") === "true" -} -var $u, Gu, Hu; -const fm = class fm { - constructor(l, _) { - lr(this, "opts"); - lr(this, "root"); - lr(this, "attachment"); - br(this, $u, lt(() => this.root._commandState.filtered.count === 0 && et(this, Gu) === !1 || this.opts.forceMount.current)); - br(this, Gu, !0); - br(this, Hu, lt(() => ({ - id: this.opts.id.current, - role: "presentation", - [ma.empty]: "", - ...this.attachment - }))); - this.opts = l, this.root = _, this.attachment = Va(this.opts.ref), Hf(() => { - Jn(this, Gu, !1) - }) - } - static create(l) { - return new fm(l, Xo.get()) - } - get shouldRender() { - return x(et(this, $u)) - } - set shouldRender(l) { - oe(et(this, $u), l) - } - get props() { - return x(et(this, Hu)) - } - set props(l) { - oe(et(this, Hu), l) - } -}; -$u = new WeakMap, Gu = new WeakMap, Hu = new WeakMap; -let Lf = fm; -var Wu, Xu, Ku, Yu; -const mm = class mm { - constructor(l, _) { - lr(this, "opts"); - lr(this, "root"); - lr(this, "attachment"); - br(this, Wu, lt(() => this.opts.forceMount.current || this.root.opts.shouldFilter.current === !1 || !this.root.commandState.search ? !0 : this.root._commandState.filtered.groups.has(this.trueValue))); - br(this, Xu, nt(null)); - br(this, Ku, nt("")); - br(this, Yu, lt(() => ({ - id: this.opts.id.current, - role: "presentation", - hidden: this.shouldRender ? void 0 : !0, - "data-value": this.trueValue, - [ma.group]: "", - ...this.attachment - }))); - this.opts = l, this.root = _, this.attachment = Va(this.opts.ref), this.trueValue = l.value.current ?? l.id.current, oo(() => this.trueValue, () => this.root.registerGroup(this.trueValue)), Zr(() => this.opts.value.current ? (this.trueValue = this.opts.value.current, this.root.registerValue(this.opts.value.current)) : this.headingNode && this.headingNode.textContent ? (this.trueValue = this.headingNode.textContent.trim().toLowerCase(), this.root.registerValue(this.trueValue)) : (this.trueValue = `-----${this.opts.id.current}`, this.root.registerValue(this.trueValue))) - } - static create(l) { - return Au.set(new mm(l, Xo.get())) - } - get shouldRender() { - return x(et(this, Wu)) - } - set shouldRender(l) { - oe(et(this, Wu), l) - } - get headingNode() { - return x(et(this, Xu)) - } - set headingNode(l) { - oe(et(this, Xu), l, !0) - } - get trueValue() { - return x(et(this, Ku)) - } - set trueValue(l) { - oe(et(this, Ku), l, !0) - } - get props() { - return x(et(this, Yu)) - } - set props(l) { - oe(et(this, Yu), l) - } -}; -Wu = new WeakMap, Xu = new WeakMap, Ku = new WeakMap, Yu = new WeakMap; -let Df = mm; -var Ju; -const _m = class _m { - constructor(l, _) { - lr(this, "opts"); - lr(this, "group"); - lr(this, "attachment"); - br(this, Ju, lt(() => ({ - id: this.opts.id.current, - [ma["group-heading"]]: "", - ...this.attachment - }))); - this.opts = l, this.group = _, this.attachment = Va(this.opts.ref, C => this.group.headingNode = C) - } - static create(l) { - return new _m(l, Au.get()) - } - get props() { - return x(et(this, Ju)) - } - set props(l) { - oe(et(this, Ju), l) - } -}; -Ju = new WeakMap; -let Rf = _m; -var Qu; -const gm = class gm { - constructor(l, _) { - lr(this, "opts"); - lr(this, "group"); - lr(this, "attachment"); - br(this, Qu, lt(() => { - var l; - return { - id: this.opts.id.current, - role: "group", - [ma["group-items"]]: "", - "aria-labelledby": ((l = this.group.headingNode) == null ? void 0 : l.id) ?? void 0, - ...this.attachment - } - })); - this.opts = l, this.group = _, this.attachment = Va(this.opts.ref) - } - static create(l) { - return new gm(l, Au.get()) - } - get props() { - return x(et(this, Qu)) - } - set props(l) { - oe(et(this, Qu), l) - } -}; -Qu = new WeakMap; -let Bf = gm; -var Dd, eh; -const vm = class vm { - constructor(l, _) { - lr(this, "opts"); - lr(this, "root"); - lr(this, "attachment"); - br(this, Dd, lt(() => { - var _; - const l = (_ = this.root.viewportNode) == null ? void 0 : _.querySelector(`${_v}[${Uo}="${mv(this.root.opts.value.current)}"]`); - if (l != null) return l.getAttribute("id") ?? void 0 - })); - br(this, eh, lt(() => { - var l, _; - return { - id: this.opts.id.current, - type: "text", - [ma.input]: "", - autocomplete: "off", - autocorrect: "off", - spellcheck: !1, - "aria-autocomplete": "list", - role: "combobox", - "aria-expanded": X4(!0), - "aria-controls": ((l = this.root.viewportNode) == null ? void 0 : l.id) ?? void 0, - "aria-labelledby": ((_ = this.root.labelNode) == null ? void 0 : _.id) ?? void 0, - "aria-activedescendant": x(et(this, Dd)), - ...this.attachment - } - })); - this.opts = l, this.root = _, this.attachment = Va(this.opts.ref, C => this.root.inputNode = C), oo(() => this.opts.ref.current, () => { - const C = this.opts.ref.current; - C && this.opts.autofocus.current && F4(10, () => C.focus()) - }), oo(() => this.opts.value.current, () => { - this.root.commandState.search !== this.opts.value.current && this.root.setState("search", this.opts.value.current) - }) - } - static create(l) { - return new vm(l, Xo.get()) - } - get props() { - return x(et(this, eh)) - } - set props(l) { - oe(et(this, eh), l) - } -}; -Dd = new WeakMap, eh = new WeakMap; -let Ff = vm; -var ao, Rd, th, rh, ih, Wo, wv, Nf, nh; -const ym = class ym { - constructor(l, _) { - br(this, Wo); - lr(this, "opts"); - lr(this, "root"); - lr(this, "attachment"); - br(this, ao, null); - br(this, Rd, lt(() => { - var l; - return this.opts.forceMount.current || ((l = et(this, ao)) == null ? void 0 : l.opts.forceMount.current) === !0 - })); - br(this, th, lt(() => { - if (this.opts.ref.current, x(et(this, Rd)) || this.root.opts.shouldFilter.current === !1 || !this.root.commandState.search) return !0; - const l = this.root.commandState.filtered.items.get(this.trueValue); - return l === void 0 ? !1 : l > 0 - })); - br(this, rh, lt(() => this.root.opts.value.current === this.trueValue && this.trueValue !== "")); - br(this, ih, nt("")); - br(this, nh, lt(() => { - var l; - return { - id: this.opts.id.current, - "aria-disabled": W4(this.opts.disabled.current), - "aria-selected": Y4(this.isSelected), - "data-disabled": K4(this.opts.disabled.current), - "data-selected": J4(this.isSelected), - "data-value": this.trueValue, - "data-group": (l = et(this, ao)) == null ? void 0 : l.trueValue, - [ma.item]: "", - role: "option", - onpointermove: this.onpointermove, - onclick: this.onclick, - ...this.attachment - } - })); - this.opts = l, this.root = _, Jn(this, ao, Au.getOr(null)), this.trueValue = l.value.current, this.attachment = Va(this.opts.ref), oo([() => this.trueValue, () => { - var C; - return (C = et(this, ao)) == null ? void 0 : C.trueValue - }, () => this.opts.forceMount.current], () => { - var C; - if (!this.opts.forceMount.current) return this.root.registerItem(this.trueValue, (C = et(this, ao)) == null ? void 0 : C.trueValue) - }), oo([() => this.opts.value.current, () => this.opts.ref.current], () => { - var C, L; - !this.opts.value.current && ((C = this.opts.ref.current) != null && C.textContent) && (this.trueValue = this.opts.ref.current.textContent.trim()), this.root.registerValue(this.trueValue, l.keywords.current.map(F => F.trim())), (L = this.opts.ref.current) == null || L.setAttribute(Uo, this.trueValue) - }), this.onclick = this.onclick.bind(this), this.onpointermove = this.onpointermove.bind(this) - } - static create(l) { - const _ = Au.getOr(null); - return new ym({ - ...l, - group: _ - }, Xo.get()) - } - get shouldRender() { - return x(et(this, th)) - } - set shouldRender(l) { - oe(et(this, th), l) - } - get isSelected() { - return x(et(this, rh)) - } - set isSelected(l) { - oe(et(this, rh), l) - } - get trueValue() { - return x(et(this, ih)) - } - set trueValue(l) { - oe(et(this, ih), l, !0) - } - onpointermove(l) { - this.opts.disabled.current || this.root.opts.disablePointerSelection.current || Fr(this, Wo, Nf).call(this) - } - onclick(l) { - this.opts.disabled.current || Fr(this, Wo, wv).call(this) - } - get props() { - return x(et(this, nh)) - } - set props(l) { - oe(et(this, nh), l) - } -}; -ao = new WeakMap, Rd = new WeakMap, th = new WeakMap, rh = new WeakMap, ih = new WeakMap, Wo = new WeakSet, wv = function() { - var l; - this.opts.disabled.current || (Fr(this, Wo, Nf).call(this), (l = this.opts.onSelect) == null || l.current()) -}, Nf = function() { - this.opts.disabled.current || this.root.setValue(this.trueValue, !0) -}, nh = new WeakMap; -let Of = ym; -var ah; -const xm = class xm { - constructor(l, _) { - lr(this, "opts"); - lr(this, "root"); - lr(this, "attachment"); - br(this, ah, lt(() => ({ - id: this.opts.id.current, - role: "listbox", - "aria-label": this.opts.ariaLabel.current, - [ma.list]: "", - ...this.attachment - }))); - this.opts = l, this.root = _, this.attachment = Va(this.opts.ref) - } - static create(l) { - return v6.set(new xm(l, Xo.get())) - } - get props() { - return x(et(this, ah)) - } - set props(l) { - oe(et(this, ah), l) - } -}; -ah = new WeakMap; -let jf = xm; -var sh; -const bm = class bm { - constructor(l, _) { - lr(this, "opts"); - lr(this, "root"); - lr(this, "attachment"); - br(this, sh, lt(() => { - var l; - return { - id: this.opts.id.current, - [ma["input-label"]]: "", - for: (l = this.opts.for) == null ? void 0 : l.current, - style: uv, - ...this.attachment - } - })); - this.opts = l, this.root = _, this.attachment = Va(this.opts.ref, C => this.root.labelNode = C) - } - static create(l) { - return new bm(l, Xo.get()) - } - get props() { - return x(et(this, sh)) - } - set props(l) { - oe(et(this, sh), l) - } -}; -sh = new WeakMap; -let qf = bm; -var y6 = Ie(""); - -function x6(b, l) { - const _ = ts(); - Sr(l, !0); - let C = Et(l, "id", 19, () => Ua(_)), - L = Et(l, "ref", 15, null), - F = Qt(l, ["$$slots", "$$events", "$$legacy", "id", "ref", "children"]); - const T = qf.create({ - id: cr.with(() => C()), - ref: cr.with(() => L(), ie => L(ie)) - }), - o = lt(() => Da(F, T.props)); - var $ = y6(); - er($, () => ({ - ...x(o) - })); - var W = k($); - Ji(W, () => l.children ?? fa), A($), H(b, $), Pr() -} -var b6 = Ie(" ", 1), - w6 = Ie("
        "); - -function T6(b, l) { - const _ = ts(); - Sr(l, !0); - const C = it => { - x6(it, { - children: (Qe, ke) => { - fi(); - var vt = Fn(); - Ge(() => fe(vt, ye())), H(Qe, vt) - }, - $$slots: { - default: !0 - } - }) - }; - let L = Et(l, "id", 19, () => Ua(_)), - F = Et(l, "ref", 15, null), - T = Et(l, "value", 15, ""), - o = Et(l, "onValueChange", 3, Mu), - $ = Et(l, "onStateChange", 3, Mu), - W = Et(l, "loop", 3, !1), - ie = Et(l, "shouldFilter", 3, !0), - pe = Et(l, "filter", 3, Cv), - ye = Et(l, "label", 3, ""), - X = Et(l, "vimBindings", 3, !0), - Se = Et(l, "disablePointerSelection", 3, !1), - we = Et(l, "disableInitialScroll", 3, !1), - Re = Et(l, "columns", 3, null), - Ae = Qt(l, ["$$slots", "$$events", "$$legacy", "id", "ref", "value", "onValueChange", "onStateChange", "loop", "shouldFilter", "filter", "label", "vimBindings", "disablePointerSelection", "disableInitialScroll", "columns", "children", "child"]); - const Oe = Pf.create({ - id: cr.with(() => L()), - ref: cr.with(() => F(), it => F(it)), - filter: cr.with(() => pe()), - shouldFilter: cr.with(() => ie()), - loop: cr.with(() => W()), - value: cr.with(() => T(), it => { - T() !== it && (T(it), o()(it)) - }), - vimBindings: cr.with(() => X()), - disablePointerSelection: cr.with(() => Se()), - disableInitialScroll: cr.with(() => we()), - onStateChange: cr.with(() => $()), - columns: cr.with(() => Re()) - }), - Ee = it => Oe.updateSelectedToIndex(it), - Ne = it => Oe.updateSelectedByGroup(it), - ft = it => Oe.updateSelectedByItem(it), - ht = () => Oe.getValidItems(), - Xe = lt(() => Da(Ae, Oe.props)); - var ct = Jt(), - Je = zt(ct); - { - var Be = it => { - var Qe = b6(), - ke = zt(Qe); - C(ke); - var vt = V(ke, 2); - Ji(vt, () => l.child, () => ({ - props: x(Xe) - })), H(it, Qe) - }, - st = it => { - var Qe = w6(); - er(Qe, () => ({ - ...x(Xe) - })); - var ke = k(Qe); - C(ke); - var vt = V(ke, 2); - Ji(vt, () => l.children ?? fa), A(Qe), H(it, Qe) - }; - Ue(Je, it => { - l.child ? it(Be) : it(st, !1) - }) - } - return H(b, ct), Pr({ - updateSelectedToIndex: Ee, - updateSelectedByGroup: Ne, - updateSelectedByItem: ft, - getValidItems: ht - }) -} -var C6 = Ie("
        "); - -function S6(b, l) { - const _ = ts(); - Sr(l, !0); - let C = Et(l, "id", 19, () => Ua(_)), - L = Et(l, "ref", 15, null), - F = Et(l, "forceMount", 3, !1), - T = Qt(l, ["$$slots", "$$events", "$$legacy", "id", "ref", "children", "child", "forceMount"]); - const o = Lf.create({ - id: cr.with(() => C()), - ref: cr.with(() => L(), ye => L(ye)), - forceMount: cr.with(() => F()) - }), - $ = lt(() => Da(o.props, T)); - var W = Jt(), - ie = zt(W); - { - var pe = ye => { - var X = Jt(), - Se = zt(X); - { - var we = Ae => { - var Oe = Jt(), - Ee = zt(Oe); - Ji(Ee, () => l.child, () => ({ - props: x($) - })), H(Ae, Oe) - }, - Re = Ae => { - var Oe = C6(); - er(Oe, () => ({ - ...x($) - })); - var Ee = k(Oe); - Ji(Ee, () => l.children ?? fa), A(Oe), H(Ae, Oe) - }; - Ue(Se, Ae => { - l.child ? Ae(we) : Ae(Re, !1) - }) - } - H(ye, X) - }; - Ue(ie, ye => { - o.shouldRender && ye(pe) - }) - } - H(b, W), Pr() -} -var P6 = Ie("
        "); - -function I6(b, l) { - const _ = ts(); - Sr(l, !0); - let C = Et(l, "id", 19, () => Ua(_)), - L = Et(l, "ref", 15, null), - F = Et(l, "value", 3, ""), - T = Et(l, "forceMount", 3, !1), - o = Qt(l, ["$$slots", "$$events", "$$legacy", "id", "ref", "value", "forceMount", "children", "child"]); - const $ = Df.create({ - id: cr.with(() => C()), - ref: cr.with(() => L(), Se => L(Se)), - forceMount: cr.with(() => T()), - value: cr.with(() => F()) - }), - W = lt(() => Da(o, $.props)); - var ie = Jt(), - pe = zt(ie); - { - var ye = Se => { - var we = Jt(), - Re = zt(we); - Ji(Re, () => l.child, () => ({ - props: x(W) - })), H(Se, we) - }, - X = Se => { - var we = P6(); - er(we, () => ({ - ...x(W) - })); - var Re = k(we); - Ji(Re, () => l.children ?? fa), A(we), H(Se, we) - }; - Ue(pe, Se => { - l.child ? Se(ye) : Se(X, !1) - }) - } - H(b, ie), Pr() -} -var M6 = Ie("
        "); - -function A6(b, l) { - const _ = ts(); - Sr(l, !0); - let C = Et(l, "id", 19, () => Ua(_)), - L = Et(l, "ref", 15, null), - F = Qt(l, ["$$slots", "$$events", "$$legacy", "id", "ref", "children", "child"]); - const T = Rf.create({ - id: cr.with(() => C()), - ref: cr.with(() => L(), ye => L(ye)) - }), - o = lt(() => Da(F, T.props)); - var $ = Jt(), - W = zt($); - { - var ie = ye => { - var X = Jt(), - Se = zt(X); - Ji(Se, () => l.child, () => ({ - props: x(o) - })), H(ye, X) - }, - pe = ye => { - var X = M6(); - er(X, () => ({ - ...x(o) - })); - var Se = k(X); - Ji(Se, () => l.children ?? fa), A(X), H(ye, X) - }; - Ue(W, ye => { - l.child ? ye(ie) : ye(pe, !1) - }) - } - H(b, $), Pr() -} -var k6 = Ie("
        "), - E6 = Ie('
        '); - -function z6(b, l) { - const _ = ts(); - Sr(l, !0); - let C = Et(l, "id", 19, () => Ua(_)), - L = Et(l, "ref", 15, null), - F = Qt(l, ["$$slots", "$$events", "$$legacy", "id", "ref", "children", "child"]); - const T = Bf.create({ - id: cr.with(() => C()), - ref: cr.with(() => L(), ye => L(ye)) - }), - o = lt(() => Da(F, T.props)); - var $ = E6(), - W = k($); - { - var ie = ye => { - var X = Jt(), - Se = zt(X); - Ji(Se, () => l.child, () => ({ - props: x(o) - })), H(ye, X) - }, - pe = ye => { - var X = k6(); - er(X, () => ({ - ...x(o) - })); - var Se = k(X); - Ji(Se, () => l.children ?? fa), A(X), H(ye, X) - }; - Ue(W, ye => { - l.child ? ye(ie) : ye(pe, !1) - }) - } - A($), H(b, $), Pr() -} -var L6 = Ie(""); - -function D6(b, l) { - const _ = ts(); - Sr(l, !0); - let C = Et(l, "value", 15, ""), - L = Et(l, "autofocus", 3, !1), - F = Et(l, "id", 19, () => Ua(_)), - T = Et(l, "ref", 15, null), - o = Qt(l, ["$$slots", "$$events", "$$legacy", "value", "autofocus", "id", "ref", "child"]); - const $ = Ff.create({ - id: cr.with(() => F()), - ref: cr.with(() => T(), Se => T(Se)), - value: cr.with(() => C(), Se => { - C(Se) - }), - autofocus: cr.with(() => L() ?? !1) - }), - W = lt(() => Da(o, $.props)); - var ie = Jt(), - pe = zt(ie); - { - var ye = Se => { - var we = Jt(), - Re = zt(we); - Ji(Re, () => l.child, () => ({ - props: x(W) - })), H(Se, we) - }, - X = Se => { - var we = L6(); - ea(we), er(we, () => ({ - ...x(W) - })), jd(we, C), H(Se, we) - }; - Ue(pe, Se => { - l.child ? Se(ye) : Se(X, !1) - }) - } - H(b, ie), Pr() -} -var R6 = Ie("
        "), - B6 = Ie('
        '); - -function F6(b, l) { - const _ = ts(); - Sr(l, !0); - let C = Et(l, "id", 19, () => Ua(_)), - L = Et(l, "ref", 15, null), - F = Et(l, "value", 3, ""), - T = Et(l, "disabled", 3, !1), - o = Et(l, "onSelect", 3, Mu), - $ = Et(l, "forceMount", 3, !1), - W = Et(l, "keywords", 19, () => []), - ie = Qt(l, ["$$slots", "$$events", "$$legacy", "id", "ref", "value", "disabled", "children", "child", "onSelect", "forceMount", "keywords"]); - const pe = Of.create({ - id: cr.with(() => C()), - ref: cr.with(() => L(), we => L(we)), - value: cr.with(() => F()), - disabled: cr.with(() => T()), - onSelect: cr.with(() => o()), - forceMount: cr.with(() => $()), - keywords: cr.with(() => W()) - }), - ye = lt(() => Da(ie, pe.props)); - var X = Jt(), - Se = zt(X); - Pu(Se, () => pe.root.key, we => { - var Re = B6(), - Ae = k(Re); - { - var Oe = Ee => { - var Ne = Jt(), - ft = zt(Ne); - { - var ht = ct => { - var Je = Jt(), - Be = zt(Je); - Ji(Be, () => l.child, () => ({ - props: x(ye) - })), H(ct, Je) - }, - Xe = ct => { - var Je = R6(); - er(Je, () => ({ - ...x(ye) - })); - var Be = k(Je); - Ji(Be, () => l.children ?? fa), A(Je), H(ct, Je) - }; - Ue(ft, ct => { - l.child ? ct(ht) : ct(Xe, !1) - }) - } - H(Ee, Ne) - }; - Ue(Ae, Ee => { - pe.shouldRender && Ee(Oe) - }) - } - A(Re), Ge(() => zr(Re, "data-value", pe.trueValue)), H(we, Re) - }), H(b, X), Pr() -} -var O6 = Ie("
        "); - -function N6(b, l) { - const _ = ts(); - Sr(l, !0); - let C = Et(l, "id", 19, () => Ua(_)), - L = Et(l, "ref", 15, null), - F = Qt(l, ["$$slots", "$$events", "$$legacy", "id", "ref", "child", "children", "aria-label"]); - const T = jf.create({ - id: cr.with(() => C()), - ref: cr.with(() => L(), ie => L(ie)), - ariaLabel: cr.with(() => l["aria-label"] ?? "Suggestions...") - }), - o = lt(() => Da(F, T.props)); - var $ = Jt(), - W = zt($); - Pu(W, () => T.root._commandState.search === "", ie => { - var pe = Jt(), - ye = zt(pe); - { - var X = we => { - var Re = Jt(), - Ae = zt(Re); - Ji(Ae, () => l.child, () => ({ - props: x(o) - })), H(we, Re) - }, - Se = we => { - var Re = O6(); - er(Re, () => ({ - ...x(o) - })); - var Ae = k(Re); - Ji(Ae, () => l.children ?? fa), A(Re), H(we, Re) - }; - Ue(ye, we => { - l.child ? we(X) : we(Se, !1) - }) - } - H(ie, pe) - }), H(b, $), Pr() -} -const xg = 1, - j6 = .9, - q6 = .8, - V6 = .17, - ff = .1, - mf = .999, - U6 = .9999, - Z6 = .99, - $6 = /[\\/_+.#"@[({&]/, - G6 = /[\\/_+.#"@[({&]/g, - H6 = /[\s-]/, - Tv = /[\s-]/g; - -function Vf(b, l, _, C, L, F, T) { - if (F === l.length) return L === b.length ? xg : Z6; - const o = `${L},${F}`; - if (T[o] !== void 0) return T[o]; - const $ = C.charAt(F); - let W = _.indexOf($, L), - ie = 0, - pe, ye, X, Se; - for (; W >= 0;) pe = Vf(b, l, _, C, W + 1, F + 1, T), pe > ie && (W === L ? pe *= xg : $6.test(b.charAt(W - 1)) ? (pe *= q6, X = b.slice(L, W - 1).match(G6), X && L > 0 && (pe *= mf ** X.length)) : H6.test(b.charAt(W - 1)) ? (pe *= j6, Se = b.slice(L, W - 1).match(Tv), Se && L > 0 && (pe *= mf ** Se.length)) : (pe *= V6, L > 0 && (pe *= mf ** (W - L))), b.charAt(W) !== l.charAt(F) && (pe *= U6)), (pe < ff && _.charAt(W - 1) === C.charAt(F + 1) || C.charAt(F + 1) === C.charAt(F) && _.charAt(W - 1) !== C.charAt(F)) && (ye = Vf(b, l, _, C, W + 1, F + 2, T), ye * ff > pe && (pe = ye * ff)), pe > ie && (ie = pe), W = _.indexOf($, W + 1); - return T[o] = ie, ie -} - -function bg(b) { - return b.toLowerCase().replace(Tv, " ") -} - -function Cv(b, l, _) { - return b = _ && _.length > 0 ? `${`${b} ${_==null?void 0:_.join(" ")}`}` : b, Vf(b, l, bg(b), bg(l), 0, 0, {}) -} -const W6 = 18, - Sv = 40, - X6 = `${Sv}px`, - K6 = ["[data-lastpass-icon-root]", "com-1password-button", "[data-dashlanecreated]", '[style$="2147483647 !important;"]'].join(","); - -function Y6({ - containerRef: b, - inputRef: l, - pushPasswordManagerStrategy: _, - isFocused: C, - domContext: L -}) { - let F = nt(!1), - T = nt(!1), - o = nt(!1); - - function $() { - const ie = _.current; - return ie === "none" ? !1 : ie === "increase-width" && x(F) && x(T) - } - - function W() { - const ie = b.current, - pe = l.current; - if (!ie || !pe || x(o) || _.current === "none") return; - const ye = ie, - X = ye.getBoundingClientRect().left + ye.offsetWidth, - Se = ye.getBoundingClientRect().top + ye.offsetHeight / 2, - we = X - W6, - Re = Se; - L.querySelectorAll(K6).length === 0 && L.getDocument().elementFromPoint(we, Re) === ie || (oe(F, !0), oe(o, !0)) - } - return Zr(() => { - const ie = b.current; - if (!ie || _.current === "none") return; - - function pe() { - const Se = pv(ie).innerWidth - ie.getBoundingClientRect().right; - oe(T, Se >= Sv) - } - pe(); - const ye = setInterval(pe, 1e3); - return () => { - clearInterval(ye) - } - }), Zr(() => { - const ie = C.current || L.getActiveElement() === l.current; - if (_.current === "none" || !ie) return; - const pe = setTimeout(W, 0), - ye = setTimeout(W, 2e3), - X = setTimeout(W, 5e3), - Se = setTimeout(() => { - oe(o, !0) - }, 6e3); - return () => { - clearTimeout(pe), clearTimeout(ye), clearTimeout(X), clearTimeout(Se) - } - }), { - get hasPwmBadge() { - return x(F) - }, - get willPushPwmBadge() { - return $() - }, - PWM_BADGE_SPACE_WIDTH: X6 - } -} -const Pv = fv({ - component: "pin-input", - parts: ["root", "cell"] - }), - J6 = ["Backspace", "Delete", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End", "Escape", "Enter", "Tab", "Shift", "Control", "Meta"]; -var ja, oc, Ls, za, qa, lc, hs, Ds, so, cc, Bd, oh, lh, Fd, Od, Iv, ch, uh, Nd, hh; -const wm = class wm { - constructor(l) { - br(this, Od); - lr(this, "opts"); - lr(this, "attachment"); - br(this, ja, cr(null)); - br(this, oc, nt(!1)); - lr(this, "inputAttachment", Va(et(this, ja))); - br(this, Ls, cr(!1)); - br(this, za, nt(null)); - br(this, qa, nt(null)); - br(this, lc, new B4(() => this.opts.value.current ?? "")); - br(this, hs, lt(() => typeof this.opts.pattern.current == "string" ? new RegExp(this.opts.pattern.current) : this.opts.pattern.current)); - br(this, Ds, nt(zn({ - prev: [null, null, "none"], - willSyntheticBlur: !1 - }))); - br(this, so); - br(this, cc); - lr(this, "domContext"); - lr(this, "onkeydown", l => { - const _ = l.key; - J6.includes(_) || l.ctrlKey || l.metaKey || _ && x(et(this, hs)) && !x(et(this, hs)).test(_) && l.preventDefault() - }); - br(this, Bd, lt(() => ({ - position: "relative", - cursor: this.opts.disabled.current ? "default" : "text", - userSelect: "none", - WebkitUserSelect: "none", - pointerEvents: "none" - }))); - br(this, oh, lt(() => ({ - id: this.opts.id.current, - [Pv.root]: "", - style: x(et(this, Bd)), - ...this.attachment - }))); - br(this, lh, lt(() => ({ - style: { - position: "absolute", - inset: 0, - pointerEvents: "none" - } - }))); - br(this, Fd, lt(() => ({ - position: "absolute", - inset: 0, - width: et(this, so).willPushPwmBadge ? `calc(100% + ${et(this,so).PWM_BADGE_SPACE_WIDTH})` : "100%", - clipPath: et(this, so).willPushPwmBadge ? `inset(0 ${et(this,so).PWM_BADGE_SPACE_WIDTH} 0 0)` : void 0, - height: "100%", - display: "flex", - textAlign: this.opts.textAlign.current, - opacity: "1", - color: "transparent", - pointerEvents: "all", - background: "transparent", - caretColor: "transparent", - border: "0 solid transparent", - outline: "0 solid transparent", - boxShadow: "none", - lineHeight: "1", - letterSpacing: "-.5em", - fontSize: "var(--bits-pin-input-root-height)", - fontFamily: "monospace", - fontVariantNumeric: "tabular-nums" - }))); - br(this, ch, () => { - var we; - const l = et(this, ja).current, - _ = this.opts.ref.current; - if (!l || !_) return; - if (this.domContext.getActiveElement() !== l) { - oe(et(this, za), null), oe(et(this, qa), null); - return - } - const C = l.selectionStart, - L = l.selectionEnd, - F = l.selectionDirection ?? "none", - T = l.maxLength, - o = l.value, - $ = x(et(this, Ds)).prev; - let W = -1, - ie = -1, - pe; - if (o.length !== 0 && C !== null && L !== null) { - const Re = C === L, - Ae = C === o.length && o.length < T; - if (Re && !Ae) { - const Oe = C; - if (Oe === 0) W = 0, ie = 1, pe = "forward"; - else if (Oe === T) W = Oe - 1, ie = Oe, pe = "backward"; - else if (T > 1 && o.length > 1) { - let Ee = 0; - if ($[0] !== null && $[1] !== null) { - pe = Oe < $[0] ? "backward" : "forward"; - const Ne = $[0] === $[1] && $[0] < T; - pe === "backward" && !Ne && (Ee = -1) - } - W = Ee - Oe, ie = Ee + Oe + 1 - } - } - W !== -1 && ie !== -1 && W !== ie && ((we = et(this, ja).current) == null || we.setSelectionRange(W, ie, pe)) - } - const ye = W !== -1 ? W : C, - X = ie !== -1 ? ie : L, - Se = pe ?? F; - oe(et(this, za), ye, !0), oe(et(this, qa), X, !0), x(et(this, Ds)).prev = [ye, X, Se] - }); - lr(this, "oninput", l => { - const _ = l.currentTarget.value.slice(0, this.opts.maxLength.current); - if (_.length > 0 && x(et(this, hs)) && !x(et(this, hs)).test(_)) { - l.preventDefault(); - return - } - typeof et(this, lc).current == "string" && _.length < et(this, lc).current.length && this.domContext.getDocument().dispatchEvent(new Event("selectionchange")), this.opts.value.current = _ - }); - lr(this, "onfocus", l => { - const _ = et(this, ja).current; - if (_) { - const C = Math.min(_.value.length, this.opts.maxLength.current - 1), - L = _.value.length; - _.setSelectionRange(C, L), oe(et(this, za), C, !0), oe(et(this, qa), L, !0) - } - et(this, Ls).current = !0 - }); - lr(this, "onpaste", l => { - var ie, pe, ye, X; - const _ = et(this, ja).current; - if (!_) return; - const C = Se => { - const we = _.selectionStart === null ? void 0 : _.selectionStart, - Re = _.selectionEnd === null ? void 0 : _.selectionEnd, - Ae = we !== Re, - Oe = this.opts.value.current; - return (Ae ? Oe.slice(0, we) + Se + Oe.slice(Re) : Oe.slice(0, we) + Se + Oe.slice(we)).slice(0, this.opts.maxLength.current) - }, - L = Se => Se.length > 0 && x(et(this, hs)) && !x(et(this, hs)).test(Se); - if (!((ie = this.opts.pasteTransformer) != null && ie.current) && (!et(this, cc).isIOS || !l.clipboardData || !_)) { - const Se = C((pe = l.clipboardData) == null ? void 0 : pe.getData("text/plain")); - L(Se) && l.preventDefault(); - return - } - const F = ((ye = l.clipboardData) == null ? void 0 : ye.getData("text/plain")) ?? "", - T = (X = this.opts.pasteTransformer) != null && X.current ? this.opts.pasteTransformer.current(F) : F; - l.preventDefault(); - const o = C(T); - if (L(o)) return; - _.value = o, this.opts.value.current = o; - const $ = Math.min(o.length, this.opts.maxLength.current - 1), - W = o.length; - _.setSelectionRange($, W), oe(et(this, za), $, !0), oe(et(this, qa), W, !0) - }); - lr(this, "onmouseover", l => { - oe(et(this, oc), !0) - }); - lr(this, "onmouseleave", l => { - oe(et(this, oc), !1) - }); - lr(this, "onblur", l => { - if (x(et(this, Ds)).willSyntheticBlur) { - x(et(this, Ds)).willSyntheticBlur = !1; - return - } - et(this, Ls).current = !1 - }); - br(this, uh, lt(() => { - var l; - return { - id: this.opts.inputId.current, - style: x(et(this, Fd)), - autocomplete: this.opts.autocomplete.current || "one-time-code", - "data-pin-input-input": "", - "data-pin-input-input-mss": x(et(this, za)), - "data-pin-input-input-mse": x(et(this, qa)), - inputmode: this.opts.inputmode.current, - pattern: (l = x(et(this, hs))) == null ? void 0 : l.source, - maxlength: this.opts.maxLength.current, - value: this.opts.value.current, - disabled: Q4(this.opts.disabled.current), - onpaste: this.onpaste, - oninput: this.oninput, - onkeydown: this.onkeydown, - onmouseover: this.onmouseover, - onmouseleave: this.onmouseleave, - onfocus: this.onfocus, - onblur: this.onblur, - ...this.inputAttachment - } - })); - br(this, Nd, lt(() => Array.from({ - length: this.opts.maxLength.current - }).map((l, _) => { - const C = et(this, Ls).current && x(et(this, za)) !== null && x(et(this, qa)) !== null && (x(et(this, za)) === x(et(this, qa)) && _ === x(et(this, za)) || _ >= x(et(this, za)) && _ < x(et(this, qa))), - L = this.opts.value.current[_] !== void 0 ? this.opts.value.current[_] : null; - return { - char: L, - isActive: C, - hasFakeCaret: C && L === null - } - }))); - br(this, hh, lt(() => ({ - cells: x(et(this, Nd)), - isFocused: et(this, Ls).current, - isHovering: x(et(this, oc)) - }))); - var _; - this.opts = l, this.attachment = Va(this.opts.ref), this.domContext = new H4(l.ref), Jn(this, cc, { - value: this.opts.value, - isIOS: typeof window < "u" && ((_ = window == null ? void 0 : window.CSS) == null ? void 0 : _.supports("-webkit-touch-callout", "none")) - }), Jn(this, so, Y6({ - containerRef: this.opts.ref, - inputRef: et(this, ja), - isFocused: et(this, Ls), - pushPasswordManagerStrategy: this.opts.pushPasswordManagerStrategy, - domContext: this.domContext - })), Ii(() => { - const C = et(this, ja).current, - L = this.opts.ref.current; - if (!C || !L) return; - et(this, cc).value.current !== C.value && (this.opts.value.current = C.value), x(et(this, Ds)).prev = [C.selectionStart, C.selectionEnd, C.selectionDirection ?? "none"]; - const F = Su(this.domContext.getDocument(), "selectionchange", et(this, ch), { - capture: !0 - }); - et(this, ch).call(this), this.domContext.getActiveElement() === C && (et(this, Ls).current = !0), this.domContext.getElementById("pin-input-style") || Fr(this, Od, Iv).call(this); - const T = () => { - L && L.style.setProperty("--bits-pin-input-root-height", `${C.clientHeight}px`) - }; - T(); - const o = new ResizeObserver(T); - return o.observe(C), () => { - F(), o.disconnect() - } - }), oo([() => this.opts.value.current, () => et(this, ja).current], () => { - Q6(() => { - const C = et(this, ja).current; - if (!C) return; - C.dispatchEvent(new Event("input")); - const L = C.selectionStart, - F = C.selectionEnd, - T = C.selectionDirection ?? "none"; - L !== null && F !== null && (oe(et(this, za), L, !0), oe(et(this, qa), F, !0), x(et(this, Ds)).prev = [L, F, T]) - }, this.domContext) - }), Zr(() => { - const C = this.opts.value.current, - L = et(this, lc).current, - F = this.opts.maxLength.current, - T = this.opts.onComplete.current; - L !== void 0 && C !== L && L.length < F && C.length === F && T(C) - }) - } - static create(l) { - return new wm(l) - } - get rootProps() { - return x(et(this, oh)) - } - set rootProps(l) { - oe(et(this, oh), l) - } - get inputWrapperProps() { - return x(et(this, lh)) - } - set inputWrapperProps(l) { - oe(et(this, lh), l) - } - get inputProps() { - return x(et(this, uh)) - } - set inputProps(l) { - oe(et(this, uh), l) - } - get snippetProps() { - return x(et(this, hh)) - } - set snippetProps(l) { - oe(et(this, hh), l) - } -}; -ja = new WeakMap, oc = new WeakMap, Ls = new WeakMap, za = new WeakMap, qa = new WeakMap, lc = new WeakMap, hs = new WeakMap, Ds = new WeakMap, so = new WeakMap, cc = new WeakMap, Bd = new WeakMap, oh = new WeakMap, lh = new WeakMap, Fd = new WeakMap, Od = new WeakSet, Iv = function() { - const l = this.domContext.getDocument(), - _ = l.createElement("style"); - if (_.id = "pin-input-style", l.head.appendChild(_), _.sheet) { - const C = "background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;"; - vu(_.sheet, "[data-pin-input-input]::selection { background: transparent !important; color: transparent !important; }"), vu(_.sheet, `[data-pin-input-input]:autofill { ${C} }`), vu(_.sheet, `[data-pin-input-input]:-webkit-autofill { ${C} }`), vu(_.sheet, "@supports (-webkit-touch-callout: none) { [data-pin-input-input] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"), vu(_.sheet, "[data-pin-input-input] + * { pointer-events: all !important; }") - } -}, ch = new WeakMap, uh = new WeakMap, Nd = new WeakMap, hh = new WeakMap; -let Uf = wm; -var dh; -const Tm = class Tm { - constructor(l) { - lr(this, "opts"); - lr(this, "attachment"); - br(this, dh, lt(() => ({ - id: this.opts.id.current, - [Pv.cell]: "", - "data-active": this.opts.cell.current.isActive ? "" : void 0, - "data-inactive": this.opts.cell.current.isActive ? void 0 : "", - ...this.attachment - }))); - this.opts = l, this.attachment = Va(this.opts.ref) - } - static create(l) { - return new Tm(l) - } - get props() { - return x(et(this, dh)) - } - set props(l) { - oe(et(this, dh), l) - } -}; -dh = new WeakMap; -let Zf = Tm; - -function Q6(b, l) { - const _ = l.setTimeout(b, 0), - C = l.setTimeout(b, 10), - L = l.setTimeout(b, 50); - return [_, C, L] -} - -function vu(b, l) { - try { - b.insertRule(l) - } catch { - console.error("pin input could not insert CSS rule:", l) - } -} -var eA = Ie("
        "); - -function tA(b, l) { - const _ = ts(); - Sr(l, !0); - let C = Et(l, "id", 19, () => Ua(_)), - L = Et(l, "inputId", 19, () => `${Ua(_)}-input`), - F = Et(l, "ref", 15, null), - T = Et(l, "maxlength", 3, 6), - o = Et(l, "textalign", 3, "left"), - $ = Et(l, "inputmode", 3, "numeric"), - W = Et(l, "onComplete", 3, Mu), - ie = Et(l, "pushPasswordManagerStrategy", 3, "increase-width"), - pe = Et(l, "class", 3, ""), - ye = Et(l, "autocomplete", 3, "one-time-code"), - X = Et(l, "disabled", 3, !1), - Se = Et(l, "value", 15, ""), - we = Et(l, "onValueChange", 3, Mu), - Re = Qt(l, ["$$slots", "$$events", "$$legacy", "id", "inputId", "ref", "maxlength", "textalign", "pattern", "inputmode", "onComplete", "pushPasswordManagerStrategy", "class", "children", "autocomplete", "disabled", "value", "onValueChange", "pasteTransformer"]); - const Ae = Uf.create({ - id: cr.with(() => C()), - ref: cr.with(() => F(), Je => F(Je)), - inputId: cr.with(() => L()), - autocomplete: cr.with(() => ye()), - maxLength: cr.with(() => T()), - textAlign: cr.with(() => o()), - disabled: cr.with(() => X()), - inputmode: cr.with(() => $()), - pattern: cr.with(() => l.pattern), - onComplete: cr.with(() => W()), - value: cr.with(() => Se(), Je => { - Se(Je), we()(Je) - }), - pushPasswordManagerStrategy: cr.with(() => ie()), - pasteTransformer: cr.with(() => l.pasteTransformer) - }), - Oe = lt(() => Da(Re, Ae.inputProps)), - Ee = lt(() => Da(Ae.rootProps, { - class: pe() - })), - Ne = lt(() => Da(Ae.inputWrapperProps, {})); - var ft = eA(); - er(ft, () => ({ - ...x(Ee) - })); - var ht = k(ft); - Ji(ht, () => l.children ?? fa, () => Ae.snippetProps); - var Xe = V(ht, 2); - er(Xe, () => ({ - ...x(Ne) - })); - var ct = k(Xe); - ea(ct), er(ct, () => ({ - ...x(Oe) - })), A(Xe), A(ft), H(b, ft), Pr() -} -var rA = Ie("
        "); - -function iA(b, l) { - const _ = ts(); - Sr(l, !0); - let C = Et(l, "id", 19, () => Ua(_)), - L = Et(l, "ref", 15, null), - F = Qt(l, ["$$slots", "$$events", "$$legacy", "id", "ref", "cell", "child", "children"]); - const T = Zf.create({ - id: cr.with(() => C()), - ref: cr.with(() => L(), ye => L(ye)), - cell: cr.with(() => l.cell) - }), - o = lt(() => Da(F, T.props)); - var $ = Jt(), - W = zt($); - { - var ie = ye => { - var X = Jt(), - Se = zt(X); - Ji(Se, () => l.child, () => ({ - props: x(o) - })), H(ye, X) - }, - pe = ye => { - var X = rA(); - er(X, () => ({ - ...x(o) - })); - var Se = k(X); - Ji(Se, () => l.children ?? fa), A(X), H(ye, X) - }; - Ue(W, ye => { - l.child ? ye(ie) : ye(pe, !1) - }) - } - H(b, $), Pr() -} - -function pc(...b) { - return Fg(Tu(b)) -} - -function nA(b, l) { - Sr(l, !0); - let _ = Et(l, "ref", 15, null), - C = Et(l, "value", 15, ""), - L = Qt(l, ["$$slots", "$$events", "$$legacy", "ref", "value", "class"]); - var F = Jt(), - T = zt(F); - { - let o = lt(() => pc("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", l.class)); - _n(T, () => T6, ($, W) => { - W($, lo({ - "data-slot": "command", - get class() { - return x(o) - } - }, () => L, { - get value() { - return C() - }, - set value(ie) { - C(ie) - }, - get ref() { - return _() - }, - set ref(ie) { - _(ie) - } - })) - }) - } - H(b, F), Pr() -} -var aA = Tr(''); - -function fc(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = aA(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} - -function sA(b, l) { - Sr(l, !0); - let _ = Et(l, "ref", 15, null), - C = Qt(l, ["$$slots", "$$events", "$$legacy", "ref", "class"]); - var L = Jt(), - F = zt(L); - { - let T = lt(() => pc("py-6 text-center text-sm", l.class)); - _n(F, () => S6, (o, $) => { - $(o, lo({ - "data-slot": "command-empty", - get class() { - return x(T) - } - }, () => C, { - get ref() { - return _() - }, - set ref(W) { - _(W) - } - })) - }) - } - H(b, L), Pr() -} -var oA = Ie(" ", 1); - -function lA(b, l) { - Sr(l, !0); - let _ = Et(l, "ref", 15, null), - C = Qt(l, ["$$slots", "$$events", "$$legacy", "ref", "class", "children", "heading", "value"]); - var L = Jt(), - F = zt(L); - { - let T = lt(() => pc("text-foreground overflow-hidden p-1", l.class)), - o = lt(() => l.value ?? l.heading ?? `----${m6()}`); - _n(F, () => I6, ($, W) => { - W($, lo({ - "data-slot": "command-group", - get class() { - return x(T) - }, - get value() { - return x(o) - } - }, () => C, { - get ref() { - return _() - }, - set ref(ie) { - _(ie) - }, - children: (ie, pe) => { - var ye = oA(), - X = zt(ye); - { - var Se = Re => { - var Ae = Jt(), - Oe = zt(Ae); - _n(Oe, () => A6, (Ee, Ne) => { - Ne(Ee, { - class: "text-muted-foreground px-2 py-1.5 text-xs font-medium", - children: (ft, ht) => { - fi(); - var Xe = Fn(); - Ge(() => fe(Xe, l.heading)), H(ft, Xe) - }, - $$slots: { - default: !0 - } - }) - }), H(Re, Ae) - }; - Ue(X, Re => { - l.heading && Re(Se) - }) - } - var we = V(X, 2); - _n(we, () => z6, (Re, Ae) => { - Ae(Re, { - get children() { - return l.children - } - }) - }), H(ie, ye) - }, - $$slots: { - default: !0 - } - })) - }) - } - H(b, L), Pr() -} - -function cA(b, l) { - Sr(l, !0); - let _ = Et(l, "ref", 15, null), - C = Qt(l, ["$$slots", "$$events", "$$legacy", "ref", "class"]); - var L = Jt(), - F = zt(L); - { - let T = lt(() => pc("aria-selected:bg-base-300 aria-selected:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", l.class)); - _n(F, () => F6, (o, $) => { - $(o, lo({ - "data-slot": "command-item", - get class() { - return x(T) - } - }, () => C, { - get ref() { - return _() - }, - set ref(W) { - _(W) - } - })) - }) - } - H(b, L), Pr() -} -var uA = Tr(''); - -function hA(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = uA(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var dA = Ie('
        '); - -function pA(b, l) { - Sr(l, !0); - let _ = Et(l, "ref", 15, null), - C = Et(l, "value", 15, ""), - L = Qt(l, ["$$slots", "$$events", "$$legacy", "ref", "class", "value"]); - var F = dA(), - T = k(F); - hA(T, { - class: "size-5 opacity-50" - }); - var o = V(T, 2); - { - let $ = lt(() => pc("placeholder:text-muted-foreground outline-hidden flex h-10 w-full rounded-md bg-transparent py-3 text-sm disabled:cursor-not-allowed disabled:opacity-50", l.class)); - _n(o, () => D6, (W, ie) => { - ie(W, lo({ - "data-slot": "command-input", - get class() { - return x($) - } - }, () => L, { - get ref() { - return _() - }, - set ref(pe) { - _(pe) - }, - get value() { - return C() - }, - set value(pe) { - C(pe) - } - })) - }) - } - A(F), H(b, F), Pr() -} - -function fA(b, l) { - Sr(l, !0); - let _ = Et(l, "ref", 15, null), - C = Qt(l, ["$$slots", "$$events", "$$legacy", "ref", "class"]); - var L = Jt(), - F = zt(L); - { - let T = lt(() => pc("max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden", l.class)); - _n(F, () => N6, (o, $) => { - $(o, lo({ - "data-slot": "command-list", - get class() { - return x(T) - } - }, () => C, { - get ref() { - return _() - }, - set ref(W) { - _(W) - } - })) - }) - } - H(b, L), Pr() -} -var mA = Tr(''); - -function _A(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = mA(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var gA = Ie(" ", 1), - vA = Ie(' ', 1), - yA = Ie(' '), - xA = Ie(" ", 1), - bA = Ie(" ", 1), - wA = (b, l) => { - l(0) - }, - TA = Ie(''), - CA = Ie('
        '); - -function wg(b, l) { - Sr(l, !0); - let _ = Et(l, "countryId", 15, 0), - C = Et(l, "dropdownDirection", 3, "right"), - L = nt(null), - F = nt(null), - T = nt(""); - - function o() { - Mg().then(() => { - var Ee; - (Ee = document.activeElement) == null || Ee.blur(), oe(T, "") - }) - } - var $ = CA(), - W = k($), - ie = k(W), - pe = k(ie); - { - var ye = Ee => { - var Ne = gA(), - ft = zt(Ne), - ht = k(ft, !0); - A(ft); - var Xe = V(ft, 2); - _A(Xe, { - class: "size-3.5" - }), Ge(ct => fe(ht, ct), [() => Vg()]), H(Ee, Ne) - }, - X = Ee => { - const Ne = lt(() => ds(_())); - var ft = vA(), - ht = zt(ft), - Xe = k(ht, !0); - A(ht); - var ct = V(ht); - Ge(() => { - fe(Xe, x(Ne).flag), fe(ct, ` ${x(Ne).name??""}`) - }), H(Ee, ft) - }; - Ue(pe, Ee => { - _() === 0 ? Ee(ye) : Ee(X, !1) - }) - } - A(ie); - var Se = V(ie, 2); - let we; - var Re = k(Se); - _n(Re, () => nA, (Ee, Ne) => { - Ne(Ee, { - children: (ft, ht) => { - var Xe = bA(), - ct = zt(Xe); - _n(ct, () => pA, (Be, st) => { - st(Be, { - placeholder: "Country", - get ref() { - return x(L) - }, - set ref(it) { - oe(L, it) - }, - get value() { - return x(T) - }, - set value(it) { - oe(T, it, !0) - } - }) - }); - var Je = V(ct, 2); - _n(Je, () => fA, (Be, st) => { - st(Be, { - children: (it, Qe) => { - var ke = xA(), - vt = zt(ke); - _n(vt, () => sA, (te, _e) => { - _e(te, { - children: (ne, Pe) => { - fi(); - var Me = Fn(); - Ge(at => fe(Me, at), [() => b2()]), H(ne, Me) - }, - $$slots: { - default: !0 - } - }) - }); - var Q = V(vt, 2); - _n(Q, () => lA, (te, _e) => { - _e(te, { - children: (ne, Pe) => { - var Me = Jt(), - at = zt(Me); - nn(at, 17, () => $n.countries, We => We.id, (We, Ct) => { - var _t = Jt(), - xt = zt(_t); - _n(xt, () => cA, (tt, pt) => { - pt(tt, { - get value() { - return x(Ct).name - }, - onSelect: () => { - _(x(Ct).id), o() - }, - children: (It, ut) => { - var bt = yA(), - wt = k(bt), - dt = k(wt, !0); - A(wt); - var Lt = V(wt); - A(bt), Ge(() => { - fe(dt, x(Ct).flag), fe(Lt, ` ${x(Ct).name??""}`) - }), H(It, bt) - }, - $$slots: { - default: !0 - } - }) - }), H(We, _t) - }), H(ne, Me) - }, - $$slots: { - default: !0 - } - }) - }), H(it, ke) - }, - $$slots: { - default: !0 - } - }) - }), H(ft, Xe) - }, - $$slots: { - default: !0 - } - }) - }), A(Se), A(W); - var Ae = V(W, 2); - { - var Oe = Ee => { - var Ne = TA(); - Ne.__click = [wA, _]; - var ft = k(Ne); - fc(ft, { - class: "size-3.5" - }), A(Ne), H(Ee, Ne) - }; - Ue(Ae, Ee => { - _() != 0 && Ee(Oe) - }) - } - A($), ps($, Ee => oe(F, Ee), () => x(F)), Ge(Ee => we = Or(Se, 1, "dropdown-content menu bg-base-100 rounded-box z-1 border-base-content/10 w-52 rounded-lg border py-1 shadow-sm", null, we, Ee), [() => ({ - "right-1": C() === "left" - })]), an("focus", ie, () => { - x(L).focus() - }), H(b, $), Pr() -} -Wi(["click"]); -var SA = Tr(''); - -function PA(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = SA(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var IA = Tr(''), - MA = Tr(''); - -function $f(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy", "filled"]); - var C = Jt(), - L = zt(C); - { - var F = o => { - var $ = IA(); - er($, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(o, $) - }, - T = o => { - var $ = MA(); - er($, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(o, $) - }; - Ue(L, o => { - l.filled ? o(F) : o(T, !1) - }) - } - H(b, C) -} -var AA = Ie(''), - kA = Ie('
        '), - EA = Ie('
        '), - zA = (b, l, _) => { - l.onvisitclick({ - lat: x(_).lastLatitude, - lng: x(_).lastLongitude - }) - }, - LA = Ie(' '), - DA = Ie('

        '), - RA = Ie(' '), - BA = Ie('

        '), - FA = Ie(' '), - OA = Ie(" "), - NA = Ie('
        '), - jA = Ie('

        '), - qA = Ie(' '), - VA = Ie('

        '), - UA = Ie('
        '), - ZA = Ie('
        ', 1); - -function $A(b, l) { - Sr(l, !0); - const _ = []; - let C = nt(1e3); - const L = lt(() => x(C) <= 640); - let F = nt("today"), - T = { - regions: { - label: UT(), - icon: Wf - }, - countries: { - label: GT(), - icon: PA - }, - players: { - label: Xg(), - icon: Xd - }, - alliances: { - label: Kg(), - icon: Kd - } - }, - o = nt("regions"), - $ = nt(0), - W = zn({ - players: {}, - alliances: {}, - regions: {}, - countries: {} - }), - ie = lt(() => { - var Xe, ct, Je; - return x(o) === "regions" ? (ct = (Xe = W[x(o)][x($)]) == null ? void 0 : Xe[x(F)]) == null ? void 0 : ct.entries : (Je = W[x(o)][x(F)]) == null ? void 0 : Je.entries - }); - const pe = 5 * 1e3; - Zr(() => { - var Be; - if (!l.open) return; - const Xe = x(F), - ct = x(o), - Je = x($); - ct === "players" && (!W[ct][Xe] || Date.now() - W[ct][Xe].time > pe) ? ni.leaderboardPlayers(Xe).then(st => { - W[ct][Xe] = { - time: Date.now(), - entries: st - } - }).catch(st => qr.error(st.message)) : ct === "alliances" && (!W[ct][Xe] || Date.now() - W[ct][Xe].time > pe) ? ni.leaderboardAlliances(Xe).then(st => { - W[ct][Xe] = { - time: Date.now(), - entries: st - } - }).catch(st => qr.error(st.message)) : ct === "countries" && (!W[ct][Xe] || Date.now() - W[ct][Xe].time > pe) ? ni.leaderboardCountries(Xe).then(st => { - W[ct][Xe] = { - time: Date.now(), - entries: st - } - }).catch(st => qr.error(st.message)) : ct === "regions" && (!((Be = W[ct][Je]) != null && Be[Xe]) || Date.now() - W[ct][Je][Xe].time > pe) && ni.leaderboardRegions(Xe, Je).then(st => { - W[ct][Je] || (W[ct][Je] = {}), W[ct][Je][Xe] = { - time: Date.now(), - entries: st - } - }).catch(st => qr.error(st.message)) - }); - var ye = ZA(), - X = zt(ye); - nn(X, 21, () => Object.entries(T), ([Xe, { - label: ct, - icon: Je - }]) => Xe, (Xe, ct) => { - var Je = lt(() => Ag(x(ct), 2)); - let Be = () => x(Je)[0], - st = () => x(Je)[1].label, - it = () => x(Je)[1].icon; - const Qe = lt(it); - var ke = AA(), - vt = k(ke); - ea(vt); - var Q, te = V(vt, 2); - _n(te, () => x(Qe), (ne, Pe) => { - Pe(ne, { - get this() { - return it() - }, - class: "mr-1 size-5 max-sm:hidden" - }) - }); - var _e = V(te); - A(ke), Ge(() => { - zr(vt, "aria-label", st()), Q !== (Q = Be()) && (vt.value = (vt.__value = Be()) ?? ""), fe(_e, ` ${st()??""}`) - }), Vd(_, [], vt, () => (Be(), x(o)), ne => oe(o, ne)), H(Xe, ke) - }), A(X); - var Se = V(X, 2), - we = k(Se); - sm(we, { - get value() { - return x(F) - }, - set value(Xe) { - oe(F, Xe, !0) - } - }); - var Re = V(we, 2); - { - var Ae = Xe => { - wg(Xe, { - dropdownDirection: "left", - get countryId() { - return x($) - }, - set countryId(ct) { - oe($, ct, !0) - } - }) - }; - Ue(Re, Xe => { - x(o) === "regions" && !x(L) && Xe(Ae) - }) - } - A(Se); - var Oe = V(Se, 2); - { - var Ee = Xe => { - var ct = kA(), - Je = k(ct); - wg(Je, { - get countryId() { - return x($) - }, - set countryId(Be) { - oe($, Be, !0) - } - }), A(ct), H(Xe, ct) - }; - Ue(Oe, Xe => { - x(o) === "regions" && x(L) && Xe(Ee) - }) - } - var Ne = V(Oe, 2); - { - var ft = Xe => { - var ct = EA(), - Je = k(ct), - Be = V(Je); - { - var st = Qe => { - var ke = Fn(); - Ge(vt => fe(ke, vt), [() => Wd().toLowerCase()]), H(Qe, ke) - }, - it = Qe => { - var ke = Jt(), - vt = zt(ke); - { - var Q = _e => { - var ne = Fn(); - Ge(Pe => fe(ne, Pe), [() => Qf()]), H(_e, ne) - }, - te = _e => { - var ne = Jt(), - Pe = zt(ne); - { - var Me = at => { - var We = Fn(); - Ge(Ct => fe(We, Ct), [() => em()]), H(at, We) - }; - Ue(Pe, at => { - x(F) === "month" && at(Me) - }, !0) - } - H(_e, ne) - }; - Ue(vt, _e => { - x(F) === "week" ? _e(Q) : _e(te, !1) - }, !0) - } - H(Qe, ke) - }; - Ue(Be, Qe => { - x(F) === "today" ? Qe(st) : Qe(it, !1) - }) - } - A(ct), Ge(Qe => fe(Je, `${Qe??""} `), [() => Jf()]), H(Xe, ct) - }, - ht = Xe => { - var ct = Jt(), - Je = zt(ct); - { - var Be = it => { - var Qe = Jt(), - ke = zt(Qe); - { - var vt = te => { - const _e = lt(() => x(ie)); - var ne = DA(), - Pe = k(ne), - Me = k(Pe), - at = V(k(Me)), - We = k(at, !0); - A(at); - var Ct = V(at), - _t = k(Ct), - xt = V(_t, 2), - tt = V(xt), - pt = k(tt); - $f(pt, { - class: "text-base-content/50 mb-0.5 ml-1 inline size-4" - }), A(tt), A(Ct), fi(), A(Me), A(Pe); - var It = V(Pe); - nn(It, 31, () => x(_e), ut => ut.id, (ut, bt, wt) => { - const dt = lt(() => ds(x(bt).countryId)); - var Lt = LA(), - Xt = k(Lt), - Yt = k(Xt, !0); - A(Xt); - var nr = V(Xt), - ar = k(nr), - Ft = k(ar, !0); - A(ar); - var dr = V(ar, 2), - _r = k(dr), - Ir = V(_r), - jr = k(Ir); - A(Ir), A(dr), A(nr); - var ur = V(nr), - Mr = k(ur, !0); - A(ur); - var Ar = V(ur), - kr = k(Ar); - kr.__click = [zA, l, bt]; - var Nr = k(kr, !0); - A(kr), A(Ar), A(Lt), Ge((ce, O, q) => { - fe(Yt, x(wt) + 1), zr(ar, "data-tip", x(dt).name), fe(Ft, x(dt).flag), Or(dr, 1, `font-semibold ${ce??""}`), fe(_r, `${x(bt).name??""} `), fe(jr, ``), fe(Mr, O), fe(Nr, q) - }, [() => Zn(x(bt).cityId), () => x(bt).pixelsPainted.toLocaleString("en-US"), () => c3()]), Zo(Lt, () => $o, () => ({ - duration: 200 - })), H(ut, Lt) - }), A(It), A(ne), Ge((ut, bt, wt, dt) => { - fe(We, ut), fe(_t, `${bt??""} `), fe(xt, `${wt??""} `), zr(tt, "data-tip", dt) - }, [() => QT(), () => Ql(), () => ec().toLowerCase(), () => s3()]), H(te, ne) - }, - Q = te => { - var _e = Jt(), - ne = zt(_e); - { - var Pe = at => { - var We = BA(), - Ct = k(We), - _t = k(Ct), - xt = V(k(_t)), - tt = k(xt, !0); - A(xt); - var pt = V(xt), - It = k(pt), - ut = V(It, 2), - bt = V(ut), - wt = k(bt); - $f(wt, { - class: "text-base-content/50 mb-0.5 ml-1 inline size-4" - }), A(bt), A(pt), A(_t), A(Ct); - var dt = V(Ct); - nn(dt, 31, () => x(ie), Lt => Lt.id, (Lt, Xt, Yt) => { - const nr = lt(() => ds(x(Xt).id)); - var ar = RA(), - Ft = k(ar), - dr = k(Ft, !0); - A(Ft); - var _r = V(Ft), - Ir = k(_r), - jr = k(Ir, !0); - A(Ir); - var ur = V(Ir, 2), - Mr = k(ur, !0); - A(ur), A(_r); - var Ar = V(_r), - kr = k(Ar, !0); - A(Ar), A(ar), Ge((Nr, ce) => { - fe(dr, x(Yt) + 1), zr(Ir, "data-tip", x(nr).name), fe(jr, x(nr).flag), Or(ur, 1, `font-semibold ${Nr??""}`), fe(Mr, x(nr).name), fe(kr, ce) - }, [() => Zn(x(Xt).id), () => x(Xt).pixelsPainted.toLocaleString("en-US")]), Zo(ar, () => $o, () => ({ - duration: 200 - })), H(Lt, ar) - }), A(dt), A(We), Ge((Lt, Xt, Yt, nr) => { - fe(tt, Lt), fe(It, `${Xt??""} `), fe(ut, `${Yt??""} `), zr(bt, "data-tip", nr) - }, [() => Vg(), () => Ql(), () => ec().toLowerCase(), () => N3()]), H(at, We) - }, - Me = at => { - var We = Jt(), - Ct = zt(We); - { - var _t = tt => { - const pt = lt(() => x(ie)); - var It = jA(), - ut = k(It), - bt = k(ut), - wt = V(k(bt)), - dt = k(wt, !0); - A(wt); - var Lt = V(wt), - Xt = k(Lt), - Yt = V(Xt, 2, !0); - A(Lt), A(bt), A(ut); - var nr = V(ut); - nn(nr, 31, () => x(pt), ar => ar.id, (ar, Ft, dr) => { - const _r = lt(() => { - var xe; - return ((xe = Dt.data) == null ? void 0 : xe.id) === x(Ft).id - }); - var Ir = NA(); - let jr; - var ur = k(Ir), - Mr = k(ur, !0); - A(ur); - var Ar = V(ur), - kr = k(Ar), - Nr = k(kr); - es(Nr, { - class: "size-8 border sm:size-10", - get userId() { - return x(Ft).id - }, - get pictureUrl() { - return x(Ft).picture - } - }); - var ce = V(Nr, 2), - O = k(ce), - q = k(O), - G = V(q), - K = k(G); - A(G), A(O); - var le = V(O, 2); - { - var ve = xe => { - const At = lt(() => ds(x(Ft).equippedFlag)); - var Pt = FA(), - kt = k(Pt, !0); - A(Pt), Ge(() => { - zr(Pt, "data-tip", x(At).name), fe(kt, x(At).flag) - }), H(xe, Pt) - }; - Ue(le, xe => { - x(Ft).equippedFlag && xe(ve) - }) - } - var Le = V(le, 2); - { - var Ce = xe => { - ph(xe, { - get username() { - return x(Ft).discord - } - }) - }; - Ue(Le, xe => { - x(Ft).discord && xe(Ce) - }) - } - var Ze = V(Le, 2); - { - var ot = xe => { - var At = OA(), - Pt = k(At, !0); - A(At), Ge((kt, Wt) => { - Or(At, 1, `badge badge-sm ml-0.5 border-0 ${kt??""} ${Wt??""}`), fe(Pt, x(Ft).allianceName) - }, [() => Kf(x(Ft).allianceId), () => Zn(x(Ft).allianceId)]), H(xe, At) - }; - Ue(Ze, xe => { - "allianceName" in x(Ft) && x(Ft).allianceName && xe(ot) - }) - } - A(ce), A(kr), A(Ar); - var Ye = V(Ar), - Ot = k(Ye, !0); - A(Ye), A(Ir), Ge((xe, At, Pt) => { - jr = Or(Ir, 1, "", null, jr, xe), fe(Mr, x(dr) + 1), Or(O, 1, `font-semibold max-sm:ml-2 ${At??""} flex gap-1`), fe(q, `${x(Ft).name??""} `), fe(K, `#${x(Ft).id??""}`), fe(Ot, Pt) - }, [() => ({ - "bg-base-200": x(_r) - }), () => Zn(x(Ft).id), () => x(Ft).pixelsPainted.toLocaleString("en-US")]), Zo(Ir, () => $o, () => ({ - duration: 200 - })), H(ar, Ir) - }), A(nr), A(It), Ge((ar, Ft, dr) => { - fe(dt, ar), fe(Xt, `${Ft??""} `), fe(Yt, dr) - }, [() => tm(), () => Ql(), () => ec().toLowerCase()]), H(tt, It) - }, - xt = tt => { - var pt = Jt(), - It = zt(pt); - { - var ut = bt => { - var wt = VA(), - dt = k(wt), - Lt = k(dt), - Xt = V(k(Lt)), - Yt = k(Xt, !0); - A(Xt); - var nr = V(Xt), - ar = k(nr), - Ft = V(ar, 2, !0); - A(nr), A(Lt), A(dt); - var dr = V(dt); - nn(dr, 31, () => x(ie), _r => _r.id, (_r, Ir, jr) => { - const ur = lt(() => { - var le; - return ((le = Dt.data) == null ? void 0 : le.allianceId) === x(Ir).id - }); - var Mr = qA(); - let Ar; - var kr = k(Mr), - Nr = k(kr, !0); - A(kr); - var ce = V(kr), - O = k(ce), - q = k(O, !0); - A(O), A(ce); - var G = V(ce), - K = k(G, !0); - A(G), A(Mr), Ge((le, ve, Le) => { - Ar = Or(Mr, 1, "", null, Ar, le), fe(Nr, x(jr) + 1), Or(O, 1, `font-semibold ${ve??""}`), fe(q, x(Ir).name), fe(K, Le) - }, [() => ({ - "bg-base-200": x(ur) - }), () => Zn(x(Ir).id), () => x(Ir).pixelsPainted.toLocaleString("en-US")]), Zo(Mr, () => $o, () => ({ - duration: 200 - })), H(_r, Mr) - }), A(dr), A(wt), Ge((_r, Ir, jr) => { - fe(Yt, _r), fe(ar, `${Ir??""} `), fe(Ft, jr) - }, [() => Gd(), () => Ql(), () => ec().toLowerCase()]), H(bt, wt) - }; - Ue(It, bt => { - x(o) === "alliances" && bt(ut) - }, !0) - } - H(tt, pt) - }; - Ue(Ct, tt => { - x(o) === "players" ? tt(_t) : tt(xt, !1) - }, !0) - } - H(at, We) - }; - Ue(ne, at => { - x(o) === "countries" ? at(Pe) : at(Me, !1) - }, !0) - } - H(te, _e) - }; - Ue(ke, te => { - x(o) === "regions" ? te(vt) : te(Q, !1) - }) - } - H(it, Qe) - }, - st = it => { - var Qe = UA(); - H(it, Qe) - }; - Ue(Je, it => { - x(ie) ? it(Be) : it(st, !1) - }, !0) - } - H(Xe, ct) - }; - Ue(Ne, Xe => { - x(ie) && x(ie).length === 0 ? Xe(ft) : Xe(ht, !1) - }) - } - $d("innerWidth", Xe => oe(C, Xe, !0)), H(b, ye), Pr() -} -Wi(["click"]); -var GA = Tr(''); - -function Mv(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = GA(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var HA = Ie(' '); - -function WA(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15); - Ii(() => { - const pe = ye => { - ye.key === "Escape" && _(!1) - }; - return document.addEventListener("keydown", pe), () => document.removeEventListener("keydown", pe) - }); - var C = HA(), - L = k(C), - F = V(k(L), 2), - T = k(F); - Mv(T, { - class: "size-6" - }); - var o = V(T, 2), - $ = k(o, !0); - A(o), A(F); - var W = V(F, 2), - ie = k(W); - $A(ie, { - get onvisitclick() { - return l.onvisitclick - }, - get open() { - return _() - } - }), A(W), A(L), fi(2), A(C), On(C, () => pe => { - Zr(() => { - _() ? pe.show() : pe.close() - }) - }), Ge(pe => fe($, pe), [() => Yf()]), an("close", C, () => _(!1)), H(b, C), Pr() -} -var XA = Ie("
        "), - KA = Ie(' '); - -function YA(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15); - Ii(() => { - const o = $ => { - $.key === "Escape" && _(!1) - }; - return document.addEventListener("keydown", o), () => document.removeEventListener("keydown", o) - }); - var C = KA(), - L = k(C), - F = V(k(L), 2); - { - var T = o => { - var $ = XA(), - W = k($); - xx(W, {}), A($), En(2, $, () => Qn, () => ({ - duration: 300 - })), H(o, $) - }; - Ue(F, o => { - _() && o(T) - }) - } - A(L), fi(2), A(C), On(C, () => o => { - Zr(() => { - _() ? o.show() : o.close() - }) - }), an("close", C, () => _(!1)), H(b, C), Pr() -} -var JA = (b, l, _) => { - localStorage.setItem(x(l), "true"), oe(_, !1) - }, - QA = Ie('new'), - ek = Ie("
        "); - -function _f(b, l) { - Sr(l, !0); - let _ = nt(!1); - const C = lt(() => "showed:" + l.key); - Ii(() => { - oe(_, !localStorage.getItem(x(C))) - }); - var L = ek(); - L.__click = [JA, C, _]; - var F = k(L); - { - var T = $ => { - var W = QA(); - En(3, W, () => Qn, () => ({ - duration: 200 - })), H($, W) - }; - Ue(F, $ => { - x(_) && $(T) - }) - } - var o = V(F, 2); - Ji(o, () => l.children), A(L), Ge(() => Or(L, 1, `indicator ${l.class??""}`)), H(b, L), Pr() -} -Wi(["click"]); -// -var tk = Ie("

        " + Text1() + "

        "); - -function rk(b, l) { - Sr(l, !1), Og(); - var _ = tk(), - C = V(k(_), 2); - A(_), Ge(L => fe(C, ` `+Text2()+` ${L??""}`), [() => zd(Dt.cooldown ?? 0)]), H(b, _), Pr() -} -var ik = Ie(""); - -function Av(b, l) { - Sr(l, !0); - let _ = Et(l, "width", 15, 0), - C = Qt(l, ["$$slots", "$$events", "$$legacy", "value", "fontSize", "color", "weight", "mono", "width"]), - L = lt(() => Math.ceil(l.fontSize)), - F = nt(null); - const T = window.devicePixelRatio ?? 1, - o = '"Geist", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"', - $ = '"Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'; - Zr(() => { - const ie = x(F).getContext("2d"); - ie.textBaseline = "top", ie.font = `${l.weight??"normal"} ${l.fontSize}px ${l.mono?$:o}`, ie.fillStyle = l.color ?? "#394e6a", ie.setTransform(T, 0, 0, T, 0, 0), ie.clearRect(0, 0, _(), x(L)), ie.fillText(l.value, 0, 0); - const pe = ie.measureText(l.value); - _(Math.ceil(pe.actualBoundingBoxRight)), oe(L, pe.actualBoundingBoxDescent) - }); - var W = ik(); - er(W, () => ({ - width: _() * T, - height: x(L) * T, - style: `width: ${_()??""}px; height: ${x(L)??""}px`, - ...C - })), ps(W, ie => oe(F, ie), () => x(F)), H(b, W), Pr() -} -var nk = Ie(' '), - ak = Ie(' '), - sk = Ie(''), - ok = Ie(''); - -function kv(b, l) { - Sr(l, !0); - let _ = Qt(l, ["$$slots", "$$events", "$$legacy", "loading", "charges"]), - C = nt(0); - var L = ok(); - er(L, () => ({ - ..._, - class: `btn btn-primary btn-lg sm:btn-xl relative ${l.class??""}` - })); - var F = k(L); - fh(F, { - class: "size-6" - }); - var T = V(F, 2), - o = k(T), - $ = V(o); - { - var W = ye => { - const X = lt(() => `${Math.floor(l.charges)}/${Dt.data.charges.max}`); - var Se = ak(), - we = k(Se), - Re = k(we); - { - let Ee = lt(() => l.disabled ? "#394e6a33" : "#ffffff"); - Av(Re, { - weight: 600, - fontSize: 16, - get value() { - return x(X) - }, - get color() { - return x(Ee) - }, - get width() { - return x(C) - }, - set width(Ne) { - oe(C, Ne, !0) - } - }) - } - A(we); - var Ae = V(we, 2); - { - var Oe = Ee => { - var Ne = nk(), - ft = k(Ne); - A(Ne), Ge(ht => fe(ft, `(${ht??""})`), [() => zd(Dt.cooldown)]), H(Ee, Ne) - }; - Ue(Ae, Ee => { - l.charges < Dt.data.charges.max && Dt.cooldown !== void 0 && Ee(Oe) - }) - } - A(Se), Ge(Ee => uc(we, `width: ${Ee??""}px`), [() => (Math.floor(x(C) / 5) + 1) * 5]), H(ye, Se) - }; - Ue($, ye => { - l.charges !== void 0 && Dt.data && ye(W) - }) - } - A(T); - var ie = V(T, 2); - { - var pe = ye => { - var X = sk(); - H(ye, X) - }; - Ue(ie, ye => { - l.loading && ye(pe) - }) - } - A(L), Ge(ye => fe(o, `${ye??""} `), [() => Zg()]), H(b, L), Pr() -} -const lk = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAABVQTFRFAAAASkKEenHEta7xWmmLi5y0v8vc+SuCVQAAAAF0Uk5TAEDm2GYAAAA/SURBVHjaXcjBDcAwDMNAUW28/8hF0MCIzN9RV7aVfuxp+IGPe+AdPQRpFaRrgcNrn/Bb4LAE4W5aNb3TXUofoSgBYpzN5I4AAAAASUVORK5CYII=", - ck = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAFxJREFUeNq107EJACAMRFEHyxSu4jbuZ+0IyhUS4ZDogYEr3++Svp+ZDUzGrRTMIwKmiIApImCKiBgbOXOEcRxQsQcW7rVKeA9gj5gD2D3mgC/GcQSLMEdO+/qtE+/GV5duYCOPAAAAAElFTkSuQmCC", - uk = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAAXNSR0IArs4c6QAAAAJ0Uk5TAAB2k804AAAAKklEQVR42mOAAhsbCA3n//9vQ74ApqE2QIAgwIqBykFaICwMAQwt9HEpAIf2Me1Ro5Q9AAAAAElFTkSuQmCC", - hk = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAAXNSR0IArs4c6QAAABVJREFUeNpjYGA48x8DYwoB1Q0RlQDDCVmniJ241gAAAABJRU5ErkJggg=="; -class dk { - constructor(l) { - lr(this, "gm"); - lr(this, "opacity", 1); - lr(this, "id", `paint-preview-${Math.random()}`); - lr(this, "tiles", new Map); - this.input = l, this.gm = new hc(this.input.tileSize) - } - place([l, _], C) { - const { - tile: L, - pixel: F - } = this.gm.latLonToTileAndPixel(l, _, this.input.tileZoom), T = this.getTileKey(L[0], L[1]); - let o = this.tiles.get(T); - if (!o) { - const $ = this.gm.tileBoundsLatLon(L[0], L[1], this.input.tileZoom), - W = rm($, !0), - ie = new pk({ - coordinates: W, - id: `${this.id}-${T}`, - layerPaint: { - "raster-opacity": this.opacity, - "raster-resampling": "nearest" - }, - tileSize: this.input.tileSize, - beforeLayerId: this.input.beforeLayerId - }); - ie.addTo(this.input.map), this.tiles.set(T, ie), o = ie - } - o.place(F[0], this.input.tileSize - F[1] - 1, C) - } - clear() { - const l = this.input.map; - for (const _ of this.tiles.values()) _.removeFrom(l), _.removeDOM(); - this.tiles.clear() - } - clearAndPlace(l, _) { - this.clear(), this.place(l, _) - } - remove([l, _]) { - const { - tile: C, - pixel: L - } = this.gm.latLonToTileAndPixel(l, _, this.input.tileZoom), F = this.getTileKey(C[0], C[1]), T = this.tiles.get(F); - T && T.remove(L[0], this.input.tileSize - L[1] - 1) - } - setCanvasOpacity(l) { - this.opacity = l; - for (const _ of this.tiles.values()) _.setOpacity(l) - } - getTileKey(l, _) { - return `${l},${_}` - } -} -class pk { - constructor(l) { - lr(this, "canvas"); - lr(this, "maps", new Set); - this.input = l; - const _ = this.input.tileSize; - this.canvas = document.createElement("canvas"), this.canvas.width = _, this.canvas.height = _ - } - place(l, _, C) { - var T; - const L = ((T = $n.colors) == null ? void 0 : T[C]) ?? $n.colors[0], - F = this.canvas.getContext("2d"); - if (F) { - const o = F.createImageData(1, 1), - [$, W, ie] = L.rgb, - pe = C === 0 ? 0 : 255; - o.data[0] = $, o.data[1] = W, o.data[2] = ie, o.data[3] = pe, F.putImageData(o, l, _) - } - } - remove(l, _) { - const C = this.canvas.getContext("2d"); - C && C.clearRect(l, _, 1, 1) - } - addTo(l) { - const _ = this.input.id; - l.getSource(_) || l.addSource(_, { - type: "canvas", - canvas: this.canvas, - coordinates: this.input.coordinates - }), l.getLayer(_) || (l.addLayer({ - id: _, - type: "raster", - source: _, - paint: this.input.layerPaint - }), this.input.beforeLayerId && l.moveLayer(_, this.input.beforeLayerId)), this.maps.add(l) - } - removeFrom(l) { - const { - id: _ - } = this.input; - l.getLayer(_) && l.removeLayer(_), l.getSource(_) && l.removeSource(_), this.maps.delete(l) - } - removeDOM() { - this.canvas.remove() - } - setOpacity(l) { - for (const _ of this.maps.values()) _.setPaintProperty(this.input.id, "raster-opacity", l) - } -} -var fk = Tr(''); - -function mk(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = fk(); - er(C, () => ({ - viewBox: "0 0 24 24", - fill: "currentColor", - xmlns: "http://www.w3.org/2000/svg", - ..._ - })), H(b, C) -} -var _k = Tr(''); - -function gk(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = _k(); - er(C, () => ({ - viewBox: "0 0 24 24", - fill: "currentColor", - xmlns: "http://www.w3.org/2000/svg", - ..._ - })), H(b, C) -} -var vk = Ie("
        "); - -function Kl(b, l) { - Sr(l, !0); - var _ = vk(), - C = k(_); - Ji(C, () => l.children ?? fa), A(_), Ge(() => Or(_, 1, `bg-base-100/60 border-base-content/20 -top-15 pointer-events-none absolute left-1/2 line-clamp-1 flex w-max -translate-x-1/2 select-none items-center gap-1 rounded-full border-2 px-3 py-1.5 ${l.class??""}`)), H(b, _), Pr() -} -var yk = Ie('
        '), - xk = Ie("
        "); - -function hm(b, l) { - Sr(l, !0); - const _ = Et(l, "size", 3, 10), - C = Et(l, "x", 19, () => [-.5, .5]), - L = Et(l, "y", 19, () => [.25, 1]), - F = Et(l, "duration", 3, 2e3), - T = Et(l, "infinite", 3, !1), - o = Et(l, "delay", 19, () => [0, 50]), - $ = Et(l, "colorRange", 19, () => [0, 360]), - W = Et(l, "colorArray", 19, () => []), - ie = Et(l, "amount", 3, 50), - pe = Et(l, "iterationCount", 3, 1), - ye = Et(l, "fallDistance", 3, "100px"), - X = Et(l, "rounded", 3, !1), - Se = Et(l, "cone", 3, !1), - we = Et(l, "noGravity", 3, !1), - Re = Et(l, "xSpread", 3, .15), - Ae = Et(l, "destroyOnComplete", 3, !0), - Oe = Et(l, "disableForReducedMotion", 3, !1); - let Ee = nt(!1); - Ii(() => { - !Ae() || T() || typeof pe() == "string" || setTimeout(() => oe(Ee, !0), (F() + o()[1]) * pe()) - }); - - function Ne(Je, Be) { - return Math.random() * (Be - Je) + Je - } - - function ft() { - return W().length ? W()[Math.round(Math.random() * (W().length - 1))] : `hsl(${Math.round(Ne($()[0],$()[1]))}, 75%, 50%)` - } - var ht = Jt(), - Xe = zt(ht); - { - var ct = Je => { - var Be = xk(); - let st; - nn(Be, 21, () => ({ - length: ie() - }), Zd, (it, Qe) => { - var ke = yk(); - Ge((vt, Q, te, _e, ne, Pe, Me, at, We, Ct, _t) => uc(ke, ` - --color: ${vt??""}; - --skew: ${Q??""}deg,${te??""}deg; - --rotation-xyz: ${_e??""}, ${ne??""}, ${Pe??""}; - --rotation-deg: ${Me??""}deg; - --translate-y-multiplier: ${at??""}; - --translate-x-multiplier: ${We??""}; - --scale: ${Ct??""}; - --transition-delay: ${_t??""}ms; - --transition-duration: ${T()?`calc(${F()}ms * var(--scale))`:`${F()}ms`};`), [ft, () => Ne(-45, 45), () => Ne(-45, 45), () => Ne(-10, 10), () => Ne(-10, 10), () => Ne(-10, 10), () => Ne(0, 360), () => Ne(L()[0], L()[1]), () => Ne(C()[0], C()[1]), () => .1 * Ne(2, 10), () => Ne(o()[0], o()[1])]), H(it, ke) - }), A(Be), Ge(it => { - st = Or(Be, 1, "confetti-holder svelte-15ksp55", null, st, it), uc(Be, ` - --fall-distance: ${ye()??""}; - --size: ${_()??""}px; - --x-spread: ${1-Re()}; - --transition-iteration-count: ${(T()?"infinite":pe())??""};`) - }, [() => ({ - rounded: X(), - cone: Se(), - "no-gravity": we(), - "reduced-motion": Oe() - })]), H(Je, Be) - }; - Ue(Xe, Je => { - x(Ee) || Je(ct) - }) - } - H(b, ht), Pr() -} -var bk = async (b, l, _, C) => { - try { - oe(l, !0), await ni.purchase({ - id: _, - amount: 1, - variant: C.colorIdx - }), await Dt.refresh(), pa.notification1.play() - } catch (L) { - qr.error(L.message) - } finally { - oe(l, !1) - } -}, wk = Ie(''), Tk = Ie(' '+Text3()+'', 1), Ck = Ie(' Unlocked ', 1), Sk = (b, l) => l(!1), Pk = Ie('

        '+Text5()+'

        '+Text6()+'

        '), Ik = Ie(' '); - -function Mk(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15); - const C = lt(() => $n.colors[l.colorIdx]), - L = lt(() => { - var X; - return ((X = Dt.data) == null ? void 0 : X.droplets) ?? 0 - }); - let F = nt(!1); - const T = lt(() => (x(F), Dt.hasColor(l.colorIdx))); - Ii(() => { - const X = Se => { - Se.key === "Escape" && _(!1) - }; - return document.addEventListener("keydown", X), () => document.removeEventListener("keydown", X) - }); - const o = 100, - $ = $n.products[o]; - var W = Ik(), - ie = k(W), - pe = V(k(ie), 2); - { - var ye = X => { - var Se = Pk(), - we = k(Se), - Re = k(we), - Ae = k(Re); - Ld(Ae, { - class: "size-6" - }); - var Oe = V(Ae, 4), - Ee = k(Oe); - Rg(Ee, { - get value() { - return x(L) - } - }), A(Oe), A(Re), fi(2), A(we); - var Ne = V(we, 2), - ft = k(Ne), - ht = k(ft); - A(ft); - var Xe = V(ft, 2), - ct = k(Xe, !0); - A(Xe); - var Je = V(Xe, 2), - Be = k(Je); - let st; - var it = k(Be); - it.__click = [bk, F, o, l]; - var Qe = k(it); - { - var ke = ne => { - var Pe = wk(); - H(ne, Pe) - }; - Ue(Qe, ne => { - x(F) && ne(ke) - }) - } - var vt = V(Qe, 2); - { - var Q = ne => { - var Pe = Tk(), - Me = zt(Pe); - Ud(Me, { - class: "size-5" - }); - var at = V(Me); - fi(), Ge(We => fe(at, ` ${We??""} `), [() => $.price.toLocaleString("en-US")]), H(ne, Pe) - }, - te = ne => { - var Pe = Ck(), - Me = zt(Pe); - Ld(Me, { - class: "size-5" - }); - var at = V(Me, 2), - We = k(at); - hm(We, {}), A(at), H(ne, Pe) - }; - Ue(vt, ne => { - x(T) ? ne(te, !1) : ne(Q) - }) - } - A(it), A(Be); - var _e = V(Be, 2); - _e.__click = [Sk, _], A(Je), A(Ne), A(Se), Ge((ne, Pe) => { - uc(ht, `background: rgb(${x(C).rgb[0]} ${x(C).rgb[1]} ${x(C).rgb[2]})`), zr(ht, "aria-label", x(C).name), fe(ct, x(C).name), zr(Be, "data-tip", ne), st = Or(Be, 1, "", null, st, Pe), it.disabled = x(L) < $.price || x(F) || x(T) - }, [() => Hd(), () => ({ - tooltip: !x(T) && x(L) < $.price - })]), H(X, Se) - }; - Ue(pe, X => { - Dt.data && X(ye) - }) - } - A(ie), fi(2), A(W), On(W, () => X => { - Zr(() => { - _() ? X.show() : X.close() - }) - }), an("close", W, () => _(!1)), H(b, W), Pr() -} -Wi(["click"]); -var Ak = Tr(''); - -function Tg(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Ak(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var kk = Tr(''); - -function Cg(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = kk(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Ek = Tr(''); - -function Ev(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Ek(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var zk = Tr(''), - Lk = Tr(''); - -function zv(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy", "filled"]); - var C = Jt(), - L = zt(C); - { - var F = o => { - var $ = zk(); - er($, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(o, $) - }, - T = o => { - var $ = Lk(); - er($, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(o, $) - }; - Ue(L, o => { - l.filled ? o(F) : o(T, !1) - }) - } - H(b, C) -} -var Dk = Tr(''); - -function Gf(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Dk(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Rk = Tr(''); - -function Lv(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Rk(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Bk = Tr(''); - -function Fk(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Bk(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Ok = Tr(''); - -function Nk(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Ok(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var jk = Ie(" ", 1), - qk = Ie(" ", 1), - Vk = Ie(" ", 1), - Uk = Ie(' ', 1), - Zk = Ie(" ", 1), - $k = Ie(" ", 1), - Gk = (b, l) => oe(l, !x(l)), - Hk = (b, l) => { - oe(l, "colorpicker") - }, - Wk = (b, l) => { - l(!l()) - }, - Xk = (b, l) => { - oe(l, "cleararea") - }, - Kk = Ie('
        C
        '), - Yk = (b, l) => { - pa.smallPlop.play(), l() - }, - Jk = (b, l, _) => { - l(x(_).idx) - }, - Qk = Ie(' ', 1), - eE = Ie("
        "), - tE = (b, l) => { - oe(l, !x(l)) - }, - rE = (b, l) => { - oe(l, x(l) === "eraser" ? "pencil" : "eraser", !0) - }, - iE = Ie('

        I
        E
        ', 1); - -function nE(b, l) { - Sr(l, !0); - let _ = Et(l, "screenLocked", 15), - C = Et(l, "opaquePixelArt", 15); - const L = lt(() => new hc(l.tileSize)); - let F = nt(1), - T = nt("pencil"); - const o = new Map, - $ = new Map; - let W = nt(0), - ie = nt(!1), - pe = nt(!0), - ye = lt(() => Dt.charges ?? 0), - X = lt(() => x(ye) - x(W)), - Se = nt(!1), - we = !1, - Re = nt(!1), - Ae = nt(zn([])); - const Oe = lt(() => x(T) === "pencil"), - Ee = lt(() => x(T) === "eraser"), - Ne = lt(() => x(T) === "colorpicker"), - ft = lt(() => x(T) === "cleararea"), - ht = lt(() => { - var Mt, Ke; - return Cu((Ke = (Mt = Dt) == null ? void 0 : Mt.data) == null ? void 0 : Ke.role, ["admin", "global_moderator"]) - }); - let Xe = nt(!1), - ct = nt(0), - Je = nt(void 0), - Be = nt(void 0); - const st = [1, 2, 3, 32, 4, 5, 6, 33, 7, 34, 35, 8, 9, 10, 11, 37, 38, 39, 40, 41, 42, 12, 13, 14, 15, 16, 17, 43, 20, 44, 18, 19, 45, 46, 21, 22, 47, 48, 49, 23, 24, 25, 26, 27, 28, 53, 54, 55, 29, 30, 50, 56, 57, 36, 51, 31, 52, 61, 62, 63, 58, 59, 60, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77 ,78, 79 ,80 ,81, 82, 83, 84, 85, 86 ,87 ,88 ,89 ,90 ,91 ,92 ,93 ,94, 95, 0].map(Mt => ({ - ...$n.colors[Mt], - idx: Mt - })), - it = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0].map(Mt => ({ - ...$n.colors[Mt], - idx: Mt - })); - let Qe = nt(!1); - const ke = lt(() => x(Qe) ? st : it), - vt = "show-all-colors"; - Ii(() => { - oe(Qe, localStorage.getItem(vt) === "true") - }), Zr(() => { - localStorage.setItem(vt, x(Qe) ? "true" : "false") - }); - const Q = "selected-color"; - Ii(() => { - const Mt = Number(localStorage.getItem(Q)); - !isNaN(Mt) && Mt < $n.colors.length && Mt > 0 && oe(F, Mt, !0) - }), Zr(() => { - localStorage.setItem(Q, x(F).toString()) - }); - const te = new dk({ - map: l.map, - tileSize: l.tileSize, - tileZoom: l.tileZoom, - beforeLayerId: l.hoverLayerId - }); - Zr(() => { - const Mt = C() ? 1 : 0; - te.setCanvasOpacity(Mt) - }), Zr(() => { - C() ? yf() : Ct([...o.values()]) - }); - let _e = !1; - Ii(() => { - Qa(l.map.getCenter(), l.map.getZoom()); - const Mt = l.map.on("click", rr => { - var Qr; - l.zoom < l.tileZoom + 2 && ((Qr = Dt.data) == null ? void 0 : Qr.role) === "user" && l.map.easeTo({ - center: rr.lngLat, - zoom: 17 - }); - const yi = [rr.lngLat.lat, rr.lngLat.lng]; - if (x(Oe)) Pe([yi], x(F)); - else if (x(Ee)) Me([yi]); - else if (x(Ne)) at(yi, rr.point); - else if (x(ft) && (x(Ae).push(yi), Pe([yi], 0), x(Ae).length >= 2)) { - const [Yr, la] = x(Ae), [sn, ta] = x(L).latLonToPixelsFloor(Yr[0], Yr[1], l.tileZoom), [Fi, Xi] = x(L).latLonToPixelsFloor(la[0], la[1], l.tileZoom), Gn = Math.min(sn, Fi), Hn = Math.max(sn, Fi), Ln = Math.min(ta, Xi), gt = Math.max(ta, Xi), qt = []; - for (let vr = Ln; vr <= gt; vr++) { - const _i = x(L).pixelsToLatLon(Gn + .5, vr + .5, l.tileZoom), - Di = x(L).pixelsToLatLon(Hn + .5, vr + .5, l.tileZoom), - $i = Ke({ - lat: _i[0], - lng: _i[1] - }, { - lat: Di[0], - lng: Di[1] - }).slice(0, x(X) - qt.length); - if (qt.push(...$i), qt.length >= x(X)) break - } - Pe(qt, 0), oe(Ae, [], !0), oe(T, "pencil") - } - oe(Se, !0) - }); - - function Ke(rr, yi) { - const Qr = x(L).latLonToPixels(rr.lat, rr.lng, l.tileZoom), - Yr = yi ? x(L).latLonToPixels(yi.lat, yi.lng, l.tileZoom) : Qr; - return ux(Qr, Yr).map(sn => x(L).pixelsToLatLon(sn[0] + .5, sn[1] + .5, l.tileZoom)) - } - - function jt(rr, yi) { - const Qr = Ke(rr, yi); - x(Oe) ? Pe(Qr, x(F)) : x(Ee) && Me(Qr), oe(Se, !0) - } - let Gt; - - function Dr(rr) { - const yi = l.map.unproject([rr.clientX, rr.clientY]); - if (x(Re)) { - const Qr = Ke(yi, Gt); - Me(Qr) - }(_e || we) && jt(yi, Gt), Gt = yi - } - window.addEventListener("mousemove", Dr); - let Gr = !1; - const li = l.map.on("touchstart", rr => { - if (rr.points.length == 2) { - _(!1), pt(), Gr = !0, setTimeout(() => Gr = !1, 150); - return - } - _() && setTimeout(() => { - !Gr && jt(rr.lngLat) - }, 150), Gt = rr.lngLat - }), - fr = l.map.on("touchmove", rr => { - _() && jt(rr.lngLat, Gt), Gt = rr.lngLat - }), - bi = rr => { - rr.code === "Space" && (_e || Gt && jt(Gt), _e = !0, rr.preventDefault()) - }; - document.addEventListener("keydown", bi); - const Si = rr => { - rr.code === "Space" && (_e = !1, ne = !1, x(W) === 0 && x(Ee) && oe(T, "pencil")) - }; - document.addEventListener("keyup", Si); - - function zi(rr) { - if (rr.button === 2) { - oe(Re, !0); - const Qr = l.map.unproject([rr.clientX, rr.clientY]); - Me([ - [Qr.lat, Qr.lng] - ]) - } - } - document.addEventListener("mousedown", zi); - - function mi(rr) { - rr.button === 2 && oe(Re, !1) - } - document.addEventListener("mouseup", mi); - const Li = rr => { - switch (rr.code) { - case "KeyE": - x(W) > 0 && (x(Ee) ? oe(T, "pencil") : oe(T, "eraser")); - return; - case "KeyI": - oe(T, "colorpicker"); - return; - case "KeyC": - x(ht) && oe(T, "cleararea"); - return - } - }; - return document.addEventListener("keypress", Li), () => { - fr.unsubscribe(), li.unsubscribe(), Mt.unsubscribe(), document.removeEventListener("mousemove", Dr), document.removeEventListener("keydown", bi), document.removeEventListener("keyup", Si), document.removeEventListener("keypress", Li), document.removeEventListener("mousedown", zi), document.removeEventListener("mouseup", mi), _t() - } - }); - let ne = !1; - - function Pe(Mt, Ke) { - let jt = !1; - const Gt = Ke === 0; - for (let Dr of Mt) { - const [Gr, li] = Dr, fr = vx(Ke), { - tile: bi, - pixel: Si - } = x(L).latLonToTileAndPixel(Gr, li, l.tileZoom), zi = { - color: fr, - tile: bi, - pixel: Si, - season: l.season, - colorIdx: Ke - }, mi = cf(zi), Li = o.get(mi), rr = x(ye) - o.size; - if (!Li && rr < 1) { - if (ne && (_e || _())) continue; - ne = !0, qr.info($3()); - continue - } - Li && Li.colorIdx === Ke || (pa.plop.play(), jt || l.hidePixelHover(), o.set(mi, zi), te.place(Dr, Ke), l.crosshair.place(Dr), jt = !0, Gt && $.set(mi, zi)) - } - oe(W, o.size, !0), jt && !C() ? Ct([...o.values()]) : jt && C() && Gt && Ct([...$.values()]) - } - - function Me(Mt) { - let Ke = !1, - jt = !1; - for (let Gt of Mt) { - const [Dr, Gr] = Gt, { - tile: li, - pixel: fr - } = x(L).latLonToTileAndPixel(Dr, Gr, l.tileZoom), bi = cf({ - tile: li, - pixel: fr, - season: l.season - }), Si = o.get(bi); - Si && (pa.plop.play(), l.hidePixelHover(), o.delete(bi), $.delete(bi), te.remove([Dr, Gr]), l.crosshair.remove(Gt), Ke = !0, Si.colorIdx === 0 && (jt = !0)), o.size === 0 && !(_e || we || _()) && oe(T, "pencil") - } - oe(W, o.size, !0), Ke && !C() ? Ct([...o.values()]) : Ke && C() && jt && Ct([...$.values()]) - } - - function at(Mt, Ke) { - const { - tile: jt, - pixel: Gt - } = x(L).latLonToTileAndPixel(Mt[0], Mt[1], l.tileZoom), Dr = cf({ - tile: jt, - pixel: Gt, - season: l.season - }), Gr = o.get(Dr); - if (Gr) { - It(Gr.colorIdx), requestAnimationFrame(() => { - var Si; - (Si = document.getElementById(`color-${Gr.colorIdx}`)) == null || Si.focus() - }); - return - } - const li = window.devicePixelRatio, - fr = Math.floor(Ke.x * li), - bi = Math.floor(Ke.y * li); - l.hidePixelHover(), wM(l.map, fr, bi).then(([Si, zi, mi]) => { - const Li = yx({ - r: Si, - g: zi, - b: mi - }); - It(Li), requestAnimationFrame(() => { - var rr; - (rr = document.getElementById(`color-${Li}`)) == null || rr.focus() - }) - }) - } - dc(() => x(F), () => { - l.clickedLatLon && !x(Se) && (x(F) === void 0 && oe(F, 1), Pe([l.clickedLatLon], x(F))) - }), Zr(() => { - const Mt = x(pe) ? .8 : 0; - l.crosshair.setCanvasOpacity(Mt) - }); - let We = nt(16.5); - Zr(() => { - if (x(Je) && x(Be) && l.clickedLatLon) { - const Mt = l.map.getZoom(); - if (Mt < x(We)) { - const [Ke, jt] = l.clickedLatLon, Gt = x(L).latLonToPixelBoundsLatLon(Ke, jt, l.tileZoom), Dr = im(Gt), Gr = x(Je) - x(Be).clientHeight, li = x(Je) / 2 - Gr / 2; - l.map.flyTo({ - center: { - lat: Dr[0], - lng: Dr[1] - }, - zoom: 17.5, - offset: Mt > 11 ? [0, -li] : [0, 0] - }) - } - oe(We, l.tileZoom, !0) - } - }), Ii(() => { - const Mt = () => { - !document.hidden && (console.log("Tab visible again"), C() ? Ct([...$.values()]) : Ct([...o.values()])) - }; - return document.addEventListener("visibilitychange", Mt), () => document.removeEventListener("visibilitychange", Mt) - }), Zr(() => { - switch (x(T)) { - case "pencil": - l.map.getCanvas().style.cursor = `url('${uk}') 8 8, default`, l.map.setPaintProperty(l.hoverLayerId, "raster-opacity", .4); - return; - case "colorpicker": - l.map.getCanvas().style.cursor = `url('${lk}') 0 16, default`, l.map.setPaintProperty(l.hoverLayerId, "raster-opacity", 0); - return; - case "eraser": - l.map.getCanvas().style.cursor = `url('${ck}') 2 14, default`, l.map.setPaintProperty(l.hoverLayerId, "raster-opacity", .4); - return - } - }), Zr(() => { - _() ? tt() : pt() - }); - async function Ct(Mt) { - await sx(Mt), l.refreshPixelArt() - } - async function _t() { - await yf(), te.clear(), l.refreshPixelArt(), l.crosshair.clear() - } - async function xt() { - await _t(), pt(), l.map.getCanvas().style.cursor = "default", l.map.setPaintProperty(l.hoverLayerId, "raster-opacity", .4), l.onclose() - } - - function tt() { - l.map.dragPan.disable(), l.map.touchZoomRotate.disable(), document.body.style.overscrollBehavior = "none" - } - - function pt() { - l.map.dragPan.enable(), l.map.touchZoomRotate.enable(), document.body.style.overscrollBehavior = "" - } - - function It(Mt) { - return Mt >= 32 && oe(Qe, !0), Dt.hasColor(Mt) ? (pa.smallDropplet.play(), oe(F, Mt, !0), oe(T, "pencil"), !0) : (pa.smallDropplet.play(), oe(Xe, !0), oe(ct, Mt, !0), !1) - } - lx(Mt => { - Mt.type === "leave" && x(W) > 0 && Mt.cancel() - }); - const ut = "show-paint-more-than-one-pixel-msg"; - let bt = nt(!1); - Ii(() => { - var Mt; - oe(bt, !localStorage.getItem(ut) && (((Mt = Dt.data) == null ? void 0 : Mt.pixelsPainted) ?? 0) < 100, !0) - }), Zr(() => { - x(W) > 1 && (oe(bt, !1), localStorage.setItem(ut, "false")) - }); - const wt = "lp"; - Ii(() => { - var Ke; - const Mt = localStorage.getItem(wt); - if (Mt) try { - const jt = JSON.parse(atob(Mt)), - Gt = (jt == null ? void 0 : jt.time) ?? 0, - Dr = 60 * 1e3; - (jt == null ? void 0 : jt.userId) !== ((Ke = Dt.data) == null ? void 0 : Ke.id) && Date.now() - Gt < 30 * Dr && !hx && (qr.error(W3()), xt()) - } catch (jt) { - console.error(jt) - } - }); - - function dt() { - var Ke; - const Mt = btoa(JSON.stringify({ - userId: (Ke = Dt.data) == null ? void 0 : Ke.id, - time: Date.now() - })); - localStorage.setItem(wt, Mt) - } - var Lt = iE(), - Xt = zt(Lt), - Yt = k(Xt); - { - var nr = Mt => { - Kl(Mt, { - children: (Ke, jt) => { - var Gt = jk(), - Dr = zt(Gt); - Ev(Dr, { - class: "inline size-5" - }); - var Gr = V(Dr); - Ge(li => fe(Gr, ` ${li??""}`), [() => uw()]), H(Ke, Gt) - }, - $$slots: { - default: !0 - } - }) - }, - ar = Mt => { - var Ke = Jt(), - jt = zt(Ke); - { - var Gt = Gr => { - Kl(Gr, { - class: "not-touchscreen:hidden", - children: (li, fr) => { - var bi = qk(), - Si = zt(bi); - lg(Si, { - class: "inline size-5" - }); - var zi = V(Si); - Ge(mi => fe(zi, ` ${mi??""}`), [() => pw()]), H(li, bi) - }, - $$slots: { - default: !0 - } - }) - }, - Dr = Gr => { - var li = Jt(), - fr = zt(li); - { - var bi = zi => { - Kl(zi, { - class: "not-touchscreen:hidden", - children: (mi, Li) => { - var rr = Vk(), - yi = zt(rr); - Cg(yi, { - class: "inline size-5" - }); - var Qr = V(yi, 1, !0); - Ge(Yr => fe(Qr, Yr), [() => _w()]), H(mi, rr) - }, - $$slots: { - default: !0 - } - }) - }, - Si = zi => { - var mi = Jt(), - Li = zt(mi); - { - var rr = Qr => { - Kl(Qr, { - class: "touchscreen:hidden", - children: (Yr, la) => { - var sn = Uk(), - ta = zt(sn); - Lv(ta, { - class: "inline size-5" - }); - var Fi = V(ta), - Xi = k(Fi, !0); - A(Fi); - var Gn = V(Fi, 2), - Hn = k(Gn), - Ln = V(Hn), - gt = k(Ln, !0); - A(Ln), A(Gn); - var qt = V(Gn); - Ge((vr, _i, Di, $i) => { - fe(Xi, vr), fe(Hn, `${_i??""} `), fe(gt, Di), fe(qt, ` ${$i??""}`) - }, [() => yw(), () => Sw(), () => ww(), () => Mw()]), H(Yr, sn) - }, - $$slots: { - default: !0 - } - }) - }, - yi = Qr => { - var Yr = Jt(), - la = zt(Yr); - { - var sn = Fi => { - Kl(Fi, { - class: "bg-warning text-warning-content animate-bounce", - children: (Xi, Gn) => { - var Hn = Zk(), - Ln = zt(Hn); - fh(Ln, { - class: "inline size-5" - }); - var gt = V(Ln); - Ge(qt => fe(gt, ` ${qt??""}`), [() => Ew()]), H(Xi, Hn) - }, - $$slots: { - default: !0 - } - }) - }, - ta = Fi => { - var Xi = Jt(), - Gn = zt(Xi); - { - var Hn = Ln => { - Kl(Ln, { - class: "bg-warning text-warning-content animate-bounce", - children: (gt, qt) => { - var vr = $k(), - _i = zt(vr); - Tg(_i, { - class: "inline size-5" - }); - var Di = V(_i, 2); - { - var $i = Cr => { - var gn = Fn(); - Ge(tr => fe(gn, tr), [() => uP()]), H(Cr, gn) - }, - Mi = Cr => { - var gn = Jt(), - tr = zt(gn); - { - var Ht = ei => { - var ri = Fn(); - Ge(gi => fe(ri, gi), [() => pP()]), H(ei, ri) - }; - Ue(tr, ei => { - x(Ae).length === 1 && ei(Ht) - }, !0) - } - H(Cr, gn) - }; - Ue(Di, Cr => { - x(Ae).length === 0 ? Cr($i) : Cr(Mi, !1) - }) - } - H(gt, vr) - }, - $$slots: { - default: !0 - } - }) - }; - Ue(Gn, Ln => { - x(ft) && Ln(Hn) - }, !0) - } - H(Fi, Xi) - }; - Ue(la, Fi => { - x(bt) ? Fi(sn) : Fi(ta, !1) - }, !0) - } - H(Qr, Yr) - }; - Ue(Li, Qr => { - x(Oe) && x(W) === 0 ? Qr(rr) : Qr(yi, !1) - }, !0) - } - H(zi, mi) - }; - Ue(fr, zi => { - x(Ne) ? zi(bi) : zi(Si, !1) - }, !0) - } - H(Gr, li) - }; - Ue(jt, Gr => { - x(Ee) ? Gr(Gt) : Gr(Dr, !1) - }, !0) - } - H(Mt, Ke) - }; - Ue(Yt, Mt => { - x(Ee) && x(W) === 0 ? Mt(nr) : Mt(ar, !1) - }) - } - var Ft = V(Yt, 2), - dr = k(Ft); - dr.__click = [Gk, pe]; - var _r = k(dr); - { - var Ir = Mt => { - mk(Mt, { - class: "size-4" - }) - }, - jr = Mt => { - gk(Mt, { - class: "size-4" - }) - }; - Ue(_r, Mt => { - x(pe) ? Mt(Ir) : Mt(jr, !1) - }) - } - A(dr); - var ur = V(dr, 2), - Mr = k(ur), - Ar = k(Mr), - kr = V(Ar); - Av(kr, { - class: "inline", - fontSize: 14, - get value() { - return `(${x(W)??""})` - }, - mono: !0 - }), A(Mr); - var Nr = V(Mr, 2), - ce = k(Nr), - O = k(ce); - fi(), A(ce); - var q = V(ce, 2); - q.__click = [Hk, T]; - var G = k(q); - Cg(G, { - class: "size-4.5" - }), A(q), A(Nr); - var K = V(Nr, 2), - le = k(K); - let ve; - le.__click = [Wk, C]; - var Le = k(le); - { - let Mt = lt(() => !C()); - zv(Le, { - class: "size-4.5", - get filled() { - return x(Mt) - } - }) - } - A(le), A(K); - var Ce = V(K, 2); - { - var Ze = Mt => { - var Ke = Kk(), - jt = k(Ke), - Gt = k(jt); - fi(), A(jt); - var Dr = V(jt, 2); - Dr.__click = [Xk, T]; - var Gr = k(Dr); - Tg(Gr, { - class: "size-4.5" - }), A(Dr), A(Ke), Ge(li => { - fe(Gt, `${li??""} `), Or(Dr, 1, Vo({ - "btn btn-circle btn-sm": !0, - "btn-ghost": !x(ft), - "btn-primary": x(ft) - })) - }, [() => oP()]), H(Mt, Ke) - }; - Ue(Ce, Mt => { - x(ht) && Mt(Ze) - }) - } - A(ur); - var ot = V(ur, 2); - ot.__click = [Yk, xt]; - var Ye = k(ot); - fc(Ye, { - class: "size-4" - }), A(ot), A(Ft); - var Ot = V(Ft, 2), - xe = k(Ot); - nn(xe, 23, () => x(ke), Mt => Mt.idx, (Mt, Ke, jt) => { - const Gt = lt(() => { - const [mi, Li, rr] = x(Ke).rgb; - return { - r: mi, - g: Li, - b: rr - } - }), - Dr = lt(() => x(F) === x(Ke).idx && x(Oe)), - Gr = lt(() => x(Ke).idx === 0), - li = lt(() => Dt.hasColor(x(Ke).idx)); - var fr = eE(), - bi = k(fr); - bi.__click = [Jk, It, Ke]; - var Si = k(bi); - { - var zi = mi => { - var Li = Qk(), - rr = zt(Li); - Gf(rr, { - class: "center-absolute absolute size-4 opacity-30 sm:hidden sm:size-6" - }); - var yi = V(rr, 2), - Qr = k(yi); - Gf(Qr, { - class: "text-base-content/80 size-4" - }), A(yi), H(mi, Li) - }; - Ue(Si, mi => { - x(li) || mi(zi) - }) - } - A(bi), A(fr), Ge(() => { - Or(fr, 1, Vo({ - tooltip: !0, - "max-sm:h-6": x(Qe), - "max-sm:before:translate-x-1/4": x(jt) % 8 === 0 && x(Ke).name.length > 7, - "max-sm:before:-translate-x-1/4": (x(jt) - 7) % 8 === 0 && x(Ke).name.length > 7, - "max-xl:before:translate-x-1/4": x(jt) % 16 === 0 && x(Ke).name.length > 7, - "max-xl:before:-translate-x-1/4": (x(jt) - 15) % 16 === 0 && x(Ke).name.length > 7, - "xl:before:translate-x-1/4": x(Qe) && x(jt) % 32 === 0 && x(Ke).name.length > 7, - "xl:before:-translate-x-1/4": x(Qe) && (x(jt) - 31) % 32 === 0 && x(Ke).name.length > 7 - })), zr(fr, "data-tip", x(Ke).name), Or(bi, 1, Vo({ - "btn relative aspect-square w-full rounded-xl": !0, - "border-primary ring-primary ring-2": x(Dr), - "border-base-300": !x(Dr) && x(Gr), - "border-base-content/20": !x(Dr) && !x(Gr), - "max-sm:h-6 max-sm:rounded-md": x(Qe) - })), uc(bi, x(Gr) ? `background-image: url(${hk}); background-size: cover; image-rendering: pixelated;` : `background: rgb(${x(Gt).r} ${x(Gt).g} ${x(Gt).b})`), zr(bi, "aria-label", x(Ke).name), zr(bi, "id", `color-${x(Ke).idx??""}`) - }), an("focus", bi, () => { - x(li) && (oe(F, x(Ke).idx, !0), oe(T, "pencil")) - }), H(Mt, fr) - }), A(xe), A(Ot); - var At = V(Ot, 2), - Pt = k(At); - Pt.__click = [tE, Qe]; - var kt = k(Pt); - { - var Wt = Mt => { - Fk(Mt, { - class: "size-5" - }) - }, - Lr = Mt => { - Nk(Mt, { - class: "size-5" - }) - }; - Ue(kt, Mt => { - x(Qe) ? Mt(Wt) : Mt(Lr, !1) - }) - } - A(Pt); - var Kr = V(Pt, 2), - Hr = k(Kr); - { - let Mt = lt(() => x(W) > 100 ? "animate-pulse" : ""), - Ke = lt(() => x(W) === 0 || x(ie) || x(X) < 0 || !oa.captcha), - jt = lt(() => x(ie) || !oa.captcha); - kv(Hr, { - get class() { - return x(Mt) - }, - get charges() { - return x(X) - }, - get disabled() { - return x(Ke) - }, - get loading() { - return x(jt) - }, - onclick: async () => { - var Gr; - const Gt = (Gr = oa.captcha) == null ? void 0 : Gr.token; - if (!Gt) return; - pa.droppletAndPlop.play(); - const Dr = [...o.values()]; - oe(ie, !0); - try { - await ni.paint(Dr, Gt), await ox(Dr), dt(), Dt.refresh(), Id.shouldReload = !0, await xt() - } catch (li) { - qr.error(`${li.message}`, { - duration: 7e3 - }) - } finally { - oe(ie, !1) - } - } - }) - } - A(Kr); - var $r = V(Kr, 2), - mr = k($r), - gr = k(mr), - ai = k(gr); - fi(), A(gr); - var Tt = V(gr, 2); - let Ci; - Tt.__click = [rE, T]; - var di = k(Tt); - lg(di, { - class: "size-5", - get filled() { - return x(Ee) - } - }), A(Tt), A(mr), A($r), A(At), A(Xt), ps(Xt, Mt => oe(Be, Mt), () => x(Be)); - var Pn = V(Xt, 2); - Mk(Pn, { - get colorIdx() { - return x(ct) - }, - get open() { - return x(Xe) - }, - set open(Mt) { - oe(Xe, Mt, !0) - } - }), Ge((Mt, Ke, jt, Gt, Dr, Gr) => { - fe(Ar, `${Mt??""} `), fe(O, `${Ke??""} `), Or(q, 1, Vo({ - "btn btn-circle btn-sm": !0, - "btn-ghost": !x(Ne), - "btn-primary": x(Ne) - })), zr(K, "data-tip", jt), ve = Or(le, 1, "btn btn-sm btn-circle btn-ghost text-base-content/80", null, ve, Gt), Or(xe, 1, Vo({ - "md:grid-cols-16 min-[100rem]:grid-cols-32 grid grid-cols-8": !0, - "xl:grid-cols-32 sm:grid-cols-16 gap-0.5 sm:gap-1": x(Qe), - "gap-1": !x(Qe) - })), fe(ai, `${Dr??""} `), Ci = Or(Tt, 1, "btn btn-lg btn-square sm:btn-xl shadow-md", null, Ci, Gr), Tt.disabled = x(W) === 0 - }, [() => Dw(), () => Fw(), () => Ug(), () => ({ - "text-primary": !C() - }), () => dx(), () => ({ - "btn-primary": x(Ee) - })]), $d("innerHeight", Mt => oe(Je, Mt, !0)), H(b, Lt), Pr() -} -Wi(["click"]); - -function dm(...b) { - return Fg(Tu(b)) -} -var aE = Ie("
        "); - -function sE(b, l) { - Sr(l, !0); - let _ = Et(l, "ref", 15, null), - C = Qt(l, ["$$slots", "$$events", "$$legacy", "ref", "class", "children"]); - var L = aE(); - er(L, T => ({ - class: T, - ...C - }), [() => dm("flex items-center", l.class)]); - var F = k(L); - Ji(F, () => l.children ?? fa), A(L), ps(L, T => _(T), () => _()), H(b, L), Pr() -} -var oE = Ie('
        '), - lE = Ie(" ", 1); - -function cE(b, l) { - Sr(l, !0); - let _ = Et(l, "ref", 15, null), - C = Qt(l, ["$$slots", "$$events", "$$legacy", "ref", "cell", "class"]); - var L = Jt(), - F = zt(L); - { - let T = lt(() => dm("border-input relative flex size-12 items-center justify-center border-y border-r text-xl transition-all first:rounded-l-md first:border-l last:rounded-r-md", l.cell.isActive && "ring-base-content/40 z-10 ring-2", l.class)); - _n(F, () => iA, (o, $) => { - $(o, lo({ - get cell() { - return l.cell - }, - get class() { - return x(T) - } - }, () => C, { - get ref() { - return _() - }, - set ref(W) { - _(W) - }, - children: (W, ie) => { - fi(); - var pe = lE(), - ye = zt(pe), - X = V(ye); - { - var Se = we => { - var Re = oE(); - H(we, Re) - }; - Ue(X, we => { - l.cell.hasFakeCaret && we(Se) - }) - } - Ge(() => fe(ye, `${l.cell.char??""} `)), H(W, pe) - }, - $$slots: { - default: !0 - } - })) - }) - } - H(b, L), Pr() -} - -function uE(b, l) { - Sr(l, !0); - let _ = Et(l, "ref", 15, null), - C = Et(l, "value", 15, ""), - L = Qt(l, ["$$slots", "$$events", "$$legacy", "ref", "class", "value"]); - var F = Jt(), - T = zt(F); - { - let o = lt(() => dm("flex items-center gap-2 has-[:disabled]:opacity-50 [&_input]:disabled:cursor-not-allowed", l.class)); - _n(T, () => tA, ($, W) => { - W($, lo({ - get class() { - return x(o) - } - }, () => L, { - get ref() { - return _() - }, - set ref(ie) { - _(ie) - }, - get value() { - return C() - }, - set value(ie) { - C(ie) - } - })) - }) - } - H(b, F), Pr() -} -var gf = { - exports: {} - }, - Sg; - -function hE() { - return Sg || (Sg = 1, (function(b) { - (function(l) { - b.exports ? b.exports = l() : window.intlTelInput = l() - })(() => { - var l = (() => { - var _ = Object.defineProperty, - C = Object.getOwnPropertyDescriptor, - L = Object.getOwnPropertyNames, - F = Object.prototype.hasOwnProperty, - T = (Q, te) => { - for (var _e in te) _(Q, _e, { - get: te[_e], - enumerable: !0 - }) - }, - o = (Q, te, _e, ne) => { - if (te && typeof te == "object" || typeof te == "function") - for (let Pe of L(te)) !F.call(Q, Pe) && Pe !== _e && _(Q, Pe, { - get: () => te[Pe], - enumerable: !(ne = C(te, Pe)) || ne.enumerable - }); - return Q - }, - $ = Q => o(_({}, "__esModule", { - value: !0 - }), Q), - W = {}; - T(W, { - Iti: () => it, - default: () => vt - }); - var ie = [ - ["af", "93"], - ["ax", "358", 1], - ["al", "355"], - ["dz", "213"], - ["as", "1", 5, ["684"]], - ["ad", "376"], - ["ao", "244"], - ["ai", "1", 6, ["264"]], - ["ag", "1", 7, ["268"]], - ["ar", "54"], - ["am", "374"], - ["aw", "297"], - ["ac", "247"], - ["au", "61", 0, null, "0"], - ["at", "43"], - ["az", "994"], - ["bs", "1", 8, ["242"]], - ["bh", "973"], - ["bd", "880"], - ["bb", "1", 9, ["246"]], - ["by", "375"], - ["be", "32"], - ["bz", "501"], - ["bj", "229"], - ["bm", "1", 10, ["441"]], - ["bt", "975"], - ["bo", "591"], - ["ba", "387"], - ["bw", "267"], - ["br", "55"], - ["io", "246"], - ["vg", "1", 11, ["284"]], - ["bn", "673"], - ["bg", "359"], - ["bf", "226"], - ["bi", "257"], - ["kh", "855"], - ["cm", "237"], - ["ca", "1", 1, ["204", "226", "236", "249", "250", "263", "289", "306", "343", "354", "365", "367", "368", "382", "387", "403", "416", "418", "428", "431", "437", "438", "450", "584", "468", "474", "506", "514", "519", "548", "579", "581", "584", "587", "604", "613", "639", "647", "672", "683", "705", "709", "742", "753", "778", "780", "782", "807", "819", "825", "867", "873", "879", "902", "905"]], - ["cv", "238"], - ["bq", "599", 1, ["3", "4", "7"]], - ["ky", "1", 12, ["345"]], - ["cf", "236"], - ["td", "235"], - ["cl", "56"], - ["cn", "86"], - ["cx", "61", 2, ["89164"], "0"], - ["cc", "61", 1, ["89162"], "0"], - ["co", "57"], - ["km", "269"], - ["cg", "242"], - ["cd", "243"], - ["ck", "682"], - ["cr", "506"], - ["ci", "225"], - ["hr", "385"], - ["cu", "53"], - ["cw", "599", 0], - ["cy", "357"], - ["cz", "420"], - ["dk", "45"], - ["dj", "253"], - ["dm", "1", 13, ["767"]], - ["do", "1", 2, ["809", "829", "849"]], - ["ec", "593"], - ["eg", "20"], - ["sv", "503"], - ["gq", "240"], - ["er", "291"], - ["ee", "372"], - ["sz", "268"], - ["et", "251"], - ["fk", "500"], - ["fo", "298"], - ["fj", "679"], - ["fi", "358", 0], - ["fr", "33"], - ["gf", "594"], - ["pf", "689"], - ["ga", "241"], - ["gm", "220"], - ["ge", "995"], - ["de", "49"], - ["gh", "233"], - ["gi", "350"], - ["gr", "30"], - ["gl", "299"], - ["gd", "1", 14, ["473"]], - ["gp", "590", 0], - ["gu", "1", 15, ["671"]], - ["gt", "502"], - ["gg", "44", 1, ["1481", "7781", "7839", "7911"], "0"], - ["gn", "224"], - ["gw", "245"], - ["gy", "592"], - ["ht", "509"], - ["hn", "504"], - ["hk", "852"], - ["hu", "36"], - ["is", "354"], - ["in", "91"], - ["id", "62"], - ["ir", "98"], - ["iq", "964"], - ["ie", "353"], - ["im", "44", 2, ["1624", "74576", "7524", "7924", "7624"], "0"], - ["il", "972"], - ["it", "39", 0], - ["jm", "1", 4, ["876", "658"]], - ["jp", "81"], - ["je", "44", 3, ["1534", "7509", "7700", "7797", "7829", "7937"], "0"], - ["jo", "962"], - ["kz", "7", 1, ["33", "7"], "8"], - ["ke", "254"], - ["ki", "686"], - ["xk", "383"], - ["kw", "965"], - ["kg", "996"], - ["la", "856"], - ["lv", "371"], - ["lb", "961"], - ["ls", "266"], - ["lr", "231"], - ["ly", "218"], - ["li", "423"], - ["lt", "370"], - ["lu", "352"], - ["mo", "853"], - ["mg", "261"], - ["mw", "265"], - ["my", "60"], - ["mv", "960"], - ["ml", "223"], - ["mt", "356"], - ["mh", "692"], - ["mq", "596"], - ["mr", "222"], - ["mu", "230"], - ["yt", "262", 1, ["269", "639"], "0"], - ["mx", "52"], - ["fm", "691"], - ["md", "373"], - ["mc", "377"], - ["mn", "976"], - ["me", "382"], - ["ms", "1", 16, ["664"]], - ["ma", "212", 0, null, "0"], - ["mz", "258"], - ["mm", "95"], - ["na", "264"], - ["nr", "674"], - ["np", "977"], - ["nl", "31"], - ["nc", "687"], - ["nz", "64"], - ["ni", "505"], - ["ne", "227"], - ["ng", "234"], - ["nu", "683"], - ["nf", "672"], - ["kp", "850"], - ["mk", "389"], - ["mp", "1", 17, ["670"]], - ["no", "47", 0], - ["om", "968"], - ["pk", "92"], - ["pw", "680"], - ["ps", "970"], - ["pa", "507"], - ["pg", "675"], - ["py", "595"], - ["pe", "51"], - ["ph", "63"], - ["pl", "48"], - ["pt", "351"], - ["pr", "1", 3, ["787", "939"]], - ["qa", "974"], - ["re", "262", 0, null, "0"], - ["ro", "40"], - ["ru", "7", 0, null, "8"], - ["rw", "250"], - ["ws", "685"], - ["sm", "378"], - ["st", "239"], - ["sa", "966"], - ["sn", "221"], - ["rs", "381"], - ["sc", "248"], - ["sl", "232"], - ["sg", "65"], - ["sx", "1", 21, ["721"]], - ["sk", "421"], - ["si", "386"], - ["sb", "677"], - ["so", "252"], - ["za", "27"], - ["kr", "82"], - ["ss", "211"], - ["es", "34"], - ["lk", "94"], - ["bl", "590", 1], - ["sh", "290"], - ["kn", "1", 18, ["869"]], - ["lc", "1", 19, ["758"]], - ["mf", "590", 2], - ["pm", "508"], - ["vc", "1", 20, ["784"]], - ["sd", "249"], - ["sr", "597"], - ["sj", "47", 1, ["79"]], - ["se", "46"], - ["ch", "41"], - ["sy", "963"], - ["tw", "886"], - ["tj", "992"], - ["tz", "255"], - ["th", "66"], - ["tl", "670"], - ["tg", "228"], - ["tk", "690"], - ["to", "676"], - ["tt", "1", 22, ["868"]], - ["tn", "216"], - ["tr", "90"], - ["tm", "993"], - ["tc", "1", 23, ["649"]], - ["tv", "688"], - ["ug", "256"], - ["ua", "380"], - ["ae", "971"], - ["gb", "44", 0, null, "0"], - ["us", "1", 0], - ["uy", "598"], - ["vi", "1", 24, ["340"]], - ["uz", "998"], - ["vu", "678"], - ["va", "39", 1, ["06698"]], - ["ve", "58"], - ["vn", "84"], - ["wf", "681"], - ["eh", "212", 1, ["5288", "5289"], "0"], - ["ye", "967"], - ["zm", "260"], - ["zw", "263"] - ], - pe = []; - for (let Q = 0; Q < ie.length; Q++) { - const te = ie[Q]; - pe[Q] = { - name: "", - iso2: te[0], - dialCode: te[1], - priority: te[2] || 0, - areaCodes: te[3] || null, - nodeById: {}, - nationalPrefix: te[4] || null - } - } - var ye = pe, - X = { - ad: "Andorra", - ae: "United Arab Emirates", - af: "Afghanistan", - ag: "Antigua & Barbuda", - ai: "Anguilla", - al: "Albania", - am: "Armenia", - ao: "Angola", - ar: "Argentina", - as: "American Samoa", - at: "Austria", - au: "Australia", - aw: "Aruba", - ax: "Åland Islands", - az: "Azerbaijan", - ba: "Bosnia & Herzegovina", - bb: "Barbados", - bd: "Bangladesh", - be: "Belgium", - bf: "Burkina Faso", - bg: "Bulgaria", - bh: "Bahrain", - bi: "Burundi", - bj: "Benin", - bl: "St. Barthélemy", - bm: "Bermuda", - bn: "Brunei", - bo: "Bolivia", - bq: "Caribbean Netherlands", - br: "Brazil", - bs: "Bahamas", - bt: "Bhutan", - bw: "Botswana", - by: "Belarus", - bz: "Belize", - ca: "Canada", - cc: "Cocos (Keeling) Islands", - cd: "Congo - Kinshasa", - cf: "Central African Republic", - cg: "Congo - Brazzaville", - ch: "Switzerland", - ci: "Côte d’Ivoire", - ck: "Cook Islands", - cl: "Chile", - cm: "Cameroon", - cn: "China", - co: "Colombia", - cr: "Costa Rica", - cu: "Cuba", - cv: "Cape Verde", - cw: "Curaçao", - cx: "Christmas Island", - cy: "Cyprus", - cz: "Czechia", - de: "Germany", - dj: "Djibouti", - dk: "Denmark", - dm: "Dominica", - do: "Dominican Republic", - dz: "Algeria", - ec: "Ecuador", - ee: "Estonia", - eg: "Egypt", - eh: "Western Sahara", - er: "Eritrea", - es: "Spain", - et: "Ethiopia", - fi: "Finland", - fj: "Fiji", - fk: "Falkland Islands", - fm: "Micronesia", - fo: "Faroe Islands", - fr: "France", - ga: "Gabon", - gb: "United Kingdom", - gd: "Grenada", - ge: "Georgia", - gf: "French Guiana", - gg: "Guernsey", - gh: "Ghana", - gi: "Gibraltar", - gl: "Greenland", - gm: "Gambia", - gn: "Guinea", - gp: "Guadeloupe", - gq: "Equatorial Guinea", - gr: "Greece", - gt: "Guatemala", - gu: "Guam", - gw: "Guinea-Bissau", - gy: "Guyana", - hk: "Hong Kong SAR China", - hn: "Honduras", - hr: "Croatia", - ht: "Haiti", - hu: "Hungary", - id: "Indonesia", - ie: "Ireland", - il: "Israel", - im: "Isle of Man", - in: "India", - io: "British Indian Ocean Territory", - iq: "Iraq", - ir: "Iran", - is: "Iceland", - it: "Italy", - je: "Jersey", - jm: "Jamaica", - jo: "Jordan", - jp: "Japan", - ke: "Kenya", - kg: "Kyrgyzstan", - kh: "Cambodia", - ki: "Kiribati", - km: "Comoros", - kn: "St. Kitts & Nevis", - kp: "North Korea", - kr: "South Korea", - kw: "Kuwait", - ky: "Cayman Islands", - kz: "Kazakhstan", - la: "Laos", - lb: "Lebanon", - lc: "St. Lucia", - li: "Liechtenstein", - lk: "Sri Lanka", - lr: "Liberia", - ls: "Lesotho", - lt: "Lithuania", - lu: "Luxembourg", - lv: "Latvia", - ly: "Libya", - ma: "Morocco", - mc: "Monaco", - md: "Moldova", - me: "Montenegro", - mf: "St. Martin", - mg: "Madagascar", - mh: "Marshall Islands", - mk: "North Macedonia", - ml: "Mali", - mm: "Myanmar (Burma)", - mn: "Mongolia", - mo: "Macao SAR China", - mp: "Northern Mariana Islands", - mq: "Martinique", - mr: "Mauritania", - ms: "Montserrat", - mt: "Malta", - mu: "Mauritius", - mv: "Maldives", - mw: "Malawi", - mx: "Mexico", - my: "Malaysia", - mz: "Mozambique", - na: "Namibia", - nc: "New Caledonia", - ne: "Niger", - nf: "Norfolk Island", - ng: "Nigeria", - ni: "Nicaragua", - nl: "Netherlands", - no: "Norway", - np: "Nepal", - nr: "Nauru", - nu: "Niue", - nz: "New Zealand", - om: "Oman", - pa: "Panama", - pe: "Peru", - pf: "French Polynesia", - pg: "Papua New Guinea", - ph: "Philippines", - pk: "Pakistan", - pl: "Poland", - pm: "St. Pierre & Miquelon", - pr: "Puerto Rico", - ps: "Palestinian Territories", - pt: "Portugal", - pw: "Palau", - py: "Paraguay", - qa: "Qatar", - re: "Réunion", - ro: "Romania", - rs: "Serbia", - ru: "Russia", - rw: "Rwanda", - sa: "Saudi Arabia", - sb: "Solomon Islands", - sc: "Seychelles", - sd: "Sudan", - se: "Sweden", - sg: "Singapore", - sh: "St. Helena", - si: "Slovenia", - sj: "Svalbard & Jan Mayen", - sk: "Slovakia", - sl: "Sierra Leone", - sm: "San Marino", - sn: "Senegal", - so: "Somalia", - sr: "Suriname", - ss: "South Sudan", - st: "São Tomé & Príncipe", - sv: "El Salvador", - sx: "Sint Maarten", - sy: "Syria", - sz: "Eswatini", - tc: "Turks & Caicos Islands", - td: "Chad", - tg: "Togo", - th: "Thailand", - tj: "Tajikistan", - tk: "Tokelau", - tl: "Timor-Leste", - tm: "Turkmenistan", - tn: "Tunisia", - to: "Tonga", - tr: "Turkey", - tt: "Trinidad & Tobago", - tv: "Tuvalu", - tw: "Taiwan Province of China", - tz: "Tanzania", - ua: "Ukraine", - ug: "Uganda", - us: "United States", - uy: "Uruguay", - uz: "Uzbekistan", - va: "Vatican City", - vc: "St. Vincent & Grenadines", - ve: "Venezuela", - vg: "British Virgin Islands", - vi: "U.S. Virgin Islands", - vn: "Vietnam", - vu: "Vanuatu", - wf: "Wallis & Futuna", - ws: "Samoa", - ye: "Yemen", - yt: "Mayotte", - za: "South Africa", - zm: "Zambia", - zw: "Zimbabwe" - }, - Se = X, - we = { - selectedCountryAriaLabel: "Selected country", - noCountrySelected: "No country selected", - countryListAriaLabel: "List of countries", - searchPlaceholder: "Search", - zeroSearchResults: "No results found", - oneSearchResult: "1 result found", - multipleSearchResults: "${count} results found", - ac: "Ascension Island", - xk: "Kosovo" - }, - Re = we, - Ae = { - ...Se, - ...Re - }, - Oe = Ae; - for (let Q = 0; Q < ye.length; Q++) ye[Q].name = Oe[ye[Q].iso2]; - var Ee = 0, - Ne = { - allowDropdown: !0, - autoPlaceholder: "polite", - containerClass: "", - countryOrder: null, - countrySearch: !0, - customPlaceholder: null, - dropdownContainer: null, - excludeCountries: [], - fixDropdownWidth: !0, - formatAsYouType: !0, - formatOnDisplay: !0, - geoIpLookup: null, - hiddenInput: null, - i18n: {}, - initialCountry: "", - loadUtils: null, - nationalMode: !0, - onlyCountries: [], - placeholderNumberType: "MOBILE", - showFlags: !0, - separateDialCode: !1, - strictMode: !1, - useFullscreenPopup: typeof navigator < "u" && typeof window < "u" ? /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) || window.innerWidth <= 500 : !1, - validationNumberTypes: ["MOBILE"] - }, - ft = ["800", "822", "833", "844", "855", "866", "877", "880", "881", "882", "883", "884", "885", "886", "887", "888", "889"], - ht = Q => Q.replace(/\D/g, ""), - Xe = (Q = "") => Q.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), - ct = Q => { - const te = ht(Q); - if (te.charAt(0) === "1") { - const _e = te.substr(1, 3); - return ft.includes(_e) - } - return !1 - }, - Je = (Q, te, _e, ne) => { - if (_e === 0 && !ne) return 0; - let Pe = 0; - for (let Me = 0; Me < te.length; Me++) { - if (/[+0-9]/.test(te[Me]) && Pe++, Pe === Q && !ne) return Me + 1; - if (ne && Pe === Q + 1) return Me - } - return te.length - }, - Be = (Q, te, _e) => { - const ne = document.createElement(Q); - return te && Object.entries(te).forEach(([Pe, Me]) => ne.setAttribute(Pe, Me)), _e && _e.appendChild(ne), ne - }, - st = (Q, ...te) => { - const { - instances: _e - } = ke; - Object.values(_e).forEach(ne => ne[Q](...te)) - }, - it = class { - constructor(Q, te = {}) { - this.id = Ee++, this.telInput = Q, this.highlightedItem = null, this.options = Object.assign({}, Ne, te), this.hadInitialPlaceholder = !!Q.getAttribute("placeholder") - } - _init() { - this.options.useFullscreenPopup && (this.options.fixDropdownWidth = !1), this.options.onlyCountries.length === 1 && (this.options.initialCountry = this.options.onlyCountries[0]), this.options.separateDialCode && (this.options.nationalMode = !1), this.options.allowDropdown && !this.options.showFlags && !this.options.separateDialCode && (this.options.nationalMode = !1), this.options.useFullscreenPopup && !this.options.dropdownContainer && (this.options.dropdownContainer = document.body), this.isAndroid = typeof navigator < "u" ? /Android/i.test(navigator.userAgent) : !1, this.isRTL = !!this.telInput.closest("[dir=rtl]"); - const Q = this.options.allowDropdown || this.options.separateDialCode; - this.showSelectedCountryOnLeft = this.isRTL ? !Q : Q, this.options.separateDialCode && (this.isRTL ? this.originalPaddingRight = this.telInput.style.paddingRight : this.originalPaddingLeft = this.telInput.style.paddingLeft), this.options.i18n = { - ...Oe, - ...this.options.i18n - }; - const te = new Promise((ne, Pe) => { - this.resolveAutoCountryPromise = ne, this.rejectAutoCountryPromise = Pe - }), - _e = new Promise((ne, Pe) => { - this.resolveUtilsScriptPromise = ne, this.rejectUtilsScriptPromise = Pe - }); - this.promise = Promise.all([te, _e]), this.selectedCountryData = {}, this._processCountryData(), this._generateMarkup(), this._setInitialState(), this._initListeners(), this._initRequests() - } - _processCountryData() { - this._processAllCountries(), this._processDialCodes(), this._translateCountryNames(), this._sortCountries() - } - _sortCountries() { - this.options.countryOrder && (this.options.countryOrder = this.options.countryOrder.map(Q => Q.toLowerCase())), this.countries.sort((Q, te) => { - const { - countryOrder: _e - } = this.options; - if (_e) { - const ne = _e.indexOf(Q.iso2), - Pe = _e.indexOf(te.iso2), - Me = ne > -1, - at = Pe > -1; - if (Me || at) return Me && at ? ne - Pe : Me ? -1 : 1 - } - return Q.name.localeCompare(te.name) - }) - } - _addToDialCodeMap(Q, te, _e) { - te.length > this.dialCodeMaxLen && (this.dialCodeMaxLen = te.length), this.dialCodeToIso2Map.hasOwnProperty(te) || (this.dialCodeToIso2Map[te] = []); - for (let Pe = 0; Pe < this.dialCodeToIso2Map[te].length; Pe++) - if (this.dialCodeToIso2Map[te][Pe] === Q) return; - const ne = _e !== void 0 ? _e : this.dialCodeToIso2Map[te].length; - this.dialCodeToIso2Map[te][ne] = Q - } - _processAllCountries() { - const { - onlyCountries: Q, - excludeCountries: te - } = this.options; - if (Q.length) { - const _e = Q.map(ne => ne.toLowerCase()); - this.countries = ye.filter(ne => _e.includes(ne.iso2)) - } else if (te.length) { - const _e = te.map(ne => ne.toLowerCase()); - this.countries = ye.filter(ne => !_e.includes(ne.iso2)) - } else this.countries = ye - } - _translateCountryNames() { - for (let Q = 0; Q < this.countries.length; Q++) { - const te = this.countries[Q].iso2.toLowerCase(); - this.options.i18n.hasOwnProperty(te) && (this.countries[Q].name = this.options.i18n[te]) - } - } - _processDialCodes() { - this.dialCodes = {}, this.dialCodeMaxLen = 0, this.dialCodeToIso2Map = {}; - for (let Q = 0; Q < this.countries.length; Q++) { - const te = this.countries[Q]; - this.dialCodes[te.dialCode] || (this.dialCodes[te.dialCode] = !0), this._addToDialCodeMap(te.iso2, te.dialCode, te.priority) - } - for (let Q = 0; Q < this.countries.length; Q++) { - const te = this.countries[Q]; - if (te.areaCodes) { - const _e = this.dialCodeToIso2Map[te.dialCode][0]; - for (let ne = 0; ne < te.areaCodes.length; ne++) { - const Pe = te.areaCodes[ne]; - for (let Me = 1; Me < Pe.length; Me++) { - const at = Pe.substr(0, Me), - We = te.dialCode + at; - this._addToDialCodeMap(_e, We), this._addToDialCodeMap(te.iso2, We) - } - this._addToDialCodeMap(te.iso2, te.dialCode + Pe) - } - } - } - } - _generateMarkup() { - var pt, It, ut; - this.telInput.classList.add("iti__tel-input"), !this.telInput.hasAttribute("autocomplete") && !(this.telInput.form && this.telInput.form.hasAttribute("autocomplete")) && this.telInput.setAttribute("autocomplete", "off"); - const { - allowDropdown: Q, - separateDialCode: te, - showFlags: _e, - containerClass: ne, - hiddenInput: Pe, - dropdownContainer: Me, - fixDropdownWidth: at, - useFullscreenPopup: We, - countrySearch: Ct, - i18n: _t - } = this.options; - let xt = "iti"; - Q && (xt += " iti--allow-dropdown"), _e && (xt += " iti--show-flags"), ne && (xt += ` ${ne}`), We || (xt += " iti--inline-dropdown"); - const tt = Be("div", { - class: xt - }); - if ((pt = this.telInput.parentNode) == null || pt.insertBefore(tt, this.telInput), Q || _e || te) { - this.countryContainer = Be("div", { - class: "iti__country-container" - }, tt), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", Q ? (this.selectedCountry = Be("button", { - type: "button", - class: "iti__selected-country", - "aria-expanded": "false", - "aria-label": this.options.i18n.selectedCountryAriaLabel, - "aria-haspopup": "true", - "aria-controls": `iti-${this.id}__dropdown-content`, - role: "combobox" - }, this.countryContainer), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = Be("div", { - class: "iti__selected-country" - }, this.countryContainer); - const bt = Be("div", { - class: "iti__selected-country-primary" - }, this.selectedCountry); - if (this.selectedCountryInner = Be("div", { - class: "iti__flag" - }, bt), this.selectedCountryA11yText = Be("span", { - class: "iti__a11y-text" - }, this.selectedCountryInner), Q && (this.dropdownArrow = Be("div", { - class: "iti__arrow", - "aria-hidden": "true" - }, bt)), te && (this.selectedDialCode = Be("div", { - class: "iti__selected-dial-code" - }, this.selectedCountry)), Q) { - const wt = at ? "" : "iti--flexible-dropdown-width"; - if (this.dropdownContent = Be("div", { - id: `iti-${this.id}__dropdown-content`, - class: `iti__dropdown-content iti__hide ${wt}` - }), Ct && (this.searchInput = Be("input", { - type: "text", - class: "iti__search-input", - placeholder: _t.searchPlaceholder, - role: "combobox", - "aria-expanded": "true", - "aria-label": _t.searchPlaceholder, - "aria-controls": `iti-${this.id}__country-listbox`, - "aria-autocomplete": "list", - autocomplete: "off" - }, this.dropdownContent), this.searchResultsA11yText = Be("span", { - class: "iti__a11y-text" - }, this.dropdownContent)), this.countryList = Be("ul", { - class: "iti__country-list", - id: `iti-${this.id}__country-listbox`, - role: "listbox", - "aria-label": _t.countryListAriaLabel - }, this.dropdownContent), this._appendListItems(), Ct && this._updateSearchResultsText(), Me) { - let dt = "iti iti--container"; - We ? dt += " iti--fullscreen-popup" : dt += " iti--inline-dropdown", this.dropdown = Be("div", { - class: dt - }), this.dropdown.appendChild(this.dropdownContent) - } else this.countryContainer.appendChild(this.dropdownContent) - } - } - if (tt.appendChild(this.telInput), this._updateInputPadding(), Pe) { - const bt = this.telInput.getAttribute("name") || "", - wt = Pe(bt); - if (wt.phone) { - const dt = (It = this.telInput.form) == null ? void 0 : It.querySelector(`input[name="${wt.phone}"]`); - dt ? this.hiddenInput = dt : (this.hiddenInput = Be("input", { - type: "hidden", - name: wt.phone - }), tt.appendChild(this.hiddenInput)) - } - if (wt.country) { - const dt = (ut = this.telInput.form) == null ? void 0 : ut.querySelector(`input[name="${wt.country}"]`); - dt ? this.hiddenInputCountry = dt : (this.hiddenInputCountry = Be("input", { - type: "hidden", - name: wt.country - }), tt.appendChild(this.hiddenInputCountry)) - } - } - } - _appendListItems() { - for (let Q = 0; Q < this.countries.length; Q++) { - const te = this.countries[Q], - _e = Q === 0 ? "iti__highlight" : "", - ne = Be("li", { - id: `iti-${this.id}__item-${te.iso2}`, - class: `iti__country ${_e}`, - tabindex: "-1", - role: "option", - "data-dial-code": te.dialCode, - "data-country-code": te.iso2, - "aria-selected": "false" - }, this.countryList); - te.nodeById[this.id] = ne; - let Pe = ""; - this.options.showFlags && (Pe += `
        `), Pe += `${te.name}`, Pe += `+${te.dialCode}`, ne.insertAdjacentHTML("beforeend", Pe) - } - } - _setInitialState(Q = !1) { - const te = this.telInput.getAttribute("value"), - _e = this.telInput.value, - Pe = te && te.charAt(0) === "+" && (!_e || _e.charAt(0) !== "+") ? te : _e, - Me = this._getDialCode(Pe), - at = ct(Pe), - { - initialCountry: We, - geoIpLookup: Ct - } = this.options, - _t = We === "auto" && Ct; - if (Me && !at) this._updateCountryFromNumber(Pe); - else if (!_t || Q) { - const xt = We ? We.toLowerCase() : ""; - xt && this._getCountryData(xt, !0) ? this._setCountry(xt) : Me && at ? this._setCountry("us") : this._setCountry() - } - Pe && this._updateValFromNumber(Pe) - } - _initListeners() { - this._initTelInputListeners(), this.options.allowDropdown && this._initDropdownListeners(), (this.hiddenInput || this.hiddenInputCountry) && this.telInput.form && this._initHiddenInputListener() - } - _initHiddenInputListener() { - var Q; - this._handleHiddenInputSubmit = () => { - this.hiddenInput && (this.hiddenInput.value = this.getNumber()), this.hiddenInputCountry && (this.hiddenInputCountry.value = this.getSelectedCountryData().iso2 || "") - }, (Q = this.telInput.form) == null || Q.addEventListener("submit", this._handleHiddenInputSubmit) - } - _initDropdownListeners() { - this._handleLabelClick = te => { - this.dropdownContent.classList.contains("iti__hide") ? this.telInput.focus() : te.preventDefault() - }; - const Q = this.telInput.closest("label"); - Q && Q.addEventListener("click", this._handleLabelClick), this._handleClickSelectedCountry = () => { - this.dropdownContent.classList.contains("iti__hide") && !this.telInput.disabled && !this.telInput.readOnly && this._openDropdown() - }, this.selectedCountry.addEventListener("click", this._handleClickSelectedCountry), this._handleCountryContainerKeydown = te => { - this.dropdownContent.classList.contains("iti__hide") && ["ArrowUp", "ArrowDown", " ", "Enter"].includes(te.key) && (te.preventDefault(), te.stopPropagation(), this._openDropdown()), te.key === "Tab" && this._closeDropdown() - }, this.countryContainer.addEventListener("keydown", this._handleCountryContainerKeydown) - } - _initRequests() { - let { - loadUtils: Q, - initialCountry: te, - geoIpLookup: _e - } = this.options; - Q && !ke.utils ? (this._handlePageLoad = () => { - var Pe; - window.removeEventListener("load", this._handlePageLoad), (Pe = ke.attachUtils(Q)) == null || Pe.catch(() => {}) - }, ke.documentReady() ? this._handlePageLoad() : window.addEventListener("load", this._handlePageLoad)) : this.resolveUtilsScriptPromise(), te === "auto" && _e && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise() - } - _loadAutoCountry() { - ke.autoCountry ? this.handleAutoCountry() : ke.startedLoadingAutoCountry || (ke.startedLoadingAutoCountry = !0, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup((Q = "") => { - const te = Q.toLowerCase(); - te && this._getCountryData(te, !0) ? (ke.autoCountry = te, setTimeout(() => st("handleAutoCountry"))) : (this._setInitialState(!0), st("rejectAutoCountryPromise")) - }, () => { - this._setInitialState(!0), st("rejectAutoCountryPromise") - })) - } - _openDropdownWithPlus() { - this._openDropdown(), this.searchInput.value = "+", this._filterCountries("", !0) - } - _initTelInputListeners() { - const { - strictMode: Q, - formatAsYouType: te, - separateDialCode: _e, - formatOnDisplay: ne, - allowDropdown: Pe, - countrySearch: Me - } = this.options; - let at = !1; - new RegExp("\\p{L}", "u").test(this.telInput.value) && (at = !0), this._handleInputEvent = We => { - if (this.isAndroid && (We == null ? void 0 : We.data) === "+" && _e && Pe && Me) { - const tt = this.telInput.selectionStart || 0, - pt = this.telInput.value.substring(0, tt - 1), - It = this.telInput.value.substring(tt); - this.telInput.value = pt + It, this._openDropdownWithPlus(); - return - } - this._updateCountryFromNumber(this.telInput.value) && this._triggerCountryChange(); - const Ct = (We == null ? void 0 : We.data) && /[^+0-9]/.test(We.data), - _t = (We == null ? void 0 : We.inputType) === "insertFromPaste" && this.telInput.value; - Ct || _t && !Q ? at = !0 : /[^+0-9]/.test(this.telInput.value) || (at = !1); - const xt = (We == null ? void 0 : We.detail) && We.detail.isSetNumber && !ne; - if (te && !at && !xt) { - const tt = this.telInput.selectionStart || 0, - It = this.telInput.value.substring(0, tt).replace(/[^+0-9]/g, "").length, - ut = (We == null ? void 0 : We.inputType) === "deleteContentForward", - bt = this._formatNumberAsYouType(), - wt = Je(It, bt, tt, ut); - this.telInput.value = bt, this.telInput.setSelectionRange(wt, wt) - } - }, this.telInput.addEventListener("input", this._handleInputEvent), (Q || _e) && (this._handleKeydownEvent = We => { - if (We.key && We.key.length === 1 && !We.altKey && !We.ctrlKey && !We.metaKey) { - if (_e && Pe && Me && We.key === "+") { - We.preventDefault(), this._openDropdownWithPlus(); - return - } - if (Q) { - const Ct = this.telInput.value, - _t = Ct.charAt(0) === "+", - xt = !_t && this.telInput.selectionStart === 0 && We.key === "+", - tt = /^[0-9]$/.test(We.key), - pt = _e ? tt : xt || tt, - It = Ct.slice(0, this.telInput.selectionStart) + We.key + Ct.slice(this.telInput.selectionEnd), - ut = this._getFullNumber(It), - bt = ke.utils.getCoreNumber(ut, this.selectedCountryData.iso2), - wt = this.maxCoreNumberLength && bt.length > this.maxCoreNumberLength; - let dt = !1; - if (_t) { - const Lt = this.selectedCountryData.iso2; - dt = this._getCountryFromNumber(ut) !== Lt - }(!pt || wt && !dt && !xt) && We.preventDefault() - } - } - }, this.telInput.addEventListener("keydown", this._handleKeydownEvent)) - } - _cap(Q) { - const te = parseInt(this.telInput.getAttribute("maxlength") || "", 10); - return te && Q.length > te ? Q.substr(0, te) : Q - } - _trigger(Q, te = {}) { - const _e = new CustomEvent(Q, { - bubbles: !0, - cancelable: !0, - detail: te - }); - this.telInput.dispatchEvent(_e) - } - _openDropdown() { - const { - fixDropdownWidth: Q, - countrySearch: te - } = this.options; - if (Q && (this.dropdownContent.style.width = `${this.telInput.offsetWidth}px`), this.dropdownContent.classList.remove("iti__hide"), this.selectedCountry.setAttribute("aria-expanded", "true"), this._setDropdownPosition(), te) { - const _e = this.countryList.firstElementChild; - _e && (this._highlightListItem(_e, !1), this.countryList.scrollTop = 0), this.searchInput.focus() - } - this._bindDropdownListeners(), this.dropdownArrow.classList.add("iti__arrow--up"), this._trigger("open:countrydropdown") - } - _setDropdownPosition() { - if (this.options.dropdownContainer && this.options.dropdownContainer.appendChild(this.dropdown), !this.options.useFullscreenPopup) { - const Q = this.telInput.getBoundingClientRect(), - te = this.telInput.offsetHeight; - this.options.dropdownContainer && (this.dropdown.style.top = `${Q.top+te}px`, this.dropdown.style.left = `${Q.left}px`, this._handleWindowScroll = () => this._closeDropdown(), window.addEventListener("scroll", this._handleWindowScroll)) - } - } - _bindDropdownListeners() { - this._handleMouseoverCountryList = ne => { - var Me; - const Pe = (Me = ne.target) == null ? void 0 : Me.closest(".iti__country"); - Pe && this._highlightListItem(Pe, !1) - }, this.countryList.addEventListener("mouseover", this._handleMouseoverCountryList), this._handleClickCountryList = ne => { - var Me; - const Pe = (Me = ne.target) == null ? void 0 : Me.closest(".iti__country"); - Pe && this._selectListItem(Pe) - }, this.countryList.addEventListener("click", this._handleClickCountryList); - let Q = !0; - this._handleClickOffToClose = () => { - Q || this._closeDropdown(), Q = !1 - }, document.documentElement.addEventListener("click", this._handleClickOffToClose); - let te = "", - _e = null; - if (this._handleKeydownOnDropdown = ne => { - ["ArrowUp", "ArrowDown", "Enter", "Escape"].includes(ne.key) && (ne.preventDefault(), ne.stopPropagation(), ne.key === "ArrowUp" || ne.key === "ArrowDown" ? this._handleUpDownKey(ne.key) : ne.key === "Enter" ? this._handleEnterKey() : ne.key === "Escape" && this._closeDropdown()), !this.options.countrySearch && /^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(ne.key) && (ne.stopPropagation(), _e && clearTimeout(_e), te += ne.key.toLowerCase(), this._searchForCountry(te), _e = setTimeout(() => { - te = "" - }, 1e3)) - }, document.addEventListener("keydown", this._handleKeydownOnDropdown), this.options.countrySearch) { - const ne = () => { - const Me = this.searchInput.value.trim(); - Me ? this._filterCountries(Me) : this._filterCountries("", !0) - }; - let Pe = null; - this._handleSearchChange = () => { - Pe && clearTimeout(Pe), Pe = setTimeout(() => { - ne(), Pe = null - }, 100) - }, this.searchInput.addEventListener("input", this._handleSearchChange), this.searchInput.addEventListener("click", Me => Me.stopPropagation()) - } - } - _searchForCountry(Q) { - for (let te = 0; te < this.countries.length; te++) { - const _e = this.countries[te]; - if (_e.name.substr(0, Q.length).toLowerCase() === Q) { - const Pe = _e.nodeById[this.id]; - this._highlightListItem(Pe, !1), this._scrollTo(Pe); - break - } - } - } - _filterCountries(Q, te = !1) { - let _e = !0; - this.countryList.innerHTML = ""; - const ne = Xe(Q); - for (let Pe = 0; Pe < this.countries.length; Pe++) { - const Me = this.countries[Pe], - at = Xe(Me.name), - We = Me.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map(_t => _t[0]).join("").toLowerCase(), - Ct = `+${Me.dialCode}`; - if (te || at.includes(ne) || Ct.includes(ne) || Me.iso2.includes(ne) || We.includes(ne)) { - const _t = Me.nodeById[this.id]; - _t && this.countryList.appendChild(_t), _e && (this._highlightListItem(_t, !1), _e = !1) - } - } - _e && this._highlightListItem(null, !1), this.countryList.scrollTop = 0, this._updateSearchResultsText() - } - _updateSearchResultsText() { - const { - i18n: Q - } = this.options, te = this.countryList.childElementCount; - let _e; - te === 0 ? _e = Q.zeroSearchResults : te === 1 ? _e = Q.oneSearchResult : _e = Q.multipleSearchResults.replace("${count}", te.toString()), this.searchResultsA11yText.textContent = _e - } - _handleUpDownKey(Q) { - var _e, ne; - let te = Q === "ArrowUp" ? (_e = this.highlightedItem) == null ? void 0 : _e.previousElementSibling : (ne = this.highlightedItem) == null ? void 0 : ne.nextElementSibling; - !te && this.countryList.childElementCount > 1 && (te = Q === "ArrowUp" ? this.countryList.lastElementChild : this.countryList.firstElementChild), te && (this._scrollTo(te), this._highlightListItem(te, !1)) - } - _handleEnterKey() { - this.highlightedItem && this._selectListItem(this.highlightedItem) - } - _updateValFromNumber(Q) { - let te = Q; - if (this.options.formatOnDisplay && ke.utils && this.selectedCountryData) { - const _e = this.options.nationalMode || te.charAt(0) !== "+" && !this.options.separateDialCode, - { - NATIONAL: ne, - INTERNATIONAL: Pe - } = ke.utils.numberFormat, - Me = _e ? ne : Pe; - te = ke.utils.formatNumber(te, this.selectedCountryData.iso2, Me) - } - te = this._beforeSetNumber(te), this.telInput.value = te - } - _updateCountryFromNumber(Q) { - const te = this._getCountryFromNumber(Q); - return te !== null ? this._setCountry(te) : !1 - } - _ensureHasDialCode(Q) { - const { - dialCode: te, - nationalPrefix: _e - } = this.selectedCountryData; - if (Q.charAt(0) === "+" || !te) return Q; - const Me = _e && Q.charAt(0) === _e && !this.options.separateDialCode ? Q.substring(1) : Q; - return `+${te}${Me}` - } - _getCountryFromNumber(Q) { - const te = Q.indexOf("+"); - let _e = te ? Q.substring(te) : Q; - const ne = this.selectedCountryData.iso2, - Pe = this.selectedCountryData.dialCode; - _e = this._ensureHasDialCode(_e); - const Me = this._getDialCode(_e, !0), - at = ht(_e); - if (Me) { - const We = ht(Me), - Ct = this.dialCodeToIso2Map[We]; - if (!ne && this.defaultCountry && Ct.includes(this.defaultCountry)) return this.defaultCountry; - const _t = ne && Ct.includes(ne) && (at.length === We.length || !this.selectedCountryData.areaCodes); - if (!(Pe === "1" && ct(at)) && !_t) { - for (let tt = 0; tt < Ct.length; tt++) - if (Ct[tt]) return Ct[tt] - } - } else { - if (_e.charAt(0) === "+" && at.length) return ""; - if ((!_e || _e === "+") && !this.selectedCountryData.iso2) return this.defaultCountry - } - return null - } - _highlightListItem(Q, te) { - const _e = this.highlightedItem; - if (_e && (_e.classList.remove("iti__highlight"), _e.setAttribute("aria-selected", "false")), this.highlightedItem = Q, this.highlightedItem) { - this.highlightedItem.classList.add("iti__highlight"), this.highlightedItem.setAttribute("aria-selected", "true"); - const ne = this.highlightedItem.getAttribute("id") || ""; - this.selectedCountry.setAttribute("aria-activedescendant", ne), this.options.countrySearch && this.searchInput.setAttribute("aria-activedescendant", ne) - } - te && this.highlightedItem.focus() - } - _getCountryData(Q, te) { - for (let _e = 0; _e < this.countries.length; _e++) - if (this.countries[_e].iso2 === Q) return this.countries[_e]; - if (te) return null; - throw new Error(`No country data for '${Q}'`) - } - _setCountry(Q) { - const { - separateDialCode: te, - showFlags: _e, - i18n: ne - } = this.options, Pe = this.selectedCountryData.iso2 ? this.selectedCountryData : {}; - if (this.selectedCountryData = Q ? this._getCountryData(Q, !1) || {} : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountryInner) { - let Me = "", - at = ""; - Q && _e ? (Me = `iti__flag iti__${Q}`, at = `${this.selectedCountryData.name} +${this.selectedCountryData.dialCode}`) : (Me = "iti__flag iti__globe", at = ne.noCountrySelected), this.selectedCountryInner.className = Me, this.selectedCountryA11yText.textContent = at - } - if (this._setSelectedCountryTitleAttribute(Q, te), te) { - const Me = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : ""; - this.selectedDialCode.innerHTML = Me, this._updateInputPadding() - } - return this._updatePlaceholder(), this._updateMaxLength(), Pe.iso2 !== Q - } - _updateInputPadding() { - if (this.selectedCountry) { - const te = (this.selectedCountry.offsetWidth || this._getHiddenSelectedCountryWidth()) + 6; - this.showSelectedCountryOnLeft ? this.telInput.style.paddingLeft = `${te}px` : this.telInput.style.paddingRight = `${te}px` - } - } - _updateMaxLength() { - const { - strictMode: Q, - placeholderNumberType: te, - validationNumberTypes: _e - } = this.options, { - iso2: ne - } = this.selectedCountryData; - if (Q && ke.utils) - if (ne) { - const Pe = ke.utils.numberType[te]; - let Me = ke.utils.getExampleNumber(ne, !1, Pe, !0), - at = Me; - for (; ke.utils.isPossibleNumber(Me, ne, _e);) at = Me, Me += "0"; - const We = ke.utils.getCoreNumber(at, ne); - this.maxCoreNumberLength = We.length, ne === "by" && (this.maxCoreNumberLength = We.length + 1) - } else this.maxCoreNumberLength = null - } - _setSelectedCountryTitleAttribute(Q = null, te) { - if (!this.selectedCountry) return; - let _e; - Q && !te ? _e = `${this.selectedCountryData.name}: +${this.selectedCountryData.dialCode}` : Q ? _e = this.selectedCountryData.name : _e = "Unknown", this.selectedCountry.setAttribute("title", _e) - } - _getHiddenSelectedCountryWidth() { - if (this.telInput.parentNode) { - const Q = this.telInput.parentNode.cloneNode(!1); - Q.style.visibility = "hidden", document.body.appendChild(Q); - const te = this.countryContainer.cloneNode(); - Q.appendChild(te); - const _e = this.selectedCountry.cloneNode(!0); - te.appendChild(_e); - const ne = _e.offsetWidth; - return document.body.removeChild(Q), ne - } - return 0 - } - _updatePlaceholder() { - const { - autoPlaceholder: Q, - placeholderNumberType: te, - nationalMode: _e, - customPlaceholder: ne - } = this.options, Pe = Q === "aggressive" || !this.hadInitialPlaceholder && Q === "polite"; - if (ke.utils && Pe) { - const Me = ke.utils.numberType[te]; - let at = this.selectedCountryData.iso2 ? ke.utils.getExampleNumber(this.selectedCountryData.iso2, _e, Me) : ""; - at = this._beforeSetNumber(at), typeof ne == "function" && (at = ne(at, this.selectedCountryData)), this.telInput.setAttribute("placeholder", at) - } - } - _selectListItem(Q) { - const te = this._setCountry(Q.getAttribute("data-country-code")); - this._closeDropdown(), this._updateDialCode(Q.getAttribute("data-dial-code")), this.telInput.focus(), te && this._triggerCountryChange() - } - _closeDropdown() { - this.dropdownContent.classList.add("iti__hide"), this.selectedCountry.setAttribute("aria-expanded", "false"), this.selectedCountry.removeAttribute("aria-activedescendant"), this.highlightedItem && this.highlightedItem.setAttribute("aria-selected", "false"), this.options.countrySearch && this.searchInput.removeAttribute("aria-activedescendant"), this.dropdownArrow.classList.remove("iti__arrow--up"), document.removeEventListener("keydown", this._handleKeydownOnDropdown), this.options.countrySearch && this.searchInput.removeEventListener("input", this._handleSearchChange), document.documentElement.removeEventListener("click", this._handleClickOffToClose), this.countryList.removeEventListener("mouseover", this._handleMouseoverCountryList), this.countryList.removeEventListener("click", this._handleClickCountryList), this.options.dropdownContainer && (this.options.useFullscreenPopup || window.removeEventListener("scroll", this._handleWindowScroll), this.dropdown.parentNode && this.dropdown.parentNode.removeChild(this.dropdown)), this._handlePageLoad && window.removeEventListener("load", this._handlePageLoad), this._trigger("close:countrydropdown") - } - _scrollTo(Q) { - const te = this.countryList, - _e = document.documentElement.scrollTop, - ne = te.offsetHeight, - Pe = te.getBoundingClientRect().top + _e, - Me = Pe + ne, - at = Q.offsetHeight, - We = Q.getBoundingClientRect().top + _e, - Ct = We + at, - _t = We - Pe + te.scrollTop; - if (We < Pe) te.scrollTop = _t; - else if (Ct > Me) { - const xt = ne - at; - te.scrollTop = _t - xt - } - } - _updateDialCode(Q) { - const te = this.telInput.value, - _e = `+${Q}`; - let ne; - if (te.charAt(0) === "+") { - const Pe = this._getDialCode(te); - Pe ? ne = te.replace(Pe, _e) : ne = _e, this.telInput.value = ne - } - } - _getDialCode(Q, te) { - let _e = ""; - if (Q.charAt(0) === "+") { - let ne = ""; - for (let Pe = 0; Pe < Q.length; Pe++) { - const Me = Q.charAt(Pe); - if (!isNaN(parseInt(Me, 10))) { - if (ne += Me, te) this.dialCodeToIso2Map[ne] && (_e = Q.substr(0, Pe + 1)); - else if (this.dialCodes[ne]) { - _e = Q.substr(0, Pe + 1); - break - } - if (ne.length === this.dialCodeMaxLen) break - } - } - } - return _e - } - _getFullNumber(Q) { - const te = Q || this.telInput.value.trim(), - { - dialCode: _e - } = this.selectedCountryData; - let ne; - const Pe = ht(te); - return this.options.separateDialCode && te.charAt(0) !== "+" && _e && Pe ? ne = `+${_e}` : ne = "", ne + te - } - _beforeSetNumber(Q) { - let te = Q; - if (this.options.separateDialCode) { - let _e = this._getDialCode(te); - if (_e) { - _e = `+${this.selectedCountryData.dialCode}`; - const ne = te[_e.length] === " " || te[_e.length] === "-" ? _e.length + 1 : _e.length; - te = te.substr(ne) - } - } - return this._cap(te) - } - _triggerCountryChange() { - this._trigger("countrychange") - } - _formatNumberAsYouType() { - const Q = this._getFullNumber(), - te = ke.utils ? ke.utils.formatNumberAsYouType(Q, this.selectedCountryData.iso2) : Q, - { - dialCode: _e - } = this.selectedCountryData; - return this.options.separateDialCode && this.telInput.value.charAt(0) !== "+" && te.includes(`+${_e}`) ? (te.split(`+${_e}`)[1] || "").trim() : te - } - handleAutoCountry() { - this.options.initialCountry === "auto" && ke.autoCountry && (this.defaultCountry = ke.autoCountry, this.selectedCountryData.iso2 || this.selectedCountryInner.classList.contains("iti__globe") || this.setCountry(this.defaultCountry), this.resolveAutoCountryPromise()) - } - handleUtils() { - ke.utils && (this.telInput.value && this._updateValFromNumber(this.telInput.value), this.selectedCountryData.iso2 && (this._updatePlaceholder(), this._updateMaxLength())), this.resolveUtilsScriptPromise() - } - destroy() { - var Pe, Me; - const { - allowDropdown: Q, - separateDialCode: te - } = this.options; - if (Q) { - this._closeDropdown(), this.selectedCountry.removeEventListener("click", this._handleClickSelectedCountry), this.countryContainer.removeEventListener("keydown", this._handleCountryContainerKeydown); - const at = this.telInput.closest("label"); - at && at.removeEventListener("click", this._handleLabelClick) - } - const { - form: _e - } = this.telInput; - this._handleHiddenInputSubmit && _e && _e.removeEventListener("submit", this._handleHiddenInputSubmit), this.telInput.removeEventListener("input", this._handleInputEvent), this._handleKeydownEvent && this.telInput.removeEventListener("keydown", this._handleKeydownEvent), this.telInput.removeAttribute("data-intl-tel-input-id"), te && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft); - const ne = this.telInput.parentNode; - (Pe = ne == null ? void 0 : ne.parentNode) == null || Pe.insertBefore(this.telInput, ne), (Me = ne == null ? void 0 : ne.parentNode) == null || Me.removeChild(ne), delete ke.instances[this.id] - } - getExtension() { - return ke.utils ? ke.utils.getExtension(this._getFullNumber(), this.selectedCountryData.iso2) : "" - } - getNumber(Q) { - if (ke.utils) { - const { - iso2: te - } = this.selectedCountryData; - return ke.utils.formatNumber(this._getFullNumber(), te, Q) - } - return "" - } - getNumberType() { - return ke.utils ? ke.utils.getNumberType(this._getFullNumber(), this.selectedCountryData.iso2) : -99 - } - getSelectedCountryData() { - return this.selectedCountryData - } - getValidationError() { - if (ke.utils) { - const { - iso2: Q - } = this.selectedCountryData; - return ke.utils.getValidationError(this._getFullNumber(), Q) - } - return -99 - } - isValidNumber() { - if (!this.selectedCountryData.iso2) return !1; - const Q = this._getFullNumber(), - te = Q.search(new RegExp("\\p{L}", "u")); - if (te > -1) { - const _e = Q.substring(0, te), - ne = this._utilsIsPossibleNumber(_e), - Pe = this._utilsIsPossibleNumber(Q); - return ne && Pe - } - return this._utilsIsPossibleNumber(Q) - } - _utilsIsPossibleNumber(Q) { - return ke.utils ? ke.utils.isPossibleNumber(Q, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null - } - isValidNumberPrecise() { - if (!this.selectedCountryData.iso2) return !1; - const Q = this._getFullNumber(), - te = Q.search(new RegExp("\\p{L}", "u")); - if (te > -1) { - const _e = Q.substring(0, te), - ne = this._utilsIsValidNumber(_e), - Pe = this._utilsIsValidNumber(Q); - return ne && Pe - } - return this._utilsIsValidNumber(Q) - } - _utilsIsValidNumber(Q) { - return ke.utils ? ke.utils.isValidNumber(Q, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null - } - setCountry(Q) { - const te = Q == null ? void 0 : Q.toLowerCase(), - _e = this.selectedCountryData.iso2; - (Q && te !== _e || !Q && _e) && (this._setCountry(te), this._updateDialCode(this.selectedCountryData.dialCode), this._triggerCountryChange()) - } - setNumber(Q) { - const te = this._updateCountryFromNumber(Q); - this._updateValFromNumber(Q), te && this._triggerCountryChange(), this._trigger("input", { - isSetNumber: !0 - }) - } - setPlaceholderNumberType(Q) { - this.options.placeholderNumberType = Q, this._updatePlaceholder() - } - setDisabled(Q) { - this.telInput.disabled = Q, Q ? this.selectedCountry.setAttribute("disabled", "true") : this.selectedCountry.removeAttribute("disabled") - } - }, - Qe = Q => { - if (!ke.utils && !ke.startedLoadingUtilsScript) { - let te; - if (typeof Q == "function") try { - te = Promise.resolve(Q()) - } catch (_e) { - return Promise.reject(_e) - } else return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof Q}`)); - return ke.startedLoadingUtilsScript = !0, te.then(_e => { - const ne = _e == null ? void 0 : _e.default; - if (!ne || typeof ne != "object") throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export."); - return ke.utils = ne, st("handleUtils"), !0 - }).catch(_e => { - throw st("rejectUtilsScriptPromise", _e), _e - }) - } - return null - }, - ke = Object.assign((Q, te) => { - const _e = new it(Q, te); - return _e._init(), Q.setAttribute("data-intl-tel-input-id", _e.id.toString()), ke.instances[_e.id] = _e, _e - }, { - defaults: Ne, - documentReady: () => document.readyState === "complete", - getCountryData: () => ye, - getInstance: Q => { - const te = Q.getAttribute("data-intl-tel-input-id"); - return te ? ke.instances[te] : null - }, - instances: {}, - attachUtils: Qe, - startedLoadingUtilsScript: !1, - startedLoadingAutoCountry: !1, - version: "25.3.2" - }), - vt = ke; - return $(W) - })(); - return l.default - }) - })(gf)), gf.exports -} -var dE = hE(); -const pE = nm(dE); -var fE = Ie('
        '), - mE = Ie(' '), - _E = Ie('

        ', 1), - gE = async (b, l, _) => { - await l(x(_)) - }, vE = Ie(' '), yE = (b, l) => { - oe(l, "") - }, xE = Ie('

        ', 1), bE = Ie('
        '); - -function wE(b, l) { - Sr(l, !0); - let _ = nt(!0), - C = nt(""), - L = nt(0), - F = nt(!1); - const T = lt(() => x(L) > 0 || x(F)); - let o = nt(!1), - $ = nt(""), - W = nt(void 0); - const ie = lt(() => { - var Re; - return `phone:${(Re=Dt.data)==null?void 0:Re.id}` - }); - Zr(() => { - const Re = localStorage.getItem(x(ie)); - Re && oe(C, Re, !0) - }), Ii(() => { - ni.getOtpCooldown().then(Oe => { - oe(L, Oe.cooldownMs, !0) - }).catch(Oe => { - qr.error(Oe.message) - }).finally(() => { - oe(_, !1) - }); - const Re = 1e3, - Ae = setInterval(() => { - oe(L, Math.max(0, x(L) - Re), !0) - }, Re); - return () => { - clearInterval(Ae) - } - }); - async function pe(Re) { - try { - oe(F, !0); - const Ae = await ni.sendOtp(Re); - qr.info(`${Y3()} ${Ae.phone}`), oe(C, Ae.phone, !0), oe(L, Ae.cooldownMs, !0), localStorage.setItem(x(ie), x(C)) - } catch (Ae) { - qr.error(Ae.message) - } finally { - oe(F, !1) - } - } - Zr(() => { - x($).length === 6 && (oe(o, !0), (async () => { - try { - await ni.verifyOtp(x($)), await Dt.refresh(), qr.success(eC()), localStorage.removeItem(x(ie)), l.onsuccess(x(C)) - } catch (Re) { - qr.error(Re.message) - } finally { - oe($, ""), oe(o, !1) - } - })()) - }); - var ye = bE(), - X = k(ye); - { - var Se = Re => { - var Ae = fE(); - H(Re, Ae) - }, - we = Re => { - var Ae = Jt(), - Oe = zt(Ae); - { - var Ee = ft => { - var ht = _E(), - Xe = zt(ht), - ct = k(Xe), - Je = k(ct, !0); - A(ct); - var Be = V(ct, 2), - st = k(Be, !0); - A(Be), A(Xe); - var it = V(Xe, 2), - Qe = k(it); - On(Qe, () => _e => (oe(W, pE(_e, { - strictMode: !0, - initialCountry: "br", - loadUtils: () => wx(() => import("../chunks/1FgtjJRR.js"), [], import.meta.url), - containerClass: "w-full", - dropdownContainer: document.body - })), () => { - var ne; - (ne = x(W)) == null || ne.destroy() - })); - var ke = V(Qe, 2), - vt = k(ke), - Q = V(vt); - { - var te = _e => { - var ne = mE(), - Pe = k(ne); - A(ne), Ge(Me => fe(Pe, `(${Me??""})`), [() => zd(x(L))]), H(_e, ne) - }; - Ue(Q, _e => { - x(L) > 0 && _e(te) - }) - } - A(ke), A(it), Ge((_e, ne, Pe) => { - fe(Je, _e), fe(st, ne), ke.disabled = x(T), fe(vt, `${Pe??""} `) - }, [() => kC(), () => LC(), () => BC()]), an("submit", it, async () => { - var ne; - if (x(T)) return; - if (!((ne = x(W)) != null && ne.isValidNumber())) { - qr.error(iC()); - return - } - const _e = x(W).getNumber(); - await pe(_e) - }), H(ft, ht) - }, - Ne = ft => { - var ht = xE(), - Xe = zt(ht), - ct = k(Xe), - Je = k(ct, !0); - A(ct); - var Be = V(ct, 2), - st = k(Be); - A(Be), A(Xe); - var it = V(Xe, 2), - Qe = k(it); - { - const Me = (at, We) => { - let Ct = () => We == null ? void 0 : We().cells; - var _t = Jt(), - xt = zt(_t); - _n(xt, () => sE, (tt, pt) => { - pt(tt, { - class: "border-primary", - children: (It, ut) => { - var bt = Jt(), - wt = zt(bt); - nn(wt, 16, Ct, dt => dt, (dt, Lt) => { - var Xt = Jt(), - Yt = zt(Xt); - _n(Yt, () => cE, (nr, ar) => { - ar(nr, { - get cell() { - return Lt - }, - class: "border-base-content/20 size-11 sm:size-12" - }) - }), H(dt, Xt) - }), H(It, bt) - }, - $$slots: { - default: !0 - } - }) - }), H(at, _t) - }; - _n(Qe, () => uE, (at, We) => { - We(at, { - maxlength: 6, - class: "mx-auto w-max", - get disabled() { - return x(o) - }, - get value() { - return x($) - }, - set value(Ct) { - oe($, Ct, !0) - }, - children: Me, - $$slots: { - default: !0 - } - }) - }) - } - A(it); - var ke = V(it, 2), - vt = k(ke); - vt.__click = [gE, pe, C]; - var Q = k(vt), - te = V(Q); - { - var _e = Me => { - var at = vE(), - We = k(at); - A(at), Ge(Ct => fe(We, `(${Ct??""})`), [() => zd(x(L))]), H(Me, at) - }; - Ue(te, Me => { - x(L) > 0 && Me(_e) - }) - } - A(vt); - var ne = V(vt, 2); - ne.__click = [yE, C]; - var Pe = k(ne, !0); - A(ne), A(ke), Ge((Me, at, We, Ct) => { - fe(Je, Me), fe(st, `${at??""} ${x(C)??""}`), vt.disabled = x(T), fe(Q, `${We??""} `), fe(Pe, Ct) - }, [() => NC(), () => VC(), () => $C(), () => WC()]), H(ft, ht) - }; - Ue(Oe, ft => { - x(C) ? ft(Ne, !1) : ft(Ee) - }, !0) - } - H(Re, Ae) - }; - Ue(X, Re => { - x(_) ? Re(Se) : Re(we, !1) - }) - } - A(ye), H(b, ye), Pr() -} -Wi(["click"]); -var TE = Ie(''); - -function CE(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15); - var C = TE(), - L = k(C), - F = V(k(L), 2); - { - var T = o => { - wE(o, { - onsuccess: () => _(!1) - }) - }; - Ue(F, o => { - _() && o(T) - }) - } - A(L), A(C), On(C, () => o => { - Zr(() => { - _() ? o.show() : o.close() - }) - }), an("close", C, () => _(!1)), H(b, C), Pr() -} -var SE = (b, l) => { - l() - }, - PE = Ie(''), - IE = Ie(''), - ME = (b, l, _) => { - l(x(_).id) - }, - AE = Ie(''), - kE = Ie(''), - EE = Ie('
        '), - zE = (b, l) => { - var _; - (_ = x(l)) == null || _.show() - }, - LE = (b, l) => { - l(!1) - }, - DE = (b, l) => { - var _; - (_ = x(l)) == null || _.close() - }, - RE = async (b, l) => { - try { - oe(l, !0), await ni.deleteMe(), qr.warning(vC()), await Dt.logout() - } catch (_) { - qr.error(_.message) - } finally { - oe(l, !1) - } - }, BE = Ie(' ', 1); - -function FE(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15), - C = nt(zn(l.userData.name)), - L = nt(zn(l.userData.discord)), - F = nt(zn(l.userData.showLastPixel)), - T = nt(!1), - o = nt(void 0), - $ = nt(void 0); - Ii(() => { - const Ft = dr => { - dr.key === "Escape" && _(!1) - }; - return document.addEventListener("keydown", Ft), () => document.removeEventListener("keydown", Ft) - }); - let W = nt(void 0), - ie = nt(void 0); - Zr(() => { - oe(C, l.userData.name, !0), oe(F, l.userData.showLastPixel, !0) - }), Zr(() => { - _() && !x($) && ni.getMyProfilePictures().then(Ft => { - oe($, Ft, !0) - }).catch(Ft => { - qr.error(Ft.message) - }) - }); - let pe = nt(!1); - async function ye(Ft) { - try { - oe(pe, !0), await ni.changeProfilePicture(Ft), await Dt.refresh() - } finally { - oe(pe, !1) - } - } - var X = BE(), - Se = zt(X), - we = k(Se), - Re = V(k(we), 2), - Ae = k(Re, !0); - A(Re); - var Oe = V(Re, 2), - Ee = k(Oe), - Ne = k(Ee), - ft = k(Ne), - ht = k(ft); - es(ht, { - class: "size-30", - get userId() { - return l.userData.id - }, - get pictureUrl() { - return l.userData.picture - } - }); - var Xe = V(ht, 2), - ct = k(Xe); - Dg(ct, { - class: "size-5" - }), A(Xe), A(ft); - var Je = V(ft, 2); - { - var Be = Ft => { - var dr = EE(), - _r = k(dr), - Ir = k(_r, !0); - A(_r); - var jr = V(_r, 2), - ur = k(jr); - { - var Mr = kr => { - var Nr = IE(); - Nr.__click = [SE, ye]; - var ce = k(Nr); - es(ce, { - class: "size-10 border", - get userId() { - return l.userData.id - } - }); - var O = V(ce, 2); - { - var q = G => { - var K = PE(); - H(G, K) - }; - Ue(O, G => { - x(pe) && G(q) - }) - } - A(Nr), Ge(() => Nr.disabled = x(pe)), H(kr, Nr) - }; - Ue(ur, kr => { - l.userData.picture && kr(Mr) - }) - } - var Ar = V(ur, 2); - nn(Ar, 17, () => x($), kr => kr.id, (kr, Nr) => { - var ce = Jt(), - O = zt(ce); - { - var q = G => { - var K = kE(); - K.__click = [ME, ye, Nr]; - var le = k(K); - es(le, { - class: "size-10 border", - get userId() { - return l.userData.id - }, - get pictureUrl() { - return x(Nr).url - } - }); - var ve = V(le, 2); - { - var Le = Ce => { - var Ze = AE(); - H(Ce, Ze) - }; - Ue(ve, Ce => { - x(pe) && Ce(Le) - }) - } - A(K), Ge(() => K.disabled = x(pe)), H(G, K) - }; - Ue(O, G => { - l.userData.picture !== x(Nr).url && G(q) - }) - } - H(kr, ce) - }), A(jr), A(dr), Ge(kr => fe(Ir, kr), [() => qb()]), H(Ft, dr) - }; - Ue(Je, Ft => { - var dr; - (dr = x($)) != null && dr.length && Ft(Be) - }) - } - A(Ne); - var st = V(Ne, 2), - it = k(st); - { - let Ft = lt(() => xf()), - dr = lt(() => xf()); - Tf(it, { - get label() { - return x(Ft) - }, - get placeholder() { - return x(dr) - }, - min: 1, - max: 16, - get value() { - return x(C) - }, - set value(_r) { - oe(C, _r, !0) - }, - get validate() { - return x(W) - }, - set validate(_r) { - oe(W, _r, !0) - } - }) - } - var Qe = V(it, 2); - { - let Ft = lt(() => $w()); - Tf(Qe, { - label: "Discord", - get placeholder() { - return x(Ft) - }, - max: 32, - get value() { - return x(L) - }, - set value(dr) { - oe(L, dr, !0) - }, - get validate() { - return x(ie) - }, - set validate(dr) { - oe(ie, dr, !0) - } - }) - } - var ke = V(Qe, 2), - vt = k(ke); - ea(vt); - var Q = V(vt); - A(ke), A(st), A(Ee); - var te = V(Ee, 2), - _e = k(te); - _e.__click = [zE, o]; - var ne = k(_e, !0); - A(_e); - var Pe = V(_e, 2), - Me = k(Pe); - Me.__click = [LE, _]; - var at = k(Me, !0); - A(Me); - var We = V(Me, 2), - Ct = k(We, !0); - A(We), A(Pe), A(te), A(Oe), A(we), A(Se), On(Se, () => Ft => { - Zr(() => { - _() ? Ft.show() : Ft.close() - }) - }); - var _t = V(Se, 2), - xt = k(_t), - tt = V(k(xt), 2), - pt = k(tt, !0); - A(tt); - var It = V(tt, 2), - ut = k(It, !0); - A(It); - var bt = V(It, 2), - wt = k(bt); - wt.__click = [DE, o]; - var dt = k(wt, !0); - A(wt); - var Lt = V(wt, 2); - Lt.__click = [RE, T]; - var Xt = k(Lt, !0); - A(Lt), A(bt), A(xt); - var Yt = V(xt, 2), - nr = k(Yt), - ar = k(nr, !0); - A(nr), A(Yt), A(_t), ps(_t, Ft => oe(o, Ft), () => x(o)), Ge((Ft, dr, _r, Ir, jr, ur, Mr, Ar, kr, Nr, ce) => { - fe(Ae, Ft), zr(Xe, "data-tip", dr), fe(Q, ` ${_r??""}`), fe(ne, Ir), Me.disabled = x(T), fe(at, jr), We.disabled = x(T), fe(Ct, ur), fe(pt, Mr), fe(ut, Ar), fe(dt, kr), Lt.disabled = x(T), fe(Xt, Nr), fe(ar, ce) - }, [() => YC(), () => px(), () => Zb(), () => ug(), () => tc(), () => Xb(), () => Jb(), () => t2(), () => qd(), () => ug(), () => tc()]), an("close", Se, () => _(!1)), an("submit", Oe, async () => { - var Ft, dr; - try { - if (!((Ft = x(W)) != null && Ft()) || !((dr = x(ie)) != null && dr())) return; - oe(T, !0), await ni.updateMe({ - name: x(C), - showLastPixel: x(F), - discord: x(L) - }), Dt.refresh(), qr.success(mC()), _(!1) - } catch (_r) { - qr.error(_r.message) - } finally { - oe(T, !1) - } - }), fx(vt, () => x(F), Ft => oe(F, Ft)), H(b, X), Pr() -} -Wi(["click"]); -var OE = Tr(''); - -function NE(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = OE(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var jE = Tr(''); - -function Dv(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = jE(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var qE = Tr(''); - -function VE(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = qE(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var UE = Tr(''); - -function ZE(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = UE(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - "xmlns:xlink": "http://www.w3.org/1999/xlink", - viewBox: "0 0 216 216", - ..._ - }), void 0, void 0, "svelte-1977t4s"), H(b, C) -} -var $E = Tr(''); - -function GE(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = $E(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var HE = Tr(''); - -function WE(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = HE(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - height: "24px", - viewBox: "0 -960 960 960", - width: "24px", - fill: "currentColor", - ..._ - })), H(b, C) -} -var XE = Tr(''); - -function KE(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = XE(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var YE = Tr(''); - -function JE(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = YE(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var QE = (b, l) => { - oe(l, !0) - }, - e8 = Ie(' '), - t8 = Ie('
        '), - r8 = (b, l, _) => { - localStorage.setItem(_x, x(l).key), oe(_, x(l).key, !0), location.reload() - }, - i8 = Ie(''), - n8 = Ie("
      • "), - a8 = async (b, l) => { - var _; - try { - const C = await ((_ = x(l)) == null ? void 0 : _.prompt()); - (C == null ? void 0 : C.outcome) === "accepted" && oe(l, void 0) - } catch (C) { - qr.error(Pb({ - error: C.message - })) - } - }, s8 = Ie(''), o8 = Ie(' '), l8 = Ie('
        '), c8 = async (b, l, _, C) => { - var L; - try { - oe(l, !0), await _.user.logout(), C(), qr.warning(bC(), { - icon: Dv - }), (L = _.onlogout) == null || L.call(_) - } catch { - qr.error(CC()) - } finally { - oe(l, !1) - } - }, u8 = Ie(' ', 1); - -function h8(b, l) { - Sr(l, !0); - let _ = nt(!1), - C = nt(!1); - - function L() { - var pe; - (pe = document.activeElement) == null || pe.blur() - } - const F = [{ - label: "🇺🇸 English", - key: "en" - }, { - label: "🇨🇳 中文", - key: "zh" - }]; - let T = nt(""), - o = nt(void 0); - var $ = Jt(), - W = zt($); - { - var ie = pe => { - var ye = u8(), - X = zt(ye), - Se = k(X), - we = k(Se); - Bg(we, { - get userId() { - return l.user.data.id - }, - get level() { - return l.user.data.level - }, - get pictureUrl() { - return l.user.data.picture - } - }), A(Se); - var Re = V(Se, 2), - Ae = k(Re); - Ae.__click = L; - var Oe = k(Ae); - fc(Oe, { - class: "size-5" - }), A(Ae); - var Ee = V(Ae, 2), - Ne = k(Ee), - ft = k(Ne); - es(ft, { - get userId() { - return l.user.data.id - }, - get pictureUrl() { - return l.user.data.picture - } - }); - var ht = V(ft, 2); - ht.__click = [QE, _]; - var Xe = k(ht); - Cf(Xe, { - class: "size-4" - }), A(ht), A(Ne); - var ct = V(Ne, 2), - Je = k(ct), - Be = k(Je), - st = k(Be, !0); - A(Be); - var it = V(Be, 2), - Qe = k(it); - A(it); - var ke = V(it, 2); - { - var vt = At => { - const Pt = lt(() => ds(l.user.data.equippedFlag)); - var kt = e8(), - Wt = k(kt, !0); - A(kt), Ge(() => { - zr(kt, "data-tip", x(Pt).name), fe(Wt, x(Pt).flag) - }), H(At, kt) - }; - Ue(ke, At => { - l.user.data.equippedFlag && At(vt) - }) - } - var Q = V(ke, 2); - { - var te = At => { - var Pt = t8(), - kt = k(Pt); - ph(kt, { - get username() { - return l.user.data.discord - } - }), A(Pt), H(At, Pt) - }; - Ue(Q, At => { - l.user.data.discord && At(te) - }) - } - A(Je); - var _e = V(Je, 2), - ne = k(_e); - fh(ne, { - class: "inline size-4" - }); - var Pe = V(ne, 2), - Me = k(Pe), - at = V(Me), - We = k(at, !0); - A(at), A(Pe), A(_e); - var Ct = V(_e, 2), - _t = k(Ct); - NE(_t, { - class: "inline size-4" - }); - var xt = V(_t, 2), - tt = k(xt), - pt = k(tt); - A(tt); - var It = V(tt), - ut = V(It), - bt = k(ut); - $f(bt, { - class: "mb-0.5 inline size-4 opacity-50" - }), A(ut), A(xt), A(Ct), A(ct), A(Ee); - var wt = V(Ee, 2), - dt = k(wt), - Lt = k(dt), - Xt = k(Lt, !0); - A(Lt); - var Yt = V(Lt, 2), - nr = k(Yt), - ar = k(nr), - Ft = k(ar); - WE(Ft, { - class: "size-4" - }), A(ar); - var dr = V(ar, 2); - nn(dr, 21, () => F, Zd, (At, Pt) => { - const kt = lt(() => x(T) === x(Pt).key); - var Wt = n8(), - Lr = k(Wt); - let Kr; - Lr.__click = [r8, Pt, T]; - var Hr = k(Lr); - { - var $r = gr => { - var ai = i8(); - H(gr, ai) - }; - Ue(Hr, gr => { - x(kt) && gr($r) - }) - } - var mr = V(Hr); - A(Lr), A(Wt), Ge(gr => { - Kr = Or(Lr, 1, "font-flag relative font-medium", null, Kr, gr), fe(mr, ` ${x(Pt).label??""}`) - }, [() => ({ - "bg-base-200": x(kt) - })]), H(At, Wt) - }), A(dr), A(nr); - var _r = V(nr, 2), - Ir = k(_r); - Ir.__click = () => { - oa.muted = !oa.muted - }; - var jr = k(Ir); - { - var ur = At => { - KE(At, { - class: "size-4" - }) - }, - Mr = At => { - JE(At, { - class: "size-4" - }) - }; - Ue(jr, At => { - oa.muted ? At(ur) : At(Mr, !1) - }) - } - A(Ir), A(_r), A(Yt), A(dt); - var Ar = V(dt, 2); - { - var kr = At => { - var Pt = s8(); - Pt.__click = [a8, o]; - var kt = k(Pt); - sv(kt, { - class: "size-5" - }); - var Wt = V(kt); - A(Pt), Ge(Lr => fe(Wt, ` ${Lr??""}`), [() => Ab()]), H(At, Pt) - }; - Ue(Ar, At => { - x(o) && At(kr) - }) - } - var Nr = V(Ar, 2); - { - var ce = At => { - var Pt = o8(), - kt = k(Pt); - GE(kt, { - class: "size-5" - }); - var Wt = V(kt); - A(Pt), Ge(Lr => { - zr(Pt, "href", `${La.url.origin??""}/admin`), fe(Wt, ` ${Lr??""}`) - }, [() => JS()]), H(At, Pt) - }; - Ue(Nr, At => { - var Pt; - (Pt = l.user.data) != null && Pt.role && l.user.data.role !== "user" && At(ce) - }) - } - var O = V(Nr, 2), - q = k(O); - jg(q, { - class: "size-5" - }); - var G = V(q); - A(O); - var K = V(O, 2), - le = k(K); - am(le, { - class: "size-5" - }), fi(), A(K); - var ve = V(K, 2), - Le = k(ve); - ZE(Le, { - class: "size-5" - }), fi(), A(ve); - var Ce = V(ve, 2); - { - var Ze = At => { - var Pt = l8(), - kt = k(Pt), - Wt = k(kt); - VE(Wt, { - class: "size-5" - }), fi(), A(kt), A(Pt), Ge(() => zr(Pt, "action", `${Cd}/payment/create-portal-session`)), H(At, Pt) - }; - Ue(Ce, At => { - var Pt; - (Pt = l.user.data) != null && Pt.isCustomer && At(Ze) - }) - } - var ot = V(Ce, 2); - ot.__click = [c8, C, l, L]; - var Ye = k(ot); - Dv(Ye, { - class: "size-5" - }); - var Ot = V(Ye); - A(ot), A(wt), A(Re), A(X); - var xe = V(X, 2); - FE(xe, { - get userData() { - return l.user.data - }, - get open() { - return x(_) - }, - set open(At) { - oe(_, At, !0) - } - }), Ge((At, Pt, kt, Wt, Lr, Kr, Hr, $r, mr, gr, ai) => { - zr(Se, "title", At), zr(Be, "title", l.user.data.name), fe(st, l.user.data.name), Or(it, 1, Pt), fe(Qe, `#${l.user.data.id??""}`), fe(Me, `${kt??""}: `), fe(We, Wt), fe(pt, Text9() + ` ${Lr??""}`), fe(It, ` (${Kr??""}%) `), zr(ut, "data-tip", Hr), fe(Xt, $r), zr(_r, "data-tip", mr), fe(G, ` ${gr??""}`), ot.disabled = x(C), fe(Ot, ` ${ai??""}`) - }, [() => xb(), () => Vo(Zn(l.user.data.id)), () => Xf(), () => l.user.data.pixelsPainted.toLocaleString("en-US"), () => Math.floor(l.user.data.level), () => Math.floor(l.user.data.level % 1 * 100), () => jw(), () => Tb(), () => oa.muted ? L3() : k3(), () => zb(), () => Rb()]), an("focus", Se, () => { - oe(o, window.pwaInstallPrompt, !0) - }), H(pe, ye) - }; - Ue(W, pe => { - l.user.data && l.user.charges !== void 0 && pe(ie) - }) - } - H(b, $), Pr() -} -Wi(["click"]); -var d8 = Tr(''); - -function p8(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = d8(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - height: "24px", - viewBox: "0 -960 960 960", - width: "24px", - fill: "currentColor", - ..._ - })), H(b, C) -} -var f8 = Tr(''); - -function m8(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = f8(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var _8 = async (b, l, _, C, L, F) => { - if (x(l)) { - _.map.easeTo(x(l)), oe(l, void 0); - return - } - oe(C, !0); - try { - Qa(_.map.getCenter(), _.map.getZoom()); - const T = new hc(x(L)), - { - tile: o, - pixel: $ - } = await ni.getRandomTile(_.season), - W = o.x * x(L) + $.x, - ie = o.y * x(L) + $.y, - [pe, ye] = T.pixelsToLatLon(W, ie, x(F)), - X = { - lat: pe, - lng: ye - }, - Se = x(F) + 2; - oe(l, { - zoom: Se, - center: X - }, !0), _.map.flyTo(x(l)), Ho.isEmpty() && Ho.push({ - pos: _.map.getCenter(), - zoom: _.map.getZoom() - }), setTimeout(() => { - oe(l, void 0) - }, 2500), Ho.push({ - pos: X, - zoom: Se - }) - } catch (T) { - qr.error(T.message) - } finally { - oe(C, !1) - } -}, g8 = Ie(''); - -function v8(b, l) { - Sr(l, !0); - const _ = lt(() => $n.seasons[l.season].tileSize), - C = lt(() => $n.seasons[l.season].zoom); - let L = nt(!1), - F = nt(void 0); - var T = g8(); - T.__click = [_8, F, l, L, _, C]; - var o = k(T); - { - var $ = ie => { - m8(ie, { - class: "size-5" - }) - }, - W = ie => { - p8(ie, { - class: "size-5" - }) - }; - Ue(o, ie => { - x(F) ? ie(W, !1) : ie($) - }) - } - A(T), Ge(ie => { - zr(T, "title", ie), T.disabled = x(L) - }, [() => W1()]), H(b, T), Pr() -} -Wi(["click"]); -var y8 = Ie(''), - x8 = Ie('
        '), - b8 = Ie(' '), - w8 = Ie(" "), - T8 = Ie('
        '), - C8 = Ie('

        '), - S8 = Ie(' '), - P8 = Ie('

        '), - I8 = Ie('
        '), - M8 = Ie('
        ', 1); - -function A8(b, l) { - Sr(l, !0); - const _ = []; - let C = nt("today"), - L = { - players: { - label: Xg(), - icon: Xd - }, - alliances: { - label: Kg(), - icon: Kd - } - }, - F = nt("players"), - T = zn({ - players: {}, - alliances: {} - }); - const o = lt(() => T[x(F)][x(C)]); - Zr(() => { - if (x(o)) return; - const we = x(C), - Re = x(F); - Re === "players" ? ni.leaderboardRegionPlayers(l.regionId, we).then(Ae => { - T[Re][we] = Ae - }).catch(Ae => { - qr.error(Ae.message) - }) : Re === "alliances" && ni.leaderboardRegionAlliances(l.regionId, we).then(Ae => { - T[Re][we] = Ae - }).catch(Ae => { - qr.error(Ae.message) - }) - }); - var $ = M8(), - W = zt($); - nn(W, 21, () => Object.entries(L), ([we, { - label: Re, - icon: Ae - }]) => we, (we, Re) => { - var Ae = lt(() => Ag(x(Re), 2)); - let Oe = () => x(Ae)[0], - Ee = () => x(Ae)[1].label, - Ne = () => x(Ae)[1].icon; - const ft = lt(Ne); - var ht = y8(), - Xe = k(ht); - ea(Xe); - var ct, Je = V(Xe, 2); - _n(Je, () => x(ft), (st, it) => { - it(st, { - get this() { - return Ne() - }, - class: "mr-1 size-5 max-sm:hidden" - }) - }); - var Be = V(Je); - A(ht), Ge(() => { - zr(Xe, "aria-label", Ee()), ct !== (ct = Oe()) && (Xe.value = (Xe.__value = Oe()) ?? ""), fe(Be, ` ${Ee()??""}`) - }), Vd(_, [], Xe, () => (Oe(), x(F)), st => oe(F, st)), H(we, ht) - }), A(W); - var ie = V(W, 2), - pe = k(ie); - sm(pe, { - get value() { - return x(C) - }, - set value(we) { - oe(C, we, !0) - } - }), A(ie); - var ye = V(ie, 2); - { - var X = we => { - var Re = x8(), - Ae = k(Re), - Oe = V(Ae); - { - var Ee = ft => { - var ht = Fn(); - Ge(Xe => fe(ht, Xe), [() => Wd().toLowerCase()]), H(ft, ht) - }, - Ne = ft => { - var ht = Jt(), - Xe = zt(ht); - { - var ct = Be => { - var st = Fn(); - Ge(it => fe(st, it), [() => Qf()]), H(Be, st) - }, - Je = Be => { - var st = Jt(), - it = zt(st); - { - var Qe = ke => { - var vt = Fn(); - Ge(Q => fe(vt, Q), [() => em()]), H(ke, vt) - }; - Ue(it, ke => { - x(C) === "month" && ke(Qe) - }, !0) - } - H(Be, st) - }; - Ue(Xe, Be => { - x(C) === "week" ? Be(ct) : Be(Je, !1) - }, !0) - } - H(ft, ht) - }; - Ue(Oe, ft => { - x(C) === "today" ? ft(Ee) : ft(Ne, !1) - }) - } - A(Re), Ge(ft => fe(Ae, `${ft??""} `), [() => Jf()]), H(we, Re) - }, - Se = we => { - var Re = Jt(), - Ae = zt(Re); - { - var Oe = Ne => { - var ft = Jt(), - ht = zt(ft); - { - var Xe = Je => { - const Be = lt(() => x(o)); - var st = C8(), - it = k(st), - Qe = k(it), - ke = V(k(Qe)), - vt = k(ke, !0); - A(ke); - var Q = V(ke), - te = k(Q), - _e = V(te, 2, !0); - A(Q), A(Qe), A(it); - var ne = V(it); - nn(ne, 31, () => x(Be), Pe => Pe.id, (Pe, Me, at) => { - const We = lt(() => { - var ur; - return ((ur = Dt.data) == null ? void 0 : ur.id) === x(Me).id - }); - var Ct = T8(); - let _t; - var xt = k(Ct), - tt = k(xt, !0); - A(xt); - var pt = V(xt), - It = k(pt), - ut = k(It); - es(ut, { - class: "size-10 border", - get userId() { - return x(Me).id - }, - get pictureUrl() { - return x(Me).picture - } - }); - var bt = V(ut, 2), - wt = k(bt), - dt = k(wt), - Lt = V(dt), - Xt = k(Lt); - A(Lt), A(wt); - var Yt = V(wt, 2); - { - var nr = ur => { - const Mr = lt(() => ds(x(Me).equippedFlag)); - var Ar = b8(), - kr = k(Ar, !0); - A(Ar), Ge(() => { - zr(Ar, "data-tip", x(Mr).name), fe(kr, x(Mr).flag) - }), H(ur, Ar) - }; - Ue(Yt, ur => { - "equippedFlag" in x(Me) && x(Me).equippedFlag && ur(nr) - }) - } - var ar = V(Yt, 2); - { - var Ft = ur => { - ph(ur, { - get username() { - return x(Me).discord - } - }) - }; - Ue(ar, ur => { - x(Me).discord && ur(Ft) - }) - } - var dr = V(ar, 2); - { - var _r = ur => { - var Mr = w8(), - Ar = k(Mr, !0); - A(Mr), Ge((kr, Nr) => { - Or(Mr, 1, `badge badge-sm ml-0.5 border-0 ${kr??""} ${Nr??""}`), fe(Ar, x(Me).allianceName) - }, [() => Kf(x(Me).allianceId), () => Zn(x(Me).allianceId)]), H(ur, Mr) - }; - Ue(dr, ur => { - "allianceName" in x(Me) && x(Me).allianceName && ur(_r) - }) - } - A(bt), A(It), A(pt); - var Ir = V(pt), - jr = k(Ir, !0); - A(Ir), A(Ct), Ge((ur, Mr, Ar) => { - _t = Or(Ct, 1, "", null, _t, ur), fe(tt, x(at) + 1), Or(wt, 1, `font-semibold max-sm:ml-2 ${Mr??""} flex gap-1`), fe(dt, `${x(Me).name??""} `), fe(Xt, `#${x(Me).id??""}`), fe(jr, Ar) - }, [() => ({ - "bg-base-200": x(We) - }), () => Zn(x(Me).id), () => x(Me).pixelsPainted.toLocaleString("en-US")]), Zo(Ct, () => $o, () => ({ - duration: 200 - })), H(Pe, Ct) - }), A(ne), A(st), Ge((Pe, Me, at) => { - fe(vt, Pe), fe(te, `${Me??""} `), fe(_e, at) - }, [() => tm(), () => Ql(), () => ec().toLowerCase()]), H(Je, st) - }, - ct = Je => { - var Be = Jt(), - st = zt(Be); - { - var it = Qe => { - var ke = P8(), - vt = k(ke), - Q = k(vt), - te = V(k(Q)), - _e = k(te, !0); - A(te); - var ne = V(te), - Pe = k(ne), - Me = V(Pe, 2, !0); - A(ne), A(Q), A(vt); - var at = V(vt); - nn(at, 31, () => x(o), We => We.id, (We, Ct, _t) => { - const xt = lt(() => { - var Yt; - return ((Yt = Dt.data) == null ? void 0 : Yt.allianceId) === x(Ct).id - }); - var tt = S8(); - let pt; - var It = k(tt), - ut = k(It, !0); - A(It); - var bt = V(It), - wt = k(bt), - dt = k(wt, !0); - A(wt), A(bt); - var Lt = V(bt), - Xt = k(Lt, !0); - A(Lt), A(tt), Ge((Yt, nr, ar) => { - pt = Or(tt, 1, "", null, pt, Yt), fe(ut, x(_t) + 1), Or(wt, 1, `font-semibold ${nr??""}`), fe(dt, x(Ct).name), fe(Xt, ar) - }, [() => ({ - "bg-base-200": x(xt) - }), () => Zn(x(Ct).id), () => x(Ct).pixelsPainted.toLocaleString("en-US")]), Zo(tt, () => $o, () => ({ - duration: 200 - })), H(We, tt) - }), A(at), A(ke), Ge((We, Ct, _t) => { - fe(_e, We), fe(Pe, `${Ct??""} `), fe(Me, _t) - }, [() => Gd(), () => Ql(), () => ec().toLowerCase()]), H(Qe, ke) - }; - Ue(st, Qe => { - x(F) === "alliances" && Qe(it) - }, !0) - } - H(Je, Be) - }; - Ue(ht, Je => { - x(F) === "players" ? Je(Xe) : Je(ct, !1) - }) - } - H(Ne, ft) - }, - Ee = Ne => { - var ft = I8(); - H(Ne, ft) - }; - Ue(Ae, Ne => { - x(o) ? Ne(Oe) : Ne(Ee, !1) - }, !0) - } - H(we, Re) - }; - Ue(ye, we => { - x(o) && x(o).length === 0 ? we(X) : we(Se, !1) - }) - } - H(b, $), Pr() -} -var k8 = Ie('
        '), - E8 = Ie(' '); - -function z8(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15); - const C = lt(() => ds(l.region.countryId)); - Ii(() => { - const we = Re => { - Re.key === "Escape" && _(!1) - }; - return document.addEventListener("keydown", we), () => document.removeEventListener("keydown", we) - }); - var L = E8(), - F = k(L), - T = V(k(F), 2), - o = k(T), - $ = k(o, !0); - A(o); - var W = V(o, 2), - ie = k(W, !0); - A(W); - var pe = V(W, 2), - ye = k(pe); - A(pe), A(T); - var X = V(T, 2); - { - var Se = we => { - var Re = k8(), - Ae = k(Re); - A8(Ae, { - get regionId() { - return l.region.id - } - }), A(Re), En(2, Re, () => Qn, () => ({ - duration: 300 - })), H(we, Re) - }; - Ue(X, we => { - _() && we(Se) - }) - } - A(F), fi(2), A(L), On(L, () => we => { - Zr(() => { - _() ? we.show() : we.close() - }) - }), Ge(we => { - Or(T, 1, `flex gap-2 text-xl font-bold sm:text-2xl ${we??""}`), zr(o, "data-tip", x(C).name), fe($, x(C).flag), fe(ie, l.region.name), fe(ye, ``) - }, [() => Zn(l.region.cityId)]), an("close", L, () => _(!1)), H(b, L), Pr() -} -var L8 = Tr(''); - -function D8(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = L8(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - height: "24px", - viewBox: "0 -960 960 960", - width: "24px", - fill: "currentColor", - ..._ - })), H(b, C) -} -var R8 = Tr(''); - -function B8(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = R8(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var F8 = Tr(''), - O8 = Tr(''); - -function N8(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy", "filled"]); - var C = Jt(), - L = zt(C); - { - var F = o => { - var $ = F8(); - er($, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(o, $) - }, - T = o => { - var $ = O8(); - er($, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(o, $) - }; - Ue(L, o => { - l.filled ? o(F) : o(T, !1) - }) - } - H(b, C) -} -var j8 = (b, l, _, C, L) => { - if (x(l) && x(_)) { - const F = x(l) - x(_).clientHeight, - T = x(l) / 2 - F / 2; - C.map.flyTo({ - center: { - lat: x(L).center[0], - lng: x(L).center[1] - }, - zoom: 17.5, - offset: [0, -T] - }) - } - }, - q8 = (b, l, _) => l.onclickregion(x(_)), - V8 = Ie(''), - U8 = Ie('
        '), - Z8 = Ie('
        '), - $8 = Ie(' '), - G8 = Ie(" "), - H8 = (b, l) => { - l("report-user") - }, - W8 = Ie("
      • "), - X8 = (b, l) => { - l("timeout") - }, - K8 = Ie("
      • "), - Y8 = (b, l) => { - l("ban") - }, - J8 = Ie("
      • "), - Q8 = async (b, l, _, C, L, F) => { - oe(l, !0); - try { - await ni.banAllianceUser(x(_).id), await C({ - ...x(L), - season: F.season - }) - } catch (T) { - qr.error(T.message) - } finally { - oe(l, !1) - } - }, ez = Ie('
      • '), tz = Ie(''), rz = Ie('
        '), iz = (b, l) => l.onclickpaint(l.latLon), nz = async (b, l, _, C) => { - try { - oe(l, !0), x(_) ? (await ni.deleteFavoriteLocation(x(_).id), qr.warning(sC())) : (await ni.favoriteLocation(x(C).center), qr.success(cC())), pa.smallPlop.play(), Dt.refresh() - } catch (L) { - qr.error(L.message) - } finally { - oe(l, !1) - } - }, az = Ie(""), sz = (b, l, _) => l.onclickshare(OP(La.url, { - pos: { - lat: x(_).center[0], - lng: x(_).center[1] - }, - zoom: l.zoom - })), oz = Ie('

        '); - -function lz(b, l) { - Sr(l, !0); - let _ = nt(void 0); - const C = lt(() => new hc(l.tileSize)); - let L = nt(void 0), - F = nt(void 0), - T = nt(!1), - o = nt(!1); - const $ = lt(() => { - var tt, pt, It; - return !!((pt = (tt = x(_)) == null ? void 0 : tt.paintedBy) != null && pt.id) && ((It = Dt.data) == null ? void 0 : It.id) === x(_).paintedBy.id - }), - W = lt(() => { - const [tt, pt] = l.latLon ?? [0, 0], It = x(C).latLonToPixelBoundsLatLon(tt, pt, l.pixelArtZoom), ut = im(It), { - tile: bt, - pixel: wt - } = x(C).latLonToTileAndPixel(tt, pt, l.pixelArtZoom), dt = x(C).latLonToRegionAndPixel(tt, pt, l.pixelArtZoom); - return { - bounds: It, - center: ut, - tile: bt, - pixel: wt, - regionPixel: dt.pixel - } - }); - Zr(() => { - pa.plop.play(), l.crosshair.clearAndPlace(l.latLon) - }); - let ie = 0; - const pe = ({ - pixel: tt, - tile: pt, - season: It - }) => `s${It}:p(${tt[0]},${tt[1]}):t(${pt[0]},${pt[1]})`; - let ye; - dc(() => [x(W), l.season], () => { - const tt = { - ...x(W), - season: l.season - }, - pt = pe(tt); - if (oe(_, l.pixelInfoCache.get(pt), !0), x(_) !== void 0) return; - l.pixelInfoCache.size === 0 && (ie = 0), ie++, ie > 6 ? (clearTimeout(ye), ye = setTimeout(async () => X(tt), 500)) : X(tt) - }); - async function X(tt) { - const pt = await ni.getPixelInfo(tt); - if (pt.paintedBy !== void 0) { - const ut = pe(tt); - l.pixelInfoCache.set(ut, pt) - } - const It = pe({ - ...x(W), - season: l.season - }); - return oe(_, l.pixelInfoCache.get(It), !0), pt - } - - function Se() { - l.crosshair.clear(), pa.smallPlop.play(), l.onclose() - } - Ii(() => { - const tt = pt => { - pt.key === "Escape" && Se() - }; - return document.addEventListener("keydown", tt), () => document.removeEventListener("keydown", tt) - }); - const we = lt(() => { - var bt, wt, dt, Lt, Xt, Yt, nr; - const tt = [], - pt = (wt = (bt = Dt) == null ? void 0 : bt.data) == null ? void 0 : wt.role; - Cu(pt, ["admin"]) && !x($) && tt.push("ban-user"), Cu(pt, ["admin", "global_moderator", "moderator"]) && !x($) && tt.push("timeout-user"), ((((Lt = (dt = Dt) == null ? void 0 : dt.data) == null ? void 0 : Lt.id) ?? Number.MAX_SAFE_INTEGER) <= 3e6 || Cu(pt, ["admin", "moderator", "global_moderator"])) && !x($) && tt.push("report-user"); - const ut = (Xt = x(_)) == null ? void 0 : Xt.paintedBy; - return (ut == null ? void 0 : ut.allianceId) === ((Yt = Dt.data) == null ? void 0 : Yt.allianceId) && ((nr = Dt.data) == null ? void 0 : nr.allianceRole) === "admin" && Dt.data.id !== (ut == null ? void 0 : ut.id) && !x($) && tt.push("ban-alliance"), tt - }); - - function Re(tt) { - const pt = (async () => await av(l.map, { - maxHeight: 1080, - maxWidth: 1080, - quality: .8, - type: "image/jpeg" - }))(); - l.onclickmodaction(x(_), pt, l.latLon, tt) - } - var Ae = oz(), - Oe = k(Ae), - Ee = k(Oe), - Ne = k(Ee); - Ne.__click = [j8, L, F, l, W]; - var ft = k(Ne); - Wf(ft, { - class: "fill-primary size-5" - }), A(Ne); - var ht = V(Ne, 2), - Xe = k(ht), - ct = k(Xe); - A(Xe); - var Je = V(Xe, 2); - { - var Be = tt => { - const pt = lt(() => x(_).region), - It = lt(() => ds(x(pt).countryId)); - var ut = V8(); - ut.__click = [q8, l, pt]; - var bt = k(ut), - wt = k(bt, !0); - A(bt); - var dt = V(bt, 2), - Lt = k(dt, !0); - A(dt); - var Xt = V(dt, 2), - Yt = k(Xt); - A(Xt), A(ut), Ge(nr => { - Or(ut, 1, `btn btn-xs flex gap-1 py-3 text-sm max-sm:max-w-32 ${nr??""}`), zr(bt, "data-tip", x(It).name), fe(wt, x(It).flag), fe(Lt, x(pt).name), fe(Yt, ``) - }, [() => Zn(x(pt).cityId)]), H(tt, ut) - }, - st = tt => { - var pt = U8(); - H(tt, pt) - }; - Ue(Je, tt => { - var pt; - (pt = x(_)) != null && pt.region ? tt(Be) : tt(st, !1) - }) - } - A(ht), A(Ee); - var it = V(Ee, 2); - it.__click = Se; - var Qe = k(it); - fc(Qe, { - class: "size-4" - }), A(it), A(Oe); - var ke = V(Oe, 2), - vt = k(ke); - { - var Q = tt => { - var pt = Z8(); - H(tt, pt) - }, - te = tt => { - var pt = Jt(), - It = zt(pt); - { - var ut = wt => { - var dt = Fn(); - Ge(Lt => fe(dt, Lt), [() => d3()]), H(wt, dt) - }, - bt = wt => { - const dt = lt(() => x(_).paintedBy); - var Lt = rz(), - Xt = k(Lt), - Yt = k(Xt); - A(Xt); - var nr = V(Xt, 2), - ar = k(nr); - es(ar, { - class: "size-5 border-0", - get userId() { - return x(dt).id - }, - get pictureUrl() { - return x(dt).picture - } - }), A(nr); - var Ft = V(nr, 2), - dr = k(Ft), - _r = k(dr), - Ir = k(_r, !0); - A(_r); - var jr = V(_r, 2), - ur = k(jr); - A(jr), A(dr); - var Mr = V(dr, 2); - { - var Ar = K => { - const le = lt(() => ds(x(dt).equippedFlag)); - var ve = $8(), - Le = k(ve, !0); - A(ve), Ge(() => { - zr(ve, "data-tip", x(le).name), fe(Le, x(le).flag) - }), H(K, ve) - }; - Ue(Mr, K => { - x(dt).equippedFlag && K(Ar) - }) - } - var kr = V(Mr, 2); - { - var Nr = K => { - ph(K, { - get username() { - return x(dt).discord - } - }) - }; - Ue(kr, K => { - x(dt).discord && K(Nr) - }) - } - var ce = V(kr, 2); - { - var O = K => { - var le = G8(), - ve = k(le, !0); - A(le), Ge((Le, Ce) => { - Or(le, 1, `badge badge-sm ml-0.5 border-0 ${Le??""} ${Ce??""}`), fe(ve, x(dt).allianceName) - }, [() => Kf(x(dt).allianceId), () => Zn(x(dt).allianceId)]), H(K, le) - }; - Ue(ce, K => { - x(dt).allianceId && K(O) - }) - } - A(Ft); - var q = V(Ft, 2); - { - var G = K => { - var le = tz(), - ve = k(le), - Le = k(ve); - om(Le, { - class: "size-4" - }), A(ve); - var Ce = V(ve, 2); - nn(Ce, 21, () => x(we), Zd, (Ze, ot) => { - var Ye = Jt(), - Ot = zt(Ye); - { - var xe = Pt => { - var kt = W8(), - Wt = k(kt); - let Lr; - Wt.__click = [H8, Re]; - var Kr = k(Wt); - B8(Kr, { - class: "size-5" - }); - var Hr = V(Kr); - A(Wt), A(kt), Ge(($r, mr) => { - Lr = Or(Wt, 1, "text-error py-2 font-medium", null, Lr, $r), fe(Hr, ` ${mr??""}`) - }, [() => ({ - "cursor-not-allowed": x($) - }), () => Yg()]), H(Pt, kt) - }, - At = Pt => { - var kt = Jt(), - Wt = zt(kt); - { - var Lr = Hr => { - var $r = K8(), - mr = k($r); - let gr; - mr.__click = [X8, Re]; - var ai = k(mr); - Eg(ai, { - class: "size-5" - }); - var Tt = V(ai); - A(mr), A($r), Ge((Ci, di) => { - gr = Or(mr, 1, "text-error font-medium", null, gr, Ci), fe(Tt, ` ${di??""}`) - }, [() => ({ - "cursor-not-allowed": x($) - }), () => Qg()]), H(Hr, $r) - }, - Kr = Hr => { - var $r = Jt(), - mr = zt($r); - { - var gr = Tt => { - var Ci = J8(), - di = k(Ci); - let Pn; - di.__click = [Y8, Re]; - var Mt = k(di); - Gy(Mt, { - class: "size-5" - }); - var Ke = V(Mt); - A(di), A(Ci), Ge((jt, Gt) => { - Pn = Or(di, 1, "text-error font-medium", null, Pn, jt), fe(Ke, ` ${Gt??""}`) - }, [() => ({ - "cursor-not-allowed": x($) - }), () => Jg()]), H(Tt, Ci) - }, - ai = Tt => { - var Ci = Jt(), - di = zt(Ci); - { - var Pn = Mt => { - var Ke = ez(), - jt = k(Ke); - jt.__click = [Q8, o, dt, X, W, l]; - var Gt = k(jt); - D8(Gt, { - class: "size-5" - }); - var Dr = V(Gt); - A(jt), A(Ke), Ge(Gr => fe(Dr, ` ${Gr??""}`), [() => Wg()]), H(Mt, Ke) - }; - Ue(di, Mt => { - x(ot) === "ban-alliance" && Mt(Pn) - }, !0) - } - H(Tt, Ci) - }; - Ue(mr, Tt => { - x(ot) === "ban-user" ? Tt(gr) : Tt(ai, !1) - }, !0) - } - H(Hr, $r) - }; - Ue(Wt, Hr => { - x(ot) === "timeout-user" ? Hr(Lr) : Hr(Kr, !1) - }, !0) - } - H(Pt, kt) - }; - Ue(Ot, Pt => { - x(ot) === "report-user" ? Pt(xe) : Pt(At, !1) - }) - } - H(Ze, Ye) - }), A(Ce), A(le), H(K, le) - }; - Ue(q, K => { - x(we).length > 0 && K(G) - }) - } - A(Lt), Ge((K, le) => { - var ve; - fe(Yt, `${K??""}:`), Or(dr, 1, `font-medium ${le??""} flex gap-1.5`), fe(Ir, ((ve = Dt.data) == null ? void 0 : ve.id) === x(dt).id ? Dt.data.name : x(dt).name), fe(ur, `#${x(dt).id??""}`) - }, [() => m3(), () => Zn(x(dt).id)]), H(wt, Lt) - }; - Ue(It, wt => { - x(_).paintedBy.id === 0 ? wt(ut) : wt(bt, !1) - }, !0) - } - H(tt, pt) - }; - Ue(vt, tt => { - x(_) === void 0 ? tt(Q) : tt(te, !1) - }) - } - A(ke); - var _e = V(ke, 2), - ne = k(_e); - ne.__click = [iz, l]; - var Pe = k(ne); - fh(Pe, { - class: "size-4.5" - }); - var Me = V(Pe); - A(ne); - var at = V(ne, 2); - { - var We = tt => { - const pt = lt(() => Dt.data.favoriteLocations.find(Lt => Math.abs(Lt.latitude - x(W).center[0]) < 5e-5 && Math.abs(Lt.longitude - x(W).center[1]) < 5e-5)), - It = lt(() => !x(pt) && Dt.data.favoriteLocations.length >= Dt.data.maxFavoriteLocations); - var ut = az(); - let bt; - ut.__click = [nz, T, pt, W]; - var wt = k(ut); - { - let Lt = lt(() => !!x(pt)); - N8(wt, { - class: "size-4.5", - get filled() { - return x(Lt) - } - }) - } - var dt = V(wt); - A(ut), Ge((Lt, Xt) => { - bt = Or(ut, 1, "btn btn-primary btn-soft", null, bt, Lt), ut.disabled = x(T) || x(It), fe(dt, ` ${Xt??""}`) - }, [() => ({ - "text-yellow-400": !!x(pt) - }), () => x(It) ? v3() : b3()]), H(tt, ut) - }; - Ue(at, tt => { - Dt.data && tt(We) - }) - } - var Ct = V(at, 2); - Ct.__click = [sz, l, W]; - var _t = k(Ct); - ov(_t, { - class: "size-4.5" - }); - var xt = V(_t); - A(Ct), A(_e), A(Ae), ps(Ae, tt => oe(F, tt), () => x(F)), Ge((tt, pt) => { - fe(ct, `Pixel: ${x(W).regionPixel[0]??""}, ${x(W).regionPixel[1]??""}`), ne.disabled = Dt.loading, fe(Me, ` ${tt??""}`), fe(xt, ` ${pt??""}`) - }, [() => Zg(), () => C3()]), $d("innerHeight", tt => oe(L, tt, !0)), H(b, Ae), Pr() -} -Wi(["click"]); - -function cz(b) { - var C; - const l = document.createElement("div"); - (C = b.parentElement) == null || C.insertBefore(l, b.nextSibling); - const _ = new IntersectionObserver(L => { - L[0].isIntersecting ? b.classList.remove("stuck") : b.classList.add("stuck") - }, { - threshold: 0, - rootMargin: "0px" - }); - return _.observe(l), () => { - l.remove(), _.disconnect() - } -} -var uz = Tr(''), - hz = Tr(''); - -function dz(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy", "filled"]); - var C = Jt(), - L = zt(C); - { - var F = o => { - var $ = uz(); - er($, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(o, $) - }, - T = o => { - var $ = hz(); - er($, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(o, $) - }; - Ue(L, o => { - l.filled ? o(F) : o(T, !1) - }) - } - H(b, C) -} -var pz = Ie(''), - fz = Ie(''), - mz = Ie(''), - _z = Ie(' ', 1), - gz = Ie(' '), - vz = Ie(''), - yz = Ie('

        '), - xz = (b, l) => { - oe(l, !x(l)) - }, - bz = Ie('

        '+Text8()+'

        '); - -function wz(b, l) { - Sr(l, !0); - const _ = (Ee, Ne = fa) => { - const ft = lt(() => { - var ne; - return (((ne = Dt.data) == null ? void 0 : ne.droplets) ?? 0) >= T.price - }), - ht = lt(() => x($) === Ne().id); - var Xe = yz(), - ct = k(Xe), - Je = k(ct, !0); - A(ct); - var Be = V(ct, 2), - st = k(Be, !0); - A(Be); - var it = V(Be, 2); - { - var Qe = ne => { - hm(ne, {}) - }; - Ue(it, ne => { - Ne().id === x(W) && ne(Qe) - }) - } - var ke = V(it, 2); - let vt; - var Q = k(ke); - { - var te = ne => { - var Pe = fz(); - Pe.__click = async () => { - try { - const _t = Ne().id; - oe($, _t, !0), await ni.purchase({ - id: F, - amount: 1, - variant: _t - }), Dt.refresh(), pa.notification1.play(); - const xt = L.find(tt => tt.id === _t); - xt && (xt.owned = !0), oe(W, _t, !0) - } catch (_t) { - qr.error(_t.message) - } finally { - oe($, void 0) - } - }; - var Me = k(Pe); - { - var at = _t => { - var xt = pz(); - H(_t, xt) - }; - Ue(Me, _t => { - x(ht) && _t(at) - }) - } - var We = V(Me, 2); - Ud(We, { - class: "size-4" - }); - var Ct = V(We); - fi(), A(Pe), Ge(_t => { - Pe.disabled = !x(ft) || x(ht), fe(Ct, ` ${_t??""} `) - }, [() => T.price.toLocaleString("en-US")]), H(ne, Pe) - }, - _e = ne => { - const Pe = lt(() => { - var ut; - return ((ut = Dt.data) == null ? void 0 : ut.equippedFlag) === Ne().id - }); - var Me = vz(); - let at; - Me.__click = async () => { - try { - oe($, Ne().id, !0); - const ut = x(Pe) ? 0 : Ne().id; - await ni.equipFlag(ut), Dt.data && (Dt.data.equippedFlag = ut), Dt.refresh() - } catch (ut) { - qr.error(ut.message) - } finally { - oe($, void 0) - } - }; - var We = k(Me), - Ct = k(We, !0); - A(We); - var _t = V(We, 2); - { - var xt = ut => { - var bt = mz(); - H(ut, bt) - }; - Ue(_t, ut => { - x(ht) && ut(xt) - }) - } - var tt = V(_t, 2); - { - var pt = ut => { - var bt = _z(), - wt = zt(bt); - fc(wt, { - class: "size-4" - }); - var dt = V(wt, 2), - Lt = k(dt, !0); - A(dt), Ge(Xt => fe(Lt, Xt), [() => p2()]), H(ut, bt) - }, - It = ut => { - var bt = gz(), - wt = k(bt, !0); - A(bt), Ge(dt => fe(wt, dt), [() => _2()]), H(ut, bt) - }; - Ue(tt, ut => { - x(Pe) ? ut(pt) : ut(It, !1) - }) - } - A(Me), Ge((ut, bt) => { - at = Or(Me, 1, "btn btn-lg sm:btn-md tooltip tooltip-bottom relative h-10", null, at, ut), Me.disabled = x(ht), fe(Ct, bt) - }, [() => ({ - "btn-warning": x(Pe) - }), () => u2()]), H(ne, Me) - }; - Ue(Q, ne => { - Ne().owned ? ne(_e, !1) : ne(te) - }) - } - A(ke), A(Xe), Ge((ne, Pe) => { - fe(Je, Ne().flag), fe(st, Ne().name), vt = Or(ke, 1, "mt-3", null, vt, ne), zr(ke, "data-tip", Pe) - }, [() => ({ - tooltip: !x(ft) - }), () => Hd()]), H(Ee, Xe) - }, - C = $n.countries.map(Ee => ({ - ...Ee, - owned: Dt.flagsBitmap.get(Ee.id) - })); - C.sort((Ee, Ne) => Number(Ne.owned) - Number(Ee.owned)); - const L = zn(C), - F = 110, - T = $n.products[F]; - let o = nt(!1), - $ = nt(void 0), - W = nt(void 0); - var ie = bz(), - pe = k(ie), - ye = k(pe); - dz(ye, { - class: "size-5.5", - filled: !0 - }), fi(2), A(pe); - var X = V(pe, 2), - Se = k(X, !0); - A(X); - var we = V(X, 2); - nn(we, 23, () => L, Ee => Ee.id, (Ee, Ne, ft) => { - var ht = Jt(), - Xe = zt(ht); - { - var ct = Je => { - _(Je, () => x(Ne)) - }; - Ue(Xe, Je => { - (x(ft) < 8 || x(o)) && Je(ct) - }) - } - H(Ee, ht) - }), A(we); - var Re = V(we, 2), - Ae = k(Re); - Ae.__click = [xz, o]; - var Oe = k(Ae, !0); - A(Ae), A(Re), A(ie), Ge(Ee => { - fe(Se, Ee), fe(Oe, x(o) ? "Show less" : "Show more") - }, [() => o2()]), H(b, ie), Pr() -} -Wi(["click"]); -var Tz = Ie('

        '), - Cz = (b, l) => { - kg(l, -1) - }, - Sz = (b, l) => { - kg(l) - }, - Pz = (b, l, _) => { - l(x(_)) - }, - Iz = Ie(''), - Mz = async (b, l, _, C) => { - try { - oe(l, !0), await ni.purchase({ - id: _.productId, - amount: C() - }), pa.notification1.play(), _.onpurchasecompleted(C()) - } catch (L) { - qr.error(L.message) - } finally { - oe(l, !1) - } - }, Az = Ie(''), kz = Ie('

        '); - -function Pg(b, l) { - Sr(l, !0); - let _ = Et(l, "amount", 15, 1); - const C = lt(() => _() * l.unitPrice), - L = lt(() => Math.floor(l.userDroplets / l.unitPrice)); - let F = nt(!1); - Zr(() => { - _() < 0 && _(0) - }); - var T = kz(), - o = k(T), - $ = k(o); - Ji($, () => l.icon ?? fa), A(o); - var W = V(o, 2), - ie = k(W, !0); - A(W); - var pe = V(W, 2); - { - var ye = Be => { - var st = Tz(), - it = k(st, !0); - A(st), Ge(() => fe(it, l.subtitle)), H(Be, st) - }; - Ue(pe, Be => { - l.subtitle && Be(ye) - }) - } - var X = V(pe, 2), - Se = k(X); - Se.__click = [Cz, _]; - var we = V(Se, 2); - ea(we); - var Re = V(we, 2); - Re.__click = [Sz, _]; - var Ae = V(Re, 2); - { - var Oe = Be => { - var st = Iz(); - st.__click = [Pz, _, L], H(Be, st) - }; - Ue(Ae, Be => { - _() < x(L) && Be(Oe) - }) - } - A(X); - var Ee = V(X, 2); - let Ne; - var ft = k(Ee); - ft.__click = [Mz, F, l, _]; - var ht = k(ft); - { - var Xe = Be => { - var st = Az(); - H(Be, st) - }; - Ue(ht, Be => { - x(F) && Be(Xe) - }) - } - var ct = V(ht, 2); - Ud(ct, { - class: "size-4" - }); - var Je = V(ct); - fi(), A(ft), A(Ee), A(T), Ge((Be, st, it, Qe) => { - fe(ie, Be), Re.disabled = _() >= x(L), zr(Ee, "data-tip", st), Ne = Or(Ee, 1, "", null, Ne, it), ft.disabled = l.userDroplets < x(C) || x(F) || !_(), fe(Je, ` ${Qe??""} `) - }, [() => l.title(_()), () => Hd(), () => ({ - tooltip: l.userDroplets < x(C) - }), () => x(C).toLocaleString("en-US")]), jd(we, _), H(b, T), Pr() -} -Wi(["click"]); -var Ez = Tr(''); - -function zz(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Ez(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Lz = Tr(''); - -function Rv(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Lz(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Dz = Tr(''); - -function Rz(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Dz(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Bz = Tr(''); - -function Fz(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Bz(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Oz = Ie(''), - Nz = Ie(''), - jz = Ie(' ', 1); - -function qz(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15), - C = nt(void 0), - L = nt(zn({ - name: hg(), - prev: 1e3, - new: 1e5 - })); - Ii(() => { - const Me = at => { - at.key === "Escape" && _(!1) - }; - return document.addEventListener("keydown", Me), () => document.removeEventListener("keydown", Me) - }); - const F = { - id: 70, - product: $n.products[70] - }, - T = { - id: 80, - product: $n.products[80] - }, - o = { - product: $n.products[120] - }; - var $ = jz(), - W = zt($), - ie = k(W), - pe = k(ie); - { - var ye = Me => { - var at = Oz(), - We = k(at), - Ct = k(We), - _t = k(Ct); - Rv(_t, { - class: "size-8" - }); - var xt = V(_t, 2), - tt = k(xt, !0); - A(xt); - var pt = V(xt, 2), - It = k(pt); - { - let Pt = lt(() => { - var kt; - return ((kt = Dt.data) == null ? void 0 : kt.droplets) ?? 0 - }); - Rg(It, { - get value() { - return x(Pt) - } - }) - } - A(pt), fi(2), A(Ct), A(We), On(We, () => cz); - var ut = V(We, 2), - bt = k(ut), - wt = k(bt), - dt = k(wt); - zz(dt, { - class: "size-5.5", - filled: !0 - }); - var Lt = V(dt, 2), - Xt = k(Lt, !0); - A(Lt), A(wt); - var Yt = V(wt, 2), - nr = k(Yt, !0); - A(Yt); - var ar = V(Yt, 2), - Ft = k(ar); - { - const Pt = Wt => { - Fz(Wt, { - class: "text-primary size-26" - }) - }; - let kt = lt(() => cb()); - Pg(Ft, { - get productId() { - return F.id - }, - title: Wt => sb({ - amount: F.product.items[0].amount * Wt - }), - get subtitle() { - return x(kt) - }, - get unitPrice() { - return F.product.price - }, - get userDroplets() { - return Dt.data.droplets - }, - onpurchasecompleted: async Wt => { - var Hr, $r, mr, gr, ai; - const Lr = ($r = (Hr = Dt.data) == null ? void 0 : Hr.charges) == null ? void 0 : $r.max; - await Dt.refresh(); - const Kr = (gr = (mr = Dt.data) == null ? void 0 : mr.charges) == null ? void 0 : gr.max; - Lr !== void 0 && Kr !== void 0 && (oe(L, { - name: hg(), - prev: Lr, - new: Kr - }, !0), (ai = x(C)) == null || ai.show()) - }, - icon: Pt, - $$slots: { - icon: !0 - } - }) - } - var dr = V(Ft, 2); - { - const Pt = Wt => { - Ev(Wt, { - class: "text-primary my-3 size-20" - }) - }; - let kt = lt(() => Y1()); - Pg(dr, { - get productId() { - return T.id - }, - title: Wt => Qw({ - amount: T.product.items[0].amount * Wt - }), - get subtitle() { - return x(kt) - }, - get unitPrice() { - return T.product.price - }, - get userDroplets() { - return Dt.data.droplets - }, - onpurchasecompleted: async Wt => { - var Kr, Hr, $r; - const Lr = (Hr = (Kr = Dt.data) == null ? void 0 : Kr.charges) == null ? void 0 : Hr.count; - await Dt.refresh(), Lr !== void 0 && (oe(L, { - name: Kw(), - prev: Math.floor(Lr), - new: Math.floor(Lr + T.product.items[0].amount * Wt) - }, !0), ($r = x(C)) == null || $r.show()) - }, - icon: Pt, - $$slots: { - icon: !0 - } - }) - } - A(ar), A(bt); - var _r = V(bt, 2), - Ir = k(_r), - jr = k(Ir); - Xd(jr, { - class: "size-5.5", - filled: !0 - }); - var ur = V(jr, 2), - Mr = k(ur, !0); - A(ur), A(Ir); - var Ar = V(Ir, 2), - kr = k(Ar), - Nr = k(kr), - ce = k(Nr), - O = k(ce), - q = k(O); - Bg(q, { - get userId() { - return Dt.data.id - }, - get level() { - return Dt.data.level - }, - get pictureUrl() { - return Dt.data.picture - } - }), A(O), A(ce), A(Nr); - var G = V(Nr, 2), - K = k(G, !0); - A(G); - var le = V(G, 2), - ve = k(le, !0); - A(le); - var Le = V(le, 2); - let Ce; - var Ze = k(Le), - ot = k(Ze), - Ye = k(ot); - Ud(Ye, { - class: "size-4" - }); - var Ot = V(Ye); - fi(), A(ot), A(Ze), A(Le), A(kr), A(Ar), A(_r); - var xe = V(_r, 2), - At = k(xe); - wz(At, {}), A(xe), A(ut), A(at), Ge((Pt, kt, Wt, Lr, Kr, Hr, $r, mr, gr) => { - fe(tt, Pt), fe(Xt, kt), fe(nr, Wt), fe(Mr, Lr), fe(K, Kr), fe(ve, Hr), zr(Le, "data-tip", $r), Ce = Or(Le, 1, "", null, Ce, mr), ot.disabled = Dt.data.droplets < o.product.price, fe(Ot, ` ${gr??""} `) - }, [() => qg(), () => eb(), () => ib(), () => n2(), () => db(), () => mb(), () => Hd(), () => ({ - tooltip: Dt.data.droplets < o.product.price - }), () => o.product.price.toLocaleString("en-US")]), En(2, at, () => Qn), H(Me, at) - }; - Ue(pe, Me => { - Dt.data && _() && Me(ye) - }) - } - A(ie); - var X = V(ie, 2), - Se = k(X), - we = k(Se, !0); - A(Se), A(X), A(W), On(W, () => Me => { - Zr(() => { - _() ? Me.show() : Me.close() - }) - }); - var Re = V(W, 2), - Ae = k(Re), - Oe = k(Ae), - Ee = k(Oe), - Ne = k(Ee, !0); - A(Ee); - var ft = V(Ee, 2), - ht = k(ft), - Xe = k(ht), - ct = V(Xe), - Je = k(ct); - A(ct), A(ht); - var Be = V(ht, 2), - st = k(Be); - Rz(st, { - class: "size-5" - }), A(Be); - var it = V(Be, 2), - Qe = k(it, !0); - A(it), A(ft); - var ke = V(ft, 2), - vt = k(ke), - Q = k(vt), - te = V(Q); - Pu(te, () => x(L).new, Me => { - var at = Nz(), - We = k(at); - hm(We, {}), A(at), H(Me, at) - }), A(vt), A(ke), A(Oe), A(Ae); - var _e = V(Ae, 2), - ne = k(_e), - Pe = k(ne, !0); - A(ne), A(_e), A(Re), ps(Re, Me => oe(C, Me), () => x(C)), Ge((Me, at, We) => { - fe(we, Me), fe(Ne, x(L).name), fe(Xe, `${x(L).prev??""} `), fe(Je, `(+${x(L).new-x(L).prev})`), fe(Qe, x(L).new), fe(Q, `${at??""} `), fe(Pe, We) - }, [() => tc(), () => tc(), () => tc()]), an("close", W, () => _(!1)), H(b, $), Pr() -} -var Vz = Tr(''); - -function Uz(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Vz(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Zz = Tr(''); - -function $z(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Zz(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Gz = Tr(''); - -function Hz(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Gz(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Wz = Tr(''); - -function Xz(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Wz(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Kz = Tr(''); - -function Yz(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Kz(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Jz = Tr(''); - -function Qz(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Jz(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var eL = Tr(''); - -function tL(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = eL(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} - -function vf(b) { - const l = document.createElement("img"); - return l.src = b, new Promise((_, C) => { - l.addEventListener("load", () => { - _(l) - }), l.addEventListener("error", L => { - C(L) - }) - }) -} - -function rL(b) { - const l = document.createElement("canvas"); - l.width = b.naturalWidth, l.height = b.naturalHeight; - const _ = l.getContext("2d"); - return _ == null || _.drawImage(b, 0, 0), l -} - -function iL(b, l, _) { - return b < l ? l : b > _ ? _ : b -} - -function nL(b, l) { - const _ = 10 ** l; - return Math.round(b * _) / _ -} -var aL = Ie(' ', 1), - sL = (b, l) => { - oe(l, !x(l)) - }, - oL = Ie(""), - lL = async (b, l, _, C) => { - var L; - x(l) || oe(l, await new Promise((F, T) => { - navigator.geolocation.getCurrentPosition(o => { - F(o) - }, o => { - T(o) - }) - })), x(l) && (Qa({ - lat: x(l).coords.latitude, - lng: x(l).coords.longitude - }, x(_)), (L = x(C)) == null || L.flyTo({ - center: { - lat: x(l).coords.latitude, - lng: x(l).coords.longitude - }, - zoom: 16.5 - })) - }, cL = Ie('
        ?
        '), uL = Ie(''), hL = (b, l, _, C) => { - var L; - oe(l, !0), x(_) && Qa((L = x(_)) == null ? void 0 : L.getCenter(), x(C)) - }, dL = Ie(''), pL = Ie(' '), fL = Ie('
        '), mL = (b, l, _, C) => { - var F; - oe(l, !0); - const L = (F = x(_)) == null ? void 0 : F.getCenter(); - L && Qa(L, x(C)) - }, _L = Ie(''), gL = (b, l) => { - oe(l, !0) - }, vL = Ie(''), yL = (b, l) => { - oe(l, !0) - }, xL = Ie(''), bL = Ie('
        '), wL = (b, l) => { - oe(l, !x(l)) - }, TL = Ie('
        '), CL = Ie('
        '), SL = (b, l) => { - oe(l, !0) - }, PL = Ie(''), IL = (b, l) => { - var _; - (_ = x(l)) == null || _.zoomIn() - }, ML = (b, l) => { - var _; - (_ = x(l)) == null || _.zoomOut() - }, AL = Ie(''), kL = () => { - window.location.replace(La.url.origin) - }, EL = Ie(''), zL = (b, l) => { - x(l) && Ho.goToPrev(x(l)) - }, LL = Ie(''), DL = Ie('
        '), RL = (b, l, _) => { - var C; - (C = x(l)) == null || C.flyTo({ - center: x(l).getCenter(), - zoom: _ - }) - }, BL = Ie(''), FL = Ie(""), OL = Ie('
        '), NL = Ie('
        '), jL = (b, l) => { - oe(l, { - name: "mainMenu" - }, !0) - }, qL = Ie('
        '), VL = Ie('
        ', 1); - -function gD(b, l) { - Sr(l, !0); - const _ = og, - C = ix, - L = new hc(C), - F = _ - .4, - T = FP(La.url), - o = T.season ?? sg, - $ = new Map; - let W = nt(void 0), - ie = nt(14.5), - pe = nt(!1); - const ye = lt(() => { - var gt; - return ((gt = Dt.data) == null ? void 0 : gt.id) === 401 - }); - let X = nt(!1), - Se = nt(zn(T.select && T.pos ? { - name: "pixelSelected", - latLon: [T.pos.lat, T.pos.lng] - } : { - name: "mainMenu" - })); - Ii(() => { - Re().then(vr => oe(W, vr)); - let gt = [0, 0]; - - function qt(vr) { - var _i; - if (x(W) && x(ie) > _ + 1) { - const { - lat: Di, - lng: $i - } = x(W).unproject([vr.clientX, vr.clientY]), Mi = L.latLonToPixels(Di, $i, _), Cr = Math.floor(Mi[0]), gn = Math.floor(Mi[1]); - if (gt[0] !== Cr || gt[1] !== gn) { - const tr = L.latLonToPixelBoundsLatLon(Di, $i, _), - Ht = rm(tr, !0); - (_i = x(W).getSource(Ee)) == null || _i.setCoordinates(Ht), gt = [Cr, gn] - } - } - } - return window.addEventListener("mousemove", qt), () => { - var vr; - (vr = x(W)) == null || vr.remove(), window.removeEventListener("mousemove", qt), we && clearInterval(we), yf() - } - }); - let we; - async function Re() { - const gt = T.pos ? { - ...T.pos, - zoom: x(ie) - } : await IP(); - T.zoom !== void 0 && (gt.zoom = T.zoom); - const qt = await new Promise(Mi => { - const Cr = new bd.Map({ - style: "maps/styles/liberty", - center: gt, - zoom: gt.zoom, - container: "map", - dragRotate: !1, - doubleClickZoom: !1, - pitch: 0, - maxPitch: 0, - attributionControl: !1 - }); - Cr.touchZoomRotate.disableRotation(), Cr.on("style.load", () => { - Cr == null || Cr.setLayoutProperty("poi_transit", "visibility", "none"), Cr == null || Cr.setLayoutProperty("poi_r20", "visibility", "none"), Cr == null || Cr.setLayoutProperty("poi_r7", "visibility", "none"), Cr == null || Cr.setLayoutProperty("poi_r1", "visibility", "none"), Cr == null || Cr.setLayoutProperty("building", "visibility", "none"), Cr == null || Cr.setLayoutProperty("building-3d", "visibility", "none"), Cr == null || Cr.setLayoutProperty("landuse_pitch", "visibility", "none"), Cr == null || Cr.setLayoutProperty("landuse_hospital", "visibility", "none"), Cr == null || Cr.setLayoutProperty("landuse_school", "visibility", "none"), Cr == null || Cr.setLayoutProperty("landuse_residential", "visibility", "none"), Cr == null || Cr.setLayoutProperty("waterway_tunnel", "visibility", "none"), Cr == null || Cr.setFilter("water", ["all", ["!=", "brunnel", "tunnel"], - ["!=", "class", "swimming_pool"] - ]), Mi(Cr) - }) - }); - Oe(qt), Xe(); - const vr = $n.refreshIntervalMs; - - function _i() { - let Mi = x(ie) > _ + 1.5 ? vr : 2.5 * vr; - try { - document.visibilityState === "visible" && Oe(qt) - } finally { - setTimeout(_i, Mi) - } - } - we = setTimeout(_i, vr); - let Di = x(ie); - qt.on("zoom", () => { - oe(ie, qt.getZoom(), !0); - const Mi = nL(x(ie), 1); - Mi != Di && (x(ke) && x(ke).setOpacity(vt(Di)), Di = Mi) - }); - let $i = "default"; - return qt.on("dragstart", () => { - const Mi = qt.getCanvas(); - $i = Mi.style.cursor, Mi.style.cursor = "move" - }), qt.on("dragend", () => { - qt.getCanvas().style.cursor = $i - }), qt.on("mouseout", () => { - ct() - }), qt.on("click", async Mi => { - var ei; - const Cr = Mi.lngLat.lat, - gn = Mi.lngLat.lng, - tr = [Cr, gn]; - if (x(Se).name === "paintingPixel") return; - if (x(Se).name === "selectHq") { - x(Se).hq = tr, (ei = x(Q)) == null || ei.clearAndPlace(tr); - return - } - const Ht = qt.getZoom(); - if (Ht < F) { - qr.info(IC()); - return - } - Qa({ - lat: Cr, - lng: gn - }, Ht), oe(Se, { - name: "pixelSelected", - latLon: tr - }, !0) - }), qt - } - const Ae = "pixel-art-layer"; - - function Oe(gt) { - const qt = window.innerWidth, - vr = `${nx}/s${sg}/tiles/{x}/{y}.png`; - if ($.clear(), !gt.style) return; - gt.getSource(Ae) ? gt.refreshTiles(Ae) : gt.addSource(Ae, { - type: "raster", - tiles: [vr], - minzoom: _, - maxzoom: _, - tileSize: qt > 640 ? 550 : 400 - }), gt.getLayer(Ae) || gt.addLayer({ - id: Ae, - type: "raster", - source: Ae, - paint: { - "raster-resampling": "nearest", - "raster-opacity": x(Be) - } - }) - } - const Ee = "pixel-hover", - Ne = 1e-5, - ft = [ - [0, 0], - [Ne, 0], - [Ne, -Ne], - [0, -Ne] - ], - ht = .4; - async function Xe() { - var gt, qt, vr, _i; - if (!((gt = x(W)) != null && gt.getSource(Ee))) { - const Di = rL(await vf(SP)); - (qt = x(W)) == null || qt.addSource(Ee, { - type: "canvas", - canvas: Di, - coordinates: ft - }) - }(vr = x(W)) != null && vr.getLayer(Ee) || (_i = x(W)) == null || _i.addLayer({ - id: Ee, - type: "raster", - source: Ee, - paint: { - "raster-resampling": "nearest", - "raster-opacity": ht - } - }) - } - - function ct() { - var gt, qt; - (qt = (gt = x(W)) == null ? void 0 : gt.getSource(Ee)) == null || qt.setCoordinates(ft) - } - let Je = nt(zn(T.opaque ?? !0)), - Be = lt(() => x(Je) ? 1 : .1); - Zr(() => { - var gt; - (gt = x(W)) != null && gt.getLayer(Ae) && x(W).setPaintProperty(Ae, "raster-opacity", x(Be)) - }); - let st = nt(void 0), - it = nt(void 0), - Qe = nt(void 0); - Ii(() => (navigator.permissions.query({ - name: "geolocation" - }).then(gt => { - gt.state === "granted" && oe(Qe, navigator.geolocation.watchPosition(qt => { - oe(st, qt) - }, qt => { - oe(it, qt) - }, { - enableHighAccuracy: !1, - maximumAge: 1e3, - timeout: 6e3 - }), !0) - }), () => { - x(Qe) && navigator.geolocation.clearWatch(x(Qe)) - })); - let ke = nt(void 0); - dc(() => [x(st), x(W)], () => { - var gt, qt; - if (x(st) && x(W)) { - const vr = { - lat: x(st).coords.latitude, - lng: x(st).coords.longitude - }, - _i = vt(x(ie)); - if (!x(ke)) { - const Di = document.createElement("div"); - Di.classList.add("maplibregl-user-location-dot"), Di.classList.add("cursor-auto"), oe(ke, new bd.Marker({ - element: Di, - opacity: _i - }).setLngLat(vr).addTo(x(W))) - }(qt = (gt = x(ke)) == null ? void 0 : gt.setLngLat(vr)) == null || qt.setOpacity(_i) - } - }); - - function vt(gt) { - return gt < _ ? "1.0" : iL((gt - _) * .2, .5, 1).toFixed(2) - } - let Q = nt(void 0); - Zr(() => { - var gt; - x(W) && ((gt = Go(() => x(Q))) == null || gt.clear(), vf(dg).then(qt => { - oe(Q, new fg({ - id: "select-crosshair", - map: x(W), - tileSize: C, - zoom: _, - img: qt, - markerFn: () => { - const vr = new bd.Marker({ - color: "#0069ff" - }); - return vr.addClassName("z-20"), vr - } - })) - })) - }); - let te = nt(void 0); - Zr(() => { - var gt; - x(W) && ((gt = Go(() => x(Q))) == null || gt.clear(), vf(dg).then(qt => { - oe(te, new fg({ - id: "paint-crosshair", - map: x(W), - tileSize: C, - zoom: _, - img: qt - })) - })) - }); - let _e = nt(!1), - ne = nt(!1), - Pe = nt(!1), - Me = nt(!!T.newUser), - at = nt(!1), - We = nt(!!T.alliance), - Ct = nt(!1); - const _t = "void-message-2"; - let xt = nt(!1); - Zr(() => { - const gt = localStorage.getItem(_t); - Dt.data && !gt && (oe(xt, !0), localStorage.setItem(_t, "true")) - }); - let tt = nt(!1), - pt = nt(zn(La.url)), - It = nt(zn({ - cityId: 0, - countryId: 1, - id: 0, - name: "None", - number: 1 - })), - ut = nt(!1); - const bt = "view-rules"; - let wt = !1; - Zr(() => { - Dt.data && (!wt && Dt.data.pixelsPainted > 1 && (localStorage.getItem(bt) || (oe(ut, !0), localStorage.setItem(bt, "true"))), wt = !0) - }); - let dt = nt(!1); - Zr(() => { - var gt; - oe(dt, !!((gt = Dt.data) != null && gt.needsPhoneVerification)) - }); - let Lt = nt([]), - Xt = lt(() => x(ie) < F ? "1.0" : x(ie) < F + 2 ? "0.5" : "0.3"); - Zr(() => { - var qt; - const gt = (qt = Dt.data) == null ? void 0 : qt.favoriteLocations; - if (gt && x(W)) { - for (const vr of Go(() => x(Lt))) vr.remove(); - oe(Lt, gt.map(vr => { - const _i = document.createElement("div"); - _i.classList.add("text-yellow-400"), _i.classList.add("cursor-pointer"), _i.classList.add("z-10"), _i.innerHTML = ` - - - `; - const Di = { - lat: vr.latitude, - lng: vr.longitude - }; - return _i.addEventListener("click", Mi => { - Mi.stopPropagation(), Yt([vr.latitude, vr.longitude]) - }), new bd.Marker({ - element: _i, - opacity: x(Xt) - }).setLngLat(Di).addTo(x(W)) - })) - } - }); - - function Yt(gt) { - var vr; - const qt = { - lat: gt[0], - lng: gt[1] - }; - (vr = x(W)) == null || vr.flyTo({ - center: qt, - zoom: Math.max(x(ie), 15) - }), Qa(qt, x(ie)), oe(Se, { - name: "pixelSelected", - latLon: [qt.lat, qt.lng] - }, !0) - } - Zr(() => { - if (x(Se).name === "paintingPixel") - for (const gt of x(Lt)) gt.addClassName("hidden"); - else - for (const gt of x(Lt)) gt.removeClassName("hidden"), gt.setOpacity(x(Xt)) - }); - let nr = Number.MAX_VALUE; - Zr(() => { - if (Dt.charges !== void 0 && Dt.data) { - const gt = Dt.data.charges.max, - qt = Dt.charges; - nr < gt && qt >= gt && pa.notification1.play(), nr = Dt.charges - } - }); - let ar = nt(!1), - Ft = Date.now(); - Ii(() => { - const gt = BP(), - qt = () => { - var _i; - if (!document.hidden && Date.now() - Ft > 30 * Yl.min) { - if (gt) { - const $i = (_i = x(W)) == null ? void 0 : _i.getCenter(); - $i && Qa($i, x(ie)), window.location.replace(La.url.origin) - } else Dt.refresh(); - Ft = Date.now() - } - }; - return document.addEventListener("visibilitychange", qt), () => document.removeEventListener("visibilitychange", qt) - }), Ii(() => { - function gt() { - ni.online = !0 - } - window.addEventListener("online", gt); - - function qt() { - ni.online = !1 - } - return window.addEventListener("offline", qt), () => { - window.removeEventListener("online", gt), window.removeEventListener("offline", qt) - } - }), Zr(() => { - if (!ni.online) { - const gt = setInterval(() => { - ni.health().then(() => { - ni.online = !0, !Dt.data && !Dt.loading && Dt.refresh() - }) - }, 5e3); - return () => { - clearInterval(gt) - } - } - }), Ii(() => { - function gt(qt) { - qt.data.type && x(W) && Oe(x(W)) - } - return navigator.serviceWorker.addEventListener("message", gt), () => { - navigator.serviceWorker.removeEventListener("message", gt) - } - }); - let dr = nt(!1), - _r = nt("report-user"), - Ir = nt(void 0), - jr = nt(void 0), - ur = nt(void 0), - Mr = nt(0); - var Ar = VL(); - Vy(gt => { - var qt = aL(); - qy.title = "openplace - Paint the world", fi(6), H(gt, qt) - }); - var kr = zt(Ar); - { - const gt = tr => { - var Ht = oL(); - Ht.__click = [sL, Je]; - var ei = k(Ht); - { - let ri = lt(() => !x(Je)); - zv(ei, { - class: "size-5", - get filled() { - return x(ri) - } - }) - } - A(Ht), Ge(ri => { - zr(Ht, "title", ri), Or(Ht, 1, Vo({ - "btn btn-lg btn-square sm:btn-xl z-30 shadow-md": !0, - "text-base-content/80": x(Je), - "btn-primary btn-soft": !x(Je) - })) - }, [() => Ug()]), H(tr, Ht) - }, - qt = tr => { - var Ht = uL(); - Ht.__click = [lL, st, ie, W]; - var ei = k(Ht); - { - var ri = ci => { - Xz(ci, { - class: "size-5.5 fill-blue-800" - }) - }, - gi = ci => { - var pi = cL(), - Er = k(pi); - Hz(Er, { - class: "size-5.5 fill-red-400" - }), fi(2), A(pi), H(ci, pi) - }; - Ue(ei, ci => { - x(st) ? ci(ri) : ci(gi, !1) - }) - } - A(Ht), Ge(ci => zr(Ht, "title", ci), [() => d1()]), H(tr, Ht) - }; - var Nr = V(k(kr), 2); - let vr; - var ce = k(Nr); - let _i; - var O = k(ce); - { - var q = tr => { - var Ht = dL(); - Ht.__click = [hL, _e, W, ie]; - var ei = k(Ht, !0); - A(Ht), Ge(ri => fe(ei, ri), [() => Ex()]), H(tr, Ht) - }, - G = tr => { - var Ht = Jt(), - ei = zt(Ht); - { - var ri = gi => { - var ci = fL(), - pi = k(ci); - { - var Er = ui => { - var Jr = pL(), - ti = k(Jr, !0); - A(Jr), Ge(() => { - var yr; - zr(Jr, "href", `${La.url.origin??""}/admin`), fe(ti, ((yr = Dt.data) == null ? void 0 : yr.role) === "admin" ? "ADMIN" : "MOD") - }), H(ui, Jr) - }; - Ue(pi, ui => { - var Jr; - Cu((Jr = Dt.data) == null ? void 0 : Jr.role, ["admin", "moderator", "global_moderator"]) && ui(Er) - }) - } - var Ri = V(pi, 2); - h8(Ri, { - get user() { - return Dt - }, - onlogout: () => { - oe(Se, { - name: "mainMenu" - }, !0) - }, - onclickleaderboard: () => { - oe(Pe, !0) - }, - onclickshop: () => { - var Jr; - oe(ne, !0); - const ui = (Jr = x(W)) == null ? void 0 : Jr.getCenter(); - ui && Qa(ui, x(ie)) - } - }), A(ci), En(3, ci, () => Qn, () => ({ - duration: 150 - })), H(gi, ci) - }; - Ue(ei, gi => { - Dt.data && x(W) && x(Se).name !== "paintingPixel" && gi(ri) - }, !0) - } - H(tr, Ht) - }; - Ue(O, tr => { - !Dt.loading && !Dt.data ? tr(q) : tr(G, !1) - }) - } - var K = V(O, 2); - { - var le = tr => { - var Ht = bL(), - ei = k(Ht); - { - var ri = Ri => { - _f(Ri, { - key: "shop-profile-picture", - children: (ui, Jr) => { - var ti = _L(); - ti.__click = [mL, ne, W, ie]; - var yr = k(ti); - Rv(yr, { - class: "size-5" - }), A(ti), Ge(on => zr(ti, "title", on), [() => qg()]), H(ui, ti) - }, - $$slots: { - default: !0 - } - }) - }; - Ue(ei, Ri => { - Dt.data && Ri(ri) - }) - } - var gi = V(ei, 2); - { - var ci = Ri => { - var ui = vL(); - ui.__click = [gL, We]; - var Jr = k(ui); - Kd(Jr, { - class: "size-5" - }), A(ui), Ge(ti => zr(ui, "title", ti), [() => Gd()]), H(Ri, ui) - }; - Ue(gi, Ri => { - Dt.data && Ri(ci) - }) - } - var pi = V(gi, 2); - v8(pi, { - get map() { - return x(W) - }, - get season() { - return o - } - }); - var Er = V(pi, 2); - _f(Er, { - key: "region-leaderboard", - children: (Ri, ui) => { - var Jr = xL(); - Jr.__click = [yL, Pe]; - var ti = k(Jr); - Mv(ti, { - class: "size-5" - }), A(Jr), Ge(yr => zr(Jr, "title", yr), [() => Yf()]), H(Ri, Jr) - }, - $$slots: { - default: !0 - } - }), A(Ht), En(3, Ht, () => Qn, () => ({ - duration: 150 - })), H(tr, Ht) - }, - ve = tr => { - var Ht = Jt(), - ei = zt(Ht); - { - var ri = gi => { - var ci = TL(), - pi = k(ci); - let Er; - pi.__click = [wL, pe]; - var Ri = k(pi); - { - var ui = ti => { - Gf(ti, { - class: "size-5" - }) - }, - Jr = ti => { - Ld(ti, { - class: "size-5" - }) - }; - Ue(Ri, ti => { - x(pe) ? ti(ui) : ti(Jr, !1) - }) - } - A(pi), A(ci), Ge((ti, yr) => { - zr(pi, "title", ti), Er = Or(pi, 1, "btn btn-square not-touchscreen:hidden shadow-md", null, Er, yr) - }, [() => x(pe) ? jx() : Ux(), () => ({ - "btn-primary": x(pe) - })]), En(1, ci, () => Qn, () => ({ - delay: 150, - duration: 150 - })), H(gi, ci) - }; - Ue(ei, gi => { - x(W) && x(Se).name === "paintingPixel" && gi(ri) - }, !0) - } - H(tr, Ht) - }; - Ue(K, tr => { - x(W) && x(Se).name !== "paintingPixel" ? tr(le) : tr(ve, !1) - }) - } - A(ce), A(Nr); - var Le = V(Nr, 2); - { - var Ce = tr => { - var Ht = CL(), - ei = k(Ht); - { - oa.captcha = { token: "skip", time: Date.now() }; - } - A(Ht), En(2, Ht, () => Qn, () => ({ - duration: 300 - })), H(tr, Ht) - }; - Ue(Le, tr => { - (!oa.captcha || oa.now - oa.captcha.time > 180 * 1e3) && tr(Ce) - }) - } - var Ze = V(Le, 2); - let Di; - var ot = k(Ze); - { - var Ye = tr => { - _f(tr, { - key: "info", - children: (Ht, ei) => { - var ri = PL(); - ri.__click = [SL, at]; - var gi = k(ri); - $z(gi, { - class: "size-3.5" - }), A(ri), Ge(ci => zr(ri, "title", ci), [() => Gx()]), H(Ht, ri) - }, - $$slots: { - default: !0 - } - }) - }; - Ue(ot, tr => { - x(Se).name !== "paintingPixel" && tr(Ye) - }) - } - var Ot = V(ot, 2), - xe = k(Ot); - xe.__click = [IL, W]; - var At = V(xe, 2); - At.__click = [ML, W], A(Ot); - var Pt = V(Ot, 2), - kt = k(Pt), - Wt = k(kt); - jg(Wt, { - class: "size-4" - }), A(kt), A(Pt); - var Lr = V(Pt, 2); - { - var Kr = tr => { - var Ht = AL(), - ei = k(Ht); - tL(ei, { - class: "size-4", - onclick: () => { - oe(X, !x(X)) - } - }), A(Ht), Ge(ri => zr(Ht, "title", ri), [() => Ob()]), H(tr, Ht) - }; - Ue(Lr, tr => { - x(ye) && tr(Kr) - }) - } - var Hr = V(Lr, 2); - { - var $r = tr => { - var Ht = EL(); - Ht.__click = [kL]; - var ei = k(Ht); - Tx(ei, { - class: "size-3" - }), A(Ht), Ge(ri => zr(Ht, "title", ri), [() => Cx()]), H(tr, Ht) - }; - Ue(Hr, tr => { - x(Se).name !== "paintingPixel" && tr($r) - }) - } - var mr = V(Hr, 2); - { - var gr = tr => { - var Ht = LL(); - Ht.__click = [zL, W]; - var ei = k(Ht); - Qz(ei, { - class: "size-3" - }), A(Ht), Ge((ri, gi) => { - zr(Ht, "title", ri), Ht.disabled = gi - }, [() => t1(), () => !Ho.hasPrev()]), En(1, Ht, () => Qn, () => ({ - delay: 1e3, - duration: 300 - })), En(2, Ht, () => Qn, () => ({ - duration: 300 - })), H(tr, Ht) - }; - Ue(mr, tr => { - Ho.hasPrev() && x(Se).name !== "paintingPixel" && tr(gr) - }) - } - A(Ze); - var ai = V(Ze, 2); - let $i; - var Tt = k(ai); - { - var Ci = tr => { - var Ht = DL(), - ei = k(Ht); - Sx(ei, { - class: "size-5" - }); - var ri = V(ei); - A(Ht), Ge(gi => fe(ri, ` ${gi??""}`), [() => n1()]), En(1, Ht, () => Qn, () => ({ - duration: 1e3 - })), En(2, Ht, () => Qn), H(tr, Ht) - }; - Ue(Tt, tr => { - ni.online || tr(Ci) - }) - } - var di = V(Tt, 2); - { - var Pn = tr => { - var Ht = BL(); - Ht.__click = [RL, W, _]; - var ei = k(Ht); - Yz(ei, { - class: "size-5" - }); - var ri = V(ei); - A(Ht), Ge(gi => fe(ri, ` ${gi??""}`), [() => o1()]), En(3, Ht, () => Qn, () => ({ - duration: 300 - })), H(tr, Ht) - }; - Ue(di, tr => { - x(ie) < F && tr(Pn) - }) - } - A(ai); - var Mt = V(ai, 2); - let Mi; - var Ke = k(Mt); - gt(Ke), A(Mt); - var jt = V(Mt, 2); - let Cr; - var Gt = k(jt); - { - var Dr = tr => { - kv(tr, { - class: "z-30", - onclick: () => { - var Ht; - (Ht = Dt.data) != null && Ht.needsPhoneVerification ? (oe(dt, !0), qr.warning(cg())) : Dt.charges !== void 0 && Dt.charges < 1 ? qr.warning(rk, { - icon: Eg - }) : x(W) && Dt.data ? (pa.smallDropplet.play(), oe(Se, { - name: "paintingPixel" - }, !0)) : (oe(_e, !0), x(W) && Qa(x(W).getCenter(), x(ie))) - }, - get disabled() { - return Dt.loading - }, - get loading() { - return Dt.loading - }, - get charges() { - return Dt.charges - } - }) - }, - Gr = tr => { - var Ht = FL(); - H(tr, Ht) - }; - Ue(Gt, tr => { - x(Se).name === "mainMenu" ? tr(Dr) : tr(Gr, !1) - }) - } - A(jt); - var li = V(jt, 2); - let gn; - var fr = k(li); - qt(fr), A(li); - var bi = V(li, 2); - { - var Si = tr => { - var Ht = Jt(), - ei = zt(Ht); - { - var ri = ci => { - var pi = OL(), - Er = k(pi), - Ri = k(Er); - lz(Ri, { - get latLon() { - return x(Se).latLon - }, - get map() { - return x(W) - }, - get crosshair() { - return x(Q) - }, - get pixelInfoCache() { - return $ - }, - get season() { - return o - }, - get tileSize() { - return C - }, - get pixelArtZoom() { - return _ - }, - get zoom() { - return x(ie) - }, - get opaquePixelArt() { - return x(Je) - }, - onclose: () => oe(Se, { - name: "mainMenu" - }, !0), - onclickshare: ui => { - oe(pt, ui, !0), oe(tt, !0) - }, - onclickpaint: ([ui, Jr]) => { - var yr, on, vn; - if (!Dt.data) { - oe(_e, !0); - return - } - if ((yr = Dt.data) != null && yr.needsPhoneVerification) { - oe(dt, !0), qr.warning(cg()); - return - } - if (Dt.charges !== void 0 && Dt.charges < 1) { - qr.warning(m1()); - return - } - const ti = im(L.latLonToPixelBoundsLatLon(ui, Jr, _)); - (on = x(W)) == null || on.flyTo({ - center: { - lat: ti[0], - lon: ti[1] - } - }), oe(Se, { - name: "paintingPixel", - clickedLatLon: [ui, Jr] - }, !0), (vn = x(Q)) == null || vn.clear() - }, - onclickregion: ui => { - oe(It, ui, !0), oe(Ct, !0) - }, - onclickmodaction: (ui, Jr, ti, yr) => { - var on, vn, _a; - (on = x(W)) == null || on.setZoom(Math.max(x(ie), _ + 2)), (vn = x(W)) == null || vn.setCenter({ - lat: ti[0], - lng: ti[1] - }), oe(Ir, Jr, !0), oe(jr, ui, !0), oe(ur, ti, !0), oe(Mr, ((_a = x(W)) == null ? void 0 : _a.getZoom()) ?? 0, !0), oe(_r, yr, !0), oe(dr, !0) - } - }), A(Er), A(pi), En(3, Er, () => uf, () => ({ - duration: 100 - })), H(ci, pi) - }, - gi = ci => { - var pi = Jt(), - Er = zt(pi); - { - var Ri = Jr => { - var ti = NL(), - yr = k(ti), - on = k(yr); - nE(on, { - get map() { - return x(W) - }, - get clickedLatLon() { - return x(Se).clickedLatLon - }, - get tileSize() { - return C - }, - get tileZoom() { - return _ - }, - get season() { - return o - }, - get zoom() { - return x(ie) - }, - get crosshair() { - return x(te) - }, - refreshPixelArt: () => x(W) && Oe(x(W)), - hidePixelHover: ct, - hoverLayerId: Ee, - onclose: () => { - oe(Se, { - name: "mainMenu" - }, !0), ct() - }, - get screenLocked() { - return x(pe) - }, - set screenLocked(vn) { - oe(pe, vn, !0) - }, - get opaquePixelArt() { - return x(Je) - }, - set opaquePixelArt(vn) { - oe(Je, vn, !0) - } - }), A(yr), A(ti), En(3, yr, () => uf, () => ({ - duration: 100 - })), H(Jr, ti) - }, - ui = Jr => { - var ti = Jt(), - yr = zt(ti); - { - var on = vn => { - var _a = qL(), - ln = k(_a), - Ki = k(ln), - cn = k(Ki), - Ni = k(cn), - wi = k(Ni); - Lv(wi, { - class: "inline size-4" - }); - var Ko = V(wi); - A(Ni); - var un = V(Ni, 2); - un.__click = [jL, Se]; - var Nn = k(un); - fc(Nn, { - class: "size-4" - }), A(un), A(cn); - var hn = V(cn, 2), - Ti = k(hn); - Ti.__click = async () => { - var wr; - if (x(Se).name === "selectHq") { - const Vr = x(Se).hq; - if (Vr) try { - oe(ar, !0), await ni.updateAllianceHeadquarters(Vr[0], Vr[1]), (wr = x(Q)) == null || wr.clear(), oe(We, !0), oe(Se, { - name: "mainMenu" - }, !0) - } catch (ga) { - qr.error(ga.message) - } finally { - oe(ar, !1) - } - } - }; - var Za = k(Ti); - Uz(Za, { - class: "size-6" - }), A(Ti), A(hn), A(Ki), A(ln), A(_a), Ge(wr => { - fe(Ko, ` ${wr??""}`), Ti.disabled = x(Se).hq === void 0 || x(ar) - }, [() => B3()]), En(3, ln, () => uf, () => ({ - duration: 100 - })), H(vn, _a) - }; - Ue(yr, vn => { - x(Se).name === "selectHq" && vn(on) - }, !0) - } - H(Jr, ti) - }; - Ue(Er, Jr => { - x(Se).name === "paintingPixel" && x(te) ? Jr(Ri) : Jr(ui, !1) - }, !0) - } - H(ci, pi) - }; - Ue(ei, ci => { - x(Se).name === "pixelSelected" && x(Q) ? ci(ri) : ci(gi, !1) - }) - } - H(tr, Ht) - }; - Ue(bi, tr => { - x(W) && tr(Si) - }) - } - A(kr), Ge((tr, Ht, ei, ri, gi, ci, pi, Er, Ri) => { - vr = Or(Nr, 1, "absolute right-2 top-2 z-30", null, vr, tr), _i = Or(ce, 1, "flex flex-col gap-4", null, _i, Ht), Di = Or(Ze, 1, "absolute left-2 top-2 z-30 flex flex-col gap-3", null, Di, ei), zr(xe, "title", ri), zr(At, "title", gi), $i = Or(ai, 1, "absolute left-1/2 top-2 z-30 flex -translate-x-1/2 flex-col items-center justify-center gap-2", null, $i, ci), Mi = Or(Mt, 1, "absolute bottom-3 left-3 z-30", null, Mi, pi), Cr = Or(jt, 1, "absolute bottom-3 left-1/2 z-30 -translate-x-1/2", null, Cr, Er), gn = Or(li, 1, "absolute bottom-3 right-3 z-30", null, gn, Ri) - }, [() => ({ - hidden: x(X) - }), () => ({ - "items-end": !Dt.data, - "items-center": Dt.data - }), () => ({ - hidden: x(X) - }), () => Xx(), () => Jx(), () => ({ - hidden: x(X) - }), () => ({ - hidden: x(X) - }), () => ({ - hidden: x(X) - }), () => ({ - hidden: x(X) - })]) - } - var zi = V(kr, 2); - YA(zi, { - get open() { - return x(_e) - }, - set open(gt) { - oe(_e, gt, !0) - } - }); - var mi = V(zi, 2); - qz(mi, { - get open() { - return x(ne) - }, - set open(gt) { - oe(ne, gt, !0) - } - }); - var Li = V(mi, 2); - ZM(Li, { - get open() { - return x(Me) - }, - set open(gt) { - oe(Me, gt, !0) - } - }); - var rr = V(Li, 2); - i4(rr, { - get open() { - return x(at) - }, - set open(gt) { - oe(at, gt, !0) - } - }); - var yi = V(rr, 2); - qM(yi, { - get open() { - return x(ut) - }, - set open(gt) { - oe(ut, gt, !0) - } - }); - var Qr = V(yi, 2); - WA(Qr, { - onvisitclick: gt => { - var qt; - (qt = x(W)) == null || qt.flyTo({ - center: gt, - zoom: og + 1 - }), Qa(gt, x(ie)), Ho.push({ - pos: gt, - zoom: x(ie) - }), oe(Pe, !1) - }, - get open() { - return x(Pe) - }, - set open(gt) { - oe(Pe, gt, !0) - } - }); - var Yr = V(Qr, 2); - z8(Yr, { - get region() { - return x(It) - }, - get open() { - return x(Ct) - }, - set open(gt) { - oe(Ct, gt, !0) - } - }); - var la = V(Yr, 2); - mx(la, { - get open() { - return oa.dropletsDialogOpen - }, - set open(gt) { - oa.dropletsDialogOpen = gt - } - }); - var sn = V(la, 2); - { - var ta = gt => { - gM(gt, { - onhqchange: () => { - oe(Se, { - name: "selectHq" - }, !0), oe(We, !1) - }, - onhqclick: qt => { - var vr; - (vr = x(W)) == null || vr.flyTo({ - center: qt, - zoom: Math.max(x(ie), 15) - }), oe(Se, { - name: "pixelSelected", - latLon: [qt.lat, qt.lng] - }, !0), oe(We, !1) - }, - onlastpixelclick: qt => { - var vr; - (vr = x(W)) == null || vr.flyTo({ - center: qt, - zoom: Math.max(x(ie), 15) - }), oe(Se, { - name: "pixelSelected", - latLon: [qt.lat, qt.lng] - }, !0), oe(We, !1) - }, - get open() { - return x(We) - }, - set open(qt) { - oe(We, qt, !0) - } - }) - }; - Ue(sn, gt => { - x(W) && gt(ta) - }) - } - var Fi = V(sn, 2); - CE(Fi, { - get open() { - return x(dt) - }, - set open(gt) { - oe(dt, gt, !0) - } - }); - var Xi = V(Fi, 2); - { - var Gn = gt => { - DM(gt, { - get url() { - return x(pt) - }, - get map() { - return x(W) - }, - hideHover: () => { - var qt, vr; - (qt = x(W)) == null || qt.setPaintProperty(Ee, "raster-opacity", 0), (vr = x(Q)) == null || vr.setCanvasOpacity(0) - }, - showHover: () => { - var qt, vr; - (qt = x(W)) == null || qt.setPaintProperty(Ee, "raster-opacity", ht), (vr = x(Q)) == null || vr.setCanvasOpacity(1) - }, - get open() { - return x(tt) - }, - set open(qt) { - oe(tt, qt, !0) - } - }) - }; - Ue(Xi, gt => { - x(W) && gt(Gn) - }) - } - var Hn = V(Xi, 2); - { - var Ln = gt => { - bM(gt, { - get image() { - return x(Ir) - }, - get paintedBy() { - return x(jr).paintedBy - }, - get latLon() { - return x(ur) - }, - get zoom() { - return x(Mr) - }, - get action() { - return x(_r) - }, - get open() { - return x(dr) - }, - set open(qt) { - oe(dr, qt, !0) - } - }) - }; - Ue(Hn, gt => { - x(jr) && x(Ir) && x(ur) && gt(Ln) - }) - } - H(b, Ar), Pr() -} -Wi(["click"]); -export { - gD as component -}; \ No newline at end of file diff --git a/frontend-backup/_app/immutable/chunks/2CRhGZHc.js b/frontend-backup/_app/immutable/chunks/2CRhGZHc.js deleted file mode 100644 index 376410a..0000000 --- a/frontend-backup/_app/immutable/chunks/2CRhGZHc.js +++ /dev/null @@ -1,21 +0,0 @@ -import { i as _, g as o, am as f, h as a, P as u, ad as c, a2 as d, O as i, I as s, m as r, J as y } from "./DUoKDNpf.js"; -let e; -function m() { - e = void 0; -} -function p(h) { - let t = null, - l = a; - var n; - if (a) { - for (t = r, e === void 0 && (e = y(document.head)); e !== null && (e.nodeType !== u || e.data !== c); ) e = d(e); - e === null ? i(!1) : (e = s(d(e))); - } - a || (n = document.head.appendChild(_())); - try { - o(() => h(n), f); - } finally { - l && (i(!0), (e = r), s(t)); - } -} -export { p as h, m as r }; diff --git a/frontend-backup/_app/immutable/chunks/4WsUhDWi.js b/frontend-backup/_app/immutable/chunks/4WsUhDWi.js deleted file mode 100644 index 47a00c0..0000000 --- a/frontend-backup/_app/immutable/chunks/4WsUhDWi.js +++ /dev/null @@ -1,143 +0,0 @@ -import { - i as h, - h as p, - e as v, - ai as m, - ah as w, - K as E, - E as x, - k as T, - az as C, - a7 as S, - o as y, - P as k, - aA as i, - y as A, - aB as _, - aC as D, - w as o, - a3 as I, - aD as b, - aE as R, - z as u, - aF as P, - aG as z, - aH as F, - aI as N, - aJ as j, - aK as K, - aL as L, -} from "./BDALf20I.js"; -import { h as M, m as O, u as U } from "./4k6DpCgf.js"; -(function () { - try { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - e.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - t = new e.Error().stack; - t && ((e._sentryDebugIds = e._sentryDebugIds || {}), (e._sentryDebugIds[t] = "108534dc-c984-4e89-a0c7-0245224c9d9d"), (e._sentryDebugIdIdentifier = "sentry-dbid-108534dc-c984-4e89-a0c7-0245224c9d9d")); - })(); -} catch {} -function W(e, t, ...r) { - var a = e, - n = C, - s; - h(() => { - n !== (n = t()) && (s && (S(s), (s = null)), (s = T(() => n(a, ...r)))); - }, x), - p && (a = y); -} -function $(e) { - return (t, ...r) => { - var c; - var a = e(...r), - n; - if (p) (n = y), v(); - else { - var s = a.render().trim(), - f = m(s); - (n = k(f)), t.before(n); - } - const l = (c = a.setup) == null ? void 0 : c.call(a, n); - w(n, n), typeof l == "function" && E(l); - }; -} -function B() { - var e; - return _ === null && D(), ((e = _).ac ?? (e.ac = new AbortController())).signal; -} -function g(e) { - o === null && i(), - R && o.l !== null - ? d(o).m.push(e) - : A(() => { - const t = u(e); - if (typeof t == "function") return t; - }); -} -function G(e) { - o === null && i(), g(() => () => u(e)); -} -function H(e, t, { bubbles: r = !1, cancelable: a = !1 } = {}) { - return new CustomEvent(e, { detail: t, bubbles: r, cancelable: a }); -} -function J() { - const e = o; - return ( - e === null && i(), - (t, r, a) => { - var s; - const n = (s = e.s.$$events) == null ? void 0 : s[t]; - if (n) { - const f = I(n) ? n.slice() : [n], - l = H(t, r, a); - for (const c of f) c.call(e.x, l); - return !l.defaultPrevented; - } - return !0; - } - ); -} -function Y(e) { - o === null && i(), o.l === null && b(), d(o).b.push(e); -} -function q(e) { - o === null && i(), o.l === null && b(), d(o).a.push(e); -} -function d(e) { - var t = e.l; - return t.u ?? (t.u = { a: [], b: [], m: [] }); -} -const X = Object.freeze( - Object.defineProperty( - { - __proto__: null, - afterUpdate: q, - beforeUpdate: Y, - createEventDispatcher: J, - createRawSnippet: $, - flushSync: P, - getAbortSignal: B, - getAllContexts: z, - getContext: F, - hasContext: N, - hydrate: M, - mount: O, - onDestroy: G, - onMount: g, - setContext: j, - settled: K, - tick: L, - unmount: U, - untrack: u, - }, - Symbol.toStringTag, - { value: "Module" } - ) - ), - Z = "1759175263375"; -export { X as a, g as o, W as s, Z as v }; diff --git a/frontend-backup/_app/immutable/chunks/4k6DpCgf.js b/frontend-backup/_app/immutable/chunks/4k6DpCgf.js deleted file mode 100644 index 7fcd3db..0000000 --- a/frontend-backup/_app/immutable/chunks/4k6DpCgf.js +++ /dev/null @@ -1,128 +0,0 @@ -import { - aj as v, - P as A, - W as T, - ak as L, - a9 as k, - ag as b, - V as h, - O as D, - e as M, - o as u, - X as S, - af as Y, - al as j, - ab as C, - a2 as H, - am as V, - an as R, - ao as W, - ap as y, - aq as P, - j as $, - k as q, - h as w, - p as F, - w as X, - ah as z, - ad as B, - c as G, -} from "./BDALf20I.js"; -import { r as J } from "./BUhRjcOt.js"; -(function () { - try { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - e.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - a = new e.Error().stack; - a && ((e._sentryDebugIds = e._sentryDebugIds || {}), (e._sentryDebugIds[a] = "9557bbbe-29d3-45f6-8a81-e8d8cda40d22"), (e._sentryDebugIdIdentifier = "sentry-dbid-9557bbbe-29d3-45f6-8a81-e8d8cda40d22")); - })(); -} catch {} -let I = !0; -function Z(e, a) { - var t = a == null ? "" : typeof a == "object" ? a + "" : a; - t !== (e.__t ?? (e.__t = e.nodeValue)) && ((e.__t = t), (e.nodeValue = t + "")); -} -function K(e, a) { - return N(e, a); -} -function x(e, a) { - v(), (a.intro = a.intro ?? !1); - const t = a.target, - _ = w, - c = u; - try { - for (var s = A(t); s && (s.nodeType !== T || s.data !== L); ) s = k(s); - if (!s) throw b; - h(!0), D(s), M(); - const d = N(e, { ...a, anchor: s }); - if (u === null || u.nodeType !== T || u.data !== S) throw (Y(), b); - return h(!1), d; - } catch (d) { - if ( - d instanceof Error && - d.message - .split( - ` -` - ) - .some((f) => f.startsWith("https://svelte.dev/e/")) - ) - throw d; - return d !== b && console.warn("Failed to hydrate: ", d), a.recover === !1 && j(), v(), C(t), h(!1), K(e, a); - } finally { - h(_), D(c), J(); - } -} -const i = new Map(); -function N(e, { target: a, anchor: t, props: _ = {}, events: c, context: s, intro: d = !0 }) { - v(); - var f = new Set(), - g = (o) => { - for (var n = 0; n < o.length; n++) { - var r = o[n]; - if (!f.has(r)) { - f.add(r); - var l = P(r); - a.addEventListener(r, y, { passive: l }); - var E = i.get(r); - E === void 0 ? (document.addEventListener(r, y, { passive: l }), i.set(r, 1)) : i.set(r, E + 1); - } - } - }; - g(H(V)), R.add(g); - var p = void 0, - O = W(() => { - var o = t ?? a.appendChild($()); - return ( - q(() => { - if (s) { - F({}); - var n = X; - n.c = s; - } - c && (_.$$events = c), w && z(o, null), (I = d), (p = e(o, _) || {}), (I = !0), w && (B.nodes_end = u), s && G(); - }), - () => { - var l; - for (var n of f) { - a.removeEventListener(n, y); - var r = i.get(n); - --r === 0 ? (document.removeEventListener(n, y), i.delete(n)) : i.set(n, r); - } - R.delete(g), o !== t && ((l = o.parentNode) == null || l.removeChild(o)); - } - ); - }); - return m.set(p, O), p; -} -let m = new WeakMap(); -function ee(e, a) { - const t = m.get(e); - return t ? (m.delete(e), t(a)) : Promise.resolve(); -} -export { I as a, x as h, K as m, Z as s, ee as u }; diff --git a/frontend-backup/_app/immutable/chunks/5NasrULQ.js b/frontend-backup/_app/immutable/chunks/5NasrULQ.js deleted file mode 100644 index ef297fd..0000000 --- a/frontend-backup/_app/immutable/chunks/5NasrULQ.js +++ /dev/null @@ -1,211 +0,0 @@ -import { - g as L, - h as y, - e as N, - E as C, - L as K, - M, - N as Y, - I as j, - O as T, - i as B, - j as w, - k as F, - aC as U, - l as Z, - Z as q, - n as G, - m as H, - aD as A, - aE as $, - aF as z, - A as O, - C as J, - K as Q, - aG as V, - aH as W, - aI as X, - a6 as k, - aJ as ee, - aK as re, - x as ne, - au as te, - aL as ae, - aM as se, - aN as ie, - S as x, - aO as D, - aP as P, -} from "./DUoKDNpf.js"; -function ce(e, r, t = !1) { - y && N(); - var n = e, - a = null, - f = null, - l = U, - d = t ? C : 0, - p = !1; - const S = (o, i = !0) => { - (p = !0), _(i, o); - }; - var u = null; - function m() { - u !== null && (u.lastChild.remove(), n.before(u), (u = null)); - var o = l ? a : f, - i = l ? f : a; - o && q(o), - i && - G(i, () => { - l ? (f = null) : (a = null); - }); - } - const _ = (o, i) => { - if (l === (l = o)) return; - let I = !1; - if (y) { - const h = K(n) === M; - !!l === h && ((n = Y()), j(n), T(!1), (I = !0)); - } - var v = Z(), - c = n; - if ((v && ((u = document.createDocumentFragment()), u.append((c = B()))), l ? a ?? (a = i && w(() => i(c))) : f ?? (f = i && w(() => i(c))), v)) { - var g = F, - b = l ? a : f, - s = l ? f : a; - b && g.skipped_effects.delete(b), s && g.skipped_effects.add(s), g.add_callback(m); - } else m(); - I && T(!0); - }; - L(() => { - (p = !1), r(S), p || _(null, null); - }, d), - y && (n = H); -} -let E = !1; -function fe(e) { - var r = E; - try { - return (E = !1), [e(), E]; - } finally { - E = r; - } -} -function de(e, r = 1) { - const t = e(); - return e(t + r), t; -} -const ue = { - get(e, r) { - if (!e.exclude.includes(r)) return e.props[r]; - }, - set(e, r) { - return !1; - }, - getOwnPropertyDescriptor(e, r) { - if (!e.exclude.includes(r) && r in e.props) return { enumerable: !0, configurable: !0, value: e.props[r] }; - }, - has(e, r) { - return e.exclude.includes(r) ? !1 : r in e.props; - }, - ownKeys(e) { - return Reflect.ownKeys(e.props).filter((r) => !e.exclude.includes(r)); - }, -}; -function _e(e, r, t) { - return new Proxy({ props: e, exclude: r }, ue); -} -const le = { - get(e, r) { - let t = e.props.length; - for (; t--; ) { - let n = e.props[t]; - if ((P(n) && (n = n()), typeof n == "object" && n !== null && r in n)) return n[r]; - } - }, - set(e, r, t) { - let n = e.props.length; - for (; n--; ) { - let a = e.props[n]; - P(a) && (a = a()); - const f = A(a, r); - if (f && f.set) return f.set(t), !0; - } - return !1; - }, - getOwnPropertyDescriptor(e, r) { - let t = e.props.length; - for (; t--; ) { - let n = e.props[t]; - if ((P(n) && (n = n()), typeof n == "object" && n !== null && r in n)) { - const a = A(n, r); - return a && !a.configurable && (a.configurable = !0), a; - } - } - }, - has(e, r) { - if (r === x || r === D) return !1; - for (let t of e.props) if ((P(t) && (t = t()), t != null && r in t)) return !0; - return !1; - }, - ownKeys(e) { - const r = []; - for (let t of e.props) - if ((P(t) && (t = t()), !!t)) { - for (const n in t) r.includes(n) || r.push(n); - for (const n of Object.getOwnPropertySymbols(t)) r.includes(n) || r.push(n); - } - return r; - }, -}; -function pe(...e) { - return new Proxy({ props: e }, le); -} -function ve(e, r, t, n) { - var b; - var a = !te || (t & ae) !== 0, - f = (t & re) !== 0, - l = (t & ie) !== 0, - d = n, - p = !0, - S = () => (p && ((p = !1), (d = l ? ne(n) : n)), d), - u; - if (f) { - var m = x in e || D in e; - u = ((b = A(e, r)) == null ? void 0 : b.set) ?? (m && r in e ? (s) => (e[r] = s) : void 0); - } - var _, - o = !1; - f ? ([_, o] = fe(() => e[r])) : (_ = e[r]), _ === void 0 && n !== void 0 && ((_ = S()), u && (a && $(), u(_))); - var i; - if ( - (a - ? (i = () => { - var s = e[r]; - return s === void 0 ? S() : ((p = !0), s); - }) - : (i = () => { - var s = e[r]; - return s !== void 0 && (d = void 0), s === void 0 ? d : s; - }), - a && (t & z) === 0) - ) - return i; - if (u) { - var I = e.$$legacy; - return function (s, h) { - return arguments.length > 0 ? ((!a || !h || I || o) && u(h ? i() : s), s) : i(); - }; - } - var v = !1, - c = ((t & se) !== 0 ? J : Q)(() => ((v = !1), i())); - f && O(c); - var g = k; - return function (s, h) { - if (arguments.length > 0) { - const R = h ? O(c) : a && f ? V(s) : s; - return W(c, R), (v = !0), d !== void 0 && (d = R), s; - } - return (X && v) || (g.f & ee) !== 0 ? c.v : O(c); - }; -} -export { ce as i, ve as p, _e as r, pe as s, de as u }; diff --git a/frontend-backup/_app/immutable/chunks/5mOJ66sL.js b/frontend-backup/_app/immutable/chunks/5mOJ66sL.js deleted file mode 100644 index d23d011..0000000 --- a/frontend-backup/_app/immutable/chunks/5mOJ66sL.js +++ /dev/null @@ -1,85 +0,0 @@ -import { g as o } from "./DklPLC_x.js"; -import "./B2cHk4HI.js"; -import { v as i, b as a } from "./BDALf20I.js"; -import { b as p } from "./BNZUboE0.js"; -import { r as u } from "./Bke_korE.js"; -(function () { - try { - var t = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - t.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var t = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - e = new t.Error().stack; - e && ((t._sentryDebugIds = t._sentryDebugIds || {}), (t._sentryDebugIds[e] = "6745f234-f59d-4730-a832-4873b80dedc4"), (t._sentryDebugIdIdentifier = "sentry-dbid-6745f234-f59d-4730-a832-4873b80dedc4")); - })(); -} catch {} -const _ = () => "Reported users", - d = () => "Usuários denunciados", - O = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? _() : d()), - f = () => "No pending reports", - y = () => "Sem denúncias pendentes", - Q = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? f() : y()), - m = () => "Ticket", - g = () => "Ticket", - W = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? m() : g()), - x = () => "Times reported", - b = () => "Denúncias", - X = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? x() : b()), - C = () => "Timeout count", - h = () => "Contagem de timeouts", - ee = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? C() : h()), - I = () => "Last timeout reason", - v = () => "Motivo do último timeout", - te = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? I() : v()), - w = () => "Reported by", - D = () => "Denunciado por", - ne = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? w() : D()), - F = () => "Reason", - T = () => "Motivo", - oe = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? F() : T()), - k = () => "Time", - $ = () => "Hora", - re = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? k() : $()), - M = () => "Reported pixel", - R = () => "Pixel reportado", - se = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? M() : R()), - E = () => "Aggressor's Last pixel painted", - L = () => "Último pixel pintado pelo agressor", - ce = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? E() : L()), - j = () => "Accounts with same IP", - A = () => "Contas com mesmo IP", - le = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? j() : A()), - P = () => "Report", - S = () => "Denúncia", - ie = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? P() : S()), - Z = () => "User ID copied", - N = () => "ID do usuário copiado", - ae = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? Z() : N()), - U = (t) => `Copy user ID: #${t.userId}`, - z = (t) => `Copiar ID do usuário: #${t.userId}`, - pe = (t, e = {}) => ((e.locale ?? o()) === "en" ? U(t) : z(t)), - B = () => "Alliance ID copied", - H = () => "ID da aliança copiado", - ue = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? B() : H()); -var V = i( - '' -); -function _e(t, e) { - let n = u(e, ["$$slots", "$$events", "$$legacy"]); - var r = V(); - p(r, () => ({ display: "block", viewBox: "0 0 27 41", ...n })), a(t, r); -} -function de(t, e) { - let n = t[0], - r = e(n); - for (let s = 1; s < t.length; s++) { - const c = t[s], - l = e(c); - l > r && ((n = c), (r = l)); - } - return n; -} -export { _e as M, ie as a, ne as b, oe as c, se as d, W as e, pe as f, X as g, le as h, ee as i, te as j, ue as k, ce as l, de as m, Q as n, O as r, re as t, ae as u }; diff --git a/frontend-backup/_app/immutable/chunks/6TAPgKgc.js b/frontend-backup/_app/immutable/chunks/6TAPgKgc.js deleted file mode 100644 index b7c4c68..0000000 --- a/frontend-backup/_app/immutable/chunks/6TAPgKgc.js +++ /dev/null @@ -1 +0,0 @@ -import{g as o}from"./DklPLC_x.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a22836e1-99fe-4372-8041-51d766e562e7",e._sentryDebugIdIdentifier="sentry-dbid-a22836e1-99fe-4372-8041-51d766e562e7")})()}catch{}const t=()=>"Search",a=()=>"Buscar",c=(e={},n={})=>(n.locale??o())==="en"?t():a(),l=()=>"Load more",s=()=>"Carregar mais",f=(e={},n={})=>(n.locale??o())==="en"?l():s();export{f as l,c as s}; diff --git a/frontend-backup/_app/immutable/chunks/B1GmkH4o.js b/frontend-backup/_app/immutable/chunks/B1GmkH4o.js deleted file mode 100644 index 0f8443f..0000000 --- a/frontend-backup/_app/immutable/chunks/B1GmkH4o.js +++ /dev/null @@ -1,334 +0,0 @@ -import { - g as D, - a0 as M, - j as H, - D as B, - h as N, - Y as F, - aV as W, - aW as X, - ao as J, - aX as Q, - aY as m, - aZ as x, - a_ as rr, - A as ir, - a$ as fr, - b0 as ar, - O as R, - b1 as tr, - b2 as sr, - an as ur, - b3 as er, - b4 as or, - aC as lr, - b5 as cr, - b6 as nr, - b7 as vr, -} from "./DUoKDNpf.js"; -function dr(r, f) { - var i = void 0, - a; - D(() => { - i !== (i = f()) && - (a && (M(a), (a = null)), - i && - (a = H(() => { - B(() => i(r)); - }))); - }); -} -function G(r) { - var f, - i, - a = ""; - if (typeof r == "string" || typeof r == "number") a += r; - else if (typeof r == "object") - if (Array.isArray(r)) { - var t = r.length; - for (f = 0; f < t; f++) r[f] && (i = G(r[f])) && (a && (a += " "), (a += i)); - } else for (i in r) r[i] && (a && (a += " "), (a += i)); - return a; -} -function br() { - for (var r, f, i = 0, a = "", t = arguments.length; i < t; i++) (r = arguments[i]) && (f = G(r)) && (a && (a += " "), (a += f)); - return a; -} -function gr(r) { - return typeof r == "object" ? br(r) : r ?? ""; -} -const Y = [ - ...` -\r\f \v\uFEFF`, -]; -function hr(r, f, i) { - var a = r == null ? "" : "" + r; - if ((f && (a = a ? a + " " + f : f), i)) { - for (var t in i) - if (i[t]) a = a ? a + " " + t : t; - else if (a.length) - for (var s = t.length, e = 0; (e = a.indexOf(t, e)) >= 0; ) { - var o = e + s; - (e === 0 || Y.includes(a[e - 1])) && (o === a.length || Y.includes(a[o])) ? (a = (e === 0 ? "" : a.substring(0, e)) + a.substring(o + 1)) : (e = o); - } - } - return a === "" ? null : a; -} -function k(r, f = !1) { - var i = f ? " !important;" : ";", - a = ""; - for (var t in r) { - var s = r[t]; - s != null && s !== "" && (a += " " + t + ": " + s + i); - } - return a; -} -function C(r) { - return r[0] !== "-" || r[1] !== "-" ? r.toLowerCase() : r; -} -function Ar(r, f) { - if (f) { - var i = "", - a, - t; - if ((Array.isArray(f) ? ((a = f[0]), (t = f[1])) : (a = f), r)) { - r = String(r) - .replaceAll(/\s*\/\*.*?\*\/\s*/g, "") - .trim(); - var s = !1, - e = 0, - o = !1, - v = []; - a && v.push(...Object.keys(a).map(C)), t && v.push(...Object.keys(t).map(C)); - var l = 0, - _ = -1; - const b = r.length; - for (var d = 0; d < b; d++) { - var n = r[d]; - if ((o ? n === "/" && r[d - 1] === "*" && (o = !1) : s ? s === n && (s = !1) : n === "/" && r[d + 1] === "*" ? (o = !0) : n === '"' || n === "'" ? (s = n) : n === "(" ? e++ : n === ")" && e--, !o && s === !1 && e === 0)) { - if (n === ":" && _ === -1) _ = d; - else if (n === ";" || d === b - 1) { - if (_ !== -1) { - var O = C(r.substring(l, _).trim()); - if (!v.includes(O)) { - n !== ";" && d++; - var S = r.substring(l, d).trim(); - i += " " + S + ";"; - } - } - (l = d + 1), (_ = -1); - } - } - } - } - return a && (i += k(a)), t && (i += k(t, !0)), (i = i.trim()), i === "" ? null : i; - } - return r == null ? null : String(r); -} -function _r(r, f, i, a, t, s) { - var e = r.__className; - if (N || e !== i || e === void 0) { - var o = hr(i, a, s); - (!N || o !== r.getAttribute("class")) && (o == null ? r.removeAttribute("class") : f ? (r.className = o) : r.setAttribute("class", o)), (r.__className = i); - } else if (s && t !== s) - for (var v in s) { - var l = !!s[v]; - (t == null || l !== !!t[v]) && r.classList.toggle(v, l); - } - return s; -} -function w(r, f = {}, i, a) { - for (var t in i) { - var s = i[t]; - f[t] !== s && (i[t] == null ? r.style.removeProperty(t) : r.style.setProperty(t, s, a)); - } -} -function Sr(r, f, i, a) { - var t = r.__style; - if (N || t !== f) { - var s = Ar(f, a); - (!N || s !== r.getAttribute("style")) && (s == null ? r.removeAttribute("style") : (r.style.cssText = s)), (r.__style = f); - } else a && (Array.isArray(a) ? (w(r, i == null ? void 0 : i[0], a[0]), w(r, i == null ? void 0 : i[1], a[1], "important")) : w(r, i, a)); - return a; -} -function $(r, f, i = !1) { - if (r.multiple) { - if (f == null) return; - if (!F(f)) return W(); - for (var a of r.options) a.selected = f.includes(U(a)); - return; - } - for (a of r.options) { - var t = U(a); - if (X(t, f)) { - a.selected = !0; - return; - } - } - (!i || f !== void 0) && (r.selectedIndex = -1); -} -function Nr(r) { - var f = new MutationObserver(() => { - $(r, r.__value); - }); - f.observe(r, { childList: !0, subtree: !0, attributes: !0, attributeFilter: ["value"] }), - J(() => { - f.disconnect(); - }); -} -function U(r) { - return "__value" in r ? r.__value : r.value; -} -const L = Symbol("class"), - T = Symbol("style"), - K = Symbol("is custom element"), - Z = Symbol("is html"); -function Tr(r) { - if (N) { - var f = !1, - i = () => { - if (!f) { - if (((f = !0), r.hasAttribute("value"))) { - var a = r.value; - p(r, "value", null), (r.value = a); - } - if (r.hasAttribute("checked")) { - var t = r.checked; - p(r, "checked", null), (r.checked = t); - } - } - }; - (r.__on_r = i), nr(i), vr(); - } -} -function pr(r, f) { - var i = j(r); - i.value === (i.value = f ?? void 0) || (r.value === f && (f !== 0 || r.nodeName !== "PROGRESS")) || (r.value = f ?? ""); -} -function Or(r, f) { - f ? r.hasAttribute("selected") || r.setAttribute("selected", "") : r.removeAttribute("selected"); -} -function p(r, f, i, a) { - var t = j(r); - (N && ((t[f] = r.getAttribute(f)), f === "src" || f === "srcset" || (f === "href" && r.nodeName === "LINK"))) || - (t[f] !== (t[f] = i) && (f === "loading" && (r[rr] = i), i == null ? r.removeAttribute(f) : typeof i != "string" && q(r).includes(f) ? (r[f] = i) : r.setAttribute(f, i))); -} -function Er(r, f, i, a, t = !1) { - var s = j(r), - e = s[K], - o = !s[Z]; - let v = N && e; - v && R(!1); - var l = f || {}, - _ = r.tagName === "OPTION"; - for (var d in f) d in i || (i[d] = null); - i.class ? (i.class = gr(i.class)) : (a || i[L]) && (i.class = null), i[T] && (i.style ?? (i.style = null)); - var n = q(r); - for (const u in i) { - let c = i[u]; - if (_ && u === "value" && c == null) { - (r.value = r.__value = ""), (l[u] = c); - continue; - } - if (u === "class") { - var O = r.namespaceURI === "http://www.w3.org/1999/xhtml"; - _r(r, O, c, a, f == null ? void 0 : f[L], i[L]), (l[u] = c), (l[L] = i[L]); - continue; - } - if (u === "style") { - Sr(r, c, f == null ? void 0 : f[T], i[T]), (l[u] = c), (l[T] = i[T]); - continue; - } - var S = l[u]; - if (!(c === S && !(c === void 0 && r.hasAttribute(u)))) { - l[u] = c; - var b = u[0] + u[1]; - if (b !== "$$") - if (b === "on") { - const A = {}, - E = "$$" + u; - let g = u.slice(2); - var I = cr(g); - if ((tr(g) && ((g = g.slice(0, -7)), (A.capture = !0)), !I && S)) { - if (c != null) continue; - r.removeEventListener(g, l[E], A), (l[E] = null); - } - if (c != null) - if (I) (r[`__${g}`] = c), ur([g]); - else { - let y = function (z) { - l[u].call(this, z); - }; - l[E] = sr(g, r, y, A); - } - else I && (r[`__${g}`] = void 0); - } else if (u === "style") p(r, u, c); - else if (u === "autofocus") er(r, !!c); - else if (!e && (u === "__value" || (u === "value" && c != null))) r.value = r.__value = c; - else if (u === "selected" && _) Or(r, c); - else { - var h = u; - o || (h = or(h)); - var P = h === "defaultValue" || h === "defaultChecked"; - if (c == null && !e && !P) - if (((s[u] = null), h === "value" || h === "checked")) { - let A = r; - const E = f === void 0; - if (h === "value") { - let g = A.defaultValue; - A.removeAttribute(h), (A.defaultValue = g), (A.value = A.__value = E ? g : null); - } else { - let g = A.defaultChecked; - A.removeAttribute(h), (A.defaultChecked = g), (A.checked = E ? g : !1); - } - } else r.removeAttribute(u); - else P || (n.includes(h) && (e || typeof c != "string")) ? ((r[h] = c), h in s && (s[h] = lr)) : typeof c != "function" && p(r, h, c); - } - } - } - return v && R(!0), l; -} -function Ir(r, f, i = [], a = [], t, s = !1) { - Q(i, a, (e) => { - var o = void 0, - v = {}, - l = r.nodeName === "SELECT", - _ = !1; - if ( - (D(() => { - var n = f(...e.map(ir)), - O = Er(r, o, n, t, s); - _ && l && "value" in n && $(r, n.value); - for (let b of Object.getOwnPropertySymbols(v)) n[b] || M(v[b]); - for (let b of Object.getOwnPropertySymbols(n)) { - var S = n[b]; - b.description === fr && (!o || S !== o[b]) && (v[b] && M(v[b]), (v[b] = H(() => dr(r, () => S)))), (O[b] = S); - } - o = O; - }), - l) - ) { - var d = r; - B(() => { - $(d, o.value, !0), Nr(d); - }); - } - _ = !0; - }); -} -function j(r) { - return r.__attributes ?? (r.__attributes = { [K]: r.nodeName.includes("-"), [Z]: r.namespaceURI === m }); -} -var V = new Map(); -function q(r) { - var f = V.get(r.nodeName); - if (f) return f; - V.set(r.nodeName, (f = [])); - for (var i, a = r, t = Element.prototype; t !== a; ) { - i = ar(a); - for (var s in i) i[s].set && f.push(s); - a = x(a); - } - return f; -} -export { L as C, T as S, Ir as a, p as b, gr as c, Sr as d, dr as e, pr as f, br as g, Tr as r, _r as s }; diff --git a/frontend-backup/_app/immutable/chunks/B2cHk4HI.js b/frontend-backup/_app/immutable/chunks/B2cHk4HI.js deleted file mode 100644 index 333cff1..0000000 --- a/frontend-backup/_app/immutable/chunks/B2cHk4HI.js +++ /dev/null @@ -1,16 +0,0 @@ -(function () { - try { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - e.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - d = new e.Error().stack; - d && ((e._sentryDebugIds = e._sentryDebugIds || {}), (e._sentryDebugIds[d] = "de59cd8a-506f-43e6-a3d3-bc92e3ebaf74"), (e._sentryDebugIdIdentifier = "sentry-dbid-de59cd8a-506f-43e6-a3d3-bc92e3ebaf74")); - })(); -} catch {} -const f = "5"; -var n; -typeof window < "u" && ((n = window.__svelte ?? (window.__svelte = {})).v ?? (n.v = new Set())).add(f); diff --git a/frontend-backup/_app/immutable/chunks/B4HM4TqG.js b/frontend-backup/_app/immutable/chunks/B4HM4TqG.js deleted file mode 100644 index 4af25a6..0000000 --- a/frontend-backup/_app/immutable/chunks/B4HM4TqG.js +++ /dev/null @@ -1,1539 +0,0 @@ -var ee = (t) => { - throw TypeError(t); -}; -var Be = (t, e, n) => e.has(t) || ee("Cannot " + n); -var b = (t, e, n) => (Be(t, e, "read from private field"), n ? n.call(t) : e.get(t)), - P = (t, e, n) => (e.has(t) ? ee("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n)); -import { v as Ve, o as ne, a as Me } from "./4WsUhDWi.js"; -import { az as Tt, aZ as Ge, au as C, g as N, aw as O, aL as re } from "./BDALf20I.js"; -(function () { - try { - var t = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - t.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var t = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - e = new t.Error().stack; - e && ((t._sentryDebugIds = t._sentryDebugIds || {}), (t._sentryDebugIds[e] = "d63279e9-2fab-4f68-a61f-2ff92c94d1bc"), (t._sentryDebugIdIdentifier = "sentry-dbid-d63279e9-2fab-4f68-a61f-2ff92c94d1bc")); - })(); -} catch {} -const V = []; -function Dt(t, e = Tt) { - let n = null; - const a = new Set(); - function r(o) { - if (Ge(t, o) && ((t = o), n)) { - const c = !V.length; - for (const l of a) l[1](), V.push(l, t); - if (c) { - for (let l = 0; l < V.length; l += 2) V[l][0](V[l + 1]); - V.length = 0; - } - } - } - function s(o) { - r(o(t)); - } - function i(o, c = Tt) { - const l = [o, c]; - return ( - a.add(l), - a.size === 1 && (n = e(r, s) || Tt), - o(t), - () => { - a.delete(l), a.size === 0 && n && (n(), (n = null)); - } - ); - } - return { set: r, update: s, subscribe: i }; -} -class Et { - constructor(e, n) { - (this.status = e), typeof n == "string" ? (this.body = { message: n }) : n ? (this.body = n) : (this.body = { message: `Error: ${e}` }); - } - toString() { - return JSON.stringify(this.body); - } -} -class qt { - constructor(e, n) { - (this.status = e), (this.location = n); - } -} -class Ft extends Error { - constructor(e, n, a) { - super(a), (this.status = e), (this.text = n); - } -} -new URL("sveltekit-internal://"); -function He(t, e) { - return t === "/" || e === "ignore" ? t : e === "never" ? (t.endsWith("/") ? t.slice(0, -1) : t) : e === "always" && !t.endsWith("/") ? t + "/" : t; -} -function Ke(t) { - return t.split("%25").map(decodeURI).join("%25"); -} -function Ye(t) { - for (const e in t) t[e] = decodeURIComponent(t[e]); - return t; -} -function Ut({ href: t }) { - return t.split("#")[0]; -} -function ze(t, e, n, a = !1) { - const r = new URL(t); - Object.defineProperty(r, "searchParams", { - value: new Proxy(r.searchParams, { - get(i, o) { - if (o === "get" || o === "getAll" || o === "has") return (l) => (n(l), i[o](l)); - e(); - const c = Reflect.get(i, o); - return typeof c == "function" ? c.bind(i) : c; - }, - }), - enumerable: !0, - configurable: !0, - }); - const s = ["href", "pathname", "search", "toString", "toJSON"]; - a && s.push("hash"); - for (const i of s) - Object.defineProperty(r, i, { - get() { - return e(), t[i]; - }, - enumerable: !0, - configurable: !0, - }); - return r; -} -function We(...t) { - let e = 5381; - for (const n of t) - if (typeof n == "string") { - let a = n.length; - for (; a; ) e = (e * 33) ^ n.charCodeAt(--a); - } else if (ArrayBuffer.isView(n)) { - const a = new Uint8Array(n.buffer, n.byteOffset, n.byteLength); - let r = a.length; - for (; r; ) e = (e * 33) ^ a[--r]; - } else throw new TypeError("value must be a string or TypedArray"); - return (e >>> 0).toString(36); -} -new TextEncoder(); -const Je = new TextDecoder(); -function Xe(t) { - const e = atob(t), - n = new Uint8Array(e.length); - for (let a = 0; a < e.length; a++) n[a] = e.charCodeAt(a); - return n; -} -const Ze = window.fetch; -window.fetch = (t, e) => ((t instanceof Request ? t.method : (e == null ? void 0 : e.method) || "GET") !== "GET" && z.delete(Bt(t)), Ze(t, e)); -const z = new Map(); -function Qe(t, e) { - const n = Bt(t, e), - a = document.querySelector(n); - if (a != null && a.textContent) { - a.remove(); - let { body: r, ...s } = JSON.parse(a.textContent); - const i = a.getAttribute("data-ttl"); - return i && z.set(n, { body: r, init: s, ttl: 1e3 * Number(i) }), a.getAttribute("data-b64") !== null && (r = Xe(r)), Promise.resolve(new Response(r, s)); - } - return window.fetch(t, e); -} -function tn(t, e, n) { - if (z.size > 0) { - const a = Bt(t, n), - r = z.get(a); - if (r) { - if (performance.now() < r.ttl && ["default", "force-cache", "only-if-cached", void 0].includes(n == null ? void 0 : n.cache)) return new Response(r.body, r.init); - z.delete(a); - } - } - return window.fetch(e, n); -} -function Bt(t, e) { - let a = `script[data-sveltekit-fetched][data-url=${JSON.stringify(t instanceof Request ? t.url : t)}]`; - if ((e != null && e.headers) || (e != null && e.body)) { - const r = []; - e.headers && r.push([...new Headers(e.headers)].join(",")), e.body && (typeof e.body == "string" || ArrayBuffer.isView(e.body)) && r.push(e.body), (a += `[data-hash="${We(...r)}"]`); - } - return a; -} -const en = /^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/; -function nn(t) { - const e = []; - return { - pattern: - t === "/" - ? /^\/$/ - : new RegExp( - `^${an(t) - .map((a) => { - const r = /^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(a); - if (r) return e.push({ name: r[1], matcher: r[2], optional: !1, rest: !0, chained: !0 }), "(?:/([^]*))?"; - const s = /^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(a); - if (s) return e.push({ name: s[1], matcher: s[2], optional: !0, rest: !1, chained: !0 }), "(?:/([^/]+))?"; - if (!a) return; - const i = a.split(/\[(.+?)\](?!\])/); - return ( - "/" + - i - .map((c, l) => { - if (l % 2) { - if (c.startsWith("x+")) return xt(String.fromCharCode(parseInt(c.slice(2), 16))); - if (c.startsWith("u+")) - return xt( - String.fromCharCode( - ...c - .slice(2) - .split("-") - .map((u) => parseInt(u, 16)) - ) - ); - const d = en.exec(c), - [, p, y, f, m] = d; - return e.push({ name: f, matcher: m, optional: !!p, rest: !!y, chained: y ? l === 1 && i[0] === "" : !1 }), y ? "([^]*?)" : p ? "([^/]*)?" : "([^/]+?)"; - } - return xt(c); - }) - .join("") - ); - }) - .join("")}/?$` - ), - params: e, - }; -} -function rn(t) { - return t !== "" && !/^\([^)]+\)$/.test(t); -} -function an(t) { - return t.slice(1).split("/").filter(rn); -} -function on(t, e, n) { - const a = {}, - r = t.slice(1), - s = r.filter((o) => o !== void 0); - let i = 0; - for (let o = 0; o < e.length; o += 1) { - const c = e[o]; - let l = r[o - i]; - if ( - (c.chained && - c.rest && - i && - ((l = r - .slice(o - i, o + 1) - .filter((d) => d) - .join("/")), - (i = 0)), - l === void 0) - ) { - c.rest && (a[c.name] = ""); - continue; - } - if (!c.matcher || n[c.matcher](l)) { - a[c.name] = l; - const d = e[o + 1], - p = r[o + 1]; - d && !d.rest && d.optional && p && c.chained && (i = 0), !d && !p && Object.keys(a).length === s.length && (i = 0); - continue; - } - if (c.optional && c.chained) { - i++; - continue; - } - return; - } - if (!i) return a; -} -function xt(t) { - return t - .normalize() - .replace(/[[\]]/g, "\\$&") - .replace(/%/g, "%25") - .replace(/\//g, "%2[Ff]") - .replace(/\?/g, "%3[Ff]") - .replace(/#/g, "%23") - .replace(/[.*+?^${}()|\\]/g, "\\$&"); -} -function sn({ nodes: t, server_loads: e, dictionary: n, matchers: a }) { - const r = new Set(e); - return Object.entries(n).map(([o, [c, l, d]]) => { - const { pattern: p, params: y } = nn(o), - f = { - id: o, - exec: (m) => { - const u = p.exec(m); - if (u) return on(u, y, a); - }, - errors: [1, ...(d || [])].map((m) => t[m]), - layouts: [0, ...(l || [])].map(i), - leaf: s(c), - }; - return (f.errors.length = f.layouts.length = Math.max(f.errors.length, f.layouts.length)), f; - }); - function s(o) { - const c = o < 0; - return c && (o = ~o), [c, t[o]]; - } - function i(o) { - return o === void 0 ? o : [r.has(o), t[o]]; - } -} -function ve(t, e = JSON.parse) { - try { - return e(sessionStorage[t]); - } catch {} -} -function ae(t, e, n = JSON.stringify) { - const a = n(e); - try { - sessionStorage[t] = a; - } catch {} -} -var ge; -const x = ((ge = globalThis.__sveltekit_1jtafcq) == null ? void 0 : ge.base) ?? ""; -var me; -const cn = ((me = globalThis.__sveltekit_1jtafcq) == null ? void 0 : me.assets) ?? x, - be = "sveltekit:snapshot", - Ee = "sveltekit:scroll", - Ae = "sveltekit:states", - ln = "sveltekit:pageurl", - G = "sveltekit:history", - Z = "sveltekit:navigation", - q = { tap: 1, hover: 2, viewport: 3, eager: 4, off: -1, false: -1 }, - dt = location.origin; -function Vt(t) { - if (t instanceof URL) return t; - let e = document.baseURI; - if (!e) { - const n = document.getElementsByTagName("base"); - e = n.length ? n[0].href : document.URL; - } - return new URL(t, e); -} -function At() { - return { x: pageXOffset, y: pageYOffset }; -} -function M(t, e) { - return t.getAttribute(`data-sveltekit-${e}`); -} -const oe = { ...q, "": q.hover }; -function ke(t) { - let e = t.assignedSlot ?? t.parentNode; - return (e == null ? void 0 : e.nodeType) === 11 && (e = e.host), e; -} -function Se(t, e) { - for (; t && t !== e; ) { - if (t.nodeName.toUpperCase() === "A" && t.hasAttribute("href")) return t; - t = ke(t); - } -} -function Nt(t, e, n) { - let a; - try { - if (((a = new URL(t instanceof SVGAElement ? t.href.baseVal : t.href, document.baseURI)), n && a.hash.match(/^#[^/]/))) { - const o = location.hash.split("#")[1] || "/"; - a.hash = `#${o}${a.hash}`; - } - } catch {} - const r = t instanceof SVGAElement ? t.target.baseVal : t.target, - s = !a || !!r || kt(a, e, n) || (t.getAttribute("rel") || "").split(/\s+/).includes("external"), - i = (a == null ? void 0 : a.origin) === dt && t.hasAttribute("download"); - return { url: a, external: s, target: r, download: i }; -} -function pt(t) { - let e = null, - n = null, - a = null, - r = null, - s = null, - i = null, - o = t; - for (; o && o !== document.documentElement; ) - a === null && (a = M(o, "preload-code")), - r === null && (r = M(o, "preload-data")), - e === null && (e = M(o, "keepfocus")), - n === null && (n = M(o, "noscroll")), - s === null && (s = M(o, "reload")), - i === null && (i = M(o, "replacestate")), - (o = ke(o)); - function c(l) { - switch (l) { - case "": - case "true": - return !0; - case "off": - case "false": - return !1; - default: - return; - } - } - return { preload_code: oe[a ?? "off"], preload_data: oe[r ?? "off"], keepfocus: c(e), noscroll: c(n), reload: c(s), replace_state: c(i) }; -} -function se(t) { - const e = Dt(t); - let n = !0; - function a() { - (n = !0), e.update((i) => i); - } - function r(i) { - (n = !1), e.set(i); - } - function s(i) { - let o; - return e.subscribe((c) => { - (o === void 0 || (n && c !== o)) && i((o = c)); - }); - } - return { notify: a, set: r, subscribe: s }; -} -const Re = { v: () => {} }; -function fn() { - const { set: t, subscribe: e } = Dt(!1); - let n; - async function a() { - clearTimeout(n); - try { - const r = await fetch(`${cn}/_app/version.json`, { headers: { pragma: "no-cache", "cache-control": "no-cache" } }); - if (!r.ok) return !1; - const i = (await r.json()).version !== Ve; - return i && (t(!0), Re.v(), clearTimeout(n)), i; - } catch { - return !1; - } - } - return { subscribe: e, check: a }; -} -function kt(t, e, n) { - return t.origin !== dt || !t.pathname.startsWith(e) ? !0 : n ? !(t.pathname === e + "/" || t.pathname === e + "/index.html" || (t.protocol === "file:" && t.pathname.replace(/\/[^/]+\.html?$/, "") === e)) : !1; -} -function Zn(t) {} -function ie(t) { - const e = dn(t), - n = new ArrayBuffer(e.length), - a = new DataView(n); - for (let r = 0; r < n.byteLength; r++) a.setUint8(r, e.charCodeAt(r)); - return n; -} -const un = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -function dn(t) { - t.length % 4 === 0 && (t = t.replace(/==?$/, "")); - let e = "", - n = 0, - a = 0; - for (let r = 0; r < t.length; r++) - (n <<= 6), (n |= un.indexOf(t[r])), (a += 6), a === 24 && ((e += String.fromCharCode((n & 16711680) >> 16)), (e += String.fromCharCode((n & 65280) >> 8)), (e += String.fromCharCode(n & 255)), (n = a = 0)); - return a === 12 ? ((n >>= 4), (e += String.fromCharCode(n))) : a === 18 && ((n >>= 2), (e += String.fromCharCode((n & 65280) >> 8)), (e += String.fromCharCode(n & 255))), e; -} -const hn = -1, - pn = -2, - gn = -3, - mn = -4, - yn = -5, - _n = -6; -function wn(t, e) { - if (typeof t == "number") return r(t, !0); - if (!Array.isArray(t) || t.length === 0) throw new Error("Invalid input"); - const n = t, - a = Array(n.length); - function r(s, i = !1) { - if (s === hn) return; - if (s === gn) return NaN; - if (s === mn) return 1 / 0; - if (s === yn) return -1 / 0; - if (s === _n) return -0; - if (i) throw new Error("Invalid input"); - if (s in a) return a[s]; - const o = n[s]; - if (!o || typeof o != "object") a[s] = o; - else if (Array.isArray(o)) - if (typeof o[0] == "string") { - const c = o[0], - l = e == null ? void 0 : e[c]; - if (l) return (a[s] = l(r(o[1]))); - switch (c) { - case "Date": - a[s] = new Date(o[1]); - break; - case "Set": - const d = new Set(); - a[s] = d; - for (let f = 1; f < o.length; f += 1) d.add(r(o[f])); - break; - case "Map": - const p = new Map(); - a[s] = p; - for (let f = 1; f < o.length; f += 2) p.set(r(o[f]), r(o[f + 1])); - break; - case "RegExp": - a[s] = new RegExp(o[1], o[2]); - break; - case "Object": - a[s] = Object(o[1]); - break; - case "BigInt": - a[s] = BigInt(o[1]); - break; - case "null": - const y = Object.create(null); - a[s] = y; - for (let f = 1; f < o.length; f += 2) y[o[f]] = r(o[f + 1]); - break; - case "Int8Array": - case "Uint8Array": - case "Uint8ClampedArray": - case "Int16Array": - case "Uint16Array": - case "Int32Array": - case "Uint32Array": - case "Float32Array": - case "Float64Array": - case "BigInt64Array": - case "BigUint64Array": { - const f = globalThis[c], - m = o[1], - u = ie(m), - h = new f(u); - a[s] = h; - break; - } - case "ArrayBuffer": { - const f = o[1], - m = ie(f); - a[s] = m; - break; - } - default: - throw new Error(`Unknown type ${c}`); - } - } else { - const c = new Array(o.length); - a[s] = c; - for (let l = 0; l < o.length; l += 1) { - const d = o[l]; - d !== pn && (c[l] = r(d)); - } - } - else { - const c = {}; - a[s] = c; - for (const l in o) { - const d = o[l]; - c[l] = r(d); - } - } - return a[s]; - } - return r(0); -} -const Ie = new Set(["load", "prerender", "csr", "ssr", "trailingSlash", "config"]); -[...Ie]; -const vn = new Set([...Ie]); -[...vn]; -function bn(t) { - return t.filter((e) => e != null); -} -const En = "x-sveltekit-invalidated", - An = "x-sveltekit-trailing-slash"; -function gt(t) { - return t instanceof Et || t instanceof Ft ? t.status : 500; -} -function kn(t) { - return t instanceof Ft ? t.text : "Internal Error"; -} -let L, Q, Pt; -const Sn = ne.toString().includes("$$") || /function \w+\(\) \{\}/.test(ne.toString()); -var nt, rt, at, ot, st, it, ct, lt, ye, ft, _e, ut, we; -Sn - ? ((L = { data: {}, form: null, error: null, params: {}, route: { id: null }, state: {}, status: -1, url: new URL("https://example.com") }), (Q = { current: null }), (Pt = { current: !1 })) - : ((L = new ((ye = class { - constructor() { - P(this, nt, C({})); - P(this, rt, C(null)); - P(this, at, C(null)); - P(this, ot, C({})); - P(this, st, C({ id: null })); - P(this, it, C({})); - P(this, ct, C(-1)); - P(this, lt, C(new URL("https://example.com"))); - } - get data() { - return N(b(this, nt)); - } - set data(e) { - O(b(this, nt), e); - } - get form() { - return N(b(this, rt)); - } - set form(e) { - O(b(this, rt), e); - } - get error() { - return N(b(this, at)); - } - set error(e) { - O(b(this, at), e); - } - get params() { - return N(b(this, ot)); - } - set params(e) { - O(b(this, ot), e); - } - get route() { - return N(b(this, st)); - } - set route(e) { - O(b(this, st), e); - } - get state() { - return N(b(this, it)); - } - set state(e) { - O(b(this, it), e); - } - get status() { - return N(b(this, ct)); - } - set status(e) { - O(b(this, ct), e); - } - get url() { - return N(b(this, lt)); - } - set url(e) { - O(b(this, lt), e); - } - }), - (nt = new WeakMap()), - (rt = new WeakMap()), - (at = new WeakMap()), - (ot = new WeakMap()), - (st = new WeakMap()), - (it = new WeakMap()), - (ct = new WeakMap()), - (lt = new WeakMap()), - ye)()), - (Q = new ((_e = class { - constructor() { - P(this, ft, C(null)); - } - get current() { - return N(b(this, ft)); - } - set current(e) { - O(b(this, ft), e); - } - }), - (ft = new WeakMap()), - _e)()), - (Pt = new ((we = class { - constructor() { - P(this, ut, C(!1)); - } - get current() { - return N(b(this, ut)); - } - set current(e) { - O(b(this, ut), e); - } - }), - (ut = new WeakMap()), - we)()), - (Re.v = () => (Pt.current = !0))); -function Rn(t) { - Object.assign(L, t); -} -const In = "/__data.json", - Ln = ".html__data.json"; -function Tn(t) { - return t.endsWith(".html") ? t.replace(/\.html$/, Ln) : t.replace(/\/$/, "") + In; -} -const ce = { - spanContext() { - return Un; - }, - setAttribute() { - return this; - }, - setAttributes() { - return this; - }, - addEvent() { - return this; - }, - setStatus() { - return this; - }, - updateName() { - return this; - }, - end() { - return this; - }, - isRecording() { - return !1; - }, - recordException() { - return this; - }, - addLink() { - return this; - }, - addLinks() { - return this; - }, - }, - Un = { traceId: "", spanId: "", traceFlags: 0 }, - { onMount: xn, tick: Pn } = Me, - Cn = new Set(["icon", "shortcut icon", "apple-touch-icon"]), - B = ve(Ee) ?? {}, - tt = ve(be) ?? {}, - $ = { url: se({}), page: se({}), navigating: Dt(null), updated: fn() }; -function Mt(t) { - B[t] = At(); -} -function Nn(t, e) { - let n = t + 1; - for (; B[n]; ) delete B[n], (n += 1); - for (n = e + 1; tt[n]; ) delete tt[n], (n += 1); -} -function K(t) { - return (location.href = t.href), new Promise(() => {}); -} -async function Le() { - if ("serviceWorker" in navigator) { - const t = await navigator.serviceWorker.getRegistration(x || "/"); - t && (await t.update()); - } -} -function le() {} -let Gt, Ot, mt, j, jt, E; -globalThis.__sveltekit_1jtafcq.data; -const yt = [], - _t = []; -let T = null; -const ht = new Map(), - Ht = new Set(), - On = new Set(), - W = new Set(); -let w = { branch: [], error: null, url: null }, - Kt = !1, - wt = !1, - fe = !0, - et = !1, - Y = !1, - Te = !1, - Yt = !1, - Ue, - S, - U, - F; -const J = new Set(), - ue = new Map(); -async function nr(t, e, n) { - var s, i, o, c; - document.URL !== location.href && (location.href = location.href), - (E = t), - await ((i = (s = t.hooks).init) == null ? void 0 : i.call(s)), - (Gt = sn(t)), - (j = document.documentElement), - (jt = e), - (Ot = t.nodes[0]), - (mt = t.nodes[1]), - Ot(), - mt(), - (S = (o = history.state) == null ? void 0 : o[G]), - (U = (c = history.state) == null ? void 0 : c[Z]), - S || ((S = U = Date.now()), history.replaceState({ ...history.state, [G]: S, [Z]: U }, "")); - const a = B[S]; - function r() { - a && ((history.scrollRestoration = "manual"), scrollTo(a.x, a.y)); - } - n ? (r(), await Kn(jt, n)) : (await X({ type: "enter", url: Vt(E.hash ? zn(new URL(location.href)) : location.href), replace_state: !0 }), r()), Hn(); -} -function jn() { - (yt.length = 0), (Yt = !1); -} -function xe(t) { - _t.some((e) => (e == null ? void 0 : e.snapshot)) && - (tt[t] = _t.map((e) => { - var n; - return (n = e == null ? void 0 : e.snapshot) == null ? void 0 : n.capture(); - })); -} -function Pe(t) { - var e; - (e = tt[t]) == null || - e.forEach((n, a) => { - var r, s; - (s = (r = _t[a]) == null ? void 0 : r.snapshot) == null || s.restore(n); - }); -} -function de() { - Mt(S), ae(Ee, B), xe(U), ae(be, tt); -} -async function zt(t, e, n, a) { - let r; - const s = await X({ - type: "goto", - url: Vt(t), - keepfocus: e.keepFocus, - noscroll: e.noScroll, - replace_state: e.replaceState, - state: e.state, - redirect_count: n, - nav_token: a, - accept: () => { - e.invalidateAll && ((Yt = !0), (r = [...ue.keys()])), e.invalidate && e.invalidate.forEach(Gn); - }, - }); - return ( - e.invalidateAll && - re() - .then(re) - .then(() => { - ue.forEach(({ resource: i }, o) => { - var c; - r != null && r.includes(o) && ((c = i.refresh) == null || c.call(i)); - }); - }), - s - ); -} -async function $n(t) { - if (t.id !== (T == null ? void 0 : T.id)) { - const e = {}; - J.add(e), (T = { id: t.id, token: e, promise: Oe({ ...t, preload: e }).then((n) => (J.delete(e), n.type === "loaded" && n.state.error && (T = null), n)) }); - } - return T.promise; -} -async function Ct(t) { - var n; - const e = (n = await Rt(t, !1)) == null ? void 0 : n.route; - e && (await Promise.all([...e.layouts, e.leaf].map((a) => (a == null ? void 0 : a[1]())))); -} -function Ce(t, e, n) { - var r; - w = t.state; - const a = document.querySelector("style[data-sveltekit]"); - if ((a && a.remove(), Object.assign(L, t.props.page), (Ue = new E.root({ target: e, props: { ...t.props, stores: $, components: _t }, hydrate: n, sync: !1 })), Pe(U), n)) { - const s = { from: null, to: { params: w.params, route: { id: ((r = w.route) == null ? void 0 : r.id) ?? null }, url: new URL(location.href) }, willUnload: !1, type: "enter", complete: Promise.resolve() }; - W.forEach((i) => i(s)); - } - wt = !0; -} -function vt({ url: t, params: e, branch: n, status: a, error: r, route: s, form: i }) { - let o = "never"; - if (x && (t.pathname === x || t.pathname === x + "/")) o = "always"; - else for (const f of n) (f == null ? void 0 : f.slash) !== void 0 && (o = f.slash); - (t.pathname = He(t.pathname, o)), (t.search = t.search); - const c = { type: "loaded", state: { url: t, params: e, branch: n, error: r, route: s }, props: { constructors: bn(n).map((f) => f.node.component), page: Zt(L) } }; - i !== void 0 && (c.props.form = i); - let l = {}, - d = !L, - p = 0; - for (let f = 0; f < Math.max(n.length, w.branch.length); f += 1) { - const m = n[f], - u = w.branch[f]; - (m == null ? void 0 : m.data) !== (u == null ? void 0 : u.data) && (d = !0), m && ((l = { ...l, ...m.data }), d && (c.props[`data_${p}`] = l), (p += 1)); - } - return ( - (!w.url || t.href !== w.url.href || w.error !== r || (i !== void 0 && i !== L.form) || d) && - (c.props.page = { error: r, params: e, route: { id: (s == null ? void 0 : s.id) ?? null }, state: {}, status: a, url: new URL(t), form: i ?? null, data: d ? l : L.data }), - c - ); -} -async function Wt({ loader: t, parent: e, url: n, params: a, route: r, server_data_node: s }) { - var d, p, y; - let i = null, - o = !0; - const c = { dependencies: new Set(), params: new Set(), parent: !1, route: !1, url: !1, search_params: new Set() }, - l = await t(); - if ((d = l.universal) != null && d.load) { - let f = function (...u) { - for (const h of u) { - const { href: A } = new URL(h, n); - c.dependencies.add(A); - } - }; - const m = { - tracing: { enabled: !1, root: ce, current: ce }, - route: new Proxy(r, { get: (u, h) => (o && (c.route = !0), u[h]) }), - params: new Proxy(a, { get: (u, h) => (o && c.params.add(h), u[h]) }), - data: (s == null ? void 0 : s.data) ?? null, - url: ze( - n, - () => { - o && (c.url = !0); - }, - (u) => { - o && c.search_params.add(u); - }, - E.hash - ), - async fetch(u, h) { - u instanceof Request && - (h = { - body: u.method === "GET" || u.method === "HEAD" ? void 0 : await u.blob(), - cache: u.cache, - credentials: u.credentials, - headers: [...u.headers].length > 0 ? (u == null ? void 0 : u.headers) : void 0, - integrity: u.integrity, - keepalive: u.keepalive, - method: u.method, - mode: u.mode, - redirect: u.redirect, - referrer: u.referrer, - referrerPolicy: u.referrerPolicy, - signal: u.signal, - ...h, - }); - const { resolved: A, promise: R } = Ne(u, h, n); - return o && f(A.href), R; - }, - setHeaders: () => {}, - depends: f, - parent() { - return o && (c.parent = !0), e(); - }, - untrack(u) { - o = !1; - try { - return u(); - } finally { - o = !0; - } - }, - }; - i = (await l.universal.load.call(null, m)) ?? null; - } - return { - node: l, - loader: t, - server: s, - universal: (p = l.universal) != null && p.load ? { type: "data", data: i, uses: c } : null, - data: i ?? (s == null ? void 0 : s.data) ?? null, - slash: ((y = l.universal) == null ? void 0 : y.trailingSlash) ?? (s == null ? void 0 : s.slash), - }; -} -function Ne(t, e, n) { - let a = t instanceof Request ? t.url : t; - const r = new URL(a, n); - r.origin === n.origin && (a = r.href.slice(n.origin.length)); - const s = wt ? tn(a, r.href, e) : Qe(a, e); - return { resolved: r, promise: s }; -} -function he(t, e, n, a, r, s) { - if (Yt) return !0; - if (!r) return !1; - if ((r.parent && t) || (r.route && e) || (r.url && n)) return !0; - for (const i of r.search_params) if (a.has(i)) return !0; - for (const i of r.params) if (s[i] !== w.params[i]) return !0; - for (const i of r.dependencies) if (yt.some((o) => o(new URL(i)))) return !0; - return !1; -} -function Jt(t, e) { - return (t == null ? void 0 : t.type) === "data" ? t : (t == null ? void 0 : t.type) === "skip" ? e ?? null : null; -} -function Dn(t, e) { - if (!t) return new Set(e.searchParams.keys()); - const n = new Set([...t.searchParams.keys(), ...e.searchParams.keys()]); - for (const a of n) { - const r = t.searchParams.getAll(a), - s = e.searchParams.getAll(a); - r.every((i) => s.includes(i)) && s.every((i) => r.includes(i)) && n.delete(a); - } - return n; -} -function pe({ error: t, url: e, route: n, params: a }) { - return { type: "loaded", state: { error: t, url: e, route: n, params: a, branch: [] }, props: { page: Zt(L), constructors: [] } }; -} -async function Oe({ id: t, invalidating: e, url: n, params: a, route: r, preload: s }) { - if ((T == null ? void 0 : T.id) === t) return J.delete(T.token), T.promise; - const { errors: i, layouts: o, leaf: c } = r, - l = [...o, c]; - i.forEach((g) => (g == null ? void 0 : g().catch(() => {}))), l.forEach((g) => (g == null ? void 0 : g[1]().catch(() => {}))); - let d = null; - const p = w.url ? t !== bt(w.url) : !1, - y = w.route ? r.id !== w.route.id : !1, - f = Dn(w.url, n); - let m = !1; - const u = l.map((g, _) => { - var D; - const v = w.branch[_], - k = !!(g != null && g[0]) && ((v == null ? void 0 : v.loader) !== g[1] || he(m, y, p, f, (D = v.server) == null ? void 0 : D.uses, a)); - return k && (m = !0), k; - }); - if (u.some(Boolean)) { - try { - d = await De(n, u); - } catch (g) { - const _ = await H(g, { url: n, params: a, route: { id: t } }); - return J.has(s) ? pe({ error: _, url: n, params: a, route: r }) : St({ status: gt(g), error: _, url: n, route: r }); - } - if (d.type === "redirect") return d; - } - const h = d == null ? void 0 : d.nodes; - let A = !1; - const R = l.map(async (g, _) => { - var It; - if (!g) return; - const v = w.branch[_], - k = h == null ? void 0 : h[_]; - if ((!k || k.type === "skip") && g[1] === (v == null ? void 0 : v.loader) && !he(A, y, p, f, (It = v.universal) == null ? void 0 : It.uses, a)) return v; - if (((A = !0), (k == null ? void 0 : k.type) === "error")) throw k; - return Wt({ - loader: g[1], - url: n, - params: a, - route: r, - parent: async () => { - var te; - const Qt = {}; - for (let Lt = 0; Lt < _; Lt += 1) Object.assign(Qt, (te = await R[Lt]) == null ? void 0 : te.data); - return Qt; - }, - server_data_node: Jt(k === void 0 && g[0] ? { type: "skip" } : k ?? null, g[0] ? (v == null ? void 0 : v.server) : void 0), - }); - }); - for (const g of R) g.catch(() => {}); - const I = []; - for (let g = 0; g < l.length; g += 1) - if (l[g]) - try { - I.push(await R[g]); - } catch (_) { - if (_ instanceof qt) return { type: "redirect", location: _.location }; - if (J.has(s)) return pe({ error: await H(_, { params: a, url: n, route: { id: r.id } }), url: n, params: a, route: r }); - let v = gt(_), - k; - if (h != null && h.includes(_)) (v = _.status ?? v), (k = _.error); - else if (_ instanceof Et) k = _.body; - else { - if (await $.updated.check()) return await Le(), await K(n); - k = await H(_, { params: a, url: n, route: { id: r.id } }); - } - const D = await qn(g, I, i); - return D ? vt({ url: n, params: a, branch: I.slice(0, D.idx).concat(D.node), status: v, error: k, route: r }) : await $e(n, { id: r.id }, k, v); - } - else I.push(void 0); - return vt({ url: n, params: a, branch: I, status: 200, error: null, route: r, form: e ? void 0 : null }); -} -async function qn(t, e, n) { - for (; t--; ) - if (n[t]) { - let a = t; - for (; !e[a]; ) a -= 1; - try { - return { idx: a + 1, node: { node: await n[t](), loader: n[t], data: {}, server: null, universal: null } }; - } catch { - continue; - } - } -} -async function St({ status: t, error: e, url: n, route: a }) { - const r = {}; - let s = null; - if (E.server_loads[0] === 0) - try { - const o = await De(n, [!0]); - if (o.type !== "data" || (o.nodes[0] && o.nodes[0].type !== "data")) throw 0; - s = o.nodes[0] ?? null; - } catch { - (n.origin !== dt || n.pathname !== location.pathname || Kt) && (await K(n)); - } - try { - const o = await Wt({ loader: Ot, url: n, params: r, route: a, parent: () => Promise.resolve({}), server_data_node: Jt(s) }), - c = { node: await mt(), loader: mt, universal: null, server: null, data: null }; - return vt({ url: n, params: r, branch: [o, c], status: t, error: e, route: null }); - } catch (o) { - if (o instanceof qt) return zt(new URL(o.location, location.href), {}, 0); - throw o; - } -} -async function Fn(t) { - const e = t.href; - if (ht.has(e)) return ht.get(e); - let n; - try { - const a = (async () => { - let r = (await E.hooks.reroute({ url: new URL(t), fetch: async (s, i) => Ne(s, i, t).promise })) ?? t; - if (typeof r == "string") { - const s = new URL(t); - E.hash ? (s.hash = r) : (s.pathname = r), (r = s); - } - return r; - })(); - ht.set(e, a), (n = await a); - } catch { - ht.delete(e); - return; - } - return n; -} -async function Rt(t, e) { - if (t && !kt(t, x, E.hash)) { - const n = await Fn(t); - if (!n) return; - const a = Bn(n); - for (const r of Gt) { - const s = r.exec(a); - if (s) return { id: bt(t), invalidating: e, route: r, params: Ye(s), url: t }; - } - } -} -function Bn(t) { - return Ke(E.hash ? t.hash.replace(/^#/, "").replace(/[?#].+/, "") : t.pathname.slice(x.length)) || "/"; -} -function bt(t) { - return (E.hash ? t.hash.replace(/^#/, "") : t.pathname) + t.search; -} -function je({ url: t, type: e, intent: n, delta: a }) { - let r = !1; - const s = Xt(w, n, t, e); - a !== void 0 && (s.navigation.delta = a); - const i = { - ...s.navigation, - cancel: () => { - (r = !0), s.reject(new Error("navigation cancelled")); - }, - }; - return et || Ht.forEach((o) => o(i)), r ? null : s; -} -async function X({ type: t, url: e, popped: n, keepfocus: a, noscroll: r, replace_state: s, state: i = {}, redirect_count: o = 0, nav_token: c = {}, accept: l = le, block: d = le }) { - const p = F; - F = c; - const y = await Rt(e, !1), - f = t === "enter" ? Xt(w, y, e, t) : je({ url: e, type: t, delta: n == null ? void 0 : n.delta, intent: y }); - if (!f) { - d(), F === c && (F = p); - return; - } - const m = S, - u = U; - l(), (et = !0), wt && f.navigation.type !== "enter" && $.navigating.set((Q.current = f.navigation)); - let h = y && (await Oe(y)); - if (!h) { - if (kt(e, x, E.hash)) return await K(e); - h = await $e(e, { id: null }, await H(new Ft(404, "Not Found", `Not found: ${e.pathname}`), { url: e, params: {}, route: { id: null } }), 404); - } - if (((e = (y == null ? void 0 : y.url) || e), F !== c)) return f.reject(new Error("navigation aborted")), !1; - if (h.type === "redirect") - if (o >= 20) h = await St({ status: 500, error: await H(new Error("Redirect loop"), { url: e, params: {}, route: { id: null } }), url: e, route: { id: null } }); - else return await zt(new URL(h.location, e).href, {}, o + 1, c), !1; - else h.props.page.status >= 400 && (await $.updated.check()) && (await Le(), await K(e)); - if ((jn(), Mt(m), xe(u), h.props.page.url.pathname !== e.pathname && (e.pathname = h.props.page.url.pathname), (i = n ? n.state : i), !n)) { - const g = s ? 0 : 1, - _ = { [G]: (S += g), [Z]: (U += g), [Ae]: i }; - (s ? history.replaceState : history.pushState).call(history, _, "", e), s || Nn(S, U); - } - if (((T = null), (h.props.page.state = i), wt)) { - const g = (await Promise.all(Array.from(On, (_) => _(f.navigation)))).filter((_) => typeof _ == "function"); - if (g.length > 0) { - let _ = function () { - g.forEach((v) => { - W.delete(v); - }); - }; - g.push(_), - g.forEach((v) => { - W.add(v); - }); - } - (w = h.state), h.props.page && (h.props.page.url = e), Ue.$set(h.props), Rn(h.props.page), (Te = !0); - } else Ce(h, jt, !1); - const { activeElement: A } = document; - await Pn(); - const R = n ? n.scroll : r ? At() : null; - if (fe) { - const g = e.hash && document.getElementById(Fe(e)); - R ? scrollTo(R.x, R.y) : g ? g.scrollIntoView() : scrollTo(0, 0); - } - const I = document.activeElement !== A && document.activeElement !== document.body; - !a && !I && Yn(e), (fe = !0), h.props.page && Object.assign(L, h.props.page), (et = !1), t === "popstate" && Pe(U), f.fulfil(void 0), W.forEach((g) => g(f.navigation)), $.navigating.set((Q.current = null)); -} -async function $e(t, e, n, a) { - return t.origin === dt && t.pathname === location.pathname && !Kt ? await St({ status: a, error: n, url: t, route: e }) : await K(t); -} -function Vn() { - let t, e, n; - j.addEventListener("mousemove", (o) => { - const c = o.target; - clearTimeout(t), - (t = setTimeout(() => { - s(c, q.hover); - }, 20)); - }); - function a(o) { - o.defaultPrevented || s(o.composedPath()[0], q.tap); - } - j.addEventListener("mousedown", a), j.addEventListener("touchstart", a, { passive: !0 }); - const r = new IntersectionObserver( - (o) => { - for (const c of o) c.isIntersecting && (Ct(new URL(c.target.href)), r.unobserve(c.target)); - }, - { threshold: 0 } - ); - async function s(o, c) { - const l = Se(o, j), - d = l === e && c >= n; - if (!l || d) return; - const { url: p, external: y, download: f } = Nt(l, x, E.hash); - if (y || f) return; - const m = pt(l), - u = p && bt(w.url) === bt(p); - if (!(m.reload || u)) - if (c <= m.preload_data) { - (e = l), (n = q.tap); - const h = await Rt(p, !1); - if (!h) return; - $n(h); - } else c <= m.preload_code && ((e = l), (n = c), Ct(p)); - } - function i() { - r.disconnect(); - for (const o of j.querySelectorAll("a")) { - const { url: c, external: l, download: d } = Nt(o, x, E.hash); - if (l || d) continue; - const p = pt(o); - p.reload || (p.preload_code === q.viewport && r.observe(o), p.preload_code === q.eager && Ct(c)); - } - } - W.add(i), i(); -} -function H(t, e) { - if (t instanceof Et) return t.body; - const n = gt(t), - a = kn(t); - return E.hooks.handleError({ error: t, event: e, status: n, message: a }) ?? { message: a }; -} -function Mn(t, e) { - xn( - () => ( - t.add(e), - () => { - t.delete(e); - } - ) - ); -} -function rr(t) { - Mn(Ht, t); -} -function ar(t, e = {}) { - return (t = new URL(Vt(t))), t.origin !== dt ? Promise.reject(new Error("goto: invalid URL")) : zt(t, e, 0); -} -function Gn(t) { - if (typeof t == "function") yt.push(t); - else { - const { href: e } = new URL(t, location.href); - yt.push((n) => n.href === e); - } -} -function Hn() { - var e; - (history.scrollRestoration = "manual"), - addEventListener("beforeunload", (n) => { - let a = !1; - if ((de(), !et)) { - const r = Xt(w, void 0, null, "leave"), - s = { - ...r.navigation, - cancel: () => { - (a = !0), r.reject(new Error("navigation cancelled")); - }, - }; - Ht.forEach((i) => i(s)); - } - a ? (n.preventDefault(), (n.returnValue = "")) : (history.scrollRestoration = "auto"); - }), - addEventListener("visibilitychange", () => { - document.visibilityState === "hidden" && de(); - }), - ((e = navigator.connection) != null && e.saveData) || Vn(), - j.addEventListener("click", async (n) => { - if (n.button || n.which !== 1 || n.metaKey || n.ctrlKey || n.shiftKey || n.altKey || n.defaultPrevented) return; - const a = Se(n.composedPath()[0], j); - if (!a) return; - const { url: r, external: s, target: i, download: o } = Nt(a, x, E.hash); - if (!r) return; - if (i === "_parent" || i === "_top") { - if (window.parent !== window) return; - } else if (i && i !== "_self") return; - const c = pt(a); - if ((!(a instanceof SVGAElement) && r.protocol !== location.protocol && !(r.protocol === "https:" || r.protocol === "http:")) || o) return; - const [d, p] = (E.hash ? r.hash.replace(/^#/, "") : r.href).split("#"), - y = d === Ut(location); - if (s || (c.reload && (!y || !p))) { - je({ url: r, type: "link" }) ? (et = !0) : n.preventDefault(); - return; - } - if (p !== void 0 && y) { - const [, f] = w.url.href.split("#"); - if (f === p) { - if ((n.preventDefault(), p === "" || (p === "top" && a.ownerDocument.getElementById("top") === null))) window.scrollTo({ top: 0 }); - else { - const m = a.ownerDocument.getElementById(decodeURIComponent(p)); - m && (m.scrollIntoView(), m.focus()); - } - return; - } - if (((Y = !0), Mt(S), t(r), !c.replace_state)) return; - Y = !1; - } - n.preventDefault(), - await new Promise((f) => { - requestAnimationFrame(() => { - setTimeout(f, 0); - }), - setTimeout(f, 100); - }), - await X({ type: "link", url: r, keepfocus: c.keepfocus, noscroll: c.noscroll, replace_state: c.replace_state ?? r.href === location.href }); - }), - j.addEventListener("submit", (n) => { - if (n.defaultPrevented) return; - const a = HTMLFormElement.prototype.cloneNode.call(n.target), - r = n.submitter; - if (((r == null ? void 0 : r.formTarget) || a.target) === "_blank" || ((r == null ? void 0 : r.formMethod) || a.method) !== "get") return; - const o = new URL(((r == null ? void 0 : r.hasAttribute("formaction")) && (r == null ? void 0 : r.formAction)) || a.action); - if (kt(o, x, !1)) return; - const c = n.target, - l = pt(c); - if (l.reload) return; - n.preventDefault(), n.stopPropagation(); - const d = new FormData(c), - p = r == null ? void 0 : r.getAttribute("name"); - p && d.append(p, (r == null ? void 0 : r.getAttribute("value")) ?? ""), - (o.search = new URLSearchParams(d).toString()), - X({ type: "form", url: o, keepfocus: l.keepfocus, noscroll: l.noscroll, replace_state: l.replace_state ?? o.href === location.href }); - }), - addEventListener("popstate", async (n) => { - var a; - if (!$t) { - if ((a = n.state) != null && a[G]) { - const r = n.state[G]; - if (((F = {}), r === S)) return; - const s = B[r], - i = n.state[Ae] ?? {}, - o = new URL(n.state[ln] ?? location.href), - c = n.state[Z], - l = w.url ? Ut(location) === Ut(w.url) : !1; - if (c === U && (Te || l)) { - i !== L.state && (L.state = i), t(o), (B[S] = At()), s && scrollTo(s.x, s.y), (S = r); - return; - } - const p = r - S; - await X({ - type: "popstate", - url: o, - popped: { state: i, scroll: s, delta: p }, - accept: () => { - (S = r), (U = c); - }, - block: () => { - history.go(-p); - }, - nav_token: F, - }); - } else if (!Y) { - const r = new URL(location.href); - t(r), E.hash && location.reload(); - } - } - }), - addEventListener("hashchange", () => { - Y && ((Y = !1), history.replaceState({ ...history.state, [G]: ++S, [Z]: U }, "", location.href)); - }); - for (const n of document.querySelectorAll("link")) Cn.has(n.rel) && (n.href = n.href); - addEventListener("pageshow", (n) => { - n.persisted && $.navigating.set((Q.current = null)); - }); - function t(n) { - (w.url = L.url = n), $.page.set(Zt(L)), $.page.notify(); - } -} -async function Kn(t, { status: e = 200, error: n, node_ids: a, params: r, route: s, server_route: i, data: o, form: c }) { - Kt = !0; - const l = new URL(location.href); - let d; - ({ params: r = {}, route: s = { id: null } } = (await Rt(l, !1)) || {}), (d = Gt.find(({ id: f }) => f === s.id)); - let p, - y = !0; - try { - const f = a.map(async (u, h) => { - const A = o[h]; - return ( - A != null && A.uses && (A.uses = qe(A.uses)), - Wt({ - loader: E.nodes[u], - url: l, - params: r, - route: s, - parent: async () => { - const R = {}; - for (let I = 0; I < h; I += 1) Object.assign(R, (await f[I]).data); - return R; - }, - server_data_node: Jt(A), - }) - ); - }), - m = await Promise.all(f); - if (d) { - const u = d.layouts; - for (let h = 0; h < u.length; h++) u[h] || m.splice(h, 0, void 0); - } - p = vt({ url: l, params: r, branch: m, status: e, error: n, form: c, route: d ?? null }); - } catch (f) { - if (f instanceof qt) { - await K(new URL(f.location, location.href)); - return; - } - (p = await St({ status: gt(f), error: await H(f, { url: l, params: r, route: s }), url: l, route: s })), (t.textContent = ""), (y = !1); - } - p.props.page && (p.props.page.state = {}), Ce(p, t, y); -} -async function De(t, e) { - var s; - const n = new URL(t); - (n.pathname = Tn(t.pathname)), t.pathname.endsWith("/") && n.searchParams.append(An, "1"), n.searchParams.append(En, e.map((i) => (i ? "1" : "0")).join("")); - const a = window.fetch, - r = await a(n.href, {}); - if (!r.ok) { - let i; - throw ((s = r.headers.get("content-type")) != null && s.includes("application/json") ? (i = await r.json()) : r.status === 404 ? (i = "Not Found") : r.status === 500 && (i = "Internal Error"), new Et(r.status, i)); - } - return new Promise(async (i) => { - var p; - const o = new Map(), - c = r.body.getReader(); - function l(y) { - return wn(y, { - ...E.decoders, - Promise: (f) => - new Promise((m, u) => { - o.set(f, { fulfil: m, reject: u }); - }), - }); - } - let d = ""; - for (;;) { - const { done: y, value: f } = await c.read(); - if (y && !d) break; - for ( - d += - !f && d - ? ` -` - : Je.decode(f, { stream: !0 }); - ; - - ) { - const m = d.indexOf(` -`); - if (m === -1) break; - const u = JSON.parse(d.slice(0, m)); - if (((d = d.slice(m + 1)), u.type === "redirect")) return i(u); - if (u.type === "data") - (p = u.nodes) == null || - p.forEach((h) => { - (h == null ? void 0 : h.type) === "data" && ((h.uses = qe(h.uses)), (h.data = l(h.data))); - }), - i(u); - else if (u.type === "chunk") { - const { id: h, data: A, error: R } = u, - I = o.get(h); - o.delete(h), R ? I.reject(l(R)) : I.fulfil(l(A)); - } - } - } - }); -} -function qe(t) { - return { - dependencies: new Set((t == null ? void 0 : t.dependencies) ?? []), - params: new Set((t == null ? void 0 : t.params) ?? []), - parent: !!(t != null && t.parent), - route: !!(t != null && t.route), - url: !!(t != null && t.url), - search_params: new Set((t == null ? void 0 : t.search_params) ?? []), - }; -} -let $t = !1; -function Yn(t) { - const e = document.querySelector("[autofocus]"); - if (e) e.focus(); - else { - const n = Fe(t); - if (n && document.getElementById(n)) { - const { x: r, y: s } = At(); - setTimeout(() => { - const i = history.state; - ($t = !0), location.replace(`#${n}`), E.hash && location.replace(t.hash), history.replaceState(i, "", t.hash), scrollTo(r, s), ($t = !1); - }); - } else { - const r = document.body, - s = r.getAttribute("tabindex"); - (r.tabIndex = -1), r.focus({ preventScroll: !0, focusVisible: !1 }), s !== null ? r.setAttribute("tabindex", s) : r.removeAttribute("tabindex"); - } - const a = getSelection(); - if (a && a.type !== "None") { - const r = []; - for (let s = 0; s < a.rangeCount; s += 1) r.push(a.getRangeAt(s)); - setTimeout(() => { - if (a.rangeCount === r.length) { - for (let s = 0; s < a.rangeCount; s += 1) { - const i = r[s], - o = a.getRangeAt(s); - if (i.commonAncestorContainer !== o.commonAncestorContainer || i.startContainer !== o.startContainer || i.endContainer !== o.endContainer || i.startOffset !== o.startOffset || i.endOffset !== o.endOffset) return; - } - a.removeAllRanges(); - } - }); - } - } -} -function Xt(t, e, n, a) { - var c, l; - let r, s; - const i = new Promise((d, p) => { - (r = d), (s = p); - }); - return ( - i.catch(() => {}), - { - navigation: { - from: { params: t.params, route: { id: ((c = t.route) == null ? void 0 : c.id) ?? null }, url: t.url }, - to: n && { params: (e == null ? void 0 : e.params) ?? null, route: { id: ((l = e == null ? void 0 : e.route) == null ? void 0 : l.id) ?? null }, url: n }, - willUnload: !e, - type: a, - complete: i, - }, - fulfil: r, - reject: s, - } - ); -} -function Zt(t) { - return { data: t.data, error: t.error, form: t.form, params: t.params, route: t.route, state: t.state, status: t.status, url: t.url }; -} -function zn(t) { - const e = new URL(t); - return (e.hash = decodeURIComponent(t.hash)), e; -} -function Fe(t) { - let e; - if (E.hash) { - const [, , n] = t.hash.split("#", 3); - e = n ?? ""; - } else e = t.hash.slice(1); - return decodeURIComponent(e); -} -export { nr as a, rr as b, ar as g, Zn as l, L as p, $ as s }; diff --git a/frontend-backup/_app/immutable/chunks/B6ZK_HZO.js b/frontend-backup/_app/immutable/chunks/B6ZK_HZO.js new file mode 100644 index 0000000..bb214d1 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/B6ZK_HZO.js @@ -0,0 +1,50 @@ +import { s as t, p as n } from "./CyB--sFG.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + d = new e.Error().stack; + d && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[d] = "a3dbed05-c198-4ed7-927f-c0428effe604"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-a3dbed05-c198-4ed7-927f-c0428effe604")); + })(); +} catch {} +const f = { + get error() { + return n.error; + }, + get status() { + return n.status; + }, + get url() { + return n.url; + }, +}; +t.updated.check; +const r = f; +export { r as p }; diff --git a/frontend-backup/_app/immutable/chunks/BA2Qx8r3.js b/frontend-backup/_app/immutable/chunks/BA2Qx8r3.js new file mode 100644 index 0000000..66e845e --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/BA2Qx8r3.js @@ -0,0 +1,781 @@ +import { g as j } from "./CV9xcpLq.js"; +import "./Ch2Ub8FX.js"; +import { o as _t } from "./DoL3ojdE.js"; +import { + v as N, + b as d, + at as Ye, + p as Ke, + ay as Ve, + a as me, + c as We, + f as k, + d as t, + r as o, + s as n, + n as X, + t as y, + ax as fe, + y as mt, + g as _, + au as be, + aw as L, + u as _e, + b4 as Ce, +} from "./CMvZtFtm.js"; +import { s as w } from "./DVA6u9-7.js"; +import { r as ne, p as Ge, i as M } from "./BF50aS-j.js"; +import { + b as O, + f as gt, + s as ae, + r as Ie, + g as Le, + a as Je, + e as xt, +} from "./C5yqZvKC.js"; +import { b as ht } from "./0wx1llIh.js"; +import { g as Re } from "./CyB--sFG.js"; +import { p as Ae } from "./B6ZK_HZO.js"; +import { + g as wt, + u as se, + t as re, + a as $e, + S as yt, + P as Fe, +} from "./BRM3t761.js"; +import { c as kt } from "./Dt3xBOvm.js"; +import { a as Ct } from "./D3yaN7Zl.js"; +(function () { + try { + var s = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + s.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var s = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + e = new s.Error().stack; + e && + ((s._sentryDebugIds = s._sentryDebugIds || {}), + (s._sentryDebugIds[e] = "0fa0d6bf-0d42-46b8-b804-0b844b6532f6"), + (s._sentryDebugIdIdentifier = + "sentry-dbid-0fa0d6bf-0d42-46b8-b804-0b844b6532f6")); + })(); +} catch {} +const It = () => "Add profile picture", + Lt = () => "Adicionar imagem de perfil", + wo = (s = {}, e = {}) => ((e.locale ?? j()) === "en" ? It() : Lt()), + zt = () => "You gain 1 droplet per pixel painted and 500 droplets per level", + Pt = () => "Você ganha 1 droplet por pixel pintado e 500 droplets por level", + Xe = (s = {}, e = {}) => ((e.locale ?? j()) === "en" ? zt() : Pt()), + qt = () => "Eraser", + Tt = () => "Borracha", + yo = (s = {}, e = {}) => ((e.locale ?? j()) === "en" ? qt() : Tt()), + Dt = () => "Refund Policy", + Mt = () => "Política de Reembolso", + Oe = (s = {}, e = {}) => ((e.locale ?? j()) === "en" ? Dt() : Mt()), + St = () => "For refund requests and processing details, please see our", + Et = () => "Para pedidos de reembolso, consulte nossa", + je = (s = {}, e = {}) => ((e.locale ?? j()) === "en" ? St() : Et()); +var Bt = N( + '' +); +function Ht(s, e) { + let r = ne(e, ["$$slots", "$$events", "$$legacy"]); + var a = Bt(); + O(a, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...r, + })), + d(s, a); +} +function Ut() { + return j(); +} +function Ne(s) { + return `${s}/terms/return${Ut() === "pt" ? "/pt" : ""}`; +} +var Zt = N( + '' +); +function ze(s, e) { + let r = ne(e, ["$$slots", "$$events", "$$legacy"]); + var a = Zt(); + O(a, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...r, + })), + d(s, a); +} +var Rt = k( + '' + ), + At = k( + ' Droplets ' + ), + Ft = k( + '' + ), + Xt = k( + '' + ); +function Ot(s, e) { + Ke(e, !0); + const r = (i) => { + var p = At(), + f = t(p); + ze(f, { class: "text-primary size-4.5" }); + var h = n(f, 2), + S = t(h); + X(), o(h); + var C = n(h, 2); + { + var q = (E) => { + var Q = Rt(), + U = t(Q); + Ht(U, { class: "size-4" }), o(Q), d(E, Q); + }; + M(C, (E) => { + a() && E(q); + }); + } + o(p), + y((E) => w(S, `${E ?? ""} `), [() => e.value.toLocaleString("en-US")]), + d(i, p); + }; + let a = Ge(e, "button", 3, !0); + var m = Ve(), + u = me(m); + { + var b = (i) => { + var p = Ft(); + p.__click = () => { + wt.dropletsDialogOpen = !0; + }; + var f = t(p); + r(f), o(p), d(i, p); + }, + c = (i) => { + var p = Xt(), + f = t(p); + r(f), o(p), d(i, p); + }; + M(u, (i) => { + a() ? i(b) : i(c, !1); + }); + } + d(s, m), We(); +} +Ye(["click"]); +var jt = N( + '' +); +function Nt(s, e) { + let r = ne(e, ["$$slots", "$$events", "$$legacy"]); + var a = jt(); + O(a, () => ({ + xmlns: "http://www.w3.org/2000/svg", + height: "24px", + viewBox: "0 -960 960 960", + width: "24px", + fill: "currentColor", + ...r, + })), + d(s, a); +} +var Qt = N( + '' +); +function Qe(s, e) { + let r = ne(e, ["$$slots", "$$events", "$$legacy"]); + var a = Qt(); + O(a, () => ({ + xmlns: "http://www.w3.org/2000/svg", + x: "0px", + y: "0px", + width: "100", + height: "100", + viewBox: "0 0 48 48", + ...r, + })), + d(s, a); +} +var Yt = (s, e, r, a, m) => { + _(e).show(), + L(r, !0), + $e + .generatePixQrCode(a()) + .then((u) => { + L(m, u, !0); + }) + .catch((u) => { + re.error(u.message); + }) + .finally(() => { + L(r, !1); + }); + }, + Kt = k( + '
        ' + ), + Vt = k( + '
        ' + ), + Wt = k( + '

        Droplets

        ' + ), + Gt = k( + '

        Droplets

        ' + ), + Jt = (s, e) => { + var r; + navigator.clipboard.writeText( + ((r = _(e)) == null ? void 0 : r.pixCode) ?? "" + ), + re.success("Código PIX copiado"); + }, + $t = async (s, e, r) => { + var a, m, u; + if (!_(e)) { + re.info("Espere 1 minuto e recarrege a pagina"); + return; + } + try { + L(r, !0); + const { paid: b } = await $e.getPixStatus(_(e).pixId); + if (b) { + const c = _(e).productId.toString(), + i = + (u = + (m = (a = yt.products[c]) == null ? void 0 : a.items) == null + ? void 0 + : m[0]) == null + ? void 0 + : u.amount; + await se.refresh(), + i ? Re(`payment/success?droplets=${i}`) : Re("payment/success"); + } else + re.info( + "Pagamento ainda não recebido. Desculpe a demora, tente novamente em instantes.", + { duration: 1e5 } + ); + } catch (b) { + console.error(b), + re.error( + "Error ao atualizar o status do pix. Tente recarregar a página." + ); + } finally { + L(r, !1); + } + }, + eo = k( + '

        Efetue o pagamento do PIX no valor de

        QR code PIX
        Código
        ', + 1 + ), + to = k( + '
        ' + ), + oo = k( + ' ', + 1 + ); +function ko(s, e) { + Ke(e, !0); + let r = Ge(e, "open", 15), + a = be(!1); + _t(() => { + const l = (g) => { + g.key === "Escape" && r(!1); + }; + return ( + document.addEventListener("keydown", l), + () => document.removeEventListener("keydown", l) + ); + }); + const m = _e(() => { + var l, g; + return ( + ((g = (l = se.data) == null ? void 0 : l.country) == null + ? void 0 + : g.toUpperCase()) === "BR" + ); + }), + u = _e(() => { + var l, g; + return ( + ((g = (l = se.data) == null ? void 0 : l.country) == null + ? void 0 + : g.toUpperCase()) === "MX" + ); + }); + let b = be(null), + c = be(void 0), + i = be(!1); + var p = oo(), + f = me(p), + h = t(f), + S = n(t(h), 2); + { + var C = (l) => { + var g = Gt(), + B = t(g), + Z = t(B), + le = t(Z); + ze(le, { class: "text-primary size-6" }); + var R = n(le, 4), + ie = t(R); + { + let z = _e(() => { + var A; + return ((A = se.data) == null ? void 0 : A.droplets) ?? 0; + }); + Ot(ie, { + get value() { + return _(z); + }, + button: !1, + }); + } + o(R), o(Z); + var de = n(Z, 2), + Y = t(de, !0); + o(de), o(B); + var K = n(B, 2); + { + const z = (A, v) => { + let J = () => (v == null ? void 0 : v().droplets), + $ = () => (v == null ? void 0 : v().bonus), + he = () => (v == null ? void 0 : v().price), + Se = () => (v == null ? void 0 : v().stripeLookupkey), + nt = () => (v == null ? void 0 : v().productId), + lt = () => (v == null ? void 0 : v().dropdownClass); + var we = Wt(), + ye = t(we), + Ee = t(ye); + ze(Ee, { class: "mb-1 inline size-7" }); + var Be = n(Ee, 2), + it = t(Be); + X(), o(Be), o(ye); + var ke = n(ye, 2), + He = t(ke); + { + var dt = (I) => { + var x = Ce(); + y( + (T) => w(x, `${T ?? ""} Droplets`), + [() => J().toLocaleString("en-US")] + ), + d(I, x); + }; + M(He, (I) => { + $() && I(dt); + }); + } + var Ue = n(He, 2), + ct = t(Ue); + o(Ue), o(ke); + var pt = n(ke, 2); + { + var vt = (I) => { + var x = Kt(), + T = t(x), + ee = t(T); + o(T); + var ve = n(T, 2), + te = t(ve), + F = t(te), + P = t(F); + Ie(P); + var D = n(P, 2), + oe = t(D); + Nt(oe, { class: "inline size-5" }), X(2), o(D), o(F), o(te); + var Ze = n(te, 2), + ue = t(Ze); + ue.__click = [Yt, b, a, nt, c]; + var ft = t(ue); + Qe(ft, { class: "size-5" }), + X(2), + o(ue), + o(Ze), + o(ve), + o(x), + y( + (bt) => { + Je(x, 1, `dropdown mt-3 ${lt() ?? ""}`), + w(ee, `R$${bt ?? ""}`), + ae( + F, + "action", + `${Fe}/payment/create-checkout-session` + ), + Le(P, Se()), + (D.disabled = _(a)), + (ue.disabled = _(a)); + }, + [() => (he() * 4).toFixed(2).replace(".", ",")] + ), + fe("submit", F, () => { + L(a, !0), setTimeout(() => L(a, !1), 3e3); + }), + d(I, x); + }, + ut = (I) => { + var x = Vt(), + T = t(x); + Ie(T); + var ee = n(T, 2), + ve = t(ee); + { + var te = (P) => { + var D = Ce(); + y( + (oe) => w(D, `MX$ ${oe ?? ""}`), + [() => (he() * 18).toFixed(2)] + ), + d(P, D); + }, + F = (P) => { + var D = Ce(); + y((oe) => w(D, `$${oe ?? ""}`), [() => he().toFixed(2)]), + d(P, D); + }; + M(ve, (P) => { + _(u) ? P(te) : P(F, !1); + }); + } + o(ee), + o(x), + y(() => { + ae(x, "action", `${Fe}/payment/create-checkout-session`), + Le(T, Se()), + (ee.disabled = _(a)); + }), + fe("submit", x, () => { + L(a, !0), setTimeout(() => L(a, !1), 3e3); + }), + d(I, x); + }; + M(pt, (I) => { + _(m) ? I(vt) : I(ut, !1); + }); + } + o(we), + y( + (I, x) => { + w(it, `${I ?? ""} `), w(ct, `+${x ?? ""} bonus`); + }, + [ + () => (J() + $()).toLocaleString("en-US"), + () => $().toLocaleString("en-US"), + ] + ), + d(A, we); + }; + var H = t(K), + V = t(H); + z(V, () => ({ + price: 5, + droplets: 25e3, + bonus: 0, + stripeLookupkey: "droplets_5", + productId: 10, + dropdownClass: "dropdown-center", + })); + var ce = n(V, 2); + z(ce, () => ({ + price: 15, + droplets: 75e3, + bonus: 3750, + stripeLookupkey: "droplets_15", + productId: 20, + dropdownClass: "dropdown-center", + })); + var W = n(ce, 2); + z(W, () => ({ + price: 30, + droplets: 15e4, + bonus: 15e3, + stripeLookupkey: "droplets_30", + productId: 30, + dropdownClass: "dropdown-center", + })); + var G = n(W, 2); + z(G, () => ({ + price: 50, + droplets: 25e4, + bonus: 37500, + stripeLookupkey: "droplets_50", + productId: 40, + dropdownClass: "dropdown-center", + })); + var pe = n(G, 2); + z(pe, () => ({ + price: 75, + droplets: 375e3, + bonus: 75e3, + stripeLookupkey: "droplets_75", + productId: 50, + dropdownClass: "dropdown-center", + })); + var st = n(pe, 2); + z(st, () => ({ + price: 100, + droplets: 5e5, + bonus: 125e3, + stripeLookupkey: "droplets_100", + productId: 60, + dropdownClass: "max-sm:dropdown-top dropdown-center", + })), + o(H); + var De = n(H, 2), + Me = t(De), + xe = n(Me), + rt = t(xe, !0); + o(xe), + o(De), + o(K), + y( + (A, v, J, $) => { + w(Me, `${v ?? ""} `), ae(xe, "href", J), w(rt, $); + }, + [() => Xe(), () => je(), () => Ne(Ae.url.origin), () => Oe()] + ); + } + o(g), + y( + (z, A, v, J) => w(Y, z), + [() => Xe(), () => je(), () => Ne(Ae.url.origin), () => Oe()] + ), + d(l, g); + }; + M(S, (l) => { + se.data && l(C); + }); + } + o(h); + var q = n(h, 2), + E = t(q), + Q = t(E, !0); + o(E), + o(q), + o(f), + gt(f, () => (l) => { + mt(() => { + r() ? l.show() : l.close(); + }); + }); + var U = n(f, 2), + Pe = t(U), + qe = n(t(Pe), 2), + ge = t(qe), + Te = t(ge), + et = t(Te); + Qe(et, { class: "size-10" }), X(2), o(Te), o(ge); + var tt = n(ge, 2); + { + var ot = (l) => { + var g = eo(), + B = me(g), + Z = n(t(B)), + le = t(Z); + o(Z), o(B); + var R = n(B, 2), + ie = t(R), + de = t(ie); + X(2), o(ie), o(R); + var Y = n(R, 2), + K = n(t(Y), 2), + H = t(K); + Ie(H); + var V = n(H, 2), + ce = t(V); + (ce.__click = [Jt, c]), o(V), o(K), o(Y); + var W = n(Y, 2), + G = t(W); + (G.__click = [$t, c, i]), + o(W), + y( + (pe) => { + w(le, `R$${pe ?? ""}`), + ae(de, "src", _(c).qrCode), + Le(H, _(c).pixCode), + (G.disabled = _(i)); + }, + [() => (_(c).price / 100).toFixed(2).replace(".", ",")] + ), + d(l, g); + }, + at = (l) => { + var g = to(); + d(l, g); + }; + M(tt, (l) => { + _(c) ? l(ot) : l(at, !1); + }); + } + o(qe), + o(Pe), + o(U), + ht( + U, + (l) => L(b, l), + () => _(b) + ), + y((l) => w(Q, l), [() => kt()]), + fe("close", f, () => { + r(!1); + }), + fe("close", U, () => { + setTimeout(() => { + L(c, void 0); + }, 300); + }), + d(s, p), + We(); +} +Ye(["click"]); +var ao = N( + '' + ), + so = N( + '' + ); +function Co(s, e) { + let r = ne(e, ["$$slots", "$$events", "$$legacy", "filled"]); + var a = Ve(), + m = me(a); + { + var u = (c) => { + var i = ao(); + O(i, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...r, + })), + d(c, i); + }, + b = (c) => { + var i = so(); + O(i, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...r, + })), + d(c, i); + }; + M(m, (c) => { + e.filled ? c(u) : c(b, !1); + }); + } + d(s, a); +} +function Io([s, e], [r, a]) { + (s = Math.floor(s)), + (e = Math.floor(e)), + (r = Math.floor(r)), + (a = Math.floor(a)); + const m = [], + u = Math.abs(r - s), + b = Math.abs(a - e), + c = s < r ? 1 : -1, + i = e < a ? 1 : -1; + let p = u - b, + f = s, + h = e; + for (; m.push([f, h]), !(f === r && h === a); ) { + const S = 2 * p; + S > -b && ((p -= b), (f += c)), S < u && ((p += u), (h += i)); + } + return m; +} +var ro = k('User profile'), + no = k( + '
        ' + ); +function Lo(s, e) { + const r = _e(() => (e.level % 1) * 360); + var a = no(), + m = n(t(a), 2), + u = n(m, 2), + b = t(u), + c = t(b); + { + var i = (C) => { + Ct(C, { + get userId() { + return e.userId; + }, + }); + }, + p = (C) => { + var q = ro(); + y(() => ae(q, "src", e.pictureUrl)), d(C, q); + }; + M(c, (C) => { + e.pictureUrl ? C(p, !1) : C(i); + }); + } + o(b), o(u); + var f = n(u, 2); + let h; + var S = t(f, !0); + o(f), + o(a), + y( + (C, q) => { + xt(m, `--angle: ${_(r) ?? ""}deg; --color: var(--color-secondary)`), + (h = Je( + f, + 1, + "text-primary-content bg-secondary absolute bottom-0 flex items-center justify-center rounded-full px-[5px] py-0 text-xs font-bold", + null, + h, + C + )), + w(S, q); + }, + [ + () => ({ "left-0": e.level > 99, "-left-1": e.level > 99 }), + () => Math.floor(e.level), + ] + ), + d(s, a); +} +export { + Ht as A, + Ot as D, + Co as I, + Lo as P, + ze as a, + ko as b, + wo as c, + Ne as d, + yo as e, + Io as r, +}; diff --git a/frontend-backup/_app/immutable/chunks/BBgyHb-Z.js b/frontend-backup/_app/immutable/chunks/BBgyHb-Z.js new file mode 100644 index 0000000..58399f4 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/BBgyHb-Z.js @@ -0,0 +1,359 @@ +import { + F as D, + aY as L, + aZ as q, + i as B, + h as F, + e as $, + j as z, + k as M, + l as U, + m as j, + o as P, + aM as Y, + q as Z, + ab as G, + E as K, + a_ as W, + a$ as X, + ac as H, + z as J, + b0 as Q, + b1 as V, + b2 as tt, + b3 as S, + aX as at, + L as et, + az as y, +} from "./CMvZtFtm.js"; +import { a as it } from "./DVA6u9-7.js"; +import { c as rt } from "./CXkjfmFU.js"; +(function () { + try { + var t = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + t.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var t = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + a = new t.Error().stack; + a && + ((t._sentryDebugIds = t._sentryDebugIds || {}), + (t._sentryDebugIds[a] = "82bb617f-9edb-4d1e-8e85-ab94e8601318"), + (t._sentryDebugIdIdentifier = + "sentry-dbid-82bb617f-9edb-4d1e-8e85-ab94e8601318")); + })(); +} catch {} +function vt(t, a, e) { + F && $(); + var r = t, + i = Y, + f, + n, + o = null, + v = D() ? L : q; + function h() { + f && Z(f), + o !== null && (o.lastChild.remove(), r.before(o), (o = null)), + (f = n); + } + B(() => { + if (v(i, (i = a()))) { + var c = r, + u = j(); + u && ((o = document.createDocumentFragment()), o.append((c = z()))), + (n = M(() => e(c))), + u ? U.add_callback(h) : h(); + } + }), + F && (r = P); +} +const nt = () => performance.now(), + w = { + tick: (t) => requestAnimationFrame(t), + now: () => nt(), + tasks: new Set(), + }; +function O() { + const t = w.now(); + w.tasks.forEach((a) => { + a.c(t) || (w.tasks.delete(a), a.f()); + }), + w.tasks.size !== 0 && w.tick(O); +} +function ft(t) { + let a; + return ( + w.tasks.size === 0 && w.tick(O), + { + promise: new Promise((e) => { + w.tasks.add((a = { c: t, f: e })); + }), + abort() { + w.tasks.delete(a); + }, + } + ); +} +function E(t, a) { + S(() => { + t.dispatchEvent(new CustomEvent(a)); + }); +} +function st(t) { + if (t === "float") return "cssFloat"; + if (t === "offset") return "cssOffset"; + if (t.startsWith("--")) return t; + const a = t.split("-"); + return a.length === 1 + ? a[0] + : a[0] + + a + .slice(1) + .map((e) => e[0].toUpperCase() + e.slice(1)) + .join(""); +} +function x(t) { + const a = {}, + e = t.split(";"); + for (const r of e) { + const [i, f] = r.split(":"); + if (!i || f === void 0) break; + const n = st(i.trim()); + a[n] = f.trim(); + } + return a; +} +const ot = (t) => t; +function ht(t, a, e) { + var r = rt, + i, + f, + n, + o = null; + r.a ?? + (r.a = { + element: t, + measure() { + i = this.element.getBoundingClientRect(); + }, + apply() { + if ( + (n == null || n.abort(), + (f = this.element.getBoundingClientRect()), + i.left !== f.left || + i.right !== f.right || + i.top !== f.top || + i.bottom !== f.bottom) + ) { + const v = a()( + this.element, + { from: i, to: f }, + e == null ? void 0 : e() + ); + n = k(this.element, v, void 0, 1, () => { + n == null || n.abort(), (n = void 0); + }); + } + }, + fix() { + if (!t.getAnimations().length) { + var { position: v, width: h, height: c } = getComputedStyle(t); + if (v !== "absolute" && v !== "fixed") { + var u = t.style; + (o = { + position: u.position, + width: u.width, + height: u.height, + transform: u.transform, + }), + (u.position = "absolute"), + (u.width = h), + (u.height = c); + var s = t.getBoundingClientRect(); + if (i.left !== s.left || i.top !== s.top) { + var d = `translate(${i.left - s.left}px, ${i.top - s.top}px)`; + u.transform = u.transform ? `${u.transform} ${d}` : d; + } + } + } + }, + unfix() { + if (o) { + var v = t.style; + (v.position = o.position), + (v.width = o.width), + (v.height = o.height), + (v.transform = o.transform); + } + }, + }), + (r.a.element = t); +} +function lt(t, a, e, r) { + var i = (t & V) !== 0, + f = (t & tt) !== 0, + n = i && f, + o = (t & Q) !== 0, + v = n ? "both" : i ? "in" : "out", + h, + c = a.inert, + u = a.style.overflow, + s, + d; + function g() { + return S( + () => + h ?? (h = e()(a, (r == null ? void 0 : r()) ?? {}, { direction: v })) + ); + } + var l = { + is_global: o, + in() { + var _; + if (((a.inert = c), !i)) { + d == null || d.abort(), + (_ = d == null ? void 0 : d.reset) == null || _.call(d); + return; + } + f || s == null || s.abort(), + E(a, "introstart"), + (s = k(a, g(), d, 1, () => { + E(a, "introend"), + s == null || s.abort(), + (s = h = void 0), + (a.style.overflow = u); + })); + }, + out(_) { + if (!f) { + _ == null || _(), (h = void 0); + return; + } + (a.inert = !0), + E(a, "outrostart"), + (d = k(a, g(), s, 0, () => { + E(a, "outroend"), _ == null || _(); + })); + }, + stop: () => { + s == null || s.abort(), d == null || d.abort(); + }, + }, + p = G; + if (((p.transitions ?? (p.transitions = [])).push(l), i && it)) { + var m = o; + if (!m) { + for (var b = p.parent; b && (b.f & K) !== 0; ) + for (; (b = b.parent) && (b.f & W) === 0; ); + m = !b || (b.f & X) !== 0; + } + m && + H(() => { + J(() => l.in()); + }); + } +} +function k(t, a, e, r, i) { + var f = r === 1; + if (at(a)) { + var n, + o = !1; + return ( + et(() => { + if (!o) { + var p = a({ direction: f ? "in" : "out" }); + n = k(t, p, e, r, i); + } + }), + { + abort: () => { + (o = !0), n == null || n.abort(); + }, + deactivate: () => n.deactivate(), + reset: () => n.reset(), + t: () => n.t(), + } + ); + } + if ((e == null || e.deactivate(), !(a != null && a.duration))) + return i(), { abort: y, deactivate: y, reset: y, t: () => r }; + const { delay: v = 0, css: h, tick: c, easing: u = ot } = a; + var s = []; + if (f && e === void 0 && (c && c(0, 1), h)) { + var d = x(h(0, 1)); + s.push(d, d); + } + var g = () => 1 - r, + l = t.animate(s, { duration: v, fill: "forwards" }); + return ( + (l.onfinish = () => { + l.cancel(); + var p = (e == null ? void 0 : e.t()) ?? 1 - r; + e == null || e.abort(); + var m = r - p, + b = a.duration * Math.abs(m), + _ = []; + if (b > 0) { + var N = !1; + if (h) + for ( + var A = Math.ceil(b / 16.666666666666668), I = 0; + I <= A; + I += 1 + ) { + var C = p + m * u(I / A), + R = x(h(C, 1 - C)); + _.push(R), N || (N = R.overflow === "hidden"); + } + N && (t.style.overflow = "hidden"), + (g = () => { + var T = l.currentTime; + return p + m * u(T / b); + }), + c && + ft(() => { + if (l.playState !== "running") return !1; + var T = g(); + return c(T, 1 - T), !0; + }); + } + (l = t.animate(_, { duration: b, fill: "forwards" })), + (l.onfinish = () => { + (g = () => r), c == null || c(r, 1 - r), i(); + }); + }), + { + abort: () => { + l && (l.cancel(), (l.effect = null), (l.onfinish = y)); + }, + deactivate: () => { + i = y; + }, + reset: () => { + r === 0 && (c == null || c(1, 0)); + }, + t: () => g(), + } + ); +} +export { ht as a, vt as k, lt as t }; diff --git a/frontend-backup/_app/immutable/chunks/BCONGQnO.js b/frontend-backup/_app/immutable/chunks/BCONGQnO.js deleted file mode 100644 index c859f9e..0000000 --- a/frontend-backup/_app/immutable/chunks/BCONGQnO.js +++ /dev/null @@ -1,294 +0,0 @@ -import { - F as D, - aY as L, - aZ as q, - i as B, - h as F, - e as $, - j as z, - k as M, - l as U, - m as j, - o as P, - aM as Y, - q as Z, - ad as G, - E as K, - a_ as W, - a$ as X, - M as H, - z as J, - b0 as Q, - b1 as V, - b2 as tt, - b3 as S, - aX as at, - L as it, - az as y, -} from "./BDALf20I.js"; -import { a as et } from "./4k6DpCgf.js"; -import { c as rt } from "./CZW2bcQi.js"; -(function () { - try { - var t = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - t.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var t = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - a = new t.Error().stack; - a && ((t._sentryDebugIds = t._sentryDebugIds || {}), (t._sentryDebugIds[a] = "ffd23b39-2a11-4572-8955-38bdff19f9fa"), (t._sentryDebugIdIdentifier = "sentry-dbid-ffd23b39-2a11-4572-8955-38bdff19f9fa")); - })(); -} catch {} -function vt(t, a, i) { - F && $(); - var r = t, - e = Y, - f, - n, - o = null, - v = D() ? L : q; - function h() { - f && Z(f), o !== null && (o.lastChild.remove(), r.before(o), (o = null)), (f = n); - } - B(() => { - if (v(e, (e = a()))) { - var c = r, - u = j(); - u && ((o = document.createDocumentFragment()), o.append((c = z()))), (n = M(() => i(c))), u ? U.add_callback(h) : h(); - } - }), - F && (r = P); -} -const nt = () => performance.now(), - w = { tick: (t) => requestAnimationFrame(t), now: () => nt(), tasks: new Set() }; -function O() { - const t = w.now(); - w.tasks.forEach((a) => { - a.c(t) || (w.tasks.delete(a), a.f()); - }), - w.tasks.size !== 0 && w.tick(O); -} -function ft(t) { - let a; - return ( - w.tasks.size === 0 && w.tick(O), - { - promise: new Promise((i) => { - w.tasks.add((a = { c: t, f: i })); - }), - abort() { - w.tasks.delete(a); - }, - } - ); -} -function E(t, a) { - S(() => { - t.dispatchEvent(new CustomEvent(a)); - }); -} -function st(t) { - if (t === "float") return "cssFloat"; - if (t === "offset") return "cssOffset"; - if (t.startsWith("--")) return t; - const a = t.split("-"); - return a.length === 1 - ? a[0] - : a[0] + - a - .slice(1) - .map((i) => i[0].toUpperCase() + i.slice(1)) - .join(""); -} -function x(t) { - const a = {}, - i = t.split(";"); - for (const r of i) { - const [e, f] = r.split(":"); - if (!e || f === void 0) break; - const n = st(e.trim()); - a[n] = f.trim(); - } - return a; -} -const ot = (t) => t; -function ht(t, a, i) { - var r = rt, - e, - f, - n, - o = null; - r.a ?? - (r.a = { - element: t, - measure() { - e = this.element.getBoundingClientRect(); - }, - apply() { - if ((n == null || n.abort(), (f = this.element.getBoundingClientRect()), e.left !== f.left || e.right !== f.right || e.top !== f.top || e.bottom !== f.bottom)) { - const v = a()(this.element, { from: e, to: f }, i == null ? void 0 : i()); - n = k(this.element, v, void 0, 1, () => { - n == null || n.abort(), (n = void 0); - }); - } - }, - fix() { - if (!t.getAnimations().length) { - var { position: v, width: h, height: c } = getComputedStyle(t); - if (v !== "absolute" && v !== "fixed") { - var u = t.style; - (o = { position: u.position, width: u.width, height: u.height, transform: u.transform }), (u.position = "absolute"), (u.width = h), (u.height = c); - var s = t.getBoundingClientRect(); - if (e.left !== s.left || e.top !== s.top) { - var d = `translate(${e.left - s.left}px, ${e.top - s.top}px)`; - u.transform = u.transform ? `${u.transform} ${d}` : d; - } - } - } - }, - unfix() { - if (o) { - var v = t.style; - (v.position = o.position), (v.width = o.width), (v.height = o.height), (v.transform = o.transform); - } - }, - }), - (r.a.element = t); -} -function lt(t, a, i, r) { - var e = (t & V) !== 0, - f = (t & tt) !== 0, - n = e && f, - o = (t & Q) !== 0, - v = n ? "both" : e ? "in" : "out", - h, - c = a.inert, - u = a.style.overflow, - s, - d; - function g() { - return S(() => h ?? (h = i()(a, (r == null ? void 0 : r()) ?? {}, { direction: v }))); - } - var l = { - is_global: o, - in() { - var _; - if (((a.inert = c), !e)) { - d == null || d.abort(), (_ = d == null ? void 0 : d.reset) == null || _.call(d); - return; - } - f || s == null || s.abort(), - E(a, "introstart"), - (s = k(a, g(), d, 1, () => { - E(a, "introend"), s == null || s.abort(), (s = h = void 0), (a.style.overflow = u); - })); - }, - out(_) { - if (!f) { - _ == null || _(), (h = void 0); - return; - } - (a.inert = !0), - E(a, "outrostart"), - (d = k(a, g(), s, 0, () => { - E(a, "outroend"), _ == null || _(); - })); - }, - stop: () => { - s == null || s.abort(), d == null || d.abort(); - }, - }, - p = G; - if (((p.transitions ?? (p.transitions = [])).push(l), e && et)) { - var m = o; - if (!m) { - for (var b = p.parent; b && (b.f & K) !== 0; ) for (; (b = b.parent) && (b.f & W) === 0; ); - m = !b || (b.f & X) !== 0; - } - m && - H(() => { - J(() => l.in()); - }); - } -} -function k(t, a, i, r, e) { - var f = r === 1; - if (at(a)) { - var n, - o = !1; - return ( - it(() => { - if (!o) { - var p = a({ direction: f ? "in" : "out" }); - n = k(t, p, i, r, e); - } - }), - { - abort: () => { - (o = !0), n == null || n.abort(); - }, - deactivate: () => n.deactivate(), - reset: () => n.reset(), - t: () => n.t(), - } - ); - } - if ((i == null || i.deactivate(), !(a != null && a.duration))) return e(), { abort: y, deactivate: y, reset: y, t: () => r }; - const { delay: v = 0, css: h, tick: c, easing: u = ot } = a; - var s = []; - if (f && i === void 0 && (c && c(0, 1), h)) { - var d = x(h(0, 1)); - s.push(d, d); - } - var g = () => 1 - r, - l = t.animate(s, { duration: v, fill: "forwards" }); - return ( - (l.onfinish = () => { - l.cancel(); - var p = (i == null ? void 0 : i.t()) ?? 1 - r; - i == null || i.abort(); - var m = r - p, - b = a.duration * Math.abs(m), - _ = []; - if (b > 0) { - var N = !1; - if (h) - for (var A = Math.ceil(b / 16.666666666666668), I = 0; I <= A; I += 1) { - var C = p + m * u(I / A), - R = x(h(C, 1 - C)); - _.push(R), N || (N = R.overflow === "hidden"); - } - N && (t.style.overflow = "hidden"), - (g = () => { - var T = l.currentTime; - return p + m * u(T / b); - }), - c && - ft(() => { - if (l.playState !== "running") return !1; - var T = g(); - return c(T, 1 - T), !0; - }); - } - (l = t.animate(_, { duration: b, fill: "forwards" })), - (l.onfinish = () => { - (g = () => r), c == null || c(r, 1 - r), e(); - }); - }), - { - abort: () => { - l && (l.cancel(), (l.effect = null), (l.onfinish = y)); - }, - deactivate: () => { - e = y; - }, - reset: () => { - r === 0 && (c == null || c(1, 0)); - }, - t: () => g(), - } - ); -} -export { ht as a, vt as k, lt as t }; diff --git a/frontend-backup/_app/immutable/chunks/BDALf20I.js b/frontend-backup/_app/immutable/chunks/BDALf20I.js deleted file mode 100644 index 9dddaf2..0000000 --- a/frontend-backup/_app/immutable/chunks/BDALf20I.js +++ /dev/null @@ -1,1717 +0,0 @@ -var gn = Object.defineProperty; -var Ee = (t) => { - throw TypeError(t); -}; -var bn = (t, e, n) => (e in t ? gn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : (t[e] = n)); -var kt = (t, e, n) => bn(t, typeof e != "symbol" ? e + "" : e, n), - Jt = (t, e, n) => e.has(t) || Ee("Cannot " + n); -var d = (t, e, n) => (Jt(t, e, "read from private field"), n ? n.call(t) : e.get(t)), - k = (t, e, n) => (e.has(t) ? Ee("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n)), - R = (t, e, n, r) => (Jt(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n), - Q = (t, e, n) => (Jt(t, e, "access private method"), n); -(function () { - try { - var t = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - t.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var t = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - e = new t.Error().stack; - e && ((t._sentryDebugIds = t._sentryDebugIds || {}), (t._sentryDebugIds[e] = "8e9f9117-ea4b-483f-a805-02a42b9e51e6"), (t._sentryDebugIdIdentifier = "sentry-dbid-8e9f9117-ea4b-483f-a805-02a42b9e51e6")); - })(); -} catch {} -const De = !1; -var Pe = Array.isArray, - En = Array.prototype.indexOf, - Tr = Array.from, - ee = Object.defineProperty, - Nt = Object.getOwnPropertyDescriptor, - mn = Object.getOwnPropertyDescriptors, - Tn = Object.prototype, - An = Array.prototype, - Me = Object.getPrototypeOf, - me = Object.isExtensible; -function Ar(t) { - return typeof t == "function"; -} -const kr = () => {}; -function xr(t) { - return t(); -} -function Le(t) { - for (var e = 0; e < t.length; e++) t[e](); -} -function kn() { - var t, - e, - n = new Promise((r, a) => { - (t = r), (e = a); - }); - return { promise: n, resolve: t, reject: e }; -} -function Sr(t, e) { - if (Array.isArray(t)) return t; - if (!(Symbol.iterator in t)) return Array.from(t); - const n = []; - for (const r of t) if ((n.push(r), n.length === e)) break; - return n; -} -const N = 2, - le = 4, - $t = 8, - mt = 16, - Y = 32, - ft = 64, - Fe = 128, - C = 256, - Ht = 512, - m = 1024, - D = 2048, - Z = 4096, - K = 8192, - Tt = 16384, - fe = 32768, - qe = 65536, - Te = 1 << 17, - xn = 1 << 18, - oe = 1 << 19, - je = 1 << 20, - ne = 1 << 21, - ce = 1 << 22, - at = 1 << 23, - st = Symbol("$state"), - Ir = Symbol("legacy props"), - Nr = Symbol(""), - _e = new (class extends Error { - constructor() { - super(...arguments); - kt(this, "name", "StaleReactionError"); - kt(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed"); - } - })(), - ve = 3, - de = 8; -function Sn() { - throw new Error("https://svelte.dev/e/await_outside_boundary"); -} -function In(t) { - throw new Error("https://svelte.dev/e/lifecycle_outside_component"); -} -function Nn() { - throw new Error("https://svelte.dev/e/async_derived_orphan"); -} -function Rn(t) { - throw new Error("https://svelte.dev/e/effect_in_teardown"); -} -function On() { - throw new Error("https://svelte.dev/e/effect_in_unowned_derived"); -} -function Cn(t) { - throw new Error("https://svelte.dev/e/effect_orphan"); -} -function Dn() { - throw new Error("https://svelte.dev/e/effect_update_depth_exceeded"); -} -function Or() { - throw new Error("https://svelte.dev/e/get_abort_signal_outside_reaction"); -} -function Cr() { - throw new Error("https://svelte.dev/e/hydration_failed"); -} -function Dr(t) { - throw new Error("https://svelte.dev/e/lifecycle_legacy_only"); -} -function Pr(t) { - throw new Error("https://svelte.dev/e/props_invalid_value"); -} -function Pn() { - throw new Error("https://svelte.dev/e/state_descriptors_fixed"); -} -function Mn() { - throw new Error("https://svelte.dev/e/state_prototype_fixed"); -} -function Ln() { - throw new Error("https://svelte.dev/e/state_unsafe_mutation"); -} -const Mr = 1, - Lr = 2, - Fr = 4, - qr = 8, - jr = 16, - Yr = 1, - Hr = 2, - Ur = 4, - Br = 8, - Vr = 16, - Wr = 1, - $r = 2, - Gr = 4, - Fn = 1, - qn = 2, - jn = "[", - Yn = "[!", - Hn = "]", - he = {}, - E = Symbol(), - Kr = "http://www.w3.org/1999/xhtml", - zr = "@attach"; -function pe(t) { - console.warn("https://svelte.dev/e/hydration_mismatch"); -} -function Xr() { - console.warn("https://svelte.dev/e/select_multiple_invalid_value"); -} -let S = !1; -function Zr(t) { - S = t; -} -let y; -function yt(t) { - if (t === null) throw (pe(), he); - return (y = t); -} -function Ye() { - return yt(ot(y)); -} -function Jr(t) { - if (S) { - if (ot(y) !== null) throw (pe(), he); - y = t; - } -} -function Qr(t = 1) { - if (S) { - for (var e = t, n = y; e--; ) n = ot(n); - y = n; - } -} -function ta() { - for (var t = 0, e = y; ; ) { - if (e.nodeType === de) { - var n = e.data; - if (n === Hn) { - if (t === 0) return e; - t -= 1; - } else (n === jn || n === Yn) && (t += 1); - } - var r = ot(e); - e.remove(), (e = r); - } -} -function ea(t) { - if (!t || t.nodeType !== de) throw (pe(), he); - return t.data; -} -function He(t) { - return t === this.v; -} -function Un(t, e) { - return t != t ? e == e : t !== e || (t !== null && typeof t == "object") || typeof t == "function"; -} -function na(t, e) { - return t !== e; -} -function Ue(t) { - return !Un(t, this.v); -} -let Gt = !1, - Bn = !1; -function ra() { - Gt = !0; -} -let g = null; -function Ut(t) { - g = t; -} -function aa(t) { - return Kt().get(t); -} -function sa(t, e) { - return Kt().set(t, e), e; -} -function ia(t) { - return Kt().has(t); -} -function ua() { - return Kt(); -} -function la(t, e = !1, n) { - g = { p: g, c: null, e: null, s: t, x: null, l: Gt && !e ? { s: null, u: null, $: [] } : null }; -} -function fa(t) { - var e = g, - n = e.e; - if (n !== null) { - e.e = null; - for (var r of n) an(r); - } - return t !== void 0 && (e.x = t), (g = e.p), t ?? {}; -} -function Ft() { - return !Gt || (g !== null && g.l === null); -} -function Kt(t) { - return g === null && In(), g.c ?? (g.c = new Map(Vn(g) || void 0)); -} -function Vn(t) { - let e = t.p; - for (; e !== null; ) { - const n = e.c; - if (n !== null) return n; - e = e.p; - } - return null; -} -const Wn = new WeakMap(); -function $n(t) { - var e = v; - if (e === null) return (_.f |= at), t; - if ((e.f & fe) === 0) { - if ((e.f & Fe) === 0) throw (!e.parent && t instanceof Error && Be(t), t); - e.b.error(t); - } else we(t, e); -} -function we(t, e) { - for (; e !== null; ) { - if ((e.f & Fe) !== 0) - try { - e.b.error(t); - return; - } catch (n) { - t = n; - } - e = e.parent; - } - throw (t instanceof Error && Be(t), t); -} -function Be(t) { - const e = Wn.get(t); - e && (ee(t, "message", { value: e.message }), ee(t, "stack", { value: e.stack })); -} -const Gn = typeof requestIdleCallback > "u" ? (t) => setTimeout(t, 1) : requestIdleCallback; -let Rt = [], - Ot = []; -function Ve() { - var t = Rt; - (Rt = []), Le(t); -} -function We() { - var t = Ot; - (Ot = []), Le(t); -} -function $e(t) { - Rt.length === 0 && queueMicrotask(Ve), Rt.push(t); -} -function oa(t) { - Ot.length === 0 && Gn(We), Ot.push(t); -} -function Kn() { - Rt.length > 0 && Ve(), Ot.length > 0 && We(); -} -function zn() { - for (var t = v.b; t !== null && !t.has_pending_snippet(); ) t = t.parent; - return t === null && Sn(), t; -} -function ye(t) { - var e = N | D, - n = _ !== null && (_.f & N) !== 0 ? _ : null; - return v === null || (n !== null && (n.f & C) !== 0) ? (e |= C) : (v.f |= oe), { ctx: g, deps: null, effects: null, equals: He, f: e, fn: t, reactions: null, rv: 0, v: E, wv: 0, parent: n ?? v, ac: null }; -} -function Xn(t, e) { - let n = v; - n === null && Nn(); - var r = n.b, - a = void 0, - s = be(E), - u = null, - l = !_; - return ( - ur(() => { - try { - var i = t(); - } catch (h) { - i = Promise.reject(h); - } - var f = () => i; - (a = (u == null ? void 0 : u.then(f, f)) ?? Promise.resolve(i)), (u = a); - var o = b, - c = r.pending; - l && (r.update_pending_count(1), c || o.increment()); - const w = (h, p = void 0) => { - (u = null), c || o.activate(), p ? p !== _e && ((s.f |= at), ie(s, p)) : ((s.f & at) !== 0 && (s.f ^= at), ie(s, h)), l && (r.update_pending_count(-1), c || o.decrement()), ze(); - }; - if ((a.then(w, (h) => w(null, h || "unknown")), o)) - return () => { - queueMicrotask(() => o.neuter()); - }; - }), - new Promise((i) => { - function f(o) { - function c() { - o === a ? i(s) : f(a); - } - o.then(c, c); - } - f(a); - }) - ); -} -function ca(t) { - const e = ye(t); - return cn(e), e; -} -function Zn(t) { - const e = ye(t); - return (e.equals = Ue), e; -} -function Ge(t) { - var e = t.effects; - if (e !== null) { - t.effects = null; - for (var n = 0; n < e.length; n += 1) lt(e[n]); - } -} -function Jn(t) { - for (var e = t.parent; e !== null; ) { - if ((e.f & N) === 0) return e; - e = e.parent; - } - return null; -} -function ge(t) { - var e, - n = v; - X(Jn(t)); - try { - Ge(t), (e = hn(t)); - } finally { - X(n); - } - return e; -} -function Ke(t) { - var e = ge(t); - if ((t.equals(e) || ((t.v = e), (t.wv = vn())), !At)) - if (W !== null) W.set(t, t.v); - else { - var n = ($ || (t.f & C) !== 0) && t.deps !== null ? Z : m; - x(t, n); - } -} -function Qn(t, e, n) { - const r = Ft() ? ye : Zn; - if (e.length === 0) { - n(t.map(r)); - return; - } - var a = b, - s = v, - u = tr(), - l = zn(); - Promise.all(e.map((i) => Xn(i))) - .then((i) => { - a == null || a.activate(), u(); - try { - n([...t.map(r), ...i]); - } catch (f) { - (s.f & Tt) === 0 && we(f, s); - } - a == null || a.deactivate(), ze(); - }) - .catch((i) => { - l.error(i); - }); -} -function tr() { - var t = v, - e = _, - n = g; - return function () { - X(t), F(e), Ut(n); - }; -} -function ze() { - X(null), F(null), Ut(null); -} -const xt = new Set(); -let b = null, - Qt = null, - W = null, - Ae = new Set(), - Bt = []; -function Xe() { - const t = Bt.shift(); - Bt.length > 0 && queueMicrotask(Xe), t(); -} -let ut = [], - zt = null, - re = !1, - jt = !1; -var dt, ht, B, Dt, Pt, nt, pt, rt, V, wt, Mt, Lt, L, Ze, Yt, ae; -const Wt = class Wt { - constructor() { - k(this, L); - kt(this, "current", new Map()); - k(this, dt, new Map()); - k(this, ht, new Set()); - k(this, B, 0); - k(this, Dt, null); - k(this, Pt, !1); - k(this, nt, []); - k(this, pt, []); - k(this, rt, []); - k(this, V, []); - k(this, wt, []); - k(this, Mt, []); - k(this, Lt, []); - kt(this, "skipped_effects", new Set()); - } - process(e) { - var s; - (ut = []), (Qt = null); - var n = null; - if (xt.size > 1) { - (n = new Map()), (W = new Map()); - for (const [u, l] of this.current) n.set(u, { v: u.v, wv: u.wv }), (u.v = l); - for (const u of xt) if (u !== this) for (const [l, i] of d(u, dt)) n.has(l) || (n.set(l, { v: l.v, wv: l.wv }), (l.v = i)); - } - for (const u of e) Q(this, L, Ze).call(this, u); - if (d(this, nt).length === 0 && d(this, B) === 0) { - Q(this, L, ae).call(this); - var r = d(this, rt), - a = d(this, V); - R(this, rt, []), R(this, V, []), R(this, wt, []), (Qt = b), (b = null), ke(r), ke(a), b === null ? (b = this) : xt.delete(this), (s = d(this, Dt)) == null || s.resolve(); - } else Q(this, L, Yt).call(this, d(this, rt)), Q(this, L, Yt).call(this, d(this, V)), Q(this, L, Yt).call(this, d(this, wt)); - if (n) { - for (const [u, { v: l, wv: i }] of n) u.wv <= i && (u.v = l); - W = null; - } - for (const u of d(this, nt)) vt(u); - for (const u of d(this, pt)) vt(u); - R(this, nt, []), R(this, pt, []); - } - capture(e, n) { - d(this, dt).has(e) || d(this, dt).set(e, n), this.current.set(e, e.v); - } - activate() { - b = this; - } - deactivate() { - (b = null), (Qt = null); - for (const e of Ae) if ((Ae.delete(e), e(), b !== null)) break; - } - neuter() { - R(this, Pt, !0); - } - flush() { - ut.length > 0 ? se() : Q(this, L, ae).call(this), b === this && (d(this, B) === 0 && xt.delete(this), this.deactivate()); - } - increment() { - R(this, B, d(this, B) + 1); - } - decrement() { - if ((R(this, B, d(this, B) - 1), d(this, B) === 0)) { - for (const e of d(this, Mt)) x(e, D), bt(e); - for (const e of d(this, Lt)) x(e, Z), bt(e); - R(this, rt, []), R(this, V, []), this.flush(); - } else this.deactivate(); - } - add_callback(e) { - d(this, ht).add(e); - } - settled() { - return (d(this, Dt) ?? R(this, Dt, kn())).promise; - } - static ensure() { - if (b === null) { - const e = (b = new Wt()); - xt.add(b), - jt || - Wt.enqueue(() => { - b === e && e.flush(); - }); - } - return b; - } - static enqueue(e) { - Bt.length === 0 && queueMicrotask(Xe), Bt.unshift(e); - } -}; -(dt = new WeakMap()), - (ht = new WeakMap()), - (B = new WeakMap()), - (Dt = new WeakMap()), - (Pt = new WeakMap()), - (nt = new WeakMap()), - (pt = new WeakMap()), - (rt = new WeakMap()), - (V = new WeakMap()), - (wt = new WeakMap()), - (Mt = new WeakMap()), - (Lt = new WeakMap()), - (L = new WeakSet()), - (Ze = function (e) { - var o; - e.f ^= m; - for (var n = e.first; n !== null; ) { - var r = n.f, - a = (r & (Y | ft)) !== 0, - s = a && (r & m) !== 0, - u = s || (r & K) !== 0 || this.skipped_effects.has(n); - if (!u && n.fn !== null) { - if (a) n.f ^= m; - else if ((r & le) !== 0) d(this, V).push(n); - else if ((r & m) === 0) - if ((r & ce) !== 0) { - var l = (o = n.b) != null && o.pending ? d(this, pt) : d(this, nt); - l.push(n); - } else Zt(n) && ((n.f & mt) !== 0 && d(this, wt).push(n), vt(n)); - var i = n.first; - if (i !== null) { - n = i; - continue; - } - } - var f = n.parent; - for (n = n.next; n === null && f !== null; ) (n = f.next), (f = f.parent); - } - }), - (Yt = function (e) { - for (const n of e) ((n.f & D) !== 0 ? d(this, Mt) : d(this, Lt)).push(n), x(n, m); - e.length = 0; - }), - (ae = function () { - if (!d(this, Pt)) for (const e of d(this, ht)) e(); - d(this, ht).clear(); - }); -let gt = Wt; -function er(t) { - var e = jt; - jt = !0; - try { - var n; - for (t && (se(), (n = t())); ; ) { - if ((Kn(), ut.length === 0 && (b == null || b.flush(), ut.length === 0))) return (zt = null), n; - se(); - } - } finally { - jt = e; - } -} -function se() { - var t = _t; - re = !0; - try { - var e = 0; - for (Ne(!0); ut.length > 0; ) { - var n = gt.ensure(); - if (e++ > 1e3) { - var r, a; - nr(); - } - n.process(ut), G.clear(); - } - } finally { - (re = !1), Ne(t), (zt = null); - } -} -function nr() { - try { - Dn(); - } catch (t) { - we(t, zt); - } -} -let et = null; -function ke(t) { - var e = t.length; - if (e !== 0) { - for (var n = 0; n < e; ) { - var r = t[n++]; - if ((r.f & (Tt | K)) === 0 && Zt(r) && ((et = []), vt(r), r.deps === null && r.first === null && r.nodes_start === null && (r.teardown === null && r.ac === null ? ln(r) : (r.fn = null)), et.length > 0)) { - G.clear(); - for (const a of et) vt(a); - et = []; - } - } - et = null; - } -} -function bt(t) { - for (var e = (zt = t); e.parent !== null; ) { - e = e.parent; - var n = e.f; - if (re && e === v && (n & mt) !== 0) return; - if ((n & (ft | Y)) !== 0) { - if ((n & m) === 0) return; - e.f ^= m; - } - } - ut.push(e); -} -const G = new Map(); -function be(t, e) { - var n = { f: 0, v: t, reactions: null, equals: He, rv: 0, wv: 0 }; - return n; -} -function U(t, e) { - const n = be(t); - return cn(n), n; -} -function _a(t, e = !1, n = !0) { - var a; - const r = be(t); - return e || (r.equals = Ue), Gt && n && g !== null && g.l !== null && ((a = g.l).s ?? (a.s = [])).push(r), r; -} -function tt(t, e, n = !1) { - _ !== null && (!M || (_.f & Te) !== 0) && Ft() && (_.f & (N | mt | ce | Te)) !== 0 && !(A != null && A.includes(t)) && Ln(); - let r = n ? St(e) : e; - return ie(t, r); -} -function ie(t, e) { - if (!t.equals(e)) { - var n = t.v; - At ? G.set(t, e) : G.set(t, n), (t.v = e); - var r = gt.ensure(); - r.capture(t, n), (t.f & N) !== 0 && ((t.f & D) !== 0 && ge(t), x(t, (t.f & C) === 0 ? m : Z)), (t.wv = vn()), Je(t, D), Ft() && v !== null && (v.f & m) !== 0 && (v.f & (Y | ft)) === 0 && (O === null ? _r([t]) : O.push(t)); - } - return e; -} -function te(t) { - tt(t, t.v + 1); -} -function Je(t, e) { - var n = t.reactions; - if (n !== null) - for (var r = Ft(), a = n.length, s = 0; s < a; s++) { - var u = n[s], - l = u.f; - if (!(!r && u === v)) { - var i = (l & D) === 0; - i && x(u, e), (l & N) !== 0 ? Je(u, Z) : i && ((l & mt) !== 0 && et !== null && et.push(u), bt(u)); - } - } -} -function St(t) { - if (typeof t != "object" || t === null || st in t) return t; - const e = Me(t); - if (e !== Tn && e !== An) return t; - var n = new Map(), - r = Pe(t), - a = U(0), - s = it, - u = (l) => { - if (it === s) return l(); - var i = _, - f = it; - F(null), Oe(s); - var o = l(); - return F(i), Oe(f), o; - }; - return ( - r && n.set("length", U(t.length)), - new Proxy(t, { - defineProperty(l, i, f) { - (!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) && Pn(); - var o = n.get(i); - return ( - o === void 0 - ? (o = u(() => { - var c = U(f.value); - return n.set(i, c), c; - })) - : tt(o, f.value, !0), - !0 - ); - }, - deleteProperty(l, i) { - var f = n.get(i); - if (f === void 0) { - if (i in l) { - const o = u(() => U(E)); - n.set(i, o), te(a); - } - } else tt(f, E), te(a); - return !0; - }, - get(l, i, f) { - var h; - if (i === st) return t; - var o = n.get(i), - c = i in l; - if ( - (o === void 0 && - (!c || ((h = Nt(l, i)) != null && h.writable)) && - ((o = u(() => { - var p = St(c ? l[i] : E), - P = U(p); - return P; - })), - n.set(i, o)), - o !== void 0) - ) { - var w = It(o); - return w === E ? void 0 : w; - } - return Reflect.get(l, i, f); - }, - getOwnPropertyDescriptor(l, i) { - var f = Reflect.getOwnPropertyDescriptor(l, i); - if (f && "value" in f) { - var o = n.get(i); - o && (f.value = It(o)); - } else if (f === void 0) { - var c = n.get(i), - w = c == null ? void 0 : c.v; - if (c !== void 0 && w !== E) return { enumerable: !0, configurable: !0, value: w, writable: !0 }; - } - return f; - }, - has(l, i) { - var w; - if (i === st) return !0; - var f = n.get(i), - o = (f !== void 0 && f.v !== E) || Reflect.has(l, i); - if (f !== void 0 || (v !== null && (!o || ((w = Nt(l, i)) != null && w.writable)))) { - f === void 0 && - ((f = u(() => { - var h = o ? St(l[i]) : E, - p = U(h); - return p; - })), - n.set(i, f)); - var c = It(f); - if (c === E) return !1; - } - return o; - }, - set(l, i, f, o) { - var J; - var c = n.get(i), - w = i in l; - if (r && i === "length") - for (var h = f; h < c.v; h += 1) { - var p = n.get(h + ""); - p !== void 0 ? tt(p, E) : h in l && ((p = u(() => U(E))), n.set(h + "", p)); - } - if (c === void 0) (!w || ((J = Nt(l, i)) != null && J.writable)) && ((c = u(() => U(void 0))), tt(c, St(f)), n.set(i, c)); - else { - w = c.v !== E; - var P = u(() => St(f)); - tt(c, P); - } - var H = Reflect.getOwnPropertyDescriptor(l, i); - if ((H != null && H.set && H.set.call(o, f), !w)) { - if (r && typeof i == "string") { - var qt = n.get("length"), - ct = Number(i); - Number.isInteger(ct) && ct >= qt.v && tt(qt, ct + 1); - } - te(a); - } - return !0; - }, - ownKeys(l) { - It(a); - var i = Reflect.ownKeys(l).filter((c) => { - var w = n.get(c); - return w === void 0 || w.v !== E; - }); - for (var [f, o] of n) o.v !== E && !(f in l) && i.push(f); - return i; - }, - setPrototypeOf() { - Mn(); - }, - }) - ); -} -function xe(t) { - try { - if (t !== null && typeof t == "object" && st in t) return t[st]; - } catch {} - return t; -} -function va(t, e) { - return Object.is(xe(t), xe(e)); -} -var Se, rr, Qe, tn, en; -function da() { - if (Se === void 0) { - (Se = window), (rr = document), (Qe = /Firefox/.test(navigator.userAgent)); - var t = Element.prototype, - e = Node.prototype, - n = Text.prototype; - (tn = Nt(e, "firstChild").get), (en = Nt(e, "nextSibling").get), me(t) && ((t.__click = void 0), (t.__className = void 0), (t.__attributes = null), (t.__style = void 0), (t.__e = void 0)), me(n) && (n.__t = void 0); - } -} -function Et(t = "") { - return document.createTextNode(t); -} -function z(t) { - return tn.call(t); -} -function ot(t) { - return en.call(t); -} -function ha(t, e) { - if (!S) return z(t); - var n = z(y); - if (n === null) n = y.appendChild(Et()); - else if (e && n.nodeType !== ve) { - var r = Et(); - return n == null || n.before(r), yt(r), r; - } - return yt(n), n; -} -function pa(t, e) { - if (!S) { - var n = z(t); - return n instanceof Comment && n.data === "" ? ot(n) : n; - } - return y; -} -function wa(t, e = 1, n = !1) { - let r = S ? y : t; - for (var a; e--; ) (a = r), (r = ot(r)); - if (!S) return r; - if (n && (r == null ? void 0 : r.nodeType) !== ve) { - var s = Et(); - return r === null ? a == null || a.after(s) : r.before(s), yt(s), s; - } - return yt(r), r; -} -function ar(t) { - t.textContent = ""; -} -function ya() { - return !1; -} -function ga(t, e) { - if (e) { - const n = document.body; - (t.autofocus = !0), - $e(() => { - document.activeElement === n && t.focus(); - }); - } -} -function ba(t) { - S && z(t) !== null && ar(t); -} -let Ie = !1; -function sr() { - Ie || - ((Ie = !0), - document.addEventListener( - "reset", - (t) => { - Promise.resolve().then(() => { - var e; - if (!t.defaultPrevented) for (const n of t.target.elements) (e = n.__on_r) == null || e.call(n); - }); - }, - { capture: !0 } - )); -} -function Ea(t, e, n, r = !0) { - r && n(); - for (var a of e) t.addEventListener(a, n); - rn(() => { - for (var s of e) t.removeEventListener(s, n); - }); -} -function Xt(t) { - var e = _, - n = v; - F(null), X(null); - try { - return t(); - } finally { - F(e), X(n); - } -} -function ma(t, e, n, r = n) { - t.addEventListener(e, () => Xt(n)); - const a = t.__on_r; - a - ? (t.__on_r = () => { - a(), r(!0); - }) - : (t.__on_r = () => r(!0)), - sr(); -} -function nn(t) { - v === null && _ === null && Cn(), _ !== null && (_.f & C) !== 0 && v === null && On(), At && Rn(); -} -function ir(t, e) { - var n = e.last; - n === null ? (e.last = e.first = t) : ((n.next = t), (t.prev = n), (e.last = t)); -} -function q(t, e, n, r = !0) { - var a = v; - a !== null && (a.f & K) !== 0 && (t |= K); - var s = { ctx: g, deps: null, nodes_start: null, nodes_end: null, f: t | D, first: null, fn: e, last: null, next: null, parent: a, b: a && a.b, prev: null, teardown: null, transitions: null, wv: 0, ac: null }; - if (n) - try { - vt(s), (s.f |= fe); - } catch (i) { - throw (lt(s), i); - } - else e !== null && bt(s); - var u = n && s.deps === null && s.first === null && s.nodes_start === null && s.teardown === null && (s.f & oe) === 0; - if (!u && r && (a !== null && ir(s, a), _ !== null && (_.f & N) !== 0 && (t & ft) === 0)) { - var l = _; - (l.effects ?? (l.effects = [])).push(s); - } - return s; -} -function Ta() { - return _ !== null && !M; -} -function rn(t) { - const e = q($t, null, !1); - return x(e, m), (e.teardown = t), e; -} -function Aa(t) { - nn(); - var e = v.f, - n = !_ && (e & Y) !== 0 && (e & fe) === 0; - if (n) { - var r = g; - (r.e ?? (r.e = [])).push(t); - } else return an(t); -} -function an(t) { - return q(le | je, t, !1); -} -function ka(t) { - return nn(), q($t | je, t, !0); -} -function xa(t) { - gt.ensure(); - const e = q(ft, t, !0); - return (n = {}) => - new Promise((r) => { - n.outro - ? or(e, () => { - lt(e), r(void 0); - }) - : (lt(e), r(void 0)); - }); -} -function Sa(t) { - return q(le, t, !1); -} -function ur(t) { - return q(ce | oe, t, !0); -} -function Ia(t, e = 0) { - return q($t | e, t, !0); -} -function Na(t, e = [], n = []) { - Qn(e, n, (r) => { - q($t, () => t(...r.map(It)), !0); - }); -} -function Ra(t, e = 0) { - var n = q(mt | e, t, !0); - return n; -} -function Oa(t, e = !0) { - return q(Y, t, !0, e); -} -function sn(t) { - var e = t.teardown; - if (e !== null) { - const n = At, - r = _; - Re(!0), F(null); - try { - e.call(null); - } finally { - Re(n), F(r); - } - } -} -function un(t, e = !1) { - var n = t.first; - for (t.first = t.last = null; n !== null; ) { - const a = n.ac; - a !== null && - Xt(() => { - a.abort(_e); - }); - var r = n.next; - (n.f & ft) !== 0 ? (n.parent = null) : lt(n, e), (n = r); - } -} -function lr(t) { - for (var e = t.first; e !== null; ) { - var n = e.next; - (e.f & Y) === 0 && lt(e), (e = n); - } -} -function lt(t, e = !0) { - var n = !1; - (e || (t.f & xn) !== 0) && t.nodes_start !== null && t.nodes_end !== null && (fr(t.nodes_start, t.nodes_end), (n = !0)), un(t, e && !n), Vt(t, 0), x(t, Tt); - var r = t.transitions; - if (r !== null) for (const s of r) s.stop(); - sn(t); - var a = t.parent; - a !== null && a.first !== null && ln(t), (t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes_start = t.nodes_end = t.ac = null); -} -function fr(t, e) { - for (; t !== null; ) { - var n = t === e ? null : ot(t); - t.remove(), (t = n); - } -} -function ln(t) { - var e = t.parent, - n = t.prev, - r = t.next; - n !== null && (n.next = r), r !== null && (r.prev = n), e !== null && (e.first === t && (e.first = r), e.last === t && (e.last = n)); -} -function or(t, e) { - var n = []; - fn(t, n, !0), - cr(n, () => { - lt(t), e && e(); - }); -} -function cr(t, e) { - var n = t.length; - if (n > 0) { - var r = () => --n || e(); - for (var a of t) a.out(r); - } else e(); -} -function fn(t, e, n) { - if ((t.f & K) === 0) { - if (((t.f ^= K), t.transitions !== null)) for (const u of t.transitions) (u.is_global || n) && e.push(u); - for (var r = t.first; r !== null; ) { - var a = r.next, - s = (r.f & qe) !== 0 || (r.f & Y) !== 0; - fn(r, e, s ? n : !1), (r = a); - } - } -} -function Ca(t) { - on(t, !0); -} -function on(t, e) { - if ((t.f & K) !== 0) { - (t.f ^= K), (t.f & m) === 0 && (x(t, D), bt(t)); - for (var n = t.first; n !== null; ) { - var r = n.next, - a = (n.f & qe) !== 0 || (n.f & Y) !== 0; - on(n, a ? e : !1), (n = r); - } - if (t.transitions !== null) for (const s of t.transitions) (s.is_global || e) && s.in(); - } -} -let _t = !1; -function Ne(t) { - _t = t; -} -let At = !1; -function Re(t) { - At = t; -} -let _ = null, - M = !1; -function F(t) { - _ = t; -} -let v = null; -function X(t) { - v = t; -} -let A = null; -function cn(t) { - _ !== null && (A === null ? (A = [t]) : A.push(t)); -} -let T = null, - I = 0, - O = null; -function _r(t) { - O = t; -} -let _n = 1, - Ct = 0, - it = Ct; -function Oe(t) { - it = t; -} -let $ = !1; -function vn() { - return ++_n; -} -function Zt(t) { - var c; - var e = t.f; - if ((e & D) !== 0) return !0; - if ((e & Z) !== 0) { - var n = t.deps, - r = (e & C) !== 0; - if (n !== null) { - var a, - s, - u = (e & Ht) !== 0, - l = r && v !== null && !$, - i = n.length; - if ((u || l) && (v === null || (v.f & Tt) === 0)) { - var f = t, - o = f.parent; - for (a = 0; a < i; a++) (s = n[a]), (u || !((c = s == null ? void 0 : s.reactions) != null && c.includes(f))) && (s.reactions ?? (s.reactions = [])).push(f); - u && (f.f ^= Ht), l && o !== null && (o.f & C) === 0 && (f.f ^= C); - } - for (a = 0; a < i; a++) if (((s = n[a]), Zt(s) && Ke(s), s.wv > t.wv)) return !0; - } - (!r || (v !== null && !$)) && x(t, m); - } - return !1; -} -function dn(t, e, n = !0) { - var r = t.reactions; - if (r !== null && !(A != null && A.includes(t))) - for (var a = 0; a < r.length; a++) { - var s = r[a]; - (s.f & N) !== 0 ? dn(s, e, !1) : e === s && (n ? x(s, D) : (s.f & m) !== 0 && x(s, Z), bt(s)); - } -} -function hn(t) { - var P; - var e = T, - n = I, - r = O, - a = _, - s = $, - u = A, - l = g, - i = M, - f = it, - o = t.f; - (T = null), - (I = 0), - (O = null), - ($ = (o & C) !== 0 && (M || !_t || _ === null)), - (_ = (o & (Y | ft)) === 0 ? t : null), - (A = null), - Ut(t.ctx), - (M = !1), - (it = ++Ct), - t.ac !== null && - (Xt(() => { - t.ac.abort(_e); - }), - (t.ac = null)); - try { - t.f |= ne; - var c = t.fn, - w = c(), - h = t.deps; - if (T !== null) { - var p; - if ((Vt(t, I), h !== null && I > 0)) for (h.length = I + T.length, p = 0; p < T.length; p++) h[I + p] = T[p]; - else t.deps = h = T; - if (!$ || ((o & N) !== 0 && t.reactions !== null)) for (p = I; p < h.length; p++) ((P = h[p]).reactions ?? (P.reactions = [])).push(t); - } else h !== null && I < h.length && (Vt(t, I), (h.length = I)); - if (Ft() && O !== null && !M && h !== null && (t.f & (N | Z | D)) === 0) for (p = 0; p < O.length; p++) dn(O[p], t); - return a !== null && a !== t && (Ct++, O !== null && (r === null ? (r = O) : r.push(...O))), (t.f & at) !== 0 && (t.f ^= at), w; - } catch (H) { - return $n(H); - } finally { - (t.f ^= ne), (T = e), (I = n), (O = r), (_ = a), ($ = s), (A = u), Ut(l), (M = i), (it = f); - } -} -function vr(t, e) { - let n = e.reactions; - if (n !== null) { - var r = En.call(n, t); - if (r !== -1) { - var a = n.length - 1; - a === 0 ? (n = e.reactions = null) : ((n[r] = n[a]), n.pop()); - } - } - n === null && (e.f & N) !== 0 && (T === null || !T.includes(e)) && (x(e, Z), (e.f & (C | Ht)) === 0 && (e.f ^= Ht), Ge(e), Vt(e, 0)); -} -function Vt(t, e) { - var n = t.deps; - if (n !== null) for (var r = e; r < n.length; r++) vr(t, n[r]); -} -function vt(t) { - var e = t.f; - if ((e & Tt) === 0) { - x(t, m); - var n = v, - r = _t; - (v = t), (_t = !0); - try { - (e & mt) !== 0 ? lr(t) : un(t), sn(t); - var a = hn(t); - (t.teardown = typeof a == "function" ? a : null), (t.wv = _n); - var s; - De && Bn && (t.f & D) !== 0 && t.deps; - } finally { - (_t = r), (v = n); - } - } -} -async function Da() { - await Promise.resolve(), er(); -} -function Pa() { - return gt.ensure().settled(); -} -function It(t) { - var e = t.f, - n = (e & N) !== 0; - if (_ !== null && !M) { - var r = v !== null && (v.f & Tt) !== 0; - if (!r && !(A != null && A.includes(t))) { - var a = _.deps; - if ((_.f & ne) !== 0) t.rv < Ct && ((t.rv = Ct), T === null && a !== null && a[I] === t ? I++ : T === null ? (T = [t]) : (!$ || !T.includes(t)) && T.push(t)); - else { - (_.deps ?? (_.deps = [])).push(t); - var s = t.reactions; - s === null ? (t.reactions = [_]) : s.includes(_) || s.push(_); - } - } - } else if (n && t.deps === null && t.effects === null) { - var u = t, - l = u.parent; - l !== null && (l.f & C) === 0 && (u.f ^= C); - } - if (At) { - if (G.has(t)) return G.get(t); - if (n) { - u = t; - var i = u.v; - return (((u.f & m) === 0 && u.reactions !== null) || pn(u)) && (i = ge(u)), G.set(u, i), i; - } - } else if (n) { - if (((u = t), W != null && W.has(u))) return W.get(u); - Zt(u) && Ke(u); - } - if ((t.f & at) !== 0) throw t.v; - return t.v; -} -function pn(t) { - if (t.v === E) return !0; - if (t.deps === null) return !1; - for (const e of t.deps) if (G.has(e) || ((e.f & N) !== 0 && pn(e))) return !0; - return !1; -} -function Ma(t) { - var e = M; - try { - return (M = !0), t(); - } finally { - M = e; - } -} -const dr = -7169; -function x(t, e) { - t.f = (t.f & dr) | e; -} -function La(t) { - if (!(typeof t != "object" || !t || t instanceof EventTarget)) { - if (st in t) ue(t); - else if (!Array.isArray(t)) - for (let e in t) { - const n = t[e]; - typeof n == "object" && n && st in n && ue(n); - } - } -} -function ue(t, e = new Set()) { - if (typeof t == "object" && t !== null && !(t instanceof EventTarget) && !e.has(t)) { - e.add(t), t instanceof Date && t.getTime(); - for (let r in t) - try { - ue(t[r], e); - } catch {} - const n = Me(t); - if (n !== Object.prototype && n !== Array.prototype && n !== Map.prototype && n !== Set.prototype && n !== Date.prototype) { - const r = mn(n); - for (let a in r) { - const s = r[a].get; - if (s) - try { - s.call(t); - } catch {} - } - } - } -} -function Fa(t) { - return t.endsWith("capture") && t !== "gotpointercapture" && t !== "lostpointercapture"; -} -const hr = [ - "beforeinput", - "click", - "change", - "dblclick", - "contextmenu", - "focusin", - "focusout", - "input", - "keydown", - "keyup", - "mousedown", - "mousemove", - "mouseout", - "mouseover", - "mouseup", - "pointerdown", - "pointermove", - "pointerout", - "pointerover", - "pointerup", - "touchend", - "touchmove", - "touchstart", -]; -function qa(t) { - return hr.includes(t); -} -const pr = { - formnovalidate: "formNoValidate", - ismap: "isMap", - nomodule: "noModule", - playsinline: "playsInline", - readonly: "readOnly", - defaultvalue: "defaultValue", - defaultchecked: "defaultChecked", - srcobject: "srcObject", - novalidate: "noValidate", - allowfullscreen: "allowFullscreen", - disablepictureinpicture: "disablePictureInPicture", - disableremoteplayback: "disableRemotePlayback", -}; -function ja(t) { - return (t = t.toLowerCase()), pr[t] ?? t; -} -const wr = ["touchstart", "touchmove"]; -function Ya(t) { - return wr.includes(t); -} -const yr = new Set(), - gr = new Set(); -function wn(t, e, n, r = {}) { - function a(s) { - if ((r.capture || br.call(e, s), !s.cancelBubble)) return Xt(() => (n == null ? void 0 : n.call(this, s))); - } - return ( - t.startsWith("pointer") || t.startsWith("touch") || t === "wheel" - ? $e(() => { - e.addEventListener(t, a, r); - }) - : e.addEventListener(t, a, r), - a - ); -} -function Ha(t, e, n, r = {}) { - var a = wn(e, t, n, r); - return () => { - t.removeEventListener(e, a, r); - }; -} -function Ua(t, e, n, r, a) { - var s = { capture: r, passive: a }, - u = wn(t, e, n, s); - (e === document.body || e === window || e === document || e instanceof HTMLMediaElement) && - rn(() => { - e.removeEventListener(t, u, s); - }); -} -function Ba(t) { - for (var e = 0; e < t.length; e++) yr.add(t[e]); - for (var n of gr) n(t); -} -let Ce = null; -function br(t) { - var ct; - var e = this, - n = e.ownerDocument, - r = t.type, - a = ((ct = t.composedPath) == null ? void 0 : ct.call(t)) || [], - s = a[0] || t.target; - Ce = t; - var u = 0, - l = Ce === t && t.__root; - if (l) { - var i = a.indexOf(l); - if (i !== -1 && (e === document || e === window)) { - t.__root = e; - return; - } - var f = a.indexOf(e); - if (f === -1) return; - i <= f && (u = i); - } - if (((s = a[u] || t.target), s !== e)) { - ee(t, "currentTarget", { - configurable: !0, - get() { - return s || n; - }, - }); - var o = _, - c = v; - F(null), X(null); - try { - for (var w, h = []; s !== null; ) { - var p = s.assignedSlot || s.parentNode || s.host || null; - try { - var P = s["__" + r]; - if (P != null && (!s.disabled || t.target === s)) - if (Pe(P)) { - var [H, ...qt] = P; - H.apply(s, [t, ...qt]); - } else P.call(s, t); - } catch (J) { - w ? h.push(J) : (w = J); - } - if (t.cancelBubble || p === e || p === null) break; - s = p; - } - if (w) { - for (let J of h) - queueMicrotask(() => { - throw J; - }); - throw w; - } - } finally { - (t.__root = e), delete t.currentTarget, F(o), X(c); - } - } -} -function yn(t) { - var e = document.createElement("template"); - return (e.innerHTML = t.replaceAll("", "")), e.content; -} -function j(t, e) { - var n = v; - n.nodes_start === null && ((n.nodes_start = t), (n.nodes_end = e)); -} -function Va(t, e) { - var n = (e & Fn) !== 0, - r = (e & qn) !== 0, - a, - s = !t.startsWith(""); - return () => { - if (S) return j(y, null), y; - a === void 0 && ((a = yn(s ? t : "" + t)), n || (a = z(a))); - var u = r || Qe ? document.importNode(a, !0) : a.cloneNode(!0); - if (n) { - var l = z(u), - i = u.lastChild; - j(l, i); - } else j(u, u); - return u; - }; -} -function Er(t, e, n = "svg") { - var r = !t.startsWith(""), - a = `<${n}>${r ? t : "" + t}`, - s; - return () => { - if (S) return j(y, null), y; - if (!s) { - var u = yn(a), - l = z(u); - s = z(l); - } - var i = s.cloneNode(!0); - return j(i, i), i; - }; -} -function Wa(t, e) { - return Er(t, e, "svg"); -} -function $a(t = "") { - if (!S) { - var e = Et(t + ""); - return j(e, e), e; - } - var n = y; - return n.nodeType !== ve && (n.before((n = Et())), yt(n)), j(n, n), n; -} -function Ga() { - if (S) return j(y, null), y; - var t = document.createDocumentFragment(), - e = document.createComment(""), - n = Et(); - return t.append(e, n), j(e, n), t; -} -function Ka(t, e) { - if (S) { - (v.nodes_end = y), Ye(); - return; - } - t !== null && t.before(e); -} -function za() { - var t, e; - if (S && y && y.nodeType === de && (t = y.textContent) != null && t.startsWith("#")) { - const n = y.textContent.substring(1); - return Ye(), n; - } - return (e = window.__svelte ?? (window.__svelte = {})).uid ?? (e.uid = 1), `c${window.__svelte.uid++}`; -} -export { - rr as $, - xr as A, - Le as B, - La as C, - ye as D, - qe as E, - Ft as F, - ma as G, - Ia as H, - Qt as I, - va as J, - rn as K, - $e as L, - Sa as M, - Fr as N, - yt as O, - z as P, - Zn as Q, - ea as R, - st as S, - Yn as T, - ta as U, - Zr as V, - de as W, - Hn as X, - Mr as Y, - Lr as Z, - ie as _, - pa as a, - fe as a$, - _a as a0, - be as a1, - Tr as a2, - Pe as a3, - Ca as a4, - jr as a5, - K as a6, - lt as a7, - qr as a8, - ot as a9, - In as aA, - _ as aB, - Or as aC, - Dr as aD, - Gt as aE, - er as aF, - ua as aG, - aa as aH, - ia as aI, - sa as aJ, - Pa as aK, - Da as aL, - E as aM, - Nt as aN, - Pr as aO, - Ur as aP, - At as aQ, - Tt as aR, - Br as aS, - Hr as aT, - Yr as aU, - Vr as aV, - Ir as aW, - Ar as aX, - na as aY, - Un as aZ, - mt as a_, - fn as aa, - ar as ab, - cr as ac, - v as ad, - fr as ae, - pe as af, - he as ag, - j as ah, - yn as ai, - da as aj, - jn as ak, - Cr as al, - yr as am, - gr as an, - xa as ao, - br as ap, - Ya as aq, - ra as ar, - xn as as, - Ba as at, - U as au, - St as av, - tt as aw, - Ua as ax, - Ga as ay, - kr as az, - Ka as b, - Gr as b0, - Wr as b1, - $r as b2, - Xt as b3, - $a as b4, - Xr as b5, - Qn as b6, - Kr as b7, - Me as b8, - Nr as b9, - zr as ba, - mn as bb, - Fa as bc, - wn as bd, - ga as be, - ja as bf, - oa as bg, - sr as bh, - qa as bi, - ba as bj, - Ta as bk, - te as bl, - Se as bm, - Ha as bn, - ee as bo, - Tn as bp, - Ea as bq, - De as br, - za as bs, - Sr as bt, - fa as c, - ha as d, - Ye as e, - Va as f, - It as g, - S as h, - Ra as i, - Et as j, - Oa as k, - b as l, - ya as m, - Qr as n, - y as o, - la as p, - or as q, - Jr as r, - wa as s, - Na as t, - ca as u, - Wa as v, - g as w, - ka as x, - Aa as y, - Ma as z, -}; diff --git a/frontend-backup/_app/immutable/chunks/BF50aS-j.js b/frontend-backup/_app/immutable/chunks/BF50aS-j.js new file mode 100644 index 0000000..44ea72b --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/BF50aS-j.js @@ -0,0 +1,261 @@ +import { + i as x, + h as I, + e as L, + E as Y, + Q as U, + R as j, + S as B, + N as M, + T as D, + j as q, + k as O, + l as C, + aM as F, + m as K, + a2 as z, + q as Q, + o as Z, + aN as m, + aO as $, + aP as G, + g as T, + D as H, + P as V, + av as W, + aw as X, + aQ as J, + ab as k, + aR as ee, + aS as re, + z as ne, + aE as te, + aT as ae, + aU as se, + aV as ie, + ad as A, + aW as N, + aX as y, +} from "./CMvZtFtm.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + r = new e.Error().stack; + r && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[r] = "fa4d28dc-79ce-49af-88f2-dcb89d2725c4"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-fa4d28dc-79ce-49af-88f2-dcb89d2725c4")); + })(); +} catch {} +function oe(e, r, t = !1) { + I && L(); + var n = e, + a = null, + f = null, + l = F, + c = t ? Y : 0, + p = !1; + const S = (d, i = !0) => { + (p = !0), _(i, d); + }; + var u = null; + function w() { + u !== null && (u.lastChild.remove(), n.before(u), (u = null)); + var d = l ? a : f, + i = l ? f : a; + d && z(d), + i && + Q(i, () => { + l ? (f = null) : (a = null); + }); + } + const _ = (d, i) => { + if (l === (l = d)) return; + let E = !1; + if (I) { + const b = U(n) === j; + !!l === b && ((n = B()), M(n), D(!1), (E = !0)); + } + var v = K(), + o = n; + if ( + (v && ((u = document.createDocumentFragment()), u.append((o = q()))), + l ? a ?? (a = i && O(() => i(o))) : f ?? (f = i && O(() => i(o))), + v) + ) { + var h = C, + g = l ? a : f, + s = l ? f : a; + g && h.skipped_effects.delete(g), + s && h.skipped_effects.add(s), + h.add_callback(w); + } else w(); + E && D(!0); + }; + x(() => { + (p = !1), r(S), p || _(null, null); + }, c), + I && (n = Z); +} +let P = !1; +function fe(e) { + var r = P; + try { + return (P = !1), [e(), P]; + } finally { + P = r; + } +} +function ce(e, r = 1) { + const t = e(); + return e(t + r), t; +} +const ue = { + get(e, r) { + if (!e.exclude.includes(r)) return e.props[r]; + }, + set(e, r) { + return !1; + }, + getOwnPropertyDescriptor(e, r) { + if (!e.exclude.includes(r) && r in e.props) + return { enumerable: !0, configurable: !0, value: e.props[r] }; + }, + has(e, r) { + return e.exclude.includes(r) ? !1 : r in e.props; + }, + ownKeys(e) { + return Reflect.ownKeys(e.props).filter((r) => !e.exclude.includes(r)); + }, +}; +function _e(e, r, t) { + return new Proxy({ props: e, exclude: r }, ue); +} +const le = { + get(e, r) { + let t = e.props.length; + for (; t--; ) { + let n = e.props[t]; + if ((y(n) && (n = n()), typeof n == "object" && n !== null && r in n)) + return n[r]; + } + }, + set(e, r, t) { + let n = e.props.length; + for (; n--; ) { + let a = e.props[n]; + y(a) && (a = a()); + const f = m(a, r); + if (f && f.set) return f.set(t), !0; + } + return !1; + }, + getOwnPropertyDescriptor(e, r) { + let t = e.props.length; + for (; t--; ) { + let n = e.props[t]; + if ((y(n) && (n = n()), typeof n == "object" && n !== null && r in n)) { + const a = m(n, r); + return a && !a.configurable && (a.configurable = !0), a; + } + } + }, + has(e, r) { + if (r === A || r === N) return !1; + for (let t of e.props) + if ((y(t) && (t = t()), t != null && r in t)) return !0; + return !1; + }, + ownKeys(e) { + const r = []; + for (let t of e.props) + if ((y(t) && (t = t()), !!t)) { + for (const n in t) r.includes(n) || r.push(n); + for (const n of Object.getOwnPropertySymbols(t)) + r.includes(n) || r.push(n); + } + return r; + }, +}; +function pe(...e) { + return new Proxy({ props: e }, le); +} +function ve(e, r, t, n) { + var g; + var a = !te || (t & ae) !== 0, + f = (t & re) !== 0, + l = (t & ie) !== 0, + c = n, + p = !0, + S = () => (p && ((p = !1), (c = l ? ne(n) : n)), c), + u; + if (f) { + var w = A in e || N in e; + u = + ((g = m(e, r)) == null ? void 0 : g.set) ?? + (w && r in e ? (s) => (e[r] = s) : void 0); + } + var _, + d = !1; + f ? ([_, d] = fe(() => e[r])) : (_ = e[r]), + _ === void 0 && n !== void 0 && ((_ = S()), u && (a && $(), u(_))); + var i; + if ( + (a + ? (i = () => { + var s = e[r]; + return s === void 0 ? S() : ((p = !0), s); + }) + : (i = () => { + var s = e[r]; + return s !== void 0 && (c = void 0), s === void 0 ? c : s; + }), + a && (t & G) === 0) + ) + return i; + if (u) { + var E = e.$$legacy; + return function (s, b) { + return arguments.length > 0 + ? ((!a || !b || E || d) && u(b ? i() : s), s) + : i(); + }; + } + var v = !1, + o = ((t & se) !== 0 ? H : V)(() => ((v = !1), i())); + f && T(o); + var h = k; + return function (s, b) { + if (arguments.length > 0) { + const R = b ? T(o) : a && f ? W(s) : s; + return X(o, R), (v = !0), c !== void 0 && (c = R), s; + } + return (J && v) || (h.f & ee) !== 0 ? o.v : T(o); + }; +} +export { oe as i, ve as p, _e as r, pe as s, ce as u }; diff --git a/frontend-backup/_app/immutable/chunks/BFFUopoM.js b/frontend-backup/_app/immutable/chunks/BFFUopoM.js new file mode 100644 index 0000000..46fba18 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/BFFUopoM.js @@ -0,0 +1,43 @@ +import { g as o } from "./CV9xcpLq.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + n = new e.Error().stack; + n && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[n] = "a22836e1-99fe-4372-8041-51d766e562e7"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-a22836e1-99fe-4372-8041-51d766e562e7")); + })(); +} catch {} +const t = () => "Search", + d = () => "Buscar", + c = (e = {}, n = {}) => ((n.locale ?? o()) === "en" ? t() : d()), + a = () => "Load more", + l = () => "Carregar mais", + f = (e = {}, n = {}) => ((n.locale ?? o()) === "en" ? a() : l()); +export { f as l, c as s }; diff --git a/frontend-backup/_app/immutable/chunks/BHI5vujT.js b/frontend-backup/_app/immutable/chunks/BHI5vujT.js new file mode 100644 index 0000000..4f686ba --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/BHI5vujT.js @@ -0,0 +1,40 @@ +import { g as d } from "./CV9xcpLq.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + n = new e.Error().stack; + n && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[n] = "a102ee55-05cc-4e26-9c0a-bd1623e19f6f"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-a102ee55-05cc-4e26-9c0a-bd1623e19f6f")); + })(); +} catch {} +const o = () => "Loading...", + t = () => "Carregando...", + a = (e = {}, n = {}) => ((n.locale ?? d()) === "en" ? o() : t()); +export { a as l }; diff --git a/frontend-backup/_app/immutable/chunks/BHr_eBwR.js b/frontend-backup/_app/immutable/chunks/BHr_eBwR.js deleted file mode 100644 index 828f24c..0000000 --- a/frontend-backup/_app/immutable/chunks/BHr_eBwR.js +++ /dev/null @@ -1 +0,0 @@ -import"./B2cHk4HI.js";import{M as ce,z as se,H as oe,C as de,aZ as fe,p as W,aw as M,au as U,ay as ue,a as X,g as v,b as w,c as p,f as V,t as j,u as $,v as ee,av as ve,d,r as f,s as u}from"./BDALf20I.js";import{s as y}from"./4k6DpCgf.js";import{p as c,i as B,r as te}from"./Bke_korE.js";import{a as A,c as G,b as ae,s as Z}from"./BNZUboE0.js";import{b as me}from"./BrZ10JY-.js";import{g as R,d as J,P as _e,e as be}from"./DffDvEhl.js";import{o as ge}from"./4WsUhDWi.js";import{g as L}from"./DklPLC_x.js";import{L as he}from"./CYItkO2S.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};a.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="aa310ff8-8885-4639-8b27-0f61ee27218a",a._sentryDebugIdIdentifier="sentry-dbid-aa310ff8-8885-4639-8b27-0f61ee27218a")})()}catch{}function ye(a,e,n){ce(()=>{var r=se(()=>e(a,n==null?void 0:n())||{});if(n&&(r!=null&&r.update)){var _=!1,m={};oe(()=>{var s=n();de(s),_&&fe(m,s)&&(m=s,r.update(s))}),_=!0}if(r!=null&&r.destroy)return()=>r.destroy()})}const we=a=>`Login with ${a.name}`,xe=a=>`Entrar com ${a.name}`,Q=(a,e={})=>(e.locale??L())==="en"?we(a):xe(a),ke=()=>"By continuing, you agree to our",Ie=()=>"Ao continuar, você concorda com nossos",Le=(a={},e={})=>(e.locale??L())==="en"?ke():Ie(),Ce=()=>"Terms of Service",Ee=()=>"Termos de Serviço",Te=(a={},e={})=>(e.locale??L())==="en"?Ce():Ee(),ze=()=>"and",Be=()=>"e",Me=(a={},e={})=>(e.locale??L())==="en"?ze():Be(),De=()=>"Privacy Policy",Pe=()=>"Política de privacidade",Se=(a={},e={})=>(e.locale??L())==="en"?De():Pe();var Fe=V("
        ");function He(a,e){W(e,!0);let n=c(e,"widgetId",15),r=c(e,"appearance",3,"always"),_=c(e,"language",3,"auto"),m=c(e,"execution",3,"render"),s=c(e,"retryInterval",3,8e3),D=c(e,"retry",3,"auto"),g=c(e,"refreshExpired",3,"auto"),C=c(e,"theme",3,"auto"),E=c(e,"size",3,"normal"),P=c(e,"tabIndex",3,0);c(e,"reset",15)(()=>{var t;n()&&((t=window==null?void 0:window.turnstile)==null||t.reset(n()))});const T=$(()=>({sitekey:e.siteKey,callback:(t,i)=>{var l;(l=e.callback)==null||l.call(e,t,i)},"error-callback":t=>{var i;(i=e.errorCallback)==null||i.call(e,t)},"timeout-callback":()=>{var t;(t=e.timeoutCallback)==null||t.call(e)},"expired-callback":()=>{var t;(t=e.expiredCallback)==null||t.call(e)},"before-interactive-callback":()=>{var t;(t=e.beforeInteractiveCallback)==null||t.call(e)},"after-interactive-callback":()=>{var t;(t=e.afterInteractiveCallback)==null||t.call(e)},"unsupported-callback":()=>{var t;return(t=e.unsupportedCallback)==null?void 0:t.call(e)},"response-field-name":e.responseFieldName??e.formsField??"cf-turnstile-response","response-field":e.responseField??e.forms??!0,"refresh-expired":g(),"retry-interval":s(),tabindex:P(),appearance:r(),execution:m(),language:_(),action:e.action,retry:D(),theme:C(),cData:e.cData,size:E()})),b=(t,i)=>{let l=window.turnstile.render(t,i);return n(l),{destroy(){window.turnstile.remove(l)},update(o){window.turnstile.remove(l),l=window.turnstile.render(t,o),n(l)}}};let x=U(!1);ge(()=>{if(M(x,!0),!R.turnstatileLoaded){const t=document.createElement("script");t.type="text/javascript",t.src="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit",t.async=!0,t.addEventListener("load",()=>R.turnstatileLoaded=!0,{once:!0}),document.head.appendChild(t)}return()=>{M(x,!1)}});var k=ue(),z=X(k);{var F=t=>{var i=Fe();let l;ye(i,(o,H)=>b==null?void 0:b(o,H),()=>v(T)),j(o=>l=A(i,1,G(e.class),"svelte-1gvfki5",l,o),[()=>({flexible:E()=="flexible"})]),w(t,i)};B(z,t=>{R.turnstatileLoaded&&v(x)&&t(F)})}w(a,k),p()}var Ne=ee('');function Ke(a,e){let n=te(e,["$$slots","$$events","$$legacy"]);var r=Ne();ae(r,()=>({viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",...n})),w(a,r)}var Re=ee('');function Ue(a,e){let n=te(e,["$$slots","$$events","$$legacy"]);var r=Re();ae(r,()=>({xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",viewBox:"0 0 2400 2800",...n})),w(a,r)}var je=V('
        ',1),Ae=V('');function pe(a,e){W(e,!0);let n=U(null),r=U(ve(J?"":"turnstile-disabled"));function _(t,i){return`${_e}/auth/${t}?token=${i}${e.redirect?`&r=${e.redirect}`:""}`}var m=Ae(),s=d(m),D=d(s);he(D,{hasText:!0}),f(s);var g=u(s,2),C=d(g),E=d(C);{var P=t=>{var i=je(),l=X(i),o=d(l);Ke(o,{class:"mr-1 size-5"});var H=u(o);f(l);var I=u(l,2),Y=d(I);Ue(Y,{class:"mr-1 size-5"});var re=u(Y);f(I);var q=u(I,2),O=d(q);{var ne=h=>{{let N=$(()=>be.trim());He(h,{get siteKey(){return v(N)},callback:K=>{M(r,K,!0)}})}};B(O,h=>{J&&h(ne)})}var le=u(O,2);B(le,h=>{}),f(q),j((h,N,K,ie)=>{A(l,1,G({"btn btn-lg bg-base-100 w-full text-base":!0,"bg-base-content/10 pointer-events-none":!v(r)})),Z(l,"href",h),y(H,` ${N??""}`),A(I,1,G({"btn btn-lg bg-base-100 w-full text-base":!0,"bg-base-content/10 pointer-events-none":!v(r)})),Z(I,"href",K),y(re,` ${ie??""}`)},[()=>v(r)?_("google",v(r)):"#",()=>Q({name:"Google"}),()=>v(r)?_("twitch",v(r)):"#",()=>Q({name:"Twitch"})]),w(t,i)};B(E,t=>{t(P,!1)})}f(C),f(g),me(g,t=>M(n,t),()=>v(n));var S=u(g,2),T=d(S),b=u(T),x=d(b,!0);f(b);var k=u(b),z=u(k),F=d(z,!0);f(z),f(S),f(m),j((t,i,l,o)=>{y(T,`${t??""} `),y(x,i),y(k,` ${l??""} `),y(F,o)},[()=>Le(),()=>Te(),()=>Me(),()=>Se()]),w(a,m),p()}export{pe as L,Ue as T,He as a}; diff --git a/frontend-backup/_app/immutable/chunks/BI7eddl7.js b/frontend-backup/_app/immutable/chunks/BI7eddl7.js new file mode 100644 index 0000000..483ea60 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/BI7eddl7.js @@ -0,0 +1,100 @@ +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + o = new e.Error().stack; + o && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[o] = "2873cead-a87c-4550-afcc-7d8128f4def3"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-2873cead-a87c-4550-afcc-7d8128f4def3")); + })(); +} catch {} +const m = "modulepreload", + w = function (e, o) { + return new URL(e, o).href; + }, + g = {}, + v = function (o, a, u) { + let h = Promise.resolve(); + if (a && a.length > 0) { + let i = function (t) { + return Promise.all( + t.map((s) => + Promise.resolve(s).then( + (c) => ({ status: "fulfilled", value: c }), + (c) => ({ status: "rejected", reason: c }) + ) + ) + ); + }; + const n = document.getElementsByTagName("link"), + l = document.querySelector("meta[property=csp-nonce]"), + b = + (l == null ? void 0 : l.nonce) || + (l == null ? void 0 : l.getAttribute("nonce")); + h = i( + a.map((t) => { + if (((t = w(t, u)), t in g)) return; + g[t] = !0; + const s = t.endsWith(".css"), + c = s ? '[rel="stylesheet"]' : ""; + if (!!u) + for (let d = n.length - 1; d >= 0; d--) { + const f = n[d]; + if (f.href === t && (!s || f.rel === "stylesheet")) return; + } + else if (document.querySelector(`link[href="${t}"]${c}`)) return; + const r = document.createElement("link"); + if ( + ((r.rel = s ? "stylesheet" : m), + s || (r.as = "script"), + (r.crossOrigin = ""), + (r.href = t), + b && r.setAttribute("nonce", b), + document.head.appendChild(r), + s) + ) + return new Promise((d, f) => { + r.addEventListener("load", d), + r.addEventListener("error", () => + f(new Error(`Unable to preload CSS for ${t}`)) + ); + }); + }) + ); + } + function y(i) { + const n = new Event("vite:preloadError", { cancelable: !0 }); + if (((n.payload = i), window.dispatchEvent(n), !n.defaultPrevented)) + throw i; + } + return h.then((i) => { + for (const n of i || []) n.status === "rejected" && y(n.reason); + return o().catch(y); + }); + }; +export { v as _ }; diff --git a/frontend-backup/_app/immutable/chunks/BKioTOWR.js b/frontend-backup/_app/immutable/chunks/BKioTOWR.js new file mode 100644 index 0000000..75ea074 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/BKioTOWR.js @@ -0,0 +1,61 @@ +import { g as s } from "./CV9xcpLq.js"; +import "./Ch2Ub8FX.js"; +import { v as r, b as i } from "./CMvZtFtm.js"; +import { b as a } from "./C5yqZvKC.js"; +import { r as l } from "./BF50aS-j.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + t = new e.Error().stack; + t && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[t] = "e9a4a830-f71c-4119-8142-30326aa85639"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-e9a4a830-f71c-4119-8142-30326aa85639")); + })(); +} catch {} +const d = () => "Pixels painted", + c = () => "Pixels pintados", + T = (e = {}, t = {}) => ((t.locale ?? s()) === "en" ? d() : c()), + p = () => "Description", + f = () => "Descrição", + m = (e = {}, t = {}) => ((t.locale ?? s()) === "en" ? p() : f()); +var u = r( + '' +); +function v(e, t) { + let n = l(t, ["$$slots", "$$events", "$$legacy"]); + var o = u(); + a(o, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...n, + })), + i(e, o); +} +export { v as L, m as d, T as p }; diff --git a/frontend-backup/_app/immutable/chunks/BMKgGW48.js b/frontend-backup/_app/immutable/chunks/BMKgGW48.js deleted file mode 100644 index 3cf32b7..0000000 --- a/frontend-backup/_app/immutable/chunks/BMKgGW48.js +++ /dev/null @@ -1,27 +0,0 @@ -import { t as u, h as o, e as l, a6 as g, a7 as y, m as h, P as p, a2 as b, a8 as w, a9 as O, aa as m, I as R, ab as E, J as f } from "./DUoKDNpf.js"; -function C(c, v, i = !1, _ = !1, N = !1) { - var n = c, - t = ""; - u(() => { - var s = g; - if (t === (t = v() ?? "")) { - o && l(); - return; - } - if ((s.nodes_start !== null && (y(s.nodes_start, s.nodes_end), (s.nodes_start = s.nodes_end = null)), t !== "")) { - if (o) { - h.data; - for (var a = l(), d = a; a !== null && (a.nodeType !== p || a.data !== ""); ) (d = a), (a = b(a)); - if (a === null) throw (w(), O); - m(h, d), (n = R(a)); - return; - } - var r = t + ""; - i ? (r = `${r}`) : _ && (r = `${r}`); - var e = E(r); - if (((i || _) && (e = f(e)), m(f(e), e.lastChild), i || _)) for (; f(e); ) n.before(f(e)); - else n.before(e); - } - }); -} -export { C as h }; diff --git a/frontend-backup/_app/immutable/chunks/BMfwGdZU.js b/frontend-backup/_app/immutable/chunks/BMfwGdZU.js deleted file mode 100644 index 7be5bc9..0000000 --- a/frontend-backup/_app/immutable/chunks/BMfwGdZU.js +++ /dev/null @@ -1 +0,0 @@ -import{g as o}from"./DklPLC_x.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a102ee55-05cc-4e26-9c0a-bd1623e19f6f",e._sentryDebugIdIdentifier="sentry-dbid-a102ee55-05cc-4e26-9c0a-bd1623e19f6f")})()}catch{}const d=()=>"Loading...",t=()=>"Carregando...",a=(e={},n={})=>(n.locale??o())==="en"?d():t();export{a as l}; diff --git a/frontend-backup/_app/immutable/chunks/BNZUboE0.js b/frontend-backup/_app/immutable/chunks/BNZUboE0.js deleted file mode 100644 index 5a4ce80..0000000 --- a/frontend-backup/_app/immutable/chunks/BNZUboE0.js +++ /dev/null @@ -1,370 +0,0 @@ -import { - i as V, - a7 as k, - k as Y, - M as P, - h as p, - a3 as Z, - b5 as Q, - J as W, - K as X, - G as m, - b6 as x, - b7 as rr, - b8 as fr, - b9 as ir, - g as ar, - ba as er, - bb as tr, - V as j, - bc as ur, - bd as sr, - at as or, - be as lr, - bf as nr, - aM as cr, - bg as dr, - bh as vr, - bi as br, -} from "./BDALf20I.js"; -(function () { - try { - var r = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - r.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var r = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - f = new r.Error().stack; - f && ((r._sentryDebugIds = r._sentryDebugIds || {}), (r._sentryDebugIds[f] = "79114daf-27cc-4daf-a558-677aac9a6589"), (r._sentryDebugIdIdentifier = "sentry-dbid-79114daf-27cc-4daf-a558-677aac9a6589")); - })(); -} catch {} -function gr(r, f) { - var i = void 0, - a; - V(() => { - i !== (i = f()) && - (a && (k(a), (a = null)), - i && - (a = Y(() => { - P(() => i(r)); - }))); - }); -} -function G(r) { - var f, - i, - a = ""; - if (typeof r == "string" || typeof r == "number") a += r; - else if (typeof r == "object") - if (Array.isArray(r)) { - var e = r.length; - for (f = 0; f < e; f++) r[f] && (i = G(r[f])) && (a && (a += " "), (a += i)); - } else for (i in r) r[i] && (a && (a += " "), (a += i)); - return a; -} -function hr() { - for (var r, f, i = 0, a = "", e = arguments.length; i < e; i++) (r = arguments[i]) && (f = G(r)) && (a && (a += " "), (a += f)); - return a; -} -function _r(r) { - return typeof r == "object" ? hr(r) : r ?? ""; -} -const q = [ - ...` -\r\f \v\uFEFF`, -]; -function Ar(r, f, i) { - var a = r == null ? "" : "" + r; - if ((f && (a = a ? a + " " + f : f), i)) { - for (var e in i) - if (i[e]) a = a ? a + " " + e : e; - else if (a.length) - for (var t = e.length, u = 0; (u = a.indexOf(e, u)) >= 0; ) { - var s = u + t; - (u === 0 || q.includes(a[u - 1])) && (s === a.length || q.includes(a[s])) ? (a = (u === 0 ? "" : a.substring(0, u)) + a.substring(s + 1)) : (u = s); - } - } - return a === "" ? null : a; -} -function D(r, f = !1) { - var i = f ? " !important;" : ";", - a = ""; - for (var e in r) { - var t = r[e]; - t != null && t !== "" && (a += " " + e + ": " + t + i); - } - return a; -} -function M(r) { - return r[0] !== "-" || r[1] !== "-" ? r.toLowerCase() : r; -} -function Sr(r, f) { - if (f) { - var i = "", - a, - e; - if ((Array.isArray(f) ? ((a = f[0]), (e = f[1])) : (a = f), r)) { - r = String(r) - .replaceAll(/\s*\/\*.*?\*\/\s*/g, "") - .trim(); - var t = !1, - u = 0, - s = !1, - d = []; - a && d.push(...Object.keys(a).map(M)), e && d.push(...Object.keys(e).map(M)); - var l = 0, - A = -1; - const b = r.length; - for (var v = 0; v < b; v++) { - var c = r[v]; - if ((s ? c === "/" && r[v - 1] === "*" && (s = !1) : t ? t === c && (t = !1) : c === "/" && r[v + 1] === "*" ? (s = !0) : c === '"' || c === "'" ? (t = c) : c === "(" ? u++ : c === ")" && u--, !s && t === !1 && u === 0)) { - if (c === ":" && A === -1) A = v; - else if (c === ";" || v === b - 1) { - if (A !== -1) { - var y = M(r.substring(l, A).trim()); - if (!d.includes(y)) { - c !== ";" && v++; - var S = r.substring(l, v).trim(); - i += " " + S + ";"; - } - } - (l = v + 1), (A = -1); - } - } - } - } - return a && (i += D(a)), e && (i += D(e, !0)), (i = i.trim()), i === "" ? null : i; - } - return r == null ? null : String(r); -} -function pr(r, f, i, a, e, t) { - var u = r.__className; - if (p || u !== i || u === void 0) { - var s = Ar(i, a, t); - (!p || s !== r.getAttribute("class")) && (s == null ? r.removeAttribute("class") : f ? (r.className = s) : r.setAttribute("class", s)), (r.__className = i); - } else if (t && e !== t) - for (var d in t) { - var l = !!t[d]; - (e == null || l !== !!e[d]) && r.classList.toggle(d, l); - } - return t; -} -function C(r, f = {}, i, a) { - for (var e in i) { - var t = i[e]; - f[e] !== t && (i[e] == null ? r.style.removeProperty(e) : r.style.setProperty(e, t, a)); - } -} -function yr(r, f, i, a) { - var e = r.__style; - if (p || e !== f) { - var t = Sr(f, a); - (!p || t !== r.getAttribute("style")) && (t == null ? r.removeAttribute("style") : (r.style.cssText = t)), (r.__style = f); - } else a && (Array.isArray(a) ? (C(r, i == null ? void 0 : i[0], a[0]), C(r, i == null ? void 0 : i[1], a[1], "important")) : C(r, i, a)); - return a; -} -function I(r, f, i = !1) { - if (r.multiple) { - if (f == null) return; - if (!Z(f)) return Q(); - for (var a of r.options) a.selected = f.includes(w(a)); - return; - } - for (a of r.options) { - var e = w(a); - if (W(e, f)) { - a.selected = !0; - return; - } - } - (!i || f !== void 0) && (r.selectedIndex = -1); -} -function H(r) { - var f = new MutationObserver(() => { - I(r, r.__value); - }); - f.observe(r, { childList: !0, subtree: !0, attributes: !0, attributeFilter: ["value"] }), - X(() => { - f.disconnect(); - }); -} -function wr(r, f, i = f) { - var a = !0; - m(r, "change", (e) => { - var t = e ? "[selected]" : ":checked", - u; - if (r.multiple) u = [].map.call(r.querySelectorAll(t), w); - else { - var s = r.querySelector(t) ?? r.querySelector("option:not([disabled])"); - u = s && w(s); - } - i(u); - }), - P(() => { - var e = f(); - if ((I(r, e, a), a && e === void 0)) { - var t = r.querySelector(":checked"); - t !== null && ((e = w(t)), i(e)); - } - (r.__value = e), (a = !1); - }), - H(r); -} -function w(r) { - return "__value" in r ? r.__value : r.value; -} -const N = Symbol("class"), - T = Symbol("style"), - K = Symbol("is custom element"), - B = Symbol("is html"); -function Ir(r) { - if (p) { - var f = !1, - i = () => { - if (!f) { - if (((f = !0), r.hasAttribute("value"))) { - var a = r.value; - L(r, "value", null), (r.value = a); - } - if (r.hasAttribute("checked")) { - var e = r.checked; - L(r, "checked", null), (r.checked = e); - } - } - }; - (r.__on_r = i), dr(i), vr(); - } -} -function Lr(r, f) { - var i = R(r); - i.value === (i.value = f ?? void 0) || (r.value === f && (f !== 0 || r.nodeName !== "PROGRESS")) || (r.value = f ?? ""); -} -function Er(r, f) { - f ? r.hasAttribute("selected") || r.setAttribute("selected", "") : r.removeAttribute("selected"); -} -function L(r, f, i, a) { - var e = R(r); - (p && ((e[f] = r.getAttribute(f)), f === "src" || f === "srcset" || (f === "href" && r.nodeName === "LINK"))) || - (e[f] !== (e[f] = i) && (f === "loading" && (r[ir] = i), i == null ? r.removeAttribute(f) : typeof i != "string" && z(r).includes(f) ? (r[f] = i) : r.setAttribute(f, i))); -} -function Nr(r, f, i, a, e = !1) { - var t = R(r), - u = t[K], - s = !t[B]; - let d = p && u; - d && j(!1); - var l = f || {}, - A = r.tagName === "OPTION"; - for (var v in f) v in i || (i[v] = null); - i.class ? (i.class = _r(i.class)) : (a || i[N]) && (i.class = null), i[T] && (i.style ?? (i.style = null)); - var c = z(r); - for (const o in i) { - let n = i[o]; - if (A && o === "value" && n == null) { - (r.value = r.__value = ""), (l[o] = n); - continue; - } - if (o === "class") { - var y = r.namespaceURI === "http://www.w3.org/1999/xhtml"; - pr(r, y, n, a, f == null ? void 0 : f[N], i[N]), (l[o] = n), (l[N] = i[N]); - continue; - } - if (o === "style") { - yr(r, n, f == null ? void 0 : f[T], i[T]), (l[o] = n), (l[T] = i[T]); - continue; - } - var S = l[o]; - if (!(n === S && !(n === void 0 && r.hasAttribute(o)))) { - l[o] = n; - var b = o[0] + o[1]; - if (b !== "$$") - if (b === "on") { - const _ = {}, - E = "$$" + o; - let g = o.slice(2); - var O = br(g); - if ((ur(g) && ((g = g.slice(0, -7)), (_.capture = !0)), !O && S)) { - if (n != null) continue; - r.removeEventListener(g, l[E], _), (l[E] = null); - } - if (n != null) - if (O) (r[`__${g}`] = n), or([g]); - else { - let F = function (J) { - l[o].call(this, J); - }; - l[E] = sr(g, r, F, _); - } - else O && (r[`__${g}`] = void 0); - } else if (o === "style") L(r, o, n); - else if (o === "autofocus") lr(r, !!n); - else if (!u && (o === "__value" || (o === "value" && n != null))) r.value = r.__value = n; - else if (o === "selected" && A) Er(r, n); - else { - var h = o; - s || (h = nr(h)); - var $ = h === "defaultValue" || h === "defaultChecked"; - if (n == null && !u && !$) - if (((t[o] = null), h === "value" || h === "checked")) { - let _ = r; - const E = f === void 0; - if (h === "value") { - let g = _.defaultValue; - _.removeAttribute(h), (_.defaultValue = g), (_.value = _.__value = E ? g : null); - } else { - let g = _.defaultChecked; - _.removeAttribute(h), (_.defaultChecked = g), (_.checked = E ? g : !1); - } - } else r.removeAttribute(o); - else $ || (c.includes(h) && (u || typeof n != "string")) ? ((r[h] = n), h in t && (t[h] = cr)) : typeof n != "function" && L(r, h, n); - } - } - } - return d && j(!0), l; -} -function Or(r, f, i = [], a = [], e, t = !1) { - x(i, a, (u) => { - var s = void 0, - d = {}, - l = r.nodeName === "SELECT", - A = !1; - if ( - (V(() => { - var c = f(...u.map(ar)), - y = Nr(r, s, c, e, t); - A && l && "value" in c && I(r, c.value); - for (let b of Object.getOwnPropertySymbols(d)) c[b] || k(d[b]); - for (let b of Object.getOwnPropertySymbols(c)) { - var S = c[b]; - b.description === er && (!s || S !== s[b]) && (d[b] && k(d[b]), (d[b] = Y(() => gr(r, () => S)))), (y[b] = S); - } - s = y; - }), - l) - ) { - var v = r; - P(() => { - I(v, s.value, !0), H(v); - }); - } - A = !0; - }); -} -function R(r) { - return r.__attributes ?? (r.__attributes = { [K]: r.nodeName.includes("-"), [B]: r.namespaceURI === rr }); -} -var U = new Map(); -function z(r) { - var f = U.get(r.nodeName); - if (f) return f; - U.set(r.nodeName, (f = [])); - for (var i, a = r, e = Element.prototype; e !== a; ) { - i = tr(a); - for (var t in i) i[t].set && f.push(t); - a = fr(a); - } - return f; -} -export { N as C, T as S, pr as a, Or as b, _r as c, wr as d, yr as e, gr as f, Lr as g, hr as h, Ir as r, L as s }; diff --git a/frontend-backup/_app/immutable/chunks/BOREeBzQ.js b/frontend-backup/_app/immutable/chunks/BOREeBzQ.js new file mode 100644 index 0000000..06c7139 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/BOREeBzQ.js @@ -0,0 +1,37 @@ +import { ar as d } from "./CMvZtFtm.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + f = new e.Error().stack; + f && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[f] = "04fff17c-04f8-458c-8ff9-180b80f62e15"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-04fff17c-04f8-458c-8ff9-180b80f62e15")); + })(); +} catch {} +d(); diff --git a/frontend-backup/_app/immutable/chunks/BRM3t761.js b/frontend-backup/_app/immutable/chunks/BRM3t761.js new file mode 100644 index 0000000..7e1a9ad --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/BRM3t761.js @@ -0,0 +1,2166 @@ +var be = Object.defineProperty; +var re = (a) => { + throw TypeError(a); +}; +var ye = (a, e, t) => + e in a + ? be(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) + : (a[e] = t); +var _ = (a, e, t) => ye(a, typeof e != "symbol" ? e + "" : e, t), + Se = (a, e, t) => e.has(a) || re("Cannot " + t); +var u = (a, e, t) => ( + Se(a, e, "read from private field"), t ? t.call(a) : e.get(a) + ), + h = (a, e, t) => + e.has(a) + ? re("Cannot add the same private member more than once") + : e instanceof WeakSet + ? e.add(a) + : e.set(a, t); +import { + au as y, + av as Z, + g as p, + aw as w, + z as se, + u as P, +} from "./CMvZtFtm.js"; +import { g } from "./CV9xcpLq.js"; +import { s as Te } from "./Dmqg20ho.js"; +(function () { + try { + var a = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + a.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var a = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + e = new a.Error().stack; + e && + ((a._sentryDebugIds = a._sentryDebugIds || {}), + (a._sentryDebugIds[e] = "87aabbe3-7829-4f34-ab59-ca38cce958a0"), + (a._sentryDebugIdIdentifier = + "sentry-dbid-87aabbe3-7829-4f34-ab59-ca38cce958a0")); + })(); +} catch {} +const Ee = "false", + la = "/files", + da = "0x4AAAAAABpHqZ-6i7uL0nmG", + ue = "", + ua = "0x4AAAAAABpqJe8FO0N84q0F"; +function ga(...a) { + return a.filter(Boolean).join(" "); +} +const ve = typeof document < "u"; +let oe = 0; +var L, k, C; +class Ae { + constructor() { + h(this, L, y(Z([]))); + h(this, k, y(Z([]))); + h(this, C, (e) => { + const t = this.toasts.findIndex((n) => n.id === e); + return t === -1 ? null : t; + }); + _(this, "addToast", (e) => { + ve && this.toasts.unshift(e); + }); + _(this, "updateToast", ({ id: e, data: t, type: n, message: s }) => { + const r = this.toasts.findIndex((o) => o.id === e), + l = this.toasts[r]; + this.toasts[r] = { ...l, ...t, id: e, title: s, type: n, updated: !0 }; + }); + _(this, "create", (e) => { + var o; + const { message: t, ...n } = e, + s = + typeof (e == null ? void 0 : e.id) == "number" || + (e.id && ((o = e.id) == null ? void 0 : o.length) > 0) + ? e.id + : oe++, + r = e.dismissable === void 0 ? !0 : e.dismissable, + l = e.type === void 0 ? "default" : e.type; + return ( + se(() => { + this.toasts.find((c) => c.id === s) + ? this.updateToast({ + id: s, + data: e, + type: l, + message: t, + dismissable: r, + }) + : this.addToast({ ...n, id: s, title: t, dismissable: r, type: l }); + }), + s + ); + }); + _( + this, + "dismiss", + (e) => ( + se(() => { + if (e === void 0) { + this.toasts = this.toasts.map((n) => ({ ...n, dismiss: !0 })); + return; + } + const t = this.toasts.findIndex((n) => n.id === e); + this.toasts[t] && + (this.toasts[t] = { ...this.toasts[t], dismiss: !0 }); + }), + e + ) + ); + _(this, "remove", (e) => { + if (e === void 0) { + this.toasts = []; + return; + } + const t = u(this, C).call(this, e); + if (t !== null) return this.toasts.splice(t, 1), e; + }); + _(this, "message", (e, t) => + this.create({ ...t, type: "default", message: e }) + ); + _(this, "error", (e, t) => + this.create({ ...t, type: "error", message: e }) + ); + _(this, "success", (e, t) => + this.create({ ...t, type: "success", message: e }) + ); + _(this, "info", (e, t) => this.create({ ...t, type: "info", message: e })); + _(this, "warning", (e, t) => + this.create({ ...t, type: "warning", message: e }) + ); + _(this, "loading", (e, t) => + this.create({ ...t, type: "loading", message: e }) + ); + _(this, "promise", (e, t) => { + if (!t) return; + let n; + t.loading !== void 0 && + (n = this.create({ + ...t, + promise: e, + type: "loading", + message: typeof t.loading == "string" ? t.loading : t.loading(), + })); + const s = e instanceof Promise ? e : e(); + let r = n !== void 0; + return ( + s + .then((l) => { + if ( + typeof l == "object" && + l && + "ok" in l && + typeof l.ok == "boolean" && + !l.ok + ) { + r = !1; + const o = Pe(l); + this.create({ id: n, type: "error", message: o }); + } else if (t.success !== void 0) { + r = !1; + const o = + typeof t.success == "function" ? t.success(l) : t.success; + this.create({ id: n, type: "success", message: o }); + } + }) + .catch((l) => { + if (t.error !== void 0) { + r = !1; + const o = typeof t.error == "function" ? t.error(l) : t.error; + this.create({ id: n, type: "error", message: o }); + } + }) + .finally(() => { + var l; + r && (this.dismiss(n), (n = void 0)), + (l = t.finally) == null || l.call(t); + }), + n + ); + }); + _(this, "custom", (e, t) => { + const n = (t == null ? void 0 : t.id) || oe++; + return this.create({ component: e, id: n, ...t }), n; + }); + _(this, "removeHeight", (e) => { + this.heights = this.heights.filter((t) => t.toastId !== e); + }); + _(this, "setHeight", (e) => { + const t = u(this, C).call(this, e.toastId); + if (t === null) { + this.heights.push(e); + return; + } + this.heights[t] = e; + }); + _(this, "reset", () => { + (this.toasts = []), (this.heights = []); + }); + } + get toasts() { + return p(u(this, L)); + } + set toasts(e) { + w(u(this, L), e, !0); + } + get heights() { + return p(u(this, k)); + } + set heights(e) { + w(u(this, k), e, !0); + } +} +(L = new WeakMap()), (k = new WeakMap()), (C = new WeakMap()); +function Pe(a) { + return a && typeof a == "object" && "status" in a + ? `HTTP error! Status: ${a.status}` + : `Error! ${a}`; +} +const T = new Ae(); +function xe(a, e) { + return T.create({ message: a, ...e }); +} +var ee; +class fa { + constructor() { + h( + this, + ee, + P(() => T.toasts.filter((e) => !e.dismiss)) + ); + } + get toasts() { + return p(u(this, ee)); + } +} +ee = new WeakMap(); +const Ie = xe, + ge = Object.assign(Ie, { + success: T.success, + info: T.info, + warning: T.warning, + error: T.error, + custom: T.custom, + message: T.message, + promise: T.promise, + dismiss: T.dismiss, + loading: T.loading, + getActiveToasts: () => T.toasts.filter((a) => !a.dismiss), + }); +let fe = y(void 0); +const me = () => p(fe), + ma = (a) => { + const e = new URL(a, ue), + t = me(); + return t && e.searchParams.set("override", t.token), e.toString(); + }; +function ha() { + try { + Oe(); + } catch (a) { + console.error("failed to load override", a); + } +} +function Oe() { + const e = new URL(location.href).searchParams.get("override"); + if (!e) return; + const t = e.split("."); + if (t.length !== 2) throw new Error("override token wrong amount of parts"); + const [n] = t, + s = JSON.parse(atob(n)); + if (Date.now() / 1e3 > s.expiresAt) throw new Error("override token expired"); + ge.info( + `Currently using the ${s.id} override. Bugs may occur, go back to ${location.protocol}//${location.host} to clear this override.`, + { duration: 6e4 } + ), + w(fe, { token: e, payload: s }, !0); +} +const ie = "theme"; +var q, M, N, D, B, U, G; +class Le { + constructor() { + h(this, q, y(!1)); + h(this, M, y(!1)); + h(this, N, y(Z(Ce()))); + h(this, D, y(!1)); + h(this, B, y("custom-winter")); + h(this, U, y(Z(Date.now()))); + h(this, G, y(void 0)); + setInterval(() => { + w(u(this, U), Date.now(), !0); + }, 500), + (this.theme = localStorage.getItem(ie) || "custom-winter"); + } + get dropletsDialogOpen() { + return p(u(this, q)); + } + set dropletsDialogOpen(e) { + w(u(this, q), e, !0); + } + get muted() { + return p(u(this, M)); + } + set muted(e) { + w(u(this, M), e, !0); + } + get language() { + return p(u(this, N)); + } + set language(e) { + w(u(this, N), e, !0); + } + get turnstatileLoaded() { + return p(u(this, D)); + } + set turnstatileLoaded(e) { + w(u(this, D), e, !0); + } + get theme() { + return p(u(this, B)); + } + set theme(e) { + w(u(this, B), e, !0), + localStorage.setItem(ie, e), + document.documentElement.setAttribute("data-theme", e); + } + get now() { + return p(u(this, U)); + } + get captcha() { + return qe + ? p(u(this, G)) + : { token: "turnstile-disabled", time: Date.now() }; + } + set captcha(e) { + w(u(this, G), e, !0); + } +} +(q = new WeakMap()), + (M = new WeakMap()), + (N = new WeakMap()), + (D = new WeakMap()), + (B = new WeakMap()), + (U = new WeakMap()), + (G = new WeakMap()); +const ke = new Le(); +function Ce() { + if (navigator.languages && navigator.languages.length > 0) { + const a = navigator.languages.find((e) => e.length === 2); + if (a) return a; + } + return ( + navigator.language || + navigator.userLanguage || + navigator.browserLanguage || + "en" + ).substring(0, 2); +} +const qe = Ee.toLowerCase() !== "false"; +let m; +function x(a) { + const e = m.__externref_table_alloc(); + return m.__wbindgen_export_2.set(e, a), e; +} +function A(a, e) { + try { + return a.apply(this, e); + } catch (t) { + const n = x(t); + m.__wbindgen_exn_store(n); + } +} +const he = + typeof TextDecoder < "u" + ? new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }) + : { + decode: () => { + throw Error("TextDecoder not available"); + }, + }; +typeof TextDecoder < "u" && he.decode(); +let I = null; +function W() { + return ( + (I === null || I.byteLength === 0) && (I = new Uint8Array(m.memory.buffer)), + I + ); +} +function O(a, e) { + return (a = a >>> 0), he.decode(W().subarray(a, a + e)); +} +function H(a) { + return a == null; +} +function _a(a) { + m.set_user_id(a); +} +let Q = 0; +const Y = + typeof TextEncoder < "u" + ? new TextEncoder("utf-8") + : { + encode: () => { + throw Error("TextEncoder not available"); + }, + }, + Me = + typeof Y.encodeInto == "function" + ? function (a, e) { + return Y.encodeInto(a, e); + } + : function (a, e) { + const t = Y.encode(a); + return e.set(t), { read: a.length, written: t.length }; + }; +function _e(a, e, t) { + if (t === void 0) { + const o = Y.encode(a), + d = e(o.length, 1) >>> 0; + return ( + W() + .subarray(d, d + o.length) + .set(o), + (Q = o.length), + d + ); + } + let n = a.length, + s = e(n, 1) >>> 0; + const r = W(); + let l = 0; + for (; l < n; l++) { + const o = a.charCodeAt(l); + if (o > 127) break; + r[s + l] = o; + } + if (l !== n) { + l !== 0 && (a = a.slice(l)), (s = t(s, n, (n = l + a.length * 3), 1) >>> 0); + const o = W().subarray(s + l, s + n), + d = Me(a, o); + (l += d.written), (s = t(s, n, l, 1) >>> 0); + } + return (Q = l), s; +} +function pa(a) { + const e = _e(a, m.__wbindgen_malloc, m.__wbindgen_realloc), + t = Q; + m.request_url(e, t); +} +function Ne() { + let a, e; + try { + const t = m.get_load_payload(); + return (a = t[0]), (e = t[1]), O(t[0], t[1]); + } finally { + m.__wbindgen_free(a, e, 1); + } +} +function De(a) { + let e, t; + try { + const n = _e(a, m.__wbindgen_malloc, m.__wbindgen_realloc), + s = Q, + r = m.get_pawtected_endpoint_payload(n, s); + return (e = r[0]), (t = r[1]), O(r[0], r[1]); + } finally { + m.__wbindgen_free(e, t, 1); + } +} +async function Be(a, e) { + if (typeof Response == "function" && a instanceof Response) { + if (typeof WebAssembly.instantiateStreaming == "function") + try { + return await WebAssembly.instantiateStreaming(a, e); + } catch (n) { + if (a.headers.get("Content-Type") != "application/wasm") + console.warn( + "`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", + n + ); + else throw n; + } + const t = await a.arrayBuffer(); + return await WebAssembly.instantiate(t, e); + } else { + const t = await WebAssembly.instantiate(a, e); + return t instanceof WebAssembly.Instance ? { instance: t, module: a } : t; + } +} +function Ue() { + const a = {}; + return ( + (a.wbg = {}), + (a.wbg.__wbg_buffer_609cc3eee51ed158 = function (e) { + return e.buffer; + }), + (a.wbg.__wbg_call_672a4d21634d4a24 = function () { + return A(function (e, t) { + return e.call(t); + }, arguments); + }), + (a.wbg.__wbg_call_7cccdd69e0791ae2 = function () { + return A(function (e, t, n) { + return e.call(t, n); + }, arguments); + }), + (a.wbg.__wbg_crypto_574e78ad8b13b65f = function (e) { + return e.crypto; + }), + (a.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function () { + return A(function (e, t) { + e.getRandomValues(t); + }, arguments); + }), + (a.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function (e) { + return e.msCrypto; + }), + (a.wbg.__wbg_new_a12002a7f91c75be = function (e) { + return new Uint8Array(e); + }), + (a.wbg.__wbg_newnoargs_105ed471475aaf50 = function (e, t) { + return new Function(O(e, t)); + }), + (a.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function ( + e, + t, + n + ) { + return new Uint8Array(e, t >>> 0, n >>> 0); + }), + (a.wbg.__wbg_newwithlength_a381634e90c276d4 = function (e) { + return new Uint8Array(e >>> 0); + }), + (a.wbg.__wbg_node_905d3e251edff8a2 = function (e) { + return e.node; + }), + (a.wbg.__wbg_process_dc0fbacc7c1c06f7 = function (e) { + return e.process; + }), + (a.wbg.__wbg_randomFillSync_ac0988aba3254290 = function () { + return A(function (e, t) { + e.randomFillSync(t); + }, arguments); + }), + (a.wbg.__wbg_require_60cc747a6bc5215a = function () { + return A(function () { + return module.require; + }, arguments); + }), + (a.wbg.__wbg_set_65595bdd868b3009 = function (e, t, n) { + e.set(t, n >>> 0); + }), + (a.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function () { + const e = typeof global > "u" ? null : global; + return H(e) ? 0 : x(e); + }), + (a.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function () { + const e = typeof globalThis > "u" ? null : globalThis; + return H(e) ? 0 : x(e); + }), + (a.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function () { + const e = typeof self > "u" ? null : self; + return H(e) ? 0 : x(e); + }), + (a.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function () { + const e = typeof window > "u" ? null : window; + return H(e) ? 0 : x(e); + }), + (a.wbg.__wbg_subarray_aa9065fa9dc5df96 = function (e, t, n) { + return e.subarray(t >>> 0, n >>> 0); + }), + (a.wbg.__wbg_versions_c01dfd4722a88165 = function (e) { + return e.versions; + }), + (a.wbg.__wbindgen_init_externref_table = function () { + const e = m.__wbindgen_export_2, + t = e.grow(4); + e.set(0, void 0), + e.set(t + 0, void 0), + e.set(t + 1, null), + e.set(t + 2, !0), + e.set(t + 3, !1); + }), + (a.wbg.__wbindgen_is_function = function (e) { + return typeof e == "function"; + }), + (a.wbg.__wbindgen_is_object = function (e) { + const t = e; + return typeof t == "object" && t !== null; + }), + (a.wbg.__wbindgen_is_string = function (e) { + return typeof e == "string"; + }), + (a.wbg.__wbindgen_is_undefined = function (e) { + return e === void 0; + }), + (a.wbg.__wbindgen_memory = function () { + return m.memory; + }), + (a.wbg.__wbindgen_string_new = function (e, t) { + return O(e, t); + }), + (a.wbg.__wbindgen_throw = function (e, t) { + throw new Error(O(e, t)); + }), + a + ); +} +function Ge(a, e) { + return ( + (m = a.exports), + (Re.__wbindgen_wasm_module = e), + (I = null), + m.__wbindgen_start(), + m + ); +} +async function Re(a) { + if (m !== void 0) return m; + typeof a < "u" && + (Object.getPrototypeOf(a) === Object.prototype + ? ({ module_or_path: a } = a) + : console.warn( + "using deprecated parameters for the initialization function; pass a single object instead" + )), + typeof a > "u" && (a = new URL("pawtect_wasm_bg.wasm", import.meta.url)); + const e = Ue(); + (typeof a == "string" || + (typeof Request == "function" && a instanceof Request) || + (typeof URL == "function" && a instanceof URL)) && + (a = fetch(a)); + const { instance: t, module: n } = await Be(await a, e); + return Ge(t, n); +} +const $e = () => "Unexpected server error. Try again later.", + je = () => "Erro inesperado do servidor. Tente novamente mais tarde.", + i = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? $e() : je()), + Fe = () => "You need to be logged in to paint", + Je = () => "Você precisa estar conectado para pintar", + Ke = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Fe() : Je()), + ze = (a) => `Error while painting: ${a.err}`, + Ve = (a) => `Erro enquanto pinta: ${a.err}`, + He = (a, e = {}) => ((e.locale ?? g()) === "en" ? ze(a) : Ve(a)), + We = () => "Invalid phone number", + Ye = () => "Número de telefone inválido", + Ze = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? We() : Ye()), + Qe = () => "Phone already used", + Xe = () => "Telefone já usado", + et = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Qe() : Xe()), + tt = () => "You have to wait to resend a code", + nt = () => "Você tem de esperar para reenviar um código", + at = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? tt() : nt()), + rt = () => "Invalid code", + st = () => "Código inválido", + ot = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? rt() : st()), + it = () => + "Operation not allowed. Maybe you have too many favorite locations.", + ct = () => + "Operação não permitida. Talvez você tenha muitos locais favoritos.", + lt = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? it() : ct()), + dt = () => "Location name is too big (max. 128 characters)", + ut = () => "Nome da localização é grande demais (max. 128 caracteres)", + gt = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? dt() : ut()), + ft = () => "Couldn't complete the purchase. This item does not exist.", + mt = () => "Não foi possível concluir a compra. Este item não existe.", + ht = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? ft() : mt()), + _t = () => "You do not have enough droplets to buy this item.", + pt = () => "Você não tem gotas suficientes para comprar este item.", + wt = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? _t() : pt()), + bt = () => "You already have this item. Please refresh the page.", + yt = () => "Você já possui este item. Atualize a página.", + St = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? bt() : yt()), + Tt = () => "Alliance name exceeded the maximum number of characters", + Et = () => "O nome da aliança excedeu o número máximo de caracteres", + vt = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Tt() : Et()), + At = () => "Alliance name already taken", + Pt = () => "Já possui uma aliança com esse nome", + xt = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? At() : Pt()), + It = () => "Alliance with empty name", + Ot = () => "Aliança com nome vazio", + Lt = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? It() : Ot()), + kt = () => "You are already in an alliance", + Ct = () => "Você já está em uma aliança", + qt = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? kt() : Ct()), + Mt = () => "You are not allowed to do this", + Nt = () => "Você não tem permissão para fazer isso", + E = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Mt() : Nt()), + Dt = () => + "Can't reach the server. Maybe you are without internet connection or the server is down. Try again later", + Bt = () => + "Não é possível acessar o servidor. Talvez você esteja sem conexão com a internet ou o servidor esteja fora do ar. Tente novamente mais tarde.", + Ut = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Dt() : Bt()), + Gt = () => + "You or someone in your network is making a lot of requests to the server. Try again later.", + Rt = () => + "Você ou alguém na sua rede está fazendo muitas solicitações ao servidor. Tente novamente mais tarde.", + ce = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Gt() : Rt()), + $t = () => "No internet access or the servers are offline. Try again later.", + jt = () => + "Sem acesso à internet ou os servidores estão fora do ar. Tente novamente mais tarde.", + Ft = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? $t() : jt()), + Jt = () => + "We’re currently experiencing high traffic. Some requests may not be processed at this time—please try again later. Thank you for your patience.", + Kt = () => + "Estamos enfrentando um volume alto de acessos no momento. Algumas solicitações podem não ser processadas agora — por favor, tente novamente mais tarde. Agradecemos a sua compreensão.", + zt = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Jt() : Kt()), + Vt = () => "Refresh your page to get the latest update", + Ht = () => "Recarregue sua página para obter as últimas atualizações", + Wt = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Vt() : Ht()), + Yt = () => "Inappropriate content", + Zt = () => "Conteúdo inapropriado", + Qt = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Yt() : Zt()), + Xt = () => "Botting", + en = () => "Uso de bots", + tn = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Xt() : en()), + nn = () => "Hate speech", + an = () => "Discurso de Ódio", + rn = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? nn() : an()), + sn = () => "Griefing", + on = () => "Griefing", + cn = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? sn() : on()), + ln = () => "Doxxing", + dn = () => "Doxxing", + un = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? ln() : dn()), + gn = () => "Leaderboard is temporarily disabled", + fn = () => "O ranking está temporariamente desativado", + v = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? gn() : fn()), + mn = () => "Multi-accounting", + hn = () => "Múltiplas contas", + _n = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? mn() : hn()), + pn = () => "Breaking the rules", + wn = () => "Quebrar as regras", + bn = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? pn() : wn()), + yn = () => "Your account has been suspended for breaking the rules", + Sn = () => "Sua conta foi suspensa por quebrar as regras", + Tn = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? yn() : Sn()), + En = () => "Your account has been banned for violating the rules", + vn = () => "A sua conta foi banida por quebrar as regras", + An = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? En() : vn()), + Pn = (a) => `Your account has been suspended out until ${a.until}`, + xn = (a) => `A sua conta está suspensa até ${a.until}`, + In = (a, e = {}) => ((e.locale ?? g()) === "en" ? Pn(a) : xn(a)), + On = () => "You are trying to paint with a color you do not own", + Ln = () => "Você está tentando pintar com uma cor que não possui", + kn = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? On() : Ln()), + Cn = () => "The new leader must be a member of the alliance", + qn = () => "O novo líder deve ser um membro da aliança", + Mn = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Cn() : qn()), + Nn = () => + "The name contains disallowed characters or words. Please choose a different name.", + Dn = () => + "O nome contém caracteres ou palavras não permitidas. Por favor, escolha outro nome.", + Bn = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Nn() : Dn()), + Un = () => "Invalid discord.", + Gn = () => "Discord inválido.", + Rn = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Un() : Gn()), + $n = () => "The typed username does not match your current username.", + jn = () => + "O nome de usuário digitado não corresponde ao seu nome de usuário atual.", + Fn = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? $n() : jn()), + wa = { + griefing: cn(), + "multi-accounting": _n(), + "hate-speech": rn(), + bot: tn(), + doxxing: un(), + "inappropriate-content": Qt(), + other: bn(), + }, + ba = { + doxxing: "text-red-600", + "hate-speech": "text-red-600", + "inappropriate-content": "text-amber-600", + "multi-accounting": "text-amber-600", + bot: "text-amber-600", + griefing: "text-amber-600", + other: "text-blue-600", + }, + le = { + doxxing: 0, + "hate-speech": 1, + "inappropriate-content": 2, + bot: 3, + "multi-accounting": 4, + other: 5, + griefing: 6, + }; +function Jn(a) { + const e = atob(a), + t = new Uint8Array(e.length); + for (let n = 0; n < e.length; n++) t[n] = e.charCodeAt(n); + return t; +} +class Kn { + constructor(e) { + _(this, "bytes"); + this.bytes = e ?? new Uint8Array(); + } + set(e, t) { + const n = Math.floor(e / 8), + s = e % 8; + if (n >= this.bytes.length) { + const l = new Uint8Array(n + 1), + o = l.length - this.bytes.length; + for (let d = 0; d < this.bytes.length; d++) l[d + o] = this.bytes[d]; + this.bytes = l; + } + const r = this.bytes.length - 1 - n; + t + ? (this.bytes[r] = this.bytes[r] | (1 << s)) + : (this.bytes[r] = this.bytes[r] & ~(1 << s)); + } + get(e) { + const t = Math.floor(e / 8), + n = e % 8, + s = this.bytes.length; + return t > s ? !1 : (this.bytes[s - 1 - t] & (1 << n)) !== 0; + } +} +var R, $, j, F, J, K, z; +class zn { + constructor() { + _(this, "channel", new BroadcastChannel("user-channel")); + h(this, R, y()); + h(this, $, y(!0)); + h(this, j, y(Date.now())); + h( + this, + F, + P(() => { + if (!this.data) return; + const e = this.data.charges; + if (e.count > e.max) return e.count; + const t = + e.count + Math.max((ke.now - this.lastFetch) / e.cooldownMs, 0); + return Math.min(e.max, t); + }) + ); + h( + this, + J, + P(() => + this.charges !== void 0 && this.data + ? (1 - (this.charges % 1)) * this.data.charges.cooldownMs + : void 0 + ) + ); + h( + this, + K, + P(() => { + var e; + return new Kn( + Jn(((e = this.data) == null ? void 0 : e.flagsBitmap) ?? "AA==") + ); + }) + ); + h( + this, + z, + P(() => { + var t; + if (!((t = this.data) != null && t.timeoutUntil)) return; + const e = new Date(this.data.timeoutUntil); + if (!(e.getTime() < Date.now())) return e; + }) + ); + this.channel.onmessage = (e) => { + const t = JSON.parse(e.data); + t.type === "refresh" + ? ((this.data = t.data), (this.lastFetch = Date.now())) + : t.type === "logout" && (this.data = void 0); + }; + } + get data() { + return p(u(this, R)); + } + set data(e) { + w(u(this, R), e, !0); + } + get loading() { + return p(u(this, $)); + } + set loading(e) { + w(u(this, $), e, !0); + } + get lastFetch() { + return p(u(this, j)); + } + set lastFetch(e) { + w(u(this, j), e); + } + get charges() { + return p(u(this, F)); + } + set charges(e) { + w(u(this, F), e); + } + get cooldown() { + return p(u(this, J)); + } + set cooldown(e) { + w(u(this, J), e); + } + get flagsBitmap() { + return p(u(this, K)); + } + set flagsBitmap(e) { + w(u(this, K), e); + } + get timeoutUntil() { + return p(u(this, z)); + } + set timeoutUntil(e) { + w(u(this, z), e); + } + async refresh() { + try { + return ( + (this.loading = !0), + (this.data = await de.me()), + (this.lastFetch = Date.now()), + this.channel.postMessage( + JSON.stringify({ type: "refresh", data: this.data }) + ), + Te("userId", { id: this.data.id }), + !0 + ); + } catch (e) { + return console.error(e), ge.warning(Ft(), { duration: 1e4 }), !1; + } finally { + this.loading = !1; + } + } + async logout() { + await de.logout(), + this.channel.postMessage(JSON.stringify({ type: "logout" })), + (this.data = void 0); + } + hasColor(e) { + var n; + return e < 32 + ? !0 + : ((((n = this.data) == null ? void 0 : n.extraColorsBitmap) ?? 0) & + (1 << (e - 32))) !== + 0; + } +} +(R = new WeakMap()), + ($ = new WeakMap()), + (j = new WeakMap()), + (F = new WeakMap()), + (J = new WeakMap()), + (K = new WeakMap()), + (z = new WeakMap()); +const X = new zn(); +class f extends Error { + constructor(e, t) { + super(e), (this.message = e), (this.status = t); + } +} +function Vn(a, e) { + const t = {}; + for (const n of a) { + const s = e(n); + let r = t[s]; + r ? r.push(n) : (t[s] = [n]); + } + return t; +} +function ya(a, e) { + const t = {}; + for (const n of a) { + const s = e(n); + t[s] = n; + } + return t; +} +const Hn = [{ tileSize: 1e3, zoom: 11 }], + Wn = 4, + Yn = 6e3, + Zn = [ + { name: "Transparent", rgb: [0, 0, 0] }, + { name: "Black", rgb: [0, 0, 0] }, + { name: "Dark Gray", rgb: [60, 60, 60] }, + { name: "Gray", rgb: [120, 120, 120] }, + { name: "Light Gray", rgb: [210, 210, 210] }, + { name: "White", rgb: [255, 255, 255] }, + { name: "Deep Red", rgb: [96, 0, 24] }, + { name: "Red", rgb: [237, 28, 36] }, + { name: "Orange", rgb: [255, 127, 39] }, + { name: "Gold", rgb: [246, 170, 9] }, + { name: "Yellow", rgb: [249, 221, 59] }, + { name: "Light Yellow", rgb: [255, 250, 188] }, + { name: "Dark Green", rgb: [14, 185, 104] }, + { name: "Green", rgb: [19, 230, 123] }, + { name: "Light Green", rgb: [135, 255, 94] }, + { name: "Dark Teal", rgb: [12, 129, 110] }, + { name: "Teal", rgb: [16, 174, 166] }, + { name: "Light Teal", rgb: [19, 225, 190] }, + { name: "Dark Blue", rgb: [40, 80, 158] }, + { name: "Blue", rgb: [64, 147, 228] }, + { name: "Cyan", rgb: [96, 247, 242] }, + { name: "Indigo", rgb: [107, 80, 246] }, + { name: "Light Indigo", rgb: [153, 177, 251] }, + { name: "Dark Purple", rgb: [120, 12, 153] }, + { name: "Purple", rgb: [170, 56, 185] }, + { name: "Light Purple", rgb: [224, 159, 249] }, + { name: "Dark Pink", rgb: [203, 0, 122] }, + { name: "Pink", rgb: [236, 31, 128] }, + { name: "Light Pink", rgb: [243, 141, 169] }, + { name: "Dark Brown", rgb: [104, 70, 52] }, + { name: "Brown", rgb: [149, 104, 42] }, + { name: "Beige", rgb: [248, 178, 119] }, + { name: "Medium Gray", rgb: [170, 170, 170] }, + { name: "Dark Red", rgb: [165, 14, 30] }, + { name: "Light Red", rgb: [250, 128, 114] }, + { name: "Dark Orange", rgb: [228, 92, 26] }, + { name: "Light Tan", rgb: [214, 181, 148] }, + { name: "Dark Goldenrod", rgb: [156, 132, 49] }, + { name: "Goldenrod", rgb: [197, 173, 49] }, + { name: "Light Goldenrod", rgb: [232, 212, 95] }, + { name: "Dark Olive", rgb: [74, 107, 58] }, + { name: "Olive", rgb: [90, 148, 74] }, + { name: "Light Olive", rgb: [132, 197, 115] }, + { name: "Dark Cyan", rgb: [15, 121, 159] }, + { name: "Light Cyan", rgb: [187, 250, 242] }, + { name: "Light Blue", rgb: [125, 199, 255] }, + { name: "Dark Indigo", rgb: [77, 49, 184] }, + { name: "Dark Slate Blue", rgb: [74, 66, 132] }, + { name: "Slate Blue", rgb: [122, 113, 196] }, + { name: "Light Slate Blue", rgb: [181, 174, 241] }, + { name: "Light Brown", rgb: [219, 164, 99] }, + { name: "Dark Beige", rgb: [209, 128, 81] }, + { name: "Light Beige", rgb: [255, 197, 165] }, + { name: "Dark Peach", rgb: [155, 82, 73] }, + { name: "Peach", rgb: [209, 128, 120] }, + { name: "Light Peach", rgb: [250, 182, 164] }, + { name: "Dark Tan", rgb: [123, 99, 82] }, + { name: "Tan", rgb: [156, 132, 107] }, + { name: "Dark Slate", rgb: [51, 57, 65] }, + { name: "Slate", rgb: [109, 117, 141] }, + { name: "Light Slate", rgb: [179, 185, 209] }, + { name: "Dark Stone", rgb: [109, 100, 63] }, + { name: "Stone", rgb: [148, 140, 107] }, + { name: "Light Stone", rgb: [205, 197, 158] }, + ], + Qn = { needsPhoneVerification: "needs_phone_verification" }, + Xn = { + Droplet: {}, + "Max. Charge": {}, + "Paint Charge": {}, + Color: {}, + Flag: {}, + "Profile Picture": {}, + }, + ea = { + 10: { + name: "25,000 Droplets", + price: 500, + isDollar: !0, + lookupKey: "droplets_5", + items: [{ name: "Droplet", amount: 25e3 }], + }, + 20: { + name: "78,750 Droplets", + price: 1500, + isDollar: !0, + lookupKey: "droplets_15", + items: [{ name: "Droplet", amount: 76750 }], + }, + 30: { + name: "165,000 Droplets", + price: 3e3, + isDollar: !0, + lookupKey: "droplets_30", + items: [{ name: "Droplet", amount: 165e3 }], + }, + 40: { + name: "287,500 Droplets", + price: 5e3, + isDollar: !0, + lookupKey: "droplets_50", + items: [{ name: "Droplet", amount: 287500 }], + }, + 50: { + name: "450,000 Droplets", + price: 7500, + isDollar: !0, + lookupKey: "droplets_75", + items: [{ name: "Droplet", amount: 45e4 }], + }, + 60: { + name: "625,000 Droplets", + price: 1e4, + isDollar: !0, + lookupKey: "droplets_100", + items: [{ name: "Droplet", amount: 625e3 }], + }, + 70: { + name: "+5 Max. Charges", + price: 500, + isDollar: !1, + items: [{ name: "Max. Charge", amount: 5 }], + }, + 80: { + name: "+30 Paint Charges", + price: 500, + isDollar: !1, + items: [{ name: "Paint Charge", amount: 30 }], + }, + 100: { + name: "Unlock Color", + price: 2e3, + isDollar: !1, + items: [{ name: "Color", amount: 1 }], + }, + 110: { + name: "Flag", + price: 2e4, + isDollar: !1, + items: [{ name: "Flag", amount: 1 }], + }, + 120: { + name: "Profile Picture", + price: 2e4, + isDollar: !1, + items: [{ name: "Profile Picture", amount: 1 }], + }, + }, + ta = JSON.parse( + `[{"id":1,"name":"Afghanistan","code":"AF","flag":"🇦🇫"},{"id":2,"name":"Albania","code":"AL","flag":"🇦🇱"},{"id":3,"name":"Algeria","code":"DZ","flag":"🇩🇿"},{"id":4,"name":"American Samoa","code":"AS","flag":"🇦🇸"},{"id":5,"name":"Andorra","code":"AD","flag":"🇦🇩"},{"id":6,"name":"Angola","code":"AO","flag":"🇦🇴"},{"id":7,"name":"Anguilla","code":"AI","flag":"🇦🇮"},{"id":8,"name":"Antarctica","code":"AQ","flag":"🇦🇶"},{"id":9,"name":"Antigua and Barbuda","code":"AG","flag":"🇦🇬"},{"id":10,"name":"Argentina","code":"AR","flag":"🇦🇷"},{"id":11,"name":"Armenia","code":"AM","flag":"🇦🇲"},{"id":12,"name":"Aruba","code":"AW","flag":"🇦🇼"},{"id":13,"name":"Australia","code":"AU","flag":"🇦🇺"},{"id":14,"name":"Austria","code":"AT","flag":"🇦🇹"},{"id":15,"name":"Azerbaijan","code":"AZ","flag":"🇦🇿"},{"id":16,"name":"Bahamas","code":"BS","flag":"🇧🇸"},{"id":17,"name":"Bahrain","code":"BH","flag":"🇧🇭"},{"id":18,"name":"Bangladesh","code":"BD","flag":"🇧🇩"},{"id":19,"name":"Barbados","code":"BB","flag":"🇧🇧"},{"id":20,"name":"Belarus","code":"BY","flag":"🇧🇾"},{"id":21,"name":"Belgium","code":"BE","flag":"🇧🇪"},{"id":22,"name":"Belize","code":"BZ","flag":"🇧🇿"},{"id":23,"name":"Benin","code":"BJ","flag":"🇧🇯"},{"id":24,"name":"Bermuda","code":"BM","flag":"🇧🇲"},{"id":25,"name":"Bhutan","code":"BT","flag":"🇧🇹"},{"id":26,"name":"Bolivia","code":"BO","flag":"🇧🇴"},{"id":27,"name":"Bonaire","code":"BQ","flag":"🇧🇶"},{"id":28,"name":"Bosnia and Herzegovina","code":"BA","flag":"🇧🇦"},{"id":29,"name":"Botswana","code":"BW","flag":"🇧🇼"},{"id":30,"name":"Bouvet Island","code":"BV","flag":"🇧🇻"},{"id":31,"name":"Brazil","code":"BR","flag":"🇧🇷"},{"id":32,"name":"British Indian Ocean Territory","code":"IO","flag":"🇮🇴"},{"id":33,"name":"Brunei Darussalam","code":"BN","flag":"🇧🇳"},{"id":34,"name":"Bulgaria","code":"BG","flag":"🇧🇬"},{"id":35,"name":"Burkina Faso","code":"BF","flag":"🇧🇫"},{"id":36,"name":"Burundi","code":"BI","flag":"🇧🇮"},{"id":37,"name":"Cabo Verde","code":"CV","flag":"🇨🇻"},{"id":38,"name":"Cambodia","code":"KH","flag":"🇰🇭"},{"id":39,"name":"Cameroon","code":"CM","flag":"🇨🇲"},{"id":40,"name":"Canada","code":"CA","flag":"🇨🇦"},{"id":41,"name":"Cayman Islands","code":"KY","flag":"🇰🇾"},{"id":42,"name":"Central African Republic","code":"CF","flag":"🇨🇫"},{"id":43,"name":"Chad","code":"TD","flag":"🇹🇩"},{"id":44,"name":"Chile","code":"CL","flag":"🇨🇱"},{"id":45,"name":"China","code":"CN","flag":"🇨🇳"},{"id":46,"name":"Christmas Island","code":"CX","flag":"🇨🇽"},{"id":47,"name":"Cocos (Keeling) Islands","code":"CC","flag":"🇨🇨"},{"id":48,"name":"Colombia","code":"CO","flag":"🇨🇴"},{"id":49,"name":"Comoros","code":"KM","flag":"🇰🇲"},{"id":50,"name":"Congo","code":"CG","flag":"🇨🇬"},{"id":51,"name":"Cook Islands","code":"CK","flag":"🇨🇰"},{"id":52,"name":"Costa Rica","code":"CR","flag":"🇨🇷"},{"id":53,"name":"Croatia","code":"HR","flag":"🇭🇷"},{"id":54,"name":"Cuba","code":"CU","flag":"🇨🇺"},{"id":55,"name":"Curaçao","code":"CW","flag":"🇨🇼"},{"id":56,"name":"Cyprus","code":"CY","flag":"🇨🇾"},{"id":57,"name":"Czechia","code":"CZ","flag":"🇨🇿"},{"id":58,"name":"Côte d'Ivoire","code":"CI","flag":"🇨🇮"},{"id":59,"name":"Denmark","code":"DK","flag":"🇩🇰"},{"id":60,"name":"Djibouti","code":"DJ","flag":"🇩🇯"},{"id":61,"name":"Dominica","code":"DM","flag":"🇩🇲"},{"id":62,"name":"Dominican Republic","code":"DO","flag":"🇩🇴"},{"id":63,"name":"Ecuador","code":"EC","flag":"🇪🇨"},{"id":64,"name":"Egypt","code":"EG","flag":"🇪🇬"},{"id":65,"name":"El Salvador","code":"SV","flag":"🇸🇻"},{"id":66,"name":"Equatorial Guinea","code":"GQ","flag":"🇬🇶"},{"id":67,"name":"Eritrea","code":"ER","flag":"🇪🇷"},{"id":68,"name":"Estonia","code":"EE","flag":"🇪🇪"},{"id":69,"name":"Eswatini","code":"SZ","flag":"🇸🇿"},{"id":70,"name":"Ethiopia","code":"ET","flag":"🇪🇹"},{"id":71,"name":"Falkland Islands (Malvinas)","code":"FK","flag":"🇫🇰"},{"id":72,"name":"Faroe Islands","code":"FO","flag":"🇫🇴"},{"id":73,"name":"Fiji","code":"FJ","flag":"🇫🇯"},{"id":74,"name":"Finland","code":"FI","flag":"🇫🇮"},{"id":75,"name":"France","code":"FR","flag":"🇫🇷"},{"id":76,"name":"French Guiana","code":"GF","flag":"🇬🇫"},{"id":77,"name":"French Polynesia","code":"PF","flag":"🇵🇫"},{"id":78,"name":"French Southern Territories","code":"TF","flag":"🇹🇫"},{"id":79,"name":"Gabon","code":"GA","flag":"🇬🇦"},{"id":80,"name":"Gambia","code":"GM","flag":"🇬🇲"},{"id":81,"name":"Georgia","code":"GE","flag":"🇬🇪"},{"id":82,"name":"Germany","code":"DE","flag":"🇩🇪"},{"id":83,"name":"Ghana","code":"GH","flag":"🇬🇭"},{"id":84,"name":"Gibraltar","code":"GI","flag":"🇬🇮"},{"id":85,"name":"Greece","code":"GR","flag":"🇬🇷"},{"id":86,"name":"Greenland","code":"GL","flag":"🇬🇱"},{"id":87,"name":"Grenada","code":"GD","flag":"🇬🇩"},{"id":88,"name":"Guadeloupe","code":"GP","flag":"🇬🇵"},{"id":89,"name":"Guam","code":"GU","flag":"🇬🇺"},{"id":90,"name":"Guatemala","code":"GT","flag":"🇬🇹"},{"id":91,"name":"Guernsey","code":"GG","flag":"🇬🇬"},{"id":92,"name":"Guinea","code":"GN","flag":"🇬🇳"},{"id":93,"name":"Guinea-Bissau","code":"GW","flag":"🇬🇼"},{"id":94,"name":"Guyana","code":"GY","flag":"🇬🇾"},{"id":95,"name":"Haiti","code":"HT","flag":"🇭🇹"},{"id":96,"name":"Heard Island and McDonald Islands","code":"HM","flag":"🇭🇲"},{"id":97,"name":"Honduras","code":"HN","flag":"🇭🇳"},{"id":98,"name":"Hong Kong","code":"HK","flag":"🇭🇰"},{"id":99,"name":"Hungary","code":"HU","flag":"🇭🇺"},{"id":100,"name":"Iceland","code":"IS","flag":"🇮🇸"},{"id":101,"name":"India","code":"IN","flag":"🇮🇳"},{"id":102,"name":"Indonesia","code":"ID","flag":"🇮🇩"},{"id":103,"name":"Iran","code":"IR","flag":"🇮🇷"},{"id":104,"name":"Iraq","code":"IQ","flag":"🇮🇶"},{"id":105,"name":"Ireland","code":"IE","flag":"🇮🇪"},{"id":106,"name":"Isle of Man","code":"IM","flag":"🇮🇲"},{"id":107,"name":"Israel","code":"IL","flag":"🇮🇱"},{"id":108,"name":"Italy","code":"IT","flag":"🇮🇹"},{"id":109,"name":"Jamaica","code":"JM","flag":"🇯🇲"},{"id":110,"name":"Japan","code":"JP","flag":"🇯🇵"},{"id":111,"name":"Jersey","code":"JE","flag":"🇯🇪"},{"id":112,"name":"Jordan","code":"JO","flag":"🇯🇴"},{"id":113,"name":"Kazakhstan","code":"KZ","flag":"🇰🇿"},{"id":114,"name":"Kenya","code":"KE","flag":"🇰🇪"},{"id":115,"name":"Kiribati","code":"KI","flag":"🇰🇮"},{"id":116,"name":"Kosovo","code":"XK","flag":"🇽🇰"},{"id":117,"name":"Kuwait","code":"KW","flag":"🇰🇼"},{"id":118,"name":"Kyrgyzstan","code":"KG","flag":"🇰🇬"},{"id":119,"name":"Laos","code":"LA","flag":"🇱🇦"},{"id":120,"name":"Latvia","code":"LV","flag":"🇱🇻"},{"id":121,"name":"Lebanon","code":"LB","flag":"🇱🇧"},{"id":122,"name":"Lesotho","code":"LS","flag":"🇱🇸"},{"id":123,"name":"Liberia","code":"LR","flag":"🇱🇷"},{"id":124,"name":"Libya","code":"LY","flag":"🇱🇾"},{"id":125,"name":"Liechtenstein","code":"LI","flag":"🇱🇮"},{"id":126,"name":"Lithuania","code":"LT","flag":"🇱🇹"},{"id":127,"name":"Luxembourg","code":"LU","flag":"🇱🇺"},{"id":128,"name":"Macao","code":"MO","flag":"🇲🇴"},{"id":129,"name":"Madagascar","code":"MG","flag":"🇲🇬"},{"id":130,"name":"Malawi","code":"MW","flag":"🇲🇼"},{"id":131,"name":"Malaysia","code":"MY","flag":"🇲🇾"},{"id":132,"name":"Maldives","code":"MV","flag":"🇲🇻"},{"id":133,"name":"Mali","code":"ML","flag":"🇲🇱"},{"id":134,"name":"Malta","code":"MT","flag":"🇲🇹"},{"id":135,"name":"Marshall Islands","code":"MH","flag":"🇲🇭"},{"id":136,"name":"Martinique","code":"MQ","flag":"🇲🇶"},{"id":137,"name":"Mauritania","code":"MR","flag":"🇲🇷"},{"id":138,"name":"Mauritius","code":"MU","flag":"🇲🇺"},{"id":139,"name":"Mayotte","code":"YT","flag":"🇾🇹"},{"id":140,"name":"Mexico","code":"MX","flag":"🇲🇽"},{"id":141,"name":"Micronesia","code":"FM","flag":"🇫🇲"},{"id":142,"name":"Moldova","code":"MD","flag":"🇲🇩"},{"id":143,"name":"Monaco","code":"MC","flag":"🇲🇨"},{"id":144,"name":"Mongolia","code":"MN","flag":"🇲🇳"},{"id":145,"name":"Montenegro","code":"ME","flag":"🇲🇪"},{"id":146,"name":"Montserrat","code":"MS","flag":"🇲🇸"},{"id":147,"name":"Morocco","code":"MA","flag":"🇲🇦"},{"id":148,"name":"Mozambique","code":"MZ","flag":"🇲🇿"},{"id":149,"name":"Myanmar","code":"MM","flag":"🇲🇲"},{"id":150,"name":"Namibia","code":"NA","flag":"🇳🇦"},{"id":151,"name":"Nauru","code":"NR","flag":"🇳🇷"},{"id":152,"name":"Nepal","code":"NP","flag":"🇳🇵"},{"id":153,"name":"Netherlands","code":"NL","flag":"🇳🇱"},{"id":154,"name":"New Caledonia","code":"NC","flag":"🇳🇨"},{"id":155,"name":"New Zealand","code":"NZ","flag":"🇳🇿"},{"id":156,"name":"Nicaragua","code":"NI","flag":"🇳🇮"},{"id":157,"name":"Niger","code":"NE","flag":"🇳🇪"},{"id":158,"name":"Nigeria","code":"NG","flag":"🇳🇬"},{"id":159,"name":"Niue","code":"NU","flag":"🇳🇺"},{"id":160,"name":"Norfolk Island","code":"NF","flag":"🇳🇫"},{"id":161,"name":"North Korea","code":"KP","flag":"🇰🇵"},{"id":162,"name":"North Macedonia","code":"MK","flag":"🇲🇰"},{"id":163,"name":"Northern Mariana Islands","code":"MP","flag":"🇲🇵"},{"id":164,"name":"Norway","code":"NO","flag":"🇳🇴"},{"id":165,"name":"Oman","code":"OM","flag":"🇴🇲"},{"id":166,"name":"Pakistan","code":"PK","flag":"🇵🇰"},{"id":167,"name":"Palau","code":"PW","flag":"🇵🇼"},{"id":168,"name":"Palestine","code":"PS","flag":"🇵🇸"},{"id":169,"name":"Panama","code":"PA","flag":"🇵🇦"},{"id":170,"name":"Papua New Guinea","code":"PG","flag":"🇵🇬"},{"id":171,"name":"Paraguay","code":"PY","flag":"🇵🇾"},{"id":172,"name":"Peru","code":"PE","flag":"🇵🇪"},{"id":173,"name":"Philippines","code":"PH","flag":"🇵🇭"},{"id":174,"name":"Pitcairn","code":"PN","flag":"🇵🇳"},{"id":175,"name":"Poland","code":"PL","flag":"🇵🇱"},{"id":176,"name":"Portugal","code":"PT","flag":"🇵🇹"},{"id":177,"name":"Puerto Rico","code":"PR","flag":"🇵🇷"},{"id":178,"name":"Qatar","code":"QA","flag":"🇶🇦"},{"id":179,"name":"Republic of the Congo","code":"CD","flag":"🇨🇩"},{"id":180,"name":"Romania","code":"RO","flag":"🇷🇴"},{"id":181,"name":"Russia","code":"RU","flag":"🇷🇺"},{"id":182,"name":"Rwanda","code":"RW","flag":"🇷🇼"},{"id":183,"name":"Réunion","code":"RE","flag":"🇷🇪"},{"id":184,"name":"Saint Barthélemy","code":"BL","flag":"🇧🇱"},{"id":185,"name":"Saint Helena","code":"SH","flag":"🇸🇭"},{"id":186,"name":"Saint Kitts and Nevis","code":"KN","flag":"🇰🇳"},{"id":187,"name":"Saint Lucia","code":"LC","flag":"🇱🇨"},{"id":188,"name":"Saint Martin (French part)","code":"MF","flag":"🇲🇫"},{"id":189,"name":"Saint Pierre and Miquelon","code":"PM","flag":"🇵🇲"},{"id":190,"name":"Saint Vincent and the Grenadines","code":"VC","flag":"🇻🇨"},{"id":191,"name":"Samoa","code":"WS","flag":"🇼🇸"},{"id":192,"name":"San Marino","code":"SM","flag":"🇸🇲"},{"id":193,"name":"Sao Tome and Principe","code":"ST","flag":"🇸🇹"},{"id":194,"name":"Saudi Arabia","code":"SA","flag":"🇸🇦"},{"id":195,"name":"Senegal","code":"SN","flag":"🇸🇳"},{"id":196,"name":"Serbia","code":"RS","flag":"🇷🇸"},{"id":197,"name":"Seychelles","code":"SC","flag":"🇸🇨"},{"id":198,"name":"Sierra Leone","code":"SL","flag":"🇸🇱"},{"id":199,"name":"Singapore","code":"SG","flag":"🇸🇬"},{"id":200,"name":"Sint Maarten (Dutch part)","code":"SX","flag":"🇸🇽"},{"id":201,"name":"Slovakia","code":"SK","flag":"🇸🇰"},{"id":202,"name":"Slovenia","code":"SI","flag":"🇸🇮"},{"id":203,"name":"Solomon Islands","code":"SB","flag":"🇸🇧"},{"id":204,"name":"Somalia","code":"SO","flag":"🇸🇴"},{"id":205,"name":"South Africa","code":"ZA","flag":"🇿🇦"},{"id":206,"name":"South Georgia and the South Sandwich Islands","code":"GS","flag":"🇬🇸"},{"id":207,"name":"South Korea","code":"KR","flag":"🇰🇷"},{"id":208,"name":"South Sudan","code":"SS","flag":"🇸🇸"},{"id":209,"name":"Spain","code":"ES","flag":"🇪🇸"},{"id":210,"name":"Sri Lanka","code":"LK","flag":"🇱🇰"},{"id":211,"name":"Sudan","code":"SD","flag":"🇸🇩"},{"id":212,"name":"Suriname","code":"SR","flag":"🇸🇷"},{"id":213,"name":"Svalbard and Jan Mayen","code":"SJ","flag":"🇸🇯"},{"id":214,"name":"Sweden","code":"SE","flag":"🇸🇪"},{"id":215,"name":"Switzerland","code":"CH","flag":"🇨🇭"},{"id":216,"name":"Syrian Arab Republic","code":"SY","flag":"🇸🇾"},{"id":217,"name":"Taiwan","code":"TW","flag":"🇹🇼"},{"id":218,"name":"Tajikistan","code":"TJ","flag":"🇹🇯"},{"id":219,"name":"Tanzania","code":"TZ","flag":"🇹🇿"},{"id":220,"name":"Thailand","code":"TH","flag":"🇹🇭"},{"id":221,"name":"Timor-Leste","code":"TL","flag":"🇹🇱"},{"id":222,"name":"Togo","code":"TG","flag":"🇹🇬"},{"id":223,"name":"Tokelau","code":"TK","flag":"🇹🇰"},{"id":224,"name":"Tonga","code":"TO","flag":"🇹🇴"},{"id":225,"name":"Trinidad and Tobago","code":"TT","flag":"🇹🇹"},{"id":226,"name":"Tunisia","code":"TN","flag":"🇹🇳"},{"id":227,"name":"Turkmenistan","code":"TM","flag":"🇹🇲"},{"id":228,"name":"Turks and Caicos Islands","code":"TC","flag":"🇹🇨"},{"id":229,"name":"Tuvalu","code":"TV","flag":"🇹🇻"},{"id":230,"name":"Türkiye","code":"TR","flag":"🇹🇷"},{"id":231,"name":"Uganda","code":"UG","flag":"🇺🇬"},{"id":232,"name":"Ukraine","code":"UA","flag":"🇺🇦"},{"id":233,"name":"United Arab Emirates","code":"AE","flag":"🇦🇪"},{"id":234,"name":"United Kingdom","code":"GB","flag":"🇬🇧"},{"id":235,"name":"United States","code":"US","flag":"🇺🇸"},{"id":236,"name":"United States Minor Outlying Islands","code":"UM","flag":"🇺🇲"},{"id":237,"name":"Uruguay","code":"UY","flag":"🇺🇾"},{"id":238,"name":"Uzbekistan","code":"UZ","flag":"🇺🇿"},{"id":239,"name":"Vanuatu","code":"VU","flag":"🇻🇺"},{"id":240,"name":"Vatican City","code":"VA","flag":"🇻🇦"},{"id":241,"name":"Venezuela","code":"VE","flag":"🇻🇪"},{"id":242,"name":"Viet Nam","code":"VN","flag":"🇻🇳"},{"id":243,"name":"Virgin Islands","code":"VG","flag":"🇻🇬"},{"id":244,"name":"Virgin Islands","code":"VI","flag":"🇻🇮"},{"id":245,"name":"Wallis and Futuna","code":"WF","flag":"🇼🇫"},{"id":246,"name":"Western Sahara","code":"EH","flag":"🇪🇭"},{"id":247,"name":"Yemen","code":"YE","flag":"🇾🇪"},{"id":248,"name":"Zambia","code":"ZM","flag":"🇿🇲"},{"id":249,"name":"Zimbabwe","code":"ZW","flag":"🇿🇼"},{"id":250,"name":"Åland Islands","code":"AX","flag":"🇦🇽"},{"id":251,"name":"Canary Islands","code":"IC","flag":"🇮🇨"}]` + ), + te = { + seasons: Hn, + regionSize: Wn, + refreshIntervalMs: Yn, + colors: Zn, + errors: Qn, + items: Xn, + products: ea, + countries: ta, + }, + na = te, + pe = te.seasons.length - 1, + Sa = te.seasons[pe].zoom, + Ta = te.seasons[pe].tileSize; +function Ea(a) { + return na.countries[a - 1]; +} +function aa(a) { + return X.data ? X.data.experiments[a] ?? null : null; +} +function va(a) { + var e, t; + return ( + ((t = (e = X.data) == null ? void 0 : e.experiments[a]) == null + ? void 0 + : t.enabled) ?? !0 + ); +} +var V; +class ra { + constructor(e) { + h(this, V, y(!0)); + this.url = e; + } + get online() { + return p(u(this, V)); + } + set online(e) { + w(u(this, V), e, !0); + } + async paint(e, t, n) { + const s = Vn(e, (d) => `t=(${d.tile[0]},${d.tile[1]}),s=${d.season}`), + r = aa("2025-09_pawtect"); + if (!r) throw new Error("paint request while pawtect experiment not found"); + const o = ( + await Promise.all( + Object.values(s).map((d) => { + const [c, S] = d[0].tile, + b = d[0].season, + we = { + colors: d.map((ne) => ne.colorIdx), + coords: d.flatMap((ne) => ne.pixel), + t, + fp: n, + }, + ae = JSON.stringify(we); + return this.request(`/s${b}/pixel/${c}/${S}`, { + method: "POST", + body: ae, + headers: { + "x-pawtect-token": r.variant !== "disabled" ? De(ae) : "", + "x-pawtect-variant": r.variant, + }, + credentials: "include", + }); + }) + ) + ).filter((d) => d.status !== 200); + if (o.length) { + const d = o[0]; + if (d.status === 401) throw new Error(Ke()); + if (d.status === 403) { + if (d.headers.get("cf-mitigated") === "challenge") + throw new Error(zt()); + const c = await d.json(); + if ((c == null ? void 0 : c.error) === "refresh") throw new Error(Wt()); + if ((c == null ? void 0 : c.error) === "color-not-owned") + throw new Error(kn()); + X.refresh(); + } else if (d.status === 451) { + const c = await o[0].json(); + c == null || c.err; + const S = c == null ? void 0 : c.suspension; + if (S === "ban") throw new Error(An()); + if (S === "timeout") { + const b = new Date( + Date.now() + ((c == null ? void 0 : c.durationMs) ?? 0) + ); + throw new Error(In({ until: b.toLocaleString() })); + } else throw new Error(i()); + } else throw new Error(i()); + } + } + async getPixelInfo({ + season: e, + tile: [t, n], + pixel: [s, r], + isModerator: l = !1, + }) { + const o = new URLSearchParams(); + o.set("x", String(s)), o.set("y", String(r)); + const d = await this.request( + `${l ? "/moderator" : ""}/s${e}/pixel/${t}/${n}?${o.toString()}`, + { credentials: l ? "include" : void 0 } + ); + if (d.status !== 200) { + const c = await d.text(); + throw new Error(He({ err: c })); + } + return d.json(); + } + async getPixelAreaInfo({ season: e, tile: [t, n], p0: [s, r], p1: [l, o] }) { + const d = await this.request( + `/moderator/pixel-area/s${e}/${t}/${n}?x0=${s}&y0=${r}&x1=${l}&y1=${o}`, + { credentials: "include" } + ); + if (d.status !== 200) { + const c = await d.text(); + throw ( + (console.error("Error while fetching pixel area info", c), + new Error(i())) + ); + } + return d.json(); + } + async me() { + const e = await this.request("/me", { credentials: "include" }); + if (e.status === 200) return await e.json(); + } + async logout() { + const e = await this.request("/auth/logout", { + method: "POST", + credentials: "include", + }); + if (e.status !== 200) throw new Error(await e.text()); + return await e.json(); + } + async refreshPaymentSession(e) { + return ( + ( + await this.request( + `/payment/refresh-session/${encodeURIComponent(e)}`, + { method: "POST", credentials: "include" } + ) + ).status === 200 + ); + } + async getOtpCooldown() { + const e = await this.request("/otp/cooldown", { credentials: "include" }); + if (e.status !== 200) throw new Error(i()); + return await e.json(); + } + async sendOtp(e) { + const t = await this.request("/otp/send", { + method: "POST", + credentials: "include", + body: JSON.stringify({ phone: e }), + }); + if (t.status === 400) throw new Error(Ze()); + if (t.status === 403) throw new Error(et()); + if (t.status === 429) throw new Error(at()); + if (t.status !== 200) throw new Error(i()); + return await t.json(); + } + async verifyOtp(e) { + const t = await this.request("/otp/verify", { + method: "POST", + credentials: "include", + body: JSON.stringify({ code: e }), + }); + if (t.status === 400) throw new Error(ot()); + if (t.status !== 200) throw new Error(i()); + return await t.json(); + } + async updateMe(e) { + const t = await this.request("/me/update", { + method: "POST", + credentials: "include", + body: JSON.stringify(e), + }); + if (t.status === 400) { + const n = await t.json(); + throw (n == null ? void 0 : n.error) === "invalid_name" + ? new Error(Bn()) + : (n == null ? void 0 : n.error) === "invalid_discord" + ? new Error(Rn()) + : new Error(n == null ? void 0 : n.error); + } else if (t.status !== 200) throw new Error(i()); + } + async deleteMe(e) { + const t = await this.request("/me", { + method: "DELETE", + credentials: "include", + body: JSON.stringify({ confirmText: e }), + }); + if (t.status === 400) throw new Error(Fn()); + if (t.status !== 200) throw new Error(i()); + } + async favoriteLocation(e) { + const t = await this.request("/favorite-location", { + method: "POST", + body: JSON.stringify({ latitude: e[0], longitude: e[1] }), + credentials: "include", + }); + if (t.status === 403) throw new Error(lt()); + if (t.status !== 200) throw new Error(i()); + } + async deleteFavoriteLocation(e) { + if ( + ( + await this.request("/favorite-location/delete", { + method: "POST", + body: JSON.stringify({ id: e }), + credentials: "include", + }) + ).status !== 200 + ) + throw new Error(i()); + } + async updateFavoriteLocation(e, t) { + const n = await this.request("/favorite-location/update", { + method: "POST", + body: JSON.stringify({ id: e, name: t }), + credentials: "include", + }); + if (n.status === 400) throw new Error(gt()); + if (n.status !== 200) throw new Error(i()); + } + async leaderboardPlayers(e) { + const t = await this.request(`/leaderboard/player/${e}`); + if (t.status !== 200) throw new Error(v()); + return t.json(); + } + async leaderboardAlliances(e) { + const t = await this.request(`/leaderboard/alliance/${e}`); + if (t.status !== 200) throw new Error(v()); + return t.json(); + } + async leaderboardRegions(e, t = 0) { + const n = await this.request(`/leaderboard/region/${e}/${t}`); + if (n.status === 200) return n.json(); + throw new Error(v()); + } + async leaderboardRegionPlayers(e, t) { + const n = await this.request(`/leaderboard/region/players/${e}/${t}`); + if (n.status === 200) return n.json(); + throw new Error(v()); + } + async leaderboardRegionAlliances(e, t) { + const n = await this.request(`/leaderboard/region/alliances/${e}/${t}`); + if (n.status === 200) return n.json(); + throw new Error(v()); + } + async leaderboardCountries(e) { + const t = await this.request(`/leaderboard/country/${e}`, { + credentials: "include", + }); + if (t.status === 200) return t.json(); + throw new Error(v()); + } + async getRandomTile(e) { + const t = await this.request(`/s${e}/tile/random`); + if (t.status !== 200) throw new Error(i()); + return t.json(); + } + async purchase(e) { + const t = await this.request("/purchase", { + method: "POST", + credentials: "include", + body: JSON.stringify({ product: e }), + }); + if (t.status !== 200) + throw t.status === 404 + ? new Error(ht()) + : t.status === 403 + ? new Error(wt()) + : t.status === 409 + ? new Error(St()) + : new Error(i()); + } + async getAlliance() { + const e = await this.request("/alliance", { credentials: "include" }); + if (e.status === 200) return e.json(); + if (e.status === 404) return; + throw new Error(i()); + } + async createAlliance(e) { + const t = await this.request("/alliance", { + method: "POST", + credentials: "include", + body: JSON.stringify({ name: e }), + }); + if (t.status === 200) return t.json(); + if (t.status === 400) { + const n = await t.json(); + throw n.error === "max_characters" + ? new Error(vt()) + : n.error === "name_taken" + ? new Error(xt()) + : n.error == "empty_name" + ? new Error(Lt()) + : new Error(i()); + } else throw t.status === 403 ? new Error(qt()) : new Error(i()); + } + async leaveAlliance() { + if ( + ( + await this.request("/alliance/leave", { + method: "POST", + credentials: "include", + }) + ).status !== 200 + ) + throw new Error(i()); + } + async updateAllianceDescription(e) { + const t = await this.request("/alliance/update-description", { + method: "POST", + credentials: "include", + body: JSON.stringify({ description: e }), + }); + if (t.status !== 200) + throw t.status === 403 ? new Error(E()) : new Error(i()); + } + async updateAllianceHeadquarters(e, t) { + const n = await this.request("/alliance/update-headquarters", { + method: "POST", + credentials: "include", + body: JSON.stringify({ latitude: e, longitude: t }), + }); + if (n.status !== 200) + throw n.status === 403 ? new Error(E()) : new Error(i()); + } + async allianceLeaderboard(e) { + const t = await this.request(`/alliance/leaderboard/${e}`, { + credentials: "include", + }); + if (t.status === 200) return t.json(); + throw t.status === 403 ? new Error(E()) : new Error(v()); + } + async getAllianceInvites() { + const e = await this.request("/alliance/invites", { + credentials: "include", + }); + if (e.status === 200) return e.json(); + throw e.status === 403 ? new Error(E()) : new Error(i()); + } + async joinAlliance(e) { + switch ( + (await this.request(`/alliance/join/${e}`, { credentials: "include" })) + .status + ) { + case 200: + return "success"; + case 208: + return "in-another-alliance"; + case 401: + return "not-logged-in"; + case 403: + return "banned"; + case 400: + case 404: + return "invalid-invite"; + default: + return "error"; + } + } + async getAllianceMembers(e) { + const t = await this.request(`/alliance/members/${e}`, { + credentials: "include", + }); + if (t.status === 200) return t.json(); + throw new Error(i()); + } + async getAllianceBannedMembers(e) { + const t = await this.request(`/alliance/members/banned/${e}`, { + credentials: "include", + }); + if (t.status === 200) return t.json(); + throw new Error(i()); + } + async getAllianceById(e) { + const t = await this.request(`/admin/alliances/${e}`, { + method: "GET", + credentials: "include", + }); + if (t.status === 404) return; + if (t.status !== 200) throw new f(i(), t.status); + const n = await t.json(); + return { + id: Number(n.id), + name: String(n.name), + pixelsPainted: Number((n == null ? void 0 : n.pixels_painted) ?? 0), + }; + } + async searchAlliance(e) { + const t = new URLSearchParams({ q: e }), + n = await this.request(`/admin/alliances/search?${t.toString()}`, { + method: "GET", + credentials: "include", + }); + if (n.status !== 200) throw new f(i(), n.status); + const s = await n.json(); + return (Array.isArray(s) ? s : []).map((r) => ({ + id: Number(r.id), + name: String(r.name ?? ""), + pixelsPainted: Number((r == null ? void 0 : r.pixels_painted) ?? 0), + })); + } + async searchAlliances(e) { + return this.searchAlliance(e); + } + async getAllianceFull(e) { + const t = await this.request(`/admin/alliances/${e}/full`, { + method: "GET", + credentials: "include", + }); + if (t.status === 404) return null; + if (t.status !== 200) throw new f(i(), t.status); + const n = await t.json(), + s = Array.isArray(n == null ? void 0 : n.members) ? n.members : []; + return { + id: Number(n == null ? void 0 : n.id), + name: String((n == null ? void 0 : n.name) ?? ""), + description: (n == null ? void 0 : n.description) ?? null, + ownerId: Number( + (n == null ? void 0 : n.ownerId) ?? (n == null ? void 0 : n.created_by) + ), + ownerName: (n == null ? void 0 : n.ownerName) ?? null, + hqName: (n == null ? void 0 : n.hqName) ?? null, + hqLatitude: + (n == null ? void 0 : n.hqLatitude) ?? + (n == null ? void 0 : n.hq_latitude) ?? + null, + hqLongitude: + (n == null ? void 0 : n.hqLongitude) ?? + (n == null ? void 0 : n.hq_longitude) ?? + null, + pixelsPainted: Number( + (n == null ? void 0 : n.pixelsPainted) ?? + (n == null ? void 0 : n.pixels_painted) ?? + 0 + ), + membersCount: Number((n == null ? void 0 : n.membersCount) ?? s.length), + members: s.map((r) => ({ + id: Number(r == null ? void 0 : r.id), + name: String( + (r == null ? void 0 : r.name) ?? `#${r == null ? void 0 : r.id}` + ), + picture: (r == null ? void 0 : r.picture) ?? null, + pixelsPainted: Number( + (r == null ? void 0 : r.pixelsPainted) ?? + (r == null ? void 0 : r.pixels_painted) ?? + 0 + ), + lastPixelLatitude: (r == null ? void 0 : r.lastPixelLatitude) ?? null, + lastPixelLongitude: (r == null ? void 0 : r.lastPixelLongitude) ?? null, + role: + (r == null ? void 0 : r.alliance_role) === "admin" || + (r == null ? void 0 : r.role) === "admin" + ? "admin" + : "member", + })), + }; + } + async getAdminAllianceMembers(e, t) { + const n = new URLSearchParams({ + page: String(t.page), + pageSize: String(t.pageSize), + }), + s = await this.request(`/admin/alliances/${e}/members?${n.toString()}`, { + method: "GET", + credentials: "include", + }); + if (s.status === 404) return { members: [], total: 0 }; + if (s.status !== 200) throw new f(i(), s.status); + const r = await s.json(), + l = Array.isArray(r == null ? void 0 : r.members) ? r.members : []; + return { + members: l.map((o) => ({ + id: Number(o == null ? void 0 : o.id), + name: String( + (o == null ? void 0 : o.name) ?? `#${o == null ? void 0 : o.id}` + ), + picture: (o == null ? void 0 : o.picture) ?? null, + pixelsPainted: Number( + (o == null ? void 0 : o.pixelsPainted) ?? + (o == null ? void 0 : o.pixels_painted) ?? + 0 + ), + lastPixelLatitude: (o == null ? void 0 : o.lastPixelLatitude) ?? null, + lastPixelLongitude: (o == null ? void 0 : o.lastPixelLongitude) ?? null, + role: + (o == null ? void 0 : o.alliance_role) === "admin" || + (o == null ? void 0 : o.role) === "admin" + ? "admin" + : "member", + })), + total: Number((r == null ? void 0 : r.total) ?? l.length), + }; + } + async renameAlliance(e, t) { + const n = await this.request(`/admin/alliances/${e}/rename`, { + method: "POST", + credentials: "include", + body: JSON.stringify({ name: t }), + }); + if (n.status === 400) { + const s = await n.json().catch(() => ({})); + throw new Error((s == null ? void 0 : s.error) ?? i()); + } else if (n.status !== 200) throw new f(i(), n.status); + } + async changeAllianceLeader(e, t) { + const n = await this.request(`/admin/alliances/${e}/leader`, { + method: "POST", + credentials: "include", + body: JSON.stringify({ newLeaderUserId: t }), + }); + if (n.status === 400) { + const s = await n.json(); + throw (s == null ? void 0 : s.error) === "user_not_in_alliance" + ? new Error(Mn()) + : new Error(i()); + } else if (n.status !== 200) throw new f(i(), n.status); + } + async banAllAllianceMembers(e, t, n) { + const s = await this.request(`/admin/alliances/${e}/ban-all`, { + method: "POST", + credentials: "include", + body: JSON.stringify({ reason: t, notes: n }), + }); + if (s.status !== 200) throw new f(i(), s.status); + } + async setAllianceMemberRole(e, t, n) { + const s = await this.request(`/admin/alliances/${e}/members/${t}/role`, { + method: "POST", + credentials: "include", + body: JSON.stringify({ role: n }), + }); + if (s.status !== 200) throw new f(i(), s.status); + } + async removeAllianceMember(e, t) { + const n = await this.request(`/admin/alliances/${e}/members/${t}/remove`, { + method: "POST", + credentials: "include", + }); + if (n.status !== 200) throw new f(i(), n.status); + } + async giveAllianceAdmin(e) { + const t = await this.request("/alliance/give-admin", { + body: JSON.stringify({ promotedUserId: e }), + method: "POST", + credentials: "include", + }); + if (t.status !== 200) + throw t.status === 403 ? new Error(E()) : new Error(i()); + } + async banAllianceUser(e) { + const t = await this.request("/alliance/ban", { + body: JSON.stringify({ bannedUserId: e }), + method: "POST", + credentials: "include", + }); + if (t.status !== 200) + throw t.status === 403 ? new Error(E()) : new Error(i()); + } + async equipFlag(e) { + if ( + ( + await this.request(`/flag/equip/${e}`, { + method: "POST", + credentials: "include", + }) + ).status !== 200 + ) + throw new Error(i()); + } + async getMyProfilePictures() { + const e = await this.request("/me/profile-pictures", { + credentials: "include", + }); + if (e.status !== 200) throw new Error(i()); + return e.json(); + } + async changeProfilePicture(e) { + if ( + ( + await this.request("/me/profile-picture/change", { + method: "POST", + credentials: "include", + body: JSON.stringify({ pictureId: e }), + }) + ).status !== 200 + ) + throw new Error(i()); + } + async unbanAllianceUser(e) { + const t = await this.request("/alliance/unban", { + body: JSON.stringify({ unbannedUserId: e }), + method: "POST", + credentials: "include", + }); + if (t.status !== 200) + throw t.status === 403 ? new Error(E()) : new Error(i()); + } + async health() { + return (await this.request("/health")).json(); + } + async generatePixQrCode(e) { + const t = await this.request(`/payment/abacatepay/create/pix/${e}`, { + method: "POST", + credentials: "include", + }); + if (t.status === 400) { + const s = await t.json(); + throw new Error(s == null ? void 0 : s.error); + } else { + if (t.status === 451) throw new Error(Tn()); + if (t.status !== 200) throw new Error(i()); + } + return await t.json(); + } + async refreshPixPayment(e) { + const t = await this.request(`/payment/abacatepay/refresh/pix/${e}`, { + method: "POST", + credentials: "include", + }); + if (t.status === 400) { + const n = await t.json(); + throw new Error(n == null ? void 0 : n.error); + } else if (t.status !== 200) + throw new Error("Unexpected error on the server. Try again later"); + return t.json(); + } + async getPixStatus(e) { + const t = await this.request(`/payment/abacatepay/status/pix/${e}`, { + method: "GET", + credentials: "include", + }); + if (t.status !== 200) + throw new Error("Erro inesperado. Tente atualizar a página."); + return t.json(); + } + async getModeratorTickets() { + const e = await this.request("/moderator/tickets", { + method: "GET", + credentials: "include", + }); + if (e.status !== 200) throw new f(i(), e.status); + const t = await e.json(); + for (const n of t.tickets) + n.reports.sort((s, r) => le[s.reason] - le[r.reason]); + return t; + } + async countMyTicketsClosedToday() { + const e = await this.request("/moderator/count-my-tickets", { + method: "GET", + credentials: "include", + }); + if (e.status !== 200) throw new f(i(), e.status); + return e.json(); + } + async getNonPaidUserOpenTicketsCount() { + const e = await this.request("/moderator/open-tickets-count", { + method: "GET", + credentials: "include", + }); + if (e.status !== 200) throw new f(i(), e.status); + const { tickets: t } = await e.json(); + return t; + } + async assignNewTickets() { + const e = await this.request("/moderator/assign-new-tickets", { + method: "POST", + credentials: "include", + }); + if (e.status !== 200) throw new f(i(), e.status); + return e.json(); + } + async setTicketStatus(e, t, n, s) { + const r = await this.request("/moderator/set-ticket-status", { + method: "POST", + credentials: "include", + body: JSON.stringify({ + ticketId: e, + status: t, + selectedReportId: n, + assignedReason: s, + }), + }); + if (r.status !== 200) throw new f(i(), r.status); + } + async request(e, t) { + let n; + const s = me(); + if (s) { + const r = new Headers(t == null ? void 0 : t.headers); + r.set("x-alien-override", s.token), (t = { ...(t ?? {}), headers: r }); + } + try { + (n = await fetch(`${this.url}${e}`, t)), (this.online = !0); + } catch (r) { + throw ( + (console.error("Fetch error:", r), + (this.online = !1), + new Error(Ut(), { cause: r })) + ); + } + if (n.status === 429) throw new Error(ce()); + if (n.status === 503 || n.status === 408) throw new Error(ce()); + return n; + } + async getOpenTicketsSummary() { + const e = await this.request("/admin/count-all-tickets", { + method: "GET", + credentials: "include", + }); + if (e.status !== 200) throw new f(i(), e.status); + return e.json(); + } + async getOpenReportsSummary() { + const e = await this.request("/admin/count-all-reports", { + method: "GET", + credentials: "include", + }); + if (e.status !== 200) throw new f(i(), e.status); + return e.json(); + } + async getClosedTicketsByMod(e, t) { + const n = await this.request( + `/admin/closed-tickets?start=${encodeURIComponent( + e + )}&end=${encodeURIComponent(t)}`, + { method: "GET", credentials: "include" } + ); + if (n.status !== 200) throw new f(i(), n.status); + return (await n.json()).items.map((r) => ({ + ...r, + suspensionRate: (r.ban + r.timeout) / r.total, + })); + } + async getClosedReportsByMod(e, t) { + const n = await this.request( + `/admin/closed-reports?start=${encodeURIComponent( + e + )}&end=${encodeURIComponent(t)}`, + { method: "GET", credentials: "include" } + ); + if (n.status !== 200) throw new f(i(), n.status); + return (await n.json()).items.map((r) => ({ + ...r, + suspensionRate: (r.ban + r.timeout) / r.total, + })); + } + async getUserInfoById(e) { + const t = await this.request( + `/moderator/user-info/${encodeURIComponent(e)}`, + { method: "GET", credentials: "include" } + ); + if (t.status !== 404) { + if (t.status !== 200) throw new f(i(), t.status); + return t.json(); + } + } + async getMultipleUsersInfoById(e) { + const t = await this.request( + `/moderator/users?ids=${encodeURIComponent(e.join(","))}`, + { method: "GET", credentials: "include" } + ); + if (t.status !== 200) throw new f(i(), t.status); + return t.json(); + } + async getUserInfoFull(e) { + const t = await this.request(`/admin/users?id=${encodeURIComponent(e)}`, { + method: "GET", + credentials: "include", + }); + if (t.status !== 404) { + if (t.status !== 200) throw new f(i(), t.status); + return t.json(); + } + } + async removeTimeout(e) { + const t = await this.request("/admin/remove-timeout", { + method: "POST", + credentials: "include", + body: JSON.stringify({ userId: e }), + }); + if (t.status !== 200) throw new f(i(), t.status); + } + async removeBan(e) { + const t = await this.request("/admin/remove-ban", { + method: "POST", + credentials: "include", + body: JSON.stringify({ userId: e }), + }); + if (t.status !== 200) throw new f(i(), t.status); + } + async getUserNotes(e) { + const t = await this.request( + `/admin/users/notes?userId=${encodeURIComponent(e)}`, + { method: "GET", credentials: "include" } + ); + if (t.status !== 200) throw new f(i(), t.status); + return t.json(); + } + async addUserNote(e, t) { + const n = await this.request("/admin/users/notes", { + method: "POST", + credentials: "include", + body: JSON.stringify({ userId: e, note: t }), + }); + if (n.status !== 200) throw new f(i(), n.status); + } + async getUserPurchases(e) { + const t = await this.request( + `/admin/users/purchases?userId=${encodeURIComponent(e)}`, + { method: "GET", credentials: "include" } + ); + if (t.status !== 200) throw new f(i(), t.status); + const n = await t.json(); + return ( + Array.isArray(n == null ? void 0 : n.purchases) ? n.purchases : [] + ).map((r) => ({ + id: String(r.id ?? ""), + product_name: String(r.productName ?? r.product_name ?? ""), + price: Number(r.price ?? 0), + amount: Number(r.amount ?? 0), + createdAt: + typeof r.createdAt == "string" + ? r.createdAt + : r.CreatedAt + ? new Date(r.CreatedAt).toISOString() + : "", + })); + } + async postSetUserDroplets(e, t) { + const n = await this.request("/admin/users/set-user-droplets", { + method: "POST", + credentials: "include", + body: JSON.stringify({ userId: e, droplets: t }), + }); + if (n.status !== 200) throw new f(i(), n.status); + } + async getUserTickets(e) { + const { userId: t, kind: n, page: s = 0, pageSize: r = 20 } = e, + l = new URLSearchParams({ + userId: String(t), + kind: n, + page: String(s), + pageSize: String(r), + }), + o = await this.request(`/moderator/users/tickets?${l.toString()}`, { + method: "GET", + credentials: "include", + }); + if (o.status !== 200) throw new f(i(), o.status); + const d = await o.json(), + c = Array.isArray(d == null ? void 0 : d.tickets) ? d.tickets : []; + return ( + c.sort( + (S, b) => + new Date(b.createdAt).getTime() - new Date(S.createdAt).getTime() + ), + c + ); + } + mapTicketsToReportRows(e, t) { + var s, r, l, o, d; + const n = []; + for (const c of e) { + const S = c.status ?? "open"; + if (t === "received") { + for (const b of c.reports) + n.push({ + id: String(b.id), + ticketId: String(c.id), + createdAt: b.createdAt ?? c.createdAt, + byUser: { + id: Number(b.reportedBy), + name: String(b.reportedByName ?? b.reportedBy), + picture: b.reportedByPicture ?? null, + }, + reason: String(b.reason), + status: S, + }); + continue; + } + if (t === "sent") { + for (const b of c.reports) + n.push({ + id: String(b.id), + ticketId: String(c.id), + createdAt: b.createdAt ?? c.createdAt, + toUser: { + id: Number(c.reportedUser.id), + name: String(c.reportedUser.name), + picture: c.reportedUser.picture ?? null, + }, + reason: String(b.reason), + status: S, + }); + continue; + } + n.push({ + id: String(c.id), + ticketId: String(c.id), + createdAt: c.createdAt, + handledBy: + c.status && c.status !== "open" + ? { + id: ((s = c.handledBy) == null ? void 0 : s.id) ?? 0, + name: + ((r = c.handledBy) == null ? void 0 : r.name) ?? "Moderator", + picture: + ((l = c.handledBy) == null ? void 0 : l.picture) ?? null, + } + : { id: 0, name: "—", picture: null }, + reason: String( + ((d = (o = c.reports) == null ? void 0 : o[0]) == null + ? void 0 + : d.reason) ?? "other" + ), + status: S, + }); + } + return ( + n.sort( + (c, S) => + new Date(S.createdAt).getTime() - new Date(c.createdAt).getTime() + ), + n + ); + } + async getModeratorClosedTicketStats(e) { + const t = new URLSearchParams({ id: String(e) }).toString(), + n = await this.request(`/admin/users/tickets?${t}`, { + method: "GET", + credentials: "include", + }); + if (n.status !== 200) throw new f(i(), n.status); + return n.json(); + } + async postPawtectLoad() { + const e = await this.request("/pawtect/load", { + method: "POST", + credentials: "include", + body: JSON.stringify({ + pawtectMe: Ne(), + "paint-the": "world", + "but-not": "using-bots", + security: "/.well-known/security.txt", + }), + }); + if (e.status !== 204) throw new f(i(), e.status); + } + async unlinkDiscord() { + const e = await this.request("/discord/unlink", { + method: "POST", + credentials: "include", + }); + if (e.status !== 204) throw new f(i(), e.status); + } + async deleteSessions() { + const e = await this.request("/me/sessions", { + method: "DELETE", + credentials: "include", + }); + if (e.status !== 200) throw new f(i(), e.status); + } +} +V = new WeakMap(); +let de = new ra(ue); +export { + In as A, + ya as B, + pe as C, + Sa as D, + Ta as E, + la as F, + ua as G, + ue as P, + na as S, + Re as _, + de as a, + ba as b, + i as c, + qe as d, + da as e, + un as f, + ke as g, + rn as h, + Qt as i, + tn as j, + cn as k, + T as l, + ga as m, + fa as n, + aa as o, + _a as p, + ha as q, + pa as r, + wa as s, + ge as t, + X as u, + Ea as v, + Fn as w, + va as x, + ma as y, + An as z, +}; diff --git a/frontend-backup/_app/immutable/chunks/BSXXHLQ0.js b/frontend-backup/_app/immutable/chunks/BSXXHLQ0.js new file mode 100644 index 0000000..323f9bb --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/BSXXHLQ0.js @@ -0,0 +1,40 @@ +import { g as o } from "./CV9xcpLq.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + n = new e.Error().stack; + n && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[n] = "488cf311-8f60-4dea-820a-6e96b60c34c0"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-488cf311-8f60-4dea-820a-6e96b60c34c0")); + })(); +} catch {} +const t = () => "Go to map", + d = () => "Ir para o mapa", + l = (e = {}, n = {}) => ((n.locale ?? o()) === "en" ? t() : d()); +export { l as g }; diff --git a/frontend-backup/_app/immutable/chunks/BUhRjcOt.js b/frontend-backup/_app/immutable/chunks/BUhRjcOt.js deleted file mode 100644 index 4bcb327..0000000 --- a/frontend-backup/_app/immutable/chunks/BUhRjcOt.js +++ /dev/null @@ -1,34 +0,0 @@ -import { j as r, i as h, as as u, h as d, W as y, ak as c, a9 as i, V as o, O as s, o as f, P as _ } from "./BDALf20I.js"; -(function () { - try { - var a = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - a.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var a = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - n = new a.Error().stack; - n && ((a._sentryDebugIds = a._sentryDebugIds || {}), (a._sentryDebugIds[n] = "48e8c989-b08a-439a-98b9-6d268a42a85e"), (a._sentryDebugIdIdentifier = "sentry-dbid-48e8c989-b08a-439a-98b9-6d268a42a85e")); - })(); -} catch {} -let e; -function g() { - e = void 0; -} -function p(a) { - let n = null, - l = d; - var t; - if (d) { - for (n = f, e === void 0 && (e = _(document.head)); e !== null && (e.nodeType !== y || e.data !== c); ) e = i(e); - e === null ? o(!1) : (e = s(i(e))); - } - d || (t = document.head.appendChild(r())); - try { - h(() => a(t), u); - } finally { - l && (o(!0), (e = f), s(n)); - } -} -export { p as h, g as r }; diff --git a/frontend-backup/_app/immutable/chunks/Bke_korE.js b/frontend-backup/_app/immutable/chunks/Bke_korE.js deleted file mode 100644 index 3c9610a..0000000 --- a/frontend-backup/_app/immutable/chunks/Bke_korE.js +++ /dev/null @@ -1,224 +0,0 @@ -import { - i as N, - h as P, - e as L, - E as U, - R as Y, - T as j, - U as B, - O as M, - V as D, - j as q, - k as O, - l as C, - aM as F, - m as K, - a4 as z, - q as Q, - o as V, - aN as m, - aO as Z, - aP as $, - g as T, - D as G, - Q as H, - av as W, - aw as X, - aQ as J, - ad as k, - aR as ee, - aS as re, - z as ne, - aE as te, - aT as ae, - aU as se, - aV as ie, - S as A, - aW as x, - aX as y, -} from "./BDALf20I.js"; -(function () { - try { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - e.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - r = new e.Error().stack; - r && ((e._sentryDebugIds = e._sentryDebugIds || {}), (e._sentryDebugIds[r] = "59ee8b7d-c408-43d5-a8ba-5b74c35a16df"), (e._sentryDebugIdIdentifier = "sentry-dbid-59ee8b7d-c408-43d5-a8ba-5b74c35a16df")); - })(); -} catch {} -function de(e, r, t = !1) { - P && L(); - var n = e, - a = null, - f = null, - l = F, - c = t ? U : 0, - p = !1; - const S = (o, i = !0) => { - (p = !0), _(i, o); - }; - var u = null; - function w() { - u !== null && (u.lastChild.remove(), n.before(u), (u = null)); - var o = l ? a : f, - i = l ? f : a; - o && z(o), - i && - Q(i, () => { - l ? (f = null) : (a = null); - }); - } - const _ = (o, i) => { - if (l === (l = o)) return; - let E = !1; - if (P) { - const b = Y(n) === j; - !!l === b && ((n = B()), M(n), D(!1), (E = !0)); - } - var v = K(), - d = n; - if ((v && ((u = document.createDocumentFragment()), u.append((d = q()))), l ? a ?? (a = i && O(() => i(d))) : f ?? (f = i && O(() => i(d))), v)) { - var h = C, - g = l ? a : f, - s = l ? f : a; - g && h.skipped_effects.delete(g), s && h.skipped_effects.add(s), h.add_callback(w); - } else w(); - E && D(!0); - }; - N(() => { - (p = !1), r(S), p || _(null, null); - }, c), - P && (n = V); -} -let I = !1; -function fe(e) { - var r = I; - try { - return (I = !1), [e(), I]; - } finally { - I = r; - } -} -function ce(e, r = 1) { - const t = e(); - return e(t + r), t; -} -const ue = { - get(e, r) { - if (!e.exclude.includes(r)) return e.props[r]; - }, - set(e, r) { - return !1; - }, - getOwnPropertyDescriptor(e, r) { - if (!e.exclude.includes(r) && r in e.props) return { enumerable: !0, configurable: !0, value: e.props[r] }; - }, - has(e, r) { - return e.exclude.includes(r) ? !1 : r in e.props; - }, - ownKeys(e) { - return Reflect.ownKeys(e.props).filter((r) => !e.exclude.includes(r)); - }, -}; -function _e(e, r, t) { - return new Proxy({ props: e, exclude: r }, ue); -} -const le = { - get(e, r) { - let t = e.props.length; - for (; t--; ) { - let n = e.props[t]; - if ((y(n) && (n = n()), typeof n == "object" && n !== null && r in n)) return n[r]; - } - }, - set(e, r, t) { - let n = e.props.length; - for (; n--; ) { - let a = e.props[n]; - y(a) && (a = a()); - const f = m(a, r); - if (f && f.set) return f.set(t), !0; - } - return !1; - }, - getOwnPropertyDescriptor(e, r) { - let t = e.props.length; - for (; t--; ) { - let n = e.props[t]; - if ((y(n) && (n = n()), typeof n == "object" && n !== null && r in n)) { - const a = m(n, r); - return a && !a.configurable && (a.configurable = !0), a; - } - } - }, - has(e, r) { - if (r === A || r === x) return !1; - for (let t of e.props) if ((y(t) && (t = t()), t != null && r in t)) return !0; - return !1; - }, - ownKeys(e) { - const r = []; - for (let t of e.props) - if ((y(t) && (t = t()), !!t)) { - for (const n in t) r.includes(n) || r.push(n); - for (const n of Object.getOwnPropertySymbols(t)) r.includes(n) || r.push(n); - } - return r; - }, -}; -function pe(...e) { - return new Proxy({ props: e }, le); -} -function ve(e, r, t, n) { - var g; - var a = !te || (t & ae) !== 0, - f = (t & re) !== 0, - l = (t & ie) !== 0, - c = n, - p = !0, - S = () => (p && ((p = !1), (c = l ? ne(n) : n)), c), - u; - if (f) { - var w = A in e || x in e; - u = ((g = m(e, r)) == null ? void 0 : g.set) ?? (w && r in e ? (s) => (e[r] = s) : void 0); - } - var _, - o = !1; - f ? ([_, o] = fe(() => e[r])) : (_ = e[r]), _ === void 0 && n !== void 0 && ((_ = S()), u && (a && Z(), u(_))); - var i; - if ( - (a - ? (i = () => { - var s = e[r]; - return s === void 0 ? S() : ((p = !0), s); - }) - : (i = () => { - var s = e[r]; - return s !== void 0 && (c = void 0), s === void 0 ? c : s; - }), - a && (t & $) === 0) - ) - return i; - if (u) { - var E = e.$$legacy; - return function (s, b) { - return arguments.length > 0 ? ((!a || !b || E || o) && u(b ? i() : s), s) : i(); - }; - } - var v = !1, - d = ((t & se) !== 0 ? G : H)(() => ((v = !1), i())); - f && T(d); - var h = k; - return function (s, b) { - if (arguments.length > 0) { - const R = b ? T(d) : a && f ? W(s) : s; - return X(d, R), (v = !0), c !== void 0 && (c = R), s; - } - return (J && v) || (h.f & ee) !== 0 ? d.v : T(d); - }; -} -export { de as i, ve as p, _e as r, pe as s, ce as u }; diff --git a/frontend-backup/_app/immutable/chunks/Blc0Ir5M.js b/frontend-backup/_app/immutable/chunks/Blc0Ir5M.js new file mode 100644 index 0000000..490f29f --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/Blc0Ir5M.js @@ -0,0 +1,40 @@ +import { g as d } from "./CV9xcpLq.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + n = new e.Error().stack; + n && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[n] = "e0ae0548-fcbf-4f39-9ea8-c8dece67686b"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-e0ae0548-fcbf-4f39-9ea8-c8dece67686b")); + })(); +} catch {} +const o = () => "No data.", + t = () => "Sem dados.", + l = (e = {}, n = {}) => ((n.locale ?? d()) === "en" ? o() : t()); +export { l as n }; diff --git a/frontend-backup/_app/immutable/chunks/Bn0Xcwmn.js b/frontend-backup/_app/immutable/chunks/Bn0Xcwmn.js new file mode 100644 index 0000000..ef0eac4 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/Bn0Xcwmn.js @@ -0,0 +1,369 @@ +import "./Ch2Ub8FX.js"; +import { + ac as ce, + z as se, + H as oe, + C as de, + aZ as fe, + p as W, + aw as D, + au as U, + ay as ue, + a as X, + g as v, + b as w, + c as p, + f as V, + t as j, + u as $, + v as ee, + av as ve, + d, + r as f, + s as u, +} from "./CMvZtFtm.js"; +import { s as y } from "./DVA6u9-7.js"; +import { p as c, i as B, r as te } from "./BF50aS-j.js"; +import { a as A, c as G, b as ae, s as Z } from "./C5yqZvKC.js"; +import { b as me } from "./0wx1llIh.js"; +import { g as R, d as J, P as _e, e as be } from "./BRM3t761.js"; +import { o as ge } from "./DoL3ojdE.js"; +import { g as L } from "./CV9xcpLq.js"; +import { L as he } from "./D3yDgRbd.js"; +(function () { + try { + var a = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + a.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var a = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + e = new a.Error().stack; + e && + ((a._sentryDebugIds = a._sentryDebugIds || {}), + (a._sentryDebugIds[e] = "8a104a20-9809-4c08-9bf0-4d230399adad"), + (a._sentryDebugIdIdentifier = + "sentry-dbid-8a104a20-9809-4c08-9bf0-4d230399adad")); + })(); +} catch {} +function ye(a, e, n) { + ce(() => { + var r = se(() => e(a, n == null ? void 0 : n()) || {}); + if (n && r != null && r.update) { + var _ = !1, + m = {}; + oe(() => { + var s = n(); + de(s), _ && fe(m, s) && ((m = s), r.update(s)); + }), + (_ = !0); + } + if (r != null && r.destroy) return () => r.destroy(); + }); +} +const we = (a) => `Login with ${a.name}`, + xe = (a) => `Entrar com ${a.name}`, + Q = (a, e = {}) => ((e.locale ?? L()) === "en" ? we(a) : xe(a)), + ke = () => "By continuing, you agree to our", + Ie = () => "Ao continuar, você concorda com nossos", + Le = (a = {}, e = {}) => ((e.locale ?? L()) === "en" ? ke() : Ie()), + Ce = () => "Terms of Service", + Ee = () => "Termos de Serviço", + Te = (a = {}, e = {}) => ((e.locale ?? L()) === "en" ? Ce() : Ee()), + ze = () => "and", + Be = () => "e", + De = (a = {}, e = {}) => ((e.locale ?? L()) === "en" ? ze() : Be()), + Me = () => "Privacy Policy", + Pe = () => "Política de privacidade", + Se = (a = {}, e = {}) => ((e.locale ?? L()) === "en" ? Me() : Pe()); +var Fe = V("
        "); +function He(a, e) { + W(e, !0); + let n = c(e, "widgetId", 15), + r = c(e, "appearance", 3, "always"), + _ = c(e, "language", 3, "auto"), + m = c(e, "execution", 3, "render"), + s = c(e, "retryInterval", 3, 8e3), + M = c(e, "retry", 3, "auto"), + g = c(e, "refreshExpired", 3, "auto"), + C = c(e, "theme", 3, "auto"), + E = c(e, "size", 3, "normal"), + P = c(e, "tabIndex", 3, 0); + c( + e, + "reset", + 15 + )(() => { + var t; + n() && + ((t = window == null ? void 0 : window.turnstile) == null || + t.reset(n())); + }); + const T = $(() => ({ + sitekey: e.siteKey, + callback: (t, i) => { + var l; + (l = e.callback) == null || l.call(e, t, i); + }, + "error-callback": (t) => { + var i; + (i = e.errorCallback) == null || i.call(e, t); + }, + "timeout-callback": () => { + var t; + (t = e.timeoutCallback) == null || t.call(e); + }, + "expired-callback": () => { + var t; + (t = e.expiredCallback) == null || t.call(e); + }, + "before-interactive-callback": () => { + var t; + (t = e.beforeInteractiveCallback) == null || t.call(e); + }, + "after-interactive-callback": () => { + var t; + (t = e.afterInteractiveCallback) == null || t.call(e); + }, + "unsupported-callback": () => { + var t; + return (t = e.unsupportedCallback) == null ? void 0 : t.call(e); + }, + "response-field-name": + e.responseFieldName ?? e.formsField ?? "cf-turnstile-response", + "response-field": e.responseField ?? e.forms ?? !0, + "refresh-expired": g(), + "retry-interval": s(), + tabindex: P(), + appearance: r(), + execution: m(), + language: _(), + action: e.action, + retry: M(), + theme: C(), + cData: e.cData, + size: E(), + })), + b = (t, i) => { + let l = window.turnstile.render(t, i); + return ( + n(l), + { + destroy() { + window.turnstile.remove(l); + }, + update(o) { + window.turnstile.remove(l), + (l = window.turnstile.render(t, o)), + n(l); + }, + } + ); + }; + let x = U(!1); + ge(() => { + if ((D(x, !0), !R.turnstatileLoaded)) { + const t = document.createElement("script"); + (t.type = "text/javascript"), + (t.src = + "https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit"), + (t.async = !0), + t.addEventListener("load", () => (R.turnstatileLoaded = !0), { + once: !0, + }), + document.head.appendChild(t); + } + return () => { + D(x, !1); + }; + }); + var k = ue(), + z = X(k); + { + var F = (t) => { + var i = Fe(); + let l; + ye( + i, + (o, H) => (b == null ? void 0 : b(o, H)), + () => v(T) + ), + j( + (o) => (l = A(i, 1, G(e.class), "svelte-1gvfki5", l, o)), + [() => ({ flexible: E() == "flexible" })] + ), + w(t, i); + }; + B(z, (t) => { + R.turnstatileLoaded && v(x) && t(F); + }); + } + w(a, k), p(); +} +var Ne = ee( + '' +); +function Ke(a, e) { + let n = te(e, ["$$slots", "$$events", "$$legacy"]); + var r = Ne(); + ae(r, () => ({ + viewBox: "0 0 256 262", + xmlns: "http://www.w3.org/2000/svg", + ...n, + })), + w(a, r); +} +var Re = ee( + '' +); +function Ue(a, e) { + let n = te(e, ["$$slots", "$$events", "$$legacy"]); + var r = Re(); + ae(r, () => ({ + xmlns: "http://www.w3.org/2000/svg", + "xml:space": "preserve", + viewBox: "0 0 2400 2800", + ...n, + })), + w(a, r); +} +var je = V( + '
        ', + 1 + ), + Ae = V( + '' + ); +function pe(a, e) { + W(e, !0); + let n = U(null), + r = U(ve(J ? "" : "turnstile-disabled")); + function _(t, i) { + return `${_e}/auth/${t}?token=${i}${e.redirect ? `&r=${e.redirect}` : ""}`; + } + var m = Ae(), + s = d(m), + M = d(s); + he(M, { hasText: !0 }), f(s); + var g = u(s, 2), + C = d(g), + E = d(C); + { + var P = (t) => { + var i = je(), + l = X(i), + o = d(l); + Ke(o, { class: "mr-1 size-5" }); + var H = u(o); + f(l); + var I = u(l, 2), + Y = d(I); + Ue(Y, { class: "mr-1 size-5" }); + var re = u(Y); + f(I); + var q = u(I, 2), + O = d(q); + { + var ne = (h) => { + { + let N = $(() => be.trim()); + He(h, { + get siteKey() { + return v(N); + }, + callback: (K) => { + D(r, K, !0); + }, + }); + } + }; + B(O, (h) => { + J && h(ne); + }); + } + var le = u(O, 2); + B(le, (h) => {}), + f(q), + j( + (h, N, K, ie) => { + A( + l, + 1, + G({ + "btn btn-lg bg-base-100 w-full text-base": !0, + "bg-base-content/10 pointer-events-none": !v(r), + }) + ), + Z(l, "href", h), + y(H, ` ${N ?? ""}`), + A( + I, + 1, + G({ + "btn btn-lg bg-base-100 w-full text-base": !0, + "bg-base-content/10 pointer-events-none": !v(r), + }) + ), + Z(I, "href", K), + y(re, ` ${ie ?? ""}`); + }, + [ + () => (v(r) ? _("google", v(r)) : "#"), + () => Q({ name: "Google" }), + () => (v(r) ? _("twitch", v(r)) : "#"), + () => Q({ name: "Twitch" }), + ] + ), + w(t, i); + }; + B(E, (t) => { + t(P, !1); + }); + } + f(C), + f(g), + me( + g, + (t) => D(n, t), + () => v(n) + ); + var S = u(g, 2), + T = d(S), + b = u(T), + x = d(b, !0); + f(b); + var k = u(b), + z = u(k), + F = d(z, !0); + f(z), + f(S), + f(m), + j( + (t, i, l, o) => { + y(T, `${t ?? ""} `), y(x, i), y(k, ` ${l ?? ""} `), y(F, o); + }, + [() => Le(), () => Te(), () => De(), () => Se()] + ), + w(a, m), + p(); +} +export { pe as L, Ue as T, He as a }; diff --git a/frontend-backup/_app/immutable/chunks/BpEsgMDn.js b/frontend-backup/_app/immutable/chunks/BpEsgMDn.js deleted file mode 100644 index abf4553..0000000 --- a/frontend-backup/_app/immutable/chunks/BpEsgMDn.js +++ /dev/null @@ -1 +0,0 @@ -import{g as o}from"./DklPLC_x.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6cf8a249-5900-4491-a606-2fb2ee92a24f",e._sentryDebugIdIdentifier="sentry-dbid-6cf8a249-5900-4491-a606-2fb2ee92a24f")})()}catch{}const t=()=>"Export CSV",f=()=>"Exportar CSV",l=(e={},n={})=>(n.locale??o())==="en"?t():f();export{l as e}; diff --git a/frontend-backup/_app/immutable/chunks/BpFpuxGr.js b/frontend-backup/_app/immutable/chunks/BpFpuxGr.js deleted file mode 100644 index 2007ca2..0000000 --- a/frontend-backup/_app/immutable/chunks/BpFpuxGr.js +++ /dev/null @@ -1 +0,0 @@ -import{g as o}from"./DklPLC_x.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="488cf311-8f60-4dea-820a-6e96b60c34c0",e._sentryDebugIdIdentifier="sentry-dbid-488cf311-8f60-4dea-820a-6e96b60c34c0")})()}catch{}const t=()=>"Go to map",a=()=>"Ir para o mapa",l=(e={},n={})=>(n.locale??o())==="en"?t():a();export{l as g}; diff --git a/frontend-backup/_app/immutable/chunks/BpoSU4rb.js b/frontend-backup/_app/immutable/chunks/BpoSU4rb.js new file mode 100644 index 0000000..a3cdc72 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/BpoSU4rb.js @@ -0,0 +1,40 @@ +import { g as t } from "./CV9xcpLq.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + n = new e.Error().stack; + n && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[n] = "82e5352c-47b9-45dc-82d9-9c5d1081102b"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-82e5352c-47b9-45dc-82d9-9c5d1081102b")); + })(); +} catch {} +const o = () => "Open tickets", + d = () => "Tickets abertos", + s = (e = {}, n = {}) => ((n.locale ?? t()) === "en" ? o() : d()); +export { s as o }; diff --git a/frontend-backup/_app/immutable/chunks/BrZ10JY-.js b/frontend-backup/_app/immutable/chunks/BrZ10JY-.js deleted file mode 100644 index b650940..0000000 --- a/frontend-backup/_app/immutable/chunks/BrZ10JY-.js +++ /dev/null @@ -1,40 +0,0 @@ -import { M as n, H as t, z as a, L as b, S as c } from "./BDALf20I.js"; -(function () { - try { - var f = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - f.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var f = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - i = new f.Error().stack; - i && ((f._sentryDebugIds = f._sentryDebugIds || {}), (f._sentryDebugIds[i] = "b6ca37b8-1ecd-490a-80c1-a7d85598b3d9"), (f._sentryDebugIdIdentifier = "sentry-dbid-b6ca37b8-1ecd-490a-80c1-a7d85598b3d9")); - })(); -} catch {} -function r(f, i) { - return f === i || (f == null ? void 0 : f[c]) === i; -} -function g(f = {}, i, e, y) { - return ( - n(() => { - var s, d; - return ( - t(() => { - (s = d), - (d = []), - a(() => { - f !== e(...d) && (i(f, ...d), s && r(e(...s), f) && i(null, ...s)); - }); - }), - () => { - b(() => { - d && r(e(...d), f) && i(null, ...d); - }); - } - ); - }), - f - ); -} -export { g as b }; diff --git a/frontend-backup/_app/immutable/chunks/BsOIMr0T.js b/frontend-backup/_app/immutable/chunks/BsOIMr0T.js new file mode 100644 index 0000000..95e0bb1 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/BsOIMr0T.js @@ -0,0 +1,52 @@ +import { g as t } from "./CV9xcpLq.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + n = new e.Error().stack; + n && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[n] = "78305447-0aa0-4fe7-b9f4-39f491404710"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-78305447-0aa0-4fe7-b9f4-39f491404710")); + })(); +} catch {} +const l = () => "Save", + o = () => "Salvar", + y = (e = {}, n = {}) => ((n.locale ?? t()) === "en" ? l() : o()), + s = () => "Members", + a = () => "Membros", + _ = (e = {}, n = {}) => ((n.locale ?? t()) === "en" ? s() : a()), + i = () => "Player", + c = () => "Jogador", + g = (e = {}, n = {}) => ((n.locale ?? t()) === "en" ? i() : c()), + u = () => "Last pixel", + f = () => "Último pixel", + m = (e = {}, n = {}) => ((n.locale ?? t()) === "en" ? u() : f()), + d = () => "Visit", + p = () => "Visitar", + v = (e = {}, n = {}) => ((n.locale ?? t()) === "en" ? d() : p()); +export { m as l, _ as m, g as p, y as s, v }; diff --git a/frontend-backup/_app/immutable/chunks/BtAj0icR.js b/frontend-backup/_app/immutable/chunks/BtAj0icR.js deleted file mode 100644 index e0ddb2a..0000000 --- a/frontend-backup/_app/immutable/chunks/BtAj0icR.js +++ /dev/null @@ -1 +0,0 @@ -import"./B2cHk4HI.js";import{v as n,b as r}from"./BDALf20I.js";import{b as s}from"./BNZUboE0.js";import{r as i}from"./Bke_korE.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6275c75f-2cba-4611-a807-b274187f8ba0",e._sentryDebugIdIdentifier="sentry-dbid-6275c75f-2cba-4611-a807-b274187f8ba0")})()}catch{}var l=n('');function c(e,t){let f=i(t,["$$slots","$$events","$$legacy"]);var o=l();s(o,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),r(e,o)}export{c as W}; diff --git a/frontend-backup/_app/immutable/chunks/BtP6pfnb.js b/frontend-backup/_app/immutable/chunks/BtP6pfnb.js deleted file mode 100644 index d6611ca..0000000 --- a/frontend-backup/_app/immutable/chunks/BtP6pfnb.js +++ /dev/null @@ -1,24 +0,0 @@ -import { h as i, e as m, g as p, E as _, i as h, j as v, k as l, l as b, m as g, n as k } from "./DUoKDNpf.js"; -function x(s, d, u) { - i && m(); - var r = s, - n, - e, - a = null, - f = null; - function t() { - e && (k(e), (e = null)), a && (a.lastChild.remove(), r.before(a), (a = null)), (e = f), (f = null); - } - p(() => { - if (n !== (n = d())) { - var c = b(); - if (n) { - var o = r; - c && ((a = document.createDocumentFragment()), a.append((o = h())), e && l.skipped_effects.add(e)), (f = v(() => u(o, n))); - } - c ? l.add_callback(t) : t(); - } - }, _), - i && (r = g); -} -export { x as c }; diff --git a/frontend-backup/_app/immutable/chunks/BuTItAOu.js b/frontend-backup/_app/immutable/chunks/BuTItAOu.js deleted file mode 100644 index 8d39638..0000000 --- a/frontend-backup/_app/immutable/chunks/BuTItAOu.js +++ /dev/null @@ -1,50 +0,0 @@ -import { w as p, x as g, y as l, z as y, A as _, B as d, g as u, C as w, D as h } from "./BDALf20I.js"; -(function () { - try { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - e.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - n = new e.Error().stack; - n && ((e._sentryDebugIds = e._sentryDebugIds || {}), (e._sentryDebugIds[n] = "888755b8-82ba-4039-836b-67876fe1f611"), (e._sentryDebugIdIdentifier = "sentry-dbid-888755b8-82ba-4039-836b-67876fe1f611")); - })(); -} catch {} -function m(e = !1) { - const n = p, - f = n.l.u; - if (!f) return; - let i = () => w(n.s); - if (e) { - let s = 0, - t = {}; - const b = h(() => { - let r = !1; - const a = n.s; - for (const o in a) a[o] !== t[o] && ((t[o] = a[o]), (r = !0)); - return r && s++, s; - }); - i = () => u(b); - } - f.b.length && - g(() => { - c(n, i), d(f.b); - }), - l(() => { - const s = y(() => f.m.map(_)); - return () => { - for (const t of s) typeof t == "function" && t(); - }; - }), - f.a.length && - l(() => { - c(n, i), d(f.a); - }); -} -function c(e, n) { - if (e.l.s) for (const f of e.l.s) u(f); - n(); -} -export { m as i }; diff --git a/frontend-backup/_app/immutable/chunks/BvbG2Lay.js b/frontend-backup/_app/immutable/chunks/BvbG2Lay.js deleted file mode 100644 index b072ed2..0000000 --- a/frontend-backup/_app/immutable/chunks/BvbG2Lay.js +++ /dev/null @@ -1,92 +0,0 @@ -import { bk as B, g as E, a1 as M, H as u, z as l, bl as w, L as d } from "./BDALf20I.js"; -(function () { - try { - var q = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - q.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var q = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - V = new q.Error().stack; - V && ((q._sentryDebugIds = q._sentryDebugIds || {}), (q._sentryDebugIds[V] = "7dfee601-a4e3-44a0-a728-07e9d3b55676"), (q._sentryDebugIdIdentifier = "sentry-dbid-7dfee601-a4e3-44a0-a728-07e9d3b55676")); - })(); -} catch {} -function y(q) { - let V = 0, - A = M(0), - e; - return () => { - B() && - (E(A), - u( - () => ( - V === 0 && (e = l(() => q(() => w(A)))), - (V += 1), - () => { - d(() => { - (V -= 1), V === 0 && (e == null || e(), (e = void 0), w(A)); - }); - } - ) - )); - }; -} -const D = - "data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYwLjE2LjEwMAAAAAAAAAAAAAAA//tAwAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAAEAAAHPAB+fn5+fn5+fn5+fn5+fn5+fn5+fn5+fn6pqampqampqampqampqampqampqampqamp29vb29vb29vb29vb29vb29vb29vb29vb2/////////////////////////////////8AAAAATGF2YzYwLjMxAAAAAAAAAAAAAAAAJANgAAAAAAAABzxmm4psAAAAAAD/+8DEAAAF7A1FtDAAIzil6D87kgAAAktuqNu7gOcCAAgEATB8HzcHwfB8+DgIROD4ABAEAQOeCH/iAMXLB9//BB3Lg+AAIgJwBCSoyQ0QES1dNwAYhicYDAiarL8aXE4ZXwYe9BkCgLS/Dg4MKQDMkgCjAiAxujyCQPmFYGBApKtkawq2qi9GqTYgLTpFiGdI9O1D5NmvVykb4Q0iC3QOU5rUBLCQ9IoJWFutwdm2v5UmUWmoy2K9QxuXw5RxuOwA2j2ytp2dZrWp2A2/kMupbmC5HKc2et0mbjSyeld35/luxXs97SW4/JJiln38v54TdWITN+nq3a1Pq93WW/3/vNLLf/////K6sDGP////6PvWxQBFoFJABHMZRCBoQGHo/GW6NG17vGW1Zm25xgoZkkHEXiCgHb9v4bi8evlnFw5BStnezI76WTtDaVvOnLL8s9+1t95y7trVqdf0zfXXtpb2dzNrj94XquvZ0M/NLX6l+vktgwC4jICYwfNAuho0IiQuj////9r102AEMKOmGkMYagJIsBaYDIChgOgJiENow+wojIdUMMSQEYSBUTMZQb0o8Sk0SAjR1t5HOrfQNex7cq0ENSD4pyGX7X0xZTZxIYcKtF3mZptVyMvMJudNbJV6UKXY/pfr32nNn0c5rcEZq6nJYnCORDbENctTk5KWZdS63RUTWFzZVbMV3mt6vHJyziusGx5zczaCWWIN////qcOYSSNcFwyUIAAjtY6tsg5hoaQgzCTEAExUCDBozfYO8qSY3T3MLBgMXFAyoIjSiUtF/0DIhCIBgG52VxKVSh3n1s08dh16HvYXJ8JdlBMxTY839i3jR8vtSlsKfeK0NnC/nM0tLW7FK8/Tyq3KYLswxTDQEYZQZBHdQsioRGajdWcNkfpNOahWTpUJEDyc9LCQ0gcfR2T8/////////2zGWVnTPOpjElOJxIKDcdxGcttHMdDk5//7cMTkAA8Uz0Nd1gAigaJm6eyxPIZMDGR0PEgIGrR49MVAZAmYoKJjqJJImBhKP02+o9Jznif5eVT2eHC0ysbdDWHcRBDdQtNsGHz5fw8l282p0U6XSlewoyfTz751qsNZZnm32XJ+unFUNjmoX7ZOpHcZdMd7QbwNu3WpMQZplTGVCmaoMR34247bm1mKtcK2aK+iQ4ivzjUezP///5geOSUMiJ4hUgCgC0K1WiCQN8vbLG0AQADBIlTNsRCYEzAEsjEodxELxqxP5Q/JrC1wBDIwZKExnLAxQW8x7DEIOswwBYw/DkUH4DcJwDDAHaJgbsOBr7QGlBha6NwBiCDcgQQAxYAIUQGBKBYuBJEAcWJEnQDE4pIly4MoYoqAEDCUAPQRAxqkAJ5GoBgyB4RikbLIcbhtIX7/+4DE6YAUZaM7rZheonoiZ3a28ASIsGAgt7D+AWIjkDSGWD0hfqSddyAgLAQ5QaQn8QDHWOoB4AMjh6g6BZYagtVSTqMjpBSeF6RccsrkVJwiZEC0VjA1cjv+xgbI/0TEwQN0GdBn///9q1N/9v//0/VsitLemubODxzX2KfBVKuK49NlTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqv/7YMT0gCAhwyP52gAIAAA/w4AABKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqg==", - c = - "data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYwLjE2LjEwMAAAAAAAAAAAAAAA//tAwAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAAGAAAMOQBTU1NTU1NTU1NTU1NTU1NTj4+Pj4+Pj4+Pj4+Pj4+Pj4+xsbGxsbGxsbGxsbGxsbGx09PT09PT09PT09PT09PT09Px8fHx8fHx8fHx8fHx8fHx8f////////////////////8AAAAATGF2YzYwLjMxAAAAAAAAAAAAAAAAJAUCAAAAAAAADDmA9uH8AAAAAAD/+9DEAAAGFANhtBAAJCSzLP89oJggAALb/tFAHjUCAYWGC58oo4CEuCAIOg4GP5fRBB15d/B8//BD/8oc4P+IDnJ//+D6gBACgHGGMmGGAYEAiEB0ibwcAGYcgfRhlAyGKWf0bXgNSIiUpgJg3mBeAkYsQk5hPADlmkJZgCgFBwUTEzBIAxEJQCATNDF2H2BixBVlEwlzUKFrGHDQ4nWyRnNV/JBAF1sDEsMohzGgb1m1JVzYdFHSaE+z0sgpe0s1EHDlczHIpHJOmtL6zKoYHgNBIYtd3lSww5V7OX45QY8sij7/LrY1GYxP03P1apXhgahit65dpdyplb2v7z7ucliN6mqU12tNv5LZV38sssdxGi1lXqZdmKamks5j8TpqXDHX63h3LH/h2U1L9zvftRHeOH/Py6bpM6lW/25d3y5z//7sqvZz3YGGIslXoQAHIFYzMVUYY9rMbh+/5sjC/CwNSMXUxAQnzJeWbMYkawxUCtzUoDaMEwMM0fxPzAdAuPZcmMwegmDAmBMMA8BgSBpMFkFQwXwCzAzABCQh40ymzMFK6DaBdtCcQIjSzGERXtMBEDDDSpcseAQEhixEHPYg6NDZwXRTdTCUwLOBYhlLW4WFgkbE7CgteafKb7vQa6DYlbENXIfIFCvkjkWkdR7769xUFK9KZHhoFVuiCNprTXJRpaoyJRYiET9UWY8+NuRNZLuP4x5KyHs4xBTdFlhhEcaW2q9IuwaTPsXudBEZLpy1XvE+qaqyIJa61KPTcDJaNWd5uzE24qnctYsd0no78+X/bZMhpjju4rljKjzGl415+7TzVy7T1ZXLu1r16IXZBQ41qe5Yq1p61S7q3pZR1LEssXJ/H696Uf//////z////////////////////9/+////v//1LFjuNy5nnnL7/K9/Dus7VzocWTAKABqutOI9GcW+3l4CgFOmDMDYYN4p4OCIBgV4YBiYAwFpq3hZDALhgJheGG2D6YKoYZg5gwGEgBkYNYFphwg6mA+AMYlIK4CFoVGGIjshzRKgYzTWXYlEJDkBhliAGCiAMloYkENCHeTEfJPsMAiEWY0DBKVRQGMQrCBiAdCsOAiMKbZE//vAxPoALdY1PfnsgE4Yxut/PaRBBkBQHBwyEGzhMscp7WbLObyLCAEzgto46sDc0rgggEBIxDipkdkxXZrtwett4ObmoG7jE2pw9G3QXC9jsuymLPw8+Dp08zJVtJWLBQJG3nrSxgCARXBfwsgoJJakNPUmFAz6ymVOgwSNwc6ag6cDI37WpSsgXpTpiTbQy8CvHbLKIKUt7T7MqL/QzSvVejWbO3fp6S7ZsVZRKOxuxRqQUoWJXZJJY21x/IELxq7kdLLy/1DNU1VlTQoJb1RVFZiXHpf6rq7239u7fuX62GX9y/8uf////2gdh+JHSWIYfycuSiWW99lD+SyX9+URic7/5XMu5frePP1lvGtj/PytbBWbABr+NiRItGCIZg4OGBEwWGCIWpNDACG7UImORRmNIaDwrs7AwMkQArQS6k8HiYGkkirYXFQmGxR5kKSL1vXKtUyFx4T5jhQmF+whaQHE6XGvt7M9GafHhRoOvuW1IDkdKMUZ5eBrb7dJoN6amnbmZvm+3j6HmLq2q4hRrPoisU5yqSPBmgtVsTXziNa2d7hPoVaZjRoi6ngsbErm9SqVxgVVm4VXr2C2q3dv/r/61mta1rW1vujknTRQ19msXVc7hV1Xdc11aLCBo2Cp271Uf/UywAnCzbS32pPGamAsBpzmFioQBhg2Kjh0LkBkdooCME6gqEIgGAhqxojES6MTe1pYSgiSBzhgqHpfxOpePB/UvWXorrSCCQqGUqVy0uO846vZssTbWJ/YawtY0CQrcgrcQnVkStzrDmSplOcGO38lU/mpJn4sku6RNJMm2k1Yqwa8rusvFCZaRw0KBUhgtU8YCxh95G8mz///6377jVbFW1Y56omg1G6bnd/2Vr59WaV2YBZ5qm2v+m3BwJkYsxMtgywTOKITz+fIw9AMyzAYcvSgJRZWuTBZq4azK6gjFhyJxe0dgFKx8IRmfJPW6u08V2P/+5DE4oAaRaNFvdeAAsG0ab22JiTl7NF5XJKE5dsm4vPXm6Vp3rDpGjOBKkSFe3tNFtG6rZ1o6etaX9rzx9mPbrMUFLulWK9+1DLhBufN1vOx3rNmWqypHsrBeU3SiTDox81vMIlVgiXRUa9Dgpk2nfyuz9XPvl6u1c3cpk/A/gWXVdXsKZXBVmZidJ7U7lfGRISlEwhspJOroN5MDRCFozSo4PRp7DISWzyrHd1z3RgefpIcgdcsShprMD4hP+0MVsLDjcJXKys6Ga7Vdl7WiCjaHxrG/heggmYMOVOzOrqmMWnJZWBYrE0hI1GiJhaLOom6fm+kSVXFl6GtlQOAiiaue/E3/uv7FWa7Ti8ANAywuHoKNr8jKF2IrBWEc850vaXja818T1SdxbQ5WtPQYaQOvHXB2UzZMnh3YGV4h11mtblaifpokQYKBhDoBSUA2QTWiIrygwiGBx7J7jE1bVtsyV4wd1WRHHsgERdqbejj9ZEPb1I1syno5xVYyItSRXNgmUjk6XaXP9RFIvQduMPeLKNpCYqKmTSaO1xS2vX/+5DE5wAWWYdL7OGHKtS0aD2WJpwoC6Vo3TPtsVJqLczSJW6nLWe+RU8BTMSrJkUQEdHH9dqd1O0OpFJOKgqiZTKguYTbSEZ99rpKJJtnm3TjjbEvBH4psoYppbHqapsFc3ZS/hfzUowoBRmADiGVLXY2VAdYfAY/sMWgT8XeFZEk1KwhLVgEpQ9PRt0vWswHOP82Jw7zyycVBYBRrQFUJoI5rUTRhNc4RDYMNCsEDQypQrQMKn0GqqG0mR4lFJMphLFERHUXhkUMcg955lJulY9lCeExa4xrbRdNmgCwQrKGs07zWarceJ+Go4kpwak1mqmoCi1NiZk92yHqaq4LpwY8gfZBMxcgV2VVI7klXnve3r7CxdUjIhOIY0jCclaBBxgQeIwRQgNrirEfKZTIFFHkKTagty/jclnF1Wc0TpHMznSpnMAvJECHAqiV61TJyRqvMEjVErnTUTkjVVVXlGwkbGV5bTcrDkiKgZMiVlPh1osSFHo1//+2yyRsV/VkTlkYROLMTROeJZIFMDhIMB3LbLbjSdaNDwEROyQUeLD/+4DE+QAXeZc97L0xaq2z5v2Emn0yAiJIKjB3X////9aSZKVLFkxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7QMTxA9NhPR3sPM5AAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV", - m = "" + new URL("../assets/notification.CPyrWqU1.mp3", import.meta.url).href, - Y = - "data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYwLjE2LjEwMAAAAAAAAAAAAAAA//tAwAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAADAAAHVgCKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioru7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7///////////////////////////////////////////8AAAAATGF2YzYwLjMxAAAAAAAAAAAAAAAAJAUQAAAAAAAAB1ZvGw9zAAAAAAD/+9DEAAAGgANNtBAAJL5DKPc9kEkIAKVy6ZvTvjNiAEAQA4fwcOKBAED85LicHw/BAEHfg+D4f/B8Hwf/Ococ/lz//4P//lwfAAAQCzgEApUAchBICAMDwGwwpg3jDHA2MWkaAxCQqDAjBQMMoFYwVgLDCrX1NfwPQxajfTO/VkEYD4sAuYOwYBgPgBGmQOAYIgDoKER8AN4KNYgISnpehHt0X2WsksoO27zM1duB3IgimTpnXNwTefFr9ly4HYK1lgtE8a3uVY23SCpDEpz4xL3DZVTV8ZygdeB4X+GuX6sTh9sVNAzuwVTIUztBdnLL60VnPsrt8f+fw/LCUy2caLDNmzuzGatmcu97UsVIYilyxqUcpaSPSW63KzZucjnakuzw+zlc5nD7yfL5zPv59z7/dQ9EolEu9pf5V1Y1+7Eayl1qkt8rXLGdi5nz//////////////////9/r9dw1l39/+P73/7////rWr1PdwxvJCIEbNPJ1QmAABaCxKJEmLpurTGDFSAYMB0FQxfggyqAeYtYSphnAwmFmBIYTATyaZhFiAGFIEqY0hJ5wAIxmFKCgaFaihh9A1GSlMSJYunOGWWB6pdsMvN5kqIig49MYApkLhJxyjmgkA1gIGDp1/CEIOLNkht0Ag8+NWKWQOW+aivhGVsj00TCW4CiJWJKkYRECshrDX0vHCHosi1cqERxakomvtDHA2TIAyjt52yUsMz8EMpZDLYdbq3V0XSRtfmhWkyaFM+YpBSrxQBAx03pQHPND6exc0OKEQq3lvKqM9hSCVHlv0yVdJhNZf+1Nx2GYZbqxt2qLJ9GC00ETr2vY+tmMTrOqWWTEkkUeh27PYQFIWX0rcGmtAswPXlLzWp6IVZe/ssk8FZ02r16Xdz3hTwPHJu3DEos63dr2927GPfz3+sM+93/63n3u//D///3nv9/rX71v97/PHuGWv7z/1Uo+X7tNTZ91XyoaWnob1bs9Yp86oQUCZIAAwEB7VQIuyrSQANCQ2GhZMQQ4MOCHMFxAMRwkMAxlMHzDM9QQMAxabsYLC+aWdScYCCZCoabxBOZSGWZcE2FB0xAuPp4zhWswUOJAsxAQMFDR4qN//vAxOUALmI5MbnsgE1xwGT3O7ABhADArk1MFMSD0qUALTCIVTNZ6aumhCoZWXmZixYEi2Kiy35BH02oFLPGCg7rCgQDQYw4ZYE5yE1rTPX1YekYKAYsD1hgHKA0ZBWZkQVFFhX2gNE3fFvt411kDPlAE5BAAMrWnKUzkdUQ4GcKFNJrQ1beZZDA2TyBhzsLNlCcxIeBUAMBCRkBamhsy15MFpJFZV1ovs/V/u78Uh+bo5dMT3L0lpqC3Wi9mVXpPlvn5TNa1Vyq409e/b1XvY/9bHmF3O1dwt2u5ZY444Y8q2a2Ou5Zd/GzvHV7tu/cx5fzv587Xua5ewz1n3+91X/LPesO2M9Zb7c5n3eOHcb+5KDXnf0F87HySsMMMAEIAAAwaBkBfgCqAAS3goeAwxXwM3QBieI+IEf/E3Ckh6ID/mLENJk99YSErPrb/4uVDX/7Vo/+KKI1///VTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+yDE4AAIHGcJGUmAAAAANIOAAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV", - G = - "data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYwLjE2LjEwMAAAAAAAAAAAAAAA//tAwAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAAEAAAI3QBycnJycnJycnJycnJycnJycnJycnJycnK5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm59PT09PT09PT09PT09PT09PT09PT09PT09P////////////////////////////////8AAAAATGF2YzYwLjMxAAAAAAAAAAAAAAAAJAXYAAAAAAAACN2ptdwzAAAAAAD/+9DEAAAJjBddVDAAJStFZ/c3oAHsAAAv9gAXd3P0QDAw+CAIAmHxACAYiAEAxBAEAQ4gBAEz+kEInB/+CBz/xOD7ygPh/Lg++oHz+CYPwQcCAIAhEgIAhLggc/6jmUBBwYDgAAgBIGrmoUBoJAAQCBUMBBWGDoGBmKGKhhhpMhMQGoBioGGvvxvwgy04N6IQUmdDBQDvnjHlG+JAoUAmwMmCTHbmuEKgBQW7jclMhQWZAcv9dIGSmGMsSgRd0VUBU1RmMOAWHeKMtGa4y94rTlMBmpHGIAbuji3JwZDMx2lj0pqs4YY9lA/kh/uUft5ZY5W6WbltFbn8bcH2pjLr1JUodk1lbljO9+ssorGatFjfrSqo50VlkalfGlLqgJhzXoIMCCEJEtEijzLX4YVJetWGbmGNzC7fkcE42LSWqwyGKoXZay/sdorjcmJLBqBM6m7tfP+zNNKrdNKZbEYzhqnv38ufv8M9z9xNtIp31baCO0VLjciMtkjAWSsiUxfJlTcXtmoBfnW/+dpcJVjz///3rX4awyx/W////eWeX7+X3L16V28+W8iO0CqjViUAAANAi1nT82Ac3hwMDCwHAwZAaUAJAVGkwYXCoXBBgIMkAEDh+BQuYhBJgypmiLAYQc4R9TGAEfDUSzPBzAJ2YhBAMBr3BQnSpR4wYAIPAlpAoGYMC66Gj4sFlpd+Lw03N/5+rH33lUXYDLo/l2ETkCO23jd4fL4QTGbmVagdqkz7P3aapEHYdxU6K7J3K7g0oYAhwCXa5vCbd2kQogO07kOWH7wscpolKal/LszZr2aaez336enl7uV4Mh6VzW9dq0uVZ9pTLZTWl3/vfLmFFR43/qWKSXxu3LPzzr2n0pO/zGrLaufc61Ncq7qcztX8KXVX6meWW+fhzuGFPT53uflhhbz/eee6/f/8f+mmZSwFpT/Qa0pYyXzou7LH1cl3cdy3GVWv/+f+/+pyzHdSP1qiUiHMAAUekYSBMSDYxOMEjjCoBMRgUVAJhkIKblA/AIFT3AAPMCBExIJTP0XNQDEyENQEBQMcAtCC54ZQrCeRmRwkVGOTJkmBRidHNLhIDMiukUTNSMNCRKypesdImZGp//uwxMsAJrobW/nNAkvDvKe/uTAEbTSIwhySikgs6zkyaLPF4jRmS4RxeNzhkSSklqMj58wMi6RUujKkFOPPlw2IuQ0mzUiZiXDUulA2L6JgXbGqBus8tFBNF1LNjqzV0kjqJdNi8RY1POTRkTxsaIoWU6F0XdI2aia1qROosjSuamSSWa1OpKgZmqR0wfdaS29G3oo0aqkmajXpVG0MCU6jVv1cleeYfgQkb/+N60xMwRCUEZowyxDJigoNEAgZCI+NxMYB9nQJGDIZYqxxJAaQyyCxdGJxQ+XEqMMlJ28V0pgPCgvpUmro0i1ovnb0Y/uxLUqpctk8XMK2u29vW0W1vXkfbS02mNmtWHUq3+iswmo0kf2C3Qw58N7rLzC/zlkvWXOz9bM86er1sEK5i5T6zrdXVPwR13mbd1qd0E1ZrHWk0tfa3il6ftfna9lJnkJllh4OErkLOEADkKoRmSkSwEhAAAAGmU2ZtKoICpiIN00MmJD2ZfIg4EjBw/EYCRuApBOmSAy8WQwiM2aScPORlMJDAFEgq+s4ZkDoMBhhEMgEFN2Lld/ygAlULhcBDwCZumkj8MAOrjqqUBMSAbgCQQLxsCYlFmBNOx5v/BAMBgIRjDAUPARAND0yuVmr60X///6n4/aUCSBDg+xCAnZkzStVXq////8wYAEdygAlxlFE7WyS1uUSkUA0190X2i0R//////lNeNtBcCtJcnGrRWmzvVaWpKZbAUMzv///////JfjVeXRqHI088fxjl1ntWVVddmoah6al13K7DNbv/////////8vwl1uble3za5edmHotWgqKW2z0dLMy+Jb/+6DE5gAWNZNF9aYALOJBI385wADsSvlLqrZuVeSqI0j/Vo1amo1biU9EZValP48qy24qTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xDE1gPAAAGkHAAAIAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqg==", - p = - "data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYwLjE2LjEwMAAAAAAAAAAAAAAA//tAwAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAACAAAE/gDLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL//////////////////////////////////////////////////////////////////8AAAAATGF2YzYwLjMxAAAAAAAAAAAAAAAAJAOoAAAAAAAABP6u4u+sAAAAAAD/+9DEAAAGhC1UdGMAJM1C6nc34FFSaWP+7vYBAAEOAAiHPJp6YAwtNgQl3qDHKBgo4Th/wf/Lh/8H35R3/4IAg7//gh/+UOcPgABgAAAB0YnM2TIZDUkAGYOFBdqBQkadAmEAgiDTKD1BYUFTGA4LixoJUcUsGkDJrfwYKEmBDRg+gZmBSBeYUQyJj2B9mAOAkYXINwOA3cdvzIrBtMDwFYOAEMZhFcyRwWTDiAGWo/LzSFp7vtDTSQ3bHKocXbPR6kg2U07Vs4KcJaDIIGTHZxDsSjEMyhPing6w8PSYAlwHfdtbFq3lAc1qmqzPxFFV1cbUkrP9GG/cbKIyivlRWq1mzvHDWNad73eE7q3JYPnIerXqKJTtzV3DmUzLZZFM7sv1z9U8czh5wVG4G3nru8cfyy+rhT5TtHTb7jzd3eWO6Wmy3R3e6/DW9b5l/b9e5///87///eY////9///////Df7/8vx/Xf///9f///52O6s3rZINILq82aqo6x1TAYDoYGInIIhASA++E8wYSIkIBd0NdJXDHQL2vFAR4YOsgwGFK6QQiPQDhcITBl4MWgDBEAosgZUgoDGkAwGFAMCCEDEQVAwaOgMChwEQXAwUBg5MTgJcAwARZxBj4Ng0LAigBGYdKKwKBIeIQDHCyhWxMlUmTx0xUCgJFBjnkGFkpk0ZF4gSLLRZJKGARbBQAsZDCCFAhxianDEuspVXRkOUWCGGCYsxZiXa0Ukl/8XOS4vxxjrDJR7RLyeiisxJn//y+11pJqNycOJkgiapIoo0UdS0dL//sUjzHxMgBgMUtVdLRYGrKTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq//tgxOMAHVGjN7magIAAADSDgAAEqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq", - L = T(); -function T() { - const q = { plop: new Audio(Y), smallPlop: new Audio(p), bigPlop: new Audio(D), smallDropplet: new Audio(G), droppletAndPlop: new Audio(c), notification1: new Audio(m) }; - for (const V of Object.values(q)) (V.preload = "auto"), (V.volume = 0.3); - return q; -} -let t; -function f(q) { - return (t = q), a({ type: "previewPixels", data: q }); -} -function C() { - return (t = void 0), a({ type: "clearPixelPreview" }); -} -function x(q) { - return a({ type: "paintPixels", data: q }); -} -async function U() { - t || (await a({ type: "clearPixelPreview" })); -} -function a(q) { - const V = Math.random(), - A = { ...q, id: V }; - return new Promise((e, s) => { - try { - const i = navigator.serviceWorker; - i || s(new Error("You're an using an older browser, some features might not work. Consider updating or changing browser.")); - const r = (g) => { - var o; - ((o = g.data) == null ? void 0 : o.id) === V && (e(void 0), i.removeEventListener("message", r)); - }; - i.addEventListener("message", r); - const n = navigator.serviceWorker.controller; - n - ? n.postMessage(A) - : navigator.serviceWorker.ready.then((g) => { - const o = g.active; - o ? o == null || o.postMessage(A) : s(new Error("Service worker registration not active")); - }); - } catch (i) { - s(i); - } - }); -} -function J({ pixel: q, season: V, tile: A }) { - return `t=(${A[0]},${A[1]});p=(${q[0]},${q[1]});s=${V}`; -} -export { L as A, C as a, x as b, y as c, J as g, f as p, U as s }; diff --git a/frontend-backup/_app/immutable/chunks/ByKBPM-D.js b/frontend-backup/_app/immutable/chunks/ByKBPM-D.js deleted file mode 100644 index 1d10b48..0000000 --- a/frontend-backup/_app/immutable/chunks/ByKBPM-D.js +++ /dev/null @@ -1,129 +0,0 @@ -import { - g as y, - h as m, - e as h, - ab as b, - aa as x, - ao as C, - E as w, - j as A, - ap as E, - a0 as S, - m as d, - J as k, - aq as c, - w as T, - ar as p, - as as j, - u as s, - Y as P, - at as v, - au as R, - x as f, - av as z, - aw as D, - ax as F, - ay as M, - az as N, - aA as O, - aB as U, -} from "./DUoKDNpf.js"; -import { h as $, m as q, u as B } from "./g8c1BvYP.js"; -function W(e, t, ...r) { - var n = e, - a = E, - o; - y(() => { - a !== (a = t()) && (o && (S(o), (o = null)), (o = A(() => a(n, ...r)))); - }, w), - m && (n = d); -} -function J(e) { - return (t, ...r) => { - var u; - var n = e(...r), - a; - if (m) (a = d), h(); - else { - var o = n.render().trim(), - i = b(o); - (a = k(i)), t.before(a); - } - const l = (u = n.setup) == null ? void 0 : u.call(n, a); - x(a, a), typeof l == "function" && C(l); - }; -} -function Y() { - var e; - return p === null && j(), ((e = p).ac ?? (e.ac = new AbortController())).signal; -} -function g(e) { - s === null && c(), - R && s.l !== null - ? _(s).m.push(e) - : T(() => { - const t = f(e); - if (typeof t == "function") return t; - }); -} -function G(e) { - s === null && c(), g(() => () => f(e)); -} -function H(e, t, { bubbles: r = !1, cancelable: n = !1 } = {}) { - return new CustomEvent(e, { detail: t, bubbles: r, cancelable: n }); -} -function I() { - const e = s; - return ( - e === null && c(), - (t, r, n) => { - var o; - const a = (o = e.s.$$events) == null ? void 0 : o[t]; - if (a) { - const i = P(a) ? a.slice() : [a], - l = H(t, r, n); - for (const u of i) u.call(e.x, l); - return !l.defaultPrevented; - } - return !0; - } - ); -} -function K(e) { - s === null && c(), s.l === null && v(), _(s).b.push(e); -} -function L(e) { - s === null && c(), s.l === null && v(), _(s).a.push(e); -} -function _(e) { - var t = e.l; - return t.u ?? (t.u = { a: [], b: [], m: [] }); -} -const X = Object.freeze( - Object.defineProperty( - { - __proto__: null, - afterUpdate: L, - beforeUpdate: K, - createEventDispatcher: I, - createRawSnippet: J, - flushSync: z, - getAbortSignal: Y, - getAllContexts: D, - getContext: F, - hasContext: M, - hydrate: $, - mount: q, - onDestroy: G, - onMount: g, - setContext: N, - settled: O, - tick: U, - unmount: B, - untrack: f, - }, - Symbol.toStringTag, - { value: "Module" } - ) -); -export { X as a, g as o, W as s }; diff --git a/frontend-backup/_app/immutable/chunks/Bzak7iHL.js b/frontend-backup/_app/immutable/chunks/Bzak7iHL.js deleted file mode 100644 index d27d7cc..0000000 --- a/frontend-backup/_app/immutable/chunks/Bzak7iHL.js +++ /dev/null @@ -1,2 +0,0 @@ -var e; -typeof window < "u" && ((e = window.__svelte ?? (window.__svelte = {})).v ?? (e.v = new Set())).add("5"); diff --git a/frontend-backup/_app/immutable/chunks/C-Y7nmnD.js b/frontend-backup/_app/immutable/chunks/C-Y7nmnD.js deleted file mode 100644 index 5378155..0000000 --- a/frontend-backup/_app/immutable/chunks/C-Y7nmnD.js +++ /dev/null @@ -1,28 +0,0 @@ -import { s as d, p as t } from "./B4HM4TqG.js"; -(function () { - try { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - e.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - n = new e.Error().stack; - n && ((e._sentryDebugIds = e._sentryDebugIds || {}), (e._sentryDebugIds[n] = "a3dbed05-c198-4ed7-927f-c0428effe604"), (e._sentryDebugIdIdentifier = "sentry-dbid-a3dbed05-c198-4ed7-927f-c0428effe604")); - })(); -} catch {} -const f = { - get error() { - return t.error; - }, - get status() { - return t.status; - }, - get url() { - return t.url; - }, -}; -d.updated.check; -const r = f; -export { r as p }; diff --git a/frontend-backup/_app/immutable/chunks/C0GlPMrk.js b/frontend-backup/_app/immutable/chunks/C0GlPMrk.js new file mode 100644 index 0000000..0669939 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/C0GlPMrk.js @@ -0,0 +1,137 @@ +import { + bk as B, + g as E, + _ as M, + H as d, + z as u, + bl as w, + L as l, +} from "./CMvZtFtm.js"; +(function () { + try { + var q = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + q.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var q = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + V = new q.Error().stack; + V && + ((q._sentryDebugIds = q._sentryDebugIds || {}), + (q._sentryDebugIds[V] = "09f87ec5-2106-454b-b5de-093b7f8953b6"), + (q._sentryDebugIdIdentifier = + "sentry-dbid-09f87ec5-2106-454b-b5de-093b7f8953b6")); + })(); +} catch {} +function f(q) { + let V = 0, + A = M(0), + e; + return () => { + B() && + (E(A), + d( + () => ( + V === 0 && (e = u(() => q(() => w(A)))), + (V += 1), + () => { + l(() => { + (V -= 1), V === 0 && (e == null || e(), (e = void 0), w(A)); + }); + } + ) + )); + }; +} +const D = + "data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYwLjE2LjEwMAAAAAAAAAAAAAAA//tAwAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAAEAAAHPAB+fn5+fn5+fn5+fn5+fn5+fn5+fn5+fn6pqampqampqampqampqampqampqampqamp29vb29vb29vb29vb29vb29vb29vb29vb2/////////////////////////////////8AAAAATGF2YzYwLjMxAAAAAAAAAAAAAAAAJANgAAAAAAAABzxmm4psAAAAAAD/+8DEAAAF7A1FtDAAIzil6D87kgAAAktuqNu7gOcCAAgEATB8HzcHwfB8+DgIROD4ABAEAQOeCH/iAMXLB9//BB3Lg+AAIgJwBCSoyQ0QES1dNwAYhicYDAiarL8aXE4ZXwYe9BkCgLS/Dg4MKQDMkgCjAiAxujyCQPmFYGBApKtkawq2qi9GqTYgLTpFiGdI9O1D5NmvVykb4Q0iC3QOU5rUBLCQ9IoJWFutwdm2v5UmUWmoy2K9QxuXw5RxuOwA2j2ytp2dZrWp2A2/kMupbmC5HKc2et0mbjSyeld35/luxXs97SW4/JJiln38v54TdWITN+nq3a1Pq93WW/3/vNLLf/////K6sDGP////6PvWxQBFoFJABHMZRCBoQGHo/GW6NG17vGW1Zm25xgoZkkHEXiCgHb9v4bi8evlnFw5BStnezI76WTtDaVvOnLL8s9+1t95y7trVqdf0zfXXtpb2dzNrj94XquvZ0M/NLX6l+vktgwC4jICYwfNAuho0IiQuj////9r102AEMKOmGkMYagJIsBaYDIChgOgJiENow+wojIdUMMSQEYSBUTMZQb0o8Sk0SAjR1t5HOrfQNex7cq0ENSD4pyGX7X0xZTZxIYcKtF3mZptVyMvMJudNbJV6UKXY/pfr32nNn0c5rcEZq6nJYnCORDbENctTk5KWZdS63RUTWFzZVbMV3mt6vHJyziusGx5zczaCWWIN////qcOYSSNcFwyUIAAjtY6tsg5hoaQgzCTEAExUCDBozfYO8qSY3T3MLBgMXFAyoIjSiUtF/0DIhCIBgG52VxKVSh3n1s08dh16HvYXJ8JdlBMxTY839i3jR8vtSlsKfeK0NnC/nM0tLW7FK8/Tyq3KYLswxTDQEYZQZBHdQsioRGajdWcNkfpNOahWTpUJEDyc9LCQ0gcfR2T8/////////2zGWVnTPOpjElOJxIKDcdxGcttHMdDk5//7cMTkAA8Uz0Nd1gAigaJm6eyxPIZMDGR0PEgIGrR49MVAZAmYoKJjqJJImBhKP02+o9Jznif5eVT2eHC0ysbdDWHcRBDdQtNsGHz5fw8l282p0U6XSlewoyfTz751qsNZZnm32XJ+unFUNjmoX7ZOpHcZdMd7QbwNu3WpMQZplTGVCmaoMR34247bm1mKtcK2aK+iQ4ivzjUezP///5geOSUMiJ4hUgCgC0K1WiCQN8vbLG0AQADBIlTNsRCYEzAEsjEodxELxqxP5Q/JrC1wBDIwZKExnLAxQW8x7DEIOswwBYw/DkUH4DcJwDDAHaJgbsOBr7QGlBha6NwBiCDcgQQAxYAIUQGBKBYuBJEAcWJEnQDE4pIly4MoYoqAEDCUAPQRAxqkAJ5GoBgyB4RikbLIcbhtIX7/+4DE6YAUZaM7rZheonoiZ3a28ASIsGAgt7D+AWIjkDSGWD0hfqSddyAgLAQ5QaQn8QDHWOoB4AMjh6g6BZYagtVSTqMjpBSeF6RccsrkVJwiZEC0VjA1cjv+xgbI/0TEwQN0GdBn///9q1N/9v//0/VsitLemubODxzX2KfBVKuK49NlTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqv/7YMT0gCAhwyP52gAIAAA/w4AABKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqg==", + c = + "data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYwLjE2LjEwMAAAAAAAAAAAAAAA//tAwAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAAGAAAMOQBTU1NTU1NTU1NTU1NTU1NTj4+Pj4+Pj4+Pj4+Pj4+Pj4+xsbGxsbGxsbGxsbGxsbGx09PT09PT09PT09PT09PT09Px8fHx8fHx8fHx8fHx8fHx8f////////////////////8AAAAATGF2YzYwLjMxAAAAAAAAAAAAAAAAJAUCAAAAAAAADDmA9uH8AAAAAAD/+9DEAAAGFANhtBAAJCSzLP89oJggAALb/tFAHjUCAYWGC58oo4CEuCAIOg4GP5fRBB15d/B8//BD/8oc4P+IDnJ//+D6gBACgHGGMmGGAYEAiEB0ibwcAGYcgfRhlAyGKWf0bXgNSIiUpgJg3mBeAkYsQk5hPADlmkJZgCgFBwUTEzBIAxEJQCATNDF2H2BixBVlEwlzUKFrGHDQ4nWyRnNV/JBAF1sDEsMohzGgb1m1JVzYdFHSaE+z0sgpe0s1EHDlczHIpHJOmtL6zKoYHgNBIYtd3lSww5V7OX45QY8sij7/LrY1GYxP03P1apXhgahit65dpdyplb2v7z7ucliN6mqU12tNv5LZV38sssdxGi1lXqZdmKamks5j8TpqXDHX63h3LH/h2U1L9zvftRHeOH/Py6bpM6lW/25d3y5z//7sqvZz3YGGIslXoQAHIFYzMVUYY9rMbh+/5sjC/CwNSMXUxAQnzJeWbMYkawxUCtzUoDaMEwMM0fxPzAdAuPZcmMwegmDAmBMMA8BgSBpMFkFQwXwCzAzABCQh40ymzMFK6DaBdtCcQIjSzGERXtMBEDDDSpcseAQEhixEHPYg6NDZwXRTdTCUwLOBYhlLW4WFgkbE7CgteafKb7vQa6DYlbENXIfIFCvkjkWkdR7769xUFK9KZHhoFVuiCNprTXJRpaoyJRYiET9UWY8+NuRNZLuP4x5KyHs4xBTdFlhhEcaW2q9IuwaTPsXudBEZLpy1XvE+qaqyIJa61KPTcDJaNWd5uzE24qnctYsd0no78+X/bZMhpjju4rljKjzGl415+7TzVy7T1ZXLu1r16IXZBQ41qe5Yq1p61S7q3pZR1LEssXJ/H696Uf//////z////////////////////9/+////v//1LFjuNy5nnnL7/K9/Dus7VzocWTAKABqutOI9GcW+3l4CgFOmDMDYYN4p4OCIBgV4YBiYAwFpq3hZDALhgJheGG2D6YKoYZg5gwGEgBkYNYFphwg6mA+AMYlIK4CFoVGGIjshzRKgYzTWXYlEJDkBhliAGCiAMloYkENCHeTEfJPsMAiEWY0DBKVRQGMQrCBiAdCsOAiMKbZE//vAxPoALdY1PfnsgE4Yxut/PaRBBkBQHBwyEGzhMscp7WbLObyLCAEzgto46sDc0rgggEBIxDipkdkxXZrtwett4ObmoG7jE2pw9G3QXC9jsuymLPw8+Dp08zJVtJWLBQJG3nrSxgCARXBfwsgoJJakNPUmFAz6ymVOgwSNwc6ag6cDI37WpSsgXpTpiTbQy8CvHbLKIKUt7T7MqL/QzSvVejWbO3fp6S7ZsVZRKOxuxRqQUoWJXZJJY21x/IELxq7kdLLy/1DNU1VlTQoJb1RVFZiXHpf6rq7239u7fuX62GX9y/8uf////2gdh+JHSWIYfycuSiWW99lD+SyX9+URic7/5XMu5frePP1lvGtj/PytbBWbABr+NiRItGCIZg4OGBEwWGCIWpNDACG7UImORRmNIaDwrs7AwMkQArQS6k8HiYGkkirYXFQmGxR5kKSL1vXKtUyFx4T5jhQmF+whaQHE6XGvt7M9GafHhRoOvuW1IDkdKMUZ5eBrb7dJoN6amnbmZvm+3j6HmLq2q4hRrPoisU5yqSPBmgtVsTXziNa2d7hPoVaZjRoi6ngsbErm9SqVxgVVm4VXr2C2q3dv/r/61mta1rW1vujknTRQ19msXVc7hV1Xdc11aLCBo2Cp271Uf/UywAnCzbS32pPGamAsBpzmFioQBhg2Kjh0LkBkdooCME6gqEIgGAhqxojES6MTe1pYSgiSBzhgqHpfxOpePB/UvWXorrSCCQqGUqVy0uO846vZssTbWJ/YawtY0CQrcgrcQnVkStzrDmSplOcGO38lU/mpJn4sku6RNJMm2k1Yqwa8rusvFCZaRw0KBUhgtU8YCxh95G8mz///6377jVbFW1Y56omg1G6bnd/2Vr59WaV2YBZ5qm2v+m3BwJkYsxMtgywTOKITz+fIw9AMyzAYcvSgJRZWuTBZq4azK6gjFhyJxe0dgFKx8IRmfJPW6u08V2P/+5DE4oAaRaNFvdeAAsG0ab22JiTl7NF5XJKE5dsm4vPXm6Vp3rDpGjOBKkSFe3tNFtG6rZ1o6etaX9rzx9mPbrMUFLulWK9+1DLhBufN1vOx3rNmWqypHsrBeU3SiTDox81vMIlVgiXRUa9Dgpk2nfyuz9XPvl6u1c3cpk/A/gWXVdXsKZXBVmZidJ7U7lfGRISlEwhspJOroN5MDRCFozSo4PRp7DISWzyrHd1z3RgefpIcgdcsShprMD4hP+0MVsLDjcJXKys6Ga7Vdl7WiCjaHxrG/heggmYMOVOzOrqmMWnJZWBYrE0hI1GiJhaLOom6fm+kSVXFl6GtlQOAiiaue/E3/uv7FWa7Ti8ANAywuHoKNr8jKF2IrBWEc850vaXja818T1SdxbQ5WtPQYaQOvHXB2UzZMnh3YGV4h11mtblaifpokQYKBhDoBSUA2QTWiIrygwiGBx7J7jE1bVtsyV4wd1WRHHsgERdqbejj9ZEPb1I1syno5xVYyItSRXNgmUjk6XaXP9RFIvQduMPeLKNpCYqKmTSaO1xS2vX/+5DE5wAWWYdL7OGHKtS0aD2WJpwoC6Vo3TPtsVJqLczSJW6nLWe+RU8BTMSrJkUQEdHH9dqd1O0OpFJOKgqiZTKguYTbSEZ99rpKJJtnm3TjjbEvBH4psoYppbHqapsFc3ZS/hfzUowoBRmADiGVLXY2VAdYfAY/sMWgT8XeFZEk1KwhLVgEpQ9PRt0vWswHOP82Jw7zyycVBYBRrQFUJoI5rUTRhNc4RDYMNCsEDQypQrQMKn0GqqG0mR4lFJMphLFERHUXhkUMcg955lJulY9lCeExa4xrbRdNmgCwQrKGs07zWarceJ+Go4kpwak1mqmoCi1NiZk92yHqaq4LpwY8gfZBMxcgV2VVI7klXnve3r7CxdUjIhOIY0jCclaBBxgQeIwRQgNrirEfKZTIFFHkKTagty/jclnF1Wc0TpHMznSpnMAvJECHAqiV61TJyRqvMEjVErnTUTkjVVVXlGwkbGV5bTcrDkiKgZMiVlPh1osSFHo1//+2yyRsV/VkTlkYROLMTROeJZIFMDhIMB3LbLbjSdaNDwEROyQUeLD/+4DE+QAXeZc97L0xaq2z5v2Emn0yAiJIKjB3X////9aSZKVLFkxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7QMTxA9NhPR3sPM5AAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV", + m = "" + new URL("../assets/notification.CPyrWqU1.mp3", import.meta.url).href, + Y = + "data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYwLjE2LjEwMAAAAAAAAAAAAAAA//tAwAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAADAAAHVgCKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioru7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7///////////////////////////////////////////8AAAAATGF2YzYwLjMxAAAAAAAAAAAAAAAAJAUQAAAAAAAAB1ZvGw9zAAAAAAD/+9DEAAAGgANNtBAAJL5DKPc9kEkIAKVy6ZvTvjNiAEAQA4fwcOKBAED85LicHw/BAEHfg+D4f/B8Hwf/Ococ/lz//4P//lwfAAAQCzgEApUAchBICAMDwGwwpg3jDHA2MWkaAxCQqDAjBQMMoFYwVgLDCrX1NfwPQxajfTO/VkEYD4sAuYOwYBgPgBGmQOAYIgDoKER8AN4KNYgISnpehHt0X2WsksoO27zM1duB3IgimTpnXNwTefFr9ly4HYK1lgtE8a3uVY23SCpDEpz4xL3DZVTV8ZygdeB4X+GuX6sTh9sVNAzuwVTIUztBdnLL60VnPsrt8f+fw/LCUy2caLDNmzuzGatmcu97UsVIYilyxqUcpaSPSW63KzZucjnakuzw+zlc5nD7yfL5zPv59z7/dQ9EolEu9pf5V1Y1+7Eayl1qkt8rXLGdi5nz//////////////////9/r9dw1l39/+P73/7////rWr1PdwxvJCIEbNPJ1QmAABaCxKJEmLpurTGDFSAYMB0FQxfggyqAeYtYSphnAwmFmBIYTATyaZhFiAGFIEqY0hJ5wAIxmFKCgaFaihh9A1GSlMSJYunOGWWB6pdsMvN5kqIig49MYApkLhJxyjmgkA1gIGDp1/CEIOLNkht0Ag8+NWKWQOW+aivhGVsj00TCW4CiJWJKkYRECshrDX0vHCHosi1cqERxakomvtDHA2TIAyjt52yUsMz8EMpZDLYdbq3V0XSRtfmhWkyaFM+YpBSrxQBAx03pQHPND6exc0OKEQq3lvKqM9hSCVHlv0yVdJhNZf+1Nx2GYZbqxt2qLJ9GC00ETr2vY+tmMTrOqWWTEkkUeh27PYQFIWX0rcGmtAswPXlLzWp6IVZe/ssk8FZ02r16Xdz3hTwPHJu3DEos63dr2927GPfz3+sM+93/63n3u//D///3nv9/rX71v97/PHuGWv7z/1Uo+X7tNTZ91XyoaWnob1bs9Yp86oQUCZIAAwEB7VQIuyrSQANCQ2GhZMQQ4MOCHMFxAMRwkMAxlMHzDM9QQMAxabsYLC+aWdScYCCZCoabxBOZSGWZcE2FB0xAuPp4zhWswUOJAsxAQMFDR4qN//vAxOUALmI5MbnsgE1xwGT3O7ABhADArk1MFMSD0qUALTCIVTNZ6aumhCoZWXmZixYEi2Kiy35BH02oFLPGCg7rCgQDQYw4ZYE5yE1rTPX1YekYKAYsD1hgHKA0ZBWZkQVFFhX2gNE3fFvt411kDPlAE5BAAMrWnKUzkdUQ4GcKFNJrQ1beZZDA2TyBhzsLNlCcxIeBUAMBCRkBamhsy15MFpJFZV1ovs/V/u78Uh+bo5dMT3L0lpqC3Wi9mVXpPlvn5TNa1Vyq409e/b1XvY/9bHmF3O1dwt2u5ZY444Y8q2a2Ou5Zd/GzvHV7tu/cx5fzv587Xua5ewz1n3+91X/LPesO2M9Zb7c5n3eOHcb+5KDXnf0F87HySsMMMAEIAAAwaBkBfgCqAAS3goeAwxXwM3QBieI+IEf/E3Ckh6ID/mLENJk99YSErPrb/4uVDX/7Vo/+KKI1///VTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+yDE4AAIHGcJGUmAAAAANIOAAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV", + G = + "data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYwLjE2LjEwMAAAAAAAAAAAAAAA//tAwAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAAEAAAI3QBycnJycnJycnJycnJycnJycnJycnJycnK5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm59PT09PT09PT09PT09PT09PT09PT09PT09P////////////////////////////////8AAAAATGF2YzYwLjMxAAAAAAAAAAAAAAAAJAXYAAAAAAAACN2ptdwzAAAAAAD/+9DEAAAJjBddVDAAJStFZ/c3oAHsAAAv9gAXd3P0QDAw+CAIAmHxACAYiAEAxBAEAQ4gBAEz+kEInB/+CBz/xOD7ygPh/Lg++oHz+CYPwQcCAIAhEgIAhLggc/6jmUBBwYDgAAgBIGrmoUBoJAAQCBUMBBWGDoGBmKGKhhhpMhMQGoBioGGvvxvwgy04N6IQUmdDBQDvnjHlG+JAoUAmwMmCTHbmuEKgBQW7jclMhQWZAcv9dIGSmGMsSgRd0VUBU1RmMOAWHeKMtGa4y94rTlMBmpHGIAbuji3JwZDMx2lj0pqs4YY9lA/kh/uUft5ZY5W6WbltFbn8bcH2pjLr1JUodk1lbljO9+ssorGatFjfrSqo50VlkalfGlLqgJhzXoIMCCEJEtEijzLX4YVJetWGbmGNzC7fkcE42LSWqwyGKoXZay/sdorjcmJLBqBM6m7tfP+zNNKrdNKZbEYzhqnv38ufv8M9z9xNtIp31baCO0VLjciMtkjAWSsiUxfJlTcXtmoBfnW/+dpcJVjz///3rX4awyx/W////eWeX7+X3L16V28+W8iO0CqjViUAAANAi1nT82Ac3hwMDCwHAwZAaUAJAVGkwYXCoXBBgIMkAEDh+BQuYhBJgypmiLAYQc4R9TGAEfDUSzPBzAJ2YhBAMBr3BQnSpR4wYAIPAlpAoGYMC66Gj4sFlpd+Lw03N/5+rH33lUXYDLo/l2ETkCO23jd4fL4QTGbmVagdqkz7P3aapEHYdxU6K7J3K7g0oYAhwCXa5vCbd2kQogO07kOWH7wscpolKal/LszZr2aaez336enl7uV4Mh6VzW9dq0uVZ9pTLZTWl3/vfLmFFR43/qWKSXxu3LPzzr2n0pO/zGrLaufc61Ncq7qcztX8KXVX6meWW+fhzuGFPT53uflhhbz/eee6/f/8f+mmZSwFpT/Qa0pYyXzou7LH1cl3cdy3GVWv/+f+/+pyzHdSP1qiUiHMAAUekYSBMSDYxOMEjjCoBMRgUVAJhkIKblA/AIFT3AAPMCBExIJTP0XNQDEyENQEBQMcAtCC54ZQrCeRmRwkVGOTJkmBRidHNLhIDMiukUTNSMNCRKypesdImZGp//uwxMsAJrobW/nNAkvDvKe/uTAEbTSIwhySikgs6zkyaLPF4jRmS4RxeNzhkSSklqMj58wMi6RUujKkFOPPlw2IuQ0mzUiZiXDUulA2L6JgXbGqBus8tFBNF1LNjqzV0kjqJdNi8RY1POTRkTxsaIoWU6F0XdI2aia1qROosjSuamSSWa1OpKgZmqR0wfdaS29G3oo0aqkmajXpVG0MCU6jVv1cleeYfgQkb/+N60xMwRCUEZowyxDJigoNEAgZCI+NxMYB9nQJGDIZYqxxJAaQyyCxdGJxQ+XEqMMlJ28V0pgPCgvpUmro0i1ovnb0Y/uxLUqpctk8XMK2u29vW0W1vXkfbS02mNmtWHUq3+iswmo0kf2C3Qw58N7rLzC/zlkvWXOz9bM86er1sEK5i5T6zrdXVPwR13mbd1qd0E1ZrHWk0tfa3il6ftfna9lJnkJllh4OErkLOEADkKoRmSkSwEhAAAAGmU2ZtKoICpiIN00MmJD2ZfIg4EjBw/EYCRuApBOmSAy8WQwiM2aScPORlMJDAFEgq+s4ZkDoMBhhEMgEFN2Lld/ygAlULhcBDwCZumkj8MAOrjqqUBMSAbgCQQLxsCYlFmBNOx5v/BAMBgIRjDAUPARAND0yuVmr60X///6n4/aUCSBDg+xCAnZkzStVXq////8wYAEdygAlxlFE7WyS1uUSkUA0190X2i0R//////lNeNtBcCtJcnGrRWmzvVaWpKZbAUMzv///////JfjVeXRqHI088fxjl1ntWVVddmoah6al13K7DNbv/////////8vwl1uble3za5edmHotWgqKW2z0dLMy+Jb/+6DE5gAWNZNF9aYALOJBI385wADsSvlLqrZuVeSqI0j/Vo1amo1biU9EZValP48qy24qTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xDE1gPAAAGkHAAAIAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqg==", + p = + "data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYwLjE2LjEwMAAAAAAAAAAAAAAA//tAwAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAACAAAE/gDLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL//////////////////////////////////////////////////////////////////8AAAAATGF2YzYwLjMxAAAAAAAAAAAAAAAAJAOoAAAAAAAABP6u4u+sAAAAAAD/+9DEAAAGhC1UdGMAJM1C6nc34FFSaWP+7vYBAAEOAAiHPJp6YAwtNgQl3qDHKBgo4Th/wf/Lh/8H35R3/4IAg7//gh/+UOcPgABgAAAB0YnM2TIZDUkAGYOFBdqBQkadAmEAgiDTKD1BYUFTGA4LixoJUcUsGkDJrfwYKEmBDRg+gZmBSBeYUQyJj2B9mAOAkYXINwOA3cdvzIrBtMDwFYOAEMZhFcyRwWTDiAGWo/LzSFp7vtDTSQ3bHKocXbPR6kg2U07Vs4KcJaDIIGTHZxDsSjEMyhPing6w8PSYAlwHfdtbFq3lAc1qmqzPxFFV1cbUkrP9GG/cbKIyivlRWq1mzvHDWNad73eE7q3JYPnIerXqKJTtzV3DmUzLZZFM7sv1z9U8czh5wVG4G3nru8cfyy+rhT5TtHTb7jzd3eWO6Wmy3R3e6/DW9b5l/b9e5///87///eY////9///////Df7/8vx/Xf///9f///52O6s3rZINILq82aqo6x1TAYDoYGInIIhASA++E8wYSIkIBd0NdJXDHQL2vFAR4YOsgwGFK6QQiPQDhcITBl4MWgDBEAosgZUgoDGkAwGFAMCCEDEQVAwaOgMChwEQXAwUBg5MTgJcAwARZxBj4Ng0LAigBGYdKKwKBIeIQDHCyhWxMlUmTx0xUCgJFBjnkGFkpk0ZF4gSLLRZJKGARbBQAsZDCCFAhxianDEuspVXRkOUWCGGCYsxZiXa0Ukl/8XOS4vxxjrDJR7RLyeiisxJn//y+11pJqNycOJkgiapIoo0UdS0dL//sUjzHxMgBgMUtVdLRYGrKTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq//tgxOMAHVGjN7magIAAADSDgAAEqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq", + y = T(); +function T() { + const q = { + plop: new Audio(Y), + smallPlop: new Audio(p), + bigPlop: new Audio(D), + smallDropplet: new Audio(G), + droppletAndPlop: new Audio(c), + notification1: new Audio(m), + }; + for (const V of Object.values(q)) (V.preload = "auto"), (V.volume = 0.3); + return q; +} +let t; +function b(q) { + return (t = q), a({ type: "previewPixels", data: q }); +} +function L() { + return (t = void 0), a({ type: "clearPixelPreview" }); +} +function C(q) { + return a({ type: "paintPixels", data: q }); +} +async function x() { + t || (await a({ type: "clearPixelPreview" })); +} +function a(q) { + const V = Math.random(), + A = { ...q, id: V }; + return new Promise((e, s) => { + try { + const i = navigator.serviceWorker; + i || + s( + new Error( + "You're an using an older browser, some features might not work. Consider updating or changing browser." + ) + ); + const r = (g) => { + var o; + ((o = g.data) == null ? void 0 : o.id) === V && + (e(void 0), i.removeEventListener("message", r)); + }; + i.addEventListener("message", r); + const n = navigator.serviceWorker.controller; + n + ? n.postMessage(A) + : navigator.serviceWorker.ready.then((g) => { + const o = g.active; + o + ? o == null || o.postMessage(A) + : s(new Error("Service worker registration not active")); + }); + } catch (i) { + s(i); + } + }); +} +function U({ pixel: q, season: V, tile: A }) { + return `t=(${A[0]},${A[1]});p=(${q[0]},${q[1]});s=${V}`; +} +export { y as A, L as a, C as b, f as c, U as g, b as p, x as s }; diff --git a/frontend-backup/_app/immutable/chunks/C2Ms0SfR.js b/frontend-backup/_app/immutable/chunks/C2Ms0SfR.js deleted file mode 100644 index 771c578..0000000 --- a/frontend-backup/_app/immutable/chunks/C2Ms0SfR.js +++ /dev/null @@ -1 +0,0 @@ -import{g as U}from"./DklPLC_x.js";import"./B2cHk4HI.js";import{o as _t}from"./4WsUhDWi.js";import{v as N,b as d,at as Ye,p as Ke,ay as Ve,a as me,c as We,f as k,d as t,r as o,s as n,n as O,t as y,ax as fe,y as mt,g as _,au as be,aw as L,u as _e,b4 as Ce}from"./BDALf20I.js";import{s as w}from"./4k6DpCgf.js";import{r as ne,p as Ge,i as M}from"./Bke_korE.js";import{b as j,f as gt,s as ae,r as Ie,g as Le,a as Je,e as xt}from"./BNZUboE0.js";import{b as ht}from"./BrZ10JY-.js";import{g as Re}from"./B4HM4TqG.js";import{p as Ae}from"./C-Y7nmnD.js";import{g as wt,u as se,t as re,a as $e,S as yt,P as Fe}from"./DffDvEhl.js";import{a as kt}from"./DCxPsWiR.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};a.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="2bdf6b0b-6be8-47c7-adbc-087285b24a69",a._sentryDebugIdIdentifier="sentry-dbid-2bdf6b0b-6be8-47c7-adbc-087285b24a69")})()}catch{}const Ct=()=>"Add profile picture",It=()=>"Adicionar imagem de perfil",yo=(a={},e={})=>(e.locale??U())==="en"?Ct():It(),Lt=()=>"Close",zt=()=>"Fechar",Pt=(a={},e={})=>(e.locale??U())==="en"?Lt():zt(),qt=()=>"You gain 1 droplet per pixel painted and 500 droplets per level",Tt=()=>"Você ganha 1 droplet por pixel pintado e 500 droplets por level",Xe=(a={},e={})=>(e.locale??U())==="en"?qt():Tt(),Dt=()=>"Eraser",Mt=()=>"Borracha",ko=(a={},e={})=>(e.locale??U())==="en"?Dt():Mt(),St=()=>"Refund Policy",Et=()=>"Política de Reembolso",Oe=(a={},e={})=>(e.locale??U())==="en"?St():Et(),Bt=()=>"For refund requests and processing details, please see our",Ht=()=>"Para pedidos de reembolso, consulte nossa",je=(a={},e={})=>(e.locale??U())==="en"?Bt():Ht();var Ut=N('');function Zt(a,e){let r=ne(e,["$$slots","$$events","$$legacy"]);var s=Ut();j(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...r})),d(a,s)}function Rt(){return U()}function Ne(a){return`${a}/terms/return${Rt()==="pt"?"/pt":""}`}var At=N('');function ze(a,e){let r=ne(e,["$$slots","$$events","$$legacy"]);var s=At();j(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...r})),d(a,s)}var Ft=k(''),Xt=k(' Droplets '),Ot=k(''),jt=k('');function Nt(a,e){Ke(e,!0);const r=i=>{var p=Xt(),f=t(p);ze(f,{class:"text-primary size-4.5"});var h=n(f,2),S=t(h);O(),o(h);var C=n(h,2);{var q=E=>{var Q=Ft(),Z=t(Q);Zt(Z,{class:"size-4"}),o(Q),d(E,Q)};M(C,E=>{s()&&E(q)})}o(p),y(E=>w(S,`${E??""} `),[()=>e.value.toLocaleString("en-US")]),d(i,p)};let s=Ge(e,"button",3,!0);var m=Ve(),u=me(m);{var b=i=>{var p=Ot();p.__click=()=>{wt.dropletsDialogOpen=!0};var f=t(p);r(f),o(p),d(i,p)},c=i=>{var p=jt(),f=t(p);r(f),o(p),d(i,p)};M(u,i=>{s()?i(b):i(c,!1)})}d(a,m),We()}Ye(["click"]);var Qt=N('');function Yt(a,e){let r=ne(e,["$$slots","$$events","$$legacy"]);var s=Qt();j(s,()=>({xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...r})),d(a,s)}var Kt=N('');function Qe(a,e){let r=ne(e,["$$slots","$$events","$$legacy"]);var s=Kt();j(s,()=>({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"100",height:"100",viewBox:"0 0 48 48",...r})),d(a,s)}var Vt=(a,e,r,s,m)=>{_(e).show(),L(r,!0),$e.generatePixQrCode(s()).then(u=>{L(m,u,!0)}).catch(u=>{re.error(u.message)}).finally(()=>{L(r,!1)})},Wt=k('
        '),Gt=k('
        '),Jt=k('

        Droplets

        '),$t=k('

        Droplets

        '),eo=(a,e)=>{var r;navigator.clipboard.writeText(((r=_(e))==null?void 0:r.pixCode)??""),re.success("Código PIX copiado")},to=async(a,e,r)=>{var s,m,u;if(!_(e)){re.info("Espere 1 minuto e recarrege a pagina");return}try{L(r,!0);const{paid:b}=await $e.getPixStatus(_(e).pixId);if(b){const c=_(e).productId.toString(),i=(u=(m=(s=yt.products[c])==null?void 0:s.items)==null?void 0:m[0])==null?void 0:u.amount;await se.refresh(),i?Re(`payment/success?droplets=${i}`):Re("payment/success")}else re.info("Pagamento ainda não recebido. Desculpe a demora, tente novamente em instantes.",{duration:1e5})}catch(b){console.error(b),re.error("Error ao atualizar o status do pix. Tente recarregar a página.")}finally{L(r,!1)}},oo=k('

        Efetue o pagamento do PIX no valor de

        QR code PIX
        Código
        ',1),ao=k('
        '),so=k(' ',1);function Co(a,e){Ke(e,!0);let r=Ge(e,"open",15),s=be(!1);_t(()=>{const l=g=>{g.key==="Escape"&&r(!1)};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)});const m=_e(()=>{var l,g;return((g=(l=se.data)==null?void 0:l.country)==null?void 0:g.toUpperCase())==="BR"}),u=_e(()=>{var l,g;return((g=(l=se.data)==null?void 0:l.country)==null?void 0:g.toUpperCase())==="MX"});let b=be(null),c=be(void 0),i=be(!1);var p=so(),f=me(p),h=t(f),S=n(t(h),2);{var C=l=>{var g=$t(),B=t(g),R=t(B),le=t(R);ze(le,{class:"text-primary size-6"});var A=n(le,4),ie=t(A);{let z=_e(()=>{var F;return((F=se.data)==null?void 0:F.droplets)??0});Nt(ie,{get value(){return _(z)},button:!1})}o(A),o(R);var de=n(R,2),Y=t(de,!0);o(de),o(B);var K=n(B,2);{const z=(F,v)=>{let J=()=>v==null?void 0:v().droplets,$=()=>v==null?void 0:v().bonus,he=()=>v==null?void 0:v().price,Se=()=>v==null?void 0:v().stripeLookupkey,nt=()=>v==null?void 0:v().productId,lt=()=>v==null?void 0:v().dropdownClass;var we=Jt(),ye=t(we),Ee=t(ye);ze(Ee,{class:"mb-1 inline size-7"});var Be=n(Ee,2),it=t(Be);O(),o(Be),o(ye);var ke=n(ye,2),He=t(ke);{var dt=I=>{var x=Ce();y(T=>w(x,`${T??""} Droplets`),[()=>J().toLocaleString("en-US")]),d(I,x)};M(He,I=>{$()&&I(dt)})}var Ue=n(He,2),ct=t(Ue);o(Ue),o(ke);var pt=n(ke,2);{var vt=I=>{var x=Wt(),T=t(x),ee=t(T);o(T);var ve=n(T,2),te=t(ve),X=t(te),P=t(X);Ie(P);var D=n(P,2),oe=t(D);Yt(oe,{class:"inline size-5"}),O(2),o(D),o(X),o(te);var Ze=n(te,2),ue=t(Ze);ue.__click=[Vt,b,s,nt,c];var ft=t(ue);Qe(ft,{class:"size-5"}),O(2),o(ue),o(Ze),o(ve),o(x),y(bt=>{Je(x,1,`dropdown mt-3 ${lt()??""}`),w(ee,`R$${bt??""}`),ae(X,"action",`${Fe}/payment/create-checkout-session`),Le(P,Se()),D.disabled=_(s),ue.disabled=_(s)},[()=>(he()*4).toFixed(2).replace(".",",")]),fe("submit",X,()=>{L(s,!0),setTimeout(()=>L(s,!1),3e3)}),d(I,x)},ut=I=>{var x=Gt(),T=t(x);Ie(T);var ee=n(T,2),ve=t(ee);{var te=P=>{var D=Ce();y(oe=>w(D,`MX$ ${oe??""}`),[()=>(he()*18).toFixed(2)]),d(P,D)},X=P=>{var D=Ce();y(oe=>w(D,`$${oe??""}`),[()=>he().toFixed(2)]),d(P,D)};M(ve,P=>{_(u)?P(te):P(X,!1)})}o(ee),o(x),y(()=>{ae(x,"action",`${Fe}/payment/create-checkout-session`),Le(T,Se()),ee.disabled=_(s)}),fe("submit",x,()=>{L(s,!0),setTimeout(()=>L(s,!1),3e3)}),d(I,x)};M(pt,I=>{_(m)?I(vt):I(ut,!1)})}o(we),y((I,x)=>{w(it,`${I??""} `),w(ct,`+${x??""} bonus`)},[()=>(J()+$()).toLocaleString("en-US"),()=>$().toLocaleString("en-US")]),d(F,we)};var H=t(K),V=t(H);z(V,()=>({price:5,droplets:25e3,bonus:0,stripeLookupkey:"droplets_5",productId:10,dropdownClass:"dropdown-center"}));var ce=n(V,2);z(ce,()=>({price:15,droplets:75e3,bonus:3750,stripeLookupkey:"droplets_15",productId:20,dropdownClass:"dropdown-center"}));var W=n(ce,2);z(W,()=>({price:30,droplets:15e4,bonus:15e3,stripeLookupkey:"droplets_30",productId:30,dropdownClass:"dropdown-center"}));var G=n(W,2);z(G,()=>({price:50,droplets:25e4,bonus:37500,stripeLookupkey:"droplets_50",productId:40,dropdownClass:"dropdown-center"}));var pe=n(G,2);z(pe,()=>({price:75,droplets:375e3,bonus:75e3,stripeLookupkey:"droplets_75",productId:50,dropdownClass:"dropdown-center"}));var st=n(pe,2);z(st,()=>({price:100,droplets:5e5,bonus:125e3,stripeLookupkey:"droplets_100",productId:60,dropdownClass:"max-sm:dropdown-top dropdown-center"})),o(H);var De=n(H,2),Me=t(De),xe=n(Me),rt=t(xe,!0);o(xe),o(De),o(K),y((F,v,J,$)=>{w(Me,`${v??""} `),ae(xe,"href",J),w(rt,$)},[()=>Xe(),()=>je(),()=>Ne(Ae.url.origin),()=>Oe()])}o(g),y((z,F,v,J)=>w(Y,z),[()=>Xe(),()=>je(),()=>Ne(Ae.url.origin),()=>Oe()]),d(l,g)};M(S,l=>{se.data&&l(C)})}o(h);var q=n(h,2),E=t(q),Q=t(E,!0);o(E),o(q),o(f),gt(f,()=>l=>{mt(()=>{r()?l.show():l.close()})});var Z=n(f,2),Pe=t(Z),qe=n(t(Pe),2),ge=t(qe),Te=t(ge),et=t(Te);Qe(et,{class:"size-10"}),O(2),o(Te),o(ge);var tt=n(ge,2);{var ot=l=>{var g=oo(),B=me(g),R=n(t(B)),le=t(R);o(R),o(B);var A=n(B,2),ie=t(A),de=t(ie);O(2),o(ie),o(A);var Y=n(A,2),K=n(t(Y),2),H=t(K);Ie(H);var V=n(H,2),ce=t(V);ce.__click=[eo,c],o(V),o(K),o(Y);var W=n(Y,2),G=t(W);G.__click=[to,c,i],o(W),y(pe=>{w(le,`R$${pe??""}`),ae(de,"src",_(c).qrCode),Le(H,_(c).pixCode),G.disabled=_(i)},[()=>(_(c).price/100).toFixed(2).replace(".",",")]),d(l,g)},at=l=>{var g=ao();d(l,g)};M(tt,l=>{_(c)?l(ot):l(at,!1)})}o(qe),o(Pe),o(Z),ht(Z,l=>L(b,l),()=>_(b)),y(l=>w(Q,l),[()=>Pt()]),fe("close",f,()=>{r(!1)}),fe("close",Z,()=>{setTimeout(()=>{L(c,void 0)},300)}),d(a,p),We()}Ye(["click"]);var ro=N(''),no=N('');function Io(a,e){let r=ne(e,["$$slots","$$events","$$legacy","filled"]);var s=Ve(),m=me(s);{var u=c=>{var i=ro();j(i,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...r})),d(c,i)},b=c=>{var i=no();j(i,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...r})),d(c,i)};M(m,c=>{e.filled?c(u):c(b,!1)})}d(a,s)}function Lo([a,e],[r,s]){a=Math.floor(a),e=Math.floor(e),r=Math.floor(r),s=Math.floor(s);const m=[],u=Math.abs(r-a),b=Math.abs(s-e),c=a-b&&(p-=b,f+=c),S'),io=k('
        ');function zo(a,e){const r=_e(()=>e.level%1*360);var s=io(),m=n(t(s),2),u=n(m,2),b=t(u),c=t(b);{var i=C=>{kt(C,{get userId(){return e.userId}})},p=C=>{var q=lo();y(()=>ae(q,"src",e.pictureUrl)),d(C,q)};M(c,C=>{e.pictureUrl?C(p,!1):C(i)})}o(b),o(u);var f=n(u,2);let h;var S=t(f,!0);o(f),o(s),y((C,q)=>{xt(m,`--angle: ${_(r)??""}deg; --color: var(--color-secondary)`),h=Je(f,1,"text-primary-content bg-secondary absolute bottom-0 flex items-center justify-center rounded-full px-[5px] py-0 text-xs font-bold",null,h,C),w(S,q)},[()=>({"left-0":e.level>99,"-left-1":e.level>99}),()=>Math.floor(e.level)]),d(a,s)}export{Zt as A,Nt as D,Io as I,zo as P,ze as a,Co as b,yo as c,Pt as d,ko as e,Ne as f,Lo as r}; diff --git a/frontend-backup/_app/immutable/chunks/C3E1P42D.js b/frontend-backup/_app/immutable/chunks/C3E1P42D.js new file mode 100644 index 0000000..41a25ce --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/C3E1P42D.js @@ -0,0 +1,40 @@ +import { g as f } from "./CV9xcpLq.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + n = new e.Error().stack; + n && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[n] = "b6fedc18-c426-4b17-bf09-8644b91cab4b"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-b6fedc18-c426-4b17-bf09-8644b91cab4b")); + })(); +} catch {} +const t = () => "Refresh", + d = () => "Atualizar", + l = (e = {}, n = {}) => ((n.locale ?? f()) === "en" ? t() : d()); +export { l as r }; diff --git a/frontend-backup/_app/immutable/chunks/C4yB2Gnm.js b/frontend-backup/_app/immutable/chunks/C4yB2Gnm.js new file mode 100644 index 0000000..134aa66 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/C4yB2Gnm.js @@ -0,0 +1,40 @@ +import { g as o } from "./CV9xcpLq.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + n = new e.Error().stack; + n && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[n] = "a39ce8e6-c68e-4670-97d0-cab3082bdbf7"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-a39ce8e6-c68e-4670-97d0-cab3082bdbf7")); + })(); +} catch {} +const d = () => "Confirm", + f = () => "Confirmar", + i = (e = {}, n = {}) => ((n.locale ?? o()) === "en" ? d() : f()); +export { i as c }; diff --git a/frontend-backup/_app/immutable/chunks/C5GsJ62f.js b/frontend-backup/_app/immutable/chunks/C5GsJ62f.js deleted file mode 100644 index 2e956da..0000000 --- a/frontend-backup/_app/immutable/chunks/C5GsJ62f.js +++ /dev/null @@ -1,80 +0,0 @@ -const f = ["en", "zh", "zh-cn", "zh-tw"], -g = "PARAGLIDE_LOCALE", - u = ["localStorage", "preferredLanguage", "baseLocale"]; -globalThis.__paraglide = {}; -let i = !1, - h = () => { - let e; - for (const t of u) { - if (t === "baseLocale") e = "en"; - else if (t === "preferredLanguage") e = w(); - else if (t === "localStorage") e = localStorage.getItem(g) ?? void 0; - else if (d(t) && r.has(t)) { - const o = r.get(t); - if (o) { - const a = o.getLocale(); - if (a instanceof Promise) continue; - e = a - } - } - if (e !== void 0) { - const o = p(e); - return i || (i = !0, m(o, { - reload: !1 - })), o - } - } - throw new Error("No locale found. Read the docs https://inlang.com/m/gerre34r/library-inlang-paraglideJs/errors#no-locale-found") - }, - m = (e, t) => { - const o = { - reload: !0, - ...t - }; - let a; - try { - a = h() - } catch {} - for (const l of u) - if (l !== "baseLocale") { - if (l === "localStorage" && typeof window < "u") localStorage.setItem(g, e); - else if (d(l) && r.has(l)) { - const n = r.get(l); - if (n) { - const c = n.setLocale(e); - c instanceof Promise && c.catch(L => { - console.warn(`Custom strategy "${l}" setLocale failed:`, L) - }) - } - } - } o.reload && window.location && e !== a && window.location.reload() - }; - -function s(e) { - return e ? f.includes(e) : !1 -} - -function p(e) { - if (s(e) === !1) throw new Error(`Invalid locale: ${e}. Expected one of: ${f.join(", ")}`); - return e -} - -function w() { - if (!navigator?.languages?.length) return "en"; - for (const lang of navigator.languages) { - const tag = lang.toLowerCase(); - if (tag.startsWith("zh")) { - return "zh"; - } - } - return "en"; -} - -const r = new Map; - -function d(e) { - return typeof e == "string" && /^custom-[A-Za-z0-9_-]+$/.test(e) -} -export { - h as g, g as l -}; \ No newline at end of file diff --git a/frontend-backup/_app/immutable/chunks/C5yqZvKC.js b/frontend-backup/_app/immutable/chunks/C5yqZvKC.js new file mode 100644 index 0000000..4227a35 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/C5yqZvKC.js @@ -0,0 +1,482 @@ +import { + i as Y, + a5 as k, + k as G, + ac as P, + h as p, + a1 as Z, + b5 as Q, + J as W, + K as X, + G as m, + b6 as x, + b7 as rr, + b8 as fr, + b9 as ir, + g as er, + ba as ar, + bb as tr, + T as j, + bc as ur, + bd as sr, + at as or, + be as lr, + bf as nr, + aM as cr, + bg as dr, + bh as vr, + bi as br, +} from "./CMvZtFtm.js"; +(function () { + try { + var r = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + r.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var r = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + f = new r.Error().stack; + f && + ((r._sentryDebugIds = r._sentryDebugIds || {}), + (r._sentryDebugIds[f] = "3e064db4-a3f5-4fbb-9aa1-ead39619ee99"), + (r._sentryDebugIdIdentifier = + "sentry-dbid-3e064db4-a3f5-4fbb-9aa1-ead39619ee99")); + })(); +} catch {} +function gr(r, f) { + var i = void 0, + e; + Y(() => { + i !== (i = f()) && + (e && (k(e), (e = null)), + i && + (e = G(() => { + P(() => i(r)); + }))); + }); +} +function H(r) { + var f, + i, + e = ""; + if (typeof r == "string" || typeof r == "number") e += r; + else if (typeof r == "object") + if (Array.isArray(r)) { + var a = r.length; + for (f = 0; f < a; f++) + r[f] && (i = H(r[f])) && (e && (e += " "), (e += i)); + } else for (i in r) r[i] && (e && (e += " "), (e += i)); + return e; +} +function hr() { + for (var r, f, i = 0, e = "", a = arguments.length; i < a; i++) + (r = arguments[i]) && (f = H(r)) && (e && (e += " "), (e += f)); + return e; +} +function _r(r) { + return typeof r == "object" ? hr(r) : r ?? ""; +} +const q = [ + ...` +\r\f \v\uFEFF`, +]; +function Ar(r, f, i) { + var e = r == null ? "" : "" + r; + if ((f && (e = e ? e + " " + f : f), i)) { + for (var a in i) + if (i[a]) e = e ? e + " " + a : a; + else if (e.length) + for (var t = a.length, u = 0; (u = e.indexOf(a, u)) >= 0; ) { + var s = u + t; + (u === 0 || q.includes(e[u - 1])) && + (s === e.length || q.includes(e[s])) + ? (e = (u === 0 ? "" : e.substring(0, u)) + e.substring(s + 1)) + : (u = s); + } + } + return e === "" ? null : e; +} +function D(r, f = !1) { + var i = f ? " !important;" : ";", + e = ""; + for (var a in r) { + var t = r[a]; + t != null && t !== "" && (e += " " + a + ": " + t + i); + } + return e; +} +function C(r) { + return r[0] !== "-" || r[1] !== "-" ? r.toLowerCase() : r; +} +function Sr(r, f) { + if (f) { + var i = "", + e, + a; + if ((Array.isArray(f) ? ((e = f[0]), (a = f[1])) : (e = f), r)) { + r = String(r) + .replaceAll(/\s*\/\*.*?\*\/\s*/g, "") + .trim(); + var t = !1, + u = 0, + s = !1, + d = []; + e && d.push(...Object.keys(e).map(C)), + a && d.push(...Object.keys(a).map(C)); + var l = 0, + A = -1; + const b = r.length; + for (var v = 0; v < b; v++) { + var c = r[v]; + if ( + (s + ? c === "/" && r[v - 1] === "*" && (s = !1) + : t + ? t === c && (t = !1) + : c === "/" && r[v + 1] === "*" + ? (s = !0) + : c === '"' || c === "'" + ? (t = c) + : c === "(" + ? u++ + : c === ")" && u--, + !s && t === !1 && u === 0) + ) { + if (c === ":" && A === -1) A = v; + else if (c === ";" || v === b - 1) { + if (A !== -1) { + var y = C(r.substring(l, A).trim()); + if (!d.includes(y)) { + c !== ";" && v++; + var S = r.substring(l, v).trim(); + i += " " + S + ";"; + } + } + (l = v + 1), (A = -1); + } + } + } + } + return ( + e && (i += D(e)), + a && (i += D(a, !0)), + (i = i.trim()), + i === "" ? null : i + ); + } + return r == null ? null : String(r); +} +function pr(r, f, i, e, a, t) { + var u = r.__className; + if (p || u !== i || u === void 0) { + var s = Ar(i, e, t); + (!p || s !== r.getAttribute("class")) && + (s == null + ? r.removeAttribute("class") + : f + ? (r.className = s) + : r.setAttribute("class", s)), + (r.__className = i); + } else if (t && a !== t) + for (var d in t) { + var l = !!t[d]; + (a == null || l !== !!a[d]) && r.classList.toggle(d, l); + } + return t; +} +function M(r, f = {}, i, e) { + for (var a in i) { + var t = i[a]; + f[a] !== t && + (i[a] == null ? r.style.removeProperty(a) : r.style.setProperty(a, t, e)); + } +} +function yr(r, f, i, e) { + var a = r.__style; + if (p || a !== f) { + var t = Sr(f, e); + (!p || t !== r.getAttribute("style")) && + (t == null ? r.removeAttribute("style") : (r.style.cssText = t)), + (r.__style = f); + } else + e && + (Array.isArray(e) + ? (M(r, i == null ? void 0 : i[0], e[0]), + M(r, i == null ? void 0 : i[1], e[1], "important")) + : M(r, i, e)); + return e; +} +function I(r, f, i = !1) { + if (r.multiple) { + if (f == null) return; + if (!Z(f)) return Q(); + for (var e of r.options) e.selected = f.includes(w(e)); + return; + } + for (e of r.options) { + var a = w(e); + if (W(a, f)) { + e.selected = !0; + return; + } + } + (!i || f !== void 0) && (r.selectedIndex = -1); +} +function K(r) { + var f = new MutationObserver(() => { + I(r, r.__value); + }); + f.observe(r, { + childList: !0, + subtree: !0, + attributes: !0, + attributeFilter: ["value"], + }), + X(() => { + f.disconnect(); + }); +} +function wr(r, f, i = f) { + var e = !0; + m(r, "change", (a) => { + var t = a ? "[selected]" : ":checked", + u; + if (r.multiple) u = [].map.call(r.querySelectorAll(t), w); + else { + var s = r.querySelector(t) ?? r.querySelector("option:not([disabled])"); + u = s && w(s); + } + i(u); + }), + P(() => { + var a = f(); + if ((I(r, a, e), e && a === void 0)) { + var t = r.querySelector(":checked"); + t !== null && ((a = w(t)), i(a)); + } + (r.__value = a), (e = !1); + }), + K(r); +} +function w(r) { + return "__value" in r ? r.__value : r.value; +} +const E = Symbol("class"), + N = Symbol("style"), + V = Symbol("is custom element"), + B = Symbol("is html"); +function Ir(r) { + if (p) { + var f = !1, + i = () => { + if (!f) { + if (((f = !0), r.hasAttribute("value"))) { + var e = r.value; + L(r, "value", null), (r.value = e); + } + if (r.hasAttribute("checked")) { + var a = r.checked; + L(r, "checked", null), (r.checked = a); + } + } + }; + (r.__on_r = i), dr(i), vr(); + } +} +function Lr(r, f) { + var i = R(r); + i.value === (i.value = f ?? void 0) || + (r.value === f && (f !== 0 || r.nodeName !== "PROGRESS")) || + (r.value = f ?? ""); +} +function Tr(r, f) { + f + ? r.hasAttribute("selected") || r.setAttribute("selected", "") + : r.removeAttribute("selected"); +} +function L(r, f, i, e) { + var a = R(r); + (p && + ((a[f] = r.getAttribute(f)), + f === "src" || + f === "srcset" || + (f === "href" && r.nodeName === "LINK"))) || + (a[f] !== (a[f] = i) && + (f === "loading" && (r[ir] = i), + i == null + ? r.removeAttribute(f) + : typeof i != "string" && z(r).includes(f) + ? (r[f] = i) + : r.setAttribute(f, i))); +} +function Er(r, f, i, e, a = !1) { + var t = R(r), + u = t[V], + s = !t[B]; + let d = p && u; + d && j(!1); + var l = f || {}, + A = r.tagName === "OPTION"; + for (var v in f) v in i || (i[v] = null); + i.class ? (i.class = _r(i.class)) : (e || i[E]) && (i.class = null), + i[N] && (i.style ?? (i.style = null)); + var c = z(r); + for (const o in i) { + let n = i[o]; + if (A && o === "value" && n == null) { + (r.value = r.__value = ""), (l[o] = n); + continue; + } + if (o === "class") { + var y = r.namespaceURI === "http://www.w3.org/1999/xhtml"; + pr(r, y, n, e, f == null ? void 0 : f[E], i[E]), + (l[o] = n), + (l[E] = i[E]); + continue; + } + if (o === "style") { + yr(r, n, f == null ? void 0 : f[N], i[N]), (l[o] = n), (l[N] = i[N]); + continue; + } + var S = l[o]; + if (!(n === S && !(n === void 0 && r.hasAttribute(o)))) { + l[o] = n; + var b = o[0] + o[1]; + if (b !== "$$") + if (b === "on") { + const _ = {}, + T = "$$" + o; + let g = o.slice(2); + var O = br(g); + if ((ur(g) && ((g = g.slice(0, -7)), (_.capture = !0)), !O && S)) { + if (n != null) continue; + r.removeEventListener(g, l[T], _), (l[T] = null); + } + if (n != null) + if (O) (r[`__${g}`] = n), or([g]); + else { + let F = function (J) { + l[o].call(this, J); + }; + l[T] = sr(g, r, F, _); + } + else O && (r[`__${g}`] = void 0); + } else if (o === "style") L(r, o, n); + else if (o === "autofocus") lr(r, !!n); + else if (!u && (o === "__value" || (o === "value" && n != null))) + r.value = r.__value = n; + else if (o === "selected" && A) Tr(r, n); + else { + var h = o; + s || (h = nr(h)); + var $ = h === "defaultValue" || h === "defaultChecked"; + if (n == null && !u && !$) + if (((t[o] = null), h === "value" || h === "checked")) { + let _ = r; + const T = f === void 0; + if (h === "value") { + let g = _.defaultValue; + _.removeAttribute(h), + (_.defaultValue = g), + (_.value = _.__value = T ? g : null); + } else { + let g = _.defaultChecked; + _.removeAttribute(h), + (_.defaultChecked = g), + (_.checked = T ? g : !1); + } + } else r.removeAttribute(o); + else + $ || (c.includes(h) && (u || typeof n != "string")) + ? ((r[h] = n), h in t && (t[h] = cr)) + : typeof n != "function" && L(r, h, n); + } + } + } + return d && j(!0), l; +} +function Or(r, f, i = [], e = [], a, t = !1) { + x(i, e, (u) => { + var s = void 0, + d = {}, + l = r.nodeName === "SELECT", + A = !1; + if ( + (Y(() => { + var c = f(...u.map(er)), + y = Er(r, s, c, a, t); + A && l && "value" in c && I(r, c.value); + for (let b of Object.getOwnPropertySymbols(d)) c[b] || k(d[b]); + for (let b of Object.getOwnPropertySymbols(c)) { + var S = c[b]; + b.description === ar && + (!s || S !== s[b]) && + (d[b] && k(d[b]), (d[b] = G(() => gr(r, () => S)))), + (y[b] = S); + } + s = y; + }), + l) + ) { + var v = r; + P(() => { + I(v, s.value, !0), K(v); + }); + } + A = !0; + }); +} +function R(r) { + return ( + r.__attributes ?? + (r.__attributes = { + [V]: r.nodeName.includes("-"), + [B]: r.namespaceURI === rr, + }) + ); +} +var U = new Map(); +function z(r) { + var f = U.get(r.nodeName); + if (f) return f; + U.set(r.nodeName, (f = [])); + for (var i, e = r, a = Element.prototype; a !== e; ) { + i = tr(e); + for (var t in i) i[t].set && f.push(t); + e = fr(e); + } + return f; +} +export { + E as C, + N as S, + pr as a, + Or as b, + _r as c, + wr as d, + yr as e, + gr as f, + Lr as g, + hr as h, + Ir as r, + L as s, +}; diff --git a/frontend-backup/_app/immutable/chunks/CAQlJ3np.js b/frontend-backup/_app/immutable/chunks/CAQlJ3np.js deleted file mode 100644 index 4cbce82..0000000 --- a/frontend-backup/_app/immutable/chunks/CAQlJ3np.js +++ /dev/null @@ -1 +0,0 @@ -import{g as s}from"./DklPLC_x.js";import"./B2cHk4HI.js";import{p as O,g as o,u as R,aw as w,au as j,y as k,f as g,d as c,s as x,bj as C,r as l,t as v,b,c as N}from"./BDALf20I.js";import{s as h}from"./4k6DpCgf.js";import{p as S,i as q,r as Y}from"./Bke_korE.js";import{b as z,C as B}from"./BNZUboE0.js";import{b as F}from"./DS58drb5.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="832b2d91-c507-495d-8a1f-d5c91dd6acad",t._sentryDebugIdIdentifier="sentry-dbid-832b2d91-c507-495d-8a1f-d5c91dd6acad")})()}catch{}const G=()=>"Select the reason",H=()=>"Selecione o motivo",xe=(t={},e={})=>(e.locale??s())==="en"?G():H(),J=()=>"Other",K=()=>"Outro motivo",ve=(t={},e={})=>(e.locale??s())==="en"?J():K(),P=()=>"Extra context on what happened (required)",Q=()=>"Mais informações sobre o que aconteceu (obrigatório)",be=(t={},e={})=>(e.locale??s())==="en"?P():Q(),U=()=>"Select the report reason",V=()=>"Selecione o motivo da denúncia",he=(t={},e={})=>(e.locale??s())==="en"?U():V(),W=()=>"Required",X=()=>"Obrigatório",Z=(t={},e={})=>(e.locale??s())==="en"?W():X(),$=t=>`Min. characters: ${t.min}`,ee=t=>`Mínimo de caracteres: ${t.min}`,te=(t,e={})=>(e.locale??s())==="en"?$(t):ee(t),ae=t=>`Max. characters: ${t.max}`,re=t=>`Máximo de caracteres: ${t.max}`,ne=(t,e={})=>(e.locale??s())==="en"?ae(t):re(t);var se=g(' '),oe=g(' '),ce=g('
        ');function ge(t,e){O(e,!0);let r=S(e,"value",15),E=S(e,"validate",15),I=Y(e,["$$slots","$$events","$$legacy","label","placeholder","value","max","min","validate"]),i=j("");const d=R(()=>{var a;return((a=r())==null?void 0:a.length)??0});E(T);function T(){return e.min!==void 0&&o(d)e.max?(w(i,ne({max:e.max}),!0),!1):!0}k(()=>{var a;e.max!==void 0&&o(d)>e.max&&r((a=r())==null?void 0:a.substring(0,e.max))});var f=ce(),y=c(f);{var L=a=>{var n=se(),m=c(n,!0);l(n),v(()=>h(m,e.label)),b(a,n)};q(y,a=>{e.label&&a(L)})}var u=x(y,2);C(u),z(u,a=>({...I,class:`textarea w-full ${e.class??""}`,placeholder:e.placeholder,[B]:a}),[()=>({"textarea-error":!!o(i)})]);var p=x(u,2),_=c(p),M=c(_,!0);l(_);var D=x(_,2);{var A=a=>{var n=oe(),m=c(n,!0);l(n),v(()=>h(m,e.max-o(d))),b(a,n)};q(D,a=>{e.max!==void 0&&a(A)})}l(p),l(f),v(()=>h(M,o(i))),F(u,r),b(t,f),N()}export{ge as L,he as a,be as g,ve as o,xe as s}; diff --git a/frontend-backup/_app/immutable/chunks/CBqzI9hL.js b/frontend-backup/_app/immutable/chunks/CBqzI9hL.js deleted file mode 100644 index 41e26bd..0000000 --- a/frontend-backup/_app/immutable/chunks/CBqzI9hL.js +++ /dev/null @@ -1,665 +0,0 @@ -import { - bl as ze, - F as Se, - h as qe, - aW as _t, - ao as mt, - G as Re, - bb as bt, - k as G, - x as Xe, - bm as ht, - bn as gt, - q as R, - b as _, - an as We, - p as Qe, - aS as Ge, - a as pe, - c as Ke, - f as k, - d as o, - r as l, - s as d, - o as U, - t as z, - bj as ce, - w as xt, - A as b, - aR as ie, - aH as C, - aT as Le, - aU as wt -} from "./DUoKDNpf.js"; -import { - g as N -} from "./C5GsJ62f.js"; -import "./Bzak7iHL.js"; -import { - o as kt -} from "./ByKBPM-D.js"; -import { - s as I -} from "./g8c1BvYP.js"; -import { - r as Y, - p as Ne, - i as M -} from "./5NasrULQ.js"; -import { - a as A, - e as yt, - r as xe, - b as de, - f as we, - s as Ye, - d as Ct -} from "./B1GmkH4o.js"; -import { - b as Lt -} from "./CMs8vKjq.js"; -import { - g as Fe -} from "./KvV259my.js"; -import { - g as It, - u as ve, - t as K, - a as Je, - S as zt, - c as je -} from "./1lh-LSvX.js"; -import { - a as St -} from "./DsJqb9ei.js"; - -function Ca(e, t, a = t) { - var r = bt(), - i = new WeakSet; - ze(e, "input", c => { - var s = c ? e.defaultValue : e.value; - if (s = ye(e) ? Ce(s) : s, a(s), G !== null && i.add(G), r && s !== (s = t())) { - var f = e.selectionStart, - v = e.selectionEnd; - e.value = s ?? "", v !== null && (e.selectionStart = f, e.selectionEnd = Math.min(v, e.value.length)) - } - }), (qe && e.defaultValue !== e.value || Xe(t) == null && e.value) && (a(ye(e) ? Ce(e.value) : e.value), G !== null && i.add(G)), Se(() => { - var c = t(); - if (e === document.activeElement) { - var s = ht ?? G; - if (i.has(s)) return - } - ye(e) && c === Ce(e.value) || e.type === "date" && !c && !e.value || c !== e.value && (e.value = c ?? "") - }) -} -const ke = new Set; - -function La(e, t, a, r, i = r) { - var c = a.getAttribute("type") === "checkbox", - s = e; - let f = !1; - if (t !== null) - for (var v of t) s = s[v] ?? (s[v] = []); - s.push(a), ze(a, "change", () => { - var n = a.__value; - c && (n = Oe(s, n, a.checked)), i(n) - }, () => i(c ? [] : null)), Se(() => { - var n = r(); - if (qe && a.defaultChecked !== a.checked) { - f = !0; - return - } - c ? (n = n || [], a.checked = n.includes(a.__value)) : a.checked = _t(a.__value, n) - }), mt(() => { - var n = s.indexOf(a); - n !== -1 && s.splice(n, 1) - }), ke.has(s) || (ke.add(s), Re(() => { - s.sort((n, p) => n.compareDocumentPosition(p) === 4 ? -1 : 1), ke.delete(s) - })), Re(() => { - if (f) { - var n; - if (c) n = Oe(s, n, a.checked); - else { - var p = s.find(g => g.checked); - n = p == null ? void 0 : p.__value - } - i(n) - } - }) -} - -function Ia(e, t, a = t) { - ze(e, "change", r => { - var i = r ? e.defaultChecked : e.checked; - a(i) - }), (qe && e.defaultChecked !== e.checked || Xe(t) == null) && a(e.checked), Se(() => { - var r = t(); - e.checked = !!r - }) -} - -function Oe(e, t, a) { - for (var r = new Set, i = 0; i < e.length; i += 1) e[i].checked && r.add(e[i].__value); - return a || r.delete(t), Array.from(r) -} - -function ye(e) { - var t = e.type; - return t === "number" || t === "range" -} - -function Ce(e) { - return e === "" ? null : +e -} -const qt = gt, - Pt = () => "Add profile picture", - Dt = () => "添加头像", - za = (e = {}, t = {}) => (t.locale ?? N()) === "en" ? Pt() : Dt(), - Mt = () => "Cancel", - Tt = () => "取消", - Sa = (e = {}, t = {}) => (t.locale ?? N()) === "en" ? Mt() : Tt(), - Bt = () => "Close", - Et = () => "关闭", - Ht = (e = {}, t = {}) => (t.locale ?? N()) === "en" ? Bt() : Et(), - Zt = () => "You gain 1 droplet per pixel painted and 500 droplets per level", - Ut = () => "每绘制一个像素会获得一个水滴,每次升级会获得500水滴", - At = (e = {}, t = {}) => (t.locale ?? N()) === "en" ? Zt() : Ut(), - Rt = () => "Eraser", - Ft = () => "擦除", - Text3_EN = () => "Droplets", - Text3_CN = () => "水滴", - Text3 = (e = {}, t = {}) => (t.locale ?? N()) === "en" ? Text3_EN() : Text3_CN(), - Text4_EN = () => "bonus", - Text4_CN = () => "赠品", - Text4 = (e = {}, t = {}) => (t.locale ?? N()) === "en" ? Text4_EN() : Text4_CN(), - qa = (e = {}, t = {}) => (t.locale ?? N()) === "en" ? Rt() : Ft(); -var jt = R(''); - -function Ot(e, t) { - let a = Y(t, ["$$slots", "$$events", "$$legacy"]); - var r = jt(); - A(r, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ...a - })), _(e, r) -} -var Vt = R(''); - -function Ie(e, t) { - let a = Y(t, ["$$slots", "$$events", "$$legacy"]); - var r = Vt(); - A(r, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ...a - })), _(e, r) -} -var Xt = k(''), - Wt = k(' '+Text3()+' '), - Qt = k(''), - Gt = k(''); - -function Kt(e, t) { - Qe(t, !0); - const a = v => { - var n = Wt(), - p = o(n); - Ie(p, { - class: "text-primary size-4.5" - }); - var g = d(p, 2), - P = o(g); - U(), l(g); - var x = d(g, 2); - { - var S = T => { - var D = Xt(), - J = o(D); - Ot(J, { - class: "size-4" - }), l(D), _(T, D) - }; - M(x, T => { - r() && T(S) - }) - } - l(n), z(T => I(P, `${T??""} `), [() => t.value.toLocaleString("en-US")]), _(v, n) - }; - let r = Ne(t, "button", 3, !0); - var i = Ge(), - c = pe(i); - { - var s = v => { - var n = Qt(); - n.__click = () => { - It.dropletsDialogOpen = !0 - }; - var p = o(n); - a(p), l(n), _(v, n) - }, - f = v => { - var n = Gt(), - p = o(n); - a(p), l(n), _(v, n) - }; - M(c, v => { - r() ? v(s) : v(f, !1) - }) - } - _(e, i), Ke() -} -We(["click"]); -var Nt = R(''); - -function Yt(e, t) { - let a = Y(t, ["$$slots", "$$events", "$$legacy"]); - var r = Nt(); - A(r, () => ({ - xmlns: "http://www.w3.org/2000/svg", - height: "24px", - viewBox: "0 -960 960 960", - width: "24px", - fill: "currentColor", - ...a - })), _(e, r) -} -var Jt = R(''); - -function Ve(e, t) { - let a = Y(t, ["$$slots", "$$events", "$$legacy"]); - var r = Jt(); - A(r, () => ({ - xmlns: "http://www.w3.org/2000/svg", - x: "0px", - y: "0px", - width: "100", - height: "100", - viewBox: "0 0 48 48", - ...a - })), _(e, r) -} -var $t = (e, t, a, r, i) => { - b(t).show(), C(a, !0), Je.generatePixQrCode(r()).then(c => { - C(i, c, !0) - }).catch(c => { - K.error(c.message) - }).finally(() => { - C(a, !1) - }) - }, - ea = k('
        '), - ta = k('
        '), - aa = k('

        '+Text3()+'

        '), - ra = k('

        '+Text3()+'

        '), - sa = (e, t) => { - var a; - navigator.clipboard.writeText(((a = b(t)) == null ? void 0 : a.pixCode) ?? ""), K.success("Código PIX copiado") - }, - oa = async (e, t, a) => { - var r, i, c; - if (!b(t)) { - K.info("Espere 1 minuto e recarrege a pagina"); - return - } - try { - C(a, !0); - const { - paid: s - } = await Je.getPixStatus(b(t).pixId); - if (s) { - const f = b(t).productId.toString(), - v = (c = (i = (r = zt.products[f]) == null ? void 0 : r.items) == null ? void 0 : i[0]) == null ? void 0 : c.amount; - await ve.refresh(), v ? Fe(`payment/success?droplets=${v}`) : Fe("payment/success") - } else K.info("Pagamento ainda não recebido. Desculpe a demora, tente novamente em instantes.", { - duration: 1e5 - }) - } catch (s) { - console.error(s), K.error("Error ao atualizar o status do pix. Tente recarregar a página.") - } finally { - C(a, !1) - } - }, la = k('

        Efetue o pagamento do PIX no valor de

        QR code PIX
        Código
        ', 1), na = k('
        '), ca = k(' ', 1); - -function Pa(e, t) { - Qe(t, !0); - let a = Ne(t, "open", 15), - r = ie(!1); - kt(() => { - const u = w => { - w.key === "Escape" && a(!1) - }; - return document.addEventListener("keydown", u), () => document.removeEventListener("keydown", u) - }); - const i = Le(() => { - var u, w; - return ((w = (u = ve.data) == null ? void 0 : u.country) == null ? void 0 : w.toUpperCase()) === "BR" - }); - let c = ie(null), - s = ie(void 0), - f = ie(!1); - var v = ca(), - n = pe(v), - p = o(n), - g = d(o(p), 2); - { - var P = u => { - var w = ra(), - B = o(w), - E = o(B), - $ = o(E); - Ie($, { - class: "text-primary size-6" - }); - var H = d($, 4), - ee = o(H); - { - let L = Le(() => { - var se; - return ((se = ve.data) == null ? void 0 : se.droplets) ?? 0 - }); - Kt(ee, { - get value() { - return b(L) - }, - button: !1 - }) - } - l(H), l(E); - var te = d(E, 2), - F = o(te, !0); - l(te), l(B); - var j = d(B, 2); - { - const L = (se, m) => { - let Me = () => m == null ? void 0 : m().droplets, - fe = () => m == null ? void 0 : m().bonus, - Te = () => m == null ? void 0 : m().price, - Be = () => m == null ? void 0 : m().stripeLookupkey, - st = () => m == null ? void 0 : m().productId, - ot = () => m == null ? void 0 : m().dropdownClass; - var _e = aa(), - me = o(_e), - Ee = o(me); - Ie(Ee, { - class: "mb-1 inline size-7" - }); - var He = d(Ee, 2), - lt = o(He); - U(), l(He), l(me); - var be = d(me, 2), - Ze = o(be); - { - var nt = y => { - var h = wt(); - z(q => I(h, `${q??""} ` + Text3()), [() => Me().toLocaleString("en-US")]), _(y, h) - }; - M(Ze, y => { - fe() && y(nt) - }) - } - var Ue = d(Ze, 2), - ct = o(Ue); - l(Ue), l(be); - var it = d(be, 2); - { - var dt = y => { - var h = ea(), - q = o(h), - W = o(q); - l(q); - var oe = d(q, 2), - Q = o(oe), - le = o(Q), - he = o(le); - xe(he); - var ge = d(he, 2), - pt = o(ge); - Yt(pt, { - class: "inline size-5" - }), U(2), l(ge), l(le), l(Q); - var Ae = d(Q, 2), - ne = o(Ae); - ne.__click = [$t, c, r, st, s]; - var ut = o(ne); - Ve(ut, { - class: "size-5" - }), U(2), l(ne), l(Ae), l(oe), l(h), z(ft => { - Ye(h, 1, `dropdown mt-3 ${ot()??""}`), I(W, `R$${ft??""}`), de(le, "action", `${je}/payment/create-checkout-session`), we(he, Be()), ge.disabled = b(r), ne.disabled = b(r) - }, [() => (Te() * 4).toFixed(2).replace(".", ",")]), ce("submit", le, () => { - C(r, !0), setTimeout(() => C(r, !1), 3e3) - }), _(y, h) - }, - vt = y => { - var h = ta(), - q = o(h); - xe(q); - var W = d(q, 2), - oe = o(W); - l(W), l(h), z(Q => { - de(h, "action", `${je}/payment/create-checkout-session`), we(q, Be()), W.disabled = b(r), I(oe, `¥ ${Q??""}`) - }, [() => Te().toFixed(2)]), ce("submit", h, () => { - C(r, !0), setTimeout(() => C(r, !1), 3e3) - }), _(y, h) - }; - M(it, y => { - b(i) || qt ? y(dt) : y(vt, !1) - }) - } - l(_e), z((y, h) => { - I(lt, `${y??""} `), I(ct, `+${h??""} ` + Text4()) - }, [() => (Me() + fe()).toLocaleString("en-US"), () => fe().toLocaleString("en-US")]), _(se, _e) - }; - var Z = o(j), - O = o(Z); - L(O, () => ({ - price: 5, - droplets: 25e3, - bonus: 0, - stripeLookupkey: "droplets_5", - productId: 10, - dropdownClass: "dropdown-center" - })); - var ae = d(O, 2); - L(ae, () => ({ - price: 15, - droplets: 75e3, - bonus: 3750, - stripeLookupkey: "droplets_15", - productId: 20, - dropdownClass: "dropdown-center" - })); - var V = d(ae, 2); - L(V, () => ({ - price: 30, - droplets: 15e4, - bonus: 15e3, - stripeLookupkey: "droplets_30", - productId: 30, - dropdownClass: "dropdown-center" - })); - var X = d(V, 2); - L(X, () => ({ - price: 50, - droplets: 25e4, - bonus: 37500, - stripeLookupkey: "droplets_50", - productId: 40, - dropdownClass: "dropdown-center" - })); - var re = d(X, 2); - L(re, () => ({ - price: 75, - droplets: 375e3, - bonus: 75e3, - stripeLookupkey: "droplets_75", - productId: 50, - dropdownClass: "dropdown-center" - })); - var rt = d(re, 2); - L(rt, () => ({ - price: 100, - droplets: 5e5, - bonus: 125e3, - stripeLookupkey: "droplets_100", - productId: 60, - dropdownClass: "max-sm:dropdown-top dropdown-center" - })), l(Z), l(j) - } - l(w), z(L => I(F, L), [() => At()]), _(u, w) - }; - M(g, u => { - ve.data && u(P) - }) - } - l(p); - var x = d(p, 2), - S = o(x), - T = o(S, !0); - l(S), l(x), l(n), yt(n, () => u => { - xt(() => { - a() ? u.show() : u.close() - }) - }); - var D = d(n, 2), - J = o(D), - Pe = d(o(J), 2), - ue = o(Pe), - De = o(ue), - $e = o(De); - Ve($e, { - class: "size-10" - }), U(2), l(De), l(ue); - var et = d(ue, 2); - { - var tt = u => { - var w = la(), - B = pe(w), - E = d(o(B)), - $ = o(E); - l(E), l(B); - var H = d(B, 2), - ee = o(H), - te = o(ee); - U(2), l(ee), l(H); - var F = d(H, 2), - j = d(o(F), 2), - Z = o(j); - xe(Z); - var O = d(Z, 2), - ae = o(O); - ae.__click = [sa, s], l(O), l(j), l(F); - var V = d(F, 2), - X = o(V); - X.__click = [oa, s, f], l(V), z(re => { - I($, `R$${re??""}`), de(te, "src", b(s).qrCode), we(Z, b(s).pixCode), X.disabled = b(f) - }, [() => (b(s).price / 100).toFixed(2).replace(".", ",")]), _(u, w) - }, - at = u => { - var w = na(); - _(u, w) - }; - M(et, u => { - b(s) ? u(tt) : u(at, !1) - }) - } - l(Pe), l(J), l(D), Lt(D, u => C(c, u), () => b(c)), z(u => I(T, u), [() => Ht()]), ce("close", n, () => { - a(!1) - }), ce("close", D, () => { - setTimeout(() => { - C(s, void 0) - }, 300) - }), _(e, v), Ke() -} -We(["click"]); -var ia = R(''), - da = R(''); - -function Da(e, t) { - let a = Y(t, ["$$slots", "$$events", "$$legacy", "filled"]); - var r = Ge(), - i = pe(r); - { - var c = f => { - var v = ia(); - A(v, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ...a - })), _(f, v) - }, - s = f => { - var v = da(); - A(v, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ...a - })), _(f, v) - }; - M(i, f => { - t.filled ? f(c) : f(s, !1) - }) - } - _(e, r) -} - -function Ma([e, t], [a, r]) { - e = Math.floor(e), t = Math.floor(t), a = Math.floor(a), r = Math.floor(r); - const i = [], - c = Math.abs(a - e), - s = Math.abs(r - t), - f = e < a ? 1 : -1, - v = t < r ? 1 : -1; - let n = c - s, - p = e, - g = t; - for (; i.push([p, g]), !(p === a && g === r);) { - const P = 2 * n; - P > -s && (n -= s, p += f), P < c && (n += c, g += v) - } - return i -} -var va = k('User profile'), - pa = k('
        '); - -function Ta(e, t) { - const a = Le(() => t.level % 1 * 360); - var r = pa(), - i = d(o(r), 2), - c = d(i, 2), - s = o(c), - f = o(s); - { - var v = x => { - St(x, { - get userId() { - return t.userId - } - }) - }, - n = x => { - var S = va(); - z(() => de(S, "src", t.pictureUrl)), _(x, S) - }; - M(f, x => { - t.pictureUrl ? x(n, !1) : x(v) - }) - } - l(s), l(c); - var p = d(c, 2); - let g; - var P = o(p, !0); - l(p), l(r), z((x, S) => { - Ct(i, `--angle: ${b(a)??""}deg; --color: var(--color-secondary)`), g = Ye(p, 1, "text-primary-content bg-secondary absolute bottom-0 flex items-center justify-center rounded-full px-[5px] py-0 text-xs font-bold", null, g, x), I(P, S) - }, [() => ({ - "left-0": t.level > 99, - "-left-1": t.level > 99 - }), () => Math.floor(t.level)]), _(e, r) -} -export { - Ot as A, Kt as D, Da as I, Ta as P, Ie as a, Pa as b, za as c, Sa as d, qa as e, Ht as f, Ca as g, La as h, qt as i, Ia as j, Ma as r -}; \ No newline at end of file diff --git a/frontend-backup/_app/immutable/chunks/CDZgL_Bh.js b/frontend-backup/_app/immutable/chunks/CDZgL_Bh.js deleted file mode 100644 index 1b04119..0000000 --- a/frontend-backup/_app/immutable/chunks/CDZgL_Bh.js +++ /dev/null @@ -1 +0,0 @@ -import{g as c}from"./DklPLC_x.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="476c3416-464c-44fb-9f2f-18bebc310382",e._sentryDebugIdIdentifier="sentry-dbid-476c3416-464c-44fb-9f2f-18bebc310382")})()}catch{}const o=()=>"Cancel",t=()=>"Cancelar",d=(e={},n={})=>(n.locale??c())==="en"?o():t();export{d as c}; diff --git a/frontend-backup/_app/immutable/chunks/CHGjpGz-.js b/frontend-backup/_app/immutable/chunks/CHGjpGz-.js new file mode 100644 index 0000000..5d69997 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/CHGjpGz-.js @@ -0,0 +1,40 @@ +import { g as c } from "./CV9xcpLq.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + n = new e.Error().stack; + n && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[n] = "476c3416-464c-44fb-9f2f-18bebc310382"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-476c3416-464c-44fb-9f2f-18bebc310382")); + })(); +} catch {} +const o = () => "Cancel", + t = () => "Cancelar", + l = (e = {}, n = {}) => ((n.locale ?? c()) === "en" ? o() : t()); +export { l as c }; diff --git a/frontend-backup/_app/immutable/chunks/CMs8vKjq.js b/frontend-backup/_app/immutable/chunks/CMs8vKjq.js deleted file mode 100644 index 8f447cb..0000000 --- a/frontend-backup/_app/immutable/chunks/CMs8vKjq.js +++ /dev/null @@ -1,27 +0,0 @@ -import { D as S, F as h, x as k, G as x, S as T } from "./DUoKDNpf.js"; -function t(r, i) { - return r === i || (r == null ? void 0 : r[T]) === i; -} -function A(r = {}, i, a, c) { - return ( - S(() => { - var f, s; - return ( - h(() => { - (f = s), - (s = []), - k(() => { - r !== a(...s) && (i(r, ...s), f && t(a(...f), r) && i(null, ...f)); - }); - }), - () => { - x(() => { - s && t(a(...s), r) && i(null, ...s); - }); - } - ); - }), - r - ); -} -export { A as b }; diff --git a/frontend-backup/_app/immutable/chunks/CMvZtFtm.js b/frontend-backup/_app/immutable/chunks/CMvZtFtm.js new file mode 100644 index 0000000..b2634df --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/CMvZtFtm.js @@ -0,0 +1,1988 @@ +var bn = Object.defineProperty; +var Ee = (t) => { + throw TypeError(t); +}; +var gn = (t, e, n) => + e in t + ? bn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) + : (t[e] = n); +var kt = (t, e, n) => gn(t, typeof e != "symbol" ? e + "" : e, n), + Jt = (t, e, n) => e.has(t) || Ee("Cannot " + n); +var d = (t, e, n) => ( + Jt(t, e, "read from private field"), n ? n.call(t) : e.get(t) + ), + k = (t, e, n) => + e.has(t) + ? Ee("Cannot add the same private member more than once") + : e instanceof WeakSet + ? e.add(t) + : e.set(t, n), + R = (t, e, n, r) => ( + Jt(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n + ), + Q = (t, e, n) => (Jt(t, e, "access private method"), n); +(function () { + try { + var t = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + t.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var t = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + e = new t.Error().stack; + e && + ((t._sentryDebugIds = t._sentryDebugIds || {}), + (t._sentryDebugIds[e] = "499cc772-9cbd-41eb-a7e0-ed5b7c59daca"), + (t._sentryDebugIdIdentifier = + "sentry-dbid-499cc772-9cbd-41eb-a7e0-ed5b7c59daca")); + })(); +} catch {} +const De = !1; +var Pe = Array.isArray, + En = Array.prototype.indexOf, + Tr = Array.from, + ee = Object.defineProperty, + Nt = Object.getOwnPropertyDescriptor, + mn = Object.getOwnPropertyDescriptors, + Tn = Object.prototype, + An = Array.prototype, + Me = Object.getPrototypeOf, + me = Object.isExtensible; +function Ar(t) { + return typeof t == "function"; +} +const kr = () => {}; +function xr(t) { + return t(); +} +function Le(t) { + for (var e = 0; e < t.length; e++) t[e](); +} +function kn() { + var t, + e, + n = new Promise((r, a) => { + (t = r), (e = a); + }); + return { promise: n, resolve: t, reject: e }; +} +function Sr(t, e) { + if (Array.isArray(t)) return t; + if (!(Symbol.iterator in t)) return Array.from(t); + const n = []; + for (const r of t) if ((n.push(r), n.length === e)) break; + return n; +} +const N = 2, + le = 4, + $t = 8, + mt = 16, + Y = 32, + ft = 64, + Fe = 128, + C = 256, + Ht = 512, + m = 1024, + D = 2048, + Z = 4096, + K = 8192, + Tt = 16384, + fe = 32768, + qe = 65536, + Te = 1 << 17, + xn = 1 << 18, + oe = 1 << 19, + je = 1 << 20, + ne = 1 << 21, + ce = 1 << 22, + at = 1 << 23, + st = Symbol("$state"), + Ir = Symbol("legacy props"), + Nr = Symbol(""), + _e = new (class extends Error { + constructor() { + super(...arguments); + kt(this, "name", "StaleReactionError"); + kt( + this, + "message", + "The reaction that called `getAbortSignal()` was re-run or destroyed" + ); + } + })(), + ve = 3, + de = 8; +function Sn() { + throw new Error("https://svelte.dev/e/await_outside_boundary"); +} +function In(t) { + throw new Error("https://svelte.dev/e/lifecycle_outside_component"); +} +function Nn() { + throw new Error("https://svelte.dev/e/async_derived_orphan"); +} +function Rn(t) { + throw new Error("https://svelte.dev/e/effect_in_teardown"); +} +function On() { + throw new Error("https://svelte.dev/e/effect_in_unowned_derived"); +} +function Cn(t) { + throw new Error("https://svelte.dev/e/effect_orphan"); +} +function Dn() { + throw new Error("https://svelte.dev/e/effect_update_depth_exceeded"); +} +function Or() { + throw new Error("https://svelte.dev/e/get_abort_signal_outside_reaction"); +} +function Cr() { + throw new Error("https://svelte.dev/e/hydration_failed"); +} +function Dr(t) { + throw new Error("https://svelte.dev/e/lifecycle_legacy_only"); +} +function Pr(t) { + throw new Error("https://svelte.dev/e/props_invalid_value"); +} +function Pn() { + throw new Error("https://svelte.dev/e/state_descriptors_fixed"); +} +function Mn() { + throw new Error("https://svelte.dev/e/state_prototype_fixed"); +} +function Ln() { + throw new Error("https://svelte.dev/e/state_unsafe_mutation"); +} +const Mr = 1, + Lr = 2, + Fr = 4, + qr = 8, + jr = 16, + Yr = 1, + Hr = 2, + Ur = 4, + Br = 8, + Vr = 16, + Wr = 1, + $r = 2, + Gr = 4, + Fn = 1, + qn = 2, + jn = "[", + Yn = "[!", + Hn = "]", + he = {}, + E = Symbol(), + Kr = "http://www.w3.org/1999/xhtml", + zr = "@attach"; +function pe(t) { + console.warn("https://svelte.dev/e/hydration_mismatch"); +} +function Xr() { + console.warn("https://svelte.dev/e/select_multiple_invalid_value"); +} +let S = !1; +function Zr(t) { + S = t; +} +let y; +function yt(t) { + if (t === null) throw (pe(), he); + return (y = t); +} +function Ye() { + return yt(ot(y)); +} +function Jr(t) { + if (S) { + if (ot(y) !== null) throw (pe(), he); + y = t; + } +} +function Qr(t = 1) { + if (S) { + for (var e = t, n = y; e--; ) n = ot(n); + y = n; + } +} +function ta() { + for (var t = 0, e = y; ; ) { + if (e.nodeType === de) { + var n = e.data; + if (n === Hn) { + if (t === 0) return e; + t -= 1; + } else (n === jn || n === Yn) && (t += 1); + } + var r = ot(e); + e.remove(), (e = r); + } +} +function ea(t) { + if (!t || t.nodeType !== de) throw (pe(), he); + return t.data; +} +function He(t) { + return t === this.v; +} +function Un(t, e) { + return t != t + ? e == e + : t !== e || (t !== null && typeof t == "object") || typeof t == "function"; +} +function na(t, e) { + return t !== e; +} +function Ue(t) { + return !Un(t, this.v); +} +let Gt = !1, + Bn = !1; +function ra() { + Gt = !0; +} +let b = null; +function Ut(t) { + b = t; +} +function aa(t) { + return Kt().get(t); +} +function sa(t, e) { + return Kt().set(t, e), e; +} +function ia(t) { + return Kt().has(t); +} +function ua() { + return Kt(); +} +function la(t, e = !1, n) { + b = { + p: b, + c: null, + e: null, + s: t, + x: null, + l: Gt && !e ? { s: null, u: null, $: [] } : null, + }; +} +function fa(t) { + var e = b, + n = e.e; + if (n !== null) { + e.e = null; + for (var r of n) an(r); + } + return t !== void 0 && (e.x = t), (b = e.p), t ?? {}; +} +function Ft() { + return !Gt || (b !== null && b.l === null); +} +function Kt(t) { + return b === null && In(), b.c ?? (b.c = new Map(Vn(b) || void 0)); +} +function Vn(t) { + let e = t.p; + for (; e !== null; ) { + const n = e.c; + if (n !== null) return n; + e = e.p; + } + return null; +} +const Wn = new WeakMap(); +function $n(t) { + var e = v; + if (e === null) return (_.f |= at), t; + if ((e.f & fe) === 0) { + if ((e.f & Fe) === 0) throw (!e.parent && t instanceof Error && Be(t), t); + e.b.error(t); + } else we(t, e); +} +function we(t, e) { + for (; e !== null; ) { + if ((e.f & Fe) !== 0) + try { + e.b.error(t); + return; + } catch (n) { + t = n; + } + e = e.parent; + } + throw (t instanceof Error && Be(t), t); +} +function Be(t) { + const e = Wn.get(t); + e && + (ee(t, "message", { value: e.message }), + ee(t, "stack", { value: e.stack })); +} +const Gn = + typeof requestIdleCallback > "u" + ? (t) => setTimeout(t, 1) + : requestIdleCallback; +let Rt = [], + Ot = []; +function Ve() { + var t = Rt; + (Rt = []), Le(t); +} +function We() { + var t = Ot; + (Ot = []), Le(t); +} +function $e(t) { + Rt.length === 0 && queueMicrotask(Ve), Rt.push(t); +} +function oa(t) { + Ot.length === 0 && Gn(We), Ot.push(t); +} +function Kn() { + Rt.length > 0 && Ve(), Ot.length > 0 && We(); +} +function zn() { + for (var t = v.b; t !== null && !t.has_pending_snippet(); ) t = t.parent; + return t === null && Sn(), t; +} +function ye(t) { + var e = N | D, + n = _ !== null && (_.f & N) !== 0 ? _ : null; + return ( + v === null || (n !== null && (n.f & C) !== 0) ? (e |= C) : (v.f |= oe), + { + ctx: b, + deps: null, + effects: null, + equals: He, + f: e, + fn: t, + reactions: null, + rv: 0, + v: E, + wv: 0, + parent: n ?? v, + ac: null, + } + ); +} +function Xn(t, e) { + let n = v; + n === null && Nn(); + var r = n.b, + a = void 0, + s = ge(E), + u = null, + l = !_; + return ( + ur(() => { + try { + var i = t(); + } catch (h) { + i = Promise.reject(h); + } + var f = () => i; + (a = (u == null ? void 0 : u.then(f, f)) ?? Promise.resolve(i)), (u = a); + var o = g, + c = r.pending; + l && (r.update_pending_count(1), c || o.increment()); + const w = (h, p = void 0) => { + (u = null), + c || o.activate(), + p + ? p !== _e && ((s.f |= at), ie(s, p)) + : ((s.f & at) !== 0 && (s.f ^= at), ie(s, h)), + l && (r.update_pending_count(-1), c || o.decrement()), + ze(); + }; + if ((a.then(w, (h) => w(null, h || "unknown")), o)) + return () => { + queueMicrotask(() => o.neuter()); + }; + }), + new Promise((i) => { + function f(o) { + function c() { + o === a ? i(s) : f(a); + } + o.then(c, c); + } + f(a); + }) + ); +} +function ca(t) { + const e = ye(t); + return cn(e), e; +} +function Zn(t) { + const e = ye(t); + return (e.equals = Ue), e; +} +function Ge(t) { + var e = t.effects; + if (e !== null) { + t.effects = null; + for (var n = 0; n < e.length; n += 1) lt(e[n]); + } +} +function Jn(t) { + for (var e = t.parent; e !== null; ) { + if ((e.f & N) === 0) return e; + e = e.parent; + } + return null; +} +function be(t) { + var e, + n = v; + X(Jn(t)); + try { + Ge(t), (e = hn(t)); + } finally { + X(n); + } + return e; +} +function Ke(t) { + var e = be(t); + if ((t.equals(e) || ((t.v = e), (t.wv = vn())), !At)) + if (W !== null) W.set(t, t.v); + else { + var n = ($ || (t.f & C) !== 0) && t.deps !== null ? Z : m; + x(t, n); + } +} +function Qn(t, e, n) { + const r = Ft() ? ye : Zn; + if (e.length === 0) { + n(t.map(r)); + return; + } + var a = g, + s = v, + u = tr(), + l = zn(); + Promise.all(e.map((i) => Xn(i))) + .then((i) => { + a == null || a.activate(), u(); + try { + n([...t.map(r), ...i]); + } catch (f) { + (s.f & Tt) === 0 && we(f, s); + } + a == null || a.deactivate(), ze(); + }) + .catch((i) => { + l.error(i); + }); +} +function tr() { + var t = v, + e = _, + n = b; + return function () { + X(t), F(e), Ut(n); + }; +} +function ze() { + X(null), F(null), Ut(null); +} +const xt = new Set(); +let g = null, + Qt = null, + W = null, + Ae = new Set(), + Bt = []; +function Xe() { + const t = Bt.shift(); + Bt.length > 0 && queueMicrotask(Xe), t(); +} +let ut = [], + zt = null, + re = !1, + jt = !1; +var dt, ht, B, Dt, Pt, nt, pt, rt, V, wt, Mt, Lt, L, Ze, Yt, ae; +const Wt = class Wt { + constructor() { + k(this, L); + kt(this, "current", new Map()); + k(this, dt, new Map()); + k(this, ht, new Set()); + k(this, B, 0); + k(this, Dt, null); + k(this, Pt, !1); + k(this, nt, []); + k(this, pt, []); + k(this, rt, []); + k(this, V, []); + k(this, wt, []); + k(this, Mt, []); + k(this, Lt, []); + kt(this, "skipped_effects", new Set()); + } + process(e) { + var s; + (ut = []), (Qt = null); + var n = null; + if (xt.size > 1) { + (n = new Map()), (W = new Map()); + for (const [u, l] of this.current) + n.set(u, { v: u.v, wv: u.wv }), (u.v = l); + for (const u of xt) + if (u !== this) + for (const [l, i] of d(u, dt)) + n.has(l) || (n.set(l, { v: l.v, wv: l.wv }), (l.v = i)); + } + for (const u of e) Q(this, L, Ze).call(this, u); + if (d(this, nt).length === 0 && d(this, B) === 0) { + Q(this, L, ae).call(this); + var r = d(this, rt), + a = d(this, V); + R(this, rt, []), + R(this, V, []), + R(this, wt, []), + (Qt = g), + (g = null), + ke(r), + ke(a), + g === null ? (g = this) : xt.delete(this), + (s = d(this, Dt)) == null || s.resolve(); + } else + Q(this, L, Yt).call(this, d(this, rt)), + Q(this, L, Yt).call(this, d(this, V)), + Q(this, L, Yt).call(this, d(this, wt)); + if (n) { + for (const [u, { v: l, wv: i }] of n) u.wv <= i && (u.v = l); + W = null; + } + for (const u of d(this, nt)) vt(u); + for (const u of d(this, pt)) vt(u); + R(this, nt, []), R(this, pt, []); + } + capture(e, n) { + d(this, dt).has(e) || d(this, dt).set(e, n), this.current.set(e, e.v); + } + activate() { + g = this; + } + deactivate() { + (g = null), (Qt = null); + for (const e of Ae) if ((Ae.delete(e), e(), g !== null)) break; + } + neuter() { + R(this, Pt, !0); + } + flush() { + ut.length > 0 ? se() : Q(this, L, ae).call(this), + g === this && (d(this, B) === 0 && xt.delete(this), this.deactivate()); + } + increment() { + R(this, B, d(this, B) + 1); + } + decrement() { + if ((R(this, B, d(this, B) - 1), d(this, B) === 0)) { + for (const e of d(this, Mt)) x(e, D), gt(e); + for (const e of d(this, Lt)) x(e, Z), gt(e); + R(this, rt, []), R(this, V, []), this.flush(); + } else this.deactivate(); + } + add_callback(e) { + d(this, ht).add(e); + } + settled() { + return (d(this, Dt) ?? R(this, Dt, kn())).promise; + } + static ensure() { + if (g === null) { + const e = (g = new Wt()); + xt.add(g), + jt || + Wt.enqueue(() => { + g === e && e.flush(); + }); + } + return g; + } + static enqueue(e) { + Bt.length === 0 && queueMicrotask(Xe), Bt.unshift(e); + } +}; +(dt = new WeakMap()), + (ht = new WeakMap()), + (B = new WeakMap()), + (Dt = new WeakMap()), + (Pt = new WeakMap()), + (nt = new WeakMap()), + (pt = new WeakMap()), + (rt = new WeakMap()), + (V = new WeakMap()), + (wt = new WeakMap()), + (Mt = new WeakMap()), + (Lt = new WeakMap()), + (L = new WeakSet()), + (Ze = function (e) { + var o; + e.f ^= m; + for (var n = e.first; n !== null; ) { + var r = n.f, + a = (r & (Y | ft)) !== 0, + s = a && (r & m) !== 0, + u = s || (r & K) !== 0 || this.skipped_effects.has(n); + if (!u && n.fn !== null) { + if (a) n.f ^= m; + else if ((r & le) !== 0) d(this, V).push(n); + else if ((r & m) === 0) + if ((r & ce) !== 0) { + var l = (o = n.b) != null && o.pending ? d(this, pt) : d(this, nt); + l.push(n); + } else Zt(n) && ((n.f & mt) !== 0 && d(this, wt).push(n), vt(n)); + var i = n.first; + if (i !== null) { + n = i; + continue; + } + } + var f = n.parent; + for (n = n.next; n === null && f !== null; ) (n = f.next), (f = f.parent); + } + }), + (Yt = function (e) { + for (const n of e) + ((n.f & D) !== 0 ? d(this, Mt) : d(this, Lt)).push(n), x(n, m); + e.length = 0; + }), + (ae = function () { + if (!d(this, Pt)) for (const e of d(this, ht)) e(); + d(this, ht).clear(); + }); +let bt = Wt; +function er(t) { + var e = jt; + jt = !0; + try { + var n; + for (t && (se(), (n = t())); ; ) { + if ((Kn(), ut.length === 0 && (g == null || g.flush(), ut.length === 0))) + return (zt = null), n; + se(); + } + } finally { + jt = e; + } +} +function se() { + var t = _t; + re = !0; + try { + var e = 0; + for (Ne(!0); ut.length > 0; ) { + var n = bt.ensure(); + if (e++ > 1e3) { + var r, a; + nr(); + } + n.process(ut), G.clear(); + } + } finally { + (re = !1), Ne(t), (zt = null); + } +} +function nr() { + try { + Dn(); + } catch (t) { + we(t, zt); + } +} +let et = null; +function ke(t) { + var e = t.length; + if (e !== 0) { + for (var n = 0; n < e; ) { + var r = t[n++]; + if ( + (r.f & (Tt | K)) === 0 && + Zt(r) && + ((et = []), + vt(r), + r.deps === null && + r.first === null && + r.nodes_start === null && + (r.teardown === null && r.ac === null ? ln(r) : (r.fn = null)), + et.length > 0) + ) { + G.clear(); + for (const a of et) vt(a); + et = []; + } + } + et = null; + } +} +function gt(t) { + for (var e = (zt = t); e.parent !== null; ) { + e = e.parent; + var n = e.f; + if (re && e === v && (n & mt) !== 0) return; + if ((n & (ft | Y)) !== 0) { + if ((n & m) === 0) return; + e.f ^= m; + } + } + ut.push(e); +} +const G = new Map(); +function ge(t, e) { + var n = { f: 0, v: t, reactions: null, equals: He, rv: 0, wv: 0 }; + return n; +} +function U(t, e) { + const n = ge(t); + return cn(n), n; +} +function _a(t, e = !1, n = !0) { + var a; + const r = ge(t); + return ( + e || (r.equals = Ue), + Gt && + n && + b !== null && + b.l !== null && + ((a = b.l).s ?? (a.s = [])).push(r), + r + ); +} +function tt(t, e, n = !1) { + _ !== null && + (!M || (_.f & Te) !== 0) && + Ft() && + (_.f & (N | mt | ce | Te)) !== 0 && + !(A != null && A.includes(t)) && + Ln(); + let r = n ? St(e) : e; + return ie(t, r); +} +function ie(t, e) { + if (!t.equals(e)) { + var n = t.v; + At ? G.set(t, e) : G.set(t, n), (t.v = e); + var r = bt.ensure(); + r.capture(t, n), + (t.f & N) !== 0 && + ((t.f & D) !== 0 && be(t), x(t, (t.f & C) === 0 ? m : Z)), + (t.wv = vn()), + Je(t, D), + Ft() && + v !== null && + (v.f & m) !== 0 && + (v.f & (Y | ft)) === 0 && + (O === null ? _r([t]) : O.push(t)); + } + return e; +} +function te(t) { + tt(t, t.v + 1); +} +function Je(t, e) { + var n = t.reactions; + if (n !== null) + for (var r = Ft(), a = n.length, s = 0; s < a; s++) { + var u = n[s], + l = u.f; + if (!(!r && u === v)) { + var i = (l & D) === 0; + i && x(u, e), + (l & N) !== 0 + ? Je(u, Z) + : i && ((l & mt) !== 0 && et !== null && et.push(u), gt(u)); + } + } +} +function St(t) { + if (typeof t != "object" || t === null || st in t) return t; + const e = Me(t); + if (e !== Tn && e !== An) return t; + var n = new Map(), + r = Pe(t), + a = U(0), + s = it, + u = (l) => { + if (it === s) return l(); + var i = _, + f = it; + F(null), Oe(s); + var o = l(); + return F(i), Oe(f), o; + }; + return ( + r && n.set("length", U(t.length)), + new Proxy(t, { + defineProperty(l, i, f) { + (!("value" in f) || + f.configurable === !1 || + f.enumerable === !1 || + f.writable === !1) && + Pn(); + var o = n.get(i); + return ( + o === void 0 + ? (o = u(() => { + var c = U(f.value); + return n.set(i, c), c; + })) + : tt(o, f.value, !0), + !0 + ); + }, + deleteProperty(l, i) { + var f = n.get(i); + if (f === void 0) { + if (i in l) { + const o = u(() => U(E)); + n.set(i, o), te(a); + } + } else tt(f, E), te(a); + return !0; + }, + get(l, i, f) { + var h; + if (i === st) return t; + var o = n.get(i), + c = i in l; + if ( + (o === void 0 && + (!c || ((h = Nt(l, i)) != null && h.writable)) && + ((o = u(() => { + var p = St(c ? l[i] : E), + P = U(p); + return P; + })), + n.set(i, o)), + o !== void 0) + ) { + var w = It(o); + return w === E ? void 0 : w; + } + return Reflect.get(l, i, f); + }, + getOwnPropertyDescriptor(l, i) { + var f = Reflect.getOwnPropertyDescriptor(l, i); + if (f && "value" in f) { + var o = n.get(i); + o && (f.value = It(o)); + } else if (f === void 0) { + var c = n.get(i), + w = c == null ? void 0 : c.v; + if (c !== void 0 && w !== E) + return { enumerable: !0, configurable: !0, value: w, writable: !0 }; + } + return f; + }, + has(l, i) { + var w; + if (i === st) return !0; + var f = n.get(i), + o = (f !== void 0 && f.v !== E) || Reflect.has(l, i); + if ( + f !== void 0 || + (v !== null && (!o || ((w = Nt(l, i)) != null && w.writable))) + ) { + f === void 0 && + ((f = u(() => { + var h = o ? St(l[i]) : E, + p = U(h); + return p; + })), + n.set(i, f)); + var c = It(f); + if (c === E) return !1; + } + return o; + }, + set(l, i, f, o) { + var J; + var c = n.get(i), + w = i in l; + if (r && i === "length") + for (var h = f; h < c.v; h += 1) { + var p = n.get(h + ""); + p !== void 0 + ? tt(p, E) + : h in l && ((p = u(() => U(E))), n.set(h + "", p)); + } + if (c === void 0) + (!w || ((J = Nt(l, i)) != null && J.writable)) && + ((c = u(() => U(void 0))), tt(c, St(f)), n.set(i, c)); + else { + w = c.v !== E; + var P = u(() => St(f)); + tt(c, P); + } + var H = Reflect.getOwnPropertyDescriptor(l, i); + if ((H != null && H.set && H.set.call(o, f), !w)) { + if (r && typeof i == "string") { + var qt = n.get("length"), + ct = Number(i); + Number.isInteger(ct) && ct >= qt.v && tt(qt, ct + 1); + } + te(a); + } + return !0; + }, + ownKeys(l) { + It(a); + var i = Reflect.ownKeys(l).filter((c) => { + var w = n.get(c); + return w === void 0 || w.v !== E; + }); + for (var [f, o] of n) o.v !== E && !(f in l) && i.push(f); + return i; + }, + setPrototypeOf() { + Mn(); + }, + }) + ); +} +function xe(t) { + try { + if (t !== null && typeof t == "object" && st in t) return t[st]; + } catch {} + return t; +} +function va(t, e) { + return Object.is(xe(t), xe(e)); +} +var Se, rr, Qe, tn, en; +function da() { + if (Se === void 0) { + (Se = window), (rr = document), (Qe = /Firefox/.test(navigator.userAgent)); + var t = Element.prototype, + e = Node.prototype, + n = Text.prototype; + (tn = Nt(e, "firstChild").get), + (en = Nt(e, "nextSibling").get), + me(t) && + ((t.__click = void 0), + (t.__className = void 0), + (t.__attributes = null), + (t.__style = void 0), + (t.__e = void 0)), + me(n) && (n.__t = void 0); + } +} +function Et(t = "") { + return document.createTextNode(t); +} +function z(t) { + return tn.call(t); +} +function ot(t) { + return en.call(t); +} +function ha(t, e) { + if (!S) return z(t); + var n = z(y); + if (n === null) n = y.appendChild(Et()); + else if (e && n.nodeType !== ve) { + var r = Et(); + return n == null || n.before(r), yt(r), r; + } + return yt(n), n; +} +function pa(t, e) { + if (!S) { + var n = z(t); + return n instanceof Comment && n.data === "" ? ot(n) : n; + } + return y; +} +function wa(t, e = 1, n = !1) { + let r = S ? y : t; + for (var a; e--; ) (a = r), (r = ot(r)); + if (!S) return r; + if (n && (r == null ? void 0 : r.nodeType) !== ve) { + var s = Et(); + return r === null ? a == null || a.after(s) : r.before(s), yt(s), s; + } + return yt(r), r; +} +function ar(t) { + t.textContent = ""; +} +function ya() { + return !1; +} +function ba(t, e) { + if (e) { + const n = document.body; + (t.autofocus = !0), + $e(() => { + document.activeElement === n && t.focus(); + }); + } +} +function ga(t) { + S && z(t) !== null && ar(t); +} +let Ie = !1; +function sr() { + Ie || + ((Ie = !0), + document.addEventListener( + "reset", + (t) => { + Promise.resolve().then(() => { + var e; + if (!t.defaultPrevented) + for (const n of t.target.elements) + (e = n.__on_r) == null || e.call(n); + }); + }, + { capture: !0 } + )); +} +function Ea(t, e, n, r = !0) { + r && n(); + for (var a of e) t.addEventListener(a, n); + rn(() => { + for (var s of e) t.removeEventListener(s, n); + }); +} +function Xt(t) { + var e = _, + n = v; + F(null), X(null); + try { + return t(); + } finally { + F(e), X(n); + } +} +function ma(t, e, n, r = n) { + t.addEventListener(e, () => Xt(n)); + const a = t.__on_r; + a + ? (t.__on_r = () => { + a(), r(!0); + }) + : (t.__on_r = () => r(!0)), + sr(); +} +function nn(t) { + v === null && _ === null && Cn(), + _ !== null && (_.f & C) !== 0 && v === null && On(), + At && Rn(); +} +function ir(t, e) { + var n = e.last; + n === null + ? (e.last = e.first = t) + : ((n.next = t), (t.prev = n), (e.last = t)); +} +function q(t, e, n, r = !0) { + var a = v; + a !== null && (a.f & K) !== 0 && (t |= K); + var s = { + ctx: b, + deps: null, + nodes_start: null, + nodes_end: null, + f: t | D, + first: null, + fn: e, + last: null, + next: null, + parent: a, + b: a && a.b, + prev: null, + teardown: null, + transitions: null, + wv: 0, + ac: null, + }; + if (n) + try { + vt(s), (s.f |= fe); + } catch (i) { + throw (lt(s), i); + } + else e !== null && gt(s); + var u = + n && + s.deps === null && + s.first === null && + s.nodes_start === null && + s.teardown === null && + (s.f & oe) === 0; + if ( + !u && + r && + (a !== null && ir(s, a), _ !== null && (_.f & N) !== 0 && (t & ft) === 0) + ) { + var l = _; + (l.effects ?? (l.effects = [])).push(s); + } + return s; +} +function Ta() { + return _ !== null && !M; +} +function rn(t) { + const e = q($t, null, !1); + return x(e, m), (e.teardown = t), e; +} +function Aa(t) { + nn(); + var e = v.f, + n = !_ && (e & Y) !== 0 && (e & fe) === 0; + if (n) { + var r = b; + (r.e ?? (r.e = [])).push(t); + } else return an(t); +} +function an(t) { + return q(le | je, t, !1); +} +function ka(t) { + return nn(), q($t | je, t, !0); +} +function xa(t) { + bt.ensure(); + const e = q(ft, t, !0); + return (n = {}) => + new Promise((r) => { + n.outro + ? or(e, () => { + lt(e), r(void 0); + }) + : (lt(e), r(void 0)); + }); +} +function Sa(t) { + return q(le, t, !1); +} +function ur(t) { + return q(ce | oe, t, !0); +} +function Ia(t, e = 0) { + return q($t | e, t, !0); +} +function Na(t, e = [], n = []) { + Qn(e, n, (r) => { + q($t, () => t(...r.map(It)), !0); + }); +} +function Ra(t, e = 0) { + var n = q(mt | e, t, !0); + return n; +} +function Oa(t, e = !0) { + return q(Y, t, !0, e); +} +function sn(t) { + var e = t.teardown; + if (e !== null) { + const n = At, + r = _; + Re(!0), F(null); + try { + e.call(null); + } finally { + Re(n), F(r); + } + } +} +function un(t, e = !1) { + var n = t.first; + for (t.first = t.last = null; n !== null; ) { + const a = n.ac; + a !== null && + Xt(() => { + a.abort(_e); + }); + var r = n.next; + (n.f & ft) !== 0 ? (n.parent = null) : lt(n, e), (n = r); + } +} +function lr(t) { + for (var e = t.first; e !== null; ) { + var n = e.next; + (e.f & Y) === 0 && lt(e), (e = n); + } +} +function lt(t, e = !0) { + var n = !1; + (e || (t.f & xn) !== 0) && + t.nodes_start !== null && + t.nodes_end !== null && + (fr(t.nodes_start, t.nodes_end), (n = !0)), + un(t, e && !n), + Vt(t, 0), + x(t, Tt); + var r = t.transitions; + if (r !== null) for (const s of r) s.stop(); + sn(t); + var a = t.parent; + a !== null && a.first !== null && ln(t), + (t.next = + t.prev = + t.teardown = + t.ctx = + t.deps = + t.fn = + t.nodes_start = + t.nodes_end = + t.ac = + null); +} +function fr(t, e) { + for (; t !== null; ) { + var n = t === e ? null : ot(t); + t.remove(), (t = n); + } +} +function ln(t) { + var e = t.parent, + n = t.prev, + r = t.next; + n !== null && (n.next = r), + r !== null && (r.prev = n), + e !== null && + (e.first === t && (e.first = r), e.last === t && (e.last = n)); +} +function or(t, e) { + var n = []; + fn(t, n, !0), + cr(n, () => { + lt(t), e && e(); + }); +} +function cr(t, e) { + var n = t.length; + if (n > 0) { + var r = () => --n || e(); + for (var a of t) a.out(r); + } else e(); +} +function fn(t, e, n) { + if ((t.f & K) === 0) { + if (((t.f ^= K), t.transitions !== null)) + for (const u of t.transitions) (u.is_global || n) && e.push(u); + for (var r = t.first; r !== null; ) { + var a = r.next, + s = (r.f & qe) !== 0 || (r.f & Y) !== 0; + fn(r, e, s ? n : !1), (r = a); + } + } +} +function Ca(t) { + on(t, !0); +} +function on(t, e) { + if ((t.f & K) !== 0) { + (t.f ^= K), (t.f & m) === 0 && (x(t, D), gt(t)); + for (var n = t.first; n !== null; ) { + var r = n.next, + a = (n.f & qe) !== 0 || (n.f & Y) !== 0; + on(n, a ? e : !1), (n = r); + } + if (t.transitions !== null) + for (const s of t.transitions) (s.is_global || e) && s.in(); + } +} +let _t = !1; +function Ne(t) { + _t = t; +} +let At = !1; +function Re(t) { + At = t; +} +let _ = null, + M = !1; +function F(t) { + _ = t; +} +let v = null; +function X(t) { + v = t; +} +let A = null; +function cn(t) { + _ !== null && (A === null ? (A = [t]) : A.push(t)); +} +let T = null, + I = 0, + O = null; +function _r(t) { + O = t; +} +let _n = 1, + Ct = 0, + it = Ct; +function Oe(t) { + it = t; +} +let $ = !1; +function vn() { + return ++_n; +} +function Zt(t) { + var c; + var e = t.f; + if ((e & D) !== 0) return !0; + if ((e & Z) !== 0) { + var n = t.deps, + r = (e & C) !== 0; + if (n !== null) { + var a, + s, + u = (e & Ht) !== 0, + l = r && v !== null && !$, + i = n.length; + if ((u || l) && (v === null || (v.f & Tt) === 0)) { + var f = t, + o = f.parent; + for (a = 0; a < i; a++) + (s = n[a]), + (u || + !( + (c = s == null ? void 0 : s.reactions) != null && c.includes(f) + )) && + (s.reactions ?? (s.reactions = [])).push(f); + u && (f.f ^= Ht), l && o !== null && (o.f & C) === 0 && (f.f ^= C); + } + for (a = 0; a < i; a++) + if (((s = n[a]), Zt(s) && Ke(s), s.wv > t.wv)) return !0; + } + (!r || (v !== null && !$)) && x(t, m); + } + return !1; +} +function dn(t, e, n = !0) { + var r = t.reactions; + if (r !== null && !(A != null && A.includes(t))) + for (var a = 0; a < r.length; a++) { + var s = r[a]; + (s.f & N) !== 0 + ? dn(s, e, !1) + : e === s && (n ? x(s, D) : (s.f & m) !== 0 && x(s, Z), gt(s)); + } +} +function hn(t) { + var P; + var e = T, + n = I, + r = O, + a = _, + s = $, + u = A, + l = b, + i = M, + f = it, + o = t.f; + (T = null), + (I = 0), + (O = null), + ($ = (o & C) !== 0 && (M || !_t || _ === null)), + (_ = (o & (Y | ft)) === 0 ? t : null), + (A = null), + Ut(t.ctx), + (M = !1), + (it = ++Ct), + t.ac !== null && + (Xt(() => { + t.ac.abort(_e); + }), + (t.ac = null)); + try { + t.f |= ne; + var c = t.fn, + w = c(), + h = t.deps; + if (T !== null) { + var p; + if ((Vt(t, I), h !== null && I > 0)) + for (h.length = I + T.length, p = 0; p < T.length; p++) h[I + p] = T[p]; + else t.deps = h = T; + if (!$ || ((o & N) !== 0 && t.reactions !== null)) + for (p = I; p < h.length; p++) + ((P = h[p]).reactions ?? (P.reactions = [])).push(t); + } else h !== null && I < h.length && (Vt(t, I), (h.length = I)); + if (Ft() && O !== null && !M && h !== null && (t.f & (N | Z | D)) === 0) + for (p = 0; p < O.length; p++) dn(O[p], t); + return ( + a !== null && + a !== t && + (Ct++, O !== null && (r === null ? (r = O) : r.push(...O))), + (t.f & at) !== 0 && (t.f ^= at), + w + ); + } catch (H) { + return $n(H); + } finally { + (t.f ^= ne), + (T = e), + (I = n), + (O = r), + (_ = a), + ($ = s), + (A = u), + Ut(l), + (M = i), + (it = f); + } +} +function vr(t, e) { + let n = e.reactions; + if (n !== null) { + var r = En.call(n, t); + if (r !== -1) { + var a = n.length - 1; + a === 0 ? (n = e.reactions = null) : ((n[r] = n[a]), n.pop()); + } + } + n === null && + (e.f & N) !== 0 && + (T === null || !T.includes(e)) && + (x(e, Z), (e.f & (C | Ht)) === 0 && (e.f ^= Ht), Ge(e), Vt(e, 0)); +} +function Vt(t, e) { + var n = t.deps; + if (n !== null) for (var r = e; r < n.length; r++) vr(t, n[r]); +} +function vt(t) { + var e = t.f; + if ((e & Tt) === 0) { + x(t, m); + var n = v, + r = _t; + (v = t), (_t = !0); + try { + (e & mt) !== 0 ? lr(t) : un(t), sn(t); + var a = hn(t); + (t.teardown = typeof a == "function" ? a : null), (t.wv = _n); + var s; + De && Bn && (t.f & D) !== 0 && t.deps; + } finally { + (_t = r), (v = n); + } + } +} +async function Da() { + await Promise.resolve(), er(); +} +function Pa() { + return bt.ensure().settled(); +} +function It(t) { + var e = t.f, + n = (e & N) !== 0; + if (_ !== null && !M) { + var r = v !== null && (v.f & Tt) !== 0; + if (!r && !(A != null && A.includes(t))) { + var a = _.deps; + if ((_.f & ne) !== 0) + t.rv < Ct && + ((t.rv = Ct), + T === null && a !== null && a[I] === t + ? I++ + : T === null + ? (T = [t]) + : (!$ || !T.includes(t)) && T.push(t)); + else { + (_.deps ?? (_.deps = [])).push(t); + var s = t.reactions; + s === null ? (t.reactions = [_]) : s.includes(_) || s.push(_); + } + } + } else if (n && t.deps === null && t.effects === null) { + var u = t, + l = u.parent; + l !== null && (l.f & C) === 0 && (u.f ^= C); + } + if (At) { + if (G.has(t)) return G.get(t); + if (n) { + u = t; + var i = u.v; + return ( + (((u.f & m) === 0 && u.reactions !== null) || pn(u)) && (i = be(u)), + G.set(u, i), + i + ); + } + } else if (n) { + if (((u = t), W != null && W.has(u))) return W.get(u); + Zt(u) && Ke(u); + } + if ((t.f & at) !== 0) throw t.v; + return t.v; +} +function pn(t) { + if (t.v === E) return !0; + if (t.deps === null) return !1; + for (const e of t.deps) if (G.has(e) || ((e.f & N) !== 0 && pn(e))) return !0; + return !1; +} +function Ma(t) { + var e = M; + try { + return (M = !0), t(); + } finally { + M = e; + } +} +const dr = -7169; +function x(t, e) { + t.f = (t.f & dr) | e; +} +function La(t) { + if (!(typeof t != "object" || !t || t instanceof EventTarget)) { + if (st in t) ue(t); + else if (!Array.isArray(t)) + for (let e in t) { + const n = t[e]; + typeof n == "object" && n && st in n && ue(n); + } + } +} +function ue(t, e = new Set()) { + if ( + typeof t == "object" && + t !== null && + !(t instanceof EventTarget) && + !e.has(t) + ) { + e.add(t), t instanceof Date && t.getTime(); + for (let r in t) + try { + ue(t[r], e); + } catch {} + const n = Me(t); + if ( + n !== Object.prototype && + n !== Array.prototype && + n !== Map.prototype && + n !== Set.prototype && + n !== Date.prototype + ) { + const r = mn(n); + for (let a in r) { + const s = r[a].get; + if (s) + try { + s.call(t); + } catch {} + } + } + } +} +function Fa(t) { + return ( + t.endsWith("capture") && + t !== "gotpointercapture" && + t !== "lostpointercapture" + ); +} +const hr = [ + "beforeinput", + "click", + "change", + "dblclick", + "contextmenu", + "focusin", + "focusout", + "input", + "keydown", + "keyup", + "mousedown", + "mousemove", + "mouseout", + "mouseover", + "mouseup", + "pointerdown", + "pointermove", + "pointerout", + "pointerover", + "pointerup", + "touchend", + "touchmove", + "touchstart", +]; +function qa(t) { + return hr.includes(t); +} +const pr = { + formnovalidate: "formNoValidate", + ismap: "isMap", + nomodule: "noModule", + playsinline: "playsInline", + readonly: "readOnly", + defaultvalue: "defaultValue", + defaultchecked: "defaultChecked", + srcobject: "srcObject", + novalidate: "noValidate", + allowfullscreen: "allowFullscreen", + disablepictureinpicture: "disablePictureInPicture", + disableremoteplayback: "disableRemotePlayback", +}; +function ja(t) { + return (t = t.toLowerCase()), pr[t] ?? t; +} +const wr = ["touchstart", "touchmove"]; +function Ya(t) { + return wr.includes(t); +} +const yr = new Set(), + br = new Set(); +function wn(t, e, n, r = {}) { + function a(s) { + if ((r.capture || gr.call(e, s), !s.cancelBubble)) + return Xt(() => (n == null ? void 0 : n.call(this, s))); + } + return ( + t.startsWith("pointer") || t.startsWith("touch") || t === "wheel" + ? $e(() => { + e.addEventListener(t, a, r); + }) + : e.addEventListener(t, a, r), + a + ); +} +function Ha(t, e, n, r = {}) { + var a = wn(e, t, n, r); + return () => { + t.removeEventListener(e, a, r); + }; +} +function Ua(t, e, n, r, a) { + var s = { capture: r, passive: a }, + u = wn(t, e, n, s); + (e === document.body || + e === window || + e === document || + e instanceof HTMLMediaElement) && + rn(() => { + e.removeEventListener(t, u, s); + }); +} +function Ba(t) { + for (var e = 0; e < t.length; e++) yr.add(t[e]); + for (var n of br) n(t); +} +let Ce = null; +function gr(t) { + var ct; + var e = this, + n = e.ownerDocument, + r = t.type, + a = ((ct = t.composedPath) == null ? void 0 : ct.call(t)) || [], + s = a[0] || t.target; + Ce = t; + var u = 0, + l = Ce === t && t.__root; + if (l) { + var i = a.indexOf(l); + if (i !== -1 && (e === document || e === window)) { + t.__root = e; + return; + } + var f = a.indexOf(e); + if (f === -1) return; + i <= f && (u = i); + } + if (((s = a[u] || t.target), s !== e)) { + ee(t, "currentTarget", { + configurable: !0, + get() { + return s || n; + }, + }); + var o = _, + c = v; + F(null), X(null); + try { + for (var w, h = []; s !== null; ) { + var p = s.assignedSlot || s.parentNode || s.host || null; + try { + var P = s["__" + r]; + if (P != null && (!s.disabled || t.target === s)) + if (Pe(P)) { + var [H, ...qt] = P; + H.apply(s, [t, ...qt]); + } else P.call(s, t); + } catch (J) { + w ? h.push(J) : (w = J); + } + if (t.cancelBubble || p === e || p === null) break; + s = p; + } + if (w) { + for (let J of h) + queueMicrotask(() => { + throw J; + }); + throw w; + } + } finally { + (t.__root = e), delete t.currentTarget, F(o), X(c); + } + } +} +function yn(t) { + var e = document.createElement("template"); + return (e.innerHTML = t.replaceAll("", "")), e.content; +} +function j(t, e) { + var n = v; + n.nodes_start === null && ((n.nodes_start = t), (n.nodes_end = e)); +} +function Va(t, e) { + var n = (e & Fn) !== 0, + r = (e & qn) !== 0, + a, + s = !t.startsWith(""); + return () => { + if (S) return j(y, null), y; + a === void 0 && ((a = yn(s ? t : "" + t)), n || (a = z(a))); + var u = r || Qe ? document.importNode(a, !0) : a.cloneNode(!0); + if (n) { + var l = z(u), + i = u.lastChild; + j(l, i); + } else j(u, u); + return u; + }; +} +function Er(t, e, n = "svg") { + var r = !t.startsWith(""), + a = `<${n}>${r ? t : "" + t}`, + s; + return () => { + if (S) return j(y, null), y; + if (!s) { + var u = yn(a), + l = z(u); + s = z(l); + } + var i = s.cloneNode(!0); + return j(i, i), i; + }; +} +function Wa(t, e) { + return Er(t, e, "svg"); +} +function $a(t = "") { + if (!S) { + var e = Et(t + ""); + return j(e, e), e; + } + var n = y; + return n.nodeType !== ve && (n.before((n = Et())), yt(n)), j(n, n), n; +} +function Ga() { + if (S) return j(y, null), y; + var t = document.createDocumentFragment(), + e = document.createComment(""), + n = Et(); + return t.append(e, n), j(e, n), t; +} +function Ka(t, e) { + if (S) { + (v.nodes_end = y), Ye(); + return; + } + t !== null && t.before(e); +} +function za() { + var t, e; + if ( + S && + y && + y.nodeType === de && + (t = y.textContent) != null && + t.startsWith("#") + ) { + const n = y.textContent.substring(1); + return Ye(), n; + } + return ( + (e = window.__svelte ?? (window.__svelte = {})).uid ?? (e.uid = 1), + `c${window.__svelte.uid++}` + ); +} +export { + rr as $, + xr as A, + Le as B, + La as C, + ye as D, + qe as E, + Ft as F, + ma as G, + Ia as H, + Qt as I, + va as J, + rn as K, + $e as L, + Fr as M, + yt as N, + z as O, + Zn as P, + ea as Q, + Yn as R, + ta as S, + Zr as T, + de as U, + Hn as V, + Mr as W, + Lr as X, + ie as Y, + _a as Z, + ge as _, + pa as a, + fe as a$, + Tr as a0, + Pe as a1, + Ca as a2, + jr as a3, + K as a4, + lt as a5, + qr as a6, + ot as a7, + fn as a8, + ar as a9, + In as aA, + _ as aB, + Or as aC, + Dr as aD, + Gt as aE, + er as aF, + ua as aG, + aa as aH, + ia as aI, + sa as aJ, + Pa as aK, + Da as aL, + E as aM, + Nt as aN, + Pr as aO, + Ur as aP, + At as aQ, + Tt as aR, + Br as aS, + Hr as aT, + Yr as aU, + Vr as aV, + Ir as aW, + Ar as aX, + na as aY, + Un as aZ, + mt as a_, + cr as aa, + v as ab, + Sa as ac, + st as ad, + fr as ae, + pe as af, + he as ag, + j as ah, + yn as ai, + da as aj, + jn as ak, + Cr as al, + yr as am, + br as an, + xa as ao, + gr as ap, + Ya as aq, + ra as ar, + xn as as, + Ba as at, + U as au, + St as av, + tt as aw, + Ua as ax, + Ga as ay, + kr as az, + Ka as b, + Gr as b0, + Wr as b1, + $r as b2, + Xt as b3, + $a as b4, + Xr as b5, + Qn as b6, + Kr as b7, + Me as b8, + Nr as b9, + zr as ba, + mn as bb, + Fa as bc, + wn as bd, + ba as be, + ja as bf, + oa as bg, + sr as bh, + qa as bi, + ga as bj, + Ta as bk, + te as bl, + Se as bm, + Ha as bn, + ee as bo, + Tn as bp, + Ea as bq, + De as br, + za as bs, + Sr as bt, + fa as c, + ha as d, + Ye as e, + Va as f, + It as g, + S as h, + Ra as i, + Et as j, + Oa as k, + g as l, + ya as m, + Qr as n, + y as o, + la as p, + or as q, + Jr as r, + wa as s, + Na as t, + ca as u, + Wa as v, + b as w, + ka as x, + Aa as y, + Ma as z, +}; diff --git a/frontend-backup/_app/immutable/chunks/CQklNc9N.js b/frontend-backup/_app/immutable/chunks/CQklNc9N.js deleted file mode 100644 index 9c63109..0000000 --- a/frontend-backup/_app/immutable/chunks/CQklNc9N.js +++ /dev/null @@ -1,289 +0,0 @@ -import "./Bzak7iHL.js"; -import { - D as ce, - x as se, - F as oe, - B as ve, - ba as de, - p as W, - aH as H, - aR as P, - aS as ue, - a as X, - A as o, - b as w, - c as Z, - f as D, - t as S, - aT as p, - q as $, - d as v, - r as d, - s as m -} from "./DUoKDNpf.js"; -import { - s as x -} from "./g8c1BvYP.js"; -import { - p as u, - i as A, - r as ee -} from "./5NasrULQ.js"; -import { - s as G, - c as R, - a as te, - b as J -} from "./B1GmkH4o.js"; -import { - b as fe -} from "./CMs8vKjq.js"; -import { - g as j, - P as me, - c as _e -} from "./1lh-LSvX.js"; -import { - o as he -} from "./ByKBPM-D.js"; -import { - g as z -} from "./C5GsJ62f.js"; -import { - L as ge -} from "./07L1R_bo.js"; - -function be(r, e, a) { - ce(() => { - var l = se(() => e(r, a == null ? void 0 : a()) || {}); - if (a && (l != null && l.update)) { - var s = !1, - _ = {}; - oe(() => { - var f = a(); - ve(f), s && de(_, f) && (_ = f, l.update(f)) - }), s = !0 - } - if (l != null && l.destroy) return () => l.destroy() - }) -} -const xe = r => `Login with ${r.name}`, - we = r => `Entrar com ${r.name}`, - Q = (r, e = {}) => (e.locale ?? z()) === "en" ? xe(r) : we(r), - ye = () => "By continuing, you agree to our", - ke = () => "注册即代表同意我们的", - Le = (r = {}, e = {}) => (e.locale ?? z()) === "en" ? ye() : ke(), - Ce = () => "Terms of Service", - Ie = () => "服务条款", - Te = (r = {}, e = {}) => (e.locale ?? z()) === "en" ? Ce() : Ie(), - ze = () => "and", - Be = () => "和", - Ee = (r = {}, e = {}) => (e.locale ?? z()) === "en" ? ze() : Be(), - Me = () => "Privacy Policy", - Fe = () => "隐私政策", - Pe = (r = {}, e = {}) => (e.locale ?? z()) === "en" ? Me() : Fe(); -var Se = D("
        "); - -function He(r, e) { - W(e, !0); - let a = u(e, "widgetId", 15), - l = u(e, "appearance", 3, "always"), - s = u(e, "language", 3, "auto"), - _ = u(e, "execution", 3, "render"), - f = u(e, "retryInterval", 3, 8e3), - C = u(e, "retry", 3, "auto"), - K = u(e, "refreshExpired", 3, "auto"), - y = u(e, "theme", 3, "auto"), - I = u(e, "size", 3, "normal"), - N = u(e, "tabIndex", 3, 0); - u(e, "reset", 15)(() => { - var t; - a() && ((t = window == null ? void 0 : window.turnstile) == null || t.reset(a())) - }); - const B = p(() => ({ - sitekey: e.siteKey, - callback: (t, n) => { - var i; - (i = e.callback) == null || i.call(e, t, n) - }, - "error-callback": t => { - var n; - (n = e.errorCallback) == null || n.call(e, t) - }, - "timeout-callback": () => { - var t; - (t = e.timeoutCallback) == null || t.call(e) - }, - "expired-callback": () => { - var t; - (t = e.expiredCallback) == null || t.call(e) - }, - "before-interactive-callback": () => { - var t; - (t = e.beforeInteractiveCallback) == null || t.call(e) - }, - "after-interactive-callback": () => { - var t; - (t = e.afterInteractiveCallback) == null || t.call(e) - }, - "unsupported-callback": () => { - var t; - return (t = e.unsupportedCallback) == null ? void 0 : t.call(e) - }, - "response-field-name": e.responseFieldName ?? e.formsField ?? "cf-turnstile-response", - "response-field": e.responseField ?? e.forms ?? !0, - "refresh-expired": K(), - "retry-interval": f(), - tabindex: N(), - appearance: l(), - execution: _(), - language: s(), - action: e.action, - retry: C(), - theme: y(), - cData: e.cData, - size: I() - })), - k = (t, n) => { - let i = window.turnstile.render(t, n); - return a(i), { - destroy() { - window.turnstile.remove(i) - }, - update(c) { - window.turnstile.remove(i), i = window.turnstile.render(t, c), a(i) - } - } - }; - let h = P(!1); - he(() => { - return () => { - H(h, !1) - } - }); - var E = ue(), - M = X(E); - { - var F = t => { - var n = Se(); - let i; - be(n, (c, L) => k == null ? void 0 : k(c, L), () => o(B)), S(c => i = G(n, 1, R(e.class), "svelte-1gvfki5", i, c), [() => ({ - flexible: I() == "flexible" - })]), w(t, n) - }; - A(M, t => { - j.turnstatileLoaded && o(h) && t(F) - }) - } - w(r, E), Z() -} -var De = $(''); - -function Ke(r, e) { - let a = ee(e, ["$$slots", "$$events", "$$legacy"]); - var l = De(); - te(l, () => ({ - viewBox: "0 0 256 262", - xmlns: "http://www.w3.org/2000/svg", - ...a - })), w(r, l) -} -var Ne = $(''); - -function Ue(r, e) { - let a = ee(e, ["$$slots", "$$events", "$$legacy"]); - var l = Ne(); - te(l, () => ({ - xmlns: "http://www.w3.org/2000/svg", - "xml:space": "preserve", - viewBox: "0 0 2400 2800", - ...a - })), w(r, l) -} -var je = D('
        '), - Ae = D('
        ', 1), - Ge = D(''); - -function pe(r, e) { - W(e, !0); - let a = P(""), - l = P(null), - s = P(""); - - function _(n, i) { - return `${_e}/auth/${n}?token=${i}${e.redirect?`&r=${e.redirect}`:""}` - } - var f = Ge(), - C = v(f), - K = v(C); - ge(K, { - hasText: !0 - }), d(C); - var y = m(C, 2), - I = v(y), - N = v(I); - { - var V = n => { - var i = Ae(), - c = X(i), - L = v(c); - Ke(L, { - class: "mr-1 size-5" - }); - var ae = m(L); - d(c); - var T = m(c, 2), - q = v(T); - Ue(q, { - class: "mr-1 size-5" - }); - var re = m(q); - d(T); - var O = m(T, 2), - Y = v(O); - { - let g = p(() => me.trim()); - H(s, "b", true); - } - var ne = m(Y, 2); - { - var le = g => { - var b = je(), - U = v(b, !0); - d(b), S(() => x(U, o(a))), w(g, b) - }; - A(ne, g => { - o(a) && g(le) - }) - } - var btn = document.createElement("button"); - btn.className = "btn bg-base-100 w-full text-base"; - btn.textContent = "Login with your openplace account"; - - btn.addEventListener("click", () => { - window.location.href = "/login"; - }); - - w(n, btn); - - }; - A(N, n => { - n(V, !1) - }) - } - d(I), d(y), fe(y, n => H(l, n), () => o(l)); - var B = m(y, 2), - k = v(B), - h = m(k), - E = v(h, !0); - d(h); - var M = m(h), - F = m(M), - t = v(F, !0); - d(F), d(B), d(f), S((n, i, c, L) => { - x(k, `${n??""} `), x(E, i), x(M, ` ${c??""} `), x(t, L) - }, [() => Le(), () => Te(), () => Ee(), () => Pe()]), w(r, f), Z() -} -export { - pe as L, Ue as T, He as a -}; \ No newline at end of file diff --git a/frontend-backup/_app/immutable/chunks/CV9xcpLq.js b/frontend-backup/_app/immutable/chunks/CV9xcpLq.js new file mode 100644 index 0000000..1c0cf32 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/CV9xcpLq.js @@ -0,0 +1,120 @@ +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + o = new e.Error().stack; + o && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[o] = "138d49da-a363-498b-a700-aea1b9f4af0d"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-138d49da-a363-498b-a700-aea1b9f4af0d")); + })(); +} catch {} +const y = "en", + c = ["en", "pt"], + d = "PARAGLIDE_LOCALE", + g = ["localStorage", "preferredLanguage", "baseLocale"]; +globalThis.__paraglide = {}; +let f = !1, + w = () => { + let e; + for (const o of g) { + if (o === "baseLocale") e = y; + else if (o === "preferredLanguage") e = L(); + else if (o === "localStorage") e = localStorage.getItem(d) ?? void 0; + else if (u(o) && l.has(o)) { + const a = l.get(o); + if (a) { + const t = a.getLocale(); + if (t instanceof Promise) continue; + e = t; + } + } + if (e !== void 0) { + const a = h(e); + return f || ((f = !0), p(a, { reload: !1 })), a; + } + } + throw new Error( + "No locale found. Read the docs https://inlang.com/m/gerre34r/library-inlang-paraglideJs/errors#no-locale-found" + ); + }, + p = (e, o) => { + const a = { reload: !0, ...o }; + let t; + try { + t = w(); + } catch {} + for (const n of g) + if (n !== "baseLocale") { + if (n === "localStorage" && typeof window < "u") + localStorage.setItem(d, e); + else if (u(n) && l.has(n)) { + const s = l.get(n); + if (s) { + const i = s.setLocale(e); + i instanceof Promise && + i.catch((b) => { + console.warn(`Custom strategy "${n}" setLocale failed:`, b); + }); + } + } + } + a.reload && window.location && e !== t && window.location.reload(); + }; +function r(e) { + return e ? c.includes(e) : !1; +} +function h(e) { + if (r(e) === !1) + throw new Error(`Invalid locale: ${e}. Expected one of: ${c.join(", ")}`); + return e; +} +function L() { + var o; + if ( + !( + (o = navigator == null ? void 0 : navigator.languages) != null && o.length + ) + ) + return; + const e = navigator.languages.map((a) => { + var t; + return { + fullTag: a.toLowerCase(), + baseTag: (t = a.split("-")[0]) == null ? void 0 : t.toLowerCase(), + }; + }); + for (const a of e) { + if (r(a.fullTag)) return a.fullTag; + if (r(a.baseTag)) return a.baseTag; + } +} +const l = new Map(); +function u(e) { + return typeof e == "string" && /^custom-[A-Za-z0-9_-]+$/.test(e); +} +export { w as g, d as l }; diff --git a/frontend-backup/_app/immutable/chunks/CVCd3urP.js b/frontend-backup/_app/immutable/chunks/CVCd3urP.js deleted file mode 100644 index 2aead59..0000000 --- a/frontend-backup/_app/immutable/chunks/CVCd3urP.js +++ /dev/null @@ -1,24 +0,0 @@ -import "./B2cHk4HI.js"; -import { v as d, b as r } from "./BDALf20I.js"; -import { b as f } from "./BNZUboE0.js"; -import { r as s } from "./Bke_korE.js"; -(function () { - try { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - e.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - o = new e.Error().stack; - o && ((e._sentryDebugIds = e._sentryDebugIds || {}), (e._sentryDebugIds[o] = "c01216ed-65cd-4e75-9911-303dbf848453"), (e._sentryDebugIdIdentifier = "sentry-dbid-c01216ed-65cd-4e75-9911-303dbf848453")); - })(); -} catch {} -var i = d(''); -function b(e, o) { - let n = s(o, ["$$slots", "$$events", "$$legacy"]); - var t = i(); - f(t, () => ({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960", fill: "currentColor", ...n })), r(e, t); -} -export { b as A }; diff --git a/frontend-backup/_app/immutable/chunks/CVa8RI1g.js b/frontend-backup/_app/immutable/chunks/CVa8RI1g.js new file mode 100644 index 0000000..2975b74 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/CVa8RI1g.js @@ -0,0 +1,40 @@ +import { g as d } from "./CV9xcpLq.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + n = new e.Error().stack; + n && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[n] = "b0beadb0-deec-4a77-af24-7bb1740c9b03"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-b0beadb0-deec-4a77-af24-7bb1740c9b03")); + })(); +} catch {} +const o = () => "Clear", + t = () => "Limpar", + f = (e = {}, n = {}) => ((n.locale ?? d()) === "en" ? o() : t()); +export { f as c }; diff --git a/frontend-backup/_app/immutable/chunks/CXkjfmFU.js b/frontend-backup/_app/immutable/chunks/CXkjfmFU.js new file mode 100644 index 0000000..8d4af3b --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/CXkjfmFU.js @@ -0,0 +1,314 @@ +import { + j as ee, + i as se, + M as ae, + N as V, + h as N, + O as ue, + e as de, + g as J, + P as ve, + Q as oe, + R as _e, + S as K, + T as U, + o as M, + U as ce, + V as he, + k as P, + m as be, + W as O, + X as L, + l as pe, + Y as $, + Z as Ee, + _ as j, + a0 as re, + a1 as me, + a2 as ne, + q as Te, + a3 as we, + a4 as X, + L as Ie, + a5 as fe, + a6 as Ae, + a7 as ge, + a8 as ye, + a9 as De, + aa as Ne, + ab as Se, +} from "./CMvZtFtm.js"; +(function () { + try { + var f = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + f.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var f = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + r = new f.Error().stack; + r && + ((f._sentryDebugIds = f._sentryDebugIds || {}), + (f._sentryDebugIds[r] = "2b5bde17-2785-4b31-a81c-050ebb6df357"), + (f._sentryDebugIdIdentifier = + "sentry-dbid-2b5bde17-2785-4b31-a81c-050ebb6df357")); + })(); +} catch {} +let B = null; +function Re(f, r) { + return r; +} +function xe(f, r, e) { + for (var s = f.items, u = [], d = r.length, t = 0; t < d; t++) + ye(r[t].e, u, !0); + var c = d > 0 && u.length === 0 && e !== null; + if (c) { + var m = e.parentNode; + De(m), m.append(e), s.clear(), A(f, r[0].prev, r[d - 1].next); + } + Ne(u, () => { + for (var E = 0; E < d; E++) { + var o = r[E]; + c || (s.delete(o.k), A(f, o.prev, o.next)), fe(o.e, !c); + } + }); +} +function He(f, r, e, s, u, d = null) { + var t = f, + c = { flags: r, items: new Map(), first: null }, + m = (r & ae) !== 0; + if (m) { + var E = f; + t = N ? V(ue(E)) : E.appendChild(ee()); + } + N && de(); + var o = null, + y = !1, + T = new Map(), + S = ve(() => { + var v = e(); + return me(v) ? v : v == null ? [] : re(v); + }), + i, + b; + function n() { + Ce(b, i, c, T, t, u, r, s, e), + d !== null && + (i.length === 0 + ? o + ? ne(o) + : (o = P(() => d(t))) + : o !== null && + Te(o, () => { + o = null; + })); + } + se(() => { + b ?? (b = Se), (i = J(S)); + var v = i.length; + if (y && v === 0) return; + y = v === 0; + let p = !1; + if (N) { + var w = oe(t) === _e; + w !== (v === 0) && ((t = K()), V(t), U(!1), (p = !0)); + } + if (N) { + for (var g = null, _, a = 0; a < v; a++) { + if (M.nodeType === ce && M.data === he) { + (t = M), (p = !0), U(!1); + break; + } + var l = i[a], + h = s(l, a); + (_ = Q(M, c, g, null, l, h, a, u, r, e)), c.items.set(h, _), (g = _); + } + v > 0 && V(K()); + } + if (N) v === 0 && d && (o = P(() => d(t))); + else if (be()) { + var x = new Set(), + R = pe; + for (a = 0; a < v; a += 1) { + (l = i[a]), (h = s(l, a)); + var D = c.items.get(h) ?? T.get(h); + D + ? (r & (O | L)) !== 0 && ie(D, l, a, r) + : ((_ = Q(null, c, null, null, l, h, a, u, r, e, !0)), T.set(h, _)), + x.add(h); + } + for (const [I, H] of c.items) x.has(I) || R.skipped_effects.add(H.e); + R.add_callback(n); + } else n(); + p && U(!0), J(S); + }), + N && (t = M); +} +function Ce(f, r, e, s, u, d, t, c, m) { + var W, Z, k, z; + var E = (t & Ae) !== 0, + o = (t & (O | L)) !== 0, + y = r.length, + T = e.items, + S = e.first, + i = S, + b, + n = null, + v, + p = [], + w = [], + g, + _, + a, + l; + if (E) + for (l = 0; l < y; l += 1) + (g = r[l]), + (_ = c(g, l)), + (a = T.get(_)), + a !== void 0 && + ((W = a.a) == null || W.measure(), (v ?? (v = new Set())).add(a)); + for (l = 0; l < y; l += 1) { + if (((g = r[l]), (_ = c(g, l)), (a = T.get(_)), a === void 0)) { + var h = s.get(_); + if (h !== void 0) { + s.delete(_), T.set(_, h); + var x = n ? n.next : i; + A(e, n, h), A(e, h, x), F(h, x, u), (n = h); + } else { + var R = i ? i.e.nodes_start : u; + n = Q(R, e, n, n === null ? e.first : n.next, g, _, l, d, t, m); + } + T.set(_, n), (p = []), (w = []), (i = n.next); + continue; + } + if ( + (o && ie(a, g, l, t), + (a.e.f & X) !== 0 && + (ne(a.e), + E && + ((Z = a.a) == null || Z.unfix(), (v ?? (v = new Set())).delete(a))), + a !== i) + ) { + if (b !== void 0 && b.has(a)) { + if (p.length < w.length) { + var D = w[0], + I; + n = D.prev; + var H = p[0], + Y = p[p.length - 1]; + for (I = 0; I < p.length; I += 1) F(p[I], D, u); + for (I = 0; I < w.length; I += 1) b.delete(w[I]); + A(e, H.prev, Y.next), + A(e, n, H), + A(e, Y, D), + (i = D), + (n = Y), + (l -= 1), + (p = []), + (w = []); + } else + b.delete(a), + F(a, i, u), + A(e, a.prev, a.next), + A(e, a, n === null ? e.first : n.next), + A(e, n, a), + (n = a); + continue; + } + for (p = [], w = []; i !== null && i.k !== _; ) + (i.e.f & X) === 0 && (b ?? (b = new Set())).add(i), + w.push(i), + (i = i.next); + if (i === null) continue; + a = i; + } + p.push(a), (n = a), (i = a.next); + } + if (i !== null || b !== void 0) { + for (var C = b === void 0 ? [] : re(b); i !== null; ) + (i.e.f & X) === 0 && C.push(i), (i = i.next); + var q = C.length; + if (q > 0) { + var le = (t & ae) !== 0 && y === 0 ? u : null; + if (E) { + for (l = 0; l < q; l += 1) (k = C[l].a) == null || k.measure(); + for (l = 0; l < q; l += 1) (z = C[l].a) == null || z.fix(); + } + xe(e, C, le); + } + } + E && + Ie(() => { + var G; + if (v !== void 0) for (a of v) (G = a.a) == null || G.apply(); + }), + (f.first = e.first && e.first.e), + (f.last = n && n.e); + for (var te of s.values()) fe(te.e); + s.clear(); +} +function ie(f, r, e, s) { + (s & O) !== 0 && $(f.v, r), (s & L) !== 0 ? $(f.i, e) : (f.i = e); +} +function Q(f, r, e, s, u, d, t, c, m, E, o) { + var y = B, + T = (m & O) !== 0, + S = (m & we) === 0, + i = T ? (S ? Ee(u, !1, !1) : j(u)) : u, + b = (m & L) === 0 ? t : j(t), + n = { i: b, v: i, k: d, a: null, e: null, prev: e, next: s }; + B = n; + try { + if (f === null) { + var v = document.createDocumentFragment(); + v.append((f = ee())); + } + return ( + (n.e = P(() => c(f, i, b, E), N)), + (n.e.prev = e && e.e), + (n.e.next = s && s.e), + e === null ? o || (r.first = n) : ((e.next = n), (e.e.next = n.e)), + s !== null && ((s.prev = n), (s.e.prev = n.e)), + n + ); + } finally { + B = y; + } +} +function F(f, r, e) { + for ( + var s = f.next ? f.next.e.nodes_start : e, + u = r ? r.e.nodes_start : e, + d = f.e.nodes_start; + d !== null && d !== s; + + ) { + var t = ge(d); + u.before(d), (d = t); + } +} +function A(f, r, e) { + r === null ? (f.first = e) : ((r.next = e), (r.e.next = e && e.e)), + e !== null && ((e.prev = r), (e.e.prev = r && r.e)); +} +export { B as c, He as e, Re as i }; diff --git a/frontend-backup/_app/immutable/chunks/CYItkO2S.js b/frontend-backup/_app/immutable/chunks/CYItkO2S.js deleted file mode 100644 index 9a80c79..0000000 --- a/frontend-backup/_app/immutable/chunks/CYItkO2S.js +++ /dev/null @@ -1 +0,0 @@ -import"./B2cHk4HI.js";import{p as m,f as c,t as d,b as f,c as v,d as y,s as _,r as h}from"./BDALf20I.js";import{p as w,i as x,r as E}from"./Bke_korE.js";import{b as T,a as r,s as S}from"./BNZUboE0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="bfaa257f-561a-4221-9d82-ad8618895a89",e._sentryDebugIdIdentifier="sentry-dbid-bfaa257f-561a-4221-9d82-ad8618895a89")})()}catch{}const B="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAABJQTFRFAQEBAAAAHGHnRcxVStlbMXLnk8SHtQAAAAF0Uk5TAEDm2GYAAABMSURBVHjadc9JCgAhDERRa7r/lZs0ikawdv+tkvEYALS07U2QawmOTo1oQBKr8/cUMLY7JLEPYLW0oISSNLtgiojRBfv0AuB67vH3B+FjAY/0rrGiAAAAAElFTkSuQmCC";var L=c("wplace"),R=c('
        Wplace logo
        ');function z(e,a){m(a,!0);let t=w(a,"size",3,"default"),g=E(a,["$$slots","$$events","$$legacy","hasText","size"]);var l=R();T(l,()=>({...g,class:`flex items-center gap-1.5 ${a.class??""}`}));var i=y(l);let o;var p=_(i,2);{var u=s=>{var n=L();let A;d(b=>A=r(n,1,"text-base-content font-pixel",null,A,b),[()=>({"text-4xl":t()==="default","text-5xl":t()==="lg"||t()==="medium"})]),f(s,n)};x(p,s=>{a.hasText&&s(u)})}h(l),d(s=>{o=r(i,1,"pixelated",null,o,s),S(i,"src",B)},[()=>({"size-10":t()==="default","size-16":t()==="medium","size-20":t()==="lg"})]),f(e,l),v()}export{z as L}; diff --git a/frontend-backup/_app/immutable/chunks/CZW2bcQi.js b/frontend-backup/_app/immutable/chunks/CZW2bcQi.js deleted file mode 100644 index e6c4733..0000000 --- a/frontend-backup/_app/immutable/chunks/CZW2bcQi.js +++ /dev/null @@ -1,244 +0,0 @@ -import { - j as ee, - i as se, - N as ae, - O as V, - h as N, - P as ue, - e as de, - g as J, - Q as ve, - R as oe, - T as _e, - U as K, - V as U, - o as S, - W as ce, - X as he, - k as P, - m as pe, - Y as O, - Z as L, - l as Ee, - _ as $, - a0 as me, - a1 as j, - a2 as re, - a3 as Te, - a4 as ne, - q as be, - a5 as we, - a6 as X, - L as Ie, - a7 as fe, - a8 as Ae, - a9 as ge, - aa as ye, - ab as De, - ac as Ne, - ad as xe, -} from "./BDALf20I.js"; -(function () { - try { - var f = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - f.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var f = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - r = new f.Error().stack; - r && ((f._sentryDebugIds = f._sentryDebugIds || {}), (f._sentryDebugIds[r] = "ac89915e-f261-4f84-9428-f4a8e4a48872"), (f._sentryDebugIdIdentifier = "sentry-dbid-ac89915e-f261-4f84-9428-f4a8e4a48872")); - })(); -} catch {} -let B = null; -function Me(f, r) { - return r; -} -function Ce(f, r, e) { - for (var s = f.items, u = [], d = r.length, t = 0; t < d; t++) ye(r[t].e, u, !0); - var c = d > 0 && u.length === 0 && e !== null; - if (c) { - var T = e.parentNode; - De(T), T.append(e), s.clear(), A(f, r[0].prev, r[d - 1].next); - } - Ne(u, () => { - for (var m = 0; m < d; m++) { - var o = r[m]; - c || (s.delete(o.k), A(f, o.prev, o.next)), fe(o.e, !c); - } - }); -} -function He(f, r, e, s, u, d = null) { - var t = f, - c = { flags: r, items: new Map(), first: null }, - T = (r & ae) !== 0; - if (T) { - var m = f; - t = N ? V(ue(m)) : m.appendChild(ee()); - } - N && de(); - var o = null, - y = !1, - b = new Map(), - x = ve(() => { - var v = e(); - return Te(v) ? v : v == null ? [] : re(v); - }), - i, - p; - function n() { - Re(p, i, c, b, t, u, r, s, e), - d !== null && - (i.length === 0 - ? o - ? ne(o) - : (o = P(() => d(t))) - : o !== null && - be(o, () => { - o = null; - })); - } - se(() => { - p ?? (p = xe), (i = J(x)); - var v = i.length; - if (y && v === 0) return; - y = v === 0; - let E = !1; - if (N) { - var w = oe(t) === _e; - w !== (v === 0) && ((t = K()), V(t), U(!1), (E = !0)); - } - if (N) { - for (var g = null, _, a = 0; a < v; a++) { - if (S.nodeType === ce && S.data === he) { - (t = S), (E = !0), U(!1); - break; - } - var l = i[a], - h = s(l, a); - (_ = Q(S, c, g, null, l, h, a, u, r, e)), c.items.set(h, _), (g = _); - } - v > 0 && V(K()); - } - if (N) v === 0 && d && (o = P(() => d(t))); - else if (pe()) { - var C = new Set(), - M = Ee; - for (a = 0; a < v; a += 1) { - (l = i[a]), (h = s(l, a)); - var D = c.items.get(h) ?? b.get(h); - D ? (r & (O | L)) !== 0 && ie(D, l, a, r) : ((_ = Q(null, c, null, null, l, h, a, u, r, e, !0)), b.set(h, _)), C.add(h); - } - for (const [I, H] of c.items) C.has(I) || M.skipped_effects.add(H.e); - M.add_callback(n); - } else n(); - E && U(!0), J(x); - }), - N && (t = S); -} -function Re(f, r, e, s, u, d, t, c, T) { - var W, Z, k, z; - var m = (t & Ae) !== 0, - o = (t & (O | L)) !== 0, - y = r.length, - b = e.items, - x = e.first, - i = x, - p, - n = null, - v, - E = [], - w = [], - g, - _, - a, - l; - if (m) for (l = 0; l < y; l += 1) (g = r[l]), (_ = c(g, l)), (a = b.get(_)), a !== void 0 && ((W = a.a) == null || W.measure(), (v ?? (v = new Set())).add(a)); - for (l = 0; l < y; l += 1) { - if (((g = r[l]), (_ = c(g, l)), (a = b.get(_)), a === void 0)) { - var h = s.get(_); - if (h !== void 0) { - s.delete(_), b.set(_, h); - var C = n ? n.next : i; - A(e, n, h), A(e, h, C), F(h, C, u), (n = h); - } else { - var M = i ? i.e.nodes_start : u; - n = Q(M, e, n, n === null ? e.first : n.next, g, _, l, d, t, T); - } - b.set(_, n), (E = []), (w = []), (i = n.next); - continue; - } - if ((o && ie(a, g, l, t), (a.e.f & X) !== 0 && (ne(a.e), m && ((Z = a.a) == null || Z.unfix(), (v ?? (v = new Set())).delete(a))), a !== i)) { - if (p !== void 0 && p.has(a)) { - if (E.length < w.length) { - var D = w[0], - I; - n = D.prev; - var H = E[0], - Y = E[E.length - 1]; - for (I = 0; I < E.length; I += 1) F(E[I], D, u); - for (I = 0; I < w.length; I += 1) p.delete(w[I]); - A(e, H.prev, Y.next), A(e, n, H), A(e, Y, D), (i = D), (n = Y), (l -= 1), (E = []), (w = []); - } else p.delete(a), F(a, i, u), A(e, a.prev, a.next), A(e, a, n === null ? e.first : n.next), A(e, n, a), (n = a); - continue; - } - for (E = [], w = []; i !== null && i.k !== _; ) (i.e.f & X) === 0 && (p ?? (p = new Set())).add(i), w.push(i), (i = i.next); - if (i === null) continue; - a = i; - } - E.push(a), (n = a), (i = a.next); - } - if (i !== null || p !== void 0) { - for (var R = p === void 0 ? [] : re(p); i !== null; ) (i.e.f & X) === 0 && R.push(i), (i = i.next); - var q = R.length; - if (q > 0) { - var le = (t & ae) !== 0 && y === 0 ? u : null; - if (m) { - for (l = 0; l < q; l += 1) (k = R[l].a) == null || k.measure(); - for (l = 0; l < q; l += 1) (z = R[l].a) == null || z.fix(); - } - Ce(e, R, le); - } - } - m && - Ie(() => { - var G; - if (v !== void 0) for (a of v) (G = a.a) == null || G.apply(); - }), - (f.first = e.first && e.first.e), - (f.last = n && n.e); - for (var te of s.values()) fe(te.e); - s.clear(); -} -function ie(f, r, e, s) { - (s & O) !== 0 && $(f.v, r), (s & L) !== 0 ? $(f.i, e) : (f.i = e); -} -function Q(f, r, e, s, u, d, t, c, T, m, o) { - var y = B, - b = (T & O) !== 0, - x = (T & we) === 0, - i = b ? (x ? me(u, !1, !1) : j(u)) : u, - p = (T & L) === 0 ? t : j(t), - n = { i: p, v: i, k: d, a: null, e: null, prev: e, next: s }; - B = n; - try { - if (f === null) { - var v = document.createDocumentFragment(); - v.append((f = ee())); - } - return (n.e = P(() => c(f, i, p, m), N)), (n.e.prev = e && e.e), (n.e.next = s && s.e), e === null ? o || (r.first = n) : ((e.next = n), (e.e.next = n.e)), s !== null && ((s.prev = n), (s.e.prev = n.e)), n; - } finally { - B = y; - } -} -function F(f, r, e) { - for (var s = f.next ? f.next.e.nodes_start : e, u = r ? r.e.nodes_start : e, d = f.e.nodes_start; d !== null && d !== s; ) { - var t = ge(d); - u.before(d), (d = t); - } -} -function A(f, r, e) { - r === null ? (f.first = e) : ((r.next = e), (r.e.next = e && e.e)), e !== null && ((e.prev = r), (e.e.prev = r && r.e)); -} -export { B as c, He as e, Me as i }; diff --git a/frontend-backup/_app/immutable/chunks/CZlv7MYe.js b/frontend-backup/_app/immutable/chunks/CZlv7MYe.js new file mode 100644 index 0000000..f13790f --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/CZlv7MYe.js @@ -0,0 +1,40 @@ +import { g as n } from "./CV9xcpLq.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + d = new e.Error().stack; + d && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[d] = "cb9cdd54-2441-45dd-bc58-9d9fa5dd59c8"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-cb9cdd54-2441-45dd-bc58-9d9fa5dd59c8")); + })(); +} catch {} +const o = () => "Add", + t = () => "Adicionar", + i = (e = {}, d = {}) => ((d.locale ?? n()) === "en" ? o() : t()); +export { i as a }; diff --git a/frontend-backup/_app/immutable/chunks/CdTXrPIO.js b/frontend-backup/_app/immutable/chunks/CdTXrPIO.js new file mode 100644 index 0000000..d1cb692 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/CdTXrPIO.js @@ -0,0 +1,77 @@ +import { + h as l, + e as u, + i as p, + E as y, + j as _, + k as g, + l as s, + m as h, + o as m, + q as v, +} from "./CMvZtFtm.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + a = new e.Error().stack; + a && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[a] = "9dc3bcaa-438f-488e-b391-6b55ffb9a6c0"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-9dc3bcaa-438f-488e-b391-6b55ffb9a6c0")); + })(); +} catch {} +function E(e, a, b) { + l && u(); + var t = e, + d, + n, + f = null, + o = null; + function c() { + n && (v(n), (n = null)), + f && (f.lastChild.remove(), t.before(f), (f = null)), + (n = o), + (o = null); + } + p(() => { + if (d !== (d = a())) { + var i = h(); + if (d) { + var r = t; + i && + ((f = document.createDocumentFragment()), + f.append((r = _())), + n && s.skipped_effects.add(n)), + (o = g(() => b(r, d))); + } + i ? s.add_callback(c) : c(); + } + }, y), + l && (t = m); +} +export { E as c }; diff --git a/frontend-backup/_app/immutable/chunks/CeLr1p76.js b/frontend-backup/_app/immutable/chunks/CeLr1p76.js deleted file mode 100644 index e581ebc..0000000 --- a/frontend-backup/_app/immutable/chunks/CeLr1p76.js +++ /dev/null @@ -1,13 +0,0 @@ -import "./Bzak7iHL.js"; -import { q as p, b as q } from "./DUoKDNpf.js"; -import { a } from "./B1GmkH4o.js"; -import { r as e } from "./5NasrULQ.js"; -var l = p( - '' -); -function T(r, o) { - let s = e(o, ["$$slots", "$$events", "$$legacy"]); - var t = l(); - a(t, () => ({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960", fill: "currentColor", ...s })), q(r, t); -} -export { T as W }; diff --git a/frontend-backup/_app/immutable/chunks/CgCA7Awo.js b/frontend-backup/_app/immutable/chunks/CgCA7Awo.js new file mode 100644 index 0000000..babdc28 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/CgCA7Awo.js @@ -0,0 +1,159 @@ +import { g as s } from "./CV9xcpLq.js"; +import "./Ch2Ub8FX.js"; +import { + p as O, + g as o, + u as R, + aw as w, + au as j, + y as k, + f as g, + d as c, + s as x, + bj as C, + r as l, + t as v, + b, + c as N, +} from "./CMvZtFtm.js"; +import { s as h } from "./DVA6u9-7.js"; +import { p as S, i as q, r as Y } from "./BF50aS-j.js"; +import { b as z, C as B } from "./C5yqZvKC.js"; +import { b as F } from "./Dpga8uG-.js"; +(function () { + try { + var t = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + t.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var t = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + e = new t.Error().stack; + e && + ((t._sentryDebugIds = t._sentryDebugIds || {}), + (t._sentryDebugIds[e] = "832b2d91-c507-495d-8a1f-d5c91dd6acad"), + (t._sentryDebugIdIdentifier = + "sentry-dbid-832b2d91-c507-495d-8a1f-d5c91dd6acad")); + })(); +} catch {} +const G = () => "Select the reason", + H = () => "Selecione o motivo", + xe = (t = {}, e = {}) => ((e.locale ?? s()) === "en" ? G() : H()), + J = () => "Other", + K = () => "Outro motivo", + ve = (t = {}, e = {}) => ((e.locale ?? s()) === "en" ? J() : K()), + P = () => "Extra context on what happened (required)", + Q = () => "Mais informações sobre o que aconteceu (obrigatório)", + be = (t = {}, e = {}) => ((e.locale ?? s()) === "en" ? P() : Q()), + U = () => "Select the report reason", + V = () => "Selecione o motivo da denúncia", + he = (t = {}, e = {}) => ((e.locale ?? s()) === "en" ? U() : V()), + W = () => "Required", + X = () => "Obrigatório", + Z = (t = {}, e = {}) => ((e.locale ?? s()) === "en" ? W() : X()), + $ = (t) => `Min. characters: ${t.min}`, + ee = (t) => `Mínimo de caracteres: ${t.min}`, + te = (t, e = {}) => ((e.locale ?? s()) === "en" ? $(t) : ee(t)), + ae = (t) => `Max. characters: ${t.max}`, + re = (t) => `Máximo de caracteres: ${t.max}`, + ne = (t, e = {}) => ((e.locale ?? s()) === "en" ? ae(t) : re(t)); +var se = g(' '), + oe = g(' '), + ce = g( + '
        ' + ); +function ge(t, e) { + O(e, !0); + let r = S(e, "value", 15), + E = S(e, "validate", 15), + I = Y(e, [ + "$$slots", + "$$events", + "$$legacy", + "label", + "placeholder", + "value", + "max", + "min", + "validate", + ]), + i = j(""); + const d = R(() => { + var a; + return ((a = r()) == null ? void 0 : a.length) ?? 0; + }); + E(T); + function T() { + return e.min !== void 0 && o(d) < e.min + ? (w(i, e.min === 1 ? Z() : te({ min: e.min }), !0), !1) + : e.max !== void 0 && o(d) > e.max + ? (w(i, ne({ max: e.max }), !0), !1) + : !0; + } + k(() => { + var a; + e.max !== void 0 && + o(d) > e.max && + r((a = r()) == null ? void 0 : a.substring(0, e.max)); + }); + var f = ce(), + y = c(f); + { + var L = (a) => { + var n = se(), + m = c(n, !0); + l(n), v(() => h(m, e.label)), b(a, n); + }; + q(y, (a) => { + e.label && a(L); + }); + } + var u = x(y, 2); + C(u), + z( + u, + (a) => ({ + ...I, + class: `textarea w-full ${e.class ?? ""}`, + placeholder: e.placeholder, + [B]: a, + }), + [() => ({ "textarea-error": !!o(i) })] + ); + var p = x(u, 2), + _ = c(p), + M = c(_, !0); + l(_); + var D = x(_, 2); + { + var A = (a) => { + var n = oe(), + m = c(n, !0); + l(n), v(() => h(m, e.max - o(d))), b(a, n); + }; + q(D, (a) => { + e.max !== void 0 && a(A); + }); + } + l(p), l(f), v(() => h(M, o(i))), F(u, r), b(t, f), N(); +} +export { ge as L, he as a, be as g, ve as o, xe as s }; diff --git a/frontend-backup/_app/immutable/chunks/Ch2Ub8FX.js b/frontend-backup/_app/immutable/chunks/Ch2Ub8FX.js new file mode 100644 index 0000000..7244de3 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/Ch2Ub8FX.js @@ -0,0 +1,41 @@ +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + d = new e.Error().stack; + d && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[d] = "de59cd8a-506f-43e6-a3d3-bc92e3ebaf74"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-de59cd8a-506f-43e6-a3d3-bc92e3ebaf74")); + })(); +} catch {} +const f = "5"; +var n; +typeof window < "u" && + ((n = window.__svelte ?? (window.__svelte = {})).v ?? (n.v = new Set())).add( + f + ); diff --git a/frontend-backup/_app/immutable/chunks/ChY_8ULT.js b/frontend-backup/_app/immutable/chunks/ChY_8ULT.js deleted file mode 100644 index 32c8085..0000000 --- a/frontend-backup/_app/immutable/chunks/ChY_8ULT.js +++ /dev/null @@ -1,37 +0,0 @@ -import { h as l, e as u, i as p, E as y, j as _, k as g, l as s, m as h, o as m, q as v } from "./BDALf20I.js"; -(function () { - try { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - e.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - a = new e.Error().stack; - a && ((e._sentryDebugIds = e._sentryDebugIds || {}), (e._sentryDebugIds[a] = "9dc3bcaa-438f-488e-b391-6b55ffb9a6c0"), (e._sentryDebugIdIdentifier = "sentry-dbid-9dc3bcaa-438f-488e-b391-6b55ffb9a6c0")); - })(); -} catch {} -function E(e, a, b) { - l && u(); - var t = e, - d, - n, - f = null, - o = null; - function i() { - n && (v(n), (n = null)), f && (f.lastChild.remove(), t.before(f), (f = null)), (n = o), (o = null); - } - p(() => { - if (d !== (d = a())) { - var r = h(); - if (d) { - var c = t; - r && ((f = document.createDocumentFragment()), f.append((c = _())), n && s.skipped_effects.add(n)), (o = g(() => b(c, d))); - } - r ? s.add_callback(i) : i(); - } - }, y), - l && (t = m); -} -export { E as c }; diff --git a/frontend-backup/_app/immutable/chunks/ChoU6b3z.js b/frontend-backup/_app/immutable/chunks/ChoU6b3z.js deleted file mode 100644 index ee6509e..0000000 --- a/frontend-backup/_app/immutable/chunks/ChoU6b3z.js +++ /dev/null @@ -1 +0,0 @@ -import{g as o}from"./DklPLC_x.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9d85ff60-dc7e-4571-ae15-2d64cdcd1f2b",e._sentryDebugIdIdentifier="sentry-dbid-9d85ff60-dc7e-4571-ae15-2d64cdcd1f2b")})()}catch{}const d=()=>"Error loading",r=()=>"Erro ao carregar",l=(e={},n={})=>(n.locale??o())==="en"?d():r();export{l as e}; diff --git a/frontend-backup/_app/immutable/chunks/ClOhzjRc.js b/frontend-backup/_app/immutable/chunks/ClOhzjRc.js deleted file mode 100644 index 74a5d8d..0000000 --- a/frontend-backup/_app/immutable/chunks/ClOhzjRc.js +++ /dev/null @@ -1,115 +0,0 @@ -import { S as g } from "./DffDvEhl.js"; -(function () { - try { - var t = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - t.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var t = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - e = new t.Error().stack; - e && ((t._sentryDebugIds = t._sentryDebugIds || {}), (t._sentryDebugIds[e] = "93bf6baa-df42-4606-8306-5e02c5577553"), (t._sentryDebugIdIdentifier = "sentry-dbid-93bf6baa-df42-4606-8306-5e02c5577553")); - })(); -} catch {} -const u = [ - "text-red-500", - "text-orange-500", - "text-yellow-500", - "text-lime-500", - "text-emerald-500", - "text-teal-500", - "text-cyan-500", - "text-sky-500", - "text-indigo-500", - "text-violet-500", - "text-purple-500", - "text-fuchsia-500", - "text-pink-500", - "text-rose-500", - ], - p = [ - "bg-red-500/10", - "bg-orange-500/10", - "bg-yellow-500/10", - "bg-lime-500/10", - "bg-emerald-500/10", - "bg-teal-500/10", - "bg-cyan-500/10", - "bg-sky-500/10", - "bg-indigo-500/10", - "bg-violet-500/10", - "bg-purple-500/10", - "bg-fuchsia-500/10", - "bg-pink-500/10", - "bg-rose-500/10", - ]; -function x(t) { - return u[t % u.length]; -} -function E(t) { - return p[t % p.length]; -} -function T({ r: t, g: e, b: o }) { - function r(n) { - return n.toString(16).padStart(2, "0"); - } - return `#${r(t)}${r(e)}${r(o)}`; -} -function k(t) { - return (t = t.trim().replace("#", "")), t.length === 3 && (t = t[0] + t[0] + t[1] + t[1] + t[2] + t[2]), t.length !== 6 ? { r: 0, g: 0, b: 0 } : { r: +("0x" + t.slice(0, 2)), g: +("0x" + t.slice(2, 4)), b: +("0x" + t.slice(4, 6)) }; -} -function C(t) { - t = Math.min(t, g.colors.length - 1); - const [e, o, r] = g.colors[t].rgb; - return { r: e, g: o, b: r, a: t === 0 ? 0 : 255 }; -} -const y = g.colors.map((t, e) => ({ ...t, idx: e, lab: v({ r: t.rgb[0], g: t.rgb[1], b: t.rgb[2] }) })).filter((t) => t.idx !== 0); -function A(t) { - let e = y[0], - o = Number.MAX_VALUE; - const r = v(t); - for (let n of y) { - const a = m(r, n.lab); - a < o && ((e = n), (o = a)); - } - return e.idx; -} -function v(t) { - var e = t.r / 255, - o = t.g / 255, - r = t.b / 255, - n, - a, - l; - return ( - (e = e > 0.04045 ? Math.pow((e + 0.055) / 1.055, 2.4) : e / 12.92), - (o = o > 0.04045 ? Math.pow((o + 0.055) / 1.055, 2.4) : o / 12.92), - (r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92), - (n = (e * 0.4124 + o * 0.3576 + r * 0.1805) / 0.95047), - (a = (e * 0.2126 + o * 0.7152 + r * 0.0722) / 1), - (l = (e * 0.0193 + o * 0.1192 + r * 0.9505) / 1.08883), - (n = n > 0.008856 ? Math.pow(n, 1 / 3) : 7.787 * n + 16 / 116), - (a = a > 0.008856 ? Math.pow(a, 1 / 3) : 7.787 * a + 16 / 116), - (l = l > 0.008856 ? Math.pow(l, 1 / 3) : 7.787 * l + 16 / 116), - { l: 116 * a - 16, a: 500 * (n - a), b: 200 * (a - l) } - ); -} -function m(t, e) { - var o = t.l - e.l, - r = t.a - e.a, - n = t.b - e.b, - a = Math.sqrt(t.a * t.a + t.b * t.b), - l = Math.sqrt(e.a * e.a + e.b * e.b), - i = a - l, - s = r * r + n * n - i * i; - s = s < 0 ? 0 : Math.sqrt(s); - var w = 1 + 0.045 * a, - h = 1 + 0.015 * a, - c = o / 1, - b = i / w, - f = s / h, - d = c * c + b * b + f * f; - return d < 0 ? 0 : Math.sqrt(d); -} -export { E as a, A as b, C as c, x as g, k as h, T as r }; diff --git a/frontend-backup/_app/immutable/chunks/CmAc-jwz.js b/frontend-backup/_app/immutable/chunks/CmAc-jwz.js deleted file mode 100644 index 78ba442..0000000 --- a/frontend-backup/_app/immutable/chunks/CmAc-jwz.js +++ /dev/null @@ -1 +0,0 @@ -import{g as o}from"./DklPLC_x.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9b7e0fbd-b2ac-4ffa-96b2-eb70cfb71837",e._sentryDebugIdIdentifier="sentry-dbid-9b7e0fbd-b2ac-4ffa-96b2-eb70cfb71837")})()}catch{}const f=()=>"Role",t=()=>"Cargo",r=(e={},n={})=>(n.locale??o())==="en"?f():t();export{r}; diff --git a/frontend-backup/_app/immutable/chunks/CmhsLcKe.js b/frontend-backup/_app/immutable/chunks/CmhsLcKe.js new file mode 100644 index 0000000..74ee92a --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/CmhsLcKe.js @@ -0,0 +1,40 @@ +import { g as d } from "./CV9xcpLq.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + n = new e.Error().stack; + n && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[n] = "9d85ff60-dc7e-4571-ae15-2d64cdcd1f2b"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-9d85ff60-dc7e-4571-ae15-2d64cdcd1f2b")); + })(); +} catch {} +const o = () => "Error loading", + r = () => "Erro ao carregar", + l = (e = {}, n = {}) => ((n.locale ?? d()) === "en" ? o() : r()); +export { l as e }; diff --git a/frontend-backup/_app/immutable/chunks/Cp3o644A.js b/frontend-backup/_app/immutable/chunks/Cp3o644A.js deleted file mode 100644 index c45d05d..0000000 --- a/frontend-backup/_app/immutable/chunks/Cp3o644A.js +++ /dev/null @@ -1,15 +0,0 @@ -import { s as e, p as r } from "./KvV259my.js"; -const t = { - get error() { - return r.error; - }, - get status() { - return r.status; - }, - get url() { - return r.url; - }, -}; -e.updated.check; -const a = t; -export { a as p }; diff --git a/frontend-backup/_app/immutable/chunks/Cqwd83E5.js b/frontend-backup/_app/immutable/chunks/Cqwd83E5.js new file mode 100644 index 0000000..6999db0 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/Cqwd83E5.js @@ -0,0 +1,420 @@ +import { g as u } from "./CV9xcpLq.js"; +import "./Ch2Ub8FX.js"; +import { o as De } from "./DoL3ojdE.js"; +import { + at as Be, + p as Te, + y as ae, + aw as h, + au as R, + f as X, + d as o, + s as c, + r as n, + n as Ee, + ax as se, + b, + c as Le, + t as k, + g as s, + u as ie, + b4 as J, + ay as le, + a as ce, + v as Ue, +} from "./CMvZtFtm.js"; +import { s as _ } from "./DVA6u9-7.js"; +import { p as Ie, i as C, r as Pe } from "./BF50aS-j.js"; +import { e as Ce } from "./CXkjfmFU.js"; +import { + f as ze, + r as D, + s as ue, + g as z, + a as Me, + b as Se, +} from "./C5yqZvKC.js"; +import { t as Ae } from "./BBgyHb-Z.js"; +import { c as Oe } from "./Dpga8uG-.js"; +import { b as je } from "./0wx1llIh.js"; +import { + i as Ne, + h as qe, + f as Ze, + j as Fe, + k as He, + P as Q, + t as W, +} from "./BRM3t761.js"; +import { o as Ke, L as Ve, s as Ye, a as Ge, g as Je } from "./CgCA7Awo.js"; +import { P as Qe } from "./D3yaN7Zl.js"; +import { c as We } from "./CHGjpGz-.js"; +import { g as Xe } from "./lE0oaQc5.js"; +import { f as $e } from "./wZ7b5CwQ.js"; +(function () { + try { + var t = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + t.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var t = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + e = new t.Error().stack; + e && + ((t._sentryDebugIds = t._sentryDebugIds || {}), + (t._sentryDebugIds[e] = "ec586f40-9abd-4bae-8453-2c8e973cd3d0"), + (t._sentryDebugIdIdentifier = + "sentry-dbid-ec586f40-9abd-4bae-8453-2c8e973cd3d0")); + })(); +} catch {} +const et = () => "Copy", + tt = () => "Copiar", + lr = (t = {}, e = {}) => ((e.locale ?? u()) === "en" ? et() : tt()), + rt = () => "Report User", + nt = () => "Reportar usuário", + ot = (t = {}, e = {}) => ((e.locale ?? u()) === "en" ? rt() : nt()), + at = () => "Timeout User", + st = () => "Suspender usuário", + it = (t = {}, e = {}) => ((e.locale ?? u()) === "en" ? at() : st()), + lt = () => "Ban User", + ct = () => "Banir usuário", + ut = (t = {}, e = {}) => ((e.locale ?? u()) === "en" ? lt() : ct()), + dt = () => "+18, inappropriate link, highly suggestive content, ...", + pt = () => "+18, links inapropriados, conteúdo altamente sugestivo, ...", + _t = (t = {}, e = {}) => ((e.locale ?? u()) === "en" ? dt() : pt()), + ft = () => "Use of software to completely automate painting", + mt = () => "Uso de software para pintar de forma completamente automatizada ", + vt = (t = {}, e = {}) => ((e.locale ?? u()) === "en" ? ft() : mt()), + gt = () => "Racism, homophobia, hate groups, ...", + bt = () => "Racismo, homofobia, grupos de ódio, ...", + ht = (t = {}, e = {}) => ((e.locale ?? u()) === "en" ? gt() : bt()), + xt = () => "Messed up artworks for no reason", + yt = () => "Estragar desenho dos outros sem motivo", + wt = (t = {}, e = {}) => ((e.locale ?? u()) === "en" ? xt() : yt()), + Rt = () => "Released other's personal information without their consent", + kt = () => "Vazar informações pessoais de terceiros sem consentimento", + Dt = (t = {}, e = {}) => ((e.locale ?? u()) === "en" ? Rt() : kt()), + Bt = () => "Other reason not listed", + Tt = () => "Outro motivo não listado", + Et = (t = {}, e = {}) => ((e.locale ?? u()) === "en" ? Bt() : Tt()), + Lt = () => "Report", + Ut = () => "Reportar", + It = (t = {}, e = {}) => ((e.locale ?? u()) === "en" ? Lt() : Ut()), + Pt = () => "Report sent successfully", + Ct = () => "Denúncia enviada com sucesso", + zt = (t = {}, e = {}) => ((e.locale ?? u()) === "en" ? Pt() : Ct()), + Mt = () => "Report failed. Please try again later", + St = () => "Denúncia falhou. Por favor, tente novamente mais tarde", + At = (t = {}, e = {}) => ((e.locale ?? u()) === "en" ? Mt() : St()), + Ot = () => "Purchases", + jt = () => "Compras", + cr = (t = {}, e = {}) => ((e.locale ?? u()) === "en" ? Ot() : jt()); +var Nt = X( + '' + ), + qt = (t, e) => { + e(!1); + }, + Zt = X( + '

        ' + ), + Ft = X( + ' ' + ); +function ur(t, e) { + Te(e, !0); + const i = []; + let p = Ie(e, "open", 15), + B = R(!1), + T = R(""), + M = R(""), + E = R(null), + S = R(null); + const de = [ + { value: "inappropriate-content", label: Ne(), description: _t() }, + { value: "hate-speech", label: qe(), description: ht() }, + { value: "doxxing", label: Ze(), description: Dt() }, + { value: "bot", label: Fe(), description: vt() }, + { value: "griefing", label: He(), description: wt() }, + { value: "other", label: Ke(), description: Et() }, + ]; + De(() => { + const f = (m) => { + m.key === "Escape" && p(!1); + }; + return ( + document.addEventListener("keydown", f), + () => document.removeEventListener("keydown", f) + ); + }), + ae(() => { + p() || (h(T, ""), h(M, "")); + }); + const pe = { + "report-user": `${Q}/report-user`, + timeout: `${Q}/moderator/timeout-user`, + ban: `${Q}/admin/ban-user`, + }; + var x = Ft(), + $ = o(x), + _e = c(o($), 2); + { + var fe = (f) => { + var m = Zt(), + A = o(m); + D(A); + var O = c(A, 2); + D(O); + var j = c(O, 2); + D(j); + var N = c(j, 2); + D(N); + var q = c(N, 2), + ee = o(q); + Qe(ee, { + get userId() { + return e.paintedBy.id; + }, + get pictureUrl() { + return e.paintedBy.picture; + }, + class: "size-14", + }); + var te = c(ee, 2), + Z = o(te), + me = o(Z); + { + var ve = (a) => { + var r = J(); + k((l) => _(r, l), [() => ot()]), b(a, r); + }, + ge = (a) => { + var r = le(), + l = ce(r); + { + var d = (v) => { + var g = J(); + k((y) => _(g, y), [() => it()]), b(v, g); + }, + U = (v) => { + var g = le(), + y = ce(g); + { + var I = (w) => { + var P = J(); + k((ke) => _(P, ke), [() => ut()]), b(w, P); + }; + C( + y, + (w) => { + e.action === "ban" && w(I); + }, + !0 + ); + } + b(v, g); + }; + C( + l, + (v) => { + e.action === "timeout" ? v(d) : v(U, !1); + }, + !0 + ); + } + b(a, r); + }; + C(me, (a) => { + e.action === "report-user" ? a(ve) : a(ge, !1); + }); + } + n(Z); + var F = c(Z, 2), + H = o(F), + be = o(H, !0); + n(H); + var re = c(H, 2), + he = o(re); + n(re), n(F), n(te), n(q); + var K = c(q, 2), + V = o(K), + xe = o(V); + n(V); + var ne = c(V, 2); + Ce( + ne, + 21, + () => de, + (a) => a.value, + (a, r) => { + var l = Nt(), + d = o(l); + D(d); + var U, + v = c(d, 2), + g = o(v), + y = o(g, !0); + n(g); + var I = c(g, 2), + w = o(I, !0); + n(I), + n(v), + n(l), + k(() => { + ue(d, "aria-label", s(r).label), + U !== (U = s(r).value) && + (d.value = (d.__value = s(r).value) ?? ""), + _(y, s(r).label), + _(w, s(r).description); + }), + Oe( + i, + [], + d, + () => (s(r).value, s(T)), + (P) => h(T, P) + ), + b(a, l); + } + ), + n(ne), + n(K); + var Y = c(K, 2), + ye = o(Y); + { + let a = ie(() => Je()), + r = ie(() => (s(T) === "doxxing" ? 20 : 5)); + Ve(ye, { + class: "h-20 rounded-lg", + name: "notes", + get placeholder() { + return s(a); + }, + max: 2056, + get min() { + return s(r); + }, + get value() { + return s(M); + }, + set value(l) { + h(M, l, !0); + }, + get validate() { + return s(S); + }, + set validate(l) { + h(S, l, !0); + }, + }); + } + n(Y); + var oe = c(Y, 2), + L = o(oe); + L.__click = [qt, p]; + var we = o(L, !0); + n(L); + var G = c(L, 2), + Re = o(G, !0); + n(G), + n(oe), + n(m), + je( + m, + (a) => h(E, a), + () => s(E) + ), + k( + (a, r, l, d) => { + ue(m, "action", pe[e.action]), + z(A, e.paintedBy.id), + z(O, e.latLon[0]), + z(j, e.latLon[1]), + z(N, e.zoom), + Me(F, 1, `font-medium ${a ?? ""} flex gap-1.5`), + _(be, e.paintedBy.name), + _(he, `#${e.paintedBy.id ?? ""}`), + _(xe, `${r ?? ""}:`), + _(we, l), + (G.disabled = s(B)), + _(Re, d); + }, + [() => Xe(e.paintedBy.id), () => Ye(), () => We(), () => It()] + ), + se("submit", m, async (a) => { + if ((a.preventDefault(), !s(B) && s(S)())) + try { + h(B, !0); + const r = new FormData(s(E)); + if (!r.get("reason")) { + W.error(Ge()); + return; + } + const l = await e.image; + r.append("image", l, `report-${Date.now()}.jpeg`); + const d = await fetch(s(E).action, { + method: "POST", + body: r, + credentials: "include", + }); + d.status === 200 || d.status === 409 + ? (W.info(zt()), p(!1)) + : W.error(At()); + } finally { + h(B, !1); + } + }), + Ae(2, m, () => $e), + b(f, m); + }; + C(_e, (f) => { + p() && f(fe); + }); + } + n($), + Ee(2), + n(x), + ze(x, () => (f) => { + ae(() => { + p() ? f.show() : f.close(); + }); + }), + se("close", x, () => p(!1)), + b(t, x), + Le(); +} +Be(["click"]); +var Ht = Ue( + '' +); +function dr(t, e) { + let i = Pe(e, ["$$slots", "$$events", "$$legacy"]); + var p = Ht(); + Se(p, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...i, + })), + b(t, p); +} +export { dr as D, ur as R, ut as b, lr as c, cr as p, ot as r, it as t }; diff --git a/frontend-backup/_app/immutable/chunks/CyB--sFG.js b/frontend-backup/_app/immutable/chunks/CyB--sFG.js new file mode 100644 index 0000000..68406c5 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/CyB--sFG.js @@ -0,0 +1,2129 @@ +var ee = (t) => { + throw TypeError(t); +}; +var Ve = (t, e, n) => e.has(t) || ee("Cannot " + n); +var b = (t, e, n) => ( + Ve(t, e, "read from private field"), n ? n.call(t) : e.get(t) + ), + P = (t, e, n) => + e.has(t) + ? ee("Cannot add the same private member more than once") + : e instanceof WeakSet + ? e.add(t) + : e.set(t, n); +import { v as qe, o as ne, a as Me } from "./DoL3ojdE.js"; +import { + az as Tt, + aZ as Ge, + au as C, + g as N, + aw as O, + aL as re, +} from "./CMvZtFtm.js"; +(function () { + try { + var t = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + t.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var t = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + e = new t.Error().stack; + e && + ((t._sentryDebugIds = t._sentryDebugIds || {}), + (t._sentryDebugIds[e] = "35463346-9c54-44df-a0ee-505101ff53d1"), + (t._sentryDebugIdIdentifier = + "sentry-dbid-35463346-9c54-44df-a0ee-505101ff53d1")); + })(); +} catch {} +const q = []; +function Dt(t, e = Tt) { + let n = null; + const a = new Set(); + function r(o) { + if (Ge(t, o) && ((t = o), n)) { + const c = !q.length; + for (const l of a) l[1](), q.push(l, t); + if (c) { + for (let l = 0; l < q.length; l += 2) q[l][0](q[l + 1]); + q.length = 0; + } + } + } + function s(o) { + r(o(t)); + } + function i(o, c = Tt) { + const l = [o, c]; + return ( + a.add(l), + a.size === 1 && (n = e(r, s) || Tt), + o(t), + () => { + a.delete(l), a.size === 0 && n && (n(), (n = null)); + } + ); + } + return { set: r, update: s, subscribe: i }; +} +class Et { + constructor(e, n) { + (this.status = e), + typeof n == "string" + ? (this.body = { message: n }) + : n + ? (this.body = n) + : (this.body = { message: `Error: ${e}` }); + } + toString() { + return JSON.stringify(this.body); + } +} +class Ft { + constructor(e, n) { + (this.status = e), (this.location = n); + } +} +class Bt extends Error { + constructor(e, n, a) { + super(a), (this.status = e), (this.text = n); + } +} +new URL("sveltekit-internal://"); +function He(t, e) { + return t === "/" || e === "ignore" + ? t + : e === "never" + ? t.endsWith("/") + ? t.slice(0, -1) + : t + : e === "always" && !t.endsWith("/") + ? t + "/" + : t; +} +function Ke(t) { + return t.split("%25").map(decodeURI).join("%25"); +} +function Ye(t) { + for (const e in t) t[e] = decodeURIComponent(t[e]); + return t; +} +function Ut({ href: t }) { + return t.split("#")[0]; +} +function ze(t, e, n, a = !1) { + const r = new URL(t); + Object.defineProperty(r, "searchParams", { + value: new Proxy(r.searchParams, { + get(i, o) { + if (o === "get" || o === "getAll" || o === "has") + return (l) => (n(l), i[o](l)); + e(); + const c = Reflect.get(i, o); + return typeof c == "function" ? c.bind(i) : c; + }, + }), + enumerable: !0, + configurable: !0, + }); + const s = ["href", "pathname", "search", "toString", "toJSON"]; + a && s.push("hash"); + for (const i of s) + Object.defineProperty(r, i, { + get() { + return e(), t[i]; + }, + enumerable: !0, + configurable: !0, + }); + return r; +} +function We(...t) { + let e = 5381; + for (const n of t) + if (typeof n == "string") { + let a = n.length; + for (; a; ) e = (e * 33) ^ n.charCodeAt(--a); + } else if (ArrayBuffer.isView(n)) { + const a = new Uint8Array(n.buffer, n.byteOffset, n.byteLength); + let r = a.length; + for (; r; ) e = (e * 33) ^ a[--r]; + } else throw new TypeError("value must be a string or TypedArray"); + return (e >>> 0).toString(36); +} +new TextEncoder(); +const Je = new TextDecoder(); +function Xe(t) { + const e = atob(t), + n = new Uint8Array(e.length); + for (let a = 0; a < e.length; a++) n[a] = e.charCodeAt(a); + return n; +} +const Ze = window.fetch; +window.fetch = (t, e) => ( + (t instanceof Request + ? t.method + : (e == null ? void 0 : e.method) || "GET") !== "GET" && z.delete(Vt(t)), + Ze(t, e) +); +const z = new Map(); +function Qe(t, e) { + const n = Vt(t, e), + a = document.querySelector(n); + if (a != null && a.textContent) { + a.remove(); + let { body: r, ...s } = JSON.parse(a.textContent); + const i = a.getAttribute("data-ttl"); + return ( + i && z.set(n, { body: r, init: s, ttl: 1e3 * Number(i) }), + a.getAttribute("data-b64") !== null && (r = Xe(r)), + Promise.resolve(new Response(r, s)) + ); + } + return window.fetch(t, e); +} +function tn(t, e, n) { + if (z.size > 0) { + const a = Vt(t, n), + r = z.get(a); + if (r) { + if ( + performance.now() < r.ttl && + ["default", "force-cache", "only-if-cached", void 0].includes( + n == null ? void 0 : n.cache + ) + ) + return new Response(r.body, r.init); + z.delete(a); + } + } + return window.fetch(e, n); +} +function Vt(t, e) { + let a = `script[data-sveltekit-fetched][data-url=${JSON.stringify( + t instanceof Request ? t.url : t + )}]`; + if ((e != null && e.headers) || (e != null && e.body)) { + const r = []; + e.headers && r.push([...new Headers(e.headers)].join(",")), + e.body && + (typeof e.body == "string" || ArrayBuffer.isView(e.body)) && + r.push(e.body), + (a += `[data-hash="${We(...r)}"]`); + } + return a; +} +const en = /^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/; +function nn(t) { + const e = []; + return { + pattern: + t === "/" + ? /^\/$/ + : new RegExp( + `^${an(t) + .map((a) => { + const r = /^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(a); + if (r) + return ( + e.push({ + name: r[1], + matcher: r[2], + optional: !1, + rest: !0, + chained: !0, + }), + "(?:/([^]*))?" + ); + const s = /^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(a); + if (s) + return ( + e.push({ + name: s[1], + matcher: s[2], + optional: !0, + rest: !1, + chained: !0, + }), + "(?:/([^/]+))?" + ); + if (!a) return; + const i = a.split(/\[(.+?)\](?!\])/); + return ( + "/" + + i + .map((c, l) => { + if (l % 2) { + if (c.startsWith("x+")) + return xt( + String.fromCharCode(parseInt(c.slice(2), 16)) + ); + if (c.startsWith("u+")) + return xt( + String.fromCharCode( + ...c + .slice(2) + .split("-") + .map((u) => parseInt(u, 16)) + ) + ); + const d = en.exec(c), + [, p, y, f, m] = d; + return ( + e.push({ + name: f, + matcher: m, + optional: !!p, + rest: !!y, + chained: y ? l === 1 && i[0] === "" : !1, + }), + y ? "([^]*?)" : p ? "([^/]*)?" : "([^/]+?)" + ); + } + return xt(c); + }) + .join("") + ); + }) + .join("")}/?$` + ), + params: e, + }; +} +function rn(t) { + return t !== "" && !/^\([^)]+\)$/.test(t); +} +function an(t) { + return t.slice(1).split("/").filter(rn); +} +function on(t, e, n) { + const a = {}, + r = t.slice(1), + s = r.filter((o) => o !== void 0); + let i = 0; + for (let o = 0; o < e.length; o += 1) { + const c = e[o]; + let l = r[o - i]; + if ( + (c.chained && + c.rest && + i && + ((l = r + .slice(o - i, o + 1) + .filter((d) => d) + .join("/")), + (i = 0)), + l === void 0) + ) { + c.rest && (a[c.name] = ""); + continue; + } + if (!c.matcher || n[c.matcher](l)) { + a[c.name] = l; + const d = e[o + 1], + p = r[o + 1]; + d && !d.rest && d.optional && p && c.chained && (i = 0), + !d && !p && Object.keys(a).length === s.length && (i = 0); + continue; + } + if (c.optional && c.chained) { + i++; + continue; + } + return; + } + if (!i) return a; +} +function xt(t) { + return t + .normalize() + .replace(/[[\]]/g, "\\$&") + .replace(/%/g, "%25") + .replace(/\//g, "%2[Ff]") + .replace(/\?/g, "%3[Ff]") + .replace(/#/g, "%23") + .replace(/[.*+?^${}()|\\]/g, "\\$&"); +} +function sn({ nodes: t, server_loads: e, dictionary: n, matchers: a }) { + const r = new Set(e); + return Object.entries(n).map(([o, [c, l, d]]) => { + const { pattern: p, params: y } = nn(o), + f = { + id: o, + exec: (m) => { + const u = p.exec(m); + if (u) return on(u, y, a); + }, + errors: [1, ...(d || [])].map((m) => t[m]), + layouts: [0, ...(l || [])].map(i), + leaf: s(c), + }; + return ( + (f.errors.length = f.layouts.length = + Math.max(f.errors.length, f.layouts.length)), + f + ); + }); + function s(o) { + const c = o < 0; + return c && (o = ~o), [c, t[o]]; + } + function i(o) { + return o === void 0 ? o : [r.has(o), t[o]]; + } +} +function ve(t, e = JSON.parse) { + try { + return e(sessionStorage[t]); + } catch {} +} +function ae(t, e, n = JSON.stringify) { + const a = n(e); + try { + sessionStorage[t] = a; + } catch {} +} +var ge; +const x = + ((ge = globalThis.__sveltekit_18835iy) == null ? void 0 : ge.base) ?? ""; +var me; +const cn = + ((me = globalThis.__sveltekit_18835iy) == null ? void 0 : me.assets) ?? x, + be = "sveltekit:snapshot", + Ee = "sveltekit:scroll", + Ae = "sveltekit:states", + ln = "sveltekit:pageurl", + G = "sveltekit:history", + Z = "sveltekit:navigation", + F = { tap: 1, hover: 2, viewport: 3, eager: 4, off: -1, false: -1 }, + dt = location.origin; +function qt(t) { + if (t instanceof URL) return t; + let e = document.baseURI; + if (!e) { + const n = document.getElementsByTagName("base"); + e = n.length ? n[0].href : document.URL; + } + return new URL(t, e); +} +function At() { + return { x: pageXOffset, y: pageYOffset }; +} +function M(t, e) { + return t.getAttribute(`data-sveltekit-${e}`); +} +const oe = { ...F, "": F.hover }; +function ke(t) { + let e = t.assignedSlot ?? t.parentNode; + return (e == null ? void 0 : e.nodeType) === 11 && (e = e.host), e; +} +function Se(t, e) { + for (; t && t !== e; ) { + if (t.nodeName.toUpperCase() === "A" && t.hasAttribute("href")) return t; + t = ke(t); + } +} +function Nt(t, e, n) { + let a; + try { + if ( + ((a = new URL( + t instanceof SVGAElement ? t.href.baseVal : t.href, + document.baseURI + )), + n && a.hash.match(/^#[^/]/)) + ) { + const o = location.hash.split("#")[1] || "/"; + a.hash = `#${o}${a.hash}`; + } + } catch {} + const r = t instanceof SVGAElement ? t.target.baseVal : t.target, + s = + !a || + !!r || + kt(a, e, n) || + (t.getAttribute("rel") || "").split(/\s+/).includes("external"), + i = (a == null ? void 0 : a.origin) === dt && t.hasAttribute("download"); + return { url: a, external: s, target: r, download: i }; +} +function pt(t) { + let e = null, + n = null, + a = null, + r = null, + s = null, + i = null, + o = t; + for (; o && o !== document.documentElement; ) + a === null && (a = M(o, "preload-code")), + r === null && (r = M(o, "preload-data")), + e === null && (e = M(o, "keepfocus")), + n === null && (n = M(o, "noscroll")), + s === null && (s = M(o, "reload")), + i === null && (i = M(o, "replacestate")), + (o = ke(o)); + function c(l) { + switch (l) { + case "": + case "true": + return !0; + case "off": + case "false": + return !1; + default: + return; + } + } + return { + preload_code: oe[a ?? "off"], + preload_data: oe[r ?? "off"], + keepfocus: c(e), + noscroll: c(n), + reload: c(s), + replace_state: c(i), + }; +} +function se(t) { + const e = Dt(t); + let n = !0; + function a() { + (n = !0), e.update((i) => i); + } + function r(i) { + (n = !1), e.set(i); + } + function s(i) { + let o; + return e.subscribe((c) => { + (o === void 0 || (n && c !== o)) && i((o = c)); + }); + } + return { notify: a, set: r, subscribe: s }; +} +const Re = { v: () => {} }; +function fn() { + const { set: t, subscribe: e } = Dt(!1); + let n; + async function a() { + clearTimeout(n); + try { + const r = await fetch(`${cn}/_app/version.json`, { + headers: { pragma: "no-cache", "cache-control": "no-cache" }, + }); + if (!r.ok) return !1; + const i = (await r.json()).version !== qe; + return i && (t(!0), Re.v(), clearTimeout(n)), i; + } catch { + return !1; + } + } + return { subscribe: e, check: a }; +} +function kt(t, e, n) { + return t.origin !== dt || !t.pathname.startsWith(e) + ? !0 + : n + ? !( + t.pathname === e + "/" || + t.pathname === e + "/index.html" || + (t.protocol === "file:" && + t.pathname.replace(/\/[^/]+\.html?$/, "") === e) + ) + : !1; +} +function Zn(t) {} +function ie(t) { + const e = dn(t), + n = new ArrayBuffer(e.length), + a = new DataView(n); + for (let r = 0; r < n.byteLength; r++) a.setUint8(r, e.charCodeAt(r)); + return n; +} +const un = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +function dn(t) { + t.length % 4 === 0 && (t = t.replace(/==?$/, "")); + let e = "", + n = 0, + a = 0; + for (let r = 0; r < t.length; r++) + (n <<= 6), + (n |= un.indexOf(t[r])), + (a += 6), + a === 24 && + ((e += String.fromCharCode((n & 16711680) >> 16)), + (e += String.fromCharCode((n & 65280) >> 8)), + (e += String.fromCharCode(n & 255)), + (n = a = 0)); + return ( + a === 12 + ? ((n >>= 4), (e += String.fromCharCode(n))) + : a === 18 && + ((n >>= 2), + (e += String.fromCharCode((n & 65280) >> 8)), + (e += String.fromCharCode(n & 255))), + e + ); +} +const hn = -1, + pn = -2, + gn = -3, + mn = -4, + yn = -5, + _n = -6; +function wn(t, e) { + if (typeof t == "number") return r(t, !0); + if (!Array.isArray(t) || t.length === 0) throw new Error("Invalid input"); + const n = t, + a = Array(n.length); + function r(s, i = !1) { + if (s === hn) return; + if (s === gn) return NaN; + if (s === mn) return 1 / 0; + if (s === yn) return -1 / 0; + if (s === _n) return -0; + if (i) throw new Error("Invalid input"); + if (s in a) return a[s]; + const o = n[s]; + if (!o || typeof o != "object") a[s] = o; + else if (Array.isArray(o)) + if (typeof o[0] == "string") { + const c = o[0], + l = e == null ? void 0 : e[c]; + if (l) return (a[s] = l(r(o[1]))); + switch (c) { + case "Date": + a[s] = new Date(o[1]); + break; + case "Set": + const d = new Set(); + a[s] = d; + for (let f = 1; f < o.length; f += 1) d.add(r(o[f])); + break; + case "Map": + const p = new Map(); + a[s] = p; + for (let f = 1; f < o.length; f += 2) p.set(r(o[f]), r(o[f + 1])); + break; + case "RegExp": + a[s] = new RegExp(o[1], o[2]); + break; + case "Object": + a[s] = Object(o[1]); + break; + case "BigInt": + a[s] = BigInt(o[1]); + break; + case "null": + const y = Object.create(null); + a[s] = y; + for (let f = 1; f < o.length; f += 2) y[o[f]] = r(o[f + 1]); + break; + case "Int8Array": + case "Uint8Array": + case "Uint8ClampedArray": + case "Int16Array": + case "Uint16Array": + case "Int32Array": + case "Uint32Array": + case "Float32Array": + case "Float64Array": + case "BigInt64Array": + case "BigUint64Array": { + const f = globalThis[c], + m = o[1], + u = ie(m), + h = new f(u); + a[s] = h; + break; + } + case "ArrayBuffer": { + const f = o[1], + m = ie(f); + a[s] = m; + break; + } + default: + throw new Error(`Unknown type ${c}`); + } + } else { + const c = new Array(o.length); + a[s] = c; + for (let l = 0; l < o.length; l += 1) { + const d = o[l]; + d !== pn && (c[l] = r(d)); + } + } + else { + const c = {}; + a[s] = c; + for (const l in o) { + const d = o[l]; + c[l] = r(d); + } + } + return a[s]; + } + return r(0); +} +const Ie = new Set([ + "load", + "prerender", + "csr", + "ssr", + "trailingSlash", + "config", +]); +[...Ie]; +const vn = new Set([...Ie]); +[...vn]; +function bn(t) { + return t.filter((e) => e != null); +} +const En = "x-sveltekit-invalidated", + An = "x-sveltekit-trailing-slash"; +function gt(t) { + return t instanceof Et || t instanceof Bt ? t.status : 500; +} +function kn(t) { + return t instanceof Bt ? t.text : "Internal Error"; +} +let L, Q, Pt; +const Sn = + ne.toString().includes("$$") || /function \w+\(\) \{\}/.test(ne.toString()); +var nt, rt, at, ot, st, it, ct, lt, ye, ft, _e, ut, we; +Sn + ? ((L = { + data: {}, + form: null, + error: null, + params: {}, + route: { id: null }, + state: {}, + status: -1, + url: new URL("https://example.com"), + }), + (Q = { current: null }), + (Pt = { current: !1 })) + : ((L = new ((ye = class { + constructor() { + P(this, nt, C({})); + P(this, rt, C(null)); + P(this, at, C(null)); + P(this, ot, C({})); + P(this, st, C({ id: null })); + P(this, it, C({})); + P(this, ct, C(-1)); + P(this, lt, C(new URL("https://example.com"))); + } + get data() { + return N(b(this, nt)); + } + set data(e) { + O(b(this, nt), e); + } + get form() { + return N(b(this, rt)); + } + set form(e) { + O(b(this, rt), e); + } + get error() { + return N(b(this, at)); + } + set error(e) { + O(b(this, at), e); + } + get params() { + return N(b(this, ot)); + } + set params(e) { + O(b(this, ot), e); + } + get route() { + return N(b(this, st)); + } + set route(e) { + O(b(this, st), e); + } + get state() { + return N(b(this, it)); + } + set state(e) { + O(b(this, it), e); + } + get status() { + return N(b(this, ct)); + } + set status(e) { + O(b(this, ct), e); + } + get url() { + return N(b(this, lt)); + } + set url(e) { + O(b(this, lt), e); + } + }), + (nt = new WeakMap()), + (rt = new WeakMap()), + (at = new WeakMap()), + (ot = new WeakMap()), + (st = new WeakMap()), + (it = new WeakMap()), + (ct = new WeakMap()), + (lt = new WeakMap()), + ye)()), + (Q = new ((_e = class { + constructor() { + P(this, ft, C(null)); + } + get current() { + return N(b(this, ft)); + } + set current(e) { + O(b(this, ft), e); + } + }), + (ft = new WeakMap()), + _e)()), + (Pt = new ((we = class { + constructor() { + P(this, ut, C(!1)); + } + get current() { + return N(b(this, ut)); + } + set current(e) { + O(b(this, ut), e); + } + }), + (ut = new WeakMap()), + we)()), + (Re.v = () => (Pt.current = !0))); +function Rn(t) { + Object.assign(L, t); +} +const In = "/__data.json", + Ln = ".html__data.json"; +function Tn(t) { + return t.endsWith(".html") + ? t.replace(/\.html$/, Ln) + : t.replace(/\/$/, "") + In; +} +const ce = { + spanContext() { + return Un; + }, + setAttribute() { + return this; + }, + setAttributes() { + return this; + }, + addEvent() { + return this; + }, + setStatus() { + return this; + }, + updateName() { + return this; + }, + end() { + return this; + }, + isRecording() { + return !1; + }, + recordException() { + return this; + }, + addLink() { + return this; + }, + addLinks() { + return this; + }, + }, + Un = { traceId: "", spanId: "", traceFlags: 0 }, + { onMount: xn, tick: Pn } = Me, + Cn = new Set(["icon", "shortcut icon", "apple-touch-icon"]), + V = ve(Ee) ?? {}, + tt = ve(be) ?? {}, + $ = { url: se({}), page: se({}), navigating: Dt(null), updated: fn() }; +function Mt(t) { + V[t] = At(); +} +function Nn(t, e) { + let n = t + 1; + for (; V[n]; ) delete V[n], (n += 1); + for (n = e + 1; tt[n]; ) delete tt[n], (n += 1); +} +function K(t) { + return (location.href = t.href), new Promise(() => {}); +} +async function Le() { + if ("serviceWorker" in navigator) { + const t = await navigator.serviceWorker.getRegistration(x || "/"); + t && (await t.update()); + } +} +function le() {} +let Gt, Ot, mt, j, jt, E; +globalThis.__sveltekit_18835iy.data; +const yt = [], + _t = []; +let T = null; +const ht = new Map(), + Ht = new Set(), + On = new Set(), + W = new Set(); +let w = { branch: [], error: null, url: null }, + Kt = !1, + wt = !1, + fe = !0, + et = !1, + Y = !1, + Te = !1, + Yt = !1, + Ue, + S, + U, + B; +const J = new Set(), + ue = new Map(); +async function nr(t, e, n) { + var s, i, o, c; + document.URL !== location.href && (location.href = location.href), + (E = t), + await ((i = (s = t.hooks).init) == null ? void 0 : i.call(s)), + (Gt = sn(t)), + (j = document.documentElement), + (jt = e), + (Ot = t.nodes[0]), + (mt = t.nodes[1]), + Ot(), + mt(), + (S = (o = history.state) == null ? void 0 : o[G]), + (U = (c = history.state) == null ? void 0 : c[Z]), + S || + ((S = U = Date.now()), + history.replaceState({ ...history.state, [G]: S, [Z]: U }, "")); + const a = V[S]; + function r() { + a && ((history.scrollRestoration = "manual"), scrollTo(a.x, a.y)); + } + n + ? (r(), await Kn(jt, n)) + : (await X({ + type: "enter", + url: qt(E.hash ? zn(new URL(location.href)) : location.href), + replace_state: !0, + }), + r()), + Hn(); +} +function jn() { + (yt.length = 0), (Yt = !1); +} +function xe(t) { + _t.some((e) => (e == null ? void 0 : e.snapshot)) && + (tt[t] = _t.map((e) => { + var n; + return (n = e == null ? void 0 : e.snapshot) == null + ? void 0 + : n.capture(); + })); +} +function Pe(t) { + var e; + (e = tt[t]) == null || + e.forEach((n, a) => { + var r, s; + (s = (r = _t[a]) == null ? void 0 : r.snapshot) == null || s.restore(n); + }); +} +function de() { + Mt(S), ae(Ee, V), xe(U), ae(be, tt); +} +async function zt(t, e, n, a) { + let r; + const s = await X({ + type: "goto", + url: qt(t), + keepfocus: e.keepFocus, + noscroll: e.noScroll, + replace_state: e.replaceState, + state: e.state, + redirect_count: n, + nav_token: a, + accept: () => { + e.invalidateAll && ((Yt = !0), (r = [...ue.keys()])), + e.invalidate && e.invalidate.forEach(Gn); + }, + }); + return ( + e.invalidateAll && + re() + .then(re) + .then(() => { + ue.forEach(({ resource: i }, o) => { + var c; + r != null && + r.includes(o) && + ((c = i.refresh) == null || c.call(i)); + }); + }), + s + ); +} +async function $n(t) { + if (t.id !== (T == null ? void 0 : T.id)) { + const e = {}; + J.add(e), + (T = { + id: t.id, + token: e, + promise: Oe({ ...t, preload: e }).then( + (n) => ( + J.delete(e), n.type === "loaded" && n.state.error && (T = null), n + ) + ), + }); + } + return T.promise; +} +async function Ct(t) { + var n; + const e = (n = await Rt(t, !1)) == null ? void 0 : n.route; + e && + (await Promise.all( + [...e.layouts, e.leaf].map((a) => (a == null ? void 0 : a[1]())) + )); +} +function Ce(t, e, n) { + var r; + w = t.state; + const a = document.querySelector("style[data-sveltekit]"); + if ( + (a && a.remove(), + Object.assign(L, t.props.page), + (Ue = new E.root({ + target: e, + props: { ...t.props, stores: $, components: _t }, + hydrate: n, + sync: !1, + })), + Pe(U), + n) + ) { + const s = { + from: null, + to: { + params: w.params, + route: { id: ((r = w.route) == null ? void 0 : r.id) ?? null }, + url: new URL(location.href), + }, + willUnload: !1, + type: "enter", + complete: Promise.resolve(), + }; + W.forEach((i) => i(s)); + } + wt = !0; +} +function vt({ + url: t, + params: e, + branch: n, + status: a, + error: r, + route: s, + form: i, +}) { + let o = "never"; + if (x && (t.pathname === x || t.pathname === x + "/")) o = "always"; + else + for (const f of n) + (f == null ? void 0 : f.slash) !== void 0 && (o = f.slash); + (t.pathname = He(t.pathname, o)), (t.search = t.search); + const c = { + type: "loaded", + state: { url: t, params: e, branch: n, error: r, route: s }, + props: { constructors: bn(n).map((f) => f.node.component), page: Zt(L) }, + }; + i !== void 0 && (c.props.form = i); + let l = {}, + d = !L, + p = 0; + for (let f = 0; f < Math.max(n.length, w.branch.length); f += 1) { + const m = n[f], + u = w.branch[f]; + (m == null ? void 0 : m.data) !== (u == null ? void 0 : u.data) && (d = !0), + m && + ((l = { ...l, ...m.data }), d && (c.props[`data_${p}`] = l), (p += 1)); + } + return ( + (!w.url || + t.href !== w.url.href || + w.error !== r || + (i !== void 0 && i !== L.form) || + d) && + (c.props.page = { + error: r, + params: e, + route: { id: (s == null ? void 0 : s.id) ?? null }, + state: {}, + status: a, + url: new URL(t), + form: i ?? null, + data: d ? l : L.data, + }), + c + ); +} +async function Wt({ + loader: t, + parent: e, + url: n, + params: a, + route: r, + server_data_node: s, +}) { + var d, p, y; + let i = null, + o = !0; + const c = { + dependencies: new Set(), + params: new Set(), + parent: !1, + route: !1, + url: !1, + search_params: new Set(), + }, + l = await t(); + if ((d = l.universal) != null && d.load) { + let f = function (...u) { + for (const h of u) { + const { href: A } = new URL(h, n); + c.dependencies.add(A); + } + }; + const m = { + tracing: { enabled: !1, root: ce, current: ce }, + route: new Proxy(r, { get: (u, h) => (o && (c.route = !0), u[h]) }), + params: new Proxy(a, { get: (u, h) => (o && c.params.add(h), u[h]) }), + data: (s == null ? void 0 : s.data) ?? null, + url: ze( + n, + () => { + o && (c.url = !0); + }, + (u) => { + o && c.search_params.add(u); + }, + E.hash + ), + async fetch(u, h) { + u instanceof Request && + (h = { + body: + u.method === "GET" || u.method === "HEAD" + ? void 0 + : await u.blob(), + cache: u.cache, + credentials: u.credentials, + headers: + [...u.headers].length > 0 + ? u == null + ? void 0 + : u.headers + : void 0, + integrity: u.integrity, + keepalive: u.keepalive, + method: u.method, + mode: u.mode, + redirect: u.redirect, + referrer: u.referrer, + referrerPolicy: u.referrerPolicy, + signal: u.signal, + ...h, + }); + const { resolved: A, promise: R } = Ne(u, h, n); + return o && f(A.href), R; + }, + setHeaders: () => {}, + depends: f, + parent() { + return o && (c.parent = !0), e(); + }, + untrack(u) { + o = !1; + try { + return u(); + } finally { + o = !0; + } + }, + }; + i = (await l.universal.load.call(null, m)) ?? null; + } + return { + node: l, + loader: t, + server: s, + universal: + (p = l.universal) != null && p.load + ? { type: "data", data: i, uses: c } + : null, + data: i ?? (s == null ? void 0 : s.data) ?? null, + slash: + ((y = l.universal) == null ? void 0 : y.trailingSlash) ?? + (s == null ? void 0 : s.slash), + }; +} +function Ne(t, e, n) { + let a = t instanceof Request ? t.url : t; + const r = new URL(a, n); + r.origin === n.origin && (a = r.href.slice(n.origin.length)); + const s = wt ? tn(a, r.href, e) : Qe(a, e); + return { resolved: r, promise: s }; +} +function he(t, e, n, a, r, s) { + if (Yt) return !0; + if (!r) return !1; + if ((r.parent && t) || (r.route && e) || (r.url && n)) return !0; + for (const i of r.search_params) if (a.has(i)) return !0; + for (const i of r.params) if (s[i] !== w.params[i]) return !0; + for (const i of r.dependencies) if (yt.some((o) => o(new URL(i)))) return !0; + return !1; +} +function Jt(t, e) { + return (t == null ? void 0 : t.type) === "data" + ? t + : (t == null ? void 0 : t.type) === "skip" + ? e ?? null + : null; +} +function Dn(t, e) { + if (!t) return new Set(e.searchParams.keys()); + const n = new Set([...t.searchParams.keys(), ...e.searchParams.keys()]); + for (const a of n) { + const r = t.searchParams.getAll(a), + s = e.searchParams.getAll(a); + r.every((i) => s.includes(i)) && + s.every((i) => r.includes(i)) && + n.delete(a); + } + return n; +} +function pe({ error: t, url: e, route: n, params: a }) { + return { + type: "loaded", + state: { error: t, url: e, route: n, params: a, branch: [] }, + props: { page: Zt(L), constructors: [] }, + }; +} +async function Oe({ + id: t, + invalidating: e, + url: n, + params: a, + route: r, + preload: s, +}) { + if ((T == null ? void 0 : T.id) === t) return J.delete(T.token), T.promise; + const { errors: i, layouts: o, leaf: c } = r, + l = [...o, c]; + i.forEach((g) => (g == null ? void 0 : g().catch(() => {}))), + l.forEach((g) => (g == null ? void 0 : g[1]().catch(() => {}))); + let d = null; + const p = w.url ? t !== bt(w.url) : !1, + y = w.route ? r.id !== w.route.id : !1, + f = Dn(w.url, n); + let m = !1; + const u = l.map((g, _) => { + var D; + const v = w.branch[_], + k = + !!(g != null && g[0]) && + ((v == null ? void 0 : v.loader) !== g[1] || + he(m, y, p, f, (D = v.server) == null ? void 0 : D.uses, a)); + return k && (m = !0), k; + }); + if (u.some(Boolean)) { + try { + d = await De(n, u); + } catch (g) { + const _ = await H(g, { url: n, params: a, route: { id: t } }); + return J.has(s) + ? pe({ error: _, url: n, params: a, route: r }) + : St({ status: gt(g), error: _, url: n, route: r }); + } + if (d.type === "redirect") return d; + } + const h = d == null ? void 0 : d.nodes; + let A = !1; + const R = l.map(async (g, _) => { + var It; + if (!g) return; + const v = w.branch[_], + k = h == null ? void 0 : h[_]; + if ( + (!k || k.type === "skip") && + g[1] === (v == null ? void 0 : v.loader) && + !he(A, y, p, f, (It = v.universal) == null ? void 0 : It.uses, a) + ) + return v; + if (((A = !0), (k == null ? void 0 : k.type) === "error")) throw k; + return Wt({ + loader: g[1], + url: n, + params: a, + route: r, + parent: async () => { + var te; + const Qt = {}; + for (let Lt = 0; Lt < _; Lt += 1) + Object.assign(Qt, (te = await R[Lt]) == null ? void 0 : te.data); + return Qt; + }, + server_data_node: Jt( + k === void 0 && g[0] ? { type: "skip" } : k ?? null, + g[0] ? (v == null ? void 0 : v.server) : void 0 + ), + }); + }); + for (const g of R) g.catch(() => {}); + const I = []; + for (let g = 0; g < l.length; g += 1) + if (l[g]) + try { + I.push(await R[g]); + } catch (_) { + if (_ instanceof Ft) return { type: "redirect", location: _.location }; + if (J.has(s)) + return pe({ + error: await H(_, { params: a, url: n, route: { id: r.id } }), + url: n, + params: a, + route: r, + }); + let v = gt(_), + k; + if (h != null && h.includes(_)) (v = _.status ?? v), (k = _.error); + else if (_ instanceof Et) k = _.body; + else { + if (await $.updated.check()) return await Le(), await K(n); + k = await H(_, { params: a, url: n, route: { id: r.id } }); + } + const D = await Fn(g, I, i); + return D + ? vt({ + url: n, + params: a, + branch: I.slice(0, D.idx).concat(D.node), + status: v, + error: k, + route: r, + }) + : await $e(n, { id: r.id }, k, v); + } + else I.push(void 0); + return vt({ + url: n, + params: a, + branch: I, + status: 200, + error: null, + route: r, + form: e ? void 0 : null, + }); +} +async function Fn(t, e, n) { + for (; t--; ) + if (n[t]) { + let a = t; + for (; !e[a]; ) a -= 1; + try { + return { + idx: a + 1, + node: { + node: await n[t](), + loader: n[t], + data: {}, + server: null, + universal: null, + }, + }; + } catch { + continue; + } + } +} +async function St({ status: t, error: e, url: n, route: a }) { + const r = {}; + let s = null; + if (E.server_loads[0] === 0) + try { + const o = await De(n, [!0]); + if (o.type !== "data" || (o.nodes[0] && o.nodes[0].type !== "data")) + throw 0; + s = o.nodes[0] ?? null; + } catch { + (n.origin !== dt || n.pathname !== location.pathname || Kt) && + (await K(n)); + } + try { + const o = await Wt({ + loader: Ot, + url: n, + params: r, + route: a, + parent: () => Promise.resolve({}), + server_data_node: Jt(s), + }), + c = { + node: await mt(), + loader: mt, + universal: null, + server: null, + data: null, + }; + return vt({ + url: n, + params: r, + branch: [o, c], + status: t, + error: e, + route: null, + }); + } catch (o) { + if (o instanceof Ft) return zt(new URL(o.location, location.href), {}, 0); + throw o; + } +} +async function Bn(t) { + const e = t.href; + if (ht.has(e)) return ht.get(e); + let n; + try { + const a = (async () => { + let r = + (await E.hooks.reroute({ + url: new URL(t), + fetch: async (s, i) => Ne(s, i, t).promise, + })) ?? t; + if (typeof r == "string") { + const s = new URL(t); + E.hash ? (s.hash = r) : (s.pathname = r), (r = s); + } + return r; + })(); + ht.set(e, a), (n = await a); + } catch { + ht.delete(e); + return; + } + return n; +} +async function Rt(t, e) { + if (t && !kt(t, x, E.hash)) { + const n = await Bn(t); + if (!n) return; + const a = Vn(n); + for (const r of Gt) { + const s = r.exec(a); + if (s) + return { id: bt(t), invalidating: e, route: r, params: Ye(s), url: t }; + } + } +} +function Vn(t) { + return ( + Ke( + E.hash + ? t.hash.replace(/^#/, "").replace(/[?#].+/, "") + : t.pathname.slice(x.length) + ) || "/" + ); +} +function bt(t) { + return (E.hash ? t.hash.replace(/^#/, "") : t.pathname) + t.search; +} +function je({ url: t, type: e, intent: n, delta: a }) { + let r = !1; + const s = Xt(w, n, t, e); + a !== void 0 && (s.navigation.delta = a); + const i = { + ...s.navigation, + cancel: () => { + (r = !0), s.reject(new Error("navigation cancelled")); + }, + }; + return et || Ht.forEach((o) => o(i)), r ? null : s; +} +async function X({ + type: t, + url: e, + popped: n, + keepfocus: a, + noscroll: r, + replace_state: s, + state: i = {}, + redirect_count: o = 0, + nav_token: c = {}, + accept: l = le, + block: d = le, +}) { + const p = B; + B = c; + const y = await Rt(e, !1), + f = + t === "enter" + ? Xt(w, y, e, t) + : je({ + url: e, + type: t, + delta: n == null ? void 0 : n.delta, + intent: y, + }); + if (!f) { + d(), B === c && (B = p); + return; + } + const m = S, + u = U; + l(), + (et = !0), + wt && + f.navigation.type !== "enter" && + $.navigating.set((Q.current = f.navigation)); + let h = y && (await Oe(y)); + if (!h) { + if (kt(e, x, E.hash)) return await K(e); + h = await $e( + e, + { id: null }, + await H(new Bt(404, "Not Found", `Not found: ${e.pathname}`), { + url: e, + params: {}, + route: { id: null }, + }), + 404 + ); + } + if (((e = (y == null ? void 0 : y.url) || e), B !== c)) + return f.reject(new Error("navigation aborted")), !1; + if (h.type === "redirect") + if (o >= 20) + h = await St({ + status: 500, + error: await H(new Error("Redirect loop"), { + url: e, + params: {}, + route: { id: null }, + }), + url: e, + route: { id: null }, + }); + else return await zt(new URL(h.location, e).href, {}, o + 1, c), !1; + else + h.props.page.status >= 400 && + (await $.updated.check()) && + (await Le(), await K(e)); + if ( + (jn(), + Mt(m), + xe(u), + h.props.page.url.pathname !== e.pathname && + (e.pathname = h.props.page.url.pathname), + (i = n ? n.state : i), + !n) + ) { + const g = s ? 0 : 1, + _ = { [G]: (S += g), [Z]: (U += g), [Ae]: i }; + (s ? history.replaceState : history.pushState).call(history, _, "", e), + s || Nn(S, U); + } + if (((T = null), (h.props.page.state = i), wt)) { + const g = ( + await Promise.all(Array.from(On, (_) => _(f.navigation))) + ).filter((_) => typeof _ == "function"); + if (g.length > 0) { + let _ = function () { + g.forEach((v) => { + W.delete(v); + }); + }; + g.push(_), + g.forEach((v) => { + W.add(v); + }); + } + (w = h.state), + h.props.page && (h.props.page.url = e), + Ue.$set(h.props), + Rn(h.props.page), + (Te = !0); + } else Ce(h, jt, !1); + const { activeElement: A } = document; + await Pn(); + const R = n ? n.scroll : r ? At() : null; + if (fe) { + const g = e.hash && document.getElementById(Be(e)); + R ? scrollTo(R.x, R.y) : g ? g.scrollIntoView() : scrollTo(0, 0); + } + const I = + document.activeElement !== A && document.activeElement !== document.body; + !a && !I && Yn(e), + (fe = !0), + h.props.page && Object.assign(L, h.props.page), + (et = !1), + t === "popstate" && Pe(U), + f.fulfil(void 0), + W.forEach((g) => g(f.navigation)), + $.navigating.set((Q.current = null)); +} +async function $e(t, e, n, a) { + return t.origin === dt && t.pathname === location.pathname && !Kt + ? await St({ status: a, error: n, url: t, route: e }) + : await K(t); +} +function qn() { + let t, e, n; + j.addEventListener("mousemove", (o) => { + const c = o.target; + clearTimeout(t), + (t = setTimeout(() => { + s(c, F.hover); + }, 20)); + }); + function a(o) { + o.defaultPrevented || s(o.composedPath()[0], F.tap); + } + j.addEventListener("mousedown", a), + j.addEventListener("touchstart", a, { passive: !0 }); + const r = new IntersectionObserver( + (o) => { + for (const c of o) + c.isIntersecting && (Ct(new URL(c.target.href)), r.unobserve(c.target)); + }, + { threshold: 0 } + ); + async function s(o, c) { + const l = Se(o, j), + d = l === e && c >= n; + if (!l || d) return; + const { url: p, external: y, download: f } = Nt(l, x, E.hash); + if (y || f) return; + const m = pt(l), + u = p && bt(w.url) === bt(p); + if (!(m.reload || u)) + if (c <= m.preload_data) { + (e = l), (n = F.tap); + const h = await Rt(p, !1); + if (!h) return; + $n(h); + } else c <= m.preload_code && ((e = l), (n = c), Ct(p)); + } + function i() { + r.disconnect(); + for (const o of j.querySelectorAll("a")) { + const { url: c, external: l, download: d } = Nt(o, x, E.hash); + if (l || d) continue; + const p = pt(o); + p.reload || + (p.preload_code === F.viewport && r.observe(o), + p.preload_code === F.eager && Ct(c)); + } + } + W.add(i), i(); +} +function H(t, e) { + if (t instanceof Et) return t.body; + const n = gt(t), + a = kn(t); + return ( + E.hooks.handleError({ error: t, event: e, status: n, message: a }) ?? { + message: a, + } + ); +} +function Mn(t, e) { + xn( + () => ( + t.add(e), + () => { + t.delete(e); + } + ) + ); +} +function rr(t) { + Mn(Ht, t); +} +function ar(t, e = {}) { + return ( + (t = new URL(qt(t))), + t.origin !== dt + ? Promise.reject(new Error("goto: invalid URL")) + : zt(t, e, 0) + ); +} +function Gn(t) { + if (typeof t == "function") yt.push(t); + else { + const { href: e } = new URL(t, location.href); + yt.push((n) => n.href === e); + } +} +function Hn() { + var e; + (history.scrollRestoration = "manual"), + addEventListener("beforeunload", (n) => { + let a = !1; + if ((de(), !et)) { + const r = Xt(w, void 0, null, "leave"), + s = { + ...r.navigation, + cancel: () => { + (a = !0), r.reject(new Error("navigation cancelled")); + }, + }; + Ht.forEach((i) => i(s)); + } + a + ? (n.preventDefault(), (n.returnValue = "")) + : (history.scrollRestoration = "auto"); + }), + addEventListener("visibilitychange", () => { + document.visibilityState === "hidden" && de(); + }), + ((e = navigator.connection) != null && e.saveData) || qn(), + j.addEventListener("click", async (n) => { + if ( + n.button || + n.which !== 1 || + n.metaKey || + n.ctrlKey || + n.shiftKey || + n.altKey || + n.defaultPrevented + ) + return; + const a = Se(n.composedPath()[0], j); + if (!a) return; + const { url: r, external: s, target: i, download: o } = Nt(a, x, E.hash); + if (!r) return; + if (i === "_parent" || i === "_top") { + if (window.parent !== window) return; + } else if (i && i !== "_self") return; + const c = pt(a); + if ( + (!(a instanceof SVGAElement) && + r.protocol !== location.protocol && + !(r.protocol === "https:" || r.protocol === "http:")) || + o + ) + return; + const [d, p] = (E.hash ? r.hash.replace(/^#/, "") : r.href).split("#"), + y = d === Ut(location); + if (s || (c.reload && (!y || !p))) { + je({ url: r, type: "link" }) ? (et = !0) : n.preventDefault(); + return; + } + if (p !== void 0 && y) { + const [, f] = w.url.href.split("#"); + if (f === p) { + if ( + (n.preventDefault(), + p === "" || + (p === "top" && a.ownerDocument.getElementById("top") === null)) + ) + window.scrollTo({ top: 0 }); + else { + const m = a.ownerDocument.getElementById(decodeURIComponent(p)); + m && (m.scrollIntoView(), m.focus()); + } + return; + } + if (((Y = !0), Mt(S), t(r), !c.replace_state)) return; + Y = !1; + } + n.preventDefault(), + await new Promise((f) => { + requestAnimationFrame(() => { + setTimeout(f, 0); + }), + setTimeout(f, 100); + }), + await X({ + type: "link", + url: r, + keepfocus: c.keepfocus, + noscroll: c.noscroll, + replace_state: c.replace_state ?? r.href === location.href, + }); + }), + j.addEventListener("submit", (n) => { + if (n.defaultPrevented) return; + const a = HTMLFormElement.prototype.cloneNode.call(n.target), + r = n.submitter; + if ( + ((r == null ? void 0 : r.formTarget) || a.target) === "_blank" || + ((r == null ? void 0 : r.formMethod) || a.method) !== "get" + ) + return; + const o = new URL( + ((r == null ? void 0 : r.hasAttribute("formaction")) && + (r == null ? void 0 : r.formAction)) || + a.action + ); + if (kt(o, x, !1)) return; + const c = n.target, + l = pt(c); + if (l.reload) return; + n.preventDefault(), n.stopPropagation(); + const d = new FormData(c), + p = r == null ? void 0 : r.getAttribute("name"); + p && d.append(p, (r == null ? void 0 : r.getAttribute("value")) ?? ""), + (o.search = new URLSearchParams(d).toString()), + X({ + type: "form", + url: o, + keepfocus: l.keepfocus, + noscroll: l.noscroll, + replace_state: l.replace_state ?? o.href === location.href, + }); + }), + addEventListener("popstate", async (n) => { + var a; + if (!$t) { + if ((a = n.state) != null && a[G]) { + const r = n.state[G]; + if (((B = {}), r === S)) return; + const s = V[r], + i = n.state[Ae] ?? {}, + o = new URL(n.state[ln] ?? location.href), + c = n.state[Z], + l = w.url ? Ut(location) === Ut(w.url) : !1; + if (c === U && (Te || l)) { + i !== L.state && (L.state = i), + t(o), + (V[S] = At()), + s && scrollTo(s.x, s.y), + (S = r); + return; + } + const p = r - S; + await X({ + type: "popstate", + url: o, + popped: { state: i, scroll: s, delta: p }, + accept: () => { + (S = r), (U = c); + }, + block: () => { + history.go(-p); + }, + nav_token: B, + }); + } else if (!Y) { + const r = new URL(location.href); + t(r), E.hash && location.reload(); + } + } + }), + addEventListener("hashchange", () => { + Y && + ((Y = !1), + history.replaceState( + { ...history.state, [G]: ++S, [Z]: U }, + "", + location.href + )); + }); + for (const n of document.querySelectorAll("link")) + Cn.has(n.rel) && (n.href = n.href); + addEventListener("pageshow", (n) => { + n.persisted && $.navigating.set((Q.current = null)); + }); + function t(n) { + (w.url = L.url = n), $.page.set(Zt(L)), $.page.notify(); + } +} +async function Kn( + t, + { + status: e = 200, + error: n, + node_ids: a, + params: r, + route: s, + server_route: i, + data: o, + form: c, + } +) { + Kt = !0; + const l = new URL(location.href); + let d; + ({ params: r = {}, route: s = { id: null } } = (await Rt(l, !1)) || {}), + (d = Gt.find(({ id: f }) => f === s.id)); + let p, + y = !0; + try { + const f = a.map(async (u, h) => { + const A = o[h]; + return ( + A != null && A.uses && (A.uses = Fe(A.uses)), + Wt({ + loader: E.nodes[u], + url: l, + params: r, + route: s, + parent: async () => { + const R = {}; + for (let I = 0; I < h; I += 1) + Object.assign(R, (await f[I]).data); + return R; + }, + server_data_node: Jt(A), + }) + ); + }), + m = await Promise.all(f); + if (d) { + const u = d.layouts; + for (let h = 0; h < u.length; h++) u[h] || m.splice(h, 0, void 0); + } + p = vt({ + url: l, + params: r, + branch: m, + status: e, + error: n, + form: c, + route: d ?? null, + }); + } catch (f) { + if (f instanceof Ft) { + await K(new URL(f.location, location.href)); + return; + } + (p = await St({ + status: gt(f), + error: await H(f, { url: l, params: r, route: s }), + url: l, + route: s, + })), + (t.textContent = ""), + (y = !1); + } + p.props.page && (p.props.page.state = {}), Ce(p, t, y); +} +async function De(t, e) { + var s; + const n = new URL(t); + (n.pathname = Tn(t.pathname)), + t.pathname.endsWith("/") && n.searchParams.append(An, "1"), + n.searchParams.append(En, e.map((i) => (i ? "1" : "0")).join("")); + const a = window.fetch, + r = await a(n.href, {}); + if (!r.ok) { + let i; + throw ( + ((s = r.headers.get("content-type")) != null && + s.includes("application/json") + ? (i = await r.json()) + : r.status === 404 + ? (i = "Not Found") + : r.status === 500 && (i = "Internal Error"), + new Et(r.status, i)) + ); + } + return new Promise(async (i) => { + var p; + const o = new Map(), + c = r.body.getReader(); + function l(y) { + return wn(y, { + ...E.decoders, + Promise: (f) => + new Promise((m, u) => { + o.set(f, { fulfil: m, reject: u }); + }), + }); + } + let d = ""; + for (;;) { + const { done: y, value: f } = await c.read(); + if (y && !d) break; + for ( + d += + !f && d + ? ` +` + : Je.decode(f, { stream: !0 }); + ; + + ) { + const m = d.indexOf(` +`); + if (m === -1) break; + const u = JSON.parse(d.slice(0, m)); + if (((d = d.slice(m + 1)), u.type === "redirect")) return i(u); + if (u.type === "data") + (p = u.nodes) == null || + p.forEach((h) => { + (h == null ? void 0 : h.type) === "data" && + ((h.uses = Fe(h.uses)), (h.data = l(h.data))); + }), + i(u); + else if (u.type === "chunk") { + const { id: h, data: A, error: R } = u, + I = o.get(h); + o.delete(h), R ? I.reject(l(R)) : I.fulfil(l(A)); + } + } + } + }); +} +function Fe(t) { + return { + dependencies: new Set((t == null ? void 0 : t.dependencies) ?? []), + params: new Set((t == null ? void 0 : t.params) ?? []), + parent: !!(t != null && t.parent), + route: !!(t != null && t.route), + url: !!(t != null && t.url), + search_params: new Set((t == null ? void 0 : t.search_params) ?? []), + }; +} +let $t = !1; +function Yn(t) { + const e = document.querySelector("[autofocus]"); + if (e) e.focus(); + else { + const n = Be(t); + if (n && document.getElementById(n)) { + const { x: r, y: s } = At(); + setTimeout(() => { + const i = history.state; + ($t = !0), + location.replace(`#${n}`), + E.hash && location.replace(t.hash), + history.replaceState(i, "", t.hash), + scrollTo(r, s), + ($t = !1); + }); + } else { + const r = document.body, + s = r.getAttribute("tabindex"); + (r.tabIndex = -1), + r.focus({ preventScroll: !0, focusVisible: !1 }), + s !== null + ? r.setAttribute("tabindex", s) + : r.removeAttribute("tabindex"); + } + const a = getSelection(); + if (a && a.type !== "None") { + const r = []; + for (let s = 0; s < a.rangeCount; s += 1) r.push(a.getRangeAt(s)); + setTimeout(() => { + if (a.rangeCount === r.length) { + for (let s = 0; s < a.rangeCount; s += 1) { + const i = r[s], + o = a.getRangeAt(s); + if ( + i.commonAncestorContainer !== o.commonAncestorContainer || + i.startContainer !== o.startContainer || + i.endContainer !== o.endContainer || + i.startOffset !== o.startOffset || + i.endOffset !== o.endOffset + ) + return; + } + a.removeAllRanges(); + } + }); + } + } +} +function Xt(t, e, n, a) { + var c, l; + let r, s; + const i = new Promise((d, p) => { + (r = d), (s = p); + }); + return ( + i.catch(() => {}), + { + navigation: { + from: { + params: t.params, + route: { id: ((c = t.route) == null ? void 0 : c.id) ?? null }, + url: t.url, + }, + to: n && { + params: (e == null ? void 0 : e.params) ?? null, + route: { + id: + ((l = e == null ? void 0 : e.route) == null ? void 0 : l.id) ?? + null, + }, + url: n, + }, + willUnload: !e, + type: a, + complete: i, + }, + fulfil: r, + reject: s, + } + ); +} +function Zt(t) { + return { + data: t.data, + error: t.error, + form: t.form, + params: t.params, + route: t.route, + state: t.state, + status: t.status, + url: t.url, + }; +} +function zn(t) { + const e = new URL(t); + return (e.hash = decodeURIComponent(t.hash)), e; +} +function Be(t) { + let e; + if (E.hash) { + const [, , n] = t.hash.split("#", 3); + e = n ?? ""; + } else e = t.hash.slice(1); + return decodeURIComponent(e); +} +export { nr as a, rr as b, ar as g, Zn as l, L as p, $ as s }; diff --git a/frontend-backup/_app/immutable/chunks/D1ivTjwA.js b/frontend-backup/_app/immutable/chunks/D1ivTjwA.js deleted file mode 100644 index 61eb8ec..0000000 --- a/frontend-backup/_app/immutable/chunks/D1ivTjwA.js +++ /dev/null @@ -1,37 +0,0 @@ -import { u as d, v as g, w as i, x as m, y as v, z as l, A as p, B as b, C as h } from "./DUoKDNpf.js"; -function x(n = !1) { - const s = d, - e = s.l.u; - if (!e) return; - let r = () => b(s.s); - if (n) { - let o = 0, - t = {}; - const _ = h(() => { - let c = !1; - const a = s.s; - for (const f in a) a[f] !== t[f] && ((t[f] = a[f]), (c = !0)); - return c && o++, o; - }); - r = () => p(_); - } - e.b.length && - g(() => { - u(s, r), l(e.b); - }), - i(() => { - const o = m(() => e.m.map(v)); - return () => { - for (const t of o) typeof t == "function" && t(); - }; - }), - e.a.length && - i(() => { - u(s, r), l(e.a); - }); -} -function u(n, s) { - if (n.l.s) for (const e of n.l.s) p(e); - s(); -} -export { x as i }; diff --git a/frontend-backup/_app/immutable/chunks/D2m5UD3G.js b/frontend-backup/_app/immutable/chunks/D2m5UD3G.js deleted file mode 100644 index a0fc948..0000000 --- a/frontend-backup/_app/immutable/chunks/D2m5UD3G.js +++ /dev/null @@ -1,79 +0,0 @@ -import { b8 as M, A as E, W as D, F as n, x as m, b9 as w, G as u } from "./DUoKDNpf.js"; -function C(q) { - let V = 0, - A = D(0), - o; - return () => { - M() && - (E(A), - n( - () => ( - V === 0 && (o = m(() => q(() => w(A)))), - (V += 1), - () => { - u(() => { - (V -= 1), V === 0 && (o == null || o(), (o = void 0), w(A)); - }); - } - ) - )); - }; -} -const Y = - "data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYwLjE2LjEwMAAAAAAAAAAAAAAA//tAwAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAAEAAAHPAB+fn5+fn5+fn5+fn5+fn5+fn5+fn5+fn6pqampqampqampqampqampqampqampqamp29vb29vb29vb29vb29vb29vb29vb29vb2/////////////////////////////////8AAAAATGF2YzYwLjMxAAAAAAAAAAAAAAAAJANgAAAAAAAABzxmm4psAAAAAAD/+8DEAAAF7A1FtDAAIzil6D87kgAAAktuqNu7gOcCAAgEATB8HzcHwfB8+DgIROD4ABAEAQOeCH/iAMXLB9//BB3Lg+AAIgJwBCSoyQ0QES1dNwAYhicYDAiarL8aXE4ZXwYe9BkCgLS/Dg4MKQDMkgCjAiAxujyCQPmFYGBApKtkawq2qi9GqTYgLTpFiGdI9O1D5NmvVykb4Q0iC3QOU5rUBLCQ9IoJWFutwdm2v5UmUWmoy2K9QxuXw5RxuOwA2j2ytp2dZrWp2A2/kMupbmC5HKc2et0mbjSyeld35/luxXs97SW4/JJiln38v54TdWITN+nq3a1Pq93WW/3/vNLLf/////K6sDGP////6PvWxQBFoFJABHMZRCBoQGHo/GW6NG17vGW1Zm25xgoZkkHEXiCgHb9v4bi8evlnFw5BStnezI76WTtDaVvOnLL8s9+1t95y7trVqdf0zfXXtpb2dzNrj94XquvZ0M/NLX6l+vktgwC4jICYwfNAuho0IiQuj////9r102AEMKOmGkMYagJIsBaYDIChgOgJiENow+wojIdUMMSQEYSBUTMZQb0o8Sk0SAjR1t5HOrfQNex7cq0ENSD4pyGX7X0xZTZxIYcKtF3mZptVyMvMJudNbJV6UKXY/pfr32nNn0c5rcEZq6nJYnCORDbENctTk5KWZdS63RUTWFzZVbMV3mt6vHJyziusGx5zczaCWWIN////qcOYSSNcFwyUIAAjtY6tsg5hoaQgzCTEAExUCDBozfYO8qSY3T3MLBgMXFAyoIjSiUtF/0DIhCIBgG52VxKVSh3n1s08dh16HvYXJ8JdlBMxTY839i3jR8vtSlsKfeK0NnC/nM0tLW7FK8/Tyq3KYLswxTDQEYZQZBHdQsioRGajdWcNkfpNOahWTpUJEDyc9LCQ0gcfR2T8/////////2zGWVnTPOpjElOJxIKDcdxGcttHMdDk5//7cMTkAA8Uz0Nd1gAigaJm6eyxPIZMDGR0PEgIGrR49MVAZAmYoKJjqJJImBhKP02+o9Jznif5eVT2eHC0ysbdDWHcRBDdQtNsGHz5fw8l282p0U6XSlewoyfTz751qsNZZnm32XJ+unFUNjmoX7ZOpHcZdMd7QbwNu3WpMQZplTGVCmaoMR34247bm1mKtcK2aK+iQ4ivzjUezP///5geOSUMiJ4hUgCgC0K1WiCQN8vbLG0AQADBIlTNsRCYEzAEsjEodxELxqxP5Q/JrC1wBDIwZKExnLAxQW8x7DEIOswwBYw/DkUH4DcJwDDAHaJgbsOBr7QGlBha6NwBiCDcgQQAxYAIUQGBKBYuBJEAcWJEnQDE4pIly4MoYoqAEDCUAPQRAxqkAJ5GoBgyB4RikbLIcbhtIX7/+4DE6YAUZaM7rZheonoiZ3a28ASIsGAgt7D+AWIjkDSGWD0hfqSddyAgLAQ5QaQn8QDHWOoB4AMjh6g6BZYagtVSTqMjpBSeF6RccsrkVJwiZEC0VjA1cjv+xgbI/0TEwQN0GdBn///9q1N/9v//0/VsitLemubODxzX2KfBVKuK49NlTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqv/7YMT0gCAhwyP52gAIAAA/w4AABKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqg==", - c = - "data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYwLjE2LjEwMAAAAAAAAAAAAAAA//tAwAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAAGAAAMOQBTU1NTU1NTU1NTU1NTU1NTj4+Pj4+Pj4+Pj4+Pj4+Pj4+xsbGxsbGxsbGxsbGxsbGx09PT09PT09PT09PT09PT09Px8fHx8fHx8fHx8fHx8fHx8f////////////////////8AAAAATGF2YzYwLjMxAAAAAAAAAAAAAAAAJAUCAAAAAAAADDmA9uH8AAAAAAD/+9DEAAAGFANhtBAAJCSzLP89oJggAALb/tFAHjUCAYWGC58oo4CEuCAIOg4GP5fRBB15d/B8//BD/8oc4P+IDnJ//+D6gBACgHGGMmGGAYEAiEB0ibwcAGYcgfRhlAyGKWf0bXgNSIiUpgJg3mBeAkYsQk5hPADlmkJZgCgFBwUTEzBIAxEJQCATNDF2H2BixBVlEwlzUKFrGHDQ4nWyRnNV/JBAF1sDEsMohzGgb1m1JVzYdFHSaE+z0sgpe0s1EHDlczHIpHJOmtL6zKoYHgNBIYtd3lSww5V7OX45QY8sij7/LrY1GYxP03P1apXhgahit65dpdyplb2v7z7ucliN6mqU12tNv5LZV38sssdxGi1lXqZdmKamks5j8TpqXDHX63h3LH/h2U1L9zvftRHeOH/Py6bpM6lW/25d3y5z//7sqvZz3YGGIslXoQAHIFYzMVUYY9rMbh+/5sjC/CwNSMXUxAQnzJeWbMYkawxUCtzUoDaMEwMM0fxPzAdAuPZcmMwegmDAmBMMA8BgSBpMFkFQwXwCzAzABCQh40ymzMFK6DaBdtCcQIjSzGERXtMBEDDDSpcseAQEhixEHPYg6NDZwXRTdTCUwLOBYhlLW4WFgkbE7CgteafKb7vQa6DYlbENXIfIFCvkjkWkdR7769xUFK9KZHhoFVuiCNprTXJRpaoyJRYiET9UWY8+NuRNZLuP4x5KyHs4xBTdFlhhEcaW2q9IuwaTPsXudBEZLpy1XvE+qaqyIJa61KPTcDJaNWd5uzE24qnctYsd0no78+X/bZMhpjju4rljKjzGl415+7TzVy7T1ZXLu1r16IXZBQ41qe5Yq1p61S7q3pZR1LEssXJ/H696Uf//////z////////////////////9/+////v//1LFjuNy5nnnL7/K9/Dus7VzocWTAKABqutOI9GcW+3l4CgFOmDMDYYN4p4OCIBgV4YBiYAwFpq3hZDALhgJheGG2D6YKoYZg5gwGEgBkYNYFphwg6mA+AMYlIK4CFoVGGIjshzRKgYzTWXYlEJDkBhliAGCiAMloYkENCHeTEfJPsMAiEWY0DBKVRQGMQrCBiAdCsOAiMKbZE//vAxPoALdY1PfnsgE4Yxut/PaRBBkBQHBwyEGzhMscp7WbLObyLCAEzgto46sDc0rgggEBIxDipkdkxXZrtwett4ObmoG7jE2pw9G3QXC9jsuymLPw8+Dp08zJVtJWLBQJG3nrSxgCARXBfwsgoJJakNPUmFAz6ymVOgwSNwc6ag6cDI37WpSsgXpTpiTbQy8CvHbLKIKUt7T7MqL/QzSvVejWbO3fp6S7ZsVZRKOxuxRqQUoWJXZJJY21x/IELxq7kdLLy/1DNU1VlTQoJb1RVFZiXHpf6rq7239u7fuX62GX9y/8uf////2gdh+JHSWIYfycuSiWW99lD+SyX9+URic7/5XMu5frePP1lvGtj/PytbBWbABr+NiRItGCIZg4OGBEwWGCIWpNDACG7UImORRmNIaDwrs7AwMkQArQS6k8HiYGkkirYXFQmGxR5kKSL1vXKtUyFx4T5jhQmF+whaQHE6XGvt7M9GafHhRoOvuW1IDkdKMUZ5eBrb7dJoN6amnbmZvm+3j6HmLq2q4hRrPoisU5yqSPBmgtVsTXziNa2d7hPoVaZjRoi6ngsbErm9SqVxgVVm4VXr2C2q3dv/r/61mta1rW1vujknTRQ19msXVc7hV1Xdc11aLCBo2Cp271Uf/UywAnCzbS32pPGamAsBpzmFioQBhg2Kjh0LkBkdooCME6gqEIgGAhqxojES6MTe1pYSgiSBzhgqHpfxOpePB/UvWXorrSCCQqGUqVy0uO846vZssTbWJ/YawtY0CQrcgrcQnVkStzrDmSplOcGO38lU/mpJn4sku6RNJMm2k1Yqwa8rusvFCZaRw0KBUhgtU8YCxh95G8mz///6377jVbFW1Y56omg1G6bnd/2Vr59WaV2YBZ5qm2v+m3BwJkYsxMtgywTOKITz+fIw9AMyzAYcvSgJRZWuTBZq4azK6gjFhyJxe0dgFKx8IRmfJPW6u08V2P/+5DE4oAaRaNFvdeAAsG0ab22JiTl7NF5XJKE5dsm4vPXm6Vp3rDpGjOBKkSFe3tNFtG6rZ1o6etaX9rzx9mPbrMUFLulWK9+1DLhBufN1vOx3rNmWqypHsrBeU3SiTDox81vMIlVgiXRUa9Dgpk2nfyuz9XPvl6u1c3cpk/A/gWXVdXsKZXBVmZidJ7U7lfGRISlEwhspJOroN5MDRCFozSo4PRp7DISWzyrHd1z3RgefpIcgdcsShprMD4hP+0MVsLDjcJXKys6Ga7Vdl7WiCjaHxrG/heggmYMOVOzOrqmMWnJZWBYrE0hI1GiJhaLOom6fm+kSVXFl6GtlQOAiiaue/E3/uv7FWa7Ti8ANAywuHoKNr8jKF2IrBWEc850vaXja818T1SdxbQ5WtPQYaQOvHXB2UzZMnh3YGV4h11mtblaifpokQYKBhDoBSUA2QTWiIrygwiGBx7J7jE1bVtsyV4wd1WRHHsgERdqbejj9ZEPb1I1syno5xVYyItSRXNgmUjk6XaXP9RFIvQduMPeLKNpCYqKmTSaO1xS2vX/+5DE5wAWWYdL7OGHKtS0aD2WJpwoC6Vo3TPtsVJqLczSJW6nLWe+RU8BTMSrJkUQEdHH9dqd1O0OpFJOKgqiZTKguYTbSEZ99rpKJJtnm3TjjbEvBH4psoYppbHqapsFc3ZS/hfzUowoBRmADiGVLXY2VAdYfAY/sMWgT8XeFZEk1KwhLVgEpQ9PRt0vWswHOP82Jw7zyycVBYBRrQFUJoI5rUTRhNc4RDYMNCsEDQypQrQMKn0GqqG0mR4lFJMphLFERHUXhkUMcg955lJulY9lCeExa4xrbRdNmgCwQrKGs07zWarceJ+Go4kpwak1mqmoCi1NiZk92yHqaq4LpwY8gfZBMxcgV2VVI7klXnve3r7CxdUjIhOIY0jCclaBBxgQeIwRQgNrirEfKZTIFFHkKTagty/jclnF1Wc0TpHMznSpnMAvJECHAqiV61TJyRqvMEjVErnTUTkjVVVXlGwkbGV5bTcrDkiKgZMiVlPh1osSFHo1//+2yyRsV/VkTlkYROLMTROeJZIFMDhIMB3LbLbjSdaNDwEROyQUeLD/+4DE+QAXeZc97L0xaq2z5v2Emn0yAiJIKjB3X////9aSZKVLFkxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7QMTxA9NhPR3sPM5AAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV", - G = "" + new URL("../assets/notification.CPyrWqU1.mp3", import.meta.url).href, - l = - "data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYwLjE2LjEwMAAAAAAAAAAAAAAA//tAwAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAADAAAHVgCKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioru7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7///////////////////////////////////////////8AAAAATGF2YzYwLjMxAAAAAAAAAAAAAAAAJAUQAAAAAAAAB1ZvGw9zAAAAAAD/+9DEAAAGgANNtBAAJL5DKPc9kEkIAKVy6ZvTvjNiAEAQA4fwcOKBAED85LicHw/BAEHfg+D4f/B8Hwf/Ococ/lz//4P//lwfAAAQCzgEApUAchBICAMDwGwwpg3jDHA2MWkaAxCQqDAjBQMMoFYwVgLDCrX1NfwPQxajfTO/VkEYD4sAuYOwYBgPgBGmQOAYIgDoKER8AN4KNYgISnpehHt0X2WsksoO27zM1duB3IgimTpnXNwTefFr9ly4HYK1lgtE8a3uVY23SCpDEpz4xL3DZVTV8ZygdeB4X+GuX6sTh9sVNAzuwVTIUztBdnLL60VnPsrt8f+fw/LCUy2caLDNmzuzGatmcu97UsVIYilyxqUcpaSPSW63KzZucjnakuzw+zlc5nD7yfL5zPv59z7/dQ9EolEu9pf5V1Y1+7Eayl1qkt8rXLGdi5nz//////////////////9/r9dw1l39/+P73/7////rWr1PdwxvJCIEbNPJ1QmAABaCxKJEmLpurTGDFSAYMB0FQxfggyqAeYtYSphnAwmFmBIYTATyaZhFiAGFIEqY0hJ5wAIxmFKCgaFaihh9A1GSlMSJYunOGWWB6pdsMvN5kqIig49MYApkLhJxyjmgkA1gIGDp1/CEIOLNkht0Ag8+NWKWQOW+aivhGVsj00TCW4CiJWJKkYRECshrDX0vHCHosi1cqERxakomvtDHA2TIAyjt52yUsMz8EMpZDLYdbq3V0XSRtfmhWkyaFM+YpBSrxQBAx03pQHPND6exc0OKEQq3lvKqM9hSCVHlv0yVdJhNZf+1Nx2GYZbqxt2qLJ9GC00ETr2vY+tmMTrOqWWTEkkUeh27PYQFIWX0rcGmtAswPXlLzWp6IVZe/ssk8FZ02r16Xdz3hTwPHJu3DEos63dr2927GPfz3+sM+93/63n3u//D///3nv9/rX71v97/PHuGWv7z/1Uo+X7tNTZ91XyoaWnob1bs9Yp86oQUCZIAAwEB7VQIuyrSQANCQ2GhZMQQ4MOCHMFxAMRwkMAxlMHzDM9QQMAxabsYLC+aWdScYCCZCoabxBOZSGWZcE2FB0xAuPp4zhWswUOJAsxAQMFDR4qN//vAxOUALmI5MbnsgE1xwGT3O7ABhADArk1MFMSD0qUALTCIVTNZ6aumhCoZWXmZixYEi2Kiy35BH02oFLPGCg7rCgQDQYw4ZYE5yE1rTPX1YekYKAYsD1hgHKA0ZBWZkQVFFhX2gNE3fFvt411kDPlAE5BAAMrWnKUzkdUQ4GcKFNJrQ1beZZDA2TyBhzsLNlCcxIeBUAMBCRkBamhsy15MFpJFZV1ovs/V/u78Uh+bo5dMT3L0lpqC3Wi9mVXpPlvn5TNa1Vyq409e/b1XvY/9bHmF3O1dwt2u5ZY444Y8q2a2Ou5Zd/GzvHV7tu/cx5fzv587Xua5ewz1n3+91X/LPesO2M9Zb7c5n3eOHcb+5KDXnf0F87HySsMMMAEIAAAwaBkBfgCqAAS3goeAwxXwM3QBieI+IEf/E3Ckh6ID/mLENJk99YSErPrb/4uVDX/7Vo/+KKI1///VTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+yDE4AAIHGcJGUmAAAAANIOAAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV", - T = - "data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYwLjE2LjEwMAAAAAAAAAAAAAAA//tAwAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAAEAAAI3QBycnJycnJycnJycnJycnJycnJycnJycnK5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm59PT09PT09PT09PT09PT09PT09PT09PT09P////////////////////////////////8AAAAATGF2YzYwLjMxAAAAAAAAAAAAAAAAJAXYAAAAAAAACN2ptdwzAAAAAAD/+9DEAAAJjBddVDAAJStFZ/c3oAHsAAAv9gAXd3P0QDAw+CAIAmHxACAYiAEAxBAEAQ4gBAEz+kEInB/+CBz/xOD7ygPh/Lg++oHz+CYPwQcCAIAhEgIAhLggc/6jmUBBwYDgAAgBIGrmoUBoJAAQCBUMBBWGDoGBmKGKhhhpMhMQGoBioGGvvxvwgy04N6IQUmdDBQDvnjHlG+JAoUAmwMmCTHbmuEKgBQW7jclMhQWZAcv9dIGSmGMsSgRd0VUBU1RmMOAWHeKMtGa4y94rTlMBmpHGIAbuji3JwZDMx2lj0pqs4YY9lA/kh/uUft5ZY5W6WbltFbn8bcH2pjLr1JUodk1lbljO9+ssorGatFjfrSqo50VlkalfGlLqgJhzXoIMCCEJEtEijzLX4YVJetWGbmGNzC7fkcE42LSWqwyGKoXZay/sdorjcmJLBqBM6m7tfP+zNNKrdNKZbEYzhqnv38ufv8M9z9xNtIp31baCO0VLjciMtkjAWSsiUxfJlTcXtmoBfnW/+dpcJVjz///3rX4awyx/W////eWeX7+X3L16V28+W8iO0CqjViUAAANAi1nT82Ac3hwMDCwHAwZAaUAJAVGkwYXCoXBBgIMkAEDh+BQuYhBJgypmiLAYQc4R9TGAEfDUSzPBzAJ2YhBAMBr3BQnSpR4wYAIPAlpAoGYMC66Gj4sFlpd+Lw03N/5+rH33lUXYDLo/l2ETkCO23jd4fL4QTGbmVagdqkz7P3aapEHYdxU6K7J3K7g0oYAhwCXa5vCbd2kQogO07kOWH7wscpolKal/LszZr2aaez336enl7uV4Mh6VzW9dq0uVZ9pTLZTWl3/vfLmFFR43/qWKSXxu3LPzzr2n0pO/zGrLaufc61Ncq7qcztX8KXVX6meWW+fhzuGFPT53uflhhbz/eee6/f/8f+mmZSwFpT/Qa0pYyXzou7LH1cl3cdy3GVWv/+f+/+pyzHdSP1qiUiHMAAUekYSBMSDYxOMEjjCoBMRgUVAJhkIKblA/AIFT3AAPMCBExIJTP0XNQDEyENQEBQMcAtCC54ZQrCeRmRwkVGOTJkmBRidHNLhIDMiukUTNSMNCRKypesdImZGp//uwxMsAJrobW/nNAkvDvKe/uTAEbTSIwhySikgs6zkyaLPF4jRmS4RxeNzhkSSklqMj58wMi6RUujKkFOPPlw2IuQ0mzUiZiXDUulA2L6JgXbGqBus8tFBNF1LNjqzV0kjqJdNi8RY1POTRkTxsaIoWU6F0XdI2aia1qROosjSuamSSWa1OpKgZmqR0wfdaS29G3oo0aqkmajXpVG0MCU6jVv1cleeYfgQkb/+N60xMwRCUEZowyxDJigoNEAgZCI+NxMYB9nQJGDIZYqxxJAaQyyCxdGJxQ+XEqMMlJ28V0pgPCgvpUmro0i1ovnb0Y/uxLUqpctk8XMK2u29vW0W1vXkfbS02mNmtWHUq3+iswmo0kf2C3Qw58N7rLzC/zlkvWXOz9bM86er1sEK5i5T6zrdXVPwR13mbd1qd0E1ZrHWk0tfa3il6ftfna9lJnkJllh4OErkLOEADkKoRmSkSwEhAAAAGmU2ZtKoICpiIN00MmJD2ZfIg4EjBw/EYCRuApBOmSAy8WQwiM2aScPORlMJDAFEgq+s4ZkDoMBhhEMgEFN2Lld/ygAlULhcBDwCZumkj8MAOrjqqUBMSAbgCQQLxsCYlFmBNOx5v/BAMBgIRjDAUPARAND0yuVmr60X///6n4/aUCSBDg+xCAnZkzStVXq////8wYAEdygAlxlFE7WyS1uUSkUA0190X2i0R//////lNeNtBcCtJcnGrRWmzvVaWpKZbAUMzv///////JfjVeXRqHI088fxjl1ntWVVddmoah6al13K7DNbv/////////8vwl1uble3za5edmHotWgqKW2z0dLMy+Jb/+6DE5gAWNZNF9aYALOJBI385wADsSvlLqrZuVeSqI0j/Vo1amo1biU9EZValP48qy24qTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xDE1gPAAAGkHAAAIAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqg==", - p = - "data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYwLjE2LjEwMAAAAAAAAAAAAAAA//tAwAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAACAAAE/gDLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL//////////////////////////////////////////////////////////////////8AAAAATGF2YzYwLjMxAAAAAAAAAAAAAAAAJAOoAAAAAAAABP6u4u+sAAAAAAD/+9DEAAAGhC1UdGMAJM1C6nc34FFSaWP+7vYBAAEOAAiHPJp6YAwtNgQl3qDHKBgo4Th/wf/Lh/8H35R3/4IAg7//gh/+UOcPgABgAAAB0YnM2TIZDUkAGYOFBdqBQkadAmEAgiDTKD1BYUFTGA4LixoJUcUsGkDJrfwYKEmBDRg+gZmBSBeYUQyJj2B9mAOAkYXINwOA3cdvzIrBtMDwFYOAEMZhFcyRwWTDiAGWo/LzSFp7vtDTSQ3bHKocXbPR6kg2U07Vs4KcJaDIIGTHZxDsSjEMyhPing6w8PSYAlwHfdtbFq3lAc1qmqzPxFFV1cbUkrP9GG/cbKIyivlRWq1mzvHDWNad73eE7q3JYPnIerXqKJTtzV3DmUzLZZFM7sv1z9U8czh5wVG4G3nru8cfyy+rhT5TtHTb7jzd3eWO6Wmy3R3e6/DW9b5l/b9e5///87///eY////9///////Df7/8vx/Xf///9f///52O6s3rZINILq82aqo6x1TAYDoYGInIIhASA++E8wYSIkIBd0NdJXDHQL2vFAR4YOsgwGFK6QQiPQDhcITBl4MWgDBEAosgZUgoDGkAwGFAMCCEDEQVAwaOgMChwEQXAwUBg5MTgJcAwARZxBj4Ng0LAigBGYdKKwKBIeIQDHCyhWxMlUmTx0xUCgJFBjnkGFkpk0ZF4gSLLRZJKGARbBQAsZDCCFAhxianDEuspVXRkOUWCGGCYsxZiXa0Ukl/8XOS4vxxjrDJR7RLyeiisxJn//y+11pJqNycOJkgiapIoo0UdS0dL//sUjzHxMgBgMUtVdLRYGrKTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq//tgxOMAHVGjN7magIAAADSDgAAEqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq", - I = d(); -function d() { - const q = { plop: new Audio(l), smallPlop: new Audio(p), bigPlop: new Audio(Y), smallDropplet: new Audio(T), droppletAndPlop: new Audio(c), notification1: new Audio(G) }; - for (const V of Object.values(q)) (V.preload = "auto"), (V.volume = 0.3); - return q; -} -let t; -function L(q) { - return (t = q), i({ type: "previewPixels", data: q }); -} -function U() { - return (t = void 0), i({ type: "clearPixelPreview" }); -} -function J(q) { - return i({ type: "paintPixels", data: q }); -} -async function Q() { - t || (await i({ type: "clearPixelPreview" })); -} -function i(q) { - const V = Math.random(), - A = { ...q, id: V }; - return new Promise((o, s) => { - try { - const a = navigator.serviceWorker; - a || o(new Error("You're an using an older browser, some features might not work. Consider updating or changing browser.")); - const B = (g) => { - var e; - ((e = g.data) == null ? void 0 : e.id) === V && (o(void 0), a.removeEventListener("message", B)); - }; - a.addEventListener("message", B); - const r = navigator.serviceWorker.controller; - r - ? r.postMessage(A) - : navigator.serviceWorker.ready.then((g) => { - const e = g.active; - e ? e == null || e.postMessage(A) : o(new Error("Service worker registration not active")); - }); - } catch (a) { - s(a); - } - }); -} -function W({ pixel: q, season: V, tile: A }) { - return `t=(${A[0]},${A[1]});p=(${q[0]},${q[1]});s=${V}`; -} -export { I as A, U as a, J as b, C as c, W as g, L as p, Q as s }; diff --git a/frontend-backup/_app/immutable/chunks/D35KiPL1.js b/frontend-backup/_app/immutable/chunks/D35KiPL1.js deleted file mode 100644 index 591fd19..0000000 --- a/frontend-backup/_app/immutable/chunks/D35KiPL1.js +++ /dev/null @@ -1,2 +0,0 @@ -import { al as a } from "./DUoKDNpf.js"; -a(); diff --git a/frontend-backup/_app/immutable/chunks/D3yDgRbd.js b/frontend-backup/_app/immutable/chunks/D3yDgRbd.js new file mode 100644 index 0000000..1e1086c --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/D3yDgRbd.js @@ -0,0 +1,97 @@ +import "./Ch2Ub8FX.js"; +import { + p as m, + f as c, + t as A, + b as f, + c as v, + d as y, + s as _, + r as h, +} from "./CMvZtFtm.js"; +import { p as w, i as x, r as E } from "./BF50aS-j.js"; +import { b as T, a as r, s as S } from "./C5yqZvKC.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + a = new e.Error().stack; + a && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[a] = "bfaa257f-561a-4221-9d82-ad8618895a89"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-bfaa257f-561a-4221-9d82-ad8618895a89")); + })(); +} catch {} +const B = + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAABJQTFRFAQEBAAAAHGHnRcxVStlbMXLnk8SHtQAAAAF0Uk5TAEDm2GYAAABMSURBVHjadc9JCgAhDERRa7r/lZs0ikawdv+tkvEYALS07U2QawmOTo1oQBKr8/cUMLY7JLEPYLW0oISSNLtgiojRBfv0AuB67vH3B+FjAY/0rrGiAAAAAElFTkSuQmCC"; +var L = c("FurryPlace"), + R = c('
        FurryPlace logo
        '); +function z(e, a) { + m(a, !0); + let t = w(a, "size", 3, "default"), + g = E(a, ["$$slots", "$$events", "$$legacy", "hasText", "size"]); + var l = R(); + T(l, () => ({ ...g, class: `flex items-center gap-1.5 ${a.class ?? ""}` })); + var i = y(l); + let o; + var p = _(i, 2); + { + var u = (s) => { + var d = L(); + let n; + A( + (b) => (n = r(d, 1, "text-base-content font-pixel", null, n, b)), + [ + () => ({ + "text-4xl": t() === "default", + "text-5xl": t() === "lg" || t() === "medium", + }), + ] + ), + f(s, d); + }; + x(p, (s) => { + a.hasText && s(u); + }); + } + h(l), + A( + (s) => { + (o = r(i, 1, "pixelated", null, o, s)), S(i, "src", B); + }, + [ + () => ({ + "size-10": t() === "default", + "size-16": t() === "medium", + "size-20": t() === "lg", + }), + ] + ), + f(e, l), + v(); +} +export { z as L }; diff --git a/frontend-backup/_app/immutable/chunks/D3yaN7Zl.js b/frontend-backup/_app/immutable/chunks/D3yaN7Zl.js new file mode 100644 index 0000000..3dcbe65 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/D3yaN7Zl.js @@ -0,0 +1,1354 @@ +var $e = Object.defineProperty; +var Re = (e) => { + throw TypeError(e); +}; +var eo = (e, o, r) => + o in e + ? $e(e, o, { enumerable: !0, configurable: !0, writable: !0, value: r }) + : (e[o] = r); +var Te = (e, o, r) => eo(e, typeof o != "symbol" ? o + "" : o, r), + ne = (e, o, r) => o.has(e) || Re("Cannot " + r); +var ae = (e, o, r) => ( + ne(e, o, "read from private field"), r ? r.call(e) : o.get(e) + ), + K = (e, o, r) => + o.has(e) + ? Re("Cannot add the same private member more than once") + : o instanceof WeakSet + ? o.add(e) + : o.set(e, r), + Pe = (e, o, r, t) => ( + ne(e, o, "write to private field"), t ? t.call(e, r) : o.set(e, r), r + ), + ie = (e, o, r) => (ne(e, o, "access private method"), r); +import "./Ch2Ub8FX.js"; +import { + p as Fe, + f as xe, + d as de, + r as me, + t as pe, + b as ue, + c as Ue, +} from "./CMvZtFtm.js"; +import { i as oo } from "./BF50aS-j.js"; +import { a as fe, c as ro, s as to } from "./C5yqZvKC.js"; +import { h as so } from "./DueIxFLX.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + o = new e.Error().stack; + o && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[o] = "1e957b58-5144-4041-9888-816ae37d90f2"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-1e957b58-5144-4041-9888-816ae37d90f2")); + })(); +} catch {} +const Ee = 9, + no = 95, + ao = 45, + Ge = 5; +function io(e) { + return e.split("").reduce((o, r) => (o ^ r.charCodeAt(0)) * -Ge, Ge) >>> 2; +} +function Be(e = "", o = no, r = ao, t = io) { + const a = t(e), + d = (a % Ee) * (360 / Ee); + return ( + [...Array(e ? 25 : 0)].reduce( + (l, u, i) => + a & (1 << i % 15) + ? l + + `` + : l, + `` + ) + "" + ); +} +var Ve, A, oe, D, H, be, je; +((Ve = globalThis.customElements) != null && Ve.get("minidenticon-svg")) || + (je = globalThis.customElements) == null || + je.define( + "minidenticon-svg", + ((A = class extends HTMLElement { + constructor() { + super(...arguments); + K(this, H); + K(this, D, !1); + } + connectedCallback() { + ie(this, H, be).call(this), Pe(this, D, !0); + } + attributeChangedCallback() { + ae(this, D) && ie(this, H, be).call(this); + } + }), + (oe = new WeakMap()), + (D = new WeakMap()), + (H = new WeakSet()), + (be = function () { + var a; + const r = A.observedAttributes.map((d) => this.getAttribute(d) || void 0), + t = r.join(","); + this.innerHTML = (a = ae(A, oe))[t] ?? (a[t] = Be(...r)); + }), + Te(A, "observedAttributes", ["username", "saturation", "lightness"]), + K(A, oe, {}), + A) + ); +var lo = xe("
        "); +function co(e, o) { + Fe(o, !0); + var r = lo(), + t = de(r); + so(t, () => Be(o.userId.toString(), 95, 45)), + me(r), + pe(() => fe(r, 1, `bg-base-200 minidenticon ${o.class ?? "" ?? ""}`)), + ue(e, r), + Ue(); +} +const ye = "-", + mo = (e) => { + const o = uo(e), + { conflictingClassGroups: r, conflictingClassGroupModifiers: t } = e; + return { + getClassGroupId: (l) => { + const u = l.split(ye); + return u[0] === "" && u.length !== 1 && u.shift(), We(u, o) || po(l); + }, + getConflictingClassGroupIds: (l, u) => { + const i = r[l] || []; + return u && t[l] ? [...i, ...t[l]] : i; + }, + }; + }, + We = (e, o) => { + var l; + if (e.length === 0) return o.classGroupId; + const r = e[0], + t = o.nextPart.get(r), + a = t ? We(e.slice(1), t) : void 0; + if (a) return a; + if (o.validators.length === 0) return; + const d = e.join(ye); + return (l = o.validators.find(({ validator: u }) => u(d))) == null + ? void 0 + : l.classGroupId; + }, + Le = /^\[(.+)\]$/, + po = (e) => { + if (Le.test(e)) { + const o = Le.exec(e)[1], + r = o == null ? void 0 : o.substring(0, o.indexOf(":")); + if (r) return "arbitrary.." + r; + } + }, + uo = (e) => { + const { theme: o, classGroups: r } = e, + t = { nextPart: new Map(), validators: [] }; + for (const a in r) ge(r[a], t, a, o); + return t; + }, + ge = (e, o, r, t) => { + e.forEach((a) => { + if (typeof a == "string") { + const d = a === "" ? o : _e(o, a); + d.classGroupId = r; + return; + } + if (typeof a == "function") { + if (fo(a)) { + ge(a(t), o, r, t); + return; + } + o.validators.push({ validator: a, classGroupId: r }); + return; + } + Object.entries(a).forEach(([d, l]) => { + ge(l, _e(o, d), r, t); + }); + }); + }, + _e = (e, o) => { + let r = e; + return ( + o.split(ye).forEach((t) => { + r.nextPart.has(t) || + r.nextPart.set(t, { nextPart: new Map(), validators: [] }), + (r = r.nextPart.get(t)); + }), + r + ); + }, + fo = (e) => e.isThemeGetter, + bo = (e) => { + if (e < 1) return { get: () => {}, set: () => {} }; + let o = 0, + r = new Map(), + t = new Map(); + const a = (d, l) => { + r.set(d, l), o++, o > e && ((o = 0), (t = r), (r = new Map())); + }; + return { + get(d) { + let l = r.get(d); + if (l !== void 0) return l; + if ((l = t.get(d)) !== void 0) return a(d, l), l; + }, + set(d, l) { + r.has(d) ? r.set(d, l) : a(d, l); + }, + }; + }, + he = "!", + we = ":", + go = we.length, + ho = (e) => { + const { prefix: o, experimentalParseClassName: r } = e; + let t = (a) => { + const d = []; + let l = 0, + u = 0, + i = 0, + f; + for (let y = 0; y < a.length; y++) { + let k = a[y]; + if (l === 0 && u === 0) { + if (k === we) { + d.push(a.slice(i, y)), (i = y + go); + continue; + } + if (k === "/") { + f = y; + continue; + } + } + k === "[" ? l++ : k === "]" ? l-- : k === "(" ? u++ : k === ")" && u--; + } + const h = d.length === 0 ? a : a.substring(i), + C = wo(h), + j = C !== h, + F = f && f > i ? f - i : void 0; + return { + modifiers: d, + hasImportantModifier: j, + baseClassName: C, + maybePostfixModifierPosition: F, + }; + }; + if (o) { + const a = o + we, + d = t; + t = (l) => + l.startsWith(a) + ? d(l.substring(a.length)) + : { + isExternal: !0, + modifiers: [], + hasImportantModifier: !1, + baseClassName: l, + maybePostfixModifierPosition: void 0, + }; + } + if (r) { + const a = t; + t = (d) => r({ className: d, parseClassName: a }); + } + return t; + }, + wo = (e) => + e.endsWith(he) + ? e.substring(0, e.length - 1) + : e.startsWith(he) + ? e.substring(1) + : e, + xo = (e) => { + const o = Object.fromEntries(e.orderSensitiveModifiers.map((t) => [t, !0])); + return (t) => { + if (t.length <= 1) return t; + const a = []; + let d = []; + return ( + t.forEach((l) => { + l[0] === "[" || o[l] ? (a.push(...d.sort(), l), (d = [])) : d.push(l); + }), + a.push(...d.sort()), + a + ); + }; + }, + yo = (e) => ({ + cache: bo(e.cacheSize), + parseClassName: ho(e), + sortModifiers: xo(e), + ...mo(e), + }), + ko = /\s+/, + vo = (e, o) => { + const { + parseClassName: r, + getClassGroupId: t, + getConflictingClassGroupIds: a, + sortModifiers: d, + } = o, + l = [], + u = e.trim().split(ko); + let i = ""; + for (let f = u.length - 1; f >= 0; f -= 1) { + const h = u[f], + { + isExternal: C, + modifiers: j, + hasImportantModifier: F, + baseClassName: y, + maybePostfixModifierPosition: k, + } = r(h); + if (C) { + i = h + (i.length > 0 ? " " + i : i); + continue; + } + let E = !!k, + I = t(E ? y.substring(0, k) : y); + if (!I) { + if (!E) { + i = h + (i.length > 0 ? " " + i : i); + continue; + } + if (((I = t(y)), !I)) { + i = h + (i.length > 0 ? " " + i : i); + continue; + } + E = !1; + } + const q = d(j).join(":"), + U = F ? q + he : q, + G = U + I; + if (l.includes(G)) continue; + l.push(G); + const L = a(I, E); + for (let R = 0; R < L.length; ++R) { + const B = L[R]; + l.push(U + B); + } + i = h + (i.length > 0 ? " " + i : i); + } + return i; + }; +function zo() { + let e = 0, + o, + r, + t = ""; + for (; e < arguments.length; ) + (o = arguments[e++]) && (r = De(o)) && (t && (t += " "), (t += r)); + return t; +} +const De = (e) => { + if (typeof e == "string") return e; + let o, + r = ""; + for (let t = 0; t < e.length; t++) + e[t] && (o = De(e[t])) && (r && (r += " "), (r += o)); + return r; +}; +function So(e, ...o) { + let r, + t, + a, + d = l; + function l(i) { + const f = o.reduce((h, C) => C(h), e()); + return (r = yo(f)), (t = r.cache.get), (a = r.cache.set), (d = u), u(i); + } + function u(i) { + const f = t(i); + if (f) return f; + const h = vo(i, r); + return a(i, h), h; + } + return function () { + return d(zo.apply(null, arguments)); + }; +} +const b = (e) => { + const o = (r) => r[e] || []; + return (o.isThemeGetter = !0), o; + }, + He = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, + qe = /^\((?:(\w[\w-]*):)?(.+)\)$/i, + Ao = /^\d+\/\d+$/, + Co = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, + Mo = + /\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$/, + Io = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, + Ro = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, + To = + /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, + N = (e) => Ao.test(e), + p = (e) => !!e && !Number.isNaN(Number(e)), + M = (e) => !!e && Number.isInteger(Number(e)), + le = (e) => e.endsWith("%") && p(e.slice(0, -1)), + S = (e) => Co.test(e), + Po = () => !0, + Eo = (e) => Mo.test(e) && !Io.test(e), + Je = () => !1, + Go = (e) => Ro.test(e), + Lo = (e) => To.test(e), + _o = (e) => !s(e) && !n(e), + No = (e) => O(e, Qe, Je), + s = (e) => He.test(e), + P = (e) => O(e, Ze, Eo), + ce = (e) => O(e, Uo, p), + Ne = (e) => O(e, Xe, Je), + Oo = (e) => O(e, Ye, Lo), + $ = (e) => O(e, Ke, Go), + n = (e) => qe.test(e), + W = (e) => V(e, Ze), + Vo = (e) => V(e, Bo), + Oe = (e) => V(e, Xe), + jo = (e) => V(e, Qe), + Fo = (e) => V(e, Ye), + ee = (e) => V(e, Ke, !0), + O = (e, o, r) => { + const t = He.exec(e); + return t ? (t[1] ? o(t[1]) : r(t[2])) : !1; + }, + V = (e, o, r = !1) => { + const t = qe.exec(e); + return t ? (t[1] ? o(t[1]) : r) : !1; + }, + Xe = (e) => e === "position" || e === "percentage", + Ye = (e) => e === "image" || e === "url", + Qe = (e) => e === "length" || e === "size" || e === "bg-size", + Ze = (e) => e === "length", + Uo = (e) => e === "number", + Bo = (e) => e === "family-name", + Ke = (e) => e === "shadow", + Wo = () => { + const e = b("color"), + o = b("font"), + r = b("text"), + t = b("font-weight"), + a = b("tracking"), + d = b("leading"), + l = b("breakpoint"), + u = b("container"), + i = b("spacing"), + f = b("radius"), + h = b("shadow"), + C = b("inset-shadow"), + j = b("text-shadow"), + F = b("drop-shadow"), + y = b("blur"), + k = b("perspective"), + E = b("aspect"), + I = b("ease"), + q = b("animate"), + U = () => [ + "auto", + "avoid", + "all", + "avoid-page", + "page", + "left", + "right", + "column", + ], + G = () => [ + "center", + "top", + "bottom", + "left", + "right", + "top-left", + "left-top", + "top-right", + "right-top", + "bottom-right", + "right-bottom", + "bottom-left", + "left-bottom", + ], + L = () => [...G(), n, s], + R = () => ["auto", "hidden", "clip", "visible", "scroll"], + B = () => ["auto", "contain", "none"], + m = () => [n, s, i], + v = () => [N, "full", "auto", ...m()], + ke = () => [M, "none", "subgrid", n, s], + ve = () => ["auto", { span: ["full", M, n, s] }, M, n, s], + J = () => [M, "auto", n, s], + ze = () => ["auto", "min", "max", "fr", n, s], + re = () => [ + "start", + "end", + "center", + "between", + "around", + "evenly", + "stretch", + "baseline", + "center-safe", + "end-safe", + ], + _ = () => [ + "start", + "end", + "center", + "stretch", + "center-safe", + "end-safe", + ], + z = () => ["auto", ...m()], + T = () => [ + N, + "auto", + "full", + "dvw", + "dvh", + "lvw", + "lvh", + "svw", + "svh", + "min", + "max", + "fit", + ...m(), + ], + c = () => [e, n, s], + Se = () => [...G(), Oe, Ne, { position: [n, s] }], + Ae = () => ["no-repeat", { repeat: ["", "x", "y", "space", "round"] }], + Ce = () => ["auto", "cover", "contain", jo, No, { size: [n, s] }], + te = () => [le, W, P], + w = () => ["", "none", "full", f, n, s], + x = () => ["", p, W, P], + X = () => ["solid", "dashed", "dotted", "double"], + Me = () => [ + "normal", + "multiply", + "screen", + "overlay", + "darken", + "lighten", + "color-dodge", + "color-burn", + "hard-light", + "soft-light", + "difference", + "exclusion", + "hue", + "saturation", + "color", + "luminosity", + ], + g = () => [p, le, Oe, Ne], + Ie = () => ["", "none", y, n, s], + Y = () => ["none", p, n, s], + Q = () => ["none", p, n, s], + se = () => [p, n, s], + Z = () => [N, "full", ...m()]; + return { + cacheSize: 500, + theme: { + animate: ["spin", "ping", "pulse", "bounce"], + aspect: ["video"], + blur: [S], + breakpoint: [S], + color: [Po], + container: [S], + "drop-shadow": [S], + ease: ["in", "out", "in-out"], + font: [_o], + "font-weight": [ + "thin", + "extralight", + "light", + "normal", + "medium", + "semibold", + "bold", + "extrabold", + "black", + ], + "inset-shadow": [S], + leading: ["none", "tight", "snug", "normal", "relaxed", "loose"], + perspective: [ + "dramatic", + "near", + "normal", + "midrange", + "distant", + "none", + ], + radius: [S], + shadow: [S], + spacing: ["px", p], + text: [S], + "text-shadow": [S], + tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"], + }, + classGroups: { + aspect: [{ aspect: ["auto", "square", N, s, n, E] }], + container: ["container"], + columns: [{ columns: [p, s, n, u] }], + "break-after": [{ "break-after": U() }], + "break-before": [{ "break-before": U() }], + "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", + ], + sr: ["sr-only", "not-sr-only"], + 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: L() }], + overflow: [{ overflow: R() }], + "overflow-x": [{ "overflow-x": R() }], + "overflow-y": [{ "overflow-y": R() }], + overscroll: [{ overscroll: B() }], + "overscroll-x": [{ "overscroll-x": B() }], + "overscroll-y": [{ "overscroll-y": B() }], + position: ["static", "fixed", "absolute", "relative", "sticky"], + inset: [{ inset: v() }], + "inset-x": [{ "inset-x": v() }], + "inset-y": [{ "inset-y": v() }], + start: [{ start: v() }], + end: [{ end: v() }], + top: [{ top: v() }], + right: [{ right: v() }], + bottom: [{ bottom: v() }], + left: [{ left: v() }], + visibility: ["visible", "invisible", "collapse"], + z: [{ z: [M, "auto", n, s] }], + basis: [{ basis: [N, "full", "auto", u, ...m()] }], + "flex-direction": [ + { flex: ["row", "row-reverse", "col", "col-reverse"] }, + ], + "flex-wrap": [{ flex: ["nowrap", "wrap", "wrap-reverse"] }], + flex: [{ flex: [p, N, "auto", "initial", "none", s] }], + grow: [{ grow: ["", p, n, s] }], + shrink: [{ shrink: ["", p, n, s] }], + order: [{ order: [M, "first", "last", "none", n, s] }], + "grid-cols": [{ "grid-cols": ke() }], + "col-start-end": [{ col: ve() }], + "col-start": [{ "col-start": J() }], + "col-end": [{ "col-end": J() }], + "grid-rows": [{ "grid-rows": ke() }], + "row-start-end": [{ row: ve() }], + "row-start": [{ "row-start": J() }], + "row-end": [{ "row-end": J() }], + "grid-flow": [ + { "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"] }, + ], + "auto-cols": [{ "auto-cols": ze() }], + "auto-rows": [{ "auto-rows": ze() }], + gap: [{ gap: m() }], + "gap-x": [{ "gap-x": m() }], + "gap-y": [{ "gap-y": m() }], + "justify-content": [{ justify: [...re(), "normal"] }], + "justify-items": [{ "justify-items": [..._(), "normal"] }], + "justify-self": [{ "justify-self": ["auto", ..._()] }], + "align-content": [{ content: ["normal", ...re()] }], + "align-items": [{ items: [..._(), { baseline: ["", "last"] }] }], + "align-self": [{ self: ["auto", ..._(), { baseline: ["", "last"] }] }], + "place-content": [{ "place-content": re() }], + "place-items": [{ "place-items": [..._(), "baseline"] }], + "place-self": [{ "place-self": ["auto", ..._()] }], + p: [{ p: m() }], + px: [{ px: m() }], + py: [{ py: m() }], + ps: [{ ps: m() }], + pe: [{ pe: m() }], + pt: [{ pt: m() }], + pr: [{ pr: m() }], + pb: [{ pb: m() }], + pl: [{ pl: m() }], + m: [{ m: z() }], + mx: [{ mx: z() }], + my: [{ my: z() }], + ms: [{ ms: z() }], + me: [{ me: z() }], + mt: [{ mt: z() }], + mr: [{ mr: z() }], + mb: [{ mb: z() }], + ml: [{ ml: z() }], + "space-x": [{ "space-x": m() }], + "space-x-reverse": ["space-x-reverse"], + "space-y": [{ "space-y": m() }], + "space-y-reverse": ["space-y-reverse"], + size: [{ size: T() }], + w: [{ w: [u, "screen", ...T()] }], + "min-w": [{ "min-w": [u, "screen", "none", ...T()] }], + "max-w": [ + { "max-w": [u, "screen", "none", "prose", { screen: [l] }, ...T()] }, + ], + h: [{ h: ["screen", "lh", ...T()] }], + "min-h": [{ "min-h": ["screen", "lh", "none", ...T()] }], + "max-h": [{ "max-h": ["screen", "lh", ...T()] }], + "font-size": [{ text: ["base", r, W, P] }], + "font-smoothing": ["antialiased", "subpixel-antialiased"], + "font-style": ["italic", "not-italic"], + "font-weight": [{ font: [t, n, ce] }], + "font-stretch": [ + { + "font-stretch": [ + "ultra-condensed", + "extra-condensed", + "condensed", + "semi-condensed", + "normal", + "semi-expanded", + "expanded", + "extra-expanded", + "ultra-expanded", + le, + s, + ], + }, + ], + "font-family": [{ font: [Vo, s, o] }], + "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: [a, n, s] }], + "line-clamp": [{ "line-clamp": [p, "none", n, ce] }], + leading: [{ leading: [d, ...m()] }], + "list-image": [{ "list-image": ["none", n, s] }], + "list-style-position": [{ list: ["inside", "outside"] }], + "list-style-type": [{ list: ["disc", "decimal", "none", n, s] }], + "text-alignment": [ + { text: ["left", "center", "right", "justify", "start", "end"] }, + ], + "placeholder-color": [{ placeholder: c() }], + "text-color": [{ text: c() }], + "text-decoration": [ + "underline", + "overline", + "line-through", + "no-underline", + ], + "text-decoration-style": [{ decoration: [...X(), "wavy"] }], + "text-decoration-thickness": [ + { decoration: [p, "from-font", "auto", n, P] }, + ], + "text-decoration-color": [{ decoration: c() }], + "underline-offset": [{ "underline-offset": [p, "auto", n, s] }], + "text-transform": [ + "uppercase", + "lowercase", + "capitalize", + "normal-case", + ], + "text-overflow": ["truncate", "text-ellipsis", "text-clip"], + "text-wrap": [{ text: ["wrap", "nowrap", "balance", "pretty"] }], + indent: [{ indent: m() }], + "vertical-align": [ + { + align: [ + "baseline", + "top", + "middle", + "bottom", + "text-top", + "text-bottom", + "sub", + "super", + n, + s, + ], + }, + ], + whitespace: [ + { + whitespace: [ + "normal", + "nowrap", + "pre", + "pre-line", + "pre-wrap", + "break-spaces", + ], + }, + ], + break: [{ break: ["normal", "words", "all", "keep"] }], + wrap: [{ wrap: ["break-word", "anywhere", "normal"] }], + hyphens: [{ hyphens: ["none", "manual", "auto"] }], + content: [{ content: ["none", n, s] }], + "bg-attachment": [{ bg: ["fixed", "local", "scroll"] }], + "bg-clip": [{ "bg-clip": ["border", "padding", "content", "text"] }], + "bg-origin": [{ "bg-origin": ["border", "padding", "content"] }], + "bg-position": [{ bg: Se() }], + "bg-repeat": [{ bg: Ae() }], + "bg-size": [{ bg: Ce() }], + "bg-image": [ + { + bg: [ + "none", + { + linear: [ + { to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"] }, + M, + n, + s, + ], + radial: ["", n, s], + conic: [M, n, s], + }, + Fo, + Oo, + ], + }, + ], + "bg-color": [{ bg: c() }], + "gradient-from-pos": [{ from: te() }], + "gradient-via-pos": [{ via: te() }], + "gradient-to-pos": [{ to: te() }], + "gradient-from": [{ from: c() }], + "gradient-via": [{ via: c() }], + "gradient-to": [{ to: c() }], + rounded: [{ rounded: w() }], + "rounded-s": [{ "rounded-s": w() }], + "rounded-e": [{ "rounded-e": w() }], + "rounded-t": [{ "rounded-t": w() }], + "rounded-r": [{ "rounded-r": w() }], + "rounded-b": [{ "rounded-b": w() }], + "rounded-l": [{ "rounded-l": w() }], + "rounded-ss": [{ "rounded-ss": w() }], + "rounded-se": [{ "rounded-se": w() }], + "rounded-ee": [{ "rounded-ee": w() }], + "rounded-es": [{ "rounded-es": w() }], + "rounded-tl": [{ "rounded-tl": w() }], + "rounded-tr": [{ "rounded-tr": w() }], + "rounded-br": [{ "rounded-br": w() }], + "rounded-bl": [{ "rounded-bl": w() }], + "border-w": [{ border: x() }], + "border-w-x": [{ "border-x": x() }], + "border-w-y": [{ "border-y": x() }], + "border-w-s": [{ "border-s": x() }], + "border-w-e": [{ "border-e": x() }], + "border-w-t": [{ "border-t": x() }], + "border-w-r": [{ "border-r": x() }], + "border-w-b": [{ "border-b": x() }], + "border-w-l": [{ "border-l": x() }], + "divide-x": [{ "divide-x": x() }], + "divide-x-reverse": ["divide-x-reverse"], + "divide-y": [{ "divide-y": x() }], + "divide-y-reverse": ["divide-y-reverse"], + "border-style": [{ border: [...X(), "hidden", "none"] }], + "divide-style": [{ divide: [...X(), "hidden", "none"] }], + "border-color": [{ border: c() }], + "border-color-x": [{ "border-x": c() }], + "border-color-y": [{ "border-y": c() }], + "border-color-s": [{ "border-s": c() }], + "border-color-e": [{ "border-e": c() }], + "border-color-t": [{ "border-t": c() }], + "border-color-r": [{ "border-r": c() }], + "border-color-b": [{ "border-b": c() }], + "border-color-l": [{ "border-l": c() }], + "divide-color": [{ divide: c() }], + "outline-style": [{ outline: [...X(), "none", "hidden"] }], + "outline-offset": [{ "outline-offset": [p, n, s] }], + "outline-w": [{ outline: ["", p, W, P] }], + "outline-color": [{ outline: c() }], + shadow: [{ shadow: ["", "none", h, ee, $] }], + "shadow-color": [{ shadow: c() }], + "inset-shadow": [{ "inset-shadow": ["none", C, ee, $] }], + "inset-shadow-color": [{ "inset-shadow": c() }], + "ring-w": [{ ring: x() }], + "ring-w-inset": ["ring-inset"], + "ring-color": [{ ring: c() }], + "ring-offset-w": [{ "ring-offset": [p, P] }], + "ring-offset-color": [{ "ring-offset": c() }], + "inset-ring-w": [{ "inset-ring": x() }], + "inset-ring-color": [{ "inset-ring": c() }], + "text-shadow": [{ "text-shadow": ["none", j, ee, $] }], + "text-shadow-color": [{ "text-shadow": c() }], + opacity: [{ opacity: [p, n, s] }], + "mix-blend": [ + { "mix-blend": [...Me(), "plus-darker", "plus-lighter"] }, + ], + "bg-blend": [{ "bg-blend": Me() }], + "mask-clip": [ + { + "mask-clip": [ + "border", + "padding", + "content", + "fill", + "stroke", + "view", + ], + }, + "mask-no-clip", + ], + "mask-composite": [ + { mask: ["add", "subtract", "intersect", "exclude"] }, + ], + "mask-image-linear-pos": [{ "mask-linear": [p] }], + "mask-image-linear-from-pos": [{ "mask-linear-from": g() }], + "mask-image-linear-to-pos": [{ "mask-linear-to": g() }], + "mask-image-linear-from-color": [{ "mask-linear-from": c() }], + "mask-image-linear-to-color": [{ "mask-linear-to": c() }], + "mask-image-t-from-pos": [{ "mask-t-from": g() }], + "mask-image-t-to-pos": [{ "mask-t-to": g() }], + "mask-image-t-from-color": [{ "mask-t-from": c() }], + "mask-image-t-to-color": [{ "mask-t-to": c() }], + "mask-image-r-from-pos": [{ "mask-r-from": g() }], + "mask-image-r-to-pos": [{ "mask-r-to": g() }], + "mask-image-r-from-color": [{ "mask-r-from": c() }], + "mask-image-r-to-color": [{ "mask-r-to": c() }], + "mask-image-b-from-pos": [{ "mask-b-from": g() }], + "mask-image-b-to-pos": [{ "mask-b-to": g() }], + "mask-image-b-from-color": [{ "mask-b-from": c() }], + "mask-image-b-to-color": [{ "mask-b-to": c() }], + "mask-image-l-from-pos": [{ "mask-l-from": g() }], + "mask-image-l-to-pos": [{ "mask-l-to": g() }], + "mask-image-l-from-color": [{ "mask-l-from": c() }], + "mask-image-l-to-color": [{ "mask-l-to": c() }], + "mask-image-x-from-pos": [{ "mask-x-from": g() }], + "mask-image-x-to-pos": [{ "mask-x-to": g() }], + "mask-image-x-from-color": [{ "mask-x-from": c() }], + "mask-image-x-to-color": [{ "mask-x-to": c() }], + "mask-image-y-from-pos": [{ "mask-y-from": g() }], + "mask-image-y-to-pos": [{ "mask-y-to": g() }], + "mask-image-y-from-color": [{ "mask-y-from": c() }], + "mask-image-y-to-color": [{ "mask-y-to": c() }], + "mask-image-radial": [{ "mask-radial": [n, s] }], + "mask-image-radial-from-pos": [{ "mask-radial-from": g() }], + "mask-image-radial-to-pos": [{ "mask-radial-to": g() }], + "mask-image-radial-from-color": [{ "mask-radial-from": c() }], + "mask-image-radial-to-color": [{ "mask-radial-to": c() }], + "mask-image-radial-shape": [{ "mask-radial": ["circle", "ellipse"] }], + "mask-image-radial-size": [ + { + "mask-radial": [ + { closest: ["side", "corner"], farthest: ["side", "corner"] }, + ], + }, + ], + "mask-image-radial-pos": [{ "mask-radial-at": G() }], + "mask-image-conic-pos": [{ "mask-conic": [p] }], + "mask-image-conic-from-pos": [{ "mask-conic-from": g() }], + "mask-image-conic-to-pos": [{ "mask-conic-to": g() }], + "mask-image-conic-from-color": [{ "mask-conic-from": c() }], + "mask-image-conic-to-color": [{ "mask-conic-to": c() }], + "mask-mode": [{ mask: ["alpha", "luminance", "match"] }], + "mask-origin": [ + { + "mask-origin": [ + "border", + "padding", + "content", + "fill", + "stroke", + "view", + ], + }, + ], + "mask-position": [{ mask: Se() }], + "mask-repeat": [{ mask: Ae() }], + "mask-size": [{ mask: Ce() }], + "mask-type": [{ "mask-type": ["alpha", "luminance"] }], + "mask-image": [{ mask: ["none", n, s] }], + filter: [{ filter: ["", "none", n, s] }], + blur: [{ blur: Ie() }], + brightness: [{ brightness: [p, n, s] }], + contrast: [{ contrast: [p, n, s] }], + "drop-shadow": [{ "drop-shadow": ["", "none", F, ee, $] }], + "drop-shadow-color": [{ "drop-shadow": c() }], + grayscale: [{ grayscale: ["", p, n, s] }], + "hue-rotate": [{ "hue-rotate": [p, n, s] }], + invert: [{ invert: ["", p, n, s] }], + saturate: [{ saturate: [p, n, s] }], + sepia: [{ sepia: ["", p, n, s] }], + "backdrop-filter": [{ "backdrop-filter": ["", "none", n, s] }], + "backdrop-blur": [{ "backdrop-blur": Ie() }], + "backdrop-brightness": [{ "backdrop-brightness": [p, n, s] }], + "backdrop-contrast": [{ "backdrop-contrast": [p, n, s] }], + "backdrop-grayscale": [{ "backdrop-grayscale": ["", p, n, s] }], + "backdrop-hue-rotate": [{ "backdrop-hue-rotate": [p, n, s] }], + "backdrop-invert": [{ "backdrop-invert": ["", p, n, s] }], + "backdrop-opacity": [{ "backdrop-opacity": [p, n, s] }], + "backdrop-saturate": [{ "backdrop-saturate": [p, n, s] }], + "backdrop-sepia": [{ "backdrop-sepia": ["", p, n, s] }], + "border-collapse": [{ border: ["collapse", "separate"] }], + "border-spacing": [{ "border-spacing": m() }], + "border-spacing-x": [{ "border-spacing-x": m() }], + "border-spacing-y": [{ "border-spacing-y": m() }], + "table-layout": [{ table: ["auto", "fixed"] }], + caption: [{ caption: ["top", "bottom"] }], + transition: [ + { + transition: [ + "", + "all", + "colors", + "opacity", + "shadow", + "transform", + "none", + n, + s, + ], + }, + ], + "transition-behavior": [{ transition: ["normal", "discrete"] }], + duration: [{ duration: [p, "initial", n, s] }], + ease: [{ ease: ["linear", "initial", I, n, s] }], + delay: [{ delay: [p, n, s] }], + animate: [{ animate: ["none", q, n, s] }], + backface: [{ backface: ["hidden", "visible"] }], + perspective: [{ perspective: [k, n, s] }], + "perspective-origin": [{ "perspective-origin": L() }], + rotate: [{ rotate: Y() }], + "rotate-x": [{ "rotate-x": Y() }], + "rotate-y": [{ "rotate-y": Y() }], + "rotate-z": [{ "rotate-z": Y() }], + scale: [{ scale: Q() }], + "scale-x": [{ "scale-x": Q() }], + "scale-y": [{ "scale-y": Q() }], + "scale-z": [{ "scale-z": Q() }], + "scale-3d": ["scale-3d"], + skew: [{ skew: se() }], + "skew-x": [{ "skew-x": se() }], + "skew-y": [{ "skew-y": se() }], + transform: [{ transform: [n, s, "", "none", "gpu", "cpu"] }], + "transform-origin": [{ origin: L() }], + "transform-style": [{ transform: ["3d", "flat"] }], + translate: [{ translate: Z() }], + "translate-x": [{ "translate-x": Z() }], + "translate-y": [{ "translate-y": Z() }], + "translate-z": [{ "translate-z": Z() }], + "translate-none": ["translate-none"], + accent: [{ accent: c() }], + appearance: [{ appearance: ["none", "auto"] }], + "caret-color": [{ caret: c() }], + "color-scheme": [ + { + scheme: [ + "normal", + "dark", + "light", + "light-dark", + "only-dark", + "only-light", + ], + }, + ], + 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", + n, + s, + ], + }, + ], + "field-sizing": [{ "field-sizing": ["fixed", "content"] }], + "pointer-events": [{ "pointer-events": ["auto", "none"] }], + resize: [{ resize: ["none", "", "y", "x"] }], + "scroll-behavior": [{ scroll: ["auto", "smooth"] }], + "scroll-m": [{ "scroll-m": m() }], + "scroll-mx": [{ "scroll-mx": m() }], + "scroll-my": [{ "scroll-my": m() }], + "scroll-ms": [{ "scroll-ms": m() }], + "scroll-me": [{ "scroll-me": m() }], + "scroll-mt": [{ "scroll-mt": m() }], + "scroll-mr": [{ "scroll-mr": m() }], + "scroll-mb": [{ "scroll-mb": m() }], + "scroll-ml": [{ "scroll-ml": m() }], + "scroll-p": [{ "scroll-p": m() }], + "scroll-px": [{ "scroll-px": m() }], + "scroll-py": [{ "scroll-py": m() }], + "scroll-ps": [{ "scroll-ps": m() }], + "scroll-pe": [{ "scroll-pe": m() }], + "scroll-pt": [{ "scroll-pt": m() }], + "scroll-pr": [{ "scroll-pr": m() }], + "scroll-pb": [{ "scroll-pb": m() }], + "scroll-pl": [{ "scroll-pl": m() }], + "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"] }], + 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", n, s] }, + ], + fill: [{ fill: ["none", ...c()] }], + "stroke-w": [{ stroke: [p, W, P, ce] }], + stroke: [{ stroke: ["none", ...c()] }], + "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-x", + "border-w-y", + "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-x", + "border-color-y", + "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"], + translate: ["translate-x", "translate-y", "translate-none"], + "translate-none": [ + "translate", + "translate-x", + "translate-y", + "translate-z", + ], + "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"] }, + orderSensitiveModifiers: [ + "*", + "**", + "after", + "backdrop", + "before", + "details-content", + "file", + "first-letter", + "first-line", + "marker", + "placeholder", + "selection", + ], + }; + }, + Do = So(Wo); +var Ho = xe('User profile'), + qo = xe("
        "); +function $o(e, o) { + Fe(o, !0); + var r = qo(); + let t; + var a = de(r), + d = de(a); + { + var l = (i) => { + co(i, { + get userId() { + return o.userId; + }, + }); + }, + u = (i) => { + var f = Ho(); + pe(() => to(f, "src", o.pictureUrl)), ue(i, f); + }; + oo(d, (i) => { + o.pictureUrl ? i(u, !1) : i(l); + }); + } + me(a), + me(r), + pe( + (i, f) => { + (t = fe(r, 1, "avatar relative rounded-full", null, t, i)), fe(a, 1, f); + }, + [ + () => ({ "border-3": o.isSuspended, "border-red-500": o.isSuspended }), + () => ro(Do("border-base-300 size-20 rounded-full border-2", o.class)), + ] + ), + ue(e, r), + Ue(); +} +export { $o as P, co as a, Do as t }; diff --git a/frontend-backup/_app/immutable/chunks/DBSOMMI_.js b/frontend-backup/_app/immutable/chunks/DBSOMMI_.js new file mode 100644 index 0000000..c75080e --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/DBSOMMI_.js @@ -0,0 +1,84 @@ +import { g as z } from "./CV9xcpLq.js"; +(function () { + try { + var t = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + t.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var t = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + e = new t.Error().stack; + e && + ((t._sentryDebugIds = t._sentryDebugIds || {}), + (t._sentryDebugIds[e] = "dcdc3bc1-2905-4a7a-b382-b2ec639c05ea"), + (t._sentryDebugIdIdentifier = + "sentry-dbid-dcdc3bc1-2905-4a7a-b382-b2ec639c05ea")); + })(); +} catch {} +const C = () => "Timeout", + D = () => "Timeout", + M = (t = {}, e = {}) => ((e.locale ?? z()) === "en" ? C() : D()); +function q(t) { + const e = t - 1; + return e * e * e + 1; +} +function O(t, { from: e, to: r }, u = {}) { + var { + delay: h = 0, + duration: i = (n) => Math.sqrt(n) * 120, + easing: y = q, + } = u, + o = getComputedStyle(t), + g = o.transform === "none" ? "" : o.transform, + [d, s] = o.transformOrigin.split(" ").map(parseFloat); + (d /= t.clientWidth), (s /= t.clientHeight); + var f = H(t), + p = t.clientWidth / r.width / f, + v = t.clientHeight / r.height / f, + b = e.left + e.width * d, + m = e.top + e.height * s, + w = r.left + r.width * d, + x = r.top + r.height * s, + c = (b - w) * p, + l = (m - x) * v, + S = e.width / r.width, + _ = e.height / r.height; + return { + delay: h, + duration: typeof i == "function" ? i(Math.sqrt(c * c + l * l)) : i, + easing: y, + css: (n, a) => { + var T = a * c, + E = a * l, + I = n + a * S, + $ = n + a * _; + return `transform: ${g} translate(${T}px, ${E}px) scale(${I}, ${$});`; + }, + }; +} +function H(t) { + if ("currentCSSZoom" in t) return t.currentCSSZoom; + for (var e = t, r = 1; e !== null; ) + (r *= +getComputedStyle(e).zoom), (e = e.parentElement); + return r; +} +export { O as f, M as t }; diff --git a/frontend-backup/_app/immutable/chunks/DCxPsWiR.js b/frontend-backup/_app/immutable/chunks/DCxPsWiR.js deleted file mode 100644 index 64897f5..0000000 --- a/frontend-backup/_app/immutable/chunks/DCxPsWiR.js +++ /dev/null @@ -1,939 +0,0 @@ -var $e = Object.defineProperty; -var Re = (e) => { - throw TypeError(e); -}; -var eo = (e, o, r) => (o in e ? $e(e, o, { enumerable: !0, configurable: !0, writable: !0, value: r }) : (e[o] = r)); -var Te = (e, o, r) => eo(e, typeof o != "symbol" ? o + "" : o, r), - ne = (e, o, r) => o.has(e) || Re("Cannot " + r); -var ae = (e, o, r) => (ne(e, o, "read from private field"), r ? r.call(e) : o.get(e)), - K = (e, o, r) => (o.has(e) ? Re("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(e) : o.set(e, r)), - Pe = (e, o, r, t) => (ne(e, o, "write to private field"), t ? t.call(e, r) : o.set(e, r), r), - ie = (e, o, r) => (ne(e, o, "access private method"), r); -import "./B2cHk4HI.js"; -import { p as Fe, f as xe, d as de, r as me, t as pe, b as ue, c as Ue } from "./BDALf20I.js"; -import { i as oo } from "./Bke_korE.js"; -import { a as fe, c as ro, s as to } from "./BNZUboE0.js"; -import { h as so } from "./DV6L2nvf.js"; -(function () { - try { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - e.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - o = new e.Error().stack; - o && ((e._sentryDebugIds = e._sentryDebugIds || {}), (e._sentryDebugIds[o] = "528903a0-0bed-45f0-9252-4d79de448496"), (e._sentryDebugIdIdentifier = "sentry-dbid-528903a0-0bed-45f0-9252-4d79de448496")); - })(); -} catch {} -const Ee = 9, - no = 95, - ao = 45, - Ge = 5; -function io(e) { - return e.split("").reduce((o, r) => (o ^ r.charCodeAt(0)) * -Ge, Ge) >>> 2; -} -function Be(e = "", o = no, r = ao, t = io) { - const a = t(e), - d = (a % Ee) * (360 / Ee); - return ( - [...Array(e ? 25 : 0)].reduce( - (l, u, i) => (a & (1 << i % 15) ? l + `` : l), - `` - ) + "" - ); -} -var Ve, A, oe, D, H, be, je; -((Ve = globalThis.customElements) != null && Ve.get("minidenticon-svg")) || - (je = globalThis.customElements) == null || - je.define( - "minidenticon-svg", - ((A = class extends HTMLElement { - constructor() { - super(...arguments); - K(this, H); - K(this, D, !1); - } - connectedCallback() { - ie(this, H, be).call(this), Pe(this, D, !0); - } - attributeChangedCallback() { - ae(this, D) && ie(this, H, be).call(this); - } - }), - (oe = new WeakMap()), - (D = new WeakMap()), - (H = new WeakSet()), - (be = function () { - var a; - const r = A.observedAttributes.map((d) => this.getAttribute(d) || void 0), - t = r.join(","); - this.innerHTML = (a = ae(A, oe))[t] ?? (a[t] = Be(...r)); - }), - Te(A, "observedAttributes", ["username", "saturation", "lightness"]), - K(A, oe, {}), - A) - ); -var lo = xe("
        "); -function co(e, o) { - Fe(o, !0); - var r = lo(), - t = de(r); - so(t, () => Be(o.userId.toString(), 95, 45)), me(r), pe(() => fe(r, 1, `bg-base-200 minidenticon ${o.class ?? "" ?? ""}`)), ue(e, r), Ue(); -} -const ye = "-", - mo = (e) => { - const o = uo(e), - { conflictingClassGroups: r, conflictingClassGroupModifiers: t } = e; - return { - getClassGroupId: (l) => { - const u = l.split(ye); - return u[0] === "" && u.length !== 1 && u.shift(), We(u, o) || po(l); - }, - getConflictingClassGroupIds: (l, u) => { - const i = r[l] || []; - return u && t[l] ? [...i, ...t[l]] : i; - }, - }; - }, - We = (e, o) => { - var l; - if (e.length === 0) return o.classGroupId; - const r = e[0], - t = o.nextPart.get(r), - a = t ? We(e.slice(1), t) : void 0; - if (a) return a; - if (o.validators.length === 0) return; - const d = e.join(ye); - return (l = o.validators.find(({ validator: u }) => u(d))) == null ? void 0 : l.classGroupId; - }, - Le = /^\[(.+)\]$/, - po = (e) => { - if (Le.test(e)) { - const o = Le.exec(e)[1], - r = o == null ? void 0 : o.substring(0, o.indexOf(":")); - if (r) return "arbitrary.." + r; - } - }, - uo = (e) => { - const { theme: o, classGroups: r } = e, - t = { nextPart: new Map(), validators: [] }; - for (const a in r) ge(r[a], t, a, o); - return t; - }, - ge = (e, o, r, t) => { - e.forEach((a) => { - if (typeof a == "string") { - const d = a === "" ? o : _e(o, a); - d.classGroupId = r; - return; - } - if (typeof a == "function") { - if (fo(a)) { - ge(a(t), o, r, t); - return; - } - o.validators.push({ validator: a, classGroupId: r }); - return; - } - Object.entries(a).forEach(([d, l]) => { - ge(l, _e(o, d), r, t); - }); - }); - }, - _e = (e, o) => { - let r = e; - return ( - o.split(ye).forEach((t) => { - r.nextPart.has(t) || r.nextPart.set(t, { nextPart: new Map(), validators: [] }), (r = r.nextPart.get(t)); - }), - r - ); - }, - fo = (e) => e.isThemeGetter, - bo = (e) => { - if (e < 1) return { get: () => {}, set: () => {} }; - let o = 0, - r = new Map(), - t = new Map(); - const a = (d, l) => { - r.set(d, l), o++, o > e && ((o = 0), (t = r), (r = new Map())); - }; - return { - get(d) { - let l = r.get(d); - if (l !== void 0) return l; - if ((l = t.get(d)) !== void 0) return a(d, l), l; - }, - set(d, l) { - r.has(d) ? r.set(d, l) : a(d, l); - }, - }; - }, - he = "!", - we = ":", - go = we.length, - ho = (e) => { - const { prefix: o, experimentalParseClassName: r } = e; - let t = (a) => { - const d = []; - let l = 0, - u = 0, - i = 0, - f; - for (let y = 0; y < a.length; y++) { - let k = a[y]; - if (l === 0 && u === 0) { - if (k === we) { - d.push(a.slice(i, y)), (i = y + go); - continue; - } - if (k === "/") { - f = y; - continue; - } - } - k === "[" ? l++ : k === "]" ? l-- : k === "(" ? u++ : k === ")" && u--; - } - const h = d.length === 0 ? a : a.substring(i), - C = wo(h), - j = C !== h, - F = f && f > i ? f - i : void 0; - return { modifiers: d, hasImportantModifier: j, baseClassName: C, maybePostfixModifierPosition: F }; - }; - if (o) { - const a = o + we, - d = t; - t = (l) => (l.startsWith(a) ? d(l.substring(a.length)) : { isExternal: !0, modifiers: [], hasImportantModifier: !1, baseClassName: l, maybePostfixModifierPosition: void 0 }); - } - if (r) { - const a = t; - t = (d) => r({ className: d, parseClassName: a }); - } - return t; - }, - wo = (e) => (e.endsWith(he) ? e.substring(0, e.length - 1) : e.startsWith(he) ? e.substring(1) : e), - xo = (e) => { - const o = Object.fromEntries(e.orderSensitiveModifiers.map((t) => [t, !0])); - return (t) => { - if (t.length <= 1) return t; - const a = []; - let d = []; - return ( - t.forEach((l) => { - l[0] === "[" || o[l] ? (a.push(...d.sort(), l), (d = [])) : d.push(l); - }), - a.push(...d.sort()), - a - ); - }; - }, - yo = (e) => ({ cache: bo(e.cacheSize), parseClassName: ho(e), sortModifiers: xo(e), ...mo(e) }), - ko = /\s+/, - vo = (e, o) => { - const { parseClassName: r, getClassGroupId: t, getConflictingClassGroupIds: a, sortModifiers: d } = o, - l = [], - u = e.trim().split(ko); - let i = ""; - for (let f = u.length - 1; f >= 0; f -= 1) { - const h = u[f], - { isExternal: C, modifiers: j, hasImportantModifier: F, baseClassName: y, maybePostfixModifierPosition: k } = r(h); - if (C) { - i = h + (i.length > 0 ? " " + i : i); - continue; - } - let E = !!k, - I = t(E ? y.substring(0, k) : y); - if (!I) { - if (!E) { - i = h + (i.length > 0 ? " " + i : i); - continue; - } - if (((I = t(y)), !I)) { - i = h + (i.length > 0 ? " " + i : i); - continue; - } - E = !1; - } - const q = d(j).join(":"), - U = F ? q + he : q, - G = U + I; - if (l.includes(G)) continue; - l.push(G); - const L = a(I, E); - for (let R = 0; R < L.length; ++R) { - const B = L[R]; - l.push(U + B); - } - i = h + (i.length > 0 ? " " + i : i); - } - return i; - }; -function zo() { - let e = 0, - o, - r, - t = ""; - for (; e < arguments.length; ) (o = arguments[e++]) && (r = De(o)) && (t && (t += " "), (t += r)); - return t; -} -const De = (e) => { - if (typeof e == "string") return e; - let o, - r = ""; - for (let t = 0; t < e.length; t++) e[t] && (o = De(e[t])) && (r && (r += " "), (r += o)); - return r; -}; -function So(e, ...o) { - let r, - t, - a, - d = l; - function l(i) { - const f = o.reduce((h, C) => C(h), e()); - return (r = yo(f)), (t = r.cache.get), (a = r.cache.set), (d = u), u(i); - } - function u(i) { - const f = t(i); - if (f) return f; - const h = vo(i, r); - return a(i, h), h; - } - return function () { - return d(zo.apply(null, arguments)); - }; -} -const b = (e) => { - const o = (r) => r[e] || []; - return (o.isThemeGetter = !0), o; - }, - He = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, - qe = /^\((?:(\w[\w-]*):)?(.+)\)$/i, - Ao = /^\d+\/\d+$/, - Co = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, - Mo = /\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$/, - Io = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, - Ro = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, - To = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, - N = (e) => Ao.test(e), - p = (e) => !!e && !Number.isNaN(Number(e)), - M = (e) => !!e && Number.isInteger(Number(e)), - le = (e) => e.endsWith("%") && p(e.slice(0, -1)), - S = (e) => Co.test(e), - Po = () => !0, - Eo = (e) => Mo.test(e) && !Io.test(e), - Je = () => !1, - Go = (e) => Ro.test(e), - Lo = (e) => To.test(e), - _o = (e) => !s(e) && !n(e), - No = (e) => O(e, Qe, Je), - s = (e) => He.test(e), - P = (e) => O(e, Ze, Eo), - ce = (e) => O(e, Uo, p), - Ne = (e) => O(e, Xe, Je), - Oo = (e) => O(e, Ye, Lo), - $ = (e) => O(e, Ke, Go), - n = (e) => qe.test(e), - W = (e) => V(e, Ze), - Vo = (e) => V(e, Bo), - Oe = (e) => V(e, Xe), - jo = (e) => V(e, Qe), - Fo = (e) => V(e, Ye), - ee = (e) => V(e, Ke, !0), - O = (e, o, r) => { - const t = He.exec(e); - return t ? (t[1] ? o(t[1]) : r(t[2])) : !1; - }, - V = (e, o, r = !1) => { - const t = qe.exec(e); - return t ? (t[1] ? o(t[1]) : r) : !1; - }, - Xe = (e) => e === "position" || e === "percentage", - Ye = (e) => e === "image" || e === "url", - Qe = (e) => e === "length" || e === "size" || e === "bg-size", - Ze = (e) => e === "length", - Uo = (e) => e === "number", - Bo = (e) => e === "family-name", - Ke = (e) => e === "shadow", - Wo = () => { - const e = b("color"), - o = b("font"), - r = b("text"), - t = b("font-weight"), - a = b("tracking"), - d = b("leading"), - l = b("breakpoint"), - u = b("container"), - i = b("spacing"), - f = b("radius"), - h = b("shadow"), - C = b("inset-shadow"), - j = b("text-shadow"), - F = b("drop-shadow"), - y = b("blur"), - k = b("perspective"), - E = b("aspect"), - I = b("ease"), - q = b("animate"), - U = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], - G = () => ["center", "top", "bottom", "left", "right", "top-left", "left-top", "top-right", "right-top", "bottom-right", "right-bottom", "bottom-left", "left-bottom"], - L = () => [...G(), n, s], - R = () => ["auto", "hidden", "clip", "visible", "scroll"], - B = () => ["auto", "contain", "none"], - m = () => [n, s, i], - v = () => [N, "full", "auto", ...m()], - ke = () => [M, "none", "subgrid", n, s], - ve = () => ["auto", { span: ["full", M, n, s] }, M, n, s], - J = () => [M, "auto", n, s], - ze = () => ["auto", "min", "max", "fr", n, s], - re = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], - _ = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], - z = () => ["auto", ...m()], - T = () => [N, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...m()], - c = () => [e, n, s], - Se = () => [...G(), Oe, Ne, { position: [n, s] }], - Ae = () => ["no-repeat", { repeat: ["", "x", "y", "space", "round"] }], - Ce = () => ["auto", "cover", "contain", jo, No, { size: [n, s] }], - te = () => [le, W, P], - w = () => ["", "none", "full", f, n, s], - x = () => ["", p, W, P], - X = () => ["solid", "dashed", "dotted", "double"], - Me = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], - g = () => [p, le, Oe, Ne], - Ie = () => ["", "none", y, n, s], - Y = () => ["none", p, n, s], - Q = () => ["none", p, n, s], - se = () => [p, n, s], - Z = () => [N, "full", ...m()]; - return { - cacheSize: 500, - theme: { - animate: ["spin", "ping", "pulse", "bounce"], - aspect: ["video"], - blur: [S], - breakpoint: [S], - color: [Po], - container: [S], - "drop-shadow": [S], - ease: ["in", "out", "in-out"], - font: [_o], - "font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"], - "inset-shadow": [S], - leading: ["none", "tight", "snug", "normal", "relaxed", "loose"], - perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"], - radius: [S], - shadow: [S], - spacing: ["px", p], - text: [S], - "text-shadow": [S], - tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"], - }, - classGroups: { - aspect: [{ aspect: ["auto", "square", N, s, n, E] }], - container: ["container"], - columns: [{ columns: [p, s, n, u] }], - "break-after": [{ "break-after": U() }], - "break-before": [{ "break-before": U() }], - "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", - ], - sr: ["sr-only", "not-sr-only"], - 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: L() }], - overflow: [{ overflow: R() }], - "overflow-x": [{ "overflow-x": R() }], - "overflow-y": [{ "overflow-y": R() }], - overscroll: [{ overscroll: B() }], - "overscroll-x": [{ "overscroll-x": B() }], - "overscroll-y": [{ "overscroll-y": B() }], - position: ["static", "fixed", "absolute", "relative", "sticky"], - inset: [{ inset: v() }], - "inset-x": [{ "inset-x": v() }], - "inset-y": [{ "inset-y": v() }], - start: [{ start: v() }], - end: [{ end: v() }], - top: [{ top: v() }], - right: [{ right: v() }], - bottom: [{ bottom: v() }], - left: [{ left: v() }], - visibility: ["visible", "invisible", "collapse"], - z: [{ z: [M, "auto", n, s] }], - basis: [{ basis: [N, "full", "auto", u, ...m()] }], - "flex-direction": [{ flex: ["row", "row-reverse", "col", "col-reverse"] }], - "flex-wrap": [{ flex: ["nowrap", "wrap", "wrap-reverse"] }], - flex: [{ flex: [p, N, "auto", "initial", "none", s] }], - grow: [{ grow: ["", p, n, s] }], - shrink: [{ shrink: ["", p, n, s] }], - order: [{ order: [M, "first", "last", "none", n, s] }], - "grid-cols": [{ "grid-cols": ke() }], - "col-start-end": [{ col: ve() }], - "col-start": [{ "col-start": J() }], - "col-end": [{ "col-end": J() }], - "grid-rows": [{ "grid-rows": ke() }], - "row-start-end": [{ row: ve() }], - "row-start": [{ "row-start": J() }], - "row-end": [{ "row-end": J() }], - "grid-flow": [{ "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"] }], - "auto-cols": [{ "auto-cols": ze() }], - "auto-rows": [{ "auto-rows": ze() }], - gap: [{ gap: m() }], - "gap-x": [{ "gap-x": m() }], - "gap-y": [{ "gap-y": m() }], - "justify-content": [{ justify: [...re(), "normal"] }], - "justify-items": [{ "justify-items": [..._(), "normal"] }], - "justify-self": [{ "justify-self": ["auto", ..._()] }], - "align-content": [{ content: ["normal", ...re()] }], - "align-items": [{ items: [..._(), { baseline: ["", "last"] }] }], - "align-self": [{ self: ["auto", ..._(), { baseline: ["", "last"] }] }], - "place-content": [{ "place-content": re() }], - "place-items": [{ "place-items": [..._(), "baseline"] }], - "place-self": [{ "place-self": ["auto", ..._()] }], - p: [{ p: m() }], - px: [{ px: m() }], - py: [{ py: m() }], - ps: [{ ps: m() }], - pe: [{ pe: m() }], - pt: [{ pt: m() }], - pr: [{ pr: m() }], - pb: [{ pb: m() }], - pl: [{ pl: m() }], - m: [{ m: z() }], - mx: [{ mx: z() }], - my: [{ my: z() }], - ms: [{ ms: z() }], - me: [{ me: z() }], - mt: [{ mt: z() }], - mr: [{ mr: z() }], - mb: [{ mb: z() }], - ml: [{ ml: z() }], - "space-x": [{ "space-x": m() }], - "space-x-reverse": ["space-x-reverse"], - "space-y": [{ "space-y": m() }], - "space-y-reverse": ["space-y-reverse"], - size: [{ size: T() }], - w: [{ w: [u, "screen", ...T()] }], - "min-w": [{ "min-w": [u, "screen", "none", ...T()] }], - "max-w": [{ "max-w": [u, "screen", "none", "prose", { screen: [l] }, ...T()] }], - h: [{ h: ["screen", "lh", ...T()] }], - "min-h": [{ "min-h": ["screen", "lh", "none", ...T()] }], - "max-h": [{ "max-h": ["screen", "lh", ...T()] }], - "font-size": [{ text: ["base", r, W, P] }], - "font-smoothing": ["antialiased", "subpixel-antialiased"], - "font-style": ["italic", "not-italic"], - "font-weight": [{ font: [t, n, ce] }], - "font-stretch": [{ "font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", le, s] }], - "font-family": [{ font: [Vo, s, o] }], - "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: [a, n, s] }], - "line-clamp": [{ "line-clamp": [p, "none", n, ce] }], - leading: [{ leading: [d, ...m()] }], - "list-image": [{ "list-image": ["none", n, s] }], - "list-style-position": [{ list: ["inside", "outside"] }], - "list-style-type": [{ list: ["disc", "decimal", "none", n, s] }], - "text-alignment": [{ text: ["left", "center", "right", "justify", "start", "end"] }], - "placeholder-color": [{ placeholder: c() }], - "text-color": [{ text: c() }], - "text-decoration": ["underline", "overline", "line-through", "no-underline"], - "text-decoration-style": [{ decoration: [...X(), "wavy"] }], - "text-decoration-thickness": [{ decoration: [p, "from-font", "auto", n, P] }], - "text-decoration-color": [{ decoration: c() }], - "underline-offset": [{ "underline-offset": [p, "auto", n, s] }], - "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"], - "text-overflow": ["truncate", "text-ellipsis", "text-clip"], - "text-wrap": [{ text: ["wrap", "nowrap", "balance", "pretty"] }], - indent: [{ indent: m() }], - "vertical-align": [{ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", n, s] }], - whitespace: [{ whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"] }], - break: [{ break: ["normal", "words", "all", "keep"] }], - wrap: [{ wrap: ["break-word", "anywhere", "normal"] }], - hyphens: [{ hyphens: ["none", "manual", "auto"] }], - content: [{ content: ["none", n, s] }], - "bg-attachment": [{ bg: ["fixed", "local", "scroll"] }], - "bg-clip": [{ "bg-clip": ["border", "padding", "content", "text"] }], - "bg-origin": [{ "bg-origin": ["border", "padding", "content"] }], - "bg-position": [{ bg: Se() }], - "bg-repeat": [{ bg: Ae() }], - "bg-size": [{ bg: Ce() }], - "bg-image": [{ bg: ["none", { linear: [{ to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"] }, M, n, s], radial: ["", n, s], conic: [M, n, s] }, Fo, Oo] }], - "bg-color": [{ bg: c() }], - "gradient-from-pos": [{ from: te() }], - "gradient-via-pos": [{ via: te() }], - "gradient-to-pos": [{ to: te() }], - "gradient-from": [{ from: c() }], - "gradient-via": [{ via: c() }], - "gradient-to": [{ to: c() }], - rounded: [{ rounded: w() }], - "rounded-s": [{ "rounded-s": w() }], - "rounded-e": [{ "rounded-e": w() }], - "rounded-t": [{ "rounded-t": w() }], - "rounded-r": [{ "rounded-r": w() }], - "rounded-b": [{ "rounded-b": w() }], - "rounded-l": [{ "rounded-l": w() }], - "rounded-ss": [{ "rounded-ss": w() }], - "rounded-se": [{ "rounded-se": w() }], - "rounded-ee": [{ "rounded-ee": w() }], - "rounded-es": [{ "rounded-es": w() }], - "rounded-tl": [{ "rounded-tl": w() }], - "rounded-tr": [{ "rounded-tr": w() }], - "rounded-br": [{ "rounded-br": w() }], - "rounded-bl": [{ "rounded-bl": w() }], - "border-w": [{ border: x() }], - "border-w-x": [{ "border-x": x() }], - "border-w-y": [{ "border-y": x() }], - "border-w-s": [{ "border-s": x() }], - "border-w-e": [{ "border-e": x() }], - "border-w-t": [{ "border-t": x() }], - "border-w-r": [{ "border-r": x() }], - "border-w-b": [{ "border-b": x() }], - "border-w-l": [{ "border-l": x() }], - "divide-x": [{ "divide-x": x() }], - "divide-x-reverse": ["divide-x-reverse"], - "divide-y": [{ "divide-y": x() }], - "divide-y-reverse": ["divide-y-reverse"], - "border-style": [{ border: [...X(), "hidden", "none"] }], - "divide-style": [{ divide: [...X(), "hidden", "none"] }], - "border-color": [{ border: c() }], - "border-color-x": [{ "border-x": c() }], - "border-color-y": [{ "border-y": c() }], - "border-color-s": [{ "border-s": c() }], - "border-color-e": [{ "border-e": c() }], - "border-color-t": [{ "border-t": c() }], - "border-color-r": [{ "border-r": c() }], - "border-color-b": [{ "border-b": c() }], - "border-color-l": [{ "border-l": c() }], - "divide-color": [{ divide: c() }], - "outline-style": [{ outline: [...X(), "none", "hidden"] }], - "outline-offset": [{ "outline-offset": [p, n, s] }], - "outline-w": [{ outline: ["", p, W, P] }], - "outline-color": [{ outline: c() }], - shadow: [{ shadow: ["", "none", h, ee, $] }], - "shadow-color": [{ shadow: c() }], - "inset-shadow": [{ "inset-shadow": ["none", C, ee, $] }], - "inset-shadow-color": [{ "inset-shadow": c() }], - "ring-w": [{ ring: x() }], - "ring-w-inset": ["ring-inset"], - "ring-color": [{ ring: c() }], - "ring-offset-w": [{ "ring-offset": [p, P] }], - "ring-offset-color": [{ "ring-offset": c() }], - "inset-ring-w": [{ "inset-ring": x() }], - "inset-ring-color": [{ "inset-ring": c() }], - "text-shadow": [{ "text-shadow": ["none", j, ee, $] }], - "text-shadow-color": [{ "text-shadow": c() }], - opacity: [{ opacity: [p, n, s] }], - "mix-blend": [{ "mix-blend": [...Me(), "plus-darker", "plus-lighter"] }], - "bg-blend": [{ "bg-blend": Me() }], - "mask-clip": [{ "mask-clip": ["border", "padding", "content", "fill", "stroke", "view"] }, "mask-no-clip"], - "mask-composite": [{ mask: ["add", "subtract", "intersect", "exclude"] }], - "mask-image-linear-pos": [{ "mask-linear": [p] }], - "mask-image-linear-from-pos": [{ "mask-linear-from": g() }], - "mask-image-linear-to-pos": [{ "mask-linear-to": g() }], - "mask-image-linear-from-color": [{ "mask-linear-from": c() }], - "mask-image-linear-to-color": [{ "mask-linear-to": c() }], - "mask-image-t-from-pos": [{ "mask-t-from": g() }], - "mask-image-t-to-pos": [{ "mask-t-to": g() }], - "mask-image-t-from-color": [{ "mask-t-from": c() }], - "mask-image-t-to-color": [{ "mask-t-to": c() }], - "mask-image-r-from-pos": [{ "mask-r-from": g() }], - "mask-image-r-to-pos": [{ "mask-r-to": g() }], - "mask-image-r-from-color": [{ "mask-r-from": c() }], - "mask-image-r-to-color": [{ "mask-r-to": c() }], - "mask-image-b-from-pos": [{ "mask-b-from": g() }], - "mask-image-b-to-pos": [{ "mask-b-to": g() }], - "mask-image-b-from-color": [{ "mask-b-from": c() }], - "mask-image-b-to-color": [{ "mask-b-to": c() }], - "mask-image-l-from-pos": [{ "mask-l-from": g() }], - "mask-image-l-to-pos": [{ "mask-l-to": g() }], - "mask-image-l-from-color": [{ "mask-l-from": c() }], - "mask-image-l-to-color": [{ "mask-l-to": c() }], - "mask-image-x-from-pos": [{ "mask-x-from": g() }], - "mask-image-x-to-pos": [{ "mask-x-to": g() }], - "mask-image-x-from-color": [{ "mask-x-from": c() }], - "mask-image-x-to-color": [{ "mask-x-to": c() }], - "mask-image-y-from-pos": [{ "mask-y-from": g() }], - "mask-image-y-to-pos": [{ "mask-y-to": g() }], - "mask-image-y-from-color": [{ "mask-y-from": c() }], - "mask-image-y-to-color": [{ "mask-y-to": c() }], - "mask-image-radial": [{ "mask-radial": [n, s] }], - "mask-image-radial-from-pos": [{ "mask-radial-from": g() }], - "mask-image-radial-to-pos": [{ "mask-radial-to": g() }], - "mask-image-radial-from-color": [{ "mask-radial-from": c() }], - "mask-image-radial-to-color": [{ "mask-radial-to": c() }], - "mask-image-radial-shape": [{ "mask-radial": ["circle", "ellipse"] }], - "mask-image-radial-size": [{ "mask-radial": [{ closest: ["side", "corner"], farthest: ["side", "corner"] }] }], - "mask-image-radial-pos": [{ "mask-radial-at": G() }], - "mask-image-conic-pos": [{ "mask-conic": [p] }], - "mask-image-conic-from-pos": [{ "mask-conic-from": g() }], - "mask-image-conic-to-pos": [{ "mask-conic-to": g() }], - "mask-image-conic-from-color": [{ "mask-conic-from": c() }], - "mask-image-conic-to-color": [{ "mask-conic-to": c() }], - "mask-mode": [{ mask: ["alpha", "luminance", "match"] }], - "mask-origin": [{ "mask-origin": ["border", "padding", "content", "fill", "stroke", "view"] }], - "mask-position": [{ mask: Se() }], - "mask-repeat": [{ mask: Ae() }], - "mask-size": [{ mask: Ce() }], - "mask-type": [{ "mask-type": ["alpha", "luminance"] }], - "mask-image": [{ mask: ["none", n, s] }], - filter: [{ filter: ["", "none", n, s] }], - blur: [{ blur: Ie() }], - brightness: [{ brightness: [p, n, s] }], - contrast: [{ contrast: [p, n, s] }], - "drop-shadow": [{ "drop-shadow": ["", "none", F, ee, $] }], - "drop-shadow-color": [{ "drop-shadow": c() }], - grayscale: [{ grayscale: ["", p, n, s] }], - "hue-rotate": [{ "hue-rotate": [p, n, s] }], - invert: [{ invert: ["", p, n, s] }], - saturate: [{ saturate: [p, n, s] }], - sepia: [{ sepia: ["", p, n, s] }], - "backdrop-filter": [{ "backdrop-filter": ["", "none", n, s] }], - "backdrop-blur": [{ "backdrop-blur": Ie() }], - "backdrop-brightness": [{ "backdrop-brightness": [p, n, s] }], - "backdrop-contrast": [{ "backdrop-contrast": [p, n, s] }], - "backdrop-grayscale": [{ "backdrop-grayscale": ["", p, n, s] }], - "backdrop-hue-rotate": [{ "backdrop-hue-rotate": [p, n, s] }], - "backdrop-invert": [{ "backdrop-invert": ["", p, n, s] }], - "backdrop-opacity": [{ "backdrop-opacity": [p, n, s] }], - "backdrop-saturate": [{ "backdrop-saturate": [p, n, s] }], - "backdrop-sepia": [{ "backdrop-sepia": ["", p, n, s] }], - "border-collapse": [{ border: ["collapse", "separate"] }], - "border-spacing": [{ "border-spacing": m() }], - "border-spacing-x": [{ "border-spacing-x": m() }], - "border-spacing-y": [{ "border-spacing-y": m() }], - "table-layout": [{ table: ["auto", "fixed"] }], - caption: [{ caption: ["top", "bottom"] }], - transition: [{ transition: ["", "all", "colors", "opacity", "shadow", "transform", "none", n, s] }], - "transition-behavior": [{ transition: ["normal", "discrete"] }], - duration: [{ duration: [p, "initial", n, s] }], - ease: [{ ease: ["linear", "initial", I, n, s] }], - delay: [{ delay: [p, n, s] }], - animate: [{ animate: ["none", q, n, s] }], - backface: [{ backface: ["hidden", "visible"] }], - perspective: [{ perspective: [k, n, s] }], - "perspective-origin": [{ "perspective-origin": L() }], - rotate: [{ rotate: Y() }], - "rotate-x": [{ "rotate-x": Y() }], - "rotate-y": [{ "rotate-y": Y() }], - "rotate-z": [{ "rotate-z": Y() }], - scale: [{ scale: Q() }], - "scale-x": [{ "scale-x": Q() }], - "scale-y": [{ "scale-y": Q() }], - "scale-z": [{ "scale-z": Q() }], - "scale-3d": ["scale-3d"], - skew: [{ skew: se() }], - "skew-x": [{ "skew-x": se() }], - "skew-y": [{ "skew-y": se() }], - transform: [{ transform: [n, s, "", "none", "gpu", "cpu"] }], - "transform-origin": [{ origin: L() }], - "transform-style": [{ transform: ["3d", "flat"] }], - translate: [{ translate: Z() }], - "translate-x": [{ "translate-x": Z() }], - "translate-y": [{ "translate-y": Z() }], - "translate-z": [{ "translate-z": Z() }], - "translate-none": ["translate-none"], - accent: [{ accent: c() }], - appearance: [{ appearance: ["none", "auto"] }], - "caret-color": [{ caret: c() }], - "color-scheme": [{ scheme: ["normal", "dark", "light", "light-dark", "only-dark", "only-light"] }], - 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", - n, - s, - ], - }, - ], - "field-sizing": [{ "field-sizing": ["fixed", "content"] }], - "pointer-events": [{ "pointer-events": ["auto", "none"] }], - resize: [{ resize: ["none", "", "y", "x"] }], - "scroll-behavior": [{ scroll: ["auto", "smooth"] }], - "scroll-m": [{ "scroll-m": m() }], - "scroll-mx": [{ "scroll-mx": m() }], - "scroll-my": [{ "scroll-my": m() }], - "scroll-ms": [{ "scroll-ms": m() }], - "scroll-me": [{ "scroll-me": m() }], - "scroll-mt": [{ "scroll-mt": m() }], - "scroll-mr": [{ "scroll-mr": m() }], - "scroll-mb": [{ "scroll-mb": m() }], - "scroll-ml": [{ "scroll-ml": m() }], - "scroll-p": [{ "scroll-p": m() }], - "scroll-px": [{ "scroll-px": m() }], - "scroll-py": [{ "scroll-py": m() }], - "scroll-ps": [{ "scroll-ps": m() }], - "scroll-pe": [{ "scroll-pe": m() }], - "scroll-pt": [{ "scroll-pt": m() }], - "scroll-pr": [{ "scroll-pr": m() }], - "scroll-pb": [{ "scroll-pb": m() }], - "scroll-pl": [{ "scroll-pl": m() }], - "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"] }], - 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", n, s] }], - fill: [{ fill: ["none", ...c()] }], - "stroke-w": [{ stroke: [p, W, P, ce] }], - stroke: [{ stroke: ["none", ...c()] }], - "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-x", "border-w-y", "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-x", "border-color-y", "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"], - translate: ["translate-x", "translate-y", "translate-none"], - "translate-none": ["translate", "translate-x", "translate-y", "translate-z"], - "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"] }, - orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"], - }; - }, - Do = So(Wo); -var Ho = xe('User profile'), - qo = xe("
        "); -function $o(e, o) { - Fe(o, !0); - var r = qo(); - let t; - var a = de(r), - d = de(a); - { - var l = (i) => { - co(i, { - get userId() { - return o.userId; - }, - }); - }, - u = (i) => { - var f = Ho(); - pe(() => to(f, "src", o.pictureUrl)), ue(i, f); - }; - oo(d, (i) => { - o.pictureUrl ? i(u, !1) : i(l); - }); - } - me(a), - me(r), - pe( - (i, f) => { - (t = fe(r, 1, "avatar relative rounded-full", null, t, i)), fe(a, 1, f); - }, - [() => ({ "border-3": o.isSuspended, "border-red-500": o.isSuspended }), () => ro(Do("border-base-300 size-20 rounded-full border-2", o.class))] - ), - ue(e, r), - Ue(); -} -export { $o as P, co as a, Do as t }; diff --git a/frontend-backup/_app/immutable/chunks/DCynssDD.js b/frontend-backup/_app/immutable/chunks/DCynssDD.js new file mode 100644 index 0000000..9cfa9a5 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/DCynssDD.js @@ -0,0 +1,54 @@ +import "./Ch2Ub8FX.js"; +import { v as n, b as d } from "./CMvZtFtm.js"; +import { b as r } from "./C5yqZvKC.js"; +import { r as s } from "./BF50aS-j.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + t = new e.Error().stack; + t && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[t] = "6275c75f-2cba-4611-a807-b274187f8ba0"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-6275c75f-2cba-4611-a807-b274187f8ba0")); + })(); +} catch {} +var i = n( + '' +); +function c(e, t) { + let f = s(t, ["$$slots", "$$events", "$$legacy"]); + var o = i(); + r(o, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...f, + })), + d(e, o); +} +export { c as W }; diff --git a/frontend-backup/_app/immutable/chunks/DFzO1c4b.js b/frontend-backup/_app/immutable/chunks/DFzO1c4b.js deleted file mode 100644 index 9a08808..0000000 --- a/frontend-backup/_app/immutable/chunks/DFzO1c4b.js +++ /dev/null @@ -1 +0,0 @@ -import{g as o}from"./DklPLC_x.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e0ae0548-fcbf-4f39-9ea8-c8dece67686b",e._sentryDebugIdIdentifier="sentry-dbid-e0ae0548-fcbf-4f39-9ea8-c8dece67686b")})()}catch{}const t=()=>"No data.",d=()=>"Sem dados.",l=(e={},n={})=>(n.locale??o())==="en"?t():d();export{l as n}; diff --git a/frontend-backup/_app/immutable/chunks/DLfdYhzo.js b/frontend-backup/_app/immutable/chunks/DLfdYhzo.js new file mode 100644 index 0000000..171f2dd --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/DLfdYhzo.js @@ -0,0 +1,109 @@ +import { g as p } from "./CV9xcpLq.js"; +import "./Ch2Ub8FX.js"; +import { ay as g, a as h, b as r, v } from "./CMvZtFtm.js"; +import { i as w, r as i } from "./BF50aS-j.js"; +import { b as s } from "./C5yqZvKC.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + o = new e.Error().stack; + o && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[o] = "3298bbfa-10df-4888-8ec0-1b806457f64a"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-3298bbfa-10df-4888-8ec0-1b806457f64a")); + })(); +} catch {} +const m = (e) => `Copy alliance ID: #${e.allianceId}`, + b = (e) => `Copiar ID da aliança: #${e.allianceId}`, + C = (e, o = {}) => ((o.locale ?? p()) === "en" ? m(e) : b(e)); +var u = v( + '' + ), + y = v( + '' + ); +function H(e, o) { + let a = i(o, ["$$slots", "$$events", "$$legacy", "filled"]); + var t = g(), + f = h(t); + { + var c = (l) => { + var n = u(); + s(n, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...a, + })), + r(l, n); + }, + d = (l) => { + var n = y(); + s(n, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...a, + })), + r(l, n); + }; + w(f, (l) => { + o.filled ? l(c) : l(d, !1); + }); + } + r(e, t); +} +var T = v( + '' +); +function D(e, o) { + let a = i(o, ["$$slots", "$$events", "$$legacy"]); + var t = T(); + s(t, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...a, + })), + r(e, t); +} +var q = v( + '' +); +function M(e, o) { + let a = i(o, ["$$slots", "$$events", "$$legacy"]); + var t = q(); + s(t, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...a, + })), + r(e, t); +} +export { H as C, D as G, M as T, C as c }; diff --git a/frontend-backup/_app/immutable/chunks/DM9nRpoa.js b/frontend-backup/_app/immutable/chunks/DM9nRpoa.js deleted file mode 100644 index f9c35b8..0000000 --- a/frontend-backup/_app/immutable/chunks/DM9nRpoa.js +++ /dev/null @@ -1,1684 +0,0 @@ -(function () { - try { - var t = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - t.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var t = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - e = new t.Error().stack; - e && ((t._sentryDebugIds = t._sentryDebugIds || {}), (t._sentryDebugIds[e] = "94f605bd-8e96-4f8e-8769-0ddf701a4cfb"), (t._sentryDebugIdIdentifier = "sentry-dbid-94f605bd-8e96-4f8e-8769-0ddf701a4cfb")); - })(); -} catch {} -const S = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, - g = globalThis, - O = "10.11.0"; -function D() { - return et(g), g; -} -function et(t) { - const e = (t.__SENTRY__ = t.__SENTRY__ || {}); - return (e.version = e.version || O), (e[O] = e[O] || {}); -} -function j(t, e, n = g) { - const r = (n.__SENTRY__ = n.__SENTRY__ || {}), - s = (r[O] = r[O] || {}); - return s[t] || (s[t] = e()); -} -const wn = ["debug", "info", "warn", "error", "log", "assert", "trace"], - Jt = "Sentry Logger ", - dt = {}; -function nt(t) { - if (!("console" in g)) return t(); - const e = g.console, - n = {}, - r = Object.keys(dt); - r.forEach((s) => { - const i = dt[s]; - (n[s] = e[s]), (e[s] = i); - }); - try { - return t(); - } finally { - r.forEach((s) => { - e[s] = n[s]; - }); - } -} -function qt() { - st().enabled = !0; -} -function Qt() { - st().enabled = !1; -} -function Rt() { - return st().enabled; -} -function Zt(...t) { - rt("log", ...t); -} -function te(...t) { - rt("warn", ...t); -} -function ee(...t) { - rt("error", ...t); -} -function rt(t, ...e) { - S && - Rt() && - nt(() => { - g.console[t](`${Jt}[${t}]:`, ...e); - }); -} -function st() { - return S ? j("loggerSettings", () => ({ enabled: !1 })) : { enabled: !1 }; -} -const h = { enable: qt, disable: Qt, isEnabled: Rt, log: Zt, warn: te, error: ee }, - Ot = 50, - ne = "?", - pt = /\(error: (.*)\)/, - lt = /captureMessage|captureException/; -function re(...t) { - const e = t.sort((n, r) => n[0] - r[0]).map((n) => n[1]); - return (n, r = 0, s = 0) => { - const i = [], - o = n.split(` -`); - for (let c = r; c < o.length; c++) { - let a = o[c]; - a.length > 1024 && (a = a.slice(0, 1024)); - const u = pt.test(a) ? a.replace(pt, "$1") : a; - if (!u.match(/\S*Error: /)) { - for (const f of e) { - const d = f(u); - if (d) { - i.push(d); - break; - } - } - if (i.length >= Ot + s) break; - } - } - return se(i.slice(s)); - }; -} -function Pn(t) { - return Array.isArray(t) ? re(...t) : t; -} -function se(t) { - if (!t.length) return []; - const e = Array.from(t); - return ( - /sentryWrapped/.test(w(e).function || "") && e.pop(), - e.reverse(), - lt.test(w(e).function || "") && (e.pop(), lt.test(w(e).function || "") && e.pop()), - e.slice(0, Ot).map((n) => ({ ...n, filename: n.filename || w(e).filename, function: n.function || ne })) - ); -} -function w(t) { - return t[t.length - 1] || {}; -} -const K = ""; -function ie(t) { - try { - return !t || typeof t != "function" ? K : t.name || K; - } catch { - return K; - } -} -function kn(t) { - const e = t.exception; - if (e) { - const n = []; - try { - return ( - e.values.forEach((r) => { - r.stacktrace.frames && n.push(...r.stacktrace.frames); - }), - n - ); - } catch { - return; - } - } -} -const Dt = Object.prototype.toString; -function oe(t) { - switch (Dt.call(t)) { - case "[object Error]": - case "[object Exception]": - case "[object DOMException]": - case "[object WebAssembly.Exception]": - return !0; - default: - return M(t, Error); - } -} -function x(t, e) { - return Dt.call(t) === `[object ${e}]`; -} -function Ln(t) { - return x(t, "ErrorEvent"); -} -function Fn(t) { - return x(t, "DOMError"); -} -function $n(t) { - return x(t, "DOMException"); -} -function F(t) { - return x(t, "String"); -} -function ae(t) { - return typeof t == "object" && t !== null && "__sentry_template_string__" in t && "__sentry_template_values__" in t; -} -function Un(t) { - return t === null || ae(t) || (typeof t != "object" && typeof t != "function"); -} -function Mt(t) { - return x(t, "Object"); -} -function ce(t) { - return typeof Event < "u" && M(t, Event); -} -function ue(t) { - return typeof Element < "u" && M(t, Element); -} -function fe(t) { - return x(t, "RegExp"); -} -function it(t) { - return !!(t != null && t.then && typeof t.then == "function"); -} -function de(t) { - return Mt(t) && "nativeEvent" in t && "preventDefault" in t && "stopPropagation" in t; -} -function M(t, e) { - try { - return t instanceof e; - } catch { - return !1; - } -} -function wt(t) { - return !!(typeof t == "object" && t !== null && (t.__isVue || t._isVue)); -} -function jn(t) { - return typeof Request < "u" && M(t, Request); -} -const ot = g, - pe = 80; -function le(t, e = {}) { - if (!t) return ""; - try { - let n = t; - const r = 5, - s = []; - let i = 0, - o = 0; - const c = " > ", - a = c.length; - let u; - const f = Array.isArray(e) ? e : e.keyAttrs, - d = (!Array.isArray(e) && e.maxStringLength) || pe; - for (; n && i++ < r && ((u = _e(n, f)), !(u === "html" || (i > 1 && o + s.length * a + u.length >= d))); ) s.push(u), (o += u.length), (n = n.parentNode); - return s.reverse().join(c); - } catch { - return ""; - } -} -function _e(t, e) { - const n = t, - r = []; - if (!(n != null && n.tagName)) return ""; - if (ot.HTMLElement && n instanceof HTMLElement && n.dataset) { - if (n.dataset.sentryComponent) return n.dataset.sentryComponent; - if (n.dataset.sentryElement) return n.dataset.sentryElement; - } - r.push(n.tagName.toLowerCase()); - const s = e != null && e.length ? e.filter((o) => n.getAttribute(o)).map((o) => [o, n.getAttribute(o)]) : null; - if (s != null && s.length) - s.forEach((o) => { - r.push(`[${o[0]}="${o[1]}"]`); - }); - else { - n.id && r.push(`#${n.id}`); - const o = n.className; - if (o && F(o)) { - const c = o.split(/\s+/); - for (const a of c) r.push(`.${a}`); - } - } - const i = ["aria-label", "type", "name", "title", "alt"]; - for (const o of i) { - const c = n.getAttribute(o); - c && r.push(`[${o}="${c}"]`); - } - return r.join(""); -} -function vn() { - try { - return ot.document.location.href; - } catch { - return ""; - } -} -function Bn(t) { - if (!ot.HTMLElement) return null; - let e = t; - const n = 5; - for (let r = 0; r < n; r++) { - if (!e) return null; - if (e instanceof HTMLElement) { - if (e.dataset.sentryComponent) return e.dataset.sentryComponent; - if (e.dataset.sentryElement) return e.dataset.sentryElement; - } - e = e.parentNode; - } - return null; -} -function $(t, e = 0) { - return typeof t != "string" || e === 0 || t.length <= e ? t : `${t.slice(0, e)}...`; -} -function Gn(t, e) { - if (!Array.isArray(t)) return ""; - const n = []; - for (let r = 0; r < t.length; r++) { - const s = t[r]; - try { - wt(s) ? n.push("[VueViewModel]") : n.push(String(s)); - } catch { - n.push("[value cannot be serialized]"); - } - } - return n.join(e); -} -function ge(t, e, n = !1) { - return F(t) ? (fe(e) ? e.test(t) : F(e) ? (n ? t === e : t.includes(e)) : !1) : !1; -} -function zn(t, e = [], n = !1) { - return e.some((r) => ge(t, r, n)); -} -function Hn(t, e, n) { - if (!(e in t)) return; - const r = t[e]; - if (typeof r != "function") return; - const s = n(r); - typeof s == "function" && he(s, r); - try { - t[e] = s; - } catch { - S && h.log(`Failed to replace method "${e}" in object`, t); - } -} -function I(t, e, n) { - try { - Object.defineProperty(t, e, { value: n, writable: !0, configurable: !0 }); - } catch { - S && h.log(`Failed to add non-enumerable property "${e}" to object`, t); - } -} -function he(t, e) { - try { - const n = e.prototype || {}; - (t.prototype = e.prototype = n), I(t, "__sentry_original__", e); - } catch {} -} -function Yn(t) { - return t.__sentry_original__; -} -function Pt(t) { - if (oe(t)) return { message: t.message, name: t.name, stack: t.stack, ...gt(t) }; - if (ce(t)) { - const e = { type: t.type, target: _t(t.target), currentTarget: _t(t.currentTarget), ...gt(t) }; - return typeof CustomEvent < "u" && M(t, CustomEvent) && (e.detail = t.detail), e; - } else return t; -} -function _t(t) { - try { - return ue(t) ? le(t) : Object.prototype.toString.call(t); - } catch { - return ""; - } -} -function gt(t) { - if (typeof t == "object" && t !== null) { - const e = {}; - for (const n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]); - return e; - } else return {}; -} -function Vn(t, e = 40) { - const n = Object.keys(Pt(t)); - n.sort(); - const r = n[0]; - if (!r) return "[object has no keys]"; - if (r.length >= e) return $(r, e); - for (let s = n.length; s > 0; s--) { - const i = n.slice(0, s).join(", "); - if (!(i.length > e)) return s === n.length ? i : $(i, e); - } - return ""; -} -function me() { - const t = g; - return t.crypto || t.msCrypto; -} -function T(t = me()) { - let e = () => Math.random() * 16; - try { - if (t != null && t.randomUUID) return t.randomUUID().replace(/-/g, ""); - t != null && - t.getRandomValues && - (e = () => { - const n = new Uint8Array(1); - return t.getRandomValues(n), n[0]; - }); - } catch {} - return ("10000000100040008000" + 1e11).replace(/[018]/g, (n) => (n ^ ((e() & 15) >> (n / 4))).toString(16)); -} -function kt(t) { - var e, n; - return (n = (e = t.exception) == null ? void 0 : e.values) == null ? void 0 : n[0]; -} -function Kn(t) { - const { message: e, event_id: n } = t; - if (e) return e; - const r = kt(t); - return r ? (r.type && r.value ? `${r.type}: ${r.value}` : r.type || r.value || n || "") : n || ""; -} -function Wn(t, e, n) { - const r = (t.exception = t.exception || {}), - s = (r.values = r.values || []), - i = (s[0] = s[0] || {}); - i.value || (i.value = e || ""), i.type || (i.type = "Error"); -} -function Se(t, e) { - const n = kt(t); - if (!n) return; - const r = { type: "generic", handled: !0 }, - s = n.mechanism; - if (((n.mechanism = { ...r, ...s, ...e }), e && "data" in e)) { - const i = { ...(s == null ? void 0 : s.data), ...e.data }; - n.mechanism.data = i; - } -} -function Xn(t) { - if (ye(t)) return !0; - try { - I(t, "__sentry_captured__", !0); - } catch {} - return !1; -} -function ye(t) { - try { - return t.__sentry_captured__; - } catch {} -} -const Lt = 1e3; -function at() { - return Date.now() / Lt; -} -function Ee() { - const { performance: t } = g; - if (!(t != null && t.now) || !t.timeOrigin) return at; - const e = t.timeOrigin; - return () => (e + t.now()) / Lt; -} -let ht; -function ct() { - return (ht ?? (ht = Ee()))(); -} -let W; -function be() { - var f; - const { performance: t } = g; - if (!(t != null && t.now)) return [void 0, "none"]; - const e = 3600 * 1e3, - n = t.now(), - r = Date.now(), - s = t.timeOrigin ? Math.abs(t.timeOrigin + n - r) : e, - i = s < e, - o = (f = t.timing) == null ? void 0 : f.navigationStart, - a = typeof o == "number" ? Math.abs(o + n - r) : e, - u = a < e; - return i || u ? (s <= a ? [t.timeOrigin, "timeOrigin"] : [o, "navigationStart"]) : [r, "dateNow"]; -} -function Jn() { - return W || (W = be()), W[0]; -} -function Te(t) { - const e = ct(), - n = { sid: T(), init: !0, timestamp: e, started: e, duration: 0, status: "ok", errors: 0, ignoreDuration: !1, toJSON: () => Ae(n) }; - return t && v(n, t), n; -} -function v(t, e = {}) { - if ( - (e.user && (!t.ipAddress && e.user.ip_address && (t.ipAddress = e.user.ip_address), !t.did && !e.did && (t.did = e.user.id || e.user.email || e.user.username)), - (t.timestamp = e.timestamp || ct()), - e.abnormal_mechanism && (t.abnormal_mechanism = e.abnormal_mechanism), - e.ignoreDuration && (t.ignoreDuration = e.ignoreDuration), - e.sid && (t.sid = e.sid.length === 32 ? e.sid : T()), - e.init !== void 0 && (t.init = e.init), - !t.did && e.did && (t.did = `${e.did}`), - typeof e.started == "number" && (t.started = e.started), - t.ignoreDuration) - ) - t.duration = void 0; - else if (typeof e.duration == "number") t.duration = e.duration; - else { - const n = t.timestamp - t.started; - t.duration = n >= 0 ? n : 0; - } - e.release && (t.release = e.release), - e.environment && (t.environment = e.environment), - !t.ipAddress && e.ipAddress && (t.ipAddress = e.ipAddress), - !t.userAgent && e.userAgent && (t.userAgent = e.userAgent), - typeof e.errors == "number" && (t.errors = e.errors), - e.status && (t.status = e.status); -} -function Ie(t, e) { - let n = {}; - t.status === "ok" && (n = { status: "exited" }), v(t, n); -} -function Ae(t) { - return { - sid: `${t.sid}`, - init: t.init, - started: new Date(t.started * 1e3).toISOString(), - timestamp: new Date(t.timestamp * 1e3).toISOString(), - status: t.status, - errors: t.errors, - did: typeof t.did == "number" || typeof t.did == "string" ? `${t.did}` : void 0, - duration: t.duration, - abnormal_mechanism: t.abnormal_mechanism, - attrs: { release: t.release, environment: t.environment, ip_address: t.ipAddress, user_agent: t.userAgent }, - }; -} -function B(t, e, n = 2) { - if (!e || typeof e != "object" || n <= 0) return e; - if (t && Object.keys(e).length === 0) return t; - const r = { ...t }; - for (const s in e) Object.prototype.hasOwnProperty.call(e, s) && (r[s] = B(r[s], e[s], n - 1)); - return r; -} -function U() { - return T(); -} -function ut() { - return T().substring(16); -} -const J = "_sentrySpan"; -function mt(t, e) { - e ? I(t, J, e) : delete t[J]; -} -function q(t) { - return t[J]; -} -const Ce = 100; -class y { - constructor() { - (this._notifyingListeners = !1), - (this._scopeListeners = []), - (this._eventProcessors = []), - (this._breadcrumbs = []), - (this._attachments = []), - (this._user = {}), - (this._tags = {}), - (this._extra = {}), - (this._contexts = {}), - (this._sdkProcessingMetadata = {}), - (this._propagationContext = { traceId: U(), sampleRand: Math.random() }); - } - clone() { - const e = new y(); - return ( - (e._breadcrumbs = [...this._breadcrumbs]), - (e._tags = { ...this._tags }), - (e._extra = { ...this._extra }), - (e._contexts = { ...this._contexts }), - this._contexts.flags && (e._contexts.flags = { values: [...this._contexts.flags.values] }), - (e._user = this._user), - (e._level = this._level), - (e._session = this._session), - (e._transactionName = this._transactionName), - (e._fingerprint = this._fingerprint), - (e._eventProcessors = [...this._eventProcessors]), - (e._attachments = [...this._attachments]), - (e._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }), - (e._propagationContext = { ...this._propagationContext }), - (e._client = this._client), - (e._lastEventId = this._lastEventId), - mt(e, q(this)), - e - ); - } - setClient(e) { - this._client = e; - } - setLastEventId(e) { - this._lastEventId = e; - } - getClient() { - return this._client; - } - lastEventId() { - return this._lastEventId; - } - addScopeListener(e) { - this._scopeListeners.push(e); - } - addEventProcessor(e) { - return this._eventProcessors.push(e), this; - } - setUser(e) { - return (this._user = e || { email: void 0, id: void 0, ip_address: void 0, username: void 0 }), this._session && v(this._session, { user: e }), this._notifyScopeListeners(), this; - } - getUser() { - return this._user; - } - setTags(e) { - return (this._tags = { ...this._tags, ...e }), this._notifyScopeListeners(), this; - } - setTag(e, n) { - return (this._tags = { ...this._tags, [e]: n }), this._notifyScopeListeners(), this; - } - setExtras(e) { - return (this._extra = { ...this._extra, ...e }), this._notifyScopeListeners(), this; - } - setExtra(e, n) { - return (this._extra = { ...this._extra, [e]: n }), this._notifyScopeListeners(), this; - } - setFingerprint(e) { - return (this._fingerprint = e), this._notifyScopeListeners(), this; - } - setLevel(e) { - return (this._level = e), this._notifyScopeListeners(), this; - } - setTransactionName(e) { - return (this._transactionName = e), this._notifyScopeListeners(), this; - } - setContext(e, n) { - return n === null ? delete this._contexts[e] : (this._contexts[e] = n), this._notifyScopeListeners(), this; - } - setSession(e) { - return e ? (this._session = e) : delete this._session, this._notifyScopeListeners(), this; - } - getSession() { - return this._session; - } - update(e) { - if (!e) return this; - const n = typeof e == "function" ? e(this) : e, - r = n instanceof y ? n.getScopeData() : Mt(n) ? e : void 0, - { tags: s, extra: i, user: o, contexts: c, level: a, fingerprint: u = [], propagationContext: f } = r || {}; - return ( - (this._tags = { ...this._tags, ...s }), - (this._extra = { ...this._extra, ...i }), - (this._contexts = { ...this._contexts, ...c }), - o && Object.keys(o).length && (this._user = o), - a && (this._level = a), - u.length && (this._fingerprint = u), - f && (this._propagationContext = f), - this - ); - } - clear() { - return ( - (this._breadcrumbs = []), - (this._tags = {}), - (this._extra = {}), - (this._user = {}), - (this._contexts = {}), - (this._level = void 0), - (this._transactionName = void 0), - (this._fingerprint = void 0), - (this._session = void 0), - mt(this, void 0), - (this._attachments = []), - this.setPropagationContext({ traceId: U(), sampleRand: Math.random() }), - this._notifyScopeListeners(), - this - ); - } - addBreadcrumb(e, n) { - var i; - const r = typeof n == "number" ? n : Ce; - if (r <= 0) return this; - const s = { timestamp: at(), ...e, message: e.message ? $(e.message, 2048) : e.message }; - return ( - this._breadcrumbs.push(s), - this._breadcrumbs.length > r && ((this._breadcrumbs = this._breadcrumbs.slice(-r)), (i = this._client) == null || i.recordDroppedEvent("buffer_overflow", "log_item")), - this._notifyScopeListeners(), - this - ); - } - getLastBreadcrumb() { - return this._breadcrumbs[this._breadcrumbs.length - 1]; - } - clearBreadcrumbs() { - return (this._breadcrumbs = []), this._notifyScopeListeners(), this; - } - addAttachment(e) { - return this._attachments.push(e), this; - } - clearAttachments() { - return (this._attachments = []), this; - } - getScopeData() { - return { - breadcrumbs: this._breadcrumbs, - attachments: this._attachments, - contexts: this._contexts, - tags: this._tags, - extra: this._extra, - user: this._user, - level: this._level, - fingerprint: this._fingerprint || [], - eventProcessors: this._eventProcessors, - propagationContext: this._propagationContext, - sdkProcessingMetadata: this._sdkProcessingMetadata, - transactionName: this._transactionName, - span: q(this), - }; - } - setSDKProcessingMetadata(e) { - return (this._sdkProcessingMetadata = B(this._sdkProcessingMetadata, e, 2)), this; - } - setPropagationContext(e) { - return (this._propagationContext = e), this; - } - getPropagationContext() { - return this._propagationContext; - } - captureException(e, n) { - const r = (n == null ? void 0 : n.event_id) || T(); - if (!this._client) return S && h.warn("No client configured on scope - will not capture exception!"), r; - const s = new Error("Sentry syntheticException"); - return this._client.captureException(e, { originalException: e, syntheticException: s, ...n, event_id: r }, this), r; - } - captureMessage(e, n, r) { - const s = (r == null ? void 0 : r.event_id) || T(); - if (!this._client) return S && h.warn("No client configured on scope - will not capture message!"), s; - const i = new Error(e); - return this._client.captureMessage(e, n, { originalException: e, syntheticException: i, ...r, event_id: s }, this), s; - } - captureEvent(e, n) { - const r = (n == null ? void 0 : n.event_id) || T(); - return this._client ? (this._client.captureEvent(e, { ...n, event_id: r }, this), r) : (S && h.warn("No client configured on scope - will not capture event!"), r); - } - _notifyScopeListeners() { - this._notifyingListeners || - ((this._notifyingListeners = !0), - this._scopeListeners.forEach((e) => { - e(this); - }), - (this._notifyingListeners = !1)); - } -} -function Ne() { - return j("defaultCurrentScope", () => new y()); -} -function xe() { - return j("defaultIsolationScope", () => new y()); -} -class Re { - constructor(e, n) { - let r; - e ? (r = e) : (r = new y()); - let s; - n ? (s = n) : (s = new y()), (this._stack = [{ scope: r }]), (this._isolationScope = s); - } - withScope(e) { - const n = this._pushScope(); - let r; - try { - r = e(n); - } catch (s) { - throw (this._popScope(), s); - } - return it(r) - ? r.then( - (s) => (this._popScope(), s), - (s) => { - throw (this._popScope(), s); - } - ) - : (this._popScope(), r); - } - getClient() { - return this.getStackTop().client; - } - getScope() { - return this.getStackTop().scope; - } - getIsolationScope() { - return this._isolationScope; - } - getStackTop() { - return this._stack[this._stack.length - 1]; - } - _pushScope() { - const e = this.getScope().clone(); - return this._stack.push({ client: this.getClient(), scope: e }), e; - } - _popScope() { - return this._stack.length <= 1 ? !1 : !!this._stack.pop(); - } -} -function C() { - const t = D(), - e = et(t); - return (e.stack = e.stack || new Re(Ne(), xe())); -} -function Oe(t) { - return C().withScope(t); -} -function De(t, e) { - const n = C(); - return n.withScope(() => ((n.getStackTop().scope = t), e(t))); -} -function St(t) { - return C().withScope(() => t(C().getIsolationScope())); -} -function Me() { - return { withIsolationScope: St, withScope: Oe, withSetScope: De, withSetIsolationScope: (t, e) => St(e), getCurrentScope: () => C().getScope(), getIsolationScope: () => C().getIsolationScope() }; -} -function G(t) { - const e = et(t); - return e.acs ? e.acs : Me(); -} -function R() { - const t = D(); - return G(t).getCurrentScope(); -} -function z() { - const t = D(); - return G(t).getIsolationScope(); -} -function we() { - return j("globalScope", () => new y()); -} -function qn(...t) { - const e = D(), - n = G(e); - if (t.length === 2) { - const [r, s] = t; - return r ? n.withSetScope(r, s) : n.withScope(s); - } - return n.withScope(t[0]); -} -function H() { - return R().getClient(); -} -function Qn(t) { - const e = t.getPropagationContext(), - { traceId: n, parentSpanId: r, propagationSpanId: s } = e, - i = { trace_id: n, span_id: s || ut() }; - return r && (i.parent_span_id = r), i; -} -const Pe = "sentry.source", - ke = "sentry.sample_rate", - Le = "sentry.previous_trace_sample_rate", - Fe = "sentry.op", - $e = "sentry.origin", - Zn = "sentry.idle_span_finish_reason", - tr = "sentry.measurement_unit", - er = "sentry.measurement_value", - nr = "sentry.custom_span_name", - rr = "sentry.profile_id", - sr = "sentry.exclusive_time", - ir = "sentry.link.type", - Ue = 0, - Ft = 1, - _ = 2; -function je(t) { - if (t < 400 && t >= 100) return { code: Ft }; - if (t >= 400 && t < 500) - switch (t) { - case 401: - return { code: _, message: "unauthenticated" }; - case 403: - return { code: _, message: "permission_denied" }; - case 404: - return { code: _, message: "not_found" }; - case 409: - return { code: _, message: "already_exists" }; - case 413: - return { code: _, message: "failed_precondition" }; - case 429: - return { code: _, message: "resource_exhausted" }; - case 499: - return { code: _, message: "cancelled" }; - default: - return { code: _, message: "invalid_argument" }; - } - if (t >= 500 && t < 600) - switch (t) { - case 501: - return { code: _, message: "unimplemented" }; - case 503: - return { code: _, message: "unavailable" }; - case 504: - return { code: _, message: "deadline_exceeded" }; - default: - return { code: _, message: "internal_error" }; - } - return { code: _, message: "unknown_error" }; -} -function or(t, e) { - t.setAttribute("http.response.status_code", e); - const n = je(e); - n.message !== "unknown_error" && t.setStatus(n); -} -const $t = "_sentryScope", - Ut = "_sentryIsolationScope"; -function ar(t, e, n) { - t && (I(t, Ut, n), I(t, $t, e)); -} -function jt(t) { - return { scope: t[$t], isolationScope: t[Ut] }; -} -const vt = "sentry-", - ve = /^sentry-/, - Be = 8192; -function Bt(t) { - const e = Ge(t); - if (!e) return; - const n = Object.entries(e).reduce((r, [s, i]) => { - if (s.match(ve)) { - const o = s.slice(vt.length); - r[o] = i; - } - return r; - }, {}); - if (Object.keys(n).length > 0) return n; -} -function cr(t) { - if (!t) return; - const e = Object.entries(t).reduce((n, [r, s]) => (s && (n[`${vt}${r}`] = s), n), {}); - return ze(e); -} -function Ge(t) { - if (!(!t || (!F(t) && !Array.isArray(t)))) - return Array.isArray(t) - ? t.reduce((e, n) => { - const r = yt(n); - return ( - Object.entries(r).forEach(([s, i]) => { - e[s] = i; - }), - e - ); - }, {}) - : yt(t); -} -function yt(t) { - return t - .split(",") - .map((e) => - e.split("=").map((n) => { - try { - return decodeURIComponent(n.trim()); - } catch { - return; - } - }) - ) - .reduce((e, [n, r]) => (n && r && (e[n] = r), e), {}); -} -function ze(t) { - if (Object.keys(t).length !== 0) - return Object.entries(t).reduce((e, [n, r], s) => { - const i = `${encodeURIComponent(n)}=${encodeURIComponent(r)}`, - o = s === 0 ? i : `${e},${i}`; - return o.length > Be ? (S && h.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`), e) : o; - }, ""); -} -const He = /^o(\d+)\./, - Ye = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/; -function Ve(t) { - return t === "http" || t === "https"; -} -function ur(t, e = !1) { - const { host: n, path: r, pass: s, port: i, projectId: o, protocol: c, publicKey: a } = t; - return `${c}://${a}${e && s ? `:${s}` : ""}@${n}${i ? `:${i}` : ""}/${r && `${r}/`}${o}`; -} -function Ke(t) { - const e = Ye.exec(t); - if (!e) { - nt(() => { - console.error(`Invalid Sentry Dsn: ${t}`); - }); - return; - } - const [n, r, s = "", i = "", o = "", c = ""] = e.slice(1); - let a = "", - u = c; - const f = u.split("/"); - if ((f.length > 1 && ((a = f.slice(0, -1).join("/")), (u = f.pop())), u)) { - const d = u.match(/^\d+/); - d && (u = d[0]); - } - return Gt({ host: i, pass: s, path: a, projectId: u, port: o, protocol: n, publicKey: r }); -} -function Gt(t) { - return { protocol: t.protocol, publicKey: t.publicKey || "", pass: t.pass || "", host: t.host, port: t.port || "", path: t.path || "", projectId: t.projectId }; -} -function We(t) { - if (!S) return !0; - const { port: e, projectId: n, protocol: r } = t; - return ["protocol", "publicKey", "host", "projectId"].find((o) => (t[o] ? !1 : (h.error(`Invalid Sentry Dsn: ${o} missing`), !0))) - ? !1 - : n.match(/^\d+$/) - ? Ve(r) - ? e && isNaN(parseInt(e, 10)) - ? (h.error(`Invalid Sentry Dsn: Invalid port ${e}`), !1) - : !0 - : (h.error(`Invalid Sentry Dsn: Invalid protocol ${r}`), !1) - : (h.error(`Invalid Sentry Dsn: Invalid projectId ${n}`), !1); -} -function Xe(t) { - const e = t.match(He); - return e == null ? void 0 : e[1]; -} -function Je(t) { - const e = t.getOptions(), - { host: n } = t.getDsn() || {}; - let r; - return e.orgId ? (r = String(e.orgId)) : n && (r = Xe(n)), r; -} -function fr(t) { - const e = typeof t == "string" ? Ke(t) : Gt(t); - if (!(!e || !We(e))) return e; -} -function Et(t) { - if (typeof t == "boolean") return Number(t); - const e = typeof t == "string" ? parseFloat(t) : t; - if (!(typeof e != "number" || isNaN(e) || e < 0 || e > 1)) return e; -} -const qe = new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$"); -function Qe(t) { - if (!t) return; - const e = t.match(qe); - if (!e) return; - let n; - return e[3] === "1" ? (n = !0) : e[3] === "0" && (n = !1), { traceId: e[1], parentSampled: n, parentSpanId: e[2] }; -} -function dr(t, e) { - const n = Qe(t), - r = Bt(e); - if (!(n != null && n.traceId)) return { traceId: U(), sampleRand: Math.random() }; - const s = tn(n, r); - r && (r.sample_rand = s.toString()); - const { traceId: i, parentSpanId: o, parentSampled: c } = n; - return { traceId: i, parentSpanId: o, sampled: c, dsc: r || {}, sampleRand: s }; -} -function Ze(t = U(), e = ut(), n) { - let r = ""; - return n !== void 0 && (r = n ? "-1" : "-0"), `${t}-${e}${r}`; -} -function tn(t, e) { - const n = Et(e == null ? void 0 : e.sample_rand); - if (n !== void 0) return n; - const r = Et(e == null ? void 0 : e.sample_rate); - return r && (t == null ? void 0 : t.parentSampled) !== void 0 ? (t.parentSampled ? Math.random() * r : r + Math.random() * (1 - r)) : Math.random(); -} -const pr = 0, - zt = 1; -let bt = !1; -function lr(t) { - const { spanId: e, traceId: n } = t.spanContext(), - { data: r, op: s, parent_span_id: i, status: o, origin: c, links: a } = Y(t); - return { parent_span_id: i, span_id: e, trace_id: n, data: r, op: s, status: o, origin: c, links: a }; -} -function en(t) { - const { spanId: e, traceId: n, isRemote: r } = t.spanContext(), - s = r ? e : Y(t).parent_span_id, - i = jt(t).scope, - o = r ? (i == null ? void 0 : i.getPropagationContext().propagationSpanId) || ut() : e; - return { parent_span_id: s, span_id: o, trace_id: n }; -} -function _r(t) { - const { traceId: e, spanId: n } = t.spanContext(), - r = ft(t); - return Ze(e, n, r); -} -function nn(t) { - if (t && t.length > 0) return t.map(({ context: { spanId: e, traceId: n, traceFlags: r, ...s }, attributes: i }) => ({ span_id: e, trace_id: n, sampled: r === zt, attributes: i, ...s })); -} -function Tt(t) { - return typeof t == "number" ? It(t) : Array.isArray(t) ? t[0] + t[1] / 1e9 : t instanceof Date ? It(t.getTime()) : ct(); -} -function It(t) { - return t > 9999999999 ? t / 1e3 : t; -} -function Y(t) { - var r; - if (sn(t)) return t.getSpanJSON(); - const { spanId: e, traceId: n } = t.spanContext(); - if (rn(t)) { - const { attributes: s, startTime: i, name: o, endTime: c, status: a, links: u } = t, - f = "parentSpanId" in t ? t.parentSpanId : "parentSpanContext" in t ? ((r = t.parentSpanContext) == null ? void 0 : r.spanId) : void 0; - return { span_id: e, trace_id: n, data: s, description: o, parent_span_id: f, start_timestamp: Tt(i), timestamp: Tt(c) || void 0, status: on(a), op: s[Fe], origin: s[$e], links: nn(u) }; - } - return { span_id: e, trace_id: n, start_timestamp: 0, data: {} }; -} -function rn(t) { - const e = t; - return !!e.attributes && !!e.startTime && !!e.name && !!e.endTime && !!e.status; -} -function sn(t) { - return typeof t.getSpanJSON == "function"; -} -function ft(t) { - const { traceFlags: e } = t.spanContext(); - return e === zt; -} -function on(t) { - if (!(!t || t.code === Ue)) return t.code === Ft ? "ok" : t.message || "unknown_error"; -} -const A = "_sentryChildSpans", - Q = "_sentryRootSpan"; -function gr(t, e) { - const n = t[Q] || t; - I(e, Q, n), t[A] ? t[A].add(e) : I(t, A, new Set([e])); -} -function hr(t, e) { - t[A] && t[A].delete(e); -} -function mr(t) { - const e = new Set(); - function n(r) { - if (!e.has(r) && ft(r)) { - e.add(r); - const s = r[A] ? Array.from(r[A]) : []; - for (const i of s) n(i); - } - } - return n(t), Array.from(e); -} -function Ht(t) { - return t[Q] || t; -} -function Sr() { - const t = D(), - e = G(t); - return e.getActiveSpan ? e.getActiveSpan() : q(R()); -} -function yr() { - bt || - (nt(() => { - console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly."); - }), - (bt = !0)); -} -function an(t) { - var n; - if (typeof __SENTRY_TRACING__ == "boolean" && !__SENTRY_TRACING__) return !1; - const e = t || ((n = H()) == null ? void 0 : n.getOptions()); - return !!e && (e.tracesSampleRate != null || !!e.tracesSampler); -} -const Yt = "production", - Vt = "_frozenDsc"; -function Er(t, e) { - I(t, Vt, e); -} -function Kt(t, e) { - const n = e.getOptions(), - { publicKey: r } = e.getDsn() || {}, - s = { environment: n.environment || Yt, release: n.release, public_key: r, trace_id: t, org_id: Je(e) }; - return e.emit("createDsc", s), s; -} -function br(t, e) { - const n = e.getPropagationContext(); - return n.dsc || Kt(n.traceId, t); -} -function cn(t) { - var E; - const e = H(); - if (!e) return {}; - const n = Ht(t), - r = Y(n), - s = r.data, - i = n.spanContext().traceState, - o = (i == null ? void 0 : i.get("sentry.sample_rate")) ?? s[ke] ?? s[Le]; - function c(V) { - return (typeof o == "number" || typeof o == "string") && (V.sample_rate = `${o}`), V; - } - const a = n[Vt]; - if (a) return c(a); - const u = i == null ? void 0 : i.get("sentry.dsc"), - f = u && Bt(u); - if (f) return c(f); - const d = Kt(t.spanContext().traceId, e), - l = s[Pe], - p = r.description; - return ( - l !== "url" && p && (d.transaction = p), - an() && ((d.sampled = String(ft(n))), (d.sample_rand = (i == null ? void 0 : i.get("sentry.sample_rand")) ?? ((E = jt(n).scope) == null ? void 0 : E.getPropagationContext().sampleRand.toString()))), - c(d), - e.emit("createDsc", d, n), - d - ); -} -function b(t, e = 100, n = 1 / 0) { - try { - return Z("", t, e, n); - } catch (r) { - return { ERROR: `**non-serializable** (${r})` }; - } -} -function un(t, e = 3, n = 100 * 1024) { - const r = b(t, e); - return ln(r) > n ? un(t, e - 1, n) : r; -} -function Z(t, e, n = 1 / 0, r = 1 / 0, s = _n()) { - const [i, o] = s; - if (e == null || ["boolean", "string"].includes(typeof e) || (typeof e == "number" && Number.isFinite(e))) return e; - const c = fn(t, e); - if (!c.startsWith("[object ")) return c; - if (e.__sentry_skip_normalization__) return e; - const a = typeof e.__sentry_override_normalization_depth__ == "number" ? e.__sentry_override_normalization_depth__ : n; - if (a === 0) return c.replace("object ", ""); - if (i(e)) return "[Circular ~]"; - const u = e; - if (u && typeof u.toJSON == "function") - try { - const p = u.toJSON(); - return Z("", p, a - 1, r, s); - } catch {} - const f = Array.isArray(e) ? [] : {}; - let d = 0; - const l = Pt(e); - for (const p in l) { - if (!Object.prototype.hasOwnProperty.call(l, p)) continue; - if (d >= r) { - f[p] = "[MaxProperties ~]"; - break; - } - const E = l[p]; - (f[p] = Z(p, E, a - 1, r, s)), d++; - } - return o(e), f; -} -function fn(t, e) { - try { - if (t === "domain" && e && typeof e == "object" && e._events) return "[Domain]"; - if (t === "domainEmitter") return "[DomainEmitter]"; - if (typeof global < "u" && e === global) return "[Global]"; - if (typeof window < "u" && e === window) return "[Window]"; - if (typeof document < "u" && e === document) return "[Document]"; - if (wt(e)) return "[VueViewModel]"; - if (de(e)) return "[SyntheticEvent]"; - if (typeof e == "number" && !Number.isFinite(e)) return `[${e}]`; - if (typeof e == "function") return `[Function: ${ie(e)}]`; - if (typeof e == "symbol") return `[${String(e)}]`; - if (typeof e == "bigint") return `[BigInt: ${String(e)}]`; - const n = dn(e); - return /^HTML(\w*)Element$/.test(n) ? `[HTMLElement: ${n}]` : `[object ${n}]`; - } catch (n) { - return `**non-serializable** (${n})`; - } -} -function dn(t) { - const e = Object.getPrototypeOf(t); - return e != null && e.constructor ? e.constructor.name : "null prototype"; -} -function pn(t) { - return ~-encodeURI(t).split(/%..|./).length; -} -function ln(t) { - return pn(JSON.stringify(t)); -} -function _n() { - const t = new WeakSet(); - function e(r) { - return t.has(r) ? !0 : (t.add(r), !1); - } - function n(r) { - t.delete(r); - } - return [e, n]; -} -const X = 0, - At = 1, - Ct = 2; -function Tr(t) { - return new N((e) => { - e(t); - }); -} -function Ir(t) { - return new N((e, n) => { - n(t); - }); -} -class N { - constructor(e) { - (this._state = X), (this._handlers = []), this._runExecutor(e); - } - then(e, n) { - return new N((r, s) => { - this._handlers.push([ - !1, - (i) => { - if (!e) r(i); - else - try { - r(e(i)); - } catch (o) { - s(o); - } - }, - (i) => { - if (!n) s(i); - else - try { - r(n(i)); - } catch (o) { - s(o); - } - }, - ]), - this._executeHandlers(); - }); - } - catch(e) { - return this.then((n) => n, e); - } - finally(e) { - return new N((n, r) => { - let s, i; - return this.then( - (o) => { - (i = !1), (s = o), e && e(); - }, - (o) => { - (i = !0), (s = o), e && e(); - } - ).then(() => { - if (i) { - r(s); - return; - } - n(s); - }); - }); - } - _executeHandlers() { - if (this._state === X) return; - const e = this._handlers.slice(); - (this._handlers = []), - e.forEach((n) => { - n[0] || (this._state === At && n[1](this._value), this._state === Ct && n[2](this._value), (n[0] = !0)); - }); - } - _runExecutor(e) { - const n = (i, o) => { - if (this._state === X) { - if (it(o)) { - o.then(r, s); - return; - } - (this._state = i), (this._value = o), this._executeHandlers(); - } - }, - r = (i) => { - n(At, i); - }, - s = (i) => { - n(Ct, i); - }; - try { - e(r, s); - } catch (i) { - s(i); - } - } -} -function tt(t, e, n, r = 0) { - return new N((s, i) => { - const o = t[r]; - if (e === null || typeof o != "function") s(e); - else { - const c = o({ ...e }, n); - S && o.id && c === null && h.log(`Event processor "${o.id}" dropped event`), - it(c) - ? c.then((a) => tt(t, a, n, r + 1).then(s)).then(null, i) - : tt(t, c, n, r + 1) - .then(s) - .then(null, i); - } - }); -} -function gn(t, e) { - const { fingerprint: n, span: r, breadcrumbs: s, sdkProcessingMetadata: i } = e; - hn(t, e), r && yn(t, r), En(t, n), mn(t, s), Sn(t, i); -} -function Nt(t, e) { - const { extra: n, tags: r, user: s, contexts: i, level: o, sdkProcessingMetadata: c, breadcrumbs: a, fingerprint: u, eventProcessors: f, attachments: d, propagationContext: l, transactionName: p, span: E } = e; - P(t, "extra", n), - P(t, "tags", r), - P(t, "user", s), - P(t, "contexts", i), - (t.sdkProcessingMetadata = B(t.sdkProcessingMetadata, c, 2)), - o && (t.level = o), - p && (t.transactionName = p), - E && (t.span = E), - a.length && (t.breadcrumbs = [...t.breadcrumbs, ...a]), - u.length && (t.fingerprint = [...t.fingerprint, ...u]), - f.length && (t.eventProcessors = [...t.eventProcessors, ...f]), - d.length && (t.attachments = [...t.attachments, ...d]), - (t.propagationContext = { ...t.propagationContext, ...l }); -} -function P(t, e, n) { - t[e] = B(t[e], n, 1); -} -function hn(t, e) { - const { extra: n, tags: r, user: s, contexts: i, level: o, transactionName: c } = e; - Object.keys(n).length && (t.extra = { ...n, ...t.extra }), - Object.keys(r).length && (t.tags = { ...r, ...t.tags }), - Object.keys(s).length && (t.user = { ...s, ...t.user }), - Object.keys(i).length && (t.contexts = { ...i, ...t.contexts }), - o && (t.level = o), - c && t.type !== "transaction" && (t.transaction = c); -} -function mn(t, e) { - const n = [...(t.breadcrumbs || []), ...e]; - t.breadcrumbs = n.length ? n : void 0; -} -function Sn(t, e) { - t.sdkProcessingMetadata = { ...t.sdkProcessingMetadata, ...e }; -} -function yn(t, e) { - (t.contexts = { trace: en(e), ...t.contexts }), (t.sdkProcessingMetadata = { dynamicSamplingContext: cn(e), ...t.sdkProcessingMetadata }); - const n = Ht(e), - r = Y(n).description; - r && !t.transaction && t.type === "transaction" && (t.transaction = r); -} -function En(t, e) { - (t.fingerprint = t.fingerprint ? (Array.isArray(t.fingerprint) ? t.fingerprint : [t.fingerprint]) : []), e && (t.fingerprint = t.fingerprint.concat(e)), t.fingerprint.length || delete t.fingerprint; -} -let k, xt, L; -function bn(t) { - const e = g._sentryDebugIds; - if (!e) return {}; - const n = Object.keys(e); - return ( - (L && n.length === xt) || - ((xt = n.length), - (L = n.reduce((r, s) => { - k || (k = {}); - const i = k[s]; - if (i) r[i[0]] = i[1]; - else { - const o = t(s); - for (let c = o.length - 1; c >= 0; c--) { - const a = o[c], - u = a == null ? void 0 : a.filename, - f = e[s]; - if (u && f) { - (r[u] = f), (k[s] = [u, f]); - break; - } - } - } - return r; - }, {}))), - L - ); -} -function Ar(t, e, n, r, s, i) { - const { normalizeDepth: o = 3, normalizeMaxBreadth: c = 1e3 } = t, - a = { ...e, event_id: e.event_id || n.event_id || T(), timestamp: e.timestamp || at() }, - u = n.integrations || t.integrations.map((m) => m.name); - Tn(a, t), Cn(a, u), s && s.emit("applyFrameMetadata", e), e.type === void 0 && In(a, t.stackParser); - const f = xn(r, n.captureContext); - n.mechanism && Se(a, n.mechanism); - const d = s ? s.getEventProcessors() : [], - l = we().getScopeData(); - if (i) { - const m = i.getScopeData(); - Nt(l, m); - } - if (f) { - const m = f.getScopeData(); - Nt(l, m); - } - const p = [...(n.attachments || []), ...l.attachments]; - p.length && (n.attachments = p), gn(a, l); - const E = [...d, ...l.eventProcessors]; - return tt(E, a, n).then((m) => (m && An(m), typeof o == "number" && o > 0 ? Nn(m, o, c) : m)); -} -function Tn(t, e) { - const { environment: n, release: r, dist: s, maxValueLength: i = 250 } = e; - (t.environment = t.environment || n || Yt), !t.release && r && (t.release = r), !t.dist && s && (t.dist = s); - const o = t.request; - o != null && o.url && (o.url = $(o.url, i)); -} -function In(t, e) { - var r, s; - const n = bn(e); - (s = (r = t.exception) == null ? void 0 : r.values) == null || - s.forEach((i) => { - var o, c; - (c = (o = i.stacktrace) == null ? void 0 : o.frames) == null || - c.forEach((a) => { - a.filename && (a.debug_id = n[a.filename]); - }); - }); -} -function An(t) { - var r, s; - const e = {}; - if ( - ((s = (r = t.exception) == null ? void 0 : r.values) == null || - s.forEach((i) => { - var o, c; - (c = (o = i.stacktrace) == null ? void 0 : o.frames) == null || - c.forEach((a) => { - a.debug_id && (a.abs_path ? (e[a.abs_path] = a.debug_id) : a.filename && (e[a.filename] = a.debug_id), delete a.debug_id); - }); - }), - Object.keys(e).length === 0) - ) - return; - (t.debug_meta = t.debug_meta || {}), (t.debug_meta.images = t.debug_meta.images || []); - const n = t.debug_meta.images; - Object.entries(e).forEach(([i, o]) => { - n.push({ type: "sourcemap", code_file: i, debug_id: o }); - }); -} -function Cn(t, e) { - e.length > 0 && ((t.sdk = t.sdk || {}), (t.sdk.integrations = [...(t.sdk.integrations || []), ...e])); -} -function Nn(t, e, n) { - var s, i; - if (!t) return null; - const r = { - ...t, - ...(t.breadcrumbs && { breadcrumbs: t.breadcrumbs.map((o) => ({ ...o, ...(o.data && { data: b(o.data, e, n) }) })) }), - ...(t.user && { user: b(t.user, e, n) }), - ...(t.contexts && { contexts: b(t.contexts, e, n) }), - ...(t.extra && { extra: b(t.extra, e, n) }), - }; - return ( - (s = t.contexts) != null && s.trace && r.contexts && ((r.contexts.trace = t.contexts.trace), t.contexts.trace.data && (r.contexts.trace.data = b(t.contexts.trace.data, e, n))), - t.spans && (r.spans = t.spans.map((o) => ({ ...o, ...(o.data && { data: b(o.data, e, n) }) }))), - (i = t.contexts) != null && i.flags && r.contexts && (r.contexts.flags = b(t.contexts.flags, 3, n)), - r - ); -} -function xn(t, e) { - if (!e) return t; - const n = t ? t.clone() : new y(); - return n.update(e), n; -} -function Rn(t) { - if (t) return On(t) ? { captureContext: t } : Mn(t) ? { captureContext: t } : t; -} -function On(t) { - return t instanceof y || typeof t == "function"; -} -const Dn = ["user", "level", "extra", "contexts", "tags", "fingerprint", "propagationContext"]; -function Mn(t) { - return Object.keys(t).some((e) => Dn.includes(e)); -} -function Cr(t, e) { - return R().captureException(t, Rn(e)); -} -function Nr(t, e) { - return R().captureEvent(t, e); -} -function xr(t, e) { - z().setContext(t, e); -} -function Rr() { - const t = H(); - return (t == null ? void 0 : t.getOptions().enabled) !== !1 && !!(t != null && t.getTransport()); -} -function Or(t) { - const e = z(), - n = R(), - { userAgent: r } = g.navigator || {}, - s = Te({ user: n.getUser() || e.getUser(), ...(r && { userAgent: r }), ...t }), - i = e.getSession(); - return (i == null ? void 0 : i.status) === "ok" && v(i, { status: "exited" }), Wt(), e.setSession(s), s; -} -function Wt() { - const t = z(), - n = R().getSession() || t.getSession(); - n && Ie(n), Xt(), t.setSession(); -} -function Xt() { - const t = z(), - e = H(), - n = t.getSession(); - n && e && e.captureSession(n); -} -function Dr(t = !1) { - if (t) { - Wt(); - return; - } - Xt(); -} -export { - fr as $, - rr as A, - H as B, - jt as C, - S as D, - R as E, - mr as F, - g as G, - nr as H, - lr as I, - it as J, - an as K, - Et as L, - qn as M, - D as N, - G as O, - q as P, - Er as Q, - z as R, - _ as S, - pr as T, - gr as U, - ar as V, - ke as W, - Zn as X, - hr as Y, - at as Z, - mt as _, - Sr as a, - T as a0, - Xn as a1, - Un as a2, - v as a3, - Tr as a4, - Yt as a5, - N as a6, - Ar as a7, - Qn as a8, - br as a9, - vn as aA, - he as aB, - Wn as aC, - Se as aD, - Cr as aE, - Ln as aF, - Fn as aG, - $n as aH, - ce as aI, - un as aJ, - Vn as aK, - Jn as aL, - le as aM, - Bn as aN, - F as aO, - re as aP, - ne as aQ, - Gn as aR, - Or as aS, - Dr as aT, - Nr as aU, - Pn as aV, - Le as aW, - ir as aX, - dr as aY, - Ir as aa, - ae as ab, - B as ac, - Mt as ad, - j as ae, - nt as af, - O as ag, - Rr as ah, - _r as ai, - cr as aj, - qe as ak, - Ze as al, - Qe as am, - Yn as an, - Kn as ao, - zn as ap, - M as aq, - wn as ar, - Hn as as, - dt as at, - kn as au, - or as av, - jn as aw, - vt as ax, - oe as ay, - I as az, - Ht as b, - U as c, - h as d, - ut as e, - et as f, - ie as g, - ur as h, - ge as i, - cn as j, - Y as k, - yr as l, - ft as m, - b as n, - tr as o, - er as p, - Fe as q, - $e as r, - xr as s, - ct as t, - zt as u, - Tt as v, - Pe as w, - nn as x, - on as y, - sr as z, -}; diff --git a/frontend-backup/_app/immutable/chunks/DS58drb5.js b/frontend-backup/_app/immutable/chunks/DS58drb5.js deleted file mode 100644 index 85c4eda..0000000 --- a/frontend-backup/_app/immutable/chunks/DS58drb5.js +++ /dev/null @@ -1 +0,0 @@ -import{F as E,G as _,l as v,z as g,H as i,I as S,h as k,J as I,K as D,L as y}from"./BDALf20I.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new e.Error().stack;f&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[f]="6fc49d13-f7d8-42d1-9723-e4fb7b109694",e._sentryDebugIdIdentifier="sentry-dbid-6fc49d13-f7d8-42d1-9723-e4fb7b109694")})()}catch{}function A(e,f,l=f){var d=E(),r=new WeakSet;_(e,"input",s=>{var a=s?e.defaultValue:e.value;if(a=h(e)?b(a):a,l(a),v!==null&&r.add(v),d&&a!==(a=f())){var t=e.selectionStart,n=e.selectionEnd;e.value=a??"",n!==null&&(e.selectionStart=t,e.selectionEnd=Math.min(n,e.value.length))}}),(k&&e.defaultValue!==e.value||g(f)==null&&e.value)&&(l(h(e)?b(e.value):e.value),v!==null&&r.add(v)),i(()=>{var s=f();if(e===document.activeElement){var a=S??v;if(r.has(a))return}h(e)&&s===b(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}const u=new Set;function C(e,f,l,d,r=d){var s=l.getAttribute("type")==="checkbox",a=e;let t=!1;if(f!==null)for(var n of f)a=a[n]??(a[n]=[]);a.push(l),_(l,"change",()=>{var c=l.__value;s&&(c=m(a,c,l.checked)),r(c)},()=>r(s?[]:null)),i(()=>{var c=d();if(k&&l.defaultChecked!==l.checked){t=!0;return}s?(c=c||[],l.checked=c.includes(l.__value)):l.checked=I(l.__value,c)}),D(()=>{var c=a.indexOf(l);c!==-1&&a.splice(c,1)}),u.has(a)||(u.add(a),y(()=>{a.sort((c,o)=>c.compareDocumentPosition(o)===4?-1:1),u.delete(a)})),y(()=>{if(t){var c;if(s)c=m(a,c,l.checked);else{var o=a.find(w=>w.checked);c=o==null?void 0:o.__value}r(c)}})}function L(e,f,l=f){_(e,"change",d=>{var r=d?e.defaultChecked:e.checked;l(r)}),(k&&e.defaultChecked!==e.checked||g(f)==null)&&l(e.checked),i(()=>{var d=f();e.checked=!!d})}function m(e,f,l){for(var d=new Set,r=0;r "Timeout", - D = () => "Timeout", - M = (t = {}, e = {}) => ((e.locale ?? z()) === "en" ? C() : D()); -function q(t) { - const e = t - 1; - return e * e * e + 1; -} -function O(t, { from: e, to: r }, u = {}) { - var { delay: h = 0, duration: i = (n) => Math.sqrt(n) * 120, easing: y = q } = u, - o = getComputedStyle(t), - g = o.transform === "none" ? "" : o.transform, - [s, c] = o.transformOrigin.split(" ").map(parseFloat); - (s /= t.clientWidth), (c /= t.clientHeight); - var f = H(t), - p = t.clientWidth / r.width / f, - v = t.clientHeight / r.height / f, - b = e.left + e.width * s, - m = e.top + e.height * c, - w = r.left + r.width * s, - x = r.top + r.height * c, - l = (b - w) * p, - d = (m - x) * v, - S = e.width / r.width, - _ = e.height / r.height; - return { - delay: h, - duration: typeof i == "function" ? i(Math.sqrt(l * l + d * d)) : i, - easing: y, - css: (n, a) => { - var T = a * l, - E = a * d, - I = n + a * S, - $ = n + a * _; - return `transform: ${g} translate(${T}px, ${E}px) scale(${I}, ${$});`; - }, - }; -} -function H(t) { - if ("currentCSSZoom" in t) return t.currentCSSZoom; - for (var e = t, r = 1; e !== null; ) (r *= +getComputedStyle(e).zoom), (e = e.parentElement); - return r; -} -export { O as f, M as t }; diff --git a/frontend-backup/_app/immutable/chunks/DTFgqBF9.js b/frontend-backup/_app/immutable/chunks/DTFgqBF9.js new file mode 100644 index 0000000..7344223 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/DTFgqBF9.js @@ -0,0 +1,126 @@ +import { g as o } from "./CV9xcpLq.js"; +import "./Ch2Ub8FX.js"; +import { v as i, b as a } from "./CMvZtFtm.js"; +import { b as p } from "./C5yqZvKC.js"; +import { r as u } from "./BF50aS-j.js"; +(function () { + try { + var t = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + t.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var t = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + e = new t.Error().stack; + e && + ((t._sentryDebugIds = t._sentryDebugIds || {}), + (t._sentryDebugIds[e] = "6745f234-f59d-4730-a832-4873b80dedc4"), + (t._sentryDebugIdIdentifier = + "sentry-dbid-6745f234-f59d-4730-a832-4873b80dedc4")); + })(); +} catch {} +const _ = () => "Reported users", + d = () => "Usuários denunciados", + O = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? _() : d()), + f = () => "No pending reports", + y = () => "Sem denúncias pendentes", + Q = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? f() : y()), + m = () => "Ticket", + g = () => "Ticket", + W = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? m() : g()), + x = () => "Times reported", + b = () => "Denúncias", + X = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? x() : b()), + C = () => "Timeout count", + h = () => "Contagem de timeouts", + ee = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? C() : h()), + I = () => "Last timeout reason", + v = () => "Motivo do último timeout", + te = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? I() : v()), + w = () => "Reported by", + D = () => "Denunciado por", + ne = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? w() : D()), + F = () => "Reason", + T = () => "Motivo", + oe = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? F() : T()), + k = () => "Time", + $ = () => "Hora", + re = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? k() : $()), + M = () => "Reported pixel", + R = () => "Pixel reportado", + se = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? M() : R()), + E = () => "Aggressor's Last pixel painted", + L = () => "Último pixel pintado pelo agressor", + ce = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? E() : L()), + j = () => "Accounts with same IP", + A = () => "Contas com mesmo IP", + le = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? j() : A()), + P = () => "Report", + S = () => "Denúncia", + ie = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? P() : S()), + Z = () => "User ID copied", + N = () => "ID do usuário copiado", + ae = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? Z() : N()), + U = (t) => `Copy user ID: #${t.userId}`, + z = (t) => `Copiar ID do usuário: #${t.userId}`, + pe = (t, e = {}) => ((e.locale ?? o()) === "en" ? U(t) : z(t)), + B = () => "Alliance ID copied", + H = () => "ID da aliança copiado", + ue = (t = {}, e = {}) => ((e.locale ?? o()) === "en" ? B() : H()); +var V = i( + '' +); +function _e(t, e) { + let n = u(e, ["$$slots", "$$events", "$$legacy"]); + var r = V(); + p(r, () => ({ display: "block", viewBox: "0 0 27 41", ...n })), a(t, r); +} +function de(t, e) { + let n = t[0], + r = e(n); + for (let s = 1; s < t.length; s++) { + const c = t[s], + l = e(c); + l > r && ((n = c), (r = l)); + } + return n; +} +export { + _e as M, + ie as a, + ne as b, + oe as c, + se as d, + W as e, + pe as f, + X as g, + le as h, + ee as i, + te as j, + ue as k, + ce as l, + de as m, + Q as n, + O as r, + re as t, + ae as u, +}; diff --git a/frontend-backup/_app/immutable/chunks/DUoKDNpf.js b/frontend-backup/_app/immutable/chunks/DUoKDNpf.js deleted file mode 100644 index a0e8b59..0000000 --- a/frontend-backup/_app/immutable/chunks/DUoKDNpf.js +++ /dev/null @@ -1,1678 +0,0 @@ -var yn = Object.defineProperty; -var me = t => { - throw TypeError(t) -}; -var gn = (t, e, n) => e in t ? yn(t, e, {enumerable: !0, configurable: !0, writable: !0, value: n}) : t[e] = n; -var xt = (t, e, n) => gn(t, typeof e != "symbol" ? e + "" : e, n), Jt = (t, e, n) => e.has(t) || me("Cannot " + n); -var d = (t, e, n) => (Jt(t, e, "read from private field"), n ? n.call(t) : e.get(t)), - x = (t, e, n) => e.has(t) ? me("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), - R = (t, e, n, r) => (Jt(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n), - Q = (t, e, n) => (Jt(t, e, "access private method"), n); -const mr = !1; -var Pe = Array.isArray, En = Array.prototype.indexOf, br = Array.from, ee = Object.defineProperty, - Ot = Object.getOwnPropertyDescriptor, mn = Object.getOwnPropertyDescriptors, bn = Object.prototype, - Tn = Array.prototype, De = Object.getPrototypeOf, be = Object.isExtensible; - -function Tr(t) { - return typeof t == "function" -} - -const Ar = () => { -}; - -function xr(t) { - return t() -} - -function Me(t) { - for (var e = 0; e < t.length; e++) t[e]() -} - -function An() { - var t, e, n = new Promise((r, a) => { - t = r, e = a - }); - return {promise: n, resolve: t, reject: e} -} - -function kr(t, e) { - if (Array.isArray(t)) return t; - if (!(Symbol.iterator in t)) return Array.from(t); - const n = []; - for (const r of t) if (n.push(r), n.length === e) break; - return n -} - -const O = 2, le = 4, $t = 8, bt = 16, Y = 32, ft = 64, Le = 128, C = 256, Ht = 512, b = 1024, L = 2048, Z = 4096, - K = 8192, Tt = 16384, fe = 32768, Fe = 65536, Te = 1 << 17, xn = 1 << 18, oe = 1 << 19, qe = 1 << 20, ne = 1 << 21, - ce = 1 << 22, at = 1 << 23, st = Symbol("$state"), Sr = Symbol("legacy props"), Nr = Symbol(""), - _e = new class extends Error { - constructor() { - super(...arguments); - xt(this, "name", "StaleReactionError"); - xt(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed") - } - }, ve = 3, de = 8; - -function kn() { - throw new Error("https://svelte.dev/e/await_outside_boundary") -} - -function Sn(t) { - throw new Error("https://svelte.dev/e/lifecycle_outside_component") -} - -function Nn() { - throw new Error("https://svelte.dev/e/async_derived_orphan") -} - -function On(t) { - throw new Error("https://svelte.dev/e/effect_in_teardown") -} - -function Rn() { - throw new Error("https://svelte.dev/e/effect_in_unowned_derived") -} - -function In(t) { - throw new Error("https://svelte.dev/e/effect_orphan") -} - -function Cn() { - throw new Error("https://svelte.dev/e/effect_update_depth_exceeded") -} - -function Rr() { - throw new Error("https://svelte.dev/e/get_abort_signal_outside_reaction") -} - -function Ir() { - throw new Error("https://svelte.dev/e/hydration_failed") -} - -function Cr(t) { - throw new Error("https://svelte.dev/e/lifecycle_legacy_only") -} - -function Pr(t) { - throw new Error("https://svelte.dev/e/props_invalid_value") -} - -function Pn() { - throw new Error("https://svelte.dev/e/state_descriptors_fixed") -} - -function Dn() { - throw new Error("https://svelte.dev/e/state_prototype_fixed") -} - -function Mn() { - throw new Error("https://svelte.dev/e/state_unsafe_mutation") -} - -const Dr = 1, Mr = 2, Lr = 4, Fr = 8, qr = 16, jr = 1, Yr = 2, Hr = 4, Ur = 8, Vr = 16, Br = 1, Wr = 2, $r = 4, Ln = 1, - Fn = 2, qn = "[", jn = "[!", Yn = "]", he = {}, m = Symbol(), Gr = "http://www.w3.org/1999/xhtml", Kr = "@attach"; - -function pe(t) { - console.warn("https://svelte.dev/e/hydration_mismatch") -} - -function zr() { - console.warn("https://svelte.dev/e/select_multiple_invalid_value") -} - -let S = !1; - -function Xr(t) { - S = t -} - -let y; - -function yt(t) { - if (t === null) throw pe(), he; - return y = t -} - -function je() { - return yt(ot(y)) -} - -function Zr(t) { - if (S) { - if (ot(y) !== null) throw pe(), he; - y = t - } -} - -function Jr(t = 1) { - if (S) { - for (var e = t, n = y; e--;) n = ot(n); - y = n - } -} - -function Qr() { - for (var t = 0, e = y; ;) { - if (e.nodeType === de) { - var n = e.data; - if (n === Yn) { - if (t === 0) return e; - t -= 1 - } else (n === qn || n === jn) && (t += 1) - } - var r = ot(e); - e.remove(), e = r - } -} - -function ta(t) { - if (!t || t.nodeType !== de) throw pe(), he; - return t.data -} - -function Ye(t) { - return t === this.v -} - -function Hn(t, e) { - return t != t ? e == e : t !== e || t !== null && typeof t == "object" || typeof t == "function" -} - -function ea(t, e) { - return t !== e -} - -function He(t) { - return !Hn(t, this.v) -} - -let Gt = !1; - -function na() { - Gt = !0 -} - -let g = null; - -function Ut(t) { - g = t -} - -function ra(t) { - return Kt().get(t) -} - -function aa(t, e) { - return Kt().set(t, e), e -} - -function sa(t) { - return Kt().has(t) -} - -function ia() { - return Kt() -} - -function ua(t, e = !1, n) { - g = {p: g, c: null, e: null, s: t, x: null, l: Gt && !e ? {s: null, u: null, $: []} : null} -} - -function la(t) { - var e = g, n = e.e; - if (n !== null) { - e.e = null; - for (var r of n) rn(r) - } - return t !== void 0 && (e.x = t), g = e.p, t ?? {} -} - -function Ft() { - return !Gt || g !== null && g.l === null -} - -function Kt(t) { - return g === null && Sn(), g.c ?? (g.c = new Map(Un(g) || void 0)) -} - -function Un(t) { - let e = t.p; - for (; e !== null;) { - const n = e.c; - if (n !== null) return n; - e = e.p - } - return null -} - -const Vn = new WeakMap; - -function Bn(t) { - var e = v; - if (e === null) return _.f |= at, t; - if ((e.f & fe) === 0) { - if ((e.f & Le) === 0) throw !e.parent && t instanceof Error && Ue(t), t; - e.b.error(t) - } else we(t, e) -} - -function we(t, e) { - for (; e !== null;) { - if ((e.f & Le) !== 0) try { - e.b.error(t); - return - } catch (n) { - t = n - } - e = e.parent - } - throw t instanceof Error && Ue(t), t -} - -function Ue(t) { - const e = Vn.get(t); - e && (ee(t, "message", {value: e.message}), ee(t, "stack", {value: e.stack})) -} - -const Wn = typeof requestIdleCallback > "u" ? t => setTimeout(t, 1) : requestIdleCallback; -let Rt = [], It = []; - -function Ve() { - var t = Rt; - Rt = [], Me(t) -} - -function Be() { - var t = It; - It = [], Me(t) -} - -function We(t) { - Rt.length === 0 && queueMicrotask(Ve), Rt.push(t) -} - -function fa(t) { - It.length === 0 && Wn(Be), It.push(t) -} - -function $n() { - Rt.length > 0 && Ve(), It.length > 0 && Be() -} - -function Gn() { - for (var t = v.b; t !== null && !t.has_pending_snippet();) t = t.parent; - return t === null && kn(), t -} - -function ye(t) { - var e = O | L, n = _ !== null && (_.f & O) !== 0 ? _ : null; - return v === null || n !== null && (n.f & C) !== 0 ? e |= C : v.f |= oe, { - ctx: g, - deps: null, - effects: null, - equals: Ye, - f: e, - fn: t, - reactions: null, - rv: 0, - v: m, - wv: 0, - parent: n ?? v, - ac: null - } -} - -function Kn(t, e) { - let n = v; - n === null && Nn(); - var r = n.b, a = void 0, s = Ee(m), u = null, l = !_; - return sr(() => { - try { - var i = t() - } catch (h) { - i = Promise.reject(h) - } - var f = () => i; - a = (u == null ? void 0 : u.then(f, f)) ?? Promise.resolve(i), u = a; - var o = E, c = r.pending; - l && (r.update_pending_count(1), c || o.increment()); - const w = (h, p = void 0) => { - u = null, c || o.activate(), p ? p !== _e && (s.f |= at, ie(s, p)) : ((s.f & at) !== 0 && (s.f ^= at), ie(s, h)), l && (r.update_pending_count(-1), c || o.decrement()), Ke() - }; - if (a.then(w, h => w(null, h || "unknown")), o) return () => { - queueMicrotask(() => o.neuter()) - } - }), new Promise(i => { - function f(o) { - function c() { - o === a ? i(s) : f(a) - } - - o.then(c, c) - } - - f(a) - }) -} - -function oa(t) { - const e = ye(t); - return on(e), e -} - -function zn(t) { - const e = ye(t); - return e.equals = He, e -} - -function $e(t) { - var e = t.effects; - if (e !== null) { - t.effects = null; - for (var n = 0; n < e.length; n += 1) lt(e[n]) - } -} - -function Xn(t) { - for (var e = t.parent; e !== null;) { - if ((e.f & O) === 0) return e; - e = e.parent - } - return null -} - -function ge(t) { - var e, n = v; - X(Xn(t)); - try { - $e(t), e = dn(t) - } finally { - X(n) - } - return e -} - -function Ge(t) { - var e = ge(t); - if (t.equals(e) || (t.v = e, t.wv = _n()), !At) if (W !== null) W.set(t, t.v); else { - var n = ($ || (t.f & C) !== 0) && t.deps !== null ? Z : b; - k(t, n) - } -} - -function Zn(t, e, n) { - const r = Ft() ? ye : zn; - if (e.length === 0) { - n(t.map(r)); - return - } - var a = E, s = v, u = Jn(), l = Gn(); - Promise.all(e.map(i => Kn(i))).then(i => { - a == null || a.activate(), u(); - try { - n([...t.map(r), ...i]) - } catch (f) { - (s.f & Tt) === 0 && we(f, s) - } - a == null || a.deactivate(), Ke() - }).catch(i => { - l.error(i) - }) -} - -function Jn() { - var t = v, e = _, n = g; - return function () { - X(t), F(e), Ut(n) - } -} - -function Ke() { - X(null), F(null), Ut(null) -} - -const kt = new Set; -let E = null, Qt = null, W = null, Ae = new Set, Vt = []; - -function ze() { - const t = Vt.shift(); - Vt.length > 0 && queueMicrotask(ze), t() -} - -let ut = [], zt = null, re = !1, jt = !1; -var dt, ht, V, Pt, Dt, nt, pt, rt, B, wt, Mt, Lt, M, Xe, Yt, ae; -const Wt = class Wt { - constructor() { - x(this, M); - xt(this, "current", new Map); - x(this, dt, new Map); - x(this, ht, new Set); - x(this, V, 0); - x(this, Pt, null); - x(this, Dt, !1); - x(this, nt, []); - x(this, pt, []); - x(this, rt, []); - x(this, B, []); - x(this, wt, []); - x(this, Mt, []); - x(this, Lt, []); - xt(this, "skipped_effects", new Set) - } - - process(e) { - var s; - ut = [], Qt = null; - var n = null; - if (kt.size > 1) { - n = new Map, W = new Map; - for (const [u, l] of this.current) n.set(u, {v: u.v, wv: u.wv}), u.v = l; - for (const u of kt) if (u !== this) for (const [l, i] of d(u, dt)) n.has(l) || (n.set(l, { - v: l.v, - wv: l.wv - }), l.v = i) - } - for (const u of e) Q(this, M, Xe).call(this, u); - if (d(this, nt).length === 0 && d(this, V) === 0) { - Q(this, M, ae).call(this); - var r = d(this, rt), a = d(this, B); - R(this, rt, []), R(this, B, []), R(this, wt, []), Qt = E, E = null, xe(r), xe(a), E === null ? E = this : kt.delete(this), (s = d(this, Pt)) == null || s.resolve() - } else Q(this, M, Yt).call(this, d(this, rt)), Q(this, M, Yt).call(this, d(this, B)), Q(this, M, Yt).call(this, d(this, wt)); - if (n) { - for (const [u, {v: l, wv: i}] of n) u.wv <= i && (u.v = l); - W = null - } - for (const u of d(this, nt)) vt(u); - for (const u of d(this, pt)) vt(u); - R(this, nt, []), R(this, pt, []) - } - - capture(e, n) { - d(this, dt).has(e) || d(this, dt).set(e, n), this.current.set(e, e.v) - } - - activate() { - E = this - } - - deactivate() { - E = null, Qt = null; - for (const e of Ae) if (Ae.delete(e), e(), E !== null) break - } - - neuter() { - R(this, Dt, !0) - } - - flush() { - ut.length > 0 ? se() : Q(this, M, ae).call(this), E === this && (d(this, V) === 0 && kt.delete(this), this.deactivate()) - } - - increment() { - R(this, V, d(this, V) + 1) - } - - decrement() { - if (R(this, V, d(this, V) - 1), d(this, V) === 0) { - for (const e of d(this, Mt)) k(e, L), Et(e); - for (const e of d(this, Lt)) k(e, Z), Et(e); - R(this, rt, []), R(this, B, []), this.flush() - } else this.deactivate() - } - - add_callback(e) { - d(this, ht).add(e) - } - - settled() { - return (d(this, Pt) ?? R(this, Pt, An())).promise - } - - static ensure() { - if (E === null) { - const e = E = new Wt; - kt.add(E), jt || Wt.enqueue(() => { - E === e && e.flush() - }) - } - return E - } - - static enqueue(e) { - Vt.length === 0 && queueMicrotask(ze), Vt.unshift(e) - } -}; -dt = new WeakMap, ht = new WeakMap, V = new WeakMap, Pt = new WeakMap, Dt = new WeakMap, nt = new WeakMap, pt = new WeakMap, rt = new WeakMap, B = new WeakMap, wt = new WeakMap, Mt = new WeakMap, Lt = new WeakMap, M = new WeakSet, Xe = function (e) { - var o; - e.f ^= b; - for (var n = e.first; n !== null;) { - var r = n.f, a = (r & (Y | ft)) !== 0, s = a && (r & b) !== 0, - u = s || (r & K) !== 0 || this.skipped_effects.has(n); - if (!u && n.fn !== null) { - if (a) n.f ^= b; else if ((r & le) !== 0) d(this, B).push(n); else if ((r & b) === 0) if ((r & ce) !== 0) { - var l = (o = n.b) != null && o.pending ? d(this, pt) : d(this, nt); - l.push(n) - } else Zt(n) && ((n.f & bt) !== 0 && d(this, wt).push(n), vt(n)); - var i = n.first; - if (i !== null) { - n = i; - continue - } - } - var f = n.parent; - for (n = n.next; n === null && f !== null;) n = f.next, f = f.parent - } -}, Yt = function (e) { - for (const n of e) ((n.f & L) !== 0 ? d(this, Mt) : d(this, Lt)).push(n), k(n, b); - e.length = 0 -}, ae = function () { - if (!d(this, Dt)) for (const e of d(this, ht)) e(); - d(this, ht).clear() -}; -let gt = Wt; - -function Qn(t) { - var e = jt; - jt = !0; - try { - var n; - for (t && (se(), n = t()); ;) { - if ($n(), ut.length === 0 && (E == null || E.flush(), ut.length === 0)) return zt = null, n; - se() - } - } finally { - jt = e - } -} - -function se() { - var t = _t; - re = !0; - try { - var e = 0; - for (Oe(!0); ut.length > 0;) { - var n = gt.ensure(); - if (e++ > 1e3) { - var r, a; - tr() - } - n.process(ut), G.clear() - } - } finally { - re = !1, Oe(t), zt = null - } -} - -function tr() { - try { - Cn() - } catch (t) { - we(t, zt) - } -} - -let et = null; - -function xe(t) { - var e = t.length; - if (e !== 0) { - for (var n = 0; n < e;) { - var r = t[n++]; - if ((r.f & (Tt | K)) === 0 && Zt(r) && (et = [], vt(r), r.deps === null && r.first === null && r.nodes_start === null && (r.teardown === null && r.ac === null ? un(r) : r.fn = null), et.length > 0)) { - G.clear(); - for (const a of et) vt(a); - et = [] - } - } - et = null - } -} - -function Et(t) { - for (var e = zt = t; e.parent !== null;) { - e = e.parent; - var n = e.f; - if (re && e === v && (n & bt) !== 0) return; - if ((n & (ft | Y)) !== 0) { - if ((n & b) === 0) return; - e.f ^= b - } - } - ut.push(e) -} - -const G = new Map; - -function Ee(t, e) { - var n = {f: 0, v: t, reactions: null, equals: Ye, rv: 0, wv: 0}; - return n -} - -function U(t, e) { - const n = Ee(t); - return on(n), n -} - -function ca(t, e = !1, n = !0) { - var a; - const r = Ee(t); - return e || (r.equals = He), Gt && n && g !== null && g.l !== null && ((a = g.l).s ?? (a.s = [])).push(r), r -} - -function tt(t, e, n = !1) { - _ !== null && (!D || (_.f & Te) !== 0) && Ft() && (_.f & (O | bt | ce | Te)) !== 0 && !(A != null && A.includes(t)) && Mn(); - let r = n ? St(e) : e; - return ie(t, r) -} - -function ie(t, e) { - if (!t.equals(e)) { - var n = t.v; - At ? G.set(t, e) : G.set(t, n), t.v = e; - var r = gt.ensure(); - r.capture(t, n), (t.f & O) !== 0 && ((t.f & L) !== 0 && ge(t), k(t, (t.f & C) === 0 ? b : Z)), t.wv = _n(), Ze(t, L), Ft() && v !== null && (v.f & b) !== 0 && (v.f & (Y | ft)) === 0 && (I === null ? or([t]) : I.push(t)) - } - return e -} - -function te(t) { - tt(t, t.v + 1) -} - -function Ze(t, e) { - var n = t.reactions; - if (n !== null) for (var r = Ft(), a = n.length, s = 0; s < a; s++) { - var u = n[s], l = u.f; - if (!(!r && u === v)) { - var i = (l & L) === 0; - i && k(u, e), (l & O) !== 0 ? Ze(u, Z) : i && ((l & bt) !== 0 && et !== null && et.push(u), Et(u)) - } - } -} - -function St(t) { - if (typeof t != "object" || t === null || st in t) return t; - const e = De(t); - if (e !== bn && e !== Tn) return t; - var n = new Map, r = Pe(t), a = U(0), s = it, u = l => { - if (it === s) return l(); - var i = _, f = it; - F(null), Ie(s); - var o = l(); - return F(i), Ie(f), o - }; - return r && n.set("length", U(t.length)), new Proxy(t, { - defineProperty(l, i, f) { - (!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) && Pn(); - var o = n.get(i); - return o === void 0 ? o = u(() => { - var c = U(f.value); - return n.set(i, c), c - }) : tt(o, f.value, !0), !0 - }, deleteProperty(l, i) { - var f = n.get(i); - if (f === void 0) { - if (i in l) { - const o = u(() => U(m)); - n.set(i, o), te(a) - } - } else tt(f, m), te(a); - return !0 - }, get(l, i, f) { - var h; - if (i === st) return t; - var o = n.get(i), c = i in l; - if (o === void 0 && (!c || (h = Ot(l, i)) != null && h.writable) && (o = u(() => { - var p = St(c ? l[i] : m), P = U(p); - return P - }), n.set(i, o)), o !== void 0) { - var w = Nt(o); - return w === m ? void 0 : w - } - return Reflect.get(l, i, f) - }, getOwnPropertyDescriptor(l, i) { - var f = Reflect.getOwnPropertyDescriptor(l, i); - if (f && "value" in f) { - var o = n.get(i); - o && (f.value = Nt(o)) - } else if (f === void 0) { - var c = n.get(i), w = c == null ? void 0 : c.v; - if (c !== void 0 && w !== m) return {enumerable: !0, configurable: !0, value: w, writable: !0} - } - return f - }, has(l, i) { - var w; - if (i === st) return !0; - var f = n.get(i), o = f !== void 0 && f.v !== m || Reflect.has(l, i); - if (f !== void 0 || v !== null && (!o || (w = Ot(l, i)) != null && w.writable)) { - f === void 0 && (f = u(() => { - var h = o ? St(l[i]) : m, p = U(h); - return p - }), n.set(i, f)); - var c = Nt(f); - if (c === m) return !1 - } - return o - }, set(l, i, f, o) { - var J; - var c = n.get(i), w = i in l; - if (r && i === "length") for (var h = f; h < c.v; h += 1) { - var p = n.get(h + ""); - p !== void 0 ? tt(p, m) : h in l && (p = u(() => U(m)), n.set(h + "", p)) - } - if (c === void 0) (!w || (J = Ot(l, i)) != null && J.writable) && (c = u(() => U(void 0)), tt(c, St(f)), n.set(i, c)); else { - w = c.v !== m; - var P = u(() => St(f)); - tt(c, P) - } - var H = Reflect.getOwnPropertyDescriptor(l, i); - if (H != null && H.set && H.set.call(o, f), !w) { - if (r && typeof i == "string") { - var qt = n.get("length"), ct = Number(i); - Number.isInteger(ct) && ct >= qt.v && tt(qt, ct + 1) - } - te(a) - } - return !0 - }, ownKeys(l) { - Nt(a); - var i = Reflect.ownKeys(l).filter(c => { - var w = n.get(c); - return w === void 0 || w.v !== m - }); - for (var [f, o] of n) o.v !== m && !(f in l) && i.push(f); - return i - }, setPrototypeOf() { - Dn() - } - }) -} - -function ke(t) { - try { - if (t !== null && typeof t == "object" && st in t) return t[st] - } catch { - } - return t -} - -function _a(t, e) { - return Object.is(ke(t), ke(e)) -} - -var Se, er, Je, Qe, tn; - -function va() { - if (Se === void 0) { - Se = window, er = document, Je = /Firefox/.test(navigator.userAgent); - var t = Element.prototype, e = Node.prototype, n = Text.prototype; - Qe = Ot(e, "firstChild").get, tn = Ot(e, "nextSibling").get, be(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), be(n) && (n.__t = void 0) - } -} - -function mt(t = "") { - return document.createTextNode(t) -} - -function z(t) { - return Qe.call(t) -} - -function ot(t) { - return tn.call(t) -} - -function da(t, e) { - if (!S) return z(t); - var n = z(y); - if (n === null) n = y.appendChild(mt()); else if (e && n.nodeType !== ve) { - var r = mt(); - return n == null || n.before(r), yt(r), r - } - return yt(n), n -} - -function ha(t, e) { - if (!S) { - var n = z(t); - return n instanceof Comment && n.data === "" ? ot(n) : n - } - return y -} - -function pa(t, e = 1, n = !1) { - let r = S ? y : t; - for (var a; e--;) a = r, r = ot(r); - if (!S) return r; - if (n && (r == null ? void 0 : r.nodeType) !== ve) { - var s = mt(); - return r === null ? a == null || a.after(s) : r.before(s), yt(s), s - } - return yt(r), r -} - -function nr(t) { - t.textContent = "" -} - -function wa() { - return !1 -} - -function ya(t, e) { - if (e) { - const n = document.body; - t.autofocus = !0, We(() => { - document.activeElement === n && t.focus() - }) - } -} - -function ga(t) { - S && z(t) !== null && nr(t) -} - -let Ne = !1; - -function rr() { - Ne || (Ne = !0, document.addEventListener("reset", t => { - Promise.resolve().then(() => { - var e; - if (!t.defaultPrevented) for (const n of t.target.elements) (e = n.__on_r) == null || e.call(n) - }) - }, {capture: !0})) -} - -function Ea(t, e, n, r = !0) { - r && n(); - for (var a of e) t.addEventListener(a, n); - nn(() => { - for (var s of e) t.removeEventListener(s, n) - }) -} - -function Xt(t) { - var e = _, n = v; - F(null), X(null); - try { - return t() - } finally { - F(e), X(n) - } -} - -function ma(t, e, n, r = n) { - t.addEventListener(e, () => Xt(n)); - const a = t.__on_r; - a ? t.__on_r = () => { - a(), r(!0) - } : t.__on_r = () => r(!0), rr() -} - -function en(t) { - v === null && _ === null && In(), _ !== null && (_.f & C) !== 0 && v === null && Rn(), At && On() -} - -function ar(t, e) { - var n = e.last; - n === null ? e.last = e.first = t : (n.next = t, t.prev = n, e.last = t) -} - -function q(t, e, n, r = !0) { - var a = v; - a !== null && (a.f & K) !== 0 && (t |= K); - var s = { - ctx: g, - deps: null, - nodes_start: null, - nodes_end: null, - f: t | L, - first: null, - fn: e, - last: null, - next: null, - parent: a, - b: a && a.b, - prev: null, - teardown: null, - transitions: null, - wv: 0, - ac: null - }; - if (n) try { - vt(s), s.f |= fe - } catch (i) { - throw lt(s), i - } else e !== null && Et(s); - var u = n && s.deps === null && s.first === null && s.nodes_start === null && s.teardown === null && (s.f & oe) === 0; - if (!u && r && (a !== null && ar(s, a), _ !== null && (_.f & O) !== 0 && (t & ft) === 0)) { - var l = _; - (l.effects ?? (l.effects = [])).push(s) - } - return s -} - -function ba() { - return _ !== null && !D -} - -function nn(t) { - const e = q($t, null, !1); - return k(e, b), e.teardown = t, e -} - -function Ta(t) { - en(); - var e = v.f, n = !_ && (e & Y) !== 0 && (e & fe) === 0; - if (n) { - var r = g; - (r.e ?? (r.e = [])).push(t) - } else return rn(t) -} - -function rn(t) { - return q(le | qe, t, !1) -} - -function Aa(t) { - return en(), q($t | qe, t, !0) -} - -function xa(t) { - gt.ensure(); - const e = q(ft, t, !0); - return (n = {}) => new Promise(r => { - n.outro ? lr(e, () => { - lt(e), r(void 0) - }) : (lt(e), r(void 0)) - }) -} - -function ka(t) { - return q(le, t, !1) -} - -function sr(t) { - return q(ce | oe, t, !0) -} - -function Sa(t, e = 0) { - return q($t | e, t, !0) -} - -function Na(t, e = [], n = []) { - Zn(e, n, r => { - q($t, () => t(...r.map(Nt)), !0) - }) -} - -function Oa(t, e = 0) { - var n = q(bt | e, t, !0); - return n -} - -function Ra(t, e = !0) { - return q(Y, t, !0, e) -} - -function an(t) { - var e = t.teardown; - if (e !== null) { - const n = At, r = _; - Re(!0), F(null); - try { - e.call(null) - } finally { - Re(n), F(r) - } - } -} - -function sn(t, e = !1) { - var n = t.first; - for (t.first = t.last = null; n !== null;) { - const a = n.ac; - a !== null && Xt(() => { - a.abort(_e) - }); - var r = n.next; - (n.f & ft) !== 0 ? n.parent = null : lt(n, e), n = r - } -} - -function ir(t) { - for (var e = t.first; e !== null;) { - var n = e.next; - (e.f & Y) === 0 && lt(e), e = n - } -} - -function lt(t, e = !0) { - var n = !1; - (e || (t.f & xn) !== 0) && t.nodes_start !== null && t.nodes_end !== null && (ur(t.nodes_start, t.nodes_end), n = !0), sn(t, e && !n), Bt(t, 0), k(t, Tt); - var r = t.transitions; - if (r !== null) for (const s of r) s.stop(); - an(t); - var a = t.parent; - a !== null && a.first !== null && un(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes_start = t.nodes_end = t.ac = null -} - -function ur(t, e) { - for (; t !== null;) { - var n = t === e ? null : ot(t); - t.remove(), t = n - } -} - -function un(t) { - var e = t.parent, n = t.prev, r = t.next; - n !== null && (n.next = r), r !== null && (r.prev = n), e !== null && (e.first === t && (e.first = r), e.last === t && (e.last = n)) -} - -function lr(t, e) { - var n = []; - ln(t, n, !0), fr(n, () => { - lt(t), e && e() - }) -} - -function fr(t, e) { - var n = t.length; - if (n > 0) { - var r = () => --n || e(); - for (var a of t) a.out(r) - } else e() -} - -function ln(t, e, n) { - if ((t.f & K) === 0) { - if (t.f ^= K, t.transitions !== null) for (const u of t.transitions) (u.is_global || n) && e.push(u); - for (var r = t.first; r !== null;) { - var a = r.next, s = (r.f & Fe) !== 0 || (r.f & Y) !== 0; - ln(r, e, s ? n : !1), r = a - } - } -} - -function Ia(t) { - fn(t, !0) -} - -function fn(t, e) { - if ((t.f & K) !== 0) { - t.f ^= K, (t.f & b) === 0 && (k(t, L), Et(t)); - for (var n = t.first; n !== null;) { - var r = n.next, a = (n.f & Fe) !== 0 || (n.f & Y) !== 0; - fn(n, a ? e : !1), n = r - } - if (t.transitions !== null) for (const s of t.transitions) (s.is_global || e) && s.in() - } -} - -let _t = !1; - -function Oe(t) { - _t = t -} - -let At = !1; - -function Re(t) { - At = t -} - -let _ = null, D = !1; - -function F(t) { - _ = t -} - -let v = null; - -function X(t) { - v = t -} - -let A = null; - -function on(t) { - _ !== null && (A === null ? A = [t] : A.push(t)) -} - -let T = null, N = 0, I = null; - -function or(t) { - I = t -} - -let cn = 1, Ct = 0, it = Ct; - -function Ie(t) { - it = t -} - -let $ = !1; - -function _n() { - return ++cn -} - -function Zt(t) { - var c; - var e = t.f; - if ((e & L) !== 0) return !0; - if ((e & Z) !== 0) { - var n = t.deps, r = (e & C) !== 0; - if (n !== null) { - var a, s, u = (e & Ht) !== 0, l = r && v !== null && !$, i = n.length; - if ((u || l) && (v === null || (v.f & Tt) === 0)) { - var f = t, o = f.parent; - for (a = 0; a < i; a++) s = n[a], (u || !((c = s == null ? void 0 : s.reactions) != null && c.includes(f))) && (s.reactions ?? (s.reactions = [])).push(f); - u && (f.f ^= Ht), l && o !== null && (o.f & C) === 0 && (f.f ^= C) - } - for (a = 0; a < i; a++) if (s = n[a], Zt(s) && Ge(s), s.wv > t.wv) return !0 - } - (!r || v !== null && !$) && k(t, b) - } - return !1 -} - -function vn(t, e, n = !0) { - var r = t.reactions; - if (r !== null && !(A != null && A.includes(t))) for (var a = 0; a < r.length; a++) { - var s = r[a]; - (s.f & O) !== 0 ? vn(s, e, !1) : e === s && (n ? k(s, L) : (s.f & b) !== 0 && k(s, Z), Et(s)) - } -} - -function dn(t) { - var P; - var e = T, n = N, r = I, a = _, s = $, u = A, l = g, i = D, f = it, o = t.f; - T = null, N = 0, I = null, $ = (o & C) !== 0 && (D || !_t || _ === null), _ = (o & (Y | ft)) === 0 ? t : null, A = null, Ut(t.ctx), D = !1, it = ++Ct, t.ac !== null && (Xt(() => { - t.ac.abort(_e) - }), t.ac = null); - try { - t.f |= ne; - var c = t.fn, w = c(), h = t.deps; - if (T !== null) { - var p; - if (Bt(t, N), h !== null && N > 0) for (h.length = N + T.length, p = 0; p < T.length; p++) h[N + p] = T[p]; else t.deps = h = T; - if (!$ || (o & O) !== 0 && t.reactions !== null) for (p = N; p < h.length; p++) ((P = h[p]).reactions ?? (P.reactions = [])).push(t) - } else h !== null && N < h.length && (Bt(t, N), h.length = N); - if (Ft() && I !== null && !D && h !== null && (t.f & (O | Z | L)) === 0) for (p = 0; p < I.length; p++) vn(I[p], t); - return a !== null && a !== t && (Ct++, I !== null && (r === null ? r = I : r.push(...I))), (t.f & at) !== 0 && (t.f ^= at), w - } catch (H) { - return Bn(H) - } finally { - t.f ^= ne, T = e, N = n, I = r, _ = a, $ = s, A = u, Ut(l), D = i, it = f - } -} - -function cr(t, e) { - let n = e.reactions; - if (n !== null) { - var r = En.call(n, t); - if (r !== -1) { - var a = n.length - 1; - a === 0 ? n = e.reactions = null : (n[r] = n[a], n.pop()) - } - } - n === null && (e.f & O) !== 0 && (T === null || !T.includes(e)) && (k(e, Z), (e.f & (C | Ht)) === 0 && (e.f ^= Ht), $e(e), Bt(e, 0)) -} - -function Bt(t, e) { - var n = t.deps; - if (n !== null) for (var r = e; r < n.length; r++) cr(t, n[r]) -} - -function vt(t) { - var e = t.f; - if ((e & Tt) === 0) { - k(t, b); - var n = v, r = _t; - v = t, _t = !0; - try { - (e & bt) !== 0 ? ir(t) : sn(t), an(t); - var a = dn(t); - t.teardown = typeof a == "function" ? a : null, t.wv = cn; - var s - } finally { - _t = r, v = n - } - } -} - -async function Ca() { - await Promise.resolve(), Qn() -} - -function Pa() { - return gt.ensure().settled() -} - -function Nt(t) { - var e = t.f, n = (e & O) !== 0; - if (_ !== null && !D) { - var r = v !== null && (v.f & Tt) !== 0; - if (!r && !(A != null && A.includes(t))) { - var a = _.deps; - if ((_.f & ne) !== 0) t.rv < Ct && (t.rv = Ct, T === null && a !== null && a[N] === t ? N++ : T === null ? T = [t] : (!$ || !T.includes(t)) && T.push(t)); else { - (_.deps ?? (_.deps = [])).push(t); - var s = t.reactions; - s === null ? t.reactions = [_] : s.includes(_) || s.push(_) - } - } - } else if (n && t.deps === null && t.effects === null) { - var u = t, l = u.parent; - l !== null && (l.f & C) === 0 && (u.f ^= C) - } - if (At) { - if (G.has(t)) return G.get(t); - if (n) { - u = t; - var i = u.v; - return ((u.f & b) === 0 && u.reactions !== null || hn(u)) && (i = ge(u)), G.set(u, i), i - } - } else if (n) { - if (u = t, W != null && W.has(u)) return W.get(u); - Zt(u) && Ge(u) - } - if ((t.f & at) !== 0) throw t.v; - return t.v -} - -function hn(t) { - if (t.v === m) return !0; - if (t.deps === null) return !1; - for (const e of t.deps) if (G.has(e) || (e.f & O) !== 0 && hn(e)) return !0; - return !1 -} - -function Da(t) { - var e = D; - try { - return D = !0, t() - } finally { - D = e - } -} - -const _r = -7169; - -function k(t, e) { - t.f = t.f & _r | e -} - -function Ma(t) { - if (!(typeof t != "object" || !t || t instanceof EventTarget)) { - if (st in t) ue(t); else if (!Array.isArray(t)) for (let e in t) { - const n = t[e]; - typeof n == "object" && n && st in n && ue(n) - } - } -} - -function ue(t, e = new Set) { - if (typeof t == "object" && t !== null && !(t instanceof EventTarget) && !e.has(t)) { - e.add(t), t instanceof Date && t.getTime(); - for (let r in t) try { - ue(t[r], e) - } catch { - } - const n = De(t); - if (n !== Object.prototype && n !== Array.prototype && n !== Map.prototype && n !== Set.prototype && n !== Date.prototype) { - const r = mn(n); - for (let a in r) { - const s = r[a].get; - if (s) try { - s.call(t) - } catch { - } - } - } - } -} - -function La(t) { - return t.endsWith("capture") && t !== "gotpointercapture" && t !== "lostpointercapture" -} - -const vr = ["beforeinput", "click", "change", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]; - -function Fa(t) { - return vr.includes(t) -} - -const dr = { - formnovalidate: "formNoValidate", - ismap: "isMap", - nomodule: "noModule", - playsinline: "playsInline", - readonly: "readOnly", - defaultvalue: "defaultValue", - defaultchecked: "defaultChecked", - srcobject: "srcObject", - novalidate: "noValidate", - allowfullscreen: "allowFullscreen", - disablepictureinpicture: "disablePictureInPicture", - disableremoteplayback: "disableRemotePlayback" -}; - -function qa(t) { - return t = t.toLowerCase(), dr[t] ?? t -} - -const hr = ["touchstart", "touchmove"]; - -function ja(t) { - return hr.includes(t) -} - -const pr = new Set, wr = new Set; - -function pn(t, e, n, r = {}) { - function a(s) { - if (r.capture || yr.call(e, s), !s.cancelBubble) return Xt(() => n == null ? void 0 : n.call(this, s)) - } - - return t.startsWith("pointer") || t.startsWith("touch") || t === "wheel" ? We(() => { - e.addEventListener(t, a, r) - }) : e.addEventListener(t, a, r), a -} - -function Ya(t, e, n, r = {}) { - var a = pn(e, t, n, r); - return () => { - t.removeEventListener(e, a, r) - } -} - -function Ha(t, e, n, r, a) { - var s = {capture: r, passive: a}, u = pn(t, e, n, s); - (e === document.body || e === window || e === document || e instanceof HTMLMediaElement) && nn(() => { - e.removeEventListener(t, u, s) - }) -} - -function Ua(t) { - for (var e = 0; e < t.length; e++) pr.add(t[e]); - for (var n of wr) n(t) -} - -let Ce = null; - -function yr(t) { - var ct; - var e = this, n = e.ownerDocument, r = t.type, a = ((ct = t.composedPath) == null ? void 0 : ct.call(t)) || [], - s = a[0] || t.target; - Ce = t; - var u = 0, l = Ce === t && t.__root; - if (l) { - var i = a.indexOf(l); - if (i !== -1 && (e === document || e === window)) { - t.__root = e; - return - } - var f = a.indexOf(e); - if (f === -1) return; - i <= f && (u = i) - } - if (s = a[u] || t.target, s !== e) { - ee(t, "currentTarget", { - configurable: !0, get() { - return s || n - } - }); - var o = _, c = v; - F(null), X(null); - try { - for (var w, h = []; s !== null;) { - var p = s.assignedSlot || s.parentNode || s.host || null; - try { - var P = s["__" + r]; - if (P != null && (!s.disabled || t.target === s)) if (Pe(P)) { - var [H, ...qt] = P; - H.apply(s, [t, ...qt]) - } else P.call(s, t) - } catch (J) { - w ? h.push(J) : w = J - } - if (t.cancelBubble || p === e || p === null) break; - s = p - } - if (w) { - for (let J of h) queueMicrotask(() => { - throw J - }); - throw w - } - } finally { - t.__root = e, delete t.currentTarget, F(o), X(c) - } - } -} - -function wn(t) { - var e = document.createElement("template"); - return e.innerHTML = t.replaceAll("", ""), e.content -} - -function j(t, e) { - var n = v; - n.nodes_start === null && (n.nodes_start = t, n.nodes_end = e) -} - -function Va(t, e) { - var n = (e & Ln) !== 0, r = (e & Fn) !== 0, a, s = !t.startsWith(""); - return () => { - if (S) return j(y, null), y; - a === void 0 && (a = wn(s ? t : "" + t), n || (a = z(a))); - var u = r || Je ? document.importNode(a, !0) : a.cloneNode(!0); - if (n) { - var l = z(u), i = u.lastChild; - j(l, i) - } else j(u, u); - return u - } -} - -function gr(t, e, n = "svg") { - var r = !t.startsWith(""), a = `<${n}>${r ? t : "" + t}`, s; - return () => { - if (S) return j(y, null), y; - if (!s) { - var u = wn(a), l = z(u); - s = z(l) - } - var i = s.cloneNode(!0); - return j(i, i), i - } -} - -function Ba(t, e) { - return gr(t, e, "svg") -} - -function Wa(t = "") { - if (!S) { - var e = mt(t + ""); - return j(e, e), e - } - var n = y; - return n.nodeType !== ve && (n.before(n = mt()), yt(n)), j(n, n), n -} - -function $a() { - if (S) return j(y, null), y; - var t = document.createDocumentFragment(), e = document.createComment(""), n = mt(); - return t.append(e, n), j(e, n), t -} - -function Ga(t, e) { - if (S) { - v.nodes_end = y, je(); - return - } - t !== null && t.before(e) -} - -function Ka() { - var t, e; - if (S && y && y.nodeType === de && ((t = y.textContent) != null && t.startsWith("#"))) { - const n = y.textContent.substring(1); - return je(), n - } - return (e = window.__svelte ?? (window.__svelte = {})).uid ?? (e.uid = 1), `c${window.__svelte.uid++}` -} - -export { - K as $, - Nt as A, - Ma as B, - ye as C, - ka as D, - Fe as E, - Sa as F, - We as G, - Lr as H, - yt as I, - z as J, - zn as K, - ta as L, - jn as M, - Qr as N, - Xr as O, - de as P, - Yn as Q, - Dr as R, - st as S, - Mr as T, - ie as U, - ca as V, - Ee as W, - br as X, - Pe as Y, - Ia as Z, - qr as _, - ha as a, - Kr as a$, - lt as a0, - Fr as a1, - ot as a2, - ln as a3, - nr as a4, - fr as a5, - v as a6, - ur as a7, - pe as a8, - he as a9, - Pa as aA, - Ca as aB, - m as aC, - Ot as aD, - Pr as aE, - Hr as aF, - St as aG, - tt as aH, - At as aI, - Tt as aJ, - Ur as aK, - Yr as aL, - jr as aM, - Vr as aN, - Sr as aO, - Tr as aP, - ee as aQ, - U as aR, - $a as aS, - oa as aT, - Wa as aU, - zr as aV, - _a as aW, - Zn as aX, - Gr as aY, - De as aZ, - Nr as a_, - j as aa, - wn as ab, - va as ac, - qn as ad, - Ir as ae, - pr as af, - wr as ag, - xa as ah, - yr as ai, - ja as aj, - er as ak, - na as al, - xn as am, - Ua as an, - nn as ao, - Ar as ap, - Sn as aq, - _ as ar, - Rr as as, - Cr as at, - Gt as au, - Qn as av, - ia as aw, - ra as ax, - sa as ay, - aa as az, - Ga as b, - mn as b0, - La as b1, - pn as b2, - ya as b3, - qa as b4, - Fa as b5, - fa as b6, - rr as b7, - ba as b8, - te as b9, - Hn as ba, - Ft as bb, - ea as bc, - $r as bd, - Xt as be, - bt as bf, - fe as bg, - Br as bh, - Wr as bi, - Ha as bj, - Se as bk, - ma as bl, - Qt as bm, - mr as bn, - Ya as bo, - bn as bp, - Ea as bq, - ga as br, - Ka as bs, - kr as bt, - la as c, - da as d, - je as e, - Va as f, - Oa as g, - S as h, - mt as i, - Ra as j, - E as k, - wa as l, - y as m, - lr as n, - Jr as o, - ua as p, - Ba as q, - Zr as r, - pa as s, - Na as t, - g as u, - Aa as v, - Ta as w, - Da as x, - xr as y, - Me as z -}; diff --git a/frontend-backup/_app/immutable/chunks/DV6L2nvf.js b/frontend-backup/_app/immutable/chunks/DV6L2nvf.js deleted file mode 100644 index 8f71d44..0000000 --- a/frontend-backup/_app/immutable/chunks/DV6L2nvf.js +++ /dev/null @@ -1,40 +0,0 @@ -import { t as g, h, e as c, ad as b, ae as p, o as u, W as w, a9 as v, af as m, ag as E, ah as y, O as T, ai as D, P as i } from "./BDALf20I.js"; -(function () { - try { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - e.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - d = new e.Error().stack; - d && ((e._sentryDebugIds = e._sentryDebugIds || {}), (e._sentryDebugIds[d] = "c5676a6a-afed-4227-8555-1ad1a2540ba4"), (e._sentryDebugIdIdentifier = "sentry-dbid-c5676a6a-afed-4227-8555-1ad1a2540ba4")); - })(); -} catch {} -function O(e, d, r = !1, o = !1, I = !1) { - var l = e, - t = ""; - g(() => { - var n = b; - if (t === (t = d() ?? "")) { - h && c(); - return; - } - if ((n.nodes_start !== null && (p(n.nodes_start, n.nodes_end), (n.nodes_start = n.nodes_end = null)), t !== "")) { - if (h) { - u.data; - for (var a = c(), _ = a; a !== null && (a.nodeType !== w || a.data !== ""); ) (_ = a), (a = v(a)); - if (a === null) throw (m(), E); - y(u, _), (l = T(a)); - return; - } - var s = t + ""; - r ? (s = `${s}`) : o && (s = `${s}`); - var f = D(s); - if (((r || o) && (f = i(f)), y(i(f), f.lastChild), r || o)) for (; i(f); ) l.before(i(f)); - else l.before(f); - } - }); -} -export { O as h }; diff --git a/frontend-backup/_app/immutable/chunks/DVA6u9-7.js b/frontend-backup/_app/immutable/chunks/DVA6u9-7.js new file mode 100644 index 0000000..296018e --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/DVA6u9-7.js @@ -0,0 +1,172 @@ +import { + aj as v, + O as A, + U as T, + ak as L, + a7 as k, + ag as p, + T as h, + N as D, + e as M, + o as u, + V as S, + af as Y, + al as j, + a9 as C, + a0 as H, + am as V, + an as N, + ao as W, + ap as y, + aq as $, + j as q, + k as F, + h as w, + p as P, + w as U, + ah as z, + ab as B, + c as G, +} from "./CMvZtFtm.js"; +import { r as J } from "./P77cUGnY.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + a = new e.Error().stack; + a && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[a] = "091e34c6-a6e4-4616-9b7c-d8a0b150b9c0"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-091e34c6-a6e4-4616-9b7c-d8a0b150b9c0")); + })(); +} catch {} +let R = !0; +function Z(e, a) { + var t = a == null ? "" : typeof a == "object" ? a + "" : a; + t !== (e.__t ?? (e.__t = e.nodeValue)) && + ((e.__t = t), (e.nodeValue = t + "")); +} +function K(e, a) { + return I(e, a); +} +function x(e, a) { + v(), (a.intro = a.intro ?? !1); + const t = a.target, + c = w, + _ = u; + try { + for (var s = A(t); s && (s.nodeType !== T || s.data !== L); ) s = k(s); + if (!s) throw p; + h(!0), D(s), M(); + const d = I(e, { ...a, anchor: s }); + if (u === null || u.nodeType !== T || u.data !== S) throw (Y(), p); + return h(!1), d; + } catch (d) { + if ( + d instanceof Error && + d.message + .split( + ` +` + ) + .some((f) => f.startsWith("https://svelte.dev/e/")) + ) + throw d; + return ( + d !== p && console.warn("Failed to hydrate: ", d), + a.recover === !1 && j(), + v(), + C(t), + h(!1), + K(e, a) + ); + } finally { + h(c), D(_), J(); + } +} +const i = new Map(); +function I( + e, + { target: a, anchor: t, props: c = {}, events: _, context: s, intro: d = !0 } +) { + v(); + var f = new Set(), + g = (o) => { + for (var n = 0; n < o.length; n++) { + var r = o[n]; + if (!f.has(r)) { + f.add(r); + var l = $(r); + a.addEventListener(r, y, { passive: l }); + var E = i.get(r); + E === void 0 + ? (document.addEventListener(r, y, { passive: l }), i.set(r, 1)) + : i.set(r, E + 1); + } + } + }; + g(H(V)), N.add(g); + var b = void 0, + O = W(() => { + var o = t ?? a.appendChild(q()); + return ( + F(() => { + if (s) { + P({}); + var n = U; + n.c = s; + } + _ && (c.$$events = _), + w && z(o, null), + (R = d), + (b = e(o, c) || {}), + (R = !0), + w && (B.nodes_end = u), + s && G(); + }), + () => { + var l; + for (var n of f) { + a.removeEventListener(n, y); + var r = i.get(n); + --r === 0 + ? (document.removeEventListener(n, y), i.delete(n)) + : i.set(n, r); + } + N.delete(g), + o !== t && ((l = o.parentNode) == null || l.removeChild(o)); + } + ); + }); + return m.set(b, O), b; +} +let m = new WeakMap(); +function ee(e, a) { + const t = m.get(e); + return t ? (m.delete(e), t(a)) : Promise.resolve(); +} +export { R as a, x as h, K as m, Z as s, ee as u }; diff --git a/frontend-backup/_app/immutable/chunks/DXjtejww.js b/frontend-backup/_app/immutable/chunks/DXjtejww.js deleted file mode 100644 index c325e2e..0000000 --- a/frontend-backup/_app/immutable/chunks/DXjtejww.js +++ /dev/null @@ -1,30 +0,0 @@ -import { g as n } from "./DklPLC_x.js"; -(function () { - try { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - e.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - o = new e.Error().stack; - o && ((e._sentryDebugIds = e._sentryDebugIds || {}), (e._sentryDebugIds[o] = "76e4e08a-3479-4679-9995-6d7032094b18"), (e._sentryDebugIdIdentifier = "sentry-dbid-76e4e08a-3479-4679-9995-6d7032094b18")); - })(); -} catch {} -const r = () => "Apply", - d = () => "Aplicar", - f = (e = {}, o = {}) => ((o.locale ?? n()) === "en" ? r() : d()), - a = () => "Media total per mod", - i = () => "Media total por mod", - b = (e = {}, o = {}) => ((o.locale ?? n()) === "en" ? a() : i()), - l = () => "Media ban per mod", - _ = () => "Media de banimento por mod", - g = (e = {}, o = {}) => ((o.locale ?? n()) === "en" ? l() : _()), - c = () => "Media ignored per mod", - p = () => "Media de ignorados por mod", - y = (e = {}, o = {}) => ((o.locale ?? n()) === "en" ? c() : p()), - s = () => "Media timeout per mod", - u = () => "Media de timeout por mod", - w = (e = {}, o = {}) => ((o.locale ?? n()) === "en" ? s() : u()); -export { f as a, g as b, y as c, w as d, b as m }; diff --git a/frontend-backup/_app/immutable/chunks/DdJK9GIy.js b/frontend-backup/_app/immutable/chunks/DdJK9GIy.js deleted file mode 100644 index fa4a0c8..0000000 --- a/frontend-backup/_app/immutable/chunks/DdJK9GIy.js +++ /dev/null @@ -1 +0,0 @@ -import{g as n}from"./DklPLC_x.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="cb9cdd54-2441-45dd-bc58-9d9fa5dd59c8",e._sentryDebugIdIdentifier="sentry-dbid-cb9cdd54-2441-45dd-bc58-9d9fa5dd59c8")})()}catch{}const o=()=>"Add",t=()=>"Adicionar",i=(e={},d={})=>(d.locale??n())==="en"?o():t();export{i as a}; diff --git a/frontend-backup/_app/immutable/chunks/DffDvEhl.js b/frontend-backup/_app/immutable/chunks/DffDvEhl.js deleted file mode 100644 index 2cd5a79..0000000 --- a/frontend-backup/_app/immutable/chunks/DffDvEhl.js +++ /dev/null @@ -1,1489 +0,0 @@ -var be = Object.defineProperty; -var re = (a) => { - throw TypeError(a); -}; -var ye = (a, e, t) => (e in a ? be(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : (a[e] = t)); -var _ = (a, e, t) => ye(a, typeof e != "symbol" ? e + "" : e, t), - Se = (a, e, t) => e.has(a) || re("Cannot " + t); -var u = (a, e, t) => (Se(a, e, "read from private field"), t ? t.call(a) : e.get(a)), - h = (a, e, t) => (e.has(a) ? re("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(a) : e.set(a, t)); -import { au as y, av as Z, g as p, aw as w, z as se, u as P } from "./BDALf20I.js"; -import { g } from "./DklPLC_x.js"; -import { s as Te } from "./DM9nRpoa.js"; -(function () { - try { - var a = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - a.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var a = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - e = new a.Error().stack; - e && ((a._sentryDebugIds = a._sentryDebugIds || {}), (a._sentryDebugIds[e] = "787c12f8-0765-444c-9905-69388673c8cc"), (a._sentryDebugIdIdentifier = "sentry-dbid-787c12f8-0765-444c-9905-69388673c8cc")); - })(); -} catch {} -const Ee = "true", - oa = "/files", - ia = "0x4AAAAAABpHqZ-6i7uL0nmG", - ue = "", - ca = "0x4AAAAAABpqJe8FO0N84q0F"; -function la(...a) { - return a.filter(Boolean).join(" "); -} -const ve = typeof document < "u"; -let oe = 0; -var k, L, C; -class Ae { - constructor() { - h(this, k, y(Z([]))); - h(this, L, y(Z([]))); - h(this, C, (e) => { - const t = this.toasts.findIndex((n) => n.id === e); - return t === -1 ? null : t; - }); - _(this, "addToast", (e) => { - ve && this.toasts.unshift(e); - }); - _(this, "updateToast", ({ id: e, data: t, type: n, message: s }) => { - const r = this.toasts.findIndex((o) => o.id === e), - l = this.toasts[r]; - this.toasts[r] = { ...l, ...t, id: e, title: s, type: n, updated: !0 }; - }); - _(this, "create", (e) => { - var o; - const { message: t, ...n } = e, - s = typeof (e == null ? void 0 : e.id) == "number" || (e.id && ((o = e.id) == null ? void 0 : o.length) > 0) ? e.id : oe++, - r = e.dismissable === void 0 ? !0 : e.dismissable, - l = e.type === void 0 ? "default" : e.type; - return ( - se(() => { - this.toasts.find((c) => c.id === s) ? this.updateToast({ id: s, data: e, type: l, message: t, dismissable: r }) : this.addToast({ ...n, id: s, title: t, dismissable: r, type: l }); - }), - s - ); - }); - _( - this, - "dismiss", - (e) => ( - se(() => { - if (e === void 0) { - this.toasts = this.toasts.map((n) => ({ ...n, dismiss: !0 })); - return; - } - const t = this.toasts.findIndex((n) => n.id === e); - this.toasts[t] && (this.toasts[t] = { ...this.toasts[t], dismiss: !0 }); - }), - e - ) - ); - _(this, "remove", (e) => { - if (e === void 0) { - this.toasts = []; - return; - } - const t = u(this, C).call(this, e); - if (t !== null) return this.toasts.splice(t, 1), e; - }); - _(this, "message", (e, t) => this.create({ ...t, type: "default", message: e })); - _(this, "error", (e, t) => this.create({ ...t, type: "error", message: e })); - _(this, "success", (e, t) => this.create({ ...t, type: "success", message: e })); - _(this, "info", (e, t) => this.create({ ...t, type: "info", message: e })); - _(this, "warning", (e, t) => this.create({ ...t, type: "warning", message: e })); - _(this, "loading", (e, t) => this.create({ ...t, type: "loading", message: e })); - _(this, "promise", (e, t) => { - if (!t) return; - let n; - t.loading !== void 0 && (n = this.create({ ...t, promise: e, type: "loading", message: typeof t.loading == "string" ? t.loading : t.loading() })); - const s = e instanceof Promise ? e : e(); - let r = n !== void 0; - return ( - s - .then((l) => { - if (typeof l == "object" && l && "ok" in l && typeof l.ok == "boolean" && !l.ok) { - r = !1; - const o = Pe(l); - this.create({ id: n, type: "error", message: o }); - } else if (t.success !== void 0) { - r = !1; - const o = typeof t.success == "function" ? t.success(l) : t.success; - this.create({ id: n, type: "success", message: o }); - } - }) - .catch((l) => { - if (t.error !== void 0) { - r = !1; - const o = typeof t.error == "function" ? t.error(l) : t.error; - this.create({ id: n, type: "error", message: o }); - } - }) - .finally(() => { - var l; - r && (this.dismiss(n), (n = void 0)), (l = t.finally) == null || l.call(t); - }), - n - ); - }); - _(this, "custom", (e, t) => { - const n = (t == null ? void 0 : t.id) || oe++; - return this.create({ component: e, id: n, ...t }), n; - }); - _(this, "removeHeight", (e) => { - this.heights = this.heights.filter((t) => t.toastId !== e); - }); - _(this, "setHeight", (e) => { - const t = u(this, C).call(this, e.toastId); - if (t === null) { - this.heights.push(e); - return; - } - this.heights[t] = e; - }); - _(this, "reset", () => { - (this.toasts = []), (this.heights = []); - }); - } - get toasts() { - return p(u(this, k)); - } - set toasts(e) { - w(u(this, k), e, !0); - } - get heights() { - return p(u(this, L)); - } - set heights(e) { - w(u(this, L), e, !0); - } -} -(k = new WeakMap()), (L = new WeakMap()), (C = new WeakMap()); -function Pe(a) { - return a && typeof a == "object" && "status" in a ? `HTTP error! Status: ${a.status}` : `Error! ${a}`; -} -const T = new Ae(); -function xe(a, e) { - return T.create({ message: a, ...e }); -} -var ee; -class da { - constructor() { - h( - this, - ee, - P(() => T.toasts.filter((e) => !e.dismiss)) - ); - } - get toasts() { - return p(u(this, ee)); - } -} -ee = new WeakMap(); -const Ie = xe, - ge = Object.assign(Ie, { - success: T.success, - info: T.info, - warning: T.warning, - error: T.error, - custom: T.custom, - message: T.message, - promise: T.promise, - dismiss: T.dismiss, - loading: T.loading, - getActiveToasts: () => T.toasts.filter((a) => !a.dismiss), - }); -let fe = y(void 0); -const me = () => p(fe), - ua = (a) => { - const e = new URL(a, ue), - t = me(); - return t && e.searchParams.set("override", t.token), e.toString(); - }; -function ga() { - try { - Oe(); - } catch (a) { - console.error("failed to load override", a); - } -} -function Oe() { - const e = new URL(location.href).searchParams.get("override"); - if (!e) return; - const t = e.split("."); - if (t.length !== 2) throw new Error("override token wrong amount of parts"); - const [n] = t, - s = JSON.parse(atob(n)); - if (Date.now() / 1e3 > s.expiresAt) throw new Error("override token expired"); - ge.info(`Currently using the ${s.id} override. Bugs may occur, go back to ${location.protocol}//${location.host} to clear this override.`, { duration: 6e4 }), w(fe, { token: e, payload: s }, !0); -} -const ie = "theme"; -var M, q, N, B, D, U, G; -class ke { - constructor() { - h(this, M, y(!1)); - h(this, q, y(!1)); - h(this, N, y(Z(Ce()))); - h(this, B, y(!1)); - h(this, D, y("custom-winter")); - h(this, U, y(Z(Date.now()))); - h(this, G, y(void 0)); - setInterval(() => { - w(u(this, U), Date.now(), !0); - }, 500), - (this.theme = localStorage.getItem(ie) || "custom-winter"); - } - get dropletsDialogOpen() { - return p(u(this, M)); - } - set dropletsDialogOpen(e) { - w(u(this, M), e, !0); - } - get muted() { - return p(u(this, q)); - } - set muted(e) { - w(u(this, q), e, !0); - } - get language() { - return p(u(this, N)); - } - set language(e) { - w(u(this, N), e, !0); - } - get turnstatileLoaded() { - return p(u(this, B)); - } - set turnstatileLoaded(e) { - w(u(this, B), e, !0); - } - get theme() { - return p(u(this, D)); - } - set theme(e) { - w(u(this, D), e, !0), localStorage.setItem(ie, e), document.documentElement.setAttribute("data-theme", e); - } - get now() { - return p(u(this, U)); - } - get captcha() { - return Me ? p(u(this, G)) : { token: "turnstile-disabled", time: Date.now() }; - } - set captcha(e) { - w(u(this, G), e, !0); - } -} -(M = new WeakMap()), (q = new WeakMap()), (N = new WeakMap()), (B = new WeakMap()), (D = new WeakMap()), (U = new WeakMap()), (G = new WeakMap()); -const Le = new ke(); -function Ce() { - if (navigator.languages && navigator.languages.length > 0) { - const a = navigator.languages.find((e) => e.length === 2); - if (a) return a; - } - return (navigator.language || navigator.userLanguage || navigator.browserLanguage || "en").substring(0, 2); -} -const Me = Ee.toLowerCase() !== "false"; -let m; -function x(a) { - const e = m.__externref_table_alloc(); - return m.__wbindgen_export_2.set(e, a), e; -} -function A(a, e) { - try { - return a.apply(this, e); - } catch (t) { - const n = x(t); - m.__wbindgen_exn_store(n); - } -} -const he = - typeof TextDecoder < "u" - ? new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }) - : { - decode: () => { - throw Error("TextDecoder not available"); - }, - }; -typeof TextDecoder < "u" && he.decode(); -let I = null; -function W() { - return (I === null || I.byteLength === 0) && (I = new Uint8Array(m.memory.buffer)), I; -} -function O(a, e) { - return (a = a >>> 0), he.decode(W().subarray(a, a + e)); -} -function H(a) { - return a == null; -} -function fa(a) { - m.set_user_id(a); -} -let Q = 0; -const Y = - typeof TextEncoder < "u" - ? new TextEncoder("utf-8") - : { - encode: () => { - throw Error("TextEncoder not available"); - }, - }, - qe = - typeof Y.encodeInto == "function" - ? function (a, e) { - return Y.encodeInto(a, e); - } - : function (a, e) { - const t = Y.encode(a); - return e.set(t), { read: a.length, written: t.length }; - }; -function _e(a, e, t) { - if (t === void 0) { - const o = Y.encode(a), - d = e(o.length, 1) >>> 0; - return ( - W() - .subarray(d, d + o.length) - .set(o), - (Q = o.length), - d - ); - } - let n = a.length, - s = e(n, 1) >>> 0; - const r = W(); - let l = 0; - for (; l < n; l++) { - const o = a.charCodeAt(l); - if (o > 127) break; - r[s + l] = o; - } - if (l !== n) { - l !== 0 && (a = a.slice(l)), (s = t(s, n, (n = l + a.length * 3), 1) >>> 0); - const o = W().subarray(s + l, s + n), - d = qe(a, o); - (l += d.written), (s = t(s, n, l, 1) >>> 0); - } - return (Q = l), s; -} -function ma(a) { - const e = _e(a, m.__wbindgen_malloc, m.__wbindgen_realloc), - t = Q; - m.request_url(e, t); -} -function Ne() { - let a, e; - try { - const t = m.get_load_payload(); - return (a = t[0]), (e = t[1]), O(t[0], t[1]); - } finally { - m.__wbindgen_free(a, e, 1); - } -} -function Be(a) { - let e, t; - try { - const n = _e(a, m.__wbindgen_malloc, m.__wbindgen_realloc), - s = Q, - r = m.get_pawtected_endpoint_payload(n, s); - return (e = r[0]), (t = r[1]), O(r[0], r[1]); - } finally { - m.__wbindgen_free(e, t, 1); - } -} -async function De(a, e) { - if (typeof Response == "function" && a instanceof Response) { - if (typeof WebAssembly.instantiateStreaming == "function") - try { - return await WebAssembly.instantiateStreaming(a, e); - } catch (n) { - if (a.headers.get("Content-Type") != "application/wasm") - console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", n); - else throw n; - } - const t = await a.arrayBuffer(); - return await WebAssembly.instantiate(t, e); - } else { - const t = await WebAssembly.instantiate(a, e); - return t instanceof WebAssembly.Instance ? { instance: t, module: a } : t; - } -} -function Ue() { - const a = {}; - return ( - (a.wbg = {}), - (a.wbg.__wbg_buffer_609cc3eee51ed158 = function (e) { - return e.buffer; - }), - (a.wbg.__wbg_call_672a4d21634d4a24 = function () { - return A(function (e, t) { - return e.call(t); - }, arguments); - }), - (a.wbg.__wbg_call_7cccdd69e0791ae2 = function () { - return A(function (e, t, n) { - return e.call(t, n); - }, arguments); - }), - (a.wbg.__wbg_crypto_574e78ad8b13b65f = function (e) { - return e.crypto; - }), - (a.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function () { - return A(function (e, t) { - e.getRandomValues(t); - }, arguments); - }), - (a.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function (e) { - return e.msCrypto; - }), - (a.wbg.__wbg_new_a12002a7f91c75be = function (e) { - return new Uint8Array(e); - }), - (a.wbg.__wbg_newnoargs_105ed471475aaf50 = function (e, t) { - return new Function(O(e, t)); - }), - (a.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function (e, t, n) { - return new Uint8Array(e, t >>> 0, n >>> 0); - }), - (a.wbg.__wbg_newwithlength_a381634e90c276d4 = function (e) { - return new Uint8Array(e >>> 0); - }), - (a.wbg.__wbg_node_905d3e251edff8a2 = function (e) { - return e.node; - }), - (a.wbg.__wbg_process_dc0fbacc7c1c06f7 = function (e) { - return e.process; - }), - (a.wbg.__wbg_randomFillSync_ac0988aba3254290 = function () { - return A(function (e, t) { - e.randomFillSync(t); - }, arguments); - }), - (a.wbg.__wbg_require_60cc747a6bc5215a = function () { - return A(function () { - return module.require; - }, arguments); - }), - (a.wbg.__wbg_set_65595bdd868b3009 = function (e, t, n) { - e.set(t, n >>> 0); - }), - (a.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function () { - const e = typeof global > "u" ? null : global; - return H(e) ? 0 : x(e); - }), - (a.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function () { - const e = typeof globalThis > "u" ? null : globalThis; - return H(e) ? 0 : x(e); - }), - (a.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function () { - const e = typeof self > "u" ? null : self; - return H(e) ? 0 : x(e); - }), - (a.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function () { - const e = typeof window > "u" ? null : window; - return H(e) ? 0 : x(e); - }), - (a.wbg.__wbg_subarray_aa9065fa9dc5df96 = function (e, t, n) { - return e.subarray(t >>> 0, n >>> 0); - }), - (a.wbg.__wbg_versions_c01dfd4722a88165 = function (e) { - return e.versions; - }), - (a.wbg.__wbindgen_init_externref_table = function () { - const e = m.__wbindgen_export_2, - t = e.grow(4); - e.set(0, void 0), e.set(t + 0, void 0), e.set(t + 1, null), e.set(t + 2, !0), e.set(t + 3, !1); - }), - (a.wbg.__wbindgen_is_function = function (e) { - return typeof e == "function"; - }), - (a.wbg.__wbindgen_is_object = function (e) { - const t = e; - return typeof t == "object" && t !== null; - }), - (a.wbg.__wbindgen_is_string = function (e) { - return typeof e == "string"; - }), - (a.wbg.__wbindgen_is_undefined = function (e) { - return e === void 0; - }), - (a.wbg.__wbindgen_memory = function () { - return m.memory; - }), - (a.wbg.__wbindgen_string_new = function (e, t) { - return O(e, t); - }), - (a.wbg.__wbindgen_throw = function (e, t) { - throw new Error(O(e, t)); - }), - a - ); -} -function Ge(a, e) { - return (m = a.exports), (Re.__wbindgen_wasm_module = e), (I = null), m.__wbindgen_start(), m; -} -async function Re(a) { - if (m !== void 0) return m; - typeof a < "u" && (Object.getPrototypeOf(a) === Object.prototype ? ({ module_or_path: a } = a) : console.warn("using deprecated parameters for the initialization function; pass a single object instead")), - typeof a > "u" && (a = new URL("pawtect_wasm_bg.wasm", import.meta.url)); - const e = Ue(); - (typeof a == "string" || (typeof Request == "function" && a instanceof Request) || (typeof URL == "function" && a instanceof URL)) && (a = fetch(a)); - const { instance: t, module: n } = await De(await a, e); - return Ge(t, n); -} -const $e = () => "Unexpected server error. Try again later.", - je = () => "Erro inesperado do servidor. Tente novamente mais tarde.", - i = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? $e() : je()), - Fe = () => "You need to be logged in to paint", - Je = () => "Você precisa estar conectado para pintar", - Ke = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Fe() : Je()), - ze = (a) => `Error while painting: ${a.err}`, - Ve = (a) => `Erro enquanto pinta: ${a.err}`, - He = (a, e = {}) => ((e.locale ?? g()) === "en" ? ze(a) : Ve(a)), - We = () => "Invalid phone number", - Ye = () => "Número de telefone inválido", - Ze = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? We() : Ye()), - Qe = () => "Phone already used", - Xe = () => "Telefone já usado", - et = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Qe() : Xe()), - tt = () => "You have to wait to resend a code", - nt = () => "Você tem de esperar para reenviar um código", - at = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? tt() : nt()), - rt = () => "Invalid code", - st = () => "Código inválido", - ot = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? rt() : st()), - it = () => "Operation not allowed. Maybe you have too many favorite locations.", - ct = () => "Operação não permitida. Talvez você tenha muitos locais favoritos.", - lt = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? it() : ct()), - dt = () => "Location name is too big (max. 128 characters)", - ut = () => "Nome da localização é grande demais (max. 128 caracteres)", - gt = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? dt() : ut()), - ft = () => "Couldn't complete the purchase. This item does not exist.", - mt = () => "Não foi possível concluir a compra. Este item não existe.", - ht = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? ft() : mt()), - _t = () => "You do not have enough droplets to buy this item.", - pt = () => "Você não tem gotas suficientes para comprar este item.", - wt = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? _t() : pt()), - bt = () => "You already have this item. Please refresh the page.", - yt = () => "Você já possui este item. Atualize a página.", - St = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? bt() : yt()), - Tt = () => "Alliance name exceeded the maximum number of characters", - Et = () => "O nome da aliança excedeu o número máximo de caracteres", - vt = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Tt() : Et()), - At = () => "Alliance name already taken", - Pt = () => "Já possui uma aliança com esse nome", - xt = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? At() : Pt()), - It = () => "Alliance with empty name", - Ot = () => "Aliança com nome vazio", - kt = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? It() : Ot()), - Lt = () => "You are already in an alliance", - Ct = () => "Você já está em uma aliança", - Mt = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Lt() : Ct()), - qt = () => "You are not allowed to do this", - Nt = () => "Você não tem permissão para fazer isso", - E = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? qt() : Nt()), - Bt = () => "Can't reach the server. Maybe you are without internet connection or the server is down. Try again later", - Dt = () => "Não é possível acessar o servidor. Talvez você esteja sem conexão com a internet ou o servidor esteja fora do ar. Tente novamente mais tarde.", - Ut = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Bt() : Dt()), - Gt = () => "You or someone in your network is making a lot of requests to the server. Try again later.", - Rt = () => "Você ou alguém na sua rede está fazendo muitas solicitações ao servidor. Tente novamente mais tarde.", - ce = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Gt() : Rt()), - $t = () => "No internet access or the servers are offline. Try again later.", - jt = () => "Sem acesso à internet ou os servidores estão fora do ar. Tente novamente mais tarde.", - Ft = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? $t() : jt()), - Jt = () => "We’re currently experiencing high traffic. Some requests may not be processed at this time—please try again later. Thank you for your patience.", - Kt = () => "Estamos enfrentando um volume alto de acessos no momento. Algumas solicitações podem não ser processadas agora — por favor, tente novamente mais tarde. Agradecemos a sua compreensão.", - zt = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Jt() : Kt()), - Vt = () => "Refresh your page to get the latest update", - Ht = () => "Recarregue sua página para obter as últimas atualizações", - Wt = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Vt() : Ht()), - Yt = () => "Inappropriate content", - Zt = () => "Conteúdo inapropriado", - Qt = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Yt() : Zt()), - Xt = () => "Botting", - en = () => "Uso de bots", - tn = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Xt() : en()), - nn = () => "Hate speech", - an = () => "Discurso de Ódio", - rn = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? nn() : an()), - sn = () => "Griefing", - on = () => "Griefing", - cn = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? sn() : on()), - ln = () => "Doxxing", - dn = () => "Doxxing", - un = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? ln() : dn()), - gn = () => "Leaderboard is temporarily disabled", - fn = () => "O ranking está temporariamente desativado", - v = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? gn() : fn()), - mn = () => "Multi-accounting", - hn = () => "Múltiplas contas", - _n = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? mn() : hn()), - pn = () => "Breaking the rules", - wn = () => "Quebrar as regras", - bn = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? pn() : wn()), - yn = () => "Your account has been suspended for breaking the rules", - Sn = () => "Sua conta foi suspensa por quebrar as regras", - Tn = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? yn() : Sn()), - En = () => "Your account has been banned for violating the rules", - vn = () => "A sua conta foi banida por quebrar as regras", - An = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? En() : vn()), - Pn = (a) => `Your account has been suspended out until ${a.until}`, - xn = (a) => `A sua conta está suspensa até ${a.until}`, - In = (a, e = {}) => ((e.locale ?? g()) === "en" ? Pn(a) : xn(a)), - On = () => "You are trying to paint with a color you do not own", - kn = () => "Você está tentando pintar com uma cor que não possui", - Ln = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? On() : kn()), - Cn = () => "The new leader must be a member of the alliance", - Mn = () => "O novo líder deve ser um membro da aliança", - qn = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Cn() : Mn()), - Nn = () => "The name contains disallowed characters or words. Please choose a different name.", - Bn = () => "O nome contém caracteres ou palavras não permitidas. Por favor, escolha outro nome.", - Dn = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Nn() : Bn()), - Un = () => "Invalid discord.", - Gn = () => "Discord inválido.", - Rn = (a = {}, e = {}) => ((e.locale ?? g()) === "en" ? Un() : Gn()), - ha = { griefing: cn(), "multi-accounting": _n(), "hate-speech": rn(), bot: tn(), doxxing: un(), "inappropriate-content": Qt(), other: bn() }, - _a = { doxxing: "text-red-600", "hate-speech": "text-red-600", "inappropriate-content": "text-amber-600", "multi-accounting": "text-amber-600", bot: "text-amber-600", griefing: "text-amber-600", other: "text-blue-600" }, - le = { doxxing: 0, "hate-speech": 1, "inappropriate-content": 2, bot: 3, "multi-accounting": 4, other: 5, griefing: 6 }; -function $n(a) { - const e = atob(a), - t = new Uint8Array(e.length); - for (let n = 0; n < e.length; n++) t[n] = e.charCodeAt(n); - return t; -} -class jn { - constructor(e) { - _(this, "bytes"); - this.bytes = e ?? new Uint8Array(); - } - set(e, t) { - const n = Math.floor(e / 8), - s = e % 8; - if (n >= this.bytes.length) { - const l = new Uint8Array(n + 1), - o = l.length - this.bytes.length; - for (let d = 0; d < this.bytes.length; d++) l[d + o] = this.bytes[d]; - this.bytes = l; - } - const r = this.bytes.length - 1 - n; - t ? (this.bytes[r] = this.bytes[r] | (1 << s)) : (this.bytes[r] = this.bytes[r] & ~(1 << s)); - } - get(e) { - const t = Math.floor(e / 8), - n = e % 8, - s = this.bytes.length; - return t > s ? !1 : (this.bytes[s - 1 - t] & (1 << n)) !== 0; - } -} -var R, $, j, F, J, K, z; -class Fn { - constructor() { - _(this, "channel", new BroadcastChannel("user-channel")); - h(this, R, y()); - h(this, $, y(!0)); - h(this, j, y(Date.now())); - h( - this, - F, - P(() => { - if (!this.data) return; - const e = this.data.charges; - if (e.count > e.max) return e.count; - const t = e.count + Math.max((Le.now - this.lastFetch) / e.cooldownMs, 0); - return Math.min(e.max, t); - }) - ); - h( - this, - J, - P(() => (this.charges !== void 0 && this.data ? (1 - (this.charges % 1)) * this.data.charges.cooldownMs : void 0)) - ); - h( - this, - K, - P(() => { - var e; - return new jn($n(((e = this.data) == null ? void 0 : e.flagsBitmap) ?? "AA==")); - }) - ); - h( - this, - z, - P(() => { - var t; - if (!((t = this.data) != null && t.timeoutUntil)) return; - const e = new Date(this.data.timeoutUntil); - if (!(e.getTime() < Date.now())) return e; - }) - ); - this.channel.onmessage = (e) => { - const t = JSON.parse(e.data); - t.type === "refresh" ? ((this.data = t.data), (this.lastFetch = Date.now())) : t.type === "logout" && (this.data = void 0); - }; - } - get data() { - return p(u(this, R)); - } - set data(e) { - w(u(this, R), e, !0); - } - get loading() { - return p(u(this, $)); - } - set loading(e) { - w(u(this, $), e, !0); - } - get lastFetch() { - return p(u(this, j)); - } - set lastFetch(e) { - w(u(this, j), e); - } - get charges() { - return p(u(this, F)); - } - set charges(e) { - w(u(this, F), e); - } - get cooldown() { - return p(u(this, J)); - } - set cooldown(e) { - w(u(this, J), e); - } - get flagsBitmap() { - return p(u(this, K)); - } - set flagsBitmap(e) { - w(u(this, K), e); - } - get timeoutUntil() { - return p(u(this, z)); - } - set timeoutUntil(e) { - w(u(this, z), e); - } - async refresh() { - try { - return (this.loading = !0), (this.data = await de.me()), (this.lastFetch = Date.now()), this.channel.postMessage(JSON.stringify({ type: "refresh", data: this.data })), Te("userId", { id: this.data.id }), !0; - } catch (e) { - return console.error(e), ge.warning(Ft(), { duration: 1e4 }), !1; - } finally { - this.loading = !1; - } - } - async logout() { - await de.logout(), this.channel.postMessage(JSON.stringify({ type: "logout" })), (this.data = void 0); - } - hasColor(e) { - var n; - return e < 32 ? !0 : ((((n = this.data) == null ? void 0 : n.extraColorsBitmap) ?? 0) & (1 << (e - 32))) !== 0; - } -} -(R = new WeakMap()), ($ = new WeakMap()), (j = new WeakMap()), (F = new WeakMap()), (J = new WeakMap()), (K = new WeakMap()), (z = new WeakMap()); -const X = new Fn(); -class f extends Error { - constructor(e, t) { - super(e), (this.message = e), (this.status = t); - } -} -function Jn(a, e) { - const t = {}; - for (const n of a) { - const s = e(n); - let r = t[s]; - r ? r.push(n) : (t[s] = [n]); - } - return t; -} -function pa(a, e) { - const t = {}; - for (const n of a) { - const s = e(n); - t[s] = n; - } - return t; -} -const Kn = [{ tileSize: 1e3, zoom: 11 }], - zn = 4, - Vn = 6e3, - Hn = [ - { name: "Transparent", rgb: [0, 0, 0] }, - { name: "Black", rgb: [0, 0, 0] }, - { name: "Dark Gray", rgb: [60, 60, 60] }, - { name: "Gray", rgb: [120, 120, 120] }, - { name: "Light Gray", rgb: [210, 210, 210] }, - { name: "White", rgb: [255, 255, 255] }, - { name: "Deep Red", rgb: [96, 0, 24] }, - { name: "Red", rgb: [237, 28, 36] }, - { name: "Orange", rgb: [255, 127, 39] }, - { name: "Gold", rgb: [246, 170, 9] }, - { name: "Yellow", rgb: [249, 221, 59] }, - { name: "Light Yellow", rgb: [255, 250, 188] }, - { name: "Dark Green", rgb: [14, 185, 104] }, - { name: "Green", rgb: [19, 230, 123] }, - { name: "Light Green", rgb: [135, 255, 94] }, - { name: "Dark Teal", rgb: [12, 129, 110] }, - { name: "Teal", rgb: [16, 174, 166] }, - { name: "Light Teal", rgb: [19, 225, 190] }, - { name: "Dark Blue", rgb: [40, 80, 158] }, - { name: "Blue", rgb: [64, 147, 228] }, - { name: "Cyan", rgb: [96, 247, 242] }, - { name: "Indigo", rgb: [107, 80, 246] }, - { name: "Light Indigo", rgb: [153, 177, 251] }, - { name: "Dark Purple", rgb: [120, 12, 153] }, - { name: "Purple", rgb: [170, 56, 185] }, - { name: "Light Purple", rgb: [224, 159, 249] }, - { name: "Dark Pink", rgb: [203, 0, 122] }, - { name: "Pink", rgb: [236, 31, 128] }, - { name: "Light Pink", rgb: [243, 141, 169] }, - { name: "Dark Brown", rgb: [104, 70, 52] }, - { name: "Brown", rgb: [149, 104, 42] }, - { name: "Beige", rgb: [248, 178, 119] }, - { name: "Medium Gray", rgb: [170, 170, 170] }, - { name: "Dark Red", rgb: [165, 14, 30] }, - { name: "Light Red", rgb: [250, 128, 114] }, - { name: "Dark Orange", rgb: [228, 92, 26] }, - { name: "Light Tan", rgb: [214, 181, 148] }, - { name: "Dark Goldenrod", rgb: [156, 132, 49] }, - { name: "Goldenrod", rgb: [197, 173, 49] }, - { name: "Light Goldenrod", rgb: [232, 212, 95] }, - { name: "Dark Olive", rgb: [74, 107, 58] }, - { name: "Olive", rgb: [90, 148, 74] }, - { name: "Light Olive", rgb: [132, 197, 115] }, - { name: "Dark Cyan", rgb: [15, 121, 159] }, - { name: "Light Cyan", rgb: [187, 250, 242] }, - { name: "Light Blue", rgb: [125, 199, 255] }, - { name: "Dark Indigo", rgb: [77, 49, 184] }, - { name: "Dark Slate Blue", rgb: [74, 66, 132] }, - { name: "Slate Blue", rgb: [122, 113, 196] }, - { name: "Light Slate Blue", rgb: [181, 174, 241] }, - { name: "Light Brown", rgb: [219, 164, 99] }, - { name: "Dark Beige", rgb: [209, 128, 81] }, - { name: "Light Beige", rgb: [255, 197, 165] }, - { name: "Dark Peach", rgb: [155, 82, 73] }, - { name: "Peach", rgb: [209, 128, 120] }, - { name: "Light Peach", rgb: [250, 182, 164] }, - { name: "Dark Tan", rgb: [123, 99, 82] }, - { name: "Tan", rgb: [156, 132, 107] }, - { name: "Dark Slate", rgb: [51, 57, 65] }, - { name: "Slate", rgb: [109, 117, 141] }, - { name: "Light Slate", rgb: [179, 185, 209] }, - { name: "Dark Stone", rgb: [109, 100, 63] }, - { name: "Stone", rgb: [148, 140, 107] }, - { name: "Light Stone", rgb: [205, 197, 158] }, - ], - Wn = { needsPhoneVerification: "needs_phone_verification" }, - Yn = { Droplet: {}, "Max. Charge": {}, "Paint Charge": {}, Color: {}, Flag: {}, "Profile Picture": {} }, - Zn = { - 10: { name: "25,000 Droplets", price: 500, isDollar: !0, lookupKey: "droplets_5", items: [{ name: "Droplet", amount: 25e3 }] }, - 20: { name: "78,750 Droplets", price: 1500, isDollar: !0, lookupKey: "droplets_15", items: [{ name: "Droplet", amount: 76750 }] }, - 30: { name: "165,000 Droplets", price: 3e3, isDollar: !0, lookupKey: "droplets_30", items: [{ name: "Droplet", amount: 165e3 }] }, - 40: { name: "287,500 Droplets", price: 5e3, isDollar: !0, lookupKey: "droplets_50", items: [{ name: "Droplet", amount: 287500 }] }, - 50: { name: "450,000 Droplets", price: 7500, isDollar: !0, lookupKey: "droplets_75", items: [{ name: "Droplet", amount: 45e4 }] }, - 60: { name: "625,000 Droplets", price: 1e4, isDollar: !0, lookupKey: "droplets_100", items: [{ name: "Droplet", amount: 625e3 }] }, - 70: { name: "+5 Max. Charges", price: 500, isDollar: !1, items: [{ name: "Max. Charge", amount: 5 }] }, - 80: { name: "+30 Paint Charges", price: 500, isDollar: !1, items: [{ name: "Paint Charge", amount: 30 }] }, - 100: { name: "Unlock Color", price: 2e3, isDollar: !1, items: [{ name: "Color", amount: 1 }] }, - 110: { name: "Flag", price: 2e4, isDollar: !1, items: [{ name: "Flag", amount: 1 }] }, - 120: { name: "Profile Picture", price: 2e4, isDollar: !1, items: [{ name: "Profile Picture", amount: 1 }] }, - }, - Qn = JSON.parse( - `[{"id":1,"name":"Afghanistan","code":"AF","flag":"🇦🇫"},{"id":2,"name":"Albania","code":"AL","flag":"🇦🇱"},{"id":3,"name":"Algeria","code":"DZ","flag":"🇩🇿"},{"id":4,"name":"American Samoa","code":"AS","flag":"🇦🇸"},{"id":5,"name":"Andorra","code":"AD","flag":"🇦🇩"},{"id":6,"name":"Angola","code":"AO","flag":"🇦🇴"},{"id":7,"name":"Anguilla","code":"AI","flag":"🇦🇮"},{"id":8,"name":"Antarctica","code":"AQ","flag":"🇦🇶"},{"id":9,"name":"Antigua and Barbuda","code":"AG","flag":"🇦🇬"},{"id":10,"name":"Argentina","code":"AR","flag":"🇦🇷"},{"id":11,"name":"Armenia","code":"AM","flag":"🇦🇲"},{"id":12,"name":"Aruba","code":"AW","flag":"🇦🇼"},{"id":13,"name":"Australia","code":"AU","flag":"🇦🇺"},{"id":14,"name":"Austria","code":"AT","flag":"🇦🇹"},{"id":15,"name":"Azerbaijan","code":"AZ","flag":"🇦🇿"},{"id":16,"name":"Bahamas","code":"BS","flag":"🇧🇸"},{"id":17,"name":"Bahrain","code":"BH","flag":"🇧🇭"},{"id":18,"name":"Bangladesh","code":"BD","flag":"🇧🇩"},{"id":19,"name":"Barbados","code":"BB","flag":"🇧🇧"},{"id":20,"name":"Belarus","code":"BY","flag":"🇧🇾"},{"id":21,"name":"Belgium","code":"BE","flag":"🇧🇪"},{"id":22,"name":"Belize","code":"BZ","flag":"🇧🇿"},{"id":23,"name":"Benin","code":"BJ","flag":"🇧🇯"},{"id":24,"name":"Bermuda","code":"BM","flag":"🇧🇲"},{"id":25,"name":"Bhutan","code":"BT","flag":"🇧🇹"},{"id":26,"name":"Bolivia","code":"BO","flag":"🇧🇴"},{"id":27,"name":"Bonaire","code":"BQ","flag":"🇧🇶"},{"id":28,"name":"Bosnia and Herzegovina","code":"BA","flag":"🇧🇦"},{"id":29,"name":"Botswana","code":"BW","flag":"🇧🇼"},{"id":30,"name":"Bouvet Island","code":"BV","flag":"🇧🇻"},{"id":31,"name":"Brazil","code":"BR","flag":"🇧🇷"},{"id":32,"name":"British Indian Ocean Territory","code":"IO","flag":"🇮🇴"},{"id":33,"name":"Brunei Darussalam","code":"BN","flag":"🇧🇳"},{"id":34,"name":"Bulgaria","code":"BG","flag":"🇧🇬"},{"id":35,"name":"Burkina Faso","code":"BF","flag":"🇧🇫"},{"id":36,"name":"Burundi","code":"BI","flag":"🇧🇮"},{"id":37,"name":"Cabo Verde","code":"CV","flag":"🇨🇻"},{"id":38,"name":"Cambodia","code":"KH","flag":"🇰🇭"},{"id":39,"name":"Cameroon","code":"CM","flag":"🇨🇲"},{"id":40,"name":"Canada","code":"CA","flag":"🇨🇦"},{"id":41,"name":"Cayman Islands","code":"KY","flag":"🇰🇾"},{"id":42,"name":"Central African Republic","code":"CF","flag":"🇨🇫"},{"id":43,"name":"Chad","code":"TD","flag":"🇹🇩"},{"id":44,"name":"Chile","code":"CL","flag":"🇨🇱"},{"id":45,"name":"China","code":"CN","flag":"🇨🇳"},{"id":46,"name":"Christmas Island","code":"CX","flag":"🇨🇽"},{"id":47,"name":"Cocos (Keeling) Islands","code":"CC","flag":"🇨🇨"},{"id":48,"name":"Colombia","code":"CO","flag":"🇨🇴"},{"id":49,"name":"Comoros","code":"KM","flag":"🇰🇲"},{"id":50,"name":"Congo","code":"CG","flag":"🇨🇬"},{"id":51,"name":"Cook Islands","code":"CK","flag":"🇨🇰"},{"id":52,"name":"Costa Rica","code":"CR","flag":"🇨🇷"},{"id":53,"name":"Croatia","code":"HR","flag":"🇭🇷"},{"id":54,"name":"Cuba","code":"CU","flag":"🇨🇺"},{"id":55,"name":"Curaçao","code":"CW","flag":"🇨🇼"},{"id":56,"name":"Cyprus","code":"CY","flag":"🇨🇾"},{"id":57,"name":"Czechia","code":"CZ","flag":"🇨🇿"},{"id":58,"name":"Côte d'Ivoire","code":"CI","flag":"🇨🇮"},{"id":59,"name":"Denmark","code":"DK","flag":"🇩🇰"},{"id":60,"name":"Djibouti","code":"DJ","flag":"🇩🇯"},{"id":61,"name":"Dominica","code":"DM","flag":"🇩🇲"},{"id":62,"name":"Dominican Republic","code":"DO","flag":"🇩🇴"},{"id":63,"name":"Ecuador","code":"EC","flag":"🇪🇨"},{"id":64,"name":"Egypt","code":"EG","flag":"🇪🇬"},{"id":65,"name":"El Salvador","code":"SV","flag":"🇸🇻"},{"id":66,"name":"Equatorial Guinea","code":"GQ","flag":"🇬🇶"},{"id":67,"name":"Eritrea","code":"ER","flag":"🇪🇷"},{"id":68,"name":"Estonia","code":"EE","flag":"🇪🇪"},{"id":69,"name":"Eswatini","code":"SZ","flag":"🇸🇿"},{"id":70,"name":"Ethiopia","code":"ET","flag":"🇪🇹"},{"id":71,"name":"Falkland Islands (Malvinas)","code":"FK","flag":"🇫🇰"},{"id":72,"name":"Faroe Islands","code":"FO","flag":"🇫🇴"},{"id":73,"name":"Fiji","code":"FJ","flag":"🇫🇯"},{"id":74,"name":"Finland","code":"FI","flag":"🇫🇮"},{"id":75,"name":"France","code":"FR","flag":"🇫🇷"},{"id":76,"name":"French Guiana","code":"GF","flag":"🇬🇫"},{"id":77,"name":"French Polynesia","code":"PF","flag":"🇵🇫"},{"id":78,"name":"French Southern Territories","code":"TF","flag":"🇹🇫"},{"id":79,"name":"Gabon","code":"GA","flag":"🇬🇦"},{"id":80,"name":"Gambia","code":"GM","flag":"🇬🇲"},{"id":81,"name":"Georgia","code":"GE","flag":"🇬🇪"},{"id":82,"name":"Germany","code":"DE","flag":"🇩🇪"},{"id":83,"name":"Ghana","code":"GH","flag":"🇬🇭"},{"id":84,"name":"Gibraltar","code":"GI","flag":"🇬🇮"},{"id":85,"name":"Greece","code":"GR","flag":"🇬🇷"},{"id":86,"name":"Greenland","code":"GL","flag":"🇬🇱"},{"id":87,"name":"Grenada","code":"GD","flag":"🇬🇩"},{"id":88,"name":"Guadeloupe","code":"GP","flag":"🇬🇵"},{"id":89,"name":"Guam","code":"GU","flag":"🇬🇺"},{"id":90,"name":"Guatemala","code":"GT","flag":"🇬🇹"},{"id":91,"name":"Guernsey","code":"GG","flag":"🇬🇬"},{"id":92,"name":"Guinea","code":"GN","flag":"🇬🇳"},{"id":93,"name":"Guinea-Bissau","code":"GW","flag":"🇬🇼"},{"id":94,"name":"Guyana","code":"GY","flag":"🇬🇾"},{"id":95,"name":"Haiti","code":"HT","flag":"🇭🇹"},{"id":96,"name":"Heard Island and McDonald Islands","code":"HM","flag":"🇭🇲"},{"id":97,"name":"Honduras","code":"HN","flag":"🇭🇳"},{"id":98,"name":"Hong Kong","code":"HK","flag":"🇭🇰"},{"id":99,"name":"Hungary","code":"HU","flag":"🇭🇺"},{"id":100,"name":"Iceland","code":"IS","flag":"🇮🇸"},{"id":101,"name":"India","code":"IN","flag":"🇮🇳"},{"id":102,"name":"Indonesia","code":"ID","flag":"🇮🇩"},{"id":103,"name":"Iran","code":"IR","flag":"🇮🇷"},{"id":104,"name":"Iraq","code":"IQ","flag":"🇮🇶"},{"id":105,"name":"Ireland","code":"IE","flag":"🇮🇪"},{"id":106,"name":"Isle of Man","code":"IM","flag":"🇮🇲"},{"id":107,"name":"Israel","code":"IL","flag":"🇮🇱"},{"id":108,"name":"Italy","code":"IT","flag":"🇮🇹"},{"id":109,"name":"Jamaica","code":"JM","flag":"🇯🇲"},{"id":110,"name":"Japan","code":"JP","flag":"🇯🇵"},{"id":111,"name":"Jersey","code":"JE","flag":"🇯🇪"},{"id":112,"name":"Jordan","code":"JO","flag":"🇯🇴"},{"id":113,"name":"Kazakhstan","code":"KZ","flag":"🇰🇿"},{"id":114,"name":"Kenya","code":"KE","flag":"🇰🇪"},{"id":115,"name":"Kiribati","code":"KI","flag":"🇰🇮"},{"id":116,"name":"Kosovo","code":"XK","flag":"🇽🇰"},{"id":117,"name":"Kuwait","code":"KW","flag":"🇰🇼"},{"id":118,"name":"Kyrgyzstan","code":"KG","flag":"🇰🇬"},{"id":119,"name":"Laos","code":"LA","flag":"🇱🇦"},{"id":120,"name":"Latvia","code":"LV","flag":"🇱🇻"},{"id":121,"name":"Lebanon","code":"LB","flag":"🇱🇧"},{"id":122,"name":"Lesotho","code":"LS","flag":"🇱🇸"},{"id":123,"name":"Liberia","code":"LR","flag":"🇱🇷"},{"id":124,"name":"Libya","code":"LY","flag":"🇱🇾"},{"id":125,"name":"Liechtenstein","code":"LI","flag":"🇱🇮"},{"id":126,"name":"Lithuania","code":"LT","flag":"🇱🇹"},{"id":127,"name":"Luxembourg","code":"LU","flag":"🇱🇺"},{"id":128,"name":"Macao","code":"MO","flag":"🇲🇴"},{"id":129,"name":"Madagascar","code":"MG","flag":"🇲🇬"},{"id":130,"name":"Malawi","code":"MW","flag":"🇲🇼"},{"id":131,"name":"Malaysia","code":"MY","flag":"🇲🇾"},{"id":132,"name":"Maldives","code":"MV","flag":"🇲🇻"},{"id":133,"name":"Mali","code":"ML","flag":"🇲🇱"},{"id":134,"name":"Malta","code":"MT","flag":"🇲🇹"},{"id":135,"name":"Marshall Islands","code":"MH","flag":"🇲🇭"},{"id":136,"name":"Martinique","code":"MQ","flag":"🇲🇶"},{"id":137,"name":"Mauritania","code":"MR","flag":"🇲🇷"},{"id":138,"name":"Mauritius","code":"MU","flag":"🇲🇺"},{"id":139,"name":"Mayotte","code":"YT","flag":"🇾🇹"},{"id":140,"name":"Mexico","code":"MX","flag":"🇲🇽"},{"id":141,"name":"Micronesia","code":"FM","flag":"🇫🇲"},{"id":142,"name":"Moldova","code":"MD","flag":"🇲🇩"},{"id":143,"name":"Monaco","code":"MC","flag":"🇲🇨"},{"id":144,"name":"Mongolia","code":"MN","flag":"🇲🇳"},{"id":145,"name":"Montenegro","code":"ME","flag":"🇲🇪"},{"id":146,"name":"Montserrat","code":"MS","flag":"🇲🇸"},{"id":147,"name":"Morocco","code":"MA","flag":"🇲🇦"},{"id":148,"name":"Mozambique","code":"MZ","flag":"🇲🇿"},{"id":149,"name":"Myanmar","code":"MM","flag":"🇲🇲"},{"id":150,"name":"Namibia","code":"NA","flag":"🇳🇦"},{"id":151,"name":"Nauru","code":"NR","flag":"🇳🇷"},{"id":152,"name":"Nepal","code":"NP","flag":"🇳🇵"},{"id":153,"name":"Netherlands","code":"NL","flag":"🇳🇱"},{"id":154,"name":"New Caledonia","code":"NC","flag":"🇳🇨"},{"id":155,"name":"New Zealand","code":"NZ","flag":"🇳🇿"},{"id":156,"name":"Nicaragua","code":"NI","flag":"🇳🇮"},{"id":157,"name":"Niger","code":"NE","flag":"🇳🇪"},{"id":158,"name":"Nigeria","code":"NG","flag":"🇳🇬"},{"id":159,"name":"Niue","code":"NU","flag":"🇳🇺"},{"id":160,"name":"Norfolk Island","code":"NF","flag":"🇳🇫"},{"id":161,"name":"North Korea","code":"KP","flag":"🇰🇵"},{"id":162,"name":"North Macedonia","code":"MK","flag":"🇲🇰"},{"id":163,"name":"Northern Mariana Islands","code":"MP","flag":"🇲🇵"},{"id":164,"name":"Norway","code":"NO","flag":"🇳🇴"},{"id":165,"name":"Oman","code":"OM","flag":"🇴🇲"},{"id":166,"name":"Pakistan","code":"PK","flag":"🇵🇰"},{"id":167,"name":"Palau","code":"PW","flag":"🇵🇼"},{"id":168,"name":"Palestine","code":"PS","flag":"🇵🇸"},{"id":169,"name":"Panama","code":"PA","flag":"🇵🇦"},{"id":170,"name":"Papua New Guinea","code":"PG","flag":"🇵🇬"},{"id":171,"name":"Paraguay","code":"PY","flag":"🇵🇾"},{"id":172,"name":"Peru","code":"PE","flag":"🇵🇪"},{"id":173,"name":"Philippines","code":"PH","flag":"🇵🇭"},{"id":174,"name":"Pitcairn","code":"PN","flag":"🇵🇳"},{"id":175,"name":"Poland","code":"PL","flag":"🇵🇱"},{"id":176,"name":"Portugal","code":"PT","flag":"🇵🇹"},{"id":177,"name":"Puerto Rico","code":"PR","flag":"🇵🇷"},{"id":178,"name":"Qatar","code":"QA","flag":"🇶🇦"},{"id":179,"name":"Republic of the Congo","code":"CD","flag":"🇨🇩"},{"id":180,"name":"Romania","code":"RO","flag":"🇷🇴"},{"id":181,"name":"Russia","code":"RU","flag":"🇷🇺"},{"id":182,"name":"Rwanda","code":"RW","flag":"🇷🇼"},{"id":183,"name":"Réunion","code":"RE","flag":"🇷🇪"},{"id":184,"name":"Saint Barthélemy","code":"BL","flag":"🇧🇱"},{"id":185,"name":"Saint Helena","code":"SH","flag":"🇸🇭"},{"id":186,"name":"Saint Kitts and Nevis","code":"KN","flag":"🇰🇳"},{"id":187,"name":"Saint Lucia","code":"LC","flag":"🇱🇨"},{"id":188,"name":"Saint Martin (French part)","code":"MF","flag":"🇲🇫"},{"id":189,"name":"Saint Pierre and Miquelon","code":"PM","flag":"🇵🇲"},{"id":190,"name":"Saint Vincent and the Grenadines","code":"VC","flag":"🇻🇨"},{"id":191,"name":"Samoa","code":"WS","flag":"🇼🇸"},{"id":192,"name":"San Marino","code":"SM","flag":"🇸🇲"},{"id":193,"name":"Sao Tome and Principe","code":"ST","flag":"🇸🇹"},{"id":194,"name":"Saudi Arabia","code":"SA","flag":"🇸🇦"},{"id":195,"name":"Senegal","code":"SN","flag":"🇸🇳"},{"id":196,"name":"Serbia","code":"RS","flag":"🇷🇸"},{"id":197,"name":"Seychelles","code":"SC","flag":"🇸🇨"},{"id":198,"name":"Sierra Leone","code":"SL","flag":"🇸🇱"},{"id":199,"name":"Singapore","code":"SG","flag":"🇸🇬"},{"id":200,"name":"Sint Maarten (Dutch part)","code":"SX","flag":"🇸🇽"},{"id":201,"name":"Slovakia","code":"SK","flag":"🇸🇰"},{"id":202,"name":"Slovenia","code":"SI","flag":"🇸🇮"},{"id":203,"name":"Solomon Islands","code":"SB","flag":"🇸🇧"},{"id":204,"name":"Somalia","code":"SO","flag":"🇸🇴"},{"id":205,"name":"South Africa","code":"ZA","flag":"🇿🇦"},{"id":206,"name":"South Georgia and the South Sandwich Islands","code":"GS","flag":"🇬🇸"},{"id":207,"name":"South Korea","code":"KR","flag":"🇰🇷"},{"id":208,"name":"South Sudan","code":"SS","flag":"🇸🇸"},{"id":209,"name":"Spain","code":"ES","flag":"🇪🇸"},{"id":210,"name":"Sri Lanka","code":"LK","flag":"🇱🇰"},{"id":211,"name":"Sudan","code":"SD","flag":"🇸🇩"},{"id":212,"name":"Suriname","code":"SR","flag":"🇸🇷"},{"id":213,"name":"Svalbard and Jan Mayen","code":"SJ","flag":"🇸🇯"},{"id":214,"name":"Sweden","code":"SE","flag":"🇸🇪"},{"id":215,"name":"Switzerland","code":"CH","flag":"🇨🇭"},{"id":216,"name":"Syrian Arab Republic","code":"SY","flag":"🇸🇾"},{"id":217,"name":"Taiwan","code":"TW","flag":"🇹🇼"},{"id":218,"name":"Tajikistan","code":"TJ","flag":"🇹🇯"},{"id":219,"name":"Tanzania","code":"TZ","flag":"🇹🇿"},{"id":220,"name":"Thailand","code":"TH","flag":"🇹🇭"},{"id":221,"name":"Timor-Leste","code":"TL","flag":"🇹🇱"},{"id":222,"name":"Togo","code":"TG","flag":"🇹🇬"},{"id":223,"name":"Tokelau","code":"TK","flag":"🇹🇰"},{"id":224,"name":"Tonga","code":"TO","flag":"🇹🇴"},{"id":225,"name":"Trinidad and Tobago","code":"TT","flag":"🇹🇹"},{"id":226,"name":"Tunisia","code":"TN","flag":"🇹🇳"},{"id":227,"name":"Turkmenistan","code":"TM","flag":"🇹🇲"},{"id":228,"name":"Turks and Caicos Islands","code":"TC","flag":"🇹🇨"},{"id":229,"name":"Tuvalu","code":"TV","flag":"🇹🇻"},{"id":230,"name":"Türkiye","code":"TR","flag":"🇹🇷"},{"id":231,"name":"Uganda","code":"UG","flag":"🇺🇬"},{"id":232,"name":"Ukraine","code":"UA","flag":"🇺🇦"},{"id":233,"name":"United Arab Emirates","code":"AE","flag":"🇦🇪"},{"id":234,"name":"United Kingdom","code":"GB","flag":"🇬🇧"},{"id":235,"name":"United States","code":"US","flag":"🇺🇸"},{"id":236,"name":"United States Minor Outlying Islands","code":"UM","flag":"🇺🇲"},{"id":237,"name":"Uruguay","code":"UY","flag":"🇺🇾"},{"id":238,"name":"Uzbekistan","code":"UZ","flag":"🇺🇿"},{"id":239,"name":"Vanuatu","code":"VU","flag":"🇻🇺"},{"id":240,"name":"Vatican City","code":"VA","flag":"🇻🇦"},{"id":241,"name":"Venezuela","code":"VE","flag":"🇻🇪"},{"id":242,"name":"Viet Nam","code":"VN","flag":"🇻🇳"},{"id":243,"name":"Virgin Islands","code":"VG","flag":"🇻🇬"},{"id":244,"name":"Virgin Islands","code":"VI","flag":"🇻🇮"},{"id":245,"name":"Wallis and Futuna","code":"WF","flag":"🇼🇫"},{"id":246,"name":"Western Sahara","code":"EH","flag":"🇪🇭"},{"id":247,"name":"Yemen","code":"YE","flag":"🇾🇪"},{"id":248,"name":"Zambia","code":"ZM","flag":"🇿🇲"},{"id":249,"name":"Zimbabwe","code":"ZW","flag":"🇿🇼"},{"id":250,"name":"Åland Islands","code":"AX","flag":"🇦🇽"},{"id":251,"name":"Canary Islands","code":"IC","flag":"🇮🇨"}]` - ), - te = { seasons: Kn, regionSize: zn, refreshIntervalMs: Vn, colors: Hn, errors: Wn, items: Yn, products: Zn, countries: Qn }, - Xn = te, - pe = te.seasons.length - 1, - wa = te.seasons[pe].zoom, - ba = te.seasons[pe].tileSize; -function ya(a) { - return Xn.countries[a - 1]; -} -function ea(a) { - return X.data ? X.data.experiments[a] ?? null : null; -} -function Sa(a) { - var e, t; - return ((t = (e = X.data) == null ? void 0 : e.experiments[a]) == null ? void 0 : t.enabled) ?? !0; -} -var V; -class ta { - constructor(e) { - h(this, V, y(!0)); - this.url = e; - } - get online() { - return p(u(this, V)); - } - set online(e) { - w(u(this, V), e, !0); - } - async paint(e, t, n) { - const s = Jn(e, (d) => `t=(${d.tile[0]},${d.tile[1]}),s=${d.season}`), - r = ea("2025-09_pawtect"); - if (!r) throw new Error("paint request while pawtect experiment not found"); - const o = ( - await Promise.all( - Object.values(s).map((d) => { - const [c, S] = d[0].tile, - b = d[0].season, - we = { colors: d.map((ne) => ne.colorIdx), coords: d.flatMap((ne) => ne.pixel), t, fp: n }, - ae = JSON.stringify(we); - return this.request(`/s${b}/pixel/${c}/${S}`, { method: "POST", body: ae, headers: { "x-pawtect-token": r.variant !== "disabled" ? Be(ae) : "", "x-pawtect-variant": r.variant }, credentials: "include" }); - }) - ) - ).filter((d) => d.status !== 200); - if (o.length) { - const d = o[0]; - if (d.status === 401) throw new Error(Ke()); - if (d.status === 403) { - if (d.headers.get("cf-mitigated") === "challenge") throw new Error(zt()); - const c = await d.json(); - if ((c == null ? void 0 : c.error) === "refresh") throw new Error(Wt()); - if ((c == null ? void 0 : c.error) === "color-not-owned") throw new Error(Ln()); - X.refresh(); - } else if (d.status === 451) { - const c = await o[0].json(); - c == null || c.err; - const S = c == null ? void 0 : c.suspension; - if (S === "ban") throw new Error(An()); - if (S === "timeout") { - const b = new Date(Date.now() + ((c == null ? void 0 : c.durationMs) ?? 0)); - throw new Error(In({ until: b.toLocaleString() })); - } else throw new Error(i()); - } else throw new Error(i()); - } - } - async getPixelInfo({ season: e, tile: [t, n], pixel: [s, r], isModerator: l = !1 }) { - const o = new URLSearchParams(); - o.set("x", String(s)), o.set("y", String(r)); - const d = await this.request(`${l ? "/moderator" : ""}/s${e}/pixel/${t}/${n}?${o.toString()}`, { credentials: l ? "include" : void 0 }); - if (d.status !== 200) { - const c = await d.text(); - throw new Error(He({ err: c })); - } - return d.json(); - } - async getPixelAreaInfo({ season: e, tile: [t, n], p0: [s, r], p1: [l, o] }) { - const d = await this.request(`/moderator/pixel-area/s${e}/${t}/${n}?x0=${s}&y0=${r}&x1=${l}&y1=${o}`, { credentials: "include" }); - if (d.status !== 200) { - const c = await d.text(); - throw (console.error("Error while fetching pixel area info", c), new Error(i())); - } - return d.json(); - } - async me() { - const e = await this.request("/me", { credentials: "include" }); - if (e.status === 200) return await e.json(); - } - async logout() { - const e = await this.request("/auth/logout", { method: "POST", credentials: "include" }); - if (e.status !== 200) throw new Error(await e.text()); - return await e.json(); - } - async refreshPaymentSession(e) { - return (await this.request(`/payment/refresh-session/${encodeURIComponent(e)}`, { method: "POST", credentials: "include" })).status === 200; - } - async getOtpCooldown() { - const e = await this.request("/otp/cooldown", { credentials: "include" }); - if (e.status !== 200) throw new Error(i()); - return await e.json(); - } - async sendOtp(e) { - const t = await this.request("/otp/send", { method: "POST", credentials: "include", body: JSON.stringify({ phone: e }) }); - if (t.status === 400) throw new Error(Ze()); - if (t.status === 403) throw new Error(et()); - if (t.status === 429) throw new Error(at()); - if (t.status !== 200) throw new Error(i()); - return await t.json(); - } - async verifyOtp(e) { - const t = await this.request("/otp/verify", { method: "POST", credentials: "include", body: JSON.stringify({ code: e }) }); - if (t.status === 400) throw new Error(ot()); - if (t.status !== 200) throw new Error(i()); - return await t.json(); - } - async updateMe(e) { - const t = await this.request("/me/update", { method: "POST", credentials: "include", body: JSON.stringify(e) }); - if (t.status === 400) { - const n = await t.json(); - throw (n == null ? void 0 : n.error) === "invalid_name" ? new Error(Dn()) : (n == null ? void 0 : n.error) === "invalid_discord" ? new Error(Rn()) : new Error(n == null ? void 0 : n.error); - } else if (t.status !== 200) throw new Error(i()); - } - async deleteMe() { - if ((await this.request("/me/delete", { method: "POST", credentials: "include" })).status !== 200) throw new Error(i()); - } - async favoriteLocation(e) { - const t = await this.request("/favorite-location", { method: "POST", body: JSON.stringify({ latitude: e[0], longitude: e[1] }), credentials: "include" }); - if (t.status === 403) throw new Error(lt()); - if (t.status !== 200) throw new Error(i()); - } - async deleteFavoriteLocation(e) { - if ((await this.request("/favorite-location/delete", { method: "POST", body: JSON.stringify({ id: e }), credentials: "include" })).status !== 200) throw new Error(i()); - } - async updateFavoriteLocation(e, t) { - const n = await this.request("/favorite-location/update", { method: "POST", body: JSON.stringify({ id: e, name: t }), credentials: "include" }); - if (n.status === 400) throw new Error(gt()); - if (n.status !== 200) throw new Error(i()); - } - async leaderboardPlayers(e) { - const t = await this.request(`/leaderboard/player/${e}`); - if (t.status !== 200) throw new Error(v()); - return t.json(); - } - async leaderboardAlliances(e) { - const t = await this.request(`/leaderboard/alliance/${e}`); - if (t.status !== 200) throw new Error(v()); - return t.json(); - } - async leaderboardRegions(e, t = 0) { - const n = await this.request(`/leaderboard/region/${e}/${t}`); - if (n.status === 200) return n.json(); - throw new Error(v()); - } - async leaderboardRegionPlayers(e, t) { - const n = await this.request(`/leaderboard/region/players/${e}/${t}`); - if (n.status === 200) return n.json(); - throw new Error(v()); - } - async leaderboardRegionAlliances(e, t) { - const n = await this.request(`/leaderboard/region/alliances/${e}/${t}`); - if (n.status === 200) return n.json(); - throw new Error(v()); - } - async leaderboardCountries(e) { - const t = await this.request(`/leaderboard/country/${e}`, { credentials: "include" }); - if (t.status === 200) return t.json(); - throw new Error(v()); - } - async getRandomTile(e) { - const t = await this.request(`/s${e}/tile/random`); - if (t.status !== 200) throw new Error(i()); - return t.json(); - } - async purchase(e) { - const t = await this.request("/purchase", { method: "POST", credentials: "include", body: JSON.stringify({ product: e }) }); - if (t.status !== 200) throw t.status === 404 ? new Error(ht()) : t.status === 403 ? new Error(wt()) : t.status === 409 ? new Error(St()) : new Error(i()); - } - async getAlliance() { - const e = await this.request("/alliance", { credentials: "include" }); - if (e.status === 200) return e.json(); - if (e.status === 404) return; - throw new Error(i()); - } - async createAlliance(e) { - const t = await this.request("/alliance", { method: "POST", credentials: "include", body: JSON.stringify({ name: e }) }); - if (t.status === 200) return t.json(); - if (t.status === 400) { - const n = await t.json(); - throw n.error === "max_characters" ? new Error(vt()) : n.error === "name_taken" ? new Error(xt()) : n.error == "empty_name" ? new Error(kt()) : new Error(i()); - } else throw t.status === 403 ? new Error(Mt()) : new Error(i()); - } - async leaveAlliance() { - if ((await this.request("/alliance/leave", { method: "POST", credentials: "include" })).status !== 200) throw new Error(i()); - } - async updateAllianceDescription(e) { - const t = await this.request("/alliance/update-description", { method: "POST", credentials: "include", body: JSON.stringify({ description: e }) }); - if (t.status !== 200) throw t.status === 403 ? new Error(E()) : new Error(i()); - } - async updateAllianceHeadquarters(e, t) { - const n = await this.request("/alliance/update-headquarters", { method: "POST", credentials: "include", body: JSON.stringify({ latitude: e, longitude: t }) }); - if (n.status !== 200) throw n.status === 403 ? new Error(E()) : new Error(i()); - } - async allianceLeaderboard(e) { - const t = await this.request(`/alliance/leaderboard/${e}`, { credentials: "include" }); - if (t.status === 200) return t.json(); - throw t.status === 403 ? new Error(E()) : new Error(v()); - } - async getAllianceInvites() { - const e = await this.request("/alliance/invites", { credentials: "include" }); - if (e.status === 200) return e.json(); - throw e.status === 403 ? new Error(E()) : new Error(i()); - } - async joinAlliance(e) { - switch ((await this.request(`/alliance/join/${e}`, { credentials: "include" })).status) { - case 200: - return "success"; - case 208: - return "in-another-alliance"; - case 401: - return "not-logged-in"; - case 403: - return "banned"; - case 400: - case 404: - return "invalid-invite"; - default: - return "error"; - } - } - async getAllianceMembers(e) { - const t = await this.request(`/alliance/members/${e}`, { credentials: "include" }); - if (t.status === 200) return t.json(); - throw new Error(i()); - } - async getAllianceBannedMembers(e) { - const t = await this.request(`/alliance/members/banned/${e}`, { credentials: "include" }); - if (t.status === 200) return t.json(); - throw new Error(i()); - } - async getAllianceById(e) { - const t = await this.request(`/admin/alliances/${e}`, { method: "GET", credentials: "include" }); - if (t.status === 404) return; - if (t.status !== 200) throw new f(i(), t.status); - const n = await t.json(); - return { id: Number(n.id), name: String(n.name), pixelsPainted: Number((n == null ? void 0 : n.pixels_painted) ?? 0) }; - } - async searchAlliance(e) { - const t = new URLSearchParams({ q: e }), - n = await this.request(`/admin/alliances/search?${t.toString()}`, { method: "GET", credentials: "include" }); - if (n.status !== 200) throw new f(i(), n.status); - const s = await n.json(); - return (Array.isArray(s) ? s : []).map((r) => ({ id: Number(r.id), name: String(r.name ?? ""), pixelsPainted: Number((r == null ? void 0 : r.pixels_painted) ?? 0) })); - } - async searchAlliances(e) { - return this.searchAlliance(e); - } - async getAllianceFull(e) { - const t = await this.request(`/admin/alliances/${e}/full`, { method: "GET", credentials: "include" }); - if (t.status === 404) return null; - if (t.status !== 200) throw new f(i(), t.status); - const n = await t.json(), - s = Array.isArray(n == null ? void 0 : n.members) ? n.members : []; - return { - id: Number(n == null ? void 0 : n.id), - name: String((n == null ? void 0 : n.name) ?? ""), - description: (n == null ? void 0 : n.description) ?? null, - ownerId: Number((n == null ? void 0 : n.ownerId) ?? (n == null ? void 0 : n.created_by)), - ownerName: (n == null ? void 0 : n.ownerName) ?? null, - hqName: (n == null ? void 0 : n.hqName) ?? null, - hqLatitude: (n == null ? void 0 : n.hqLatitude) ?? (n == null ? void 0 : n.hq_latitude) ?? null, - hqLongitude: (n == null ? void 0 : n.hqLongitude) ?? (n == null ? void 0 : n.hq_longitude) ?? null, - pixelsPainted: Number((n == null ? void 0 : n.pixelsPainted) ?? (n == null ? void 0 : n.pixels_painted) ?? 0), - membersCount: Number((n == null ? void 0 : n.membersCount) ?? s.length), - members: s.map((r) => ({ - id: Number(r == null ? void 0 : r.id), - name: String((r == null ? void 0 : r.name) ?? `#${r == null ? void 0 : r.id}`), - picture: (r == null ? void 0 : r.picture) ?? null, - pixelsPainted: Number((r == null ? void 0 : r.pixelsPainted) ?? (r == null ? void 0 : r.pixels_painted) ?? 0), - lastPixelLatitude: (r == null ? void 0 : r.lastPixelLatitude) ?? null, - lastPixelLongitude: (r == null ? void 0 : r.lastPixelLongitude) ?? null, - role: (r == null ? void 0 : r.alliance_role) === "admin" || (r == null ? void 0 : r.role) === "admin" ? "admin" : "member", - })), - }; - } - async getAdminAllianceMembers(e, t) { - const n = new URLSearchParams({ page: String(t.page), pageSize: String(t.pageSize) }), - s = await this.request(`/admin/alliances/${e}/members?${n.toString()}`, { method: "GET", credentials: "include" }); - if (s.status === 404) return { members: [], total: 0 }; - if (s.status !== 200) throw new f(i(), s.status); - const r = await s.json(), - l = Array.isArray(r == null ? void 0 : r.members) ? r.members : []; - return { - members: l.map((o) => ({ - id: Number(o == null ? void 0 : o.id), - name: String((o == null ? void 0 : o.name) ?? `#${o == null ? void 0 : o.id}`), - picture: (o == null ? void 0 : o.picture) ?? null, - pixelsPainted: Number((o == null ? void 0 : o.pixelsPainted) ?? (o == null ? void 0 : o.pixels_painted) ?? 0), - lastPixelLatitude: (o == null ? void 0 : o.lastPixelLatitude) ?? null, - lastPixelLongitude: (o == null ? void 0 : o.lastPixelLongitude) ?? null, - role: (o == null ? void 0 : o.alliance_role) === "admin" || (o == null ? void 0 : o.role) === "admin" ? "admin" : "member", - })), - total: Number((r == null ? void 0 : r.total) ?? l.length), - }; - } - async renameAlliance(e, t) { - const n = await this.request(`/admin/alliances/${e}/rename`, { method: "POST", credentials: "include", body: JSON.stringify({ name: t }) }); - if (n.status === 400) { - const s = await n.json().catch(() => ({})); - throw new Error((s == null ? void 0 : s.error) ?? i()); - } else if (n.status !== 200) throw new f(i(), n.status); - } - async changeAllianceLeader(e, t) { - const n = await this.request(`/admin/alliances/${e}/leader`, { method: "POST", credentials: "include", body: JSON.stringify({ newLeaderUserId: t }) }); - if (n.status === 400) { - const s = await n.json(); - throw (s == null ? void 0 : s.error) === "user_not_in_alliance" ? new Error(qn()) : new Error(i()); - } else if (n.status !== 200) throw new f(i(), n.status); - } - async banAllAllianceMembers(e, t, n) { - const s = await this.request(`/admin/alliances/${e}/ban-all`, { method: "POST", credentials: "include", body: JSON.stringify({ reason: t, notes: n }) }); - if (s.status !== 200) throw new f(i(), s.status); - } - async setAllianceMemberRole(e, t, n) { - const s = await this.request(`/admin/alliances/${e}/members/${t}/role`, { method: "POST", credentials: "include", body: JSON.stringify({ role: n }) }); - if (s.status !== 200) throw new f(i(), s.status); - } - async removeAllianceMember(e, t) { - const n = await this.request(`/admin/alliances/${e}/members/${t}/remove`, { method: "POST", credentials: "include" }); - if (n.status !== 200) throw new f(i(), n.status); - } - async giveAllianceAdmin(e) { - const t = await this.request("/alliance/give-admin", { body: JSON.stringify({ promotedUserId: e }), method: "POST", credentials: "include" }); - if (t.status !== 200) throw t.status === 403 ? new Error(E()) : new Error(i()); - } - async banAllianceUser(e) { - const t = await this.request("/alliance/ban", { body: JSON.stringify({ bannedUserId: e }), method: "POST", credentials: "include" }); - if (t.status !== 200) throw t.status === 403 ? new Error(E()) : new Error(i()); - } - async equipFlag(e) { - if ((await this.request(`/flag/equip/${e}`, { method: "POST", credentials: "include" })).status !== 200) throw new Error(i()); - } - async getMyProfilePictures() { - const e = await this.request("/me/profile-pictures", { credentials: "include" }); - if (e.status !== 200) throw new Error(i()); - return e.json(); - } - async changeProfilePicture(e) { - if ((await this.request("/me/profile-picture/change", { method: "POST", credentials: "include", body: JSON.stringify({ pictureId: e }) })).status !== 200) throw new Error(i()); - } - async unbanAllianceUser(e) { - const t = await this.request("/alliance/unban", { body: JSON.stringify({ unbannedUserId: e }), method: "POST", credentials: "include" }); - if (t.status !== 200) throw t.status === 403 ? new Error(E()) : new Error(i()); - } - async health() { - return (await this.request("/health")).json(); - } - async generatePixQrCode(e) { - const t = await this.request(`/payment/abacatepay/create/pix/${e}`, { method: "POST", credentials: "include" }); - if (t.status === 400) { - const s = await t.json(); - throw new Error(s == null ? void 0 : s.error); - } else { - if (t.status === 451) throw new Error(Tn()); - if (t.status !== 200) throw new Error(i()); - } - return await t.json(); - } - async refreshPixPayment(e) { - const t = await this.request(`/payment/abacatepay/refresh/pix/${e}`, { method: "POST", credentials: "include" }); - if (t.status === 400) { - const n = await t.json(); - throw new Error(n == null ? void 0 : n.error); - } else if (t.status !== 200) throw new Error("Unexpected error on the server. Try again later"); - return t.json(); - } - async getPixStatus(e) { - const t = await this.request(`/payment/abacatepay/status/pix/${e}`, { method: "GET", credentials: "include" }); - if (t.status !== 200) throw new Error("Erro inesperado. Tente atualizar a página."); - return t.json(); - } - async getModeratorTickets() { - const e = await this.request("/moderator/tickets", { method: "GET", credentials: "include" }); - if (e.status !== 200) throw new f(i(), e.status); - const t = await e.json(); - for (const n of t.tickets) n.reports.sort((s, r) => le[s.reason] - le[r.reason]); - return t; - } - async countMyTicketsClosedToday() { - const e = await this.request("/moderator/count-my-tickets", { method: "GET", credentials: "include" }); - if (e.status !== 200) throw new f(i(), e.status); - return e.json(); - } - async getNonPaidUserOpenTicketsCount() { - const e = await this.request("/moderator/open-tickets-count", { method: "GET", credentials: "include" }); - if (e.status !== 200) throw new f(i(), e.status); - const { tickets: t } = await e.json(); - return t; - } - async assignNewTickets() { - const e = await this.request("/moderator/assign-new-tickets", { method: "POST", credentials: "include" }); - if (e.status !== 200) throw new f(i(), e.status); - return e.json(); - } - async setTicketStatus(e, t, n, s) { - const r = await this.request("/moderator/set-ticket-status", { method: "POST", credentials: "include", body: JSON.stringify({ ticketId: e, status: t, selectedReportId: n, assignedReason: s }) }); - if (r.status !== 200) throw new f(i(), r.status); - } - async request(e, t) { - let n; - const s = me(); - if (s) { - const r = new Headers(t == null ? void 0 : t.headers); - r.set("x-alien-override", s.token), (t = { ...(t ?? {}), headers: r }); - } - try { - (n = await fetch(`${this.url}${e}`, t)), (this.online = !0); - } catch (r) { - throw (console.error("Fetch error:", r), (this.online = !1), new Error(Ut(), { cause: r })); - } - if (n.status === 429) throw new Error(ce()); - if (n.status === 503 || n.status === 408) throw new Error(ce()); - return n; - } - async getOpenTicketsSummary() { - const e = await this.request("/admin/count-all-tickets", { method: "GET", credentials: "include" }); - if (e.status !== 200) throw new f(i(), e.status); - return e.json(); - } - async getOpenReportsSummary() { - const e = await this.request("/admin/count-all-reports", { method: "GET", credentials: "include" }); - if (e.status !== 200) throw new f(i(), e.status); - return e.json(); - } - async getClosedTicketsByMod(e, t) { - const n = await this.request(`/admin/closed-tickets?start=${encodeURIComponent(e)}&end=${encodeURIComponent(t)}`, { method: "GET", credentials: "include" }); - if (n.status !== 200) throw new f(i(), n.status); - return (await n.json()).items.map((r) => ({ ...r, suspensionRate: (r.ban + r.timeout) / r.total })); - } - async getClosedReportsByMod(e, t) { - const n = await this.request(`/admin/closed-reports?start=${encodeURIComponent(e)}&end=${encodeURIComponent(t)}`, { method: "GET", credentials: "include" }); - if (n.status !== 200) throw new f(i(), n.status); - return (await n.json()).items.map((r) => ({ ...r, suspensionRate: (r.ban + r.timeout) / r.total })); - } - async getUserInfoById(e) { - const t = await this.request(`/moderator/user-info/${encodeURIComponent(e)}`, { method: "GET", credentials: "include" }); - if (t.status !== 404) { - if (t.status !== 200) throw new f(i(), t.status); - return t.json(); - } - } - async getMultipleUsersInfoById(e) { - const t = await this.request(`/moderator/users?ids=${encodeURIComponent(e.join(","))}`, { method: "GET", credentials: "include" }); - if (t.status !== 200) throw new f(i(), t.status); - return t.json(); - } - async getUserInfoFull(e) { - const t = await this.request(`/admin/users?id=${encodeURIComponent(e)}`, { method: "GET", credentials: "include" }); - if (t.status !== 404) { - if (t.status !== 200) throw new f(i(), t.status); - return t.json(); - } - } - async removeTimeout(e) { - const t = await this.request("/admin/remove-timeout", { method: "POST", credentials: "include", body: JSON.stringify({ userId: e }) }); - if (t.status !== 200) throw new f(i(), t.status); - } - async removeBan(e) { - const t = await this.request("/admin/remove-ban", { method: "POST", credentials: "include", body: JSON.stringify({ userId: e }) }); - if (t.status !== 200) throw new f(i(), t.status); - } - async getUserNotes(e) { - const t = await this.request(`/admin/users/notes?userId=${encodeURIComponent(e)}`, { method: "GET", credentials: "include" }); - if (t.status !== 200) throw new f(i(), t.status); - return t.json(); - } - async addUserNote(e, t) { - const n = await this.request("/admin/users/notes", { method: "POST", credentials: "include", body: JSON.stringify({ userId: e, note: t }) }); - if (n.status !== 200) throw new f(i(), n.status); - } - async getUserPurchases(e) { - const t = await this.request(`/admin/users/purchases?userId=${encodeURIComponent(e)}`, { method: "GET", credentials: "include" }); - if (t.status !== 200) throw new f(i(), t.status); - const n = await t.json(); - return (Array.isArray(n == null ? void 0 : n.purchases) ? n.purchases : []).map((r) => ({ - id: String(r.id ?? ""), - product_name: String(r.productName ?? r.product_name ?? ""), - price: Number(r.price ?? 0), - amount: Number(r.amount ?? 0), - createdAt: typeof r.createdAt == "string" ? r.createdAt : r.CreatedAt ? new Date(r.CreatedAt).toISOString() : "", - })); - } - async postSetUserDroplets(e, t) { - const n = await this.request("/admin/users/set-user-droplets", { method: "POST", credentials: "include", body: JSON.stringify({ userId: e, droplets: t }) }); - if (n.status !== 200) throw new f(i(), n.status); - } - async getUserTickets(e) { - const { userId: t, kind: n, page: s = 0, pageSize: r = 20 } = e, - l = new URLSearchParams({ userId: String(t), kind: n, page: String(s), pageSize: String(r) }), - o = await this.request(`/moderator/users/tickets?${l.toString()}`, { method: "GET", credentials: "include" }); - if (o.status !== 200) throw new f(i(), o.status); - const d = await o.json(), - c = Array.isArray(d == null ? void 0 : d.tickets) ? d.tickets : []; - return c.sort((S, b) => new Date(b.createdAt).getTime() - new Date(S.createdAt).getTime()), c; - } - mapTicketsToReportRows(e, t) { - var s, r, l, o, d; - const n = []; - for (const c of e) { - const S = c.status ?? "open"; - if (t === "received") { - for (const b of c.reports) - n.push({ - id: String(b.id), - ticketId: String(c.id), - createdAt: b.createdAt ?? c.createdAt, - byUser: { id: Number(b.reportedBy), name: String(b.reportedByName ?? b.reportedBy), picture: b.reportedByPicture ?? null }, - reason: String(b.reason), - status: S, - }); - continue; - } - if (t === "sent") { - for (const b of c.reports) - n.push({ - id: String(b.id), - ticketId: String(c.id), - createdAt: b.createdAt ?? c.createdAt, - toUser: { id: Number(c.reportedUser.id), name: String(c.reportedUser.name), picture: c.reportedUser.picture ?? null }, - reason: String(b.reason), - status: S, - }); - continue; - } - n.push({ - id: String(c.id), - ticketId: String(c.id), - createdAt: c.createdAt, - handledBy: - c.status && c.status !== "open" - ? { id: ((s = c.handledBy) == null ? void 0 : s.id) ?? 0, name: ((r = c.handledBy) == null ? void 0 : r.name) ?? "Moderator", picture: ((l = c.handledBy) == null ? void 0 : l.picture) ?? null } - : { id: 0, name: "—", picture: null }, - reason: String(((d = (o = c.reports) == null ? void 0 : o[0]) == null ? void 0 : d.reason) ?? "other"), - status: S, - }); - } - return n.sort((c, S) => new Date(S.createdAt).getTime() - new Date(c.createdAt).getTime()), n; - } - async getModeratorClosedTicketStats(e) { - const t = new URLSearchParams({ id: String(e) }).toString(), - n = await this.request(`/admin/users/tickets?${t}`, { method: "GET", credentials: "include" }); - if (n.status !== 200) throw new f(i(), n.status); - return n.json(); - } - async postPawtectLoad() { - const e = await this.request("/pawtect/load", { method: "POST", credentials: "include", body: JSON.stringify({ pawtectMe: Ne(), "paint-the": "world", "but-not": "using-bots", security: "/.well-known/security.txt" }) }); - if (e.status !== 204) throw new f(i(), e.status); - } - async unlinkDiscord() { - const e = await this.request("/discord/unlink", { method: "POST", credentials: "include" }); - if (e.status !== 204) throw new f(i(), e.status); - } -} -V = new WeakMap(); -let de = new ta(ue); -export { - pa as A, - wa as B, - pe as C, - ba as D, - oa as E, - ca as F, - ue as P, - Xn as S, - Re as _, - de as a, - _a as b, - i as c, - Me as d, - ia as e, - un as f, - Le as g, - rn as h, - Qt as i, - tn as j, - cn as k, - T as l, - la as m, - da as n, - ea as o, - fa as p, - ga as q, - ma as r, - ha as s, - ge as t, - X as u, - ya as v, - Sa as w, - ua as x, - An as y, - In as z, -}; diff --git a/frontend-backup/_app/immutable/chunks/DhR_xAc4.js b/frontend-backup/_app/immutable/chunks/DhR_xAc4.js deleted file mode 100644 index f8be341..0000000 --- a/frontend-backup/_app/immutable/chunks/DhR_xAc4.js +++ /dev/null @@ -1 +0,0 @@ -import{g as t}from"./DklPLC_x.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="78305447-0aa0-4fe7-b9f4-39f491404710",e._sentryDebugIdIdentifier="sentry-dbid-78305447-0aa0-4fe7-b9f4-39f491404710")})()}catch{}const l=()=>"Save",o=()=>"Salvar",y=(e={},n={})=>(n.locale??t())==="en"?l():o(),s=()=>"Members",a=()=>"Membros",_=(e={},n={})=>(n.locale??t())==="en"?s():a(),i=()=>"Player",c=()=>"Jogador",g=(e={},n={})=>(n.locale??t())==="en"?i():c(),u=()=>"Last pixel",f=()=>"Último pixel",m=(e={},n={})=>(n.locale??t())==="en"?u():f(),d=()=>"Visit",p=()=>"Visitar",v=(e={},n={})=>(n.locale??t())==="en"?d():p();export{m as l,_ as m,g as p,y as s,v}; diff --git a/frontend-backup/_app/immutable/chunks/DkBFL3pa.js b/frontend-backup/_app/immutable/chunks/DkBFL3pa.js deleted file mode 100644 index 8f5bdad..0000000 --- a/frontend-backup/_app/immutable/chunks/DkBFL3pa.js +++ /dev/null @@ -1,32 +0,0 @@ -import { - g as s -} from "./C5GsJ62f.js"; -import "./Bzak7iHL.js"; -import { - q as a, - b as n -} from "./DUoKDNpf.js"; -import { - a as p -} from "./B1GmkH4o.js"; -import { - r as f -} from "./5NasrULQ.js"; -const l = () => "Refresh", - c = () => "刷新", - u = (t = {}, r = {}) => (r.locale ?? s()) === "en" ? l() : c(); -var i = a(''); - -function $(t, r) { - let e = f(r, ["$$slots", "$$events", "$$legacy"]); - var o = i(); - p(o, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ...e - })), n(t, o) -} -export { - $ as R, u as r -}; \ No newline at end of file diff --git a/frontend-backup/_app/immutable/chunks/DklPLC_x.js b/frontend-backup/_app/immutable/chunks/DklPLC_x.js deleted file mode 100644 index 400f2ea..0000000 --- a/frontend-backup/_app/immutable/chunks/DklPLC_x.js +++ /dev/null @@ -1,86 +0,0 @@ -(function () { - try { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - e.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - o = new e.Error().stack; - o && ((e._sentryDebugIds = e._sentryDebugIds || {}), (e._sentryDebugIds[o] = "138d49da-a363-498b-a700-aea1b9f4af0d"), (e._sentryDebugIdIdentifier = "sentry-dbid-138d49da-a363-498b-a700-aea1b9f4af0d")); - })(); -} catch {} -const y = "en", - c = ["en", "pt"], - d = "PARAGLIDE_LOCALE", - g = ["localStorage", "preferredLanguage", "baseLocale"]; -globalThis.__paraglide = {}; -let f = !1, - w = () => { - let e; - for (const o of g) { - if (o === "baseLocale") e = y; - else if (o === "preferredLanguage") e = L(); - else if (o === "localStorage") e = localStorage.getItem(d) ?? void 0; - else if (u(o) && l.has(o)) { - const a = l.get(o); - if (a) { - const t = a.getLocale(); - if (t instanceof Promise) continue; - e = t; - } - } - if (e !== void 0) { - const a = h(e); - return f || ((f = !0), p(a, { reload: !1 })), a; - } - } - throw new Error("No locale found. Read the docs https://inlang.com/m/gerre34r/library-inlang-paraglideJs/errors#no-locale-found"); - }, - p = (e, o) => { - const a = { reload: !0, ...o }; - let t; - try { - t = w(); - } catch {} - for (const n of g) - if (n !== "baseLocale") { - if (n === "localStorage" && typeof window < "u") localStorage.setItem(d, e); - else if (u(n) && l.has(n)) { - const s = l.get(n); - if (s) { - const i = s.setLocale(e); - i instanceof Promise && - i.catch((b) => { - console.warn(`Custom strategy "${n}" setLocale failed:`, b); - }); - } - } - } - a.reload && window.location && e !== t && window.location.reload(); - }; -function r(e) { - return e ? c.includes(e) : !1; -} -function h(e) { - if (r(e) === !1) throw new Error(`Invalid locale: ${e}. Expected one of: ${c.join(", ")}`); - return e; -} -function L() { - var o; - if (!((o = navigator == null ? void 0 : navigator.languages) != null && o.length)) return; - const e = navigator.languages.map((a) => { - var t; - return { fullTag: a.toLowerCase(), baseTag: (t = a.split("-")[0]) == null ? void 0 : t.toLowerCase() }; - }); - for (const a of e) { - if (r(a.fullTag)) return a.fullTag; - if (r(a.baseTag)) return a.baseTag; - } -} -const l = new Map(); -function u(e) { - return typeof e == "string" && /^custom-[A-Za-z0-9_-]+$/.test(e); -} -export { w as g, d as l }; diff --git a/frontend-backup/_app/immutable/chunks/Dmqg20ho.js b/frontend-backup/_app/immutable/chunks/Dmqg20ho.js new file mode 100644 index 0000000..fa9bcf2 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/Dmqg20ho.js @@ -0,0 +1,2130 @@ +(function () { + try { + var t = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + t.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var t = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + e = new t.Error().stack; + e && + ((t._sentryDebugIds = t._sentryDebugIds || {}), + (t._sentryDebugIds[e] = "94f605bd-8e96-4f8e-8769-0ddf701a4cfb"), + (t._sentryDebugIdIdentifier = + "sentry-dbid-94f605bd-8e96-4f8e-8769-0ddf701a4cfb")); + })(); +} catch {} +const S = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, + g = globalThis, + O = "10.11.0"; +function D() { + return et(g), g; +} +function et(t) { + const e = (t.__SENTRY__ = t.__SENTRY__ || {}); + return (e.version = e.version || O), (e[O] = e[O] || {}); +} +function j(t, e, n = g) { + const r = (n.__SENTRY__ = n.__SENTRY__ || {}), + s = (r[O] = r[O] || {}); + return s[t] || (s[t] = e()); +} +const wn = ["debug", "info", "warn", "error", "log", "assert", "trace"], + Jt = "Sentry Logger ", + dt = {}; +function nt(t) { + if (!("console" in g)) return t(); + const e = g.console, + n = {}, + r = Object.keys(dt); + r.forEach((s) => { + const i = dt[s]; + (n[s] = e[s]), (e[s] = i); + }); + try { + return t(); + } finally { + r.forEach((s) => { + e[s] = n[s]; + }); + } +} +function qt() { + st().enabled = !0; +} +function Qt() { + st().enabled = !1; +} +function Rt() { + return st().enabled; +} +function Zt(...t) { + rt("log", ...t); +} +function te(...t) { + rt("warn", ...t); +} +function ee(...t) { + rt("error", ...t); +} +function rt(t, ...e) { + S && + Rt() && + nt(() => { + g.console[t](`${Jt}[${t}]:`, ...e); + }); +} +function st() { + return S ? j("loggerSettings", () => ({ enabled: !1 })) : { enabled: !1 }; +} +const h = { + enable: qt, + disable: Qt, + isEnabled: Rt, + log: Zt, + warn: te, + error: ee, + }, + Ot = 50, + ne = "?", + pt = /\(error: (.*)\)/, + lt = /captureMessage|captureException/; +function re(...t) { + const e = t.sort((n, r) => n[0] - r[0]).map((n) => n[1]); + return (n, r = 0, s = 0) => { + const i = [], + o = n.split(` +`); + for (let c = r; c < o.length; c++) { + let a = o[c]; + a.length > 1024 && (a = a.slice(0, 1024)); + const u = pt.test(a) ? a.replace(pt, "$1") : a; + if (!u.match(/\S*Error: /)) { + for (const f of e) { + const d = f(u); + if (d) { + i.push(d); + break; + } + } + if (i.length >= Ot + s) break; + } + } + return se(i.slice(s)); + }; +} +function Pn(t) { + return Array.isArray(t) ? re(...t) : t; +} +function se(t) { + if (!t.length) return []; + const e = Array.from(t); + return ( + /sentryWrapped/.test(w(e).function || "") && e.pop(), + e.reverse(), + lt.test(w(e).function || "") && + (e.pop(), lt.test(w(e).function || "") && e.pop()), + e + .slice(0, Ot) + .map((n) => ({ + ...n, + filename: n.filename || w(e).filename, + function: n.function || ne, + })) + ); +} +function w(t) { + return t[t.length - 1] || {}; +} +const K = ""; +function ie(t) { + try { + return !t || typeof t != "function" ? K : t.name || K; + } catch { + return K; + } +} +function kn(t) { + const e = t.exception; + if (e) { + const n = []; + try { + return ( + e.values.forEach((r) => { + r.stacktrace.frames && n.push(...r.stacktrace.frames); + }), + n + ); + } catch { + return; + } + } +} +const Dt = Object.prototype.toString; +function oe(t) { + switch (Dt.call(t)) { + case "[object Error]": + case "[object Exception]": + case "[object DOMException]": + case "[object WebAssembly.Exception]": + return !0; + default: + return M(t, Error); + } +} +function x(t, e) { + return Dt.call(t) === `[object ${e}]`; +} +function Ln(t) { + return x(t, "ErrorEvent"); +} +function Fn(t) { + return x(t, "DOMError"); +} +function $n(t) { + return x(t, "DOMException"); +} +function F(t) { + return x(t, "String"); +} +function ae(t) { + return ( + typeof t == "object" && + t !== null && + "__sentry_template_string__" in t && + "__sentry_template_values__" in t + ); +} +function Un(t) { + return ( + t === null || ae(t) || (typeof t != "object" && typeof t != "function") + ); +} +function Mt(t) { + return x(t, "Object"); +} +function ce(t) { + return typeof Event < "u" && M(t, Event); +} +function ue(t) { + return typeof Element < "u" && M(t, Element); +} +function fe(t) { + return x(t, "RegExp"); +} +function it(t) { + return !!(t != null && t.then && typeof t.then == "function"); +} +function de(t) { + return ( + Mt(t) && + "nativeEvent" in t && + "preventDefault" in t && + "stopPropagation" in t + ); +} +function M(t, e) { + try { + return t instanceof e; + } catch { + return !1; + } +} +function wt(t) { + return !!(typeof t == "object" && t !== null && (t.__isVue || t._isVue)); +} +function jn(t) { + return typeof Request < "u" && M(t, Request); +} +const ot = g, + pe = 80; +function le(t, e = {}) { + if (!t) return ""; + try { + let n = t; + const r = 5, + s = []; + let i = 0, + o = 0; + const c = " > ", + a = c.length; + let u; + const f = Array.isArray(e) ? e : e.keyAttrs, + d = (!Array.isArray(e) && e.maxStringLength) || pe; + for ( + ; + n && + i++ < r && + ((u = _e(n, f)), + !(u === "html" || (i > 1 && o + s.length * a + u.length >= d))); + + ) + s.push(u), (o += u.length), (n = n.parentNode); + return s.reverse().join(c); + } catch { + return ""; + } +} +function _e(t, e) { + const n = t, + r = []; + if (!(n != null && n.tagName)) return ""; + if (ot.HTMLElement && n instanceof HTMLElement && n.dataset) { + if (n.dataset.sentryComponent) return n.dataset.sentryComponent; + if (n.dataset.sentryElement) return n.dataset.sentryElement; + } + r.push(n.tagName.toLowerCase()); + const s = + e != null && e.length + ? e.filter((o) => n.getAttribute(o)).map((o) => [o, n.getAttribute(o)]) + : null; + if (s != null && s.length) + s.forEach((o) => { + r.push(`[${o[0]}="${o[1]}"]`); + }); + else { + n.id && r.push(`#${n.id}`); + const o = n.className; + if (o && F(o)) { + const c = o.split(/\s+/); + for (const a of c) r.push(`.${a}`); + } + } + const i = ["aria-label", "type", "name", "title", "alt"]; + for (const o of i) { + const c = n.getAttribute(o); + c && r.push(`[${o}="${c}"]`); + } + return r.join(""); +} +function vn() { + try { + return ot.document.location.href; + } catch { + return ""; + } +} +function Bn(t) { + if (!ot.HTMLElement) return null; + let e = t; + const n = 5; + for (let r = 0; r < n; r++) { + if (!e) return null; + if (e instanceof HTMLElement) { + if (e.dataset.sentryComponent) return e.dataset.sentryComponent; + if (e.dataset.sentryElement) return e.dataset.sentryElement; + } + e = e.parentNode; + } + return null; +} +function $(t, e = 0) { + return typeof t != "string" || e === 0 || t.length <= e + ? t + : `${t.slice(0, e)}...`; +} +function Gn(t, e) { + if (!Array.isArray(t)) return ""; + const n = []; + for (let r = 0; r < t.length; r++) { + const s = t[r]; + try { + wt(s) ? n.push("[VueViewModel]") : n.push(String(s)); + } catch { + n.push("[value cannot be serialized]"); + } + } + return n.join(e); +} +function ge(t, e, n = !1) { + return F(t) + ? fe(e) + ? e.test(t) + : F(e) + ? n + ? t === e + : t.includes(e) + : !1 + : !1; +} +function zn(t, e = [], n = !1) { + return e.some((r) => ge(t, r, n)); +} +function Hn(t, e, n) { + if (!(e in t)) return; + const r = t[e]; + if (typeof r != "function") return; + const s = n(r); + typeof s == "function" && he(s, r); + try { + t[e] = s; + } catch { + S && h.log(`Failed to replace method "${e}" in object`, t); + } +} +function I(t, e, n) { + try { + Object.defineProperty(t, e, { value: n, writable: !0, configurable: !0 }); + } catch { + S && h.log(`Failed to add non-enumerable property "${e}" to object`, t); + } +} +function he(t, e) { + try { + const n = e.prototype || {}; + (t.prototype = e.prototype = n), I(t, "__sentry_original__", e); + } catch {} +} +function Yn(t) { + return t.__sentry_original__; +} +function Pt(t) { + if (oe(t)) + return { message: t.message, name: t.name, stack: t.stack, ...gt(t) }; + if (ce(t)) { + const e = { + type: t.type, + target: _t(t.target), + currentTarget: _t(t.currentTarget), + ...gt(t), + }; + return ( + typeof CustomEvent < "u" && M(t, CustomEvent) && (e.detail = t.detail), e + ); + } else return t; +} +function _t(t) { + try { + return ue(t) ? le(t) : Object.prototype.toString.call(t); + } catch { + return ""; + } +} +function gt(t) { + if (typeof t == "object" && t !== null) { + const e = {}; + for (const n in t) + Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]); + return e; + } else return {}; +} +function Vn(t, e = 40) { + const n = Object.keys(Pt(t)); + n.sort(); + const r = n[0]; + if (!r) return "[object has no keys]"; + if (r.length >= e) return $(r, e); + for (let s = n.length; s > 0; s--) { + const i = n.slice(0, s).join(", "); + if (!(i.length > e)) return s === n.length ? i : $(i, e); + } + return ""; +} +function me() { + const t = g; + return t.crypto || t.msCrypto; +} +function T(t = me()) { + let e = () => Math.random() * 16; + try { + if (t != null && t.randomUUID) return t.randomUUID().replace(/-/g, ""); + t != null && + t.getRandomValues && + (e = () => { + const n = new Uint8Array(1); + return t.getRandomValues(n), n[0]; + }); + } catch {} + return ("10000000100040008000" + 1e11).replace(/[018]/g, (n) => + (n ^ ((e() & 15) >> (n / 4))).toString(16) + ); +} +function kt(t) { + var e, n; + return (n = (e = t.exception) == null ? void 0 : e.values) == null + ? void 0 + : n[0]; +} +function Kn(t) { + const { message: e, event_id: n } = t; + if (e) return e; + const r = kt(t); + return r + ? r.type && r.value + ? `${r.type}: ${r.value}` + : r.type || r.value || n || "" + : n || ""; +} +function Wn(t, e, n) { + const r = (t.exception = t.exception || {}), + s = (r.values = r.values || []), + i = (s[0] = s[0] || {}); + i.value || (i.value = e || ""), i.type || (i.type = "Error"); +} +function Se(t, e) { + const n = kt(t); + if (!n) return; + const r = { type: "generic", handled: !0 }, + s = n.mechanism; + if (((n.mechanism = { ...r, ...s, ...e }), e && "data" in e)) { + const i = { ...(s == null ? void 0 : s.data), ...e.data }; + n.mechanism.data = i; + } +} +function Xn(t) { + if (ye(t)) return !0; + try { + I(t, "__sentry_captured__", !0); + } catch {} + return !1; +} +function ye(t) { + try { + return t.__sentry_captured__; + } catch {} +} +const Lt = 1e3; +function at() { + return Date.now() / Lt; +} +function Ee() { + const { performance: t } = g; + if (!(t != null && t.now) || !t.timeOrigin) return at; + const e = t.timeOrigin; + return () => (e + t.now()) / Lt; +} +let ht; +function ct() { + return (ht ?? (ht = Ee()))(); +} +let W; +function be() { + var f; + const { performance: t } = g; + if (!(t != null && t.now)) return [void 0, "none"]; + const e = 3600 * 1e3, + n = t.now(), + r = Date.now(), + s = t.timeOrigin ? Math.abs(t.timeOrigin + n - r) : e, + i = s < e, + o = (f = t.timing) == null ? void 0 : f.navigationStart, + a = typeof o == "number" ? Math.abs(o + n - r) : e, + u = a < e; + return i || u + ? s <= a + ? [t.timeOrigin, "timeOrigin"] + : [o, "navigationStart"] + : [r, "dateNow"]; +} +function Jn() { + return W || (W = be()), W[0]; +} +function Te(t) { + const e = ct(), + n = { + sid: T(), + init: !0, + timestamp: e, + started: e, + duration: 0, + status: "ok", + errors: 0, + ignoreDuration: !1, + toJSON: () => Ae(n), + }; + return t && v(n, t), n; +} +function v(t, e = {}) { + if ( + (e.user && + (!t.ipAddress && e.user.ip_address && (t.ipAddress = e.user.ip_address), + !t.did && + !e.did && + (t.did = e.user.id || e.user.email || e.user.username)), + (t.timestamp = e.timestamp || ct()), + e.abnormal_mechanism && (t.abnormal_mechanism = e.abnormal_mechanism), + e.ignoreDuration && (t.ignoreDuration = e.ignoreDuration), + e.sid && (t.sid = e.sid.length === 32 ? e.sid : T()), + e.init !== void 0 && (t.init = e.init), + !t.did && e.did && (t.did = `${e.did}`), + typeof e.started == "number" && (t.started = e.started), + t.ignoreDuration) + ) + t.duration = void 0; + else if (typeof e.duration == "number") t.duration = e.duration; + else { + const n = t.timestamp - t.started; + t.duration = n >= 0 ? n : 0; + } + e.release && (t.release = e.release), + e.environment && (t.environment = e.environment), + !t.ipAddress && e.ipAddress && (t.ipAddress = e.ipAddress), + !t.userAgent && e.userAgent && (t.userAgent = e.userAgent), + typeof e.errors == "number" && (t.errors = e.errors), + e.status && (t.status = e.status); +} +function Ie(t, e) { + let n = {}; + t.status === "ok" && (n = { status: "exited" }), v(t, n); +} +function Ae(t) { + return { + sid: `${t.sid}`, + init: t.init, + started: new Date(t.started * 1e3).toISOString(), + timestamp: new Date(t.timestamp * 1e3).toISOString(), + status: t.status, + errors: t.errors, + did: + typeof t.did == "number" || typeof t.did == "string" + ? `${t.did}` + : void 0, + duration: t.duration, + abnormal_mechanism: t.abnormal_mechanism, + attrs: { + release: t.release, + environment: t.environment, + ip_address: t.ipAddress, + user_agent: t.userAgent, + }, + }; +} +function B(t, e, n = 2) { + if (!e || typeof e != "object" || n <= 0) return e; + if (t && Object.keys(e).length === 0) return t; + const r = { ...t }; + for (const s in e) + Object.prototype.hasOwnProperty.call(e, s) && (r[s] = B(r[s], e[s], n - 1)); + return r; +} +function U() { + return T(); +} +function ut() { + return T().substring(16); +} +const J = "_sentrySpan"; +function mt(t, e) { + e ? I(t, J, e) : delete t[J]; +} +function q(t) { + return t[J]; +} +const Ce = 100; +class y { + constructor() { + (this._notifyingListeners = !1), + (this._scopeListeners = []), + (this._eventProcessors = []), + (this._breadcrumbs = []), + (this._attachments = []), + (this._user = {}), + (this._tags = {}), + (this._extra = {}), + (this._contexts = {}), + (this._sdkProcessingMetadata = {}), + (this._propagationContext = { traceId: U(), sampleRand: Math.random() }); + } + clone() { + const e = new y(); + return ( + (e._breadcrumbs = [...this._breadcrumbs]), + (e._tags = { ...this._tags }), + (e._extra = { ...this._extra }), + (e._contexts = { ...this._contexts }), + this._contexts.flags && + (e._contexts.flags = { values: [...this._contexts.flags.values] }), + (e._user = this._user), + (e._level = this._level), + (e._session = this._session), + (e._transactionName = this._transactionName), + (e._fingerprint = this._fingerprint), + (e._eventProcessors = [...this._eventProcessors]), + (e._attachments = [...this._attachments]), + (e._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }), + (e._propagationContext = { ...this._propagationContext }), + (e._client = this._client), + (e._lastEventId = this._lastEventId), + mt(e, q(this)), + e + ); + } + setClient(e) { + this._client = e; + } + setLastEventId(e) { + this._lastEventId = e; + } + getClient() { + return this._client; + } + lastEventId() { + return this._lastEventId; + } + addScopeListener(e) { + this._scopeListeners.push(e); + } + addEventProcessor(e) { + return this._eventProcessors.push(e), this; + } + setUser(e) { + return ( + (this._user = e || { + email: void 0, + id: void 0, + ip_address: void 0, + username: void 0, + }), + this._session && v(this._session, { user: e }), + this._notifyScopeListeners(), + this + ); + } + getUser() { + return this._user; + } + setTags(e) { + return ( + (this._tags = { ...this._tags, ...e }), this._notifyScopeListeners(), this + ); + } + setTag(e, n) { + return ( + (this._tags = { ...this._tags, [e]: n }), + this._notifyScopeListeners(), + this + ); + } + setExtras(e) { + return ( + (this._extra = { ...this._extra, ...e }), + this._notifyScopeListeners(), + this + ); + } + setExtra(e, n) { + return ( + (this._extra = { ...this._extra, [e]: n }), + this._notifyScopeListeners(), + this + ); + } + setFingerprint(e) { + return (this._fingerprint = e), this._notifyScopeListeners(), this; + } + setLevel(e) { + return (this._level = e), this._notifyScopeListeners(), this; + } + setTransactionName(e) { + return (this._transactionName = e), this._notifyScopeListeners(), this; + } + setContext(e, n) { + return ( + n === null ? delete this._contexts[e] : (this._contexts[e] = n), + this._notifyScopeListeners(), + this + ); + } + setSession(e) { + return ( + e ? (this._session = e) : delete this._session, + this._notifyScopeListeners(), + this + ); + } + getSession() { + return this._session; + } + update(e) { + if (!e) return this; + const n = typeof e == "function" ? e(this) : e, + r = n instanceof y ? n.getScopeData() : Mt(n) ? e : void 0, + { + tags: s, + extra: i, + user: o, + contexts: c, + level: a, + fingerprint: u = [], + propagationContext: f, + } = r || {}; + return ( + (this._tags = { ...this._tags, ...s }), + (this._extra = { ...this._extra, ...i }), + (this._contexts = { ...this._contexts, ...c }), + o && Object.keys(o).length && (this._user = o), + a && (this._level = a), + u.length && (this._fingerprint = u), + f && (this._propagationContext = f), + this + ); + } + clear() { + return ( + (this._breadcrumbs = []), + (this._tags = {}), + (this._extra = {}), + (this._user = {}), + (this._contexts = {}), + (this._level = void 0), + (this._transactionName = void 0), + (this._fingerprint = void 0), + (this._session = void 0), + mt(this, void 0), + (this._attachments = []), + this.setPropagationContext({ traceId: U(), sampleRand: Math.random() }), + this._notifyScopeListeners(), + this + ); + } + addBreadcrumb(e, n) { + var i; + const r = typeof n == "number" ? n : Ce; + if (r <= 0) return this; + const s = { + timestamp: at(), + ...e, + message: e.message ? $(e.message, 2048) : e.message, + }; + return ( + this._breadcrumbs.push(s), + this._breadcrumbs.length > r && + ((this._breadcrumbs = this._breadcrumbs.slice(-r)), + (i = this._client) == null || + i.recordDroppedEvent("buffer_overflow", "log_item")), + this._notifyScopeListeners(), + this + ); + } + getLastBreadcrumb() { + return this._breadcrumbs[this._breadcrumbs.length - 1]; + } + clearBreadcrumbs() { + return (this._breadcrumbs = []), this._notifyScopeListeners(), this; + } + addAttachment(e) { + return this._attachments.push(e), this; + } + clearAttachments() { + return (this._attachments = []), this; + } + getScopeData() { + return { + breadcrumbs: this._breadcrumbs, + attachments: this._attachments, + contexts: this._contexts, + tags: this._tags, + extra: this._extra, + user: this._user, + level: this._level, + fingerprint: this._fingerprint || [], + eventProcessors: this._eventProcessors, + propagationContext: this._propagationContext, + sdkProcessingMetadata: this._sdkProcessingMetadata, + transactionName: this._transactionName, + span: q(this), + }; + } + setSDKProcessingMetadata(e) { + return ( + (this._sdkProcessingMetadata = B(this._sdkProcessingMetadata, e, 2)), this + ); + } + setPropagationContext(e) { + return (this._propagationContext = e), this; + } + getPropagationContext() { + return this._propagationContext; + } + captureException(e, n) { + const r = (n == null ? void 0 : n.event_id) || T(); + if (!this._client) + return ( + S && + h.warn("No client configured on scope - will not capture exception!"), + r + ); + const s = new Error("Sentry syntheticException"); + return ( + this._client.captureException( + e, + { originalException: e, syntheticException: s, ...n, event_id: r }, + this + ), + r + ); + } + captureMessage(e, n, r) { + const s = (r == null ? void 0 : r.event_id) || T(); + if (!this._client) + return ( + S && + h.warn("No client configured on scope - will not capture message!"), + s + ); + const i = new Error(e); + return ( + this._client.captureMessage( + e, + n, + { originalException: e, syntheticException: i, ...r, event_id: s }, + this + ), + s + ); + } + captureEvent(e, n) { + const r = (n == null ? void 0 : n.event_id) || T(); + return this._client + ? (this._client.captureEvent(e, { ...n, event_id: r }, this), r) + : (S && h.warn("No client configured on scope - will not capture event!"), + r); + } + _notifyScopeListeners() { + this._notifyingListeners || + ((this._notifyingListeners = !0), + this._scopeListeners.forEach((e) => { + e(this); + }), + (this._notifyingListeners = !1)); + } +} +function Ne() { + return j("defaultCurrentScope", () => new y()); +} +function xe() { + return j("defaultIsolationScope", () => new y()); +} +class Re { + constructor(e, n) { + let r; + e ? (r = e) : (r = new y()); + let s; + n ? (s = n) : (s = new y()), + (this._stack = [{ scope: r }]), + (this._isolationScope = s); + } + withScope(e) { + const n = this._pushScope(); + let r; + try { + r = e(n); + } catch (s) { + throw (this._popScope(), s); + } + return it(r) + ? r.then( + (s) => (this._popScope(), s), + (s) => { + throw (this._popScope(), s); + } + ) + : (this._popScope(), r); + } + getClient() { + return this.getStackTop().client; + } + getScope() { + return this.getStackTop().scope; + } + getIsolationScope() { + return this._isolationScope; + } + getStackTop() { + return this._stack[this._stack.length - 1]; + } + _pushScope() { + const e = this.getScope().clone(); + return this._stack.push({ client: this.getClient(), scope: e }), e; + } + _popScope() { + return this._stack.length <= 1 ? !1 : !!this._stack.pop(); + } +} +function C() { + const t = D(), + e = et(t); + return (e.stack = e.stack || new Re(Ne(), xe())); +} +function Oe(t) { + return C().withScope(t); +} +function De(t, e) { + const n = C(); + return n.withScope(() => ((n.getStackTop().scope = t), e(t))); +} +function St(t) { + return C().withScope(() => t(C().getIsolationScope())); +} +function Me() { + return { + withIsolationScope: St, + withScope: Oe, + withSetScope: De, + withSetIsolationScope: (t, e) => St(e), + getCurrentScope: () => C().getScope(), + getIsolationScope: () => C().getIsolationScope(), + }; +} +function G(t) { + const e = et(t); + return e.acs ? e.acs : Me(); +} +function R() { + const t = D(); + return G(t).getCurrentScope(); +} +function z() { + const t = D(); + return G(t).getIsolationScope(); +} +function we() { + return j("globalScope", () => new y()); +} +function qn(...t) { + const e = D(), + n = G(e); + if (t.length === 2) { + const [r, s] = t; + return r ? n.withSetScope(r, s) : n.withScope(s); + } + return n.withScope(t[0]); +} +function H() { + return R().getClient(); +} +function Qn(t) { + const e = t.getPropagationContext(), + { traceId: n, parentSpanId: r, propagationSpanId: s } = e, + i = { trace_id: n, span_id: s || ut() }; + return r && (i.parent_span_id = r), i; +} +const Pe = "sentry.source", + ke = "sentry.sample_rate", + Le = "sentry.previous_trace_sample_rate", + Fe = "sentry.op", + $e = "sentry.origin", + Zn = "sentry.idle_span_finish_reason", + tr = "sentry.measurement_unit", + er = "sentry.measurement_value", + nr = "sentry.custom_span_name", + rr = "sentry.profile_id", + sr = "sentry.exclusive_time", + ir = "sentry.link.type", + Ue = 0, + Ft = 1, + _ = 2; +function je(t) { + if (t < 400 && t >= 100) return { code: Ft }; + if (t >= 400 && t < 500) + switch (t) { + case 401: + return { code: _, message: "unauthenticated" }; + case 403: + return { code: _, message: "permission_denied" }; + case 404: + return { code: _, message: "not_found" }; + case 409: + return { code: _, message: "already_exists" }; + case 413: + return { code: _, message: "failed_precondition" }; + case 429: + return { code: _, message: "resource_exhausted" }; + case 499: + return { code: _, message: "cancelled" }; + default: + return { code: _, message: "invalid_argument" }; + } + if (t >= 500 && t < 600) + switch (t) { + case 501: + return { code: _, message: "unimplemented" }; + case 503: + return { code: _, message: "unavailable" }; + case 504: + return { code: _, message: "deadline_exceeded" }; + default: + return { code: _, message: "internal_error" }; + } + return { code: _, message: "unknown_error" }; +} +function or(t, e) { + t.setAttribute("http.response.status_code", e); + const n = je(e); + n.message !== "unknown_error" && t.setStatus(n); +} +const $t = "_sentryScope", + Ut = "_sentryIsolationScope"; +function ar(t, e, n) { + t && (I(t, Ut, n), I(t, $t, e)); +} +function jt(t) { + return { scope: t[$t], isolationScope: t[Ut] }; +} +const vt = "sentry-", + ve = /^sentry-/, + Be = 8192; +function Bt(t) { + const e = Ge(t); + if (!e) return; + const n = Object.entries(e).reduce((r, [s, i]) => { + if (s.match(ve)) { + const o = s.slice(vt.length); + r[o] = i; + } + return r; + }, {}); + if (Object.keys(n).length > 0) return n; +} +function cr(t) { + if (!t) return; + const e = Object.entries(t).reduce( + (n, [r, s]) => (s && (n[`${vt}${r}`] = s), n), + {} + ); + return ze(e); +} +function Ge(t) { + if (!(!t || (!F(t) && !Array.isArray(t)))) + return Array.isArray(t) + ? t.reduce((e, n) => { + const r = yt(n); + return ( + Object.entries(r).forEach(([s, i]) => { + e[s] = i; + }), + e + ); + }, {}) + : yt(t); +} +function yt(t) { + return t + .split(",") + .map((e) => + e.split("=").map((n) => { + try { + return decodeURIComponent(n.trim()); + } catch { + return; + } + }) + ) + .reduce((e, [n, r]) => (n && r && (e[n] = r), e), {}); +} +function ze(t) { + if (Object.keys(t).length !== 0) + return Object.entries(t).reduce((e, [n, r], s) => { + const i = `${encodeURIComponent(n)}=${encodeURIComponent(r)}`, + o = s === 0 ? i : `${e},${i}`; + return o.length > Be + ? (S && + h.warn( + `Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.` + ), + e) + : o; + }, ""); +} +const He = /^o(\d+)\./, + Ye = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/; +function Ve(t) { + return t === "http" || t === "https"; +} +function ur(t, e = !1) { + const { + host: n, + path: r, + pass: s, + port: i, + projectId: o, + protocol: c, + publicKey: a, + } = t; + return `${c}://${a}${e && s ? `:${s}` : ""}@${n}${i ? `:${i}` : ""}/${ + r && `${r}/` + }${o}`; +} +function Ke(t) { + const e = Ye.exec(t); + if (!e) { + nt(() => { + console.error(`Invalid Sentry Dsn: ${t}`); + }); + return; + } + const [n, r, s = "", i = "", o = "", c = ""] = e.slice(1); + let a = "", + u = c; + const f = u.split("/"); + if ((f.length > 1 && ((a = f.slice(0, -1).join("/")), (u = f.pop())), u)) { + const d = u.match(/^\d+/); + d && (u = d[0]); + } + return Gt({ + host: i, + pass: s, + path: a, + projectId: u, + port: o, + protocol: n, + publicKey: r, + }); +} +function Gt(t) { + return { + protocol: t.protocol, + publicKey: t.publicKey || "", + pass: t.pass || "", + host: t.host, + port: t.port || "", + path: t.path || "", + projectId: t.projectId, + }; +} +function We(t) { + if (!S) return !0; + const { port: e, projectId: n, protocol: r } = t; + return ["protocol", "publicKey", "host", "projectId"].find((o) => + t[o] ? !1 : (h.error(`Invalid Sentry Dsn: ${o} missing`), !0) + ) + ? !1 + : n.match(/^\d+$/) + ? Ve(r) + ? e && isNaN(parseInt(e, 10)) + ? (h.error(`Invalid Sentry Dsn: Invalid port ${e}`), !1) + : !0 + : (h.error(`Invalid Sentry Dsn: Invalid protocol ${r}`), !1) + : (h.error(`Invalid Sentry Dsn: Invalid projectId ${n}`), !1); +} +function Xe(t) { + const e = t.match(He); + return e == null ? void 0 : e[1]; +} +function Je(t) { + const e = t.getOptions(), + { host: n } = t.getDsn() || {}; + let r; + return e.orgId ? (r = String(e.orgId)) : n && (r = Xe(n)), r; +} +function fr(t) { + const e = typeof t == "string" ? Ke(t) : Gt(t); + if (!(!e || !We(e))) return e; +} +function Et(t) { + if (typeof t == "boolean") return Number(t); + const e = typeof t == "string" ? parseFloat(t) : t; + if (!(typeof e != "number" || isNaN(e) || e < 0 || e > 1)) return e; +} +const qe = new RegExp( + "^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$" +); +function Qe(t) { + if (!t) return; + const e = t.match(qe); + if (!e) return; + let n; + return ( + e[3] === "1" ? (n = !0) : e[3] === "0" && (n = !1), + { traceId: e[1], parentSampled: n, parentSpanId: e[2] } + ); +} +function dr(t, e) { + const n = Qe(t), + r = Bt(e); + if (!(n != null && n.traceId)) + return { traceId: U(), sampleRand: Math.random() }; + const s = tn(n, r); + r && (r.sample_rand = s.toString()); + const { traceId: i, parentSpanId: o, parentSampled: c } = n; + return { + traceId: i, + parentSpanId: o, + sampled: c, + dsc: r || {}, + sampleRand: s, + }; +} +function Ze(t = U(), e = ut(), n) { + let r = ""; + return n !== void 0 && (r = n ? "-1" : "-0"), `${t}-${e}${r}`; +} +function tn(t, e) { + const n = Et(e == null ? void 0 : e.sample_rand); + if (n !== void 0) return n; + const r = Et(e == null ? void 0 : e.sample_rate); + return r && (t == null ? void 0 : t.parentSampled) !== void 0 + ? t.parentSampled + ? Math.random() * r + : r + Math.random() * (1 - r) + : Math.random(); +} +const pr = 0, + zt = 1; +let bt = !1; +function lr(t) { + const { spanId: e, traceId: n } = t.spanContext(), + { + data: r, + op: s, + parent_span_id: i, + status: o, + origin: c, + links: a, + } = Y(t); + return { + parent_span_id: i, + span_id: e, + trace_id: n, + data: r, + op: s, + status: o, + origin: c, + links: a, + }; +} +function en(t) { + const { spanId: e, traceId: n, isRemote: r } = t.spanContext(), + s = r ? e : Y(t).parent_span_id, + i = jt(t).scope, + o = r + ? (i == null ? void 0 : i.getPropagationContext().propagationSpanId) || + ut() + : e; + return { parent_span_id: s, span_id: o, trace_id: n }; +} +function _r(t) { + const { traceId: e, spanId: n } = t.spanContext(), + r = ft(t); + return Ze(e, n, r); +} +function nn(t) { + if (t && t.length > 0) + return t.map( + ({ + context: { spanId: e, traceId: n, traceFlags: r, ...s }, + attributes: i, + }) => ({ + span_id: e, + trace_id: n, + sampled: r === zt, + attributes: i, + ...s, + }) + ); +} +function Tt(t) { + return typeof t == "number" + ? It(t) + : Array.isArray(t) + ? t[0] + t[1] / 1e9 + : t instanceof Date + ? It(t.getTime()) + : ct(); +} +function It(t) { + return t > 9999999999 ? t / 1e3 : t; +} +function Y(t) { + var r; + if (sn(t)) return t.getSpanJSON(); + const { spanId: e, traceId: n } = t.spanContext(); + if (rn(t)) { + const { + attributes: s, + startTime: i, + name: o, + endTime: c, + status: a, + links: u, + } = t, + f = + "parentSpanId" in t + ? t.parentSpanId + : "parentSpanContext" in t + ? (r = t.parentSpanContext) == null + ? void 0 + : r.spanId + : void 0; + return { + span_id: e, + trace_id: n, + data: s, + description: o, + parent_span_id: f, + start_timestamp: Tt(i), + timestamp: Tt(c) || void 0, + status: on(a), + op: s[Fe], + origin: s[$e], + links: nn(u), + }; + } + return { span_id: e, trace_id: n, start_timestamp: 0, data: {} }; +} +function rn(t) { + const e = t; + return ( + !!e.attributes && !!e.startTime && !!e.name && !!e.endTime && !!e.status + ); +} +function sn(t) { + return typeof t.getSpanJSON == "function"; +} +function ft(t) { + const { traceFlags: e } = t.spanContext(); + return e === zt; +} +function on(t) { + if (!(!t || t.code === Ue)) + return t.code === Ft ? "ok" : t.message || "unknown_error"; +} +const A = "_sentryChildSpans", + Q = "_sentryRootSpan"; +function gr(t, e) { + const n = t[Q] || t; + I(e, Q, n), t[A] ? t[A].add(e) : I(t, A, new Set([e])); +} +function hr(t, e) { + t[A] && t[A].delete(e); +} +function mr(t) { + const e = new Set(); + function n(r) { + if (!e.has(r) && ft(r)) { + e.add(r); + const s = r[A] ? Array.from(r[A]) : []; + for (const i of s) n(i); + } + } + return n(t), Array.from(e); +} +function Ht(t) { + return t[Q] || t; +} +function Sr() { + const t = D(), + e = G(t); + return e.getActiveSpan ? e.getActiveSpan() : q(R()); +} +function yr() { + bt || + (nt(() => { + console.warn( + "[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly." + ); + }), + (bt = !0)); +} +function an(t) { + var n; + if (typeof __SENTRY_TRACING__ == "boolean" && !__SENTRY_TRACING__) return !1; + const e = t || ((n = H()) == null ? void 0 : n.getOptions()); + return !!e && (e.tracesSampleRate != null || !!e.tracesSampler); +} +const Yt = "production", + Vt = "_frozenDsc"; +function Er(t, e) { + I(t, Vt, e); +} +function Kt(t, e) { + const n = e.getOptions(), + { publicKey: r } = e.getDsn() || {}, + s = { + environment: n.environment || Yt, + release: n.release, + public_key: r, + trace_id: t, + org_id: Je(e), + }; + return e.emit("createDsc", s), s; +} +function br(t, e) { + const n = e.getPropagationContext(); + return n.dsc || Kt(n.traceId, t); +} +function cn(t) { + var E; + const e = H(); + if (!e) return {}; + const n = Ht(t), + r = Y(n), + s = r.data, + i = n.spanContext().traceState, + o = (i == null ? void 0 : i.get("sentry.sample_rate")) ?? s[ke] ?? s[Le]; + function c(V) { + return ( + (typeof o == "number" || typeof o == "string") && + (V.sample_rate = `${o}`), + V + ); + } + const a = n[Vt]; + if (a) return c(a); + const u = i == null ? void 0 : i.get("sentry.dsc"), + f = u && Bt(u); + if (f) return c(f); + const d = Kt(t.spanContext().traceId, e), + l = s[Pe], + p = r.description; + return ( + l !== "url" && p && (d.transaction = p), + an() && + ((d.sampled = String(ft(n))), + (d.sample_rand = + (i == null ? void 0 : i.get("sentry.sample_rand")) ?? + ((E = jt(n).scope) == null + ? void 0 + : E.getPropagationContext().sampleRand.toString()))), + c(d), + e.emit("createDsc", d, n), + d + ); +} +function b(t, e = 100, n = 1 / 0) { + try { + return Z("", t, e, n); + } catch (r) { + return { ERROR: `**non-serializable** (${r})` }; + } +} +function un(t, e = 3, n = 100 * 1024) { + const r = b(t, e); + return ln(r) > n ? un(t, e - 1, n) : r; +} +function Z(t, e, n = 1 / 0, r = 1 / 0, s = _n()) { + const [i, o] = s; + if ( + e == null || + ["boolean", "string"].includes(typeof e) || + (typeof e == "number" && Number.isFinite(e)) + ) + return e; + const c = fn(t, e); + if (!c.startsWith("[object ")) return c; + if (e.__sentry_skip_normalization__) return e; + const a = + typeof e.__sentry_override_normalization_depth__ == "number" + ? e.__sentry_override_normalization_depth__ + : n; + if (a === 0) return c.replace("object ", ""); + if (i(e)) return "[Circular ~]"; + const u = e; + if (u && typeof u.toJSON == "function") + try { + const p = u.toJSON(); + return Z("", p, a - 1, r, s); + } catch {} + const f = Array.isArray(e) ? [] : {}; + let d = 0; + const l = Pt(e); + for (const p in l) { + if (!Object.prototype.hasOwnProperty.call(l, p)) continue; + if (d >= r) { + f[p] = "[MaxProperties ~]"; + break; + } + const E = l[p]; + (f[p] = Z(p, E, a - 1, r, s)), d++; + } + return o(e), f; +} +function fn(t, e) { + try { + if (t === "domain" && e && typeof e == "object" && e._events) + return "[Domain]"; + if (t === "domainEmitter") return "[DomainEmitter]"; + if (typeof global < "u" && e === global) return "[Global]"; + if (typeof window < "u" && e === window) return "[Window]"; + if (typeof document < "u" && e === document) return "[Document]"; + if (wt(e)) return "[VueViewModel]"; + if (de(e)) return "[SyntheticEvent]"; + if (typeof e == "number" && !Number.isFinite(e)) return `[${e}]`; + if (typeof e == "function") return `[Function: ${ie(e)}]`; + if (typeof e == "symbol") return `[${String(e)}]`; + if (typeof e == "bigint") return `[BigInt: ${String(e)}]`; + const n = dn(e); + return /^HTML(\w*)Element$/.test(n) + ? `[HTMLElement: ${n}]` + : `[object ${n}]`; + } catch (n) { + return `**non-serializable** (${n})`; + } +} +function dn(t) { + const e = Object.getPrototypeOf(t); + return e != null && e.constructor ? e.constructor.name : "null prototype"; +} +function pn(t) { + return ~-encodeURI(t).split(/%..|./).length; +} +function ln(t) { + return pn(JSON.stringify(t)); +} +function _n() { + const t = new WeakSet(); + function e(r) { + return t.has(r) ? !0 : (t.add(r), !1); + } + function n(r) { + t.delete(r); + } + return [e, n]; +} +const X = 0, + At = 1, + Ct = 2; +function Tr(t) { + return new N((e) => { + e(t); + }); +} +function Ir(t) { + return new N((e, n) => { + n(t); + }); +} +class N { + constructor(e) { + (this._state = X), (this._handlers = []), this._runExecutor(e); + } + then(e, n) { + return new N((r, s) => { + this._handlers.push([ + !1, + (i) => { + if (!e) r(i); + else + try { + r(e(i)); + } catch (o) { + s(o); + } + }, + (i) => { + if (!n) s(i); + else + try { + r(n(i)); + } catch (o) { + s(o); + } + }, + ]), + this._executeHandlers(); + }); + } + catch(e) { + return this.then((n) => n, e); + } + finally(e) { + return new N((n, r) => { + let s, i; + return this.then( + (o) => { + (i = !1), (s = o), e && e(); + }, + (o) => { + (i = !0), (s = o), e && e(); + } + ).then(() => { + if (i) { + r(s); + return; + } + n(s); + }); + }); + } + _executeHandlers() { + if (this._state === X) return; + const e = this._handlers.slice(); + (this._handlers = []), + e.forEach((n) => { + n[0] || + (this._state === At && n[1](this._value), + this._state === Ct && n[2](this._value), + (n[0] = !0)); + }); + } + _runExecutor(e) { + const n = (i, o) => { + if (this._state === X) { + if (it(o)) { + o.then(r, s); + return; + } + (this._state = i), (this._value = o), this._executeHandlers(); + } + }, + r = (i) => { + n(At, i); + }, + s = (i) => { + n(Ct, i); + }; + try { + e(r, s); + } catch (i) { + s(i); + } + } +} +function tt(t, e, n, r = 0) { + return new N((s, i) => { + const o = t[r]; + if (e === null || typeof o != "function") s(e); + else { + const c = o({ ...e }, n); + S && + o.id && + c === null && + h.log(`Event processor "${o.id}" dropped event`), + it(c) + ? c.then((a) => tt(t, a, n, r + 1).then(s)).then(null, i) + : tt(t, c, n, r + 1) + .then(s) + .then(null, i); + } + }); +} +function gn(t, e) { + const { + fingerprint: n, + span: r, + breadcrumbs: s, + sdkProcessingMetadata: i, + } = e; + hn(t, e), r && yn(t, r), En(t, n), mn(t, s), Sn(t, i); +} +function Nt(t, e) { + const { + extra: n, + tags: r, + user: s, + contexts: i, + level: o, + sdkProcessingMetadata: c, + breadcrumbs: a, + fingerprint: u, + eventProcessors: f, + attachments: d, + propagationContext: l, + transactionName: p, + span: E, + } = e; + P(t, "extra", n), + P(t, "tags", r), + P(t, "user", s), + P(t, "contexts", i), + (t.sdkProcessingMetadata = B(t.sdkProcessingMetadata, c, 2)), + o && (t.level = o), + p && (t.transactionName = p), + E && (t.span = E), + a.length && (t.breadcrumbs = [...t.breadcrumbs, ...a]), + u.length && (t.fingerprint = [...t.fingerprint, ...u]), + f.length && (t.eventProcessors = [...t.eventProcessors, ...f]), + d.length && (t.attachments = [...t.attachments, ...d]), + (t.propagationContext = { ...t.propagationContext, ...l }); +} +function P(t, e, n) { + t[e] = B(t[e], n, 1); +} +function hn(t, e) { + const { + extra: n, + tags: r, + user: s, + contexts: i, + level: o, + transactionName: c, + } = e; + Object.keys(n).length && (t.extra = { ...n, ...t.extra }), + Object.keys(r).length && (t.tags = { ...r, ...t.tags }), + Object.keys(s).length && (t.user = { ...s, ...t.user }), + Object.keys(i).length && (t.contexts = { ...i, ...t.contexts }), + o && (t.level = o), + c && t.type !== "transaction" && (t.transaction = c); +} +function mn(t, e) { + const n = [...(t.breadcrumbs || []), ...e]; + t.breadcrumbs = n.length ? n : void 0; +} +function Sn(t, e) { + t.sdkProcessingMetadata = { ...t.sdkProcessingMetadata, ...e }; +} +function yn(t, e) { + (t.contexts = { trace: en(e), ...t.contexts }), + (t.sdkProcessingMetadata = { + dynamicSamplingContext: cn(e), + ...t.sdkProcessingMetadata, + }); + const n = Ht(e), + r = Y(n).description; + r && !t.transaction && t.type === "transaction" && (t.transaction = r); +} +function En(t, e) { + (t.fingerprint = t.fingerprint + ? Array.isArray(t.fingerprint) + ? t.fingerprint + : [t.fingerprint] + : []), + e && (t.fingerprint = t.fingerprint.concat(e)), + t.fingerprint.length || delete t.fingerprint; +} +let k, xt, L; +function bn(t) { + const e = g._sentryDebugIds; + if (!e) return {}; + const n = Object.keys(e); + return ( + (L && n.length === xt) || + ((xt = n.length), + (L = n.reduce((r, s) => { + k || (k = {}); + const i = k[s]; + if (i) r[i[0]] = i[1]; + else { + const o = t(s); + for (let c = o.length - 1; c >= 0; c--) { + const a = o[c], + u = a == null ? void 0 : a.filename, + f = e[s]; + if (u && f) { + (r[u] = f), (k[s] = [u, f]); + break; + } + } + } + return r; + }, {}))), + L + ); +} +function Ar(t, e, n, r, s, i) { + const { normalizeDepth: o = 3, normalizeMaxBreadth: c = 1e3 } = t, + a = { + ...e, + event_id: e.event_id || n.event_id || T(), + timestamp: e.timestamp || at(), + }, + u = n.integrations || t.integrations.map((m) => m.name); + Tn(a, t), + Cn(a, u), + s && s.emit("applyFrameMetadata", e), + e.type === void 0 && In(a, t.stackParser); + const f = xn(r, n.captureContext); + n.mechanism && Se(a, n.mechanism); + const d = s ? s.getEventProcessors() : [], + l = we().getScopeData(); + if (i) { + const m = i.getScopeData(); + Nt(l, m); + } + if (f) { + const m = f.getScopeData(); + Nt(l, m); + } + const p = [...(n.attachments || []), ...l.attachments]; + p.length && (n.attachments = p), gn(a, l); + const E = [...d, ...l.eventProcessors]; + return tt(E, a, n).then( + (m) => (m && An(m), typeof o == "number" && o > 0 ? Nn(m, o, c) : m) + ); +} +function Tn(t, e) { + const { environment: n, release: r, dist: s, maxValueLength: i = 250 } = e; + (t.environment = t.environment || n || Yt), + !t.release && r && (t.release = r), + !t.dist && s && (t.dist = s); + const o = t.request; + o != null && o.url && (o.url = $(o.url, i)); +} +function In(t, e) { + var r, s; + const n = bn(e); + (s = (r = t.exception) == null ? void 0 : r.values) == null || + s.forEach((i) => { + var o, c; + (c = (o = i.stacktrace) == null ? void 0 : o.frames) == null || + c.forEach((a) => { + a.filename && (a.debug_id = n[a.filename]); + }); + }); +} +function An(t) { + var r, s; + const e = {}; + if ( + ((s = (r = t.exception) == null ? void 0 : r.values) == null || + s.forEach((i) => { + var o, c; + (c = (o = i.stacktrace) == null ? void 0 : o.frames) == null || + c.forEach((a) => { + a.debug_id && + (a.abs_path + ? (e[a.abs_path] = a.debug_id) + : a.filename && (e[a.filename] = a.debug_id), + delete a.debug_id); + }); + }), + Object.keys(e).length === 0) + ) + return; + (t.debug_meta = t.debug_meta || {}), + (t.debug_meta.images = t.debug_meta.images || []); + const n = t.debug_meta.images; + Object.entries(e).forEach(([i, o]) => { + n.push({ type: "sourcemap", code_file: i, debug_id: o }); + }); +} +function Cn(t, e) { + e.length > 0 && + ((t.sdk = t.sdk || {}), + (t.sdk.integrations = [...(t.sdk.integrations || []), ...e])); +} +function Nn(t, e, n) { + var s, i; + if (!t) return null; + const r = { + ...t, + ...(t.breadcrumbs && { + breadcrumbs: t.breadcrumbs.map((o) => ({ + ...o, + ...(o.data && { data: b(o.data, e, n) }), + })), + }), + ...(t.user && { user: b(t.user, e, n) }), + ...(t.contexts && { contexts: b(t.contexts, e, n) }), + ...(t.extra && { extra: b(t.extra, e, n) }), + }; + return ( + (s = t.contexts) != null && + s.trace && + r.contexts && + ((r.contexts.trace = t.contexts.trace), + t.contexts.trace.data && + (r.contexts.trace.data = b(t.contexts.trace.data, e, n))), + t.spans && + (r.spans = t.spans.map((o) => ({ + ...o, + ...(o.data && { data: b(o.data, e, n) }), + }))), + (i = t.contexts) != null && + i.flags && + r.contexts && + (r.contexts.flags = b(t.contexts.flags, 3, n)), + r + ); +} +function xn(t, e) { + if (!e) return t; + const n = t ? t.clone() : new y(); + return n.update(e), n; +} +function Rn(t) { + if (t) + return On(t) ? { captureContext: t } : Mn(t) ? { captureContext: t } : t; +} +function On(t) { + return t instanceof y || typeof t == "function"; +} +const Dn = [ + "user", + "level", + "extra", + "contexts", + "tags", + "fingerprint", + "propagationContext", +]; +function Mn(t) { + return Object.keys(t).some((e) => Dn.includes(e)); +} +function Cr(t, e) { + return R().captureException(t, Rn(e)); +} +function Nr(t, e) { + return R().captureEvent(t, e); +} +function xr(t, e) { + z().setContext(t, e); +} +function Rr() { + const t = H(); + return ( + (t == null ? void 0 : t.getOptions().enabled) !== !1 && + !!(t != null && t.getTransport()) + ); +} +function Or(t) { + const e = z(), + n = R(), + { userAgent: r } = g.navigator || {}, + s = Te({ + user: n.getUser() || e.getUser(), + ...(r && { userAgent: r }), + ...t, + }), + i = e.getSession(); + return ( + (i == null ? void 0 : i.status) === "ok" && v(i, { status: "exited" }), + Wt(), + e.setSession(s), + s + ); +} +function Wt() { + const t = z(), + n = R().getSession() || t.getSession(); + n && Ie(n), Xt(), t.setSession(); +} +function Xt() { + const t = z(), + e = H(), + n = t.getSession(); + n && e && e.captureSession(n); +} +function Dr(t = !1) { + if (t) { + Wt(); + return; + } + Xt(); +} +export { + fr as $, + rr as A, + H as B, + jt as C, + S as D, + R as E, + mr as F, + g as G, + nr as H, + lr as I, + it as J, + an as K, + Et as L, + qn as M, + D as N, + G as O, + q as P, + Er as Q, + z as R, + _ as S, + pr as T, + gr as U, + ar as V, + ke as W, + Zn as X, + hr as Y, + at as Z, + mt as _, + Sr as a, + T as a0, + Xn as a1, + Un as a2, + v as a3, + Tr as a4, + Yt as a5, + N as a6, + Ar as a7, + Qn as a8, + br as a9, + vn as aA, + he as aB, + Wn as aC, + Se as aD, + Cr as aE, + Ln as aF, + Fn as aG, + $n as aH, + ce as aI, + un as aJ, + Vn as aK, + Jn as aL, + le as aM, + Bn as aN, + F as aO, + re as aP, + ne as aQ, + Gn as aR, + Or as aS, + Dr as aT, + Nr as aU, + Pn as aV, + Le as aW, + ir as aX, + dr as aY, + Ir as aa, + ae as ab, + B as ac, + Mt as ad, + j as ae, + nt as af, + O as ag, + Rr as ah, + _r as ai, + cr as aj, + qe as ak, + Ze as al, + Qe as am, + Yn as an, + Kn as ao, + zn as ap, + M as aq, + wn as ar, + Hn as as, + dt as at, + kn as au, + or as av, + jn as aw, + vt as ax, + oe as ay, + I as az, + Ht as b, + U as c, + h as d, + ut as e, + et as f, + ie as g, + ur as h, + ge as i, + cn as j, + Y as k, + yr as l, + ft as m, + b as n, + tr as o, + er as p, + Fe as q, + $e as r, + xr as s, + ct as t, + zt as u, + Tt as v, + Pe as w, + nn as x, + on as y, + sr as z, +}; diff --git a/frontend-backup/_app/immutable/chunks/DnhglgUZ.js b/frontend-backup/_app/immutable/chunks/DnhglgUZ.js deleted file mode 100644 index e72b27f..0000000 --- a/frontend-backup/_app/immutable/chunks/DnhglgUZ.js +++ /dev/null @@ -1 +0,0 @@ -(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="318a9da5-f9ae-41c4-a6ad-1557223c6f66",e._sentryDebugIdIdentifier="sentry-dbid-318a9da5-f9ae-41c4-a6ad-1557223c6f66")})()}catch{}const b=e=>e;function h(e){const t=e-1;return t*t*t+1}function w(e,{delay:t=0,duration:i=400,easing:s=b}={}){const r=+getComputedStyle(e).opacity;return{delay:t,duration:i,easing:s,css:a=>`opacity: ${a*r}`}}function m(e,{delay:t=0,duration:i=400,easing:s=h,axis:r="y"}={}){const a=getComputedStyle(e),c=+a.opacity,p=r==="y"?"height":"width",l=parseFloat(a[p]),o=r==="y"?["top","bottom"]:["left","right"],d=o.map(n=>`${n[0].toUpperCase()}${n.slice(1)}`),f=parseFloat(a[`padding${d[0]}`]),y=parseFloat(a[`padding${d[1]}`]),u=parseFloat(a[`margin${d[0]}`]),g=parseFloat(a[`margin${d[1]}`]),_=parseFloat(a[`border${d[0]}Width`]),$=parseFloat(a[`border${d[1]}Width`]);return{delay:t,duration:i,easing:s,css:n=>`overflow: hidden;opacity: ${Math.min(n*20,1)*c};${p}: ${n*l}px;padding-${o[0]}: ${n*f}px;padding-${o[1]}: ${n*y}px;margin-${o[0]}: ${n*u}px;margin-${o[1]}: ${n*g}px;border-${o[0]}-width: ${n*_}px;border-${o[1]}-width: ${n*$}px;min-${p}: 0`}}export{w as f,m as s}; diff --git a/frontend-backup/_app/immutable/chunks/DoL3ojdE.js b/frontend-backup/_app/immutable/chunks/DoL3ojdE.js new file mode 100644 index 0000000..aebd0cd --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/DoL3ojdE.js @@ -0,0 +1,167 @@ +import { + i as h, + h as p, + e as v, + ai as m, + ah as w, + K as E, + E as x, + k as T, + az as C, + a5 as S, + o as y, + O as k, + aA as l, + y as A, + aB as _, + aC as D, + w as o, + a1 as I, + aD as b, + aE as R, + z as u, + aF as z, + aG as F, + aH as N, + aI as O, + aJ as P, + aK as j, + aL as K, +} from "./CMvZtFtm.js"; +import { h as L, m as M, u as U } from "./DVA6u9-7.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + t = new e.Error().stack; + t && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[t] = "6413790b-21e4-4c33-94fd-67237f9cfc7a"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-6413790b-21e4-4c33-94fd-67237f9cfc7a")); + })(); +} catch {} +function W(e, t, ...r) { + var a = e, + n = C, + s; + h(() => { + n !== (n = t()) && (s && (S(s), (s = null)), (s = T(() => n(a, ...r)))); + }, x), + p && (a = y); +} +function $(e) { + return (t, ...r) => { + var i; + var a = e(...r), + n; + if (p) (n = y), v(); + else { + var s = a.render().trim(), + c = m(s); + (n = k(c)), t.before(n); + } + const f = (i = a.setup) == null ? void 0 : i.call(a, n); + w(n, n), typeof f == "function" && E(f); + }; +} +function B() { + var e; + return ( + _ === null && D(), ((e = _).ac ?? (e.ac = new AbortController())).signal + ); +} +function g(e) { + o === null && l(), + R && o.l !== null + ? d(o).m.push(e) + : A(() => { + const t = u(e); + if (typeof t == "function") return t; + }); +} +function G(e) { + o === null && l(), g(() => () => u(e)); +} +function H(e, t, { bubbles: r = !1, cancelable: a = !1 } = {}) { + return new CustomEvent(e, { detail: t, bubbles: r, cancelable: a }); +} +function J() { + const e = o; + return ( + e === null && l(), + (t, r, a) => { + var s; + const n = (s = e.s.$$events) == null ? void 0 : s[t]; + if (n) { + const c = I(n) ? n.slice() : [n], + f = H(t, r, a); + for (const i of c) i.call(e.x, f); + return !f.defaultPrevented; + } + return !0; + } + ); +} +function Y(e) { + o === null && l(), o.l === null && b(), d(o).b.push(e); +} +function q(e) { + o === null && l(), o.l === null && b(), d(o).a.push(e); +} +function d(e) { + var t = e.l; + return t.u ?? (t.u = { a: [], b: [], m: [] }); +} +const X = Object.freeze( + Object.defineProperty( + { + __proto__: null, + afterUpdate: q, + beforeUpdate: Y, + createEventDispatcher: J, + createRawSnippet: $, + flushSync: z, + getAbortSignal: B, + getAllContexts: F, + getContext: N, + hasContext: O, + hydrate: L, + mount: M, + onDestroy: G, + onMount: g, + setContext: P, + settled: j, + tick: K, + unmount: U, + untrack: u, + }, + Symbol.toStringTag, + { value: "Module" } + ) + ), + Z = "1759353996237"; +export { X as a, g as o, W as s, Z as v }; diff --git a/frontend-backup/_app/immutable/chunks/DouSnzU9.js b/frontend-backup/_app/immutable/chunks/DouSnzU9.js new file mode 100644 index 0000000..5714d54 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/DouSnzU9.js @@ -0,0 +1,40 @@ +import { g as o } from "./CV9xcpLq.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + n = new e.Error().stack; + n && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[n] = "9b7e0fbd-b2ac-4ffa-96b2-eb70cfb71837"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-9b7e0fbd-b2ac-4ffa-96b2-eb70cfb71837")); + })(); +} catch {} +const f = () => "Role", + d = () => "Cargo", + r = (e = {}, n = {}) => ((n.locale ?? o()) === "en" ? f() : d()); +export { r }; diff --git a/frontend-backup/_app/immutable/chunks/Dp1pzeXC.js b/frontend-backup/_app/immutable/chunks/Dp1pzeXC.js deleted file mode 100644 index 1678ee7..0000000 --- a/frontend-backup/_app/immutable/chunks/Dp1pzeXC.js +++ /dev/null @@ -1,51 +0,0 @@ -const y = "modulepreload", - w = function (f, a) { - return new URL(f, a).href; - }, - E = {}, - g = function (a, u, d) { - let h = Promise.resolve(); - if (u && u.length > 0) { - let s = function (e) { - return Promise.all( - e.map((r) => - Promise.resolve(r).then( - (l) => ({ status: "fulfilled", value: l }), - (l) => ({ status: "rejected", reason: l }) - ) - ) - ); - }; - const t = document.getElementsByTagName("link"), - o = document.querySelector("meta[property=csp-nonce]"), - v = (o == null ? void 0 : o.nonce) || (o == null ? void 0 : o.getAttribute("nonce")); - h = s( - u.map((e) => { - if (((e = w(e, d)), e in E)) return; - E[e] = !0; - const r = e.endsWith(".css"), - l = r ? '[rel="stylesheet"]' : ""; - if (!!d) - for (let i = t.length - 1; i >= 0; i--) { - const c = t[i]; - if (c.href === e && (!r || c.rel === "stylesheet")) return; - } - else if (document.querySelector(`link[href="${e}"]${l}`)) return; - const n = document.createElement("link"); - if (((n.rel = r ? "stylesheet" : y), r || (n.as = "script"), (n.crossOrigin = ""), (n.href = e), v && n.setAttribute("nonce", v), document.head.appendChild(n), r)) - return new Promise((i, c) => { - n.addEventListener("load", i), n.addEventListener("error", () => c(new Error(`Unable to preload CSS for ${e}`))); - }); - }) - ); - } - function m(s) { - const t = new Event("vite:preloadError", { cancelable: !0 }); - if (((t.payload = s), window.dispatchEvent(t), !t.defaultPrevented)) throw s; - } - return h.then((s) => { - for (const t of s || []) t.status === "rejected" && m(t.reason); - return a().catch(m); - }); - }; -export { g as _ }; diff --git a/frontend-backup/_app/immutable/chunks/Dpga8uG-.js b/frontend-backup/_app/immutable/chunks/Dpga8uG-.js new file mode 100644 index 0000000..90a1e18 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/Dpga8uG-.js @@ -0,0 +1,151 @@ +import { + F as E, + G as _, + l as v, + z as g, + H as i, + I as S, + h as k, + J as I, + K as D, + L as y, +} from "./CMvZtFtm.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + d = new e.Error().stack; + d && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[d] = "6fc49d13-f7d8-42d1-9723-e4fb7b109694"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-6fc49d13-f7d8-42d1-9723-e4fb7b109694")); + })(); +} catch {} +function A(e, d, l = d) { + var r = E(), + f = new WeakSet(); + _(e, "input", (s) => { + var a = s ? e.defaultValue : e.value; + if ( + ((a = h(e) ? b(a) : a), + l(a), + v !== null && f.add(v), + r && a !== (a = d())) + ) { + var t = e.selectionStart, + n = e.selectionEnd; + (e.value = a ?? ""), + n !== null && + ((e.selectionStart = t), + (e.selectionEnd = Math.min(n, e.value.length))); + } + }), + ((k && e.defaultValue !== e.value) || (g(d) == null && e.value)) && + (l(h(e) ? b(e.value) : e.value), v !== null && f.add(v)), + i(() => { + var s = d(); + if (e === document.activeElement) { + var a = S ?? v; + if (f.has(a)) return; + } + (h(e) && s === b(e.value)) || + (e.type === "date" && !s && !e.value) || + (s !== e.value && (e.value = s ?? "")); + }); +} +const u = new Set(); +function C(e, d, l, r, f = r) { + var s = l.getAttribute("type") === "checkbox", + a = e; + let t = !1; + if (d !== null) for (var n of d) a = a[n] ?? (a[n] = []); + a.push(l), + _( + l, + "change", + () => { + var c = l.__value; + s && (c = m(a, c, l.checked)), f(c); + }, + () => f(s ? [] : null) + ), + i(() => { + var c = r(); + if (k && l.defaultChecked !== l.checked) { + t = !0; + return; + } + s + ? ((c = c || []), (l.checked = c.includes(l.__value))) + : (l.checked = I(l.__value, c)); + }), + D(() => { + var c = a.indexOf(l); + c !== -1 && a.splice(c, 1); + }), + u.has(a) || + (u.add(a), + y(() => { + a.sort((c, o) => (c.compareDocumentPosition(o) === 4 ? -1 : 1)), + u.delete(a); + })), + y(() => { + if (t) { + var c; + if (s) c = m(a, c, l.checked); + else { + var o = a.find((w) => w.checked); + c = o == null ? void 0 : o.__value; + } + f(c); + } + }); +} +function L(e, d, l = d) { + _(e, "change", (r) => { + var f = r ? e.defaultChecked : e.checked; + l(f); + }), + ((k && e.defaultChecked !== e.checked) || g(d) == null) && l(e.checked), + i(() => { + var r = d(); + e.checked = !!r; + }); +} +function m(e, d, l) { + for (var r = new Set(), f = 0; f < e.length; f += 1) + e[f].checked && r.add(e[f].__value); + return l || r.delete(d), Array.from(r); +} +function h(e) { + var d = e.type; + return d === "number" || d === "range"; +} +function b(e) { + return e === "" ? null : +e; +} +export { L as a, A as b, C as c }; diff --git a/frontend-backup/_app/immutable/chunks/Drv8f_fG.js b/frontend-backup/_app/immutable/chunks/Drv8f_fG.js deleted file mode 100644 index 95a7fdf..0000000 --- a/frontend-backup/_app/immutable/chunks/Drv8f_fG.js +++ /dev/null @@ -1,18 +0,0 @@ -import { g as f } from "./DklPLC_x.js"; -(function () { - try { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - e.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - n = new e.Error().stack; - n && ((e._sentryDebugIds = e._sentryDebugIds || {}), (e._sentryDebugIds[n] = "b6fedc18-c426-4b17-bf09-8644b91cab4b"), (e._sentryDebugIdIdentifier = "sentry-dbid-b6fedc18-c426-4b17-bf09-8644b91cab4b")); - })(); -} catch {} -const t = () => "Refresh", - o = () => "Atualizar", - l = (e = {}, n = {}) => ((n.locale ?? f()) === "en" ? t() : o()); -export { l as r }; diff --git a/frontend-backup/_app/immutable/chunks/DsJqb9ei.js b/frontend-backup/_app/immutable/chunks/DsJqb9ei.js deleted file mode 100644 index 5299b41..0000000 --- a/frontend-backup/_app/immutable/chunks/DsJqb9ei.js +++ /dev/null @@ -1,1023 +0,0 @@ -var sr = Object.defineProperty; -var Re = (e) => { - throw TypeError(e); -}; -var nr = (e, r, o) => (r in e ? sr(e, r, { enumerable: !0, configurable: !0, writable: !0, value: o }) : (e[r] = o)); -var Pe = (e, r, o) => nr(e, typeof r != "symbol" ? r + "" : r, o), - ae = (e, r, o) => r.has(e) || Re("Cannot " + o); -var ie = (e, r, o) => (ae(e, r, "read from private field"), o ? o.call(e) : r.get(e)), - Q = (e, r, o) => (r.has(e) ? Re("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(e) : r.set(e, o)), - Te = (e, r, o, t) => (ae(e, r, "write to private field"), t ? t.call(e, o) : r.set(e, o), o), - le = (e, r, o) => (ae(e, r, "access private method"), o); -import "./Bzak7iHL.js"; -import { p as $e, f as we, d as me, r as pe, t as ue, b as re, c as He, q as ar } from "./DUoKDNpf.js"; -import { i as ir, r as lr } from "./5NasrULQ.js"; -import { s as We, c as cr, b as dr, a as mr } from "./B1GmkH4o.js"; -import { h as pr } from "./BMKgGW48.js"; -import { S as ge } from "./1lh-LSvX.js"; -const Ee = 9, - ur = 95, - gr = 45, - Ge = 5; -function br(e) { - return e.split("").reduce((r, o) => (r ^ o.charCodeAt(0)) * -Ge, Ge) >>> 2; -} -function qe(e = "", r = ur, o = gr, t = br) { - const s = t(e), - i = (s % Ee) * (360 / Ee); - return ( - [...Array(e ? 25 : 0)].reduce( - (l, p, c) => (s & (1 << c % 15) ? l + `` : l), - `` - ) + "" - ); -} -var je, A, oe, H, W, be, Fe; -((je = globalThis.customElements) != null && je.get("minidenticon-svg")) || - (Fe = globalThis.customElements) == null || - Fe.define( - "minidenticon-svg", - ((A = class extends HTMLElement { - constructor() { - super(...arguments); - Q(this, W); - Q(this, H, !1); - } - connectedCallback() { - le(this, W, be).call(this), Te(this, H, !0); - } - attributeChangedCallback() { - ie(this, H) && le(this, W, be).call(this); - } - }), - (oe = new WeakMap()), - (H = new WeakMap()), - (W = new WeakSet()), - (be = function () { - var s; - const o = A.observedAttributes.map((i) => this.getAttribute(i) || void 0), - t = o.join(","); - this.innerHTML = (s = ie(A, oe))[t] ?? (s[t] = qe(...o)); - }), - Pe(A, "observedAttributes", ["username", "saturation", "lightness"]), - Q(A, oe, {}), - A) - ); -var fr = we("
        "); -function hr(e, r) { - $e(r, !0); - var o = fr(), - t = me(o); - pr(t, () => qe(r.userId.toString(), 95, 45)), pe(o), ue(() => We(o, 1, `bg-base-200 minidenticon ${r.class ?? "" ?? ""}`)), re(e, o), He(); -} -const ve = "-", - xr = (e) => { - const r = vr(e), - { conflictingClassGroups: o, conflictingClassGroupModifiers: t } = e; - return { - getClassGroupId: (l) => { - const p = l.split(ve); - return p[0] === "" && p.length !== 1 && p.shift(), De(p, r) || wr(l); - }, - getConflictingClassGroupIds: (l, p) => { - const c = o[l] || []; - return p && t[l] ? [...c, ...t[l]] : c; - }, - }; - }, - De = (e, r) => { - var l; - if (e.length === 0) return r.classGroupId; - const o = e[0], - t = r.nextPart.get(o), - s = t ? De(e.slice(1), t) : void 0; - if (s) return s; - if (r.validators.length === 0) return; - const i = e.join(ve); - return (l = r.validators.find(({ validator: p }) => p(i))) == null ? void 0 : l.classGroupId; - }, - Le = /^\[(.+)\]$/, - wr = (e) => { - if (Le.test(e)) { - const r = Le.exec(e)[1], - o = r == null ? void 0 : r.substring(0, r.indexOf(":")); - if (o) return "arbitrary.." + o; - } - }, - vr = (e) => { - const { theme: r, classGroups: o } = e, - t = { nextPart: new Map(), validators: [] }; - for (const s in o) fe(o[s], t, s, r); - return t; - }, - fe = (e, r, o, t) => { - e.forEach((s) => { - if (typeof s == "string") { - const i = s === "" ? r : Ne(r, s); - i.classGroupId = o; - return; - } - if (typeof s == "function") { - if (kr(s)) { - fe(s(t), r, o, t); - return; - } - r.validators.push({ validator: s, classGroupId: o }); - return; - } - Object.entries(s).forEach(([i, l]) => { - fe(l, Ne(r, i), o, t); - }); - }); - }, - Ne = (e, r) => { - let o = e; - return ( - r.split(ve).forEach((t) => { - o.nextPart.has(t) || o.nextPart.set(t, { nextPart: new Map(), validators: [] }), (o = o.nextPart.get(t)); - }), - o - ); - }, - kr = (e) => e.isThemeGetter, - yr = (e) => { - if (e < 1) return { get: () => {}, set: () => {} }; - let r = 0, - o = new Map(), - t = new Map(); - const s = (i, l) => { - o.set(i, l), r++, r > e && ((r = 0), (t = o), (o = new Map())); - }; - return { - get(i) { - let l = o.get(i); - if (l !== void 0) return l; - if ((l = t.get(i)) !== void 0) return s(i, l), l; - }, - set(i, l) { - o.has(i) ? o.set(i, l) : s(i, l); - }, - }; - }, - he = "!", - xe = ":", - zr = xe.length, - Cr = (e) => { - const { prefix: r, experimentalParseClassName: o } = e; - let t = (s) => { - const i = []; - let l = 0, - p = 0, - c = 0, - f; - for (let x = 0; x < s.length; x++) { - let y = s[x]; - if (l === 0 && p === 0) { - if (y === xe) { - i.push(s.slice(c, x)), (c = x + zr); - continue; - } - if (y === "/") { - f = x; - continue; - } - } - y === "[" ? l++ : y === "]" ? l-- : y === "(" ? p++ : y === ")" && p--; - } - const h = i.length === 0 ? s : s.substring(c), - k = Mr(h), - S = k !== h, - I = f && f > c ? f - c : void 0; - return { modifiers: i, hasImportantModifier: S, baseClassName: k, maybePostfixModifierPosition: I }; - }; - if (r) { - const s = r + xe, - i = t; - t = (l) => (l.startsWith(s) ? i(l.substring(s.length)) : { isExternal: !0, modifiers: [], hasImportantModifier: !1, baseClassName: l, maybePostfixModifierPosition: void 0 }); - } - if (o) { - const s = t; - t = (i) => o({ className: i, parseClassName: s }); - } - return t; - }, - Mr = (e) => (e.endsWith(he) ? e.substring(0, e.length - 1) : e.startsWith(he) ? e.substring(1) : e), - Ar = (e) => { - const r = Object.fromEntries(e.orderSensitiveModifiers.map((t) => [t, !0])); - return (t) => { - if (t.length <= 1) return t; - const s = []; - let i = []; - return ( - t.forEach((l) => { - l[0] === "[" || r[l] ? (s.push(...i.sort(), l), (i = [])) : i.push(l); - }), - s.push(...i.sort()), - s - ); - }; - }, - Sr = (e) => ({ cache: yr(e.cacheSize), parseClassName: Cr(e), sortModifiers: Ar(e), ...xr(e) }), - Ir = /\s+/, - Rr = (e, r) => { - const { parseClassName: o, getClassGroupId: t, getConflictingClassGroupIds: s, sortModifiers: i } = r, - l = [], - p = e.trim().split(Ir); - let c = ""; - for (let f = p.length - 1; f >= 0; f -= 1) { - const h = p[f], - { isExternal: k, modifiers: S, hasImportantModifier: I, baseClassName: x, maybePostfixModifierPosition: y } = o(h); - if (k) { - c = h + (c.length > 0 ? " " + c : c); - continue; - } - let L = !!y, - P = t(L ? x.substring(0, y) : x); - if (!P) { - if (!L) { - c = h + (c.length > 0 ? " " + c : c); - continue; - } - if (((P = t(x)), !P)) { - c = h + (c.length > 0 ? " " + c : c); - continue; - } - L = !1; - } - const q = i(S).join(":"), - j = I ? q + he : q, - N = j + P; - if (l.includes(N)) continue; - l.push(N); - const _ = s(P, L); - for (let T = 0; T < _.length; ++T) { - const F = _[T]; - l.push(j + F); - } - c = h + (c.length > 0 ? " " + c : c); - } - return c; - }; -function Pr() { - let e = 0, - r, - o, - t = ""; - for (; e < arguments.length; ) (r = arguments[e++]) && (o = Xe(r)) && (t && (t += " "), (t += o)); - return t; -} -const Xe = (e) => { - if (typeof e == "string") return e; - let r, - o = ""; - for (let t = 0; t < e.length; t++) e[t] && (r = Xe(e[t])) && (o && (o += " "), (o += r)); - return o; -}; -function Tr(e, ...r) { - let o, - t, - s, - i = l; - function l(c) { - const f = r.reduce((h, k) => k(h), e()); - return (o = Sr(f)), (t = o.cache.get), (s = o.cache.set), (i = p), p(c); - } - function p(c) { - const f = t(c); - if (f) return f; - const h = Rr(c, o); - return s(c, h), h; - } - return function () { - return i(Pr.apply(null, arguments)); - }; -} -const g = (e) => { - const r = (o) => o[e] || []; - return (r.isThemeGetter = !0), r; - }, - Je = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, - Ze = /^\((?:(\w[\w-]*):)?(.+)\)$/i, - Er = /^\d+\/\d+$/, - Gr = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, - Lr = /\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$/, - Nr = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, - _r = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, - Br = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, - O = (e) => Er.test(e), - u = (e) => !!e && !Number.isNaN(Number(e)), - R = (e) => !!e && Number.isInteger(Number(e)), - ce = (e) => e.endsWith("%") && u(e.slice(0, -1)), - M = (e) => Gr.test(e), - Or = () => !0, - Vr = (e) => Lr.test(e) && !Nr.test(e), - Ke = () => !1, - Ur = (e) => _r.test(e), - jr = (e) => Br.test(e), - Fr = (e) => !n(e) && !a(e), - $r = (e) => V(e, er, Ke), - n = (e) => Je.test(e), - G = (e) => V(e, rr, Vr), - de = (e) => V(e, Xr, u), - _e = (e) => V(e, Qe, Ke), - Hr = (e) => V(e, Ye, jr), - Y = (e) => V(e, or, Ur), - a = (e) => Ze.test(e), - $ = (e) => U(e, rr), - Wr = (e) => U(e, Jr), - Be = (e) => U(e, Qe), - qr = (e) => U(e, er), - Dr = (e) => U(e, Ye), - ee = (e) => U(e, or, !0), - V = (e, r, o) => { - const t = Je.exec(e); - return t ? (t[1] ? r(t[1]) : o(t[2])) : !1; - }, - U = (e, r, o = !1) => { - const t = Ze.exec(e); - return t ? (t[1] ? r(t[1]) : o) : !1; - }, - Qe = (e) => e === "position" || e === "percentage", - Ye = (e) => e === "image" || e === "url", - er = (e) => e === "length" || e === "size" || e === "bg-size", - rr = (e) => e === "length", - Xr = (e) => e === "number", - Jr = (e) => e === "family-name", - or = (e) => e === "shadow", - Zr = () => { - const e = g("color"), - r = g("font"), - o = g("text"), - t = g("font-weight"), - s = g("tracking"), - i = g("leading"), - l = g("breakpoint"), - p = g("container"), - c = g("spacing"), - f = g("radius"), - h = g("shadow"), - k = g("inset-shadow"), - S = g("text-shadow"), - I = g("drop-shadow"), - x = g("blur"), - y = g("perspective"), - L = g("aspect"), - P = g("ease"), - q = g("animate"), - j = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], - N = () => ["center", "top", "bottom", "left", "right", "top-left", "left-top", "top-right", "right-top", "bottom-right", "right-bottom", "bottom-left", "left-bottom"], - _ = () => [...N(), a, n], - T = () => ["auto", "hidden", "clip", "visible", "scroll"], - F = () => ["auto", "contain", "none"], - m = () => [a, n, c], - z = () => [O, "full", "auto", ...m()], - ke = () => [R, "none", "subgrid", a, n], - ye = () => ["auto", { span: ["full", R, a, n] }, R, a, n], - D = () => [R, "auto", a, n], - ze = () => ["auto", "min", "max", "fr", a, n], - te = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], - B = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], - C = () => ["auto", ...m()], - E = () => [O, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...m()], - d = () => [e, a, n], - Ce = () => [...N(), Be, _e, { position: [a, n] }], - Me = () => ["no-repeat", { repeat: ["", "x", "y", "space", "round"] }], - Ae = () => ["auto", "cover", "contain", qr, $r, { size: [a, n] }], - se = () => [ce, $, G], - w = () => ["", "none", "full", f, a, n], - v = () => ["", u, $, G], - X = () => ["solid", "dashed", "dotted", "double"], - Se = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], - b = () => [u, ce, Be, _e], - Ie = () => ["", "none", x, a, n], - J = () => ["none", u, a, n], - Z = () => ["none", u, a, n], - ne = () => [u, a, n], - K = () => [O, "full", ...m()]; - return { - cacheSize: 500, - theme: { - animate: ["spin", "ping", "pulse", "bounce"], - aspect: ["video"], - blur: [M], - breakpoint: [M], - color: [Or], - container: [M], - "drop-shadow": [M], - ease: ["in", "out", "in-out"], - font: [Fr], - "font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"], - "inset-shadow": [M], - leading: ["none", "tight", "snug", "normal", "relaxed", "loose"], - perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"], - radius: [M], - shadow: [M], - spacing: ["px", u], - text: [M], - "text-shadow": [M], - tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"], - }, - classGroups: { - aspect: [{ aspect: ["auto", "square", O, n, a, L] }], - container: ["container"], - columns: [{ columns: [u, n, a, p] }], - "break-after": [{ "break-after": j() }], - "break-before": [{ "break-before": j() }], - "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", - ], - sr: ["sr-only", "not-sr-only"], - 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: _() }], - overflow: [{ overflow: T() }], - "overflow-x": [{ "overflow-x": T() }], - "overflow-y": [{ "overflow-y": T() }], - overscroll: [{ overscroll: F() }], - "overscroll-x": [{ "overscroll-x": F() }], - "overscroll-y": [{ "overscroll-y": F() }], - position: ["static", "fixed", "absolute", "relative", "sticky"], - inset: [{ inset: z() }], - "inset-x": [{ "inset-x": z() }], - "inset-y": [{ "inset-y": z() }], - start: [{ start: z() }], - end: [{ end: z() }], - top: [{ top: z() }], - right: [{ right: z() }], - bottom: [{ bottom: z() }], - left: [{ left: z() }], - visibility: ["visible", "invisible", "collapse"], - z: [{ z: [R, "auto", a, n] }], - basis: [{ basis: [O, "full", "auto", p, ...m()] }], - "flex-direction": [{ flex: ["row", "row-reverse", "col", "col-reverse"] }], - "flex-wrap": [{ flex: ["nowrap", "wrap", "wrap-reverse"] }], - flex: [{ flex: [u, O, "auto", "initial", "none", n] }], - grow: [{ grow: ["", u, a, n] }], - shrink: [{ shrink: ["", u, a, n] }], - order: [{ order: [R, "first", "last", "none", a, n] }], - "grid-cols": [{ "grid-cols": ke() }], - "col-start-end": [{ col: ye() }], - "col-start": [{ "col-start": D() }], - "col-end": [{ "col-end": D() }], - "grid-rows": [{ "grid-rows": ke() }], - "row-start-end": [{ row: ye() }], - "row-start": [{ "row-start": D() }], - "row-end": [{ "row-end": D() }], - "grid-flow": [{ "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"] }], - "auto-cols": [{ "auto-cols": ze() }], - "auto-rows": [{ "auto-rows": ze() }], - gap: [{ gap: m() }], - "gap-x": [{ "gap-x": m() }], - "gap-y": [{ "gap-y": m() }], - "justify-content": [{ justify: [...te(), "normal"] }], - "justify-items": [{ "justify-items": [...B(), "normal"] }], - "justify-self": [{ "justify-self": ["auto", ...B()] }], - "align-content": [{ content: ["normal", ...te()] }], - "align-items": [{ items: [...B(), { baseline: ["", "last"] }] }], - "align-self": [{ self: ["auto", ...B(), { baseline: ["", "last"] }] }], - "place-content": [{ "place-content": te() }], - "place-items": [{ "place-items": [...B(), "baseline"] }], - "place-self": [{ "place-self": ["auto", ...B()] }], - p: [{ p: m() }], - px: [{ px: m() }], - py: [{ py: m() }], - ps: [{ ps: m() }], - pe: [{ pe: m() }], - pt: [{ pt: m() }], - pr: [{ pr: m() }], - pb: [{ pb: m() }], - pl: [{ pl: m() }], - m: [{ m: C() }], - mx: [{ mx: C() }], - my: [{ my: C() }], - ms: [{ ms: C() }], - me: [{ me: C() }], - mt: [{ mt: C() }], - mr: [{ mr: C() }], - mb: [{ mb: C() }], - ml: [{ ml: C() }], - "space-x": [{ "space-x": m() }], - "space-x-reverse": ["space-x-reverse"], - "space-y": [{ "space-y": m() }], - "space-y-reverse": ["space-y-reverse"], - size: [{ size: E() }], - w: [{ w: [p, "screen", ...E()] }], - "min-w": [{ "min-w": [p, "screen", "none", ...E()] }], - "max-w": [{ "max-w": [p, "screen", "none", "prose", { screen: [l] }, ...E()] }], - h: [{ h: ["screen", "lh", ...E()] }], - "min-h": [{ "min-h": ["screen", "lh", "none", ...E()] }], - "max-h": [{ "max-h": ["screen", "lh", ...E()] }], - "font-size": [{ text: ["base", o, $, G] }], - "font-smoothing": ["antialiased", "subpixel-antialiased"], - "font-style": ["italic", "not-italic"], - "font-weight": [{ font: [t, a, de] }], - "font-stretch": [{ "font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", ce, n] }], - "font-family": [{ font: [Wr, n, r] }], - "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: [s, a, n] }], - "line-clamp": [{ "line-clamp": [u, "none", a, de] }], - leading: [{ leading: [i, ...m()] }], - "list-image": [{ "list-image": ["none", a, n] }], - "list-style-position": [{ list: ["inside", "outside"] }], - "list-style-type": [{ list: ["disc", "decimal", "none", a, n] }], - "text-alignment": [{ text: ["left", "center", "right", "justify", "start", "end"] }], - "placeholder-color": [{ placeholder: d() }], - "text-color": [{ text: d() }], - "text-decoration": ["underline", "overline", "line-through", "no-underline"], - "text-decoration-style": [{ decoration: [...X(), "wavy"] }], - "text-decoration-thickness": [{ decoration: [u, "from-font", "auto", a, G] }], - "text-decoration-color": [{ decoration: d() }], - "underline-offset": [{ "underline-offset": [u, "auto", a, n] }], - "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"], - "text-overflow": ["truncate", "text-ellipsis", "text-clip"], - "text-wrap": [{ text: ["wrap", "nowrap", "balance", "pretty"] }], - indent: [{ indent: m() }], - "vertical-align": [{ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", a, n] }], - whitespace: [{ whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"] }], - break: [{ break: ["normal", "words", "all", "keep"] }], - wrap: [{ wrap: ["break-word", "anywhere", "normal"] }], - hyphens: [{ hyphens: ["none", "manual", "auto"] }], - content: [{ content: ["none", a, n] }], - "bg-attachment": [{ bg: ["fixed", "local", "scroll"] }], - "bg-clip": [{ "bg-clip": ["border", "padding", "content", "text"] }], - "bg-origin": [{ "bg-origin": ["border", "padding", "content"] }], - "bg-position": [{ bg: Ce() }], - "bg-repeat": [{ bg: Me() }], - "bg-size": [{ bg: Ae() }], - "bg-image": [{ bg: ["none", { linear: [{ to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"] }, R, a, n], radial: ["", a, n], conic: [R, a, n] }, Dr, Hr] }], - "bg-color": [{ bg: d() }], - "gradient-from-pos": [{ from: se() }], - "gradient-via-pos": [{ via: se() }], - "gradient-to-pos": [{ to: se() }], - "gradient-from": [{ from: d() }], - "gradient-via": [{ via: d() }], - "gradient-to": [{ to: d() }], - rounded: [{ rounded: w() }], - "rounded-s": [{ "rounded-s": w() }], - "rounded-e": [{ "rounded-e": w() }], - "rounded-t": [{ "rounded-t": w() }], - "rounded-r": [{ "rounded-r": w() }], - "rounded-b": [{ "rounded-b": w() }], - "rounded-l": [{ "rounded-l": w() }], - "rounded-ss": [{ "rounded-ss": w() }], - "rounded-se": [{ "rounded-se": w() }], - "rounded-ee": [{ "rounded-ee": w() }], - "rounded-es": [{ "rounded-es": w() }], - "rounded-tl": [{ "rounded-tl": w() }], - "rounded-tr": [{ "rounded-tr": w() }], - "rounded-br": [{ "rounded-br": w() }], - "rounded-bl": [{ "rounded-bl": w() }], - "border-w": [{ border: v() }], - "border-w-x": [{ "border-x": v() }], - "border-w-y": [{ "border-y": v() }], - "border-w-s": [{ "border-s": v() }], - "border-w-e": [{ "border-e": v() }], - "border-w-t": [{ "border-t": v() }], - "border-w-r": [{ "border-r": v() }], - "border-w-b": [{ "border-b": v() }], - "border-w-l": [{ "border-l": v() }], - "divide-x": [{ "divide-x": v() }], - "divide-x-reverse": ["divide-x-reverse"], - "divide-y": [{ "divide-y": v() }], - "divide-y-reverse": ["divide-y-reverse"], - "border-style": [{ border: [...X(), "hidden", "none"] }], - "divide-style": [{ divide: [...X(), "hidden", "none"] }], - "border-color": [{ border: d() }], - "border-color-x": [{ "border-x": d() }], - "border-color-y": [{ "border-y": d() }], - "border-color-s": [{ "border-s": d() }], - "border-color-e": [{ "border-e": d() }], - "border-color-t": [{ "border-t": d() }], - "border-color-r": [{ "border-r": d() }], - "border-color-b": [{ "border-b": d() }], - "border-color-l": [{ "border-l": d() }], - "divide-color": [{ divide: d() }], - "outline-style": [{ outline: [...X(), "none", "hidden"] }], - "outline-offset": [{ "outline-offset": [u, a, n] }], - "outline-w": [{ outline: ["", u, $, G] }], - "outline-color": [{ outline: d() }], - shadow: [{ shadow: ["", "none", h, ee, Y] }], - "shadow-color": [{ shadow: d() }], - "inset-shadow": [{ "inset-shadow": ["none", k, ee, Y] }], - "inset-shadow-color": [{ "inset-shadow": d() }], - "ring-w": [{ ring: v() }], - "ring-w-inset": ["ring-inset"], - "ring-color": [{ ring: d() }], - "ring-offset-w": [{ "ring-offset": [u, G] }], - "ring-offset-color": [{ "ring-offset": d() }], - "inset-ring-w": [{ "inset-ring": v() }], - "inset-ring-color": [{ "inset-ring": d() }], - "text-shadow": [{ "text-shadow": ["none", S, ee, Y] }], - "text-shadow-color": [{ "text-shadow": d() }], - opacity: [{ opacity: [u, a, n] }], - "mix-blend": [{ "mix-blend": [...Se(), "plus-darker", "plus-lighter"] }], - "bg-blend": [{ "bg-blend": Se() }], - "mask-clip": [{ "mask-clip": ["border", "padding", "content", "fill", "stroke", "view"] }, "mask-no-clip"], - "mask-composite": [{ mask: ["add", "subtract", "intersect", "exclude"] }], - "mask-image-linear-pos": [{ "mask-linear": [u] }], - "mask-image-linear-from-pos": [{ "mask-linear-from": b() }], - "mask-image-linear-to-pos": [{ "mask-linear-to": b() }], - "mask-image-linear-from-color": [{ "mask-linear-from": d() }], - "mask-image-linear-to-color": [{ "mask-linear-to": d() }], - "mask-image-t-from-pos": [{ "mask-t-from": b() }], - "mask-image-t-to-pos": [{ "mask-t-to": b() }], - "mask-image-t-from-color": [{ "mask-t-from": d() }], - "mask-image-t-to-color": [{ "mask-t-to": d() }], - "mask-image-r-from-pos": [{ "mask-r-from": b() }], - "mask-image-r-to-pos": [{ "mask-r-to": b() }], - "mask-image-r-from-color": [{ "mask-r-from": d() }], - "mask-image-r-to-color": [{ "mask-r-to": d() }], - "mask-image-b-from-pos": [{ "mask-b-from": b() }], - "mask-image-b-to-pos": [{ "mask-b-to": b() }], - "mask-image-b-from-color": [{ "mask-b-from": d() }], - "mask-image-b-to-color": [{ "mask-b-to": d() }], - "mask-image-l-from-pos": [{ "mask-l-from": b() }], - "mask-image-l-to-pos": [{ "mask-l-to": b() }], - "mask-image-l-from-color": [{ "mask-l-from": d() }], - "mask-image-l-to-color": [{ "mask-l-to": d() }], - "mask-image-x-from-pos": [{ "mask-x-from": b() }], - "mask-image-x-to-pos": [{ "mask-x-to": b() }], - "mask-image-x-from-color": [{ "mask-x-from": d() }], - "mask-image-x-to-color": [{ "mask-x-to": d() }], - "mask-image-y-from-pos": [{ "mask-y-from": b() }], - "mask-image-y-to-pos": [{ "mask-y-to": b() }], - "mask-image-y-from-color": [{ "mask-y-from": d() }], - "mask-image-y-to-color": [{ "mask-y-to": d() }], - "mask-image-radial": [{ "mask-radial": [a, n] }], - "mask-image-radial-from-pos": [{ "mask-radial-from": b() }], - "mask-image-radial-to-pos": [{ "mask-radial-to": b() }], - "mask-image-radial-from-color": [{ "mask-radial-from": d() }], - "mask-image-radial-to-color": [{ "mask-radial-to": d() }], - "mask-image-radial-shape": [{ "mask-radial": ["circle", "ellipse"] }], - "mask-image-radial-size": [{ "mask-radial": [{ closest: ["side", "corner"], farthest: ["side", "corner"] }] }], - "mask-image-radial-pos": [{ "mask-radial-at": N() }], - "mask-image-conic-pos": [{ "mask-conic": [u] }], - "mask-image-conic-from-pos": [{ "mask-conic-from": b() }], - "mask-image-conic-to-pos": [{ "mask-conic-to": b() }], - "mask-image-conic-from-color": [{ "mask-conic-from": d() }], - "mask-image-conic-to-color": [{ "mask-conic-to": d() }], - "mask-mode": [{ mask: ["alpha", "luminance", "match"] }], - "mask-origin": [{ "mask-origin": ["border", "padding", "content", "fill", "stroke", "view"] }], - "mask-position": [{ mask: Ce() }], - "mask-repeat": [{ mask: Me() }], - "mask-size": [{ mask: Ae() }], - "mask-type": [{ "mask-type": ["alpha", "luminance"] }], - "mask-image": [{ mask: ["none", a, n] }], - filter: [{ filter: ["", "none", a, n] }], - blur: [{ blur: Ie() }], - brightness: [{ brightness: [u, a, n] }], - contrast: [{ contrast: [u, a, n] }], - "drop-shadow": [{ "drop-shadow": ["", "none", I, ee, Y] }], - "drop-shadow-color": [{ "drop-shadow": d() }], - grayscale: [{ grayscale: ["", u, a, n] }], - "hue-rotate": [{ "hue-rotate": [u, a, n] }], - invert: [{ invert: ["", u, a, n] }], - saturate: [{ saturate: [u, a, n] }], - sepia: [{ sepia: ["", u, a, n] }], - "backdrop-filter": [{ "backdrop-filter": ["", "none", a, n] }], - "backdrop-blur": [{ "backdrop-blur": Ie() }], - "backdrop-brightness": [{ "backdrop-brightness": [u, a, n] }], - "backdrop-contrast": [{ "backdrop-contrast": [u, a, n] }], - "backdrop-grayscale": [{ "backdrop-grayscale": ["", u, a, n] }], - "backdrop-hue-rotate": [{ "backdrop-hue-rotate": [u, a, n] }], - "backdrop-invert": [{ "backdrop-invert": ["", u, a, n] }], - "backdrop-opacity": [{ "backdrop-opacity": [u, a, n] }], - "backdrop-saturate": [{ "backdrop-saturate": [u, a, n] }], - "backdrop-sepia": [{ "backdrop-sepia": ["", u, a, n] }], - "border-collapse": [{ border: ["collapse", "separate"] }], - "border-spacing": [{ "border-spacing": m() }], - "border-spacing-x": [{ "border-spacing-x": m() }], - "border-spacing-y": [{ "border-spacing-y": m() }], - "table-layout": [{ table: ["auto", "fixed"] }], - caption: [{ caption: ["top", "bottom"] }], - transition: [{ transition: ["", "all", "colors", "opacity", "shadow", "transform", "none", a, n] }], - "transition-behavior": [{ transition: ["normal", "discrete"] }], - duration: [{ duration: [u, "initial", a, n] }], - ease: [{ ease: ["linear", "initial", P, a, n] }], - delay: [{ delay: [u, a, n] }], - animate: [{ animate: ["none", q, a, n] }], - backface: [{ backface: ["hidden", "visible"] }], - perspective: [{ perspective: [y, a, n] }], - "perspective-origin": [{ "perspective-origin": _() }], - rotate: [{ rotate: J() }], - "rotate-x": [{ "rotate-x": J() }], - "rotate-y": [{ "rotate-y": J() }], - "rotate-z": [{ "rotate-z": J() }], - scale: [{ scale: Z() }], - "scale-x": [{ "scale-x": Z() }], - "scale-y": [{ "scale-y": Z() }], - "scale-z": [{ "scale-z": Z() }], - "scale-3d": ["scale-3d"], - skew: [{ skew: ne() }], - "skew-x": [{ "skew-x": ne() }], - "skew-y": [{ "skew-y": ne() }], - transform: [{ transform: [a, n, "", "none", "gpu", "cpu"] }], - "transform-origin": [{ origin: _() }], - "transform-style": [{ transform: ["3d", "flat"] }], - translate: [{ translate: K() }], - "translate-x": [{ "translate-x": K() }], - "translate-y": [{ "translate-y": K() }], - "translate-z": [{ "translate-z": K() }], - "translate-none": ["translate-none"], - accent: [{ accent: d() }], - appearance: [{ appearance: ["none", "auto"] }], - "caret-color": [{ caret: d() }], - "color-scheme": [{ scheme: ["normal", "dark", "light", "light-dark", "only-dark", "only-light"] }], - 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", - a, - n, - ], - }, - ], - "field-sizing": [{ "field-sizing": ["fixed", "content"] }], - "pointer-events": [{ "pointer-events": ["auto", "none"] }], - resize: [{ resize: ["none", "", "y", "x"] }], - "scroll-behavior": [{ scroll: ["auto", "smooth"] }], - "scroll-m": [{ "scroll-m": m() }], - "scroll-mx": [{ "scroll-mx": m() }], - "scroll-my": [{ "scroll-my": m() }], - "scroll-ms": [{ "scroll-ms": m() }], - "scroll-me": [{ "scroll-me": m() }], - "scroll-mt": [{ "scroll-mt": m() }], - "scroll-mr": [{ "scroll-mr": m() }], - "scroll-mb": [{ "scroll-mb": m() }], - "scroll-ml": [{ "scroll-ml": m() }], - "scroll-p": [{ "scroll-p": m() }], - "scroll-px": [{ "scroll-px": m() }], - "scroll-py": [{ "scroll-py": m() }], - "scroll-ps": [{ "scroll-ps": m() }], - "scroll-pe": [{ "scroll-pe": m() }], - "scroll-pt": [{ "scroll-pt": m() }], - "scroll-pr": [{ "scroll-pr": m() }], - "scroll-pb": [{ "scroll-pb": m() }], - "scroll-pl": [{ "scroll-pl": m() }], - "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"] }], - 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", a, n] }], - fill: [{ fill: ["none", ...d()] }], - "stroke-w": [{ stroke: [u, $, G, de] }], - stroke: [{ stroke: ["none", ...d()] }], - "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-x", "border-w-y", "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-x", "border-color-y", "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"], - translate: ["translate-x", "translate-y", "translate-none"], - "translate-none": ["translate", "translate-x", "translate-y", "translate-z"], - "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"] }, - orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"], - }; - }, - Kr = Tr(Zr); -var Qr = we('User profile'), - Yr = we('
        '); -function co(e, r) { - $e(r, !0); - var o = Yr(), - t = me(o), - s = me(t); - { - var i = (p) => { - hr(p, { - get userId() { - return r.userId; - }, - }); - }, - l = (p) => { - var c = Qr(); - ue(() => dr(c, "src", r.pictureUrl)), re(p, c); - }; - ir(s, (p) => { - r.pictureUrl ? p(l, !1) : p(i); - }); - } - pe(t), pe(o), ue((p) => We(t, 1, p), [() => cr(Kr("border-base-300 size-20 rounded-full border-2", r.class))]), re(e, o), He(); -} -const Oe = [ - "text-red-500", - "text-orange-500", - "text-yellow-500", - "text-lime-500", - "text-emerald-500", - "text-teal-500", - "text-cyan-500", - "text-sky-500", - "text-indigo-500", - "text-violet-500", - "text-purple-500", - "text-fuchsia-500", - "text-pink-500", - "text-rose-500", - ], - Ve = [ - "bg-red-500/10", - "bg-orange-500/10", - "bg-yellow-500/10", - "bg-lime-500/10", - "bg-emerald-500/10", - "bg-teal-500/10", - "bg-cyan-500/10", - "bg-sky-500/10", - "bg-indigo-500/10", - "bg-violet-500/10", - "bg-purple-500/10", - "bg-fuchsia-500/10", - "bg-pink-500/10", - "bg-rose-500/10", - ]; -function mo(e) { - return Oe[e % Oe.length]; -} -function po(e) { - return Ve[e % Ve.length]; -} -function uo({ r: e, g: r, b: o }) { - function t(s) { - return s.toString(16).padStart(2, "0"); - } - return `#${t(e)}${t(r)}${t(o)}`; -} -function go(e) { - return (e = e.trim().replace("#", "")), e.length === 3 && (e = e[0] + e[0] + e[1] + e[1] + e[2] + e[2]), e.length !== 6 ? { r: 0, g: 0, b: 0 } : { r: +("0x" + e.slice(0, 2)), g: +("0x" + e.slice(2, 4)), b: +("0x" + e.slice(4, 6)) }; -} -function bo(e) { - e = Math.min(e, ge.colors.length - 1); - const [r, o, t] = ge.colors[e].rgb; - return { r, g: o, b: t, a: e === 0 ? 0 : 255 }; -} -const Ue = ge.colors.map((e, r) => ({ ...e, idx: r, lab: tr({ r: e.rgb[0], g: e.rgb[1], b: e.rgb[2] }) })).filter((e) => e.idx !== 0); -function fo(e) { - let r = Ue[0], - o = Number.MAX_VALUE; - const t = tr(e); - for (let s of Ue) { - const i = eo(t, s.lab); - i < o && ((r = s), (o = i)); - } - return r.idx; -} -function tr(e) { - var r = e.r / 255, - o = e.g / 255, - t = e.b / 255, - s, - i, - l; - return ( - (r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92), - (o = o > 0.04045 ? Math.pow((o + 0.055) / 1.055, 2.4) : o / 12.92), - (t = t > 0.04045 ? Math.pow((t + 0.055) / 1.055, 2.4) : t / 12.92), - (s = (r * 0.4124 + o * 0.3576 + t * 0.1805) / 0.95047), - (i = (r * 0.2126 + o * 0.7152 + t * 0.0722) / 1), - (l = (r * 0.0193 + o * 0.1192 + t * 0.9505) / 1.08883), - (s = s > 0.008856 ? Math.pow(s, 1 / 3) : 7.787 * s + 16 / 116), - (i = i > 0.008856 ? Math.pow(i, 1 / 3) : 7.787 * i + 16 / 116), - (l = l > 0.008856 ? Math.pow(l, 1 / 3) : 7.787 * l + 16 / 116), - { l: 116 * i - 16, a: 500 * (s - i), b: 200 * (i - l) } - ); -} -function eo(e, r) { - var o = e.l - r.l, - t = e.a - r.a, - s = e.b - r.b, - i = Math.sqrt(e.a * e.a + e.b * e.b), - l = Math.sqrt(r.a * r.a + r.b * r.b), - p = i - l, - c = t * t + s * s - p * p; - c = c < 0 ? 0 : Math.sqrt(c); - var f = 1 + 0.045 * i, - h = 1 + 0.015 * i, - k = o / 1, - S = p / f, - I = c / h, - x = k * k + S * S + I * I; - return x < 0 ? 0 : Math.sqrt(x); -} -var ro = ar(''); -function ho(e, r) { - let o = lr(r, ["$$slots", "$$events", "$$legacy"]); - var t = ro(); - mr(t, () => ({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960", fill: "currentColor", ...o })), re(e, t); -} -export { ho as A, co as P, hr as a, po as b, bo as c, fo as d, mo as g, go as h, uo as r, Kr as t }; diff --git a/frontend-backup/_app/immutable/chunks/Dt3xBOvm.js b/frontend-backup/_app/immutable/chunks/Dt3xBOvm.js new file mode 100644 index 0000000..2f9b739 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/Dt3xBOvm.js @@ -0,0 +1,58 @@ +import { g as r } from "./CV9xcpLq.js"; +import "./Ch2Ub8FX.js"; +import { v as s, b as a } from "./CMvZtFtm.js"; +import { b as f } from "./C5yqZvKC.js"; +import { r as l } from "./BF50aS-j.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + o = new e.Error().stack; + o && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[o] = "96221a50-a410-40f3-b47c-daa8097a15f4"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-96221a50-a410-40f3-b47c-daa8097a15f4")); + })(); +} catch {} +const d = () => "Close", + c = () => "Fechar", + w = (e = {}, o = {}) => ((o.locale ?? r()) === "en" ? d() : c()); +var i = s( + '' +); +function v(e, o) { + let t = l(o, ["$$slots", "$$events", "$$legacy"]); + var n = i(); + f(n, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...t, + })), + a(e, n); +} +export { v as A, w as c }; diff --git a/frontend-backup/_app/immutable/chunks/DueIxFLX.js b/frontend-backup/_app/immutable/chunks/DueIxFLX.js new file mode 100644 index 0000000..65adb33 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/DueIxFLX.js @@ -0,0 +1,87 @@ +import { + t as y, + h as c, + e as h, + ab as g, + ae as p, + o as b, + U as w, + a7 as v, + af as m, + ag as E, + ah as u, + N as T, + ai as D, + O as i, +} from "./CMvZtFtm.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + d = new e.Error().stack; + d && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[d] = "94d4e00b-a912-44a4-9c84-3fbf1f4139c4"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-94d4e00b-a912-44a4-9c84-3fbf1f4139c4")); + })(); +} catch {} +function N(e, d, r = !1, o = !1, I = !1) { + var l = e, + t = ""; + y(() => { + var n = g; + if (t === (t = d() ?? "")) { + c && h(); + return; + } + if ( + (n.nodes_start !== null && + (p(n.nodes_start, n.nodes_end), (n.nodes_start = n.nodes_end = null)), + t !== "") + ) { + if (c) { + b.data; + for ( + var a = h(), _ = a; + a !== null && (a.nodeType !== w || a.data !== ""); + + ) + (_ = a), (a = v(a)); + if (a === null) throw (m(), E); + u(b, _), (l = T(a)); + return; + } + var s = t + ""; + r ? (s = `${s}`) : o && (s = `${s}`); + var f = D(s); + if (((r || o) && (f = i(f)), u(i(f), f.lastChild), r || o)) + for (; i(f); ) l.before(i(f)); + else l.before(f); + } + }); +} +export { N as h }; diff --git a/frontend-backup/_app/immutable/chunks/EXYzlOI1.js b/frontend-backup/_app/immutable/chunks/EXYzlOI1.js deleted file mode 100644 index bbad5cc..0000000 --- a/frontend-backup/_app/immutable/chunks/EXYzlOI1.js +++ /dev/null @@ -1 +0,0 @@ -import{g as o}from"./DklPLC_x.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a39ce8e6-c68e-4670-97d0-cab3082bdbf7",e._sentryDebugIdIdentifier="sentry-dbid-a39ce8e6-c68e-4670-97d0-cab3082bdbf7")})()}catch{}const f=()=>"Confirm",t=()=>"Confirmar",r=(e={},n={})=>(n.locale??o())==="en"?f():t();export{r as c}; diff --git a/frontend-backup/_app/immutable/chunks/F0pgzfyy.js b/frontend-backup/_app/immutable/chunks/F0pgzfyy.js deleted file mode 100644 index 63f7215..0000000 --- a/frontend-backup/_app/immutable/chunks/F0pgzfyy.js +++ /dev/null @@ -1,2 +0,0 @@ -const o = "1756230503892"; -export { o as v }; diff --git a/frontend-backup/_app/immutable/chunks/GVP1MJz5.js b/frontend-backup/_app/immutable/chunks/GVP1MJz5.js deleted file mode 100644 index 7c538b5..0000000 --- a/frontend-backup/_app/immutable/chunks/GVP1MJz5.js +++ /dev/null @@ -1,18 +0,0 @@ -import { g as t } from "./DklPLC_x.js"; -(function () { - try { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - e.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - n = new e.Error().stack; - n && ((e._sentryDebugIds = e._sentryDebugIds || {}), (e._sentryDebugIds[n] = "82e5352c-47b9-45dc-82d9-9c5d1081102b"), (e._sentryDebugIdIdentifier = "sentry-dbid-82e5352c-47b9-45dc-82d9-9c5d1081102b")); - })(); -} catch {} -const o = () => "Open tickets", - d = () => "Tickets abertos", - s = (e = {}, n = {}) => ((n.locale ?? t()) === "en" ? o() : d()); -export { s as o }; diff --git a/frontend-backup/_app/immutable/chunks/KvV259my.js b/frontend-backup/_app/immutable/chunks/KvV259my.js deleted file mode 100644 index 46312f2..0000000 --- a/frontend-backup/_app/immutable/chunks/KvV259my.js +++ /dev/null @@ -1,1527 +0,0 @@ -var ee = (t) => { - throw TypeError(t); -}; -var Ve = (t, e, n) => e.has(t) || ee("Cannot " + n); -var b = (t, e, n) => (Ve(t, e, "read from private field"), n ? n.call(t) : e.get(t)), - P = (t, e, n) => (e.has(t) ? ee("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n)); -import { o as ne, a as qe } from "./ByKBPM-D.js"; -import { ap as Lt, ba as Me, aR as C, A as N, aH as O, aB as re } from "./DUoKDNpf.js"; -import { v as Ge } from "./F0pgzfyy.js"; -const q = []; -function Dt(t, e = Lt) { - let n = null; - const a = new Set(); - function r(o) { - if (Me(t, o) && ((t = o), n)) { - const c = !q.length; - for (const l of a) l[1](), q.push(l, t); - if (c) { - for (let l = 0; l < q.length; l += 2) q[l][0](q[l + 1]); - q.length = 0; - } - } - } - function s(o) { - r(o(t)); - } - function i(o, c = Lt) { - const l = [o, c]; - return ( - a.add(l), - a.size === 1 && (n = e(r, s) || Lt), - o(t), - () => { - a.delete(l), a.size === 0 && n && (n(), (n = null)); - } - ); - } - return { set: r, update: s, subscribe: i }; -} -class kt { - constructor(e, n) { - (this.status = e), typeof n == "string" ? (this.body = { message: n }) : n ? (this.body = n) : (this.body = { message: `Error: ${e}` }); - } - toString() { - return JSON.stringify(this.body); - } -} -class Bt { - constructor(e, n) { - (this.status = e), (this.location = n); - } -} -class Ft extends Error { - constructor(e, n, a) { - super(a), (this.status = e), (this.text = n); - } -} -new URL("sveltekit-internal://"); -function He(t, e) { - return t === "/" || e === "ignore" ? t : e === "never" ? (t.endsWith("/") ? t.slice(0, -1) : t) : e === "always" && !t.endsWith("/") ? t + "/" : t; -} -function Ke(t) { - return t.split("%25").map(decodeURI).join("%25"); -} -function We(t) { - for (const e in t) t[e] = decodeURIComponent(t[e]); - return t; -} -function Tt({ href: t }) { - return t.split("#")[0]; -} -function Ye(t, e, n, a = !1) { - const r = new URL(t); - Object.defineProperty(r, "searchParams", { - value: new Proxy(r.searchParams, { - get(i, o) { - if (o === "get" || o === "getAll" || o === "has") return (l) => (n(l), i[o](l)); - e(); - const c = Reflect.get(i, o); - return typeof c == "function" ? c.bind(i) : c; - }, - }), - enumerable: !0, - configurable: !0, - }); - const s = ["href", "pathname", "search", "toString", "toJSON"]; - a && s.push("hash"); - for (const i of s) - Object.defineProperty(r, i, { - get() { - return e(), t[i]; - }, - enumerable: !0, - configurable: !0, - }); - return r; -} -function ze(...t) { - let e = 5381; - for (const n of t) - if (typeof n == "string") { - let a = n.length; - for (; a; ) e = (e * 33) ^ n.charCodeAt(--a); - } else if (ArrayBuffer.isView(n)) { - const a = new Uint8Array(n.buffer, n.byteOffset, n.byteLength); - let r = a.length; - for (; r; ) e = (e * 33) ^ a[--r]; - } else throw new TypeError("value must be a string or TypedArray"); - return (e >>> 0).toString(36); -} -new TextEncoder(); -const Je = new TextDecoder(); -function Xe(t) { - const e = atob(t), - n = new Uint8Array(e.length); - for (let a = 0; a < e.length; a++) n[a] = e.charCodeAt(a); - return n; -} -const Ze = window.fetch; -window.fetch = (t, e) => ((t instanceof Request ? t.method : (e == null ? void 0 : e.method) || "GET") !== "GET" && Y.delete(Vt(t)), Ze(t, e)); -const Y = new Map(); -function Qe(t, e) { - const n = Vt(t, e), - a = document.querySelector(n); - if (a != null && a.textContent) { - a.remove(); - let { body: r, ...s } = JSON.parse(a.textContent); - const i = a.getAttribute("data-ttl"); - return i && Y.set(n, { body: r, init: s, ttl: 1e3 * Number(i) }), a.getAttribute("data-b64") !== null && (r = Xe(r)), Promise.resolve(new Response(r, s)); - } - return window.fetch(t, e); -} -function tn(t, e, n) { - if (Y.size > 0) { - const a = Vt(t, n), - r = Y.get(a); - if (r) { - if (performance.now() < r.ttl && ["default", "force-cache", "only-if-cached", void 0].includes(n == null ? void 0 : n.cache)) return new Response(r.body, r.init); - Y.delete(a); - } - } - return window.fetch(e, n); -} -function Vt(t, e) { - let a = `script[data-sveltekit-fetched][data-url=${JSON.stringify(t instanceof Request ? t.url : t)}]`; - if ((e != null && e.headers) || (e != null && e.body)) { - const r = []; - e.headers && r.push([...new Headers(e.headers)].join(",")), e.body && (typeof e.body == "string" || ArrayBuffer.isView(e.body)) && r.push(e.body), (a += `[data-hash="${ze(...r)}"]`); - } - return a; -} -const en = /^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/; -function nn(t) { - const e = []; - return { - pattern: - t === "/" - ? /^\/$/ - : new RegExp( - `^${an(t) - .map((a) => { - const r = /^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(a); - if (r) return e.push({ name: r[1], matcher: r[2], optional: !1, rest: !0, chained: !0 }), "(?:/([^]*))?"; - const s = /^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(a); - if (s) return e.push({ name: s[1], matcher: s[2], optional: !0, rest: !1, chained: !0 }), "(?:/([^/]+))?"; - if (!a) return; - const i = a.split(/\[(.+?)\](?!\])/); - return ( - "/" + - i - .map((c, l) => { - if (l % 2) { - if (c.startsWith("x+")) return xt(String.fromCharCode(parseInt(c.slice(2), 16))); - if (c.startsWith("u+")) - return xt( - String.fromCharCode( - ...c - .slice(2) - .split("-") - .map((u) => parseInt(u, 16)) - ) - ); - const h = en.exec(c), - [, p, _, f, m] = h; - return e.push({ name: f, matcher: m, optional: !!p, rest: !!_, chained: _ ? l === 1 && i[0] === "" : !1 }), _ ? "([^]*?)" : p ? "([^/]*)?" : "([^/]+?)"; - } - return xt(c); - }) - .join("") - ); - }) - .join("")}/?$` - ), - params: e, - }; -} -function rn(t) { - return t !== "" && !/^\([^)]+\)$/.test(t); -} -function an(t) { - return t.slice(1).split("/").filter(rn); -} -function on(t, e, n) { - const a = {}, - r = t.slice(1), - s = r.filter((o) => o !== void 0); - let i = 0; - for (let o = 0; o < e.length; o += 1) { - const c = e[o]; - let l = r[o - i]; - if ( - (c.chained && - c.rest && - i && - ((l = r - .slice(o - i, o + 1) - .filter((h) => h) - .join("/")), - (i = 0)), - l === void 0) - ) { - c.rest && (a[c.name] = ""); - continue; - } - if (!c.matcher || n[c.matcher](l)) { - a[c.name] = l; - const h = e[o + 1], - p = r[o + 1]; - h && !h.rest && h.optional && p && c.chained && (i = 0), !h && !p && Object.keys(a).length === s.length && (i = 0); - continue; - } - if (c.optional && c.chained) { - i++; - continue; - } - return; - } - if (!i) return a; -} -function xt(t) { - return t - .normalize() - .replace(/[[\]]/g, "\\$&") - .replace(/%/g, "%25") - .replace(/\//g, "%2[Ff]") - .replace(/\?/g, "%3[Ff]") - .replace(/#/g, "%23") - .replace(/[.*+?^${}()|\\]/g, "\\$&"); -} -function sn({ nodes: t, server_loads: e, dictionary: n, matchers: a }) { - const r = new Set(e); - return Object.entries(n).map(([o, [c, l, h]]) => { - const { pattern: p, params: _ } = nn(o), - f = { - id: o, - exec: (m) => { - const u = p.exec(m); - if (u) return on(u, _, a); - }, - errors: [1, ...(h || [])].map((m) => t[m]), - layouts: [0, ...(l || [])].map(i), - leaf: s(c), - }; - return (f.errors.length = f.layouts.length = Math.max(f.errors.length, f.layouts.length)), f; - }); - function s(o) { - const c = o < 0; - return c && (o = ~o), [c, t[o]]; - } - function i(o) { - return o === void 0 ? o : [r.has(o), t[o]]; - } -} -function ve(t, e = JSON.parse) { - try { - return e(sessionStorage[t]); - } catch {} -} -function ae(t, e, n = JSON.stringify) { - const a = n(e); - try { - sessionStorage[t] = a; - } catch {} -} -var ge; -const x = ((ge = globalThis.__sveltekit_9k4bn8) == null ? void 0 : ge.base) ?? ""; -var me; -const cn = ((me = globalThis.__sveltekit_9k4bn8) == null ? void 0 : me.assets) ?? x, - be = "sveltekit:snapshot", - ke = "sveltekit:scroll", - Ae = "sveltekit:states", - ln = "sveltekit:pageurl", - G = "sveltekit:history", - Z = "sveltekit:navigation", - B = { tap: 1, hover: 2, viewport: 3, eager: 4, off: -1, false: -1 }, - ht = location.origin; -function qt(t) { - if (t instanceof URL) return t; - let e = document.baseURI; - if (!e) { - const n = document.getElementsByTagName("base"); - e = n.length ? n[0].href : document.URL; - } - return new URL(t, e); -} -function At() { - return { x: pageXOffset, y: pageYOffset }; -} -function M(t, e) { - return t.getAttribute(`data-sveltekit-${e}`); -} -const oe = { ...B, "": B.hover }; -function Ee(t) { - let e = t.assignedSlot ?? t.parentNode; - return (e == null ? void 0 : e.nodeType) === 11 && (e = e.host), e; -} -function Se(t, e) { - for (; t && t !== e; ) { - if (t.nodeName.toUpperCase() === "A" && t.hasAttribute("href")) return t; - t = Ee(t); - } -} -function Nt(t, e, n) { - let a; - try { - if (((a = new URL(t instanceof SVGAElement ? t.href.baseVal : t.href, document.baseURI)), n && a.hash.match(/^#[^/]/))) { - const o = location.hash.split("#")[1] || "/"; - a.hash = `#${o}${a.hash}`; - } - } catch {} - const r = t instanceof SVGAElement ? t.target.baseVal : t.target, - s = !a || !!r || Et(a, e, n) || (t.getAttribute("rel") || "").split(/\s+/).includes("external"), - i = (a == null ? void 0 : a.origin) === ht && t.hasAttribute("download"); - return { url: a, external: s, target: r, download: i }; -} -function pt(t) { - let e = null, - n = null, - a = null, - r = null, - s = null, - i = null, - o = t; - for (; o && o !== document.documentElement; ) - a === null && (a = M(o, "preload-code")), - r === null && (r = M(o, "preload-data")), - e === null && (e = M(o, "keepfocus")), - n === null && (n = M(o, "noscroll")), - s === null && (s = M(o, "reload")), - i === null && (i = M(o, "replacestate")), - (o = Ee(o)); - function c(l) { - switch (l) { - case "": - case "true": - return !0; - case "off": - case "false": - return !1; - default: - return; - } - } - return { preload_code: oe[a ?? "off"], preload_data: oe[r ?? "off"], keepfocus: c(e), noscroll: c(n), reload: c(s), replace_state: c(i) }; -} -function se(t) { - const e = Dt(t); - let n = !0; - function a() { - (n = !0), e.update((i) => i); - } - function r(i) { - (n = !1), e.set(i); - } - function s(i) { - let o; - return e.subscribe((c) => { - (o === void 0 || (n && c !== o)) && i((o = c)); - }); - } - return { notify: a, set: r, subscribe: s }; -} -const Re = { v: () => {} }; -function fn() { - const { set: t, subscribe: e } = Dt(!1); - let n; - async function a() { - clearTimeout(n); - try { - const r = await fetch(`${cn}/_app/version.json`, { headers: { pragma: "no-cache", "cache-control": "no-cache" } }); - if (!r.ok) return !1; - const i = (await r.json()).version !== Ge; - return i && (t(!0), Re.v(), clearTimeout(n)), i; - } catch { - return !1; - } - } - return { subscribe: e, check: a }; -} -function Et(t, e, n) { - return t.origin !== ht || !t.pathname.startsWith(e) ? !0 : n ? !(t.pathname === e + "/" || t.pathname === e + "/index.html" || (t.protocol === "file:" && t.pathname.replace(/\/[^/]+\.html?$/, "") === e)) : !1; -} -function Qn(t) {} -function ie(t) { - const e = hn(t), - n = new ArrayBuffer(e.length), - a = new DataView(n); - for (let r = 0; r < n.byteLength; r++) a.setUint8(r, e.charCodeAt(r)); - return n; -} -const un = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -function hn(t) { - t.length % 4 === 0 && (t = t.replace(/==?$/, "")); - let e = "", - n = 0, - a = 0; - for (let r = 0; r < t.length; r++) - (n <<= 6), (n |= un.indexOf(t[r])), (a += 6), a === 24 && ((e += String.fromCharCode((n & 16711680) >> 16)), (e += String.fromCharCode((n & 65280) >> 8)), (e += String.fromCharCode(n & 255)), (n = a = 0)); - return a === 12 ? ((n >>= 4), (e += String.fromCharCode(n))) : a === 18 && ((n >>= 2), (e += String.fromCharCode((n & 65280) >> 8)), (e += String.fromCharCode(n & 255))), e; -} -const dn = -1, - pn = -2, - gn = -3, - mn = -4, - _n = -5, - yn = -6; -function wn(t, e) { - if (typeof t == "number") return r(t, !0); - if (!Array.isArray(t) || t.length === 0) throw new Error("Invalid input"); - const n = t, - a = Array(n.length); - function r(s, i = !1) { - if (s === dn) return; - if (s === gn) return NaN; - if (s === mn) return 1 / 0; - if (s === _n) return -1 / 0; - if (s === yn) return -0; - if (i) throw new Error("Invalid input"); - if (s in a) return a[s]; - const o = n[s]; - if (!o || typeof o != "object") a[s] = o; - else if (Array.isArray(o)) - if (typeof o[0] == "string") { - const c = o[0], - l = e == null ? void 0 : e[c]; - if (l) return (a[s] = l(r(o[1]))); - switch (c) { - case "Date": - a[s] = new Date(o[1]); - break; - case "Set": - const h = new Set(); - a[s] = h; - for (let f = 1; f < o.length; f += 1) h.add(r(o[f])); - break; - case "Map": - const p = new Map(); - a[s] = p; - for (let f = 1; f < o.length; f += 2) p.set(r(o[f]), r(o[f + 1])); - break; - case "RegExp": - a[s] = new RegExp(o[1], o[2]); - break; - case "Object": - a[s] = Object(o[1]); - break; - case "BigInt": - a[s] = BigInt(o[1]); - break; - case "null": - const _ = Object.create(null); - a[s] = _; - for (let f = 1; f < o.length; f += 2) _[o[f]] = r(o[f + 1]); - break; - case "Int8Array": - case "Uint8Array": - case "Uint8ClampedArray": - case "Int16Array": - case "Uint16Array": - case "Int32Array": - case "Uint32Array": - case "Float32Array": - case "Float64Array": - case "BigInt64Array": - case "BigUint64Array": { - const f = globalThis[c], - m = o[1], - u = ie(m), - d = new f(u); - a[s] = d; - break; - } - case "ArrayBuffer": { - const f = o[1], - m = ie(f); - a[s] = m; - break; - } - default: - throw new Error(`Unknown type ${c}`); - } - } else { - const c = new Array(o.length); - a[s] = c; - for (let l = 0; l < o.length; l += 1) { - const h = o[l]; - h !== pn && (c[l] = r(h)); - } - } - else { - const c = {}; - a[s] = c; - for (const l in o) { - const h = o[l]; - c[l] = r(h); - } - } - return a[s]; - } - return r(0); -} -const Ie = new Set(["load", "prerender", "csr", "ssr", "trailingSlash", "config"]); -[...Ie]; -const vn = new Set([...Ie]); -[...vn]; -function bn(t) { - return t.filter((e) => e != null); -} -const kn = "x-sveltekit-invalidated", - An = "x-sveltekit-trailing-slash"; -function gt(t) { - return t instanceof kt || t instanceof Ft ? t.status : 500; -} -function En(t) { - return t instanceof Ft ? t.text : "Internal Error3"; -} -let U, Q, Pt; -const Sn = ne.toString().includes("$$") || /function \w+\(\) \{\}/.test(ne.toString()); -var nt, rt, at, ot, st, it, ct, lt, _e, ft, ye, ut, we; -Sn - ? ((U = { data: {}, form: null, error: null, params: {}, route: { id: null }, state: {}, status: -1, url: new URL("https://example.com") }), (Q = { current: null }), (Pt = { current: !1 })) - : ((U = new ((_e = class { - constructor() { - P(this, nt, C({})); - P(this, rt, C(null)); - P(this, at, C(null)); - P(this, ot, C({})); - P(this, st, C({ id: null })); - P(this, it, C({})); - P(this, ct, C(-1)); - P(this, lt, C(new URL("https://example.com"))); - } - get data() { - return N(b(this, nt)); - } - set data(e) { - O(b(this, nt), e); - } - get form() { - return N(b(this, rt)); - } - set form(e) { - O(b(this, rt), e); - } - get error() { - return N(b(this, at)); - } - set error(e) { - O(b(this, at), e); - } - get params() { - return N(b(this, ot)); - } - set params(e) { - O(b(this, ot), e); - } - get route() { - return N(b(this, st)); - } - set route(e) { - O(b(this, st), e); - } - get state() { - return N(b(this, it)); - } - set state(e) { - O(b(this, it), e); - } - get status() { - return N(b(this, ct)); - } - set status(e) { - O(b(this, ct), e); - } - get url() { - return N(b(this, lt)); - } - set url(e) { - O(b(this, lt), e); - } - }), - (nt = new WeakMap()), - (rt = new WeakMap()), - (at = new WeakMap()), - (ot = new WeakMap()), - (st = new WeakMap()), - (it = new WeakMap()), - (ct = new WeakMap()), - (lt = new WeakMap()), - _e)()), - (Q = new ((ye = class { - constructor() { - P(this, ft, C(null)); - } - get current() { - return N(b(this, ft)); - } - set current(e) { - O(b(this, ft), e); - } - }), - (ft = new WeakMap()), - ye)()), - (Pt = new ((we = class { - constructor() { - P(this, ut, C(!1)); - } - get current() { - return N(b(this, ut)); - } - set current(e) { - O(b(this, ut), e); - } - }), - (ut = new WeakMap()), - we)()), - (Re.v = () => (Pt.current = !0))); -function Rn(t) { - Object.assign(U, t); -} -const In = "/__data.json", - Un = ".html__data.json"; -function Ln(t) { - return t.endsWith(".html") ? t.replace(/\.html$/, Un) : t.replace(/\/$/, "") + In; -} -const ce = { - spanContext() { - return Tn; - }, - setAttribute() { - return this; - }, - setAttributes() { - return this; - }, - addEvent() { - return this; - }, - setStatus() { - return this; - }, - updateName() { - return this; - }, - end() { - return this; - }, - isRecording() { - return !1; - }, - recordException() { - return this; - }, - addLink() { - return this; - }, - addLinks() { - return this; - }, - }, - Tn = { traceId: "", spanId: "", traceFlags: 0 }, - { onMount: xn, tick: Pn } = qe, - Cn = new Set(["icon", "shortcut icon", "apple-touch-icon"]), - V = ve(ke) ?? {}, - tt = ve(be) ?? {}, - $ = { url: se({}), page: se({}), navigating: Dt(null), updated: fn() }; -function Mt(t) { - V[t] = At(); -} -function Nn(t, e) { - let n = t + 1; - for (; V[n]; ) delete V[n], (n += 1); - for (n = e + 1; tt[n]; ) delete tt[n], (n += 1); -} -function K(t) { - return (location.href = t.href), new Promise(() => {}); -} -async function Ue() { - if ("serviceWorker" in navigator) { - const t = await navigator.serviceWorker.getRegistration(x || "/"); - t && (await t.update()); - } -} -function le() {} -let Gt, Ot, mt, j, jt, k; -globalThis.__sveltekit_9k4bn8.data; -const _t = [], - yt = []; -let L = null; -const dt = new Map(), - Ht = new Set(), - On = new Set(), - z = new Set(); -let w = { branch: [], error: null, url: null }, - Kt = !1, - wt = !1, - fe = !0, - et = !1, - W = !1, - Le = !1, - Wt = !1, - Te, - S, - T, - F; -const J = new Set(), - ue = new Map(); -async function rr(t, e, n) { - var s, i, o, c; - document.URL !== location.href && (location.href = location.href), - (k = t), - await ((i = (s = t.hooks).init) == null ? void 0 : i.call(s)), - (Gt = sn(t)), - (j = document.documentElement), - (jt = e), - (Ot = t.nodes[0]), - (mt = t.nodes[1]), - Ot(), - mt(), - (S = (o = history.state) == null ? void 0 : o[G]), - (T = (c = history.state) == null ? void 0 : c[Z]), - S || ((S = T = Date.now()), history.replaceState({ ...history.state, [G]: S, [Z]: T }, "")); - const a = V[S]; - function r() { - a && ((history.scrollRestoration = "manual"), scrollTo(a.x, a.y)); - } - n ? (r(), await Kn(jt, n)) : (await X({ type: "enter", url: qt(k.hash ? Yn(new URL(location.href)) : location.href), replace_state: !0 }), r()), Hn(); -} -function jn() { - (_t.length = 0), (Wt = !1); -} -function xe(t) { - yt.some((e) => (e == null ? void 0 : e.snapshot)) && - (tt[t] = yt.map((e) => { - var n; - return (n = e == null ? void 0 : e.snapshot) == null ? void 0 : n.capture(); - })); -} -function Pe(t) { - var e; - (e = tt[t]) == null || - e.forEach((n, a) => { - var r, s; - (s = (r = yt[a]) == null ? void 0 : r.snapshot) == null || s.restore(n); - }); -} -function he() { - Mt(S), ae(ke, V), xe(T), ae(be, tt); -} -async function Yt(t, e, n, a) { - let r; - const s = await X({ - type: "goto", - url: qt(t), - keepfocus: e.keepFocus, - noscroll: e.noScroll, - replace_state: e.replaceState, - state: e.state, - redirect_count: n, - nav_token: a, - accept: () => { - e.invalidateAll && ((Wt = !0), (r = [...ue.keys()])), e.invalidate && e.invalidate.forEach(Gn); - }, - }); - return ( - e.invalidateAll && - re() - .then(re) - .then(() => { - ue.forEach(({ resource: i }, o) => { - var c; - r != null && r.includes(o) && ((c = i.refresh) == null || c.call(i)); - }); - }), - s - ); -} -async function $n(t) { - if (t.id !== (L == null ? void 0 : L.id)) { - const e = {}; - J.add(e), (L = { id: t.id, token: e, promise: Oe({ ...t, preload: e }).then((n) => (J.delete(e), n.type === "loaded" && n.state.error && (L = null), n)) }); - } - return L.promise; -} -async function Ct(t) { - var n; - const e = (n = await Rt(t, !1)) == null ? void 0 : n.route; - e && (await Promise.all([...e.layouts, e.leaf].map((a) => (a == null ? void 0 : a[1]())))); -} -function Ce(t, e, n) { - var r; - w = t.state; - const a = document.querySelector("style[data-sveltekit]"); - if ((a && a.remove(), Object.assign(U, t.props.page), (Te = new k.root({ target: e, props: { ...t.props, stores: $, components: yt }, hydrate: n, sync: !1 })), Pe(T), n)) { - const s = { from: null, to: { params: w.params, route: { id: ((r = w.route) == null ? void 0 : r.id) ?? null }, url: new URL(location.href) }, willUnload: !1, type: "enter", complete: Promise.resolve() }; - z.forEach((i) => i(s)); - } - wt = !0; -} -function vt({ url: t, params: e, branch: n, status: a, error: r, route: s, form: i }) { - let o = "never"; - if (x && (t.pathname === x || t.pathname === x + "/")) o = "always"; - else for (const f of n) (f == null ? void 0 : f.slash) !== void 0 && (o = f.slash); - (t.pathname = He(t.pathname, o)), (t.search = t.search); - const c = { type: "loaded", state: { url: t, params: e, branch: n, error: r, route: s }, props: { constructors: bn(n).map((f) => f.node.component), page: Zt(U) } }; - i !== void 0 && (c.props.form = i); - let l = {}, - h = !U, - p = 0; - for (let f = 0; f < Math.max(n.length, w.branch.length); f += 1) { - const m = n[f], - u = w.branch[f]; - (m == null ? void 0 : m.data) !== (u == null ? void 0 : u.data) && (h = !0), m && ((l = { ...l, ...m.data }), h && (c.props[`data_${p}`] = l), (p += 1)); - } - return ( - (!w.url || t.href !== w.url.href || w.error !== r || (i !== void 0 && i !== U.form) || h) && - (c.props.page = { error: r, params: e, route: { id: (s == null ? void 0 : s.id) ?? null }, state: {}, status: a, url: new URL(t), form: i ?? null, data: h ? l : U.data }), - c - ); -} -async function zt({ loader: t, parent: e, url: n, params: a, route: r, server_data_node: s }) { - var h, p, _; - let i = null, - o = !0; - const c = { dependencies: new Set(), params: new Set(), parent: !1, route: !1, url: !1, search_params: new Set() }, - l = await t(); - if ((h = l.universal) != null && h.load) { - let f = function (...u) { - for (const d of u) { - const { href: A } = new URL(d, n); - c.dependencies.add(A); - } - }; - const m = { - tracing: { enabled: !1, root: ce, current: ce }, - route: new Proxy(r, { get: (u, d) => (o && (c.route = !0), u[d]) }), - params: new Proxy(a, { get: (u, d) => (o && c.params.add(d), u[d]) }), - data: (s == null ? void 0 : s.data) ?? null, - url: Ye( - n, - () => { - o && (c.url = !0); - }, - (u) => { - o && c.search_params.add(u); - }, - k.hash - ), - async fetch(u, d) { - u instanceof Request && - (d = { - body: u.method === "GET" || u.method === "HEAD" ? void 0 : await u.blob(), - cache: u.cache, - credentials: u.credentials, - headers: [...u.headers].length > 0 ? (u == null ? void 0 : u.headers) : void 0, - integrity: u.integrity, - keepalive: u.keepalive, - method: u.method, - mode: u.mode, - redirect: u.redirect, - referrer: u.referrer, - referrerPolicy: u.referrerPolicy, - signal: u.signal, - ...d, - }); - const { resolved: A, promise: R } = Ne(u, d, n); - return o && f(A.href), R; - }, - setHeaders: () => {}, - depends: f, - parent() { - return o && (c.parent = !0), e(); - }, - untrack(u) { - o = !1; - try { - return u(); - } finally { - o = !0; - } - }, - }; - i = (await l.universal.load.call(null, m)) ?? null; - } - return { - node: l, - loader: t, - server: s, - universal: (p = l.universal) != null && p.load ? { type: "data", data: i, uses: c } : null, - data: i ?? (s == null ? void 0 : s.data) ?? null, - slash: ((_ = l.universal) == null ? void 0 : _.trailingSlash) ?? (s == null ? void 0 : s.slash), - }; -} -function Ne(t, e, n) { - let a = t instanceof Request ? t.url : t; - const r = new URL(a, n); - r.origin === n.origin && (a = r.href.slice(n.origin.length)); - const s = wt ? tn(a, r.href, e) : Qe(a, e); - return { resolved: r, promise: s }; -} -function de(t, e, n, a, r, s) { - if (Wt) return !0; - if (!r) return !1; - if ((r.parent && t) || (r.route && e) || (r.url && n)) return !0; - for (const i of r.search_params) if (a.has(i)) return !0; - for (const i of r.params) if (s[i] !== w.params[i]) return !0; - for (const i of r.dependencies) if (_t.some((o) => o(new URL(i)))) return !0; - return !1; -} -function Jt(t, e) { - return (t == null ? void 0 : t.type) === "data" ? t : (t == null ? void 0 : t.type) === "skip" ? e ?? null : null; -} -function Dn(t, e) { - if (!t) return new Set(e.searchParams.keys()); - const n = new Set([...t.searchParams.keys(), ...e.searchParams.keys()]); - for (const a of n) { - const r = t.searchParams.getAll(a), - s = e.searchParams.getAll(a); - r.every((i) => s.includes(i)) && s.every((i) => r.includes(i)) && n.delete(a); - } - return n; -} -function pe({ error: t, url: e, route: n, params: a }) { - return { type: "loaded", state: { error: t, url: e, route: n, params: a, branch: [] }, props: { page: Zt(U), constructors: [] } }; -} -async function Oe({ id: t, invalidating: e, url: n, params: a, route: r, preload: s }) { - if ((L == null ? void 0 : L.id) === t) return J.delete(L.token), L.promise; - const { errors: i, layouts: o, leaf: c } = r, - l = [...o, c]; - i.forEach((g) => (g == null ? void 0 : g().catch(() => {}))), l.forEach((g) => (g == null ? void 0 : g[1]().catch(() => {}))); - let h = null; - const p = w.url ? t !== bt(w.url) : !1, - _ = w.route ? r.id !== w.route.id : !1, - f = Dn(w.url, n); - let m = !1; - const u = l.map((g, y) => { - var D; - const v = w.branch[y], - E = !!(g != null && g[0]) && ((v == null ? void 0 : v.loader) !== g[1] || de(m, _, p, f, (D = v.server) == null ? void 0 : D.uses, a)); - return E && (m = !0), E; - }); - if (u.some(Boolean)) { - try { - h = await De(n, u); - } catch (g) { - const y = await H(g, { url: n, params: a, route: { id: t } }); - return J.has(s) ? pe({ error: y, url: n, params: a, route: r }) : St({ status: gt(g), error: y, url: n, route: r }); - } - if (h.type === "redirect") return h; - } - const d = h == null ? void 0 : h.nodes; - let A = !1; - const R = l.map(async (g, y) => { - var It; - if (!g) return; - const v = w.branch[y], - E = d == null ? void 0 : d[y]; - if ((!E || E.type === "skip") && g[1] === (v == null ? void 0 : v.loader) && !de(A, _, p, f, (It = v.universal) == null ? void 0 : It.uses, a)) return v; - if (((A = !0), (E == null ? void 0 : E.type) === "error")) throw E; - return zt({ - loader: g[1], - url: n, - params: a, - route: r, - parent: async () => { - var te; - const Qt = {}; - for (let Ut = 0; Ut < y; Ut += 1) Object.assign(Qt, (te = await R[Ut]) == null ? void 0 : te.data); - return Qt; - }, - server_data_node: Jt(E === void 0 && g[0] ? { type: "skip" } : E ?? null, g[0] ? (v == null ? void 0 : v.server) : void 0), - }); - }); - for (const g of R) g.catch(() => {}); - const I = []; - for (let g = 0; g < l.length; g += 1) - if (l[g]) - try { - I.push(await R[g]); - } catch (y) { - if (y instanceof Bt) return { type: "redirect", location: y.location }; - if (J.has(s)) return pe({ error: await H(y, { params: a, url: n, route: { id: r.id } }), url: n, params: a, route: r }); - let v = gt(y), - E; - if (d != null && d.includes(y)) (v = y.status ?? v), (E = y.error); - else if (y instanceof kt) E = y.body; - else { - if (await $.updated.check()) return await Ue(), await K(n); - E = await H(y, { params: a, url: n, route: { id: r.id } }); - } - const D = await Bn(g, I, i); - return D ? vt({ url: n, params: a, branch: I.slice(0, D.idx).concat(D.node), status: v, error: E, route: r }) : await $e(n, { id: r.id }, E, v); - } - else I.push(void 0); - return vt({ url: n, params: a, branch: I, status: 200, error: null, route: r, form: e ? void 0 : null }); -} -async function Bn(t, e, n) { - for (; t--; ) - if (n[t]) { - let a = t; - for (; !e[a]; ) a -= 1; - try { - return { idx: a + 1, node: { node: await n[t](), loader: n[t], data: {}, server: null, universal: null } }; - } catch { - continue; - } - } -} -async function St({ status: t, error: e, url: n, route: a }) { - const r = {}; - let s = null; - if (k.server_loads[0] === 0) - try { - const o = await De(n, [!0]); - if (o.type !== "data" || (o.nodes[0] && o.nodes[0].type !== "data")) throw 0; - s = o.nodes[0] ?? null; - } catch { - (n.origin !== ht || n.pathname !== location.pathname || Kt) && (await K(n)); - } - try { - const o = await zt({ loader: Ot, url: n, params: r, route: a, parent: () => Promise.resolve({}), server_data_node: Jt(s) }), - c = { node: await mt(), loader: mt, universal: null, server: null, data: null }; - return vt({ url: n, params: r, branch: [o, c], status: t, error: e, route: null }); - } catch (o) { - if (o instanceof Bt) return Yt(new URL(o.location, location.href), {}, 0); - throw o; - } -} -async function Fn(t) { - const e = t.href; - if (dt.has(e)) return dt.get(e); - let n; - try { - const a = (async () => { - let r = (await k.hooks.reroute({ url: new URL(t), fetch: async (s, i) => Ne(s, i, t).promise })) ?? t; - if (typeof r == "string") { - const s = new URL(t); - k.hash ? (s.hash = r) : (s.pathname = r), (r = s); - } - return r; - })(); - dt.set(e, a), (n = await a); - } catch { - dt.delete(e); - return; - } - return n; -} -async function Rt(t, e) { - if (t && !Et(t, x, k.hash)) { - const n = await Fn(t); - if (!n) return; - const a = Vn(n); - for (const r of Gt) { - const s = r.exec(a); - if (s) return { id: bt(t), invalidating: e, route: r, params: We(s), url: t }; - } - } -} -function Vn(t) { - return Ke(k.hash ? t.hash.replace(/^#/, "").replace(/[?#].+/, "") : t.pathname.slice(x.length)) || "/"; -} -function bt(t) { - return (k.hash ? t.hash.replace(/^#/, "") : t.pathname) + t.search; -} -function je({ url: t, type: e, intent: n, delta: a }) { - let r = !1; - const s = Xt(w, n, t, e); - a !== void 0 && (s.navigation.delta = a); - const i = { - ...s.navigation, - cancel: () => { - (r = !0), s.reject(new Error("navigation cancelled")); - }, - }; - return et || Ht.forEach((o) => o(i)), r ? null : s; -} -async function X({ type: t, url: e, popped: n, keepfocus: a, noscroll: r, replace_state: s, state: i = {}, redirect_count: o = 0, nav_token: c = {}, accept: l = le, block: h = le }) { - const p = F; - F = c; - const _ = await Rt(e, !1), - f = t === "enter" ? Xt(w, _, e, t) : je({ url: e, type: t, delta: n == null ? void 0 : n.delta, intent: _ }); - if (!f) { - h(), F === c && (F = p); - return; - } - const m = S, - u = T; - l(), (et = !0), wt && f.navigation.type !== "enter" && $.navigating.set((Q.current = f.navigation)); - let d = _ && (await Oe(_)); - if (!d) { - if (Et(e, x, k.hash)) return await K(e); - d = await $e(e, { id: null }, await H(new Ft(404, "Not Found", `Not found: ${e.pathname}`), { url: e, params: {}, route: { id: null } }), 404); - } - if (((e = (_ == null ? void 0 : _.url) || e), F !== c)) return f.reject(new Error("navigation aborted")), !1; - if (d.type === "redirect") - if (o >= 20) d = await St({ status: 500, error: await H(new Error("Redirect loop"), { url: e, params: {}, route: { id: null } }), url: e, route: { id: null } }); - else return await Yt(new URL(d.location, e).href, {}, o + 1, c), !1; - else d.props.page.status >= 400 && (await $.updated.check()) && (await Ue(), await K(e)); - if ((jn(), Mt(m), xe(u), d.props.page.url.pathname !== e.pathname && (e.pathname = d.props.page.url.pathname), (i = n ? n.state : i), !n)) { - const g = s ? 0 : 1, - y = { [G]: (S += g), [Z]: (T += g), [Ae]: i }; - (s ? history.replaceState : history.pushState).call(history, y, "", e), s || Nn(S, T); - } - if (((L = null), (d.props.page.state = i), wt)) { - const g = (await Promise.all(Array.from(On, (y) => y(f.navigation)))).filter((y) => typeof y == "function"); - if (g.length > 0) { - let y = function () { - g.forEach((v) => { - z.delete(v); - }); - }; - g.push(y), - g.forEach((v) => { - z.add(v); - }); - } - (w = d.state), d.props.page && (d.props.page.url = e), Te.$set(d.props), Rn(d.props.page), (Le = !0); - } else Ce(d, jt, !1); - const { activeElement: A } = document; - await Pn(); - const R = n ? n.scroll : r ? At() : null; - if (fe) { - const g = e.hash && document.getElementById(Fe(e)); - R ? scrollTo(R.x, R.y) : g ? g.scrollIntoView() : scrollTo(0, 0); - } - const I = document.activeElement !== A && document.activeElement !== document.body; - !a && !I && Wn(e), (fe = !0), d.props.page && Object.assign(U, d.props.page), (et = !1), t === "popstate" && Pe(T), f.fulfil(void 0), z.forEach((g) => g(f.navigation)), $.navigating.set((Q.current = null)); -} -async function $e(t, e, n, a) { - return t.origin === ht && t.pathname === location.pathname && !Kt ? await St({ status: a, error: n, url: t, route: e }) : await K(t); -} -function qn() { - let t, e, n; - j.addEventListener("mousemove", (o) => { - const c = o.target; - clearTimeout(t), - (t = setTimeout(() => { - s(c, B.hover); - }, 20)); - }); - function a(o) { - o.defaultPrevented || s(o.composedPath()[0], B.tap); - } - j.addEventListener("mousedown", a), j.addEventListener("touchstart", a, { passive: !0 }); - const r = new IntersectionObserver( - (o) => { - for (const c of o) c.isIntersecting && (Ct(new URL(c.target.href)), r.unobserve(c.target)); - }, - { threshold: 0 } - ); - async function s(o, c) { - const l = Se(o, j), - h = l === e && c >= n; - if (!l || h) return; - const { url: p, external: _, download: f } = Nt(l, x, k.hash); - if (_ || f) return; - const m = pt(l), - u = p && bt(w.url) === bt(p); - if (!(m.reload || u)) - if (c <= m.preload_data) { - (e = l), (n = B.tap); - const d = await Rt(p, !1); - if (!d) return; - $n(d); - } else c <= m.preload_code && ((e = l), (n = c), Ct(p)); - } - function i() { - r.disconnect(); - for (const o of j.querySelectorAll("a")) { - const { url: c, external: l, download: h } = Nt(o, x, k.hash); - if (l || h) continue; - const p = pt(o); - p.reload || (p.preload_code === B.viewport && r.observe(o), p.preload_code === B.eager && Ct(c)); - } - } - z.add(i), i(); -} -function H(t, e) { - if (t instanceof kt) return t.body; - const n = gt(t), - a = En(t); - return k.hooks.handleError({ error: t, event: e, status: n, message: a }) ?? { message: a }; -} -function Mn(t, e) { - xn( - () => ( - t.add(e), - () => { - t.delete(e); - } - ) - ); -} -function ar(t) { - Mn(Ht, t); -} -function or(t, e = {}) { - return (t = new URL(qt(t))), t.origin !== ht ? Promise.reject(new Error("goto: invalid URL")) : Yt(t, e, 0); -} -function Gn(t) { - if (typeof t == "function") _t.push(t); - else { - const { href: e } = new URL(t, location.href); - _t.push((n) => n.href === e); - } -} -function Hn() { - var e; - (history.scrollRestoration = "manual"), - addEventListener("beforeunload", (n) => { - let a = !1; - if ((he(), !et)) { - const r = Xt(w, void 0, null, "leave"), - s = { - ...r.navigation, - cancel: () => { - (a = !0), r.reject(new Error("navigation cancelled")); - }, - }; - Ht.forEach((i) => i(s)); - } - a ? (n.preventDefault(), (n.returnValue = "")) : (history.scrollRestoration = "auto"); - }), - addEventListener("visibilitychange", () => { - document.visibilityState === "hidden" && he(); - }), - ((e = navigator.connection) != null && e.saveData) || qn(), - j.addEventListener("click", async (n) => { - if (n.button || n.which !== 1 || n.metaKey || n.ctrlKey || n.shiftKey || n.altKey || n.defaultPrevented) return; - const a = Se(n.composedPath()[0], j); - if (!a) return; - const { url: r, external: s, target: i, download: o } = Nt(a, x, k.hash); - if (!r) return; - if (i === "_parent" || i === "_top") { - if (window.parent !== window) return; - } else if (i && i !== "_self") return; - const c = pt(a); - if ((!(a instanceof SVGAElement) && r.protocol !== location.protocol && !(r.protocol === "https:" || r.protocol === "http:")) || o) return; - const [h, p] = (k.hash ? r.hash.replace(/^#/, "") : r.href).split("#"), - _ = h === Tt(location); - if (s || (c.reload && (!_ || !p))) { - je({ url: r, type: "link" }) ? (et = !0) : n.preventDefault(); - return; - } - if (p !== void 0 && _) { - const [, f] = w.url.href.split("#"); - if (f === p) { - if ((n.preventDefault(), p === "" || (p === "top" && a.ownerDocument.getElementById("top") === null))) window.scrollTo({ top: 0 }); - else { - const m = a.ownerDocument.getElementById(decodeURIComponent(p)); - m && (m.scrollIntoView(), m.focus()); - } - return; - } - if (((W = !0), Mt(S), t(r), !c.replace_state)) return; - W = !1; - } - n.preventDefault(), - await new Promise((f) => { - requestAnimationFrame(() => { - setTimeout(f, 0); - }), - setTimeout(f, 100); - }), - await X({ type: "link", url: r, keepfocus: c.keepfocus, noscroll: c.noscroll, replace_state: c.replace_state ?? r.href === location.href }); - }), - j.addEventListener("submit", (n) => { - if (n.defaultPrevented) return; - const a = HTMLFormElement.prototype.cloneNode.call(n.target), - r = n.submitter; - if (((r == null ? void 0 : r.formTarget) || a.target) === "_blank" || ((r == null ? void 0 : r.formMethod) || a.method) !== "get") return; - const o = new URL(((r == null ? void 0 : r.hasAttribute("formaction")) && (r == null ? void 0 : r.formAction)) || a.action); - if (Et(o, x, !1)) return; - const c = n.target, - l = pt(c); - if (l.reload) return; - n.preventDefault(), n.stopPropagation(); - const h = new FormData(c), - p = r == null ? void 0 : r.getAttribute("name"); - p && h.append(p, (r == null ? void 0 : r.getAttribute("value")) ?? ""), - (o.search = new URLSearchParams(h).toString()), - X({ type: "form", url: o, keepfocus: l.keepfocus, noscroll: l.noscroll, replace_state: l.replace_state ?? o.href === location.href }); - }), - addEventListener("popstate", async (n) => { - var a; - if (!$t) { - if ((a = n.state) != null && a[G]) { - const r = n.state[G]; - if (((F = {}), r === S)) return; - const s = V[r], - i = n.state[Ae] ?? {}, - o = new URL(n.state[ln] ?? location.href), - c = n.state[Z], - l = w.url ? Tt(location) === Tt(w.url) : !1; - if (c === T && (Le || l)) { - i !== U.state && (U.state = i), t(o), (V[S] = At()), s && scrollTo(s.x, s.y), (S = r); - return; - } - const p = r - S; - await X({ - type: "popstate", - url: o, - popped: { state: i, scroll: s, delta: p }, - accept: () => { - (S = r), (T = c); - }, - block: () => { - history.go(-p); - }, - nav_token: F, - }); - } else if (!W) { - const r = new URL(location.href); - t(r), k.hash && location.reload(); - } - } - }), - addEventListener("hashchange", () => { - W && ((W = !1), history.replaceState({ ...history.state, [G]: ++S, [Z]: T }, "", location.href)); - }); - for (const n of document.querySelectorAll("link")) Cn.has(n.rel) && (n.href = n.href); - addEventListener("pageshow", (n) => { - n.persisted && $.navigating.set((Q.current = null)); - }); - function t(n) { - (w.url = U.url = n), $.page.set(Zt(U)), $.page.notify(); - } -} -async function Kn(t, { status: e = 200, error: n, node_ids: a, params: r, route: s, server_route: i, data: o, form: c }) { - Kt = !0; - const l = new URL(location.href); - let h; - ({ params: r = {}, route: s = { id: null } } = (await Rt(l, !1)) || {}), (h = Gt.find(({ id: f }) => f === s.id)); - let p, - _ = !0; - try { - const f = a.map(async (u, d) => { - const A = o[d]; - return ( - A != null && A.uses && (A.uses = Be(A.uses)), - zt({ - loader: k.nodes[u], - url: l, - params: r, - route: s, - parent: async () => { - const R = {}; - for (let I = 0; I < d; I += 1) Object.assign(R, (await f[I]).data); - return R; - }, - server_data_node: Jt(A), - }) - ); - }), - m = await Promise.all(f); - if (h) { - const u = h.layouts; - for (let d = 0; d < u.length; d++) u[d] || m.splice(d, 0, void 0); - } - p = vt({ url: l, params: r, branch: m, status: e, error: n, form: c, route: h ?? null }); - } catch (f) { - if (f instanceof Bt) { - await K(new URL(f.location, location.href)); - return; - } - (p = await St({ status: gt(f), error: await H(f, { url: l, params: r, route: s }), url: l, route: s })), (t.textContent = ""), (_ = !1); - } - p.props.page && (p.props.page.state = {}), Ce(p, t, _); -} -async function De(t, e) { - var s; - const n = new URL(t); - (n.pathname = Ln(t.pathname)), t.pathname.endsWith("/") && n.searchParams.append(An, "1"), n.searchParams.append(kn, e.map((i) => (i ? "1" : "0")).join("")); - const a = window.fetch, - r = await a(n.href, {}); - if (!r.ok) { - let i; - throw ((s = r.headers.get("content-type")) != null && s.includes("application/json") ? (i = await r.json()) : r.status === 404 ? (i = "Not Found") : r.status === 500 && (i = "Internal Error4"), new kt(r.status, i)); - } - return new Promise(async (i) => { - var p; - const o = new Map(), - c = r.body.getReader(); - function l(_) { - return wn(_, { - ...k.decoders, - Promise: (f) => - new Promise((m, u) => { - o.set(f, { fulfil: m, reject: u }); - }), - }); - } - let h = ""; - for (;;) { - const { done: _, value: f } = await c.read(); - if (_ && !h) break; - for ( - h += - !f && h - ? ` -` - : Je.decode(f, { stream: !0 }); - ; - - ) { - const m = h.indexOf(` -`); - if (m === -1) break; - const u = JSON.parse(h.slice(0, m)); - if (((h = h.slice(m + 1)), u.type === "redirect")) return i(u); - if (u.type === "data") - (p = u.nodes) == null || - p.forEach((d) => { - (d == null ? void 0 : d.type) === "data" && ((d.uses = Be(d.uses)), (d.data = l(d.data))); - }), - i(u); - else if (u.type === "chunk") { - const { id: d, data: A, error: R } = u, - I = o.get(d); - o.delete(d), R ? I.reject(l(R)) : I.fulfil(l(A)); - } - } - } - }); -} -function Be(t) { - return { - dependencies: new Set((t == null ? void 0 : t.dependencies) ?? []), - params: new Set((t == null ? void 0 : t.params) ?? []), - parent: !!(t != null && t.parent), - route: !!(t != null && t.route), - url: !!(t != null && t.url), - search_params: new Set((t == null ? void 0 : t.search_params) ?? []), - }; -} -let $t = !1; -function Wn(t) { - const e = document.querySelector("[autofocus]"); - if (e) e.focus(); - else { - const n = Fe(t); - if (n && document.getElementById(n)) { - const { x: r, y: s } = At(); - setTimeout(() => { - const i = history.state; - ($t = !0), location.replace(`#${n}`), k.hash && location.replace(t.hash), history.replaceState(i, "", t.hash), scrollTo(r, s), ($t = !1); - }); - } else { - const r = document.body, - s = r.getAttribute("tabindex"); - (r.tabIndex = -1), r.focus({ preventScroll: !0, focusVisible: !1 }), s !== null ? r.setAttribute("tabindex", s) : r.removeAttribute("tabindex"); - } - const a = getSelection(); - if (a && a.type !== "None") { - const r = []; - for (let s = 0; s < a.rangeCount; s += 1) r.push(a.getRangeAt(s)); - setTimeout(() => { - if (a.rangeCount === r.length) { - for (let s = 0; s < a.rangeCount; s += 1) { - const i = r[s], - o = a.getRangeAt(s); - if (i.commonAncestorContainer !== o.commonAncestorContainer || i.startContainer !== o.startContainer || i.endContainer !== o.endContainer || i.startOffset !== o.startOffset || i.endOffset !== o.endOffset) return; - } - a.removeAllRanges(); - } - }); - } - } -} -function Xt(t, e, n, a) { - var c, l; - let r, s; - const i = new Promise((h, p) => { - (r = h), (s = p); - }); - return ( - i.catch(() => {}), - { - navigation: { - from: { params: t.params, route: { id: ((c = t.route) == null ? void 0 : c.id) ?? null }, url: t.url }, - to: n && { params: (e == null ? void 0 : e.params) ?? null, route: { id: ((l = e == null ? void 0 : e.route) == null ? void 0 : l.id) ?? null }, url: n }, - willUnload: !e, - type: a, - complete: i, - }, - fulfil: r, - reject: s, - } - ); -} -function Zt(t) { - return { data: t.data, error: t.error, form: t.form, params: t.params, route: t.route, state: t.state, status: t.status, url: t.url }; -} -function Yn(t) { - const e = new URL(t); - return (e.hash = decodeURIComponent(t.hash)), e; -} -function Fe(t) { - let e; - if (k.hash) { - const [, , n] = t.hash.split("#", 3); - e = n ?? ""; - } else e = t.hash.slice(1); - return decodeURIComponent(e); -} -export { rr as a, ar as b, or as g, Qn as l, U as p, $ as s }; diff --git a/frontend-backup/_app/immutable/chunks/LGRbXsL1.js b/frontend-backup/_app/immutable/chunks/LGRbXsL1.js new file mode 100644 index 0000000..19c1707 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/LGRbXsL1.js @@ -0,0 +1,40 @@ +import { g as o } from "./CV9xcpLq.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + n = new e.Error().stack; + n && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[n] = "6cf8a249-5900-4491-a606-2fb2ee92a24f"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-6cf8a249-5900-4491-a606-2fb2ee92a24f")); + })(); +} catch {} +const t = () => "Export CSV", + f = () => "Exportar CSV", + l = (e = {}, n = {}) => ((n.locale ?? o()) === "en" ? t() : f()); +export { l as e }; diff --git a/frontend-backup/_app/immutable/chunks/P77cUGnY.js b/frontend-backup/_app/immutable/chunks/P77cUGnY.js new file mode 100644 index 0000000..99dda62 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/P77cUGnY.js @@ -0,0 +1,73 @@ +import { + j as r, + i as h, + as as u, + h as a, + U as y, + ak as _, + a7 as i, + T as f, + N as o, + o as s, + O as c, +} from "./CMvZtFtm.js"; +(function () { + try { + var n = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + n.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var n = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + d = new n.Error().stack; + d && + ((n._sentryDebugIds = n._sentryDebugIds || {}), + (n._sentryDebugIds[d] = "83634668-25a7-4757-b236-0f768368991f"), + (n._sentryDebugIdIdentifier = + "sentry-dbid-83634668-25a7-4757-b236-0f768368991f")); + })(); +} catch {} +let e; +function g() { + e = void 0; +} +function p(n) { + let d = null, + l = a; + var t; + if (a) { + for ( + d = s, e === void 0 && (e = c(document.head)); + e !== null && (e.nodeType !== y || e.data !== _); + + ) + e = i(e); + e === null ? f(!1) : (e = o(i(e))); + } + a || (t = document.head.appendChild(r())); + try { + h(() => n(t), u); + } finally { + l && (f(!0), (e = s), o(d)); + } +} +export { p as h, g as r }; diff --git a/frontend-backup/_app/immutable/chunks/U908S-6f.js b/frontend-backup/_app/immutable/chunks/U908S-6f.js deleted file mode 100644 index d2bfca2..0000000 --- a/frontend-backup/_app/immutable/chunks/U908S-6f.js +++ /dev/null @@ -1,231 +0,0 @@ -import { - i as ee, - g as ue, - H as ae, - I as X, - h as D, - J as te, - e as ve, - A as z, - K as de, - L as _e, - M as oe, - N as k, - O as g, - m as O, - P as ce, - Q as he, - j as J, - l as me, - R as V, - T as Y, - k as pe, - U as y, - V as Ee, - W as j, - X as re, - Y as Te, - Z as ne, - n as Ae, - _ as Ie, - $ as B, - G as Ne, - a0 as fe, - a1 as we, - a2 as xe, - a3 as Ce, - a4 as Me, - a5 as De, - a6 as He, -} from "./DUoKDNpf.js"; -let F = null; -function Le(i, n) { - return n; -} -function Re(i, n, e) { - for (var u = i.items, t = [], v = n.length, s = 0; s < v; s++) Ce(n[s].e, t, !0); - var c = v > 0 && t.length === 0 && e !== null; - if (c) { - var T = e.parentNode; - Me(T), T.append(e), u.clear(), w(i, n[0].prev, n[v - 1].next); - } - De(t, () => { - for (var E = 0; E < v; E++) { - var _ = n[E]; - c || (u.delete(_.k), w(i, _.prev, _.next)), fe(_.e, !c); - } - }); -} -function be(i, n, e, u, t, v = null) { - var s = i, - c = { flags: n, items: new Map(), first: null }, - T = (n & ae) !== 0; - if (T) { - var E = i; - s = D ? X(te(E)) : E.appendChild(ee()); - } - D && ve(); - var _ = null, - C = !1, - A = new Map(), - H = de(() => { - var d = e(); - return Te(d) ? d : d == null ? [] : re(d); - }), - f, - m; - function r() { - Se(m, f, c, A, s, t, n, u, e), - v !== null && - (f.length === 0 - ? _ - ? ne(_) - : (_ = J(() => v(s))) - : _ !== null && - Ae(_, () => { - _ = null; - })); - } - ue(() => { - m ?? (m = He), (f = z(H)); - var d = f.length; - if (C && d === 0) return; - C = d === 0; - let p = !1; - if (D) { - var I = _e(s) === oe; - I !== (d === 0) && ((s = k()), X(s), g(!1), (p = !0)); - } - if (D) { - for (var x = null, o, a = 0; a < d; a++) { - if (O.nodeType === ce && O.data === he) { - (s = O), (p = !0), g(!1); - break; - } - var l = f[a], - h = u(l, a); - (o = K(O, c, x, null, l, h, a, t, n, e)), c.items.set(h, o), (x = o); - } - d > 0 && X(k()); - } - if (D) d === 0 && v && (_ = J(() => v(s))); - else if (me()) { - var R = new Set(), - L = pe; - for (a = 0; a < d; a += 1) { - (l = f[a]), (h = u(l, a)); - var M = c.items.get(h) ?? A.get(h); - M ? (n & (V | Y)) !== 0 && le(M, l, a, n) : ((o = K(null, c, null, null, l, h, a, t, n, e, !0)), A.set(h, o)), R.add(h); - } - for (const [N, b] of c.items) R.has(N) || L.skipped_effects.add(b.e); - L.add_callback(r); - } else r(); - p && g(!0), z(H); - }), - D && (s = O); -} -function Se(i, n, e, u, t, v, s, c, T) { - var P, Q, W, Z; - var E = (s & we) !== 0, - _ = (s & (V | Y)) !== 0, - C = n.length, - A = e.items, - H = e.first, - f = H, - m, - r = null, - d, - p = [], - I = [], - x, - o, - a, - l; - if (E) for (l = 0; l < C; l += 1) (x = n[l]), (o = c(x, l)), (a = A.get(o)), a !== void 0 && ((P = a.a) == null || P.measure(), (d ?? (d = new Set())).add(a)); - for (l = 0; l < C; l += 1) { - if (((x = n[l]), (o = c(x, l)), (a = A.get(o)), a === void 0)) { - var h = u.get(o); - if (h !== void 0) { - u.delete(o), A.set(o, h); - var R = r ? r.next : f; - w(e, r, h), w(e, h, R), G(h, R, t), (r = h); - } else { - var L = f ? f.e.nodes_start : t; - r = K(L, e, r, r === null ? e.first : r.next, x, o, l, v, s, T); - } - A.set(o, r), (p = []), (I = []), (f = r.next); - continue; - } - if ((_ && le(a, x, l, s), (a.e.f & B) !== 0 && (ne(a.e), E && ((Q = a.a) == null || Q.unfix(), (d ?? (d = new Set())).delete(a))), a !== f)) { - if (m !== void 0 && m.has(a)) { - if (p.length < I.length) { - var M = I[0], - N; - r = M.prev; - var b = p[0], - q = p[p.length - 1]; - for (N = 0; N < p.length; N += 1) G(p[N], M, t); - for (N = 0; N < I.length; N += 1) m.delete(I[N]); - w(e, b.prev, q.next), w(e, r, b), w(e, q, M), (f = M), (r = q), (l -= 1), (p = []), (I = []); - } else m.delete(a), G(a, f, t), w(e, a.prev, a.next), w(e, a, r === null ? e.first : r.next), w(e, r, a), (r = a); - continue; - } - for (p = [], I = []; f !== null && f.k !== o; ) (f.e.f & B) === 0 && (m ?? (m = new Set())).add(f), I.push(f), (f = f.next); - if (f === null) continue; - a = f; - } - p.push(a), (r = a), (f = a.next); - } - if (f !== null || m !== void 0) { - for (var S = m === void 0 ? [] : re(m); f !== null; ) (f.e.f & B) === 0 && S.push(f), (f = f.next); - var U = S.length; - if (U > 0) { - var ie = (s & ae) !== 0 && C === 0 ? t : null; - if (E) { - for (l = 0; l < U; l += 1) (W = S[l].a) == null || W.measure(); - for (l = 0; l < U; l += 1) (Z = S[l].a) == null || Z.fix(); - } - Re(e, S, ie); - } - } - E && - Ne(() => { - var $; - if (d !== void 0) for (a of d) ($ = a.a) == null || $.apply(); - }), - (i.first = e.first && e.first.e), - (i.last = r && r.e); - for (var se of u.values()) fe(se.e); - u.clear(); -} -function le(i, n, e, u) { - (u & V) !== 0 && y(i.v, n), (u & Y) !== 0 ? y(i.i, e) : (i.i = e); -} -function K(i, n, e, u, t, v, s, c, T, E, _) { - var C = F, - A = (T & V) !== 0, - H = (T & Ie) === 0, - f = A ? (H ? Ee(t, !1, !1) : j(t)) : t, - m = (T & Y) === 0 ? s : j(s), - r = { i: m, v: f, k: v, a: null, e: null, prev: e, next: u }; - F = r; - try { - if (i === null) { - var d = document.createDocumentFragment(); - d.append((i = ee())); - } - return (r.e = J(() => c(i, f, m, E), D)), (r.e.prev = e && e.e), (r.e.next = u && u.e), e === null ? _ || (n.first = r) : ((e.next = r), (e.e.next = r.e)), u !== null && ((u.prev = r), (u.e.prev = r.e)), r; - } finally { - F = C; - } -} -function G(i, n, e) { - for (var u = i.next ? i.next.e.nodes_start : e, t = n ? n.e.nodes_start : e, v = i.e.nodes_start; v !== null && v !== u; ) { - var s = xe(v); - t.before(v), (v = s); - } -} -function w(i, n, e) { - n === null ? (i.first = e) : ((n.next = e), (n.e.next = e && e.e)), e !== null && ((e.prev = n), (e.e.prev = n && n.e)); -} -export { F as c, be as e, Le as i }; diff --git a/frontend-backup/_app/immutable/chunks/Y9es74tr.js b/frontend-backup/_app/immutable/chunks/Y9es74tr.js deleted file mode 100644 index 542ca76..0000000 --- a/frontend-backup/_app/immutable/chunks/Y9es74tr.js +++ /dev/null @@ -1,438 +0,0 @@ -import { - bb as z, - bc as D, - ba as P, - g as G, - h as A, - e as U, - i as W, - j, - k as K, - l as Q, - m as J, - aC as V, - n as X, - a6 as Y, - bd as tt, - be as F, - aP as rt, - G as at, - ap as C, - E as it, - bf as et, - bg as st, - D as nt, - x as ot, - bh as ft, - bi as vt, - q as Z, - b as $, - aS as ct, - a as lt -} from "./DUoKDNpf.js"; -import { - a as ht -} from "./g8c1BvYP.js"; -import { - c as ut -} from "./U908S-6f.js"; -import { - g as L -} from "./C5GsJ62f.js"; -import "./Bzak7iHL.js"; -import { - a as y -} from "./B1GmkH4o.js"; -import { - r as M, - i as dt -} from "./5NasrULQ.js"; - -function Lt(r, t, a) { - A && U(); - var i = r, - e = V, - o, n, s = null, - f = z() ? D : P; - - function u() { - o && X(o), s !== null && (s.lastChild.remove(), i.before(s), s = null), o = n - } - G(() => { - if (f(e, e = t())) { - var c = i, - l = Q(); - l && (s = document.createDocumentFragment(), s.append(c = W())), n = j(() => a(c)), l ? K.add_callback(u) : u() - } - }), A && (i = J) -} -const pt = () => performance.now(), - T = { - tick: r => requestAnimationFrame(r), - now: () => pt(), - tasks: new Set - }; - -function O() { - const r = T.now(); - T.tasks.forEach(t => { - t.c(r) || (T.tasks.delete(t), t.f()) - }), T.tasks.size !== 0 && T.tick(O) -} - -function gt(r) { - let t; - return T.tasks.size === 0 && T.tick(O), { - promise: new Promise(a => { - T.tasks.add(t = { - c: r, - f: a - }) - }), - abort() { - T.tasks.delete(t) - } - } -} - -function E(r, t) { - F(() => { - r.dispatchEvent(new CustomEvent(t)) - }) -} - -function mt(r) { - if (r === "float") return "cssFloat"; - if (r === "offset") return "cssOffset"; - if (r.startsWith("--")) return r; - const t = r.split("-"); - return t.length === 1 ? t[0] : t[0] + t.slice(1).map(a => a[0].toUpperCase() + a.slice(1)).join("") -} - -function B(r) { - const t = {}, - a = r.split(";"); - for (const i of a) { - const [e, o] = i.split(":"); - if (!e || o === void 0) break; - const n = mt(e.trim()); - t[n] = o.trim() - } - return t -} -const wt = r => r; - -function Ot(r, t, a) { - var i = ut, - e, o, n, s = null; - i.a ?? (i.a = { - element: r, - measure() { - e = this.element.getBoundingClientRect() - }, - apply() { - if (n == null || n.abort(), o = this.element.getBoundingClientRect(), e.left !== o.left || e.right !== o.right || e.top !== o.top || e.bottom !== o.bottom) { - const f = t()(this.element, { - from: e, - to: o - }, a == null ? void 0 : a()); - n = N(this.element, f, void 0, 1, () => { - n == null || n.abort(), n = void 0 - }) - } - }, - fix() { - if (!r.getAnimations().length) { - var { - position: f, - width: u, - height: c - } = getComputedStyle(r); - if (f !== "absolute" && f !== "fixed") { - var l = r.style; - s = { - position: l.position, - width: l.width, - height: l.height, - transform: l.transform - }, l.position = "absolute", l.width = u, l.height = c; - var v = r.getBoundingClientRect(); - if (e.left !== v.left || e.top !== v.top) { - var h = `translate(${e.left-v.left}px, ${e.top-v.top}px)`; - l.transform = l.transform ? `${l.transform} ${h}` : h - } - } - } - }, - unfix() { - if (s) { - var f = r.style; - f.position = s.position, f.width = s.width, f.height = s.height, f.transform = s.transform - } - } - }), i.a.element = r -} - -function Ht(r, t, a, i) { - var e = (r & ft) !== 0, - o = (r & vt) !== 0, - n = e && o, - s = (r & tt) !== 0, - f = n ? "both" : e ? "in" : "out", - u, c = t.inert, - l = t.style.overflow, - v, h; - - function w() { - return F(() => u ?? (u = a()(t, (i == null ? void 0 : i()) ?? {}, { - direction: f - }))) - } - var g = { - is_global: s, - in() { - var p; - if (t.inert = c, !e) { - h == null || h.abort(), (p = h == null ? void 0 : h.reset) == null || p.call(h); - return - } - o || v == null || v.abort(), E(t, "introstart"), v = N(t, w(), h, 1, () => { - E(t, "introend"), v == null || v.abort(), v = u = void 0, t.style.overflow = l - }) - }, - out(p) { - if (!o) { - p == null || p(), u = void 0; - return - } - t.inert = !0, E(t, "outrostart"), h = N(t, w(), v, 0, () => { - E(t, "outroend"), p == null || p() - }) - }, - stop: () => { - v == null || v.abort(), h == null || h.abort() - } - }, - m = Y; - if ((m.transitions ?? (m.transitions = [])).push(g), e && ht) { - var _ = s; - if (!_) { - for (var d = m.parent; d && (d.f & it) !== 0;) - for (; - (d = d.parent) && (d.f & et) === 0;); - _ = !d || (d.f & st) !== 0 - } - _ && nt(() => { - ot(() => g.in()) - }) - } -} - -function N(r, t, a, i, e) { - var o = i === 1; - if (rt(t)) { - var n, s = !1; - return at(() => { - if (!s) { - var m = t({ - direction: o ? "in" : "out" - }); - n = N(r, m, a, i, e) - } - }), { - abort: () => { - s = !0, n == null || n.abort() - }, - deactivate: () => n.deactivate(), - reset: () => n.reset(), - t: () => n.t() - } - } - if (a == null || a.deactivate(), !(t != null && t.duration)) return e(), { - abort: C, - deactivate: C, - reset: C, - t: () => i - }; - const { - delay: f = 0, - css: u, - tick: c, - easing: l = wt - } = t; - var v = []; - if (o && a === void 0 && (c && c(0, 1), u)) { - var h = B(u(0, 1)); - v.push(h, h) - } - var w = () => 1 - i, - g = r.animate(v, { - duration: f, - fill: "forwards" - }); - return g.onfinish = () => { - g.cancel(); - var m = (a == null ? void 0 : a.t()) ?? 1 - i; - a == null || a.abort(); - var _ = i - m, - d = t.duration * Math.abs(_), - p = []; - if (d > 0) { - var k = !1; - if (u) - for (var I = Math.ceil(d / 16.666666666666668), q = 0; q <= I; q += 1) { - var b = m + _ * l(q / I), - S = B(u(b, 1 - b)); - p.push(S), k || (k = S.overflow === "hidden") - } - k && (r.style.overflow = "hidden"), w = () => { - var x = g.currentTime; - return m + _ * l(x / d) - }, c && gt(() => { - if (g.playState !== "running") return !1; - var x = w(); - return c(x, 1 - x), !0 - }) - } - g = r.animate(p, { - duration: d, - fill: "forwards" - }), g.onfinish = () => { - w = () => i, c == null || c(i, 1 - i), e() - } - }, { - abort: () => { - g && (g.cancel(), g.effect = null, g.onfinish = C) - }, - deactivate: () => { - e = C - }, - reset: () => { - i === 0 && (c == null || c(1, 0)) - }, - t: () => w() - } -} -const _t = () => "Pixels painted", - Tt = () => "已绘制像素", - Rt = (r = {}, t = {}) => (t.locale ?? L()) === "en" ? _t() : Tt(), - qt = () => "Description", - bt = () => "描述", - zt = (r = {}, t = {}) => (t.locale ?? L()) === "en" ? qt() : bt(); -var xt = Z(''); - -function Dt(r, t) { - let a = M(t, ["$$slots", "$$events", "$$legacy"]); - var i = xt(); - y(i, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ...a - })), $(r, i) -} - -function $t(r) { - const t = r - 1; - return t * t * t + 1 -} - -function Pt(r, { - from: t, - to: a -}, i = {}) { - var { - delay: e = 0, - duration: o = q => Math.sqrt(q) * 120, - easing: n = $t - } = i, s = getComputedStyle(r), f = s.transform === "none" ? "" : s.transform, [u, c] = s.transformOrigin.split(" ").map(parseFloat); - u /= r.clientWidth, c /= r.clientHeight; - var l = Ct(r), - v = r.clientWidth / a.width / l, - h = r.clientHeight / a.height / l, - w = t.left + t.width * u, - g = t.top + t.height * c, - m = a.left + a.width * u, - _ = a.top + a.height * c, - d = (w - m) * v, - p = (g - _) * h, - k = t.width / a.width, - I = t.height / a.height; - return { - delay: e, - duration: typeof o == "function" ? o(Math.sqrt(d * d + p * p)) : o, - easing: n, - css: (q, b) => { - var S = b * d, - x = b * p, - H = q + b * k, - R = q + b * I; - return `transform: ${f} translate(${S}px, ${x}px) scale(${H}, ${R});` - } - } -} - -function Ct(r) { - if ("currentCSSZoom" in r) return r.currentCSSZoom; - for (var t = r, a = 1; t !== null;) a *= +getComputedStyle(t).zoom, t = t.parentElement; - return a -} -var yt = Z(''), - Zt = Z(''); - -function Gt(r, t) { - let a = M(t, ["$$slots", "$$events", "$$legacy", "filled"]); - var i = ct(), - e = lt(i); - { - var o = s => { - var f = yt(); - y(f, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ...a - })), $(s, f) - }, - n = s => { - var f = Zt(); - y(f, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ...a - })), $(s, f) - }; - dt(e, s => { - t.filled ? s(o) : s(n, !1) - }) - } - $(r, i) -} -var kt = Z(''); - -function Ut(r, t) { - let a = M(t, ["$$slots", "$$events", "$$legacy"]); - var i = kt(); - y(i, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ...a - })), $(r, i) -} -var It = Z(''); - -function Wt(r, t) { - let a = M(t, ["$$slots", "$$events", "$$legacy"]); - var i = It(); - y(i, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ...a - })), $(r, i) -} -export { - Gt as C, Ut as G, Dt as L, Wt as T, Ot as a, zt as d, Pt as f, Lt as k, Rt as p, Ht as t -}; \ No newline at end of file diff --git a/frontend-backup/_app/immutable/chunks/Z_72d8Vp.js b/frontend-backup/_app/immutable/chunks/Z_72d8Vp.js new file mode 100644 index 0000000..8ccb6a0 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/Z_72d8Vp.js @@ -0,0 +1,82 @@ +import { + w as p, + x as g, + y as d, + z as y, + A as _, + B as l, + g as u, + C as w, + D as h, +} from "./CMvZtFtm.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + n = new e.Error().stack; + n && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[n] = "888755b8-82ba-4039-836b-67876fe1f611"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-888755b8-82ba-4039-836b-67876fe1f611")); + })(); +} catch {} +function m(e = !1) { + const n = p, + f = n.l.u; + if (!f) return; + let i = () => w(n.s); + if (e) { + let s = 0, + t = {}; + const b = h(() => { + let r = !1; + const a = n.s; + for (const o in a) a[o] !== t[o] && ((t[o] = a[o]), (r = !0)); + return r && s++, s; + }); + i = () => u(b); + } + f.b.length && + g(() => { + c(n, i), l(f.b); + }), + d(() => { + const s = y(() => f.m.map(_)); + return () => { + for (const t of s) typeof t == "function" && t(); + }; + }), + f.a.length && + d(() => { + c(n, i), l(f.a); + }); +} +function c(e, n) { + if (e.l.s) for (const f of e.l.s) u(f); + n(); +} +export { m as i }; diff --git a/frontend-backup/_app/immutable/chunks/ZzI7cLBE.js b/frontend-backup/_app/immutable/chunks/ZzI7cLBE.js deleted file mode 100644 index 24e7dc7..0000000 --- a/frontend-backup/_app/immutable/chunks/ZzI7cLBE.js +++ /dev/null @@ -1,59 +0,0 @@ -import { g as p } from "./DklPLC_x.js"; -import "./B2cHk4HI.js"; -import { ay as g, a as h, b as r, v } from "./BDALf20I.js"; -import { i as w, r as i } from "./Bke_korE.js"; -import { b as s } from "./BNZUboE0.js"; -(function () { - try { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - e.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - o = new e.Error().stack; - o && ((e._sentryDebugIds = e._sentryDebugIds || {}), (e._sentryDebugIds[o] = "3298bbfa-10df-4888-8ec0-1b806457f64a"), (e._sentryDebugIdIdentifier = "sentry-dbid-3298bbfa-10df-4888-8ec0-1b806457f64a")); - })(); -} catch {} -const m = (e) => `Copy alliance ID: #${e.allianceId}`, - u = (e) => `Copiar ID da aliança: #${e.allianceId}`, - C = (e, o = {}) => ((o.locale ?? p()) === "en" ? m(e) : u(e)); -var b = v(''), - y = v( - '' - ); -function H(e, o) { - let a = i(o, ["$$slots", "$$events", "$$legacy", "filled"]); - var t = g(), - f = h(t); - { - var c = (l) => { - var n = b(); - s(n, () => ({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960", fill: "currentColor", ...a })), r(l, n); - }, - d = (l) => { - var n = y(); - s(n, () => ({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960", fill: "currentColor", ...a })), r(l, n); - }; - w(f, (l) => { - o.filled ? l(c) : l(d, !1); - }); - } - r(e, t); -} -var T = v(''); -function D(e, o) { - let a = i(o, ["$$slots", "$$events", "$$legacy"]); - var t = T(); - s(t, () => ({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960", fill: "currentColor", ...a })), r(e, t); -} -var q = v( - '' -); -function M(e, o) { - let a = i(o, ["$$slots", "$$events", "$$legacy"]); - var t = q(); - s(t, () => ({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960", fill: "currentColor", ...a })), r(e, t); -} -export { H as C, D as G, M as T, C as c }; diff --git a/frontend-backup/_app/immutable/chunks/cUtKXcx3.js b/frontend-backup/_app/immutable/chunks/cUtKXcx3.js deleted file mode 100644 index de93ed1..0000000 --- a/frontend-backup/_app/immutable/chunks/cUtKXcx3.js +++ /dev/null @@ -1,15 +0,0 @@ -import { ar as n } from "./BDALf20I.js"; -(function () { - try { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - e.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - f = new e.Error().stack; - f && ((e._sentryDebugIds = e._sentryDebugIds || {}), (e._sentryDebugIds[f] = "04fff17c-04f8-458c-8ff9-180b80f62e15"), (e._sentryDebugIdIdentifier = "sentry-dbid-04fff17c-04f8-458c-8ff9-180b80f62e15")); - })(); -} catch {} -n(); diff --git a/frontend-backup/_app/immutable/chunks/fZ59cmjx.js b/frontend-backup/_app/immutable/chunks/fZ59cmjx.js deleted file mode 100644 index 4f7a1c3..0000000 --- a/frontend-backup/_app/immutable/chunks/fZ59cmjx.js +++ /dev/null @@ -1 +0,0 @@ -import{g as u}from"./DklPLC_x.js";import"./B2cHk4HI.js";import{o as De}from"./4WsUhDWi.js";import{at as Be,p as Te,y as ae,aw as h,au as R,f as X,d as o,s as c,r as n,n as Ee,ax as se,b as g,c as Le,t as k,g as s,u as ie,b4 as J,ay as le,a as ce,v as Ue}from"./BDALf20I.js";import{s as _}from"./4k6DpCgf.js";import{p as Ie,i as C,r as Pe}from"./Bke_korE.js";import{e as Ce}from"./CZW2bcQi.js";import{f as ze,r as D,s as ue,g as z,a as Me,b as Se}from"./BNZUboE0.js";import{t as Ae}from"./BCONGQnO.js";import{c as Oe}from"./DS58drb5.js";import{b as je}from"./BrZ10JY-.js";import{i as Ne,h as qe,f as Ze,j as Fe,k as He,P as Q,t as W}from"./DffDvEhl.js";import{o as Ke,L as Ve,s as Ye,a as Ge,g as Je}from"./CAQlJ3np.js";import{P as Qe}from"./DCxPsWiR.js";import{c as We}from"./CDZgL_Bh.js";import{g as Xe}from"./ClOhzjRc.js";import{f as $e}from"./DnhglgUZ.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="66bbb02f-2e45-48b1-b4e0-91d8d5145a93",t._sentryDebugIdIdentifier="sentry-dbid-66bbb02f-2e45-48b1-b4e0-91d8d5145a93")})()}catch{}const et=()=>"Copy",tt=()=>"Copiar",lr=(t={},e={})=>(e.locale??u())==="en"?et():tt(),rt=()=>"Report User",nt=()=>"Reportar usuário",ot=(t={},e={})=>(e.locale??u())==="en"?rt():nt(),at=()=>"Timeout User",st=()=>"Suspender usuário",it=(t={},e={})=>(e.locale??u())==="en"?at():st(),lt=()=>"Ban User",ct=()=>"Banir usuário",ut=(t={},e={})=>(e.locale??u())==="en"?lt():ct(),pt=()=>"+18, inappropriate link, highly suggestive content, ...",dt=()=>"+18, links inapropriados, conteúdo altamente sugestivo, ...",_t=(t={},e={})=>(e.locale??u())==="en"?pt():dt(),ft=()=>"Use of software to completely automate painting",mt=()=>"Uso de software para pintar de forma completamente automatizada ",vt=(t={},e={})=>(e.locale??u())==="en"?ft():mt(),bt=()=>"Racism, homophobia, hate groups, ...",gt=()=>"Racismo, homofobia, grupos de ódio, ...",ht=(t={},e={})=>(e.locale??u())==="en"?bt():gt(),xt=()=>"Messed up artworks for no reason",yt=()=>"Estragar desenho dos outros sem motivo",wt=(t={},e={})=>(e.locale??u())==="en"?xt():yt(),Rt=()=>"Released other's personal information without their consent",kt=()=>"Vazar informações pessoais de terceiros sem consentimento",Dt=(t={},e={})=>(e.locale??u())==="en"?Rt():kt(),Bt=()=>"Other reason not listed",Tt=()=>"Outro motivo não listado",Et=(t={},e={})=>(e.locale??u())==="en"?Bt():Tt(),Lt=()=>"Report",Ut=()=>"Reportar",It=(t={},e={})=>(e.locale??u())==="en"?Lt():Ut(),Pt=()=>"Report sent successfully",Ct=()=>"Denúncia enviada com sucesso",zt=(t={},e={})=>(e.locale??u())==="en"?Pt():Ct(),Mt=()=>"Report failed. Please try again later",St=()=>"Denúncia falhou. Por favor, tente novamente mais tarde",At=(t={},e={})=>(e.locale??u())==="en"?Mt():St(),Ot=()=>"Purchases",jt=()=>"Compras",cr=(t={},e={})=>(e.locale??u())==="en"?Ot():jt();var Nt=X(''),qt=(t,e)=>{e(!1)},Zt=X('

        '),Ft=X(' ');function ur(t,e){Te(e,!0);const i=[];let d=Ie(e,"open",15),B=R(!1),T=R(""),M=R(""),E=R(null),S=R(null);const pe=[{value:"inappropriate-content",label:Ne(),description:_t()},{value:"hate-speech",label:qe(),description:ht()},{value:"doxxing",label:Ze(),description:Dt()},{value:"bot",label:Fe(),description:vt()},{value:"griefing",label:He(),description:wt()},{value:"other",label:Ke(),description:Et()}];De(()=>{const f=m=>{m.key==="Escape"&&d(!1)};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)}),ae(()=>{d()||(h(T,""),h(M,""))});const de={"report-user":`${Q}/report-user`,timeout:`${Q}/moderator/timeout-user`,ban:`${Q}/admin/ban-user`};var x=Ft(),$=o(x),_e=c(o($),2);{var fe=f=>{var m=Zt(),A=o(m);D(A);var O=c(A,2);D(O);var j=c(O,2);D(j);var N=c(j,2);D(N);var q=c(N,2),ee=o(q);Qe(ee,{get userId(){return e.paintedBy.id},get pictureUrl(){return e.paintedBy.picture},class:"size-14"});var te=c(ee,2),Z=o(te),me=o(Z);{var ve=a=>{var r=J();k(l=>_(r,l),[()=>ot()]),g(a,r)},be=a=>{var r=le(),l=ce(r);{var p=v=>{var b=J();k(y=>_(b,y),[()=>it()]),g(v,b)},U=v=>{var b=le(),y=ce(b);{var I=w=>{var P=J();k(ke=>_(P,ke),[()=>ut()]),g(w,P)};C(y,w=>{e.action==="ban"&&w(I)},!0)}g(v,b)};C(l,v=>{e.action==="timeout"?v(p):v(U,!1)},!0)}g(a,r)};C(me,a=>{e.action==="report-user"?a(ve):a(be,!1)})}n(Z);var F=c(Z,2),H=o(F),ge=o(H,!0);n(H);var re=c(H,2),he=o(re);n(re),n(F),n(te),n(q);var K=c(q,2),V=o(K),xe=o(V);n(V);var ne=c(V,2);Ce(ne,21,()=>pe,a=>a.value,(a,r)=>{var l=Nt(),p=o(l);D(p);var U,v=c(p,2),b=o(v),y=o(b,!0);n(b);var I=c(b,2),w=o(I,!0);n(I),n(v),n(l),k(()=>{ue(p,"aria-label",s(r).label),U!==(U=s(r).value)&&(p.value=(p.__value=s(r).value)??""),_(y,s(r).label),_(w,s(r).description)}),Oe(i,[],p,()=>(s(r).value,s(T)),P=>h(T,P)),g(a,l)}),n(ne),n(K);var Y=c(K,2),ye=o(Y);{let a=ie(()=>Je()),r=ie(()=>s(T)==="doxxing"?20:5);Ve(ye,{class:"h-20 rounded-lg",name:"notes",get placeholder(){return s(a)},max:2056,get min(){return s(r)},get value(){return s(M)},set value(l){h(M,l,!0)},get validate(){return s(S)},set validate(l){h(S,l,!0)}})}n(Y);var oe=c(Y,2),L=o(oe);L.__click=[qt,d];var we=o(L,!0);n(L);var G=c(L,2),Re=o(G,!0);n(G),n(oe),n(m),je(m,a=>h(E,a),()=>s(E)),k((a,r,l,p)=>{ue(m,"action",de[e.action]),z(A,e.paintedBy.id),z(O,e.latLon[0]),z(j,e.latLon[1]),z(N,e.zoom),Me(F,1,`font-medium ${a??""} flex gap-1.5`),_(ge,e.paintedBy.name),_(he,`#${e.paintedBy.id??""}`),_(xe,`${r??""}:`),_(we,l),G.disabled=s(B),_(Re,p)},[()=>Xe(e.paintedBy.id),()=>Ye(),()=>We(),()=>It()]),se("submit",m,async a=>{if(a.preventDefault(),!s(B)&&s(S)())try{h(B,!0);const r=new FormData(s(E));if(!r.get("reason")){W.error(Ge());return}const l=await e.image;r.append("image",l,`report-${Date.now()}.jpeg`);const p=await fetch(s(E).action,{method:"POST",body:r,credentials:"include"});p.status===200||p.status===409?(W.info(zt()),d(!1)):W.error(At())}finally{h(B,!1)}}),Ae(2,m,()=>$e),g(f,m)};C(_e,f=>{d()&&f(fe)})}n($),Ee(2),n(x),ze(x,()=>f=>{ae(()=>{d()?f.show():f.close()})}),se("close",x,()=>d(!1)),g(t,x),Le()}Be(["click"]);var Ht=Ue('');function pr(t,e){let i=Pe(e,["$$slots","$$events","$$legacy"]);var d=Ht();Se(d,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...i})),g(t,d)}export{pr as D,ur as R,ut as b,lr as c,cr as p,ot as r,it as t}; diff --git a/frontend-backup/_app/immutable/chunks/g8c1BvYP.js b/frontend-backup/_app/immutable/chunks/g8c1BvYP.js deleted file mode 100644 index ab562ac..0000000 --- a/frontend-backup/_app/immutable/chunks/g8c1BvYP.js +++ /dev/null @@ -1,115 +0,0 @@ -import { - ac as m, - J as L, - P as N, - ad as M, - a2 as b, - a9 as p, - O as h, - I as O, - e as j, - m as l, - Q as C, - a8 as H, - ae as Y, - a4 as P, - X as S, - af as V, - ag as R, - ah as W, - ai as v, - aj as $, - i as k, - j as F, - h as w, - p as J, - u as Q, - aa as X, - a6 as q, - c as z, -} from "./DUoKDNpf.js"; -import { r as B } from "./2CRhGZHc.js"; -let D = !0; -function Z(a, e) { - var t = e == null ? "" : typeof e == "object" ? e + "" : e; - t !== (a.__t ?? (a.__t = a.nodeValue)) && ((a.__t = t), (a.nodeValue = t + "")); -} -function G(a, e) { - return A(a, e); -} -function x(a, e) { - m(), (e.intro = e.intro ?? !1); - const t = e.target, - u = w, - c = l; - try { - for (var r = L(t); r && (r.nodeType !== N || r.data !== M); ) r = b(r); - if (!r) throw p; - h(!0), O(r), j(); - const o = A(a, { ...e, anchor: r }); - if (l === null || l.nodeType !== N || l.data !== C) throw (H(), p); - return h(!1), o; - } catch (o) { - if ( - o instanceof Error && - o.message - .split( - ` -` - ) - .some((f) => f.startsWith("https://svelte.dev/e/")) - ) - throw o; - return o !== p && console.warn("Failed to hydrate: ", o), e.recover === !1 && Y(), m(), P(t), h(!1), G(a, e); - } finally { - h(u), O(c), B(); - } -} -const d = new Map(); -function A(a, { target: e, anchor: t, props: u = {}, events: c, context: r, intro: o = !0 }) { - m(); - var f = new Set(), - y = (i) => { - for (var s = 0; s < i.length; s++) { - var n = i[s]; - if (!f.has(n)) { - f.add(n); - var _ = $(n); - e.addEventListener(n, v, { passive: _ }); - var T = d.get(n); - T === void 0 ? (document.addEventListener(n, v, { passive: _ }), d.set(n, 1)) : d.set(n, T + 1); - } - } - }; - y(S(V)), R.add(y); - var g = void 0, - I = W(() => { - var i = t ?? e.appendChild(k()); - return ( - F(() => { - if (r) { - J({}); - var s = Q; - s.c = r; - } - c && (u.$$events = c), w && X(i, null), (D = o), (g = a(i, u) || {}), (D = !0), w && (q.nodes_end = l), r && z(); - }), - () => { - var _; - for (var s of f) { - e.removeEventListener(s, v); - var n = d.get(s); - --n === 0 ? (document.removeEventListener(s, v), d.delete(s)) : d.set(s, n); - } - R.delete(y), i !== t && ((_ = i.parentNode) == null || _.removeChild(i)); - } - ); - }); - return E.set(g, I), g; -} -let E = new WeakMap(); -function ee(a, e) { - const t = E.get(a); - return t ? (E.delete(a), t(e)) : Promise.resolve(); -} -export { D as a, x as h, G as m, Z as s, ee as u }; diff --git a/frontend-backup/_app/immutable/chunks/g9MKNE1A.js b/frontend-backup/_app/immutable/chunks/g9MKNE1A.js new file mode 100644 index 0000000..b982770 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/g9MKNE1A.js @@ -0,0 +1,52 @@ +import { g as n } from "./CV9xcpLq.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + o = new e.Error().stack; + o && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[o] = "76e4e08a-3479-4679-9995-6d7032094b18"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-76e4e08a-3479-4679-9995-6d7032094b18")); + })(); +} catch {} +const d = () => "Apply", + r = () => "Aplicar", + f = (e = {}, o = {}) => ((o.locale ?? n()) === "en" ? d() : r()), + a = () => "Media total per mod", + i = () => "Media total por mod", + b = (e = {}, o = {}) => ((o.locale ?? n()) === "en" ? a() : i()), + l = () => "Media ban per mod", + _ = () => "Media de banimento por mod", + g = (e = {}, o = {}) => ((o.locale ?? n()) === "en" ? l() : _()), + c = () => "Media ignored per mod", + p = () => "Media de ignorados por mod", + y = (e = {}, o = {}) => ((o.locale ?? n()) === "en" ? c() : p()), + s = () => "Media timeout per mod", + u = () => "Media de timeout por mod", + w = (e = {}, o = {}) => ((o.locale ?? n()) === "en" ? s() : u()); +export { f as a, g as b, y as c, w as d, b as m }; diff --git a/frontend-backup/_app/immutable/chunks/hLPYzGnf.js b/frontend-backup/_app/immutable/chunks/hLPYzGnf.js deleted file mode 100644 index 82d2917..0000000 --- a/frontend-backup/_app/immutable/chunks/hLPYzGnf.js +++ /dev/null @@ -1 +0,0 @@ -import{g as o}from"./DklPLC_x.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b0beadb0-deec-4a77-af24-7bb1740c9b03",e._sentryDebugIdIdentifier="sentry-dbid-b0beadb0-deec-4a77-af24-7bb1740c9b03")})()}catch{}const t=()=>"Clear",d=()=>"Limpar",f=(e={},n={})=>(n.locale??o())==="en"?t():d();export{f as c}; diff --git a/frontend-backup/_app/immutable/chunks/lE0oaQc5.js b/frontend-backup/_app/immutable/chunks/lE0oaQc5.js new file mode 100644 index 0000000..4b178cd --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/lE0oaQc5.js @@ -0,0 +1,153 @@ +import { S as i } from "./BRM3t761.js"; +(function () { + try { + var t = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + t.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var t = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + e = new t.Error().stack; + e && + ((t._sentryDebugIds = t._sentryDebugIds || {}), + (t._sentryDebugIds[e] = "13ddcd48-eb69-440b-ae8c-96bbeeaf7d7d"), + (t._sentryDebugIdIdentifier = + "sentry-dbid-13ddcd48-eb69-440b-ae8c-96bbeeaf7d7d")); + })(); +} catch {} +const u = [ + "text-red-500", + "text-orange-500", + "text-yellow-500", + "text-lime-500", + "text-emerald-500", + "text-teal-500", + "text-cyan-500", + "text-sky-500", + "text-indigo-500", + "text-violet-500", + "text-purple-500", + "text-fuchsia-500", + "text-pink-500", + "text-rose-500", + ], + p = [ + "bg-red-500/10", + "bg-orange-500/10", + "bg-yellow-500/10", + "bg-lime-500/10", + "bg-emerald-500/10", + "bg-teal-500/10", + "bg-cyan-500/10", + "bg-sky-500/10", + "bg-indigo-500/10", + "bg-violet-500/10", + "bg-purple-500/10", + "bg-fuchsia-500/10", + "bg-pink-500/10", + "bg-rose-500/10", + ]; +function x(t) { + return u[t % u.length]; +} +function E(t) { + return p[t % p.length]; +} +function T({ r: t, g: e, b: o }) { + function r(n) { + return n.toString(16).padStart(2, "0"); + } + return `#${r(t)}${r(e)}${r(o)}`; +} +function k(t) { + return ( + (t = t.trim().replace("#", "")), + t.length === 3 && (t = t[0] + t[0] + t[1] + t[1] + t[2] + t[2]), + t.length !== 6 + ? { r: 0, g: 0, b: 0 } + : { + r: +("0x" + t.slice(0, 2)), + g: +("0x" + t.slice(2, 4)), + b: +("0x" + t.slice(4, 6)), + } + ); +} +function C(t) { + t = Math.min(t, i.colors.length - 1); + const [e, o, r] = i.colors[t].rgb; + return { r: e, g: o, b: r, a: t === 0 ? 0 : 255 }; +} +const y = i.colors + .map((t, e) => ({ + ...t, + idx: e, + lab: v({ r: t.rgb[0], g: t.rgb[1], b: t.rgb[2] }), + })) + .filter((t) => t.idx !== 0); +function A(t) { + let e = y[0], + o = Number.MAX_VALUE; + const r = v(t); + for (let n of y) { + const a = m(r, n.lab); + a < o && ((e = n), (o = a)); + } + return e.idx; +} +function v(t) { + var e = t.r / 255, + o = t.g / 255, + r = t.b / 255, + n, + a, + l; + return ( + (e = e > 0.04045 ? Math.pow((e + 0.055) / 1.055, 2.4) : e / 12.92), + (o = o > 0.04045 ? Math.pow((o + 0.055) / 1.055, 2.4) : o / 12.92), + (r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92), + (n = (e * 0.4124 + o * 0.3576 + r * 0.1805) / 0.95047), + (a = (e * 0.2126 + o * 0.7152 + r * 0.0722) / 1), + (l = (e * 0.0193 + o * 0.1192 + r * 0.9505) / 1.08883), + (n = n > 0.008856 ? Math.pow(n, 1 / 3) : 7.787 * n + 16 / 116), + (a = a > 0.008856 ? Math.pow(a, 1 / 3) : 7.787 * a + 16 / 116), + (l = l > 0.008856 ? Math.pow(l, 1 / 3) : 7.787 * l + 16 / 116), + { l: 116 * a - 16, a: 500 * (n - a), b: 200 * (a - l) } + ); +} +function m(t, e) { + var o = t.l - e.l, + r = t.a - e.a, + n = t.b - e.b, + a = Math.sqrt(t.a * t.a + t.b * t.b), + l = Math.sqrt(e.a * e.a + e.b * e.b), + d = a - l, + s = r * r + n * n - d * d; + s = s < 0 ? 0 : Math.sqrt(s); + var w = 1 + 0.045 * a, + h = 1 + 0.015 * a, + b = o / 1, + c = d / w, + g = s / h, + f = b * b + c * c + g * g; + return f < 0 ? 0 : Math.sqrt(f); +} +export { E as a, A as b, C as c, x as g, k as h, T as r }; diff --git a/frontend-backup/_app/immutable/chunks/m3o6lEf1.js b/frontend-backup/_app/immutable/chunks/m3o6lEf1.js new file mode 100644 index 0000000..4803267 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/m3o6lEf1.js @@ -0,0 +1,54 @@ +import "./Ch2Ub8FX.js"; +import { v as f, b as r } from "./CMvZtFtm.js"; +import { b as s } from "./C5yqZvKC.js"; +import { r as d } from "./BF50aS-j.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + t = new e.Error().stack; + t && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[t] = "e7827935-ebe4-43f0-84b4-16441b18c03c"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-e7827935-ebe4-43f0-84b4-16441b18c03c")); + })(); +} catch {} +var i = f( + '' +); +function c(e, t) { + let n = d(t, ["$$slots", "$$events", "$$legacy"]); + var o = i(); + s(o, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...n, + })), + r(e, o); +} +export { c as R }; diff --git a/frontend-backup/_app/immutable/chunks/rLj4C5Bn.js b/frontend-backup/_app/immutable/chunks/rLj4C5Bn.js deleted file mode 100644 index ea954ec..0000000 --- a/frontend-backup/_app/immutable/chunks/rLj4C5Bn.js +++ /dev/null @@ -1,26 +0,0 @@ -import "./B2cHk4HI.js"; -import { v as f, b as r } from "./BDALf20I.js"; -import { b as s } from "./BNZUboE0.js"; -import { r as d } from "./Bke_korE.js"; -(function () { - try { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - e.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - t = new e.Error().stack; - t && ((e._sentryDebugIds = e._sentryDebugIds || {}), (e._sentryDebugIds[t] = "e7827935-ebe4-43f0-84b4-16441b18c03c"), (e._sentryDebugIdIdentifier = "sentry-dbid-e7827935-ebe4-43f0-84b4-16441b18c03c")); - })(); -} catch {} -var i = f( - '' -); -function c(e, t) { - let n = d(t, ["$$slots", "$$events", "$$legacy"]); - var o = i(); - s(o, () => ({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960", fill: "currentColor", ...n })), r(e, o); -} -export { c as R }; diff --git a/frontend-backup/_app/immutable/chunks/sZ1mzRzK.js b/frontend-backup/_app/immutable/chunks/sZ1mzRzK.js deleted file mode 100644 index 3a31159..0000000 --- a/frontend-backup/_app/immutable/chunks/sZ1mzRzK.js +++ /dev/null @@ -1,33 +0,0 @@ -import { g as s } from "./DklPLC_x.js"; -import "./B2cHk4HI.js"; -import { v as r, b as i } from "./BDALf20I.js"; -import { b as a } from "./BNZUboE0.js"; -import { r as l } from "./Bke_korE.js"; -(function () { - try { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - e.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - t = new e.Error().stack; - t && ((e._sentryDebugIds = e._sentryDebugIds || {}), (e._sentryDebugIds[t] = "e9a4a830-f71c-4119-8142-30326aa85639"), (e._sentryDebugIdIdentifier = "sentry-dbid-e9a4a830-f71c-4119-8142-30326aa85639")); - })(); -} catch {} -const p = () => "Pixels painted", - c = () => "Pixels pintados", - T = (e = {}, t = {}) => ((t.locale ?? s()) === "en" ? p() : c()), - d = () => "Description", - f = () => "Descrição", - m = (e = {}, t = {}) => ((t.locale ?? s()) === "en" ? d() : f()); -var u = r( - '' -); -function v(e, t) { - let n = l(t, ["$$slots", "$$events", "$$legacy"]); - var o = u(); - a(o, () => ({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960", fill: "currentColor", ...n })), i(e, o); -} -export { v as L, m as d, T as p }; diff --git a/frontend-backup/_app/immutable/chunks/start.CJ_UwIBa.js b/frontend-backup/_app/immutable/chunks/start.CJ_UwIBa.js deleted file mode 100644 index 0f85a4a..0000000 --- a/frontend-backup/_app/immutable/chunks/start.CJ_UwIBa.js +++ /dev/null @@ -1,2 +0,0 @@ -import { l as o, a as r } from "../chunks/KvV259my.js"; -export { o as load_css, r as start }; diff --git a/frontend-backup/_app/immutable/chunks/wZ7b5CwQ.js b/frontend-backup/_app/immutable/chunks/wZ7b5CwQ.js new file mode 100644 index 0000000..6f6230d --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/wZ7b5CwQ.js @@ -0,0 +1,75 @@ +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + t = new e.Error().stack; + t && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[t] = "318a9da5-f9ae-41c4-a6ad-1557223c6f66"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-318a9da5-f9ae-41c4-a6ad-1557223c6f66")); + })(); +} catch {} +const b = (e) => e; +function h(e) { + const t = e - 1; + return t * t * t + 1; +} +function w(e, { delay: t = 0, duration: i = 400, easing: s = b } = {}) { + const r = +getComputedStyle(e).opacity; + return { delay: t, duration: i, easing: s, css: (a) => `opacity: ${a * r}` }; +} +function m( + e, + { delay: t = 0, duration: i = 400, easing: s = h, axis: r = "y" } = {} +) { + const a = getComputedStyle(e), + c = +a.opacity, + p = r === "y" ? "height" : "width", + l = parseFloat(a[p]), + o = r === "y" ? ["top", "bottom"] : ["left", "right"], + d = o.map((n) => `${n[0].toUpperCase()}${n.slice(1)}`), + f = parseFloat(a[`padding${d[0]}`]), + y = parseFloat(a[`padding${d[1]}`]), + u = parseFloat(a[`margin${d[0]}`]), + g = parseFloat(a[`margin${d[1]}`]), + _ = parseFloat(a[`border${d[0]}Width`]), + $ = parseFloat(a[`border${d[1]}Width`]); + return { + delay: t, + duration: i, + easing: s, + css: (n) => + `overflow: hidden;opacity: ${Math.min(n * 20, 1) * c};${p}: ${ + n * l + }px;padding-${o[0]}: ${n * f}px;padding-${o[1]}: ${n * y}px;margin-${ + o[0] + }: ${n * u}px;margin-${o[1]}: ${n * g}px;border-${o[0]}-width: ${ + n * _ + }px;border-${o[1]}-width: ${n * $}px;min-${p}: 0`, + }; +} +export { w as f, m as s }; diff --git a/frontend-backup/_app/immutable/chunks/x1RL6Wqy.js b/frontend-backup/_app/immutable/chunks/x1RL6Wqy.js deleted file mode 100644 index cfe185e..0000000 --- a/frontend-backup/_app/immutable/chunks/x1RL6Wqy.js +++ /dev/null @@ -1,64 +0,0 @@ -(function () { - try { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - e.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - o = new e.Error().stack; - o && ((e._sentryDebugIds = e._sentryDebugIds || {}), (e._sentryDebugIds[o] = "2873cead-a87c-4550-afcc-7d8128f4def3"), (e._sentryDebugIdIdentifier = "sentry-dbid-2873cead-a87c-4550-afcc-7d8128f4def3")); - })(); -} catch {} -const m = "modulepreload", - w = function (e, o) { - return new URL(e, o).href; - }, - g = {}, - v = function (o, d, u) { - let h = Promise.resolve(); - if (d && d.length > 0) { - let i = function (t) { - return Promise.all( - t.map((s) => - Promise.resolve(s).then( - (c) => ({ status: "fulfilled", value: c }), - (c) => ({ status: "rejected", reason: c }) - ) - ) - ); - }; - const n = document.getElementsByTagName("link"), - l = document.querySelector("meta[property=csp-nonce]"), - b = (l == null ? void 0 : l.nonce) || (l == null ? void 0 : l.getAttribute("nonce")); - h = i( - d.map((t) => { - if (((t = w(t, u)), t in g)) return; - g[t] = !0; - const s = t.endsWith(".css"), - c = s ? '[rel="stylesheet"]' : ""; - if (!!u) - for (let f = n.length - 1; f >= 0; f--) { - const a = n[f]; - if (a.href === t && (!s || a.rel === "stylesheet")) return; - } - else if (document.querySelector(`link[href="${t}"]${c}`)) return; - const r = document.createElement("link"); - if (((r.rel = s ? "stylesheet" : m), s || (r.as = "script"), (r.crossOrigin = ""), (r.href = t), b && r.setAttribute("nonce", b), document.head.appendChild(r), s)) - return new Promise((f, a) => { - r.addEventListener("load", f), r.addEventListener("error", () => a(new Error(`Unable to preload CSS for ${t}`))); - }); - }) - ); - } - function y(i) { - const n = new Event("vite:preloadError", { cancelable: !0 }); - if (((n.payload = i), window.dispatchEvent(n), !n.defaultPrevented)) throw i; - } - return h.then((i) => { - for (const n of i || []) n.status === "rejected" && y(n.reason); - return o().catch(y); - }); - }; -export { v as _ }; diff --git a/frontend-backup/_app/immutable/chunks/yW7U80iv.js b/frontend-backup/_app/immutable/chunks/yW7U80iv.js new file mode 100644 index 0000000..7a07ba8 --- /dev/null +++ b/frontend-backup/_app/immutable/chunks/yW7U80iv.js @@ -0,0 +1,17408 @@ +(function () { + try { + var E = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + E.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var E = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + g = new E.Error().stack; + g && + ((E._sentryDebugIds = E._sentryDebugIds || {}), + (E._sentryDebugIds[g] = "48c88be9-ac3d-4338-9fee-762fd564c6c9"), + (E._sentryDebugIdIdentifier = + "sentry-dbid-48c88be9-ac3d-4338-9fee-762fd564c6c9")); + })(); +} catch {} +(function () { + var E = this || self; + function g(d, $) { + d = d.split("."); + var t = E; + d[0] in t || typeof t.execScript > "u" || t.execScript("var " + d[0]); + for (var e; d.length && (e = d.shift()); ) + d.length || $ === void 0 + ? t[e] && t[e] !== Object.prototype[e] + ? (t = t[e]) + : (t = t[e] = {}) + : (t[e] = $); + } + function _(d, $) { + function t() {} + (t.prototype = $.prototype), + (d.ma = $.prototype), + (d.prototype = new t()), + (d.prototype.constructor = d), + (d.sa = function (e, n, r) { + for ( + var u = Array(arguments.length - 2), i = 2; + i < arguments.length; + i++ + ) + u[i - 2] = arguments[i]; + return $.prototype[n].apply(e, u); + }); + } + function F1(d) { + const $ = []; + let t = 0; + for (const e in d) $[t++] = d[e]; + return $; + } + var b = class { + constructor(d) { + if (d1 !== d1) throw Error("SafeUrl is not meant to be built directly"); + this.g = d; + } + toString() { + return this.g.toString(); + } + }, + d1 = {}; + new b("about:invalid#zClosurez"), new b("about:blank"); + const $1 = {}; + class V1 { + constructor() { + if ($1 !== $1) throw Error("SafeStyle is not meant to be built directly"); + } + toString() { + return ""; + } + } + new V1(); + const t1 = {}; + class Z1 { + constructor() { + if (t1 !== t1) + throw Error("SafeStyleSheet is not meant to be built directly"); + } + toString() { + return ""; + } + } + new Z1(); + const e1 = {}; + class H1 { + constructor() { + var $ = (E.trustedTypes && E.trustedTypes.emptyHTML) || ""; + if (e1 !== e1) throw Error("SafeHtml is not meant to be built directly"); + this.g = $; + } + toString() { + return this.g.toString(); + } + } + new H1(); + function W1(d, $) { + switch ( + ((this.g = d), + (this.l = !!$.aa), + (this.h = $.i), + (this.s = $.type), + (this.o = !1), + this.h) + ) { + case J1: + case X1: + case Q1: + case k1: + case z1: + case j1: + case Y1: + this.o = !0; + } + this.j = $.defaultValue; + } + var Y1 = 1, + j1 = 2, + J1 = 3, + X1 = 4, + Q1 = 6, + k1 = 16, + z1 = 18; + function q1(d, $) { + for (this.h = d, this.g = {}, d = 0; d < $.length; d++) { + var t = $[d]; + this.g[t.g] = t; + } + } + function b1(d) { + return ( + (d = F1(d.g)), + d.sort(function ($, t) { + return $.g - t.g; + }), + d + ); + } + function C() { + (this.h = {}), (this.j = this.m().g), (this.g = this.l = null); + } + (C.prototype.has = function (d) { + return m(this, d.g); + }), + (C.prototype.get = function (d, $) { + return f(this, d.g, $); + }), + (C.prototype.set = function (d, $) { + c(this, d.g, $); + }), + (C.prototype.add = function (d, $) { + r1(this, d.g, $); + }); + function n1(d, $) { + for (var t = b1(d.m()), e = 0; e < t.length; e++) { + var n = t[e], + r = n.g; + if (m($, r)) { + d.g && delete d.g[n.g]; + var u = n.h == 11 || n.h == 10; + if (n.l) { + n = a($, r); + for (var i = 0; i < n.length; i++) r1(d, r, u ? n[i].clone() : n[i]); + } else + (n = K($, r)), + u ? ((u = K(d, r)) ? n1(u, n) : c(d, r, n.clone())) : c(d, r, n); + } + } + } + C.prototype.clone = function () { + var d = new this.constructor(); + return d != this && ((d.h = {}), d.g && (d.g = {}), n1(d, this)), d; + }; + function m(d, $) { + return d.h[$] != null; + } + function K(d, $) { + var t = d.h[$]; + if (t == null) return null; + if (d.l) { + if (!($ in d.g)) { + var e = d.l, + n = d.j[$]; + if (t != null) + if (n.l) { + for (var r = [], u = 0; u < t.length; u++) r[u] = e.h(n, t[u]); + t = r; + } else t = e.h(n, t); + return (d.g[$] = t); + } + return d.g[$]; + } + return t; + } + function f(d, $, t) { + var e = K(d, $); + return d.j[$].l ? e[t || 0] : e; + } + function l(d, $) { + if (m(d, $)) d = f(d, $); + else + d: { + if (((d = d.j[$]), d.j === void 0)) + if ((($ = d.s), $ === Boolean)) d.j = !1; + else if ($ === Number) d.j = 0; + else if ($ === String) d.j = d.o ? "0" : ""; + else { + d = new $(); + break d; + } + d = d.j; + } + return d; + } + function a(d, $) { + return K(d, $) || []; + } + function I(d, $) { + return d.j[$].l ? (m(d, $) ? d.h[$].length : 0) : m(d, $) ? 1 : 0; + } + function c(d, $, t) { + (d.h[$] = t), d.g && (d.g[$] = t); + } + function r1(d, $, t) { + d.h[$] || (d.h[$] = []), d.h[$].push(t), d.g && delete d.g[$]; + } + function D(d, $) { + var t = [], + e; + for (e in $) e != 0 && t.push(new W1(e, $[e])); + return new q1(d, t); + } + function F() {} + (F.prototype.g = function (d) { + throw (new d.h(), Error("Unimplemented")); + }), + (F.prototype.h = function (d, $) { + if (d.h == 11 || d.h == 10) + return $ instanceof C ? $ : this.g(d.s.prototype.m(), $); + if (d.h == 14) + return typeof $ == "string" && u1.test($) && ((d = Number($)), 0 < d) + ? d + : $; + if (!d.o) return $; + if (((d = d.s), d === String)) { + if (typeof $ == "number") return String($); + } else if ( + d === Number && + typeof $ == "string" && + ($ === "Infinity" || $ === "-Infinity" || $ === "NaN" || u1.test($)) + ) + return Number($); + return $; + }); + var u1 = /^-?[0-9]+$/; + function J() {} + _(J, F), + (J.prototype.g = function (d, $) { + return (d = new d.h()), (d.l = this), (d.h = $), (d.g = {}), d; + }); + function B() {} + _(B, J), + (B.prototype.h = function (d, $) { + return d.h == 8 ? !!$ : F.prototype.h.apply(this, arguments); + }), + (B.prototype.g = function (d, $) { + return B.ma.g.call(this, d, $); + }); + function h(d, $) { + d != null && this.g.apply(this, arguments); + } + (h.prototype.h = ""), + (h.prototype.set = function (d) { + this.h = "" + d; + }), + (h.prototype.g = function (d, $, t) { + if (((this.h += String(d)), $ != null)) + for (let e = 1; e < arguments.length; e++) this.h += arguments[e]; + return this; + }); + function S(d) { + d.h = ""; + } + h.prototype.toString = function () { + return this.h; + }; + function v() { + C.call(this); + } + _(v, C); + var i1 = null; + function s() { + C.call(this); + } + _(s, C); + var f1 = null; + function R() { + C.call(this); + } + _(R, C); + var o1 = null; + (v.prototype.m = function () { + var d = i1; + return ( + d || + (i1 = d = + D(v, { + 0: { name: "NumberFormat", ia: "i18n.phonenumbers.NumberFormat" }, + 1: { name: "pattern", required: !0, i: 9, type: String }, + 2: { name: "format", required: !0, i: 9, type: String }, + 3: { name: "leading_digits_pattern", aa: !0, i: 9, type: String }, + 4: { name: "national_prefix_formatting_rule", i: 9, type: String }, + 6: { + name: "national_prefix_optional_when_formatting", + i: 8, + defaultValue: !1, + type: Boolean, + }, + 5: { + name: "domestic_carrier_code_formatting_rule", + i: 9, + type: String, + }, + })), + d + ); + }), + (v.m = v.prototype.m), + (s.prototype.m = function () { + var d = f1; + return ( + d || + (f1 = d = + D(s, { + 0: { + name: "PhoneNumberDesc", + ia: "i18n.phonenumbers.PhoneNumberDesc", + }, + 2: { name: "national_number_pattern", i: 9, type: String }, + 9: { name: "possible_length", aa: !0, i: 5, type: Number }, + 10: { + name: "possible_length_local_only", + aa: !0, + i: 5, + type: Number, + }, + 6: { name: "example_number", i: 9, type: String }, + })), + d + ); + }), + (s.m = s.prototype.m), + (R.prototype.m = function () { + var d = o1; + return ( + d || + (o1 = d = + D(R, { + 0: { + name: "PhoneMetadata", + ia: "i18n.phonenumbers.PhoneMetadata", + }, + 1: { name: "general_desc", i: 11, type: s }, + 2: { name: "fixed_line", i: 11, type: s }, + 3: { name: "mobile", i: 11, type: s }, + 4: { name: "toll_free", i: 11, type: s }, + 5: { name: "premium_rate", i: 11, type: s }, + 6: { name: "shared_cost", i: 11, type: s }, + 7: { name: "personal_number", i: 11, type: s }, + 8: { name: "voip", i: 11, type: s }, + 21: { name: "pager", i: 11, type: s }, + 25: { name: "uan", i: 11, type: s }, + 27: { name: "emergency", i: 11, type: s }, + 28: { name: "voicemail", i: 11, type: s }, + 29: { name: "short_code", i: 11, type: s }, + 30: { name: "standard_rate", i: 11, type: s }, + 31: { name: "carrier_specific", i: 11, type: s }, + 33: { name: "sms_services", i: 11, type: s }, + 24: { name: "no_international_dialling", i: 11, type: s }, + 9: { name: "id", required: !0, i: 9, type: String }, + 10: { name: "country_code", i: 5, type: Number }, + 11: { name: "international_prefix", i: 9, type: String }, + 17: { + name: "preferred_international_prefix", + i: 9, + type: String, + }, + 12: { name: "national_prefix", i: 9, type: String }, + 13: { name: "preferred_extn_prefix", i: 9, type: String }, + 15: { name: "national_prefix_for_parsing", i: 9, type: String }, + 16: { + name: "national_prefix_transform_rule", + i: 9, + type: String, + }, + 18: { + name: "same_mobile_and_fixed_line_pattern", + i: 8, + defaultValue: !1, + type: Boolean, + }, + 19: { name: "number_format", aa: !0, i: 11, type: v }, + 20: { name: "intl_number_format", aa: !0, i: 11, type: v }, + 22: { + name: "main_country_for_code", + i: 8, + defaultValue: !1, + type: Boolean, + }, + 23: { name: "leading_digits", i: 9, type: String }, + })), + d + ); + }), + (R.m = R.prototype.m); + function A() { + C.call(this); + } + _(A, C); + var l1 = null, + d2 = { ra: 0, qa: 1, pa: 5, oa: 10, na: 20 }; + (A.prototype.m = function () { + var d = l1; + return ( + d || + (l1 = d = + D(A, { + 0: { name: "PhoneNumber", ia: "i18n.phonenumbers.PhoneNumber" }, + 1: { name: "country_code", required: !0, i: 5, type: Number }, + 2: { name: "national_number", required: !0, i: 4, type: Number }, + 3: { name: "extension", i: 9, type: String }, + 4: { name: "italian_leading_zero", i: 8, type: Boolean }, + 8: { + name: "number_of_leading_zeros", + i: 5, + defaultValue: 1, + type: Number, + }, + 5: { name: "raw_input", i: 9, type: String }, + 6: { + name: "country_code_source", + i: 14, + defaultValue: 0, + type: d2, + }, + 7: { name: "preferred_domestic_carrier_code", i: 9, type: String }, + })), + d + ); + }), + (A.ctor = A), + (A.ctor.m = A.prototype.m); + var w = { + 1: "US AG AI AS BB BM BS CA DM DO GD GU JM KN KY LC MP MS PR SX TC TT VC VG VI".split( + " " + ), + 7: ["RU", "KZ"], + 20: ["EG"], + 27: ["ZA"], + 30: ["GR"], + 31: ["NL"], + 32: ["BE"], + 33: ["FR"], + 34: ["ES"], + 36: ["HU"], + 39: ["IT", "VA"], + 40: ["RO"], + 41: ["CH"], + 43: ["AT"], + 44: ["GB", "GG", "IM", "JE"], + 45: ["DK"], + 46: ["SE"], + 47: ["NO", "SJ"], + 48: ["PL"], + 49: ["DE"], + 51: ["PE"], + 52: ["MX"], + 53: ["CU"], + 54: ["AR"], + 55: ["BR"], + 56: ["CL"], + 57: ["CO"], + 58: ["VE"], + 60: ["MY"], + 61: ["AU", "CC", "CX"], + 62: ["ID"], + 63: ["PH"], + 64: ["NZ"], + 65: ["SG"], + 66: ["TH"], + 81: ["JP"], + 82: ["KR"], + 84: ["VN"], + 86: ["CN"], + 90: ["TR"], + 91: ["IN"], + 92: ["PK"], + 93: ["AF"], + 94: ["LK"], + 95: ["MM"], + 98: ["IR"], + 211: ["SS"], + 212: ["MA", "EH"], + 213: ["DZ"], + 216: ["TN"], + 218: ["LY"], + 220: ["GM"], + 221: ["SN"], + 222: ["MR"], + 223: ["ML"], + 224: ["GN"], + 225: ["CI"], + 226: ["BF"], + 227: ["NE"], + 228: ["TG"], + 229: ["BJ"], + 230: ["MU"], + 231: ["LR"], + 232: ["SL"], + 233: ["GH"], + 234: ["NG"], + 235: ["TD"], + 236: ["CF"], + 237: ["CM"], + 238: ["CV"], + 239: ["ST"], + 240: ["GQ"], + 241: ["GA"], + 242: ["CG"], + 243: ["CD"], + 244: ["AO"], + 245: ["GW"], + 246: ["IO"], + 247: ["AC"], + 248: ["SC"], + 249: ["SD"], + 250: ["RW"], + 251: ["ET"], + 252: ["SO"], + 253: ["DJ"], + 254: ["KE"], + 255: ["TZ"], + 256: ["UG"], + 257: ["BI"], + 258: ["MZ"], + 260: ["ZM"], + 261: ["MG"], + 262: ["RE", "YT"], + 263: ["ZW"], + 264: ["NA"], + 265: ["MW"], + 266: ["LS"], + 267: ["BW"], + 268: ["SZ"], + 269: ["KM"], + 290: ["SH", "TA"], + 291: ["ER"], + 297: ["AW"], + 298: ["FO"], + 299: ["GL"], + 350: ["GI"], + 351: ["PT"], + 352: ["LU"], + 353: ["IE"], + 354: ["IS"], + 355: ["AL"], + 356: ["MT"], + 357: ["CY"], + 358: ["FI", "AX"], + 359: ["BG"], + 370: ["LT"], + 371: ["LV"], + 372: ["EE"], + 373: ["MD"], + 374: ["AM"], + 375: ["BY"], + 376: ["AD"], + 377: ["MC"], + 378: ["SM"], + 380: ["UA"], + 381: ["RS"], + 382: ["ME"], + 383: ["XK"], + 385: ["HR"], + 386: ["SI"], + 387: ["BA"], + 389: ["MK"], + 420: ["CZ"], + 421: ["SK"], + 423: ["LI"], + 500: ["FK"], + 501: ["BZ"], + 502: ["GT"], + 503: ["SV"], + 504: ["HN"], + 505: ["NI"], + 506: ["CR"], + 507: ["PA"], + 508: ["PM"], + 509: ["HT"], + 590: ["GP", "BL", "MF"], + 591: ["BO"], + 592: ["GY"], + 593: ["EC"], + 594: ["GF"], + 595: ["PY"], + 596: ["MQ"], + 597: ["SR"], + 598: ["UY"], + 599: ["CW", "BQ"], + 670: ["TL"], + 672: ["NF"], + 673: ["BN"], + 674: ["NR"], + 675: ["PG"], + 676: ["TO"], + 677: ["SB"], + 678: ["VU"], + 679: ["FJ"], + 680: ["PW"], + 681: ["WF"], + 682: ["CK"], + 683: ["NU"], + 685: ["WS"], + 686: ["KI"], + 687: ["NC"], + 688: ["TV"], + 689: ["PF"], + 690: ["TK"], + 691: ["FM"], + 692: ["MH"], + 800: ["001"], + 808: ["001"], + 850: ["KP"], + 852: ["HK"], + 853: ["MO"], + 855: ["KH"], + 856: ["LA"], + 870: ["001"], + 878: ["001"], + 880: ["BD"], + 881: ["001"], + 882: ["001"], + 883: ["001"], + 886: ["TW"], + 888: ["001"], + 960: ["MV"], + 961: ["LB"], + 962: ["JO"], + 963: ["SY"], + 964: ["IQ"], + 965: ["KW"], + 966: ["SA"], + 967: ["YE"], + 968: ["OM"], + 970: ["PS"], + 971: ["AE"], + 972: ["IL"], + 973: ["BH"], + 974: ["QA"], + 975: ["BT"], + 976: ["MN"], + 977: ["NP"], + 979: ["001"], + 992: ["TJ"], + 993: ["TM"], + 994: ["AZ"], + 995: ["GE"], + 996: ["KG"], + 998: ["UZ"], + }, + s1 = { + AC: [ + , + [, , "(?:[01589]\\d|[46])\\d{4}", , , , , , , [5, 6]], + [, , "6[2-467]\\d{3}", , , , "62889", , , [5]], + [, , "4\\d{4}", , , , "40123", , , [5]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "AC", + 247, + "00", + , + , + , + , + , + , + , + , + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "(?:0[1-9]|[1589]\\d)\\d{4}", , , , "542011", , , [6]], + , + , + [, , , , , , , , , [-1]], + ], + AD: [ + , + [, , "(?:1|6\\d)\\d{7}|[135-9]\\d{5}", , , , , , , [6, 8, 9]], + [, , "[78]\\d{5}", , , , "712345", , , [6]], + [, , "690\\d{6}|[356]\\d{5}", , , , "312345", , , [6, 9]], + [, , "180[02]\\d{4}", , , , "18001234", , , [8]], + [, , "[19]\\d{5}", , , , "912345", , , [6]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "AD", + 376, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{3})(\\d{3})", "$1 $2", ["[135-9]"]], + [, "(\\d{4})(\\d{4})", "$1 $2", ["1"]], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , "1800\\d{4}", , , , , , , [8]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + AE: [ + , + [ + , + , + "(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}", + , + , + , + , + , + , + [5, 6, 7, 8, 9, 10, 11, 12], + ], + [, , "[2-4679][2-8]\\d{6}", , , , "22345678", , , [8], [7]], + [, , "5[024-68]\\d{7}", , , , "501234567", , , [9]], + [, , "400\\d{6}|800\\d{2,9}", , , , "800123456"], + [, , "900[02]\\d{5}", , , , "900234567", , , [9]], + [, , "700[05]\\d{5}", , , , "700012345", , , [9]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "AE", + 971, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{3})(\\d{2,9})", "$1 $2", ["60|8"]], + [, "(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[236]|[479][2-8]"], "0$1"], + [, "(\\d{3})(\\d)(\\d{5})", "$1 $2 $3", ["[479]"]], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["5"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "600[25]\\d{5}", , , , "600212345", , , [9]], + , + , + [, , , , , , , , , [-1]], + ], + AF: [ + , + [, , "[2-7]\\d{8}", , , , , , , [9], [7]], + [ + , + , + "(?:[25][0-8]|[34][0-4]|6[0-5])[2-9]\\d{6}", + , + , + , + "234567890", + , + , + , + [7], + ], + [, , "7\\d{8}", , , , "701234567", , , , [7]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "AF", + 93, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{3})(\\d{4})", "$1 $2", ["[1-9]"]], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-7]"], "0$1"], + ], + [[, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-7]"], "0$1"]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + AG: [ + , + [, , "(?:268|[58]\\d\\d|900)\\d{7}", , , , , , , [10], [7]], + [ + , + , + "268(?:4(?:6[0-38]|84)|56[0-2])\\d{4}", + , + , + , + "2684601234", + , + , + , + [7], + ], + [ + , + , + "268(?:464|7(?:1[3-9]|[28]\\d|3[0246]|64|7[0-689]))\\d{4}", + , + , + , + "2684641234", + , + , + , + [7], + ], + [, , "8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", , , , "8002123456"], + [, , "900[2-9]\\d{6}", , , , "9002123456"], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}", + , + , + , + "5002345678", + ], + [, , "26848[01]\\d{4}", , , , "2684801234", , , , [7]], + "AG", + 1, + "011", + "1", + , + , + "([457]\\d{6})$|1", + "268$1", + , + , + , + , + [, , "26840[69]\\d{4}", , , , "2684061234", , , , [7]], + , + "268", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + AI: [ + , + [, , "(?:264|[58]\\d\\d|900)\\d{7}", , , , , , , [10], [7]], + [ + , + , + "264(?:292|4(?:6[12]|9[78]))\\d{4}", + , + , + , + "2644612345", + , + , + , + [7], + ], + [ + , + , + "264(?:235|4(?:69|76)|5(?:3[6-9]|8[1-4])|7(?:29|72))\\d{4}", + , + , + , + "2642351234", + , + , + , + [7], + ], + [, , "8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", , , , "8002123456"], + [, , "900[2-9]\\d{6}", , , , "9002123456"], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}", + , + , + , + "5002345678", + ], + [, , , , , , , , , [-1]], + "AI", + 1, + "011", + "1", + , + , + "([2457]\\d{6})$|1", + "264$1", + , + , + , + , + [, , "264724\\d{4}", , , , "2647241234", , , , [7]], + , + "264", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + AL: [ + , + [ + , + , + "(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}", + , + , + , + , + , + , + [6, 7, 8, 9], + [5], + ], + [ + , + , + "4505[0-2]\\d{3}|(?:[2358][16-9]\\d[2-9]|4410)\\d{4}|(?:[2358][2-5][2-9]|4(?:[2-57-9][2-9]|6\\d))\\d{5}", + , + , + , + "22345678", + , + , + [8], + [5, 6, 7], + ], + [, , "6(?:[78][2-9]|9\\d)\\d{6}", , , , "672123456", , , [9]], + [, , "800\\d{4}", , , , "8001234", , , [7]], + [, , "900[1-9]\\d\\d", , , , "900123", , , [6]], + [, , "808[1-9]\\d\\d", , , , "808123", , , [6]], + [, , "700[2-9]\\d{4}", , , , "70021234", , , [8]], + [, , , , , , , , , [-1]], + "AL", + 355, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{3})(\\d{3,4})", "$1 $2", ["80|9"], "0$1"], + [, "(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["4[2-6]"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2358][2-5]|4"], "0$1"], + [, "(\\d{3})(\\d{5})", "$1 $2", ["[23578]"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["6"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + AM: [ + , + [, , "(?:[1-489]\\d|55|60|77)\\d{6}", , , , , , , [8], [5, 6]], + [ + , + , + "(?:(?:1[0-25]|47)\\d|2(?:2[2-46]|3[1-8]|4[2-69]|5[2-7]|6[1-9]|8[1-7])|3[12]2)\\d{5}", + , + , + , + "10123456", + , + , + , + [5, 6], + ], + [, , "(?:33|4[1349]|55|77|88|9[13-9])\\d{6}", , , , "77123456"], + [, , "800\\d{5}", , , , "80012345"], + [, , "90[016]\\d{5}", , , , "90012345"], + [, , "80[1-4]\\d{5}", , , , "80112345"], + [, , , , , , , , , [-1]], + [ + , + , + "60(?:2[78]|3[5-9]|4[02-9]|5[0-46-9]|[6-8]\\d|9[0-2])\\d{4}", + , + , + , + "60271234", + ], + "AM", + 374, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[89]0"], "0 $1"], + [, "(\\d{3})(\\d{5})", "$1 $2", ["2|3[12]"], "(0$1)"], + [, "(\\d{2})(\\d{6})", "$1 $2", ["1|47"], "(0$1)"], + [, "(\\d{2})(\\d{6})", "$1 $2", ["[3-9]"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + AO: [ + , + [, , "[29]\\d{8}", , , , , , , [9]], + [, , "2\\d(?:[0134][25-9]|[25-9]\\d)\\d{5}", , , , "222123456"], + [, , "9[1-79]\\d{7}", , , , "923123456"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "AO", + 244, + "00", + , + , + , + , + , + , + , + [[, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[29]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + AR: [ + , + [ + , + , + "(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}", + , + , + , + , + , + , + [10, 11], + [6, 7, 8], + ], + [ + , + , + "3(?:7(?:1[15]|81)|8(?:21|4[16]|69|9[12]))[46]\\d{5}|(?:2(?:2(?:2[59]|44|52)|3(?:26|44)|47[35]|9(?:[07]2|2[26]|34|46))|3327)[45]\\d{5}|(?:2(?:657|9(?:54|66))|3(?:48[27]|7(?:55|77)|8(?:65|78)))[2-8]\\d{5}|(?:2(?:284|3(?:02|23)|477|622|920)|3(?:4(?:46|89|92)|541))[2-7]\\d{5}|(?:(?:11[1-8]|670)\\d|2(?:2(?:0[45]|1[2-6]|3[3-6])|3(?:[06]4|7[45])|494|6(?:04|1[2-8]|[36][45]|4[3-6])|80[45]|9(?:[17][4-6]|[48][45]|9[3-6]))|3(?:364|4(?:1[2-8]|[25][4-6]|3[3-6]|84)|5(?:1[2-9]|[38][4-6])|6(?:2[45]|44)|7[069][45]|8(?:0[45]|1[2-7]|3[4-6]|5[3-6]|7[2-6]|8[3-68])))\\d{6}|(?:2(?:2(?:62|81)|320|9(?:42|83))|3(?:329|4(?:62|7[16])|5(?:43|64)|7(?:18|5[17])))[2-6]\\d{5}|2(?:2(?:21|4[23]|6[145]|7[1-4]|8[356]|9[267])|3(?:16|3[13-8]|43|5[346-8]|9[3-5])|6(?:2[46]|4[78]|5[1568])|9(?:03|2[1457-9]|3[1356]|4[08]|[56][23]|82))4\\d{5}|(?:2(?:257|3(?:24|46|92)|9(?:01|23|64))|3(?:4(?:42|64)|5(?:25|37|4[47]|71)|7(?:35|72)|825))[3-6]\\d{5}|(?:2(?:2(?:02|2[3467]|4[156]|5[45]|6[6-8]|91)|3(?:1[47]|25|[45][25]|96)|47[48]|625|932)|3(?:38[2578]|4(?:0[0-24-9]|3[78]|4[457]|58|6[035-9]|72|83|9[136-8])|5(?:2[124]|[368][23]|4[2689]|7[2-6])|7(?:16|2[15]|3[14]|4[13]|5[468]|7[3-5]|8[26])|8(?:2[67]|3[278]|4[3-5]|5[78]|6[1-378]|[78]7|94)))[4-6]\\d{5}", + , + , + , + "1123456789", + , + , + [10], + [6, 7, 8], + ], + [ + , + , + "93(?:7(?:1[15]|81)|8(?:21|4[16]|69|9[12]))[46]\\d{5}|9(?:2(?:2(?:2[59]|44|52)|3(?:26|44)|47[35]|9(?:[07]2|2[26]|34|46))|3327)[45]\\d{5}|9(?:2(?:657|9(?:54|66))|3(?:48[27]|7(?:55|77)|8(?:65|78)))[2-8]\\d{5}|9(?:2(?:284|3(?:02|23)|477|622|920)|3(?:4(?:46|89|92)|541))[2-7]\\d{5}|(?:675\\d|9(?:11[1-8]\\d|2(?:2(?:0[45]|1[2-6]|3[3-6])|3(?:[06]4|7[45])|494|6(?:04|1[2-8]|[36][45]|4[3-6])|80[45]|9(?:[17][4-6]|[48][45]|9[3-6]))|3(?:364|4(?:1[2-8]|[25][4-6]|3[3-6]|84)|5(?:1[2-9]|[38][4-6])|6(?:2[45]|44)|7[069][45]|8(?:0[45]|1[2-7]|3[4-6]|5[3-6]|7[2-6]|8[3-68]))))\\d{6}|9(?:2(?:2(?:62|81)|320|9(?:42|83))|3(?:329|4(?:62|7[16])|5(?:43|64)|7(?:18|5[17])))[2-6]\\d{5}|92(?:2(?:21|4[23]|6[145]|7[1-4]|8[356]|9[267])|3(?:16|3[13-8]|43|5[346-8]|9[3-5])|6(?:2[46]|4[78]|5[1568])|9(?:03|2[1457-9]|3[1356]|4[08]|[56][23]|82))4\\d{5}|9(?:2(?:257|3(?:24|46|92)|9(?:01|23|64))|3(?:4(?:42|64)|5(?:25|37|4[47]|71)|7(?:35|72)|825))[3-6]\\d{5}|9(?:2(?:2(?:02|2[3467]|4[156]|5[45]|6[6-8]|91)|3(?:1[47]|25|[45][25]|96)|47[48]|625|932)|3(?:38[2578]|4(?:0[0-24-9]|3[78]|4[457]|58|6[035-9]|72|83|9[136-8])|5(?:2[124]|[368][23]|4[2689]|7[2-6])|7(?:16|2[15]|3[14]|4[13]|5[468]|7[3-5]|8[26])|8(?:2[67]|3[278]|4[3-5]|5[78]|6[1-378]|[78]7|94)))[4-6]\\d{5}", + , + , + , + "91123456789", + , + , + , + [6, 7, 8], + ], + [, , "800\\d{7,8}", , , , "8001234567"], + [, , "60[04579]\\d{7}", , , , "6001234567", , , [10]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "AR", + 54, + "00", + "0", + , + , + "0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?", + "9$1", + , + , + [ + [ + , + "(\\d{3})", + "$1", + ["0|1(?:0[0-35-7]|1[02-5]|2[015]|3[47]|4[478])|911"], + ], + [, "(\\d{2})(\\d{4})", "$1-$2", ["[1-9]"]], + [, "(\\d{3})(\\d{4})", "$1-$2", ["[2-9]"]], + [, "(\\d{4})(\\d{4})", "$1-$2", ["[1-8]"]], + [ + , + "(\\d{4})(\\d{2})(\\d{4})", + "$1 $2-$3", + [ + "2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])", + "2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)", + "2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]", + "2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]", + ], + "0$1", + , + 1, + ], + [, "(\\d{2})(\\d{4})(\\d{4})", "$1 $2-$3", ["1"], "0$1", , 1], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["[68]"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2-$3", ["[23]"], "0$1", , 1], + [ + , + "(\\d)(\\d{4})(\\d{2})(\\d{4})", + "$2 15-$3-$4", + [ + "9(?:2[2-469]|3[3-578])", + "9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))", + "9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)", + "9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]", + "9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]", + ], + "0$1", + ], + [, "(\\d)(\\d{2})(\\d{4})(\\d{4})", "$2 15-$3-$4", ["91"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{5})", "$1-$2-$3", ["8"], "0$1"], + [, "(\\d)(\\d{3})(\\d{3})(\\d{4})", "$2 15-$3-$4", ["9"], "0$1"], + ], + [ + [ + , + "(\\d{4})(\\d{2})(\\d{4})", + "$1 $2-$3", + [ + "2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])", + "2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)", + "2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]", + "2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]", + ], + "0$1", + , + 1, + ], + [, "(\\d{2})(\\d{4})(\\d{4})", "$1 $2-$3", ["1"], "0$1", , 1], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["[68]"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2-$3", ["[23]"], "0$1", , 1], + [ + , + "(\\d)(\\d{4})(\\d{2})(\\d{4})", + "$1 $2 $3-$4", + [ + "9(?:2[2-469]|3[3-578])", + "9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))", + "9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)", + "9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]", + "9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]", + ], + ], + [, "(\\d)(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3-$4", ["91"]], + [, "(\\d{3})(\\d{3})(\\d{5})", "$1-$2-$3", ["8"], "0$1"], + [, "(\\d)(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3-$4", ["9"]], + ], + [, , , , , , , , , [-1]], + , + , + [, , "810\\d{7}", , , , , , , [10]], + [, , "810\\d{7}", , , , "8101234567", , , [10]], + , + , + [, , , , , , , , , [-1]], + ], + AS: [ + , + [, , "(?:[58]\\d\\d|684|900)\\d{7}", , , , , , , [10], [7]], + [ + , + , + "6846(?:22|33|44|55|77|88|9[19])\\d{4}", + , + , + , + "6846221234", + , + , + , + [7], + ], + [ + , + , + "684(?:2(?:48|5[2468]|7[26])|7(?:3[13]|70|82))\\d{4}", + , + , + , + "6847331234", + , + , + , + [7], + ], + [, , "8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", , , , "8002123456"], + [, , "900[2-9]\\d{6}", , , , "9002123456"], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}", + , + , + , + "5002345678", + ], + [, , , , , , , , , [-1]], + "AS", + 1, + "011", + "1", + , + , + "([267]\\d{6})$|1", + "684$1", + , + , + , + , + [, , , , , , , , , [-1]], + , + "684", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + AT: [ + , + [ + , + , + "1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}", + , + , + , + , + , + , + [4, 5, 6, 7, 8, 9, 10, 11, 12, 13], + [3], + ], + [ + , + , + "1(?:11\\d|[2-9]\\d{3,11})|(?:316|463)\\d{3,10}|648[34]\\d{3,9}|(?:51|66|73)2\\d{3,10}|(?:2(?:1[467]|2[13-8]|5[2357]|6[1-46-8]|7[1-8]|8[124-7]|9[1458])|3(?:1[1-578]|3[23568]|4[5-7]|5[1378]|6[1-38]|8[3-68])|4(?:2[1-8]|35|7[1368]|8[2457])|5(?:2[1-8]|3[357]|4[147]|5[12578]|6[37])|6(?:13|2[1-47]|4[135-7]|5[468])|7(?:2[1-8]|35|4[13478]|5[68]|6[16-8]|7[1-6]|9[45]))\\d{4,10}", + , + , + , + "1234567890", + , + , + , + [3], + ], + [ + , + , + "6(?:485|(?:5[0-3579]|6[013-9]|[7-9]\\d)\\d)\\d{3,9}", + , + , + , + "664123456", + , + , + [7, 8, 9, 10, 11, 12, 13], + ], + [, , "800\\d{6,10}", , , , "800123456", , , [9, 10, 11, 12, 13]], + [ + , + , + "(?:8[69][2-68]|9(?:0[01]|3[019]))\\d{6,10}", + , + , + , + "900123456", + , + , + [9, 10, 11, 12, 13], + ], + [ + , + , + "8(?:10|2[018])\\d{6,10}|828\\d{5}", + , + , + , + "810123456", + , + , + [8, 9, 10, 11, 12, 13], + ], + [, , , , , , , , , [-1]], + [ + , + , + "5(?:0[1-9]|17|[79]\\d)\\d{2,10}|7[28]0\\d{6,10}", + , + , + , + "780123456", + , + , + [5, 6, 7, 8, 9, 10, 11, 12, 13], + ], + "AT", + 43, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{4})", "$1", ["14"]], + [, "(\\d)(\\d{3,12})", "$1 $2", ["1(?:11|[2-9])"], "0$1"], + [, "(\\d{3})(\\d{2})", "$1 $2", ["517"], "0$1"], + [, "(\\d{2})(\\d{3,5})", "$1 $2", ["5[079]"], "0$1"], + [, "(\\d{6})", "$1", ["[18]"]], + [ + , + "(\\d{3})(\\d{3,10})", + "$1 $2", + [ + "(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]", + "(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]", + ], + "0$1", + ], + [, "(\\d{4})(\\d{3,9})", "$1 $2", ["[2-467]|5[2-6]"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["5"], "0$1"], + [, "(\\d{2})(\\d{4})(\\d{4,7})", "$1 $2 $3", ["5"], "0$1"], + ], + [ + [, "(\\d)(\\d{3,12})", "$1 $2", ["1(?:11|[2-9])"], "0$1"], + [, "(\\d{3})(\\d{2})", "$1 $2", ["517"], "0$1"], + [, "(\\d{2})(\\d{3,5})", "$1 $2", ["5[079]"], "0$1"], + [ + , + "(\\d{3})(\\d{3,10})", + "$1 $2", + [ + "(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]", + "(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]", + ], + "0$1", + ], + [, "(\\d{4})(\\d{3,9})", "$1 $2", ["[2-467]|5[2-6]"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["5"], "0$1"], + [, "(\\d{2})(\\d{4})(\\d{4,7})", "$1 $2 $3", ["5"], "0$1"], + ], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + AU: [ + , + [ + , + , + "1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}", + , + , + , + , + , + , + [5, 6, 7, 8, 9, 10, 12], + ], + [ + , + , + "(?:(?:2(?:(?:[0-26-9]\\d|3[0-8]|5[0135-9])\\d|4(?:[02-9]\\d|10))|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90))|7(?:[013-57-9]\\d|2[0-8])\\d)\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}", + , + , + , + "212345678", + , + , + [9], + [8], + ], + [ + , + , + "4(?:79[01]|83[0-389]|94[0-478])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-37-9])\\d{6}", + , + , + , + "412345678", + , + , + [9], + ], + [, , "180(?:0\\d{3}|2)\\d{3}", , , , "1800123456", , , [7, 10]], + [, , "190[0-26]\\d{6}", , , , "1900123456", , , [10]], + [ + , + , + "13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", + , + , + , + "1300123456", + , + , + [6, 8, 10, 12], + ], + [, , , , , , , , , [-1]], + [ + , + , + "14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}", + , + , + , + "147101234", + , + , + [9], + ], + "AU", + 61, + "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", + "0", + , + , + "(183[12])|0", + , + "0011", + , + [ + [, "(\\d{2})(\\d{3,4})", "$1 $2", ["16"], "0$1"], + [, "(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["13"]], + [, "(\\d{3})(\\d{3})", "$1 $2", ["19"]], + [, "(\\d{3})(\\d{4})", "$1 $2", ["180", "1802"]], + [, "(\\d{4})(\\d{3,4})", "$1 $2", ["19"]], + [, "(\\d{2})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["16"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["14|4"], "0$1"], + [ + , + "(\\d)(\\d{4})(\\d{4})", + "$1 $2 $3", + ["[2378]"], + "(0$1)", + "$CC ($1)", + ], + [, "(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1(?:30|[89])"]], + [, "(\\d{4})(\\d{4})(\\d{4})", "$1 $2 $3", ["130"]], + ], + [ + [, "(\\d{2})(\\d{3,4})", "$1 $2", ["16"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["16"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["14|4"], "0$1"], + [ + , + "(\\d)(\\d{4})(\\d{4})", + "$1 $2 $3", + ["[2378]"], + "(0$1)", + "$CC ($1)", + ], + [, "(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1(?:30|[89])"]], + ], + [, , "163\\d{2,6}", , , , "1631234", , , [5, 6, 7, 8, 9]], + 1, + , + [ + , + , + "1(?:3(?:00\\d{5}|45[0-4])|802)\\d{3}|1[38]00\\d{6}|13\\d{4}", + , + , + , + , + , + , + [6, 7, 8, 10, 12], + ], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + AW: [ + , + [, , "(?:[25-79]\\d\\d|800)\\d{4}", , , , , , , [7]], + [, , "5(?:2\\d|8[1-9])\\d{4}", , , , "5212345"], + [ + , + , + "(?:290|5[69]\\d|6(?:[03]0|22|4[0-2]|[69]\\d)|7(?:[34]\\d|7[07])|9(?:6[45]|9[4-8]))\\d{4}", + , + , + , + "5601234", + ], + [, , "800\\d{4}", , , , "8001234"], + [, , "900\\d{4}", , , , "9001234"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "(?:28\\d|501)\\d{4}", , , , "5011234"], + "AW", + 297, + "00", + , + , + , + , + , + , + , + [[, "(\\d{3})(\\d{4})", "$1 $2", ["[25-9]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + AX: [ + , + [ + , + , + "2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}", + , + , + , + , + , + , + [5, 6, 7, 8, 9, 10, 11, 12], + ], + [, , "18[1-8]\\d{3,6}", , , , "181234567", , , [6, 7, 8, 9]], + [ + , + , + "4946\\d{2,6}|(?:4[0-8]|50)\\d{4,8}", + , + , + , + "412345678", + , + , + [6, 7, 8, 9, 10], + ], + [, , "800\\d{4,6}", , , , "800123456", , , [7, 8, 9]], + [, , "[67]00\\d{5,6}", , , , "600123456", , , [8, 9]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "AX", + 358, + "00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))", + "0", + , + , + "0", + , + "00", + , + , + , + [, , , , , , , , , [-1]], + , + "18", + [, , , , , , , , , [-1]], + [ + , + , + "20\\d{4,8}|60[12]\\d{5,6}|7(?:099\\d{4,5}|5[03-9]\\d{3,7})|20[2-59]\\d\\d|(?:606|7(?:0[78]|1|3\\d))\\d{7}|(?:10|29|3[09]|70[1-5]\\d)\\d{4,8}", + , + , + , + "10112345", + ], + , + , + [, , , , , , , , , [-1]], + ], + AZ: [ + , + [, , "365\\d{6}|(?:[124579]\\d|60|88)\\d{7}", , , , , , , [9], [7]], + [ + , + , + "(?:2[12]428|3655[02])\\d{4}|(?:2(?:22[0-79]|63[0-28])|3654)\\d{5}|(?:(?:1[28]|46)\\d|2(?:[014-6]2|[23]3))\\d{6}", + , + , + , + "123123456", + , + , + , + [7], + ], + [ + , + , + "36554\\d{4}|(?:[16]0|4[04]|5[015]|7[07]|99)\\d{7}", + , + , + , + "401234567", + ], + [, , "88\\d{7}", , , , "881234567"], + [, , "900200\\d{3}", , , , "900200123"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "AZ", + 994, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[1-9]"]], + [, "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["90"], "0$1"], + [ + , + "(\\d{2})(\\d{3})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + [ + "1[28]|2|365|46", + "1[28]|2|365[45]|46", + "1[28]|2|365(?:4|5[02])|46", + ], + "(0$1)", + ], + [ + , + "(\\d{2})(\\d{3})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["[13-9]"], + "0$1", + ], + ], + [ + [, "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["90"], "0$1"], + [ + , + "(\\d{2})(\\d{3})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + [ + "1[28]|2|365|46", + "1[28]|2|365[45]|46", + "1[28]|2|365(?:4|5[02])|46", + ], + "(0$1)", + ], + [ + , + "(\\d{2})(\\d{3})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["[13-9]"], + "0$1", + ], + ], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + BA: [ + , + [, , "6\\d{8}|(?:[35689]\\d|49|70)\\d{6}", , , , , , , [8, 9], [6]], + [ + , + , + "(?:3(?:[05-79][2-9]|1[4579]|[23][24-9]|4[2-4689]|8[2457-9])|49[2-579]|5(?:0[2-49]|[13][2-9]|[268][2-4679]|4[4689]|5[2-79]|7[2-69]|9[2-4689]))\\d{5}", + , + , + , + "30212345", + , + , + [8], + [6], + ], + [, , "6040\\d{5}|6(?:03|[1-356]|44|7\\d)\\d{6}", , , , "61123456"], + [, , "8[08]\\d{6}", , , , "80123456", , , [8]], + [, , "9[0246]\\d{6}", , , , "90123456", , , [8]], + [, , "8[12]\\d{6}", , , , "82123456", , , [8]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "BA", + 387, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{3})(\\d{3})", "$1-$2", ["[2-9]"]], + [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["6[1-3]|[7-9]"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2-$3", ["[3-5]|6[56]"], "0$1"], + [, "(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["6"], "0$1"], + ], + [ + [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["6[1-3]|[7-9]"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2-$3", ["[3-5]|6[56]"], "0$1"], + [, "(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["6"], "0$1"], + ], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [ + , + , + "703[235]0\\d{3}|70(?:2[0-5]|3[0146]|[56]0)\\d{4}", + , + , + , + "70341234", + , + , + [8], + ], + , + , + [, , , , , , , , , [-1]], + ], + BB: [ + , + [, , "(?:246|[58]\\d\\d|900)\\d{7}", , , , , , , [10], [7]], + [ + , + , + "246521[0369]\\d{3}|246(?:2(?:2[78]|7[0-4])|4(?:1[024-6]|2\\d|3[2-9])|5(?:20|[34]\\d|54|7[1-3])|6(?:2\\d|38)|7[35]7|9(?:1[89]|63))\\d{4}", + , + , + , + "2464123456", + , + , + , + [7], + ], + [ + , + , + "246(?:(?:2(?:[3568]\\d|4[0-57-9])|3(?:5[2-9]|6[0-6])|4(?:46|5\\d)|69[5-7]|8(?:[2-5]\\d|83))\\d|52(?:1[147]|20))\\d{3}", + , + , + , + "2462501234", + , + , + , + [7], + ], + [, , "8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", , , , "8002123456"], + [, , "(?:246976|900[2-9]\\d\\d)\\d{4}", , , , "9002123456", , , , [7]], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}", + , + , + , + "5002345678", + ], + [, , "24631\\d{5}", , , , "2463101234", , , , [7]], + "BB", + 1, + "011", + "1", + , + , + "([2-9]\\d{6})$|1", + "246$1", + , + , + , + , + [, , , , , , , , , [-1]], + , + "246", + [, , , , , , , , , [-1]], + [ + , + , + "246(?:292|367|4(?:1[7-9]|3[01]|4[47-9]|67)|7(?:1[2-9]|2\\d|3[016]|53))\\d{4}", + , + , + , + "2464301234", + , + , + , + [7], + ], + , + , + [, , , , , , , , , [-1]], + ], + BD: [ + , + [ + , + , + "[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}", + , + , + , + , + , + , + [6, 7, 8, 9, 10], + ], + [ + , + , + "(?:4(?:31\\d\\d|423)|5222)\\d{3}(?:\\d{2})?|8332[6-9]\\d\\d|(?:3(?:03[56]|224)|4(?:22[25]|653))\\d{3,4}|(?:3(?:42[47]|529|823)|4(?:027|525|65(?:28|8))|562|6257|7(?:1(?:5[3-5]|6[12]|7[156]|89)|22[589]56|32|42675|52(?:[25689](?:56|8)|[347]8)|71(?:6[1267]|75|89)|92374)|82(?:2[59]|32)56|9(?:03[23]56|23(?:256|373)|31|5(?:1|2[4589]56)))\\d{3}|(?:3(?:02[348]|22[35]|324|422)|4(?:22[67]|32[236-9]|6(?:2[46]|5[57])|953)|5526|6(?:024|6655)|81)\\d{4,5}|(?:2(?:7(?:1[0-267]|2[0-289]|3[0-29]|4[01]|5[1-3]|6[013]|7[0178]|91)|8(?:0[125]|1[1-6]|2[0157-9]|3[1-69]|41|6[1-35]|7[1-5]|8[1-8]|9[0-6])|9(?:0[0-2]|1[0-4]|2[568]|3[3-6]|5[5-7]|6[0136-9]|7[0-7]|8[014-9]))|3(?:0(?:2[025-79]|3[2-4])|181|22[12]|32[2356]|824)|4(?:02[09]|22[348]|32[045]|523|6(?:27|54))|666(?:22|53)|7(?:22[57-9]|42[56]|82[35])8|8(?:0[124-9]|2(?:181|2[02-4679]8)|4[12]|[5-7]2)|9(?:[04]2|2(?:2|328)|81))\\d{4}|(?:2(?:[23]\\d|[45])\\d\\d|3(?:1(?:2[5-7]|[5-7])|425|822)|4(?:033|1\\d|[257]1|332|4(?:2[246]|5[25])|6(?:2[35]|56|62)|8(?:23|54)|92[2-5])|5(?:02[03489]|22[457]|32[35-79]|42[46]|6(?:[18]|53)|724|826)|6(?:023|2(?:2[2-5]|5[3-5]|8)|32[3478]|42[34]|52[47]|6(?:[18]|6(?:2[34]|5[24]))|[78]2[2-5]|92[2-6])|7(?:02|21\\d|[3-589]1|6[12]|72[24])|8(?:217|3[12]|[5-7]1)|9[24]1)\\d{5}|(?:(?:3[2-8]|5[2-57-9]|6[03-589])1|4[4689][18])\\d{5}|[59]1\\d{5}", + , + , + , + "27111234", + ], + [ + , + , + "(?:1[13-9]\\d|644)\\d{7}|(?:3[78]|44|66)[02-9]\\d{7}", + , + , + , + "1812345678", + , + , + [10], + ], + [, , "80[03]\\d{7}", , , , "8001234567", , , [10]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [ + , + , + "96(?:0[469]|1[0-47]|3[389]|43|6[69]|7[78])\\d{6}", + , + , + , + "9604123456", + , + , + [10], + ], + "BD", + 880, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{2})(\\d{4,6})", "$1-$2", ["31[5-8]|[459]1"], "0$1"], + [ + , + "(\\d{3})(\\d{3,7})", + "$1-$2", + [ + "3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]", + ], + "0$1", + ], + [, "(\\d{4})(\\d{3,6})", "$1-$2", ["[13-9]|2[23]"], "0$1"], + [, "(\\d)(\\d{7,8})", "$1-$2", ["2"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + BE: [ + , + [, , "4\\d{8}|[1-9]\\d{7}", , , , , , , [8, 9]], + [ + , + , + "80[2-8]\\d{5}|(?:1[0-69]|[23][2-8]|4[23]|5\\d|6[013-57-9]|71|8[1-79]|9[2-4])\\d{6}", + , + , + , + "12345678", + , + , + [8], + ], + [, , "4[5-9]\\d{7}", , , , "470123456", , , [9]], + [, , "800[1-9]\\d{4}", , , , "80012345", , , [8]], + [ + , + , + "(?:70(?:2[0-57]|3[04-7]|44|6[04-69]|7[0579])|90\\d\\d)\\d{4}", + , + , + , + "90012345", + , + , + [8], + ], + [, , "7879\\d{4}", , , , "78791234", , , [8]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "BE", + 32, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["(?:80|9)0"], "0$1"], + [ + , + "(\\d)(\\d{3})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["[239]|4[23]"], + "0$1", + ], + [ + , + "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["[15-8]"], + "0$1", + ], + [, "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["4"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [ + , + , + "78(?:0[578]|1[014-8]|2[25]|3[15-8]|48|5[05]|60|7[06-8]|9\\d)\\d{4}", + , + , + , + "78102345", + , + , + [8], + ], + , + , + [, , , , , , , , , [-1]], + ], + BF: [ + , + [, , "(?:[025-7]\\d|44)\\d{6}", , , , , , , [8]], + [ + , + , + "2(?:0(?:49|5[23]|6[5-7]|9[016-9])|4(?:4[569]|5[4-6]|6[5-7]|7[0179])|5(?:[34]\\d|50|6[5-7]))\\d{4}", + , + , + , + "20491234", + ], + [, , "(?:0[1-7]|44|5[0-8]|[67]\\d)\\d{6}", , , , "70123456"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "BF", + 226, + "00", + , + , + , + , + , + , + , + [[, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[024-7]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + BG: [ + , + [ + , + , + "00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}", + , + , + , + , + , + , + [6, 7, 8, 9, 12], + [4, 5], + ], + [ + , + , + "2\\d{5,7}|(?:43[1-6]|70[1-9])\\d{4,5}|(?:[36]\\d|4[124-7]|[57][1-9]|8[1-6]|9[1-7])\\d{5,6}", + , + , + , + "2123456", + , + , + [6, 7, 8], + [4, 5], + ], + [ + , + , + "(?:43[07-9]|99[69]\\d)\\d{5}|(?:8[7-9]|98)\\d{7}", + , + , + , + "43012345", + , + , + [8, 9], + ], + [, , "(?:00800\\d\\d|800)\\d{5}", , , , "80012345", , , [8, 12]], + [, , "90\\d{6}", , , , "90123456", , , [8]], + [, , "700\\d{5}", , , , "70012345", , , [8]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "BG", + 359, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{6})", "$1", ["1"]], + [, "(\\d)(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["2"], "0$1"], + [, "(\\d{3})(\\d{4})", "$1 $2", ["43[1-6]|70[1-9]"], "0$1"], + [, "(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2"], "0$1"], + [ + , + "(\\d{2})(\\d{3})(\\d{2,3})", + "$1 $2 $3", + ["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"], + "0$1", + ], + [, "(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["(?:70|8)0"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3", ["43[1-7]|7"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[48]|9[08]"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1"], + ], + [ + [, "(\\d)(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["2"], "0$1"], + [, "(\\d{3})(\\d{4})", "$1 $2", ["43[1-6]|70[1-9]"], "0$1"], + [, "(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2"], "0$1"], + [ + , + "(\\d{2})(\\d{3})(\\d{2,3})", + "$1 $2 $3", + ["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"], + "0$1", + ], + [, "(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["(?:70|8)0"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3", ["43[1-7]|7"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[48]|9[08]"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1"], + ], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + BH: [ + , + [, , "[136-9]\\d{7}", , , , , , , [8]], + [ + , + , + "(?:1(?:3[1356]|6[0156]|7\\d)\\d|6(?:1[16]\\d|500|6(?:0\\d|3[12]|44|55|7[7-9]|88)|9[69][69])|7(?:[07]\\d\\d|1(?:11|78)))\\d{4}", + , + , + , + "17001234", + ], + [ + , + , + "(?:3(?:[0-79]\\d|8[0-57-9])\\d|6(?:3(?:00|33|6[16])|441|6(?:3[03-9]|[69]\\d|7[0-689])))\\d{4}", + , + , + , + "36001234", + ], + [, , "8[02369]\\d{6}", , , , "80123456"], + [, , "(?:87|9[0-8])\\d{6}", , , , "90123456"], + [, , "84\\d{6}", , , , "84123456"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "BH", + 973, + "00", + , + , + , + , + , + , + , + [[, "(\\d{4})(\\d{4})", "$1 $2", ["[13679]|8[02-4679]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + BI: [ + , + [, , "(?:[267]\\d|31)\\d{6}", , , , , , , [8]], + [, , "(?:22|31)\\d{6}", , , , "22201234"], + [, , "(?:29|6[124-9]|7[125-9])\\d{6}", , , , "79561234"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "BI", + 257, + "00", + , + , + , + , + , + , + , + [[, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2367]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + BJ: [ + , + [, , "(?:01\\d|[24-689])\\d{7}", , , , , , , [8, 10]], + [ + , + , + "2090\\d{4}|(?:012\\d\\d|2(?:02|1[037]|2[45]|3[68]|4\\d))\\d{5}", + , + , + , + "0120211234", + ], + [ + , + , + "(?:01(?:2[5-9]|[4-69]\\d)|4[0-8]|[56]\\d|9[013-9])\\d{6}", + , + , + , + "0195123456", + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "857[58]\\d{4}", , , , "85751234", , , [8]], + "BJ", + 229, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24-689]"]], + [ + , + "(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})", + "$1 $2 $3 $4 $5", + ["0"], + ], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "81\\d{6}", , , , "81123456", , , [8]], + , + , + [, , , , , , , , , [-1]], + ], + BL: [ + , + [, , "(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}", , , , , , , [9]], + [, , "590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}", , , , "590271234"], + [ + , + , + "(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}", + , + , + , + "690001234", + ], + [, , "80[0-5]\\d{6}", , , , "800012345"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}", , , , "976012345"], + "BL", + 590, + "00", + "0", + , + , + "0", + , + , + , + , + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + BM: [ + , + [, , "(?:441|[58]\\d\\d|900)\\d{7}", , , , , , , [10], [7]], + [ + , + , + "441(?:[46]\\d\\d|5(?:4\\d|60|89))\\d{4}", + , + , + , + "4414123456", + , + , + , + [7], + ], + [ + , + , + "441(?:[2378]\\d|5[0-39]|9[02])\\d{5}", + , + , + , + "4413701234", + , + , + , + [7], + ], + [, , "8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", , , , "8002123456"], + [, , "900[2-9]\\d{6}", , , , "9002123456"], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}", + , + , + , + "5002345678", + ], + [, , , , , , , , , [-1]], + "BM", + 1, + "011", + "1", + , + , + "([2-9]\\d{6})$|1", + "441$1", + , + , + , + , + [, , , , , , , , , [-1]], + , + "441", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + BN: [ + , + [, , "[2-578]\\d{6}", , , , , , , [7]], + [ + , + , + "22[0-7]\\d{4}|(?:2[013-9]|[34]\\d|5[0-25-9])\\d{5}", + , + , + , + "2345678", + ], + [, , "(?:22[89]|[78]\\d\\d)\\d{4}", , , , "7123456"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "5[34]\\d{5}", , , , "5345678"], + "BN", + 673, + "00", + , + , + , + , + , + , + , + [[, "(\\d{3})(\\d{4})", "$1 $2", ["[2-578]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + BO: [ + , + [, , "8001\\d{5}|(?:[2-467]\\d|50)\\d{6}", , , , , , , [8, 9], [7]], + [ + , + , + "(?:2(?:2\\d\\d|5(?:11|[258]\\d|9[67])|6(?:12|2\\d|9[34])|8(?:2[34]|39|62))|3(?:3\\d\\d|4(?:6\\d|8[24])|8(?:25|42|5[257]|86|9[25])|9(?:[27]\\d|3[2-4]|4[248]|5[24]|6[2-6]))|4(?:4\\d\\d|6(?:11|[24689]\\d|72)))\\d{4}", + , + , + , + "22123456", + , + , + [8], + [7], + ], + [, , "[67]\\d{7}", , , , "71234567", , , [8]], + [, , "8001[07]\\d{4}", , , , "800171234", , , [9]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "50\\d{6}", , , , "50123456", , , [8], [7]], + "BO", + 591, + "00(?:1\\d)?", + "0", + , + , + "0(1\\d)?", + , + , + , + [ + [, "(\\d)(\\d{7})", "$1 $2", ["[235]|4[46]"], , "0$CC $1"], + [, "(\\d{8})", "$1", ["[67]"], , "0$CC $1"], + [, "(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["8"], , "0$CC $1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , "8001[07]\\d{4}", , , , , , , [9]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + BQ: [ + , + [, , "(?:[34]1|7\\d)\\d{5}", , , , , , , [7]], + [ + , + , + "(?:318[023]|41(?:6[023]|70)|7(?:1[578]|2[05]|50)\\d)\\d{3}", + , + , + , + "7151234", + ], + [ + , + , + "(?:31(?:8[14-8]|9[14578])|416[14-9]|7(?:0[01]|7[07]|8\\d|9[056])\\d)\\d{3}", + , + , + , + "3181234", + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "BQ", + 599, + "00", + , + , + , + , + , + , + , + , + , + [, , , , , , , , , [-1]], + , + "[347]", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + BR: [ + , + [ + , + , + "[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}", + , + , + , + , + , + , + [8, 9, 10, 11], + ], + [ + , + , + "(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-5]\\d{7}", + , + , + , + "1123456789", + , + , + [10], + [8], + ], + [ + , + , + "(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])(?:7|9\\d)\\d{7}", + , + , + , + "11961234567", + , + , + [10, 11], + [8, 9], + ], + [, , "800\\d{6,7}", , , , "800123456", , , [9, 10]], + [, , "[59]00\\d{6,7}", , , , "500123456", , , [9, 10]], + [ + , + , + "(?:30[03]\\d{3}|4(?:0(?:0\\d|20)|370|864))\\d{4}|300\\d{5}", + , + , + , + "40041234", + , + , + [8, 10], + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "BR", + 55, + "00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)", + "0", + , + , + "(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?", + "$2", + , + , + [ + [ + , + "(\\d{3,6})", + "$1", + [ + "1(?:1[25-8]|2[357-9]|3[02-68]|4[12568]|5|6[0-8]|8[015]|9[0-47-9])|321|610", + ], + ], + [ + , + "(\\d{4})(\\d{4})", + "$1-$2", + ["300|4(?:0[02]|37|86)", "300|4(?:0(?:0|20)|370|864)"], + ], + [ + , + "(\\d{4})(\\d{4})", + "$1-$2", + ["[2-57]", "[2357]|4(?:[0-24-9]|3(?:[0-689]|7[1-9]))"], + ], + [ + , + "(\\d{3})(\\d{2,3})(\\d{4})", + "$1 $2 $3", + ["(?:[358]|90)0"], + "0$1", + ], + [, "(\\d{5})(\\d{4})", "$1-$2", ["9"]], + [ + , + "(\\d{2})(\\d{4})(\\d{4})", + "$1 $2-$3", + ["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"], + "($1)", + "0 $CC ($1)", + ], + [ + , + "(\\d{2})(\\d{5})(\\d{4})", + "$1 $2-$3", + ["[16][1-9]|[2-57-9]"], + "($1)", + "0 $CC ($1)", + ], + ], + [ + [ + , + "(\\d{4})(\\d{4})", + "$1-$2", + ["300|4(?:0[02]|37|86)", "300|4(?:0(?:0|20)|370|864)"], + ], + [ + , + "(\\d{3})(\\d{2,3})(\\d{4})", + "$1 $2 $3", + ["(?:[358]|90)0"], + "0$1", + ], + [ + , + "(\\d{2})(\\d{4})(\\d{4})", + "$1 $2-$3", + ["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"], + "($1)", + "0 $CC ($1)", + ], + [ + , + "(\\d{2})(\\d{5})(\\d{4})", + "$1 $2-$3", + ["[16][1-9]|[2-57-9]"], + "($1)", + "0 $CC ($1)", + ], + ], + [, , , , , , , , , [-1]], + , + , + [ + , + , + "(?:30[03]\\d{3}|4(?:0(?:0\\d|20)|864))\\d{4}|800\\d{6,7}|300\\d{5}", + , + , + , + , + , + , + [8, 9, 10], + ], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + BS: [ + , + [, , "(?:242|[58]\\d\\d|900)\\d{7}", , , , , , , [10], [7]], + [ + , + , + "242(?:3(?:02|[236][1-9]|4[0-24-9]|5[0-68]|7[347]|8[0-4]|9[2-467])|461|502|6(?:0[1-5]|12|2[013]|[45]0|7[67]|8[78]|9[89])|7(?:02|88))\\d{4}", + , + , + , + "2423456789", + , + , + , + [7], + ], + [ + , + , + "242(?:3(?:5[79]|7[56]|95)|4(?:[23][1-9]|4[1-35-9]|5[1-8]|6[2-8]|7\\d|81)|5(?:2[45]|3[35]|44|5[1-46-9]|65|77)|6[34]6|7(?:27|38)|8(?:0[1-9]|1[02-9]|2\\d|3[0-4]|[89]9))\\d{4}", + , + , + , + "2423591234", + , + , + , + [7], + ], + [ + , + , + "242300\\d{4}|8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", + , + , + , + "8002123456", + , + , + , + [7], + ], + [, , "900[2-9]\\d{6}", , , , "9002123456"], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}", + , + , + , + "5002345678", + ], + [, , , , , , , , , [-1]], + "BS", + 1, + "011", + "1", + , + , + "([3-8]\\d{6})$|1", + "242$1", + , + , + , + , + [, , , , , , , , , [-1]], + , + "242", + [, , , , , , , , , [-1]], + [, , "242225\\d{4}", , , , "2422250123"], + , + , + [, , , , , , , , , [-1]], + ], + BT: [ + , + [, , "[17]\\d{7}|[2-8]\\d{6}", , , , , , , [7, 8], [6]], + [ + , + , + "(?:2[3-6]|[34][5-7]|5[236]|6[2-46]|7[246]|8[2-4])\\d{5}", + , + , + , + "2345678", + , + , + [7], + [6], + ], + [, , "(?:1[67]|77)\\d{6}", , , , "17123456", , , [8]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "BT", + 975, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{3})(\\d{3})", "$1 $2", ["[2-7]"]], + [, "(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-68]|7[246]"]], + [, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[67]|7"]], + ], + [ + [, "(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-68]|7[246]"]], + [, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[67]|7"]], + ], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + BW: [ + , + [ + , + , + "(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}", + , + , + , + , + , + , + [7, 8, 10], + ], + [ + , + , + "(?:2(?:4[0-48]|6[0-24]|9[0578])|3(?:1[0-35-9]|55|[69]\\d|7[013]|81)|4(?:6[03]|7[1267]|9[0-5])|5(?:3[03489]|4[0489]|7[1-47]|88|9[0-49])|6(?:2[1-35]|5[149]|8[013467]))\\d{4}", + , + , + , + "2401234", + , + , + [7], + ], + [, , "(?:321|7[1-8]\\d)\\d{5}", , , , "71123456", , , [8]], + [, , "(?:0800|800\\d)\\d{6}", , , , "0800012345", , , [10]], + [, , "90\\d{5}", , , , "9012345", , , [7]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [ + , + , + "79(?:1(?:[0-2]\\d|3[0-8])|2[0-7]\\d)\\d{3}", + , + , + , + "79101234", + , + , + [8], + ], + "BW", + 267, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{2})(\\d{5})", "$1 $2", ["90"]], + [, "(\\d{3})(\\d{4})", "$1 $2", ["[24-6]|3[15-9]"]], + [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[37]"]], + [, "(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["0"]], + [, "(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["8"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + BY: [ + , + [ + , + , + "(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}", + , + , + , + , + , + , + [6, 7, 8, 9, 10, 11], + [5], + ], + [ + , + , + "(?:1(?:5(?:1[1-5]|[24]\\d|6[2-4]|9[1-7])|6(?:[235]\\d|4[1-7])|7\\d\\d)|2(?:1(?:[246]\\d|3[0-35-9]|5[1-9])|2(?:[235]\\d|4[0-8])|3(?:[26]\\d|3[02-79]|4[024-7]|5[03-7])))\\d{5}", + , + , + , + "152450911", + , + , + [9], + [5, 6, 7], + ], + [ + , + , + "(?:2(?:5[5-79]|9[1-9])|(?:33|44)\\d)\\d{6}", + , + , + , + "294911911", + , + , + [9], + ], + [, , "800\\d{3,7}|8(?:0[13]|20\\d)\\d{7}", , , , "8011234567"], + [, , "(?:810|902)\\d{7}", , , , "9021234567", , , [10]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "249\\d{6}", , , , "249123456", , , [9]], + "BY", + 375, + "810", + "8", + , + , + "0|80?", + , + "8~10", + , + [ + [, "(\\d{3})(\\d{3})", "$1 $2", ["800"], "8 $1"], + [, "(\\d{3})(\\d{2})(\\d{2,4})", "$1 $2 $3", ["800"], "8 $1"], + [ + , + "(\\d{4})(\\d{2})(\\d{3})", + "$1 $2-$3", + [ + "1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])", + "1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])", + ], + "8 0$1", + ], + [ + , + "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", + "$1 $2-$3-$4", + ["1(?:[56]|7[467])|2[1-3]"], + "8 0$1", + ], + [ + , + "(\\d{2})(\\d{3})(\\d{2})(\\d{2})", + "$1 $2-$3-$4", + ["[1-4]"], + "8 0$1", + ], + [, "(\\d{3})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["[89]"], "8 $1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , "800\\d{3,7}|(?:8(?:0[13]|10|20\\d)|902)\\d{7}"], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + BZ: [ + , + [, , "(?:0800\\d|[2-8])\\d{6}", , , , , , , [7, 11]], + [ + , + , + "(?:2(?:[02]\\d|36|[68]0)|[3-58](?:[02]\\d|[68]0)|7(?:[02]\\d|32|[68]0))\\d{4}", + , + , + , + "2221234", + , + , + [7], + ], + [, , "6[0-35-7]\\d{5}", , , , "6221234", , , [7]], + [, , "0800\\d{7}", , , , "08001234123", , , [11]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "BZ", + 501, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{3})(\\d{4})", "$1-$2", ["[2-8]"]], + [, "(\\d)(\\d{3})(\\d{4})(\\d{3})", "$1-$2-$3-$4", ["0"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + CA: [ + , + [, , "[2-9]\\d{9}|3\\d{6}", , , , , , , [7, 10]], + [ + , + , + "(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}", + , + , + , + "5062345678", + , + , + [10], + [7], + ], + [ + , + , + "(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}", + , + , + , + "5062345678", + , + , + [10], + [7], + ], + [ + , + , + "8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", + , + , + , + "8002123456", + , + , + [10], + ], + [, , "900[2-9]\\d{6}", , , , "9002123456", , , [10]], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|33|44|66|77|88)|6(?:22|33))[2-9]\\d{6}", + , + , + , + "5219023456", + , + , + [10], + ], + [, , "600[2-9]\\d{6}", , , , "6002012345", , , [10]], + "CA", + 1, + "011", + "1", + , + , + "1", + , + , + 1, + , + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "310\\d{4}", , , , "3101234", , , [7]], + , + , + [, , , , , , , , , [-1]], + ], + CC: [ + , + [ + , + , + "1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}", + , + , + , + , + , + , + [6, 7, 8, 9, 10, 12], + ], + [ + , + , + "8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}", + , + , + , + "891621234", + , + , + [9], + [8], + ], + [ + , + , + "4(?:79[01]|83[0-389]|94[0-478])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-37-9])\\d{6}", + , + , + , + "412345678", + , + , + [9], + ], + [, , "180(?:0\\d{3}|2)\\d{3}", , , , "1800123456", , , [7, 10]], + [, , "190[0-26]\\d{6}", , , , "1900123456", , , [10]], + [ + , + , + "13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", + , + , + , + "1300123456", + , + , + [6, 8, 10, 12], + ], + [, , , , , , , , , [-1]], + [ + , + , + "14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}", + , + , + , + "147101234", + , + , + [9], + ], + "CC", + 61, + "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", + "0", + , + , + "([59]\\d{7})$|0", + "8$1", + "0011", + , + , + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + CD: [ + , + [ + , + , + "(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}", + , + , + , + , + , + , + [7, 8, 9, 10], + ], + [, , "(?:(?:12|573)\\d\\d|276)\\d{5}|[1-6]\\d{6}", , , , "1234567"], + [ + , + , + "88\\d{5}|(?:8[0-69]|9[017-9])\\d{7}", + , + , + , + "991234567", + , + , + [7, 9], + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "CD", + 243, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["88"], "0$1"], + [, "(\\d{2})(\\d{5})", "$1 $2", ["[1-6]"], "0$1"], + [, "(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[89]"], "0$1"], + [, "(\\d{2})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["5"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + CF: [ + , + [, , "(?:[27]\\d{3}|8776)\\d{4}", , , , , , , [8]], + [, , "2[12]\\d{6}", , , , "21612345"], + [, , "7[024-7]\\d{6}", , , , "70012345"], + [, , , , , , , , , [-1]], + [, , "8776\\d{4}", , , , "87761234"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "CF", + 236, + "00", + , + , + , + , + , + , + , + [[, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[278]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + CG: [ + , + [, , "222\\d{6}|(?:0\\d|80)\\d{7}", , , , , , , [9]], + [, , "222[1-589]\\d{5}", , , , "222123456"], + [ + , + , + "026(?:1[0-5]|6[6-9])\\d{4}|0(?:[14-6]\\d\\d|2(?:40|5[5-8]|6[07-9]))\\d{5}", + , + , + , + "061234567", + ], + [, , , , , , , , , [-1]], + [, , "80[0-2]\\d{6}", , , , "800123456"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "CG", + 242, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["8"]], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[02]"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + CH: [ + , + [, , "8\\d{11}|[2-9]\\d{8}", , , , , , , [9, 12]], + [ + , + , + "(?:2[12467]|3[1-4]|4[134]|5[256]|6[12]|[7-9]1)\\d{7}", + , + , + , + "212345678", + , + , + [9], + ], + [, , "(?:6[89]|7[235-9])\\d{7}", , , , "781234567", , , [9]], + [, , "800\\d{6}", , , , "800123456", , , [9]], + [, , "90[016]\\d{6}", , , , "900123456", , , [9]], + [, , "84[0248]\\d{6}", , , , "840123456", , , [9]], + [, , "878\\d{6}", , , , "878123456", , , [9]], + [, , , , , , , , , [-1]], + "CH", + 41, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8[047]|90"], "0$1"], + [ + , + "(\\d{2})(\\d{3})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["[2-79]|81"], + "0$1", + ], + [ + , + "(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})", + "$1 $2 $3 $4 $5", + ["8"], + "0$1", + ], + ], + , + [, , "74[0248]\\d{6}", , , , "740123456", , , [9]], + , + , + [, , , , , , , , , [-1]], + [, , "5[18]\\d{7}", , , , "581234567", , , [9]], + , + , + [, , "860\\d{9}", , , , "860123456789", , , [12]], + ], + CI: [ + , + [, , "[02]\\d{9}", , , , , , , [10]], + [ + , + , + "2(?:[15]\\d{3}|7(?:2(?:0[23]|1[2357]|2[245]|3[45]|4[3-5])|3(?:06|1[69]|[2-6]7)))\\d{5}", + , + , + , + "2123456789", + ], + [, , "0[157]\\d{8}", , , , "0123456789"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "CI", + 225, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{2})(\\d{2})(\\d)(\\d{5})", "$1 $2 $3 $4", ["2"]], + [, "(\\d{2})(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3 $4", ["0"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + CK: [ + , + [, , "[2-578]\\d{4}", , , , , , , [5]], + [, , "(?:2\\d|3[13-7]|4[1-5])\\d{3}", , , , "21234"], + [, , "[578]\\d{4}", , , , "71234"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "CK", + 682, + "00", + , + , + , + , + , + , + , + [[, "(\\d{2})(\\d{3})", "$1 $2", ["[2-578]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + CL: [ + , + [, , "12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}", , , , , , , [9, 10, 11]], + [ + , + , + "2(?:1982[0-6]|3314[05-9])\\d{3}|(?:2(?:1(?:160|962)|2\\d{3}|3(?:(?:2\\d|50)\\d|3(?:[03467]\\d|1[0-35-9]|2[1-9]|5[0-24-9]|8[0-389]|9[0-8])|600)|646[59])|(?:(?:3[2-5]|[47][1-35]|5[1-3578])\\d|6(?:00|[13-57]\\d)|8(?:0[1-9]|[1-9]\\d))\\d\\d|9(?:(?:10[01]|(?:[2458]\\d|7[1-9])\\d)\\d|3(?:[0-57-9]\\d\\d|6(?:0[02-9]|[1-9]\\d))|6(?:[0-8]\\d\\d|9(?:[02-79]\\d|1[05-9]))|9(?:[03-9]\\d\\d|1(?:[0235-9]\\d|4[0-24-9])|2(?:[0-79]\\d|8[0-46-9]))))\\d{4}", + , + , + , + "600123456", + , + , + [9], + ], + [ + , + , + "2(?:1982[0-6]|3314[05-9])\\d{3}|(?:2(?:1(?:160|962)|2\\d{3}|3(?:(?:2\\d|50)\\d|3(?:[03467]\\d|1[0-35-9]|2[1-9]|5[0-24-9]|8[0-389]|9[0-8])|600)|646[59])|(?:(?:3[2-5]|[47][1-35]|5[1-3578]|6[13-57])\\d|8(?:0[1-8]|[1-9]\\d))\\d\\d|9(?:(?:10[01]|(?:[2458]\\d|7[1-9])\\d)\\d|3(?:[0-57-9]\\d\\d|6(?:0[02-9]|[1-9]\\d))|6(?:[0-8]\\d\\d|9(?:[02-79]\\d|1[05-9]))|9(?:[03-9]\\d\\d|1(?:[0235-9]\\d|4[0-24-9])|2(?:[0-79]\\d|8[0-46-9]))))\\d{4}", + , + , + , + "221234567", + , + , + [9], + ], + [, , "(?:123|8)00\\d{6}", , , , "800123456", , , [9, 11]], + [, , , , , , , , , [-1]], + [, , "600\\d{7,8}", , , , "6001234567", , , [10, 11]], + [, , , , , , , , , [-1]], + [, , "44\\d{7}", , , , "441234567", , , [9]], + "CL", + 56, + "(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0", + , + , + , + , + , + , + , + [ + [, "(\\d{4})", "$1", ["1(?:[03-589]|21)|[29]0|78"]], + [, "(\\d{5})(\\d{4})", "$1 $2", ["219", "2196"], "($1)"], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["60|809"]], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["44"]], + [, "(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2[1-36]"], "($1)"], + [, "(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["9(?:10|[2-9])"]], + [ + , + "(\\d{2})(\\d{3})(\\d{4})", + "$1 $2 $3", + ["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"], + "($1)", + ], + [, "(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["60|8"]], + [, "(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]], + [, "(\\d{3})(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["60"]], + ], + [ + [, "(\\d{5})(\\d{4})", "$1 $2", ["219", "2196"], "($1)"], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["60|809"]], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["44"]], + [, "(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2[1-36]"], "($1)"], + [, "(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["9(?:10|[2-9])"]], + [ + , + "(\\d{2})(\\d{3})(\\d{4})", + "$1 $2 $3", + ["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"], + "($1)", + ], + [, "(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["60|8"]], + [, "(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]], + [, "(\\d{3})(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["60"]], + ], + [, , , , , , , , , [-1]], + , + , + [, , "600\\d{7,8}", , , , , , , [10, 11]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + CM: [ + , + [, , "[26]\\d{8}|88\\d{6,7}", , , , , , , [8, 9]], + [, , "2(?:22|33)\\d{6}", , , , "222123456", , , [9]], + [, , "(?:24[23]|6(?:[25-9]\\d|40))\\d{6}", , , , "671234567", , , [9]], + [, , "88\\d{6,7}", , , , "88012345"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "CM", + 237, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["88"]], + [ + , + "(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", + "$1 $2 $3 $4 $5", + ["[26]|88"], + ], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + CN: [ + , + [ + , + , + "(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}", + , + , + , + , + , + , + [7, 8, 9, 10, 11, 12], + [5, 6], + ], + [ + , + , + "(?:10(?:[02-79]\\d\\d|[18](?:0[1-9]|[1-9]\\d))|2(?:[02-57-9]\\d{3}|1(?:[18](?:0[1-9]|[1-9]\\d)|[2-79]\\d\\d))|(?:41[03]|8078|9(?:78|94))\\d\\d)\\d{5}|(?:10|2[0-57-9])(?:1(?:00|23)\\d\\d|95\\d{3,4})|(?:41[03]|9(?:78|94))(?:100\\d\\d|95\\d{3,4})|8078123|(?:43[35]|754|851)\\d{7,8}|(?:43[35]|754|851)(?:1(?:00\\d|23)\\d|95\\d{3,4})|(?:3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1\\d|2[37]|3[12]|51|7[13-79]|9[15])|7(?:[39]1|5[57]|6[09])|8(?:71|98))(?:[02-8]\\d{7}|1(?:0(?:0\\d\\d(?:\\d{3})?|[1-9]\\d{5})|[13-9]\\d{6}|2(?:[0-24-9]\\d{5}|3\\d(?:\\d{4})?))|9(?:[0-46-9]\\d{6}|5\\d{3}(?:\\d(?:\\d{2})?)?))|(?:3(?:1[02-9]|35|49|5\\d|7[02-68]|9[1-68])|4(?:1[24-9]|2[179]|3[46-9]|5[2-9]|6[47-9]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[17]\\d|2[248]|3[04-9]|4[3-6]|5[0-3689]|6[2368]|9[02-9])|8(?:1[236-8]|2[5-7]|3\\d|5[2-9]|7[02-9]|8[36-8]|9[1-7])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))(?:[02-8]\\d{6}|1(?:0(?:0\\d\\d(?:\\d{2})?|[1-9]\\d{4})|[13-9]\\d{5}|2(?:[0-24-9]\\d{4}|3\\d(?:\\d{3})?))|9(?:[0-46-9]\\d{5}|5\\d{3,5}))", + , + , + , + "1012345678", + , + , + [7, 8, 9, 10, 11], + [5, 6], + ], + [ + , + , + "1740[0-5]\\d{6}|1(?:[38]\\d|4[57]|[59][0-35-9]|6[25-7]|7[0-35-8])\\d{8}", + , + , + , + "13123456789", + , + , + [11], + ], + [, , "(?:(?:10|21)8|8)00\\d{7}", , , , "8001234567", , , [10, 12]], + [, , "16[08]\\d{5}", , , , "16812345", , , [8]], + [ + , + , + "10(?:10\\d{4}|96\\d{3,4})|400\\d{7}|950\\d{7,8}|(?:2[0-57-9]|3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))96\\d{3,4}", + , + , + , + "4001234567", + , + , + [7, 8, 9, 10, 11], + [5, 6], + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "CN", + 86, + "00|1(?:[12]\\d|79)\\d\\d00", + "0", + , + , + "(1(?:[12]\\d|79)\\d\\d)|0", + , + "00", + , + [ + [ + , + "(\\d{5,6})", + "$1", + [ + "1(?:00|2[13])|9[56]", + "1(?:00|2(?:1|39))|9[56]", + "1(?:00|2(?:1|395))|9[56]", + ], + ], + [ + , + "(\\d{5,6})", + "$1", + [ + "1(?:0|23)|781|[1-9]12", + "1(?:0|23)|7812|[1-9]123", + "1(?:0|23(?:[0-8]|9[0-46-9]))|78123|[1-9]123", + ], + ], + [ + , + "(\\d{2})(\\d{5,6})", + "$1 $2", + [ + "(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]", + "(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1", + "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12", + "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123", + "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123", + ], + "0$1", + "$CC $1", + ], + [ + , + "(\\d{3})(\\d{4})", + "$1 $2", + [ + "[1-9]", + "1[1-9]|26|[3-9]|(?:10|2[0-57-9])(?:[0-8]|9[0-47-9])", + "1(?:0(?:[02-8]|1(?:[013-9]|2[0-24-9])|9[0-47-9])|[1-9])|2(?:[0-57-9](?:[02-8]|1(?:0[1-9]|[13-9]|2[0-24-9])|9[0-47-9])|6)|[3-9]", + "1(?:0(?:[02-8]|1(?:[013-9]|2[0-24-9])|9[0-47-9])|[1-9])|2(?:[0-57-9](?:[02-8]|1(?:0[1-9]|[13-9]|2[0-24-9])|9[0-47-9])|6)|3(?:[0268]|3[0-46-9]|4[0-8]|9[079])|4(?:[049]|1[03]|2[02-68]|[35]0|6[0-356]|8[014-9])|5(?:0|2[0-24-689]|4[0-2457-9]|6[057-9]|8[1-9]|90)|6(?:[0-24578]|3[06-9]|6[14-79]|9[03-9])|7(?:0[02-9]|2[0135-79]|3[23]|4[0-27-9]|6[1457]|8)|8(?:[046]|1[01459]|2[0-489]|50|8[0-2459]|9[09])|9(?:0[0457]|1[08]|[268]|4[024-9]|5[06-9]|78|94)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))(?:[02-9]|1(?:[013-9]|2[0-24-9]))", + "1(?:0(?:[02-8]|1(?:[013-9]|2[0-24-9])|9[0-47-9])|[1-9])|2(?:[0-57-9](?:[02-8]|1(?:0[1-9]|[13-9]|2[0-24-9])|9[0-47-9])|6)|3(?:[0268]|3[0-46-9]|4[0-8]|9[079])|4(?:[049]|1[03]|2[02-68]|[35]0|6[0-356]|8[014-9])|5(?:0|2[0-24-689]|4[0-2457-9]|6[057-9]|8[1-9]|90)|6(?:[0-24578]|3[06-9]|6[14-79]|9[03-9])|7(?:0[02-9]|2[0135-79]|3[23]|4[0-27-9]|6[1457]|8)|8(?:0(?:[0-689]|7[0-79])|1[01459]|2[0-489]|[46]|50|8[0-2459]|9[09])|9(?:0[0457]|1[08]|[268]|4[024-9]|5[06-9]|78|94)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))(?:[02-9]|1(?:[013-9]|2[0-24-9]))", + ], + ], + [, "(\\d{4})(\\d{4})", "$1 $2", ["16[08]"]], + [ + , + "(\\d{3})(\\d{5,6})", + "$1 $2", + [ + "3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]", + "(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]", + "85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])", + "85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])", + ], + "0$1", + "$CC $1", + ], + [ + , + "(\\d{4})(\\d{4})", + "$1 $2", + [ + "[1-9]", + "1(?:0(?:[02-8]|1[1-9]|9[0-47-9])|[1-9])|2(?:[0-57-9](?:[0-8]|9[0-47-9])|6)|[3-9]", + "1(?:0(?:[02-8]|1[1-9]|9[0-47-9])|[1-9])|26|3(?:[0268]|4[0-8]|9[079])|4(?:[049]|2[02-68]|[35]0|6[0-356]|8[014-9])|5(?:0|2[0-24-689]|4[0-2457-9]|6[057-9]|8[1-9]|90)|6(?:[0-24578]|3[06-9]|6[14-79]|9[03-9])|7(?:0[02-9]|2[0135-79]|3[23]|4[0-27-9]|6[1457]|8)|8(?:[046]|1[01459]|2[0-489]|5(?:0|[23][0-8])|8[0-2459]|9[09])|9(?:0[0457]|1[08]|[268]|4[024-9]|5[06-9])|(?:33|85[23]9)[0-46-9]|(?:2[0-57-9]|3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:[0-8]|9[0-47-9])", + "1(?:0[02-8]|[1-9])|2(?:[0-57-9][0-8]|6)|3(?:[0268]|3[0-46-9]|4[0-8]|9[079])|4(?:[049]|2[02-68]|[35]0|6[0-356]|8[014-9])|5(?:0|2[0-24-689]|4[0-2457-9]|6[057-9]|90)|6(?:[0-24578]|3[06-9]|6[14-79]|9[03-9])|7(?:0[02-9]|2[0135-79]|3[23]|4[0-27-9]|6[1457]|8)|8(?:[046]|1[01459]|2[0-489]|5(?:0|[23](?:[02-8]|1[1-9]|9[0-46-9]))|8[0-2459]|9[09])|9(?:0[0457]|1[08]|[268]|4[024-9]|5[06-9])|(?:10|2[0-57-9])9[0-47-9]|(?:101|58|85[23]10)[1-9]|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:[02-8]|1(?:0[1-9]|[1-9])|9[0-47-9])", + ], + ], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["(?:4|80)0"]], + [ + , + "(\\d{2})(\\d{4})(\\d{4})", + "$1 $2 $3", + [ + "10|2(?:[02-57-9]|1[1-9])", + "10|2(?:[02-57-9]|1[1-9])", + "10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])", + ], + "0$1", + "$CC $1", + 1, + ], + [ + , + "(\\d{3})(\\d{3})(\\d{4})", + "$1 $2 $3", + [ + "3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]", + ], + "0$1", + "$CC $1", + 1, + ], + [, "(\\d{3})(\\d{7,8})", "$1 $2", ["9"]], + [ + , + "(\\d{4})(\\d{3})(\\d{4})", + "$1 $2 $3", + ["80"], + "0$1", + "$CC $1", + 1, + ], + [ + , + "(\\d{3})(\\d{4})(\\d{4})", + "$1 $2 $3", + ["[3-578]"], + "0$1", + "$CC $1", + 1, + ], + [, "(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["1[3-9]"], , "$CC $1"], + [ + , + "(\\d{2})(\\d{3})(\\d{3})(\\d{4})", + "$1 $2 $3 $4", + ["[12]"], + "0$1", + , + 1, + ], + ], + [ + [ + , + "(\\d{2})(\\d{5,6})", + "$1 $2", + [ + "(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]", + "(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1", + "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12", + "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123", + "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123", + ], + "0$1", + "$CC $1", + ], + [ + , + "(\\d{3})(\\d{5,6})", + "$1 $2", + [ + "3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]", + "(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]", + "85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])", + "85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])", + ], + "0$1", + "$CC $1", + ], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["(?:4|80)0"]], + [ + , + "(\\d{2})(\\d{4})(\\d{4})", + "$1 $2 $3", + [ + "10|2(?:[02-57-9]|1[1-9])", + "10|2(?:[02-57-9]|1[1-9])", + "10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])", + ], + "0$1", + "$CC $1", + 1, + ], + [ + , + "(\\d{3})(\\d{3})(\\d{4})", + "$1 $2 $3", + [ + "3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]", + ], + "0$1", + "$CC $1", + 1, + ], + [, "(\\d{3})(\\d{7,8})", "$1 $2", ["9"]], + [ + , + "(\\d{4})(\\d{3})(\\d{4})", + "$1 $2 $3", + ["80"], + "0$1", + "$CC $1", + 1, + ], + [ + , + "(\\d{3})(\\d{4})(\\d{4})", + "$1 $2 $3", + ["[3-578]"], + "0$1", + "$CC $1", + 1, + ], + [, "(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["1[3-9]"], , "$CC $1"], + [ + , + "(\\d{2})(\\d{3})(\\d{3})(\\d{4})", + "$1 $2 $3 $4", + ["[12]"], + "0$1", + , + 1, + ], + ], + [, , , , , , , , , [-1]], + , + , + [ + , + , + "(?:(?:10|21)8|[48])00\\d{7}|950\\d{7,8}", + , + , + , + , + , + , + [10, 11, 12], + ], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + CO: [ + , + [ + , + , + "(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}", + , + , + , + , + , + , + [8, 10, 11], + [4, 7], + ], + [ + , + , + "601055(?:[0-4]\\d|50)\\d\\d|6010(?:[0-4]\\d|5[0-4])\\d{4}|(?:46|60(?:[18][1-9]|[24-7][2-9]))\\d{6}", + , + , + , + "6012345678", + , + , + [8, 10], + [4, 7], + ], + [ + , + , + "333301[0-5]\\d{3}|3333(?:00|2[5-9]|[3-9]\\d)\\d{4}|(?:3(?:(?:0[0-5]|1\\d|5[01]|70)\\d|2(?:[0-3]\\d|4[1-9])|3(?:00|3[0-24-9]))|9(?:101|408))\\d{6}", + , + , + , + "3211234567", + , + , + [10], + ], + [, , "1800\\d{7}", , , , "18001234567", , , [11]], + [ + , + , + "(?:19(?:0[01]|4[78])|901)\\d{7}", + , + , + , + "19001234567", + , + , + [10, 11], + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "CO", + 57, + "00(?:4(?:[14]4|56)|[579])", + "0", + , + , + "0([3579]|4(?:[14]4|56))?", + , + , + , + [ + [, "(\\d{4})(\\d{4})", "$1 $2", ["46"]], + [, "(\\d{3})(\\d{7})", "$1 $2", ["6|90"], "($1)", "0$CC $1"], + [, "(\\d{3})(\\d{7})", "$1 $2", ["3[0-357]|9[14]"], , "0$CC $1"], + [, "(\\d)(\\d{3})(\\d{7})", "$1-$2-$3", ["1"], "0$1"], + ], + [ + [, "(\\d{4})(\\d{4})", "$1 $2", ["46"]], + [, "(\\d{3})(\\d{7})", "$1 $2", ["6|90"], "($1)", "0$CC $1"], + [, "(\\d{3})(\\d{7})", "$1 $2", ["3[0-357]|9[14]"], , "0$CC $1"], + [, "(\\d)(\\d{3})(\\d{7})", "$1 $2 $3", ["1"]], + ], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + CR: [ + , + [ + , + , + "(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}", + , + , + , + , + , + , + [8, 10], + ], + [ + , + , + "210[7-9]\\d{4}|2(?:[024-7]\\d|1[1-9])\\d{5}", + , + , + , + "22123456", + , + , + [8], + ], + [ + , + , + "(?:3005\\d|6500[01])\\d{3}|(?:5[07]|6[0-4]|7[0-3]|8[3-9])\\d{6}", + , + , + , + "83123456", + , + , + [8], + ], + [, , "800\\d{7}", , , , "8001234567", , , [10]], + [, , "90[059]\\d{7}", , , , "9001234567", , , [10]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "(?:210[0-6]|4\\d{3}|5100)\\d{4}", , , , "40001234", , , [8]], + "CR", + 506, + "00", + , + , + , + "(19(?:0[0-2468]|1[09]|20|66|77|99))", + , + , + , + [ + [, "(\\d{4})(\\d{4})", "$1 $2", ["[2-7]|8[3-9]"], , "$CC $1"], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["[89]"], , "$CC $1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + CU: [ + , + [ + , + , + "(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}", + , + , + , + , + , + , + [6, 7, 8, 10], + [4, 5], + ], + [ + , + , + "(?:3[23]|4[89])\\d{4,6}|(?:31|4[36]|8(?:0[25]|78)\\d)\\d{6}|(?:2[1-4]|4[1257]|7\\d)\\d{5,6}", + , + , + , + "71234567", + , + , + , + [4, 5], + ], + [, , "(?:5\\d|6[2-4])\\d{6}", , , , "51234567", , , [8]], + [, , "800\\d{7}", , , , "8001234567", , , [10]], + [, , , , , , , , , [-1]], + [, , "807\\d{7}", , , , "8071234567", , , [10]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "CU", + 53, + "119", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{2})(\\d{4,6})", "$1 $2", ["2[1-4]|[34]"], "(0$1)"], + [, "(\\d)(\\d{6,7})", "$1 $2", ["7"], "(0$1)"], + [, "(\\d)(\\d{7})", "$1 $2", ["[56]"], "0$1"], + [, "(\\d{3})(\\d{7})", "$1 $2", ["8"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + CV: [ + , + [, , "(?:[2-59]\\d\\d|800)\\d{4}", , , , , , , [7]], + [ + , + , + "2(?:2[1-7]|3[0-8]|4[12]|5[1256]|6\\d|7[1-3]|8[1-5])\\d{4}", + , + , + , + "2211234", + ], + [, , "(?:36|5[1-389]|9\\d)\\d{5}", , , , "9911234"], + [, , "800\\d{4}", , , , "8001234"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "(?:3[3-5]|4[356])\\d{5}", , , , "3401234"], + "CV", + 238, + "0", + , + , + , + , + , + , + , + [[, "(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[2-589]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + CW: [ + , + [, , "(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}", , , , , , , [7, 8]], + [ + , + , + "9(?:4(?:3[0-5]|4[14]|6\\d)|50\\d|7(?:2[014]|3[02-9]|4[4-9]|6[357]|77|8[7-9])|8(?:3[39]|[46]\\d|7[01]|8[57-9]))\\d{4}", + , + , + , + "94351234", + ], + [, , "953[01]\\d{4}|9(?:5[12467]|6[5-9])\\d{5}", , , , "95181234"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "60[0-2]\\d{4}", , , , "6001234", , , [7]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "CW", + 599, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{3})(\\d{4})", "$1 $2", ["[3467]"]], + [, "(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["9[4-8]"]], + ], + , + [, , "955\\d{5}", , , , "95581234", , , [8]], + 1, + "[69]", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + CX: [ + , + [ + , + , + "1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}", + , + , + , + , + , + , + [6, 7, 8, 9, 10, 12], + ], + [ + , + , + "8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}", + , + , + , + "891641234", + , + , + [9], + [8], + ], + [ + , + , + "4(?:79[01]|83[0-389]|94[0-478])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-37-9])\\d{6}", + , + , + , + "412345678", + , + , + [9], + ], + [, , "180(?:0\\d{3}|2)\\d{3}", , , , "1800123456", , , [7, 10]], + [, , "190[0-26]\\d{6}", , , , "1900123456", , , [10]], + [ + , + , + "13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", + , + , + , + "1300123456", + , + , + [6, 8, 10, 12], + ], + [, , , , , , , , , [-1]], + [ + , + , + "14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}", + , + , + , + "147101234", + , + , + [9], + ], + "CX", + 61, + "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", + "0", + , + , + "([59]\\d{7})$|0", + "8$1", + "0011", + , + , + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + CY: [ + , + [, , "(?:[279]\\d|[58]0)\\d{6}", , , , , , , [8]], + [, , "2[2-6]\\d{6}", , , , "22345678"], + [, , "9(?:10|[4-79]\\d)\\d{5}", , , , "96123456"], + [, , "800\\d{5}", , , , "80001234"], + [, , "90[09]\\d{5}", , , , "90012345"], + [, , "80[1-9]\\d{5}", , , , "80112345"], + [, , "700\\d{5}", , , , "70012345"], + [, , , , , , , , , [-1]], + "CY", + 357, + "00", + , + , + , + , + , + , + , + [[, "(\\d{2})(\\d{6})", "$1 $2", ["[257-9]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "(?:50|77)\\d{6}", , , , "77123456"], + , + , + [, , , , , , , , , [-1]], + ], + CZ: [ + , + [, , "(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}", , , , , , , [9, 10, 11, 12]], + [ + , + , + "(?:2\\d|3[1257-9]|4[16-9]|5[13-9])\\d{7}", + , + , + , + "212345678", + , + , + [9], + ], + [ + , + , + "(?:60[1-8]\\d|7(?:0(?:[2-5]\\d|60)|19[0-4]|[2379]\\d\\d))\\d{5}", + , + , + , + "601123456", + , + , + [9], + ], + [, , "800\\d{6}", , , , "800123456", , , [9]], + [, , "9(?:0[05689]|76)\\d{6}", , , , "900123456", , , [9]], + [, , "8[134]\\d{7}", , , , "811234567", , , [9]], + [, , "70[01]\\d{6}", , , , "700123456", , , [9]], + [, , "9[17]0\\d{6}", , , , "910123456", , , [9]], + "CZ", + 420, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-8]|9[015-7]"]], + [, "(\\d{2})(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["96"]], + [, "(\\d{2})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]], + [, "(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "9(?:5\\d|7[2-4])\\d{6}", , , , "972123456", , , [9]], + , + , + [, , "9(?:3\\d{9}|6\\d{7,10})", , , , "93123456789"], + ], + DE: [ + , + [ + , + , + "[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}", + , + , + , + , + , + , + [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], + [2, 3], + ], + [ + , + , + "32\\d{9,11}|49[1-6]\\d{10}|322\\d{6}|49[0-7]\\d{3,9}|(?:[34]0|[68]9)\\d{3,13}|(?:2(?:0[1-689]|[1-3569]\\d|4[0-8]|7[1-7]|8[0-7])|3(?:[3569]\\d|4[0-79]|7[1-7]|8[1-8])|4(?:1[02-9]|[2-48]\\d|5[0-6]|6[0-8]|7[0-79])|5(?:0[2-8]|[124-6]\\d|[38][0-8]|[79][0-7])|6(?:0[02-9]|[1-358]\\d|[47][0-8]|6[1-9])|7(?:0[2-8]|1[1-9]|[27][0-7]|3\\d|[4-6][0-8]|8[0-5]|9[013-7])|8(?:0[2-9]|1[0-79]|2\\d|3[0-46-9]|4[0-6]|5[013-9]|6[1-8]|7[0-8]|8[0-24-6])|9(?:0[6-9]|[1-4]\\d|[589][0-7]|6[0-8]|7[0-467]))\\d{3,12}", + , + , + , + "30123456", + , + , + [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], + [2, 3, 4], + ], + [ + , + , + "15310\\d{6}|1(?:5[0-25-9]\\d|7[013-5])\\d{7}|1(?:6[023]|7[26-9])\\d{7,8}", + , + , + , + "15123456789", + , + , + [10, 11], + ], + [ + , + , + "800\\d{7,12}", + , + , + , + "8001234567890", + , + , + [10, 11, 12, 13, 14, 15], + ], + [ + , + , + "(?:137[7-9]|900(?:[135]|9\\d))\\d{6}", + , + , + , + "9001234567", + , + , + [10, 11], + ], + [ + , + , + "180\\d{5,11}|13(?:7[1-6]\\d\\d|8)\\d{4}", + , + , + , + "18012345", + , + , + [7, 8, 9, 10, 11, 12, 13, 14], + ], + [, , "700\\d{8}", , , , "70012345678", , , [11]], + [, , , , , , , , , [-1]], + "DE", + 49, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{2})(\\d{3,13})", "$1 $2", ["3[02]|40|[68]9"], "0$1"], + [ + , + "(\\d{3})(\\d{3,12})", + "$1 $2", + [ + "2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1", + "2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1", + ], + "0$1", + ], + [ + , + "(\\d{4})(\\d{2,11})", + "$1 $2", + [ + "[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]", + "[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]", + ], + "0$1", + ], + [, "(\\d{3})(\\d{4})", "$1 $2", ["138"], "0$1"], + [, "(\\d{5})(\\d{2,10})", "$1 $2", ["3"], "0$1"], + [, "(\\d{3})(\\d{5,11})", "$1 $2", ["181"], "0$1"], + [, "(\\d{3})(\\d)(\\d{4,10})", "$1 $2 $3", ["1(?:3|80)|9"], "0$1"], + [, "(\\d{3})(\\d{7,8})", "$1 $2", ["1[67]"], "0$1"], + [, "(\\d{3})(\\d{7,12})", "$1 $2", ["8"], "0$1"], + [, "(\\d{5})(\\d{6})", "$1 $2", ["185", "1850", "18500"], "0$1"], + [, "(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], + [, "(\\d{4})(\\d{7})", "$1 $2", ["18[68]"], "0$1"], + [, "(\\d{4})(\\d{7})", "$1 $2", ["15[1279]"], "0$1"], + [ + , + "(\\d{5})(\\d{6})", + "$1 $2", + ["15[03568]", "15(?:[0568]|31)"], + "0$1", + ], + [, "(\\d{3})(\\d{8})", "$1 $2", ["18"], "0$1"], + [ + , + "(\\d{3})(\\d{2})(\\d{7,8})", + "$1 $2 $3", + ["1(?:6[023]|7)"], + "0$1", + ], + [, "(\\d{4})(\\d{2})(\\d{7})", "$1 $2 $3", ["15[279]"], "0$1"], + [, "(\\d{3})(\\d{2})(\\d{8})", "$1 $2 $3", ["15"], "0$1"], + ], + , + [ + , + , + "16(?:4\\d{1,10}|[89]\\d{1,11})", + , + , + , + "16412345", + , + , + [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], + ], + , + , + [, , , , , , , , , [-1]], + [ + , + , + "18(?:1\\d{5,11}|[2-9]\\d{8})", + , + , + , + "18500123456", + , + , + [8, 9, 10, 11, 12, 13, 14], + ], + , + , + [ + , + , + "1(?:6(?:013|255|399)|7(?:(?:[015]1|[69]3)3|[2-4]55|[78]99))\\d{7,8}|15(?:(?:[03-68]00|113)\\d|2\\d55|7\\d99|9\\d33)\\d{7}", + , + , + , + "177991234567", + , + , + [12, 13], + ], + ], + DJ: [ + , + [, , "(?:2\\d|77)\\d{6}", , , , , , , [8]], + [, , "2(?:1[2-5]|7[45])\\d{5}", , , , "21360003"], + [, , "77\\d{6}", , , , "77831001"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "DJ", + 253, + "00", + , + , + , + , + , + , + , + [[, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[27]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + DK: [ + , + [, , "[2-9]\\d{7}", , , , , , , [8]], + [ + , + , + "(?:2(?:[0-59][1-9]|[6-8]\\d)|3(?:[0-3][1-9]|4[13]|5[1-58]|6[1347-9]|7\\d|8[1-8]|9[1-79])|4(?:[0-25][1-9]|[34][2-9]|6[13-579]|7[13579]|8[1-47]|9[127])|5(?:[0-36][1-9]|4[146-9]|5[3-57-9]|7[568]|8[1-358]|9[1-69])|6(?:[0135][1-9]|2[1-68]|4[2-8]|6[1689]|[78]\\d|9[15689])|7(?:[0-69][1-9]|7[3-9]|8[147])|8(?:[16-9][1-9]|2[1-58])|9(?:[1-47-9][1-9]|6\\d))\\d{5}", + , + , + , + "32123456", + ], + [ + , + , + "(?:2[6-8]|37|6[78]|96)\\d{6}|(?:2[0-59]|3[0-689]|[457]\\d|6[0-69]|8[126-9]|9[1-47-9])[1-9]\\d{5}", + , + , + , + "34412345", + ], + [, , "80\\d{6}", , , , "80123456"], + [, , "90\\d{6}", , , , "90123456"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "DK", + 45, + "00", + , + , + , + , + , + , + , + [[, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-9]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + DM: [ + , + [, , "(?:[58]\\d\\d|767|900)\\d{7}", , , , , , , [10], [7]], + [ + , + , + "767(?:2(?:55|66)|4(?:2[01]|4[0-25-9])|50[0-4])\\d{4}", + , + , + , + "7674201234", + , + , + , + [7], + ], + [ + , + , + "767(?:2(?:[2-4689]5|7[5-7])|31[5-7]|61[1-8]|70[1-6])\\d{4}", + , + , + , + "7672251234", + , + , + , + [7], + ], + [, , "8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", , , , "8002123456"], + [, , "900[2-9]\\d{6}", , , , "9002123456"], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}", + , + , + , + "5002345678", + ], + [, , , , , , , , , [-1]], + "DM", + 1, + "011", + "1", + , + , + "([2-7]\\d{6})$|1", + "767$1", + , + , + , + , + [, , , , , , , , , [-1]], + , + "767", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + DO: [ + , + [, , "(?:[58]\\d\\d|900)\\d{7}", , , , , , , [10], [7]], + [ + , + , + "8(?:[04]9[2-9]\\d\\d|29(?:2(?:[0-59]\\d|6[04-9]|7[0-27]|8[0237-9])|3(?:[0-35-9]\\d|4[7-9])|[45]\\d\\d|6(?:[0-27-9]\\d|[3-5][1-9]|6[0135-8])|7(?:0[013-9]|[1-37]\\d|4[1-35689]|5[1-4689]|6[1-57-9]|8[1-79]|9[1-8])|8(?:0[146-9]|1[0-48]|[248]\\d|3[1-79]|5[01589]|6[013-68]|7[124-8]|9[0-8])|9(?:[0-24]\\d|3[02-46-9]|5[0-79]|60|7[0169]|8[57-9]|9[02-9])))\\d{4}", + , + , + , + "8092345678", + , + , + , + [7], + ], + [, , "8[024]9[2-9]\\d{6}", , , , "8092345678", , , , [7]], + [ + , + , + "800(?:14|[2-9]\\d)\\d{5}|8[024]9[01]\\d{6}|8(?:33|44|55|66|77|88)[2-9]\\d{6}", + , + , + , + "8002123456", + ], + [, , "900[2-9]\\d{6}", , , , "9002123456"], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}", + , + , + , + "5002345678", + ], + [, , , , , , , , , [-1]], + "DO", + 1, + "011", + "1", + , + , + "1", + , + , + , + , + , + [, , , , , , , , , [-1]], + , + "8001|8[024]9", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + DZ: [ + , + [, , "(?:[1-4]|[5-79]\\d|80)\\d{7}", , , , , , , [8, 9]], + [ + , + , + "9619\\d{5}|(?:1\\d|2[013-79]|3[0-8]|4[013-689])\\d{6}", + , + , + , + "12345678", + ], + [ + , + , + "(?:5(?:4[0-29]|5\\d|6[0-3])|6(?:[569]\\d|7[0-6])|7[7-9]\\d)\\d{6}", + , + , + , + "551234567", + , + , + [9], + ], + [, , "800\\d{6}", , , , "800123456", , , [9]], + [, , "80[3-689]1\\d{5}", , , , "808123456", , , [9]], + [, , "80[12]1\\d{5}", , , , "801123456", , , [9]], + [, , , , , , , , , [-1]], + [, , "98[23]\\d{6}", , , , "983123456", , , [9]], + "DZ", + 213, + "00", + "0", + , + , + "0", + , + , + , + [ + [ + , + "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["[1-4]"], + "0$1", + ], + [, "(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["9"], "0$1"], + [ + , + "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["[5-8]"], + "0$1", + ], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + EC: [ + , + [ + , + , + "1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}", + , + , + , + , + , + , + [8, 9, 10, 11], + [7], + ], + [, , "[2-7][2-7]\\d{6}", , , , "22123456", , , [8], [7]], + [ + , + , + "964[0-2]\\d{5}|9(?:39|[57][89]|6[0-36-9]|[89]\\d)\\d{6}", + , + , + , + "991234567", + , + , + [9], + ], + [, , "1800\\d{7}|1[78]00\\d{6}", , , , "18001234567", , , [10, 11]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "[2-7]890\\d{4}", , , , "28901234", , , [8]], + "EC", + 593, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{3})(\\d{4})", "$1-$2", ["[2-7]"]], + [, "(\\d)(\\d{3})(\\d{4})", "$1 $2-$3", ["[2-7]"], "(0$1)"], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["9"], "0$1"], + [, "(\\d{4})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["1"]], + ], + [ + [, "(\\d)(\\d{3})(\\d{4})", "$1-$2-$3", ["[2-7]"]], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["9"], "0$1"], + [, "(\\d{4})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["1"]], + ], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + EE: [ + , + [ + , + , + "8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}", + , + , + , + , + , + , + [7, 8, 10], + ], + [ + , + , + "(?:3[23589]|4[3-8]|6\\d|7[1-9]|88)\\d{5}", + , + , + , + "3212345", + , + , + [7], + ], + [ + , + , + "(?:5\\d{5}|8(?:1(?:0(?:0(?:00|[178]\\d)|[3-9]\\d\\d)|(?:1(?:0[2-6]|1\\d)|(?:2[0-59]|[3-79]\\d)\\d)\\d)|2(?:0(?:0(?:00|4\\d)|(?:19|[2-7]\\d)\\d)|(?:(?:[124-69]\\d|3[5-9])\\d|7(?:[0-79]\\d|8[13-9])|8(?:[2-6]\\d|7[01]))\\d)|[349]\\d{4}))\\d\\d|5(?:(?:[02]\\d|5[0-478])\\d|1(?:[0-8]\\d|95)|6(?:4[0-4]|5[1-589]))\\d{3}", + , + , + , + "51234567", + , + , + [7, 8], + ], + [, , "800(?:(?:0\\d\\d|1)\\d|[2-9])\\d{3}", , , , "80012345"], + [, , "(?:40\\d\\d|900)\\d{4}", , , , "9001234", , , [7, 8]], + [, , , , , , , , , [-1]], + [, , "70[0-2]\\d{5}", , , , "70012345", , , [8]], + [, , , , , , , , , [-1]], + "EE", + 372, + "00", + , + , + , + , + , + , + , + [ + [ + , + "(\\d{3})(\\d{4})", + "$1 $2", + [ + "[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88", + "[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88", + ], + ], + [ + , + "(\\d{4})(\\d{3,4})", + "$1 $2", + ["[45]|8(?:00|[1-49])", "[45]|8(?:00[1-9]|[1-49])"], + ], + [, "(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["7"]], + [, "(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , "800[2-9]\\d{3}", , , , , , , [7]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + EG: [ + , + [ + , + , + "[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}", + , + , + , + , + , + , + [8, 9, 10], + [6, 7], + ], + [ + , + , + "13[23]\\d{6}|(?:15|57)\\d{6,7}|(?:2\\d|3|4[05-8]|5[05]|6[24-689]|8[2468]|9[235-7])\\d{7}", + , + , + , + "234567890", + , + , + [8, 9], + [6, 7], + ], + [, , "1[0-25]\\d{8}", , , , "1001234567", , , [10]], + [, , "800\\d{7}", , , , "8001234567", , , [10]], + [, , "900\\d{7}", , , , "9001234567", , , [10]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "EG", + 20, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d)(\\d{7,8})", "$1 $2", ["[23]"], "0$1"], + [ + , + "(\\d{2})(\\d{6,7})", + "$1 $2", + ["1[35]|[4-6]|8[2468]|9[235-7]"], + "0$1", + ], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], + [, "(\\d{2})(\\d{8})", "$1 $2", ["1"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + EH: [ + , + [, , "[5-8]\\d{8}", , , , , , , [9]], + [, , "528[89]\\d{5}", , , , "528812345"], + [ + , + , + "(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-8]|5[0-5]|8[0-7]))\\d{6}", + , + , + , + "650123456", + ], + [, , "80[0-7]\\d{6}", , , , "801234567"], + [, , "89\\d{7}", , , , "891234567"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}", , , , "592401234"], + "EH", + 212, + "00", + "0", + , + , + "0", + , + , + , + , + , + [, , , , , , , , , [-1]], + , + "528[89]", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + ER: [ + , + [, , "[178]\\d{6}", , , , , , , [7], [6]], + [ + , + , + "(?:1(?:1[12568]|[24]0|55|6[146])|8\\d\\d)\\d{4}", + , + , + , + "8370362", + , + , + , + [6], + ], + [, , "(?:17[1-3]|7\\d\\d)\\d{4}", , , , "7123456"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "ER", + 291, + "00", + "0", + , + , + "0", + , + , + , + [[, "(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[178]"], "0$1"]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + ES: [ + , + [, , "[5-9]\\d{8}", , , , , , , [9]], + [ + , + , + "96906(?:0[0-8]|1[1-9]|[2-9]\\d)\\d\\d|9(?:69(?:0[0-57-9]|[1-9]\\d)|73(?:[0-8]\\d|9[1-9]))\\d{4}|(?:8(?:[1356]\\d|[28][0-8]|[47][1-9])|9(?:[135]\\d|[268][0-8]|4[1-9]|7[124-9]))\\d{6}", + , + , + , + "810123456", + ], + [ + , + , + "(?:590[16]00\\d|9(?:6906(?:09|10)|7390\\d\\d))\\d\\d|(?:6\\d|7[1-48])\\d{7}", + , + , + , + "612345678", + ], + [, , "[89]00\\d{6}", , , , "800123456"], + [, , "80[367]\\d{6}", , , , "803123456"], + [, , "90[12]\\d{6}", , , , "901123456"], + [, , "70\\d{7}", , , , "701234567"], + [, , , , , , , , , [-1]], + "ES", + 34, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{4})", "$1", ["905"]], + [, "(\\d{6})", "$1", ["[79]9"]], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[89]00"]], + [, "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-9]"]], + ], + [ + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[89]00"]], + [, "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-9]"]], + ], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "51\\d{7}", , , , "511234567"], + , + , + [, , , , , , , , , [-1]], + ], + ET: [ + , + [, , "(?:11|[2-579]\\d)\\d{7}", , , , , , , [9], [7]], + [ + , + , + "11667[01]\\d{3}|(?:11(?:1(?:1[1-468]|2[2-7]|3[1-5]|5[5-8]|8[6-8])|2(?:13|3[6-8]|5[89]|7[05-9]|8[2-6])|3(?:2[01]|3[0-289]|4[1289]|7[1-4]|87)|4(?:1[69]|3[2-49]|4[0-3]|6[5-8]|7\\d)|5(?:1[578]|44|5[0-4])|6(?:1[578]|2[69]|39|4[5-7]|5[0-5]|6[0-59]|8[015-8]))|2(?:2(?:11[1-9]|22[0-7]|33\\d|44[1467]|66[1-68])|5(?:11[124-6]|33[2-8]|44[1467]|55[14]|66[1-3679]|77[124-79]|880))|3(?:3(?:11[0-46-8]|(?:22|55)[0-6]|33[0134689]|44[04]|66[01467])|4(?:44[0-8]|55[0-69]|66[0-3]|77[1-5]))|4(?:6(?:119|22[0-24-7]|33[1-5]|44[13-69]|55[14-689]|660|88[1-4])|7(?:(?:11|22)[1-9]|33[13-7]|44[13-6]|55[1-689]))|5(?:7(?:227|55[05]|(?:66|77)[14-8])|8(?:11[149]|22[013-79]|33[0-68]|44[013-8]|550|66[1-5]|77\\d)))\\d{4}", + , + , + , + "111112345", + , + , + , + [7], + ], + [ + , + , + "700[1-9]\\d{5}|(?:7(?:0[1-9]|1[0-8]|22|77|86|99)|9\\d\\d)\\d{6}", + , + , + , + "911234567", + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "ET", + 251, + "00", + "0", + , + , + "0", + , + , + , + [[, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-579]"], "0$1"]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + FI: [ + , + [ + , + , + "[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}", + , + , + , + , + , + , + [5, 6, 7, 8, 9, 10, 11, 12], + ], + [ + , + , + "1[3-7][1-8]\\d{3,6}|(?:19[1-8]|[23568][1-8]\\d|9(?:00|[1-8]\\d))\\d{2,6}", + , + , + , + "131234567", + , + , + [5, 6, 7, 8, 9], + ], + [ + , + , + "4946\\d{2,6}|(?:4[0-8]|50)\\d{4,8}", + , + , + , + "412345678", + , + , + [6, 7, 8, 9, 10], + ], + [, , "800\\d{4,6}", , , , "800123456", , , [7, 8, 9]], + [, , "[67]00\\d{5,6}", , , , "600123456", , , [8, 9]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "FI", + 358, + "00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))", + "0", + , + , + "0", + , + "00", + , + [ + [, "(\\d{5})", "$1", ["75[12]"], "0$1"], + [, "(\\d{5})", "$1", ["20[2-59]"], "0$1"], + [, "(\\d{6})", "$1", ["11"]], + [ + , + "(\\d{3})(\\d{3,7})", + "$1 $2", + ["(?:[1-3]0|[68])0|70[07-9]"], + "0$1", + ], + [, "(\\d{2})(\\d{4,8})", "$1 $2", ["[14]|2[09]|50|7[135]"], "0$1"], + [, "(\\d{2})(\\d{6,10})", "$1 $2", ["7"], "0$1"], + [ + , + "(\\d)(\\d{4,9})", + "$1 $2", + ["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"], + "0$1", + ], + ], + [ + [, "(\\d{5})", "$1", ["20[2-59]"], "0$1"], + [ + , + "(\\d{3})(\\d{3,7})", + "$1 $2", + ["(?:[1-3]0|[68])0|70[07-9]"], + "0$1", + ], + [, "(\\d{2})(\\d{4,8})", "$1 $2", ["[14]|2[09]|50|7[135]"], "0$1"], + [, "(\\d{2})(\\d{6,10})", "$1 $2", ["7"], "0$1"], + [ + , + "(\\d)(\\d{4,9})", + "$1 $2", + ["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"], + "0$1", + ], + ], + [, , , , , , , , , [-1]], + 1, + "1[03-79]|[2-9]", + [ + , + , + "20(?:2[023]|9[89])\\d{1,6}|(?:60[12]\\d|7099)\\d{4,5}|(?:606|7(?:0[78]|1|3\\d))\\d{7}|(?:[1-3]00|7(?:0[1-5]\\d\\d|5[03-9]))\\d{3,7}", + ], + [ + , + , + "20\\d{4,8}|60[12]\\d{5,6}|7(?:099\\d{4,5}|5[03-9]\\d{3,7})|20[2-59]\\d\\d|(?:606|7(?:0[78]|1|3\\d))\\d{7}|(?:10|29|3[09]|70[1-5]\\d)\\d{4,8}", + , + , + , + "10112345", + ], + , + , + [, , , , , , , , , [-1]], + ], + FJ: [ + , + [, , "45\\d{5}|(?:0800\\d|[235-9])\\d{6}", , , , , , , [7, 11]], + [ + , + , + "603\\d{4}|(?:3[0-5]|6[25-7]|8[58])\\d{5}", + , + , + , + "3212345", + , + , + [7], + ], + [ + , + , + "(?:[279]\\d|45|5[01568]|8[034679])\\d{5}", + , + , + , + "7012345", + , + , + [7], + ], + [, , "0800\\d{7}", , , , "08001234567", , , [11]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "FJ", + 679, + "0(?:0|52)", + , + , + , + , + , + "00", + , + [ + [, "(\\d{3})(\\d{4})", "$1 $2", ["[235-9]|45"]], + [, "(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["0"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + FK: [ + , + [, , "[2-7]\\d{4}", , , , , , , [5]], + [, , "[2-47]\\d{4}", , , , "31234"], + [, , "[56]\\d{4}", , , , "51234"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "FK", + 500, + "00", + , + , + , + , + , + , + , + , + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + FM: [ + , + [, , "(?:[39]\\d\\d|820)\\d{4}", , , , , , , [7]], + [ + , + , + "31(?:00[67]|208|309)\\d\\d|(?:3(?:[2357]0[1-9]|602|804|905)|(?:820|9[2-6]\\d)\\d)\\d{3}", + , + , + , + "3201234", + ], + [ + , + , + "31(?:00[67]|208|309)\\d\\d|(?:3(?:[2357]0[1-9]|602|804|905)|(?:820|9[2-7]\\d)\\d)\\d{3}", + , + , + , + "3501234", + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "FM", + 691, + "00", + , + , + , + , + , + , + , + [[, "(\\d{3})(\\d{4})", "$1 $2", ["[389]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + FO: [ + , + [, , "[2-9]\\d{5}", , , , , , , [6]], + [, , "(?:20|[34]\\d|8[19])\\d{4}", , , , "201234"], + [, , "(?:[27][1-9]|5\\d|9[16])\\d{4}", , , , "211234"], + [, , "80[257-9]\\d{3}", , , , "802123"], + [, , "90(?:[13-5][15-7]|2[125-7]|9\\d)\\d\\d", , , , "901123"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "(?:6[0-36]|88)\\d{4}", , , , "601234"], + "FO", + 298, + "00", + , + , + , + "(10(?:01|[12]0|88))", + , + , + , + [[, "(\\d{6})", "$1", ["[2-9]"], , "$CC $1"]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + FR: [ + , + [, , "[1-9]\\d{8}", , , , , , , [9]], + [ + , + , + "(?:26[013-9]|59[1-35-9])\\d{6}|(?:[13]\\d|2[0-57-9]|4[1-9]|5[0-8])\\d{7}", + , + , + , + "123456789", + ], + [ + , + , + "(?:6(?:[0-24-8]\\d|3[0-8]|9[589])|7[3-9]\\d)\\d{6}", + , + , + , + "612345678", + ], + [, , "80[0-5]\\d{6}", , , , "801234567"], + [ + , + , + "836(?:0[0-36-9]|[1-9]\\d)\\d{4}|8(?:1[2-9]|2[2-47-9]|3[0-57-9]|[569]\\d|8[0-35-9])\\d{6}", + , + , + , + "891123456", + ], + [, , "8(?:1[01]|2[0156]|4[024]|84)\\d{6}", , , , "884012345"], + [, , , , , , , , , [-1]], + [, , "9\\d{8}", , , , "912345678"], + "FR", + 33, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{4})", "$1", ["10"]], + [, "(\\d{3})(\\d{3})", "$1 $2", ["1"]], + [, "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0 $1"], + [ + , + "(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", + "$1 $2 $3 $4 $5", + ["[1-79]"], + "0$1", + ], + ], + [ + [, "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0 $1"], + [ + , + "(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", + "$1 $2 $3 $4 $5", + ["[1-79]"], + "0$1", + ], + ], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "80[6-9]\\d{6}", , , , "806123456"], + , + , + [, , , , , , , , , [-1]], + ], + GA: [ + , + [, , "(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}", , , , , , , [7, 8]], + [, , "[01]1\\d{6}", , , , "01441234", , , [8]], + [ + , + , + "(?:(?:0[2-7]|7[467])\\d|6(?:0[0-4]|10|[256]\\d))\\d{5}|[2-7]\\d{6}", + , + , + , + "06031234", + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "GA", + 241, + "00", + , + , + , + "0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})", + "$1", + , + , + [ + [, "(\\d)(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-7]"], "0$1"], + [, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["0"]], + [ + , + "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["11|[67]"], + "0$1", + ], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + GB: [ + , + [ + , + , + "[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}", + , + , + , + , + , + , + [7, 9, 10], + [4, 5, 6, 8], + ], + [ + , + , + "(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-35])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}", + , + , + , + "1212345678", + , + , + [9, 10], + [4, 5, 6, 7, 8], + ], + [ + , + , + "7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}", + , + , + , + "7400123456", + , + , + [10], + ], + [, , "80[08]\\d{7}|800\\d{6}|8001111", , , , "8001234567"], + [ + , + , + "(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d", + , + , + , + "9012345678", + , + , + [7, 10], + ], + [, , , , , , , , , [-1]], + [, , "70\\d{8}", , , , "7012345678", , , [10]], + [, , "56\\d{8}", , , , "5612345678", , , [10]], + "GB", + 44, + "00", + "0", + " x", + , + "0", + , + , + , + [ + [ + , + "(\\d{3})(\\d{4})", + "$1 $2", + ["800", "8001", "80011", "800111", "8001111"], + "0$1", + ], + [ + , + "(\\d{3})(\\d{2})(\\d{2})", + "$1 $2 $3", + ["845", "8454", "84546", "845464"], + "0$1", + ], + [, "(\\d{3})(\\d{6})", "$1 $2", ["800"], "0$1"], + [ + , + "(\\d{5})(\\d{4,5})", + "$1 $2", + [ + "1(?:38|5[23]|69|76|94)", + "1(?:(?:38|69)7|5(?:24|39)|768|946)", + "1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)", + ], + "0$1", + ], + [, "(\\d{4})(\\d{5,6})", "$1 $2", ["1(?:[2-69][02-9]|[78])"], "0$1"], + [ + , + "(\\d{2})(\\d{4})(\\d{4})", + "$1 $2 $3", + ["[25]|7(?:0|6[02-9])", "[25]|7(?:0|6(?:[03-9]|2[356]))"], + "0$1", + ], + [, "(\\d{4})(\\d{6})", "$1 $2", ["7"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1389]"], "0$1"], + ], + , + [ + , + , + "76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}", + , + , + , + "7640123456", + , + , + [10], + ], + 1, + , + [, , , , , , , , , [-1]], + [, , "(?:3[0347]|55)\\d{8}", , , , "5512345678", , , [10]], + , + , + [, , , , , , , , , [-1]], + ], + GD: [ + , + [, , "(?:473|[58]\\d\\d|900)\\d{7}", , , , , , , [10], [7]], + [ + , + , + "473(?:2(?:3[0-2]|69)|3(?:2[89]|86)|4(?:[06]8|3[5-9]|4[0-4]|5[59]|73|90)|63[68]|7(?:58|84)|800|938)\\d{4}", + , + , + , + "4732691234", + , + , + , + [7], + ], + [ + , + , + "473(?:4(?:0[2-79]|1[04-9]|2[0-5]|49|5[6-8])|5(?:2[01]|3[3-8])|901)\\d{4}", + , + , + , + "4734031234", + , + , + , + [7], + ], + [, , "8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", , , , "8002123456"], + [, , "900[2-9]\\d{6}", , , , "9002123456"], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}", + , + , + , + "5002345678", + ], + [, , , , , , , , , [-1]], + "GD", + 1, + "011", + "1", + , + , + "([2-9]\\d{6})$|1", + "473$1", + , + , + , + , + [, , , , , , , , , [-1]], + , + "473", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + GE: [ + , + [, , "(?:[3-57]\\d\\d|800)\\d{6}", , , , , , , [9], [6, 7]], + [ + , + , + "(?:3(?:[256]\\d|4[124-9]|7[0-4])|4(?:1\\d|2[2-7]|3[1-79]|4[2-8]|7[239]|9[1-7]))\\d{6}", + , + , + , + "322123456", + , + , + , + [6, 7], + ], + [ + , + , + "5(?:(?:(?:0555|1(?:[17]77|555))[5-9]|757(?:7[7-9]|8[01]))\\d|22252[0-4])\\d\\d|5(?:0(?:0[17]0|505)|1(?:0[01]0|1(?:07|33|51))|2(?:0[02]0|2[25]2)|3(?:0[03]0|3[35]3)|(?:40[04]|900)0|5222)[0-4]\\d{3}|(?:5(?:0(?:0(?:0\\d|11|22|3[0-6]|44|5[05]|77|88|9[09])|(?:[14]\\d|77)\\d|22[02])|1(?:1(?:[03][01]|[124]\\d|5[2-6]|7[0-4])|4\\d\\d)|[23]555|4(?:4\\d\\d|555)|5(?:[0157-9]\\d\\d|200|333|444)|6[89]\\d\\d|7(?:[0147-9]\\d\\d|5(?:00|[57]5))|8(?:0(?:[018]\\d|2[0-4])|5(?:55|8[89])|8(?:55|88))|9(?:090|[1-35-9]\\d\\d))|790\\d\\d)\\d{4}", + , + , + , + "555123456", + ], + [, , "800\\d{6}", , , , "800123456"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "70[67]\\d{6}", , , , "706123456"], + "GE", + 995, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["70"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["32"], "0$1"], + [, "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[57]"]], + [ + , + "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["[348]"], + "0$1", + ], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , "70[67]\\d{6}"], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + GF: [ + , + [, , "(?:[56]94\\d|7093)\\d{5}|(?:80|9\\d)\\d{7}", , , , , , , [9]], + [ + , + , + "594(?:[02-49]\\d|1[0-5]|5[6-9]|6[0-3]|80)\\d{4}", + , + , + , + "594101234", + ], + [, , "(?:694(?:[0-249]\\d|3[0-8])|7093[0-3])\\d{4}", , , , "694201234"], + [, , "80[0-5]\\d{6}", , , , "800012345"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "9(?:(?:396|76\\d)\\d|476[0-6])\\d{4}", , , , "976012345"], + "GF", + 594, + "00", + "0", + , + , + "0", + , + , + , + [ + [ + , + "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["[5-7]|9[47]"], + "0$1", + ], + [ + , + "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["[89]"], + "0$1", + ], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + GG: [ + , + [ + , + , + "(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?", + , + , + , + , + , + , + [7, 9, 10], + [6], + ], + [, , "1481[25-9]\\d{5}", , , , "1481256789", , , [10], [6]], + [, , "7(?:(?:781|839)\\d|911[17])\\d{5}", , , , "7781123456", , , [10]], + [, , "80[08]\\d{7}|800\\d{6}|8001111", , , , "8001234567"], + [ + , + , + "(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d", + , + , + , + "9012345678", + , + , + [7, 10], + ], + [, , , , , , , , , [-1]], + [, , "70\\d{8}", , , , "7012345678", , , [10]], + [, , "56\\d{8}", , , , "5612345678", , , [10]], + "GG", + 44, + "00", + "0", + , + , + "([25-9]\\d{5})$|0", + "1481$1", + , + , + , + , + [ + , + , + "76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}", + , + , + , + "7640123456", + , + , + [10], + ], + , + , + [, , , , , , , , , [-1]], + [, , "(?:3[0347]|55)\\d{8}", , , , "5512345678", , , [10]], + , + , + [, , , , , , , , , [-1]], + ], + GH: [ + , + [, , "(?:[235]\\d{3}|800)\\d{5}", , , , , , , [8, 9], [7]], + [ + , + , + "3082[0-5]\\d{4}|3(?:0(?:[237]\\d|8[01])|[167](?:2[0-6]|7\\d|80)|2(?:2[0-5]|7\\d|80)|3(?:2[0-3]|7\\d|80)|4(?:2[013-9]|3[01]|7\\d|80)|5(?:2[0-7]|7\\d|80)|8(?:2[0-2]|7\\d|80)|9(?:[28]0|7\\d))\\d{5}", + , + , + , + "302345678", + , + , + [9], + [7], + ], + [ + , + , + "(?:2(?:[0346-9]\\d|5[67])|5(?:[03-7]\\d|9[1-9]))\\d{6}", + , + , + , + "231234567", + , + , + [9], + ], + [, , "800\\d{5}", , , , "80012345", , , [8]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "GH", + 233, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{3})(\\d{4})", "$1 $2", ["[237]|8[0-2]"]], + [, "(\\d{3})(\\d{5})", "$1 $2", ["8"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[235]"], "0$1"], + ], + [ + [, "(\\d{3})(\\d{5})", "$1 $2", ["8"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[235]"], "0$1"], + ], + [, , , , , , , , , [-1]], + , + , + [, , "800\\d{5}", , , , , , , [8]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + GI: [ + , + [, , "(?:[25]\\d|60)\\d{6}", , , , , , , [8]], + [ + , + , + "2190[0-2]\\d{3}|2(?:0(?:[02]\\d|3[01])|16[24-9]|2[2-5]\\d)\\d{4}", + , + , + , + "20012345", + ], + [ + , + , + "5251[0-4]\\d{3}|(?:5(?:[146-8]\\d\\d|250)|60(?:1[01]|6\\d))\\d{4}", + , + , + , + "57123456", + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "GI", + 350, + "00", + , + , + , + , + , + , + , + [[, "(\\d{3})(\\d{5})", "$1 $2", ["2"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + GL: [ + , + [, , "(?:19|[2-689]\\d|70)\\d{4}", , , , , , , [6]], + [, , "(?:19|3[1-7]|[68][1-9]|70|9\\d)\\d{4}", , , , "321000"], + [, , "[245]\\d{5}", , , , "221234"], + [, , "80\\d{4}", , , , "801234"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "3[89]\\d{4}", , , , "381234"], + "GL", + 299, + "00", + , + , + , + , + , + , + , + [[, "(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["19|[2-9]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + GM: [ + , + [, , "[2-9]\\d{6}", , , , , , , [7]], + [ + , + , + "(?:4(?:[23]\\d\\d|4(?:1[024679]|[6-9]\\d))|5(?:5(?:3\\d|4[0-7])|6[67]\\d|7(?:1[04]|2[035]|3[58]|48))|8\\d{3})\\d{3}", + , + , + , + "5661234", + ], + [, , "556\\d{4}|(?:[23679]\\d|4[015]|5[0-489])\\d{5}", , , , "3012345"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "GM", + 220, + "00", + , + , + , + , + , + , + , + [[, "(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + GN: [ + , + [, , "722\\d{6}|(?:3|6\\d)\\d{7}", , , , , , , [8, 9]], + [ + , + , + "3(?:0(?:24|3[12]|4[1-35-7]|5[13]|6[189]|[78]1|9[1478])|1\\d\\d)\\d{4}", + , + , + , + "30241234", + , + , + [8], + ], + [, , "6[0-356]\\d{7}", , , , "601123456", , , [9]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "722\\d{6}", , , , "722123456", , , [9]], + "GN", + 224, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["3"]], + [, "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[67]"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + GP: [ + , + [, , "(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}", , , , , , , [9]], + [ + , + , + "590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}", + , + , + , + "590201234", + ], + [ + , + , + "(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}", + , + , + , + "690001234", + ], + [, , "80[0-5]\\d{6}", , , , "800012345"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}", , , , "976012345"], + "GP", + 590, + "00", + "0", + , + , + "0", + , + , + , + [ + [ + , + "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["[5-79]"], + "0$1", + ], + [, "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + 1, + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + GQ: [ + , + [, , "222\\d{6}|(?:3\\d|55|[89]0)\\d{7}", , , , , , , [9]], + [ + , + , + "33[0-24-9]\\d[46]\\d{4}|3(?:33|5\\d)\\d[7-9]\\d{4}", + , + , + , + "333091234", + ], + [, , "(?:222|55\\d)\\d{6}", , , , "222123456"], + [, , "80\\d[1-9]\\d{5}", , , , "800123456"], + [, , "90\\d[1-9]\\d{5}", , , , "900123456"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "GQ", + 240, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[235]"]], + [, "(\\d{3})(\\d{6})", "$1 $2", ["[89]"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + GR: [ + , + [ + , + , + "5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}", + , + , + , + , + , + , + [10, 11, 12], + ], + [ + , + , + "2(?:1\\d\\d|2(?:2[1-46-9]|[36][1-8]|4[1-7]|5[1-4]|7[1-5]|[89][1-9])|3(?:1\\d|2[1-57]|[35][1-3]|4[13]|7[1-7]|8[124-6]|9[1-79])|4(?:1\\d|2[1-8]|3[1-4]|4[13-5]|6[1-578]|9[1-5])|5(?:1\\d|[29][1-4]|3[1-5]|4[124]|5[1-6])|6(?:1\\d|[269][1-6]|3[1245]|4[1-7]|5[13-9]|7[14]|8[1-5])|7(?:1\\d|2[1-5]|3[1-6]|4[1-7]|5[1-57]|6[135]|9[125-7])|8(?:1\\d|2[1-5]|[34][1-4]|9[1-57]))\\d{6}", + , + , + , + "2123456789", + , + , + [10], + ], + [, , "68[57-9]\\d{7}|(?:69|94)\\d{8}", , , , "6912345678", , , [10]], + [, , "800\\d{7,9}", , , , "8001234567"], + [, , "90[19]\\d{7}", , , , "9091234567", , , [10]], + [, , "8(?:0[16]|12|[27]5|50)\\d{7}", , , , "8011234567", , , [10]], + [, , "70\\d{8}", , , , "7012345678", , , [10]], + [, , , , , , , , , [-1]], + "GR", + 30, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["21|7"]], + [ + , + "(\\d{4})(\\d{6})", + "$1 $2", + ["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"], + ], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2689]"]], + [, "(\\d{3})(\\d{3,4})(\\d{5})", "$1 $2 $3", ["8"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "5005000\\d{3}", , , , "5005000123", , , [10]], + , + , + [, , , , , , , , , [-1]], + ], + GT: [ + , + [, , "80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}", , , , , , , [8, 11]], + [, , "[267][2-9]\\d{6}", , , , "22456789", , , [8]], + [, , "(?:[3-5]\\d\\d|80[0-4])\\d{5}", , , , "51234567", , , [8]], + [, , "18[01]\\d{8}", , , , "18001112222", , , [11]], + [, , "19\\d{9}", , , , "19001112222", , , [11]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "GT", + 502, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{4})(\\d{4})", "$1 $2", ["[2-8]"]], + [, "(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + GU: [ + , + [, , "(?:[58]\\d\\d|671|900)\\d{7}", , , , , , , [10], [7]], + [ + , + , + "671(?:2\\d\\d|3(?:00|3[39]|4[349]|55|6[26])|4(?:00|56|7[1-9]|8[02-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[235-9])|7(?:[0479]7|2[0167]|3[45]|8[7-9])|8(?:[2-57-9]8|6[478])|9(?:2[29]|6[79]|7[1279]|8[7-9]|9[78]))\\d{4}", + , + , + , + "6713001234", + , + , + , + [7], + ], + [ + , + , + "671(?:2\\d\\d|3(?:00|3[39]|4[349]|55|6[26])|4(?:00|56|7[1-9]|8[02-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[235-9])|7(?:[0479]7|2[0167]|3[45]|8[7-9])|8(?:[2-57-9]8|6[478])|9(?:2[29]|6[79]|7[1279]|8[7-9]|9[78]))\\d{4}", + , + , + , + "6713001234", + , + , + , + [7], + ], + [, , "8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", , , , "8002123456"], + [, , "900[2-9]\\d{6}", , , , "9002123456"], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}", + , + , + , + "5002345678", + ], + [, , , , , , , , , [-1]], + "GU", + 1, + "011", + "1", + , + , + "([2-9]\\d{6})$|1", + "671$1", + , + 1, + , + , + [, , , , , , , , , [-1]], + , + "671", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + GW: [ + , + [, , "[49]\\d{8}|4\\d{6}", , , , , , , [7, 9]], + [, , "443\\d{6}", , , , "443201234", , , [9]], + [, , "9(?:5\\d|6[569]|77)\\d{6}", , , , "955012345", , , [9]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "40\\d{5}", , , , "4012345", , , [7]], + "GW", + 245, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{3})(\\d{4})", "$1 $2", ["40"]], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[49]"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + GY: [ + , + [, , "(?:[2-8]\\d{3}|9008)\\d{3}", , , , , , , [7]], + [ + , + , + "(?:2(?:1[6-9]|2[0-35-9]|3[1-4]|5[3-9]|6\\d|7[0-79])|3(?:2[25-9]|3\\d)|4(?:4[0-24]|5[56])|50[0-6]|77[1-57])\\d{4}", + , + , + , + "2201234", + ], + [, , "(?:510|6\\d\\d|7(?:[0-5]\\d|6[019]|70))\\d{4}", , , , "6091234"], + [, , "(?:289|8(?:00|6[28]|88|99))\\d{4}", , , , "2891234"], + [, , "9008\\d{3}", , , , "9008123"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "515\\d{4}", , , , "5151234"], + "GY", + 592, + "001", + , + , + , + , + , + , + , + [[, "(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + HK: [ + , + [ + , + , + "8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}", + , + , + , + , + , + , + [5, 6, 7, 8, 9, 11], + ], + [ + , + , + "(?:2(?:[13-9]\\d|2[013-9])\\d|3(?:(?:[1569][0-24-9]|4[0-246-9]|7[0-24-69])\\d|8(?:4[0-8]|[579]\\d|6[0-5]))|58(?:0[1-9]|1[2-9]))\\d{4}", + , + , + , + "21234567", + , + , + [8], + ], + [ + , + , + "(?:4(?:44[0-35-9]|6(?:4[0-57-9]|6[0-4])|7(?:3[0-4]|4[0-48]|6[0-5]))|5(?:35[4-8]|73[0-6]|95[0-8])|6(?:26[013-8]|(?:66|78)[0-5])|70(?:7[1-8]|8[0-8])|84(?:4[0-2]|8[0-35-9])|9(?:29[013-9]|39[014-9]|59[0-4]|899))\\d{4}|(?:4(?:4[0-35-9]|6[0-357-9]|7[0-25])|5(?:[1-59][0-46-9]|6[0-4689]|7[0-246-9])|6(?:0[1-9]|[13-59]\\d|[268][0-57-9]|7[0-79])|70[1-59]|84[0-39]|9(?:0[1-9]|1[02-9]|[2358][0-8]|[467]\\d))\\d{5}", + , + , + , + "51234567", + , + , + [8], + ], + [, , "800\\d{6}", , , , "800123456", , , [9]], + [ + , + , + "900(?:[0-24-9]\\d{7}|3\\d{1,4})", + , + , + , + "90012345678", + , + , + [5, 6, 7, 8, 11], + ], + [, , , , , , , , , [-1]], + [ + , + , + "8(?:1[0-4679]\\d|2(?:[0-36]\\d|7[0-4])|3(?:[034]\\d|2[09]|70))\\d{4}", + , + , + , + "81123456", + , + , + [8], + ], + [, , , , , , , , , [-1]], + "HK", + 852, + "00(?:30|5[09]|[126-9]?)", + , + , + , + , + , + "00", + , + [ + [, "(\\d{3})(\\d{2,5})", "$1 $2", ["900", "9003"]], + [, "(\\d{4})(\\d{4})", "$1 $2", ["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]], + [, "(\\d{3})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]], + ], + , + [ + , + , + "7(?:1(?:0[0-38]|1[0-3679]|3[013]|69|9[0136])|2(?:[02389]\\d|1[18]|7[27-9])|3(?:[0-38]\\d|7[0-369]|9[2357-9])|47\\d|5(?:[178]\\d|5[0-5])|6(?:0[0-7]|2[236-9]|[35]\\d)|7(?:[27]\\d|8[7-9])|8(?:[23689]\\d|7[1-9])|9(?:[025]\\d|6[0-246-8]|7[0-36-9]|8[238]))\\d{4}", + , + , + , + "71123456", + , + , + [8], + ], + , + , + [, , , , , , , , , [-1]], + [ + , + , + "30(?:0[1-9]|[15-7]\\d|2[047]|89)\\d{4}", + , + , + , + "30161234", + , + , + [8], + ], + , + , + [, , , , , , , , , [-1]], + ], + HN: [ + , + [, , "8\\d{10}|[237-9]\\d{7}", , , , , , , [8, 11]], + [ + , + , + "2(?:2(?:0[0-59]|1[1-9]|[23]\\d|4[02-7]|5[57]|6[245]|7[0135689]|8[01346-9]|9[0-2])|4(?:0[578]|2[3-59]|3[13-9]|4[0-68]|5[1-3589])|5(?:0[2357-9]|1[1-356]|4[03-5]|5\\d|6[014-69]|7[04]|80)|6(?:[056]\\d|17|2[067]|3[047]|4[0-378]|[78][0-8]|9[01])|7(?:0[5-79]|6[46-9]|7[02-9]|8[034]|91)|8(?:79|8[0-357-9]|9[1-57-9]))\\d{4}", + , + , + , + "22123456", + , + , + [8], + ], + [, , "[37-9]\\d{7}", , , , "91234567", , , [8]], + [, , "8002\\d{7}", , , , "80021234567", , , [11]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "HN", + 504, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{4})(\\d{4})", "$1-$2", ["[237-9]"]], + [, "(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["8"]], + ], + [[, "(\\d{4})(\\d{4})", "$1-$2", ["[237-9]"]]], + [, , , , , , , , , [-1]], + , + , + [, , "8002\\d{7}", , , , , , , [11]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + HR: [ + , + [ + , + , + "[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}", + , + , + , + , + , + , + [7, 8, 9], + [6], + ], + [ + , + , + "1\\d{7}|(?:2[0-3]|3[1-5]|4[02-47-9]|5[1-3])\\d{6,7}", + , + , + , + "12345678", + , + , + [8, 9], + [6, 7], + ], + [ + , + , + "9(?:(?:0[1-9]|[12589]\\d)\\d\\d|7(?:[0679]\\d\\d|5(?:[01]\\d|44|55|77|9[5-79])))\\d{4}|98\\d{6}", + , + , + , + "921234567", + , + , + [8, 9], + ], + [, , "80\\d{5,7}", , , , "800123456"], + [, , "6[01459]\\d{6}|6[01]\\d{5}", , , , "6001234", , , [7, 8]], + [, , , , , , , , , [-1]], + [, , "7[45]\\d{6}", , , , "74123456", , , [8]], + [, , , , , , , , , [-1]], + "HR", + 385, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["6[01]"], "0$1"], + [, "(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["8"], "0$1"], + [, "(\\d)(\\d{4})(\\d{3})", "$1 $2 $3", ["1"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["6|7[245]"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["9"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-57]"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "62\\d{6,7}|72\\d{6}", , , , "62123456", , , [8, 9]], + , + , + [, , , , , , , , , [-1]], + ], + HT: [ + , + [, , "[2-589]\\d{7}", , , , , , , [8]], + [, , "2(?:2\\d|5[1-5]|81|9[149])\\d{5}", , , , "22453300"], + [, , "(?:[34]\\d|5[56])\\d{6}", , , , "34101234"], + [, , "8\\d{7}", , , , "80012345"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "9(?:[67][0-4]|8[0-3589]|9\\d)\\d{5}", , , , "98901234"], + "HT", + 509, + "00", + , + , + , + , + , + , + , + [[, "(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["[2-589]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + HU: [ + , + [, , "[235-7]\\d{8}|[1-9]\\d{7}", , , , , , , [8, 9], [6, 7]], + [ + , + , + "(?:1\\d|[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6[23689]|8[2-57-9]|9[2-69])\\d{6}", + , + , + , + "12345678", + , + , + [8], + [6, 7], + ], + [, , "(?:[257]0|3[01])\\d{7}", , , , "201234567", , , [9]], + [, , "(?:[48]0\\d|680[29])\\d{5}", , , , "80123456"], + [, , "9[01]\\d{6}", , , , "90123456", , , [8]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "21\\d{7}", , , , "211234567", , , [9]], + "HU", + 36, + "00", + "06", + , + , + "06", + , + , + , + [ + [, "(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "(06 $1)"], + [ + , + "(\\d{2})(\\d{3})(\\d{3})", + "$1 $2 $3", + ["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"], + "(06 $1)", + ], + [, "(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-9]"], "06 $1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , "(?:[48]0\\d|680[29])\\d{5}"], + [, , "38\\d{7}", , , , "381234567", , , [9]], + , + , + [, , , , , , , , , [-1]], + ], + ID: [ + , + [ + , + , + "00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}", + , + , + , + , + , + , + [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], + [5, 6], + ], + [ + , + , + "2[124]\\d{7,8}|619\\d{8}|2(?:1(?:14|500)|2\\d{3})\\d{3}|61\\d{5,8}|(?:2(?:[35][1-4]|6[0-8]|7[1-6]|8\\d|9[1-8])|3(?:1|[25][1-8]|3[1-68]|4[1-3]|6[1-3568]|7[0-469]|8\\d)|4(?:0[1-589]|1[01347-9]|2[0-36-8]|3[0-24-68]|43|5[1-378]|6[1-5]|7[134]|8[1245])|5(?:1[1-35-9]|2[25-8]|3[124-9]|4[1-3589]|5[1-46]|6[1-8])|6(?:[25]\\d|3[1-69]|4[1-6])|7(?:02|[125][1-9]|[36]\\d|4[1-8]|7[0-36-9])|9(?:0[12]|1[013-8]|2[0-479]|5[125-8]|6[23679]|7[159]|8[01346]))\\d{5,8}", + , + , + , + "218350123", + , + , + [7, 8, 9, 10, 11], + [5, 6], + ], + [, , "8[1-35-9]\\d{7,10}", , , , "812345678", , , [9, 10, 11, 12]], + [ + , + , + "00(?:1803\\d{5,11}|7803\\d{7})|(?:177\\d|800)\\d{5,7}", + , + , + , + "8001234567", + , + , + [8, 9, 10, 11, 12, 13, 14, 15, 16, 17], + ], + [, , "809\\d{7}", , , , "8091234567", , , [10]], + [, , "804\\d{7}", , , , "8041234567", , , [10]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "ID", + 62, + "00[89]", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["15"]], + [, "(\\d{2})(\\d{5,9})", "$1 $2", ["2[124]|[36]1"], "(0$1)"], + [, "(\\d{3})(\\d{5,7})", "$1 $2", ["800"], "0$1"], + [, "(\\d{3})(\\d{5,8})", "$1 $2", ["[2-79]"], "(0$1)"], + [, "(\\d{3})(\\d{3,4})(\\d{3})", "$1-$2-$3", ["8[1-35-9]"], "0$1"], + [, "(\\d{3})(\\d{6,8})", "$1 $2", ["1"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["804"], "0$1"], + [, "(\\d{3})(\\d)(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["80"], "0$1"], + [, "(\\d{3})(\\d{4})(\\d{4,5})", "$1-$2-$3", ["8"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{3})(\\d{2,8})", "$1 $2 $3 $4", ["001"]], + [, "(\\d{2})(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["0"]], + ], + [ + [, "(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["15"]], + [, "(\\d{2})(\\d{5,9})", "$1 $2", ["2[124]|[36]1"], "(0$1)"], + [, "(\\d{3})(\\d{5,7})", "$1 $2", ["800"], "0$1"], + [, "(\\d{3})(\\d{5,8})", "$1 $2", ["[2-79]"], "(0$1)"], + [, "(\\d{3})(\\d{3,4})(\\d{3})", "$1-$2-$3", ["8[1-35-9]"], "0$1"], + [, "(\\d{3})(\\d{6,8})", "$1 $2", ["1"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["804"], "0$1"], + [, "(\\d{3})(\\d)(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["80"], "0$1"], + [, "(\\d{3})(\\d{4})(\\d{4,5})", "$1-$2-$3", ["8"], "0$1"], + ], + [, , , , , , , , , [-1]], + , + , + [ + , + , + "001803\\d{5,11}|(?:007803\\d|8071)\\d{6}", + , + , + , + , + , + , + [10, 11, 12, 13, 14, 15, 16, 17], + ], + [, , "(?:1500|8071\\d{3})\\d{3}", , , , "8071123456", , , [7, 10]], + , + , + [, , , , , , , , , [-1]], + ], + IE: [ + , + [ + , + , + "(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}", + , + , + , + , + , + , + [7, 8, 9, 10], + [5, 6], + ], + [ + , + , + "(?:1\\d|21)\\d{6,7}|(?:2[24-9]|4(?:0[24]|5\\d|7)|5(?:0[45]|1\\d|8)|6(?:1\\d|[237-9])|9(?:1\\d|[35-9]))\\d{5}|(?:23|4(?:[1-469]|8\\d)|5[23679]|6[4-6]|7[14]|9[04])\\d{7}", + , + , + , + "2212345", + , + , + , + [5, 6], + ], + [, , "8(?:22|[35-9]\\d)\\d{6}", , , , "850123456", , , [9]], + [, , "1800\\d{6}", , , , "1800123456", , , [10]], + [, , "15(?:1[2-8]|[2-8]0|9[089])\\d{6}", , , , "1520123456", , , [10]], + [, , "18[59]0\\d{6}", , , , "1850123456", , , [10]], + [, , "700\\d{6}", , , , "700123456", , , [9]], + [, , "76\\d{7}", , , , "761234567", , , [9]], + "IE", + 353, + "00", + "0", + , + , + "0", + , + , + , + [ + [ + , + "(\\d{2})(\\d{5})", + "$1 $2", + ["2[24-9]|47|58|6[237-9]|9[35-9]"], + "(0$1)", + ], + [, "(\\d{3})(\\d{5})", "$1 $2", ["[45]0"], "(0$1)"], + [, "(\\d)(\\d{3,4})(\\d{4})", "$1 $2 $3", ["1"], "(0$1)"], + [ + , + "(\\d{2})(\\d{3})(\\d{3,4})", + "$1 $2 $3", + ["[2569]|4[1-69]|7[14]"], + "(0$1)", + ], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["70"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["81"], "(0$1)"], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[78]"], "0$1"], + [, "(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]], + [, "(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["4"], "(0$1)"], + [, "(\\d{2})(\\d)(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["8"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , "18[59]0\\d{6}", , , , , , , [10]], + [, , "818\\d{6}", , , , "818123456", , , [9]], + , + , + [ + , + , + "88210[1-9]\\d{4}|8(?:[35-79]5\\d\\d|8(?:[013-9]\\d\\d|2(?:[01][1-9]|[2-9]\\d)))\\d{5}", + , + , + , + "8551234567", + , + , + [10], + ], + ], + IL: [ + , + [ + , + , + "1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}", + , + , + , + , + , + , + [7, 8, 9, 10, 11, 12], + ], + [ + , + , + "153\\d{8,9}|29[1-9]\\d{5}|(?:2[0-8]|[3489]\\d)\\d{6}", + , + , + , + "21234567", + , + , + [8, 11, 12], + [7], + ], + [ + , + , + "55(?:4(?:[01]0|5[0-5])|57[0-289])\\d{4}|5(?:(?:[0-2][02-9]|[36]\\d|[49][2-9]|8[3-7])\\d|5(?:01|2\\d|3[0-3]|4[34]|5[0-25689]|6[6-8]|7[0-267]|8[7-9]|9[1-9]))\\d{5}", + , + , + , + "502345678", + , + , + [9], + ], + [, , "1(?:255|80[019]\\d{3})\\d{3}", , , , "1800123456", , , [7, 10]], + [ + , + , + "1212\\d{4}|1(?:200|9(?:0[0-2]|19))\\d{6}", + , + , + , + "1919123456", + , + , + [8, 10], + ], + [, , "1700\\d{6}", , , , "1700123456", , , [10]], + [, , , , , , , , , [-1]], + [ + , + , + "7(?:38(?:[05]\\d|8[018])|8(?:33|55|77|81)\\d)\\d{4}|7(?:18|2[23]|3[237]|47|6[258]|7\\d|82|9[2-9])\\d{6}", + , + , + , + "771234567", + , + , + [9], + ], + "IL", + 972, + "0(?:0|1[2-9])", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{4})(\\d{3})", "$1-$2", ["125"]], + [, "(\\d{4})(\\d{2})(\\d{2})", "$1-$2-$3", ["121"]], + [, "(\\d)(\\d{3})(\\d{4})", "$1-$2-$3", ["[2-489]"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["[57]"], "0$1"], + [, "(\\d{4})(\\d{3})(\\d{3})", "$1-$2-$3", ["12"]], + [, "(\\d{4})(\\d{6})", "$1-$2", ["159"]], + [, "(\\d)(\\d{3})(\\d{3})(\\d{3})", "$1-$2-$3-$4", ["1[7-9]"]], + [, "(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})", "$1-$2 $3-$4", ["15"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , "1700\\d{6}", , , , , , , [10]], + [, , "1599\\d{6}", , , , "1599123456", , , [10]], + , + , + [, , "151\\d{8,9}", , , , "15112340000", , , [11, 12]], + ], + IM: [ + , + [, , "1624\\d{6}|(?:[3578]\\d|90)\\d{8}", , , , , , , [10], [6]], + [, , "1624(?:230|[5-8]\\d\\d)\\d{3}", , , , "1624756789", , , , [6]], + [ + , + , + "76245[06]\\d{4}|7(?:4576|[59]24\\d|624[0-4689])\\d{5}", + , + , + , + "7924123456", + ], + [, , "808162\\d{4}", , , , "8081624567"], + [ + , + , + "8(?:440[49]06|72299\\d)\\d{3}|(?:8(?:45|70)|90[0167])624\\d{4}", + , + , + , + "9016247890", + ], + [, , , , , , , , , [-1]], + [, , "70\\d{8}", , , , "7012345678"], + [, , "56\\d{8}", , , , "5612345678"], + "IM", + 44, + "00", + "0", + , + , + "([25-8]\\d{5})$|0", + "1624$1", + , + , + , + , + [, , , , , , , , , [-1]], + , + "74576|(?:16|7[56])24", + [, , , , , , , , , [-1]], + [ + , + , + "3440[49]06\\d{3}|(?:3(?:08162|3\\d{4}|45624|7(?:0624|2299))|55\\d{4})\\d{4}", + , + , + , + "5512345678", + ], + , + , + [, , , , , , , , , [-1]], + ], + IN: [ + , + [ + , + , + "(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}", + , + , + , + , + , + , + [8, 9, 10, 11, 12, 13], + [6, 7], + ], + [ + , + , + "2717(?:[2-7]\\d|95)\\d{4}|(?:271[0-689]|782[0-6])[2-7]\\d{5}|(?:170[24]|2(?:(?:[02][2-79]|90)\\d|80[13468])|(?:3(?:23|80)|683|79[1-7])\\d|4(?:20[24]|72[2-8])|552[1-7])\\d{6}|(?:11|33|4[04]|80)[2-7]\\d{7}|(?:342|674|788)(?:[0189][2-7]|[2-7]\\d)\\d{5}|(?:1(?:2[0-249]|3[0-25]|4[145]|[59][14]|6[014]|7[1257]|8[01346])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568]|9[14])|3(?:26|4[13]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[014-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|2[14]|3[134]|4[47]|5[15]|[67]1)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91))[2-7]\\d{6}|(?:1(?:2[35-8]|3[346-9]|4[236-9]|[59][0235-9]|6[235-9]|7[34689]|8[257-9])|2(?:1[134689]|3[24-8]|4[2-8]|5[25689]|6[2-4679]|7[3-79]|8[2-479]|9[235-9])|3(?:01|1[79]|2[1245]|4[5-8]|5[125689]|6[235-7]|7[157-9]|8[2-46-8])|4(?:1[14578]|2[5689]|3[2-467]|5[4-7]|6[35]|73|8[2689]|9[2389])|5(?:[16][146-9]|2[14-8]|3[1346]|4[14-69]|5[46]|7[2-4]|8[2-8]|9[246])|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])|7(?:1[013-9]|2[0235-9]|3[2679]|4[1-35689]|5[2-46-9]|[67][02-9]|8[013-7]|9[089])|8(?:1[1357-9]|2[235-8]|3[03-57-9]|4[0-24-9]|5\\d|6[2457-9]|7[1-6]|8[1256]|9[2-4]))\\d[2-7]\\d{5}", + , + , + , + "7410410123", + , + , + [10], + [6, 7, 8], + ], + [ + , + , + "(?:61279|7(?:887[02-9]|9(?:313|79[07-9]))|8(?:079[04-9]|(?:84|91)7[02-8]))\\d{5}|(?:6(?:12|[2-47]1|5[17]|6[13]|80)[0189]|7(?:1(?:2[0189]|9[0-5])|2(?:[14][017-9]|8[0-59])|3(?:2[5-8]|[34][017-9]|9[016-9])|4(?:1[015-9]|[29][89]|39|8[389])|5(?:[15][017-9]|2[04-9]|9[7-9])|6(?:0[0-47]|1[0-257-9]|2[0-4]|3[19]|5[4589])|70[0289]|88[089]|97[02-8])|8(?:0(?:6[67]|7[02-8])|70[017-9]|84[01489]|91[0-289]))\\d{6}|(?:7(?:31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[0189]\\d|7[02-8])\\d{5}|(?:6(?:[09]\\d|1[04679]|2[03689]|3[05-9]|4[0489]|50|6[069]|7[07]|8[7-9])|7(?:0\\d|2[0235-79]|3[05-8]|40|5[0346-8]|6[6-9]|7[1-9]|8[0-79]|9[089])|8(?:0[01589]|1[0-57-9]|2[235-9]|3[03-57-9]|[45]\\d|6[02457-9]|7[1-69]|8[0-25-9]|9[02-9])|9\\d\\d)\\d{7}|(?:6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|8[124-6])\\d|7(?:[235689]\\d|4[0189]))|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-5])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]|881))[0189]\\d{5}", + , + , + , + "8123456789", + , + , + [10], + ], + [ + , + , + "000800\\d{7}|1(?:600\\d{6}|80(?:0\\d{4,9}|3\\d{9}))", + , + , + , + "1800123456", + ], + [, , "186[12]\\d{9}", , , , "1861123456789", , , [13]], + [, , "1860\\d{7}", , , , "18603451234", , , [11]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "IN", + 91, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{7})", "$1", ["575"]], + [ + , + "(\\d{8})", + "$1", + [ + "5(?:0|2[23]|3[03]|[67]1|88)", + "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)", + "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)", + ], + , + , + 1, + ], + [, "(\\d{4})(\\d{4,5})", "$1 $2", ["180", "1800"], , , 1], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["140"], , , 1], + [ + , + "(\\d{2})(\\d{4})(\\d{4})", + "$1 $2 $3", + [ + "11|2[02]|33|4[04]|79[1-7]|80[2-46]", + "11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])", + "11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])", + ], + "0$1", + , + 1, + ], + [ + , + "(\\d{3})(\\d{3})(\\d{4})", + "$1 $2 $3", + [ + "1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]", + "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]", + "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]", + ], + "0$1", + , + 1, + ], + [ + , + "(\\d{4})(\\d{3})(\\d{3})", + "$1 $2 $3", + [ + "1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807", + "1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]", + "1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]", + ], + "0$1", + , + 1, + ], + [, "(\\d{5})(\\d{5})", "$1 $2", ["[6-9]"], "0$1", , 1], + [ + , + "(\\d{4})(\\d{2,4})(\\d{4})", + "$1 $2 $3", + ["1(?:6|8[06])", "1(?:6|8[06]0)"], + , + , + 1, + ], + [, "(\\d{3})(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["0"]], + [, "(\\d{4})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["18"], , , 1], + ], + [ + [ + , + "(\\d{8})", + "$1", + [ + "5(?:0|2[23]|3[03]|[67]1|88)", + "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)", + "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)", + ], + , + , + 1, + ], + [, "(\\d{4})(\\d{4,5})", "$1 $2", ["180", "1800"], , , 1], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["140"], , , 1], + [ + , + "(\\d{2})(\\d{4})(\\d{4})", + "$1 $2 $3", + [ + "11|2[02]|33|4[04]|79[1-7]|80[2-46]", + "11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])", + "11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])", + ], + "0$1", + , + 1, + ], + [ + , + "(\\d{3})(\\d{3})(\\d{4})", + "$1 $2 $3", + [ + "1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]", + "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]", + "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]", + ], + "0$1", + , + 1, + ], + [ + , + "(\\d{4})(\\d{3})(\\d{3})", + "$1 $2 $3", + [ + "1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807", + "1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]", + "1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]", + ], + "0$1", + , + 1, + ], + [, "(\\d{5})(\\d{5})", "$1 $2", ["[6-9]"], "0$1", , 1], + [ + , + "(\\d{4})(\\d{2,4})(\\d{4})", + "$1 $2 $3", + ["1(?:6|8[06])", "1(?:6|8[06]0)"], + , + , + 1, + ], + [, "(\\d{4})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["18"], , , 1], + ], + [, , , , , , , , , [-1]], + , + , + [ + , + , + "1(?:600\\d{6}|800\\d{4,9})|(?:000800|18(?:03\\d\\d|6(?:0|[12]\\d\\d)))\\d{7}", + ], + [, , "140\\d{7}", , , , "1409305260", , , [10]], + , + , + [, , , , , , , , , [-1]], + ], + IO: [ + , + [, , "3\\d{6}", , , , , , , [7]], + [, , "37\\d{5}", , , , "3709100"], + [, , "38\\d{5}", , , , "3801234"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "IO", + 246, + "00", + , + , + , + , + , + , + , + [[, "(\\d{3})(\\d{4})", "$1 $2", ["3"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + IQ: [ + , + [ + , + , + "(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}", + , + , + , + , + , + , + [8, 9, 10], + [6, 7], + ], + [ + , + , + "1\\d{7}|(?:2[13-5]|3[02367]|4[023]|5[03]|6[026])\\d{6,7}", + , + , + , + "12345678", + , + , + [8, 9], + [6, 7], + ], + [, , "7[3-9]\\d{8}", , , , "7912345678", , , [10]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "IQ", + 964, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-6]"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + IR: [ + , + [ + , + , + "[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}", + , + , + , + , + , + , + [4, 5, 6, 7, 10], + [8], + ], + [ + , + , + "(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])(?:[03-57]\\d{7}|[16]\\d{3}(?:\\d{4})?|[289]\\d{3}(?:\\d(?:\\d{3})?)?)|94(?:000[09]|(?:12\\d|30[0-2])\\d|2(?:121|[2689]0\\d)|4(?:111|40\\d))\\d{4}", + , + , + , + "2123456789", + , + , + [6, 7, 10], + [4, 5, 8], + ], + [ + , + , + "9(?:(?:0[0-5]|[13]\\d|2[0-3])\\d\\d|9(?:[0-46]\\d\\d|5(?:10|5\\d)|8(?:[12]\\d|88)|9(?:0[0-3]|[19]\\d|21|69|77|8[7-9])))\\d{5}", + , + , + , + "9123456789", + , + , + [10], + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "IR", + 98, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{4,5})", "$1", ["96"], "0$1"], + [ + , + "(\\d{2})(\\d{4,5})", + "$1 $2", + [ + "(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]", + ], + "0$1", + ], + [, "(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["9"], "0$1"], + [, "(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["[1-8]"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [ + , + , + "9(?:4440\\d{5}|6(?:0[12]|2[16-8]|3(?:08|[14]5|[23]|66)|4(?:0|80)|5[01]|6[89]|86|9[19]))", + , + , + , + , + , + , + [4, 5, 10], + ], + [ + , + , + "96(?:0[12]|2[16-8]|3(?:08|[14]5|[23]|66)|4(?:0|80)|5[01]|6[89]|86|9[19])", + , + , + , + "9601", + , + , + [4, 5], + ], + , + , + [, , , , , , , , , [-1]], + ], + IS: [ + , + [, , "(?:38\\d|[4-9])\\d{6}", , , , , , , [7, 9]], + [ + , + , + "(?:4(?:1[0-24-69]|2[0-7]|[37][0-8]|4[0-24589]|5[0-68]|6\\d|8[0-36-8])|5(?:05|[156]\\d|2[02578]|3[0-579]|4[03-7]|7[0-2578]|8[0-35-9]|9[013-689])|872)\\d{4}", + , + , + , + "4101234", + , + , + [7], + ], + [ + , + , + "(?:38[589]\\d\\d|6(?:1[1-8]|2[0-6]|3[026-9]|4[014679]|5[0159]|6[0-69]|70|8[06-8]|9\\d)|7(?:5[057]|[6-9]\\d)|8(?:2[0-59]|[3-69]\\d|8[238]))\\d{4}", + , + , + , + "6111234", + ], + [, , "80[0-8]\\d{4}", , , , "8001234", , , [7]], + [ + , + , + "90(?:0\\d|1[5-79]|2[015-79]|3[135-79]|4[125-7]|5[25-79]|7[1-37]|8[0-35-7])\\d{3}", + , + , + , + "9001234", + , + , + [7], + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "49[0-24-79]\\d{4}", , , , "4921234", , , [7]], + "IS", + 354, + "00|1(?:0(?:01|[12]0)|100)", + , + , + , + , + , + "00", + , + [ + [, "(\\d{3})(\\d{4})", "$1 $2", ["[4-9]"]], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["3"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "809\\d{4}", , , , "8091234", , , [7]], + , + , + [, , "(?:689|8(?:7[18]|80)|95[48])\\d{4}", , , , "6891234", , , [7]], + ], + IT: [ + , + [ + , + , + "0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?", + , + , + , + , + , + , + [6, 7, 8, 9, 10, 11, 12], + ], + [ + , + , + "0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}", + , + , + , + "0212345678", + , + , + [6, 7, 8, 9, 10, 11], + ], + [, , "3[2-9]\\d{7,8}|(?:31|43)\\d{8}", , , , "3123456789", , , [9, 10]], + [, , "80(?:0\\d{3}|3)\\d{3}", , , , "800123456", , , [6, 9]], + [ + , + , + "(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}", + , + , + , + "899123456", + , + , + [6, 8, 9, 10], + ], + [, , "84(?:[08]\\d{3}|[17])\\d{3}", , , , "848123456", , , [6, 9]], + [, , "1(?:78\\d|99)\\d{6}", , , , "1781234567", , , [9, 10]], + [, , "55\\d{8}", , , , "5512345678", , , [10]], + "IT", + 39, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{4,5})", "$1", ["1(?:0|9[246])", "1(?:0|9(?:2[2-9]|[46]))"]], + [, "(\\d{6})", "$1", ["1(?:1|92)"]], + [, "(\\d{2})(\\d{4,6})", "$1 $2", ["0[26]"]], + [ + , + "(\\d{3})(\\d{3,6})", + "$1 $2", + [ + "0[13-57-9][0159]|8(?:03|4[17]|9[2-5])", + "0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))", + ], + ], + [, "(\\d{4})(\\d{2,6})", "$1 $2", ["0(?:[13-579][2-46-8]|8[236-8])"]], + [, "(\\d{4})(\\d{4})", "$1 $2", ["894"]], + [, "(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0[26]|5"]], + [ + , + "(\\d{3})(\\d{3})(\\d{3,4})", + "$1 $2 $3", + ["1(?:44|[679])|[378]|43"], + ], + [, "(\\d{3})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0[13-57-9][0159]|14"]], + [, "(\\d{2})(\\d{4})(\\d{5})", "$1 $2 $3", ["0[26]"]], + [, "(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["0"]], + [, "(\\d{3})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["3"]], + ], + [ + [, "(\\d{2})(\\d{4,6})", "$1 $2", ["0[26]"]], + [ + , + "(\\d{3})(\\d{3,6})", + "$1 $2", + [ + "0[13-57-9][0159]|8(?:03|4[17]|9[2-5])", + "0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))", + ], + ], + [, "(\\d{4})(\\d{2,6})", "$1 $2", ["0(?:[13-579][2-46-8]|8[236-8])"]], + [, "(\\d{4})(\\d{4})", "$1 $2", ["894"]], + [, "(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0[26]|5"]], + [ + , + "(\\d{3})(\\d{3})(\\d{3,4})", + "$1 $2 $3", + ["1(?:44|[679])|[378]|43"], + ], + [, "(\\d{3})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0[13-57-9][0159]|14"]], + [, "(\\d{2})(\\d{4})(\\d{5})", "$1 $2 $3", ["0[26]"]], + [, "(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["0"]], + [, "(\\d{3})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["3"]], + ], + [, , , , , , , , , [-1]], + 1, + , + [, , "848\\d{6}", , , , , , , [9]], + [, , , , , , , , , [-1]], + , + , + [, , "3[2-8]\\d{9,10}", , , , "33101234501", , , [11, 12]], + ], + JE: [ + , + [, , "1534\\d{6}|(?:[3578]\\d|90)\\d{8}", , , , , , , [10], [6]], + [, , "1534[0-24-8]\\d{5}", , , , "1534456789", , , , [6]], + [ + , + , + "7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}", + , + , + , + "7797712345", + ], + [, , "80(?:07(?:35|81)|8901)\\d{4}", , , , "8007354567"], + [ + , + , + "(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}", + , + , + , + "9018105678", + ], + [, , , , , , , , , [-1]], + [, , "701511\\d{4}", , , , "7015115678"], + [, , "56\\d{8}", , , , "5612345678"], + "JE", + 44, + "00", + "0", + , + , + "([0-24-8]\\d{5})$|0", + "1534$1", + , + , + , + , + [ + , + , + "76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}", + , + , + , + "7640123456", + ], + , + , + [, , , , , , , , , [-1]], + [ + , + , + "(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}", + , + , + , + "5512345678", + ], + , + , + [, , , , , , , , , [-1]], + ], + JM: [ + , + [, , "(?:[58]\\d\\d|658|900)\\d{7}", , , , , , , [10], [7]], + [ + , + , + "8766060\\d{3}|(?:658(?:2(?:[0-8]\\d|9[0-46-9])|[3-9]\\d\\d)|876(?:52[35]|6(?:0[1-3579]|1[0235-9]|[23]\\d|40|5[06]|6[2-589]|7[0-25-9]|8[04]|9[4-9])|7(?:0[2-689]|[1-6]\\d|8[056]|9[45])|9(?:0[1-8]|1[02378]|[2-8]\\d|9[2-468])))\\d{4}", + , + , + , + "8765230123", + , + , + , + [7], + ], + [ + , + , + "(?:658295|876(?:2(?:0[1-9]|[13-9]\\d|2[013-9])|[348]\\d\\d|5(?:0[1-9]|[1-9]\\d)|6(?:4[89]|6[67])|7(?:0[07]|7\\d|8[1-47-9]|9[0-36-9])|9(?:[01]9|9[0579])))\\d{4}", + , + , + , + "8762101234", + , + , + , + [7], + ], + [, , "8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", , , , "8002123456"], + [, , "900[2-9]\\d{6}", , , , "9002123456"], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}", + , + , + , + "5002345678", + ], + [, , , , , , , , , [-1]], + "JM", + 1, + "011", + "1", + , + , + "1", + , + , + , + , + , + [, , , , , , , , , [-1]], + , + "658|876", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + JO: [ + , + [, , "(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}", , , , , , , [8, 9]], + [ + , + , + "87(?:000|90[01])\\d{3}|(?:2(?:6(?:2[0-35-9]|3[0-578]|4[24-7]|5[0-24-8]|[6-8][023]|9[0-3])|7(?:0[1-79]|10|2[014-7]|3[0-689]|4[019]|5[0-3578]))|32(?:0[1-69]|1[1-35-7]|2[024-7]|3\\d|4[0-3]|[5-7][023])|53(?:0[0-3]|[13][023]|2[0-59]|49|5[0-35-9]|6[15]|7[45]|8[1-6]|9[0-36-9])|6(?:2(?:[05]0|22)|3(?:00|33)|4(?:0[0-25]|1[2-7]|2[0569]|[38][07-9]|4[025689]|6[0-589]|7\\d|9[0-2])|5(?:[01][056]|2[034]|3[0-57-9]|4[178]|5[0-69]|6[0-35-9]|7[1-379]|8[0-68]|9[0239]))|87(?:20|7[078]|99))\\d{4}", + , + , + , + "62001234", + , + , + [8], + ], + [, , "7(?:[78][0-25-9]|9\\d)\\d{6}", , , , "790123456", , , [9]], + [, , "80\\d{6}", , , , "80012345", , , [8]], + [, , "9\\d{7}", , , , "90012345", , , [8]], + [, , "85\\d{6}", , , , "85012345", , , [8]], + [, , "70\\d{7}", , , , "700123456", , , [9]], + [, , , , , , , , , [-1]], + "JO", + 962, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2356]|87"], "(0$1)"], + [, "(\\d{3})(\\d{5,6})", "$1 $2", ["[89]"], "0$1"], + [, "(\\d{2})(\\d{7})", "$1 $2", ["70"], "0$1"], + [, "(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], + ], + , + [, , "74(?:66|77)\\d{5}", , , , "746612345", , , [9]], + , + , + [, , , , , , , , , [-1]], + [, , "8(?:10|8\\d)\\d{5}", , , , "88101234", , , [8]], + , + , + [, , , , , , , , , [-1]], + ], + JP: [ + , + [ + , + , + "00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}", + , + , + , + , + , + , + [8, 9, 10, 11, 12, 13, 14, 15, 16, 17], + ], + [ + , + , + "(?:1(?:1[235-8]|2[3-6]|3[3-9]|4[2-6]|[58][2-8]|6[2-7]|7[2-9]|9[1-9])|(?:2[2-9]|[36][1-9])\\d|4(?:[2-578]\\d|6[02-8]|9[2-59])|5(?:[2-589]\\d|6[1-9]|7[2-8])|7(?:[25-9]\\d|3[4-9]|4[02-9])|8(?:[2679]\\d|3[2-9]|4[5-9]|5[1-9]|8[03-9])|9(?:[2-58]\\d|[679][1-9]))\\d{6}", + , + , + , + "312345678", + , + , + [9], + ], + [ + , + , + "(?:601[0-4]0|[7-9]0[1-9]\\d\\d)\\d{5}", + , + , + , + "9012345678", + , + , + [10], + ], + [ + , + , + "00777(?:[01]|5\\d)\\d\\d|(?:00(?:7778|882[1245])|(?:120|800\\d)\\d\\d)\\d{4}|00(?:37|66|78)\\d{6,13}", + , + , + , + "120123456", + ], + [, , "990\\d{6}", , , , "990123456", , , [9]], + [, , , , , , , , , [-1]], + [, , "60\\d{7}", , , , "601234567", , , [9]], + [, , "50[1-9]\\d{7}", , , , "5012345678", , , [10]], + "JP", + 81, + "010", + "0", + , + , + "(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0", + "$1", + , + , + [ + [ + , + "(\\d{4})(\\d{4})", + "$1-$2", + ["007", "0077", "00777", "00777[01]"], + ], + [, "(\\d{8,10})", "$1", ["000"]], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1-$2-$3", ["(?:12|57|99)0"], "0$1"], + [ + , + "(\\d{4})(\\d)(\\d{4})", + "$1-$2-$3", + [ + "1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])", + "1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]", + "1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]", + ], + "0$1", + ], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["60"], "0$1"], + [ + , + "(\\d)(\\d{4})(\\d{4})", + "$1-$2-$3", + [ + "3|4(?:2[09]|7[01])|6[1-9]", + "3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]", + ], + "0$1", + ], + [ + , + "(\\d{2})(\\d{3})(\\d{4})", + "$1-$2-$3", + [ + "1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])", + "1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]", + "1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]", + ], + "0$1", + ], + [ + , + "(\\d{3})(\\d{2})(\\d{4})", + "$1-$2-$3", + ["[14]|[289][2-9]|5[3-9]|7[2-4679]"], + "0$1", + ], + [, "(\\d{4})(\\d{2})(\\d{3,4})", "$1-$2-$3", ["007", "0077"]], + [, "(\\d{4})(\\d{2})(\\d{4})", "$1-$2-$3", ["008"]], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["800"], "0$1"], + [, "(\\d{2})(\\d{4})(\\d{4})", "$1-$2-$3", ["[25-9]"], "0$1"], + [, "(\\d{4})(\\d{3})(\\d{3,4})", "$1-$2-$3", ["0"]], + [, "(\\d{4})(\\d{4})(\\d{4,5})", "$1-$2-$3", ["0"]], + [, "(\\d{4})(\\d{5})(\\d{5,6})", "$1-$2-$3", ["0"]], + [, "(\\d{4})(\\d{6})(\\d{6,7})", "$1-$2-$3", ["0"]], + ], + [ + [, "(\\d{3})(\\d{3})(\\d{3})", "$1-$2-$3", ["(?:12|57|99)0"], "0$1"], + [ + , + "(\\d{4})(\\d)(\\d{4})", + "$1-$2-$3", + [ + "1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])", + "1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]", + "1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]", + ], + "0$1", + ], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["60"], "0$1"], + [ + , + "(\\d)(\\d{4})(\\d{4})", + "$1-$2-$3", + [ + "3|4(?:2[09]|7[01])|6[1-9]", + "3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]", + ], + "0$1", + ], + [ + , + "(\\d{2})(\\d{3})(\\d{4})", + "$1-$2-$3", + [ + "1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])", + "1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]", + "1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]", + ], + "0$1", + ], + [ + , + "(\\d{3})(\\d{2})(\\d{4})", + "$1-$2-$3", + ["[14]|[289][2-9]|5[3-9]|7[2-4679]"], + "0$1", + ], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["800"], "0$1"], + [, "(\\d{2})(\\d{4})(\\d{4})", "$1-$2-$3", ["[25-9]"], "0$1"], + ], + [, , "20\\d{8}", , , , "2012345678", , , [10]], + , + , + [ + , + , + "00(?:777(?:[01]|(?:5|8\\d)\\d)|882[1245]\\d\\d)\\d\\d|00(?:37|66|78)\\d{6,13}", + ], + [, , "570\\d{6}", , , , "570123456", , , [9]], + , + , + [, , , , , , , , , [-1]], + ], + KE: [ + , + [ + , + , + "(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}", + , + , + , + , + , + , + [7, 8, 9, 10], + ], + [ + , + , + "(?:4[245]|5[1-79]|6[01457-9])\\d{5,7}|(?:4[136]|5[08]|62)\\d{7}|(?:[24]0|66)\\d{6,7}", + , + , + , + "202012345", + , + , + [7, 8, 9], + ], + [ + , + , + "(?:1(?:0[0-8]|1[0-7]|2[014]|30)|7\\d\\d)\\d{6}", + , + , + , + "712123456", + , + , + [9], + ], + [, , "800[02-8]\\d{5,6}", , , , "800223456", , , [9, 10]], + [, , "900[02-9]\\d{5}", , , , "900223456", , , [9]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "KE", + 254, + "000", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{2})(\\d{5,7})", "$1 $2", ["[24-6]"], "0$1"], + [, "(\\d{3})(\\d{6})", "$1 $2", ["[17]"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[89]"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + KG: [ + , + [, , "8\\d{9}|[235-9]\\d{8}", , , , , , , [9, 10], [5, 6]], + [ + , + , + "312(?:5[0-79]\\d|9(?:[0-689]\\d|7[0-24-9]))\\d{3}|(?:3(?:1(?:2[0-46-8]|3[1-9]|47|[56]\\d)|2(?:22|3[0-479]|6[0-7])|4(?:22|5[6-9]|6\\d)|5(?:22|3[4-7]|59|6\\d)|6(?:22|5[35-7]|6\\d)|7(?:22|3[468]|4[1-9]|59|[67]\\d)|9(?:22|4[1-8]|6\\d))|6(?:09|12|2[2-4])\\d)\\d{5}", + , + , + , + "312123456", + , + , + [9], + [5, 6], + ], + [ + , + , + "312(?:58\\d|973)\\d{3}|(?:2(?:0[0-35]|2\\d)|5[0-24-7]\\d|600|7(?:[07]\\d|55)|88[08]|9(?:12|9[05-9]))\\d{6}", + , + , + , + "700123456", + , + , + [9], + ], + [, , "800\\d{6,7}", , , , "800123456"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "KG", + 996, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{4})(\\d{5})", "$1 $2", ["3(?:1[346]|[24-79])"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[235-79]|88"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d)(\\d{2,3})", "$1 $2 $3 $4", ["8"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + KH: [ + , + [, , "1\\d{9}|[1-9]\\d{7,8}", , , , , , , [8, 9, 10], [6, 7]], + [ + , + , + "23(?:4(?:[2-4]|[56]\\d)|[568]\\d\\d)\\d{4}|23[236-9]\\d{5}|(?:2[4-6]|3[2-6]|4[2-4]|[5-7][2-5])(?:(?:[237-9]|4[56]|5\\d)\\d{5}|6\\d{5,6})", + , + , + , + "23756789", + , + , + [8, 9], + [6, 7], + ], + [ + , + , + "(?:(?:1[28]|3[18]|9[67])\\d|6[016-9]|7(?:[07-9]|[16]\\d)|8(?:[013-79]|8\\d))\\d{6}|(?:1\\d|9[0-57-9])\\d{6}|(?:2[3-6]|3[2-6]|4[2-4]|[5-7][2-5])48\\d{5}", + , + , + , + "91234567", + , + , + [8, 9], + ], + [, , "1800(?:1\\d|2[019])\\d{4}", , , , "1800123456", , , [10]], + [, , "1900(?:1\\d|2[09])\\d{4}", , , , "1900123456", , , [10]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "KH", + 855, + "00[14-9]", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-9]"], "0$1"], + [, "(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + KI: [ + , + [ + , + , + "(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}", + , + , + , + , + , + , + [5, 8], + ], + [ + , + , + "(?:[24]\\d|3[1-9]|50|65(?:02[12]|12[56]|22[89]|[3-5]00)|7(?:27\\d\\d|3100|5(?:02[12]|12[56]|22[89]|[34](?:00|81)|500))|8[0-5])\\d{3}", + , + , + , + "31234", + ], + [ + , + , + "(?:6200[01]|7(?:310[1-9]|5(?:02[03-9]|12[0-47-9]|22[0-7]|[34](?:0[1-9]|8[02-9])|50[1-9])))\\d{3}|(?:63\\d\\d|7(?:(?:[0146-9]\\d|2[0-689])\\d|3(?:[02-9]\\d|1[1-9])|5(?:[0-2][013-9]|[34][1-79]|5[1-9]|[6-9]\\d)))\\d{4}", + , + , + , + "72001234", + , + , + [8], + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "30(?:0[01]\\d\\d|12(?:11|20))\\d\\d", , , , "30010000", , , [8]], + "KI", + 686, + "00", + "0", + , + , + "0", + , + , + , + , + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + KM: [ + , + [, , "[3478]\\d{6}", , , , , , , [7], [4]], + [, , "7[4-7]\\d{5}", , , , "7712345", , , , [4]], + [, , "[34]\\d{6}", , , , "3212345"], + [, , , , , , , , , [-1]], + [, , "8\\d{6}", , , , "8001234"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "KM", + 269, + "00", + , + , + , + , + , + , + , + [[, "(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[3478]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + KN: [ + , + [, , "(?:[58]\\d\\d|900)\\d{7}", , , , , , , [10], [7]], + [ + , + , + "869(?:2(?:29|36)|302|4(?:6[015-9]|70)|56[5-7])\\d{4}", + , + , + , + "8692361234", + , + , + , + [7], + ], + [ + , + , + "869(?:48[89]|55[6-8]|66\\d|76[02-7])\\d{4}", + , + , + , + "8697652917", + , + , + , + [7], + ], + [, , "8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", , , , "8002123456"], + [, , "900[2-9]\\d{6}", , , , "9002123456"], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}", + , + , + , + "5002345678", + ], + [, , , , , , , , , [-1]], + "KN", + 1, + "011", + "1", + , + , + "([2-7]\\d{6})$|1", + "869$1", + , + , + , + , + [, , , , , , , , , [-1]], + , + "869", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + KP: [ + , + [, , "85\\d{6}|(?:19\\d|[2-7])\\d{7}", , , , , , , [8, 10], [6, 7]], + [ + , + , + "(?:(?:195|2)\\d|3[19]|4[159]|5[37]|6[17]|7[39]|85)\\d{6}", + , + , + , + "21234567", + , + , + , + [6, 7], + ], + [, , "19[1-3]\\d{7}", , , , "1921234567", , , [10]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "KP", + 850, + "00|99", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"], "0$1"], + [, "(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-7]"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , "238[02-9]\\d{4}|2(?:[0-24-9]\\d|3[0-79])\\d{5}", , , , , , , [8]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + KR: [ + , + [ + , + , + "00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}", + , + , + , + , + , + , + [5, 6, 8, 9, 10, 11, 12, 13, 14], + [3, 4, 7], + ], + [ + , + , + "(?:2|3[1-3]|[46][1-4]|5[1-5])[1-9]\\d{6,7}|(?:3[1-3]|[46][1-4]|5[1-5])1\\d{2,3}", + , + , + , + "22123456", + , + , + [5, 6, 8, 9, 10], + [3, 4, 7], + ], + [ + , + , + "1(?:05(?:[0-8]\\d|9[0-6])|22[13]\\d)\\d{4,5}|1(?:0[0-46-9]|[16-9]\\d|2[013-9])\\d{6,7}", + , + , + , + "1020000000", + , + , + [9, 10], + ], + [ + , + , + "00(?:308\\d{6,7}|798\\d{7,9})|(?:00368|[38]0)\\d{7}", + , + , + , + "801234567", + , + , + [9, 11, 12, 13, 14], + ], + [, , "60[2-9]\\d{6}", , , , "602345678", , , [9]], + [, , , , , , , , , [-1]], + [, , "50\\d{8,9}", , , , "5012345678", , , [10, 11]], + [, , "70\\d{8}", , , , "7012345678", , , [10]], + "KR", + 82, + "00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))", + "0", + , + , + "0(8(?:[1-46-8]|5\\d\\d))?", + , + , + , + [ + [ + , + "(\\d{5})", + "$1", + ["1[016-9]1", "1[016-9]11", "1[016-9]114"], + "0$1", + ], + [ + , + "(\\d{2})(\\d{3,4})", + "$1-$2", + ["(?:3[1-3]|[46][1-4]|5[1-5])1"], + "0$1", + "0$CC-$1", + ], + [, "(\\d{4})(\\d{4})", "$1-$2", ["1"]], + [, "(\\d)(\\d{3,4})(\\d{4})", "$1-$2-$3", ["2"], "0$1", "0$CC-$1"], + [ + , + "(\\d{2})(\\d{3})(\\d{4})", + "$1-$2-$3", + ["[36]0|8"], + "0$1", + "0$CC-$1", + ], + [ + , + "(\\d{2})(\\d{3,4})(\\d{4})", + "$1-$2-$3", + ["[1346]|5[1-5]"], + "0$1", + "0$CC-$1", + ], + [ + , + "(\\d{2})(\\d{4})(\\d{4})", + "$1-$2-$3", + ["[57]"], + "0$1", + "0$CC-$1", + ], + [, "(\\d{5})(\\d{3})(\\d{3})", "$1 $2 $3", ["003", "0030"]], + [, "(\\d{2})(\\d{5})(\\d{4})", "$1-$2-$3", ["5"], "0$1", "0$CC-$1"], + [, "(\\d{5})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0"]], + [, "(\\d{5})(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["0"]], + ], + [ + [ + , + "(\\d{2})(\\d{3,4})", + "$1-$2", + ["(?:3[1-3]|[46][1-4]|5[1-5])1"], + "0$1", + "0$CC-$1", + ], + [, "(\\d{4})(\\d{4})", "$1-$2", ["1"]], + [, "(\\d)(\\d{3,4})(\\d{4})", "$1-$2-$3", ["2"], "0$1", "0$CC-$1"], + [ + , + "(\\d{2})(\\d{3})(\\d{4})", + "$1-$2-$3", + ["[36]0|8"], + "0$1", + "0$CC-$1", + ], + [ + , + "(\\d{2})(\\d{3,4})(\\d{4})", + "$1-$2-$3", + ["[1346]|5[1-5]"], + "0$1", + "0$CC-$1", + ], + [ + , + "(\\d{2})(\\d{4})(\\d{4})", + "$1-$2-$3", + ["[57]"], + "0$1", + "0$CC-$1", + ], + [, "(\\d{2})(\\d{5})(\\d{4})", "$1-$2-$3", ["5"], "0$1", "0$CC-$1"], + ], + [, , "15\\d{7,8}", , , , "1523456789", , , [9, 10]], + , + , + [ + , + , + "00(?:3(?:08\\d{6,7}|68\\d{7})|798\\d{7,9})", + , + , + , + , + , + , + [11, 12, 13, 14], + ], + [ + , + , + "1(?:5(?:22|33|44|66|77|88|99)|6(?:[07]0|44|6[0168]|88)|8(?:00|33|55|77|99))\\d{4}", + , + , + , + "15441234", + , + , + [8], + ], + , + , + [, , , , , , , , , [-1]], + ], + KW: [ + , + [, , "18\\d{5}|(?:[2569]\\d|41)\\d{6}", , , , , , , [7, 8]], + [ + , + , + "2(?:[23]\\d\\d|4(?:[1-35-9]\\d|44)|5(?:0[034]|[2-46]\\d|5[1-3]|7[1-7]))\\d{4}", + , + , + , + "22345678", + , + , + [8], + ], + [ + , + , + "(?:41\\d\\d|5(?:(?:[05]\\d|1[0-7]|6[56])\\d|2(?:22|5[25])|7(?:55|77)|88[58])|6(?:(?:0[034679]|5[015-9]|6\\d)\\d|1(?:00|11|6[16])|2[26]2|3[36]3|4[46]4|7(?:0[013-9]|[67]\\d)|8[68]8|9(?:[069]\\d|3[039]))|9(?:(?:[04679]\\d|8[057-9])\\d|1(?:00|1[01]|99)|2(?:00|2\\d)|3(?:00|3[03])|5(?:00|5\\d)))\\d{4}", + , + , + , + "50012345", + , + , + [8], + ], + [, , "18\\d{5}", , , , "1801234", , , [7]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "KW", + 965, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{4})(\\d{3,4})", "$1 $2", ["[169]|2(?:[235]|4[1-35-9])|52"]], + [, "(\\d{3})(\\d{5})", "$1 $2", ["[245]"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + KY: [ + , + [, , "(?:345|[58]\\d\\d|900)\\d{7}", , , , , , , [10], [7]], + [ + , + , + "345(?:2(?:22|3[23]|44|66)|333|444|6(?:23|38|40)|7(?:30|4[35-79]|6[6-9]|77)|8(?:00|1[45]|4[89]|88)|9(?:14|4[035-9]))\\d{4}", + , + , + , + "3452221234", + , + , + , + [7], + ], + [ + , + , + "345(?:32[1-9]|42[0-4]|5(?:1[67]|2[5-79]|4[6-9]|50|76)|649|82[56]|9(?:1[679]|2[2-9]|3[06-9]|90))\\d{4}", + , + , + , + "3453231234", + , + , + , + [7], + ], + [, , "8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", , , , "8002345678"], + [, , "(?:345976|900[2-9]\\d\\d)\\d{4}", , , , "9002345678"], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}", + , + , + , + "5002345678", + ], + [, , , , , , , , , [-1]], + "KY", + 1, + "011", + "1", + , + , + "([2-9]\\d{6})$|1", + "345$1", + , + , + , + , + [, , , , , , , , , [-1]], + , + "345", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + KZ: [ + , + [ + , + , + "(?:33622|8\\d{8})\\d{5}|[78]\\d{9}", + , + , + , + , + , + , + [10, 14], + [5, 6, 7], + ], + [ + , + , + "(?:33622|7(?:1(?:0(?:[23]\\d|4[0-3]|59|63)|1(?:[23]\\d|4[0-79]|59)|2(?:[23]\\d|59)|3(?:2\\d|3[0-79]|4[0-35-9]|59)|4(?:[24]\\d|3[013-9]|5[1-9]|97)|5(?:2\\d|3[1-9]|4[0-7]|59)|6(?:[2-4]\\d|5[19]|61)|72\\d|8(?:[27]\\d|3[1-46-9]|4[0-5]|59))|2(?:1(?:[23]\\d|4[46-9]|5[3469])|2(?:2\\d|3[0679]|46|5[12679])|3(?:[2-4]\\d|5[139])|4(?:2\\d|3[1-35-9]|59)|5(?:[23]\\d|4[0-8]|59|61)|6(?:2\\d|3[1-9]|4[0-4]|59)|7(?:[2379]\\d|40|5[279])|8(?:[23]\\d|4[0-3]|59)|9(?:2\\d|3[124578]|59))))\\d{5}", + , + , + , + "7123456789", + , + , + [10], + [5, 6, 7], + ], + [ + , + , + "7(?:0[0-25-8]|47|6[0-4]|7[15-8]|85)\\d{7}", + , + , + , + "7710009998", + , + , + [10], + ], + [, , "8(?:00|108\\d{3})\\d{7}", , , , "8001234567"], + [, , "809\\d{7}", , , , "8091234567", , , [10]], + [, , , , , , , , , [-1]], + [, , "808\\d{7}", , , , "8081234567", , , [10]], + [, , "751\\d{7}", , , , "7511234567", , , [10]], + "KZ", + 7, + "810", + "8", + , + , + "8", + , + "8~10", + , + , + , + [, , , , , , , , , [-1]], + , + "33622|7", + [, , "751\\d{7}", , , , , , , [10]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + LA: [ + , + [ + , + , + "[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}", + , + , + , + , + , + , + [8, 9, 10], + [6], + ], + [ + , + , + "(?:2[13]|[35-7][14]|41|8[1468])\\d{6}", + , + , + , + "21212862", + , + , + [8], + [6], + ], + [ + , + , + "(?:20(?:[23579]\\d|8[78])|30[24]\\d)\\d{6}|30\\d{7}", + , + , + , + "2023123456", + , + , + [9, 10], + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "LA", + 856, + "00", + "0", + , + , + "0", + , + , + , + [ + [ + , + "(\\d{2})(\\d{3})(\\d{3})", + "$1 $2 $3", + ["2[13]|3[14]|[4-8]"], + "0$1", + ], + [, "(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["3"], "0$1"], + [ + , + "(\\d{2})(\\d{2})(\\d{3})(\\d{3})", + "$1 $2 $3 $4", + ["[23]"], + "0$1", + ], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + LB: [ + , + [, , "[27-9]\\d{7}|[13-9]\\d{6}", , , , , , , [7, 8]], + [ + , + , + "7(?:62|8[0-6]|9[04-9])\\d{4}|(?:[14-69]\\d|2(?:[14-69]\\d|[78][1-9])|7[2-57]|8[02-9])\\d{5}", + , + , + , + "1123456", + ], + [ + , + , + "(?:(?:3|81)\\d|7(?:[01]\\d|6[013-9]|8[7-9]|9[1-3]))\\d{5}", + , + , + , + "71123456", + ], + [, , , , , , , , , [-1]], + [, , "9[01]\\d{6}", , , , "90123456", , , [8]], + [, , "80\\d{6}", , , , "80123456", , , [8]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "LB", + 961, + "00", + "0", + , + , + "0", + , + , + , + [ + [ + , + "(\\d)(\\d{3})(\\d{3})", + "$1 $2 $3", + ["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"], + "0$1", + ], + [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[27-9]"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + LC: [ + , + [, , "(?:[58]\\d\\d|758|900)\\d{7}", , , , , , , [10], [7]], + [ + , + , + "758(?:234|4(?:30|5\\d|6[2-9]|8[0-2])|57[0-2]|(?:63|75)8)\\d{4}", + , + , + , + "7584305678", + , + , + , + [7], + ], + [ + , + , + "758(?:28[4-7]|384|4(?:6[01]|8[4-9])|5(?:1[89]|20|84)|7(?:1[2-9]|2\\d|3[0-3])|812)\\d{4}", + , + , + , + "7582845678", + , + , + , + [7], + ], + [, , "8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", , , , "8002123456"], + [, , "900[2-9]\\d{6}", , , , "9002123456"], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}", + , + , + , + "5002345678", + ], + [, , , , , , , , , [-1]], + "LC", + 1, + "011", + "1", + , + , + "([2-8]\\d{6})$|1", + "758$1", + , + , + , + , + [, , , , , , , , , [-1]], + , + "758", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + LI: [ + , + [, , "[68]\\d{8}|(?:[2378]\\d|90)\\d{5}", , , , , , , [7, 9]], + [ + , + , + "(?:2(?:01|1[27]|2[024]|3\\d|6[02-578]|96)|3(?:[24]0|33|7[0135-7]|8[048]|9[0269]))\\d{4}", + , + , + , + "2345678", + , + , + [7], + ], + [ + , + , + "(?:6(?:(?:4[5-9]|5[0-46-9])\\d|6(?:[024-6]\\d|[17]0|3[7-9]))\\d|7(?:[37-9]\\d|42|56))\\d{4}", + , + , + , + "660234567", + ], + [, , "8002[28]\\d\\d|80(?:05\\d|9)\\d{4}", , , , "8002222"], + [ + , + , + "90(?:02[258]|1(?:23|3[14])|66[136])\\d\\d", + , + , + , + "9002222", + , + , + [7], + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "LI", + 423, + "00", + "0", + , + , + "(1001)|0", + , + , + , + [ + [ + , + "(\\d{3})(\\d{2})(\\d{2})", + "$1 $2 $3", + ["[2379]|8(?:0[09]|7)", "[2379]|8(?:0(?:02|9)|7)"], + , + "$CC $1", + ], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["69"], , "$CC $1"], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"], , "$CC $1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "870(?:28|87)\\d\\d", , , , "8702812", , , [7]], + , + , + [, , "697(?:42|56|[78]\\d)\\d{4}", , , , "697861234", , , [9]], + ], + LK: [ + , + [, , "[1-9]\\d{8}", , , , , , , [9], [7]], + [ + , + , + "(?:12[2-9]|602|8[12]\\d|9(?:1\\d|22|9[245]))\\d{6}|(?:11|2[13-7]|3[1-8]|4[157]|5[12457]|6[35-7])[2-57]\\d{6}", + , + , + , + "112345678", + , + , + , + [7], + ], + [, , "7(?:[0-25-8]\\d|4[0-4])\\d{6}", , , , "712345678"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "LK", + 94, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[1-689]"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "1973\\d{5}", , , , "197312345"], + , + , + [, , , , , , , , , [-1]], + ], + LR: [ + , + [ + , + , + "(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}", + , + , + , + , + , + , + [7, 8, 9], + ], + [, , "2\\d{7}", , , , "21234567", , , [8]], + [ + , + , + "(?:(?:(?:22|33)0|555|7(?:6[01]|7\\d)|88\\d)\\d|4(?:240|[67]))\\d{5}|[56]\\d{6}", + , + , + , + "770123456", + , + , + [7, 9], + ], + [, , , , , , , , , [-1]], + [, , "332(?:02|[34]\\d)\\d{4}", , , , "332021234", , , [9]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "LR", + 231, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["4[67]|[56]"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-578]"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + LS: [ + , + [, , "(?:[256]\\d\\d|800)\\d{5}", , , , , , , [8]], + [, , "2\\d{7}", , , , "22123456"], + [, , "[56]\\d{7}", , , , "50123456"], + [, , "800[1256]\\d{4}", , , , "80021234"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "LS", + 266, + "00", + , + , + , + , + , + , + , + [[, "(\\d{4})(\\d{4})", "$1 $2", ["[2568]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + LT: [ + , + [, , "(?:[3469]\\d|52|[78]0)\\d{6}", , , , , , , [8]], + [, , "(?:3[1478]|4[124-6]|52)\\d{6}", , , , "31234567"], + [, , "6\\d{7}", , , , "61234567"], + [, , "80[02]\\d{5}", , , , "80012345"], + [, , "9(?:0[0239]|10)\\d{5}", , , , "90012345"], + [, , "808\\d{5}", , , , "80812345"], + [, , "70[05]\\d{5}", , , , "70012345"], + [, , "[89]01\\d{5}", , , , "80123456"], + "LT", + 370, + "00", + "0", + , + , + "[08]", + , + , + , + [ + [, "(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["52[0-7]"], "(0-$1)", , 1], + [, "(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[7-9]"], "0 $1", , 1], + [ + , + "(\\d{2})(\\d{6})", + "$1 $2", + ["37|4(?:[15]|6[1-8])"], + "(0-$1)", + , + 1, + ], + [, "(\\d{3})(\\d{5})", "$1 $2", ["[3-6]"], "(0-$1)", , 1], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "70[67]\\d{5}", , , , "70712345"], + , + , + [, , , , , , , , , [-1]], + ], + LU: [ + , + [ + , + , + "35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}", + , + , + , + , + , + , + [4, 5, 6, 7, 8, 9, 10, 11], + ], + [ + , + , + "(?:35[013-9]|80[2-9]|90[89])\\d{1,8}|(?:2[2-9]|3[0-46-9]|[457]\\d|8[13-9]|9[2-579])\\d{2,9}", + , + , + , + "27123456", + ], + [ + , + , + "6(?:[269][18]|5[1568]|7[189]|81)\\d{6}", + , + , + , + "628123456", + , + , + [9], + ], + [, , "800\\d{5}", , , , "80012345", , , [8]], + [, , "90[015]\\d{5}", , , , "90012345", , , [8]], + [, , "801\\d{5}", , , , "80112345", , , [8]], + [, , , , , , , , , [-1]], + [ + , + , + "20(?:1\\d{5}|[2-689]\\d{1,7})", + , + , + , + "20201234", + , + , + [4, 5, 6, 7, 8, 9, 10], + ], + "LU", + 352, + "00", + , + , + , + "(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)", + , + , + , + [ + [ + , + "(\\d{2})(\\d{3})", + "$1 $2", + [ + "2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])", + ], + , + "$CC $1", + ], + [ + , + "(\\d{2})(\\d{2})(\\d{2})", + "$1 $2 $3", + [ + "2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])", + ], + , + "$CC $1", + ], + [, "(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["20[2-689]"], , "$CC $1"], + [ + , + "(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})", + "$1 $2 $3 $4", + ["2(?:[0367]|4[3-8])"], + , + "$CC $1", + ], + [ + , + "(\\d{3})(\\d{2})(\\d{3})", + "$1 $2 $3", + ["80[01]|90[015]"], + , + "$CC $1", + ], + [ + , + "(\\d{2})(\\d{2})(\\d{2})(\\d{3})", + "$1 $2 $3 $4", + ["20"], + , + "$CC $1", + ], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"], , "$CC $1"], + [ + , + "(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})", + "$1 $2 $3 $4 $5", + ["2(?:[0367]|4[3-8])"], + , + "$CC $1", + ], + [ + , + "(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})", + "$1 $2 $3 $4", + ["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"], + , + "$CC $1", + ], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + LV: [ + , + [, , "(?:[268]\\d|90)\\d{6}", , , , , , , [8]], + [, , "6\\d{7}", , , , "63123456"], + [ + , + , + "2333[0-8]\\d{3}|2(?:[0-24-9]\\d\\d|3(?:0[07]|[14-9]\\d|2[02-9]|3[0-24-9]))\\d{4}", + , + , + , + "21234567", + ], + [, , "80\\d{6}", , , , "80123456"], + [, , "90\\d{6}", , , , "90123456"], + [, , "81\\d{6}", , , , "81123456"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "LV", + 371, + "00", + , + , + , + , + , + , + , + [[, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[269]|8[01]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + LY: [ + , + [, , "[2-9]\\d{8}", , , , , , , [9], [7]], + [ + , + , + "(?:2(?:0[56]|[1-6]\\d|7[124579]|8[124])|3(?:1\\d|2[2356])|4(?:[17]\\d|2[1-357]|5[2-4]|8[124])|5(?:[1347]\\d|2[1-469]|5[13-5]|8[1-4])|6(?:[1-479]\\d|5[2-57]|8[1-5])|7(?:[13]\\d|2[13-79])|8(?:[124]\\d|5[124]|84))\\d{6}", + , + , + , + "212345678", + , + , + , + [7], + ], + [, , "9[1-6]\\d{7}", , , , "912345678"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "LY", + 218, + "00", + "0", + , + , + "0", + , + , + , + [[, "(\\d{2})(\\d{7})", "$1-$2", ["[2-9]"], "0$1"]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + MA: [ + , + [, , "[5-8]\\d{8}", , , , , , , [9]], + [ + , + , + "5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}", + , + , + , + "520123456", + ], + [ + , + , + "(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-8]|5[0-5]|8[0-7]))\\d{6}", + , + , + , + "650123456", + ], + [, , "80[0-7]\\d{6}", , , , "801234567"], + [, , "89\\d{7}", , , , "891234567"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}", , , , "592401234"], + "MA", + 212, + "00", + "0", + , + , + "0", + , + , + , + [ + [ + , + "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["5[45]"], + "0$1", + ], + [ + , + "(\\d{4})(\\d{5})", + "$1-$2", + ["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"], + "0$1", + ], + [, "(\\d{2})(\\d{7})", "$1-$2", ["8"], "0$1"], + [, "(\\d{3})(\\d{6})", "$1-$2", ["[5-7]"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + 1, + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + MC: [ + , + [, , "(?:[3489]|6\\d)\\d{7}", , , , , , , [8, 9]], + [, , "(?:870|9[2-47-9]\\d)\\d{5}", , , , "99123456", , , [8]], + [, , "4(?:[469]\\d|5[1-9])\\d{5}|(?:3|6\\d)\\d{7}", , , , "612345678"], + [, , "(?:800|90\\d)\\d{5}", , , , "90123456", , , [8]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "MC", + 377, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3", ["87"]], + [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["4"], "0$1"], + [, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[389]"]], + [ + , + "(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", + "$1 $2 $3 $4 $5", + ["6"], + "0$1", + ], + ], + [ + [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["4"], "0$1"], + [, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[389]"]], + [ + , + "(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", + "$1 $2 $3 $4 $5", + ["6"], + "0$1", + ], + ], + [, , , , , , , , , [-1]], + , + , + [, , "8[07]0\\d{5}", , , , , , , [8]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + MD: [ + , + [, , "(?:[235-7]\\d|[89]0)\\d{6}", , , , , , , [8]], + [ + , + , + "(?:(?:2[1-9]|3[1-79])\\d|5(?:33|5[257]))\\d{5}", + , + , + , + "22212345", + ], + [, , "562\\d{5}|(?:6\\d|7[16-9])\\d{6}", , , , "62112345"], + [, , "800\\d{5}", , , , "80012345"], + [, , "90[056]\\d{5}", , , , "90012345"], + [, , "808\\d{5}", , , , "80812345"], + [, , , , , , , , , [-1]], + [, , "3[08]\\d{6}", , , , "30123456"], + "MD", + 373, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{3})(\\d{5})", "$1 $2", ["[89]"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["22|3"], "0$1"], + [, "(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[25-7]"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "803\\d{5}", , , , "80312345"], + , + , + [, , , , , , , , , [-1]], + ], + ME: [ + , + [, , "(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}", , , , , , , [8, 9], [6]], + [ + , + , + "(?:20[2-8]|3(?:[0-2][2-7]|3[24-7])|4(?:0[2-467]|1[2467])|5(?:0[2467]|1[24-7]|2[2-467]))\\d{5}", + , + , + , + "30234567", + , + , + [8], + [6], + ], + [, , "6(?:[07-9]\\d|3[024]|6[0-25])\\d{5}", , , , "67622901", , , [8]], + [, , "80(?:[0-2578]|9\\d)\\d{5}", , , , "80080002"], + [, , "9(?:4[1568]|5[178])\\d{5}", , , , "94515151", , , [8]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "78[1-49]\\d{5}", , , , "78108780", , , [8]], + "ME", + 382, + "00", + "0", + , + , + "0", + , + , + , + [[, "(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-9]"], "0$1"]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "77[1-9]\\d{5}", , , , "77273012", , , [8]], + , + , + [, , , , , , , , , [-1]], + ], + MF: [ + , + [, , "(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}", , , , , , , [9]], + [ + , + , + "590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}", + , + , + , + "590271234", + ], + [ + , + , + "(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}", + , + , + , + "690001234", + ], + [, , "80[0-5]\\d{6}", , , , "800012345"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}", , , , "976012345"], + "MF", + 590, + "00", + "0", + , + , + "0", + , + , + , + , + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + MG: [ + , + [, , "[23]\\d{8}", , , , , , , [9], [7]], + [ + , + , + "2072[29]\\d{4}|20(?:2\\d|4[47]|5[3467]|6[279]|7[356]|8[268]|9[2457])\\d{5}", + , + , + , + "202123456", + , + , + , + [7], + ], + [, , "3[2-47-9]\\d{7}", , , , "321234567"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "22\\d{7}", , , , "221234567"], + "MG", + 261, + "00", + "0", + , + , + "([24-9]\\d{6})$|0", + "20$1", + , + , + [ + [ + , + "(\\d{2})(\\d{2})(\\d{3})(\\d{2})", + "$1 $2 $3 $4", + ["[23]"], + "0$1", + ], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + MH: [ + , + [, , "329\\d{4}|(?:[256]\\d|45)\\d{5}", , , , , , , [7]], + [, , "(?:247|528|625)\\d{4}", , , , "2471234"], + [, , "(?:(?:23|54)5|329|45[35-8])\\d{4}", , , , "2351234"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "635\\d{4}", , , , "6351234"], + "MH", + 692, + "011", + "1", + , + , + "1", + , + , + , + [[, "(\\d{3})(\\d{4})", "$1-$2", ["[2-6]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + MK: [ + , + [, , "[2-578]\\d{7}", , , , , , , [8], [6, 7]], + [ + , + , + "(?:(?:2(?:62|77)0|3444)\\d|4[56]440)\\d{3}|(?:34|4[357])700\\d{3}|(?:2(?:[0-3]\\d|5[0-578]|6[01]|82)|3(?:1[3-68]|[23][2-68]|4[23568])|4(?:[23][2-68]|4[3-68]|5[2568]|6[25-8]|7[24-68]|8[4-68]))\\d{5}", + , + , + , + "22012345", + , + , + , + [6, 7], + ], + [ + , + , + "7(?:3555|(?:474|9[019]7)7)\\d{3}|7(?:[0-25-8]\\d\\d|3(?:[1-478]\\d|6[01])|4(?:2\\d|60|7[01578])|9(?:[2-4]\\d|5[01]|7[015]))\\d{4}", + , + , + , + "72345678", + ], + [, , "800\\d{5}", , , , "80012345"], + [, , "5\\d{7}", , , , "50012345"], + [, , "8(?:0[1-9]|[1-9]\\d)\\d{5}", , , , "80123456"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "MK", + 389, + "00", + "0", + , + , + "0", + , + , + , + [ + [ + , + "(\\d)(\\d{3})(\\d{4})", + "$1 $2 $3", + ["2|34[47]|4(?:[37]7|5[47]|64)"], + "0$1", + ], + [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[347]"], "0$1"], + [, "(\\d{3})(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[58]"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + ML: [ + , + [, , "[24-9]\\d{7}", , , , , , , [8]], + [ + , + , + "2(?:07[0-8]|12[67])\\d{4}|(?:2(?:02|1[4-689])|4(?:0[0-4]|4[1-59]))\\d{5}", + , + , + , + "20212345", + ], + [ + , + , + "2(?:0(?:01|79)|17\\d)\\d{4}|(?:5[0-3]|[679]\\d|8[2-59])\\d{6}", + , + , + , + "65012345", + ], + [, , "80\\d{6}", , , , "80012345"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "ML", + 223, + "00", + , + , + , + , + , + , + , + [ + [ + , + "(\\d{4})", + "$1", + [ + "67[057-9]|74[045]", + "67(?:0[09]|[59]9|77|8[89])|74(?:0[02]|44|55)", + ], + ], + [, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24-9]"]], + ], + [[, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24-9]"]]], + [, , , , , , , , , [-1]], + , + , + [, , "80\\d{6}"], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + MM: [ + , + [ + , + , + "1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}", + , + , + , + , + , + , + [6, 7, 8, 9, 10], + [5], + ], + [ + , + , + "(?:1(?:(?:12|[28]\\d|3[56]|7[3-6]|9[0-6])\\d|4(?:2[29]|7[0-2]|83)|6)|2(?:2(?:00|8[34])|4(?:0\\d|22|7[0-2]|83)|51\\d\\d)|4(?:2(?:2\\d\\d|48[013])|3(?:20\\d|4(?:70|83)|56)|420\\d|5(?:2\\d|470))|6(?:0(?:[23]|88\\d)|(?:124|[56]2\\d)\\d|2472|3(?:20\\d|470)|4(?:2[04]\\d|472)|7(?:3\\d\\d|4[67]0|8(?:[01459]\\d|8))))\\d{4}|5(?:2(?:2\\d{5,6}|47[02]\\d{4})|(?:3472|4(?:2(?:1|86)|470)|522\\d|6(?:20\\d|483)|7(?:20\\d|48[01])|8(?:20\\d|47[02])|9(?:20\\d|470))\\d{4})|7(?:(?:0470|4(?:25\\d|470)|5(?:202|470|96\\d))\\d{4}|1(?:20\\d{4,5}|4(?:70|83)\\d{4}))|8(?:1(?:2\\d{5,6}|4(?:10|7[01]\\d)\\d{3})|2(?:2\\d{5,6}|(?:320|490\\d)\\d{3})|(?:3(?:2\\d\\d|470)|4[24-7]|5(?:(?:2\\d|51)\\d|4(?:[1-35-9]\\d|4[0-57-9]))|6[23])\\d{4})|(?:1[2-6]\\d|4(?:2[24-8]|3[2-7]|[46][2-6]|5[3-5])|5(?:[27][2-8]|3[2-68]|4[24-8]|5[23]|6[2-4]|8[24-7]|9[2-7])|6(?:[19]20|42[03-6]|(?:52|7[45])\\d)|7(?:[04][24-8]|[15][2-7]|22|3[2-4])|8(?:1[2-689]|2[2-8]|(?:[35]2|64)\\d))\\d{4}|25\\d{5,6}|(?:2[2-9]|6(?:1[2356]|[24][2-6]|3[24-6]|5[2-4]|6[2-8]|7[235-7]|8[245]|9[24])|8(?:3[24]|5[245]))\\d{4}", + , + , + , + "1234567", + , + , + [6, 7, 8, 9], + [5], + ], + [ + , + , + "(?:17[01]|9(?:2(?:[0-4]|[56]\\d\\d)|(?:3(?:[0-36]|4\\d)|(?:6\\d|8[89]|9[4-8])\\d|7(?:3|40|[5-9]\\d))\\d|4(?:(?:[0245]\\d|[1379])\\d|88)|5[0-6])\\d)\\d{4}|9[69]1\\d{6}|9(?:[68]\\d|9[089])\\d{5}", + , + , + , + "92123456", + , + , + [7, 8, 9, 10], + ], + [, , "80080(?:0[1-9]|2\\d)\\d{3}", , , , "8008001234", , , [10]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "1333\\d{4}", , , , "13331234", , , [8]], + "MM", + 95, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d)(\\d{2})(\\d{3})", "$1 $2 $3", ["16|2"], "0$1"], + [ + , + "(\\d{2})(\\d{2})(\\d{3})", + "$1 $2 $3", + [ + "4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]", + ], + "0$1", + ], + [ + , + "(\\d)(\\d{3})(\\d{3,4})", + "$1 $2 $3", + ["[12]|452|678|86", "[12]|452|6788|86"], + "0$1", + ], + [ + , + "(\\d{2})(\\d{3})(\\d{3,4})", + "$1 $2 $3", + ["[4-7]|8[1-35]"], + "0$1", + ], + [ + , + "(\\d)(\\d{3})(\\d{4,6})", + "$1 $2 $3", + ["9(?:2[0-4]|[35-9]|4[137-9])"], + "0$1", + ], + [, "(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"], + [, "(\\d)(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["92"], "0$1"], + [, "(\\d)(\\d{5})(\\d{4})", "$1 $2 $3", ["9"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + MN: [ + , + [, , "[12]\\d{7,9}|[5-9]\\d{7}", , , , , , , [8, 9, 10], [4, 5, 6]], + [ + , + , + "[12]2[1-3]\\d{5,6}|(?:(?:[12](?:1|27)|5[368])\\d\\d|7(?:0(?:[0-5]\\d|7[078]|80)|128))\\d{4}|[12](?:3[2-8]|4[2-68]|5[1-4689])\\d{6,7}", + , + , + , + "53123456", + , + , + , + [4, 5, 6], + ], + [ + , + , + "92[0139]\\d{5}|(?:5[05]|6[069]|7[28]|8[0135689]|9[013-9])\\d{6}", + , + , + , + "88123456", + , + , + [8], + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [ + , + , + "712[0-79]\\d{4}|7(?:1[013-9]|[5-79]\\d)\\d{5}", + , + , + , + "75123456", + , + , + [8], + ], + "MN", + 976, + "001", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["[12]1"], "0$1"], + [, "(\\d{4})(\\d{4})", "$1 $2", ["[5-9]"]], + [, "(\\d{3})(\\d{5,6})", "$1 $2", ["[12]2[1-3]"], "0$1"], + [ + , + "(\\d{4})(\\d{5,6})", + "$1 $2", + [ + "[12](?:27|3[2-8]|4[2-68]|5[1-4689])", + "[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]", + ], + "0$1", + ], + [, "(\\d{5})(\\d{4,5})", "$1 $2", ["[12]"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + MO: [ + , + [, , "0800\\d{3}|(?:28|[68]\\d)\\d{6}", , , , , , , [7, 8]], + [ + , + , + "(?:28[2-9]|8(?:11|[2-57-9]\\d))\\d{5}", + , + , + , + "28212345", + , + , + [8], + ], + [ + , + , + "6800[0-79]\\d{3}|6(?:[235]\\d\\d|6(?:0[0-5]|[1-9]\\d)|8(?:0[1-9]|[14-8]\\d|2[5-9]|[39][0-4]))\\d{4}", + , + , + , + "66123456", + , + , + [8], + ], + [, , "0800\\d{3}", , , , "0800501", , , [7]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "MO", + 853, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{4})(\\d{3})", "$1 $2", ["0"]], + [, "(\\d{4})(\\d{4})", "$1 $2", ["[268]"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + MP: [ + , + [, , "[58]\\d{9}|(?:67|90)0\\d{7}", , , , , , , [10], [7]], + [ + , + , + "670(?:2(?:3[3-7]|56|8[4-8])|32[1-38]|4(?:33|8[348])|5(?:32|55|88)|6(?:64|70|82)|78[3589]|8[3-9]8|989)\\d{4}", + , + , + , + "6702345678", + , + , + , + [7], + ], + [ + , + , + "670(?:2(?:3[3-7]|56|8[4-8])|32[1-38]|4(?:33|8[348])|5(?:32|55|88)|6(?:64|70|82)|78[3589]|8[3-9]8|989)\\d{4}", + , + , + , + "6702345678", + , + , + , + [7], + ], + [, , "8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", , , , "8002123456"], + [, , "900[2-9]\\d{6}", , , , "9002123456"], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}", + , + , + , + "5002345678", + ], + [, , , , , , , , , [-1]], + "MP", + 1, + "011", + "1", + , + , + "([2-9]\\d{6})$|1", + "670$1", + , + 1, + , + , + [, , , , , , , , , [-1]], + , + "670", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + MQ: [ + , + [, , "(?:596\\d|7091)\\d{5}|(?:69|[89]\\d)\\d{7}", , , , , , , [9]], + [ + , + , + "(?:596(?:[03-7]\\d|1[05]|2[7-9]|8[0-39]|9[04-9])|80[6-9]\\d\\d|9(?:477[6-9]|767[4589]))\\d{4}", + , + , + , + "596301234", + ], + [, , "(?:69[67]\\d\\d|7091[0-3])\\d{4}", , , , "696201234"], + [, , "80[0-5]\\d{6}", , , , "800012345"], + [, , "8[129]\\d{7}", , , , "810123456"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [ + , + , + "9(?:397[0-3]|477[0-5]|76(?:6\\d|7[0-367]))\\d{4}", + , + , + , + "976612345", + ], + "MQ", + 596, + "00", + "0", + , + , + "0", + , + , + , + [ + [ + , + "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["[5-79]|8(?:0[6-9]|[36])"], + "0$1", + ], + [, "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + MR: [ + , + [, , "(?:[2-4]\\d\\d|800)\\d{5}", , , , , , , [8]], + [, , "(?:25[08]|35\\d|45[1-7])\\d{5}", , , , "35123456"], + [, , "[2-4][0-46-9]\\d{6}", , , , "22123456"], + [, , "800\\d{5}", , , , "80012345"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "MR", + 222, + "00", + , + , + , + , + , + , + , + [[, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-48]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + MS: [ + , + [, , "(?:[58]\\d\\d|664|900)\\d{7}", , , , , , , [10], [7]], + [, , "6644(?:1[0-3]|91)\\d{4}", , , , "6644912345", , , , [7]], + [ + , + , + "664(?:3(?:49|9[1-6])|49[2-6])\\d{4}", + , + , + , + "6644923456", + , + , + , + [7], + ], + [, , "8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", , , , "8002123456"], + [, , "900[2-9]\\d{6}", , , , "9002123456"], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}", + , + , + , + "5002345678", + ], + [, , , , , , , , , [-1]], + "MS", + 1, + "011", + "1", + , + , + "([34]\\d{6})$|1", + "664$1", + , + , + , + , + [, , , , , , , , , [-1]], + , + "664", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + MT: [ + , + [, , "3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}", , , , , , , [8]], + [ + , + , + "20(?:3[1-4]|6[059])\\d{4}|2(?:0[19]|[1-357]\\d|60)\\d{5}", + , + , + , + "21001234", + ], + [ + , + , + "(?:7(?:210|[79]\\d\\d)|9(?:[29]\\d\\d|69[67]|8(?:1[1-3]|89|97)))\\d{4}", + , + , + , + "96961234", + ], + [, , "800(?:02|[3467]\\d)\\d{3}", , , , "80071234"], + [ + , + , + "5(?:0(?:0(?:37|43)|(?:6\\d|70|9[0168])\\d)|[12]\\d0[1-5])\\d{3}", + , + , + , + "50037123", + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "3550\\d{4}", , , , "35501234"], + "MT", + 356, + "00", + , + , + , + , + , + , + , + [[, "(\\d{4})(\\d{4})", "$1 $2", ["[2357-9]"]]], + , + [, , "7117\\d{4}", , , , "71171234"], + , + , + [, , , , , , , , , [-1]], + [, , "501\\d{5}", , , , "50112345"], + , + , + [, , , , , , , , , [-1]], + ], + MU: [ + , + [, , "(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}", , , , , , , [7, 8, 10]], + [ + , + , + "(?:2(?:[0346-8]\\d|1[0-8])|4(?:[013568]\\d|2[4-8]|71|90)|54(?:[3-5]\\d|71)|6\\d\\d|8(?:14|3[129]))\\d{4}", + , + , + , + "54480123", + , + , + [7, 8], + ], + [ + , + , + "5(?:4(?:2[1-389]|7[1-9])|87[15-8])\\d{4}|(?:5(?:2[5-9]|4[3-689]|[57]\\d|8[0-689]|9[0-8])|7(?:0[0-6]|3[013]))\\d{5}", + , + , + , + "52512345", + , + , + [8], + ], + [, , "802\\d{7}|80[0-2]\\d{4}", , , , "8001234", , , [7, 10]], + [, , "30\\d{5}", , , , "3012345", , , [7]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "3(?:20|9\\d)\\d{4}", , , , "3201234", , , [7]], + "MU", + 230, + "0(?:0|[24-7]0|3[03])", + , + , + , + , + , + "020", + , + [ + [, "(\\d{3})(\\d{4})", "$1 $2", ["[2-46]|8[013]"]], + [, "(\\d{4})(\\d{4})", "$1 $2", ["[57]"]], + [, "(\\d{5})(\\d{5})", "$1 $2", ["8"]], + ], + , + [, , "219\\d{4}", , , , "2190123", , , [7]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + MV: [ + , + [, , "(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}", , , , , , , [7, 10]], + [ + , + , + "(?:3(?:0[0-4]|3[0-59])|6(?:[58][024689]|6[024-68]|7[02468]))\\d{4}", + , + , + , + "6701234", + , + , + [7], + ], + [, , "(?:46[46]|[79]\\d\\d)\\d{4}", , , , "7712345", , , [7]], + [, , "800\\d{7}", , , , "8001234567", , , [10]], + [, , "900\\d{7}", , , , "9001234567", , , [10]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "MV", + 960, + "0(?:0|19)", + , + , + , + , + , + "00", + , + [ + [, "(\\d{3})(\\d{4})", "$1-$2", ["[34679]"]], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "4(?:0[01]|50)\\d{4}", , , , "4001234", , , [7]], + , + , + [, , , , , , , , , [-1]], + ], + MW: [ + , + [, , "(?:[1289]\\d|31|77)\\d{7}|1\\d{6}", , , , , , , [7, 9]], + [, , "(?:1[2-9]|2[12]\\d\\d)\\d{5}", , , , "1234567"], + [, , "111\\d{6}|(?:31|77|[89][89])\\d{7}", , , , "991234567", , , [9]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "MW", + 265, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["1[2-9]"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"], "0$1"], + [ + , + "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["[137-9]"], + "0$1", + ], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + MX: [ + , + [, , "[2-9]\\d{9}", , , , , , , [10], [7, 8]], + [ + , + , + "(?:2(?:0[01]|2\\d|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[267][1-9]|3[1-8]|[45]\\d|8[1-35-9]|9[2-689])|5(?:[56]\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-36-9]|6[0-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1346][1-9]|[27]\\d|5[13-9]|8[1-69]|9[17])|8(?:1\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[0-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69]\\d|7[12]|8[1-8]))\\d{7}", + , + , + , + "2001234567", + , + , + , + [7, 8], + ], + [ + , + , + "(?:2(?:2\\d|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[267][1-9]|3[1-8]|[45]\\d|8[1-35-9]|9[2-689])|5(?:[56]\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-36-9]|6[0-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1346][1-9]|[27]\\d|5[13-9]|8[1-69]|9[17])|8(?:1\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[0-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69]\\d|7[12]|8[1-8]))\\d{7}", + , + , + , + "2221234567", + , + , + , + [7, 8], + ], + [, , "8(?:00|88)\\d{7}", , , , "8001234567"], + [, , "900\\d{7}", , , , "9001234567"], + [, , "300\\d{7}", , , , "3001234567"], + [, , "500\\d{7}", , , , "5001234567"], + [, , , , , , , , , [-1]], + "MX", + 52, + "0[09]", + , + , + , + , + , + "00", + , + [ + [, "(\\d{5})", "$1", ["53"]], + [, "(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["33|5[56]|81"]], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-9]"]], + ], + [ + [, "(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["33|5[56]|81"]], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-9]"]], + ], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + MY: [ + , + [, , "1\\d{8,9}|(?:3\\d|[4-9])\\d{7}", , , , , , , [8, 9, 10], [6, 7]], + [ + , + , + "427[01]\\d{4}|(?:3(?:2[0-36-9]|3[0-368]|4[0-278]|5[0-24-8]|6[0-467]|7[1246-9]|8\\d|9[0-57])\\d|4(?:2[0-689]|[3-79]\\d|8[1-35689])|5(?:2[0-589]|[3468]\\d|5[0-489]|7[1-9]|9[23])|6(?:2[2-9]|3[1357-9]|[46]\\d|5[0-6]|7[0-35-9]|85|9[015-8])|7(?:[2579]\\d|3[03-68]|4[0-8]|6[5-9]|8[0-35-9])|8(?:[24][2-8]|3[2-5]|5[2-7]|6[2-589]|7[2-578]|[89][2-9])|9(?:0[57]|13|[25-7]\\d|[3489][0-8]))\\d{5}", + , + , + , + "323856789", + , + , + [8, 9], + [6, 7], + ], + [ + , + , + "1(?:1888[689]|4400|8(?:47|8[27])[0-4])\\d{4}|1(?:0(?:[23568]\\d|4[0-6]|7[016-9]|9[0-8])|1(?:[1-5]\\d\\d|6(?:0[5-9]|[1-9]\\d)|7(?:[0-4]\\d|5[0-7]))|(?:[269]\\d|[37][1-9]|4[235-9])\\d|5(?:31|9\\d\\d)|8(?:1[23]|[236]\\d|4[06]|5(?:46|[7-9])|7[016-9]|8[01]|9[0-8]))\\d{5}", + , + , + , + "123456789", + , + , + [9, 10], + ], + [, , "1[378]00\\d{6}", , , , "1300123456", , , [10]], + [, , "1600\\d{6}", , , , "1600123456", , , [10]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [ + , + , + "15(?:4(?:6[0-4]\\d|8(?:0[125]|[17]\\d|21|3[01]|4[01589]|5[014]|6[02]))|6(?:32[0-6]|78\\d))\\d{4}", + , + , + , + "1546012345", + , + , + [10], + ], + "MY", + 60, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d)(\\d{3})(\\d{4})", "$1-$2 $3", ["[4-79]"], "0$1"], + [ + , + "(\\d{2})(\\d{3})(\\d{3,4})", + "$1-$2 $3", + [ + "1(?:[02469]|[378][1-9]|53)|8", + "1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8", + ], + "0$1", + ], + [, "(\\d)(\\d{4})(\\d{4})", "$1-$2 $3", ["3"], "0$1"], + [, "(\\d)(\\d{3})(\\d{2})(\\d{4})", "$1-$2-$3-$4", ["1(?:[367]|80)"]], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1-$2 $3", ["15"], "0$1"], + [, "(\\d{2})(\\d{4})(\\d{4})", "$1-$2 $3", ["1"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + MZ: [ + , + [, , "(?:2|8\\d)\\d{7}", , , , , , , [8, 9]], + [ + , + , + "2(?:[1346]\\d|5[0-2]|[78][12]|93)\\d{5}", + , + , + , + "21123456", + , + , + [8], + ], + [, , "8[2-79]\\d{7}", , , , "821234567", , , [9]], + [, , "800\\d{6}", , , , "800123456", , , [9]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "MZ", + 258, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2|8[2-79]"]], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + NA: [ + , + [, , "[68]\\d{7,8}", , , , , , , [8, 9]], + [ + , + , + "64426\\d{3}|6(?:1(?:2[2-7]|3[01378]|4[0-4])|254|32[0237]|4(?:27|41|5[25])|52[236-8]|626|7(?:2[2-4]|30))\\d{4,5}|6(?:1(?:(?:0\\d|2[0189]|3[24-69]|4[5-9])\\d|17|69|7[014])|2(?:17|5[0-36-8]|69|70)|3(?:17|2[14-689]|34|6[289]|7[01]|81)|4(?:17|2[0-2]|4[06]|5[0137]|69|7[01])|5(?:17|2[0459]|69|7[01])|6(?:17|25|38|42|69|7[01])|7(?:17|2[569]|3[13]|6[89]|7[01]))\\d{4}", + , + , + , + "61221234", + ], + [, , "(?:60|8[1245])\\d{7}", , , , "811234567", , , [9]], + [, , "80\\d{7}", , , , "800123456", , , [9]], + [, , "8701\\d{5}", , , , "870123456", , , [9]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "8(?:3\\d\\d|86)\\d{5}", , , , "88612345"], + "NA", + 264, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["88"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["6"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["87"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + NC: [ + , + [, , "(?:050|[2-57-9]\\d\\d)\\d{3}", , , , , , , [6]], + [, , "(?:2[03-9]|3[0-5]|4[1-7]|88)\\d{4}", , , , "201234"], + [, , "(?:[579]\\d|8[0-79])\\d{4}", , , , "751234"], + [, , "050\\d{3}", , , , "050012"], + [, , "36\\d{4}", , , , "366711"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "NC", + 687, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{3})", "$1", ["5[6-8]"]], + [, "(\\d{2})(\\d{2})(\\d{2})", "$1.$2.$3", ["[02-57-9]"]], + ], + [[, "(\\d{2})(\\d{2})(\\d{2})", "$1.$2.$3", ["[02-57-9]"]]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + NE: [ + , + [, , "[027-9]\\d{7}", , , , , , , [8]], + [ + , + , + "2(?:0(?:20|3[1-8]|4[13-5]|5[14]|6[14578]|7[1-578])|1(?:4[145]|5[14]|6[14-68]|7[169]|88))\\d{4}", + , + , + , + "20201234", + ], + [, , "(?:23|7[0467]|[89]\\d)\\d{6}", , , , "93123456"], + [, , "08\\d{6}", , , , "08123456"], + [, , "09\\d{6}", , , , "09123456"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "NE", + 227, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["08"]], + [ + , + "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["[089]|2[013]|7[0467]"], + ], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + NF: [ + , + [, , "[13]\\d{5}", , , , , , , [6], [5]], + [, , "(?:1(?:06|17|28|39)|3[0-2]\\d)\\d{3}", , , , "106609", , , , [5]], + [, , "(?:14|3[58])\\d{4}", , , , "381234", , , , [5]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "NF", + 672, + "00", + , + , + , + "([0-258]\\d{4})$", + "3$1", + , + , + [ + [, "(\\d{2})(\\d{4})", "$1 $2", ["1[0-3]"]], + [, "(\\d)(\\d{5})", "$1 $2", ["[13]"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + NG: [ + , + [ + , + , + "(?:20|9\\d)\\d{8}|[78]\\d{9,13}", + , + , + , + , + , + , + [10, 11, 12, 13, 14], + [6, 7], + ], + [ + , + , + "20(?:[1259]\\d|3[013-9]|4[1-8]|6[024-689]|7[1-79]|8[2-9])\\d{6}", + , + , + , + "2033123456", + , + , + [10], + [6, 7], + ], + [ + , + , + "(?:702[0-24-9]|819[01])\\d{6}|(?:7(?:0[13-9]|[12]\\d)|8(?:0[1-9]|1[0-8])|9(?:0[1-9]|1[1-6]))\\d{7}", + , + , + , + "8021234567", + , + , + [10], + ], + [, , "800\\d{7,11}", , , , "80017591759"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "NG", + 234, + "009", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[7-9]"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["20[129]"], "0$1"], + [, "(\\d{4})(\\d{2})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], + [, "(\\d{3})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["[78]"], "0$1"], + [, "(\\d{3})(\\d{5})(\\d{5,6})", "$1 $2 $3", ["[78]"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "700\\d{7,11}", , , , "7001234567"], + , + , + [, , , , , , , , , [-1]], + ], + NI: [ + , + [, , "(?:1800|[25-8]\\d{3})\\d{4}", , , , , , , [8]], + [, , "2\\d{7}", , , , "21234567"], + [ + , + , + "(?:5(?:5[0-7]|[78]\\d)|6(?:20|3[035]|4[045]|5[05]|77|8[1-9]|9[059])|(?:7[5-8]|8\\d)\\d)\\d{5}", + , + , + , + "81234567", + ], + [, , "1800\\d{4}", , , , "18001234"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "NI", + 505, + "00", + , + , + , + , + , + , + , + [[, "(\\d{4})(\\d{4})", "$1 $2", ["[125-8]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + NL: [ + , + [ + , + , + "(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}", + , + , + , + , + , + , + [5, 6, 7, 8, 9, 10, 11], + ], + [ + , + , + "(?:1(?:[035]\\d|1[13-578]|6[124-8]|7[24]|8[0-467])|2(?:[0346]\\d|2[2-46-9]|5[125]|9[479])|3(?:[03568]\\d|1[3-8]|2[01]|4[1-8])|4(?:[0356]\\d|1[1-368]|7[58]|8[15-8]|9[23579])|5(?:[0358]\\d|[19][1-9]|2[1-57-9]|4[13-8]|6[126]|7[0-3578])|7\\d\\d)\\d{6}", + , + , + , + "101234567", + , + , + [9], + ], + [, , "(?:6[1-58]|970\\d)\\d{7}", , , , "612345678", , , [9, 11]], + [, , "800\\d{4,7}", , , , "8001234", , , [7, 8, 9, 10]], + [, , "90[069]\\d{4,7}", , , , "9061234", , , [7, 8, 9, 10]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "(?:85|91)\\d{7}", , , , "851234567", , , [9]], + "NL", + 31, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{4})", "$1", ["1[238]|[34]"]], + [, "(\\d{2})(\\d{3,4})", "$1 $2", ["14"]], + [, "(\\d{6})", "$1", ["1"]], + [, "(\\d{3})(\\d{4,7})", "$1 $2", ["[89]0"], "0$1"], + [, "(\\d{2})(\\d{7})", "$1 $2", ["66"], "0$1"], + [, "(\\d)(\\d{8})", "$1 $2", ["6"], "0$1"], + [ + , + "(\\d{3})(\\d{3})(\\d{3})", + "$1 $2 $3", + ["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"], + "0$1", + ], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-578]|91"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3", ["9"], "0$1"], + ], + [ + [, "(\\d{3})(\\d{4,7})", "$1 $2", ["[89]0"], "0$1"], + [, "(\\d{2})(\\d{7})", "$1 $2", ["66"], "0$1"], + [, "(\\d)(\\d{8})", "$1 $2", ["6"], "0$1"], + [ + , + "(\\d{3})(\\d{3})(\\d{3})", + "$1 $2 $3", + ["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"], + "0$1", + ], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-578]|91"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3", ["9"], "0$1"], + ], + [, , "66\\d{7}", , , , "662345678", , , [9]], + , + , + [ + , + , + "140(?:1[035]|2[0346]|3[03568]|4[0356]|5[0358]|8[458])|140(?:1[16-8]|2[259]|3[124]|4[17-9]|5[124679]|7)\\d", + , + , + , + , + , + , + [5, 6], + ], + [ + , + , + "140(?:1[035]|2[0346]|3[03568]|4[0356]|5[0358]|8[458])|(?:140(?:1[16-8]|2[259]|3[124]|4[17-9]|5[124679]|7)|8[478]\\d{6})\\d", + , + , + , + "14020", + , + , + [5, 6, 9], + ], + , + , + [, , , , , , , , , [-1]], + ], + NO: [ + , + [, , "(?:0|[2-9]\\d{3})\\d{4}", , , , , , , [5, 8]], + [ + , + , + "(?:2[1-4]|3[1-3578]|5[1-35-7]|6[1-4679]|7[0-8])\\d{6}", + , + , + , + "21234567", + , + , + [8], + ], + [, , "(?:4[015-8]|9\\d)\\d{6}", , , , "40612345", , , [8]], + [, , "80[01]\\d{5}", , , , "80012345", , , [8]], + [, , "82[09]\\d{5}", , , , "82012345", , , [8]], + [, , "810(?:0[0-6]|[2-8]\\d)\\d{3}", , , , "81021234", , , [8]], + [, , "880\\d{5}", , , , "88012345", , , [8]], + [, , "85[0-5]\\d{5}", , , , "85012345", , , [8]], + "NO", + 47, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["8"]], + [, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-79]"]], + ], + , + [, , , , , , , , , [-1]], + 1, + "[02-689]|7[0-8]", + [, , , , , , , , , [-1]], + [ + , + , + "(?:0[235-9]|81(?:0(?:0[7-9]|1\\d)|5\\d\\d))\\d{3}", + , + , + , + "02000", + ], + , + , + [, , "81[23]\\d{5}", , , , "81212345", , , [8]], + ], + NP: [ + , + [, , "(?:1\\d|9)\\d{9}|[1-9]\\d{7}", , , , , , , [8, 10, 11], [6, 7]], + [ + , + , + "(?:1[0-6]\\d|99[02-6])\\d{5}|(?:2[13-79]|3[135-8]|4[146-9]|5[135-7]|6[13-9]|7[15-9]|8[1-46-9]|9[1-7])[2-6]\\d{5}", + , + , + , + "14567890", + , + , + [8], + [6, 7], + ], + [ + , + , + "9(?:00|6[0-3]|7[0-24-6]|8[0-24-68])\\d{7}", + , + , + , + "9841234567", + , + , + [10], + ], + [, , "1(?:66001|800\\d\\d)\\d{5}", , , , "16600101234", , , [11]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "NP", + 977, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d)(\\d{7})", "$1-$2", ["1[2-6]"], "0$1"], + [ + , + "(\\d{2})(\\d{6})", + "$1-$2", + ["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"], + "0$1", + ], + [, "(\\d{3})(\\d{7})", "$1-$2", ["9"]], + [, "(\\d{4})(\\d{2})(\\d{5})", "$1-$2-$3", ["1"]], + ], + [ + [, "(\\d)(\\d{7})", "$1-$2", ["1[2-6]"], "0$1"], + [ + , + "(\\d{2})(\\d{6})", + "$1-$2", + ["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"], + "0$1", + ], + [, "(\\d{3})(\\d{7})", "$1-$2", ["9"]], + ], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + NR: [ + , + [, , "(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}", , , , , , , [7]], + [, , "444\\d{4}", , , , "4441234"], + [, , "(?:222|55[3-9]|666|777|8\\d\\d|999)\\d{4}", , , , "5551234"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "NR", + 674, + "00", + , + , + , + , + , + , + , + [[, "(\\d{3})(\\d{4})", "$1 $2", ["[24-9]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + NU: [ + , + [, , "(?:[4-7]|888\\d)\\d{3}", , , , , , , [4, 7]], + [, , "[47]\\d{3}", , , , "7012", , , [4]], + [, , "(?:[56]|888[1-9])\\d{3}", , , , "8884012"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "NU", + 683, + "00", + , + , + , + , + , + , + , + [[, "(\\d{3})(\\d{4})", "$1 $2", ["8"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + NZ: [ + , + [ + , + , + "[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}", + , + , + , + , + , + , + [5, 6, 7, 8, 9, 10], + ], + [ + , + , + "240\\d{5}|(?:3[2-79]|[49][2-9]|6[235-9]|7[2-57-9])\\d{6}", + , + , + , + "32345678", + , + , + [8], + [7], + ], + [ + , + , + "2(?:[0-27-9]\\d|6)\\d{6,7}|2(?:1\\d|75)\\d{5}", + , + , + , + "211234567", + , + , + [8, 9, 10], + ], + [, , "508\\d{6,7}|80\\d{6,8}", , , , "800123456", , , [8, 9, 10]], + [ + , + , + "(?:1[13-57-9]\\d{5}|50(?:0[08]|30|66|77|88))\\d{3}|90\\d{6,8}", + , + , + , + "900123456", + , + , + [7, 8, 9, 10], + ], + [, , , , , , , , , [-1]], + [, , "70\\d{7}", , , , "701234567", , , [9]], + [, , , , , , , , , [-1]], + "NZ", + 64, + "0(?:0|161)", + "0", + , + , + "0", + , + "00", + , + [ + [, "(\\d{2})(\\d{3,8})", "$1 $2", ["8[1-79]"], "0$1"], + [ + , + "(\\d{3})(\\d{2})(\\d{2,3})", + "$1 $2 $3", + ["50[036-8]|8|90", "50(?:[0367]|88)|8|90"], + "0$1", + ], + [ + , + "(\\d)(\\d{3})(\\d{4})", + "$1 $2 $3", + ["24|[346]|7[2-57-9]|9[2-9]"], + "0$1", + ], + [ + , + "(\\d{3})(\\d{3})(\\d{3,4})", + "$1 $2 $3", + ["2(?:10|74)|[589]"], + "0$1", + ], + [, "(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["1|2[028]"], "0$1"], + [ + , + "(\\d{2})(\\d{3})(\\d{3,5})", + "$1 $2 $3", + ["2(?:[169]|7[0-35-9])|7"], + "0$1", + ], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [ + , + , + "8(?:1[16-9]|22|3\\d|4[045]|5[459]|6[235-9]|7[0-3579]|90)\\d{2,7}", + , + , + , + "83012378", + ], + , + , + [, , , , , , , , , [-1]], + ], + OM: [ + , + [ + , + , + "(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}", + , + , + , + , + , + , + [7, 8, 9], + ], + [, , "2[1-6]\\d{6}", , , , "23123456", , , [8]], + [ + , + , + "1505\\d{4}|(?:7(?:[126-9]\\d|41)|9(?:0[1-9]|[1-9]\\d))\\d{5}", + , + , + , + "92123456", + , + , + [8], + ], + [, , "8007\\d{4,5}|(?:500|800[05])\\d{4}", , , , "80071234"], + [, , "900\\d{5}", , , , "90012345", , , [8]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "OM", + 968, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{3})(\\d{4,6})", "$1 $2", ["[58]"]], + [, "(\\d{2})(\\d{6})", "$1 $2", ["2"]], + [, "(\\d{4})(\\d{4})", "$1 $2", ["[179]"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + PA: [ + , + [ + , + , + "(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}", + , + , + , + , + , + , + [7, 8, 10, 11], + ], + [ + , + , + "(?:1(?:0\\d|1[479]|2[37]|3[0137]|4[17]|5[05]|6[058]|7[0167]|8[2358]|9[1389])|2(?:[0235-79]\\d|1[0-7]|4[013-9]|8[02-9])|3(?:[047-9]\\d|1[0-8]|2[0-5]|33|5[0-35]|6[068])|4(?:00|3[0-579]|4\\d|7[0-57-9])|5(?:[01]\\d|2[0-7]|[56]0|79)|7(?:0[09]|2[0-26-8]|3[03]|4[04]|5[05-9]|6[0156]|7[0-24-9]|8[4-9]|90)|8(?:09|2[89]|3\\d|4[0-24-689]|5[014]|8[02])|9(?:0[5-9]|1[0135-8]|2[036-9]|3[35-79]|40|5[0457-9]|6[05-9]|7[04-9]|8[35-8]|9\\d))\\d{4}", + , + , + , + "2001234", + , + , + [7], + ], + [ + , + , + "(?:1[16]1|21[89]|6\\d{3}|8(?:1[01]|7[23]))\\d{4}", + , + , + , + "61234567", + , + , + [7, 8], + ], + [, , "800\\d{4,5}|(?:00800|800\\d)\\d{6}", , , , "8001234"], + [ + , + , + "(?:8(?:22|55|60|7[78]|86)|9(?:00|81))\\d{4}", + , + , + , + "8601234", + , + , + [7], + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "PA", + 507, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{3})(\\d{4})", "$1-$2", ["[1-57-9]"]], + [, "(\\d{4})(\\d{4})", "$1-$2", ["[68]"]], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + PE: [ + , + [, , "(?:[14-8]|9\\d)\\d{7}", , , , , , , [8, 9], [6, 7]], + [ + , + , + "(?:(?:(?:4[34]|5[14])[0-8]|687)\\d|7(?:173|(?:3[0-8]|55)\\d)|8(?:10[05689]|6(?:0[06-9]|1[6-9]|29)|7(?:0[0569]|[56]0)))\\d{4}|(?:1[0-8]|4[12]|5[236]|6[1-7]|7[246]|8[2-4])\\d{6}", + , + , + , + "11234567", + , + , + [8], + [6, 7], + ], + [, , "9\\d{8}", , , , "912345678", , , [9]], + [, , "800\\d{5}", , , , "80012345", , , [8]], + [, , "805\\d{5}", , , , "80512345", , , [8]], + [, , "801\\d{5}", , , , "80112345", , , [8]], + [, , "80[24]\\d{5}", , , , "80212345", , , [8]], + [, , , , , , , , , [-1]], + "PE", + 51, + "00|19(?:1[124]|77|90)00", + "0", + " Anexo ", + , + "0", + , + "00", + , + [ + [, "(\\d{3})(\\d{5})", "$1 $2", ["80"], "(0$1)"], + [, "(\\d)(\\d{7})", "$1 $2", ["1"], "(0$1)"], + [, "(\\d{2})(\\d{6})", "$1 $2", ["[4-8]"], "(0$1)"], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + PF: [ + , + [, , "4\\d{5}(?:\\d{2})?|8\\d{7,8}", , , , , , , [6, 8, 9]], + [, , "4(?:0[4-689]|9[4-68])\\d{5}", , , , "40412345", , , [8]], + [, , "8[7-9]\\d{6}", , , , "87123456", , , [8]], + [, , "80[0-5]\\d{6}", , , , "800012345", , , [9]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "499\\d{5}", , , , "49901234", , , [8]], + "PF", + 689, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["44"]], + [, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["4|8[7-9]"]], + [, "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , "44\\d{4}", , , , , , , [6]], + [, , "44\\d{4}", , , , "440123", , , [6]], + , + , + [, , , , , , , , , [-1]], + ], + PG: [ + , + [ + , + , + "(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}", + , + , + , + , + , + , + [7, 8], + ], + [ + , + , + "(?:(?:3[0-2]|4[257]|5[34]|9[78])\\d|64[1-9]|85[02-46-9])\\d{4}", + , + , + , + "3123456", + , + , + [7], + ], + [, , "(?:7\\d|8[1-48])\\d{6}", , , , "70123456", , , [8]], + [, , "180\\d{4}", , , , "1801234", , , [7]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "2(?:0[0-57]|7[568])\\d{4}", , , , "2751234", , , [7]], + "PG", + 675, + "00|140[1-3]", + , + , + , + , + , + "00", + , + [ + [, "(\\d{3})(\\d{4})", "$1 $2", ["18|[2-69]|85"]], + [, "(\\d{4})(\\d{4})", "$1 $2", ["[78]"]], + ], + , + [, , "27[01]\\d{4}", , , , "2700123", , , [7]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + PH: [ + , + [ + , + , + "(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}", + , + , + , + , + , + , + [6, 8, 9, 10, 11, 12, 13], + [4, 5, 7], + ], + [ + , + , + "(?:(?:2[3-8]|3[2-68]|4[2-9]|5[2-6]|6[2-58]|7[24578])\\d{3}|88(?:22\\d\\d|42))\\d{4}|(?:2|8[2-8]\\d\\d)\\d{5}", + , + , + , + "232345678", + , + , + [6, 8, 9, 10], + [4, 5, 7], + ], + [ + , + , + "(?:8(?:1[37]|9[5-8])|9(?:0[5-9]|1[0-24-9]|[235-7]\\d|4[2-9]|8[135-9]|9[1-9]))\\d{7}", + , + , + , + "9051234567", + , + , + [10], + ], + [, , "1800\\d{7,9}", , , , "180012345678", , , [11, 12, 13]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "PH", + 63, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d)(\\d{5})", "$1 $2", ["2"], "(0$1)"], + [ + , + "(\\d{4})(\\d{4,6})", + "$1 $2", + [ + "3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2", + "3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))", + ], + "(0$1)", + ], + [ + , + "(\\d{5})(\\d{4})", + "$1 $2", + ["346|4(?:27|9[35])|883", "3469|4(?:279|9(?:30|56))|8834"], + "(0$1)", + ], + [, "(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2"], "(0$1)"], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[3-7]|8[2-8]"], "(0$1)"], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], + [, "(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]], + [, "(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["1"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + PK: [ + , + [ + , + , + "122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}", + , + , + , + , + , + , + [8, 9, 10, 11, 12], + [5, 6, 7], + ], + [ + , + , + "(?:(?:21|42)[2-9]|58[126])\\d{7}|(?:2[25]|4[0146-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]\\d{6,7}|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8]))[2-9]\\d{5,6}", + , + , + , + "2123456789", + , + , + [9, 10], + [5, 6, 7, 8], + ], + [ + , + , + "3(?:[0-247]\\d|3[0-79]|55|64)\\d{7}", + , + , + , + "3012345678", + , + , + [10], + ], + [, , "800\\d{5}(?:\\d{3})?", , , , "80012345", , , [8, 11]], + [, , "900\\d{5}", , , , "90012345", , , [8]], + [, , , , , , , , , [-1]], + [, , "122\\d{6}", , , , "122044444", , , [9]], + [, , , , , , , , , [-1]], + "PK", + 92, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{3})(\\d{3})(\\d{2,7})", "$1 $2 $3", ["[89]0"], "0$1"], + [, "(\\d{4})(\\d{5})", "$1 $2", ["1"]], + [ + , + "(\\d{3})(\\d{6,7})", + "$1 $2", + [ + "2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])", + "9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]", + ], + "(0$1)", + ], + [ + , + "(\\d{2})(\\d{7,8})", + "$1 $2", + ["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"], + "(0$1)", + ], + [, "(\\d{5})(\\d{5})", "$1 $2", ["58"], "(0$1)"], + [, "(\\d{3})(\\d{7})", "$1 $2", ["3"], "0$1"], + [ + , + "(\\d{2})(\\d{3})(\\d{3})(\\d{3})", + "$1 $2 $3 $4", + ["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"], + "(0$1)", + ], + [ + , + "(\\d{3})(\\d{3})(\\d{3})(\\d{3})", + "$1 $2 $3 $4", + ["[24-9]"], + "(0$1)", + ], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [ + , + , + "(?:2(?:[125]|3[2358]|4[2-4]|9[2-8])|4(?:[0-246-9]|5[3479])|5(?:[1-35-7]|4[2-467])|6(?:0[468]|[1-8])|7(?:[14]|2[236])|8(?:[16]|2[2-689]|3[23578]|4[3478]|5[2356])|9(?:1|22|3[27-9]|4[2-6]|6[3569]|9[2-7]))111\\d{6}", + , + , + , + "21111825888", + , + , + [11, 12], + ], + , + , + [, , , , , , , , , [-1]], + ], + PL: [ + , + [ + , + , + "(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}", + , + , + , + , + , + , + [6, 7, 8, 9, 10], + ], + [ + , + , + "47\\d{7}|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])(?:[02-9]\\d{6}|1(?:[0-8]\\d{5}|9\\d{3}(?:\\d{2})?))", + , + , + , + "123456789", + , + , + [7, 9], + ], + [ + , + , + "2131[89]\\d{4}|21(?:1[013-5]|2\\d|3[2-9])\\d{5}|(?:45|5[0137]|6[069]|7[2389]|88)\\d{7}", + , + , + , + "512345678", + , + , + [9], + ], + [, , "800\\d{6,7}", , , , "800123456", , , [9, 10]], + [, , "70[01346-8]\\d{6}", , , , "701234567", , , [9]], + [, , "801\\d{6}", , , , "801234567", , , [9]], + [, , , , , , , , , [-1]], + [, , "39\\d{7}", , , , "391234567", , , [9]], + "PL", + 48, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{5})", "$1", ["19"]], + [, "(\\d{3})(\\d{3})", "$1 $2", ["11|20|64"]], + [ + , + "(\\d{2})(\\d{2})(\\d{3})", + "$1 $2 $3", + [ + "(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1", + "(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19", + ], + ], + [, "(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["64"]], + [ + , + "(\\d{3})(\\d{3})(\\d{3})", + "$1 $2 $3", + ["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"], + ], + [ + , + "(\\d{2})(\\d{3})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["1[2-8]|[2-7]|8[1-79]|9[145]"], + ], + [, "(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["8"]], + ], + , + [, , "64\\d{4,7}", , , , "641234567", , , [6, 7, 8, 9]], + , + , + [, , , , , , , , , [-1]], + [, , "804\\d{6}", , , , "804123456", , , [9]], + , + , + [, , , , , , , , , [-1]], + ], + PM: [ + , + [, , "[45]\\d{5}|(?:708|8\\d\\d)\\d{6}", , , , , , , [6, 9]], + [, , "(?:4[1-35-9]|5[0-47-9]|80[6-9]\\d\\d)\\d{4}", , , , "430123"], + [ + , + , + "(?:4[02-489]|5[02-9]|708(?:4[0-5]|5[0-6]))\\d{4}", + , + , + , + "551234", + ], + [, , "80[0-5]\\d{6}", , , , "800012345", , , [9]], + [, , "8[129]\\d{7}", , , , "810123456", , , [9]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "PM", + 508, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["[45]"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["7"]], + [, "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + PR: [ + , + [, , "(?:[589]\\d\\d|787)\\d{7}", , , , , , , [10], [7]], + [, , "(?:787|939)[2-9]\\d{6}", , , , "7872345678", , , , [7]], + [, , "(?:787|939)[2-9]\\d{6}", , , , "7872345678", , , , [7]], + [, , "8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", , , , "8002345678"], + [, , "900[2-9]\\d{6}", , , , "9002345678"], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}", + , + , + , + "5002345678", + ], + [, , , , , , , , , [-1]], + "PR", + 1, + "011", + "1", + , + , + "1", + , + , + 1, + , + , + [, , , , , , , , , [-1]], + , + "787|939", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + PS: [ + , + [, , "[2489]2\\d{6}|(?:1\\d|5)\\d{8}", , , , , , , [8, 9, 10], [7]], + [ + , + , + "(?:22[2-47-9]|42[45]|82[014-68]|92[3569])\\d{5}", + , + , + , + "22234567", + , + , + [8], + [7], + ], + [, , "5[69]\\d{7}", , , , "599123456", , , [9]], + [, , "1800\\d{6}", , , , "1800123456", , , [10]], + [, , , , , , , , , [-1]], + [, , "1700\\d{6}", , , , "1700123456", , , [10]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "PS", + 970, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2489]"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["5"], "0$1"], + [, "(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + PT: [ + , + [, , "1693\\d{5}|(?:[26-9]\\d|30)\\d{7}", , , , , , , [9]], + [ + , + , + "2(?:[12]\\d|3[1-689]|4[1-59]|[57][1-9]|6[1-35689]|8[1-69]|9[1256])\\d{6}", + , + , + , + "212345678", + ], + [ + , + , + "6(?:[06]92(?:30|9\\d)|[35]92(?:[049]\\d|3[034]))\\d{3}|(?:(?:16|6[0356])93|9(?:[1-36]\\d\\d|480))\\d{5}", + , + , + , + "912345678", + ], + [, , "80[02]\\d{6}", , , , "800123456"], + [ + , + , + "(?:6(?:0[178]|4[68])\\d|76(?:0[1-57]|1[2-47]|2[237]))\\d{5}", + , + , + , + "760123456", + ], + [, , "80(?:8\\d|9[1579])\\d{5}", , , , "808123456"], + [, , "884[0-4689]\\d{5}", , , , "884123456"], + [, , "30\\d{7}", , , , "301234567"], + "PT", + 351, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["2[12]"]], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["16|[236-9]"]], + ], + , + [, , "6(?:222\\d|89(?:00|88|99))\\d{4}", , , , "622212345"], + , + , + [, , , , , , , , , [-1]], + [, , "70(?:38[01]|596|(?:7\\d|8[17])\\d)\\d{4}", , , , "707123456"], + , + , + [, , "600\\d{6}|6[06]92(?:0\\d|3[349]|49)\\d{3}", , , , "600110000"], + ], + PW: [ + , + [, , "(?:[24-8]\\d\\d|345|900)\\d{4}", , , , , , , [7]], + [ + , + , + "(?:2(?:55|77)|345|488|5(?:35|44|87)|6(?:22|54|79)|7(?:33|47)|8(?:24|55|76)|900)\\d{4}", + , + , + , + "2771234", + ], + [ + , + , + "(?:(?:46|83)[0-5]|(?:6[2-4689]|78)0)\\d{4}|(?:45|77|88)\\d{5}", + , + , + , + "6201234", + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "PW", + 680, + "01[12]", + , + , + , + , + , + , + , + [[, "(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + PY: [ + , + [ + , + , + "59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}", + , + , + , + , + , + , + [6, 7, 8, 9, 10, 11], + [5], + ], + [ + , + , + "(?:[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36])\\d{5,7}|(?:2(?:2[4-68]|[4-68]\\d|7[15]|9[1-5])|3(?:18|3[167]|4[2357]|51|[67]\\d)|4(?:3[12]|5[13]|9[1-47])|5(?:[1-4]\\d|5[02-4])|6(?:3[1-3]|44|7[1-8])|7(?:4[0-4]|5\\d|6[1-578]|75|8[0-8])|858)\\d{5,6}", + , + , + , + "212345678", + , + , + [7, 8, 9], + [5, 6], + ], + [ + , + , + "9(?:51|6[129]|7[1-6]|8[1-7]|9[1-5])\\d{6}", + , + , + , + "961456789", + , + , + [9], + ], + [, , "9800\\d{5,7}", , , , "98000123456", , , [9, 10, 11]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "8700[0-4]\\d{4}", , , , "870012345", , , [9]], + "PY", + 595, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{3})(\\d{3,6})", "$1 $2", ["[2-9]0"], "0$1"], + [ + , + "(\\d{2})(\\d{5})", + "$1 $2", + ["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"], + "(0$1)", + ], + [ + , + "(\\d{3})(\\d{4,5})", + "$1 $2", + ["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"], + "(0$1)", + ], + [ + , + "(\\d{2})(\\d{3})(\\d{3,4})", + "$1 $2 $3", + ["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"], + "(0$1)", + ], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["87"]], + [, "(\\d{3})(\\d{6})", "$1 $2", ["9(?:[5-79]|8[1-7])"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-8]"], "0$1"], + [, "(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["9"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "[2-9]0\\d{4,7}", , , , "201234567", , , [6, 7, 8, 9]], + , + , + [, , , , , , , , , [-1]], + ], + QA: [ + , + [ + , + , + "800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}", + , + , + , + , + , + , + [7, 8, 9, 11], + ], + [ + , + , + "4(?:1111|2022)\\d{3}|4(?:[04]\\d\\d|14[0-6]|999)\\d{4}", + , + , + , + "44123456", + , + , + [8], + ], + [, , "[35-7]\\d{7}", , , , "33123456", , , [8]], + [ + , + , + "800\\d{4}|(?:0080[01]|800)\\d{6}", + , + , + , + "8001234", + , + , + [7, 9, 11], + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "QA", + 974, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{3})(\\d{4})", "$1 $2", ["2[136]|8"]], + [, "(\\d{4})(\\d{4})", "$1 $2", ["[3-7]"]], + ], + , + [, , "2[136]\\d{5}", , , , "2123456", , , [7]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + RE: [ + , + [, , "709\\d{6}|(?:26|[689]\\d)\\d{7}", , , , , , , [9]], + [, , "26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}", , , , "262161234"], + [ + , + , + "(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}", + , + , + , + "692123456", + ], + [, , "80\\d{7}", , , , "801234567"], + [, , "89[1-37-9]\\d{6}", , , , "891123456"], + [, , "8(?:1[019]|2[0156]|84|90)\\d{6}", , , , "810123456"], + [, , , , , , , , , [-1]], + [ + , + , + "9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}", + , + , + , + "939901234", + ], + "RE", + 262, + "00", + "0", + , + , + "0", + , + , + , + [ + [ + , + "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["[26-9]"], + "0$1", + ], + ], + , + [, , , , , , , , , [-1]], + 1, + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + RO: [ + , + [, , "(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}", , , , , , , [6, 9]], + [ + , + , + "[23][13-6]\\d{7}|(?:2(?:19\\d|[3-6]\\d9)|31\\d\\d)\\d\\d", + , + , + , + "211234567", + ], + [ + , + , + "(?:630|702)0\\d{5}|(?:6(?:00|2\\d)|7(?:0[013-9]|1[0-3]|[2-7]\\d|8[03-8]|9[0-39]))\\d{6}", + , + , + , + "712034567", + , + , + [9], + ], + [, , "800\\d{6}", , , , "800123456", , , [9]], + [, , "90[0136]\\d{6}", , , , "900123456", , , [9]], + [, , "801\\d{6}", , , , "801123456", , , [9]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "RO", + 40, + "00", + "0", + " int ", + , + "0", + , + , + , + [ + [, "(\\d{3})(\\d{3})", "$1 $2", ["2[3-6]", "2[3-6]\\d9"], "0$1"], + [, "(\\d{2})(\\d{4})", "$1 $2", ["219|31"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[23]1"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[236-9]"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "(?:37\\d|80[578])\\d{6}", , , , "372123456", , , [9]], + , + , + [, , , , , , , , , [-1]], + ], + RS: [ + , + [ + , + , + "38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}", + , + , + , + , + , + , + [6, 7, 8, 9, 10, 11, 12], + [4, 5], + ], + [ + , + , + "(?:11[1-9]\\d|(?:2[389]|39)(?:0[2-9]|[2-9]\\d))\\d{3,8}|(?:1[02-9]|2[0-24-7]|3[0-8])[2-9]\\d{4,9}", + , + , + , + "10234567", + , + , + [7, 8, 9, 10, 11, 12], + [4, 5, 6], + ], + [, , "6(?:[0-689]|7\\d)\\d{6,7}", , , , "601234567", , , [8, 9, 10]], + [, , "800\\d{3,9}", , , , "80012345"], + [ + , + , + "(?:78\\d|90[0169])\\d{3,7}", + , + , + , + "90012345", + , + , + [6, 7, 8, 9, 10], + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "RS", + 381, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{3})(\\d{3,9})", "$1 $2", ["(?:2[389]|39)0|[7-9]"], "0$1"], + [, "(\\d{2})(\\d{5,10})", "$1 $2", ["[1-36]"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "7[06]\\d{4,10}", , , , "700123456"], + , + , + [, , , , , , , , , [-1]], + ], + RU: [ + , + [, , "8\\d{13}|[347-9]\\d{9}", , , , , , , [10, 14], [7]], + [ + , + , + "336(?:[013-9]\\d|2[013-9])\\d{5}|(?:3(?:0[12]|4[1-35-79]|5[1-3]|65|8[1-58]|9[0145])|4(?:01|1[1356]|2[13467]|7[1-5]|8[1-7]|9[1-689])|8(?:1[1-8]|2[01]|3[13-6]|4[0-8]|5[15-7]|6[0-35-79]|7[1-37-9]))\\d{7}", + , + , + , + "3011234567", + , + , + [10], + [7], + ], + [, , "9\\d{9}", , , , "9123456789", , , [10]], + [, , "8(?:0[04]|108\\d{3})\\d{7}", , , , "8001234567"], + [, , "80[39]\\d{7}", , , , "8091234567", , , [10]], + [, , , , , , , , , [-1]], + [, , "808\\d{7}", , , , "8081234567", , , [10]], + [, , , , , , , , , [-1]], + "RU", + 7, + "810", + "8", + , + , + "8", + , + "8~10", + , + [ + [, "(\\d{3})(\\d{2})(\\d{2})", "$1-$2-$3", ["[0-79]"]], + [ + , + "(\\d{4})(\\d{2})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + [ + "7(?:1[0-8]|2[1-9])", + "7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))", + "7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2", + ], + "8 ($1)", + , + 1, + ], + [ + , + "(\\d{5})(\\d)(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + [ + "7(?:1[0-68]|2[1-9])", + "7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))", + "7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]", + ], + "8 ($1)", + , + 1, + ], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "8 ($1)", , 1], + [ + , + "(\\d{3})(\\d{3})(\\d{2})(\\d{2})", + "$1 $2-$3-$4", + ["[349]|8(?:[02-7]|1[1-8])"], + "8 ($1)", + , + 1, + ], + [ + , + "(\\d{4})(\\d{4})(\\d{3})(\\d{3})", + "$1 $2 $3 $4", + ["8"], + "8 ($1)", + ], + ], + [ + [ + , + "(\\d{4})(\\d{2})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + [ + "7(?:1[0-8]|2[1-9])", + "7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))", + "7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2", + ], + "8 ($1)", + , + 1, + ], + [ + , + "(\\d{5})(\\d)(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + [ + "7(?:1[0-68]|2[1-9])", + "7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))", + "7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]", + ], + "8 ($1)", + , + 1, + ], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "8 ($1)", , 1], + [ + , + "(\\d{3})(\\d{3})(\\d{2})(\\d{2})", + "$1 $2-$3-$4", + ["[349]|8(?:[02-7]|1[1-8])"], + "8 ($1)", + , + 1, + ], + [ + , + "(\\d{4})(\\d{4})(\\d{3})(\\d{3})", + "$1 $2 $3 $4", + ["8"], + "8 ($1)", + ], + ], + [, , , , , , , , , [-1]], + 1, + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + RW: [ + , + [, , "(?:06|[27]\\d\\d|[89]00)\\d{6}", , , , , , , [8, 9]], + [, , "(?:06|2[23568]\\d)\\d{6}", , , , "250123456"], + [, , "7[237-9]\\d{7}", , , , "720123456", , , [9]], + [, , "800\\d{6}", , , , "800123456", , , [9]], + [, , "900\\d{6}", , , , "900123456", , , [9]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "RW", + 250, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["0"]], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"]], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[7-9]"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + SA: [ + , + [, , "(?:[15]\\d|800|92)\\d{7}", , , , , , , [9, 10], [7]], + [ + , + , + "1(?:1\\d|2[24-8]|3[35-8]|4[3-68]|6[2-5]|7[235-7])\\d{6}", + , + , + , + "112345678", + , + , + [9], + [7], + ], + [ + , + , + "579[01]\\d{5}|5(?:[013-689]\\d|7[0-8])\\d{6}", + , + , + , + "512345678", + , + , + [9], + ], + [, , "800\\d{7}", , , , "8001234567", , , [10]], + [, , "925\\d{6}", , , , "925012345", , , [9]], + [, , "920\\d{6}", , , , "920012345", , , [9]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "SA", + 966, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{4})(\\d{5})", "$1 $2", ["9"]], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["5"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + SB: [ + , + [, , "[6-9]\\d{6}|[1-6]\\d{4}", , , , , , , [5, 7]], + [ + , + , + "(?:1[4-79]|[23]\\d|4[0-2]|5[03]|6[0-37])\\d{3}", + , + , + , + "40123", + , + , + [5], + ], + [ + , + , + "48\\d{3}|(?:(?:6[89]|7[1-9]|8[4-9])\\d|9(?:1[2-9]|2[013-9]|3[0-2]|[46]\\d|5[0-46-9]|7[0-689]|8[0-79]|9[0-8]))\\d{4}", + , + , + , + "7421234", + ], + [, , "1[38]\\d{3}", , , , "18123", , , [5]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "5[12]\\d{3}", , , , "51123", , , [5]], + "SB", + 677, + "0[01]", + , + , + , + , + , + , + , + [[, "(\\d{2})(\\d{5})", "$1 $2", ["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + SC: [ + , + [, , "(?:[2489]\\d|64)\\d{5}", , , , , , , [7]], + [, , "4[2-46]\\d{5}", , , , "4217123"], + [, , "2[125-8]\\d{5}", , , , "2510123"], + [, , "800[08]\\d{3}", , , , "8000000"], + [, , "85\\d{5}", , , , "8512345"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "971\\d{4}|(?:64|95)\\d{5}", , , , "6412345"], + "SC", + 248, + "010|0[0-2]", + , + , + , + , + , + "00", + , + [[, "(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[246]|9[57]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + SD: [ + , + [, , "[19]\\d{8}", , , , , , , [9]], + [, , "1(?:5\\d|8[35-7])\\d{6}", , , , "153123456"], + [, , "(?:1[0-2]|9[0-3569])\\d{7}", , , , "911231234"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "SD", + 249, + "00", + "0", + , + , + "0", + , + , + , + [[, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[19]"], "0$1"]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + SE: [ + , + [ + , + , + "(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}", + , + , + , + , + , + , + [6, 7, 8, 9, 10, 12], + ], + [ + , + , + "(?:(?:[12][136]|3[356]|4[0246]|6[03]|8\\d)\\d|90[1-9])\\d{4,6}|(?:1(?:2[0-35]|4[0-4]|5[0-25-9]|7[13-6]|[89]\\d)|2(?:2[0-7]|4[0136-8]|5[0138]|7[018]|8[01]|9[0-57])|3(?:0[0-4]|1\\d|2[0-25]|4[056]|7[0-2]|8[0-3]|9[023])|4(?:1[013-8]|3[0135]|5[14-79]|7[0-246-9]|8[0156]|9[0-689])|5(?:0[0-6]|[15][0-5]|2[0-68]|3[0-4]|4\\d|6[03-5]|7[013]|8[0-79]|9[01])|6(?:1[1-3]|2[0-4]|4[02-57]|5[0-37]|6[0-3]|7[0-2]|8[0247]|9[0-356])|9(?:1[0-68]|2\\d|3[02-5]|4[0-3]|5[0-4]|[68][01]|7[0135-8]))\\d{5,6}", + , + , + , + "8123456", + , + , + [7, 8, 9], + ], + [, , "7[02369]\\d{7}", , , , "701234567", , , [9]], + [, , "20\\d{4,7}", , , , "20123456", , , [6, 7, 8, 9]], + [ + , + , + "649\\d{6}|99[1-59]\\d{4}(?:\\d{3})?|9(?:00|39|44)[1-8]\\d{3,6}", + , + , + , + "9001234567", + , + , + [7, 8, 9, 10], + ], + [, , "77[0-7]\\d{6}", , , , "771234567", , , [9]], + [, , "75[1-8]\\d{6}", , , , "751234567", , , [9]], + [, , , , , , , , , [-1]], + "SE", + 46, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{2})(\\d{2,3})(\\d{2})", "$1-$2 $3", ["20"], "0$1"], + [, "(\\d{3})(\\d{4})", "$1-$2", ["9(?:00|39|44|9)"], "0$1"], + [ + , + "(\\d{2})(\\d{3})(\\d{2})", + "$1-$2 $3", + ["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"], + "0$1", + ], + [, "(\\d)(\\d{2,3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["8"], "0$1"], + [ + , + "(\\d{3})(\\d{2,3})(\\d{2})", + "$1-$2 $3", + [ + "1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])", + ], + "0$1", + ], + [ + , + "(\\d{3})(\\d{2,3})(\\d{3})", + "$1-$2 $3", + ["9(?:00|39|44)"], + "0$1", + ], + [ + , + "(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})", + "$1-$2 $3 $4", + ["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"], + "0$1", + ], + [ + , + "(\\d{2})(\\d{3})(\\d{2})(\\d{2})", + "$1-$2 $3 $4", + ["10|7"], + "0$1", + ], + [, "(\\d)(\\d{3})(\\d{3})(\\d{2})", "$1-$2 $3 $4", ["8"], "0$1"], + [ + , + "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", + "$1-$2 $3 $4", + [ + "[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])", + ], + "0$1", + ], + [, "(\\d{3})(\\d{2})(\\d{2})(\\d{3})", "$1-$2 $3 $4", ["9"], "0$1"], + [ + , + "(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})", + "$1-$2 $3 $4 $5", + ["[26]"], + "0$1", + ], + ], + [ + [, "(\\d{2})(\\d{2,3})(\\d{2})", "$1 $2 $3", ["20"]], + [, "(\\d{3})(\\d{4})", "$1 $2", ["9(?:00|39|44|9)"]], + [ + , + "(\\d{2})(\\d{3})(\\d{2})", + "$1 $2 $3", + ["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"], + ], + [, "(\\d)(\\d{2,3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]], + [ + , + "(\\d{3})(\\d{2,3})(\\d{2})", + "$1 $2 $3", + [ + "1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])", + ], + ], + [, "(\\d{3})(\\d{2,3})(\\d{3})", "$1 $2 $3", ["9(?:00|39|44)"]], + [ + , + "(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"], + ], + [, "(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["10|7"]], + [, "(\\d)(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["8"]], + [ + , + "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + [ + "[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])", + ], + ], + [, "(\\d{3})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["9"]], + [ + , + "(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})", + "$1 $2 $3 $4 $5", + ["[26]"], + ], + ], + [, , "74[02-9]\\d{6}", , , , "740123456", , , [9]], + , + , + [, , , , , , , , , [-1]], + [, , "10[1-8]\\d{6}", , , , "102345678", , , [9]], + , + , + [, , "(?:25[245]|67[3-68])\\d{9}", , , , "254123456789", , , [12]], + ], + SG: [ + , + [ + , + , + "(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}", + , + , + , + , + , + , + [8, 10, 11], + ], + [ + , + , + "662[0-24-9]\\d{4}|6(?:[0-578]\\d|6[013-57-9]|9[0-35-9])\\d{5}", + , + , + , + "61234567", + , + , + [8], + ], + [ + , + , + "89(?:7[0-689]|80)\\d{4}|(?:8(?:0[1-9]|[1-8]\\d|9[0-6])|9[0-8]\\d)\\d{5}", + , + , + , + "81234567", + , + , + [8], + ], + [, , "(?:18|8)00\\d{7}", , , , "18001234567", , , [10, 11]], + [, , "1900\\d{7}", , , , "19001234567", , , [11]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "(?:3[12]\\d|666)\\d{5}", , , , "31234567", , , [8]], + "SG", + 65, + "0[0-3]\\d", + , + , + , + , + , + , + , + [ + [ + , + "(\\d{4,5})", + "$1", + ["1[013-9]|77", "1(?:[013-8]|9(?:0[1-9]|[1-9]))|77"], + ], + [, "(\\d{4})(\\d{4})", "$1 $2", ["[369]|8(?:0[1-9]|[1-9])"]], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]], + [, "(\\d{4})(\\d{4})(\\d{3})", "$1 $2 $3", ["7"]], + [, "(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]], + ], + [ + [, "(\\d{4})(\\d{4})", "$1 $2", ["[369]|8(?:0[1-9]|[1-9])"]], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]], + [, "(\\d{4})(\\d{4})(\\d{3})", "$1 $2 $3", ["7"]], + [, "(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]], + ], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "7000\\d{7}", , , , "70001234567", , , [11]], + , + , + [, , , , , , , , , [-1]], + ], + SH: [ + , + [, , "(?:[256]\\d|8)\\d{3}", , , , , , , [4, 5]], + [, , "2(?:[0-57-9]\\d|6[4-9])\\d\\d", , , , "22158"], + [, , "[56]\\d{4}", , , , "51234", , , [5]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "262\\d\\d", , , , "26212", , , [5]], + "SH", + 290, + "00", + , + , + , + , + , + , + , + , + , + [, , , , , , , , , [-1]], + 1, + "[256]", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + SI: [ + , + [, , "[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}", , , , , , , [5, 6, 7, 8]], + [, , "(?:[1-357][2-8]|4[24-8])\\d{6}", , , , "12345678", , , [8], [7]], + [ + , + , + "65(?:[178]\\d|5[56]|6[01])\\d{4}|(?:[37][01]|4[0139]|51|6[489])\\d{6}", + , + , + , + "31234567", + , + , + [8], + ], + [, , "80\\d{4,6}", , , , "80123456", , , [6, 7, 8]], + [, , "89[1-3]\\d{2,5}|90\\d{4,6}", , , , "90123456"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [ + , + , + "(?:59\\d\\d|8(?:1(?:[67]\\d|8[0-589])|2(?:0\\d|2[0-37-9]|8[0-2489])|3[389]\\d))\\d{4}", + , + , + , + "59012345", + , + , + [8], + ], + "SI", + 386, + "00|10(?:22|66|88|99)", + "0", + , + , + "0", + , + "00", + , + [ + [, "(\\d{2})(\\d{3,6})", "$1 $2", ["8[09]|9"], "0$1"], + [, "(\\d{3})(\\d{5})", "$1 $2", ["59|8"], "0$1"], + [ + , + "(\\d{2})(\\d{3})(\\d{3})", + "$1 $2 $3", + ["[37][01]|4[0139]|51|6"], + "0$1", + ], + [ + , + "(\\d)(\\d{3})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["[1-57]"], + "(0$1)", + ], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + SJ: [ + , + [, , "0\\d{4}|(?:[489]\\d|79)\\d{6}", , , , , , , [5, 8]], + [, , "79\\d{6}", , , , "79123456", , , [8]], + [, , "(?:4[015-8]|9\\d)\\d{6}", , , , "41234567", , , [8]], + [, , "80[01]\\d{5}", , , , "80012345", , , [8]], + [, , "82[09]\\d{5}", , , , "82012345", , , [8]], + [, , "810(?:0[0-6]|[2-8]\\d)\\d{3}", , , , "81021234", , , [8]], + [, , "880\\d{5}", , , , "88012345", , , [8]], + [, , "85[0-5]\\d{5}", , , , "85012345", , , [8]], + "SJ", + 47, + "00", + , + , + , + , + , + , + , + , + , + [, , , , , , , , , [-1]], + , + "79", + [, , , , , , , , , [-1]], + [ + , + , + "(?:0[235-9]|81(?:0(?:0[7-9]|1\\d)|5\\d\\d))\\d{3}", + , + , + , + "02000", + ], + , + , + [, , "81[23]\\d{5}", , , , "81212345", , , [8]], + ], + SK: [ + , + [, , "[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}", , , , , , , [6, 7, 9]], + [ + , + , + "(?:2(?:16|[2-9]\\d{3})|(?:(?:[3-5][1-8]\\d|819)\\d|601[1-5])\\d)\\d{4}|(?:2|[3-5][1-8])1[67]\\d{3}|[3-5][1-8]16\\d\\d", + , + , + , + "221234567", + ], + [ + , + , + "909[1-9]\\d{5}|9(?:0[1-8]|1[0-24-9]|4[03-57-9]|5\\d)\\d{6}", + , + , + , + "912123456", + , + , + [9], + ], + [, , "800\\d{6}", , , , "800123456", , , [9]], + [, , "9(?:00|[78]\\d)\\d{6}", , , , "900123456", , , [9]], + [, , "8[5-9]\\d{7}", , , , "850123456", , , [9]], + [, , , , , , , , , [-1]], + [, , "6(?:02|5[0-4]|9[0-6])\\d{6}", , , , "690123456", , , [9]], + "SK", + 421, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d)(\\d{2})(\\d{3,4})", "$1 $2 $3", ["21"], "0$1"], + [ + , + "(\\d{2})(\\d{2})(\\d{2,3})", + "$1 $2 $3", + ["[3-5][1-8]1", "[3-5][1-8]1[67]"], + "0$1", + ], + [, "(\\d{4})(\\d{3})", "$1 $2", ["909", "9090"], "0$1"], + [, "(\\d)(\\d{3})(\\d{3})(\\d{2})", "$1/$2 $3 $4", ["2"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[689]"], "0$1"], + [ + , + "(\\d{2})(\\d{3})(\\d{2})(\\d{2})", + "$1/$2 $3 $4", + ["[3-5]"], + "0$1", + ], + ], + [ + [, "(\\d)(\\d{2})(\\d{3,4})", "$1 $2 $3", ["21"], "0$1"], + [ + , + "(\\d{2})(\\d{2})(\\d{2,3})", + "$1 $2 $3", + ["[3-5][1-8]1", "[3-5][1-8]1[67]"], + "0$1", + ], + [, "(\\d)(\\d{3})(\\d{3})(\\d{2})", "$1/$2 $3 $4", ["2"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[689]"], "0$1"], + [ + , + "(\\d{2})(\\d{3})(\\d{2})(\\d{2})", + "$1/$2 $3 $4", + ["[3-5]"], + "0$1", + ], + ], + [, , "9090\\d{3}", , , , "9090123", , , [7]], + , + , + [ + , + , + "9090\\d{3}|(?:602|8(?:00|[5-9]\\d)|9(?:00|[78]\\d))\\d{6}", + , + , + , + , + , + , + [7, 9], + ], + [, , "96\\d{7}", , , , "961234567", , , [9]], + , + , + [, , , , , , , , , [-1]], + ], + SL: [ + , + [, , "(?:[237-9]\\d|66)\\d{6}", , , , , , , [8], [6]], + [, , "22[2-4][2-9]\\d{4}", , , , "22221234", , , , [6]], + [, , "(?:25|3[0-5]|66|7[1-9]|8[08]|9[09])\\d{6}", , , , "25123456"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "SL", + 232, + "00", + "0", + , + , + "0", + , + , + , + [[, "(\\d{2})(\\d{6})", "$1 $2", ["[236-9]"], "(0$1)"]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + SM: [ + , + [, , "(?:0549|[5-7]\\d)\\d{6}", , , , , , , [8, 10], [6]], + [, , "0549(?:8[0157-9]|9\\d)\\d{4}", , , , "0549886377", , , [10], [6]], + [, , "6[16]\\d{6}", , , , "66661212", , , [8]], + [, , , , , , , , , [-1]], + [, , "7[178]\\d{6}", , , , "71123456", , , [8]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "5[158]\\d{6}", , , , "58001110", , , [8]], + "SM", + 378, + "00", + , + , + , + "([89]\\d{5})$", + "0549$1", + , + , + [ + [, "(\\d{6})", "$1", ["[89]"]], + [, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-7]"]], + [, "(\\d{4})(\\d{6})", "$1 $2", ["0"]], + ], + [ + [, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-7]"]], + [, "(\\d{4})(\\d{6})", "$1 $2", ["0"]], + ], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + SN: [ + , + [, , "(?:[378]\\d|93)\\d{7}", , , , , , , [9]], + [ + , + , + "3(?:0(?:1[0-2]|80)|282|3(?:8[1-9]|9[3-9])|611)\\d{5}", + , + , + , + "301012345", + ], + [ + , + , + "7(?:(?:[06-8]\\d|[19]0|21)\\d|5(?:0[01]|[19]0|2[25]|3[356]|[4-7]\\d|8[35]))\\d{5}", + , + , + , + "701234567", + ], + [, , "800\\d{6}", , , , "800123456"], + [, , "88[4689]\\d{6}", , , , "884123456"], + [, , "81[02468]\\d{6}", , , , "810123456"], + [, , , , , , , , , [-1]], + [ + , + , + "(?:3(?:392|9[01]\\d)\\d|93(?:3[13]0|929))\\d{4}", + , + , + , + "933301234", + ], + "SN", + 221, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]], + [, "(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[379]"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + SO: [ + , + [ + , + , + "[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}", + , + , + , + , + , + , + [6, 7, 8, 9], + ], + [ + , + , + "(?:1\\d|2[0-79]|3[0-46-8]|4[0-7]|5[57-9])\\d{5}|(?:[134]\\d|8[125])\\d{4}", + , + , + , + "4012345", + , + , + [6, 7], + ], + [ + , + , + "(?:(?:15|(?:3[59]|4[89]|6\\d|7[679]|8[08])\\d|9(?:0\\d|[2-9]))\\d|2(?:4\\d|8))\\d{5}|(?:[67]\\d\\d|904)\\d{5}", + , + , + , + "71123456", + , + , + [7, 8, 9], + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "SO", + 252, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{2})(\\d{4})", "$1 $2", ["8[125]"]], + [, "(\\d{6})", "$1", ["[134]"]], + [, "(\\d)(\\d{6})", "$1 $2", ["[15]|2[0-79]|3[0-46-8]|4[0-7]"]], + [, "(\\d)(\\d{7})", "$1 $2", ["(?:2|90)4|[67]"]], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[348]|64|79|90"]], + [, "(\\d{2})(\\d{5,7})", "$1 $2", ["1|28|6[0-35-9]|7[67]|9[2-9]"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + SR: [ + , + [, , "(?:[2-5]|68|[78]\\d|90)\\d{5}", , , , , , , [6, 7]], + [, , "(?:2[1-3]|3[0-7]|(?:4|68)\\d|5[2-58])\\d{4}", , , , "211234"], + [, , "(?:7[124-7]|8[1-9])\\d{5}", , , , "7412345", , , [7]], + [, , "80\\d{5}", , , , "8012345", , , [7]], + [, , "90\\d{5}", , , , "9012345", , , [7]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "56\\d{4}", , , , "561234", , , [6]], + "SR", + 597, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{2})(\\d{2})(\\d{2})", "$1-$2-$3", ["56"]], + [, "(\\d{3})(\\d{3})", "$1-$2", ["[2-5]"]], + [, "(\\d{3})(\\d{4})", "$1-$2", ["[6-9]"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + SS: [ + , + [, , "[19]\\d{8}", , , , , , , [9]], + [, , "1[89]\\d{7}", , , , "181234567"], + [, , "(?:12|9[1257-9])\\d{7}", , , , "977123456"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "SS", + 211, + "00", + "0", + , + , + "0", + , + , + , + [[, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[19]"], "0$1"]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + ST: [ + , + [, , "(?:22|9\\d)\\d{5}", , , , , , , [7]], + [, , "22\\d{5}", , , , "2221234"], + [, , "900[5-9]\\d{3}|9(?:0[1-9]|[89]\\d)\\d{4}", , , , "9812345"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "ST", + 239, + "00", + , + , + , + , + , + , + , + [[, "(\\d{3})(\\d{4})", "$1 $2", ["[29]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + SV: [ + , + [ + , + , + "[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?", + , + , + , + , + , + , + [7, 8, 11], + ], + [ + , + , + "2(?:79(?:0[0347-9]|[1-9]\\d)|89(?:0[024589]|[1-9]\\d))\\d{3}|2(?:[1-69]\\d|[78][0-8])\\d{5}", + , + , + , + "21234567", + , + , + [8], + ], + [, , "[67]\\d{7}", , , , "70123456", , , [8]], + [, , "800\\d{8}|80[01]\\d{4}", , , , "8001234", , , [7, 11]], + [, , "900\\d{4}(?:\\d{4})?", , , , "9001234", , , [7, 11]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "SV", + 503, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{3})(\\d{4})", "$1 $2", ["[89]"]], + [, "(\\d{4})(\\d{4})", "$1 $2", ["[267]"]], + [, "(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["[89]"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + SX: [ + , + [, , "7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}", , , , , , , [10], [7]], + [ + , + , + "7215(?:4[2-8]|8[239]|9[056])\\d{4}", + , + , + , + "7215425678", + , + , + , + [7], + ], + [ + , + , + "7215(?:1[02]|2\\d|5[034679]|8[014-8])\\d{4}", + , + , + , + "7215205678", + , + , + , + [7], + ], + [, , "8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", , , , "8002123456"], + [, , "900[2-9]\\d{6}", , , , "9002123456"], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}", + , + , + , + "5002345678", + ], + [, , , , , , , , , [-1]], + "SX", + 1, + "011", + "1", + , + , + "(5\\d{6})$|1", + "721$1", + , + , + , + , + [, , , , , , , , , [-1]], + , + "721", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + SY: [ + , + [, , "[1-359]\\d{8}|[1-5]\\d{7}", , , , , , , [8, 9], [6, 7]], + [ + , + , + "21\\d{6,7}|(?:1(?:[14]\\d|[2356])|2[235]|3(?:[13]\\d|4)|4[134]|5[1-3])\\d{6}", + , + , + , + "112345678", + , + , + , + [6, 7], + ], + [, , "(?:50|9[1-9])\\d{7}", , , , "944567890", , , [9]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "SY", + 963, + "00", + "0", + , + , + "0", + , + , + , + [ + [ + , + "(\\d{2})(\\d{3})(\\d{3,4})", + "$1 $2 $3", + ["[1-4]|5[1-3]"], + "0$1", + , + 1, + ], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[59]"], "0$1", , 1], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + SZ: [ + , + [, , "0800\\d{4}|(?:[237]\\d|900)\\d{6}", , , , , , , [8, 9]], + [, , "[23][2-5]\\d{6}", , , , "22171234", , , [8]], + [, , "7[5-9]\\d{6}", , , , "76123456", , , [8]], + [, , "0800\\d{4}", , , , "08001234", , , [8]], + [, , "900\\d{6}", , , , "900012345", , , [9]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "70\\d{6}", , , , "70012345", , , [8]], + "SZ", + 268, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{4})(\\d{4})", "$1 $2", ["[0237]"]], + [, "(\\d{5})(\\d{4})", "$1 $2", ["9"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , "0800\\d{4}", , , , , , , [8]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + TA: [ + , + [, , "8\\d{3}", , , , , , , [4]], + [, , "8\\d{3}", , , , "8999"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "TA", + 290, + "00", + , + , + , + , + , + , + , + , + , + [, , , , , , , , , [-1]], + , + "8", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + TC: [ + , + [, , "(?:[58]\\d\\d|649|900)\\d{7}", , , , , , , [10], [7]], + [ + , + , + "649(?:266|712|9(?:4\\d|50))\\d{4}", + , + , + , + "6497121234", + , + , + , + [7], + ], + [ + , + , + "649(?:2(?:3[129]|4[1-79])|3\\d\\d|4[34][1-3])\\d{4}", + , + , + , + "6492311234", + , + , + , + [7], + ], + [, , "8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", , , , "8002345678"], + [, , "900[2-9]\\d{6}", , , , "9002345678"], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}", + , + , + , + "5002345678", + ], + [, , "649(?:71[01]|966)\\d{4}", , , , "6497101234", , , , [7]], + "TC", + 1, + "011", + "1", + , + , + "([2-479]\\d{6})$|1", + "649$1", + , + , + , + , + [, , , , , , , , , [-1]], + , + "649", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + TD: [ + , + [, , "(?:22|30|[689]\\d|77)\\d{6}", , , , , , , [8]], + [, , "22(?:[37-9]0|5[0-5]|6[89])\\d{4}", , , , "22501234"], + [, , "(?:30|[69]\\d|77|8[56])\\d{6}", , , , "63012345"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "TD", + 235, + "00|16", + , + , + , + , + , + "00", + , + [[, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[236-9]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + TG: [ + , + [, , "[279]\\d{7}", , , , , , , [8]], + [, , "2(?:2[2-7]|3[23]|4[45]|55|6[67]|77)\\d{5}", , , , "22212345"], + [, , "(?:7[0-29]|9[0-36-9])\\d{6}", , , , "90112345"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "TG", + 228, + "00", + , + , + , + , + , + , + , + [[, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[279]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + TH: [ + , + [ + , + , + "(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}", + , + , + , + , + , + , + [8, 9, 10, 13], + ], + [ + , + , + "(?:1[0689]|2\\d|3[2-9]|4[2-5]|5[2-6]|7[3-7])\\d{6}", + , + , + , + "21234567", + , + , + [8], + ], + [ + , + , + "67(?:1[0-8]|2[4-7])\\d{5}|(?:14|6[1-6]|[89]\\d)\\d{7}", + , + , + , + "812345678", + , + , + [9], + ], + [, , "(?:001800\\d|1800)\\d{6}", , , , "1800123456", , , [10, 13]], + [, , "1900\\d{6}", , , , "1900123456", , , [10]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "6[08]\\d{7}", , , , "601234567", , , [9]], + "TH", + 66, + "00[1-9]", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[13-9]"], "0$1"], + [, "(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + TJ: [ + , + [, , "[0-57-9]\\d{8}", , , , , , , [9], [3, 5, 6, 7]], + [ + , + , + "(?:3(?:1[3-5]|2[245]|3[12]|4[24-7]|5[25]|72)|4(?:46|74|87))\\d{6}", + , + , + , + "372123456", + , + , + , + [3, 5, 6, 7], + ], + [ + , + , + "(?:33[03-9]|4(?:1[18]|4[02-479])|81[1-9])\\d{6}|(?:[09]\\d|1[0-27-9]|2[0-27]|[34]0|5[05]|7[01578]|8[078])\\d{7}", + , + , + , + "917123456", + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "TJ", + 992, + "810", + , + , + , + , + , + "8~10", + , + [ + [, "(\\d{6})(\\d)(\\d{2})", "$1 $2 $3", ["331", "3317"]], + [, "(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["44[02-479]|[34]7"]], + [, "(\\d{4})(\\d)(\\d{4})", "$1 $2 $3", ["3(?:[1245]|3[12])"]], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[0-57-9]"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + TK: [ + , + [, , "[2-47]\\d{3,6}", , , , , , , [4, 5, 6, 7]], + [, , "(?:2[2-4]|[34]\\d)\\d{2,5}", , , , "3101"], + [, , "7[2-4]\\d{2,5}", , , , "7290"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "TK", + 690, + "00", + , + , + , + , + , + , + , + , + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + TL: [ + , + [, , "7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}", , , , , , , [7, 8]], + [, , "(?:2[1-5]|3[1-9]|4[1-4])\\d{5}", , , , "2112345", , , [7]], + [, , "7[2-8]\\d{6}", , , , "77212345", , , [8]], + [, , "80\\d{5}", , , , "8012345", , , [7]], + [, , "90\\d{5}", , , , "9012345", , , [7]], + [, , , , , , , , , [-1]], + [, , "70\\d{5}", , , , "7012345", , , [7]], + [, , , , , , , , , [-1]], + "TL", + 670, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{3})(\\d{4})", "$1 $2", ["[2-489]|70"]], + [, "(\\d{4})(\\d{4})", "$1 $2", ["7"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + TM: [ + , + [, , "(?:[1-6]\\d|71)\\d{6}", , , , , , , [8]], + [ + , + , + "(?:1(?:2\\d|3[1-9])|2(?:22|4[0-35-8])|3(?:22|4[03-9])|4(?:22|3[128]|4\\d|6[15])|5(?:22|5[7-9]|6[014-689]))\\d{5}", + , + , + , + "12345678", + ], + [, , "(?:6\\d|71)\\d{6}", , , , "66123456"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "TM", + 993, + "810", + "8", + , + , + "8", + , + "8~10", + , + [ + [ + , + "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", + "$1 $2-$3-$4", + ["12"], + "(8 $1)", + ], + [ + , + "(\\d{3})(\\d)(\\d{2})(\\d{2})", + "$1 $2-$3-$4", + ["[1-5]"], + "(8 $1)", + ], + [, "(\\d{2})(\\d{6})", "$1 $2", ["[67]"], "8 $1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + TN: [ + , + [, , "[2-57-9]\\d{7}", , , , , , , [8]], + [, , "81200\\d{3}|(?:3[0-2]|7\\d)\\d{6}", , , , "30010123"], + [ + , + , + "3(?:001|[12]40)\\d{4}|(?:(?:[259]\\d|4[0-8])\\d|3(?:1[1-35]|6[0-4]|91))\\d{5}", + , + , + , + "20123456", + ], + [, , "8010\\d{4}", , , , "80101234"], + [, , "88\\d{6}", , , , "88123456"], + [, , "8[12]10\\d{4}", , , , "81101234"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "TN", + 216, + "00", + , + , + , + , + , + , + , + [[, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-57-9]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + TO: [ + , + [ + , + , + "(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}", + , + , + , + , + , + , + [5, 7], + ], + [ + , + , + "(?:2\\d|3[0-8]|4[0-4]|50|6[09]|7[0-24-69]|8[05])\\d{3}", + , + , + , + "20123", + , + , + [5], + ], + [ + , + , + "(?:5(?:4[0-5]|5[4-6])|6(?:[09]\\d|3[02]|8[15-9])|(?:7\\d|8[46-9])\\d|999)\\d{4}", + , + , + , + "7715123", + , + , + [7], + ], + [, , "0800\\d{3}", , , , "0800222", , , [7]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "55[0-37-9]\\d{4}", , , , "5510123", , , [7]], + "TO", + 676, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{2})(\\d{3})", "$1-$2", ["[2-4]|50|6[09]|7[0-24-69]|8[05]"]], + [, "(\\d{4})(\\d{3})", "$1 $2", ["0"]], + [, "(\\d{3})(\\d{4})", "$1 $2", ["[5-9]"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + TR: [ + , + [ + , + , + "4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}", + , + , + , + , + , + , + [7, 10, 12, 13], + ], + [ + , + , + "(?:2(?:[13][26]|[28][2468]|[45][268]|[67][246])|3(?:[13][28]|[24-6][2468]|[78][02468]|92)|4(?:[16][246]|[23578][2468]|4[26]))\\d{7}", + , + , + , + "2123456789", + , + , + [10], + ], + [ + , + , + "561(?:011|61\\d)\\d{4}|5(?:0[15-7]|1[06]|24|[34]\\d|5[1-59]|9[46])\\d{7}", + , + , + , + "5012345678", + , + , + [10], + ], + [ + , + , + "8(?:00\\d{7}(?:\\d{2,3})?|11\\d{7})", + , + , + , + "8001234567", + , + , + [10, 12, 13], + ], + [, , "(?:8[89]8|900)\\d{7}", , , , "9001234567", , , [10]], + [, , , , , , , , , [-1]], + [, , "592(?:21[12]|461)\\d{4}", , , , "5922121234", , , [10]], + [, , "850\\d{7}", , , , "8500123456", , , [10]], + "TR", + 90, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{3})(\\d)(\\d{3})", "$1 $2 $3", ["444"], , , 1], + [ + , + "(\\d{3})(\\d{3})(\\d{4})", + "$1 $2 $3", + ["512|8[01589]|90"], + "0$1", + , + 1, + ], + [ + , + "(\\d{3})(\\d{3})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["5(?:[0-59]|61)", "5(?:[0-59]|61[06])", "5(?:[0-59]|61[06]1)"], + "0$1", + , + 1, + ], + [ + , + "(\\d{3})(\\d{3})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["[24][1-8]|3[1-9]"], + "(0$1)", + , + 1, + ], + [, "(\\d{3})(\\d{3})(\\d{6,7})", "$1 $2 $3", ["80"], "0$1", , 1], + ], + [ + [ + , + "(\\d{3})(\\d{3})(\\d{4})", + "$1 $2 $3", + ["512|8[01589]|90"], + "0$1", + , + 1, + ], + [ + , + "(\\d{3})(\\d{3})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["5(?:[0-59]|61)", "5(?:[0-59]|61[06])", "5(?:[0-59]|61[06]1)"], + "0$1", + , + 1, + ], + [ + , + "(\\d{3})(\\d{3})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["[24][1-8]|3[1-9]"], + "(0$1)", + , + 1, + ], + [, "(\\d{3})(\\d{3})(\\d{6,7})", "$1 $2 $3", ["80"], "0$1", , 1], + ], + [, , "512\\d{7}", , , , "5123456789", , , [10]], + , + , + [, , "(?:444|811\\d{3})\\d{4}", , , , , , , [7, 10]], + [, , "444\\d{4}", , , , "4441444", , , [7]], + , + , + [, , , , , , , , , [-1]], + ], + TT: [ + , + [, , "(?:[58]\\d\\d|900)\\d{7}", , , , , , , [10], [7]], + [ + , + , + "868(?:2(?:01|1[5-9]|[23]\\d|4[0-2])|6(?:0[7-9]|1[02-8]|2[1-9]|[3-69]\\d|7[0-79])|82[124])\\d{4}", + , + , + , + "8682211234", + , + , + , + [7], + ], + [ + , + , + "868(?:(?:2[5-9]|3\\d)\\d|4(?:3[0-6]|[6-9]\\d)|6(?:20|78|8\\d)|7(?:0[1-9]|1[02-9]|[2-9]\\d))\\d{4}", + , + , + , + "8682911234", + , + , + , + [7], + ], + [, , "8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", , , , "8002345678"], + [, , "900[2-9]\\d{6}", , , , "9002345678"], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}", + , + , + , + "5002345678", + ], + [, , , , , , , , , [-1]], + "TT", + 1, + "011", + "1", + , + , + "([2-46-8]\\d{6})$|1", + "868$1", + , + , + , + , + [, , , , , , , , , [-1]], + , + "868", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , "868619\\d{4}", , , , "8686191234", , , , [7]], + ], + TV: [ + , + [, , "(?:2|7\\d\\d|90)\\d{4}", , , , , , , [5, 6, 7]], + [, , "2[02-9]\\d{3}", , , , "20123", , , [5]], + [, , "(?:7[01]\\d|90)\\d{4}", , , , "901234", , , [6, 7]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "TV", + 688, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{2})(\\d{3})", "$1 $2", ["2"]], + [, "(\\d{2})(\\d{4})", "$1 $2", ["90"]], + [, "(\\d{2})(\\d{5})", "$1 $2", ["7"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + TW: [ + , + [ + , + , + "[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}", + , + , + , + , + , + , + [7, 8, 9, 10, 11], + ], + [ + , + , + "(?:2[2-8]\\d|370|55[01]|7[1-9])\\d{6}|4(?:(?:0(?:0[1-9]|[2-48]\\d)|1[023]\\d)\\d{4,5}|(?:[239]\\d\\d|4(?:0[56]|12|49))\\d{5})|6(?:[01]\\d{7}|4(?:0[56]|12|24|4[09])\\d{4,5})|8(?:(?:2(?:3\\d|4[0-269]|[578]0|66)|36[24-9]|90\\d\\d)\\d{4}|4(?:0[56]|12|24|4[09])\\d{4,5})|(?:2(?:2(?:0\\d\\d|4(?:0[68]|[249]0|3[0-467]|5[0-25-9]|6[0235689]))|(?:3(?:[09]\\d|1[0-4])|(?:4\\d|5[0-49]|6[0-29]|7[0-5])\\d)\\d)|(?:(?:3[2-9]|5[2-8]|6[0-35-79]|8[7-9])\\d\\d|4(?:2(?:[089]\\d|7[1-9])|(?:3[0-4]|[78]\\d|9[01])\\d))\\d)\\d{3}", + , + , + , + "221234567", + , + , + [8, 9], + ], + [, , "(?:40001[0-2]|9[0-8]\\d{4})\\d{3}", , , , "912345678", , , [9]], + [, , "80[0-79]\\d{6}|800\\d{5}", , , , "800123456", , , [8, 9]], + [, , "20(?:[013-9]\\d\\d|2)\\d{4}", , , , "203123456", , , [7, 9]], + [, , , , , , , , , [-1]], + [, , "99\\d{7}", , , , "990123456", , , [9]], + [ + , + , + "7010(?:[0-2679]\\d|3[0-7]|8[0-5])\\d{5}|70\\d{8}", + , + , + , + "7012345678", + , + , + [10, 11], + ], + "TW", + 886, + "0(?:0[25-79]|19)", + "0", + "#", + , + "0", + , + , + , + [ + [, "(\\d{2})(\\d)(\\d{4})", "$1 $2 $3", ["202"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[258]0"], "0$1"], + [ + , + "(\\d)(\\d{3,4})(\\d{4})", + "$1 $2 $3", + [ + "[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]", + "[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]", + ], + "0$1", + ], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[49]"], "0$1"], + [, "(\\d{2})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["7"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "50[0-46-9]\\d{6}", , , , "500123456", , , [9]], + , + , + [, , , , , , , , , [-1]], + ], + TZ: [ + , + [, , "(?:[25-8]\\d|41|90)\\d{7}", , , , , , , [9]], + [, , "2[2-8]\\d{7}", , , , "222345678"], + [, , "(?:6[125-9]|7[13-9])\\d{7}", , , , "621234567"], + [, , "80[08]\\d{6}", , , , "800123456"], + [, , "90\\d{7}", , , , "900123456"], + [, , "8(?:40|6[01])\\d{6}", , , , "840123456"], + [, , , , , , , , , [-1]], + [, , "41\\d{7}", , , , "412345678"], + "TZ", + 255, + "00[056]", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[24]"], "0$1"], + [, "(\\d{2})(\\d{7})", "$1 $2", ["5"]], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[67]"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , "(?:8(?:[04]0|6[01])|90\\d)\\d{6}"], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + UA: [ + , + [, , "[89]\\d{9}|[3-9]\\d{8}", , , , , , , [9, 10], [5, 6, 7]], + [ + , + , + "(?:3[1-8]|4[13-8]|5[1-7]|6[12459])\\d{7}", + , + , + , + "311234567", + , + , + [9], + [5, 6, 7], + ], + [ + , + , + "790\\d{6}|(?:39|50|6[36-8]|7[1-357]|9[1-9])\\d{7}", + , + , + , + "501234567", + , + , + [9], + ], + [, , "800[1-8]\\d{5,6}", , , , "800123456"], + [, , "900[239]\\d{5,6}", , , , "900212345"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "89[1-579]\\d{6}", , , , "891234567", , , [9]], + "UA", + 380, + "00", + "0", + , + , + "0", + , + "0~0", + , + [ + [ + , + "(\\d{3})(\\d{3})(\\d{3})", + "$1 $2 $3", + [ + "6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]", + "6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]", + ], + "0$1", + ], + [ + , + "(\\d{4})(\\d{5})", + "$1 $2", + [ + "3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])", + "3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])", + ], + "0$1", + ], + [ + , + "(\\d{2})(\\d{3})(\\d{4})", + "$1 $2 $3", + ["[3-7]|89|9[1-9]"], + "0$1", + ], + [, "(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[89]"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + UG: [ + , + [, , "800\\d{6}|(?:[29]0|[347]\\d)\\d{7}", , , , , , , [9], [5, 6, 7]], + [ + , + , + "20(?:(?:240|30[67])\\d|6(?:00[0-2]|30[0-4]))\\d{3}|(?:20(?:[017]\\d|2[5-9]|3[1-4]|5[0-4]|6[15-9])|[34]\\d{3})\\d{5}", + , + , + , + "312345678", + , + , + , + [5, 6, 7], + ], + [ + , + , + "72[48]0\\d{5}|7(?:[014-8]\\d|2[067]|36|9[0189])\\d{6}", + , + , + , + "712345678", + ], + [, , "800[1-3]\\d{5}", , , , "800123456"], + [, , "90[1-3]\\d{6}", , , , "901123456"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "UG", + 256, + "00[057]", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{4})(\\d{5})", "$1 $2", ["202", "2024"], "0$1"], + [, "(\\d{3})(\\d{6})", "$1 $2", ["[27-9]|4(?:6[45]|[7-9])"], "0$1"], + [, "(\\d{2})(\\d{7})", "$1 $2", ["[34]"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + US: [ + , + [, , "[2-9]\\d{9}|3\\d{6}", , , , , , , [10], [7]], + [ + , + , + "(?:3052(?:0[0-8]|[1-9]\\d)|5056(?:[0-35-9]\\d|4[0-68]))\\d{4}|(?:2742|305[3-9]|(?:472|983)[2-47-9]|505[2-57-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[0135-79]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}", + , + , + , + "2015550123", + , + , + , + [7], + ], + [ + , + , + "(?:3052(?:0[0-8]|[1-9]\\d)|5056(?:[0-35-9]\\d|4[0-68]))\\d{4}|(?:2742|305[3-9]|(?:472|983)[2-47-9]|505[2-57-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[0135-79]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}", + , + , + , + "2015550123", + , + , + , + [7], + ], + [, , "8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", , , , "8002345678"], + [, , "900[2-9]\\d{6}", , , , "9002345678"], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}", + , + , + , + "5002345678", + ], + [, , "305209\\d{4}", , , , "3052090123", , , , [7]], + "US", + 1, + "011", + "1", + , + , + "1", + , + , + 1, + [ + [, "(\\d{3})(\\d{4})", "$1-$2", ["310"], , , 1], + [, "(\\d{3})(\\d{4})", "$1-$2", ["[24-9]|3(?:[02-9]|1[1-9])"]], + [, "(\\d{3})(\\d{3})(\\d{4})", "($1) $2-$3", ["[2-9]"], , , 1], + ], + [ + [, "(\\d{3})(\\d{4})", "$1-$2", ["310"], , , 1], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["[2-9]"]], + ], + [, , , , , , , , , [-1]], + 1, + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + UY: [ + , + [ + , + , + "0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}", + , + , + , + , + , + , + [6, 7, 8, 9, 10, 11, 12, 13], + ], + [ + , + , + "(?:1(?:770|9(?:20|[89]7))|(?:2\\d|4[2-7])\\d\\d)\\d{4}", + , + , + , + "21231234", + , + , + [8], + [7], + ], + [, , "9[1-9]\\d{6}", , , , "94231234", , , [8]], + [, , "0004\\d{2,9}|(?:405|80[05])\\d{4}", , , , "8001234"], + [, , "90[0-8]\\d{4}", , , , "9001234", , , [7]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "UY", + 598, + "0(?:0|1[3-9]\\d)", + "0", + " int. ", + , + "0", + , + "00", + , + [ + [, "(\\d{3})(\\d{3,4})", "$1 $2", ["0"]], + [, "(\\d{3})(\\d{4})", "$1 $2", ["[49]0|8"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1"], + [, "(\\d{4})(\\d{4})", "$1 $2", ["[124]"]], + [, "(\\d{3})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["0"]], + [, "(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})", "$1 $2 $3 $4", ["0"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + UZ: [ + , + [, , "(?:20|33|[5-9]\\d)\\d{7}", , , , , , , [9]], + [ + , + , + "(?:55\\d\\d|6(?:1(?:22|3[124]|4[1-4]|5[1-3578]|64)|2(?:22|3[0-57-9]|41)|5(?:22|3[3-7]|5[024-8])|[69]\\d\\d|7(?:[23]\\d|7[69]))|7(?:0(?:5[4-9]|6[0146]|7[124-6]|9[135-8])|[168]\\d\\d|2(?:22|3[13-57-9]|4[1-3579]|5[14])|3(?:2\\d|3[1578]|4[1-35-7]|5[1-57]|61)|4(?:2\\d|3[1-579]|7[1-79])|5(?:22|5[1-9]|6[1457])|9(?:22|5[1-9])))\\d{5}", + , + , + , + "669050123", + ], + [ + , + , + "(?:(?:[25]0|33|8[78]|9[0-57-9])\\d{3}|6(?:1(?:2(?:2[01]|98)|35[0-4]|50\\d|61[23]|7(?:[01][017]|4\\d|55|9[5-9]))|2(?:(?:11|7\\d)\\d|2(?:[12]1|9[01379])|5(?:[126]\\d|3[0-4]))|5(?:19[01]|2(?:27|9[26])|(?:30|59|7\\d)\\d)|6(?:2(?:1[5-9]|2[0367]|38|41|52|60)|(?:3[79]|9[0-3])\\d|4(?:56|83)|7(?:[07]\\d|1[017]|3[07]|4[047]|5[057]|67|8[0178]|9[79]))|7(?:2(?:24|3[237]|4[5-9]|7[15-8])|5(?:7[12]|8[0589])|7(?:0\\d|[39][07])|9(?:0\\d|7[079])))|7(?:[07]\\d{3}|2(?:2(?:2[79]|95)|3(?:2[5-9]|6[0-6])|57\\d|7(?:0\\d|1[17]|2[27]|3[37]|44|5[057]|66|88))|3(?:2(?:1[0-6]|21|3[469]|7[159])|(?:33|9[4-6])\\d|5(?:0[0-4]|5[579]|9\\d)|7(?:[0-3579]\\d|4[0467]|6[67]|8[078]))|4(?:2(?:29|5[0257]|6[0-7]|7[1-57])|5(?:1[0-4]|8\\d|9[5-9])|7(?:0\\d|1[024589]|2[0-27]|3[0137]|[46][07]|5[01]|7[5-9]|9[079])|9(?:7[015-9]|[89]\\d))|5(?:112|2(?:0\\d|2[29]|[49]4)|3[1568]\\d|52[6-9]|7(?:0[01578]|1[017]|[23]7|4[047]|[5-7]\\d|8[78]|9[079]))|9(?:22[128]|3(?:2[0-4]|7\\d)|57[02569]|7(?:2[05-9]|3[37]|4\\d|60|7[2579]|87|9[07]))))\\d{4}", + , + , + , + "912345678", + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "UZ", + 998, + "00", + , + , + , + , + , + , + , + [[, "(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[235-9]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + VA: [ + , + [ + , + , + "0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}", + , + , + , + , + , + , + [6, 7, 8, 9, 10, 11, 12], + ], + [, , "06698\\d{1,6}", , , , "0669812345", , , [6, 7, 8, 9, 10, 11]], + [, , "3[1-9]\\d{8}|3[2-9]\\d{7}", , , , "3123456789", , , [9, 10]], + [, , "80(?:0\\d{3}|3)\\d{3}", , , , "800123456", , , [6, 9]], + [ + , + , + "(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}", + , + , + , + "899123456", + , + , + [6, 8, 9, 10], + ], + [, , "84(?:[08]\\d{3}|[17])\\d{3}", , , , "848123456", , , [6, 9]], + [, , "1(?:78\\d|99)\\d{6}", , , , "1781234567", , , [9, 10]], + [, , "55\\d{8}", , , , "5512345678", , , [10]], + "VA", + 39, + "00", + , + , + , + , + , + , + , + , + , + [, , , , , , , , , [-1]], + , + "06698", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , "3[2-8]\\d{9,10}", , , , "33101234501", , , [11, 12]], + ], + VC: [ + , + [, , "(?:[58]\\d\\d|784|900)\\d{7}", , , , , , , [10], [7]], + [ + , + , + "784(?:266|3(?:6[6-9]|7\\d|8[0-6])|4(?:38|5[0-36-8]|8[0-8])|5(?:55|7[0-2]|93)|638|784)\\d{4}", + , + , + , + "7842661234", + , + , + , + [7], + ], + [ + , + , + "784(?:4(?:3[0-5]|5[45]|89|9[0-8])|5(?:2[6-9]|3[0-4])|720)\\d{4}", + , + , + , + "7844301234", + , + , + , + [7], + ], + [, , "8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", , , , "8002345678"], + [, , "900[2-9]\\d{6}", , , , "9002345678"], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}", + , + , + , + "5002345678", + ], + [, , "78451[0-2]\\d{4}", , , , "7845101234", , , , [7]], + "VC", + 1, + "011", + "1", + , + , + "([2-7]\\d{6})$|1", + "784$1", + , + , + , + , + [, , , , , , , , , [-1]], + , + "784", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + VE: [ + , + [, , "[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}", , , , , , , [10], [7]], + [ + , + , + "(?:2(?:12|3[457-9]|[467]\\d|[58][1-9]|9[1-6])|[4-6]00)\\d{7}", + , + , + , + "2121234567", + , + , + , + [7], + ], + [, , "4(?:1[24-8]|2[246])\\d{7}", , , , "4121234567"], + [, , "800\\d{7}", , , , "8001234567"], + [, , "90[01]\\d{7}", , , , "9001234567"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "VE", + 58, + "00", + "0", + , + , + "0", + , + , + , + [[, "(\\d{3})(\\d{7})", "$1-$2", ["[24-689]"], "0$1", "$CC $1"]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "501\\d{7}", , , , "5010123456", , , , [7]], + , + , + [, , , , , , , , , [-1]], + ], + VG: [ + , + [, , "(?:284|[58]\\d\\d|900)\\d{7}", , , , , , , [10], [7]], + [ + , + , + "284(?:229|4(?:22|9[45])|774|8(?:52|6[459]))\\d{4}", + , + , + , + "2842291234", + , + , + , + [7], + ], + [ + , + , + "284(?:245|3(?:0[0-3]|4[0-7]|68|9[34])|4(?:4[0-6]|68|9[69])|5(?:4[0-7]|68|9[69]))\\d{4}", + , + , + , + "2843001234", + , + , + , + [7], + ], + [, , "8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", , , , "8002345678"], + [, , "900[2-9]\\d{6}", , , , "9002345678"], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}", + , + , + , + "5002345678", + ], + [, , , , , , , , , [-1]], + "VG", + 1, + "011", + "1", + , + , + "([2-578]\\d{6})$|1", + "284$1", + , + , + , + , + [, , , , , , , , , [-1]], + , + "284", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + VI: [ + , + [, , "[58]\\d{9}|(?:34|90)0\\d{7}", , , , , , , [10], [7]], + [ + , + , + "340(?:2(?:0\\d|10|2[06-8]|4[49]|77)|3(?:32|44)|4(?:2[23]|44|7[34]|89)|5(?:1[34]|55)|6(?:2[56]|4[23]|77|9[023])|7(?:1[2-57-9]|2[57]|7\\d)|884|998)\\d{4}", + , + , + , + "3406421234", + , + , + , + [7], + ], + [ + , + , + "340(?:2(?:0\\d|10|2[06-8]|4[49]|77)|3(?:32|44)|4(?:2[23]|44|7[34]|89)|5(?:1[34]|55)|6(?:2[56]|4[23]|77|9[023])|7(?:1[2-57-9]|2[57]|7\\d)|884|998)\\d{4}", + , + , + , + "3406421234", + , + , + , + [7], + ], + [, , "8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", , , , "8002345678"], + [, , "900[2-9]\\d{6}", , , , "9002345678"], + [, , , , , , , , , [-1]], + [ + , + , + "52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}", + , + , + , + "5002345678", + ], + [, , , , , , , , , [-1]], + "VI", + 1, + "011", + "1", + , + , + "([2-9]\\d{6})$|1", + "340$1", + , + 1, + , + , + [, , , , , , , , , [-1]], + , + "340", + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + VN: [ + , + [ + , + , + "[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}", + , + , + , + , + , + , + [7, 8, 9, 10], + ], + [ + , + , + "2(?:0[3-9]|1[0-689]|2[0-25-9]|[38][2-9]|4[2-8]|5[124-9]|6[0-39]|7[0-7]|9[0-4679])\\d{7}", + , + , + , + "2101234567", + , + , + [10], + ], + [ + , + , + "(?:5(?:2[238]|59)|89[6-9]|99[013-9])\\d{6}|(?:3\\d|5[1689]|7[06-9]|8[1-8]|9[0-8])\\d{7}", + , + , + , + "912345678", + , + , + [9], + ], + [ + , + , + "1800\\d{4,6}|12(?:0[13]|28)\\d{4}", + , + , + , + "1800123456", + , + , + [8, 9, 10], + ], + [, , "1900\\d{4,6}", , , , "1900123456", , , [8, 9, 10]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "672\\d{6}", , , , "672012345", , , [9]], + "VN", + 84, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{3})(\\d{4})", "$1 $2", ["[17]99"], "0$1", , 1], + [, "(\\d{2})(\\d{5})", "$1 $2", ["80"], "0$1", , 1], + [, "(\\d{3})(\\d{4,5})", "$1 $2", ["69"], "0$1", , 1], + [, "(\\d{4})(\\d{4,6})", "$1 $2", ["1"], , , 1], + [ + , + "(\\d{2})(\\d{3})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["6"], + "0$1", + , + 1, + ], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[357-9]"], "0$1", , 1], + [, "(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["2[48]"], "0$1", , 1], + [, "(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["2"], "0$1", , 1], + ], + [ + [, "(\\d{2})(\\d{5})", "$1 $2", ["80"], "0$1", , 1], + [, "(\\d{4})(\\d{4,6})", "$1 $2", ["1"], , , 1], + [ + , + "(\\d{2})(\\d{3})(\\d{2})(\\d{2})", + "$1 $2 $3 $4", + ["6"], + "0$1", + , + 1, + ], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[357-9]"], "0$1", , 1], + [, "(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["2[48]"], "0$1", , 1], + [, "(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["2"], "0$1", , 1], + ], + [, , , , , , , , , [-1]], + , + , + [, , "[17]99\\d{4}|69\\d{5,6}", , , , , , , [7, 8]], + [, , "(?:[17]99|80\\d)\\d{4}|69\\d{5,6}", , , , "1992000", , , [7, 8]], + , + , + [, , , , , , , , , [-1]], + ], + VU: [ + , + [, , "[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}", , , , , , , [5, 7]], + [ + , + , + "(?:38[0-8]|48[4-9])\\d\\d|(?:2[02-9]|3[4-7]|88)\\d{3}", + , + , + , + "22123", + , + , + [5], + ], + [, , "(?:[58]\\d|7[013-7])\\d{5}", , , , "5912345", , , [7]], + [, , "81[18]\\d\\d", , , , "81123", , , [5]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "9(?:0[1-9]|1[01])\\d{4}", , , , "9010123", , , [7]], + "VU", + 678, + "00", + , + , + , + , + , + , + , + [[, "(\\d{3})(\\d{4})", "$1 $2", ["[57-9]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "(?:3[03]|900\\d)\\d{3}", , , , "30123"], + , + , + [, , , , , , , , , [-1]], + ], + WF: [ + , + [, , "(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}", , , , , , , [6, 9]], + [, , "72\\d{4}", , , , "721234", , , [6]], + [, , "(?:72|8[23])\\d{4}", , , , "821234", , , [6]], + [, , "80[0-5]\\d{6}", , , , "800012345", , , [9]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "9[23]\\d{4}", , , , "921234", , , [6]], + "WF", + 681, + "00", + , + , + , + , + , + , + , + [ + [, "(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["[47-9]"]], + [, "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , "[48]0\\d{4}", , , , "401234", , , [6]], + ], + WS: [ + , + [ + , + , + "(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}", + , + , + , + , + , + , + [5, 6, 7, 10], + ], + [, , "6[1-9]\\d{3}|(?:[2-5]|60)\\d{4}", , , , "22123", , , [5, 6]], + [ + , + , + "(?:7[1-35-8]|8(?:[3-7]|9\\d{3}))\\d{5}", + , + , + , + "7212345", + , + , + [7, 10], + ], + [, , "800\\d{3}", , , , "800123", , , [6]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "WS", + 685, + "0", + , + , + , + , + , + , + , + [ + [, "(\\d{5})", "$1", ["[2-5]|6[1-9]"]], + [, "(\\d{3})(\\d{3,7})", "$1 $2", ["[68]"]], + [, "(\\d{2})(\\d{5})", "$1 $2", ["7"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + XK: [ + , + [ + , + , + "2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}", + , + , + , + , + , + , + [8, 9, 10, 11, 12], + ], + [ + , + , + "38\\d{6,10}|(?:2[89]|39)(?:0\\d{5,6}|[1-9]\\d{5})", + , + , + , + "28012345", + ], + [, , "4[3-9]\\d{6}", , , , "43201234", , , [8]], + [, , "800\\d{5}", , , , "80001234", , , [8]], + [, , "900\\d{5}", , , , "90001234", , , [8]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "XK", + 383, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{3})(\\d{5})", "$1 $2", ["[89]"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-4]"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2|39"], "0$1"], + [, "(\\d{2})(\\d{7,10})", "$1 $2", ["3"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + YE: [ + , + [, , "(?:1|7\\d)\\d{7}|[1-7]\\d{6}", , , , , , , [7, 8, 9], [6]], + [ + , + , + "78[0-7]\\d{4}|17\\d{6}|(?:[12][2-68]|3[2358]|4[2-58]|5[2-6]|6[3-58]|7[24-6])\\d{5}", + , + , + , + "1234567", + , + , + [7, 8], + [6], + ], + [, , "7[01378]\\d{7}", , , , "712345678", , , [9]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "YE", + 967, + "00", + "0", + , + , + "0", + , + , + , + [ + [ + , + "(\\d)(\\d{3})(\\d{3,4})", + "$1 $2 $3", + ["[1-6]|7(?:[24-6]|8[0-7])"], + "0$1", + ], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["7"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + YT: [ + , + [, , "7093\\d{5}|(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}", , , , , , , [9]], + [, , "269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}", , , , "269601234"], + [ + , + , + "(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}", + , + , + , + "639012345", + ], + [, , "80\\d{7}", , , , "801234567"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "9(?:(?:39|47)8[01]|769\\d)\\d{4}", , , , "939801234"], + "YT", + 262, + "00", + "0", + , + , + "0", + , + , + , + , + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + ZA: [ + , + [, , "[1-79]\\d{8}|8\\d{4,9}", , , , , , , [5, 6, 7, 8, 9, 10]], + [ + , + , + "(?:2(?:0330|4302)|52087)0\\d{3}|(?:1[0-8]|2[1-378]|3[1-69]|4\\d|5[1346-8])\\d{7}", + , + , + , + "101234567", + , + , + [9], + ], + [ + , + , + "(?:1(?:3492[0-25]|4495[0235]|549(?:20|5[01]))|4[34]492[01])\\d{3}|8[1-4]\\d{3,7}|(?:2[27]|47|54)4950\\d{3}|(?:1(?:049[2-4]|9[12]\\d\\d)|(?:50[0-2]|6\\d\\d|7(?:[0-46-9]\\d|5[0-4]))\\d\\d|8(?:5\\d{3}|7(?:08[67]|158|28[5-9]|310)))\\d{4}|(?:1[6-8]|28|3[2-69]|4[025689]|5[36-8])4920\\d{3}|(?:12|[2-5]1)492\\d{4}", + , + , + , + "711234567", + , + , + [5, 6, 7, 8, 9], + ], + [, , "80\\d{7}", , , , "801234567", , , [9]], + [, , "(?:86[2-9]|9[0-2]\\d)\\d{6}", , , , "862345678", , , [9]], + [, , "860\\d{6}", , , , "860123456", , , [9]], + [, , , , , , , , , [-1]], + [ + , + , + "87(?:08[0-589]|15[0-79]|28[0-4]|31[1-9])\\d{4}|87(?:[02][0-79]|1[0-46-9]|3[02-9]|[4-9]\\d)\\d{5}", + , + , + , + "871234567", + , + , + [9], + ], + "ZA", + 27, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{2})(\\d{3,4})", "$1 $2", ["8[1-4]"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{2,3})", "$1 $2 $3", ["8[1-4]"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["860"], "0$1"], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-9]"], "0$1"], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "861\\d{6,7}", , , , "861123456", , , [9, 10]], + , + , + [, , , , , , , , , [-1]], + ], + ZM: [ + , + [, , "800\\d{6}|(?:21|[579]\\d|63)\\d{7}", , , , , , , [9], [6]], + [, , "21[1-8]\\d{6}", , , , "211234567", , , , [6]], + [, , "(?:[59][5-8]|7[5-9])\\d{7}", , , , "955123456"], + [, , "800\\d{6}", , , , "800123456"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "63\\d{7}", , , , "630123456"], + "ZM", + 260, + "00", + "0", + , + , + "0", + , + , + , + [ + [, "(\\d{3})(\\d{3})", "$1 $2", ["[1-9]"]], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[28]"], "0$1"], + [, "(\\d{2})(\\d{7})", "$1 $2", ["[579]"], "0$1"], + ], + [ + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[28]"], "0$1"], + [, "(\\d{2})(\\d{7})", "$1 $2", ["[579]"], "0$1"], + ], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + ZW: [ + , + [ + , + , + "2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}", + , + , + , + , + , + , + [5, 6, 7, 8, 9, 10], + [3, 4], + ], + [ + , + , + "(?:1(?:(?:3\\d|9)\\d|[4-8])|2(?:(?:(?:0(?:2[014]|5)|(?:2[0157]|31|84|9)\\d\\d|[56](?:[14]\\d\\d|20)|7(?:[089]|2[03]|[35]\\d\\d))\\d|4(?:2\\d\\d|8))\\d|1(?:2|[39]\\d{4}))|3(?:(?:123|(?:29\\d|92)\\d)\\d\\d|7(?:[19]|[56]\\d))|5(?:0|1[2-478]|26|[37]2|4(?:2\\d{3}|83)|5(?:25\\d\\d|[78])|[689]\\d)|6(?:(?:[16-8]21|28|52[013])\\d\\d|[39])|8(?:[1349]28|523)\\d\\d)\\d{3}|(?:4\\d\\d|9[2-9])\\d{4,5}|(?:(?:2(?:(?:(?:0|8[146])\\d|7[1-7])\\d|2(?:[278]\\d|92)|58(?:2\\d|3))|3(?:[26]|9\\d{3})|5(?:4\\d|5)\\d\\d)\\d|6(?:(?:(?:[0-246]|[78]\\d)\\d|37)\\d|5[2-8]))\\d\\d|(?:2(?:[569]\\d|8[2-57-9])|3(?:[013-59]\\d|8[37])|6[89]8)\\d{3}", + , + , + , + "1312345", + , + , + , + [3, 4], + ], + [, , "7(?:[1278]\\d|3[1-9])\\d{6}", , , , "712345678", , , [9]], + [, , "80(?:[01]\\d|20|8[0-8])\\d{3}", , , , "8001234", , , [7]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [ + , + , + "86(?:1[12]|22|30|44|55|77|8[368])\\d{6}", + , + , + , + "8686123456", + , + , + [10], + ], + "ZW", + 263, + "00", + "0", + , + , + "0", + , + , + , + [ + [ + , + "(\\d{3})(\\d{3,5})", + "$1 $2", + [ + "2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]", + ], + "0$1", + ], + [, "(\\d)(\\d{3})(\\d{2,4})", "$1 $2 $3", ["[49]"], "0$1"], + [, "(\\d{3})(\\d{4})", "$1 $2", ["80"], "0$1"], + [ + , + "(\\d{2})(\\d{7})", + "$1 $2", + [ + "24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2", + "2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]", + ], + "(0$1)", + ], + [, "(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], + [ + , + "(\\d{3})(\\d{3})(\\d{3,4})", + "$1 $2 $3", + [ + "2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)", + "2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)", + ], + "0$1", + ], + [, "(\\d{4})(\\d{6})", "$1 $2", ["8"], "0$1"], + [ + , + "(\\d{2})(\\d{3,5})", + "$1 $2", + [ + "1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]", + ], + "0$1", + ], + [ + , + "(\\d{2})(\\d{3})(\\d{3,4})", + "$1 $2 $3", + ["29[013-9]|39|54"], + "0$1", + ], + [, "(\\d{4})(\\d{3,5})", "$1 $2", ["(?:25|54)8", "258|5483"], "0$1"], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + 800: [ + , + [, , "(?:00|[1-9]\\d)\\d{6}", , , , , , , [8]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "(?:00|[1-9]\\d)\\d{6}", , , , "12345678"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "001", + 800, + , + , + , + , + , + , + , + 1, + [[, "(\\d{4})(\\d{4})", "$1 $2", ["\\d"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + 808: [ + , + [, , "[1-9]\\d{7}", , , , , , , [8]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "[1-9]\\d{7}", , , , "12345678"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "001", + 808, + , + , + , + , + , + , + , + 1, + [[, "(\\d{4})(\\d{4})", "$1 $2", ["[1-9]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + 870: [ + , + [, , "7\\d{11}|[235-7]\\d{8}", , , , , , , [9, 12]], + [, , , , , , , , , [-1]], + [, , "(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}", , , , "301234567"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "2\\d{8}", , , , "201234567", , , [9]], + "001", + 870, + , + , + , + , + , + , + , + , + [[, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[235-7]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + 878: [ + , + [, , "10\\d{10}", , , , , , , [12]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "10\\d{10}", , , , "101234567890"], + "001", + 878, + , + , + , + , + , + , + , + 1, + [[, "(\\d{2})(\\d{5})(\\d{5})", "$1 $2 $3", ["1"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + 881: [ + , + [, , "6\\d{9}|[0-36-9]\\d{8}", , , , , , , [9, 10]], + [, , , , , , , , , [-1]], + [, , "6\\d{9}|[0-36-9]\\d{8}", , , , "612345678"], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "001", + 881, + , + , + , + , + , + , + , + , + [ + [, "(\\d)(\\d{3})(\\d{5})", "$1 $2 $3", ["[0-37-9]"]], + [, "(\\d)(\\d{3})(\\d{5,6})", "$1 $2 $3", ["6"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + 882: [ + , + [ + , + , + "[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?", + , + , + , + , + , + , + [7, 8, 9, 10, 11, 12], + ], + [, , , , , , , , , [-1]], + [ + , + , + "342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}", + , + , + , + "3421234", + , + , + [7, 8, 9, 10, 12], + ], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [ + , + , + "1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}", + , + , + , + "390123456789", + ], + "001", + 882, + , + , + , + , + , + , + , + , + [ + [, "(\\d{2})(\\d{5})", "$1 $2", ["16|342"]], + [, "(\\d{2})(\\d{6})", "$1 $2", ["49"]], + [, "(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["1[36]|9"]], + [, "(\\d{2})(\\d{4})(\\d{3})", "$1 $2 $3", ["3[23]"]], + [, "(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["16"]], + [ + , + "(\\d{2})(\\d{4})(\\d{4})", + "$1 $2 $3", + ["10|23|3(?:[15]|4[57])|4|51"], + ], + [, "(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["34"]], + [, "(\\d{2})(\\d{4,5})(\\d{5})", "$1 $2 $3", ["[1-35]"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , "348[57]\\d{7}", , , , "34851234567", , , [11]], + ], + 883: [ + , + [, , "(?:[1-4]\\d|51)\\d{6,10}", , , , , , , [8, 9, 10, 11, 12]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [ + , + , + "(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}", + , + , + , + "510012345", + ], + "001", + 883, + , + , + , + , + , + , + , + 1, + [ + [ + , + "(\\d{3})(\\d{3})(\\d{2,8})", + "$1 $2 $3", + ["[14]|2[24-689]|3[02-689]|51[24-9]"], + ], + [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["510"]], + [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["21"]], + [, "(\\d{4})(\\d{4})(\\d{4})", "$1 $2 $3", ["51[13]"]], + [, "(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["[235]"]], + ], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + 888: [ + , + [, , "\\d{11}", , , , , , , [11]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "001", + 888, + , + , + , + , + , + , + , + 1, + [[, "(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3"]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , "\\d{11}", , , , "12345678901"], + , + , + [, , , , , , , , , [-1]], + ], + 979: [ + , + [, , "[1359]\\d{8}", , , , , , , [9], [8]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , "[1359]\\d{8}", , , , "123456789", , , , [8]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + "001", + 979, + , + , + , + , + , + , + , + 1, + [[, "(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[1359]"]]], + , + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + [, , , , , , , , , [-1]], + , + , + [, , , , , , , , , [-1]], + ], + }; + function p() { + this.g = {}; + } + (p.h = void 0), + (p.g = function () { + return p.h ? p.h : (p.h = new p()); + }); + var X = { + 0: "0", + 1: "1", + 2: "2", + 3: "3", + 4: "4", + 5: "5", + 6: "6", + 7: "7", + 8: "8", + 9: "9", + "0": "0", + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7", + "8": "8", + "9": "9", + "٠": "0", + "١": "1", + "٢": "2", + "٣": "3", + "٤": "4", + "٥": "5", + "٦": "6", + "٧": "7", + "٨": "8", + "٩": "9", + "۰": "0", + "۱": "1", + "۲": "2", + "۳": "3", + "۴": "4", + "۵": "5", + "۶": "6", + "۷": "7", + "۸": "8", + "۹": "9", + }, + $2 = { + 0: "0", + 1: "1", + 2: "2", + 3: "3", + 4: "4", + 5: "5", + 6: "6", + 7: "7", + 8: "8", + 9: "9", + "+": "+", + "*": "*", + "#": "#", + }, + t2 = { + 0: "0", + 1: "1", + 2: "2", + 3: "3", + 4: "4", + 5: "5", + 6: "6", + 7: "7", + 8: "8", + 9: "9", + "0": "0", + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7", + "8": "8", + "9": "9", + "٠": "0", + "١": "1", + "٢": "2", + "٣": "3", + "٤": "4", + "٥": "5", + "٦": "6", + "٧": "7", + "٨": "8", + "٩": "9", + "۰": "0", + "۱": "1", + "۲": "2", + "۳": "3", + "۴": "4", + "۵": "5", + "۶": "6", + "۷": "7", + "۸": "8", + "۹": "9", + A: "2", + B: "2", + C: "2", + D: "3", + E: "3", + F: "3", + G: "4", + H: "4", + I: "4", + J: "5", + K: "5", + L: "5", + M: "6", + N: "6", + O: "6", + P: "7", + Q: "7", + R: "7", + S: "7", + T: "8", + U: "8", + V: "8", + W: "9", + X: "9", + Y: "9", + Z: "9", + }, + e2 = RegExp("[++]+"), + O = RegExp("^[++]+"), + g1 = RegExp("([0-90-9٠-٩۰-۹])"), + n2 = RegExp("[++0-90-9٠-٩۰-۹]"), + r2 = /[\\\/] *x/, + u2 = RegExp("[^0-90-9٠-٩۰-۹A-Za-z#]+$"), + i2 = /(?:.*?[A-Za-z]){3}.*/, + f2 = RegExp( + "^\\+([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*[0-90-9٠-٩۰-۹]([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*$" + ), + o2 = RegExp( + "^([A-Za-z0-90-9٠-٩۰-۹]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.)*[A-Za-z]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.?$" + ); + function L(d) { + return "([0-90-9٠-٩۰-۹]{1," + d + "})"; + } + function h1() { + return ( + ";ext=" + + L("20") + + "|[  \\t,]*(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)[:\\..]?[  \\t,-]*" + + (L("20") + "#?|[  \\t,]*(?:[xx##~~]|int|int)[:\\..]?[  \\t,-]*") + + (L("9") + "#?|[- ]+") + + (L("6") + "#|[  \\t]*(?:,{2}|;)[:\\..]?[  \\t,-]*") + + (L("15") + "#?|[  \\t]*(?:,)+[:\\..]?[  \\t,-]*") + + (L("9") + "#?") + ); + } + var c1 = new RegExp("(?:" + h1() + ")$", "i"), + l2 = new RegExp( + "^[0-90-9٠-٩۰-۹]{2}$|^[++]*(?:[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~*]*[0-90-9٠-٩۰-۹]){3,}[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~*A-Za-z0-90-9٠-٩۰-۹]*(?:" + + h1() + + ")?$", + "i" + ), + s2 = /(\$\d)/, + g2 = /^\(?\$1\)?$/; + function p1(d) { + return 2 > d.length ? !1 : y(l2, d); + } + function a1(d) { + return y(i2, d) ? V(d, t2) : V(d, X); + } + function C1(d) { + var $ = a1(d.toString()); + S(d), d.g($); + } + function m1(d) { + return d != null && (I(d, 9) != 1 || a(d, 9)[0] != -1); + } + function V(d, $) { + for (var t = new h(), e, n = d.length, r = 0; r < n; ++r) + (e = d.charAt(r)), (e = $[e.toUpperCase()]), e != null && t.g(e); + return t.toString(); + } + function S1(d) { + return d.length == 0 || g2.test(d); + } + function Z(d) { + return d != null && isNaN(d) && d.toUpperCase() in s1; + } + p.prototype.format = function (d, $) { + if (f(d, 2) == 0 && m(d, 5)) { + var t = l(d, 5); + if (0 < t.length) return t; + } + t = l(d, 1); + var e = P(d); + if ($ == 0) return E1(t, 0, e, ""); + if (!(t in w)) return e; + var n = x(this, t, U(t)); + d = + m(d, 3) && f(d, 3).length != 0 + ? $ == 3 + ? ";ext=" + f(d, 3) + : m(n, 13) + ? f(n, 13) + l(d, 3) + : " ext. " + l(d, 3) + : ""; + d: { + n = a(n, 20).length == 0 || $ == 2 ? a(n, 19) : a(n, 20); + for (var r, u = n.length, i = 0; i < u; ++i) { + r = n[i]; + var o = I(r, 3); + if ( + (o == 0 || e.search(f(r, 3, o - 1)) == 0) && + ((o = new RegExp(f(r, 1))), y(o, e)) + ) { + n = r; + break d; + } + } + n = null; + } + return ( + n != null && + ((u = n), + (n = l(u, 2)), + (r = new RegExp(f(u, 1))), + l(u, 5), + (u = l(u, 4)), + (e = + $ == 2 && u != null && 0 < u.length + ? e.replace(r, n.replace(s2, u)) + : e.replace(r, n)), + $ == 3 && + ((e = e.replace( + RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+"), + "" + )), + (e = e.replace( + RegExp("[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+", "g"), + "-" + )))), + E1(t, $, e, d) + ); + }; + function x(d, $, t) { + return t == "001" ? N(d, "" + $) : N(d, t); + } + function P(d) { + if (!m(d, 2)) return ""; + var $ = "" + f(d, 2); + return m(d, 4) && f(d, 4) && 0 < l(d, 8) + ? Array(l(d, 8) + 1).join("0") + $ + : $; + } + function E1(d, $, t, e) { + switch ($) { + case 0: + return "+" + d + t + e; + case 1: + return "+" + d + " " + t + e; + case 3: + return "tel:+" + d + "-" + t + e; + default: + return t + e; + } + } + function H(d, $) { + switch ($) { + case 4: + return f(d, 5); + case 3: + return f(d, 4); + case 1: + return f(d, 3); + case 0: + case 2: + return f(d, 2); + case 5: + return f(d, 6); + case 6: + return f(d, 8); + case 7: + return f(d, 7); + case 8: + return f(d, 21); + case 9: + return f(d, 25); + case 10: + return f(d, 28); + default: + return f(d, 1); + } + } + function T1(d, $) { + var t = y1(d, $); + return (d = x(d, l($, 1), t)), d == null ? -1 : (($ = P($)), Q($, d)); + } + function Q(d, $) { + return T(d, f($, 1)) + ? T(d, f($, 5)) + ? 4 + : T(d, f($, 4)) + ? 3 + : T(d, f($, 6)) + ? 5 + : T(d, f($, 8)) + ? 6 + : T(d, f($, 7)) + ? 7 + : T(d, f($, 21)) + ? 8 + : T(d, f($, 25)) + ? 9 + : T(d, f($, 28)) + ? 10 + : T(d, f($, 2)) + ? f($, 18) || T(d, f($, 3)) + ? 2 + : 0 + : !f($, 18) && T(d, f($, 3)) + ? 1 + : -1 + : -1; + } + function N(d, $) { + if ($ == null) return null; + $ = $.toUpperCase(); + var t = d.g[$]; + if (t == null) { + if (((t = s1[$]), t == null)) return null; + (t = new B().g(R.m(), t)), (d.g[$] = t); + } + return t; + } + function T(d, $) { + var t = d.length; + return 0 < I($, 9) && a($, 9).indexOf(t) == -1 ? !1 : y(l($, 2), d); + } + function h2(d, $) { + var t = y1(d, $), + e = l($, 1), + n = x(d, e, t); + return ( + n == null || (t != "001" && e != M1(d, t)) + ? (n = !1) + : ((d = P($)), (n = Q(d, n) != -1)), + n + ); + } + function y1(d, $) { + if ($ == null) return null; + var t = l($, 1); + if (((t = w[t]), t == null)) d = null; + else if (t.length == 1) d = t[0]; + else + d: { + $ = P($); + for (var e, n = t.length, r = 0; r < n; r++) { + e = t[r]; + var u = N(d, e); + if (m(u, 23)) { + if ($.search(f(u, 23)) == 0) { + d = e; + break d; + } + } else if (Q($, u) != -1) { + d = e; + break d; + } + } + d = null; + } + return d; + } + function U(d) { + return (d = w[d]), d == null ? "ZZ" : d[0]; + } + function M1(d, $) { + if (((d = N(d, $)), d == null)) throw Error("Invalid region code: " + $); + return l(d, 10); + } + function W(d, $, t, e) { + var n = H(t, e), + r = I(n, 9) == 0 ? a(f(t, 1), 9) : a(n, 9); + if (((n = a(n, 10)), e == 2)) + if (m1(H(t, 0))) + (d = H(t, 1)), + m1(d) && + ((r = r.concat(I(d, 9) == 0 ? a(f(t, 1), 9) : a(d, 9))), + r.sort(), + n.length == 0 + ? (n = a(d, 10)) + : ((n = n.concat(a(d, 10))), n.sort())); + else return W(d, $, t, 1); + return r[0] == -1 + ? 5 + : (($ = $.length), + -1 < n.indexOf($) + ? 4 + : ((t = r[0]), + t == $ + ? 0 + : t > $ + ? 2 + : r[r.length - 1] < $ + ? 3 + : -1 < r.indexOf($, 1) + ? 0 + : 5)); + } + function Y(d, $, t) { + var e = P($); + return ($ = l($, 1)), $ in w ? (($ = x(d, $, U($))), W(d, e, $, t)) : 1; + } + function I1(d, $) { + if (((d = d.toString()), d.length == 0 || d.charAt(0) == "0")) return 0; + for (var t, e = d.length, n = 1; 3 >= n && n <= e; ++n) + if (((t = parseInt(d.substring(0, n), 10)), t in w)) + return $.g(d.substring(n)), t; + return 0; + } + function A1(d, $, t, e, n, r) { + if ($.length == 0) return 0; + $ = new h($); + var u; + t != null && (u = f(t, 11)), u == null && (u = "NonMatch"); + var i = $.toString(); + if (i.length == 0) u = 20; + else if (O.test(i)) (i = i.replace(O, "")), S($), $.g(a1(i)), (u = 1); + else { + if (((i = new RegExp(u)), C1($), (u = $.toString()), u.search(i) == 0)) { + i = u.match(i)[0].length; + var o = u.substring(i).match(g1); + o && o[1] != null && 0 < o[1].length && V(o[1], X) == "0" + ? (u = !1) + : (S($), $.g(u.substring(i)), (u = !0)); + } else u = !1; + u = u ? 5 : 20; + } + if ((n && c(r, 6, u), u != 20)) { + if (2 >= $.h.length) throw Error("Phone number too short after IDD"); + if (((d = I1($, e)), d != 0)) return c(r, 1, d), d; + throw Error("Invalid country calling code"); + } + return t != null && + ((u = l(t, 10)), + (i = "" + u), + (o = $.toString()), + o.lastIndexOf(i, 0) == 0 && + ((i = new h(o.substring(i.length))), + (o = f(t, 1)), + (o = new RegExp(l(o, 2))), + N1(i, t, null), + (i = i.toString()), + (!y(o, $.toString()) && y(o, i)) || W(d, $.toString(), t, -1) == 3)) + ? (e.g(i), n && c(r, 6, 10), c(r, 1, u), u) + : (c(r, 1, 0), 0); + } + function N1(d, $, t) { + var e = d.toString(), + n = e.length, + r = f($, 15); + if (n != 0 && r != null && r.length != 0) { + var u = new RegExp("^(?:" + r + ")"); + if ((n = u.exec(e))) { + r = new RegExp(l(f($, 1), 2)); + var i = y(r, e), + o = n.length - 1; + ($ = f($, 16)), + $ == null || $.length == 0 || n[o] == null || n[o].length == 0 + ? (!i || y(r, e.substring(n[0].length))) && + (t != null && 0 < o && n[o] != null && t.g(n[1]), + d.set(e.substring(n[0].length))) + : ((e = e.replace(u, $)), + (!i || y(r, e)) && (t != null && 0 < o && t.g(n[1]), d.set(e))); + } + } + } + function G(d, $, t) { + if (!Z(t) && 0 < $.length && $.charAt(0) != "+") + throw Error("Invalid country calling code"); + return v1(d, $, t, !0); + } + function v1(d, $, t, e) { + if ($ == null) + throw Error("The string supplied did not seem to be a phone number"); + if (250 < $.length) + throw Error("The string supplied is too long to be a phone number"); + var n = new h(), + r = $.indexOf(";phone-context="); + if (r === -1) r = null; + else if (((r += 15), r >= $.length)) r = ""; + else { + var u = $.indexOf(";", r); + r = u !== -1 ? $.substring(r, u) : $.substring(r); + } + var i = r; + if ( + (i == null + ? (u = !0) + : i.length === 0 + ? (u = !1) + : ((u = f2.exec(i)), (i = o2.exec(i)), (u = u !== null || i !== null)), + !u || + (r != null + ? (r.charAt(0) === "+" && n.g(r), + (r = $.indexOf("tel:")), + n.g($.substring(0 <= r ? r + 4 : 0, $.indexOf(";phone-context=")))) + : ((r = n.g), + (u = $ ?? ""), + (i = u.search(n2)), + 0 <= i + ? ((u = u.substring(i)), + (u = u.replace(u2, "")), + (i = u.search(r2)), + 0 <= i && (u = u.substring(0, i))) + : (u = ""), + r.call(n, u)), + (r = n.toString()), + (u = r.indexOf(";isub=")), + 0 < u && (S(n), n.g(r.substring(0, u))), + !p1(n.toString()))) + ) + throw Error("The string supplied did not seem to be a phone number"); + if ( + ((r = n.toString()), !(Z(t) || (r != null && 0 < r.length && O.test(r)))) + ) + throw Error("Invalid country calling code"); + (r = new A()), e && c(r, 5, $); + d: { + if ( + (($ = n.toString()), + (u = $.search(c1)), + 0 <= u && p1($.substring(0, u))) + ) { + i = $.match(c1); + for (var o = i.length, M = 1; M < o; ++M) + if (i[M] != null && 0 < i[M].length) { + S(n), n.g($.substring(0, u)), ($ = i[M]); + break d; + } + } + $ = ""; + } + 0 < $.length && c(r, 3, $), + (u = N(d, t)), + ($ = new h()), + (i = 0), + (o = n.toString()); + try { + i = A1(d, o, u, $, e, r); + } catch (q) { + if (q.message == "Invalid country calling code" && O.test(o)) { + if (((o = o.replace(O, "")), (i = A1(d, o, u, $, e, r)), i == 0)) + throw q; + } else throw q; + } + if ( + (i != 0 + ? ((n = U(i)), n != t && (u = x(d, i, n))) + : (C1(n), + $.g(n.toString()), + t != null + ? ((i = l(u, 10)), c(r, 1, i)) + : e && (delete r.h[6], r.g && delete r.g[6])), + 2 > $.h.length || + (u != null && + ((t = new h()), + (n = new h($.toString())), + N1(n, u, t), + (d = W(d, n.toString(), u, -1)), + d != 2 && + d != 4 && + d != 5 && + (($ = n), e && 0 < t.toString().length && c(r, 7, t.toString()))), + (e = $.toString()), + (d = e.length), + 2 > d)) + ) + throw Error("The string supplied is too short to be a phone number"); + if (17 < d) + throw Error("The string supplied is too long to be a phone number"); + if (1 < e.length && e.charAt(0) == "0") { + for (c(r, 4, !0), d = 1; d < e.length - 1 && e.charAt(d) == "0"; ) d++; + d != 1 && c(r, 8, d); + } + return c(r, 2, parseInt(e, 10)), r; + } + function y(d, $) { + return !!( + (d = $.match( + new RegExp("^(?:" + (typeof d == "string" ? d : d.source) + ")$", "i") + )) && d[0].length == $.length + ); + } + function c2(d) { + (this.fa = RegExp(" ")), + (this.ja = ""), + (this.v = new h()), + (this.da = ""), + (this.s = new h()), + (this.ba = new h()), + (this.u = !0), + (this.ea = this.ca = this.la = !1), + (this.ga = p.g()), + (this.$ = 0), + (this.h = new h()), + (this.ha = !1), + (this.o = ""), + (this.g = new h()), + (this.j = []), + (this.ka = d), + (this.l = _1(this, this.ka)); + } + var R1 = new R(); + c(R1, 11, "NA"); + var p2 = RegExp( + "^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*)*$" + ), + G1 = /[- ]/; + function _1(d, $) { + var t = d.ga; + return ($ = Z($) ? M1(t, $) : 0), (d = N(d.ga, U($))), d ?? R1; + } + function L1(d) { + for (var $ = d.j.length, t = 0; t < $; ++t) { + var e = d.j[t], + n = l(e, 1); + if (d.da == n) return !1; + var r = d, + u = e, + i = l(u, 1); + S(r.v); + var o = r; + u = l(u, 2); + var M = "999999999999999".match(i)[0]; + if ( + (M.length < o.g.h.length + ? (o = "") + : ((o = M.replace(new RegExp(i, "g"), u)), + (o = o.replace(RegExp("9", "g"), " "))), + 0 < o.length ? (r.v.g(o), (r = !0)) : (r = !1), + r) + ) + return (d.da = n), (d.ha = G1.test(f(e, 4))), (d.$ = 0), !0; + } + return (d.u = !1); + } + function B1(d, $) { + for (var t = [], e = $.length - 3, n = d.j.length, r = 0; r < n; ++r) { + var u = d.j[r]; + I(u, 3) == 0 + ? t.push(d.j[r]) + : ((u = f(u, 3, Math.min(e, I(u, 3) - 1))), + $.search(u) == 0 && t.push(d.j[r])); + } + d.j = t; + } + function a2(d, $) { + d.s.g($); + var t = $; + if ( + (g1.test(t) || (d.s.h.length == 1 && e2.test(t)) + ? ($ == "+" ? ((t = $), d.ba.g($)) : ((t = X[$]), d.ba.g(t), d.g.g(t)), + ($ = t)) + : ((d.u = !1), (d.la = !0)), + !d.u) + ) { + if (!d.la) { + if (U1(d)) { + if (K1(d)) return w1(d); + } else if ( + (0 < d.o.length && + (($ = d.g.toString()), + S(d.g), + d.g.g(d.o), + d.g.g($), + ($ = d.h.toString()), + (t = $.lastIndexOf(d.o)), + S(d.h), + d.h.g($.substring(0, t))), + d.o != P1(d)) + ) + return d.h.g(" "), w1(d); + } + return d.s.toString(); + } + switch (d.ba.h.length) { + case 0: + case 1: + case 2: + return d.s.toString(); + case 3: + if (U1(d)) d.ea = !0; + else return (d.o = P1(d)), k(d); + default: + return d.ea + ? (K1(d) && (d.ea = !1), d.h.toString() + d.g.toString()) + : 0 < d.j.length + ? (($ = D1(d, $)), + (t = O1(d)), + 0 < t.length + ? t + : (B1(d, d.g.toString()), + L1(d) ? x1(d) : d.u ? j(d, $) : d.s.toString())) + : k(d); + } + } + function w1(d) { + return ( + (d.u = !0), (d.ea = !1), (d.j = []), (d.$ = 0), S(d.v), (d.da = ""), k(d) + ); + } + function O1(d) { + for (var $ = d.g.toString(), t = d.j.length, e = 0; e < t; ++e) { + var n = d.j[e], + r = l(n, 1); + if ( + new RegExp("^(?:" + r + ")$").test($) && + ((d.ha = G1.test(f(n, 4))), + (n = $.replace(new RegExp(r, "g"), f(n, 2))), + (n = j(d, n)), + V(n, $2) == d.ba) + ) + return n; + } + return ""; + } + function j(d, $) { + var t = d.h.h.length; + return d.ha && 0 < t && d.h.toString().charAt(t - 1) != " " + ? d.h + " " + $ + : d.h + $; + } + function k(d) { + var $ = d.g.toString(); + if (3 <= $.length) { + for ( + var t = + d.ca && d.o.length == 0 && 0 < I(d.l, 20) ? a(d.l, 20) : a(d.l, 19), + e = t.length, + n = 0; + n < e; + ++n + ) { + var r = t[n]; + (0 < d.o.length && S1(l(r, 4)) && !f(r, 6) && !m(r, 5)) || + ((d.o.length != 0 || d.ca || S1(l(r, 4)) || f(r, 6)) && + p2.test(l(r, 2)) && + d.j.push(r)); + } + return ( + B1(d, $), ($ = O1(d)), 0 < $.length ? $ : L1(d) ? x1(d) : d.s.toString() + ); + } + return j(d, $); + } + function x1(d) { + var $ = d.g.toString(), + t = $.length; + if (0 < t) { + for (var e = "", n = 0; n < t; n++) e = D1(d, $.charAt(n)); + return d.u ? j(d, e) : d.s.toString(); + } + return d.h.toString(); + } + function P1(d) { + var $ = d.g.toString(), + t = 0; + if (f(d.l, 10) != 1) var e = !1; + else + (e = d.g.toString()), + (e = e.charAt(0) == "1" && e.charAt(1) != "0" && e.charAt(1) != "1"); + return ( + e + ? ((t = 1), d.h.g("1").g(" "), (d.ca = !0)) + : m(d.l, 15) && + ((e = new RegExp("^(?:" + f(d.l, 15) + ")")), + (e = $.match(e)), + e != null && + e[0] != null && + 0 < e[0].length && + ((d.ca = !0), (t = e[0].length), d.h.g($.substring(0, t)))), + S(d.g), + d.g.g($.substring(t)), + $.substring(0, t) + ); + } + function U1(d) { + var $ = d.ba.toString(), + t = new RegExp("^(?:\\+|" + f(d.l, 11) + ")"); + return ( + (t = $.match(t)), + t != null && t[0] != null && 0 < t[0].length + ? ((d.ca = !0), + (t = t[0].length), + S(d.g), + d.g.g($.substring(t)), + S(d.h), + d.h.g($.substring(0, t)), + $.charAt(0) != "+" && d.h.g(" "), + !0) + : !1 + ); + } + function K1(d) { + if (d.g.h.length == 0) return !1; + var $ = new h(), + t = I1(d.g, $); + return t == 0 + ? !1 + : (S(d.g), + d.g.g($.toString()), + ($ = U(t)), + $ == "001" ? (d.l = N(d.ga, "" + t)) : $ != d.ka && (d.l = _1(d, $)), + d.h.g("" + t).g(" "), + (d.o = ""), + !0); + } + function D1(d, $) { + var t = d.v.toString(); + if (0 <= t.substring(d.$).search(d.fa)) { + var e = t.search(d.fa); + return ( + ($ = t.replace(d.fa, $)), + S(d.v), + d.v.g($), + (d.$ = e), + $.substring(0, d.$ + 1) + ); + } + return d.j.length == 1 && (d.u = !1), (d.da = ""), d.s.toString(); + } + const z = { + FIXED_LINE: 0, + MOBILE: 1, + FIXED_LINE_OR_MOBILE: 2, + TOLL_FREE: 3, + PREMIUM_RATE: 4, + SHARED_COST: 5, + VOIP: 6, + PERSONAL_NUMBER: 7, + PAGER: 8, + UAN: 9, + VOICEMAIL: 10, + UNKNOWN: -1, + }; + g("intlTelInputUtilsTemp", {}), + g("intlTelInputUtilsTemp.formatNumberAsYouType", (d, $) => { + try { + const t = d.replace(/[^+0-9]/g, ""), + e = new c2($); + $ = ""; + for (let n = 0; n < t.length; n++) + (e.ja = a2(e, t.charAt(n))), ($ = e.ja); + return $; + } catch { + return d; + } + }), + g("intlTelInputUtilsTemp.formatNumber", (d, $, t) => { + try { + const n = p.g(), + r = G(n, d, $); + var e = Y(n, r, -1); + return e == 0 || e == 4 ? n.format(r, typeof t > "u" ? 0 : t) : d; + } catch { + return d; + } + }), + g("intlTelInputUtilsTemp.getExampleNumber", (d, $, t, e) => { + try { + const o = p.g(); + d: { + var n = o; + if (Z(d)) { + var r = H(N(n, d), t); + try { + if (m(r, 6)) { + var u = f(r, 6), + i = v1(n, u, d, !1); + break d; + } + } catch {} + } + i = null; + } + return o.format(i, e ? 0 : $ ? 2 : 1); + } catch { + return ""; + } + }), + g("intlTelInputUtilsTemp.getExtension", (d, $) => { + try { + return f(G(p.g(), d, $), 3); + } catch { + return ""; + } + }), + g("intlTelInputUtilsTemp.getNumberType", (d, $) => { + try { + const t = p.g(), + e = G(t, d, $); + return T1(t, e); + } catch { + return -99; + } + }), + g("intlTelInputUtilsTemp.getValidationError", (d, $) => { + if (!$) return 1; + try { + const t = p.g(), + e = G(t, d, $); + return Y(t, e, -1); + } catch (t) { + return t.message === "Invalid country calling code" + ? 1 + : 3 >= d.length || + t.message === "Phone number too short after IDD" || + t.message === + "The string supplied is too short to be a phone number" + ? 2 + : t.message === "The string supplied is too long to be a phone number" + ? 3 + : -99; + } + }), + g("intlTelInputUtilsTemp.isValidNumber", (d, $, t) => { + try { + const e = p.g(), + n = G(e, d, $), + r = h2(e, n); + if (t) { + const u = t.map((i) => z[i]); + return r && u.includes(T1(e, n)); + } + return r; + } catch { + return !1; + } + }), + g("intlTelInputUtilsTemp.isPossibleNumber", (d, $, t) => { + try { + const e = p.g(), + n = G(e, d, $); + if (t) { + t.includes("FIXED_LINE_OR_MOBILE") && + (t.includes("MOBILE") || t.push("MOBILE"), + t.includes("FIXED_LINE") || t.push("FIXED_LINE")); + for (let r of t) if (Y(e, n, z[r]) === 0) return !0; + return !1; + } + return Y(e, n, -1) === 0; + } catch { + return !1; + } + }), + g("intlTelInputUtilsTemp.getCoreNumber", (d, $) => { + try { + return f(G(p.g(), d, $), 2).toString(); + } catch { + return ""; + } + }), + g("intlTelInputUtilsTemp.numberFormat", { + E164: 0, + INTERNATIONAL: 1, + NATIONAL: 2, + RFC3966: 3, + }), + g("intlTelInputUtilsTemp.numberType", z), + g("intlTelInputUtilsTemp.validationError", { + IS_POSSIBLE: 0, + INVALID_COUNTRY_CODE: 1, + TOO_SHORT: 2, + TOO_LONG: 3, + IS_POSSIBLE_LOCAL_ONLY: 4, + INVALID_LENGTH: 5, + }); +})(); +const C2 = window.intlTelInputUtilsTemp; +delete window.intlTelInputUtilsTemp; +export { C2 as default }; diff --git a/frontend-backup/_app/immutable/entry/app.CuVZ6Ons.js b/frontend-backup/_app/immutable/entry/app.CuVZ6Ons.js deleted file mode 100644 index 508dba1..0000000 --- a/frontend-backup/_app/immutable/entry/app.CuVZ6Ons.js +++ /dev/null @@ -1,20 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.DIpSCqpd.js","../chunks/B2cHk4HI.js","../chunks/4WsUhDWi.js","../chunks/BDALf20I.js","../chunks/4k6DpCgf.js","../chunks/BUhRjcOt.js","../chunks/DffDvEhl.js","../chunks/DklPLC_x.js","../chunks/DM9nRpoa.js","../chunks/BvbG2Lay.js","../chunks/Bke_korE.js","../chunks/CZW2bcQi.js","../chunks/BNZUboE0.js","../chunks/BrZ10JY-.js","../chunks/ChY_8ULT.js","../chunks/cUtKXcx3.js","../assets/0.DQCxyt33.css","../nodes/1.-aaO_7rD.js","../chunks/BuTItAOu.js","../chunks/C-Y7nmnD.js","../chunks/B4HM4TqG.js","../nodes/2.DTTH4yjc.js","../chunks/BCONGQnO.js","../chunks/CYItkO2S.js","../chunks/DnhglgUZ.js","../nodes/3.BjOx-5ND.js","../nodes/4.DLrwqUeR.js","../chunks/DV6L2nvf.js","../chunks/CAQlJ3np.js","../chunks/DS58drb5.js","../chunks/CDZgL_Bh.js","../chunks/sZ1mzRzK.js","../chunks/fZ59cmjx.js","../chunks/DCxPsWiR.js","../chunks/ClOhzjRc.js","../chunks/DhR_xAc4.js","../chunks/DS5O-Inb.js","../chunks/CVCd3urP.js","../chunks/C2Ms0SfR.js","../assets/ProfileAvatarWithLevel.6dmPRSfx.css","../chunks/ZzI7cLBE.js","../chunks/BHr_eBwR.js","../assets/LoginForm.CxMG0irz.css","../chunks/x1RL6Wqy.js","../chunks/EXYzlOI1.js","../chunks/rLj4C5Bn.js","../chunks/BtAj0icR.js","../chunks/Drv8f_fG.js","../assets/4.BtKF873c.css","../nodes/5.lvNarnfM.js","../nodes/6.DyKsgUf2.js","../nodes/7.C4jrLY7T.js","../chunks/hLPYzGnf.js","../chunks/BMfwGdZU.js","../chunks/CmAc-jwz.js","../chunks/6TAPgKgc.js","../nodes/8.DIMn846h.js","../chunks/GVP1MJz5.js","../chunks/DFzO1c4b.js","../chunks/ChoU6b3z.js","../nodes/9.BhPlDH9q.js","../nodes/10.2PlMuzkM.js","../chunks/DXjtejww.js","../chunks/BpEsgMDn.js","../nodes/11.7LNU-V2c.js","../nodes/12.Dk7Cyr8v.js","../chunks/5mOJ66sL.js","../chunks/DdJK9GIy.js","../nodes/13.DsAxPfo7.js","../chunks/BpFpuxGr.js","../nodes/14.TE67n0On.js","../nodes/15.BKIY6Gje.js","../nodes/16.CKya8A82.js","../nodes/17.C45_aAtw.js","../nodes/18.WvT7vRmm.js","../assets/18.BD1hRFPA.css","../nodes/19.Dqy7C9y2.js","../nodes/20.ppFj_8Kx.js","../nodes/21.PUjACzZY.js"])))=>i.map(i=>d[i]); -var Jn=t=>{throw TypeError(t)};var Kn=(t,e,n)=>e.has(t)||Jn("Cannot "+n);var B=(t,e,n)=>(Kn(t,e,"read from private field"),n?n.call(t):e.get(t)),Kt=(t,e,n)=>e.has(t)?Jn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Qt=(t,e,n,r)=>(Kn(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);import{_ as L}from"../chunks/x1RL6Wqy.js";import{D as S,d as g,g as _e,G as F,a as G,b as W,S as Me,c as Pt,e as Vr,T as Wr,n as oa,f as ca,h as st,i as Zt,j as Ne,k as R,l as mn,m as Mt,o as at,p as it,t as q,q as Se,r as D,u as ua,v as Xe,w as Z,x as da,y as fa,z as Ue,A as Cn,B as k,C as Qn,E as C,F as Et,H as Zn,I as la,J as Gr,K as Le,L as On,M as Ht,N as Yr,O as zr,_ as $t,P as pa,Q as Tt,R as Bt,U as Xr,V as ma,W as Jr,X as kt,Y as ga,Z as Ut,$ as ha,a0 as yt,a1 as er,a2 as Ze,a3 as tr,a4 as Ce,a5 as _a,a6 as Kr,a7 as Sa,a8 as Ea,a9 as Qr,aa as Nt,ab as Zr,ac as Ta,ad as gn,ae as ya,af as qt,ag as nr,ah as va,ai as ba,aj as Ia,ak as Ra,al as wa,am as Aa,an as xn,ao as Pe,ap as he,aq as Lt,ar as Pa,as as V,at as rr,au as sr,av as es,aw as ts,ax as ka,ay as ns,az as et,aA as ot,aB as Na,aC as hn,aD as tt,aE as rs,aF as ss,aG as ar,aH as La,aI as Dn,aJ as Ca,aK as Oa,aL as Y,aM as pe,aN as as,aO as Je,aP as xa,aQ as He,aR as ir,aS as or,aT as cr,aU as is,aV as Da,aW as Fa,aX as Ma,aY as Ha}from"../chunks/DM9nRpoa.js";import{s as $a}from"../chunks/B4HM4TqG.js";import{aw as vt,aW as Ba,g as j,aF as Ua,bo as qa,a0 as ja,p as Va,x as Wa,y as Ga,au as en,aL as Ya,f as os,a as ae,s as za,b as K,c as Xa,ay as fe,d as Ja,r as Ka,u as Re,b4 as Qa,t as Za}from"../chunks/BDALf20I.js";import{h as ei,m as ti,u as ni,s as ri}from"../chunks/4k6DpCgf.js";import"../chunks/B2cHk4HI.js";import{o as si}from"../chunks/4WsUhDWi.js";import{p as Ye,i as ze}from"../chunks/Bke_korE.js";import{c as we}from"../chunks/ChY_8ULT.js";import{b as Ae}from"../chunks/BrZ10JY-.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="47e693a9-a90f-4976-a787-dc2285b07af6",t._sentryDebugIdIdentifier="sentry-dbid-47e693a9-a90f-4976-a787-dc2285b07af6")})()}catch{}function ai(t){return class extends ii{constructor(e){super({component:t,...e})}}}var le,Q;class ii{constructor(e){Kt(this,le);Kt(this,Q);var a;var n=new Map,r=(i,o)=>{var c=ja(o,!1,!1);return n.set(i,c),c};const s=new Proxy({...e.props||{},$$events:{}},{get(i,o){return j(n.get(o)??r(o,Reflect.get(i,o)))},has(i,o){return o===Ba?!0:(j(n.get(o)??r(o,Reflect.get(i,o))),Reflect.has(i,o))},set(i,o,c){return vt(n.get(o)??r(o,c),c),Reflect.set(i,o,c)}});Qt(this,Q,(e.hydrate?ei:ti)(e.component,{target:e.target,anchor:e.anchor,props:s,context:e.context,intro:e.intro??!1,recover:e.recover})),(!((a=e==null?void 0:e.props)!=null&&a.$$host)||e.sync===!1)&&Ua(),Qt(this,le,s.$$events);for(const i of Object.keys(B(this,Q)))i==="$set"||i==="$destroy"||i==="$on"||qa(this,i,{get(){return B(this,Q)[i]},set(o){B(this,Q)[i]=o},enumerable:!0});B(this,Q).$set=i=>{Object.assign(s,i)},B(this,Q).$destroy=()=>{ni(B(this,Q))}}$set(e){B(this,Q).$set(e)}$on(e,n){B(this,le)[e]=B(this,le)[e]||[];const r=(...s)=>n.call(this,...s);return B(this,le)[e].push(r),()=>{B(this,le)[e]=B(this,le)[e].filter(s=>s!==r)}}$destroy(){B(this,Q).$destroy()}}le=new WeakMap,Q=new WeakMap;const bt={},ur={};function ye(t,e){bt[t]=bt[t]||[],bt[t].push(e)}function ve(t,e){if(!ur[t]){ur[t]=!0;try{e()}catch(n){S&&g.error(`Error while instrumenting ${t}`,n)}}}function ee(t,e){const n=t&&bt[t];if(n)for(const r of n)try{r(e)}catch(s){S&&g.error(`Error while triggering instrumentation handler. -Type: ${t} -Name: ${_e(r)} -Error:`,s)}}let tn=null;function cs(t){const e="error";ye(e,t),ve(e,oi)}function oi(){tn=F.onerror,F.onerror=function(t,e,n,r,s){return ee("error",{column:r,error:s,line:n,msg:t,url:e}),tn?tn.apply(this,arguments):!1},F.onerror.__SENTRY_INSTRUMENTED__=!0}let nn=null;function us(t){const e="unhandledrejection";ye(e,t),ve(e,ci)}function ci(){nn=F.onunhandledrejection,F.onunhandledrejection=function(t){return ee("unhandledrejection",t),nn?nn.apply(this,arguments):!0},F.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}let dr=!1;function ui(){if(dr)return;function t(){const e=G(),n=e&&W(e);if(n){const r="internal_error";S&&g.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:Me,message:r})}}t.tag="sentry_tracingErrorCallback",dr=!0,cs(t),us(t)}class Ee{constructor(e={}){this._traceId=e.traceId||Pt(),this._spanId=e.spanId||Vr()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:Wr}}end(e){}setAttribute(e,n){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,n,r){return this}addLink(e){return this}addLinks(e){return this}recordException(e,n){}}function qe(t,e=[]){return[t,e]}function di(t,e){const[n,r]=t;return[n,[...r,e]]}function fr(t,e){const n=t[1];for(const r of n){const s=r[0].type;if(e(r,s))return!0}return!1}function _n(t){const e=ca(F);return e.encodePolyfill?e.encodePolyfill(t):new TextEncoder().encode(t)}function fi(t){const[e,n]=t;let r=JSON.stringify(e);function s(a){typeof r=="string"?r=typeof a=="string"?r+a:[_n(r),a]:r.push(typeof a=="string"?_n(a):a)}for(const a of n){const[i,o]=a;if(s(` -${JSON.stringify(i)} -`),typeof o=="string"||o instanceof Uint8Array)s(o);else{let c;try{c=JSON.stringify(o)}catch{c=JSON.stringify(oa(o))}s(c)}}return typeof r=="string"?r:li(r)}function li(t){const e=t.reduce((s,a)=>s+a.length,0),n=new Uint8Array(e);let r=0;for(const s of t)n.set(s,r),r+=s.length;return n}function pi(t){return[{type:"span"},t]}function mi(t){const e=typeof t.data=="string"?_n(t.data):t.data;return[{type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType},e]}const gi={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item"};function lr(t){return gi[t]}function ds(t){if(!(t!=null&&t.sdk))return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function hi(t,e,n,r){var a;const s=(a=t.sdkProcessingMetadata)==null?void 0:a.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:st(r)},...s&&{trace:s}}}function Sn(t,e){if(!(e!=null&&e.length)||!t.description)return!1;for(const n of e){if(Si(n)){if(Zt(t.description,n))return!0;continue}if(!n.name&&!n.op)continue;const r=n.name?Zt(t.description,n.name):!0,s=n.op?t.op&&Zt(t.op,n.op):!0;if(r&&s)return!0}return!1}function _i(t,e){const n=e.parent_span_id,r=e.span_id;if(n)for(const s of t)s.parent_span_id===r&&(s.parent_span_id=n)}function Si(t){return typeof t=="string"||t instanceof RegExp}function Ei(t,e){var r,s,a,i;if(!e)return t;const n=t.sdk||{};return t.sdk={...n,name:n.name||e.name,version:n.version||e.version,integrations:[...((r=t.sdk)==null?void 0:r.integrations)||[],...e.integrations||[]],packages:[...((s=t.sdk)==null?void 0:s.packages)||[],...e.packages||[]],settings:(a=t.sdk)!=null&&a.settings||e.settings?{...(i=t.sdk)==null?void 0:i.settings,...e.settings}:void 0},t}function Ti(t,e,n,r){const s=ds(n),a={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&e&&{dsn:st(e)}},i="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return qe(a,[i])}function yi(t,e,n,r){const s=ds(n),a=t.type&&t.type!=="replay_event"?t.type:"event";Ei(t,n==null?void 0:n.sdk);const i=hi(t,s,r,e);return delete t.sdkProcessingMetadata,qe(i,[[{type:a},t]])}function vi(t,e){function n(l){return!!l.trace_id&&!!l.public_key}const r=Ne(t[0]),s=e==null?void 0:e.getDsn(),a=e==null?void 0:e.getOptions().tunnel,i={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!a&&s&&{dsn:st(s)}},{beforeSendSpan:o,ignoreSpans:c}=(e==null?void 0:e.getOptions())||{},u=c!=null&&c.length?t.filter(l=>!Sn(R(l),c)):t,f=t.length-u.length;f&&(e==null||e.recordDroppedEvent("before_send","span",f));const d=o?l=>{const m=R(l),h=o(m);return h||(mn(),m)}:R,p=[];for(const l of u){const m=d(l);m&&p.push(pi(m))}return qe(i,p)}function bi(t){if(!S)return;const{description:e="< unknown name >",op:n="< unknown op >",parent_span_id:r}=R(t),{spanId:s}=t.spanContext(),a=Mt(t),i=W(t),o=i===t,c=`[Tracing] Starting ${a?"sampled":"unsampled"} ${o?"root ":""}span`,u=[`op: ${n}`,`name: ${e}`,`ID: ${s}`];if(r&&u.push(`parent ID: ${r}`),!o){const{op:f,description:d}=R(i);u.push(`root ID: ${i.spanContext().spanId}`),f&&u.push(`root op: ${f}`),d&&u.push(`root description: ${d}`)}g.log(`${c} - ${u.join(` - `)}`)}function Ii(t){if(!S)return;const{description:e="< unknown name >",op:n="< unknown op >"}=R(t),{spanId:r}=t.spanContext(),a=W(t)===t,i=`[Tracing] Finishing "${n}" ${a?"root ":""}span "${e}" with ID ${r}`;g.log(i)}function Ri(t,e,n,r=G()){const s=r&&W(r);s&&(S&&g.log(`[Measurement] Setting measurement on root span: ${t} = ${e} ${n}`),s.addEvent(t,{[it]:e,[at]:n}))}function pr(t){if(!t||t.length===0)return;const e={};return t.forEach(n=>{const r=n.attributes||{},s=r[at],a=r[it];typeof s=="string"&&typeof a=="number"&&(e[n.name]={value:a,unit:s})}),e}const mr=1e3;class jt{constructor(e={}){this._traceId=e.traceId||Pt(),this._spanId=e.spanId||Vr(),this._startTime=e.startTimestamp||q(),this._links=e.links,this._attributes={},this.setAttributes({[D]:"manual",[Se]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._links?this._links.push(e):this._links=[e],this}addLinks(e){return this._links?this._links.push(...e):this._links=e,this}recordException(e,n){}spanContext(){const{_spanId:e,_traceId:n,_sampled:r}=this;return{spanId:e,traceId:n,traceFlags:r?ua:Wr}}setAttribute(e,n){return n===void 0?delete this._attributes[e]:this._attributes[e]=n,this}setAttributes(e){return Object.keys(e).forEach(n=>this.setAttribute(n,e[n])),this}updateStartTime(e){this._startTime=Xe(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(Z,"custom"),this}end(e){this._endTime||(this._endTime=Xe(e),Ii(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Se],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:fa(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[D],profile_id:this._attributes[Cn],exclusive_time:this._attributes[Ue],measurements:pr(this._events),is_segment:this._isStandaloneSpan&&W(this)===this||void 0,segment_id:this._isStandaloneSpan?W(this).spanContext().spanId:void 0,links:da(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,n,r){S&&g.log("[Tracing] Adding an event to span:",e);const s=gr(n)?n:r||q(),a=gr(n)?{}:n||{},i={name:e,time:Xe(s),attributes:a};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=k();if(e&&e.emit("spanEnd",this),!(this._isStandaloneSpan||this===W(this)))return;if(this._isStandaloneSpan){this._sampled?Ai(vi([this],e)):(S&&g.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(Qn(this).scope||C()).captureEvent(r)}_convertSpanToTransaction(){var f;if(!hr(R(this)))return;this._name||(S&&g.warn("Transaction has no name, falling back to ``."),this._name="");const{scope:e,isolationScope:n}=Qn(this),r=(f=e==null?void 0:e.getScopeData().sdkProcessingMetadata)==null?void 0:f.normalizedRequest;if(this._sampled!==!0)return;const a=Et(this).filter(d=>d!==this&&!wi(d)).map(d=>R(d)).filter(hr),i=this._attributes[Z];delete this._attributes[Zn],a.forEach(d=>{delete d.data[Zn]});const o={contexts:{trace:la(this)},spans:a.length>mr?a.sort((d,p)=>d.start_timestamp-p.start_timestamp).slice(0,mr):a,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:n,dynamicSamplingContext:Ne(this)},request:r,...i&&{transaction_info:{source:i}}},c=pr(this._events);return c&&Object.keys(c).length&&(S&&g.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),o.measurements=c),o}}function gr(t){return t&&typeof t=="number"||t instanceof Date||Array.isArray(t)}function hr(t){return!!t.start_timestamp&&!!t.timestamp&&!!t.span_id&&!!t.trace_id}function wi(t){return t instanceof jt&&t.isStandaloneSpan()}function Ai(t){const e=k();if(!e)return;const n=t[1];if(!n||n.length===0){e.recordDroppedEvent("before_send","span");return}e.sendEnvelope(t)}function Pi(t,e,n=()=>{}){let r;try{r=t()}catch(s){throw e(s),n(),s}return ki(r,e,n)}function ki(t,e,n){return Gr(t)?t.then(r=>(n(),r),r=>{throw e(r),n(),r}):(n(),t)}function Ni(t,e,n){if(!Le(t))return[!1];let r,s;typeof t.tracesSampler=="function"?(s=t.tracesSampler({...e,inheritOrSampleWith:o=>typeof e.parentSampleRate=="number"?e.parentSampleRate:typeof e.parentSampled=="boolean"?Number(e.parentSampled):o}),r=!0):e.parentSampled!==void 0?s=e.parentSampled:typeof t.tracesSampleRate<"u"&&(s=t.tracesSampleRate,r=!0);const a=On(s);if(a===void 0)return S&&g.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(s)} of type ${JSON.stringify(typeof s)}.`),[!1];if(!a)return S&&g.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,a,r];const i=nOi(a)(()=>{const u=C(),f=ms(u,a),p=t.onlyIfParent&&!f?new Ee:ls({parentSpan:f,spanArguments:r,forceTransaction:s,scope:u});return $t(u,p),Pi(()=>e(p),()=>{const{status:l}=R(p);p.isRecording()&&(!l||l==="ok")&&p.setStatus({code:Me,message:"internal_error"})},()=>{p.end()})}))}function xe(t){const e=Mn();if(e.startInactiveSpan)return e.startInactiveSpan(t);const n=ps(t),{forceTransaction:r,parentSpan:s}=t;return(t.scope?i=>Ht(t.scope,i):s!==void 0?i=>Fn(s,i):i=>i())(()=>{const i=C(),o=ms(i,s);return t.onlyIfParent&&!o?new Ee:ls({parentSpan:o,spanArguments:n,forceTransaction:r,scope:i})})}function Fn(t,e){const n=Mn();return n.withActiveSpan?n.withActiveSpan(t,e):Ht(r=>($t(r,t||void 0),e(r)))}function ls({parentSpan:t,spanArguments:e,forceTransaction:n,scope:r}){if(!Le()){const i=new Ee;if(n||!t){const o={sampled:"false",sample_rate:"0",transaction:e.name,...Ne(i)};Tt(i,o)}return i}const s=Bt();let a;if(t&&!n)a=Ci(t,r,e),Xr(t,a);else if(t){const i=Ne(t),{traceId:o,spanId:c}=t.spanContext(),u=Mt(t);a=_r({traceId:o,parentSpanId:c,...e},r,u),Tt(a,i)}else{const{traceId:i,dsc:o,parentSpanId:c,sampled:u}={...s.getPropagationContext(),...r.getPropagationContext()};a=_r({traceId:i,parentSpanId:c,...e},r,u),o&&Tt(a,o)}return bi(a),ma(a,r,s),a}function ps(t){const n={isStandalone:(t.experimental||{}).standalone,...t};if(t.startTime){const r={...n};return r.startTimestamp=Xe(t.startTime),delete r.startTime,r}return n}function Mn(){const t=Yr();return zr(t)}function _r(t,e,n){var m;const r=k(),s=(r==null?void 0:r.getOptions())||{},{name:a=""}=t,i={spanAttributes:{...t.attributes},spanName:a,parentSampled:n};r==null||r.emit("beforeSampling",i,{decision:!1});const o=i.parentSampled??n,c=i.spanAttributes,u=e.getPropagationContext(),[f,d,p]=e.getScopeData().sdkProcessingMetadata[fs]?[!1]:Ni(s,{name:a,parentSampled:o,attributes:c,parentSampleRate:On((m=u.dsc)==null?void 0:m.sample_rate)},u.sampleRand),l=new jt({...t,attributes:{[Z]:"custom",[Jr]:d!==void 0&&p?d:void 0,...c},sampled:f});return!f&&r&&(S&&g.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",l),l}function Ci(t,e,n){const{spanId:r,traceId:s}=t.spanContext(),a=e.getScopeData().sdkProcessingMetadata[fs]?!1:Mt(t),i=a?new jt({...n,parentSpanId:r,traceId:s,sampled:a}):new Ee({traceId:s});Xr(t,i);const o=k();return o&&(o.emit("spanStart",i),n.endTimestamp&&o.emit("spanEnd",i)),i}function ms(t,e){if(e)return e;if(e===null)return;const n=pa(t);if(!n)return;const r=k();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?W(n):n}function Oi(t){return t!==void 0?e=>Fn(t,e):e=>e()}const It={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},xi="heartbeatFailed",Di="idleTimeout",Fi="finalTimeout",Mi="externalFinish";function gs(t,e={}){const n=new Map;let r=!1,s,a=Mi,i=!e.disableAutoFinish;const o=[],{idleTimeout:c=It.idleTimeout,finalTimeout:u=It.finalTimeout,childSpanTimeout:f=It.childSpanTimeout,beforeSpanEnd:d}=e,p=k();if(!p||!Le()){const E=new Ee,b={sample_rate:"0",sampled:"false",...Ne(E)};return Tt(E,b),E}const l=C(),m=G(),h=Hi(t);h.end=new Proxy(h.end,{apply(E,b,be){if(d&&d(h),b instanceof Ee)return;const[me,...ge]=be,ce=me||q(),N=Xe(ce),H=Et(h).filter(P=>P!==h);if(!H.length)return z(N),Reflect.apply(E,b,[N,...ge]);const X=H.map(P=>R(P).timestamp).filter(P=>!!P),y=X.length?Math.max(...X):void 0,A=R(h).start_timestamp,v=Math.min(A?A+u/1e3:1/0,Math.max(A||-1/0,Math.min(N,y||1/0)));return z(v),Reflect.apply(E,b,[v,...ge])}});function x(){s&&(clearTimeout(s),s=void 0)}function I(E){x(),s=setTimeout(()=>{!r&&n.size===0&&i&&(a=Di,h.end(E))},c)}function M(E){s=setTimeout(()=>{!r&&i&&(a=xi,h.end(E))},f)}function $(E){x(),n.set(E,!0);const b=q();M(b+f/1e3)}function oe(E){if(n.has(E)&&n.delete(E),n.size===0){const b=q();I(b+c/1e3)}}function z(E){r=!0,n.clear(),o.forEach(N=>N()),$t(l,m);const b=R(h),{start_timestamp:be}=b;if(!be)return;b.data[kt]||h.setAttribute(kt,a),g.log(`[Tracing] Idle span "${b.op}" finished`);const ge=Et(h).filter(N=>N!==h);let ce=0;ge.forEach(N=>{N.isRecording()&&(N.setStatus({code:Me,message:"cancelled"}),N.end(E),S&&g.log("[Tracing] Cancelling span since span ended early",JSON.stringify(N,void 0,2)));const H=R(N),{timestamp:X=0,start_timestamp:y=0}=H,A=y<=E,v=(u+c)/1e3,P=X-y<=v;if(S){const w=JSON.stringify(N,void 0,2);A?P||g.log("[Tracing] Discarding span since it finished after idle span final timeout",w):g.log("[Tracing] Discarding span since it happened after idle span was finished",w)}(!P||!A)&&(ga(h,N),ce++)}),ce>0&&h.setAttribute("sentry.idle_span_discarded_spans",ce)}return o.push(p.on("spanStart",E=>{if(r||E===h||R(E).timestamp||E instanceof jt&&E.isStandaloneSpan())return;Et(h).includes(E)&&$(E.spanContext().spanId)})),o.push(p.on("spanEnd",E=>{r||oe(E.spanContext().spanId)})),o.push(p.on("idleSpanEnableAutoFinish",E=>{E===h&&(i=!0,I(),n.size&&M())})),e.disableAutoFinish||I(),setTimeout(()=>{r||(h.setStatus({code:Me,message:"deadline_exceeded"}),a=Fi,h.end())},u),h}function Hi(t){const e=xe(t);return $t(C(),e),S&&g.log("[Tracing] Started span is an idle span"),e}const $i="7";function Bi(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function Ui(t){return`${Bi(t)}${t.projectId}/envelope/`}function qi(t,e){const n={sentry_version:$i};return t.publicKey&&(n.sentry_key=t.publicKey),e&&(n.sentry_client=`${e.name}/${e.version}`),new URLSearchParams(n).toString()}function ji(t,e,n){return e||`${Ui(t)}?${qi(t,n)}`}const Sr=[];function Vi(t){const e={};return t.forEach(n=>{const{name:r}=n,s=e[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(e[r]=n)}),Object.values(e)}function Wi(t){const e=t.defaultIntegrations||[],n=t.integrations;e.forEach(s=>{s.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...e,...n];else if(typeof n=="function"){const s=n(e);r=Array.isArray(s)?s:[s]}else r=e;return Vi(r)}function Gi(t,e){const n={};return e.forEach(r=>{r&&hs(t,r,n)}),n}function Er(t,e){for(const n of e)n!=null&&n.afterAllSetup&&n.afterAllSetup(t)}function hs(t,e,n){if(n[e.name]){S&&g.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,Sr.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),Sr.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){const r=e.preprocessEvent.bind(e);t.on("preprocessEvent",(s,a)=>r(s,a,t))}if(typeof e.processEvent=="function"){const r=e.processEvent.bind(e),s=Object.assign((a,i)=>r(a,i,t),{id:e.name});t.addEventProcessor(s)}S&&g.log(`Integration installed: ${e.name}`)}function Yi(t,e,n){const r=[{type:"client_report"},{timestamp:Ut(),discarded_events:t}];return qe(e?{dsn:e}:{},[r])}function _s(t){const e=[];t.message&&e.push(t.message);try{const n=t.exception.values[t.exception.values.length-1];n!=null&&n.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`))}catch{}return e}function zi(t){var c;const{trace_id:e,parent_span_id:n,span_id:r,status:s,origin:a,data:i,op:o}=((c=t.contexts)==null?void 0:c.trace)??{};return{data:i??{},description:t.transaction,op:o,parent_span_id:n,span_id:r??"",start_timestamp:t.start_timestamp??0,status:s,timestamp:t.timestamp,trace_id:e??"",origin:a,profile_id:i==null?void 0:i[Cn],exclusive_time:i==null?void 0:i[Ue],measurements:t.measurements,is_segment:!0}}function Xi(t){return{type:"transaction",timestamp:t.timestamp,start_timestamp:t.start_timestamp,transaction:t.description,contexts:{trace:{trace_id:t.trace_id,span_id:t.span_id,parent_span_id:t.parent_span_id,op:t.op,status:t.status,origin:t.origin,data:{...t.data,...t.profile_id&&{[Cn]:t.profile_id},...t.exclusive_time&&{[Ue]:t.exclusive_time}}}},measurements:t.measurements}}const Tr="Not capturing exception because it's already been captured.",yr="Discarded session because of missing or non-string release",Ss=Symbol.for("SentryInternalError"),Es=Symbol.for("SentryDoNotSendEventError");function Rt(t){return{message:t,[Ss]:!0}}function rn(t){return{message:t,[Es]:!0}}function vr(t){return!!t&&typeof t=="object"&&Ss in t}function br(t){return!!t&&typeof t=="object"&&Es in t}class Ji{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=ha(e.dsn):S&&g.warn("No DSN provided, client will not send events."),this._dsn){const n=ji(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n})}}captureException(e,n,r){const s=yt();if(er(e))return S&&g.log(Tr),s;const a={event_id:s,...n};return this._process(this.eventFromException(e,a).then(i=>this._captureEvent(i,a,r))),a.event_id}captureMessage(e,n,r,s){const a={event_id:yt(),...r},i=Zr(e)?e:String(e),o=Ze(e)?this.eventFromMessage(i,n,a):this.eventFromException(e,a);return this._process(o.then(c=>this._captureEvent(c,a,s))),a.event_id}captureEvent(e,n,r){const s=yt();if(n!=null&&n.originalException&&er(n.originalException))return S&&g.log(Tr),s;const a={event_id:s,...n},i=e.sdkProcessingMetadata||{},o=i.capturedSpanScope,c=i.capturedSpanIsolationScope;return this._process(this._captureEvent(e,a,o||r,c)),a.event_id}captureSession(e){this.sendSession(e),tr(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(e).then(r=>n.flush(e).then(s=>r&&s))):Ce(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const n=this._integrations[e.name];hs(this,e,this._integrations),n||Er(this,[e])}sendEvent(e,n={}){this.emit("beforeSendEvent",e,n);let r=yi(e,this._dsn,this._options._metadata,this._options.tunnel);for(const a of n.attachments||[])r=di(r,mi(a));const s=this.sendEnvelope(r);s&&s.then(a=>this.emit("afterSendEvent",e,a),null)}sendSession(e){const{release:n,environment:r=_a}=this._options;if("aggregates"in e){const a=e.attrs||{};if(!a.release&&!n){S&&g.warn(yr);return}a.release=a.release||n,a.environment=a.environment||r,e.attrs=a}else{if(!e.release&&!n){S&&g.warn(yr);return}e.release=e.release||n,e.environment=e.environment||r}this.emit("beforeSendSession",e);const s=Ti(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(s)}recordDroppedEvent(e,n,r=1){if(this._options.sendClientReports){const s=`${e}:${n}`;S&&g.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(e,n){const r=this._hooks[e]=this._hooks[e]||[];return r.push(n),()=>{const s=r.indexOf(n);s>-1&&r.splice(s,1)}}emit(e,...n){const r=this._hooks[e];r&&r.forEach(s=>s(...n))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,n=>(S&&g.error("Error while sending envelope:",n),n)):(S&&g.error("Transport disabled"),Ce({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=Gi(this,e),Er(this,e)}_updateSessionFromEvent(e,n){var c;let r=n.level==="fatal",s=!1;const a=(c=n.exception)==null?void 0:c.values;if(a){s=!0;for(const u of a){const f=u.mechanism;if((f==null?void 0:f.handled)===!1){r=!0;break}}}const i=e.status==="ok";(i&&e.errors===0||i&&r)&&(tr(e,{...r&&{status:"crashed"},errors:e.errors||Number(s||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Kr(n=>{let r=0;const s=1,a=setInterval(()=>{this._numProcessing==0?(clearInterval(a),n(!0)):(r+=s,e&&r>=e&&(clearInterval(a),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,n,r,s){const a=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&(i!=null&&i.length)&&(n.integrations=i),this.emit("preprocessEvent",e,n),e.type||s.setLastEventId(e.event_id||n.event_id),Sa(a,e,n,r,this,s).then(o=>{if(o===null)return o;this.emit("postprocessEvent",o,n),o.contexts={trace:Ea(r),...o.contexts};const c=Qr(this,r);return o.sdkProcessingMetadata={dynamicSamplingContext:c,...o.sdkProcessingMetadata},o})}_captureEvent(e,n={},r=C(),s=Bt()){return S&&En(e)&&g.log(`Captured error event \`${_s(e)[0]||""}\``),this._processEvent(e,n,r,s).then(a=>a.event_id,a=>{S&&(br(a)?g.log(a.message):vr(a)?g.warn(a.message):g.warn(a))})}_processEvent(e,n,r,s){const a=this.getOptions(),{sampleRate:i}=a,o=Ts(e),c=En(e),u=e.type||"error",f=`before send for type \`${u}\``,d=typeof i>"u"?void 0:On(i);if(c&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error"),Nt(rn(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));const p=u==="replay_event"?"replay":u;return this._prepareEvent(e,n,r,s).then(l=>{if(l===null)throw this.recordDroppedEvent("event_processor",p),rn("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return l;const h=Qi(this,a,l,n);return Ki(h,f)}).then(l=>{var x;if(l===null){if(this.recordDroppedEvent("before_send",p),o){const M=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",M)}throw rn(`${f} returned \`null\`, will not send event.`)}const m=r.getSession()||s.getSession();if(c&&m&&this._updateSessionFromEvent(m,l),o){const I=((x=l.sdkProcessingMetadata)==null?void 0:x.spanCountBeforeProcessing)||0,M=l.spans?l.spans.length:0,$=I-M;$>0&&this.recordDroppedEvent("before_send","span",$)}const h=l.transaction_info;if(o&&h&&l.transaction!==e.transaction){const I="custom";l.transaction_info={...h,source:I}}return this.sendEvent(l,n),l}).then(null,l=>{throw br(l)||vr(l)?l:(this.captureException(l,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:l}),Rt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. -Reason: ${l}`))})}_process(e){this._numProcessing++,e.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([n,r])=>{const[s,a]=n.split(":");return{reason:s,category:a,quantity:r}})}_flushOutcomes(){S&&g.log("Flushing outcomes...");const e=this._clearOutcomes();if(e.length===0){S&&g.log("No outcomes to send");return}if(!this._dsn){S&&g.log("No dsn provided, will not send outcomes");return}S&&g.log("Sending outcomes:",e);const n=Yi(e,this._options.tunnel&&st(this._dsn));this.sendEnvelope(n)}}function Ki(t,e){const n=`${e} must return \`null\` or a valid event.`;if(Gr(t))return t.then(r=>{if(!gn(r)&&r!==null)throw Rt(n);return r},r=>{throw Rt(`${e} rejected with ${r}`)});if(!gn(t)&&t!==null)throw Rt(n);return t}function Qi(t,e,n,r){const{beforeSend:s,beforeSendTransaction:a,beforeSendSpan:i,ignoreSpans:o}=e;let c=n;if(En(c)&&s)return s(c,r);if(Ts(c)){if(i||o){const u=zi(c);if(o!=null&&o.length&&Sn(u,o))return null;if(i){const f=i(u);f?c=Ta(n,Xi(f)):mn()}if(c.spans){const f=[],d=c.spans;for(const l of d){if(o!=null&&o.length&&Sn(l,o)){_i(d,l);continue}if(i){const m=i(l);m?f.push(m):(mn(),f.push(l))}else f.push(l)}const p=c.spans.length-f.length;p&&t.recordDroppedEvent("before_send","span",p),c.spans=f}}if(a){if(c.spans){const u=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return a(c,r)}}return c}function En(t){return t.type===void 0}function Ts(t){return t.type==="transaction"}function Zi(t){return[{type:"log",item_count:t.length,content_type:"application/vnd.sentry.items.log+json"},{items:t}]}function eo(t,e,n,r){const s={};return e!=null&&e.sdk&&(s.sdk={name:e.sdk.name,version:e.sdk.version}),n&&r&&(s.dsn=st(r)),qe(s,[Zi(t)])}function sn(t,e){const n=to(t)??[];if(n.length===0)return;const r=t.getOptions(),s=eo(n,r._metadata,r.tunnel,t.getDsn());ys().set(t,[]),t.emit("flushLogs"),t.sendEnvelope(s)}function to(t){return ys().get(t)}function ys(){return ya("clientToLogBufferMap",()=>new WeakMap)}function no(t,e){e.debug===!0&&(S?g.enable():qt(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),C().update(e.initialScope);const r=new t(e);return ro(r),r.init(),r}function ro(t){C().setClient(t)}const vs=Symbol.for("SentryBufferFullError");function so(t){const e=[];function n(){return t===void 0||e.lengthr(o)).then(null,()=>r(o).then(null,()=>{})),o}function a(i){return new Kr((o,c)=>{let u=e.length;if(!u)return o(!0);const f=setTimeout(()=>{i&&i>0&&o(!1)},i);e.forEach(d=>{Ce(d).then(()=>{--u||(clearTimeout(f),o(!0))},c)})})}return{$:e,add:s,drain:a}}const ao=60*1e3;function io(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${t}`);return isNaN(r)?ao:r-e}function oo(t,e){return t[e]||t.all||0}function co(t,e,n=Date.now()){return oo(t,e)>n}function uo(t,{statusCode:e,headers:n},r=Date.now()){const s={...t},a=n==null?void 0:n["x-sentry-rate-limits"],i=n==null?void 0:n["retry-after"];if(a)for(const o of a.trim().split(",")){const[c,u,,,f]=o.split(":",5),d=parseInt(c,10),p=(isNaN(d)?60:d)*1e3;if(!u)s.all=r+p;else for(const l of u.split(";"))l==="metric_bucket"?(!f||f.split(";").includes("custom"))&&(s[l]=r+p):s[l]=r+p}else i?s.all=r+io(i,r):e===429&&(s.all=r+60*1e3);return s}const fo=64;function lo(t,e,n=so(t.bufferSize||fo)){let r={};const s=i=>n.drain(i);function a(i){const o=[];if(fr(i,(d,p)=>{const l=lr(p);co(r,l)?t.recordDroppedEvent("ratelimit_backoff",l):o.push(d)}),o.length===0)return Ce({});const c=qe(i[0],o),u=d=>{fr(c,(p,l)=>{t.recordDroppedEvent(d,lr(l))})},f=()=>e({body:fi(c)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&S&&g.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=uo(r,d),d),d=>{throw u("network_error"),S&&g.error("Encountered error running transport request:",d),d});return n.add(f).then(d=>d,d=>{if(d===vs)return S&&g.error("Skipped sending event because buffer is full."),u("queue_overflow"),Ce({});throw d})}return{send:a,flush:s}}const po="thismessage:/";function bs(t){return"isRelative"in t}function Is(t,e){const n=t.indexOf("://")<=0&&t.indexOf("//")!==0,r=n?po:void 0;try{if("canParse"in URL&&!URL.canParse(t,r))return;const s=new URL(t,r);return n?{isRelative:n,pathname:s.pathname,search:s.search,hash:s.hash}:s}catch{}}function mo(t){if(bs(t))return t.pathname;const e=new URL(t);return e.search="",e.hash="",["80","443"].includes(e.port)&&(e.port=""),e.password&&(e.password="%filtered%"),e.username&&(e.username="%filtered%"),e.toString()}function ke(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function go(t){return t.split(/[?#]/,1)[0]}function ho(t){var e;"aggregates"in t?((e=t.attrs)==null?void 0:e.ip_address)===void 0&&(t.attrs={...t.attrs,ip_address:"{{auto}}"}):t.ipAddress===void 0&&(t.ipAddress="{{auto}}")}function Hn(t,e,n=[e],r="npm"){const s=t._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${e}`,packages:n.map(a=>({name:`${r}:@sentry/${a}`,version:nr})),version:nr}),t._metadata=s}function Rs(t={}){const e=t.client||k();if(!va()||!e)return{};const n=Yr(),r=zr(n);if(r.getTraceData)return r.getTraceData(t);const s=t.scope||C(),a=t.span||G(),i=a?ba(a):_o(s),o=a?Ne(a):Qr(e,s),c=Ia(o);if(!Ra.test(i))return g.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const f={"sentry-trace":i,baggage:c};if(t.propagateTraceparent){const d=So(i);d&&(f.traceparent=d)}return f}function _o(t){const{traceId:e,sampled:n,propagationSpanId:r}=t.getPropagationContext();return wa(e,r,n)}function So(t){const{traceId:e,parentSpanId:n,parentSampled:r}=Aa(t)||{};if(!(!e||!n))return`00-${e}-${n}-${r?"01":"00"}`}const Eo=100;function Oe(t,e){const n=k(),r=Bt();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:a=Eo}=n.getOptions();if(a<=0)return;const o={timestamp:Ut(),...t},c=s?qt(()=>s(o,e)):o;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,e),r.addBreadcrumb(c,a))}let Ir;const To="FunctionToString",Rr=new WeakMap,yo=(()=>({name:To,setupOnce(){Ir=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=xn(this),n=Rr.has(k())&&e!==void 0?e:this;return Ir.apply(n,t)}}catch{}},setup(t){Rr.set(t,!0)}})),vo=yo,bo=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],Io="EventFilters",Ro=(t={})=>{let e;return{name:Io,setup(n){const r=n.getOptions();e=wr(t,r)},processEvent(n,r,s){if(!e){const a=s.getOptions();e=wr(t,a)}return Ao(n,e)?null:n}}},wo=((t={})=>({...Ro(t),name:"InboundFilters"}));function wr(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:bo],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]]}}function Ao(t,e){if(t.type){if(t.type==="transaction"&&ko(t,e.ignoreTransactions))return S&&g.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. -Event: ${Pe(t)}`),!0}else{if(Po(t,e.ignoreErrors))return S&&g.warn(`Event dropped due to being matched by \`ignoreErrors\` option. -Event: ${Pe(t)}`),!0;if(Oo(t))return S&&g.warn(`Event dropped due to not having an error message, error type or stacktrace. -Event: ${Pe(t)}`),!0;if(No(t,e.denyUrls))return S&&g.warn(`Event dropped due to being matched by \`denyUrls\` option. -Event: ${Pe(t)}. -Url: ${Ct(t)}`),!0;if(!Lo(t,e.allowUrls))return S&&g.warn(`Event dropped due to not being matched by \`allowUrls\` option. -Event: ${Pe(t)}. -Url: ${Ct(t)}`),!0}return!1}function Po(t,e){return e!=null&&e.length?_s(t).some(n=>he(n,e)):!1}function ko(t,e){if(!(e!=null&&e.length))return!1;const n=t.transaction;return n?he(n,e):!1}function No(t,e){if(!(e!=null&&e.length))return!1;const n=Ct(t);return n?he(n,e):!1}function Lo(t,e){if(!(e!=null&&e.length))return!0;const n=Ct(t);return n?he(n,e):!0}function Co(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function Ct(t){var e,n;try{const r=[...((e=t.exception)==null?void 0:e.values)??[]].reverse().find(a=>{var i,o,c;return((i=a.mechanism)==null?void 0:i.parent_id)===void 0&&((c=(o=a.stacktrace)==null?void 0:o.frames)==null?void 0:c.length)}),s=(n=r==null?void 0:r.stacktrace)==null?void 0:n.frames;return s?Co(s):null}catch{return S&&g.error(`Cannot extract url for event ${Pe(t)}`),null}}function Oo(t){var e,n;return(n=(e=t.exception)==null?void 0:e.values)!=null&&n.length?!t.message&&!t.exception.values.some(r=>r.stacktrace||r.type&&r.type!=="Error"||r.value):!1}function xo(t,e,n,r,s,a){var o;if(!((o=s.exception)!=null&&o.values)||!a||!Lt(a.originalException,Error))return;const i=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;i&&(s.exception.values=Tn(t,e,r,a.originalException,n,s.exception.values,i,0))}function Tn(t,e,n,r,s,a,i,o){if(a.length>=n+1)return a;let c=[...a];if(Lt(r[s],Error)){Ar(i,o);const u=t(e,r[s]),f=c.length;Pr(u,s,f,o),c=Tn(t,e,n,r[s],s,[u,...c],u,f)}return Array.isArray(r.errors)&&r.errors.forEach((u,f)=>{if(Lt(u,Error)){Ar(i,o);const d=t(e,u),p=c.length;Pr(d,`errors[${f}]`,p,o),c=Tn(t,e,n,u,s,[d,...c],d,p)}}),c}function Ar(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,...t.type==="AggregateError"&&{is_exception_group:!0},exception_id:e}}function Pr(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function Do(t){const e="console";ye(e,t),ve(e,Fo)}function Fo(){"console"in F&&Pa.forEach(function(t){t in F.console&&V(F.console,t,function(e){return rr[t]=e,function(...n){ee("console",{args:n,level:t});const s=rr[t];s==null||s.apply(F.console,n)}})})}function Mo(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}const Ho="Dedupe",$o=(()=>{let t;return{name:Ho,processEvent(e){if(e.type)return e;try{if(Uo(e,t))return S&&g.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}}),Bo=$o;function Uo(t,e){return e?!!(qo(t,e)||jo(t,e)):!1}function qo(t,e){const n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!As(t,e)||!ws(t,e))}function jo(t,e){const n=kr(e),r=kr(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!As(t,e)||!ws(t,e))}function ws(t,e){let n=sr(t),r=sr(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;sd[0]==="sentry-trace")||u.push(["sentry-trace",a]),r&&o&&!c.find(d=>d[0]==="traceparent")&&u.push(["traceparent",o]);const f=c.find(d=>d[0]==="baggage"&&mt(d[1]));return i&&!f&&u.push(["baggage",i]),u}else{const u="sentry-trace"in c?c["sentry-trace"]:void 0,f="traceparent"in c?c.traceparent:void 0,d="baggage"in c?c.baggage:void 0,p=d?Array.isArray(d)?[...d]:[d]:[],l=d&&(Array.isArray(d)?d.find(h=>mt(h)):mt(d));i&&!l&&p.push(i);const m={...c,"sentry-trace":u??a,baggage:p.length>0?p.join(","):void 0};return r&&o&&!f&&(m.traceparent=o),m}else return{...s}}function Go(t,e){var n,r;if(e.response){es(t,e.response.status);const s=(r=(n=e.response)==null?void 0:n.headers)==null?void 0:r.get("content-length");if(s){const a=parseInt(s);a>0&&t.setAttribute("http.response_content_length",a)}}else e.error&&t.setStatus({code:Me,message:"internal_error"});t.end()}function mt(t){return t.split(",").some(e=>e.trim().startsWith(ka))}function Yo(t){return typeof Headers<"u"&&Lt(t,Headers)}function zo(t,e,n){const r=Is(t);return{name:r?`${e} ${mo(r)}`:e,attributes:Xo(t,r,e,n)}}function Xo(t,e,n,r){const s={url:t,type:"fetch","http.method":n,[D]:r,[Se]:"http.client"};return e&&(bs(e)||(s["http.url"]=e.href,s["server.address"]=e.host),e.search&&(s["http.query"]=e.search),e.hash&&(s["http.fragment"]=e.hash)),s}function Ps(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}const nt=F;function Jo(){return"history"in nt&&!!nt.history}function Ko(){if(!("fetch"in nt))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function yn(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Qo(){var n;if(typeof EdgeRuntime=="string")return!0;if(!Ko())return!1;if(yn(nt.fetch))return!0;let t=!1;const e=nt.document;if(e&&typeof e.createElement=="function")try{const r=e.createElement("iframe");r.hidden=!0,e.head.appendChild(r),(n=r.contentWindow)!=null&&n.fetch&&(t=yn(r.contentWindow.fetch)),e.head.removeChild(r)}catch(r){S&&g.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return t}function ks(t,e){const n="fetch";ye(n,t),ve(n,()=>Ns(void 0,e))}function Zo(t){const e="fetch-body-resolved";ye(e,t),ve(e,()=>Ns(tc))}function Ns(t,e=!1){e&&!Qo()||V(F,"fetch",function(n){return function(...r){const s=new Error,{method:a,url:i}=nc(r),o={args:r,fetchData:{method:a,url:i},startTimestamp:q()*1e3,virtualError:s,headers:rc(r)};return t||ee("fetch",{...o}),n.apply(F,r).then(async c=>(t?t(c):ee("fetch",{...o,endTimestamp:q()*1e3,response:c}),c),c=>{if(ee("fetch",{...o,endTimestamp:q()*1e3,error:c}),ns(c)&&c.stack===void 0&&(c.stack=s.stack,et(c,"framesToPop",1)),c instanceof TypeError&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{const u=new URL(o.fetchData.url);c.message=`${c.message} (${u.host})`}catch{}throw c})}})}async function ec(t,e){if(t!=null&&t.body){const n=t.body,r=n.getReader(),s=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let a=!0;for(;a;){let i;try{i=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:o}=await r.read();clearTimeout(i),o&&(e(),a=!1)}catch{a=!1}finally{clearTimeout(i)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}function tc(t){let e;try{e=t.clone()}catch{return}ec(e,()=>{ee("fetch-body-resolved",{endTimestamp:q()*1e3,response:t})})}function vn(t,e){return!!t&&typeof t=="object"&&!!t[e]}function Nr(t){return typeof t=="string"?t:t?vn(t,"url")?t.url:t.toString?t.toString():"":""}function nc(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){const[n,r]=t;return{url:Nr(n),method:vn(r,"method")?String(r.method).toUpperCase():"GET"}}const e=t[0];return{url:Nr(e),method:vn(e,"method")?String(e.method).toUpperCase():"GET"}}function rc(t){const[e,n]=t;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(ts(e))return new Headers(e.headers)}catch{}}function sc(){return"npm"}const T=F;let bn=0;function Ls(){return bn>0}function ac(){bn++,setTimeout(()=>{bn--})}function $e(t,e={}){function n(s){return typeof s=="function"}if(!n(t))return t;try{const s=t.__sentry_wrapped__;if(s)return typeof s=="function"?s:t;if(xn(t))return t}catch{return t}const r=function(...s){try{const a=s.map(i=>$e(i,e));return t.apply(this,a)}catch(a){throw ac(),Ht(i=>{i.addEventProcessor(o=>(e.mechanism&&(hn(o,void 0),tt(o,e.mechanism)),o.extra={...o.extra,arguments:s},o)),rs(a)}),a}};try{for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])}catch{}Na(r,t),et(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}function $n(){const t=ot(),{referrer:e}=T.document||{},{userAgent:n}=T.navigator||{},r={...e&&{Referer:e},...n&&{"User-Agent":n}};return{url:t,headers:r}}function Bn(t,e){const n=Un(t,e),r={type:dc(e),value:fc(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function ic(t,e,n,r){const s=k(),a=s==null?void 0:s.getOptions().normalizeDepth,i=hc(e),o={__serialized__:Ca(e,a)};if(i)return{exception:{values:[Bn(t,i)]},extra:o};const c={exception:{values:[{type:Dn(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:mc(e,{isUnhandledRejection:r})}]},extra:o};if(n){const u=Un(t,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function an(t,e){return{exception:{values:[Bn(t,e)]}}}function Un(t,e){const n=e.stacktrace||e.stack||"",r=cc(e),s=uc(e);try{return t(n,r,s)}catch{}return[]}const oc=/Minified React error #\d+;/i;function cc(t){return t&&oc.test(t.message)?1:0}function uc(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function Cs(t){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?t instanceof WebAssembly.Exception:!1}function dc(t){const e=t==null?void 0:t.name;return!e&&Cs(t)?t.message&&Array.isArray(t.message)&&t.message.length==2?t.message[0]:"WebAssembly.Exception":e}function fc(t){const e=t==null?void 0:t.message;return Cs(t)?Array.isArray(t.message)&&t.message.length==2?t.message[1]:"wasm exception":e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function lc(t,e,n,r){const s=(n==null?void 0:n.syntheticException)||void 0,a=qn(t,e,s,r);return tt(a),a.level="error",n!=null&&n.event_id&&(a.event_id=n.event_id),Ce(a)}function pc(t,e,n="info",r,s){const a=(r==null?void 0:r.syntheticException)||void 0,i=In(t,e,a,s);return i.level=n,r!=null&&r.event_id&&(i.event_id=r.event_id),Ce(i)}function qn(t,e,n,r,s){let a;if(ss(e)&&e.error)return an(t,e.error);if(ar(e)||La(e)){const i=e;if("stack"in e)a=an(t,e);else{const o=i.name||(ar(i)?"DOMError":"DOMException"),c=i.message?`${o}: ${i.message}`:o;a=In(t,c,n,r),hn(a,c)}return"code"in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return ns(e)?an(t,e):gn(e)||Dn(e)?(a=ic(t,e,n,s),tt(a,{synthetic:!0}),a):(a=In(t,e,n,r),hn(a,`${e}`),tt(a,{synthetic:!0}),a)}function In(t,e,n,r){const s={};if(r&&n){const a=Un(t,n);a.length&&(s.exception={values:[{value:e,stacktrace:{frames:a}}]}),tt(s,{synthetic:!0})}if(Zr(e)){const{__sentry_template_string__:a,__sentry_template_values__:i}=e;return s.logentry={message:a,params:i},s}return s.message=e,s}function mc(t,{isUnhandledRejection:e}){const n=Oa(t),r=e?"promise rejection":"exception";return ss(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:Dn(t)?`Event \`${gc(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function gc(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function hc(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];if(n instanceof Error)return n}}const _c=5e3;class Sc extends Ji{constructor(e){var o;const n=Ec(e),r=T.SENTRY_SDK_SOURCE||sc();Hn(n,"browser",["browser"],r),(o=n._metadata)!=null&&o.sdk&&(n._metadata.sdk.settings={infer_ip:n.sendDefaultPii?"auto":"never",...n._metadata.sdk.settings}),super(n);const{sendDefaultPii:s,sendClientReports:a,enableLogs:i}=this._options;T.document&&(a||i)&&T.document.addEventListener("visibilitychange",()=>{T.document.visibilityState==="hidden"&&(a&&this._flushOutcomes(),i&&sn(this))}),i&&(this.on("flush",()=>{sn(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{sn(this)},_c)})),s&&this.on("beforeSendSession",ho)}eventFromException(e,n){return lc(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return pc(this._options.stackParser,e,n,r,this._options.attachStacktrace)}_prepareEvent(e,n,r,s){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r,s)}}function Ec(t){var e;return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(e=T.SENTRY_RELEASE)==null?void 0:e.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...t}}const Vt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,_=F,Tc=(t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good",ct=(t,e,n,r)=>{let s,a;return i=>{e.value>=0&&(i||r)&&(a=e.value-(s??0),(a||s===void 0)&&(s=e.value,e.delta=a,e.rating=Tc(e.value,n),t(e)))}},yc=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,ut=(t=!0)=>{var n,r;const e=(r=(n=_.performance)==null?void 0:n.getEntriesByType)==null?void 0:r.call(n,"navigation")[0];if(!t||e&&e.responseStart>0&&e.responseStart{const t=ut();return(t==null?void 0:t.activationStart)??0},dt=(t,e=-1)=>{var a,i;const n=ut();let r="navigate";return n&&((a=_.document)!=null&&a.prerendering||je()>0?r="prerender":(i=_.document)!=null&&i.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e,rating:"good",delta:0,entries:[],id:yc(),navigationType:r}},on=new WeakMap;function jn(t,e){return on.get(t)||on.set(t,new e),on.get(t)}class Ot{constructor(){Ot.prototype.__init.call(this),Ot.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(e){var s;if(e.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&e.startTime-r.startTime<1e3&&e.startTime-n.startTime<5e3?(this._sessionValue+=e.value,this._sessionEntries.push(e)):(this._sessionValue=e.value,this._sessionEntries=[e]),(s=this._onAfterProcessingUnexpectedShift)==null||s.call(this,e)}}const Ve=(t,e,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(s=>{Promise.resolve().then(()=>{e(s.getEntries())})});return r.observe({type:t,buffered:!0,...n}),r}}catch{}},Vn=t=>{let e=!1;return()=>{e||(t(),e=!0)}};let Ke=-1;const vc=()=>{var t,e;return((t=_.document)==null?void 0:t.visibilityState)==="hidden"&&!((e=_.document)!=null&&e.prerendering)?0:1/0},xt=t=>{_.document.visibilityState==="hidden"&&Ke>-1&&(Ke=t.type==="visibilitychange"?t.timeStamp:0,Ic())},bc=()=>{addEventListener("visibilitychange",xt,!0),addEventListener("prerenderingchange",xt,!0)},Ic=()=>{removeEventListener("visibilitychange",xt,!0),removeEventListener("prerenderingchange",xt,!0)},Wn=()=>{var t;if(_.document&&Ke<0){const e=je();Ke=(_.document.prerendering||(t=globalThis.performance.getEntriesByType("visibility-state").filter(r=>r.name==="hidden"&&r.startTime>e)[0])==null?void 0:t.startTime)??vc(),bc()}return{get firstHiddenTime(){return Ke}}},Wt=t=>{var e;(e=_.document)!=null&&e.prerendering?addEventListener("prerenderingchange",()=>t(),!0):t()},Rc=[1800,3e3],wc=(t,e={})=>{Wt(()=>{const n=Wn(),r=dt("FCP");let s;const i=Ve("paint",o=>{for(const c of o)c.name==="first-contentful-paint"&&(i.disconnect(),c.startTime{wc(Vn(()=>{var o,c;const n=dt("CLS",0);let r;const s=jn(e,Ot),a=u=>{for(const f of u)s._processEntry(f);s._sessionValue>n.value&&(n.value=s._sessionValue,n.entries=s._sessionEntries,r())},i=Ve("layout-shift",a);i&&(r=ct(t,n,Ac,e.reportAllChanges),(o=_.document)==null||o.addEventListener("visibilitychange",()=>{var u;((u=_.document)==null?void 0:u.visibilityState)==="hidden"&&(a(i.takeRecords()),r(!0))}),(c=_==null?void 0:_.setTimeout)==null||c.call(_,r))}))};let Os=0,cn=1/0,gt=0;const kc=t=>{t.forEach(e=>{e.interactionId&&(cn=Math.min(cn,e.interactionId),gt=Math.max(gt,e.interactionId),Os=gt?(gt-cn)/7+1:0)})};let Rn;const xs=()=>Rn?Os:performance.interactionCount||0,Nc=()=>{"interactionCount"in performance||Rn||(Rn=Ve("event",kc,{type:"event",buffered:!0,durationThreshold:0}))},un=10;let Ds=0;const Lc=()=>xs()-Ds;class Dt{constructor(){Dt.prototype.__init.call(this),Dt.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){Ds=xs(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const e=Math.min(this._longestInteractionList.length-1,Math.floor(Lc()/50));return this._longestInteractionList[e]}_processEntry(e){var s,a;if((s=this._onBeforeProcessingEntry)==null||s.call(this,e),!(e.interactionId||e.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(e.interactionId);if(r||this._longestInteractionList.lengthn._latency){if(r?e.duration>r._latency?(r.entries=[e],r._latency=e.duration):e.duration===r._latency&&e.startTime===r.entries[0].startTime&&r.entries.push(e):(r={id:e.interactionId,entries:[e],_latency:e.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((i,o)=>o._latency-i._latency),this._longestInteractionList.length>un){const i=this._longestInteractionList.splice(un);for(const o of i)this._longestInteractionMap.delete(o.id)}(a=this._onAfterProcessingINPCandidate)==null||a.call(this,r)}}}const Gn=t=>{const e=n=>{var r;(n.type==="pagehide"||((r=_.document)==null?void 0:r.visibilityState)==="hidden")&&t(n)};_.document&&(addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0))},Fs=t=>{var n;const e=_.requestIdleCallback||_.setTimeout;((n=_.document)==null?void 0:n.visibilityState)==="hidden"?t():(t=Vn(t),e(t),Gn(t))},Cc=[200,500],Oc=40,xc=(t,e={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&Wt(()=>{Nc();const n=dt("INP");let r;const s=jn(e,Dt),a=o=>{Fs(()=>{for(const u of o)s._processEntry(u);const c=s._estimateP98LongestInteraction();c&&c._latency!==n.value&&(n.value=c._latency,n.entries=c.entries,r())})},i=Ve("event",a,{durationThreshold:e.durationThreshold??Oc});r=ct(t,n,Cc,e.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),Gn(()=>{a(i.takeRecords()),r(!0)}))})};class Dc{_processEntry(e){var n;(n=this._onBeforeProcessingEntry)==null||n.call(this,e)}}const Fc=[2500,4e3],Mc=(t,e={})=>{Wt(()=>{const n=Wn(),r=dt("LCP");let s;const a=jn(e,Dc),i=c=>{e.reportAllChanges||(c=c.slice(-1));for(const u of c)a._processEntry(u),u.startTime{i(o.takeRecords()),o.disconnect(),s(!0)});for(const u of["keydown","click","visibilitychange"])_.document&&addEventListener(u,()=>Fs(c),{capture:!0,once:!0})}})},Hc=[800,1800],wn=t=>{var e,n;(e=_.document)!=null&&e.prerendering?Wt(()=>wn(t)):((n=_.document)==null?void 0:n.readyState)!=="complete"?addEventListener("load",()=>wn(t),!0):setTimeout(t)},$c=(t,e={})=>{const n=dt("TTFB"),r=ct(t,n,Hc,e.reportAllChanges);wn(()=>{const s=ut();s&&(n.value=Math.max(s.responseStart-je(),0),n.entries=[s],r(!0))})},Qe={},Ft={};let Ms,Hs,$s,Bs;function Us(t,e=!1){return Gt("cls",t,qc,Ms,e)}function qs(t,e=!1){return Gt("lcp",t,jc,Hs,e)}function Bc(t){return Gt("ttfb",t,Vc,$s)}function Uc(t){return Gt("inp",t,Wc,Bs)}function Be(t,e){return js(t,e),Ft[t]||(Gc(t),Ft[t]=!0),Vs(t,e)}function ft(t,e){const n=Qe[t];if(n!=null&&n.length)for(const r of n)try{r(e)}catch(s){Vt&&g.error(`Error while triggering instrumentation handler. -Type: ${t} -Name: ${_e(r)} -Error:`,s)}}function qc(){return Pc(t=>{ft("cls",{metric:t}),Ms=t},{reportAllChanges:!0})}function jc(){return Mc(t=>{ft("lcp",{metric:t}),Hs=t},{reportAllChanges:!0})}function Vc(){return $c(t=>{ft("ttfb",{metric:t}),$s=t})}function Wc(){return xc(t=>{ft("inp",{metric:t}),Bs=t})}function Gt(t,e,n,r,s=!1){js(t,e);let a;return Ft[t]||(a=n(),Ft[t]=!0),r&&e({metric:r}),Vs(t,e,s?a:void 0)}function Gc(t){const e={};t==="event"&&(e.durationThreshold=0),Ve(t,n=>{ft(t,{entries:n})},e)}function js(t,e){Qe[t]=Qe[t]||[],Qe[t].push(e)}function Vs(t,e,n){return()=>{n&&n();const r=Qe[t];if(!r)return;const s=r.indexOf(e);s!==-1&&r.splice(s,1)}}function Yc(t){return"duration"in t}function dn(t){return typeof t=="number"&&isFinite(t)}function Te(t,e,n,{...r}){const s=R(t).start_timestamp;return s&&s>e&&typeof t.updateStartTime=="function"&&t.updateStartTime(e),Fn(t,()=>{const a=xe({startTime:e,...r});return a&&a.end(n),a})}function Yn(t){var x;const e=k();if(!e)return;const{name:n,transaction:r,attributes:s,startTime:a}=t,{release:i,environment:o,sendDefaultPii:c}=e.getOptions(),u=e.getIntegrationByName("Replay"),f=u==null?void 0:u.getReplayId(),d=C(),p=d.getUser(),l=p!==void 0?p.email||p.id||p.ip_address:void 0;let m;try{m=d.getScopeData().contexts.profile.profile_id}catch{}const h={release:i,environment:o,user:l||void 0,profile_id:m||void 0,replay_id:f||void 0,transaction:r,"user_agent.original":(x=_.navigator)==null?void 0:x.userAgent,"client.address":c?"{{auto}}":void 0,...s};return xe({name:n,attributes:h,startTime:a,experimental:{standalone:!0}})}function Yt(){return _.addEventListener&&_.performance}function O(t){return t/1e3}function Ws(t){let e="unknown",n="unknown",r="";for(const s of t){if(s==="/"){[e,n]=t.split("/");break}if(!isNaN(Number(s))){e=r==="h"?"http":r,n=t.split(r)[1];break}r+=s}return r===t&&(e=r),{name:e,version:n}}function Gs(t){try{return PerformanceObserver.supportedEntryTypes.includes(t)}catch{return!1}}function Ys(t,e){let n,r=!1;function s(o){!r&&n&&e(o,n),r=!0}Gn(()=>{s("pagehide")});const a=t.on("beforeStartNavigationSpan",(o,c)=>{c!=null&&c.isRedirect||(s("navigation"),Lr(a,i))}),i=t.on("afterStartPageLoadSpan",o=>{n=o.spanContext().spanId,Lr(i)})}function Lr(...t){t.forEach(e=>e&&setTimeout(e,0))}function zc(t){let e=0,n;if(!Gs("layout-shift"))return;const r=Us(({metric:s})=>{const a=s.entries[s.entries.length-1];a&&(e=s.value,n=a)},!0);Ys(t,(s,a)=>{Xc(e,n,a,s),r()})}function Xc(t,e,n,r){var u;Vt&&g.log(`Sending CLS span (${t})`);const s=O((Y()||0)+((e==null?void 0:e.startTime)||0)),a=C().getScopeData().transactionName,i=e?pe((u=e.sources[0])==null?void 0:u.node):"Layout shift",o={[D]:"auto.http.browser.cls",[Se]:"ui.webvital.cls",[Ue]:(e==null?void 0:e.duration)||0,"sentry.pageload.span_id":n,"sentry.report_event":r};e!=null&&e.sources&&e.sources.forEach((f,d)=>{o[`cls.source.${d+1}`]=pe(f.node)});const c=Yn({name:i,transaction:a,attributes:o,startTime:s});c&&(c.addEvent("cls",{[at]:"",[it]:t}),c.end(s))}function Jc(t){let e=0,n;if(!Gs("largest-contentful-paint"))return;const r=qs(({metric:s})=>{const a=s.entries[s.entries.length-1];a&&(e=s.value,n=a)},!0);Ys(t,(s,a)=>{Kc(e,n,a,s),r()})}function Kc(t,e,n,r){Vt&&g.log(`Sending LCP span (${t})`);const s=O((Y()||0)+((e==null?void 0:e.startTime)||0)),a=C().getScopeData().transactionName,i=e?pe(e.element):"Largest contentful paint",o={[D]:"auto.http.browser.lcp",[Se]:"ui.webvital.lcp",[Ue]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};e&&(e.element&&(o["lcp.element"]=pe(e.element)),e.id&&(o["lcp.id"]=e.id),e.url&&(o["lcp.url"]=e.url.trim().slice(0,200)),e.loadTime!=null&&(o["lcp.loadTime"]=e.loadTime),e.renderTime!=null&&(o["lcp.renderTime"]=e.renderTime),e.size!=null&&(o["lcp.size"]=e.size));const c=Yn({name:i,transaction:a,attributes:o,startTime:s});c&&(c.addEvent("lcp",{[at]:"millisecond",[it]:t}),c.end(s))}const Qc=2147483647;let Cr=0,re={},U,De;function Zc({recordClsStandaloneSpans:t,recordLcpStandaloneSpans:e,client:n}){const r=Yt();if(r&&Y()){r.mark&&_.performance.mark("sentry-tracing-init");const s=e?Jc(n):su(),a=au(),i=t?zc(n):ru();return()=>{s==null||s(),a(),i==null||i()}}return()=>{}}function eu(){Be("longtask",({entries:t})=>{const e=G();if(!e)return;const{op:n,start_timestamp:r}=R(e);for(const s of t){const a=O(Y()+s.startTime),i=O(s.duration);n==="navigation"&&r&&a{const n=G();if(n)for(const r of e.getEntries()){if(!r.scripts[0])continue;const s=O(Y()+r.startTime),{start_timestamp:a,op:i}=R(n);if(i==="navigation"&&a&&s{const e=G();if(e){for(const n of t)if(n.name==="click"){const r=O(Y()+n.startTime),s=O(n.duration),a={name:pe(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[D]:"auto.ui.browser.metrics"}},i=as(n.target);i&&(a.attributes["ui.component_name"]=i),Te(e,r,r+s,a)}}})}function ru(){return Us(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(re.cls={value:t.value,unit:""},De=e)},!0)}function su(){return qs(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(re.lcp={value:t.value,unit:"millisecond"},U=e)},!0)}function au(){return Bc(({metric:t})=>{t.entries[t.entries.length-1]&&(re.ttfb={value:t.value,unit:"millisecond"})})}function iu(t,e){const n=Yt(),r=Y();if(!(n!=null&&n.getEntries)||!r)return;const s=O(r),a=n.getEntries(),{op:i,start_timestamp:o}=R(t);a.slice(Cr).forEach(c=>{const u=O(c.startTime),f=O(Math.max(0,c.duration));if(!(i==="navigation"&&o&&s+u{Ri(c,u.value,u.unit)}),t.setAttribute("performance.timeOrigin",s),t.setAttribute("performance.activationStart",je()),mu(t,e)),U=void 0,De=void 0,re={}}function ou(t,e,n,r,s,a){if(["mark","measure"].includes(e.entryType)&&he(e.name,a))return;const i=ut(!1),o=O(i?i.requestStart:0),c=s+Math.max(n,o),u=s+n,f=u+r,d={[D]:"auto.resource.browser.metrics"};c!==u&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=c),cu(d,e),c<=f&&Te(t,c,f,{name:e.name,op:e.entryType,attributes:d})}function cu(t,e){try{const n=e.detail;if(!n)return;if(typeof n=="object"){for(const[r,s]of Object.entries(n))if(s&&Ze(s))t[`sentry.browser.measure.detail.${r}`]=s;else if(s!==void 0)try{t[`sentry.browser.measure.detail.${r}`]=JSON.stringify(s)}catch{}return}if(Ze(n)){t["sentry.browser.measure.detail"]=n;return}try{t["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function uu(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{ht(t,e,r,n)}),ht(t,e,"secureConnection",n,"TLS/SSL"),ht(t,e,"fetch",n,"cache"),ht(t,e,"domainLookup",n,"DNS"),fu(t,e,n)}function ht(t,e,n,r,s=n){const a=du(n),i=e[a],o=e[`${n}Start`];!o||!i||Te(t,r+O(o),r+O(i),{op:`browser.${s}`,name:e.name,attributes:{[D]:"auto.ui.browser.metrics",...n==="redirect"&&e.redirectCount!=null?{"http.redirect_count":e.redirectCount}:{}}})}function du(t){return t==="secureConnection"?"connectEnd":t==="fetch"?"domainLookupStart":`${t}End`}function fu(t,e,n){const r=n+O(e.requestStart),s=n+O(e.responseEnd),a=n+O(e.responseStart);e.responseEnd&&(Te(t,r,s,{op:"browser.request",name:e.name,attributes:{[D]:"auto.ui.browser.metrics"}}),Te(t,a,s,{op:"browser.response",name:e.name,attributes:{[D]:"auto.ui.browser.metrics"}}))}function lu(t,e,n,r,s,a,i){if(e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch")return;const o=e.initiatorType?`resource.${e.initiatorType}`:"resource.other";if(i!=null&&i.includes(o))return;const c=ke(n),u={[D]:"auto.resource.browser.metrics"};fn(u,e,"transferSize","http.response_transfer_size"),fn(u,e,"encodedBodySize","http.response_content_length"),fn(u,e,"decodedBodySize","http.decoded_response_content_length");const f=e.deliveryType;f!=null&&(u["http.response_delivery_type"]=f);const d=e.renderBlockingStatus;if(d&&(u["resource.render_blocking_status"]=d),c.protocol&&(u["url.scheme"]=c.protocol.split(":").pop()),c.host&&(u["server.address"]=c.host),u["url.same_origin"]=n.includes(_.location.origin),e.nextHopProtocol!=null){const{name:m,version:h}=Ws(e.nextHopProtocol);u["network.protocol.name"]=m,u["network.protocol.version"]=h}const p=a+r,l=p+s;Te(t,p,l,{name:n.replace(_.location.origin,""),op:o,attributes:u})}function pu(t){const e=_.navigator;if(!e)return;const n=e.connection;n&&(n.effectiveType&&t.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&t.setAttribute("connectionType",n.type),dn(n.rtt)&&(re["connection.rtt"]={value:n.rtt,unit:"millisecond"})),dn(e.deviceMemory)&&t.setAttribute("deviceMemory",`${e.deviceMemory} GB`),dn(e.hardwareConcurrency)&&t.setAttribute("hardwareConcurrency",String(e.hardwareConcurrency))}function mu(t,e){U&&e.recordLcpOnPageloadSpan&&(U.element&&t.setAttribute("lcp.element",pe(U.element)),U.id&&t.setAttribute("lcp.id",U.id),U.url&&t.setAttribute("lcp.url",U.url.trim().slice(0,200)),U.loadTime!=null&&t.setAttribute("lcp.loadTime",U.loadTime),U.renderTime!=null&&t.setAttribute("lcp.renderTime",U.renderTime),t.setAttribute("lcp.size",U.size)),De!=null&&De.sources&&e.recordClsOnPageloadSpan&&De.sources.forEach((n,r)=>t.setAttribute(`cls.source.${r+1}`,pe(n.node)))}function fn(t,e,n,r){const s=e[n];s!=null&&s{}}const _u=({entries:t})=>{const e=G(),n=e?W(e):void 0,r=n?R(n).description:C().getScopeData().transactionName;t.forEach(s=>{var l,m;const a=s;if(!a.identifier)return;const i=a.name,o=a.renderTime,c=a.loadTime,[u,f]=c?[O(c),"load-time"]:o?[O(o),"render-time"]:[q(),"entry-emission"],d=i==="image-paint"?O(Math.max(0,(o??0)-(c??0))):0,p={[D]:"auto.ui.browser.elementtiming",[Se]:"ui.elementtiming",[Z]:"component","sentry.span_start_time_source":f,"sentry.transaction_name":r,"element.id":a.id,"element.type":((m=(l=a.element)==null?void 0:l.tagName)==null?void 0:m.toLowerCase())||"unknown","element.size":a.naturalWidth&&a.naturalHeight?`${a.naturalWidth}x${a.naturalHeight}`:void 0,"element.render_time":o,"element.load_time":c,"element.url":a.url||void 0,"element.identifier":a.identifier,"element.paint_type":i};Li({name:`element[${a.identifier}]`,attributes:p,startTime:u,onlyIfParent:!0},h=>{h.end(u+d)})})},Su=1e3;let Or,An,Pn;function Eu(t){ye("dom",t),ve("dom",Tu)}function Tu(){if(!_.document)return;const t=ee.bind(null,"dom"),e=xr(t,!0);_.document.addEventListener("click",e,!1),_.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{var a,i;const s=(a=_[n])==null?void 0:a.prototype;(i=s==null?void 0:s.hasOwnProperty)!=null&&i.call(s,"addEventListener")&&(V(s,"addEventListener",function(o){return function(c,u,f){if(c==="click"||c=="keypress")try{const d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},p=d[c]=d[c]||{refCount:0};if(!p.handler){const l=xr(t);p.handler=l,o.call(this,c,l,f)}p.refCount++}catch{}return o.call(this,c,u,f)}}),V(s,"removeEventListener",function(o){return function(c,u,f){if(c==="click"||c=="keypress")try{const d=this.__sentry_instrumentation_handlers__||{},p=d[c];p&&(p.refCount--,p.refCount<=0&&(o.call(this,c,p.handler,f),p.handler=void 0,delete d[c]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,c,u,f)}}))})}function yu(t){if(t.type!==An)return!1;try{if(!t.target||t.target._sentryId!==Pn)return!1}catch{}return!0}function vu(t,e){return t!=="keypress"?!1:e!=null&&e.tagName?!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable):!0}function xr(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const r=bu(n);if(vu(n.type,r))return;et(n,"_sentryCaptured",!0),r&&!r._sentryId&&et(r,"_sentryId",yt());const s=n.type==="keypress"?"input":n.type;yu(n)||(t({event:n,name:s,global:e}),An=n.type,Pn=r?r._sentryId:void 0),clearTimeout(Or),Or=_.setTimeout(()=>{Pn=void 0,An=void 0},Su)}}function bu(t){try{return t.target}catch{return null}}let _t;function zn(t){const e="history";ye(e,t),ve(e,Iu)}function Iu(){if(_.addEventListener("popstate",()=>{const e=_.location.href,n=_t;if(_t=e,n===e)return;ee("history",{from:n,to:e})}),!Jo())return;function t(e){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const s=_t,a=Ru(String(r));if(_t=a,s===a)return e.apply(this,n);ee("history",{from:s,to:a})}return e.apply(this,n)}}V(_.history,"pushState",t),V(_.history,"replaceState",t)}function Ru(t){try{return new URL(t,_.location.origin).toString()}catch{return t}}const wt={};function wu(t){const e=wt[t];if(e)return e;let n=_[t];if(yn(n))return wt[t]=n.bind(_);const r=_.document;if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const a=s.contentWindow;a!=null&&a[t]&&(n=a[t]),r.head.removeChild(s)}catch(s){Vt&&g.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,s)}return n&&(wt[t]=n.bind(_))}function Dr(t){wt[t]=void 0}const Fe="__sentry_xhr_v3__";function zs(t){ye("xhr",t),ve("xhr",Au)}function Au(){if(!_.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(e,n,r){const s=new Error,a=q()*1e3,i=Je(r[0])?r[0].toUpperCase():void 0,o=Pu(r[1]);if(!i||!o)return e.apply(n,r);n[Fe]={method:i,url:o,request_headers:{}},i==="POST"&&o.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const u=n[Fe];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const f={endTimestamp:q()*1e3,startTimestamp:a,xhr:n,virtualError:s};ee("xhr",f)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,f,d){return c(),u.apply(f,d)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,f,d){const[p,l]=d,m=f[Fe];return m&&Je(p)&&Je(l)&&(m.request_headers[p.toLowerCase()]=l),u.apply(f,d)}}),e.apply(n,r)}}),t.send=new Proxy(t.send,{apply(e,n,r){const s=n[Fe];if(!s)return e.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const a={startTimestamp:q()*1e3,xhr:n};return ee("xhr",a),e.apply(n,r)}})}function Pu(t){if(Je(t))return t;try{return t.toString()}catch{}}const ln=[],At=new Map,ku=60;function Nu(){if(Yt()&&Y()){const e=Lu();return()=>{e()}}return()=>{}}const Fr={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function Lu(){return Uc(Cu)}const Cu=({metric:t})=>{if(t.value==null)return;const e=O(t.value);if(e>ku)return;const n=t.entries.find(m=>m.duration===t.value&&Fr[m.name]);if(!n)return;const{interactionId:r}=n,s=Fr[n.name],a=O(Y()+n.startTime),i=G(),o=i?W(i):void 0,u=(r!=null?At.get(r):void 0)||o,f=u?R(u).description:C().getScopeData().transactionName,d=pe(n.target),p={[D]:"auto.http.browser.inp",[Se]:`ui.interaction.${s}`,[Ue]:n.duration},l=Yn({name:d,transaction:f,attributes:p,startTime:a});l&&(l.addEvent("inp",{[at]:"millisecond",[it]:t.value}),l.end(a+e))};function Ou(){const t=({entries:e})=>{const n=G(),r=n&&W(n);e.forEach(s=>{if(!Yc(s)||!r)return;const a=s.interactionId;if(a!=null&&!At.has(a)){if(ln.length>10){const i=ln.shift();At.delete(i)}ln.push(a),At.set(a,r)}})};Be("event",t),Be("first-input",t)}function xu(t,e=wu("fetch")){let n=0,r=0;function s(a){const i=a.body.length;n+=i,r++;const o={body:a.body,method:"POST",referrerPolicy:"strict-origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};if(!e)return Dr("fetch"),Nt("No fetch implementation available");try{return e(t.url,o).then(c=>(n-=i,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return Dr("fetch"),n-=i,r--,Nt(c)}}return lo(t,s)}const Du=30,Fu=50;function kn(t,e,n,r){const s={filename:t,function:e===""?He:e,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const Mu=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Hu=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,$u=/\((\S*)(?::(\d+))(?::(\d+))\)/,Bu=/at (.+?) ?\(data:(.+?),/,Uu=t=>{const e=t.match(Bu);if(e)return{filename:``,function:e[1]};const n=Mu.exec(t);if(n){const[,s,a,i]=n;return kn(s,He,+a,+i)}const r=Hu.exec(t);if(r){if(r[2]&&r[2].indexOf("eval")===0){const o=$u.exec(r[2]);o&&(r[2]=o[1],r[3]=o[2],r[4]=o[3])}const[a,i]=Xs(r[1]||He,r[2]);return kn(i,a,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},qu=[Du,Uu],ju=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Vu=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Wu=t=>{const e=ju.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const a=Vu.exec(e[3]);a&&(e[1]=e[1]||"eval",e[3]=a[1],e[4]=a[2],e[5]="")}let r=e[3],s=e[1]||He;return[s,r]=Xs(s,r),kn(r,s,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},Gu=[Fu,Wu],Yu=[qu,Gu],zu=xa(...Yu),Xs=(t,e)=>{const n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:He,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},te=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,St=1024,Xu="Breadcrumbs",Ju=((t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:Xu,setup(n){e.console&&Do(ed(n)),e.dom&&Eu(Zu(n,e.dom)),e.xhr&&zs(td(n)),e.fetch&&ks(nd(n)),e.history&&zn(rd(n)),e.sentry&&n.on("beforeSendEvent",Qu(n))}}}),Ku=Ju;function Qu(t){return function(n){k()===t&&Oe({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Pe(n)},{event:n})}}function Zu(t,e){return function(r){if(k()!==t)return;let s,a,i=typeof e=="object"?e.serializeAttribute:void 0,o=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;o&&o>St&&(te&&g.warn(`\`dom.maxStringLength\` cannot exceed ${St}, but a value of ${o} was configured. Sentry will use ${St} instead.`),o=St),typeof i=="string"&&(i=[i]);try{const u=r.event,f=sd(u)?u.target:u;s=pe(f,{keyAttrs:i,maxStringLength:o}),a=as(f)}catch{s=""}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};a&&(c.data={"ui.component_name":a}),Oe(c,{event:r.event,name:r.name,global:r.global})}}function ed(t){return function(n){if(k()!==t)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:Mo(n.level),message:ir(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${ir(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Oe(r,{input:n.args,level:n.level})}}function td(t){return function(n){if(k()!==t)return;const{startTimestamp:r,endTimestamp:s}=n,a=n.xhr[Fe];if(!r||!s||!a)return;const{method:i,url:o,status_code:c,body:u}=a,f={method:i,url:o,status_code:c},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s},p={category:"xhr",data:f,type:"http",level:Ps(c)};t.emit("beforeOutgoingRequestBreadcrumb",p,d),Oe(p,d)}}function nd(t){return function(n){if(k()!==t)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){const a=n.fetchData,i={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s},o={category:"fetch",data:a,level:"error",type:"http"};t.emit("beforeOutgoingRequestBreadcrumb",o,i),Oe(o,i)}else{const a=n.response,i={...n.fetchData,status_code:a==null?void 0:a.status};n.fetchData.request_body_size,n.fetchData.response_body_size,a==null||a.status;const o={input:n.args,response:a,startTimestamp:r,endTimestamp:s},c={category:"fetch",data:i,type:"http",level:Ps(i.status_code)};t.emit("beforeOutgoingRequestBreadcrumb",c,o),Oe(c,o)}}}function rd(t){return function(n){if(k()!==t)return;let r=n.from,s=n.to;const a=ke(T.location.href);let i=r?ke(r):void 0;const o=ke(s);i!=null&&i.path||(i=a),a.protocol===o.protocol&&a.host===o.host&&(s=o.relative),a.protocol===i.protocol&&a.host===i.host&&(r=i.relative),Oe({category:"navigation",data:{from:r,to:s}})}}function sd(t){return!!t&&!!t.target}const ad=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],id="BrowserApiErrors",od=((t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...t};return{name:id,setupOnce(){e.setTimeout&&V(T,"setTimeout",Mr),e.setInterval&&V(T,"setInterval",Mr),e.requestAnimationFrame&&V(T,"requestAnimationFrame",ud),e.XMLHttpRequest&&"XMLHttpRequest"in T&&V(XMLHttpRequest.prototype,"send",dd);const n=e.eventTarget;n&&(Array.isArray(n)?n:ad).forEach(s=>fd(s,e))}}}),cd=od;function Mr(t){return function(...e){const n=e[0];return e[0]=$e(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${_e(t)}`}}),t.apply(this,e)}}function ud(t){return function(e){return t.apply(this,[$e(e,{mechanism:{data:{handler:_e(t)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function dd(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&V(n,s,function(a){const i={mechanism:{data:{handler:_e(a)},handled:!1,type:`auto.browser.browserapierrors.xhr.${s}`}},o=xn(a);return o&&(i.mechanism.data.handler=_e(o)),$e(a,i)})}),t.apply(this,e)}}function fd(t,e){var s,a;const r=(s=T[t])==null?void 0:s.prototype;(a=r==null?void 0:r.hasOwnProperty)!=null&&a.call(r,"addEventListener")&&(V(r,"addEventListener",function(i){return function(o,c,u){try{ld(c)&&(c.handleEvent=$e(c.handleEvent,{mechanism:{data:{handler:_e(c),target:t},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return e.unregisterOriginalCallbacks&&pd(this,o,c),i.apply(this,[o,$e(c,{mechanism:{data:{handler:_e(c),target:t},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),u])}}),V(r,"removeEventListener",function(i){return function(o,c,u){try{const f=c.__sentry_wrapped__;f&&i.call(this,o,f,u)}catch{}return i.call(this,o,c,u)}}))}function ld(t){return typeof t.handleEvent=="function"}function pd(t,e,n){t&&typeof t=="object"&&"removeEventListener"in t&&typeof t.removeEventListener=="function"&&t.removeEventListener(e,n)}const md=()=>({name:"BrowserSession",setupOnce(){if(typeof T.document>"u"){te&&g.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}or({ignoreDuration:!0}),cr(),zn(({from:t,to:e})=>{t!==void 0&&t!==e&&(or({ignoreDuration:!0}),cr())})}}),gd="GlobalHandlers",hd=((t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:gd,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(Sd(n),Hr("onerror")),e.onunhandledrejection&&(Ed(n),Hr("onunhandledrejection"))}}}),_d=hd;function Sd(t){cs(e=>{const{stackParser:n,attachStacktrace:r}=Js();if(k()!==t||Ls())return;const{msg:s,url:a,line:i,column:o,error:c}=e,u=vd(qn(n,c||s,void 0,r,!1),a,i,o);u.level="error",is(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function Ed(t){us(e=>{const{stackParser:n,attachStacktrace:r}=Js();if(k()!==t||Ls())return;const s=Td(e),a=Ze(s)?yd(s):qn(n,s,void 0,r,!0);a.level="error",is(a,{originalException:s,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function Td(t){if(Ze(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}function yd(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function vd(t,e,n,r){const s=t.exception=t.exception||{},a=s.values=s.values||[],i=a[0]=a[0]||{},o=i.stacktrace=i.stacktrace||{},c=o.frames=o.frames||[],u=r,f=n,d=bd(e)??ot();return c.length===0&&c.push({colno:u,filename:d,function:He,in_app:!0,lineno:f}),t}function Hr(t){te&&g.log(`Global Handler attached: ${t}`)}function Js(){const t=k();return(t==null?void 0:t.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}function bd(t){if(!(!Je(t)||t.length===0)){if(t.startsWith("data:")){const e=t.match(/^data:([^;]+)/),n=e?e[1]:"text/javascript",r=t.includes("base64,");return``}return t.slice(0,1024)}}const Id=()=>({name:"HttpContext",preprocessEvent(t){var r;if(!T.navigator&&!T.location&&!T.document)return;const e=$n(),n={...e.headers,...(r=t.request)==null?void 0:r.headers};t.request={...e,...t.request,headers:n}}}),Rd="cause",wd=5,Ad="LinkedErrors",Pd=((t={})=>{const e=t.limit||wd,n=t.key||Rd;return{name:Ad,preprocessEvent(r,s,a){const i=a.getOptions();xo(Bn,i.stackParser,n,e,r,s)}}}),kd=Pd;function Nd(){return Ld()?(te&&qt(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function Ld(){var a;if(typeof T.window>"u")return!1;const t=T;if(t.nw)return!1;const e=t.chrome||t.browser;if(!((a=e==null?void 0:e.runtime)!=null&&a.id))return!1;const n=ot(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(T===T.top&&r.some(i=>n.startsWith(`${i}://`)))}function Nn(t){return[wo(),vo(),cd(),Ku(),_d(),kd(),Bo(),Id(),md()]}function Cd(t={}){const e=!t.skipBrowserExtensionCheck&&Nd(),n={...t,enabled:e?!1:t.enabled,stackParser:Da(t.stackParser||zu),integrations:Wi({integrations:t.integrations,defaultIntegrations:t.defaultIntegrations==null?Nn():t.defaultIntegrations}),transport:t.transport||xu};return no(Sc,n)}function ie(t=0){return((Y()||performance.timeOrigin)+t)/1e3}function Od(t){const e=[];if(t.nextHopProtocol!=null){const{name:n,version:r}=Ws(t.nextHopProtocol);e.push(["network.protocol.version",r],["network.protocol.name",n])}return Y()?[...e,["http.request.redirect_start",ie(t.redirectStart)],["http.request.fetch_start",ie(t.fetchStart)],["http.request.domain_lookup_start",ie(t.domainLookupStart)],["http.request.domain_lookup_end",ie(t.domainLookupEnd)],["http.request.connect_start",ie(t.connectStart)],["http.request.secure_connection_start",ie(t.secureConnectionStart)],["http.request.connection_end",ie(t.connectEnd)],["http.request.request_start",ie(t.requestStart)],["http.request.response_start",ie(t.responseStart)],["http.request.response_end",ie(t.responseEnd)]]:e}const $r=new WeakMap,pn=new Map,Ks={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function xd(t,e){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:s,shouldCreateSpanForRequest:a,enableHTTPTimings:i,tracePropagationTargets:o,onRequestSpanStart:c}={...Ks,...e},u=typeof a=="function"?a:l=>!0,f=l=>Fd(l,o),d={},p=t.getOptions().propagateTraceparent;n&&(t.addEventProcessor(l=>(l.type==="transaction"&&l.spans&&l.spans.forEach(m=>{if(m.op==="http.client"){const h=pn.get(m.span_id);h&&(m.timestamp=h/1e3,pn.delete(m.span_id))}}),l)),s&&Zo(l=>{if(l.response){const m=$r.get(l.response);m&&l.endTimestamp&&pn.set(m,l.endTimestamp)}}),ks(l=>{const m=Vo(l,u,f,d,{propagateTraceparent:p});if(l.response&&l.fetchData.__span&&$r.set(l.response,l.fetchData.__span),m){const h=Qs(l.fetchData.url),x=h?ke(h).host:void 0;m.setAttributes({"http.url":h,"server.address":x}),i&&Br(m),c==null||c(m,{headers:l.headers})}})),r&&zs(l=>{var h;const m=Md(l,u,f,d,p);if(m){i&&Br(m);let x;try{x=new Headers((h=l.xhr.__sentry_xhr_v3__)==null?void 0:h.request_headers)}catch{}c==null||c(m,{headers:x})}})}function Dd(t){return t.entryType==="resource"&&"initiatorType"in t&&typeof t.nextHopProtocol=="string"&&(t.initiatorType==="fetch"||t.initiatorType==="xmlhttprequest")}function Br(t){const{url:e}=R(t).data;if(!e||typeof e!="string")return;const n=Be("resource",({entries:r})=>{r.forEach(s=>{Dd(s)&&s.name.endsWith(e)&&(Od(s).forEach(i=>t.setAttribute(...i)),setTimeout(n))})})}function Fd(t,e){const n=ot();if(n){let r,s;try{r=new URL(t,n),s=new URL(n).origin}catch{return!1}const a=r.origin===s;return e?he(r.toString(),e)||a&&he(r.pathname,e):a}else{const r=!!t.match(/^\/(?!\/)/);return e?he(t,e):r}}function Md(t,e,n,r,s){const a=t.xhr,i=a==null?void 0:a[Fe];if(!a||a.__sentry_own_request__||!i)return;const{url:o,method:c}=i,u=Le()&&e(o);if(t.endTimestamp&&u){const x=a.__sentry_xhr_span_id__;if(!x)return;const I=r[x];I&&i.status_code!==void 0&&(es(I,i.status_code),I.end(),delete r[x]);return}const f=Qs(o),d=ke(f||o),p=go(o),l=!!G(),m=u&&l?xe({name:`${c} ${p}`,attributes:{url:o,type:"xhr","http.method":c,"http.url":f,"server.address":d==null?void 0:d.host,[D]:"auto.http.browser",[Se]:"http.client",...(d==null?void 0:d.search)&&{"http.query":d==null?void 0:d.search},...(d==null?void 0:d.hash)&&{"http.fragment":d==null?void 0:d.hash}}}):new Ee;a.__sentry_xhr_span_id__=m.spanContext().spanId,r[a.__sentry_xhr_span_id__]=m,n(o)&&Hd(a,Le()&&l?m:void 0,s);const h=k();return h&&h.emit("beforeOutgoingRequestSpan",m,t),m}function Hd(t,e,n){const{"sentry-trace":r,baggage:s,traceparent:a}=Rs({span:e,propagateTraceparent:n});r&&$d(t,r,s,a)}function $d(t,e,n,r){var a;const s=(a=t.__sentry_xhr_v3__)==null?void 0:a.request_headers;if(!(s!=null&&s["sentry-trace"]||!t.setRequestHeader))try{if(t.setRequestHeader("sentry-trace",e),r&&!(s!=null&&s.traceparent)&&t.setRequestHeader("traceparent",r),n){const i=s==null?void 0:s.baggage;(!i||!Bd(i))&&t.setRequestHeader("baggage",n)}}catch{}}function Bd(t){return t.split(",").some(e=>e.trim().startsWith("sentry-"))}function Qs(t){try{return new URL(t,T.location.origin).href}catch{return}}function Ud(){T.document?T.document.addEventListener("visibilitychange",()=>{const t=G();if(!t)return;const e=W(t);if(T.document.hidden&&e){const n="cancelled",{op:r,status:s}=R(e);te&&g.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||e.setStatus({code:Me,message:n}),e.setAttribute("sentry.cancellation_reason","document.hidden"),e.end()}}):te&&g.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const qd=3600,Zs="sentry_previous_trace",jd="sentry.previous_trace";function Vd(t,{linkPreviousTrace:e,consistentTraceSampling:n}){const r=e==="session-storage";let s=r?Yd():void 0;t.on("spanStart",i=>{if(W(i)!==i)return;const o=C().getPropagationContext();s=Wd(s,i,o),r&&Gd(s)});let a=!0;n&&t.on("beforeSampling",i=>{if(!s)return;const o=C(),c=o.getPropagationContext();if(a&&c.parentSpanId){a=!1;return}o.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(s.sampleRate),sampled:String(Ln(s.spanContext))},sampleRand:s.sampleRand}),i.parentSampled=Ln(s.spanContext),i.parentSampleRate=s.sampleRate,i.spanAttributes={...i.spanAttributes,[Fa]:s.sampleRate}})}function Wd(t,e,n){const r=R(e);function s(){var o,c;try{return Number((o=n.dsc)==null?void 0:o.sample_rate)??Number((c=r.data)==null?void 0:c[Jr])}catch{return 0}}const a={spanContext:e.spanContext(),startTimestamp:r.start_timestamp,sampleRate:s(),sampleRand:n.sampleRand};if(!t)return a;const i=t.spanContext;return i.traceId===r.trace_id?t:(Date.now()/1e3-t.startTimestamp<=qd&&(te&&g.log(`Adding previous_trace ${i} link to span ${{op:r.op,...e.spanContext()}}`),e.addLink({context:i,attributes:{[Ma]:"previous_trace"}}),e.setAttribute(jd,`${i.traceId}-${i.spanId}-${Ln(i)?1:0}`)),a)}function Gd(t){try{T.sessionStorage.setItem(Zs,JSON.stringify(t))}catch(e){te&&g.warn("Could not store previous trace in sessionStorage",e)}}function Yd(){var t;try{const e=(t=T.sessionStorage)==null?void 0:t.getItem(Zs);return JSON.parse(e)}catch{return}}function Ln(t){return t.traceFlags===1}const zd="BrowserTracing",Xd={...It,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,_experiments:{},...Ks},Jd=((t={})=>{const e={name:void 0,source:void 0},n=T.document,{enableInp:r,enableElementTiming:s,enableLongTask:a,enableLongAnimationFrame:i,_experiments:{enableInteractions:o,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:u},beforeStartSpan:f,idleTimeout:d,finalTimeout:p,childSpanTimeout:l,markBackgroundSpan:m,traceFetch:h,traceXHR:x,trackFetchStreamPerformance:I,shouldCreateSpanForRequest:M,enableHTTPTimings:$,ignoreResourceSpans:oe,ignorePerformanceApiSpans:z,instrumentPageLoad:E,instrumentNavigation:b,detectRedirects:be,linkPreviousTrace:me,consistentTraceSampling:ge,onRequestSpanStart:ce}={...Xd,...t};let N,H;function X(y,A,v=!0){const P=A.op==="pageload",w=A.name,J=f?f(A):A,se=J.attributes||{};if(w!==J.name&&(se[Z]="custom",J.attributes=se),!v){const Ie=Ut();xe({...J,startTime:Ie}).end(Ie);return}e.name=J.name,e.source=se[Z];const ue=gs(J,{idleTimeout:d,finalTimeout:p,childSpanTimeout:l,disableAutoFinish:P,beforeSpanEnd:Ie=>{N==null||N(),iu(Ie,{recordClsOnPageloadSpan:!c,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:oe,ignorePerformanceApiSpans:z}),qr(y,void 0);const de=C(),We=de.getPropagationContext();de.setPropagationContext({...We,traceId:ue.spanContext().traceId,sampled:Mt(ue),dsc:Ne(Ie)})}});qr(y,ue);function lt(){n&&["interactive","complete"].includes(n.readyState)&&y.emit("idleSpanEnableAutoFinish",ue)}P&&n&&(n.addEventListener("readystatechange",()=>{lt()}),lt())}return{name:zd,setup(y){if(ui(),N=Zc({recordClsStandaloneSpans:c||!1,recordLcpStandaloneSpans:u||!1,client:y}),r&&Nu(),s&&hu(),i&&F.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?tu():a&&eu(),o&&nu(),be&&n){const v=()=>{H=q()};addEventListener("click",v,{capture:!0}),addEventListener("keydown",v,{capture:!0,passive:!0})}function A(){const v=rt(y);v&&!R(v).timestamp&&(te&&g.log(`[Tracing] Finishing current active span with op: ${R(v).op}`),v.setAttribute(kt,"cancelled"),v.end())}y.on("startNavigationSpan",(v,P)=>{if(k()!==y)return;if(P!=null&&P.isRedirect){te&&g.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),X(y,{op:"navigation.redirect",...v},!1);return}H=void 0,A(),Bt().setPropagationContext({traceId:Pt(),sampleRand:Math.random()});const w=C();w.setPropagationContext({traceId:Pt(),sampleRand:Math.random()}),w.setSDKProcessingMetadata({normalizedRequest:void 0}),X(y,{op:"navigation",...v})}),y.on("startPageLoadSpan",(v,P={})=>{if(k()!==y)return;A();const w=P.sentryTrace||Ur("sentry-trace"),J=P.baggage||Ur("baggage"),se=Ha(w,J),ue=C();ue.setPropagationContext(se),ue.setSDKProcessingMetadata({normalizedRequest:$n()}),X(y,{op:"pageload",...v})})},afterAllSetup(y){let A=ot();if(me!=="off"&&Vd(y,{linkPreviousTrace:me,consistentTraceSampling:ge}),T.location){if(E){const v=Y();ea(y,{name:T.location.pathname,startTime:v?v/1e3:void 0,attributes:{[Z]:"url",[D]:"auto.pageload.browser"}})}b&&zn(({to:v,from:P})=>{if(P===void 0&&(A==null?void 0:A.indexOf(v))!==-1){A=void 0;return}A=void 0;const w=Is(v),J=rt(y),se=J&&be&&Qd(J,H);ta(y,{name:(w==null?void 0:w.pathname)||T.location.pathname,attributes:{[Z]:"url",[D]:"auto.navigation.browser"}},{url:v,isRedirect:se})})}m&&Ud(),o&&Kd(y,d,p,l,e),r&&Ou(),xd(y,{traceFetch:h,traceXHR:x,trackFetchStreamPerformance:I,tracePropagationTargets:y.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:M,enableHTTPTimings:$,onRequestSpanStart:ce})}}});function ea(t,e,n){t.emit("startPageLoadSpan",e,n),C().setTransactionName(e.name);const r=rt(t);return r&&t.emit("afterStartPageLoadSpan",r),r}function ta(t,e,n){const{url:r,isRedirect:s}=n||{};t.emit("beforeStartNavigationSpan",e,{isRedirect:s}),t.emit("startNavigationSpan",e,{isRedirect:s});const a=C();return a.setTransactionName(e.name),r&&!s&&a.setSDKProcessingMetadata({normalizedRequest:{...$n(),url:r}}),rt(t)}function Ur(t){const e=T.document,n=e==null?void 0:e.querySelector(`meta[name=${t}]`);return(n==null?void 0:n.getAttribute("content"))||void 0}function Kd(t,e,n,r,s){const a=T.document;let i;const o=()=>{const c="ui.action.click",u=rt(t);if(u){const f=R(u).op;if(["navigation","pageload"].includes(f)){te&&g.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(i&&(i.setAttribute(kt,"interactionInterrupted"),i.end(),i=void 0),!s.name){te&&g.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}i=gs({name:s.name,op:c,attributes:{[Z]:s.source||"url"}},{idleTimeout:e,finalTimeout:n,childSpanTimeout:r})};a&&addEventListener("click",o,{capture:!0})}const na="_sentry_idleSpan";function rt(t){return t[na]}function qr(t,e){et(t,na,e)}const jr=1.5;function Qd(t,e){const n=R(t),r=Ut(),s=n.start_timestamp;return!(r-s>jr||e&&r-e<=jr)}function Zd(t){const e={...t};return Hn(e,"svelte"),Cd(e)}const ra=()=>{const t=$a;return{page:{subscribe:t.page.subscribe},navigating:{subscribe:t.navigating.subscribe},updated:t.updated}},ef={subscribe(t){return ra().page.subscribe(t)}},tf={subscribe(t){return ra().navigating.subscribe(t)}};function nf(t={}){const e={...Jd({...t,instrumentNavigation:!1,instrumentPageLoad:!1})};return{...e,afterAllSetup:n=>{e.afterAllSetup(n),t.instrumentPageLoad!==!1&&rf(n),t.instrumentNavigation!==!1&&sf(n)}}}function rf(t){var r;const e=(r=T.location)==null?void 0:r.pathname,n=ea(t,{name:e,op:"pageload",attributes:{[D]:"auto.pageload.sveltekit",[Z]:"url"}});n&&ef.subscribe(s=>{var i;if(!s)return;const a=(i=s.route)==null?void 0:i.id;a&&(n.updateName(a),n.setAttribute(Z,"route"),C().setTransactionName(a))})}function sf(t){let e;tf.subscribe(n=>{var f;if(!n){e&&(e.end(),e=void 0);return}const r=n.from,s=n.to,a=(r==null?void 0:r.url.pathname)||((f=T.location)==null?void 0:f.pathname),i=s==null?void 0:s.url.pathname;if(a===i)return;const o=r==null?void 0:r.route.id,c=s==null?void 0:s.route.id;e&&e.end();const u={"sentry.sveltekit.navigation.type":n.type,"sentry.sveltekit.navigation.from":o||void 0,"sentry.sveltekit.navigation.to":c||void 0};ta(t,{name:c||i||"unknown",op:"navigation",attributes:{[D]:"auto.navigation.sveltekit",[Z]:c?"route":"url",...u}}),e=xe({op:"ui.sveltekit.routing",name:"SvelteKit Route Change",attributes:{[D]:"auto.ui.sveltekit",...u},onlyIfParent:!0})})}function af(t){const e={defaultIntegrations:of(),...t};Hn(e,"sveltekit",["sveltekit","svelte"]);const n=cf(),r=Zd(e);return n&&uf(n),r}function of(t){return typeof __SENTRY_TRACING__>"u"||__SENTRY_TRACING__?[...Nn(),nf()]:Nn()}function cf(){const t=T,e=t.fetch;if(t._sentryFetchProxy&&e)return t.fetch=t._sentryFetchProxy,e}function uf(t){const e=T;e._sentryFetchProxy=e.fetch,e.fetch=t}function df({error:t}){qt(()=>{console.error(t)})}function ff(t){const e=df;return n=>(lf(n)||rs(n.error,{mechanism:{type:"sveltekit",handled:!1}}),e(n))}function lf(t){const{status:e}=t;return e?e>=400&&e<500:!1}af({dsn:"",tracesSampleRate:1,enableLogs:!0,environment:"prod",replaysOnErrorSampleRate:1});const pf=ff(),Lf={};var mf=os('
        '),gf=os(" ",1);function hf(t,e){Va(e,!0);let n=Ye(e,"components",23,()=>[]),r=Ye(e,"data_0",3,null),s=Ye(e,"data_1",3,null),a=Ye(e,"data_2",3,null),i=Ye(e,"data_3",3,null);Wa(()=>e.stores.page.set(e.page)),Ga(()=>{e.stores,e.page,e.constructors,n(),e.form,r(),s(),a(),i(),e.stores.page.notify()});let o=en(!1),c=en(!1),u=en(null);si(()=>{const I=e.stores.page.subscribe(()=>{j(o)&&(vt(c,!0),Ya().then(()=>{vt(u,document.title||"untitled page",!0)}))});return vt(o,!0),I});const f=Re(()=>e.constructors[3]);var d=gf(),p=ae(d);{var l=I=>{const M=Re(()=>e.constructors[0]);var $=fe(),oe=ae($);we(oe,()=>j(M),(z,E)=>{Ae(E(z,{get data(){return r()},get form(){return e.form},get params(){return e.page.params},children:(b,be)=>{var me=fe(),ge=ae(me);{var ce=H=>{const X=Re(()=>e.constructors[1]);var y=fe(),A=ae(y);we(A,()=>j(X),(v,P)=>{Ae(P(v,{get data(){return s()},get form(){return e.form},get params(){return e.page.params},children:(w,J)=>{var se=fe(),ue=ae(se);{var lt=de=>{const We=Re(()=>e.constructors[2]);var Ge=fe(),zt=ae(Ge);we(zt,()=>j(We),(Xt,Jt)=>{Ae(Jt(Xt,{get data(){return a()},get form(){return e.form},get params(){return e.page.params},children:(ne,Ef)=>{var Xn=fe(),sa=ae(Xn);we(sa,()=>j(f),(aa,ia)=>{Ae(ia(aa,{get data(){return i()},get form(){return e.form},get params(){return e.page.params}}),pt=>n()[3]=pt,()=>{var pt;return(pt=n())==null?void 0:pt[3]})}),K(ne,Xn)},$$slots:{default:!0}}),ne=>n()[2]=ne,()=>{var ne;return(ne=n())==null?void 0:ne[2]})}),K(de,Ge)},Ie=de=>{const We=Re(()=>e.constructors[2]);var Ge=fe(),zt=ae(Ge);we(zt,()=>j(We),(Xt,Jt)=>{Ae(Jt(Xt,{get data(){return a()},get form(){return e.form},get params(){return e.page.params}}),ne=>n()[2]=ne,()=>{var ne;return(ne=n())==null?void 0:ne[2]})}),K(de,Ge)};ze(ue,de=>{e.constructors[3]?de(lt):de(Ie,!1)})}K(w,se)},$$slots:{default:!0}}),w=>n()[1]=w,()=>{var w;return(w=n())==null?void 0:w[1]})}),K(H,y)},N=H=>{const X=Re(()=>e.constructors[1]);var y=fe(),A=ae(y);we(A,()=>j(X),(v,P)=>{Ae(P(v,{get data(){return s()},get form(){return e.form},get params(){return e.page.params}}),w=>n()[1]=w,()=>{var w;return(w=n())==null?void 0:w[1]})}),K(H,y)};ze(ge,H=>{e.constructors[2]?H(ce):H(N,!1)})}K(b,me)},$$slots:{default:!0}}),b=>n()[0]=b,()=>{var b;return(b=n())==null?void 0:b[0]})}),K(I,$)},m=I=>{const M=Re(()=>e.constructors[0]);var $=fe(),oe=ae($);we(oe,()=>j(M),(z,E)=>{Ae(E(z,{get data(){return r()},get form(){return e.form},get params(){return e.page.params}}),b=>n()[0]=b,()=>{var b;return(b=n())==null?void 0:b[0]})}),K(I,$)};ze(p,I=>{e.constructors[1]?I(l):I(m,!1)})}var h=za(p,2);{var x=I=>{var M=mf(),$=Ja(M);{var oe=z=>{var E=Qa();Za(()=>ri(E,j(u))),K(z,E)};ze($,z=>{j(c)&&z(oe)})}Ka(M),K(I,M)};ze(h,I=>{j(o)&&I(x)})}K(t,d),Xa()}const Cf=ai(hf),Of=[()=>L(()=>import("../nodes/0.DIpSCqpd.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url),()=>L(()=>import("../nodes/1.-aaO_7rD.js"),__vite__mapDeps([17,1,15,3,4,5,18,19,20,2]),import.meta.url),()=>L(()=>import("../nodes/2.DTTH4yjc.js"),__vite__mapDeps([21,1,3,4,5,2,22,11,12,19,20,23,10,24]),import.meta.url),()=>L(()=>import("../nodes/3.BjOx-5ND.js"),__vite__mapDeps([25,1,3,4,5,2,22,11,12,19,20,24]),import.meta.url),()=>L(()=>import("../nodes/4.DLrwqUeR.js"),__vite__mapDeps([26,1,2,3,4,5,10,12,22,11,20,19,6,7,8,9,27,13,28,29,30,31,32,33,34,24,35,36,37,38,39,40,15,18,23,14,41,42,43,44,45,46,47,48]),import.meta.url),()=>L(()=>import("../nodes/5.lvNarnfM.js"),__vite__mapDeps([49,1,15,3,23,10,12]),import.meta.url),()=>L(()=>import("../nodes/6.DyKsgUf2.js"),__vite__mapDeps([50,1,15,3,2,4,5,18,7,20]),import.meta.url),()=>L(()=>import("../nodes/7.C4jrLY7T.js"),__vite__mapDeps([51,1,3,4,5,10,22,11,12,29,20,2,19,6,7,8,28,33,27,31,45,47,30,44,35,52,53,54,55,34,24]),import.meta.url),()=>L(()=>import("../nodes/8.DIMn846h.js"),__vite__mapDeps([56,1,2,3,4,5,10,11,12,29,20,6,7,8,45,57,52,53,58,59]),import.meta.url),()=>L(()=>import("../nodes/9.BhPlDH9q.js"),__vite__mapDeps([60,1,15,3,5,7,20,2,4]),import.meta.url),()=>L(()=>import("../nodes/10.2PlMuzkM.js"),__vite__mapDeps([61,1,2,3,4,5,10,11,12,29,20,6,7,8,33,27,45,53,58,62,63,59,54]),import.meta.url),()=>L(()=>import("../nodes/11.7LNU-V2c.js"),__vite__mapDeps([64,1,2,3,4,5,10,11,12,29,20,6,7,8,33,27,45,53,58,62,63,59]),import.meta.url),()=>L(()=>import("../nodes/12.Dk7Cyr8v.js"),__vite__mapDeps([65,1,3,4,5,10,22,11,12,29,20,2,19,6,7,8,32,13,28,33,27,30,34,24,40,31,66,45,47,67,53,58,63,55]),import.meta.url),()=>L(()=>import("../nodes/13.DsAxPfo7.js"),__vite__mapDeps([68,1,2,3,4,5,10,20,19,6,7,8,41,12,13,23,42,69]),import.meta.url),()=>L(()=>import("../nodes/14.TE67n0On.js"),__vite__mapDeps([70,1,2,3,4,5,10,22,11,12,20,19,6,7,8,33,27,37,40,31,66,45,47,36,57,34]),import.meta.url),()=>L(()=>import("../nodes/15.BKIY6Gje.js"),__vite__mapDeps([71,1,15,3,4,5,18,23,10,12,45,46,7,47]),import.meta.url),()=>L(()=>import("../nodes/16.CKya8A82.js"),__vite__mapDeps([72,1,2,3,4,5,10,27,19,20,6,7,8,23,12,69]),import.meta.url),()=>L(()=>import("../nodes/17.C45_aAtw.js"),__vite__mapDeps([73,1,3,4,5,10,11,12,29,13,20,2,6,7,8,38,19,33,27,39,37,30,44,67,34]),import.meta.url),()=>L(()=>import("../nodes/18.WvT7vRmm.js"),__vite__mapDeps([74,1,15,3,5,23,10,12,75]),import.meta.url),()=>L(()=>import("../nodes/19.Dqy7C9y2.js"),__vite__mapDeps([76,1,15,3,5,23,10,12]),import.meta.url),()=>L(()=>import("../nodes/20.ppFj_8Kx.js"),__vite__mapDeps([77,1,15,3,5,23,10,12]),import.meta.url),()=>L(()=>import("../nodes/21.PUjACzZY.js"),__vite__mapDeps([78,1,15,3,5,23,10,12,75]),import.meta.url)],xf=[],Df={"/":[4],"/404":[5],"/admin":[6,[2]],"/admin/alliances":[7,[2]],"/admin/dashboard":[8,[2]],"/admin/mods":[9,[2,3]],"/admin/mods/leaderboard-reports":[11,[2,3]],"/admin/mods/leaderboard":[10,[2,3]],"/admin/users":[12,[2]],"/join":[13],"/admin":[14],"/offline":[15],"/payment/success":[16],"/profile-picture":[17],"/terms/privacy":[18],"/terms/return":[19],"/terms/return/pt":[20],"/terms/terms-of-service":[21]},_f={handleError:pf||(({error:t})=>{console.error(t)}),init:void 0,reroute:(()=>{}),transport:{}},Sf=Object.fromEntries(Object.entries(_f.transport).map(([t,e])=>[t,e.decode])),Ff=!1,Mf=(t,e)=>Sf[t](e);export{Mf as decode,Sf as decoders,Df as dictionary,Ff as hash,_f as hooks,Lf as matchers,Of as nodes,Cf as root,xf as server_loads}; diff --git a/frontend-backup/_app/immutable/entry/app.DTM8GXam.js b/frontend-backup/_app/immutable/entry/app.DTM8GXam.js new file mode 100644 index 0000000..bb6c43e --- /dev/null +++ b/frontend-backup/_app/immutable/entry/app.DTM8GXam.js @@ -0,0 +1,6318 @@ +const __vite__mapDeps = ( + i, + m = __vite__mapDeps, + d = m.f || + (m.f = [ + "../nodes/0.D5b7oOw2.js", + "../chunks/Ch2Ub8FX.js", + "../chunks/DoL3ojdE.js", + "../chunks/CMvZtFtm.js", + "../chunks/DVA6u9-7.js", + "../chunks/P77cUGnY.js", + "../chunks/BRM3t761.js", + "../chunks/CV9xcpLq.js", + "../chunks/Dmqg20ho.js", + "../chunks/C0GlPMrk.js", + "../chunks/BF50aS-j.js", + "../chunks/CXkjfmFU.js", + "../chunks/C5yqZvKC.js", + "../chunks/0wx1llIh.js", + "../chunks/CdTXrPIO.js", + "../chunks/BOREeBzQ.js", + "../assets/0.0xfYb4uv.css", + "../nodes/1.BMc-PacL.js", + "../chunks/Z_72d8Vp.js", + "../chunks/B6ZK_HZO.js", + "../chunks/CyB--sFG.js", + "../nodes/2.-6emjql3.js", + "../chunks/BBgyHb-Z.js", + "../chunks/D3yDgRbd.js", + "../chunks/wZ7b5CwQ.js", + "../nodes/3.DOMAwJeg.js", + "../nodes/4.CrDfIbdR.js", + "../chunks/DueIxFLX.js", + "../chunks/CgCA7Awo.js", + "../chunks/Dpga8uG-.js", + "../chunks/CHGjpGz-.js", + "../chunks/BKioTOWR.js", + "../chunks/Cqwd83E5.js", + "../chunks/D3yaN7Zl.js", + "../chunks/lE0oaQc5.js", + "../chunks/BsOIMr0T.js", + "../chunks/DBSOMMI_.js", + "../chunks/Dt3xBOvm.js", + "../chunks/BA2Qx8r3.js", + "../assets/ProfileAvatarWithLevel.6dmPRSfx.css", + "../chunks/DLfdYhzo.js", + "../chunks/Bn0Xcwmn.js", + "../assets/LoginForm.CxMG0irz.css", + "../chunks/BI7eddl7.js", + "../chunks/C4yB2Gnm.js", + "../chunks/m3o6lEf1.js", + "../chunks/DCynssDD.js", + "../chunks/C3E1P42D.js", + "../assets/4.BtKF873c.css", + "../nodes/5.cZCL4YVE.js", + "../nodes/6.WPRvZASS.js", + "../nodes/7.ACRjrnuj.js", + "../chunks/CVa8RI1g.js", + "../chunks/BHI5vujT.js", + "../chunks/DouSnzU9.js", + "../chunks/BFFUopoM.js", + "../nodes/8.BbOUPQlW.js", + "../chunks/BpoSU4rb.js", + "../chunks/Blc0Ir5M.js", + "../chunks/CmhsLcKe.js", + "../nodes/9.Cn-noR6e.js", + "../nodes/10.DqbXhTAj.js", + "../chunks/g9MKNE1A.js", + "../chunks/LGRbXsL1.js", + "../nodes/11.C3Fd3lks.js", + "../nodes/12.B7-BJxmw.js", + "../chunks/DTFgqBF9.js", + "../chunks/CZlv7MYe.js", + "../nodes/13.DbQSn9aq.js", + "../chunks/BSXXHLQ0.js", + "../nodes/14.ClqwdR4T.js", + "../nodes/15.D6A8EYfF.js", + "../nodes/16.DTKQOukW.js", + "../nodes/17.CONNNOye.js", + "../nodes/18.24JvCqRi.js", + "../assets/18.BD1hRFPA.css", + "../nodes/19.B2QYN1F_.js", + "../nodes/20.LCTNv26D.js", + "../nodes/21.zScYLJw9.js", + ]) +) => i.map((i) => d[i]); +var Jn = (t) => { + throw TypeError(t); +}; +var Kn = (t, e, n) => e.has(t) || Jn("Cannot " + n); +var B = (t, e, n) => ( + Kn(t, e, "read from private field"), n ? n.call(t) : e.get(t) + ), + Kt = (t, e, n) => + e.has(t) + ? Jn("Cannot add the same private member more than once") + : e instanceof WeakSet + ? e.add(t) + : e.set(t, n), + Zt = (t, e, n, r) => ( + Kn(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n + ); +import { _ as L } from "../chunks/BI7eddl7.js"; +import { + D as S, + d as g, + g as _e, + G as F, + a as G, + b as W, + S as Me, + c as Pt, + e as Vr, + T as Wr, + n as oa, + f as ca, + h as st, + i as Qt, + j as Ne, + k as R, + l as mn, + m as Mt, + o as at, + p as it, + t as q, + q as Se, + r as D, + u as ua, + v as Xe, + w as Q, + x as da, + y as la, + z as Ue, + A as Cn, + B as k, + C as Zn, + E as C, + F as Et, + H as Qn, + I as fa, + J as Gr, + K as Le, + L as On, + M as Ht, + N as Yr, + O as zr, + _ as $t, + P as pa, + Q as Tt, + R as Bt, + U as Xr, + V as ma, + W as Jr, + X as kt, + Y as ga, + Z as Ut, + $ as ha, + a0 as yt, + a1 as er, + a2 as Qe, + a3 as tr, + a4 as Ce, + a5 as _a, + a6 as Kr, + a7 as Sa, + a8 as Ea, + a9 as Zr, + aa as Nt, + ab as Qr, + ac as Ta, + ad as gn, + ae as ya, + af as qt, + ag as nr, + ah as va, + ai as ba, + aj as Ia, + ak as Ra, + al as wa, + am as Aa, + an as xn, + ao as Pe, + ap as he, + aq as Lt, + ar as Pa, + as as V, + at as rr, + au as sr, + av as es, + aw as ts, + ax as ka, + ay as ns, + az as et, + aA as ot, + aB as Na, + aC as hn, + aD as tt, + aE as rs, + aF as ss, + aG as ar, + aH as La, + aI as Dn, + aJ as Ca, + aK as Oa, + aL as Y, + aM as pe, + aN as as, + aO as Je, + aP as xa, + aQ as He, + aR as ir, + aS as or, + aT as cr, + aU as is, + aV as Da, + aW as Fa, + aX as Ma, + aY as Ha, +} from "../chunks/Dmqg20ho.js"; +import { s as $a } from "../chunks/CyB--sFG.js"; +import { + aw as vt, + aW as Ba, + g as j, + aF as Ua, + bo as qa, + Z as ja, + p as Va, + x as Wa, + y as Ga, + au as en, + aL as Ya, + f as os, + a as ae, + s as za, + b as K, + c as Xa, + ay as le, + d as Ja, + r as Ka, + u as Re, + b4 as Za, + t as Qa, +} from "../chunks/CMvZtFtm.js"; +import { h as ei, m as ti, u as ni, s as ri } from "../chunks/DVA6u9-7.js"; +import "../chunks/Ch2Ub8FX.js"; +import { o as si } from "../chunks/DoL3ojdE.js"; +import { p as Ye, i as ze } from "../chunks/BF50aS-j.js"; +import { c as we } from "../chunks/CdTXrPIO.js"; +import { b as Ae } from "../chunks/0wx1llIh.js"; +(function () { + try { + var t = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + t.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var t = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + e = new t.Error().stack; + e && + ((t._sentryDebugIds = t._sentryDebugIds || {}), + (t._sentryDebugIds[e] = "bcc6de85-c1a7-4324-b950-e2a499027b98"), + (t._sentryDebugIdIdentifier = + "sentry-dbid-bcc6de85-c1a7-4324-b950-e2a499027b98")); + })(); +} catch {} +function ai(t) { + return class extends ii { + constructor(e) { + super({ component: t, ...e }); + } + }; +} +var fe, Z; +class ii { + constructor(e) { + Kt(this, fe); + Kt(this, Z); + var a; + var n = new Map(), + r = (i, o) => { + var c = ja(o, !1, !1); + return n.set(i, c), c; + }; + const s = new Proxy( + { ...(e.props || {}), $$events: {} }, + { + get(i, o) { + return j(n.get(o) ?? r(o, Reflect.get(i, o))); + }, + has(i, o) { + return o === Ba + ? !0 + : (j(n.get(o) ?? r(o, Reflect.get(i, o))), Reflect.has(i, o)); + }, + set(i, o, c) { + return vt(n.get(o) ?? r(o, c), c), Reflect.set(i, o, c); + }, + } + ); + Zt( + this, + Z, + (e.hydrate ? ei : ti)(e.component, { + target: e.target, + anchor: e.anchor, + props: s, + context: e.context, + intro: e.intro ?? !1, + recover: e.recover, + }) + ), + (!((a = e == null ? void 0 : e.props) != null && a.$$host) || + e.sync === !1) && + Ua(), + Zt(this, fe, s.$$events); + for (const i of Object.keys(B(this, Z))) + i === "$set" || + i === "$destroy" || + i === "$on" || + qa(this, i, { + get() { + return B(this, Z)[i]; + }, + set(o) { + B(this, Z)[i] = o; + }, + enumerable: !0, + }); + (B(this, Z).$set = (i) => { + Object.assign(s, i); + }), + (B(this, Z).$destroy = () => { + ni(B(this, Z)); + }); + } + $set(e) { + B(this, Z).$set(e); + } + $on(e, n) { + B(this, fe)[e] = B(this, fe)[e] || []; + const r = (...s) => n.call(this, ...s); + return ( + B(this, fe)[e].push(r), + () => { + B(this, fe)[e] = B(this, fe)[e].filter((s) => s !== r); + } + ); + } + $destroy() { + B(this, Z).$destroy(); + } +} +(fe = new WeakMap()), (Z = new WeakMap()); +const bt = {}, + ur = {}; +function ye(t, e) { + (bt[t] = bt[t] || []), bt[t].push(e); +} +function ve(t, e) { + if (!ur[t]) { + ur[t] = !0; + try { + e(); + } catch (n) { + S && g.error(`Error while instrumenting ${t}`, n); + } + } +} +function ee(t, e) { + const n = t && bt[t]; + if (n) + for (const r of n) + try { + r(e); + } catch (s) { + S && + g.error( + `Error while triggering instrumentation handler. +Type: ${t} +Name: ${_e(r)} +Error:`, + s + ); + } +} +let tn = null; +function cs(t) { + const e = "error"; + ye(e, t), ve(e, oi); +} +function oi() { + (tn = F.onerror), + (F.onerror = function (t, e, n, r, s) { + return ( + ee("error", { column: r, error: s, line: n, msg: t, url: e }), + tn ? tn.apply(this, arguments) : !1 + ); + }), + (F.onerror.__SENTRY_INSTRUMENTED__ = !0); +} +let nn = null; +function us(t) { + const e = "unhandledrejection"; + ye(e, t), ve(e, ci); +} +function ci() { + (nn = F.onunhandledrejection), + (F.onunhandledrejection = function (t) { + return ee("unhandledrejection", t), nn ? nn.apply(this, arguments) : !0; + }), + (F.onunhandledrejection.__SENTRY_INSTRUMENTED__ = !0); +} +let dr = !1; +function ui() { + if (dr) return; + function t() { + const e = G(), + n = e && W(e); + if (n) { + const r = "internal_error"; + S && g.log(`[Tracing] Root span: ${r} -> Global error occurred`), + n.setStatus({ code: Me, message: r }); + } + } + (t.tag = "sentry_tracingErrorCallback"), (dr = !0), cs(t), us(t); +} +class Ee { + constructor(e = {}) { + (this._traceId = e.traceId || Pt()), (this._spanId = e.spanId || Vr()); + } + spanContext() { + return { spanId: this._spanId, traceId: this._traceId, traceFlags: Wr }; + } + end(e) {} + setAttribute(e, n) { + return this; + } + setAttributes(e) { + return this; + } + setStatus(e) { + return this; + } + updateName(e) { + return this; + } + isRecording() { + return !1; + } + addEvent(e, n, r) { + return this; + } + addLink(e) { + return this; + } + addLinks(e) { + return this; + } + recordException(e, n) {} +} +function qe(t, e = []) { + return [t, e]; +} +function di(t, e) { + const [n, r] = t; + return [n, [...r, e]]; +} +function lr(t, e) { + const n = t[1]; + for (const r of n) { + const s = r[0].type; + if (e(r, s)) return !0; + } + return !1; +} +function _n(t) { + const e = ca(F); + return e.encodePolyfill ? e.encodePolyfill(t) : new TextEncoder().encode(t); +} +function li(t) { + const [e, n] = t; + let r = JSON.stringify(e); + function s(a) { + typeof r == "string" + ? (r = typeof a == "string" ? r + a : [_n(r), a]) + : r.push(typeof a == "string" ? _n(a) : a); + } + for (const a of n) { + const [i, o] = a; + if ( + (s(` +${JSON.stringify(i)} +`), + typeof o == "string" || o instanceof Uint8Array) + ) + s(o); + else { + let c; + try { + c = JSON.stringify(o); + } catch { + c = JSON.stringify(oa(o)); + } + s(c); + } + } + return typeof r == "string" ? r : fi(r); +} +function fi(t) { + const e = t.reduce((s, a) => s + a.length, 0), + n = new Uint8Array(e); + let r = 0; + for (const s of t) n.set(s, r), (r += s.length); + return n; +} +function pi(t) { + return [{ type: "span" }, t]; +} +function mi(t) { + const e = typeof t.data == "string" ? _n(t.data) : t.data; + return [ + { + type: "attachment", + length: e.length, + filename: t.filename, + content_type: t.contentType, + attachment_type: t.attachmentType, + }, + e, + ]; +} +const gi = { + session: "session", + sessions: "session", + attachment: "attachment", + transaction: "transaction", + event: "error", + client_report: "internal", + user_report: "default", + profile: "profile", + profile_chunk: "profile", + replay_event: "replay", + replay_recording: "replay", + check_in: "monitor", + feedback: "feedback", + span: "span", + raw_security: "security", + log: "log_item", +}; +function fr(t) { + return gi[t]; +} +function ds(t) { + if (!(t != null && t.sdk)) return; + const { name: e, version: n } = t.sdk; + return { name: e, version: n }; +} +function hi(t, e, n, r) { + var a; + const s = + (a = t.sdkProcessingMetadata) == null ? void 0 : a.dynamicSamplingContext; + return { + event_id: t.event_id, + sent_at: new Date().toISOString(), + ...(e && { sdk: e }), + ...(!!n && r && { dsn: st(r) }), + ...(s && { trace: s }), + }; +} +function Sn(t, e) { + if (!(e != null && e.length) || !t.description) return !1; + for (const n of e) { + if (Si(n)) { + if (Qt(t.description, n)) return !0; + continue; + } + if (!n.name && !n.op) continue; + const r = n.name ? Qt(t.description, n.name) : !0, + s = n.op ? t.op && Qt(t.op, n.op) : !0; + if (r && s) return !0; + } + return !1; +} +function _i(t, e) { + const n = e.parent_span_id, + r = e.span_id; + if (n) for (const s of t) s.parent_span_id === r && (s.parent_span_id = n); +} +function Si(t) { + return typeof t == "string" || t instanceof RegExp; +} +function Ei(t, e) { + var r, s, a, i; + if (!e) return t; + const n = t.sdk || {}; + return ( + (t.sdk = { + ...n, + name: n.name || e.name, + version: n.version || e.version, + integrations: [ + ...(((r = t.sdk) == null ? void 0 : r.integrations) || []), + ...(e.integrations || []), + ], + packages: [ + ...(((s = t.sdk) == null ? void 0 : s.packages) || []), + ...(e.packages || []), + ], + settings: + ((a = t.sdk) != null && a.settings) || e.settings + ? { ...((i = t.sdk) == null ? void 0 : i.settings), ...e.settings } + : void 0, + }), + t + ); +} +function Ti(t, e, n, r) { + const s = ds(n), + a = { + sent_at: new Date().toISOString(), + ...(s && { sdk: s }), + ...(!!r && e && { dsn: st(e) }), + }, + i = + "aggregates" in t + ? [{ type: "sessions" }, t] + : [{ type: "session" }, t.toJSON()]; + return qe(a, [i]); +} +function yi(t, e, n, r) { + const s = ds(n), + a = t.type && t.type !== "replay_event" ? t.type : "event"; + Ei(t, n == null ? void 0 : n.sdk); + const i = hi(t, s, r, e); + return delete t.sdkProcessingMetadata, qe(i, [[{ type: a }, t]]); +} +function vi(t, e) { + function n(f) { + return !!f.trace_id && !!f.public_key; + } + const r = Ne(t[0]), + s = e == null ? void 0 : e.getDsn(), + a = e == null ? void 0 : e.getOptions().tunnel, + i = { + sent_at: new Date().toISOString(), + ...(n(r) && { trace: r }), + ...(!!a && s && { dsn: st(s) }), + }, + { beforeSendSpan: o, ignoreSpans: c } = + (e == null ? void 0 : e.getOptions()) || {}, + u = c != null && c.length ? t.filter((f) => !Sn(R(f), c)) : t, + l = t.length - u.length; + l && (e == null || e.recordDroppedEvent("before_send", "span", l)); + const d = o + ? (f) => { + const m = R(f), + h = o(m); + return h || (mn(), m); + } + : R, + p = []; + for (const f of u) { + const m = d(f); + m && p.push(pi(m)); + } + return qe(i, p); +} +function bi(t) { + if (!S) return; + const { + description: e = "< unknown name >", + op: n = "< unknown op >", + parent_span_id: r, + } = R(t), + { spanId: s } = t.spanContext(), + a = Mt(t), + i = W(t), + o = i === t, + c = `[Tracing] Starting ${a ? "sampled" : "unsampled"} ${ + o ? "root " : "" + }span`, + u = [`op: ${n}`, `name: ${e}`, `ID: ${s}`]; + if ((r && u.push(`parent ID: ${r}`), !o)) { + const { op: l, description: d } = R(i); + u.push(`root ID: ${i.spanContext().spanId}`), + l && u.push(`root op: ${l}`), + d && u.push(`root description: ${d}`); + } + g.log(`${c} + ${u.join(` + `)}`); +} +function Ii(t) { + if (!S) return; + const { description: e = "< unknown name >", op: n = "< unknown op >" } = + R(t), + { spanId: r } = t.spanContext(), + a = W(t) === t, + i = `[Tracing] Finishing "${n}" ${ + a ? "root " : "" + }span "${e}" with ID ${r}`; + g.log(i); +} +function Ri(t, e, n, r = G()) { + const s = r && W(r); + s && + (S && + g.log(`[Measurement] Setting measurement on root span: ${t} = ${e} ${n}`), + s.addEvent(t, { [it]: e, [at]: n })); +} +function pr(t) { + if (!t || t.length === 0) return; + const e = {}; + return ( + t.forEach((n) => { + const r = n.attributes || {}, + s = r[at], + a = r[it]; + typeof s == "string" && + typeof a == "number" && + (e[n.name] = { value: a, unit: s }); + }), + e + ); +} +const mr = 1e3; +class jt { + constructor(e = {}) { + (this._traceId = e.traceId || Pt()), + (this._spanId = e.spanId || Vr()), + (this._startTime = e.startTimestamp || q()), + (this._links = e.links), + (this._attributes = {}), + this.setAttributes({ [D]: "manual", [Se]: e.op, ...e.attributes }), + (this._name = e.name), + e.parentSpanId && (this._parentSpanId = e.parentSpanId), + "sampled" in e && (this._sampled = e.sampled), + e.endTimestamp && (this._endTime = e.endTimestamp), + (this._events = []), + (this._isStandaloneSpan = e.isStandalone), + this._endTime && this._onSpanEnded(); + } + addLink(e) { + return this._links ? this._links.push(e) : (this._links = [e]), this; + } + addLinks(e) { + return this._links ? this._links.push(...e) : (this._links = e), this; + } + recordException(e, n) {} + spanContext() { + const { _spanId: e, _traceId: n, _sampled: r } = this; + return { spanId: e, traceId: n, traceFlags: r ? ua : Wr }; + } + setAttribute(e, n) { + return ( + n === void 0 ? delete this._attributes[e] : (this._attributes[e] = n), + this + ); + } + setAttributes(e) { + return Object.keys(e).forEach((n) => this.setAttribute(n, e[n])), this; + } + updateStartTime(e) { + this._startTime = Xe(e); + } + setStatus(e) { + return (this._status = e), this; + } + updateName(e) { + return (this._name = e), this.setAttribute(Q, "custom"), this; + } + end(e) { + this._endTime || ((this._endTime = Xe(e)), Ii(this), this._onSpanEnded()); + } + getSpanJSON() { + return { + data: this._attributes, + description: this._name, + op: this._attributes[Se], + parent_span_id: this._parentSpanId, + span_id: this._spanId, + start_timestamp: this._startTime, + status: la(this._status), + timestamp: this._endTime, + trace_id: this._traceId, + origin: this._attributes[D], + profile_id: this._attributes[Cn], + exclusive_time: this._attributes[Ue], + measurements: pr(this._events), + is_segment: (this._isStandaloneSpan && W(this) === this) || void 0, + segment_id: this._isStandaloneSpan + ? W(this).spanContext().spanId + : void 0, + links: da(this._links), + }; + } + isRecording() { + return !this._endTime && !!this._sampled; + } + addEvent(e, n, r) { + S && g.log("[Tracing] Adding an event to span:", e); + const s = gr(n) ? n : r || q(), + a = gr(n) ? {} : n || {}, + i = { name: e, time: Xe(s), attributes: a }; + return this._events.push(i), this; + } + isStandaloneSpan() { + return !!this._isStandaloneSpan; + } + _onSpanEnded() { + const e = k(); + if ( + (e && e.emit("spanEnd", this), + !(this._isStandaloneSpan || this === W(this))) + ) + return; + if (this._isStandaloneSpan) { + this._sampled + ? Ai(vi([this], e)) + : (S && + g.log( + "[Tracing] Discarding standalone span because its trace was not chosen to be sampled." + ), + e && e.recordDroppedEvent("sample_rate", "span")); + return; + } + const r = this._convertSpanToTransaction(); + r && (Zn(this).scope || C()).captureEvent(r); + } + _convertSpanToTransaction() { + var l; + if (!hr(R(this))) return; + this._name || + (S && + g.warn( + "Transaction has no name, falling back to ``." + ), + (this._name = "")); + const { scope: e, isolationScope: n } = Zn(this), + r = + (l = e == null ? void 0 : e.getScopeData().sdkProcessingMetadata) == + null + ? void 0 + : l.normalizedRequest; + if (this._sampled !== !0) return; + const a = Et(this) + .filter((d) => d !== this && !wi(d)) + .map((d) => R(d)) + .filter(hr), + i = this._attributes[Q]; + delete this._attributes[Qn], + a.forEach((d) => { + delete d.data[Qn]; + }); + const o = { + contexts: { trace: fa(this) }, + spans: + a.length > mr + ? a + .sort((d, p) => d.start_timestamp - p.start_timestamp) + .slice(0, mr) + : a, + start_timestamp: this._startTime, + timestamp: this._endTime, + transaction: this._name, + type: "transaction", + sdkProcessingMetadata: { + capturedSpanScope: e, + capturedSpanIsolationScope: n, + dynamicSamplingContext: Ne(this), + }, + request: r, + ...(i && { transaction_info: { source: i } }), + }, + c = pr(this._events); + return ( + c && + Object.keys(c).length && + (S && + g.log( + "[Measurements] Adding measurements to transaction event", + JSON.stringify(c, void 0, 2) + ), + (o.measurements = c)), + o + ); + } +} +function gr(t) { + return (t && typeof t == "number") || t instanceof Date || Array.isArray(t); +} +function hr(t) { + return !!t.start_timestamp && !!t.timestamp && !!t.span_id && !!t.trace_id; +} +function wi(t) { + return t instanceof jt && t.isStandaloneSpan(); +} +function Ai(t) { + const e = k(); + if (!e) return; + const n = t[1]; + if (!n || n.length === 0) { + e.recordDroppedEvent("before_send", "span"); + return; + } + e.sendEnvelope(t); +} +function Pi(t, e, n = () => {}) { + let r; + try { + r = t(); + } catch (s) { + throw (e(s), n(), s); + } + return ki(r, e, n); +} +function ki(t, e, n) { + return Gr(t) + ? t.then( + (r) => (n(), r), + (r) => { + throw (e(r), n(), r); + } + ) + : (n(), t); +} +function Ni(t, e, n) { + if (!Le(t)) return [!1]; + let r, s; + typeof t.tracesSampler == "function" + ? ((s = t.tracesSampler({ + ...e, + inheritOrSampleWith: (o) => + typeof e.parentSampleRate == "number" + ? e.parentSampleRate + : typeof e.parentSampled == "boolean" + ? Number(e.parentSampled) + : o, + })), + (r = !0)) + : e.parentSampled !== void 0 + ? (s = e.parentSampled) + : typeof t.tracesSampleRate < "u" && ((s = t.tracesSampleRate), (r = !0)); + const a = On(s); + if (a === void 0) + return ( + S && + g.warn( + `[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify( + s + )} of type ${JSON.stringify(typeof s)}.` + ), + [!1] + ); + if (!a) + return ( + S && + g.log( + `[Tracing] Discarding transaction because ${ + typeof t.tracesSampler == "function" + ? "tracesSampler returned 0 or false" + : "a negative sampling decision was inherited or tracesSampleRate is set to 0" + }` + ), + [!1, a, r] + ); + const i = n < a; + return ( + i || + (S && + g.log( + `[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number( + s + )})` + )), + [i, a, r] + ); +} +const ls = "__SENTRY_SUPPRESS_TRACING__"; +function Li(t, e) { + const n = Mn(); + if (n.startSpan) return n.startSpan(t, e); + const r = ps(t), + { forceTransaction: s, parentSpan: a, scope: i } = t, + o = i == null ? void 0 : i.clone(); + return Ht(o, () => + Oi(a)(() => { + const u = C(), + l = ms(u, a), + p = + t.onlyIfParent && !l + ? new Ee() + : fs({ + parentSpan: l, + spanArguments: r, + forceTransaction: s, + scope: u, + }); + return ( + $t(u, p), + Pi( + () => e(p), + () => { + const { status: f } = R(p); + p.isRecording() && + (!f || f === "ok") && + p.setStatus({ code: Me, message: "internal_error" }); + }, + () => { + p.end(); + } + ) + ); + }) + ); +} +function xe(t) { + const e = Mn(); + if (e.startInactiveSpan) return e.startInactiveSpan(t); + const n = ps(t), + { forceTransaction: r, parentSpan: s } = t; + return ( + t.scope + ? (i) => Ht(t.scope, i) + : s !== void 0 + ? (i) => Fn(s, i) + : (i) => i() + )(() => { + const i = C(), + o = ms(i, s); + return t.onlyIfParent && !o + ? new Ee() + : fs({ parentSpan: o, spanArguments: n, forceTransaction: r, scope: i }); + }); +} +function Fn(t, e) { + const n = Mn(); + return n.withActiveSpan + ? n.withActiveSpan(t, e) + : Ht((r) => ($t(r, t || void 0), e(r))); +} +function fs({ + parentSpan: t, + spanArguments: e, + forceTransaction: n, + scope: r, +}) { + if (!Le()) { + const i = new Ee(); + if (n || !t) { + const o = { + sampled: "false", + sample_rate: "0", + transaction: e.name, + ...Ne(i), + }; + Tt(i, o); + } + return i; + } + const s = Bt(); + let a; + if (t && !n) (a = Ci(t, r, e)), Xr(t, a); + else if (t) { + const i = Ne(t), + { traceId: o, spanId: c } = t.spanContext(), + u = Mt(t); + (a = _r({ traceId: o, parentSpanId: c, ...e }, r, u)), Tt(a, i); + } else { + const { + traceId: i, + dsc: o, + parentSpanId: c, + sampled: u, + } = { ...s.getPropagationContext(), ...r.getPropagationContext() }; + (a = _r({ traceId: i, parentSpanId: c, ...e }, r, u)), o && Tt(a, o); + } + return bi(a), ma(a, r, s), a; +} +function ps(t) { + const n = { isStandalone: (t.experimental || {}).standalone, ...t }; + if (t.startTime) { + const r = { ...n }; + return (r.startTimestamp = Xe(t.startTime)), delete r.startTime, r; + } + return n; +} +function Mn() { + const t = Yr(); + return zr(t); +} +function _r(t, e, n) { + var m; + const r = k(), + s = (r == null ? void 0 : r.getOptions()) || {}, + { name: a = "" } = t, + i = { spanAttributes: { ...t.attributes }, spanName: a, parentSampled: n }; + r == null || r.emit("beforeSampling", i, { decision: !1 }); + const o = i.parentSampled ?? n, + c = i.spanAttributes, + u = e.getPropagationContext(), + [l, d, p] = e.getScopeData().sdkProcessingMetadata[ls] + ? [!1] + : Ni( + s, + { + name: a, + parentSampled: o, + attributes: c, + parentSampleRate: On((m = u.dsc) == null ? void 0 : m.sample_rate), + }, + u.sampleRand + ), + f = new jt({ + ...t, + attributes: { [Q]: "custom", [Jr]: d !== void 0 && p ? d : void 0, ...c }, + sampled: l, + }); + return ( + !l && + r && + (S && + g.log( + "[Tracing] Discarding root span because its trace was not chosen to be sampled." + ), + r.recordDroppedEvent("sample_rate", "transaction")), + r && r.emit("spanStart", f), + f + ); +} +function Ci(t, e, n) { + const { spanId: r, traceId: s } = t.spanContext(), + a = e.getScopeData().sdkProcessingMetadata[ls] ? !1 : Mt(t), + i = a + ? new jt({ ...n, parentSpanId: r, traceId: s, sampled: a }) + : new Ee({ traceId: s }); + Xr(t, i); + const o = k(); + return ( + o && (o.emit("spanStart", i), n.endTimestamp && o.emit("spanEnd", i)), i + ); +} +function ms(t, e) { + if (e) return e; + if (e === null) return; + const n = pa(t); + if (!n) return; + const r = k(); + return (r ? r.getOptions() : {}).parentSpanIsAlwaysRootSpan ? W(n) : n; +} +function Oi(t) { + return t !== void 0 ? (e) => Fn(t, e) : (e) => e(); +} +const It = { idleTimeout: 1e3, finalTimeout: 3e4, childSpanTimeout: 15e3 }, + xi = "heartbeatFailed", + Di = "idleTimeout", + Fi = "finalTimeout", + Mi = "externalFinish"; +function gs(t, e = {}) { + const n = new Map(); + let r = !1, + s, + a = Mi, + i = !e.disableAutoFinish; + const o = [], + { + idleTimeout: c = It.idleTimeout, + finalTimeout: u = It.finalTimeout, + childSpanTimeout: l = It.childSpanTimeout, + beforeSpanEnd: d, + } = e, + p = k(); + if (!p || !Le()) { + const E = new Ee(), + b = { sample_rate: "0", sampled: "false", ...Ne(E) }; + return Tt(E, b), E; + } + const f = C(), + m = G(), + h = Hi(t); + h.end = new Proxy(h.end, { + apply(E, b, be) { + if ((d && d(h), b instanceof Ee)) return; + const [me, ...ge] = be, + ce = me || q(), + N = Xe(ce), + H = Et(h).filter((P) => P !== h); + if (!H.length) return z(N), Reflect.apply(E, b, [N, ...ge]); + const X = H.map((P) => R(P).timestamp).filter((P) => !!P), + y = X.length ? Math.max(...X) : void 0, + A = R(h).start_timestamp, + v = Math.min( + A ? A + u / 1e3 : 1 / 0, + Math.max(A || -1 / 0, Math.min(N, y || 1 / 0)) + ); + return z(v), Reflect.apply(E, b, [v, ...ge]); + }, + }); + function x() { + s && (clearTimeout(s), (s = void 0)); + } + function I(E) { + x(), + (s = setTimeout(() => { + !r && n.size === 0 && i && ((a = Di), h.end(E)); + }, c)); + } + function M(E) { + s = setTimeout(() => { + !r && i && ((a = xi), h.end(E)); + }, l); + } + function $(E) { + x(), n.set(E, !0); + const b = q(); + M(b + l / 1e3); + } + function oe(E) { + if ((n.has(E) && n.delete(E), n.size === 0)) { + const b = q(); + I(b + c / 1e3); + } + } + function z(E) { + (r = !0), n.clear(), o.forEach((N) => N()), $t(f, m); + const b = R(h), + { start_timestamp: be } = b; + if (!be) return; + b.data[kt] || h.setAttribute(kt, a), + g.log(`[Tracing] Idle span "${b.op}" finished`); + const ge = Et(h).filter((N) => N !== h); + let ce = 0; + ge.forEach((N) => { + N.isRecording() && + (N.setStatus({ code: Me, message: "cancelled" }), + N.end(E), + S && + g.log( + "[Tracing] Cancelling span since span ended early", + JSON.stringify(N, void 0, 2) + )); + const H = R(N), + { timestamp: X = 0, start_timestamp: y = 0 } = H, + A = y <= E, + v = (u + c) / 1e3, + P = X - y <= v; + if (S) { + const w = JSON.stringify(N, void 0, 2); + A + ? P || + g.log( + "[Tracing] Discarding span since it finished after idle span final timeout", + w + ) + : g.log( + "[Tracing] Discarding span since it happened after idle span was finished", + w + ); + } + (!P || !A) && (ga(h, N), ce++); + }), + ce > 0 && h.setAttribute("sentry.idle_span_discarded_spans", ce); + } + return ( + o.push( + p.on("spanStart", (E) => { + if ( + r || + E === h || + R(E).timestamp || + (E instanceof jt && E.isStandaloneSpan()) + ) + return; + Et(h).includes(E) && $(E.spanContext().spanId); + }) + ), + o.push( + p.on("spanEnd", (E) => { + r || oe(E.spanContext().spanId); + }) + ), + o.push( + p.on("idleSpanEnableAutoFinish", (E) => { + E === h && ((i = !0), I(), n.size && M()); + }) + ), + e.disableAutoFinish || I(), + setTimeout(() => { + r || + (h.setStatus({ code: Me, message: "deadline_exceeded" }), + (a = Fi), + h.end()); + }, u), + h + ); +} +function Hi(t) { + const e = xe(t); + return $t(C(), e), S && g.log("[Tracing] Started span is an idle span"), e; +} +const $i = "7"; +function Bi(t) { + const e = t.protocol ? `${t.protocol}:` : "", + n = t.port ? `:${t.port}` : ""; + return `${e}//${t.host}${n}${t.path ? `/${t.path}` : ""}/api/`; +} +function Ui(t) { + return `${Bi(t)}${t.projectId}/envelope/`; +} +function qi(t, e) { + const n = { sentry_version: $i }; + return ( + t.publicKey && (n.sentry_key = t.publicKey), + e && (n.sentry_client = `${e.name}/${e.version}`), + new URLSearchParams(n).toString() + ); +} +function ji(t, e, n) { + return e || `${Ui(t)}?${qi(t, n)}`; +} +const Sr = []; +function Vi(t) { + const e = {}; + return ( + t.forEach((n) => { + const { name: r } = n, + s = e[r]; + (s && !s.isDefaultInstance && n.isDefaultInstance) || (e[r] = n); + }), + Object.values(e) + ); +} +function Wi(t) { + const e = t.defaultIntegrations || [], + n = t.integrations; + e.forEach((s) => { + s.isDefaultInstance = !0; + }); + let r; + if (Array.isArray(n)) r = [...e, ...n]; + else if (typeof n == "function") { + const s = n(e); + r = Array.isArray(s) ? s : [s]; + } else r = e; + return Vi(r); +} +function Gi(t, e) { + const n = {}; + return ( + e.forEach((r) => { + r && hs(t, r, n); + }), + n + ); +} +function Er(t, e) { + for (const n of e) n != null && n.afterAllSetup && n.afterAllSetup(t); +} +function hs(t, e, n) { + if (n[e.name]) { + S && + g.log(`Integration skipped because it was already installed: ${e.name}`); + return; + } + if ( + ((n[e.name] = e), + Sr.indexOf(e.name) === -1 && + typeof e.setupOnce == "function" && + (e.setupOnce(), Sr.push(e.name)), + e.setup && typeof e.setup == "function" && e.setup(t), + typeof e.preprocessEvent == "function") + ) { + const r = e.preprocessEvent.bind(e); + t.on("preprocessEvent", (s, a) => r(s, a, t)); + } + if (typeof e.processEvent == "function") { + const r = e.processEvent.bind(e), + s = Object.assign((a, i) => r(a, i, t), { id: e.name }); + t.addEventProcessor(s); + } + S && g.log(`Integration installed: ${e.name}`); +} +function Yi(t, e, n) { + const r = [ + { type: "client_report" }, + { timestamp: Ut(), discarded_events: t }, + ]; + return qe(e ? { dsn: e } : {}, [r]); +} +function _s(t) { + const e = []; + t.message && e.push(t.message); + try { + const n = t.exception.values[t.exception.values.length - 1]; + n != null && + n.value && + (e.push(n.value), n.type && e.push(`${n.type}: ${n.value}`)); + } catch {} + return e; +} +function zi(t) { + var c; + const { + trace_id: e, + parent_span_id: n, + span_id: r, + status: s, + origin: a, + data: i, + op: o, + } = ((c = t.contexts) == null ? void 0 : c.trace) ?? {}; + return { + data: i ?? {}, + description: t.transaction, + op: o, + parent_span_id: n, + span_id: r ?? "", + start_timestamp: t.start_timestamp ?? 0, + status: s, + timestamp: t.timestamp, + trace_id: e ?? "", + origin: a, + profile_id: i == null ? void 0 : i[Cn], + exclusive_time: i == null ? void 0 : i[Ue], + measurements: t.measurements, + is_segment: !0, + }; +} +function Xi(t) { + return { + type: "transaction", + timestamp: t.timestamp, + start_timestamp: t.start_timestamp, + transaction: t.description, + contexts: { + trace: { + trace_id: t.trace_id, + span_id: t.span_id, + parent_span_id: t.parent_span_id, + op: t.op, + status: t.status, + origin: t.origin, + data: { + ...t.data, + ...(t.profile_id && { [Cn]: t.profile_id }), + ...(t.exclusive_time && { [Ue]: t.exclusive_time }), + }, + }, + }, + measurements: t.measurements, + }; +} +const Tr = "Not capturing exception because it's already been captured.", + yr = "Discarded session because of missing or non-string release", + Ss = Symbol.for("SentryInternalError"), + Es = Symbol.for("SentryDoNotSendEventError"); +function Rt(t) { + return { message: t, [Ss]: !0 }; +} +function rn(t) { + return { message: t, [Es]: !0 }; +} +function vr(t) { + return !!t && typeof t == "object" && Ss in t; +} +function br(t) { + return !!t && typeof t == "object" && Es in t; +} +class Ji { + constructor(e) { + if ( + ((this._options = e), + (this._integrations = {}), + (this._numProcessing = 0), + (this._outcomes = {}), + (this._hooks = {}), + (this._eventProcessors = []), + e.dsn + ? (this._dsn = ha(e.dsn)) + : S && g.warn("No DSN provided, client will not send events."), + this._dsn) + ) { + const n = ji(this._dsn, e.tunnel, e._metadata ? e._metadata.sdk : void 0); + this._transport = e.transport({ + tunnel: this._options.tunnel, + recordDroppedEvent: this.recordDroppedEvent.bind(this), + ...e.transportOptions, + url: n, + }); + } + } + captureException(e, n, r) { + const s = yt(); + if (er(e)) return S && g.log(Tr), s; + const a = { event_id: s, ...n }; + return ( + this._process( + this.eventFromException(e, a).then((i) => this._captureEvent(i, a, r)) + ), + a.event_id + ); + } + captureMessage(e, n, r, s) { + const a = { event_id: yt(), ...r }, + i = Qr(e) ? e : String(e), + o = Qe(e) + ? this.eventFromMessage(i, n, a) + : this.eventFromException(e, a); + return ( + this._process(o.then((c) => this._captureEvent(c, a, s))), a.event_id + ); + } + captureEvent(e, n, r) { + const s = yt(); + if (n != null && n.originalException && er(n.originalException)) + return S && g.log(Tr), s; + const a = { event_id: s, ...n }, + i = e.sdkProcessingMetadata || {}, + o = i.capturedSpanScope, + c = i.capturedSpanIsolationScope; + return this._process(this._captureEvent(e, a, o || r, c)), a.event_id; + } + captureSession(e) { + this.sendSession(e), tr(e, { init: !1 }); + } + getDsn() { + return this._dsn; + } + getOptions() { + return this._options; + } + getSdkMetadata() { + return this._options._metadata; + } + getTransport() { + return this._transport; + } + flush(e) { + const n = this._transport; + return n + ? (this.emit("flush"), + this._isClientDoneProcessing(e).then((r) => + n.flush(e).then((s) => r && s) + )) + : Ce(!0); + } + close(e) { + return this.flush(e).then( + (n) => ((this.getOptions().enabled = !1), this.emit("close"), n) + ); + } + getEventProcessors() { + return this._eventProcessors; + } + addEventProcessor(e) { + this._eventProcessors.push(e); + } + init() { + (this._isEnabled() || + this._options.integrations.some(({ name: e }) => + e.startsWith("Spotlight") + )) && + this._setupIntegrations(); + } + getIntegrationByName(e) { + return this._integrations[e]; + } + addIntegration(e) { + const n = this._integrations[e.name]; + hs(this, e, this._integrations), n || Er(this, [e]); + } + sendEvent(e, n = {}) { + this.emit("beforeSendEvent", e, n); + let r = yi(e, this._dsn, this._options._metadata, this._options.tunnel); + for (const a of n.attachments || []) r = di(r, mi(a)); + const s = this.sendEnvelope(r); + s && s.then((a) => this.emit("afterSendEvent", e, a), null); + } + sendSession(e) { + const { release: n, environment: r = _a } = this._options; + if ("aggregates" in e) { + const a = e.attrs || {}; + if (!a.release && !n) { + S && g.warn(yr); + return; + } + (a.release = a.release || n), + (a.environment = a.environment || r), + (e.attrs = a); + } else { + if (!e.release && !n) { + S && g.warn(yr); + return; + } + (e.release = e.release || n), (e.environment = e.environment || r); + } + this.emit("beforeSendSession", e); + const s = Ti(e, this._dsn, this._options._metadata, this._options.tunnel); + this.sendEnvelope(s); + } + recordDroppedEvent(e, n, r = 1) { + if (this._options.sendClientReports) { + const s = `${e}:${n}`; + S && g.log(`Recording outcome: "${s}"${r > 1 ? ` (${r} times)` : ""}`), + (this._outcomes[s] = (this._outcomes[s] || 0) + r); + } + } + on(e, n) { + const r = (this._hooks[e] = this._hooks[e] || []); + return ( + r.push(n), + () => { + const s = r.indexOf(n); + s > -1 && r.splice(s, 1); + } + ); + } + emit(e, ...n) { + const r = this._hooks[e]; + r && r.forEach((s) => s(...n)); + } + sendEnvelope(e) { + return ( + this.emit("beforeEnvelope", e), + this._isEnabled() && this._transport + ? this._transport + .send(e) + .then( + null, + (n) => (S && g.error("Error while sending envelope:", n), n) + ) + : (S && g.error("Transport disabled"), Ce({})) + ); + } + _setupIntegrations() { + const { integrations: e } = this._options; + (this._integrations = Gi(this, e)), Er(this, e); + } + _updateSessionFromEvent(e, n) { + var c; + let r = n.level === "fatal", + s = !1; + const a = (c = n.exception) == null ? void 0 : c.values; + if (a) { + s = !0; + for (const u of a) { + const l = u.mechanism; + if ((l == null ? void 0 : l.handled) === !1) { + r = !0; + break; + } + } + } + const i = e.status === "ok"; + ((i && e.errors === 0) || (i && r)) && + (tr(e, { + ...(r && { status: "crashed" }), + errors: e.errors || Number(s || r), + }), + this.captureSession(e)); + } + _isClientDoneProcessing(e) { + return new Kr((n) => { + let r = 0; + const s = 1, + a = setInterval(() => { + this._numProcessing == 0 + ? (clearInterval(a), n(!0)) + : ((r += s), e && r >= e && (clearInterval(a), n(!1))); + }, s); + }); + } + _isEnabled() { + return this.getOptions().enabled !== !1 && this._transport !== void 0; + } + _prepareEvent(e, n, r, s) { + const a = this.getOptions(), + i = Object.keys(this._integrations); + return ( + !n.integrations && i != null && i.length && (n.integrations = i), + this.emit("preprocessEvent", e, n), + e.type || s.setLastEventId(e.event_id || n.event_id), + Sa(a, e, n, r, this, s).then((o) => { + if (o === null) return o; + this.emit("postprocessEvent", o, n), + (o.contexts = { trace: Ea(r), ...o.contexts }); + const c = Zr(this, r); + return ( + (o.sdkProcessingMetadata = { + dynamicSamplingContext: c, + ...o.sdkProcessingMetadata, + }), + o + ); + }) + ); + } + _captureEvent(e, n = {}, r = C(), s = Bt()) { + return ( + S && + En(e) && + g.log(`Captured error event \`${_s(e)[0] || ""}\``), + this._processEvent(e, n, r, s).then( + (a) => a.event_id, + (a) => { + S && + (br(a) ? g.log(a.message) : vr(a) ? g.warn(a.message) : g.warn(a)); + } + ) + ); + } + _processEvent(e, n, r, s) { + const a = this.getOptions(), + { sampleRate: i } = a, + o = Ts(e), + c = En(e), + u = e.type || "error", + l = `before send for type \`${u}\``, + d = typeof i > "u" ? void 0 : On(i); + if (c && typeof d == "number" && Math.random() > d) + return ( + this.recordDroppedEvent("sample_rate", "error"), + Nt( + rn( + `Discarding event because it's not included in the random sample (sampling rate = ${i})` + ) + ) + ); + const p = u === "replay_event" ? "replay" : u; + return this._prepareEvent(e, n, r, s) + .then((f) => { + if (f === null) + throw ( + (this.recordDroppedEvent("event_processor", p), + rn("An event processor returned `null`, will not send event.")) + ); + if (n.data && n.data.__sentry__ === !0) return f; + const h = Zi(this, a, f, n); + return Ki(h, l); + }) + .then((f) => { + var x; + if (f === null) { + if ((this.recordDroppedEvent("before_send", p), o)) { + const M = 1 + (e.spans || []).length; + this.recordDroppedEvent("before_send", "span", M); + } + throw rn(`${l} returned \`null\`, will not send event.`); + } + const m = r.getSession() || s.getSession(); + if ((c && m && this._updateSessionFromEvent(m, f), o)) { + const I = + ((x = f.sdkProcessingMetadata) == null + ? void 0 + : x.spanCountBeforeProcessing) || 0, + M = f.spans ? f.spans.length : 0, + $ = I - M; + $ > 0 && this.recordDroppedEvent("before_send", "span", $); + } + const h = f.transaction_info; + if (o && h && f.transaction !== e.transaction) { + const I = "custom"; + f.transaction_info = { ...h, source: I }; + } + return this.sendEvent(f, n), f; + }) + .then(null, (f) => { + throw br(f) || vr(f) + ? f + : (this.captureException(f, { + mechanism: { handled: !1, type: "internal" }, + data: { __sentry__: !0 }, + originalException: f, + }), + Rt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. +Reason: ${f}`)); + }); + } + _process(e) { + this._numProcessing++, + e.then( + (n) => (this._numProcessing--, n), + (n) => (this._numProcessing--, n) + ); + } + _clearOutcomes() { + const e = this._outcomes; + return ( + (this._outcomes = {}), + Object.entries(e).map(([n, r]) => { + const [s, a] = n.split(":"); + return { reason: s, category: a, quantity: r }; + }) + ); + } + _flushOutcomes() { + S && g.log("Flushing outcomes..."); + const e = this._clearOutcomes(); + if (e.length === 0) { + S && g.log("No outcomes to send"); + return; + } + if (!this._dsn) { + S && g.log("No dsn provided, will not send outcomes"); + return; + } + S && g.log("Sending outcomes:", e); + const n = Yi(e, this._options.tunnel && st(this._dsn)); + this.sendEnvelope(n); + } +} +function Ki(t, e) { + const n = `${e} must return \`null\` or a valid event.`; + if (Gr(t)) + return t.then( + (r) => { + if (!gn(r) && r !== null) throw Rt(n); + return r; + }, + (r) => { + throw Rt(`${e} rejected with ${r}`); + } + ); + if (!gn(t) && t !== null) throw Rt(n); + return t; +} +function Zi(t, e, n, r) { + const { + beforeSend: s, + beforeSendTransaction: a, + beforeSendSpan: i, + ignoreSpans: o, + } = e; + let c = n; + if (En(c) && s) return s(c, r); + if (Ts(c)) { + if (i || o) { + const u = zi(c); + if (o != null && o.length && Sn(u, o)) return null; + if (i) { + const l = i(u); + l ? (c = Ta(n, Xi(l))) : mn(); + } + if (c.spans) { + const l = [], + d = c.spans; + for (const f of d) { + if (o != null && o.length && Sn(f, o)) { + _i(d, f); + continue; + } + if (i) { + const m = i(f); + m ? l.push(m) : (mn(), l.push(f)); + } else l.push(f); + } + const p = c.spans.length - l.length; + p && t.recordDroppedEvent("before_send", "span", p), (c.spans = l); + } + } + if (a) { + if (c.spans) { + const u = c.spans.length; + c.sdkProcessingMetadata = { + ...n.sdkProcessingMetadata, + spanCountBeforeProcessing: u, + }; + } + return a(c, r); + } + } + return c; +} +function En(t) { + return t.type === void 0; +} +function Ts(t) { + return t.type === "transaction"; +} +function Qi(t) { + return [ + { + type: "log", + item_count: t.length, + content_type: "application/vnd.sentry.items.log+json", + }, + { items: t }, + ]; +} +function eo(t, e, n, r) { + const s = {}; + return ( + e != null && + e.sdk && + (s.sdk = { name: e.sdk.name, version: e.sdk.version }), + n && r && (s.dsn = st(r)), + qe(s, [Qi(t)]) + ); +} +function sn(t, e) { + const n = to(t) ?? []; + if (n.length === 0) return; + const r = t.getOptions(), + s = eo(n, r._metadata, r.tunnel, t.getDsn()); + ys().set(t, []), t.emit("flushLogs"), t.sendEnvelope(s); +} +function to(t) { + return ys().get(t); +} +function ys() { + return ya("clientToLogBufferMap", () => new WeakMap()); +} +function no(t, e) { + e.debug === !0 && + (S + ? g.enable() + : qt(() => { + console.warn( + "[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle." + ); + })), + C().update(e.initialScope); + const r = new t(e); + return ro(r), r.init(), r; +} +function ro(t) { + C().setClient(t); +} +const vs = Symbol.for("SentryBufferFullError"); +function so(t) { + const e = []; + function n() { + return t === void 0 || e.length < t; + } + function r(i) { + return e.splice(e.indexOf(i), 1)[0] || Promise.resolve(void 0); + } + function s(i) { + if (!n()) return Nt(vs); + const o = i(); + return ( + e.indexOf(o) === -1 && e.push(o), + o.then(() => r(o)).then(null, () => r(o).then(null, () => {})), + o + ); + } + function a(i) { + return new Kr((o, c) => { + let u = e.length; + if (!u) return o(!0); + const l = setTimeout(() => { + i && i > 0 && o(!1); + }, i); + e.forEach((d) => { + Ce(d).then(() => { + --u || (clearTimeout(l), o(!0)); + }, c); + }); + }); + } + return { $: e, add: s, drain: a }; +} +const ao = 60 * 1e3; +function io(t, e = Date.now()) { + const n = parseInt(`${t}`, 10); + if (!isNaN(n)) return n * 1e3; + const r = Date.parse(`${t}`); + return isNaN(r) ? ao : r - e; +} +function oo(t, e) { + return t[e] || t.all || 0; +} +function co(t, e, n = Date.now()) { + return oo(t, e) > n; +} +function uo(t, { statusCode: e, headers: n }, r = Date.now()) { + const s = { ...t }, + a = n == null ? void 0 : n["x-sentry-rate-limits"], + i = n == null ? void 0 : n["retry-after"]; + if (a) + for (const o of a.trim().split(",")) { + const [c, u, , , l] = o.split(":", 5), + d = parseInt(c, 10), + p = (isNaN(d) ? 60 : d) * 1e3; + if (!u) s.all = r + p; + else + for (const f of u.split(";")) + f === "metric_bucket" + ? (!l || l.split(";").includes("custom")) && (s[f] = r + p) + : (s[f] = r + p); + } + else i ? (s.all = r + io(i, r)) : e === 429 && (s.all = r + 60 * 1e3); + return s; +} +const lo = 64; +function fo(t, e, n = so(t.bufferSize || lo)) { + let r = {}; + const s = (i) => n.drain(i); + function a(i) { + const o = []; + if ( + (lr(i, (d, p) => { + const f = fr(p); + co(r, f) ? t.recordDroppedEvent("ratelimit_backoff", f) : o.push(d); + }), + o.length === 0) + ) + return Ce({}); + const c = qe(i[0], o), + u = (d) => { + lr(c, (p, f) => { + t.recordDroppedEvent(d, fr(f)); + }); + }, + l = () => + e({ body: li(c) }).then( + (d) => ( + d.statusCode !== void 0 && + (d.statusCode < 200 || d.statusCode >= 300) && + S && + g.warn( + `Sentry responded with status code ${d.statusCode} to sent event.` + ), + (r = uo(r, d)), + d + ), + (d) => { + throw ( + (u("network_error"), + S && g.error("Encountered error running transport request:", d), + d) + ); + } + ); + return n.add(l).then( + (d) => d, + (d) => { + if (d === vs) + return ( + S && g.error("Skipped sending event because buffer is full."), + u("queue_overflow"), + Ce({}) + ); + throw d; + } + ); + } + return { send: a, flush: s }; +} +const po = "thismessage:/"; +function bs(t) { + return "isRelative" in t; +} +function Is(t, e) { + const n = t.indexOf("://") <= 0 && t.indexOf("//") !== 0, + r = n ? po : void 0; + try { + if ("canParse" in URL && !URL.canParse(t, r)) return; + const s = new URL(t, r); + return n + ? { isRelative: n, pathname: s.pathname, search: s.search, hash: s.hash } + : s; + } catch {} +} +function mo(t) { + if (bs(t)) return t.pathname; + const e = new URL(t); + return ( + (e.search = ""), + (e.hash = ""), + ["80", "443"].includes(e.port) && (e.port = ""), + e.password && (e.password = "%filtered%"), + e.username && (e.username = "%filtered%"), + e.toString() + ); +} +function ke(t) { + if (!t) return {}; + const e = t.match( + /^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/ + ); + if (!e) return {}; + const n = e[6] || "", + r = e[8] || ""; + return { + host: e[4], + path: e[5], + protocol: e[2], + search: n, + hash: r, + relative: e[5] + n + r, + }; +} +function go(t) { + return t.split(/[?#]/, 1)[0]; +} +function ho(t) { + var e; + "aggregates" in t + ? ((e = t.attrs) == null ? void 0 : e.ip_address) === void 0 && + (t.attrs = { ...t.attrs, ip_address: "{{auto}}" }) + : t.ipAddress === void 0 && (t.ipAddress = "{{auto}}"); +} +function Hn(t, e, n = [e], r = "npm") { + const s = t._metadata || {}; + s.sdk || + (s.sdk = { + name: `sentry.javascript.${e}`, + packages: n.map((a) => ({ name: `${r}:@sentry/${a}`, version: nr })), + version: nr, + }), + (t._metadata = s); +} +function Rs(t = {}) { + const e = t.client || k(); + if (!va() || !e) return {}; + const n = Yr(), + r = zr(n); + if (r.getTraceData) return r.getTraceData(t); + const s = t.scope || C(), + a = t.span || G(), + i = a ? ba(a) : _o(s), + o = a ? Ne(a) : Zr(e, s), + c = Ia(o); + if (!Ra.test(i)) + return g.warn("Invalid sentry-trace data. Cannot generate trace data"), {}; + const l = { "sentry-trace": i, baggage: c }; + if (t.propagateTraceparent) { + const d = So(i); + d && (l.traceparent = d); + } + return l; +} +function _o(t) { + const { + traceId: e, + sampled: n, + propagationSpanId: r, + } = t.getPropagationContext(); + return wa(e, r, n); +} +function So(t) { + const { traceId: e, parentSpanId: n, parentSampled: r } = Aa(t) || {}; + if (!(!e || !n)) return `00-${e}-${n}-${r ? "01" : "00"}`; +} +const Eo = 100; +function Oe(t, e) { + const n = k(), + r = Bt(); + if (!n) return; + const { beforeBreadcrumb: s = null, maxBreadcrumbs: a = Eo } = n.getOptions(); + if (a <= 0) return; + const o = { timestamp: Ut(), ...t }, + c = s ? qt(() => s(o, e)) : o; + c !== null && + (n.emit && n.emit("beforeAddBreadcrumb", c, e), r.addBreadcrumb(c, a)); +} +let Ir; +const To = "FunctionToString", + Rr = new WeakMap(), + yo = () => ({ + name: To, + setupOnce() { + Ir = Function.prototype.toString; + try { + Function.prototype.toString = function (...t) { + const e = xn(this), + n = Rr.has(k()) && e !== void 0 ? e : this; + return Ir.apply(n, t); + }; + } catch {} + }, + setup(t) { + Rr.set(t, !0); + }, + }), + vo = yo, + bo = [ + /^Script error\.?$/, + /^Javascript error: Script error\.? on line 0$/, + /^ResizeObserver loop completed with undelivered notifications.$/, + /^Cannot redefine property: googletag$/, + /^Can't find variable: gmo$/, + /^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/, + `can't redefine non-configurable property "solana"`, + "vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)", + "Can't find variable: _AutofillCallbackHandler", + /^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/, + /^Java exception was raised during method invocation$/, + ], + Io = "EventFilters", + Ro = (t = {}) => { + let e; + return { + name: Io, + setup(n) { + const r = n.getOptions(); + e = wr(t, r); + }, + processEvent(n, r, s) { + if (!e) { + const a = s.getOptions(); + e = wr(t, a); + } + return Ao(n, e) ? null : n; + }, + }; + }, + wo = (t = {}) => ({ ...Ro(t), name: "InboundFilters" }); +function wr(t = {}, e = {}) { + return { + allowUrls: [...(t.allowUrls || []), ...(e.allowUrls || [])], + denyUrls: [...(t.denyUrls || []), ...(e.denyUrls || [])], + ignoreErrors: [ + ...(t.ignoreErrors || []), + ...(e.ignoreErrors || []), + ...(t.disableErrorDefaults ? [] : bo), + ], + ignoreTransactions: [ + ...(t.ignoreTransactions || []), + ...(e.ignoreTransactions || []), + ], + }; +} +function Ao(t, e) { + if (t.type) { + if (t.type === "transaction" && ko(t, e.ignoreTransactions)) + return ( + S && + g.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. +Event: ${Pe(t)}`), + !0 + ); + } else { + if (Po(t, e.ignoreErrors)) + return ( + S && + g.warn(`Event dropped due to being matched by \`ignoreErrors\` option. +Event: ${Pe(t)}`), + !0 + ); + if (Oo(t)) + return ( + S && + g.warn(`Event dropped due to not having an error message, error type or stacktrace. +Event: ${Pe(t)}`), + !0 + ); + if (No(t, e.denyUrls)) + return ( + S && + g.warn(`Event dropped due to being matched by \`denyUrls\` option. +Event: ${Pe(t)}. +Url: ${Ct(t)}`), + !0 + ); + if (!Lo(t, e.allowUrls)) + return ( + S && + g.warn(`Event dropped due to not being matched by \`allowUrls\` option. +Event: ${Pe(t)}. +Url: ${Ct(t)}`), + !0 + ); + } + return !1; +} +function Po(t, e) { + return e != null && e.length ? _s(t).some((n) => he(n, e)) : !1; +} +function ko(t, e) { + if (!(e != null && e.length)) return !1; + const n = t.transaction; + return n ? he(n, e) : !1; +} +function No(t, e) { + if (!(e != null && e.length)) return !1; + const n = Ct(t); + return n ? he(n, e) : !1; +} +function Lo(t, e) { + if (!(e != null && e.length)) return !0; + const n = Ct(t); + return n ? he(n, e) : !0; +} +function Co(t = []) { + for (let e = t.length - 1; e >= 0; e--) { + const n = t[e]; + if (n && n.filename !== "" && n.filename !== "[native code]") + return n.filename || null; + } + return null; +} +function Ct(t) { + var e, n; + try { + const r = [...(((e = t.exception) == null ? void 0 : e.values) ?? [])] + .reverse() + .find((a) => { + var i, o, c; + return ( + ((i = a.mechanism) == null ? void 0 : i.parent_id) === void 0 && + ((c = (o = a.stacktrace) == null ? void 0 : o.frames) == null + ? void 0 + : c.length) + ); + }), + s = (n = r == null ? void 0 : r.stacktrace) == null ? void 0 : n.frames; + return s ? Co(s) : null; + } catch { + return S && g.error(`Cannot extract url for event ${Pe(t)}`), null; + } +} +function Oo(t) { + var e, n; + return (n = (e = t.exception) == null ? void 0 : e.values) != null && n.length + ? !t.message && + !t.exception.values.some( + (r) => r.stacktrace || (r.type && r.type !== "Error") || r.value + ) + : !1; +} +function xo(t, e, n, r, s, a) { + var o; + if ( + !((o = s.exception) != null && o.values) || + !a || + !Lt(a.originalException, Error) + ) + return; + const i = + s.exception.values.length > 0 + ? s.exception.values[s.exception.values.length - 1] + : void 0; + i && + (s.exception.values = Tn( + t, + e, + r, + a.originalException, + n, + s.exception.values, + i, + 0 + )); +} +function Tn(t, e, n, r, s, a, i, o) { + if (a.length >= n + 1) return a; + let c = [...a]; + if (Lt(r[s], Error)) { + Ar(i, o); + const u = t(e, r[s]), + l = c.length; + Pr(u, s, l, o), (c = Tn(t, e, n, r[s], s, [u, ...c], u, l)); + } + return ( + Array.isArray(r.errors) && + r.errors.forEach((u, l) => { + if (Lt(u, Error)) { + Ar(i, o); + const d = t(e, u), + p = c.length; + Pr(d, `errors[${l}]`, p, o), (c = Tn(t, e, n, u, s, [d, ...c], d, p)); + } + }), + c + ); +} +function Ar(t, e) { + (t.mechanism = t.mechanism || { type: "generic", handled: !0 }), + (t.mechanism = { + ...t.mechanism, + ...(t.type === "AggregateError" && { is_exception_group: !0 }), + exception_id: e, + }); +} +function Pr(t, e, n, r) { + (t.mechanism = t.mechanism || { type: "generic", handled: !0 }), + (t.mechanism = { + ...t.mechanism, + type: "chained", + source: e, + exception_id: n, + parent_id: r, + }); +} +function Do(t) { + const e = "console"; + ye(e, t), ve(e, Fo); +} +function Fo() { + "console" in F && + Pa.forEach(function (t) { + t in F.console && + V(F.console, t, function (e) { + return ( + (rr[t] = e), + function (...n) { + ee("console", { args: n, level: t }); + const s = rr[t]; + s == null || s.apply(F.console, n); + } + ); + }); + }); +} +function Mo(t) { + return t === "warn" + ? "warning" + : ["fatal", "error", "warning", "log", "info", "debug"].includes(t) + ? t + : "log"; +} +const Ho = "Dedupe", + $o = () => { + let t; + return { + name: Ho, + processEvent(e) { + if (e.type) return e; + try { + if (Uo(e, t)) + return ( + S && + g.warn( + "Event dropped due to being a duplicate of previously captured event." + ), + null + ); + } catch {} + return (t = e); + }, + }; + }, + Bo = $o; +function Uo(t, e) { + return e ? !!(qo(t, e) || jo(t, e)) : !1; +} +function qo(t, e) { + const n = t.message, + r = e.message; + return !( + (!n && !r) || + (n && !r) || + (!n && r) || + n !== r || + !As(t, e) || + !ws(t, e) + ); +} +function jo(t, e) { + const n = kr(e), + r = kr(t); + return !( + !n || + !r || + n.type !== r.type || + n.value !== r.value || + !As(t, e) || + !ws(t, e) + ); +} +function ws(t, e) { + let n = sr(t), + r = sr(e); + if (!n && !r) return !0; + if ((n && !r) || (!n && r) || ((n = n), (r = r), r.length !== n.length)) + return !1; + for (let s = 0; s < r.length; s++) { + const a = r[s], + i = n[s]; + if ( + a.filename !== i.filename || + a.lineno !== i.lineno || + a.colno !== i.colno || + a.function !== i.function + ) + return !1; + } + return !0; +} +function As(t, e) { + let n = t.fingerprint, + r = e.fingerprint; + if (!n && !r) return !0; + if ((n && !r) || (!n && r)) return !1; + (n = n), (r = r); + try { + return n.join("") === r.join(""); + } catch { + return !1; + } +} +function kr(t) { + var e, n; + return (n = (e = t.exception) == null ? void 0 : e.values) == null + ? void 0 + : n[0]; +} +function Vo(t, e, n, r, s) { + if (!t.fetchData) return; + const { method: a, url: i } = t.fetchData, + o = Le() && e(i); + if (t.endTimestamp && o) { + const f = t.fetchData.__span; + if (!f) return; + const m = r[f]; + m && (Go(m, t), delete r[f]); + return; + } + const { spanOrigin: c = "auto.http.browser", propagateTraceparent: u = !1 } = + typeof s == "object" ? s : { spanOrigin: s }, + l = !!G(), + d = o && l ? xe(zo(i, a, c)) : new Ee(); + if ( + ((t.fetchData.__span = d.spanContext().spanId), + (r[d.spanContext().spanId] = d), + n(t.fetchData.url)) + ) { + const f = t.args[0], + m = t.args[1] || {}, + h = Wo(f, m, Le() && l ? d : void 0, u); + h && ((t.args[1] = m), (m.headers = h)); + } + const p = k(); + if (p) { + const f = { + input: t.args, + response: t.response, + startTimestamp: t.startTimestamp, + endTimestamp: t.endTimestamp, + }; + p.emit("beforeOutgoingRequestSpan", d, f); + } + return d; +} +function Wo(t, e, n, r) { + const s = Rs({ span: n, propagateTraceparent: r }), + a = s["sentry-trace"], + i = s.baggage, + o = s.traceparent; + if (!a) return; + const c = e.headers || (ts(t) ? t.headers : void 0); + if (c) + if (Yo(c)) { + const u = new Headers(c); + if ( + (u.get("sentry-trace") || u.set("sentry-trace", a), + r && o && !u.get("traceparent") && u.set("traceparent", o), + i) + ) { + const l = u.get("baggage"); + l ? mt(l) || u.set("baggage", `${l},${i}`) : u.set("baggage", i); + } + return u; + } else if (Array.isArray(c)) { + const u = [...c]; + c.find((d) => d[0] === "sentry-trace") || u.push(["sentry-trace", a]), + r && + o && + !c.find((d) => d[0] === "traceparent") && + u.push(["traceparent", o]); + const l = c.find((d) => d[0] === "baggage" && mt(d[1])); + return i && !l && u.push(["baggage", i]), u; + } else { + const u = "sentry-trace" in c ? c["sentry-trace"] : void 0, + l = "traceparent" in c ? c.traceparent : void 0, + d = "baggage" in c ? c.baggage : void 0, + p = d ? (Array.isArray(d) ? [...d] : [d]) : [], + f = d && (Array.isArray(d) ? d.find((h) => mt(h)) : mt(d)); + i && !f && p.push(i); + const m = { + ...c, + "sentry-trace": u ?? a, + baggage: p.length > 0 ? p.join(",") : void 0, + }; + return r && o && !l && (m.traceparent = o), m; + } + else return { ...s }; +} +function Go(t, e) { + var n, r; + if (e.response) { + es(t, e.response.status); + const s = + (r = (n = e.response) == null ? void 0 : n.headers) == null + ? void 0 + : r.get("content-length"); + if (s) { + const a = parseInt(s); + a > 0 && t.setAttribute("http.response_content_length", a); + } + } else e.error && t.setStatus({ code: Me, message: "internal_error" }); + t.end(); +} +function mt(t) { + return t.split(",").some((e) => e.trim().startsWith(ka)); +} +function Yo(t) { + return typeof Headers < "u" && Lt(t, Headers); +} +function zo(t, e, n) { + const r = Is(t); + return { name: r ? `${e} ${mo(r)}` : e, attributes: Xo(t, r, e, n) }; +} +function Xo(t, e, n, r) { + const s = { + url: t, + type: "fetch", + "http.method": n, + [D]: r, + [Se]: "http.client", + }; + return ( + e && + (bs(e) || ((s["http.url"] = e.href), (s["server.address"] = e.host)), + e.search && (s["http.query"] = e.search), + e.hash && (s["http.fragment"] = e.hash)), + s + ); +} +function Ps(t) { + if (t !== void 0) + return t >= 400 && t < 500 ? "warning" : t >= 500 ? "error" : void 0; +} +const nt = F; +function Jo() { + return "history" in nt && !!nt.history; +} +function Ko() { + if (!("fetch" in nt)) return !1; + try { + return ( + new Headers(), new Request("http://www.example.com"), new Response(), !0 + ); + } catch { + return !1; + } +} +function yn(t) { + return ( + t && /^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString()) + ); +} +function Zo() { + var n; + if (typeof EdgeRuntime == "string") return !0; + if (!Ko()) return !1; + if (yn(nt.fetch)) return !0; + let t = !1; + const e = nt.document; + if (e && typeof e.createElement == "function") + try { + const r = e.createElement("iframe"); + (r.hidden = !0), + e.head.appendChild(r), + (n = r.contentWindow) != null && + n.fetch && + (t = yn(r.contentWindow.fetch)), + e.head.removeChild(r); + } catch (r) { + S && + g.warn( + "Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ", + r + ); + } + return t; +} +function ks(t, e) { + const n = "fetch"; + ye(n, t), ve(n, () => Ns(void 0, e)); +} +function Qo(t) { + const e = "fetch-body-resolved"; + ye(e, t), ve(e, () => Ns(tc)); +} +function Ns(t, e = !1) { + (e && !Zo()) || + V(F, "fetch", function (n) { + return function (...r) { + const s = new Error(), + { method: a, url: i } = nc(r), + o = { + args: r, + fetchData: { method: a, url: i }, + startTimestamp: q() * 1e3, + virtualError: s, + headers: rc(r), + }; + return ( + t || ee("fetch", { ...o }), + n.apply(F, r).then( + async (c) => ( + t + ? t(c) + : ee("fetch", { ...o, endTimestamp: q() * 1e3, response: c }), + c + ), + (c) => { + if ( + (ee("fetch", { ...o, endTimestamp: q() * 1e3, error: c }), + ns(c) && + c.stack === void 0 && + ((c.stack = s.stack), et(c, "framesToPop", 1)), + c instanceof TypeError && + (c.message === "Failed to fetch" || + c.message === "Load failed" || + c.message === + "NetworkError when attempting to fetch resource.")) + ) + try { + const u = new URL(o.fetchData.url); + c.message = `${c.message} (${u.host})`; + } catch {} + throw c; + } + ) + ); + }; + }); +} +async function ec(t, e) { + if (t != null && t.body) { + const n = t.body, + r = n.getReader(), + s = setTimeout(() => { + n.cancel().then(null, () => {}); + }, 90 * 1e3); + let a = !0; + for (; a; ) { + let i; + try { + i = setTimeout(() => { + n.cancel().then(null, () => {}); + }, 5e3); + const { done: o } = await r.read(); + clearTimeout(i), o && (e(), (a = !1)); + } catch { + a = !1; + } finally { + clearTimeout(i); + } + } + clearTimeout(s), r.releaseLock(), n.cancel().then(null, () => {}); + } +} +function tc(t) { + let e; + try { + e = t.clone(); + } catch { + return; + } + ec(e, () => { + ee("fetch-body-resolved", { endTimestamp: q() * 1e3, response: t }); + }); +} +function vn(t, e) { + return !!t && typeof t == "object" && !!t[e]; +} +function Nr(t) { + return typeof t == "string" + ? t + : t + ? vn(t, "url") + ? t.url + : t.toString + ? t.toString() + : "" + : ""; +} +function nc(t) { + if (t.length === 0) return { method: "GET", url: "" }; + if (t.length === 2) { + const [n, r] = t; + return { + url: Nr(n), + method: vn(r, "method") ? String(r.method).toUpperCase() : "GET", + }; + } + const e = t[0]; + return { + url: Nr(e), + method: vn(e, "method") ? String(e.method).toUpperCase() : "GET", + }; +} +function rc(t) { + const [e, n] = t; + try { + if (typeof n == "object" && n !== null && "headers" in n && n.headers) + return new Headers(n.headers); + if (ts(e)) return new Headers(e.headers); + } catch {} +} +function sc() { + return "npm"; +} +const T = F; +let bn = 0; +function Ls() { + return bn > 0; +} +function ac() { + bn++, + setTimeout(() => { + bn--; + }); +} +function $e(t, e = {}) { + function n(s) { + return typeof s == "function"; + } + if (!n(t)) return t; + try { + const s = t.__sentry_wrapped__; + if (s) return typeof s == "function" ? s : t; + if (xn(t)) return t; + } catch { + return t; + } + const r = function (...s) { + try { + const a = s.map((i) => $e(i, e)); + return t.apply(this, a); + } catch (a) { + throw ( + (ac(), + Ht((i) => { + i.addEventProcessor( + (o) => ( + e.mechanism && (hn(o, void 0), tt(o, e.mechanism)), + (o.extra = { ...o.extra, arguments: s }), + o + ) + ), + rs(a); + }), + a) + ); + } + }; + try { + for (const s in t) + Object.prototype.hasOwnProperty.call(t, s) && (r[s] = t[s]); + } catch {} + Na(r, t), et(t, "__sentry_wrapped__", r); + try { + Object.getOwnPropertyDescriptor(r, "name").configurable && + Object.defineProperty(r, "name", { + get() { + return t.name; + }, + }); + } catch {} + return r; +} +function $n() { + const t = ot(), + { referrer: e } = T.document || {}, + { userAgent: n } = T.navigator || {}, + r = { ...(e && { Referer: e }), ...(n && { "User-Agent": n }) }; + return { url: t, headers: r }; +} +function Bn(t, e) { + const n = Un(t, e), + r = { type: dc(e), value: lc(e) }; + return ( + n.length && (r.stacktrace = { frames: n }), + r.type === void 0 && + r.value === "" && + (r.value = "Unrecoverable error caught"), + r + ); +} +function ic(t, e, n, r) { + const s = k(), + a = s == null ? void 0 : s.getOptions().normalizeDepth, + i = hc(e), + o = { __serialized__: Ca(e, a) }; + if (i) return { exception: { values: [Bn(t, i)] }, extra: o }; + const c = { + exception: { + values: [ + { + type: Dn(e) ? e.constructor.name : r ? "UnhandledRejection" : "Error", + value: mc(e, { isUnhandledRejection: r }), + }, + ], + }, + extra: o, + }; + if (n) { + const u = Un(t, n); + u.length && (c.exception.values[0].stacktrace = { frames: u }); + } + return c; +} +function an(t, e) { + return { exception: { values: [Bn(t, e)] } }; +} +function Un(t, e) { + const n = e.stacktrace || e.stack || "", + r = cc(e), + s = uc(e); + try { + return t(n, r, s); + } catch {} + return []; +} +const oc = /Minified React error #\d+;/i; +function cc(t) { + return t && oc.test(t.message) ? 1 : 0; +} +function uc(t) { + return typeof t.framesToPop == "number" ? t.framesToPop : 0; +} +function Cs(t) { + return typeof WebAssembly < "u" && typeof WebAssembly.Exception < "u" + ? t instanceof WebAssembly.Exception + : !1; +} +function dc(t) { + const e = t == null ? void 0 : t.name; + return !e && Cs(t) + ? t.message && Array.isArray(t.message) && t.message.length == 2 + ? t.message[0] + : "WebAssembly.Exception" + : e; +} +function lc(t) { + const e = t == null ? void 0 : t.message; + return Cs(t) + ? Array.isArray(t.message) && t.message.length == 2 + ? t.message[1] + : "wasm exception" + : e + ? e.error && typeof e.error.message == "string" + ? e.error.message + : e + : "No error message"; +} +function fc(t, e, n, r) { + const s = (n == null ? void 0 : n.syntheticException) || void 0, + a = qn(t, e, s, r); + return ( + tt(a), + (a.level = "error"), + n != null && n.event_id && (a.event_id = n.event_id), + Ce(a) + ); +} +function pc(t, e, n = "info", r, s) { + const a = (r == null ? void 0 : r.syntheticException) || void 0, + i = In(t, e, a, s); + return ( + (i.level = n), r != null && r.event_id && (i.event_id = r.event_id), Ce(i) + ); +} +function qn(t, e, n, r, s) { + let a; + if (ss(e) && e.error) return an(t, e.error); + if (ar(e) || La(e)) { + const i = e; + if ("stack" in e) a = an(t, e); + else { + const o = i.name || (ar(i) ? "DOMError" : "DOMException"), + c = i.message ? `${o}: ${i.message}` : o; + (a = In(t, c, n, r)), hn(a, c); + } + return ( + "code" in i && (a.tags = { ...a.tags, "DOMException.code": `${i.code}` }), + a + ); + } + return ns(e) + ? an(t, e) + : gn(e) || Dn(e) + ? ((a = ic(t, e, n, s)), tt(a, { synthetic: !0 }), a) + : ((a = In(t, e, n, r)), hn(a, `${e}`), tt(a, { synthetic: !0 }), a); +} +function In(t, e, n, r) { + const s = {}; + if (r && n) { + const a = Un(t, n); + a.length && + (s.exception = { values: [{ value: e, stacktrace: { frames: a } }] }), + tt(s, { synthetic: !0 }); + } + if (Qr(e)) { + const { __sentry_template_string__: a, __sentry_template_values__: i } = e; + return (s.logentry = { message: a, params: i }), s; + } + return (s.message = e), s; +} +function mc(t, { isUnhandledRejection: e }) { + const n = Oa(t), + r = e ? "promise rejection" : "exception"; + return ss(t) + ? `Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\`` + : Dn(t) + ? `Event \`${gc(t)}\` (type=${t.type}) captured as ${r}` + : `Object captured as ${r} with keys: ${n}`; +} +function gc(t) { + try { + const e = Object.getPrototypeOf(t); + return e ? e.constructor.name : void 0; + } catch {} +} +function hc(t) { + for (const e in t) + if (Object.prototype.hasOwnProperty.call(t, e)) { + const n = t[e]; + if (n instanceof Error) return n; + } +} +const _c = 5e3; +class Sc extends Ji { + constructor(e) { + var o; + const n = Ec(e), + r = T.SENTRY_SDK_SOURCE || sc(); + Hn(n, "browser", ["browser"], r), + (o = n._metadata) != null && + o.sdk && + (n._metadata.sdk.settings = { + infer_ip: n.sendDefaultPii ? "auto" : "never", + ...n._metadata.sdk.settings, + }), + super(n); + const { + sendDefaultPii: s, + sendClientReports: a, + enableLogs: i, + } = this._options; + T.document && + (a || i) && + T.document.addEventListener("visibilitychange", () => { + T.document.visibilityState === "hidden" && + (a && this._flushOutcomes(), i && sn(this)); + }), + i && + (this.on("flush", () => { + sn(this); + }), + this.on("afterCaptureLog", () => { + this._logFlushIdleTimeout && clearTimeout(this._logFlushIdleTimeout), + (this._logFlushIdleTimeout = setTimeout(() => { + sn(this); + }, _c)); + })), + s && this.on("beforeSendSession", ho); + } + eventFromException(e, n) { + return fc(this._options.stackParser, e, n, this._options.attachStacktrace); + } + eventFromMessage(e, n = "info", r) { + return pc( + this._options.stackParser, + e, + n, + r, + this._options.attachStacktrace + ); + } + _prepareEvent(e, n, r, s) { + return ( + (e.platform = e.platform || "javascript"), super._prepareEvent(e, n, r, s) + ); + } +} +function Ec(t) { + var e; + return { + release: + typeof __SENTRY_RELEASE__ == "string" + ? __SENTRY_RELEASE__ + : (e = T.SENTRY_RELEASE) == null + ? void 0 + : e.id, + sendClientReports: !0, + parentSpanIsAlwaysRootSpan: !0, + ...t, + }; +} +const Vt = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, + _ = F, + Tc = (t, e) => (t > e[1] ? "poor" : t > e[0] ? "needs-improvement" : "good"), + ct = (t, e, n, r) => { + let s, a; + return (i) => { + e.value >= 0 && + (i || r) && + ((a = e.value - (s ?? 0)), + (a || s === void 0) && + ((s = e.value), (e.delta = a), (e.rating = Tc(e.value, n)), t(e))); + }; + }, + yc = () => + `v5-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`, + ut = (t = !0) => { + var n, r; + const e = + (r = (n = _.performance) == null ? void 0 : n.getEntriesByType) == null + ? void 0 + : r.call(n, "navigation")[0]; + if (!t || (e && e.responseStart > 0 && e.responseStart < performance.now())) + return e; + }, + je = () => { + const t = ut(); + return (t == null ? void 0 : t.activationStart) ?? 0; + }, + dt = (t, e = -1) => { + var a, i; + const n = ut(); + let r = "navigate"; + return ( + n && + (((a = _.document) != null && a.prerendering) || je() > 0 + ? (r = "prerender") + : (i = _.document) != null && i.wasDiscarded + ? (r = "restore") + : n.type && (r = n.type.replace(/_/g, "-"))), + { + name: t, + value: e, + rating: "good", + delta: 0, + entries: [], + id: yc(), + navigationType: r, + } + ); + }, + on = new WeakMap(); +function jn(t, e) { + return on.get(t) || on.set(t, new e()), on.get(t); +} +class Ot { + constructor() { + Ot.prototype.__init.call(this), Ot.prototype.__init2.call(this); + } + __init() { + this._sessionValue = 0; + } + __init2() { + this._sessionEntries = []; + } + _processEntry(e) { + var s; + if (e.hadRecentInput) return; + const n = this._sessionEntries[0], + r = this._sessionEntries[this._sessionEntries.length - 1]; + this._sessionValue && + n && + r && + e.startTime - r.startTime < 1e3 && + e.startTime - n.startTime < 5e3 + ? ((this._sessionValue += e.value), this._sessionEntries.push(e)) + : ((this._sessionValue = e.value), (this._sessionEntries = [e])), + (s = this._onAfterProcessingUnexpectedShift) == null || s.call(this, e); + } +} +const Ve = (t, e, n = {}) => { + try { + if (PerformanceObserver.supportedEntryTypes.includes(t)) { + const r = new PerformanceObserver((s) => { + Promise.resolve().then(() => { + e(s.getEntries()); + }); + }); + return r.observe({ type: t, buffered: !0, ...n }), r; + } + } catch {} + }, + Vn = (t) => { + let e = !1; + return () => { + e || (t(), (e = !0)); + }; + }; +let Ke = -1; +const vc = () => { + var t, e; + return ((t = _.document) == null ? void 0 : t.visibilityState) === + "hidden" && !((e = _.document) != null && e.prerendering) + ? 0 + : 1 / 0; + }, + xt = (t) => { + _.document.visibilityState === "hidden" && + Ke > -1 && + ((Ke = t.type === "visibilitychange" ? t.timeStamp : 0), Ic()); + }, + bc = () => { + addEventListener("visibilitychange", xt, !0), + addEventListener("prerenderingchange", xt, !0); + }, + Ic = () => { + removeEventListener("visibilitychange", xt, !0), + removeEventListener("prerenderingchange", xt, !0); + }, + Wn = () => { + var t; + if (_.document && Ke < 0) { + const e = je(); + (Ke = + (_.document.prerendering || + (t = globalThis.performance + .getEntriesByType("visibility-state") + .filter((r) => r.name === "hidden" && r.startTime > e)[0]) == null + ? void 0 + : t.startTime) ?? vc()), + bc(); + } + return { + get firstHiddenTime() { + return Ke; + }, + }; + }, + Wt = (t) => { + var e; + (e = _.document) != null && e.prerendering + ? addEventListener("prerenderingchange", () => t(), !0) + : t(); + }, + Rc = [1800, 3e3], + wc = (t, e = {}) => { + Wt(() => { + const n = Wn(), + r = dt("FCP"); + let s; + const i = Ve("paint", (o) => { + for (const c of o) + c.name === "first-contentful-paint" && + (i.disconnect(), + c.startTime < n.firstHiddenTime && + ((r.value = Math.max(c.startTime - je(), 0)), + r.entries.push(c), + s(!0))); + }); + i && (s = ct(t, r, Rc, e.reportAllChanges)); + }); + }, + Ac = [0.1, 0.25], + Pc = (t, e = {}) => { + wc( + Vn(() => { + var o, c; + const n = dt("CLS", 0); + let r; + const s = jn(e, Ot), + a = (u) => { + for (const l of u) s._processEntry(l); + s._sessionValue > n.value && + ((n.value = s._sessionValue), + (n.entries = s._sessionEntries), + r()); + }, + i = Ve("layout-shift", a); + i && + ((r = ct(t, n, Ac, e.reportAllChanges)), + (o = _.document) == null || + o.addEventListener("visibilitychange", () => { + var u; + ((u = _.document) == null ? void 0 : u.visibilityState) === + "hidden" && (a(i.takeRecords()), r(!0)); + }), + (c = _ == null ? void 0 : _.setTimeout) == null || c.call(_, r)); + }) + ); + }; +let Os = 0, + cn = 1 / 0, + gt = 0; +const kc = (t) => { + t.forEach((e) => { + e.interactionId && + ((cn = Math.min(cn, e.interactionId)), + (gt = Math.max(gt, e.interactionId)), + (Os = gt ? (gt - cn) / 7 + 1 : 0)); + }); +}; +let Rn; +const xs = () => (Rn ? Os : performance.interactionCount || 0), + Nc = () => { + "interactionCount" in performance || + Rn || + (Rn = Ve("event", kc, { + type: "event", + buffered: !0, + durationThreshold: 0, + })); + }, + un = 10; +let Ds = 0; +const Lc = () => xs() - Ds; +class Dt { + constructor() { + Dt.prototype.__init.call(this), Dt.prototype.__init2.call(this); + } + __init() { + this._longestInteractionList = []; + } + __init2() { + this._longestInteractionMap = new Map(); + } + _resetInteractions() { + (Ds = xs()), + (this._longestInteractionList.length = 0), + this._longestInteractionMap.clear(); + } + _estimateP98LongestInteraction() { + const e = Math.min( + this._longestInteractionList.length - 1, + Math.floor(Lc() / 50) + ); + return this._longestInteractionList[e]; + } + _processEntry(e) { + var s, a; + if ( + ((s = this._onBeforeProcessingEntry) == null || s.call(this, e), + !(e.interactionId || e.entryType === "first-input")) + ) + return; + const n = this._longestInteractionList.at(-1); + let r = this._longestInteractionMap.get(e.interactionId); + if ( + r || + this._longestInteractionList.length < un || + e.duration > n._latency + ) { + if ( + (r + ? e.duration > r._latency + ? ((r.entries = [e]), (r._latency = e.duration)) + : e.duration === r._latency && + e.startTime === r.entries[0].startTime && + r.entries.push(e) + : ((r = { id: e.interactionId, entries: [e], _latency: e.duration }), + this._longestInteractionMap.set(r.id, r), + this._longestInteractionList.push(r)), + this._longestInteractionList.sort((i, o) => o._latency - i._latency), + this._longestInteractionList.length > un) + ) { + const i = this._longestInteractionList.splice(un); + for (const o of i) this._longestInteractionMap.delete(o.id); + } + (a = this._onAfterProcessingINPCandidate) == null || a.call(this, r); + } + } +} +const Gn = (t) => { + const e = (n) => { + var r; + (n.type === "pagehide" || + ((r = _.document) == null ? void 0 : r.visibilityState) === "hidden") && + t(n); + }; + _.document && + (addEventListener("visibilitychange", e, !0), + addEventListener("pagehide", e, !0)); + }, + Fs = (t) => { + var n; + const e = _.requestIdleCallback || _.setTimeout; + ((n = _.document) == null ? void 0 : n.visibilityState) === "hidden" + ? t() + : ((t = Vn(t)), e(t), Gn(t)); + }, + Cc = [200, 500], + Oc = 40, + xc = (t, e = {}) => { + globalThis.PerformanceEventTiming && + "interactionId" in PerformanceEventTiming.prototype && + Wt(() => { + Nc(); + const n = dt("INP"); + let r; + const s = jn(e, Dt), + a = (o) => { + Fs(() => { + for (const u of o) s._processEntry(u); + const c = s._estimateP98LongestInteraction(); + c && + c._latency !== n.value && + ((n.value = c._latency), (n.entries = c.entries), r()); + }); + }, + i = Ve("event", a, { durationThreshold: e.durationThreshold ?? Oc }); + (r = ct(t, n, Cc, e.reportAllChanges)), + i && + (i.observe({ type: "first-input", buffered: !0 }), + Gn(() => { + a(i.takeRecords()), r(!0); + })); + }); + }; +class Dc { + _processEntry(e) { + var n; + (n = this._onBeforeProcessingEntry) == null || n.call(this, e); + } +} +const Fc = [2500, 4e3], + Mc = (t, e = {}) => { + Wt(() => { + const n = Wn(), + r = dt("LCP"); + let s; + const a = jn(e, Dc), + i = (c) => { + e.reportAllChanges || (c = c.slice(-1)); + for (const u of c) + a._processEntry(u), + u.startTime < n.firstHiddenTime && + ((r.value = Math.max(u.startTime - je(), 0)), + (r.entries = [u]), + s()); + }, + o = Ve("largest-contentful-paint", i); + if (o) { + s = ct(t, r, Fc, e.reportAllChanges); + const c = Vn(() => { + i(o.takeRecords()), o.disconnect(), s(!0); + }); + for (const u of ["keydown", "click", "visibilitychange"]) + _.document && + addEventListener(u, () => Fs(c), { capture: !0, once: !0 }); + } + }); + }, + Hc = [800, 1800], + wn = (t) => { + var e, n; + (e = _.document) != null && e.prerendering + ? Wt(() => wn(t)) + : ((n = _.document) == null ? void 0 : n.readyState) !== "complete" + ? addEventListener("load", () => wn(t), !0) + : setTimeout(t); + }, + $c = (t, e = {}) => { + const n = dt("TTFB"), + r = ct(t, n, Hc, e.reportAllChanges); + wn(() => { + const s = ut(); + s && + ((n.value = Math.max(s.responseStart - je(), 0)), + (n.entries = [s]), + r(!0)); + }); + }, + Ze = {}, + Ft = {}; +let Ms, Hs, $s, Bs; +function Us(t, e = !1) { + return Gt("cls", t, qc, Ms, e); +} +function qs(t, e = !1) { + return Gt("lcp", t, jc, Hs, e); +} +function Bc(t) { + return Gt("ttfb", t, Vc, $s); +} +function Uc(t) { + return Gt("inp", t, Wc, Bs); +} +function Be(t, e) { + return js(t, e), Ft[t] || (Gc(t), (Ft[t] = !0)), Vs(t, e); +} +function lt(t, e) { + const n = Ze[t]; + if (n != null && n.length) + for (const r of n) + try { + r(e); + } catch (s) { + Vt && + g.error( + `Error while triggering instrumentation handler. +Type: ${t} +Name: ${_e(r)} +Error:`, + s + ); + } +} +function qc() { + return Pc( + (t) => { + lt("cls", { metric: t }), (Ms = t); + }, + { reportAllChanges: !0 } + ); +} +function jc() { + return Mc( + (t) => { + lt("lcp", { metric: t }), (Hs = t); + }, + { reportAllChanges: !0 } + ); +} +function Vc() { + return $c((t) => { + lt("ttfb", { metric: t }), ($s = t); + }); +} +function Wc() { + return xc((t) => { + lt("inp", { metric: t }), (Bs = t); + }); +} +function Gt(t, e, n, r, s = !1) { + js(t, e); + let a; + return ( + Ft[t] || ((a = n()), (Ft[t] = !0)), + r && e({ metric: r }), + Vs(t, e, s ? a : void 0) + ); +} +function Gc(t) { + const e = {}; + t === "event" && (e.durationThreshold = 0), + Ve( + t, + (n) => { + lt(t, { entries: n }); + }, + e + ); +} +function js(t, e) { + (Ze[t] = Ze[t] || []), Ze[t].push(e); +} +function Vs(t, e, n) { + return () => { + n && n(); + const r = Ze[t]; + if (!r) return; + const s = r.indexOf(e); + s !== -1 && r.splice(s, 1); + }; +} +function Yc(t) { + return "duration" in t; +} +function dn(t) { + return typeof t == "number" && isFinite(t); +} +function Te(t, e, n, { ...r }) { + const s = R(t).start_timestamp; + return ( + s && + s > e && + typeof t.updateStartTime == "function" && + t.updateStartTime(e), + Fn(t, () => { + const a = xe({ startTime: e, ...r }); + return a && a.end(n), a; + }) + ); +} +function Yn(t) { + var x; + const e = k(); + if (!e) return; + const { name: n, transaction: r, attributes: s, startTime: a } = t, + { release: i, environment: o, sendDefaultPii: c } = e.getOptions(), + u = e.getIntegrationByName("Replay"), + l = u == null ? void 0 : u.getReplayId(), + d = C(), + p = d.getUser(), + f = p !== void 0 ? p.email || p.id || p.ip_address : void 0; + let m; + try { + m = d.getScopeData().contexts.profile.profile_id; + } catch {} + const h = { + release: i, + environment: o, + user: f || void 0, + profile_id: m || void 0, + replay_id: l || void 0, + transaction: r, + "user_agent.original": (x = _.navigator) == null ? void 0 : x.userAgent, + "client.address": c ? "{{auto}}" : void 0, + ...s, + }; + return xe({ + name: n, + attributes: h, + startTime: a, + experimental: { standalone: !0 }, + }); +} +function Yt() { + return _.addEventListener && _.performance; +} +function O(t) { + return t / 1e3; +} +function Ws(t) { + let e = "unknown", + n = "unknown", + r = ""; + for (const s of t) { + if (s === "/") { + [e, n] = t.split("/"); + break; + } + if (!isNaN(Number(s))) { + (e = r === "h" ? "http" : r), (n = t.split(r)[1]); + break; + } + r += s; + } + return r === t && (e = r), { name: e, version: n }; +} +function Gs(t) { + try { + return PerformanceObserver.supportedEntryTypes.includes(t); + } catch { + return !1; + } +} +function Ys(t, e) { + let n, + r = !1; + function s(o) { + !r && n && e(o, n), (r = !0); + } + Gn(() => { + s("pagehide"); + }); + const a = t.on("beforeStartNavigationSpan", (o, c) => { + (c != null && c.isRedirect) || (s("navigation"), Lr(a, i)); + }), + i = t.on("afterStartPageLoadSpan", (o) => { + (n = o.spanContext().spanId), Lr(i); + }); +} +function Lr(...t) { + t.forEach((e) => e && setTimeout(e, 0)); +} +function zc(t) { + let e = 0, + n; + if (!Gs("layout-shift")) return; + const r = Us(({ metric: s }) => { + const a = s.entries[s.entries.length - 1]; + a && ((e = s.value), (n = a)); + }, !0); + Ys(t, (s, a) => { + Xc(e, n, a, s), r(); + }); +} +function Xc(t, e, n, r) { + var u; + Vt && g.log(`Sending CLS span (${t})`); + const s = O((Y() || 0) + ((e == null ? void 0 : e.startTime) || 0)), + a = C().getScopeData().transactionName, + i = e ? pe((u = e.sources[0]) == null ? void 0 : u.node) : "Layout shift", + o = { + [D]: "auto.http.browser.cls", + [Se]: "ui.webvital.cls", + [Ue]: (e == null ? void 0 : e.duration) || 0, + "sentry.pageload.span_id": n, + "sentry.report_event": r, + }; + e != null && + e.sources && + e.sources.forEach((l, d) => { + o[`cls.source.${d + 1}`] = pe(l.node); + }); + const c = Yn({ name: i, transaction: a, attributes: o, startTime: s }); + c && (c.addEvent("cls", { [at]: "", [it]: t }), c.end(s)); +} +function Jc(t) { + let e = 0, + n; + if (!Gs("largest-contentful-paint")) return; + const r = qs(({ metric: s }) => { + const a = s.entries[s.entries.length - 1]; + a && ((e = s.value), (n = a)); + }, !0); + Ys(t, (s, a) => { + Kc(e, n, a, s), r(); + }); +} +function Kc(t, e, n, r) { + Vt && g.log(`Sending LCP span (${t})`); + const s = O((Y() || 0) + ((e == null ? void 0 : e.startTime) || 0)), + a = C().getScopeData().transactionName, + i = e ? pe(e.element) : "Largest contentful paint", + o = { + [D]: "auto.http.browser.lcp", + [Se]: "ui.webvital.lcp", + [Ue]: 0, + "sentry.pageload.span_id": n, + "sentry.report_event": r, + }; + e && + (e.element && (o["lcp.element"] = pe(e.element)), + e.id && (o["lcp.id"] = e.id), + e.url && (o["lcp.url"] = e.url.trim().slice(0, 200)), + e.loadTime != null && (o["lcp.loadTime"] = e.loadTime), + e.renderTime != null && (o["lcp.renderTime"] = e.renderTime), + e.size != null && (o["lcp.size"] = e.size)); + const c = Yn({ name: i, transaction: a, attributes: o, startTime: s }); + c && (c.addEvent("lcp", { [at]: "millisecond", [it]: t }), c.end(s)); +} +const Zc = 2147483647; +let Cr = 0, + re = {}, + U, + De; +function Qc({ + recordClsStandaloneSpans: t, + recordLcpStandaloneSpans: e, + client: n, +}) { + const r = Yt(); + if (r && Y()) { + r.mark && _.performance.mark("sentry-tracing-init"); + const s = e ? Jc(n) : su(), + a = au(), + i = t ? zc(n) : ru(); + return () => { + s == null || s(), a(), i == null || i(); + }; + } + return () => {}; +} +function eu() { + Be("longtask", ({ entries: t }) => { + const e = G(); + if (!e) return; + const { op: n, start_timestamp: r } = R(e); + for (const s of t) { + const a = O(Y() + s.startTime), + i = O(s.duration); + (n === "navigation" && r && a < r) || + Te(e, a, a + i, { + name: "Main UI thread blocked", + op: "ui.long-task", + attributes: { [D]: "auto.ui.browser.metrics" }, + }); + } + }); +} +function tu() { + new PerformanceObserver((e) => { + const n = G(); + if (n) + for (const r of e.getEntries()) { + if (!r.scripts[0]) continue; + const s = O(Y() + r.startTime), + { start_timestamp: a, op: i } = R(n); + if (i === "navigation" && a && s < a) continue; + const o = O(r.duration), + c = { [D]: "auto.ui.browser.metrics" }, + u = r.scripts[0], + { + invoker: l, + invokerType: d, + sourceURL: p, + sourceFunctionName: f, + sourceCharPosition: m, + } = u; + (c["browser.script.invoker"] = l), + (c["browser.script.invoker_type"] = d), + p && (c["code.filepath"] = p), + f && (c["code.function"] = f), + m !== -1 && (c["browser.script.source_char_position"] = m), + Te(n, s, s + o, { + name: "Main UI thread blocked", + op: "ui.long-animation-frame", + attributes: c, + }); + } + }).observe({ type: "long-animation-frame", buffered: !0 }); +} +function nu() { + Be("event", ({ entries: t }) => { + const e = G(); + if (e) { + for (const n of t) + if (n.name === "click") { + const r = O(Y() + n.startTime), + s = O(n.duration), + a = { + name: pe(n.target), + op: `ui.interaction.${n.name}`, + startTime: r, + attributes: { [D]: "auto.ui.browser.metrics" }, + }, + i = as(n.target); + i && (a.attributes["ui.component_name"] = i), Te(e, r, r + s, a); + } + } + }); +} +function ru() { + return Us(({ metric: t }) => { + const e = t.entries[t.entries.length - 1]; + e && ((re.cls = { value: t.value, unit: "" }), (De = e)); + }, !0); +} +function su() { + return qs(({ metric: t }) => { + const e = t.entries[t.entries.length - 1]; + e && ((re.lcp = { value: t.value, unit: "millisecond" }), (U = e)); + }, !0); +} +function au() { + return Bc(({ metric: t }) => { + t.entries[t.entries.length - 1] && + (re.ttfb = { value: t.value, unit: "millisecond" }); + }); +} +function iu(t, e) { + const n = Yt(), + r = Y(); + if (!(n != null && n.getEntries) || !r) return; + const s = O(r), + a = n.getEntries(), + { op: i, start_timestamp: o } = R(t); + a.slice(Cr).forEach((c) => { + const u = O(c.startTime), + l = O(Math.max(0, c.duration)); + if (!(i === "navigation" && o && s + u < o)) + switch (c.entryType) { + case "navigation": { + uu(t, c, s); + break; + } + case "mark": + case "paint": + case "measure": { + ou(t, c, u, l, s, e.ignorePerformanceApiSpans); + const d = Wn(), + p = c.startTime < d.firstHiddenTime; + c.name === "first-paint" && + p && + (re.fp = { value: c.startTime, unit: "millisecond" }), + c.name === "first-contentful-paint" && + p && + (re.fcp = { value: c.startTime, unit: "millisecond" }); + break; + } + case "resource": { + fu(t, c, c.name, u, l, s, e.ignoreResourceSpans); + break; + } + } + }), + (Cr = Math.max(a.length - 1, 0)), + pu(t), + i === "pageload" && + (gu(re), + e.recordClsOnPageloadSpan || delete re.cls, + e.recordLcpOnPageloadSpan || delete re.lcp, + Object.entries(re).forEach(([c, u]) => { + Ri(c, u.value, u.unit); + }), + t.setAttribute("performance.timeOrigin", s), + t.setAttribute("performance.activationStart", je()), + mu(t, e)), + (U = void 0), + (De = void 0), + (re = {}); +} +function ou(t, e, n, r, s, a) { + if (["mark", "measure"].includes(e.entryType) && he(e.name, a)) return; + const i = ut(!1), + o = O(i ? i.requestStart : 0), + c = s + Math.max(n, o), + u = s + n, + l = u + r, + d = { [D]: "auto.resource.browser.metrics" }; + c !== u && + ((d["sentry.browser.measure_happened_before_request"] = !0), + (d["sentry.browser.measure_start_time"] = c)), + cu(d, e), + c <= l && Te(t, c, l, { name: e.name, op: e.entryType, attributes: d }); +} +function cu(t, e) { + try { + const n = e.detail; + if (!n) return; + if (typeof n == "object") { + for (const [r, s] of Object.entries(n)) + if (s && Qe(s)) t[`sentry.browser.measure.detail.${r}`] = s; + else if (s !== void 0) + try { + t[`sentry.browser.measure.detail.${r}`] = JSON.stringify(s); + } catch {} + return; + } + if (Qe(n)) { + t["sentry.browser.measure.detail"] = n; + return; + } + try { + t["sentry.browser.measure.detail"] = JSON.stringify(n); + } catch {} + } catch {} +} +function uu(t, e, n) { + [ + "unloadEvent", + "redirect", + "domContentLoadedEvent", + "loadEvent", + "connect", + ].forEach((r) => { + ht(t, e, r, n); + }), + ht(t, e, "secureConnection", n, "TLS/SSL"), + ht(t, e, "fetch", n, "cache"), + ht(t, e, "domainLookup", n, "DNS"), + lu(t, e, n); +} +function ht(t, e, n, r, s = n) { + const a = du(n), + i = e[a], + o = e[`${n}Start`]; + !o || + !i || + Te(t, r + O(o), r + O(i), { + op: `browser.${s}`, + name: e.name, + attributes: { + [D]: "auto.ui.browser.metrics", + ...(n === "redirect" && e.redirectCount != null + ? { "http.redirect_count": e.redirectCount } + : {}), + }, + }); +} +function du(t) { + return t === "secureConnection" + ? "connectEnd" + : t === "fetch" + ? "domainLookupStart" + : `${t}End`; +} +function lu(t, e, n) { + const r = n + O(e.requestStart), + s = n + O(e.responseEnd), + a = n + O(e.responseStart); + e.responseEnd && + (Te(t, r, s, { + op: "browser.request", + name: e.name, + attributes: { [D]: "auto.ui.browser.metrics" }, + }), + Te(t, a, s, { + op: "browser.response", + name: e.name, + attributes: { [D]: "auto.ui.browser.metrics" }, + })); +} +function fu(t, e, n, r, s, a, i) { + if (e.initiatorType === "xmlhttprequest" || e.initiatorType === "fetch") + return; + const o = e.initiatorType ? `resource.${e.initiatorType}` : "resource.other"; + if (i != null && i.includes(o)) return; + const c = ke(n), + u = { [D]: "auto.resource.browser.metrics" }; + ln(u, e, "transferSize", "http.response_transfer_size"), + ln(u, e, "encodedBodySize", "http.response_content_length"), + ln(u, e, "decodedBodySize", "http.decoded_response_content_length"); + const l = e.deliveryType; + l != null && (u["http.response_delivery_type"] = l); + const d = e.renderBlockingStatus; + if ( + (d && (u["resource.render_blocking_status"] = d), + c.protocol && (u["url.scheme"] = c.protocol.split(":").pop()), + c.host && (u["server.address"] = c.host), + (u["url.same_origin"] = n.includes(_.location.origin)), + e.nextHopProtocol != null) + ) { + const { name: m, version: h } = Ws(e.nextHopProtocol); + (u["network.protocol.name"] = m), (u["network.protocol.version"] = h); + } + const p = a + r, + f = p + s; + Te(t, p, f, { name: n.replace(_.location.origin, ""), op: o, attributes: u }); +} +function pu(t) { + const e = _.navigator; + if (!e) return; + const n = e.connection; + n && + (n.effectiveType && + t.setAttribute("effectiveConnectionType", n.effectiveType), + n.type && t.setAttribute("connectionType", n.type), + dn(n.rtt) && + (re["connection.rtt"] = { value: n.rtt, unit: "millisecond" })), + dn(e.deviceMemory) && + t.setAttribute("deviceMemory", `${e.deviceMemory} GB`), + dn(e.hardwareConcurrency) && + t.setAttribute("hardwareConcurrency", String(e.hardwareConcurrency)); +} +function mu(t, e) { + U && + e.recordLcpOnPageloadSpan && + (U.element && t.setAttribute("lcp.element", pe(U.element)), + U.id && t.setAttribute("lcp.id", U.id), + U.url && t.setAttribute("lcp.url", U.url.trim().slice(0, 200)), + U.loadTime != null && t.setAttribute("lcp.loadTime", U.loadTime), + U.renderTime != null && t.setAttribute("lcp.renderTime", U.renderTime), + t.setAttribute("lcp.size", U.size)), + De != null && + De.sources && + e.recordClsOnPageloadSpan && + De.sources.forEach((n, r) => + t.setAttribute(`cls.source.${r + 1}`, pe(n.node)) + ); +} +function ln(t, e, n, r) { + const s = e[n]; + s != null && s < Zc && (t[r] = s); +} +function gu(t) { + const e = ut(!1); + if (!e) return; + const { responseStart: n, requestStart: r } = e; + r <= n && (t["ttfb.requestTime"] = { value: n - r, unit: "millisecond" }); +} +function hu() { + return Yt() && Y() ? Be("element", _u) : () => {}; +} +const _u = ({ entries: t }) => { + const e = G(), + n = e ? W(e) : void 0, + r = n ? R(n).description : C().getScopeData().transactionName; + t.forEach((s) => { + var f, m; + const a = s; + if (!a.identifier) return; + const i = a.name, + o = a.renderTime, + c = a.loadTime, + [u, l] = c + ? [O(c), "load-time"] + : o + ? [O(o), "render-time"] + : [q(), "entry-emission"], + d = i === "image-paint" ? O(Math.max(0, (o ?? 0) - (c ?? 0))) : 0, + p = { + [D]: "auto.ui.browser.elementtiming", + [Se]: "ui.elementtiming", + [Q]: "component", + "sentry.span_start_time_source": l, + "sentry.transaction_name": r, + "element.id": a.id, + "element.type": + ((m = (f = a.element) == null ? void 0 : f.tagName) == null + ? void 0 + : m.toLowerCase()) || "unknown", + "element.size": + a.naturalWidth && a.naturalHeight + ? `${a.naturalWidth}x${a.naturalHeight}` + : void 0, + "element.render_time": o, + "element.load_time": c, + "element.url": a.url || void 0, + "element.identifier": a.identifier, + "element.paint_type": i, + }; + Li( + { + name: `element[${a.identifier}]`, + attributes: p, + startTime: u, + onlyIfParent: !0, + }, + (h) => { + h.end(u + d); + } + ); + }); + }, + Su = 1e3; +let Or, An, Pn; +function Eu(t) { + ye("dom", t), ve("dom", Tu); +} +function Tu() { + if (!_.document) return; + const t = ee.bind(null, "dom"), + e = xr(t, !0); + _.document.addEventListener("click", e, !1), + _.document.addEventListener("keypress", e, !1), + ["EventTarget", "Node"].forEach((n) => { + var a, i; + const s = (a = _[n]) == null ? void 0 : a.prototype; + (i = s == null ? void 0 : s.hasOwnProperty) != null && + i.call(s, "addEventListener") && + (V(s, "addEventListener", function (o) { + return function (c, u, l) { + if (c === "click" || c == "keypress") + try { + const d = (this.__sentry_instrumentation_handlers__ = + this.__sentry_instrumentation_handlers__ || {}), + p = (d[c] = d[c] || { refCount: 0 }); + if (!p.handler) { + const f = xr(t); + (p.handler = f), o.call(this, c, f, l); + } + p.refCount++; + } catch {} + return o.call(this, c, u, l); + }; + }), + V(s, "removeEventListener", function (o) { + return function (c, u, l) { + if (c === "click" || c == "keypress") + try { + const d = this.__sentry_instrumentation_handlers__ || {}, + p = d[c]; + p && + (p.refCount--, + p.refCount <= 0 && + (o.call(this, c, p.handler, l), + (p.handler = void 0), + delete d[c]), + Object.keys(d).length === 0 && + delete this.__sentry_instrumentation_handlers__); + } catch {} + return o.call(this, c, u, l); + }; + })); + }); +} +function yu(t) { + if (t.type !== An) return !1; + try { + if (!t.target || t.target._sentryId !== Pn) return !1; + } catch {} + return !0; +} +function vu(t, e) { + return t !== "keypress" + ? !1 + : e != null && e.tagName + ? !( + e.tagName === "INPUT" || + e.tagName === "TEXTAREA" || + e.isContentEditable + ) + : !0; +} +function xr(t, e = !1) { + return (n) => { + if (!n || n._sentryCaptured) return; + const r = bu(n); + if (vu(n.type, r)) return; + et(n, "_sentryCaptured", !0), r && !r._sentryId && et(r, "_sentryId", yt()); + const s = n.type === "keypress" ? "input" : n.type; + yu(n) || + (t({ event: n, name: s, global: e }), + (An = n.type), + (Pn = r ? r._sentryId : void 0)), + clearTimeout(Or), + (Or = _.setTimeout(() => { + (Pn = void 0), (An = void 0); + }, Su)); + }; +} +function bu(t) { + try { + return t.target; + } catch { + return null; + } +} +let _t; +function zn(t) { + const e = "history"; + ye(e, t), ve(e, Iu); +} +function Iu() { + if ( + (_.addEventListener("popstate", () => { + const e = _.location.href, + n = _t; + if (((_t = e), n === e)) return; + ee("history", { from: n, to: e }); + }), + !Jo()) + ) + return; + function t(e) { + return function (...n) { + const r = n.length > 2 ? n[2] : void 0; + if (r) { + const s = _t, + a = Ru(String(r)); + if (((_t = a), s === a)) return e.apply(this, n); + ee("history", { from: s, to: a }); + } + return e.apply(this, n); + }; + } + V(_.history, "pushState", t), V(_.history, "replaceState", t); +} +function Ru(t) { + try { + return new URL(t, _.location.origin).toString(); + } catch { + return t; + } +} +const wt = {}; +function wu(t) { + const e = wt[t]; + if (e) return e; + let n = _[t]; + if (yn(n)) return (wt[t] = n.bind(_)); + const r = _.document; + if (r && typeof r.createElement == "function") + try { + const s = r.createElement("iframe"); + (s.hidden = !0), r.head.appendChild(s); + const a = s.contentWindow; + a != null && a[t] && (n = a[t]), r.head.removeChild(s); + } catch (s) { + Vt && + g.warn( + `Could not create sandbox iframe for ${t} check, bailing to window.${t}: `, + s + ); + } + return n && (wt[t] = n.bind(_)); +} +function Dr(t) { + wt[t] = void 0; +} +const Fe = "__sentry_xhr_v3__"; +function zs(t) { + ye("xhr", t), ve("xhr", Au); +} +function Au() { + if (!_.XMLHttpRequest) return; + const t = XMLHttpRequest.prototype; + (t.open = new Proxy(t.open, { + apply(e, n, r) { + const s = new Error(), + a = q() * 1e3, + i = Je(r[0]) ? r[0].toUpperCase() : void 0, + o = Pu(r[1]); + if (!i || !o) return e.apply(n, r); + (n[Fe] = { method: i, url: o, request_headers: {} }), + i === "POST" && + o.match(/sentry_key/) && + (n.__sentry_own_request__ = !0); + const c = () => { + const u = n[Fe]; + if (u && n.readyState === 4) { + try { + u.status_code = n.status; + } catch {} + const l = { + endTimestamp: q() * 1e3, + startTimestamp: a, + xhr: n, + virtualError: s, + }; + ee("xhr", l); + } + }; + return ( + "onreadystatechange" in n && typeof n.onreadystatechange == "function" + ? (n.onreadystatechange = new Proxy(n.onreadystatechange, { + apply(u, l, d) { + return c(), u.apply(l, d); + }, + })) + : n.addEventListener("readystatechange", c), + (n.setRequestHeader = new Proxy(n.setRequestHeader, { + apply(u, l, d) { + const [p, f] = d, + m = l[Fe]; + return ( + m && Je(p) && Je(f) && (m.request_headers[p.toLowerCase()] = f), + u.apply(l, d) + ); + }, + })), + e.apply(n, r) + ); + }, + })), + (t.send = new Proxy(t.send, { + apply(e, n, r) { + const s = n[Fe]; + if (!s) return e.apply(n, r); + r[0] !== void 0 && (s.body = r[0]); + const a = { startTimestamp: q() * 1e3, xhr: n }; + return ee("xhr", a), e.apply(n, r); + }, + })); +} +function Pu(t) { + if (Je(t)) return t; + try { + return t.toString(); + } catch {} +} +const fn = [], + At = new Map(), + ku = 60; +function Nu() { + if (Yt() && Y()) { + const e = Lu(); + return () => { + e(); + }; + } + return () => {}; +} +const Fr = { + click: "click", + pointerdown: "click", + pointerup: "click", + mousedown: "click", + mouseup: "click", + touchstart: "click", + touchend: "click", + mouseover: "hover", + mouseout: "hover", + mouseenter: "hover", + mouseleave: "hover", + pointerover: "hover", + pointerout: "hover", + pointerenter: "hover", + pointerleave: "hover", + dragstart: "drag", + dragend: "drag", + drag: "drag", + dragenter: "drag", + dragleave: "drag", + dragover: "drag", + drop: "drag", + keydown: "press", + keyup: "press", + keypress: "press", + input: "press", +}; +function Lu() { + return Uc(Cu); +} +const Cu = ({ metric: t }) => { + if (t.value == null) return; + const e = O(t.value); + if (e > ku) return; + const n = t.entries.find((m) => m.duration === t.value && Fr[m.name]); + if (!n) return; + const { interactionId: r } = n, + s = Fr[n.name], + a = O(Y() + n.startTime), + i = G(), + o = i ? W(i) : void 0, + u = (r != null ? At.get(r) : void 0) || o, + l = u ? R(u).description : C().getScopeData().transactionName, + d = pe(n.target), + p = { + [D]: "auto.http.browser.inp", + [Se]: `ui.interaction.${s}`, + [Ue]: n.duration, + }, + f = Yn({ name: d, transaction: l, attributes: p, startTime: a }); + f && + (f.addEvent("inp", { [at]: "millisecond", [it]: t.value }), f.end(a + e)); +}; +function Ou() { + const t = ({ entries: e }) => { + const n = G(), + r = n && W(n); + e.forEach((s) => { + if (!Yc(s) || !r) return; + const a = s.interactionId; + if (a != null && !At.has(a)) { + if (fn.length > 10) { + const i = fn.shift(); + At.delete(i); + } + fn.push(a), At.set(a, r); + } + }); + }; + Be("event", t), Be("first-input", t); +} +function xu(t, e = wu("fetch")) { + let n = 0, + r = 0; + function s(a) { + const i = a.body.length; + (n += i), r++; + const o = { + body: a.body, + method: "POST", + referrerPolicy: "strict-origin", + headers: t.headers, + keepalive: n <= 6e4 && r < 15, + ...t.fetchOptions, + }; + if (!e) return Dr("fetch"), Nt("No fetch implementation available"); + try { + return e(t.url, o).then( + (c) => ( + (n -= i), + r--, + { + statusCode: c.status, + headers: { + "x-sentry-rate-limits": c.headers.get("X-Sentry-Rate-Limits"), + "retry-after": c.headers.get("Retry-After"), + }, + } + ) + ); + } catch (c) { + return Dr("fetch"), (n -= i), r--, Nt(c); + } + } + return fo(t, s); +} +const Du = 30, + Fu = 50; +function kn(t, e, n, r) { + const s = { filename: t, function: e === "" ? He : e, in_app: !0 }; + return n !== void 0 && (s.lineno = n), r !== void 0 && (s.colno = r), s; +} +const Mu = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, + Hu = + /^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, + $u = /\((\S*)(?::(\d+))(?::(\d+))\)/, + Bu = /at (.+?) ?\(data:(.+?),/, + Uu = (t) => { + const e = t.match(Bu); + if (e) return { filename: ``, function: e[1] }; + const n = Mu.exec(t); + if (n) { + const [, s, a, i] = n; + return kn(s, He, +a, +i); + } + const r = Hu.exec(t); + if (r) { + if (r[2] && r[2].indexOf("eval") === 0) { + const o = $u.exec(r[2]); + o && ((r[2] = o[1]), (r[3] = o[2]), (r[4] = o[3])); + } + const [a, i] = Xs(r[1] || He, r[2]); + return kn(i, a, r[3] ? +r[3] : void 0, r[4] ? +r[4] : void 0); + } + }, + qu = [Du, Uu], + ju = + /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i, + Vu = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i, + Wu = (t) => { + const e = ju.exec(t); + if (e) { + if (e[3] && e[3].indexOf(" > eval") > -1) { + const a = Vu.exec(e[3]); + a && + ((e[1] = e[1] || "eval"), (e[3] = a[1]), (e[4] = a[2]), (e[5] = "")); + } + let r = e[3], + s = e[1] || He; + return ( + ([s, r] = Xs(s, r)), + kn(r, s, e[4] ? +e[4] : void 0, e[5] ? +e[5] : void 0) + ); + } + }, + Gu = [Fu, Wu], + Yu = [qu, Gu], + zu = xa(...Yu), + Xs = (t, e) => { + const n = t.indexOf("safari-extension") !== -1, + r = t.indexOf("safari-web-extension") !== -1; + return n || r + ? [ + t.indexOf("@") !== -1 ? t.split("@")[0] : He, + n ? `safari-extension:${e}` : `safari-web-extension:${e}`, + ] + : [t, e]; + }, + te = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, + St = 1024, + Xu = "Breadcrumbs", + Ju = (t = {}) => { + const e = { + console: !0, + dom: !0, + fetch: !0, + history: !0, + sentry: !0, + xhr: !0, + ...t, + }; + return { + name: Xu, + setup(n) { + e.console && Do(ed(n)), + e.dom && Eu(Qu(n, e.dom)), + e.xhr && zs(td(n)), + e.fetch && ks(nd(n)), + e.history && zn(rd(n)), + e.sentry && n.on("beforeSendEvent", Zu(n)); + }, + }; + }, + Ku = Ju; +function Zu(t) { + return function (n) { + k() === t && + Oe( + { + category: `sentry.${ + n.type === "transaction" ? "transaction" : "event" + }`, + event_id: n.event_id, + level: n.level, + message: Pe(n), + }, + { event: n } + ); + }; +} +function Qu(t, e) { + return function (r) { + if (k() !== t) return; + let s, + a, + i = typeof e == "object" ? e.serializeAttribute : void 0, + o = + typeof e == "object" && typeof e.maxStringLength == "number" + ? e.maxStringLength + : void 0; + o && + o > St && + (te && + g.warn( + `\`dom.maxStringLength\` cannot exceed ${St}, but a value of ${o} was configured. Sentry will use ${St} instead.` + ), + (o = St)), + typeof i == "string" && (i = [i]); + try { + const u = r.event, + l = sd(u) ? u.target : u; + (s = pe(l, { keyAttrs: i, maxStringLength: o })), (a = as(l)); + } catch { + s = ""; + } + if (s.length === 0) return; + const c = { category: `ui.${r.name}`, message: s }; + a && (c.data = { "ui.component_name": a }), + Oe(c, { event: r.event, name: r.name, global: r.global }); + }; +} +function ed(t) { + return function (n) { + if (k() !== t) return; + const r = { + category: "console", + data: { arguments: n.args, logger: "console" }, + level: Mo(n.level), + message: ir(n.args, " "), + }; + if (n.level === "assert") + if (n.args[0] === !1) + (r.message = `Assertion failed: ${ + ir(n.args.slice(1), " ") || "console.assert" + }`), + (r.data.arguments = n.args.slice(1)); + else return; + Oe(r, { input: n.args, level: n.level }); + }; +} +function td(t) { + return function (n) { + if (k() !== t) return; + const { startTimestamp: r, endTimestamp: s } = n, + a = n.xhr[Fe]; + if (!r || !s || !a) return; + const { method: i, url: o, status_code: c, body: u } = a, + l = { method: i, url: o, status_code: c }, + d = { xhr: n.xhr, input: u, startTimestamp: r, endTimestamp: s }, + p = { category: "xhr", data: l, type: "http", level: Ps(c) }; + t.emit("beforeOutgoingRequestBreadcrumb", p, d), Oe(p, d); + }; +} +function nd(t) { + return function (n) { + if (k() !== t) return; + const { startTimestamp: r, endTimestamp: s } = n; + if ( + s && + !(n.fetchData.url.match(/sentry_key/) && n.fetchData.method === "POST") + ) + if ((n.fetchData.method, n.fetchData.url, n.error)) { + const a = n.fetchData, + i = { + data: n.error, + input: n.args, + startTimestamp: r, + endTimestamp: s, + }, + o = { category: "fetch", data: a, level: "error", type: "http" }; + t.emit("beforeOutgoingRequestBreadcrumb", o, i), Oe(o, i); + } else { + const a = n.response, + i = { ...n.fetchData, status_code: a == null ? void 0 : a.status }; + n.fetchData.request_body_size, + n.fetchData.response_body_size, + a == null || a.status; + const o = { + input: n.args, + response: a, + startTimestamp: r, + endTimestamp: s, + }, + c = { + category: "fetch", + data: i, + type: "http", + level: Ps(i.status_code), + }; + t.emit("beforeOutgoingRequestBreadcrumb", c, o), Oe(c, o); + } + }; +} +function rd(t) { + return function (n) { + if (k() !== t) return; + let r = n.from, + s = n.to; + const a = ke(T.location.href); + let i = r ? ke(r) : void 0; + const o = ke(s); + (i != null && i.path) || (i = a), + a.protocol === o.protocol && a.host === o.host && (s = o.relative), + a.protocol === i.protocol && a.host === i.host && (r = i.relative), + Oe({ category: "navigation", data: { from: r, to: s } }); + }; +} +function sd(t) { + return !!t && !!t.target; +} +const ad = [ + "EventTarget", + "Window", + "Node", + "ApplicationCache", + "AudioTrackList", + "BroadcastChannel", + "ChannelMergerNode", + "CryptoOperation", + "EventSource", + "FileReader", + "HTMLUnknownElement", + "IDBDatabase", + "IDBRequest", + "IDBTransaction", + "KeyOperation", + "MediaController", + "MessagePort", + "ModalWindow", + "Notification", + "SVGElementInstance", + "Screen", + "SharedWorker", + "TextTrack", + "TextTrackCue", + "TextTrackList", + "WebSocket", + "WebSocketWorker", + "Worker", + "XMLHttpRequest", + "XMLHttpRequestEventTarget", + "XMLHttpRequestUpload", + ], + id = "BrowserApiErrors", + od = (t = {}) => { + const e = { + XMLHttpRequest: !0, + eventTarget: !0, + requestAnimationFrame: !0, + setInterval: !0, + setTimeout: !0, + unregisterOriginalCallbacks: !1, + ...t, + }; + return { + name: id, + setupOnce() { + e.setTimeout && V(T, "setTimeout", Mr), + e.setInterval && V(T, "setInterval", Mr), + e.requestAnimationFrame && V(T, "requestAnimationFrame", ud), + e.XMLHttpRequest && + "XMLHttpRequest" in T && + V(XMLHttpRequest.prototype, "send", dd); + const n = e.eventTarget; + n && (Array.isArray(n) ? n : ad).forEach((s) => ld(s, e)); + }, + }; + }, + cd = od; +function Mr(t) { + return function (...e) { + const n = e[0]; + return ( + (e[0] = $e(n, { + mechanism: { + handled: !1, + type: `auto.browser.browserapierrors.${_e(t)}`, + }, + })), + t.apply(this, e) + ); + }; +} +function ud(t) { + return function (e) { + return t.apply(this, [ + $e(e, { + mechanism: { + data: { handler: _e(t) }, + handled: !1, + type: "auto.browser.browserapierrors.requestAnimationFrame", + }, + }), + ]); + }; +} +function dd(t) { + return function (...e) { + const n = this; + return ( + ["onload", "onerror", "onprogress", "onreadystatechange"].forEach((s) => { + s in n && + typeof n[s] == "function" && + V(n, s, function (a) { + const i = { + mechanism: { + data: { handler: _e(a) }, + handled: !1, + type: `auto.browser.browserapierrors.xhr.${s}`, + }, + }, + o = xn(a); + return o && (i.mechanism.data.handler = _e(o)), $e(a, i); + }); + }), + t.apply(this, e) + ); + }; +} +function ld(t, e) { + var s, a; + const r = (s = T[t]) == null ? void 0 : s.prototype; + (a = r == null ? void 0 : r.hasOwnProperty) != null && + a.call(r, "addEventListener") && + (V(r, "addEventListener", function (i) { + return function (o, c, u) { + try { + fd(c) && + (c.handleEvent = $e(c.handleEvent, { + mechanism: { + data: { handler: _e(c), target: t }, + handled: !1, + type: "auto.browser.browserapierrors.handleEvent", + }, + })); + } catch {} + return ( + e.unregisterOriginalCallbacks && pd(this, o, c), + i.apply(this, [ + o, + $e(c, { + mechanism: { + data: { handler: _e(c), target: t }, + handled: !1, + type: "auto.browser.browserapierrors.addEventListener", + }, + }), + u, + ]) + ); + }; + }), + V(r, "removeEventListener", function (i) { + return function (o, c, u) { + try { + const l = c.__sentry_wrapped__; + l && i.call(this, o, l, u); + } catch {} + return i.call(this, o, c, u); + }; + })); +} +function fd(t) { + return typeof t.handleEvent == "function"; +} +function pd(t, e, n) { + t && + typeof t == "object" && + "removeEventListener" in t && + typeof t.removeEventListener == "function" && + t.removeEventListener(e, n); +} +const md = () => ({ + name: "BrowserSession", + setupOnce() { + if (typeof T.document > "u") { + te && + g.warn( + "Using the `browserSessionIntegration` in non-browser environments is not supported." + ); + return; + } + or({ ignoreDuration: !0 }), + cr(), + zn(({ from: t, to: e }) => { + t !== void 0 && t !== e && (or({ ignoreDuration: !0 }), cr()); + }); + }, + }), + gd = "GlobalHandlers", + hd = (t = {}) => { + const e = { onerror: !0, onunhandledrejection: !0, ...t }; + return { + name: gd, + setupOnce() { + Error.stackTraceLimit = 50; + }, + setup(n) { + e.onerror && (Sd(n), Hr("onerror")), + e.onunhandledrejection && (Ed(n), Hr("onunhandledrejection")); + }, + }; + }, + _d = hd; +function Sd(t) { + cs((e) => { + const { stackParser: n, attachStacktrace: r } = Js(); + if (k() !== t || Ls()) return; + const { msg: s, url: a, line: i, column: o, error: c } = e, + u = vd(qn(n, c || s, void 0, r, !1), a, i, o); + (u.level = "error"), + is(u, { + originalException: c, + mechanism: { + handled: !1, + type: "auto.browser.global_handlers.onerror", + }, + }); + }); +} +function Ed(t) { + us((e) => { + const { stackParser: n, attachStacktrace: r } = Js(); + if (k() !== t || Ls()) return; + const s = Td(e), + a = Qe(s) ? yd(s) : qn(n, s, void 0, r, !0); + (a.level = "error"), + is(a, { + originalException: s, + mechanism: { + handled: !1, + type: "auto.browser.global_handlers.onunhandledrejection", + }, + }); + }); +} +function Td(t) { + if (Qe(t)) return t; + try { + if ("reason" in t) return t.reason; + if ("detail" in t && "reason" in t.detail) return t.detail.reason; + } catch {} + return t; +} +function yd(t) { + return { + exception: { + values: [ + { + type: "UnhandledRejection", + value: `Non-Error promise rejection captured with value: ${String( + t + )}`, + }, + ], + }, + }; +} +function vd(t, e, n, r) { + const s = (t.exception = t.exception || {}), + a = (s.values = s.values || []), + i = (a[0] = a[0] || {}), + o = (i.stacktrace = i.stacktrace || {}), + c = (o.frames = o.frames || []), + u = r, + l = n, + d = bd(e) ?? ot(); + return ( + c.length === 0 && + c.push({ colno: u, filename: d, function: He, in_app: !0, lineno: l }), + t + ); +} +function Hr(t) { + te && g.log(`Global Handler attached: ${t}`); +} +function Js() { + const t = k(); + return ( + (t == null ? void 0 : t.getOptions()) || { + stackParser: () => [], + attachStacktrace: !1, + } + ); +} +function bd(t) { + if (!(!Je(t) || t.length === 0)) { + if (t.startsWith("data:")) { + const e = t.match(/^data:([^;]+)/), + n = e ? e[1] : "text/javascript", + r = t.includes("base64,"); + return ``; + } + return t.slice(0, 1024); + } +} +const Id = () => ({ + name: "HttpContext", + preprocessEvent(t) { + var r; + if (!T.navigator && !T.location && !T.document) return; + const e = $n(), + n = { ...e.headers, ...((r = t.request) == null ? void 0 : r.headers) }; + t.request = { ...e, ...t.request, headers: n }; + }, + }), + Rd = "cause", + wd = 5, + Ad = "LinkedErrors", + Pd = (t = {}) => { + const e = t.limit || wd, + n = t.key || Rd; + return { + name: Ad, + preprocessEvent(r, s, a) { + const i = a.getOptions(); + xo(Bn, i.stackParser, n, e, r, s); + }, + }; + }, + kd = Pd; +function Nd() { + return Ld() + ? (te && + qt(() => { + console.error( + "[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/" + ); + }), + !0) + : !1; +} +function Ld() { + var a; + if (typeof T.window > "u") return !1; + const t = T; + if (t.nw) return !1; + const e = t.chrome || t.browser; + if (!((a = e == null ? void 0 : e.runtime) != null && a.id)) return !1; + const n = ot(), + r = [ + "chrome-extension", + "moz-extension", + "ms-browser-extension", + "safari-web-extension", + ]; + return !(T === T.top && r.some((i) => n.startsWith(`${i}://`))); +} +function Nn(t) { + return [wo(), vo(), cd(), Ku(), _d(), kd(), Bo(), Id(), md()]; +} +function Cd(t = {}) { + const e = !t.skipBrowserExtensionCheck && Nd(), + n = { + ...t, + enabled: e ? !1 : t.enabled, + stackParser: Da(t.stackParser || zu), + integrations: Wi({ + integrations: t.integrations, + defaultIntegrations: + t.defaultIntegrations == null ? Nn() : t.defaultIntegrations, + }), + transport: t.transport || xu, + }; + return no(Sc, n); +} +function ie(t = 0) { + return ((Y() || performance.timeOrigin) + t) / 1e3; +} +function Od(t) { + const e = []; + if (t.nextHopProtocol != null) { + const { name: n, version: r } = Ws(t.nextHopProtocol); + e.push(["network.protocol.version", r], ["network.protocol.name", n]); + } + return Y() + ? [ + ...e, + ["http.request.redirect_start", ie(t.redirectStart)], + ["http.request.fetch_start", ie(t.fetchStart)], + ["http.request.domain_lookup_start", ie(t.domainLookupStart)], + ["http.request.domain_lookup_end", ie(t.domainLookupEnd)], + ["http.request.connect_start", ie(t.connectStart)], + ["http.request.secure_connection_start", ie(t.secureConnectionStart)], + ["http.request.connection_end", ie(t.connectEnd)], + ["http.request.request_start", ie(t.requestStart)], + ["http.request.response_start", ie(t.responseStart)], + ["http.request.response_end", ie(t.responseEnd)], + ] + : e; +} +const $r = new WeakMap(), + pn = new Map(), + Ks = { + traceFetch: !0, + traceXHR: !0, + enableHTTPTimings: !0, + trackFetchStreamPerformance: !1, + }; +function xd(t, e) { + const { + traceFetch: n, + traceXHR: r, + trackFetchStreamPerformance: s, + shouldCreateSpanForRequest: a, + enableHTTPTimings: i, + tracePropagationTargets: o, + onRequestSpanStart: c, + } = { ...Ks, ...e }, + u = typeof a == "function" ? a : (f) => !0, + l = (f) => Fd(f, o), + d = {}, + p = t.getOptions().propagateTraceparent; + n && + (t.addEventProcessor( + (f) => ( + f.type === "transaction" && + f.spans && + f.spans.forEach((m) => { + if (m.op === "http.client") { + const h = pn.get(m.span_id); + h && ((m.timestamp = h / 1e3), pn.delete(m.span_id)); + } + }), + f + ) + ), + s && + Qo((f) => { + if (f.response) { + const m = $r.get(f.response); + m && f.endTimestamp && pn.set(m, f.endTimestamp); + } + }), + ks((f) => { + const m = Vo(f, u, l, d, { propagateTraceparent: p }); + if ( + (f.response && + f.fetchData.__span && + $r.set(f.response, f.fetchData.__span), + m) + ) { + const h = Zs(f.fetchData.url), + x = h ? ke(h).host : void 0; + m.setAttributes({ "http.url": h, "server.address": x }), + i && Br(m), + c == null || c(m, { headers: f.headers }); + } + })), + r && + zs((f) => { + var h; + const m = Md(f, u, l, d, p); + if (m) { + i && Br(m); + let x; + try { + x = new Headers( + (h = f.xhr.__sentry_xhr_v3__) == null ? void 0 : h.request_headers + ); + } catch {} + c == null || c(m, { headers: x }); + } + }); +} +function Dd(t) { + return ( + t.entryType === "resource" && + "initiatorType" in t && + typeof t.nextHopProtocol == "string" && + (t.initiatorType === "fetch" || t.initiatorType === "xmlhttprequest") + ); +} +function Br(t) { + const { url: e } = R(t).data; + if (!e || typeof e != "string") return; + const n = Be("resource", ({ entries: r }) => { + r.forEach((s) => { + Dd(s) && + s.name.endsWith(e) && + (Od(s).forEach((i) => t.setAttribute(...i)), setTimeout(n)); + }); + }); +} +function Fd(t, e) { + const n = ot(); + if (n) { + let r, s; + try { + (r = new URL(t, n)), (s = new URL(n).origin); + } catch { + return !1; + } + const a = r.origin === s; + return e ? he(r.toString(), e) || (a && he(r.pathname, e)) : a; + } else { + const r = !!t.match(/^\/(?!\/)/); + return e ? he(t, e) : r; + } +} +function Md(t, e, n, r, s) { + const a = t.xhr, + i = a == null ? void 0 : a[Fe]; + if (!a || a.__sentry_own_request__ || !i) return; + const { url: o, method: c } = i, + u = Le() && e(o); + if (t.endTimestamp && u) { + const x = a.__sentry_xhr_span_id__; + if (!x) return; + const I = r[x]; + I && + i.status_code !== void 0 && + (es(I, i.status_code), I.end(), delete r[x]); + return; + } + const l = Zs(o), + d = ke(l || o), + p = go(o), + f = !!G(), + m = + u && f + ? xe({ + name: `${c} ${p}`, + attributes: { + url: o, + type: "xhr", + "http.method": c, + "http.url": l, + "server.address": d == null ? void 0 : d.host, + [D]: "auto.http.browser", + [Se]: "http.client", + ...((d == null ? void 0 : d.search) && { + "http.query": d == null ? void 0 : d.search, + }), + ...((d == null ? void 0 : d.hash) && { + "http.fragment": d == null ? void 0 : d.hash, + }), + }, + }) + : new Ee(); + (a.__sentry_xhr_span_id__ = m.spanContext().spanId), + (r[a.__sentry_xhr_span_id__] = m), + n(o) && Hd(a, Le() && f ? m : void 0, s); + const h = k(); + return h && h.emit("beforeOutgoingRequestSpan", m, t), m; +} +function Hd(t, e, n) { + const { + "sentry-trace": r, + baggage: s, + traceparent: a, + } = Rs({ span: e, propagateTraceparent: n }); + r && $d(t, r, s, a); +} +function $d(t, e, n, r) { + var a; + const s = (a = t.__sentry_xhr_v3__) == null ? void 0 : a.request_headers; + if (!((s != null && s["sentry-trace"]) || !t.setRequestHeader)) + try { + if ( + (t.setRequestHeader("sentry-trace", e), + r && + !(s != null && s.traceparent) && + t.setRequestHeader("traceparent", r), + n) + ) { + const i = s == null ? void 0 : s.baggage; + (!i || !Bd(i)) && t.setRequestHeader("baggage", n); + } + } catch {} +} +function Bd(t) { + return t.split(",").some((e) => e.trim().startsWith("sentry-")); +} +function Zs(t) { + try { + return new URL(t, T.location.origin).href; + } catch { + return; + } +} +function Ud() { + T.document + ? T.document.addEventListener("visibilitychange", () => { + const t = G(); + if (!t) return; + const e = W(t); + if (T.document.hidden && e) { + const n = "cancelled", + { op: r, status: s } = R(e); + te && + g.log( + `[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}` + ), + s || e.setStatus({ code: Me, message: n }), + e.setAttribute("sentry.cancellation_reason", "document.hidden"), + e.end(); + } + }) + : te && + g.warn( + "[Tracing] Could not set up background tab detection due to lack of global document" + ); +} +const qd = 3600, + Qs = "sentry_previous_trace", + jd = "sentry.previous_trace"; +function Vd(t, { linkPreviousTrace: e, consistentTraceSampling: n }) { + const r = e === "session-storage"; + let s = r ? Yd() : void 0; + t.on("spanStart", (i) => { + if (W(i) !== i) return; + const o = C().getPropagationContext(); + (s = Wd(s, i, o)), r && Gd(s); + }); + let a = !0; + n && + t.on("beforeSampling", (i) => { + if (!s) return; + const o = C(), + c = o.getPropagationContext(); + if (a && c.parentSpanId) { + a = !1; + return; + } + o.setPropagationContext({ + ...c, + dsc: { + ...c.dsc, + sample_rate: String(s.sampleRate), + sampled: String(Ln(s.spanContext)), + }, + sampleRand: s.sampleRand, + }), + (i.parentSampled = Ln(s.spanContext)), + (i.parentSampleRate = s.sampleRate), + (i.spanAttributes = { ...i.spanAttributes, [Fa]: s.sampleRate }); + }); +} +function Wd(t, e, n) { + const r = R(e); + function s() { + var o, c; + try { + return ( + Number((o = n.dsc) == null ? void 0 : o.sample_rate) ?? + Number((c = r.data) == null ? void 0 : c[Jr]) + ); + } catch { + return 0; + } + } + const a = { + spanContext: e.spanContext(), + startTimestamp: r.start_timestamp, + sampleRate: s(), + sampleRand: n.sampleRand, + }; + if (!t) return a; + const i = t.spanContext; + return i.traceId === r.trace_id + ? t + : (Date.now() / 1e3 - t.startTimestamp <= qd && + (te && + g.log( + `Adding previous_trace ${i} link to span ${{ + op: r.op, + ...e.spanContext(), + }}` + ), + e.addLink({ context: i, attributes: { [Ma]: "previous_trace" } }), + e.setAttribute(jd, `${i.traceId}-${i.spanId}-${Ln(i) ? 1 : 0}`)), + a); +} +function Gd(t) { + try { + T.sessionStorage.setItem(Qs, JSON.stringify(t)); + } catch (e) { + te && g.warn("Could not store previous trace in sessionStorage", e); + } +} +function Yd() { + var t; + try { + const e = (t = T.sessionStorage) == null ? void 0 : t.getItem(Qs); + return JSON.parse(e); + } catch { + return; + } +} +function Ln(t) { + return t.traceFlags === 1; +} +const zd = "BrowserTracing", + Xd = { + ...It, + instrumentNavigation: !0, + instrumentPageLoad: !0, + markBackgroundSpan: !0, + enableLongTask: !0, + enableLongAnimationFrame: !0, + enableInp: !0, + enableElementTiming: !0, + ignoreResourceSpans: [], + ignorePerformanceApiSpans: [], + detectRedirects: !0, + linkPreviousTrace: "in-memory", + consistentTraceSampling: !1, + _experiments: {}, + ...Ks, + }, + Jd = (t = {}) => { + const e = { name: void 0, source: void 0 }, + n = T.document, + { + enableInp: r, + enableElementTiming: s, + enableLongTask: a, + enableLongAnimationFrame: i, + _experiments: { + enableInteractions: o, + enableStandaloneClsSpans: c, + enableStandaloneLcpSpans: u, + }, + beforeStartSpan: l, + idleTimeout: d, + finalTimeout: p, + childSpanTimeout: f, + markBackgroundSpan: m, + traceFetch: h, + traceXHR: x, + trackFetchStreamPerformance: I, + shouldCreateSpanForRequest: M, + enableHTTPTimings: $, + ignoreResourceSpans: oe, + ignorePerformanceApiSpans: z, + instrumentPageLoad: E, + instrumentNavigation: b, + detectRedirects: be, + linkPreviousTrace: me, + consistentTraceSampling: ge, + onRequestSpanStart: ce, + } = { ...Xd, ...t }; + let N, H; + function X(y, A, v = !0) { + const P = A.op === "pageload", + w = A.name, + J = l ? l(A) : A, + se = J.attributes || {}; + if ((w !== J.name && ((se[Q] = "custom"), (J.attributes = se)), !v)) { + const Ie = Ut(); + xe({ ...J, startTime: Ie }).end(Ie); + return; + } + (e.name = J.name), (e.source = se[Q]); + const ue = gs(J, { + idleTimeout: d, + finalTimeout: p, + childSpanTimeout: f, + disableAutoFinish: P, + beforeSpanEnd: (Ie) => { + N == null || N(), + iu(Ie, { + recordClsOnPageloadSpan: !c, + recordLcpOnPageloadSpan: !u, + ignoreResourceSpans: oe, + ignorePerformanceApiSpans: z, + }), + qr(y, void 0); + const de = C(), + We = de.getPropagationContext(); + de.setPropagationContext({ + ...We, + traceId: ue.spanContext().traceId, + sampled: Mt(ue), + dsc: Ne(Ie), + }); + }, + }); + qr(y, ue); + function ft() { + n && + ["interactive", "complete"].includes(n.readyState) && + y.emit("idleSpanEnableAutoFinish", ue); + } + P && + n && + (n.addEventListener("readystatechange", () => { + ft(); + }), + ft()); + } + return { + name: zd, + setup(y) { + if ( + (ui(), + (N = Qc({ + recordClsStandaloneSpans: c || !1, + recordLcpStandaloneSpans: u || !1, + client: y, + })), + r && Nu(), + s && hu(), + i && + F.PerformanceObserver && + PerformanceObserver.supportedEntryTypes && + PerformanceObserver.supportedEntryTypes.includes( + "long-animation-frame" + ) + ? tu() + : a && eu(), + o && nu(), + be && n) + ) { + const v = () => { + H = q(); + }; + addEventListener("click", v, { capture: !0 }), + addEventListener("keydown", v, { capture: !0, passive: !0 }); + } + function A() { + const v = rt(y); + v && + !R(v).timestamp && + (te && + g.log( + `[Tracing] Finishing current active span with op: ${R(v).op}` + ), + v.setAttribute(kt, "cancelled"), + v.end()); + } + y.on("startNavigationSpan", (v, P) => { + if (k() !== y) return; + if (P != null && P.isRedirect) { + te && + g.warn( + "[Tracing] Detected redirect, navigation span will not be the root span, but a child span." + ), + X(y, { op: "navigation.redirect", ...v }, !1); + return; + } + (H = void 0), + A(), + Bt().setPropagationContext({ + traceId: Pt(), + sampleRand: Math.random(), + }); + const w = C(); + w.setPropagationContext({ traceId: Pt(), sampleRand: Math.random() }), + w.setSDKProcessingMetadata({ normalizedRequest: void 0 }), + X(y, { op: "navigation", ...v }); + }), + y.on("startPageLoadSpan", (v, P = {}) => { + if (k() !== y) return; + A(); + const w = P.sentryTrace || Ur("sentry-trace"), + J = P.baggage || Ur("baggage"), + se = Ha(w, J), + ue = C(); + ue.setPropagationContext(se), + ue.setSDKProcessingMetadata({ normalizedRequest: $n() }), + X(y, { op: "pageload", ...v }); + }); + }, + afterAllSetup(y) { + let A = ot(); + if ( + (me !== "off" && + Vd(y, { linkPreviousTrace: me, consistentTraceSampling: ge }), + T.location) + ) { + if (E) { + const v = Y(); + ea(y, { + name: T.location.pathname, + startTime: v ? v / 1e3 : void 0, + attributes: { [Q]: "url", [D]: "auto.pageload.browser" }, + }); + } + b && + zn(({ to: v, from: P }) => { + if (P === void 0 && (A == null ? void 0 : A.indexOf(v)) !== -1) { + A = void 0; + return; + } + A = void 0; + const w = Is(v), + J = rt(y), + se = J && be && Zd(J, H); + ta( + y, + { + name: + (w == null ? void 0 : w.pathname) || T.location.pathname, + attributes: { [Q]: "url", [D]: "auto.navigation.browser" }, + }, + { url: v, isRedirect: se } + ); + }); + } + m && Ud(), + o && Kd(y, d, p, f, e), + r && Ou(), + xd(y, { + traceFetch: h, + traceXHR: x, + trackFetchStreamPerformance: I, + tracePropagationTargets: y.getOptions().tracePropagationTargets, + shouldCreateSpanForRequest: M, + enableHTTPTimings: $, + onRequestSpanStart: ce, + }); + }, + }; + }; +function ea(t, e, n) { + t.emit("startPageLoadSpan", e, n), C().setTransactionName(e.name); + const r = rt(t); + return r && t.emit("afterStartPageLoadSpan", r), r; +} +function ta(t, e, n) { + const { url: r, isRedirect: s } = n || {}; + t.emit("beforeStartNavigationSpan", e, { isRedirect: s }), + t.emit("startNavigationSpan", e, { isRedirect: s }); + const a = C(); + return ( + a.setTransactionName(e.name), + r && + !s && + a.setSDKProcessingMetadata({ normalizedRequest: { ...$n(), url: r } }), + rt(t) + ); +} +function Ur(t) { + const e = T.document, + n = e == null ? void 0 : e.querySelector(`meta[name=${t}]`); + return (n == null ? void 0 : n.getAttribute("content")) || void 0; +} +function Kd(t, e, n, r, s) { + const a = T.document; + let i; + const o = () => { + const c = "ui.action.click", + u = rt(t); + if (u) { + const l = R(u).op; + if (["navigation", "pageload"].includes(l)) { + te && + g.warn( + `[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.` + ); + return; + } + } + if ( + (i && + (i.setAttribute(kt, "interactionInterrupted"), i.end(), (i = void 0)), + !s.name) + ) { + te && + g.warn( + `[Tracing] Did not create ${c} transaction because _latestRouteName is missing.` + ); + return; + } + i = gs( + { name: s.name, op: c, attributes: { [Q]: s.source || "url" } }, + { idleTimeout: e, finalTimeout: n, childSpanTimeout: r } + ); + }; + a && addEventListener("click", o, { capture: !0 }); +} +const na = "_sentry_idleSpan"; +function rt(t) { + return t[na]; +} +function qr(t, e) { + et(t, na, e); +} +const jr = 1.5; +function Zd(t, e) { + const n = R(t), + r = Ut(), + s = n.start_timestamp; + return !(r - s > jr || (e && r - e <= jr)); +} +function Qd(t) { + const e = { ...t }; + return Hn(e, "svelte"), Cd(e); +} +const ra = () => { + const t = $a; + return { + page: { subscribe: t.page.subscribe }, + navigating: { subscribe: t.navigating.subscribe }, + updated: t.updated, + }; + }, + el = { + subscribe(t) { + return ra().page.subscribe(t); + }, + }, + tl = { + subscribe(t) { + return ra().navigating.subscribe(t); + }, + }; +function nl(t = {}) { + const e = { + ...Jd({ ...t, instrumentNavigation: !1, instrumentPageLoad: !1 }), + }; + return { + ...e, + afterAllSetup: (n) => { + e.afterAllSetup(n), + t.instrumentPageLoad !== !1 && rl(n), + t.instrumentNavigation !== !1 && sl(n); + }, + }; +} +function rl(t) { + var r; + const e = (r = T.location) == null ? void 0 : r.pathname, + n = ea(t, { + name: e, + op: "pageload", + attributes: { [D]: "auto.pageload.sveltekit", [Q]: "url" }, + }); + n && + el.subscribe((s) => { + var i; + if (!s) return; + const a = (i = s.route) == null ? void 0 : i.id; + a && + (n.updateName(a), + n.setAttribute(Q, "route"), + C().setTransactionName(a)); + }); +} +function sl(t) { + let e; + tl.subscribe((n) => { + var l; + if (!n) { + e && (e.end(), (e = void 0)); + return; + } + const r = n.from, + s = n.to, + a = + (r == null ? void 0 : r.url.pathname) || + ((l = T.location) == null ? void 0 : l.pathname), + i = s == null ? void 0 : s.url.pathname; + if (a === i) return; + const o = r == null ? void 0 : r.route.id, + c = s == null ? void 0 : s.route.id; + e && e.end(); + const u = { + "sentry.sveltekit.navigation.type": n.type, + "sentry.sveltekit.navigation.from": o || void 0, + "sentry.sveltekit.navigation.to": c || void 0, + }; + ta(t, { + name: c || i || "unknown", + op: "navigation", + attributes: { + [D]: "auto.navigation.sveltekit", + [Q]: c ? "route" : "url", + ...u, + }, + }), + (e = xe({ + op: "ui.sveltekit.routing", + name: "SvelteKit Route Change", + attributes: { [D]: "auto.ui.sveltekit", ...u }, + onlyIfParent: !0, + })); + }); +} +function al(t) { + const e = { defaultIntegrations: il(), ...t }; + Hn(e, "sveltekit", ["sveltekit", "svelte"]); + const n = ol(), + r = Qd(e); + return n && cl(n), r; +} +function il(t) { + return typeof __SENTRY_TRACING__ > "u" || __SENTRY_TRACING__ + ? [...Nn(), nl()] + : Nn(); +} +function ol() { + const t = T, + e = t.fetch; + if (t._sentryFetchProxy && e) return (t.fetch = t._sentryFetchProxy), e; +} +function cl(t) { + const e = T; + (e._sentryFetchProxy = e.fetch), (e.fetch = t); +} +function ul({ error: t }) { + qt(() => { + console.error(t); + }); +} +function dl(t) { + const e = ul; + return (n) => ( + ll(n) || rs(n.error, { mechanism: { type: "sveltekit", handled: !1 } }), + e(n) + ); +} +function ll(t) { + const { status: e } = t; + return e ? e >= 400 && e < 500 : !1; +} +al({ + dsn: "", + tracesSampleRate: 1, + enableLogs: !0, + environment: "prod", + replaysOnErrorSampleRate: 1, +}); +const fl = dl(), + Nl = {}; +var pl = os( + '
        ' + ), + ml = os(" ", 1); +function gl(t, e) { + Va(e, !0); + let n = Ye(e, "components", 23, () => []), + r = Ye(e, "data_0", 3, null), + s = Ye(e, "data_1", 3, null), + a = Ye(e, "data_2", 3, null), + i = Ye(e, "data_3", 3, null); + Wa(() => e.stores.page.set(e.page)), + Ga(() => { + e.stores, + e.page, + e.constructors, + n(), + e.form, + r(), + s(), + a(), + i(), + e.stores.page.notify(); + }); + let o = en(!1), + c = en(!1), + u = en(null); + si(() => { + const I = e.stores.page.subscribe(() => { + j(o) && + (vt(c, !0), + Ya().then(() => { + vt(u, document.title || "untitled page", !0); + })); + }); + return vt(o, !0), I; + }); + const l = Re(() => e.constructors[3]); + var d = ml(), + p = ae(d); + { + var f = (I) => { + const M = Re(() => e.constructors[0]); + var $ = le(), + oe = ae($); + we( + oe, + () => j(M), + (z, E) => { + Ae( + E(z, { + get data() { + return r(); + }, + get form() { + return e.form; + }, + get params() { + return e.page.params; + }, + children: (b, be) => { + var me = le(), + ge = ae(me); + { + var ce = (H) => { + const X = Re(() => e.constructors[1]); + var y = le(), + A = ae(y); + we( + A, + () => j(X), + (v, P) => { + Ae( + P(v, { + get data() { + return s(); + }, + get form() { + return e.form; + }, + get params() { + return e.page.params; + }, + children: (w, J) => { + var se = le(), + ue = ae(se); + { + var ft = (de) => { + const We = Re(() => e.constructors[2]); + var Ge = le(), + zt = ae(Ge); + we( + zt, + () => j(We), + (Xt, Jt) => { + Ae( + Jt(Xt, { + get data() { + return a(); + }, + get form() { + return e.form; + }, + get params() { + return e.page.params; + }, + children: (ne, Sl) => { + var Xn = le(), + sa = ae(Xn); + we( + sa, + () => j(l), + (aa, ia) => { + Ae( + ia(aa, { + get data() { + return i(); + }, + get form() { + return e.form; + }, + get params() { + return e.page + .params; + }, + }), + (pt) => (n()[3] = pt), + () => { + var pt; + return (pt = n()) == + null + ? void 0 + : pt[3]; + } + ); + } + ), + K(ne, Xn); + }, + $$slots: { default: !0 }, + }), + (ne) => (n()[2] = ne), + () => { + var ne; + return (ne = n()) == null + ? void 0 + : ne[2]; + } + ); + } + ), + K(de, Ge); + }, + Ie = (de) => { + const We = Re(() => e.constructors[2]); + var Ge = le(), + zt = ae(Ge); + we( + zt, + () => j(We), + (Xt, Jt) => { + Ae( + Jt(Xt, { + get data() { + return a(); + }, + get form() { + return e.form; + }, + get params() { + return e.page.params; + }, + }), + (ne) => (n()[2] = ne), + () => { + var ne; + return (ne = n()) == null + ? void 0 + : ne[2]; + } + ); + } + ), + K(de, Ge); + }; + ze(ue, (de) => { + e.constructors[3] ? de(ft) : de(Ie, !1); + }); + } + K(w, se); + }, + $$slots: { default: !0 }, + }), + (w) => (n()[1] = w), + () => { + var w; + return (w = n()) == null ? void 0 : w[1]; + } + ); + } + ), + K(H, y); + }, + N = (H) => { + const X = Re(() => e.constructors[1]); + var y = le(), + A = ae(y); + we( + A, + () => j(X), + (v, P) => { + Ae( + P(v, { + get data() { + return s(); + }, + get form() { + return e.form; + }, + get params() { + return e.page.params; + }, + }), + (w) => (n()[1] = w), + () => { + var w; + return (w = n()) == null ? void 0 : w[1]; + } + ); + } + ), + K(H, y); + }; + ze(ge, (H) => { + e.constructors[2] ? H(ce) : H(N, !1); + }); + } + K(b, me); + }, + $$slots: { default: !0 }, + }), + (b) => (n()[0] = b), + () => { + var b; + return (b = n()) == null ? void 0 : b[0]; + } + ); + } + ), + K(I, $); + }, + m = (I) => { + const M = Re(() => e.constructors[0]); + var $ = le(), + oe = ae($); + we( + oe, + () => j(M), + (z, E) => { + Ae( + E(z, { + get data() { + return r(); + }, + get form() { + return e.form; + }, + get params() { + return e.page.params; + }, + }), + (b) => (n()[0] = b), + () => { + var b; + return (b = n()) == null ? void 0 : b[0]; + } + ); + } + ), + K(I, $); + }; + ze(p, (I) => { + e.constructors[1] ? I(f) : I(m, !1); + }); + } + var h = za(p, 2); + { + var x = (I) => { + var M = pl(), + $ = Ja(M); + { + var oe = (z) => { + var E = Za(); + Qa(() => ri(E, j(u))), K(z, E); + }; + ze($, (z) => { + j(c) && z(oe); + }); + } + Ka(M), K(I, M); + }; + ze(h, (I) => { + j(o) && I(x); + }); + } + K(t, d), Xa(); +} +const Ll = ai(gl), + Cl = [ + () => + L( + () => import("../nodes/0.D5b7oOw2.js"), + __vite__mapDeps([ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + ]), + import.meta.url + ), + () => + L( + () => import("../nodes/1.BMc-PacL.js"), + __vite__mapDeps([17, 1, 15, 3, 4, 5, 18, 19, 20, 2]), + import.meta.url + ), + () => + L( + () => import("../nodes/2.-6emjql3.js"), + __vite__mapDeps([21, 1, 3, 4, 5, 2, 22, 11, 12, 19, 20, 23, 10, 24]), + import.meta.url + ), + () => + L( + () => import("../nodes/3.DOMAwJeg.js"), + __vite__mapDeps([25, 1, 3, 4, 5, 2, 22, 11, 12, 19, 20, 24]), + import.meta.url + ), + () => + L( + () => import("../nodes/4.CrDfIbdR.js"), + __vite__mapDeps([ + 26, 1, 2, 3, 4, 5, 10, 12, 22, 11, 20, 19, 6, 7, 8, 9, 27, 13, 28, 29, + 30, 31, 32, 33, 34, 24, 35, 36, 37, 38, 39, 40, 15, 18, 23, 14, 41, + 42, 43, 44, 45, 46, 47, 48, + ]), + import.meta.url + ), + () => + L( + () => import("../nodes/5.cZCL4YVE.js"), + __vite__mapDeps([49, 1, 15, 3, 23, 10, 12]), + import.meta.url + ), + () => + L( + () => import("../nodes/6.WPRvZASS.js"), + __vite__mapDeps([50, 1, 15, 3, 2, 4, 5, 18, 7, 20]), + import.meta.url + ), + () => + L( + () => import("../nodes/7.ACRjrnuj.js"), + __vite__mapDeps([ + 51, 1, 3, 4, 5, 10, 22, 11, 12, 29, 20, 2, 19, 6, 7, 8, 28, 33, 27, + 31, 45, 47, 30, 44, 35, 52, 53, 54, 55, 34, 24, + ]), + import.meta.url + ), + () => + L( + () => import("../nodes/8.BbOUPQlW.js"), + __vite__mapDeps([ + 56, 1, 2, 3, 4, 5, 10, 11, 12, 29, 20, 6, 7, 8, 45, 57, 52, 53, 58, + 59, + ]), + import.meta.url + ), + () => + L( + () => import("../nodes/9.Cn-noR6e.js"), + __vite__mapDeps([60, 1, 15, 3, 5, 7, 20, 2, 4]), + import.meta.url + ), + () => + L( + () => import("../nodes/10.DqbXhTAj.js"), + __vite__mapDeps([ + 61, 1, 2, 3, 4, 5, 10, 11, 12, 29, 20, 6, 7, 8, 33, 27, 45, 53, 58, + 62, 63, 59, 54, + ]), + import.meta.url + ), + () => + L( + () => import("../nodes/11.C3Fd3lks.js"), + __vite__mapDeps([ + 64, 1, 2, 3, 4, 5, 10, 11, 12, 29, 20, 6, 7, 8, 33, 27, 45, 53, 58, + 62, 63, 59, + ]), + import.meta.url + ), + () => + L( + () => import("../nodes/12.B7-BJxmw.js"), + __vite__mapDeps([ + 65, 1, 3, 4, 5, 10, 22, 11, 12, 29, 20, 2, 19, 6, 7, 8, 32, 13, 28, + 33, 27, 30, 34, 24, 40, 31, 66, 45, 47, 67, 53, 58, 63, 55, + ]), + import.meta.url + ), + () => + L( + () => import("../nodes/13.DbQSn9aq.js"), + __vite__mapDeps([ + 68, 1, 2, 3, 4, 5, 10, 20, 19, 6, 7, 8, 41, 12, 13, 23, 42, 69, + ]), + import.meta.url + ), + () => + L( + () => import("../nodes/14.ClqwdR4T.js"), + __vite__mapDeps([ + 70, 1, 2, 3, 4, 5, 10, 22, 11, 12, 13, 20, 19, 6, 7, 8, 33, 27, 37, + 40, 31, 66, 45, 47, 36, 57, 34, + ]), + import.meta.url + ), + () => + L( + () => import("../nodes/15.D6A8EYfF.js"), + __vite__mapDeps([71, 1, 15, 3, 4, 5, 18, 23, 10, 12, 45, 46, 7, 47]), + import.meta.url + ), + () => + L( + () => import("../nodes/16.DTKQOukW.js"), + __vite__mapDeps([ + 72, 1, 2, 3, 4, 5, 10, 27, 19, 20, 6, 7, 8, 23, 12, 69, + ]), + import.meta.url + ), + () => + L( + () => import("../nodes/17.CONNNOye.js"), + __vite__mapDeps([ + 73, 1, 3, 4, 5, 10, 11, 12, 29, 13, 20, 2, 6, 7, 8, 38, 19, 37, 33, + 27, 39, 30, 44, 67, 34, + ]), + import.meta.url + ), + () => + L( + () => import("../nodes/18.24JvCqRi.js"), + __vite__mapDeps([74, 1, 15, 3, 5, 23, 10, 12, 75]), + import.meta.url + ), + () => + L( + () => import("../nodes/19.B2QYN1F_.js"), + __vite__mapDeps([76, 1, 15, 3, 5, 23, 10, 12]), + import.meta.url + ), + () => + L( + () => import("../nodes/20.LCTNv26D.js"), + __vite__mapDeps([77, 1, 15, 3, 5, 23, 10, 12]), + import.meta.url + ), + () => + L( + () => import("../nodes/21.zScYLJw9.js"), + __vite__mapDeps([78, 1, 15, 3, 5, 23, 10, 12, 75]), + import.meta.url + ), + ], + Ol = [], + xl = { + "/": [4], + "/404": [5], + "/admin": [6, [2]], + "/admin/alliances": [7, [2]], + "/admin/dashboard": [8, [2]], + "/admin/mods": [9, [2, 3]], + "/admin/mods/leaderboard-reports": [11, [2, 3]], + "/admin/mods/leaderboard": [10, [2, 3]], + "/admin/users": [12, [2]], + "/join": [13], + "/moderation": [14], + "/offline": [15], + "/payment/success": [16], + "/profile-picture": [17], + "/terms/privacy": [18], + "/terms/return": [19], + "/terms/return/pt": [20], + "/terms/terms-of-service": [21], + }, + hl = { + handleError: + fl || + (({ error: t }) => { + console.error(t); + }), + init: void 0, + reroute: () => {}, + transport: {}, + }, + _l = Object.fromEntries( + Object.entries(hl.transport).map(([t, e]) => [t, e.decode]) + ), + Dl = !1, + Fl = (t, e) => _l[t](e); +export { + Fl as decode, + _l as decoders, + xl as dictionary, + Dl as hash, + hl as hooks, + Nl as matchers, + Cl as nodes, + Ll as root, + Ol as server_loads, +}; diff --git a/frontend-backup/_app/immutable/entry/app.iDaujbEI.js b/frontend-backup/_app/immutable/entry/app.iDaujbEI.js deleted file mode 100644 index 45f46fc..0000000 --- a/frontend-backup/_app/immutable/entry/app.iDaujbEI.js +++ /dev/null @@ -1,2 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.CnnlsrhC.js","../chunks/Bzak7iHL.js","../chunks/ByKBPM-D.js","../chunks/DUoKDNpf.js","../chunks/g8c1BvYP.js","../chunks/2CRhGZHc.js","../chunks/F0pgzfyy.js","../chunks/D2m5UD3G.js","../chunks/1lh-LSvX.js","../chunks/C5GsJ62f.js","../chunks/5NasrULQ.js","../chunks/U908S-6f.js","../chunks/B1GmkH4o.js","../chunks/CMs8vKjq.js","../chunks/BtP6pfnb.js","../chunks/D35KiPL1.js","../assets/0.CmqRY0au.css","../nodes/1.DpC5h7KA.js","../chunks/D1ivTjwA.js","../chunks/Cp3o644A.js","../chunks/KvV259my.js","../nodes/2.BY7SdjrD.js","../chunks/Y9es74tr.js","../chunks/BMKgGW48.js","../chunks/CBqzI9hL.js","../chunks/DsJqb9ei.js","../assets/ProfileAvatarWithLevel.6dmPRSfx.css","../chunks/07L1R_bo.js","../chunks/CQklNc9N.js","../assets/LoginForm.CxMG0irz.css","../chunks/Dp1pzeXC.js","../chunks/DkBFL3pa.js","../chunks/CeLr1p76.js","../assets/2.BtKF873c.css","../nodes/3.DVSEiJTt.js","../nodes/4.CeYpVeIo.js","../chunks/1mTheT_N.js","../nodes/5.CXeQMqhf.js","../nodes/6.DD7Zmm97.js","../nodes/7.DDuBPi09.js","../nodes/8.B8sOtsfv.js","../nodes/9.BQE9fbrM.js","../assets/9.BD1hRFPA.css","../nodes/10.C07JyVXo.js","../nodes/11.BVmrEev1.js"])))=>i.map(i=>d[i]); -var M=e=>{throw TypeError(e)};var B=(e,t,r)=>t.has(e)||M("Cannot "+r);var o=(e,t,r)=>(B(e,t,"read from private field"),r?r.call(e):t.get(e)),A=(e,t,r)=>t.has(e)?M("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),L=(e,t,r,i)=>(B(e,t,"write to private field"),i?i.call(e,r):t.set(e,r),r);import{_ as m}from"../chunks/Dp1pzeXC.js";import{aH as b,aO as J,A as l,av as K,aQ as N,V as W,p as X,v as Z,w as $,aR as T,aB as tt,f as G,a as O,s as et,b as y,c as rt,aS as V,d as at,r as st,aT as D,aU as ot,t as it}from"../chunks/DUoKDNpf.js";import{h as nt,m as mt,u as _t,s as ct}from"../chunks/g8c1BvYP.js";import"../chunks/Bzak7iHL.js";import{o as ut}from"../chunks/ByKBPM-D.js";import{p as I,i as x}from"../chunks/5NasrULQ.js";import{c as w}from"../chunks/BtP6pfnb.js";import{b as j}from"../chunks/CMs8vKjq.js";function lt(e){return class extends dt{constructor(t){super({component:e,...t})}}}var d,_;class dt{constructor(t){A(this,d);A(this,_);var E;var r=new Map,i=(a,s)=>{var f=W(s,!1,!1);return r.set(a,f),f};const u=new Proxy({...t.props||{},$$events:{}},{get(a,s){return l(r.get(s)??i(s,Reflect.get(a,s)))},has(a,s){return s===J?!0:(l(r.get(s)??i(s,Reflect.get(a,s))),Reflect.has(a,s))},set(a,s,f){return b(r.get(s)??i(s,f),f),Reflect.set(a,s,f)}});L(this,_,(t.hydrate?nt:mt)(t.component,{target:t.target,anchor:t.anchor,props:u,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((E=t==null?void 0:t.props)!=null&&E.$$host)||t.sync===!1)&&K(),L(this,d,u.$$events);for(const a of Object.keys(o(this,_)))a==="$set"||a==="$destroy"||a==="$on"||N(this,a,{get(){return o(this,_)[a]},set(s){o(this,_)[a]=s},enumerable:!0});o(this,_).$set=a=>{Object.assign(u,a)},o(this,_).$destroy=()=>{_t(o(this,_))}}$set(t){o(this,_).$set(t)}$on(t,r){o(this,d)[t]=o(this,d)[t]||[];const i=(...u)=>r.call(this,...u);return o(this,d)[t].push(i),()=>{o(this,d)[t]=o(this,d)[t].filter(u=>u!==i)}}$destroy(){o(this,_).$destroy()}}d=new WeakMap,_=new WeakMap;const Dt={};var ft=G('
        '),vt=G(" ",1);function ht(e,t){X(t,!0);let r=I(t,"components",23,()=>[]),i=I(t,"data_0",3,null),u=I(t,"data_1",3,null);Z(()=>t.stores.page.set(t.page)),$(()=>{t.stores,t.page,t.constructors,r(),t.form,i(),u(),t.stores.page.notify()});let E=T(!1),a=T(!1),s=T(null);ut(()=>{const n=t.stores.page.subscribe(()=>{l(E)&&(b(a,!0),tt().then(()=>{b(s,document.title||"untitled page",!0)}))});return b(E,!0),n});const f=D(()=>t.constructors[1]);var k=vt(),C=O(k);{var H=n=>{const v=D(()=>t.constructors[0]);var h=V(),P=O(h);w(P,()=>l(v),(g,p)=>{j(p(g,{get data(){return i()},get form(){return t.form},get params(){return t.page.params},children:(c,pt)=>{var S=V(),q=O(S);w(q,()=>l(f),(z,F)=>{j(F(z,{get data(){return u()},get form(){return t.form},get params(){return t.page.params}}),R=>r()[1]=R,()=>{var R;return(R=r())==null?void 0:R[1]})}),y(c,S)},$$slots:{default:!0}}),c=>r()[0]=c,()=>{var c;return(c=r())==null?void 0:c[0]})}),y(n,h)},Q=n=>{const v=D(()=>t.constructors[0]);var h=V(),P=O(h);w(P,()=>l(v),(g,p)=>{j(p(g,{get data(){return i()},get form(){return t.form},get params(){return t.page.params}}),c=>r()[0]=c,()=>{var c;return(c=r())==null?void 0:c[0]})}),y(n,h)};x(C,n=>{t.constructors[1]?n(H):n(Q,!1)})}var U=et(C,2);{var Y=n=>{var v=ft(),h=at(v);{var P=g=>{var p=ot();it(()=>ct(p,l(s))),y(g,p)};x(h,g=>{l(a)&&g(P)})}st(v),y(n,v)};x(U,n=>{l(E)&&n(Y)})}y(e,k),rt()}const It=lt(ht),xt=[()=>m(()=>import("../nodes/0.CnnlsrhC.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url),()=>m(()=>import("../nodes/1.DpC5h7KA.js"),__vite__mapDeps([17,1,15,3,4,5,18,19,20,2,6]),import.meta.url),()=>m(()=>import("../nodes/2.BY7SdjrD.js"),__vite__mapDeps([21,1,2,3,4,5,10,12,22,11,9,19,20,6,8,7,23,13,24,25,26,15,18,27,14,28,29,30,31,32,33]),import.meta.url),()=>m(()=>import("../nodes/3.DVSEiJTt.js"),__vite__mapDeps([34,1,15,3,27,10,12]),import.meta.url),()=>m(()=>import("../nodes/4.CeYpVeIo.js"),__vite__mapDeps([35,1,2,3,4,5,10,20,6,19,8,9,28,12,13,27,29,36]),import.meta.url),()=>m(()=>import("../nodes/5.CXeQMqhf.js"),__vite__mapDeps([37,1,2,3,4,5,10,22,11,9,12,20,6,19,8,25,23,31]),import.meta.url),()=>m(()=>import("../nodes/6.DD7Zmm97.js"),__vite__mapDeps([38,1,15,3,4,5,18,27,10,12,31,9,32]),import.meta.url),()=>m(()=>import("../nodes/7.DDuBPi09.js"),__vite__mapDeps([39,1,2,3,4,5,10,23,19,20,6,8,9,27,12,36]),import.meta.url),()=>m(()=>import("../nodes/8.B8sOtsfv.js"),__vite__mapDeps([40,1,3,4,5,10,11,12,24,9,2,13,20,6,8,25,23,26]),import.meta.url),()=>m(()=>import("../nodes/9.BQE9fbrM.js"),__vite__mapDeps([41,1,15,3,5,27,10,12,42]),import.meta.url),()=>m(()=>import("../nodes/10.C07JyVXo.js"),__vite__mapDeps([43,1,15,3,5,27,10,12]),import.meta.url),()=>m(()=>import("../nodes/11.BVmrEev1.js"),__vite__mapDeps([44,1,15,3,5,27,10,12,42]),import.meta.url)],wt=[],jt={"/":[2],"/404":[3],"/join":[4],"/admin":[5],"/offline":[6],"/payment/success":[7],"/profile-picture":[8],"/terms/privacy":[9],"/terms/return":[10],"/terms/terms-of-service":[11]},gt={handleError:(({error:e})=>{console.error(e)}),reroute:(()=>{}),transport:{}},Et=Object.fromEntries(Object.entries(gt.transport).map(([e,t])=>[e,t.decode])),kt=!1,Ct=(e,t)=>Et[e](t);export{Ct as decode,Et as decoders,jt as dictionary,kt as hash,gt as hooks,Dt as matchers,xt as nodes,It as root,wt as server_loads}; diff --git a/frontend-backup/_app/immutable/entry/start.CJ_UwIBa.js b/frontend-backup/_app/immutable/entry/start.CJ_UwIBa.js deleted file mode 100644 index 6a31c2c..0000000 --- a/frontend-backup/_app/immutable/entry/start.CJ_UwIBa.js +++ /dev/null @@ -1 +0,0 @@ -import{l as o,a as r}from"../chunks/KvV259my.js";export{o as load_css,r as start}; diff --git a/frontend-backup/_app/immutable/entry/start.CqSbdZXc.js b/frontend-backup/_app/immutable/entry/start.CqSbdZXc.js deleted file mode 100644 index d742b46..0000000 --- a/frontend-backup/_app/immutable/entry/start.CqSbdZXc.js +++ /dev/null @@ -1 +0,0 @@ -import{l as o,a}from"../chunks/B4HM4TqG.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5a191b66-7525-49e4-8b03-c06818aa62d5",e._sentryDebugIdIdentifier="sentry-dbid-5a191b66-7525-49e4-8b03-c06818aa62d5")})()}catch{}export{o as load_css,a as start}; diff --git a/frontend-backup/_app/immutable/entry/start.cg9kNiPJ.js b/frontend-backup/_app/immutable/entry/start.cg9kNiPJ.js new file mode 100644 index 0000000..470439b --- /dev/null +++ b/frontend-backup/_app/immutable/entry/start.cg9kNiPJ.js @@ -0,0 +1,37 @@ +import { l as o, a } from "../chunks/CyB--sFG.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + d = new e.Error().stack; + d && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[d] = "5a191b66-7525-49e4-8b03-c06818aa62d5"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-5a191b66-7525-49e4-8b03-c06818aa62d5")); + })(); +} catch {} +export { o as load_css, a as start }; diff --git a/frontend-backup/_app/immutable/nodes/0.CnnlsrhC.js b/frontend-backup/_app/immutable/nodes/0.CnnlsrhC.js deleted file mode 100644 index 388f0f1..0000000 --- a/frontend-backup/_app/immutable/nodes/0.CnnlsrhC.js +++ /dev/null @@ -1 +0,0 @@ -var ke=o=>{throw TypeError(o)};var He=(o,t,l)=>t.has(o)||ke("Cannot "+l);var gt=(o,t,l)=>(He(o,t,"read from private field"),l?l.call(o):t.get(o)),qt=(o,t,l)=>t.has(o)?ke("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(o):t.set(o,l),Qt=(o,t,l,S)=>(He(o,t,"write to private field"),S?S.call(o,l):t.set(o,l),l);import"../chunks/Bzak7iHL.js";import{o as pt,s as it}from"../chunks/ByKBPM-D.js";import{p as de,f as et,d as ot,b as n,r as p,t as J,c as ue,bo as le,ay as pe,ax as Re,az as $e,aR as R,aG as Ue,w as _t,aH as f,A as e,aT as b,x as $t,s as Mt,bj as Ve,ap as ht,aS as g,a as v,an as tn,aU as Ne,q as ne,bk as en}from"../chunks/DUoKDNpf.js";import{s as Jt}from"../chunks/g8c1BvYP.js";import{v as nn}from"../chunks/F0pgzfyy.js";import{c as an,A as on,s as sn,a as rn}from"../chunks/D2m5UD3G.js";import{d as Z,e as xt,f as ln,g as Fe,u as cn}from"../chunks/1lh-LSvX.js";import"../chunks/C5GsJ62f.js";import{p as O,i as I,s as Me,r as dn}from"../chunks/5NasrULQ.js";import{e as Pe}from"../chunks/U908S-6f.js";import{c as It,s as Tt,b as A,d as Ae,a as un,S as fn}from"../chunks/B1GmkH4o.js";import{b as Ke}from"../chunks/CMs8vKjq.js";import{c as Ot}from"../chunks/BtP6pfnb.js";import"../chunks/D35KiPL1.js";const vn=!0,Ia=Object.freeze(Object.defineProperty({__proto__:null,prerender:vn},Symbol.toStringTag,{value:"Module"})),mn=Array(12).fill(0);var gn=et('
        '),hn=et('
        ');function _n(o,t){de(t,!0);var l=hn(),S=ot(l);Pe(S,23,()=>mn,(M,L)=>`spinner-bar-${L}`,(M,L)=>{var V=gn();n(M,V)}),p(S),p(l),J(M=>{Tt(l,1,M),A(l,"data-visible",t.visible)},[()=>It(["sonner-loading-wrapper",t.class].filter(Boolean).join(" "))]),n(o,l),ue()}const bn=typeof window<"u"?window:void 0;function wn(o){let t=o.activeElement;for(;t!=null&&t.shadowRoot;){const l=t.shadowRoot.activeElement;if(l===t)break;t=l}return t}var jt,te;class yn{constructor(t={}){qt(this,jt);qt(this,te);const{window:l=bn,document:S=l==null?void 0:l.document}=t;l!==void 0&&(Qt(this,jt,S),Qt(this,te,an(M=>{const L=le(l,"focusin",M),V=le(l,"focusout",M);return()=>{L(),V()}})))}get current(){var t;return(t=gt(this,te))==null||t.call(this),gt(this,jt)?wn(gt(this,jt)):null}}jt=new WeakMap,te=new WeakMap;new yn;var ee,St;class xn{constructor(t){qt(this,ee);qt(this,St);Qt(this,ee,t),Qt(this,St,Symbol(t))}get key(){return gt(this,St)}exists(){return pe(gt(this,St))}get(){const t=Re(gt(this,St));if(t===void 0)throw new Error(`Context "${gt(this,ee)}" not found`);return t}getOr(t){const l=Re(gt(this,St));return l===void 0?t:l}set(t){return $e(gt(this,St),t)}}ee=new WeakMap,St=new WeakMap;const In=new xn("");function ce(o){return o.label!==void 0}function Tn(){let o=R(Ue(typeof document<"u"?document.hidden:!1));return _t(()=>le(document,"visibilitychange",()=>{f(o,document.hidden,!0)})),{get current(){return e(o)}}}const je=4e3,Sn=14,Bn=45,Dn=200,En=.05,Mn={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function An(o){const[t,l]=o.split("-"),S=[];return t&&S.push(t),l&&S.push(l),S}function ze(o){return 1/(1.5+Math.abs(o)/20)}var Cn=et("
        "),Pn=(o,t,l,S,M)=>{var L,V;e(t)||!e(l)||(S(),(V=(L=M.toast).onDismiss)==null||V.call(L,M.toast))},On=et(''),Ln=et('
        '),kn=et('
        '),Hn=(o,t,l,S)=>{var M,L;ce(t.toast.cancel)&&e(l)&&((L=(M=t.toast.cancel)==null?void 0:M.onClick)==null||L.call(M,o),S())},Rn=et(''),Nn=(o,t,l)=>{var S;ce(t.toast.action)&&((S=t.toast.action)==null||S.onClick(o),!o.defaultPrevented&&l())},Fn=et(''),jn=et('
        ',1),zn=et('
      • ');function Un(o,t){de(t,!0);const l=s=>{var c=g(),x=v(c);{var T=h=>{var W=Cn(),tt=ot(W);it(tt,()=>t.loadingIcon),p(W),J(Y=>{Tt(W,1,Y),A(W,"data-visible",e(E)==="loading")},[()=>{var Y,j,m;return It(xt((Y=e(at))==null?void 0:Y.loader,(m=(j=t.toast)==null?void 0:j.classes)==null?void 0:m.loader,"sonner-loader"))}]),n(h,W)},B=h=>{{let W=b(()=>{var Y,j;return xt((Y=e(at))==null?void 0:Y.loader,(j=t.toast.classes)==null?void 0:j.loader)}),tt=b(()=>e(E)==="loading");_n(h,{get class(){return e(W)},get visible(){return e(tt)}})}};I(x,h=>{t.loadingIcon?h(T):h(B,!1)})}n(s,c)};let S=O(t,"cancelButtonStyle",3,""),M=O(t,"actionButtonStyle",3,""),L=O(t,"descriptionClass",3,""),V=O(t,"unstyled",3,!1),Bt=O(t,"defaultRichColors",3,!1);const $={...Mn};let N=R(!1),q=R(!1),Lt=R(!1),zt=R(!1),Ut=R(!1),Q=R(0),bt=R(0),kt=t.toast.duration||t.duration||je,nt=R(void 0),ut=R(null),Vt=R(null);const fe=b(()=>t.index===0),ve=b(()=>t.index+1<=t.visibleToasts),E=b(()=>t.toast.type),ft=b(()=>t.toast.dismissable!==!1),At=b(()=>t.toast.class||""),Dt=b(()=>t.toast.descriptionClass||""),vt=b(()=>Z.heights.findIndex(s=>s.toastId===t.toast.id)||0),Ct=b(()=>t.toast.closeButton??t.closeButton),me=b(()=>t.toast.duration??t.duration??je);let Et=null;const ae=b(()=>t.position.split("-")),ge=b(()=>Z.heights.reduce((s,c,x)=>x>=e(vt)?s:s+c.height,0)),he=Tn(),_e=b(()=>t.toast.invert||t.invert),Kt=b(()=>e(E)==="loading"),at=b(()=>({...$,...t.classes})),be=b(()=>t.toast.title),Pt=b(()=>t.toast.description);let Wt=R(0),oe=R(0);const r=b(()=>Math.round(e(vt)*Sn+e(ge)));_t(()=>{e(be),e(Pt);let s;t.expanded||t.expandByDefault?s=1:s=1-t.index*En;const c=$t(()=>e(nt));if(c===void 0)return;c.style.setProperty("height","auto");const x=c.offsetHeight,T=c.getBoundingClientRect().height,B=Math.round(T/s+Number.EPSILON&100)/100;c.style.removeProperty("height");let h;Math.abs(B-x)<1?h=B:h=x,f(bt,h,!0),$t(()=>{Z.setHeight({toastId:t.toast.id,height:h})})});function u(){f(q,!0),f(Q,e(r),!0),Z.removeHeight(t.toast.id),setTimeout(()=>{Z.remove(t.toast.id)},Dn)}let F;const wt=b(()=>t.toast.promise&&e(E)==="loading"||t.toast.duration===Number.POSITIVE_INFINITY);function st(){f(Wt,new Date().getTime(),!0),F=setTimeout(()=>{var s,c;(c=(s=t.toast).onAutoClose)==null||c.call(s,t.toast),u()},kt)}function Ht(){if(e(oe){t.toast.updated&&(clearTimeout(F),kt=e(me),st())}),_t(()=>(e(wt)||(t.expanded||t.interacting||he.current?Ht():st()),()=>clearTimeout(F))),pt(()=>{var c;f(N,!0);const s=(c=e(nt))==null?void 0:c.getBoundingClientRect().height;return f(bt,s,!0),Z.setHeight({toastId:t.toast.id,height:s}),()=>{Z.removeHeight(t.toast.id)}}),_t(()=>{t.toast.delete&&$t(()=>{var s,c;u(),(c=(s=t.toast).onDismiss)==null||c.call(s,t.toast)})});const Oe=s=>{if(e(Kt))return;f(Q,e(r),!0);const c=s.target;c.setPointerCapture(s.pointerId),c.tagName!=="BUTTON"&&(f(Lt,!0),Et={x:s.clientX,y:s.clientY})},ie=()=>{var h,W,tt,Y,j,m;if(e(zt)||!e(ft))return;Et=null;const s=Number(((h=e(nt))==null?void 0:h.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),c=Number(((W=e(nt))==null?void 0:W.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),x=new Date().getTime()-0,T=e(ut)==="x"?s:c,B=Math.abs(T)/x;if(Math.abs(T)>=Bn||B>.11){f(Q,e(r),!0),(Y=(tt=t.toast).onDismiss)==null||Y.call(tt,t.toast),e(ut)==="x"?f(Vt,s>0?"right":"left",!0):f(Vt,c>0?"down":"up",!0),u(),f(zt,!0);return}else(j=e(nt))==null||j.style.setProperty("--swipe-amount-x","0px"),(m=e(nt))==null||m.style.setProperty("--swipe-amount-y","0px");f(Ut,!1),f(Lt,!1),f(ut,null)},mt=s=>{var W,tt,Y;if(!Et||!e(ft)||(((W=window.getSelection())==null?void 0:W.toString().length)??-1)>0)return;const x=s.clientY-Et.y,T=s.clientX-Et.x,B=t.swipeDirections??An(t.position);!e(ut)&&(Math.abs(T)>1||Math.abs(x)>1)&&f(ut,Math.abs(T)>Math.abs(x)?"x":"y",!0);let h={x:0,y:0};if(e(ut)==="y"){if(B.includes("top")||B.includes("bottom"))if(B.includes("top")&&x<0||B.includes("bottom")&&x>0)h.y=x;else{const j=x*ze(x);h.y=Math.abs(j)0)h.x=T;else{const j=T*ze(T);h.x=Math.abs(j)0||Math.abs(h.y)>0)&&f(Ut,!0),(tt=e(nt))==null||tt.style.setProperty("--swipe-amount-x",`${h.x}px`),(Y=e(nt))==null||Y.style.setProperty("--swipe-amount-y",`${h.y}px`)},yt=()=>{f(Lt,!1),f(ut,null),Et=null},K=b(()=>t.toast.icon?t.toast.icon:e(E)==="success"?t.successIcon:e(E)==="error"?t.errorIcon:e(E)==="warning"?t.warningIcon:e(E)==="info"?t.infoIcon:e(E)==="loading"?t.loadingIcon:null);var w=zn();A(w,"tabindex",0);let se;w.__pointermove=mt,w.__pointerup=ie,w.__pointerdown=Oe;var we=ot(w);{var ye=s=>{var c=On();c.__click=[Pn,Kt,ft,u,t];var x=ot(c);it(x,()=>t.closeIcon??ht),p(c),J(T=>{A(c,"aria-label",t.closeButtonAriaLabel),A(c,"data-disabled",e(Kt)),Tt(c,1,T)},[()=>{var T,B,h;return It(xt((T=e(at))==null?void 0:T.closeButton,(h=(B=t.toast)==null?void 0:B.classes)==null?void 0:h.closeButton))}]),n(s,c)};I(we,s=>{e(Ct)&&!t.toast.component&&e(E)!=="loading"&&t.closeIcon!==null&&s(ye)})}var xe=Mt(we,2);{var Ie=s=>{const c=b(()=>t.toast.component);var x=g(),T=v(x);Ot(T,()=>e(c),(B,h)=>{h(B,Me(()=>t.toast.componentProps,{closeToast:u}))}),n(s,x)},Te=s=>{var c=jn(),x=v(c);{var T=y=>{var a=Ln(),d=ot(a);{var D=_=>{var C=g(),z=v(C);{var H=G=>{var U=g(),ct=v(U);Ot(ct,()=>t.toast.icon,(dt,Yt)=>{Yt(dt,{})}),n(G,U)},P=G=>{l(G)};I(z,G=>{t.toast.icon?G(H):G(P,!1)})}n(_,C)};I(d,_=>{(t.toast.promise||e(E)==="loading")&&_(D)})}var k=Mt(d,2);{var i=_=>{var C=g(),z=v(C);{var H=G=>{var U=g(),ct=v(U);Ot(ct,()=>t.toast.icon,(dt,Yt)=>{Yt(dt,{})}),n(G,U)},P=G=>{var U=g(),ct=v(U);{var dt=Rt=>{var Gt=g(),Se=v(Gt);it(Se,()=>t.successIcon??ht),n(Rt,Gt)},Yt=Rt=>{var Gt=g(),Se=v(Gt);{var Ge=Nt=>{var Zt=g(),Be=v(Zt);it(Be,()=>t.errorIcon??ht),n(Nt,Zt)},Ze=Nt=>{var Zt=g(),Be=v(Zt);{var Xe=Ft=>{var Xt=g(),De=v(Xt);it(De,()=>t.warningIcon??ht),n(Ft,Xt)},qe=Ft=>{var Xt=g(),De=v(Xt);{var Qe=Ee=>{var Le=g(),Je=v(Le);it(Je,()=>t.infoIcon??ht),n(Ee,Le)};I(De,Ee=>{e(E)==="info"&&Ee(Qe)},!0)}n(Ft,Xt)};I(Be,Ft=>{e(E)==="warning"?Ft(Xe):Ft(qe,!1)},!0)}n(Nt,Zt)};I(Se,Nt=>{e(E)==="error"?Nt(Ge):Nt(Ze,!1)},!0)}n(Rt,Gt)};I(ct,Rt=>{e(E)==="success"?Rt(dt):Rt(Yt,!1)},!0)}n(G,U)};I(z,G=>{t.toast.icon?G(H):G(P,!1)})}n(_,C)};I(k,_=>{t.toast.type!=="loading"&&_(i)})}p(a),J(_=>Tt(a,1,_),[()=>{var _,C,z;return It(xt((_=e(at))==null?void 0:_.icon,(z=(C=t.toast)==null?void 0:C.classes)==null?void 0:z.icon))}]),n(y,a)};I(x,y=>{(e(E)||t.toast.icon||t.toast.promise)&&t.toast.icon!==null&&(e(K)!==null||t.toast.icon)&&y(T)})}var B=Mt(x,2),h=ot(B),W=ot(h);{var tt=y=>{var a=g(),d=v(a);{var D=i=>{const _=b(()=>t.toast.title);var C=g(),z=v(C);Ot(z,()=>e(_),(H,P)=>{P(H,Me(()=>t.toast.componentProps))}),n(i,C)},k=i=>{var _=Ne();J(()=>Jt(_,t.toast.title)),n(i,_)};I(d,i=>{typeof t.toast.title!="string"?i(D):i(k,!1)})}n(y,a)};I(W,y=>{t.toast.title&&y(tt)})}p(h);var Y=Mt(h,2);{var j=y=>{var a=kn(),d=ot(a);{var D=i=>{const _=b(()=>t.toast.description);var C=g(),z=v(C);Ot(z,()=>e(_),(H,P)=>{P(H,Me(()=>t.toast.componentProps))}),n(i,C)},k=i=>{var _=Ne();J(()=>Jt(_,t.toast.description)),n(i,_)};I(d,i=>{typeof t.toast.description!="string"?i(D):i(k,!1)})}p(a),J(i=>Tt(a,1,i),[()=>{var i,_;return It(xt(L(),e(Dt),(i=e(at))==null?void 0:i.description,(_=t.toast.classes)==null?void 0:_.description))}]),n(y,a)};I(Y,y=>{t.toast.description&&y(j)})}p(B);var m=Mt(B,2);{var X=y=>{var a=g(),d=v(a);{var D=i=>{var _=g(),C=v(_);Ot(C,()=>t.toast.cancel,(z,H)=>{H(z,{})}),n(i,_)},k=i=>{var _=g(),C=v(_);{var z=H=>{var P=Rn();P.__click=[Hn,t,ft,u];var G=ot(P,!0);p(P),J(U=>{Ae(P,t.toast.cancelButtonStyle??S()),Tt(P,1,U),Jt(G,t.toast.cancel.label)},[()=>{var U,ct,dt;return It(xt((U=e(at))==null?void 0:U.cancelButton,(dt=(ct=t.toast)==null?void 0:ct.classes)==null?void 0:dt.cancelButton))}]),n(H,P)};I(C,H=>{ce(t.toast.cancel)&&H(z)},!0)}n(i,_)};I(d,i=>{typeof t.toast.cancel=="function"?i(D):i(k,!1)})}n(y,a)};I(m,y=>{t.toast.cancel&&y(X)})}var rt=Mt(m,2);{var lt=y=>{var a=g(),d=v(a);{var D=i=>{var _=g(),C=v(_);Ot(C,()=>t.toast.action,(z,H)=>{H(z,{})}),n(i,_)},k=i=>{var _=g(),C=v(_);{var z=H=>{var P=Fn();P.__click=[Nn,t,u];var G=ot(P,!0);p(P),J(U=>{Ae(P,t.toast.actionButtonStyle??M()),Tt(P,1,U),Jt(G,t.toast.action.label)},[()=>{var U,ct,dt;return It(xt((U=e(at))==null?void 0:U.actionButton,(dt=(ct=t.toast)==null?void 0:ct.classes)==null?void 0:dt.actionButton))}]),n(H,P)};I(C,H=>{ce(t.toast.action)&&H(z)},!0)}n(i,_)};I(d,i=>{typeof t.toast.action=="function"?i(D):i(k,!1)})}n(y,a)};I(rt,y=>{t.toast.action&&y(lt)})}J(y=>Tt(h,1,y),[()=>{var y,a,d;return It(xt((y=e(at))==null?void 0:y.title,(d=(a=t.toast)==null?void 0:a.classes)==null?void 0:d.title))}]),n(s,c)};I(xe,s=>{t.toast.component?s(Ie):s(Te,!1)})}p(w),Ke(w,s=>f(nt,s),()=>e(nt)),J((s,c,x,T)=>{Tt(w,1,s),A(w,"data-rich-colors",t.toast.richColors??Bt()),A(w,"data-styled",!(t.toast.component||t.toast.unstyled||V())),A(w,"data-mounted",e(N)),A(w,"data-promise",c),A(w,"data-swiped",e(Ut)),A(w,"data-removed",e(q)),A(w,"data-visible",e(ve)),A(w,"data-y-position",e(ae)[0]),A(w,"data-x-position",e(ae)[1]),A(w,"data-index",t.index),A(w,"data-front",e(fe)),A(w,"data-swiping",e(Lt)),A(w,"data-dismissable",e(ft)),A(w,"data-type",e(E)),A(w,"data-invert",e(_e)),A(w,"data-swipe-out",e(zt)),A(w,"data-swipe-direction",e(Vt)),A(w,"data-expanded",x),se=Ae(w,`${t.style} ${t.toast.style}`,se,T)},[()=>{var s,c,x,T,B,h;return It(xt(t.class,e(At),(s=e(at))==null?void 0:s.toast,(x=(c=t.toast)==null?void 0:c.classes)==null?void 0:x.toast,(T=e(at))==null?void 0:T[e(E)],(h=(B=t.toast)==null?void 0:B.classes)==null?void 0:h[e(E)]))},()=>!!t.toast.promise,()=>!!(t.expanded||t.expandByDefault&&e(N)),()=>({"--index":t.index,"--toasts-before":t.index,"--z-index":Z.toasts.length-t.index,"--offset":`${e(q)?e(Q):e(r)}px`,"--initial-height":t.expandByDefault?"auto":`${e(bt)}px`})]),Ve("dragend",w,yt),n(o,w),ue()}tn(["pointermove","pointerup","pointerdown","click"]);var Vn=ne('');function Kn(o){var t=Vn();n(o,t)}var Wn=ne('');function Yn(o){var t=Wn();n(o,t)}var Gn=ne('');function Zn(o){var t=Gn();n(o,t)}var Xn=ne('');function qn(o){var t=Xn();n(o,t)}var Qn=ne('');function Jn(o){var t=Qn();n(o,t)}const pn=3,We="24px",Ye="16px",$n=4e3,ta=356,ea=14,Ce="dark",re="light";function na(o,t){const l={};return[o,t].forEach((S,M)=>{const L=M===1,V=L?"--mobile-offset":"--offset",Bt=L?Ye:We;function $(N){["top","right","bottom","left"].forEach(q=>{l[`${V}-${q}`]=typeof N=="number"?`${N}px`:N})}typeof S=="number"||typeof S=="string"?$(S):typeof S=="object"?["top","right","bottom","left"].forEach(N=>{const q=S[N];q===void 0?l[`${V}-${N}`]=Bt:l[`${V}-${N}`]=typeof q=="number"?`${q}px`:q}):$(Bt)}),l}var aa=et("
          "),oa=et('
          ');function ia(o,t){de(t,!0);function l(r){return r!=="system"?r:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Ce:re}let S=O(t,"invert",3,!1),M=O(t,"position",3,"bottom-right"),L=O(t,"hotkey",19,()=>["altKey","KeyT"]),V=O(t,"expand",3,!1),Bt=O(t,"closeButton",3,!1),$=O(t,"offset",3,We),N=O(t,"mobileOffset",3,Ye),q=O(t,"theme",3,"light"),Lt=O(t,"richColors",3,!1),zt=O(t,"duration",3,$n),Ut=O(t,"visibleToasts",3,pn),Q=O(t,"toastOptions",19,()=>({})),bt=O(t,"dir",7,"auto"),kt=O(t,"gap",3,ea),nt=O(t,"containerAriaLabel",3,"Notifications"),ut=O(t,"closeButtonAriaLabel",3,"Close toast"),Vt=dn(t,["$$slots","$$events","$$legacy","invert","position","hotkey","expand","closeButton","offset","mobileOffset","theme","richColors","duration","visibleToasts","toastOptions","dir","gap","loadingIcon","successIcon","errorIcon","warningIcon","closeIcon","infoIcon","containerAriaLabel","class","closeButtonAriaLabel","onblur","onfocus","onmouseenter","onmousemove","onmouseleave","ondragend","onpointerdown","onpointerup"]);function fe(){if(bt()!=="auto")return bt();if(typeof window>"u"||typeof document>"u")return"ltr";const r=document.documentElement.getAttribute("dir");return r==="auto"||!r?($t(()=>bt(window.getComputedStyle(document.documentElement).direction??"ltr")),bt()):($t(()=>bt(r)),r)}const ve=b(()=>Array.from(new Set([M(),...Z.toasts.filter(r=>r.position).map(r=>r.position)].filter(Boolean))));let E=R(!1),ft=R(!1),At=R(Ue(l(q()))),Dt=R(void 0),vt=R(null),Ct=R(!1);const me=b(()=>L().join("+").replace(/Key/g,"").replace(/Digit/g,""));_t(()=>{Z.toasts.length<=1&&f(E,!1)}),_t(()=>{const r=Z.toasts.filter(u=>u.dismiss&&!u.delete);if(r.length>0){const u=Z.toasts.map(F=>r.find(st=>st.id===F.id)?{...F,delete:!0}:F);Z.toasts=u}}),_t(()=>()=>{e(Dt)&&e(vt)&&(e(vt).focus({preventScroll:!0}),f(vt,null),f(Ct,!1))}),pt(()=>(Z.reset(),le(document,"keydown",u=>{var wt,st;L().every(Ht=>u[Ht]||u.code===Ht)&&(f(E,!0),(wt=e(Dt))==null||wt.focus()),u.code==="Escape"&&(document.activeElement===e(Dt)||(st=e(Dt))!=null&&st.contains(document.activeElement))&&f(E,!1)}))),_t(()=>{if(q()!=="system"&&f(At,q()),typeof window<"u"){q()==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?f(At,Ce):f(At,re));const r=window.matchMedia("(prefers-color-scheme: dark)"),u=({matches:F})=>{f(At,F?Ce:re,!0)};"addEventListener"in r?r.addEventListener("change",u):r.addListener(u)}});const Et=r=>{var u;(u=t.onblur)==null||u.call(t,r),e(Ct)&&!r.currentTarget.contains(r.relatedTarget)&&(f(Ct,!1),e(vt)&&(e(vt).focus({preventScroll:!0}),f(vt,null)))},ae=r=>{var F;(F=t.onfocus)==null||F.call(t,r),!(r.target instanceof HTMLElement&&r.target.dataset.dismissable==="false")&&(e(Ct)||(f(Ct,!0),f(vt,r.relatedTarget,!0)))},ge=r=>{var F;(F=t.onpointerdown)==null||F.call(t,r),!(r.target instanceof HTMLElement&&r.target.dataset.dismissable==="false")&&f(ft,!0)},he=r=>{var u;(u=t.onmouseenter)==null||u.call(t,r),f(E,!0)},_e=r=>{var u;(u=t.onmouseleave)==null||u.call(t,r),e(ft)||f(E,!1)},Kt=r=>{var u;(u=t.onmousemove)==null||u.call(t,r),f(E,!0)},at=r=>{var u;(u=t.ondragend)==null||u.call(t,r),f(E,!1)},be=r=>{var u;(u=t.onpointerup)==null||u.call(t,r),f(ft,!1)};In.set(new ln);var Pt=oa();A(Pt,"tabindex",-1);var Wt=ot(Pt);{var oe=r=>{var u=g(),F=v(u);Pe(F,18,()=>e(ve),wt=>wt,(wt,st,Ht,Oe)=>{const ie=b(()=>{const[K,w]=st.split("-");return{y:K,x:w}}),mt=b(()=>na($(),N()));var yt=aa();un(yt,(K,w)=>({tabindex:-1,dir:K,class:t.class,"data-sonner-toaster":!0,"data-sonner-theme":e(At),"data-y-position":e(ie).y,"data-x-position":e(ie).x,style:t.style,onblur:Et,onfocus:ae,onmouseenter:he,onmousemove:Kt,onmouseleave:_e,ondragend:at,onpointerdown:ge,onpointerup:be,...Vt,[fn]:w}),[fe,()=>{var K;return{"--front-toast-height":`${(K=Z.heights[0])==null?void 0:K.height}px`,"--width":`${ta}px`,"--gap":`${kt()}px`,"--offset-top":e(mt)["--offset-top"],"--offset-right":e(mt)["--offset-right"],"--offset-bottom":e(mt)["--offset-bottom"],"--offset-left":e(mt)["--offset-left"],"--mobile-offset-top":e(mt)["--mobile-offset-top"],"--mobile-offset-right":e(mt)["--mobile-offset-right"],"--mobile-offset-bottom":e(mt)["--mobile-offset-bottom"],"--mobile-offset-left":e(mt)["--mobile-offset-left"]}}],void 0,"svelte-tppj9g"),Pe(yt,23,()=>Z.toasts.filter(K=>!K.position&&e(Ht)===0||K.position===st),K=>K.id,(K,w,se,we)=>{{const ye=m=>{var X=g(),rt=v(X);{var lt=a=>{var d=g(),D=v(d);it(D,()=>t.successIcon??ht),n(a,d)},y=a=>{var d=g(),D=v(d);{var k=i=>{Kn(i)};I(D,i=>{t.successIcon!==null&&i(k)},!0)}n(a,d)};I(rt,a=>{t.successIcon?a(lt):a(y,!1)})}n(m,X)},xe=m=>{var X=g(),rt=v(X);{var lt=a=>{var d=g(),D=v(d);it(D,()=>t.errorIcon??ht),n(a,d)},y=a=>{var d=g(),D=v(d);{var k=i=>{Yn(i)};I(D,i=>{t.errorIcon!==null&&i(k)},!0)}n(a,d)};I(rt,a=>{t.errorIcon?a(lt):a(y,!1)})}n(m,X)},Ie=m=>{var X=g(),rt=v(X);{var lt=a=>{var d=g(),D=v(d);it(D,()=>t.warningIcon??ht),n(a,d)},y=a=>{var d=g(),D=v(d);{var k=i=>{Zn(i)};I(D,i=>{t.warningIcon!==null&&i(k)},!0)}n(a,d)};I(rt,a=>{t.warningIcon?a(lt):a(y,!1)})}n(m,X)},Te=m=>{var X=g(),rt=v(X);{var lt=a=>{var d=g(),D=v(d);it(D,()=>t.infoIcon??ht),n(a,d)},y=a=>{var d=g(),D=v(d);{var k=i=>{qn(i)};I(D,i=>{t.infoIcon!==null&&i(k)},!0)}n(a,d)};I(rt,a=>{t.infoIcon?a(lt):a(y,!1)})}n(m,X)},s=m=>{var X=g(),rt=v(X);{var lt=a=>{var d=g(),D=v(d);it(D,()=>t.closeIcon??ht),n(a,d)},y=a=>{var d=g(),D=v(d);{var k=i=>{Jn(i)};I(D,i=>{t.closeIcon!==null&&i(k)},!0)}n(a,d)};I(rt,a=>{t.closeIcon?a(lt):a(y,!1)})}n(m,X)};let c=b(()=>{var m;return((m=Q())==null?void 0:m.duration)??zt()}),x=b(()=>{var m;return((m=Q())==null?void 0:m.class)??""}),T=b(()=>{var m;return((m=Q())==null?void 0:m.descriptionClass)||""}),B=b(()=>{var m;return((m=Q())==null?void 0:m.style)??""}),h=b(()=>Q().classes||{}),W=b(()=>Q().unstyled??!1),tt=b(()=>{var m;return((m=Q())==null?void 0:m.cancelButtonStyle)??""}),Y=b(()=>{var m;return((m=Q())==null?void 0:m.actionButtonStyle)??""}),j=b(()=>{var m;return((m=Q())==null?void 0:m.closeButtonAriaLabel)??ut()});Un(K,{get index(){return e(se)},get toast(){return e(w)},get defaultRichColors(){return Lt()},get duration(){return e(c)},get class(){return e(x)},get descriptionClass(){return e(T)},get invert(){return S()},get visibleToasts(){return Ut()},get closeButton(){return Bt()},get interacting(){return e(ft)},get position(){return st},get style(){return e(B)},get classes(){return e(h)},get unstyled(){return e(W)},get cancelButtonStyle(){return e(tt)},get actionButtonStyle(){return e(Y)},get closeButtonAriaLabel(){return e(j)},get expandByDefault(){return V()},get expanded(){return e(E)},get loadingIcon(){return t.loadingIcon},successIcon:ye,errorIcon:xe,warningIcon:Ie,infoIcon:Te,closeIcon:s,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),p(yt),Ke(yt,K=>f(Dt,K),()=>e(Dt)),J(()=>yt.dir=yt.dir),n(wt,yt)}),n(r,u)};I(Wt,r=>{Z.toasts.length>0&&r(oe)})}p(Pt),J(()=>A(Pt,"aria-label",`${nt()??""} ${e(me)??""}`)),n(o,Pt),ue()}var sa=et(' ',1);function Ta(o,t){de(t,!0),pt(()=>{cn.refresh();let $=setInterval(()=>{sn()},5e3);return()=>{clearTimeout($)}});const l="muted";pt(()=>{Fe.muted=localStorage.getItem(l)==="1"}),_t(()=>{{const $=Fe.muted;document.querySelectorAll("audio").forEach(N=>{N.muted=$});for(const N of Object.values(on))N.muted=$,$||(N.volume=.3);localStorage.setItem(l,Number($).toString())}}),pt(()=>{});var S=sa();Ve("beforeunload",en,()=>{rn()});var M=v(S),L=ot(M);p(M);var V=Mt(M,2);it(V,()=>t.children);var Bt=Mt(V,2);ia(Bt,{closeButton:!0,richColors:!0,position:"top-right",class:"!top-15",duration:3e3}),J(()=>Jt(L,`Version: ${nn}`)),n(o,S),ue()}export{Ta as component,Ia as universal}; diff --git a/frontend-backup/_app/immutable/nodes/0.D5b7oOw2.js b/frontend-backup/_app/immutable/nodes/0.D5b7oOw2.js new file mode 100644 index 0000000..b46ad0f --- /dev/null +++ b/frontend-backup/_app/immutable/nodes/0.D5b7oOw2.js @@ -0,0 +1,1845 @@ +var He = (n) => { + throw TypeError(n); +}; +var Re = (n, t, i) => t.has(n) || He("Cannot " + i); +var gt = (n, t, i) => ( + Re(n, t, "read from private field"), i ? i.call(n) : t.get(n) + ), + qt = (n, t, i) => + t.has(n) + ? He("Cannot add the same private member more than once") + : t instanceof WeakSet + ? t.add(n) + : t.set(n, i), + Jt = (n, t, i, h) => ( + Re(n, t, "write to private field"), h ? h.call(n, i) : t.set(n, i), i + ); +import "../chunks/Ch2Ub8FX.js"; +import { o as pt, s as it, v as en } from "../chunks/DoL3ojdE.js"; +import { + p as de, + f as et, + d as ot, + b as a, + r as p, + t as Q, + c as ue, + bn as le, + aI as nn, + aH as Ne, + aJ as an, + au as H, + av as Ve, + y as _t, + aw as u, + g as e, + u as w, + z as $t, + s as At, + ax as We, + az as ht, + ay as g, + a as v, + at as on, + b4 as Fe, + v as ne, + bm as sn, +} from "../chunks/CMvZtFtm.js"; +import { s as Qt } from "../chunks/DVA6u9-7.js"; +import { + l as G, + m as xt, + n as rn, + o as ln, + u as Pe, + _ as cn, + p as dn, + a as un, + r as fn, + g as Ue, + q as vn, + P as mn, +} from "../chunks/BRM3t761.js"; +import { c as gn, A as hn, s as _n, a as bn } from "../chunks/C0GlPMrk.js"; +import "../chunks/CV9xcpLq.js"; +import { p as O, i as T, s as Ae, r as wn } from "../chunks/BF50aS-j.js"; +import { e as Le } from "../chunks/CXkjfmFU.js"; +import { + c as It, + a as Tt, + s as M, + e as Me, + b as yn, + S as xn, +} from "../chunks/C5yqZvKC.js"; +import { b as Ke } from "../chunks/0wx1llIh.js"; +import { c as Pt } from "../chunks/CdTXrPIO.js"; +import "../chunks/BOREeBzQ.js"; +(function () { + try { + var n = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + n.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var n = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + t = new n.Error().stack; + t && + ((n._sentryDebugIds = n._sentryDebugIds || {}), + (n._sentryDebugIds[t] = "8646eece-6508-48d5-bb48-54d5c2d58aca"), + (n._sentryDebugIdIdentifier = + "sentry-dbid-8646eece-6508-48d5-bb48-54d5c2d58aca")); + })(); +} catch {} +const In = !0, + ka = Object.freeze( + Object.defineProperty( + { __proto__: null, prerender: In }, + Symbol.toStringTag, + { value: "Module" } + ) + ), + Tn = Array(12).fill(0); +var Sn = et('
          '), + Bn = et('
          '); +function En(n, t) { + de(t, !0); + var i = Bn(), + h = ot(i); + Le( + h, + 23, + () => Tn, + (D, k) => `spinner-bar-${k}`, + (D, k) => { + var V = Sn(); + a(D, V); + } + ), + p(h), + p(i), + Q( + (D) => { + Tt(i, 1, D), M(i, "data-visible", t.visible); + }, + [() => It(["sonner-loading-wrapper", t.class].filter(Boolean).join(" "))] + ), + a(n, i), + ue(); +} +const Dn = typeof window < "u" ? window : void 0; +function An(n) { + let t = n.activeElement; + for (; t != null && t.shadowRoot; ) { + const i = t.shadowRoot.activeElement; + if (i === t) break; + t = i; + } + return t; +} +var Ut, te; +class Mn { + constructor(t = {}) { + qt(this, Ut); + qt(this, te); + const { window: i = Dn, document: h = i == null ? void 0 : i.document } = t; + i !== void 0 && + (Jt(this, Ut, h), + Jt( + this, + te, + gn((D) => { + const k = le(i, "focusin", D), + V = le(i, "focusout", D); + return () => { + k(), V(); + }; + }) + )); + } + get current() { + var t; + return ( + (t = gt(this, te)) == null || t.call(this), + gt(this, Ut) ? An(gt(this, Ut)) : null + ); + } +} +(Ut = new WeakMap()), (te = new WeakMap()); +new Mn(); +var ee, St; +class Cn { + constructor(t) { + qt(this, ee); + qt(this, St); + Jt(this, ee, t), Jt(this, St, Symbol(t)); + } + get key() { + return gt(this, St); + } + exists() { + return nn(gt(this, St)); + } + get() { + const t = Ne(gt(this, St)); + if (t === void 0) throw new Error(`Context "${gt(this, ee)}" not found`); + return t; + } + getOr(t) { + const i = Ne(gt(this, St)); + return i === void 0 ? t : i; + } + set(t) { + return an(gt(this, St), t); + } +} +(ee = new WeakMap()), (St = new WeakMap()); +const Ln = new Cn(""); +function ce(n) { + return n.label !== void 0; +} +function Pn() { + let n = H(Ve(typeof document < "u" ? document.hidden : !1)); + return ( + _t(() => + le(document, "visibilitychange", () => { + u(n, document.hidden, !0); + }) + ), + { + get current() { + return e(n); + }, + } + ); +} +const je = 4e3, + On = 14, + kn = 45, + Hn = 200, + Rn = 0.05, + Nn = { + toast: "", + title: "", + description: "", + loader: "", + closeButton: "", + cancelButton: "", + actionButton: "", + action: "", + warning: "", + error: "", + success: "", + default: "", + info: "", + loading: "", + }; +function Fn(n) { + const [t, i] = n.split("-"), + h = []; + return t && h.push(t), i && h.push(i), h; +} +function ze(n) { + return 1 / (1.5 + Math.abs(n) / 20); +} +var Un = et("
          "), + jn = (n, t, i, h, D) => { + var k, V; + e(t) || + !e(i) || + (h(), (V = (k = D.toast).onDismiss) == null || V.call(k, D.toast)); + }, + zn = et(''), + Vn = et('
          '), + Wn = et('
          '), + Kn = (n, t, i, h) => { + var D, k; + ce(t.toast.cancel) && + e(i) && + ((k = (D = t.toast.cancel) == null ? void 0 : D.onClick) == null || + k.call(D, n), + h()); + }, + Yn = et(''), + Zn = (n, t, i) => { + var h; + ce(t.toast.action) && + ((h = t.toast.action) == null || h.onClick(n), + !n.defaultPrevented && i()); + }, + Gn = et(''), + Xn = et( + '
          ', + 1 + ), + qn = et('
        1. '); +function Jn(n, t) { + de(t, !0); + const i = (r) => { + var c = g(), + I = v(c); + { + var S = (_) => { + var K = Un(), + tt = ot(K); + it(tt, () => t.loadingIcon), + p(K), + Q( + (Y) => { + Tt(K, 1, Y), M(K, "data-visible", e(A) === "loading"); + }, + [ + () => { + var Y, U, m; + return It( + xt( + (Y = e(at)) == null ? void 0 : Y.loader, + (m = (U = t.toast) == null ? void 0 : U.classes) == null + ? void 0 + : m.loader, + "sonner-loader" + ) + ); + }, + ] + ), + a(_, K); + }, + B = (_) => { + { + let K = w(() => { + var Y, U; + return xt( + (Y = e(at)) == null ? void 0 : Y.loader, + (U = t.toast.classes) == null ? void 0 : U.loader + ); + }), + tt = w(() => e(A) === "loading"); + En(_, { + get class() { + return e(K); + }, + get visible() { + return e(tt); + }, + }); + } + }; + T(I, (_) => { + t.loadingIcon ? _(S) : _(B, !1); + }); + } + a(r, c); + }; + let h = O(t, "cancelButtonStyle", 3, ""), + D = O(t, "actionButtonStyle", 3, ""), + k = O(t, "descriptionClass", 3, ""), + V = O(t, "unstyled", 3, !1), + Bt = O(t, "defaultRichColors", 3, !1); + const $ = { ...Nn }; + let L = H(!1), + q = H(!1), + Ot = H(!1), + jt = H(!1), + zt = H(!1), + J = H(0), + bt = H(0), + kt = t.toast.duration || t.duration || je, + nt = H(void 0), + ut = H(null), + Vt = H(null); + const fe = w(() => t.index === 0), + ve = w(() => t.index + 1 <= t.visibleToasts), + A = w(() => t.toast.type), + ft = w(() => t.toast.dismissable !== !1), + Mt = w(() => t.toast.class || ""), + Et = w(() => t.toast.descriptionClass || ""), + vt = w(() => G.heights.findIndex((r) => r.toastId === t.toast.id) || 0), + Ct = w(() => t.toast.closeButton ?? t.closeButton), + me = w(() => t.toast.duration ?? t.duration ?? je); + let Dt = null; + const ae = w(() => t.position.split("-")), + ge = w(() => + G.heights.reduce((r, c, I) => (I >= e(vt) ? r : r + c.height), 0) + ), + he = Pn(), + _e = w(() => t.toast.invert || t.invert), + Wt = w(() => e(A) === "loading"), + at = w(() => ({ ...$, ...t.classes })), + be = w(() => t.toast.title), + Lt = w(() => t.toast.description); + let Kt = H(0), + oe = H(0); + const l = w(() => Math.round(e(vt) * On + e(ge))); + _t(() => { + e(be), e(Lt); + let r; + t.expanded || t.expandByDefault ? (r = 1) : (r = 1 - t.index * Rn); + const c = $t(() => e(nt)); + if (c === void 0) return; + c.style.setProperty("height", "auto"); + const I = c.offsetHeight, + S = c.getBoundingClientRect().height, + B = Math.round((S / r + Number.EPSILON) & 100) / 100; + c.style.removeProperty("height"); + let _; + Math.abs(B - I) < 1 ? (_ = B) : (_ = I), + u(bt, _, !0), + $t(() => { + G.setHeight({ toastId: t.toast.id, height: _ }); + }); + }); + function f() { + u(q, !0), + u(J, e(l), !0), + G.removeHeight(t.toast.id), + setTimeout(() => { + G.remove(t.toast.id); + }, Hn); + } + let F; + const wt = w( + () => + (t.toast.promise && e(A) === "loading") || + t.toast.duration === Number.POSITIVE_INFINITY + ); + function st() { + u(Kt, new Date().getTime(), !0), + (F = setTimeout(() => { + var r, c; + (c = (r = t.toast).onAutoClose) == null || c.call(r, t.toast), f(); + }, kt)); + } + function Ht() { + if (e(oe) < e(Kt)) { + const r = new Date().getTime() - e(Kt); + kt = kt - r; + } + u(oe, new Date().getTime(), !0); + } + _t(() => { + t.toast.updated && (clearTimeout(F), (kt = e(me)), st()); + }), + _t( + () => ( + e(wt) || (t.expanded || t.interacting || he.current ? Ht() : st()), + () => clearTimeout(F) + ) + ), + pt(() => { + var c; + u(L, !0); + const r = (c = e(nt)) == null ? void 0 : c.getBoundingClientRect().height; + return ( + u(bt, r, !0), + G.setHeight({ toastId: t.toast.id, height: r }), + () => { + G.removeHeight(t.toast.id); + } + ); + }), + _t(() => { + t.toast.delete && + $t(() => { + var r, c; + f(), (c = (r = t.toast).onDismiss) == null || c.call(r, t.toast); + }); + }); + const Oe = (r) => { + if (e(Wt)) return; + u(J, e(l), !0); + const c = r.target; + c.setPointerCapture(r.pointerId), + c.tagName !== "BUTTON" && + (u(Ot, !0), (Dt = { x: r.clientX, y: r.clientY })); + }, + ie = () => { + var _, K, tt, Y, U, m; + if (e(jt) || !e(ft)) return; + Dt = null; + const r = Number( + ((_ = e(nt)) == null + ? void 0 + : _.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || + 0 + ), + c = Number( + ((K = e(nt)) == null + ? void 0 + : K.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || + 0 + ), + I = new Date().getTime() - 0, + S = e(ut) === "x" ? r : c, + B = Math.abs(S) / I; + if (Math.abs(S) >= kn || B > 0.11) { + u(J, e(l), !0), + (Y = (tt = t.toast).onDismiss) == null || Y.call(tt, t.toast), + e(ut) === "x" + ? u(Vt, r > 0 ? "right" : "left", !0) + : u(Vt, c > 0 ? "down" : "up", !0), + f(), + u(jt, !0); + return; + } else + (U = e(nt)) == null || U.style.setProperty("--swipe-amount-x", "0px"), + (m = e(nt)) == null || m.style.setProperty("--swipe-amount-y", "0px"); + u(zt, !1), u(Ot, !1), u(ut, null); + }, + mt = (r) => { + var K, tt, Y; + if ( + !Dt || + !e(ft) || + (((K = window.getSelection()) == null ? void 0 : K.toString().length) ?? + -1) > 0 + ) + return; + const I = r.clientY - Dt.y, + S = r.clientX - Dt.x, + B = t.swipeDirections ?? Fn(t.position); + !e(ut) && + (Math.abs(S) > 1 || Math.abs(I) > 1) && + u(ut, Math.abs(S) > Math.abs(I) ? "x" : "y", !0); + let _ = { x: 0, y: 0 }; + if (e(ut) === "y") { + if (B.includes("top") || B.includes("bottom")) + if ((B.includes("top") && I < 0) || (B.includes("bottom") && I > 0)) + _.y = I; + else { + const U = I * ze(I); + _.y = Math.abs(U) < Math.abs(I) ? U : I; + } + } else if (e(ut) === "x" && (B.includes("left") || B.includes("right"))) + if ((B.includes("left") && S < 0) || (B.includes("right") && S > 0)) + _.x = S; + else { + const U = S * ze(S); + _.x = Math.abs(U) < Math.abs(S) ? U : S; + } + (Math.abs(_.x) > 0 || Math.abs(_.y) > 0) && u(zt, !0), + (tt = e(nt)) == null || + tt.style.setProperty("--swipe-amount-x", `${_.x}px`), + (Y = e(nt)) == null || + Y.style.setProperty("--swipe-amount-y", `${_.y}px`); + }, + yt = () => { + u(Ot, !1), u(ut, null), (Dt = null); + }, + W = w(() => + t.toast.icon + ? t.toast.icon + : e(A) === "success" + ? t.successIcon + : e(A) === "error" + ? t.errorIcon + : e(A) === "warning" + ? t.warningIcon + : e(A) === "info" + ? t.infoIcon + : e(A) === "loading" + ? t.loadingIcon + : null + ); + var y = qn(); + M(y, "tabindex", 0); + let se; + (y.__pointermove = mt), (y.__pointerup = ie), (y.__pointerdown = Oe); + var we = ot(y); + { + var ye = (r) => { + var c = zn(); + c.__click = [jn, Wt, ft, f, t]; + var I = ot(c); + it(I, () => t.closeIcon ?? ht), + p(c), + Q( + (S) => { + M(c, "aria-label", t.closeButtonAriaLabel), + M(c, "data-disabled", e(Wt)), + Tt(c, 1, S); + }, + [ + () => { + var S, B, _; + return It( + xt( + (S = e(at)) == null ? void 0 : S.closeButton, + (_ = (B = t.toast) == null ? void 0 : B.classes) == null + ? void 0 + : _.closeButton + ) + ); + }, + ] + ), + a(r, c); + }; + T(we, (r) => { + e(Ct) && + !t.toast.component && + e(A) !== "loading" && + t.closeIcon !== null && + r(ye); + }); + } + var xe = At(we, 2); + { + var Ie = (r) => { + const c = w(() => t.toast.component); + var I = g(), + S = v(I); + Pt( + S, + () => e(c), + (B, _) => { + _( + B, + Ae(() => t.toast.componentProps, { closeToast: f }) + ); + } + ), + a(r, I); + }, + Te = (r) => { + var c = Xn(), + I = v(c); + { + var S = (x) => { + var o = Vn(), + d = ot(o); + { + var E = (b) => { + var C = g(), + j = v(C); + { + var N = (Z) => { + var z = g(), + ct = v(z); + Pt( + ct, + () => t.toast.icon, + (dt, Yt) => { + Yt(dt, {}); + } + ), + a(Z, z); + }, + P = (Z) => { + i(Z); + }; + T(j, (Z) => { + t.toast.icon ? Z(N) : Z(P, !1); + }); + } + a(b, C); + }; + T(d, (b) => { + (t.toast.promise || e(A) === "loading") && b(E); + }); + } + var R = At(d, 2); + { + var s = (b) => { + var C = g(), + j = v(C); + { + var N = (Z) => { + var z = g(), + ct = v(z); + Pt( + ct, + () => t.toast.icon, + (dt, Yt) => { + Yt(dt, {}); + } + ), + a(Z, z); + }, + P = (Z) => { + var z = g(), + ct = v(z); + { + var dt = (Rt) => { + var Zt = g(), + Se = v(Zt); + it(Se, () => t.successIcon ?? ht), a(Rt, Zt); + }, + Yt = (Rt) => { + var Zt = g(), + Se = v(Zt); + { + var qe = (Nt) => { + var Gt = g(), + Be = v(Gt); + it(Be, () => t.errorIcon ?? ht), a(Nt, Gt); + }, + Je = (Nt) => { + var Gt = g(), + Be = v(Gt); + { + var Qe = (Ft) => { + var Xt = g(), + Ee = v(Xt); + it(Ee, () => t.warningIcon ?? ht), + a(Ft, Xt); + }, + pe = (Ft) => { + var Xt = g(), + Ee = v(Xt); + { + var $e = (De) => { + var ke = g(), + tn = v(ke); + it(tn, () => t.infoIcon ?? ht), + a(De, ke); + }; + T( + Ee, + (De) => { + e(A) === "info" && De($e); + }, + !0 + ); + } + a(Ft, Xt); + }; + T( + Be, + (Ft) => { + e(A) === "warning" + ? Ft(Qe) + : Ft(pe, !1); + }, + !0 + ); + } + a(Nt, Gt); + }; + T( + Se, + (Nt) => { + e(A) === "error" ? Nt(qe) : Nt(Je, !1); + }, + !0 + ); + } + a(Rt, Zt); + }; + T( + ct, + (Rt) => { + e(A) === "success" ? Rt(dt) : Rt(Yt, !1); + }, + !0 + ); + } + a(Z, z); + }; + T(j, (Z) => { + t.toast.icon ? Z(N) : Z(P, !1); + }); + } + a(b, C); + }; + T(R, (b) => { + t.toast.type !== "loading" && b(s); + }); + } + p(o), + Q( + (b) => Tt(o, 1, b), + [ + () => { + var b, C, j; + return It( + xt( + (b = e(at)) == null ? void 0 : b.icon, + (j = (C = t.toast) == null ? void 0 : C.classes) == null + ? void 0 + : j.icon + ) + ); + }, + ] + ), + a(x, o); + }; + T(I, (x) => { + (e(A) || t.toast.icon || t.toast.promise) && + t.toast.icon !== null && + (e(W) !== null || t.toast.icon) && + x(S); + }); + } + var B = At(I, 2), + _ = ot(B), + K = ot(_); + { + var tt = (x) => { + var o = g(), + d = v(o); + { + var E = (s) => { + const b = w(() => t.toast.title); + var C = g(), + j = v(C); + Pt( + j, + () => e(b), + (N, P) => { + P( + N, + Ae(() => t.toast.componentProps) + ); + } + ), + a(s, C); + }, + R = (s) => { + var b = Fe(); + Q(() => Qt(b, t.toast.title)), a(s, b); + }; + T(d, (s) => { + typeof t.toast.title != "string" ? s(E) : s(R, !1); + }); + } + a(x, o); + }; + T(K, (x) => { + t.toast.title && x(tt); + }); + } + p(_); + var Y = At(_, 2); + { + var U = (x) => { + var o = Wn(), + d = ot(o); + { + var E = (s) => { + const b = w(() => t.toast.description); + var C = g(), + j = v(C); + Pt( + j, + () => e(b), + (N, P) => { + P( + N, + Ae(() => t.toast.componentProps) + ); + } + ), + a(s, C); + }, + R = (s) => { + var b = Fe(); + Q(() => Qt(b, t.toast.description)), a(s, b); + }; + T(d, (s) => { + typeof t.toast.description != "string" ? s(E) : s(R, !1); + }); + } + p(o), + Q( + (s) => Tt(o, 1, s), + [ + () => { + var s, b; + return It( + xt( + k(), + e(Et), + (s = e(at)) == null ? void 0 : s.description, + (b = t.toast.classes) == null ? void 0 : b.description + ) + ); + }, + ] + ), + a(x, o); + }; + T(Y, (x) => { + t.toast.description && x(U); + }); + } + p(B); + var m = At(B, 2); + { + var X = (x) => { + var o = g(), + d = v(o); + { + var E = (s) => { + var b = g(), + C = v(b); + Pt( + C, + () => t.toast.cancel, + (j, N) => { + N(j, {}); + } + ), + a(s, b); + }, + R = (s) => { + var b = g(), + C = v(b); + { + var j = (N) => { + var P = Yn(); + P.__click = [Kn, t, ft, f]; + var Z = ot(P, !0); + p(P), + Q( + (z) => { + Me(P, t.toast.cancelButtonStyle ?? h()), + Tt(P, 1, z), + Qt(Z, t.toast.cancel.label); + }, + [ + () => { + var z, ct, dt; + return It( + xt( + (z = e(at)) == null ? void 0 : z.cancelButton, + (dt = + (ct = t.toast) == null + ? void 0 + : ct.classes) == null + ? void 0 + : dt.cancelButton + ) + ); + }, + ] + ), + a(N, P); + }; + T( + C, + (N) => { + ce(t.toast.cancel) && N(j); + }, + !0 + ); + } + a(s, b); + }; + T(d, (s) => { + typeof t.toast.cancel == "function" ? s(E) : s(R, !1); + }); + } + a(x, o); + }; + T(m, (x) => { + t.toast.cancel && x(X); + }); + } + var rt = At(m, 2); + { + var lt = (x) => { + var o = g(), + d = v(o); + { + var E = (s) => { + var b = g(), + C = v(b); + Pt( + C, + () => t.toast.action, + (j, N) => { + N(j, {}); + } + ), + a(s, b); + }, + R = (s) => { + var b = g(), + C = v(b); + { + var j = (N) => { + var P = Gn(); + P.__click = [Zn, t, f]; + var Z = ot(P, !0); + p(P), + Q( + (z) => { + Me(P, t.toast.actionButtonStyle ?? D()), + Tt(P, 1, z), + Qt(Z, t.toast.action.label); + }, + [ + () => { + var z, ct, dt; + return It( + xt( + (z = e(at)) == null ? void 0 : z.actionButton, + (dt = + (ct = t.toast) == null + ? void 0 + : ct.classes) == null + ? void 0 + : dt.actionButton + ) + ); + }, + ] + ), + a(N, P); + }; + T( + C, + (N) => { + ce(t.toast.action) && N(j); + }, + !0 + ); + } + a(s, b); + }; + T(d, (s) => { + typeof t.toast.action == "function" ? s(E) : s(R, !1); + }); + } + a(x, o); + }; + T(rt, (x) => { + t.toast.action && x(lt); + }); + } + Q( + (x) => Tt(_, 1, x), + [ + () => { + var x, o, d; + return It( + xt( + (x = e(at)) == null ? void 0 : x.title, + (d = (o = t.toast) == null ? void 0 : o.classes) == null + ? void 0 + : d.title + ) + ); + }, + ] + ), + a(r, c); + }; + T(xe, (r) => { + t.toast.component ? r(Ie) : r(Te, !1); + }); + } + p(y), + Ke( + y, + (r) => u(nt, r), + () => e(nt) + ), + Q( + (r, c, I, S) => { + Tt(y, 1, r), + M(y, "data-rich-colors", t.toast.richColors ?? Bt()), + M(y, "data-styled", !(t.toast.component || t.toast.unstyled || V())), + M(y, "data-mounted", e(L)), + M(y, "data-promise", c), + M(y, "data-swiped", e(zt)), + M(y, "data-removed", e(q)), + M(y, "data-visible", e(ve)), + M(y, "data-y-position", e(ae)[0]), + M(y, "data-x-position", e(ae)[1]), + M(y, "data-index", t.index), + M(y, "data-front", e(fe)), + M(y, "data-swiping", e(Ot)), + M(y, "data-dismissable", e(ft)), + M(y, "data-type", e(A)), + M(y, "data-invert", e(_e)), + M(y, "data-swipe-out", e(jt)), + M(y, "data-swipe-direction", e(Vt)), + M(y, "data-expanded", I), + (se = Me(y, `${t.style} ${t.toast.style}`, se, S)); + }, + [ + () => { + var r, c, I, S, B, _; + return It( + xt( + t.class, + e(Mt), + (r = e(at)) == null ? void 0 : r.toast, + (I = (c = t.toast) == null ? void 0 : c.classes) == null + ? void 0 + : I.toast, + (S = e(at)) == null ? void 0 : S[e(A)], + (_ = (B = t.toast) == null ? void 0 : B.classes) == null + ? void 0 + : _[e(A)] + ) + ); + }, + () => !!t.toast.promise, + () => !!(t.expanded || (t.expandByDefault && e(L))), + () => ({ + "--index": t.index, + "--toasts-before": t.index, + "--z-index": G.toasts.length - t.index, + "--offset": `${e(q) ? e(J) : e(l)}px`, + "--initial-height": t.expandByDefault ? "auto" : `${e(bt)}px`, + }), + ] + ), + We("dragend", y, yt), + a(n, y), + ue(); +} +on(["pointermove", "pointerup", "pointerdown", "click"]); +var Qn = ne( + '' +); +function pn(n) { + var t = Qn(); + a(n, t); +} +var $n = ne( + '' +); +function ta(n) { + var t = $n(); + a(n, t); +} +var ea = ne( + '' +); +function na(n) { + var t = ea(); + a(n, t); +} +var aa = ne( + '' +); +function oa(n) { + var t = aa(); + a(n, t); +} +var ia = ne( + '' +); +function sa(n) { + var t = ia(); + a(n, t); +} +const ra = 3, + Ye = "24px", + Ze = "16px", + la = 4e3, + ca = 356, + da = 14, + Ce = "dark", + re = "light"; +function ua(n, t) { + const i = {}; + return ( + [n, t].forEach((h, D) => { + const k = D === 1, + V = k ? "--mobile-offset" : "--offset", + Bt = k ? Ze : Ye; + function $(L) { + ["top", "right", "bottom", "left"].forEach((q) => { + i[`${V}-${q}`] = typeof L == "number" ? `${L}px` : L; + }); + } + typeof h == "number" || typeof h == "string" + ? $(h) + : typeof h == "object" + ? ["top", "right", "bottom", "left"].forEach((L) => { + const q = h[L]; + q === void 0 + ? (i[`${V}-${L}`] = Bt) + : (i[`${V}-${L}`] = typeof q == "number" ? `${q}px` : q); + }) + : $(Bt); + }), + i + ); +} +var fa = et("
            "), + va = et( + '
            ' + ); +function ma(n, t) { + de(t, !0); + function i(l) { + return l !== "system" + ? l + : typeof window < "u" && + window.matchMedia && + window.matchMedia("(prefers-color-scheme: dark)").matches + ? Ce + : re; + } + let h = O(t, "invert", 3, !1), + D = O(t, "position", 3, "bottom-right"), + k = O(t, "hotkey", 19, () => ["altKey", "KeyT"]), + V = O(t, "expand", 3, !1), + Bt = O(t, "closeButton", 3, !1), + $ = O(t, "offset", 3, Ye), + L = O(t, "mobileOffset", 3, Ze), + q = O(t, "theme", 3, "light"), + Ot = O(t, "richColors", 3, !1), + jt = O(t, "duration", 3, la), + zt = O(t, "visibleToasts", 3, ra), + J = O(t, "toastOptions", 19, () => ({})), + bt = O(t, "dir", 7, "auto"), + kt = O(t, "gap", 3, da), + nt = O(t, "containerAriaLabel", 3, "Notifications"), + ut = O(t, "closeButtonAriaLabel", 3, "Close toast"), + Vt = wn(t, [ + "$$slots", + "$$events", + "$$legacy", + "invert", + "position", + "hotkey", + "expand", + "closeButton", + "offset", + "mobileOffset", + "theme", + "richColors", + "duration", + "visibleToasts", + "toastOptions", + "dir", + "gap", + "loadingIcon", + "successIcon", + "errorIcon", + "warningIcon", + "closeIcon", + "infoIcon", + "containerAriaLabel", + "class", + "closeButtonAriaLabel", + "onblur", + "onfocus", + "onmouseenter", + "onmousemove", + "onmouseleave", + "ondragend", + "onpointerdown", + "onpointerup", + ]); + function fe() { + if (bt() !== "auto") return bt(); + if (typeof window > "u" || typeof document > "u") return "ltr"; + const l = document.documentElement.getAttribute("dir"); + return l === "auto" || !l + ? ($t(() => + bt( + window.getComputedStyle(document.documentElement).direction ?? "ltr" + ) + ), + bt()) + : ($t(() => bt(l)), l); + } + const ve = w(() => + Array.from( + new Set( + [ + D(), + ...G.toasts.filter((l) => l.position).map((l) => l.position), + ].filter(Boolean) + ) + ) + ); + let A = H(!1), + ft = H(!1), + Mt = H(Ve(i(q()))), + Et = H(void 0), + vt = H(null), + Ct = H(!1); + const me = w(() => k().join("+").replace(/Key/g, "").replace(/Digit/g, "")); + _t(() => { + G.toasts.length <= 1 && u(A, !1); + }), + _t(() => { + const l = G.toasts.filter((f) => f.dismiss && !f.delete); + if (l.length > 0) { + const f = G.toasts.map((F) => + l.find((st) => st.id === F.id) ? { ...F, delete: !0 } : F + ); + G.toasts = f; + } + }), + _t(() => () => { + e(Et) && + e(vt) && + (e(vt).focus({ preventScroll: !0 }), u(vt, null), u(Ct, !1)); + }), + pt( + () => ( + G.reset(), + le(document, "keydown", (f) => { + var wt, st; + k().every((Ht) => f[Ht] || f.code === Ht) && + (u(A, !0), (wt = e(Et)) == null || wt.focus()), + f.code === "Escape" && + (document.activeElement === e(Et) || + ((st = e(Et)) != null && + st.contains(document.activeElement))) && + u(A, !1); + }) + ) + ), + _t(() => { + if ((q() !== "system" && u(Mt, q()), typeof window < "u")) { + q() === "system" && + (window.matchMedia && + window.matchMedia("(prefers-color-scheme: dark)").matches + ? u(Mt, Ce) + : u(Mt, re)); + const l = window.matchMedia("(prefers-color-scheme: dark)"), + f = ({ matches: F }) => { + u(Mt, F ? Ce : re, !0); + }; + "addEventListener" in l + ? l.addEventListener("change", f) + : l.addListener(f); + } + }); + const Dt = (l) => { + var f; + (f = t.onblur) == null || f.call(t, l), + e(Ct) && + !l.currentTarget.contains(l.relatedTarget) && + (u(Ct, !1), + e(vt) && (e(vt).focus({ preventScroll: !0 }), u(vt, null))); + }, + ae = (l) => { + var F; + (F = t.onfocus) == null || F.call(t, l), + !( + l.target instanceof HTMLElement && + l.target.dataset.dismissable === "false" + ) && + (e(Ct) || (u(Ct, !0), u(vt, l.relatedTarget, !0))); + }, + ge = (l) => { + var F; + (F = t.onpointerdown) == null || F.call(t, l), + !( + l.target instanceof HTMLElement && + l.target.dataset.dismissable === "false" + ) && u(ft, !0); + }, + he = (l) => { + var f; + (f = t.onmouseenter) == null || f.call(t, l), u(A, !0); + }, + _e = (l) => { + var f; + (f = t.onmouseleave) == null || f.call(t, l), e(ft) || u(A, !1); + }, + Wt = (l) => { + var f; + (f = t.onmousemove) == null || f.call(t, l), u(A, !0); + }, + at = (l) => { + var f; + (f = t.ondragend) == null || f.call(t, l), u(A, !1); + }, + be = (l) => { + var f; + (f = t.onpointerup) == null || f.call(t, l), u(ft, !1); + }; + Ln.set(new rn()); + var Lt = va(); + M(Lt, "tabindex", -1); + var Kt = ot(Lt); + { + var oe = (l) => { + var f = g(), + F = v(f); + Le( + F, + 18, + () => e(ve), + (wt) => wt, + (wt, st, Ht, Oe) => { + const ie = w(() => { + const [W, y] = st.split("-"); + return { y: W, x: y }; + }), + mt = w(() => ua($(), L())); + var yt = fa(); + yn( + yt, + (W, y) => ({ + tabindex: -1, + dir: W, + class: t.class, + "data-sonner-toaster": !0, + "data-sonner-theme": e(Mt), + "data-y-position": e(ie).y, + "data-x-position": e(ie).x, + style: t.style, + onblur: Dt, + onfocus: ae, + onmouseenter: he, + onmousemove: Wt, + onmouseleave: _e, + ondragend: at, + onpointerdown: ge, + onpointerup: be, + ...Vt, + [xn]: y, + }), + [ + fe, + () => { + var W; + return { + "--front-toast-height": `${ + (W = G.heights[0]) == null ? void 0 : W.height + }px`, + "--width": `${ca}px`, + "--gap": `${kt()}px`, + "--offset-top": e(mt)["--offset-top"], + "--offset-right": e(mt)["--offset-right"], + "--offset-bottom": e(mt)["--offset-bottom"], + "--offset-left": e(mt)["--offset-left"], + "--mobile-offset-top": e(mt)["--mobile-offset-top"], + "--mobile-offset-right": e(mt)["--mobile-offset-right"], + "--mobile-offset-bottom": e(mt)["--mobile-offset-bottom"], + "--mobile-offset-left": e(mt)["--mobile-offset-left"], + }; + }, + ], + void 0, + "svelte-tppj9g" + ), + Le( + yt, + 23, + () => + G.toasts.filter( + (W) => (!W.position && e(Ht) === 0) || W.position === st + ), + (W) => W.id, + (W, y, se, we) => { + { + const ye = (m) => { + var X = g(), + rt = v(X); + { + var lt = (o) => { + var d = g(), + E = v(d); + it(E, () => t.successIcon ?? ht), a(o, d); + }, + x = (o) => { + var d = g(), + E = v(d); + { + var R = (s) => { + pn(s); + }; + T( + E, + (s) => { + t.successIcon !== null && s(R); + }, + !0 + ); + } + a(o, d); + }; + T(rt, (o) => { + t.successIcon ? o(lt) : o(x, !1); + }); + } + a(m, X); + }, + xe = (m) => { + var X = g(), + rt = v(X); + { + var lt = (o) => { + var d = g(), + E = v(d); + it(E, () => t.errorIcon ?? ht), a(o, d); + }, + x = (o) => { + var d = g(), + E = v(d); + { + var R = (s) => { + ta(s); + }; + T( + E, + (s) => { + t.errorIcon !== null && s(R); + }, + !0 + ); + } + a(o, d); + }; + T(rt, (o) => { + t.errorIcon ? o(lt) : o(x, !1); + }); + } + a(m, X); + }, + Ie = (m) => { + var X = g(), + rt = v(X); + { + var lt = (o) => { + var d = g(), + E = v(d); + it(E, () => t.warningIcon ?? ht), a(o, d); + }, + x = (o) => { + var d = g(), + E = v(d); + { + var R = (s) => { + na(s); + }; + T( + E, + (s) => { + t.warningIcon !== null && s(R); + }, + !0 + ); + } + a(o, d); + }; + T(rt, (o) => { + t.warningIcon ? o(lt) : o(x, !1); + }); + } + a(m, X); + }, + Te = (m) => { + var X = g(), + rt = v(X); + { + var lt = (o) => { + var d = g(), + E = v(d); + it(E, () => t.infoIcon ?? ht), a(o, d); + }, + x = (o) => { + var d = g(), + E = v(d); + { + var R = (s) => { + oa(s); + }; + T( + E, + (s) => { + t.infoIcon !== null && s(R); + }, + !0 + ); + } + a(o, d); + }; + T(rt, (o) => { + t.infoIcon ? o(lt) : o(x, !1); + }); + } + a(m, X); + }, + r = (m) => { + var X = g(), + rt = v(X); + { + var lt = (o) => { + var d = g(), + E = v(d); + it(E, () => t.closeIcon ?? ht), a(o, d); + }, + x = (o) => { + var d = g(), + E = v(d); + { + var R = (s) => { + sa(s); + }; + T( + E, + (s) => { + t.closeIcon !== null && s(R); + }, + !0 + ); + } + a(o, d); + }; + T(rt, (o) => { + t.closeIcon ? o(lt) : o(x, !1); + }); + } + a(m, X); + }; + let c = w(() => { + var m; + return ((m = J()) == null ? void 0 : m.duration) ?? jt(); + }), + I = w(() => { + var m; + return ((m = J()) == null ? void 0 : m.class) ?? ""; + }), + S = w(() => { + var m; + return ( + ((m = J()) == null ? void 0 : m.descriptionClass) || "" + ); + }), + B = w(() => { + var m; + return ((m = J()) == null ? void 0 : m.style) ?? ""; + }), + _ = w(() => J().classes || {}), + K = w(() => J().unstyled ?? !1), + tt = w(() => { + var m; + return ( + ((m = J()) == null ? void 0 : m.cancelButtonStyle) ?? "" + ); + }), + Y = w(() => { + var m; + return ( + ((m = J()) == null ? void 0 : m.actionButtonStyle) ?? "" + ); + }), + U = w(() => { + var m; + return ( + ((m = J()) == null ? void 0 : m.closeButtonAriaLabel) ?? + ut() + ); + }); + Jn(W, { + get index() { + return e(se); + }, + get toast() { + return e(y); + }, + get defaultRichColors() { + return Ot(); + }, + get duration() { + return e(c); + }, + get class() { + return e(I); + }, + get descriptionClass() { + return e(S); + }, + get invert() { + return h(); + }, + get visibleToasts() { + return zt(); + }, + get closeButton() { + return Bt(); + }, + get interacting() { + return e(ft); + }, + get position() { + return st; + }, + get style() { + return e(B); + }, + get classes() { + return e(_); + }, + get unstyled() { + return e(K); + }, + get cancelButtonStyle() { + return e(tt); + }, + get actionButtonStyle() { + return e(Y); + }, + get closeButtonAriaLabel() { + return e(U); + }, + get expandByDefault() { + return V(); + }, + get expanded() { + return e(A); + }, + get loadingIcon() { + return t.loadingIcon; + }, + successIcon: ye, + errorIcon: xe, + warningIcon: Ie, + infoIcon: Te, + closeIcon: r, + $$slots: { + successIcon: !0, + errorIcon: !0, + warningIcon: !0, + infoIcon: !0, + closeIcon: !0, + }, + }); + } + } + ), + p(yt), + Ke( + yt, + (W) => u(Et, W), + () => e(Et) + ), + Q(() => (yt.dir = yt.dir)), + a(wt, yt); + } + ), + a(l, f); + }; + T(Kt, (l) => { + G.toasts.length > 0 && l(oe); + }); + } + p(Lt), + Q(() => M(Lt, "aria-label", `${nt() ?? ""} ${e(me) ?? ""}`)), + a(n, Lt), + ue(); +} +const ga = + "" + new URL("../assets/pawtect_wasm_bg.BvxCe1S1.wasm", import.meta.url).href; +let Ge = H(!1); +function ha() { + const n = ln("2025-09_pawtect"); + if (!n) throw new Error("pawtect experiment not found on load"); + n.variant !== "disabled" && (e(Ge) || (Pe.data && cn(ga).then(_a))); +} +function _a() { + dn(Pe.data.id), un.postPawtectLoad(); + const n = fetch; + Object.assign(window, { + fetch: Xe((t, i) => { + let h = null; + return ( + t instanceof Request ? (h = t.url) : (h = t), + h.startsWith("/") || fn(h), + n.call(window, t, i) + ); + }), + }), + u(Ge, !0); +} +function Xe(n) { + return n.bind().bind(); +} +function ba(n, t, i) { + const h = { + [n.name](...D) { + return i(...D), t(...D); + }, + }[n.name]; + return Xe(h); +} +var wa = et(' ', 1); +function Ha(n, t) { + de(t, !0), + pt(() => { + vn(), + Pe.refresh().then((L) => { + L && ha(); + }), + Object.assign(window, { + eval: ba( + eval, + function () {}, + async () => { + await fetch(mn + "/me", { + credentials: "include", + headers: { Authorization: "Bearer " + crypto.randomUUID() }, + }); + } + ), + }); + let $ = setInterval(() => { + _n(); + }, 5e3); + return () => { + clearTimeout($); + }; + }); + const i = "muted"; + pt(() => { + Ue.muted = localStorage.getItem(i) === "1"; + }), + _t(() => { + { + const $ = Ue.muted; + document.querySelectorAll("audio").forEach((L) => { + L.muted = $; + }); + for (const L of Object.values(hn)) (L.muted = $), $ || (L.volume = 0.3); + localStorage.setItem(i, Number($).toString()); + } + }), + pt(() => {}); + var h = wa(); + We("beforeunload", sn, () => { + bn(); + }); + var D = v(h), + k = ot(D); + p(D); + var V = At(D, 2); + it(V, () => t.children); + var Bt = At(V, 2); + ma(Bt, { + closeButton: !0, + richColors: !0, + position: "top-right", + class: "!top-15", + duration: 3e3, + }), + Q(() => Qt(k, `Version: ${en}`)), + a(n, h), + ue(); +} +export { Ha as component, ka as universal }; diff --git a/frontend-backup/_app/immutable/nodes/0.DIpSCqpd.js b/frontend-backup/_app/immutable/nodes/0.DIpSCqpd.js deleted file mode 100644 index ed67095..0000000 --- a/frontend-backup/_app/immutable/nodes/0.DIpSCqpd.js +++ /dev/null @@ -1 +0,0 @@ -var He=n=>{throw TypeError(n)};var Re=(n,t,i)=>t.has(n)||He("Cannot "+i);var gt=(n,t,i)=>(Re(n,t,"read from private field"),i?i.call(n):t.get(n)),qt=(n,t,i)=>t.has(n)?He("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,i),Jt=(n,t,i,h)=>(Re(n,t,"write to private field"),h?h.call(n,i):t.set(n,i),i);import"../chunks/B2cHk4HI.js";import{o as pt,s as it,v as en}from"../chunks/4WsUhDWi.js";import{p as de,f as et,d as ot,b as a,r as p,t as Q,c as ue,bn as le,aI as nn,aH as Ne,aJ as an,au as H,av as Ve,y as _t,aw as u,g as e,u as w,z as $t,s as At,ax as We,az as ht,ay as g,a as v,at as on,b4 as Fe,v as ne,bm as sn}from"../chunks/BDALf20I.js";import{s as Qt}from"../chunks/4k6DpCgf.js";import{l as G,m as xt,n as rn,o as ln,u as Pe,_ as cn,p as dn,a as un,r as fn,g as Ue,q as vn,P as mn}from"../chunks/DffDvEhl.js";import{c as gn,A as hn,s as _n,a as bn}from"../chunks/BvbG2Lay.js";import"../chunks/DklPLC_x.js";import{p as O,i as T,s as Ae,r as wn}from"../chunks/Bke_korE.js";import{e as Le}from"../chunks/CZW2bcQi.js";import{c as It,a as Tt,s as M,e as Me,b as yn,S as xn}from"../chunks/BNZUboE0.js";import{b as Ke}from"../chunks/BrZ10JY-.js";import{c as Pt}from"../chunks/ChY_8ULT.js";import"../chunks/cUtKXcx3.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};n.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="7df7b08c-d83d-4377-adc3-d16a109e44ac",n._sentryDebugIdIdentifier="sentry-dbid-7df7b08c-d83d-4377-adc3-d16a109e44ac")})()}catch{}const In=!0,ka=Object.freeze(Object.defineProperty({__proto__:null,prerender:In},Symbol.toStringTag,{value:"Module"})),Tn=Array(12).fill(0);var Sn=et('
            '),Bn=et('
            ');function En(n,t){de(t,!0);var i=Bn(),h=ot(i);Le(h,23,()=>Tn,(D,k)=>`spinner-bar-${k}`,(D,k)=>{var V=Sn();a(D,V)}),p(h),p(i),Q(D=>{Tt(i,1,D),M(i,"data-visible",t.visible)},[()=>It(["sonner-loading-wrapper",t.class].filter(Boolean).join(" "))]),a(n,i),ue()}const Dn=typeof window<"u"?window:void 0;function An(n){let t=n.activeElement;for(;t!=null&&t.shadowRoot;){const i=t.shadowRoot.activeElement;if(i===t)break;t=i}return t}var Ut,te;class Mn{constructor(t={}){qt(this,Ut);qt(this,te);const{window:i=Dn,document:h=i==null?void 0:i.document}=t;i!==void 0&&(Jt(this,Ut,h),Jt(this,te,gn(D=>{const k=le(i,"focusin",D),V=le(i,"focusout",D);return()=>{k(),V()}})))}get current(){var t;return(t=gt(this,te))==null||t.call(this),gt(this,Ut)?An(gt(this,Ut)):null}}Ut=new WeakMap,te=new WeakMap;new Mn;var ee,St;class Cn{constructor(t){qt(this,ee);qt(this,St);Jt(this,ee,t),Jt(this,St,Symbol(t))}get key(){return gt(this,St)}exists(){return nn(gt(this,St))}get(){const t=Ne(gt(this,St));if(t===void 0)throw new Error(`Context "${gt(this,ee)}" not found`);return t}getOr(t){const i=Ne(gt(this,St));return i===void 0?t:i}set(t){return an(gt(this,St),t)}}ee=new WeakMap,St=new WeakMap;const Ln=new Cn("");function ce(n){return n.label!==void 0}function Pn(){let n=H(Ve(typeof document<"u"?document.hidden:!1));return _t(()=>le(document,"visibilitychange",()=>{u(n,document.hidden,!0)})),{get current(){return e(n)}}}const je=4e3,On=14,kn=45,Hn=200,Rn=.05,Nn={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function Fn(n){const[t,i]=n.split("-"),h=[];return t&&h.push(t),i&&h.push(i),h}function ze(n){return 1/(1.5+Math.abs(n)/20)}var Un=et("
            "),jn=(n,t,i,h,D)=>{var k,V;e(t)||!e(i)||(h(),(V=(k=D.toast).onDismiss)==null||V.call(k,D.toast))},zn=et(''),Vn=et('
            '),Wn=et('
            '),Kn=(n,t,i,h)=>{var D,k;ce(t.toast.cancel)&&e(i)&&((k=(D=t.toast.cancel)==null?void 0:D.onClick)==null||k.call(D,n),h())},Yn=et(''),Zn=(n,t,i)=>{var h;ce(t.toast.action)&&((h=t.toast.action)==null||h.onClick(n),!n.defaultPrevented&&i())},Gn=et(''),Xn=et('
            ',1),qn=et('
          1. ');function Jn(n,t){de(t,!0);const i=r=>{var c=g(),I=v(c);{var S=_=>{var K=Un(),tt=ot(K);it(tt,()=>t.loadingIcon),p(K),Q(Y=>{Tt(K,1,Y),M(K,"data-visible",e(A)==="loading")},[()=>{var Y,U,m;return It(xt((Y=e(at))==null?void 0:Y.loader,(m=(U=t.toast)==null?void 0:U.classes)==null?void 0:m.loader,"sonner-loader"))}]),a(_,K)},B=_=>{{let K=w(()=>{var Y,U;return xt((Y=e(at))==null?void 0:Y.loader,(U=t.toast.classes)==null?void 0:U.loader)}),tt=w(()=>e(A)==="loading");En(_,{get class(){return e(K)},get visible(){return e(tt)}})}};T(I,_=>{t.loadingIcon?_(S):_(B,!1)})}a(r,c)};let h=O(t,"cancelButtonStyle",3,""),D=O(t,"actionButtonStyle",3,""),k=O(t,"descriptionClass",3,""),V=O(t,"unstyled",3,!1),Bt=O(t,"defaultRichColors",3,!1);const $={...Nn};let L=H(!1),q=H(!1),Ot=H(!1),jt=H(!1),zt=H(!1),J=H(0),bt=H(0),kt=t.toast.duration||t.duration||je,nt=H(void 0),ut=H(null),Vt=H(null);const fe=w(()=>t.index===0),ve=w(()=>t.index+1<=t.visibleToasts),A=w(()=>t.toast.type),ft=w(()=>t.toast.dismissable!==!1),Mt=w(()=>t.toast.class||""),Et=w(()=>t.toast.descriptionClass||""),vt=w(()=>G.heights.findIndex(r=>r.toastId===t.toast.id)||0),Ct=w(()=>t.toast.closeButton??t.closeButton),me=w(()=>t.toast.duration??t.duration??je);let Dt=null;const ae=w(()=>t.position.split("-")),ge=w(()=>G.heights.reduce((r,c,I)=>I>=e(vt)?r:r+c.height,0)),he=Pn(),_e=w(()=>t.toast.invert||t.invert),Wt=w(()=>e(A)==="loading"),at=w(()=>({...$,...t.classes})),be=w(()=>t.toast.title),Lt=w(()=>t.toast.description);let Kt=H(0),oe=H(0);const l=w(()=>Math.round(e(vt)*On+e(ge)));_t(()=>{e(be),e(Lt);let r;t.expanded||t.expandByDefault?r=1:r=1-t.index*Rn;const c=$t(()=>e(nt));if(c===void 0)return;c.style.setProperty("height","auto");const I=c.offsetHeight,S=c.getBoundingClientRect().height,B=Math.round(S/r+Number.EPSILON&100)/100;c.style.removeProperty("height");let _;Math.abs(B-I)<1?_=B:_=I,u(bt,_,!0),$t(()=>{G.setHeight({toastId:t.toast.id,height:_})})});function f(){u(q,!0),u(J,e(l),!0),G.removeHeight(t.toast.id),setTimeout(()=>{G.remove(t.toast.id)},Hn)}let F;const wt=w(()=>t.toast.promise&&e(A)==="loading"||t.toast.duration===Number.POSITIVE_INFINITY);function st(){u(Kt,new Date().getTime(),!0),F=setTimeout(()=>{var r,c;(c=(r=t.toast).onAutoClose)==null||c.call(r,t.toast),f()},kt)}function Ht(){if(e(oe){t.toast.updated&&(clearTimeout(F),kt=e(me),st())}),_t(()=>(e(wt)||(t.expanded||t.interacting||he.current?Ht():st()),()=>clearTimeout(F))),pt(()=>{var c;u(L,!0);const r=(c=e(nt))==null?void 0:c.getBoundingClientRect().height;return u(bt,r,!0),G.setHeight({toastId:t.toast.id,height:r}),()=>{G.removeHeight(t.toast.id)}}),_t(()=>{t.toast.delete&&$t(()=>{var r,c;f(),(c=(r=t.toast).onDismiss)==null||c.call(r,t.toast)})});const Oe=r=>{if(e(Wt))return;u(J,e(l),!0);const c=r.target;c.setPointerCapture(r.pointerId),c.tagName!=="BUTTON"&&(u(Ot,!0),Dt={x:r.clientX,y:r.clientY})},ie=()=>{var _,K,tt,Y,U,m;if(e(jt)||!e(ft))return;Dt=null;const r=Number(((_=e(nt))==null?void 0:_.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),c=Number(((K=e(nt))==null?void 0:K.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),I=new Date().getTime()-0,S=e(ut)==="x"?r:c,B=Math.abs(S)/I;if(Math.abs(S)>=kn||B>.11){u(J,e(l),!0),(Y=(tt=t.toast).onDismiss)==null||Y.call(tt,t.toast),e(ut)==="x"?u(Vt,r>0?"right":"left",!0):u(Vt,c>0?"down":"up",!0),f(),u(jt,!0);return}else(U=e(nt))==null||U.style.setProperty("--swipe-amount-x","0px"),(m=e(nt))==null||m.style.setProperty("--swipe-amount-y","0px");u(zt,!1),u(Ot,!1),u(ut,null)},mt=r=>{var K,tt,Y;if(!Dt||!e(ft)||(((K=window.getSelection())==null?void 0:K.toString().length)??-1)>0)return;const I=r.clientY-Dt.y,S=r.clientX-Dt.x,B=t.swipeDirections??Fn(t.position);!e(ut)&&(Math.abs(S)>1||Math.abs(I)>1)&&u(ut,Math.abs(S)>Math.abs(I)?"x":"y",!0);let _={x:0,y:0};if(e(ut)==="y"){if(B.includes("top")||B.includes("bottom"))if(B.includes("top")&&I<0||B.includes("bottom")&&I>0)_.y=I;else{const U=I*ze(I);_.y=Math.abs(U)0)_.x=S;else{const U=S*ze(S);_.x=Math.abs(U)0||Math.abs(_.y)>0)&&u(zt,!0),(tt=e(nt))==null||tt.style.setProperty("--swipe-amount-x",`${_.x}px`),(Y=e(nt))==null||Y.style.setProperty("--swipe-amount-y",`${_.y}px`)},yt=()=>{u(Ot,!1),u(ut,null),Dt=null},W=w(()=>t.toast.icon?t.toast.icon:e(A)==="success"?t.successIcon:e(A)==="error"?t.errorIcon:e(A)==="warning"?t.warningIcon:e(A)==="info"?t.infoIcon:e(A)==="loading"?t.loadingIcon:null);var y=qn();M(y,"tabindex",0);let se;y.__pointermove=mt,y.__pointerup=ie,y.__pointerdown=Oe;var we=ot(y);{var ye=r=>{var c=zn();c.__click=[jn,Wt,ft,f,t];var I=ot(c);it(I,()=>t.closeIcon??ht),p(c),Q(S=>{M(c,"aria-label",t.closeButtonAriaLabel),M(c,"data-disabled",e(Wt)),Tt(c,1,S)},[()=>{var S,B,_;return It(xt((S=e(at))==null?void 0:S.closeButton,(_=(B=t.toast)==null?void 0:B.classes)==null?void 0:_.closeButton))}]),a(r,c)};T(we,r=>{e(Ct)&&!t.toast.component&&e(A)!=="loading"&&t.closeIcon!==null&&r(ye)})}var xe=At(we,2);{var Ie=r=>{const c=w(()=>t.toast.component);var I=g(),S=v(I);Pt(S,()=>e(c),(B,_)=>{_(B,Ae(()=>t.toast.componentProps,{closeToast:f}))}),a(r,I)},Te=r=>{var c=Xn(),I=v(c);{var S=x=>{var o=Vn(),d=ot(o);{var E=b=>{var C=g(),j=v(C);{var N=Z=>{var z=g(),ct=v(z);Pt(ct,()=>t.toast.icon,(dt,Yt)=>{Yt(dt,{})}),a(Z,z)},P=Z=>{i(Z)};T(j,Z=>{t.toast.icon?Z(N):Z(P,!1)})}a(b,C)};T(d,b=>{(t.toast.promise||e(A)==="loading")&&b(E)})}var R=At(d,2);{var s=b=>{var C=g(),j=v(C);{var N=Z=>{var z=g(),ct=v(z);Pt(ct,()=>t.toast.icon,(dt,Yt)=>{Yt(dt,{})}),a(Z,z)},P=Z=>{var z=g(),ct=v(z);{var dt=Rt=>{var Zt=g(),Se=v(Zt);it(Se,()=>t.successIcon??ht),a(Rt,Zt)},Yt=Rt=>{var Zt=g(),Se=v(Zt);{var qe=Nt=>{var Gt=g(),Be=v(Gt);it(Be,()=>t.errorIcon??ht),a(Nt,Gt)},Je=Nt=>{var Gt=g(),Be=v(Gt);{var Qe=Ft=>{var Xt=g(),Ee=v(Xt);it(Ee,()=>t.warningIcon??ht),a(Ft,Xt)},pe=Ft=>{var Xt=g(),Ee=v(Xt);{var $e=De=>{var ke=g(),tn=v(ke);it(tn,()=>t.infoIcon??ht),a(De,ke)};T(Ee,De=>{e(A)==="info"&&De($e)},!0)}a(Ft,Xt)};T(Be,Ft=>{e(A)==="warning"?Ft(Qe):Ft(pe,!1)},!0)}a(Nt,Gt)};T(Se,Nt=>{e(A)==="error"?Nt(qe):Nt(Je,!1)},!0)}a(Rt,Zt)};T(ct,Rt=>{e(A)==="success"?Rt(dt):Rt(Yt,!1)},!0)}a(Z,z)};T(j,Z=>{t.toast.icon?Z(N):Z(P,!1)})}a(b,C)};T(R,b=>{t.toast.type!=="loading"&&b(s)})}p(o),Q(b=>Tt(o,1,b),[()=>{var b,C,j;return It(xt((b=e(at))==null?void 0:b.icon,(j=(C=t.toast)==null?void 0:C.classes)==null?void 0:j.icon))}]),a(x,o)};T(I,x=>{(e(A)||t.toast.icon||t.toast.promise)&&t.toast.icon!==null&&(e(W)!==null||t.toast.icon)&&x(S)})}var B=At(I,2),_=ot(B),K=ot(_);{var tt=x=>{var o=g(),d=v(o);{var E=s=>{const b=w(()=>t.toast.title);var C=g(),j=v(C);Pt(j,()=>e(b),(N,P)=>{P(N,Ae(()=>t.toast.componentProps))}),a(s,C)},R=s=>{var b=Fe();Q(()=>Qt(b,t.toast.title)),a(s,b)};T(d,s=>{typeof t.toast.title!="string"?s(E):s(R,!1)})}a(x,o)};T(K,x=>{t.toast.title&&x(tt)})}p(_);var Y=At(_,2);{var U=x=>{var o=Wn(),d=ot(o);{var E=s=>{const b=w(()=>t.toast.description);var C=g(),j=v(C);Pt(j,()=>e(b),(N,P)=>{P(N,Ae(()=>t.toast.componentProps))}),a(s,C)},R=s=>{var b=Fe();Q(()=>Qt(b,t.toast.description)),a(s,b)};T(d,s=>{typeof t.toast.description!="string"?s(E):s(R,!1)})}p(o),Q(s=>Tt(o,1,s),[()=>{var s,b;return It(xt(k(),e(Et),(s=e(at))==null?void 0:s.description,(b=t.toast.classes)==null?void 0:b.description))}]),a(x,o)};T(Y,x=>{t.toast.description&&x(U)})}p(B);var m=At(B,2);{var X=x=>{var o=g(),d=v(o);{var E=s=>{var b=g(),C=v(b);Pt(C,()=>t.toast.cancel,(j,N)=>{N(j,{})}),a(s,b)},R=s=>{var b=g(),C=v(b);{var j=N=>{var P=Yn();P.__click=[Kn,t,ft,f];var Z=ot(P,!0);p(P),Q(z=>{Me(P,t.toast.cancelButtonStyle??h()),Tt(P,1,z),Qt(Z,t.toast.cancel.label)},[()=>{var z,ct,dt;return It(xt((z=e(at))==null?void 0:z.cancelButton,(dt=(ct=t.toast)==null?void 0:ct.classes)==null?void 0:dt.cancelButton))}]),a(N,P)};T(C,N=>{ce(t.toast.cancel)&&N(j)},!0)}a(s,b)};T(d,s=>{typeof t.toast.cancel=="function"?s(E):s(R,!1)})}a(x,o)};T(m,x=>{t.toast.cancel&&x(X)})}var rt=At(m,2);{var lt=x=>{var o=g(),d=v(o);{var E=s=>{var b=g(),C=v(b);Pt(C,()=>t.toast.action,(j,N)=>{N(j,{})}),a(s,b)},R=s=>{var b=g(),C=v(b);{var j=N=>{var P=Gn();P.__click=[Zn,t,f];var Z=ot(P,!0);p(P),Q(z=>{Me(P,t.toast.actionButtonStyle??D()),Tt(P,1,z),Qt(Z,t.toast.action.label)},[()=>{var z,ct,dt;return It(xt((z=e(at))==null?void 0:z.actionButton,(dt=(ct=t.toast)==null?void 0:ct.classes)==null?void 0:dt.actionButton))}]),a(N,P)};T(C,N=>{ce(t.toast.action)&&N(j)},!0)}a(s,b)};T(d,s=>{typeof t.toast.action=="function"?s(E):s(R,!1)})}a(x,o)};T(rt,x=>{t.toast.action&&x(lt)})}Q(x=>Tt(_,1,x),[()=>{var x,o,d;return It(xt((x=e(at))==null?void 0:x.title,(d=(o=t.toast)==null?void 0:o.classes)==null?void 0:d.title))}]),a(r,c)};T(xe,r=>{t.toast.component?r(Ie):r(Te,!1)})}p(y),Ke(y,r=>u(nt,r),()=>e(nt)),Q((r,c,I,S)=>{Tt(y,1,r),M(y,"data-rich-colors",t.toast.richColors??Bt()),M(y,"data-styled",!(t.toast.component||t.toast.unstyled||V())),M(y,"data-mounted",e(L)),M(y,"data-promise",c),M(y,"data-swiped",e(zt)),M(y,"data-removed",e(q)),M(y,"data-visible",e(ve)),M(y,"data-y-position",e(ae)[0]),M(y,"data-x-position",e(ae)[1]),M(y,"data-index",t.index),M(y,"data-front",e(fe)),M(y,"data-swiping",e(Ot)),M(y,"data-dismissable",e(ft)),M(y,"data-type",e(A)),M(y,"data-invert",e(_e)),M(y,"data-swipe-out",e(jt)),M(y,"data-swipe-direction",e(Vt)),M(y,"data-expanded",I),se=Me(y,`${t.style} ${t.toast.style}`,se,S)},[()=>{var r,c,I,S,B,_;return It(xt(t.class,e(Mt),(r=e(at))==null?void 0:r.toast,(I=(c=t.toast)==null?void 0:c.classes)==null?void 0:I.toast,(S=e(at))==null?void 0:S[e(A)],(_=(B=t.toast)==null?void 0:B.classes)==null?void 0:_[e(A)]))},()=>!!t.toast.promise,()=>!!(t.expanded||t.expandByDefault&&e(L)),()=>({"--index":t.index,"--toasts-before":t.index,"--z-index":G.toasts.length-t.index,"--offset":`${e(q)?e(J):e(l)}px`,"--initial-height":t.expandByDefault?"auto":`${e(bt)}px`})]),We("dragend",y,yt),a(n,y),ue()}on(["pointermove","pointerup","pointerdown","click"]);var Qn=ne('');function pn(n){var t=Qn();a(n,t)}var $n=ne('');function ta(n){var t=$n();a(n,t)}var ea=ne('');function na(n){var t=ea();a(n,t)}var aa=ne('');function oa(n){var t=aa();a(n,t)}var ia=ne('');function sa(n){var t=ia();a(n,t)}const ra=3,Ye="24px",Ze="16px",la=4e3,ca=356,da=14,Ce="dark",re="light";function ua(n,t){const i={};return[n,t].forEach((h,D)=>{const k=D===1,V=k?"--mobile-offset":"--offset",Bt=k?Ze:Ye;function $(L){["top","right","bottom","left"].forEach(q=>{i[`${V}-${q}`]=typeof L=="number"?`${L}px`:L})}typeof h=="number"||typeof h=="string"?$(h):typeof h=="object"?["top","right","bottom","left"].forEach(L=>{const q=h[L];q===void 0?i[`${V}-${L}`]=Bt:i[`${V}-${L}`]=typeof q=="number"?`${q}px`:q}):$(Bt)}),i}var fa=et("
              "),va=et('
              ');function ma(n,t){de(t,!0);function i(l){return l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Ce:re}let h=O(t,"invert",3,!1),D=O(t,"position",3,"bottom-right"),k=O(t,"hotkey",19,()=>["altKey","KeyT"]),V=O(t,"expand",3,!1),Bt=O(t,"closeButton",3,!1),$=O(t,"offset",3,Ye),L=O(t,"mobileOffset",3,Ze),q=O(t,"theme",3,"light"),Ot=O(t,"richColors",3,!1),jt=O(t,"duration",3,la),zt=O(t,"visibleToasts",3,ra),J=O(t,"toastOptions",19,()=>({})),bt=O(t,"dir",7,"auto"),kt=O(t,"gap",3,da),nt=O(t,"containerAriaLabel",3,"Notifications"),ut=O(t,"closeButtonAriaLabel",3,"Close toast"),Vt=wn(t,["$$slots","$$events","$$legacy","invert","position","hotkey","expand","closeButton","offset","mobileOffset","theme","richColors","duration","visibleToasts","toastOptions","dir","gap","loadingIcon","successIcon","errorIcon","warningIcon","closeIcon","infoIcon","containerAriaLabel","class","closeButtonAriaLabel","onblur","onfocus","onmouseenter","onmousemove","onmouseleave","ondragend","onpointerdown","onpointerup"]);function fe(){if(bt()!=="auto")return bt();if(typeof window>"u"||typeof document>"u")return"ltr";const l=document.documentElement.getAttribute("dir");return l==="auto"||!l?($t(()=>bt(window.getComputedStyle(document.documentElement).direction??"ltr")),bt()):($t(()=>bt(l)),l)}const ve=w(()=>Array.from(new Set([D(),...G.toasts.filter(l=>l.position).map(l=>l.position)].filter(Boolean))));let A=H(!1),ft=H(!1),Mt=H(Ve(i(q()))),Et=H(void 0),vt=H(null),Ct=H(!1);const me=w(()=>k().join("+").replace(/Key/g,"").replace(/Digit/g,""));_t(()=>{G.toasts.length<=1&&u(A,!1)}),_t(()=>{const l=G.toasts.filter(f=>f.dismiss&&!f.delete);if(l.length>0){const f=G.toasts.map(F=>l.find(st=>st.id===F.id)?{...F,delete:!0}:F);G.toasts=f}}),_t(()=>()=>{e(Et)&&e(vt)&&(e(vt).focus({preventScroll:!0}),u(vt,null),u(Ct,!1))}),pt(()=>(G.reset(),le(document,"keydown",f=>{var wt,st;k().every(Ht=>f[Ht]||f.code===Ht)&&(u(A,!0),(wt=e(Et))==null||wt.focus()),f.code==="Escape"&&(document.activeElement===e(Et)||(st=e(Et))!=null&&st.contains(document.activeElement))&&u(A,!1)}))),_t(()=>{if(q()!=="system"&&u(Mt,q()),typeof window<"u"){q()==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?u(Mt,Ce):u(Mt,re));const l=window.matchMedia("(prefers-color-scheme: dark)"),f=({matches:F})=>{u(Mt,F?Ce:re,!0)};"addEventListener"in l?l.addEventListener("change",f):l.addListener(f)}});const Dt=l=>{var f;(f=t.onblur)==null||f.call(t,l),e(Ct)&&!l.currentTarget.contains(l.relatedTarget)&&(u(Ct,!1),e(vt)&&(e(vt).focus({preventScroll:!0}),u(vt,null)))},ae=l=>{var F;(F=t.onfocus)==null||F.call(t,l),!(l.target instanceof HTMLElement&&l.target.dataset.dismissable==="false")&&(e(Ct)||(u(Ct,!0),u(vt,l.relatedTarget,!0)))},ge=l=>{var F;(F=t.onpointerdown)==null||F.call(t,l),!(l.target instanceof HTMLElement&&l.target.dataset.dismissable==="false")&&u(ft,!0)},he=l=>{var f;(f=t.onmouseenter)==null||f.call(t,l),u(A,!0)},_e=l=>{var f;(f=t.onmouseleave)==null||f.call(t,l),e(ft)||u(A,!1)},Wt=l=>{var f;(f=t.onmousemove)==null||f.call(t,l),u(A,!0)},at=l=>{var f;(f=t.ondragend)==null||f.call(t,l),u(A,!1)},be=l=>{var f;(f=t.onpointerup)==null||f.call(t,l),u(ft,!1)};Ln.set(new rn);var Lt=va();M(Lt,"tabindex",-1);var Kt=ot(Lt);{var oe=l=>{var f=g(),F=v(f);Le(F,18,()=>e(ve),wt=>wt,(wt,st,Ht,Oe)=>{const ie=w(()=>{const[W,y]=st.split("-");return{y:W,x:y}}),mt=w(()=>ua($(),L()));var yt=fa();yn(yt,(W,y)=>({tabindex:-1,dir:W,class:t.class,"data-sonner-toaster":!0,"data-sonner-theme":e(Mt),"data-y-position":e(ie).y,"data-x-position":e(ie).x,style:t.style,onblur:Dt,onfocus:ae,onmouseenter:he,onmousemove:Wt,onmouseleave:_e,ondragend:at,onpointerdown:ge,onpointerup:be,...Vt,[xn]:y}),[fe,()=>{var W;return{"--front-toast-height":`${(W=G.heights[0])==null?void 0:W.height}px`,"--width":`${ca}px`,"--gap":`${kt()}px`,"--offset-top":e(mt)["--offset-top"],"--offset-right":e(mt)["--offset-right"],"--offset-bottom":e(mt)["--offset-bottom"],"--offset-left":e(mt)["--offset-left"],"--mobile-offset-top":e(mt)["--mobile-offset-top"],"--mobile-offset-right":e(mt)["--mobile-offset-right"],"--mobile-offset-bottom":e(mt)["--mobile-offset-bottom"],"--mobile-offset-left":e(mt)["--mobile-offset-left"]}}],void 0,"svelte-tppj9g"),Le(yt,23,()=>G.toasts.filter(W=>!W.position&&e(Ht)===0||W.position===st),W=>W.id,(W,y,se,we)=>{{const ye=m=>{var X=g(),rt=v(X);{var lt=o=>{var d=g(),E=v(d);it(E,()=>t.successIcon??ht),a(o,d)},x=o=>{var d=g(),E=v(d);{var R=s=>{pn(s)};T(E,s=>{t.successIcon!==null&&s(R)},!0)}a(o,d)};T(rt,o=>{t.successIcon?o(lt):o(x,!1)})}a(m,X)},xe=m=>{var X=g(),rt=v(X);{var lt=o=>{var d=g(),E=v(d);it(E,()=>t.errorIcon??ht),a(o,d)},x=o=>{var d=g(),E=v(d);{var R=s=>{ta(s)};T(E,s=>{t.errorIcon!==null&&s(R)},!0)}a(o,d)};T(rt,o=>{t.errorIcon?o(lt):o(x,!1)})}a(m,X)},Ie=m=>{var X=g(),rt=v(X);{var lt=o=>{var d=g(),E=v(d);it(E,()=>t.warningIcon??ht),a(o,d)},x=o=>{var d=g(),E=v(d);{var R=s=>{na(s)};T(E,s=>{t.warningIcon!==null&&s(R)},!0)}a(o,d)};T(rt,o=>{t.warningIcon?o(lt):o(x,!1)})}a(m,X)},Te=m=>{var X=g(),rt=v(X);{var lt=o=>{var d=g(),E=v(d);it(E,()=>t.infoIcon??ht),a(o,d)},x=o=>{var d=g(),E=v(d);{var R=s=>{oa(s)};T(E,s=>{t.infoIcon!==null&&s(R)},!0)}a(o,d)};T(rt,o=>{t.infoIcon?o(lt):o(x,!1)})}a(m,X)},r=m=>{var X=g(),rt=v(X);{var lt=o=>{var d=g(),E=v(d);it(E,()=>t.closeIcon??ht),a(o,d)},x=o=>{var d=g(),E=v(d);{var R=s=>{sa(s)};T(E,s=>{t.closeIcon!==null&&s(R)},!0)}a(o,d)};T(rt,o=>{t.closeIcon?o(lt):o(x,!1)})}a(m,X)};let c=w(()=>{var m;return((m=J())==null?void 0:m.duration)??jt()}),I=w(()=>{var m;return((m=J())==null?void 0:m.class)??""}),S=w(()=>{var m;return((m=J())==null?void 0:m.descriptionClass)||""}),B=w(()=>{var m;return((m=J())==null?void 0:m.style)??""}),_=w(()=>J().classes||{}),K=w(()=>J().unstyled??!1),tt=w(()=>{var m;return((m=J())==null?void 0:m.cancelButtonStyle)??""}),Y=w(()=>{var m;return((m=J())==null?void 0:m.actionButtonStyle)??""}),U=w(()=>{var m;return((m=J())==null?void 0:m.closeButtonAriaLabel)??ut()});Jn(W,{get index(){return e(se)},get toast(){return e(y)},get defaultRichColors(){return Ot()},get duration(){return e(c)},get class(){return e(I)},get descriptionClass(){return e(S)},get invert(){return h()},get visibleToasts(){return zt()},get closeButton(){return Bt()},get interacting(){return e(ft)},get position(){return st},get style(){return e(B)},get classes(){return e(_)},get unstyled(){return e(K)},get cancelButtonStyle(){return e(tt)},get actionButtonStyle(){return e(Y)},get closeButtonAriaLabel(){return e(U)},get expandByDefault(){return V()},get expanded(){return e(A)},get loadingIcon(){return t.loadingIcon},successIcon:ye,errorIcon:xe,warningIcon:Ie,infoIcon:Te,closeIcon:r,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),p(yt),Ke(yt,W=>u(Et,W),()=>e(Et)),Q(()=>yt.dir=yt.dir),a(wt,yt)}),a(l,f)};T(Kt,l=>{G.toasts.length>0&&l(oe)})}p(Lt),Q(()=>M(Lt,"aria-label",`${nt()??""} ${e(me)??""}`)),a(n,Lt),ue()}const ga=""+new URL("../assets/pawtect_wasm_bg.BvxCe1S1.wasm",import.meta.url).href;let Ge=H(!1);function ha(){const n=ln("2025-09_pawtect");if(!n)throw new Error("pawtect experiment not found on load");n.variant!=="disabled"&&(e(Ge)||Pe.data&&cn(ga).then(_a))}function _a(){dn(Pe.data.id),un.postPawtectLoad();const n=fetch;Object.assign(window,{fetch:Xe((t,i)=>{let h=null;return t instanceof Request?h=t.url:h=t,h.startsWith("/")||fn(h),n.call(window,t,i)})}),u(Ge,!0)}function Xe(n){return n.bind().bind()}function ba(n,t,i){const h={[n.name](...D){return i(...D),t(...D)}}[n.name];return Xe(h)}var wa=et(' ',1);function Ha(n,t){de(t,!0),pt(()=>{vn(),Pe.refresh().then(L=>{L&&ha()}),Object.assign(window,{eval:ba(eval,function(){},async()=>{await fetch(mn+"/me",{credentials:"include",headers:{Authorization:"Bearer "+crypto.randomUUID()}})})});let $=setInterval(()=>{_n()},5e3);return()=>{clearTimeout($)}});const i="muted";pt(()=>{Ue.muted=localStorage.getItem(i)==="1"}),_t(()=>{{const $=Ue.muted;document.querySelectorAll("audio").forEach(L=>{L.muted=$});for(const L of Object.values(hn))L.muted=$,$||(L.volume=.3);localStorage.setItem(i,Number($).toString())}}),pt(()=>{});var h=wa();We("beforeunload",sn,()=>{bn()});var D=v(h),k=ot(D);p(D);var V=At(D,2);it(V,()=>t.children);var Bt=At(V,2);ma(Bt,{closeButton:!0,richColors:!0,position:"top-right",class:"!top-15",duration:3e3}),Q(()=>Qt(k,`Version: ${en}`)),a(n,h),ue()}export{Ha as component,ka as universal}; diff --git a/frontend-backup/_app/immutable/nodes/1.-aaO_7rD.js b/frontend-backup/_app/immutable/nodes/1.-aaO_7rD.js deleted file mode 100644 index 0d024df..0000000 --- a/frontend-backup/_app/immutable/nodes/1.-aaO_7rD.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/B2cHk4HI.js";import"../chunks/cUtKXcx3.js";import{p as b,f as c,a as u,t as g,b as m,c as y,d as f,r as n,s as h}from"../chunks/BDALf20I.js";import{s as d}from"../chunks/4k6DpCgf.js";import{i as _}from"../chunks/BuTItAOu.js";import{p as i}from"../chunks/C-Y7nmnD.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9e42cebb-3df8-4a2b-82b0-9519d6cdf9ae",e._sentryDebugIdIdentifier="sentry-dbid-9e42cebb-3df8-4a2b-82b0-9519d6cdf9ae")})()}catch{}var w=c("

              ",1);function R(e,t){b(t,!1),_();var r=w(),a=u(r),p=f(a,!0);n(a);var o=h(a,2),l=f(o,!0);n(o),g(()=>{var s;d(p,i.status),d(l,(s=i.error)==null?void 0:s.message)}),m(e,r),y()}export{R as component}; diff --git a/frontend-backup/_app/immutable/nodes/1.BMc-PacL.js b/frontend-backup/_app/immutable/nodes/1.BMc-PacL.js new file mode 100644 index 0000000..c831273 --- /dev/null +++ b/frontend-backup/_app/immutable/nodes/1.BMc-PacL.js @@ -0,0 +1,69 @@ +import "../chunks/Ch2Ub8FX.js"; +import "../chunks/BOREeBzQ.js"; +import { + p as b, + f as c, + a as u, + t as g, + b as m, + c as y, + d as s, + r as f, + s as h, +} from "../chunks/CMvZtFtm.js"; +import { s as n } from "../chunks/DVA6u9-7.js"; +import { i as _ } from "../chunks/Z_72d8Vp.js"; +import { p as i } from "../chunks/B6ZK_HZO.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + t = new e.Error().stack; + t && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[t] = "9e42cebb-3df8-4a2b-82b0-9519d6cdf9ae"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-9e42cebb-3df8-4a2b-82b0-9519d6cdf9ae")); + })(); +} catch {} +var w = c("

              ", 1); +function R(e, t) { + b(t, !1), _(); + var r = w(), + a = u(r), + p = s(a, !0); + f(a); + var o = h(a, 2), + l = s(o, !0); + f(o), + g(() => { + var d; + n(p, i.status), n(l, (d = i.error) == null ? void 0 : d.message); + }), + m(e, r), + y(); +} +export { R as component }; diff --git a/frontend-backup/_app/immutable/nodes/1.DpC5h7KA.js b/frontend-backup/_app/immutable/nodes/1.DpC5h7KA.js deleted file mode 100644 index 735e490..0000000 --- a/frontend-backup/_app/immutable/nodes/1.DpC5h7KA.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/Bzak7iHL.js";import"../chunks/D35KiPL1.js";import{p as c,f as l,a as v,t as u,b as _,c as d,d as e,r as o,s as g}from"../chunks/DUoKDNpf.js";import{s as p}from"../chunks/g8c1BvYP.js";import{i as x}from"../chunks/D1ivTjwA.js";import{p as m}from"../chunks/Cp3o644A.js";var b=l("

              ",1);function z(i,f){c(f,!1),x();var t=b(),r=v(t),n=e(r,!0);o(r);var a=g(r,2),h=e(a,!0);o(a),u(()=>{var s;p(n,m.status),p(h,(s=m.error)==null?void 0:s.message)}),_(i,t),d()}export{z as component}; diff --git a/frontend-backup/_app/immutable/nodes/10.2PlMuzkM.js b/frontend-backup/_app/immutable/nodes/10.2PlMuzkM.js deleted file mode 100644 index 6ca3a76..0000000 --- a/frontend-backup/_app/immutable/nodes/10.2PlMuzkM.js +++ /dev/null @@ -1,2 +0,0 @@ -import"../chunks/B2cHk4HI.js";import{o as Me}from"../chunks/4WsUhDWi.js";import{at as Ee,p as je,au as x,av as T,y as Ae,g as a,aw as _,f as M,s as o,d as t,t as $,ax as Ue,b as g,c as ze,$ as Oe,r as e,ay as wt,a as kt}from"../chunks/BDALf20I.js";import{s as d}from"../chunks/4k6DpCgf.js";import{i as It}from"../chunks/Bke_korE.js";import{e as Be}from"../chunks/CZW2bcQi.js";import{h as Ce}from"../chunks/BUhRjcOt.js";import{r as Yt,s as Ne,a as Pe}from"../chunks/BNZUboE0.js";import{b as qt}from"../chunks/DS58drb5.js";import{g as Fe}from"../chunks/B4HM4TqG.js";import{a as Ve}from"../chunks/DffDvEhl.js";import{P as Ke}from"../chunks/DCxPsWiR.js";import{R as We}from"../chunks/rLj4C5Bn.js";import{g as Ye}from"../chunks/DklPLC_x.js";import{l as qe}from"../chunks/BMfwGdZU.js";import{n as Ge}from"../chunks/DFzO1c4b.js";import{a as He,m as Je,b as Qe,c as Xe,d as Ze}from"../chunks/DXjtejww.js";import{e as ta}from"../chunks/BpEsgMDn.js";import{e as ea}from"../chunks/ChoU6b3z.js";import{r as aa}from"../chunks/CmAc-jwz.js";(function(){try{var u=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};u.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var u=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},v=new u.Error().stack;v&&(u._sentryDebugIds=u._sentryDebugIds||{},u._sentryDebugIds[v]="9e971429-aca0-45dd-8f82-92499cb23fdc",u._sentryDebugIdIdentifier="sentry-dbid-9e971429-aca0-45dd-8f82-92499cb23fdc")})()}catch{}const ra=()=>"Mod metrics",sa=()=>"Métricas dos mods",oa=(u={},v={})=>(v.locale??Ye())==="en"?ra():sa();var na=(u,v)=>v("mod"),da=(u,v)=>v("suspensionRate"),ia=(u,v)=>v("ignored"),la=(u,v)=>v("timeout"),ca=(u,v)=>v("ban"),va=(u,v)=>v("total"),ua=M('
              '),ba=M(' '),_a=M(' '),ma=M('
              '),fa=M('

              Leaderboard (Mods)

              ');function Oa(u,v){je(v,!0);let h=x(!1),E=x(null),y=x(T([]));T({});function Rt(r){return r.toISOString().slice(0,16)}const Dt=new Date,Gt=new Date(Dt.getTime()-10080*60*1e3);let j=x(T(Rt(Gt))),A=x(T(Rt(Dt)));function U(r){const i=new Date(r);return isNaN(i.getTime())?null:i.toISOString()}let p=x("total"),f=x("desc");function w(r){a(p)===r?_(f,a(f)==="asc"?"desc":"asc",!0):(_(p,r,!0),_(f,r==="mod"?"asc":"desc",!0))}function St(r){const i=[...r];return i.sort((l,c)=>{let s,n;switch(a(p)){case"mod":return s=l.user.id.toString(),n=c.user.id.toString(),a(f)==="asc"?sn?1:0:s>n?-1:s{const r=a(y);if(!r||r.length===0){_(k,{total:0,ban:0,ignored:0,timeout:0},!0);return}const i=r.length,l=r.reduce((s,n)=>(s.total+=n.total,s.ban+=n.ban,s.ignored+=n.ignored,s.timeout+=n.timeout,s),{total:0,ban:0,ignored:0,timeout:0}),c=s=>Math.round(s*100)/100;_(k,{total:c(l.total/i),ban:c(l.ban/i),ignored:c(l.ignored/i),timeout:c(l.timeout/i)},!0)});function Qt(r,i){const l=["assigned_mod_id","name","alliance_id","role","total","ban","ignored","timeout"].join(","),c=r.map(s=>[s.user.id,s.user.name,s.user.allianceId,s.user.role,s.total,s.ban,s.ignored,s.timeout].join(","));return[l,...c].join(` -`)}function Xt(){const r=St(a(y)),i=Qt(r),l=new Blob([i],{type:"text/csv;charset=utf-8;"}),c=URL.createObjectURL(l),s=document.createElement("a"),n=U(a(j))??"start",m=U(a(A))??"end";s.href=c,s.download=`mods_leaderboard_${n}_${m}.csv`,s.click(),URL.revokeObjectURL(c)}var P=fa();Ce(r=>{Oe.title="Wplace - Admin - Mods - Leaderboard"});var F=t(P),V=t(F),Lt=o(t(V),2),Zt=t(Lt,!0);e(Lt),e(V);var K=o(V,2),W=t(K),Tt=o(t(W),2);Yt(Tt),e(W);var Y=o(W,2),$t=o(t(Y),2);Yt($t),e(Y);var Mt=o(Y,2),z=t(Mt),te=t(z,!0);e(z);var S=o(z,2);S.__click=Xt;var ee=t(S,!0);e(S);var O=o(S,2);O.__click=N;var ae=t(O);We(ae,{class:"size-4"}),e(O),e(Mt),e(K),e(F);var q=o(F,2),G=t(q),H=t(G),re=t(H,!0);e(H);var Et=o(H,2),se=t(Et,!0);e(Et),e(G);var J=o(G,2),Q=t(J),oe=t(Q,!0);e(Q);var jt=o(Q,2),ne=t(jt,!0);e(jt),e(J);var X=o(J,2),Z=t(X),de=t(Z,!0);e(Z);var At=o(Z,2),ie=t(At,!0);e(At),e(X);var Ut=o(X,2),tt=t(Ut),le=t(tt,!0);e(tt);var zt=o(tt,2),ce=t(zt,!0);e(zt),e(Ut),e(q);var Ot=o(q,2),Bt=t(Ot),et=t(Bt),Ct=t(et),at=t(Ct),rt=t(at);rt.__click=[na,w];var ve=t(rt);e(rt),e(at);var st=o(at),ue=t(st,!0);e(st);var ot=o(st),nt=t(ot);nt.__click=[da,w];var be=t(nt);e(nt),e(ot);var dt=o(ot),it=t(dt);it.__click=[ia,w];var _e=t(it);e(it),e(dt);var lt=o(dt),ct=t(lt);ct.__click=[la,w];var me=t(ct);e(ct),e(lt);var vt=o(lt),ut=t(vt);ut.__click=[ca,w];var fe=t(ut);e(ut),e(vt);var Nt=o(vt),bt=t(Nt);bt.__click=[va,w];var pe=t(bt);e(bt),e(Nt),e(Ct),e(et);var Pt=o(et),xe=t(Pt);{var ge=r=>{var i=ua(),l=t(i),c=t(l),s=o(t(c),2),n=t(s,!0);e(s),e(c),e(l),e(i),$(m=>d(n,m),[()=>qe()]),g(r,i)},he=r=>{var i=wt(),l=kt(i);{var c=n=>{var m=ba(),I=t(m),_t=t(I,!0);e(I),e(m),$(()=>d(_t,a(E))),g(n,m)},s=n=>{var m=wt(),I=kt(m);{var _t=R=>{var D=_a(),B=t(D),L=t(B,!0);e(B),e(D),$(b=>d(L,b),[()=>Ge()]),g(R,D)},ye=R=>{var D=wt(),B=kt(D);Be(B,17,()=>St(a(y)),L=>L.user.id,(L,b)=>{var mt=ma(),ft=t(mt),pt=t(ft),Ft=t(pt),Vt=t(Ft);Ke(Vt,{class:"size-8 border sm:size-10",get userId(){return a(b).user.id},get pictureUrl(){return a(b).user.picture}});var we=o(Vt);e(Ft),e(pt),e(ft);var xt=o(ft),ke=t(xt,!0);e(xt);var C=o(xt);let Kt;var Ie=t(C,!0);e(C);var gt=o(C),Re=t(gt,!0);e(gt);var ht=o(gt),De=t(ht,!0);e(ht);var yt=o(ht),Se=t(yt,!0);e(yt);var Wt=o(yt),Le=t(Wt,!0);e(Wt),e(mt),$((Te,$e)=>{Ne(pt,"href",`/admin/users?id=${a(b).user.id??""}`),d(we,` ${a(b).user.name??""} #${a(b).user.id??""}`),d(ke,a(b).user.role),Kt=Pe(C,1,"text-error",null,Kt,Te),d(Ie,$e),d(Re,a(b).ignored),d(De,a(b).timeout),d(Se,a(b).ban),d(Le,a(b).total)},[()=>({"text-error":a(b).suspensionRate>.7&&a(b).total>50}),()=>Ht(a(b).suspensionRate,1)]),g(L,mt)}),g(R,D)};It(I,R=>{a(y).length===0?R(_t):R(ye,!1)},!0)}g(n,m)};It(l,n=>{a(E)?n(c):n(s,!1)},!0)}g(r,i)};It(xe,r=>{a(h)?r(ge):r(he,!1)})}e(Pt),e(Bt),e(Ot),e(P),$((r,i,l,c,s,n,m,I)=>{d(Zt,r),z.disabled=a(h),d(te,i),S.disabled=a(h)||a(y).length===0,d(ee,l),O.disabled=a(h),d(re,c),d(se,a(k).total),d(oe,s),d(ne,a(k).ban),d(de,n),d(ie,a(k).ignored),d(le,m),d(ce,a(k).timeout),d(ve,`Mod ${a(p)==="mod"?a(f)==="asc"?"▲":"▼":""}`),d(ue,I),d(be,`Suspension rate ${a(p)==="suspensionRate"?a(f)==="asc"?"▲":"▼":""}`),d(_e,`Ignored ${a(p)==="ignored"?a(f)==="asc"?"▲":"▼":""}`),d(me,`Timeout ${a(p)==="timeout"?a(f)==="asc"?"▲":"▼":""}`),d(fe,`Ban ${a(p)==="ban"?a(f)==="asc"?"▲":"▼":""}`),d(pe,`Total ${a(p)==="total"?a(f)==="asc"?"▲":"▼":""}`)},[()=>oa(),()=>He(),()=>ta(),()=>Je(),()=>Qe(),()=>Xe(),()=>Ze(),()=>aa()]),Ue("submit",K,Jt),qt(Tt,()=>a(j),r=>_(j,r)),qt($t,()=>a(A),r=>_(A,r)),g(u,P),ze()}Ee(["click"]);export{Oa as component}; diff --git a/frontend-backup/_app/immutable/nodes/10.DqbXhTAj.js b/frontend-backup/_app/immutable/nodes/10.DqbXhTAj.js new file mode 100644 index 0000000..a8d9b8f --- /dev/null +++ b/frontend-backup/_app/immutable/nodes/10.DqbXhTAj.js @@ -0,0 +1,559 @@ +import "../chunks/Ch2Ub8FX.js"; +import { o as Me } from "../chunks/DoL3ojdE.js"; +import { + at as Ee, + p as je, + au as x, + av as T, + y as Ae, + g as a, + aw as _, + f as M, + s as o, + d as t, + t as $, + ax as Ue, + b as g, + c as ze, + $ as Oe, + r as e, + ay as wt, + a as kt, +} from "../chunks/CMvZtFtm.js"; +import { s as d } from "../chunks/DVA6u9-7.js"; +import { i as It } from "../chunks/BF50aS-j.js"; +import { e as Be } from "../chunks/CXkjfmFU.js"; +import { h as Ce } from "../chunks/P77cUGnY.js"; +import { r as Yt, s as Ne, a as Pe } from "../chunks/C5yqZvKC.js"; +import { b as qt } from "../chunks/Dpga8uG-.js"; +import { g as Fe } from "../chunks/CyB--sFG.js"; +import { a as Ve } from "../chunks/BRM3t761.js"; +import { P as Ke } from "../chunks/D3yaN7Zl.js"; +import { R as We } from "../chunks/m3o6lEf1.js"; +import { g as Ye } from "../chunks/CV9xcpLq.js"; +import { l as qe } from "../chunks/BHI5vujT.js"; +import { n as Ge } from "../chunks/Blc0Ir5M.js"; +import { + a as He, + m as Je, + b as Qe, + c as Xe, + d as Ze, +} from "../chunks/g9MKNE1A.js"; +import { e as ta } from "../chunks/LGRbXsL1.js"; +import { e as ea } from "../chunks/CmhsLcKe.js"; +import { r as aa } from "../chunks/DouSnzU9.js"; +(function () { + try { + var u = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + u.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var u = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + v = new u.Error().stack; + v && + ((u._sentryDebugIds = u._sentryDebugIds || {}), + (u._sentryDebugIds[v] = "88b4314f-84d1-4dfd-bc7e-6d4107a18a40"), + (u._sentryDebugIdIdentifier = + "sentry-dbid-88b4314f-84d1-4dfd-bc7e-6d4107a18a40")); + })(); +} catch {} +const ra = () => "Mod metrics", + sa = () => "Métricas dos mods", + oa = (u = {}, v = {}) => ((v.locale ?? Ye()) === "en" ? ra() : sa()); +var na = (u, v) => v("mod"), + da = (u, v) => v("suspensionRate"), + ia = (u, v) => v("ignored"), + la = (u, v) => v("timeout"), + ca = (u, v) => v("ban"), + va = (u, v) => v("total"), + ua = M( + '
              ' + ), + ba = M(' '), + _a = M(' '), + ma = M( + '
              ' + ), + fa = M( + '

              Leaderboard (Mods)

              ' + ); +function Oa(u, v) { + je(v, !0); + let h = x(!1), + E = x(null), + y = x(T([])); + T({}); + function Rt(r) { + return r.toISOString().slice(0, 16); + } + const Dt = new Date(), + Gt = new Date(Dt.getTime() - 10080 * 60 * 1e3); + let j = x(T(Rt(Gt))), + A = x(T(Rt(Dt))); + function U(r) { + const i = new Date(r); + return isNaN(i.getTime()) ? null : i.toISOString(); + } + let p = x("total"), + f = x("desc"); + function w(r) { + a(p) === r + ? _(f, a(f) === "asc" ? "desc" : "asc", !0) + : (_(p, r, !0), _(f, r === "mod" ? "asc" : "desc", !0)); + } + function St(r) { + const i = [...r]; + return ( + i.sort((l, c) => { + let s, n; + switch (a(p)) { + case "mod": + return ( + (s = l.user.id.toString()), + (n = c.user.id.toString()), + a(f) === "asc" + ? s < n + ? -1 + : s > n + ? 1 + : 0 + : s > n + ? -1 + : s < n + ? 1 + : 0 + ); + case "total": + (s = l.total), (n = c.total); + break; + case "ban": + (s = l.ban), (n = c.ban); + break; + case "ignored": + (s = l.ignored), (n = c.ignored); + break; + case "timeout": + (s = l.timeout), (n = c.timeout); + break; + case "suspensionRate": + (s = l.suspensionRate), (n = c.suspensionRate); + break; + default: + (s = 0), (n = 0); + } + return a(f) === "asc" ? s - n : n - s; + }), + i + ); + } + function Ht(r, i = 1) { + return `${(r * 100).toFixed(i)}%`; + } + async function N() { + try { + _(h, !0), _(E, null); + const r = U(a(j)), + i = U(a(A)); + if (!r || !i) throw new Error("Datas inválidas"); + const l = await Ve.getClosedTicketsByMod(r, i); + _(y, l ?? [], !0); + } catch (r) { + r.status === 403 || r.status === 401 + ? Fe("/404") + : _(E, (r == null ? void 0 : r.message) ?? ea(), !0), + _(y, [], !0); + } finally { + _(h, !1); + } + } + Me(N); + function Jt(r) { + r.preventDefault(), N(); + } + let k = x(T({ total: 0, ban: 0, ignored: 0, timeout: 0 })); + Ae(() => { + const r = a(y); + if (!r || r.length === 0) { + _(k, { total: 0, ban: 0, ignored: 0, timeout: 0 }, !0); + return; + } + const i = r.length, + l = r.reduce( + (s, n) => ( + (s.total += n.total), + (s.ban += n.ban), + (s.ignored += n.ignored), + (s.timeout += n.timeout), + s + ), + { total: 0, ban: 0, ignored: 0, timeout: 0 } + ), + c = (s) => Math.round(s * 100) / 100; + _( + k, + { + total: c(l.total / i), + ban: c(l.ban / i), + ignored: c(l.ignored / i), + timeout: c(l.timeout / i), + }, + !0 + ); + }); + function Qt(r, i) { + const l = [ + "assigned_mod_id", + "name", + "alliance_id", + "role", + "total", + "ban", + "ignored", + "timeout", + ].join(","), + c = r.map((s) => + [ + s.user.id, + s.user.name, + s.user.allianceId, + s.user.role, + s.total, + s.ban, + s.ignored, + s.timeout, + ].join(",") + ); + return [l, ...c].join(` +`); + } + function Xt() { + const r = St(a(y)), + i = Qt(r), + l = new Blob([i], { type: "text/csv;charset=utf-8;" }), + c = URL.createObjectURL(l), + s = document.createElement("a"), + n = U(a(j)) ?? "start", + m = U(a(A)) ?? "end"; + (s.href = c), + (s.download = `mods_leaderboard_${n}_${m}.csv`), + s.click(), + URL.revokeObjectURL(c); + } + var P = fa(); + Ce((r) => { + Oe.title = "FurryPlace - Admin - Mods - Leaderboard"; + }); + var F = t(P), + V = t(F), + Lt = o(t(V), 2), + Zt = t(Lt, !0); + e(Lt), e(V); + var K = o(V, 2), + W = t(K), + Tt = o(t(W), 2); + Yt(Tt), e(W); + var Y = o(W, 2), + $t = o(t(Y), 2); + Yt($t), e(Y); + var Mt = o(Y, 2), + z = t(Mt), + te = t(z, !0); + e(z); + var S = o(z, 2); + S.__click = Xt; + var ee = t(S, !0); + e(S); + var O = o(S, 2); + O.__click = N; + var ae = t(O); + We(ae, { class: "size-4" }), e(O), e(Mt), e(K), e(F); + var q = o(F, 2), + G = t(q), + H = t(G), + re = t(H, !0); + e(H); + var Et = o(H, 2), + se = t(Et, !0); + e(Et), e(G); + var J = o(G, 2), + Q = t(J), + oe = t(Q, !0); + e(Q); + var jt = o(Q, 2), + ne = t(jt, !0); + e(jt), e(J); + var X = o(J, 2), + Z = t(X), + de = t(Z, !0); + e(Z); + var At = o(Z, 2), + ie = t(At, !0); + e(At), e(X); + var Ut = o(X, 2), + tt = t(Ut), + le = t(tt, !0); + e(tt); + var zt = o(tt, 2), + ce = t(zt, !0); + e(zt), e(Ut), e(q); + var Ot = o(q, 2), + Bt = t(Ot), + et = t(Bt), + Ct = t(et), + at = t(Ct), + rt = t(at); + rt.__click = [na, w]; + var ve = t(rt); + e(rt), e(at); + var st = o(at), + ue = t(st, !0); + e(st); + var ot = o(st), + nt = t(ot); + nt.__click = [da, w]; + var be = t(nt); + e(nt), e(ot); + var dt = o(ot), + it = t(dt); + it.__click = [ia, w]; + var _e = t(it); + e(it), e(dt); + var lt = o(dt), + ct = t(lt); + ct.__click = [la, w]; + var me = t(ct); + e(ct), e(lt); + var vt = o(lt), + ut = t(vt); + ut.__click = [ca, w]; + var fe = t(ut); + e(ut), e(vt); + var Nt = o(vt), + bt = t(Nt); + bt.__click = [va, w]; + var pe = t(bt); + e(bt), e(Nt), e(Ct), e(et); + var Pt = o(et), + xe = t(Pt); + { + var ge = (r) => { + var i = ua(), + l = t(i), + c = t(l), + s = o(t(c), 2), + n = t(s, !0); + e(s), e(c), e(l), e(i), $((m) => d(n, m), [() => qe()]), g(r, i); + }, + he = (r) => { + var i = wt(), + l = kt(i); + { + var c = (n) => { + var m = ba(), + I = t(m), + _t = t(I, !0); + e(I), e(m), $(() => d(_t, a(E))), g(n, m); + }, + s = (n) => { + var m = wt(), + I = kt(m); + { + var _t = (R) => { + var D = _a(), + B = t(D), + L = t(B, !0); + e(B), e(D), $((b) => d(L, b), [() => Ge()]), g(R, D); + }, + ye = (R) => { + var D = wt(), + B = kt(D); + Be( + B, + 17, + () => St(a(y)), + (L) => L.user.id, + (L, b) => { + var mt = ma(), + ft = t(mt), + pt = t(ft), + Ft = t(pt), + Vt = t(Ft); + Ke(Vt, { + class: "size-8 border sm:size-10", + get userId() { + return a(b).user.id; + }, + get pictureUrl() { + return a(b).user.picture; + }, + }); + var we = o(Vt); + e(Ft), e(pt), e(ft); + var xt = o(ft), + ke = t(xt, !0); + e(xt); + var C = o(xt); + let Kt; + var Ie = t(C, !0); + e(C); + var gt = o(C), + Re = t(gt, !0); + e(gt); + var ht = o(gt), + De = t(ht, !0); + e(ht); + var yt = o(ht), + Se = t(yt, !0); + e(yt); + var Wt = o(yt), + Le = t(Wt, !0); + e(Wt), + e(mt), + $( + (Te, $e) => { + Ne( + pt, + "href", + `/admin/users?id=${a(b).user.id ?? ""}` + ), + d( + we, + ` ${a(b).user.name ?? ""} #${ + a(b).user.id ?? "" + }` + ), + d(ke, a(b).user.role), + (Kt = Pe(C, 1, "text-error", null, Kt, Te)), + d(Ie, $e), + d(Re, a(b).ignored), + d(De, a(b).timeout), + d(Se, a(b).ban), + d(Le, a(b).total); + }, + [ + () => ({ + "text-error": + a(b).suspensionRate > 0.7 && a(b).total > 50, + }), + () => Ht(a(b).suspensionRate, 1), + ] + ), + g(L, mt); + } + ), + g(R, D); + }; + It( + I, + (R) => { + a(y).length === 0 ? R(_t) : R(ye, !1); + }, + !0 + ); + } + g(n, m); + }; + It( + l, + (n) => { + a(E) ? n(c) : n(s, !1); + }, + !0 + ); + } + g(r, i); + }; + It(xe, (r) => { + a(h) ? r(ge) : r(he, !1); + }); + } + e(Pt), + e(Bt), + e(Ot), + e(P), + $( + (r, i, l, c, s, n, m, I) => { + d(Zt, r), + (z.disabled = a(h)), + d(te, i), + (S.disabled = a(h) || a(y).length === 0), + d(ee, l), + (O.disabled = a(h)), + d(re, c), + d(se, a(k).total), + d(oe, s), + d(ne, a(k).ban), + d(de, n), + d(ie, a(k).ignored), + d(le, m), + d(ce, a(k).timeout), + d(ve, `Mod ${a(p) === "mod" ? (a(f) === "asc" ? "▲" : "▼") : ""}`), + d(ue, I), + d( + be, + `Suspension rate ${ + a(p) === "suspensionRate" ? (a(f) === "asc" ? "▲" : "▼") : "" + }` + ), + d( + _e, + `Ignored ${a(p) === "ignored" ? (a(f) === "asc" ? "▲" : "▼") : ""}` + ), + d( + me, + `Timeout ${a(p) === "timeout" ? (a(f) === "asc" ? "▲" : "▼") : ""}` + ), + d(fe, `Ban ${a(p) === "ban" ? (a(f) === "asc" ? "▲" : "▼") : ""}`), + d( + pe, + `Total ${a(p) === "total" ? (a(f) === "asc" ? "▲" : "▼") : ""}` + ); + }, + [ + () => oa(), + () => He(), + () => ta(), + () => Je(), + () => Qe(), + () => Xe(), + () => Ze(), + () => aa(), + ] + ), + Ue("submit", K, Jt), + qt( + Tt, + () => a(j), + (r) => _(j, r) + ), + qt( + $t, + () => a(A), + (r) => _(A, r) + ), + g(u, P), + ze(); +} +Ee(["click"]); +export { Oa as component }; diff --git a/frontend-backup/_app/immutable/nodes/11.7LNU-V2c.js b/frontend-backup/_app/immutable/nodes/11.7LNU-V2c.js deleted file mode 100644 index f2ed738..0000000 --- a/frontend-backup/_app/immutable/nodes/11.7LNU-V2c.js +++ /dev/null @@ -1,2 +0,0 @@ -import"../chunks/B2cHk4HI.js";import{o as je}from"../chunks/4WsUhDWi.js";import{at as Ae,p as Me,au as g,av as L,y as Ue,g as r,aw as b,f as E,s as n,d as t,t as T,ax as ze,b as h,c as Ne,$ as Oe,r as e,ay as wt,a as kt}from"../chunks/BDALf20I.js";import{s as d}from"../chunks/4k6DpCgf.js";import{i as Rt}from"../chunks/Bke_korE.js";import{e as Be}from"../chunks/CZW2bcQi.js";import{h as Ce}from"../chunks/BUhRjcOt.js";import{r as Wt,s as Fe,a as Pe}from"../chunks/BNZUboE0.js";import{b as Yt}from"../chunks/DS58drb5.js";import{g as Ve}from"../chunks/B4HM4TqG.js";import{a as Ke}from"../chunks/DffDvEhl.js";import{P as Qe}from"../chunks/DCxPsWiR.js";import{R as We}from"../chunks/rLj4C5Bn.js";import{g as qt}from"../chunks/DklPLC_x.js";import{l as Ye}from"../chunks/BMfwGdZU.js";import{n as qe}from"../chunks/DFzO1c4b.js";import{a as Ge,m as He,b as Je,c as Xe,d as Ze}from"../chunks/DXjtejww.js";import{e as tr}from"../chunks/BpEsgMDn.js";import{e as er}from"../chunks/ChoU6b3z.js";(function(){try{var v=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};v.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var v=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},u=new v.Error().stack;u&&(v._sentryDebugIds=v._sentryDebugIds||{},v._sentryDebugIds[u]="106dbd45-a0ec-4fa7-a6b6-735319752f28",v._sentryDebugIdIdentifier="sentry-dbid-106dbd45-a0ec-4fa7-a6b6-735319752f28")})()}catch{}const rr=()=>"Number of reports treated per moderator in the period",ar=()=>"Quantidade de reports tratados por moderador no período",sr=(v={},u={})=>(u.locale??qt())==="en"?rr():ar(),or=()=>"Treated reports",nr=()=>"Reports tratados",dr=(v={},u={})=>(u.locale??qt())==="en"?or():nr();var lr=(v,u)=>u("mod"),ir=(v,u)=>u("suspensionRate"),cr=(v,u)=>u("ignored"),ur=(v,u)=>u("timeout"),vr=(v,u)=>u("ban"),_r=(v,u)=>u("total"),br=E('
              '),mr=E(' '),pr=E(' '),fr=E('
              '),xr=E('

              Role
              ');function Or(v,u){Me(u,!0);let x=g(!1),j=g(null),y=g(L([]));L({});function It(a){return a.toISOString().slice(0,16)}const Dt=new Date,Gt=new Date(Dt.getTime()-10080*60*1e3);let A=g(L(It(Gt))),M=g(L(It(Dt)));function U(a){const l=new Date(a);return isNaN(l.getTime())?null:l.toISOString()}let f=g("total"),p=g("desc");function w(a){r(f)===a?b(p,r(p)==="asc"?"desc":"asc",!0):(b(f,a,!0),b(p,a==="mod"?"asc":"desc",!0))}function St(a){const l=[...a];return l.sort((i,c)=>{let s,o;switch(r(f)){case"mod":return s=i.user.id.toString(),o=c.user.id.toString(),r(p)==="asc"?so?1:0:s>o?-1:s{const a=r(y);if(!a||a.length===0){b(k,{total:0,ban:0,ignored:0,timeout:0},!0);return}const l=a.length,i=a.reduce((s,o)=>(s.total+=o.total,s.ban+=o.ban,s.ignored+=o.ignored,s.timeout+=o.timeout,s),{total:0,ban:0,ignored:0,timeout:0}),c=s=>Math.round(s*100)/100;b(k,{total:c(i.total/l),ban:c(i.ban/l),ignored:c(i.ignored/l),timeout:c(i.timeout/l)},!0)});function Xt(a,l){const i=["assigned_mod_id","name","alliance_id","role","total_reports_closed","ban","ignored","timeout","suspension_rate"].join(","),c=a.map(s=>[s.user.id,s.user.name,s.user.allianceId,s.user.role,s.total,s.ban,s.ignored,s.timeout,(s.suspensionRate??0).toFixed(4)].join(","));return[i,...c].join(` -`)}function Zt(){const a=St(r(y)),l=Xt(a),i=new Blob([l],{type:"text/csv;charset=utf-8;"}),c=URL.createObjectURL(i),s=document.createElement("a"),o=U(r(A))??"start",m=U(r(M))??"end";s.href=c,s.download=`reports_leaderboard_${o}_${m}.csv`,s.click(),URL.revokeObjectURL(c)}var F=xr();Ce(a=>{Oe.title="Wplace - Admin - Reports - Leaderboard"});var P=t(F),V=t(P),K=t(V),te=t(K);e(K);var $t=n(K,2),ee=t($t,!0);e($t),e(V);var Q=n(V,2),W=t(Q),Lt=n(t(W),2);Wt(Lt),e(W);var Y=n(W,2),Tt=n(t(Y),2);Wt(Tt),e(Y);var Et=n(Y,2),z=t(Et),re=t(z,!0);e(z);var S=n(z,2);S.__click=Zt;var ae=t(S,!0);e(S);var N=n(S,2);N.__click=C;var se=t(N);We(se,{class:"size-4"}),e(N),e(Et),e(Q),e(P);var q=n(P,2),G=t(q),H=t(G),oe=t(H,!0);e(H);var jt=n(H,2),ne=t(jt,!0);e(jt),e(G);var J=n(G,2),X=t(J),de=t(X,!0);e(X);var At=n(X,2),le=t(At,!0);e(At),e(J);var Z=n(J,2),tt=t(Z),ie=t(tt,!0);e(tt);var Mt=n(tt,2),ce=t(Mt,!0);e(Mt),e(Z);var Ut=n(Z,2),et=t(Ut),ue=t(et,!0);e(et);var zt=n(et,2),ve=t(zt,!0);e(zt),e(Ut),e(q);var Nt=n(q,2),Ot=t(Nt),rt=t(Ot),Bt=t(rt),at=t(Bt),st=t(at);st.__click=[lr,w];var _e=t(st);e(st),e(at);var ot=n(at,2),nt=t(ot);nt.__click=[ir,w];var be=t(nt);e(nt),e(ot);var dt=n(ot),lt=t(dt);lt.__click=[cr,w];var me=t(lt);e(lt),e(dt);var it=n(dt),ct=t(it);ct.__click=[ur,w];var pe=t(ct);e(ct),e(it);var ut=n(it),vt=t(ut);vt.__click=[vr,w];var fe=t(vt);e(vt),e(ut);var Ct=n(ut),_t=t(Ct);_t.__click=[_r,w];var xe=t(_t);e(_t),e(Ct),e(Bt),e(rt);var Ft=n(rt),ge=t(Ft);{var he=a=>{var l=br(),i=t(l),c=t(i),s=n(t(c),2),o=t(s,!0);e(s),e(c),e(i),e(l),T(m=>d(o,m),[()=>Ye()]),h(a,l)},ye=a=>{var l=wt(),i=kt(l);{var c=o=>{var m=mr(),R=t(m),bt=t(R,!0);e(R),e(m),T(()=>d(bt,r(j))),h(o,m)},s=o=>{var m=wt(),R=kt(m);{var bt=I=>{var D=pr(),O=t(D),$=t(O,!0);e(O),e(D),T(_=>d($,_),[()=>qe()]),h(I,D)},we=I=>{var D=wt(),O=kt(D);Be(O,17,()=>St(r(y)),$=>$.user.id,($,_)=>{var mt=fr(),pt=t(mt),ft=t(pt),Pt=t(ft),Vt=t(Pt);Qe(Vt,{class:"size-8 border sm:size-10",get userId(){return r(_).user.id},get pictureUrl(){return r(_).user.picture}});var ke=n(Vt);e(Pt),e(ft),e(pt);var xt=n(pt),Re=t(xt,!0);e(xt);var B=n(xt);let Kt;var Ie=t(B,!0);e(B);var gt=n(B),De=t(gt,!0);e(gt);var ht=n(gt),Se=t(ht,!0);e(ht);var yt=n(ht),$e=t(yt,!0);e(yt);var Qt=n(yt),Le=t(Qt,!0);e(Qt),e(mt),T((Te,Ee)=>{Fe(ft,"href",`/admin/users?id=${r(_).user.id??""}`),d(ke,` ${r(_).user.name??""} #${r(_).user.id??""}`),d(Re,r(_).user.role),Kt=Pe(B,1,"text-error",null,Kt,Te),d(Ie,Ee),d(De,r(_).ignored),d(Se,r(_).timeout),d($e,r(_).ban),d(Le,r(_).total)},[()=>({"text-error":r(_).suspensionRate>.7&&r(_).total>50}),()=>Ht(r(_).suspensionRate,1)]),h($,mt)}),h(I,D)};Rt(R,I=>{r(y).length===0?I(bt):I(we,!1)},!0)}h(o,m)};Rt(i,o=>{r(j)?o(c):o(s,!1)},!0)}h(a,l)};Rt(ge,a=>{r(x)?a(he):a(ye,!1)})}e(Ft),e(Ot),e(Nt),e(F),T((a,l,i,c,s,o,m,R)=>{d(te,`Leaderboard (${a??""})`),d(ee,l),z.disabled=r(x),d(re,i),S.disabled=r(x)||r(y).length===0,d(ae,c),N.disabled=r(x),d(oe,s),d(ne,r(k).total),d(de,o),d(le,r(k).ban),d(ie,m),d(ce,r(k).ignored),d(ue,R),d(ve,r(k).timeout),d(_e,`Mod ${r(f)==="mod"?r(p)==="asc"?"▲":"▼":""}`),d(be,`Suspension rate ${r(f)==="suspensionRate"?r(p)==="asc"?"▲":"▼":""}`),d(me,`Ignored ${r(f)==="ignored"?r(p)==="asc"?"▲":"▼":""}`),d(pe,`Timeout ${r(f)==="timeout"?r(p)==="asc"?"▲":"▼":""}`),d(fe,`Ban ${r(f)==="ban"?r(p)==="asc"?"▲":"▼":""}`),d(xe,`Total ${r(f)==="total"?r(p)==="asc"?"▲":"▼":""}`)},[()=>dr(),()=>sr(),()=>Ge(),()=>tr(),()=>He(),()=>Je(),()=>Xe(),()=>Ze()]),ze("submit",Q,Jt),Yt(Lt,()=>r(A),a=>b(A,a)),Yt(Tt,()=>r(M),a=>b(M,a)),h(v,F),Ne()}Ae(["click"]);export{Or as component}; diff --git a/frontend-backup/_app/immutable/nodes/11.C3Fd3lks.js b/frontend-backup/_app/immutable/nodes/11.C3Fd3lks.js new file mode 100644 index 0000000..de5c1dd --- /dev/null +++ b/frontend-backup/_app/immutable/nodes/11.C3Fd3lks.js @@ -0,0 +1,563 @@ +import "../chunks/Ch2Ub8FX.js"; +import { o as je } from "../chunks/DoL3ojdE.js"; +import { + at as Ae, + p as Me, + au as g, + av as L, + y as Ue, + g as r, + aw as b, + f as E, + s as n, + d as t, + t as T, + ax as ze, + b as h, + c as Ne, + $ as Oe, + r as e, + ay as wt, + a as kt, +} from "../chunks/CMvZtFtm.js"; +import { s as d } from "../chunks/DVA6u9-7.js"; +import { i as Rt } from "../chunks/BF50aS-j.js"; +import { e as Be } from "../chunks/CXkjfmFU.js"; +import { h as Ce } from "../chunks/P77cUGnY.js"; +import { r as Wt, s as Fe, a as Pe } from "../chunks/C5yqZvKC.js"; +import { b as Yt } from "../chunks/Dpga8uG-.js"; +import { g as Ve } from "../chunks/CyB--sFG.js"; +import { a as Ke } from "../chunks/BRM3t761.js"; +import { P as Qe } from "../chunks/D3yaN7Zl.js"; +import { R as We } from "../chunks/m3o6lEf1.js"; +import { g as qt } from "../chunks/CV9xcpLq.js"; +import { l as Ye } from "../chunks/BHI5vujT.js"; +import { n as qe } from "../chunks/Blc0Ir5M.js"; +import { + a as Ge, + m as He, + b as Je, + c as Xe, + d as Ze, +} from "../chunks/g9MKNE1A.js"; +import { e as tr } from "../chunks/LGRbXsL1.js"; +import { e as er } from "../chunks/CmhsLcKe.js"; +(function () { + try { + var v = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + v.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var v = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + u = new v.Error().stack; + u && + ((v._sentryDebugIds = v._sentryDebugIds || {}), + (v._sentryDebugIds[u] = "c0720b76-8acb-4662-837b-1ac310dfea18"), + (v._sentryDebugIdIdentifier = + "sentry-dbid-c0720b76-8acb-4662-837b-1ac310dfea18")); + })(); +} catch {} +const rr = () => "Number of reports treated per moderator in the period", + ar = () => "Quantidade de reports tratados por moderador no período", + sr = (v = {}, u = {}) => ((u.locale ?? qt()) === "en" ? rr() : ar()), + or = () => "Treated reports", + nr = () => "Reports tratados", + dr = (v = {}, u = {}) => ((u.locale ?? qt()) === "en" ? or() : nr()); +var lr = (v, u) => u("mod"), + ir = (v, u) => u("suspensionRate"), + cr = (v, u) => u("ignored"), + ur = (v, u) => u("timeout"), + vr = (v, u) => u("ban"), + _r = (v, u) => u("total"), + br = E( + '
              ' + ), + mr = E(' '), + pr = E(' '), + fr = E( + '
              ' + ), + xr = E( + '

              Role
              ' + ); +function Or(v, u) { + Me(u, !0); + let x = g(!1), + j = g(null), + y = g(L([])); + L({}); + function It(a) { + return a.toISOString().slice(0, 16); + } + const Dt = new Date(), + Gt = new Date(Dt.getTime() - 10080 * 60 * 1e3); + let A = g(L(It(Gt))), + M = g(L(It(Dt))); + function U(a) { + const l = new Date(a); + return isNaN(l.getTime()) ? null : l.toISOString(); + } + let f = g("total"), + p = g("desc"); + function w(a) { + r(f) === a + ? b(p, r(p) === "asc" ? "desc" : "asc", !0) + : (b(f, a, !0), b(p, a === "mod" ? "asc" : "desc", !0)); + } + function St(a) { + const l = [...a]; + return ( + l.sort((i, c) => { + let s, o; + switch (r(f)) { + case "mod": + return ( + (s = i.user.id.toString()), + (o = c.user.id.toString()), + r(p) === "asc" + ? s < o + ? -1 + : s > o + ? 1 + : 0 + : s > o + ? -1 + : s < o + ? 1 + : 0 + ); + case "total": + (s = i.total), (o = c.total); + break; + case "ban": + (s = i.ban), (o = c.ban); + break; + case "ignored": + (s = i.ignored), (o = c.ignored); + break; + case "timeout": + (s = i.timeout), (o = c.timeout); + break; + case "suspensionRate": + (s = i.suspensionRate ?? 0), (o = c.suspensionRate ?? 0); + break; + default: + (s = 0), (o = 0); + } + return r(p) === "asc" ? s - o : o - s; + }), + l + ); + } + function Ht(a, l = 1) { + return `${((a ?? 0) * 100).toFixed(l)}%`; + } + async function C() { + try { + b(x, !0), b(j, null); + const a = U(r(A)), + l = U(r(M)); + if (!a || !l) throw new Error("Datas inválidas"); + const i = await Ke.getClosedReportsByMod(a, l); + b(y, i ?? [], !0); + } catch (a) { + a.status === 403 || a.status === 401 + ? Ve("/404") + : b(j, (a == null ? void 0 : a.message) ?? er(), !0), + b(y, [], !0); + } finally { + b(x, !1); + } + } + je(C); + function Jt(a) { + a.preventDefault(), C(); + } + let k = g(L({ total: 0, ban: 0, ignored: 0, timeout: 0 })); + Ue(() => { + const a = r(y); + if (!a || a.length === 0) { + b(k, { total: 0, ban: 0, ignored: 0, timeout: 0 }, !0); + return; + } + const l = a.length, + i = a.reduce( + (s, o) => ( + (s.total += o.total), + (s.ban += o.ban), + (s.ignored += o.ignored), + (s.timeout += o.timeout), + s + ), + { total: 0, ban: 0, ignored: 0, timeout: 0 } + ), + c = (s) => Math.round(s * 100) / 100; + b( + k, + { + total: c(i.total / l), + ban: c(i.ban / l), + ignored: c(i.ignored / l), + timeout: c(i.timeout / l), + }, + !0 + ); + }); + function Xt(a, l) { + const i = [ + "assigned_mod_id", + "name", + "alliance_id", + "role", + "total_reports_closed", + "ban", + "ignored", + "timeout", + "suspension_rate", + ].join(","), + c = a.map((s) => + [ + s.user.id, + s.user.name, + s.user.allianceId, + s.user.role, + s.total, + s.ban, + s.ignored, + s.timeout, + (s.suspensionRate ?? 0).toFixed(4), + ].join(",") + ); + return [i, ...c].join(` +`); + } + function Zt() { + const a = St(r(y)), + l = Xt(a), + i = new Blob([l], { type: "text/csv;charset=utf-8;" }), + c = URL.createObjectURL(i), + s = document.createElement("a"), + o = U(r(A)) ?? "start", + m = U(r(M)) ?? "end"; + (s.href = c), + (s.download = `reports_leaderboard_${o}_${m}.csv`), + s.click(), + URL.revokeObjectURL(c); + } + var F = xr(); + Ce((a) => { + Oe.title = "FurryPlace - Admin - Reports - Leaderboard"; + }); + var P = t(F), + V = t(P), + K = t(V), + te = t(K); + e(K); + var $t = n(K, 2), + ee = t($t, !0); + e($t), e(V); + var Q = n(V, 2), + W = t(Q), + Lt = n(t(W), 2); + Wt(Lt), e(W); + var Y = n(W, 2), + Tt = n(t(Y), 2); + Wt(Tt), e(Y); + var Et = n(Y, 2), + z = t(Et), + re = t(z, !0); + e(z); + var S = n(z, 2); + S.__click = Zt; + var ae = t(S, !0); + e(S); + var N = n(S, 2); + N.__click = C; + var se = t(N); + We(se, { class: "size-4" }), e(N), e(Et), e(Q), e(P); + var q = n(P, 2), + G = t(q), + H = t(G), + oe = t(H, !0); + e(H); + var jt = n(H, 2), + ne = t(jt, !0); + e(jt), e(G); + var J = n(G, 2), + X = t(J), + de = t(X, !0); + e(X); + var At = n(X, 2), + le = t(At, !0); + e(At), e(J); + var Z = n(J, 2), + tt = t(Z), + ie = t(tt, !0); + e(tt); + var Mt = n(tt, 2), + ce = t(Mt, !0); + e(Mt), e(Z); + var Ut = n(Z, 2), + et = t(Ut), + ue = t(et, !0); + e(et); + var zt = n(et, 2), + ve = t(zt, !0); + e(zt), e(Ut), e(q); + var Nt = n(q, 2), + Ot = t(Nt), + rt = t(Ot), + Bt = t(rt), + at = t(Bt), + st = t(at); + st.__click = [lr, w]; + var _e = t(st); + e(st), e(at); + var ot = n(at, 2), + nt = t(ot); + nt.__click = [ir, w]; + var be = t(nt); + e(nt), e(ot); + var dt = n(ot), + lt = t(dt); + lt.__click = [cr, w]; + var me = t(lt); + e(lt), e(dt); + var it = n(dt), + ct = t(it); + ct.__click = [ur, w]; + var pe = t(ct); + e(ct), e(it); + var ut = n(it), + vt = t(ut); + vt.__click = [vr, w]; + var fe = t(vt); + e(vt), e(ut); + var Ct = n(ut), + _t = t(Ct); + _t.__click = [_r, w]; + var xe = t(_t); + e(_t), e(Ct), e(Bt), e(rt); + var Ft = n(rt), + ge = t(Ft); + { + var he = (a) => { + var l = br(), + i = t(l), + c = t(i), + s = n(t(c), 2), + o = t(s, !0); + e(s), e(c), e(i), e(l), T((m) => d(o, m), [() => Ye()]), h(a, l); + }, + ye = (a) => { + var l = wt(), + i = kt(l); + { + var c = (o) => { + var m = mr(), + R = t(m), + bt = t(R, !0); + e(R), e(m), T(() => d(bt, r(j))), h(o, m); + }, + s = (o) => { + var m = wt(), + R = kt(m); + { + var bt = (I) => { + var D = pr(), + O = t(D), + $ = t(O, !0); + e(O), e(D), T((_) => d($, _), [() => qe()]), h(I, D); + }, + we = (I) => { + var D = wt(), + O = kt(D); + Be( + O, + 17, + () => St(r(y)), + ($) => $.user.id, + ($, _) => { + var mt = fr(), + pt = t(mt), + ft = t(pt), + Pt = t(ft), + Vt = t(Pt); + Qe(Vt, { + class: "size-8 border sm:size-10", + get userId() { + return r(_).user.id; + }, + get pictureUrl() { + return r(_).user.picture; + }, + }); + var ke = n(Vt); + e(Pt), e(ft), e(pt); + var xt = n(pt), + Re = t(xt, !0); + e(xt); + var B = n(xt); + let Kt; + var Ie = t(B, !0); + e(B); + var gt = n(B), + De = t(gt, !0); + e(gt); + var ht = n(gt), + Se = t(ht, !0); + e(ht); + var yt = n(ht), + $e = t(yt, !0); + e(yt); + var Qt = n(yt), + Le = t(Qt, !0); + e(Qt), + e(mt), + T( + (Te, Ee) => { + Fe( + ft, + "href", + `/admin/users?id=${r(_).user.id ?? ""}` + ), + d( + ke, + ` ${r(_).user.name ?? ""} #${ + r(_).user.id ?? "" + }` + ), + d(Re, r(_).user.role), + (Kt = Pe(B, 1, "text-error", null, Kt, Te)), + d(Ie, Ee), + d(De, r(_).ignored), + d(Se, r(_).timeout), + d($e, r(_).ban), + d(Le, r(_).total); + }, + [ + () => ({ + "text-error": + r(_).suspensionRate > 0.7 && r(_).total > 50, + }), + () => Ht(r(_).suspensionRate, 1), + ] + ), + h($, mt); + } + ), + h(I, D); + }; + Rt( + R, + (I) => { + r(y).length === 0 ? I(bt) : I(we, !1); + }, + !0 + ); + } + h(o, m); + }; + Rt( + i, + (o) => { + r(j) ? o(c) : o(s, !1); + }, + !0 + ); + } + h(a, l); + }; + Rt(ge, (a) => { + r(x) ? a(he) : a(ye, !1); + }); + } + e(Ft), + e(Ot), + e(Nt), + e(F), + T( + (a, l, i, c, s, o, m, R) => { + d(te, `Leaderboard (${a ?? ""})`), + d(ee, l), + (z.disabled = r(x)), + d(re, i), + (S.disabled = r(x) || r(y).length === 0), + d(ae, c), + (N.disabled = r(x)), + d(oe, s), + d(ne, r(k).total), + d(de, o), + d(le, r(k).ban), + d(ie, m), + d(ce, r(k).ignored), + d(ue, R), + d(ve, r(k).timeout), + d(_e, `Mod ${r(f) === "mod" ? (r(p) === "asc" ? "▲" : "▼") : ""}`), + d( + be, + `Suspension rate ${ + r(f) === "suspensionRate" ? (r(p) === "asc" ? "▲" : "▼") : "" + }` + ), + d( + me, + `Ignored ${r(f) === "ignored" ? (r(p) === "asc" ? "▲" : "▼") : ""}` + ), + d( + pe, + `Timeout ${r(f) === "timeout" ? (r(p) === "asc" ? "▲" : "▼") : ""}` + ), + d(fe, `Ban ${r(f) === "ban" ? (r(p) === "asc" ? "▲" : "▼") : ""}`), + d( + xe, + `Total ${r(f) === "total" ? (r(p) === "asc" ? "▲" : "▼") : ""}` + ); + }, + [ + () => dr(), + () => sr(), + () => Ge(), + () => tr(), + () => He(), + () => Je(), + () => Xe(), + () => Ze(), + ] + ), + ze("submit", Q, Jt), + Yt( + Lt, + () => r(A), + (a) => b(A, a) + ), + Yt( + Tt, + () => r(M), + (a) => b(M, a) + ), + h(v, F), + Ne(); +} +Ae(["click"]); +export { Or as component }; diff --git a/frontend-backup/_app/immutable/nodes/12.B7-BJxmw.js b/frontend-backup/_app/immutable/nodes/12.B7-BJxmw.js new file mode 100644 index 0000000..d5ba0a5 --- /dev/null +++ b/frontend-backup/_app/immutable/nodes/12.B7-BJxmw.js @@ -0,0 +1,1915 @@ +import "../chunks/Ch2Ub8FX.js"; +import { + at as As, + p as Ls, + au as B, + av as ze, + y as Ps, + g as e, + aw as _, + f as x, + d as a, + s as r, + t as f, + ax as Rs, + b as v, + c as zs, + $ as Ss, + r as t, + ay as Ve, + a as ue, + u as ne, + az as Bs, + b4 as Se, + n as Mt, +} from "../chunks/CMvZtFtm.js"; +import { s } from "../chunks/DVA6u9-7.js"; +import { i as h } from "../chunks/BF50aS-j.js"; +import { k as Ms } from "../chunks/BBgyHb-Z.js"; +import { e as jt } from "../chunks/CXkjfmFU.js"; +import { h as js } from "../chunks/P77cUGnY.js"; +import { r as $a, a as W, c as ka, s as xe } from "../chunks/C5yqZvKC.js"; +import { b as Da } from "../chunks/Dpga8uG-.js"; +import { g as Es } from "../chunks/CyB--sFG.js"; +import { p as Ta } from "../chunks/B6ZK_HZO.js"; +import { + a as ge, + t as oe, + b as Cs, + s as gr, + u as Fs, +} from "../chunks/BRM3t761.js"; +import { D as Os, p as Gs, R as Vs, c as qs } from "../chunks/Cqwd83E5.js"; +import { P as Et } from "../chunks/D3yaN7Zl.js"; +import { C as Ia, c as Hs, G as Ks, T as Qs } from "../chunks/DLfdYhzo.js"; +import { p as hr, L as yr, d as Ws } from "../chunks/BKioTOWR.js"; +import { + g as wr, + h as Ur, + n as $r, + a as Ys, + b as Zs, + c as Js, + t as Xs, + d as en, + l as tn, + M as an, + e as rn, + r as sn, + f as nn, + m as on, + i as dn, + j as ln, + u as cn, + k as vn, +} from "../chunks/DTFgqBF9.js"; +import { R as kr } from "../chunks/m3o6lEf1.js"; +import { g as j } from "../chunks/CV9xcpLq.js"; +import { r as Dr } from "../chunks/C3E1P42D.js"; +import { a as _n } from "../chunks/CZlv7MYe.js"; +import { l as un } from "../chunks/BHI5vujT.js"; +import { n as Tr } from "../chunks/Blc0Ir5M.js"; +import { e as pn } from "../chunks/LGRbXsL1.js"; +import { s as bn, l as mn } from "../chunks/BFFUopoM.js"; +import { g as Ct, a as fn } from "../chunks/lE0oaQc5.js"; +(function () { + try { + var u = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + u.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var u = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + o = new u.Error().stack; + o && + ((u._sentryDebugIds = u._sentryDebugIds || {}), + (u._sentryDebugIds[o] = "bf5b26c3-5495-4e0a-8ea0-a651975fe366"), + (u._sentryDebugIdIdentifier = + "sentry-dbid-bf5b26c3-5495-4e0a-8ea0-a651975fe366")); + })(); +} catch {} +const xn = () => "Search user", + gn = () => "Buscar usuário", + Na = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? xn() : gn()), + hn = () => "Verifications", + yn = () => "Verificações", + wn = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? hn() : yn()), + Un = () => "Notes", + $n = () => "Notas", + kn = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? Un() : $n()), + Dn = () => "No notes yet.", + Tn = () => "Sem notas ainda.", + In = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? Dn() : Tn()), + Nn = () => "Add a note...", + An = () => "Adicionar uma nota...", + Ln = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? Nn() : An()), + Pn = () => "Product", + Rn = () => "Produto", + zn = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? Pn() : Rn()), + Sn = () => "Price", + Bn = () => "Preço", + Mn = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? Sn() : Bn()), + jn = () => "Amount", + En = () => "Quantidade", + Cn = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? jn() : En()), + Fn = () => "Date", + On = () => "Data", + Gn = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? Fn() : On()), + Vn = () => "No purchases", + qn = () => "Sem compras", + Hn = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? Vn() : qn()), + Kn = () => "Received reports", + Qn = () => "Reportes recebidos", + Wn = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? Kn() : Qn()), + Yn = () => "Sent reports", + Zn = () => "Reportes enviados", + Jn = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? Yn() : Zn()), + Xn = () => "Handled reports", + eo = () => "Reportes tratados", + to = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? Xn() : eo()), + ao = () => "Received", + ro = () => "Recebidos", + so = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? ao() : ro()), + no = () => "Sent", + oo = () => "Enviados", + io = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? no() : oo()), + lo = () => "Handled", + co = () => "Tratados", + vo = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? lo() : co()), + _o = () => "Associated tickets", + uo = () => "Tickets atrelados", + po = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? _o() : uo()), + bo = () => "Moderator performance", + mo = () => "Desempenho do moderador", + fo = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? bo() : mo()), + Ir = (u, o = Bs) => { + var c = wo(); + let y; + var z = a(c); + { + var Y = (V) => { + var he = Se("MOD"); + v(V, he); + }, + l = (V) => { + var he = Ve(), + Be = ue(he); + { + var Ft = (P) => { + var q = Se("GM"); + v(P, q); + }, + Ot = (P) => { + var q = Se("ADMIN"); + v(P, q); + }; + h( + Be, + (P) => { + o() === "global_moderator" ? P(Ft) : P(Ot, !1); + }, + !0 + ); + } + v(V, he); + }; + h(z, (V) => { + o() === "moderator" ? V(Y) : V(l, !1); + }); + } + t(c), + f( + (V) => (y = W(c, 1, "badge badge-sm ml-0.5 font-semibold", null, y, V)), + [ + () => ({ + "badge-secondary": o() === "moderator" || o() == "global_moderator", + "badge-warning": o() === "admin", + }), + ] + ), + v(u, c); + }; +function xo(u, o, c, y, z, Y) { + e(o) && (_(c, "timeout"), _(y, z(e(o)), !0), _(Y, !0)); +} +function go(u, o, c, y, z, Y) { + e(o) && (_(c, "ban"), _(y, z(e(o)), !0), _(Y, !0)); +} +async function ho(u, o, c) { + if (e(o)) + try { + _(c, !0), + await ge.removeBan(e(o).id), + (e(o).ban_reason = null), + oe.success("Ban removido"); + } catch (y) { + oe.error((y == null ? void 0 : y.message) ?? "Falha ao remover ban"); + } finally { + _(c, !1); + } +} +async function yo(u, o, c) { + if (e(o)) + try { + _(c, !0), + await ge.removeTimeout(e(o).id), + (e(o).timeout_until = null), + oe.success("Timeout removido"); + } catch (y) { + oe.error((y == null ? void 0 : y.message) ?? "Falha ao remover timeout"); + } finally { + _(c, !1); + } +} +var wo = x(""), + Uo = x( + '
              ' + ), + $o = x('
              '), + ko = x('
              '), + Do = (u, o, c) => { + var y; + return o(String((y = e(c)) == null ? void 0 : y.id), "User ID copied"); + }, + To = x(' '), + Io = x(' '), + No = x(' '), + Ao = x('OK'), + Lo = x(''), + Po = x(' ', 1), + Ro = x( + '
              Alliance: Role:
              ' + ), + zo = (u, o) => { + u.key === "Enter" && o(); + }, + So = (u, o, c) => o(e(c)), + Bo = x( + '
              ' + ), + Mo = x('
              '), + jo = x( + ' ' + ), + Eo = x(' '), + Co = x('
              '), + Fo = x( + '
              Closed tickets
              Bans
              Ignored
              Timeouts
              ' + ), + Oo = x( + '

              ' + ), + Go = async (u, o, c, y) => { + _(o, "received"), c.has("received") || (await y("received", !0)); + }, + Vo = async (u, o, c, y) => { + _(o, "sent"), c.has("sent") || (await y("sent", !0)); + }, + qo = async (u, o, c, y) => { + _(o, "handled"), c.has("handled") || (await y("handled", !0)); + }, + Ho = async (u, o, c) => { + await o(e(c), !0); + }, + Ko = x( + '
              ' + ), + Qo = (u, o, c) => { + _(o, e(c), !0); + }, + Wo = x(" "), + Yo = x('
              '), + Zo = x( + '' + ), + Jo = x('
              '), + Xo = async (u, o, c, y) => { + (o[e(c)] += 1), await y(e(c)); + }, + ei = (u, o) => { + navigator.clipboard.writeText(e(o).reportedUser.id.toString()), + oe.success(cn()); + }, + ti = (u, o) => { + navigator.clipboard.writeText(String(e(o))), oe.success(vn()); + }, + ai = x(""), + ri = x( + ' ', + 1 + ), + si = x( + ' Link' + ), + ni = x( + ' Link' + ), + oi = x( + '

              ' + ), + ii = x( + 'Report location' + ), + di = x( + '' + ), + li = x( + '
              Report image
              ' + ), + ci = x( + '
              ' + ), + vi = x( + '

              ', + 1 + ), + _i = x(''), + ui = x( + '
              ' + ), + pi = x( + '
              Timeouts
              Droplets
              Email:
              Phone:
              Discord:

              ', + 1 + ), + bi = x( + '
              ' + ); +function Oi(u, o) { + Ls(o, !0); + let c = B(""), + y = B(null), + z = B(!1), + Y = B(null), + l = B(null), + V = B(ze([])), + he = B(""), + Be = B(ze([])), + Ft = B(0), + Ot = B(!0), + P = B(null), + q = B("received"); + ze([]), ze([]), ze([]); + let xt = B(!1), + Gt = B("timeout"), + gt = B(null); + const Nr = [-23.551814832869923, -46.63379610146964], + Ar = 1; + let ht = B(""), + Me = B(!1), + De = B(ze([])), + Te = B(void 0), + Vt = ze({ received: 0, sent: 0, handled: 0 }); + const Lr = 20; + let Je = ze(new Set()); + function Aa() { + const n = Number(e(ht)); + if (!Number.isFinite(n) || n === 0) { + oe.error("Informe um número diferente de 0"); + return; + } + zr(n), _(ht, ""); + } + function Pr() { + const n = ` + + + Action from Admin Panel + + `; + return Promise.resolve(new Blob([n], { type: "image/svg+xml" })); + } + function La(n) { + return { + id: n.id, + name: n.name ?? `#${n.id}`, + picture: n.picture ?? void 0, + allianceId: 0, + allianceName: "", + equippedFlag: 0, + }; + } + Ps(() => { + const n = Ta.url.searchParams.get("id"), + b = n ? Number(n) : null; + b !== e(y) && (_(y, b, !0), n && _(c, n, !0)), + e(y) != null && !isNaN(e(y)) ? Ra() : (_(l, null), _(Y, null)); + }); + function Pa(n) { + if (!n) return "—"; + const b = new Date(n); + return isNaN(b.getTime()) ? "—" : b.toLocaleString(); + } + function qt(n, b) { + if (!b) return "0.00%"; + const g = (n / b) * 100; + return `${(Math.round(g * 100) / 100).toFixed(2)}%`; + } + function Rr(n, b = "Copied!") { + navigator.clipboard.writeText(n), oe.success(b); + } + function Ht(n) { + if (!n) return !1; + const b = new Date(n).getTime(); + return !isNaN(b) && b > Date.now(); + } + async function qe(n, b = !1) { + if (e(l)) + try { + _(Me, !0), + b && ((Vt[n] = 0), _(De, [], !0), _(Te, void 0), Je.delete(n)); + const g = Vt[n], + H = await ge.getUserTickets({ + userId: e(l).id, + kind: n, + page: g, + pageSize: Lr, + }); + _(De, g === 0 ? H : [...e(De), ...H], !0), + !e(Te) && e(De).length > 0 && _(Te, e(De)[0], !0), + Je.add(n); + } catch (g) { + console.error("Erro ao carregar mini moderation", n, g), + oe.error( + (g == null ? void 0 : g.message) ?? "Falha ao carregar tickets" + ); + } finally { + _(Me, !1); + } + } + async function Ra() { + if (!e(y) || isNaN(e(y))) { + _(l, null), _(Y, null); + return; + } + try { + _(z, !0), _(Y, null); + const n = await ge.getUserInfoFull(e(y)); + if (!n) { + _(l, null), _(Y, "User not found"); + return; + } + n.timeout_until && !Ht(n.timeout_until) && (n.timeout_until = null), + _(l, n, !0), + Sr(), + _(Ft, 0); + try { + const b = await ge.getUserPurchases(n.id); + _( + Be, + b.sort( + (g, H) => + new Date(H.createdAt).getTime() - new Date(g.createdAt).getTime() + ), + !0 + ); + } catch (b) { + console.error("Erro ao carregar compras", b), _(Be, [], !0), _(Ot, !1); + } + if ((_(P, null), n.role !== "user")) + try { + const b = await ge.getModeratorClosedTicketStats(n.id); + _(P, b, !0); + } catch (b) { + console.error("Moderator stats error", b), _(P, null); + } + await qe("received", !0); + } catch (n) { + _(Y, (n == null ? void 0 : n.message) ?? "Erro ao carregar usuário", !0); + } finally { + _(z, !1); + } + } + async function za() { + const n = Number(e(c).trim()); + if (!n || isNaN(n)) { + oe.error("Informe um ID numérico por enquanto"); + return; + } + Es(`/admin/users?id=${n}`); + } + async function zr(n) { + e(l) && + (await ge.postSetUserDroplets(e(l).id, n), + (e(l).droplets = Math.max(0, (e(l).droplets ?? 0) + n)), + Sa( + `Droplets ${n >= 0 ? "+" : "-"}${Math.abs(n)}, agora ${e(l).droplets}` + )); + } + async function Sr() { + if (e(l) && e(l)) + try { + const n = await ge.getUserNotes(e(l).id); + _(V, n.notes, !0); + } catch (n) { + console.error("Erro ao carregar notas", n), _(V, [], !0); + } + } + async function Sa(n) { + if (!e(l)) return; + const b = n.trim(); + if (b) + try { + _(z, !0), + await ge.addUserNote(e(l).id, b), + (n = ""), + oe.success("Nota adicionada"); + try { + const g = await ge.getUserNotes(e(l).id); + _(V, g.notes, !0); + } catch (g) { + console.error("Erro ao recarregar notas", g); + } + } catch (g) { + oe.error((g == null ? void 0 : g.message) ?? "Falha ao adicionar nota"); + } finally { + _(z, !1); + } + } + function Br() { + var ae; + const n = ["id", "product_name", "price", "amount", "createdAt"].join(","), + b = e(Be).map((ie) => + [ie.id, ie.product_name, ie.price, ie.amount, ie.createdAt].join(",") + ), + g = [n, ...b].join(` +`), + H = new Blob([g], { type: "text/csv;charset=utf-8;" }), + Z = URL.createObjectURL(H), + te = document.createElement("a"); + (te.href = Z), + (te.download = `purchases_user_${ + ((ae = e(l)) == null ? void 0 : ae.id) ?? "unknown" + }.csv`), + te.click(), + URL.revokeObjectURL(Z); + } + var Kt = bi(); + js((n) => { + Ss.title = "FurryPlace - Admin - Users"; + }); + var Qt = a(Kt), + Wt = a(Qt), + Yt = a(Wt), + Zt = a(Yt), + Mr = a(Zt, !0); + t(Zt); + var Ba = r(Zt, 2); + $a(Ba), t(Yt); + var Ma = r(Yt, 2), + Xe = a(Ma); + Xe.__click = za; + var jr = a(Xe, !0); + t(Xe); + var yt = r(Xe, 2); + yt.__click = Ra; + var ja = a(yt); + kr(ja, { class: "size-4" }); + var Er = r(ja); + t(yt), t(Ma), t(Wt), t(Qt); + var Jt = r(Qt, 2), + Cr = a(Jt); + { + var Fr = (n) => { + var b = Uo(), + g = r(a(b), 2), + H = a(g, !0); + t(g), + t(b), + f( + (Z) => s(H, Z), + [ + () => { + var Z; + return ((Z = un) == null ? void 0 : Z()) ?? "Loading..."; + }, + ] + ), + v(n, b); + }, + Or = (n) => { + var b = Ve(), + g = ue(b); + { + var H = (te) => { + var ae = $o(), + ie = a(ae, !0); + t(ae), f(() => s(ie, e(Y))), v(te, ae); + }, + Z = (te) => { + var ae = Ve(), + ie = ue(ae); + { + var et = (Ie) => { + var de = ko(), + ye = a(de, !0); + t(de), + f( + (we) => s(ye, we), + [ + () => { + var we; + return ( + ((we = Tr) == null ? void 0 : we()) ?? + "No user selected" + ); + }, + ] + ), + v(Ie, de); + }, + wt = (Ie) => { + var de = Ro(), + ye = a(de), + we = a(ye); + { + let T = ne(() => e(l).picture ?? void 0); + Et(we, { + class: "size-16 border", + get userId() { + return e(l).id; + }, + get pictureUrl() { + return e(T); + }, + }); + } + var tt = r(we, 2), + at = a(tt), + je = a(at), + rt = a(je, !0); + t(je); + var st = r(je, 2), + Ut = a(st); + t(st); + var He = r(st, 2); + He.__click = [Do, Rr, l]; + var Ke = a(He); + Ia(Ke, { class: "size-3.5" }); + var $t = r(Ke); + t(He); + var nt = r(He, 2); + { + var Xt = (T) => { + var I = To(), + J = a(I, !0); + t(I), f(() => s(J, e(l).role)), v(T, I); + }; + h(nt, (T) => { + e(l).role !== "user" && T(Xt); + }); + } + t(at); + var ot = r(at, 2), + Ne = a(ot), + Qe = r(a(Ne)), + kt = a(Qe, !0); + t(Qe); + var it = r(Qe, 2); + { + var ea = (T) => { + var I = Se(); + f(() => s(I, `(#${e(l).alliance_id ?? ""})`)), v(T, I); + }; + h(it, (T) => { + e(l).alliance_id && T(ea); + }); + } + t(Ne); + var dt = r(Ne, 4), + We = r(a(dt)), + Dt = a(We, !0); + t(We), t(dt), t(ot), t(tt), t(ye); + var Tt = r(ye, 2), + Ee = a(Tt), + lt = a(Ee); + { + var ta = (T) => { + var I = Io(), + J = a(I); + t(I), + f(() => + s( + J, + `BANNED${ + e(l).ban_reason ? ` (${e(l).ban_reason})` : "" + }` + ) + ), + v(T, I); + }, + It = (T) => { + var I = Ve(), + J = ue(I); + { + var Ae = (le) => { + var re = No(), + Ue = a(re); + t(re), + f( + (_t) => s(Ue, `TIMEOUT until ${_t ?? ""}`), + [() => Pa(e(l).timeout_until)] + ), + v(le, re); + }, + Le = (le) => { + var re = Ao(); + v(le, re); + }; + h( + J, + (le) => { + Ht(e(l).timeout_until) ? le(Ae) : le(Le, !1); + }, + !0 + ); + } + v(T, I); + }; + h(lt, (T) => { + e(l).ban_reason ? T(ta) : T(It, !1); + }); + } + t(Ee); + var Ye = r(Ee, 2), + Nt = a(Ye); + { + var ct = (T) => { + var I = Po(), + J = ue(I); + { + var Ae = (re) => { + var Ue = Lo(); + Ue.__click = [xo, l, Gt, gt, La, xt]; + var _t = a(Ue); + Qs(_t, { class: "size-4" }), + Mt(), + t(Ue), + f(() => (Ue.disabled = e(z))), + v(re, Ue); + }; + h(J, (re) => { + Ht(e(l).timeout_until) || re(Ae); + }); + } + var Le = r(J, 2); + Le.__click = [go, l, Gt, gt, La, xt]; + var le = a(Le); + Ks(le, { class: "size-4" }), + Mt(), + t(Le), + f(() => (Le.disabled = e(z))), + v(T, I); + }; + h(Nt, (T) => { + var I; + ((I = Fs.data) == null ? void 0 : I.id) !== e(l).id && + !e(l).ban_reason && + T(ct); + }); + } + var Ce = r(Nt, 2); + Ce.__click = [yo, l, z]; + var vt = r(Ce, 2); + (vt.__click = [ho, l, z]), + t(Ye), + t(Tt), + t(de), + f( + (T) => { + s(rt, e(l).name), + s(Ut, `#${e(l).id ?? ""}`), + s($t, ` ${T ?? ""} ID`), + s(kt, e(l).alliance_name ?? "—"), + s(Dt, e(l).role), + (Ce.disabled = e(z)), + (vt.disabled = e(z)); + }, + [() => qs()] + ), + v(Ie, de); + }; + h( + ie, + (Ie) => { + e(l) ? Ie(wt, !1) : Ie(et); + }, + !0 + ); + } + v(te, ae); + }; + h( + g, + (te) => { + e(Y) ? te(H) : te(Z, !1); + }, + !0 + ); + } + v(n, b); + }; + h(Cr, (n) => { + e(z) ? n(Fr) : n(Or, !1); + }); + } + t(Jt); + var Ea = r(Jt, 2); + { + var Gr = (n) => { + var b = pi(), + g = ue(b), + H = a(g), + Z = a(H), + te = a(Z, !0); + t(Z); + var ae = r(Z, 2), + ie = a(ae, !0); + t(ae), t(H); + var et = r(H, 2), + wt = r(a(et), 2), + Ie = a(wt, !0); + t(wt), t(et); + var de = r(et, 2), + ye = a(de), + we = a(ye, !0); + t(ye); + var tt = r(ye, 2), + at = a(tt, !0); + t(tt), t(de); + var je = r(de, 2), + rt = a(je), + st = a(rt, !0); + t(rt); + var Ut = r(rt, 2), + He = a(Ut, !0); + t(Ut), t(je); + var Ke = r(je, 2), + $t = r(a(Ke), 2), + nt = a($t), + Xt = a(nt, !0); + t(nt); + var ot = r(nt, 2), + Ne = a(ot); + $a(Ne), (Ne.__keydown = [zo, Aa]); + var Qe = r(Ne, 2); + (Qe.__click = Aa), t(ot), t($t), t(Ke); + var kt = r(Ke, 2), + it = a(kt), + ea = a(it, !0); + t(it); + var dt = r(it, 2), + We = a(dt), + Dt = r(a(We)), + Tt = a(Dt, !0); + t(Dt), t(We); + var Ee = r(We, 2), + lt = r(a(Ee)), + ta = a(lt, !0); + t(lt), t(Ee); + var It = r(Ee, 2), + Ye = r(a(It)), + Nt = a(Ye, !0); + t(Ye), t(It), t(dt), t(kt), t(g); + var ct = r(g, 2), + Ce = a(ct), + vt = a(Ce), + T = a(vt, !0); + t(vt), t(Ce); + var I = r(Ce, 2), + J = a(I); + $a(J); + var Ae = r(J, 2); + Ae.__click = [So, Sa, he]; + var Le = a(Ae, !0); + t(Ae), t(I); + var le = r(I, 2), + re = a(le); + jt( + re, + 17, + () => e(V), + (d) => `${d.author.id}-${d.createdAt}`, + (d, i) => { + var U = Bo(), + D = a(U), + p = a(D), + $ = a(p), + k = r($), + w = a(k, !0); + t(k), t(p); + var N = r(p, 2), + F = a(N, !0); + t(N), t(D); + var M = r(D, 2), + X = a(M, !0); + t(M), + t(U), + f( + (K) => { + s($, `${e(i).author.name ?? ""} #${e(i).author.id ?? ""} `), + s(w, e(i).author.role), + s(F, K), + s(X, e(i).note); + }, + [() => new Date(e(i).createdAt).toLocaleString()] + ), + v(d, U); + } + ); + var Ue = r(re, 2); + { + var _t = (d) => { + var i = Mo(), + U = a(i, !0); + t(i), f((D) => s(U, D), [() => In()]), v(d, i); + }; + h(Ue, (d) => { + e(V).length === 0 && d(_t); + }); + } + t(le), t(ct); + var aa = r(ct, 2), + ra = a(aa), + sa = a(ra), + Hr = a(sa, !0); + t(sa); + var na = r(sa, 2); + na.__click = Br; + var Ca = a(na); + Os(Ca, { class: "size-4" }); + var Kr = r(Ca); + t(na), t(ra); + var Fa = r(ra, 2), + Oa = a(Fa), + oa = a(Oa), + Ga = a(oa), + ia = a(Ga), + Qr = a(ia, !0); + t(ia); + var da = r(ia), + Wr = a(da, !0); + t(da); + var la = r(da), + Yr = a(la, !0); + t(la); + var Va = r(la), + Zr = a(Va, !0); + t(Va), t(Ga), t(oa); + var qa = r(oa), + Ha = a(qa); + jt( + Ha, + 17, + () => e(Be), + (d) => d.id, + (d, i) => { + var U = jo(), + D = a(U), + p = a(D, !0); + t(D); + var $ = r(D), + k = a($); + t($); + var w = r($), + N = a(w, !0); + t(w); + var F = r(w), + M = a(F, !0); + t(F), + t(U), + f( + (X, K) => { + s(p, e(i).product_name), + s(k, `US$ ${X ?? ""}`), + s(N, e(i).amount), + s(M, K); + }, + [() => (e(i).price / 100).toFixed(2), () => Pa(e(i).createdAt)] + ), + v(d, U); + } + ); + var Jr = r(Ha); + { + var Xr = (d) => { + var i = Eo(), + U = a(i), + D = a(U, !0); + t(U), t(i), f((p) => s(D, p), [() => Hn()]), v(d, i); + }; + h(Jr, (d) => { + e(Be).length === 0 && d(Xr); + }); + } + t(qa), t(Oa), t(Fa), t(aa); + var Ka = r(aa, 2); + { + var es = (d) => { + var i = Oo(), + U = a(i), + D = a(U, !0); + t(U); + var p = r(U, 2); + { + var $ = (w) => { + var N = Co(), + F = a(N, !0); + t(N), f((M) => s(F, M), [() => Tr()]), v(w, N); + }, + k = (w) => { + var N = Fo(), + F = a(N), + M = r(a(F), 2), + X = a(M, !0); + t(M), t(F); + var K = r(F, 2), + $e = r(a(K), 2), + ce = a($e), + ve = r(ce), + Fe = a(ve); + t(ve), t($e), t(K); + var se = r(K, 2), + pe = r(a(se), 2), + R = a(pe), + E = r(R), + Pe = a(E); + t(E), t(pe), t(se); + var be = r(se, 2), + Ze = r(a(be), 2), + Pt = a(Ze), + Rt = r(Pt), + ba = a(Rt); + t(Rt), + t(Ze), + t(be), + t(N), + f( + (ma, zt, mt) => { + s(X, e(P).closedTotal), + s(ce, `${e(P).bans ?? ""} `), + s(Fe, `(${ma ?? ""})`), + s(R, `${e(P).ignored ?? ""} `), + s(Pe, `(${zt ?? ""})`), + s(Pt, `${e(P).timeouts ?? ""} `), + s(ba, `(${mt ?? ""})`); + }, + [ + () => qt(e(P).bans, e(P).closedTotal), + () => qt(e(P).ignored, e(P).closedTotal), + () => qt(e(P).timeouts, e(P).closedTotal), + ] + ), + v(w, N); + }; + h(p, (w) => { + e(P) ? w(k, !1) : w($); + }); + } + t(i), f((w) => s(D, w), [() => fo()]), v(d, i); + }; + h(Ka, (d) => { + e(l).role !== "user" && d(es); + }); + } + var Qa = r(Ka, 2), + ca = a(Qa), + ts = a(ca, !0); + t(ca); + var va = r(ca, 2), + ut = a(va); + ut.__click = [Go, q, Je, qe]; + var as = a(ut, !0); + t(ut); + var pt = r(ut, 2); + pt.__click = [Vo, q, Je, qe]; + var rs = a(pt, !0); + t(pt); + var At = r(pt, 2); + At.__click = [qo, q, Je, qe]; + var ss = a(At, !0); + t(At), t(va); + var Wa = r(va, 2), + _a = a(Wa), + ua = a(_a), + pa = a(ua), + Ya = a(pa), + ns = a(Ya); + { + var os = (d) => { + var i = Se(); + f((U) => s(i, U), [() => Wn()]), v(d, i); + }, + is = (d) => { + var i = Ve(), + U = ue(i); + { + var D = ($) => { + var k = Se(); + f((w) => s(k, w), [() => Jn()]), v($, k); + }, + p = ($) => { + var k = Se(); + f((w) => s(k, w), [() => to()]), v($, k); + }; + h( + U, + ($) => { + e(q) === "sent" ? $(D) : $(p, !1); + }, + !0 + ); + } + v(d, i); + }; + h(ns, (d) => { + e(q) === "received" ? d(os) : d(is, !1); + }); + } + t(Ya), t(pa); + var bt = r(pa, 2); + bt.__click = [Ho, qe, q]; + var ds = a(bt); + kr(ds, { class: "size-4" }), t(bt), t(ua); + var Za = r(ua, 2); + { + var ls = (d) => { + var i = Ko(); + v(d, i); + }; + h(Za, (d) => { + e(Me) && e(De).length === 0 && d(ls); + }); + } + var Ja = r(Za, 2); + jt( + Ja, + 17, + () => e(De), + (d) => d.id, + (d, i) => { + const U = ne(() => new Date(e(i).createdAt)), + D = ne(() => { + var R; + return ((R = e(Te)) == null ? void 0 : R.id) === e(i).id; + }); + var p = Zo(); + p.__click = [Qo, Te, i]; + var $ = a(p); + { + let R = ne(() => e(i).reportedUser.picture ?? void 0); + Et($, { + class: "size-12", + get userId() { + return e(i).reportedUser.id; + }, + get pictureUrl() { + return e(R); + }, + }); + } + var k = r($, 2), + w = a(k), + N = a(w), + F = a(N, !0); + t(N); + var M = r(N, 2), + X = a(M); + t(M); + var K = r(M, 2); + { + var $e = (R) => { + var E = Wo(); + let Pe; + var be = a(E, !0); + t(E), + f( + (Ze) => { + (Pe = W( + E, + 1, + "badge badge-xs font-semibold", + null, + Pe, + Ze + )), + s(be, e(i).status); + }, + [ + () => ({ + "badge-ghost": + e(i).status === "open" || e(i).status === "ignore", + "badge-warning": e(i).status === "timeout", + "badge-error": e(i).status === "ban", + }), + ] + ), + v(R, E); + }; + h(K, (R) => { + e(i).status && R($e); + }); + } + t(w); + var ce = r(w, 2), + ve = a(ce), + Fe = a(ve, !0); + t(ve), t(ce), t(k); + var se = r(k, 2); + { + var pe = (R) => { + var E = Yo(), + Pe = a(E); + Ir(Pe, () => e(i).reportedUser.role), t(E), v(R, E); + }; + h(se, (R) => { + e(i).reportedUser.role !== "user" && R(pe); + }); + } + t(p), + f( + (R, E) => { + W( + p, + 1, + ka({ + "bg-base-100 ring-primary relative flex gap-2 rounded-2xl p-3 shadow": + !0, + "bg-primary/10 ring-2": e(D), + }) + ), + W(w, 1, `text-base font-semibold ${R ?? ""} flex gap-1.5`), + s(F, e(i).reportedUser.name), + s(X, `#${e(i).reportedUser.id ?? ""}`), + s(Fe, E); + }, + [() => Ct(e(i).reportedUser.id), () => e(U).toLocaleString()] + ), + v(d, p); + } + ); + var Xa = r(Ja, 2); + { + var cs = (d) => { + var i = Jo(), + U = a(i, !0); + t(i), f((D) => s(U, D), [() => $r()]), v(d, i); + }; + h(Xa, (d) => { + !e(Me) && e(De).length === 0 && d(cs); + }); + } + var er = r(Xa, 2), + Lt = a(er); + Lt.__click = [Xo, Vt, q, qe]; + var vs = a(Lt, !0); + t(Lt), t(er), t(_a); + var tr = r(_a, 2), + _s = a(tr); + { + var us = (d) => { + var i = Ve(), + U = ue(i); + Ms( + U, + () => e(Te).id, + (D) => { + const p = ne(() => e(Te)), + $ = ne(() => { + var A; + return ( + ((A = on(e(p).reports, (m) => m.sameIpAccounts ?? 0)) == + null + ? void 0 + : A.sameIpAccounts) ?? 0 + ); + }); + var k = vi(), + w = ue(k), + N = a(w), + F = a(N); + t(N), t(w); + var M = r(w, 2), + X = a(M), + K = a(X); + { + let A = ne(() => e(p).reportedUser.picture ?? void 0); + Et(K, { + class: "size-14", + get userId() { + return e(p).reportedUser.id; + }, + get pictureUrl() { + return e(A); + }, + }); + } + var $e = r(K, 2), + ce = a($e), + ve = a(ce), + Fe = a(ve); + t(ve); + var se = r(ve, 2), + pe = a(se), + R = a(pe, !0); + t(pe); + var E = r(pe, 2), + Pe = a(E); + t(E); + var be = r(E, 2); + be.__click = [ei, p]; + var Ze = a(be); + Ia(Ze, { class: "inline size-4" }), t(be); + var Pt = r(be, 2); + { + var Rt = (A) => { + const m = ne(() => e(p).reportedUser.allianceId); + var G = ai(); + G.__click = [ti, m]; + var _e = a(G), + me = r(_e); + Ia(me, { class: "size-3" }), + t(G), + f( + (ke, Re, fe) => { + W( + G, + 1, + `tooltip badge badge-sm ml-0.5 border-0 ${ + ke ?? "" + } ${Re ?? ""}` + ), + xe(G, "title", fe), + s( + _e, + `${e(p).reportedUser.allianceName ?? "—" ?? ""} ` + ); + }, + [ + () => fn(e(m)), + () => Ct(e(m)), + () => Hs({ allianceId: e(m) }), + ] + ), + v(A, G); + }; + h(Pt, (A) => { + e(p).reportedUser.allianceId != null && A(Rt); + }); + } + t(se); + var ba = r(se, 2); + { + var ma = (A) => { + Ir(A, () => e(p).reportedUser.role); + }; + h(ba, (A) => { + e(p).reportedUser.role !== "user" && A(ma); + }); + } + t(ce); + var zt = r(ce, 2), + mt = a(zt), + ar = a(mt), + rr = r(ar), + bs = a(rr, !0); + t(rr), t(mt); + var sr = r(mt, 2); + { + var ms = (A) => { + var m = ri(), + G = ue(m), + _e = a(G), + me = r(_e), + ke = a(me, !0); + t(me), t(G); + var Re = r(G, 2), + fe = a(Re), + Oe = r(fe), + St = a(Oe, !0); + t(Oe), + t(Re), + f( + (ft, Bt) => { + s(_e, `${ft ?? ""}: `), + s(ke, e(p).reportedUser.timeoutCount ?? 0), + s(fe, `${Bt ?? ""}: `), + s( + St, + gr[e(p).reportedUser.lastTimeoutReason] ?? + e(p).reportedUser.lastTimeoutReason + ); + }, + [() => dn(), () => ln()] + ), + v(A, m); + }; + h(sr, (A) => { + e(p).reportedUser.lastTimeoutReason && A(ms); + }); + } + var fa = r(sr, 2), + nr = a(fa), + or = r(nr), + fs = a(or, !0); + t(or), t(fa); + var ir = r(fa, 2), + dr = a(ir), + xa = r(dr); + let lr; + var xs = a(xa, !0); + t(xa), t(ir), t(zt), t($e), t(X); + var cr = r(X, 4); + jt( + cr, + 21, + () => e(p).reports, + (A) => A.id, + (A, m) => { + const G = ne( + () => + e(m).reportedLatitude != null && + e(m).reportedLongitude != null + ), + _e = ne(() => + e(G) + ? `${Ta.url.origin}/?lat=${ + e(m).reportedLatitude + }&lng=${e(m).reportedLongitude}&select=true${ + e(m).zoom ? `&zoom=${e(m).zoom}` : "" + }` + : null + ); + var me = ci(), + ke = a(me), + Re = a(ke); + t(ke); + var fe = r(ke, 2), + Oe = a(fe); + { + let L = ne(() => e(m).reportedByPicture ?? void 0); + Et(Oe, { + class: "size-14", + get userId() { + return e(m).reportedBy; + }, + get pictureUrl() { + return e(L); + }, + }); + } + var St = r(Oe, 2), + ft = a(St), + Bt = a(ft), + ga = r(Bt), + ha = a(ga), + gs = a(ha, !0); + t(ha); + var vr = r(ha, 2), + hs = a(vr); + t(vr), t(ga), t(ft); + var _r = r(ft, 2), + ya = a(_r), + ur = a(ya), + wa = r(ur), + ys = a(wa, !0); + t(wa), t(ya); + var Ua = r(ya, 2), + pr = a(Ua), + br = r(pr), + ws = a(br, !0); + t(br), t(Ua); + var mr = r(Ua, 2); + { + var Us = (L) => { + var S = si(), + C = a(S), + O = r(C), + Q = a(O); + yr(Q, { class: "inline size-4" }), + Mt(2), + t(O), + t(S), + f( + (ee) => { + s(C, `${ee ?? ""}: `), xe(O, "href", e(_e)); + }, + [() => en()] + ), + v(L, S); + }; + h(mr, (L) => { + e(G) && L(Us); + }); + } + var $s = r(mr, 2); + { + var ks = (L) => { + var S = ni(), + C = a(S), + O = r(C), + Q = a(O); + yr(Q, { class: "inline size-4" }), + Mt(2), + t(O), + t(S), + f( + (ee) => { + s(C, `${ee ?? ""}: `), + xe( + O, + "href", + `${Ta.url.origin}/?lat=${ + e(m).lastPixelLatitude + }&lng=${e(m).lastPixelLongitude}&select=true` + ); + }, + [() => tn()] + ), + v(L, S); + }; + h($s, (L) => { + e(m).lastPixelLatitude != null && + e(m).lastPixelLongitude != null && + L(ks); + }); + } + t(_r), t(St), t(fe); + var fr = r(fe, 2); + { + var Ds = (L) => { + var S = oi(), + C = a(S), + O = a(C, !0); + t(C); + var Q = r(C, 2), + ee = a(Q, !0); + t(Q), + t(S), + f( + (Ge) => { + s(O, Ge), s(ee, e(m).notes); + }, + [() => Ws()] + ), + v(L, S); + }; + h(fr, (L) => { + e(m).notes && L(Ds); + }); + } + var Ts = r(fr, 2); + { + var Is = (L) => { + var S = di(), + C = a(S), + O = a(C); + { + var Q = (Ge) => { + var xr = ii(); + f(() => xe(xr, "src", e(m).imageUrl)), v(Ge, xr); + }; + h(O, (Ge) => { + e(m).imageUrl && Ge(Q); + }); + } + var ee = r(O, 2); + an(ee, { + class: + "absolute left-1/2 top-1/2 size-7 -translate-x-1/2 -translate-y-[87%]", + }), + t(C), + t(S), + f(() => xe(C, "href", e(_e))), + v(L, S); + }, + Ns = (L) => { + var S = Ve(), + C = ue(S); + { + var O = (Q) => { + var ee = li(), + Ge = a(ee); + t(ee), + f(() => xe(Ge, "src", e(m).imageUrl)), + v(Q, ee); + }; + h( + C, + (Q) => { + e(m).imageUrl && Q(O); + }, + !0 + ); + } + v(L, S); + }; + h(Ts, (L) => { + e(_e) ? L(Is) : L(Ns, !1); + }); + } + t(me), + f( + (L, S, C, O, Q, ee) => { + s(Re, `${L ?? ""} #${e(m).id ?? ""}`), + s(Bt, `${S ?? ""}: `), + W(ga, 1, `font-semibold ${C ?? ""}`), + s(gs, e(m).reportedByName), + s(hs, `#${e(m).reportedBy ?? ""}`), + s(ur, `${O ?? ""}: `), + W(wa, 1, `font-bold ${Cs[e(m).reason] ?? ""}`), + s(ys, gr[e(m).reason] ?? e(m).reason), + s(pr, `${Q ?? ""}: `), + s(ws, ee); + }, + [ + () => Ys(), + () => Zs(), + () => Ct(e(m).reportedBy), + () => Js(), + () => Xs(), + () => new Date(e(m).createdAt).toLocaleString(), + ] + ), + v(A, me); + } + ), + t(cr), + t(M), + f( + (A, m, G, _e, me, ke, Re, fe, Oe) => { + xe(N, "title", e(p).id), + s(F, `${A ?? ""}: ${m ?? ""}`), + s(Fe, `${G ?? ""}:`), + W(se, 1, `text-base font-semibold ${_e ?? ""}`), + s(R, e(p).reportedUser.name), + s(Pe, `#${e(p).reportedUser.id ?? ""}`), + xe(be, "title", me), + s(ar, `${ke ?? ""}: `), + s(bs, e(p).reportedUser.reportedCount ?? 0), + s(nr, `${Re ?? ""}: `), + s(fs, e(p).reportedUser.pixelsPainted ?? 0), + s(dr, `${fe ?? ""}: `), + (lr = W(xa, 1, "font-semibold", null, lr, Oe)), + s(xs, e($)); + }, + [ + () => rn(), + () => e(p).id.split("-").at(-1), + () => sn(), + () => Ct(e(p).reportedUser.id), + () => nn({ userId: e(p).reportedUser.id }), + () => wr(), + () => hr(), + () => Ur(), + () => ({ "text-red-600": e($) >= 7 }), + ] + ), + v(D, k); + } + ), + v(d, i); + }, + ps = (d) => { + var i = ui(), + U = a(i); + { + var D = ($) => { + var k = _i(); + v($, k); + }, + p = ($) => { + var k = Se(); + f((w) => s(k, w), [() => $r()]), v($, k); + }; + h(U, ($) => { + e(Me) ? $(D) : $(p, !1); + }); + } + t(i), v(d, i); + }; + h(_s, (d) => { + e(Te) ? d(us) : d(ps, !1); + }); + } + t(tr), + t(Wa), + t(Qa), + f( + ( + d, + i, + U, + D, + p, + $, + k, + w, + N, + F, + M, + X, + K, + $e, + ce, + ve, + Fe, + se, + pe, + R + ) => { + s(te, d), + s(ie, e(l).reported_times), + s(Ie, e(l).timeouts_count), + s(we, i), + s(at, e(l).same_ip_accounts), + s(st, U), + s(He, e(l).pixels_painted), + s(Xt, e(l).droplets), + (Qe.disabled = e(z)), + s(ea, D), + s(Tt, e(l).email), + W( + lt, + 1, + ka(e(l).phone_validated ? "text-success" : "text-error") + ), + s(ta, e(l).phone_validated ? "Validated" : "Not validated"), + W(Ye, 1, ka(e(l).discord ? "text-success" : "text-error")), + s(Nt, e(l).discord ? "Connected" : "Not connected"), + s(T, p), + xe(J, "placeholder", $), + (Ae.disabled = k), + s(Le, w), + s(Hr, N), + s(Kr, ` ${F ?? ""}`), + s(Qr, M), + s(Wr, X), + s(Yr, K), + s(Zr, $e), + s(ts, ce), + W( + ut, + 1, + `tab transition-all ${ + e(q) === "received" + ? "tab-active !bg-primary !text-primary-content !border-primary/60 btn btn-primary btn-sm scale-[1.02] !border !shadow-md" + : "hover:brightness-105" + }` + ), + s(as, ve), + W( + pt, + 1, + `tab transition-all ${ + e(q) === "sent" + ? "tab-active !bg-primary !text-primary-content !border-primary/60 btn btn-primary btn-sm scale-[1.02] !border !shadow-md" + : "hover:brightness-105" + }` + ), + s(rs, Fe), + W( + At, + 1, + `tab transition-all ${ + e(q) === "handled" + ? "tab-active !bg-primary !text-primary-content !border-primary/60 btn btn-primary btn-sm scale-[1.02] !border !shadow-md" + : "hover:brightness-105" + }` + ), + s(ss, se), + (bt.disabled = e(Me)), + xe(bt, "title", pe), + (Lt.disabled = e(Me)), + s(vs, R); + }, + [ + () => wr(), + () => Ur(), + () => hr(), + () => wn(), + () => kn(), + () => Ln(), + () => !e(he).trim(), + () => _n(), + () => Gs(), + () => pn(), + () => zn(), + () => Mn(), + () => Cn(), + () => Gn(), + () => po(), + () => so(), + () => io(), + () => vo(), + () => { + var d; + return ((d = Dr) == null ? void 0 : d()) ?? "Refresh"; + }, + () => { + var d; + return ((d = mn) == null ? void 0 : d()) ?? "Load more"; + }, + ] + ), + Da( + Ne, + () => e(ht), + (d) => _(ht, d) + ), + Da( + J, + () => e(he), + (d) => _(he, d) + ), + v(n, b); + }; + h(Ea, (n) => { + e(l) && n(Gr); + }); + } + var Vr = r(Ea, 2); + { + var qr = (n) => { + { + let b = ne(Pr); + Vs(n, { + get action() { + return e(Gt); + }, + get paintedBy() { + return e(gt); + }, + get image() { + return e(b); + }, + get latLon() { + return Nr; + }, + zoom: Ar, + get open() { + return e(xt); + }, + set open(g) { + _(xt, g, !0); + }, + }); + } + }; + h(Vr, (n) => { + e(gt) && n(qr); + }); + } + t(Kt), + f( + (n, b, g) => { + s(Mr, n), + (Xe.disabled = e(z)), + s(jr, b), + (yt.disabled = e(z)), + s(Er, ` ${g ?? ""}`); + }, + [ + () => (Na == null ? void 0 : Na()) ?? "Search user (ID)", + () => { + var n; + return ((n = bn) == null ? void 0 : n()) ?? "Search"; + }, + () => { + var n; + return ((n = Dr) == null ? void 0 : n()) ?? "Refresh"; + }, + ] + ), + Rs("submit", Wt, (n) => { + n.preventDefault(), za(); + }), + Da( + Ba, + () => e(c), + (n) => _(c, n) + ), + v(u, Kt), + zs(); +} +As(["click", "keydown"]); +export { Oi as component }; diff --git a/frontend-backup/_app/immutable/nodes/12.Dk7Cyr8v.js b/frontend-backup/_app/immutable/nodes/12.Dk7Cyr8v.js deleted file mode 100644 index aa4787c..0000000 --- a/frontend-backup/_app/immutable/nodes/12.Dk7Cyr8v.js +++ /dev/null @@ -1,1566 +0,0 @@ -import "../chunks/B2cHk4HI.js"; -import { at as As, p as Ls, au as B, av as ze, y as Ps, g as e, aw as _, f as x, d as a, s as r, t as f, ax as Rs, b as v, c as zs, $ as Ss, r as t, ay as Ve, a as ue, u as ne, az as Bs, b4 as Se, n as Mt } from "../chunks/BDALf20I.js"; -import { s } from "../chunks/4k6DpCgf.js"; -import { i as h } from "../chunks/Bke_korE.js"; -import { k as Ms } from "../chunks/BCONGQnO.js"; -import { e as jt } from "../chunks/CZW2bcQi.js"; -import { h as js } from "../chunks/BUhRjcOt.js"; -import { r as $a, a as W, c as ka, s as xe } from "../chunks/BNZUboE0.js"; -import { b as Da } from "../chunks/DS58drb5.js"; -import { g as Es } from "../chunks/B4HM4TqG.js"; -import { p as Ta } from "../chunks/C-Y7nmnD.js"; -import { a as ge, t as oe, b as Cs, s as gr, u as Fs } from "../chunks/DffDvEhl.js"; -import { D as Os, p as Gs, R as Vs, c as qs } from "../chunks/fZ59cmjx.js"; -import { P as Et } from "../chunks/DCxPsWiR.js"; -import { C as Ia, c as Hs, G as Ks, T as Qs } from "../chunks/ZzI7cLBE.js"; -import { p as hr, L as yr, d as Ws } from "../chunks/sZ1mzRzK.js"; -import { g as wr, h as Ur, n as $r, a as Ys, b as Zs, c as Js, t as Xs, d as en, l as tn, M as an, e as rn, r as sn, f as nn, m as on, i as dn, j as ln, u as cn, k as vn } from "../chunks/5mOJ66sL.js"; -import { R as kr } from "../chunks/rLj4C5Bn.js"; -import { g as j } from "../chunks/DklPLC_x.js"; -import { r as Dr } from "../chunks/Drv8f_fG.js"; -import { a as _n } from "../chunks/DdJK9GIy.js"; -import { l as un } from "../chunks/BMfwGdZU.js"; -import { n as Tr } from "../chunks/DFzO1c4b.js"; -import { e as pn } from "../chunks/BpEsgMDn.js"; -import { s as bn, l as mn } from "../chunks/6TAPgKgc.js"; -import { g as Ct, a as fn } from "../chunks/ClOhzjRc.js"; -(function () { - try { - var u = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; - u.SENTRY_RELEASE = { id: "35111e7039e8c68cc677344b7f7c6971567f6820" }; - } catch {} -})(); -try { - (function () { - var u = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, - o = new u.Error().stack; - o && ((u._sentryDebugIds = u._sentryDebugIds || {}), (u._sentryDebugIds[o] = "5a255a26-a4ab-45a5-87f0-f9268fbaca16"), (u._sentryDebugIdIdentifier = "sentry-dbid-5a255a26-a4ab-45a5-87f0-f9268fbaca16")); - })(); -} catch {} -const xn = () => "Search user", - gn = () => "Buscar usuário", - Na = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? xn() : gn()), - hn = () => "Verifications", - yn = () => "Verificações", - wn = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? hn() : yn()), - Un = () => "Notes", - $n = () => "Notas", - kn = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? Un() : $n()), - Dn = () => "No notes yet.", - Tn = () => "Sem notas ainda.", - In = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? Dn() : Tn()), - Nn = () => "Add a note...", - An = () => "Adicionar uma nota...", - Ln = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? Nn() : An()), - Pn = () => "Product", - Rn = () => "Produto", - zn = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? Pn() : Rn()), - Sn = () => "Price", - Bn = () => "Preço", - Mn = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? Sn() : Bn()), - jn = () => "Amount", - En = () => "Quantidade", - Cn = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? jn() : En()), - Fn = () => "Date", - On = () => "Data", - Gn = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? Fn() : On()), - Vn = () => "No purchases", - qn = () => "Sem compras", - Hn = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? Vn() : qn()), - Kn = () => "Received reports", - Qn = () => "Reportes recebidos", - Wn = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? Kn() : Qn()), - Yn = () => "Sent reports", - Zn = () => "Reportes enviados", - Jn = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? Yn() : Zn()), - Xn = () => "Handled reports", - eo = () => "Reportes tratados", - to = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? Xn() : eo()), - ao = () => "Received", - ro = () => "Recebidos", - so = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? ao() : ro()), - no = () => "Sent", - oo = () => "Enviados", - io = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? no() : oo()), - lo = () => "Handled", - co = () => "Tratados", - vo = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? lo() : co()), - _o = () => "Associated tickets", - uo = () => "Tickets atrelados", - po = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? _o() : uo()), - bo = () => "Moderator performance", - mo = () => "Desempenho do moderador", - fo = (u = {}, o = {}) => ((o.locale ?? j()) === "en" ? bo() : mo()), - Ir = (u, o = Bs) => { - var c = wo(); - let y; - var z = a(c); - { - var Y = (V) => { - var he = Se("MOD"); - v(V, he); - }, - l = (V) => { - var he = Ve(), - Be = ue(he); - { - var Ft = (P) => { - var q = Se("GM"); - v(P, q); - }, - Ot = (P) => { - var q = Se("ADMIN"); - v(P, q); - }; - h( - Be, - (P) => { - o() === "global_moderator" ? P(Ft) : P(Ot, !1); - }, - !0 - ); - } - v(V, he); - }; - h(z, (V) => { - o() === "moderator" ? V(Y) : V(l, !1); - }); - } - t(c), f((V) => (y = W(c, 1, "badge badge-sm ml-0.5 font-semibold", null, y, V)), [() => ({ "badge-secondary": o() === "moderator" || o() == "global_moderator", "badge-warning": o() === "admin" })]), v(u, c); - }; -function xo(u, o, c, y, z, Y) { - e(o) && (_(c, "timeout"), _(y, z(e(o)), !0), _(Y, !0)); -} -function go(u, o, c, y, z, Y) { - e(o) && (_(c, "ban"), _(y, z(e(o)), !0), _(Y, !0)); -} -async function ho(u, o, c) { - if (e(o)) - try { - _(c, !0), await ge.removeBan(e(o).id), (e(o).ban_reason = null), oe.success("Ban removido"); - } catch (y) { - oe.error((y == null ? void 0 : y.message) ?? "Falha ao remover ban"); - } finally { - _(c, !1); - } -} -async function yo(u, o, c) { - if (e(o)) - try { - _(c, !0), await ge.removeTimeout(e(o).id), (e(o).timeout_until = null), oe.success("Timeout removido"); - } catch (y) { - oe.error((y == null ? void 0 : y.message) ?? "Falha ao remover timeout"); - } finally { - _(c, !1); - } -} -var wo = x(""), - Uo = x('
              '), - $o = x('
              '), - ko = x('
              '), - Do = (u, o, c) => { - var y; - return o(String((y = e(c)) == null ? void 0 : y.id), "User ID copied"); - }, - To = x(' '), - Io = x(' '), - No = x(' '), - Ao = x('OK'), - Lo = x(''), - Po = x(' ', 1), - Ro = x( - '
              Alliance: Role:
              ' - ), - zo = (u, o) => { - u.key === "Enter" && o(); - }, - So = (u, o, c) => o(e(c)), - Bo = x( - '
              ' - ), - Mo = x('
              '), - jo = x(' '), - Eo = x(' '), - Co = x('
              '), - Fo = x( - '
              Closed tickets
              Bans
              Ignored
              Timeouts
              ' - ), - Oo = x('

              '), - Go = async (u, o, c, y) => { - _(o, "received"), c.has("received") || (await y("received", !0)); - }, - Vo = async (u, o, c, y) => { - _(o, "sent"), c.has("sent") || (await y("sent", !0)); - }, - qo = async (u, o, c, y) => { - _(o, "handled"), c.has("handled") || (await y("handled", !0)); - }, - Ho = async (u, o, c) => { - await o(e(c), !0); - }, - Ko = x('
              '), - Qo = (u, o, c) => { - _(o, e(c), !0); - }, - Wo = x(" "), - Yo = x('
              '), - Zo = x(''), - Jo = x('
              '), - Xo = async (u, o, c, y) => { - (o[e(c)] += 1), await y(e(c)); - }, - ei = (u, o) => { - navigator.clipboard.writeText(e(o).reportedUser.id.toString()), oe.success(cn()); - }, - ti = (u, o) => { - navigator.clipboard.writeText(String(e(o))), oe.success(vn()); - }, - ai = x(""), - ri = x(' ', 1), - si = x(' Link'), - ni = x(' Link'), - oi = x('

              '), - ii = x('Report location'), - di = x(''), - li = x('
              Report image
              '), - ci = x( - '
              ' - ), - vi = x( - '

              ', - 1 - ), - _i = x(''), - ui = x('
              '), - pi = x( - '
              Timeouts
              Droplets
              Email:
              Phone:
              Discord:

              ', - 1 - ), - bi = x( - '
              ' - ); -function Oi(u, o) { - Ls(o, !0); - let c = B(""), - y = B(null), - z = B(!1), - Y = B(null), - l = B(null), - V = B(ze([])), - he = B(""), - Be = B(ze([])), - Ft = B(0), - Ot = B(!0), - P = B(null), - q = B("received"); - ze([]), ze([]), ze([]); - let xt = B(!1), - Gt = B("timeout"), - gt = B(null); - const Nr = [-23.551814832869923, -46.63379610146964], - Ar = 1; - let ht = B(""), - Me = B(!1), - De = B(ze([])), - Te = B(void 0), - Vt = ze({ received: 0, sent: 0, handled: 0 }); - const Lr = 20; - let Je = ze(new Set()); - function Aa() { - const n = Number(e(ht)); - if (!Number.isFinite(n) || n === 0) { - oe.error("Enter a number other than zero"); - return; - } - zr(n), _(ht, ""); - } - function Pr() { - const n = ` - - - Action from Admin Panel - - `; - return Promise.resolve(new Blob([n], { type: "image/svg+xml" })); - } - function La(n) { - return { id: n.id, name: n.name ?? `#${n.id}`, picture: n.picture ?? void 0, allianceId: 0, allianceName: "", equippedFlag: 0 }; - } - Ps(() => { - const n = Ta.url.searchParams.get("id"), - b = n ? Number(n) : null; - b !== e(y) && (_(y, b, !0), n && _(c, n, !0)), e(y) != null && !isNaN(e(y)) ? Ra() : (_(l, null), _(Y, null)); - }); - function Pa(n) { - if (!n) return "—"; - const b = new Date(n); - return isNaN(b.getTime()) ? "—" : b.toLocaleString(); - } - function qt(n, b) { - if (!b) return "0.00%"; - const g = (n / b) * 100; - return `${(Math.round(g * 100) / 100).toFixed(2)}%`; - } - function Rr(n, b = "Copied!") { - navigator.clipboard.writeText(n), oe.success(b); - } - function Ht(n) { - if (!n) return !1; - const b = new Date(n).getTime(); - return !isNaN(b) && b > Date.now(); - } - async function qe(n, b = !1) { - if (e(l)) - try { - _(Me, !0), b && ((Vt[n] = 0), _(De, [], !0), _(Te, void 0), Je.delete(n)); - const g = Vt[n], - H = await ge.getUserTickets({ userId: e(l).id, kind: n, page: g, pageSize: Lr }); - _(De, g === 0 ? H : [...e(De), ...H], !0), !e(Te) && e(De).length > 0 && _(Te, e(De)[0], !0), Je.add(n); - } catch (g) { - console.error("Error loading mini moderation", n, g), oe.error((g == null ? void 0 : g.message) ?? "Falha ao carregar tickets"); - } finally { - _(Me, !1); - } - } - async function Ra() { - if (!e(y) || isNaN(e(y))) { - _(l, null), _(Y, null); - return; - } - try { - _(z, !0), _(Y, null); - const n = await ge.getUserInfoFull(e(y)); - if (!n) { - _(l, null), _(Y, "User not found"); - return; - } - n.timeout_until && !Ht(n.timeout_until) && (n.timeout_until = null), _(l, n, !0), Sr(), _(Ft, 0); - try { - const b = await ge.getUserPurchases(n.id); - _( - Be, - b.sort((g, H) => new Date(H.createdAt).getTime() - new Date(g.createdAt).getTime()), - !0 - ); - } catch (b) { - console.error("Error loading purchases", b), _(Be, [], !0), _(Ot, !1); - } - if ((_(P, null), n.role !== "user")) - try { - const b = await ge.getModeratorClosedTicketStats(n.id); - _(P, b, !0); - } catch (b) { - console.error("Moderator stats error", b), _(P, null); - } - await qe("received", !0); - } catch (n) { - _(Y, (n == null ? void 0 : n.message) ?? "Error loading user", !0); - } finally { - _(z, !1); - } - } - async function za() { - const n = Number(e(c).trim()); - if (!n || isNaN(n)) { - oe.error("Enter a valid user ID"); - return; - } - Es(`/admin/users?id=${n}`); - } - async function zr(n) { - e(l) && (await ge.postSetUserDroplets(e(l).id, n), (e(l).droplets = Math.max(0, (e(l).droplets ?? 0) + n)), Sa(`Droplets ${n >= 0 ? "+" : "-"}${Math.abs(n)}, now ${e(l).droplets}`)); - } - async function Sr() { - if (e(l) && e(l)) - try { - const n = await ge.getUserNotes(e(l).id); - _(V, n.notes, !0); - } catch (n) { - console.error("Error loading notes", n), _(V, [], !0); - } - } - async function Sa(n) { - if (!e(l)) return; - const b = n.trim(); - if (b) - try { - _(z, !0), await ge.addUserNote(e(l).id, b), (n = ""), oe.success("Note added"); - try { - const g = await ge.getUserNotes(e(l).id); - _(V, g.notes, !0); - } catch (g) { - console.error("Error reloading notes", g); - } - } catch (g) { - oe.error((g == null ? void 0 : g.message) ?? "Failed to add note"); - } finally { - _(z, !1); - } - } - function Br() { - var ae; - const n = ["id", "product_name", "price", "amount", "createdAt"].join(","), - b = e(Be).map((ie) => [ie.id, ie.product_name, ie.price, ie.amount, ie.createdAt].join(",")), - g = [n, ...b].join(` -`), - H = new Blob([g], { type: "text/csv;charset=utf-8;" }), - Z = URL.createObjectURL(H), - te = document.createElement("a"); - (te.href = Z), (te.download = `purchases_user_${((ae = e(l)) == null ? void 0 : ae.id) ?? "unknown"}.csv`), te.click(), URL.revokeObjectURL(Z); - } - var Kt = bi(); - js((n) => { - Ss.title = "Wplace - Admin - Users"; - }); - var Qt = a(Kt), - Wt = a(Qt), - Yt = a(Wt), - Zt = a(Yt), - Mr = a(Zt, !0); - t(Zt); - var Ba = r(Zt, 2); - $a(Ba), t(Yt); - var Ma = r(Yt, 2), - Xe = a(Ma); - Xe.__click = za; - var jr = a(Xe, !0); - t(Xe); - var yt = r(Xe, 2); - yt.__click = Ra; - var ja = a(yt); - kr(ja, { class: "size-4" }); - var Er = r(ja); - t(yt), t(Ma), t(Wt), t(Qt); - var Jt = r(Qt, 2), - Cr = a(Jt); - { - var Fr = (n) => { - var b = Uo(), - g = r(a(b), 2), - H = a(g, !0); - t(g), - t(b), - f((Z) => s(H, Z), [ - () => { - var Z; - return ((Z = un) == null ? void 0 : Z()) ?? "Loading..."; - }, - ]), - v(n, b); - }, - Or = (n) => { - var b = Ve(), - g = ue(b); - { - var H = (te) => { - var ae = $o(), - ie = a(ae, !0); - t(ae), f(() => s(ie, e(Y))), v(te, ae); - }, - Z = (te) => { - var ae = Ve(), - ie = ue(ae); - { - var et = (Ie) => { - var de = ko(), - ye = a(de, !0); - t(de), - f((we) => s(ye, we), [ - () => { - var we; - return ((we = Tr) == null ? void 0 : we()) ?? "No user selected"; - }, - ]), - v(Ie, de); - }, - wt = (Ie) => { - var de = Ro(), - ye = a(de), - we = a(ye); - { - let T = ne(() => e(l).picture ?? void 0); - Et(we, { - class: "size-16 border", - get userId() { - return e(l).id; - }, - get pictureUrl() { - return e(T); - }, - }); - } - var tt = r(we, 2), - at = a(tt), - je = a(at), - rt = a(je, !0); - t(je); - var st = r(je, 2), - Ut = a(st); - t(st); - var He = r(st, 2); - He.__click = [Do, Rr, l]; - var Ke = a(He); - Ia(Ke, { class: "size-3.5" }); - var $t = r(Ke); - t(He); - var nt = r(He, 2); - { - var Xt = (T) => { - var I = To(), - J = a(I, !0); - t(I), f(() => s(J, e(l).role)), v(T, I); - }; - h(nt, (T) => { - e(l).role !== "user" && T(Xt); - }); - } - t(at); - var ot = r(at, 2), - Ne = a(ot), - Qe = r(a(Ne)), - kt = a(Qe, !0); - t(Qe); - var it = r(Qe, 2); - { - var ea = (T) => { - var I = Se(); - f(() => s(I, `(#${e(l).alliance_id ?? ""})`)), v(T, I); - }; - h(it, (T) => { - e(l).alliance_id && T(ea); - }); - } - t(Ne); - var dt = r(Ne, 4), - We = r(a(dt)), - Dt = a(We, !0); - t(We), t(dt), t(ot), t(tt), t(ye); - var Tt = r(ye, 2), - Ee = a(Tt), - lt = a(Ee); - { - var ta = (T) => { - var I = Io(), - J = a(I); - t(I), f(() => s(J, `BANNED${e(l).ban_reason ? ` (${e(l).ban_reason})` : ""}`)), v(T, I); - }, - It = (T) => { - var I = Ve(), - J = ue(I); - { - var Ae = (le) => { - var re = No(), - Ue = a(re); - t(re), f((_t) => s(Ue, `TIMEOUT until ${_t ?? ""}`), [() => Pa(e(l).timeout_until)]), v(le, re); - }, - Le = (le) => { - var re = Ao(); - v(le, re); - }; - h( - J, - (le) => { - Ht(e(l).timeout_until) ? le(Ae) : le(Le, !1); - }, - !0 - ); - } - v(T, I); - }; - h(lt, (T) => { - e(l).ban_reason ? T(ta) : T(It, !1); - }); - } - t(Ee); - var Ye = r(Ee, 2), - Nt = a(Ye); - { - var ct = (T) => { - var I = Po(), - J = ue(I); - { - var Ae = (re) => { - var Ue = Lo(); - Ue.__click = [xo, l, Gt, gt, La, xt]; - var _t = a(Ue); - Qs(_t, { class: "size-4" }), Mt(), t(Ue), f(() => (Ue.disabled = e(z))), v(re, Ue); - }; - h(J, (re) => { - Ht(e(l).timeout_until) || re(Ae); - }); - } - var Le = r(J, 2); - Le.__click = [go, l, Gt, gt, La, xt]; - var le = a(Le); - Ks(le, { class: "size-4" }), Mt(), t(Le), f(() => (Le.disabled = e(z))), v(T, I); - }; - h(Nt, (T) => { - var I; - ((I = Fs.data) == null ? void 0 : I.id) !== e(l).id && !e(l).ban_reason && T(ct); - }); - } - var Ce = r(Nt, 2); - Ce.__click = [yo, l, z]; - var vt = r(Ce, 2); - (vt.__click = [ho, l, z]), - t(Ye), - t(Tt), - t(de), - f( - (T) => { - s(rt, e(l).name), s(Ut, `#${e(l).id ?? ""}`), s($t, ` ${T ?? ""} ID`), s(kt, e(l).alliance_name ?? "—"), s(Dt, e(l).role), (Ce.disabled = e(z)), (vt.disabled = e(z)); - }, - [() => qs()] - ), - v(Ie, de); - }; - h( - ie, - (Ie) => { - e(l) ? Ie(wt, !1) : Ie(et); - }, - !0 - ); - } - v(te, ae); - }; - h( - g, - (te) => { - e(Y) ? te(H) : te(Z, !1); - }, - !0 - ); - } - v(n, b); - }; - h(Cr, (n) => { - e(z) ? n(Fr) : n(Or, !1); - }); - } - t(Jt); - var Ea = r(Jt, 2); - { - var Gr = (n) => { - var b = pi(), - g = ue(b), - H = a(g), - Z = a(H), - te = a(Z, !0); - t(Z); - var ae = r(Z, 2), - ie = a(ae, !0); - t(ae), t(H); - var et = r(H, 2), - wt = r(a(et), 2), - Ie = a(wt, !0); - t(wt), t(et); - var de = r(et, 2), - ye = a(de), - we = a(ye, !0); - t(ye); - var tt = r(ye, 2), - at = a(tt, !0); - t(tt), t(de); - var je = r(de, 2), - rt = a(je), - st = a(rt, !0); - t(rt); - var Ut = r(rt, 2), - He = a(Ut, !0); - t(Ut), t(je); - var Ke = r(je, 2), - $t = r(a(Ke), 2), - nt = a($t), - Xt = a(nt, !0); - t(nt); - var ot = r(nt, 2), - Ne = a(ot); - $a(Ne), (Ne.__keydown = [zo, Aa]); - var Qe = r(Ne, 2); - (Qe.__click = Aa), t(ot), t($t), t(Ke); - var kt = r(Ke, 2), - it = a(kt), - ea = a(it, !0); - t(it); - var dt = r(it, 2), - We = a(dt), - Dt = r(a(We)), - Tt = a(Dt, !0); - t(Dt), t(We); - var Ee = r(We, 2), - lt = r(a(Ee)), - ta = a(lt, !0); - t(lt), t(Ee); - var It = r(Ee, 2), - Ye = r(a(It)), - Nt = a(Ye, !0); - t(Ye), t(It), t(dt), t(kt), t(g); - var ct = r(g, 2), - Ce = a(ct), - vt = a(Ce), - T = a(vt, !0); - t(vt), t(Ce); - var I = r(Ce, 2), - J = a(I); - $a(J); - var Ae = r(J, 2); - Ae.__click = [So, Sa, he]; - var Le = a(Ae, !0); - t(Ae), t(I); - var le = r(I, 2), - re = a(le); - jt( - re, - 17, - () => e(V), - (d) => `${d.author.id}-${d.createdAt}`, - (d, i) => { - var U = Bo(), - D = a(U), - p = a(D), - $ = a(p), - k = r($), - w = a(k, !0); - t(k), t(p); - var N = r(p, 2), - F = a(N, !0); - t(N), t(D); - var M = r(D, 2), - X = a(M, !0); - t(M), - t(U), - f( - (K) => { - s($, `${e(i).author.name ?? ""} #${e(i).author.id ?? ""} `), s(w, e(i).author.role), s(F, K), s(X, e(i).note); - }, - [() => new Date(e(i).createdAt).toLocaleString()] - ), - v(d, U); - } - ); - var Ue = r(re, 2); - { - var _t = (d) => { - var i = Mo(), - U = a(i, !0); - t(i), f((D) => s(U, D), [() => In()]), v(d, i); - }; - h(Ue, (d) => { - e(V).length === 0 && d(_t); - }); - } - t(le), t(ct); - var aa = r(ct, 2), - ra = a(aa), - sa = a(ra), - Hr = a(sa, !0); - t(sa); - var na = r(sa, 2); - na.__click = Br; - var Ca = a(na); - Os(Ca, { class: "size-4" }); - var Kr = r(Ca); - t(na), t(ra); - var Fa = r(ra, 2), - Oa = a(Fa), - oa = a(Oa), - Ga = a(oa), - ia = a(Ga), - Qr = a(ia, !0); - t(ia); - var da = r(ia), - Wr = a(da, !0); - t(da); - var la = r(da), - Yr = a(la, !0); - t(la); - var Va = r(la), - Zr = a(Va, !0); - t(Va), t(Ga), t(oa); - var qa = r(oa), - Ha = a(qa); - jt( - Ha, - 17, - () => e(Be), - (d) => d.id, - (d, i) => { - var U = jo(), - D = a(U), - p = a(D, !0); - t(D); - var $ = r(D), - k = a($); - t($); - var w = r($), - N = a(w, !0); - t(w); - var F = r(w), - M = a(F, !0); - t(F), - t(U), - f( - (X, K) => { - s(p, e(i).product_name), s(k, `US$ ${X ?? ""}`), s(N, e(i).amount), s(M, K); - }, - [() => (e(i).price / 100).toFixed(2), () => Pa(e(i).createdAt)] - ), - v(d, U); - } - ); - var Jr = r(Ha); - { - var Xr = (d) => { - var i = Eo(), - U = a(i), - D = a(U, !0); - t(U), t(i), f((p) => s(D, p), [() => Hn()]), v(d, i); - }; - h(Jr, (d) => { - e(Be).length === 0 && d(Xr); - }); - } - t(qa), t(Oa), t(Fa), t(aa); - var Ka = r(aa, 2); - { - var es = (d) => { - var i = Oo(), - U = a(i), - D = a(U, !0); - t(U); - var p = r(U, 2); - { - var $ = (w) => { - var N = Co(), - F = a(N, !0); - t(N), f((M) => s(F, M), [() => Tr()]), v(w, N); - }, - k = (w) => { - var N = Fo(), - F = a(N), - M = r(a(F), 2), - X = a(M, !0); - t(M), t(F); - var K = r(F, 2), - $e = r(a(K), 2), - ce = a($e), - ve = r(ce), - Fe = a(ve); - t(ve), t($e), t(K); - var se = r(K, 2), - pe = r(a(se), 2), - R = a(pe), - E = r(R), - Pe = a(E); - t(E), t(pe), t(se); - var be = r(se, 2), - Ze = r(a(be), 2), - Pt = a(Ze), - Rt = r(Pt), - ba = a(Rt); - t(Rt), - t(Ze), - t(be), - t(N), - f( - (ma, zt, mt) => { - s(X, e(P).closedTotal), s(ce, `${e(P).bans ?? ""} `), s(Fe, `(${ma ?? ""})`), s(R, `${e(P).ignored ?? ""} `), s(Pe, `(${zt ?? ""})`), s(Pt, `${e(P).timeouts ?? ""} `), s(ba, `(${mt ?? ""})`); - }, - [() => qt(e(P).bans, e(P).closedTotal), () => qt(e(P).ignored, e(P).closedTotal), () => qt(e(P).timeouts, e(P).closedTotal)] - ), - v(w, N); - }; - h(p, (w) => { - e(P) ? w(k, !1) : w($); - }); - } - t(i), f((w) => s(D, w), [() => fo()]), v(d, i); - }; - h(Ka, (d) => { - e(l).role !== "user" && d(es); - }); - } - var Qa = r(Ka, 2), - ca = a(Qa), - ts = a(ca, !0); - t(ca); - var va = r(ca, 2), - ut = a(va); - ut.__click = [Go, q, Je, qe]; - var as = a(ut, !0); - t(ut); - var pt = r(ut, 2); - pt.__click = [Vo, q, Je, qe]; - var rs = a(pt, !0); - t(pt); - var At = r(pt, 2); - At.__click = [qo, q, Je, qe]; - var ss = a(At, !0); - t(At), t(va); - var Wa = r(va, 2), - _a = a(Wa), - ua = a(_a), - pa = a(ua), - Ya = a(pa), - ns = a(Ya); - { - var os = (d) => { - var i = Se(); - f((U) => s(i, U), [() => Wn()]), v(d, i); - }, - is = (d) => { - var i = Ve(), - U = ue(i); - { - var D = ($) => { - var k = Se(); - f((w) => s(k, w), [() => Jn()]), v($, k); - }, - p = ($) => { - var k = Se(); - f((w) => s(k, w), [() => to()]), v($, k); - }; - h( - U, - ($) => { - e(q) === "sent" ? $(D) : $(p, !1); - }, - !0 - ); - } - v(d, i); - }; - h(ns, (d) => { - e(q) === "received" ? d(os) : d(is, !1); - }); - } - t(Ya), t(pa); - var bt = r(pa, 2); - bt.__click = [Ho, qe, q]; - var ds = a(bt); - kr(ds, { class: "size-4" }), t(bt), t(ua); - var Za = r(ua, 2); - { - var ls = (d) => { - var i = Ko(); - v(d, i); - }; - h(Za, (d) => { - e(Me) && e(De).length === 0 && d(ls); - }); - } - var Ja = r(Za, 2); - jt( - Ja, - 17, - () => e(De), - (d) => d.id, - (d, i) => { - const U = ne(() => new Date(e(i).createdAt)), - D = ne(() => { - var R; - return ((R = e(Te)) == null ? void 0 : R.id) === e(i).id; - }); - var p = Zo(); - p.__click = [Qo, Te, i]; - var $ = a(p); - { - let R = ne(() => e(i).reportedUser.picture ?? void 0); - Et($, { - class: "size-12", - get userId() { - return e(i).reportedUser.id; - }, - get pictureUrl() { - return e(R); - }, - }); - } - var k = r($, 2), - w = a(k), - N = a(w), - F = a(N, !0); - t(N); - var M = r(N, 2), - X = a(M); - t(M); - var K = r(M, 2); - { - var $e = (R) => { - var E = Wo(); - let Pe; - var be = a(E, !0); - t(E), - f( - (Ze) => { - (Pe = W(E, 1, "badge badge-xs font-semibold", null, Pe, Ze)), s(be, e(i).status); - }, - [() => ({ "badge-ghost": e(i).status === "open" || e(i).status === "ignore", "badge-warning": e(i).status === "timeout", "badge-error": e(i).status === "ban" })] - ), - v(R, E); - }; - h(K, (R) => { - e(i).status && R($e); - }); - } - t(w); - var ce = r(w, 2), - ve = a(ce), - Fe = a(ve, !0); - t(ve), t(ce), t(k); - var se = r(k, 2); - { - var pe = (R) => { - var E = Yo(), - Pe = a(E); - Ir(Pe, () => e(i).reportedUser.role), t(E), v(R, E); - }; - h(se, (R) => { - e(i).reportedUser.role !== "user" && R(pe); - }); - } - t(p), - f( - (R, E) => { - W(p, 1, ka({ "bg-base-100 ring-primary relative flex gap-2 rounded-2xl p-3 shadow": !0, "bg-primary/10 ring-2": e(D) })), - W(w, 1, `text-base font-semibold ${R ?? ""} flex gap-1.5`), - s(F, e(i).reportedUser.name), - s(X, `#${e(i).reportedUser.id ?? ""}`), - s(Fe, E); - }, - [() => Ct(e(i).reportedUser.id), () => e(U).toLocaleString()] - ), - v(d, p); - } - ); - var Xa = r(Ja, 2); - { - var cs = (d) => { - var i = Jo(), - U = a(i, !0); - t(i), f((D) => s(U, D), [() => $r()]), v(d, i); - }; - h(Xa, (d) => { - !e(Me) && e(De).length === 0 && d(cs); - }); - } - var er = r(Xa, 2), - Lt = a(er); - Lt.__click = [Xo, Vt, q, qe]; - var vs = a(Lt, !0); - t(Lt), t(er), t(_a); - var tr = r(_a, 2), - _s = a(tr); - { - var us = (d) => { - var i = Ve(), - U = ue(i); - Ms( - U, - () => e(Te).id, - (D) => { - const p = ne(() => e(Te)), - $ = ne(() => { - var A; - return ((A = on(e(p).reports, (m) => m.sameIpAccounts ?? 0)) == null ? void 0 : A.sameIpAccounts) ?? 0; - }); - var k = vi(), - w = ue(k), - N = a(w), - F = a(N); - t(N), t(w); - var M = r(w, 2), - X = a(M), - K = a(X); - { - let A = ne(() => e(p).reportedUser.picture ?? void 0); - Et(K, { - class: "size-14", - get userId() { - return e(p).reportedUser.id; - }, - get pictureUrl() { - return e(A); - }, - }); - } - var $e = r(K, 2), - ce = a($e), - ve = a(ce), - Fe = a(ve); - t(ve); - var se = r(ve, 2), - pe = a(se), - R = a(pe, !0); - t(pe); - var E = r(pe, 2), - Pe = a(E); - t(E); - var be = r(E, 2); - be.__click = [ei, p]; - var Ze = a(be); - Ia(Ze, { class: "inline size-4" }), t(be); - var Pt = r(be, 2); - { - var Rt = (A) => { - const m = ne(() => e(p).reportedUser.allianceId); - var G = ai(); - G.__click = [ti, m]; - var _e = a(G), - me = r(_e); - Ia(me, { class: "size-3" }), - t(G), - f( - (ke, Re, fe) => { - W(G, 1, `tooltip badge badge-sm ml-0.5 border-0 ${ke ?? ""} ${Re ?? ""}`), xe(G, "title", fe), s(_e, `${e(p).reportedUser.allianceName ?? "—" ?? ""} `); - }, - [() => fn(e(m)), () => Ct(e(m)), () => Hs({ allianceId: e(m) })] - ), - v(A, G); - }; - h(Pt, (A) => { - e(p).reportedUser.allianceId != null && A(Rt); - }); - } - t(se); - var ba = r(se, 2); - { - var ma = (A) => { - Ir(A, () => e(p).reportedUser.role); - }; - h(ba, (A) => { - e(p).reportedUser.role !== "user" && A(ma); - }); - } - t(ce); - var zt = r(ce, 2), - mt = a(zt), - ar = a(mt), - rr = r(ar), - bs = a(rr, !0); - t(rr), t(mt); - var sr = r(mt, 2); - { - var ms = (A) => { - var m = ri(), - G = ue(m), - _e = a(G), - me = r(_e), - ke = a(me, !0); - t(me), t(G); - var Re = r(G, 2), - fe = a(Re), - Oe = r(fe), - St = a(Oe, !0); - t(Oe), - t(Re), - f( - (ft, Bt) => { - s(_e, `${ft ?? ""}: `), s(ke, e(p).reportedUser.timeoutCount ?? 0), s(fe, `${Bt ?? ""}: `), s(St, gr[e(p).reportedUser.lastTimeoutReason] ?? e(p).reportedUser.lastTimeoutReason); - }, - [() => dn(), () => ln()] - ), - v(A, m); - }; - h(sr, (A) => { - e(p).reportedUser.lastTimeoutReason && A(ms); - }); - } - var fa = r(sr, 2), - nr = a(fa), - or = r(nr), - fs = a(or, !0); - t(or), t(fa); - var ir = r(fa, 2), - dr = a(ir), - xa = r(dr); - let lr; - var xs = a(xa, !0); - t(xa), t(ir), t(zt), t($e), t(X); - var cr = r(X, 4); - jt( - cr, - 21, - () => e(p).reports, - (A) => A.id, - (A, m) => { - const G = ne(() => e(m).reportedLatitude != null && e(m).reportedLongitude != null), - _e = ne(() => (e(G) ? `${Ta.url.origin}/?lat=${e(m).reportedLatitude}&lng=${e(m).reportedLongitude}&select=true${e(m).zoom ? `&zoom=${e(m).zoom}` : ""}` : null)); - var me = ci(), - ke = a(me), - Re = a(ke); - t(ke); - var fe = r(ke, 2), - Oe = a(fe); - { - let L = ne(() => e(m).reportedByPicture ?? void 0); - Et(Oe, { - class: "size-14", - get userId() { - return e(m).reportedBy; - }, - get pictureUrl() { - return e(L); - }, - }); - } - var St = r(Oe, 2), - ft = a(St), - Bt = a(ft), - ga = r(Bt), - ha = a(ga), - gs = a(ha, !0); - t(ha); - var vr = r(ha, 2), - hs = a(vr); - t(vr), t(ga), t(ft); - var _r = r(ft, 2), - ya = a(_r), - ur = a(ya), - wa = r(ur), - ys = a(wa, !0); - t(wa), t(ya); - var Ua = r(ya, 2), - pr = a(Ua), - br = r(pr), - ws = a(br, !0); - t(br), t(Ua); - var mr = r(Ua, 2); - { - var Us = (L) => { - var S = si(), - C = a(S), - O = r(C), - Q = a(O); - yr(Q, { class: "inline size-4" }), - Mt(2), - t(O), - t(S), - f( - (ee) => { - s(C, `${ee ?? ""}: `), xe(O, "href", e(_e)); - }, - [() => en()] - ), - v(L, S); - }; - h(mr, (L) => { - e(G) && L(Us); - }); - } - var $s = r(mr, 2); - { - var ks = (L) => { - var S = ni(), - C = a(S), - O = r(C), - Q = a(O); - yr(Q, { class: "inline size-4" }), - Mt(2), - t(O), - t(S), - f( - (ee) => { - s(C, `${ee ?? ""}: `), xe(O, "href", `${Ta.url.origin}/?lat=${e(m).lastPixelLatitude}&lng=${e(m).lastPixelLongitude}&select=true`); - }, - [() => tn()] - ), - v(L, S); - }; - h($s, (L) => { - e(m).lastPixelLatitude != null && e(m).lastPixelLongitude != null && L(ks); - }); - } - t(_r), t(St), t(fe); - var fr = r(fe, 2); - { - var Ds = (L) => { - var S = oi(), - C = a(S), - O = a(C, !0); - t(C); - var Q = r(C, 2), - ee = a(Q, !0); - t(Q), - t(S), - f( - (Ge) => { - s(O, Ge), s(ee, e(m).notes); - }, - [() => Ws()] - ), - v(L, S); - }; - h(fr, (L) => { - e(m).notes && L(Ds); - }); - } - var Ts = r(fr, 2); - { - var Is = (L) => { - var S = di(), - C = a(S), - O = a(C); - { - var Q = (Ge) => { - var xr = ii(); - f(() => xe(xr, "src", e(m).imageUrl)), v(Ge, xr); - }; - h(O, (Ge) => { - e(m).imageUrl && Ge(Q); - }); - } - var ee = r(O, 2); - an(ee, { class: "absolute left-1/2 top-1/2 size-7 -translate-x-1/2 -translate-y-[87%]" }), t(C), t(S), f(() => xe(C, "href", e(_e))), v(L, S); - }, - Ns = (L) => { - var S = Ve(), - C = ue(S); - { - var O = (Q) => { - var ee = li(), - Ge = a(ee); - t(ee), f(() => xe(Ge, "src", e(m).imageUrl)), v(Q, ee); - }; - h( - C, - (Q) => { - e(m).imageUrl && Q(O); - }, - !0 - ); - } - v(L, S); - }; - h(Ts, (L) => { - e(_e) ? L(Is) : L(Ns, !1); - }); - } - t(me), - f( - (L, S, C, O, Q, ee) => { - s(Re, `${L ?? ""} #${e(m).id ?? ""}`), - s(Bt, `${S ?? ""}: `), - W(ga, 1, `font-semibold ${C ?? ""}`), - s(gs, e(m).reportedByName), - s(hs, `#${e(m).reportedBy ?? ""}`), - s(ur, `${O ?? ""}: `), - W(wa, 1, `font-bold ${Cs[e(m).reason] ?? ""}`), - s(ys, gr[e(m).reason] ?? e(m).reason), - s(pr, `${Q ?? ""}: `), - s(ws, ee); - }, - [() => Ys(), () => Zs(), () => Ct(e(m).reportedBy), () => Js(), () => Xs(), () => new Date(e(m).createdAt).toLocaleString()] - ), - v(A, me); - } - ), - t(cr), - t(M), - f( - (A, m, G, _e, me, ke, Re, fe, Oe) => { - xe(N, "title", e(p).id), - s(F, `${A ?? ""}: ${m ?? ""}`), - s(Fe, `${G ?? ""}:`), - W(se, 1, `text-base font-semibold ${_e ?? ""}`), - s(R, e(p).reportedUser.name), - s(Pe, `#${e(p).reportedUser.id ?? ""}`), - xe(be, "title", me), - s(ar, `${ke ?? ""}: `), - s(bs, e(p).reportedUser.reportedCount ?? 0), - s(nr, `${Re ?? ""}: `), - s(fs, e(p).reportedUser.pixelsPainted ?? 0), - s(dr, `${fe ?? ""}: `), - (lr = W(xa, 1, "font-semibold", null, lr, Oe)), - s(xs, e($)); - }, - [ - () => rn(), - () => e(p).id.split("-").at(-1), - () => sn(), - () => Ct(e(p).reportedUser.id), - () => nn({ userId: e(p).reportedUser.id }), - () => wr(), - () => hr(), - () => Ur(), - () => ({ "text-red-600": e($) >= 7 }), - ] - ), - v(D, k); - } - ), - v(d, i); - }, - ps = (d) => { - var i = ui(), - U = a(i); - { - var D = ($) => { - var k = _i(); - v($, k); - }, - p = ($) => { - var k = Se(); - f((w) => s(k, w), [() => $r()]), v($, k); - }; - h(U, ($) => { - e(Me) ? $(D) : $(p, !1); - }); - } - t(i), v(d, i); - }; - h(_s, (d) => { - e(Te) ? d(us) : d(ps, !1); - }); - } - t(tr), - t(Wa), - t(Qa), - f( - (d, i, U, D, p, $, k, w, N, F, M, X, K, $e, ce, ve, Fe, se, pe, R) => { - s(te, d), - s(ie, e(l).reported_times), - s(Ie, e(l).timeouts_count), - s(we, i), - s(at, e(l).same_ip_accounts), - s(st, U), - s(He, e(l).pixels_painted), - s(Xt, e(l).droplets), - (Qe.disabled = e(z)), - s(ea, D), - s(Tt, e(l).email), - W(lt, 1, ka(e(l).phone_validated ? "text-success" : "text-error")), - s(ta, e(l).phone_validated ? "Validated" : "Not validated"), - W(Ye, 1, ka(e(l).discord ? "text-success" : "text-error")), - s(Nt, e(l).discord ? "Connected" : "Not connected"), - s(T, p), - xe(J, "placeholder", $), - (Ae.disabled = k), - s(Le, w), - s(Hr, N), - s(Kr, ` ${F ?? ""}`), - s(Qr, M), - s(Wr, X), - s(Yr, K), - s(Zr, $e), - s(ts, ce), - W(ut, 1, `tab transition-all ${e(q) === "received" ? "tab-active !bg-primary !text-primary-content !border-primary/60 btn btn-primary btn-sm scale-[1.02] !border !shadow-md" : "hover:brightness-105"}`), - s(as, ve), - W(pt, 1, `tab transition-all ${e(q) === "sent" ? "tab-active !bg-primary !text-primary-content !border-primary/60 btn btn-primary btn-sm scale-[1.02] !border !shadow-md" : "hover:brightness-105"}`), - s(rs, Fe), - W(At, 1, `tab transition-all ${e(q) === "handled" ? "tab-active !bg-primary !text-primary-content !border-primary/60 btn btn-primary btn-sm scale-[1.02] !border !shadow-md" : "hover:brightness-105"}`), - s(ss, se), - (bt.disabled = e(Me)), - xe(bt, "title", pe), - (Lt.disabled = e(Me)), - s(vs, R); - }, - [ - () => wr(), - () => Ur(), - () => hr(), - () => wn(), - () => kn(), - () => Ln(), - () => !e(he).trim(), - () => _n(), - () => Gs(), - () => pn(), - () => zn(), - () => Mn(), - () => Cn(), - () => Gn(), - () => po(), - () => so(), - () => io(), - () => vo(), - () => { - var d; - return ((d = Dr) == null ? void 0 : d()) ?? "Refresh"; - }, - () => { - var d; - return ((d = mn) == null ? void 0 : d()) ?? "Load more"; - }, - ] - ), - Da( - Ne, - () => e(ht), - (d) => _(ht, d) - ), - Da( - J, - () => e(he), - (d) => _(he, d) - ), - v(n, b); - }; - h(Ea, (n) => { - e(l) && n(Gr); - }); - } - var Vr = r(Ea, 2); - { - var qr = (n) => { - { - let b = ne(Pr); - Vs(n, { - get action() { - return e(Gt); - }, - get paintedBy() { - return e(gt); - }, - get image() { - return e(b); - }, - get latLon() { - return Nr; - }, - zoom: Ar, - get open() { - return e(xt); - }, - set open(g) { - _(xt, g, !0); - }, - }); - } - }; - h(Vr, (n) => { - e(gt) && n(qr); - }); - } - t(Kt), - f( - (n, b, g) => { - s(Mr, n), (Xe.disabled = e(z)), s(jr, b), (yt.disabled = e(z)), s(Er, ` ${g ?? ""}`); - }, - [ - () => (Na == null ? void 0 : Na()) ?? "Search user (ID)", - () => { - var n; - return ((n = bn) == null ? void 0 : n()) ?? "Search"; - }, - () => { - var n; - return ((n = Dr) == null ? void 0 : n()) ?? "Refresh"; - }, - ] - ), - Rs("submit", Wt, (n) => { - n.preventDefault(), za(); - }), - Da( - Ba, - () => e(c), - (n) => _(c, n) - ), - v(u, Kt), - zs(); -} -As(["click", "keydown"]); -export { Oi as component }; diff --git a/frontend-backup/_app/immutable/nodes/13.DbQSn9aq.js b/frontend-backup/_app/immutable/nodes/13.DbQSn9aq.js new file mode 100644 index 0000000..cb2d0b7 --- /dev/null +++ b/frontend-backup/_app/immutable/nodes/13.DbQSn9aq.js @@ -0,0 +1,239 @@ +import "../chunks/Ch2Ub8FX.js"; +import { o as re } from "../chunks/DoL3ojdE.js"; +import { + at as oe, + p as ie, + y as le, + g as t, + au as b, + u as z, + aw as o, + f as _, + b as l, + c as se, + t as w, + $ as ce, + n as ue, + d as s, + r as c, + ay as F, + a as E, + s as Y, +} from "../chunks/CMvZtFtm.js"; +import { s as x } from "../chunks/DVA6u9-7.js"; +import { i as j } from "../chunks/BF50aS-j.js"; +import { h as fe } from "../chunks/P77cUGnY.js"; +import { g as M } from "../chunks/CyB--sFG.js"; +import { p as N } from "../chunks/B6ZK_HZO.js"; +import { c as de, a as P, t as ve } from "../chunks/BRM3t761.js"; +import { L as pe } from "../chunks/Bn0Xcwmn.js"; +import { L as _e } from "../chunks/D3yDgRbd.js"; +import { g as m } from "../chunks/CV9xcpLq.js"; +import { g as me } from "../chunks/BSXXHLQ0.js"; +(function () { + try { + var a = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + a.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var a = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + e = new a.Error().stack; + e && + ((a._sentryDebugIds = a._sentryDebugIds || {}), + (a._sentryDebugIds[e] = "c1586dac-f5e8-440e-b93d-4bbd5586913c"), + (a._sentryDebugIdIdentifier = + "sentry-dbid-c1586dac-f5e8-440e-b93d-4bbd5586913c")); + })(); +} catch {} +const ge = () => "You have been banned from this alliance. You cannot join it.", + be = () => "Você foi banido desta aliança. Você não pode entrar.", + he = (a = {}, e = {}) => ((e.locale ?? m()) === "en" ? ge() : be()), + ye = () => `You are already in an alliance. +Do you want to leave your current alliance to join?`, + we = () => "Você já está em uma aliança. Deseja sair da sua aliança atual?", + xe = (a = {}, e = {}) => ((e.locale ?? m()) === "en" ? ye() : we()), + je = () => "Invalid invite. It might be expired.", + Ie = () => "Convite inválido. Pode estar expirado.", + Le = (a = {}, e = {}) => ((e.locale ?? m()) === "en" ? je() : Ie()), + De = () => "Alliance invite", + Te = () => "Convite de aliança", + ke = (a = {}, e = {}) => ((e.locale ?? m()) === "en" ? De() : Te()), + Ae = () => "Leave", + Ee = () => "Sair", + Ye = (a = {}, e = {}) => ((e.locale ?? m()) === "en" ? Ae() : Ee()), + Ne = () => "No", + Pe = () => "Não", + Se = (a = {}, e = {}) => ((e.locale ?? m()) === "en" ? Ne() : Pe()); +var Ve = _( + ' ', + 1 + ), + Ce = _(''), + Je = async (a, e, i, n) => { + o(e, !0); + try { + await P.leaveAlliance(), o(i, await P.joinAlliance(t(n)), !0); + } catch (h) { + ve.error(h.message); + } finally { + o(e, !1); + } + }, + Re = _( + '' + ), + ze = _(' '), + Fe = _( + '

              ', + 1 + ), + Me = _( + '
              ' + ); +function aa(a, e) { + ie(e, !0); + let i = b(!0), + n = b(void 0), + h = b(!1), + u = b(""), + S = b(!1); + const V = z(() => N.url.searchParams.get("id") ?? ""), + U = z(() => N.url.searchParams.get("new-user")); + re(async () => { + try { + o(n, await P.joinAlliance(t(V)), !0); + } catch (r) { + console.error(r.message), o(u, r.message, !0); + } finally { + o(i, !1); + } + }), + le(() => { + t(n) === "success" + ? t(U) + ? M("/?new-user=1") + : M("/?alliance=1") + : t(n) === "not-logged-in" + ? o(h, !0) + : t(n) === "banned" + ? o(u, he(), !0) + : t(n) === "in-another-alliance" + ? o(u, xe(), !0) + : t(n) === "invalid-invite" + ? o(u, Le(), !0) + : t(n) === "error" && o(u, de(), !0); + }); + var I = Me(); + fe((r) => { + var d = Ve(); + ue(4), w((L) => (ce.title = `FurryPlace - ${L ?? ""}`), [() => ke()]), l(r, d); + }); + var W = s(I); + { + var q = (r) => { + var d = Ce(); + l(r, d); + }, + B = (r) => { + var d = F(), + L = E(d); + { + var G = (v) => { + pe(v, { + get redirect() { + return N.url.pathname; + }, + }); + }, + H = (v) => { + var C = F(), + K = E(C); + { + var O = (D) => { + var J = Fe(), + T = E(J), + R = s(T), + Q = s(R); + _e(Q, { size: "lg", hasText: !0 }), c(R), c(T); + var k = Y(T, 2), + X = s(k, !0); + c(k); + var Z = Y(k, 2); + { + var $ = (p) => { + var f = Re(), + g = s(f), + A = s(g, !0); + c(g); + var y = Y(g, 2); + y.__click = [Je, S, n, V]; + var ae = s(y, !0); + c(y), + c(f), + w( + (te, ne) => { + x(A, te), (y.disabled = t(S)), x(ae, ne); + }, + [() => Se(), () => Ye()] + ), + l(p, f); + }, + ee = (p) => { + var f = ze(), + g = s(f, !0); + c(f), w((A) => x(g, A), [() => me()]), l(p, f); + }; + j(Z, (p) => { + t(n) === "in-another-alliance" ? p($) : p(ee, !1); + }); + } + w(() => x(X, t(u))), l(D, J); + }; + j( + K, + (D) => { + t(u) && D(O); + }, + !0 + ); + } + l(v, C); + }; + j( + L, + (v) => { + t(h) ? v(G) : v(H, !1); + }, + !0 + ); + } + l(r, d); + }; + j(W, (r) => { + t(i) ? r(q) : r(B, !1); + }); + } + c(I), l(a, I), se(); +} +oe(["click"]); +export { aa as component }; diff --git a/frontend-backup/_app/immutable/nodes/13.DsAxPfo7.js b/frontend-backup/_app/immutable/nodes/13.DsAxPfo7.js deleted file mode 100644 index ea039e8..0000000 --- a/frontend-backup/_app/immutable/nodes/13.DsAxPfo7.js +++ /dev/null @@ -1,2 +0,0 @@ -import"../chunks/B2cHk4HI.js";import{o as re}from"../chunks/4WsUhDWi.js";import{at as oe,p as ie,y as le,g as t,au as b,u as z,aw as o,f as _,b as l,c as se,t as w,$ as ce,n as ue,d as s,r as c,ay as F,a as E,s as Y}from"../chunks/BDALf20I.js";import{s as x}from"../chunks/4k6DpCgf.js";import{i as j}from"../chunks/Bke_korE.js";import{h as fe}from"../chunks/BUhRjcOt.js";import{g as M}from"../chunks/B4HM4TqG.js";import{p as N}from"../chunks/C-Y7nmnD.js";import{c as de,a as P,t as ve}from"../chunks/DffDvEhl.js";import{L as pe}from"../chunks/BHr_eBwR.js";import{L as _e}from"../chunks/CYItkO2S.js";import{g as m}from"../chunks/DklPLC_x.js";import{g as me}from"../chunks/BpFpuxGr.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};a.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="e9cc3e94-c5f6-477f-8101-d4d8186f40c2",a._sentryDebugIdIdentifier="sentry-dbid-e9cc3e94-c5f6-477f-8101-d4d8186f40c2")})()}catch{}const ge=()=>"You have been banned from this alliance. You cannot join it.",be=()=>"Você foi banido desta aliança. Você não pode entrar.",he=(a={},e={})=>(e.locale??m())==="en"?ge():be(),ye=()=>`You are already in an alliance. -Do you want to leave your current alliance to join?`,we=()=>"Você já está em uma aliança. Deseja sair da sua aliança atual?",xe=(a={},e={})=>(e.locale??m())==="en"?ye():we(),je=()=>"Invalid invite. It might be expired.",Ie=()=>"Convite inválido. Pode estar expirado.",Le=(a={},e={})=>(e.locale??m())==="en"?je():Ie(),De=()=>"Alliance invite",Te=()=>"Convite de aliança",ke=(a={},e={})=>(e.locale??m())==="en"?De():Te(),Ae=()=>"Leave",Ee=()=>"Sair",Ye=(a={},e={})=>(e.locale??m())==="en"?Ae():Ee(),Ne=()=>"No",Pe=()=>"Não",Se=(a={},e={})=>(e.locale??m())==="en"?Ne():Pe();var Ve=_(' ',1),Ce=_(''),Je=async(a,e,i,n)=>{o(e,!0);try{await P.leaveAlliance(),o(i,await P.joinAlliance(t(n)),!0)}catch(h){ve.error(h.message)}finally{o(e,!1)}},Re=_(''),ze=_(' '),Fe=_('

              ',1),Me=_('
              ');function aa(a,e){ie(e,!0);let i=b(!0),n=b(void 0),h=b(!1),u=b(""),S=b(!1);const V=z(()=>N.url.searchParams.get("id")??""),U=z(()=>N.url.searchParams.get("new-user"));re(async()=>{try{o(n,await P.joinAlliance(t(V)),!0)}catch(r){console.error(r.message),o(u,r.message,!0)}finally{o(i,!1)}}),le(()=>{t(n)==="success"?t(U)?M("/?new-user=1"):M("/?alliance=1"):t(n)==="not-logged-in"?o(h,!0):t(n)==="banned"?o(u,he(),!0):t(n)==="in-another-alliance"?o(u,xe(),!0):t(n)==="invalid-invite"?o(u,Le(),!0):t(n)==="error"&&o(u,de(),!0)});var I=Me();fe(r=>{var d=Ve();ue(4),w(L=>ce.title=`Wplace - ${L??""}`,[()=>ke()]),l(r,d)});var W=s(I);{var q=r=>{var d=Ce();l(r,d)},B=r=>{var d=F(),L=E(d);{var G=v=>{pe(v,{get redirect(){return N.url.pathname}})},H=v=>{var C=F(),K=E(C);{var O=D=>{var J=Fe(),T=E(J),R=s(T),Q=s(R);_e(Q,{size:"lg",hasText:!0}),c(R),c(T);var k=Y(T,2),X=s(k,!0);c(k);var Z=Y(k,2);{var $=p=>{var f=Re(),g=s(f),A=s(g,!0);c(g);var y=Y(g,2);y.__click=[Je,S,n,V];var ae=s(y,!0);c(y),c(f),w((te,ne)=>{x(A,te),y.disabled=t(S),x(ae,ne)},[()=>Se(),()=>Ye()]),l(p,f)},ee=p=>{var f=ze(),g=s(f,!0);c(f),w(A=>x(g,A),[()=>me()]),l(p,f)};j(Z,p=>{t(n)==="in-another-alliance"?p($):p(ee,!1)})}w(()=>x(X,t(u))),l(D,J)};j(K,D=>{t(u)&&D(O)},!0)}l(v,C)};j(L,v=>{t(h)?v(G):v(H,!1)},!0)}l(r,d)};j(W,r=>{t(i)?r(q):r(B,!1)})}c(I),l(a,I),se()}oe(["click"]);export{aa as component}; diff --git a/frontend-backup/_app/immutable/nodes/14.ClqwdR4T.js b/frontend-backup/_app/immutable/nodes/14.ClqwdR4T.js new file mode 100644 index 0000000..269e922 --- /dev/null +++ b/frontend-backup/_app/immutable/nodes/14.ClqwdR4T.js @@ -0,0 +1,1079 @@ +import "../chunks/Ch2Ub8FX.js"; +import { o as as } from "../chunks/DoL3ojdE.js"; +import { + at as ts, + p as ss, + au as B, + av as ta, + f as w, + a as K, + s, + d as t, + t as U, + ax as rs, + b as g, + c as os, + g as e, + aw as b, + $ as ns, + r as a, + u as ae, + az as is, + ay as ia, + n as Ka, + b4 as sa, +} from "../chunks/CMvZtFtm.js"; +import { s as i } from "../chunks/DVA6u9-7.js"; +import { i as $ } from "../chunks/BF50aS-j.js"; +import { a as ls, k as cs } from "../chunks/BBgyHb-Z.js"; +import { e as ra, i as ds } from "../chunks/CXkjfmFU.js"; +import { h as vs } from "../chunks/P77cUGnY.js"; +import { s as Y, a as F, c as _s, d as ps } from "../chunks/C5yqZvKC.js"; +import { b as us } from "../chunks/0wx1llIh.js"; +import { g as fs } from "../chunks/CyB--sFG.js"; +import { p as oa } from "../chunks/B6ZK_HZO.js"; +import { + a as pe, + t as G, + u as ue, + s as q, + b as bs, +} from "../chunks/BRM3t761.js"; +import { P as na } from "../chunks/D3yaN7Zl.js"; +import { A as ms, c as gs } from "../chunks/Dt3xBOvm.js"; +import { T as Qa, C as Va, G as Xa, c as xs } from "../chunks/DLfdYhzo.js"; +import { L as Za, d as hs, p as ys } from "../chunks/BKioTOWR.js"; +import { + r as et, + a as at, + n as ks, + M as ws, + b as $s, + c as Ts, + t as Us, + d as Is, + l as zs, + e as As, + f as Rs, + g as Ls, + h as Cs, + m as Bs, + i as Ds, + j as Ms, + u as Ss, + k as js, +} from "../chunks/DTFgqBF9.js"; +import { R as tt } from "../chunks/m3o6lEf1.js"; +import { g as Te } from "../chunks/CV9xcpLq.js"; +import { r as Ps } from "../chunks/C3E1P42D.js"; +import { t as st, f as Ns } from "../chunks/DBSOMMI_.js"; +import { o as Es } from "../chunks/BpoSU4rb.js"; +import { g as $e, a as Os } from "../chunks/lE0oaQc5.js"; +(function () { + try { + var p = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + p.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var p = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + c = new p.Error().stack; + c && + ((p._sentryDebugIds = p._sentryDebugIds || {}), + (p._sentryDebugIds[c] = "84791c29-68a7-479d-acd2-06e603b3dfe6"), + (p._sentryDebugIdIdentifier = + "sentry-dbid-84791c29-68a7-479d-acd2-06e603b3dfe6")); + })(); +} catch {} +const Gs = () => "Ignore", + Ws = () => "Ignorar", + rt = (p = {}, c = {}) => ((c.locale ?? Te()) === "en" ? Gs() : Ws()), + Ys = () => "Ignore all", + qs = () => "Ignorar todos", + Fs = (p = {}, c = {}) => ((c.locale ?? Te()) === "en" ? Ys() : qs()), + it = () => "Ban", + Hs = it, + ot = (p = {}, c = {}) => ((c.locale ?? Te()) === "en" ? it() : Hs()), + Js = () => "Closed tickets", + Ks = () => "Tickets fechados", + Qs = (p = {}, c = {}) => ((c.locale ?? Te()) === "en" ? Js() : Ks()), + nt = (p, c = is) => { + var d = Vs(); + let u; + var _ = t(d); + { + var Q = (m) => { + var T = sa("MOD"); + g(m, T); + }, + D = (m) => { + var T = ia(), + Ue = K(T); + { + var fe = (R) => { + var V = sa("GM"); + g(R, V); + }, + be = (R) => { + var V = sa("ADMIN"); + g(R, V); + }; + $( + Ue, + (R) => { + c() === "global_moderator" ? R(fe) : R(be, !1); + }, + !0 + ); + } + g(m, T); + }; + $(_, (m) => { + c() === "moderator" ? m(Q) : m(D, !1); + }); + } + a(d), + U( + (m) => (u = F(d, 1, "badge badge-sm ml-0.5 font-semibold", null, u, m)), + [ + () => ({ + "badge-secondary": c() === "moderator" || c() == "global_moderator", + "badge-warning": c() === "admin", + }), + ] + ), + g(p, d); + }; +var Vs = w(""), + Xs = (p, c) => { + c(); + }, + Zs = (p, c, d) => { + b(c, e(d), !0); + }, + er = w('
              '), + ar = w( + '' + ), + tr = async (p, c, d, u) => { + await c(), b(d, e(u)[0], !0); + }, + sr = w( + '

              ', + 1 + ), + rr = w(''), + or = (p, c) => { + navigator.clipboard.writeText(e(c).reportedUser.id.toString()), + G.success(Ss()); + }, + nr = (p, c) => { + navigator.clipboard.writeText(e(c).toString()), G.success(js()); + }, + ir = w(""), + lr = w( + '💰 PAID' + ), + cr = w( + ' ', + 1 + ), + dr = (p, c, d) => { + c(e(d).id); + }, + vr = w(''), + _r = (p, c, d, u) => { + c(e(d).id, e(u).id); + }, + pr = (p, c, d, u) => { + c(e(d).id, e(u)); + }, + ur = (p, c, d, u) => { + c(e(d).id, e(u)); + }, + fr = w(''), + br = w(""), + mr = w( + '

              ' + ), + gr = (p, c, d, u, _, Q, D, m) => { + b(c, e(d)), b(u, e(_), !0), b(Q, e(D), !0), e(m).showModal(); + }, + xr = w( + '' + ), + hr = w( + '

              :
              ', + 1 + ), + yr = async (p, c, d, u, _) => { + await c(e(d).id, e(u).id), e(_).close(); + }, + kr = async (p, c, d, u, _) => { + await c(e(d).id, e(u)), e(_).close(); + }, + wr = async (p, c, d, u, _) => { + await c(e(d).id, e(u)), e(_).close(); + }, + $r = w(''), + Tr = w( + '' + ), + Ur = w( + '




              ', + 1 + ); +function Vr(p, c) { + ss(c, !0); + let d = B(!0), + u = B(!1), + _ = B(ta([])), + Q = B(void 0), + D = B( + ta({ + closedTotal: 0, + bans: 0, + ignored: 0, + timeouts: 0, + rclosedTotal: 0, + rignored: 0, + rtimeouts: 0, + rbans: 0, + }) + ), + m = B(void 0), + T = B(ta({})); + const Ue = [ + { value: "griefing", label: q.griefing }, + { value: "inappropriate-content", label: q["inappropriate-content"] }, + { value: "hate-speech", label: q["hate-speech"] }, + { value: "doxxing", label: q.doxxing }, + { value: "multi-accounting", label: q["multi-accounting"] }, + { value: "bot", label: q.bot }, + { value: "other", label: q.other }, + ]; + as(() => { + fe(); + }); + async function fe() { + await be(), e(_).length <= 1 && (await R()), e(m) || b(m, e(_)[0], !0); + } + async function be() { + try { + b(d, !0); + const n = await pe.getModeratorTickets(); + b(_, n.tickets, !0), V(); + try { + b(D, await pe.countMyTicketsClosedToday(), !0); + } catch (r) { + return ( + G.error(r.message), + { + closedTotal: 0, + ignored: 0, + timeouts: 0, + bans: 0, + rclosedTotal: 0, + rignored: 0, + rtimeouts: 0, + rbans: 0, + } + ); + } + b(T, {}, !0); + for (const r of e(_)) + for (const v of r.reports) e(T)[v.id] = v.assignedReason ?? v.reason; + } catch (n) { + n.status === 403 || n.status === 401 ? fs("/404") : G.error(n.message); + } finally { + b(d, !1); + } + } + async function R() { + try { + b(d, !0); + const { newTicketsIds: n } = await pe.assignNewTickets(); + n.length > 0 && (await be()), await V(); + } catch (n) { + G.error(n.message); + } finally { + b(d, !1); + } + } + async function V() { + try { + b(Q, await pe.getNonPaidUserOpenTicketsCount(), !0); + } catch (n) { + G.error(n.message); + } + } + async function me(n, r, v, x) { + try { + b(u, !0), + await pe.setTicketStatus(n, r, v, x), + r !== "open" && + !(r === "ignore" && v) && + (b( + _, + e(_).filter((o) => o.id !== n), + !0 + ), + e(_).length <= 1 && (await R()), + b(m, e(_)[0], !0)); + } catch (o) { + G.error(o.message); + } finally { + b(u, !1); + } + } + function lt(n) { + return me(n, "ignore", 0, "other") + .then(() => { + b( + _, + e(_).filter((r) => r.id !== n), + !0 + ), + b(m, e(_)[0], !0), + e(_).length <= 1 && R(); + }) + .catch((r) => { + G.error(r.message); + }); + } + function la(n, r) { + return me(n, "ignore", r, e(T)[r] ?? "other") + .then(() => { + const v = e(_).findIndex((o) => o.id === n); + if (v === -1) return; + const x = e(_)[v]; + if ( + ((x.reports = x.reports.filter((o) => o.id !== r)), + delete e(T)[r], + x.reports.length === 0) + ) { + b( + _, + e(_).filter((o) => o.id !== n), + !0 + ), + b(m, e(_)[0], !0), + e(_).length <= 1 && R(); + return; + } + b(m, { ...x }, !0); + }) + .catch((v) => { + G.error(v.message); + }); + } + function ca(n, r) { + const v = e(T)[r.id] ?? r.assignedReason ?? r.reason; + return me(n, "timeout", r.id, v); + } + function da(n, r) { + const v = e(T)[r.id] ?? r.assignedReason ?? r.reason; + return me(n, "ban", r.id, v); + } + let X = B(null), + ge = B(""), + te = B(void 0), + Z = B(void 0); + var va = Ur(); + vs((n) => { + ns.title = "FurryPlace - Moderation"; + }); + var Ie = K(va), + ze = t(Ie), + Ae = t(ze), + Re = t(Ae), + xe = t(Re), + ct = t(xe); + ms(ct, { class: "size-5" }), a(xe); + var _a = s(xe, 2), + Le = t(_a), + dt = t(Le, !0); + a(Le); + var Ce = s(Le, 2), + vt = t(Ce); + a(Ce); + var pa = s(Ce, 2), + Be = t(pa), + ua = t(Be), + fa = s(ua, 2), + ba = s(fa, 2), + _t = s(ba, 2); + a(Be); + var pt = s(Be); + a(pa), a(_a), a(Re); + var he = s(Re, 2); + he.__click = [Xs, fe]; + var ut = t(he); + tt(ut, { class: "size-4" }), a(he), a(Ae); + var ma = s(Ae, 2); + ra( + ma, + 25, + () => e(_), + (n) => n.id, + (n, r) => { + const v = ae(() => new Date(e(r).createdAt)), + x = ae(() => { + var S; + return ((S = e(m)) == null ? void 0 : S.id) === e(r).id; + }); + var o = ar(); + o.__click = [Zs, m, r]; + var L = t(o); + na(L, { + class: "size-13", + get userId() { + return e(r).reportedUser.id; + }, + get pictureUrl() { + return e(r).reportedUser.picture; + }, + }); + var M = s(L, 2), + I = t(M), + N = t(I), + je = t(N, !0); + a(N); + var oe = s(N, 2), + ne = t(oe); + a(oe), a(I); + var ie = s(I, 2), + le = t(ie, !0); + a(ie), a(M); + var ce = s(M, 2); + { + var de = (S) => { + var j = er(), + ve = t(j); + nt(ve, () => e(r).reportedUser.role), a(j), g(S, j); + }; + $(ce, (S) => { + e(r).reportedUser.role !== "user" && S(de); + }); + } + a(o), + U( + (S, j) => { + F( + o, + 1, + _s({ + "bg-base-100 ring-primary relative flex gap-2 rounded-2xl p-4 shadow": + !0, + "bg-primary/10 ring-2": e(x), + }) + ), + F(I, 1, `text-lg font-semibold ${S ?? ""} flex gap-1.5`), + i(je, e(r).reportedUser.name), + i(ne, `#${e(r).reportedUser.id ?? ""}`), + i(le, j); + }, + [() => $e(e(r).reportedUser.id), () => e(v).toLocaleString()] + ), + ls( + o, + () => Ns, + () => ({ duration: 250 }) + ), + g(n, o); + } + ); + var ga = s(ma, 2), + ft = t(ga); + { + var bt = (n) => { + var r = sr(), + v = K(r), + x = t(v, !0); + a(v); + var o = s(v, 2); + o.__click = [tr, R, m, _]; + var L = t(o); + tt(L, { class: "size-5" }); + var M = s(L); + a(o), + U( + (I, N) => { + i(x, I), i(M, ` ${N ?? ""}`); + }, + [() => ks(), () => Ps()] + ), + g(n, r); + }, + mt = (n) => { + var r = ia(), + v = K(r); + { + var x = (o) => { + var L = rr(); + g(o, L); + }; + $( + v, + (o) => { + e(d) && e(_).length === 0 && o(x); + }, + !0 + ); + } + g(n, r); + }; + $(ft, (n) => { + !e(d) && e(_).length === 0 ? n(bt) : n(mt, !1); + }); + } + a(ga), a(ze); + var xa = s(ze, 2), + gt = t(xa); + { + var xt = (n) => { + var r = ia(), + v = K(r); + cs( + v, + () => e(m).id, + (x) => { + const o = ae(() => e(m)), + L = ae(() => { + var f; + return (f = Bs(e(o).reports, (l) => l.sameIpAccounts)) == null + ? void 0 + : f.sameIpAccounts; + }); + var M = hr(), + I = K(M), + N = t(I), + je = t(N); + a(N), a(I); + var oe = s(I, 2), + ne = t(oe), + ie = t(ne); + na(ie, { + class: "size-15", + get userId() { + return e(o).reportedUser.id; + }, + get pictureUrl() { + return e(o).reportedUser.picture; + }, + }); + var le = s(ie, 2), + ce = t(le), + de = t(ce), + S = t(de, !0); + a(de); + var j = s(de, 2), + ve = t(j), + zt = t(ve, !0); + a(ve); + var Pe = s(ve, 2), + At = t(Pe); + a(Pe); + var _e = s(Pe, 2); + _e.__click = [or, o]; + var Rt = t(_e); + Va(Rt, { class: "inline size-4" }), a(_e); + var Ta = s(_e, 2); + { + var Lt = (f) => { + const l = ae(() => e(o).reportedUser.allianceId); + var y = ir(); + y.__click = [nr, l]; + var z = t(y), + P = s(z); + Va(P, { class: "size-3" }), + a(y), + U( + (W, E, C) => { + F( + y, + 1, + `tooltip badge badge-sm ml-0.5 border-0 ${W ?? ""} ${ + E ?? "" + }` + ), + Y(y, "title", C), + i(z, `${e(o).reportedUser.allianceName ?? ""} `); + }, + [ + () => Os(e(l)), + () => $e(e(l)), + () => xs({ allianceId: e(l) }), + ] + ), + g(f, y); + }; + $(Ta, (f) => { + e(o).reportedUser.allianceId && f(Lt); + }); + } + var Ct = s(Ta, 2); + { + var Bt = (f) => { + var l = lr(); + g(f, l); + }; + $(Ct, (f) => { + e(o).reportedUser.paid && f(Bt); + }); + } + a(j); + var Dt = s(j, 2); + { + var Mt = (f) => { + nt(f, () => e(o).reportedUser.role); + }; + $(Dt, (f) => { + e(o).reportedUser.role !== "user" && f(Mt); + }); + } + a(ce); + var Ua = s(ce, 2), + Ne = t(Ua), + Ia = t(Ne), + za = s(Ia), + St = t(za, !0); + a(za), a(Ne); + var Aa = s(Ne, 2); + { + var jt = (f) => { + var l = cr(), + y = K(l), + z = t(y), + P = s(z), + W = t(P, !0); + a(P), a(y); + var E = s(y, 2), + C = t(E), + ee = s(C), + H = t(ee, !0); + a(ee), + a(E), + U( + (ke, Ge) => { + i(z, `${ke ?? ""}: `), + i(W, e(o).reportedUser.timeoutCount), + i(C, `${Ge ?? ""}: `), + i( + H, + q[e(o).reportedUser.lastTimeoutReason] ?? + e(o).reportedUser.lastTimeoutReason + ); + }, + [() => Ds(), () => Ms()] + ), + g(f, l); + }; + $(Aa, (f) => { + e(o).reportedUser.lastTimeoutReason && f(jt); + }); + } + var Ee = s(Aa, 2), + Ra = t(Ee), + La = s(Ra), + Pt = t(La, !0); + a(La), a(Ee); + var Ca = s(Ee, 2), + Ba = t(Ca), + Oe = s(Ba); + let Da; + var Nt = t(Oe, !0); + a(Oe), a(Ca), a(Ua), a(le); + var Et = s(le, 2); + { + var Ot = (f) => { + var l = vr(); + l.__click = [dr, lt, o]; + var y = t(l, !0); + a(l), + U( + (z) => { + (l.disabled = e(u)), i(y, z); + }, + [() => Fs()] + ), + g(f, l); + }; + $(Et, (f) => { + var l; + ((l = ue.data) == null ? void 0 : l.role) === "admin" && f(Ot); + }); + } + a(ne); + var Ma = s(ne, 4); + ra( + Ma, + 21, + () => e(o).reports, + (f) => f.id, + (f, l) => { + const y = ae( + () => + `${oa.url.origin}/?lat=${e(l).reportedLatitude}&lng=${ + e(l).reportedLongitude + }&select=true${e(l).zoom ? `&zoom=${e(l).zoom}` : ""}` + ); + var z = xr(), + P = t(z), + W = t(P), + E = s(W), + C = t(E); + C.__click = [_r, la, o, l]; + var ee = t(C, !0); + a(C); + var H = s(C, 2); + H.__click = [pr, ca, o, l]; + var ke = t(H); + Qa(ke, { class: "size-5" }); + var Ge = s(ke); + a(H); + var Gt = s(H, 2); + { + var Wt = (A) => { + var h = fr(); + h.__click = [ur, da, o, l]; + var k = t(h); + Xa(k, { class: "size-5" }); + var J = s(k); + a(h), + U( + (O) => { + (h.disabled = e(u)), i(J, ` ${O ?? ""}`); + }, + [() => ot()] + ), + g(A, h); + }; + $(Gt, (A) => { + var h, k; + (((h = ue.data) == null ? void 0 : h.role) === "admin" || + ((k = ue.data) == null ? void 0 : k.role) === + "global_moderator") && + A(Wt); + }); + } + a(E), a(P); + var We = s(P, 2), + Sa = t(We); + na(Sa, { + class: "size-15", + get userId() { + return e(l).reportedBy; + }, + get pictureUrl() { + return e(l).reportedByPicture; + }, + }); + var ja = s(Sa, 2), + Ye = t(ja), + Pa = t(Ye), + qe = s(Pa), + Fe = t(qe), + Yt = t(Fe, !0); + a(Fe); + var Na = s(Fe, 2), + qt = t(Na); + a(Na), a(qe), a(Ye); + var Ea = s(Ye, 2), + He = t(Ea), + Je = t(He), + Ft = t(Je); + a(Je); + var we = s(Je, 2); + ra( + we, + 21, + () => Ue, + ds, + (A, h) => { + var k = br(), + J = t(k, !0); + a(k); + var O = {}; + U(() => { + i(J, e(h).label), + O !== (O = e(h).value) && + (k.value = (k.__value = e(h).value) ?? ""); + }), + g(A, k); + } + ), + a(we), + a(He); + var Ke = s(He, 2), + Oa = t(Ke), + Ga = s(Oa), + Ht = t(Ga, !0); + a(Ga), a(Ke); + var Qe = s(Ke, 2), + Wa = t(Qe), + Ve = s(Wa), + Jt = t(Ve); + Za(Jt, { class: "inline size-4" }), Ka(2), a(Ve), a(Qe); + var Ya = s(Qe, 2), + qa = t(Ya), + Xe = s(qa), + Kt = t(Xe); + Za(Kt, { class: "inline size-4" }), + Ka(2), + a(Xe), + a(Ya), + a(Ea), + a(ja), + a(We); + var Fa = s(We, 2); + { + var Qt = (A) => { + var h = mr(), + k = t(h), + J = t(k, !0); + a(k); + var O = s(k, 2), + ea = t(O, !0); + a(O), + a(h), + U( + (aa) => { + i(J, aa), i(ea, e(l).notes); + }, + [() => hs()] + ), + g(A, h); + }; + $(Fa, (A) => { + e(l).notes && A(Qt); + }); + } + var Ha = s(Fa, 2), + Ze = t(Ha); + Ze.__click = [gr, ge, y, te, o, Z, l, X]; + var Ja = t(Ze), + Vt = s(Ja, 2); + ws(Vt, { + class: + "absolute left-1/2 top-1/2 size-7 -translate-x-1/2 -translate-y-[87%]", + }), + a(Ze), + a(Ha), + a(z), + U( + (A, h, k, J, O, ea, aa, Xt, Zt, es) => { + i(W, `${A ?? ""} #${e(l).id ?? ""} `), + (C.disabled = e(u)), + i(ee, h), + (H.disabled = e(u)), + i(Ge, ` ${k ?? ""}`), + i(Pa, `${J ?? ""}: `), + F(qe, 1, `font-semibold ${O ?? ""}`), + i(Yt, e(l).reportedByName), + i(qt, `#${e(l).reportedBy ?? ""}`), + i(Ft, `${ea ?? ""}:`), + F( + we, + 1, + `select select-bordered select-sm font-semibold ${ + bs[e(T)[e(l).id]] ?? "" + }` + ), + i(Oa, `${aa ?? ""}: `), + i(Ht, Xt), + i(Wa, `${Zt ?? ""}: `), + Y(Ve, "href", e(y)), + i(qa, `${es ?? ""}: `), + Y( + Xe, + "href", + `${oa.url.origin ?? ""}/?lat=${ + e(l).lastPixelLatitude ?? "" + }&lng=${e(l).lastPixelLongitude ?? ""}&select=true` + ), + Y(Ja, "src", e(l).imageUrl); + }, + [ + () => at(), + () => rt(), + () => st(), + () => $s(), + () => $e(e(l).reportedBy), + () => Ts(), + () => Us(), + () => new Date(e(l).createdAt).toLocaleString(), + () => Is(), + () => zs(), + ] + ), + ps( + we, + () => e(T)[e(l).id], + (A) => (e(T)[e(l).id] = A) + ), + g(f, z); + } + ), + a(Ma), + a(oe), + U( + (f, l, y, z, P, W, E, C, ee) => { + Y(N, "title", e(o).id), + i(je, `${f ?? ""}: ${l ?? ""}`), + i(S, y), + F(j, 1, `text-lg font-semibold ${z ?? ""}`), + i(zt, e(o).reportedUser.name), + i(At, `#${e(o).reportedUser.id ?? ""}`), + Y(_e, "title", P), + i(Ia, `${W ?? ""}: `), + i(St, e(o).reportedUser.reportedCount), + i(Ra, `${E ?? ""}: `), + i(Pt, e(o).reportedUser.pixelsPainted), + i(Ba, `${C ?? ""}: `), + (Da = F(Oe, 1, "font-semibold", null, Da, ee)), + i(Nt, e(L)); + }, + [ + () => As(), + () => e(o).id.split("-").at(-1), + () => et(), + () => $e(e(o).reportedUser.id), + () => Rs({ userId: e(o).reportedUser.id }), + () => Ls(), + () => ys(), + () => Cs(), + () => ({ "text-red-600": e(L) >= 7 }), + ] + ), + g(x, M); + } + ), + g(n, r); + }; + $(gt, (n) => { + e(m) && n(xt); + }); + } + a(xa), a(Ie); + var ye = s(Ie, 2), + De = t(ye), + ha = s(t(De), 2), + Me = t(ha), + Se = t(Me), + ht = t(Se); + a(Se); + var ya = s(Se, 2), + se = t(ya); + se.__click = [yr, la, te, Z, X]; + var yt = t(se, !0); + a(se); + var re = s(se, 2); + re.__click = [kr, ca, te, Z, X]; + var ka = t(re); + Qa(ka, { class: "size-5" }); + var kt = s(ka); + a(re); + var wt = s(re, 2); + { + var $t = (n) => { + var r = $r(); + r.__click = [wr, da, te, Z, X]; + var v = t(r); + Xa(v, { class: "size-5" }); + var x = s(v); + a(r), + U( + (o) => { + (r.disabled = e(u)), i(x, ` ${o ?? ""}`); + }, + [() => ot()] + ), + g(n, r); + }; + $(wt, (n) => { + var r, v; + (((r = ue.data) == null ? void 0 : r.role) === "admin" || + ((v = ue.data) == null ? void 0 : v.role) === "global_moderator") && + n($t); + }); + } + a(ya), a(Me); + var Tt = s(Me, 2); + { + var Ut = (n) => { + var r = Tr(); + U(() => Y(r, "src", e(ge))), g(n, r); + }; + $(Tt, (n) => { + e(ge) && n(Ut); + }); + } + a(ha), a(De); + var wa = s(De, 2), + $a = t(wa), + It = t($a, !0); + a($a), + a(wa), + a(ye), + us( + ye, + (n) => b(X, n), + () => e(X) + ), + U( + (n, r, v, x, o, L, M) => { + var I; + Y(xe, "href", oa.url.origin), + i(dt, n), + i(vt, `${r ?? ""}: ${e(Q) ?? "" ?? ""}`), + i(ua, `Closed reports: ${e(D).rclosedTotal ?? ""}`), + i(fa, ` Ignored: ${e(D).ignored ?? ""}`), + i(ba, ` Timeouts: ${e(D).timeouts ?? ""}`), + i(_t, ` Bans: ${e(D).bans ?? ""}`), + i(pt, ` ${v ?? ""}: ${e(D).closedTotal ?? ""}`), + (he.disabled = e(d)), + i(ht, `${x ?? ""} #${((I = e(Z)) == null ? void 0 : I.id) ?? ""}`), + (se.disabled = e(u)), + i(yt, o), + (re.disabled = e(u)), + i(kt, ` ${L ?? ""}`), + i(It, M); + }, + [ + () => et(), + () => Es(), + () => Qs(), + () => at(), + () => rt(), + () => st(), + () => gs(), + ] + ), + rs("close", ye, () => { + b(ge, ""), b(te, void 0), b(Z, void 0); + }), + g(p, va), + os(); +} +ts(["click"]); +export { Vr as component }; diff --git a/frontend-backup/_app/immutable/nodes/14.TE67n0On.js b/frontend-backup/_app/immutable/nodes/14.TE67n0On.js deleted file mode 100644 index da03222..0000000 --- a/frontend-backup/_app/immutable/nodes/14.TE67n0On.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/B2cHk4HI.js";import{o as Rt}from"../chunks/4WsUhDWi.js";import{at as Lt,p as Ct,au as Q,av as be,f as w,s,t as U,b,c as Bt,g as e,aw as x,$ as St,d as t,r as a,u as X,az as Mt,a as Z,ay as Ze,n as qe,b4 as Fe}from"../chunks/BDALf20I.js";import{s as l}from"../chunks/4k6DpCgf.js";import{i as T}from"../chunks/Bke_korE.js";import{a as Dt,k as Pt}from"../chunks/BCONGQnO.js";import{e as He,i as jt}from"../chunks/CZW2bcQi.js";import{h as Nt}from"../chunks/BUhRjcOt.js";import{s as G,a as H,c as Et,d as Ot}from"../chunks/BNZUboE0.js";import{g as Gt}from"../chunks/B4HM4TqG.js";import{p as Je}from"../chunks/C-Y7nmnD.js";import{a as le,t as W,u as Ke,s as F,b as Wt}from"../chunks/DffDvEhl.js";import{P as Qe}from"../chunks/DCxPsWiR.js";import{A as Vt}from"../chunks/CVCd3urP.js";import{C as Ba,T as Yt,G as qt,c as Ft}from"../chunks/ZzI7cLBE.js";import{L as Xe,d as Ht,p as Jt}from"../chunks/sZ1mzRzK.js";import{r as Sa,n as Kt,M as Qt,a as Xt,b as Zt,c as es,t as as,d as ts,l as ss,e as rs,f as ns,g as os,h as is,m as ls,i as cs,j as ds,u as vs,k as _s}from"../chunks/5mOJ66sL.js";import{R as Ma}from"../chunks/rLj4C5Bn.js";import{g as xe}from"../chunks/DklPLC_x.js";import{r as ps}from"../chunks/Drv8f_fG.js";import{t as us,f as fs}from"../chunks/DS5O-Inb.js";import{o as ms}from"../chunks/GVP1MJz5.js";import{g as ge,a as bs}from"../chunks/ClOhzjRc.js";(function(){try{var p=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};p.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var p=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},c=new p.Error().stack;c&&(p._sentryDebugIds=p._sentryDebugIds||{},p._sentryDebugIds[c]="e37f7fef-8481-48d3-ae18-a18771d129a0",p._sentryDebugIdIdentifier="sentry-dbid-e37f7fef-8481-48d3-ae18-a18771d129a0")})()}catch{}const gs=()=>"Ignore",xs=()=>"Ignorar",hs=(p={},c={})=>(c.locale??xe())==="en"?gs():xs(),ys=()=>"Ignore all",ks=()=>"Ignorar todos",ws=(p={},c={})=>(c.locale??xe())==="en"?ys():ks(),Pa=()=>"Ban",$s=Pa,Ts=(p={},c={})=>(c.locale??xe())==="en"?Pa():$s(),Us=()=>"Closed tickets",Is=()=>"Tickets fechados",zs=(p={},c={})=>(c.locale??xe())==="en"?Us():Is(),Da=(p,c=Mt)=>{var d=As();let k;var f=t(d);{var ce=g=>{var Y=Fe("MOD");b(g,Y)},V=g=>{var Y=Ze(),I=Z(Y);{var he=M=>{var D=Fe("GM");b(M,D)},de=M=>{var D=Fe("ADMIN");b(M,D)};T(I,M=>{c()==="global_moderator"?M(he):M(de,!1)},!0)}b(g,Y)};T(f,g=>{c()==="moderator"?g(ce):g(V,!1)})}a(d),U(g=>k=H(d,1,"badge badge-sm ml-0.5 font-semibold",null,k,g),[()=>({"badge-secondary":c()==="moderator"||c()=="global_moderator","badge-warning":c()==="admin"})]),b(p,d)};var As=w(""),Rs=(p,c)=>{c()},Ls=(p,c,d)=>{x(c,e(d),!0)},Cs=w('
              '),Bs=w(''),Ss=async(p,c,d,k)=>{await c(),x(d,e(k)[0],!0)},Ms=w('

              ',1),Ds=w(''),Ps=(p,c)=>{navigator.clipboard.writeText(e(c).reportedUser.id.toString()),W.success(vs())},js=(p,c)=>{navigator.clipboard.writeText(e(c).toString()),W.success(_s())},Ns=w(""),Es=w('💰 PAID'),Os=w(' ',1),Gs=(p,c,d)=>{c(e(d).id)},Ws=w(''),Vs=(p,c,d,k)=>{c(e(d).id,e(k).id)},Ys=(p,c,d,k)=>{c(e(d).id,e(k))},qs=(p,c,d,k)=>{c(e(d).id,e(k))},Fs=w(''),Hs=w(""),Js=w('

              '),Ks=w(''),Qs=(p,c,d)=>{c[e(d).id]={showIframe:!0}},Xs=w(''),Zs=w(''),er=w('

              :
              ',1),ar=w('




              ');function Tr(p,c){Ct(c,!0);let d=Q(!0),k=Q(!1),f=Q(be([])),ce=Q(void 0),V=Q(be({closedTotal:0,bans:0,ignored:0,timeouts:0,rclosedTotal:0,rignored:0,rtimeouts:0,rbans:0})),g=Q(void 0),Y=be({}),I=Q(be({}));const he=[{value:"griefing",label:F.griefing},{value:"inappropriate-content",label:F["inappropriate-content"]},{value:"hate-speech",label:F["hate-speech"]},{value:"doxxing",label:F.doxxing},{value:"multi-accounting",label:F["multi-accounting"]},{value:"bot",label:F.bot},{value:"other",label:F.other}];Rt(()=>{de()});async function de(){await M(),e(f).length<=1&&await D(),e(g)||x(g,e(f)[0],!0)}async function M(){try{x(d,!0);const i=await le.getModeratorTickets();x(f,i.tickets,!0),ea();try{x(V,await le.countMyTicketsClosedToday(),!0)}catch(n){return W.error(n.message),{closedTotal:0,ignored:0,timeouts:0,bans:0,rclosedTotal:0,rignored:0,rtimeouts:0,rbans:0}}x(I,{},!0);for(const n of e(f))for(const _ of n.reports)e(I)[_.id]=_.assignedReason??_.reason}catch(i){i.status===403||i.status===401?Gt("/404"):W.error(i.message)}finally{x(d,!1)}}async function D(){try{x(d,!0);const{newTicketsIds:i}=await le.assignNewTickets();i.length>0&&await M(),await ea()}catch(i){W.error(i.message)}finally{x(d,!1)}}async function ea(){try{x(ce,await le.getNonPaidUserOpenTicketsCount(),!0)}catch(i){W.error(i.message)}}async function ve(i,n,_,$){try{x(k,!0),await le.setTicketStatus(i,n,_,$),n!=="open"&&!(n==="ignore"&&_)&&(x(f,e(f).filter(r=>r.id!==i),!0),e(f).length<=1&&await D(),x(g,e(f)[0],!0))}catch(r){W.error(r.message)}finally{x(k,!1)}}function ja(i){return ve(i,"ignore",0,"other").then(()=>{x(f,e(f).filter(n=>n.id!==i),!0),x(g,e(f)[0],!0),e(f).length<=1&&D()}).catch(n=>{W.error(n.message)})}function Na(i,n){return ve(i,"ignore",n,e(I)[n]??"other").then(()=>{const _=e(f).findIndex(r=>r.id===i);if(_===-1)return;const $=e(f)[_];if($.reports=$.reports.filter(r=>r.id!==n),delete e(I)[n],delete Y[n],$.reports.length===0){x(f,e(f).filter(r=>r.id!==i),!0),x(g,e(f)[0],!0),e(f).length<=1&&D();return}x(g,{...$},!0)}).catch(_=>{W.error(_.message)})}function Ea(i,n){const _=e(I)[n.id]??n.assignedReason??n.reason;return ve(i,"timeout",n.id,_)}function Oa(i,n){const _=e(I)[n.id]??n.assignedReason??n.reason;return ve(i,"ban",n.id,_)}var ye=ar();Nt(i=>{St.title="Wplace - Moderation"});var ke=t(ye),we=t(ke),$e=t(we),_e=t($e),Ga=t(_e);Vt(Ga,{class:"size-5"}),a(_e);var aa=s(_e,2),Te=t(aa),Wa=t(Te,!0);a(Te);var Ue=s(Te,2),Va=t(Ue);a(Ue);var ta=s(Ue,2),Ie=t(ta),sa=t(Ie),ra=s(sa,2),na=s(ra,2),Ya=s(na,2);a(Ie);var qa=s(Ie);a(ta),a(aa),a($e);var pe=s($e,2);pe.__click=[Rs,de];var Fa=t(pe);Ma(Fa,{class:"size-4"}),a(pe),a(we);var oa=s(we,2);He(oa,25,()=>e(f),i=>i.id,(i,n)=>{const _=X(()=>new Date(e(n).createdAt)),$=X(()=>{var L;return((L=e(g))==null?void 0:L.id)===e(n).id});var r=Bs();r.__click=[Ls,g,n];var A=t(r);Qe(A,{class:"size-13",get userId(){return e(n).reportedUser.id},get pictureUrl(){return e(n).reportedUser.picture}});var q=s(A,2),R=t(q),P=t(R),ze=t(P,!0);a(P);var ee=s(P,2),ae=t(ee);a(ee),a(R);var te=s(R,2),se=t(te,!0);a(te),a(q);var re=s(q,2);{var ne=L=>{var C=Cs(),oe=t(C);Da(oe,()=>e(n).reportedUser.role),a(C),b(L,C)};T(re,L=>{e(n).reportedUser.role!=="user"&&L(ne)})}a(r),U((L,C)=>{H(r,1,Et({"bg-base-100 ring-primary relative flex gap-2 rounded-2xl p-4 shadow":!0,"bg-primary/10 ring-2":e($)})),H(R,1,`text-lg font-semibold ${L??""} flex gap-1.5`),l(ze,e(n).reportedUser.name),l(ae,`#${e(n).reportedUser.id??""}`),l(se,C)},[()=>ge(e(n).reportedUser.id),()=>e(_).toLocaleString()]),Dt(r,()=>fs,()=>({duration:250})),b(i,r)});var ia=s(oa,2),Ha=t(ia);{var Ja=i=>{var n=Ms(),_=Z(n),$=t(_,!0);a(_);var r=s(_,2);r.__click=[Ss,D,g,f];var A=t(r);Ma(A,{class:"size-5"});var q=s(A);a(r),U((R,P)=>{l($,R),l(q,` ${P??""}`)},[()=>Kt(),()=>ps()]),b(i,n)},Ka=i=>{var n=Ze(),_=Z(n);{var $=r=>{var A=Ds();b(r,A)};T(_,r=>{e(d)&&e(f).length===0&&r($)},!0)}b(i,n)};T(Ha,i=>{!e(d)&&e(f).length===0?i(Ja):i(Ka,!1)})}a(ia),a(ke);var la=s(ke,2),Qa=t(la);{var Xa=i=>{var n=Ze(),_=Z(n);Pt(_,()=>e(g).id,$=>{const r=X(()=>e(g)),A=X(()=>{var v;return(v=ls(e(r).reports,o=>o.sameIpAccounts))==null?void 0:v.sameIpAccounts});var q=er(),R=Z(q),P=t(R),ze=t(P);a(P),a(R);var ee=s(R,2),ae=t(ee),te=t(ae);Qe(te,{class:"size-15",get userId(){return e(r).reportedUser.id},get pictureUrl(){return e(r).reportedUser.picture}});var se=s(te,2),re=t(se),ne=t(re),L=t(ne,!0);a(ne);var C=s(ne,2),oe=t(C),Za=t(oe,!0);a(oe);var Ae=s(oe,2),et=t(Ae);a(Ae);var ie=s(Ae,2);ie.__click=[Ps,r];var at=t(ie);Ba(at,{class:"inline size-4"}),a(ie);var ca=s(ie,2);{var tt=v=>{const o=X(()=>e(r).reportedUser.allianceId);var y=Ns();y.__click=[js,o];var z=t(y),B=s(z);Ba(B,{class:"size-3"}),a(y),U((j,N,E)=>{H(y,1,`tooltip badge badge-sm ml-0.5 border-0 ${j??""} ${N??""}`),G(y,"title",E),l(z,`${e(r).reportedUser.allianceName??""} `)},[()=>bs(e(o)),()=>ge(e(o)),()=>Ft({allianceId:e(o)})]),b(v,y)};T(ca,v=>{e(r).reportedUser.allianceId&&v(tt)})}var st=s(ca,2);{var rt=v=>{var o=Es();b(v,o)};T(st,v=>{e(r).reportedUser.paid&&v(rt)})}a(C);var nt=s(C,2);{var ot=v=>{Da(v,()=>e(r).reportedUser.role)};T(nt,v=>{e(r).reportedUser.role!=="user"&&v(ot)})}a(re);var da=s(re,2),Re=t(da),va=t(Re),_a=s(va),it=t(_a,!0);a(_a),a(Re);var pa=s(Re,2);{var lt=v=>{var o=Os(),y=Z(o),z=t(y),B=s(z),j=t(B,!0);a(B),a(y);var N=s(y,2),E=t(N),S=s(E),Be=t(S,!0);a(S),a(N),U((J,ue)=>{l(z,`${J??""}: `),l(j,e(r).reportedUser.timeoutCount),l(E,`${ue??""}: `),l(Be,F[e(r).reportedUser.lastTimeoutReason]??e(r).reportedUser.lastTimeoutReason)},[()=>cs(),()=>ds()]),b(v,o)};T(pa,v=>{e(r).reportedUser.lastTimeoutReason&&v(lt)})}var Le=s(pa,2),ua=t(Le),fa=s(ua),ct=t(fa,!0);a(fa),a(Le);var ma=s(Le,2),ba=t(ma),Ce=s(ba);let ga;var dt=t(Ce,!0);a(Ce),a(ma),a(da),a(se);var vt=s(se,2);{var _t=v=>{var o=Ws();o.__click=[Gs,ja,r];var y=t(o,!0);a(o),U(z=>{o.disabled=e(k),l(y,z)},[()=>ws()]),b(v,o)};T(vt,v=>{var o;((o=Ke.data)==null?void 0:o.role)==="admin"&&v(_t)})}a(ae);var xa=s(ae,4);He(xa,21,()=>e(r).reports,v=>v.id,(v,o)=>{const y=X(()=>`${Je.url.origin}/?lat=${e(o).reportedLatitude}&lng=${e(o).reportedLongitude}&select=true${e(o).zoom?`&zoom=${e(o).zoom}`:""}`),z=X(()=>{var m;return((m=Y[e(o).id])==null?void 0:m.showIframe)??!1});var B=Zs(),j=t(B),N=t(j),E=s(N),S=t(E);S.__click=[Vs,Na,r,o];var Be=t(S,!0);a(S);var J=s(S,2);J.__click=[Ys,Ea,r,o];var ue=t(J);Yt(ue,{class:"size-5"});var pt=s(ue);a(J);var ut=s(J,2);{var ft=m=>{var u=Fs();u.__click=[qs,Oa,r,o];var h=t(u);qt(h,{class:"size-5"});var K=s(h);a(u),U(O=>{u.disabled=e(k),l(K,` ${O??""}`)},[()=>Ts()]),b(m,u)};T(ut,m=>{var u,h;(((u=Ke.data)==null?void 0:u.role)==="admin"||((h=Ke.data)==null?void 0:h.role)==="global_moderator")&&m(ft)})}a(E),a(j);var Se=s(j,2),ha=t(Se);Qe(ha,{class:"size-15",get userId(){return e(o).reportedBy},get pictureUrl(){return e(o).reportedByPicture}});var ya=s(ha,2),Me=t(ya),ka=t(Me),De=s(ka),Pe=t(De),mt=t(Pe,!0);a(Pe);var wa=s(Pe,2),bt=t(wa);a(wa),a(De),a(Me);var $a=s(Me,2),je=t($a),Ne=t(je),gt=t(Ne);a(Ne);var fe=s(Ne,2);He(fe,21,()=>he,jt,(m,u)=>{var h=Hs(),K=t(h,!0);a(h);var O={};U(()=>{l(K,e(u).label),O!==(O=e(u).value)&&(h.value=(h.__value=e(u).value)??"")}),b(m,h)}),a(fe),a(je);var Ee=s(je,2),Ta=t(Ee),Ua=s(Ta),xt=t(Ua,!0);a(Ua),a(Ee);var Oe=s(Ee,2),Ia=t(Oe),Ge=s(Ia),ht=t(Ge);Xe(ht,{class:"inline size-4"}),qe(2),a(Ge),a(Oe);var za=s(Oe,2),Aa=t(za),We=s(Aa),yt=t(We);Xe(yt,{class:"inline size-4"}),qe(2),a(We),a(za),a($a),a(ya),a(Se);var Ra=s(Se,2);{var kt=m=>{var u=Js(),h=t(u),K=t(h,!0);a(h);var O=s(h,2),Ve=t(O,!0);a(O),a(u),U(Ye=>{l(K,Ye),l(Ve,e(o).notes)},[()=>Ht()]),b(m,u)};T(Ra,m=>{e(o).notes&&m(kt)})}var La=s(Ra,2),me=t(La),Ca=t(me),wt=s(Ca,2);Qt(wt,{class:"absolute left-1/2 top-1/2 size-7 -translate-x-1/2 -translate-y-[87%]"}),a(me);var $t=s(me,2);{var Tt=m=>{var u=Ks();U(()=>G(u,"src",e(y))),b(m,u)},Ut=m=>{var u=Xs();u.__click=[Qs,Y,o];var h=t(u);Xe(h,{class:"size-4"}),qe(),a(u),b(m,u)};T($t,m=>{e(z)?m(Tt):m(Ut,!1)})}a(La),a(B),U((m,u,h,K,O,Ve,Ye,It,zt,At)=>{l(N,`${m??""} #${e(o).id??""} `),S.disabled=e(k),l(Be,u),J.disabled=e(k),l(pt,` ${h??""}`),l(ka,`${K??""}: `),H(De,1,`font-semibold ${O??""}`),l(mt,e(o).reportedByName),l(bt,`#${e(o).reportedBy??""}`),l(gt,`${Ve??""}:`),H(fe,1,`select select-bordered select-sm font-semibold ${Wt[e(I)[e(o).id]]??""}`),l(Ta,`${Ye??""}: `),l(xt,It),l(Ia,`${zt??""}: `),G(Ge,"href",e(y)),l(Aa,`${At??""}: `),G(We,"href",`${Je.url.origin??""}/?lat=${e(o).lastPixelLatitude??""}&lng=${e(o).lastPixelLongitude??""}&select=true`),G(me,"href",e(y)),G(Ca,"src",e(o).imageUrl)},[()=>Xt(),()=>hs(),()=>us(),()=>Zt(),()=>ge(e(o).reportedBy),()=>es(),()=>as(),()=>new Date(e(o).createdAt).toLocaleString(),()=>ts(),()=>ss()]),Ot(fe,()=>e(I)[e(o).id],m=>e(I)[e(o).id]=m),b(v,B)}),a(xa),a(ee),U((v,o,y,z,B,j,N,E,S)=>{G(P,"title",e(r).id),l(ze,`${v??""}: ${o??""}`),l(L,y),H(C,1,`text-lg font-semibold ${z??""}`),l(Za,e(r).reportedUser.name),l(et,`#${e(r).reportedUser.id??""}`),G(ie,"title",B),l(va,`${j??""}: `),l(it,e(r).reportedUser.reportedCount),l(ua,`${N??""}: `),l(ct,e(r).reportedUser.pixelsPainted),l(ba,`${E??""}: `),ga=H(Ce,1,"font-semibold",null,ga,S),l(dt,e(A))},[()=>rs(),()=>e(r).id.split("-").at(-1),()=>Sa(),()=>ge(e(r).reportedUser.id),()=>ns({userId:e(r).reportedUser.id}),()=>os(),()=>Jt(),()=>is(),()=>({"text-red-600":e(A)>=7})]),b($,q)}),b(i,n)};T(Qa,i=>{e(g)&&i(Xa)})}a(la),a(ye),U((i,n,_)=>{G(_e,"href",Je.url.origin),l(Wa,i),l(Va,`${n??""}: ${e(ce)??""??""}`),l(sa,`Closed reports: ${e(V).rclosedTotal??""}`),l(ra,` Ignored: ${e(V).ignored??""}`),l(na,` Timeouts: ${e(V).timeouts??""}`),l(Ya,` Bans: ${e(V).bans??""}`),l(qa,` ${_??""}: ${e(V).closedTotal??""}`),pe.disabled=e(d)},[()=>Sa(),()=>ms(),()=>zs()]),b(p,ye),Bt()}Lt(["click"]);export{Tr as component}; diff --git a/frontend-backup/_app/immutable/nodes/15.BKIY6Gje.js b/frontend-backup/_app/immutable/nodes/15.BKIY6Gje.js deleted file mode 100644 index 17138c3..0000000 --- a/frontend-backup/_app/immutable/nodes/15.BKIY6Gje.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/B2cHk4HI.js";import"../chunks/cUtKXcx3.js";import{at as v,p as y,f as x,s as o,t as u,b as w,c as I,$ as T,d as a,r}from"../chunks/BDALf20I.js";import{s as m}from"../chunks/4k6DpCgf.js";import{h as $}from"../chunks/BUhRjcOt.js";import{i as E}from"../chunks/BuTItAOu.js";import{L as k}from"../chunks/CYItkO2S.js";import{R as D}from"../chunks/rLj4C5Bn.js";import{W as L}from"../chunks/BtAj0icR.js";import{g as R}from"../chunks/DklPLC_x.js";import{r as S}from"../chunks/Drv8f_fG.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f5fe2200-0629-4b3d-908c-fa574a4638ca",e._sentryDebugIdIdentifier="sentry-dbid-f5fe2200-0629-4b3d-908c-fa574a4638ca")})()}catch{}const W=()=>"No internet connection",z=()=>"Sem conexão na internet",b=(e={},t={})=>(t.locale??R())==="en"?W():z();var N=()=>{location.reload()},j=x('

              ');function M(e,t){y(t,!1),E();var n=j();$(p=>{u(f=>T.title=`Wplace - ${f??""}`,[()=>b()])});var s=a(n),_=a(s);k(_,{class:"absolute left-1/2 top-10 -translate-x-1/2",size:"lg",hasText:!0}),r(s);var l=o(s,2);L(l,{class:"text-base-content/80 w-40"});var i=o(l,2),g=a(i,!0);r(i);var c=o(i,2);c.__click=[N];var d=a(c);D(d,{class:"size-5"});var h=o(d);r(c),r(n),u((p,f)=>{m(g,p),m(h,` ${f??""}`)},[()=>b(),()=>S()]),w(e,n),I()}v(["click"]);export{M as component}; diff --git a/frontend-backup/_app/immutable/nodes/15.D6A8EYfF.js b/frontend-backup/_app/immutable/nodes/15.D6A8EYfF.js new file mode 100644 index 0000000..a70aaf8 --- /dev/null +++ b/frontend-backup/_app/immutable/nodes/15.D6A8EYfF.js @@ -0,0 +1,103 @@ +import "../chunks/Ch2Ub8FX.js"; +import "../chunks/BOREeBzQ.js"; +import { + at as v, + p as y, + f as x, + s as o, + t as u, + b as w, + c as I, + $ as T, + d as a, + r, +} from "../chunks/CMvZtFtm.js"; +import { s as m } from "../chunks/DVA6u9-7.js"; +import { h as $ } from "../chunks/P77cUGnY.js"; +import { i as E } from "../chunks/Z_72d8Vp.js"; +import { L as k } from "../chunks/D3yDgRbd.js"; +import { R as D } from "../chunks/m3o6lEf1.js"; +import { W as L } from "../chunks/DCynssDD.js"; +import { g as R } from "../chunks/CV9xcpLq.js"; +import { r as S } from "../chunks/C3E1P42D.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + t = new e.Error().stack; + t && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[t] = "f5fe2200-0629-4b3d-908c-fa574a4638ca"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-f5fe2200-0629-4b3d-908c-fa574a4638ca")); + })(); +} catch {} +const W = () => "No internet connection", + z = () => "Sem conexão na internet", + b = (e = {}, t = {}) => ((t.locale ?? R()) === "en" ? W() : z()); +var N = () => { + location.reload(); + }, + j = x( + '

              ' + ); +function M(e, t) { + y(t, !1), E(); + var n = j(); + $((p) => { + u((f) => (T.title = `FurryPlace - ${f ?? ""}`), [() => b()]); + }); + var s = a(n), + _ = a(s); + k(_, { + class: "absolute left-1/2 top-10 -translate-x-1/2", + size: "lg", + hasText: !0, + }), + r(s); + var l = o(s, 2); + L(l, { class: "text-base-content/80 w-40" }); + var i = o(l, 2), + g = a(i, !0); + r(i); + var c = o(i, 2); + c.__click = [N]; + var d = a(c); + D(d, { class: "size-5" }); + var h = o(d); + r(c), + r(n), + u( + (p, f) => { + m(g, p), m(h, ` ${f ?? ""}`); + }, + [() => b(), () => S()] + ), + w(e, n), + I(); +} +v(["click"]); +export { M as component }; diff --git a/frontend-backup/_app/immutable/nodes/16.CKya8A82.js b/frontend-backup/_app/immutable/nodes/16.CKya8A82.js deleted file mode 100644 index 45b68c9..0000000 --- a/frontend-backup/_app/immutable/nodes/16.CKya8A82.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/B2cHk4HI.js";import{o as P}from"../chunks/4WsUhDWi.js";import{v as D,b as m,p as S,f as C,t as w,c as z,$ as N,d as s,s as c,aw as R,au as Y,r as n,g as x,ay as Z,a as j}from"../chunks/BDALf20I.js";import{s as f}from"../chunks/4k6DpCgf.js";import{r as A,i as B}from"../chunks/Bke_korE.js";import{h as M}from"../chunks/DV6L2nvf.js";import{h as O}from"../chunks/BUhRjcOt.js";import{p as $}from"../chunks/C-Y7nmnD.js";import{a as V,u as W}from"../chunks/DffDvEhl.js";import{L as F}from"../chunks/CYItkO2S.js";import{b as G}from"../chunks/BNZUboE0.js";import{g as _}from"../chunks/DklPLC_x.js";import{g as H}from"../chunks/BpFpuxGr.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4a6bf5bb-6139-4c34-aa73-98961bc8f67e",e._sentryDebugIdIdentifier="sentry-dbid-4a6bf5bb-6139-4c34-aa73-98961bc8f67e")})()}catch{}const J=()=>"Payment succeeded",K=()=>"Pagamento bem sucedido",T=(e={},t={})=>(t.locale??_())==="en"?J():K(),Q=e=>`You purchased ${e.number_droplet} droplets.`,U=e=>`Você comprou ${e.number_droplet} droplets.`,X=(e,t={})=>(t.locale??_())==="en"?Q(e):U(e),ee=()=>"Thank you for your support!",te=()=>"Obrigado pelo seu apoio!",re=(e={},t={})=>(t.locale??_())==="en"?ee():te();var oe=D('');function ae(e,t){let o=A(t,["$$slots","$$events","$$legacy"]);var l=oe();G(l,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...o})),m(e,l)}var se=C('');function ge(e,t){S(t,!0);let o=Y(null);P(async()=>{R(o,$.url.searchParams.get("droplets"),!0);const r=$.url.searchParams.get("session_id");r&&await V.refreshPaymentSession(r)&&await W.refresh()});var l=se();O(r=>{w(a=>N.title=`Wplace - ${a??""}`,[()=>T()])});var d=s(l),q=s(d);F(q,{size:"lg",hasText:!0}),n(d);var b=c(d,2),v=s(b),h=s(v);ae(h,{class:"size-16 text-emerald-500"});var i=c(h,2),k=s(i);n(i);var p=c(i,2),g=s(p);{var I=r=>{var a=Z(),u=j(a);M(u,()=>X({number_droplet:Number(x(o)).toLocaleString()})),m(r,a)};B(g,r=>{x(o)&&r(I)})}var E=c(g);n(p);var y=c(p,2),L=s(y,!0);n(y),n(v),n(b),n(l),w((r,a,u)=>{f(k,`${r??""}!`),f(E,` ${a??""}`),f(L,u)},[()=>T(),()=>re(),()=>H()]),m(e,l),z()}export{ge as component}; diff --git a/frontend-backup/_app/immutable/nodes/16.DTKQOukW.js b/frontend-backup/_app/immutable/nodes/16.DTKQOukW.js new file mode 100644 index 0000000..16b236b --- /dev/null +++ b/frontend-backup/_app/immutable/nodes/16.DTKQOukW.js @@ -0,0 +1,142 @@ +import "../chunks/Ch2Ub8FX.js"; +import { o as P } from "../chunks/DoL3ojdE.js"; +import { + v as D, + b as m, + p as S, + f as C, + t as w, + c as z, + $ as N, + d as a, + s as d, + aw as R, + au as Y, + r as n, + g as x, + ay as Z, + a as j, +} from "../chunks/CMvZtFtm.js"; +import { s as f } from "../chunks/DVA6u9-7.js"; +import { r as A, i as B } from "../chunks/BF50aS-j.js"; +import { h as M } from "../chunks/DueIxFLX.js"; +import { h as O } from "../chunks/P77cUGnY.js"; +import { p as $ } from "../chunks/B6ZK_HZO.js"; +import { a as V, u as W } from "../chunks/BRM3t761.js"; +import { L as F } from "../chunks/D3yDgRbd.js"; +import { b as G } from "../chunks/C5yqZvKC.js"; +import { g as _ } from "../chunks/CV9xcpLq.js"; +import { g as H } from "../chunks/BSXXHLQ0.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + t = new e.Error().stack; + t && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[t] = "287ebbc0-bb62-455b-83c8-7046bd097bb3"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-287ebbc0-bb62-455b-83c8-7046bd097bb3")); + })(); +} catch {} +const J = () => "Payment succeeded", + K = () => "Pagamento bem sucedido", + T = (e = {}, t = {}) => ((t.locale ?? _()) === "en" ? J() : K()), + Q = (e) => `You purchased ${e.number_droplet} droplets.`, + U = (e) => `Você comprou ${e.number_droplet} droplets.`, + X = (e, t = {}) => ((t.locale ?? _()) === "en" ? Q(e) : U(e)), + ee = () => "Thank you for your support!", + te = () => "Obrigado pelo seu apoio!", + re = (e = {}, t = {}) => ((t.locale ?? _()) === "en" ? ee() : te()); +var oe = D( + '' +); +function se(e, t) { + let o = A(t, ["$$slots", "$$events", "$$legacy"]); + var l = oe(); + G(l, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...o, + })), + m(e, l); +} +var ae = C( + '' +); +function ge(e, t) { + S(t, !0); + let o = Y(null); + P(async () => { + R(o, $.url.searchParams.get("droplets"), !0); + const r = $.url.searchParams.get("session_id"); + r && (await V.refreshPaymentSession(r)) && (await W.refresh()); + }); + var l = ae(); + O((r) => { + w((s) => (N.title = `FurryPlace - ${s ?? ""}`), [() => T()]); + }); + var c = a(l), + q = a(c); + F(q, { size: "lg", hasText: !0 }), n(c); + var b = d(c, 2), + v = a(b), + h = a(v); + se(h, { class: "size-16 text-emerald-500" }); + var i = d(h, 2), + k = a(i); + n(i); + var p = d(i, 2), + g = a(p); + { + var I = (r) => { + var s = Z(), + u = j(s); + M(u, () => X({ number_droplet: Number(x(o)).toLocaleString() })), m(r, s); + }; + B(g, (r) => { + x(o) && r(I); + }); + } + var E = d(g); + n(p); + var y = d(p, 2), + L = a(y, !0); + n(y), + n(v), + n(b), + n(l), + w( + (r, s, u) => { + f(k, `${r ?? ""}!`), f(E, ` ${s ?? ""}`), f(L, u); + }, + [() => T(), () => re(), () => H()] + ), + m(e, l), + z(); +} +export { ge as component }; diff --git a/frontend-backup/_app/immutable/nodes/17.C45_aAtw.js b/frontend-backup/_app/immutable/nodes/17.C45_aAtw.js deleted file mode 100644 index 190b448..0000000 --- a/frontend-backup/_app/immutable/nodes/17.C45_aAtw.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/B2cHk4HI.js";import{v as Ct,b as A,at as la,p as ia,y as ca,g as e,au as U,aw as u,ay as ht,ax as z,a as Te,c as da,bm as O,u as N,f as ce,d as o,r as a,s as n,n as xt,t as Re}from"../chunks/BDALf20I.js";import{s as k}from"../chunks/4k6DpCgf.js";import{r as Tt,i as Me}from"../chunks/Bke_korE.js";import{e as ua}from"../chunks/CZW2bcQi.js";import{b as Rt,c as wt,a as K,s as ie,e as yt,r as va}from"../chunks/BNZUboE0.js";import{b as _a}from"../chunks/DS58drb5.js";import{b as Pe}from"../chunks/BrZ10JY-.js";import{g as pa}from"../chunks/B4HM4TqG.js";import{S as kt,u as h,g as It,t as Ee,P as fa,c as ma}from"../chunks/DffDvEhl.js";import{r as ga,P as Le,D as ba,a as ha,I as xa,b as wa,e as ya,c as ka,d as Ia}from"../chunks/C2Ms0SfR.js";import{P as W}from"../chunks/DCxPsWiR.js";import{A as Da}from"../chunks/CVCd3urP.js";import{g as C}from"../chunks/DklPLC_x.js";import{c as $a}from"../chunks/CDZgL_Bh.js";import{c as Ua}from"../chunks/EXYzlOI1.js";import{a as za}from"../chunks/DdJK9GIy.js";import{h as Ca,r as Ta}from"../chunks/ClOhzjRc.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};r.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new r.Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="dbc33fbf-2e89-4500-af3a-1c9728004562",r._sentryDebugIdIdentifier="sentry-dbid-dbc33fbf-2e89-4500-af3a-1c9728004562")})()}catch{}const Ra=r=>`unexpected url format: ${r.url}`,Ma=r=>`formato da url inesperado: ${r.url}`,Pa=(r,t={})=>(t.locale??C())==="en"?Ra(r):Ma(r),La=()=>"Canvas does not have 2d context",Ea=()=>"A tela não tem contexto 2D",Sa=(r={},t={})=>(t.locale??C())==="en"?La():Ea(),Aa=()=>"Failed to upload the image. Check the file uploaded.",Ha=()=>"Falha ao enviar a imagem. Verifique o arquivo enviado.",qa=(r={},t={})=>(t.locale??C())==="en"?Aa():Ha(),Ba=()=>"Disclaimer: inappropriate pictures may be removed without notice.",Ya=()=>"Aviso: Imagens inapropriadas podem ser removidas sem aviso prévio.",Fa=(r={},t={})=>(t.locale??C())==="en"?Ba():Ya(),Xa=()=>"Failed to send image to the server.",Za=()=>"Falha ao enviar imagem para o servidor.",Oa=(r={},t={})=>(t.locale??C())==="en"?Xa():Za(),Wa=()=>"You are not logged in",ja=()=>"Você não está logado",Na=(r={},t={})=>(t.locale??C())==="en"?Wa():ja(),Ka=()=>"Home",Va=()=>"Início",Ga=(r={},t={})=>(t.locale??C())==="en"?Ka():Va(),Ja=()=>"Preferably, use a 16x16 image",Qa=()=>"De preferência uma imagem 16x16",er=(r={},t={})=>(t.locale??C())==="en"?Ja():Qa(),tr=()=>"Upload",ar=()=>"Upload",rr=(r={},t={})=>(t.locale??C())==="en"?tr():ar(),sr=()=>"Draw profile picture",or=()=>"Imagem de perfil",nr=(r={},t={})=>(t.locale??C())==="en"?sr():or(),lr=()=>"Preview",ir=()=>"Prévia",Dt=(r={},t={})=>(t.locale??C())==="en"?lr():ir();var cr=Ct('');function $t(r,t){let c=Tt(t,["$$slots","$$events","$$legacy"]);var m=cr();Rt(m,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...c})),A(r,m)}var dr=Ct('');function Ut(r,t){let c=Tt(t,["$$slots","$$events","$$legacy"]);var m=dr();Rt(m,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...c})),A(r,m)}async function zt(r,t,c,m,L){var H;try{const q=(H=r.currentTarget.files)==null?void 0:H[0];if(q){const T=await t(q);c(T,e(m)),u(L,e(m).toDataURL("image/png"),!0),T.remove()}}catch(q){console.error(q),Ee.error(qa())}}var ur=(r,t)=>t(),vr=(r,t)=>{const c=r.offsetX,m=r.offsetY;t(c,m,c,m)},_r=(r,t)=>t(),pr=(r,t,c,m)=>{u(t,e(c),!0),u(m,!1)},fr=ce("
              "),mr=(r,t)=>{u(t,!1)},gr=(r,t)=>{e(t).show()},br=(r,t)=>{u(t,!e(t))},hr=(r,t)=>{var c;(c=e(t))==null||c.close()},xr=(r,t,c)=>{u(t,!0),e(c).toBlob(async m=>{try{if(!m){Ee.error(Oa());return}const L=new FormData;if(L.set("image",m),(await fetch(`${fa}/me/profile-picture`,{method:"POST",credentials:"include",body:L})).status!==200){Ee.error(ma());return}await h.refresh(),pa("/")}finally{u(t,!1)}u(t,!0)})},wr=ce(''),yr=ce('

              E
              ',1),kr=ce('');function Fr(r,t){ia(t,!0);const c=kt.products[120];let m=U(!1),L=U(!1),H=U(!1);const q=N(()=>e(m)||e(L)||e(H));let T=U("#000000"),de=U(!1),y=U(!1),w=U(""),D=[0,0],ue=U(!1);const Se=N(()=>{var s;return(((s=h.data)==null?void 0:s.droplets)??0)>=c.price}),Mt=N(()=>{if(e(y))return[0,0,0,0];const{r:s,g:d,b:l}=Ca(e(T));return[s,d,l,255]});let _=U(null),B=U(null),ee=U(null);const Pt=new Set([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,52]),Lt=[1,2,3,32,4,5,6,33,7,34,35,8,36,9,10,11,37,38,39,40,41,42,12,13,14,15,16,17,43,20,44,18,19,45,46,21,22,47,48,49,23,24,25,26,27,28,53,54,55,56,57,29,30,50,51,31,52,61,62,63,58,59,60].map(s=>({...kt.colors[s],idx:s}));ca(()=>{e(_)&&u(w,e(_).toDataURL("image/png"),!0)});function j(s,d,l,v){const p=Math.floor(s/e(_).clientWidth*e(_).width),f=Math.floor(d/e(_).clientHeight*e(_).height),g=Math.floor(l/e(_).clientWidth*e(_).width),b=Math.floor(v/e(_).clientHeight*e(_).height),R=ga([p,f],[g,b]);for(const[M,Y]of R){const F=e(_).getContext("2d"),E=F.createImageData(1,1),[te,_e,V,pe]=e(Mt);E.data[0]=te,E.data[1]=_e,E.data[2]=V,E.data[3]=pe,F.putImageData(E,M,Y)}u(w,e(_).toDataURL("image/png"),!0)}function ve(s,d){const l=e(B).width,v=e(B).height,p=Math.floor(s/e(B).clientWidth*l),f=Math.floor(d/e(B).clientHeight*v);if(!isFinite(p)||!isFinite(f))return;const g=e(B).getContext("2d"),b=g.createImageData(1,1);b.data[0]=128,b.data[1]=128,b.data[2]=128,b.data[3]=60,g.clearRect(0,0,l,v),g.putImageData(b,p,f)}async function Ae(s){return new Promise((d,l)=>{const v=new FileReader;v.onload=p=>{var b;const f=new Image;f.onload=()=>d(f),f.onerror=R=>l(R);const g=(b=p.target)==null?void 0:b.result;g&&typeof g=="string"?f.src=g:l(new Error(Pa({url:g??""})))},v.onerror=p=>l(p),v.readAsDataURL(s)})}function He(s,d){const l=d.getContext("2d");if(!l)throw new Error(Sa());const v=d.width,p=d.height;l.clearRect(0,0,v,p);const f=Math.min(v/s.width,p/s.height),g=s.width*f,b=s.height*f,R=(v-g)/2,M=(p-b)/2;l.drawImage(s,R,M,g,b)}function qe(s,d,l){const v=s.getBoundingClientRect(),p=d-v.left,f=l-v.top;return[p,f]}function Be(){const s=e(_).getContext("2d");s==null||s.clearRect(0,0,e(_).width,e(_).height),u(w,e(_).toDataURL("image/png"),!0)}var Ye=ht();z("mousedown",O,s=>{u(m,!0);const[d,l]=qe(e(_),s.clientX,s.clientY);j(d,l,d,l),D=[d,l]}),z("mouseup",O,()=>{u(m,!1)}),z("touchstart",O,s=>{u(H,!0);const d=s.touches.item(0),[l,v]=qe(e(_),d.clientX,d.clientY);j(l,v,l,v),D=[l,v]},void 0,!0),z("touchend",O,()=>{u(H,!1)}),z("keypress",O,s=>{s.code==="KeyE"&&u(y,!e(y))}),z("keydown",O,s=>{if(s.code==="Space"){u(L,!0);const d=D[0],l=D[1];j(d,l,d,l),s.preventDefault()}}),z("keyup",O,s=>{s.code==="Space"&&u(L,!1)});var Et=Te(Ye);{var St=s=>{var d=yr(),l=Te(d),v=o(l),p=o(v),f=o(p),g=o(f);Da(g,{class:"size-5"}),a(f);var b=n(f,2),R=o(b,!0);a(b);var M=n(b,2),Y=o(M),F=o(Y),E=o(F);Ut(E,{class:"size-5"});var te=n(E),_e=n(te);_e.__change=[zt,Ae,He,_,w],a(F),a(Y),a(M);var V=n(M,2);V.__click=[ur,Be];var pe=o(V);$t(pe,{class:"size-5"}),a(V),a(p);var fe=n(p,2),Fe=o(fe),me=o(Fe),Ht=o(me);a(me);var Xe=n(me,2);Le(Xe,{get userId(){return h.data.id},get level(){return h.data.level},get pictureUrl(){return e(w)}});var Ze=n(Xe,2);W(Ze,{class:"size-10 border",get userId(){return h.data.id},get pictureUrl(){return e(w)}});var qt=n(Ze,2);W(qt,{class:"size-5 border-0",get userId(){return h.data.id},get pictureUrl(){return e(w)}}),a(Fe),a(fe);var Bt=n(fe,2);ba(Bt,{get value(){return h.data.droplets}}),a(v);var Oe=n(v,2),ge=o(Oe),X=o(ge);let We;X.__touchmove=i=>{u(de,!0);const x=i.targetTouches.item(0),$=i.currentTarget.getBoundingClientRect(),I=x.clientX-$.left,P=x.clientY-$.top;e(q)&&j(D[0],D[1],I,P),ve(I,P),D=[I,P]},X.__mousemove=i=>{u(de,!1);const x=i.offsetX,$=i.offsetY;e(q)&&j(D[0],D[1],x,$),ve(x,$),D=[x,$]},X.__click=[vr,j],Pe(X,i=>u(_,i),()=>e(_));var je=n(X,2);let Ne;Pe(je,i=>u(B,i),()=>e(B)),xt(2),a(ge);var be=n(ge,2),he=o(be),xe=o(he),Yt=o(xe);a(xe);var Ke=n(xe,2);Le(Ke,{get userId(){return h.data.id},get level(){return h.data.level},get pictureUrl(){return e(w)}});var Ve=n(Ke,2);W(Ve,{class:"size-10 border",get userId(){return h.data.id},get pictureUrl(){return e(w)}});var Ft=n(Ve,2);W(Ft,{class:"size-5 border-0",get userId(){return h.data.id},get pictureUrl(){return e(w)}}),a(he);var Ge=n(he,2),ae=o(Ge);ae.__click=[_r,Be];var Xt=o(ae);$t(Xt,{class:"size-5"}),a(ae);var Je=n(ae,2),Qe=o(Je),et=o(Qe);Ut(et,{class:"size-5"});var Zt=n(et,2);Zt.__change=[zt,Ae,He,_,w],a(Qe),a(Je),a(Ge),a(be);var tt=n(be,2),we=o(tt);ua(we,23,()=>Lt,i=>i.idx,(i,x,$)=>{const I=N(()=>{const[Q,ze,Ce]=e(x).rgb;return{r:Q,g:ze,b:Ce}}),P=N(()=>Ta({r:e(I).r,g:e(I).g,b:e(I).b})),le=N(()=>e(T)===e(P)&&!e(y));var Z=fr(),S=o(Z);S.__click=[pr,T,P,y],a(Z),Re(Q=>{K(Z,1,Q),ie(Z,"data-tip",e(x).name),K(S,1,wt({"btn relative aspect-square w-full rounded-xl":!0,"border-primary ring-primary ring-2":e(le),"border-base-content/20":!e(le),"max-sm:h-6 max-sm:rounded-md":!0})),yt(S,`background: rgb(${e(I).r} ${e(I).g} ${e(I).b})`),ie(S,"aria-label",e(x).name),ie(S,"id",`color-${e(x).idx??""}`)},[()=>wt({tooltip:!0,"max-sm:hidden":!Pt.has(e(x).idx),"max-sm:before:-translate-x-1/4":e($)%8===0&&e(x).name.length>7,"max-sm:before:translate-x-1/4":(e($)-7)%8===0&&e(x).name.length>7})]),z("focus",S,()=>{u(T,e(P),!0),u(y,!1)}),A(i,Z)}),a(we);var at=n(we,2),G=o(at);G.__click=[mr,y];var rt=o(G),st=n(rt,2);va(st),a(G);var re=n(G,2);let ot;var se=o(re);se.__click=[gr,ee];var nt=o(se),lt=n(nt),it=o(lt);ha(it,{class:"size-4.5"});var Ot=n(it);a(lt),a(se),a(re);var ct=n(re,2),ye=o(ct),Wt=o(ye);xt(),a(ye);var J=n(ye,2);let dt;J.__click=[br,y];var jt=o(J);xa(jt,{class:"size-5",get filled(){return e(y)}}),a(J),a(ct),a(at),a(tt),a(Oe),a(l);var ut=n(l,2);wa(ut,{get open(){return It.dropletsDialogOpen},set open(i){It.dropletsDialogOpen=i}});var ke=n(ut,2),Ie=o(ke),De=n(o(Ie),2),Nt=o(De,!0);a(De);var $e=n(De,2),vt=o($e);W(vt,{class:"size-20",get userId(){return h.data.id},get pictureUrl(){return e(w)}});var _t=n(vt,2);Le(_t,{get userId(){return h.data.id},get level(){return h.data.level},get pictureUrl(){return e(w)}});var pt=n(_t,2);W(pt,{class:"size-10 border",get userId(){return h.data.id},get pictureUrl(){return e(w)}});var Kt=n(pt,2);W(Kt,{class:"size-5 border-0",get userId(){return h.data.id},get pictureUrl(){return e(w)}}),a($e);var Ue=n($e,2),Vt=o(Ue,!0);a(Ue);var ft=n(Ue,2),oe=o(ft);oe.__click=[hr,ee];var Gt=o(oe,!0);a(oe);var ne=n(oe,2);ne.__click=[xr,ue,_];var mt=o(ne),Jt=n(mt);{var Qt=i=>{var x=wr();A(i,x)};Me(Jt,i=>{e(ue)&&i(Qt)})}a(ne),a(ft),a(Ie);var gt=n(Ie,2),bt=o(gt),ea=o(bt,!0);a(bt),a(gt),a(ke),Pe(ke,i=>u(ee,i),()=>e(ee)),Re((i,x,$,I,P,le,Z,S,Q,ze,Ce,ta,aa,ra,sa,oa,na)=>{k(R,i),ie(Y,"data-tip",x),k(te,`${$??""} `),k(Ht,`${I??""}:`),We=K(X,1,"pixelated size-full",null,We,P),Ne=K(je,1,"pixelated pointer-events-none absolute left-0 top-0 size-full",null,Ne,le),k(Yt,`${Z??""}:`),yt(rt,`background: ${e(T)}`),ot=K(re,1,"",null,ot,S),se.disabled=!e(Se),k(nt,`${Q??""} `),k(Ot,` ${ze??""}`),k(Wt,`${Ce??""} `),dt=K(J,1,"btn btn-lg btn-square sm:btn-xl shadow-md",null,dt,ta),k(Nt,aa),k(Vt,ra),k(Gt,sa),ne.disabled=e(ue),k(mt,`${oa??""} `),k(ea,na)},[()=>nr(),()=>er(),()=>rr(),()=>Dt(),()=>({"cursor-pencil":!e(y),"cursor-eraser":e(y)}),()=>({hidden:e(de)}),()=>Dt(),()=>({tooltip:!e(Se)}),()=>za(),()=>c.price.toLocaleString("en-US"),()=>ya(),()=>({"btn-primary":e(y)}),()=>ka(),()=>Fa(),()=>$a(),()=>Ua(),()=>Ia()]),z("mouseleave",X,i=>{ve(i.offsetX,i.offsetY),D=[i.offsetX,i.offsetY]}),z("focus",G,()=>{u(y,!1)}),_a(st,()=>e(T),i=>u(T,i)),z("focus",J,()=>{u(y,!0)}),A(s,d)},At=s=>{var d=ht(),l=Te(d);{var v=p=>{var f=kr(),g=o(f),b=o(g,!0);a(g);var R=n(g,2),M=o(R,!0);a(R),a(f),Re((Y,F)=>{k(b,Y),k(M,F)},[()=>Na(),()=>Ga()]),A(p,f)};Me(l,p=>{!h.data&&!h.loading&&p(v)},!0)}A(s,d)};Me(Et,s=>{h.data?s(St):s(At,!1)})}A(r,Ye),da()}la(["change","click","touchmove","mousemove"]);export{Fr as component}; diff --git a/frontend-backup/_app/immutable/nodes/17.CONNNOye.js b/frontend-backup/_app/immutable/nodes/17.CONNNOye.js new file mode 100644 index 0000000..2d8ba2a --- /dev/null +++ b/frontend-backup/_app/immutable/nodes/17.CONNNOye.js @@ -0,0 +1,831 @@ +import "../chunks/Ch2Ub8FX.js"; +import { + v as Ct, + b as A, + at as la, + p as ia, + y as ca, + g as e, + au as U, + aw as u, + ay as ht, + ax as z, + a as Te, + c as da, + bm as O, + u as N, + f as ce, + d as o, + r as a, + s as n, + n as xt, + t as Re, +} from "../chunks/CMvZtFtm.js"; +import { s as k } from "../chunks/DVA6u9-7.js"; +import { r as Tt, i as Me } from "../chunks/BF50aS-j.js"; +import { e as ua } from "../chunks/CXkjfmFU.js"; +import { + b as Rt, + c as wt, + a as K, + s as ie, + e as yt, + r as va, +} from "../chunks/C5yqZvKC.js"; +import { b as _a } from "../chunks/Dpga8uG-.js"; +import { b as Pe } from "../chunks/0wx1llIh.js"; +import { g as pa } from "../chunks/CyB--sFG.js"; +import { + S as kt, + u as h, + g as It, + t as Ee, + P as fa, + c as ma, +} from "../chunks/BRM3t761.js"; +import { + r as ga, + P as Le, + D as ba, + a as ha, + I as xa, + b as wa, + e as ya, + c as ka, +} from "../chunks/BA2Qx8r3.js"; +import { P as W } from "../chunks/D3yaN7Zl.js"; +import { A as Ia, c as Da } from "../chunks/Dt3xBOvm.js"; +import { g as C } from "../chunks/CV9xcpLq.js"; +import { c as $a } from "../chunks/CHGjpGz-.js"; +import { c as Ua } from "../chunks/C4yB2Gnm.js"; +import { a as za } from "../chunks/CZlv7MYe.js"; +import { h as Ca, r as Ta } from "../chunks/lE0oaQc5.js"; +(function () { + try { + var r = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + r.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var r = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + t = new r.Error().stack; + t && + ((r._sentryDebugIds = r._sentryDebugIds || {}), + (r._sentryDebugIds[t] = "b645305a-a2bb-4f20-862e-8d4e8a88cafe"), + (r._sentryDebugIdIdentifier = + "sentry-dbid-b645305a-a2bb-4f20-862e-8d4e8a88cafe")); + })(); +} catch {} +const Ra = (r) => `unexpected url format: ${r.url}`, + Ma = (r) => `formato da url inesperado: ${r.url}`, + Pa = (r, t = {}) => ((t.locale ?? C()) === "en" ? Ra(r) : Ma(r)), + La = () => "Canvas does not have 2d context", + Ea = () => "A tela não tem contexto 2D", + Sa = (r = {}, t = {}) => ((t.locale ?? C()) === "en" ? La() : Ea()), + Aa = () => "Failed to upload the image. Check the file uploaded.", + Ha = () => "Falha ao enviar a imagem. Verifique o arquivo enviado.", + qa = (r = {}, t = {}) => ((t.locale ?? C()) === "en" ? Aa() : Ha()), + Ba = () => + "Disclaimer: inappropriate pictures may be removed without notice.", + Ya = () => + "Aviso: Imagens inapropriadas podem ser removidas sem aviso prévio.", + Fa = (r = {}, t = {}) => ((t.locale ?? C()) === "en" ? Ba() : Ya()), + Xa = () => "Failed to send image to the server.", + Za = () => "Falha ao enviar imagem para o servidor.", + Oa = (r = {}, t = {}) => ((t.locale ?? C()) === "en" ? Xa() : Za()), + Wa = () => "You are not logged in", + ja = () => "Você não está logado", + Na = (r = {}, t = {}) => ((t.locale ?? C()) === "en" ? Wa() : ja()), + Ka = () => "Home", + Va = () => "Início", + Ga = (r = {}, t = {}) => ((t.locale ?? C()) === "en" ? Ka() : Va()), + Ja = () => "Preferably, use a 16x16 image", + Qa = () => "De preferência uma imagem 16x16", + er = (r = {}, t = {}) => ((t.locale ?? C()) === "en" ? Ja() : Qa()), + tr = () => "Upload", + ar = () => "Upload", + rr = (r = {}, t = {}) => ((t.locale ?? C()) === "en" ? tr() : ar()), + sr = () => "Draw profile picture", + or = () => "Imagem de perfil", + nr = (r = {}, t = {}) => ((t.locale ?? C()) === "en" ? sr() : or()), + lr = () => "Preview", + ir = () => "Prévia", + Dt = (r = {}, t = {}) => ((t.locale ?? C()) === "en" ? lr() : ir()); +var cr = Ct( + '' +); +function $t(r, t) { + let c = Tt(t, ["$$slots", "$$events", "$$legacy"]); + var m = cr(); + Rt(m, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...c, + })), + A(r, m); +} +var dr = Ct( + '' +); +function Ut(r, t) { + let c = Tt(t, ["$$slots", "$$events", "$$legacy"]); + var m = dr(); + Rt(m, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...c, + })), + A(r, m); +} +async function zt(r, t, c, m, L) { + var H; + try { + const q = (H = r.currentTarget.files) == null ? void 0 : H[0]; + if (q) { + const T = await t(q); + c(T, e(m)), u(L, e(m).toDataURL("image/png"), !0), T.remove(); + } + } catch (q) { + console.error(q), Ee.error(qa()); + } +} +var ur = (r, t) => t(), + vr = (r, t) => { + const c = r.offsetX, + m = r.offsetY; + t(c, m, c, m); + }, + _r = (r, t) => t(), + pr = (r, t, c, m) => { + u(t, e(c), !0), u(m, !1); + }, + fr = ce("
              "), + mr = (r, t) => { + u(t, !1); + }, + gr = (r, t) => { + e(t).show(); + }, + br = (r, t) => { + u(t, !e(t)); + }, + hr = (r, t) => { + var c; + (c = e(t)) == null || c.close(); + }, + xr = (r, t, c) => { + u(t, !0), + e(c).toBlob(async (m) => { + try { + if (!m) { + Ee.error(Oa()); + return; + } + const L = new FormData(); + if ( + (L.set("image", m), + ( + await fetch(`${fa}/me/profile-picture`, { + method: "POST", + credentials: "include", + body: L, + }) + ).status !== 200) + ) { + Ee.error(ma()); + return; + } + await h.refresh(), pa("/"); + } finally { + u(t, !1); + } + u(t, !0); + }); + }, + wr = ce( + '' + ), + yr = ce( + '

              E
              ', + 1 + ), + kr = ce( + '' + ); +function Fr(r, t) { + ia(t, !0); + const c = kt.products[120]; + let m = U(!1), + L = U(!1), + H = U(!1); + const q = N(() => e(m) || e(L) || e(H)); + let T = U("#000000"), + de = U(!1), + y = U(!1), + w = U(""), + D = [0, 0], + ue = U(!1); + const Se = N(() => { + var s; + return (((s = h.data) == null ? void 0 : s.droplets) ?? 0) >= c.price; + }), + Mt = N(() => { + if (e(y)) return [0, 0, 0, 0]; + const { r: s, g: d, b: l } = Ca(e(T)); + return [s, d, l, 255]; + }); + let _ = U(null), + B = U(null), + ee = U(null); + const Pt = new Set([ + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 52, + ]), + Lt = [ + 1, 2, 3, 32, 4, 5, 6, 33, 7, 34, 35, 8, 36, 9, 10, 11, 37, 38, 39, 40, 41, + 42, 12, 13, 14, 15, 16, 17, 43, 20, 44, 18, 19, 45, 46, 21, 22, 47, 48, + 49, 23, 24, 25, 26, 27, 28, 53, 54, 55, 56, 57, 29, 30, 50, 51, 31, 52, + 61, 62, 63, 58, 59, 60, + ].map((s) => ({ ...kt.colors[s], idx: s })); + ca(() => { + e(_) && u(w, e(_).toDataURL("image/png"), !0); + }); + function j(s, d, l, v) { + const p = Math.floor((s / e(_).clientWidth) * e(_).width), + f = Math.floor((d / e(_).clientHeight) * e(_).height), + g = Math.floor((l / e(_).clientWidth) * e(_).width), + b = Math.floor((v / e(_).clientHeight) * e(_).height), + R = ga([p, f], [g, b]); + for (const [M, Y] of R) { + const F = e(_).getContext("2d"), + E = F.createImageData(1, 1), + [te, _e, V, pe] = e(Mt); + (E.data[0] = te), + (E.data[1] = _e), + (E.data[2] = V), + (E.data[3] = pe), + F.putImageData(E, M, Y); + } + u(w, e(_).toDataURL("image/png"), !0); + } + function ve(s, d) { + const l = e(B).width, + v = e(B).height, + p = Math.floor((s / e(B).clientWidth) * l), + f = Math.floor((d / e(B).clientHeight) * v); + if (!isFinite(p) || !isFinite(f)) return; + const g = e(B).getContext("2d"), + b = g.createImageData(1, 1); + (b.data[0] = 128), + (b.data[1] = 128), + (b.data[2] = 128), + (b.data[3] = 60), + g.clearRect(0, 0, l, v), + g.putImageData(b, p, f); + } + async function Ae(s) { + return new Promise((d, l) => { + const v = new FileReader(); + (v.onload = (p) => { + var b; + const f = new Image(); + (f.onload = () => d(f)), (f.onerror = (R) => l(R)); + const g = (b = p.target) == null ? void 0 : b.result; + g && typeof g == "string" + ? (f.src = g) + : l(new Error(Pa({ url: g ?? "" }))); + }), + (v.onerror = (p) => l(p)), + v.readAsDataURL(s); + }); + } + function He(s, d) { + const l = d.getContext("2d"); + if (!l) throw new Error(Sa()); + const v = d.width, + p = d.height; + l.clearRect(0, 0, v, p); + const f = Math.min(v / s.width, p / s.height), + g = s.width * f, + b = s.height * f, + R = (v - g) / 2, + M = (p - b) / 2; + l.drawImage(s, R, M, g, b); + } + function qe(s, d, l) { + const v = s.getBoundingClientRect(), + p = d - v.left, + f = l - v.top; + return [p, f]; + } + function Be() { + const s = e(_).getContext("2d"); + s == null || s.clearRect(0, 0, e(_).width, e(_).height), + u(w, e(_).toDataURL("image/png"), !0); + } + var Ye = ht(); + z("mousedown", O, (s) => { + u(m, !0); + const [d, l] = qe(e(_), s.clientX, s.clientY); + j(d, l, d, l), (D = [d, l]); + }), + z("mouseup", O, () => { + u(m, !1); + }), + z( + "touchstart", + O, + (s) => { + u(H, !0); + const d = s.touches.item(0), + [l, v] = qe(e(_), d.clientX, d.clientY); + j(l, v, l, v), (D = [l, v]); + }, + void 0, + !0 + ), + z("touchend", O, () => { + u(H, !1); + }), + z("keypress", O, (s) => { + s.code === "KeyE" && u(y, !e(y)); + }), + z("keydown", O, (s) => { + if (s.code === "Space") { + u(L, !0); + const d = D[0], + l = D[1]; + j(d, l, d, l), s.preventDefault(); + } + }), + z("keyup", O, (s) => { + s.code === "Space" && u(L, !1); + }); + var Et = Te(Ye); + { + var St = (s) => { + var d = yr(), + l = Te(d), + v = o(l), + p = o(v), + f = o(p), + g = o(f); + Ia(g, { class: "size-5" }), a(f); + var b = n(f, 2), + R = o(b, !0); + a(b); + var M = n(b, 2), + Y = o(M), + F = o(Y), + E = o(F); + Ut(E, { class: "size-5" }); + var te = n(E), + _e = n(te); + (_e.__change = [zt, Ae, He, _, w]), a(F), a(Y), a(M); + var V = n(M, 2); + V.__click = [ur, Be]; + var pe = o(V); + $t(pe, { class: "size-5" }), a(V), a(p); + var fe = n(p, 2), + Fe = o(fe), + me = o(Fe), + Ht = o(me); + a(me); + var Xe = n(me, 2); + Le(Xe, { + get userId() { + return h.data.id; + }, + get level() { + return h.data.level; + }, + get pictureUrl() { + return e(w); + }, + }); + var Ze = n(Xe, 2); + W(Ze, { + class: "size-10 border", + get userId() { + return h.data.id; + }, + get pictureUrl() { + return e(w); + }, + }); + var qt = n(Ze, 2); + W(qt, { + class: "size-5 border-0", + get userId() { + return h.data.id; + }, + get pictureUrl() { + return e(w); + }, + }), + a(Fe), + a(fe); + var Bt = n(fe, 2); + ba(Bt, { + get value() { + return h.data.droplets; + }, + }), + a(v); + var Oe = n(v, 2), + ge = o(Oe), + X = o(ge); + let We; + (X.__touchmove = (i) => { + u(de, !0); + const x = i.targetTouches.item(0), + $ = i.currentTarget.getBoundingClientRect(), + I = x.clientX - $.left, + P = x.clientY - $.top; + e(q) && j(D[0], D[1], I, P), ve(I, P), (D = [I, P]); + }), + (X.__mousemove = (i) => { + u(de, !1); + const x = i.offsetX, + $ = i.offsetY; + e(q) && j(D[0], D[1], x, $), ve(x, $), (D = [x, $]); + }), + (X.__click = [vr, j]), + Pe( + X, + (i) => u(_, i), + () => e(_) + ); + var je = n(X, 2); + let Ne; + Pe( + je, + (i) => u(B, i), + () => e(B) + ), + xt(2), + a(ge); + var be = n(ge, 2), + he = o(be), + xe = o(he), + Yt = o(xe); + a(xe); + var Ke = n(xe, 2); + Le(Ke, { + get userId() { + return h.data.id; + }, + get level() { + return h.data.level; + }, + get pictureUrl() { + return e(w); + }, + }); + var Ve = n(Ke, 2); + W(Ve, { + class: "size-10 border", + get userId() { + return h.data.id; + }, + get pictureUrl() { + return e(w); + }, + }); + var Ft = n(Ve, 2); + W(Ft, { + class: "size-5 border-0", + get userId() { + return h.data.id; + }, + get pictureUrl() { + return e(w); + }, + }), + a(he); + var Ge = n(he, 2), + ae = o(Ge); + ae.__click = [_r, Be]; + var Xt = o(ae); + $t(Xt, { class: "size-5" }), a(ae); + var Je = n(ae, 2), + Qe = o(Je), + et = o(Qe); + Ut(et, { class: "size-5" }); + var Zt = n(et, 2); + (Zt.__change = [zt, Ae, He, _, w]), a(Qe), a(Je), a(Ge), a(be); + var tt = n(be, 2), + we = o(tt); + ua( + we, + 23, + () => Lt, + (i) => i.idx, + (i, x, $) => { + const I = N(() => { + const [Q, ze, Ce] = e(x).rgb; + return { r: Q, g: ze, b: Ce }; + }), + P = N(() => Ta({ r: e(I).r, g: e(I).g, b: e(I).b })), + le = N(() => e(T) === e(P) && !e(y)); + var Z = fr(), + S = o(Z); + (S.__click = [pr, T, P, y]), + a(Z), + Re( + (Q) => { + K(Z, 1, Q), + ie(Z, "data-tip", e(x).name), + K( + S, + 1, + wt({ + "btn relative aspect-square w-full rounded-xl": !0, + "border-primary ring-primary ring-2": e(le), + "border-base-content/20": !e(le), + "max-sm:h-6 max-sm:rounded-md": !0, + }) + ), + yt(S, `background: rgb(${e(I).r} ${e(I).g} ${e(I).b})`), + ie(S, "aria-label", e(x).name), + ie(S, "id", `color-${e(x).idx ?? ""}`); + }, + [ + () => + wt({ + tooltip: !0, + "max-sm:hidden": !Pt.has(e(x).idx), + "max-sm:before:-translate-x-1/4": + e($) % 8 === 0 && e(x).name.length > 7, + "max-sm:before:translate-x-1/4": + (e($) - 7) % 8 === 0 && e(x).name.length > 7, + }), + ] + ), + z("focus", S, () => { + u(T, e(P), !0), u(y, !1); + }), + A(i, Z); + } + ), + a(we); + var at = n(we, 2), + G = o(at); + G.__click = [mr, y]; + var rt = o(G), + st = n(rt, 2); + va(st), a(G); + var re = n(G, 2); + let ot; + var se = o(re); + se.__click = [gr, ee]; + var nt = o(se), + lt = n(nt), + it = o(lt); + ha(it, { class: "size-4.5" }); + var Ot = n(it); + a(lt), a(se), a(re); + var ct = n(re, 2), + ye = o(ct), + Wt = o(ye); + xt(), a(ye); + var J = n(ye, 2); + let dt; + J.__click = [br, y]; + var jt = o(J); + xa(jt, { + class: "size-5", + get filled() { + return e(y); + }, + }), + a(J), + a(ct), + a(at), + a(tt), + a(Oe), + a(l); + var ut = n(l, 2); + wa(ut, { + get open() { + return It.dropletsDialogOpen; + }, + set open(i) { + It.dropletsDialogOpen = i; + }, + }); + var ke = n(ut, 2), + Ie = o(ke), + De = n(o(Ie), 2), + Nt = o(De, !0); + a(De); + var $e = n(De, 2), + vt = o($e); + W(vt, { + class: "size-20", + get userId() { + return h.data.id; + }, + get pictureUrl() { + return e(w); + }, + }); + var _t = n(vt, 2); + Le(_t, { + get userId() { + return h.data.id; + }, + get level() { + return h.data.level; + }, + get pictureUrl() { + return e(w); + }, + }); + var pt = n(_t, 2); + W(pt, { + class: "size-10 border", + get userId() { + return h.data.id; + }, + get pictureUrl() { + return e(w); + }, + }); + var Kt = n(pt, 2); + W(Kt, { + class: "size-5 border-0", + get userId() { + return h.data.id; + }, + get pictureUrl() { + return e(w); + }, + }), + a($e); + var Ue = n($e, 2), + Vt = o(Ue, !0); + a(Ue); + var ft = n(Ue, 2), + oe = o(ft); + oe.__click = [hr, ee]; + var Gt = o(oe, !0); + a(oe); + var ne = n(oe, 2); + ne.__click = [xr, ue, _]; + var mt = o(ne), + Jt = n(mt); + { + var Qt = (i) => { + var x = wr(); + A(i, x); + }; + Me(Jt, (i) => { + e(ue) && i(Qt); + }); + } + a(ne), a(ft), a(Ie); + var gt = n(Ie, 2), + bt = o(gt), + ea = o(bt, !0); + a(bt), + a(gt), + a(ke), + Pe( + ke, + (i) => u(ee, i), + () => e(ee) + ), + Re( + (i, x, $, I, P, le, Z, S, Q, ze, Ce, ta, aa, ra, sa, oa, na) => { + k(R, i), + ie(Y, "data-tip", x), + k(te, `${$ ?? ""} `), + k(Ht, `${I ?? ""}:`), + (We = K(X, 1, "pixelated size-full", null, We, P)), + (Ne = K( + je, + 1, + "pixelated pointer-events-none absolute left-0 top-0 size-full", + null, + Ne, + le + )), + k(Yt, `${Z ?? ""}:`), + yt(rt, `background: ${e(T)}`), + (ot = K(re, 1, "", null, ot, S)), + (se.disabled = !e(Se)), + k(nt, `${Q ?? ""} `), + k(Ot, ` ${ze ?? ""}`), + k(Wt, `${Ce ?? ""} `), + (dt = K( + J, + 1, + "btn btn-lg btn-square sm:btn-xl shadow-md", + null, + dt, + ta + )), + k(Nt, aa), + k(Vt, ra), + k(Gt, sa), + (ne.disabled = e(ue)), + k(mt, `${oa ?? ""} `), + k(ea, na); + }, + [ + () => nr(), + () => er(), + () => rr(), + () => Dt(), + () => ({ "cursor-pencil": !e(y), "cursor-eraser": e(y) }), + () => ({ hidden: e(de) }), + () => Dt(), + () => ({ tooltip: !e(Se) }), + () => za(), + () => c.price.toLocaleString("en-US"), + () => ya(), + () => ({ "btn-primary": e(y) }), + () => ka(), + () => Fa(), + () => $a(), + () => Ua(), + () => Da(), + ] + ), + z("mouseleave", X, (i) => { + ve(i.offsetX, i.offsetY), (D = [i.offsetX, i.offsetY]); + }), + z("focus", G, () => { + u(y, !1); + }), + _a( + st, + () => e(T), + (i) => u(T, i) + ), + z("focus", J, () => { + u(y, !0); + }), + A(s, d); + }, + At = (s) => { + var d = ht(), + l = Te(d); + { + var v = (p) => { + var f = kr(), + g = o(f), + b = o(g, !0); + a(g); + var R = n(g, 2), + M = o(R, !0); + a(R), + a(f), + Re( + (Y, F) => { + k(b, Y), k(M, F); + }, + [() => Na(), () => Ga()] + ), + A(p, f); + }; + Me( + l, + (p) => { + !h.data && !h.loading && p(v); + }, + !0 + ); + } + A(s, d); + }; + Me(Et, (s) => { + h.data ? s(St) : s(At, !1); + }); + } + A(r, Ye), da(); +} +la(["change", "click", "touchmove", "mousemove"]); +export { Fr as component }; diff --git a/frontend-backup/_app/immutable/nodes/18.WvT7vRmm.js b/frontend-backup/_app/immutable/nodes/18.24JvCqRi.js similarity index 98% rename from frontend-backup/_app/immutable/nodes/18.WvT7vRmm.js rename to frontend-backup/_app/immutable/nodes/18.24JvCqRi.js index 3b49b30..5a79765 100644 --- a/frontend-backup/_app/immutable/nodes/18.WvT7vRmm.js +++ b/frontend-backup/_app/immutable/nodes/18.24JvCqRi.js @@ -1,4 +1,52 @@ -import"../chunks/B2cHk4HI.js";import"../chunks/cUtKXcx3.js";import{f as o,b as v,$ as c,d as t,r as a,n as i}from"../chunks/BDALf20I.js";import{h as d}from"../chunks/BUhRjcOt.js";import{L as p}from"../chunks/CYItkO2S.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="80007cd4-11f3-4974-9d84-af15371fd311",s._sentryDebugIdIdentifier="sentry-dbid-80007cd4-11f3-4974-9d84-af15371fd311")})()}catch{}var r=o(`

              PRIVACY POLICY

              Last updated June 10, 2025



              This Privacy Notice for Wplace ("we," "us," or "our"), describes how and why we might access, collect, store, use, and/or share ("process") your +import "../chunks/Ch2Ub8FX.js"; +import "../chunks/BOREeBzQ.js"; +import { + f as o, + b as v, + $ as c, + d as t, + r as a, + n as i, +} from "../chunks/CMvZtFtm.js"; +import { h as d } from "../chunks/P77cUGnY.js"; +import { L as p } from "../chunks/D3yDgRbd.js"; +(function () { + try { + var s = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + s.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var s = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + e = new s.Error().stack; + e && + ((s._sentryDebugIds = s._sentryDebugIds || {}), + (s._sentryDebugIds[e] = "80007cd4-11f3-4974-9d84-af15371fd311"), + (s._sentryDebugIdIdentifier = + "sentry-dbid-80007cd4-11f3-4974-9d84-af15371fd311")); + })(); +} catch {} +var r = + o(`

              PRIVACY POLICY

              Last updated June 10, 2025



              This Privacy Notice for Wplace ("we," "us," or "our"), describes how and why we might access, collect, store, use, and/or share ("process") your personal information when you use our services ("Services"), including when you:
              • Visit our website at wplace.live, or any website of ours that links to this Privacy Notice
              • Use Wplace. Wplace overlays a massive, interactive canvas on the map of the Earth, letting users collaborate in real time by placing pixels and building art as a community.
              • Engage with us in other related ways, including any sales, marketing, or events
              Questions or concerns? Reading this Privacy Notice will help @@ -1034,4 +1082,14 @@ import"../chunks/B2cHk4HI.js";import"../chunks/cUtKXcx3.js";import{f as o,b as v your personal information, - please visit: wplace.live.
              `);function g(s){var e=r();d(b=>{c.title="Wplace - Privacy Policy"});var l=t(e),n=t(l);p(n,{class:"mb-4",hasText:!0}),a(l),i(2),a(e),v(s,e)}export{g as component}; + please visit: wplace.live.`); +function g(s) { + var e = r(); + d((b) => { + c.title = "FurryPlace - Privacy Policy"; + }); + var l = t(e), + n = t(l); + p(n, { class: "mb-4", hasText: !0 }), a(l), i(2), a(e), v(s, e); +} +export { g as component }; diff --git a/frontend-backup/_app/immutable/nodes/19.B2QYN1F_.js b/frontend-backup/_app/immutable/nodes/19.B2QYN1F_.js new file mode 100644 index 0000000..6c06c1b --- /dev/null +++ b/frontend-backup/_app/immutable/nodes/19.B2QYN1F_.js @@ -0,0 +1,64 @@ +import "../chunks/Ch2Ub8FX.js"; +import "../chunks/BOREeBzQ.js"; +import { + f as l, + b as o, + $ as n, + d as s, + r as t, + n as d, +} from "../chunks/CMvZtFtm.js"; +import { h as u } from "../chunks/P77cUGnY.js"; +import { L as c } from "../chunks/D3yDgRbd.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + a = new e.Error().stack; + a && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[a] = "d0716220-f70f-4592-a87e-840e1b3a49be"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-d0716220-f70f-4592-a87e-840e1b3a49be")); + })(); +} catch {} +var h = + l(`

              Refund Policy

              Last update: September 17, 2025

              How to request a refund?

              You may request a refund when:

              Refunds will not be granted when:

              Deadlines:

              `); +function w(e) { + var a = h(); + u((f) => { + n.title = "FurryPlace - Refund Policy"; + }); + var i = s(a), + r = s(i); + c(r, { size: "lg", class: "mb-4", hasText: !0 }), t(i), d(20), t(a), o(e, a); +} +export { w as component }; diff --git a/frontend-backup/_app/immutable/nodes/19.Dqy7C9y2.js b/frontend-backup/_app/immutable/nodes/19.Dqy7C9y2.js deleted file mode 100644 index 2e7603e..0000000 --- a/frontend-backup/_app/immutable/nodes/19.Dqy7C9y2.js +++ /dev/null @@ -1,6 +0,0 @@ -import"../chunks/B2cHk4HI.js";import"../chunks/cUtKXcx3.js";import{f as l,b as o,$ as n,d as s,r as t,n as d}from"../chunks/BDALf20I.js";import{h as u}from"../chunks/BUhRjcOt.js";import{L as c}from"../chunks/CYItkO2S.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="d0716220-f70f-4592-a87e-840e1b3a49be",e._sentryDebugIdIdentifier="sentry-dbid-d0716220-f70f-4592-a87e-840e1b3a49be")})()}catch{}var h=l(`

              Refund Policy

              Last update: September 17, 2025

              How to request a refund?

              You may request a refund when:

              Refunds will not be granted when:

              Deadlines:

              `);function w(e){var a=h();u(f=>{n.title="Wplace - Refund Policy"});var i=s(a),r=s(i);c(r,{size:"lg",class:"mb-4",hasText:!0}),t(i),d(20),t(a),o(e,a)}export{w as component}; diff --git a/frontend-backup/_app/immutable/nodes/2.-6emjql3.js b/frontend-backup/_app/immutable/nodes/2.-6emjql3.js new file mode 100644 index 0000000..cb0a38b --- /dev/null +++ b/frontend-backup/_app/immutable/nodes/2.-6emjql3.js @@ -0,0 +1,142 @@ +import "../chunks/Ch2Ub8FX.js"; +import { + p as L, + f as b, + b as f, + c as R, + $ as S, + d as t, + n as y, + r as s, + s as x, + t as W, + g as i, + u as $, +} from "../chunks/CMvZtFtm.js"; +import { s as j } from "../chunks/DVA6u9-7.js"; +import { s as z } from "../chunks/DoL3ojdE.js"; +import { k as M, t as g } from "../chunks/BBgyHb-Z.js"; +import { e as N, i as P } from "../chunks/CXkjfmFU.js"; +import { h as U } from "../chunks/P77cUGnY.js"; +import { c as Y, s as q, a as B } from "../chunks/C5yqZvKC.js"; +import { p as _ } from "../chunks/B6ZK_HZO.js"; +import { L as C } from "../chunks/D3yDgRbd.js"; +import { f as w } from "../chunks/wZ7b5CwQ.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + d = new e.Error().stack; + d && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[d] = "b13ebcf7-0e8c-49ec-bc33-0015c8d1ee6b"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-b13ebcf7-0e8c-49ec-bc33-0015c8d1ee6b")); + })(); +} catch {} +var F = b(' '), + G = b("
              "), + H = b( + '
              ' + ); +function re(e, d) { + L(d, !0); + const m = $(() => _.url.pathname), + k = [ + { label: "Dashboard", href: "/admin/dashboard", key: "dashboard" }, + { label: "Mods", href: "/admin/mods/leaderboard", key: "mods" }, + { label: "Users", href: "/admin/users", key: "users" }, + { label: "Alliances", href: "/admin/alliances", key: "alliances" }, + ]; + function A(r) { + return i(m) === r || i(m).startsWith(r + "/"); + } + var n = H(); + U((r) => { + S.title = "FurryPlace - Admin"; + }); + var l = t(n), + c = t(l), + p = t(c), + D = t(p); + C(D, { class: "h-7 w-auto" }), y(2), s(p), y(2), s(c); + var u = x(c, 2), + v = t(u); + N( + v, + 21, + () => k, + P, + (r, a) => { + var o = F(), + I = t(o, !0); + s(o), + W( + (T) => { + q(o, "href", i(a).href), B(o, 1, T), j(I, i(a).label); + }, + [ + () => + Y({ tab: !0, "font-semibold": !0, "tab-active": A(i(a).href) }), + ] + ), + f(r, o); + } + ), + s(v), + s(u), + s(l); + var h = x(l, 2), + E = t(h); + M( + E, + () => _.url.pathname, + (r) => { + var a = G(), + o = t(a); + z(o, () => d.children), + s(a), + g( + 1, + a, + () => w, + () => ({ duration: 120 }) + ), + g( + 2, + a, + () => w, + () => ({ duration: 80 }) + ), + f(r, a); + } + ), + s(h), + s(n), + f(e, n), + R(); +} +export { re as component }; diff --git a/frontend-backup/_app/immutable/nodes/2.BY7SdjrD.js b/frontend-backup/_app/immutable/nodes/2.BY7SdjrD.js deleted file mode 100644 index 6f0d457..0000000 --- a/frontend-backup/_app/immutable/nodes/2.BY7SdjrD.js +++ /dev/null @@ -1,47015 +0,0 @@ -var ky = Object.defineProperty; -var ng = b => { - throw TypeError(b) -}; -var Ey = (b, l, _) => l in b ? ky(b, l, { - enumerable: !0, - configurable: !0, - writable: !0, - value: _ -}) : b[l] = _; -var lr = (b, l, _) => Ey(b, typeof l != "symbol" ? l + "" : l, _), - lf = (b, l, _) => l.has(b) || ng("Cannot " + _); -var et = (b, l, _) => (lf(b, l, "read from private field"), _ ? _.call(b) : l.get(b)), - br = (b, l, _) => l.has(b) ? ng("Cannot add the same private member more than once") : l instanceof WeakSet ? l.add(b) : l.set(b, _), - Jn = (b, l, _, C) => (lf(b, l, "write to private field"), C ? C.call(b, _) : l.set(b, _), _), - Fr = (b, l, _) => (lf(b, l, "access private method"), _); -import "../chunks/Bzak7iHL.js"; -import { - o as Ii, - s as Ji -} from "../chunks/ByKBPM-D.js"; -import { - Y as zy, - aZ as Ly, - bp as Dy, - a$ as Ry, - bq as By, - be as Fy, - aR as nt, - A as x, - aH as oe, - aG as zn, - p as Sr, - aT as lt, - w as Zr, - f as Ie, - d as k, - s as V, - br as Oy, - r as A, - t as Ge, - b as H, - c as Pr, - an as Wi, - o as fi, - bj as an, - q as Tr, - bo as Su, - v as Hf, - x as Go, - aS as Jt, - a as zt, - aU as Fn, - ay as Ny, - ax as ag, - az as jy, - aB as Mg, - bs as ts, - ap as fa, - bt as Ag, - ak as qy -} from "../chunks/DUoKDNpf.js"; -import { - s as fe -} from "../chunks/g8c1BvYP.js"; -import { - p as Et, - i as Ue, - r as Qt, - s as lo, - u as kg -} from "../chunks/5NasrULQ.js"; -import { - h as Vy -} from "../chunks/2CRhGZHc.js"; -import { - a as er, - C as Uy, - r as ea, - e as On, - s as Or, - f as Jl, - b as zr, - d as uc, - g as Tu, - c as Vo -} from "../chunks/B1GmkH4o.js"; -import { - d as Zy, - a as Zo, - f as $o, - L as Wf, - p as Xf, - k as Pu, - t as En, - C as $y, - T as Eg, - G as Gy -} from "../chunks/Y9es74tr.js"; -import { - p as La -} from "../chunks/Cp3o644A.js"; -import { - S as $n, - a as ni, - t as qr, - u as Dt, - i as ds, - j as Hy, - k as Wy, - l as Xy, - m as Ky, - n as Yy, - o as Jy, - p as Qy, - q as ex, - r as tx, - v as rx, - c as Cd, - g as oa, - C as sg, - w as og, - x as ix, - y as nx, - z as ax -} from "../chunks/1lh-LSvX.js"; -import { - c as zg, - A as pa, - a as yf, - g as cf, - p as sx, - b as ox -} from "../chunks/D2m5UD3G.js"; -import { - g as Lg, - b as lx -} from "../chunks/KvV259my.js"; -import { - h as cx -} from "../chunks/BMKgGW48.js"; -import { - b as ps -} from "../chunks/CMs8vKjq.js"; -import { - g as jd, - d as qd, - h as Vd, - A as Dg, - f as tc, - D as Rg, - a as Ud, - r as ux, - i as hx, - I as lg, - e as dx, - c as px, - j as fx, - P as Bg, - b as mx -} from "../chunks/CBqzI9hL.js"; -import { - g as Fe, - l as _x -} from "../chunks/C5GsJ62f.js"; -import { - e as nn, - i as Zd -} from "../chunks/U908S-6f.js"; -import { - P as es, - g as Zn, - A as gx, - t as Fg, - b as Kf, - c as vx, - d as yx -} from "../chunks/DsJqb9ei.js"; -import "../chunks/D35KiPL1.js"; -import { - i as Og -} from "../chunks/D1ivTjwA.js"; -import { - L as Ng -} from "../chunks/07L1R_bo.js"; -import { - c as _n -} from "../chunks/BtP6pfnb.js"; -import { - L as xx, - T as jg, - a as bx -} from "../chunks/CQklNc9N.js"; -import { - _ as wx -} from "../chunks/Dp1pzeXC.js"; -import { - R as Tx, - r as Cx -} from "../chunks/DkBFL3pa.js"; -import { - W as Sx -} from "../chunks/CeLr1p76.js"; -const Px = []; - -function Ix(b, l = !1, _ = !1) { - return Sd(b, new Map, "", Px, null, _) -} - -function Sd(b, l, _, C, L = null, F = !1) { - if (typeof b == "object" && b !== null) { - var T = l.get(b); - if (T !== void 0) return T; - if (b instanceof Map) return new Map(b); - if (b instanceof Set) return new Set(b); - if (zy(b)) { - var o = Array(b.length); - l.set(b, o), L !== null && l.set(L, o); - for (var $ = 0; $ < b.length; $ += 1) { - var W = b[$]; - $ in b && (o[$] = Sd(W, l, _, C, null, F)) - } - return o - } - if (Ly(b) === Dy) { - o = {}, l.set(b, o), L !== null && l.set(L, o); - for (var ie in b) o[ie] = Sd(b[ie], l, _, C, null, F); - return o - } - if (b instanceof Date) return structuredClone(b); - if (typeof b.toJSON == "function" && !F) return Sd(b.toJSON(), l, _, C, b) - } - if (b instanceof EventTarget) return b; - try { - return structuredClone(b) - } catch { - return b - } -} - -function Mx() { - return Symbol(Ry) -} - -function $d(b, l) { - By(window, ["resize"], () => Fy(() => l(window[b]))) -} -const Ax = () => "Log in", - kx = () => "登入", - Ex = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Ax() : kx(), - zx = () => "Store", - Lx = () => "商店", - qg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? zx() : Lx(), - Dx = () => "Alliance", - Rx = () => "工会", - Gd = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Dx() : Rx(), - Bx = () => "Leaderboard", - Fx = () => "排行榜", - Yf = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Bx() : Fx(), - Ox = () => "Unlock", - Nx = () => "解锁", - jx = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Ox() : Nx(), - qx = () => "Lock", - Vx = () => "锁定", - Ux = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? qx() : Vx(), - Zx = () => "Info", - $x = () => "信息", - Gx = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Zx() : $x(), - Hx = () => "Zoom in", - Wx = () => "放大", - Xx = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Hx() : Wx(), - Kx = () => "Zoom out", - Yx = () => "缩小", - Jx = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Kx() : Yx(), - Qx = () => "Previous location", - e1 = () => "上一个位置", - t1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Qx() : e1(), - r1 = () => "Offline", - i1 = () => "连接丢失", - n1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? r1() : i1(), - a1 = () => "Zoom in to see the pixels", - s1 = () => "放大以查看像素", - o1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? a1() : s1(), - l1 = () => "Phone verification required", - c1 = () => "需要手机号验证", - cg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? l1() : c1(), - u1 = () => "My location", - h1 = () => "我的位置", - d1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? u1() : h1(), - p1 = () => "You don't have charges to paint. Wait to recharge.", - f1 = () => "你没有足够的像素点,请等待恢复.", - m1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? p1() : f1(), - _1 = () => "Map powered by:", - g1 = () => "地图提供方:", - v1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? _1() : g1(), - y1 = () => "OpenMapTiles Data from", - x1 = () => "OpenMapTiles 出品方:", - b1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? y1() : x1(), - w1 = () => "Feedback and bugs", - T1 = () => "BUG反馈", - C1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? w1() : T1(), - S1 = () => "Overview", - P1 = () => "总览", - I1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? S1() : P1(), - M1 = () => "How to paint faster", - A1 = () => "如何画得更快?", - k1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? M1() : A1(), - E1 = () => "When painting, click on the button", - z1 = () => "在绘制时候按住按钮", - L1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? E1() : z1(), - D1 = () => "on the top right corner of the screen. This will lock the screen but it'll also enable painting by moving your finger over the map.", - R1 = () => "屏幕右上角。这将锁定屏幕,但也可以通过在地图上移动手指来绘画.", - B1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? D1() : R1(), - F1 = () => "Hold", - O1 = () => "按住", - N1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? F1() : O1(), - j1 = () => "SPACE", - q1 = () => "空格", - V1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? j1() : q1(), - U1 = () => "and move your cursor over the map.", - Z1 = () => "并且移动鼠标.", - $1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? U1() : Z1(), - G1 = () => "Explore", - H1 = () => "探索", - W1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? G1() : H1(), - X1 = () => "Recharge paint charges", - K1 = () => "立刻恢复像素点", - Y1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? X1() : K1(), - J1 = () => "Items", - Q1 = () => "物品", - eb = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? J1() : Q1(), - tb = () => "Get more charges", - rb = () => "获得更多像素点", - ib = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? tb() : rb(), - nb = b => `+${b.amount} Max. Charges`, - ab = b => `+${b.amount} 最大像素容量`, - sb = (b, l = {}) => (l.locale ?? Fe()) === "en" ? nb(b) : ab(b), - ob = () => "Increase your maximum paint charges capacity", - lb = () => "提高最大像素点容量", - cb = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? ob() : lb(), - ub = () => "Profile picture", - hb = () => "头像", - db = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? ub() : hb(), - pb = () => "Add a new 16x16 profile picture", - fb = () => "添加一个新的16x16头像", - mb = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? pb() : fb(), - _b = () => "Not enough droplets", - gb = () => "没有足够的水滴", - Hd = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? _b() : gb(), - vb = () => "Show profile", - yb = () => "显示个人资料", - xb = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? vb() : yb(), - bb = () => "Menu", - wb = () => "菜单", - Tb = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? bb() : wb(), - Cb = b => `Could not install the app: ${b.error}`, - Sb = b => `无法安装App: ${b.error}`, - Pb = (b, l = {}) => (l.locale ?? Fe()) === "en" ? Cb(b) : Sb(b), - Ib = () => "Install App", - Mb = () => "安装App", - Ab = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Ib() : Mb(), - kb = () => "Livestreams", - Eb = () => "直播", - zb = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? kb() : Eb(), - Lb = () => "Log Out", - Db = () => "退出登录", - Rb = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Lb() : Db(), - Bb = () => "Hide UI", - Fb = () => "隐藏UI", - Ob = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Bb() : Fb(), - Nb = () => "Change picture:", - jb = () => "更换头像:", - qb = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Nb() : jb(), - Vb = () => "Show last painted pixel on alliance", - Ub = () => "在工会排行榜中展示你最后一次绘画位置", - Zb = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Vb() : Ub(), - $b = () => "Delete Account", - Gb = () => "注销账号", - ug = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? $b() : Gb(), - Hb = () => "Save", - Wb = () => "保存", - Xb = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Hb() : Wb(), - Kb = () => "Are you absolutely sure?", - Yb = () => "你真的确定吗?", - Jb = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Kb() : Yb(), - Qb = () => "This will permanently delete your account and all associated data. This action cannot be undone.", - e2 = () => "这会永久删除你的账号和所有数据,并且无法撤销。", - t2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Qb() : e2(), - r2 = () => "Profile", - i2 = () => "资料", - n2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? r2() : i2(), - a2 = () => "Display your country’s flag next to your username. Plus, when painting in regions where you own the corresponding flag, you recover 10% of the charges spent.", - s2 = () => "在你的用户名旁边显示一个旗帜。而且,当你在拥有对应旗帜的区域绘制时,可以返还所消耗像素点的10%。", - o2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? a2() : s2(), - l2 = () => "Does not need to be equipped to provide the bonus", - c2 = () => "即使未装备,也能提供加成。", - u2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? l2() : c2(), - h2 = () => "Equipped", - d2 = () => "已装备", - p2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? h2() : d2(), - f2 = () => "Equip", - m2 = () => "装备", - _2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? f2() : m2(), - g2 = () => "Country", - v2 = () => "国家或地区", - Vg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? g2() : v2(), - y2 = () => "No country found.", - x2 = () => "没有找到地区.", - b2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? y2() : x2(), - w2 = () => "Welcome to", - T2 = () => "欢迎来到", - C2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? w2() : T2(), - S2 = () => "Rules", - P2 = () => "规则", - I2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? S2() : P2(), - M2 = () => "Important", - A2 = () => "重要", - k2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? M2() : A2(), - E2 = () => "🚫 No inappropriate content (+18, hate speech, inappropriate links, highly suggestive material, ...)", - z2 = () => "🚫 Conteúdo inapropriado não permitido (+18, discurso de ódio, links inapropriados, conteúdo altamente sugestivo, ...)", - L2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? E2() : z2(), - D2 = () => "😈 Do not paint over other artworks using random colors or patterns just to mess things up", - R2 = () => "😈 Não desenhe por cima de outras artes usando cores ou padrões aleatórios só para bagunçar", - B2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? D2() : R2(), - F2 = () => "✅ Paint with more than one account", - O2 = () => "✅ Não desenhe com mais de uma conta", - N2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? F2() : O2(), - j2 = () => "✅ Use of bots or scripts is allowed", - q2 = () => "✅ Usar bots não é permitido", - V2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? j2() : q2(), - U2 = () => "🙅 Disclosing other's personal information is not allowed", - Z2 = () => "🙅 Divulgar informações pessoais dos outros não é permitido", - $2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? U2() : Z2(), - G2 = () => "✅ Painting over other artworks to complement them or create a new drawing is allowed", - H2 = () => "✅ Desenhar sobre outras artes para complementar ou criar novas artes é permitido", - W2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? G2() : H2(), - X2 = () => "✅ Griefing political party flags or portraits of politicians is allowed", - K2 = () => "✅ Desenhar sobre bandeiras de partidos e retratos de políticos é permitido", - Y2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? X2() : K2(), - J2 = () => "Violations of these rules may result in suspension of your account.", - Q2 = () => "违反会导致你被封禁。", - ew = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? J2() : Q2(), - tw = () => "Understood", - rw = () => "我同意", - iw = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? tw() : rw(), - nw = () => "Toggle art opacity", - aw = () => "开关像素透明度", - Ug = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? nw() : aw(), - sw = () => "Paint", - ow = () => "绘画", - Zg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? sw() : ow(), - lw = () => "Select a color", - cw = () => "选择一个娅安瑟", - uw = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? lw() : cw(), - hw = () => "Select a pixel to erase", - dw = () => "选择一个像素来擦除", - pw = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? hw() : dw(), - fw = () => "Pick a color from the map", - mw = () => "从地图上选择一个颜色", - _w = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? fw() : mw(), - gw = () => "Click", - vw = () => "点击", - yw = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? gw() : vw(), - xw = () => "SPACE", - bw = () => "空格", - ww = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? xw() : bw(), - Tw = () => "or hold", - Cw = () => "或按住", - Sw = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Tw() : Cw(), - Pw = () => "to paint,", - Iw = () => "来绘画", - Mw = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Pw() : Iw(), - Aw = () => "You can paint more than 1 pixel", - kw = () => "你可以绘制多个像素", - Ew = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Aw() : kw(), - zw = () => "Paint pixel", - Lw = () => "已经绘制像素", - Dw = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? zw() : Lw(), - Rw = () => "Color Picker", - Bw = () => "取色器", - Fw = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Rw() : Bw(), - Ow = () => "+2 max. charge/level", - Nw = () => "+2 最大像素点/每次升级", - jw = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Ow() : Nw(), - qw = () => "Name", - Vw = () => "名字", - xf = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? qw() : Vw(), - Uw = () => "Discord Username", - Zw = () => "社交媒体", - $w = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Uw() : Zw(), - Gw = () => "Max. Charges", - Hw = () => "像素点上限", - hg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Gw() : Hw(), - Ww = () => "Paint Charges", - Xw = () => "像素点包", - Kw = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Ww() : Xw(), - Yw = b => `+${b.amount} Paint Charges`, - Jw = b => `+${b.amount} 像素点`, - Qw = (b, l = {}) => (l.locale ?? Fe()) === "en" ? Yw(b) : Jw(b), - e5 = () => "Leave alliance", - t5 = () => "离开工会", - r5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? e5() : t5(), - i5 = () => "Members", - n5 = () => "成员", - $g = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? i5() : n5(), - a5 = () => "Headquarters", - s5 = () => "总部", - o5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? a5() : s5(), - l5 = () => "Not set", - c5 = () => "未设置", - u5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? l5() : c5(), - h5 = () => "You are not in an alliance", - d5 = () => "你没有加入一个工会", - p5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? h5() : d5(), - f5 = () => "Get invited to an alliance", - m5 = () => "得到一个邀请", - _5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? f5() : m5(), - g5 = () => "OR", - v5 = () => "或", - y5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? g5() : v5(), - x5 = () => "Create an alliance", - b5 = () => "创建工会", - w5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? x5() : b5(), - T5 = () => "Invite link", - C5 = () => "邀请", - S5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? T5() : C5(), - P5 = () => "Send the link below to everybody you want to invite to the alliance", - I5 = () => "发送这个链接给你要邀请加入的人", - M5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? P5() : I5(), - A5 = () => "Copied", - k5 = () => "已复制", - Gg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? A5() : k5(), - E5 = () => "Copy", - z5 = () => "复制", - bf = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? E5() : z5(), - L5 = () => "No description", - D5 = () => "没有描述", - Hg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? L5() : D5(), - R5 = () => "Invite", - B5 = () => "邀请", - F5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? R5() : B5(), - O5 = () => "No pixels painted", - N5 = () => "没有绘制像素", - Jf = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? O5() : N5(), - j5 = () => "Today", - q5 = () => "今天", - Wd = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? j5() : q5(), - V5 = () => "Week", - U5 = () => "本周", - Z5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? V5() : U5(), - $5 = () => "Month", - G5 = () => "本月", - H5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? $5() : G5(), - W5 = () => "All time", - X5 = () => "总计", - K5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? W5() : X5(), - Y5 = () => "this week", - J5 = () => "本周", - Qf = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Y5() : J5(), - Q5 = () => "this month", - eT = () => "本月", - em = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Q5() : eT(), - tT = () => "Player", - rT = () => "玩家", - tm = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? tT() : rT(), - iT = () => "Last pixel", - nT = () => "最后一次绘制", - aT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? iT() : nT(), - sT = () => "Create alliance", - oT = () => "创建工会", - lT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? sT() : oT(), - cT = () => "Alliance Name", - uT = () => "公会名称", - hT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? cT() : uT(), - dT = () => "Create", - pT = () => "创建", - fT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? dT() : pT(), - mT = () => "Give admin", - _T = () => "设为管理员", - gT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? mT() : _T(), - vT = () => "Ban from alliance", - yT = () => "踢出工会", - Wg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? vT() : yT(), - xT = () => "No action", - bT = () => "没有操作", - wT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? xT() : bT(), - TT = () => "Unban", - CT = () => "解除黑名单", - ST = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? TT() : CT(), - PT = () => "No banned users", - IT = () => "没有被踢出的用户", - MT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? PT() : IT(), - AT = () => "Update", - kT = () => "更新", - ET = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? AT() : kT(), - zT = () => "Error giving admin to user", - LT = () => "设置管理员失败", - DT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? zT() : LT(), - RT = () => "Users", - BT = () => "玩家", - FT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? RT() : BT(), - OT = () => "Banned", - NT = () => "已封禁", - jT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? OT() : NT(), - qT = () => "Regions", - VT = () => "区域", - UT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? qT() : VT(), - ZT = () => "Countries", - $T = () => "国家或地区", - GT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? ZT() : $T(), - HT = () => "Players", - WT = () => "玩家", - Xg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? HT() : WT(), - XT = () => "Alliances", - KT = () => "工会", - Kg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? XT() : KT(), - YT = () => "Region", - JT = () => "区域", - QT = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? YT() : JT(), - e3 = () => "Pixels", - t3 = () => "像素", - Ql = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? e3() : t3(), - r3 = () => "Painted", - i3 = () => "已绘制", - ec = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? r3() : i3(), - n3 = () => "Pixels painted inside the region", - a3 = () => "这个区域已绘制的像素", - s3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? n3() : a3(), - o3 = () => "Visit", - l3 = () => "查看", - c3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? o3() : l3(), - u3 = () => "Not painted", - h3 = () => "没有绘制", - d3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? u3() : h3(), - p3 = () => "Painted by", - f3 = () => "绘制者:", - m3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? p3() : f3(), - _3 = () => "Limit reached", - g3 = () => "已到达上限", - v3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? _3() : g3(), - y3 = () => "Favorite", - x3 = () => "收藏", - b3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? y3() : x3(), - w3 = () => "Share", - T3 = () => "分享", - C3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? w3() : T3(), - S3 = () => "Share place", - P3 = () => "分享位置", - I3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? S3() : P3(), - M3 = () => "Mute", - A3 = () => "静音", - k3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? M3() : A3(), - E3 = () => "Unmute", - z3 = () => "开启音效", - L3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? E3() : z3(), - D3 = () => "Select the headquarters location", - R3 = () => "选择总部位置", - B3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? D3() : R3(), - F3 = () => "Pixels painted inside the country", - O3 = () => "这个国家/地区已绘制的像素", - N3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? F3() : O3(), - j3 = () => "Username copied to clipboard", - q3 = () => "成功复制用户名", - V3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? j3() : q3(), - U3 = () => "No more charges", - Z3 = () => "没有更多像素点", - $3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? U3() : Z3(), - G3 = () => "You are not allowed to use multiple accounts. Use your main account to paint.", - H3 = () => "请勿使用多个账户绘制。", - W3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? G3() : H3(), - X3 = () => "SMS sent to", - K3 = () => "短信已发送到", - Y3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? X3() : K3(), - J3 = () => "Phone successfully verified", - Q3 = () => "手机验证成功", - eC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? J3() : Q3(), - tC = () => "Not a valid phone number", - rC = () => "手机号无效", - iC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? tC() : rC(), - nC = () => "Location unfavorited", - aC = () => "已取消收藏", - sC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? nC() : aC(), - oC = () => "Location favorited", - lC = () => "已收藏地区", - cC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? oC() : lC(), - uC = () => "Giving admin to user", - hC = () => "设为管理员", - dC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? uC() : hC(), - pC = () => "Profile updated", - fC = () => "资料已更新", - mC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? pC() : fC(), - _C = () => "Account successfully deleted", - gC = () => "账号注销成功", - vC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? _C() : gC(), - yC = () => "Logged out", - xC = () => "已退出登录", - bC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? yC() : xC(), - wC = () => "Could not logout. Try refreshing the page.", - TC = () => "退出失败,请尝试刷新页面。", - CC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? wC() : TC(), - SC = () => "You need to zoom in to select a pixel", - PC = () => "你需要放大才能选择像素", - IC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? SC() : PC(), - MC = () => "Phone verification", - AC = () => "手机号验证", - kC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? MC() : AC(), - EC = () => "Please verify your phone number to continue playing. This helps us keep bots out and ensure a safe, creative experience for everyone.", - zC = () => "如需继续游玩,请您验证手机号码。该操作有助于我们防范机器人账户,为全体用户创造安全的游戏体验.", - LC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? EC() : zC(), - DC = () => "Send Code", - RC = () => "发送验证码", - BC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? DC() : RC(), - FC = () => "Input the code", - OC = () => "请输入验证码", - NC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? FC() : OC(), - jC = () => "Sent to", - qC = () => "已发送到", - VC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? jC() : qC(), - UC = () => "Resend Code", - ZC = () => "重新发送验证码", - $C = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? UC() : ZC(), - GC = () => "Try another number", - HC = () => "请尝试其他手机号", - WC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? GC() : HC(), - XC = () => "Edit profile", - KC = () => "编辑资料", - YC = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? XC() : KC(), - JC = () => "Image", - QC = () => "图像", - eS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? JC() : QC(), - tS = () => "Download", - rS = () => "下载", - iS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? tS() : rS(), - nS = () => "Image copied to clipboard", - aS = () => "图像已复制", - sS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? nS() : aS(), - oS = () => "My map is lagging", - lS = () => "地图卡顿", - cS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? oS() : lS(), - uS = () => "Verify if", - hS = () => "确保", - dS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? uS() : hS(), - pS = () => "Use hardware acceleration when available", - fS = () => "使用图形加速", - mS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? pS() : fS(), - _S = () => "is enabled on", - gS = () => "已启用", - vS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? _S() : gS(), - yS = () => "Follow the instructions to enable hardware acceleration", - xS = () => "按照说明启用硬件加速", - bS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? yS() : xS(), - wS = () => "Report User", - TS = () => "举报", - Yg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? wS() : TS(), - CS = () => "Ban User", - SS = () => "封禁用户", - Jg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? CS() : SS(), - PS = () => "Select the reason", - IS = () => "选择原因", - MS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? PS() : IS(), - AS = () => "Other", - kS = () => "其他", - ES = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? AS() : kS(), - zS = () => "Other reason not listed", - LS = () => "其他未列出的原因", - DS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? zS() : LS(), - RS = () => "Extra context on what happened (required)", - BS = () => "举报详情(必填)", - FS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? RS() : BS(), - OS = () => "Report", - NS = () => "提交举报", - jS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? OS() : NS(), - qS = () => "Report sent successfully", - VS = () => "举报成功", - US = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? qS() : VS(), - ZS = () => "Select the report reason", - $S = () => "选择举报原因", - GS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? ZS() : $S(), - HS = () => "Report failed. Please try again later", - WS = () => "举报失败,请稍后重试", - XS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? HS() : WS(), - KS = () => "Moderation", - YS = () => "管理", - JS = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? KS() : YS(), - QS = () => "Terms", - eP = () => "用户协议", - tP = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? QS() : eP(), - rP = () => "Privacy", - iP = () => "隐私政策", - nP = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? rP() : iP(), - aP = () => "Clear area", - sP = () => "清除区域", - oP = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? aP() : sP(), - lP = () => "Select the area's first corner", - cP = () => "请选择第一个角", - uP = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? lP() : cP(), - hP = () => "Select the area's opposite corner", - dP = () => "请选择第二个角", - pP = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? hP() : dP(), - fP = () => "Required", - mP = () => "必须", - _P = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? fP() : mP(), - gP = b => `Min. characters: ${b.min}`, - vP = b => `最少${b.min}个字2`, - yP = (b, l = {}) => (l.locale ?? Fe()) === "en" ? gP(b) : vP(b), - xP = b => `Max. characters: ${b.max}`, - bP = b => `最多${b.max}个字`, - wP = (b, l = {}) => (l.locale ?? Fe()) === "en" ? xP(b) : bP(b), - TP = () => "封禁用户", - CP = () => "timeout_user", - Qg = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? CP() : TP(), - language_en = (t = {}, e = {}) => (e.locale ?? o()) === "en", - - Text1_EN = () => "You don't have charges to paint.", - Text1_CN = () => "你没有足够的像素点.", - Text1 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Text1_EN() : Text1_CN(), - Text2_EN = () => "Next charge in", - Text2_CN = () => "距离下一次恢复还有:", - Text2 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Text2_EN() : Text2_CN(), - Text3_EN = () => "Droplets", - Text3_CN = () => "水滴", - Text3 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Text3_EN() : Text3_CN(), - Text5_EN = () => "Unlock", - Text5_CN = () => "解锁颜色", - Text5 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Text5_EN() : Text5_CN(), - Text6_EN = () => "Permanently unlock the color", - Text6_CN = () => "永久解锁这个颜色", - Text6 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Text6_EN() : Text6_CN(), - Text7_EN = () => "Close", - Text7_CN = () => "关闭", - Text7 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Text7_EN() : Text7_CN(), - Text8_EN = () => "Flags", - Text8_CN = () => "旗帜", - Text8 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Text8_EN() : Text8_CN(), - Text9_EN = () => "Level", - Text9_CN = () => "等级", - Text9 = (b = {}, l = {}) => (l.locale ?? Fe()) === "en" ? Text9_EN() : Text9_CN(), - - Es = 2 * Math.PI * 6378137 / 2; - -class hc { - constructor(l = 256) { - lr(this, "initialResolution"); - this.tileSize = l, this.initialResolution = 2 * Es / this.tileSize - } - latLonToMeters(l, _) { - const C = _ / 180 * Es, - L = Math.log(Math.tan((90 + l) * Math.PI / 360)) / (Math.PI / 180) * Es / 180; - return [C, L] - } - metersToLatLon(l, _) { - const C = l / Es * 180; - let L = _ / Es * 180; - return L = 180 / Math.PI * (2 * Math.atan(Math.exp(L * Math.PI / 180)) - Math.PI / 2), [L, C] - } - pixelsToMeters(l, _, C) { - const L = this.resolution(C), - F = l * L - Es, - T = Es - _ * L; - return [F, T] - } - pixelsToLatLon(l, _, C) { - const [L, F] = this.pixelsToMeters(l, _, C); - return this.metersToLatLon(L, F) - } - latLonToPixels(l, _, C) { - const [L, F] = this.latLonToMeters(l, _); - return this.metersToPixels(L, F, C) - } - latLonToPixelsFloor(l, _, C) { - const [L, F] = this.latLonToPixels(l, _, C); - return [Math.floor(L), Math.floor(F)] - } - metersToPixels(l, _, C) { - const L = this.resolution(C), - F = (l + Es) / L, - T = (Es - _) / L; - return [F, T] - } - latLonToTile(l, _, C) { - const [L, F] = this.latLonToMeters(l, _); - return this.metersToTile(L, F, C) - } - metersToTile(l, _, C) { - const [L, F] = this.metersToPixels(l, _, C); - return this.pixelsToTile(L, F) - } - pixelsToTile(l, _) { - const C = Math.ceil(l / this.tileSize) - 1, - L = Math.ceil(_ / this.tileSize) - 1; - return [C, L] - } - pixelsToTileLocal(l, _) { - return { - tile: this.pixelsToTile(l, _), - pixel: [Math.floor(l) % this.tileSize, Math.floor(_) % this.tileSize] - } - } - tileBounds(l, _, C) { - const [L, F] = this.pixelsToMeters(l * this.tileSize, _ * this.tileSize, C), [T, o] = this.pixelsToMeters((l + 1) * this.tileSize, (_ + 1) * this.tileSize, C); - return { - min: [L, F], - max: [T, o] - } - } - tileBoundsLatLon(l, _, C) { - const L = this.tileBounds(l, _, C); - return { - min: this.metersToLatLon(L.min[0], L.min[1]), - max: this.metersToLatLon(L.max[0], L.max[1]) - } - } - resolution(l) { - return this.initialResolution / 2 ** l - } - latLonToTileAndPixel(l, _, C) { - const [L, F] = this.latLonToMeters(l, _), [T, o] = this.metersToTile(L, F, C), [$, W] = this.metersToPixels(L, F, C); - return { - tile: [T, o], - pixel: [Math.floor($) % this.tileSize, Math.floor(W) % this.tileSize] - } - } - pixelBounds(l, _, C) { - return { - min: this.pixelsToMeters(l, _, C), - max: this.pixelsToMeters(l + 1, _ + 1, C) - } - } - pixelToBoundsLatLon(l, _, C) { - const L = this.pixelBounds(l, _, C), - F = .001885, - T = (L.max[0] - L.min[0]) * F, - o = (L.max[1] - L.min[1]) * F; - return L.min[0] -= T, L.max[0] -= T, L.min[1] -= o, L.max[1] -= o, { - min: this.metersToLatLon(L.min[0], L.min[1]), - max: this.metersToLatLon(L.max[0], L.max[1]) - } - } - latLonToTileBoundsLatLon(l, _, C) { - const [L, F] = this.latLonToMeters(l, _), [T, o] = this.metersToTile(L, F, C); - return this.tileBoundsLatLon(T, o, C) - } - latLonToPixelBoundsLatLon(l, _, C) { - const [L, F] = this.latLonToMeters(l, _), [T, o] = this.metersToPixels(L, F, C); - return this.pixelToBoundsLatLon(Math.floor(T), Math.floor(o), C) - } - latLonToRegionAndPixel(l, _, C, L = $n.regionSize) { - const [F, T] = this.latLonToPixelsFloor(l, _, C), o = this.tileSize * L; - return { - region: [Math.floor(F / o), Math.floor(T / o)], - pixel: [F % o, T % o] - } - } -} - -function rm(b, l = !0) { - const { - min: _, - max: C - } = b; - return l ? [ - [_[1], C[0]], - [C[1], C[0]], - [C[1], _[0]], - [_[1], _[0]] - ] : [ - [_[0], C[1]], - [C[0], C[1]], - [C[0], _[1]], - [_[0], _[1]] - ] -} - -function im(b) { - return [(b.min[0] + b.max[0]) / 2, (b.min[1] + b.max[1]) / 2] -} -const SP = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAAAAACoWZBhAAAAAXNSR0IArs4c6QAAACpJREFUeNpj+AsEZ86ASIa/DAwMZ84ACRDzDBigMs/AARITq1oUwxBWAADaREUdDMswKwAAAABJRU5ErkJggg==", - dg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAAXNSR0IArs4c6QAAACVJREFUeNpj+A8FDEAAZwMRBAIBmIYLIgHcgkQDIs3E6SRsjgcABYFLtfTgakEAAAAASUVORK5CYII="; - -function PP(b) { - return Math.floor(Math.random() * b) -} -const wf = 14.5; -async function IP() { - const b = kP(); - if (b) return b; - try { - if ((await navigator.permissions.query({ - name: "geolocation" - })).state === "granted") { - const _ = await new Promise((C, L) => navigator.geolocation.getCurrentPosition(F => C(F), F => L(F))); - return { - lat: _.coords.latitude, - lng: _.coords.longitude, - zoom: wf - } - } - } catch (l) { - console.error(l) - } - return { - ...MP().pos, - zoom: wf - } -} - -function MP() { - const b = Object.entries(AP), - l = PP(b.length), - [_, C] = b[l]; - return { - city: _, - pos: C - } -} -const AP = { - tokyo: { - lat: 35.677545560719665, - lng: 139.76394445809638 - }, - paris: { - lat: 48.8537151734952, - lng: 2.3484026030630787 - }, - newYork: { - lat: 40.71283173786517, - lng: -74.00599771376795 - }, - saoPaulo: { - lat: -23.550584064565356, - lng: -46.63339720713918 - }, - sydney: { - lat: -33.86943325619071, - lng: 151.2083447239608 - } - }, - ev = "location"; - -function Qa(b, l) { - localStorage.setItem(ev, JSON.stringify({ - ...b, - zoom: l - })) -} - -function kP() { - const b = localStorage.getItem(ev); - if (!b) return; - const l = JSON.parse(b); - return l.zoom ?? (l.zoom = wf), l -} -var ku, Eu; -class EP { - constructor() { - br(this, ku, nt(-1)); - br(this, Eu, nt([])) - } - get idx() { - return x(et(this, ku)) - } - set idx(l) { - oe(et(this, ku), l, !0) - } - get entries() { - return x(et(this, Eu)) - } - set entries(l) { - oe(et(this, Eu), l) - } - hasNext() { - return this.idx < this.entries.length - 1 - } - goToNext(l) { - const _ = this.idx + 1, - C = this.entries[_]; - C && (this.idx = _, l.flyTo({ - center: C.pos, - zoom: C.zoom - })) - } - hasPrev() { - return this.idx > 0 - } - goToPrev(l) { - const _ = this.idx - 1, - C = this.entries[_]; - C && (this.idx = _, l.flyTo({ - center: C.pos, - zoom: C.zoom - })) - } - isEmpty() { - return this.entries.length === 0 - } - push(l) { - this.idx = this.idx + 1, this.entries = [...this.entries.slice(0, this.idx), l] - } -} -ku = new WeakMap, Eu = new WeakMap; -const Ho = new EP; - -function nm(b) { - return b && b.__esModule && Object.prototype.hasOwnProperty.call(b, "default") ? b.default : b -} -var Pd = { - exports: {} -}; -/** - * MapLibre GL JS - * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.6.2/LICENSE.txt - */ -var zP = Pd.exports, - pg; - -function LP() { - return pg || (pg = 1, (function(b, l) { - (function(_, C) { - b.exports = C() - })(zP, (function() { - var _ = {}, - C = {}; - - function L(T, o, $) { - if (C[T] = $, T === "index") { - var W = "var sharedModule = {}; (" + C.shared + ")(sharedModule); (" + C.worker + ")(sharedModule);", - ie = {}; - return C.shared(ie), C.index(_, ie), typeof window < "u" && _.setWorkerUrl(window.URL.createObjectURL(new Blob([W], { - type: "text/javascript" - }))), _ - } - } - L("shared", ["exports"], (function(T) { - function o(i, t, r, a) { - return new(r || (r = Promise))((function(c, p) { - function f(S) { - try { - v(a.next(S)) - } catch (I) { - p(I) - } - } - - function g(S) { - try { - v(a.throw(S)) - } catch (I) { - p(I) - } - } - - function v(S) { - var I; - S.done ? c(S.value) : (I = S.value, I instanceof r ? I : new r((function(E) { - E(I) - }))).then(f, g) - } - v((a = a.apply(i, t || [])).next()) - })) - } - - function $(i, t) { - this.x = i, this.y = t - } - - function W(i) { - return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i - } - var ie, pe; - typeof SuppressedError == "function" && SuppressedError, $.prototype = { - clone() { - return new $(this.x, this.y) - }, - add(i) { - return this.clone()._add(i) - }, - sub(i) { - return this.clone()._sub(i) - }, - multByPoint(i) { - return this.clone()._multByPoint(i) - }, - divByPoint(i) { - return this.clone()._divByPoint(i) - }, - mult(i) { - return this.clone()._mult(i) - }, - div(i) { - return this.clone()._div(i) - }, - rotate(i) { - return this.clone()._rotate(i) - }, - rotateAround(i, t) { - return this.clone()._rotateAround(i, t) - }, - matMult(i) { - return this.clone()._matMult(i) - }, - 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(i) { - return this.x === i.x && this.y === i.y - }, - dist(i) { - return Math.sqrt(this.distSqr(i)) - }, - distSqr(i) { - const t = i.x - this.x, - r = i.y - this.y; - return t * t + r * r - }, - angle() { - return Math.atan2(this.y, this.x) - }, - angleTo(i) { - return Math.atan2(this.y - i.y, this.x - i.x) - }, - angleWith(i) { - return this.angleWithSep(i.x, i.y) - }, - angleWithSep(i, t) { - return Math.atan2(this.x * t - this.y * i, this.x * i + this.y * t) - }, - _matMult(i) { - const t = i[2] * this.x + i[3] * this.y; - return this.x = i[0] * this.x + i[1] * this.y, this.y = t, this - }, - _add(i) { - return this.x += i.x, this.y += i.y, this - }, - _sub(i) { - return this.x -= i.x, this.y -= i.y, this - }, - _mult(i) { - return this.x *= i, this.y *= i, this - }, - _div(i) { - return this.x /= i, this.y /= i, this - }, - _multByPoint(i) { - return this.x *= i.x, this.y *= i.y, this - }, - _divByPoint(i) { - return this.x /= i.x, this.y /= i.y, this - }, - _unit() { - return this._div(this.mag()), this - }, - _perp() { - const i = this.y; - return this.y = this.x, this.x = -i, this - }, - _rotate(i) { - const t = Math.cos(i), - r = Math.sin(i), - a = r * this.x + t * this.y; - return this.x = t * this.x - r * this.y, this.y = a, this - }, - _rotateAround(i, t) { - const r = Math.cos(i), - a = Math.sin(i), - c = t.y + a * (this.x - t.x) + r * (this.y - t.y); - return this.x = t.x + r * (this.x - t.x) - a * (this.y - t.y), this.y = c, this - }, - _round() { - return this.x = Math.round(this.x), this.y = Math.round(this.y), this - }, - constructor: $ - }, $.convert = function(i) { - if (i instanceof $) return i; - if (Array.isArray(i)) return new $(+i[0], +i[1]); - if (i.x !== void 0 && i.y !== void 0) return new $(+i.x, +i.y); - throw new Error("Expected [x, y] or {x, y} point format") - }; - var ye = (function() { - if (pe) return ie; - - function i(t, r, a, c) { - this.cx = 3 * t, this.bx = 3 * (a - t) - this.cx, this.ax = 1 - this.cx - this.bx, this.cy = 3 * r, this.by = 3 * (c - r) - this.cy, this.ay = 1 - this.cy - this.by, this.p1x = t, this.p1y = r, this.p2x = a, this.p2y = c - } - return pe = 1, ie = i, i.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, r) { - if (r === void 0 && (r = 1e-6), t < 0) return 0; - if (t > 1) return 1; - for (var a = t, c = 0; c < 8; c++) { - var p = this.sampleCurveX(a) - t; - if (Math.abs(p) < r) return a; - var f = this.sampleCurveDerivativeX(a); - if (Math.abs(f) < 1e-6) break; - a -= p / f - } - var g = 0, - v = 1; - for (a = t, c = 0; c < 20 && (p = this.sampleCurveX(a), !(Math.abs(p - t) < r)); c++) t > p ? g = a : v = a, a = .5 * (v - g) + g; - return a - }, - solve: function(t, r) { - return this.sampleCurveY(this.solveCurveX(t, r)) - } - }, ie - })(), - X = W(ye); - let Se, we; - - function Re() { - return Se == null && (Se = typeof OffscreenCanvas < "u" && new OffscreenCanvas(1, 1).getContext("2d") && typeof createImageBitmap == "function"), Se - } - - function Ae() { - if (we == null && (we = !1, Re())) { - const t = new OffscreenCanvas(5, 5).getContext("2d", { - willReadFrequently: !0 - }); - if (t) { - for (let a = 0; a < 25; a++) { - const c = 4 * a; - t.fillStyle = `rgb(${c},${c+1},${c+2})`, t.fillRect(a % 5, Math.floor(a / 5), 1, 1) - } - const r = t.getImageData(0, 0, 5, 5).data; - for (let a = 0; a < 100; a++) - if (a % 4 != 3 && r[a] !== a) { - we = !0; - break - } - } - } - return we || !1 - } - var Oe = 1e-6, - Ee = typeof Float32Array < "u" ? Float32Array : Array; - - function Ne() { - var i = new Ee(9); - return Ee != Float32Array && (i[1] = 0, i[2] = 0, i[3] = 0, i[5] = 0, i[6] = 0, i[7] = 0), i[0] = 1, i[4] = 1, i[8] = 1, i - } - - function ft(i) { - return i[0] = 1, i[1] = 0, i[2] = 0, i[3] = 0, i[4] = 0, i[5] = 1, i[6] = 0, i[7] = 0, i[8] = 0, i[9] = 0, i[10] = 1, i[11] = 0, i[12] = 0, i[13] = 0, i[14] = 0, i[15] = 1, i - } - - function ht() { - var i = new Ee(3); - return Ee != Float32Array && (i[0] = 0, i[1] = 0, i[2] = 0), i - } - - function Xe(i) { - return Math.hypot(i[0], i[1], i[2]) - } - - function ct(i, t, r) { - var a = new Ee(3); - return a[0] = i, a[1] = t, a[2] = r, a - } - - function Je(i, t, r) { - return i[0] = t[0] + r[0], i[1] = t[1] + r[1], i[2] = t[2] + r[2], i - } - - function Be(i, t, r) { - return i[0] = t[0] * r, i[1] = t[1] * r, i[2] = t[2] * r, i - } - - function st(i, t, r) { - var a = t[0], - c = t[1], - p = t[2], - f = r[0], - g = r[1], - v = r[2]; - return i[0] = c * v - p * g, i[1] = p * f - a * v, i[2] = a * g - c * f, i - } - Math.hypot || (Math.hypot = function() { - for (var i = 0, t = arguments.length; t--;) i += arguments[t] * arguments[t]; - return Math.sqrt(i) - }); - var it, Qe = Xe; - - function ke(i, t, r) { - var a = t[0], - c = t[1], - p = t[2], - f = t[3]; - return i[0] = r[0] * a + r[4] * c + r[8] * p + r[12] * f, i[1] = r[1] * a + r[5] * c + r[9] * p + r[13] * f, i[2] = r[2] * a + r[6] * c + r[10] * p + r[14] * f, i[3] = r[3] * a + r[7] * c + r[11] * p + r[15] * f, i - } - - function vt() { - var i = new Ee(4); - return Ee != Float32Array && (i[0] = 0, i[1] = 0, i[2] = 0), i[3] = 1, i - } - - function Q(i, t, r, a) { - var c = .5 * Math.PI / 180; - t *= c, r *= c, a *= c; - var p = Math.sin(t), - f = Math.cos(t), - g = Math.sin(r), - v = Math.cos(r), - S = Math.sin(a), - I = Math.cos(a); - return i[0] = p * v * I - f * g * S, i[1] = f * g * I + p * v * S, i[2] = f * v * S - p * g * I, i[3] = f * v * I + p * g * S, i - } - - function te() { - var i = new Ee(2); - return Ee != Float32Array && (i[0] = 0, i[1] = 0), i - } - - function _e(i, t) { - var r = new Ee(2); - return r[0] = i, r[1] = t, r - } - ht(), it = new Ee(4), Ee != Float32Array && (it[0] = 0, it[1] = 0, it[2] = 0, it[3] = 0), ht(), ct(1, 0, 0), ct(0, 1, 0), vt(), vt(), Ne(), te(); - const ne = 8192; - - function Pe(i, t, r) { - return t * (ne / (i.tileSize * Math.pow(2, r - i.tileID.overscaledZ))) - } - - function Me(i, t) { - return (i % t + t) % t - } - - function at(i, t, r) { - return i * (1 - r) + t * r - } - - function We(i) { - if (i <= 0) return 0; - if (i >= 1) return 1; - const t = i * i, - r = t * i; - return 4 * (i < .5 ? r : 3 * (i - t) + r - .75) - } - - function Ct(i, t, r, a) { - const c = new X(i, t, r, a); - return p => c.solve(p) - } - const _t = Ct(.25, .1, .25, 1); - - function xt(i, t, r) { - return Math.min(r, Math.max(t, i)) - } - - function tt(i, t, r) { - const a = r - t, - c = ((i - t) % a + a) % a + t; - return c === t ? r : c - } - - function pt(i, ...t) { - for (const r of t) - for (const a in r) i[a] = r[a]; - return i - } - let It = 1; - - function ut(i, t, r) { - const a = {}; - for (const c in i) a[c] = t.call(this, i[c], c, i); - return a - } - - function bt(i, t, r) { - const a = {}; - for (const c in i) t.call(this, i[c], c, i) && (a[c] = i[c]); - return a - } - - function wt(i) { - return Array.isArray(i) ? i.map(wt) : typeof i == "object" && i ? ut(i, wt) : i - } - const dt = {}; - - function Lt(i) { - dt[i] || (typeof console < "u" && console.warn(i), dt[i] = !0) - } - - function Xt(i, t, r) { - return (r.y - i.y) * (t.x - i.x) > (t.y - i.y) * (r.x - i.x) - } - - function Yt(i) { - return typeof WorkerGlobalScope < "u" && i !== void 0 && i instanceof WorkerGlobalScope - } - let nr = null; - - function ar(i) { - return typeof ImageBitmap < "u" && i instanceof ImageBitmap - } - const Ft = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="; - - function dr(i, t, r, a, c) { - return o(this, void 0, void 0, (function*() { - if (typeof VideoFrame > "u") throw new Error("VideoFrame not supported"); - const p = new VideoFrame(i, { - timestamp: 0 - }); - try { - const f = p == null ? void 0 : p.format; - if (!f || !f.startsWith("BGR") && !f.startsWith("RGB")) throw new Error(`Unrecognized format ${f}`); - const g = f.startsWith("BGR"), - v = new Uint8ClampedArray(a * c * 4); - if (yield p.copyTo(v, (function(S, I, E, R, N) { - const j = 4 * Math.max(-I, 0), - Z = (Math.max(0, E) - E) * R * 4 + j, - Y = 4 * R, - ae = Math.max(0, I), - ze = Math.max(0, E); - return { - rect: { - x: ae, - y: ze, - width: Math.min(S.width, I + R) - ae, - height: Math.min(S.height, E + N) - ze - }, - layout: [{ - offset: Z, - stride: Y - }] - } - })(i, t, r, a, c)), g) - for (let S = 0; S < v.length; S += 4) { - const I = v[S]; - v[S] = v[S + 2], v[S + 2] = I - } - return v - } finally { - p.close() - } - })) - } - let _r, Ir; - - function jr(i, t, r, a) { - return i.addEventListener(t, r, a), { - unsubscribe: () => { - i.removeEventListener(t, r, a) - } - } - } - - function ur(i) { - return i * Math.PI / 180 - } - - function Mr(i) { - return i / Math.PI * 180 - } - const Ar = { - touchstart: !0, - touchmove: !0, - touchmoveWindow: !0, - touchend: !0, - touchcancel: !0 - }, - kr = { - dblclick: !0, - click: !0, - mouseover: !0, - mouseout: !0, - mousedown: !0, - mousemove: !0, - mousemoveWindow: !0, - mouseup: !0, - mouseupWindow: !0, - contextmenu: !0, - wheel: !0 - }, - Nr = "AbortError"; - - function ce() { - return new Error(Nr) - } - const O = { - MAX_PARALLEL_IMAGE_REQUESTS: 16, - MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME: 8, - MAX_TILE_CACHE_ZOOM_LEVELS: 5, - REGISTERED_PROTOCOLS: {}, - WORKER_URL: "" - }; - - function q(i) { - return O.REGISTERED_PROTOCOLS[i.substring(0, i.indexOf("://"))] - } - const G = "global-dispatcher"; - class K extends Error { - constructor(t, r, a, c) { - super(`AJAXError: ${r} (${t}): ${a}`), this.status = t, this.statusText = r, this.url = a, this.body = c - } - } - const le = () => Yt(self) ? self.worker && self.worker.referrer : (window.location.protocol === "blob:" ? window.parent : window).location.href, - ve = function(i, t) { - if (/:\/\//.test(i.url) && !/^https?:|^file:/.test(i.url)) { - const a = q(i.url); - if (a) return a(i, t); - if (Yt(self) && self.worker && self.worker.actor) return self.worker.actor.sendAsync({ - type: "GR", - data: i, - targetMapId: G - }, t) - } - if (!(/^file:/.test(r = i.url) || /^file:/.test(le()) && !/^\w+:/.test(r))) { - if (fetch && Request && AbortController && Object.prototype.hasOwnProperty.call(Request.prototype, "signal")) return (function(a, c) { - return o(this, void 0, void 0, (function*() { - const p = new Request(a.url, { - method: a.method || "GET", - body: a.body, - credentials: a.credentials, - headers: a.headers, - cache: a.cache, - referrer: le(), - signal: c.signal - }); - let f, g; - a.type !== "json" || p.headers.has("Accept") || p.headers.set("Accept", "application/json"); - try { - f = yield fetch(p) - } catch (S) { - throw new K(0, S.message, a.url, new Blob) - } - if (!f.ok) { - const S = yield f.blob(); - throw new K(f.status, f.statusText, a.url, S) - } - g = a.type === "arrayBuffer" || a.type === "image" ? f.arrayBuffer() : a.type === "json" ? f.json() : f.text(); - const v = yield g; - if (c.signal.aborted) throw ce(); - return { - data: v, - cacheControl: f.headers.get("Cache-Control"), - expires: f.headers.get("Expires") - } - })) - })(i, t); - if (Yt(self) && self.worker && self.worker.actor) return self.worker.actor.sendAsync({ - type: "GR", - data: i, - mustQueue: !0, - targetMapId: G - }, t) - } - var r; - return (function(a, c) { - return new Promise(((p, f) => { - var g; - const v = new XMLHttpRequest; - v.open(a.method || "GET", a.url, !0), a.type !== "arrayBuffer" && a.type !== "image" || (v.responseType = "arraybuffer"); - for (const S in a.headers) v.setRequestHeader(S, a.headers[S]); - a.type === "json" && (v.responseType = "text", !((g = a.headers) === null || g === void 0) && g.Accept || v.setRequestHeader("Accept", "application/json")), v.withCredentials = a.credentials === "include", v.onerror = () => { - f(new Error(v.statusText)) - }, v.onload = () => { - if (!c.signal.aborted) - if ((v.status >= 200 && v.status < 300 || v.status === 0) && v.response !== null) { - let S = v.response; - if (a.type === "json") try { - S = JSON.parse(v.response) - } catch (I) { - return void f(I) - } - p({ - data: S, - cacheControl: v.getResponseHeader("Cache-Control"), - expires: v.getResponseHeader("Expires") - }) - } else { - const S = new Blob([v.response], { - type: v.getResponseHeader("Content-Type") - }); - f(new K(v.status, v.statusText, a.url, S)) - } - }, c.signal.addEventListener("abort", (() => { - v.abort(), f(ce()) - })), v.send(a.body) - })) - })(i, t) - }; - - function Le(i) { - if (!i || i.indexOf("://") <= 0 || i.indexOf("data:image/") === 0 || i.indexOf("blob:") === 0) return !0; - const t = new URL(i), - r = window.location; - return t.protocol === r.protocol && t.host === r.host - } - - function Ce(i, t, r) { - r[i] && r[i].indexOf(t) !== -1 || (r[i] = r[i] || [], r[i].push(t)) - } - - function Ze(i, t, r) { - if (r && r[i]) { - const a = r[i].indexOf(t); - a !== -1 && r[i].splice(a, 1) - } - } - class ot { - constructor(t, r = {}) { - pt(this, r), this.type = t - } - } - class Ye extends ot { - constructor(t, r = {}) { - super("error", pt({ - error: t - }, r)) - } - } - class Ot { - on(t, r) { - return this._listeners = this._listeners || {}, Ce(t, r, this._listeners), { - unsubscribe: () => { - this.off(t, r) - } - } - } - off(t, r) { - return Ze(t, r, this._listeners), Ze(t, r, this._oneTimeListeners), this - } - once(t, r) { - return r ? (this._oneTimeListeners = this._oneTimeListeners || {}, Ce(t, r, this._oneTimeListeners), this) : new Promise((a => this.once(t, a))) - } - fire(t, r) { - typeof t == "string" && (t = new ot(t, r || {})); - const a = t.type; - if (this.listens(a)) { - t.target = this; - const c = this._listeners && this._listeners[a] ? this._listeners[a].slice() : []; - for (const g of c) g.call(this, t); - const p = this._oneTimeListeners && this._oneTimeListeners[a] ? this._oneTimeListeners[a].slice() : []; - for (const g of p) Ze(a, g, this._oneTimeListeners), g.call(this, t); - const f = this._eventedParent; - f && (pt(t, typeof this._eventedParentData == "function" ? this._eventedParentData() : this._eventedParentData), f.fire(t)) - } else t instanceof Ye && console.error(t.error); - return this - } - listens(t) { - return this._listeners && this._listeners[t] && this._listeners[t].length > 0 || this._oneTimeListeners && this._oneTimeListeners[t] && this._oneTimeListeners[t].length > 0 || this._eventedParent && this._eventedParent.listens(t) - } - setEventedParent(t, r) { - return this._eventedParent = t, this._eventedParentData = r, this - } - } - var xe = { - $version: 8, - $root: { - version: { - required: !0, - type: "enum", - values: [8] - }, - name: { - type: "string" - }, - metadata: { - type: "*" - }, - center: { - type: "array", - value: "number" - }, - 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" - }, - 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 - }, - "*": { - 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: "*" - }, - tolerance: { - type: "number", - default: .375 - }, - cluster: { - type: "boolean", - default: !1 - }, - clusterRadius: { - type: "number", - default: 50, - minimum: 0 - }, - 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", - "property-type": "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", - "property-type": "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", - "property-type": "constant" - } - }, - layout_heatmap: { - visibility: { - type: "enum", - values: { - visible: {}, - none: {} - }, - default: "visible", - "property-type": "constant" - } - }, - "layout_fill-extrusion": { - visibility: { - type: "enum", - values: { - visible: {}, - none: {} - }, - default: "visible", - "property-type": "constant" - } - }, - layout_line: { - "line-cap": { - type: "enum", - values: { - butt: {}, - round: {}, - square: {} - }, - default: "butt", - expression: { - interpolated: !1, - parameters: ["zoom"] - }, - "property-type": "data-constant" - }, - "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"] - }, - "property-type": "data-constant" - }, - "line-round-limit": { - type: "number", - default: 1.05, - requires: [{ - "line-join": "round" - }], - expression: { - interpolated: !0, - parameters: ["zoom"] - }, - "property-type": "data-constant" - }, - "line-sort-key": { - type: "number", - expression: { - interpolated: !1, - parameters: ["zoom", "feature"] - }, - "property-type": "data-driven" - }, - visibility: { - type: "enum", - values: { - visible: {}, - none: {} - }, - default: "visible", - "property-type": "constant" - } - }, - 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", - "property-type": "constant" - } - }, - layout_raster: { - visibility: { - type: "enum", - values: { - visible: {}, - none: {} - }, - default: "visible", - "property-type": "constant" - } - }, - layout_hillshade: { - visibility: { - type: "enum", - values: { - visible: {}, - none: {} - }, - default: "visible", - "property-type": "constant" - } - }, - "layout_color-relief": { - visibility: { - type: "enum", - values: { - visible: {}, - none: {} - }, - default: "visible", - "property-type": "constant" - } - }, - filter: { - type: "array", - value: "*" - }, - 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: "*", - 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" - }, - "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"] - }, - "property-type": "cross-faded" - }, - "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" - }, - "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" - } - }, - "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" - } - }, - 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" - } - } - }; - const At = ["type", "source", "source-layer", "minzoom", "maxzoom", "filter", "layout"]; - - function Pt(i, t) { - const r = {}; - for (const a in i) a !== "ref" && (r[a] = i[a]); - return At.forEach((a => { - a in t && (r[a] = t[a]) - })), r - } - - function kt(i, t) { - if (Array.isArray(i)) { - if (!Array.isArray(t) || i.length !== t.length) return !1; - for (let r = 0; r < i.length; r++) - if (!kt(i[r], t[r])) return !1; - return !0 - } - if (typeof i == "object" && i !== null && t !== null) { - if (typeof t != "object" || Object.keys(i).length !== Object.keys(t).length) return !1; - for (const r in i) - if (!kt(i[r], t[r])) return !1; - return !0 - } - return i === t - } - - function Wt(i, t) { - i.push(t) - } - - function Lr(i, t, r) { - Wt(r, { - command: "addSource", - args: [i, t[i]] - }) - } - - function Kr(i, t, r) { - Wt(t, { - command: "removeSource", - args: [i] - }), r[i] = !0 - } - - function Hr(i, t, r, a) { - Kr(i, r, a), Lr(i, t, r) - } - - function $r(i, t, r) { - let a; - for (a in i[r]) - if (Object.prototype.hasOwnProperty.call(i[r], a) && a !== "data" && !kt(i[r][a], t[r][a])) return !1; - for (a in t[r]) - if (Object.prototype.hasOwnProperty.call(t[r], a) && a !== "data" && !kt(i[r][a], t[r][a])) return !1; - return !0 - } - - function mr(i, t, r, a, c, p) { - i = i || {}, t = t || {}; - for (const f in i) Object.prototype.hasOwnProperty.call(i, f) && (kt(i[f], t[f]) || r.push({ - command: p, - args: [a, f, t[f], c] - })); - for (const f in t) Object.prototype.hasOwnProperty.call(t, f) && !Object.prototype.hasOwnProperty.call(i, f) && (kt(i[f], t[f]) || r.push({ - command: p, - args: [a, f, t[f], c] - })) - } - - function gr(i) { - return i.id - } - - function ai(i, t) { - return i[t.id] = t, i - } - class Tt { - constructor(t, r, a, c) { - this.message = (t ? `${t}: ` : "") + a, c && (this.identifier = c), r != null && r.__line__ && (this.line = r.__line__) - } - } - - function Ci(i, ...t) { - for (const r of t) - for (const a in r) i[a] = r[a]; - return i - } - class di extends Error { - constructor(t, r) { - super(r), this.message = r, this.key = t - } - } - class Pn { - constructor(t, r = []) { - this.parent = t, this.bindings = {}; - for (const [a, c] of r) this.bindings[a] = c - } - concat(t) { - return new Pn(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 Mt = { - kind: "null" - }, - Ke = { - kind: "number" - }, - jt = { - kind: "string" - }, - Gt = { - kind: "boolean" - }, - Dr = { - kind: "color" - }, - Gr = { - kind: "projectionDefinition" - }, - li = { - kind: "object" - }, - fr = { - kind: "value" - }, - bi = { - kind: "collator" - }, - Si = { - kind: "formatted" - }, - zi = { - kind: "padding" - }, - mi = { - kind: "colorArray" - }, - Li = { - kind: "numberArray" - }, - rr = { - kind: "resolvedImage" - }, - yi = { - kind: "variableAnchorOffsetCollection" - }; - - function Qr(i, t) { - return { - kind: "array", - itemType: i, - N: t - } - } - - function Yr(i) { - if (i.kind === "array") { - const t = Yr(i.itemType); - return typeof i.N == "number" ? `array<${t}, ${i.N}>` : i.itemType.kind === "value" ? "array" : `array<${t}>` - } - return i.kind - } - const la = [Mt, Ke, jt, Gt, Dr, Gr, Si, li, Qr(fr), zi, Li, mi, rr, yi]; - - function sn(i, t) { - if (t.kind === "error") return null; - if (i.kind === "array") { - if (t.kind === "array" && (t.N === 0 && t.itemType.kind === "value" || !sn(i.itemType, t.itemType)) && (typeof i.N != "number" || i.N === t.N)) return null - } else { - if (i.kind === t.kind) return null; - if (i.kind === "value") { - for (const r of la) - if (!sn(r, t)) return null - } - } - return `Expected ${Yr(i)} but found ${Yr(t)} instead.` - } - - function ta(i, t) { - return t.some((r => r.kind === i.kind)) - } - - function Fi(i, t) { - return t.some((r => r === "null" ? i === null : r === "array" ? Array.isArray(i) : r === "object" ? i && !Array.isArray(i) && typeof i == "object" : r === typeof i)) - } - - function Xi(i, t) { - return i.kind === "array" && t.kind === "array" ? i.itemType.kind === t.itemType.kind && typeof i.N == "number" : i.kind === t.kind - } - const Gn = .96422, - Hn = .82521, - Ln = 4 / 29, - gt = 6 / 29, - qt = 3 * gt * gt, - vr = gt * gt * gt, - _i = Math.PI / 180, - Di = 180 / Math.PI; - - function $i(i) { - return (i %= 360) < 0 && (i += 360), i - } - - function Mi([i, t, r, a]) { - let c, p; - const f = gn((.2225045 * (i = Cr(i)) + .7168786 * (t = Cr(t)) + .0606169 * (r = Cr(r))) / 1); - i === t && t === r ? c = p = f : (c = gn((.4360747 * i + .3850649 * t + .1430804 * r) / Gn), p = gn((.0139322 * i + .0971045 * t + .7141733 * r) / Hn)); - const g = 116 * f - 16; - return [g < 0 ? 0 : g, 500 * (c - f), 200 * (f - p), a] - } - - function Cr(i) { - return i <= .04045 ? i / 12.92 : Math.pow((i + .055) / 1.055, 2.4) - } - - function gn(i) { - return i > vr ? Math.pow(i, 1 / 3) : i / qt + Ln - } - - function tr([i, t, r, a]) { - let c = (i + 16) / 116, - p = isNaN(t) ? c : c + t / 500, - f = isNaN(r) ? c : c - r / 200; - return c = 1 * ei(c), p = Gn * ei(p), f = Hn * ei(f), [Ht(3.1338561 * p - 1.6168667 * c - .4906146 * f), Ht(-.9787684 * p + 1.9161415 * c + .033454 * f), Ht(.0719453 * p - .2289914 * c + 1.4052427 * f), a] - } - - function Ht(i) { - return (i = i <= .00304 ? 12.92 * i : 1.055 * Math.pow(i, 1 / 2.4) - .055) < 0 ? 0 : i > 1 ? 1 : i - } - - function ei(i) { - return i > gt ? i * i * i : qt * (i - Ln) - } - const ri = Object.hasOwn || function(i, t) { - return Object.prototype.hasOwnProperty.call(i, t) - }; - - function gi(i, t) { - return ri(i, t) ? i[t] : void 0 - } - - function ci(i) { - return parseInt(i.padEnd(2, i), 16) / 255 - } - - function pi(i, t) { - return Er(t ? i / 100 : i, 0, 1) - } - - function Er(i, t, r) { - return Math.min(Math.max(t, i), r) - } - - function Ri(i) { - return !i.some(Number.isNaN) - } - const ui = { - 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 Jr(i, t, r) { - return i + r * (t - i) - } - - function ti(i, t, r) { - return i.map(((a, c) => Jr(a, t[c], r))) - } - class yr { - constructor(t, r, a, c = 1, p = !0) { - this.r = t, this.g = r, this.b = a, this.a = c, p || (this.r *= c, this.g *= c, this.b *= c, c || this.overwriteGetter("rgb", [t, r, a, c])) - } - static parse(t) { - if (t instanceof yr) return t; - if (typeof t != "string") return; - const r = (function(a) { - if ((a = a.toLowerCase().trim()) === "transparent") return [0, 0, 0, 0]; - const c = gi(ui, a); - if (c) { - const [f, g, v] = c; - return [f / 255, g / 255, v / 255, 1] - } - if (a.startsWith("#") && /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(a)) { - const f = a.length < 6 ? 1 : 2; - let g = 1; - return [ci(a.slice(g, g += f)), ci(a.slice(g, g += f)), ci(a.slice(g, g += f)), ci(a.slice(g, g + f) || "ff")] - } - if (a.startsWith("rgb")) { - const f = a.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/); - if (f) { - const [g, v, S, I, E, R, N, j, Z, Y, ae, ze] = f, me = [I || " ", N || " ", Y].join(""); - if (me === " " || me === " /" || me === ",," || me === ",,,") { - const be = [S, R, Z].join(""), - Ve = be === "%%%" ? 100 : be === "" ? 255 : 0; - if (Ve) { - const rt = [Er(+v / Ve, 0, 1), Er(+E / Ve, 0, 1), Er(+j / Ve, 0, 1), ae ? pi(+ae, ze) : 1]; - if (Ri(rt)) return rt - } - } - return - } - } - const p = a.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/); - if (p) { - const [f, g, v, S, I, E, R, N, j] = p, Z = [v || " ", I || " ", R].join(""); - if (Z === " " || Z === " /" || Z === ",," || Z === ",,,") { - const Y = [+g, Er(+S, 0, 100), Er(+E, 0, 100), N ? pi(+N, j) : 1]; - if (Ri(Y)) return (function([ae, ze, me, be]) { - function Ve(rt) { - const St = (rt + ae / 30) % 12, - $t = ze * Math.min(me, 1 - me); - return me - $t * Math.max(-1, Math.min(St - 3, 9 - St, 1)) - } - return ae = $i(ae), ze /= 100, me /= 100, [Ve(0), Ve(8), Ve(4), be] - })(Y) - } - } - })(t); - return r ? new yr(...r, !1) : void 0 - } - get rgb() { - const { - r: t, - g: r, - b: a, - a: c - } = this, p = c || 1 / 0; - return this.overwriteGetter("rgb", [t / p, r / p, a / p, c]) - } - get hcl() { - return this.overwriteGetter("hcl", (function(t) { - const [r, a, c, p] = Mi(t), f = Math.sqrt(a * a + c * c); - return [Math.round(1e4 * f) ? $i(Math.atan2(c, a) * Di) : NaN, f, r, p] - })(this.rgb)) - } - get lab() { - return this.overwriteGetter("lab", Mi(this.rgb)) - } - overwriteGetter(t, r) { - return Object.defineProperty(this, t, { - value: r - }), r - } - toString() { - const [t, r, a, c] = this.rgb; - return `rgba(${[t,r,a].map((p=>Math.round(255*p))).join(",")},${c})` - } - static interpolate(t, r, a, c = "rgb") { - switch (c) { - case "rgb": { - const [p, f, g, v] = ti(t.rgb, r.rgb, a); - return new yr(p, f, g, v, !1) - } - case "hcl": { - const [p, f, g, v] = t.hcl, [S, I, E, R] = r.hcl; - let N, j; - if (isNaN(p) || isNaN(S)) isNaN(p) ? isNaN(S) ? N = NaN : (N = S, g !== 1 && g !== 0 || (j = I)) : (N = p, E !== 1 && E !== 0 || (j = f)); - else { - let me = S - p; - S > p && me > 180 ? me -= 360 : S < p && p - S > 180 && (me += 360), N = p + a * me - } - const [Z, Y, ae, ze] = (function([me, be, Ve, rt]) { - return me = isNaN(me) ? 0 : me * _i, tr([Ve, Math.cos(me) * be, Math.sin(me) * be, rt]) - })([N, j ?? Jr(f, I, a), Jr(g, E, a), Jr(v, R, a)]); - return new yr(Z, Y, ae, ze, !1) - } - case "lab": { - const [p, f, g, v] = tr(ti(t.lab, r.lab, a)); - return new yr(p, f, g, v, !1) - } - } - } - } - yr.black = new yr(0, 0, 0, 1), yr.white = new yr(1, 1, 1, 1), yr.transparent = new yr(0, 0, 0, 0), yr.red = new yr(1, 0, 0, 1); - class on { - constructor(t, r, a) { - this.sensitivity = t ? r ? "variant" : "case" : r ? "accent" : "base", this.locale = a, this.collator = new Intl.Collator(this.locale ? this.locale : [], { - sensitivity: this.sensitivity, - usage: "search" - }) - } - compare(t, r) { - return this.collator.compare(t, r) - } - resolvedLocale() { - return new Intl.Collator(this.locale ? this.locale : []).resolvedOptions().locale - } - } - const vn = ["bottom", "center", "top"]; - class _a { - constructor(t, r, a, c, p, f) { - this.text = t, this.image = r, this.scale = a, this.fontStack = c, this.textColor = p, this.verticalAlign = f - } - } - class ln { - constructor(t) { - this.sections = t - } - static fromString(t) { - return new ln([new _a(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 ln ? t : ln.fromString(t) - } - toString() { - return this.sections.length === 0 ? "" : this.sections.map((t => t.text)).join("") - } - } - class Ki { - constructor(t) { - this.values = t.slice() - } - static parse(t) { - if (t instanceof Ki) return t; - if (typeof t == "number") return new Ki([t, t, t, t]); - if (Array.isArray(t) && !(t.length < 1 || t.length > 4)) { - for (const r of t) - if (typeof r != "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 Ki(t) - } - } - toString() { - return JSON.stringify(this.values) - } - static interpolate(t, r, a) { - return new Ki(ti(t.values, r.values, a)) - } - } - class cn { - constructor(t) { - this.values = t.slice() - } - static parse(t) { - if (t instanceof cn) return t; - if (typeof t == "number") return new cn([t]); - if (Array.isArray(t)) { - for (const r of t) - if (typeof r != "number") return; - return new cn(t) - } - } - toString() { - return JSON.stringify(this.values) - } - static interpolate(t, r, a) { - return new cn(ti(t.values, r.values, a)) - } - } - class Ni { - constructor(t) { - this.values = t.slice() - } - static parse(t) { - if (t instanceof Ni) return t; - if (typeof t == "string") { - const a = yr.parse(t); - return a ? new Ni([a]) : void 0 - } - if (!Array.isArray(t)) return; - const r = []; - for (const a of t) { - if (typeof a != "string") return; - const c = yr.parse(a); - if (!c) return; - r.push(c) - } - return new Ni(r) - } - toString() { - return JSON.stringify(this.values) - } - static interpolate(t, r, a, c = "rgb") { - const p = []; - if (t.values.length != r.values.length) throw new Error(`colorArray: Arrays have mismatched length (${t.values.length} vs. ${r.values.length}), cannot interpolate.`); - for (let f = 0; f < t.values.length; f++) p.push(yr.interpolate(t.values[f], r.values[f], a, c)); - return new Ni(p) - } - } - class wi extends Error { - constructor(t) { - super(t), this.name = "RuntimeError" - } - toJSON() { - return this.message - } - } - const Ko = new Set(["center", "left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right"]); - class un { - constructor(t) { - this.values = t.slice() - } - static parse(t) { - if (t instanceof un) return t; - if (Array.isArray(t) && !(t.length < 1) && t.length % 2 == 0) { - for (let r = 0; r < t.length; r += 2) { - const a = t[r], - c = t[r + 1]; - if (typeof a != "string" || !Ko.has(a) || !Array.isArray(c) || c.length !== 2 || typeof c[0] != "number" || typeof c[1] != "number") return - } - return new un(t) - } - } - toString() { - return JSON.stringify(this.values) - } - static interpolate(t, r, a) { - const c = t.values, - p = r.values; - if (c.length !== p.length) throw new wi(`Cannot interpolate values of different length. from: ${t.toString()}, to: ${r.toString()}`); - const f = []; - for (let g = 0; g < c.length; g += 2) { - if (c[g] !== p[g]) throw new wi(`Cannot interpolate values containing mismatched anchors. from[${g}]: ${c[g]}, to[${g}]: ${p[g]}`); - f.push(c[g]); - const [v, S] = c[g + 1], [I, E] = p[g + 1]; - f.push([Jr(v, I, a), Jr(S, E, a)]) - } - return new un(f) - } - } - class Nn { - constructor(t) { - this.name = t.name, this.available = t.available - } - toString() { - return this.name - } - static fromString(t) { - return t ? new Nn({ - name: t, - available: !1 - }) : null - } - } - class hn { - constructor(t, r, a) { - this.from = t, this.to = r, this.transition = a - } - static interpolate(t, r, a) { - return new hn(t, r, a) - } - static parse(t) { - return t instanceof hn ? t : Array.isArray(t) && t.length === 3 && typeof t[0] == "string" && typeof t[1] == "string" && typeof t[2] == "number" ? new hn(t[0], t[1], t[2]) : typeof t == "object" && typeof t.from == "string" && typeof t.to == "string" && typeof t.transition == "number" ? new hn(t.from, t.to, t.transition) : typeof t == "string" ? new hn(t, t, 1) : void 0 - } - } - - function Ti(i, t, r, a) { - return typeof i == "number" && i >= 0 && i <= 255 && typeof t == "number" && t >= 0 && t <= 255 && typeof r == "number" && r >= 0 && r <= 255 ? a === void 0 || typeof a == "number" && a >= 0 && a <= 1 ? null : `Invalid rgba value [${[i,t,r,a].join(", ")}]: 'a' must be between 0 and 1.` : `Invalid rgba value [${(typeof a=="number"?[i,t,r,a]:[i,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.` - } - - function Za(i) { - if (i === null || typeof i == "string" || typeof i == "boolean" || typeof i == "number" || i instanceof hn || i instanceof yr || i instanceof on || i instanceof ln || i instanceof Ki || i instanceof cn || i instanceof Ni || i instanceof un || i instanceof Nn) return !0; - if (Array.isArray(i)) { - for (const t of i) - if (!Za(t)) return !1; - return !0 - } - if (typeof i == "object") { - for (const t in i) - if (!Za(i[t])) return !1; - return !0 - } - return !1 - } - - function wr(i) { - if (i === null) return Mt; - if (typeof i == "string") return jt; - if (typeof i == "boolean") return Gt; - if (typeof i == "number") return Ke; - if (i instanceof yr) return Dr; - if (i instanceof hn) return Gr; - if (i instanceof on) return bi; - if (i instanceof ln) return Si; - if (i instanceof Ki) return zi; - if (i instanceof cn) return Li; - if (i instanceof Ni) return mi; - if (i instanceof un) return yi; - if (i instanceof Nn) return rr; - if (Array.isArray(i)) { - const t = i.length; - let r; - for (const a of i) { - const c = wr(a); - if (r) { - if (r === c) continue; - r = fr; - break - } - r = c - } - return Qr(r || fr, t) - } - return li - } - - function Vr(i) { - const t = typeof i; - return i === null ? "" : t === "string" || t === "number" || t === "boolean" ? String(i) : i instanceof yr || i instanceof hn || i instanceof ln || i instanceof Ki || i instanceof cn || i instanceof Ni || i instanceof un || i instanceof Nn ? i.toString() : JSON.stringify(i) - } - class ga { - constructor(t, r) { - this.type = t, this.value = r - } - static parse(t, r) { - if (t.length !== 2) return r.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`); - if (!Za(t[1])) return r.error("invalid value"); - const a = t[1]; - let c = wr(a); - const p = r.expectedType; - return c.kind !== "array" || c.N !== 0 || !p || p.kind !== "array" || typeof p.N == "number" && p.N !== 0 || (c = p), new ga(c, a) - } - evaluate() { - return this.value - } - eachChild() {} - outputDefined() { - return !0 - } - } - const hi = { - string: jt, - number: Ke, - boolean: Gt, - object: li - }; - class ra { - constructor(t, r) { - this.type = t, this.args = r - } - static parse(t, r) { - if (t.length < 2) return r.error("Expected at least one argument."); - let a, c = 1; - const p = t[0]; - if (p === "array") { - let g, v; - if (t.length > 2) { - const S = t[1]; - if (typeof S != "string" || !(S in hi) || S === "object") return r.error('The item type argument of "array" must be one of string, number, boolean', 1); - g = hi[S], c++ - } else g = fr; - if (t.length > 3) { - if (t[2] !== null && (typeof t[2] != "number" || t[2] < 0 || t[2] !== Math.floor(t[2]))) return r.error('The length argument to "array" must be a positive integer literal', 2); - v = t[2], c++ - } - a = Qr(g, v) - } else { - if (!hi[p]) throw new Error(`Types doesn't contain name = ${p}`); - a = hi[p] - } - const f = []; - for (; c < t.length; c++) { - const g = r.parse(t[c], c, fr); - if (!g) return null; - f.push(g) - } - return new ra(a, f) - } - evaluate(t) { - for (let r = 0; r < this.args.length; r++) { - const a = this.args[r].evaluate(t); - if (!sn(this.type, wr(a))) return a; - if (r === this.args.length - 1) throw new wi(`Expected value to be of type ${Yr(this.type)}, but found ${Yr(wr(a))} instead.`) - } - throw new Error - } - eachChild(t) { - this.args.forEach(t) - } - outputDefined() { - return this.args.every((t => t.outputDefined())) - } - } - const Ra = { - "to-boolean": Gt, - "to-color": Dr, - "to-number": Ke, - "to-string": jt - }; - class Ba { - constructor(t, r) { - this.type = t, this.args = r - } - static parse(t, r) { - if (t.length < 2) return r.error("Expected at least one argument."); - const a = t[0]; - if (!Ra[a]) throw new Error(`Can't parse ${a} as it is not part of the known types`); - if ((a === "to-boolean" || a === "to-string") && t.length !== 2) return r.error("Expected one argument."); - const c = Ra[a], - p = []; - for (let f = 1; f < t.length; f++) { - const g = r.parse(t[f], f, fr); - if (!g) return null; - p.push(g) - } - return new Ba(c, p) - } - evaluate(t) { - switch (this.type.kind) { - case "boolean": - return !!this.args[0].evaluate(t); - case "color": { - let r, a; - for (const c of this.args) { - if (r = c.evaluate(t), a = null, r instanceof yr) return r; - if (typeof r == "string") { - const p = t.parseColor(r); - if (p) return p - } else if (Array.isArray(r) && (a = r.length < 3 || r.length > 4 ? `Invalid rgba value ${JSON.stringify(r)}: expected an array containing either three or four numeric values.` : Ti(r[0], r[1], r[2], r[3]), !a)) return new yr(r[0] / 255, r[1] / 255, r[2] / 255, r[3]) - } - throw new wi(a || `Could not parse color from value '${typeof r=="string"?r:JSON.stringify(r)}'`) - } - case "padding": { - let r; - for (const a of this.args) { - r = a.evaluate(t); - const c = Ki.parse(r); - if (c) return c - } - throw new wi(`Could not parse padding from value '${typeof r=="string"?r:JSON.stringify(r)}'`) - } - case "numberArray": { - let r; - for (const a of this.args) { - r = a.evaluate(t); - const c = cn.parse(r); - if (c) return c - } - throw new wi(`Could not parse numberArray from value '${typeof r=="string"?r:JSON.stringify(r)}'`) - } - case "colorArray": { - let r; - for (const a of this.args) { - r = a.evaluate(t); - const c = Ni.parse(r); - if (c) return c - } - throw new wi(`Could not parse colorArray from value '${typeof r=="string"?r:JSON.stringify(r)}'`) - } - case "variableAnchorOffsetCollection": { - let r; - for (const a of this.args) { - r = a.evaluate(t); - const c = un.parse(r); - if (c) return c - } - throw new wi(`Could not parse variableAnchorOffsetCollection from value '${typeof r=="string"?r:JSON.stringify(r)}'`) - } - case "number": { - let r = null; - for (const a of this.args) { - if (r = a.evaluate(t), r === null) return 0; - const c = Number(r); - if (!isNaN(c)) return c - } - throw new wi(`Could not convert ${JSON.stringify(r)} to number.`) - } - case "formatted": - return ln.fromString(Vr(this.args[0].evaluate(t))); - case "resolvedImage": - return Nn.fromString(Vr(this.args[0].evaluate(t))); - case "projectionDefinition": - return this.args[0].evaluate(t); - default: - return Vr(this.args[0].evaluate(t)) - } - } - eachChild(t) { - this.args.forEach(t) - } - outputDefined() { - return this.args.every((t => t.outputDefined())) - } - } - const Yo = ["Unknown", "Point", "LineString", "Polygon"]; - class mc { - 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" ? Yo[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 r = this._parseColorCache.get(t); - return r || (r = yr.parse(t), this._parseColorCache.set(t, r)), r - } - } - class Rs { - constructor(t, r, a = [], c, p = new Pn, f = []) { - this.registry = t, this.path = a, this.key = a.map((g => `[${g}]`)).join(""), this.scope = p, this.errors = f, this.expectedType = c, this._isConstant = r - } - parse(t, r, a, c, p = {}) { - return r ? this.concat(r, a, c)._parse(t, p) : this._parse(t, p) - } - _parse(t, r) { - function a(c, p, f) { - return f === "assert" ? new ra(p, [c]) : f === "coerce" ? new Ba(p, [c]) : c - } - 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 c = t[0]; - if (typeof c != "string") return this.error(`Expression name must be a string, but found ${typeof c} instead. If you wanted a literal array, use ["literal", [...]].`, 0), null; - const p = this.registry[c]; - if (p) { - let f = p.parse(t, this); - if (!f) return null; - if (this.expectedType) { - const g = this.expectedType, - v = f.type; - if (g.kind !== "string" && g.kind !== "number" && g.kind !== "boolean" && g.kind !== "object" && g.kind !== "array" || v.kind !== "value") { - if (g.kind === "projectionDefinition" && ["string", "array"].includes(v.kind) || ["color", "formatted", "resolvedImage"].includes(g.kind) && ["value", "string"].includes(v.kind) || ["padding", "numberArray"].includes(g.kind) && ["value", "number", "array"].includes(v.kind) || g.kind === "colorArray" && ["value", "string", "array"].includes(v.kind) || g.kind === "variableAnchorOffsetCollection" && ["value", "array"].includes(v.kind)) f = a(f, g, r.typeAnnotation || "coerce"); - else if (this.checkSubtype(g, v)) return null - } else f = a(f, g, r.typeAnnotation || "assert") - } - if (!(f instanceof ga) && f.type.kind !== "resolvedImage" && this._isConstant(f)) { - const g = new mc; - try { - f = new ga(f.type, f.evaluate(g)) - } catch (v) { - return this.error(v.message), null - } - } - return f - } - return this.error(`Unknown expression "${c}". 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, r, a) { - const c = typeof t == "number" ? this.path.concat(t) : this.path, - p = a ? this.scope.concat(a) : this.scope; - return new Rs(this.registry, this._isConstant, c, r || null, p, this.errors) - } - error(t, ...r) { - const a = `${this.key}${r.map((c=>`[${c}]`)).join("")}`; - this.errors.push(new di(a, t)) - } - checkSubtype(t, r) { - const a = sn(t, r); - return a && this.error(a), a - } - } - class co { - constructor(t, r) { - this.type = r.type, this.bindings = [].concat(t), this.result = r - } - evaluate(t) { - return this.result.evaluate(t) - } - eachChild(t) { - for (const r of this.bindings) t(r[1]); - t(this.result) - } - static parse(t, r) { - if (t.length < 4) return r.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`); - const a = []; - for (let p = 1; p < t.length - 1; p += 2) { - const f = t[p]; - if (typeof f != "string") return r.error(`Expected string, but found ${typeof f} instead.`, p); - if (/[^a-zA-Z0-9_]/.test(f)) return r.error("Variable names must contain only alphanumeric characters or '_'.", p); - const g = r.parse(t[p + 1], p + 1); - if (!g) return null; - a.push([f, g]) - } - const c = r.parse(t[t.length - 1], t.length - 1, r.expectedType, a); - return c ? new co(a, c) : null - } - outputDefined() { - return this.result.outputDefined() - } - } - class Jo { - constructor(t, r) { - this.type = r.type, this.name = t, this.boundExpression = r - } - static parse(t, r) { - if (t.length !== 2 || typeof t[1] != "string") return r.error("'var' expression requires exactly one string literal argument."); - const a = t[1]; - return r.scope.has(a) ? new Jo(a, r.scope.get(a)) : r.error(`Unknown variable "${a}". Make sure "${a}" has been bound in an enclosing "let" expression before using it.`, 1) - } - evaluate(t) { - return this.boundExpression.evaluate(t) - } - eachChild() {} - outputDefined() { - return !1 - } - } - class Qo { - constructor(t, r, a) { - this.type = t, this.index = r, this.input = a - } - static parse(t, r) { - if (t.length !== 3) return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`); - const a = r.parse(t[1], 1, Ke), - c = r.parse(t[2], 2, Qr(r.expectedType || fr)); - return a && c ? new Qo(c.type.itemType, a, c) : null - } - evaluate(t) { - const r = this.index.evaluate(t), - a = this.input.evaluate(t); - if (r < 0) throw new wi(`Array index out of bounds: ${r} < 0.`); - if (r >= a.length) throw new wi(`Array index out of bounds: ${r} > ${a.length-1}.`); - if (r !== Math.floor(r)) throw new wi(`Array index must be an integer, but found ${r} instead.`); - return a[r] - } - eachChild(t) { - t(this.index), t(this.input) - } - outputDefined() { - return !1 - } - } - class el { - constructor(t, r) { - this.type = Gt, this.needle = t, this.haystack = r - } - static parse(t, r) { - if (t.length !== 3) return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`); - const a = r.parse(t[1], 1, fr), - c = r.parse(t[2], 2, fr); - return a && c ? ta(a.type, [Gt, jt, Ke, Mt, fr]) ? new el(a, c) : r.error(`Expected first argument to be of type boolean, string, number or null, but found ${Yr(a.type)} instead`) : null - } - evaluate(t) { - const r = this.needle.evaluate(t), - a = this.haystack.evaluate(t); - if (!a) return !1; - if (!Fi(r, ["boolean", "string", "number", "null"])) throw new wi(`Expected first argument to be of type boolean, string, number or null, but found ${Yr(wr(r))} instead.`); - if (!Fi(a, ["string", "array"])) throw new wi(`Expected second argument to be of type array or string, but found ${Yr(wr(a))} instead.`); - return a.indexOf(r) >= 0 - } - eachChild(t) { - t(this.needle), t(this.haystack) - } - outputDefined() { - return !0 - } - } - class va { - constructor(t, r, a) { - this.type = Ke, this.needle = t, this.haystack = r, this.fromIndex = a - } - static parse(t, r) { - if (t.length <= 2 || t.length >= 5) return r.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`); - const a = r.parse(t[1], 1, fr), - c = r.parse(t[2], 2, fr); - if (!a || !c) return null; - if (!ta(a.type, [Gt, jt, Ke, Mt, fr])) return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${Yr(a.type)} instead`); - if (t.length === 4) { - const p = r.parse(t[3], 3, Ke); - return p ? new va(a, c, p) : null - } - return new va(a, c) - } - evaluate(t) { - const r = this.needle.evaluate(t), - a = this.haystack.evaluate(t); - if (!Fi(r, ["boolean", "string", "number", "null"])) throw new wi(`Expected first argument to be of type boolean, string, number or null, but found ${Yr(wr(r))} instead.`); - let c; - if (this.fromIndex && (c = this.fromIndex.evaluate(t)), Fi(a, ["string"])) { - const p = a.indexOf(r, c); - return p === -1 ? -1 : [...a.slice(0, p)].length - } - if (Fi(a, ["array"])) return a.indexOf(r, c); - throw new wi(`Expected second argument to be of type array or string, but found ${Yr(wr(a))} instead.`) - } - eachChild(t) { - t(this.needle), t(this.haystack), this.fromIndex && t(this.fromIndex) - } - outputDefined() { - return !1 - } - } - class yn { - constructor(t, r, a, c, p, f) { - this.inputType = t, this.type = r, this.input = a, this.cases = c, this.outputs = p, this.otherwise = f - } - static parse(t, r) { - if (t.length < 5) return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`); - if (t.length % 2 != 1) return r.error("Expected an even number of arguments."); - let a, c; - r.expectedType && r.expectedType.kind !== "value" && (c = r.expectedType); - const p = {}, - f = []; - for (let S = 2; S < t.length - 1; S += 2) { - let I = t[S]; - const E = t[S + 1]; - Array.isArray(I) || (I = [I]); - const R = r.concat(S); - if (I.length === 0) return R.error("Expected at least one branch label."); - for (const j of I) { - if (typeof j != "number" && typeof j != "string") return R.error("Branch labels must be numbers or strings."); - if (typeof j == "number" && Math.abs(j) > Number.MAX_SAFE_INTEGER) return R.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`); - if (typeof j == "number" && Math.floor(j) !== j) return R.error("Numeric branch labels must be integer values."); - if (a) { - if (R.checkSubtype(a, wr(j))) return null - } else a = wr(j); - if (p[String(j)] !== void 0) return R.error("Branch labels must be unique."); - p[String(j)] = f.length - } - const N = r.parse(E, S, c); - if (!N) return null; - c = c || N.type, f.push(N) - } - const g = r.parse(t[1], 1, fr); - if (!g) return null; - const v = r.parse(t[t.length - 1], t.length - 1, c); - return v ? g.type.kind !== "value" && r.concat(1).checkSubtype(a, g.type) ? null : new yn(a, c, g, p, f, v) : null - } - evaluate(t) { - const r = this.input.evaluate(t); - return (wr(r) === this.inputType && this.outputs[this.cases[r]] || 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 Bs { - constructor(t, r, a) { - this.type = t, this.branches = r, this.otherwise = a - } - static parse(t, r) { - if (t.length < 4) return r.error(`Expected at least 3 arguments, but found only ${t.length-1}.`); - if (t.length % 2 != 0) return r.error("Expected an odd number of arguments."); - let a; - r.expectedType && r.expectedType.kind !== "value" && (a = r.expectedType); - const c = []; - for (let f = 1; f < t.length - 1; f += 2) { - const g = r.parse(t[f], f, Gt); - if (!g) return null; - const v = r.parse(t[f + 1], f + 1, a); - if (!v) return null; - c.push([g, v]), a = a || v.type - } - const p = r.parse(t[t.length - 1], t.length - 1, a); - if (!p) return null; - if (!a) throw new Error("Can't infer output type"); - return new Bs(a, c, p) - } - evaluate(t) { - for (const [r, a] of this.branches) - if (r.evaluate(t)) return a.evaluate(t); - return this.otherwise.evaluate(t) - } - eachChild(t) { - for (const [r, a] of this.branches) t(r), t(a); - t(this.otherwise) - } - outputDefined() { - return this.branches.every((([t, r]) => r.outputDefined())) && this.otherwise.outputDefined() - } - } - class uo { - constructor(t, r, a, c) { - this.type = t, this.input = r, this.beginIndex = a, this.endIndex = c - } - static parse(t, r) { - if (t.length <= 2 || t.length >= 5) return r.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`); - const a = r.parse(t[1], 1, fr), - c = r.parse(t[2], 2, Ke); - if (!a || !c) return null; - if (!ta(a.type, [Qr(fr), jt, fr])) return r.error(`Expected first argument to be of type array or string, but found ${Yr(a.type)} instead`); - if (t.length === 4) { - const p = r.parse(t[3], 3, Ke); - return p ? new uo(a.type, a, c, p) : null - } - return new uo(a.type, a, c) - } - evaluate(t) { - const r = this.input.evaluate(t), - a = this.beginIndex.evaluate(t); - let c; - if (this.endIndex && (c = this.endIndex.evaluate(t)), Fi(r, ["string"])) return [...r].slice(a, c).join(""); - if (Fi(r, ["array"])) return r.slice(a, c); - throw new wi(`Expected first argument to be of type array or string, but found ${Yr(wr(r))} instead.`) - } - eachChild(t) { - t(this.input), t(this.beginIndex), this.endIndex && t(this.endIndex) - } - outputDefined() { - return !1 - } - } - - function fs(i, t) { - const r = i.length - 1; - let a, c, p = 0, - f = r, - g = 0; - for (; p <= f;) - if (g = Math.floor((p + f) / 2), a = i[g], c = i[g + 1], a <= t) { - if (g === r || t < c) return g; - p = g + 1 - } else { - if (!(a > t)) throw new wi("Input is not a number."); - f = g - 1 - } return 0 - } - class Gi { - constructor(t, r, a) { - this.type = t, this.input = r, this.labels = [], this.outputs = []; - for (const [c, p] of a) this.labels.push(c), this.outputs.push(p) - } - static parse(t, r) { - if (t.length - 1 < 4) return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`); - if ((t.length - 1) % 2 != 0) return r.error("Expected an even number of arguments."); - const a = r.parse(t[1], 1, Ke); - if (!a) return null; - const c = []; - let p = null; - r.expectedType && r.expectedType.kind !== "value" && (p = r.expectedType); - for (let f = 1; f < t.length; f += 2) { - const g = f === 1 ? -1 / 0 : t[f], - v = t[f + 1], - S = f, - I = f + 1; - if (typeof g != "number") return r.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.', S); - if (c.length && c[c.length - 1][0] >= g) return r.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.', S); - const E = r.parse(v, I, p); - if (!E) return null; - p = p || E.type, c.push([g, E]) - } - return new Gi(p, a, c) - } - evaluate(t) { - const r = this.labels, - a = this.outputs; - if (r.length === 1) return a[0].evaluate(t); - const c = this.input.evaluate(t); - if (c <= r[0]) return a[0].evaluate(t); - const p = r.length; - return c >= r[p - 1] ? a[p - 1].evaluate(t) : a[fs(r, c)].evaluate(t) - } - eachChild(t) { - t(this.input); - for (const r of this.outputs) t(r) - } - outputDefined() { - return this.outputs.every((t => t.outputDefined())) - } - } - - function _h(i) { - return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i - } - var ho, _c, Yd = (function() { - if (_c) return ho; - - function i(t, r, a, c) { - this.cx = 3 * t, this.bx = 3 * (a - t) - this.cx, this.ax = 1 - this.cx - this.bx, this.cy = 3 * r, this.by = 3 * (c - r) - this.cy, this.ay = 1 - this.cy - this.by, this.p1x = t, this.p1y = r, this.p2x = a, this.p2y = c - } - return _c = 1, ho = i, i.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, r) { - if (r === void 0 && (r = 1e-6), t < 0) return 0; - if (t > 1) return 1; - for (var a = t, c = 0; c < 8; c++) { - var p = this.sampleCurveX(a) - t; - if (Math.abs(p) < r) return a; - var f = this.sampleCurveDerivativeX(a); - if (Math.abs(f) < 1e-6) break; - a -= p / f - } - var g = 0, - v = 1; - for (a = t, c = 0; c < 20 && (p = this.sampleCurveX(a), !(Math.abs(p - t) < r)); c++) t > p ? g = a : v = a, a = .5 * (v - g) + g; - return a - }, - solve: function(t, r) { - return this.sampleCurveY(this.solveCurveX(t, r)) - } - }, ho - })(), - Fs = _h(Yd); - class In { - constructor(t, r, a, c, p) { - this.type = t, this.operator = r, this.interpolation = a, this.input = c, this.labels = [], this.outputs = []; - for (const [f, g] of p) this.labels.push(f), this.outputs.push(g) - } - static interpolationFactor(t, r, a, c) { - let p = 0; - if (t.name === "exponential") p = po(r, t.base, a, c); - else if (t.name === "linear") p = po(r, 1, a, c); - else if (t.name === "cubic-bezier") { - const f = t.controlPoints; - p = new Fs(f[0], f[1], f[2], f[3]).solve(po(r, 1, a, c)) - } - return p - } - static parse(t, r) { - let [a, c, p, ...f] = t; - if (!Array.isArray(c) || c.length === 0) return r.error("Expected an interpolation type expression.", 1); - if (c[0] === "linear") c = { - name: "linear" - }; - else if (c[0] === "exponential") { - const S = c[1]; - if (typeof S != "number") return r.error("Exponential interpolation requires a numeric base.", 1, 1); - c = { - name: "exponential", - base: S - } - } else { - if (c[0] !== "cubic-bezier") return r.error(`Unknown interpolation type ${String(c[0])}`, 1, 0); - { - const S = c.slice(1); - if (S.length !== 4 || S.some((I => typeof I != "number" || I < 0 || I > 1))) return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.", 1); - c = { - name: "cubic-bezier", - controlPoints: S - } - } - } - if (t.length - 1 < 4) return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`); - if ((t.length - 1) % 2 != 0) return r.error("Expected an even number of arguments."); - if (p = r.parse(p, 2, Ke), !p) return null; - const g = []; - let v = null; - a !== "interpolate-hcl" && a !== "interpolate-lab" || r.expectedType == mi ? r.expectedType && r.expectedType.kind !== "value" && (v = r.expectedType) : v = Dr; - for (let S = 0; S < f.length; S += 2) { - const I = f[S], - E = f[S + 1], - R = S + 3, - N = S + 4; - if (typeof I != "number") return r.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.', R); - if (g.length && g[g.length - 1][0] >= I) return r.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.', R); - const j = r.parse(E, N, v); - if (!j) return null; - v = v || j.type, g.push([I, j]) - } - return Xi(v, Ke) || Xi(v, Gr) || Xi(v, Dr) || Xi(v, zi) || Xi(v, Li) || Xi(v, mi) || Xi(v, yi) || Xi(v, Qr(Ke)) ? new In(v, a, c, p, g) : r.error(`Type ${Yr(v)} is not interpolatable.`) - } - evaluate(t) { - const r = this.labels, - a = this.outputs; - if (r.length === 1) return a[0].evaluate(t); - const c = this.input.evaluate(t); - if (c <= r[0]) return a[0].evaluate(t); - const p = r.length; - if (c >= r[p - 1]) return a[p - 1].evaluate(t); - const f = fs(r, c), - g = In.interpolationFactor(this.interpolation, c, r[f], r[f + 1]), - v = a[f].evaluate(t), - S = a[f + 1].evaluate(t); - switch (this.operator) { - case "interpolate": - switch (this.type.kind) { - case "number": - return Jr(v, S, g); - case "color": - return yr.interpolate(v, S, g); - case "padding": - return Ki.interpolate(v, S, g); - case "colorArray": - return Ni.interpolate(v, S, g); - case "numberArray": - return cn.interpolate(v, S, g); - case "variableAnchorOffsetCollection": - return un.interpolate(v, S, g); - case "array": - return ti(v, S, g); - case "projectionDefinition": - return hn.interpolate(v, S, g) - } - case "interpolate-hcl": - switch (this.type.kind) { - case "color": - return yr.interpolate(v, S, g, "hcl"); - case "colorArray": - return Ni.interpolate(v, S, g, "hcl") - } - case "interpolate-lab": - switch (this.type.kind) { - case "color": - return yr.interpolate(v, S, g, "lab"); - case "colorArray": - return Ni.interpolate(v, S, g, "lab") - } - } - } - eachChild(t) { - t(this.input); - for (const r of this.outputs) t(r) - } - outputDefined() { - return this.outputs.every((t => t.outputDefined())) - } - } - - function po(i, t, r, a) { - const c = a - r, - p = i - r; - return c === 0 ? 0 : t === 1 ? p / c : (Math.pow(t, p) - 1) / (Math.pow(t, c) - 1) - } - const Fa = { - color: yr.interpolate, - number: Jr, - padding: Ki.interpolate, - numberArray: cn.interpolate, - colorArray: Ni.interpolate, - variableAnchorOffsetCollection: un.interpolate, - array: ti - }; - class fo { - constructor(t, r) { - this.type = t, this.args = r - } - static parse(t, r) { - if (t.length < 2) return r.error("Expected at least one argument."); - let a = null; - const c = r.expectedType; - c && c.kind !== "value" && (a = c); - const p = []; - for (const g of t.slice(1)) { - const v = r.parse(g, 1 + p.length, a, void 0, { - typeAnnotation: "omit" - }); - if (!v) return null; - a = a || v.type, p.push(v) - } - if (!a) throw new Error("No output type"); - const f = c && p.some((g => sn(c, g.type))); - return new fo(f ? fr : a, p) - } - evaluate(t) { - let r, a = null, - c = 0; - for (const p of this.args) - if (c++, a = p.evaluate(t), a && a instanceof Nn && !a.available && (r || (r = a.name), a = null, c === this.args.length && (a = r)), a !== null) break; - return a - } - eachChild(t) { - this.args.forEach(t) - } - outputDefined() { - return this.args.every((t => t.outputDefined())) - } - } - - function mo(i, t) { - return i === "==" || i === "!=" ? 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 _o(i, t, r, a) { - return a.compare(t, r) === 0 - } - - function Dn(i, t, r) { - const a = i !== "==" && i !== "!="; - return class tv { - constructor(p, f, g) { - this.type = Gt, this.lhs = p, this.rhs = f, this.collator = g, this.hasUntypedArgument = p.type.kind === "value" || f.type.kind === "value" - } - static parse(p, f) { - if (p.length !== 3 && p.length !== 4) return f.error("Expected two or three arguments."); - const g = p[0]; - let v = f.parse(p[1], 1, fr); - if (!v) return null; - if (!mo(g, v.type)) return f.concat(1).error(`"${g}" comparisons are not supported for type '${Yr(v.type)}'.`); - let S = f.parse(p[2], 2, fr); - if (!S) return null; - if (!mo(g, S.type)) return f.concat(2).error(`"${g}" comparisons are not supported for type '${Yr(S.type)}'.`); - if (v.type.kind !== S.type.kind && v.type.kind !== "value" && S.type.kind !== "value") return f.error(`Cannot compare types '${Yr(v.type)}' and '${Yr(S.type)}'.`); - a && (v.type.kind === "value" && S.type.kind !== "value" ? v = new ra(S.type, [v]) : v.type.kind !== "value" && S.type.kind === "value" && (S = new ra(v.type, [S]))); - let I = null; - if (p.length === 4) { - if (v.type.kind !== "string" && S.type.kind !== "string" && v.type.kind !== "value" && S.type.kind !== "value") return f.error("Cannot use collator to compare non-string types."); - if (I = f.parse(p[3], 3, bi), !I) return null - } - return new tv(v, S, I) - } - evaluate(p) { - const f = this.lhs.evaluate(p), - g = this.rhs.evaluate(p); - if (a && this.hasUntypedArgument) { - const v = wr(f), - S = wr(g); - if (v.kind !== S.kind || v.kind !== "string" && v.kind !== "number") throw new wi(`Expected arguments for "${i}" to be (string, string) or (number, number), but found (${v.kind}, ${S.kind}) instead.`) - } - if (this.collator && !a && this.hasUntypedArgument) { - const v = wr(f), - S = wr(g); - if (v.kind !== "string" || S.kind !== "string") return t(p, f, g) - } - return this.collator ? r(p, f, g, this.collator.evaluate(p)) : t(p, f, g) - } - eachChild(p) { - p(this.lhs), p(this.rhs), this.collator && p(this.collator) - } - outputDefined() { - return !0 - } - } - } - const gh = Dn("==", (function(i, t, r) { - return t === r - }), _o), - tl = Dn("!=", (function(i, t, r) { - return t !== r - }), (function(i, t, r, a) { - return !_o(0, t, r, a) - })), - Jd = Dn("<", (function(i, t, r) { - return t < r - }), (function(i, t, r, a) { - return a.compare(t, r) < 0 - })), - gc = Dn(">", (function(i, t, r) { - return t > r - }), (function(i, t, r, a) { - return a.compare(t, r) > 0 - })), - Qd = Dn("<=", (function(i, t, r) { - return t <= r - }), (function(i, t, r, a) { - return a.compare(t, r) <= 0 - })), - ep = Dn(">=", (function(i, t, r) { - return t >= r - }), (function(i, t, r, a) { - return a.compare(t, r) >= 0 - })); - class rl { - constructor(t, r, a) { - this.type = bi, this.locale = a, this.caseSensitive = t, this.diacriticSensitive = r - } - static parse(t, r) { - if (t.length !== 2) return r.error("Expected one argument."); - const a = t[1]; - if (typeof a != "object" || Array.isArray(a)) return r.error("Collator options argument must be an object."); - const c = r.parse(a["case-sensitive"] !== void 0 && a["case-sensitive"], 1, Gt); - if (!c) return null; - const p = r.parse(a["diacritic-sensitive"] !== void 0 && a["diacritic-sensitive"], 1, Gt); - if (!p) return null; - let f = null; - return a.locale && (f = r.parse(a.locale, 1, jt), !f) ? null : new rl(c, p, f) - } - evaluate(t) { - return new on(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 vc { - constructor(t, r, a, c, p) { - this.type = jt, this.number = t, this.locale = r, this.currency = a, this.minFractionDigits = c, this.maxFractionDigits = p - } - static parse(t, r) { - if (t.length !== 3) return r.error("Expected two arguments."); - const a = r.parse(t[1], 1, Ke); - if (!a) return null; - const c = t[2]; - if (typeof c != "object" || Array.isArray(c)) return r.error("NumberFormat options argument must be an object."); - let p = null; - if (c.locale && (p = r.parse(c.locale, 1, jt), !p)) return null; - let f = null; - if (c.currency && (f = r.parse(c.currency, 1, jt), !f)) return null; - let g = null; - if (c["min-fraction-digits"] && (g = r.parse(c["min-fraction-digits"], 1, Ke), !g)) return null; - let v = null; - return c["max-fraction-digits"] && (v = r.parse(c["max-fraction-digits"], 1, Ke), !v) ? null : new vc(a, p, f, g, v) - } - evaluate(t) { - return new Intl.NumberFormat(this.locale ? this.locale.evaluate(t) : [], { - style: this.currency ? "currency" : "decimal", - currency: this.currency ? this.currency.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.minFractionDigits && t(this.minFractionDigits), this.maxFractionDigits && t(this.maxFractionDigits) - } - outputDefined() { - return !1 - } - } - class ms { - constructor(t) { - this.type = Si, this.sections = t - } - static parse(t, r) { - if (t.length < 2) return r.error("Expected at least one argument."); - const a = t[1]; - if (!Array.isArray(a) && typeof a == "object") return r.error("First argument must be an image or text section."); - const c = []; - let p = !1; - for (let f = 1; f <= t.length - 1; ++f) { - const g = t[f]; - if (p && typeof g == "object" && !Array.isArray(g)) { - p = !1; - let v = null; - if (g["font-scale"] && (v = r.parse(g["font-scale"], 1, Ke), !v)) return null; - let S = null; - if (g["text-font"] && (S = r.parse(g["text-font"], 1, Qr(jt)), !S)) return null; - let I = null; - if (g["text-color"] && (I = r.parse(g["text-color"], 1, Dr), !I)) return null; - let E = null; - if (g["vertical-align"]) { - if (typeof g["vertical-align"] == "string" && !vn.includes(g["vertical-align"])) return r.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${g["vertical-align"]}' instead.`); - if (E = r.parse(g["vertical-align"], 1, jt), !E) return null - } - const R = c[c.length - 1]; - R.scale = v, R.font = S, R.textColor = I, R.verticalAlign = E - } else { - const v = r.parse(t[f], 1, fr); - if (!v) return null; - const S = v.type.kind; - if (S !== "string" && S !== "value" && S !== "null" && S !== "resolvedImage") return r.error("Formatted text type must be 'string', 'value', 'image' or 'null'."); - p = !0, c.push({ - content: v, - scale: null, - font: null, - textColor: null, - verticalAlign: null - }) - } - } - return new ms(c) - } - evaluate(t) { - return new ln(this.sections.map((r => { - const a = r.content.evaluate(t); - return wr(a) === rr ? new _a("", a, null, null, null, r.verticalAlign ? r.verticalAlign.evaluate(t) : null) : new _a(Vr(a), null, r.scale ? r.scale.evaluate(t) : null, r.font ? r.font.evaluate(t).join(",") : null, r.textColor ? r.textColor.evaluate(t) : null, r.verticalAlign ? r.verticalAlign.evaluate(t) : null) - }))) - } - eachChild(t) { - for (const r of this.sections) t(r.content), r.scale && t(r.scale), r.font && t(r.font), r.textColor && t(r.textColor), r.verticalAlign && t(r.verticalAlign) - } - outputDefined() { - return !1 - } - } - class yc { - constructor(t) { - this.type = rr, this.input = t - } - static parse(t, r) { - if (t.length !== 2) return r.error("Expected two arguments."); - const a = r.parse(t[1], 1, jt); - return a ? new yc(a) : r.error("No image name provided.") - } - evaluate(t) { - const r = this.input.evaluate(t), - a = Nn.fromString(r); - return a && t.availableImages && (a.available = t.availableImages.indexOf(r) > -1), a - } - eachChild(t) { - t(this.input) - } - outputDefined() { - return !1 - } - } - class il { - constructor(t) { - this.type = Ke, this.input = t - } - static parse(t, r) { - if (t.length !== 2) return r.error(`Expected 1 argument, but found ${t.length-1} instead.`); - const a = r.parse(t[1], 1); - return a ? a.type.kind !== "array" && a.type.kind !== "string" && a.type.kind !== "value" ? r.error(`Expected argument of type string or array, but found ${Yr(a.type)} instead.`) : new il(a) : null - } - evaluate(t) { - const r = this.input.evaluate(t); - if (typeof r == "string") return [...r].length; - if (Array.isArray(r)) return r.length; - throw new wi(`Expected value to be of type string or array, but found ${Yr(wr(r))} instead.`) - } - eachChild(t) { - t(this.input) - } - outputDefined() { - return !1 - } - } - const ya = 8192; - - function tp(i, t) { - const r = (180 + i[0]) / 360, - a = (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + i[1] * Math.PI / 360))) / 360, - c = Math.pow(2, t.z); - return [Math.round(r * c * ya), Math.round(a * c * ya)] - } - - function nl(i, t) { - const r = Math.pow(2, t.z); - return [(c = (i[0] / ya + t.x) / r, 360 * c - 180), (a = (i[1] / ya + t.y) / r, 360 / Math.PI * Math.atan(Math.exp((180 - 360 * a) * Math.PI / 180)) - 90)]; - var a, c - } - - function go(i, t) { - i[0] = Math.min(i[0], t[0]), i[1] = Math.min(i[1], t[1]), i[2] = Math.max(i[2], t[0]), i[3] = Math.max(i[3], t[1]) - } - - function vo(i, t) { - return !(i[0] <= t[0] || i[2] >= t[2] || i[1] <= t[1] || i[3] >= t[3]) - } - - function rp(i, t, r) { - const a = i[0] - t[0], - c = i[1] - t[1], - p = i[0] - r[0], - f = i[1] - r[1]; - return a * f - p * c == 0 && a * p <= 0 && c * f <= 0 - } - - function al(i, t, r, a) { - return (c = [a[0] - r[0], a[1] - r[1]])[0] * (p = [t[0] - i[0], t[1] - i[1]])[1] - c[1] * p[0] != 0 && !(!yh(i, t, r, a) || !yh(r, a, i, t)); - var c, p - } - - function ip(i, t, r) { - for (const a of r) - for (let c = 0; c < a.length - 1; ++c) - if (al(i, t, a[c], a[c + 1])) return !0; - return !1 - } - - function _s(i, t, r = !1) { - let a = !1; - for (const g of t) - for (let v = 0; v < g.length - 1; v++) { - if (rp(i, g[v], g[v + 1])) return r; - (p = g[v])[1] > (c = i)[1] != (f = g[v + 1])[1] > c[1] && c[0] < (f[0] - p[0]) * (c[1] - p[1]) / (f[1] - p[1]) + p[0] && (a = !a) - } - var c, p, f; - return a - } - - function vh(i, t) { - for (const r of t) - if (_s(i, r)) return !0; - return !1 - } - - function xc(i, t) { - for (const r of i) - if (!_s(r, t)) return !1; - for (let r = 0; r < i.length - 1; ++r) - if (ip(i[r], i[r + 1], t)) return !1; - return !0 - } - - function np(i, t) { - for (const r of t) - if (xc(i, r)) return !0; - return !1 - } - - function yh(i, t, r, a) { - const c = a[0] - r[0], - p = a[1] - r[1], - f = (i[0] - r[0]) * p - c * (i[1] - r[1]), - g = (t[0] - r[0]) * p - c * (t[1] - r[1]); - return f > 0 && g < 0 || f < 0 && g > 0 - } - - function bc(i, t, r) { - const a = []; - for (let c = 0; c < i.length; c++) { - const p = []; - for (let f = 0; f < i[c].length; f++) { - const g = tp(i[c][f], r); - go(t, g), p.push(g) - } - a.push(p) - } - return a - } - - function xh(i, t, r) { - const a = []; - for (let c = 0; c < i.length; c++) { - const p = bc(i[c], t, r); - a.push(p) - } - return a - } - - function sl(i, t, r, a) { - if (i[0] < r[0] || i[0] > r[2]) { - const c = .5 * a; - let p = i[0] - r[0] > c ? -a : r[0] - i[0] > c ? a : 0; - p === 0 && (p = i[0] - r[2] > c ? -a : r[2] - i[0] > c ? a : 0), i[0] += p - } - go(t, i) - } - - function bh(i, t, r, a) { - const c = Math.pow(2, a.z) * ya, - p = [a.x * ya, a.y * ya], - f = []; - for (const g of i) - for (const v of g) { - const S = [v.x + p[0], v.y + p[1]]; - sl(S, t, r, c), f.push(S) - } - return f - } - - function wh(i, t, r, a) { - const c = Math.pow(2, a.z) * ya, - p = [a.x * ya, a.y * ya], - f = []; - for (const v of i) { - const S = []; - for (const I of v) { - const E = [I.x + p[0], I.y + p[1]]; - go(t, E), S.push(E) - } - f.push(S) - } - if (t[2] - t[0] <= c / 2) { - (g = t)[0] = g[1] = 1 / 0, g[2] = g[3] = -1 / 0; - for (const v of f) - for (const S of v) sl(S, t, r, c) - } - var g; - return f - } - class gs { - constructor(t, r) { - this.type = Gt, this.geojson = t, this.geometries = r - } - static parse(t, r) { - if (t.length !== 2) return r.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`); - if (Za(t[1])) { - const a = t[1]; - if (a.type === "FeatureCollection") { - const c = []; - for (const p of a.features) { - const { - type: f, - coordinates: g - } = p.geometry; - f === "Polygon" && c.push(g), f === "MultiPolygon" && c.push(...g) - } - if (c.length) return new gs(a, { - type: "MultiPolygon", - coordinates: c - }) - } else if (a.type === "Feature") { - const c = a.geometry.type; - if (c === "Polygon" || c === "MultiPolygon") return new gs(a, a.geometry) - } else if (a.type === "Polygon" || a.type === "MultiPolygon") return new gs(a, a) - } - return r.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(r, a) { - const c = [1 / 0, 1 / 0, -1 / 0, -1 / 0], - p = [1 / 0, 1 / 0, -1 / 0, -1 / 0], - f = r.canonicalID(); - if (a.type === "Polygon") { - const g = bc(a.coordinates, p, f), - v = bh(r.geometry(), c, p, f); - if (!vo(c, p)) return !1; - for (const S of v) - if (!_s(S, g)) return !1 - } - if (a.type === "MultiPolygon") { - const g = xh(a.coordinates, p, f), - v = bh(r.geometry(), c, p, f); - if (!vo(c, p)) return !1; - for (const S of v) - if (!vh(S, g)) return !1 - } - return !0 - })(t, this.geometries); - if (t.geometryType() === "LineString") return (function(r, a) { - const c = [1 / 0, 1 / 0, -1 / 0, -1 / 0], - p = [1 / 0, 1 / 0, -1 / 0, -1 / 0], - f = r.canonicalID(); - if (a.type === "Polygon") { - const g = bc(a.coordinates, p, f), - v = wh(r.geometry(), c, p, f); - if (!vo(c, p)) return !1; - for (const S of v) - if (!xc(S, g)) return !1 - } - if (a.type === "MultiPolygon") { - const g = xh(a.coordinates, p, f), - v = wh(r.geometry(), c, p, f); - if (!vo(c, p)) return !1; - for (const S of v) - if (!np(S, g)) return !1 - } - return !0 - })(t, this.geometries) - } - return !1 - } - eachChild() {} - outputDefined() { - return !0 - } - } - let wc = class { - constructor(i = [], t = (r, a) => r < a ? -1 : r > a ? 1 : 0) { - if (this.data = i, this.length = this.data.length, this.compare = t, this.length > 0) - for (let r = (this.length >> 1) - 1; r >= 0; r--) this._down(r) - } - push(i) { - this.data.push(i), this._up(this.length++) - } - pop() { - if (this.length === 0) return; - const i = this.data[0], - t = this.data.pop(); - return --this.length > 0 && (this.data[0] = t, this._down(0)), i - } - peek() { - return this.data[0] - } - _up(i) { - const { - data: t, - compare: r - } = this, a = t[i]; - for (; i > 0;) { - const c = i - 1 >> 1, - p = t[c]; - if (r(a, p) >= 0) break; - t[i] = p, i = c - } - t[i] = a - } - _down(i) { - const { - data: t, - compare: r - } = this, a = this.length >> 1, c = t[i]; - for (; i < a;) { - let p = 1 + (i << 1); - const f = p + 1; - if (f < this.length && r(t[f], t[p]) < 0 && (p = f), r(t[p], c) >= 0) break; - t[i] = t[p], i = p - } - t[i] = c - } - }; - - function Tc(i, t, r = 0, a = i.length - 1, c = ap) { - for (; a > r;) { - if (a - r > 600) { - const v = a - r + 1, - S = t - r + 1, - I = Math.log(v), - E = .5 * Math.exp(2 * I / 3), - R = .5 * Math.sqrt(I * E * (v - E) / v) * (S - v / 2 < 0 ? -1 : 1); - Tc(i, t, Math.max(r, Math.floor(t - S * E / v + R)), Math.min(a, Math.floor(t + (v - S) * E / v + R)), c) - } - const p = i[t]; - let f = r, - g = a; - for (yo(i, r, t), c(i[a], p) > 0 && yo(i, r, a); f < g;) { - for (yo(i, f, g), f++, g--; c(i[f], p) < 0;) f++; - for (; c(i[g], p) > 0;) g-- - } - c(i[r], p) === 0 ? yo(i, r, g) : (g++, yo(i, g, a)), g <= t && (r = g + 1), t <= g && (a = g - 1) - } - } - - function yo(i, t, r) { - const a = i[t]; - i[t] = i[r], i[r] = a - } - - function ap(i, t) { - return i < t ? -1 : i > t ? 1 : 0 - } - - function xo(i, t) { - if (i.length <= 1) return [i]; - const r = []; - let a, c; - for (const p of i) { - const f = sp(p); - f !== 0 && (p.area = Math.abs(f), c === void 0 && (c = f < 0), c === f < 0 ? (a && r.push(a), a = [p]) : a.push(p)) - } - if (a && r.push(a), t > 1) - for (let p = 0; p < r.length; p++) r[p].length <= t || (Tc(r[p], t, 1, r[p].length - 1, Th), r[p] = r[p].slice(0, t)); - return r - } - - function Th(i, t) { - return t.area - i.area - } - - function sp(i) { - let t = 0; - for (let r, a, c = 0, p = i.length, f = p - 1; c < p; f = c++) r = i[c], a = i[f], t += (a.x - r.x) * (r.y + a.y); - return t - } - const Ch = 1 / 298.257223563, - Sh = Ch * (2 - Ch), - Cc = Math.PI / 180; - class Sc { - constructor(t) { - const r = 6378.137 * Cc * 1e3, - a = Math.cos(t * Cc), - c = 1 / (1 - Sh * (1 - a * a)), - p = Math.sqrt(c); - this.kx = r * p * a, this.ky = r * p * c * (1 - Sh) - } - distance(t, r) { - const a = this.wrap(t[0] - r[0]) * this.kx, - c = (t[1] - r[1]) * this.ky; - return Math.sqrt(a * a + c * c) - } - pointOnLine(t, r) { - let a, c, p, f, g = 1 / 0; - for (let v = 0; v < t.length - 1; v++) { - let S = t[v][0], - I = t[v][1], - E = this.wrap(t[v + 1][0] - S) * this.kx, - R = (t[v + 1][1] - I) * this.ky, - N = 0; - E === 0 && R === 0 || (N = (this.wrap(r[0] - S) * this.kx * E + (r[1] - I) * this.ky * R) / (E * E + R * R), N > 1 ? (S = t[v + 1][0], I = t[v + 1][1]) : N > 0 && (S += E / this.kx * N, I += R / this.ky * N)), E = this.wrap(r[0] - S) * this.kx, R = (r[1] - I) * this.ky; - const j = E * E + R * R; - j < g && (g = j, a = S, c = I, p = v, f = N) - } - return { - point: [a, c], - index: p, - t: Math.max(0, Math.min(1, f)) - } - } - wrap(t) { - for (; t < -180;) t += 360; - for (; t > 180;) t -= 360; - return t - } - } - - function Ph(i, t) { - return t[0] - i[0] - } - - function ol(i) { - return i[1] - i[0] + 1 - } - - function $a(i, t) { - return i[1] >= i[0] && i[1] < t - } - - function vi(i, t) { - if (i[0] > i[1]) return [null, null]; - const r = ol(i); - if (t) { - if (r === 2) return [i, null]; - const c = Math.floor(r / 2); - return [ - [i[0], i[0] + c], - [i[0] + c, i[1]] - ] - } - if (r === 1) return [i, null]; - const a = Math.floor(r / 2) - 1; - return [ - [i[0], i[0] + a], - [i[0] + a + 1, i[1]] - ] - } - - function Pc(i, t) { - if (!$a(t, i.length)) return [1 / 0, 1 / 0, -1 / 0, -1 / 0]; - const r = [1 / 0, 1 / 0, -1 / 0, -1 / 0]; - for (let a = t[0]; a <= t[1]; ++a) go(r, i[a]); - return r - } - - function Ic(i) { - const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0]; - for (const r of i) - for (const a of r) go(t, a); - return t - } - - function Ih(i) { - return i[0] !== -1 / 0 && i[1] !== -1 / 0 && i[2] !== 1 / 0 && i[3] !== 1 / 0 - } - - function Mc(i, t, r) { - if (!Ih(i) || !Ih(t)) return NaN; - let a = 0, - c = 0; - return i[2] < t[0] && (a = t[0] - i[2]), i[0] > t[2] && (a = i[0] - t[2]), i[1] > t[3] && (c = i[1] - t[3]), i[3] < t[1] && (c = t[1] - i[3]), r.distance([0, 0], [a, c]) - } - - function vs(i, t, r) { - const a = r.pointOnLine(t, i); - return r.distance(i, a.point) - } - - function Ac(i, t, r, a, c) { - const p = Math.min(vs(i, [r, a], c), vs(t, [r, a], c)), - f = Math.min(vs(r, [i, t], c), vs(a, [i, t], c)); - return Math.min(p, f) - } - - function op(i, t, r, a, c) { - if (!$a(t, i.length) || !$a(a, r.length)) return 1 / 0; - let p = 1 / 0; - for (let f = t[0]; f < t[1]; ++f) { - const g = i[f], - v = i[f + 1]; - for (let S = a[0]; S < a[1]; ++S) { - const I = r[S], - E = r[S + 1]; - if (al(g, v, I, E)) return 0; - p = Math.min(p, Ac(g, v, I, E, c)) - } - } - return p - } - - function lp(i, t, r, a, c) { - if (!$a(t, i.length) || !$a(a, r.length)) return NaN; - let p = 1 / 0; - for (let f = t[0]; f <= t[1]; ++f) - for (let g = a[0]; g <= a[1]; ++g) - if (p = Math.min(p, c.distance(i[f], r[g])), p === 0) return p; - return p - } - - function cp(i, t, r) { - if (_s(i, t, !0)) return 0; - let a = 1 / 0; - for (const c of t) { - const p = c[0], - f = c[c.length - 1]; - if (p !== f && (a = Math.min(a, vs(i, [f, p], r)), a === 0)) return a; - const g = r.pointOnLine(c, i); - if (a = Math.min(a, r.distance(i, g.point)), a === 0) return a - } - return a - } - - function up(i, t, r, a) { - if (!$a(t, i.length)) return NaN; - for (let p = t[0]; p <= t[1]; ++p) - if (_s(i[p], r, !0)) return 0; - let c = 1 / 0; - for (let p = t[0]; p < t[1]; ++p) { - const f = i[p], - g = i[p + 1]; - for (const v of r) - for (let S = 0, I = v.length, E = I - 1; S < I; E = S++) { - const R = v[E], - N = v[S]; - if (al(f, g, R, N)) return 0; - c = Math.min(c, Ac(f, g, R, N, a)) - } - } - return c - } - - function Mh(i, t) { - for (const r of i) - for (const a of r) - if (_s(a, t, !0)) return !0; - return !1 - } - - function hp(i, t, r, a = 1 / 0) { - const c = Ic(i), - p = Ic(t); - if (a !== 1 / 0 && Mc(c, p, r) >= a) return a; - if (vo(c, p)) { - if (Mh(i, t)) return 0 - } else if (Mh(t, i)) return 0; - let f = 1 / 0; - for (const g of i) - for (let v = 0, S = g.length, I = S - 1; v < S; I = v++) { - const E = g[I], - R = g[v]; - for (const N of t) - for (let j = 0, Z = N.length, Y = Z - 1; j < Z; Y = j++) { - const ae = N[Y], - ze = N[j]; - if (al(E, R, ae, ze)) return 0; - f = Math.min(f, Ac(E, R, ae, ze, r)) - } - } - return f - } - - function Ah(i, t, r, a, c, p) { - if (!p) return; - const f = Mc(Pc(a, p), c, r); - f < t && i.push([f, p, [0, 0]]) - } - - function ll(i, t, r, a, c, p, f) { - if (!p || !f) return; - const g = Mc(Pc(a, p), Pc(c, f), r); - g < t && i.push([g, p, f]) - } - - function cl(i, t, r, a, c = 1 / 0) { - let p = Math.min(a.distance(i[0], r[0][0]), c); - if (p === 0) return p; - const f = new wc([ - [0, [0, i.length - 1], - [0, 0] - ] - ], Ph), - g = Ic(r); - for (; f.length > 0;) { - const v = f.pop(); - if (v[0] >= p) continue; - const S = v[1], - I = t ? 50 : 100; - if (ol(S) <= I) { - if (!$a(S, i.length)) return NaN; - if (t) { - const E = up(i, S, r, a); - if (isNaN(E) || E === 0) return E; - p = Math.min(p, E) - } else - for (let E = S[0]; E <= S[1]; ++E) { - const R = cp(i[E], r, a); - if (p = Math.min(p, R), p === 0) return 0 - } - } else { - const E = vi(S, t); - Ah(f, p, a, i, g, E[0]), Ah(f, p, a, i, g, E[1]) - } - } - return p - } - - function ul(i, t, r, a, c, p = 1 / 0) { - let f = Math.min(p, c.distance(i[0], r[0])); - if (f === 0) return f; - const g = new wc([ - [0, [0, i.length - 1], - [0, r.length - 1] - ] - ], Ph); - for (; g.length > 0;) { - const v = g.pop(); - if (v[0] >= f) continue; - const S = v[1], - I = v[2], - E = t ? 50 : 100, - R = a ? 50 : 100; - if (ol(S) <= E && ol(I) <= R) { - if (!$a(S, i.length) && $a(I, r.length)) return NaN; - let N; - if (t && a) N = op(i, S, r, I, c), f = Math.min(f, N); - else if (t && !a) { - const j = i.slice(S[0], S[1] + 1); - for (let Z = I[0]; Z <= I[1]; ++Z) - if (N = vs(r[Z], j, c), f = Math.min(f, N), f === 0) return f - } else if (!t && a) { - const j = r.slice(I[0], I[1] + 1); - for (let Z = S[0]; Z <= S[1]; ++Z) - if (N = vs(i[Z], j, c), f = Math.min(f, N), f === 0) return f - } else N = lp(i, S, r, I, c), f = Math.min(f, N) - } else { - const N = vi(S, t), - j = vi(I, a); - ll(g, f, c, i, r, N[0], j[0]), ll(g, f, c, i, r, N[0], j[1]), ll(g, f, c, i, r, N[1], j[0]), ll(g, f, c, i, r, N[1], j[1]) - } - } - return f - } - - function kc(i) { - return i.type === "MultiPolygon" ? i.coordinates.map((t => ({ - type: "Polygon", - coordinates: t - }))) : i.type === "MultiLineString" ? i.coordinates.map((t => ({ - type: "LineString", - coordinates: t - }))) : i.type === "MultiPoint" ? i.coordinates.map((t => ({ - type: "Point", - coordinates: t - }))) : [i] - } - class ys { - constructor(t, r) { - this.type = Ke, this.geojson = t, this.geometries = r - } - static parse(t, r) { - if (t.length !== 2) return r.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`); - if (Za(t[1])) { - const a = t[1]; - if (a.type === "FeatureCollection") return new ys(a, a.features.map((c => kc(c.geometry))).flat()); - if (a.type === "Feature") return new ys(a, kc(a.geometry)); - if ("type" in a && "coordinates" in a) return new ys(a, kc(a)) - } - return r.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(r, a) { - const c = r.geometry(), - p = c.flat().map((v => nl([v.x, v.y], r.canonical))); - if (c.length === 0) return NaN; - const f = new Sc(p[0][1]); - let g = 1 / 0; - for (const v of a) { - switch (v.type) { - case "Point": - g = Math.min(g, ul(p, !1, [v.coordinates], !1, f, g)); - break; - case "LineString": - g = Math.min(g, ul(p, !1, v.coordinates, !0, f, g)); - break; - case "Polygon": - g = Math.min(g, cl(p, !1, v.coordinates, f, g)) - } - if (g === 0) return g - } - return g - })(t, this.geometries); - if (t.geometryType() === "LineString") return (function(r, a) { - const c = r.geometry(), - p = c.flat().map((v => nl([v.x, v.y], r.canonical))); - if (c.length === 0) return NaN; - const f = new Sc(p[0][1]); - let g = 1 / 0; - for (const v of a) { - switch (v.type) { - case "Point": - g = Math.min(g, ul(p, !0, [v.coordinates], !1, f, g)); - break; - case "LineString": - g = Math.min(g, ul(p, !0, v.coordinates, !0, f, g)); - break; - case "Polygon": - g = Math.min(g, cl(p, !0, v.coordinates, f, g)) - } - if (g === 0) return g - } - return g - })(t, this.geometries); - if (t.geometryType() === "Polygon") return (function(r, a) { - const c = r.geometry(); - if (c.length === 0 || c[0].length === 0) return NaN; - const p = xo(c, 0).map((v => v.map((S => S.map((I => nl([I.x, I.y], r.canonical))))))), - f = new Sc(p[0][0][0][1]); - let g = 1 / 0; - for (const v of a) - for (const S of p) { - switch (v.type) { - case "Point": - g = Math.min(g, cl([v.coordinates], !1, S, f, g)); - break; - case "LineString": - g = Math.min(g, cl(v.coordinates, !0, S, f, g)); - break; - case "Polygon": - g = Math.min(g, hp(S, v.coordinates, f, g)) - } - if (g === 0) return g - } - return g - })(t, this.geometries) - } - return NaN - } - eachChild() {} - outputDefined() { - return !0 - } - } - class bo { - constructor(t) { - this.type = fr, this.key = t - } - static parse(t, r) { - if (t.length !== 2) return r.error(`Expected 1 argument, but found ${t.length-1} instead.`); - const a = t[1]; - return a == null ? r.error("Global state property must be defined.") : typeof a != "string" ? r.error(`Global state property must be string, but found ${typeof t[1]} instead.`) : new bo(a) - } - evaluate(t) { - var r; - const a = (r = t.globals) === null || r === void 0 ? void 0 : r.globalState; - return a && Object.keys(a).length !== 0 ? gi(a, this.key) : null - } - eachChild() {} - outputDefined() { - return !1 - } - } - const Os = { - "==": gh, - "!=": tl, - ">": gc, - "<": Jd, - ">=": ep, - "<=": Qd, - array: ra, - at: Qo, - boolean: ra, - case: Bs, - coalesce: fo, - collator: rl, - format: ms, - image: yc, - in: el, - "index-of": va, - interpolate: In, - "interpolate-hcl": In, - "interpolate-lab": In, - length: il, - let: co, - literal: ga, - match: yn, - number: ra, - "number-format": vc, - object: ra, - slice: uo, - step: Gi, - string: ra, - "to-boolean": Ba, - "to-color": Ba, - "to-number": Ba, - "to-string": Ba, - var: Jo, - within: gs, - distance: ys, - "global-state": bo - }; - class ca { - constructor(t, r, a, c) { - this.name = t, this.type = r, this._evaluate = a, this.args = c - } - evaluate(t) { - return this._evaluate(t, this.args) - } - eachChild(t) { - this.args.forEach(t) - } - outputDefined() { - return !1 - } - static parse(t, r) { - const a = t[0], - c = ca.definitions[a]; - if (!c) return r.error(`Unknown expression "${a}". If you wanted a literal array, use ["literal", [...]].`, 0); - const p = Array.isArray(c) ? c[0] : c.type, - f = Array.isArray(c) ? [ - [c[1], c[2]] - ] : c.overloads, - g = f.filter((([S]) => !Array.isArray(S) || S.length === t.length - 1)); - let v = null; - for (const [S, I] of g) { - v = new Rs(r.registry, hl, r.path, null, r.scope); - const E = []; - let R = !1; - for (let N = 1; N < t.length; N++) { - const j = t[N], - Z = Array.isArray(S) ? S[N - 1] : S.type, - Y = v.parse(j, 1 + E.length, Z); - if (!Y) { - R = !0; - break - } - E.push(Y) - } - if (!R) - if (Array.isArray(S) && S.length !== E.length) v.error(`Expected ${S.length} arguments, but found ${E.length} instead.`); - else { - for (let N = 0; N < E.length; N++) { - const j = Array.isArray(S) ? S[N] : S.type, - Z = E[N]; - v.concat(N + 1).checkSubtype(j, Z.type) - } - if (v.errors.length === 0) return new ca(a, p, I, E) - } - } - if (g.length === 1) r.errors.push(...v.errors); - else { - const S = (g.length ? g : f).map((([E]) => { - return R = E, Array.isArray(R) ? `(${R.map(Yr).join(", ")})` : `(${Yr(R.type)}...)`; - var R - })).join(" | "), - I = []; - for (let E = 1; E < t.length; E++) { - const R = r.parse(t[E], 1 + I.length); - if (!R) return null; - I.push(Yr(R.type)) - } - r.error(`Expected arguments of type ${S}, but found (${I.join(", ")}) instead.`) - } - return null - } - static register(t, r) { - ca.definitions = r; - for (const a in r) t[a] = ca - } - } - - function kh(i, [t, r, a, c]) { - t = t.evaluate(i), r = r.evaluate(i), a = a.evaluate(i); - const p = c ? c.evaluate(i) : 1, - f = Ti(t, r, a, p); - if (f) throw new wi(f); - return new yr(t / 255, r / 255, a / 255, p, !1) - } - - function Eh(i, t) { - return i in t - } - - function Ec(i, t) { - const r = t[i]; - return r === void 0 ? null : r - } - - function xs(i) { - return { - type: i - } - } - - function hl(i) { - if (i instanceof Jo) return hl(i.boundExpression); - if (i instanceof ca && i.name === "error" || i instanceof rl || i instanceof gs || i instanceof ys || i instanceof bo) return !1; - const t = i instanceof Ba || i instanceof ra; - let r = !0; - return i.eachChild((a => { - r = t ? r && hl(a) : r && a instanceof ga - })), !!r && dl(i) && pl(i, ["zoom", "heatmap-density", "elevation", "line-progress", "accumulated", "is-supported-script"]) - } - - function dl(i) { - if (i instanceof ca && (i.name === "get" && i.args.length === 1 || i.name === "feature-state" || i.name === "has" && i.args.length === 1 || i.name === "properties" || i.name === "geometry-type" || i.name === "id" || /^filter-/.test(i.name)) || i instanceof gs || i instanceof ys) return !1; - let t = !0; - return i.eachChild((r => { - t && !dl(r) && (t = !1) - })), t - } - - function wo(i) { - if (i instanceof ca && i.name === "feature-state") return !1; - let t = !0; - return i.eachChild((r => { - t && !wo(r) && (t = !1) - })), t - } - - function pl(i, t) { - if (i instanceof ca && t.indexOf(i.name) >= 0) return !1; - let r = !0; - return i.eachChild((a => { - r && !pl(a, t) && (r = !1) - })), r - } - - function zh(i) { - return { - result: "success", - value: i - } - } - - function Ns(i) { - return { - result: "error", - value: i - } - } - - function rs(i) { - return i["property-type"] === "data-driven" || i["property-type"] === "cross-faded-data-driven" - } - - function Lh(i) { - return !!i.expression && i.expression.parameters.indexOf("zoom") > -1 - } - - function zc(i) { - return !!i.expression && i.expression.interpolated - } - - function ii(i) { - return i instanceof Number ? "number" : i instanceof String ? "string" : i instanceof Boolean ? "boolean" : Array.isArray(i) ? "array" : i === null ? "null" : typeof i - } - - function To(i) { - return typeof i == "object" && i !== null && !Array.isArray(i) && wr(i) === li - } - - function dp(i) { - return i - } - - function Dh(i, t) { - const r = i.stops && typeof i.stops[0][0] == "object", - a = r || !(r || i.property !== void 0), - c = i.type || (zc(t) ? "exponential" : "interval"), - p = (function(I) { - switch (I.type) { - case "color": - return yr.parse; - case "padding": - return Ki.parse; - case "numberArray": - return cn.parse; - case "colorArray": - return Ni.parse; - default: - return null - } - })(t); - if (p && ((i = Ci({}, i)).stops && (i.stops = i.stops.map((I => [I[0], p(I[1])]))), i.default = p(i.default ? i.default : t.default)), i.colorSpace && (f = i.colorSpace) !== "rgb" && f !== "hcl" && f !== "lab") throw new Error(`Unknown color space: "${i.colorSpace}"`); - var f; - const g = (function(I) { - switch (I) { - case "exponential": - return Bh; - case "interval": - return pp; - case "categorical": - return Rh; - case "identity": - return fp; - default: - throw new Error(`Unknown function type "${I}"`) - } - })(c); - let v, S; - if (c === "categorical") { - v = Object.create(null); - for (const I of i.stops) v[I[0]] = I[1]; - S = typeof i.stops[0][0] - } - if (r) { - const I = {}, - E = []; - for (let j = 0; j < i.stops.length; j++) { - const Z = i.stops[j], - Y = Z[0].zoom; - I[Y] === void 0 && (I[Y] = { - zoom: Y, - type: i.type, - property: i.property, - default: i.default, - stops: [] - }, E.push(Y)), I[Y].stops.push([Z[0].value, Z[1]]) - } - const R = []; - for (const j of E) R.push([I[j].zoom, Dh(I[j], t)]); - const N = { - name: "linear" - }; - return { - kind: "composite", - interpolationType: N, - interpolationFactor: In.interpolationFactor.bind(void 0, N), - zoomStops: R.map((j => j[0])), - evaluate: ({ - zoom: j - }, Z) => Bh({ - stops: R, - base: i.base - }, t, j).evaluate(j, Z) - } - } - if (a) { - const I = c === "exponential" ? { - name: "exponential", - base: i.base !== void 0 ? i.base : 1 - } : null; - return { - kind: "camera", - interpolationType: I, - interpolationFactor: In.interpolationFactor.bind(void 0, I), - zoomStops: i.stops.map((E => E[0])), - evaluate: ({ - zoom: E - }) => g(i, t, E, v, S) - } - } - return { - kind: "source", - evaluate(I, E) { - const R = E && E.properties ? E.properties[i.property] : void 0; - return R === void 0 ? is(i.default, t.default) : g(i, t, R, v, S) - } - } - } - - function is(i, t, r) { - return i !== void 0 ? i : t !== void 0 ? t : r !== void 0 ? r : void 0 - } - - function Rh(i, t, r, a, c) { - return is(typeof r === c ? a[r] : void 0, i.default, t.default) - } - - function pp(i, t, r) { - if (ii(r) !== "number") return is(i.default, t.default); - const a = i.stops.length; - if (a === 1 || r <= i.stops[0][0]) return i.stops[0][1]; - if (r >= i.stops[a - 1][0]) return i.stops[a - 1][1]; - const c = fs(i.stops.map((p => p[0])), r); - return i.stops[c][1] - } - - function Bh(i, t, r) { - const a = i.base !== void 0 ? i.base : 1; - if (ii(r) !== "number") return is(i.default, t.default); - const c = i.stops.length; - if (c === 1 || r <= i.stops[0][0]) return i.stops[0][1]; - if (r >= i.stops[c - 1][0]) return i.stops[c - 1][1]; - const p = fs(i.stops.map((I => I[0])), r), - f = (function(I, E, R, N) { - const j = N - R, - Z = I - R; - return j === 0 ? 0 : E === 1 ? Z / j : (Math.pow(E, Z) - 1) / (Math.pow(E, j) - 1) - })(r, a, i.stops[p][0], i.stops[p + 1][0]), - g = i.stops[p][1], - v = i.stops[p + 1][1], - S = Fa[t.type] || dp; - return typeof g.evaluate == "function" ? { - evaluate(...I) { - const E = g.evaluate.apply(void 0, I), - R = v.evaluate.apply(void 0, I); - if (E !== void 0 && R !== void 0) return S(E, R, f, i.colorSpace) - } - } : S(g, v, f, i.colorSpace) - } - - function fp(i, t, r) { - switch (t.type) { - case "color": - r = yr.parse(r); - break; - case "formatted": - r = ln.fromString(r.toString()); - break; - case "resolvedImage": - r = Nn.fromString(r.toString()); - break; - case "padding": - r = Ki.parse(r); - break; - case "colorArray": - r = Ni.parse(r); - break; - case "numberArray": - r = cn.parse(r); - break; - default: - ii(r) === t.type || t.type === "enum" && t.values[r] || (r = void 0) - } - return is(r, i.default, t.default) - } - ca.register(Os, { - error: [{ - kind: "error" - }, - [jt], (i, [t]) => { - throw new wi(t.evaluate(i)) - } - ], - typeof: [jt, [fr], (i, [t]) => Yr(wr(t.evaluate(i)))], - "to-rgba": [Qr(Ke, 4), [Dr], (i, [t]) => { - const [r, a, c, p] = t.evaluate(i).rgb; - return [255 * r, 255 * a, 255 * c, p] - }], - rgb: [Dr, [Ke, Ke, Ke], kh], - rgba: [Dr, [Ke, Ke, Ke, Ke], kh], - has: { - type: Gt, - overloads: [ - [ - [jt], (i, [t]) => Eh(t.evaluate(i), i.properties()) - ], - [ - [jt, li], (i, [t, r]) => Eh(t.evaluate(i), r.evaluate(i)) - ] - ] - }, - get: { - type: fr, - overloads: [ - [ - [jt], (i, [t]) => Ec(t.evaluate(i), i.properties()) - ], - [ - [jt, li], (i, [t, r]) => Ec(t.evaluate(i), r.evaluate(i)) - ] - ] - }, - "feature-state": [fr, [jt], (i, [t]) => Ec(t.evaluate(i), i.featureState || {})], - properties: [li, [], i => i.properties()], - "geometry-type": [jt, [], i => i.geometryType()], - id: [fr, [], i => i.id()], - zoom: [Ke, [], i => i.globals.zoom], - "heatmap-density": [Ke, [], i => i.globals.heatmapDensity || 0], - elevation: [Ke, [], i => i.globals.elevation || 0], - "line-progress": [Ke, [], i => i.globals.lineProgress || 0], - accumulated: [fr, [], i => i.globals.accumulated === void 0 ? null : i.globals.accumulated], - "+": [Ke, xs(Ke), (i, t) => { - let r = 0; - for (const a of t) r += a.evaluate(i); - return r - }], - "*": [Ke, xs(Ke), (i, t) => { - let r = 1; - for (const a of t) r *= a.evaluate(i); - return r - }], - "-": { - type: Ke, - overloads: [ - [ - [Ke, Ke], (i, [t, r]) => t.evaluate(i) - r.evaluate(i) - ], - [ - [Ke], (i, [t]) => -t.evaluate(i) - ] - ] - }, - "/": [Ke, [Ke, Ke], (i, [t, r]) => t.evaluate(i) / r.evaluate(i)], - "%": [Ke, [Ke, Ke], (i, [t, r]) => t.evaluate(i) % r.evaluate(i)], - ln2: [Ke, [], () => Math.LN2], - pi: [Ke, [], () => Math.PI], - e: [Ke, [], () => Math.E], - "^": [Ke, [Ke, Ke], (i, [t, r]) => Math.pow(t.evaluate(i), r.evaluate(i))], - sqrt: [Ke, [Ke], (i, [t]) => Math.sqrt(t.evaluate(i))], - log10: [Ke, [Ke], (i, [t]) => Math.log(t.evaluate(i)) / Math.LN10], - ln: [Ke, [Ke], (i, [t]) => Math.log(t.evaluate(i))], - log2: [Ke, [Ke], (i, [t]) => Math.log(t.evaluate(i)) / Math.LN2], - sin: [Ke, [Ke], (i, [t]) => Math.sin(t.evaluate(i))], - cos: [Ke, [Ke], (i, [t]) => Math.cos(t.evaluate(i))], - tan: [Ke, [Ke], (i, [t]) => Math.tan(t.evaluate(i))], - asin: [Ke, [Ke], (i, [t]) => Math.asin(t.evaluate(i))], - acos: [Ke, [Ke], (i, [t]) => Math.acos(t.evaluate(i))], - atan: [Ke, [Ke], (i, [t]) => Math.atan(t.evaluate(i))], - min: [Ke, xs(Ke), (i, t) => Math.min(...t.map((r => r.evaluate(i))))], - max: [Ke, xs(Ke), (i, t) => Math.max(...t.map((r => r.evaluate(i))))], - abs: [Ke, [Ke], (i, [t]) => Math.abs(t.evaluate(i))], - round: [Ke, [Ke], (i, [t]) => { - const r = t.evaluate(i); - return r < 0 ? -Math.round(-r) : Math.round(r) - }], - floor: [Ke, [Ke], (i, [t]) => Math.floor(t.evaluate(i))], - ceil: [Ke, [Ke], (i, [t]) => Math.ceil(t.evaluate(i))], - "filter-==": [Gt, [jt, fr], (i, [t, r]) => i.properties()[t.value] === r.value], - "filter-id-==": [Gt, [fr], (i, [t]) => i.id() === t.value], - "filter-type-==": [Gt, [jt], (i, [t]) => i.geometryType() === t.value], - "filter-<": [Gt, [jt, fr], (i, [t, r]) => { - const a = i.properties()[t.value], - c = r.value; - return typeof a == typeof c && a < c - }], - "filter-id-<": [Gt, [fr], (i, [t]) => { - const r = i.id(), - a = t.value; - return typeof r == typeof a && r < a - }], - "filter->": [Gt, [jt, fr], (i, [t, r]) => { - const a = i.properties()[t.value], - c = r.value; - return typeof a == typeof c && a > c - }], - "filter-id->": [Gt, [fr], (i, [t]) => { - const r = i.id(), - a = t.value; - return typeof r == typeof a && r > a - }], - "filter-<=": [Gt, [jt, fr], (i, [t, r]) => { - const a = i.properties()[t.value], - c = r.value; - return typeof a == typeof c && a <= c - }], - "filter-id-<=": [Gt, [fr], (i, [t]) => { - const r = i.id(), - a = t.value; - return typeof r == typeof a && r <= a - }], - "filter->=": [Gt, [jt, fr], (i, [t, r]) => { - const a = i.properties()[t.value], - c = r.value; - return typeof a == typeof c && a >= c - }], - "filter-id->=": [Gt, [fr], (i, [t]) => { - const r = i.id(), - a = t.value; - return typeof r == typeof a && r >= a - }], - "filter-has": [Gt, [fr], (i, [t]) => t.value in i.properties()], - "filter-has-id": [Gt, [], i => i.id() !== null && i.id() !== void 0], - "filter-type-in": [Gt, [Qr(jt)], (i, [t]) => t.value.indexOf(i.geometryType()) >= 0], - "filter-id-in": [Gt, [Qr(fr)], (i, [t]) => t.value.indexOf(i.id()) >= 0], - "filter-in-small": [Gt, [jt, Qr(fr)], (i, [t, r]) => r.value.indexOf(i.properties()[t.value]) >= 0], - "filter-in-large": [Gt, [jt, Qr(fr)], (i, [t, r]) => (function(a, c, p, f) { - for (; p <= f;) { - const g = p + f >> 1; - if (c[g] === a) return !0; - c[g] > a ? f = g - 1 : p = g + 1 - } - return !1 - })(i.properties()[t.value], r.value, 0, r.value.length - 1)], - all: { - type: Gt, - overloads: [ - [ - [Gt, Gt], (i, [t, r]) => t.evaluate(i) && r.evaluate(i) - ], - [xs(Gt), (i, t) => { - for (const r of t) - if (!r.evaluate(i)) return !1; - return !0 - }] - ] - }, - any: { - type: Gt, - overloads: [ - [ - [Gt, Gt], (i, [t, r]) => t.evaluate(i) || r.evaluate(i) - ], - [xs(Gt), (i, t) => { - for (const r of t) - if (r.evaluate(i)) return !0; - return !1 - }] - ] - }, - "!": [Gt, [Gt], (i, [t]) => !t.evaluate(i)], - "is-supported-script": [Gt, [jt], (i, [t]) => { - const r = i.globals && i.globals.isSupportedScript; - return !r || r(t.evaluate(i)) - }], - upcase: [jt, [jt], (i, [t]) => t.evaluate(i).toUpperCase()], - downcase: [jt, [jt], (i, [t]) => t.evaluate(i).toLowerCase()], - concat: [jt, xs(fr), (i, t) => t.map((r => Vr(r.evaluate(i)))).join("")], - "resolved-locale": [jt, [bi], (i, [t]) => t.evaluate(i).resolvedLocale()] - }); - class Lc { - constructor(t, r) { - this.expression = t, this._warningHistory = {}, this._evaluator = new mc, this._defaultValue = r ? (function(a) { - if (a.type === "color" && To(a.default)) return new yr(0, 0, 0, 0); - switch (a.type) { - case "color": - return yr.parse(a.default) || null; - case "padding": - return Ki.parse(a.default) || null; - case "numberArray": - return cn.parse(a.default) || null; - case "colorArray": - return Ni.parse(a.default) || null; - case "variableAnchorOffsetCollection": - return un.parse(a.default) || null; - case "projectionDefinition": - return hn.parse(a.default) || null; - default: - return a.default === void 0 ? null : a.default - } - })(r) : null, this._enumValues = r && r.type === "enum" ? r.values : null - } - evaluateWithoutErrorHandling(t, r, a, c, p, f) { - return this._evaluator.globals = t, this._evaluator.feature = r, this._evaluator.featureState = a, this._evaluator.canonical = c, this._evaluator.availableImages = p || null, this._evaluator.formattedSection = f, this.expression.evaluate(this._evaluator) - } - evaluate(t, r, a, c, p, f) { - this._evaluator.globals = t, this._evaluator.feature = r || null, this._evaluator.featureState = a || null, this._evaluator.canonical = c, this._evaluator.availableImages = p || null, this._evaluator.formattedSection = f || null; - try { - const g = this.expression.evaluate(this._evaluator); - if (g == null || typeof g == "number" && g != g) return this._defaultValue; - if (this._enumValues && !(g in this._enumValues)) throw new wi(`Expected value to be one of ${Object.keys(this._enumValues).map((v=>JSON.stringify(v))).join(", ")}, but found ${JSON.stringify(g)} instead.`); - return g - } catch (g) { - return this._warningHistory[g.message] || (this._warningHistory[g.message] = !0, typeof console < "u" && console.warn(g.message)), this._defaultValue - } - } - } - - function fl(i) { - return Array.isArray(i) && i.length > 0 && typeof i[0] == "string" && i[0] in Os - } - - function Co(i, t) { - const r = new Rs(Os, hl, [], t ? (function(c) { - const p = { - color: Dr, - string: jt, - number: Ke, - enum: jt, - boolean: Gt, - formatted: Si, - padding: zi, - numberArray: Li, - colorArray: mi, - projectionDefinition: Gr, - resolvedImage: rr, - variableAnchorOffsetCollection: yi - }; - return c.type === "array" ? Qr(p[c.value] || fr, c.length) : p[c.type] - })(t) : void 0), - a = r.parse(i, void 0, void 0, void 0, t && t.type === "string" ? { - typeAnnotation: "coerce" - } : void 0); - return a ? zh(new Lc(a, t)) : Ns(r.errors) - } - class So { - constructor(t, r) { - this.kind = t, this._styleExpression = r, this.isStateDependent = t !== "constant" && !wo(r.expression), this.globalStateRefs = Mo(r.expression) - } - evaluateWithoutErrorHandling(t, r, a, c, p, f) { - return this._styleExpression.evaluateWithoutErrorHandling(t, r, a, c, p, f) - } - evaluate(t, r, a, c, p, f) { - return this._styleExpression.evaluate(t, r, a, c, p, f) - } - } - class Dc { - constructor(t, r, a, c) { - this.kind = t, this.zoomStops = a, this._styleExpression = r, this.isStateDependent = t !== "camera" && !wo(r.expression), this.globalStateRefs = Mo(r.expression), this.interpolationType = c - } - evaluateWithoutErrorHandling(t, r, a, c, p, f) { - return this._styleExpression.evaluateWithoutErrorHandling(t, r, a, c, p, f) - } - evaluate(t, r, a, c, p, f) { - return this._styleExpression.evaluate(t, r, a, c, p, f) - } - interpolationFactor(t, r, a) { - return this.interpolationType ? In.interpolationFactor(this.interpolationType, t, r, a) : 0 - } - } - - function Fh(i, t) { - const r = Co(i, t); - if (r.result === "error") return r; - const a = r.value.expression, - c = dl(a); - if (!c && !rs(t)) return Ns([new di("", "data expressions not supported")]); - const p = pl(a, ["zoom"]); - if (!p && !Lh(t)) return Ns([new di("", "zoom expressions not supported")]); - const f = Io(a); - return f || p ? f instanceof di ? Ns([f]) : f instanceof In && !zc(t) ? Ns([new di("", '"interpolate" expressions cannot be used with this property')]) : zh(f ? new Dc(c ? "camera" : "composite", r.value, f.labels, f instanceof In ? f.interpolation : void 0) : new So(c ? "constant" : "source", r.value)) : Ns([new di("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]) - } - class Po { - constructor(t, r) { - this._parameters = t, this._specification = r, Ci(this, Dh(this._parameters, this._specification)) - } - static deserialize(t) { - return new Po(t._parameters, t._specification) - } - static serialize(t) { - return { - _parameters: t._parameters, - _specification: t._specification - } - } - } - - function Io(i) { - let t = null; - if (i instanceof co) t = Io(i.result); - else if (i instanceof fo) { - for (const r of i.args) - if (t = Io(r), t) break - } else(i instanceof Gi || i instanceof In) && i.input instanceof ca && i.input.name === "zoom" && (t = i); - return t instanceof di || i.eachChild((r => { - const a = Io(r); - a instanceof di ? t = a : !t && a ? t = new di("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.') : t && a && t !== a && (t = new di("", 'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.')) - })), t - } - - function Mo(i, t = new Set) { - return i instanceof bo && t.add(i.key), i.eachChild((r => { - Mo(r, t) - })), t - } - - function ml(i) { - if (i === !0 || i === !1) return !0; - if (!Array.isArray(i) || i.length === 0) return !1; - switch (i[0]) { - case "has": - return i.length >= 2 && i[1] !== "$id" && i[1] !== "$type"; - case "in": - return i.length >= 3 && (typeof i[1] != "string" || Array.isArray(i[2])); - case "!in": - case "!has": - case "none": - return !1; - case "==": - case "!=": - case ">": - case ">=": - case "<": - case "<=": - return i.length !== 3 || Array.isArray(i[1]) || Array.isArray(i[2]); - case "any": - case "all": - for (const t of i.slice(1)) - if (!ml(t) && typeof t != "boolean") return !1; - return !0; - default: - return !0 - } - } - const Rc = { - type: "boolean", - default: !1, - transition: !1, - "property-type": "data-driven", - expression: { - interpolated: !1, - parameters: ["zoom", "feature"] - } - }; - - function bs(i) { - if (i == null) return { - filter: () => !0, - needGeometry: !1, - getGlobalStateRefs: () => new Set - }; - ml(i) || (i = ws(i)); - const t = Co(i, Rc); - if (t.result === "error") throw new Error(t.value.map((r => `${r.key}: ${r.message}`)).join(", ")); - return { - filter: (r, a, c) => t.value.evaluate(r, a, {}, c), - needGeometry: _l(i), - getGlobalStateRefs: () => Mo(t.value.expression) - } - } - - function Bc(i, t) { - return i < t ? -1 : i > t ? 1 : 0 - } - - function _l(i) { - if (!Array.isArray(i)) return !1; - if (i[0] === "within" || i[0] === "distance") return !0; - for (let t = 1; t < i.length; t++) - if (_l(i[t])) return !0; - return !1 - } - - function ws(i) { - if (!i) return !0; - const t = i[0]; - return i.length <= 1 ? t !== "any" : t === "==" ? Fc(i[1], i[2], "==") : t === "!=" ? gl(Fc(i[1], i[2], "==")) : t === "<" || t === ">" || t === "<=" || t === ">=" ? Fc(i[1], i[2], t) : t === "any" ? (r = i.slice(1), ["any"].concat(r.map(ws))) : t === "all" ? ["all"].concat(i.slice(1).map(ws)) : t === "none" ? ["all"].concat(i.slice(1).map(ws).map(gl)) : t === "in" ? Oh(i[1], i.slice(2)) : t === "!in" ? gl(Oh(i[1], i.slice(2))) : t === "has" ? Nh(i[1]) : t !== "!has" || gl(Nh(i[1])); - var r - } - - function Fc(i, t, r) { - switch (i) { - case "$type": - return [`filter-type-${r}`, t]; - case "$id": - return [`filter-id-${r}`, t]; - default: - return [`filter-${r}`, i, t] - } - } - - function Oh(i, t) { - if (t.length === 0) return !1; - switch (i) { - case "$type": - return ["filter-type-in", ["literal", t]]; - case "$id": - return ["filter-id-in", ["literal", t]]; - default: - return t.length > 200 && !t.some((r => typeof r != typeof t[0])) ? ["filter-in-large", i, ["literal", t.sort(Bc)]] : ["filter-in-small", i, ["literal", t]] - } - } - - function Nh(i) { - switch (i) { - case "$type": - return !0; - case "$id": - return ["filter-has-id"]; - default: - return ["filter-has", i] - } - } - - function gl(i) { - return ["!", i] - } - - function Oc(i) { - const t = typeof i; - if (t === "number" || t === "boolean" || t === "string" || i == null) return JSON.stringify(i); - if (Array.isArray(i)) { - let c = "["; - for (const p of i) c += `${Oc(p)},`; - return `${c}]` - } - const r = Object.keys(i).sort(); - let a = "{"; - for (let c = 0; c < r.length; c++) a += `${JSON.stringify(r[c])}:${Oc(i[r[c]])},`; - return `${a}}` - } - - function mp(i) { - let t = ""; - for (const r of At) t += `/${Oc(i[r])}`; - return t - } - - function Nc(i) { - const t = i.value; - return t ? [new Tt(i.key, t, "constants have been deprecated as of v8")] : [] - } - - function Vi(i) { - return i instanceof Number || i instanceof String || i instanceof Boolean ? i.valueOf() : i - } - - function Oa(i) { - if (Array.isArray(i)) return i.map(Oa); - if (i instanceof Object && !(i instanceof Number || i instanceof String || i instanceof Boolean)) { - const t = {}; - for (const r in i) t[r] = Oa(i[r]); - return t - } - return Vi(i) - } - - function ua(i) { - const t = i.key, - r = i.value, - a = i.valueSpec || {}, - c = i.objectElementValidators || {}, - p = i.style, - f = i.styleSpec, - g = i.validateSpec; - let v = []; - const S = ii(r); - if (S !== "object") return [new Tt(t, r, `object expected, ${S} found`)]; - for (const I in r) { - const E = I.split(".")[0], - R = gi(a, E) || a["*"]; - let N; - if (gi(c, E)) N = c[E]; - else if (gi(a, E)) N = g; - else if (c["*"]) N = c["*"]; - else { - if (!a["*"]) { - v.push(new Tt(t, r[I], `unknown property "${I}"`)); - continue - } - N = g - } - v = v.concat(N({ - key: (t && `${t}.`) + I, - value: r[I], - valueSpec: R, - style: p, - styleSpec: f, - object: r, - objectKey: I, - validateSpec: g - }, r)) - } - for (const I in a) c[I] || a[I].required && a[I].default === void 0 && r[I] === void 0 && v.push(new Tt(t, r, `missing required property "${I}"`)); - return v - } - - function vl(i) { - const t = i.value, - r = i.valueSpec, - a = i.style, - c = i.styleSpec, - p = i.key, - f = i.arrayElementValidator || i.validateSpec; - if (ii(t) !== "array") return [new Tt(p, t, `array expected, ${ii(t)} found`)]; - if (r.length && t.length !== r.length) return [new Tt(p, t, `array length ${r.length} expected, length ${t.length} found`)]; - if (r["min-length"] && t.length < r["min-length"]) return [new Tt(p, t, `array length at least ${r["min-length"]} expected, length ${t.length} found`)]; - let g = { - type: r.value, - values: r.values - }; - c.$version < 7 && (g.function = r.function), ii(r.value) === "object" && (g = r.value); - let v = []; - for (let S = 0; S < t.length; S++) v = v.concat(f({ - array: t, - arrayIndex: S, - value: t[S], - valueSpec: g, - validateSpec: i.validateSpec, - style: a, - styleSpec: c, - key: `${p}[${S}]` - })); - return v - } - - function Ao(i) { - const t = i.key, - r = i.value, - a = i.valueSpec; - let c = ii(r); - return c === "number" && r != r && (c = "NaN"), c !== "number" ? [new Tt(t, r, `number expected, ${c} found`)] : "minimum" in a && r < a.minimum ? [new Tt(t, r, `${r} is less than the minimum value ${a.minimum}`)] : "maximum" in a && r > a.maximum ? [new Tt(t, r, `${r} is greater than the maximum value ${a.maximum}`)] : [] - } - - function jh(i) { - const t = i.valueSpec, - r = Vi(i.value.type); - let a, c, p, f = {}; - const g = r !== "categorical" && i.value.property === void 0, - v = !g, - S = ii(i.value.stops) === "array" && ii(i.value.stops[0]) === "array" && ii(i.value.stops[0][0]) === "object", - I = ua({ - key: i.key, - value: i.value, - valueSpec: i.styleSpec.function, - validateSpec: i.validateSpec, - style: i.style, - styleSpec: i.styleSpec, - objectElementValidators: { - stops: function(N) { - if (r === "identity") return [new Tt(N.key, N.value, 'identity function may not have a "stops" property')]; - let j = []; - const Z = N.value; - return j = j.concat(vl({ - key: N.key, - value: Z, - valueSpec: N.valueSpec, - validateSpec: N.validateSpec, - style: N.style, - styleSpec: N.styleSpec, - arrayElementValidator: E - })), ii(Z) === "array" && Z.length === 0 && j.push(new Tt(N.key, Z, "array must have at least one stop")), j - }, - default: function(N) { - return N.validateSpec({ - key: N.key, - value: N.value, - valueSpec: t, - validateSpec: N.validateSpec, - style: N.style, - styleSpec: N.styleSpec - }) - } - } - }); - return r === "identity" && g && I.push(new Tt(i.key, i.value, 'missing required property "property"')), r === "identity" || i.value.stops || I.push(new Tt(i.key, i.value, 'missing required property "stops"')), r === "exponential" && i.valueSpec.expression && !zc(i.valueSpec) && I.push(new Tt(i.key, i.value, "exponential functions not supported")), i.styleSpec.$version >= 8 && (v && !rs(i.valueSpec) ? I.push(new Tt(i.key, i.value, "property functions not supported")) : g && !Lh(i.valueSpec) && I.push(new Tt(i.key, i.value, "zoom functions not supported"))), r !== "categorical" && !S || i.value.property !== void 0 || I.push(new Tt(i.key, i.value, '"property" property is required')), I; - - function E(N) { - let j = []; - const Z = N.value, - Y = N.key; - if (ii(Z) !== "array") return [new Tt(Y, Z, `array expected, ${ii(Z)} found`)]; - if (Z.length !== 2) return [new Tt(Y, Z, `array length 2 expected, length ${Z.length} found`)]; - if (S) { - if (ii(Z[0]) !== "object") return [new Tt(Y, Z, `object expected, ${ii(Z[0])} found`)]; - if (Z[0].zoom === void 0) return [new Tt(Y, Z, "object stop key must have zoom")]; - if (Z[0].value === void 0) return [new Tt(Y, Z, "object stop key must have value")]; - if (p && p > Vi(Z[0].zoom)) return [new Tt(Y, Z[0].zoom, "stop zoom values must appear in ascending order")]; - Vi(Z[0].zoom) !== p && (p = Vi(Z[0].zoom), c = void 0, f = {}), j = j.concat(ua({ - key: `${Y}[0]`, - value: Z[0], - valueSpec: { - zoom: {} - }, - validateSpec: N.validateSpec, - style: N.style, - styleSpec: N.styleSpec, - objectElementValidators: { - zoom: Ao, - value: R - } - })) - } else j = j.concat(R({ - key: `${Y}[0]`, - value: Z[0], - validateSpec: N.validateSpec, - style: N.style, - styleSpec: N.styleSpec - }, Z)); - return fl(Oa(Z[1])) ? j.concat([new Tt(`${Y}[1]`, Z[1], "expressions are not allowed in function stops.")]) : j.concat(N.validateSpec({ - key: `${Y}[1]`, - value: Z[1], - valueSpec: t, - validateSpec: N.validateSpec, - style: N.style, - styleSpec: N.styleSpec - })) - } - - function R(N, j) { - const Z = ii(N.value), - Y = Vi(N.value), - ae = N.value !== null ? N.value : j; - if (a) { - if (Z !== a) return [new Tt(N.key, ae, `${Z} stop domain type must match previous stop domain type ${a}`)] - } else a = Z; - if (Z !== "number" && Z !== "string" && Z !== "boolean") return [new Tt(N.key, ae, "stop domain value must be a number, string, or boolean")]; - if (Z !== "number" && r !== "categorical") { - let ze = `number expected, ${Z} found`; - return rs(t) && r === void 0 && (ze += '\nIf you intended to use a categorical function, specify `"type": "categorical"`.'), [new Tt(N.key, ae, ze)] - } - return r !== "categorical" || Z !== "number" || isFinite(Y) && Math.floor(Y) === Y ? r !== "categorical" && Z === "number" && c !== void 0 && Y < c ? [new Tt(N.key, ae, "stop domain values must appear in ascending order")] : (c = Y, r === "categorical" && Y in f ? [new Tt(N.key, ae, "stop domain values must be unique")] : (f[Y] = !0, [])) : [new Tt(N.key, ae, `integer expected, found ${Y}`)] - } - } - - function Ts(i) { - const t = (i.expressionContext === "property" ? Fh : Co)(Oa(i.value), i.valueSpec); - if (t.result === "error") return t.value.map((a => new Tt(`${i.key}${a.key}`, i.value, a.message))); - const r = t.value.expression || t.value._styleExpression.expression; - if (i.expressionContext === "property" && i.propertyKey === "text-font" && !r.outputDefined()) return [new Tt(i.key, i.value, `Invalid data expression for "${i.propertyKey}". Output values must be contained as literals within the expression.`)]; - if (i.expressionContext === "property" && i.propertyType === "layout" && !wo(r)) return [new Tt(i.key, i.value, '"feature-state" data expressions are not supported with layout properties.')]; - if (i.expressionContext === "filter" && !wo(r)) return [new Tt(i.key, i.value, '"feature-state" data expressions are not supported with filters.')]; - if (i.expressionContext && i.expressionContext.indexOf("cluster") === 0) { - if (!pl(r, ["zoom", "feature-state"])) return [new Tt(i.key, i.value, '"zoom" and "feature-state" expressions are not supported with cluster properties.')]; - if (i.expressionContext === "cluster-initial" && !dl(r)) return [new Tt(i.key, i.value, "Feature data expressions are not supported with initial expression part of cluster properties.")] - } - return [] - } - - function yl(i) { - const t = i.key, - r = i.value, - a = ii(r); - return a !== "string" ? [new Tt(t, r, `color expected, ${a} found`)] : yr.parse(String(r)) ? [] : [new Tt(t, r, `color expected, "${r}" found`)] - } - - function Ga(i) { - const t = i.key, - r = i.value, - a = i.valueSpec, - c = []; - return Array.isArray(a.values) ? a.values.indexOf(Vi(r)) === -1 && c.push(new Tt(t, r, `expected one of [${a.values.join(", ")}], ${JSON.stringify(r)} found`)) : Object.keys(a.values).indexOf(Vi(r)) === -1 && c.push(new Tt(t, r, `expected one of [${Object.keys(a.values).join(", ")}], ${JSON.stringify(r)} found`)), c - } - - function jc(i) { - return ml(Oa(i.value)) ? Ts(Ci({}, i, { - expressionContext: "filter", - valueSpec: { - value: "boolean" - } - })) : qh(i) - } - - function qh(i) { - const t = i.value, - r = i.key; - if (ii(t) !== "array") return [new Tt(r, t, `array expected, ${ii(t)} found`)]; - const a = i.styleSpec; - let c, p = []; - if (t.length < 1) return [new Tt(r, t, "filter array must have at least 1 element")]; - switch (p = p.concat(Ga({ - key: `${r}[0]`, - value: t[0], - valueSpec: a.filter_operator, - style: i.style, - styleSpec: i.styleSpec - })), Vi(t[0])) { - case "<": - case "<=": - case ">": - case ">=": - t.length >= 2 && Vi(t[1]) === "$type" && p.push(new Tt(r, t, `"$type" cannot be use with operator "${t[0]}"`)); - case "==": - case "!=": - t.length !== 3 && p.push(new Tt(r, t, `filter array for operator "${t[0]}" must have 3 elements`)); - case "in": - case "!in": - t.length >= 2 && (c = ii(t[1]), c !== "string" && p.push(new Tt(`${r}[1]`, t[1], `string expected, ${c} found`))); - for (let f = 2; f < t.length; f++) c = ii(t[f]), Vi(t[1]) === "$type" ? p = p.concat(Ga({ - key: `${r}[${f}]`, - value: t[f], - valueSpec: a.geometry_type, - style: i.style, - styleSpec: i.styleSpec - })) : c !== "string" && c !== "number" && c !== "boolean" && p.push(new Tt(`${r}[${f}]`, t[f], `string, number, or boolean expected, ${c} found`)); - break; - case "any": - case "all": - case "none": - for (let f = 1; f < t.length; f++) p = p.concat(qh({ - key: `${r}[${f}]`, - value: t[f], - style: i.style, - styleSpec: i.styleSpec - })); - break; - case "has": - case "!has": - c = ii(t[1]), t.length !== 2 ? p.push(new Tt(r, t, `filter array for "${t[0]}" operator must have 2 elements`)) : c !== "string" && p.push(new Tt(`${r}[1]`, t[1], `string expected, ${c} found`)) - } - return p - } - - function Vh(i, t) { - const r = i.key, - a = i.validateSpec, - c = i.style, - p = i.styleSpec, - f = i.value, - g = i.objectKey, - v = p[`${t}_${i.layerType}`]; - if (!v) return []; - const S = g.match(/^(.*)-transition$/); - if (t === "paint" && S && v[S[1]] && v[S[1]].transition) return a({ - key: r, - value: f, - valueSpec: p.transition, - style: c, - styleSpec: p - }); - const I = i.valueSpec || v[g]; - if (!I) return [new Tt(r, f, `unknown property "${g}"`)]; - let E; - if (ii(f) === "string" && rs(I) && !I.tokens && (E = /^{([^}]+)}$/.exec(f))) return [new Tt(r, f, `"${g}" does not support interpolation syntax -Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(E[1])} }\`.`)]; - const R = []; - return i.layerType === "symbol" && (g === "text-field" && c && !c.glyphs && R.push(new Tt(r, f, 'use of "text-field" requires a style "glyphs" property')), g === "text-font" && To(Oa(f)) && Vi(f.type) === "identity" && R.push(new Tt(r, f, '"text-font" does not support identity functions'))), R.concat(a({ - key: i.key, - value: f, - valueSpec: I, - style: c, - styleSpec: p, - expressionContext: "property", - propertyType: t, - propertyKey: g - })) - } - - function Uh(i) { - return Vh(i, "paint") - } - - function Zh(i) { - return Vh(i, "layout") - } - - function $h(i) { - let t = []; - const r = i.value, - a = i.key, - c = i.style, - p = i.styleSpec; - if (ii(r) !== "object") return [new Tt(a, r, `object expected, ${ii(r)} found`)]; - r.type || r.ref || t.push(new Tt(a, r, 'either "type" or "ref" is required')); - let f = Vi(r.type); - const g = Vi(r.ref); - if (r.id) { - const v = Vi(r.id); - for (let S = 0; S < i.arrayIndex; S++) { - const I = c.layers[S]; - Vi(I.id) === v && t.push(new Tt(a, r.id, `duplicate layer id "${r.id}", previously used at line ${I.id.__line__}`)) - } - } - if ("ref" in r) { - let v; - ["type", "source", "source-layer", "filter", "layout"].forEach((S => { - S in r && t.push(new Tt(a, r[S], `"${S}" is prohibited for ref layers`)) - })), c.layers.forEach((S => { - Vi(S.id) === g && (v = S) - })), v ? v.ref ? t.push(new Tt(a, r.ref, "ref cannot reference another ref layer")) : f = Vi(v.type) : t.push(new Tt(a, r.ref, `ref layer "${g}" not found`)) - } else if (f !== "background") - if (r.source) { - const v = c.sources && c.sources[r.source], - S = v && Vi(v.type); - v ? S === "vector" && f === "raster" ? t.push(new Tt(a, r.source, `layer "${r.id}" requires a raster source`)) : S !== "raster-dem" && f === "hillshade" || S !== "raster-dem" && f === "color-relief" ? t.push(new Tt(a, r.source, `layer "${r.id}" requires a raster-dem source`)) : S === "raster" && f !== "raster" ? t.push(new Tt(a, r.source, `layer "${r.id}" requires a vector source`)) : S !== "vector" || r["source-layer"] ? S === "raster-dem" && f !== "hillshade" && f !== "color-relief" ? t.push(new Tt(a, r.source, "raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")) : f !== "line" || !r.paint || !r.paint["line-gradient"] || S === "geojson" && v.lineMetrics || t.push(new Tt(a, r, `layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)) : t.push(new Tt(a, r, `layer "${r.id}" must specify a "source-layer"`)) : t.push(new Tt(a, r.source, `source "${r.source}" not found`)) - } else t.push(new Tt(a, r, 'missing required property "source"')); - return t = t.concat(ua({ - key: a, - value: r, - valueSpec: p.layer, - style: i.style, - styleSpec: i.styleSpec, - validateSpec: i.validateSpec, - objectElementValidators: { - "*": () => [], - type: () => i.validateSpec({ - key: `${a}.type`, - value: r.type, - valueSpec: p.layer.type, - style: i.style, - styleSpec: i.styleSpec, - validateSpec: i.validateSpec, - object: r, - objectKey: "type" - }), - filter: jc, - layout: v => ua({ - layer: r, - key: v.key, - value: v.value, - style: v.style, - styleSpec: v.styleSpec, - validateSpec: v.validateSpec, - objectElementValidators: { - "*": S => Zh(Ci({ - layerType: f - }, S)) - } - }), - paint: v => ua({ - layer: r, - key: v.key, - value: v.value, - style: v.style, - styleSpec: v.styleSpec, - validateSpec: v.validateSpec, - objectElementValidators: { - "*": S => Uh(Ci({ - layerType: f - }, S)) - } - }) - } - })), t - } - - function xa(i) { - const t = i.value, - r = i.key, - a = ii(t); - return a !== "string" ? [new Tt(r, t, `string expected, ${a} found`)] : [] - } - const js = { - promoteId: function({ - key: i, - value: t - }) { - if (ii(t) === "string") return xa({ - key: i, - value: t - }); - { - const r = []; - for (const a in t) r.push(...xa({ - key: `${i}.${a}`, - value: t[a] - })); - return r - } - } - }; - - function Wn(i) { - const t = i.value, - r = i.key, - a = i.styleSpec, - c = i.style, - p = i.validateSpec; - if (!t.type) return [new Tt(r, t, '"type" is required')]; - const f = Vi(t.type); - let g; - switch (f) { - case "vector": - case "raster": - return g = ua({ - key: r, - value: t, - valueSpec: a[`source_${f.replace("-","_")}`], - style: i.style, - styleSpec: a, - objectElementValidators: js, - validateSpec: p - }), g; - case "raster-dem": - return g = (function(v) { - var S; - const I = (S = v.sourceName) !== null && S !== void 0 ? S : "", - E = v.value, - R = v.styleSpec, - N = R.source_raster_dem, - j = v.style; - let Z = []; - const Y = ii(E); - if (E === void 0) return Z; - if (Y !== "object") return Z.push(new Tt("source_raster_dem", E, `object expected, ${Y} found`)), Z; - const ae = Vi(E.encoding) === "custom", - ze = ["redFactor", "greenFactor", "blueFactor", "baseShift"], - me = v.value.encoding ? `"${v.value.encoding}"` : "Default"; - for (const be in E) !ae && ze.includes(be) ? Z.push(new Tt(be, E[be], `In "${I}": "${be}" is only valid when "encoding" is set to "custom". ${me} encoding found`)) : N[be] ? Z = Z.concat(v.validateSpec({ - key: be, - value: E[be], - valueSpec: N[be], - validateSpec: v.validateSpec, - style: j, - styleSpec: R - })) : Z.push(new Tt(be, E[be], `unknown property "${be}"`)); - return Z - })({ - sourceName: r, - value: t, - style: i.style, - styleSpec: a, - validateSpec: p - }), g; - case "geojson": - if (g = ua({ - key: r, - value: t, - valueSpec: a.source_geojson, - style: c, - styleSpec: a, - validateSpec: p, - objectElementValidators: js - }), t.cluster) - for (const v in t.clusterProperties) { - const [S, I] = t.clusterProperties[v], E = typeof S == "string" ? [S, ["accumulated"], - ["get", v] - ] : S; - g.push(...Ts({ - key: `${r}.${v}.map`, - value: I, - expressionContext: "cluster-map" - })), g.push(...Ts({ - key: `${r}.${v}.reduce`, - value: E, - expressionContext: "cluster-reduce" - })) - } - return g; - case "video": - return ua({ - key: r, - value: t, - valueSpec: a.source_video, - style: c, - validateSpec: p, - styleSpec: a - }); - case "image": - return ua({ - key: r, - value: t, - valueSpec: a.source_image, - style: c, - validateSpec: p, - styleSpec: a - }); - case "canvas": - return [new Tt(r, null, "Please use runtime APIs to add canvas sources, rather than including them in stylesheets.", "source.canvas")]; - default: - return Ga({ - key: `${r}.type`, - value: t.type, - valueSpec: { - values: ["vector", "raster", "raster-dem", "geojson", "video", "image"] - } - }) - } - } - - function qs(i) { - const t = i.value, - r = i.styleSpec, - a = r.light, - c = i.style; - let p = []; - const f = ii(t); - if (t === void 0) return p; - if (f !== "object") return p = p.concat([new Tt("light", t, `object expected, ${f} found`)]), p; - for (const g in t) { - const v = g.match(/^(.*)-transition$/); - p = p.concat(v && a[v[1]] && a[v[1]].transition ? i.validateSpec({ - key: g, - value: t[g], - valueSpec: r.transition, - validateSpec: i.validateSpec, - style: c, - styleSpec: r - }) : a[g] ? i.validateSpec({ - key: g, - value: t[g], - valueSpec: a[g], - validateSpec: i.validateSpec, - style: c, - styleSpec: r - }) : [new Tt(g, t[g], `unknown property "${g}"`)]) - } - return p - } - - function qc(i) { - const t = i.value, - r = i.styleSpec, - a = r.sky, - c = i.style, - p = ii(t); - if (t === void 0) return []; - if (p !== "object") return [new Tt("sky", t, `object expected, ${p} found`)]; - let f = []; - for (const g in t) f = f.concat(a[g] ? i.validateSpec({ - key: g, - value: t[g], - valueSpec: a[g], - style: c, - styleSpec: r - }) : [new Tt(g, t[g], `unknown property "${g}"`)]); - return f - } - - function Gh(i) { - const t = i.value, - r = i.styleSpec, - a = r.terrain, - c = i.style; - let p = []; - const f = ii(t); - if (t === void 0) return p; - if (f !== "object") return p = p.concat([new Tt("terrain", t, `object expected, ${f} found`)]), p; - for (const g in t) p = p.concat(a[g] ? i.validateSpec({ - key: g, - value: t[g], - valueSpec: a[g], - validateSpec: i.validateSpec, - style: c, - styleSpec: r - }) : [new Tt(g, t[g], `unknown property "${g}"`)]); - return p - } - - function Hh(i) { - let t = []; - const r = i.value, - a = i.key; - if (Array.isArray(r)) { - const c = [], - p = []; - for (const f in r) r[f].id && c.includes(r[f].id) && t.push(new Tt(a, r, `all the sprites' ids must be unique, but ${r[f].id} is duplicated`)), c.push(r[f].id), r[f].url && p.includes(r[f].url) && t.push(new Tt(a, r, `all the sprites' URLs must be unique, but ${r[f].url} is duplicated`)), p.push(r[f].url), t = t.concat(ua({ - key: `${a}[${f}]`, - value: r[f], - valueSpec: { - id: { - type: "string", - required: !0 - }, - url: { - type: "string", - required: !0 - } - }, - validateSpec: i.validateSpec - })); - return t - } - return xa({ - key: a, - value: r - }) - } - - function Vs(i) { - return t = i.value, t && t.constructor === Object ? [] : [new Tt(i.key, i.value, `object expected, ${ii(i.value)} found`)]; - var t - } - const Vc = { - "*": () => [], - array: vl, - boolean: function(i) { - const t = i.value, - r = i.key, - a = ii(t); - return a !== "boolean" ? [new Tt(r, t, `boolean expected, ${a} found`)] : [] - }, - number: Ao, - color: yl, - constants: Nc, - enum: Ga, - filter: jc, - function: jh, - layer: $h, - object: ua, - source: Wn, - light: qs, - sky: qc, - terrain: Gh, - projection: function(i) { - const t = i.value, - r = i.styleSpec, - a = r.projection, - c = i.style, - p = ii(t); - if (t === void 0) return []; - if (p !== "object") return [new Tt("projection", t, `object expected, ${p} found`)]; - let f = []; - for (const g in t) f = f.concat(a[g] ? i.validateSpec({ - key: g, - value: t[g], - valueSpec: a[g], - style: c, - styleSpec: r - }) : [new Tt(g, t[g], `unknown property "${g}"`)]); - return f - }, - projectionDefinition: function(i) { - const t = i.key; - let r = i.value; - r = r instanceof String ? r.valueOf() : r; - const a = ii(r); - return a !== "array" || (function(c) { - return Array.isArray(c) && c.length === 3 && typeof c[0] == "string" && typeof c[1] == "string" && typeof c[2] == "number" - })(r) || (function(c) { - return !!["interpolate", "step", "literal"].includes(c[0]) - })(r) ? ["array", "string"].includes(a) ? [] : [new Tt(t, r, `projection expected, invalid type "${a}" found`)] : [new Tt(t, r, `projection expected, invalid array ${JSON.stringify(r)} found`)] - }, - string: xa, - formatted: function(i) { - return xa(i).length === 0 ? [] : Ts(i) - }, - resolvedImage: function(i) { - return xa(i).length === 0 ? [] : Ts(i) - }, - padding: function(i) { - const t = i.key, - r = i.value; - if (ii(r) === "array") { - if (r.length < 1 || r.length > 4) return [new Tt(t, r, `padding requires 1 to 4 values; ${r.length} values found`)]; - const a = { - type: "number" - }; - let c = []; - for (let p = 0; p < r.length; p++) c = c.concat(i.validateSpec({ - key: `${t}[${p}]`, - value: r[p], - validateSpec: i.validateSpec, - valueSpec: a - })); - return c - } - return Ao({ - key: t, - value: r, - valueSpec: {} - }) - }, - numberArray: function(i) { - const t = i.key, - r = i.value; - if (ii(r) === "array") { - const a = { - type: "number" - }; - if (r.length < 1) return [new Tt(t, r, "array length at least 1 expected, length 0 found")]; - let c = []; - for (let p = 0; p < r.length; p++) c = c.concat(i.validateSpec({ - key: `${t}[${p}]`, - value: r[p], - validateSpec: i.validateSpec, - valueSpec: a - })); - return c - } - return Ao({ - key: t, - value: r, - valueSpec: {} - }) - }, - colorArray: function(i) { - const t = i.key, - r = i.value; - if (ii(r) === "array") { - if (r.length < 1) return [new Tt(t, r, "array length at least 1 expected, length 0 found")]; - let a = []; - for (let c = 0; c < r.length; c++) a = a.concat(yl({ - key: `${t}[${c}]`, - value: r[c] - })); - return a - } - return yl({ - key: t, - value: r - }) - }, - variableAnchorOffsetCollection: function(i) { - const t = i.key, - r = i.value, - a = ii(r), - c = i.styleSpec; - if (a !== "array" || r.length < 1 || r.length % 2 != 0) return [new Tt(t, r, "variableAnchorOffsetCollection requires a non-empty array of even length")]; - let p = []; - for (let f = 0; f < r.length; f += 2) p = p.concat(Ga({ - key: `${t}[${f}]`, - value: r[f], - valueSpec: c.layout_symbol["text-anchor"] - })), p = p.concat(vl({ - key: `${t}[${f+1}]`, - value: r[f + 1], - valueSpec: { - length: 2, - value: "number" - }, - validateSpec: i.validateSpec, - style: i.style, - styleSpec: c - })); - return p - }, - sprite: Hh, - state: Vs - }; - - function Us(i) { - const t = i.value, - r = i.valueSpec, - a = i.styleSpec; - return i.validateSpec = Us, r.expression && To(Vi(t)) ? jh(i) : r.expression && fl(Oa(t)) ? Ts(i) : r.type && Vc[r.type] ? Vc[r.type](i) : ua(Ci({}, i, { - valueSpec: r.type ? a[r.type] : r - })) - } - - function Wh(i) { - const t = i.value, - r = i.key, - a = xa(i); - return a.length || (t.indexOf("{fontstack}") === -1 && a.push(new Tt(r, t, '"glyphs" url must include a "{fontstack}" token')), t.indexOf("{range}") === -1 && a.push(new Tt(r, t, '"glyphs" url must include a "{range}" token'))), a - } - - function Xn(i, t = xe) { - let r = []; - return r = r.concat(Us({ - key: "", - value: i, - valueSpec: t.$root, - styleSpec: t, - style: i, - validateSpec: Us, - objectElementValidators: { - glyphs: Wh, - "*": () => [] - } - })), i.constants && (r = r.concat(Nc({ - key: "constants", - value: i.constants - }))), Zs(r) - } - - function ba(i) { - return function(t) { - return i({ - ...t, - validateSpec: Us - }) - } - } - - function Zs(i) { - return [].concat(i).sort(((t, r) => t.line - r.line)) - } - - function wa(i) { - return function(...t) { - return Zs(i.apply(this, t)) - } - } - Xn.source = wa(ba(Wn)), Xn.sprite = wa(ba(Hh)), Xn.glyphs = wa(ba(Wh)), Xn.light = wa(ba(qs)), Xn.sky = wa(ba(qc)), Xn.terrain = wa(ba(Gh)), Xn.state = wa(ba(Vs)), Xn.layer = wa(ba($h)), Xn.filter = wa(ba(jc)), Xn.paintProperty = wa(ba(Uh)), Xn.layoutProperty = wa(ba(Zh)); - const $s = Xn, - _p = $s.light, - ko = $s.sky, - gp = $s.paintProperty, - vp = $s.layoutProperty; - - function Eo(i, t) { - let r = !1; - if (t && t.length) - for (const a of t) i.fire(new Ye(new Error(a.message))), r = !0; - return r - } - class zo { - constructor(t, r, a) { - const c = this.cells = []; - if (t instanceof ArrayBuffer) { - this.arrayBuffer = t; - const f = new Int32Array(this.arrayBuffer); - t = f[0], this.d = (r = f[1]) + 2 * (a = f[2]); - for (let v = 0; v < this.d * this.d; v++) { - const S = f[3 + v], - I = f[3 + v + 1]; - c.push(S === I ? null : f.subarray(S, I)) - } - const g = f[3 + c.length + 1]; - this.keys = f.subarray(f[3 + c.length], g), this.bboxes = f.subarray(g), this.insert = this._insertReadonly - } else { - this.d = r + 2 * a; - for (let f = 0; f < this.d * this.d; f++) c.push([]); - this.keys = [], this.bboxes = [] - } - this.n = r, this.extent = t, this.padding = a, this.scale = r / t, this.uid = 0; - const p = a / r * t; - this.min = -p, this.max = t + p - } - insert(t, r, a, c, p) { - this._forEachCell(r, a, c, p, this._insertCell, this.uid++, void 0, void 0), this.keys.push(t), this.bboxes.push(r), this.bboxes.push(a), this.bboxes.push(c), this.bboxes.push(p) - } - _insertReadonly() { - throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.") - } - _insertCell(t, r, a, c, p, f) { - this.cells[p].push(f) - } - query(t, r, a, c, p) { - const f = this.min, - g = this.max; - if (t <= f && r <= f && g <= a && g <= c && !p) return Array.prototype.slice.call(this.keys); - { - const v = []; - return this._forEachCell(t, r, a, c, this._queryCell, v, {}, p), v - } - } - _queryCell(t, r, a, c, p, f, g, v) { - const S = this.cells[p]; - if (S !== null) { - const I = this.keys, - E = this.bboxes; - for (let R = 0; R < S.length; R++) { - const N = S[R]; - if (g[N] === void 0) { - const j = 4 * N; - (v ? v(E[j + 0], E[j + 1], E[j + 2], E[j + 3]) : t <= E[j + 2] && r <= E[j + 3] && a >= E[j + 0] && c >= E[j + 1]) ? (g[N] = !0, f.push(I[N])) : g[N] = !1 - } - } - } - } - _forEachCell(t, r, a, c, p, f, g, v) { - const S = this._convertToCellCoord(t), - I = this._convertToCellCoord(r), - E = this._convertToCellCoord(a), - R = this._convertToCellCoord(c); - for (let N = S; N <= E; N++) - for (let j = I; j <= R; j++) { - const Z = this.d * j + N; - if ((!v || v(this._convertFromCellCoord(N), this._convertFromCellCoord(j), this._convertFromCellCoord(N + 1), this._convertFromCellCoord(j + 1))) && p.call(this, t, r, a, c, Z, f, g, v)) 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, - r = 3 + this.cells.length + 1 + 1; - let a = 0; - for (let f = 0; f < this.cells.length; f++) a += this.cells[f].length; - const c = new Int32Array(r + a + this.keys.length + this.bboxes.length); - c[0] = this.extent, c[1] = this.n, c[2] = this.padding; - let p = r; - for (let f = 0; f < t.length; f++) { - const g = t[f]; - c[3 + f] = p, c.set(g, p), p += g.length - } - return c[3 + t.length] = p, c.set(this.keys, p), p += this.keys.length, c[3 + t.length + 1] = p, c.set(this.bboxes, p), p += this.bboxes.length, c.buffer - } - static serialize(t, r) { - const a = t.toArrayBuffer(); - return r && r.push(a), { - buffer: a - } - } - static deserialize(t) { - return new zo(t.buffer) - } - } - const Ta = {}; - - function Kt(i, t, r = {}) { - if (Ta[i]) throw new Error(`${i} is already registered.`); - Object.defineProperty(t, "_classRegistryKey", { - value: i, - writeable: !1 - }), Ta[i] = { - klass: t, - omit: r.omit || [], - shallow: r.shallow || [] - } - } - Kt("Object", Object), Kt("Set", Set), Kt("TransferableGridIndex", zo), Kt("Color", yr), Kt("Error", Error), Kt("AJAXError", K), Kt("ResolvedImage", Nn), Kt("StylePropertyFunction", Po), Kt("StyleExpression", Lc, { - omit: ["_evaluator"] - }), Kt("ZoomDependentExpression", Dc), Kt("ZoomConstantExpression", So), Kt("CompoundExpression", ca, { - omit: ["_evaluate"] - }); - for (const i in Os) Os[i]._classRegistryKey || Kt(`Expression_${i}`, Os[i]); - - function Uc(i) { - return i && typeof ArrayBuffer < "u" && (i instanceof ArrayBuffer || i.constructor && i.constructor.name === "ArrayBuffer") - } - - function xl(i) { - return i.$name || i.constructor._classRegistryKey - } - - function Zc(i) { - return !(function(t) { - if (t === null || typeof t != "object") return !1; - const r = xl(t); - return !(!r || r === "Object") - })(i) && (i == null || typeof i == "boolean" || typeof i == "number" || typeof i == "string" || i instanceof Boolean || i instanceof Number || i instanceof String || i instanceof Date || i instanceof RegExp || i instanceof Blob || i instanceof Error || Uc(i) || ar(i) || ArrayBuffer.isView(i) || i instanceof ImageData) - } - - function Gs(i, t) { - if (Zc(i)) return (Uc(i) || ar(i)) && t && t.push(i), ArrayBuffer.isView(i) && t && t.push(i.buffer), i instanceof ImageData && t && t.push(i.data.buffer), i; - if (Array.isArray(i)) { - const p = []; - for (const f of i) p.push(Gs(f, t)); - return p - } - if (typeof i != "object") throw new Error("can't serialize object of type " + typeof i); - const r = xl(i); - if (!r) throw new Error(`can't serialize object of unregistered class ${i.constructor.name}`); - if (!Ta[r]) throw new Error(`${r} is not registered.`); - const { - klass: a - } = Ta[r], c = a.serialize ? a.serialize(i, t) : {}; - if (a.serialize) { - if (t && c === t[t.length - 1]) throw new Error("statically serialized object won't survive transfer of $name property") - } else { - for (const p in i) { - if (!i.hasOwnProperty(p) || Ta[r].omit.indexOf(p) >= 0) continue; - const f = i[p]; - c[p] = Ta[r].shallow.indexOf(p) >= 0 ? f : Gs(f, t) - } - i instanceof Error && (c.message = i.message) - } - if (c.$name) throw new Error("$name property is reserved for worker serialization logic."); - return r !== "Object" && (c.$name = r), c - } - - function Cs(i) { - if (Zc(i)) return i; - if (Array.isArray(i)) return i.map(Cs); - if (typeof i != "object") throw new Error("can't deserialize object of type " + typeof i); - const t = xl(i) || "Object"; - if (!Ta[t]) throw new Error(`can't deserialize unregistered class ${t}`); - const { - klass: r - } = Ta[t]; - if (!r) throw new Error(`can't deserialize unregistered class ${t}`); - if (r.deserialize) return r.deserialize(i); - const a = Object.create(r.prototype); - for (const c of Object.keys(i)) { - if (c === "$name") continue; - const p = i[c]; - a[c] = Ta[t].shallow.indexOf(c) >= 0 ? p : Cs(p) - } - return a - } - class bl { - constructor() { - this.first = !0 - } - update(t, r) { - const a = Math.floor(t); - return this.first ? (this.first = !1, this.lastIntegerZoom = a, this.lastIntegerZoomTime = 0, this.lastZoom = t, this.lastFloorZoom = a, !0) : (this.lastFloorZoom > a ? (this.lastIntegerZoom = a + 1, this.lastIntegerZoomTime = r) : this.lastFloorZoom < a && (this.lastIntegerZoom = a, this.lastIntegerZoomTime = r), t !== this.lastZoom && (this.lastZoom = t, this.lastFloorZoom = a, !0)) - } - } - const si = { - "Latin-1 Supplement": i => i >= 128 && i <= 255, - "Hangul Jamo": i => i >= 4352 && i <= 4607, - Khmer: i => i >= 6016 && i <= 6143, - "General Punctuation": i => i >= 8192 && i <= 8303, - "Letterlike Symbols": i => i >= 8448 && i <= 8527, - "Number Forms": i => i >= 8528 && i <= 8591, - "Miscellaneous Technical": i => i >= 8960 && i <= 9215, - "Control Pictures": i => i >= 9216 && i <= 9279, - "Optical Character Recognition": i => i >= 9280 && i <= 9311, - "Enclosed Alphanumerics": i => i >= 9312 && i <= 9471, - "Geometric Shapes": i => i >= 9632 && i <= 9727, - "Miscellaneous Symbols": i => i >= 9728 && i <= 9983, - "Miscellaneous Symbols and Arrows": i => i >= 11008 && i <= 11263, - "Ideographic Description Characters": i => i >= 12272 && i <= 12287, - "CJK Symbols and Punctuation": i => i >= 12288 && i <= 12351, - Hiragana: i => i >= 12352 && i <= 12447, - Katakana: i => i >= 12448 && i <= 12543, - Kanbun: i => i >= 12688 && i <= 12703, - "CJK Strokes": i => i >= 12736 && i <= 12783, - "Enclosed CJK Letters and Months": i => i >= 12800 && i <= 13055, - "CJK Compatibility": i => i >= 13056 && i <= 13311, - "Yijing Hexagram Symbols": i => i >= 19904 && i <= 19967, - "CJK Unified Ideographs": i => i >= 19968 && i <= 40959, - "Hangul Syllables": i => i >= 44032 && i <= 55215, - "Private Use Area": i => i >= 57344 && i <= 63743, - "Vertical Forms": i => i >= 65040 && i <= 65055, - "CJK Compatibility Forms": i => i >= 65072 && i <= 65103, - "Small Form Variants": i => i >= 65104 && i <= 65135, - "Halfwidth and Fullwidth Forms": i => i >= 65280 && i <= 65519 - }; - - function wl(i) { - for (const t of i) - if (Gc(t.charCodeAt(0))) return !0; - return !1 - } - - function yp(i) { - for (const t of i) - if (!Xh(t.charCodeAt(0))) return !1; - return !0 - } - - function Tl(i) { - const t = i.map((r => { - try { - return new RegExp(`\\p{sc=${r}}`, "u").source - } catch { - return null - } - })).filter((r => r)); - return new RegExp(t.join("|"), "u") - } - const xp = Tl(["Arab", "Dupl", "Mong", "Ougr", "Syrc"]); - - function Xh(i) { - return !xp.test(String.fromCodePoint(i)) - } - const $c = Tl(["Bopo", "Hani", "Hira", "Kana", "Kits", "Nshu", "Tang", "Yiii"]); - - function Gc(i) { - return !(i !== 746 && i !== 747 && (i < 4352 || !(si["CJK Compatibility Forms"](i) && !(i >= 65097 && i <= 65103) || si["CJK Compatibility"](i) || si["CJK Strokes"](i) || !(!si["CJK Symbols and Punctuation"](i) || i >= 12296 && i <= 12305 || i >= 12308 && i <= 12319 || i === 12336) || si["Enclosed CJK Letters and Months"](i) || si["Ideographic Description Characters"](i) || si.Kanbun(i) || si.Katakana(i) && i !== 12540 || !(!si["Halfwidth and Fullwidth Forms"](i) || i === 65288 || i === 65289 || i === 65293 || i >= 65306 && i <= 65310 || i === 65339 || i === 65341 || i === 65343 || i >= 65371 && i <= 65503 || i === 65507 || i >= 65512 && i <= 65519) || !(!si["Small Form Variants"](i) || i >= 65112 && i <= 65118 || i >= 65123 && i <= 65126) || si["Vertical Forms"](i) || si["Yijing Hexagram Symbols"](i) || new RegExp("\\p{sc=Cans}", "u").test(String.fromCodePoint(i)) || new RegExp("\\p{sc=Hang}", "u").test(String.fromCodePoint(i)) || $c.test(String.fromCodePoint(i))))) - } - - function Kh(i) { - return !(Gc(i) || (function(t) { - return !!(si["Latin-1 Supplement"](t) && (t === 167 || t === 169 || t === 174 || t === 177 || t === 188 || t === 189 || t === 190 || t === 215 || t === 247) || si["General Punctuation"](t) && (t === 8214 || t === 8224 || t === 8225 || t === 8240 || t === 8241 || t === 8251 || t === 8252 || t === 8258 || t === 8263 || t === 8264 || t === 8265 || t === 8273) || si["Letterlike Symbols"](t) || si["Number Forms"](t) || si["Miscellaneous Technical"](t) && (t >= 8960 && t <= 8967 || t >= 8972 && t <= 8991 || t >= 8996 && t <= 9e3 || t === 9003 || t >= 9085 && t <= 9114 || t >= 9150 && t <= 9165 || t === 9167 || t >= 9169 && t <= 9179 || t >= 9186 && t <= 9215) || si["Control Pictures"](t) && t !== 9251 || si["Optical Character Recognition"](t) || si["Enclosed Alphanumerics"](t) || si["Geometric Shapes"](t) || si["Miscellaneous Symbols"](t) && !(t >= 9754 && t <= 9759) || si["Miscellaneous Symbols and Arrows"](t) && (t >= 11026 && t <= 11055 || t >= 11088 && t <= 11097 || t >= 11192 && t <= 11243) || si["CJK Symbols and Punctuation"](t) || si.Katakana(t) || si["Private Use Area"](t) || si["CJK Compatibility Forms"](t) || si["Small Form Variants"](t) || si["Halfwidth and Fullwidth Forms"](t) || t === 8734 || t === 8756 || t === 8757 || t >= 9984 && t <= 10087 || t >= 10102 && t <= 10131 || t === 65532 || t === 65533) - })(i)) - } - const Yh = Tl(["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 Hc(i) { - return Yh.test(String.fromCodePoint(i)) - } - - function Jh(i, t) { - return !(!t && Hc(i) || i >= 2304 && i <= 3583 || i >= 3840 && i <= 4255 || si.Khmer(i)) - } - - function Qh(i) { - for (const t of i) - if (Hc(t.charCodeAt(0))) return !0; - return !1 - } - const Ca = new class { - constructor() { - this.TIMEOUT = 5e3, this.applyArabicShaping = null, this.processBidirectionalText = null, this.processStyledBidirectionalText = null, this.pluginStatus = "unavailable", this.pluginURL = null, this.loadScriptResolve = () => {} - } - setState(i) { - this.pluginStatus = i.pluginStatus, this.pluginURL = i.pluginURL - } - getState() { - return { - pluginStatus: this.pluginStatus, - pluginURL: this.pluginURL - } - } - setMethods(i) { - if (Ca.isParsed()) throw new Error("RTL text plugin already registered."); - this.applyArabicShaping = i.applyArabicShaping, this.processBidirectionalText = i.processBidirectionalText, this.processStyledBidirectionalText = i.processStyledBidirectionalText, this.loadScriptResolve() - } - isParsed() { - return this.applyArabicShaping != null && this.processBidirectionalText != null && this.processStyledBidirectionalText != null - } - getRTLTextPluginStatus() { - return this.pluginStatus - } - syncState(i, t) { - return o(this, void 0, void 0, (function*() { - if (this.isParsed()) return this.getState(); - if (i.pluginStatus !== "loading") return this.setState(i), i; - const r = i.pluginURL, - a = new Promise((p => { - this.loadScriptResolve = p - })); - t(r); - const c = new Promise((p => setTimeout((() => p()), this.TIMEOUT))); - if (yield Promise.race([a, c]), this.isParsed()) { - const p = { - pluginStatus: "loaded", - pluginURL: r - }; - return this.setState(p), p - } - throw this.setState({ - pluginStatus: "error", - pluginURL: "" - }), new Error(`RTL Text Plugin failed to import scripts from ${r}`) - })) - } - }; - class Oi { - constructor(t, r) { - this.zoom = t, r ? (this.now = r.now || 0, this.fadeDuration = r.fadeDuration || 0, this.zoomHistory = r.zoomHistory || new bl, this.transition = r.transition || {}, this.globalState = r.globalState || {}) : (this.now = 0, this.fadeDuration = 0, this.zoomHistory = new bl, this.transition = {}, this.globalState = {}) - } - isSupportedScript(t) { - return (function(r, a) { - for (const c of r) - if (!Jh(c.charCodeAt(0), a)) return !1; - return !0 - })(t, Ca.getRTLTextPluginStatus() === "loaded") - } - crossFadingFactor() { - return this.fadeDuration === 0 ? 1 : Math.min((this.now - this.zoomHistory.lastIntegerZoomTime) / this.fadeDuration, 1) - } - getCrossfadeParameters() { - const t = this.zoom, - r = t - Math.floor(t), - a = this.crossFadingFactor(); - return t > this.zoomHistory.lastIntegerZoom ? { - fromScale: 2, - toScale: 1, - t: r + (1 - r) * a - } : { - fromScale: .5, - toScale: 1, - t: 1 - (1 - a) * r - } - } - } - class Hs { - constructor(t, r) { - this.property = t, this.value = r, this.expression = (function(a, c) { - if (To(a)) return new Po(a, c); - if (fl(a)) { - const p = Fh(a, c); - if (p.result === "error") throw new Error(p.value.map((f => `${f.key}: ${f.message}`)).join(", ")); - return p.value - } { - let p = a; - return c.type === "color" && typeof a == "string" ? p = yr.parse(a) : c.type !== "padding" || typeof a != "number" && !Array.isArray(a) ? c.type !== "numberArray" || typeof a != "number" && !Array.isArray(a) ? c.type !== "colorArray" || typeof a != "string" && !Array.isArray(a) ? c.type === "variableAnchorOffsetCollection" && Array.isArray(a) ? p = un.parse(a) : c.type === "projectionDefinition" && typeof a == "string" && (p = hn.parse(a)) : p = Ni.parse(a) : p = cn.parse(a) : p = Ki.parse(a), { - globalStateRefs: new Set, - kind: "constant", - evaluate: () => p - } - } - })(r === void 0 ? t.specification.default : r, t.specification) - } - isDataDriven() { - return this.expression.kind === "source" || this.expression.kind === "composite" - } - getGlobalStateRefs() { - return this.expression.globalStateRefs || new Set - } - possiblyEvaluate(t, r, a) { - return this.property.possiblyEvaluate(this, t, r, a) - } - } - class Wc { - constructor(t) { - this.property = t, this.value = new Hs(t, void 0) - } - transitioned(t, r) { - return new Xc(this.property, this.value, r, pt({}, t.transition, this.transition), t.now) - } - untransitioned() { - return new Xc(this.property, this.value, null, {}, 0) - } - } - class ed { - constructor(t) { - this._properties = t, this._values = Object.create(t.defaultTransitionablePropertyValues) - } - getValue(t) { - return wt(this._values[t].value.value) - } - setValue(t, r) { - Object.prototype.hasOwnProperty.call(this._values, t) || (this._values[t] = new Wc(this._values[t].property)), this._values[t].value = new Hs(this._values[t].property, r === null ? void 0 : wt(r)) - } - getTransition(t) { - return wt(this._values[t].transition) - } - setTransition(t, r) { - Object.prototype.hasOwnProperty.call(this._values, t) || (this._values[t] = new Wc(this._values[t].property)), this._values[t].transition = wt(r) || void 0 - } - serialize() { - const t = {}; - for (const r of Object.keys(this._values)) { - const a = this.getValue(r); - a !== void 0 && (t[r] = a); - const c = this.getTransition(r); - c !== void 0 && (t[`${r}-transition`] = c) - } - return t - } - transitioned(t, r) { - const a = new Kc(this._properties); - for (const c of Object.keys(this._values)) a._values[c] = this._values[c].transitioned(t, r._values[c]); - return a - } - untransitioned() { - const t = new Kc(this._properties); - for (const r of Object.keys(this._values)) t._values[r] = this._values[r].untransitioned(); - return t - } - } - class Xc { - constructor(t, r, a, c, p) { - this.property = t, this.value = r, this.begin = p + c.delay || 0, this.end = this.begin + c.duration || 0, t.specification.transition && (c.delay || c.duration) && (this.prior = a) - } - possiblyEvaluate(t, r, a) { - const c = t.now || 0, - p = this.value.possiblyEvaluate(t, r, a), - f = this.prior; - if (f) { - if (c > this.end) return this.prior = null, p; - if (this.value.isDataDriven()) return this.prior = null, p; - if (c < this.begin) return f.possiblyEvaluate(t, r, a); - { - const g = (c - this.begin) / (this.end - this.begin); - return this.property.interpolate(f.possiblyEvaluate(t, r, a), p, We(g)) - } - } - return p - } - } - class Kc { - constructor(t) { - this._properties = t, this._values = Object.create(t.defaultTransitioningPropertyValues) - } - possiblyEvaluate(t, r, a) { - const c = new Cl(this._properties); - for (const p of Object.keys(this._values)) c._values[p] = this._values[p].possiblyEvaluate(t, r, a); - return c - } - hasTransition() { - for (const t of Object.keys(this._values)) - if (this._values[t].prior) return !0; - return !1 - } - } - class td { - constructor(t) { - this._properties = t, this._values = Object.create(t.defaultPropertyValues) - } - hasValue(t) { - return this._values[t].value !== void 0 - } - getValue(t) { - return wt(this._values[t].value) - } - setValue(t, r) { - this._values[t] = new Hs(this._values[t].property, r === null ? void 0 : wt(r)) - } - serialize() { - const t = {}; - for (const r of Object.keys(this._values)) { - const a = this.getValue(r); - a !== void 0 && (t[r] = a) - } - return t - } - possiblyEvaluate(t, r, a) { - const c = new Cl(this._properties); - for (const p of Object.keys(this._values)) c._values[p] = this._values[p].possiblyEvaluate(t, r, a); - return c - } - } - class Na { - constructor(t, r, a) { - this.property = t, this.value = r, this.parameters = a - } - isConstant() { - return this.value.kind === "constant" - } - constantOr(t) { - return this.value.kind === "constant" ? this.value.value : t - } - evaluate(t, r, a, c) { - return this.property.evaluate(this.value, this.parameters, t, r, a, c) - } - } - class Cl { - constructor(t) { - this._properties = t, this._values = Object.create(t.defaultPossiblyEvaluatedValues) - } - get(t) { - return this._values[t] - } - } - class hr { - constructor(t) { - this.specification = t - } - possiblyEvaluate(t, r) { - if (t.isDataDriven()) throw new Error("Value should not be data driven"); - return t.expression.evaluate(r) - } - interpolate(t, r, a) { - const c = Fa[this.specification.type]; - return c ? c(t, r, a) : t - } - } - class Rr { - constructor(t, r) { - this.specification = t, this.overrides = r - } - possiblyEvaluate(t, r, a, c) { - return new Na(this, t.expression.kind === "constant" || t.expression.kind === "camera" ? { - kind: "constant", - value: t.expression.evaluate(r, null, {}, a, c) - } : t.expression, r) - } - interpolate(t, r, a) { - if (t.value.kind !== "constant" || r.value.kind !== "constant") return t; - if (t.value.value === void 0 || r.value.value === void 0) return new Na(this, { - kind: "constant", - value: void 0 - }, t.parameters); - const c = Fa[this.specification.type]; - if (c) { - const p = c(t.value.value, r.value.value, a); - return new Na(this, { - kind: "constant", - value: p - }, t.parameters) - } - return t - } - evaluate(t, r, a, c, p, f) { - return t.kind === "constant" ? t.value : t.evaluate(r, a, c, p, f) - } - } - class Sl extends Rr { - possiblyEvaluate(t, r, a, c) { - if (t.value === void 0) return new Na(this, { - kind: "constant", - value: void 0 - }, r); - if (t.expression.kind === "constant") { - const p = t.expression.evaluate(r, null, {}, a, c), - f = t.property.specification.type === "resolvedImage" && typeof p != "string" ? p.name : p, - g = this._calculate(f, f, f, r); - return new Na(this, { - kind: "constant", - value: g - }, r) - } - if (t.expression.kind === "camera") { - const p = this._calculate(t.expression.evaluate({ - zoom: r.zoom - 1 - }), t.expression.evaluate({ - zoom: r.zoom - }), t.expression.evaluate({ - zoom: r.zoom + 1 - }), r); - return new Na(this, { - kind: "constant", - value: p - }, r) - } - return new Na(this, t.expression, r) - } - evaluate(t, r, a, c, p, f) { - if (t.kind === "source") { - const g = t.evaluate(r, a, c, p, f); - return this._calculate(g, g, g, r) - } - return t.kind === "composite" ? this._calculate(t.evaluate({ - zoom: Math.floor(r.zoom) - 1 - }, a, c), t.evaluate({ - zoom: Math.floor(r.zoom) - }, a, c), t.evaluate({ - zoom: Math.floor(r.zoom) + 1 - }, a, c), r) : t.value - } - _calculate(t, r, a, c) { - return c.zoom > c.zoomHistory.lastIntegerZoom ? { - from: t, - to: r - } : { - from: a, - to: r - } - } - interpolate(t) { - return t - } - } - class ns { - constructor(t) { - this.specification = t - } - possiblyEvaluate(t, r, a, c) { - if (t.value !== void 0) { - if (t.expression.kind === "constant") { - const p = t.expression.evaluate(r, null, {}, a, c); - return this._calculate(p, p, p, r) - } - return this._calculate(t.expression.evaluate(new Oi(Math.floor(r.zoom - 1), r)), t.expression.evaluate(new Oi(Math.floor(r.zoom), r)), t.expression.evaluate(new Oi(Math.floor(r.zoom + 1), r)), r) - } - } - _calculate(t, r, a, c) { - return c.zoom > c.zoomHistory.lastIntegerZoom ? { - from: t, - to: r - } : { - from: a, - to: r - } - } - interpolate(t) { - return t - } - } - class Pl { - constructor(t) { - this.specification = t - } - possiblyEvaluate(t, r, a, c) { - return !!t.expression.evaluate(r, null, {}, a, c) - } - interpolate() { - return !1 - } - } - class jn { - constructor(t) { - this.properties = t, this.defaultPropertyValues = {}, this.defaultTransitionablePropertyValues = {}, this.defaultTransitioningPropertyValues = {}, this.defaultPossiblyEvaluatedValues = {}, this.overridableProperties = []; - for (const r in t) { - const a = t[r]; - a.specification.overridable && this.overridableProperties.push(r); - const c = this.defaultPropertyValues[r] = new Hs(a, void 0), - p = this.defaultTransitionablePropertyValues[r] = new Wc(a); - this.defaultTransitioningPropertyValues[r] = p.untransitioned(), this.defaultPossiblyEvaluatedValues[r] = c.possiblyEvaluate({}) - } - } - } - Kt("DataDrivenProperty", Rr), Kt("DataConstantProperty", hr), Kt("CrossFadedDataDrivenProperty", Sl), Kt("CrossFadedProperty", ns), Kt("ColorRampProperty", Pl); - const rd = "-transition"; - class ha extends Ot { - constructor(t, r) { - if (super(), this.id = t.id, this.type = t.type, this._featureFilter = { - filter: () => !0, - needGeometry: !1, - getGlobalStateRefs: () => new Set - }, 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 = bs(t.filter)), r.layout && (this._unevaluatedLayout = new td(r.layout)), r.paint)) { - this._transitionablePaint = new ed(r.paint); - for (const a in t.paint) this.setPaintProperty(a, t.paint[a], { - validate: !1 - }); - for (const a in t.layout) this.setLayoutProperty(a, t.layout[a], { - validate: !1 - }); - this._transitioningPaint = this._transitionablePaint.untransitioned(), this.paint = new Cl(r.paint) - } - } - setFilter(t) { - this.filter = t, this._featureFilter = bs(t) - } - getCrossfadeParameters() { - return this._crossfadeParameters - } - getLayoutProperty(t) { - return t === "visibility" ? this.visibility : this._unevaluatedLayout.getValue(t) - } - getLayoutAffectingGlobalStateRefs() { - const t = new Set; - if (this._unevaluatedLayout) - for (const r in this._unevaluatedLayout._values) { - const a = this._unevaluatedLayout._values[r]; - for (const c of a.getGlobalStateRefs()) t.add(c) - } - for (const r of this._featureFilter.getGlobalStateRefs()) t.add(r); - return t - } - setLayoutProperty(t, r, a = {}) { - r != null && this._validate(vp, `layers.${this.id}.layout.${t}`, t, r, a) || (t !== "visibility" ? this._unevaluatedLayout.setValue(t, r) : this.visibility = r) - } - getPaintProperty(t) { - return t.endsWith(rd) ? this._transitionablePaint.getTransition(t.slice(0, -11)) : this._transitionablePaint.getValue(t) - } - setPaintProperty(t, r, a = {}) { - if (r != null && this._validate(gp, `layers.${this.id}.paint.${t}`, t, r, a)) return !1; - if (t.endsWith(rd)) return this._transitionablePaint.setTransition(t.slice(0, -11), r || void 0), !1; - { - const c = this._transitionablePaint._values[t], - p = c.property.specification["property-type"] === "cross-faded-data-driven", - f = c.value.isDataDriven(), - g = c.value; - this._transitionablePaint.setValue(t, r), this._handleSpecialPaintPropertyUpdate(t); - const v = this._transitionablePaint._values[t].value; - return v.isDataDriven() || f || p || this._handleOverridablePaintPropertyUpdate(t, g, v) - } - } - _handleSpecialPaintPropertyUpdate(t) {} - _handleOverridablePaintPropertyUpdate(t, r, a) { - return !1 - } - isHidden(t) { - return !!(this.minzoom && t < this.minzoom) || !!(this.maxzoom && t >= this.maxzoom) || this.visibility === "none" - } - updateTransitions(t) { - this._transitioningPaint = this._transitionablePaint.transitioned(t, this._transitioningPaint) - } - hasTransition() { - return this._transitioningPaint.hasTransition() - } - recalculate(t, r) { - t.getCrossfadeParameters && (this._crossfadeParameters = t.getCrossfadeParameters()), this._unevaluatedLayout && (this.layout = this._unevaluatedLayout.possiblyEvaluate(t, void 0, r)), this.paint = this._transitioningPaint.possiblyEvaluate(t, void 0, r) - } - serialize() { - const t = { - 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: this._unevaluatedLayout && this._unevaluatedLayout.serialize(), - paint: this._transitionablePaint && this._transitionablePaint.serialize() - }; - return this.visibility && (t.layout = t.layout || {}, t.layout.visibility = this.visibility), bt(t, ((r, a) => !(r === void 0 || a === "layout" && !Object.keys(r).length || a === "paint" && !Object.keys(r).length))) - } - _validate(t, r, a, c, p = {}) { - return (!p || p.validate !== !1) && Eo(this, t.call($s, { - key: r, - layerType: this.type, - objectKey: a, - value: c, - styleSpec: xe, - style: { - glyphs: !0, - sprite: !0 - } - })) - } - is3D() { - return !1 - } - isTileClipped() { - return !1 - } - hasOffscreenPass() { - return !1 - } - resize() {} - isStateDependent() { - for (const t in this.paint._values) { - const r = this.paint.get(t); - if (r instanceof Na && rs(r.property.specification) && (r.value.kind === "source" || r.value.kind === "composite") && r.value.isStateDependent) return !0 - } - return !1 - } - } - const bp = { - Int8: Int8Array, - Uint8: Uint8Array, - Int16: Int16Array, - Uint16: Uint16Array, - Int32: Int32Array, - Uint32: Uint32Array, - Float32: Float32Array - }; - class Lo { - constructor(t, r) { - this._structArray = t, this._pos1 = r * this.size, this._pos2 = this._pos1 / 2, this._pos4 = this._pos1 / 4, this._pos8 = this._pos1 / 8 - } - } - class Ai { - constructor() { - this.isTransferred = !1, this.capacity = -1, this.resize(0) - } - static serialize(t, r) { - return t._trim(), r && (t.isTransferred = !0, r.push(t.arrayBuffer)), { - length: t.length, - arrayBuffer: t.arrayBuffer - } - } - static deserialize(t) { - const r = Object.create(this.prototype); - return r.arrayBuffer = t.arrayBuffer, r.length = t.length, r.capacity = t.arrayBuffer.byteLength / r.bytesPerElement, r._refreshViews(), r - } - _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 r = this.uint8; - this._refreshViews(), r && this.uint8.set(r) - } - } - _refreshViews() { - throw new Error("_refreshViews() must be implemented by each concrete StructArray layout") - } - } - - function Hi(i, t = 1) { - let r = 0, - a = 0; - return { - members: i.map((c => { - const p = bp[c.type].BYTES_PER_ELEMENT, - f = r = Il(r, Math.max(t, p)), - g = c.components || 1; - return a = Math.max(a, p), r += p * g, { - name: c.name, - type: c.type, - components: g, - offset: f - } - })), - size: Il(r, Math.max(a, t)), - alignment: t - } - } - - function Il(i, t) { - return Math.ceil(i / t) * t - } - class Ws extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer) - } - emplaceBack(t, r) { - const a = this.length; - return this.resize(a + 1), this.emplace(a, t, r) - } - emplace(t, r, a) { - const c = 2 * t; - return this.int16[c + 0] = r, this.int16[c + 1] = a, t - } - } - Ws.prototype.bytesPerElement = 4, Kt("StructArrayLayout2i4", Ws); - class Xs extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer) - } - emplaceBack(t, r, a) { - const c = this.length; - return this.resize(c + 1), this.emplace(c, t, r, a) - } - emplace(t, r, a, c) { - const p = 3 * t; - return this.int16[p + 0] = r, this.int16[p + 1] = a, this.int16[p + 2] = c, t - } - } - Xs.prototype.bytesPerElement = 6, Kt("StructArrayLayout3i6", Xs); - class Yc extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer) - } - emplaceBack(t, r, a, c) { - const p = this.length; - return this.resize(p + 1), this.emplace(p, t, r, a, c) - } - emplace(t, r, a, c, p) { - const f = 4 * t; - return this.int16[f + 0] = r, this.int16[f + 1] = a, this.int16[f + 2] = c, this.int16[f + 3] = p, t - } - } - Yc.prototype.bytesPerElement = 8, Kt("StructArrayLayout4i8", Yc); - class Ks extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer) - } - emplaceBack(t, r, a, c, p, f) { - const g = this.length; - return this.resize(g + 1), this.emplace(g, t, r, a, c, p, f) - } - emplace(t, r, a, c, p, f, g) { - const v = 6 * t; - return this.int16[v + 0] = r, this.int16[v + 1] = a, this.int16[v + 2] = c, this.int16[v + 3] = p, this.int16[v + 4] = f, this.int16[v + 5] = g, t - } - } - Ks.prototype.bytesPerElement = 12, Kt("StructArrayLayout2i4i12", Ks); - class Ss extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer) - } - emplaceBack(t, r, a, c, p, f) { - const g = this.length; - return this.resize(g + 1), this.emplace(g, t, r, a, c, p, f) - } - emplace(t, r, a, c, p, f, g) { - const v = 4 * t, - S = 8 * t; - return this.int16[v + 0] = r, this.int16[v + 1] = a, this.uint8[S + 4] = c, this.uint8[S + 5] = p, this.uint8[S + 6] = f, this.uint8[S + 7] = g, t - } - } - Ss.prototype.bytesPerElement = 8, Kt("StructArrayLayout2i4ub8", Ss); - class Do extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer) - } - emplaceBack(t, r) { - const a = this.length; - return this.resize(a + 1), this.emplace(a, t, r) - } - emplace(t, r, a) { - const c = 2 * t; - return this.float32[c + 0] = r, this.float32[c + 1] = a, t - } - } - Do.prototype.bytesPerElement = 8, Kt("StructArrayLayout2f8", Do); - class Ml extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer) - } - emplaceBack(t, r, a, c, p, f, g, v, S, I) { - const E = this.length; - return this.resize(E + 1), this.emplace(E, t, r, a, c, p, f, g, v, S, I) - } - emplace(t, r, a, c, p, f, g, v, S, I, E) { - const R = 10 * t; - return this.uint16[R + 0] = r, this.uint16[R + 1] = a, this.uint16[R + 2] = c, this.uint16[R + 3] = p, this.uint16[R + 4] = f, this.uint16[R + 5] = g, this.uint16[R + 6] = v, this.uint16[R + 7] = S, this.uint16[R + 8] = I, this.uint16[R + 9] = E, t - } - } - Ml.prototype.bytesPerElement = 20, Kt("StructArrayLayout10ui20", Ml); - class Ps extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer) - } - emplaceBack(t, r, a, c, p, f, g, v, S, I, E, R) { - const N = this.length; - return this.resize(N + 1), this.emplace(N, t, r, a, c, p, f, g, v, S, I, E, R) - } - emplace(t, r, a, c, p, f, g, v, S, I, E, R, N) { - const j = 12 * t; - return this.int16[j + 0] = r, this.int16[j + 1] = a, this.int16[j + 2] = c, this.int16[j + 3] = p, this.uint16[j + 4] = f, this.uint16[j + 5] = g, this.uint16[j + 6] = v, this.uint16[j + 7] = S, this.int16[j + 8] = I, this.int16[j + 9] = E, this.int16[j + 10] = R, this.int16[j + 11] = N, t - } - } - Ps.prototype.bytesPerElement = 24, Kt("StructArrayLayout4i4ui4i24", Ps); - class Jc extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer) - } - emplaceBack(t, r, a) { - const c = this.length; - return this.resize(c + 1), this.emplace(c, t, r, a) - } - emplace(t, r, a, c) { - const p = 3 * t; - return this.float32[p + 0] = r, this.float32[p + 1] = a, this.float32[p + 2] = c, t - } - } - Jc.prototype.bytesPerElement = 12, Kt("StructArrayLayout3f12", Jc); - class Qc extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer) - } - emplaceBack(t) { - const r = this.length; - return this.resize(r + 1), this.emplace(r, t) - } - emplace(t, r) { - return this.uint32[1 * t + 0] = r, t - } - } - Qc.prototype.bytesPerElement = 4, Kt("StructArrayLayout1ul4", Qc); - class Al extends Ai { - _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, r, a, c, p, f, g, v, S) { - const I = this.length; - return this.resize(I + 1), this.emplace(I, t, r, a, c, p, f, g, v, S) - } - emplace(t, r, a, c, p, f, g, v, S, I) { - const E = 10 * t, - R = 5 * t; - return this.int16[E + 0] = r, this.int16[E + 1] = a, this.int16[E + 2] = c, this.int16[E + 3] = p, this.int16[E + 4] = f, this.int16[E + 5] = g, this.uint32[R + 3] = v, this.uint16[E + 8] = S, this.uint16[E + 9] = I, t - } - } - Al.prototype.bytesPerElement = 20, Kt("StructArrayLayout6i1ul2ui20", Al); - class eu extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer) - } - emplaceBack(t, r, a, c, p, f) { - const g = this.length; - return this.resize(g + 1), this.emplace(g, t, r, a, c, p, f) - } - emplace(t, r, a, c, p, f, g) { - const v = 6 * t; - return this.int16[v + 0] = r, this.int16[v + 1] = a, this.int16[v + 2] = c, this.int16[v + 3] = p, this.int16[v + 4] = f, this.int16[v + 5] = g, t - } - } - eu.prototype.bytesPerElement = 12, Kt("StructArrayLayout2i2i2i12", eu); - class h extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer) - } - emplaceBack(t, r, a, c, p) { - const f = this.length; - return this.resize(f + 1), this.emplace(f, t, r, a, c, p) - } - emplace(t, r, a, c, p, f) { - const g = 4 * t, - v = 8 * t; - return this.float32[g + 0] = r, this.float32[g + 1] = a, this.float32[g + 2] = c, this.int16[v + 6] = p, this.int16[v + 7] = f, t - } - } - h.prototype.bytesPerElement = 16, Kt("StructArrayLayout2f1f2i16", h); - class e extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer) - } - emplaceBack(t, r, a, c, p, f) { - const g = this.length; - return this.resize(g + 1), this.emplace(g, t, r, a, c, p, f) - } - emplace(t, r, a, c, p, f, g) { - const v = 16 * t, - S = 4 * t, - I = 8 * t; - return this.uint8[v + 0] = r, this.uint8[v + 1] = a, this.float32[S + 1] = c, this.float32[S + 2] = p, this.int16[I + 6] = f, this.int16[I + 7] = g, t - } - } - e.prototype.bytesPerElement = 16, Kt("StructArrayLayout2ub2f2i16", e); - class n extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer) - } - emplaceBack(t, r, a) { - const c = this.length; - return this.resize(c + 1), this.emplace(c, t, r, a) - } - emplace(t, r, a, c) { - const p = 3 * t; - return this.uint16[p + 0] = r, this.uint16[p + 1] = a, this.uint16[p + 2] = c, t - } - } - n.prototype.bytesPerElement = 6, Kt("StructArrayLayout3ui6", n); - class s extends Ai { - _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, r, a, c, p, f, g, v, S, I, E, R, N, j, Z, Y, ae) { - const ze = this.length; - return this.resize(ze + 1), this.emplace(ze, t, r, a, c, p, f, g, v, S, I, E, R, N, j, Z, Y, ae) - } - emplace(t, r, a, c, p, f, g, v, S, I, E, R, N, j, Z, Y, ae, ze) { - const me = 24 * t, - be = 12 * t, - Ve = 48 * t; - return this.int16[me + 0] = r, this.int16[me + 1] = a, this.uint16[me + 2] = c, this.uint16[me + 3] = p, this.uint32[be + 2] = f, this.uint32[be + 3] = g, this.uint32[be + 4] = v, this.uint16[me + 10] = S, this.uint16[me + 11] = I, this.uint16[me + 12] = E, this.float32[be + 7] = R, this.float32[be + 8] = N, this.uint8[Ve + 36] = j, this.uint8[Ve + 37] = Z, this.uint8[Ve + 38] = Y, this.uint32[be + 10] = ae, this.int16[me + 22] = ze, t - } - } - s.prototype.bytesPerElement = 48, Kt("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48", s); - class u extends Ai { - _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, r, a, c, p, f, g, v, S, I, E, R, N, j, Z, Y, ae, ze, me, be, Ve, rt, St, $t, Bt, Ut, pr, Vt) { - const Zt = this.length; - return this.resize(Zt + 1), this.emplace(Zt, t, r, a, c, p, f, g, v, S, I, E, R, N, j, Z, Y, ae, ze, me, be, Ve, rt, St, $t, Bt, Ut, pr, Vt) - } - emplace(t, r, a, c, p, f, g, v, S, I, E, R, N, j, Z, Y, ae, ze, me, be, Ve, rt, St, $t, Bt, Ut, pr, Vt, Zt) { - const mt = 32 * t, - Br = 16 * t; - return this.int16[mt + 0] = r, this.int16[mt + 1] = a, this.int16[mt + 2] = c, this.int16[mt + 3] = p, this.int16[mt + 4] = f, this.int16[mt + 5] = g, this.int16[mt + 6] = v, this.int16[mt + 7] = S, this.uint16[mt + 8] = I, this.uint16[mt + 9] = E, this.uint16[mt + 10] = R, this.uint16[mt + 11] = N, this.uint16[mt + 12] = j, this.uint16[mt + 13] = Z, this.uint16[mt + 14] = Y, this.uint16[mt + 15] = ae, this.uint16[mt + 16] = ze, this.uint16[mt + 17] = me, this.uint16[mt + 18] = be, this.uint16[mt + 19] = Ve, this.uint16[mt + 20] = rt, this.uint16[mt + 21] = St, this.uint16[mt + 22] = $t, this.uint32[Br + 12] = Bt, this.float32[Br + 13] = Ut, this.float32[Br + 14] = pr, this.uint16[mt + 30] = Vt, this.uint16[mt + 31] = Zt, t - } - } - u.prototype.bytesPerElement = 64, Kt("StructArrayLayout8i15ui1ul2f2ui64", u); - class d extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer) - } - emplaceBack(t) { - const r = this.length; - return this.resize(r + 1), this.emplace(r, t) - } - emplace(t, r) { - return this.float32[1 * t + 0] = r, t - } - } - d.prototype.bytesPerElement = 4, Kt("StructArrayLayout1f4", d); - class m extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer) - } - emplaceBack(t, r, a) { - const c = this.length; - return this.resize(c + 1), this.emplace(c, t, r, a) - } - emplace(t, r, a, c) { - const p = 3 * t; - return this.uint16[6 * t + 0] = r, this.float32[p + 1] = a, this.float32[p + 2] = c, t - } - } - m.prototype.bytesPerElement = 12, Kt("StructArrayLayout1ui2f12", m); - class y extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer) - } - emplaceBack(t, r, a) { - const c = this.length; - return this.resize(c + 1), this.emplace(c, t, r, a) - } - emplace(t, r, a, c) { - const p = 4 * t; - return this.uint32[2 * t + 0] = r, this.uint16[p + 2] = a, this.uint16[p + 3] = c, t - } - } - y.prototype.bytesPerElement = 8, Kt("StructArrayLayout1ul2ui8", y); - class w extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer) - } - emplaceBack(t, r) { - const a = this.length; - return this.resize(a + 1), this.emplace(a, t, r) - } - emplace(t, r, a) { - const c = 2 * t; - return this.uint16[c + 0] = r, this.uint16[c + 1] = a, t - } - } - w.prototype.bytesPerElement = 4, Kt("StructArrayLayout2ui4", w); - class P extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer) - } - emplaceBack(t) { - const r = this.length; - return this.resize(r + 1), this.emplace(r, t) - } - emplace(t, r) { - return this.uint16[1 * t + 0] = r, t - } - } - P.prototype.bytesPerElement = 2, Kt("StructArrayLayout1ui2", P); - class M extends Ai { - _refreshViews() { - this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer) - } - emplaceBack(t, r, a, c) { - const p = this.length; - return this.resize(p + 1), this.emplace(p, t, r, a, c) - } - emplace(t, r, a, c, p) { - const f = 4 * t; - return this.float32[f + 0] = r, this.float32[f + 1] = a, this.float32[f + 2] = c, this.float32[f + 3] = p, t - } - } - M.prototype.bytesPerElement = 16, Kt("StructArrayLayout4f16", M); - class D extends Lo { - 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] - } - get anchorPoint() { - return new $(this.anchorPointX, this.anchorPointY) - } - } - D.prototype.size = 20; - class z extends Al { - get(t) { - return new D(this, t) - } - } - Kt("CollisionBoxArray", z); - class B extends Lo { - 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 U extends s { - get(t) { - return new B(this, t) - } - } - Kt("PlacedSymbolArray", U); - class ee extends Lo { - 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] - } - } - ee.prototype.size = 64; - class J extends u { - get(t) { - return new ee(this, t) - } - } - Kt("SymbolInstanceArray", J); - class re extends d { - getoffsetX(t) { - return this.float32[1 * t + 0] - } - } - Kt("GlyphOffsetArray", re); - class se extends Xs { - getx(t) { - return this.int16[3 * t + 0] - } - gety(t) { - return this.int16[3 * t + 1] - } - gettileUnitDistanceFromAnchor(t) { - return this.int16[3 * t + 2] - } - } - Kt("SymbolLineVertexArray", se); - class de extends Lo { - 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] - } - } - de.prototype.size = 12; - class ue extends m { - get(t) { - return new de(this, t) - } - } - Kt("TextAnchorOffsetArray", ue); - class ge extends Lo { - 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] - } - } - ge.prototype.size = 8; - class Te extends y { - get(t) { - return new ge(this, t) - } - } - Kt("FeatureIndexArray", Te); - class he extends Ws {} - class De extends Ws {} - class He extends Ws {} - class je extends Ks {} - class qe extends Ss {} - class $e extends Do {} - class Rt extends Ml {} - class Nt extends Ps {} - class yt extends Jc {} - class sr extends Qc {} - class Xr extends eu {} - class xi extends e {} - class ki extends n {} - class Pi extends w {} - const ji = Hi([{ - name: "a_pos", - components: 2, - type: "Int16" - }], 4), - { - members: Ui - } = ji; - class Wr { - constructor(t = []) { - this._forceNewSegmentOnNextPrepare = !1, this.segments = t - } - prepareSegment(t, r, a, c) { - const p = this.segments[this.segments.length - 1]; - return t > Wr.MAX_VERTEX_ARRAY_LENGTH && Lt(`Max vertices per segment is ${Wr.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${Wr.MAX_VERTEX_ARRAY_LENGTH} vertices.`), this._forceNewSegmentOnNextPrepare || !p || p.vertexLength + t > Wr.MAX_VERTEX_ARRAY_LENGTH || p.sortKey !== c ? this.createNewSegment(r, a, c) : p - } - createNewSegment(t, r, a) { - const c = { - vertexOffset: t.length, - primitiveOffset: r.length, - vertexLength: 0, - primitiveLength: 0, - vaos: {} - }; - return a !== void 0 && (c.sortKey = a), this._forceNewSegmentOnNextPrepare = !1, this.segments.push(c), c - } - getOrCreateLatestSegment(t, r, a) { - return this.prepareSegment(0, t, r, a) - } - forceNewSegmentOnNextPrepare() { - this._forceNewSegmentOnNextPrepare = !0 - } - get() { - return this.segments - } - destroy() { - for (const t of this.segments) - for (const r in t.vaos) t.vaos[r].destroy() - } - static simpleSegment(t, r, a, c) { - return new Wr([{ - vertexOffset: t, - primitiveOffset: r, - vertexLength: a, - primitiveLength: c, - vaos: {}, - sortKey: 0 - }]) - } - } - - function Ei(i, t) { - return 256 * (i = xt(Math.floor(i), 0, 255)) + xt(Math.floor(t), 0, 255) - } - Wr.MAX_VERTEX_ARRAY_LENGTH = Math.pow(2, 16) - 1, Kt("SegmentVector", Wr); - const Qi = Hi([{ - 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" - }]); - var dn, xn, qn, Sa = { - exports: {} - }, - as = { - exports: {} - }, - ss = { - exports: {} - }, - Ys = (function() { - if (qn) return Sa.exports; - qn = 1; - var i = (dn || (dn = 1, as.exports = function(r, a) { - var c, p, f, g, v, S, I, E; - for (p = r.length - (c = 3 & r.length), f = a, v = 3432918353, S = 461845907, E = 0; E < p;) I = 255 & r.charCodeAt(E) | (255 & r.charCodeAt(++E)) << 8 | (255 & r.charCodeAt(++E)) << 16 | (255 & r.charCodeAt(++E)) << 24, ++E, f = 27492 + (65535 & (g = 5 * (65535 & (f = (f ^= I = (65535 & (I = (I = (65535 & I) * v + (((I >>> 16) * v & 65535) << 16) & 4294967295) << 15 | I >>> 17)) * S + (((I >>> 16) * S & 65535) << 16) & 4294967295) << 13 | f >>> 19)) + ((5 * (f >>> 16) & 65535) << 16) & 4294967295)) + ((58964 + (g >>> 16) & 65535) << 16); - switch (I = 0, c) { - case 3: - I ^= (255 & r.charCodeAt(E + 2)) << 16; - case 2: - I ^= (255 & r.charCodeAt(E + 1)) << 8; - case 1: - f ^= I = (65535 & (I = (I = (65535 & (I ^= 255 & r.charCodeAt(E))) * v + (((I >>> 16) * v & 65535) << 16) & 4294967295) << 15 | I >>> 17)) * S + (((I >>> 16) * S & 65535) << 16) & 4294967295 - } - return f ^= r.length, f = 2246822507 * (65535 & (f ^= f >>> 16)) + ((2246822507 * (f >>> 16) & 65535) << 16) & 4294967295, f = 3266489909 * (65535 & (f ^= f >>> 13)) + ((3266489909 * (f >>> 16) & 65535) << 16) & 4294967295, (f ^= f >>> 16) >>> 0 - }), as.exports), - t = (xn || (xn = 1, ss.exports = function(r, a) { - for (var c, p = r.length, f = a ^ p, g = 0; p >= 4;) c = 1540483477 * (65535 & (c = 255 & r.charCodeAt(g) | (255 & r.charCodeAt(++g)) << 8 | (255 & r.charCodeAt(++g)) << 16 | (255 & r.charCodeAt(++g)) << 24)) + ((1540483477 * (c >>> 16) & 65535) << 16), f = 1540483477 * (65535 & f) + ((1540483477 * (f >>> 16) & 65535) << 16) ^ (c = 1540483477 * (65535 & (c ^= c >>> 24)) + ((1540483477 * (c >>> 16) & 65535) << 16)), p -= 4, ++g; - switch (p) { - case 3: - f ^= (255 & r.charCodeAt(g + 2)) << 16; - case 2: - f ^= (255 & r.charCodeAt(g + 1)) << 8; - case 1: - f = 1540483477 * (65535 & (f ^= 255 & r.charCodeAt(g))) + ((1540483477 * (f >>> 16) & 65535) << 16) - } - return f = 1540483477 * (65535 & (f ^= f >>> 13)) + ((1540483477 * (f >>> 16) & 65535) << 16), (f ^= f >>> 15) >>> 0 - }), ss.exports); - return Sa.exports = i, Sa.exports.murmur3 = i, Sa.exports.murmur2 = t, Sa.exports - })(), - Js = W(Ys); - class Is { - constructor() { - this.ids = [], this.positions = [], this.indexed = !1 - } - add(t, r, a, c) { - this.ids.push(Ms(t)), this.positions.push(r, a, c) - } - getPositions(t) { - if (!this.indexed) throw new Error("Trying to get index, but feature positions are not indexed"); - const r = Ms(t); - let a = 0, - c = this.ids.length - 1; - for (; a < c;) { - const f = a + c >> 1; - this.ids[f] >= r ? c = f : a = f + 1 - } - const p = []; - for (; this.ids[a] === r;) p.push({ - index: this.positions[3 * a], - start: this.positions[3 * a + 1], - end: this.positions[3 * a + 2] - }), a++; - return p - } - static serialize(t, r) { - const a = new Float64Array(t.ids), - c = new Uint32Array(t.positions); - return Kn(a, c, 0, a.length - 1), r && r.push(a.buffer, c.buffer), { - ids: a, - positions: c - } - } - static deserialize(t) { - const r = new Is; - return r.ids = t.ids, r.positions = t.positions, r.indexed = !0, r - } - } - - function Ms(i) { - const t = +i; - return !isNaN(t) && t <= Number.MAX_SAFE_INTEGER ? t : Js(String(i)) - } - - function Kn(i, t, r, a) { - for (; r < a;) { - const c = i[r + a >> 1]; - let p = r - 1, - f = a + 1; - for (;;) { - do p++; while (i[p] < c); - do f--; while (i[f] > c); - if (p >= f) break; - Pa(i, p, f), Pa(t, 3 * p, 3 * f), Pa(t, 3 * p + 1, 3 * f + 1), Pa(t, 3 * p + 2, 3 * f + 2) - } - f - r < a - f ? (Kn(i, t, r, f), r = f + 1) : (Kn(i, t, f + 1, a), a = f) - } - } - - function Pa(i, t, r) { - const a = i[t]; - i[t] = i[r], i[r] = a - } - Kt("FeaturePositionMap", Is); - class Vn { - constructor(t, r) { - this.gl = t.gl, this.location = r - } - } - class os extends Vn { - constructor(t, r) { - super(t, r), this.current = 0 - } - set(t) { - this.current !== t && (this.current = t, this.gl.uniform1f(this.location, t)) - } - } - class en extends Vn { - constructor(t, r) { - super(t, r), 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 pn extends Vn { - constructor(t, r) { - super(t, r), this.current = yr.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 da = new Float32Array(16); - - function tn(i) { - return [Ei(255 * i.r, 255 * i.g), Ei(255 * i.b, 255 * i.a)] - } - class Ro { - constructor(t, r, a) { - this.value = t, this.uniformNames = r.map((c => `u_${c}`)), this.type = a - } - setUniform(t, r, a) { - t.set(a.constantOr(this.value)) - } - getBinding(t, r, a) { - return this.type === "color" ? new pn(t, r) : new os(t, r) - } - } - class Qs { - constructor(t, r) { - this.uniformNames = r.map((a => `u_${a}`)), this.patternFrom = null, this.patternTo = null, this.pixelRatioFrom = 1, this.pixelRatioTo = 1 - } - setConstantPatternPositions(t, r) { - this.pixelRatioFrom = r.pixelRatio, this.pixelRatioTo = t.pixelRatio, this.patternFrom = r.tlbr, this.patternTo = t.tlbr - } - setUniform(t, r, a, c) { - const p = c === "u_pattern_to" ? this.patternTo : c === "u_pattern_from" ? this.patternFrom : c === "u_pixel_ratio_to" ? this.pixelRatioTo : c === "u_pixel_ratio_from" ? this.pixelRatioFrom : null; - p && t.set(p) - } - getBinding(t, r, a) { - return a.substr(0, 9) === "u_pattern" ? new en(t, r) : new os(t, r) - } - } - class Ha { - constructor(t, r, a, c) { - this.expression = t, this.type = a, this.maxValue = 0, this.paintVertexAttributes = r.map((p => ({ - name: `a_${p}`, - type: "Float32", - components: a === "color" ? 2 : 1, - offset: 0 - }))), this.paintVertexArray = new c - } - populatePaintArray(t, r, a, c, p) { - const f = this.paintVertexArray.length, - g = this.expression.evaluate(new Oi(0), r, {}, c, [], p); - this.paintVertexArray.resize(t), this._setPaintValue(f, t, g) - } - updatePaintArray(t, r, a, c) { - const p = this.expression.evaluate({ - zoom: 0 - }, a, c); - this._setPaintValue(t, r, p) - } - _setPaintValue(t, r, a) { - if (this.type === "color") { - const c = tn(a); - for (let p = t; p < r; p++) this.paintVertexArray.emplace(p, c[0], c[1]) - } else { - for (let c = t; c < r; c++) this.paintVertexArray.emplace(c, a); - this.maxValue = Math.max(this.maxValue, Math.abs(a)) - } - } - upload(t) { - this.paintVertexArray && this.paintVertexArray.arrayBuffer && (this.paintVertexBuffer && this.paintVertexBuffer.buffer ? this.paintVertexBuffer.updateData(this.paintVertexArray) : this.paintVertexBuffer = t.createVertexBuffer(this.paintVertexArray, this.paintVertexAttributes, this.expression.isStateDependent)) - } - destroy() { - this.paintVertexBuffer && this.paintVertexBuffer.destroy() - } - } - class Ia { - constructor(t, r, a, c, p, f) { - this.expression = t, this.uniformNames = r.map((g => `u_${g}_t`)), this.type = a, this.useIntegerZoom = c, this.zoom = p, this.maxValue = 0, this.paintVertexAttributes = r.map((g => ({ - name: `a_${g}`, - type: "Float32", - components: a === "color" ? 4 : 2, - offset: 0 - }))), this.paintVertexArray = new f - } - populatePaintArray(t, r, a, c, p) { - const f = this.expression.evaluate(new Oi(this.zoom), r, {}, c, [], p), - g = this.expression.evaluate(new Oi(this.zoom + 1), r, {}, c, [], p), - v = this.paintVertexArray.length; - this.paintVertexArray.resize(t), this._setPaintValue(v, t, f, g) - } - updatePaintArray(t, r, a, c) { - const p = this.expression.evaluate({ - zoom: this.zoom - }, a, c), - f = this.expression.evaluate({ - zoom: this.zoom + 1 - }, a, c); - this._setPaintValue(t, r, p, f) - } - _setPaintValue(t, r, a, c) { - if (this.type === "color") { - const p = tn(a), - f = tn(c); - for (let g = t; g < r; g++) this.paintVertexArray.emplace(g, p[0], p[1], f[0], f[1]) - } else { - for (let p = t; p < r; p++) this.paintVertexArray.emplace(p, a, c); - this.maxValue = Math.max(this.maxValue, Math.abs(a), Math.abs(c)) - } - } - upload(t) { - this.paintVertexArray && this.paintVertexArray.arrayBuffer && (this.paintVertexBuffer && this.paintVertexBuffer.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, r) { - const a = this.useIntegerZoom ? Math.floor(r.zoom) : r.zoom, - c = xt(this.expression.interpolationFactor(a, this.zoom, this.zoom + 1), 0, 1); - t.set(c) - } - getBinding(t, r, a) { - return new os(t, r) - } - } - class ls { - constructor(t, r, a, c, p, f) { - this.expression = t, this.type = r, this.useIntegerZoom = a, this.zoom = c, this.layerId = f, this.zoomInPaintVertexArray = new p, this.zoomOutPaintVertexArray = new p - } - populatePaintArray(t, r, a) { - const c = this.zoomInPaintVertexArray.length; - this.zoomInPaintVertexArray.resize(t), this.zoomOutPaintVertexArray.resize(t), this._setPaintValues(c, t, r.patterns && r.patterns[this.layerId], a) - } - updatePaintArray(t, r, a, c, p) { - this._setPaintValues(t, r, a.patterns && a.patterns[this.layerId], p) - } - _setPaintValues(t, r, a, c) { - if (!c || !a) return; - const { - min: p, - mid: f, - max: g - } = a, v = c[p], S = c[f], I = c[g]; - if (v && S && I) - for (let E = t; E < r; E++) this.zoomInPaintVertexArray.emplace(E, S.tl[0], S.tl[1], S.br[0], S.br[1], v.tl[0], v.tl[1], v.br[0], v.br[1], S.pixelRatio, v.pixelRatio), this.zoomOutPaintVertexArray.emplace(E, S.tl[0], S.tl[1], S.br[0], S.br[1], I.tl[0], I.tl[1], I.br[0], I.br[1], S.pixelRatio, I.pixelRatio) - } - upload(t) { - this.zoomInPaintVertexArray && this.zoomInPaintVertexArray.arrayBuffer && this.zoomOutPaintVertexArray && this.zoomOutPaintVertexArray.arrayBuffer && (this.zoomInPaintVertexBuffer = t.createVertexBuffer(this.zoomInPaintVertexArray, Qi.members, this.expression.isStateDependent), this.zoomOutPaintVertexBuffer = t.createVertexBuffer(this.zoomOutPaintVertexArray, Qi.members, this.expression.isStateDependent)) - } - destroy() { - this.zoomOutPaintVertexBuffer && this.zoomOutPaintVertexBuffer.destroy(), this.zoomInPaintVertexBuffer && this.zoomInPaintVertexBuffer.destroy() - } - } - class id { - constructor(t, r, a) { - this.binders = {}, this._buffers = []; - const c = []; - for (const p in t.paint._values) { - if (!a(p)) continue; - const f = t.paint.get(p); - if (!(f instanceof Na && rs(f.property.specification))) continue; - const g = nd(p, t.type), - v = f.value, - S = f.property.specification.type, - I = f.property.useIntegerZoom, - E = f.property.specification["property-type"], - R = E === "cross-faded" || E === "cross-faded-data-driven"; - if (v.kind === "constant") this.binders[p] = R ? new Qs(v.value, g) : new Ro(v.value, g, S), c.push(`/u_${p}`); - else if (v.kind === "source" || R) { - const N = tu(p, S, "source"); - this.binders[p] = R ? new ls(v, S, I, r, N, t.id) : new Ha(v, g, S, N), c.push(`/a_${p}`) - } else { - const N = tu(p, S, "composite"); - this.binders[p] = new Ia(v, g, S, I, r, N), c.push(`/z_${p}`) - } - } - this.cacheKey = c.sort().join("") - } - getMaxValue(t) { - const r = this.binders[t]; - return r instanceof Ha || r instanceof Ia ? r.maxValue : 0 - } - populatePaintArrays(t, r, a, c, p) { - for (const f in this.binders) { - const g = this.binders[f]; - (g instanceof Ha || g instanceof Ia || g instanceof ls) && g.populatePaintArray(t, r, a, c, p) - } - } - setConstantPatternPositions(t, r) { - for (const a in this.binders) { - const c = this.binders[a]; - c instanceof Qs && c.setConstantPatternPositions(t, r) - } - } - updatePaintArrays(t, r, a, c, p) { - let f = !1; - for (const g in t) { - const v = r.getPositions(g); - for (const S of v) { - const I = a.feature(S.index); - for (const E in this.binders) { - const R = this.binders[E]; - if ((R instanceof Ha || R instanceof Ia || R instanceof ls) && R.expression.isStateDependent === !0) { - const N = c.paint.get(E); - R.expression = N.value, R.updatePaintArray(S.start, S.end, I, t[g], p), f = !0 - } - } - } - } - return f - } - defines() { - const t = []; - for (const r in this.binders) { - const a = this.binders[r]; - (a instanceof Ro || a instanceof Qs) && t.push(...a.uniformNames.map((c => `#define HAS_UNIFORM_${c}`))) - } - return t - } - getBinderAttributes() { - const t = []; - for (const r in this.binders) { - const a = this.binders[r]; - if (a instanceof Ha || a instanceof Ia) - for (let c = 0; c < a.paintVertexAttributes.length; c++) t.push(a.paintVertexAttributes[c].name); - else if (a instanceof ls) - for (let c = 0; c < Qi.members.length; c++) t.push(Qi.members[c].name) - } - return t - } - getBinderUniforms() { - const t = []; - for (const r in this.binders) { - const a = this.binders[r]; - if (a instanceof Ro || a instanceof Qs || a instanceof Ia) - for (const c of a.uniformNames) t.push(c) - } - return t - } - getPaintVertexBuffers() { - return this._buffers - } - getUniforms(t, r) { - const a = []; - for (const c in this.binders) { - const p = this.binders[c]; - if (p instanceof Ro || p instanceof Qs || p instanceof Ia) { - for (const f of p.uniformNames) - if (r[f]) { - const g = p.getBinding(t, r[f], f); - a.push({ - name: f, - property: c, - binding: g - }) - } - } - } - return a - } - setUniforms(t, r, a, c) { - for (const { - name: p, - property: f, - binding: g - } - of r) this.binders[f].setUniform(g, c, a.get(f), p) - } - updatePaintBuffers(t) { - this._buffers = []; - for (const r in this.binders) { - const a = this.binders[r]; - if (t && a instanceof ls) { - const c = t.fromScale === 2 ? a.zoomInPaintVertexBuffer : a.zoomOutPaintVertexBuffer; - c && this._buffers.push(c) - } else(a instanceof Ha || a instanceof Ia) && a.paintVertexBuffer && this._buffers.push(a.paintVertexBuffer) - } - } - upload(t) { - for (const r in this.binders) { - const a = this.binders[r]; - (a instanceof Ha || a instanceof Ia || a instanceof ls) && a.upload(t) - } - this.updatePaintBuffers() - } - destroy() { - for (const t in this.binders) { - const r = this.binders[t]; - (r instanceof Ha || r instanceof Ia || r instanceof ls) && r.destroy() - } - } - } - class ia { - constructor(t, r, a = () => !0) { - this.programConfigurations = {}; - for (const c of t) this.programConfigurations[c.id] = new id(c, r, a); - this.needsUpload = !1, this._featureMap = new Is, this._bufferOffset = 0 - } - populatePaintArrays(t, r, a, c, p, f) { - for (const g in this.programConfigurations) this.programConfigurations[g].populatePaintArrays(t, r, c, p, f); - r.id !== void 0 && this._featureMap.add(r.id, a, this._bufferOffset, t), this._bufferOffset = t, this.needsUpload = !0 - } - updatePaintArrays(t, r, a, c) { - for (const p of a) this.needsUpload = this.programConfigurations[p.id].updatePaintArrays(t, this._featureMap, r, p, c) || this.needsUpload - } - get(t) { - return this.programConfigurations[t] - } - upload(t) { - if (this.needsUpload) { - for (const r in this.programConfigurations) this.programConfigurations[r].upload(t); - this.needsUpload = !1 - } - } - destroy() { - for (const t in this.programConfigurations) this.programConfigurations[t].destroy() - } - } - - function nd(i, 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": ["gapwidth"], - "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"] - } [i] || [i.replace(`${t}-`, "").replace(/-/g, "_")] - } - - function tu(i, t, r) { - const a = { - color: { - source: Do, - composite: M - }, - number: { - source: d, - composite: Do - } - }, - c = (function(p) { - return { - "line-pattern": { - source: Rt, - composite: Rt - }, - "fill-pattern": { - source: Rt, - composite: Rt - }, - "fill-extrusion-pattern": { - source: Rt, - composite: Rt - } - } [p] - })(i); - return c && c[r] || a[t][r] - } - Kt("ConstantBinder", Ro), Kt("CrossFadedConstantBinder", Qs), Kt("SourceExpressionBinder", Ha), Kt("CrossFadedCompositeBinder", ls), Kt("CompositeExpressionBinder", Ia), Kt("ProgramConfiguration", id, { - omit: ["_buffers"] - }), Kt("ProgramConfigurationSet", ia); - const kl = Math.pow(2, 14) - 1, - El = -kl - 1; - - function cs(i) { - const t = ne / i.extent, - r = i.loadGeometry(); - for (let a = 0; a < r.length; a++) { - const c = r[a]; - for (let p = 0; p < c.length; p++) { - const f = c[p], - g = Math.round(f.x * t), - v = Math.round(f.y * t); - f.x = xt(g, El, kl), f.y = xt(v, El, kl), (g < f.x || g > f.x + 1 || v < f.y || v > f.y + 1) && Lt("Geometry exceeds allowed extent, reduce your vector tile buffer size") - } - } - return r - } - - function Wa(i, t) { - return { - type: i.type, - id: i.id, - properties: i.properties, - geometry: t ? cs(i) : [] - } - } - const Cm = -32768; - - function Bv(i, t, r, a, c) { - i.emplaceBack(Cm + 8 * t + a, Cm + 8 * r + c) - } - class wp { - constructor(t) { - this.zoom = t.zoom, this.globalState = t.globalState, this.overscaling = t.overscaling, this.layers = t.layers, this.layerIds = this.layers.map((r => r.id)), this.index = t.index, this.hasPattern = !1, this.layoutVertexArray = new De, this.indexArray = new ki, this.segments = new Wr, this.programConfigurations = new ia(t.layers, t.zoom), this.stateDependentLayerIds = this.layers.filter((r => r.isStateDependent())).map((r => r.id)) - } - populate(t, r, a) { - const c = this.layers[0], - p = []; - let f = null, - g = !1, - v = c.type === "heatmap"; - if (c.type === "circle") { - const I = c; - f = I.layout.get("circle-sort-key"), g = !f.isConstant(), v = v || I.paint.get("circle-pitch-alignment") === "map" - } - const S = v ? r.subdivisionGranularity.circle : 1; - for (const { - feature: I, - id: E, - index: R, - sourceLayerIndex: N - } - of t) { - const j = this.layers[0]._featureFilter.needGeometry, - Z = Wa(I, j); - if (!this.layers[0]._featureFilter.filter(new Oi(this.zoom, { - globalState: this.globalState - }), Z, a)) continue; - const Y = g ? f.evaluate(Z, {}, a) : void 0, - ae = { - id: E, - properties: I.properties, - type: I.type, - sourceLayerIndex: N, - index: R, - geometry: j ? Z.geometry : cs(I), - patterns: {}, - sortKey: Y - }; - p.push(ae) - } - g && p.sort(((I, E) => I.sortKey - E.sortKey)); - for (const I of p) { - const { - geometry: E, - index: R, - sourceLayerIndex: N - } = I, j = t[R].feature; - this.addFeature(I, E, R, a, S), r.featureIndex.insert(j, E, R, N, this.index) - } - } - update(t, r, a) { - this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(t, r, this.stateDependentLayers, a) - } - isEmpty() { - return this.layoutVertexArray.length === 0 - } - uploadPending() { - return !this.uploaded || this.programConfigurations.needsUpload - } - upload(t) { - this.uploaded || (this.layoutVertexBuffer = t.createVertexBuffer(this.layoutVertexArray, Ui), 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, r, a, c, p = 1) { - let f; - switch (p) { - case 1: - f = [0, 7]; - break; - case 3: - f = [0, 2, 5, 7]; - break; - case 5: - f = [0, 1, 3, 4, 6, 7]; - break; - case 7: - f = [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 g = f.length; - for (const v of r) - for (const S of v) { - const I = S.x, - E = S.y; - if (I < 0 || I >= ne || E < 0 || E >= ne) continue; - const R = this.segments.prepareSegment(g * g, this.layoutVertexArray, this.indexArray, t.sortKey), - N = R.vertexLength; - for (let j = 0; j < g; j++) - for (let Z = 0; Z < g; Z++) Bv(this.layoutVertexArray, I, E, f[Z], f[j]); - for (let j = 0; j < g - 1; j++) - for (let Z = 0; Z < g - 1; Z++) { - const Y = N + j * g + Z, - ae = N + (j + 1) * g + Z; - this.indexArray.emplaceBack(Y, ae + 1, Y + 1), this.indexArray.emplaceBack(Y, ae, ae + 1) - } - R.vertexLength += g * g, R.primitiveLength += (g - 1) * (g - 1) * 2 - } - this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, t, a, {}, c) - } - } - - function Sm(i, t) { - for (let r = 0; r < i.length; r++) - if (zl(t, i[r])) return !0; - for (let r = 0; r < t.length; r++) - if (zl(i, t[r])) return !0; - return !!Tp(i, t) - } - - function Fv(i, t, r) { - return !!zl(i, t) || !!Cp(t, i, r) - } - - function Pm(i, t) { - if (i.length === 1) return Mm(t, i[0]); - for (let r = 0; r < t.length; r++) { - const a = t[r]; - for (let c = 0; c < a.length; c++) - if (zl(i, a[c])) return !0 - } - for (let r = 0; r < i.length; r++) - if (Mm(t, i[r])) return !0; - for (let r = 0; r < t.length; r++) - if (Tp(i, t[r])) return !0; - return !1 - } - - function Ov(i, t, r) { - if (i.length > 1) { - if (Tp(i, t)) return !0; - for (let a = 0; a < t.length; a++) - if (Cp(t[a], i, r)) return !0 - } - for (let a = 0; a < i.length; a++) - if (Cp(i[a], t, r)) return !0; - return !1 - } - - function Tp(i, t) { - if (i.length === 0 || t.length === 0) return !1; - for (let r = 0; r < i.length - 1; r++) { - const a = i[r], - c = i[r + 1]; - for (let p = 0; p < t.length - 1; p++) - if (Nv(a, c, t[p], t[p + 1])) return !0 - } - return !1 - } - - function Nv(i, t, r, a) { - return Xt(i, r, a) !== Xt(t, r, a) && Xt(i, t, r) !== Xt(i, t, a) - } - - function Cp(i, t, r) { - const a = r * r; - if (t.length === 1) return i.distSqr(t[0]) < a; - for (let c = 1; c < t.length; c++) - if (Im(i, t[c - 1], t[c]) < a) return !0; - return !1 - } - - function Im(i, t, r) { - const a = t.distSqr(r); - if (a === 0) return i.distSqr(t); - const c = ((i.x - t.x) * (r.x - t.x) + (i.y - t.y) * (r.y - t.y)) / a; - return i.distSqr(c < 0 ? t : c > 1 ? r : r.sub(t)._mult(c)._add(t)) - } - - function Mm(i, t) { - let r, a, c, p = !1; - for (let f = 0; f < i.length; f++) { - r = i[f]; - for (let g = 0, v = r.length - 1; g < r.length; v = g++) a = r[g], c = r[v], a.y > t.y != c.y > t.y && t.x < (c.x - a.x) * (t.y - a.y) / (c.y - a.y) + a.x && (p = !p) - } - return p - } - - function zl(i, t) { - let r = !1; - for (let a = 0, c = i.length - 1; a < i.length; c = a++) { - const p = i[a], - f = i[c]; - p.y > t.y != f.y > t.y && t.x < (f.x - p.x) * (t.y - p.y) / (f.y - p.y) + p.x && (r = !r) - } - return r - } - - function jv(i, t, r) { - const a = r[0], - c = r[2]; - if (i.x < a.x && t.x < a.x || i.x > c.x && t.x > c.x || i.y < a.y && t.y < a.y || i.y > c.y && t.y > c.y) return !1; - const p = Xt(i, t, r[0]); - return p !== Xt(i, t, r[1]) || p !== Xt(i, t, r[2]) || p !== Xt(i, t, r[3]) - } - - function ru(i, t, r) { - const a = t.paint.get(i).value; - return a.kind === "constant" ? a.value : r.programConfigurations.get(t.id).getMaxValue(i) - } - - function ad(i) { - return Math.sqrt(i[0] * i[0] + i[1] * i[1]) - } - - function sd(i, t, r, a, c) { - if (!t[0] && !t[1]) return i; - const p = $.convert(t)._mult(c); - r === "viewport" && p._rotate(-a); - const f = []; - for (let g = 0; g < i.length; g++) f.push(i[g].sub(p)); - return f - } - let Am, km; - Kt("CircleBucket", wp, { - omit: ["layers"] - }); - var qv = { - get paint() { - return km = km || new jn({ - "circle-radius": new Rr(xe.paint_circle["circle-radius"]), - "circle-color": new Rr(xe.paint_circle["circle-color"]), - "circle-blur": new Rr(xe.paint_circle["circle-blur"]), - "circle-opacity": new Rr(xe.paint_circle["circle-opacity"]), - "circle-translate": new hr(xe.paint_circle["circle-translate"]), - "circle-translate-anchor": new hr(xe.paint_circle["circle-translate-anchor"]), - "circle-pitch-scale": new hr(xe.paint_circle["circle-pitch-scale"]), - "circle-pitch-alignment": new hr(xe.paint_circle["circle-pitch-alignment"]), - "circle-stroke-width": new Rr(xe.paint_circle["circle-stroke-width"]), - "circle-stroke-color": new Rr(xe.paint_circle["circle-stroke-color"]), - "circle-stroke-opacity": new Rr(xe.paint_circle["circle-stroke-opacity"]) - }) - }, - get layout() { - return Am = Am || new jn({ - "circle-sort-key": new Rr(xe.layout_circle["circle-sort-key"]) - }) - } - }; - class Vv extends ha { - constructor(t) { - super(t, qv) - } - createBucket(t) { - return new wp(t) - } - queryRadius(t) { - const r = t; - return ru("circle-radius", this, r) + ru("circle-stroke-width", this, r) + ad(this.paint.get("circle-translate")) - } - queryIntersectsFeature({ - queryGeometry: t, - feature: r, - featureState: a, - geometry: c, - transform: p, - pixelsToTileUnits: f, - unwrappedTileID: g, - getElevation: v - }) { - const S = sd(t, this.paint.get("circle-translate"), this.paint.get("circle-translate-anchor"), -p.bearingInRadians, f), - I = this.paint.get("circle-radius").evaluate(r, a) + this.paint.get("circle-stroke-width").evaluate(r, a), - E = this.paint.get("circle-pitch-alignment") === "map", - R = E ? S : (function(j, Z, Y, ae) { - return j.map((ze => Em(ze, Z, Y, ae))) - })(S, p, g, v), - N = E ? I * f : I; - for (const j of c) - for (const Z of j) { - const Y = E ? Z : Em(Z, p, g, v); - let ae = N; - const ze = p.projectTileCoordinates(Z.x, Z.y, g, v).signedDistanceFromCamera; - if (this.paint.get("circle-pitch-scale") === "viewport" && this.paint.get("circle-pitch-alignment") === "map" ? ae *= ze / p.cameraToCenterDistance : this.paint.get("circle-pitch-scale") === "map" && this.paint.get("circle-pitch-alignment") === "viewport" && (ae *= p.cameraToCenterDistance / ze), Fv(R, Y, ae)) return !0 - } - return !1 - } - } - - function Em(i, t, r, a) { - const c = t.projectTileCoordinates(i.x, i.y, r, a).point; - return new $((.5 * c.x + .5) * t.width, (.5 * -c.y + .5) * t.height) - } - class zm extends wp {} - let Lm; - Kt("HeatmapBucket", zm, { - omit: ["layers"] - }); - var Uv = { - get paint() { - return Lm = Lm || new jn({ - "heatmap-radius": new Rr(xe.paint_heatmap["heatmap-radius"]), - "heatmap-weight": new Rr(xe.paint_heatmap["heatmap-weight"]), - "heatmap-intensity": new hr(xe.paint_heatmap["heatmap-intensity"]), - "heatmap-color": new Pl(xe.paint_heatmap["heatmap-color"]), - "heatmap-opacity": new hr(xe.paint_heatmap["heatmap-opacity"]) - }) - } - }; - - function Sp(i, { - width: t, - height: r - }, a, c) { - if (c) { - if (c instanceof Uint8ClampedArray) c = new Uint8Array(c.buffer); - else if (c.length !== t * r * a) throw new RangeError(`mismatched image size. expected: ${c.length} but got: ${t*r*a}`) - } else c = new Uint8Array(t * r * a); - return i.width = t, i.height = r, i.data = c, i - } - - function Dm(i, { - width: t, - height: r - }, a) { - if (t === i.width && r === i.height) return; - const c = Sp({}, { - width: t, - height: r - }, a); - Pp(i, c, { - x: 0, - y: 0 - }, { - x: 0, - y: 0 - }, { - width: Math.min(i.width, t), - height: Math.min(i.height, r) - }, a), i.width = t, i.height = r, i.data = c.data - } - - function Pp(i, t, r, a, c, p) { - if (c.width === 0 || c.height === 0) return t; - if (c.width > i.width || c.height > i.height || r.x > i.width - c.width || r.y > i.height - c.height) throw new RangeError("out of range source coordinates for image copy"); - if (c.width > t.width || c.height > t.height || a.x > t.width - c.width || a.y > t.height - c.height) throw new RangeError("out of range destination coordinates for image copy"); - const f = i.data, - g = t.data; - if (f === g) throw new Error("srcData equals dstData, so image is already copied"); - for (let v = 0; v < c.height; v++) { - const S = ((r.y + v) * i.width + r.x) * p, - I = ((a.y + v) * t.width + a.x) * p; - for (let E = 0; E < c.width * p; E++) g[I + E] = f[S + E] - } - return t - } - class iu { - constructor(t, r) { - Sp(this, t, 1, r) - } - resize(t) { - Dm(this, t, 1) - } - clone() { - return new iu({ - width: this.width, - height: this.height - }, new Uint8Array(this.data)) - } - static copy(t, r, a, c, p) { - Pp(t, r, a, c, p, 1) - } - } - class na { - constructor(t, r) { - Sp(this, t, 4, r) - } - resize(t) { - Dm(this, t, 4) - } - replace(t, r) { - r ? this.data.set(t) : this.data = t instanceof Uint8ClampedArray ? new Uint8Array(t.buffer) : t - } - clone() { - return new na({ - width: this.width, - height: this.height - }, new Uint8Array(this.data)) - } - static copy(t, r, a, c, p) { - Pp(t, r, a, c, p, 4) - } - setPixel(t, r, a) { - const c = 4 * (t * this.width + r); - this.data[c + 0] = Math.round(255 * a.r / a.a), this.data[c + 1] = Math.round(255 * a.g / a.a), this.data[c + 2] = Math.round(255 * a.b / a.a), this.data[c + 3] = Math.round(255 * a.a) - } - } - - function Rm(i) { - const t = {}, - r = i.resolution || 256, - a = i.clips ? i.clips.length : 1, - c = i.image || new na({ - width: r, - height: a - }); - if (Math.log(r) / Math.LN2 % 1 != 0) throw new Error(`width is not a power of 2 - ${r}`); - const p = (f, g, v) => { - t[i.evaluationKey] = v; - const S = i.expression.evaluate(t); - c.setPixel(f / 4 / r, g / 4, S) - }; - if (i.clips) - for (let f = 0, g = 0; f < a; ++f, g += 4 * r) - for (let v = 0, S = 0; v < r; v++, S += 4) { - const I = v / (r - 1), - { - start: E, - end: R - } = i.clips[f]; - p(g, S, E * (1 - I) + R * I) - } else - for (let f = 0, g = 0; f < r; f++, g += 4) p(0, g, f / (r - 1)); - return c - } - Kt("AlphaImage", iu), Kt("RGBAImage", na); - const Ip = "big-fb"; - class Zv extends ha { - createBucket(t) { - return new zm(t) - } - constructor(t) { - super(t, Uv), this.heatmapFbos = new Map, this._updateColorRamp() - } - _handleSpecialPaintPropertyUpdate(t) { - t === "heatmap-color" && this._updateColorRamp() - } - _updateColorRamp() { - this.colorRamp = Rm({ - expression: this._transitionablePaint._values["heatmap-color"].value.expression, - evaluationKey: "heatmapDensity", - image: this.colorRamp - }), this.colorRampTexture = null - } - resize() { - this.heatmapFbos.has(Ip) && this.heatmapFbos.delete(Ip) - } - queryRadius() { - return 0 - } - queryIntersectsFeature() { - return !1 - } - hasOffscreenPass() { - return this.paint.get("heatmap-opacity") !== 0 && this.visibility !== "none" - } - } - let Bm; - var $v = { - get paint() { - return Bm = Bm || new jn({ - "hillshade-illumination-direction": new hr(xe.paint_hillshade["hillshade-illumination-direction"]), - "hillshade-illumination-altitude": new hr(xe.paint_hillshade["hillshade-illumination-altitude"]), - "hillshade-illumination-anchor": new hr(xe.paint_hillshade["hillshade-illumination-anchor"]), - "hillshade-exaggeration": new hr(xe.paint_hillshade["hillshade-exaggeration"]), - "hillshade-shadow-color": new hr(xe.paint_hillshade["hillshade-shadow-color"]), - "hillshade-highlight-color": new hr(xe.paint_hillshade["hillshade-highlight-color"]), - "hillshade-accent-color": new hr(xe.paint_hillshade["hillshade-accent-color"]), - "hillshade-method": new hr(xe.paint_hillshade["hillshade-method"]) - }) - } - }; - class Gv extends ha { - constructor(t) { - super(t, $v), this.recalculate({ - zoom: 0, - zoomHistory: {} - }, void 0) - } - getIlluminationProperties() { - let t = this.paint.get("hillshade-illumination-direction").values, - r = this.paint.get("hillshade-illumination-altitude").values, - a = this.paint.get("hillshade-highlight-color").values, - c = this.paint.get("hillshade-shadow-color").values; - const p = Math.max(t.length, r.length, a.length, c.length); - t = t.concat(Array(p - t.length).fill(t.at(-1))), r = r.concat(Array(p - r.length).fill(r.at(-1))), a = a.concat(Array(p - a.length).fill(a.at(-1))), c = c.concat(Array(p - c.length).fill(c.at(-1))); - const f = r.map(ur); - return { - directionRadians: t.map(ur), - altitudeRadians: f, - shadowColor: c, - highlightColor: a - } - } - hasOffscreenPass() { - return this.paint.get("hillshade-exaggeration") !== 0 && this.visibility !== "none" - } - } - let Fm; - var Hv = { - get paint() { - return Fm = Fm || new jn({ - "color-relief-opacity": new hr(xe["paint_color-relief"]["color-relief-opacity"]), - "color-relief-color": new Pl(xe["paint_color-relief"]["color-relief-color"]) - }) - } - }; - class Mp { - constructor(t, r, a, c) { - this.context = t, this.format = a, this.texture = t.gl.createTexture(), this.update(r, c) - } - update(t, r, a) { - const { - width: c, - height: p - } = t, f = !(this.size && this.size[0] === c && this.size[1] === p || a), { - context: g - } = this, { - gl: v - } = g; - if (this.useMipmap = !!(r && r.useMipmap), v.bindTexture(v.TEXTURE_2D, this.texture), g.pixelStoreUnpackFlipY.set(!1), g.pixelStoreUnpack.set(1), g.pixelStoreUnpackPremultiplyAlpha.set(this.format === v.RGBA && (!r || r.premultiply !== !1)), f) this.size = [c, p], t instanceof HTMLImageElement || t instanceof HTMLCanvasElement || t instanceof HTMLVideoElement || t instanceof ImageData || ar(t) ? v.texImage2D(v.TEXTURE_2D, 0, this.format, this.format, v.UNSIGNED_BYTE, t) : v.texImage2D(v.TEXTURE_2D, 0, this.format, c, p, 0, this.format, v.UNSIGNED_BYTE, t.data); - else { - const { - x: S, - y: I - } = a || { - x: 0, - y: 0 - }; - t instanceof HTMLImageElement || t instanceof HTMLCanvasElement || t instanceof HTMLVideoElement || t instanceof ImageData || ar(t) ? v.texSubImage2D(v.TEXTURE_2D, 0, S, I, v.RGBA, v.UNSIGNED_BYTE, t) : v.texSubImage2D(v.TEXTURE_2D, 0, S, I, c, p, v.RGBA, v.UNSIGNED_BYTE, t.data) - } - this.useMipmap && this.isSizePowerOfTwo() && v.generateMipmap(v.TEXTURE_2D), g.pixelStoreUnpackFlipY.setDefault(), g.pixelStoreUnpack.setDefault(), g.pixelStoreUnpackPremultiplyAlpha.setDefault() - } - bind(t, r, a) { - const { - context: c - } = this, { - gl: p - } = c; - p.bindTexture(p.TEXTURE_2D, this.texture), a !== p.LINEAR_MIPMAP_NEAREST || this.isSizePowerOfTwo() || (a = p.LINEAR), t !== this.filter && (p.texParameteri(p.TEXTURE_2D, p.TEXTURE_MAG_FILTER, t), p.texParameteri(p.TEXTURE_2D, p.TEXTURE_MIN_FILTER, a || t), this.filter = t), r !== this.wrap && (p.texParameteri(p.TEXTURE_2D, p.TEXTURE_WRAP_S, r), p.texParameteri(p.TEXTURE_2D, p.TEXTURE_WRAP_T, r), this.wrap = r) - } - 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 - } - } - class Om { - constructor(t, r, a, c = 1, p = 1, f = 1, g = 0) { - if (this.uid = t, r.height !== r.width) throw new RangeError("DEM tiles must be square"); - if (a && !["mapbox", "terrarium", "custom"].includes(a)) return void Lt(`"${a}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`); - this.stride = r.height; - const v = this.dim = r.height - 2; - switch (this.data = new Uint32Array(r.data.buffer), a) { - case "terrarium": - this.redFactor = 256, this.greenFactor = 1, this.blueFactor = 1 / 256, this.baseShift = 32768; - break; - case "custom": - this.redFactor = c, this.greenFactor = p, this.blueFactor = f, this.baseShift = g; - break; - default: - this.redFactor = 6553.6, this.greenFactor = 25.6, this.blueFactor = .1, this.baseShift = 1e4 - } - for (let S = 0; S < v; S++) this.data[this._idx(-1, S)] = this.data[this._idx(0, S)], this.data[this._idx(v, S)] = this.data[this._idx(v - 1, S)], this.data[this._idx(S, -1)] = this.data[this._idx(S, 0)], this.data[this._idx(S, v)] = this.data[this._idx(S, v - 1)]; - this.data[this._idx(-1, -1)] = this.data[this._idx(0, 0)], this.data[this._idx(v, -1)] = this.data[this._idx(v - 1, 0)], this.data[this._idx(-1, v)] = this.data[this._idx(0, v - 1)], this.data[this._idx(v, v)] = this.data[this._idx(v - 1, v - 1)], this.min = Number.MAX_SAFE_INTEGER, this.max = Number.MIN_SAFE_INTEGER; - for (let S = 0; S < v; S++) - for (let I = 0; I < v; I++) { - const E = this.get(S, I); - E > this.max && (this.max = E), E < this.min && (this.min = E) - } - } - get(t, r) { - const a = new Uint8Array(this.data.buffer), - c = 4 * this._idx(t, r); - return this.unpack(a[c], a[c + 1], a[c + 2]) - } - getUnpackVector() { - return [this.redFactor, this.greenFactor, this.blueFactor, this.baseShift] - } - _idx(t, r) { - if (t < -1 || t >= this.dim + 1 || r < -1 || r >= this.dim + 1) throw new RangeError("out of range source coordinates for DEM data"); - return (r + 1) * this.stride + (t + 1) - } - unpack(t, r, a) { - return t * this.redFactor + r * this.greenFactor + a * this.blueFactor - this.baseShift - } - pack(t) { - return Nm(t, this.getUnpackVector()) - } - getPixels() { - return new na({ - width: this.stride, - height: this.stride - }, new Uint8Array(this.data.buffer)) - } - backfillBorder(t, r, a) { - if (this.dim !== t.dim) throw new Error("dem dimension mismatch"); - let c = r * this.dim, - p = r * this.dim + this.dim, - f = a * this.dim, - g = a * this.dim + this.dim; - switch (r) { - case -1: - c = p - 1; - break; - case 1: - p = c + 1 - } - switch (a) { - case -1: - f = g - 1; - break; - case 1: - g = f + 1 - } - const v = -r * this.dim, - S = -a * this.dim; - for (let I = f; I < g; I++) - for (let E = c; E < p; E++) this.data[this._idx(E, I)] = t.data[this._idx(E + v, I + S)] - } - } - - function Nm(i, t) { - const r = t[0], - a = t[1], - c = t[2], - p = t[3], - f = Math.min(r, a, c), - g = Math.round((i + p) / f); - return { - r: Math.floor(g * f / r) % 256, - g: Math.floor(g * f / a) % 256, - b: Math.floor(g * f / c) % 256 - } - } - Kt("DEMData", Om); - class Wv extends ha { - constructor(t) { - super(t, Hv) - } - _createColorRamp(t) { - const r = { - elevationStops: [], - colorStops: [] - }, - a = this._transitionablePaint._values["color-relief-color"].value.expression; - if (a instanceof So && a._styleExpression.expression instanceof In) { - this.colorRampExpression = a; - const f = a._styleExpression.expression; - r.elevationStops = f.labels, r.colorStops = []; - for (const g of r.elevationStops) r.colorStops.push(f.evaluate({ - globals: { - elevation: g - } - })) - } - if (r.elevationStops.length < 1 && (r.elevationStops = [0], r.colorStops = [yr.transparent]), r.elevationStops.length < 2 && (r.elevationStops.push(r.elevationStops[0] + 1), r.colorStops.push(r.colorStops[0])), r.elevationStops.length <= t) return r; - const c = { - elevationStops: [], - colorStops: [] - }, - p = (r.elevationStops.length - 1) / (t - 1); - for (let f = 0; f < r.elevationStops.length - .5; f += p) c.elevationStops.push(r.elevationStops[Math.round(f)]), c.colorStops.push(r.colorStops[Math.round(f)]); - return Lt(`Too many colors in specification of ${this.id} color-relief layer, may not render properly.`), c - } - _colorRampChanged() { - return this.colorRampExpression != this._transitionablePaint._values["color-relief-color"].value.expression - } - getColorRampTextures(t, r, a) { - if (this.colorRampTextures && !this._colorRampChanged()) return this.colorRampTextures; - const c = this._createColorRamp(r), - p = new na({ - width: c.colorStops.length, - height: 1 - }), - f = new na({ - width: c.colorStops.length, - height: 1 - }); - for (let g = 0; g < c.elevationStops.length; g++) { - const v = Nm(c.elevationStops[g], a); - f.setPixel(0, g, new yr(v.r / 255, v.g / 255, v.b / 255, 1)), p.setPixel(0, g, c.colorStops[g]) - } - return this.colorRampTextures = { - elevationTexture: new Mp(t, f, t.gl.RGBA), - colorTexture: new Mp(t, p, t.gl.RGBA) - }, this.colorRampTextures - } - hasOffscreenPass() { - return this.visibility !== "none" && !!this.colorRampTextures - } - } - const Xv = Hi([{ - name: "a_pos", - components: 2, - type: "Int16" - }], 4), - { - members: Kv - } = Xv; - - function Ap(i, t, r) { - const a = r.patternDependencies; - let c = !1; - for (const p of t) { - const f = p.paint.get(`${i}-pattern`); - f.isConstant() || (c = !0); - const g = f.constantOr(null); - g && (c = !0, a[g.to] = !0, a[g.from] = !0) - } - return c - } - - function kp(i, t, r, a, c) { - const p = c.patternDependencies; - for (const f of t) { - const g = f.paint.get(`${i}-pattern`).value; - if (g.kind !== "constant") { - let v = g.evaluate({ - zoom: a - 1 - }, r, {}, c.availableImages), - S = g.evaluate({ - zoom: a - }, r, {}, c.availableImages), - I = g.evaluate({ - zoom: a + 1 - }, r, {}, c.availableImages); - v = v && v.name ? v.name : v, S = S && S.name ? S.name : S, I = I && I.name ? I.name : I, p[v] = !0, p[S] = !0, p[I] = !0, r.patterns[f.id] = { - min: v, - mid: S, - max: I - } - } - } - return r - } - - function jm(i, t, r, a, c) { - let p; - if (c === (function(f, g, v, S) { - let I = 0; - for (let E = g, R = v - S; E < v; E += S) I += (f[R] - f[E]) * (f[E + 1] + f[R + 1]), R = E; - return I - })(i, t, r, a) > 0) - for (let f = t; f < r; f += a) p = Zm(f / a | 0, i[f], i[f + 1], p); - else - for (let f = r - a; f >= t; f -= a) p = Zm(f / a | 0, i[f], i[f + 1], p); - return p && Ll(p, p.next) && (ou(p), p = p.next), p - } - - function Bo(i, t) { - if (!i) return i; - t || (t = i); - let r, a = i; - do - if (r = !1, a.steiner || !Ll(a, a.next) && Yi(a.prev, a, a.next) !== 0) a = a.next; - else { - if (ou(a), a = t = a.prev, a === a.next) break; - r = !0 - } while (r || a !== t); - return t - } - - function nu(i, t, r, a, c, p, f) { - if (!i) return; - !f && p && (function(v, S, I, E) { - let R = v; - do R.z === 0 && (R.z = Ep(R.x, R.y, S, I, E)), R.prevZ = R.prev, R.nextZ = R.next, R = R.next; while (R !== v); - R.prevZ.nextZ = null, R.prevZ = null, (function(N) { - let j, Z = 1; - do { - let Y, ae = N; - N = null; - let ze = null; - for (j = 0; ae;) { - j++; - let me = ae, - be = 0; - for (let rt = 0; rt < Z && (be++, me = me.nextZ, me); rt++); - let Ve = Z; - for (; be > 0 || Ve > 0 && me;) be !== 0 && (Ve === 0 || !me || ae.z <= me.z) ? (Y = ae, ae = ae.nextZ, be--) : (Y = me, me = me.nextZ, Ve--), ze ? ze.nextZ = Y : N = Y, Y.prevZ = ze, ze = Y; - ae = me - } - ze.nextZ = null, Z *= 2 - } while (j > 1) - })(R) - })(i, a, c, p); - let g = i; - for (; i.prev !== i.next;) { - const v = i.prev, - S = i.next; - if (p ? Jv(i, a, c, p) : Yv(i)) t.push(v.i, i.i, S.i), ou(i), i = S.next, g = S.next; - else if ((i = S) === g) { - f ? f === 1 ? nu(i = Qv(Bo(i), t), t, r, a, c, p, 2) : f === 2 && e0(i, t, r, a, c, p) : nu(Bo(i), t, r, a, c, p, 1); - break - } - } - } - - function Yv(i) { - const t = i.prev, - r = i, - a = i.next; - if (Yi(t, r, a) >= 0) return !1; - const c = t.x, - p = r.x, - f = a.x, - g = t.y, - v = r.y, - S = a.y, - I = Math.min(c, p, f), - E = Math.min(g, v, S), - R = Math.max(c, p, f), - N = Math.max(g, v, S); - let j = a.next; - for (; j !== t;) { - if (j.x >= I && j.x <= R && j.y >= E && j.y <= N && au(c, g, p, v, f, S, j.x, j.y) && Yi(j.prev, j, j.next) >= 0) return !1; - j = j.next - } - return !0 - } - - function Jv(i, t, r, a) { - const c = i.prev, - p = i, - f = i.next; - if (Yi(c, p, f) >= 0) return !1; - const g = c.x, - v = p.x, - S = f.x, - I = c.y, - E = p.y, - R = f.y, - N = Math.min(g, v, S), - j = Math.min(I, E, R), - Z = Math.max(g, v, S), - Y = Math.max(I, E, R), - ae = Ep(N, j, t, r, a), - ze = Ep(Z, Y, t, r, a); - let me = i.prevZ, - be = i.nextZ; - for (; me && me.z >= ae && be && be.z <= ze;) { - if (me.x >= N && me.x <= Z && me.y >= j && me.y <= Y && me !== c && me !== f && au(g, I, v, E, S, R, me.x, me.y) && Yi(me.prev, me, me.next) >= 0 || (me = me.prevZ, be.x >= N && be.x <= Z && be.y >= j && be.y <= Y && be !== c && be !== f && au(g, I, v, E, S, R, be.x, be.y) && Yi(be.prev, be, be.next) >= 0)) return !1; - be = be.nextZ - } - for (; me && me.z >= ae;) { - if (me.x >= N && me.x <= Z && me.y >= j && me.y <= Y && me !== c && me !== f && au(g, I, v, E, S, R, me.x, me.y) && Yi(me.prev, me, me.next) >= 0) return !1; - me = me.prevZ - } - for (; be && be.z <= ze;) { - if (be.x >= N && be.x <= Z && be.y >= j && be.y <= Y && be !== c && be !== f && au(g, I, v, E, S, R, be.x, be.y) && Yi(be.prev, be, be.next) >= 0) return !1; - be = be.nextZ - } - return !0 - } - - function Qv(i, t) { - let r = i; - do { - const a = r.prev, - c = r.next.next; - !Ll(a, c) && Vm(a, r, r.next, c) && su(a, c) && su(c, a) && (t.push(a.i, r.i, c.i), ou(r), ou(r.next), r = i = c), r = r.next - } while (r !== i); - return Bo(r) - } - - function e0(i, t, r, a, c, p) { - let f = i; - do { - let g = f.next.next; - for (; g !== f.prev;) { - if (f.i !== g.i && a0(f, g)) { - let v = Um(f, g); - return f = Bo(f, f.next), v = Bo(v, v.next), nu(f, t, r, a, c, p, 0), void nu(v, t, r, a, c, p, 0) - } - g = g.next - } - f = f.next - } while (f !== i) - } - - function t0(i, t) { - let r = i.x - t.x; - return r === 0 && (r = i.y - t.y, r === 0) && (r = (i.next.y - i.y) / (i.next.x - i.x) - (t.next.y - t.y) / (t.next.x - t.x)), r - } - - function r0(i, t) { - const r = (function(c, p) { - let f = p; - const g = c.x, - v = c.y; - let S, I = -1 / 0; - if (Ll(c, f)) return f; - do { - if (Ll(c, f.next)) return f.next; - if (v <= f.y && v >= f.next.y && f.next.y !== f.y) { - const Z = f.x + (v - f.y) * (f.next.x - f.x) / (f.next.y - f.y); - if (Z <= g && Z > I && (I = Z, S = f.x < f.next.x ? f : f.next, Z === g)) return S - } - f = f.next - } while (f !== p); - if (!S) return null; - const E = S, - R = S.x, - N = S.y; - let j = 1 / 0; - f = S; - do { - if (g >= f.x && f.x >= R && g !== f.x && qm(v < N ? g : I, v, R, N, v < N ? I : g, v, f.x, f.y)) { - const Z = Math.abs(v - f.y) / (g - f.x); - su(f, c) && (Z < j || Z === j && (f.x > S.x || f.x === S.x && i0(S, f))) && (S = f, j = Z) - } - f = f.next - } while (f !== E); - return S - })(i, t); - if (!r) return t; - const a = Um(r, i); - return Bo(a, a.next), Bo(r, r.next) - } - - function i0(i, t) { - return Yi(i.prev, i, t.prev) < 0 && Yi(t.next, i, i.next) < 0 - } - - function Ep(i, t, r, a, c) { - return (i = 1431655765 & ((i = 858993459 & ((i = 252645135 & ((i = 16711935 & ((i = (i - r) * c | 0) | i << 8)) | i << 4)) | i << 2)) | i << 1)) | (t = 1431655765 & ((t = 858993459 & ((t = 252645135 & ((t = 16711935 & ((t = (t - a) * c | 0) | t << 8)) | t << 4)) | t << 2)) | t << 1)) << 1 - } - - function n0(i) { - let t = i, - r = i; - do(t.x < r.x || t.x === r.x && t.y < r.y) && (r = t), t = t.next; while (t !== i); - return r - } - - function qm(i, t, r, a, c, p, f, g) { - return (c - f) * (t - g) >= (i - f) * (p - g) && (i - f) * (a - g) >= (r - f) * (t - g) && (r - f) * (p - g) >= (c - f) * (a - g) - } - - function au(i, t, r, a, c, p, f, g) { - return !(i === f && t === g) && qm(i, t, r, a, c, p, f, g) - } - - function a0(i, t) { - return i.next.i !== t.i && i.prev.i !== t.i && !(function(r, a) { - let c = r; - do { - if (c.i !== r.i && c.next.i !== r.i && c.i !== a.i && c.next.i !== a.i && Vm(c, c.next, r, a)) return !0; - c = c.next - } while (c !== r); - return !1 - })(i, t) && (su(i, t) && su(t, i) && (function(r, a) { - let c = r, - p = !1; - const f = (r.x + a.x) / 2, - g = (r.y + a.y) / 2; - do c.y > g != c.next.y > g && c.next.y !== c.y && f < (c.next.x - c.x) * (g - c.y) / (c.next.y - c.y) + c.x && (p = !p), c = c.next; while (c !== r); - return p - })(i, t) && (Yi(i.prev, i, t.prev) || Yi(i, t.prev, t)) || Ll(i, t) && Yi(i.prev, i, i.next) > 0 && Yi(t.prev, t, t.next) > 0) - } - - function Yi(i, t, r) { - return (t.y - i.y) * (r.x - t.x) - (t.x - i.x) * (r.y - t.y) - } - - function Ll(i, t) { - return i.x === t.x && i.y === t.y - } - - function Vm(i, t, r, a) { - const c = ld(Yi(i, t, r)), - p = ld(Yi(i, t, a)), - f = ld(Yi(r, a, i)), - g = ld(Yi(r, a, t)); - return c !== p && f !== g || !(c !== 0 || !od(i, r, t)) || !(p !== 0 || !od(i, a, t)) || !(f !== 0 || !od(r, i, a)) || !(g !== 0 || !od(r, t, a)) - } - - function od(i, t, r) { - return t.x <= Math.max(i.x, r.x) && t.x >= Math.min(i.x, r.x) && t.y <= Math.max(i.y, r.y) && t.y >= Math.min(i.y, r.y) - } - - function ld(i) { - return i > 0 ? 1 : i < 0 ? -1 : 0 - } - - function su(i, t) { - return Yi(i.prev, i, i.next) < 0 ? Yi(i, t, i.next) >= 0 && Yi(i, i.prev, t) >= 0 : Yi(i, t, i.prev) < 0 || Yi(i, i.next, t) < 0 - } - - function Um(i, t) { - const r = zp(i.i, i.x, i.y), - a = zp(t.i, t.x, t.y), - c = i.next, - p = t.prev; - return i.next = t, t.prev = i, r.next = c, c.prev = r, a.next = r, r.prev = a, p.next = a, a.prev = p, a - } - - function Zm(i, t, r, a) { - const c = zp(i, t, r); - return a ? (c.next = a.next, c.prev = a, a.next.prev = c, a.next = c) : (c.prev = c, c.next = c), c - } - - function ou(i) { - i.next.prev = i.prev, i.prev.next = i.next, i.prevZ && (i.prevZ.nextZ = i.nextZ), i.nextZ && (i.nextZ.prevZ = i.prevZ) - } - - function zp(i, t, r) { - return { - i, - x: t, - y: r, - prev: null, - next: null, - z: 0, - prevZ: null, - nextZ: null, - steiner: !1 - } - } - class Dl { - constructor(t, r) { - if (r > t) throw new Error("Min granularity must not be greater than base granularity."); - this._baseZoomGranularity = t, this._minGranularity = r - } - getGranularityForZoomLevel(t) { - return Math.max(Math.floor(this._baseZoomGranularity / (1 << t)), this._minGranularity, 1) - } - } - class cd { - constructor(t) { - this.fill = t.fill, this.line = t.line, this.tile = t.tile, this.stencil = t.stencil, this.circle = t.circle - } - } - cd.noSubdivision = new cd({ - fill: new Dl(0, 0), - line: new Dl(0, 0), - tile: new Dl(0, 0), - stencil: new Dl(0, 0), - circle: 1 - }), Kt("SubdivisionGranularityExpression", Dl), Kt("SubdivisionGranularitySetting", cd); - const Rl = -32768, - lu = 32767; - class s0 { - constructor(t, r) { - this._vertexBuffer = [], this._vertexDictionary = new Map, this._used = !1, this._granularity = t, this._granularityCellSize = ne / t, this._canonical = r - } - _getKey(t, r) { - return (t += 32768) << 16 | r + 32768 - } - _vertexToIndex(t, r) { - if (t < -32768 || r < -32768 || t > 32767 || r > 32767) throw new Error("Vertex coordinates are out of signed 16 bit integer range."); - const a = 0 | Math.round(t), - c = 0 | Math.round(r), - p = this._getKey(a, c); - if (this._vertexDictionary.has(p)) return this._vertexDictionary.get(p); - const f = this._vertexBuffer.length / 2; - return this._vertexDictionary.set(p, f), this._vertexBuffer.push(a, c), f - } - _subdivideTrianglesScanline(t) { - if (this._granularity < 2) return (function(c, p) { - const f = []; - for (let g = 0; g < p.length; g += 3) { - const v = p[g], - S = p[g + 1], - I = p[g + 2], - E = c[2 * v], - R = c[2 * v + 1]; - (c[2 * S] - E) * (c[2 * I + 1] - R) - (c[2 * S + 1] - R) * (c[2 * I] - E) > 0 ? (f.push(v), f.push(I), f.push(S)) : (f.push(v), f.push(S), f.push(I)) - } - return f - })(this._vertexBuffer, t); - const r = [], - a = t.length; - for (let c = 0; c < a; c += 3) { - const p = [t[c + 0], t[c + 1], t[c + 2]], - f = [this._vertexBuffer[2 * t[c + 0] + 0], this._vertexBuffer[2 * t[c + 0] + 1], this._vertexBuffer[2 * t[c + 1] + 0], this._vertexBuffer[2 * t[c + 1] + 1], this._vertexBuffer[2 * t[c + 2] + 0], this._vertexBuffer[2 * t[c + 2] + 1]]; - let g = 1 / 0, - v = 1 / 0, - S = -1 / 0, - I = -1 / 0; - for (let Z = 0; Z < 3; Z++) { - const Y = f[2 * Z], - ae = f[2 * Z + 1]; - g = Math.min(g, Y), S = Math.max(S, Y), v = Math.min(v, ae), I = Math.max(I, ae) - } - if (g === S || v === I) continue; - const E = Math.floor(g / this._granularityCellSize), - R = Math.ceil(S / this._granularityCellSize), - N = Math.floor(v / this._granularityCellSize), - j = Math.ceil(I / this._granularityCellSize); - if (E !== R || N !== j) - for (let Z = N; Z < j; Z++) { - const Y = this._scanlineGenerateVertexRingForCellRow(Z, f, p); - o0(this._vertexBuffer, Y, r) - } else r.push(...p) - } - return r - } - _scanlineGenerateVertexRingForCellRow(t, r, a) { - const c = t * this._granularityCellSize, - p = c + this._granularityCellSize, - f = []; - for (let g = 0; g < 3; g++) { - const v = r[2 * g], - S = r[2 * g + 1], - I = r[2 * (g + 1) % 6], - E = r[(2 * (g + 1) + 1) % 6], - R = r[2 * (g + 2) % 6], - N = r[(2 * (g + 2) + 1) % 6], - j = I - v, - Z = E - S, - Y = j === 0, - ae = Z === 0, - ze = (c - S) / Z, - me = (p - S) / Z, - be = Math.min(ze, me), - Ve = Math.max(ze, me); - if (!ae && (be >= 1 || Ve <= 0) || ae && (S < c || S > p)) { - E >= c && E <= p && f.push(a[(g + 1) % 3]); - continue - }!ae && be > 0 && f.push(this._vertexToIndex(v + j * be, S + Z * be)); - const rt = v + j * Math.max(be, 0), - St = v + j * Math.min(Ve, 1); - Y || this._generateIntraEdgeVertices(f, v, S, I, E, rt, St), !ae && Ve < 1 && f.push(this._vertexToIndex(v + j * Ve, S + Z * Ve)), (ae || E >= c && E <= p) && f.push(a[(g + 1) % 3]), !ae && (E <= c || E >= p) && this._generateInterEdgeVertices(f, v, S, I, E, R, N, St, c, p) - } - return f - } - _generateIntraEdgeVertices(t, r, a, c, p, f, g) { - const v = c - r, - S = p - a, - I = S === 0, - E = I ? Math.min(r, c) : Math.min(f, g), - R = I ? Math.max(r, c) : Math.max(f, g), - N = Math.floor(E / this._granularityCellSize) + 1, - j = Math.ceil(R / this._granularityCellSize) - 1; - if (I ? r < c : f < g) - for (let Z = N; Z <= j; Z++) { - const Y = Z * this._granularityCellSize; - t.push(this._vertexToIndex(Y, a + S * (Y - r) / v)) - } else - for (let Z = j; Z >= N; Z--) { - const Y = Z * this._granularityCellSize; - t.push(this._vertexToIndex(Y, a + S * (Y - r) / v)) - } - } - _generateInterEdgeVertices(t, r, a, c, p, f, g, v, S, I) { - const E = p - a, - R = f - c, - N = g - p, - j = (S - p) / N, - Z = (I - p) / N, - Y = Math.min(j, Z), - ae = Math.max(j, Z), - ze = c + R * Y; - let me = Math.floor(Math.min(ze, v) / this._granularityCellSize) + 1, - be = Math.ceil(Math.max(ze, v) / this._granularityCellSize) - 1, - Ve = v < ze; - const rt = N === 0; - if (rt && (g === S || g === I)) return; - if (rt || Y >= 1 || ae <= 0) { - const $t = a - g, - Bt = f + (r - f) * Math.min((S - g) / $t, (I - g) / $t); - me = Math.floor(Math.min(Bt, v) / this._granularityCellSize) + 1, be = Math.ceil(Math.max(Bt, v) / this._granularityCellSize) - 1, Ve = v < Bt - } - const St = E > 0 ? I : S; - if (Ve) - for (let $t = me; $t <= be; $t++) t.push(this._vertexToIndex($t * this._granularityCellSize, St)); - else - for (let $t = be; $t >= me; $t--) t.push(this._vertexToIndex($t * this._granularityCellSize, St)) - } - _generateOutline(t) { - const r = []; - for (const a of t) { - const c = Fo(a, this._granularity, !0), - p = this._pointArrayToIndices(c), - f = []; - for (let g = 1; g < p.length; g++) f.push(p[g - 1]), f.push(p[g]); - r.push(f) - } - return r - } - _handlePoles(t) { - let r = !1, - a = !1; - this._canonical && (this._canonical.y === 0 && (r = !0), this._canonical.y === (1 << this._canonical.z) - 1 && (a = !0)), (r || a) && this._fillPoles(t, r, a) - } - _ensureNoPoleVertices() { - const t = this._vertexBuffer; - for (let r = 0; r < t.length; r += 2) { - const a = t[r + 1]; - a === Rl && (t[r + 1] = -32767), a === lu && (t[r + 1] = 32766) - } - } - _generatePoleQuad(t, r, a, c, p, f) { - c > p != (f === Rl) ? (t.push(r), t.push(a), t.push(this._vertexToIndex(c, f)), t.push(a), t.push(this._vertexToIndex(p, f)), t.push(this._vertexToIndex(c, f))) : (t.push(a), t.push(r), t.push(this._vertexToIndex(c, f)), t.push(this._vertexToIndex(p, f)), t.push(a), t.push(this._vertexToIndex(c, f))) - } - _fillPoles(t, r, a) { - const c = this._vertexBuffer, - p = ne, - f = t.length; - for (let g = 2; g < f; g += 3) { - const v = t[g - 2], - S = t[g - 1], - I = t[g], - E = c[2 * v], - R = c[2 * v + 1], - N = c[2 * S], - j = c[2 * S + 1], - Z = c[2 * I], - Y = c[2 * I + 1]; - r && (R === 0 && j === 0 && this._generatePoleQuad(t, v, S, E, N, Rl), j === 0 && Y === 0 && this._generatePoleQuad(t, S, I, N, Z, Rl), Y === 0 && R === 0 && this._generatePoleQuad(t, I, v, Z, E, Rl)), a && (R === p && j === p && this._generatePoleQuad(t, v, S, E, N, lu), j === p && Y === p && this._generatePoleQuad(t, S, I, N, Z, lu), Y === p && R === p && this._generatePoleQuad(t, I, v, Z, E, lu)) - } - } - _initializeVertices(t) { - for (let r = 0; r < t.length; r += 2) this._vertexToIndex(t[r], t[r + 1]) - } - subdividePolygonInternal(t, r) { - if (this._used) throw new Error("Subdivision: multiple use not allowed."); - this._used = !0; - const { - flattened: a, - holeIndices: c - } = (function(g) { - const v = [], - S = []; - for (const I of g) - if (I.length !== 0) { - I !== g[0] && v.push(S.length / 2); - for (let E = 0; E < I.length; E++) S.push(I[E].x), S.push(I[E].y) - } return { - flattened: S, - holeIndices: v - } - })(t); - let p; - this._initializeVertices(a); - try { - const g = (function(S, I, E = 2) { - const R = I && I.length, - N = R ? I[0] * E : S.length; - let j = jm(S, 0, N, E, !0); - const Z = []; - if (!j || j.next === j.prev) return Z; - let Y, ae, ze; - if (R && (j = (function(me, be, Ve, rt) { - const St = []; - for (let $t = 0, Bt = be.length; $t < Bt; $t++) { - const Ut = jm(me, be[$t] * rt, $t < Bt - 1 ? be[$t + 1] * rt : me.length, rt, !1); - Ut === Ut.next && (Ut.steiner = !0), St.push(n0(Ut)) - } - St.sort(t0); - for (let $t = 0; $t < St.length; $t++) Ve = r0(St[$t], Ve); - return Ve - })(S, I, j, E)), S.length > 80 * E) { - Y = S[0], ae = S[1]; - let me = Y, - be = ae; - for (let Ve = E; Ve < N; Ve += E) { - const rt = S[Ve], - St = S[Ve + 1]; - rt < Y && (Y = rt), St < ae && (ae = St), rt > me && (me = rt), St > be && (be = St) - } - ze = Math.max(me - Y, be - ae), ze = ze !== 0 ? 32767 / ze : 0 - } - return nu(j, Z, E, Y, ae, ze, 0), Z - })(a, c), - v = this._convertIndices(a, g); - p = this._subdivideTrianglesScanline(v) - } catch (g) { - console.error(g) - } - let f = []; - return r && (f = this._generateOutline(t)), this._ensureNoPoleVertices(), this._handlePoles(p), { - verticesFlattened: this._vertexBuffer, - indicesTriangles: p, - indicesLineList: f - } - } - _convertIndices(t, r) { - const a = []; - for (let c = 0; c < r.length; c++) a.push(this._vertexToIndex(t[2 * r[c]], t[2 * r[c] + 1])); - return a - } - _pointArrayToIndices(t) { - const r = []; - for (let a = 0; a < t.length; a++) { - const c = t[a]; - r.push(this._vertexToIndex(c.x, c.y)) - } - return r - } - } - - function $m(i, t, r, a = !0) { - return new s0(r, t).subdividePolygonInternal(i, a) - } - - function Fo(i, t, r = !1) { - if (!i || i.length < 1) return []; - if (i.length < 2) return []; - const a = i[0], - c = i[i.length - 1], - p = r && (a.x !== c.x || a.y !== c.y); - if (t < 2) return p ? [...i, i[0]] : [...i]; - const f = Math.floor(ne / t), - g = []; - g.push(new $(i[0].x, i[0].y)); - const v = i.length, - S = p ? v : v - 1; - for (let I = 0; I < S; I++) { - const E = i[I], - R = I < v - 1 ? i[I + 1] : i[0], - N = E.x, - j = E.y, - Z = R.x, - Y = R.y, - ae = N !== Z, - ze = j !== Y; - if (!ae && !ze) continue; - const me = Z - N, - be = Y - j, - Ve = Math.abs(me), - rt = Math.abs(be); - let St = N, - $t = j; - for (;;) { - const Ut = me > 0 ? (Math.floor(St / f) + 1) * f : (Math.ceil(St / f) - 1) * f, - pr = be > 0 ? (Math.floor($t / f) + 1) * f : (Math.ceil($t / f) - 1) * f, - Vt = Math.abs(St - Ut), - Zt = Math.abs($t - pr), - mt = Math.abs(St - Z), - Br = Math.abs($t - Y), - Ur = ae ? Vt / Ve : Number.POSITIVE_INFINITY, - xr = ze ? Zt / rt : Number.POSITIVE_INFINITY; - if ((mt <= Vt || !ae) && (Br <= Zt || !ze)) break; - if (Ur < xr && ae || !ze) { - St = Ut, $t += be * Ur; - const or = new $(St, Math.round($t)); - g[g.length - 1].x === or.x && g[g.length - 1].y === or.y || g.push(or) - } else { - St += me * xr, $t = pr; - const or = new $(Math.round(St), $t); - g[g.length - 1].x === or.x && g[g.length - 1].y === or.y || g.push(or) - } - } - const Bt = new $(Z, Y); - g[g.length - 1].x === Bt.x && g[g.length - 1].y === Bt.y || g.push(Bt) - } - return g - } - - function o0(i, t, r) { - if (t.length === 0) throw new Error("Subdivision vertex ring is empty."); - let a = 0, - c = i[2 * t[0]]; - for (let v = 1; v < t.length; v++) { - const S = i[2 * t[v]]; - S < c && (c = S, a = v) - } - const p = t.length; - let f = a, - g = (f + 1) % p; - for (;;) { - const v = f - 1 >= 0 ? f - 1 : p - 1, - S = (g + 1) % p, - I = i[2 * t[v]], - E = i[2 * t[S]], - R = i[2 * t[f]], - N = i[2 * t[f] + 1], - j = i[2 * t[g] + 1]; - let Z = !1; - if (I < E) Z = !0; - else if (I > E) Z = !1; - else { - const Y = j - N, - ae = -(i[2 * t[g]] - R), - ze = N < j ? 1 : -1; - ((I - R) * Y + (i[2 * t[v] + 1] - N) * ae) * ze > ((E - R) * Y + (i[2 * t[S] + 1] - N) * ae) * ze && (Z = !0) - } - if (Z) { - const Y = t[v], - ae = t[f], - ze = t[g]; - Y !== ae && Y !== ze && ae !== ze && r.push(ze, ae, Y), f--, f < 0 && (f = p - 1) - } else { - const Y = t[S], - ae = t[f], - ze = t[g]; - Y !== ae && Y !== ze && ae !== ze && r.push(ze, ae, Y), g++, g >= p && (g = 0) - } - if (v === S) break - } - } - - function Gm(i, t, r, a, c, p, f, g, v) { - const S = c.length / 2, - I = f && g && v; - if (S < Wr.MAX_VERTEX_ARRAY_LENGTH) { - const E = t.prepareSegment(S, r, a), - R = E.vertexLength; - for (let Z = 0; Z < p.length; Z += 3) a.emplaceBack(R + p[Z], R + p[Z + 1], R + p[Z + 2]); - let N, j; - E.vertexLength += S, E.primitiveLength += p.length / 3, I && (j = f.prepareSegment(S, r, g), N = j.vertexLength, j.vertexLength += S); - for (let Z = 0; Z < c.length; Z += 2) i(c[Z], c[Z + 1]); - if (I) - for (let Z = 0; Z < v.length; Z++) { - const Y = v[Z]; - for (let ae = 1; ae < Y.length; ae += 2) g.emplaceBack(N + Y[ae - 1], N + Y[ae]); - j.primitiveLength += Y.length / 2 - } - } else(function(E, R, N, j, Z, Y) { - const ae = []; - for (let rt = 0; rt < j.length / 2; rt++) ae.push(-1); - const ze = { - count: 0 - }; - let me = 0, - be = E.getOrCreateLatestSegment(R, N), - Ve = be.vertexLength; - for (let rt = 2; rt < Z.length; rt += 3) { - const St = Z[rt - 2], - $t = Z[rt - 1], - Bt = Z[rt]; - let Ut = ae[St] < me, - pr = ae[$t] < me, - Vt = ae[Bt] < me; - be.vertexLength + ((Ut ? 1 : 0) + (pr ? 1 : 0) + (Vt ? 1 : 0)) > Wr.MAX_VERTEX_ARRAY_LENGTH && (be = E.createNewSegment(R, N), me = ze.count, Ut = !0, pr = !0, Vt = !0, Ve = 0); - const Zt = cu(ae, j, Y, ze, St, Ut, be), - mt = cu(ae, j, Y, ze, $t, pr, be), - Br = cu(ae, j, Y, ze, Bt, Vt, be); - N.emplaceBack(Ve + Zt - me, Ve + mt - me, Ve + Br - me), be.primitiveLength++ - } - })(t, r, a, c, p, i), I && (function(E, R, N, j, Z, Y) { - const ae = []; - for (let rt = 0; rt < j.length / 2; rt++) ae.push(-1); - const ze = { - count: 0 - }; - let me = 0, - be = E.getOrCreateLatestSegment(R, N), - Ve = be.vertexLength; - for (let rt = 0; rt < Z.length; rt++) { - const St = Z[rt]; - for (let $t = 1; $t < Z[rt].length; $t += 2) { - const Bt = St[$t - 1], - Ut = St[$t]; - let pr = ae[Bt] < me, - Vt = ae[Ut] < me; - be.vertexLength + ((pr ? 1 : 0) + (Vt ? 1 : 0)) > Wr.MAX_VERTEX_ARRAY_LENGTH && (be = E.createNewSegment(R, N), me = ze.count, pr = !0, Vt = !0, Ve = 0); - const Zt = cu(ae, j, Y, ze, Bt, pr, be), - mt = cu(ae, j, Y, ze, Ut, Vt, be); - N.emplaceBack(Ve + Zt - me, Ve + mt - me), be.primitiveLength++ - } - } - })(f, r, g, c, v, i), t.forceNewSegmentOnNextPrepare(), f == null || f.forceNewSegmentOnNextPrepare() - } - - function cu(i, t, r, a, c, p, f) { - if (p) { - const g = a.count; - return r(t[2 * c], t[2 * c + 1]), i[c] = a.count, a.count++, f.vertexLength++, g - } - return i[c] - } - class Lp { - constructor(t) { - this.zoom = t.zoom, this.globalState = t.globalState, this.overscaling = t.overscaling, this.layers = t.layers, this.layerIds = this.layers.map((r => r.id)), this.index = t.index, this.hasPattern = !1, this.patternFeatures = [], this.layoutVertexArray = new He, this.indexArray = new ki, this.indexArray2 = new Pi, this.programConfigurations = new ia(t.layers, t.zoom), this.segments = new Wr, this.segments2 = new Wr, this.stateDependentLayerIds = this.layers.filter((r => r.isStateDependent())).map((r => r.id)) - } - populate(t, r, a) { - this.hasPattern = Ap("fill", this.layers, r); - const c = this.layers[0].layout.get("fill-sort-key"), - p = !c.isConstant(), - f = []; - for (const { - feature: g, - id: v, - index: S, - sourceLayerIndex: I - } - of t) { - const E = this.layers[0]._featureFilter.needGeometry, - R = Wa(g, E); - if (!this.layers[0]._featureFilter.filter(new Oi(this.zoom, { - globalState: this.globalState - }), R, a)) continue; - const N = p ? c.evaluate(R, {}, a, r.availableImages) : void 0, - j = { - id: v, - properties: g.properties, - type: g.type, - sourceLayerIndex: I, - index: S, - geometry: E ? R.geometry : cs(g), - patterns: {}, - sortKey: N - }; - f.push(j) - } - p && f.sort(((g, v) => g.sortKey - v.sortKey)); - for (const g of f) { - const { - geometry: v, - index: S, - sourceLayerIndex: I - } = g; - if (this.hasPattern) { - const E = kp("fill", this.layers, g, this.zoom, r); - this.patternFeatures.push(E) - } else this.addFeature(g, v, S, a, {}, r.subdivisionGranularity); - r.featureIndex.insert(t[S].feature, v, S, I, this.index) - } - } - update(t, r, a) { - this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(t, r, this.stateDependentLayers, a) - } - addFeatures(t, r, a) { - for (const c of this.patternFeatures) this.addFeature(c, c.geometry, c.index, r, a, 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, Kv), 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, r, a, c, p, f) { - for (const g of xo(r, 500)) { - const v = $m(g, c, f.fill.getGranularityForZoomLevel(c.z)), - S = this.layoutVertexArray; - Gm(((I, E) => { - S.emplaceBack(I, E) - }), this.segments, this.layoutVertexArray, this.indexArray, v.verticesFlattened, v.indicesTriangles, this.segments2, this.indexArray2, v.indicesLineList) - } - this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, t, a, p, c) - } - } - let Hm, Wm; - Kt("FillBucket", Lp, { - omit: ["layers", "patternFeatures"] - }); - var l0 = { - get paint() { - return Wm = Wm || new jn({ - "fill-antialias": new hr(xe.paint_fill["fill-antialias"]), - "fill-opacity": new Rr(xe.paint_fill["fill-opacity"]), - "fill-color": new Rr(xe.paint_fill["fill-color"]), - "fill-outline-color": new Rr(xe.paint_fill["fill-outline-color"]), - "fill-translate": new hr(xe.paint_fill["fill-translate"]), - "fill-translate-anchor": new hr(xe.paint_fill["fill-translate-anchor"]), - "fill-pattern": new Sl(xe.paint_fill["fill-pattern"]) - }) - }, - get layout() { - return Hm = Hm || new jn({ - "fill-sort-key": new Rr(xe.layout_fill["fill-sort-key"]) - }) - } - }; - class c0 extends ha { - constructor(t) { - super(t, l0) - } - recalculate(t, r) { - super.recalculate(t, r); - const a = this.paint._values["fill-outline-color"]; - a.value.kind === "constant" && a.value.value === void 0 && (this.paint._values["fill-outline-color"] = this.paint._values["fill-color"]) - } - createBucket(t) { - return new Lp(t) - } - queryRadius() { - return ad(this.paint.get("fill-translate")) - } - queryIntersectsFeature({ - queryGeometry: t, - geometry: r, - transform: a, - pixelsToTileUnits: c - }) { - return Pm(sd(t, this.paint.get("fill-translate"), this.paint.get("fill-translate-anchor"), -a.bearingInRadians, c), r) - } - isTileClipped() { - return !0 - } - } - const u0 = Hi([{ - name: "a_pos", - components: 2, - type: "Int16" - }, { - name: "a_normal_ed", - components: 4, - type: "Int16" - }], 4), - h0 = Hi([{ - name: "a_centroid", - components: 2, - type: "Int16" - }], 4), - { - members: d0 - } = u0; - class Bl { - constructor(t, r, a, c, p) { - this.properties = {}, this.extent = a, this.type = 0, this.id = void 0, this._pbf = t, this._geometry = -1, this._keys = c, this._values = p, t.readFields(p0, this, r) - } - loadGeometry() { - const t = this._pbf; - t.pos = this._geometry; - const r = t.readVarint() + t.pos, - a = []; - let c, p = 1, - f = 0, - g = 0, - v = 0; - for (; t.pos < r;) { - if (f <= 0) { - const S = t.readVarint(); - p = 7 & S, f = S >> 3 - } - if (f--, p === 1 || p === 2) g += t.readSVarint(), v += t.readSVarint(), p === 1 && (c && a.push(c), c = []), c && c.push(new $(g, v)); - else { - if (p !== 7) throw new Error(`unknown command ${p}`); - c && c.push(c[0].clone()) - } - } - return c && a.push(c), a - } - bbox() { - const t = this._pbf; - t.pos = this._geometry; - const r = t.readVarint() + t.pos; - let a = 1, - c = 0, - p = 0, - f = 0, - g = 1 / 0, - v = -1 / 0, - S = 1 / 0, - I = -1 / 0; - for (; t.pos < r;) { - if (c <= 0) { - const E = t.readVarint(); - a = 7 & E, c = E >> 3 - } - if (c--, a === 1 || a === 2) p += t.readSVarint(), f += t.readSVarint(), p < g && (g = p), p > v && (v = p), f < S && (S = f), f > I && (I = f); - else if (a !== 7) throw new Error(`unknown command ${a}`) - } - return [g, S, v, I] - } - toGeoJSON(t, r, a) { - const c = this.extent * Math.pow(2, a), - p = this.extent * t, - f = this.extent * r, - g = this.loadGeometry(); - - function v(R) { - return [360 * (R.x + p) / c - 180, 360 / Math.PI * Math.atan(Math.exp((1 - 2 * (R.y + f) / c) * Math.PI)) - 90] - } - - function S(R) { - return R.map(v) - } - let I; - if (this.type === 1) { - const R = []; - for (const j of g) R.push(j[0]); - const N = S(R); - I = R.length === 1 ? { - type: "Point", - coordinates: N[0] - } : { - type: "MultiPoint", - coordinates: N - } - } else if (this.type === 2) { - const R = g.map(S); - I = R.length === 1 ? { - type: "LineString", - coordinates: R[0] - } : { - type: "MultiLineString", - coordinates: R - } - } else { - if (this.type !== 3) throw new Error("unknown feature type"); - { - const R = (function(j) { - const Z = j.length; - if (Z <= 1) return [j]; - const Y = []; - let ae, ze; - for (let me = 0; me < Z; me++) { - const be = f0(j[me]); - be !== 0 && (ze === void 0 && (ze = be < 0), ze === be < 0 ? (ae && Y.push(ae), ae = [j[me]]) : ae && ae.push(j[me])) - } - return ae && Y.push(ae), Y - })(g), - N = []; - for (const j of R) N.push(j.map(S)); - I = N.length === 1 ? { - type: "Polygon", - coordinates: N[0] - } : { - type: "MultiPolygon", - coordinates: N - } - } - } - const E = { - type: "Feature", - geometry: I, - properties: this.properties - }; - return this.id != null && (E.id = this.id), E - } - } - - function p0(i, t, r) { - i === 1 ? t.id = r.readVarint() : i === 2 ? (function(a, c) { - const p = a.readVarint() + a.pos; - for (; a.pos < p;) { - const f = c._keys[a.readVarint()], - g = c._values[a.readVarint()]; - c.properties[f] = g - } - })(r, t) : i === 3 ? t.type = r.readVarint() : i === 4 && (t._geometry = r.pos) - } - - function f0(i) { - let t = 0; - for (let r, a, c = 0, p = i.length, f = p - 1; c < p; f = c++) r = i[c], a = i[f], t += (a.x - r.x) * (r.y + a.y); - return t - } - Bl.types = ["Unknown", "Point", "LineString", "Polygon"]; - class Xm { - constructor(t, r) { - this.version = 1, this.name = "", this.extent = 4096, this.length = 0, this._pbf = t, this._keys = [], this._values = [], this._features = [], t.readFields(m0, this, r), 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 r = this._pbf.readVarint() + this._pbf.pos; - return new Bl(this._pbf, r, this.extent, this._keys, this._values) - } - } - - function m0(i, t, r) { - i === 15 ? t.version = r.readVarint() : i === 1 ? t.name = r.readString() : i === 5 ? t.extent = r.readVarint() : i === 2 ? t._features.push(r.pos) : i === 3 ? t._keys.push(r.readString()) : i === 4 && t._values.push((function(a) { - let c = null; - const p = a.readVarint() + a.pos; - for (; a.pos < p;) { - const f = a.readVarint() >> 3; - c = f === 1 ? a.readString() : f === 2 ? a.readFloat() : f === 3 ? a.readDouble() : f === 4 ? a.readVarint64() : f === 5 ? a.readVarint() : f === 6 ? a.readSVarint() : f === 7 ? a.readBoolean() : null - } - if (c == null) throw new Error("unknown feature value"); - return c - })(r)) - } - class Km { - constructor(t, r) { - this.layers = t.readFields(_0, {}, r) - } - } - - function _0(i, t, r) { - if (i === 3) { - const a = new Xm(r, r.readVarint() + r.pos); - a.length && (t[a.name] = a) - } - } - const Dp = Math.pow(2, 13); - - function uu(i, t, r, a, c, p, f, g) { - i.emplaceBack(t, r, 2 * Math.floor(a * Dp) + f, c * Dp * 2, p * Dp * 2, Math.round(g)) - } - class Rp { - constructor(t) { - this.zoom = t.zoom, this.globalState = t.globalState, this.overscaling = t.overscaling, this.layers = t.layers, this.layerIds = this.layers.map((r => r.id)), this.index = t.index, this.hasPattern = !1, this.layoutVertexArray = new je, this.centroidVertexArray = new he, this.indexArray = new ki, this.programConfigurations = new ia(t.layers, t.zoom), this.segments = new Wr, this.stateDependentLayerIds = this.layers.filter((r => r.isStateDependent())).map((r => r.id)) - } - populate(t, r, a) { - this.features = [], this.hasPattern = Ap("fill-extrusion", this.layers, r); - for (const { - feature: c, - id: p, - index: f, - sourceLayerIndex: g - } - of t) { - const v = this.layers[0]._featureFilter.needGeometry, - S = Wa(c, v); - if (!this.layers[0]._featureFilter.filter(new Oi(this.zoom, { - globalState: this.globalState - }), S, a)) continue; - const I = { - id: p, - sourceLayerIndex: g, - index: f, - geometry: v ? S.geometry : cs(c), - properties: c.properties, - type: c.type, - patterns: {} - }; - this.hasPattern ? this.features.push(kp("fill-extrusion", this.layers, I, this.zoom, r)) : this.addFeature(I, I.geometry, f, a, {}, r.subdivisionGranularity), r.featureIndex.insert(c, I.geometry, f, g, this.index, !0) - } - } - addFeatures(t, r, a) { - for (const c of this.features) { - const { - geometry: p - } = c; - this.addFeature(c, p, c.index, r, a, t.subdivisionGranularity) - } - } - update(t, r, a) { - this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(t, r, this.stateDependentLayers, a) - } - 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, d0), this.centroidVertexBuffer = t.createVertexBuffer(this.centroidVertexArray, h0.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, r, a, c, p, f) { - for (const g of xo(r, 500)) { - const v = { - x: 0, - y: 0, - sampleCount: 0 - }, - S = this.layoutVertexArray.length; - this.processPolygon(v, c, t, g, f); - const I = this.layoutVertexArray.length - S, - E = Math.floor(v.x / v.sampleCount), - R = Math.floor(v.y / v.sampleCount); - for (let N = 0; N < I; N++) this.centroidVertexArray.emplaceBack(E, R) - } - this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, t, a, p, c) - } - processPolygon(t, r, a, c, p) { - if (c.length < 1 || Ym(c[0])) return; - for (const E of c) E.length !== 0 && g0(t, E); - const f = { - segment: this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray) - }, - g = p.fill.getGranularityForZoomLevel(r.z), - v = Bl.types[a.type] === "Polygon"; - for (const E of c) { - if (E.length === 0 || Ym(E)) continue; - const R = Fo(E, g, v); - this._generateSideFaces(R, f) - } - if (!v) return; - const S = $m(c, r, g, !1), - I = this.layoutVertexArray; - Gm(((E, R) => { - uu(I, E, R, 0, 0, 1, 1, 0) - }), this.segments, this.layoutVertexArray, this.indexArray, S.verticesFlattened, S.indicesTriangles) - } - _generateSideFaces(t, r) { - let a = 0; - for (let c = 1; c < t.length; c++) { - const p = t[c], - f = t[c - 1]; - if (v0(p, f)) continue; - r.segment.vertexLength + 4 > Wr.MAX_VERTEX_ARRAY_LENGTH && (r.segment = this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray)); - const g = p.sub(f)._perp()._unit(), - v = f.dist(p); - a + v > 32768 && (a = 0), uu(this.layoutVertexArray, p.x, p.y, g.x, g.y, 0, 0, a), uu(this.layoutVertexArray, p.x, p.y, g.x, g.y, 0, 1, a), a += v, uu(this.layoutVertexArray, f.x, f.y, g.x, g.y, 0, 0, a), uu(this.layoutVertexArray, f.x, f.y, g.x, g.y, 0, 1, a); - const S = r.segment.vertexLength; - this.indexArray.emplaceBack(S, S + 2, S + 1), this.indexArray.emplaceBack(S + 1, S + 2, S + 3), r.segment.vertexLength += 4, r.segment.primitiveLength += 2 - } - } - } - - function g0(i, t) { - for (let r = 0; r < t.length; r++) { - const a = t[r]; - r === t.length - 1 && t[0].x === a.x && t[0].y === a.y || (i.x += a.x, i.y += a.y, i.sampleCount++) - } - } - - function v0(i, t) { - return i.x === t.x && (i.x < 0 || i.x > ne) || i.y === t.y && (i.y < 0 || i.y > ne) - } - - function Ym(i) { - return i.every((t => t.x < 0)) || i.every((t => t.x > ne)) || i.every((t => t.y < 0)) || i.every((t => t.y > ne)) - } - let Jm; - Kt("FillExtrusionBucket", Rp, { - omit: ["layers", "features"] - }); - var y0 = { - get paint() { - return Jm = Jm || new jn({ - "fill-extrusion-opacity": new hr(xe["paint_fill-extrusion"]["fill-extrusion-opacity"]), - "fill-extrusion-color": new Rr(xe["paint_fill-extrusion"]["fill-extrusion-color"]), - "fill-extrusion-translate": new hr(xe["paint_fill-extrusion"]["fill-extrusion-translate"]), - "fill-extrusion-translate-anchor": new hr(xe["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]), - "fill-extrusion-pattern": new Sl(xe["paint_fill-extrusion"]["fill-extrusion-pattern"]), - "fill-extrusion-height": new Rr(xe["paint_fill-extrusion"]["fill-extrusion-height"]), - "fill-extrusion-base": new Rr(xe["paint_fill-extrusion"]["fill-extrusion-base"]), - "fill-extrusion-vertical-gradient": new hr(xe["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"]) - }) - } - }; - class x0 extends ha { - constructor(t) { - super(t, y0) - } - createBucket(t) { - return new Rp(t) - } - queryRadius() { - return ad(this.paint.get("fill-extrusion-translate")) - } - is3D() { - return !0 - } - queryIntersectsFeature({ - queryGeometry: t, - feature: r, - featureState: a, - geometry: c, - transform: p, - pixelsToTileUnits: f, - pixelPosMatrix: g - }) { - const v = sd(t, this.paint.get("fill-extrusion-translate"), this.paint.get("fill-extrusion-translate-anchor"), -p.bearingInRadians, f), - S = this.paint.get("fill-extrusion-height").evaluate(r, a), - I = this.paint.get("fill-extrusion-base").evaluate(r, a), - E = (function(N, j) { - const Z = []; - for (const Y of N) { - const ae = [Y.x, Y.y, 0, 1]; - ke(ae, ae, j), Z.push(new $(ae[0] / ae[3], ae[1] / ae[3])) - } - return Z - })(v, g), - R = (function(N, j, Z, Y) { - const ae = [], - ze = [], - me = Y[8] * j, - be = Y[9] * j, - Ve = Y[10] * j, - rt = Y[11] * j, - St = Y[8] * Z, - $t = Y[9] * Z, - Bt = Y[10] * Z, - Ut = Y[11] * Z; - for (const pr of N) { - const Vt = [], - Zt = []; - for (const mt of pr) { - const Br = mt.x, - Ur = mt.y, - xr = Y[0] * Br + Y[4] * Ur + Y[12], - or = Y[1] * Br + Y[5] * Ur + Y[13], - oi = Y[2] * Br + Y[6] * Ur + Y[14], - Zi = Y[3] * Br + Y[7] * Ur + Y[15], - fn = oi + Ve, - Bn = Zi + rt, - Aa = xr + St, - aa = or + $t, - Mn = oi + Bt, - qi = Zi + Ut, - wn = new $((xr + me) / Bn, (or + be) / Bn); - wn.z = fn / Bn, Vt.push(wn); - const An = new $(Aa / qi, aa / qi); - An.z = Mn / qi, Zt.push(An) - } - ae.push(Vt), ze.push(Zt) - } - return [ae, ze] - })(c, I, S, g); - return (function(N, j, Z) { - let Y = 1 / 0; - Pm(Z, j) && (Y = Qm(Z, j[0])); - for (let ae = 0; ae < j.length; ae++) { - const ze = j[ae], - me = N[ae]; - for (let be = 0; be < ze.length - 1; be++) { - const Ve = ze[be], - rt = [Ve, ze[be + 1], me[be + 1], me[be], Ve]; - Sm(Z, rt) && (Y = Math.min(Y, Qm(Z, rt))) - } - } - return Y !== 1 / 0 && Y - })(R[0], R[1], E) - } - } - - function hu(i, t) { - return i.x * t.x + i.y * t.y - } - - function Qm(i, t) { - if (i.length === 1) { - let r = 0; - const a = t[r++]; - let c; - for (; !c || a.equals(c);) - if (c = t[r++], !c) return 1 / 0; - for (; r < t.length; r++) { - const p = t[r], - f = i[0], - g = c.sub(a), - v = p.sub(a), - S = f.sub(a), - I = hu(g, g), - E = hu(g, v), - R = hu(v, v), - N = hu(S, g), - j = hu(S, v), - Z = I * R - E * E, - Y = (R * N - E * j) / Z, - ae = (I * j - E * N) / Z, - ze = a.z * (1 - Y - ae) + c.z * Y + p.z * ae; - if (isFinite(ze)) return ze - } - return 1 / 0 - } { - let r = 1 / 0; - for (const a of t) r = Math.min(r, a.z); - return r - } - } - const b0 = Hi([{ - name: "a_pos_normal", - components: 2, - type: "Int16" - }, { - name: "a_data", - components: 4, - type: "Uint8" - }], 4), - { - members: w0 - } = b0, - T0 = Hi([{ - name: "a_uv_x", - components: 1, - type: "Float32" - }, { - name: "a_split_index", - components: 1, - type: "Float32" - }]), - { - members: C0 - } = T0, - S0 = Math.cos(Math.PI / 180 * 37.5), - e_ = Math.pow(2, 14) / .5; - class Bp { - constructor(t) { - this.zoom = t.zoom, this.globalState = t.globalState, this.overscaling = t.overscaling, this.layers = t.layers, this.layerIds = this.layers.map((r => r.id)), this.index = t.index, this.hasPattern = !1, this.patternFeatures = [], this.lineClipsArray = [], this.gradients = {}, this.layers.forEach((r => { - this.gradients[r.id] = {} - })), this.layoutVertexArray = new qe, this.layoutVertexArray2 = new $e, this.indexArray = new ki, this.programConfigurations = new ia(t.layers, t.zoom), this.segments = new Wr, this.maxLineLength = 0, this.stateDependentLayerIds = this.layers.filter((r => r.isStateDependent())).map((r => r.id)) - } - populate(t, r, a) { - this.hasPattern = Ap("line", this.layers, r); - const c = this.layers[0].layout.get("line-sort-key"), - p = !c.isConstant(), - f = []; - for (const { - feature: g, - id: v, - index: S, - sourceLayerIndex: I - } - of t) { - const E = this.layers[0]._featureFilter.needGeometry, - R = Wa(g, E); - if (!this.layers[0]._featureFilter.filter(new Oi(this.zoom, { - globalState: this.globalState - }), R, a)) continue; - const N = p ? c.evaluate(R, {}, a) : void 0, - j = { - id: v, - properties: g.properties, - type: g.type, - sourceLayerIndex: I, - index: S, - geometry: E ? R.geometry : cs(g), - patterns: {}, - sortKey: N - }; - f.push(j) - } - p && f.sort(((g, v) => g.sortKey - v.sortKey)); - for (const g of f) { - const { - geometry: v, - index: S, - sourceLayerIndex: I - } = g; - if (this.hasPattern) { - const E = kp("line", this.layers, g, this.zoom, r); - this.patternFeatures.push(E) - } else this.addFeature(g, v, S, a, {}, r.subdivisionGranularity); - r.featureIndex.insert(t[S].feature, v, S, I, this.index) - } - } - update(t, r, a) { - this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(t, r, this.stateDependentLayers, a) - } - addFeatures(t, r, a) { - for (const c of this.patternFeatures) this.addFeature(c, c.geometry, c.index, r, a, 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, C0)), this.layoutVertexBuffer = t.createVertexBuffer(this.layoutVertexArray, w0), 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.prototype.hasOwnProperty.call(t.properties, "mapbox_clip_start") && Object.prototype.hasOwnProperty.call(t.properties, "mapbox_clip_end")) return { - start: +t.properties.mapbox_clip_start, - end: +t.properties.mapbox_clip_end - } - } - addFeature(t, r, a, c, p, f) { - const g = this.layers[0].layout, - v = g.get("line-join").evaluate(t, {}), - S = g.get("line-cap"), - I = g.get("line-miter-limit"), - E = g.get("line-round-limit"); - this.lineClips = this.lineFeatureClips(t); - for (const R of r) this.addLine(R, t, v, S, I, E, c, f); - this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, t, a, p, c) - } - addLine(t, r, a, c, p, f, g, v) { - if (this.distance = 0, this.scaledDistance = 0, this.totalDistance = 0, t = Fo(t, g ? v.line.getGranularityForZoomLevel(g.z) : 1), this.lineClips) { - this.lineClipsArray.push(this.lineClips); - for (let me = 0; me < t.length - 1; me++) this.totalDistance += t[me].dist(t[me + 1]); - this.updateScaledDistance(), this.maxLineLength = Math.max(this.maxLineLength, this.totalDistance) - } - const S = Bl.types[r.type] === "Polygon"; - let I = t.length; - for (; I >= 2 && t[I - 1].equals(t[I - 2]);) I--; - let E = 0; - for (; E < I - 1 && t[E].equals(t[E + 1]);) E++; - if (I < (S ? 3 : 2)) return; - a === "bevel" && (p = 1.05); - const R = this.overscaling <= 16 ? 122880 / (512 * this.overscaling) : 0, - N = this.segments.prepareSegment(10 * I, this.layoutVertexArray, this.indexArray); - let j, Z, Y, ae, ze; - this.e1 = this.e2 = -1, S && (j = t[I - 2], ze = t[E].sub(j)._unit()._perp()); - for (let me = E; me < I; me++) { - if (Y = me === I - 1 ? S ? t[E + 1] : void 0 : t[me + 1], Y && t[me].equals(Y)) continue; - ze && (ae = ze), j && (Z = j), j = t[me], ze = Y ? Y.sub(j)._unit()._perp() : ae, ae = ae || ze; - let be = ae.add(ze); - be.x === 0 && be.y === 0 || be._unit(); - const Ve = ae.x * ze.x + ae.y * ze.y, - rt = be.x * ze.x + be.y * ze.y, - St = rt !== 0 ? 1 / rt : 1 / 0, - $t = 2 * Math.sqrt(2 - 2 * rt), - Bt = rt < S0 && Z && Y, - Ut = ae.x * ze.y - ae.y * ze.x > 0; - if (Bt && me > E) { - const Zt = j.dist(Z); - if (Zt > 2 * R) { - const mt = j.sub(j.sub(Z)._mult(R / Zt)._round()); - this.updateDistance(Z, mt), this.addCurrentVertex(mt, ae, 0, 0, N), Z = mt - } - } - const pr = Z && Y; - let Vt = pr ? a : S ? "butt" : c; - if (pr && Vt === "round" && (St < f ? Vt = "miter" : St <= 2 && (Vt = "fakeround")), Vt === "miter" && St > p && (Vt = "bevel"), Vt === "bevel" && (St > 2 && (Vt = "flipbevel"), St < p && (Vt = "miter")), Z && this.updateDistance(Z, j), Vt === "miter") be._mult(St), this.addCurrentVertex(j, be, 0, 0, N); - else if (Vt === "flipbevel") { - if (St > 100) be = ze.mult(-1); - else { - const Zt = St * ae.add(ze).mag() / ae.sub(ze).mag(); - be._perp()._mult(Zt * (Ut ? -1 : 1)) - } - this.addCurrentVertex(j, be, 0, 0, N), this.addCurrentVertex(j, be.mult(-1), 0, 0, N) - } else if (Vt === "bevel" || Vt === "fakeround") { - const Zt = -Math.sqrt(St * St - 1), - mt = Ut ? Zt : 0, - Br = Ut ? 0 : Zt; - if (Z && this.addCurrentVertex(j, ae, mt, Br, N), Vt === "fakeround") { - const Ur = Math.round(180 * $t / Math.PI / 20); - for (let xr = 1; xr < Ur; xr++) { - let or = xr / Ur; - if (or !== .5) { - const Zi = or - .5; - or += or * Zi * (or - 1) * ((1.0904 + Ve * (Ve * (3.55645 - 1.43519 * Ve) - 3.2452)) * Zi * Zi + (.848013 + Ve * (.215638 * Ve - 1.06021))) - } - const oi = ze.sub(ae)._mult(or)._add(ae)._unit()._mult(Ut ? -1 : 1); - this.addHalfVertex(j, oi.x, oi.y, !1, Ut, 0, N) - } - } - Y && this.addCurrentVertex(j, ze, -mt, -Br, N) - } else if (Vt === "butt") this.addCurrentVertex(j, be, 0, 0, N); - else if (Vt === "square") { - const Zt = Z ? 1 : -1; - this.addCurrentVertex(j, be, Zt, Zt, N) - } else Vt === "round" && (Z && (this.addCurrentVertex(j, ae, 0, 0, N), this.addCurrentVertex(j, ae, 1, 1, N, !0)), Y && (this.addCurrentVertex(j, ze, -1, -1, N, !0), this.addCurrentVertex(j, ze, 0, 0, N))); - if (Bt && me < I - 1) { - const Zt = j.dist(Y); - if (Zt > 2 * R) { - const mt = j.add(Y.sub(j)._mult(R / Zt)._round()); - this.updateDistance(j, mt), this.addCurrentVertex(mt, ze, 0, 0, N), j = mt - } - } - } - } - addCurrentVertex(t, r, a, c, p, f = !1) { - const g = r.y * c - r.x, - v = -r.y - r.x * c; - this.addHalfVertex(t, r.x + r.y * a, r.y - r.x * a, f, !1, a, p), this.addHalfVertex(t, g, v, f, !0, -c, p), this.distance > e_ / 2 && this.totalDistance === 0 && (this.distance = 0, this.updateScaledDistance(), this.addCurrentVertex(t, r, a, c, p, f)) - } - addHalfVertex({ - x: t, - y: r - }, a, c, p, f, g, v) { - const S = .5 * (this.lineClips ? this.scaledDistance * (e_ - 1) : this.scaledDistance); - this.layoutVertexArray.emplaceBack((t << 1) + (p ? 1 : 0), (r << 1) + (f ? 1 : 0), Math.round(63 * a) + 128, Math.round(63 * c) + 128, 1 + (g === 0 ? 0 : g < 0 ? -1 : 1) | (63 & S) << 2, S >> 6), this.lineClips && this.layoutVertexArray2.emplaceBack((this.scaledDistance - this.lineClips.start) / (this.lineClips.end - this.lineClips.start), this.lineClipsArray.length); - const I = v.vertexLength++; - this.e1 >= 0 && this.e2 >= 0 && (this.indexArray.emplaceBack(this.e1, I, this.e2), v.primitiveLength++), f ? this.e2 = I : this.e1 = I - } - updateScaledDistance() { - this.scaledDistance = this.lineClips ? this.lineClips.start + (this.lineClips.end - this.lineClips.start) * this.distance / this.totalDistance : this.distance - } - updateDistance(t, r) { - this.distance += t.dist(r), this.updateScaledDistance() - } - } - let t_, r_; - Kt("LineBucket", Bp, { - omit: ["layers", "patternFeatures"] - }); - var i_ = { - get paint() { - return r_ = r_ || new jn({ - "line-opacity": new Rr(xe.paint_line["line-opacity"]), - "line-color": new Rr(xe.paint_line["line-color"]), - "line-translate": new hr(xe.paint_line["line-translate"]), - "line-translate-anchor": new hr(xe.paint_line["line-translate-anchor"]), - "line-width": new Rr(xe.paint_line["line-width"]), - "line-gap-width": new Rr(xe.paint_line["line-gap-width"]), - "line-offset": new Rr(xe.paint_line["line-offset"]), - "line-blur": new Rr(xe.paint_line["line-blur"]), - "line-dasharray": new ns(xe.paint_line["line-dasharray"]), - "line-pattern": new Sl(xe.paint_line["line-pattern"]), - "line-gradient": new Pl(xe.paint_line["line-gradient"]) - }) - }, - get layout() { - return t_ = t_ || new jn({ - "line-cap": new hr(xe.layout_line["line-cap"]), - "line-join": new Rr(xe.layout_line["line-join"]), - "line-miter-limit": new hr(xe.layout_line["line-miter-limit"]), - "line-round-limit": new hr(xe.layout_line["line-round-limit"]), - "line-sort-key": new Rr(xe.layout_line["line-sort-key"]) - }) - } - }; - class P0 extends Rr { - possiblyEvaluate(t, r) { - return r = new Oi(Math.floor(r.zoom), { - now: r.now, - fadeDuration: r.fadeDuration, - zoomHistory: r.zoomHistory, - transition: r.transition - }), super.possiblyEvaluate(t, r) - } - evaluate(t, r, a, c) { - return r = pt({}, r, { - zoom: Math.floor(r.zoom) - }), super.evaluate(t, r, a, c) - } - } - let ud; - class I0 extends ha { - constructor(t) { - super(t, i_), this.gradientVersion = 0, ud || (ud = new P0(i_.paint.properties["line-width"].specification), ud.useIntegerZoom = !0) - } - _handleSpecialPaintPropertyUpdate(t) { - if (t === "line-gradient") { - const r = this.gradientExpression(); - this.stepInterpolant = !!(function(a) { - return a._styleExpression !== void 0 - })(r) && r._styleExpression.expression instanceof Gi, this.gradientVersion = (this.gradientVersion + 1) % Number.MAX_SAFE_INTEGER - } - } - gradientExpression() { - return this._transitionablePaint._values["line-gradient"].value.expression - } - recalculate(t, r) { - super.recalculate(t, r), this.paint._values["line-floorwidth"] = ud.possiblyEvaluate(this._transitioningPaint._values["line-width"].value, t) - } - createBucket(t) { - return new Bp(t) - } - queryRadius(t) { - const r = t, - a = n_(ru("line-width", this, r), ru("line-gap-width", this, r)), - c = ru("line-offset", this, r); - return a / 2 + Math.abs(c) + ad(this.paint.get("line-translate")) - } - queryIntersectsFeature({ - queryGeometry: t, - feature: r, - featureState: a, - geometry: c, - transform: p, - pixelsToTileUnits: f - }) { - const g = sd(t, this.paint.get("line-translate"), this.paint.get("line-translate-anchor"), -p.bearingInRadians, f), - v = f / 2 * n_(this.paint.get("line-width").evaluate(r, a), this.paint.get("line-gap-width").evaluate(r, a)), - S = this.paint.get("line-offset").evaluate(r, a); - return S && (c = (function(I, E) { - const R = []; - for (let N = 0; N < I.length; N++) { - const j = I[N], - Z = []; - for (let Y = 0; Y < j.length; Y++) { - const ae = j[Y - 1], - ze = j[Y], - me = j[Y + 1], - be = Y === 0 ? new $(0, 0) : ze.sub(ae)._unit()._perp(), - Ve = Y === j.length - 1 ? new $(0, 0) : me.sub(ze)._unit()._perp(), - rt = be._add(Ve)._unit(), - St = rt.x * Ve.x + rt.y * Ve.y; - St !== 0 && rt._mult(1 / St), Z.push(rt._mult(E)._add(ze)) - } - R.push(Z) - } - return R - })(c, S * f)), (function(I, E, R) { - for (let N = 0; N < E.length; N++) { - const j = E[N]; - if (I.length >= 3) { - for (let Z = 0; Z < j.length; Z++) - if (zl(I, j[Z])) return !0 - } - if (Ov(I, j, R)) return !0 - } - return !1 - })(g, c, v) - } - isTileClipped() { - return !0 - } - } - - function n_(i, t) { - return t > 0 ? t + 2 * i : i - } - const M0 = Hi([{ - name: "a_pos_offset", - components: 4, - type: "Int16" - }, { - name: "a_data", - components: 4, - type: "Uint16" - }, { - name: "a_pixeloffset", - components: 4, - type: "Int16" - }], 4), - A0 = Hi([{ - name: "a_projected_pos", - components: 3, - type: "Float32" - }], 4); - Hi([{ - name: "a_fade_opacity", - components: 1, - type: "Uint32" - }], 4); - const k0 = Hi([{ - name: "a_placed", - components: 2, - type: "Uint8" - }, { - name: "a_shift", - components: 2, - type: "Float32" - }, { - name: "a_box_real", - components: 2, - type: "Int16" - }]); - Hi([{ - 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 a_ = Hi([{ - name: "a_pos", - components: 2, - type: "Int16" - }, { - name: "a_anchor_pos", - components: 2, - type: "Int16" - }, { - name: "a_extrude", - components: 2, - type: "Int16" - }], 4), - E0 = Hi([{ - name: "a_pos", - components: 2, - type: "Float32" - }, { - name: "a_radius", - components: 1, - type: "Float32" - }, { - name: "a_flags", - components: 2, - type: "Int16" - }], 4); - - function z0(i, t, r) { - return i.sections.forEach((a => { - a.text = (function(c, p, f) { - const g = p.layout.get("text-transform").evaluate(f, {}); - return g === "uppercase" ? c = c.toLocaleUpperCase() : g === "lowercase" && (c = c.toLocaleLowerCase()), Ca.applyArabicShaping && (c = Ca.applyArabicShaping(c)), c - })(a.text, t, r) - })), i - } - Hi([{ - name: "triangle", - components: 3, - type: "Uint16" - }]), Hi([{ - 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" - }]), Hi([{ - 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" - }]), Hi([{ - type: "Float32", - name: "offsetX" - }]), Hi([{ - type: "Int16", - name: "x" - }, { - type: "Int16", - name: "y" - }, { - type: "Int16", - name: "tileUnitDistanceFromAnchor" - }]), Hi([{ - type: "Uint16", - name: "textAnchor" - }, { - type: "Float32", - components: 2, - name: "textOffset" - }]); - const du = { - "!": "︕", - "#": "#", - $: "$", - "%": "%", - "&": "&", - "(": "︵", - ")": "︶", - "*": "*", - "+": "+", - ",": "︐", - "-": "︲", - ".": "・", - "/": "/", - ":": "︓", - ";": "︔", - "<": "︿", - "=": "=", - ">": "﹀", - "?": "︖", - "@": "@", - "[": "﹇", - "\\": "\", - "]": "﹈", - "^": "^", - _: "︳", - "`": "`", - "{": "︷", - "|": "―", - "}": "︸", - "~": "~", - "¢": "¢", - "£": "£", - "¥": "¥", - "¦": "¦", - "¬": "¬", - "¯": " ̄", - "–": "︲", - "—": "︱", - "‘": "﹃", - "’": "﹄", - "“": "﹁", - "”": "﹂", - "…": "︙", - "‧": "・", - "₩": "₩", - "、": "︑", - "。": "︒", - "〈": "︿", - "〉": "﹀", - "《": "︽", - "》": "︾", - "「": "﹁", - "」": "﹂", - "『": "﹃", - "』": "﹄", - "【": "︻", - "】": "︼", - "〔": "︹", - "〕": "︺", - "〖": "︗", - "〗": "︘", - "!": "︕", - "(": "︵", - ")": "︶", - ",": "︐", - "-": "︲", - ".": "・", - ":": "︓", - ";": "︔", - "<": "︿", - ">": "﹀", - "?": "︖", - "[": "﹇", - "]": "﹈", - "_": "︳", - "{": "︷", - "|": "―", - "}": "︸", - "⦅": "︵", - "⦆": "︶", - "。": "︒", - "「": "﹁", - "」": "﹂" - }; - var bn = 24; - const Fp = 4294967296, - s_ = 1 / Fp, - o_ = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8"); - class Op { - 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, r, a = this.length) { - for (; this.pos < a;) { - const c = this.readVarint(), - p = c >> 3, - f = this.pos; - this.type = 7 & c, t(p, r, this), this.pos === f && this.skip(c) - } - return r - } - readMessage(t, r) { - return this.readFields(t, r, 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) * Fp; - return this.pos += 8, t - } - readSFixed64() { - const t = this.dataView.getUint32(this.pos, !0) + this.dataView.getInt32(this.pos + 4, !0) * Fp; - 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 r = this.buf; - let a, c; - return c = r[this.pos++], a = 127 & c, c < 128 ? a : (c = r[this.pos++], a |= (127 & c) << 7, c < 128 ? a : (c = r[this.pos++], a |= (127 & c) << 14, c < 128 ? a : (c = r[this.pos++], a |= (127 & c) << 21, c < 128 ? a : (c = r[this.pos], a |= (15 & c) << 28, (function(p, f, g) { - const v = g.buf; - let S, I; - if (I = v[g.pos++], S = (112 & I) >> 4, I < 128 || (I = v[g.pos++], S |= (127 & I) << 3, I < 128) || (I = v[g.pos++], S |= (127 & I) << 10, I < 128) || (I = v[g.pos++], S |= (127 & I) << 17, I < 128) || (I = v[g.pos++], S |= (127 & I) << 24, I < 128) || (I = v[g.pos++], S |= (1 & I) << 31, I < 128)) return Fl(p, S, f); - throw new Error("Expected varint not more than 10 bytes") - })(a, 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, - r = this.pos; - return this.pos = t, t - r >= 12 && o_ ? o_.decode(this.buf.subarray(r, t)) : (function(a, c, p) { - let f = "", - g = c; - for (; g < p;) { - const v = a[g]; - let S, I, E, R = null, - N = v > 239 ? 4 : v > 223 ? 3 : v > 191 ? 2 : 1; - if (g + N > p) break; - N === 1 ? v < 128 && (R = v) : N === 2 ? (S = a[g + 1], (192 & S) == 128 && (R = (31 & v) << 6 | 63 & S, R <= 127 && (R = null))) : N === 3 ? (S = a[g + 1], I = a[g + 2], (192 & S) == 128 && (192 & I) == 128 && (R = (15 & v) << 12 | (63 & S) << 6 | 63 & I, (R <= 2047 || R >= 55296 && R <= 57343) && (R = null))) : N === 4 && (S = a[g + 1], I = a[g + 2], E = a[g + 3], (192 & S) == 128 && (192 & I) == 128 && (192 & E) == 128 && (R = (15 & v) << 18 | (63 & S) << 12 | (63 & I) << 6 | 63 & E, (R <= 65535 || R >= 1114112) && (R = null))), R === null ? (R = 65533, N = 1) : R > 65535 && (R -= 65536, f += String.fromCharCode(R >>> 10 & 1023 | 55296), R = 56320 | 1023 & R), f += String.fromCharCode(R), g += N - } - return f - })(this.buf, r, t) - } - readBytes() { - const t = this.readVarint() + this.pos, - r = this.buf.subarray(this.pos, t); - return this.pos = t, r - } - readPackedVarint(t = [], r) { - const a = this.readPackedEnd(); - for (; this.pos < a;) t.push(this.readVarint(r)); - return t - } - readPackedSVarint(t = []) { - const r = this.readPackedEnd(); - for (; this.pos < r;) t.push(this.readSVarint()); - return t - } - readPackedBoolean(t = []) { - const r = this.readPackedEnd(); - for (; this.pos < r;) t.push(this.readBoolean()); - return t - } - readPackedFloat(t = []) { - const r = this.readPackedEnd(); - for (; this.pos < r;) t.push(this.readFloat()); - return t - } - readPackedDouble(t = []) { - const r = this.readPackedEnd(); - for (; this.pos < r;) t.push(this.readDouble()); - return t - } - readPackedFixed32(t = []) { - const r = this.readPackedEnd(); - for (; this.pos < r;) t.push(this.readFixed32()); - return t - } - readPackedSFixed32(t = []) { - const r = this.readPackedEnd(); - for (; this.pos < r;) t.push(this.readSFixed32()); - return t - } - readPackedFixed64(t = []) { - const r = this.readPackedEnd(); - for (; this.pos < r;) t.push(this.readFixed64()); - return t - } - readPackedSFixed64(t = []) { - const r = this.readPackedEnd(); - for (; this.pos < r;) t.push(this.readSFixed64()); - return t - } - readPackedEnd() { - return this.type === 2 ? this.readVarint() + this.pos : this.pos + 1 - } - skip(t) { - const r = 7 & t; - if (r === 0) - for (; this.buf[this.pos++] > 127;); - else if (r === 2) this.pos = this.readVarint() + this.pos; - else if (r === 5) this.pos += 4; - else { - if (r !== 1) throw new Error(`Unimplemented type: ${r}`); - this.pos += 8 - } - } - writeTag(t, r) { - this.writeVarint(t << 3 | r) - } - realloc(t) { - let r = this.length || 16; - for (; r < this.pos + t;) r *= 2; - if (r !== this.length) { - const a = new Uint8Array(r); - a.set(this.buf), this.buf = a, this.dataView = new DataView(a.buffer), this.length = r - } - } - 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 * s_), !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 * s_), !0), this.pos += 8 - } - writeVarint(t) { - (t = +t || 0) > 268435455 || t < 0 ? (function(r, a) { - let c, p; - if (r >= 0 ? (c = r % 4294967296 | 0, p = r / 4294967296 | 0) : (c = ~(-r % 4294967296), p = ~(-r / 4294967296), 4294967295 ^ c ? c = c + 1 | 0 : (c = 0, p = p + 1 | 0)), r >= 18446744073709552e3 || r < -18446744073709552e3) throw new Error("Given varint doesn't fit into 10 bytes"); - a.realloc(10), (function(f, g, v) { - v.buf[v.pos++] = 127 & f | 128, f >>>= 7, v.buf[v.pos++] = 127 & f | 128, f >>>= 7, v.buf[v.pos++] = 127 & f | 128, f >>>= 7, v.buf[v.pos++] = 127 & f | 128, v.buf[v.pos] = 127 & (f >>>= 7) - })(c, 0, a), (function(f, g) { - const v = (7 & f) << 4; - g.buf[g.pos++] |= v | ((f >>>= 3) ? 128 : 0), f && (g.buf[g.pos++] = 127 & f | ((f >>>= 7) ? 128 : 0), f && (g.buf[g.pos++] = 127 & f | ((f >>>= 7) ? 128 : 0), f && (g.buf[g.pos++] = 127 & f | ((f >>>= 7) ? 128 : 0), f && (g.buf[g.pos++] = 127 & f | ((f >>>= 7) ? 128 : 0), f && (g.buf[g.pos++] = 127 & f))))) - })(p, a) - })(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 r = this.pos; - this.pos = (function(c, p, f) { - for (let g, v, S = 0; S < p.length; S++) { - if (g = p.charCodeAt(S), g > 55295 && g < 57344) { - if (!v) { - g > 56319 || S + 1 === p.length ? (c[f++] = 239, c[f++] = 191, c[f++] = 189) : v = g; - continue - } - if (g < 56320) { - c[f++] = 239, c[f++] = 191, c[f++] = 189, v = g; - continue - } - g = v - 55296 << 10 | g - 56320 | 65536, v = null - } else v && (c[f++] = 239, c[f++] = 191, c[f++] = 189, v = null); - g < 128 ? c[f++] = g : (g < 2048 ? c[f++] = g >> 6 | 192 : (g < 65536 ? c[f++] = g >> 12 | 224 : (c[f++] = g >> 18 | 240, c[f++] = g >> 12 & 63 | 128), c[f++] = g >> 6 & 63 | 128), c[f++] = 63 & g | 128) - } - return f - })(this.buf, t, this.pos); - const a = this.pos - r; - a >= 128 && l_(r, a, this), this.pos = r - 1, this.writeVarint(a), this.pos += a - } - 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 r = t.length; - this.writeVarint(r), this.realloc(r); - for (let a = 0; a < r; a++) this.buf[this.pos++] = t[a] - } - writeRawMessage(t, r) { - this.pos++; - const a = this.pos; - t(r, this); - const c = this.pos - a; - c >= 128 && l_(a, c, this), this.pos = a - 1, this.writeVarint(c), this.pos += c - } - writeMessage(t, r, a) { - this.writeTag(t, 2), this.writeRawMessage(r, a) - } - writePackedVarint(t, r) { - r.length && this.writeMessage(t, L0, r) - } - writePackedSVarint(t, r) { - r.length && this.writeMessage(t, D0, r) - } - writePackedBoolean(t, r) { - r.length && this.writeMessage(t, F0, r) - } - writePackedFloat(t, r) { - r.length && this.writeMessage(t, R0, r) - } - writePackedDouble(t, r) { - r.length && this.writeMessage(t, B0, r) - } - writePackedFixed32(t, r) { - r.length && this.writeMessage(t, O0, r) - } - writePackedSFixed32(t, r) { - r.length && this.writeMessage(t, N0, r) - } - writePackedFixed64(t, r) { - r.length && this.writeMessage(t, j0, r) - } - writePackedSFixed64(t, r) { - r.length && this.writeMessage(t, q0, r) - } - writeBytesField(t, r) { - this.writeTag(t, 2), this.writeBytes(r) - } - writeFixed32Field(t, r) { - this.writeTag(t, 5), this.writeFixed32(r) - } - writeSFixed32Field(t, r) { - this.writeTag(t, 5), this.writeSFixed32(r) - } - writeFixed64Field(t, r) { - this.writeTag(t, 1), this.writeFixed64(r) - } - writeSFixed64Field(t, r) { - this.writeTag(t, 1), this.writeSFixed64(r) - } - writeVarintField(t, r) { - this.writeTag(t, 0), this.writeVarint(r) - } - writeSVarintField(t, r) { - this.writeTag(t, 0), this.writeSVarint(r) - } - writeStringField(t, r) { - this.writeTag(t, 2), this.writeString(r) - } - writeFloatField(t, r) { - this.writeTag(t, 5), this.writeFloat(r) - } - writeDoubleField(t, r) { - this.writeTag(t, 1), this.writeDouble(r) - } - writeBooleanField(t, r) { - this.writeVarintField(t, +r) - } - } - - function Fl(i, t, r) { - return r ? 4294967296 * t + (i >>> 0) : 4294967296 * (t >>> 0) + (i >>> 0) - } - - function l_(i, t, r) { - const a = t <= 16383 ? 1 : t <= 2097151 ? 2 : t <= 268435455 ? 3 : Math.floor(Math.log(t) / (7 * Math.LN2)); - r.realloc(a); - for (let c = r.pos - 1; c >= i; c--) r.buf[c + a] = r.buf[c] - } - - function L0(i, t) { - for (let r = 0; r < i.length; r++) t.writeVarint(i[r]) - } - - function D0(i, t) { - for (let r = 0; r < i.length; r++) t.writeSVarint(i[r]) - } - - function R0(i, t) { - for (let r = 0; r < i.length; r++) t.writeFloat(i[r]) - } - - function B0(i, t) { - for (let r = 0; r < i.length; r++) t.writeDouble(i[r]) - } - - function F0(i, t) { - for (let r = 0; r < i.length; r++) t.writeBoolean(i[r]) - } - - function O0(i, t) { - for (let r = 0; r < i.length; r++) t.writeFixed32(i[r]) - } - - function N0(i, t) { - for (let r = 0; r < i.length; r++) t.writeSFixed32(i[r]) - } - - function j0(i, t) { - for (let r = 0; r < i.length; r++) t.writeFixed64(i[r]) - } - - function q0(i, t) { - for (let r = 0; r < i.length; r++) t.writeSFixed64(i[r]) - } - - function V0(i, t, r) { - i === 1 && r.readMessage(U0, t) - } - - function U0(i, t, r) { - if (i === 3) { - const { - id: a, - bitmap: c, - width: p, - height: f, - left: g, - top: v, - advance: S - } = r.readMessage(Z0, {}); - t.push({ - id: a, - bitmap: new iu({ - width: p + 6, - height: f + 6 - }, c), - metrics: { - width: p, - height: f, - left: g, - top: v, - advance: S - } - }) - } - } - - function Z0(i, t, r) { - i === 1 ? t.id = r.readVarint() : i === 2 ? t.bitmap = r.readBytes() : i === 3 ? t.width = r.readVarint() : i === 4 ? t.height = r.readVarint() : i === 5 ? t.left = r.readSVarint() : i === 6 ? t.top = r.readSVarint() : i === 7 && (t.advance = r.readVarint()) - } - - function c_(i) { - let t = 0, - r = 0; - for (const f of i) t += f.w * f.h, r = Math.max(r, f.w); - i.sort(((f, g) => g.h - f.h)); - const a = [{ - x: 0, - y: 0, - w: Math.max(Math.ceil(Math.sqrt(t / .95)), r), - h: 1 / 0 - }]; - let c = 0, - p = 0; - for (const f of i) - for (let g = a.length - 1; g >= 0; g--) { - const v = a[g]; - if (!(f.w > v.w || f.h > v.h)) { - if (f.x = v.x, f.y = v.y, p = Math.max(p, f.y + f.h), c = Math.max(c, f.x + f.w), f.w === v.w && f.h === v.h) { - const S = a.pop(); - S && g < a.length && (a[g] = S) - } else f.h === v.h ? (v.x += f.w, v.w -= f.w) : f.w === v.w ? (v.y += f.h, v.h -= f.h) : (a.push({ - x: v.x + f.w, - y: v.y, - w: v.w - f.w, - h: f.h - }), v.y += f.h, v.h -= f.h); - break - } - } - return { - w: c, - h: p, - fill: t / (c * p) || 0 - } - } - class Np { - constructor(t, { - pixelRatio: r, - version: a, - stretchX: c, - stretchY: p, - content: f, - textFitWidth: g, - textFitHeight: v - }) { - this.paddedRect = t, this.pixelRatio = r, this.stretchX = c, this.stretchY = p, this.content = f, this.version = a, this.textFitWidth = g, this.textFitHeight = v - } - get 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 u_ { - constructor(t, r) { - const a = {}, - c = {}; - this.haveRenderCallbacks = []; - const p = []; - this.addImages(t, a, p), this.addImages(r, c, p); - const { - w: f, - h: g - } = c_(p), v = new na({ - width: f || 1, - height: g || 1 - }); - for (const S in t) { - const I = t[S], - E = a[S].paddedRect; - na.copy(I.data, v, { - x: 0, - y: 0 - }, { - x: E.x + 1, - y: E.y + 1 - }, I.data) - } - for (const S in r) { - const I = r[S], - E = c[S].paddedRect, - R = E.x + 1, - N = E.y + 1, - j = I.data.width, - Z = I.data.height; - na.copy(I.data, v, { - x: 0, - y: 0 - }, { - x: R, - y: N - }, I.data), na.copy(I.data, v, { - x: 0, - y: Z - 1 - }, { - x: R, - y: N - 1 - }, { - width: j, - height: 1 - }), na.copy(I.data, v, { - x: 0, - y: 0 - }, { - x: R, - y: N + Z - }, { - width: j, - height: 1 - }), na.copy(I.data, v, { - x: j - 1, - y: 0 - }, { - x: R - 1, - y: N - }, { - width: 1, - height: Z - }), na.copy(I.data, v, { - x: 0, - y: 0 - }, { - x: R + j, - y: N - }, { - width: 1, - height: Z - }) - } - this.image = v, this.iconPositions = a, this.patternPositions = c - } - addImages(t, r, a) { - for (const c in t) { - const p = t[c], - f = { - x: 0, - y: 0, - w: p.data.width + 2, - h: p.data.height + 2 - }; - a.push(f), r[c] = new Np(f, p), p.hasRenderCallback && this.haveRenderCallbacks.push(c) - } - } - patchUpdatedImages(t, r) { - t.dispatchRenderCallbacks(this.haveRenderCallbacks); - for (const a in t.updatedImages) this.patchUpdatedImage(this.iconPositions[a], t.getImage(a), r), this.patchUpdatedImage(this.patternPositions[a], t.getImage(a), r) - } - patchUpdatedImage(t, r, a) { - if (!t || !r || t.version === r.version) return; - t.version = r.version; - const [c, p] = t.tl; - a.update(r.data, void 0, { - x: c, - y: p - }) - } - } - var eo; - Kt("ImagePosition", Np), Kt("ImageAtlas", u_), T.ao = void 0, (eo = T.ao || (T.ao = {}))[eo.none = 0] = "none", eo[eo.horizontal = 1] = "horizontal", eo[eo.vertical = 2] = "vertical", eo[eo.horizontalOnly = 3] = "horizontalOnly"; - class pu { - constructor() { - this.scale = 1, this.fontStack = "", this.imageName = null, this.verticalAlign = "bottom" - } - static forText(t, r, a) { - const c = new pu; - return c.scale = t || 1, c.fontStack = r, c.verticalAlign = a || "bottom", c - } - static forImage(t, r) { - const a = new pu; - return a.imageName = t, a.verticalAlign = r || "bottom", a - } - } - class Ol { - constructor() { - this.text = "", this.sectionIndex = [], this.sections = [], this.imageSectionID = null - } - static fromFeature(t, r) { - const a = new Ol; - for (let c = 0; c < t.sections.length; c++) { - const p = t.sections[c]; - p.image ? a.addImageSection(p) : a.addTextSection(p, r) - } - return a - } - length() { - return this.text.length - } - getSection(t) { - return this.sections[this.sectionIndex[t]] - } - getSectionIndex(t) { - return this.sectionIndex[t] - } - getCharCode(t) { - return this.text.charCodeAt(t) - } - verticalizePunctuation() { - this.text = (function(t) { - let r = ""; - for (let a = 0; a < t.length; a++) { - const c = t.charCodeAt(a + 1) || null, - p = t.charCodeAt(a - 1) || null; - r += c && Kh(c) && !du[t[a + 1]] || p && Kh(p) && !du[t[a - 1]] || !du[t[a]] ? t[a] : du[t[a]] - } - return r - })(this.text) - } - trim() { - let t = 0; - for (let a = 0; a < this.text.length && dd[this.text.charCodeAt(a)]; a++) t++; - let r = this.text.length; - for (let a = this.text.length - 1; a >= 0 && a >= t && dd[this.text.charCodeAt(a)]; a--) r--; - this.text = this.text.substring(t, r), this.sectionIndex = this.sectionIndex.slice(t, r) - } - substring(t, r) { - const a = new Ol; - return a.text = this.text.substring(t, r), a.sectionIndex = this.sectionIndex.slice(t, r), a.sections = this.sections, a - } - toString() { - return this.text - } - getMaxScale() { - return this.sectionIndex.reduce(((t, r) => Math.max(t, this.sections[r].scale)), 0) - } - getMaxImageSize(t) { - let r = 0, - a = 0; - for (let c = 0; c < this.length(); c++) { - const p = this.getSection(c); - if (p.imageName) { - const f = t[p.imageName]; - if (!f) continue; - const g = f.displaySize; - r = Math.max(r, g[0]), a = Math.max(a, g[1]) - } - } - return { - maxImageWidth: r, - maxImageHeight: a - } - } - addTextSection(t, r) { - this.text += t.text, this.sections.push(pu.forText(t.scale, t.fontStack || r, t.verticalAlign)); - const a = this.sections.length - 1; - for (let c = 0; c < t.text.length; ++c) this.sectionIndex.push(a) - } - addImageSection(t) { - const r = t.image ? t.image.name : ""; - if (r.length === 0) return void Lt("Can't add FormattedSection with an empty image."); - const a = this.getNextImageSectionCharCode(); - a ? (this.text += String.fromCharCode(a), this.sections.push(pu.forImage(r, t.verticalAlign)), this.sectionIndex.push(this.sections.length - 1)) : Lt("Reached maximum number of images 6401") - } - getNextImageSectionCharCode() { - return this.imageSectionID ? this.imageSectionID >= 63743 ? null : ++this.imageSectionID : (this.imageSectionID = 57344, this.imageSectionID) - } - } - - function hd(i, t, r, a, c, p, f, g, v, S, I, E, R, N, j) { - const Z = Ol.fromFeature(i, c); - let Y; - E === T.ao.vertical && Z.verticalizePunctuation(); - const { - processBidirectionalText: ae, - processStyledBidirectionalText: ze - } = Ca; - if (ae && Z.sections.length === 1) { - Y = []; - const Ve = ae(Z.toString(), jp(Z, S, p, t, a, N)); - for (const rt of Ve) { - const St = new Ol; - St.text = rt, St.sections = Z.sections; - for (let $t = 0; $t < rt.length; $t++) St.sectionIndex.push(0); - Y.push(St) - } - } else if (ze) { - Y = []; - const Ve = ze(Z.text, Z.sectionIndex, jp(Z, S, p, t, a, N)); - for (const rt of Ve) { - const St = new Ol; - St.text = rt[0], St.sectionIndex = rt[1], St.sections = Z.sections, Y.push(St) - } - } else Y = (function(Ve, rt) { - const St = [], - $t = Ve.text; - let Bt = 0; - for (const Ut of rt) St.push(Ve.substring(Bt, Ut)), Bt = Ut; - return Bt < $t.length && St.push(Ve.substring(Bt, $t.length)), St - })(Z, jp(Z, S, p, t, a, N)); - const me = [], - be = { - positionedLines: me, - text: Z.toString(), - top: I[1], - bottom: I[1], - left: I[0], - right: I[0], - writingMode: E, - iconsInText: !1, - verticalizable: !1 - }; - return (function(Ve, rt, St, $t, Bt, Ut, pr, Vt, Zt, mt, Br, Ur) { - let xr = 0, - or = 0, - oi = 0, - Zi = 0; - const fn = Vt === "right" ? 1 : Vt === "left" ? 0 : .5, - Bn = bn / Ur; - let Aa = 0; - for (const qi of Bt) { - qi.trim(); - const wn = qi.getMaxScale(), - An = { - positionedGlyphs: [], - lineOffset: 0 - }; - Ve.positionedLines[Aa] = An; - const kn = An.positionedGlyphs; - let Yn = 0; - if (!qi.length()) { - or += Ut, ++Aa; - continue - } - const ka = W0($t, qi, Bn); - for (let sa = 0; sa < qi.length(); sa++) { - const mn = qi.getSection(sa), - Cn = qi.getSectionIndex(sa), - Sn = qi.getCharCode(sa), - rn = X0(Zt, Br, Sn); - let Bi; - if (mn.imageName) { - if (Ve.iconsInText = !0, mn.scale = mn.scale * Bn, Bi = Y0(mn, rn, wn, ka, $t), !Bi) continue; - Yn = Math.max(Yn, Bi.imageOffset) - } else if (Bi = K0(mn, Sn, rn, ka, rt, St), !Bi) continue; - const { - rect: Xa, - metrics: Vl, - baselineOffset: Ka - } = Bi; - kn.push({ - glyph: Sn, - imageName: mn.imageName, - x: xr, - y: or + Ka + -17, - vertical: rn, - scale: mn.scale, - fontStack: mn.fontStack, - sectionIndex: Cn, - metrics: Vl, - rect: Xa - }), rn ? (Ve.verticalizable = !0, xr += (mn.imageName ? Vl.advance : bn) * mn.scale + mt) : xr += Vl.advance * mn.scale + mt - } - kn.length !== 0 && (oi = Math.max(xr - mt, oi), J0(kn, 0, kn.length - 1, fn)), xr = 0, An.lineOffset = Math.max(Yn, (wn - 1) * bn); - const Tn = Ut * wn + Yn; - or += Tn, Zi = Math.max(Tn, Zi), ++Aa - } - const { - horizontalAlign: aa, - verticalAlign: Mn - } = qp(pr); - (function(qi, wn, An, kn, Yn, ka, Tn, sa, mn) { - const Cn = (wn - An) * Yn; - let Sn = 0; - Sn = ka !== Tn ? -sa * kn - -17 : -kn * mn * Tn + .5 * Tn; - for (const rn of qi) - for (const Bi of rn.positionedGlyphs) Bi.x += Cn, Bi.y += Sn - })(Ve.positionedLines, fn, aa, Mn, oi, Zi, Ut, or, Bt.length), Ve.top += -Mn * or, Ve.bottom = Ve.top + or, Ve.left += -aa * oi, Ve.right = Ve.left + oi - })(be, t, r, a, Y, f, g, v, E, S, R, j), !(function(Ve) { - for (const rt of Ve) - if (rt.positionedGlyphs.length !== 0) return !1; - return !0 - })(me) && be - } - const dd = { - 9: !0, - 10: !0, - 11: !0, - 12: !0, - 13: !0, - 32: !0 - }, - $0 = { - 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 - }, - G0 = { - 40: !0 - }; - - function h_(i, t, r, a, c, p) { - if (t.imageName) { - const f = a[t.imageName]; - return f ? f.displaySize[0] * t.scale * bn / p + c : 0 - } { - const f = r[t.fontStack], - g = f && f[i]; - return g ? g.metrics.advance * t.scale + c : 0 - } - } - - function d_(i, t, r, a) { - const c = Math.pow(i - t, 2); - return a ? i < t ? c / 2 : 2 * c : c + Math.abs(r) * r - } - - function H0(i, t, r) { - let a = 0; - return i === 10 && (a -= 1e4), r && (a += 150), i !== 40 && i !== 65288 || (a += 50), t !== 41 && t !== 65289 || (a += 50), a - } - - function p_(i, t, r, a, c, p) { - let f = null, - g = d_(t, r, c, p); - for (const v of a) { - const S = d_(t - v.x, r, c, p) + v.badness; - S <= g && (f = v, g = S) - } - return { - index: i, - x: t, - priorBreak: f, - badness: g - } - } - - function f_(i) { - return i ? f_(i.priorBreak).concat(i.index) : [] - } - - function jp(i, t, r, a, c, p) { - if (!i) return []; - const f = [], - g = (function(E, R, N, j, Z, Y) { - let ae = 0; - for (let ze = 0; ze < E.length(); ze++) { - const me = E.getSection(ze); - ae += h_(E.getCharCode(ze), me, j, Z, R, Y) - } - return ae / Math.max(1, Math.ceil(ae / N)) - })(i, t, r, a, c, p), - v = i.text.indexOf("​") >= 0; - let S = 0; - for (let E = 0; E < i.length(); E++) { - const R = i.getSection(E), - N = i.getCharCode(E); - if (dd[N] || (S += h_(N, R, a, c, t, p)), E < i.length() - 1) { - const j = !((I = N) < 11904) && (!!si["CJK Compatibility Forms"](I) || !!si["CJK Compatibility"](I) || !!si["CJK Strokes"](I) || !!si["CJK Symbols and Punctuation"](I) || !!si["Enclosed CJK Letters and Months"](I) || !!si["Halfwidth and Fullwidth Forms"](I) || !!si["Ideographic Description Characters"](I) || !!si["Vertical Forms"](I) || $c.test(String.fromCodePoint(I))); - ($0[N] || j || R.imageName || E !== i.length() - 2 && G0[i.getCharCode(E + 1)]) && f.push(p_(E + 1, S, g, f, H0(N, i.getCharCode(E + 1), j && v), !1)) - } - } - var I; - return f_(p_(i.length(), S, g, f, 0, !0)) - } - - function qp(i) { - let t = .5, - r = .5; - switch (i) { - case "right": - case "top-right": - case "bottom-right": - t = 1; - break; - case "left": - case "top-left": - case "bottom-left": - t = 0 - } - switch (i) { - case "bottom": - case "bottom-right": - case "bottom-left": - r = 1; - break; - case "top": - case "top-right": - case "top-left": - r = 0 - } - return { - horizontalAlign: t, - verticalAlign: r - } - } - - function W0(i, t, r) { - const a = t.getMaxScale() * bn, - { - maxImageWidth: c, - maxImageHeight: p - } = t.getMaxImageSize(i), - f = Math.max(a, p * r); - return { - verticalLineContentWidth: Math.max(a, c * r), - horizontalLineContentHeight: f - } - } - - function m_(i) { - switch (i) { - case "top": - return 0; - case "center": - return .5; - default: - return 1 - } - } - - function X0(i, t, r) { - return !(i === T.ao.horizontal || !t && !Gc(r) || t && (dd[r] || (a = r, new RegExp("\\p{sc=Arab}", "u").test(String.fromCodePoint(a))))); - var a - } - - function K0(i, t, r, a, c, p) { - const f = p[i.fontStack], - g = (function(S, I, E, R) { - if (S && S.rect) return S; - const N = I[E.fontStack], - j = N && N[R]; - return j ? { - rect: null, - metrics: j.metrics - } : null - })(f && f[t], c, i, t); - if (g === null) return null; - let v; - if (r) v = a.verticalLineContentWidth - i.scale * bn; - else { - const S = m_(i.verticalAlign); - v = (a.horizontalLineContentHeight - i.scale * bn) * S - } - return { - rect: g.rect, - metrics: g.metrics, - baselineOffset: v - } - } - - function Y0(i, t, r, a, c) { - const p = c[i.imageName]; - if (!p) return null; - const f = p.paddedRect, - g = p.displaySize, - v = { - width: g[0], - height: g[1], - left: 1, - top: -3, - advance: t ? g[1] : g[0] - }; - let S; - if (t) S = a.verticalLineContentWidth - g[1] * i.scale; - else { - const I = m_(i.verticalAlign); - S = (a.horizontalLineContentHeight - g[1] * i.scale) * I - } - return { - rect: f, - metrics: v, - baselineOffset: S, - imageOffset: (t ? g[0] : g[1]) * i.scale - bn * r - } - } - - function J0(i, t, r, a) { - if (a === 0) return; - const c = i[r], - p = (i[r].x + c.metrics.advance * c.scale) * a; - for (let f = t; f <= r; f++) i[f].x -= p - } - - function Q0(i, t, r) { - const { - horizontalAlign: a, - verticalAlign: c - } = qp(r), p = t[0] - i.displaySize[0] * a, f = t[1] - i.displaySize[1] * c; - return { - image: i, - top: f, - bottom: f + i.displaySize[1], - left: p, - right: p + i.displaySize[0] - } - } - - function __(i) { - var t, r; - let a = i.left, - c = i.top, - p = i.right - a, - f = i.bottom - c; - const g = (t = i.image.textFitWidth) !== null && t !== void 0 ? t : "stretchOrShrink", - v = (r = i.image.textFitHeight) !== null && r !== void 0 ? r : "stretchOrShrink", - S = (i.image.content[2] - i.image.content[0]) / (i.image.content[3] - i.image.content[1]); - if (v === "proportional") { - if (g === "stretchOnly" && p / f < S || g === "proportional") { - const I = Math.ceil(f * S); - a *= I / p, p = I - } - } else if (g === "proportional" && v === "stretchOnly" && S !== 0 && p / f > S) { - const I = Math.ceil(p / S); - c *= I / f, f = I - } - return { - x1: a, - y1: c, - x2: a + p, - y2: c + f - } - } - - function g_(i, t, r, a, c, p) { - const f = i.image; - let g; - if (f.content) { - const Y = f.content, - ae = f.pixelRatio || 1; - g = [Y[0] / ae, Y[1] / ae, f.displaySize[0] - Y[2] / ae, f.displaySize[1] - Y[3] / ae] - } - const v = t.left * p, - S = t.right * p; - let I, E, R, N; - r === "width" || r === "both" ? (N = c[0] + v - a[3], E = c[0] + S + a[1]) : (N = c[0] + (v + S - f.displaySize[0]) / 2, E = N + f.displaySize[0]); - const j = t.top * p, - Z = t.bottom * p; - return r === "height" || r === "both" ? (I = c[1] + j - a[0], R = c[1] + Z + a[2]) : (I = c[1] + (j + Z - f.displaySize[1]) / 2, R = I + f.displaySize[1]), { - image: f, - top: I, - right: E, - bottom: R, - left: N, - collisionPadding: g - } - } - const As = 128, - to = 32640; - - function v_(i, t) { - const { - expression: r - } = t; - if (r.kind === "constant") return { - kind: "constant", - layoutSize: r.evaluate(new Oi(i + 1)) - }; - if (r.kind === "source") return { - kind: "source" - }; - { - const { - zoomStops: a, - interpolationType: c - } = r; - let p = 0; - for (; p < a.length && a[p] <= i;) p++; - p = Math.max(0, p - 1); - let f = p; - for (; f < a.length && a[f] < i + 1;) f++; - f = Math.min(a.length - 1, f); - const g = a[p], - v = a[f]; - return r.kind === "composite" ? { - kind: "composite", - minZoom: g, - maxZoom: v, - interpolationType: c - } : { - kind: "camera", - minZoom: g, - maxZoom: v, - minSize: r.evaluate(new Oi(g)), - maxSize: r.evaluate(new Oi(v)), - interpolationType: c - } - } - } - - function Vp(i, t, r) { - let a = "never"; - const c = i.get(t); - return c ? a = c : i.get(r) && (a = "always"), a - } - const ey = [{ - name: "a_fade_opacity", - components: 1, - type: "Uint8", - offset: 0 - }]; - - function pd(i, t, r, a, c, p, f, g, v, S, I, E, R) { - const N = g ? Math.min(to, Math.round(g[0])) : 0, - j = g ? Math.min(to, Math.round(g[1])) : 0; - i.emplaceBack(t, r, Math.round(32 * a), Math.round(32 * c), p, f, (N << 1) + (v ? 1 : 0), j, 16 * S, 16 * I, 256 * E, 256 * R) - } - - function Up(i, t, r) { - i.emplaceBack(t.x, t.y, r), i.emplaceBack(t.x, t.y, r), i.emplaceBack(t.x, t.y, r), i.emplaceBack(t.x, t.y, r) - } - - function ty(i) { - for (const t of i.sections) - if (Qh(t.text)) return !0; - return !1 - } - class Zp { - constructor(t) { - this.layoutVertexArray = new Nt, this.indexArray = new ki, this.programConfigurations = t, this.segments = new Wr, this.dynamicLayoutVertexArray = new yt, this.opacityVertexArray = new sr, this.hasVisibleVertices = !1, this.placedSymbolArray = new U - } - isEmpty() { - return this.layoutVertexArray.length === 0 && this.indexArray.length === 0 && this.dynamicLayoutVertexArray.length === 0 && this.opacityVertexArray.length === 0 - } - upload(t, r, a, c) { - this.isEmpty() || (a && (this.layoutVertexBuffer = t.createVertexBuffer(this.layoutVertexArray, M0.members), this.indexBuffer = t.createIndexBuffer(this.indexArray, r), this.dynamicLayoutVertexBuffer = t.createVertexBuffer(this.dynamicLayoutVertexArray, A0.members, !0), this.opacityVertexBuffer = t.createVertexBuffer(this.opacityVertexArray, ey, !0), this.opacityVertexBuffer.itemSize = 1), (a || c) && 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()) - } - } - Kt("SymbolBuffers", Zp); - class $p { - constructor(t, r, a) { - this.layoutVertexArray = new t, this.layoutAttributes = r, this.indexArray = new a, this.segments = new Wr, this.collisionVertexArray = new xi - } - upload(t) { - this.layoutVertexBuffer = t.createVertexBuffer(this.layoutVertexArray, this.layoutAttributes), this.indexBuffer = t.createIndexBuffer(this.indexArray), this.collisionVertexBuffer = t.createVertexBuffer(this.collisionVertexArray, k0.members, !0) - } - destroy() { - this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.segments.destroy(), this.collisionVertexBuffer.destroy()) - } - } - Kt("CollisionBuffers", $p); - class Nl { - constructor(t) { - this.collisionBoxArray = t.collisionBoxArray, this.zoom = t.zoom, this.globalState = t.globalState, this.overscaling = t.overscaling, this.layers = t.layers, this.layerIds = this.layers.map((f => f.id)), this.index = t.index, this.pixelRatio = t.pixelRatio, this.sourceLayerIndex = t.sourceLayerIndex, this.hasPattern = !1, this.hasRTLText = !1, this.sortKeyRanges = [], this.collisionCircleArray = []; - const r = this.layers[0]._unevaluatedLayout._values; - this.textSizeData = v_(this.zoom, r["text-size"]), this.iconSizeData = v_(this.zoom, r["icon-size"]); - const a = this.layers[0].layout, - c = a.get("symbol-sort-key"), - p = a.get("symbol-z-order"); - this.canOverlap = Vp(a, "text-overlap", "text-allow-overlap") !== "never" || Vp(a, "icon-overlap", "icon-allow-overlap") !== "never" || a.get("text-ignore-placement") || a.get("icon-ignore-placement"), this.sortFeaturesByKey = p !== "viewport-y" && !c.isConstant(), this.sortFeaturesByY = (p === "viewport-y" || p === "auto" && !this.sortFeaturesByKey) && this.canOverlap, a.get("symbol-placement") === "point" && (this.writingModes = a.get("text-writing-mode").map((f => T.ao[f]))), this.stateDependentLayerIds = this.layers.filter((f => f.isStateDependent())).map((f => f.id)), this.sourceID = t.sourceID - } - createArrays() { - this.text = new Zp(new ia(this.layers, this.zoom, (t => /^text/.test(t)))), this.icon = new Zp(new ia(this.layers, this.zoom, (t => /^icon/.test(t)))), this.glyphOffsetArray = new re, this.lineVertexArray = new se, this.symbolInstances = new J, this.textAnchorOffsets = new ue - } - calculateGlyphDependencies(t, r, a, c, p) { - for (let f = 0; f < t.length; f++) - if (r[t.charCodeAt(f)] = !0, (a || c) && p) { - const g = du[t.charAt(f)]; - g && (r[g.charCodeAt(0)] = !0) - } - } - populate(t, r, a) { - const c = this.layers[0], - p = c.layout, - f = p.get("text-font"), - g = p.get("text-field"), - v = p.get("icon-image"), - S = (g.value.kind !== "constant" || g.value.value instanceof ln && !g.value.value.isEmpty() || g.value.value.toString().length > 0) && (f.value.kind !== "constant" || f.value.value.length > 0), - I = v.value.kind !== "constant" || !!v.value.value || Object.keys(v.parameters).length > 0, - E = p.get("symbol-sort-key"); - if (this.features = [], !S && !I) return; - const R = r.iconDependencies, - N = r.glyphDependencies, - j = r.availableImages, - Z = new Oi(this.zoom, { - globalState: this.globalState - }); - for (const { - feature: Y, - id: ae, - index: ze, - sourceLayerIndex: me - } - of t) { - const be = c._featureFilter.needGeometry, - Ve = Wa(Y, be); - if (!c._featureFilter.filter(Z, Ve, a)) continue; - let rt, St; - if (be || (Ve.geometry = cs(Y)), S) { - const Bt = c.getValueAndResolveTokens("text-field", Ve, a, j), - Ut = ln.factory(Bt), - pr = this.hasRTLText = this.hasRTLText || ty(Ut); - (!pr || Ca.getRTLTextPluginStatus() === "unavailable" || pr && Ca.isParsed()) && (rt = z0(Ut, c, Ve)) - } - if (I) { - const Bt = c.getValueAndResolveTokens("icon-image", Ve, a, j); - St = Bt instanceof Nn ? Bt : Nn.fromString(Bt) - } - if (!rt && !St) continue; - const $t = this.sortFeaturesByKey ? E.evaluate(Ve, {}, a) : void 0; - if (this.features.push({ - id: ae, - text: rt, - icon: St, - index: ze, - sourceLayerIndex: me, - geometry: Ve.geometry, - properties: Y.properties, - type: Bl.types[Y.type], - sortKey: $t - }), St && (R[St.name] = !0), rt) { - const Bt = f.evaluate(Ve, {}, a).join(","), - Ut = p.get("text-rotation-alignment") !== "viewport" && p.get("symbol-placement") !== "point"; - this.allowVerticalPlacement = this.writingModes && this.writingModes.indexOf(T.ao.vertical) >= 0; - for (const pr of rt.sections) - if (pr.image) R[pr.image.name] = !0; - else { - const Vt = wl(rt.toString()), - Zt = pr.fontStack || Bt, - mt = N[Zt] = N[Zt] || {}; - this.calculateGlyphDependencies(pr.text, mt, Ut, this.allowVerticalPlacement, Vt) - } - } - } - p.get("symbol-placement") === "line" && (this.features = (function(Y) { - const ae = {}, - ze = {}, - me = []; - let be = 0; - - function Ve(Bt) { - me.push(Y[Bt]), be++ - } - - function rt(Bt, Ut, pr) { - const Vt = ze[Bt]; - return delete ze[Bt], ze[Ut] = Vt, me[Vt].geometry[0].pop(), me[Vt].geometry[0] = me[Vt].geometry[0].concat(pr[0]), Vt - } - - function St(Bt, Ut, pr) { - const Vt = ae[Ut]; - return delete ae[Ut], ae[Bt] = Vt, me[Vt].geometry[0].shift(), me[Vt].geometry[0] = pr[0].concat(me[Vt].geometry[0]), Vt - } - - function $t(Bt, Ut, pr) { - const Vt = pr ? Ut[0][Ut[0].length - 1] : Ut[0][0]; - return `${Bt}:${Vt.x}:${Vt.y}` - } - for (let Bt = 0; Bt < Y.length; Bt++) { - const Ut = Y[Bt], - pr = Ut.geometry, - Vt = Ut.text ? Ut.text.toString() : null; - if (!Vt) { - Ve(Bt); - continue - } - const Zt = $t(Vt, pr), - mt = $t(Vt, pr, !0); - if (Zt in ze && mt in ae && ze[Zt] !== ae[mt]) { - const Br = St(Zt, mt, pr), - Ur = rt(Zt, mt, me[Br].geometry); - delete ae[Zt], delete ze[mt], ze[$t(Vt, me[Ur].geometry, !0)] = Ur, me[Br].geometry = null - } else Zt in ze ? rt(Zt, mt, pr) : mt in ae ? St(Zt, mt, pr) : (Ve(Bt), ae[Zt] = be - 1, ze[mt] = be - 1) - } - return me.filter((Bt => Bt.geometry)) - })(this.features)), this.sortFeaturesByKey && this.features.sort(((Y, ae) => Y.sortKey - ae.sortKey)) - } - update(t, r, a) { - this.stateDependentLayers.length && (this.text.programConfigurations.updatePaintArrays(t, r, this.layers, a), this.icon.programConfigurations.updatePaintArrays(t, r, this.layers, a)) - } - 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, r) { - const a = this.lineVertexArray.length; - if (t.segment !== void 0) { - let c = t.dist(r[t.segment + 1]), - p = t.dist(r[t.segment]); - const f = {}; - for (let g = t.segment + 1; g < r.length; g++) f[g] = { - x: r[g].x, - y: r[g].y, - tileUnitDistanceFromAnchor: c - }, g < r.length - 1 && (c += r[g + 1].dist(r[g])); - for (let g = t.segment || 0; g >= 0; g--) f[g] = { - x: r[g].x, - y: r[g].y, - tileUnitDistanceFromAnchor: p - }, g > 0 && (p += r[g - 1].dist(r[g])); - for (let g = 0; g < r.length; g++) { - const v = f[g]; - this.lineVertexArray.emplaceBack(v.x, v.y, v.tileUnitDistanceFromAnchor) - } - } - return { - lineStartIndex: a, - lineLength: this.lineVertexArray.length - a - } - } - addSymbols(t, r, a, c, p, f, g, v, S, I, E, R) { - const N = t.indexArray, - j = t.layoutVertexArray, - Z = t.segments.prepareSegment(4 * r.length, j, N, this.canOverlap ? f.sortKey : void 0), - Y = this.glyphOffsetArray.length, - ae = Z.vertexLength, - ze = this.allowVerticalPlacement && g === T.ao.vertical ? Math.PI / 2 : 0, - me = f.text && f.text.sections; - for (let be = 0; be < r.length; be++) { - const { - tl: Ve, - tr: rt, - bl: St, - br: $t, - tex: Bt, - pixelOffsetTL: Ut, - pixelOffsetBR: pr, - minFontScaleX: Vt, - minFontScaleY: Zt, - glyphOffset: mt, - isSDF: Br, - sectionIndex: Ur - } = r[be], xr = Z.vertexLength, or = mt[1]; - pd(j, v.x, v.y, Ve.x, or + Ve.y, Bt.x, Bt.y, a, Br, Ut.x, Ut.y, Vt, Zt), pd(j, v.x, v.y, rt.x, or + rt.y, Bt.x + Bt.w, Bt.y, a, Br, pr.x, Ut.y, Vt, Zt), pd(j, v.x, v.y, St.x, or + St.y, Bt.x, Bt.y + Bt.h, a, Br, Ut.x, pr.y, Vt, Zt), pd(j, v.x, v.y, $t.x, or + $t.y, Bt.x + Bt.w, Bt.y + Bt.h, a, Br, pr.x, pr.y, Vt, Zt), Up(t.dynamicLayoutVertexArray, v, ze), N.emplaceBack(xr, xr + 2, xr + 1), N.emplaceBack(xr + 1, xr + 2, xr + 3), Z.vertexLength += 4, Z.primitiveLength += 2, this.glyphOffsetArray.emplaceBack(mt[0]), be !== r.length - 1 && Ur === r[be + 1].sectionIndex || t.programConfigurations.populatePaintArrays(j.length, f, f.index, {}, R, me && me[Ur]) - } - t.placedSymbolArray.emplaceBack(v.x, v.y, Y, this.glyphOffsetArray.length - Y, ae, S, I, v.segment, a ? a[0] : 0, a ? a[1] : 0, c[0], c[1], g, 0, !1, 0, E) - } - _addCollisionDebugVertex(t, r, a, c, p, f) { - return r.emplaceBack(0, 0), t.emplaceBack(a.x, a.y, c, p, Math.round(f.x), Math.round(f.y)) - } - addCollisionDebugVertices(t, r, a, c, p, f, g) { - const v = p.segments.prepareSegment(4, p.layoutVertexArray, p.indexArray), - S = v.vertexLength, - I = p.layoutVertexArray, - E = p.collisionVertexArray, - R = g.anchorX, - N = g.anchorY; - this._addCollisionDebugVertex(I, E, f, R, N, new $(t, r)), this._addCollisionDebugVertex(I, E, f, R, N, new $(a, r)), this._addCollisionDebugVertex(I, E, f, R, N, new $(a, c)), this._addCollisionDebugVertex(I, E, f, R, N, new $(t, c)), v.vertexLength += 4; - const j = p.indexArray; - j.emplaceBack(S, S + 1), j.emplaceBack(S + 1, S + 2), j.emplaceBack(S + 2, S + 3), j.emplaceBack(S + 3, S), v.primitiveLength += 4 - } - addDebugCollisionBoxes(t, r, a, c) { - for (let p = t; p < r; p++) { - const f = this.collisionBoxArray.get(p); - this.addCollisionDebugVertices(f.x1, f.y1, f.x2, f.y2, c ? this.textCollisionBox : this.iconCollisionBox, f.anchorPoint, a) - } - } - generateCollisionDebugBuffers() { - this.hasDebugData() && this.destroyDebugData(), this.textCollisionBox = new $p(Xr, a_.members, Pi), this.iconCollisionBox = new $p(Xr, a_.members, Pi); - for (let t = 0; t < this.symbolInstances.length; t++) { - const r = this.symbolInstances.get(t); - this.addDebugCollisionBoxes(r.textBoxStartIndex, r.textBoxEndIndex, r, !0), this.addDebugCollisionBoxes(r.verticalTextBoxStartIndex, r.verticalTextBoxEndIndex, r, !0), this.addDebugCollisionBoxes(r.iconBoxStartIndex, r.iconBoxEndIndex, r, !1), this.addDebugCollisionBoxes(r.verticalIconBoxStartIndex, r.verticalIconBoxEndIndex, r, !1) - } - } - _deserializeCollisionBoxesForSymbol(t, r, a, c, p, f, g, v, S) { - const I = {}; - for (let E = r; E < a; E++) { - const R = t.get(E); - I.textBox = { - x1: R.x1, - y1: R.y1, - x2: R.x2, - y2: R.y2, - anchorPointX: R.anchorPointX, - anchorPointY: R.anchorPointY - }, I.textFeatureIndex = R.featureIndex; - break - } - for (let E = c; E < p; E++) { - const R = t.get(E); - I.verticalTextBox = { - x1: R.x1, - y1: R.y1, - x2: R.x2, - y2: R.y2, - anchorPointX: R.anchorPointX, - anchorPointY: R.anchorPointY - }, I.verticalTextFeatureIndex = R.featureIndex; - break - } - for (let E = f; E < g; E++) { - const R = t.get(E); - I.iconBox = { - x1: R.x1, - y1: R.y1, - x2: R.x2, - y2: R.y2, - anchorPointX: R.anchorPointX, - anchorPointY: R.anchorPointY - }, I.iconFeatureIndex = R.featureIndex; - break - } - for (let E = v; E < S; E++) { - const R = t.get(E); - I.verticalIconBox = { - x1: R.x1, - y1: R.y1, - x2: R.x2, - y2: R.y2, - anchorPointX: R.anchorPointX, - anchorPointY: R.anchorPointY - }, I.verticalIconFeatureIndex = R.featureIndex; - break - } - return I - } - deserializeCollisionBoxes(t) { - this.collisionArrays = []; - for (let r = 0; r < this.symbolInstances.length; r++) { - const a = this.symbolInstances.get(r); - this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t, a.textBoxStartIndex, a.textBoxEndIndex, a.verticalTextBoxStartIndex, a.verticalTextBoxEndIndex, a.iconBoxStartIndex, a.iconBoxEndIndex, a.verticalIconBoxStartIndex, a.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, r) { - const a = t.placedSymbolArray.get(r), - c = a.vertexStartIndex + 4 * a.numGlyphs; - for (let p = a.vertexStartIndex; p < c; p += 4) t.indexArray.emplaceBack(p, p + 2, p + 1), t.indexArray.emplaceBack(p + 1, p + 2, p + 3) - } - getSortedSymbolIndexes(t) { - if (this.sortedAngle === t && this.symbolInstanceIndexes !== void 0) return this.symbolInstanceIndexes; - const r = Math.sin(t), - a = Math.cos(t), - c = [], - p = [], - f = []; - for (let g = 0; g < this.symbolInstances.length; ++g) { - f.push(g); - const v = this.symbolInstances.get(g); - c.push(0 | Math.round(r * v.anchorX + a * v.anchorY)), p.push(v.featureIndex) - } - return f.sort(((g, v) => c[g] - c[v] || p[v] - p[g])), f - } - addToSortKeyRanges(t, r) { - const a = this.sortKeyRanges[this.sortKeyRanges.length - 1]; - a && a.sortKey === r ? a.symbolInstanceEnd = t + 1 : this.sortKeyRanges.push({ - sortKey: r, - 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 r of this.symbolInstanceIndexes) { - const a = this.symbolInstances.get(r); - this.featureSortOrder.push(a.featureIndex), [a.rightJustifiedTextSymbolIndex, a.centerJustifiedTextSymbolIndex, a.leftJustifiedTextSymbolIndex].forEach(((c, p, f) => { - c >= 0 && f.indexOf(c) === p && this.addIndicesForPlacedSymbol(this.text, c) - })), a.verticalPlacedTextSymbolIndex >= 0 && this.addIndicesForPlacedSymbol(this.text, a.verticalPlacedTextSymbolIndex), a.placedIconSymbolIndex >= 0 && this.addIndicesForPlacedSymbol(this.icon, a.placedIconSymbolIndex), a.verticalPlacedIconSymbolIndex >= 0 && this.addIndicesForPlacedSymbol(this.icon, a.verticalPlacedIconSymbolIndex) - } - this.text.indexBuffer && this.text.indexBuffer.updateData(this.text.indexArray), this.icon.indexBuffer && this.icon.indexBuffer.updateData(this.icon.indexArray) - } - } - } - let y_, x_; - Kt("SymbolBucket", Nl, { - omit: ["layers", "collisionBoxArray", "features", "compareText"] - }), Nl.MAX_GLYPHS = 65535, Nl.addDynamicAttributes = Up; - var Gp = { - get paint() { - return x_ = x_ || new jn({ - "icon-opacity": new Rr(xe.paint_symbol["icon-opacity"]), - "icon-color": new Rr(xe.paint_symbol["icon-color"]), - "icon-halo-color": new Rr(xe.paint_symbol["icon-halo-color"]), - "icon-halo-width": new Rr(xe.paint_symbol["icon-halo-width"]), - "icon-halo-blur": new Rr(xe.paint_symbol["icon-halo-blur"]), - "icon-translate": new hr(xe.paint_symbol["icon-translate"]), - "icon-translate-anchor": new hr(xe.paint_symbol["icon-translate-anchor"]), - "text-opacity": new Rr(xe.paint_symbol["text-opacity"]), - "text-color": new Rr(xe.paint_symbol["text-color"], { - runtimeType: Dr, - getOverride: i => i.textColor, - hasOverride: i => !!i.textColor - }), - "text-halo-color": new Rr(xe.paint_symbol["text-halo-color"]), - "text-halo-width": new Rr(xe.paint_symbol["text-halo-width"]), - "text-halo-blur": new Rr(xe.paint_symbol["text-halo-blur"]), - "text-translate": new hr(xe.paint_symbol["text-translate"]), - "text-translate-anchor": new hr(xe.paint_symbol["text-translate-anchor"]) - }) - }, - get layout() { - return y_ = y_ || new jn({ - "symbol-placement": new hr(xe.layout_symbol["symbol-placement"]), - "symbol-spacing": new hr(xe.layout_symbol["symbol-spacing"]), - "symbol-avoid-edges": new hr(xe.layout_symbol["symbol-avoid-edges"]), - "symbol-sort-key": new Rr(xe.layout_symbol["symbol-sort-key"]), - "symbol-z-order": new hr(xe.layout_symbol["symbol-z-order"]), - "icon-allow-overlap": new hr(xe.layout_symbol["icon-allow-overlap"]), - "icon-overlap": new hr(xe.layout_symbol["icon-overlap"]), - "icon-ignore-placement": new hr(xe.layout_symbol["icon-ignore-placement"]), - "icon-optional": new hr(xe.layout_symbol["icon-optional"]), - "icon-rotation-alignment": new hr(xe.layout_symbol["icon-rotation-alignment"]), - "icon-size": new Rr(xe.layout_symbol["icon-size"]), - "icon-text-fit": new hr(xe.layout_symbol["icon-text-fit"]), - "icon-text-fit-padding": new hr(xe.layout_symbol["icon-text-fit-padding"]), - "icon-image": new Rr(xe.layout_symbol["icon-image"]), - "icon-rotate": new Rr(xe.layout_symbol["icon-rotate"]), - "icon-padding": new Rr(xe.layout_symbol["icon-padding"]), - "icon-keep-upright": new hr(xe.layout_symbol["icon-keep-upright"]), - "icon-offset": new Rr(xe.layout_symbol["icon-offset"]), - "icon-anchor": new Rr(xe.layout_symbol["icon-anchor"]), - "icon-pitch-alignment": new hr(xe.layout_symbol["icon-pitch-alignment"]), - "text-pitch-alignment": new hr(xe.layout_symbol["text-pitch-alignment"]), - "text-rotation-alignment": new hr(xe.layout_symbol["text-rotation-alignment"]), - "text-field": new Rr(xe.layout_symbol["text-field"]), - "text-font": new Rr(xe.layout_symbol["text-font"]), - "text-size": new Rr(xe.layout_symbol["text-size"]), - "text-max-width": new Rr(xe.layout_symbol["text-max-width"]), - "text-line-height": new hr(xe.layout_symbol["text-line-height"]), - "text-letter-spacing": new Rr(xe.layout_symbol["text-letter-spacing"]), - "text-justify": new Rr(xe.layout_symbol["text-justify"]), - "text-radial-offset": new Rr(xe.layout_symbol["text-radial-offset"]), - "text-variable-anchor": new hr(xe.layout_symbol["text-variable-anchor"]), - "text-variable-anchor-offset": new Rr(xe.layout_symbol["text-variable-anchor-offset"]), - "text-anchor": new Rr(xe.layout_symbol["text-anchor"]), - "text-max-angle": new hr(xe.layout_symbol["text-max-angle"]), - "text-writing-mode": new hr(xe.layout_symbol["text-writing-mode"]), - "text-rotate": new Rr(xe.layout_symbol["text-rotate"]), - "text-padding": new hr(xe.layout_symbol["text-padding"]), - "text-keep-upright": new hr(xe.layout_symbol["text-keep-upright"]), - "text-transform": new Rr(xe.layout_symbol["text-transform"]), - "text-offset": new Rr(xe.layout_symbol["text-offset"]), - "text-allow-overlap": new hr(xe.layout_symbol["text-allow-overlap"]), - "text-overlap": new hr(xe.layout_symbol["text-overlap"]), - "text-ignore-placement": new hr(xe.layout_symbol["text-ignore-placement"]), - "text-optional": new hr(xe.layout_symbol["text-optional"]) - }) - } - }; - class b_ { - 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 : Mt, this.defaultValue = t - } - evaluate(t) { - if (t.formattedSection) { - const r = this.defaultValue.property.overrides; - if (r && r.hasOverride(t.formattedSection)) return r.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 - } - } - Kt("FormatSectionOverride", b_, { - omit: ["defaultValue"] - }); - class fd extends ha { - constructor(t) { - super(t, Gp) - } - recalculate(t, r) { - if (super.recalculate(t, r), 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 a = this.layout.get("text-writing-mode"); - if (a) { - const c = []; - for (const p of a) c.indexOf(p) < 0 && c.push(p); - this.layout._values["text-writing-mode"] = c - } else this.layout._values["text-writing-mode"] = ["horizontal"] - } - this._setPaintOverrides() - } - getValueAndResolveTokens(t, r, a, c) { - const p = this.layout.get(t).evaluate(r, {}, a, c), - f = this._unevaluatedLayout._values[t]; - return f.isDataDriven() || fl(f.value) || !p ? p : (function(g, v) { - return v.replace(/{([^{}]+)}/g, ((S, I) => g && I in g ? String(g[I]) : "")) - })(r.properties, p) - } - createBucket(t) { - return new Nl(t) - } - queryRadius() { - return 0 - } - queryIntersectsFeature() { - throw new Error("Should take a different path in FeatureIndex") - } - _setPaintOverrides() { - for (const t of Gp.paint.overridableProperties) { - if (!fd.hasPaintOverride(this.layout, t)) continue; - const r = this.paint.get(t), - a = new b_(r), - c = new Lc(a, r.property.specification); - let p = null; - p = r.value.kind === "constant" || r.value.kind === "source" ? new So("source", c) : new Dc("composite", c, r.value.zoomStops), this.paint._values[t] = new Na(r.property, p, r.parameters) - } - } - _handleOverridablePaintPropertyUpdate(t, r, a) { - return !(!this.layout || r.isDataDriven() || a.isDataDriven()) && fd.hasPaintOverride(this.layout, t) - } - static hasPaintOverride(t, r) { - const a = t.get("text-field"), - c = Gp.paint.properties[r]; - let p = !1; - const f = g => { - for (const v of g) - if (c.overrides && c.overrides.hasOverride(v)) return void(p = !0) - }; - if (a.value.kind === "constant" && a.value.value instanceof ln) f(a.value.value.sections); - else if (a.value.kind === "source") { - const g = S => { - p || (S instanceof ga && wr(S.value) === Si ? f(S.value.sections) : S instanceof ms ? f(S.sections) : S.eachChild(g)) - }, - v = a.value; - v._styleExpression && g(v._styleExpression.expression) - } - return p - } - } - let w_; - var ry = { - get paint() { - return w_ = w_ || new jn({ - "background-color": new hr(xe.paint_background["background-color"]), - "background-pattern": new ns(xe.paint_background["background-pattern"]), - "background-opacity": new hr(xe.paint_background["background-opacity"]) - }) - } - }; - class iy extends ha { - constructor(t) { - super(t, ry) - } - } - let T_; - var ny = { - get paint() { - return T_ = T_ || new jn({ - "raster-opacity": new hr(xe.paint_raster["raster-opacity"]), - "raster-hue-rotate": new hr(xe.paint_raster["raster-hue-rotate"]), - "raster-brightness-min": new hr(xe.paint_raster["raster-brightness-min"]), - "raster-brightness-max": new hr(xe.paint_raster["raster-brightness-max"]), - "raster-saturation": new hr(xe.paint_raster["raster-saturation"]), - "raster-contrast": new hr(xe.paint_raster["raster-contrast"]), - "raster-resampling": new hr(xe.paint_raster["raster-resampling"]), - "raster-fade-duration": new hr(xe.paint_raster["raster-fade-duration"]) - }) - } - }; - class ay extends ha { - constructor(t) { - super(t, ny) - } - } - class sy extends ha { - constructor(t) { - super(t, {}), this.onAdd = r => { - this.implementation.onAdd && this.implementation.onAdd(r, r.painter.context.gl) - }, this.onRemove = r => { - this.implementation.onRemove && this.implementation.onRemove(r, r.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 oy { - constructor(t) { - this._methodToThrottle = t, this._triggered = !1, typeof MessageChannel < "u" && (this._channel = new MessageChannel, this._channel.port2.onmessage = () => { - this._triggered = !1, this._methodToThrottle() - }) - } - trigger() { - this._triggered || (this._triggered = !0, this._channel ? this._channel.port1.postMessage(!0) : setTimeout((() => { - this._triggered = !1, this._methodToThrottle() - }), 0)) - } - remove() { - delete this._channel, this._methodToThrottle = () => {} - } - } - const ly = { - once: !0 - }, - Hp = 63710088e-1; - class ro { - constructor(t, r) { - if (isNaN(t) || isNaN(r)) throw new Error(`Invalid LngLat object: (${t}, ${r})`); - if (this.lng = +t, this.lat = +r, this.lat > 90 || this.lat < -90) throw new Error("Invalid LngLat latitude value: must be between -90 and 90") - } - wrap() { - return new ro(tt(this.lng, -180, 180), this.lat) - } - toArray() { - return [this.lng, this.lat] - } - toString() { - return `LngLat(${this.lng}, ${this.lat})` - } - distanceTo(t) { - const r = Math.PI / 180, - a = this.lat * r, - c = t.lat * r, - p = Math.sin(a) * Math.sin(c) + Math.cos(a) * Math.cos(c) * Math.cos((t.lng - this.lng) * r); - return Hp * Math.acos(Math.min(p, 1)) - } - static convert(t) { - if (t instanceof ro) return t; - if (Array.isArray(t) && (t.length === 2 || t.length === 3)) return new ro(Number(t[0]), Number(t[1])); - if (!Array.isArray(t) && typeof t == "object" && t !== null) return new ro(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: , lat: }, an object {lon: , lat: }, or an array of [, ]") - } - } - const C_ = 2 * Math.PI * Hp; - - function S_(i) { - return C_ * Math.cos(i * Math.PI / 180) - } - - function P_(i) { - return (180 + i) / 360 - } - - function I_(i) { - return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + i * Math.PI / 360))) / 360 - } - - function M_(i, t) { - return i / S_(t) - } - - function Wp(i) { - return 360 / Math.PI * Math.atan(Math.exp((180 - 360 * i) * Math.PI / 180)) - 90 - } - - function A_(i, t) { - return i * S_(Wp(t)) - } - class fu { - constructor(t, r, a = 0) { - this.x = +t, this.y = +r, this.z = +a - } - static fromLngLat(t, r = 0) { - const a = ro.convert(t); - return new fu(P_(a.lng), I_(a.lat), M_(r, a.lat)) - } - toLngLat() { - return new ro(360 * this.x - 180, Wp(this.y)) - } - toAltitude() { - return A_(this.z, this.y) - } - meterInMercatorCoordinateUnits() { - return 1 / C_ * (t = Wp(this.y), 1 / Math.cos(t * Math.PI / 180)); - var t - } - } - - function k_(i, t, r) { - var a = 2 * Math.PI * 6378137 / 256 / Math.pow(2, r); - return [i * a - 2 * Math.PI * 6378137 / 2, t * a - 2 * Math.PI * 6378137 / 2] - } - class Xp { - constructor(t, r, a) { - if (!(function(c, p, f) { - return !(c < 0 || c > 25 || f < 0 || f >= Math.pow(2, c) || p < 0 || p >= Math.pow(2, c)) - })(t, r, a)) throw new Error(`x=${r}, y=${a}, 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 = r, this.y = a, this.key = jl(0, t, t, r, a) - } - equals(t) { - return this.z === t.z && this.x === t.x && this.y === t.y - } - url(t, r, a) { - const c = (f = this.y, g = this.z, v = k_(256 * (p = this.x), 256 * (f = Math.pow(2, g) - f - 1), g), S = k_(256 * (p + 1), 256 * (f + 1), g), v[0] + "," + v[1] + "," + S[0] + "," + S[1]); - var p, f, g, v, S; - const I = (function(E, R, N) { - let j, Z = ""; - for (let Y = E; Y > 0; Y--) j = 1 << Y - 1, Z += (R & j ? 1 : 0) + (N & j ? 2 : 0); - return Z - })(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(a === "tms" ? Math.pow(2, this.z) - this.y - 1 : this.y)).replace(/{ratio}/g, r > 1 ? "@2x" : "").replace(/{quadkey}/g, I).replace(/{bbox-epsg-3857}/g, c) - } - isChildOf(t) { - const r = this.z - t.z; - return r > 0 && t.x === this.x >> r && t.y === this.y >> r - } - getTilePoint(t) { - const r = Math.pow(2, this.z); - return new $((t.x * r - this.x) * ne, (t.y * r - this.y) * ne) - } - toString() { - return `${this.z}/${this.x}/${this.y}` - } - } - class E_ { - constructor(t, r) { - this.wrap = t, this.canonical = r, this.key = jl(t, r.z, r.z, r.x, r.y) - } - } - class Ma { - constructor(t, r, a, c, p) { - if (this.terrainRttPosMatrix32f = null, t < a) throw new Error(`overscaledZ should be >= z; overscaledZ = ${t}; z = ${a}`); - this.overscaledZ = t, this.wrap = r, this.canonical = new Xp(a, +c, +p), this.key = jl(r, t, a, c, p) - } - clone() { - return new Ma(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 r = this.canonical.z - t; - return t > this.canonical.z ? new Ma(t, this.wrap, this.canonical.z, this.canonical.x, this.canonical.y) : new Ma(t, this.wrap, t, this.canonical.x >> r, this.canonical.y >> r) - } - calculateScaledKey(t, r) { - if (t > this.overscaledZ) throw new Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`); - const a = this.canonical.z - t; - return t > this.canonical.z ? jl(this.wrap * +r, t, this.canonical.z, this.canonical.x, this.canonical.y) : jl(this.wrap * +r, t, t, this.canonical.x >> a, this.canonical.y >> a) - } - isChildOf(t) { - if (t.wrap !== this.wrap) return !1; - const r = this.canonical.z - t.canonical.z; - return t.overscaledZ === 0 || t.overscaledZ < this.overscaledZ && t.canonical.x === this.canonical.x >> r && t.canonical.y === this.canonical.y >> r - } - children(t) { - if (this.overscaledZ >= t) return [new Ma(this.overscaledZ + 1, this.wrap, this.canonical.z, this.canonical.x, this.canonical.y)]; - const r = this.canonical.z + 1, - a = 2 * this.canonical.x, - c = 2 * this.canonical.y; - return [new Ma(r, this.wrap, r, a, c), new Ma(r, this.wrap, r, a + 1, c), new Ma(r, this.wrap, r, a, c + 1), new Ma(r, this.wrap, r, a + 1, c + 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 Ma(this.overscaledZ, 0, this.canonical.z, this.canonical.x, this.canonical.y) - } - unwrapTo(t) { - return new Ma(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 E_(this.wrap, this.canonical) - } - toString() { - return `${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}` - } - getTilePoint(t) { - return this.canonical.getTilePoint(new fu(t.x - this.wrap, t.y)) - } - } - - function jl(i, t, r, a, c) { - (i *= 2) < 0 && (i = -1 * i - 1); - const p = 1 << r; - return (p * p * i + p * c + a).toString(36) + r.toString(36) + t.toString(36) - } - - function mu(i, t) { - return t ? i.properties[t] : i.id - } - Kt("CanonicalTileID", Xp), Kt("OverscaledTileID", Ma, { - omit: ["terrainRttPosMatrix32f"] - }); - class Oo { - 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 r = new Oo; - return r.extend(t(new $(this.minX, this.minY))), r.extend(t(new $(this.maxX, this.minY))), r.extend(t(new $(this.minX, this.maxY))), r.extend(t(new $(this.maxX, this.maxY))), r - } - static fromPoints(t) { - const r = new Oo; - for (const a of t) r.extend(a); - return r - } - 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 z_ { - constructor(t) { - this._stringToNumber = {}, this._numberToString = []; - for (let r = 0; r < t.length; r++) { - const a = t[r]; - this._stringToNumber[a] = r, this._numberToString[r] = a - } - } - 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 L_ { - constructor(t, r, a, c, p) { - this.type = "Feature", this._vectorTileFeature = t, t._z = r, t._x = a, t._y = c, this.properties = t.properties, this.id = p - } - get geometry() { - return this._geometry === void 0 && (this._geometry = this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x, this._vectorTileFeature._y, this._vectorTileFeature._z).geometry), this._geometry - } - set geometry(t) { - this._geometry = t - } - toJSON() { - const t = { - geometry: this.geometry - }; - for (const r in this) r !== "_geometry" && r !== "_vectorTileFeature" && (t[r] = this[r]); - return t - } - } - class D_ { - constructor(t, r) { - this.tileID = t, this.x = t.canonical.x, this.y = t.canonical.y, this.z = t.canonical.z, this.grid = new zo(ne, 16, 0), this.grid3D = new zo(ne, 16, 0), this.featureIndexArray = new Te, this.promoteId = r - } - insert(t, r, a, c, p, f) { - const g = this.featureIndexArray.length; - this.featureIndexArray.emplaceBack(a, c, p); - const v = f ? this.grid3D : this.grid; - for (let S = 0; S < r.length; S++) { - const I = r[S], - E = [1 / 0, 1 / 0, -1 / 0, -1 / 0]; - for (let R = 0; R < I.length; R++) { - const N = I[R]; - E[0] = Math.min(E[0], N.x), E[1] = Math.min(E[1], N.y), E[2] = Math.max(E[2], N.x), E[3] = Math.max(E[3], N.y) - } - E[0] < ne && E[1] < ne && E[2] >= 0 && E[3] >= 0 && v.insert(g, E[0], E[1], E[2], E[3]) - } - } - loadVTLayers() { - return this.vtLayers || (this.vtLayers = new Km(new Op(this.rawTileData)).layers, this.sourceLayerCoder = new z_(this.vtLayers ? Object.keys(this.vtLayers).sort() : ["_geojsonTileLayer"])), this.vtLayers - } - query(t, r, a, c) { - this.loadVTLayers(); - const p = t.params, - f = ne / t.tileSize / t.scale, - g = bs(p.filter), - v = t.queryGeometry, - S = t.queryPadding * f, - I = Oo.fromPoints(v), - E = this.grid.query(I.minX - S, I.minY - S, I.maxX + S, I.maxY + S), - R = Oo.fromPoints(t.cameraQueryGeometry).expandBy(S), - N = this.grid3D.query(R.minX, R.minY, R.maxX, R.maxY, ((Y, ae, ze, me) => (function(be, Ve, rt, St, $t) { - for (const Ut of be) - if (Ve <= Ut.x && rt <= Ut.y && St >= Ut.x && $t >= Ut.y) return !0; - const Bt = [new $(Ve, rt), new $(Ve, $t), new $(St, $t), new $(St, rt)]; - if (be.length > 2) { - for (const Ut of Bt) - if (zl(be, Ut)) return !0 - } - for (let Ut = 0; Ut < be.length - 1; Ut++) - if (jv(be[Ut], be[Ut + 1], Bt)) return !0; - return !1 - })(t.cameraQueryGeometry, Y - S, ae - S, ze + S, me + S))); - for (const Y of N) E.push(Y); - E.sort(cy); - const j = {}; - let Z; - for (let Y = 0; Y < E.length; Y++) { - const ae = E[Y]; - if (ae === Z) continue; - Z = ae; - const ze = this.featureIndexArray.get(ae); - let me = null; - this.loadMatchingFeature(j, ze.bucketIndex, ze.sourceLayerIndex, ze.featureIndex, g, p.layers, p.availableImages, r, a, c, ((be, Ve, rt) => (me || (me = cs(be)), Ve.queryIntersectsFeature({ - queryGeometry: v, - feature: be, - featureState: rt, - geometry: me, - zoom: this.z, - transform: t.transform, - pixelsToTileUnits: f, - pixelPosMatrix: t.pixelPosMatrix, - unwrappedTileID: this.tileID.toUnwrapped(), - getElevation: t.getElevation - })))) - } - return j - } - loadMatchingFeature(t, r, a, c, p, f, g, v, S, I, E) { - const R = this.bucketLayerIDs[r]; - if (f && !R.some((Y => f.has(Y)))) return; - const N = this.sourceLayerCoder.decode(a), - j = this.vtLayers[N].feature(c); - if (p.needGeometry) { - const Y = Wa(j, !0); - if (!p.filter(new Oi(this.tileID.overscaledZ), Y, this.tileID.canonical)) return - } else if (!p.filter(new Oi(this.tileID.overscaledZ), j)) return; - const Z = this.getId(j, N); - for (let Y = 0; Y < R.length; Y++) { - const ae = R[Y]; - if (f && !f.has(ae)) continue; - const ze = v[ae]; - if (!ze) continue; - let me = {}; - Z && I && (me = I.getState(ze.sourceLayer || "_geojsonTileLayer", Z)); - const be = pt({}, S[ae]); - be.paint = R_(be.paint, ze.paint, j, me, g), be.layout = R_(be.layout, ze.layout, j, me, g); - const Ve = !E || E(j, ze, me); - if (!Ve) continue; - const rt = new L_(j, this.z, this.x, this.y, Z); - rt.layer = be; - let St = t[ae]; - St === void 0 && (St = t[ae] = []), St.push({ - featureIndex: c, - feature: rt, - intersectionZ: Ve - }) - } - } - lookupSymbolFeatures(t, r, a, c, p, f, g, v) { - const S = {}; - this.loadVTLayers(); - const I = bs(p); - for (const E of t) this.loadMatchingFeature(S, a, c, E, I, f, g, v, r); - return S - } - hasLayer(t) { - for (const r of this.bucketLayerIDs) - for (const a of r) - if (t === a) return !0; - return !1 - } - getId(t, r) { - var a; - let c = t.id; - return this.promoteId && (c = t.properties[typeof this.promoteId == "string" ? this.promoteId : this.promoteId[r]], typeof c == "boolean" && (c = Number(c)), c === void 0 && (!((a = t.properties) === null || a === void 0) && a.cluster) && this.promoteId && (c = Number(t.properties.cluster_id))), c - } - } - - function R_(i, t, r, a, c) { - return ut(i, ((p, f) => { - const g = t instanceof Cl ? t.get(f) : null; - return g && g.evaluate ? g.evaluate(r, a, c) : g - })) - } - - function cy(i, t) { - return t - i - } - - function B_(i, t, r, a, c) { - const p = []; - for (let f = 0; f < i.length; f++) { - const g = i[f]; - let v; - for (let S = 0; S < g.length - 1; S++) { - let I = g[S], - E = g[S + 1]; - I.x < t && E.x < t || (I.x < t ? I = new $(t, I.y + (t - I.x) / (E.x - I.x) * (E.y - I.y))._round() : E.x < t && (E = new $(t, I.y + (t - I.x) / (E.x - I.x) * (E.y - I.y))._round()), I.y < r && E.y < r || (I.y < r ? I = new $(I.x + (r - I.y) / (E.y - I.y) * (E.x - I.x), r)._round() : E.y < r && (E = new $(I.x + (r - I.y) / (E.y - I.y) * (E.x - I.x), r)._round()), I.x >= a && E.x >= a || (I.x >= a ? I = new $(a, I.y + (a - I.x) / (E.x - I.x) * (E.y - I.y))._round() : E.x >= a && (E = new $(a, I.y + (a - I.x) / (E.x - I.x) * (E.y - I.y))._round()), I.y >= c && E.y >= c || (I.y >= c ? I = new $(I.x + (c - I.y) / (E.y - I.y) * (E.x - I.x), c)._round() : E.y >= c && (E = new $(I.x + (c - I.y) / (E.y - I.y) * (E.x - I.x), c)._round()), v && I.equals(v[v.length - 1]) || (v = [I], p.push(v)), v.push(E))))) - } - } - return p - } - Kt("FeatureIndex", D_, { - omit: ["rawTileData", "sourceLayerCoder"] - }); - class io extends $ { - constructor(t, r, a, c) { - super(t, r), this.angle = a, c !== void 0 && (this.segment = c) - } - clone() { - return new io(this.x, this.y, this.angle, this.segment) - } - } - - function F_(i, t, r, a, c) { - if (t.segment === void 0 || r === 0) return !0; - let p = t, - f = t.segment + 1, - g = 0; - for (; g > -r / 2;) { - if (f--, f < 0) return !1; - g -= i[f].dist(p), p = i[f] - } - g += i[f].dist(i[f + 1]), f++; - const v = []; - let S = 0; - for (; g < r / 2;) { - const I = i[f], - E = i[f + 1]; - if (!E) return !1; - let R = i[f - 1].angleTo(I) - I.angleTo(E); - for (R = Math.abs((R + 3 * Math.PI) % (2 * Math.PI) - Math.PI), v.push({ - distance: g, - angleDelta: R - }), S += R; g - v[0].distance > a;) S -= v.shift().angleDelta; - if (S > c) return !1; - f++, g += I.dist(E) - } - return !0 - } - - function O_(i) { - let t = 0; - for (let r = 0; r < i.length - 1; r++) t += i[r].dist(i[r + 1]); - return t - } - - function N_(i, t, r) { - return i ? .6 * t * r : 0 - } - - function j_(i, t) { - return Math.max(i ? i.right - i.left : 0, t ? t.right - t.left : 0) - } - - function uy(i, t, r, a, c, p) { - const f = N_(r, c, p), - g = j_(r, a) * p; - let v = 0; - const S = O_(i) / 2; - for (let I = 0; I < i.length - 1; I++) { - const E = i[I], - R = i[I + 1], - N = E.dist(R); - if (v + N > S) { - const j = (S - v) / N, - Z = Fa.number(E.x, R.x, j), - Y = Fa.number(E.y, R.y, j), - ae = new io(Z, Y, R.angleTo(E), I); - return ae._round(), !f || F_(i, ae, g, f, t) ? ae : void 0 - } - v += N - } - } - - function hy(i, t, r, a, c, p, f, g, v) { - const S = N_(a, p, f), - I = j_(a, c), - E = I * f, - R = i[0].x === 0 || i[0].x === v || i[0].y === 0 || i[0].y === v; - return t - E < t / 4 && (t = E + t / 4), q_(i, R ? t / 2 * g % t : (I / 2 + 2 * p) * f * g % t, t, S, r, E, R, !1, v) - } - - function q_(i, t, r, a, c, p, f, g, v) { - const S = p / 2, - I = O_(i); - let E = 0, - R = t - r, - N = []; - for (let j = 0; j < i.length - 1; j++) { - const Z = i[j], - Y = i[j + 1], - ae = Z.dist(Y), - ze = Y.angleTo(Z); - for (; R + r < E + ae;) { - R += r; - const me = (R - E) / ae, - be = Fa.number(Z.x, Y.x, me), - Ve = Fa.number(Z.y, Y.y, me); - if (be >= 0 && be < v && Ve >= 0 && Ve < v && R - S >= 0 && R + S <= I) { - const rt = new io(be, Ve, ze, j); - rt._round(), a && !F_(i, rt, p, a, c) || N.push(rt) - } - } - E += ae - } - return g || N.length || f || (N = q_(i, E / 2, r, a, c, p, f, !0, v)), N - } - - function V_(i, t, r, a) { - const c = [], - p = i.image, - f = p.pixelRatio, - g = p.paddedRect.w - 2, - v = p.paddedRect.h - 2; - let S = { - x1: i.left, - y1: i.top, - x2: i.right, - y2: i.bottom - }; - const I = p.stretchX || [ - [0, g] - ], - E = p.stretchY || [ - [0, v] - ], - R = (mt, Br) => mt + Br[1] - Br[0], - N = I.reduce(R, 0), - j = E.reduce(R, 0), - Z = g - N, - Y = v - j; - let ae = 0, - ze = N, - me = 0, - be = j, - Ve = 0, - rt = Z, - St = 0, - $t = Y; - if (p.content && a) { - const mt = p.content, - Br = mt[2] - mt[0], - Ur = mt[3] - mt[1]; - (p.textFitWidth || p.textFitHeight) && (S = __(i)), ae = md(I, 0, mt[0]), me = md(E, 0, mt[1]), ze = md(I, mt[0], mt[2]), be = md(E, mt[1], mt[3]), Ve = mt[0] - ae, St = mt[1] - me, rt = Br - ze, $t = Ur - be - } - const Bt = S.x1, - Ut = S.y1, - pr = S.x2 - Bt, - Vt = S.y2 - Ut, - Zt = (mt, Br, Ur, xr) => { - const or = _d(mt.stretch - ae, ze, pr, Bt), - oi = gd(mt.fixed - Ve, rt, mt.stretch, N), - Zi = _d(Br.stretch - me, be, Vt, Ut), - fn = gd(Br.fixed - St, $t, Br.stretch, j), - Bn = _d(Ur.stretch - ae, ze, pr, Bt), - Aa = gd(Ur.fixed - Ve, rt, Ur.stretch, N), - aa = _d(xr.stretch - me, be, Vt, Ut), - Mn = gd(xr.fixed - St, $t, xr.stretch, j), - qi = new $(or, Zi), - wn = new $(Bn, Zi), - An = new $(Bn, aa), - kn = new $(or, aa), - Yn = new $(oi / f, fn / f), - ka = new $(Aa / f, Mn / f), - Tn = t * Math.PI / 180; - if (Tn) { - const Cn = Math.sin(Tn), - Sn = Math.cos(Tn), - rn = [Sn, -Cn, Cn, Sn]; - qi._matMult(rn), wn._matMult(rn), kn._matMult(rn), An._matMult(rn) - } - const sa = mt.stretch + mt.fixed, - mn = Br.stretch + Br.fixed; - return { - tl: qi, - tr: wn, - bl: kn, - br: An, - tex: { - x: p.paddedRect.x + 1 + sa, - y: p.paddedRect.y + 1 + mn, - w: Ur.stretch + Ur.fixed - sa, - h: xr.stretch + xr.fixed - mn - }, - writingMode: void 0, - glyphOffset: [0, 0], - sectionIndex: 0, - pixelOffsetTL: Yn, - pixelOffsetBR: ka, - minFontScaleX: rt / f / pr, - minFontScaleY: $t / f / Vt, - isSDF: r - } - }; - if (a && (p.stretchX || p.stretchY)) { - const mt = U_(I, Z, N), - Br = U_(E, Y, j); - for (let Ur = 0; Ur < mt.length - 1; Ur++) { - const xr = mt[Ur], - or = mt[Ur + 1]; - for (let oi = 0; oi < Br.length - 1; oi++) c.push(Zt(xr, Br[oi], or, Br[oi + 1])) - } - } else c.push(Zt({ - fixed: 0, - stretch: -1 - }, { - fixed: 0, - stretch: -1 - }, { - fixed: 0, - stretch: g + 1 - }, { - fixed: 0, - stretch: v + 1 - })); - return c - } - - function md(i, t, r) { - let a = 0; - for (const c of i) a += Math.max(t, Math.min(r, c[1])) - Math.max(t, Math.min(r, c[0])); - return a - } - - function U_(i, t, r) { - const a = [{ - fixed: -1, - stretch: 0 - }]; - for (const [c, p] of i) { - const f = a[a.length - 1]; - a.push({ - fixed: c - f.stretch, - stretch: f.stretch - }), a.push({ - fixed: c - f.stretch, - stretch: f.stretch + (p - c) - }) - } - return a.push({ - fixed: t + 1, - stretch: r - }), a - } - - function _d(i, t, r, a) { - return i / t * r + a - } - - function gd(i, t, r, a) { - return i - t * r / a - } - Kt("Anchor", io); - class vd { - constructor(t, r, a, c, p, f, g, v, S, I) { - var E; - if (this.boxStartIndex = t.length, S) { - let R = f.top, - N = f.bottom; - const j = f.collisionPadding; - j && (R -= j[1], N += j[3]); - let Z = N - R; - Z > 0 && (Z = Math.max(10, Z), this.circleDiameter = Z) - } else { - const R = !((E = f.image) === null || E === void 0) && E.content && (f.image.textFitWidth || f.image.textFitHeight) ? __(f) : { - x1: f.left, - y1: f.top, - x2: f.right, - y2: f.bottom - }; - R.y1 = R.y1 * g - v[0], R.y2 = R.y2 * g + v[2], R.x1 = R.x1 * g - v[3], R.x2 = R.x2 * g + v[1]; - const N = f.collisionPadding; - if (N && (R.x1 -= N[0] * g, R.y1 -= N[1] * g, R.x2 += N[2] * g, R.y2 += N[3] * g), I) { - const j = new $(R.x1, R.y1), - Z = new $(R.x2, R.y1), - Y = new $(R.x1, R.y2), - ae = new $(R.x2, R.y2), - ze = I * Math.PI / 180; - j._rotate(ze), Z._rotate(ze), Y._rotate(ze), ae._rotate(ze), R.x1 = Math.min(j.x, Z.x, Y.x, ae.x), R.x2 = Math.max(j.x, Z.x, Y.x, ae.x), R.y1 = Math.min(j.y, Z.y, Y.y, ae.y), R.y2 = Math.max(j.y, Z.y, Y.y, ae.y) - } - t.emplaceBack(r.x, r.y, R.x1, R.y1, R.x2, R.y2, a, c, p) - } - this.boxEndIndex = t.length - } - } - class dy { - constructor(t = [], r = (a, c) => a < c ? -1 : a > c ? 1 : 0) { - if (this.data = t, this.length = this.data.length, this.compare = r, this.length > 0) - for (let a = (this.length >> 1) - 1; a >= 0; a--) this._down(a) - } - push(t) { - this.data.push(t), this._up(this.length++) - } - pop() { - if (this.length === 0) return; - const t = this.data[0], - r = this.data.pop(); - return --this.length > 0 && (this.data[0] = r, this._down(0)), t - } - peek() { - return this.data[0] - } - _up(t) { - const { - data: r, - compare: a - } = this, c = r[t]; - for (; t > 0;) { - const p = t - 1 >> 1, - f = r[p]; - if (a(c, f) >= 0) break; - r[t] = f, t = p - } - r[t] = c - } - _down(t) { - const { - data: r, - compare: a - } = this, c = this.length >> 1, p = r[t]; - for (; t < c;) { - let f = 1 + (t << 1); - const g = f + 1; - if (g < this.length && a(r[g], r[f]) < 0 && (f = g), a(r[f], p) >= 0) break; - r[t] = r[f], t = f - } - r[t] = p - } - } - - function py(i, t = 1, r = !1) { - const a = Oo.fromPoints(i[0]), - c = Math.min(a.width(), a.height()); - let p = c / 2; - const f = new dy([], fy), - { - minX: g, - minY: v, - maxX: S, - maxY: I - } = a; - if (c === 0) return new $(g, v); - for (let N = g; N < S; N += c) - for (let j = v; j < I; j += c) f.push(new ql(N + p, j + p, p, i)); - let E = (function(N) { - let j = 0, - Z = 0, - Y = 0; - const ae = N[0]; - for (let ze = 0, me = ae.length, be = me - 1; ze < me; be = ze++) { - const Ve = ae[ze], - rt = ae[be], - St = Ve.x * rt.y - rt.x * Ve.y; - Z += (Ve.x + rt.x) * St, Y += (Ve.y + rt.y) * St, j += 3 * St - } - return new ql(Z / j, Y / j, 0, N) - })(i), - R = f.length; - for (; f.length;) { - const N = f.pop(); - (N.d > E.d || !E.d) && (E = N, r && console.log("found best %d after %d probes", Math.round(1e4 * N.d) / 1e4, R)), N.max - E.d <= t || (p = N.h / 2, f.push(new ql(N.p.x - p, N.p.y - p, p, i)), f.push(new ql(N.p.x + p, N.p.y - p, p, i)), f.push(new ql(N.p.x - p, N.p.y + p, p, i)), f.push(new ql(N.p.x + p, N.p.y + p, p, i)), R += 4) - } - return r && (console.log(`num probes: ${R}`), console.log(`best distance: ${E.d}`)), E.p - } - - function fy(i, t) { - return t.max - i.max - } - - function ql(i, t, r, a) { - this.p = new $(i, t), this.h = r, this.d = (function(c, p) { - let f = !1, - g = 1 / 0; - for (let v = 0; v < p.length; v++) { - const S = p[v]; - for (let I = 0, E = S.length, R = E - 1; I < E; R = I++) { - const N = S[I], - j = S[R]; - N.y > c.y != j.y > c.y && c.x < (j.x - N.x) * (c.y - N.y) / (j.y - N.y) + N.x && (f = !f), g = Math.min(g, Im(c, N, j)) - } - } - return (f ? 1 : -1) * Math.sqrt(g) - })(this.p, a), this.max = this.d + this.h * Math.SQRT2 - } - var Rn; - T.aE = void 0, (Rn = T.aE || (T.aE = {}))[Rn.center = 1] = "center", Rn[Rn.left = 2] = "left", Rn[Rn.right = 3] = "right", Rn[Rn.top = 4] = "top", Rn[Rn.bottom = 5] = "bottom", Rn[Rn["top-left"] = 6] = "top-left", Rn[Rn["top-right"] = 7] = "top-right", Rn[Rn["bottom-left"] = 8] = "bottom-left", Rn[Rn["bottom-right"] = 9] = "bottom-right"; - const Kp = Number.POSITIVE_INFINITY; - - function Z_(i, t) { - return t[1] !== Kp ? (function(r, a, c) { - let p = 0, - f = 0; - switch (a = Math.abs(a), c = Math.abs(c), r) { - case "top-right": - case "top-left": - case "top": - f = c - 7; - break; - case "bottom-right": - case "bottom-left": - case "bottom": - f = 7 - c - } - switch (r) { - case "top-right": - case "bottom-right": - case "right": - p = -a; - break; - case "top-left": - case "bottom-left": - case "left": - p = a - } - return [p, f] - })(i, t[0], t[1]) : (function(r, a) { - let c = 0, - p = 0; - a < 0 && (a = 0); - const f = a / Math.SQRT2; - switch (r) { - case "top-right": - case "top-left": - p = f - 7; - break; - case "bottom-right": - case "bottom-left": - p = 7 - f; - break; - case "bottom": - p = 7 - a; - break; - case "top": - p = a - 7 - } - switch (r) { - case "top-right": - case "bottom-right": - c = -f; - break; - case "top-left": - case "bottom-left": - c = f; - break; - case "left": - c = a; - break; - case "right": - c = -a - } - return [c, p] - })(i, t[0]) - } - - function $_(i, t, r) { - var a; - const c = i.layout, - p = (a = c.get("text-variable-anchor-offset")) === null || a === void 0 ? void 0 : a.evaluate(t, {}, r); - if (p) { - const g = p.values, - v = []; - for (let S = 0; S < g.length; S += 2) { - const I = v[S] = g[S], - E = g[S + 1].map((R => R * bn)); - I.startsWith("top") ? E[1] -= 7 : I.startsWith("bottom") && (E[1] += 7), v[S + 1] = E - } - return new un(v) - } - const f = c.get("text-variable-anchor"); - if (f) { - let g; - g = i._unevaluatedLayout.getValue("text-radial-offset") !== void 0 ? [c.get("text-radial-offset").evaluate(t, {}, r) * bn, Kp] : c.get("text-offset").evaluate(t, {}, r).map((S => S * bn)); - const v = []; - for (const S of f) v.push(S, Z_(S, g)); - return new un(v) - } - return null - } - - function Yp(i) { - switch (i) { - case "right": - case "top-right": - case "bottom-right": - return "right"; - case "left": - case "top-left": - case "bottom-left": - return "left" - } - return "center" - } - - function my(i, t, r, a, c, p, f, g, v, S, I, E) { - let R = p.textMaxSize.evaluate(t, {}); - R === void 0 && (R = f); - const N = i.layers[0].layout, - j = N.get("icon-offset").evaluate(t, {}, I), - Z = H_(r.horizontal), - Y = f / 24, - ae = i.tilePixelRatio * Y, - ze = i.tilePixelRatio * R / 24, - me = i.tilePixelRatio * g, - be = i.tilePixelRatio * N.get("symbol-spacing"), - Ve = N.get("text-padding") * i.tilePixelRatio, - rt = (function(Ur, xr, or, oi = 1) { - const Zi = Ur.get("icon-padding").evaluate(xr, {}, or), - fn = Zi && Zi.values; - return [fn[0] * oi, fn[1] * oi, fn[2] * oi, fn[3] * oi] - })(N, t, I, i.tilePixelRatio), - St = N.get("text-max-angle") / 180 * Math.PI, - $t = N.get("text-rotation-alignment") !== "viewport" && N.get("symbol-placement") !== "point", - Bt = N.get("icon-rotation-alignment") === "map" && N.get("symbol-placement") !== "point", - Ut = N.get("symbol-placement"), - pr = be / 2, - Vt = N.get("icon-text-fit"); - let Zt; - a && Vt !== "none" && (i.allowVerticalPlacement && r.vertical && (Zt = g_(a, r.vertical, Vt, N.get("icon-text-fit-padding"), j, Y)), Z && (a = g_(a, Z, Vt, N.get("icon-text-fit-padding"), j, Y))); - const mt = I ? E.line.getGranularityForZoomLevel(I.z) : 1, - Br = (Ur, xr) => { - xr.x < 0 || xr.x >= ne || xr.y < 0 || xr.y >= ne || (function(or, oi, Zi, fn, Bn, Aa, aa, Mn, qi, wn, An, kn, Yn, ka, Tn, sa, mn, Cn, Sn, rn, Bi, Xa, Vl, Ka, vy) { - const Ul = or.addToLineVertexArray(oi, Zi); - let No, Zl, $l, Gl, Y_ = 0, - J_ = 0, - Q_ = 0, - eg = 0, - sf = -1, - of = -1; - const ks = {}; - let tg = Js(""); - if (or.allowVerticalPlacement && fn.vertical) { - const Un = Mn.layout.get("text-rotate").evaluate(Bi, {}, Ka) + 90; - $l = new vd(qi, oi, wn, An, kn, fn.vertical, Yn, ka, Tn, Un), aa && (Gl = new vd(qi, oi, wn, An, kn, aa, mn, Cn, Tn, Un)) - } - if (Bn) { - const Un = Mn.layout.get("icon-rotate").evaluate(Bi, {}), - Ea = Mn.layout.get("icon-text-fit") !== "none", - jo = V_(Bn, Un, Vl, Ea), - Ja = aa ? V_(aa, Un, Vl, Ea) : void 0; - Zl = new vd(qi, oi, wn, An, kn, Bn, mn, Cn, !1, Un), Y_ = 4 * jo.length; - const qo = or.iconSizeData; - let us = null; - qo.kind === "source" ? (us = [As * Mn.layout.get("icon-size").evaluate(Bi, {})], us[0] > to && Lt(`${or.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)) : qo.kind === "composite" && (us = [As * Xa.compositeIconSizes[0].evaluate(Bi, {}, Ka), As * Xa.compositeIconSizes[1].evaluate(Bi, {}, Ka)], (us[0] > to || us[1] > to) && Lt(`${or.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)), or.addSymbols(or.icon, jo, us, rn, Sn, Bi, T.ao.none, oi, Ul.lineStartIndex, Ul.lineLength, -1, Ka), sf = or.icon.placedSymbolArray.length - 1, Ja && (J_ = 4 * Ja.length, or.addSymbols(or.icon, Ja, us, rn, Sn, Bi, T.ao.vertical, oi, Ul.lineStartIndex, Ul.lineLength, -1, Ka), of = or.icon.placedSymbolArray.length - 1) - } - const rg = Object.keys(fn.horizontal); - for (const Un of rg) { - const Ea = fn.horizontal[Un]; - if (!No) { - tg = Js(Ea.text); - const Ja = Mn.layout.get("text-rotate").evaluate(Bi, {}, Ka); - No = new vd(qi, oi, wn, An, kn, Ea, Yn, ka, Tn, Ja) - } - const jo = Ea.positionedLines.length === 1; - if (Q_ += G_(or, oi, Ea, Aa, Mn, Tn, Bi, sa, Ul, fn.vertical ? T.ao.horizontal : T.ao.horizontalOnly, jo ? rg : [Un], ks, sf, Xa, Ka), jo) break - } - fn.vertical && (eg += G_(or, oi, fn.vertical, Aa, Mn, Tn, Bi, sa, Ul, T.ao.vertical, ["vertical"], ks, of, Xa, Ka)); - const yy = No ? No.boxStartIndex : or.collisionBoxArray.length, - xy = No ? No.boxEndIndex : or.collisionBoxArray.length, - by = $l ? $l.boxStartIndex : or.collisionBoxArray.length, - wy = $l ? $l.boxEndIndex : or.collisionBoxArray.length, - Ty = Zl ? Zl.boxStartIndex : or.collisionBoxArray.length, - Cy = Zl ? Zl.boxEndIndex : or.collisionBoxArray.length, - Sy = Gl ? Gl.boxStartIndex : or.collisionBoxArray.length, - Py = Gl ? Gl.boxEndIndex : or.collisionBoxArray.length; - let Ya = -1; - const xd = (Un, Ea) => Un && Un.circleDiameter ? Math.max(Un.circleDiameter, Ea) : Ea; - Ya = xd(No, Ya), Ya = xd($l, Ya), Ya = xd(Zl, Ya), Ya = xd(Gl, Ya); - const ig = Ya > -1 ? 1 : 0; - ig && (Ya *= vy / bn), or.glyphOffsetArray.length >= Nl.MAX_GLYPHS && Lt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"), Bi.sortKey !== void 0 && or.addToSortKeyRanges(or.symbolInstances.length, Bi.sortKey); - const Iy = $_(Mn, Bi, Ka), - [My, Ay] = (function(Un, Ea) { - const jo = Un.length, - Ja = Ea == null ? void 0 : Ea.values; - if ((Ja == null ? void 0 : Ja.length) > 0) - for (let qo = 0; qo < Ja.length; qo += 2) { - const us = Ja[qo + 1]; - Un.emplaceBack(T.aE[Ja[qo]], us[0], us[1]) - } - return [jo, Un.length] - })(or.textAnchorOffsets, Iy); - or.symbolInstances.emplaceBack(oi.x, oi.y, ks.right >= 0 ? ks.right : -1, ks.center >= 0 ? ks.center : -1, ks.left >= 0 ? ks.left : -1, ks.vertical || -1, sf, of, tg, yy, xy, by, wy, Ty, Cy, Sy, Py, wn, Q_, eg, Y_, J_, ig, 0, Yn, Ya, My, Ay) - })(i, xr, Ur, r, a, c, Zt, i.layers[0], i.collisionBoxArray, t.index, t.sourceLayerIndex, i.index, ae, [Ve, Ve, Ve, Ve], $t, v, me, rt, Bt, j, t, p, S, I, f) - }; - if (Ut === "line") - for (const Ur of B_(t.geometry, 0, 0, ne, ne)) { - const xr = Fo(Ur, mt), - or = hy(xr, be, St, r.vertical || Z, a, 24, ze, i.overscaling, ne); - for (const oi of or) Z && _y(i, Z.text, pr, oi) || Br(xr, oi) - } else if (Ut === "line-center") { - for (const Ur of t.geometry) - if (Ur.length > 1) { - const xr = Fo(Ur, mt), - or = uy(xr, St, r.vertical || Z, a, 24, ze); - or && Br(xr, or) - } - } else if (t.type === "Polygon") - for (const Ur of xo(t.geometry, 0)) { - const xr = py(Ur, 16); - Br(Fo(Ur[0], mt, !0), new io(xr.x, xr.y, 0)) - } else if (t.type === "LineString") - for (const Ur of t.geometry) { - const xr = Fo(Ur, mt); - Br(xr, new io(xr[0].x, xr[0].y, 0)) - } else if (t.type === "Point") - for (const Ur of t.geometry) - for (const xr of Ur) Br([xr], new io(xr.x, xr.y, 0)) - } - - function G_(i, t, r, a, c, p, f, g, v, S, I, E, R, N, j) { - const Z = (function(ze, me, be, Ve, rt, St, $t, Bt) { - const Ut = Ve.layout.get("text-rotate").evaluate(St, {}) * Math.PI / 180, - pr = []; - for (const Vt of me.positionedLines) - for (const Zt of Vt.positionedGlyphs) { - if (!Zt.rect) continue; - const mt = Zt.rect || {}; - let Br = 4, - Ur = !0, - xr = 1, - or = 0; - const oi = (rt || Bt) && Zt.vertical, - Zi = Zt.metrics.advance * Zt.scale / 2; - if (Bt && me.verticalizable && (or = Vt.lineOffset / 2 - (Zt.imageName ? -(bn - Zt.metrics.width * Zt.scale) / 2 : (Zt.scale - 1) * bn)), Zt.imageName) { - const Cn = $t[Zt.imageName]; - Ur = Cn.sdf, xr = Cn.pixelRatio, Br = 1 / xr - } - const fn = rt ? [Zt.x + Zi, Zt.y] : [0, 0]; - let Bn = rt ? [0, 0] : [Zt.x + Zi + be[0], Zt.y + be[1] - or], - Aa = [0, 0]; - oi && (Aa = Bn, Bn = [0, 0]); - const aa = Zt.metrics.isDoubleResolution ? 2 : 1, - Mn = (Zt.metrics.left - Br) * Zt.scale - Zi + Bn[0], - qi = (-Zt.metrics.top - Br) * Zt.scale + Bn[1], - wn = Mn + mt.w / aa * Zt.scale / xr, - An = qi + mt.h / aa * Zt.scale / xr, - kn = new $(Mn, qi), - Yn = new $(wn, qi), - ka = new $(Mn, An), - Tn = new $(wn, An); - if (oi) { - const Cn = new $(-Zi, Zi - -17), - Sn = -Math.PI / 2, - rn = 12 - Zi, - Bi = new $(22 - rn, -(Zt.imageName ? rn : 0)), - Xa = new $(...Aa); - kn._rotateAround(Sn, Cn)._add(Bi)._add(Xa), Yn._rotateAround(Sn, Cn)._add(Bi)._add(Xa), ka._rotateAround(Sn, Cn)._add(Bi)._add(Xa), Tn._rotateAround(Sn, Cn)._add(Bi)._add(Xa) - } - if (Ut) { - const Cn = Math.sin(Ut), - Sn = Math.cos(Ut), - rn = [Sn, -Cn, Cn, Sn]; - kn._matMult(rn), Yn._matMult(rn), ka._matMult(rn), Tn._matMult(rn) - } - const sa = new $(0, 0), - mn = new $(0, 0); - pr.push({ - tl: kn, - tr: Yn, - bl: ka, - br: Tn, - tex: mt, - writingMode: me.writingMode, - glyphOffset: fn, - sectionIndex: Zt.sectionIndex, - isSDF: Ur, - pixelOffsetTL: sa, - pixelOffsetBR: mn, - minFontScaleX: 0, - minFontScaleY: 0 - }) - } - return pr - })(0, r, g, c, p, f, a, i.allowVerticalPlacement), - Y = i.textSizeData; - let ae = null; - Y.kind === "source" ? (ae = [As * c.layout.get("text-size").evaluate(f, {})], ae[0] > to && Lt(`${i.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)) : Y.kind === "composite" && (ae = [As * N.compositeTextSizes[0].evaluate(f, {}, j), As * N.compositeTextSizes[1].evaluate(f, {}, j)], (ae[0] > to || ae[1] > to) && Lt(`${i.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)), i.addSymbols(i.text, Z, ae, g, p, f, S, t, v.lineStartIndex, v.lineLength, R, j); - for (const ze of I) E[ze] = i.text.placedSymbolArray.length - 1; - return 4 * Z.length - } - - function H_(i) { - for (const t in i) return i[t]; - return null - } - - function _y(i, t, r, a) { - const c = i.compareText; - if (t in c) { - const p = c[t]; - for (let f = p.length - 1; f >= 0; f--) - if (a.dist(p[f]) < r) return !0 - } else c[t] = []; - return c[t].push(a), !1 - } - const W_ = [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array]; - class Jp { - static from(t) { - if (!(t instanceof ArrayBuffer)) throw new Error("Data must be an instance of ArrayBuffer."); - const [r, a] = new Uint8Array(t, 0, 2); - if (r !== 219) throw new Error("Data does not appear to be in a KDBush format."); - const c = a >> 4; - if (c !== 1) throw new Error(`Got v${c} data when expected v1.`); - const p = W_[15 & a]; - if (!p) throw new Error("Unrecognized array type."); - const [f] = new Uint16Array(t, 2, 1), [g] = new Uint32Array(t, 4, 1); - return new Jp(g, f, p, t) - } - constructor(t, r = 64, a = Float64Array, c) { - if (isNaN(t) || t < 0) throw new Error(`Unpexpected numItems value: ${t}.`); - this.numItems = +t, this.nodeSize = Math.min(Math.max(+r, 2), 65535), this.ArrayType = a, this.IndexArrayType = t < 65536 ? Uint16Array : Uint32Array; - const p = W_.indexOf(this.ArrayType), - f = 2 * t * this.ArrayType.BYTES_PER_ELEMENT, - g = t * this.IndexArrayType.BYTES_PER_ELEMENT, - v = (8 - g % 8) % 8; - if (p < 0) throw new Error(`Unexpected typed array class: ${a}.`); - c && c instanceof ArrayBuffer ? (this.data = c, this.ids = new this.IndexArrayType(this.data, 8, t), this.coords = new this.ArrayType(this.data, 8 + g + v, 2 * t), this._pos = 2 * t, this._finished = !0) : (this.data = new ArrayBuffer(8 + f + g + v), this.ids = new this.IndexArrayType(this.data, 8, t), this.coords = new this.ArrayType(this.data, 8 + g + v, 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] = r, new Uint32Array(this.data, 4, 1)[0] = t) - } - add(t, r) { - const a = this._pos >> 1; - return this.ids[a] = a, this.coords[this._pos++] = t, this.coords[this._pos++] = r, a - } - finish() { - const t = this._pos >> 1; - if (t !== this.numItems) throw new Error(`Added ${t} items when expected ${this.numItems}.`); - return Qp(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0), this._finished = !0, this - } - range(t, r, a, c) { - if (!this._finished) throw new Error("Data not yet indexed - call index.finish()."); - const { - ids: p, - coords: f, - nodeSize: g - } = this, v = [0, p.length - 1, 0], S = []; - for (; v.length;) { - const I = v.pop() || 0, - E = v.pop() || 0, - R = v.pop() || 0; - if (E - R <= g) { - for (let Y = R; Y <= E; Y++) { - const ae = f[2 * Y], - ze = f[2 * Y + 1]; - ae >= t && ae <= a && ze >= r && ze <= c && S.push(p[Y]) - } - continue - } - const N = R + E >> 1, - j = f[2 * N], - Z = f[2 * N + 1]; - j >= t && j <= a && Z >= r && Z <= c && S.push(p[N]), (I === 0 ? t <= j : r <= Z) && (v.push(R), v.push(N - 1), v.push(1 - I)), (I === 0 ? a >= j : c >= Z) && (v.push(N + 1), v.push(E), v.push(1 - I)) - } - return S - } - within(t, r, a) { - if (!this._finished) throw new Error("Data not yet indexed - call index.finish()."); - const { - ids: c, - coords: p, - nodeSize: f - } = this, g = [0, c.length - 1, 0], v = [], S = a * a; - for (; g.length;) { - const I = g.pop() || 0, - E = g.pop() || 0, - R = g.pop() || 0; - if (E - R <= f) { - for (let Y = R; Y <= E; Y++) K_(p[2 * Y], p[2 * Y + 1], t, r) <= S && v.push(c[Y]); - continue - } - const N = R + E >> 1, - j = p[2 * N], - Z = p[2 * N + 1]; - K_(j, Z, t, r) <= S && v.push(c[N]), (I === 0 ? t - a <= j : r - a <= Z) && (g.push(R), g.push(N - 1), g.push(1 - I)), (I === 0 ? t + a >= j : r + a >= Z) && (g.push(N + 1), g.push(E), g.push(1 - I)) - } - return v - } - } - - function Qp(i, t, r, a, c, p) { - if (c - a <= r) return; - const f = a + c >> 1; - X_(i, t, f, a, c, p), Qp(i, t, r, a, f - 1, 1 - p), Qp(i, t, r, f + 1, c, 1 - p) - } - - function X_(i, t, r, a, c, p) { - for (; c > a;) { - if (c - a > 600) { - const S = c - a + 1, - I = r - a + 1, - E = Math.log(S), - R = .5 * Math.exp(2 * E / 3), - N = .5 * Math.sqrt(E * R * (S - R) / S) * (I - S / 2 < 0 ? -1 : 1); - X_(i, t, r, Math.max(a, Math.floor(r - I * R / S + N)), Math.min(c, Math.floor(r + (S - I) * R / S + N)), p) - } - const f = t[2 * r + p]; - let g = a, - v = c; - for (_u(i, t, a, r), t[2 * c + p] > f && _u(i, t, a, c); g < v;) { - for (_u(i, t, g, v), g++, v--; t[2 * g + p] < f;) g++; - for (; t[2 * v + p] > f;) v-- - } - t[2 * a + p] === f ? _u(i, t, a, v) : (v++, _u(i, t, v, c)), v <= r && (a = v + 1), r <= v && (c = v - 1) - } - } - - function _u(i, t, r, a) { - ef(i, r, a), ef(t, 2 * r, 2 * a), ef(t, 2 * r + 1, 2 * a + 1) - } - - function ef(i, t, r) { - const a = i[t]; - i[t] = i[r], i[r] = a - } - - function K_(i, t, r, a) { - const c = i - r, - p = t - a; - return c * c + p * p - } - var tf; - T.cx = void 0, (tf = T.cx || (T.cx = {})).create = "create", tf.load = "load", tf.fullLoad = "fullLoad"; - let yd = null, - gu = []; - const rf = 1e3 / 60, - nf = "loadTime", - af = "fullLoadTime", - gy = { - mark(i) { - performance.mark(i) - }, - frame(i) { - const t = i; - yd != null && gu.push(t - yd), yd = t - }, - clearMetrics() { - yd = null, gu = [], performance.clearMeasures(nf), performance.clearMeasures(af); - for (const i in T.cx) performance.clearMarks(T.cx[i]) - }, - getPerformanceMetrics() { - performance.measure(nf, T.cx.create, T.cx.load), performance.measure(af, T.cx.create, T.cx.fullLoad); - const i = performance.getEntriesByName(nf)[0].duration, - t = performance.getEntriesByName(af)[0].duration, - r = gu.length, - a = 1 / (gu.reduce(((p, f) => p + f), 0) / r / 1e3), - c = gu.filter((p => p > rf)).reduce(((p, f) => p + (f - rf) / rf), 0); - return { - loadTime: i, - fullLoadTime: t, - fps: a, - percentDroppedFrames: c / (r + c) * 100, - totalFrames: r - } - } - }; - T.$ = ne, T.A = Ee, T.B = function([i, t, r]) { - return t += 90, t *= Math.PI / 180, r *= Math.PI / 180, { - x: i * Math.cos(t) * Math.sin(r), - y: i * Math.sin(t) * Math.sin(r), - z: i * Math.cos(r) - } - }, T.C = Fa, T.D = hr, T.E = Ot, T.F = Oi, T.G = ko, T.H = function(i) { - if (nr == null) { - const t = i.navigator ? i.navigator.userAgent : null; - nr = !!i.safari || !(!t || !(/\b(iPad|iPhone|iPod)\b/.test(t) || t.match("Safari") && !t.match("Chrome"))) - } - return nr - }, T.I = Np, T.J = class { - constructor(i, t) { - this.target = i, this.mapId = t, this.resolveRejects = {}, this.tasks = {}, this.taskQueue = [], this.abortControllers = {}, this.messageHandlers = {}, this.invoker = new oy((() => this.process())), this.subscription = jr(this.target, "message", (r => this.receive(r)), !1), this.globalScope = Yt(self) ? i : window - } - registerMessageHandler(i, t) { - this.messageHandlers[i] = t - } - sendAsync(i, t) { - return new Promise(((r, a) => { - const c = Math.round(1e18 * Math.random()).toString(36).substring(0, 10), - p = t ? jr(t.signal, "abort", (() => { - p == null || p.unsubscribe(), delete this.resolveRejects[c]; - const v = { - id: c, - type: "", - origin: location.origin, - targetMapId: i.targetMapId, - sourceMapId: this.mapId - }; - this.target.postMessage(v) - }), ly) : null; - this.resolveRejects[c] = { - resolve: v => { - p == null || p.unsubscribe(), r(v) - }, - reject: v => { - p == null || p.unsubscribe(), a(v) - } - }; - const f = [], - g = Object.assign(Object.assign({}, i), { - id: c, - sourceMapId: this.mapId, - origin: location.origin, - data: Gs(i.data, f) - }); - this.target.postMessage(g, { - transfer: f - }) - })) - } - receive(i) { - const t = i.data, - r = t.id; - if (!(t.origin !== "file://" && location.origin !== "file://" && t.origin !== "resource://android" && location.origin !== "resource://android" && t.origin !== location.origin || t.targetMapId && this.mapId !== t.targetMapId)) { - if (t.type === "") { - delete this.tasks[r]; - const a = this.abortControllers[r]; - return delete this.abortControllers[r], void(a && a.abort()) - } - if (Yt(self) || t.mustQueue) return this.tasks[r] = t, this.taskQueue.push(r), void this.invoker.trigger(); - this.processTask(r, t) - } - } - process() { - if (this.taskQueue.length === 0) return; - const i = this.taskQueue.shift(), - t = this.tasks[i]; - delete this.tasks[i], this.taskQueue.length > 0 && this.invoker.trigger(), t && this.processTask(i, t) - } - processTask(i, t) { - return o(this, void 0, void 0, (function*() { - if (t.type === "") { - const c = this.resolveRejects[i]; - return delete this.resolveRejects[i], c ? void(t.error ? c.reject(Cs(t.error)) : c.resolve(Cs(t.data))) : void 0 - } - if (!this.messageHandlers[t.type]) return void this.completeTask(i, new Error(`Could not find a registered handler for ${t.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`)); - const r = Cs(t.data), - a = new AbortController; - this.abortControllers[i] = a; - try { - const c = yield this.messageHandlers[t.type](t.sourceMapId, r, a); - this.completeTask(i, null, c) - } catch (c) { - this.completeTask(i, c) - } - })) - } - completeTask(i, t, r) { - const a = []; - delete this.abortControllers[i]; - const c = { - id: i, - type: "", - sourceMapId: this.mapId, - origin: location.origin, - error: t ? Gs(t) : null, - data: Gs(r, a) - }; - this.target.postMessage(c, { - transfer: a - }) - } - remove() { - this.invoker.remove(), this.subscription.unsubscribe() - } - }, T.K = G, T.L = function() { - var i = new Ee(16); - return Ee != Float32Array && (i[1] = 0, i[2] = 0, i[3] = 0, i[4] = 0, i[6] = 0, i[7] = 0, i[8] = 0, i[9] = 0, i[11] = 0, i[12] = 0, i[13] = 0, i[14] = 0), i[0] = 1, i[5] = 1, i[10] = 1, i[15] = 1, i - }, T.M = function(i, t, r) { - var a, c, p, f, g, v, S, I, E, R, N, j, Z = r[0], - Y = r[1], - ae = r[2]; - return t === i ? (i[12] = t[0] * Z + t[4] * Y + t[8] * ae + t[12], i[13] = t[1] * Z + t[5] * Y + t[9] * ae + t[13], i[14] = t[2] * Z + t[6] * Y + t[10] * ae + t[14], i[15] = t[3] * Z + t[7] * Y + t[11] * ae + t[15]) : (c = t[1], p = t[2], f = t[3], g = t[4], v = t[5], S = t[6], I = t[7], E = t[8], R = t[9], N = t[10], j = t[11], i[0] = a = t[0], i[1] = c, i[2] = p, i[3] = f, i[4] = g, i[5] = v, i[6] = S, i[7] = I, i[8] = E, i[9] = R, i[10] = N, i[11] = j, i[12] = a * Z + g * Y + E * ae + t[12], i[13] = c * Z + v * Y + R * ae + t[13], i[14] = p * Z + S * Y + N * ae + t[14], i[15] = f * Z + I * Y + j * ae + t[15]), i - }, T.N = function(i, t, r) { - var a = r[0], - c = r[1], - p = r[2]; - return i[0] = t[0] * a, i[1] = t[1] * a, i[2] = t[2] * a, i[3] = t[3] * a, i[4] = t[4] * c, i[5] = t[5] * c, i[6] = t[6] * c, i[7] = t[7] * c, i[8] = t[8] * p, i[9] = t[9] * p, i[10] = t[10] * p, i[11] = t[11] * p, i[12] = t[12], i[13] = t[13], i[14] = t[14], i[15] = t[15], i - }, T.O = function(i, t, r) { - var a = t[0], - c = t[1], - p = t[2], - f = t[3], - g = t[4], - v = t[5], - S = t[6], - I = t[7], - E = t[8], - R = t[9], - N = t[10], - j = t[11], - Z = t[12], - Y = t[13], - ae = t[14], - ze = t[15], - me = r[0], - be = r[1], - Ve = r[2], - rt = r[3]; - return i[0] = me * a + be * g + Ve * E + rt * Z, i[1] = me * c + be * v + Ve * R + rt * Y, i[2] = me * p + be * S + Ve * N + rt * ae, i[3] = me * f + be * I + Ve * j + rt * ze, i[4] = (me = r[4]) * a + (be = r[5]) * g + (Ve = r[6]) * E + (rt = r[7]) * Z, i[5] = me * c + be * v + Ve * R + rt * Y, i[6] = me * p + be * S + Ve * N + rt * ae, i[7] = me * f + be * I + Ve * j + rt * ze, i[8] = (me = r[8]) * a + (be = r[9]) * g + (Ve = r[10]) * E + (rt = r[11]) * Z, i[9] = me * c + be * v + Ve * R + rt * Y, i[10] = me * p + be * S + Ve * N + rt * ae, i[11] = me * f + be * I + Ve * j + rt * ze, i[12] = (me = r[12]) * a + (be = r[13]) * g + (Ve = r[14]) * E + (rt = r[15]) * Z, i[13] = me * c + be * v + Ve * R + rt * Y, i[14] = me * p + be * S + Ve * N + rt * ae, i[15] = me * f + be * I + Ve * j + rt * ze, i - }, T.P = $, T.Q = function(i, t) { - const r = {}; - for (let a = 0; a < t.length; a++) { - const c = t[a]; - c in i && (r[c] = i[c]) - } - return r - }, T.R = na, T.S = ro, T.T = Mp, T.U = I_, T.V = P_, T.W = Re, T.X = Ae, T.Y = dr, T.Z = Ma, T._ = o, T.a = O, T.a$ = Qe, T.a0 = function(i, t) { - var r, a, c, p; - if (!i) return t ?? {}; - if (!t) return i; - const f = Object.assign({}, i); - if (t.removeAll && (f.removeAll = !0), t.remove) { - const g = new Set(f.remove ? f.remove.concat(t.remove) : t.remove); - f.remove = Array.from(g.values()) - } - if (t.add) { - const g = f.add ? f.add.concat(t.add) : t.add, - v = new Map(g.map((S => [S.id, S]))); - f.add = Array.from(v.values()) - } - if (t.update) { - const g = new Map((r = f.update) === null || r === void 0 ? void 0 : r.map((v => [v.id, v]))); - for (const v of t.update) { - const S = (a = g.get(v.id)) !== null && a !== void 0 ? a : { - id: v.id - }; - v.newGeometry && (S.newGeometry = v.newGeometry), v.addOrUpdateProperties && (S.addOrUpdateProperties = ((c = S.addOrUpdateProperties) !== null && c !== void 0 ? c : []).concat(v.addOrUpdateProperties)), v.removeProperties && (S.removeProperties = ((p = S.removeProperties) !== null && p !== void 0 ? p : []).concat(v.removeProperties)), v.removeAllProperties && (S.removeAllProperties = !0), g.set(v.id, S) - } - f.update = Array.from(g.values()) - } - return f - }, T.a1 = fu, T.a2 = Oo, T.a3 = 25, T.a4 = Xp, T.a5 = i => { - const t = window.document.createElement("video"); - return t.muted = !0, new Promise((r => { - t.onloadstart = () => { - r(t) - }; - for (const a of i) { - const c = window.document.createElement("source"); - Le(a) || (t.crossOrigin = "Anonymous"), c.src = a, t.appendChild(c) - } - })) - }, T.a6 = Tt, T.a7 = function() { - return It++ - }, T.a8 = z, T.a9 = Nl, T.aA = function(i) { - let t = 1 / 0, - r = 1 / 0, - a = -1 / 0, - c = -1 / 0; - for (const p of i) t = Math.min(t, p.x), r = Math.min(r, p.y), a = Math.max(a, p.x), c = Math.max(c, p.y); - return [t, r, a, c] - }, T.aB = bn, T.aC = Pe, T.aD = function(i, t, r, a, c = !1) { - if (!r[0] && !r[1]) return [0, 0]; - const p = c ? a === "map" ? -i.bearingInRadians : 0 : a === "viewport" ? i.bearingInRadians : 0; - if (p) { - const f = Math.sin(p), - g = Math.cos(p); - r = [r[0] * g - r[1] * f, r[0] * f + r[1] * g] - } - return [c ? r[0] : Pe(t, r[0], i.zoom), c ? r[1] : Pe(t, r[1], i.zoom)] - }, T.aF = Vp, T.aG = Yp, T.aH = qp, T.aI = Jp, T.aJ = Hi, T.aK = cd, T.aL = he, T.aM = Wr, T.aN = ki, T.aO = tt, T.aP = Mr, T.aQ = A_, T.aR = Be, T.aS = Je, T.aT = function(i) { - var t = new Ee(3); - return t[0] = i[0], t[1] = i[1], t[2] = i[2], t - }, T.aU = function(i, t, r) { - return i[0] = t[0] - r[0], i[1] = t[1] - r[1], i[2] = t[2] - r[2], i - }, T.aV = function(i, t) { - var r = t[0], - a = t[1], - c = t[2], - p = r * r + a * a + c * c; - return p > 0 && (p = 1 / Math.sqrt(p)), i[0] = t[0] * p, i[1] = t[1] * p, i[2] = t[2] * p, i - }, T.aW = st, T.aX = function(i, t) { - return i[0] * t[0] + i[1] * t[1] + i[2] * t[2] - }, T.aY = function(i, t, r) { - return i[0] = t[0] * r[0], i[1] = t[1] * r[1], i[2] = t[2] * r[2], i[3] = t[3] * r[3], i - }, T.aZ = Xe, T.a_ = function(i, t, r) { - const a = t[0] * r[0] + t[1] * r[1] + t[2] * r[2]; - return a === 0 ? null : (-(i[0] * r[0] + i[1] * r[1] + i[2] * r[2]) - r[3]) / a - }, T.aa = bs, T.ab = Wa, T.ac = L_, T.ad = function(i) { - const t = {}; - if (i.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g, ((r, a, c, p) => { - const f = c || p; - return t[a] = !f || f.toLowerCase(), "" - })), t["max-age"]) { - const r = parseInt(t["max-age"], 10); - isNaN(r) ? delete t["max-age"] : t["max-age"] = r - } - return t - }, T.ae = ur, T.af = function(i) { - return Math.pow(2, i) - }, T.ag = ft, T.ah = xt, T.ai = 85.051129, T.aj = M_, T.ak = function(i) { - return Math.log(i) / Math.LN2 - }, T.al = function(i) { - var t = i[0], - r = i[1]; - return t * t + r * r - }, T.am = function(i, t) { - const r = []; - for (const a in i) a in t || r.push(a); - return r - }, T.an = function(i, t) { - let r = 0, - a = 0; - if (i.kind === "constant") a = i.layoutSize; - else if (i.kind !== "source") { - const { - interpolationType: c, - minZoom: p, - maxZoom: f - } = i, g = c ? xt(In.interpolationFactor(c, t, p, f), 0, 1) : 0; - i.kind === "camera" ? a = Fa.number(i.minSize, i.maxSize, g) : r = g - } - return { - uSizeT: r, - uSize: a - } - }, T.ap = function(i, { - uSize: t, - uSizeT: r - }, { - lowerSize: a, - upperSize: c - }) { - return i.kind === "source" ? a / As : i.kind === "composite" ? Fa.number(a / As, c / As, r) : t - }, T.aq = function(i, t) { - var r = t[0], - a = t[1], - c = t[2], - p = t[3], - f = t[4], - g = t[5], - v = t[6], - S = t[7], - I = t[8], - E = t[9], - R = t[10], - N = t[11], - j = t[12], - Z = t[13], - Y = t[14], - ae = t[15], - ze = r * g - a * f, - me = r * v - c * f, - be = r * S - p * f, - Ve = a * v - c * g, - rt = a * S - p * g, - St = c * S - p * v, - $t = I * Z - E * j, - Bt = I * Y - R * j, - Ut = I * ae - N * j, - pr = E * Y - R * Z, - Vt = E * ae - N * Z, - Zt = R * ae - N * Y, - mt = ze * Zt - me * Vt + be * pr + Ve * Ut - rt * Bt + St * $t; - return mt ? (i[0] = (g * Zt - v * Vt + S * pr) * (mt = 1 / mt), i[1] = (c * Vt - a * Zt - p * pr) * mt, i[2] = (Z * St - Y * rt + ae * Ve) * mt, i[3] = (R * rt - E * St - N * Ve) * mt, i[4] = (v * Ut - f * Zt - S * Bt) * mt, i[5] = (r * Zt - c * Ut + p * Bt) * mt, i[6] = (Y * be - j * St - ae * me) * mt, i[7] = (I * St - R * be + N * me) * mt, i[8] = (f * Vt - g * Ut + S * $t) * mt, i[9] = (a * Ut - r * Vt - p * $t) * mt, i[10] = (j * rt - Z * be + ae * ze) * mt, i[11] = (E * be - I * rt - N * ze) * mt, i[12] = (g * Bt - f * pr - v * $t) * mt, i[13] = (r * pr - a * Bt + c * $t) * mt, i[14] = (Z * me - j * Ve - Y * ze) * mt, i[15] = (I * Ve - E * me + R * ze) * mt, i) : null - }, T.ar = te, T.as = function(i) { - return Math.hypot(i[0], i[1]) - }, T.at = function(i) { - return i[0] = 0, i[1] = 0, i - }, T.au = function(i, t, r) { - return i[0] = t[0] * r, i[1] = t[1] * r, i - }, T.av = Up, T.aw = ke, T.ax = function(i, t, r, a) { - const c = t.y - i.y, - p = t.x - i.x, - f = a.y - r.y, - g = a.x - r.x, - v = f * p - g * c; - if (v === 0) return null; - const S = (g * (i.y - r.y) - f * (i.x - r.x)) / v; - return new $(i.x + S * p, i.y + S * c) - }, T.ay = B_, T.az = Sm, T.b = ar, T.b$ = class extends h {}, T.b0 = function(i, t, r) { - return i[0] = t[0] * r, i[1] = t[1] * r, i[2] = t[2] * r, i[3] = t[3] * r, i - }, T.b1 = function(i, t) { - return i[0] * t[0] + i[1] * t[1] + i[2] * t[2] + i[3] - }, T.b2 = E_, T.b3 = jl, T.b4 = function(i, t, r, a, c) { - var p, f = 1 / Math.tan(t / 2); - return i[0] = f / r, i[1] = 0, i[2] = 0, i[3] = 0, i[4] = 0, i[5] = f, i[6] = 0, i[7] = 0, i[8] = 0, i[9] = 0, i[11] = -1, i[12] = 0, i[13] = 0, i[15] = 0, c != null && c !== 1 / 0 ? (i[10] = (c + a) * (p = 1 / (a - c)), i[14] = 2 * c * a * p) : (i[10] = -1, i[14] = -2 * a), i - }, T.b5 = function(i) { - var t = new Ee(16); - return t[0] = i[0], t[1] = i[1], t[2] = i[2], t[3] = i[3], t[4] = i[4], t[5] = i[5], t[6] = i[6], t[7] = i[7], t[8] = i[8], t[9] = i[9], t[10] = i[10], t[11] = i[11], t[12] = i[12], t[13] = i[13], t[14] = i[14], t[15] = i[15], t - }, T.b6 = function(i, t, r) { - var a = Math.sin(r), - c = Math.cos(r), - p = t[0], - f = t[1], - g = t[2], - v = t[3], - S = t[4], - I = t[5], - E = t[6], - R = t[7]; - return t !== i && (i[8] = t[8], i[9] = t[9], i[10] = t[10], i[11] = t[11], i[12] = t[12], i[13] = t[13], i[14] = t[14], i[15] = t[15]), i[0] = p * c + S * a, i[1] = f * c + I * a, i[2] = g * c + E * a, i[3] = v * c + R * a, i[4] = S * c - p * a, i[5] = I * c - f * a, i[6] = E * c - g * a, i[7] = R * c - v * a, i - }, T.b7 = function(i, t, r) { - var a = Math.sin(r), - c = Math.cos(r), - p = t[4], - f = t[5], - g = t[6], - v = t[7], - S = t[8], - I = t[9], - E = t[10], - R = t[11]; - return t !== i && (i[0] = t[0], i[1] = t[1], i[2] = t[2], i[3] = t[3], i[12] = t[12], i[13] = t[13], i[14] = t[14], i[15] = t[15]), i[4] = p * c + S * a, i[5] = f * c + I * a, i[6] = g * c + E * a, i[7] = v * c + R * a, i[8] = S * c - p * a, i[9] = I * c - f * a, i[10] = E * c - g * a, i[11] = R * c - v * a, i - }, T.b8 = function() { - const i = new Float32Array(16); - return ft(i), i - }, T.b9 = function() { - const i = new Float64Array(16); - return ft(i), i - }, T.bA = function(i, t) { - const r = Me(i, 360), - a = Me(t, 360), - c = a - r, - p = a > r ? c - 360 : c + 360; - return Math.abs(c) < Math.abs(p) ? c : p - }, T.bB = function(i) { - return i[0] = 0, i[1] = 0, i[2] = 0, i - }, T.bC = function(i, t, r, a) { - const c = Math.sqrt(i * i + t * t), - p = Math.sqrt(r * r + a * a); - i /= c, t /= c, r /= p, a /= p; - const f = Math.acos(i * r + t * a); - return -t * r + i * a > 0 ? f : -f - }, T.bD = function(i, t) { - const r = Me(i, 2 * Math.PI), - a = Me(t, 2 * Math.PI); - return Math.min(Math.abs(r - a), Math.abs(r - a + 2 * Math.PI), Math.abs(r - a - 2 * Math.PI)) - }, T.bE = function() { - const i = {}, - t = xe.$version; - for (const r in xe.$root) { - const a = xe.$root[r]; - if (a.required) { - let c = null; - c = r === "version" ? t : a.type === "array" ? [] : {}, c != null && (i[r] = c) - } - } - return i - }, T.bF = bl, T.bG = le, T.bH = function i(t, r) { - if (Array.isArray(t)) { - if (!Array.isArray(r) || t.length !== r.length) return !1; - for (let a = 0; a < t.length; a++) - if (!i(t[a], r[a])) return !1; - return !0 - } - if (typeof t == "object" && t !== null && r !== null) { - if (typeof r != "object" || Object.keys(t).length !== Object.keys(r).length) return !1; - for (const a in t) - if (!i(t[a], r[a])) return !1; - return !0 - } - return t === r - }, T.bI = function(i) { - i = i.slice(); - const t = Object.create(null); - for (let r = 0; r < i.length; r++) t[i[r].id] = i[r]; - for (let r = 0; r < i.length; r++) "ref" in i[r] && (i[r] = Pt(i[r], t[i[r].ref])); - return i - }, T.bJ = function(i) { - if (i.type === "custom") return new sy(i); - switch (i.type) { - case "background": - return new iy(i); - case "circle": - return new Vv(i); - case "color-relief": - return new Wv(i); - case "fill": - return new c0(i); - case "fill-extrusion": - return new x0(i); - case "heatmap": - return new Zv(i); - case "hillshade": - return new Gv(i); - case "line": - return new I0(i); - case "raster": - return new ay(i); - case "symbol": - return new fd(i) - } - }, T.bK = wt, T.bL = function(i, t) { - if (!i) return [{ - command: "setStyle", - args: [t] - }]; - let r = []; - try { - if (!kt(i.version, t.version)) return [{ - command: "setStyle", - args: [t] - }]; - kt(i.center, t.center) || r.push({ - command: "setCenter", - args: [t.center] - }), kt(i.state, t.state) || r.push({ - command: "setGlobalState", - args: [t.state] - }), kt(i.centerAltitude, t.centerAltitude) || r.push({ - command: "setCenterAltitude", - args: [t.centerAltitude] - }), kt(i.zoom, t.zoom) || r.push({ - command: "setZoom", - args: [t.zoom] - }), kt(i.bearing, t.bearing) || r.push({ - command: "setBearing", - args: [t.bearing] - }), kt(i.pitch, t.pitch) || r.push({ - command: "setPitch", - args: [t.pitch] - }), kt(i.roll, t.roll) || r.push({ - command: "setRoll", - args: [t.roll] - }), kt(i.sprite, t.sprite) || r.push({ - command: "setSprite", - args: [t.sprite] - }), kt(i.glyphs, t.glyphs) || r.push({ - command: "setGlyphs", - args: [t.glyphs] - }), kt(i.transition, t.transition) || r.push({ - command: "setTransition", - args: [t.transition] - }), kt(i.light, t.light) || r.push({ - command: "setLight", - args: [t.light] - }), kt(i.terrain, t.terrain) || r.push({ - command: "setTerrain", - args: [t.terrain] - }), kt(i.sky, t.sky) || r.push({ - command: "setSky", - args: [t.sky] - }), kt(i.projection, t.projection) || r.push({ - command: "setProjection", - args: [t.projection] - }); - const a = {}, - c = []; - (function(f, g, v, S) { - let I; - for (I in g = g || {}, f = f || {}) Object.prototype.hasOwnProperty.call(f, I) && (Object.prototype.hasOwnProperty.call(g, I) || Kr(I, v, S)); - for (I in g) Object.prototype.hasOwnProperty.call(g, I) && (Object.prototype.hasOwnProperty.call(f, I) ? kt(f[I], g[I]) || (f[I].type === "geojson" && g[I].type === "geojson" && $r(f, g, I) ? Wt(v, { - command: "setGeoJSONSourceData", - args: [I, g[I].data] - }) : Hr(I, g, v, S)) : Lr(I, g, v)) - })(i.sources, t.sources, c, a); - const p = []; - i.layers && i.layers.forEach((f => { - "source" in f && a[f.source] ? r.push({ - command: "removeLayer", - args: [f.id] - }) : p.push(f) - })), r = r.concat(c), (function(f, g, v) { - g = g || []; - const S = (f = f || []).map(gr), - I = g.map(gr), - E = f.reduce(ai, {}), - R = g.reduce(ai, {}), - N = S.slice(), - j = Object.create(null); - let Z, Y, ae, ze, me; - for (let be = 0, Ve = 0; be < S.length; be++) Z = S[be], Object.prototype.hasOwnProperty.call(R, Z) ? Ve++ : (Wt(v, { - command: "removeLayer", - args: [Z] - }), N.splice(N.indexOf(Z, Ve), 1)); - for (let be = 0, Ve = 0; be < I.length; be++) Z = I[I.length - 1 - be], N[N.length - 1 - be] !== Z && (Object.prototype.hasOwnProperty.call(E, Z) ? (Wt(v, { - command: "removeLayer", - args: [Z] - }), N.splice(N.lastIndexOf(Z, N.length - Ve), 1)) : Ve++, ze = N[N.length - be], Wt(v, { - command: "addLayer", - args: [R[Z], ze] - }), N.splice(N.length - be, 0, Z), j[Z] = !0); - for (let be = 0; be < I.length; be++) - if (Z = I[be], Y = E[Z], ae = R[Z], !j[Z] && !kt(Y, ae)) - if (kt(Y.source, ae.source) && kt(Y["source-layer"], ae["source-layer"]) && kt(Y.type, ae.type)) { - for (me in mr(Y.layout, ae.layout, v, Z, null, "setLayoutProperty"), mr(Y.paint, ae.paint, v, Z, null, "setPaintProperty"), kt(Y.filter, ae.filter) || Wt(v, { - command: "setFilter", - args: [Z, ae.filter] - }), kt(Y.minzoom, ae.minzoom) && kt(Y.maxzoom, ae.maxzoom) || Wt(v, { - command: "setLayerZoomRange", - args: [Z, ae.minzoom, ae.maxzoom] - }), Y) Object.prototype.hasOwnProperty.call(Y, me) && me !== "layout" && me !== "paint" && me !== "filter" && me !== "metadata" && me !== "minzoom" && me !== "maxzoom" && (me.indexOf("paint.") === 0 ? mr(Y[me], ae[me], v, Z, me.slice(6), "setPaintProperty") : kt(Y[me], ae[me]) || Wt(v, { - command: "setLayerProperty", - args: [Z, me, ae[me]] - })); - for (me in ae) Object.prototype.hasOwnProperty.call(ae, me) && !Object.prototype.hasOwnProperty.call(Y, me) && me !== "layout" && me !== "paint" && me !== "filter" && me !== "metadata" && me !== "minzoom" && me !== "maxzoom" && (me.indexOf("paint.") === 0 ? mr(Y[me], ae[me], v, Z, me.slice(6), "setPaintProperty") : kt(Y[me], ae[me]) || Wt(v, { - command: "setLayerProperty", - args: [Z, me, ae[me]] - })) - } else Wt(v, { - command: "removeLayer", - args: [Z] - }), ze = N[N.lastIndexOf(Z) + 1], Wt(v, { - command: "addLayer", - args: [ae, ze] - }) - })(p, t.layers, r) - } catch (a) { - console.warn("Unable to compute style diff:", a), r = [{ - command: "setStyle", - args: [t] - }] - } - return r - }, T.bM = function(i) { - const t = [], - r = i.id; - return r === void 0 && t.push({ - message: `layers.${r}: missing required property "id"` - }), i.render === void 0 && t.push({ - message: `layers.${r}: missing required method "render"` - }), i.renderingMode && i.renderingMode !== "2d" && i.renderingMode !== "3d" && t.push({ - message: `layers.${r}: property "renderingMode" must be either "2d" or "3d"` - }), t - }, T.bN = ut, T.bO = bt, T.bP = class extends Vn { - constructor(i, t) { - super(i, t), this.current = 0 - } - set(i) { - this.current !== i && (this.current = i, this.gl.uniform1i(this.location, i)) - } - }, T.bQ = pn, T.bR = class extends Vn { - constructor(i, t) { - super(i, t), this.current = da - } - set(i) { - if (i[12] !== this.current[12] || i[0] !== this.current[0]) return this.current = i, void this.gl.uniformMatrix4fv(this.location, !1, i); - for (let t = 1; t < 16; t++) - if (i[t] !== this.current[t]) { - this.current = i, this.gl.uniformMatrix4fv(this.location, !1, i); - break - } - } - }, T.bS = en, T.bT = class extends Vn { - constructor(i, t) { - super(i, t), this.current = [0, 0, 0] - } - set(i) { - i[0] === this.current[0] && i[1] === this.current[1] && i[2] === this.current[2] || (this.current = i, this.gl.uniform3f(this.location, i[0], i[1], i[2])) - } - }, T.bU = class extends Vn { - constructor(i, t) { - super(i, t), this.current = [0, 0] - } - set(i) { - i[0] === this.current[0] && i[1] === this.current[1] || (this.current = i, this.gl.uniform2f(this.location, i[0], i[1])) - } - }, T.bV = Ne, T.bW = function(i, t) { - var r = Math.sin(t), - a = Math.cos(t); - return i[0] = a, i[1] = r, i[2] = 0, i[3] = -r, i[4] = a, i[5] = 0, i[6] = 0, i[7] = 0, i[8] = 1, i - }, T.bX = function(i, t, r) { - var a = t[0], - c = t[1], - p = t[2]; - return i[0] = a * r[0] + c * r[3] + p * r[6], i[1] = a * r[1] + c * r[4] + p * r[7], i[2] = a * r[2] + c * r[5] + p * r[8], i - }, T.bY = function(i, t, r, a, c, p, f) { - var g = 1 / (t - r), - v = 1 / (a - c), - S = 1 / (p - f); - return i[0] = -2 * g, i[1] = 0, i[2] = 0, i[3] = 0, i[4] = 0, i[5] = -2 * v, i[6] = 0, i[7] = 0, i[8] = 0, i[9] = 0, i[10] = 2 * S, i[11] = 0, i[12] = (t + r) * g, i[13] = (c + a) * v, i[14] = (f + p) * S, i[15] = 1, i - }, T.bZ = class extends Vn { - constructor(i, t) { - super(i, t), this.current = new Array - } - set(i) { - if (i != this.current) { - this.current = i; - const t = new Float32Array(4 * i.length); - for (let r = 0; r < i.length; r++) t[4 * r] = i[r].r, t[4 * r + 1] = i[r].g, t[4 * r + 2] = i[r].b, t[4 * r + 3] = i[r].a; - this.gl.uniform4fv(this.location, t) - } - } - }, T.b_ = class extends Vn { - constructor(i, t) { - super(i, t), this.current = new Array - } - set(i) { - if (i != this.current) { - this.current = i; - const t = new Float32Array(i); - this.gl.uniform1fv(this.location, t) - } - } - }, T.ba = function() { - return new Float64Array(16) - }, T.bb = function(i, t, r) { - const a = new Float64Array(4); - return Q(a, i, t - 90, r), a - }, T.bc = function(i, t, r, a) { - var c, p, f, g, v, S = t[0], - I = t[1], - E = t[2], - R = t[3], - N = r[0], - j = r[1], - Z = r[2], - Y = r[3]; - return (p = S * N + I * j + E * Z + R * Y) < 0 && (p = -p, N = -N, j = -j, Z = -Z, Y = -Y), 1 - p > Oe ? (c = Math.acos(p), f = Math.sin(c), g = Math.sin((1 - a) * c) / f, v = Math.sin(a * c) / f) : (g = 1 - a, v = a), i[0] = g * S + v * N, i[1] = g * I + v * j, i[2] = g * E + v * Z, i[3] = g * R + v * Y, i - }, T.bd = function(i) { - const t = new Float64Array(9); - var r, a, c, p, f, g, v, S, I, E, R, N, j, Z, Y, ae, ze, me; - E = (c = (a = i)[0]) * (v = c + c), R = (p = a[1]) * v, j = (f = a[2]) * v, Z = f * (S = p + p), ae = (g = a[3]) * v, ze = g * S, me = g * (I = f + f), (r = t)[0] = 1 - (N = p * S) - (Y = f * I), r[3] = R - me, r[6] = j + ze, r[1] = R + me, r[4] = 1 - E - Y, r[7] = Z - ae, r[2] = j - ze, r[5] = Z + ae, r[8] = 1 - E - N; - const be = Mr(-Math.asin(xt(t[2], -1, 1))); - let Ve, rt; - return Math.hypot(t[5], t[8]) < .001 ? (Ve = 0, rt = -Mr(Math.atan2(t[3], t[4]))) : (Ve = Mr(t[5] === 0 && t[8] === 0 ? 0 : Math.atan2(t[5], t[8])), rt = Mr(t[1] === 0 && t[0] === 0 ? 0 : Math.atan2(t[1], t[0]))), { - roll: Ve, - pitch: be + 90, - bearing: rt - } - }, T.be = function(i, t) { - return i.roll == t.roll && i.pitch == t.pitch && i.bearing == t.bearing - }, T.bf = yr, T.bg = os, T.bh = Rl, T.bi = lu, T.bj = Dl, T.bk = at, T.bl = We, T.bm = hn, T.bn = function(i, t, r, a, c) { - return at(a, c, xt((i - t) / (r - t), 0, 1)) - }, T.bo = Me, T.bp = function() { - return new Float64Array(3) - }, T.bq = function(i, t, r, a) { - return i[0] = t[0] + r[0] * a, i[1] = t[1] + r[1] * a, i[2] = t[2] + r[2] * a, i - }, T.br = Q, T.bs = function(i, t, r) { - var a = r[0], - c = r[1], - p = r[2], - f = t[0], - g = t[1], - v = t[2], - S = c * v - p * g, - I = p * f - a * v, - E = a * g - c * f, - R = c * E - p * I, - N = p * S - a * E, - j = a * I - c * S, - Z = 2 * r[3]; - return I *= Z, E *= Z, N *= 2, j *= 2, i[0] = f + (S *= Z) + (R *= 2), i[1] = g + I + N, i[2] = v + E + j, i - }, T.bt = function(i, t, r) { - const a = (c = [i[0], i[1], i[2], t[0], t[1], t[2], r[0], r[1], r[2]])[0] * ((I = c[8]) * (f = c[4]) - (g = c[5]) * (S = c[7])) + c[1] * (-I * (p = c[3]) + g * (v = c[6])) + c[2] * (S * p - f * v); - var c, p, f, g, v, S, I; - if (a === 0) return null; - const E = st([], [t[0], t[1], t[2]], [r[0], r[1], r[2]]), - R = st([], [r[0], r[1], r[2]], [i[0], i[1], i[2]]), - N = st([], [i[0], i[1], i[2]], [t[0], t[1], t[2]]), - j = Be([], E, -i[3]); - return Je(j, j, Be([], R, -t[3])), Je(j, j, Be([], N, -r[3])), Be(j, j, 1 / a), j - }, T.bu = Hp, T.bv = function() { - return new Float64Array(4) - }, T.bw = function(i, t, r, a) { - var c = [], - p = []; - return c[0] = t[0] - r[0], c[1] = t[1] - r[1], c[2] = t[2] - r[2], p[0] = c[0] * Math.cos(a) - c[1] * Math.sin(a), p[1] = c[0] * Math.sin(a) + c[1] * Math.cos(a), p[2] = c[2], i[0] = p[0] + r[0], i[1] = p[1] + r[1], i[2] = p[2] + r[2], i - }, T.bx = function(i, t, r, a) { - var c = [], - p = []; - return c[0] = t[0] - r[0], c[1] = t[1] - r[1], c[2] = t[2] - r[2], p[0] = c[0], p[1] = c[1] * Math.cos(a) - c[2] * Math.sin(a), p[2] = c[1] * Math.sin(a) + c[2] * Math.cos(a), i[0] = p[0] + r[0], i[1] = p[1] + r[1], i[2] = p[2] + r[2], i - }, T.by = function(i, t, r, a) { - var c = [], - p = []; - return c[0] = t[0] - r[0], c[1] = t[1] - r[1], c[2] = t[2] - r[2], p[0] = c[2] * Math.sin(a) + c[0] * Math.cos(a), p[1] = c[1], p[2] = c[2] * Math.cos(a) - c[0] * Math.sin(a), i[0] = p[0] + r[0], i[1] = p[1] + r[1], i[2] = p[2] + r[2], i - }, T.bz = function(i, t, r) { - var a = Math.sin(r), - c = Math.cos(r), - p = t[0], - f = t[1], - g = t[2], - v = t[3], - S = t[8], - I = t[9], - E = t[10], - R = t[11]; - return t !== i && (i[4] = t[4], i[5] = t[5], i[6] = t[6], i[7] = t[7], i[12] = t[12], i[13] = t[13], i[14] = t[14], i[15] = t[15]), i[0] = p * c - S * a, i[1] = f * c - I * a, i[2] = g * c - E * a, i[3] = v * c - R * a, i[8] = p * a + S * c, i[9] = f * a + I * c, i[10] = g * a + E * c, i[11] = v * a + R * c, i - }, T.c = ce, T.c0 = E0, T.c1 = class extends n {}, T.c2 = Ip, T.c3 = function(i) { - return i <= 1 ? 1 : Math.pow(2, Math.ceil(Math.log(i) / Math.LN2)) - }, T.c4 = Rm, T.c5 = function(i, t, r) { - var a = t[0], - c = t[1], - p = t[2], - f = r[3] * a + r[7] * c + r[11] * p + r[15]; - return i[0] = (r[0] * a + r[4] * c + r[8] * p + r[12]) / (f = f || 1), i[1] = (r[1] * a + r[5] * c + r[9] * p + r[13]) / f, i[2] = (r[2] * a + r[6] * c + r[10] * p + r[14]) / f, i - }, T.c6 = class extends Yc {}, T.c7 = class extends P {}, T.c8 = function(i, t) { - return i[0] === t[0] && i[1] === t[1] && i[2] === t[2] && i[3] === t[3] && i[4] === t[4] && i[5] === t[5] && i[6] === t[6] && i[7] === t[7] && i[8] === t[8] && i[9] === t[9] && i[10] === t[10] && i[11] === t[11] && i[12] === t[12] && i[13] === t[13] && i[14] === t[14] && i[15] === t[15] - }, T.c9 = function(i, t) { - var r = i[0], - a = i[1], - c = i[2], - p = i[3], - f = i[4], - g = i[5], - v = i[6], - S = i[7], - I = i[8], - E = i[9], - R = i[10], - N = i[11], - j = i[12], - Z = i[13], - Y = i[14], - ae = i[15], - ze = t[0], - me = t[1], - be = t[2], - Ve = t[3], - rt = t[4], - St = t[5], - $t = t[6], - Bt = t[7], - Ut = t[8], - pr = t[9], - Vt = t[10], - Zt = t[11], - mt = t[12], - Br = t[13], - Ur = t[14], - xr = t[15]; - return Math.abs(r - ze) <= Oe * Math.max(1, Math.abs(r), Math.abs(ze)) && Math.abs(a - me) <= Oe * Math.max(1, Math.abs(a), Math.abs(me)) && Math.abs(c - be) <= Oe * Math.max(1, Math.abs(c), Math.abs(be)) && Math.abs(p - Ve) <= Oe * Math.max(1, Math.abs(p), Math.abs(Ve)) && Math.abs(f - rt) <= Oe * Math.max(1, Math.abs(f), Math.abs(rt)) && Math.abs(g - St) <= Oe * Math.max(1, Math.abs(g), Math.abs(St)) && Math.abs(v - $t) <= Oe * Math.max(1, Math.abs(v), Math.abs($t)) && Math.abs(S - Bt) <= Oe * Math.max(1, Math.abs(S), Math.abs(Bt)) && Math.abs(I - Ut) <= Oe * Math.max(1, Math.abs(I), Math.abs(Ut)) && Math.abs(E - pr) <= Oe * Math.max(1, Math.abs(E), Math.abs(pr)) && Math.abs(R - Vt) <= Oe * Math.max(1, Math.abs(R), Math.abs(Vt)) && Math.abs(N - Zt) <= Oe * Math.max(1, Math.abs(N), Math.abs(Zt)) && Math.abs(j - mt) <= Oe * Math.max(1, Math.abs(j), Math.abs(mt)) && Math.abs(Z - Br) <= Oe * Math.max(1, Math.abs(Z), Math.abs(Br)) && Math.abs(Y - Ur) <= Oe * Math.max(1, Math.abs(Y), Math.abs(Ur)) && Math.abs(ae - xr) <= Oe * Math.max(1, Math.abs(ae), Math.abs(xr)) - }, T.cA = function(i, t) { - O.REGISTERED_PROTOCOLS[i] = t - }, T.cB = function(i) { - delete O.REGISTERED_PROTOCOLS[i] - }, T.cC = function(i, t) { - const r = {}; - for (let c = 0; c < i.length; c++) { - const p = t && t[i[c].id] || mp(i[c]); - t && (t[i[c].id] = p); - let f = r[p]; - f || (f = r[p] = []), f.push(i[c]) - } - const a = []; - for (const c in r) a.push(r[c]); - return a - }, T.cD = Kt, T.cE = z_, T.cF = D_, T.cG = u_, T.cH = function(i) { - i.bucket.createArrays(), i.bucket.tilePixelRatio = ne / (512 * i.bucket.overscaling), i.bucket.compareText = {}, i.bucket.iconsNeedLinear = !1; - const t = i.bucket.layers[0], - r = t.layout, - a = t._unevaluatedLayout._values, - c = { - layoutIconSize: a["icon-size"].possiblyEvaluate(new Oi(i.bucket.zoom + 1), i.canonical), - layoutTextSize: a["text-size"].possiblyEvaluate(new Oi(i.bucket.zoom + 1), i.canonical), - textMaxSize: a["text-size"].possiblyEvaluate(new Oi(18)) - }; - if (i.bucket.textSizeData.kind === "composite") { - const { - minZoom: S, - maxZoom: I - } = i.bucket.textSizeData; - c.compositeTextSizes = [a["text-size"].possiblyEvaluate(new Oi(S), i.canonical), a["text-size"].possiblyEvaluate(new Oi(I), i.canonical)] - } - if (i.bucket.iconSizeData.kind === "composite") { - const { - minZoom: S, - maxZoom: I - } = i.bucket.iconSizeData; - c.compositeIconSizes = [a["icon-size"].possiblyEvaluate(new Oi(S), i.canonical), a["icon-size"].possiblyEvaluate(new Oi(I), i.canonical)] - } - const p = r.get("text-line-height") * bn, - f = r.get("text-rotation-alignment") !== "viewport" && r.get("symbol-placement") !== "point", - g = r.get("text-keep-upright"), - v = r.get("text-size"); - for (const S of i.bucket.features) { - const I = r.get("text-font").evaluate(S, {}, i.canonical).join(","), - E = v.evaluate(S, {}, i.canonical), - R = c.layoutTextSize.evaluate(S, {}, i.canonical), - N = c.layoutIconSize.evaluate(S, {}, i.canonical), - j = { - horizontal: {}, - vertical: void 0 - }, - Z = S.text; - let Y, ae = [0, 0]; - if (Z) { - const be = Z.toString(), - Ve = r.get("text-letter-spacing").evaluate(S, {}, i.canonical) * bn, - rt = yp(be) ? Ve : 0, - St = r.get("text-anchor").evaluate(S, {}, i.canonical), - $t = $_(t, S, i.canonical); - if (!$t) { - const Vt = r.get("text-radial-offset").evaluate(S, {}, i.canonical); - ae = Vt ? Z_(St, [Vt * bn, Kp]) : r.get("text-offset").evaluate(S, {}, i.canonical).map((Zt => Zt * bn)) - } - let Bt = f ? "center" : r.get("text-justify").evaluate(S, {}, i.canonical); - const Ut = r.get("symbol-placement") === "point" ? r.get("text-max-width").evaluate(S, {}, i.canonical) * bn : 1 / 0, - pr = () => { - i.bucket.allowVerticalPlacement && wl(be) && (j.vertical = hd(Z, i.glyphMap, i.glyphPositions, i.imagePositions, I, Ut, p, St, "left", rt, ae, T.ao.vertical, !0, R, E)) - }; - if (!f && $t) { - const Vt = new Set; - if (Bt === "auto") - for (let mt = 0; mt < $t.values.length; mt += 2) Vt.add(Yp($t.values[mt])); - else Vt.add(Bt); - let Zt = !1; - for (const mt of Vt) - if (!j.horizontal[mt]) - if (Zt) j.horizontal[mt] = j.horizontal[0]; - else { - const Br = hd(Z, i.glyphMap, i.glyphPositions, i.imagePositions, I, Ut, p, "center", mt, rt, ae, T.ao.horizontal, !1, R, E); - Br && (j.horizontal[mt] = Br, Zt = Br.positionedLines.length === 1) - } pr() - } else { - Bt === "auto" && (Bt = Yp(St)); - const Vt = hd(Z, i.glyphMap, i.glyphPositions, i.imagePositions, I, Ut, p, St, Bt, rt, ae, T.ao.horizontal, !1, R, E); - Vt && (j.horizontal[Bt] = Vt), pr(), wl(be) && f && g && (j.vertical = hd(Z, i.glyphMap, i.glyphPositions, i.imagePositions, I, Ut, p, St, Bt, rt, ae, T.ao.vertical, !1, R, E)) - } - } - let ze = !1; - if (S.icon && S.icon.name) { - const be = i.imageMap[S.icon.name]; - be && (Y = Q0(i.imagePositions[S.icon.name], r.get("icon-offset").evaluate(S, {}, i.canonical), r.get("icon-anchor").evaluate(S, {}, i.canonical)), ze = !!be.sdf, i.bucket.sdfIcons === void 0 ? i.bucket.sdfIcons = ze : i.bucket.sdfIcons !== ze && Lt("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"), (be.pixelRatio !== i.bucket.pixelRatio || r.get("icon-rotate").constantOr(1) !== 0) && (i.bucket.iconsNeedLinear = !0)) - } - const me = H_(j.horizontal) || j.vertical; - i.bucket.iconsInText = !!me && me.iconsInText, (me || Y) && my(i.bucket, S, j, Y, i.imageMap, c, R, N, ae, ze, i.canonical, i.subdivisionGranularity) - } - i.showCollisionBoxes && i.bucket.generateCollisionDebugBuffers() - }, T.cI = Bp, T.cJ = Lp, T.cK = Rp, T.cL = Km, T.cM = Op, T.cN = class { - constructor(i) { - this._marks = { - start: [i.url, "start"].join("#"), - end: [i.url, "end"].join("#"), - measure: i.url.toString() - }, performance.mark(this._marks.start) - } - finish() { - performance.mark(this._marks.end); - let i = performance.getEntriesByName(this._marks.measure); - return i.length === 0 && (performance.measure(this._marks.measure, this._marks.start, this._marks.end), i = performance.getEntriesByName(this._marks.measure), performance.clearMarks(this._marks.start), performance.clearMarks(this._marks.end), performance.clearMeasures(this._marks.measure)), i - } - }, T.cO = function(i, t, r, a, c) { - return o(this, void 0, void 0, (function*() { - if (Ae()) try { - return yield dr(i, t, r, a, c) - } catch {} - return (function(p, f, g, v, S) { - const I = p.width, - E = p.height; - _r && Ir || (_r = new OffscreenCanvas(I, E), Ir = _r.getContext("2d", { - willReadFrequently: !0 - })), _r.width = I, _r.height = E, Ir.drawImage(p, 0, 0, I, E); - const R = Ir.getImageData(f, g, v, S); - return Ir.clearRect(0, 0, I, E), R.data - })(i, t, r, a, c) - })) - }, T.cP = Om, T.cQ = W, T.cR = Xm, T.cS = Bl, T.cT = Co, T.cU = function(i, t) { - const r = new Map; - if (i != null) - if (i.type === "Feature") r.set(mu(i, t), i); - else - for (const a of i.features) r.set(mu(a, t), a); - return r - }, T.cV = function(i, t) { - if (i == null) return !0; - if (i.type === "Feature") return mu(i, t) != null; - if (i.type === "FeatureCollection") { - const r = new Set; - for (const a of i.features) { - const c = mu(a, t); - if (c == null || r.has(c)) return !1; - r.add(c) - } - return !0 - } - return !1 - }, T.cW = function(i, t, r) { - var a, c, p, f; - if (t.removeAll && i.clear(), t.remove) - for (const g of t.remove) i.delete(g); - if (t.add) - for (const g of t.add) { - const v = mu(g, r); - v != null && i.set(v, g) - } - if (t.update) - for (const g of t.update) { - let v = i.get(g.id); - if (v == null) continue; - const S = !g.removeAllProperties && (((a = g.removeProperties) === null || a === void 0 ? void 0 : a.length) > 0 || ((c = g.addOrUpdateProperties) === null || c === void 0 ? void 0 : c.length) > 0); - if ((g.newGeometry || g.removeAllProperties || S) && (v = Object.assign({}, v), i.set(g.id, v), S && (v.properties = Object.assign({}, v.properties))), g.newGeometry && (v.geometry = g.newGeometry), g.removeAllProperties) v.properties = {}; - else if (((p = g.removeProperties) === null || p === void 0 ? void 0 : p.length) > 0) - for (const I of g.removeProperties) Object.prototype.hasOwnProperty.call(v.properties, I) && delete v.properties[I]; - if (((f = g.addOrUpdateProperties) === null || f === void 0 ? void 0 : f.length) > 0) - for (const { - key: I, - value: E - } - of g.addOrUpdateProperties) v.properties[I] = E - } - }, T.cX = Ca, T.ca = function(i, t) { - return i[0] = t[0], i[1] = t[1], i[2] = t[2], i[3] = t[3], i[4] = t[4], i[5] = t[5], i[6] = t[6], i[7] = t[7], i[8] = t[8], i[9] = t[9], i[10] = t[10], i[11] = t[11], i[12] = t[12], i[13] = t[13], i[14] = t[14], i[15] = t[15], i - }, T.cb = i => i.type === "symbol", T.cc = i => i.type === "circle", T.cd = i => i.type === "heatmap", T.ce = i => i.type === "line", T.cf = i => i.type === "fill", T.cg = i => i.type === "fill-extrusion", T.ch = i => i.type === "hillshade", T.ci = i => i.type === "color-relief", T.cj = i => i.type === "raster", T.ck = i => i.type === "background", T.cl = i => i.type === "custom", T.cm = Ct, T.cn = function(i, t, r) { - const a = _e(t.x - r.x, t.y - r.y), - c = _e(i.x - r.x, i.y - r.y); - var p, f; - return Mr(Math.atan2(a[0] * c[1] - a[1] * c[0], (p = a)[0] * (f = c)[0] + p[1] * f[1])) - }, T.co = _t, T.cp = function(i, t) { - return kr[t] && (i instanceof MouseEvent || i instanceof WheelEvent) - }, T.cq = function(i, t) { - return Ar[t] && "touches" in i - }, T.cr = function(i) { - return Ar[i] || kr[i] - }, T.cs = function(i, t, r) { - var a = t[0], - c = t[1]; - return i[0] = r[0] * a + r[4] * c + r[12], i[1] = r[1] * a + r[5] * c + r[13], i - }, T.ct = function(i, t) { - const { - x: r, - y: a - } = fu.fromLngLat(t); - return !(i < 0 || i > 25 || a < 0 || a >= 1 || r < 0 || r >= 1) - }, T.cu = function(i, t) { - return i[0] = t[0], i[1] = 0, i[2] = 0, i[3] = 0, i[4] = 0, i[5] = t[1], i[6] = 0, i[7] = 0, i[8] = 0, i[9] = 0, i[10] = t[2], i[11] = 0, i[12] = 0, i[13] = 0, i[14] = 0, i[15] = 1, i - }, T.cv = class extends Xs {}, T.cw = gy, T.cy = function(i) { - return i.message === Nr - }, T.cz = K, T.d = Le, T.e = pt, T.f = i => o(void 0, void 0, void 0, (function*() { - if (i.byteLength === 0) return createImageBitmap(new ImageData(1, 1)); - const t = new Blob([new Uint8Array(i)], { - type: "image/png" - }); - try { - return createImageBitmap(t) - } catch (r) { - throw new Error(`Could not load image because of ${r.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`) - } - })), T.g = q, T.h = i => new Promise(((t, r) => { - const a = new Image; - a.onload = () => { - t(a), URL.revokeObjectURL(a.src), a.onload = null, window.requestAnimationFrame((() => { - a.src = Ft - })) - }, a.onerror = () => r(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 c = new Blob([new Uint8Array(i)], { - type: "image/png" - }); - a.src = i.byteLength ? URL.createObjectURL(c) : Ft - })), T.i = Yt, T.j = (i, t) => ve(pt(i, { - type: "json" - }), t), T.k = Ye, T.l = ot, T.m = ve, T.n = (i, t) => ve(pt(i, { - type: "arrayBuffer" - }), t), T.o = function(i) { - return new Op(i).readFields(V0, []) - }, T.p = c_, T.q = iu, T.r = jn, T.s = jr, T.t = ed, T.u = si, T.v = xe, T.w = Lt, T.x = _p, T.y = Eo, T.z = $s - })), L("worker", ["./shared"], (function(T) { - class o { - constructor(O) { - this.keyCache = {}, O && this.replace(O) - } - replace(O) { - this._layerConfigs = {}, this._layers = {}, this.update(O, []) - } - update(O, q) { - for (const K of O) { - this._layerConfigs[K.id] = K; - const le = this._layers[K.id] = T.bJ(K); - le._featureFilter = T.aa(le.filter), this.keyCache[K.id] && delete this.keyCache[K.id] - } - for (const K of q) delete this.keyCache[K], delete this._layerConfigs[K], delete this._layers[K]; - this.familiesBySource = {}; - const G = T.cC(Object.values(this._layerConfigs), this.keyCache); - for (const K of G) { - const le = K.map((Ye => this._layers[Ye.id])), - ve = le[0]; - if (ve.visibility === "none") continue; - const Le = ve.source || ""; - let Ce = this.familiesBySource[Le]; - Ce || (Ce = this.familiesBySource[Le] = {}); - const Ze = ve.sourceLayer || "_geojsonTileLayer"; - let ot = Ce[Ze]; - ot || (ot = Ce[Ze] = []), ot.push(le) - } - } - } - class $ { - constructor(O) { - const q = {}, - G = []; - for (const Le in O) { - const Ce = O[Le], - Ze = q[Le] = {}; - for (const ot in Ce) { - const Ye = Ce[+ot]; - if (!Ye || Ye.bitmap.width === 0 || Ye.bitmap.height === 0) continue; - const Ot = { - x: 0, - y: 0, - w: Ye.bitmap.width + 2, - h: Ye.bitmap.height + 2 - }; - G.push(Ot), Ze[ot] = { - rect: Ot, - metrics: Ye.metrics - } - } - } - const { - w: K, - h: le - } = T.p(G), ve = new T.q({ - width: K || 1, - height: le || 1 - }); - for (const Le in O) { - const Ce = O[Le]; - for (const Ze in Ce) { - const ot = Ce[+Ze]; - if (!ot || ot.bitmap.width === 0 || ot.bitmap.height === 0) continue; - const Ye = q[Le][Ze].rect; - T.q.copy(ot.bitmap, ve, { - x: 0, - y: 0 - }, { - x: Ye.x + 1, - y: Ye.y + 1 - }, ot.bitmap) - } - } - this.image = ve, this.positions = q - } - } - T.cD("GlyphAtlas", $); - class W { - constructor(O) { - this.tileID = new T.Z(O.tileID.overscaledZ, O.tileID.wrap, O.tileID.canonical.z, O.tileID.canonical.x, O.tileID.canonical.y), this.uid = O.uid, this.zoom = O.zoom, this.pixelRatio = O.pixelRatio, this.tileSize = O.tileSize, this.source = O.source, this.overscaling = this.tileID.overscaleFactor(), this.showCollisionBoxes = O.showCollisionBoxes, this.collectResourceTiming = !!O.collectResourceTiming, this.returnDependencies = !!O.returnDependencies, this.promoteId = O.promoteId, this.inFlightDependencies = [], this.globalState = O.globalState - } - parse(O, q, G, K, le) { - return T._(this, void 0, void 0, (function*() { - this.status = "parsing", this.data = O, this.collisionBoxArray = new T.a8; - const ve = new T.cE(Object.keys(O.layers).sort()), - Le = new T.cF(this.tileID, this.promoteId); - Le.bucketLayerIDs = []; - const Ce = {}, - Ze = { - featureIndex: Le, - iconDependencies: {}, - patternDependencies: {}, - glyphDependencies: {}, - availableImages: G, - subdivisionGranularity: le - }, - ot = q.familiesBySource[this.source]; - for (const mr in ot) { - const gr = O.layers[mr]; - if (!gr) continue; - gr.version === 1 && T.w(`Vector tile source "${this.source}" layer "${mr}" does not use vector tile spec v2 and therefore may have some rendering errors.`); - const ai = ve.encode(mr), - Tt = []; - for (let Ci = 0; Ci < gr.length; Ci++) { - const di = gr.feature(Ci), - Pn = Le.getId(di, mr); - Tt.push({ - feature: di, - id: Pn, - index: Ci, - sourceLayerIndex: ai - }) - } - for (const Ci of ot[mr]) { - const di = Ci[0]; - di.source !== this.source && T.w(`layer.source = ${di.source} does not equal this.source = ${this.source}`), di.minzoom && this.zoom < Math.floor(di.minzoom) || di.maxzoom && this.zoom >= di.maxzoom || di.visibility !== "none" && (ie(Ci, this.zoom, G), (Ce[di.id] = di.createBucket({ - index: Le.bucketLayerIDs.length, - layers: Ci, - zoom: this.zoom, - pixelRatio: this.pixelRatio, - overscaling: this.overscaling, - collisionBoxArray: this.collisionBoxArray, - sourceLayerIndex: ai, - sourceID: this.source, - globalState: this.globalState - })).populate(Tt, Ze, this.tileID.canonical), Le.bucketLayerIDs.push(Ci.map((Pn => Pn.id)))) - } - } - const Ye = T.bN(Ze.glyphDependencies, (mr => Object.keys(mr).map(Number))); - this.inFlightDependencies.forEach((mr => mr == null ? void 0 : mr.abort())), this.inFlightDependencies = []; - let Ot = Promise.resolve({}); - if (Object.keys(Ye).length) { - const mr = new AbortController; - this.inFlightDependencies.push(mr), Ot = K.sendAsync({ - type: "GG", - data: { - stacks: Ye, - source: this.source, - tileID: this.tileID, - type: "glyphs" - } - }, mr) - } - const xe = Object.keys(Ze.iconDependencies); - let At = Promise.resolve({}); - if (xe.length) { - const mr = new AbortController; - this.inFlightDependencies.push(mr), At = K.sendAsync({ - type: "GI", - data: { - icons: xe, - source: this.source, - tileID: this.tileID, - type: "icons" - } - }, mr) - } - const Pt = Object.keys(Ze.patternDependencies); - let kt = Promise.resolve({}); - if (Pt.length) { - const mr = new AbortController; - this.inFlightDependencies.push(mr), kt = K.sendAsync({ - type: "GI", - data: { - icons: Pt, - source: this.source, - tileID: this.tileID, - type: "patterns" - } - }, mr) - } - const [Wt, Lr, Kr] = yield Promise.all([Ot, At, kt]), Hr = new $(Wt), $r = new T.cG(Lr, Kr); - for (const mr in Ce) { - const gr = Ce[mr]; - gr instanceof T.a9 ? (ie(gr.layers, this.zoom, G), T.cH({ - bucket: gr, - glyphMap: Wt, - glyphPositions: Hr.positions, - imageMap: Lr, - imagePositions: $r.iconPositions, - showCollisionBoxes: this.showCollisionBoxes, - canonical: this.tileID.canonical, - subdivisionGranularity: Ze.subdivisionGranularity - })) : gr.hasPattern && (gr instanceof T.cI || gr instanceof T.cJ || gr instanceof T.cK) && (ie(gr.layers, this.zoom, G), gr.addFeatures(Ze, this.tileID.canonical, $r.patternPositions)) - } - return this.status = "done", { - buckets: Object.values(Ce).filter((mr => !mr.isEmpty())), - featureIndex: Le, - collisionBoxArray: this.collisionBoxArray, - glyphAtlasImage: Hr.image, - imageAtlas: $r, - glyphMap: this.returnDependencies ? Wt : null, - iconMap: this.returnDependencies ? Lr : null, - glyphPositions: this.returnDependencies ? Hr.positions : null - } - })) - } - } - - function ie(ce, O, q) { - const G = new T.F(O); - for (const K of ce) K.recalculate(G, q) - } - class pe { - constructor(O, q, G) { - this.actor = O, this.layerIndex = q, this.availableImages = G, this.fetching = {}, this.loading = {}, this.loaded = {} - } - loadVectorTile(O, q) { - return T._(this, void 0, void 0, (function*() { - const G = yield T.n(O.request, q); - try { - return { - vectorTile: new T.cL(new T.cM(G.data)), - rawData: G.data, - cacheControl: G.cacheControl, - expires: G.expires - } - } catch (K) { - const le = new Uint8Array(G.data); - let ve = `Unable to parse the tile at ${O.request.url}, `; - throw ve += le[0] === 31 && le[1] === 139 ? "please make sure the data is not gzipped and that you have configured the relevant header in the server" : `got error: ${K.message}`, new Error(ve) - } - })) - } - loadTile(O) { - return T._(this, void 0, void 0, (function*() { - const q = O.uid, - G = !!(O && O.request && O.request.collectResourceTiming) && new T.cN(O.request), - K = new W(O); - this.loading[q] = K; - const le = new AbortController; - K.abort = le; - try { - const ve = yield this.loadVectorTile(O, le); - if (delete this.loading[q], !ve) return null; - const Le = ve.rawData, - Ce = {}; - ve.expires && (Ce.expires = ve.expires), ve.cacheControl && (Ce.cacheControl = ve.cacheControl); - const Ze = {}; - if (G) { - const Ye = G.finish(); - Ye && (Ze.resourceTiming = JSON.parse(JSON.stringify(Ye))) - } - K.vectorTile = ve.vectorTile; - const ot = K.parse(ve.vectorTile, this.layerIndex, this.availableImages, this.actor, O.subdivisionGranularity); - this.loaded[q] = K, this.fetching[q] = { - rawTileData: Le, - cacheControl: Ce, - resourceTiming: Ze - }; - try { - const Ye = yield ot; - return T.e({ - rawTileData: Le.slice(0) - }, Ye, Ce, Ze) - } finally { - delete this.fetching[q] - } - } catch (ve) { - throw delete this.loading[q], K.status = "done", this.loaded[q] = K, ve - } - })) - } - reloadTile(O) { - return T._(this, void 0, void 0, (function*() { - const q = O.uid; - if (!this.loaded || !this.loaded[q]) throw new Error("Should not be trying to reload a tile that was never loaded or has been removed"); - const G = this.loaded[q]; - if (G.showCollisionBoxes = O.showCollisionBoxes, G.globalState = O.globalState, G.status === "parsing") { - const K = yield G.parse(G.vectorTile, this.layerIndex, this.availableImages, this.actor, O.subdivisionGranularity); - let le; - if (this.fetching[q]) { - const { - rawTileData: ve, - cacheControl: Le, - resourceTiming: Ce - } = this.fetching[q]; - delete this.fetching[q], le = T.e({ - rawTileData: ve.slice(0) - }, K, Le, Ce) - } else le = K; - return le - } - if (G.status === "done" && G.vectorTile) return G.parse(G.vectorTile, this.layerIndex, this.availableImages, this.actor, O.subdivisionGranularity) - })) - } - abortTile(O) { - return T._(this, void 0, void 0, (function*() { - const q = this.loading, - G = O.uid; - q && q[G] && q[G].abort && (q[G].abort.abort(), delete q[G]) - })) - } - removeTile(O) { - return T._(this, void 0, void 0, (function*() { - this.loaded && this.loaded[O.uid] && delete this.loaded[O.uid] - })) - } - } - class ye { - constructor() { - this.loaded = {} - } - loadTile(O) { - return T._(this, void 0, void 0, (function*() { - const { - uid: q, - encoding: G, - rawImageData: K, - redFactor: le, - greenFactor: ve, - blueFactor: Le, - baseShift: Ce - } = O, Ze = K.width + 2, ot = K.height + 2, Ye = T.b(K) ? new T.R({ - width: Ze, - height: ot - }, yield T.cO(K, -1, -1, Ze, ot)) : K, Ot = new T.cP(q, Ye, G, le, ve, Le, Ce); - return this.loaded = this.loaded || {}, this.loaded[q] = Ot, Ot - })) - } - removeTile(O) { - const q = this.loaded, - G = O.uid; - q && q[G] && delete q[G] - } - } - var X, Se, we = (function() { - if (Se) return X; - - function ce(q, G) { - if (q.length !== 0) { - O(q[0], G); - for (var K = 1; K < q.length; K++) O(q[K], !G) - } - } - - function O(q, G) { - for (var K = 0, le = 0, ve = 0, Le = q.length, Ce = Le - 1; ve < Le; Ce = ve++) { - var Ze = (q[ve][0] - q[Ce][0]) * (q[Ce][1] + q[ve][1]), - ot = K + Ze; - le += Math.abs(K) >= Math.abs(Ze) ? K - ot + Ze : Ze - ot + K, K = ot - } - K + le >= 0 != !!G && q.reverse() - } - return Se = 1, X = function q(G, K) { - var le, ve = G && G.type; - if (ve === "FeatureCollection") - for (le = 0; le < G.features.length; le++) q(G.features[le], K); - else if (ve === "GeometryCollection") - for (le = 0; le < G.geometries.length; le++) q(G.geometries[le], K); - else if (ve === "Feature") q(G.geometry, K); - else if (ve === "Polygon") ce(G.coordinates, K); - else if (ve === "MultiPolygon") - for (le = 0; le < G.coordinates.length; le++) ce(G.coordinates[le], K); - return G - } - })(), - Re = T.cQ(we); - class Ae extends T.cS { - constructor(O, q) { - super(new T.cM, 0, q, [], []), this.feature = O, this.type = O.type, this.properties = O.tags ? O.tags : {}, "id" in O && (typeof O.id == "string" ? this.id = parseInt(O.id, 10) : typeof O.id != "number" || isNaN(O.id) || (this.id = O.id)) - } - loadGeometry() { - const O = [], - q = this.feature.type === 1 ? [this.feature.geometry] : this.feature.geometry; - for (const G of q) { - const K = []; - for (const le of G) K.push(new T.P(le[0], le[1])); - O.push(K) - } - return O - } - } - class Oe extends T.cR { - constructor(O, q) { - super(new T.cM), this.layers = { - _geojsonTileLayer: this - }, this.name = "_geojsonTileLayer", this.version = q ? q.version : 1, this.extent = q ? q.extent : 4096, this.length = O.length, this.features = O - } - feature(O) { - return new Ae(this.features[O], this.extent) - } - } - - function Ee(ce, O) { - O.writeVarintField(15, ce.version || 1), O.writeStringField(1, ce.name || ""), O.writeVarintField(5, ce.extent || 4096); - const q = { - keys: [], - values: [], - keycache: {}, - valuecache: {} - }; - for (let le = 0; le < ce.length; le++) q.feature = ce.feature(le), O.writeMessage(2, Ne, q); - const G = q.keys; - for (const le of G) O.writeStringField(3, le); - const K = q.values; - for (const le of K) O.writeMessage(4, Je, le) - } - - function Ne(ce, O) { - if (!ce.feature) return; - const q = ce.feature; - q.id !== void 0 && O.writeVarintField(1, q.id), O.writeMessage(2, ft, ce), O.writeVarintField(3, q.type), O.writeMessage(4, ct, q) - } - - function ft(ce, O) { - var q; - for (const G in (q = ce.feature) == null ? void 0 : q.properties) { - let K = ce.feature.properties[G], - le = ce.keycache[G]; - if (K === null) continue; - le === void 0 && (ce.keys.push(G), le = ce.keys.length - 1, ce.keycache[G] = le), O.writeVarint(le), typeof K != "string" && typeof K != "boolean" && typeof K != "number" && (K = JSON.stringify(K)); - const ve = typeof K + ":" + K; - let Le = ce.valuecache[ve]; - Le === void 0 && (ce.values.push(K), Le = ce.values.length - 1, ce.valuecache[ve] = Le), O.writeVarint(Le) - } - } - - function ht(ce, O) { - return (O << 3) + (7 & ce) - } - - function Xe(ce) { - return ce << 1 ^ ce >> 31 - } - - function ct(ce, O) { - const q = ce.loadGeometry(), - G = ce.type; - let K = 0, - le = 0; - for (const ve of q) { - let Le = 1; - G === 1 && (Le = ve.length), O.writeVarint(ht(1, Le)); - const Ce = G === 3 ? ve.length - 1 : ve.length; - for (let Ze = 0; Ze < Ce; Ze++) { - Ze === 1 && G !== 1 && O.writeVarint(ht(2, Ce - 1)); - const ot = ve[Ze].x - K, - Ye = ve[Ze].y - le; - O.writeVarint(Xe(ot)), O.writeVarint(Xe(Ye)), K += ot, le += Ye - } - ce.type === 3 && O.writeVarint(ht(7, 1)) - } - } - - function Je(ce, O) { - const q = typeof ce; - q === "string" ? O.writeStringField(1, ce) : q === "boolean" ? O.writeBooleanField(7, ce) : q === "number" && (ce % 1 != 0 ? O.writeDoubleField(3, ce) : ce < 0 ? O.writeSVarintField(6, ce) : O.writeVarintField(5, ce)) - } - const Be = { - minZoom: 0, - maxZoom: 16, - minPoints: 2, - radius: 40, - extent: 512, - nodeSize: 64, - log: !1, - generateId: !1, - reduce: null, - map: ce => ce - }, - st = Math.fround || (it = new Float32Array(1), ce => (it[0] = +ce, it[0])); - var it; - class Qe { - constructor(O) { - this.options = Object.assign(Object.create(Be), O), this.trees = new Array(this.options.maxZoom + 1), this.stride = this.options.reduce ? 7 : 6, this.clusterProps = [] - } - load(O) { - const { - log: q, - minZoom: G, - maxZoom: K - } = this.options; - q && console.time("total time"); - const le = `prepare ${O.length} points`; - q && console.time(le), this.points = O; - const ve = []; - for (let Ce = 0; Ce < O.length; Ce++) { - const Ze = O[Ce]; - if (!Ze.geometry) continue; - const [ot, Ye] = Ze.geometry.coordinates, Ot = st(Q(ot)), xe = st(te(Ye)); - ve.push(Ot, xe, 1 / 0, Ce, -1, 1), this.options.reduce && ve.push(0) - } - let Le = this.trees[K + 1] = this._createTree(ve); - q && console.timeEnd(le); - for (let Ce = K; Ce >= G; Ce--) { - const Ze = +Date.now(); - Le = this.trees[Ce] = this._createTree(this._cluster(Le, Ce)), q && console.log("z%d: %d clusters in %dms", Ce, Le.numItems, +Date.now() - Ze) - } - return q && console.timeEnd("total time"), this - } - getClusters(O, q) { - let G = ((O[0] + 180) % 360 + 360) % 360 - 180; - const K = Math.max(-90, Math.min(90, O[1])); - let le = O[2] === 180 ? 180 : ((O[2] + 180) % 360 + 360) % 360 - 180; - const ve = Math.max(-90, Math.min(90, O[3])); - if (O[2] - O[0] >= 360) G = -180, le = 180; - else if (G > le) { - const Ye = this.getClusters([G, K, 180, ve], q), - Ot = this.getClusters([-180, K, le, ve], q); - return Ye.concat(Ot) - } - const Le = this.trees[this._limitZoom(q)], - Ce = Le.range(Q(G), te(ve), Q(le), te(K)), - Ze = Le.data, - ot = []; - for (const Ye of Ce) { - const Ot = this.stride * Ye; - ot.push(Ze[Ot + 5] > 1 ? ke(Ze, Ot, this.clusterProps) : this.points[Ze[Ot + 3]]) - } - return ot - } - getChildren(O) { - const q = this._getOriginId(O), - G = this._getOriginZoom(O), - K = "No cluster with the specified id.", - le = this.trees[G]; - if (!le) throw new Error(K); - const ve = le.data; - if (q * this.stride >= ve.length) throw new Error(K); - const Le = this.options.radius / (this.options.extent * Math.pow(2, G - 1)), - Ce = le.within(ve[q * this.stride], ve[q * this.stride + 1], Le), - Ze = []; - for (const ot of Ce) { - const Ye = ot * this.stride; - ve[Ye + 4] === O && Ze.push(ve[Ye + 5] > 1 ? ke(ve, Ye, this.clusterProps) : this.points[ve[Ye + 3]]) - } - if (Ze.length === 0) throw new Error(K); - return Ze - } - getLeaves(O, q, G) { - const K = []; - return this._appendLeaves(K, O, q = q || 10, G = G || 0, 0), K - } - getTile(O, q, G) { - const K = this.trees[this._limitZoom(O)], - le = Math.pow(2, O), - { - extent: ve, - radius: Le - } = this.options, - Ce = Le / ve, - Ze = (G - Ce) / le, - ot = (G + 1 + Ce) / le, - Ye = { - features: [] - }; - return this._addTileFeatures(K.range((q - Ce) / le, Ze, (q + 1 + Ce) / le, ot), K.data, q, G, le, Ye), q === 0 && this._addTileFeatures(K.range(1 - Ce / le, Ze, 1, ot), K.data, le, G, le, Ye), q === le - 1 && this._addTileFeatures(K.range(0, Ze, Ce / le, ot), K.data, -1, G, le, Ye), Ye.features.length ? Ye : null - } - getClusterExpansionZoom(O) { - let q = this._getOriginZoom(O) - 1; - for (; q <= this.options.maxZoom;) { - const G = this.getChildren(O); - if (q++, G.length !== 1) break; - O = G[0].properties.cluster_id - } - return q - } - _appendLeaves(O, q, G, K, le) { - const ve = this.getChildren(q); - for (const Le of ve) { - const Ce = Le.properties; - if (Ce && Ce.cluster ? le + Ce.point_count <= K ? le += Ce.point_count : le = this._appendLeaves(O, Ce.cluster_id, G, K, le) : le < K ? le++ : O.push(Le), O.length === G) break - } - return le - } - _createTree(O) { - const q = new T.aI(O.length / this.stride | 0, this.options.nodeSize, Float32Array); - for (let G = 0; G < O.length; G += this.stride) q.add(O[G], O[G + 1]); - return q.finish(), q.data = O, q - } - _addTileFeatures(O, q, G, K, le, ve) { - for (const Le of O) { - const Ce = Le * this.stride, - Ze = q[Ce + 5] > 1; - let ot, Ye, Ot; - if (Ze) ot = vt(q, Ce, this.clusterProps), Ye = q[Ce], Ot = q[Ce + 1]; - else { - const Pt = this.points[q[Ce + 3]]; - ot = Pt.properties; - const [kt, Wt] = Pt.geometry.coordinates; - Ye = Q(kt), Ot = te(Wt) - } - const xe = { - type: 1, - geometry: [ - [Math.round(this.options.extent * (Ye * le - G)), Math.round(this.options.extent * (Ot * le - K))] - ], - tags: ot - }; - let At; - At = Ze || this.options.generateId ? q[Ce + 3] : this.points[q[Ce + 3]].id, At !== void 0 && (xe.id = At), ve.features.push(xe) - } - } - _limitZoom(O) { - return Math.max(this.options.minZoom, Math.min(Math.floor(+O), this.options.maxZoom + 1)) - } - _cluster(O, q) { - const { - radius: G, - extent: K, - reduce: le, - minPoints: ve - } = this.options, Le = G / (K * Math.pow(2, q)), Ce = O.data, Ze = [], ot = this.stride; - for (let Ye = 0; Ye < Ce.length; Ye += ot) { - if (Ce[Ye + 2] <= q) continue; - Ce[Ye + 2] = q; - const Ot = Ce[Ye], - xe = Ce[Ye + 1], - At = O.within(Ce[Ye], Ce[Ye + 1], Le), - Pt = Ce[Ye + 5]; - let kt = Pt; - for (const Wt of At) { - const Lr = Wt * ot; - Ce[Lr + 2] > q && (kt += Ce[Lr + 5]) - } - if (kt > Pt && kt >= ve) { - let Wt, Lr = Ot * Pt, - Kr = xe * Pt, - Hr = -1; - const $r = (Ye / ot << 5) + (q + 1) + this.points.length; - for (const mr of At) { - const gr = mr * ot; - if (Ce[gr + 2] <= q) continue; - Ce[gr + 2] = q; - const ai = Ce[gr + 5]; - Lr += Ce[gr] * ai, Kr += Ce[gr + 1] * ai, Ce[gr + 4] = $r, le && (Wt || (Wt = this._map(Ce, Ye, !0), Hr = this.clusterProps.length, this.clusterProps.push(Wt)), le(Wt, this._map(Ce, gr))) - } - Ce[Ye + 4] = $r, Ze.push(Lr / kt, Kr / kt, 1 / 0, $r, -1, kt), le && Ze.push(Hr) - } else { - for (let Wt = 0; Wt < ot; Wt++) Ze.push(Ce[Ye + Wt]); - if (kt > 1) - for (const Wt of At) { - const Lr = Wt * ot; - if (!(Ce[Lr + 2] <= q)) { - Ce[Lr + 2] = q; - for (let Kr = 0; Kr < ot; Kr++) Ze.push(Ce[Lr + Kr]) - } - } - } - } - return Ze - } - _getOriginId(O) { - return O - this.points.length >> 5 - } - _getOriginZoom(O) { - return (O - this.points.length) % 32 - } - _map(O, q, G) { - if (O[q + 5] > 1) { - const ve = this.clusterProps[O[q + 6]]; - return G ? Object.assign({}, ve) : ve - } - const K = this.points[O[q + 3]].properties, - le = this.options.map(K); - return G && le === K ? Object.assign({}, le) : le - } - } - - function ke(ce, O, q) { - return { - type: "Feature", - id: ce[O + 3], - properties: vt(ce, O, q), - geometry: { - type: "Point", - coordinates: [(G = ce[O], 360 * (G - .5)), _e(ce[O + 1])] - } - }; - var G - } - - function vt(ce, O, q) { - const G = ce[O + 5], - K = G >= 1e4 ? `${Math.round(G/1e3)}k` : G >= 1e3 ? Math.round(G / 100) / 10 + "k" : G, - le = ce[O + 6], - ve = le === -1 ? {} : Object.assign({}, q[le]); - return Object.assign(ve, { - cluster: !0, - cluster_id: ce[O + 3], - point_count: G, - point_count_abbreviated: K - }) - } - - function Q(ce) { - return ce / 360 + .5 - } - - function te(ce) { - const O = Math.sin(ce * Math.PI / 180), - q = .5 - .25 * Math.log((1 + O) / (1 - O)) / Math.PI; - return q < 0 ? 0 : q > 1 ? 1 : q - } - - function _e(ce) { - const O = (180 - 360 * ce) * Math.PI / 180; - return 360 * Math.atan(Math.exp(O)) / Math.PI - 90 - } - - function ne(ce, O, q, G) { - let K = G; - const le = O + (q - O >> 1); - let ve, Le = q - O; - const Ce = ce[O], - Ze = ce[O + 1], - ot = ce[q], - Ye = ce[q + 1]; - for (let Ot = O + 3; Ot < q; Ot += 3) { - const xe = Pe(ce[Ot], ce[Ot + 1], Ce, Ze, ot, Ye); - if (xe > K) ve = Ot, K = xe; - else if (xe === K) { - const At = Math.abs(Ot - le); - At < Le && (ve = Ot, Le = At) - } - } - K > G && (ve - O > 3 && ne(ce, O, ve, G), ce[ve + 2] = K, q - ve > 3 && ne(ce, ve, q, G)) - } - - function Pe(ce, O, q, G, K, le) { - let ve = K - q, - Le = le - G; - if (ve !== 0 || Le !== 0) { - const Ce = ((ce - q) * ve + (O - G) * Le) / (ve * ve + Le * Le); - Ce > 1 ? (q = K, G = le) : Ce > 0 && (q += ve * Ce, G += Le * Ce) - } - return ve = ce - q, Le = O - G, ve * ve + Le * Le - } - - function Me(ce, O, q, G) { - const K = { - id: ce ?? null, - type: O, - geometry: q, - tags: G, - minX: 1 / 0, - minY: 1 / 0, - maxX: -1 / 0, - maxY: -1 / 0 - }; - if (O === "Point" || O === "MultiPoint" || O === "LineString") at(K, q); - else if (O === "Polygon") at(K, q[0]); - else if (O === "MultiLineString") - for (const le of q) at(K, le); - else if (O === "MultiPolygon") - for (const le of q) at(K, le[0]); - return K - } - - function at(ce, O) { - for (let q = 0; q < O.length; q += 3) ce.minX = Math.min(ce.minX, O[q]), ce.minY = Math.min(ce.minY, O[q + 1]), ce.maxX = Math.max(ce.maxX, O[q]), ce.maxY = Math.max(ce.maxY, O[q + 1]) - } - - function We(ce, O, q, G) { - if (!O.geometry) return; - const K = O.geometry.coordinates; - if (K && K.length === 0) return; - const le = O.geometry.type, - ve = Math.pow(q.tolerance / ((1 << q.maxZoom) * q.extent), 2); - let Le = [], - Ce = O.id; - if (q.promoteId ? Ce = O.properties[q.promoteId] : q.generateId && (Ce = G || 0), le === "Point") Ct(K, Le); - else if (le === "MultiPoint") - for (const Ze of K) Ct(Ze, Le); - else if (le === "LineString") _t(K, Le, ve, !1); - else if (le === "MultiLineString") { - if (q.lineMetrics) { - for (const Ze of K) Le = [], _t(Ze, Le, ve, !1), ce.push(Me(Ce, "LineString", Le, O.properties)); - return - } - xt(K, Le, ve, !1) - } else if (le === "Polygon") xt(K, Le, ve, !0); - else { - if (le !== "MultiPolygon") { - if (le === "GeometryCollection") { - for (const Ze of O.geometry.geometries) We(ce, { - id: Ce, - geometry: Ze, - properties: O.properties - }, q, G); - return - } - throw new Error("Input data is not a valid GeoJSON object.") - } - for (const Ze of K) { - const ot = []; - xt(Ze, ot, ve, !0), Le.push(ot) - } - } - ce.push(Me(Ce, le, Le, O.properties)) - } - - function Ct(ce, O) { - O.push(tt(ce[0]), pt(ce[1]), 0) - } - - function _t(ce, O, q, G) { - let K, le, ve = 0; - for (let Ce = 0; Ce < ce.length; Ce++) { - const Ze = tt(ce[Ce][0]), - ot = pt(ce[Ce][1]); - O.push(Ze, ot, 0), Ce > 0 && (ve += G ? (K * ot - Ze * le) / 2 : Math.sqrt(Math.pow(Ze - K, 2) + Math.pow(ot - le, 2))), K = Ze, le = ot - } - const Le = O.length - 3; - O[2] = 1, ne(O, 0, Le, q), O[Le + 2] = 1, O.size = Math.abs(ve), O.start = 0, O.end = O.size - } - - function xt(ce, O, q, G) { - for (let K = 0; K < ce.length; K++) { - const le = []; - _t(ce[K], le, q, G), O.push(le) - } - } - - function tt(ce) { - return ce / 360 + .5 - } - - function pt(ce) { - const O = Math.sin(ce * Math.PI / 180), - q = .5 - .25 * Math.log((1 + O) / (1 - O)) / Math.PI; - return q < 0 ? 0 : q > 1 ? 1 : q - } - - function It(ce, O, q, G, K, le, ve, Le) { - if (G /= O, le >= (q /= O) && ve < G) return ce; - if (ve < q || le >= G) return null; - const Ce = []; - for (const Ze of ce) { - const ot = Ze.geometry; - let Ye = Ze.type; - const Ot = K === 0 ? Ze.minX : Ze.minY, - xe = K === 0 ? Ze.maxX : Ze.maxY; - if (Ot >= q && xe < G) { - Ce.push(Ze); - continue - } - if (xe < q || Ot >= G) continue; - let At = []; - if (Ye === "Point" || Ye === "MultiPoint") ut(ot, At, q, G, K); - else if (Ye === "LineString") bt(ot, At, q, G, K, !1, Le.lineMetrics); - else if (Ye === "MultiLineString") dt(ot, At, q, G, K, !1); - else if (Ye === "Polygon") dt(ot, At, q, G, K, !0); - else if (Ye === "MultiPolygon") - for (const Pt of ot) { - const kt = []; - dt(Pt, kt, q, G, K, !0), kt.length && At.push(kt) - } - if (At.length) { - if (Le.lineMetrics && Ye === "LineString") { - for (const Pt of At) Ce.push(Me(Ze.id, Ye, Pt, Ze.tags)); - continue - } - Ye !== "LineString" && Ye !== "MultiLineString" || (At.length === 1 ? (Ye = "LineString", At = At[0]) : Ye = "MultiLineString"), Ye !== "Point" && Ye !== "MultiPoint" || (Ye = At.length === 3 ? "Point" : "MultiPoint"), Ce.push(Me(Ze.id, Ye, At, Ze.tags)) - } - } - return Ce.length ? Ce : null - } - - function ut(ce, O, q, G, K) { - for (let le = 0; le < ce.length; le += 3) { - const ve = ce[le + K]; - ve >= q && ve <= G && Lt(O, ce[le], ce[le + 1], ce[le + 2]) - } - } - - function bt(ce, O, q, G, K, le, ve) { - let Le = wt(ce); - const Ce = K === 0 ? Xt : Yt; - let Ze, ot, Ye = ce.start; - for (let kt = 0; kt < ce.length - 3; kt += 3) { - const Wt = ce[kt], - Lr = ce[kt + 1], - Kr = ce[kt + 2], - Hr = ce[kt + 3], - $r = ce[kt + 4], - mr = K === 0 ? Wt : Lr, - gr = K === 0 ? Hr : $r; - let ai = !1; - ve && (Ze = Math.sqrt(Math.pow(Wt - Hr, 2) + Math.pow(Lr - $r, 2))), mr < q ? gr > q && (ot = Ce(Le, Wt, Lr, Hr, $r, q), ve && (Le.start = Ye + Ze * ot)) : mr > G ? gr < G && (ot = Ce(Le, Wt, Lr, Hr, $r, G), ve && (Le.start = Ye + Ze * ot)) : Lt(Le, Wt, Lr, Kr), gr < q && mr >= q && (ot = Ce(Le, Wt, Lr, Hr, $r, q), ai = !0), gr > G && mr <= G && (ot = Ce(Le, Wt, Lr, Hr, $r, G), ai = !0), !le && ai && (ve && (Le.end = Ye + Ze * ot), O.push(Le), Le = wt(ce)), ve && (Ye += Ze) - } - let Ot = ce.length - 3; - const xe = ce[Ot], - At = ce[Ot + 1], - Pt = K === 0 ? xe : At; - Pt >= q && Pt <= G && Lt(Le, xe, At, ce[Ot + 2]), Ot = Le.length - 3, le && Ot >= 3 && (Le[Ot] !== Le[0] || Le[Ot + 1] !== Le[1]) && Lt(Le, Le[0], Le[1], Le[2]), Le.length && O.push(Le) - } - - function wt(ce) { - const O = []; - return O.size = ce.size, O.start = ce.start, O.end = ce.end, O - } - - function dt(ce, O, q, G, K, le) { - for (const ve of ce) bt(ve, O, q, G, K, le, !1) - } - - function Lt(ce, O, q, G) { - ce.push(O, q, G) - } - - function Xt(ce, O, q, G, K, le) { - const ve = (le - O) / (G - O); - return Lt(ce, le, q + (K - q) * ve, 1), ve - } - - function Yt(ce, O, q, G, K, le) { - const ve = (le - q) / (K - q); - return Lt(ce, O + (G - O) * ve, le, 1), ve - } - - function nr(ce, O) { - const q = []; - for (let G = 0; G < ce.length; G++) { - const K = ce[G], - le = K.type; - let ve; - if (le === "Point" || le === "MultiPoint" || le === "LineString") ve = ar(K.geometry, O); - else if (le === "MultiLineString" || le === "Polygon") { - ve = []; - for (const Le of K.geometry) ve.push(ar(Le, O)) - } else if (le === "MultiPolygon") { - ve = []; - for (const Le of K.geometry) { - const Ce = []; - for (const Ze of Le) Ce.push(ar(Ze, O)); - ve.push(Ce) - } - } - q.push(Me(K.id, le, ve, K.tags)) - } - return q - } - - function ar(ce, O) { - const q = []; - q.size = ce.size, ce.start !== void 0 && (q.start = ce.start, q.end = ce.end); - for (let G = 0; G < ce.length; G += 3) q.push(ce[G] + O, ce[G + 1], ce[G + 2]); - return q - } - - function Ft(ce, O) { - if (ce.transformed) return ce; - const q = 1 << ce.z, - G = ce.x, - K = ce.y; - for (const le of ce.features) { - const ve = le.geometry, - Le = le.type; - if (le.geometry = [], Le === 1) - for (let Ce = 0; Ce < ve.length; Ce += 2) le.geometry.push(dr(ve[Ce], ve[Ce + 1], O, q, G, K)); - else - for (let Ce = 0; Ce < ve.length; Ce++) { - const Ze = []; - for (let ot = 0; ot < ve[Ce].length; ot += 2) Ze.push(dr(ve[Ce][ot], ve[Ce][ot + 1], O, q, G, K)); - le.geometry.push(Ze) - } - } - return ce.transformed = !0, ce - } - - function dr(ce, O, q, G, K, le) { - return [Math.round(q * (ce * G - K)), Math.round(q * (O * G - le))] - } - - function _r(ce, O, q, G, K) { - const le = O === K.maxZoom ? 0 : K.tolerance / ((1 << O) * K.extent), - ve = { - features: [], - numPoints: 0, - numSimplified: 0, - numFeatures: ce.length, - source: null, - x: q, - y: G, - z: O, - transformed: !1, - minX: 2, - minY: 1, - maxX: -1, - maxY: 0 - }; - for (const Le of ce) Ir(ve, Le, le, K); - return ve - } - - function Ir(ce, O, q, G) { - const K = O.geometry, - le = O.type, - ve = []; - if (ce.minX = Math.min(ce.minX, O.minX), ce.minY = Math.min(ce.minY, O.minY), ce.maxX = Math.max(ce.maxX, O.maxX), ce.maxY = Math.max(ce.maxY, O.maxY), le === "Point" || le === "MultiPoint") - for (let Le = 0; Le < K.length; Le += 3) ve.push(K[Le], K[Le + 1]), ce.numPoints++, ce.numSimplified++; - else if (le === "LineString") jr(ve, K, ce, q, !1, !1); - else if (le === "MultiLineString" || le === "Polygon") - for (let Le = 0; Le < K.length; Le++) jr(ve, K[Le], ce, q, le === "Polygon", Le === 0); - else if (le === "MultiPolygon") - for (let Le = 0; Le < K.length; Le++) { - const Ce = K[Le]; - for (let Ze = 0; Ze < Ce.length; Ze++) jr(ve, Ce[Ze], ce, q, !0, Ze === 0) - } - if (ve.length) { - let Le = O.tags || null; - if (le === "LineString" && G.lineMetrics) { - Le = {}; - for (const Ze in O.tags) Le[Ze] = O.tags[Ze]; - Le.mapbox_clip_start = K.start / K.size, Le.mapbox_clip_end = K.end / K.size - } - const Ce = { - geometry: ve, - type: le === "Polygon" || le === "MultiPolygon" ? 3 : le === "LineString" || le === "MultiLineString" ? 2 : 1, - tags: Le - }; - O.id !== null && (Ce.id = O.id), ce.features.push(Ce) - } - } - - function jr(ce, O, q, G, K, le) { - const ve = G * G; - if (G > 0 && O.size < (K ? ve : G)) return void(q.numPoints += O.length / 3); - const Le = []; - for (let Ce = 0; Ce < O.length; Ce += 3)(G === 0 || O[Ce + 2] > ve) && (q.numSimplified++, Le.push(O[Ce], O[Ce + 1])), q.numPoints++; - K && (function(Ce, Ze) { - let ot = 0; - for (let Ye = 0, Ot = Ce.length, xe = Ot - 2; Ye < Ot; xe = Ye, Ye += 2) ot += (Ce[Ye] - Ce[xe]) * (Ce[Ye + 1] + Ce[xe + 1]); - if (ot > 0 === Ze) - for (let Ye = 0, Ot = Ce.length; Ye < Ot / 2; Ye += 2) { - const xe = Ce[Ye], - At = Ce[Ye + 1]; - Ce[Ye] = Ce[Ot - 2 - Ye], Ce[Ye + 1] = Ce[Ot - 1 - Ye], Ce[Ot - 2 - Ye] = xe, Ce[Ot - 1 - Ye] = At - } - })(Le, le), ce.push(Le) - } - const ur = { - maxZoom: 14, - indexMaxZoom: 5, - indexMaxPoints: 1e5, - tolerance: 3, - extent: 4096, - buffer: 64, - lineMetrics: !1, - promoteId: null, - generateId: !1, - debug: 0 - }; - class Mr { - constructor(O, q) { - const G = (q = this.options = (function(le, ve) { - for (const Le in ve) le[Le] = ve[Le]; - return le - })(Object.create(ur), q)).debug; - if (G && console.time("preprocess data"), q.maxZoom < 0 || q.maxZoom > 24) throw new Error("maxZoom should be in the 0-24 range"); - if (q.promoteId && q.generateId) throw new Error("promoteId and generateId cannot be used together."); - let K = (function(le, ve) { - const Le = []; - if (le.type === "FeatureCollection") - for (let Ce = 0; Ce < le.features.length; Ce++) We(Le, le.features[Ce], ve, Ce); - else We(Le, le.type === "Feature" ? le : { - geometry: le - }, ve); - return Le - })(O, q); - this.tiles = {}, this.tileCoords = [], G && (console.timeEnd("preprocess data"), console.log("index: maxZoom: %d, maxPoints: %d", q.indexMaxZoom, q.indexMaxPoints), console.time("generate tiles"), this.stats = {}, this.total = 0), K = (function(le, ve) { - const Le = ve.buffer / ve.extent; - let Ce = le; - const Ze = It(le, 1, -1 - Le, Le, 0, -1, 2, ve), - ot = It(le, 1, 1 - Le, 2 + Le, 0, -1, 2, ve); - return (Ze || ot) && (Ce = It(le, 1, -Le, 1 + Le, 0, -1, 2, ve) || [], Ze && (Ce = nr(Ze, 1).concat(Ce)), ot && (Ce = Ce.concat(nr(ot, -1)))), Ce - })(K, q), K.length && this.splitTile(K, 0, 0, 0), G && (K.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))) - } - splitTile(O, q, G, K, le, ve, Le) { - const Ce = [O, q, G, K], - Ze = this.options, - ot = Ze.debug; - for (; Ce.length;) { - K = Ce.pop(), G = Ce.pop(), q = Ce.pop(), O = Ce.pop(); - const Ye = 1 << q, - Ot = Ar(q, G, K); - let xe = this.tiles[Ot]; - if (!xe && (ot > 1 && console.time("creation"), xe = this.tiles[Ot] = _r(O, q, G, K, Ze), this.tileCoords.push({ - z: q, - x: G, - y: K - }), ot)) { - ot > 1 && (console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)", q, G, K, xe.numFeatures, xe.numPoints, xe.numSimplified), console.timeEnd("creation")); - const ai = `z${q}`; - this.stats[ai] = (this.stats[ai] || 0) + 1, this.total++ - } - if (xe.source = O, le == null) { - if (q === Ze.indexMaxZoom || xe.numPoints <= Ze.indexMaxPoints) continue - } else { - if (q === Ze.maxZoom || q === le) continue; - if (le != null) { - const ai = le - q; - if (G !== ve >> ai || K !== Le >> ai) continue - } - } - if (xe.source = null, O.length === 0) continue; - ot > 1 && console.time("clipping"); - const At = .5 * Ze.buffer / Ze.extent, - Pt = .5 - At, - kt = .5 + At, - Wt = 1 + At; - let Lr = null, - Kr = null, - Hr = null, - $r = null, - mr = It(O, Ye, G - At, G + kt, 0, xe.minX, xe.maxX, Ze), - gr = It(O, Ye, G + Pt, G + Wt, 0, xe.minX, xe.maxX, Ze); - O = null, mr && (Lr = It(mr, Ye, K - At, K + kt, 1, xe.minY, xe.maxY, Ze), Kr = It(mr, Ye, K + Pt, K + Wt, 1, xe.minY, xe.maxY, Ze), mr = null), gr && (Hr = It(gr, Ye, K - At, K + kt, 1, xe.minY, xe.maxY, Ze), $r = It(gr, Ye, K + Pt, K + Wt, 1, xe.minY, xe.maxY, Ze), gr = null), ot > 1 && console.timeEnd("clipping"), Ce.push(Lr || [], q + 1, 2 * G, 2 * K), Ce.push(Kr || [], q + 1, 2 * G, 2 * K + 1), Ce.push(Hr || [], q + 1, 2 * G + 1, 2 * K), Ce.push($r || [], q + 1, 2 * G + 1, 2 * K + 1) - } - } - getTile(O, q, G) { - O = +O, q = +q, G = +G; - const K = this.options, - { - extent: le, - debug: ve - } = K; - if (O < 0 || O > 24) return null; - const Le = 1 << O, - Ce = Ar(O, q = q + Le & Le - 1, G); - if (this.tiles[Ce]) return Ft(this.tiles[Ce], le); - ve > 1 && console.log("drilling down to z%d-%d-%d", O, q, G); - let Ze, ot = O, - Ye = q, - Ot = G; - for (; !Ze && ot > 0;) ot--, Ye >>= 1, Ot >>= 1, Ze = this.tiles[Ar(ot, Ye, Ot)]; - return Ze && Ze.source ? (ve > 1 && (console.log("found parent tile z%d-%d-%d", ot, Ye, Ot), console.time("drilling down")), this.splitTile(Ze.source, ot, Ye, Ot, O, q, G), ve > 1 && console.timeEnd("drilling down"), this.tiles[Ce] ? Ft(this.tiles[Ce], le) : null) : null - } - } - - function Ar(ce, O, q) { - return 32 * ((1 << ce) * q + O) + ce - } - class kr extends pe { - constructor() { - super(...arguments), this._dataUpdateable = new Map - } - loadVectorTile(O, q) { - return T._(this, void 0, void 0, (function*() { - const G = O.tileID.canonical; - if (!this._geoJSONIndex) throw new Error("Unable to parse the data into a cluster or geojson"); - const K = this._geoJSONIndex.getTile(G.z, G.x, G.y); - if (!K) return null; - const le = new Oe(K.features, { - version: 2, - extent: T.$ - }); - let ve = (function(Le) { - const Ce = new T.cM; - return (function(Ze, ot) { - for (const Ye in Ze.layers) ot.writeMessage(3, Ee, Ze.layers[Ye]) - })(Le, Ce), Ce.finish() - })(le); - return ve.byteOffset === 0 && ve.byteLength === ve.buffer.byteLength || (ve = new Uint8Array(ve)), { - vectorTile: le, - rawData: ve.buffer - } - })) - } - loadData(O) { - return T._(this, void 0, void 0, (function*() { - var q; - (q = this._pendingRequest) === null || q === void 0 || q.abort(); - const G = !!(O && O.request && O.request.collectResourceTiming) && new T.cN(O.request); - this._pendingRequest = new AbortController; - try { - this._pendingData = this.loadAndProcessGeoJSON(O, this._pendingRequest); - const K = yield this._pendingData; - this._geoJSONIndex = O.cluster ? new Qe((function({ - superclusterOptions: ve, - clusterProperties: Le - }) { - if (!Le || !ve) return ve; - const Ce = {}, - Ze = {}, - ot = { - accumulated: null, - zoom: 0 - }, - Ye = { - properties: null - }, - Ot = Object.keys(Le); - for (const xe of Ot) { - const [At, Pt] = Le[xe], kt = T.cT(Pt), Wt = T.cT(typeof At == "string" ? [At, ["accumulated"], - ["get", xe] - ] : At); - Ce[xe] = kt.value, Ze[xe] = Wt.value - } - return ve.map = xe => { - Ye.properties = xe; - const At = {}; - for (const Pt of Ot) At[Pt] = Ce[Pt].evaluate(ot, Ye); - return At - }, ve.reduce = (xe, At) => { - Ye.properties = At; - for (const Pt of Ot) ot.accumulated = xe[Pt], xe[Pt] = Ze[Pt].evaluate(ot, Ye) - }, ve - })(O)).load(K.features) : (function(ve, Le) { - return new Mr(ve, Le) - })(K, O.geojsonVtOptions), this.loaded = {}; - const le = { - data: K - }; - if (G) { - const ve = G.finish(); - ve && (le.resourceTiming = {}, le.resourceTiming[O.source] = JSON.parse(JSON.stringify(ve))) - } - return le - } catch (K) { - if (delete this._pendingRequest, T.cy(K)) return { - abandoned: !0 - }; - throw K - } - })) - } - getData() { - return T._(this, void 0, void 0, (function*() { - return this._pendingData - })) - } - reloadTile(O) { - const q = this.loaded; - return q && q[O.uid] ? super.reloadTile(O) : this.loadTile(O) - } - loadAndProcessGeoJSON(O, q) { - return T._(this, void 0, void 0, (function*() { - let G = yield this.loadGeoJSON(O, q); - if (delete this._pendingRequest, typeof G != "object") throw new Error(`Input data given to '${O.source}' is not a valid GeoJSON object.`); - if (Re(G, !0), O.filter) { - const K = T.cT(O.filter, { - type: "boolean", - "property-type": "data-driven", - overridable: !1, - transition: !1 - }); - if (K.result === "error") throw new Error(K.value.map((ve => `${ve.key}: ${ve.message}`)).join(", ")); - G = { - type: "FeatureCollection", - features: G.features.filter((ve => K.value.evaluate({ - zoom: 0 - }, ve))) - } - } - return G - })) - } - loadGeoJSON(O, q) { - return T._(this, void 0, void 0, (function*() { - const { - promoteId: G - } = O; - if (O.request) { - const K = yield T.j(O.request, q); - return this._dataUpdateable = T.cV(K.data, G) ? T.cU(K.data, G) : void 0, K.data - } - if (typeof O.data == "string") try { - const K = JSON.parse(O.data); - return this._dataUpdateable = T.cV(K, G) ? T.cU(K, G) : void 0, K - } catch { - throw new Error(`Input data given to '${O.source}' is not a valid GeoJSON object.`) - } - if (!O.dataDiff) throw new Error(`Input data given to '${O.source}' is not a valid GeoJSON object.`); - if (!this._dataUpdateable) throw new Error(`Cannot update existing geojson data in ${O.source}`); - return T.cW(this._dataUpdateable, O.dataDiff, G), { - type: "FeatureCollection", - features: Array.from(this._dataUpdateable.values()) - } - })) - } - removeSource(O) { - return T._(this, void 0, void 0, (function*() { - this._pendingRequest && this._pendingRequest.abort() - })) - } - getClusterExpansionZoom(O) { - return this._geoJSONIndex.getClusterExpansionZoom(O.clusterId) - } - getClusterChildren(O) { - return this._geoJSONIndex.getChildren(O.clusterId) - } - getClusterLeaves(O) { - return this._geoJSONIndex.getLeaves(O.clusterId, O.limit, O.offset) - } - } - class Nr { - constructor(O) { - this.self = O, this.actor = new T.J(O), this.layerIndexes = {}, this.availableImages = {}, this.workerSources = {}, this.demWorkerSources = {}, this.externalWorkerSourceTypes = {}, this.self.registerWorkerSource = (q, G) => { - if (this.externalWorkerSourceTypes[q]) throw new Error(`Worker source with name "${q}" already registered.`); - this.externalWorkerSourceTypes[q] = G - }, this.self.addProtocol = T.cA, this.self.removeProtocol = T.cB, this.self.registerRTLTextPlugin = q => { - T.cX.setMethods(q) - }, this.actor.registerMessageHandler("LDT", ((q, G) => this._getDEMWorkerSource(q, G.source).loadTile(G))), this.actor.registerMessageHandler("RDT", ((q, G) => T._(this, void 0, void 0, (function*() { - this._getDEMWorkerSource(q, G.source).removeTile(G) - })))), this.actor.registerMessageHandler("GCEZ", ((q, G) => T._(this, void 0, void 0, (function*() { - return this._getWorkerSource(q, G.type, G.source).getClusterExpansionZoom(G) - })))), this.actor.registerMessageHandler("GCC", ((q, G) => T._(this, void 0, void 0, (function*() { - return this._getWorkerSource(q, G.type, G.source).getClusterChildren(G) - })))), this.actor.registerMessageHandler("GCL", ((q, G) => T._(this, void 0, void 0, (function*() { - return this._getWorkerSource(q, G.type, G.source).getClusterLeaves(G) - })))), this.actor.registerMessageHandler("LD", ((q, G) => this._getWorkerSource(q, G.type, G.source).loadData(G))), this.actor.registerMessageHandler("GD", ((q, G) => this._getWorkerSource(q, G.type, G.source).getData())), this.actor.registerMessageHandler("LT", ((q, G) => this._getWorkerSource(q, G.type, G.source).loadTile(G))), this.actor.registerMessageHandler("RT", ((q, G) => this._getWorkerSource(q, G.type, G.source).reloadTile(G))), this.actor.registerMessageHandler("AT", ((q, G) => this._getWorkerSource(q, G.type, G.source).abortTile(G))), this.actor.registerMessageHandler("RMT", ((q, G) => this._getWorkerSource(q, G.type, G.source).removeTile(G))), this.actor.registerMessageHandler("RS", ((q, G) => T._(this, void 0, void 0, (function*() { - if (!this.workerSources[q] || !this.workerSources[q][G.type] || !this.workerSources[q][G.type][G.source]) return; - const K = this.workerSources[q][G.type][G.source]; - delete this.workerSources[q][G.type][G.source], K.removeSource !== void 0 && K.removeSource(G) - })))), this.actor.registerMessageHandler("RM", (q => T._(this, void 0, void 0, (function*() { - delete this.layerIndexes[q], delete this.availableImages[q], delete this.workerSources[q], delete this.demWorkerSources[q] - })))), this.actor.registerMessageHandler("SR", ((q, G) => T._(this, void 0, void 0, (function*() { - this.referrer = G - })))), this.actor.registerMessageHandler("SRPS", ((q, G) => this._syncRTLPluginState(q, G))), this.actor.registerMessageHandler("IS", ((q, G) => T._(this, void 0, void 0, (function*() { - this.self.importScripts(G) - })))), this.actor.registerMessageHandler("SI", ((q, G) => this._setImages(q, G))), this.actor.registerMessageHandler("UL", ((q, G) => T._(this, void 0, void 0, (function*() { - this._getLayerIndex(q).update(G.layers, G.removedIds) - })))), this.actor.registerMessageHandler("SL", ((q, G) => T._(this, void 0, void 0, (function*() { - this._getLayerIndex(q).replace(G) - })))) - } - _setImages(O, q) { - return T._(this, void 0, void 0, (function*() { - this.availableImages[O] = q; - for (const G in this.workerSources[O]) { - const K = this.workerSources[O][G]; - for (const le in K) K[le].availableImages = q - } - })) - } - _syncRTLPluginState(O, q) { - return T._(this, void 0, void 0, (function*() { - return yield T.cX.syncState(q, this.self.importScripts) - })) - } - _getAvailableImages(O) { - let q = this.availableImages[O]; - return q || (q = []), q - } - _getLayerIndex(O) { - let q = this.layerIndexes[O]; - return q || (q = this.layerIndexes[O] = new o), q - } - _getWorkerSource(O, q, G) { - if (this.workerSources[O] || (this.workerSources[O] = {}), this.workerSources[O][q] || (this.workerSources[O][q] = {}), !this.workerSources[O][q][G]) { - const K = { - sendAsync: (le, ve) => (le.targetMapId = O, this.actor.sendAsync(le, ve)) - }; - switch (q) { - case "vector": - this.workerSources[O][q][G] = new pe(K, this._getLayerIndex(O), this._getAvailableImages(O)); - break; - case "geojson": - this.workerSources[O][q][G] = new kr(K, this._getLayerIndex(O), this._getAvailableImages(O)); - break; - default: - this.workerSources[O][q][G] = new this.externalWorkerSourceTypes[q](K, this._getLayerIndex(O), this._getAvailableImages(O)) - } - } - return this.workerSources[O][q][G] - } - _getDEMWorkerSource(O, q) { - return this.demWorkerSources[O] || (this.demWorkerSources[O] = {}), this.demWorkerSources[O][q] || (this.demWorkerSources[O][q] = new ye), this.demWorkerSources[O][q] - } - } - return T.i(self) && (self.worker = new Nr(self)), Nr - })), L("index", ["exports", "./shared"], (function(T, o) { - var $ = "5.6.2"; - - function W() { - var h = new o.A(4); - return o.A != Float32Array && (h[1] = 0, h[2] = 0), h[0] = 1, h[3] = 1, h - } - let ie, pe; - const ye = { - now: typeof performance < "u" && performance && performance.now ? performance.now.bind(performance) : Date.now.bind(Date), - frame(h, e, n) { - const s = requestAnimationFrame((d => { - u(), e(d) - })), - { - unsubscribe: u - } = o.s(h.signal, "abort", (() => { - u(), cancelAnimationFrame(s), n(o.c()) - }), !1) - }, - frameAsync(h) { - return new Promise(((e, n) => { - this.frame(h, e, n) - })) - }, - getImageData(h, e = 0) { - return this.getImageCanvasContext(h).getImageData(-e, -e, h.width + 2 * e, h.height + 2 * e) - }, - getImageCanvasContext(h) { - const e = window.document.createElement("canvas"), - n = e.getContext("2d", { - willReadFrequently: !0 - }); - if (!n) throw new Error("failed to create canvas 2d context"); - return e.width = h.width, e.height = h.height, n.drawImage(h, 0, 0, h.width, h.height), n - }, - resolveURL: h => (ie || (ie = document.createElement("a")), ie.href = h, ie.href), - hardwareConcurrency: typeof navigator < "u" && navigator.hardwareConcurrency || 4, - get prefersReducedMotion() { - return !!matchMedia && (pe == null && (pe = matchMedia("(prefers-reduced-motion: reduce)")), pe.matches) - } - }; - class X { - static testProp(e) { - if (!X.docStyle) return e[0]; - for (let n = 0; n < e.length; n++) - if (e[n] in X.docStyle) return e[n]; - return e[0] - } - static create(e, n, s) { - const u = window.document.createElement(e); - return n !== void 0 && (u.className = n), s && s.appendChild(u), u - } - static createNS(e, n) { - return window.document.createElementNS(e, n) - } - static disableDrag() { - X.docStyle && X.selectProp && (X.userSelect = X.docStyle[X.selectProp], X.docStyle[X.selectProp] = "none") - } - static enableDrag() { - X.docStyle && X.selectProp && (X.docStyle[X.selectProp] = X.userSelect) - } - static setTransform(e, n) { - e.style[X.transformProp] = n - } - static addEventListener(e, n, s, u = {}) { - e.addEventListener(n, s, "passive" in u ? u : u.capture) - } - static removeEventListener(e, n, s, u = {}) { - e.removeEventListener(n, s, "passive" in u ? u : u.capture) - } - static suppressClickInternal(e) { - e.preventDefault(), e.stopPropagation(), window.removeEventListener("click", X.suppressClickInternal, !0) - } - static suppressClick() { - window.addEventListener("click", X.suppressClickInternal, !0), window.setTimeout((() => { - window.removeEventListener("click", X.suppressClickInternal, !0) - }), 0) - } - static getScale(e) { - const n = e.getBoundingClientRect(); - return { - x: n.width / e.offsetWidth || 1, - y: n.height / e.offsetHeight || 1, - boundingClientRect: n - } - } - static getPoint(e, n, s) { - const u = n.boundingClientRect; - return new o.P((s.clientX - u.left) / n.x - e.clientLeft, (s.clientY - u.top) / n.y - e.clientTop) - } - static mousePos(e, n) { - const s = X.getScale(e); - return X.getPoint(e, s, n) - } - static touchPos(e, n) { - const s = [], - u = X.getScale(e); - for (let d = 0; d < n.length; d++) s.push(X.getPoint(e, u, n[d])); - return s - } - static mouseButton(e) { - return e.button - } - static remove(e) { - e.parentNode && e.parentNode.removeChild(e) - } - static sanitize(e) { - const n = new DOMParser().parseFromString(e, "text/html").body || document.createElement("body"), - s = n.querySelectorAll("script"); - for (const u of s) u.remove(); - return X.clean(n), n.innerHTML - } - static isPossiblyDangerous(e, n) { - const s = n.replace(/\s+/g, "").toLowerCase(); - return !(!["src", "href", "xlink:href"].includes(e) || !s.includes("javascript:") && !s.includes("data:")) || !!e.startsWith("on") || void 0 - } - static clean(e) { - const n = e.children; - for (const s of n) X.removeAttributes(s), X.clean(s) - } - static removeAttributes(e) { - for (const { - name: n, - value: s - } - of e.attributes) X.isPossiblyDangerous(n, s) && e.removeAttribute(n) - } - } - X.docStyle = typeof window < "u" && window.document && window.document.documentElement.style, X.selectProp = X.testProp(["userSelect", "MozUserSelect", "WebkitUserSelect", "msUserSelect"]), X.transformProp = X.testProp(["transform", "WebkitTransform"]); - const Se = { - supported: !1, - testSupport: function(h) { - !Ae && Re && (Oe ? Ee(h) : we = h) - } - }; - let we, Re, Ae = !1, - Oe = !1; - - function Ee(h) { - const e = h.createTexture(); - h.bindTexture(h.TEXTURE_2D, e); - try { - if (h.texImage2D(h.TEXTURE_2D, 0, h.RGBA, h.RGBA, h.UNSIGNED_BYTE, Re), h.isContextLost()) return; - Se.supported = !0 - } catch {} - h.deleteTexture(e), Ae = !0 - } - var Ne; - typeof document < "u" && (Re = document.createElement("img"), Re.onload = () => { - we && Ee(we), we = null, Oe = !0 - }, Re.onerror = () => { - Ae = !0, we = null - }, Re.src = "data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="), (function(h) { - let e, n, s, u; - h.resetRequestQueue = () => { - e = [], n = 0, s = 0, u = {} - }, h.addThrottleControl = w => { - const P = s++; - return u[P] = w, P - }, h.removeThrottleControl = w => { - delete u[w], m() - }, h.getImage = (w, P, M = !0) => new Promise(((D, z) => { - Se.supported && (w.headers || (w.headers = {}), w.headers.accept = "image/webp,*/*"), o.e(w, { - type: "image" - }), e.push({ - abortController: P, - requestParameters: w, - supportImageRefresh: M, - state: "queued", - onError: B => { - z(B) - }, - onSuccess: B => { - D(B) - } - }), m() - })); - const d = w => o._(this, void 0, void 0, (function*() { - w.state = "running"; - const { - requestParameters: P, - supportImageRefresh: M, - onError: D, - onSuccess: z, - abortController: B - } = w, U = M === !1 && !o.i(self) && !o.g(P.url) && (!P.headers || Object.keys(P.headers).reduce(((re, se) => re && se === "accept"), !0)); - n++; - const ee = U ? y(P, B) : o.m(P, B); - try { - const re = yield ee; - delete w.abortController, w.state = "completed", re.data instanceof HTMLImageElement || o.b(re.data) ? z(re) : re.data && z({ - data: yield(J = re.data, typeof createImageBitmap == "function" ? o.f(J) : o.h(J)), - cacheControl: re.cacheControl, - expires: re.expires - }) - } catch (re) { - delete w.abortController, D(re) - } finally { - n--, m() - } - var J - })), - m = () => { - const w = (() => { - for (const P of Object.keys(u)) - if (u[P]()) return !0; - return !1 - })() ? o.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME : o.a.MAX_PARALLEL_IMAGE_REQUESTS; - for (let P = n; P < w && e.length > 0; P++) { - const M = e.shift(); - M.abortController.signal.aborted ? P-- : d(M) - } - }, - y = (w, P) => new Promise(((M, D) => { - const z = new Image, - B = w.url, - U = w.credentials; - U && U === "include" ? z.crossOrigin = "use-credentials" : (U && U === "same-origin" || !o.d(B)) && (z.crossOrigin = "anonymous"), P.signal.addEventListener("abort", (() => { - z.src = "", D(o.c()) - })), z.fetchPriority = "high", z.onload = () => { - z.onerror = z.onload = null, M({ - data: z - }) - }, z.onerror = () => { - z.onerror = z.onload = null, P.signal.aborted || D(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.")) - }, z.src = B - })) - })(Ne || (Ne = {})), Ne.resetRequestQueue(); - class ft { - constructor(e) { - this._transformRequestFn = e ?? null - } - transformRequest(e, n) { - return this._transformRequestFn && this._transformRequestFn(e, n) || { - url: e - } - } - setTransformRequest(e) { - this._transformRequestFn = e - } - } - - function ht(h) { - const e = []; - if (typeof h == "string") e.push({ - id: "default", - url: h - }); - else if (h && h.length > 0) { - const n = []; - for (const { - id: s, - url: u - } - of h) { - const d = `${s}${u}`; - n.indexOf(d) === -1 && (n.push(d), e.push({ - id: s, - url: u - })) - } - } - return e - } - - function Xe(h, e, n) { - try { - const s = new URL(h); - return s.pathname += `${e}${n}`, s.toString() - } catch { - throw new Error(`Invalid sprite URL "${h}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`) - } - } - - function ct(h) { - const { - userImage: e - } = h; - return !!(e && e.render && e.render()) && (h.data.replace(new Uint8Array(e.data.buffer)), !0) - } - class Je extends o.E { - constructor() { - super(), this.images = {}, this.updatedImages = {}, this.callbackDispatchedThisFrame = {}, this.loaded = !1, this.requestors = [], this.patterns = {}, this.atlasImage = new o.R({ - width: 1, - height: 1 - }), this.dirty = !0 - } - isLoaded() { - return this.loaded - } - setLoaded(e) { - if (this.loaded !== e && (this.loaded = e, e)) { - for (const { - ids: n, - promiseResolve: s - } - of this.requestors) s(this._getImagesForIds(n)); - this.requestors = [] - } - } - getImage(e) { - const n = this.images[e]; - if (n && !n.data && n.spriteData) { - const s = n.spriteData; - n.data = new o.R({ - width: s.width, - height: s.height - }, s.context.getImageData(s.x, s.y, s.width, s.height).data), n.spriteData = null - } - return n - } - addImage(e, n) { - if (this.images[e]) throw new Error(`Image id ${e} already exist, use updateImage instead`); - this._validate(e, n) && (this.images[e] = n) - } - _validate(e, n) { - let s = !0; - const u = n.data || n.spriteData; - return this._validateStretch(n.stretchX, u && u.width) || (this.fire(new o.k(new Error(`Image "${e}" has invalid "stretchX" value`))), s = !1), this._validateStretch(n.stretchY, u && u.height) || (this.fire(new o.k(new Error(`Image "${e}" has invalid "stretchY" value`))), s = !1), this._validateContent(n.content, n) || (this.fire(new o.k(new Error(`Image "${e}" has invalid "content" value`))), s = !1), s - } - _validateStretch(e, n) { - if (!e) return !0; - let s = 0; - for (const u of e) { - if (u[0] < s || u[1] < u[0] || n < u[1]) return !1; - s = u[1] - } - return !0 - } - _validateContent(e, n) { - if (!e) return !0; - if (e.length !== 4) return !1; - const s = n.spriteData, - u = s && s.width || n.data.width, - d = s && s.height || n.data.height; - return !(e[0] < 0 || u < e[0] || e[1] < 0 || d < e[1] || e[2] < 0 || u < e[2] || e[3] < 0 || d < e[3] || e[2] < e[0] || e[3] < e[1]) - } - updateImage(e, n, s = !0) { - const u = this.getImage(e); - if (s && (u.data.width !== n.data.width || u.data.height !== n.data.height)) throw new Error(`size mismatch between old image (${u.data.width}x${u.data.height}) and new image (${n.data.width}x${n.data.height}).`); - n.version = u.version + 1, this.images[e] = n, this.updatedImages[e] = !0 - } - removeImage(e) { - const n = this.images[e]; - delete this.images[e], delete this.patterns[e], n.userImage && n.userImage.onRemove && n.userImage.onRemove() - } - listImages() { - return Object.keys(this.images) - } - getImages(e) { - return new Promise(((n, s) => { - let u = !0; - if (!this.isLoaded()) - for (const d of e) this.images[d] || (u = !1); - this.isLoaded() || u ? n(this._getImagesForIds(e)) : this.requestors.push({ - ids: e, - promiseResolve: n - }) - })) - } - _getImagesForIds(e) { - const n = {}; - for (const s of e) { - let u = this.getImage(s); - u || (this.fire(new o.l("styleimagemissing", { - id: s - })), u = this.getImage(s)), u ? n[s] = { - data: u.data.clone(), - pixelRatio: u.pixelRatio, - sdf: u.sdf, - version: u.version, - stretchX: u.stretchX, - stretchY: u.stretchY, - content: u.content, - textFitWidth: u.textFitWidth, - textFitHeight: u.textFitHeight, - hasRenderCallback: !!(u.userImage && u.userImage.render) - } : o.w(`Image "${s}" 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 n - } - getPixelSize() { - const { - width: e, - height: n - } = this.atlasImage; - return { - width: e, - height: n - } - } - getPattern(e) { - const n = this.patterns[e], - s = this.getImage(e); - if (!s) return null; - if (n && n.position.version === s.version) return n.position; - if (n) n.position.version = s.version; - else { - const u = { - w: s.data.width + 2, - h: s.data.height + 2, - x: 0, - y: 0 - }, - d = new o.I(u, s); - this.patterns[e] = { - bin: u, - position: d - } - } - return this._updatePatternAtlas(), this.patterns[e].position - } - bind(e) { - const n = e.gl; - this.atlasTexture ? this.dirty && (this.atlasTexture.update(this.atlasImage), this.dirty = !1) : this.atlasTexture = new o.T(e, this.atlasImage, n.RGBA), this.atlasTexture.bind(n.LINEAR, n.CLAMP_TO_EDGE) - } - _updatePatternAtlas() { - const e = []; - for (const d in this.patterns) e.push(this.patterns[d].bin); - const { - w: n, - h: s - } = o.p(e), u = this.atlasImage; - u.resize({ - width: n || 1, - height: s || 1 - }); - for (const d in this.patterns) { - const { - bin: m - } = this.patterns[d], y = m.x + 1, w = m.y + 1, P = this.getImage(d).data, M = P.width, D = P.height; - o.R.copy(P, u, { - x: 0, - y: 0 - }, { - x: y, - y: w - }, { - width: M, - height: D - }), o.R.copy(P, u, { - x: 0, - y: D - 1 - }, { - x: y, - y: w - 1 - }, { - width: M, - height: 1 - }), o.R.copy(P, u, { - x: 0, - y: 0 - }, { - x: y, - y: w + D - }, { - width: M, - height: 1 - }), o.R.copy(P, u, { - x: M - 1, - y: 0 - }, { - x: y - 1, - y: w - }, { - width: 1, - height: D - }), o.R.copy(P, u, { - x: 0, - y: 0 - }, { - x: y + M, - y: w - }, { - width: 1, - height: D - }) - } - this.dirty = !0 - } - beginFrame() { - this.callbackDispatchedThisFrame = {} - } - dispatchRenderCallbacks(e) { - for (const n of e) { - if (this.callbackDispatchedThisFrame[n]) continue; - this.callbackDispatchedThisFrame[n] = !0; - const s = this.getImage(n); - s || o.w(`Image with ID: "${n}" was not found`), ct(s) && this.updateImage(n, s) - } - } - } - const Be = 1e20; - - function st(h, e, n, s, u, d, m, y, w) { - for (let P = e; P < e + s; P++) it(h, n * d + P, d, u, m, y, w); - for (let P = n; P < n + u; P++) it(h, P * d + e, 1, s, m, y, w) - } - - function it(h, e, n, s, u, d, m) { - d[0] = 0, m[0] = -Be, m[1] = Be, u[0] = h[e]; - for (let y = 1, w = 0, P = 0; y < s; y++) { - u[y] = h[e + y * n]; - const M = y * y; - do { - const D = d[w]; - P = (u[y] - u[D] + M - D * D) / (y - D) / 2 - } while (P <= m[w] && --w > -1); - w++, d[w] = y, m[w] = P, m[w + 1] = Be - } - for (let y = 0, w = 0; y < s; y++) { - for (; m[w + 1] < y;) w++; - const P = d[w], - M = y - P; - h[e + y * n] = u[P] + M * M - } - } - class Qe { - constructor(e, n) { - this.requestManager = e, this.localIdeographFontFamily = n, this.entries = {} - } - setURL(e) { - this.url = e - } - getGlyphs(e) { - return o._(this, void 0, void 0, (function*() { - const n = []; - for (const d in e) - for (const m of e[d]) n.push(this._getAndCacheGlyphsPromise(d, m)); - const s = yield Promise.all(n), u = {}; - for (const { - stack: d, - id: m, - glyph: y - } - of s) u[d] || (u[d] = {}), u[d][m] = y && { - id: y.id, - bitmap: y.bitmap.clone(), - metrics: y.metrics - }; - return u - })) - } - _getAndCacheGlyphsPromise(e, n) { - return o._(this, void 0, void 0, (function*() { - let s = this.entries[e]; - s || (s = this.entries[e] = { - glyphs: {}, - requests: {}, - ranges: {} - }); - let u = s.glyphs[n]; - if (u !== void 0) return { - stack: e, - id: n, - glyph: u - }; - if (u = this._tinySDF(s, e, n), u) return s.glyphs[n] = u, { - stack: e, - id: n, - glyph: u - }; - const d = Math.floor(n / 256); - if (256 * d > 65535) throw new Error("glyphs > 65535 not supported"); - if (s.ranges[d]) return { - stack: e, - id: n, - glyph: u - }; - if (!this.url) throw new Error("glyphsUrl is not set"); - if (!s.requests[d]) { - const y = Qe.loadGlyphRange(e, d, this.url, this.requestManager); - s.requests[d] = y - } - const m = yield s.requests[d]; - for (const y in m) this._doesCharSupportLocalGlyph(+y) || (s.glyphs[+y] = m[+y]); - return s.ranges[d] = !0, { - stack: e, - id: n, - glyph: m[n] || null - } - })) - } - _doesCharSupportLocalGlyph(e) { - return !!this.localIdeographFontFamily && (new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}", "u").test(String.fromCodePoint(e)) || o.u["CJK Unified Ideographs"](e) || o.u["Hangul Syllables"](e) || o.u.Hiragana(e) || o.u.Katakana(e) || o.u["CJK Symbols and Punctuation"](e) || o.u["Halfwidth and Fullwidth Forms"](e)) - } - _tinySDF(e, n, s) { - const u = this.localIdeographFontFamily; - if (!u || !this._doesCharSupportLocalGlyph(s)) return; - let d = e.tinySDF; - if (!d) { - let y = "400"; - /bold/i.test(n) ? y = "900" : /medium/i.test(n) ? y = "500" : /light/i.test(n) && (y = "200"), d = e.tinySDF = new Qe.TinySDF({ - fontSize: 48, - buffer: 6, - radius: 16, - cutoff: .25, - fontFamily: u, - fontWeight: y - }) - } - const m = d.draw(String.fromCharCode(s)); - return { - id: s, - bitmap: new o.q({ - width: m.width || 60, - height: m.height || 60 - }, m.data), - metrics: { - width: m.glyphWidth / 2 || 24, - height: m.glyphHeight / 2 || 24, - left: m.glyphLeft / 2 + .5 || 0, - top: m.glyphTop / 2 - 27.5 || -8, - advance: m.glyphAdvance / 2 || 24, - isDoubleResolution: !0 - } - } - } - } - Qe.loadGlyphRange = function(h, e, n, s) { - return o._(this, void 0, void 0, (function*() { - const u = 256 * e, - d = u + 255, - m = s.transformRequest(n.replace("{fontstack}", h).replace("{range}", `${u}-${d}`), "Glyphs"), - y = yield o.n(m, new AbortController); - if (!y || !y.data) throw new Error(`Could not load glyph range. range: ${e}, ${u}-${d}`); - const w = {}; - for (const P of o.o(y.data)) w[P.id] = P; - return w - })) - }, Qe.TinySDF = class { - constructor({ - fontSize: h = 24, - buffer: e = 3, - radius: n = 8, - cutoff: s = .25, - fontFamily: u = "sans-serif", - fontWeight: d = "normal", - fontStyle: m = "normal", - lang: y = null - } = {}) { - this.buffer = e, this.cutoff = s, this.radius = n, this.lang = y; - const w = this.size = h + 4 * e, - P = this._createCanvas(w), - M = this.ctx = P.getContext("2d", { - willReadFrequently: !0 - }); - M.font = `${m} ${d} ${h}px ${u}`, M.textBaseline = "alphabetic", M.textAlign = "left", M.fillStyle = "black", this.gridOuter = new Float64Array(w * w), this.gridInner = new Float64Array(w * w), this.f = new Float64Array(w), this.z = new Float64Array(w + 1), this.v = new Uint16Array(w) - } - _createCanvas(h) { - const e = document.createElement("canvas"); - return e.width = e.height = h, e - } - draw(h) { - const { - width: e, - actualBoundingBoxAscent: n, - actualBoundingBoxDescent: s, - actualBoundingBoxLeft: u, - actualBoundingBoxRight: d - } = this.ctx.measureText(h), m = Math.ceil(n), y = Math.max(0, Math.min(this.size - this.buffer, Math.ceil(d - u))), w = Math.min(this.size - this.buffer, m + Math.ceil(s)), P = y + 2 * this.buffer, M = w + 2 * this.buffer, D = Math.max(P * M, 0), z = new Uint8ClampedArray(D), B = { - data: z, - width: P, - height: M, - glyphWidth: y, - glyphHeight: w, - glyphTop: m, - glyphLeft: 0, - glyphAdvance: e - }; - if (y === 0 || w === 0) return B; - const { - ctx: U, - buffer: ee, - gridInner: J, - gridOuter: re - } = this; - this.lang && (U.lang = this.lang), U.clearRect(ee, ee, y, w), U.fillText(h, ee, ee + m); - const se = U.getImageData(ee, ee, y, w); - re.fill(Be, 0, D), J.fill(0, 0, D); - for (let de = 0; de < w; de++) - for (let ue = 0; ue < y; ue++) { - const ge = se.data[4 * (de * y + ue) + 3] / 255; - if (ge === 0) continue; - const Te = (de + ee) * P + ue + ee; - if (ge === 1) re[Te] = 0, J[Te] = Be; - else { - const he = .5 - ge; - re[Te] = he > 0 ? he * he : 0, J[Te] = he < 0 ? he * he : 0 - } - } - st(re, 0, 0, P, M, P, this.f, this.v, this.z), st(J, ee, ee, y, w, P, this.f, this.v, this.z); - for (let de = 0; de < D; de++) { - const ue = Math.sqrt(re[de]) - Math.sqrt(J[de]); - z[de] = Math.round(255 - 255 * (ue / this.radius + this.cutoff)) - } - return B - } - }; - class ke { - constructor() { - this.specification = o.v.light.position - } - possiblyEvaluate(e, n) { - return o.B(e.expression.evaluate(n)) - } - interpolate(e, n, s) { - return { - x: o.C.number(e.x, n.x, s), - y: o.C.number(e.y, n.y, s), - z: o.C.number(e.z, n.z, s) - } - } - } - let vt; - class Q extends o.E { - constructor(e) { - super(), vt = vt || new o.r({ - anchor: new o.D(o.v.light.anchor), - position: new ke, - color: new o.D(o.v.light.color), - intensity: new o.D(o.v.light.intensity) - }), this._transitionable = new o.t(vt), this.setLight(e), this._transitioning = this._transitionable.untransitioned() - } - getLight() { - return this._transitionable.serialize() - } - setLight(e, n = {}) { - if (!this._validate(o.x, e, n)) - for (const s in e) { - const u = e[s]; - s.endsWith("-transition") ? this._transitionable.setTransition(s.slice(0, -11), u) : this._transitionable.setValue(s, u) - } - } - updateTransitions(e) { - this._transitioning = this._transitionable.transitioned(e, this._transitioning) - } - hasTransition() { - return this._transitioning.hasTransition() - } - recalculate(e) { - this.properties = this._transitioning.possiblyEvaluate(e) - } - _validate(e, n, s) { - return (!s || s.validate !== !1) && o.y(this, e.call(o.z, { - value: n, - style: { - glyphs: !0, - sprite: !0 - }, - styleSpec: o.v - })) - } - } - const te = new o.r({ - "sky-color": new o.D(o.v.sky["sky-color"]), - "horizon-color": new o.D(o.v.sky["horizon-color"]), - "fog-color": new o.D(o.v.sky["fog-color"]), - "fog-ground-blend": new o.D(o.v.sky["fog-ground-blend"]), - "horizon-fog-blend": new o.D(o.v.sky["horizon-fog-blend"]), - "sky-horizon-blend": new o.D(o.v.sky["sky-horizon-blend"]), - "atmosphere-blend": new o.D(o.v.sky["atmosphere-blend"]) - }); - class _e extends o.E { - constructor(e) { - super(), this._transitionable = new o.t(te), this.setSky(e), this._transitioning = this._transitionable.untransitioned(), this.recalculate(new o.F(0)) - } - setSky(e, n = {}) { - if (!this._validate(o.G, e, n)) { - e || (e = { - "sky-color": "transparent", - "horizon-color": "transparent", - "fog-color": "transparent", - "fog-ground-blend": 1, - "atmosphere-blend": 0 - }); - for (const s in e) { - const u = e[s]; - s.endsWith("-transition") ? this._transitionable.setTransition(s.slice(0, -11), u) : this._transitionable.setValue(s, u) - } - } - } - getSky() { - return this._transitionable.serialize() - } - updateTransitions(e) { - this._transitioning = this._transitionable.transitioned(e, this._transitioning) - } - hasTransition() { - return this._transitioning.hasTransition() - } - recalculate(e) { - this.properties = this._transitioning.possiblyEvaluate(e) - } - _validate(e, n, s = {}) { - return (s == null ? void 0 : s.validate) !== !1 && o.y(this, e.call(o.z, o.e({ - value: n, - style: { - glyphs: !0, - sprite: !0 - }, - styleSpec: o.v - }))) - } - calculateFogBlendOpacity(e) { - return e < 60 ? 0 : e < 70 ? (e - 60) / 10 : 1 - } - } - class ne { - constructor(e, n) { - this.width = e, this.height = n, this.nextRow = 0, this.data = new Uint8Array(this.width * this.height), this.dashEntry = {} - } - getDash(e, n) { - const s = e.join(",") + String(n); - return this.dashEntry[s] || (this.dashEntry[s] = this.addDash(e, n)), this.dashEntry[s] - } - getDashRanges(e, n, s) { - const u = []; - let d = e.length % 2 == 1 ? -e[e.length - 1] * s : 0, - m = e[0] * s, - y = !0; - u.push({ - left: d, - right: m, - isDash: y, - zeroLength: e[0] === 0 - }); - let w = e[0]; - for (let P = 1; P < e.length; P++) { - y = !y; - const M = e[P]; - d = w * s, w += M, m = w * s, u.push({ - left: d, - right: m, - isDash: y, - zeroLength: M === 0 - }) - } - return u - } - addRoundDash(e, n, s) { - const u = n / 2; - for (let d = -s; d <= s; d++) { - const m = this.width * (this.nextRow + s + d); - let y = 0, - w = e[y]; - for (let P = 0; P < this.width; P++) { - P / w.right > 1 && (w = e[++y]); - const M = Math.abs(P - w.left), - D = Math.abs(P - w.right), - z = Math.min(M, D); - let B; - const U = d / s * (u + 1); - if (w.isDash) { - const ee = u - Math.abs(U); - B = Math.sqrt(z * z + ee * ee) - } else B = u - Math.sqrt(z * z + U * U); - this.data[m + P] = Math.max(0, Math.min(255, B + 128)) - } - } - } - addRegularDash(e) { - for (let y = e.length - 1; y >= 0; --y) { - const w = e[y], - P = e[y + 1]; - w.zeroLength ? e.splice(y, 1) : P && P.isDash === w.isDash && (P.left = w.left, e.splice(y, 1)) - } - const n = e[0], - s = e[e.length - 1]; - n.isDash === s.isDash && (n.left = s.left - this.width, s.right = n.right + this.width); - const u = this.width * this.nextRow; - let d = 0, - m = e[d]; - for (let y = 0; y < this.width; y++) { - y / m.right > 1 && (m = e[++d]); - const w = Math.abs(y - m.left), - P = Math.abs(y - m.right), - M = Math.min(w, P); - this.data[u + y] = Math.max(0, Math.min(255, (m.isDash ? M : -M) + 128)) - } - } - addDash(e, n) { - const s = n ? 7 : 0, - u = 2 * s + 1; - if (this.nextRow + u > this.height) return o.w("LineAtlas out of space"), null; - let d = 0; - for (let y = 0; y < e.length; y++) d += e[y]; - if (d !== 0) { - const y = this.width / d, - w = this.getDashRanges(e, this.width, y); - n ? this.addRoundDash(w, y, s) : this.addRegularDash(w) - } - const m = { - y: (this.nextRow + s + .5) / this.height, - height: 2 * s / this.height, - width: d - }; - return this.nextRow += u, this.dirty = !0, m - } - bind(e) { - const n = e.gl; - this.texture ? (n.bindTexture(n.TEXTURE_2D, this.texture), this.dirty && (this.dirty = !1, n.texSubImage2D(n.TEXTURE_2D, 0, 0, 0, this.width, this.height, n.ALPHA, n.UNSIGNED_BYTE, this.data))) : (this.texture = n.createTexture(), n.bindTexture(n.TEXTURE_2D, this.texture), n.texParameteri(n.TEXTURE_2D, n.TEXTURE_WRAP_S, n.REPEAT), n.texParameteri(n.TEXTURE_2D, n.TEXTURE_WRAP_T, n.REPEAT), n.texParameteri(n.TEXTURE_2D, n.TEXTURE_MIN_FILTER, n.LINEAR), n.texParameteri(n.TEXTURE_2D, n.TEXTURE_MAG_FILTER, n.LINEAR), n.texImage2D(n.TEXTURE_2D, 0, n.ALPHA, this.width, this.height, 0, n.ALPHA, n.UNSIGNED_BYTE, this.data)) - } - } - const Pe = "maplibre_preloaded_worker_pool"; - class Me { - constructor() { - this.active = {} - } - acquire(e) { - if (!this.workers) - for (this.workers = []; this.workers.length < Me.workerCount;) this.workers.push(new Worker(o.a.WORKER_URL)); - return this.active[e] = !0, this.workers.slice() - } - release(e) { - delete this.active[e], this.numActive() === 0 && (this.workers.forEach((n => { - n.terminate() - })), this.workers = null) - } - isPreloaded() { - return !!this.active[Pe] - } - numActive() { - return Object.keys(this.active).length - } - } - const at = Math.floor(ye.hardwareConcurrency / 2); - let We, Ct; - - function _t() { - return We || (We = new Me), We - } - Me.workerCount = o.H(globalThis) ? Math.max(Math.min(at, 3), 1) : 1; - class xt { - constructor(e, n) { - this.workerPool = e, this.actors = [], this.currentActor = 0, this.id = n; - const s = this.workerPool.acquire(n); - for (let u = 0; u < s.length; u++) { - const d = new o.J(s[u], n); - d.name = `Worker ${u}`, this.actors.push(d) - } - if (!this.actors.length) throw new Error("No actors found") - } - broadcast(e, n) { - const s = []; - for (const u of this.actors) s.push(u.sendAsync({ - type: e, - data: n - })); - return Promise.all(s) - } - getActor() { - return this.currentActor = (this.currentActor + 1) % this.actors.length, this.actors[this.currentActor] - } - remove(e = !0) { - this.actors.forEach((n => { - n.remove() - })), this.actors = [], e && this.workerPool.release(this.id) - } - registerMessageHandler(e, n) { - for (const s of this.actors) s.registerMessageHandler(e, n) - } - } - - function tt() { - return Ct || (Ct = new xt(_t(), o.K), Ct.registerMessageHandler("GR", ((h, e, n) => o.m(e, n)))), Ct - } - - function pt(h, e) { - const n = o.L(); - return o.M(n, n, [1, 1, 0]), o.N(n, n, [.5 * h.width, .5 * h.height, 1]), h.calculatePosMatrix ? o.O(n, n, h.calculatePosMatrix(e.toUnwrapped())) : n - } - - function It(h, e, n, s, u, d, m) { - var y; - const w = (function(z, B, U) { - if (z) - for (const ee of z) { - const J = B[ee]; - if (J && J.source === U && J.type === "fill-extrusion") return !0 - } else - for (const ee in B) { - const J = B[ee]; - if (J.source === U && J.type === "fill-extrusion") return !0 - } - return !1 - })((y = u == null ? void 0 : u.layers) !== null && y !== void 0 ? y : null, e, h.id), - P = d.maxPitchScaleFactor(), - M = h.tilesIn(s, P, w); - M.sort(ut); - const D = []; - for (const z of M) D.push({ - wrappedTileID: z.tileID.wrapped().key, - queryResults: z.tile.queryRenderedFeatures(e, n, h._state, z.queryGeometry, z.cameraQueryGeometry, z.scale, u, d, P, pt(h.transform, z.tileID), m ? (B, U) => m(z.tileID, B, U) : void 0) - }); - return (function(z, B) { - for (const U in z) - for (const ee of z[U]) bt(ee, B); - return z - })((function(z) { - const B = {}, - U = {}; - for (const ee of z) { - const J = ee.queryResults, - re = ee.wrappedTileID, - se = U[re] = U[re] || {}; - for (const de in J) { - const ue = J[de], - ge = se[de] = se[de] || {}, - Te = B[de] = B[de] || []; - for (const he of ue) ge[he.featureIndex] || (ge[he.featureIndex] = !0, Te.push(he)) - } - } - return B - })(D), h) - } - - function ut(h, e) { - const n = h.tileID, - s = e.tileID; - return n.overscaledZ - s.overscaledZ || n.canonical.y - s.canonical.y || n.wrap - s.wrap || n.canonical.x - s.canonical.x - } - - function bt(h, e) { - const n = h.feature, - s = e.getFeatureState(n.layer["source-layer"], n.id); - n.source = n.layer.source, n.layer["source-layer"] && (n.sourceLayer = n.layer["source-layer"]), n.state = s - } - - function wt(h, e, n) { - return o._(this, void 0, void 0, (function*() { - let s = h; - if (h.url ? s = (yield o.j(e.transformRequest(h.url, "Source"), n)).data : yield ye.frameAsync(n), !s) return null; - const u = o.Q(o.e(s, h), ["tiles", "minzoom", "maxzoom", "attribution", "bounds", "scheme", "tileSize", "encoding"]); - return "vector_layers" in s && s.vector_layers && (u.vectorLayerIds = s.vector_layers.map((d => d.id))), u - })) - } - class dt { - constructor(e, n) { - e && (n ? this.setSouthWest(e).setNorthEast(n) : Array.isArray(e) && (e.length === 4 ? this.setSouthWest([e[0], e[1]]).setNorthEast([e[2], e[3]]) : this.setSouthWest(e[0]).setNorthEast(e[1]))) - } - setNorthEast(e) { - return this._ne = e instanceof o.S ? new o.S(e.lng, e.lat) : o.S.convert(e), this - } - setSouthWest(e) { - return this._sw = e instanceof o.S ? new o.S(e.lng, e.lat) : o.S.convert(e), this - } - extend(e) { - const n = this._sw, - s = this._ne; - let u, d; - if (e instanceof o.S) u = e, d = e; - else { - if (!(e instanceof dt)) return Array.isArray(e) ? e.length === 4 || e.every(Array.isArray) ? this.extend(dt.convert(e)) : this.extend(o.S.convert(e)) : e && ("lng" in e || "lon" in e) && "lat" in e ? this.extend(o.S.convert(e)) : this; - if (u = e._sw, d = e._ne, !u || !d) return this - } - return n || s ? (n.lng = Math.min(u.lng, n.lng), n.lat = Math.min(u.lat, n.lat), s.lng = Math.max(d.lng, s.lng), s.lat = Math.max(d.lat, s.lat)) : (this._sw = new o.S(u.lng, u.lat), this._ne = new o.S(d.lng, d.lat)), this - } - getCenter() { - return new o.S((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 o.S(this.getWest(), this.getNorth()) - } - getSouthEast() { - return new o.S(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(e) { - const { - lng: n, - lat: s - } = o.S.convert(e); - let u = this._sw.lng <= n && n <= this._ne.lng; - return this._sw.lng > this._ne.lng && (u = this._sw.lng >= n && n >= this._ne.lng), this._sw.lat <= s && s <= this._ne.lat && u - } - static convert(e) { - return e instanceof dt ? e : e && new dt(e) - } - static fromLngLat(e, n = 0) { - const s = 360 * n / 40075017, - u = s / Math.cos(Math.PI / 180 * e.lat); - return new dt(new o.S(e.lng - u, e.lat - s), new o.S(e.lng + u, e.lat + s)) - } - adjustAntiMeridian() { - const e = new o.S(this._sw.lng, this._sw.lat), - n = new o.S(this._ne.lng, this._ne.lat); - return new dt(e, e.lng > n.lng ? new o.S(n.lng + 360, n.lat) : n) - } - } - class Lt { - constructor(e, n, s) { - this.bounds = dt.convert(this.validateBounds(e)), this.minzoom = n || 0, this.maxzoom = s || 24 - } - validateBounds(e) { - return Array.isArray(e) && e.length === 4 ? [Math.max(-180, e[0]), Math.max(-90, e[1]), Math.min(180, e[2]), Math.min(90, e[3])] : [-180, -90, 180, 90] - } - contains(e) { - const n = Math.pow(2, e.z), - s = Math.floor(o.V(this.bounds.getWest()) * n), - u = Math.floor(o.U(this.bounds.getNorth()) * n), - d = Math.ceil(o.V(this.bounds.getEast()) * n), - m = Math.ceil(o.U(this.bounds.getSouth()) * n); - return e.x >= s && e.x < d && e.y >= u && e.y < m - } - } - class Xt extends o.E { - constructor(e, n, s, u) { - if (super(), this.id = e, this.dispatcher = s, this.type = "vector", this.minzoom = 0, this.maxzoom = 22, this.scheme = "xyz", this.tileSize = 512, this.reparseOverscaled = !0, this.isTileClipped = !0, this._loaded = !1, o.e(this, o.Q(n, ["url", "scheme", "tileSize", "promoteId"])), this._options = o.e({ - type: "vector" - }, n), this._collectResourceTiming = n.collectResourceTiming, this.tileSize !== 512) throw new Error("vector tile sources must have a tileSize of 512"); - this.setEventedParent(u) - } - load() { - return o._(this, void 0, void 0, (function*() { - this._loaded = !1, this.fire(new o.l("dataloading", { - dataType: "source" - })), this._tileJSONRequest = new AbortController; - try { - const e = yield wt(this._options, this.map._requestManager, this._tileJSONRequest); - this._tileJSONRequest = null, this._loaded = !0, this.map.style.sourceCaches[this.id].clearTiles(), e && (o.e(this, e), e.bounds && (this.tileBounds = new Lt(e.bounds, this.minzoom, this.maxzoom)), this.fire(new o.l("data", { - dataType: "source", - sourceDataType: "metadata" - })), this.fire(new o.l("data", { - dataType: "source", - sourceDataType: "content" - }))) - } catch (e) { - this._tileJSONRequest = null, this.fire(new o.k(e)) - } - })) - } - loaded() { - return this._loaded - } - hasTile(e) { - return !this.tileBounds || this.tileBounds.contains(e.canonical) - } - onAdd(e) { - this.map = e, this.load() - } - setSourceProperty(e) { - this._tileJSONRequest && this._tileJSONRequest.abort(), e(), this.load() - } - setTiles(e) { - return this.setSourceProperty((() => { - this._options.tiles = e - })), this - } - setUrl(e) { - return this.setSourceProperty((() => { - this.url = e, this._options.url = e - })), this - } - onRemove() { - this._tileJSONRequest && (this._tileJSONRequest.abort(), this._tileJSONRequest = null) - } - serialize() { - return o.e({}, this._options) - } - loadTile(e) { - return o._(this, void 0, void 0, (function*() { - const n = e.tileID.canonical.url(this.tiles, this.map.getPixelRatio(), this.scheme), - s = { - request: this.map._requestManager.transformRequest(n, "Tile"), - uid: e.uid, - tileID: e.tileID, - zoom: e.tileID.overscaledZ, - tileSize: this.tileSize * e.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, - globalState: this.map.getGlobalState() - }; - s.request.collectResourceTiming = this._collectResourceTiming; - let u = "RT"; - if (e.actor && e.state !== "expired") { - if (e.state === "loading") return new Promise(((d, m) => { - e.reloadPromise = { - resolve: d, - reject: m - } - })) - } else e.actor = this.dispatcher.getActor(), u = "LT"; - e.abortController = new AbortController; - try { - const d = yield e.actor.sendAsync({ - type: u, - data: s - }, e.abortController); - if (delete e.abortController, e.aborted) return; - this._afterTileLoadWorkerResponse(e, d) - } catch (d) { - if (delete e.abortController, e.aborted) return; - if (d && d.status !== 404) throw d; - this._afterTileLoadWorkerResponse(e, null) - } - })) - } - _afterTileLoadWorkerResponse(e, n) { - if (n && n.resourceTiming && (e.resourceTiming = n.resourceTiming), n && this.map._refreshExpiredTiles && e.setExpiryData(n), e.loadVectorData(n, this.map.painter), e.reloadPromise) { - const s = e.reloadPromise; - e.reloadPromise = null, this.loadTile(e).then(s.resolve).catch(s.reject) - } - } - abortTile(e) { - return o._(this, void 0, void 0, (function*() { - e.abortController && (e.abortController.abort(), delete e.abortController), e.actor && (yield e.actor.sendAsync({ - type: "AT", - data: { - uid: e.uid, - type: this.type, - source: this.id - } - })) - })) - } - unloadTile(e) { - return o._(this, void 0, void 0, (function*() { - e.unloadVectorData(), e.actor && (yield e.actor.sendAsync({ - type: "RMT", - data: { - uid: e.uid, - type: this.type, - source: this.id - } - })) - })) - } - hasTransition() { - return !1 - } - } - class Yt extends o.E { - constructor(e, n, s, u) { - super(), this.id = e, this.dispatcher = s, this.setEventedParent(u), this.type = "raster", this.minzoom = 0, this.maxzoom = 22, this.roundZoom = !0, this.scheme = "xyz", this.tileSize = 512, this._loaded = !1, this._options = o.e({ - type: "raster" - }, n), o.e(this, o.Q(n, ["url", "scheme", "tileSize"])) - } - load() { - return o._(this, arguments, void 0, (function*(e = !1) { - this._loaded = !1, this.fire(new o.l("dataloading", { - dataType: "source" - })), this._tileJSONRequest = new AbortController; - try { - const n = yield wt(this._options, this.map._requestManager, this._tileJSONRequest); - this._tileJSONRequest = null, this._loaded = !0, n && (o.e(this, n), n.bounds && (this.tileBounds = new Lt(n.bounds, this.minzoom, this.maxzoom)), this.fire(new o.l("data", { - dataType: "source", - sourceDataType: "metadata" - })), this.fire(new o.l("data", { - dataType: "source", - sourceDataType: "content", - sourceDataChanged: e - }))) - } catch (n) { - this._tileJSONRequest = null, this.fire(new o.k(n)) - } - })) - } - loaded() { - return this._loaded - } - onAdd(e) { - this.map = e, this.load() - } - onRemove() { - this._tileJSONRequest && (this._tileJSONRequest.abort(), this._tileJSONRequest = null) - } - setSourceProperty(e) { - this._tileJSONRequest && (this._tileJSONRequest.abort(), this._tileJSONRequest = null), e(), this.load(!0) - } - setTiles(e) { - return this.setSourceProperty((() => { - this._options.tiles = e - })), this - } - setUrl(e) { - return this.setSourceProperty((() => { - this.url = e, this._options.url = e - })), this - } - serialize() { - return o.e({}, this._options) - } - hasTile(e) { - return !this.tileBounds || this.tileBounds.contains(e.canonical) - } - loadTile(e) { - return o._(this, void 0, void 0, (function*() { - const n = e.tileID.canonical.url(this.tiles, this.map.getPixelRatio(), this.scheme); - e.abortController = new AbortController; - try { - const s = yield Ne.getImage(this.map._requestManager.transformRequest(n, "Tile"), e.abortController, this.map._refreshExpiredTiles); - if (delete e.abortController, e.aborted) return void(e.state = "unloaded"); - if (s && s.data) { - this.map._refreshExpiredTiles && (s.cacheControl || s.expires) && e.setExpiryData({ - cacheControl: s.cacheControl, - expires: s.expires - }); - const u = this.map.painter.context, - d = u.gl, - m = s.data; - e.texture = this.map.painter.getTileTexture(m.width), e.texture ? e.texture.update(m, { - useMipmap: !0 - }) : (e.texture = new o.T(u, m, d.RGBA, { - useMipmap: !0 - }), e.texture.bind(d.LINEAR, d.CLAMP_TO_EDGE, d.LINEAR_MIPMAP_NEAREST)), e.state = "loaded" - } - } catch (s) { - if (delete e.abortController, e.aborted) e.state = "unloaded"; - else if (s) throw e.state = "errored", s - } - })) - } - abortTile(e) { - return o._(this, void 0, void 0, (function*() { - e.abortController && (e.abortController.abort(), delete e.abortController) - })) - } - unloadTile(e) { - return o._(this, void 0, void 0, (function*() { - e.texture && this.map.painter.saveTileTexture(e.texture) - })) - } - hasTransition() { - return !1 - } - } - class nr extends Yt { - constructor(e, n, s, u) { - super(e, n, s, u), this.type = "raster-dem", this.maxzoom = 22, this._options = o.e({ - type: "raster-dem" - }, n), this.encoding = n.encoding || "mapbox", this.redFactor = n.redFactor, this.greenFactor = n.greenFactor, this.blueFactor = n.blueFactor, this.baseShift = n.baseShift - } - loadTile(e) { - return o._(this, void 0, void 0, (function*() { - const n = e.tileID.canonical.url(this.tiles, this.map.getPixelRatio(), this.scheme), - s = this.map._requestManager.transformRequest(n, "Tile"); - e.neighboringTiles = this._getNeighboringTiles(e.tileID), e.abortController = new AbortController; - try { - const u = yield Ne.getImage(s, e.abortController, this.map._refreshExpiredTiles); - if (delete e.abortController, e.aborted) return void(e.state = "unloaded"); - if (u && u.data) { - const d = u.data; - this.map._refreshExpiredTiles && (u.cacheControl || u.expires) && e.setExpiryData({ - cacheControl: u.cacheControl, - expires: u.expires - }); - const m = o.b(d) && o.W() ? d : yield this.readImageNow(d), y = { - type: this.type, - uid: e.uid, - source: this.id, - rawImageData: m, - encoding: this.encoding, - redFactor: this.redFactor, - greenFactor: this.greenFactor, - blueFactor: this.blueFactor, - baseShift: this.baseShift - }; - if (!e.actor || e.state === "expired") { - e.actor = this.dispatcher.getActor(); - const w = yield e.actor.sendAsync({ - type: "LDT", - data: y - }); - e.dem = w, e.needsHillshadePrepare = !0, e.needsTerrainPrepare = !0, e.state = "loaded" - } - } - } catch (u) { - if (delete e.abortController, e.aborted) e.state = "unloaded"; - else if (u) throw e.state = "errored", u - } - })) - } - readImageNow(e) { - return o._(this, void 0, void 0, (function*() { - if (typeof VideoFrame < "u" && o.X()) { - const n = e.width + 2, - s = e.height + 2; - try { - return new o.R({ - width: n, - height: s - }, yield o.Y(e, -1, -1, n, s)) - } catch {} - } - return ye.getImageData(e, 1) - })) - } - _getNeighboringTiles(e) { - const n = e.canonical, - s = Math.pow(2, n.z), - u = (n.x - 1 + s) % s, - d = n.x === 0 ? e.wrap - 1 : e.wrap, - m = (n.x + 1 + s) % s, - y = n.x + 1 === s ? e.wrap + 1 : e.wrap, - w = {}; - return w[new o.Z(e.overscaledZ, d, n.z, u, n.y).key] = { - backfilled: !1 - }, w[new o.Z(e.overscaledZ, y, n.z, m, n.y).key] = { - backfilled: !1 - }, n.y > 0 && (w[new o.Z(e.overscaledZ, d, n.z, u, n.y - 1).key] = { - backfilled: !1 - }, w[new o.Z(e.overscaledZ, e.wrap, n.z, n.x, n.y - 1).key] = { - backfilled: !1 - }, w[new o.Z(e.overscaledZ, y, n.z, m, n.y - 1).key] = { - backfilled: !1 - }), n.y + 1 < s && (w[new o.Z(e.overscaledZ, d, n.z, u, n.y + 1).key] = { - backfilled: !1 - }, w[new o.Z(e.overscaledZ, e.wrap, n.z, n.x, n.y + 1).key] = { - backfilled: !1 - }, w[new o.Z(e.overscaledZ, y, n.z, m, n.y + 1).key] = { - backfilled: !1 - }), w - } - unloadTile(e) { - return o._(this, void 0, void 0, (function*() { - e.demTexture && this.map.painter.saveTileTexture(e.demTexture), e.fbo && (e.fbo.destroy(), delete e.fbo), e.dem && delete e.dem, delete e.neighboringTiles, e.state = "unloaded", e.actor && (yield e.actor.sendAsync({ - type: "RDT", - data: { - type: this.type, - uid: e.uid, - source: this.id - } - })) - })) - } - } - class ar extends o.E { - constructor(e, n, s, u) { - super(), this.id = e, 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: n.data - }, this.actor = s.getActor(), this.setEventedParent(u), this._data = n.data, this._options = o.e({}, n), this._collectResourceTiming = n.collectResourceTiming, n.maxzoom !== void 0 && (this.maxzoom = n.maxzoom), n.type && (this.type = n.type), n.attribution && (this.attribution = n.attribution), this.promoteId = n.promoteId, n.clusterMaxZoom !== void 0 && this.maxzoom <= n.clusterMaxZoom && o.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${n.clusterMaxZoom}".`), this.workerOptions = o.e({ - source: this.id, - cluster: n.cluster || !1, - geojsonVtOptions: { - buffer: this._pixelsToTileUnits(n.buffer !== void 0 ? n.buffer : 128), - tolerance: this._pixelsToTileUnits(n.tolerance !== void 0 ? n.tolerance : .375), - extent: o.$, - maxZoom: this.maxzoom, - lineMetrics: n.lineMetrics || !1, - generateId: n.generateId || !1 - }, - superclusterOptions: { - maxZoom: this._getClusterMaxZoom(n.clusterMaxZoom), - minPoints: Math.max(2, n.clusterMinPoints || 2), - extent: o.$, - radius: this._pixelsToTileUnits(n.clusterRadius || 50), - log: !1, - generateId: n.generateId || !1 - }, - clusterProperties: n.clusterProperties, - filter: n.filter - }, n.workerOptions), typeof this.promoteId == "string" && (this.workerOptions.promoteId = this.promoteId) - } - _pixelsToTileUnits(e) { - return e * (o.$ / this.tileSize) - } - _getClusterMaxZoom(e) { - const n = e ? Math.round(e) : this.maxzoom - 1; - return Number.isInteger(e) || e === void 0 || o.w(`Integer expected for option 'clusterMaxZoom': provided value "${e}" rounded to "${n}"`), n - } - load() { - return o._(this, void 0, void 0, (function*() { - yield this._updateWorkerData() - })) - } - onAdd(e) { - this.map = e, this.load() - } - setData(e) { - return this._data = e, this._pendingWorkerUpdate = { - data: e - }, this._updateWorkerData(), this - } - updateData(e) { - return this._pendingWorkerUpdate.diff = o.a0(this._pendingWorkerUpdate.diff, e), this._updateWorkerData(), this - } - getData() { - return o._(this, void 0, void 0, (function*() { - const e = o.e({ - type: this.type - }, this.workerOptions); - return this.actor.sendAsync({ - type: "GD", - data: e - }) - })) - } - getCoordinatesFromGeometry(e) { - return e.type === "GeometryCollection" ? e.geometries.map((n => n.coordinates)).flat(1 / 0) : e.coordinates.flat(1 / 0) - } - getBounds() { - return o._(this, void 0, void 0, (function*() { - const e = new dt, - n = yield this.getData(); - let s; - switch (n.type) { - case "FeatureCollection": - s = n.features.map((u => this.getCoordinatesFromGeometry(u.geometry))).flat(1 / 0); - break; - case "Feature": - s = this.getCoordinatesFromGeometry(n.geometry); - break; - default: - s = this.getCoordinatesFromGeometry(n) - } - if (s.length == 0) return e; - for (let u = 0; u < s.length - 1; u += 2) e.extend([s[u], s[u + 1]]); - return e - })) - } - setClusterOptions(e) { - return this.workerOptions.cluster = e.cluster, e && (e.clusterRadius !== void 0 && (this.workerOptions.superclusterOptions.radius = this._pixelsToTileUnits(e.clusterRadius)), e.clusterMaxZoom !== void 0 && (this.workerOptions.superclusterOptions.maxZoom = this._getClusterMaxZoom(e.clusterMaxZoom))), this._updateWorkerData(), this - } - getClusterExpansionZoom(e) { - return this.actor.sendAsync({ - type: "GCEZ", - data: { - type: this.type, - clusterId: e, - source: this.id - } - }) - } - getClusterChildren(e) { - return this.actor.sendAsync({ - type: "GCC", - data: { - type: this.type, - clusterId: e, - source: this.id - } - }) - } - getClusterLeaves(e, n, s) { - return this.actor.sendAsync({ - type: "GCL", - data: { - type: this.type, - source: this.id, - clusterId: e, - limit: n, - offset: s - } - }) - } - _updateWorkerData() { - return o._(this, void 0, void 0, (function*() { - if (this._isUpdatingWorker) return; - const { - data: e, - diff: n - } = this._pendingWorkerUpdate; - if (!e && !n) return void o.w(`No data or diff provided to GeoJSONSource ${this.id}.`); - const s = o.e({ - type: this.type - }, this.workerOptions); - e ? (typeof e == "string" ? (s.request = this.map._requestManager.transformRequest(ye.resolveURL(e), "Source"), s.request.collectResourceTiming = this._collectResourceTiming) : s.data = JSON.stringify(e), this._pendingWorkerUpdate.data = void 0) : n && (s.dataDiff = n, this._pendingWorkerUpdate.diff = void 0), this._isUpdatingWorker = !0, this.fire(new o.l("dataloading", { - dataType: "source" - })); - try { - const u = yield this.actor.sendAsync({ - type: "LD", - data: s - }); - if (this._isUpdatingWorker = !1, this._removed || u.abandoned) return void this.fire(new o.l("dataabort", { - dataType: "source" - })); - this._data = u.data; - let d = null; - u.resourceTiming && u.resourceTiming[this.id] && (d = u.resourceTiming[this.id].slice(0)); - const m = { - dataType: "source" - }; - this._collectResourceTiming && d && d.length > 0 && o.e(m, { - resourceTiming: d - }), this.fire(new o.l("data", Object.assign(Object.assign({}, m), { - sourceDataType: "metadata" - }))), this.fire(new o.l("data", Object.assign(Object.assign({}, m), { - sourceDataType: "content" - }))) - } catch (u) { - if (this._isUpdatingWorker = !1, this._removed) return void this.fire(new o.l("dataabort", { - dataType: "source" - })); - this.fire(new o.k(u)) - } finally { - (this._pendingWorkerUpdate.data || this._pendingWorkerUpdate.diff) && this._updateWorkerData() - } - })) - } - loaded() { - return !this._isUpdatingWorker && this._pendingWorkerUpdate.data === void 0 && this._pendingWorkerUpdate.diff === void 0 - } - loadTile(e) { - return o._(this, void 0, void 0, (function*() { - const n = e.actor ? "RT" : "LT"; - e.actor = this.actor; - const s = { - type: this.type, - uid: e.uid, - tileID: e.tileID, - zoom: e.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, - globalState: this.map.getGlobalState() - }; - e.abortController = new AbortController; - const u = yield this.actor.sendAsync({ - type: n, - data: s - }, e.abortController); - delete e.abortController, e.unloadVectorData(), e.aborted || e.loadVectorData(u, this.map.painter, n === "RT") - })) - } - abortTile(e) { - return o._(this, void 0, void 0, (function*() { - e.abortController && (e.abortController.abort(), delete e.abortController), e.aborted = !0 - })) - } - unloadTile(e) { - return o._(this, void 0, void 0, (function*() { - e.unloadVectorData(), yield this.actor.sendAsync({ - type: "RMT", - data: { - uid: e.uid, - type: this.type, - source: this.id - } - }) - })) - } - onRemove() { - this._removed = !0, this.actor.sendAsync({ - type: "RS", - data: { - type: this.type, - source: this.id - } - }) - } - serialize() { - return o.e({}, this._options, { - type: this.type, - data: this._data - }) - } - hasTransition() { - return !1 - } - } - class Ft extends o.E { - constructor(e, n, s, u) { - super(), this.flippedWindingOrder = !1, this.id = e, this.dispatcher = s, this.coordinates = n.coordinates, this.type = "image", this.minzoom = 0, this.maxzoom = 22, this.tileSize = 512, this.tiles = {}, this._loaded = !1, this.setEventedParent(u), this.options = n - } - load(e) { - return o._(this, void 0, void 0, (function*() { - this._loaded = !1, this.fire(new o.l("dataloading", { - dataType: "source" - })), this.url = this.options.url, this._request = new AbortController; - try { - const n = yield Ne.getImage(this.map._requestManager.transformRequest(this.url, "Image"), this._request); - this._request = null, this._loaded = !0, n && n.data && (this.image = n.data, e && (this.coordinates = e), this._finishLoading()) - } catch (n) { - this._request = null, this._loaded = !0, this.fire(new o.k(n)) - } - })) - } - loaded() { - return this._loaded - } - updateImage(e) { - return e.url ? (this._request && (this._request.abort(), this._request = null), this.options.url = e.url, this.load(e.coordinates).finally((() => { - this.texture = null - })), this) : this - } - _finishLoading() { - this.map && (this.setCoordinates(this.coordinates), this.fire(new o.l("data", { - dataType: "source", - sourceDataType: "metadata" - }))) - } - onAdd(e) { - this.map = e, this.load() - } - onRemove() { - this._request && (this._request.abort(), this._request = null) - } - setCoordinates(e) { - this.coordinates = e; - const n = e.map(o.a1.fromLngLat); - var s; - return this.tileID = (function(u) { - const d = o.a2.fromPoints(u), - m = d.width(), - y = d.height(), - w = Math.max(m, y), - P = Math.max(0, Math.floor(-Math.log(w) / Math.LN2)), - M = Math.pow(2, P); - return new o.a4(P, Math.floor((d.minX + d.maxX) / 2 * M), Math.floor((d.minY + d.maxY) / 2 * M)) - })(n), this.terrainTileRanges = this._getOverlappingTileRanges(n), this.minzoom = this.maxzoom = this.tileID.z, this.tileCoords = n.map((u => this.tileID.getTilePoint(u)._round())), this.flippedWindingOrder = ((s = this.tileCoords)[1].x - s[0].x) * (s[2].y - s[0].y) - (s[1].y - s[0].y) * (s[2].x - s[0].x) < 0, this.fire(new o.l("data", { - dataType: "source", - sourceDataType: "content" - })), this - } - prepare() { - if (Object.keys(this.tiles).length === 0 || !this.image) return; - const e = this.map.painter.context, - n = e.gl; - this.texture || (this.texture = new o.T(e, this.image, n.RGBA), this.texture.bind(n.LINEAR, n.CLAMP_TO_EDGE)); - let s = !1; - for (const u in this.tiles) { - const d = this.tiles[u]; - d.state !== "loaded" && (d.state = "loaded", d.texture = this.texture, s = !0) - } - s && this.fire(new o.l("data", { - dataType: "source", - sourceDataType: "idle", - sourceId: this.id - })) - } - loadTile(e) { - return o._(this, void 0, void 0, (function*() { - this.tileID && this.tileID.equals(e.tileID.canonical) ? (this.tiles[String(e.tileID.wrap)] = e, e.buckets = {}) : e.state = "errored" - })) - } - serialize() { - return { - type: "image", - url: this.options.url, - coordinates: this.coordinates - } - } - hasTransition() { - return !1 - } - _getOverlappingTileRanges(e) { - const { - minX: n, - minY: s, - maxX: u, - maxY: d - } = o.a2.fromPoints(e), m = {}; - for (let y = 0; y <= o.a3; y++) { - const w = Math.pow(2, y), - P = Math.floor(n * w), - M = Math.floor(s * w), - D = Math.floor(u * w), - z = Math.floor(d * w); - m[y] = { - minTileX: P, - minTileY: M, - maxTileX: D, - maxTileY: z - } - } - return m - } - } - class dr extends Ft { - constructor(e, n, s, u) { - super(e, n, s, u), this.roundZoom = !0, this.type = "video", this.options = n - } - load() { - return o._(this, void 0, void 0, (function*() { - this._loaded = !1; - const e = this.options; - this.urls = []; - for (const n of e.urls) this.urls.push(this.map._requestManager.transformRequest(n, "Source").url); - try { - const n = yield o.a5(this.urls); - if (this._loaded = !0, !n) return; - this.video = n, this.video.loop = !0, this.video.addEventListener("playing", (() => { - this.map.triggerRepaint() - })), this.map && this.video.play(), this._finishLoading() - } catch (n) { - this.fire(new o.k(n)) - } - })) - } - pause() { - this.video && this.video.pause() - } - play() { - this.video && this.video.play() - } - seek(e) { - if (this.video) { - const n = this.video.seekable; - e < n.start(0) || e > n.end(0) ? this.fire(new o.k(new o.a6(`sources.${this.id}`, null, `Playback for this video can be set only between the ${n.start(0)} and ${n.end(0)}-second mark.`))) : this.video.currentTime = e - } - } - getVideo() { - return this.video - } - onAdd(e) { - this.map || (this.map = e, this.load(), this.video && (this.video.play(), this.setCoordinates(this.coordinates))) - } - prepare() { - if (Object.keys(this.tiles).length === 0 || this.video.readyState < 2) return; - const e = this.map.painter.context, - n = e.gl; - this.texture ? this.video.paused || (this.texture.bind(n.LINEAR, n.CLAMP_TO_EDGE), n.texSubImage2D(n.TEXTURE_2D, 0, 0, 0, n.RGBA, n.UNSIGNED_BYTE, this.video)) : (this.texture = new o.T(e, this.video, n.RGBA), this.texture.bind(n.LINEAR, n.CLAMP_TO_EDGE)); - let s = !1; - for (const u in this.tiles) { - const d = this.tiles[u]; - d.state !== "loaded" && (d.state = "loaded", d.texture = this.texture, s = !0) - } - s && this.fire(new o.l("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 _r extends Ft { - constructor(e, n, s, u) { - super(e, n, s, u), n.coordinates ? Array.isArray(n.coordinates) && n.coordinates.length === 4 && !n.coordinates.some((d => !Array.isArray(d) || d.length !== 2 || d.some((m => typeof m != "number")))) || this.fire(new o.k(new o.a6(`sources.${e}`, null, '"coordinates" property must be an array of 4 longitude/latitude array pairs'))) : this.fire(new o.k(new o.a6(`sources.${e}`, null, 'missing required property "coordinates"'))), n.animate && typeof n.animate != "boolean" && this.fire(new o.k(new o.a6(`sources.${e}`, null, 'optional "animate" property must be a boolean value'))), n.canvas ? typeof n.canvas == "string" || n.canvas instanceof HTMLCanvasElement || this.fire(new o.k(new o.a6(`sources.${e}`, 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 o.k(new o.a6(`sources.${e}`, null, 'missing required property "canvas"'))), this.options = n, this.animate = n.animate === void 0 || n.animate - } - load() { - return o._(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 o.k(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(e) { - this.map = e, this.load(), this.canvas && this.animate && this.play() - } - onRemove() { - this.pause() - } - prepare() { - let e = !1; - if (this.canvas.width !== this.width && (this.width = this.canvas.width, e = !0), this.canvas.height !== this.height && (this.height = this.canvas.height, e = !0), this._hasInvalidDimensions() || Object.keys(this.tiles).length === 0) return; - const n = this.map.painter.context, - s = n.gl; - this.texture ? (e || this._playing) && this.texture.update(this.canvas, { - premultiply: !0 - }) : this.texture = new o.T(n, this.canvas, s.RGBA, { - premultiply: !0 - }); - let u = !1; - for (const d in this.tiles) { - const m = this.tiles[d]; - m.state !== "loaded" && (m.state = "loaded", m.texture = this.texture, u = !0) - } - u && this.fire(new o.l("data", { - dataType: "source", - sourceDataType: "idle", - sourceId: this.id - })) - } - serialize() { - return { - type: "canvas", - coordinates: this.coordinates - } - } - hasTransition() { - return this._playing - } - _hasInvalidDimensions() { - for (const e of [this.canvas.width, this.canvas.height]) - if (isNaN(e) || e <= 0) return !0; - return !1 - } - } - const Ir = {}, - jr = h => { - switch (h) { - case "geojson": - return ar; - case "image": - return Ft; - case "raster": - return Yt; - case "raster-dem": - return nr; - case "vector": - return Xt; - case "video": - return dr; - case "canvas": - return _r - } - return Ir[h] - }, - ur = "RTLPluginLoaded"; - class Mr extends o.E { - constructor() { - super(...arguments), this.status = "unavailable", this.url = null, this.dispatcher = tt() - } - _syncState(e) { - return this.status = e, this.dispatcher.broadcast("SRPS", { - pluginStatus: e, - pluginURL: this.url - }).catch((n => { - throw this.status = "error", n - })) - } - getRTLTextPluginStatus() { - return this.status - } - clearRTLTextPlugin() { - this.status = "unavailable", this.url = null - } - setRTLTextPlugin(e) { - return o._(this, arguments, void 0, (function*(n, s = !1) { - if (this.url) throw new Error("setRTLTextPlugin cannot be called multiple times."); - if (this.url = ye.resolveURL(n), !this.url) throw new Error(`requested url ${n} is invalid`); - if (this.status === "unavailable") { - if (!s) return this._requestImport(); - this.status = "deferred", this._syncState(this.status) - } else if (this.status === "requested") return this._requestImport() - })) - } - _requestImport() { - return o._(this, void 0, void 0, (function*() { - yield this._syncState("loading"), this.status = "loaded", this.fire(new o.l(ur)) - })) - } - lazyLoad() { - this.status === "unavailable" ? this.status = "requested" : this.status === "deferred" && this._requestImport() - } - } - let Ar = null; - - function kr() { - return Ar || (Ar = new Mr), Ar - } - class Nr { - constructor(e, n) { - this.timeAdded = 0, this.fadeEndTime = 0, this.tileID = e, this.uid = o.a7(), this.uses = 0, this.tileSize = n, this.buckets = {}, this.expirationTime = null, this.queryPadding = 0, this.hasSymbolBuckets = !1, this.hasRTLText = !1, this.dependencies = {}, this.rtt = [], this.rttCoords = {}, this.expiredRequestCount = 0, this.state = "loading" - } - registerFadeDuration(e) { - const n = e + this.timeAdded; - n < this.fadeEndTime || (this.fadeEndTime = n) - } - wasRequested() { - return this.state === "errored" || this.state === "loaded" || this.state === "reloading" - } - clearTextures(e) { - this.demTexture && e.saveTileTexture(this.demTexture), this.demTexture = null - } - loadVectorData(e, n, s) { - if (this.hasData() && this.unloadVectorData(), this.state = "loaded", e) { - e.featureIndex && (this.latestFeatureIndex = e.featureIndex, e.rawTileData ? (this.latestRawTileData = e.rawTileData, this.latestFeatureIndex.rawTileData = e.rawTileData) : this.latestRawTileData && (this.latestFeatureIndex.rawTileData = this.latestRawTileData)), this.collisionBoxArray = e.collisionBoxArray, this.buckets = (function(u, d) { - const m = {}; - if (!d) return m; - for (const y of u) { - const w = y.layerIds.map((P => d.getLayer(P))).filter(Boolean); - if (w.length !== 0) { - y.layers = w, y.stateDependentLayerIds && (y.stateDependentLayers = y.stateDependentLayerIds.map((P => w.filter((M => M.id === P))[0]))); - for (const P of w) m[P.id] = y - } - } - return m - })(e.buckets, n == null ? void 0 : n.style), this.hasSymbolBuckets = !1; - for (const u in this.buckets) { - const d = this.buckets[u]; - if (d instanceof o.a9) { - if (this.hasSymbolBuckets = !0, !s) break; - d.justReloaded = !0 - } - } - if (this.hasRTLText = !1, this.hasSymbolBuckets) - for (const u in this.buckets) { - const d = this.buckets[u]; - if (d instanceof o.a9 && d.hasRTLText) { - this.hasRTLText = !0, kr().lazyLoad(); - break - } - } - this.queryPadding = 0; - for (const u in this.buckets) { - const d = this.buckets[u]; - this.queryPadding = Math.max(this.queryPadding, n.style.getLayer(u).queryRadius(d)) - } - e.imageAtlas && (this.imageAtlas = e.imageAtlas), e.glyphAtlasImage && (this.glyphAtlasImage = e.glyphAtlasImage) - } else this.collisionBoxArray = new o.a8 - } - unloadVectorData() { - for (const e in this.buckets) this.buckets[e].destroy(); - this.buckets = {}, this.imageAtlasTexture && this.imageAtlasTexture.destroy(), this.imageAtlas && (this.imageAtlas = null), this.glyphAtlasTexture && this.glyphAtlasTexture.destroy(), this.latestFeatureIndex = null, this.state = "unloaded" - } - getBucket(e) { - return this.buckets[e.id] - } - upload(e) { - for (const s in this.buckets) { - const u = this.buckets[s]; - u.uploadPending() && u.upload(e) - } - const n = e.gl; - this.imageAtlas && !this.imageAtlas.uploaded && (this.imageAtlasTexture = new o.T(e, this.imageAtlas.image, n.RGBA), this.imageAtlas.uploaded = !0), this.glyphAtlasImage && (this.glyphAtlasTexture = new o.T(e, this.glyphAtlasImage, n.ALPHA), this.glyphAtlasImage = null) - } - prepare(e) { - this.imageAtlas && this.imageAtlas.patchUpdatedImages(e, this.imageAtlasTexture) - } - queryRenderedFeatures(e, n, s, u, d, m, y, w, P, M, D) { - return this.latestFeatureIndex && this.latestFeatureIndex.rawTileData ? this.latestFeatureIndex.query({ - queryGeometry: u, - cameraQueryGeometry: d, - scale: m, - tileSize: this.tileSize, - pixelPosMatrix: M, - transform: w, - params: y, - queryPadding: this.queryPadding * P, - getElevation: D - }, e, n, s) : {} - } - querySourceFeatures(e, n) { - const s = this.latestFeatureIndex; - if (!s || !s.rawTileData) return; - const u = s.loadVTLayers(), - d = n && n.sourceLayer ? n.sourceLayer : "", - m = u._geojsonTileLayer || u[d]; - if (!m) return; - const y = o.aa(n && n.filter), - { - z: w, - x: P, - y: M - } = this.tileID.canonical, - D = { - z: w, - x: P, - y: M - }; - for (let z = 0; z < m.length; z++) { - const B = m.feature(z); - if (y.needGeometry) { - const J = o.ab(B, !0); - if (!y.filter(new o.F(this.tileID.overscaledZ), J, this.tileID.canonical)) continue - } else if (!y.filter(new o.F(this.tileID.overscaledZ), B)) continue; - const U = s.getId(B, d), - ee = new o.ac(B, w, P, M, U); - ee.tile = D, e.push(ee) - } - } - hasData() { - return this.state === "loaded" || this.state === "reloading" || this.state === "expired" - } - patternsLoaded() { - return this.imageAtlas && !!Object.keys(this.imageAtlas.patternPositions).length - } - setExpiryData(e) { - const n = this.expirationTime; - if (e.cacheControl) { - const s = o.ad(e.cacheControl); - s["max-age"] && (this.expirationTime = Date.now() + 1e3 * s["max-age"]) - } else e.expires && (this.expirationTime = new Date(e.expires).getTime()); - if (this.expirationTime) { - const s = Date.now(); - let u = !1; - if (this.expirationTime > s) u = !1; - else if (n) - if (this.expirationTime < n) u = !0; - else { - const d = this.expirationTime - n; - d ? this.expirationTime = s + Math.max(d, 3e4) : u = !0 - } - else u = !0; - u ? (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(e, n) { - if (!this.latestFeatureIndex || !this.latestFeatureIndex.rawTileData || Object.keys(e).length === 0) return; - const s = this.latestFeatureIndex.loadVTLayers(); - for (const u in this.buckets) { - if (!n.style.hasLayer(u)) continue; - const d = this.buckets[u], - m = d.layers[0].sourceLayer || "_geojsonTileLayer", - y = s[m], - w = e[m]; - if (!y || !w || Object.keys(w).length === 0) continue; - d.update(w, y, this.imageAtlas && this.imageAtlas.patternPositions || {}); - const P = n && n.style && n.style.getLayer(u); - P && (this.queryPadding = Math.max(this.queryPadding, P.queryRadius(d))) - } - } - holdingForFade() { - return this.symbolFadeHoldUntil !== void 0 - } - symbolFadeFinished() { - return !this.symbolFadeHoldUntil || this.symbolFadeHoldUntil < ye.now() - } - clearFadeHold() { - this.symbolFadeHoldUntil = void 0 - } - setHoldDuration(e) { - this.symbolFadeHoldUntil = ye.now() + e - } - setDependencies(e, n) { - const s = {}; - for (const u of n) s[u] = !0; - this.dependencies[e] = s - } - hasDependency(e, n) { - for (const s of e) { - const u = this.dependencies[s]; - if (u) { - for (const d of n) - if (u[d]) return !0 - } - } - return !1 - } - } - class ce { - constructor(e, n) { - this.max = e, this.onRemove = n, this.reset() - } - reset() { - for (const e in this.data) - for (const n of this.data[e]) n.timeout && clearTimeout(n.timeout), this.onRemove(n.value); - return this.data = {}, this.order = [], this - } - add(e, n, s) { - const u = e.wrapped().key; - this.data[u] === void 0 && (this.data[u] = []); - const d = { - value: n, - timeout: void 0 - }; - if (s !== void 0 && (d.timeout = setTimeout((() => { - this.remove(e, d) - }), s)), this.data[u].push(d), this.order.push(u), this.order.length > this.max) { - const m = this._getAndRemoveByKey(this.order[0]); - m && this.onRemove(m) - } - return this - } - has(e) { - return e.wrapped().key in this.data - } - getAndRemove(e) { - return this.has(e) ? this._getAndRemoveByKey(e.wrapped().key) : null - } - _getAndRemoveByKey(e) { - const n = this.data[e].shift(); - return n.timeout && clearTimeout(n.timeout), this.data[e].length === 0 && delete this.data[e], this.order.splice(this.order.indexOf(e), 1), n.value - } - getByKey(e) { - const n = this.data[e]; - return n ? n[0].value : null - } - get(e) { - return this.has(e) ? this.data[e.wrapped().key][0].value : null - } - remove(e, n) { - if (!this.has(e)) return this; - const s = e.wrapped().key, - u = n === void 0 ? 0 : this.data[s].indexOf(n), - d = this.data[s][u]; - return this.data[s].splice(u, 1), d.timeout && clearTimeout(d.timeout), this.data[s].length === 0 && delete this.data[s], this.onRemove(d.value), this.order.splice(this.order.indexOf(s), 1), this - } - setMaxSize(e) { - for (this.max = e; this.order.length > this.max;) { - const n = this._getAndRemoveByKey(this.order[0]); - n && this.onRemove(n) - } - return this - } - filter(e) { - const n = []; - for (const s in this.data) - for (const u of this.data[s]) e(u.value) || n.push(u); - for (const s of n) this.remove(s.value.tileID, s) - } - } - class O { - constructor() { - this.state = {}, this.stateChanges = {}, this.deletedStates = {} - } - updateState(e, n, s) { - const u = String(n); - if (this.stateChanges[e] = this.stateChanges[e] || {}, this.stateChanges[e][u] = this.stateChanges[e][u] || {}, o.e(this.stateChanges[e][u], s), this.deletedStates[e] === null) { - this.deletedStates[e] = {}; - for (const d in this.state[e]) d !== u && (this.deletedStates[e][d] = null) - } else if (this.deletedStates[e] && this.deletedStates[e][u] === null) { - this.deletedStates[e][u] = {}; - for (const d in this.state[e][u]) s[d] || (this.deletedStates[e][u][d] = null) - } else - for (const d in s) this.deletedStates[e] && this.deletedStates[e][u] && this.deletedStates[e][u][d] === null && delete this.deletedStates[e][u][d] - } - removeFeatureState(e, n, s) { - if (this.deletedStates[e] === null) return; - const u = String(n); - if (this.deletedStates[e] = this.deletedStates[e] || {}, s && n !== void 0) this.deletedStates[e][u] !== null && (this.deletedStates[e][u] = this.deletedStates[e][u] || {}, this.deletedStates[e][u][s] = null); - else if (n !== void 0) - if (this.stateChanges[e] && this.stateChanges[e][u]) - for (s in this.deletedStates[e][u] = {}, this.stateChanges[e][u]) this.deletedStates[e][u][s] = null; - else this.deletedStates[e][u] = null; - else this.deletedStates[e] = null - } - getState(e, n) { - const s = String(n), - u = o.e({}, (this.state[e] || {})[s], (this.stateChanges[e] || {})[s]); - if (this.deletedStates[e] === null) return {}; - if (this.deletedStates[e]) { - const d = this.deletedStates[e][n]; - if (d === null) return {}; - for (const m in d) delete u[m] - } - return u - } - initializeTileState(e, n) { - e.setFeatureState(this.state, n) - } - coalesceChanges(e, n) { - const s = {}; - for (const u in this.stateChanges) { - this.state[u] = this.state[u] || {}; - const d = {}; - for (const m in this.stateChanges[u]) this.state[u][m] || (this.state[u][m] = {}), o.e(this.state[u][m], this.stateChanges[u][m]), d[m] = this.state[u][m]; - s[u] = d - } - for (const u in this.deletedStates) { - this.state[u] = this.state[u] || {}; - const d = {}; - if (this.deletedStates[u] === null) - for (const m in this.state[u]) d[m] = {}, this.state[u][m] = {}; - else - for (const m in this.deletedStates[u]) { - if (this.deletedStates[u][m] === null) this.state[u][m] = {}; - else - for (const y of Object.keys(this.deletedStates[u][m])) delete this.state[u][m][y]; - d[m] = this.state[u][m] - } - s[u] = s[u] || {}, o.e(s[u], d) - } - if (this.stateChanges = {}, this.deletedStates = {}, Object.keys(s).length !== 0) - for (const u in e) e[u].setFeatureState(s, n) - } - } - const q = 89.25; - - function G(h, e) { - const n = o.ah(e.lat, -o.ai, o.ai); - return new o.P(o.V(e.lng) * h, o.U(n) * h) - } - - function K(h, e) { - return new o.a1(e.x / h, e.y / h).toLngLat() - } - - function le(h) { - return h.cameraToCenterDistance * Math.min(.85 * Math.tan(o.ae(90 - h.pitch)), Math.tan(o.ae(q - h.pitch))) - } - - function ve(h, e) { - const n = h.canonical, - s = e / o.af(n.z), - u = n.x + Math.pow(2, n.z) * h.wrap, - d = o.ag(new Float64Array(16)); - return o.M(d, d, [u * s, n.y * s, 0]), o.N(d, d, [s / o.$, s / o.$, 1]), d - } - - function Le(h, e, n, s, u) { - const d = o.a1.fromLngLat(h, e), - m = u * o.aj(1, h.lat), - y = m * Math.cos(o.ae(n)), - w = Math.sqrt(m * m - y * y), - P = w * Math.sin(o.ae(-s)), - M = w * Math.cos(o.ae(-s)); - return new o.a1(d.x + P, d.y + M, d.z + y) - } - - function Ce(h, e, n) { - const s = e.intersectsFrustum(h); - if (!n || s === 0) return s; - const u = e.intersectsPlane(n); - return u === 0 ? 0 : s === 2 && u === 2 ? 2 : 1 - } - - function Ze(h, e, n) { - let s = 0; - const u = (n - e) / 10; - for (let d = 0; d < 10; d++) s += u * Math.pow(Math.cos(e + (d + .5) / 10 * (n - e)), h); - return s - } - - function ot(h, e) { - return function(n, s, u, d, m) { - const y = 2 * ((h - 1) / o.ak(Math.cos(o.ae(q - m)) / Math.cos(o.ae(q))) - 1), - w = Math.acos(u / d), - P = 2 * Ze(y - 1, 0, o.ae(m / 2)), - M = Math.min(o.ae(q), w + o.ae(m / 2)), - D = Ze(y - 1, Math.min(M, w - o.ae(m / 2)), M), - z = Math.atan(s / u), - B = Math.hypot(s, u); - let U = n; - return U += o.ak(d / B / Math.max(.5, Math.cos(o.ae(m / 2)))), U += y * o.ak(Math.cos(z)) / 2, U -= o.ak(Math.max(1, D / P / e)) / 2, U - } - } - const Ye = ot(9.314, 3); - - function Ot(h, e) { - const n = (e.roundZoom ? Math.round : Math.floor)(h.zoom + o.ak(h.tileSize / e.tileSize)); - return Math.max(0, n) - } - - function xe(h, e) { - const n = h.getCameraFrustum(), - s = h.getClippingPlane(), - u = h.screenPointToMercatorCoordinate(h.getCameraPoint()), - d = o.a1.fromLngLat(h.center, h.elevation); - u.z = d.z + Math.cos(h.pitchInRadians) * h.cameraToCenterDistance / h.worldSize; - const m = h.getCoveringTilesDetailsProvider(), - y = m.allowVariableZoom(h, e), - w = Ot(h, e), - P = e.minzoom || 0, - M = e.maxzoom !== void 0 ? e.maxzoom : h.maxZoom, - D = Math.min(Math.max(0, w), M), - z = Math.pow(2, D), - B = [z * u.x, z * u.y, 0], - U = [z * d.x, z * d.y, 0], - ee = Math.hypot(d.x - u.x, d.y - u.y), - J = Math.abs(d.z - u.z), - re = Math.hypot(ee, J), - se = ge => ({ - zoom: 0, - x: 0, - y: 0, - wrap: ge, - fullyVisible: !1 - }), - de = [], - ue = []; - if (h.renderWorldCopies && m.allowWorldCopies()) - for (let ge = 1; ge <= 3; ge++) de.push(se(-ge)), de.push(se(ge)); - for (de.push(se(0)); de.length > 0;) { - const ge = de.pop(), - Te = ge.x, - he = ge.y; - let De = ge.fullyVisible; - const He = { - x: Te, - y: he, - z: ge.zoom - }, - je = m.getTileBoundingVolume(He, ge.wrap, h.elevation, e); - if (!De) { - const Nt = Ce(n, je, s); - if (Nt === 0) continue; - De = Nt === 2 - } - const qe = m.distanceToTile2d(u.x, u.y, He, je); - let $e = w; - y && ($e = (e.calculateTileZoom || Ye)(h.zoom + o.ak(h.tileSize / e.tileSize), qe, J, re, h.fov)), $e = (e.roundZoom ? Math.round : Math.floor)($e), $e = Math.max(0, $e); - const Rt = Math.min($e, M); - if (ge.wrap = m.getWrap(d, He, ge.wrap), ge.zoom >= Rt) { - if (ge.zoom < P) continue; - const Nt = D - ge.zoom, - yt = B[0] - .5 - (Te << Nt), - sr = B[1] - .5 - (he << Nt), - Xr = e.reparseOverscaled ? Math.max(ge.zoom, $e) : ge.zoom; - ue.push({ - tileID: new o.Z(ge.zoom === M ? Xr : ge.zoom, ge.wrap, ge.zoom, Te, he), - distanceSq: o.al([U[0] - .5 - Te, U[1] - .5 - he]), - tileDistanceToCamera: Math.sqrt(yt * yt + sr * sr) - }) - } else - for (let Nt = 0; Nt < 4; Nt++) de.push({ - zoom: ge.zoom + 1, - x: (Te << 1) + Nt % 2, - y: (he << 1) + (Nt >> 1), - wrap: ge.wrap, - fullyVisible: De - }) - } - return ue.sort(((ge, Te) => ge.distanceSq - Te.distanceSq)).map((ge => ge.tileID)) - } - const At = o.a2.fromPoints([new o.P(0, 0), new o.P(o.$, o.$)]); - class Pt extends o.E { - constructor(e, n, s) { - super(), this.id = e, this.dispatcher = s, this.on("data", (u => this._dataHandler(u))), this.on("dataloading", (() => { - this._sourceErrored = !1 - })), this.on("error", (() => { - this._sourceErrored = this._source.loaded() - })), this._source = ((u, d, m, y) => { - const w = new(jr(d.type))(u, d, m, y); - if (w.id !== u) throw new Error(`Expected Source id to be ${u} instead of ${w.id}`); - return w - })(e, n, s, this), this._tiles = {}, this._cache = new ce(0, (u => this._unloadTile(u))), this._timers = {}, this._cacheTimers = {}, this._maxTileCacheSize = null, this._maxTileCacheZoomLevels = null, this._loadedParentTiles = {}, this._coveredTiles = {}, this._state = new O, this._didEmitContent = !1, this._updated = !1 - } - onAdd(e) { - this.map = e, this._maxTileCacheSize = e ? e._maxTileCacheSize : null, this._maxTileCacheZoomLevels = e ? e._maxTileCacheZoomLevels : null, this._source && this._source.onAdd && this._source.onAdd(e) - } - onRemove(e) { - this.clearTiles(), this._source && this._source.onRemove && this._source.onRemove(e) - } - 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 e in this._tiles) { - const n = this._tiles[e]; - if (n.state !== "loaded" && n.state !== "errored") return !1 - } - return !0 - } - getSource() { - return this._source - } - pause() { - this._paused = !0 - } - resume() { - if (!this._paused) return; - const e = this._shouldReloadOnResume; - this._paused = !1, this._shouldReloadOnResume = !1, e && this.reload(), this.transform && this.update(this.transform, this.terrain) - } - _loadTile(e, n, s) { - return o._(this, void 0, void 0, (function*() { - try { - yield this._source.loadTile(e), this._tileLoaded(e, n, s) - } catch (u) { - e.state = "errored", u.status !== 404 ? this._source.fire(new o.k(u, { - tile: e - })) : this.update(this.transform, this.terrain) - } - })) - } - _unloadTile(e) { - this._source.unloadTile && this._source.unloadTile(e) - } - _abortTile(e) { - this._source.abortTile && this._source.abortTile(e), this._source.fire(new o.l("dataabort", { - tile: e, - coord: e.tileID, - dataType: "source" - })) - } - serialize() { - return this._source.serialize() - } - prepare(e) { - this._source.prepare && this._source.prepare(), this._state.coalesceChanges(this._tiles, this.map ? this.map.painter : null); - for (const n in this._tiles) { - const s = this._tiles[n]; - s.upload(e), s.prepare(this.map.style.imageManager) - } - } - getIds() { - return Object.values(this._tiles).map((e => e.tileID)).sort(kt).map((e => e.key)) - } - getRenderableIds(e) { - const n = []; - for (const s in this._tiles) this._isIdRenderable(s, e) && n.push(this._tiles[s]); - return e ? n.sort(((s, u) => { - const d = s.tileID, - m = u.tileID, - y = new o.P(d.canonical.x, d.canonical.y)._rotate(-this.transform.bearingInRadians), - w = new o.P(m.canonical.x, m.canonical.y)._rotate(-this.transform.bearingInRadians); - return d.overscaledZ - m.overscaledZ || w.y - y.y || w.x - y.x - })).map((s => s.tileID.key)) : n.map((s => s.tileID)).sort(kt).map((s => s.key)) - } - hasRenderableParent(e) { - const n = this.findLoadedParent(e, 0); - return !!n && this._isIdRenderable(n.tileID.key) - } - _isIdRenderable(e, n) { - return this._tiles[e] && this._tiles[e].hasData() && !this._coveredTiles[e] && (n || !this._tiles[e].holdingForFade()) - } - reload(e) { - if (this._paused) this._shouldReloadOnResume = !0; - else { - this._cache.reset(); - for (const n in this._tiles) e ? this._reloadTile(n, "expired") : this._tiles[n].state !== "errored" && this._reloadTile(n, "reloading") - } - } - _reloadTile(e, n) { - return o._(this, void 0, void 0, (function*() { - const s = this._tiles[e]; - s && (s.state !== "loading" && (s.state = n), yield this._loadTile(s, e, n)) - })) - } - _tileLoaded(e, n, s) { - e.timeAdded = ye.now(), s === "expired" && (e.refreshedUponExpiration = !0), this._setTileReloadTimer(n, e), this.getSource().type === "raster-dem" && e.dem && this._backfillDEM(e), this._state.initializeTileState(e, this.map ? this.map.painter : null), e.aborted || this._source.fire(new o.l("data", { - dataType: "source", - tile: e, - coord: e.tileID - })) - } - _backfillDEM(e) { - const n = this.getRenderableIds(); - for (let u = 0; u < n.length; u++) { - const d = n[u]; - if (e.neighboringTiles && e.neighboringTiles[d]) { - const m = this.getTileByID(d); - s(e, m), s(m, e) - } - } - - function s(u, d) { - u.needsHillshadePrepare = !0, u.needsTerrainPrepare = !0; - let m = d.tileID.canonical.x - u.tileID.canonical.x; - const y = d.tileID.canonical.y - u.tileID.canonical.y, - w = Math.pow(2, u.tileID.canonical.z), - P = d.tileID.key; - m === 0 && y === 0 || Math.abs(y) > 1 || (Math.abs(m) > 1 && (Math.abs(m + w) === 1 ? m += w : Math.abs(m - w) === 1 && (m -= w)), d.dem && u.dem && (u.dem.backfillBorder(d.dem, m, y), u.neighboringTiles && u.neighboringTiles[P] && (u.neighboringTiles[P].backfilled = !0))) - } - } - getTile(e) { - return this.getTileByID(e.key) - } - getTileByID(e) { - return this._tiles[e] - } - _retainLoadedChildren(e, n, s, u) { - for (const d in this._tiles) { - let m = this._tiles[d]; - if (u[d] || !m.hasData() || m.tileID.overscaledZ <= n || m.tileID.overscaledZ > s) continue; - let y = m.tileID; - for (; m && m.tileID.overscaledZ > n + 1;) { - const P = m.tileID.scaledTo(m.tileID.overscaledZ - 1); - m = this._tiles[P.key], m && m.hasData() && (y = P) - } - let w = y; - for (; w.overscaledZ > n;) - if (w = w.scaledTo(w.overscaledZ - 1), e[w.key] || e[w.canonical.key]) { - u[y.key] = y; - break - } - } - } - findLoadedParent(e, n) { - if (e.key in this._loadedParentTiles) { - const s = this._loadedParentTiles[e.key]; - return s && s.tileID.overscaledZ >= n ? s : null - } - for (let s = e.overscaledZ - 1; s >= n; s--) { - const u = e.scaledTo(s), - d = this._getLoadedTile(u); - if (d) return d - } - } - findLoadedSibling(e) { - return this._getLoadedTile(e) - } - _getLoadedTile(e) { - const n = this._tiles[e.key]; - return n && n.hasData() ? n : this._cache.getByKey(e.wrapped().key) - } - updateCacheSize(e) { - const n = Math.ceil(e.width / this._source.tileSize) + 1, - s = Math.ceil(e.height / this._source.tileSize) + 1, - u = Math.floor(n * s * (this._maxTileCacheZoomLevels === null ? o.a.MAX_TILE_CACHE_ZOOM_LEVELS : this._maxTileCacheZoomLevels)), - d = typeof this._maxTileCacheSize == "number" ? Math.min(this._maxTileCacheSize, u) : u; - this._cache.setMaxSize(d) - } - handleWrapJump(e) { - const n = Math.round((e - (this._prevLng === void 0 ? e : this._prevLng)) / 360); - if (this._prevLng = e, n) { - const s = {}; - for (const u in this._tiles) { - const d = this._tiles[u]; - d.tileID = d.tileID.unwrapTo(d.tileID.wrap + n), s[d.tileID.key] = d - } - this._tiles = s; - for (const u in this._timers) clearTimeout(this._timers[u]), delete this._timers[u]; - for (const u in this._tiles) this._setTileReloadTimer(u, this._tiles[u]) - } - } - _updateCoveredAndRetainedTiles(e, n, s, u, d, m) { - const y = {}, - w = {}, - P = Object.keys(e), - M = ye.now(); - for (const D of P) { - const z = e[D], - B = this._tiles[D]; - if (!B || B.fadeEndTime !== 0 && B.fadeEndTime <= M) continue; - const U = this.findLoadedParent(z, n), - ee = this.findLoadedSibling(z), - J = U || ee || null; - J && (this._addTile(J.tileID), y[J.tileID.key] = J.tileID), w[D] = z - } - this._retainLoadedChildren(w, u, s, e); - for (const D in y) e[D] || (this._coveredTiles[D] = !0, e[D] = y[D]); - if (m) { - const D = {}, - z = {}; - for (const B of d) this._tiles[B.key].hasData() ? D[B.key] = B : z[B.key] = B; - for (const B in z) { - const U = z[B].children(this._source.maxzoom); - this._tiles[U[0].key] && this._tiles[U[1].key] && this._tiles[U[2].key] && this._tiles[U[3].key] && (D[U[0].key] = e[U[0].key] = U[0], D[U[1].key] = e[U[1].key] = U[1], D[U[2].key] = e[U[2].key] = U[2], D[U[3].key] = e[U[3].key] = U[3], delete z[B]) - } - for (const B in z) { - const U = z[B], - ee = this.findLoadedParent(U, this._source.minzoom), - J = this.findLoadedSibling(U), - re = ee || J || null; - if (re) { - D[re.tileID.key] = e[re.tileID.key] = re.tileID; - for (const se in D) D[se].isChildOf(re.tileID) && delete D[se] - } - } - for (const B in this._tiles) D[B] || (this._coveredTiles[B] = !0) - } - } - update(e, n) { - if (!this._sourceLoaded || this._paused) return; - let s; - this.transform = e, this.terrain = n, this.updateCacheSize(e), this.handleWrapJump(this.transform.center.lng), this._coveredTiles = {}, this.used || this.usedForTerrain ? this._source.tileID ? s = e.getVisibleUnwrappedCoordinates(this._source.tileID).map((M => new o.Z(M.canonical.z, M.wrap, M.canonical.z, M.canonical.x, M.canonical.y))) : (s = xe(e, { - tileSize: this.usedForTerrain ? this.tileSize : this._source.tileSize, - minzoom: this._source.minzoom, - maxzoom: this._source.maxzoom, - roundZoom: !this.usedForTerrain && this._source.roundZoom, - reparseOverscaled: this._source.reparseOverscaled, - terrain: n, - calculateTileZoom: this._source.calculateTileZoom - }), this._source.hasTile && (s = s.filter((M => this._source.hasTile(M))))) : s = []; - const u = Ot(e, this._source), - d = Math.max(u - Pt.maxOverzooming, this._source.minzoom), - m = Math.max(u + Pt.maxUnderzooming, this._source.minzoom); - if (this.usedForTerrain) { - const M = {}; - for (const D of s) - if (D.canonical.z > this._source.minzoom) { - const z = D.scaledTo(D.canonical.z - 1); - M[z.key] = z; - const B = D.scaledTo(Math.max(this._source.minzoom, Math.min(D.canonical.z, 5))); - M[B.key] = B - } s = s.concat(Object.values(M)) - } - const y = s.length === 0 && !this._updated && this._didEmitContent; - this._updated = !0, y && this.fire(new o.l("data", { - sourceDataType: "idle", - dataType: "source", - sourceId: this.id - })); - const w = this._updateRetainedTiles(s, u); - Wt(this._source.type) && this._updateCoveredAndRetainedTiles(w, d, m, u, s, n); - for (const M in w) this._tiles[M].clearFadeHold(); - const P = o.am(this._tiles, w); - for (const M of P) { - const D = this._tiles[M]; - D.hasSymbolBuckets && !D.holdingForFade() ? D.setHoldDuration(this.map._fadeDuration) : D.hasSymbolBuckets && !D.symbolFadeFinished() || this._removeTile(M) - } - this._updateLoadedParentTileCache(), this._updateLoadedSiblingTileCache() - } - releaseSymbolFadeTiles() { - for (const e in this._tiles) this._tiles[e].holdingForFade() && this._removeTile(e) - } - _updateRetainedTiles(e, n) { - var s; - const u = {}, - d = {}, - m = Math.max(n - Pt.maxOverzooming, this._source.minzoom), - y = Math.max(n + Pt.maxUnderzooming, this._source.minzoom), - w = {}; - for (const P of e) { - const M = this._addTile(P); - u[P.key] = P, M.hasData() || n < this._source.maxzoom && (w[P.key] = P) - } - this._retainLoadedChildren(w, n, y, u); - for (const P of e) { - let M = this._tiles[P.key]; - if (M.hasData()) continue; - if (n + 1 > this._source.maxzoom) { - const z = P.children(this._source.maxzoom)[0], - B = this.getTile(z); - if (B && B.hasData()) { - u[z.key] = z; - continue - } - } else { - const z = P.children(this._source.maxzoom); - if (u[z[0].key] && u[z[1].key] && u[z[2].key] && u[z[3].key]) continue - } - let D = M.wasRequested(); - for (let z = P.overscaledZ - 1; z >= m; --z) { - const B = P.scaledTo(z); - if (d[B.key]) break; - if (d[B.key] = !0, M = this.getTile(B), !M && D && (M = this._addTile(B)), M) { - const U = M.hasData(); - if ((U || !(!((s = this.map) === null || s === void 0) && s.cancelPendingTileRequestsWhileZooming) || D) && (u[B.key] = B), D = M.wasRequested(), U) break - } - } - } - return u - } - _updateLoadedParentTileCache() { - this._loadedParentTiles = {}; - for (const e in this._tiles) { - const n = []; - let s, u = this._tiles[e].tileID; - for (; u.overscaledZ > 0;) { - if (u.key in this._loadedParentTiles) { - s = this._loadedParentTiles[u.key]; - break - } - n.push(u.key); - const d = u.scaledTo(u.overscaledZ - 1); - if (s = this._getLoadedTile(d), s) break; - u = d - } - for (const d of n) this._loadedParentTiles[d] = s - } - } - _updateLoadedSiblingTileCache() { - this._loadedSiblingTiles = {}; - for (const e in this._tiles) { - const n = this._tiles[e].tileID, - s = this._getLoadedTile(n); - this._loadedSiblingTiles[n.key] = s - } - } - _addTile(e) { - let n = this._tiles[e.key]; - if (n) return n; - n = this._cache.getAndRemove(e), n && (this._setTileReloadTimer(e.key, n), n.tileID = e, this._state.initializeTileState(n, this.map ? this.map.painter : null), this._cacheTimers[e.key] && (clearTimeout(this._cacheTimers[e.key]), delete this._cacheTimers[e.key], this._setTileReloadTimer(e.key, n))); - const s = n; - return n || (n = new Nr(e, this._source.tileSize * e.overscaleFactor()), this._loadTile(n, e.key, n.state)), n.uses++, this._tiles[e.key] = n, s || this._source.fire(new o.l("dataloading", { - tile: n, - coord: n.tileID, - dataType: "source" - })), n - } - _setTileReloadTimer(e, n) { - e in this._timers && (clearTimeout(this._timers[e]), delete this._timers[e]); - const s = n.getExpiryTimeout(); - s && (this._timers[e] = setTimeout((() => { - this._reloadTile(e, "expired"), delete this._timers[e] - }), s)) - } - refreshTiles(e) { - for (const n in this._tiles)(this._isIdRenderable(n) || this._tiles[n].state == "errored") && e.some((s => s.equals(this._tiles[n].tileID.canonical))) && this._reloadTile(n, "expired") - } - _removeTile(e) { - const n = this._tiles[e]; - n && (n.uses--, delete this._tiles[e], this._timers[e] && (clearTimeout(this._timers[e]), delete this._timers[e]), n.uses > 0 || (n.hasData() && n.state !== "reloading" ? this._cache.add(n.tileID, n, n.getExpiryTimeout()) : (n.aborted = !0, this._abortTile(n), this._unloadTile(n)))) - } - _dataHandler(e) { - const n = e.sourceDataType; - e.dataType === "source" && n === "metadata" && (this._sourceLoaded = !0), this._sourceLoaded && !this._paused && e.dataType === "source" && n === "content" && (this.reload(e.sourceDataChanged), this.transform && this.update(this.transform, this.terrain), this._didEmitContent = !0) - } - clearTiles() { - this._shouldReloadOnResume = !1, this._paused = !1; - for (const e in this._tiles) this._removeTile(e); - this._cache.reset() - } - tilesIn(e, n, s) { - const u = [], - d = this.transform; - if (!d) return u; - const m = d.getCoveringTilesDetailsProvider().allowWorldCopies(), - y = s ? d.getCameraQueryGeometry(e) : e, - w = B => d.screenPointToMercatorCoordinate(B, this.terrain), - P = this.transformBbox(e, w, !m), - M = this.transformBbox(y, w, !m), - D = this.getIds(), - z = o.a2.fromPoints(M); - for (let B = 0; B < D.length; B++) { - const U = this._tiles[D[B]]; - if (U.holdingForFade()) continue; - const ee = m ? [U.tileID] : [U.tileID.unwrapTo(-1), U.tileID.unwrapTo(0)], - J = Math.pow(2, d.zoom - U.tileID.overscaledZ), - re = n * U.queryPadding * o.$ / U.tileSize / J; - for (const se of ee) { - const de = z.map((ue => se.getTilePoint(new o.a1(ue.x, ue.y)))); - if (de.expandBy(re), de.intersects(At)) { - const ue = P.map((Te => se.getTilePoint(Te))), - ge = M.map((Te => se.getTilePoint(Te))); - u.push({ - tile: U, - tileID: m ? se : se.unwrapTo(0), - queryGeometry: ue, - cameraQueryGeometry: ge, - scale: J - }) - } - } - } - return u - } - transformBbox(e, n, s) { - let u = e.map(n); - if (s) { - const d = o.a2.fromPoints(e); - d.shrinkBy(.001 * Math.min(d.width(), d.height())); - const m = d.map(n); - o.a2.fromPoints(u).covers(m) || (u = u.map((y => y.x > .5 ? new o.a1(y.x - 1, y.y, y.z) : y))) - } - return u - } - getVisibleCoordinates(e) { - const n = this.getRenderableIds(e).map((s => this._tiles[s].tileID)); - return this.transform && this.transform.populateCache(n), n - } - hasTransition() { - if (this._source.hasTransition()) return !0; - if (Wt(this._source.type)) { - const e = ye.now(); - for (const n in this._tiles) - if (this._tiles[n].fadeEndTime >= e) return !0 - } - return !1 - } - setFeatureState(e, n, s) { - this._state.updateState(e = e || "_geojsonTileLayer", n, s) - } - removeFeatureState(e, n, s) { - this._state.removeFeatureState(e = e || "_geojsonTileLayer", n, s) - } - getFeatureState(e, n) { - return this._state.getState(e = e || "_geojsonTileLayer", n) - } - setDependencies(e, n, s) { - const u = this._tiles[e]; - u && u.setDependencies(n, s) - } - reloadTilesForDependencies(e, n) { - for (const s in this._tiles) this._tiles[s].hasDependency(e, n) && this._reloadTile(s, "reloading"); - this._cache.filter((s => !s.hasDependency(e, n))) - } - } - - function kt(h, e) { - const n = Math.abs(2 * h.wrap) - +(h.wrap < 0), - s = Math.abs(2 * e.wrap) - +(e.wrap < 0); - return h.overscaledZ - e.overscaledZ || s - n || e.canonical.y - h.canonical.y || e.canonical.x - h.canonical.x - } - - function Wt(h) { - return h === "raster" || h === "image" || h === "video" - } - Pt.maxOverzooming = 10, Pt.maxUnderzooming = 3; - class Lr { - constructor(e, n) { - this.reset(e, n) - } - reset(e, n) { - this.points = e || [], this._distances = [0]; - for (let s = 1; s < this.points.length; s++) this._distances[s] = this._distances[s - 1] + this.points[s].dist(this.points[s - 1]); - this.length = this._distances[this._distances.length - 1], this.padding = Math.min(n || 0, .5 * this.length), this.paddedLength = this.length - 2 * this.padding - } - lerp(e) { - if (this.points.length === 1) return this.points[0]; - e = o.ah(e, 0, 1); - let n = 1, - s = this._distances[n]; - const u = e * this.paddedLength + this.padding; - for (; s < u && n < this._distances.length;) s = this._distances[++n]; - const d = n - 1, - m = this._distances[d], - y = s - m, - w = y > 0 ? (u - m) / y : 0; - return this.points[d].mult(1 - w).add(this.points[n].mult(w)) - } - } - - function Kr(h, e) { - let n = !0; - return h === "always" || h !== "never" && e !== "never" || (n = !1), n - } - class Hr { - constructor(e, n, s) { - const u = this.boxCells = [], - d = this.circleCells = []; - this.xCellCount = Math.ceil(e / s), this.yCellCount = Math.ceil(n / s); - for (let m = 0; m < this.xCellCount * this.yCellCount; m++) u.push([]), d.push([]); - this.circleKeys = [], this.boxKeys = [], this.bboxes = [], this.circles = [], this.width = e, this.height = n, this.xScale = this.xCellCount / e, this.yScale = this.yCellCount / n, this.boxUid = 0, this.circleUid = 0 - } - keysLength() { - return this.boxKeys.length + this.circleKeys.length - } - insert(e, n, s, u, d) { - this._forEachCell(n, s, u, d, this._insertBoxCell, this.boxUid++), this.boxKeys.push(e), this.bboxes.push(n), this.bboxes.push(s), this.bboxes.push(u), this.bboxes.push(d) - } - insertCircle(e, n, s, u) { - this._forEachCell(n - u, s - u, n + u, s + u, this._insertCircleCell, this.circleUid++), this.circleKeys.push(e), this.circles.push(n), this.circles.push(s), this.circles.push(u) - } - _insertBoxCell(e, n, s, u, d, m) { - this.boxCells[d].push(m) - } - _insertCircleCell(e, n, s, u, d, m) { - this.circleCells[d].push(m) - } - _query(e, n, s, u, d, m, y) { - if (s < 0 || e > this.width || u < 0 || n > this.height) return []; - const w = []; - if (e <= 0 && n <= 0 && this.width <= s && this.height <= u) { - if (d) return [{ - key: null, - x1: e, - y1: n, - x2: s, - y2: u - }]; - for (let P = 0; P < this.boxKeys.length; P++) w.push({ - key: this.boxKeys[P], - x1: this.bboxes[4 * P], - y1: this.bboxes[4 * P + 1], - x2: this.bboxes[4 * P + 2], - y2: this.bboxes[4 * P + 3] - }); - for (let P = 0; P < this.circleKeys.length; P++) { - const M = this.circles[3 * P], - D = this.circles[3 * P + 1], - z = this.circles[3 * P + 2]; - w.push({ - key: this.circleKeys[P], - x1: M - z, - y1: D - z, - x2: M + z, - y2: D + z - }) - } - } else this._forEachCell(e, n, s, u, this._queryCell, w, { - hitTest: d, - overlapMode: m, - seenUids: { - box: {}, - circle: {} - } - }, y); - return w - } - query(e, n, s, u) { - return this._query(e, n, s, u, !1, null) - } - hitTest(e, n, s, u, d, m) { - return this._query(e, n, s, u, !0, d, m).length > 0 - } - hitTestCircle(e, n, s, u, d) { - const m = e - s, - y = e + s, - w = n - s, - P = n + s; - if (y < 0 || m > this.width || P < 0 || w > this.height) return !1; - const M = []; - return this._forEachCell(m, w, y, P, this._queryCellCircle, M, { - hitTest: !0, - overlapMode: u, - circle: { - x: e, - y: n, - radius: s - }, - seenUids: { - box: {}, - circle: {} - } - }, d), M.length > 0 - } - _queryCell(e, n, s, u, d, m, y, w) { - const { - seenUids: P, - hitTest: M, - overlapMode: D - } = y, z = this.boxCells[d]; - if (z !== null) { - const U = this.bboxes; - for (const ee of z) - if (!P.box[ee]) { - P.box[ee] = !0; - const J = 4 * ee, - re = this.boxKeys[ee]; - if (e <= U[J + 2] && n <= U[J + 3] && s >= U[J + 0] && u >= U[J + 1] && (!w || w(re)) && (!M || !Kr(D, re.overlapMode)) && (m.push({ - key: re, - x1: U[J], - y1: U[J + 1], - x2: U[J + 2], - y2: U[J + 3] - }), M)) return !0 - } - } - const B = this.circleCells[d]; - if (B !== null) { - const U = this.circles; - for (const ee of B) - if (!P.circle[ee]) { - P.circle[ee] = !0; - const J = 3 * ee, - re = this.circleKeys[ee]; - if (this._circleAndRectCollide(U[J], U[J + 1], U[J + 2], e, n, s, u) && (!w || w(re)) && (!M || !Kr(D, re.overlapMode))) { - const se = U[J], - de = U[J + 1], - ue = U[J + 2]; - if (m.push({ - key: re, - x1: se - ue, - y1: de - ue, - x2: se + ue, - y2: de + ue - }), M) return !0 - } - } - } - return !1 - } - _queryCellCircle(e, n, s, u, d, m, y, w) { - const { - circle: P, - seenUids: M, - overlapMode: D - } = y, z = this.boxCells[d]; - if (z !== null) { - const U = this.bboxes; - for (const ee of z) - if (!M.box[ee]) { - M.box[ee] = !0; - const J = 4 * ee, - re = this.boxKeys[ee]; - if (this._circleAndRectCollide(P.x, P.y, P.radius, U[J + 0], U[J + 1], U[J + 2], U[J + 3]) && (!w || w(re)) && !Kr(D, re.overlapMode)) return m.push(!0), !0 - } - } - const B = this.circleCells[d]; - if (B !== null) { - const U = this.circles; - for (const ee of B) - if (!M.circle[ee]) { - M.circle[ee] = !0; - const J = 3 * ee, - re = this.circleKeys[ee]; - if (this._circlesCollide(U[J], U[J + 1], U[J + 2], P.x, P.y, P.radius) && (!w || w(re)) && !Kr(D, re.overlapMode)) return m.push(!0), !0 - } - } - } - _forEachCell(e, n, s, u, d, m, y, w) { - const P = this._convertToXCellCoord(e), - M = this._convertToYCellCoord(n), - D = this._convertToXCellCoord(s), - z = this._convertToYCellCoord(u); - for (let B = P; B <= D; B++) - for (let U = M; U <= z; U++) - if (d.call(this, e, n, s, u, this.xCellCount * U + B, m, y, w)) return - } - _convertToXCellCoord(e) { - return Math.max(0, Math.min(this.xCellCount - 1, Math.floor(e * this.xScale))) - } - _convertToYCellCoord(e) { - return Math.max(0, Math.min(this.yCellCount - 1, Math.floor(e * this.yScale))) - } - _circlesCollide(e, n, s, u, d, m) { - const y = u - e, - w = d - n, - P = s + m; - return P * P > y * y + w * w - } - _circleAndRectCollide(e, n, s, u, d, m, y) { - const w = (m - u) / 2, - P = Math.abs(e - (u + w)); - if (P > w + s) return !1; - const M = (y - d) / 2, - D = Math.abs(n - (d + M)); - if (D > M + s) return !1; - if (P <= w || D <= M) return !0; - const z = P - w, - B = D - M; - return z * z + B * B <= s * s - } - } - - function $r(h, e, n) { - const s = o.L(); - if (!h) { - const { - vecSouth: D, - vecEast: z - } = gr(e), B = W(); - B[0] = z[0], B[1] = z[1], B[2] = D[0], B[3] = D[1], u = B, (M = (m = (d = B)[0]) * (P = d[3]) - (w = d[2]) * (y = d[1])) && (u[0] = P * (M = 1 / M), u[1] = -y * M, u[2] = -w * M, u[3] = m * M), s[0] = B[0], s[1] = B[1], s[4] = B[2], s[5] = B[3] - } - var u, d, m, y, w, P, M; - return o.N(s, s, [1 / n, 1 / n, 1]), s - } - - function mr(h, e, n, s) { - if (h) { - const u = o.L(); - if (!e) { - const { - vecSouth: d, - vecEast: m - } = gr(n); - u[0] = m[0], u[1] = m[1], u[4] = d[0], u[5] = d[1] - } - return o.N(u, u, [s, s, 1]), u - } - return n.pixelsToClipSpaceMatrix - } - - function gr(h) { - const e = Math.cos(h.rollInRadians), - n = Math.sin(h.rollInRadians), - s = Math.cos(h.pitchInRadians), - u = Math.cos(h.bearingInRadians), - d = Math.sin(h.bearingInRadians), - m = o.ar(); - m[0] = -u * s * n - d * e, m[1] = -d * s * n + u * e; - const y = o.as(m); - y < 1e-9 ? o.at(m) : o.au(m, m, 1 / y); - const w = o.ar(); - w[0] = u * s * e - d * n, w[1] = d * s * e + u * n; - const P = o.as(w); - return P < 1e-9 ? o.at(w) : o.au(w, w, 1 / P), { - vecEast: w, - vecSouth: m - } - } - - function ai(h, e, n, s) { - let u; - s ? (u = [h, e, s(h, e), 1], o.aw(u, u, n)) : (u = [h, e, 0, 1], Li(u, u, n)); - const d = u[3]; - return { - point: new o.P(u[0] / d, u[1] / d), - signedDistanceFromCamera: d, - isOccluded: !1 - } - } - - function Tt(h, e) { - return .5 + h / e * .5 - } - - function Ci(h, e) { - return h.x >= -e[0] && h.x <= e[0] && h.y >= -e[1] && h.y <= e[1] - } - - function di(h, e, n, s, u, d, m, y, w, P, M, D, z) { - const B = n ? h.textSizeData : h.iconSizeData, - U = o.an(B, e.transform.zoom), - ee = [256 / e.width * 2 + 1, 256 / e.height * 2 + 1], - J = n ? h.text.dynamicLayoutVertexArray : h.icon.dynamicLayoutVertexArray; - J.clear(); - const re = h.lineVertexArray, - se = n ? h.text.placedSymbolArray : h.icon.placedSymbolArray, - de = e.transform.width / e.transform.height; - let ue = !1; - for (let ge = 0; ge < se.length; ge++) { - const Te = se.get(ge); - if (Te.hidden || Te.writingMode === o.ao.vertical && !ue) { - mi(Te.numGlyphs, J); - continue - } - ue = !1; - const he = new o.P(Te.anchorX, Te.anchorY), - De = { - getElevation: z, - pitchedLabelPlaneMatrix: s, - lineVertexArray: re, - pitchWithMap: d, - projectionCache: { - projections: {}, - offsets: {}, - cachedAnchorPoint: void 0, - anyProjectionOccluded: !1 - }, - transform: e.transform, - tileAnchorPoint: he, - unwrappedTileID: w, - width: P, - height: M, - translation: D - }, - He = li(Te.anchorX, Te.anchorY, De); - if (!Ci(He.point, ee)) { - mi(Te.numGlyphs, J); - continue - } - const je = Tt(e.transform.cameraToCenterDistance, He.signedDistanceFromCamera), - qe = o.ap(B, U, Te), - $e = d ? qe * e.transform.getPitchedTextCorrection(Te.anchorX, Te.anchorY, w) / je : qe * je, - Rt = Ke({ - projectionContext: De, - pitchedLabelPlaneMatrixInverse: u, - symbol: Te, - fontSize: $e, - flip: !1, - keepUpright: m, - glyphOffsetArray: h.glyphOffsetArray, - dynamicLayoutVertexArray: J, - aspectRatio: de, - rotateToLine: y - }); - ue = Rt.useVertical, (Rt.notEnoughRoom || ue || Rt.needsFlipping && Ke({ - projectionContext: De, - pitchedLabelPlaneMatrixInverse: u, - symbol: Te, - fontSize: $e, - flip: !0, - keepUpright: m, - glyphOffsetArray: h.glyphOffsetArray, - dynamicLayoutVertexArray: J, - aspectRatio: de, - rotateToLine: y - }).notEnoughRoom) && mi(Te.numGlyphs, J) - } - n ? h.text.dynamicLayoutVertexBuffer.updateData(J) : h.icon.dynamicLayoutVertexBuffer.updateData(J) - } - - function Pn(h, e, n, s, u, d, m, y) { - const w = d.glyphStartIndex + d.numGlyphs, - P = d.lineStartIndex, - M = d.lineStartIndex + d.lineLength, - D = e.getoffsetX(d.glyphStartIndex), - z = e.getoffsetX(w - 1), - B = Si(h * D, n, s, u, d.segment, P, M, y, m); - if (!B) return null; - const U = Si(h * z, n, s, u, d.segment, P, M, y, m); - return U ? y.projectionCache.anyProjectionOccluded ? null : { - first: B, - last: U - } : null - } - - function Mt(h, e, n, s) { - return h === o.ao.horizontal && Math.abs(n.y - e.y) > Math.abs(n.x - e.x) * s ? { - useVertical: !0 - } : (h === o.ao.vertical ? e.y < n.y : e.x > n.x) ? { - needsFlipping: !0 - } : null - } - - function Ke(h) { - const { - projectionContext: e, - pitchedLabelPlaneMatrixInverse: n, - symbol: s, - fontSize: u, - flip: d, - keepUpright: m, - glyphOffsetArray: y, - dynamicLayoutVertexArray: w, - aspectRatio: P, - rotateToLine: M - } = h, D = u / 24, z = s.lineOffsetX * D, B = s.lineOffsetY * D; - let U; - if (s.numGlyphs > 1) { - const ee = s.glyphStartIndex + s.numGlyphs, - J = s.lineStartIndex, - re = s.lineStartIndex + s.lineLength, - se = Pn(D, y, z, B, d, s, M, e); - if (!se) return { - notEnoughRoom: !0 - }; - const de = Gr(se.first.point.x, se.first.point.y, e, n), - ue = Gr(se.last.point.x, se.last.point.y, e, n); - if (m && !d) { - const ge = Mt(s.writingMode, de, ue, P); - if (ge) return ge - } - U = [se.first]; - for (let ge = s.glyphStartIndex + 1; ge < ee - 1; ge++) { - const Te = Si(D * y.getoffsetX(ge), z, B, d, s.segment, J, re, e, M); - if (!Te) return { - notEnoughRoom: !0 - }; - U.push(Te) - } - U.push(se.last) - } else { - if (m && !d) { - const J = Dr(e.tileAnchorPoint.x, e.tileAnchorPoint.y, e).point, - re = s.lineStartIndex + s.segment + 1, - se = new o.P(e.lineVertexArray.getx(re), e.lineVertexArray.gety(re)), - de = Dr(se.x, se.y, e), - ue = de.signedDistanceFromCamera > 0 ? de.point : jt(e.tileAnchorPoint, se, J, 1, e), - ge = Gr(J.x, J.y, e, n), - Te = Gr(ue.x, ue.y, e, n), - he = Mt(s.writingMode, ge, Te, P); - if (he) return he - } - const ee = Si(D * y.getoffsetX(s.glyphStartIndex), z, B, d, s.segment, s.lineStartIndex, s.lineStartIndex + s.lineLength, e, M); - if (!ee || e.projectionCache.anyProjectionOccluded) return { - notEnoughRoom: !0 - }; - U = [ee] - } - for (const ee of U) o.av(w, ee.point, ee.angle); - return {} - } - - function jt(h, e, n, s, u) { - const d = h.add(h.sub(e)._unit()), - m = Dr(d.x, d.y, u).point, - y = n.sub(m); - return n.add(y._mult(s / y.mag())) - } - - function Gt(h, e, n) { - const s = e.projectionCache; - if (s.projections[h]) return s.projections[h]; - const u = new o.P(e.lineVertexArray.getx(h), e.lineVertexArray.gety(h)), - d = Dr(u.x, u.y, e); - if (d.signedDistanceFromCamera > 0) return s.projections[h] = d.point, s.anyProjectionOccluded = s.anyProjectionOccluded || d.isOccluded, d.point; - const m = h - n.direction; - return jt(n.distanceFromAnchor === 0 ? e.tileAnchorPoint : new o.P(e.lineVertexArray.getx(m), e.lineVertexArray.gety(m)), u, n.previousVertex, n.absOffsetX - n.distanceFromAnchor + 1, e) - } - - function Dr(h, e, n) { - const s = h + n.translation[0], - u = e + n.translation[1]; - let d; - return n.pitchWithMap ? (d = ai(s, u, n.pitchedLabelPlaneMatrix, n.getElevation), d.isOccluded = !1) : (d = n.transform.projectTileCoordinates(s, u, n.unwrappedTileID, n.getElevation), d.point.x = (.5 * d.point.x + .5) * n.width, d.point.y = (.5 * -d.point.y + .5) * n.height), d - } - - function Gr(h, e, n, s) { - if (n.pitchWithMap) { - const u = [h, e, 0, 1]; - return o.aw(u, u, s), n.transform.projectTileCoordinates(u[0] / u[3], u[1] / u[3], n.unwrappedTileID, n.getElevation).point - } - return { - x: h / n.width * 2 - 1, - y: 1 - e / n.height * 2 - } - } - - function li(h, e, n) { - return n.transform.projectTileCoordinates(h, e, n.unwrappedTileID, n.getElevation) - } - - function fr(h, e, n) { - return h._unit()._perp()._mult(e * n) - } - - function bi(h, e, n, s, u, d, m, y, w) { - if (y.projectionCache.offsets[h]) return y.projectionCache.offsets[h]; - const P = n.add(e); - if (h + w.direction < s || h + w.direction >= u) return y.projectionCache.offsets[h] = P, P; - const M = Gt(h + w.direction, y, w), - D = fr(M.sub(n), m, w.direction), - z = n.add(D), - B = M.add(D); - return y.projectionCache.offsets[h] = o.ax(d, P, z, B) || P, y.projectionCache.offsets[h] - } - - function Si(h, e, n, s, u, d, m, y, w) { - const P = s ? h - e : h + e; - let M = P > 0 ? 1 : -1, - D = 0; - s && (M *= -1, D = Math.PI), M < 0 && (D += Math.PI); - let z, B = M > 0 ? d + u : d + u + 1; - y.projectionCache.cachedAnchorPoint ? z = y.projectionCache.cachedAnchorPoint : (z = Dr(y.tileAnchorPoint.x, y.tileAnchorPoint.y, y).point, y.projectionCache.cachedAnchorPoint = z); - let U, ee, J = z, - re = z, - se = 0, - de = 0; - const ue = Math.abs(P), - ge = []; - let Te; - for (; se + de <= ue;) { - if (B += M, B < d || B >= m) return null; - se += de, re = J, ee = U; - const He = { - absOffsetX: ue, - direction: M, - distanceFromAnchor: se, - previousVertex: re - }; - if (J = Gt(B, y, He), n === 0) ge.push(re), Te = J.sub(re); - else { - let je; - const qe = J.sub(re); - je = qe.mag() === 0 ? fr(Gt(B + M, y, He).sub(J), n, M) : fr(qe, n, M), ee || (ee = re.add(je)), U = bi(B, je, J, d, m, ee, n, y, He), ge.push(ee), Te = U.sub(ee) - } - de = Te.mag() - } - const he = Te._mult((ue - se) / de)._add(ee || re), - De = D + Math.atan2(J.y - re.y, J.x - re.x); - return ge.push(he), { - point: he, - angle: w ? De : 0, - path: ge - } - } - const zi = new Float32Array([-1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0]); - - function mi(h, e) { - for (let n = 0; n < h; n++) { - const s = e.length; - e.resize(s + 4), e.float32.set(zi, 3 * s) - } - } - - function Li(h, e, n) { - const s = e[0], - u = e[1]; - return h[0] = n[0] * s + n[4] * u + n[12], h[1] = n[1] * s + n[5] * u + n[13], h[3] = n[3] * s + n[7] * u + n[15], h - } - const rr = 100; - class yi { - constructor(e, n = new Hr(e.width + 200, e.height + 200, 25), s = new Hr(e.width + 200, e.height + 200, 25)) { - this.transform = e, this.grid = n, this.ignoredGrid = s, this.pitchFactor = Math.cos(e.pitch * Math.PI / 180) * e.cameraToCenterDistance, this.screenRightBoundary = e.width + rr, this.screenBottomBoundary = e.height + rr, this.gridRightBoundary = e.width + 200, this.gridBottomBoundary = e.height + 200, this.perspectiveRatioCutoff = .6 - } - placeCollisionBox(e, n, s, u, d, m, y, w, P, M, D, z) { - const B = this.projectAndGetPerspectiveRatio(e.anchorPointX + w[0], e.anchorPointY + w[1], d, M, z), - U = s * B.perspectiveRatio; - let ee; - if (m || y) ee = this._projectCollisionBox(e, U, u, d, m, y, w, B, M, D, z); - else { - const Te = B.x + (D ? D.x * U : 0), - he = B.y + (D ? D.y * U : 0); - ee = { - allPointsOccluded: !1, - box: [Te + e.x1 * U, he + e.y1 * U, Te + e.x2 * U, he + e.y2 * U] - } - } - const [J, re, se, de] = ee.box, ue = m ? ee.allPointsOccluded : B.isOccluded; - let ge = ue; - return ge || (ge = B.perspectiveRatio < this.perspectiveRatioCutoff), ge || (ge = !this.isInsideGrid(J, re, se, de)), ge || n !== "always" && this.grid.hitTest(J, re, se, de, n, P) ? { - box: [J, re, se, de], - placeable: !1, - offscreen: !1, - occluded: ue - } : { - box: [J, re, se, de], - placeable: !0, - offscreen: this.isOffscreen(J, re, se, de), - occluded: ue - } - } - placeCollisionCircles(e, n, s, u, d, m, y, w, P, M, D, z, B, U) { - const ee = [], - J = new o.P(n.anchorX, n.anchorY), - re = this.getPerspectiveRatio(J.x, J.y, m, U), - se = (P ? d * this.transform.getPitchedTextCorrection(n.anchorX, n.anchorY, m) / re : d * re) / o.aB, - de = { - getElevation: U, - pitchedLabelPlaneMatrix: y, - lineVertexArray: s, - pitchWithMap: P, - projectionCache: { - projections: {}, - offsets: {}, - cachedAnchorPoint: void 0, - anyProjectionOccluded: !1 - }, - transform: this.transform, - tileAnchorPoint: J, - unwrappedTileID: m, - width: this.transform.width, - height: this.transform.height, - translation: B - }, - ue = Pn(se, u, n.lineOffsetX * se, n.lineOffsetY * se, !1, n, !1, de); - let ge = !1, - Te = !1, - he = !0; - if (ue) { - const De = .5 * D * re + z, - He = new o.P(-100, -100), - je = new o.P(this.screenRightBoundary, this.screenBottomBoundary), - qe = new Lr, - $e = ue.first, - Rt = ue.last; - let Nt = []; - for (let Xr = $e.path.length - 1; Xr >= 1; Xr--) Nt.push($e.path[Xr]); - for (let Xr = 1; Xr < Rt.path.length; Xr++) Nt.push(Rt.path[Xr]); - const yt = 2.5 * De; - if (P) { - const Xr = this.projectPathToScreenSpace(Nt, de); - Nt = Xr.some((xi => xi.signedDistanceFromCamera <= 0)) ? [] : Xr.map((xi => xi.point)) - } - let sr = []; - if (Nt.length > 0) { - const Xr = Nt[0].clone(), - xi = Nt[0].clone(); - for (let ki = 1; ki < Nt.length; ki++) Xr.x = Math.min(Xr.x, Nt[ki].x), Xr.y = Math.min(Xr.y, Nt[ki].y), xi.x = Math.max(xi.x, Nt[ki].x), xi.y = Math.max(xi.y, Nt[ki].y); - sr = Xr.x >= He.x && xi.x <= je.x && Xr.y >= He.y && xi.y <= je.y ? [Nt] : xi.x < He.x || Xr.x > je.x || xi.y < He.y || Xr.y > je.y ? [] : o.ay([Nt], He.x, He.y, je.x, je.y) - } - for (const Xr of sr) { - qe.reset(Xr, .25 * De); - let xi = 0; - xi = qe.length <= .5 * De ? 1 : Math.ceil(qe.paddedLength / yt) + 1; - for (let ki = 0; ki < xi; ki++) { - const Pi = ki / Math.max(xi - 1, 1), - ji = qe.lerp(Pi), - Ui = ji.x + rr, - Wr = ji.y + rr; - ee.push(Ui, Wr, De, 0); - const Ei = Ui - De, - Qi = Wr - De, - dn = Ui + De, - xn = Wr + De; - if (he = he && this.isOffscreen(Ei, Qi, dn, xn), Te = Te || this.isInsideGrid(Ei, Qi, dn, xn), e !== "always" && this.grid.hitTestCircle(Ui, Wr, De, e, M) && (ge = !0, !w)) return { - circles: [], - offscreen: !1, - collisionDetected: ge - } - } - } - } - return { - circles: !w && ge || !Te || re < this.perspectiveRatioCutoff ? [] : ee, - offscreen: he, - collisionDetected: ge - } - } - projectPathToScreenSpace(e, n) { - const s = (function(u, d) { - const m = o.L(); - return o.aq(m, d.pitchedLabelPlaneMatrix), u.map((y => { - const w = ai(y.x, y.y, m, d.getElevation), - P = d.transform.projectTileCoordinates(w.point.x, w.point.y, d.unwrappedTileID, d.getElevation); - return P.point.x = (.5 * P.point.x + .5) * d.width, P.point.y = (.5 * -P.point.y + .5) * d.height, P - })) - })(e, n); - return (function(u) { - let d = 0, - m = 0, - y = 0, - w = 0; - for (let P = 0; P < u.length; P++) u[P].isOccluded ? (y = P + 1, w = 0) : (w++, w > m && (m = w, d = y)); - return u.slice(d, d + m) - })(s) - } - queryRenderedSymbols(e) { - if (e.length === 0 || this.grid.keysLength() === 0 && this.ignoredGrid.keysLength() === 0) return {}; - const n = [], - s = new o.a2; - for (const D of e) { - const z = new o.P(D.x + rr, D.y + rr); - s.extend(z), n.push(z) - } - const { - minX: u, - minY: d, - maxX: m, - maxY: y - } = s, w = this.grid.query(u, d, m, y).concat(this.ignoredGrid.query(u, d, m, y)), P = {}, M = {}; - for (const D of w) { - const z = D.key; - if (P[z.bucketInstanceId] === void 0 && (P[z.bucketInstanceId] = {}), P[z.bucketInstanceId][z.featureIndex]) continue; - const B = [new o.P(D.x1, D.y1), new o.P(D.x2, D.y1), new o.P(D.x2, D.y2), new o.P(D.x1, D.y2)]; - o.az(n, B) && (P[z.bucketInstanceId][z.featureIndex] = !0, M[z.bucketInstanceId] === void 0 && (M[z.bucketInstanceId] = []), M[z.bucketInstanceId].push(z.featureIndex)) - } - return M - } - insertCollisionBox(e, n, s, u, d, m) { - (s ? this.ignoredGrid : this.grid).insert({ - bucketInstanceId: u, - featureIndex: d, - collisionGroupID: m, - overlapMode: n - }, e[0], e[1], e[2], e[3]) - } - insertCollisionCircles(e, n, s, u, d, m) { - const y = s ? this.ignoredGrid : this.grid, - w = { - bucketInstanceId: u, - featureIndex: d, - collisionGroupID: m, - overlapMode: n - }; - for (let P = 0; P < e.length; P += 4) y.insertCircle(w, e[P], e[P + 1], e[P + 2]) - } - projectAndGetPerspectiveRatio(e, n, s, u, d) { - if (d) { - let m; - u ? (m = [e, n, u(e, n), 1], o.aw(m, m, d)) : (m = [e, n, 0, 1], Li(m, m, d)); - const y = m[3]; - return { - x: (m[0] / y + 1) / 2 * this.transform.width + rr, - y: (-m[1] / y + 1) / 2 * this.transform.height + rr, - perspectiveRatio: .5 + this.transform.cameraToCenterDistance / y * .5, - isOccluded: !1, - signedDistanceFromCamera: y - } - } { - const m = this.transform.projectTileCoordinates(e, n, s, u); - return { - x: (m.point.x + 1) / 2 * this.transform.width + rr, - y: (1 - m.point.y) / 2 * this.transform.height + rr, - perspectiveRatio: .5 + this.transform.cameraToCenterDistance / m.signedDistanceFromCamera * .5, - isOccluded: m.isOccluded, - signedDistanceFromCamera: m.signedDistanceFromCamera - } - } - } - getPerspectiveRatio(e, n, s, u) { - const d = this.transform.projectTileCoordinates(e, n, s, u); - return .5 + this.transform.cameraToCenterDistance / d.signedDistanceFromCamera * .5 - } - isOffscreen(e, n, s, u) { - return s < rr || e >= this.screenRightBoundary || u < rr || n > this.screenBottomBoundary - } - isInsideGrid(e, n, s, u) { - return s >= 0 && e < this.gridRightBoundary && u >= 0 && n < this.gridBottomBoundary - } - getViewportMatrix() { - const e = o.ag([]); - return o.M(e, e, [-100, -100, 0]), e - } - _projectCollisionBox(e, n, s, u, d, m, y, w, P, M, D) { - let z = 1, - B = 0, - U = 0, - ee = 1; - const J = e.anchorPointX + y[0], - re = e.anchorPointY + y[1]; - if (m && !d) { - const Nt = this.projectAndGetPerspectiveRatio(J + 1, re, u, P, D), - yt = Nt.x - w.x, - sr = Math.atan((Nt.y - w.y) / yt) + (yt < 0 ? Math.PI : 0), - Xr = Math.sin(sr), - xi = Math.cos(sr); - z = xi, B = Xr, U = -Xr, ee = xi - } else if (!m && d) { - const Nt = gr(this.transform); - z = Nt.vecEast[0], B = Nt.vecEast[1], U = Nt.vecSouth[0], ee = Nt.vecSouth[1] - } - let se = w.x, - de = w.y, - ue = n; - d && (se = J, de = re, ue = Math.pow(2, -(this.transform.zoom - s.overscaledZ)), ue *= this.transform.getPitchedTextCorrection(J, re, u), M || (ue *= o.ah(.5 + w.signedDistanceFromCamera / this.transform.cameraToCenterDistance * .5, 0, 4))), M && (se += z * M.x * ue + U * M.y * ue, de += B * M.x * ue + ee * M.y * ue); - const ge = e.x1 * ue, - Te = e.x2 * ue, - he = (ge + Te) / 2, - De = e.y1 * ue, - He = e.y2 * ue, - je = (De + He) / 2, - qe = [{ - offsetX: ge, - offsetY: De - }, { - offsetX: he, - offsetY: De - }, { - offsetX: Te, - offsetY: De - }, { - offsetX: Te, - offsetY: je - }, { - offsetX: Te, - offsetY: He - }, { - offsetX: he, - offsetY: He - }, { - offsetX: ge, - offsetY: He - }, { - offsetX: ge, - offsetY: je - }]; - let $e = []; - for (const { - offsetX: Nt, - offsetY: yt - } - of qe) $e.push(new o.P(se + z * Nt + U * yt, de + B * Nt + ee * yt)); - let Rt = !1; - if (d) { - const Nt = $e.map((yt => this.projectAndGetPerspectiveRatio(yt.x, yt.y, u, P, D))); - Rt = Nt.some((yt => !yt.isOccluded)), $e = Nt.map((yt => new o.P(yt.x, yt.y))) - } else Rt = !0; - return { - box: o.aA($e), - allPointsOccluded: !Rt - } - } - } - class Qr { - constructor(e, n, s, u) { - this.opacity = e ? Math.max(0, Math.min(1, e.opacity + (e.placed ? n : -n))) : u && s ? 1 : 0, this.placed = s - } - isHidden() { - return this.opacity === 0 && !this.placed - } - } - class Yr { - constructor(e, n, s, u, d) { - this.text = new Qr(e ? e.text : null, n, s, d), this.icon = new Qr(e ? e.icon : null, n, u, d) - } - isHidden() { - return this.text.isHidden() && this.icon.isHidden() - } - } - class la { - constructor(e, n, s) { - this.text = e, this.icon = n, this.skipFade = s - } - } - class sn { - constructor(e, n, s, u, d) { - this.bucketInstanceId = e, this.featureIndex = n, this.sourceLayerIndex = s, this.bucketIndex = u, this.tileID = d - } - } - class ta { - constructor(e) { - this.crossSourceCollisions = e, this.maxGroupID = 0, this.collisionGroups = {} - } - get(e) { - if (this.crossSourceCollisions) return { - ID: 0, - predicate: null - }; - if (!this.collisionGroups[e]) { - const n = ++this.maxGroupID; - this.collisionGroups[e] = { - ID: n, - predicate: s => s.collisionGroupID === n - } - } - return this.collisionGroups[e] - } - } - - function Fi(h, e, n, s, u) { - const { - horizontalAlign: d, - verticalAlign: m - } = o.aH(h); - return new o.P(-(d - .5) * e + s[0] * u, -(m - .5) * n + s[1] * u) - } - class Xi { - constructor(e, n, s, u, d) { - this.transform = e.clone(), this.terrain = n, this.collisionIndex = new yi(this.transform), this.placements = {}, this.opacities = {}, this.variableOffsets = {}, this.stale = !1, this.commitTime = 0, this.fadeDuration = s, this.retainedQueryData = {}, this.collisionGroups = new ta(u), this.collisionCircleArrays = {}, this.collisionBoxArrays = new Map, this.prevPlacement = d, d && (d.prevPlacement = void 0), this.placedOrientations = {} - } - _getTerrainElevationFunc(e) { - const n = this.terrain; - return n ? (s, u) => n.getElevation(e, s, u) : null - } - getBucketParts(e, n, s, u) { - const d = s.getBucket(n), - m = s.latestFeatureIndex; - if (!d || !m || n.id !== d.layerIds[0]) return; - const y = s.collisionBoxArray, - w = d.layers[0].layout, - P = d.layers[0].paint, - M = Math.pow(2, this.transform.zoom - s.tileID.overscaledZ), - D = s.tileSize / o.$, - z = s.tileID.toUnwrapped(), - B = w.get("text-rotation-alignment") === "map", - U = o.aC(s, 1, this.transform.zoom), - ee = o.aD(this.collisionIndex.transform, s, P.get("text-translate"), P.get("text-translate-anchor")), - J = o.aD(this.collisionIndex.transform, s, P.get("icon-translate"), P.get("icon-translate-anchor")), - re = $r(B, this.transform, U); - this.retainedQueryData[d.bucketInstanceId] = new sn(d.bucketInstanceId, m, d.sourceLayerIndex, d.index, s.tileID); - const se = { - bucket: d, - layout: w, - translationText: ee, - translationIcon: J, - unwrappedTileID: z, - pitchedLabelPlaneMatrix: re, - scale: M, - textPixelRatio: D, - holdingForFade: s.holdingForFade(), - collisionBoxArray: y, - partiallyEvaluatedTextSize: o.an(d.textSizeData, this.transform.zoom), - collisionGroup: this.collisionGroups.get(d.sourceID) - }; - if (u) - for (const de of d.sortKeyRanges) { - const { - sortKey: ue, - symbolInstanceStart: ge, - symbolInstanceEnd: Te - } = de; - e.push({ - sortKey: ue, - symbolInstanceStart: ge, - symbolInstanceEnd: Te, - parameters: se - }) - } else e.push({ - symbolInstanceStart: 0, - symbolInstanceEnd: d.symbolInstances.length, - parameters: se - }) - } - attemptAnchorPlacement(e, n, s, u, d, m, y, w, P, M, D, z, B, U, ee, J, re, se, de, ue) { - const ge = o.aE[e.textAnchor], - Te = [e.textOffset0, e.textOffset1], - he = Fi(ge, s, u, Te, d), - De = this.collisionIndex.placeCollisionBox(n, z, w, P, M, y, m, J, D.predicate, de, he, ue); - if ((!se || this.collisionIndex.placeCollisionBox(se, z, w, P, M, y, m, re, D.predicate, de, he, ue).placeable) && De.placeable) { - let He; - if (this.prevPlacement && this.prevPlacement.variableOffsets[B.crossTileID] && this.prevPlacement.placements[B.crossTileID] && this.prevPlacement.placements[B.crossTileID].text && (He = this.prevPlacement.variableOffsets[B.crossTileID].anchor), B.crossTileID === 0) throw new Error("symbolInstance.crossTileID can't be 0"); - return this.variableOffsets[B.crossTileID] = { - textOffset: Te, - width: s, - height: u, - anchor: ge, - textBoxScale: d, - prevAnchor: He - }, this.markUsedJustification(U, ge, B, ee), U.allowVerticalPlacement && (this.markUsedOrientation(U, ee, B), this.placedOrientations[B.crossTileID] = ee), { - shift: he, - placedGlyphBoxes: De - } - } - } - placeLayerBucketPart(e, n, s) { - const { - bucket: u, - layout: d, - translationText: m, - translationIcon: y, - unwrappedTileID: w, - pitchedLabelPlaneMatrix: P, - textPixelRatio: M, - holdingForFade: D, - collisionBoxArray: z, - partiallyEvaluatedTextSize: B, - collisionGroup: U - } = e.parameters, ee = d.get("text-optional"), J = d.get("icon-optional"), re = o.aF(d, "text-overlap", "text-allow-overlap"), se = re === "always", de = o.aF(d, "icon-overlap", "icon-allow-overlap"), ue = de === "always", ge = d.get("text-rotation-alignment") === "map", Te = d.get("text-pitch-alignment") === "map", he = d.get("icon-text-fit") !== "none", De = d.get("symbol-z-order") === "viewport-y", He = se && (ue || !u.hasIconData() || J), je = ue && (se || !u.hasTextData() || ee); - !u.collisionArrays && z && u.deserializeCollisionBoxes(z); - const qe = this.retainedQueryData[u.bucketInstanceId].tileID, - $e = this._getTerrainElevationFunc(qe), - Rt = this.transform.getFastPathSimpleProjectionMatrix(qe), - Nt = (yt, sr, Xr) => { - var xi, ki; - if (n[yt.crossTileID]) return; - if (D) return void(this.placements[yt.crossTileID] = new la(!1, !1, !1)); - let Pi = !1, - ji = !1, - Ui = !0, - Wr = null, - Ei = { - box: null, - placeable: !1, - offscreen: null, - occluded: !1 - }, - Qi = { - placeable: !1 - }, - dn = null, - xn = null, - qn = null, - Sa = 0, - as = 0, - ss = 0; - sr.textFeatureIndex ? Sa = sr.textFeatureIndex : yt.useRuntimeCollisionCircles && (Sa = yt.featureIndex), sr.verticalTextFeatureIndex && (as = sr.verticalTextFeatureIndex); - const Ys = sr.textBox; - if (Ys) { - const Kn = en => { - let pn = o.ao.horizontal; - if (u.allowVerticalPlacement && !en && this.prevPlacement) { - const da = this.prevPlacement.placedOrientations[yt.crossTileID]; - da && (this.placedOrientations[yt.crossTileID] = da, pn = da, this.markUsedOrientation(u, pn, yt)) - } - return pn - }, - Pa = (en, pn) => { - if (u.allowVerticalPlacement && yt.numVerticalGlyphVertices > 0 && sr.verticalTextBox) { - for (const da of u.writingModes) - if (da === o.ao.vertical ? (Ei = pn(), Qi = Ei) : Ei = en(), Ei && Ei.placeable) break - } else Ei = en() - }, - Vn = yt.textAnchorOffsetStartIndex, - os = yt.textAnchorOffsetEndIndex; - if (os === Vn) { - const en = (pn, da) => { - const tn = this.collisionIndex.placeCollisionBox(pn, re, M, qe, w, Te, ge, m, U.predicate, $e, void 0, Rt); - return tn && tn.placeable && (this.markUsedOrientation(u, da, yt), this.placedOrientations[yt.crossTileID] = da), tn - }; - Pa((() => en(Ys, o.ao.horizontal)), (() => { - const pn = sr.verticalTextBox; - return u.allowVerticalPlacement && yt.numVerticalGlyphVertices > 0 && pn ? en(pn, o.ao.vertical) : { - box: null, - offscreen: null - } - })), Kn(Ei && Ei.placeable) - } else { - let en = o.aE[(ki = (xi = this.prevPlacement) === null || xi === void 0 ? void 0 : xi.variableOffsets[yt.crossTileID]) === null || ki === void 0 ? void 0 : ki.anchor]; - const pn = (tn, Ro, Qs) => { - const Ha = tn.x2 - tn.x1, - Ia = tn.y2 - tn.y1, - ls = yt.textBoxScale, - id = he && de === "never" ? Ro : null; - let ia = null, - nd = re === "never" ? 1 : 2, - tu = "never"; - en && nd++; - for (let kl = 0; kl < nd; kl++) { - for (let El = Vn; El < os; El++) { - const cs = u.textAnchorOffsets.get(El); - if (en && cs.textAnchor !== en) continue; - const Wa = this.attemptAnchorPlacement(cs, tn, Ha, Ia, ls, ge, Te, M, qe, w, U, tu, yt, u, Qs, m, y, id, $e); - if (Wa && (ia = Wa.placedGlyphBoxes, ia && ia.placeable)) return Pi = !0, Wr = Wa.shift, ia - } - en ? en = null : tu = re - } - return s && !ia && (ia = { - box: this.collisionIndex.placeCollisionBox(Ys, "always", M, qe, w, Te, ge, m, U.predicate, $e, void 0, Rt).box, - offscreen: !1, - placeable: !1, - occluded: !1 - }), ia - }; - Pa((() => pn(Ys, sr.iconBox, o.ao.horizontal)), (() => { - const tn = sr.verticalTextBox; - return u.allowVerticalPlacement && (!Ei || !Ei.placeable) && yt.numVerticalGlyphVertices > 0 && tn ? pn(tn, sr.verticalIconBox, o.ao.vertical) : { - box: null, - occluded: !0, - offscreen: null - } - })), Ei && (Pi = Ei.placeable, Ui = Ei.offscreen); - const da = Kn(Ei && Ei.placeable); - if (!Pi && this.prevPlacement) { - const tn = this.prevPlacement.variableOffsets[yt.crossTileID]; - tn && (this.variableOffsets[yt.crossTileID] = tn, this.markUsedJustification(u, tn.anchor, yt, da)) - } - } - } - if (dn = Ei, Pi = dn && dn.placeable, Ui = dn && dn.offscreen, yt.useRuntimeCollisionCircles) { - const Kn = u.text.placedSymbolArray.get(yt.centerJustifiedTextSymbolIndex), - Pa = o.ap(u.textSizeData, B, Kn), - Vn = d.get("text-padding"); - xn = this.collisionIndex.placeCollisionCircles(re, Kn, u.lineVertexArray, u.glyphOffsetArray, Pa, w, P, s, Te, U.predicate, yt.collisionCircleDiameter, Vn, m, $e), xn.circles.length && xn.collisionDetected && !s && o.w("Collisions detected, but collision boxes are not shown"), Pi = se || xn.circles.length > 0 && !xn.collisionDetected, Ui = Ui && xn.offscreen - } - if (sr.iconFeatureIndex && (ss = sr.iconFeatureIndex), sr.iconBox) { - const Kn = Pa => this.collisionIndex.placeCollisionBox(Pa, de, M, qe, w, Te, ge, y, U.predicate, $e, he && Wr ? Wr : void 0, Rt); - Qi && Qi.placeable && sr.verticalIconBox ? (qn = Kn(sr.verticalIconBox), ji = qn.placeable) : (qn = Kn(sr.iconBox), ji = qn.placeable), Ui = Ui && qn.offscreen - } - const Js = ee || yt.numHorizontalGlyphVertices === 0 && yt.numVerticalGlyphVertices === 0, - Is = J || yt.numIconVertices === 0; - Js || Is ? Is ? Js || (ji = ji && Pi) : Pi = ji && Pi : ji = Pi = ji && Pi; - const Ms = ji && qn.placeable; - if (Pi && dn.placeable && this.collisionIndex.insertCollisionBox(dn.box, re, d.get("text-ignore-placement"), u.bucketInstanceId, Qi && Qi.placeable && as ? as : Sa, U.ID), Ms && this.collisionIndex.insertCollisionBox(qn.box, de, d.get("icon-ignore-placement"), u.bucketInstanceId, ss, U.ID), xn && Pi && this.collisionIndex.insertCollisionCircles(xn.circles, re, d.get("text-ignore-placement"), u.bucketInstanceId, Sa, U.ID), s && this.storeCollisionData(u.bucketInstanceId, Xr, sr, dn, qn, xn), yt.crossTileID === 0) throw new Error("symbolInstance.crossTileID can't be 0"); - if (u.bucketInstanceId === 0) throw new Error("bucket.bucketInstanceId can't be 0"); - this.placements[yt.crossTileID] = new la((Pi || He) && !(dn != null && dn.occluded), (ji || je) && !(qn != null && qn.occluded), Ui || u.justReloaded), n[yt.crossTileID] = !0 - }; - if (De) { - if (e.symbolInstanceStart !== 0) throw new Error("bucket.bucketInstanceId should be 0"); - const yt = u.getSortedSymbolIndexes(-this.transform.bearingInRadians); - for (let sr = yt.length - 1; sr >= 0; --sr) { - const Xr = yt[sr]; - Nt(u.symbolInstances.get(Xr), u.collisionArrays[Xr], Xr) - } - } else - for (let yt = e.symbolInstanceStart; yt < e.symbolInstanceEnd; yt++) Nt(u.symbolInstances.get(yt), u.collisionArrays[yt], yt); - u.justReloaded = !1 - } - storeCollisionData(e, n, s, u, d, m) { - if (s.textBox || s.iconBox) { - let y, w; - this.collisionBoxArrays.has(e) ? y = this.collisionBoxArrays.get(e) : (y = new Map, this.collisionBoxArrays.set(e, y)), y.has(n) ? w = y.get(n) : (w = { - text: null, - icon: null - }, y.set(n, w)), s.textBox && (w.text = u.box), s.iconBox && (w.icon = d.box) - } - if (m) { - let y = this.collisionCircleArrays[e]; - y === void 0 && (y = this.collisionCircleArrays[e] = []); - for (let w = 0; w < m.circles.length; w += 4) y.push(m.circles[w + 0] - rr), y.push(m.circles[w + 1] - rr), y.push(m.circles[w + 2]), y.push(m.collisionDetected ? 1 : 0) - } - } - markUsedJustification(e, n, s, u) { - let d; - d = u === o.ao.vertical ? s.verticalPlacedTextSymbolIndex : { - left: s.leftJustifiedTextSymbolIndex, - center: s.centerJustifiedTextSymbolIndex, - right: s.rightJustifiedTextSymbolIndex - } [o.aG(n)]; - const m = [s.leftJustifiedTextSymbolIndex, s.centerJustifiedTextSymbolIndex, s.rightJustifiedTextSymbolIndex, s.verticalPlacedTextSymbolIndex]; - for (const y of m) y >= 0 && (e.text.placedSymbolArray.get(y).crossTileID = d >= 0 && y !== d ? 0 : s.crossTileID) - } - markUsedOrientation(e, n, s) { - const u = n === o.ao.horizontal || n === o.ao.horizontalOnly ? n : 0, - d = n === o.ao.vertical ? n : 0, - m = [s.leftJustifiedTextSymbolIndex, s.centerJustifiedTextSymbolIndex, s.rightJustifiedTextSymbolIndex]; - for (const y of m) e.text.placedSymbolArray.get(y).placedOrientation = u; - s.verticalPlacedTextSymbolIndex && (e.text.placedSymbolArray.get(s.verticalPlacedTextSymbolIndex).placedOrientation = d) - } - commit(e) { - this.commitTime = e, this.zoomAtLastRecencyCheck = this.transform.zoom; - const n = this.prevPlacement; - let s = !1; - this.prevZoomAdjustment = n ? n.zoomAdjustment(this.transform.zoom) : 0; - const u = n ? n.symbolFadeChange(e) : 1, - d = n ? n.opacities : {}, - m = n ? n.variableOffsets : {}, - y = n ? n.placedOrientations : {}; - for (const w in this.placements) { - const P = this.placements[w], - M = d[w]; - M ? (this.opacities[w] = new Yr(M, u, P.text, P.icon), s = s || P.text !== M.text.placed || P.icon !== M.icon.placed) : (this.opacities[w] = new Yr(null, u, P.text, P.icon, P.skipFade), s = s || P.text || P.icon) - } - for (const w in d) { - const P = d[w]; - if (!this.opacities[w]) { - const M = new Yr(P, u, !1, !1); - M.isHidden() || (this.opacities[w] = M, s = s || P.text.placed || P.icon.placed) - } - } - for (const w in m) this.variableOffsets[w] || !this.opacities[w] || this.opacities[w].isHidden() || (this.variableOffsets[w] = m[w]); - for (const w in y) this.placedOrientations[w] || !this.opacities[w] || this.opacities[w].isHidden() || (this.placedOrientations[w] = y[w]); - if (n && n.lastPlacementChangeTime === void 0) throw new Error("Last placement time for previous placement is not defined"); - s ? this.lastPlacementChangeTime = e : typeof this.lastPlacementChangeTime != "number" && (this.lastPlacementChangeTime = n ? n.lastPlacementChangeTime : e) - } - updateLayerOpacities(e, n) { - const s = {}; - for (const u of n) { - const d = u.getBucket(e); - d && u.latestFeatureIndex && e.id === d.layerIds[0] && this.updateBucketOpacities(d, u.tileID, s, u.collisionBoxArray) - } - } - updateBucketOpacities(e, n, s, u) { - e.hasTextData() && (e.text.opacityVertexArray.clear(), e.text.hasVisibleVertices = !1), e.hasIconData() && (e.icon.opacityVertexArray.clear(), e.icon.hasVisibleVertices = !1), e.hasIconCollisionBoxData() && e.iconCollisionBox.collisionVertexArray.clear(), e.hasTextCollisionBoxData() && e.textCollisionBox.collisionVertexArray.clear(); - const d = e.layers[0], - m = d.layout, - y = new Yr(null, 0, !1, !1, !0), - w = m.get("text-allow-overlap"), - P = m.get("icon-allow-overlap"), - M = d._unevaluatedLayout.hasValue("text-variable-anchor") || d._unevaluatedLayout.hasValue("text-variable-anchor-offset"), - D = m.get("text-rotation-alignment") === "map", - z = m.get("text-pitch-alignment") === "map", - B = m.get("icon-text-fit") !== "none", - U = new Yr(null, 0, w && (P || !e.hasIconData() || m.get("icon-optional")), P && (w || !e.hasTextData() || m.get("text-optional")), !0); - !e.collisionArrays && u && (e.hasIconCollisionBoxData() || e.hasTextCollisionBoxData()) && e.deserializeCollisionBoxes(u); - const ee = (re, se, de) => { - for (let ue = 0; ue < se / 4; ue++) re.opacityVertexArray.emplaceBack(de); - re.hasVisibleVertices = re.hasVisibleVertices || de !== Mi - }, - J = this.collisionBoxArrays.get(e.bucketInstanceId); - for (let re = 0; re < e.symbolInstances.length; re++) { - const se = e.symbolInstances.get(re), - { - numHorizontalGlyphVertices: de, - numVerticalGlyphVertices: ue, - crossTileID: ge - } = se; - let Te = this.opacities[ge]; - s[ge] ? Te = y : Te || (Te = U, this.opacities[ge] = Te), s[ge] = !0; - const he = se.numIconVertices > 0, - De = this.placedOrientations[se.crossTileID], - He = De === o.ao.vertical, - je = De === o.ao.horizontal || De === o.ao.horizontalOnly; - if (de > 0 || ue > 0) { - const $e = $i(Te.text); - ee(e.text, de, He ? Mi : $e), ee(e.text, ue, je ? Mi : $e); - const Rt = Te.text.isHidden(); - [se.rightJustifiedTextSymbolIndex, se.centerJustifiedTextSymbolIndex, se.leftJustifiedTextSymbolIndex].forEach((sr => { - sr >= 0 && (e.text.placedSymbolArray.get(sr).hidden = Rt || He ? 1 : 0) - })), se.verticalPlacedTextSymbolIndex >= 0 && (e.text.placedSymbolArray.get(se.verticalPlacedTextSymbolIndex).hidden = Rt || je ? 1 : 0); - const Nt = this.variableOffsets[se.crossTileID]; - Nt && this.markUsedJustification(e, Nt.anchor, se, De); - const yt = this.placedOrientations[se.crossTileID]; - yt && (this.markUsedJustification(e, "left", se, yt), this.markUsedOrientation(e, yt, se)) - } - if (he) { - const $e = $i(Te.icon), - Rt = !(B && se.verticalPlacedIconSymbolIndex && He); - se.placedIconSymbolIndex >= 0 && (ee(e.icon, se.numIconVertices, Rt ? $e : Mi), e.icon.placedSymbolArray.get(se.placedIconSymbolIndex).hidden = Te.icon.isHidden()), se.verticalPlacedIconSymbolIndex >= 0 && (ee(e.icon, se.numVerticalIconVertices, Rt ? Mi : $e), e.icon.placedSymbolArray.get(se.verticalPlacedIconSymbolIndex).hidden = Te.icon.isHidden()) - } - const qe = J && J.has(re) ? J.get(re) : { - text: null, - icon: null - }; - if (e.hasIconCollisionBoxData() || e.hasTextCollisionBoxData()) { - const $e = e.collisionArrays[re]; - if ($e) { - let Rt = new o.P(0, 0); - if ($e.textBox || $e.verticalTextBox) { - let Nt = !0; - if (M) { - const yt = this.variableOffsets[ge]; - yt ? (Rt = Fi(yt.anchor, yt.width, yt.height, yt.textOffset, yt.textBoxScale), D && Rt._rotate(z ? -this.transform.bearingInRadians : this.transform.bearingInRadians)) : Nt = !1 - } - if ($e.textBox || $e.verticalTextBox) { - let yt; - $e.textBox && (yt = He), $e.verticalTextBox && (yt = je), Gn(e.textCollisionBox.collisionVertexArray, Te.text.placed, !Nt || yt, qe.text, Rt.x, Rt.y) - } - } - if ($e.iconBox || $e.verticalIconBox) { - const Nt = !!(!je && $e.verticalIconBox); - let yt; - $e.iconBox && (yt = Nt), $e.verticalIconBox && (yt = !Nt), Gn(e.iconCollisionBox.collisionVertexArray, Te.icon.placed, yt, qe.icon, B ? Rt.x : 0, B ? Rt.y : 0) - } - } - } - } - if (e.sortFeatures(-this.transform.bearingInRadians), this.retainedQueryData[e.bucketInstanceId] && (this.retainedQueryData[e.bucketInstanceId].featureSortOrder = e.featureSortOrder), e.hasTextData() && e.text.opacityVertexBuffer && e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray), e.hasIconData() && e.icon.opacityVertexBuffer && e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray), e.hasIconCollisionBoxData() && e.iconCollisionBox.collisionVertexBuffer && e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray), e.hasTextCollisionBoxData() && e.textCollisionBox.collisionVertexBuffer && e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray), e.text.opacityVertexArray.length !== e.text.layoutVertexArray.length / 4) throw new Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`); - if (e.icon.opacityVertexArray.length !== e.icon.layoutVertexArray.length / 4) throw new Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`); - e.bucketInstanceId in this.collisionCircleArrays && (e.collisionCircleArray = this.collisionCircleArrays[e.bucketInstanceId], delete this.collisionCircleArrays[e.bucketInstanceId]) - } - symbolFadeChange(e) { - return this.fadeDuration === 0 ? 1 : (e - this.commitTime) / this.fadeDuration + this.prevZoomAdjustment - } - zoomAdjustment(e) { - return Math.max(0, (this.transform.zoom - e) / 1.5) - } - hasTransitions(e) { - return this.stale || e - this.lastPlacementChangeTime < this.fadeDuration - } - stillRecent(e, n) { - const s = this.zoomAtLastRecencyCheck === n ? 1 - this.zoomAdjustment(n) : 1; - return this.zoomAtLastRecencyCheck = n, this.commitTime + this.fadeDuration * s > e - } - setStale() { - this.stale = !0 - } - } - - function Gn(h, e, n, s, u, d) { - s && s.length !== 0 || (s = [0, 0, 0, 0]); - const m = s[0] - rr, - y = s[1] - rr, - w = s[2] - rr, - P = s[3] - rr; - h.emplaceBack(e ? 1 : 0, n ? 1 : 0, u || 0, d || 0, m, y), h.emplaceBack(e ? 1 : 0, n ? 1 : 0, u || 0, d || 0, w, y), h.emplaceBack(e ? 1 : 0, n ? 1 : 0, u || 0, d || 0, w, P), h.emplaceBack(e ? 1 : 0, n ? 1 : 0, u || 0, d || 0, m, P) - } - const Hn = Math.pow(2, 25), - Ln = Math.pow(2, 24), - gt = Math.pow(2, 17), - qt = Math.pow(2, 16), - vr = Math.pow(2, 9), - _i = Math.pow(2, 8), - Di = Math.pow(2, 1); - - function $i(h) { - if (h.opacity === 0 && !h.placed) return 0; - if (h.opacity === 1 && h.placed) return 4294967295; - const e = h.placed ? 1 : 0, - n = Math.floor(127 * h.opacity); - return n * Hn + e * Ln + n * gt + e * qt + n * vr + e * _i + n * Di + e - } - const Mi = 0; - class Cr { - constructor(e) { - this._sortAcrossTiles = e.layout.get("symbol-z-order") !== "viewport-y" && !e.layout.get("symbol-sort-key").isConstant(), this._currentTileIndex = 0, this._currentPartIndex = 0, this._seenCrossTileIDs = {}, this._bucketParts = [] - } - continuePlacement(e, n, s, u, d) { - const m = this._bucketParts; - for (; this._currentTileIndex < e.length;) - if (n.getBucketParts(m, u, e[this._currentTileIndex], this._sortAcrossTiles), this._currentTileIndex++, d()) return !0; - for (this._sortAcrossTiles && (this._sortAcrossTiles = !1, m.sort(((y, w) => y.sortKey - w.sortKey))); this._currentPartIndex < m.length;) - if (n.placeLayerBucketPart(m[this._currentPartIndex], this._seenCrossTileIDs, s), this._currentPartIndex++, d()) return !0; - return !1 - } - } - class gn { - constructor(e, n, s, u, d, m, y, w) { - this.placement = new Xi(e, n, m, y, w), this._currentPlacementIndex = s.length - 1, this._forceFullPlacement = u, this._showCollisionBoxes = d, this._done = !1 - } - isDone() { - return this._done - } - continuePlacement(e, n, s) { - const u = ye.now(), - d = () => !this._forceFullPlacement && ye.now() - u > 2; - for (; this._currentPlacementIndex >= 0;) { - const m = n[e[this._currentPlacementIndex]], - y = this.placement.collisionIndex.transform.zoom; - if (m.type === "symbol" && (!m.minzoom || m.minzoom <= y) && (!m.maxzoom || m.maxzoom > y)) { - if (this._inProgressLayer || (this._inProgressLayer = new Cr(m)), this._inProgressLayer.continuePlacement(s[m.source], this.placement, this._showCollisionBoxes, m, d)) return; - delete this._inProgressLayer - } - this._currentPlacementIndex-- - } - this._done = !0 - } - commit(e) { - return this.placement.commit(e), this.placement - } - } - const tr = 512 / o.$ / 2; - class Ht { - constructor(e, n, s) { - this.tileID = e, this.bucketInstanceId = s, this._symbolsByKey = {}; - const u = new Map; - for (let d = 0; d < n.length; d++) { - const m = n.get(d), - y = m.key, - w = u.get(y); - w ? w.push(m) : u.set(y, [m]) - } - for (const [d, m] of u) { - const y = { - positions: m.map((w => ({ - x: Math.floor(w.anchorX * tr), - y: Math.floor(w.anchorY * tr) - }))), - crossTileIDs: m.map((w => w.crossTileID)) - }; - if (y.positions.length > 128) { - const w = new o.aI(y.positions.length, 16, Uint16Array); - for (const { - x: P, - y: M - } - of y.positions) w.add(P, M); - w.finish(), delete y.positions, y.index = w - } - this._symbolsByKey[d] = y - } - } - getScaledCoordinates(e, n) { - const { - x: s, - y: u, - z: d - } = this.tileID.canonical, { - x: m, - y, - z: w - } = n.canonical, P = tr / Math.pow(2, w - d), M = (y * o.$ + e.anchorY) * P, D = u * o.$ * tr; - return { - x: Math.floor((m * o.$ + e.anchorX) * P - s * o.$ * tr), - y: Math.floor(M - D) - } - } - findMatches(e, n, s) { - const u = this.tileID.canonical.z < n.canonical.z ? 1 : Math.pow(2, this.tileID.canonical.z - n.canonical.z); - for (let d = 0; d < e.length; d++) { - const m = e.get(d); - if (m.crossTileID) continue; - const y = this._symbolsByKey[m.key]; - if (!y) continue; - const w = this.getScaledCoordinates(m, n); - if (y.index) { - const P = y.index.range(w.x - u, w.y - u, w.x + u, w.y + u).sort(); - for (const M of P) { - const D = y.crossTileIDs[M]; - if (!s[D]) { - s[D] = !0, m.crossTileID = D; - break - } - } - } else if (y.positions) - for (let P = 0; P < y.positions.length; P++) { - const M = y.positions[P], - D = y.crossTileIDs[P]; - if (Math.abs(M.x - w.x) <= u && Math.abs(M.y - w.y) <= u && !s[D]) { - s[D] = !0, m.crossTileID = D; - break - } - } - } - } - getCrossTileIDsLists() { - return Object.values(this._symbolsByKey).map((({ - crossTileIDs: e - }) => e)) - } - } - class ei { - constructor() { - this.maxCrossTileID = 0 - } - generate() { - return ++this.maxCrossTileID - } - } - class ri { - constructor() { - this.indexes = {}, this.usedCrossTileIDs = {}, this.lng = 0 - } - handleWrapJump(e) { - const n = Math.round((e - this.lng) / 360); - if (n !== 0) - for (const s in this.indexes) { - const u = this.indexes[s], - d = {}; - for (const m in u) { - const y = u[m]; - y.tileID = y.tileID.unwrapTo(y.tileID.wrap + n), d[y.tileID.key] = y - } - this.indexes[s] = d - } - this.lng = e - } - addBucket(e, n, s) { - if (this.indexes[e.overscaledZ] && this.indexes[e.overscaledZ][e.key]) { - if (this.indexes[e.overscaledZ][e.key].bucketInstanceId === n.bucketInstanceId) return !1; - this.removeBucketCrossTileIDs(e.overscaledZ, this.indexes[e.overscaledZ][e.key]) - } - for (let d = 0; d < n.symbolInstances.length; d++) n.symbolInstances.get(d).crossTileID = 0; - this.usedCrossTileIDs[e.overscaledZ] || (this.usedCrossTileIDs[e.overscaledZ] = {}); - const u = this.usedCrossTileIDs[e.overscaledZ]; - for (const d in this.indexes) { - const m = this.indexes[d]; - if (Number(d) > e.overscaledZ) - for (const y in m) { - const w = m[y]; - w.tileID.isChildOf(e) && w.findMatches(n.symbolInstances, e, u) - } else { - const y = m[e.scaledTo(Number(d)).key]; - y && y.findMatches(n.symbolInstances, e, u) - } - } - for (let d = 0; d < n.symbolInstances.length; d++) { - const m = n.symbolInstances.get(d); - m.crossTileID || (m.crossTileID = s.generate(), u[m.crossTileID] = !0) - } - return this.indexes[e.overscaledZ] === void 0 && (this.indexes[e.overscaledZ] = {}), this.indexes[e.overscaledZ][e.key] = new Ht(e, n.symbolInstances, n.bucketInstanceId), !0 - } - removeBucketCrossTileIDs(e, n) { - for (const s of n.getCrossTileIDsLists()) - for (const u of s) delete this.usedCrossTileIDs[e][u] - } - removeStaleBuckets(e) { - let n = !1; - for (const s in this.indexes) { - const u = this.indexes[s]; - for (const d in u) e[u[d].bucketInstanceId] || (this.removeBucketCrossTileIDs(s, u[d]), delete u[d], n = !0) - } - return n - } - } - class gi { - constructor() { - this.layerIndexes = {}, this.crossTileIDs = new ei, this.maxBucketInstanceId = 0, this.bucketsInCurrentPlacement = {} - } - addLayer(e, n, s) { - let u = this.layerIndexes[e.id]; - u === void 0 && (u = this.layerIndexes[e.id] = new ri); - let d = !1; - const m = {}; - u.handleWrapJump(s); - for (const y of n) { - const w = y.getBucket(e); - w && e.id === w.layerIds[0] && (w.bucketInstanceId || (w.bucketInstanceId = ++this.maxBucketInstanceId), u.addBucket(y.tileID, w, this.crossTileIDs) && (d = !0), m[w.bucketInstanceId] = !0) - } - return u.removeStaleBuckets(m) && (d = !0), d - } - pruneUnusedLayers(e) { - const n = {}; - e.forEach((s => { - n[s] = !0 - })); - for (const s in this.layerIndexes) n[s] || delete this.layerIndexes[s] - } - } - var ci = "void main() {fragColor=vec4(1.0);}"; - const pi = { - prelude: Er(`#ifdef GL_ES -precision mediump float; -#else -#if !defined(lowp) -#define lowp -#endif -#if !defined(mediump) -#define mediump -#endif -#if !defined(highp) -#define highp -#endif -#endif -out highp vec4 fragColor;`, `#ifdef GL_ES -precision highp float; -#else -#if !defined(lowp) -#define lowp -#endif -#if !defined(mediump) -#define mediump -#endif -#if !defined(highp) -#define highp -#endif -#endif -vec2 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 -);}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);return (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 -);} -#ifdef TERRAIN3D -uniform 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; -#endif -const 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) { -#ifdef TERRAIN3D -highp 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)); -#else -return 1.0; -#endif -}float calculate_visibility(vec4 pos) { -#ifdef TERRAIN3D -vec3 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; -#else -return 1.0; -#endif -}float ele(vec2 pos) { -#ifdef TERRAIN3D -vec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; -#else -return 0.0; -#endif -}float get_elevation(vec2 pos) { -#ifdef TERRAIN3D -#ifdef GLOBE -if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;} -#endif -vec2 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; -#else -return 0.0; -#endif -}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`), - projectionMercator: Er("", "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: Er("", `#define GLOBE_RADIUS 6371008.8 -uniform 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 -);}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); -if (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 -);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: Er(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, "in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"), - backgroundPattern: Er(`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;uniform 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; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, "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: Er(`in vec3 v_data;in float v_visibility; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define mediump float radius -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define highp vec4 stroke_color -#pragma mapbox: define mediump float stroke_width -#pragma mapbox: define lowp float stroke_opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize mediump float radius -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize highp vec4 stroke_color -#pragma mapbox: initialize mediump float stroke_width -#pragma mapbox: initialize lowp float stroke_opacity -vec2 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;} -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, `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; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define mediump float radius -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define highp vec4 stroke_color -#pragma mapbox: define mediump float stroke_width -#pragma mapbox: define lowp float stroke_opacity -void main(void) { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize mediump float radius -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize highp vec4 stroke_color -#pragma mapbox: initialize mediump float stroke_width -#pragma mapbox: initialize lowp float stroke_opacity -vec2 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) { -#ifdef GLOBE -vec3 center_vector=projectToSphere(circle_center); -#endif -float 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 { -#ifdef GLOBE -vec4 projected_center=interpolateProjection(circle_center,center_vector,ele); -#else -vec4 projected_center=projectTileWithElevation(circle_center,ele); -#endif -corner_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);} -#ifdef GLOBE -vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele); -#else -gl_Position=projectTileWithElevation(corner_position,ele); -#endif -} 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: Er(ci, "in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"), - heatmap: Er(`uniform highp float u_intensity;in vec2 v_extrude; -#pragma mapbox: define highp float weight -#define GAUSS_COEF 0.3989422804014327 -void main() { -#pragma mapbox: initialize highp float weight -float 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); -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, `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; -#pragma mapbox: define highp float weight -#pragma mapbox: define mediump float radius -const highp float ZERO=1.0/255.0/16.0; -#define GAUSS_COEF 0.3989422804014327 -void main(void) { -#pragma mapbox: initialize highp float weight -#pragma mapbox: initialize mediump float radius -vec2 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); -#ifdef GLOBE -vec2 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); -#else -gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center)); -#endif -}`), - heatmapTexture: Er(`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; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(0.0); -#endif -}`, "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: Er("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: Er("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: Er(`#ifdef GL_ES -precision highp float; -#endif -uniform 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 -{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)); -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, "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: Er("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: Er(ci, `in vec2 a_pos;void main() { -#ifdef GLOBE -gl_Position=projectTileFor3D(a_pos,0.0); -#else -gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0); -#endif -}`), - fill: Er(`#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float opacity -fragColor=color*opacity; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, `uniform vec2 u_fill_translate;in vec2 a_pos; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float opacity -gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`), - fillOutline: Er(`in vec2 v_pos; -#ifdef GLOBE -in float v_depth; -#endif -#pragma mapbox: define highp vec4 outline_color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 outline_color -#pragma mapbox: initialize lowp float opacity -float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity); -#ifdef GLOBE -if (v_depth > 1.0) {discard;} -#endif -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, `uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos; -#ifdef GLOBE -out float v_depth; -#endif -#pragma mapbox: define highp vec4 outline_color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 outline_color -#pragma mapbox: initialize lowp float opacity -gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; -#ifdef GLOBE -v_depth=gl_Position.z/gl_Position.w; -#endif -}`), - fillOutlinePattern: Er(`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; -#ifdef GLOBE -in float v_depth; -#endif -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -vec2 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; -#ifdef GLOBE -if (v_depth > 1.0) {discard;} -#endif -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, `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; -#ifdef GLOBE -out float v_depth; -#endif -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 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; -#ifdef GLOBE -v_depth=gl_Position.z/gl_Position.w; -#endif -}`), - fillPattern: Er(`#ifdef GL_ES -precision highp float; -#endif -uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b; -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -vec2 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; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, `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; -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 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;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: Er(`in vec4 v_color;void main() {fragColor=v_color; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, `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; -#ifdef TERRAIN3D -in vec2 a_centroid; -#endif -out vec4 v_color; -#pragma mapbox: define highp float base -#pragma mapbox: define highp float height -#pragma mapbox: define highp vec4 color -void main() { -#pragma mapbox: initialize highp float base -#pragma mapbox: initialize highp float height -#pragma mapbox: initialize highp vec4 color -vec3 normal=a_normal_ed.xyz; -#ifdef TERRAIN3D -float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); -#else -float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; -#endif -base=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; -#ifdef GLOBE -vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); -#else -gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); -#endif -float 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); -#ifdef GLOBE -mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition); -#endif -directional=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: Er(`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; -#pragma mapbox: define lowp float base -#pragma mapbox: define lowp float height -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float base -#pragma mapbox: initialize lowp float height -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 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; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, `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; -#ifdef TERRAIN3D -in vec2 a_centroid; -#endif -#ifdef GLOBE -out vec3 v_sphere_pos; -#endif -out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting; -#pragma mapbox: define lowp float base -#pragma mapbox: define lowp float height -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float base -#pragma mapbox: initialize lowp float height -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 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; -#ifdef TERRAIN3D -float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); -#else -float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; -#endif -base=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; -#ifdef GLOBE -vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); -#else -gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); -#endif -vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 -? a_pos -: 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: Er(`#ifdef GL_ES -precision highp float; -#endif -uniform 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/pow(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); -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, "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: Er(`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]; -#define PI 3.141592653589793 -#define STANDARD 0 -#define COMBINED 1 -#define IGOR 2 -#define MULTIDIRECTIONAL 3 -#define BASIC 4 -float 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 -{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 -{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);} -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, "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: Er(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale; -#ifdef GLOBE -in float v_depth; -#endif -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -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);fragColor=color*(alpha*opacity); -#ifdef GLOBE -if (v_depth > 1.0) {discard;} -#endif -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, ` -#define scale 0.015873016 -in 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; -#ifdef GLOBE -out float v_depth; -#endif -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float width -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float width -float 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);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; -#ifdef GLOBE -v_depth=gl_Position.z/gl_Position.w; -#endif -#ifdef TERRAIN3D -v_gamma_scale=1.0; -#else -float 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; -#endif -v_width2=vec2(outset,inset);}`), - lineGradient: Er(`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; -#ifdef GLOBE -in float v_depth; -#endif -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -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);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity); -#ifdef GLOBE -if (v_depth > 1.0) {discard;} -#endif -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, ` -#define scale 0.015873016 -in 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; -#ifdef GLOBE -out float v_depth; -#endif -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float width -void main() { -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float width -float 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; -#ifdef GLOBE -v_depth=gl_Position.z/gl_Position.w; -#endif -#ifdef TERRAIN3D -v_gamma_scale=1.0; -#else -float 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; -#endif -v_width2=vec2(outset,inset);}`), - linePattern: Er(`#ifdef GL_ES -precision highp float; -#endif -uniform 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; -#ifdef GLOBE -in float v_depth; -#endif -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -vec2 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; -#ifdef GLOBE -if (v_depth > 1.0) {discard;} -#endif -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, ` -#define scale 0.015873016 -#define LINE_DISTANCE_SCALE 2.0 -in 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; -#ifdef GLOBE -out float v_depth; -#endif -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define mediump float width -#pragma mapbox: define lowp float floorwidth -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize mediump float width -#pragma mapbox: initialize lowp float floorwidth -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -float 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; -#ifdef GLOBE -v_depth=gl_Position.z/gl_Position.w; -#endif -#ifdef TERRAIN3D -v_gamma_scale=1.0; -#else -float 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; -#endif -v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`), - lineSDF: Er(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;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; -#ifdef GLOBE -in float v_depth; -#endif -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float width -#pragma mapbox: define lowp float floorwidth -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float width -#pragma mapbox: initialize lowp float floorwidth -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 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);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity); -#ifdef GLOBE -if (v_depth > 1.0) {discard;} -#endif -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, ` -#define scale 0.015873016 -#define LINE_DISTANCE_SCALE 2.0 -in 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_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale; -#ifdef GLOBE -out float v_depth; -#endif -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float width -#pragma mapbox: define lowp float floorwidth -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float width -#pragma mapbox: initialize lowp float floorwidth -float 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; -#ifdef GLOBE -v_depth=gl_Position.z/gl_Position.w; -#endif -#ifdef TERRAIN3D -v_gamma_scale=1.0; -#else -float 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; -#endif -v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`), - raster: Er(`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); -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, `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; -#ifdef GLOBE -if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;} -#endif -v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`), - symbolIcon: Er(`uniform sampler2D u_texture;in vec2 v_tex;in float v_fade_opacity; -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize lowp float opacity -lowp float alpha=opacity*v_fade_opacity;fragColor=texture(u_texture,v_tex)*alpha; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, `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_fade_opacity; -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize lowp float opacity -vec2 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);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? -camera_to_anchor_distance/u_camera_to_center_distance : -u_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; -#ifdef GLOBE -if(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);} -#endif -vec4 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;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_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`), - symbolSDF: Er(`#define SDF_PX 8.0 -uniform bool u_is_halo;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; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -float 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 fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}fragColor=color*(alpha*opacity*fade_opacity); -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, `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; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -vec2 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;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);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? -camera_to_anchor_distance/u_camera_to_center_distance : -u_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; -#ifdef GLOBE -if(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);} -#endif -vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*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;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));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`), - symbolTextAndIcon: Er(`#define SDF_PX 8.0 -#define SDF 1.0 -#define ICON 0.0 -uniform bool u_is_halo;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; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;fragColor=texture(u_texture_icon,tex_icon)*alpha; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -return;}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;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);fragColor=color*(alpha*opacity*fade_opacity); -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`, `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; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -vec2 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);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? -camera_to_anchor_distance/u_camera_to_center_distance : -u_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; -#ifdef GLOBE -if(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);} -#endif -vec4 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;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));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`), - terrain: Er("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 && 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);float 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,get_elevation(a_pos3d.xy)-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: Er("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: Er("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: Er("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: Er(`in 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 -);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: Er("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);}") - }; - - function Er(h, e) { - const n = /#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g, - s = e.match(/in ([\w]+) ([\w]+)/g), - u = h.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g), - d = e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g), - m = d ? d.concat(u) : u, - y = {}; - return { - fragmentSource: h = h.replace(n, ((w, P, M, D, z) => (y[z] = !0, P === "define" ? ` -#ifndef HAS_UNIFORM_u_${z} -in ${M} ${D} ${z}; -#else -uniform ${M} ${D} u_${z}; -#endif -` : ` -#ifdef HAS_UNIFORM_u_${z} - ${M} ${D} ${z} = u_${z}; -#endif -`))), - vertexSource: e = e.replace(n, ((w, P, M, D, z) => { - const B = D === "float" ? "vec2" : "vec4", - U = z.match(/color/) ? "color" : B; - return y[z] ? P === "define" ? ` -#ifndef HAS_UNIFORM_u_${z} -uniform lowp float u_${z}_t; -in ${M} ${B} a_${z}; -out ${M} ${D} ${z}; -#else -uniform ${M} ${D} u_${z}; -#endif -` : U === "vec4" ? ` -#ifndef HAS_UNIFORM_u_${z} - ${z} = a_${z}; -#else - ${M} ${D} ${z} = u_${z}; -#endif -` : ` -#ifndef HAS_UNIFORM_u_${z} - ${z} = unpack_mix_${U}(a_${z}, u_${z}_t); -#else - ${M} ${D} ${z} = u_${z}; -#endif -` : P === "define" ? ` -#ifndef HAS_UNIFORM_u_${z} -uniform lowp float u_${z}_t; -in ${M} ${B} a_${z}; -#else -uniform ${M} ${D} u_${z}; -#endif -` : U === "vec4" ? ` -#ifndef HAS_UNIFORM_u_${z} - ${M} ${D} ${z} = a_${z}; -#else - ${M} ${D} ${z} = u_${z}; -#endif -` : ` -#ifndef HAS_UNIFORM_u_${z} - ${M} ${D} ${z} = unpack_mix_${U}(a_${z}, u_${z}_t); -#else - ${M} ${D} ${z} = u_${z}; -#endif -` - })), - staticAttributes: s, - staticUniforms: m - } - } - class Ri { - constructor(e, n, s) { - this.vertexBuffer = e, this.indexBuffer = n, this.segments = s - } - destroy() { - this.vertexBuffer.destroy(), this.indexBuffer.destroy(), this.segments.destroy(), this.vertexBuffer = null, this.indexBuffer = null, this.segments = null - } - } - var ui = o.aJ([{ - name: "a_pos", - type: "Int16", - components: 2 - }]); - const Jr = "#define PROJECTION_MERCATOR", - ti = "mercator"; - class yr { - constructor() { - this._cachedMesh = null - } - get name() { - return "mercator" - } - get useSubdivision() { - return !1 - } - get shaderVariantName() { - return ti - } - get shaderDefine() { - return Jr - } - get shaderPreludeCode() { - return pi.projectionMercator - } - get vertexShaderPreludeCode() { - return pi.projectionMercator.vertexSource - } - get subdivisionGranularity() { - return o.aK.noSubdivision - } - get useGlobeControls() { - return !1 - } - get transitionState() { - return 0 - } - get latitudeErrorCorrectionRadians() { - return 0 - } - destroy() {} - updateGPUdependent(e) {} - getMeshFromTileID(e, n, s, u, d) { - if (this._cachedMesh) return this._cachedMesh; - const m = new o.aL; - m.emplaceBack(0, 0), m.emplaceBack(o.$, 0), m.emplaceBack(0, o.$), m.emplaceBack(o.$, o.$); - const y = e.createVertexBuffer(m, ui.members), - w = o.aM.simpleSegment(0, 0, 4, 2), - P = new o.aN; - P.emplaceBack(1, 0, 2), P.emplaceBack(1, 2, 3); - const M = e.createIndexBuffer(P); - return this._cachedMesh = new Ri(y, M, w), this._cachedMesh - } - recalculate() {} - hasTransition() { - return !1 - } - setErrorQueryLatitudeDegrees(e) {} - } - class on { - constructor(e = 0, n = 0, s = 0, u = 0) { - if (isNaN(e) || e < 0 || isNaN(n) || n < 0 || isNaN(s) || s < 0 || isNaN(u) || u < 0) throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers"); - this.top = e, this.bottom = n, this.left = s, this.right = u - } - interpolate(e, n, s) { - return n.top != null && e.top != null && (this.top = o.C.number(e.top, n.top, s)), n.bottom != null && e.bottom != null && (this.bottom = o.C.number(e.bottom, n.bottom, s)), n.left != null && e.left != null && (this.left = o.C.number(e.left, n.left, s)), n.right != null && e.right != null && (this.right = o.C.number(e.right, n.right, s)), this - } - getCenter(e, n) { - const s = o.ah((this.left + e - this.right) / 2, 0, e), - u = o.ah((this.top + n - this.bottom) / 2, 0, n); - return new o.P(s, u) - } - equals(e) { - return this.top === e.top && this.bottom === e.bottom && this.left === e.left && this.right === e.right - } - clone() { - return new on(this.top, this.bottom, this.left, this.right) - } - toJSON() { - return { - top: this.top, - bottom: this.bottom, - left: this.left, - right: this.right - } - } - } - - function vn(h, e) { - if (!h.renderWorldCopies || h.lngRange) return; - const n = e.lng - h.center.lng; - e.lng += n > 180 ? -360 : n < -180 ? 360 : 0 - } - - function _a(h) { - return Math.max(0, Math.floor(h)) - } - class ln { - constructor(e, n, s, u, d, m) { - this._callbacks = e, this._tileSize = 512, this._renderWorldCopies = m === void 0 || !!m, this._minZoom = n || 0, this._maxZoom = s || 22, this._minPitch = u ?? 0, this._maxPitch = d ?? 60, this.setMaxBounds(), this._width = 0, this._height = 0, this._center = new o.S(0, 0), this._elevation = 0, this._zoom = 0, this._tileZoom = _a(this._zoom), this._scale = o.af(this._zoom), this._bearingInRadians = 0, this._fovInRadians = .6435011087932844, this._pitchInRadians = 0, this._rollInRadians = 0, this._unmodified = !0, this._edgeInsets = new on, this._minElevationForCurrentTile = 0, this._autoCalculateNearFarZ = !0 - } - apply(e, n, s) { - this._latRange = e.latRange, this._lngRange = e.lngRange, this._width = e.width, this._height = e.height, this._center = e.center, this._elevation = e.elevation, this._minElevationForCurrentTile = e.minElevationForCurrentTile, this._zoom = e.zoom, this._tileZoom = _a(this._zoom), this._scale = o.af(this._zoom), this._bearingInRadians = e.bearingInRadians, this._fovInRadians = e.fovInRadians, this._pitchInRadians = e.pitchInRadians, this._rollInRadians = e.rollInRadians, this._unmodified = e.unmodified, this._edgeInsets = new on(e.padding.top, e.padding.bottom, e.padding.left, e.padding.right), this._minZoom = e.minZoom, this._maxZoom = e.maxZoom, this._minPitch = e.minPitch, this._maxPitch = e.maxPitch, this._renderWorldCopies = e.renderWorldCopies, this._cameraToCenterDistance = e.cameraToCenterDistance, this._nearZ = e.nearZ, this._farZ = e.farZ, this._autoCalculateNearFarZ = !s && e.autoCalculateNearFarZ, n && this._constrain(), this._calcMatrices() - } - get pixelsToClipSpaceMatrix() { - return this._pixelsToClipSpaceMatrix - } - get clipSpaceToPixelsMatrix() { - return this._clipSpaceToPixelsMatrix - } - get minElevationForCurrentTile() { - return this._minElevationForCurrentTile - } - setMinElevationForCurrentTile(e) { - this._minElevationForCurrentTile = e - } - 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(e) { - this._minZoom !== e && (this._minZoom = e, this.setZoom(this.getConstrained(this._center, this.zoom).zoom)) - } - get maxZoom() { - return this._maxZoom - } - setMaxZoom(e) { - this._maxZoom !== e && (this._maxZoom = e, this.setZoom(this.getConstrained(this._center, this.zoom).zoom)) - } - get minPitch() { - return this._minPitch - } - setMinPitch(e) { - this._minPitch !== e && (this._minPitch = e, this.setPitch(Math.max(this.pitch, e))) - } - get maxPitch() { - return this._maxPitch - } - setMaxPitch(e) { - this._maxPitch !== e && (this._maxPitch = e, this.setPitch(Math.min(this.pitch, e))) - } - get renderWorldCopies() { - return this._renderWorldCopies - } - setRenderWorldCopies(e) { - e === void 0 ? e = !0 : e === null && (e = !1), this._renderWorldCopies = e - } - get worldSize() { - return this._tileSize * this._scale - } - get centerOffset() { - return this.centerPoint._sub(this.size._div(2)) - } - get size() { - return new o.P(this._width, this._height) - } - get bearing() { - return this._bearingInRadians / Math.PI * 180 - } - setBearing(e) { - const n = o.aO(e, -180, 180) * Math.PI / 180; - var s, u, d, m, y, w, P, M, D; - this._bearingInRadians !== n && (this._unmodified = !1, this._bearingInRadians = n, this._calcMatrices(), this._rotationMatrix = W(), s = this._rotationMatrix, d = -this._bearingInRadians, m = (u = this._rotationMatrix)[0], y = u[1], w = u[2], P = u[3], M = Math.sin(d), D = Math.cos(d), s[0] = m * D + w * M, s[1] = y * D + P * M, s[2] = m * -M + w * D, s[3] = y * -M + P * D) - } - get rotationMatrix() { - return this._rotationMatrix - } - get pitchInRadians() { - return this._pitchInRadians - } - get pitch() { - return this._pitchInRadians / Math.PI * 180 - } - setPitch(e) { - const n = o.ah(e, this.minPitch, this.maxPitch) / 180 * Math.PI; - this._pitchInRadians !== n && (this._unmodified = !1, this._pitchInRadians = n, this._calcMatrices()) - } - get rollInRadians() { - return this._rollInRadians - } - get roll() { - return this._rollInRadians / Math.PI * 180 - } - setRoll(e) { - const n = e / 180 * Math.PI; - this._rollInRadians !== n && (this._unmodified = !1, this._rollInRadians = n, this._calcMatrices()) - } - get fovInRadians() { - return this._fovInRadians - } - get fov() { - return o.aP(this._fovInRadians) - } - setFov(e) { - e = o.ah(e, .1, 150), this.fov !== e && (this._unmodified = !1, this._fovInRadians = o.ae(e), this._calcMatrices()) - } - get zoom() { - return this._zoom - } - setZoom(e) { - const n = this.getConstrained(this._center, e).zoom; - this._zoom !== n && (this._unmodified = !1, this._zoom = n, this._tileZoom = Math.max(0, Math.floor(n)), this._scale = o.af(n), this._constrain(), this._calcMatrices()) - } - get center() { - return this._center - } - setCenter(e) { - e.lat === this._center.lat && e.lng === this._center.lng || (this._unmodified = !1, this._center = e, this._constrain(), this._calcMatrices()) - } - get elevation() { - return this._elevation - } - setElevation(e) { - e !== this._elevation && (this._elevation = e, this._constrain(), this._calcMatrices()) - } - get padding() { - return this._edgeInsets.toJSON() - } - setPadding(e) { - this._edgeInsets.equals(e) || (this._unmodified = !1, this._edgeInsets.interpolate(this._edgeInsets, e, 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(e, n) { - this._autoCalculateNearFarZ = !1, this._nearZ = e, this._farZ = n, this._calcMatrices() - } - clearNearFarZOverride() { - this._autoCalculateNearFarZ = !0, this._calcMatrices() - } - isPaddingEqual(e) { - return this._edgeInsets.equals(e) - } - interpolatePadding(e, n, s) { - this._unmodified = !1, this._edgeInsets.interpolate(e, n, s), this._constrain(), this._calcMatrices() - } - resize(e, n, s = !0) { - this._width = e, this._height = n, s && this._constrain(), this._calcMatrices() - } - getMaxBounds() { - return this._latRange && this._latRange.length === 2 && this._lngRange && this._lngRange.length === 2 ? new dt([this._lngRange[0], this._latRange[0]], [this._lngRange[1], this._latRange[1]]) : null - } - setMaxBounds(e) { - e ? (this._lngRange = [e.getWest(), e.getEast()], this._latRange = [e.getSouth(), e.getNorth()], this._constrain()) : (this._lngRange = null, this._latRange = [-o.ai, o.ai]) - } - getConstrained(e, n) { - return this._callbacks.getConstrained(e, n) - } - getCameraQueryGeometry(e, n) { - if (n.length === 1) return [n[0], e]; - { - const { - minX: s, - minY: u, - maxX: d, - maxY: m - } = o.a2.fromPoints(n).extend(e); - return [new o.P(s, u), new o.P(d, u), new o.P(d, m), new o.P(s, m), new o.P(s, u)] - } - } - _constrain() { - if (!this.center || !this._width || !this._height || this._constraining) return; - this._constraining = !0; - const e = this._unmodified, - { - center: n, - zoom: s - } = this.getConstrained(this.center, this.zoom); - this.setCenter(n), this.setZoom(s), this._unmodified = e, this._constraining = !1 - } - _calcMatrices() { - if (this._width && this._height) { - this._pixelsToGLUnits = [2 / this._width, -2 / this._height]; - let e = o.ag(new Float64Array(16)); - o.N(e, e, [this._width / 2, -this._height / 2, 1]), o.M(e, e, [1, -1, 0]), this._clipSpaceToPixelsMatrix = e, e = o.ag(new Float64Array(16)), o.N(e, e, [1, -1, 1]), o.M(e, e, [-1, -1, 0]), o.N(e, e, [2 / this._width, 2 / this._height, 1]), this._pixelsToClipSpaceMatrix = e, this._cameraToCenterDistance = .5 / Math.tan(this.fovInRadians / 2) * this._height - } - this._callbacks.calcMatrices() - } - calculateCenterFromCameraLngLatAlt(e, n, s, u) { - const d = s !== void 0 ? s : this.bearing, - m = u = u !== void 0 ? u : this.pitch, - y = o.a1.fromLngLat(e, n), - w = -Math.cos(o.ae(m)), - P = Math.sin(o.ae(m)), - M = P * Math.sin(o.ae(d)), - D = -P * Math.cos(o.ae(d)); - let z = this.elevation; - const B = n - z; - let U; - w * B >= 0 || Math.abs(w) < .1 ? (U = 1e4, z = n + U * w) : U = -B / w; - let ee, J, re = o.aQ(1, y.y), - se = 0; - do { - if (se += 1, se > 10) break; - J = U / re, ee = new o.a1(y.x + M * J, y.y + D * J), re = 1 / ee.meterInMercatorCoordinateUnits() - } while (Math.abs(U - J * re) > 1e-12); - return { - center: ee.toLngLat(), - elevation: z, - zoom: o.ak(this.height / 2 / Math.tan(this.fovInRadians / 2) / J / this.tileSize) - } - } - recalculateZoomAndCenter(e) { - if (this.elevation - e == 0) return; - const n = o.aj(1, this.center.lat) * this.worldSize, - s = this.cameraToCenterDistance / n, - u = o.a1.fromLngLat(this.center, this.elevation), - d = Le(this.center, this.elevation, this.pitch, this.bearing, s); - this._elevation = e; - const m = this.calculateCenterFromCameraLngLatAlt(d.toLngLat(), o.aQ(d.z, u.y), this.bearing, this.pitch); - this._elevation = m.elevation, this._center = m.center, this.setZoom(m.zoom) - } - getCameraPoint() { - const e = Math.tan(this.pitchInRadians) * (this.cameraToCenterDistance || 1); - return this.centerPoint.add(new o.P(e * Math.sin(this.rollInRadians), e * Math.cos(this.rollInRadians))) - } - getCameraAltitude() { - return Math.cos(this.pitchInRadians) * this._cameraToCenterDistance / this._pixelPerMeter + this.elevation - } - getCameraLngLat() { - const e = o.aj(1, this.center.lat) * this.worldSize; - return Le(this.center, this.elevation, this.pitch, this.bearing, this.cameraToCenterDistance / e).toLngLat() - } - getMercatorTileCoordinates(e) { - if (!e) return [0, 0, 1, 1]; - const n = e.canonical.z >= 0 ? 1 << e.canonical.z : Math.pow(2, e.canonical.z); - return [e.canonical.x / n, e.canonical.y / n, 1 / n / o.$, 1 / n / o.$] - } - } - class Ki { - constructor(e, n) { - this.min = e, this.max = n, this.center = o.aR([], o.aS([], this.min, this.max), .5) - } - quadrant(e) { - const n = [e % 2 == 0, e < 2], - s = o.aT(this.min), - u = o.aT(this.max); - for (let d = 0; d < n.length; d++) s[d] = n[d] ? this.min[d] : this.center[d], u[d] = n[d] ? this.center[d] : this.max[d]; - return u[2] = this.max[2], new Ki(s, u) - } - distanceX(e) { - return Math.max(Math.min(this.max[0], e[0]), this.min[0]) - e[0] - } - distanceY(e) { - return Math.max(Math.min(this.max[1], e[1]), this.min[1]) - e[1] - } - intersectsFrustum(e) { - let n = !0; - for (let s = 0; s < e.planes.length; s++) { - const u = this.intersectsPlane(e.planes[s]); - if (u === 0) return 0; - u === 1 && (n = !1) - } - return n ? 2 : e.aabb.min[0] > this.max[0] || e.aabb.min[1] > this.max[1] || e.aabb.min[2] > this.max[2] || e.aabb.max[0] < this.min[0] || e.aabb.max[1] < this.min[1] || e.aabb.max[2] < this.min[2] ? 0 : 1 - } - intersectsPlane(e) { - let n = e[3], - s = e[3]; - for (let u = 0; u < 3; u++) e[u] > 0 ? (n += e[u] * this.min[u], s += e[u] * this.max[u]) : (s += e[u] * this.min[u], n += e[u] * this.max[u]); - return n >= 0 ? 2 : s < 0 ? 0 : 1 - } - } - class cn { - distanceToTile2d(e, n, s, u) { - const d = u.distanceX([e, n]), - m = u.distanceY([e, n]); - return Math.hypot(d, m) - } - getWrap(e, n, s) { - return s - } - getTileBoundingVolume(e, n, s, u) { - var d, m; - let y = 0, - w = 0; - if (u != null && u.terrain) { - const M = new o.Z(e.z, n, e.z, e.x, e.y), - D = u.terrain.getMinMaxElevation(M); - y = (d = D.minElevation) !== null && d !== void 0 ? d : Math.min(0, s), w = (m = D.maxElevation) !== null && m !== void 0 ? m : Math.max(0, s) - } - const P = 1 << e.z; - return new Ki([n + e.x / P, e.y / P, y], [n + (e.x + 1) / P, (e.y + 1) / P, w]) - } - allowVariableZoom(e, n) { - const s = e.fov * (Math.abs(Math.cos(e.rollInRadians)) * e.height + Math.abs(Math.sin(e.rollInRadians)) * e.width) / e.height, - u = o.ah(78.5 - s / 2, 0, 60); - return !!n.terrain || e.pitch > u - } - allowWorldCopies() { - return !0 - } - prepareNextFrame() {} - } - class Ni { - constructor(e, n, s) { - this.points = e, this.planes = n, this.aabb = s - } - static fromInvProjectionMatrix(e, n = 1, s = 0, u, d) { - const m = d ? [ - [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] - ], - y = Math.pow(2, s), - w = [ - [-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((z => (function(B, U, ee, J) { - const re = o.aw([], B, U), - se = 1 / re[3] / ee * J; - return o.aY(re, re, [se, se, 1 / re[3], se]) - })(z, e, n, y))); - u && (function(z, B, U, ee) { - const J = ee ? 4 : 0, - re = ee ? 0 : 4; - let se = 0; - const de = [], - ue = []; - for (let he = 0; he < 4; he++) { - const De = o.aU([], z[he + re], z[he + J]), - He = o.aZ(De); - o.aR(De, De, 1 / He), de.push(He), ue.push(De) - } - for (let he = 0; he < 4; he++) { - const De = o.a_(z[he + J], ue[he], U); - se = De !== null && De >= 0 ? Math.max(se, De) : Math.max(se, de[he]) - } - const ge = (function(he, De) { - const He = o.aU([], he[De[0]], he[De[1]]), - je = o.aU([], he[De[2]], he[De[1]]), - qe = [0, 0, 0, 0]; - return o.aV(qe, o.aW([], He, je)), qe[3] = -o.aX(qe, he[De[0]]), qe - })(z, B), - Te = (function(he, De) { - const He = o.a$(he), - je = o.b0([], he, 1 / He), - qe = o.aU([], De, o.aR([], je, o.aX(De, je))), - $e = o.a$(qe); - if ($e > 0) { - const Rt = Math.sqrt(1 - je[3] * je[3]), - Nt = o.aR([], je, -je[3]), - yt = o.aS([], Nt, o.aR([], qe, Rt / $e)); - return o.b1(De, yt) - } - return null - })(U, ge); - if (Te !== null) { - const he = Te / o.aX(ue[0], ge); - se = Math.min(se, he) - } - for (let he = 0; he < 4; he++) { - const De = Math.min(se, de[he]); - z[he + re] = [z[he + J][0] + ue[he][0] * De, z[he + J][1] + ue[he][1] * De, z[he + J][2] + ue[he][2] * De, 1] - } - })(w, m[0], u, d); - const P = m.map((z => { - const B = o.aU([], w[z[0]], w[z[1]]), - U = o.aU([], w[z[2]], w[z[1]]), - ee = o.aV([], o.aW([], B, U)), - J = -o.aX(ee, w[z[1]]); - return ee.concat(J) - })), - M = [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY], - D = [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY]; - for (const z of w) - for (let B = 0; B < 3; B++) M[B] = Math.min(M[B], z[B]), D[B] = Math.max(D[B], z[B]); - return new Ni(w, P, new Ki(M, D)) - } - } - class wi { - 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(e) { - this._helper.setMinZoom(e) - } - setMaxZoom(e) { - this._helper.setMaxZoom(e) - } - setMinPitch(e) { - this._helper.setMinPitch(e) - } - setMaxPitch(e) { - this._helper.setMaxPitch(e) - } - setRenderWorldCopies(e) { - this._helper.setRenderWorldCopies(e) - } - setBearing(e) { - this._helper.setBearing(e) - } - setPitch(e) { - this._helper.setPitch(e) - } - setRoll(e) { - this._helper.setRoll(e) - } - setFov(e) { - this._helper.setFov(e) - } - setZoom(e) { - this._helper.setZoom(e) - } - setCenter(e) { - this._helper.setCenter(e) - } - setElevation(e) { - this._helper.setElevation(e) - } - setMinElevationForCurrentTile(e) { - this._helper.setMinElevationForCurrentTile(e) - } - setPadding(e) { - this._helper.setPadding(e) - } - interpolatePadding(e, n, s) { - return this._helper.interpolatePadding(e, n, s) - } - isPaddingEqual(e) { - return this._helper.isPaddingEqual(e) - } - resize(e, n, s = !0) { - this._helper.resize(e, n, s) - } - getMaxBounds() { - return this._helper.getMaxBounds() - } - setMaxBounds(e) { - this._helper.setMaxBounds(e) - } - overrideNearFarZ(e, n) { - this._helper.overrideNearFarZ(e, n) - } - clearNearFarZOverride() { - this._helper.clearNearFarZOverride() - } - getCameraQueryGeometry(e) { - return this._helper.getCameraQueryGeometry(this.getCameraPoint(), e) - } - 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 nearZ() { - return this._helper.nearZ - } - get farZ() { - return this._helper.farZ - } - get autoCalculateNearFarZ() { - return this._helper.autoCalculateNearFarZ - } - setTransitionState(e, n) {} - constructor(e, n, s, u, d) { - this._posMatrixCache = new Map, this._alignedPosMatrixCache = new Map, this._fogMatrixCacheF32 = new Map, this._helper = new ln({ - calcMatrices: () => { - this._calcMatrices() - }, - getConstrained: (m, y) => this.getConstrained(m, y) - }, e, n, s, u, d), this._coveringTilesDetailsProvider = new cn - } - clone() { - const e = new wi; - return e.apply(this), e - } - apply(e, n, s) { - this._helper.apply(e, n, s) - } - 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(e) { - const n = [new o.b2(0, e)]; - if (this._helper._renderWorldCopies) { - const s = this.screenPointToMercatorCoordinate(new o.P(0, 0)), - u = this.screenPointToMercatorCoordinate(new o.P(this._helper._width, 0)), - d = this.screenPointToMercatorCoordinate(new o.P(this._helper._width, this._helper._height)), - m = this.screenPointToMercatorCoordinate(new o.P(0, this._helper._height)), - y = Math.floor(Math.min(s.x, u.x, d.x, m.x)), - w = Math.floor(Math.max(s.x, u.x, d.x, m.x)), - P = 1; - for (let M = y - P; M <= w + P; M++) M !== 0 && n.push(new o.b2(M, e)) - } - return n - } - getCameraFrustum() { - return Ni.fromInvProjectionMatrix(this._invViewProjMatrix, this.worldSize) - } - getClippingPlane() { - return null - } - getCoveringTilesDetailsProvider() { - return this._coveringTilesDetailsProvider - } - recalculateZoomAndCenter(e) { - const n = this.screenPointToLocation(this.centerPoint, e), - s = e ? e.getElevationForLngLatZoom(n, this._helper._tileZoom) : 0; - this._helper.recalculateZoomAndCenter(s) - } - setLocationAtPoint(e, n) { - const s = o.aj(this.elevation, this.center.lat), - u = this.screenPointToMercatorCoordinateAtZ(n, s), - d = this.screenPointToMercatorCoordinateAtZ(this.centerPoint, s), - m = o.a1.fromLngLat(e), - y = new o.a1(m.x - (u.x - d.x), m.y - (u.y - d.y)); - this.setCenter(y == null ? void 0 : y.toLngLat()), this._helper._renderWorldCopies && this.setCenter(this.center.wrap()) - } - locationToScreenPoint(e, n) { - return n ? this.coordinatePoint(o.a1.fromLngLat(e), n.getElevationForLngLatZoom(e, this._helper._tileZoom), this._pixelMatrix3D) : this.coordinatePoint(o.a1.fromLngLat(e)) - } - screenPointToLocation(e, n) { - var s; - return (s = this.screenPointToMercatorCoordinate(e, n)) === null || s === void 0 ? void 0 : s.toLngLat() - } - screenPointToMercatorCoordinate(e, n) { - if (n) { - const s = n.pointCoordinate(e); - if (s != null) return s - } - return this.screenPointToMercatorCoordinateAtZ(e) - } - screenPointToMercatorCoordinateAtZ(e, n) { - const s = n || 0, - u = [e.x, e.y, 0, 1], - d = [e.x, e.y, 1, 1]; - o.aw(u, u, this._pixelMatrixInverse), o.aw(d, d, this._pixelMatrixInverse); - const m = u[3], - y = d[3], - w = u[1] / m, - P = d[1] / y, - M = u[2] / m, - D = d[2] / y, - z = M === D ? 0 : (s - M) / (D - M); - return new o.a1(o.C.number(u[0] / m, d[0] / y, z) / this.worldSize, o.C.number(w, P, z) / this.worldSize, s) - } - coordinatePoint(e, n = 0, s = this._pixelMatrix) { - const u = [e.x * this.worldSize, e.y * this.worldSize, n, 1]; - return o.aw(u, u, s), new o.P(u[0] / u[3], u[1] / u[3]) - } - getBounds() { - const e = Math.max(0, this._helper._height / 2 - le(this)); - return new dt().extend(this.screenPointToLocation(new o.P(0, e))).extend(this.screenPointToLocation(new o.P(this._helper._width, e))).extend(this.screenPointToLocation(new o.P(this._helper._width, this._helper._height))).extend(this.screenPointToLocation(new o.P(0, this._helper._height))) - } - isPointOnMapSurface(e, n) { - return n ? n.pointCoordinate(e) != null : e.y > this.height / 2 - le(this) - } - calculatePosMatrix(e, n = !1, s) { - var u; - const d = (u = e.key) !== null && u !== void 0 ? u : o.b3(e.wrap, e.canonical.z, e.canonical.z, e.canonical.x, e.canonical.y), - m = n ? this._alignedPosMatrixCache : this._posMatrixCache; - if (m.has(d)) { - const P = m.get(d); - return s ? P.f32 : P.f64 - } - const y = ve(e, this.worldSize); - o.O(y, n ? this._alignedProjMatrix : this._viewProjMatrix, y); - const w = { - f64: y, - f32: new Float32Array(y) - }; - return m.set(d, w), s ? w.f32 : w.f64 - } - calculateFogMatrix(e) { - const n = e.key, - s = this._fogMatrixCacheF32; - if (s.has(n)) return s.get(n); - const u = ve(e, this.worldSize); - return o.O(u, this._fogMatrix, u), s.set(n, new Float32Array(u)), s.get(n) - } - getConstrained(e, n) { - n = o.ah(+n, this.minZoom, this.maxZoom); - const s = { - center: new o.S(e.lng, e.lat), - zoom: n - }; - let u = this._helper._lngRange; - if (!this._helper._renderWorldCopies && u === null) { - const de = 179.9999999999; - u = [-de, de] - } - const d = this.tileSize * o.af(s.zoom); - let m = 0, - y = d, - w = 0, - P = d, - M = 0, - D = 0; - const { - x: z, - y: B - } = this.size; - if (this._helper._latRange) { - const de = this._helper._latRange; - m = o.U(de[1]) * d, y = o.U(de[0]) * d, y - m < B && (M = B / (y - m)) - } - u && (w = o.aO(o.V(u[0]) * d, 0, d), P = o.aO(o.V(u[1]) * d, 0, d), P < w && (P += d), P - w < z && (D = z / (P - w))); - const { - x: U, - y: ee - } = G(d, e); - let J, re; - const se = Math.max(D || 0, M || 0); - if (se) { - const de = new o.P(D ? (P + w) / 2 : U, M ? (y + m) / 2 : ee); - return s.center = K(d, de).wrap(), s.zoom += o.ak(se), s - } - if (this._helper._latRange) { - const de = B / 2; - ee - de < m && (re = m + de), ee + de > y && (re = y - de) - } - if (u) { - const de = (w + P) / 2; - let ue = U; - this._helper._renderWorldCopies && (ue = o.aO(U, de - d / 2, de + d / 2)); - const ge = z / 2; - ue - ge < w && (J = w + ge), ue + ge > P && (J = P - ge) - } - if (J !== void 0 || re !== void 0) { - const de = new o.P(J ?? U, re ?? ee); - s.center = K(d, de).wrap() - } - return s - } - calculateCenterFromCameraLngLatAlt(e, n, s, u) { - return this._helper.calculateCenterFromCameraLngLatAlt(e, n, s, u) - } - _calculateNearFarZIfNeeded(e, n, s) { - if (!this._helper.autoCalculateNearFarZ) return; - const u = Math.min(this.elevation, this.minElevationForCurrentTile, this.getCameraAltitude() - 100), - d = e - u * this._helper._pixelPerMeter / Math.cos(n), - m = u < 0 ? d : e, - y = Math.PI / 2 + this.pitchInRadians, - w = o.ae(this.fov) * (Math.abs(Math.cos(o.ae(this.roll))) * this.height + Math.abs(Math.sin(o.ae(this.roll))) * this.width) / this.height * (.5 + s.y / this.height), - P = Math.sin(w) * m / Math.sin(o.ah(Math.PI - y - w, .01, Math.PI - .01)), - M = le(this), - D = Math.atan(M / this._helper.cameraToCenterDistance), - z = o.ae(.75), - B = D > z ? 2 * D * (.5 + s.y / (2 * M)) : z, - U = Math.sin(B) * m / Math.sin(o.ah(Math.PI - y - B, .01, Math.PI - .01)), - ee = Math.min(P, U); - this._helper._farZ = 1.01 * (Math.cos(Math.PI / 2 - n) * ee + m), this._helper._nearZ = this._helper._height / 50 - } - _calcMatrices() { - if (!this._helper._height) return; - const e = this.centerOffset, - n = G(this.worldSize, this.center), - s = n.x, - u = n.y; - this._helper._pixelPerMeter = o.aj(1, this.center.lat) * this.worldSize; - const d = o.ae(Math.min(this.pitch, q)), - m = Math.max(this._helper.cameraToCenterDistance / 2, this._helper.cameraToCenterDistance + this._helper._elevation * this._helper._pixelPerMeter / Math.cos(d)); - let y; - this._calculateNearFarZIfNeeded(m, d, e), y = new Float64Array(16), o.b4(y, this.fovInRadians, this._helper._width / this._helper._height, this._helper._nearZ, this._helper._farZ), this._invProjMatrix = new Float64Array(16), o.aq(this._invProjMatrix, y), y[8] = 2 * -e.x / this._helper._width, y[9] = 2 * e.y / this._helper._height, this._projectionMatrix = o.b5(y), o.N(y, y, [1, -1, 1]), o.M(y, y, [0, 0, -this._helper.cameraToCenterDistance]), o.b6(y, y, -this.rollInRadians), o.b7(y, y, this.pitchInRadians), o.b6(y, y, -this.bearingInRadians), o.M(y, y, [-s, -u, 0]), this._mercatorMatrix = o.N([], y, [this.worldSize, this.worldSize, this.worldSize]), o.N(y, y, [1, 1, this._helper._pixelPerMeter]), this._pixelMatrix = o.O(new Float64Array(16), this.clipSpaceToPixelsMatrix, y), o.M(y, y, [0, 0, -this.elevation]), this._viewProjMatrix = y, this._invViewProjMatrix = o.aq([], y); - const w = [0, 0, -1, 1]; - o.aw(w, w, this._invViewProjMatrix), this._cameraPosition = [w[0] / w[3], w[1] / w[3], w[2] / w[3]], this._fogMatrix = new Float64Array(16), o.b4(this._fogMatrix, this.fovInRadians, this.width / this.height, m, this._helper._farZ), this._fogMatrix[8] = 2 * -e.x / this.width, this._fogMatrix[9] = 2 * e.y / this.height, o.N(this._fogMatrix, this._fogMatrix, [1, -1, 1]), o.M(this._fogMatrix, this._fogMatrix, [0, 0, -this.cameraToCenterDistance]), o.b6(this._fogMatrix, this._fogMatrix, -this.rollInRadians), o.b7(this._fogMatrix, this._fogMatrix, this.pitchInRadians), o.b6(this._fogMatrix, this._fogMatrix, -this.bearingInRadians), o.M(this._fogMatrix, this._fogMatrix, [-s, -u, 0]), o.N(this._fogMatrix, this._fogMatrix, [1, 1, this._helper._pixelPerMeter]), o.M(this._fogMatrix, this._fogMatrix, [0, 0, -this.elevation]), this._pixelMatrix3D = o.O(new Float64Array(16), this.clipSpaceToPixelsMatrix, y); - const P = this._helper._width % 2 / 2, - M = this._helper._height % 2 / 2, - D = Math.cos(this.bearingInRadians), - z = Math.sin(-this.bearingInRadians), - B = s - Math.round(s) + D * P + z * M, - U = u - Math.round(u) + D * M + z * P, - ee = new Float64Array(y); - if (o.M(ee, ee, [B > .5 ? B - 1 : B, U > .5 ? U - 1 : U, 0]), this._alignedProjMatrix = ee, y = o.aq(new Float64Array(16), this._pixelMatrix), !y) throw new Error("failed to invert matrix"); - this._pixelMatrixInverse = y, this._clearMatrixCaches() - } - _clearMatrixCaches() { - this._posMatrixCache.clear(), this._alignedPosMatrixCache.clear(), this._fogMatrixCacheF32.clear() - } - maxPitchScaleFactor() { - if (!this._pixelMatrixInverse) return 1; - const e = this.screenPointToMercatorCoordinate(new o.P(0, 0)), - n = [e.x * this.worldSize, e.y * this.worldSize, 0, 1]; - return o.aw(n, n, this._pixelMatrix)[3] / this._helper.cameraToCenterDistance - } - getCameraPoint() { - return this._helper.getCameraPoint() - } - getCameraAltitude() { - return this._helper.getCameraAltitude() - } - getCameraLngLat() { - const e = o.aj(1, this.center.lat) * this.worldSize; - return Le(this.center, this.elevation, this.pitch, this.bearing, this._helper.cameraToCenterDistance / e).toLngLat() - } - lngLatToCameraDepth(e, n) { - const s = o.a1.fromLngLat(e), - u = [s.x * this.worldSize, s.y * this.worldSize, n, 1]; - return o.aw(u, u, this._viewProjMatrix), u[2] / u[3] - } - getProjectionData(e) { - const { - overscaledTileID: n, - aligned: s, - applyTerrainMatrix: u - } = e, d = this._helper.getMercatorTileCoordinates(n), m = n ? this.calculatePosMatrix(n, s, !0) : null; - let y; - return y = n && n.terrainRttPosMatrix32f && u ? n.terrainRttPosMatrix32f : m || o.b8(), { - mainMatrix: y, - tileMercatorCoords: d, - clippingPlane: [0, 0, 0, 0], - projectionTransition: 0, - fallbackMatrix: y - } - } - isLocationOccluded(e) { - return !1 - } - getPixelScale() { - return 1 - } - getCircleRadiusCorrection() { - return 1 - } - getPitchedTextCorrection(e, n, s) { - return 1 - } - transformLightDirection(e) { - return o.aT(e) - } - getRayDirectionFromPixel(e) { - throw new Error("Not implemented.") - } - projectTileCoordinates(e, n, s, u) { - const d = this.calculatePosMatrix(s); - let m; - u ? (m = [e, n, u(e, n), 1], o.aw(m, m, d)) : (m = [e, n, 0, 1], Li(m, m, d)); - const y = m[3]; - return { - point: new o.P(m[0] / y, m[1] / y), - signedDistanceFromCamera: y, - isOccluded: !1 - } - } - populateCache(e) { - for (const n of e) this.calculatePosMatrix(n) - } - getMatrixForModel(e, n) { - const s = o.a1.fromLngLat(e, n), - u = s.meterInMercatorCoordinateUnits(), - d = o.b9(); - return o.M(d, d, [s.x, s.y, s.z]), o.b6(d, d, Math.PI), o.b7(d, d, Math.PI / 2), o.N(d, d, [-u, u, u]), d - } - getProjectionDataForCustomLayer(e = !0) { - const n = new o.Z(0, 0, 0, 0, 0), - s = this.getProjectionData({ - overscaledTileID: n, - applyGlobeMatrix: e - }), - u = ve(n, this.worldSize); - o.O(u, this._viewProjMatrix, u), s.tileMercatorCoords = [0, 0, 1, 1]; - const d = [o.$, o.$, this.worldSize / this._helper.pixelsPerMeter], - m = o.ba(); - return o.N(m, u, d), s.fallbackMatrix = m, s.mainMatrix = m, s - } - getFastPathSimpleProjectionMatrix(e) { - return this.calculatePosMatrix(e) - } - } - - function Ko() { - o.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.") - } - - function un(h) { - if (h.useSlerp) - if (h.k < 1) { - const e = o.bb(h.startEulerAngles.roll, h.startEulerAngles.pitch, h.startEulerAngles.bearing), - n = o.bb(h.endEulerAngles.roll, h.endEulerAngles.pitch, h.endEulerAngles.bearing), - s = new Float64Array(4); - o.bc(s, e, n, h.k); - const u = o.bd(s); - h.tr.setRoll(u.roll), h.tr.setPitch(u.pitch), h.tr.setBearing(u.bearing) - } else h.tr.setRoll(h.endEulerAngles.roll), h.tr.setPitch(h.endEulerAngles.pitch), h.tr.setBearing(h.endEulerAngles.bearing); - else h.tr.setRoll(o.C.number(h.startEulerAngles.roll, h.endEulerAngles.roll, h.k)), h.tr.setPitch(o.C.number(h.startEulerAngles.pitch, h.endEulerAngles.pitch, h.k)), h.tr.setBearing(o.C.number(h.startEulerAngles.bearing, h.endEulerAngles.bearing, h.k)) - } - - function Nn(h, e, n, s, u) { - const d = u.padding, - m = G(u.worldSize, n.getNorthWest()), - y = G(u.worldSize, n.getNorthEast()), - w = G(u.worldSize, n.getSouthEast()), - P = G(u.worldSize, n.getSouthWest()), - M = o.ae(-s), - D = m.rotate(M), - z = y.rotate(M), - B = w.rotate(M), - U = P.rotate(M), - ee = new o.P(Math.max(D.x, z.x, U.x, B.x), Math.max(D.y, z.y, U.y, B.y)), - J = new o.P(Math.min(D.x, z.x, U.x, B.x), Math.min(D.y, z.y, U.y, B.y)), - re = ee.sub(J), - se = (u.width - (d.left + d.right + e.left + e.right)) / re.x, - de = (u.height - (d.top + d.bottom + e.top + e.bottom)) / re.y; - if (de < 0 || se < 0) return void Ko(); - const ue = Math.min(o.ak(u.scale * Math.min(se, de)), h.maxZoom), - ge = o.P.convert(h.offset), - Te = new o.P((e.left - e.right) / 2, (e.top - e.bottom) / 2).rotate(o.ae(s)), - he = ge.add(Te).mult(u.scale / o.af(ue)); - return { - center: K(u.worldSize, m.add(w).div(2).sub(he)), - zoom: ue, - bearing: s - } - } - class hn { - get useGlobeControls() { - return !1 - } - handlePanInertia(e, n) { - return { - easingOffset: e, - easingCenter: n.center - } - } - handleMapControlsRollPitchBearingZoom(e, n) { - e.bearingDelta && n.setBearing(n.bearing + e.bearingDelta), e.pitchDelta && n.setPitch(n.pitch + e.pitchDelta), e.rollDelta && n.setRoll(n.roll + e.rollDelta), e.zoomDelta && n.setZoom(n.zoom + e.zoomDelta) - } - handleMapControlsPan(e, n, s) { - e.around.distSqr(n.centerPoint) < .01 || n.setLocationAtPoint(s, e.around) - } - cameraForBoxAndBearing(e, n, s, u, d) { - return Nn(e, n, s, u, d) - } - handleJumpToCenterZoom(e, n) { - e.zoom !== (n.zoom !== void 0 ? +n.zoom : e.zoom) && e.setZoom(+n.zoom), n.center !== void 0 && e.setCenter(o.S.convert(n.center)) - } - handleEaseTo(e, n) { - const s = e.zoom, - u = e.padding, - d = { - roll: e.roll, - pitch: e.pitch, - bearing: e.bearing - }, - m = { - roll: n.roll === void 0 ? e.roll : n.roll, - pitch: n.pitch === void 0 ? e.pitch : n.pitch, - bearing: n.bearing === void 0 ? e.bearing : n.bearing - }, - y = n.zoom !== void 0, - w = !e.isPaddingEqual(n.padding); - let P = !1; - const M = y ? +n.zoom : e.zoom; - let D = e.centerPoint.add(n.offsetAsPoint); - const z = e.screenPointToLocation(D), - { - center: B, - zoom: U - } = e.getConstrained(o.S.convert(n.center || z), M ?? s); - vn(e, B); - const ee = G(e.worldSize, z), - J = G(e.worldSize, B).sub(ee), - re = o.af(U - s); - return P = U !== s, { - easeFunc: se => { - if (P && e.setZoom(o.C.number(s, U, se)), o.be(d, m) || un({ - startEulerAngles: d, - endEulerAngles: m, - tr: e, - k: se, - useSlerp: d.roll != m.roll - }), w && (e.interpolatePadding(u, n.padding, se), D = e.centerPoint.add(n.offsetAsPoint)), n.around) e.setLocationAtPoint(n.around, n.aroundPoint); - else { - const de = o.af(e.zoom - s), - ue = U > s ? Math.min(2, re) : Math.max(.5, re), - ge = Math.pow(ue, 1 - se), - Te = K(e.worldSize, ee.add(J.mult(se * ge)).mult(de)); - e.setLocationAtPoint(e.renderWorldCopies ? Te.wrap() : Te, D) - } - }, - isZooming: P, - elevationCenter: B - } - } - handleFlyTo(e, n) { - const s = n.zoom !== void 0, - u = e.zoom, - d = e.getConstrained(o.S.convert(n.center || n.locationAtOffset), s ? +n.zoom : u), - m = d.center, - y = d.zoom; - vn(e, m); - const w = G(e.worldSize, n.locationAtOffset), - P = G(e.worldSize, m).sub(w), - M = P.mag(), - D = o.af(y - u); - let z; - if (n.minZoom !== void 0) { - const B = Math.min(+n.minZoom, u, y), - U = e.getConstrained(m, B).zoom; - z = o.af(U - u) - } - return { - easeFunc: (B, U, ee, J) => { - e.setZoom(B === 1 ? y : u + o.ak(U)); - const re = B === 1 ? m : K(e.worldSize, w.add(P.mult(ee)).mult(U)); - e.setLocationAtPoint(e.renderWorldCopies ? re.wrap() : re, J) - }, - scaleOfZoom: D, - targetCenter: m, - scaleOfMinZoom: z, - pixelPathLength: M - } - } - } - class Ti { - constructor(e, n, s) { - this.blendFunction = e, this.blendColor = n, this.mask = s - } - } - Ti.Replace = [1, 0], Ti.disabled = new Ti(Ti.Replace, o.bf.transparent, [!1, !1, !1, !1]), Ti.unblended = new Ti(Ti.Replace, o.bf.transparent, [!0, !0, !0, !0]), Ti.alphaBlended = new Ti([1, 771], o.bf.transparent, [!0, !0, !0, !0]); - const Za = 2305; - class wr { - constructor(e, n, s) { - this.enable = e, this.mode = n, this.frontFace = s - } - } - wr.disabled = new wr(!1, 1029, Za), wr.backCCW = new wr(!0, 1029, Za), wr.frontCCW = new wr(!0, 1028, Za); - class Vr { - constructor(e, n, s) { - this.func = e, this.mask = n, this.range = s - } - } - Vr.ReadOnly = !1, Vr.ReadWrite = !0, Vr.disabled = new Vr(519, Vr.ReadOnly, [0, 1]); - const ga = 7680; - class hi { - constructor(e, n, s, u, d, m) { - this.test = e, this.ref = n, this.mask = s, this.fail = u, this.depthFail = d, this.pass = m - } - } - hi.disabled = new hi({ - func: 519, - mask: 0 - }, 0, 0, ga, ga, ga); - const ra = new WeakMap; - - function Ra(h) { - var e; - if (ra.has(h)) return ra.get(h); - { - const n = (e = h.getParameter(h.VERSION)) === null || e === void 0 ? void 0 : e.startsWith("WebGL 2.0"); - return ra.set(h, n), n - } - } - class Ba { - get awaitingQuery() { - return !!this._readbackQueue - } - constructor(e) { - 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 = e; - const n = e.context, - s = n.gl; - this._texFormat = s.RGBA, this._texType = s.UNSIGNED_BYTE; - const u = new o.aL; - u.emplaceBack(-1, -1), u.emplaceBack(2, -1), u.emplaceBack(-1, 2); - const d = new o.aN; - d.emplaceBack(0, 1, 2), this._fullscreenTriangle = new Ri(n.createVertexBuffer(u, ui.members), n.createIndexBuffer(d), o.aM.simpleSegment(0, 0, u.length, d.length)), this._resultBuffer = new Uint8Array(4), n.activeTexture.set(s.TEXTURE1); - const m = s.createTexture(); - s.bindTexture(s.TEXTURE_2D, m), s.texParameteri(s.TEXTURE_2D, s.TEXTURE_WRAP_S, s.CLAMP_TO_EDGE), s.texParameteri(s.TEXTURE_2D, s.TEXTURE_WRAP_T, s.CLAMP_TO_EDGE), s.texParameteri(s.TEXTURE_2D, s.TEXTURE_MIN_FILTER, s.NEAREST), s.texParameteri(s.TEXTURE_2D, s.TEXTURE_MAG_FILTER, s.NEAREST), s.texImage2D(s.TEXTURE_2D, 0, this._texFormat, this._texWidth, this._texHeight, 0, this._texFormat, this._texType, null), this._fbo = n.createFramebuffer(this._texWidth, this._texHeight, !1, !1), this._fbo.colorAttachment.set(m), Ra(s) && (this._pbo = s.createBuffer(), s.bindBuffer(s.PIXEL_PACK_BUFFER, this._pbo), s.bufferData(s.PIXEL_PACK_BUFFER, 4, s.STREAM_READ), s.bindBuffer(s.PIXEL_PACK_BUFFER, null)) - } - destroy() { - const e = this._cachedRenderContext.context.gl; - this._fullscreenTriangle.destroy(), this._fbo.destroy(), e.deleteBuffer(this._pbo), this._fullscreenTriangle = null, this._fbo = null, this._pbo = null, this._resultBuffer = null - } - updateErrorLoop(e, n) { - const s = this._updateCount; - return this._readbackQueue ? s >= this._readbackQueue.frameNumberIssued + this._readbackWaitFrames && this._tryReadback() : s >= this._lastReadbackFrame + this._measureWaitFrames && this._renderErrorTexture(e, n), this._updateCount++, this._measuredError - } - _bindFramebuffer() { - const e = this._cachedRenderContext.context, - n = e.gl; - e.activeTexture.set(n.TEXTURE1), n.bindTexture(n.TEXTURE_2D, this._fbo.colorAttachment.get()), e.bindFramebuffer.set(this._fbo.framebuffer) - } - _renderErrorTexture(e, n) { - const s = this._cachedRenderContext.context, - u = s.gl; - if (this._bindFramebuffer(), s.viewport.set([0, 0, this._texWidth, this._texHeight]), s.clear({ - color: o.bf.transparent - }), this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(s, u.TRIANGLES, Vr.disabled, hi.disabled, Ti.unblended, wr.disabled, ((d, m) => ({ - u_input: d, - u_output_expected: m - }))(e, n), null, null, "$clipping", this._fullscreenTriangle.vertexBuffer, this._fullscreenTriangle.indexBuffer, this._fullscreenTriangle.segments), this._pbo && Ra(u)) { - u.bindBuffer(u.PIXEL_PACK_BUFFER, this._pbo), u.readBuffer(u.COLOR_ATTACHMENT0), u.readPixels(0, 0, this._texWidth, this._texHeight, this._texFormat, this._texType, 0), u.bindBuffer(u.PIXEL_PACK_BUFFER, null); - const d = u.fenceSync(u.SYNC_GPU_COMMANDS_COMPLETE, 0); - u.flush(), this._readbackQueue = { - frameNumberIssued: this._updateCount, - sync: d - } - } else this._readbackQueue = { - frameNumberIssued: this._updateCount, - sync: null - } - } - _tryReadback() { - const e = this._cachedRenderContext.context.gl; - if (this._pbo && this._readbackQueue && Ra(e)) { - const n = e.clientWaitSync(this._readbackQueue.sync, 0, 0); - if (n === e.WAIT_FAILED) return o.w("WebGL2 clientWaitSync failed."), this._readbackQueue = null, void(this._lastReadbackFrame = this._updateCount); - if (n === e.TIMEOUT_EXPIRED) return; - e.bindBuffer(e.PIXEL_PACK_BUFFER, this._pbo), e.getBufferSubData(e.PIXEL_PACK_BUFFER, 0, this._resultBuffer, 0, 4), e.bindBuffer(e.PIXEL_PACK_BUFFER, null) - } else this._bindFramebuffer(), e.readPixels(0, 0, this._texWidth, this._texHeight, this._texFormat, this._texType, this._resultBuffer); - this._readbackQueue = null, this._measuredError = Ba._parseRGBA8float(this._resultBuffer), this._lastReadbackFrame = this._updateCount - } - static _parseRGBA8float(e) { - let n = 0; - return n += e[0] / 256, n += e[1] / 65536, n += e[2] / 16777216, e[3] < 127 && (n = -n), n / 128 - } - } - const Yo = o.$ / 128; - - function mc(h, e) { - const n = h.granularity !== void 0 ? Math.max(h.granularity, 1) : 1, - s = n + (h.generateBorders ? 2 : 0), - u = n + (h.extendToNorthPole || h.generateBorders ? 1 : 0) + (h.extendToSouthPole || h.generateBorders ? 1 : 0), - d = s + 1, - m = u + 1, - y = h.generateBorders ? -1 : 0, - w = h.generateBorders || h.extendToNorthPole ? -1 : 0, - P = n + (h.generateBorders ? 1 : 0), - M = n + (h.generateBorders || h.extendToSouthPole ? 1 : 0), - D = d * m, - z = s * u * 6, - B = d * m > 65536; - if (B && e === "16bit") throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices."); - const U = B || e === "32bit", - ee = new Int16Array(2 * D); - let J = 0; - for (let de = w; de <= M; de++) - for (let ue = y; ue <= P; ue++) { - let ge = ue / n * o.$; - ue === -1 && (ge = -Yo), ue === n + 1 && (ge = o.$ + Yo); - let Te = de / n * o.$; - de === -1 && (Te = h.extendToNorthPole ? o.bh : -Yo), de === n + 1 && (Te = h.extendToSouthPole ? o.bi : o.$ + Yo), ee[J++] = ge, ee[J++] = Te - } - const re = U ? new Uint32Array(z) : new Uint16Array(z); - let se = 0; - for (let de = 0; de < u; de++) - for (let ue = 0; ue < s; ue++) { - const ge = ue + 1 + de * d, - Te = ue + (de + 1) * d, - he = ue + 1 + (de + 1) * d; - re[se++] = ue + de * d, re[se++] = Te, re[se++] = ge, re[se++] = ge, re[se++] = Te, re[se++] = he - } - return { - vertices: ee.buffer.slice(0), - indices: re.buffer.slice(0), - uses32bitIndices: U - } - } - const Rs = new o.aK({ - fill: new o.bj(128, 2), - line: new o.bj(512, 0), - tile: new o.bj(128, 32), - stencil: new o.bj(128, 1), - circle: 3 - }); - class co { - 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 pi.projectionGlobe - } - get vertexShaderPreludeCode() { - return pi.projectionMercator.vertexSource - } - get subdivisionGranularity() { - return Rs - } - get useGlobeControls() { - return !0 - } - get latitudeErrorCorrectionRadians() { - return this._errorCorrectionUsable - } - destroy() { - this._errorMeasurement && this._errorMeasurement.destroy() - } - updateGPUdependent(e) { - this._errorMeasurement || (this._errorMeasurement = new Ba(e)); - const n = o.U(this._errorQueryLatitudeDegrees), - s = 2 * Math.atan(Math.exp(Math.PI - n * Math.PI * 2)) - .5 * Math.PI, - u = this._errorMeasurement.updateErrorLoop(n, s), - d = ye.now(); - u !== this._errorMeasurementLastValue && (this._errorCorrectionPreviousValue = this._errorCorrectionUsable, this._errorMeasurementLastValue = u, this._errorMeasurementLastChangeTime = d); - const m = Math.min(Math.max((d - this._errorMeasurementLastChangeTime) / 1e3 / .5, 0), 1); - this._errorCorrectionUsable = o.bk(this._errorCorrectionPreviousValue, -this._errorMeasurementLastValue, o.bl(m)) - } - _getMeshKey(e) { - return `${e.granularity.toString(36)}_${e.generateBorders?"b":""}${e.extendToNorthPole?"n":""}${e.extendToSouthPole?"s":""}` - } - getMeshFromTileID(e, n, s, u, d) { - const m = (d === "stencil" ? Rs.stencil : Rs.tile).getGranularityForZoomLevel(n.z); - return this._getMesh(e, { - granularity: m, - generateBorders: s, - extendToNorthPole: n.y === 0 && u, - extendToSouthPole: n.y === (1 << n.z) - 1 && u - }) - } - _getMesh(e, n) { - const s = this._getMeshKey(n); - if (s in this._tileMeshCache) return this._tileMeshCache[s]; - const u = (function(d, m) { - const y = mc(m, "16bit"), - w = o.aL.deserialize({ - arrayBuffer: y.vertices, - length: y.vertices.byteLength / 2 / 2 - }), - P = o.aN.deserialize({ - arrayBuffer: y.indices, - length: y.indices.byteLength / 2 / 3 - }); - return new Ri(d.createVertexBuffer(w, ui.members), d.createIndexBuffer(P), o.aM.simpleSegment(0, 0, w.length, P.length)) - })(e, n); - return this._tileMeshCache[s] = u, u - } - recalculate(e) {} - hasTransition() { - const e = ye.now(); - let n = !1; - return n = n || (e - this._errorMeasurementLastChangeTime) / 1e3 < .7, n = n || this._errorMeasurement && this._errorMeasurement.awaitingQuery, n - } - setErrorQueryLatitudeDegrees(e) { - this._errorQueryLatitudeDegrees = e - } - } - const Jo = new o.r({ - type: new o.D(o.v.projection.type) - }); - class Qo extends o.E { - constructor(e) { - super(), this._transitionable = new o.t(Jo), this.setProjection(e), this._transitioning = this._transitionable.untransitioned(), this.recalculate(new o.F(0)), this._mercatorProjection = new yr, this._verticalPerspectiveProjection = new co - } - get transitionState() { - const e = this.properties.get("type"); - if (typeof e == "string" && e === "mercator") return 0; - if (typeof e == "string" && e === "vertical-perspective") return 1; - if (e instanceof o.bm) { - if (e.from === "vertical-perspective" && e.to === "mercator") return 1 - e.transition; - if (e.from === "mercator" && e.to === "vertical-perspective") return e.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(e) { - this._mercatorProjection.updateGPUdependent(e), this._verticalPerspectiveProjection.updateGPUdependent(e) - } - getMeshFromTileID(e, n, s, u, d) { - return this.currentProjection.getMeshFromTileID(e, n, s, u, d) - } - setProjection(e) { - this._transitionable.setValue("type", (e == null ? void 0 : e.type) || "mercator") - } - updateTransitions(e) { - this._transitioning = this._transitionable.transitioned(e, this._transitioning) - } - hasTransition() { - return this._transitioning.hasTransition() || this.currentProjection.hasTransition() - } - recalculate(e) { - this.properties = this._transitioning.possiblyEvaluate(e) - } - setErrorQueryLatitudeDegrees(e) { - this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(e), this._mercatorProjection.setErrorQueryLatitudeDegrees(e) - } - } - - function el(h) { - const e = Bs(h.worldSize, h.center.lat); - return 2 * Math.PI * e - } - - function va(h, e, n, s, u) { - const d = 1 / (1 << u), - m = e / o.$ * d + s * d, - y = o.bo((h / o.$ * d + n * d) * Math.PI * 2 + Math.PI, 2 * Math.PI), - w = 2 * Math.atan(Math.exp(Math.PI - m * Math.PI * 2)) - .5 * Math.PI, - P = Math.cos(w), - M = new Float64Array(3); - return M[0] = Math.sin(y) * P, M[1] = Math.sin(w), M[2] = Math.cos(y) * P, M - } - - function yn(h) { - return (function(e, n) { - const s = Math.cos(n), - u = new Float64Array(3); - return u[0] = Math.sin(e) * s, u[1] = Math.sin(n), u[2] = Math.cos(e) * s, u - })(h.lng * Math.PI / 180, h.lat * Math.PI / 180) - } - - function Bs(h, e) { - return h / (2 * Math.PI) / Math.cos(e * Math.PI / 180) - } - - function uo(h) { - const e = Math.asin(h[1]) / Math.PI * 180, - n = Math.sqrt(h[0] * h[0] + h[2] * h[2]); - if (n > 1e-6) { - const s = h[0] / n, - u = Math.acos(h[2] / n), - d = (s > 0 ? u : -u) / Math.PI * 180; - return new o.S(o.aO(d, -180, 180), e) - } - return new o.S(0, e) - } - - function fs(h) { - return Math.cos(h * Math.PI / 180) - } - - function Gi(h, e) { - const n = fs(h), - s = fs(e); - return o.ak(s / n) - } - - function _h(h, e) { - const n = h.rotate(e.bearingInRadians), - s = e.zoom + Gi(e.center.lat, 0), - u = o.bk(1 / fs(e.center.lat), 1 / fs(Math.min(Math.abs(e.center.lat), 60)), o.bn(s, 7, 3, 0, 1)), - d = 360 / el({ - worldSize: e.worldSize, - center: { - lat: e.center.lat - } - }); - return new o.S(e.center.lng - n.x * d * u, o.ah(e.center.lat + n.y * d, -o.ai, o.ai)) - } - - function ho(h) { - const e = .5 * h, - n = Math.sin(e), - s = Math.cos(e); - return Math.log(n + s) - Math.log(s - n) - } - - function _c(h, e, n, s) { - const u = h.lat + n * s; - if (Math.abs(n) > 1) { - const d = (Math.sign(h.lat + n) !== Math.sign(h.lat) ? -Math.abs(h.lat) : Math.abs(h.lat)) * Math.PI / 180, - m = Math.abs(h.lat + n) * Math.PI / 180, - y = ho(d + s * (m - d)), - w = ho(d), - P = ho(m); - return new o.S(h.lng + e * ((y - w) / (P - w)), u) - } - return new o.S(h.lng + e * s, u) - } - class Yd { - constructor(e) { - this._cachePrevious = new Map, this._cache = new Map, this._hadAnyChanges = !1, this._boundingVolumeFactory = e - } - swapBuffers() { - if (!this._hadAnyChanges) return; - const e = this._cachePrevious; - this._cachePrevious = this._cache, this._cache = e, this._cache.clear(), this._hadAnyChanges = !1 - } - getTileBoundingVolume(e, n, s, u) { - const d = `${e.z}_${e.x}_${e.y}_${u!=null&&u.terrain?"t":""}`, - m = this._cache.get(d); - if (m) return m; - const y = this._cachePrevious.get(d); - if (y) return this._cache.set(d, y), y; - const w = this._boundingVolumeFactory(e, n, s, u); - return this._cache.set(d, w), this._hadAnyChanges = !0, w - } - } - class Fs { - constructor(e, n, s, u) { - this.min = s, this.max = u, this.points = e, this.planes = n - } - static fromAabb(e, n) { - const s = []; - for (let u = 0; u < 8; u++) s.push([1 & ~u ? e[0] : n[0], (u >> 1 & 1) == 1 ? n[1] : e[1], (u >> 2 & 1) == 1 ? n[2] : e[2]]); - return new Fs(s, [ - [-1, 0, 0, n[0]], - [1, 0, 0, -e[0]], - [0, -1, 0, n[1]], - [0, 1, 0, -e[1]], - [0, 0, -1, n[2]], - [0, 0, 1, -e[2]] - ], e, n) - } - static fromCenterSizeAngles(e, n, s) { - const u = o.br([], s[0], s[1], s[2]), - d = o.bs([], [n[0], 0, 0], u), - m = o.bs([], [0, n[1], 0], u), - y = o.bs([], [0, 0, n[2]], u), - w = [...e], - P = [...e]; - for (let D = 0; D < 8; D++) - for (let z = 0; z < 3; z++) { - const B = e[z] + d[z] * (1 & ~D ? -1 : 1) + m[z] * ((D >> 1 & 1) == 1 ? 1 : -1) + y[z] * ((D >> 2 & 1) == 1 ? 1 : -1); - w[z] = Math.min(w[z], B), P[z] = Math.max(P[z], B) - } - const M = []; - for (let D = 0; D < 8; D++) { - const z = [...e]; - o.aS(z, z, o.aR([], d, 1 & ~D ? -1 : 1)), o.aS(z, z, o.aR([], m, (D >> 1 & 1) == 1 ? 1 : -1)), o.aS(z, z, o.aR([], y, (D >> 2 & 1) == 1 ? 1 : -1)), M.push(z) - } - return new Fs(M, [ - [...d, -o.aX(d, M[0])], - [...m, -o.aX(m, M[0])], - [...y, -o.aX(y, M[0])], - [-d[0], -d[1], -d[2], -o.aX(d, M[7])], - [-m[0], -m[1], -m[2], -o.aX(m, M[7])], - [-y[0], -y[1], -y[2], -o.aX(y, M[7])] - ], w, P) - } - intersectsFrustum(e) { - let n = !0; - const s = this.points.length, - u = this.planes.length, - d = e.planes.length, - m = e.points.length; - for (let y = 0; y < d; y++) { - const w = e.planes[y]; - let P = 0; - for (let M = 0; M < s; M++) { - const D = this.points[M]; - w[0] * D[0] + w[1] * D[1] + w[2] * D[2] + w[3] >= 0 && P++ - } - if (P === 0) return 0; - P < s && (n = !1) - } - if (n) return 2; - for (let y = 0; y < u; y++) { - const w = this.planes[y]; - let P = 0; - for (let M = 0; M < m; M++) { - const D = e.points[M]; - w[0] * D[0] + w[1] * D[1] + w[2] * D[2] + w[3] >= 0 && P++ - } - if (P === 0) return 0 - } - return 1 - } - intersectsPlane(e) { - const n = this.points.length; - let s = 0; - for (let u = 0; u < n; u++) { - const d = this.points[u]; - e[0] * d[0] + e[1] * d[1] + e[2] * d[2] + e[3] >= 0 && s++ - } - return s === n ? 2 : s === 0 ? 0 : 1 - } - } - - function In(h, e, n) { - const s = h - e; - return s < 0 ? -s : Math.max(0, s - n) - } - - function po(h, e, n, s, u) { - const d = h - n; - let m; - return m = d < 0 ? Math.min(-d, 1 + d - u) : d > 1 ? Math.min(Math.max(d - u, 0), 1 - d) : 0, Math.max(m, In(e, s, u)) - } - class Fa { - constructor() { - this._boundingVolumeCache = new Yd(this._computeTileBoundingVolume) - } - prepareNextFrame() { - this._boundingVolumeCache.swapBuffers() - } - distanceToTile2d(e, n, s, u) { - const d = 1 << s.z, - m = 1 / d, - y = s.x / d, - w = s.y / d; - let P = 2; - return P = Math.min(P, po(e, n, y, w, m)), P = Math.min(P, po(e, n, y + .5, -w - m, m)), P = Math.min(P, po(e, n, y + .5, 2 - w - m, m)), P - } - getWrap(e, n, s) { - const u = 1 << n.z, - d = 1 / u, - m = n.x / u, - y = In(e.x, m, d), - w = In(e.x, m - 1, d), - P = In(e.x, m + 1, d), - M = Math.min(y, w, P); - return M === P ? 1 : M === w ? -1 : 0 - } - allowVariableZoom(e, n) { - return Ot(e, n) > 4 - } - allowWorldCopies() { - return !1 - } - getTileBoundingVolume(e, n, s, u) { - return this._boundingVolumeCache.getTileBoundingVolume(e, n, s, u) - } - _computeTileBoundingVolume(e, n, s, u) { - var d, m; - let y = 0, - w = 0; - if (u != null && u.terrain) { - const P = new o.Z(e.z, n, e.z, e.x, e.y), - M = u.terrain.getMinMaxElevation(P); - y = (d = M.minElevation) !== null && d !== void 0 ? d : Math.min(0, s), w = (m = M.maxElevation) !== null && m !== void 0 ? m : Math.max(0, s) - } - if (y /= o.bu, w /= o.bu, y += 1, w += 1, e.z <= 0) return Fs.fromAabb([-w, -w, -w], [w, w, w]); - if (e.z === 1) return Fs.fromAabb([e.x === 0 ? -w : 0, e.y === 0 ? 0 : -w, -w], [e.x === 0 ? 0 : w, e.y === 0 ? w : 0, w]); - { - const P = [va(0, 0, e.x, e.y, e.z), va(o.$, 0, e.x, e.y, e.z), va(o.$, o.$, e.x, e.y, e.z), va(0, o.$, e.x, e.y, e.z)], - M = []; - for (const qe of P) M.push(o.aR([], qe, w)); - if (w !== y) - for (const qe of P) M.push(o.aR([], qe, y)); - e.y === 0 && M.push([0, 1, 0]), e.y === (1 << e.z) - 1 && M.push([0, -1, 0]); - const D = [1, 1, 1], - z = [-1, -1, -1]; - for (const qe of M) - for (let $e = 0; $e < 3; $e++) D[$e] = Math.min(D[$e], qe[$e]), z[$e] = Math.max(z[$e], qe[$e]); - const B = va(o.$ / 2, o.$ / 2, e.x, e.y, e.z), - U = o.aW([], [0, 1, 0], B); - o.aV(U, U); - const ee = o.aW([], B, U); - o.aV(ee, ee); - const J = o.aW([], P[2], P[1]); - o.aV(J, J); - const re = o.aW([], P[0], P[3]); - o.aV(re, re), M.push(o.aR([], B, w)), e.y >= (1 << e.z) / 2 && M.push(o.aR([], va(o.$ / 2, 0, e.x, e.y, e.z), w)), e.y < (1 << e.z) / 2 && M.push(o.aR([], va(o.$ / 2, o.$, e.x, e.y, e.z), w)); - const se = fo(B, M), - de = fo(ee, M), - ue = [-B[0], -B[1], -B[2], se.max], - ge = [B[0], B[1], B[2], -se.min], - Te = [-ee[0], -ee[1], -ee[2], de.max], - he = [ee[0], ee[1], ee[2], -de.min], - De = [...J, 0], - He = [...re, 0], - je = []; - return e.y === 0 ? je.push(o.bt(He, De, ue), o.bt(He, De, ge)) : je.push(o.bt(Te, De, ue), o.bt(Te, De, ge), o.bt(Te, He, ue), o.bt(Te, He, ge)), e.y === (1 << e.z) - 1 ? je.push(o.bt(He, De, ue), o.bt(He, De, ge)) : je.push(o.bt(he, De, ue), o.bt(he, De, ge), o.bt(he, He, ue), o.bt(he, He, ge)), new Fs(je, [ue, ge, Te, he, De, He], D, z) - } - } - } - - function fo(h, e) { - let n = 1 / 0, - s = -1 / 0; - for (const u of e) { - const d = o.aX(h, u); - n = Math.min(n, d), s = Math.max(s, d) - } - return { - min: n, - max: s - } - } - class mo { - 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(e) { - this._helper.setMinZoom(e) - } - setMaxZoom(e) { - this._helper.setMaxZoom(e) - } - setMinPitch(e) { - this._helper.setMinPitch(e) - } - setMaxPitch(e) { - this._helper.setMaxPitch(e) - } - setRenderWorldCopies(e) { - this._helper.setRenderWorldCopies(e) - } - setBearing(e) { - this._helper.setBearing(e) - } - setPitch(e) { - this._helper.setPitch(e) - } - setRoll(e) { - this._helper.setRoll(e) - } - setFov(e) { - this._helper.setFov(e) - } - setZoom(e) { - this._helper.setZoom(e) - } - setCenter(e) { - this._helper.setCenter(e) - } - setElevation(e) { - this._helper.setElevation(e) - } - setMinElevationForCurrentTile(e) { - this._helper.setMinElevationForCurrentTile(e) - } - setPadding(e) { - this._helper.setPadding(e) - } - interpolatePadding(e, n, s) { - return this._helper.interpolatePadding(e, n, s) - } - isPaddingEqual(e) { - return this._helper.isPaddingEqual(e) - } - resize(e, n) { - this._helper.resize(e, n) - } - getMaxBounds() { - return this._helper.getMaxBounds() - } - setMaxBounds(e) { - this._helper.setMaxBounds(e) - } - overrideNearFarZ(e, n) { - this._helper.overrideNearFarZ(e, n) - } - clearNearFarZOverride() { - this._helper.clearNearFarZOverride() - } - getCameraQueryGeometry(e) { - return this._helper.getCameraQueryGeometry(this.getCameraPoint(), e) - } - 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 nearZ() { - return this._helper.nearZ - } - get farZ() { - return this._helper.farZ - } - get autoCalculateNearFarZ() { - return this._helper.autoCalculateNearFarZ - } - setTransitionState(e) {} - constructor() { - this._cachedClippingPlane = o.bv(), this._projectionMatrix = o.b9(), this._globeViewProjMatrix32f = o.b8(), this._globeViewProjMatrixNoCorrection = o.b9(), this._globeViewProjMatrixNoCorrectionInverted = o.b9(), this._globeProjMatrixInverted = o.b9(), this._cameraPosition = o.bp(), this._globeLatitudeErrorCorrectionRadians = 0, this._helper = new ln({ - calcMatrices: () => { - this._calcMatrices() - }, - getConstrained: (e, n) => this.getConstrained(e, n) - }), this._coveringTilesDetailsProvider = new Fa - } - clone() { - const e = new mo; - return e.apply(this), e - } - apply(e, n) { - this._globeLatitudeErrorCorrectionRadians = n || 0, this._helper.apply(e) - } - get projectionMatrix() { - return this._projectionMatrix - } - get modelViewProjectionMatrix() { - return this._globeViewProjMatrixNoCorrection - } - get inverseProjectionMatrix() { - return this._globeProjMatrixInverted - } - get cameraPosition() { - const e = o.bp(); - return e[0] = this._cameraPosition[0], e[1] = this._cameraPosition[1], e[2] = this._cameraPosition[2], e - } - get cameraToCenterDistance() { - return this._helper.cameraToCenterDistance - } - getProjectionData(e) { - const { - overscaledTileID: n, - applyGlobeMatrix: s - } = e, u = this._helper.getMercatorTileCoordinates(n); - return { - mainMatrix: this._globeViewProjMatrix32f, - tileMercatorCoords: u, - clippingPlane: this._cachedClippingPlane, - projectionTransition: s ? 1 : 0, - fallbackMatrix: this._globeViewProjMatrix32f - } - } - _computeClippingPlane(e) { - const n = this.pitchInRadians, - s = this.cameraToCenterDistance / e, - u = Math.sin(n) * s, - d = Math.cos(n) * s + 1, - m = 1 / Math.sqrt(u * u + d * d) * 1; - let y = -u, - w = d; - const P = Math.sqrt(y * y + w * w); - y /= P, w /= P; - const M = [0, y, w]; - o.bw(M, M, [0, 0, 0], -this.bearingInRadians), o.bx(M, M, [0, 0, 0], -1 * this.center.lat * Math.PI / 180), o.by(M, M, [0, 0, 0], this.center.lng * Math.PI / 180); - const D = 1 / o.aZ(M); - return o.aR(M, M, D), [...M, -m * D] - } - isLocationOccluded(e) { - return !this.isSurfacePointVisible(yn(e)) - } - transformLightDirection(e) { - const n = this._helper._center.lng * Math.PI / 180, - s = this._helper._center.lat * Math.PI / 180, - u = Math.cos(s), - d = [Math.sin(n) * u, Math.sin(s), Math.cos(n) * u], - m = [d[2], 0, -d[0]], - y = [0, 0, 0]; - o.aW(y, m, d), o.aV(m, m), o.aV(y, y); - const w = [0, 0, 0]; - return o.aV(w, [m[0] * e[0] + y[0] * e[1] + d[0] * e[2], m[1] * e[0] + y[1] * e[1] + d[1] * e[2], m[2] * e[0] + y[2] * e[1] + d[2] * e[2]]), w - } - getPixelScale() { - return 1 / Math.cos(this._helper._center.lat * Math.PI / 180) - } - getCircleRadiusCorrection() { - return Math.cos(this._helper._center.lat * Math.PI / 180) - } - getPitchedTextCorrection(e, n, s) { - const u = (function(y, w, P) { - const M = 1 / (1 << P.z); - return new o.a1(y / o.$ * M + P.x * M, w / o.$ * M + P.y * M) - })(e, n, s.canonical), - d = (m = u.y, [o.bo(u.x * Math.PI * 2 + Math.PI, 2 * Math.PI), 2 * Math.atan(Math.exp(Math.PI - m * Math.PI * 2)) - .5 * Math.PI]); - var m; - return this.getCircleRadiusCorrection() / Math.cos(d[1]) - } - projectTileCoordinates(e, n, s, u) { - const d = s.canonical, - m = va(e, n, d.x, d.y, d.z), - y = 1 + (u ? u(e, n) : 0) / o.bu, - w = [m[0] * y, m[1] * y, m[2] * y, 1]; - o.aw(w, w, this._globeViewProjMatrixNoCorrection); - const P = this._cachedClippingPlane, - M = P[0] * m[0] + P[1] * m[1] + P[2] * m[2] + P[3] < 0; - return { - point: new o.P(w[0] / w[3], w[1] / w[3]), - signedDistanceFromCamera: w[3], - isOccluded: M - } - } - _calcMatrices() { - if (!this._helper._width || !this._helper._height) return; - const e = Bs(this.worldSize, this.center.lat), - n = o.ba(), - s = o.ba(); - this._helper.autoCalculateNearFarZ && (this._helper._nearZ = .5, this._helper._farZ = this.cameraToCenterDistance + 2 * e), o.b4(n, this.fovInRadians, this.width / this.height, this._helper._nearZ, this._helper._farZ); - const u = this.centerOffset; - n[8] = 2 * -u.x / this._helper._width, n[9] = 2 * u.y / this._helper._height, this._projectionMatrix = o.b5(n), this._globeProjMatrixInverted = o.ba(), o.aq(this._globeProjMatrixInverted, n), o.M(n, n, [0, 0, -this.cameraToCenterDistance]), o.b6(n, n, this.rollInRadians), o.b7(n, n, -this.pitchInRadians), o.b6(n, n, this.bearingInRadians), o.M(n, n, [0, 0, -e]); - const d = o.bp(); - d[0] = e, d[1] = e, d[2] = e, o.b7(s, n, this.center.lat * Math.PI / 180), o.bz(s, s, -this.center.lng * Math.PI / 180), o.N(s, s, d), this._globeViewProjMatrixNoCorrection = s, o.b7(n, n, this.center.lat * Math.PI / 180 - this._globeLatitudeErrorCorrectionRadians), o.bz(n, n, -this.center.lng * Math.PI / 180), o.N(n, n, d), this._globeViewProjMatrix32f = new Float32Array(n), this._globeViewProjMatrixNoCorrectionInverted = o.ba(), o.aq(this._globeViewProjMatrixNoCorrectionInverted, s); - const m = o.bp(); - this._cameraPosition = o.bp(), this._cameraPosition[2] = this.cameraToCenterDistance / e, o.bw(this._cameraPosition, this._cameraPosition, m, -this.rollInRadians), o.bx(this._cameraPosition, this._cameraPosition, m, this.pitchInRadians), o.bw(this._cameraPosition, this._cameraPosition, m, -this.bearingInRadians), o.aS(this._cameraPosition, this._cameraPosition, [0, 0, 1]), o.bx(this._cameraPosition, this._cameraPosition, m, -this.center.lat * Math.PI / 180), o.by(this._cameraPosition, this._cameraPosition, m, this.center.lng * Math.PI / 180), this._cachedClippingPlane = this._computeClippingPlane(e); - const y = o.b5(this._globeViewProjMatrixNoCorrectionInverted); - o.N(y, y, [1, 1, -1]), this._cachedFrustum = Ni.fromInvProjectionMatrix(y, 1, 0, this._cachedClippingPlane, !0) - } - calculateFogMatrix(e) { - o.w("calculateFogMatrix is not supported on globe projection."); - const n = o.ba(); - return o.ag(n), n - } - getVisibleUnwrappedCoordinates(e) { - return [new o.b2(0, e)] - } - getCameraFrustum() { - return this._cachedFrustum - } - getClippingPlane() { - return this._cachedClippingPlane - } - getCoveringTilesDetailsProvider() { - return this._coveringTilesDetailsProvider - } - recalculateZoomAndCenter(e) { - e && o.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(e, n) { - if (!this._globeViewProjMatrixNoCorrection) return 1; - const s = yn(e); - o.aR(s, s, 1 + n / o.bu); - const u = o.bv(); - return o.aw(u, [s[0], s[1], s[2], 1], this._globeViewProjMatrixNoCorrection), u[2] / u[3] - } - populateCache(e) {} - getBounds() { - const e = .5 * this.width, - n = .5 * this.height, - s = [new o.P(0, 0), new o.P(e, 0), new o.P(this.width, 0), new o.P(this.width, n), new o.P(this.width, this.height), new o.P(e, this.height), new o.P(0, this.height), new o.P(0, n)], - u = []; - for (const D of s) u.push(this.unprojectScreenPoint(D)); - let d = 0, - m = 0, - y = 0, - w = 0; - const P = this.center; - for (const D of u) { - const z = o.bA(P.lng, D.lng), - B = o.bA(P.lat, D.lat); - z < m && (m = z), z > d && (d = z), B < w && (w = B), B > y && (y = B) - } - const M = [P.lng + m, P.lat + w, P.lng + d, P.lat + y]; - return this.isSurfacePointOnScreen([0, 1, 0]) && (M[3] = 90, M[0] = -180, M[2] = 180), this.isSurfacePointOnScreen([0, -1, 0]) && (M[1] = -90, M[0] = -180, M[2] = 180), new dt(M) - } - getConstrained(e, n) { - const s = o.ah(e.lat, -o.ai, o.ai), - u = o.ah(+n, this.minZoom + Gi(0, s), this.maxZoom); - return { - center: new o.S(e.lng, s), - zoom: u - } - } - calculateCenterFromCameraLngLatAlt(e, n, s, u) { - return this._helper.calculateCenterFromCameraLngLatAlt(e, n, s, u) - } - setLocationAtPoint(e, n) { - const s = yn(this.unprojectScreenPoint(n)), - u = yn(e), - d = o.bp(); - o.bB(d); - const m = o.bp(); - o.by(m, s, d, -this.center.lng * Math.PI / 180), o.bx(m, m, d, this.center.lat * Math.PI / 180); - const y = u[0] * u[0] + u[2] * u[2], - w = m[0] * m[0]; - if (y < w) return; - const P = Math.sqrt(y - w), - M = -P, - D = o.bC(u[0], u[2], m[0], P), - z = o.bC(u[0], u[2], m[0], M), - B = o.bp(); - o.by(B, u, d, -D); - const U = o.bC(B[1], B[2], m[1], m[2]), - ee = o.bp(); - o.by(ee, u, d, -z); - const J = o.bC(ee[1], ee[2], m[1], m[2]), - re = .5 * Math.PI, - se = U >= -re && U <= re, - de = J >= -re && J <= re; - let ue, ge; - if (se && de) { - const He = this.center.lng * Math.PI / 180, - je = this.center.lat * Math.PI / 180; - o.bD(D, He) + o.bD(U, je) < o.bD(z, He) + o.bD(J, je) ? (ue = D, ge = U) : (ue = z, ge = J) - } else if (se) ue = D, ge = U; - else { - if (!de) return; - ue = z, ge = J - } - const Te = ue / Math.PI * 180, - he = ge / Math.PI * 180, - De = this.center.lat; - this.setCenter(new o.S(Te, o.ah(he, -90, 90))), this.setZoom(this.zoom + Gi(De, this.center.lat)) - } - locationToScreenPoint(e, n) { - const s = yn(e); - if (n) { - const u = n.getElevationForLngLatZoom(e, this._helper._tileZoom); - o.aR(s, s, 1 + u / o.bu) - } - return this._projectSurfacePointToScreen(s) - } - _projectSurfacePointToScreen(e) { - const n = o.bv(); - return o.aw(n, [...e, 1], this._globeViewProjMatrixNoCorrection), n[0] /= n[3], n[1] /= n[3], new o.P((.5 * n[0] + .5) * this.width, (.5 * -n[1] + .5) * this.height) - } - screenPointToMercatorCoordinate(e, n) { - if (n) { - const s = n.pointCoordinate(e); - if (s) return s - } - return o.a1.fromLngLat(this.unprojectScreenPoint(e)) - } - screenPointToLocation(e, n) { - var s; - return (s = this.screenPointToMercatorCoordinate(e, n)) === null || s === void 0 ? void 0 : s.toLngLat() - } - isPointOnMapSurface(e, n) { - const s = this._cameraPosition, - u = this.getRayDirectionFromPixel(e); - return !!this.rayPlanetIntersection(s, u) - } - getRayDirectionFromPixel(e) { - const n = o.bv(); - n[0] = e.x / this.width * 2 - 1, n[1] = -1 * (e.y / this.height * 2 - 1), n[2] = 1, n[3] = 1, o.aw(n, n, this._globeViewProjMatrixNoCorrectionInverted), n[0] /= n[3], n[1] /= n[3], n[2] /= n[3]; - const s = o.bp(); - s[0] = n[0] - this._cameraPosition[0], s[1] = n[1] - this._cameraPosition[1], s[2] = n[2] - this._cameraPosition[2]; - const u = o.bp(); - return o.aV(u, s), u - } - isSurfacePointVisible(e) { - const n = this._cachedClippingPlane; - return n[0] * e[0] + n[1] * e[1] + n[2] * e[2] + n[3] >= 0 - } - isSurfacePointOnScreen(e) { - if (!this.isSurfacePointVisible(e)) return !1; - const n = o.bv(); - return o.aw(n, [...e, 1], this._globeViewProjMatrixNoCorrection), n[0] /= n[3], n[1] /= n[3], n[2] /= n[3], n[0] > -1 && n[0] < 1 && n[1] > -1 && n[1] < 1 && n[2] > -1 && n[2] < 1 - } - rayPlanetIntersection(e, n) { - const s = o.aX(e, n), - u = o.bp(), - d = o.bp(); - o.aR(d, n, s), o.aU(u, e, d); - const m = 1 - o.aX(u, u); - if (m < 0) return null; - const y = o.aX(e, e) - 1, - w = -s + (s < 0 ? 1 : -1) * Math.sqrt(m), - P = y / w, - M = w; - return { - tMin: Math.min(P, M), - tMax: Math.max(P, M) - } - } - unprojectScreenPoint(e) { - const n = this._cameraPosition, - s = this.getRayDirectionFromPixel(e), - u = this.rayPlanetIntersection(n, s); - if (u) { - const M = o.bp(); - o.aS(M, n, [s[0] * u.tMin, s[1] * u.tMin, s[2] * u.tMin]); - const D = o.bp(); - return o.aV(D, M), uo(D) - } - const d = this._cachedClippingPlane, - m = d[0] * s[0] + d[1] * s[1] + d[2] * s[2], - y = -o.b1(d, n) / m, - w = o.bp(); - if (y > 0) o.aS(w, n, [s[0] * y, s[1] * y, s[2] * y]); - else { - const M = o.bp(); - o.aS(M, n, [2 * s[0], 2 * s[1], 2 * s[2]]); - const D = o.b1(this._cachedClippingPlane, M); - o.aU(w, M, [this._cachedClippingPlane[0] * D, this._cachedClippingPlane[1] * D, this._cachedClippingPlane[2] * D]) - } - const P = (function(M) { - const D = o.bp(); - return D[0] = M[0] * -M[3], D[1] = M[1] * -M[3], D[2] = M[2] * -M[3], { - center: D, - radius: Math.sqrt(1 - M[3] * M[3]) - } - })(d); - return uo((function(M, D, z) { - const B = o.bp(); - o.aU(B, z, M); - const U = o.bp(); - return o.bq(U, M, B, D / o.a$(B)), U - })(P.center, P.radius, w)) - } - getMatrixForModel(e, n) { - const s = o.S.convert(e), - u = 1 / o.bu, - d = o.b9(); - return o.bz(d, d, s.lng / 180 * Math.PI), o.b7(d, d, -s.lat / 180 * Math.PI), o.M(d, d, [0, 0, 1 + n / o.bu]), o.b7(d, d, .5 * Math.PI), o.N(d, d, [u, u, u]), d - } - getProjectionDataForCustomLayer(e = !0) { - const n = this.getProjectionData({ - overscaledTileID: new o.Z(0, 0, 0, 0, 0), - applyGlobeMatrix: e - }); - return n.tileMercatorCoords = [0, 0, 1, 1], n - } - getFastPathSimpleProjectionMatrix(e) {} - } - class _o { - 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(e) { - this._helper.setMinZoom(e) - } - setMaxZoom(e) { - this._helper.setMaxZoom(e) - } - setMinPitch(e) { - this._helper.setMinPitch(e) - } - setMaxPitch(e) { - this._helper.setMaxPitch(e) - } - setRenderWorldCopies(e) { - this._helper.setRenderWorldCopies(e) - } - setBearing(e) { - this._helper.setBearing(e) - } - setPitch(e) { - this._helper.setPitch(e) - } - setRoll(e) { - this._helper.setRoll(e) - } - setFov(e) { - this._helper.setFov(e) - } - setZoom(e) { - this._helper.setZoom(e) - } - setCenter(e) { - this._helper.setCenter(e) - } - setElevation(e) { - this._helper.setElevation(e) - } - setMinElevationForCurrentTile(e) { - this._helper.setMinElevationForCurrentTile(e) - } - setPadding(e) { - this._helper.setPadding(e) - } - interpolatePadding(e, n, s) { - return this._helper.interpolatePadding(e, n, s) - } - isPaddingEqual(e) { - return this._helper.isPaddingEqual(e) - } - resize(e, n, s = !0) { - this._helper.resize(e, n, s) - } - getMaxBounds() { - return this._helper.getMaxBounds() - } - setMaxBounds(e) { - this._helper.setMaxBounds(e) - } - overrideNearFarZ(e, n) { - this._helper.overrideNearFarZ(e, n) - } - clearNearFarZOverride() { - this._helper.clearNearFarZOverride() - } - getCameraQueryGeometry(e) { - return this._helper.getCameraQueryGeometry(this.getCameraPoint(), e) - } - 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 nearZ() { - return this._helper.nearZ - } - get farZ() { - return this._helper.farZ - } - get autoCalculateNearFarZ() { - return this._helper.autoCalculateNearFarZ - } - get isGlobeRendering() { - return this._globeness > 0 - } - setTransitionState(e, n) { - this._globeness = e, this._globeLatitudeErrorCorrectionRadians = n, this._calcMatrices(), this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(), this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame() - } - get currentTransform() { - return this.isGlobeRendering ? this._verticalPerspectiveTransform : this._mercatorTransform - } - constructor() { - this._globeLatitudeErrorCorrectionRadians = 0, this._globeness = 1, this._helper = new ln({ - calcMatrices: () => { - this._calcMatrices() - }, - getConstrained: (e, n) => this.getConstrained(e, n) - }), this._globeness = 1, this._mercatorTransform = new wi, this._verticalPerspectiveTransform = new mo - } - clone() { - const e = new _o; - return e._globeness = this._globeness, e._globeLatitudeErrorCorrectionRadians = this._globeLatitudeErrorCorrectionRadians, e.apply(this), e - } - apply(e) { - this._helper.apply(e), this._mercatorTransform.apply(this), this._verticalPerspectiveTransform.apply(this, 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(e) { - const n = this._mercatorTransform.getProjectionData(e), - s = this._verticalPerspectiveTransform.getProjectionData(e); - return { - mainMatrix: this.isGlobeRendering ? s.mainMatrix : n.mainMatrix, - clippingPlane: s.clippingPlane, - tileMercatorCoords: s.tileMercatorCoords, - projectionTransition: e.applyGlobeMatrix ? this._globeness : 0, - fallbackMatrix: n.fallbackMatrix - } - } - isLocationOccluded(e) { - return this.currentTransform.isLocationOccluded(e) - } - transformLightDirection(e) { - return this.currentTransform.transformLightDirection(e) - } - getPixelScale() { - return o.bk(this._mercatorTransform.getPixelScale(), this._verticalPerspectiveTransform.getPixelScale(), this._globeness) - } - getCircleRadiusCorrection() { - return o.bk(this._mercatorTransform.getCircleRadiusCorrection(), this._verticalPerspectiveTransform.getCircleRadiusCorrection(), this._globeness) - } - getPitchedTextCorrection(e, n, s) { - const u = this._mercatorTransform.getPitchedTextCorrection(e, n, s), - d = this._verticalPerspectiveTransform.getPitchedTextCorrection(e, n, s); - return o.bk(u, d, this._globeness) - } - projectTileCoordinates(e, n, s, u) { - return this.currentTransform.projectTileCoordinates(e, n, s, u) - } - _calcMatrices() { - this._helper._width && this._helper._height && (this._verticalPerspectiveTransform.apply(this, 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(e) { - return this.currentTransform.calculateFogMatrix(e) - } - getVisibleUnwrappedCoordinates(e) { - return this.currentTransform.getVisibleUnwrappedCoordinates(e) - } - getCameraFrustum() { - return this.currentTransform.getCameraFrustum() - } - getClippingPlane() { - return this.currentTransform.getClippingPlane() - } - getCoveringTilesDetailsProvider() { - return this.currentTransform.getCoveringTilesDetailsProvider() - } - recalculateZoomAndCenter(e) { - this._mercatorTransform.recalculateZoomAndCenter(e), this._verticalPerspectiveTransform.recalculateZoomAndCenter(e) - } - maxPitchScaleFactor() { - return this._mercatorTransform.maxPitchScaleFactor() - } - getCameraPoint() { - return this._helper.getCameraPoint() - } - getCameraAltitude() { - return this._helper.getCameraAltitude() - } - getCameraLngLat() { - return this._helper.getCameraLngLat() - } - lngLatToCameraDepth(e, n) { - return this.currentTransform.lngLatToCameraDepth(e, n) - } - populateCache(e) { - this._mercatorTransform.populateCache(e), this._verticalPerspectiveTransform.populateCache(e) - } - getBounds() { - return this.currentTransform.getBounds() - } - getConstrained(e, n) { - return this.currentTransform.getConstrained(e, n) - } - calculateCenterFromCameraLngLatAlt(e, n, s, u) { - return this._helper.calculateCenterFromCameraLngLatAlt(e, n, s, u) - } - setLocationAtPoint(e, n) { - if (!this.isGlobeRendering) return this._mercatorTransform.setLocationAtPoint(e, n), void this.apply(this._mercatorTransform); - this._verticalPerspectiveTransform.setLocationAtPoint(e, n), this.apply(this._verticalPerspectiveTransform) - } - locationToScreenPoint(e, n) { - return this.currentTransform.locationToScreenPoint(e, n) - } - screenPointToMercatorCoordinate(e, n) { - return this.currentTransform.screenPointToMercatorCoordinate(e, n) - } - screenPointToLocation(e, n) { - return this.currentTransform.screenPointToLocation(e, n) - } - isPointOnMapSurface(e, n) { - return this.currentTransform.isPointOnMapSurface(e, n) - } - getRayDirectionFromPixel(e) { - return this._verticalPerspectiveTransform.getRayDirectionFromPixel(e) - } - getMatrixForModel(e, n) { - return this.currentTransform.getMatrixForModel(e, n) - } - getProjectionDataForCustomLayer(e = !0) { - const n = this._mercatorTransform.getProjectionDataForCustomLayer(e); - if (!this.isGlobeRendering) return n; - const s = this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(e); - return s.fallbackMatrix = n.mainMatrix, s - } - getFastPathSimpleProjectionMatrix(e) { - return this.currentTransform.getFastPathSimpleProjectionMatrix(e) - } - } - class Dn { - get useGlobeControls() { - return !0 - } - handlePanInertia(e, n) { - const s = _h(e, n); - return Math.abs(s.lng - n.center.lng) > 180 && (s.lng = n.center.lng + 179.5 * Math.sign(s.lng - n.center.lng)), { - easingCenter: s, - easingOffset: new o.P(0, 0) - } - } - handleMapControlsRollPitchBearingZoom(e, n) { - const s = e.around, - u = n.screenPointToLocation(s); - e.bearingDelta && n.setBearing(n.bearing + e.bearingDelta), e.pitchDelta && n.setPitch(n.pitch + e.pitchDelta), e.rollDelta && n.setRoll(n.roll + e.rollDelta); - const d = n.zoom; - e.zoomDelta && n.setZoom(n.zoom + e.zoomDelta); - const m = n.zoom - d; - if (m === 0) return; - const y = o.bA(n.center.lng, u.lng), - w = y / (Math.abs(y / 180) + 1), - P = o.bA(n.center.lat, u.lat), - M = n.getRayDirectionFromPixel(s), - D = n.cameraPosition, - z = -1 * o.aX(D, M), - B = o.bp(); - o.aS(B, D, [M[0] * z, M[1] * z, M[2] * z]); - const U = o.aZ(B) - 1, - ee = Math.exp(.5 * -Math.max(U - .3, 0)), - J = Bs(n.worldSize, n.center.lat) / Math.min(n.width, n.height), - re = o.bn(J, .9, .5, 1, .25), - se = (1 - o.af(-m)) * Math.min(ee, re), - de = n.center.lat, - ue = n.zoom, - ge = new o.S(n.center.lng + w * se, o.ah(n.center.lat + P * se, -o.ai, o.ai)); - n.setLocationAtPoint(u, s); - const Te = n.center, - he = o.bn(Math.abs(y), 45, 85, 0, 1), - De = o.bn(J, .75, .35, 0, 1), - He = Math.pow(Math.max(he, De), .25), - je = o.bA(Te.lng, ge.lng), - qe = o.bA(Te.lat, ge.lat); - n.setCenter(new o.S(Te.lng + je * He, Te.lat + qe * He).wrap()), n.setZoom(ue + Gi(de, n.center.lat)) - } - handleMapControlsPan(e, n, s) { - if (!e.panDelta) return; - const u = n.center.lat, - d = n.zoom; - n.setCenter(_h(e.panDelta, n).wrap()), n.setZoom(d + Gi(u, n.center.lat)) - } - cameraForBoxAndBearing(e, n, s, u, d) { - const m = Nn(e, n, s, u, d), - y = n.left / d.width * 2 - 1, - w = (d.width - n.right) / d.width * 2 - 1, - P = n.top / d.height * -2 + 1, - M = (d.height - n.bottom) / d.height * -2 + 1, - D = o.bA(s.getWest(), s.getEast()) < 0, - z = D ? s.getEast() : s.getWest(), - B = D ? s.getWest() : s.getEast(), - U = Math.max(s.getNorth(), s.getSouth()), - ee = Math.min(s.getNorth(), s.getSouth()), - J = z + .5 * o.bA(z, B), - re = U + .5 * o.bA(U, ee), - se = d.clone(); - se.setCenter(m.center), se.setBearing(m.bearing), se.setPitch(0), se.setRoll(0), se.setZoom(m.zoom); - const de = se.modelViewProjectionMatrix, - ue = [yn(s.getNorthWest()), yn(s.getNorthEast()), yn(s.getSouthWest()), yn(s.getSouthEast()), yn(new o.S(B, re)), yn(new o.S(z, re)), yn(new o.S(J, U)), yn(new o.S(J, ee))], - ge = yn(m.center); - let Te = Number.POSITIVE_INFINITY; - for (const he of ue) y < 0 && (Te = Dn.getLesserNonNegativeNonNull(Te, Dn.solveVectorScale(he, ge, de, "x", y))), w > 0 && (Te = Dn.getLesserNonNegativeNonNull(Te, Dn.solveVectorScale(he, ge, de, "x", w))), P > 0 && (Te = Dn.getLesserNonNegativeNonNull(Te, Dn.solveVectorScale(he, ge, de, "y", P))), M < 0 && (Te = Dn.getLesserNonNegativeNonNull(Te, Dn.solveVectorScale(he, ge, de, "y", M))); - if (Number.isFinite(Te) && Te !== 0) return m.zoom = se.zoom + o.ak(Te), m; - Ko() - } - handleJumpToCenterZoom(e, n) { - const s = e.center.lat, - u = e.getConstrained(n.center ? o.S.convert(n.center) : e.center, e.zoom).center; - e.setCenter(u.wrap()); - const d = n.zoom !== void 0 ? +n.zoom : e.zoom + Gi(s, u.lat); - e.zoom !== d && e.setZoom(d) - } - handleEaseTo(e, n) { - const s = e.zoom, - u = e.center, - d = e.padding, - m = { - roll: e.roll, - pitch: e.pitch, - bearing: e.bearing - }, - y = { - roll: n.roll === void 0 ? e.roll : n.roll, - pitch: n.pitch === void 0 ? e.pitch : n.pitch, - bearing: n.bearing === void 0 ? e.bearing : n.bearing - }, - w = n.zoom !== void 0, - P = !e.isPaddingEqual(n.padding); - let M = !1; - const D = n.center ? o.S.convert(n.center) : u, - z = e.getConstrained(D, s).center; - vn(e, z); - const B = e.clone(); - B.setCenter(z), B.setZoom(w ? +n.zoom : s + Gi(u.lat, D.lat)), B.setBearing(n.bearing); - const U = new o.P(o.ah(e.centerPoint.x + n.offsetAsPoint.x, 0, e.width), o.ah(e.centerPoint.y + n.offsetAsPoint.y, 0, e.height)); - B.setLocationAtPoint(z, U); - const ee = (n.offset && n.offsetAsPoint.mag()) > 0 ? B.center : z, - J = w ? +n.zoom : s + Gi(u.lat, ee.lat), - re = s + Gi(u.lat, 0), - se = J + Gi(ee.lat, 0), - de = o.bA(u.lng, ee.lng), - ue = o.bA(u.lat, ee.lat), - ge = o.af(se - re); - return M = J !== s, { - easeFunc: Te => { - if (o.be(m, y) || un({ - startEulerAngles: m, - endEulerAngles: y, - tr: e, - k: Te, - useSlerp: m.roll != y.roll - }), P && e.interpolatePadding(d, n.padding, Te), n.around) o.w("Easing around a point is not supported under globe projection."), e.setLocationAtPoint(n.around, n.aroundPoint); - else { - const he = se > re ? Math.min(2, ge) : Math.max(.5, ge), - De = Math.pow(he, 1 - Te), - He = _c(u, de, ue, Te * De); - e.setCenter(He.wrap()) - } - if (M) { - const he = o.C.number(re, se, Te) + Gi(0, e.center.lat); - e.setZoom(he) - } - }, - isZooming: M, - elevationCenter: ee - } - } - handleFlyTo(e, n) { - const s = n.zoom !== void 0, - u = e.center, - d = e.zoom, - m = e.padding, - y = !e.isPaddingEqual(n.padding), - w = e.getConstrained(o.S.convert(n.center || n.locationAtOffset), d).center, - P = s ? +n.zoom : e.zoom + Gi(e.center.lat, w.lat), - M = e.clone(); - M.setCenter(w), M.setZoom(P), M.setBearing(n.bearing); - const D = new o.P(o.ah(e.centerPoint.x + n.offsetAsPoint.x, 0, e.width), o.ah(e.centerPoint.y + n.offsetAsPoint.y, 0, e.height)); - M.setLocationAtPoint(w, D); - const z = M.center; - vn(e, z); - const B = (function(ue, ge, Te) { - const he = yn(ge), - De = yn(Te), - He = o.aX(he, De), - je = Math.acos(He), - qe = el(ue); - return je / (2 * Math.PI) * qe - })(e, u, z), - U = d + Gi(u.lat, 0), - ee = P + Gi(z.lat, 0), - J = o.af(ee - U); - let re; - if (typeof n.minZoom == "number") { - const ue = +n.minZoom + Gi(z.lat, 0), - ge = Math.min(ue, U, ee) + Gi(0, z.lat), - Te = e.getConstrained(z, ge).zoom + Gi(z.lat, 0); - re = o.af(Te - U) - } - const se = o.bA(u.lng, z.lng), - de = o.bA(u.lat, z.lat); - return { - easeFunc: (ue, ge, Te, he) => { - const De = _c(u, se, de, Te); - y && e.interpolatePadding(m, n.padding, ue); - const He = ue === 1 ? z : De; - e.setCenter(He.wrap()); - const je = U + o.ak(ge); - e.setZoom(ue === 1 ? P : je + Gi(0, He.lat)) - }, - scaleOfZoom: J, - targetCenter: z, - scaleOfMinZoom: re, - pixelPathLength: B - } - } - static solveVectorScale(e, n, s, u, d) { - const m = u === "x" ? [s[0], s[4], s[8], s[12]] : [s[1], s[5], s[9], s[13]], - y = [s[3], s[7], s[11], s[15]], - w = e[0] * m[0] + e[1] * m[1] + e[2] * m[2], - P = e[0] * y[0] + e[1] * y[1] + e[2] * y[2], - M = n[0] * m[0] + n[1] * m[1] + n[2] * m[2], - D = n[0] * y[0] + n[1] * y[1] + n[2] * y[2]; - return M + d * P === w + d * D || y[3] * (w - M) + m[3] * (D - P) + w * D == M * P ? null : (M + m[3] - d * D - d * y[3]) / (M - w - d * D + d * P) - } - static getLesserNonNegativeNonNull(e, n) { - return n !== null && n >= 0 && n < e ? n : e - } - } - class gh { - constructor(e) { - this._globe = e, this._mercatorCameraHelper = new hn, this._verticalPerspectiveCameraHelper = new Dn - } - get useGlobeControls() { - return this._globe.useGlobeRendering - } - get currentHelper() { - return this.useGlobeControls ? this._verticalPerspectiveCameraHelper : this._mercatorCameraHelper - } - handlePanInertia(e, n) { - return this.currentHelper.handlePanInertia(e, n) - } - handleMapControlsRollPitchBearingZoom(e, n) { - return this.currentHelper.handleMapControlsRollPitchBearingZoom(e, n) - } - handleMapControlsPan(e, n, s) { - this.currentHelper.handleMapControlsPan(e, n, s) - } - cameraForBoxAndBearing(e, n, s, u, d) { - return this.currentHelper.cameraForBoxAndBearing(e, n, s, u, d) - } - handleJumpToCenterZoom(e, n) { - this.currentHelper.handleJumpToCenterZoom(e, n) - } - handleEaseTo(e, n) { - return this.currentHelper.handleEaseTo(e, n) - } - handleFlyTo(e, n) { - return this.currentHelper.handleFlyTo(e, n) - } - } - const tl = (h, e) => o.y(h, e && e.filter((n => n.identifier !== "source.canvas"))), - Jd = o.bE(); - class gc extends o.E { - constructor(e, n = {}) { - super(), this._rtlPluginLoaded = () => { - for (const s in this.sourceCaches) { - const u = this.sourceCaches[s].getSource().type; - u !== "vector" && u !== "geojson" || this.sourceCaches[s].reload() - } - }, this.map = e, this.dispatcher = new xt(_t(), e._getMapId()), this.dispatcher.registerMessageHandler("GG", ((s, u) => this.getGlyphs(s, u))), this.dispatcher.registerMessageHandler("GI", ((s, u) => this.getImages(s, u))), this.imageManager = new Je, this.imageManager.setEventedParent(this), this.glyphManager = new Qe(e._requestManager, n.localIdeographFontFamily), this.lineAtlas = new ne(256, 512), this.crossTileSymbolIndex = new gi, this._spritesImagesIds = {}, this._layers = {}, this._order = [], this.sourceCaches = {}, this.zoomHistory = new o.bF, this._loaded = !1, this._availableImages = [], this._globalState = {}, this._resetUpdates(), this.dispatcher.broadcast("SR", o.bG()), kr().on(ur, this._rtlPluginLoaded), this.on("data", (s => { - if (s.dataType !== "source" || s.sourceDataType !== "metadata") return; - const u = this.sourceCaches[s.sourceId]; - if (!u) return; - const d = u.getSource(); - if (d && d.vectorLayerIds) - for (const m in this._layers) { - const y = this._layers[m]; - y.source === d.id && this._validateLayer(y) - } - })) - } - setGlobalStateProperty(e, n) { - var s, u, d; - this._checkLoaded(); - const m = n === null ? (d = (u = (s = this.stylesheet.state) === null || s === void 0 ? void 0 : s[e]) === null || u === void 0 ? void 0 : u.default) !== null && d !== void 0 ? d : null : n; - if (o.bH(m, this._globalState[e])) return this; - this._globalState[e] = m; - const y = this._findGlobalStateAffectedSources([e]); - for (const w in this.sourceCaches) y.has(w) && (this._reloadSource(w), this._changed = !0) - } - getGlobalState() { - return this._globalState - } - setGlobalState(e) { - this._checkLoaded(); - const n = []; - for (const u in e) !o.bH(this._globalState[u], e[u].default) && (n.push(u), this._globalState[u] = e[u].default); - const s = this._findGlobalStateAffectedSources(n); - for (const u in this.sourceCaches) s.has(u) && (this._reloadSource(u), this._changed = !0) - } - _findGlobalStateAffectedSources(e) { - if (e.length === 0) return new Set; - const n = new Set; - for (const s in this._layers) { - const u = this._layers[s], - d = u.getLayoutAffectingGlobalStateRefs(); - for (const m of e) d.has(m) && n.add(u.source) - } - return n - } - loadURL(e, n = {}, s) { - this.fire(new o.l("dataloading", { - dataType: "style" - })), n.validate = typeof n.validate != "boolean" || n.validate; - const u = this.map._requestManager.transformRequest(e, "Style"); - this._loadStyleRequest = new AbortController; - const d = this._loadStyleRequest; - o.j(u, this._loadStyleRequest).then((m => { - this._loadStyleRequest = null, this._load(m.data, n, s) - })).catch((m => { - this._loadStyleRequest = null, m && !d.signal.aborted && this.fire(new o.k(m)) - })) - } - loadJSON(e, n = {}, s) { - this.fire(new o.l("dataloading", { - dataType: "style" - })), this._frameRequest = new AbortController, ye.frameAsync(this._frameRequest).then((() => { - this._frameRequest = null, n.validate = n.validate !== !1, this._load(e, n, s) - })).catch((() => {})) - } - loadEmpty() { - this.fire(new o.l("dataloading", { - dataType: "style" - })), this._load(Jd, { - validate: !1 - }) - } - _load(e, n, s) { - var u, d, m; - const y = n.transformStyle ? n.transformStyle(s, e) : e; - if (!n.validate || !tl(this, o.z(y))) { - this._loaded = !0, this.stylesheet = y; - for (const w in y.sources) this.addSource(w, y.sources[w], { - validate: !1 - }); - y.sprite ? this._loadSprite(y.sprite) : this.imageManager.setLoaded(!0), this.glyphManager.setURL(y.glyphs), this._createLayers(), this.light = new Q(this.stylesheet.light), this._setProjectionInternal(((u = this.stylesheet.projection) === null || u === void 0 ? void 0 : u.type) || "mercator"), this.sky = new _e(this.stylesheet.sky), this.map.setTerrain((d = this.stylesheet.terrain) !== null && d !== void 0 ? d : null), this.setGlobalState((m = this.stylesheet.state) !== null && m !== void 0 ? m : null), this.fire(new o.l("data", { - dataType: "style" - })), this.fire(new o.l("style.load")) - } - } - _createLayers() { - const e = o.bI(this.stylesheet.layers); - this.dispatcher.broadcast("SL", e), this._order = e.map((n => n.id)), this._layers = {}, this._serializedLayers = null; - for (const n of e) { - const s = o.bJ(n); - s.setEventedParent(this, { - layer: { - id: n.id - } - }), this._layers[n.id] = s - } - } - _loadSprite(e, n = !1, s = void 0) { - let u; - this.imageManager.setLoaded(!1), this._spriteRequest = new AbortController, (function(d, m, y, w) { - return o._(this, void 0, void 0, (function*() { - const P = ht(d), - M = y > 1 ? "@2x" : "", - D = {}, - z = {}; - for (const { - id: B, - url: U - } - of P) { - const ee = m.transformRequest(Xe(U, M, ".json"), "SpriteJSON"); - D[B] = o.j(ee, w); - const J = m.transformRequest(Xe(U, M, ".png"), "SpriteImage"); - z[B] = Ne.getImage(J, w) - } - return yield Promise.all([...Object.values(D), ...Object.values(z)]), (function(B, U) { - return o._(this, void 0, void 0, (function*() { - const ee = {}; - for (const J in B) { - ee[J] = {}; - const re = ye.getImageCanvasContext((yield U[J]).data), - se = (yield B[J]).data; - for (const de in se) { - const { - width: ue, - height: ge, - x: Te, - y: he, - sdf: De, - pixelRatio: He, - stretchX: je, - stretchY: qe, - content: $e, - textFitWidth: Rt, - textFitHeight: Nt - } = se[de]; - ee[J][de] = { - data: null, - pixelRatio: He, - sdf: De, - stretchX: je, - stretchY: qe, - content: $e, - textFitWidth: Rt, - textFitHeight: Nt, - spriteData: { - width: ue, - height: ge, - x: Te, - y: he, - context: re - } - } - } - } - return ee - })) - })(D, z) - })) - })(e, this.map._requestManager, this.map.getPixelRatio(), this._spriteRequest).then((d => { - if (this._spriteRequest = null, d) - for (const m in d) { - this._spritesImagesIds[m] = []; - const y = this._spritesImagesIds[m] ? this._spritesImagesIds[m].filter((w => !(w in d))) : []; - for (const w of y) this.imageManager.removeImage(w), this._changedImages[w] = !0; - for (const w in d[m]) { - const P = m === "default" ? w : `${m}:${w}`; - this._spritesImagesIds[m].push(P), P in this.imageManager.images ? this.imageManager.updateImage(P, d[m][w], !1) : this.imageManager.addImage(P, d[m][w]), n && (this._changedImages[P] = !0) - } - } - })).catch((d => { - this._spriteRequest = null, u = d, this.fire(new o.k(u)) - })).finally((() => { - this.imageManager.setLoaded(!0), this._availableImages = this.imageManager.listImages(), n && (this._changed = !0), this.dispatcher.broadcast("SI", this._availableImages), this.fire(new o.l("data", { - dataType: "style" - })), s && s(u) - })) - } - _unloadSprite() { - for (const e of Object.values(this._spritesImagesIds).flat()) this.imageManager.removeImage(e), this._changedImages[e] = !0; - this._spritesImagesIds = {}, this._availableImages = this.imageManager.listImages(), this._changed = !0, this.dispatcher.broadcast("SI", this._availableImages), this.fire(new o.l("data", { - dataType: "style" - })) - } - _validateLayer(e) { - const n = this.sourceCaches[e.source]; - if (!n) return; - const s = e.sourceLayer; - if (!s) return; - const u = n.getSource(); - (u.type === "geojson" || u.vectorLayerIds && u.vectorLayerIds.indexOf(s) === -1) && this.fire(new o.k(new Error(`Source layer "${s}" does not exist on source "${u.id}" as specified by style layer "${e.id}".`))) - } - loaded() { - if (!this._loaded || Object.keys(this._updatedSources).length) return !1; - for (const e in this.sourceCaches) - if (!this.sourceCaches[e].loaded()) return !1; - return !!this.imageManager.isLoaded() - } - _serializeByIds(e, n = !1) { - const s = this._serializedAllLayers(); - if (!e || e.length === 0) return Object.values(n ? o.bK(s) : s); - const u = []; - for (const d of e) - if (s[d]) { - const m = n ? o.bK(s[d]) : s[d]; - u.push(m) - } return u - } - _serializedAllLayers() { - let e = this._serializedLayers; - if (e) return e; - e = this._serializedLayers = {}; - const n = Object.keys(this._layers); - for (const s of n) { - const u = this._layers[s]; - u.type !== "custom" && (e[s] = u.serialize()) - } - return e - } - hasTransitions() { - var e, n, s; - if (!((e = this.light) === null || e === void 0) && e.hasTransition() || !((n = this.sky) === null || n === void 0) && n.hasTransition() || !((s = this.projection) === null || s === void 0) && s.hasTransition()) return !0; - for (const u in this.sourceCaches) - if (this.sourceCaches[u].hasTransition()) return !0; - for (const u in this._layers) - if (this._layers[u].hasTransition()) return !0; - return !1 - } - _checkLoaded() { - if (!this._loaded) throw new Error("Style is not done loading.") - } - update(e) { - if (!this._loaded) return; - const n = this._changed; - if (n) { - const u = Object.keys(this._updatedLayers), - d = Object.keys(this._removedLayers); - (u.length || d.length) && this._updateWorkerLayers(u, d); - for (const m in this._updatedSources) { - const y = this._updatedSources[m]; - if (y === "reload") this._reloadSource(m); - else { - if (y !== "clear") throw new Error(`Invalid action ${y}`); - this._clearSource(m) - } - } - this._updateTilesForChangedImages(), this._updateTilesForChangedGlyphs(); - for (const m in this._updatedPaintProps) this._layers[m].updateTransitions(e); - this.light.updateTransitions(e), this.sky.updateTransitions(e), this._resetUpdates() - } - const s = {}; - for (const u in this.sourceCaches) { - const d = this.sourceCaches[u]; - s[u] = d.used, d.used = !1 - } - for (const u of this._order) { - const d = this._layers[u]; - d.recalculate(e, this._availableImages), !d.isHidden(e.zoom) && d.source && (this.sourceCaches[d.source].used = !0) - } - for (const u in s) { - const d = this.sourceCaches[u]; - !!s[u] != !!d.used && d.fire(new o.l("data", { - sourceDataType: "visibility", - dataType: "source", - sourceId: u - })) - } - this.light.recalculate(e), this.sky.recalculate(e), this.projection.recalculate(e), this.z = e.zoom, n && this.fire(new o.l("data", { - dataType: "style" - })) - } - _updateTilesForChangedImages() { - const e = Object.keys(this._changedImages); - if (e.length) { - for (const n in this.sourceCaches) this.sourceCaches[n].reloadTilesForDependencies(["icons", "patterns"], e); - this._changedImages = {} - } - } - _updateTilesForChangedGlyphs() { - if (this._glyphsDidChange) { - for (const e in this.sourceCaches) this.sourceCaches[e].reloadTilesForDependencies(["glyphs"], [""]); - this._glyphsDidChange = !1 - } - } - _updateWorkerLayers(e, n) { - this.dispatcher.broadcast("UL", { - layers: this._serializeByIds(e, !1), - removedIds: n - }) - } - _resetUpdates() { - this._changed = !1, this._updatedLayers = {}, this._removedLayers = {}, this._updatedSources = {}, this._updatedPaintProps = {}, this._changedImages = {}, this._glyphsDidChange = !1 - } - setState(e, n = {}) { - var s; - this._checkLoaded(); - const u = this.serialize(); - if (e = n.transformStyle ? n.transformStyle(u, e) : e, ((s = n.validate) === null || s === void 0 || s) && tl(this, o.z(e))) return !1; - (e = o.bK(e)).layers = o.bI(e.layers); - const d = o.bL(u, e), - m = this._getOperationsToPerform(d); - if (m.unimplemented.length > 0) throw new Error(`Unimplemented: ${m.unimplemented.join(", ")}.`); - if (m.operations.length === 0) return !1; - for (const y of m.operations) y(); - return this.stylesheet = e, this._serializedLayers = null, !0 - } - _getOperationsToPerform(e) { - const n = [], - s = []; - for (const u of e) switch (u.command) { - case "setCenter": - case "setZoom": - case "setBearing": - case "setPitch": - case "setRoll": - continue; - case "addLayer": - n.push((() => this.addLayer.apply(this, u.args))); - break; - case "removeLayer": - n.push((() => this.removeLayer.apply(this, u.args))); - break; - case "setPaintProperty": - n.push((() => this.setPaintProperty.apply(this, u.args))); - break; - case "setLayoutProperty": - n.push((() => this.setLayoutProperty.apply(this, u.args))); - break; - case "setFilter": - n.push((() => this.setFilter.apply(this, u.args))); - break; - case "addSource": - n.push((() => this.addSource.apply(this, u.args))); - break; - case "removeSource": - n.push((() => this.removeSource.apply(this, u.args))); - break; - case "setLayerZoomRange": - n.push((() => this.setLayerZoomRange.apply(this, u.args))); - break; - case "setLight": - n.push((() => this.setLight.apply(this, u.args))); - break; - case "setGeoJSONSourceData": - n.push((() => this.setGeoJSONSourceData.apply(this, u.args))); - break; - case "setGlyphs": - n.push((() => this.setGlyphs.apply(this, u.args))); - break; - case "setSprite": - n.push((() => this.setSprite.apply(this, u.args))); - break; - case "setTerrain": - n.push((() => this.map.setTerrain.apply(this, u.args))); - break; - case "setSky": - n.push((() => this.setSky.apply(this, u.args))); - break; - case "setProjection": - this.setProjection.apply(this, u.args); - break; - case "setGlobalState": - n.push((() => this.setGlobalState.apply(this, u.args))); - break; - case "setTransition": - n.push((() => {})); - break; - default: - s.push(u.command) - } - return { - operations: n, - unimplemented: s - } - } - addImage(e, n) { - if (this.getImage(e)) return this.fire(new o.k(new Error(`An image named "${e}" already exists.`))); - this.imageManager.addImage(e, n), this._afterImageUpdated(e) - } - updateImage(e, n) { - this.imageManager.updateImage(e, n) - } - getImage(e) { - return this.imageManager.getImage(e) - } - removeImage(e) { - if (!this.getImage(e)) return this.fire(new o.k(new Error(`An image named "${e}" does not exist.`))); - this.imageManager.removeImage(e), this._afterImageUpdated(e) - } - _afterImageUpdated(e) { - this._availableImages = this.imageManager.listImages(), this._changedImages[e] = !0, this._changed = !0, this.dispatcher.broadcast("SI", this._availableImages), this.fire(new o.l("data", { - dataType: "style" - })) - } - listImages() { - return this._checkLoaded(), this.imageManager.listImages() - } - addSource(e, n, s = {}) { - if (this._checkLoaded(), this.sourceCaches[e] !== void 0) throw new Error(`Source "${e}" already exists.`); - if (!n.type) throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(n).join(", ")}.`); - if (["vector", "raster", "geojson", "video", "image"].indexOf(n.type) >= 0 && this._validate(o.z.source, `sources.${e}`, n, null, s)) return; - this.map && this.map._collectResourceTiming && (n.collectResourceTiming = !0); - const u = this.sourceCaches[e] = new Pt(e, n, this.dispatcher); - u.style = this, u.setEventedParent(this, (() => ({ - isSourceLoaded: u.loaded(), - source: u.serialize(), - sourceId: e - }))), u.onAdd(this.map), this._changed = !0 - } - removeSource(e) { - if (this._checkLoaded(), this.sourceCaches[e] === void 0) throw new Error("There is no source with this ID"); - for (const s in this._layers) - if (this._layers[s].source === e) return this.fire(new o.k(new Error(`Source "${e}" cannot be removed while layer "${s}" is using it.`))); - const n = this.sourceCaches[e]; - delete this.sourceCaches[e], delete this._updatedSources[e], n.fire(new o.l("data", { - sourceDataType: "metadata", - dataType: "source", - sourceId: e - })), n.setEventedParent(null), n.onRemove(this.map), this._changed = !0 - } - setGeoJSONSourceData(e, n) { - if (this._checkLoaded(), this.sourceCaches[e] === void 0) throw new Error(`There is no source with this ID=${e}`); - const s = this.sourceCaches[e].getSource(); - if (s.type !== "geojson") throw new Error(`geojsonSource.type is ${s.type}, which is !== 'geojson`); - s.setData(n), this._changed = !0 - } - getSource(e) { - return this.sourceCaches[e] && this.sourceCaches[e].getSource() - } - addLayer(e, n, s = {}) { - this._checkLoaded(); - const u = e.id; - if (this.getLayer(u)) return void this.fire(new o.k(new Error(`Layer "${u}" already exists on this map.`))); - let d; - if (e.type === "custom") { - if (tl(this, o.bM(e))) return; - d = o.bJ(e) - } else { - if ("source" in e && typeof e.source == "object" && (this.addSource(u, e.source), e = o.bK(e), e = o.e(e, { - source: u - })), this._validate(o.z.layer, `layers.${u}`, e, { - arrayIndex: -1 - }, s)) return; - d = o.bJ(e), this._validateLayer(d), d.setEventedParent(this, { - layer: { - id: u - } - }) - } - const m = n ? this._order.indexOf(n) : this._order.length; - if (n && m === -1) this.fire(new o.k(new Error(`Cannot add layer "${u}" before non-existing layer "${n}".`))); - else { - if (this._order.splice(m, 0, u), this._layerOrderChanged = !0, this._layers[u] = d, this._removedLayers[u] && d.source && d.type !== "custom") { - const y = this._removedLayers[u]; - delete this._removedLayers[u], y.type !== d.type ? this._updatedSources[d.source] = "clear" : (this._updatedSources[d.source] = "reload", this.sourceCaches[d.source].pause()) - } - this._updateLayer(d), d.onAdd && d.onAdd(this.map) - } - } - moveLayer(e, n) { - if (this._checkLoaded(), this._changed = !0, !this._layers[e]) return void this.fire(new o.k(new Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`))); - if (e === n) return; - const s = this._order.indexOf(e); - this._order.splice(s, 1); - const u = n ? this._order.indexOf(n) : this._order.length; - n && u === -1 ? this.fire(new o.k(new Error(`Cannot move layer "${e}" before non-existing layer "${n}".`))) : (this._order.splice(u, 0, e), this._layerOrderChanged = !0) - } - removeLayer(e) { - this._checkLoaded(); - const n = this._layers[e]; - if (!n) return void this.fire(new o.k(new Error(`Cannot remove non-existing layer "${e}".`))); - n.setEventedParent(null); - const s = this._order.indexOf(e); - this._order.splice(s, 1), this._layerOrderChanged = !0, this._changed = !0, this._removedLayers[e] = n, delete this._layers[e], this._serializedLayers && delete this._serializedLayers[e], delete this._updatedLayers[e], delete this._updatedPaintProps[e], n.onRemove && n.onRemove(this.map) - } - getLayer(e) { - return this._layers[e] - } - getLayersOrder() { - return [...this._order] - } - hasLayer(e) { - return e in this._layers - } - setLayerZoomRange(e, n, s) { - this._checkLoaded(); - const u = this.getLayer(e); - u ? u.minzoom === n && u.maxzoom === s || (n != null && (u.minzoom = n), s != null && (u.maxzoom = s), this._updateLayer(u)) : this.fire(new o.k(new Error(`Cannot set the zoom range of non-existing layer "${e}".`))) - } - setFilter(e, n, s = {}) { - this._checkLoaded(); - const u = this.getLayer(e); - if (u) { - if (!o.bH(u.filter, n)) return n == null ? (u.setFilter(void 0), void this._updateLayer(u)) : void(this._validate(o.z.filter, `layers.${u.id}.filter`, n, null, s) || (u.setFilter(o.bK(n)), this._updateLayer(u))) - } else this.fire(new o.k(new Error(`Cannot filter non-existing layer "${e}".`))) - } - getFilter(e) { - return o.bK(this.getLayer(e).filter) - } - setLayoutProperty(e, n, s, u = {}) { - this._checkLoaded(); - const d = this.getLayer(e); - d ? o.bH(d.getLayoutProperty(n), s) || (d.setLayoutProperty(n, s, u), this._updateLayer(d)) : this.fire(new o.k(new Error(`Cannot style non-existing layer "${e}".`))) - } - getLayoutProperty(e, n) { - const s = this.getLayer(e); - if (s) return s.getLayoutProperty(n); - this.fire(new o.k(new Error(`Cannot get style of non-existing layer "${e}".`))) - } - setPaintProperty(e, n, s, u = {}) { - this._checkLoaded(); - const d = this.getLayer(e); - d ? o.bH(d.getPaintProperty(n), s) || (d.setPaintProperty(n, s, u) && this._updateLayer(d), this._changed = !0, this._updatedPaintProps[e] = !0, this._serializedLayers = null) : this.fire(new o.k(new Error(`Cannot style non-existing layer "${e}".`))) - } - getPaintProperty(e, n) { - return this.getLayer(e).getPaintProperty(n) - } - setFeatureState(e, n) { - this._checkLoaded(); - const s = e.source, - u = e.sourceLayer, - d = this.sourceCaches[s]; - if (d === void 0) return void this.fire(new o.k(new Error(`The source '${s}' does not exist in the map's style.`))); - const m = d.getSource().type; - m === "geojson" && u ? this.fire(new o.k(new Error("GeoJSON sources cannot have a sourceLayer parameter."))) : m !== "vector" || u ? (e.id === void 0 && this.fire(new o.k(new Error("The feature id parameter must be provided."))), d.setFeatureState(u, e.id, n)) : this.fire(new o.k(new Error("The sourceLayer parameter must be provided for vector source types."))) - } - removeFeatureState(e, n) { - this._checkLoaded(); - const s = e.source, - u = this.sourceCaches[s]; - if (u === void 0) return void this.fire(new o.k(new Error(`The source '${s}' does not exist in the map's style.`))); - const d = u.getSource().type, - m = d === "vector" ? e.sourceLayer : void 0; - d !== "vector" || m ? n && typeof e.id != "string" && typeof e.id != "number" ? this.fire(new o.k(new Error("A feature id is required to remove its specific state property."))) : u.removeFeatureState(m, e.id, n) : this.fire(new o.k(new Error("The sourceLayer parameter must be provided for vector source types."))) - } - getFeatureState(e) { - this._checkLoaded(); - const n = e.source, - s = e.sourceLayer, - u = this.sourceCaches[n]; - if (u !== void 0) return u.getSource().type !== "vector" || s ? (e.id === void 0 && this.fire(new o.k(new Error("The feature id parameter must be provided."))), u.getFeatureState(s, e.id)) : void this.fire(new o.k(new Error("The sourceLayer parameter must be provided for vector source types."))); - this.fire(new o.k(new Error(`The source '${n}' does not exist in the map's style.`))) - } - getTransition() { - return o.e({ - duration: 300, - delay: 0 - }, this.stylesheet && this.stylesheet.transition) - } - serialize() { - if (!this._loaded) return; - const e = o.bN(this.sourceCaches, (d => d.serialize())), - n = this._serializeByIds(this._order, !0), - s = this.map.getTerrain() || void 0, - u = this.stylesheet; - return o.bO({ - version: u.version, - name: u.name, - metadata: u.metadata, - light: u.light, - sky: u.sky, - center: u.center, - zoom: u.zoom, - bearing: u.bearing, - pitch: u.pitch, - sprite: u.sprite, - glyphs: u.glyphs, - transition: u.transition, - projection: u.projection, - sources: e, - layers: n, - terrain: s - }, (d => d !== void 0)) - } - _updateLayer(e) { - this._updatedLayers[e.id] = !0, e.source && !this._updatedSources[e.source] && this.sourceCaches[e.source].getSource().type !== "raster" && (this._updatedSources[e.source] = "reload", this.sourceCaches[e.source].pause()), this._serializedLayers = null, this._changed = !0 - } - _flattenAndSortRenderedFeatures(e) { - const n = m => this._layers[m].type === "fill-extrusion", - s = {}, - u = []; - for (let m = this._order.length - 1; m >= 0; m--) { - const y = this._order[m]; - if (n(y)) { - s[y] = m; - for (const w of e) { - const P = w[y]; - if (P) - for (const M of P) u.push(M) - } - } - } - u.sort(((m, y) => y.intersectionZ - m.intersectionZ)); - const d = []; - for (let m = this._order.length - 1; m >= 0; m--) { - const y = this._order[m]; - if (n(y)) - for (let w = u.length - 1; w >= 0; w--) { - const P = u[w].feature; - if (s[P.layer.id] < m) break; - d.push(P), u.pop() - } else - for (const w of e) { - const P = w[y]; - if (P) - for (const M of P) d.push(M.feature) - } - } - return d - } - queryRenderedFeatures(e, n, s) { - n && n.filter && this._validate(o.z.filter, "queryRenderedFeatures.filter", n.filter, null, n); - const u = {}; - if (n && n.layers) { - if (!(Array.isArray(n.layers) || n.layers instanceof Set)) return this.fire(new o.k(new Error("parameters.layers must be an Array or a Set of strings"))), []; - for (const P of n.layers) { - const M = this._layers[P]; - if (!M) return this.fire(new o.k(new Error(`The layer '${P}' does not exist in the map's style and cannot be queried for features.`))), []; - u[M.source] = !0 - } - } - const d = []; - n.availableImages = this._availableImages; - const m = this._serializedAllLayers(), - y = n.layers instanceof Set ? n.layers : Array.isArray(n.layers) ? new Set(n.layers) : null, - w = Object.assign(Object.assign({}, n), { - layers: y - }); - for (const P in this.sourceCaches) n.layers && !u[P] || d.push(It(this.sourceCaches[P], this._layers, m, e, w, s, this.map.terrain ? (M, D, z) => this.map.terrain.getElevation(M, D, z) : void 0)); - return this.placement && d.push((function(P, M, D, z, B, U, ee) { - const J = {}, - re = U.queryRenderedSymbols(z), - se = []; - for (const de of Object.keys(re).map(Number)) se.push(ee[de]); - se.sort(ut); - for (const de of se) { - const ue = de.featureIndex.lookupSymbolFeatures(re[de.bucketInstanceId], M, de.bucketIndex, de.sourceLayerIndex, B.filter, B.layers, B.availableImages, P); - for (const ge in ue) { - const Te = J[ge] = J[ge] || [], - he = ue[ge]; - he.sort(((De, He) => { - const je = de.featureSortOrder; - if (je) { - const qe = je.indexOf(De.featureIndex); - return je.indexOf(He.featureIndex) - qe - } - return He.featureIndex - De.featureIndex - })); - for (const De of he) Te.push(De) - } - } - return (function(de, ue, ge) { - for (const Te in de) - for (const he of de[Te]) bt(he, ge[ue[Te].source]); - return de - })(J, P, D) - })(this._layers, m, this.sourceCaches, e, w, this.placement.collisionIndex, this.placement.retainedQueryData)), this._flattenAndSortRenderedFeatures(d) - } - querySourceFeatures(e, n) { - n && n.filter && this._validate(o.z.filter, "querySourceFeatures.filter", n.filter, null, n); - const s = this.sourceCaches[e]; - return s ? (function(u, d) { - const m = u.getRenderableIds().map((P => u.getTileByID(P))), - y = [], - w = {}; - for (let P = 0; P < m.length; P++) { - const M = m[P], - D = M.tileID.canonical.key; - w[D] || (w[D] = !0, M.querySourceFeatures(y, d)) - } - return y - })(s, n) : [] - } - getLight() { - return this.light.getLight() - } - setLight(e, n = {}) { - this._checkLoaded(); - const s = this.light.getLight(); - let u = !1; - for (const m in e) - if (!o.bH(e[m], s[m])) { - u = !0; - break - } if (!u) return; - const d = { - now: ye.now(), - transition: o.e({ - duration: 300, - delay: 0 - }, this.stylesheet.transition) - }; - this.light.setLight(e, n), this.light.updateTransitions(d) - } - getProjection() { - var e; - return (e = this.stylesheet) === null || e === void 0 ? void 0 : e.projection - } - setProjection(e) { - if (this._checkLoaded(), this.projection) { - if (this.projection.name === e.type) return; - this.projection.destroy(), delete this.projection - } - this.stylesheet.projection = e, this._setProjectionInternal(e.type) - } - getSky() { - var e; - return (e = this.stylesheet) === null || e === void 0 ? void 0 : e.sky - } - setSky(e, n = {}) { - this._checkLoaded(); - const s = this.getSky(); - let u = !1; - if (!e && !s) return; - if (e && !s) u = !0; - else if (!e && s) u = !0; - else - for (const m in e) - if (!o.bH(e[m], s[m])) { - u = !0; - break - } if (!u) return; - const d = { - now: ye.now(), - transition: o.e({ - duration: 300, - delay: 0 - }, this.stylesheet.transition) - }; - this.stylesheet.sky = e, this.sky.setSky(e, n), this.sky.updateTransitions(d) - } - _setProjectionInternal(e) { - const n = (function(s) { - if (Array.isArray(s)) { - const u = new Qo({ - type: s - }); - return { - projection: u, - transform: new _o, - cameraHelper: new gh(u) - } - } - switch (s) { - case "mercator": - return { - projection: new yr, transform: new wi, cameraHelper: new hn - }; - case "globe": { - const u = new Qo({ - type: ["interpolate", ["linear"], - ["zoom"], 11, "vertical-perspective", 12, "mercator" - ] - }); - return { - projection: u, - transform: new _o, - cameraHelper: new gh(u) - } - } - case "vertical-perspective": - return { - projection: new co, transform: new mo, cameraHelper: new Dn - }; - default: - return o.w(`Unknown projection name: ${s}. Falling back to mercator projection.`), { - projection: new yr, - transform: new wi, - cameraHelper: new hn - } - } - })(e); - this.projection = n.projection, this.map.migrateProjection(n.transform, n.cameraHelper); - for (const s in this.sourceCaches) this.sourceCaches[s].reload() - } - _validate(e, n, s, u, d = {}) { - return (!d || d.validate !== !1) && tl(this, e.call(o.z, o.e({ - key: n, - style: this.serialize(), - value: s, - styleSpec: o.v - }, u))) - } - _remove(e = !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), kr().off(ur, this._rtlPluginLoaded); - for (const n in this._layers) this._layers[n].setEventedParent(null); - for (const n in this.sourceCaches) { - const s = this.sourceCaches[n]; - s.setEventedParent(null), s.onRemove(this.map) - } - this.imageManager.setEventedParent(null), this.setEventedParent(null), e && this.dispatcher.broadcast("RM", void 0), this.dispatcher.remove(e) - } - _clearSource(e) { - this.sourceCaches[e].clearTiles() - } - _reloadSource(e) { - this.sourceCaches[e].resume(), this.sourceCaches[e].reload() - } - _updateSources(e) { - for (const n in this.sourceCaches) this.sourceCaches[n].update(e, this.map.terrain) - } - _generateCollisionBoxes() { - for (const e in this.sourceCaches) this._reloadSource(e) - } - _updatePlacement(e, n, s, u, d = !1) { - let m = !1, - y = !1; - const w = {}; - for (const P of this._order) { - const M = this._layers[P]; - if (M.type !== "symbol") continue; - if (!w[M.source]) { - const z = this.sourceCaches[M.source]; - w[M.source] = z.getRenderableIds(!0).map((B => z.getTileByID(B))).sort(((B, U) => U.tileID.overscaledZ - B.tileID.overscaledZ || (B.tileID.isLessThan(U.tileID) ? -1 : 1))) - } - const D = this.crossTileSymbolIndex.addLayer(M, w[M.source], e.center.lng); - m = m || D - } - if (this.crossTileSymbolIndex.pruneUnusedLayers(this._order), ((d = d || this._layerOrderChanged || s === 0) || !this.pauseablePlacement || this.pauseablePlacement.isDone() && !this.placement.stillRecent(ye.now(), e.zoom)) && (this.pauseablePlacement = new gn(e, this.map.terrain, this._order, d, n, s, u, this.placement), this._layerOrderChanged = !1), this.pauseablePlacement.isDone() ? this.placement.setStale() : (this.pauseablePlacement.continuePlacement(this._order, this._layers, w), this.pauseablePlacement.isDone() && (this.placement = this.pauseablePlacement.commit(ye.now()), y = !0), m && this.pauseablePlacement.placement.setStale()), y || m) - for (const P of this._order) { - const M = this._layers[P]; - M.type === "symbol" && this.placement.updateLayerOpacities(M, w[M.source]) - } - return !this.pauseablePlacement.isDone() || this.placement.hasTransitions(ye.now()) - } - _releaseSymbolFadeTiles() { - for (const e in this.sourceCaches) this.sourceCaches[e].releaseSymbolFadeTiles() - } - getImages(e, n) { - return o._(this, void 0, void 0, (function*() { - const s = yield this.imageManager.getImages(n.icons); - this._updateTilesForChangedImages(); - const u = this.sourceCaches[n.source]; - return u && u.setDependencies(n.tileID.key, n.type, n.icons), s - })) - } - getGlyphs(e, n) { - return o._(this, void 0, void 0, (function*() { - const s = yield this.glyphManager.getGlyphs(n.stacks), u = this.sourceCaches[n.source]; - return u && u.setDependencies(n.tileID.key, n.type, [""]), s - })) - } - getGlyphsUrl() { - return this.stylesheet.glyphs || null - } - setGlyphs(e, n = {}) { - this._checkLoaded(), e && this._validate(o.z.glyphs, "glyphs", e, null, n) || (this._glyphsDidChange = !0, this.stylesheet.glyphs = e, this.glyphManager.entries = {}, this.glyphManager.setURL(e)) - } - addSprite(e, n, s = {}, u) { - this._checkLoaded(); - const d = [{ - id: e, - url: n - }], - m = [...ht(this.stylesheet.sprite), ...d]; - this._validate(o.z.sprite, "sprite", m, null, s) || (this.stylesheet.sprite = m, this._loadSprite(d, !0, u)) - } - removeSprite(e) { - this._checkLoaded(); - const n = ht(this.stylesheet.sprite); - if (n.find((s => s.id === e))) { - if (this._spritesImagesIds[e]) - for (const s of this._spritesImagesIds[e]) this.imageManager.removeImage(s), this._changedImages[s] = !0; - n.splice(n.findIndex((s => s.id === e)), 1), this.stylesheet.sprite = n.length > 0 ? n : void 0, delete this._spritesImagesIds[e], this._availableImages = this.imageManager.listImages(), this._changed = !0, this.dispatcher.broadcast("SI", this._availableImages), this.fire(new o.l("data", { - dataType: "style" - })) - } else this.fire(new o.k(new Error(`Sprite "${e}" doesn't exists on this map.`))) - } - getSprite() { - return ht(this.stylesheet.sprite) - } - setSprite(e, n = {}, s) { - this._checkLoaded(), e && this._validate(o.z.sprite, "sprite", e, null, n) || (this.stylesheet.sprite = e, e ? this._loadSprite(e, !0, s) : (this._unloadSprite(), s && s(null))) - } - } - var Qd = o.aJ([{ - name: "a_pos", - type: "Int16", - components: 2 - }, { - name: "a_texture_pos", - type: "Int16", - components: 2 - }]); - class ep { - constructor() { - this.boundProgram = null, this.boundLayoutVertexBuffer = null, this.boundPaintVertexBuffers = [], this.boundIndexBuffer = null, this.boundVertexOffset = null, this.boundDynamicVertexBuffer = null, this.vao = null - } - bind(e, n, s, u, d, m, y, w, P) { - this.context = e; - let M = this.boundPaintVertexBuffers.length !== u.length; - for (let D = 0; !M && D < u.length; D++) this.boundPaintVertexBuffers[D] !== u[D] && (M = !0); - !this.vao || this.boundProgram !== n || this.boundLayoutVertexBuffer !== s || M || this.boundIndexBuffer !== d || this.boundVertexOffset !== m || this.boundDynamicVertexBuffer !== y || this.boundDynamicVertexBuffer2 !== w || this.boundDynamicVertexBuffer3 !== P ? this.freshBind(n, s, u, d, m, y, w, P) : (e.bindVertexArray.set(this.vao), y && y.bind(), d && d.dynamicDraw && d.bind(), w && w.bind(), P && P.bind()) - } - freshBind(e, n, s, u, d, m, y, w) { - const P = e.numAttributes, - M = this.context, - D = M.gl; - this.vao && this.destroy(), this.vao = M.createVertexArray(), M.bindVertexArray.set(this.vao), this.boundProgram = e, this.boundLayoutVertexBuffer = n, this.boundPaintVertexBuffers = s, this.boundIndexBuffer = u, this.boundVertexOffset = d, this.boundDynamicVertexBuffer = m, this.boundDynamicVertexBuffer2 = y, this.boundDynamicVertexBuffer3 = w, n.enableAttributes(D, e); - for (const z of s) z.enableAttributes(D, e); - m && m.enableAttributes(D, e), y && y.enableAttributes(D, e), w && w.enableAttributes(D, e), n.bind(), n.setVertexAttribPointers(D, e, d); - for (const z of s) z.bind(), z.setVertexAttribPointers(D, e, d); - m && (m.bind(), m.setVertexAttribPointers(D, e, d)), u && u.bind(), y && (y.bind(), y.setVertexAttribPointers(D, e, d)), w && (w.bind(), w.setVertexAttribPointers(D, e, d)), M.currentNumAttributes = P - } - destroy() { - this.vao && (this.context.deleteVertexArray(this.vao), this.vao = null) - } - } - const rl = (h, e, n, s, u) => ({ - u_texture: 0, - u_ele_delta: h, - u_fog_matrix: e, - u_fog_color: n ? n.properties.get("fog-color") : o.bf.white, - u_fog_ground_blend: n ? n.properties.get("fog-ground-blend") : 1, - u_fog_ground_blend_opacity: u ? 0 : n ? n.calculateFogBlendOpacity(s) : 0, - u_horizon_color: n ? n.properties.get("horizon-color") : o.bf.white, - u_horizon_fog_blend: n ? n.properties.get("horizon-fog-blend") : 1, - u_is_globe_mode: u ? 1 : 0 - }), - vc = { - 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 ms(h) { - const e = []; - for (let n = 0; n < h.length; n++) { - if (h[n] === null) continue; - const s = h[n].split(" "); - e.push(s.pop()) - } - return e - } - class yc { - constructor(e, n, s, u, d, m, y, w, P = []) { - const M = e.gl; - this.program = M.createProgram(); - const D = ms(n.staticAttributes), - z = s ? s.getBinderAttributes() : [], - B = D.concat(z), - U = pi.prelude.staticUniforms ? ms(pi.prelude.staticUniforms) : [], - ee = y.staticUniforms ? ms(y.staticUniforms) : [], - J = n.staticUniforms ? ms(n.staticUniforms) : [], - re = s ? s.getBinderUniforms() : [], - se = U.concat(ee).concat(J).concat(re), - de = []; - for (const je of se) de.indexOf(je) < 0 && de.push(je); - const ue = s ? s.defines() : []; - Ra(M) && ue.unshift("#version 300 es"), d && ue.push("#define OVERDRAW_INSPECTOR;"), m && ue.push("#define TERRAIN3D;"), w && ue.push(w), P && ue.push(...P); - let ge = ue.concat(pi.prelude.fragmentSource, y.fragmentSource, n.fragmentSource).join(` -`), - Te = ue.concat(pi.prelude.vertexSource, y.vertexSource, n.vertexSource).join(` -`); - Ra(M) || (ge = (function(je) { - return je.replace(/\bin\s/g, "varying ").replace("out highp vec4 fragColor;", "").replace(/fragColor/g, "gl_FragColor").replace(/texture\(/g, "texture2D(") - })(ge), Te = (function(je) { - return je.replace(/\bin\s/g, "attribute ").replace(/\bout\s/g, "varying ").replace(/texture\(/g, "texture2D(") - })(Te)); - const he = M.createShader(M.FRAGMENT_SHADER); - if (M.isContextLost()) return void(this.failedToCreate = !0); - if (M.shaderSource(he, ge), M.compileShader(he), !M.getShaderParameter(he, M.COMPILE_STATUS)) throw new Error(`Could not compile fragment shader: ${M.getShaderInfoLog(he)}`); - M.attachShader(this.program, he); - const De = M.createShader(M.VERTEX_SHADER); - if (M.isContextLost()) return void(this.failedToCreate = !0); - if (M.shaderSource(De, Te), M.compileShader(De), !M.getShaderParameter(De, M.COMPILE_STATUS)) throw new Error(`Could not compile vertex shader: ${M.getShaderInfoLog(De)}`); - M.attachShader(this.program, De), this.attributes = {}; - const He = {}; - this.numAttributes = B.length; - for (let je = 0; je < this.numAttributes; je++) B[je] && (M.bindAttribLocation(this.program, je, B[je]), this.attributes[B[je]] = je); - if (M.linkProgram(this.program), !M.getProgramParameter(this.program, M.LINK_STATUS)) throw new Error(`Program failed to link: ${M.getProgramInfoLog(this.program)}`); - M.deleteShader(De), M.deleteShader(he); - for (let je = 0; je < de.length; je++) { - const qe = de[je]; - if (qe && !He[qe]) { - const $e = M.getUniformLocation(this.program, qe); - $e && (He[qe] = $e) - } - } - this.fixedUniforms = u(e, He), this.terrainUniforms = ((je, qe) => ({ - u_depth: new o.bP(je, qe.u_depth), - u_terrain: new o.bP(je, qe.u_terrain), - u_terrain_dim: new o.bg(je, qe.u_terrain_dim), - u_terrain_matrix: new o.bR(je, qe.u_terrain_matrix), - u_terrain_unpack: new o.bS(je, qe.u_terrain_unpack), - u_terrain_exaggeration: new o.bg(je, qe.u_terrain_exaggeration) - }))(e, He), this.projectionUniforms = ((je, qe) => ({ - u_projection_matrix: new o.bR(je, qe.u_projection_matrix), - u_projection_tile_mercator_coords: new o.bS(je, qe.u_projection_tile_mercator_coords), - u_projection_clipping_plane: new o.bS(je, qe.u_projection_clipping_plane), - u_projection_transition: new o.bg(je, qe.u_projection_transition), - u_projection_fallback_matrix: new o.bR(je, qe.u_projection_fallback_matrix) - }))(e, He), this.binderUniforms = s ? s.getUniforms(e, He) : [] - } - draw(e, n, s, u, d, m, y, w, P, M, D, z, B, U, ee, J, re, se, de) { - const ue = e.gl; - if (this.failedToCreate) return; - if (e.program.set(this.program), e.setDepthMode(s), e.setStencilMode(u), e.setColorMode(d), e.setCullFace(m), w) { - e.activeTexture.set(ue.TEXTURE2), ue.bindTexture(ue.TEXTURE_2D, w.depthTexture), e.activeTexture.set(ue.TEXTURE3), ue.bindTexture(ue.TEXTURE_2D, w.texture); - for (const Te in this.terrainUniforms) this.terrainUniforms[Te].set(w[Te]) - } - if (P) - for (const Te in P) this.projectionUniforms[vc[Te]].set(P[Te]); - if (y) - for (const Te in this.fixedUniforms) this.fixedUniforms[Te].set(y[Te]); - J && J.setUniforms(e, this.binderUniforms, U, { - zoom: ee - }); - let ge = 0; - switch (n) { - case ue.LINES: - ge = 2; - break; - case ue.TRIANGLES: - ge = 3; - break; - case ue.LINE_STRIP: - ge = 1 - } - for (const Te of B.get()) { - const he = Te.vaos || (Te.vaos = {}); - (he[M] || (he[M] = new ep)).bind(e, this, D, J ? J.getPaintVertexBuffers() : [], z, Te.vertexOffset, re, se, de), ue.drawElements(n, Te.primitiveLength * ge, ue.UNSIGNED_SHORT, Te.primitiveOffset * ge * 2) - } - } - } - - function il(h, e, n) { - const s = 1 / o.aC(n, 1, e.transform.tileZoom), - u = Math.pow(2, n.tileID.overscaledZ), - d = n.tileSize * Math.pow(2, e.transform.tileZoom) / u, - m = d * (n.tileID.canonical.x + n.tileID.wrap * u), - y = d * n.tileID.canonical.y; - return { - u_image: 0, - u_texsize: n.imageAtlasTexture.size, - u_scale: [s, h.fromScale, h.toScale], - u_fade: h.t, - u_pixel_coord_upper: [m >> 16, y >> 16], - u_pixel_coord_lower: [65535 & m, 65535 & y] - } - } - const ya = (h, e, n, s) => { - const u = h.style.light, - d = u.properties.get("position"), - m = [d.x, d.y, d.z], - y = o.bV(); - u.properties.get("anchor") === "viewport" && o.bW(y, h.transform.bearingInRadians), o.bX(m, m, y); - const w = h.transform.transformLightDirection(m), - P = u.properties.get("color"); - return { - u_lightpos: m, - u_lightpos_globe: w, - u_lightintensity: u.properties.get("intensity"), - u_lightcolor: [P.r, P.g, P.b], - u_vertical_gradient: +e, - u_opacity: n, - u_fill_translate: s - } - }, - tp = (h, e, n, s, u, d, m) => o.e(ya(h, e, n, s), il(d, h, m), { - u_height_factor: -Math.pow(2, u.overscaledZ) / m.tileSize / 8 - }), - nl = (h, e, n, s) => o.e(il(e, h, n), { - u_fill_translate: s - }), - go = (h, e) => ({ - u_world: h, - u_fill_translate: e - }), - vo = (h, e, n, s, u) => o.e(nl(h, e, n, u), { - u_world: s - }), - rp = (h, e, n, s, u) => { - const d = h.transform; - let m, y, w = 0; - if (n.paint.get("circle-pitch-alignment") === "map") { - const P = o.aC(e, 1, d.zoom); - m = !0, y = [P, P], w = P / (o.$ * Math.pow(2, e.tileID.overscaledZ)) * 2 * Math.PI * u - } else m = !1, y = d.pixelsToGLUnits; - return { - u_camera_to_center_distance: d.cameraToCenterDistance, - u_scale_with_map: +(n.paint.get("circle-pitch-scale") === "map"), - u_pitch_with_map: +m, - u_device_pixel_ratio: h.pixelRatio, - u_extrude_scale: y, - u_globe_extrude_scale: w, - u_translate: s - } - }, - al = h => ({ - u_pixel_extrude_scale: [1 / h.width, 1 / h.height] - }), - ip = h => ({ - u_viewport_size: [h.width, h.height] - }), - _s = (h, e = 1) => ({ - u_color: h, - u_overlay: 0, - u_overlay_scale: e - }), - vh = (h, e, n, s) => { - const u = o.aC(h, 1, e) / (o.$ * Math.pow(2, h.tileID.overscaledZ)) * 2 * Math.PI * s; - return { - u_extrude_scale: o.aC(h, 1, e), - u_intensity: n, - u_globe_extrude_scale: u - } - }, - xc = (h, e, n, s) => { - const u = o.L(); - o.bY(u, 0, h.width, h.height, 0, 0, 1); - const d = h.context.gl; - return { - u_matrix: u, - u_world: [d.drawingBufferWidth, d.drawingBufferHeight], - u_image: n, - u_color_ramp: s, - u_opacity: e.paint.get("heatmap-opacity") - } - }, - np = (h, e, n) => { - const s = n.paint.get("hillshade-accent-color"); - let u; - switch (n.paint.get("hillshade-method")) { - case "basic": - u = 4; - break; - case "combined": - u = 1; - break; - case "igor": - u = 2; - break; - case "multidirectional": - u = 3; - break; - default: - u = 0 - } - const d = n.getIlluminationProperties(); - for (let m = 0; m < d.directionRadians.length; m++) n.paint.get("hillshade-illumination-anchor") === "viewport" && (d.directionRadians[m] += h.transform.bearingInRadians); - return { - u_image: 0, - u_latrange: bc(0, e.tileID), - u_exaggeration: n.paint.get("hillshade-exaggeration"), - u_altitudes: d.altitudeRadians, - u_azimuths: d.directionRadians, - u_accent: s, - u_method: u, - u_highlights: d.highlightColor, - u_shadows: d.shadowColor - } - }, - yh = (h, e) => { - const n = e.stride, - s = o.L(); - return o.bY(s, 0, o.$, -o.$, 0, 0, 1), o.M(s, s, [0, -o.$, 0]), { - u_matrix: s, - u_image: 1, - u_dimension: [n, n], - u_zoom: h.overscaledZ, - u_unpack: e.getUnpackVector() - } - }; - - function bc(h, e) { - const n = Math.pow(2, e.canonical.z), - s = e.canonical.y; - return [new o.a1(0, s / n).toLngLat().lat, new o.a1(0, (s + 1) / n).toLngLat().lat] - } - const xh = (h, e, n = 0) => ({ - u_image: 0, - u_unpack: e.getUnpackVector(), - u_dimension: [e.stride, e.stride], - u_elevation_stops: 1, - u_color_stops: 4, - u_color_ramp_size: n, - u_opacity: h.paint.get("color-relief-opacity") - }), - sl = (h, e, n, s) => { - const u = h.transform; - return { - u_translation: Tc(h, e, n), - u_ratio: s / o.aC(e, 1, u.zoom), - u_device_pixel_ratio: h.pixelRatio, - u_units_to_pixels: [1 / u.pixelsToGLUnits[0], 1 / u.pixelsToGLUnits[1]] - } - }, - bh = (h, e, n, s, u) => o.e(sl(h, e, n, s), { - u_image: 0, - u_image_height: u - }), - wh = (h, e, n, s, u) => { - const d = h.transform, - m = wc(e, d); - return { - u_translation: Tc(h, e, n), - u_texsize: e.imageAtlasTexture.size, - u_ratio: s / o.aC(e, 1, d.zoom), - u_device_pixel_ratio: h.pixelRatio, - u_image: 0, - u_scale: [m, u.fromScale, u.toScale], - u_fade: u.t, - u_units_to_pixels: [1 / d.pixelsToGLUnits[0], 1 / d.pixelsToGLUnits[1]] - } - }, - gs = (h, e, n, s, u, d) => { - const m = h.lineAtlas, - y = wc(e, h.transform), - w = n.layout.get("line-cap") === "round", - P = m.getDash(u.from, w), - M = m.getDash(u.to, w), - D = P.width * d.fromScale, - z = M.width * d.toScale; - return o.e(sl(h, e, n, s), { - u_patternscale_a: [y / D, -P.height / 2], - u_patternscale_b: [y / z, -M.height / 2], - u_sdfgamma: m.width / (256 * Math.min(D, z) * h.pixelRatio) / 2, - u_image: 0, - u_tex_y_a: P.y, - u_tex_y_b: M.y, - u_mix: d.t - }) - }; - - function wc(h, e) { - return 1 / o.aC(h, 1, e.tileZoom) - } - - function Tc(h, e, n) { - return o.aD(h.transform, e, n.paint.get("line-translate"), n.paint.get("line-translate-anchor")) - } - const yo = (h, e, n, s, u) => { - return { - u_tl_parent: h, - u_scale_parent: e, - u_buffer_scale: 1, - u_fade_t: n.mix, - u_opacity: n.opacity * s.paint.get("raster-opacity"), - u_image0: 0, - u_image1: 1, - u_brightness_low: s.paint.get("raster-brightness-min"), - u_brightness_high: s.paint.get("raster-brightness-max"), - u_saturation_factor: (m = s.paint.get("raster-saturation"), m > 0 ? 1 - 1 / (1.001 - m) : -m), - u_contrast_factor: (d = s.paint.get("raster-contrast"), d > 0 ? 1 / (1 - d) : 1 + d), - u_spin_weights: ap(s.paint.get("raster-hue-rotate")), - u_coords_top: [u[0].x, u[0].y, u[1].x, u[1].y], - u_coords_bottom: [u[3].x, u[3].y, u[2].x, u[2].y] - }; - var d, m - }; - - function ap(h) { - h *= Math.PI / 180; - const e = Math.sin(h), - n = Math.cos(h); - return [(2 * n + 1) / 3, (-Math.sqrt(3) * e - n + 1) / 3, (Math.sqrt(3) * e - n + 1) / 3] - } - const xo = (h, e, n, s, u, d, m, y, w, P, M, D, z) => { - const B = m.transform; - return { - u_is_size_zoom_constant: +(h === "constant" || h === "source"), - u_is_size_feature_constant: +(h === "constant" || h === "camera"), - u_size_t: e ? e.uSizeT : 0, - u_size: e ? e.uSize : 0, - u_camera_to_center_distance: B.cameraToCenterDistance, - u_pitch: B.pitch / 360 * 2 * Math.PI, - u_rotate_symbol: +n, - u_aspect_ratio: B.width / B.height, - u_fade_change: m.options.fadeDuration ? m.symbolFadeChange : 1, - u_label_plane_matrix: y, - u_coord_matrix: w, - u_is_text: +M, - u_pitch_with_map: +s, - u_is_along_line: u, - u_is_variable_anchor: d, - u_texsize: D, - u_texture: 0, - u_translation: P, - u_pitched_scale: z - } - }, - Th = (h, e, n, s, u, d, m, y, w, P, M, D, z, B) => { - const U = m.transform; - return o.e(xo(h, e, n, s, u, d, m, y, w, P, M, D, B), { - u_gamma_scale: s ? Math.cos(U.pitch * Math.PI / 180) * U.cameraToCenterDistance : 1, - u_device_pixel_ratio: m.pixelRatio, - u_is_halo: 1 - }) - }, - sp = (h, e, n, s, u, d, m, y, w, P, M, D, z) => o.e(Th(h, e, n, s, u, d, m, y, w, P, !0, M, 0, z), { - u_texsize_icon: D, - u_texture_icon: 1 - }), - Ch = (h, e) => ({ - u_opacity: h, - u_color: e - }), - Sh = (h, e, n, s, u) => o.e((function(d, m, y, w) { - const P = y.imageManager.getPattern(d.from.toString()), - M = y.imageManager.getPattern(d.to.toString()), - { - width: D, - height: z - } = y.imageManager.getPixelSize(), - B = Math.pow(2, w.tileID.overscaledZ), - U = w.tileSize * Math.pow(2, y.transform.tileZoom) / B, - ee = U * (w.tileID.canonical.x + w.tileID.wrap * B), - J = U * w.tileID.canonical.y; - return { - u_image: 0, - u_pattern_tl_a: P.tl, - u_pattern_br_a: P.br, - u_pattern_tl_b: M.tl, - u_pattern_br_b: M.br, - u_texsize: [D, z], - u_mix: m.t, - u_pattern_size_a: P.displaySize, - u_pattern_size_b: M.displaySize, - u_scale_a: m.fromScale, - u_scale_b: m.toScale, - u_tile_units_to_pixels: 1 / o.aC(w, 1, y.transform.tileZoom), - u_pixel_coord_upper: [ee >> 16, J >> 16], - u_pixel_coord_lower: [65535 & ee, 65535 & J] - } - })(n, u, e, s), { - u_opacity: h - }), - Cc = (h, e) => {}, - Sc = { - fillExtrusion: (h, e) => ({ - u_lightpos: new o.bT(h, e.u_lightpos), - u_lightpos_globe: new o.bT(h, e.u_lightpos_globe), - u_lightintensity: new o.bg(h, e.u_lightintensity), - u_lightcolor: new o.bT(h, e.u_lightcolor), - u_vertical_gradient: new o.bg(h, e.u_vertical_gradient), - u_opacity: new o.bg(h, e.u_opacity), - u_fill_translate: new o.bU(h, e.u_fill_translate) - }), - fillExtrusionPattern: (h, e) => ({ - u_lightpos: new o.bT(h, e.u_lightpos), - u_lightpos_globe: new o.bT(h, e.u_lightpos_globe), - u_lightintensity: new o.bg(h, e.u_lightintensity), - u_lightcolor: new o.bT(h, e.u_lightcolor), - u_vertical_gradient: new o.bg(h, e.u_vertical_gradient), - u_height_factor: new o.bg(h, e.u_height_factor), - u_opacity: new o.bg(h, e.u_opacity), - u_fill_translate: new o.bU(h, e.u_fill_translate), - u_image: new o.bP(h, e.u_image), - u_texsize: new o.bU(h, e.u_texsize), - u_pixel_coord_upper: new o.bU(h, e.u_pixel_coord_upper), - u_pixel_coord_lower: new o.bU(h, e.u_pixel_coord_lower), - u_scale: new o.bT(h, e.u_scale), - u_fade: new o.bg(h, e.u_fade) - }), - fill: (h, e) => ({ - u_fill_translate: new o.bU(h, e.u_fill_translate) - }), - fillPattern: (h, e) => ({ - u_image: new o.bP(h, e.u_image), - u_texsize: new o.bU(h, e.u_texsize), - u_pixel_coord_upper: new o.bU(h, e.u_pixel_coord_upper), - u_pixel_coord_lower: new o.bU(h, e.u_pixel_coord_lower), - u_scale: new o.bT(h, e.u_scale), - u_fade: new o.bg(h, e.u_fade), - u_fill_translate: new o.bU(h, e.u_fill_translate) - }), - fillOutline: (h, e) => ({ - u_world: new o.bU(h, e.u_world), - u_fill_translate: new o.bU(h, e.u_fill_translate) - }), - fillOutlinePattern: (h, e) => ({ - u_world: new o.bU(h, e.u_world), - u_image: new o.bP(h, e.u_image), - u_texsize: new o.bU(h, e.u_texsize), - u_pixel_coord_upper: new o.bU(h, e.u_pixel_coord_upper), - u_pixel_coord_lower: new o.bU(h, e.u_pixel_coord_lower), - u_scale: new o.bT(h, e.u_scale), - u_fade: new o.bg(h, e.u_fade), - u_fill_translate: new o.bU(h, e.u_fill_translate) - }), - circle: (h, e) => ({ - u_camera_to_center_distance: new o.bg(h, e.u_camera_to_center_distance), - u_scale_with_map: new o.bP(h, e.u_scale_with_map), - u_pitch_with_map: new o.bP(h, e.u_pitch_with_map), - u_extrude_scale: new o.bU(h, e.u_extrude_scale), - u_device_pixel_ratio: new o.bg(h, e.u_device_pixel_ratio), - u_globe_extrude_scale: new o.bg(h, e.u_globe_extrude_scale), - u_translate: new o.bU(h, e.u_translate) - }), - collisionBox: (h, e) => ({ - u_pixel_extrude_scale: new o.bU(h, e.u_pixel_extrude_scale) - }), - collisionCircle: (h, e) => ({ - u_viewport_size: new o.bU(h, e.u_viewport_size) - }), - debug: (h, e) => ({ - u_color: new o.bQ(h, e.u_color), - u_overlay: new o.bP(h, e.u_overlay), - u_overlay_scale: new o.bg(h, e.u_overlay_scale) - }), - depth: Cc, - clippingMask: Cc, - heatmap: (h, e) => ({ - u_extrude_scale: new o.bg(h, e.u_extrude_scale), - u_intensity: new o.bg(h, e.u_intensity), - u_globe_extrude_scale: new o.bg(h, e.u_globe_extrude_scale) - }), - heatmapTexture: (h, e) => ({ - u_matrix: new o.bR(h, e.u_matrix), - u_world: new o.bU(h, e.u_world), - u_image: new o.bP(h, e.u_image), - u_color_ramp: new o.bP(h, e.u_color_ramp), - u_opacity: new o.bg(h, e.u_opacity) - }), - hillshade: (h, e) => ({ - u_image: new o.bP(h, e.u_image), - u_latrange: new o.bU(h, e.u_latrange), - u_exaggeration: new o.bg(h, e.u_exaggeration), - u_altitudes: new o.b_(h, e.u_altitudes), - u_azimuths: new o.b_(h, e.u_azimuths), - u_accent: new o.bQ(h, e.u_accent), - u_method: new o.bP(h, e.u_method), - u_shadows: new o.bZ(h, e.u_shadows), - u_highlights: new o.bZ(h, e.u_highlights) - }), - hillshadePrepare: (h, e) => ({ - u_matrix: new o.bR(h, e.u_matrix), - u_image: new o.bP(h, e.u_image), - u_dimension: new o.bU(h, e.u_dimension), - u_zoom: new o.bg(h, e.u_zoom), - u_unpack: new o.bS(h, e.u_unpack) - }), - colorRelief: (h, e) => ({ - u_image: new o.bP(h, e.u_image), - u_unpack: new o.bS(h, e.u_unpack), - u_dimension: new o.bU(h, e.u_dimension), - u_elevation_stops: new o.bP(h, e.u_elevation_stops), - u_color_stops: new o.bP(h, e.u_color_stops), - u_color_ramp_size: new o.bP(h, e.u_color_ramp_size), - u_opacity: new o.bg(h, e.u_opacity) - }), - line: (h, e) => ({ - u_translation: new o.bU(h, e.u_translation), - u_ratio: new o.bg(h, e.u_ratio), - u_device_pixel_ratio: new o.bg(h, e.u_device_pixel_ratio), - u_units_to_pixels: new o.bU(h, e.u_units_to_pixels) - }), - lineGradient: (h, e) => ({ - u_translation: new o.bU(h, e.u_translation), - u_ratio: new o.bg(h, e.u_ratio), - u_device_pixel_ratio: new o.bg(h, e.u_device_pixel_ratio), - u_units_to_pixels: new o.bU(h, e.u_units_to_pixels), - u_image: new o.bP(h, e.u_image), - u_image_height: new o.bg(h, e.u_image_height) - }), - linePattern: (h, e) => ({ - u_translation: new o.bU(h, e.u_translation), - u_texsize: new o.bU(h, e.u_texsize), - u_ratio: new o.bg(h, e.u_ratio), - u_device_pixel_ratio: new o.bg(h, e.u_device_pixel_ratio), - u_image: new o.bP(h, e.u_image), - u_units_to_pixels: new o.bU(h, e.u_units_to_pixels), - u_scale: new o.bT(h, e.u_scale), - u_fade: new o.bg(h, e.u_fade) - }), - lineSDF: (h, e) => ({ - u_translation: new o.bU(h, e.u_translation), - u_ratio: new o.bg(h, e.u_ratio), - u_device_pixel_ratio: new o.bg(h, e.u_device_pixel_ratio), - u_units_to_pixels: new o.bU(h, e.u_units_to_pixels), - u_patternscale_a: new o.bU(h, e.u_patternscale_a), - u_patternscale_b: new o.bU(h, e.u_patternscale_b), - u_sdfgamma: new o.bg(h, e.u_sdfgamma), - u_image: new o.bP(h, e.u_image), - u_tex_y_a: new o.bg(h, e.u_tex_y_a), - u_tex_y_b: new o.bg(h, e.u_tex_y_b), - u_mix: new o.bg(h, e.u_mix) - }), - raster: (h, e) => ({ - u_tl_parent: new o.bU(h, e.u_tl_parent), - u_scale_parent: new o.bg(h, e.u_scale_parent), - u_buffer_scale: new o.bg(h, e.u_buffer_scale), - u_fade_t: new o.bg(h, e.u_fade_t), - u_opacity: new o.bg(h, e.u_opacity), - u_image0: new o.bP(h, e.u_image0), - u_image1: new o.bP(h, e.u_image1), - u_brightness_low: new o.bg(h, e.u_brightness_low), - u_brightness_high: new o.bg(h, e.u_brightness_high), - u_saturation_factor: new o.bg(h, e.u_saturation_factor), - u_contrast_factor: new o.bg(h, e.u_contrast_factor), - u_spin_weights: new o.bT(h, e.u_spin_weights), - u_coords_top: new o.bS(h, e.u_coords_top), - u_coords_bottom: new o.bS(h, e.u_coords_bottom) - }), - symbolIcon: (h, e) => ({ - u_is_size_zoom_constant: new o.bP(h, e.u_is_size_zoom_constant), - u_is_size_feature_constant: new o.bP(h, e.u_is_size_feature_constant), - u_size_t: new o.bg(h, e.u_size_t), - u_size: new o.bg(h, e.u_size), - u_camera_to_center_distance: new o.bg(h, e.u_camera_to_center_distance), - u_pitch: new o.bg(h, e.u_pitch), - u_rotate_symbol: new o.bP(h, e.u_rotate_symbol), - u_aspect_ratio: new o.bg(h, e.u_aspect_ratio), - u_fade_change: new o.bg(h, e.u_fade_change), - u_label_plane_matrix: new o.bR(h, e.u_label_plane_matrix), - u_coord_matrix: new o.bR(h, e.u_coord_matrix), - u_is_text: new o.bP(h, e.u_is_text), - u_pitch_with_map: new o.bP(h, e.u_pitch_with_map), - u_is_along_line: new o.bP(h, e.u_is_along_line), - u_is_variable_anchor: new o.bP(h, e.u_is_variable_anchor), - u_texsize: new o.bU(h, e.u_texsize), - u_texture: new o.bP(h, e.u_texture), - u_translation: new o.bU(h, e.u_translation), - u_pitched_scale: new o.bg(h, e.u_pitched_scale) - }), - symbolSDF: (h, e) => ({ - u_is_size_zoom_constant: new o.bP(h, e.u_is_size_zoom_constant), - u_is_size_feature_constant: new o.bP(h, e.u_is_size_feature_constant), - u_size_t: new o.bg(h, e.u_size_t), - u_size: new o.bg(h, e.u_size), - u_camera_to_center_distance: new o.bg(h, e.u_camera_to_center_distance), - u_pitch: new o.bg(h, e.u_pitch), - u_rotate_symbol: new o.bP(h, e.u_rotate_symbol), - u_aspect_ratio: new o.bg(h, e.u_aspect_ratio), - u_fade_change: new o.bg(h, e.u_fade_change), - u_label_plane_matrix: new o.bR(h, e.u_label_plane_matrix), - u_coord_matrix: new o.bR(h, e.u_coord_matrix), - u_is_text: new o.bP(h, e.u_is_text), - u_pitch_with_map: new o.bP(h, e.u_pitch_with_map), - u_is_along_line: new o.bP(h, e.u_is_along_line), - u_is_variable_anchor: new o.bP(h, e.u_is_variable_anchor), - u_texsize: new o.bU(h, e.u_texsize), - u_texture: new o.bP(h, e.u_texture), - u_gamma_scale: new o.bg(h, e.u_gamma_scale), - u_device_pixel_ratio: new o.bg(h, e.u_device_pixel_ratio), - u_is_halo: new o.bP(h, e.u_is_halo), - u_translation: new o.bU(h, e.u_translation), - u_pitched_scale: new o.bg(h, e.u_pitched_scale) - }), - symbolTextAndIcon: (h, e) => ({ - u_is_size_zoom_constant: new o.bP(h, e.u_is_size_zoom_constant), - u_is_size_feature_constant: new o.bP(h, e.u_is_size_feature_constant), - u_size_t: new o.bg(h, e.u_size_t), - u_size: new o.bg(h, e.u_size), - u_camera_to_center_distance: new o.bg(h, e.u_camera_to_center_distance), - u_pitch: new o.bg(h, e.u_pitch), - u_rotate_symbol: new o.bP(h, e.u_rotate_symbol), - u_aspect_ratio: new o.bg(h, e.u_aspect_ratio), - u_fade_change: new o.bg(h, e.u_fade_change), - u_label_plane_matrix: new o.bR(h, e.u_label_plane_matrix), - u_coord_matrix: new o.bR(h, e.u_coord_matrix), - u_is_text: new o.bP(h, e.u_is_text), - u_pitch_with_map: new o.bP(h, e.u_pitch_with_map), - u_is_along_line: new o.bP(h, e.u_is_along_line), - u_is_variable_anchor: new o.bP(h, e.u_is_variable_anchor), - u_texsize: new o.bU(h, e.u_texsize), - u_texsize_icon: new o.bU(h, e.u_texsize_icon), - u_texture: new o.bP(h, e.u_texture), - u_texture_icon: new o.bP(h, e.u_texture_icon), - u_gamma_scale: new o.bg(h, e.u_gamma_scale), - u_device_pixel_ratio: new o.bg(h, e.u_device_pixel_ratio), - u_is_halo: new o.bP(h, e.u_is_halo), - u_translation: new o.bU(h, e.u_translation), - u_pitched_scale: new o.bg(h, e.u_pitched_scale) - }), - background: (h, e) => ({ - u_opacity: new o.bg(h, e.u_opacity), - u_color: new o.bQ(h, e.u_color) - }), - backgroundPattern: (h, e) => ({ - u_opacity: new o.bg(h, e.u_opacity), - u_image: new o.bP(h, e.u_image), - u_pattern_tl_a: new o.bU(h, e.u_pattern_tl_a), - u_pattern_br_a: new o.bU(h, e.u_pattern_br_a), - u_pattern_tl_b: new o.bU(h, e.u_pattern_tl_b), - u_pattern_br_b: new o.bU(h, e.u_pattern_br_b), - u_texsize: new o.bU(h, e.u_texsize), - u_mix: new o.bg(h, e.u_mix), - u_pattern_size_a: new o.bU(h, e.u_pattern_size_a), - u_pattern_size_b: new o.bU(h, e.u_pattern_size_b), - u_scale_a: new o.bg(h, e.u_scale_a), - u_scale_b: new o.bg(h, e.u_scale_b), - u_pixel_coord_upper: new o.bU(h, e.u_pixel_coord_upper), - u_pixel_coord_lower: new o.bU(h, e.u_pixel_coord_lower), - u_tile_units_to_pixels: new o.bg(h, e.u_tile_units_to_pixels) - }), - terrain: (h, e) => ({ - u_texture: new o.bP(h, e.u_texture), - u_ele_delta: new o.bg(h, e.u_ele_delta), - u_fog_matrix: new o.bR(h, e.u_fog_matrix), - u_fog_color: new o.bQ(h, e.u_fog_color), - u_fog_ground_blend: new o.bg(h, e.u_fog_ground_blend), - u_fog_ground_blend_opacity: new o.bg(h, e.u_fog_ground_blend_opacity), - u_horizon_color: new o.bQ(h, e.u_horizon_color), - u_horizon_fog_blend: new o.bg(h, e.u_horizon_fog_blend), - u_is_globe_mode: new o.bg(h, e.u_is_globe_mode) - }), - terrainDepth: (h, e) => ({ - u_ele_delta: new o.bg(h, e.u_ele_delta) - }), - terrainCoords: (h, e) => ({ - u_texture: new o.bP(h, e.u_texture), - u_terrain_coords_id: new o.bg(h, e.u_terrain_coords_id), - u_ele_delta: new o.bg(h, e.u_ele_delta) - }), - projectionErrorMeasurement: (h, e) => ({ - u_input: new o.bg(h, e.u_input), - u_output_expected: new o.bg(h, e.u_output_expected) - }), - atmosphere: (h, e) => ({ - u_sun_pos: new o.bT(h, e.u_sun_pos), - u_atmosphere_blend: new o.bg(h, e.u_atmosphere_blend), - u_globe_position: new o.bT(h, e.u_globe_position), - u_globe_radius: new o.bg(h, e.u_globe_radius), - u_inv_proj_matrix: new o.bR(h, e.u_inv_proj_matrix) - }), - sky: (h, e) => ({ - u_sky_color: new o.bQ(h, e.u_sky_color), - u_horizon_color: new o.bQ(h, e.u_horizon_color), - u_horizon: new o.bU(h, e.u_horizon), - u_horizon_normal: new o.bU(h, e.u_horizon_normal), - u_sky_horizon_blend: new o.bg(h, e.u_sky_horizon_blend), - u_sky_blend: new o.bg(h, e.u_sky_blend) - }) - }; - class Ph { - constructor(e, n, s) { - this.context = e; - const u = e.gl; - this.buffer = u.createBuffer(), this.dynamicDraw = !!s, this.context.unbindVAO(), e.bindElementBuffer.set(this.buffer), u.bufferData(u.ELEMENT_ARRAY_BUFFER, n.arrayBuffer, this.dynamicDraw ? u.DYNAMIC_DRAW : u.STATIC_DRAW), this.dynamicDraw || delete n.arrayBuffer - } - bind() { - this.context.bindElementBuffer.set(this.buffer) - } - updateData(e) { - const n = this.context.gl; - if (!this.dynamicDraw) throw new Error("Attempted to update data while not in dynamic mode."); - this.context.unbindVAO(), this.bind(), n.bufferSubData(n.ELEMENT_ARRAY_BUFFER, 0, e.arrayBuffer) - } - destroy() { - this.buffer && (this.context.gl.deleteBuffer(this.buffer), delete this.buffer) - } - } - const ol = { - Int8: "BYTE", - Uint8: "UNSIGNED_BYTE", - Int16: "SHORT", - Uint16: "UNSIGNED_SHORT", - Int32: "INT", - Uint32: "UNSIGNED_INT", - Float32: "FLOAT" - }; - class $a { - constructor(e, n, s, u) { - this.length = n.length, this.attributes = s, this.itemSize = n.bytesPerElement, this.dynamicDraw = u, this.context = e; - const d = e.gl; - this.buffer = d.createBuffer(), e.bindVertexBuffer.set(this.buffer), d.bufferData(d.ARRAY_BUFFER, n.arrayBuffer, this.dynamicDraw ? d.DYNAMIC_DRAW : d.STATIC_DRAW), this.dynamicDraw || delete n.arrayBuffer - } - bind() { - this.context.bindVertexBuffer.set(this.buffer) - } - updateData(e) { - if (e.length !== this.length) throw new Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`); - const n = this.context.gl; - this.bind(), n.bufferSubData(n.ARRAY_BUFFER, 0, e.arrayBuffer) - } - enableAttributes(e, n) { - for (let s = 0; s < this.attributes.length; s++) { - const u = n.attributes[this.attributes[s].name]; - u !== void 0 && e.enableVertexAttribArray(u) - } - } - setVertexAttribPointers(e, n, s) { - for (let u = 0; u < this.attributes.length; u++) { - const d = this.attributes[u], - m = n.attributes[d.name]; - m !== void 0 && e.vertexAttribPointer(m, d.components, e[ol[d.type]], !1, this.itemSize, d.offset + this.itemSize * (s || 0)) - } - } - destroy() { - this.buffer && (this.context.gl.deleteBuffer(this.buffer), delete this.buffer) - } - } - class vi { - constructor(e) { - this.gl = e.gl, this.default = this.getDefault(), this.current = this.default, this.dirty = !1 - } - get() { - return this.current - } - set(e) {} - getDefault() { - return this.default - } - setDefault() { - this.set(this.default) - } - } - class Pc extends vi { - getDefault() { - return o.bf.transparent - } - set(e) { - const n = this.current; - (e.r !== n.r || e.g !== n.g || e.b !== n.b || e.a !== n.a || this.dirty) && (this.gl.clearColor(e.r, e.g, e.b, e.a), this.current = e, this.dirty = !1) - } - } - class Ic extends vi { - getDefault() { - return 1 - } - set(e) { - (e !== this.current || this.dirty) && (this.gl.clearDepth(e), this.current = e, this.dirty = !1) - } - } - class Ih extends vi { - getDefault() { - return 0 - } - set(e) { - (e !== this.current || this.dirty) && (this.gl.clearStencil(e), this.current = e, this.dirty = !1) - } - } - class Mc extends vi { - getDefault() { - return [!0, !0, !0, !0] - } - set(e) { - const n = this.current; - (e[0] !== n[0] || e[1] !== n[1] || e[2] !== n[2] || e[3] !== n[3] || this.dirty) && (this.gl.colorMask(e[0], e[1], e[2], e[3]), this.current = e, this.dirty = !1) - } - } - class vs extends vi { - getDefault() { - return !0 - } - set(e) { - (e !== this.current || this.dirty) && (this.gl.depthMask(e), this.current = e, this.dirty = !1) - } - } - class Ac extends vi { - getDefault() { - return 255 - } - set(e) { - (e !== this.current || this.dirty) && (this.gl.stencilMask(e), this.current = e, this.dirty = !1) - } - } - class op extends vi { - getDefault() { - return { - func: this.gl.ALWAYS, - ref: 0, - mask: 255 - } - } - set(e) { - const n = this.current; - (e.func !== n.func || e.ref !== n.ref || e.mask !== n.mask || this.dirty) && (this.gl.stencilFunc(e.func, e.ref, e.mask), this.current = e, this.dirty = !1) - } - } - class lp extends vi { - getDefault() { - const e = this.gl; - return [e.KEEP, e.KEEP, e.KEEP] - } - set(e) { - const n = this.current; - (e[0] !== n[0] || e[1] !== n[1] || e[2] !== n[2] || this.dirty) && (this.gl.stencilOp(e[0], e[1], e[2]), this.current = e, this.dirty = !1) - } - } - class cp extends vi { - getDefault() { - return !1 - } - set(e) { - if (e === this.current && !this.dirty) return; - const n = this.gl; - e ? n.enable(n.STENCIL_TEST) : n.disable(n.STENCIL_TEST), this.current = e, this.dirty = !1 - } - } - class up extends vi { - getDefault() { - return [0, 1] - } - set(e) { - const n = this.current; - (e[0] !== n[0] || e[1] !== n[1] || this.dirty) && (this.gl.depthRange(e[0], e[1]), this.current = e, this.dirty = !1) - } - } - class Mh extends vi { - getDefault() { - return !1 - } - set(e) { - if (e === this.current && !this.dirty) return; - const n = this.gl; - e ? n.enable(n.DEPTH_TEST) : n.disable(n.DEPTH_TEST), this.current = e, this.dirty = !1 - } - } - class hp extends vi { - getDefault() { - return this.gl.LESS - } - set(e) { - (e !== this.current || this.dirty) && (this.gl.depthFunc(e), this.current = e, this.dirty = !1) - } - } - class Ah extends vi { - getDefault() { - return !1 - } - set(e) { - if (e === this.current && !this.dirty) return; - const n = this.gl; - e ? n.enable(n.BLEND) : n.disable(n.BLEND), this.current = e, this.dirty = !1 - } - } - class ll extends vi { - getDefault() { - const e = this.gl; - return [e.ONE, e.ZERO] - } - set(e) { - const n = this.current; - (e[0] !== n[0] || e[1] !== n[1] || this.dirty) && (this.gl.blendFunc(e[0], e[1]), this.current = e, this.dirty = !1) - } - } - class cl extends vi { - getDefault() { - return o.bf.transparent - } - set(e) { - const n = this.current; - (e.r !== n.r || e.g !== n.g || e.b !== n.b || e.a !== n.a || this.dirty) && (this.gl.blendColor(e.r, e.g, e.b, e.a), this.current = e, this.dirty = !1) - } - } - class ul extends vi { - getDefault() { - return this.gl.FUNC_ADD - } - set(e) { - (e !== this.current || this.dirty) && (this.gl.blendEquation(e), this.current = e, this.dirty = !1) - } - } - class kc extends vi { - getDefault() { - return !1 - } - set(e) { - if (e === this.current && !this.dirty) return; - const n = this.gl; - e ? n.enable(n.CULL_FACE) : n.disable(n.CULL_FACE), this.current = e, this.dirty = !1 - } - } - class ys extends vi { - getDefault() { - return this.gl.BACK - } - set(e) { - (e !== this.current || this.dirty) && (this.gl.cullFace(e), this.current = e, this.dirty = !1) - } - } - class bo extends vi { - getDefault() { - return this.gl.CCW - } - set(e) { - (e !== this.current || this.dirty) && (this.gl.frontFace(e), this.current = e, this.dirty = !1) - } - } - class Os extends vi { - getDefault() { - return null - } - set(e) { - (e !== this.current || this.dirty) && (this.gl.useProgram(e), this.current = e, this.dirty = !1) - } - } - class ca extends vi { - getDefault() { - return this.gl.TEXTURE0 - } - set(e) { - (e !== this.current || this.dirty) && (this.gl.activeTexture(e), this.current = e, this.dirty = !1) - } - } - class kh extends vi { - getDefault() { - const e = this.gl; - return [0, 0, e.drawingBufferWidth, e.drawingBufferHeight] - } - set(e) { - const n = this.current; - (e[0] !== n[0] || e[1] !== n[1] || e[2] !== n[2] || e[3] !== n[3] || this.dirty) && (this.gl.viewport(e[0], e[1], e[2], e[3]), this.current = e, this.dirty = !1) - } - } - class Eh extends vi { - getDefault() { - return null - } - set(e) { - if (e === this.current && !this.dirty) return; - const n = this.gl; - n.bindFramebuffer(n.FRAMEBUFFER, e), this.current = e, this.dirty = !1 - } - } - class Ec extends vi { - getDefault() { - return null - } - set(e) { - if (e === this.current && !this.dirty) return; - const n = this.gl; - n.bindRenderbuffer(n.RENDERBUFFER, e), this.current = e, this.dirty = !1 - } - } - class xs extends vi { - getDefault() { - return null - } - set(e) { - if (e === this.current && !this.dirty) return; - const n = this.gl; - n.bindTexture(n.TEXTURE_2D, e), this.current = e, this.dirty = !1 - } - } - class hl extends vi { - getDefault() { - return null - } - set(e) { - if (e === this.current && !this.dirty) return; - const n = this.gl; - n.bindBuffer(n.ARRAY_BUFFER, e), this.current = e, this.dirty = !1 - } - } - class dl extends vi { - getDefault() { - return null - } - set(e) { - const n = this.gl; - n.bindBuffer(n.ELEMENT_ARRAY_BUFFER, e), this.current = e, this.dirty = !1 - } - } - class wo extends vi { - getDefault() { - return null - } - set(e) { - var n; - if (e === this.current && !this.dirty) return; - const s = this.gl; - Ra(s) ? s.bindVertexArray(e) : (n = s.getExtension("OES_vertex_array_object")) === null || n === void 0 || n.bindVertexArrayOES(e), this.current = e, this.dirty = !1 - } - } - class pl extends vi { - getDefault() { - return 4 - } - set(e) { - if (e === this.current && !this.dirty) return; - const n = this.gl; - n.pixelStorei(n.UNPACK_ALIGNMENT, e), this.current = e, this.dirty = !1 - } - } - class zh extends vi { - getDefault() { - return !1 - } - set(e) { - if (e === this.current && !this.dirty) return; - const n = this.gl; - n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL, e), this.current = e, this.dirty = !1 - } - } - class Ns extends vi { - getDefault() { - return !1 - } - set(e) { - if (e === this.current && !this.dirty) return; - const n = this.gl; - n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL, e), this.current = e, this.dirty = !1 - } - } - class rs extends vi { - constructor(e, n) { - super(e), this.context = e, this.parent = n - } - getDefault() { - return null - } - } - class Lh extends rs { - setDirty() { - this.dirty = !0 - } - set(e) { - if (e === this.current && !this.dirty) return; - this.context.bindFramebuffer.set(this.parent); - const n = this.gl; - n.framebufferTexture2D(n.FRAMEBUFFER, n.COLOR_ATTACHMENT0, n.TEXTURE_2D, e, 0), this.current = e, this.dirty = !1 - } - } - class zc extends rs { - set(e) { - if (e === this.current && !this.dirty) return; - this.context.bindFramebuffer.set(this.parent); - const n = this.gl; - n.framebufferRenderbuffer(n.FRAMEBUFFER, n.DEPTH_ATTACHMENT, n.RENDERBUFFER, e), this.current = e, this.dirty = !1 - } - } - class ii extends rs { - set(e) { - if (e === this.current && !this.dirty) return; - this.context.bindFramebuffer.set(this.parent); - const n = this.gl; - n.framebufferRenderbuffer(n.FRAMEBUFFER, n.DEPTH_STENCIL_ATTACHMENT, n.RENDERBUFFER, e), this.current = e, this.dirty = !1 - } - } - const To = "Framebuffer is not complete"; - class dp { - constructor(e, n, s, u, d) { - this.context = e, this.width = n, this.height = s; - const m = e.gl, - y = this.framebuffer = m.createFramebuffer(); - if (this.colorAttachment = new Lh(e, y), u) this.depthAttachment = d ? new ii(e, y) : new zc(e, y); - else if (d) throw new Error("Stencil cannot be set without depth"); - if (m.checkFramebufferStatus(m.FRAMEBUFFER) !== m.FRAMEBUFFER_COMPLETE) throw new Error(To) - } - destroy() { - const e = this.context.gl, - n = this.colorAttachment.get(); - if (n && e.deleteTexture(n), this.depthAttachment) { - const s = this.depthAttachment.get(); - s && e.deleteRenderbuffer(s) - } - e.deleteFramebuffer(this.framebuffer) - } - } - class Dh { - constructor(e) { - var n, s; - if (this.gl = e, this.clearColor = new Pc(this), this.clearDepth = new Ic(this), this.clearStencil = new Ih(this), this.colorMask = new Mc(this), this.depthMask = new vs(this), this.stencilMask = new Ac(this), this.stencilFunc = new op(this), this.stencilOp = new lp(this), this.stencilTest = new cp(this), this.depthRange = new up(this), this.depthTest = new Mh(this), this.depthFunc = new hp(this), this.blend = new Ah(this), this.blendFunc = new ll(this), this.blendColor = new cl(this), this.blendEquation = new ul(this), this.cullFace = new kc(this), this.cullFaceSide = new ys(this), this.frontFace = new bo(this), this.program = new Os(this), this.activeTexture = new ca(this), this.viewport = new kh(this), this.bindFramebuffer = new Eh(this), this.bindRenderbuffer = new Ec(this), this.bindTexture = new xs(this), this.bindVertexBuffer = new hl(this), this.bindElementBuffer = new dl(this), this.bindVertexArray = new wo(this), this.pixelStoreUnpack = new pl(this), this.pixelStoreUnpackPremultiplyAlpha = new zh(this), this.pixelStoreUnpackFlipY = new Ns(this), this.extTextureFilterAnisotropic = e.getExtension("EXT_texture_filter_anisotropic") || e.getExtension("MOZ_EXT_texture_filter_anisotropic") || e.getExtension("WEBKIT_EXT_texture_filter_anisotropic"), this.extTextureFilterAnisotropic && (this.extTextureFilterAnisotropicMax = e.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)), this.maxTextureSize = e.getParameter(e.MAX_TEXTURE_SIZE), Ra(e)) { - this.HALF_FLOAT = e.HALF_FLOAT; - const u = e.getExtension("EXT_color_buffer_half_float"); - this.RGBA16F = (n = e.RGBA16F) !== null && n !== void 0 ? n : u == null ? void 0 : u.RGBA16F_EXT, this.RGB16F = (s = e.RGB16F) !== null && s !== void 0 ? s : u == null ? void 0 : u.RGB16F_EXT, e.getExtension("EXT_color_buffer_float") - } else { - e.getExtension("EXT_color_buffer_half_float"), e.getExtension("OES_texture_half_float_linear"); - const u = e.getExtension("OES_texture_half_float"); - this.HALF_FLOAT = u == null ? void 0 : u.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(e, n) { - return new Ph(this, e, n) - } - createVertexBuffer(e, n, s) { - return new $a(this, e, n, s) - } - createRenderbuffer(e, n, s) { - const u = this.gl, - d = u.createRenderbuffer(); - return this.bindRenderbuffer.set(d), u.renderbufferStorage(u.RENDERBUFFER, e, n, s), this.bindRenderbuffer.set(null), d - } - createFramebuffer(e, n, s, u) { - return new dp(this, e, n, s, u) - } - clear({ - color: e, - depth: n, - stencil: s - }) { - const u = this.gl; - let d = 0; - e && (d |= u.COLOR_BUFFER_BIT, this.clearColor.set(e), this.colorMask.set([!0, !0, !0, !0])), n !== void 0 && (d |= u.DEPTH_BUFFER_BIT, this.depthRange.set([0, 1]), this.clearDepth.set(n), this.depthMask.set(!0)), s !== void 0 && (d |= u.STENCIL_BUFFER_BIT, this.clearStencil.set(s), this.stencilMask.set(255)), u.clear(d) - } - setCullFace(e) { - e.enable === !1 ? this.cullFace.set(!1) : (this.cullFace.set(!0), this.cullFaceSide.set(e.mode), this.frontFace.set(e.frontFace)) - } - setDepthMode(e) { - e.func !== this.gl.ALWAYS || e.mask ? (this.depthTest.set(!0), this.depthFunc.set(e.func), this.depthMask.set(e.mask), this.depthRange.set(e.range)) : this.depthTest.set(!1) - } - setStencilMode(e) { - e.test.func !== this.gl.ALWAYS || e.mask ? (this.stencilTest.set(!0), this.stencilMask.set(e.mask), this.stencilOp.set([e.fail, e.depthFail, e.pass]), this.stencilFunc.set({ - func: e.test.func, - ref: e.ref, - mask: e.test.mask - })) : this.stencilTest.set(!1) - } - setColorMode(e) { - o.bH(e.blendFunction, Ti.Replace) ? this.blend.set(!1) : (this.blend.set(!0), this.blendFunc.set(e.blendFunction), this.blendColor.set(e.blendColor)), this.colorMask.set(e.mask) - } - createVertexArray() { - var e; - return Ra(this.gl) ? this.gl.createVertexArray() : (e = this.gl.getExtension("OES_vertex_array_object")) === null || e === void 0 ? void 0 : e.createVertexArrayOES() - } - deleteVertexArray(e) { - var n; - return Ra(this.gl) ? this.gl.deleteVertexArray(e) : (n = this.gl.getExtension("OES_vertex_array_object")) === null || n === void 0 ? void 0 : n.deleteVertexArrayOES(e) - } - unbindVAO() { - this.bindVertexArray.set(null) - } - } - let is; - - function Rh(h, e, n, s, u) { - const d = h.context, - m = h.transform, - y = d.gl, - w = h.useProgram("collisionBox"), - P = []; - let M = 0, - D = 0; - for (let re = 0; re < s.length; re++) { - const se = s[re], - de = e.getTile(se).getBucket(n); - if (!de) continue; - const ue = u ? de.textCollisionBox : de.iconCollisionBox, - ge = de.collisionCircleArray; - ge.length > 0 && (P.push({ - circleArray: ge, - circleOffset: D, - coord: se - }), M += ge.length / 4, D = M), ue && w.draw(d, y.LINES, Vr.disabled, hi.disabled, h.colorModeForRenderPass(), wr.disabled, al(h.transform), h.style.map.terrain && h.style.map.terrain.getTerrainData(se), m.getProjectionData({ - overscaledTileID: se, - applyGlobeMatrix: !0, - applyTerrainMatrix: !0 - }), n.id, ue.layoutVertexBuffer, ue.indexBuffer, ue.segments, null, h.transform.zoom, null, null, ue.collisionVertexBuffer) - } - if (!u || !P.length) return; - const z = h.useProgram("collisionCircle"), - B = new o.b$; - B.resize(4 * M), B._trim(); - let U = 0; - for (const re of P) - for (let se = 0; se < re.circleArray.length / 4; se++) { - const de = 4 * se, - ue = re.circleArray[de + 0], - ge = re.circleArray[de + 1], - Te = re.circleArray[de + 2], - he = re.circleArray[de + 3]; - B.emplace(U++, ue, ge, Te, he, 0), B.emplace(U++, ue, ge, Te, he, 1), B.emplace(U++, ue, ge, Te, he, 2), B.emplace(U++, ue, ge, Te, he, 3) - }(!is || is.length < 2 * M) && (is = (function(re) { - const se = 2 * re, - de = new o.c1; - de.resize(se), de._trim(); - for (let ue = 0; ue < se; ue++) { - const ge = 6 * ue; - de.uint16[ge + 0] = 4 * ue + 0, de.uint16[ge + 1] = 4 * ue + 1, de.uint16[ge + 2] = 4 * ue + 2, de.uint16[ge + 3] = 4 * ue + 2, de.uint16[ge + 4] = 4 * ue + 3, de.uint16[ge + 5] = 4 * ue + 0 - } - return de - })(M)); - const ee = d.createIndexBuffer(is, !0), - J = d.createVertexBuffer(B, o.c0.members, !0); - for (const re of P) { - const se = ip(h.transform); - z.draw(d, y.TRIANGLES, Vr.disabled, hi.disabled, h.colorModeForRenderPass(), wr.disabled, se, h.style.map.terrain && h.style.map.terrain.getTerrainData(re.coord), null, n.id, J, ee, o.aM.simpleSegment(0, 2 * re.circleOffset, re.circleArray.length, re.circleArray.length / 2), null, h.transform.zoom, null, null, null) - } - J.destroy(), ee.destroy() - } - const pp = o.ag(new Float32Array(16)); - - function Bh(h, e, n, s, u, d) { - const { - horizontalAlign: m, - verticalAlign: y - } = o.aH(h); - return new o.P((-(m - .5) * e / u + s[0]) * d, (-(y - .5) * n / u + s[1]) * d) - } - - function fp(h, e, n, s, u, d) { - const m = e.tileAnchorPoint.add(new o.P(e.translation[0], e.translation[1])); - if (e.pitchWithMap) { - let y = s.mult(d); - n || (y = y.rotate(-u)); - const w = m.add(y); - return ai(w.x, w.y, e.pitchedLabelPlaneMatrix, e.getElevation).point - } - if (n) { - const y = Dr(e.tileAnchorPoint.x + 1, e.tileAnchorPoint.y, e).point.sub(h), - w = Math.atan(y.y / y.x) + (y.x < 0 ? Math.PI : 0); - return h.add(s.rotate(w)) - } - return h.add(s) - } - - function Lc(h, e, n, s, u, d, m, y, w, P, M, D) { - const z = h.text.placedSymbolArray, - B = h.text.dynamicLayoutVertexArray, - U = h.icon.dynamicLayoutVertexArray, - ee = {}; - B.clear(); - for (let J = 0; J < z.length; J++) { - const re = z.get(J), - se = re.hidden || !re.crossTileID || h.allowVerticalPlacement && !re.placedOrientation ? null : s[re.crossTileID]; - if (se) { - const de = new o.P(re.anchorX, re.anchorY), - ue = { - getElevation: D, - width: u.width, - height: u.height, - pitchedLabelPlaneMatrix: d, - pitchWithMap: n, - transform: u, - tileAnchorPoint: de, - translation: P, - unwrappedTileID: M - }, - ge = n ? li(de.x, de.y, ue) : Dr(de.x, de.y, ue), - Te = Tt(u.cameraToCenterDistance, ge.signedDistanceFromCamera); - let he = o.ap(h.textSizeData, y, re) * Te / o.aB; - n && (he *= h.tilePixelRatio / m); - const { - width: De, - height: He, - anchor: je, - textOffset: qe, - textBoxScale: $e - } = se, Rt = Bh(je, De, He, qe, $e, he), Nt = u.getPitchedTextCorrection(de.x + P[0], de.y + P[1], M), yt = fp(ge.point, ue, e, Rt, -u.bearingInRadians, Nt), sr = h.allowVerticalPlacement && re.placedOrientation === o.ao.vertical ? Math.PI / 2 : 0; - for (let Xr = 0; Xr < re.numGlyphs; Xr++) o.av(B, yt, sr); - w && re.associatedIconIndex >= 0 && (ee[re.associatedIconIndex] = { - shiftedAnchor: yt, - angle: sr - }) - } else mi(re.numGlyphs, B) - } - if (w) { - U.clear(); - const J = h.icon.placedSymbolArray; - for (let re = 0; re < J.length; re++) { - const se = J.get(re); - if (se.hidden) mi(se.numGlyphs, U); - else { - const de = ee[re]; - if (de) - for (let ue = 0; ue < se.numGlyphs; ue++) o.av(U, de.shiftedAnchor, de.angle); - else mi(se.numGlyphs, U) - } - } - h.icon.dynamicLayoutVertexBuffer.updateData(U) - } - h.text.dynamicLayoutVertexBuffer.updateData(B) - } - - function fl(h, e, n) { - return n.iconsInText && e ? "symbolTextAndIcon" : h ? "symbolSDF" : "symbolIcon" - } - - function Co(h, e, n, s, u, d, m, y, w, P, M, D, z) { - const B = h.context, - U = B.gl, - ee = h.transform, - J = y === "map", - re = w === "map", - se = y !== "viewport" && n.layout.get("symbol-placement") !== "point", - de = J && !re && !se, - ue = !n.layout.get("symbol-sort-key").isConstant(); - let ge = !1; - const Te = h.getDepthModeForSublayer(0, Vr.ReadOnly), - he = n._unevaluatedLayout.hasValue("text-variable-anchor") || n._unevaluatedLayout.hasValue("text-variable-anchor-offset"), - De = [], - He = ee.getCircleRadiusCorrection(); - for (const je of s) { - const qe = e.getTile(je), - $e = qe.getBucket(n); - if (!$e) continue; - const Rt = u ? $e.text : $e.icon; - if (!Rt || !Rt.segments.get().length || !Rt.hasVisibleVertices) continue; - const Nt = Rt.programConfigurations.get(n.id), - yt = u || $e.sdfIcons, - sr = u ? $e.textSizeData : $e.iconSizeData, - Xr = re || ee.pitch !== 0, - xi = h.useProgram(fl(yt, u, $e), Nt), - ki = o.an(sr, ee.zoom), - Pi = h.style.map.terrain && h.style.map.terrain.getTerrainData(je); - let ji, Ui, Wr, Ei, Qi = [0, 0], - dn = null; - if (u) Ui = qe.glyphAtlasTexture, Wr = U.LINEAR, ji = qe.glyphAtlasTexture.size, $e.iconsInText && (Qi = qe.imageAtlasTexture.size, dn = qe.imageAtlasTexture, Ei = Xr || h.options.rotating || h.options.zooming || sr.kind === "composite" || sr.kind === "camera" ? U.LINEAR : U.NEAREST); - else { - const en = n.layout.get("icon-size").constantOr(0) !== 1 || $e.iconsNeedLinear; - Ui = qe.imageAtlasTexture, Wr = yt || h.options.rotating || h.options.zooming || en || Xr ? U.LINEAR : U.NEAREST, ji = qe.imageAtlasTexture.size - } - const xn = o.aC(qe, 1, h.transform.zoom), - qn = $r(J, h.transform, xn), - Sa = o.L(); - o.aq(Sa, qn); - const as = mr(re, J, h.transform, xn), - ss = o.aD(ee, qe, d, m), - Ys = ee.getProjectionData({ - overscaledTileID: je, - applyGlobeMatrix: !z, - applyTerrainMatrix: !0 - }), - Js = he && $e.hasTextData(), - Is = n.layout.get("icon-text-fit") !== "none" && Js && $e.hasIconData(); - if (se) { - const en = h.style.map.terrain ? (da, tn) => h.style.map.terrain.getElevation(je, da, tn) : null, - pn = n.layout.get("text-rotation-alignment") === "map"; - di($e, h, u, qn, Sa, re, P, pn, je.toUnwrapped(), ee.width, ee.height, ss, en) - } - const Ms = u && he || Is, - Kn = se || Ms ? pp : re ? qn : h.transform.clipSpaceToPixelsMatrix, - Pa = yt && n.paint.get(u ? "text-halo-width" : "icon-halo-width").constantOr(1) !== 0; - let Vn; - Vn = yt ? $e.iconsInText ? sp(sr.kind, ki, de, re, se, Ms, h, Kn, as, ss, ji, Qi, He) : Th(sr.kind, ki, de, re, se, Ms, h, Kn, as, ss, u, ji, 0, He) : xo(sr.kind, ki, de, re, se, Ms, h, Kn, as, ss, u, ji, He); - const os = { - program: xi, - buffers: Rt, - uniformValues: Vn, - projectionData: Ys, - atlasTexture: Ui, - atlasTextureIcon: dn, - atlasInterpolation: Wr, - atlasInterpolationIcon: Ei, - isSDF: yt, - hasHalo: Pa - }; - if (ue && $e.canOverlap) { - ge = !0; - const en = Rt.segments.get(); - for (const pn of en) De.push({ - segments: new o.aM([pn]), - sortKey: pn.sortKey, - state: os, - terrainData: Pi - }) - } else De.push({ - segments: Rt.segments, - sortKey: 0, - state: os, - terrainData: Pi - }) - } - ge && De.sort(((je, qe) => je.sortKey - qe.sortKey)); - for (const je of De) { - const qe = je.state; - if (B.activeTexture.set(U.TEXTURE0), qe.atlasTexture.bind(qe.atlasInterpolation, U.CLAMP_TO_EDGE), qe.atlasTextureIcon && (B.activeTexture.set(U.TEXTURE1), qe.atlasTextureIcon && qe.atlasTextureIcon.bind(qe.atlasInterpolationIcon, U.CLAMP_TO_EDGE)), qe.isSDF) { - const $e = qe.uniformValues; - qe.hasHalo && ($e.u_is_halo = 1, So(qe.buffers, je.segments, n, h, qe.program, Te, M, D, $e, qe.projectionData, je.terrainData)), $e.u_is_halo = 0 - } - So(qe.buffers, je.segments, n, h, qe.program, Te, M, D, qe.uniformValues, qe.projectionData, je.terrainData) - } - } - - function So(h, e, n, s, u, d, m, y, w, P, M) { - const D = s.context; - u.draw(D, D.gl.TRIANGLES, d, m, y, wr.backCCW, w, M, P, n.id, h.layoutVertexBuffer, h.indexBuffer, e, n.paint, s.transform.zoom, h.programConfigurations.get(n.id), h.dynamicLayoutVertexBuffer, h.opacityVertexBuffer) - } - - function Dc(h, e, n, s, u) { - const d = h.context, - m = d.gl, - y = hi.disabled, - w = new Ti([m.ONE, m.ONE], o.bf.transparent, [!0, !0, !0, !0]), - P = e.getBucket(n); - if (!P) return; - const M = s.key; - let D = n.heatmapFbos.get(M); - D || (D = Po(d, e.tileSize, e.tileSize), n.heatmapFbos.set(M, D)), d.bindFramebuffer.set(D.framebuffer), d.viewport.set([0, 0, e.tileSize, e.tileSize]), d.clear({ - color: o.bf.transparent - }); - const z = P.programConfigurations.get(n.id), - B = h.useProgram("heatmap", z, !u), - U = h.transform.getProjectionData({ - overscaledTileID: e.tileID, - applyGlobeMatrix: !0, - applyTerrainMatrix: !0 - }), - ee = h.style.map.terrain.getTerrainData(s); - B.draw(d, m.TRIANGLES, Vr.disabled, y, w, wr.disabled, vh(e, h.transform.zoom, n.paint.get("heatmap-intensity"), 1), ee, U, n.id, P.layoutVertexBuffer, P.indexBuffer, P.segments, n.paint, h.transform.zoom, z) - } - - function Fh(h, e, n, s, u) { - const d = h.context, - m = d.gl, - y = h.transform; - d.setColorMode(h.colorModeForRenderPass()); - const w = Io(d, e), - P = n.key, - M = e.heatmapFbos.get(P); - if (!M) return; - d.activeTexture.set(m.TEXTURE0), m.bindTexture(m.TEXTURE_2D, M.colorAttachment.get()), d.activeTexture.set(m.TEXTURE1), w.bind(m.LINEAR, m.CLAMP_TO_EDGE); - const D = y.getProjectionData({ - overscaledTileID: n, - applyTerrainMatrix: u, - applyGlobeMatrix: !s - }); - h.useProgram("heatmapTexture").draw(d, m.TRIANGLES, Vr.disabled, hi.disabled, h.colorModeForRenderPass(), wr.disabled, xc(h, e, 0, 1), null, D, e.id, h.rasterBoundsBuffer, h.quadTriangleIndexBuffer, h.rasterBoundsSegments, e.paint, y.zoom), M.destroy(), e.heatmapFbos.delete(P) - } - - function Po(h, e, n) { - var s, u; - const d = h.gl, - m = d.createTexture(); - d.bindTexture(d.TEXTURE_2D, m), d.texParameteri(d.TEXTURE_2D, d.TEXTURE_WRAP_S, d.CLAMP_TO_EDGE), d.texParameteri(d.TEXTURE_2D, d.TEXTURE_WRAP_T, d.CLAMP_TO_EDGE), d.texParameteri(d.TEXTURE_2D, d.TEXTURE_MIN_FILTER, d.LINEAR), d.texParameteri(d.TEXTURE_2D, d.TEXTURE_MAG_FILTER, d.LINEAR); - const y = (s = h.HALF_FLOAT) !== null && s !== void 0 ? s : d.UNSIGNED_BYTE, - w = (u = h.RGBA16F) !== null && u !== void 0 ? u : d.RGBA; - d.texImage2D(d.TEXTURE_2D, 0, w, e, n, 0, d.RGBA, y, null); - const P = h.createFramebuffer(e, n, !1, !1); - return P.colorAttachment.set(m), P - } - - function Io(h, e) { - return e.colorRampTexture || (e.colorRampTexture = new o.T(h, e.colorRamp, h.gl.RGBA)), e.colorRampTexture - } - - function Mo(h, e, n, s, u) { - if (!n || !s || !s.imageAtlas) return; - const d = s.imageAtlas.patternPositions; - let m = d[n.to.toString()], - y = d[n.from.toString()]; - if (!m && y && (m = y), !y && m && (y = m), !m || !y) { - const w = u.getPaintProperty(e); - m = d[w], y = d[w] - } - m && y && h.setConstantPatternPositions(m, y) - } - - function ml(h, e, n, s, u, d, m, y) { - const w = h.context.gl, - P = "fill-pattern", - M = n.paint.get(P), - D = M && M.constantOr(1), - z = n.getCrossfadeParameters(); - let B, U, ee, J, re; - const se = h.transform, - de = n.paint.get("fill-translate"), - ue = n.paint.get("fill-translate-anchor"); - m ? (U = D && !n.getPaintProperty("fill-outline-color") ? "fillOutlinePattern" : "fillOutline", B = w.LINES) : (U = D ? "fillPattern" : "fill", B = w.TRIANGLES); - const ge = M.constantOr(null); - for (const Te of s) { - const he = e.getTile(Te); - if (D && !he.patternsLoaded()) continue; - const De = he.getBucket(n); - if (!De) continue; - const He = De.programConfigurations.get(n.id), - je = h.useProgram(U, He), - qe = h.style.map.terrain && h.style.map.terrain.getTerrainData(Te); - D && (h.context.activeTexture.set(w.TEXTURE0), he.imageAtlasTexture.bind(w.LINEAR, w.CLAMP_TO_EDGE), He.updatePaintBuffers(z)), Mo(He, P, ge, he, n); - const $e = se.getProjectionData({ - overscaledTileID: Te, - applyGlobeMatrix: !y, - applyTerrainMatrix: !0 - }), - Rt = o.aD(se, he, de, ue); - if (m) { - J = De.indexBuffer2, re = De.segments2; - const yt = [w.drawingBufferWidth, w.drawingBufferHeight]; - ee = U === "fillOutlinePattern" && D ? vo(h, z, he, yt, Rt) : go(yt, Rt) - } else J = De.indexBuffer, re = De.segments, ee = D ? nl(h, z, he, Rt) : { - u_fill_translate: Rt - }; - const Nt = h.stencilModeForClipping(Te); - je.draw(h.context, B, u, Nt, d, wr.backCCW, ee, qe, $e, n.id, De.layoutVertexBuffer, J, re, n.paint, h.transform.zoom, He) - } - } - - function Rc(h, e, n, s, u, d, m, y) { - const w = h.context, - P = w.gl, - M = "fill-extrusion-pattern", - D = n.paint.get(M), - z = D.constantOr(1), - B = n.getCrossfadeParameters(), - U = n.paint.get("fill-extrusion-opacity"), - ee = D.constantOr(null), - J = h.transform; - for (const re of s) { - const se = e.getTile(re), - de = se.getBucket(n); - if (!de) continue; - const ue = h.style.map.terrain && h.style.map.terrain.getTerrainData(re), - ge = de.programConfigurations.get(n.id), - Te = h.useProgram(z ? "fillExtrusionPattern" : "fillExtrusion", ge); - z && (h.context.activeTexture.set(P.TEXTURE0), se.imageAtlasTexture.bind(P.LINEAR, P.CLAMP_TO_EDGE), ge.updatePaintBuffers(B)); - const he = J.getProjectionData({ - overscaledTileID: re, - applyGlobeMatrix: !y, - applyTerrainMatrix: !0 - }); - Mo(ge, M, ee, se, n); - const De = o.aD(J, se, n.paint.get("fill-extrusion-translate"), n.paint.get("fill-extrusion-translate-anchor")), - He = n.paint.get("fill-extrusion-vertical-gradient"), - je = z ? tp(h, He, U, De, re, B, se) : ya(h, He, U, De); - Te.draw(w, w.gl.TRIANGLES, u, d, m, wr.backCCW, je, ue, he, n.id, de.layoutVertexBuffer, de.indexBuffer, de.segments, n.paint, h.transform.zoom, ge, h.style.map.terrain && de.centroidVertexBuffer) - } - } - - function bs(h, e, n, s, u, d, m, y, w) { - var P; - const M = h.style.projection, - D = h.context, - z = h.transform, - B = D.gl, - U = [`#define NUM_ILLUMINATION_SOURCES ${n.paint.get("hillshade-highlight-color").values.length}`], - ee = h.useProgram("hillshade", null, !1, U), - J = !h.options.moving; - for (const re of s) { - const se = e.getTile(re), - de = se.fbo; - if (!de) continue; - const ue = M.getMeshFromTileID(D, re.canonical, y, !0, "raster"), - ge = (P = h.style.map.terrain) === null || P === void 0 ? void 0 : P.getTerrainData(re); - D.activeTexture.set(B.TEXTURE0), B.bindTexture(B.TEXTURE_2D, de.colorAttachment.get()); - const Te = z.getProjectionData({ - overscaledTileID: re, - aligned: J, - applyGlobeMatrix: !w, - applyTerrainMatrix: !0 - }); - ee.draw(D, B.TRIANGLES, d, u[re.overscaledZ], m, wr.backCCW, np(h, se, n), ge, Te, n.id, ue.vertexBuffer, ue.indexBuffer, ue.segments) - } - } - - function Bc(h, e, n, s, u, d, m, y, w) { - var P; - const M = h.style.projection, - D = h.context, - z = h.transform, - B = D.gl, - U = h.useProgram("colorRelief"), - ee = !h.options.moving; - let J = !0, - re = 0; - for (const se of s) { - const de = e.getTile(se), - ue = de.dem; - if (J) { - const je = B.getParameter(B.MAX_TEXTURE_SIZE), - { - elevationTexture: qe, - colorTexture: $e - } = n.getColorRampTextures(D, je, ue.getUnpackVector()); - D.activeTexture.set(B.TEXTURE1), qe.bind(B.NEAREST, B.CLAMP_TO_EDGE), D.activeTexture.set(B.TEXTURE4), $e.bind(B.LINEAR, B.CLAMP_TO_EDGE), J = !1, re = qe.size[0] - } - if (!ue || !ue.data) continue; - const ge = ue.stride, - Te = ue.getPixels(); - if (D.activeTexture.set(B.TEXTURE0), D.pixelStoreUnpackPremultiplyAlpha.set(!1), de.demTexture = de.demTexture || h.getTileTexture(ge), de.demTexture) { - const je = de.demTexture; - je.update(Te, { - premultiply: !1 - }), je.bind(B.LINEAR, B.CLAMP_TO_EDGE) - } else de.demTexture = new o.T(D, Te, B.RGBA, { - premultiply: !1 - }), de.demTexture.bind(B.LINEAR, B.CLAMP_TO_EDGE); - const he = M.getMeshFromTileID(D, se.canonical, y, !0, "raster"), - De = (P = h.style.map.terrain) === null || P === void 0 ? void 0 : P.getTerrainData(se), - He = z.getProjectionData({ - overscaledTileID: se, - aligned: ee, - applyGlobeMatrix: !w, - applyTerrainMatrix: !0 - }); - U.draw(D, B.TRIANGLES, d, u[se.overscaledZ], m, wr.backCCW, xh(n, de.dem, re), De, He, n.id, he.vertexBuffer, he.indexBuffer, he.segments) - } - } - const _l = [new o.P(0, 0), new o.P(o.$, 0), new o.P(o.$, o.$), new o.P(0, o.$)]; - - function ws(h, e, n, s, u, d, m, y, w = !1, P = !1) { - const M = s[s.length - 1].overscaledZ, - D = h.context, - z = D.gl, - B = h.useProgram("raster"), - U = h.transform, - ee = h.style.projection, - J = h.colorModeForRenderPass(), - re = !h.options.moving; - for (const se of s) { - const de = h.getDepthModeForSublayer(se.overscaledZ - M, n.paint.get("raster-opacity") === 1 ? Vr.ReadWrite : Vr.ReadOnly, z.LESS), - ue = e.getTile(se); - ue.registerFadeDuration(n.paint.get("raster-fade-duration")); - const ge = e.findLoadedParent(se, 0), - Te = e.findLoadedSibling(se), - he = Fc(ue, ge || Te || null, e, n, h.transform, h.style.map.terrain); - let De, He; - const je = n.paint.get("raster-resampling") === "nearest" ? z.NEAREST : z.LINEAR; - D.activeTexture.set(z.TEXTURE0), ue.texture.bind(je, z.CLAMP_TO_EDGE, z.LINEAR_MIPMAP_NEAREST), D.activeTexture.set(z.TEXTURE1), ge ? (ge.texture.bind(je, z.CLAMP_TO_EDGE, z.LINEAR_MIPMAP_NEAREST), De = Math.pow(2, ge.tileID.overscaledZ - ue.tileID.overscaledZ), He = [ue.tileID.canonical.x * De % 1, ue.tileID.canonical.y * De % 1]) : ue.texture.bind(je, z.CLAMP_TO_EDGE, z.LINEAR_MIPMAP_NEAREST), ue.texture.useMipmap && D.extTextureFilterAnisotropic && h.transform.pitch > 20 && z.texParameterf(z.TEXTURE_2D, D.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT, D.extTextureFilterAnisotropicMax); - const qe = h.style.map.terrain && h.style.map.terrain.getTerrainData(se), - $e = U.getProjectionData({ - overscaledTileID: se, - aligned: re, - applyGlobeMatrix: !P, - applyTerrainMatrix: !0 - }), - Rt = yo(He || [0, 0], De || 1, he, n, y), - Nt = ee.getMeshFromTileID(D, se.canonical, d, m, "raster"); - B.draw(D, z.TRIANGLES, de, u ? u[se.overscaledZ] : hi.disabled, J, w ? wr.frontCCW : wr.backCCW, Rt, qe, $e, n.id, Nt.vertexBuffer, Nt.indexBuffer, Nt.segments) - } - } - - function Fc(h, e, n, s, u, d) { - const m = s.paint.get("raster-fade-duration"); - if (!d && m > 0) { - const y = ye.now(), - w = (y - h.timeAdded) / m, - P = e ? (y - e.timeAdded) / m : -1, - M = n.getSource(), - D = Ot(u, { - tileSize: M.tileSize, - roundZoom: M.roundZoom - }), - z = !e || Math.abs(e.tileID.overscaledZ - D) > Math.abs(h.tileID.overscaledZ - D), - B = z && h.refreshedUponExpiration ? 1 : o.ah(z ? w : 1 - P, 0, 1); - return h.refreshedUponExpiration && w >= 1 && (h.refreshedUponExpiration = !1), e ? { - opacity: 1, - mix: 1 - B - } : { - opacity: B, - mix: 0 - } - } - return { - opacity: 1, - mix: 0 - } - } - const Oh = new o.bf(1, 0, 0, 1), - Nh = new o.bf(0, 1, 0, 1), - gl = new o.bf(0, 0, 1, 1), - Oc = new o.bf(1, 0, 1, 1), - mp = new o.bf(0, 1, 1, 1); - - function Nc(h, e, n, s) { - Oa(h, 0, e + n / 2, h.transform.width, n, s) - } - - function Vi(h, e, n, s) { - Oa(h, e - n / 2, 0, n, h.transform.height, s) - } - - function Oa(h, e, n, s, u, d) { - const m = h.context, - y = m.gl; - y.enable(y.SCISSOR_TEST), y.scissor(e * h.pixelRatio, n * h.pixelRatio, s * h.pixelRatio, u * h.pixelRatio), m.clear({ - color: d - }), y.disable(y.SCISSOR_TEST) - } - - function ua(h, e, n) { - const s = h.context, - u = s.gl, - d = h.useProgram("debug"), - m = Vr.disabled, - y = hi.disabled, - w = h.colorModeForRenderPass(), - P = "$debug", - M = h.style.map.terrain && h.style.map.terrain.getTerrainData(n); - s.activeTexture.set(u.TEXTURE0); - const D = e.getTileByID(n.key).latestRawTileData, - z = Math.floor((D && D.byteLength || 0) / 1024), - B = e.getTile(n).tileSize, - U = 512 / Math.min(B, 512) * (n.overscaledZ / h.transform.zoom) * .5; - let ee = n.canonical.toString(); - n.overscaledZ !== n.canonical.z && (ee += ` => ${n.overscaledZ}`), (function(re, se) { - re.initDebugOverlayCanvas(); - const de = re.debugOverlayCanvas, - ue = re.context.gl, - ge = re.debugOverlayCanvas.getContext("2d"); - ge.clearRect(0, 0, de.width, de.height), ge.shadowColor = "white", ge.shadowBlur = 2, ge.lineWidth = 1.5, ge.strokeStyle = "white", ge.textBaseline = "top", ge.font = "bold 36px Open Sans, sans-serif", ge.fillText(se, 5, 5), ge.strokeText(se, 5, 5), re.debugOverlayTexture.update(de), re.debugOverlayTexture.bind(ue.LINEAR, ue.CLAMP_TO_EDGE) - })(h, `${ee} ${z}kB`); - const J = h.transform.getProjectionData({ - overscaledTileID: n, - applyGlobeMatrix: !0, - applyTerrainMatrix: !0 - }); - d.draw(s, u.TRIANGLES, m, y, Ti.alphaBlended, wr.disabled, _s(o.bf.transparent, U), null, J, P, h.debugBuffer, h.quadTriangleIndexBuffer, h.debugSegments), d.draw(s, u.LINE_STRIP, m, y, w, wr.disabled, _s(o.bf.red), M, J, P, h.debugBuffer, h.tileBorderIndexBuffer, h.debugSegments) - } - - function vl(h, e, n, s) { - const { - isRenderingGlobe: u - } = s, d = h.context, m = d.gl, y = h.transform, w = h.colorModeForRenderPass(), P = h.getDepthModeFor3D(), M = h.useProgram("terrain"); - d.bindFramebuffer.set(null), d.viewport.set([0, 0, h.width, h.height]); - for (const D of n) { - const z = e.getTerrainMesh(D.tileID), - B = h.renderToTexture.getTexture(D), - U = e.getTerrainData(D.tileID); - d.activeTexture.set(m.TEXTURE0), m.bindTexture(m.TEXTURE_2D, B.texture); - const ee = e.getMeshFrameDelta(y.zoom), - J = y.calculateFogMatrix(D.tileID.toUnwrapped()), - re = rl(ee, J, h.style.sky, y.pitch, u), - se = y.getProjectionData({ - overscaledTileID: D.tileID, - applyTerrainMatrix: !1, - applyGlobeMatrix: !0 - }); - M.draw(d, m.TRIANGLES, P, hi.disabled, w, wr.backCCW, re, U, se, "terrain", z.vertexBuffer, z.indexBuffer, z.segments) - } - } - - function Ao(h, e) { - if (!e.mesh) { - const n = new o.aL; - n.emplaceBack(-1, -1), n.emplaceBack(1, -1), n.emplaceBack(1, 1), n.emplaceBack(-1, 1); - const s = new o.aN; - s.emplaceBack(0, 1, 2), s.emplaceBack(0, 2, 3), e.mesh = new Ri(h.createVertexBuffer(n, ui.members), h.createIndexBuffer(s), o.aM.simpleSegment(0, 0, n.length, s.length)) - } - return e.mesh - } - class jh { - constructor(e, n) { - this.context = new Dh(e), this.transform = n, this._tileTextures = {}, this.terrainFacilitator = { - dirty: !0, - matrix: o.ag(new Float64Array(16)), - renderTime: 0 - }, this.setup(), this.numSublayers = Pt.maxUnderzooming + Pt.maxOverzooming + 1, this.depthEpsilon = 1 / Math.pow(2, 16), this.crossTileSymbolIndex = new gi - } - resize(e, n, s) { - if (this.width = Math.floor(e * s), this.height = Math.floor(n * s), this.pixelRatio = s, this.context.viewport.set([0, 0, this.width, this.height]), this.style) - for (const u of this.style._order) this.style._layers[u].resize() - } - setup() { - const e = this.context, - n = new o.aL; - n.emplaceBack(0, 0), n.emplaceBack(o.$, 0), n.emplaceBack(0, o.$), n.emplaceBack(o.$, o.$), this.tileExtentBuffer = e.createVertexBuffer(n, ui.members), this.tileExtentSegments = o.aM.simpleSegment(0, 0, 4, 2); - const s = new o.aL; - s.emplaceBack(0, 0), s.emplaceBack(o.$, 0), s.emplaceBack(0, o.$), s.emplaceBack(o.$, o.$), this.debugBuffer = e.createVertexBuffer(s, ui.members), this.debugSegments = o.aM.simpleSegment(0, 0, 4, 5); - const u = new o.c6; - u.emplaceBack(0, 0, 0, 0), u.emplaceBack(o.$, 0, o.$, 0), u.emplaceBack(0, o.$, 0, o.$), u.emplaceBack(o.$, o.$, o.$, o.$), this.rasterBoundsBuffer = e.createVertexBuffer(u, Qd.members), this.rasterBoundsSegments = o.aM.simpleSegment(0, 0, 4, 2); - const d = new o.aL; - d.emplaceBack(0, 0), d.emplaceBack(o.$, 0), d.emplaceBack(0, o.$), d.emplaceBack(o.$, o.$), this.rasterBoundsBufferPosOnly = e.createVertexBuffer(d, ui.members), this.rasterBoundsSegmentsPosOnly = o.aM.simpleSegment(0, 0, 4, 5); - const m = new o.aL; - m.emplaceBack(0, 0), m.emplaceBack(1, 0), m.emplaceBack(0, 1), m.emplaceBack(1, 1), this.viewportBuffer = e.createVertexBuffer(m, ui.members), this.viewportSegments = o.aM.simpleSegment(0, 0, 4, 2); - const y = new o.c7; - y.emplaceBack(0), y.emplaceBack(1), y.emplaceBack(3), y.emplaceBack(2), y.emplaceBack(0), this.tileBorderIndexBuffer = e.createIndexBuffer(y); - const w = new o.aN; - w.emplaceBack(1, 0, 2), w.emplaceBack(1, 2, 3), this.quadTriangleIndexBuffer = e.createIndexBuffer(w); - const P = this.context.gl; - this.stencilClearMode = new hi({ - func: P.ALWAYS, - mask: 0 - }, 0, 255, P.ZERO, P.ZERO, P.ZERO), this.tileExtentMesh = new Ri(this.tileExtentBuffer, this.quadTriangleIndexBuffer, this.tileExtentSegments) - } - clearStencil() { - const e = this.context, - n = e.gl; - this.nextStencilID = 1, this.currentStencilSource = void 0; - const s = o.L(); - o.bY(s, 0, this.width, this.height, 0, 0, 1), o.N(s, s, [n.drawingBufferWidth, n.drawingBufferHeight, 0]); - const u = { - mainMatrix: s, - tileMercatorCoords: [0, 0, 1, 1], - clippingPlane: [0, 0, 0, 0], - projectionTransition: 0, - fallbackMatrix: s - }; - this.useProgram("clippingMask", null, !0).draw(e, n.TRIANGLES, Vr.disabled, this.stencilClearMode, Ti.disabled, wr.disabled, null, null, u, "$clipping", this.viewportBuffer, this.quadTriangleIndexBuffer, this.viewportSegments) - } - _renderTileClippingMasks(e, n, s) { - if (this.currentStencilSource === e.source || !e.isTileClipped() || !n || !n.length) return; - this.currentStencilSource = e.source, this.nextStencilID + n.length > 256 && this.clearStencil(); - const u = this.context; - u.setColorMode(Ti.disabled), u.setDepthMode(Vr.disabled); - const d = {}; - for (const m of n) d[m.key] = this.nextStencilID++; - this._renderTileMasks(d, n, s, !0), this._renderTileMasks(d, n, s, !1), this._tileClippingMaskIDs = d - } - _renderTileMasks(e, n, s, u) { - const d = this.context, - m = d.gl, - y = this.style.projection, - w = this.transform, - P = this.useProgram("clippingMask"); - for (const M of n) { - const D = e[M.key], - z = this.style.map.terrain && this.style.map.terrain.getTerrainData(M), - B = y.getMeshFromTileID(this.context, M.canonical, u, !0, "stencil"), - U = w.getProjectionData({ - overscaledTileID: M, - applyGlobeMatrix: !s, - applyTerrainMatrix: !0 - }); - P.draw(d, m.TRIANGLES, Vr.disabled, new hi({ - func: m.ALWAYS, - mask: 0 - }, D, 255, m.KEEP, m.KEEP, m.REPLACE), Ti.disabled, s ? wr.disabled : wr.backCCW, null, z, U, "$clipping", B.vertexBuffer, B.indexBuffer, B.segments) - } - } - _renderTilesDepthBuffer() { - const e = this.context, - n = e.gl, - s = this.style.projection, - u = this.transform, - d = this.useProgram("depth"), - m = this.getDepthModeFor3D(), - y = xe(u, { - tileSize: u.tileSize - }); - for (const w of y) { - const P = this.style.map.terrain && this.style.map.terrain.getTerrainData(w), - M = s.getMeshFromTileID(this.context, w.canonical, !0, !0, "raster"), - D = u.getProjectionData({ - overscaledTileID: w, - applyGlobeMatrix: !0, - applyTerrainMatrix: !0 - }); - d.draw(e, n.TRIANGLES, m, hi.disabled, Ti.disabled, wr.backCCW, null, P, D, "$clipping", M.vertexBuffer, M.indexBuffer, M.segments) - } - } - stencilModeFor3D() { - this.currentStencilSource = void 0, this.nextStencilID + 1 > 256 && this.clearStencil(); - const e = this.nextStencilID++, - n = this.context.gl; - return new hi({ - func: n.NOTEQUAL, - mask: 255 - }, e, 255, n.KEEP, n.KEEP, n.REPLACE) - } - stencilModeForClipping(e) { - const n = this.context.gl; - return new hi({ - func: n.EQUAL, - mask: 255 - }, this._tileClippingMaskIDs[e.key], 0, n.KEEP, n.KEEP, n.REPLACE) - } - getStencilConfigForOverlapAndUpdateStencilID(e) { - const n = this.context.gl, - s = e.sort(((m, y) => y.overscaledZ - m.overscaledZ)), - u = s[s.length - 1].overscaledZ, - d = s[0].overscaledZ - u + 1; - if (d > 1) { - this.currentStencilSource = void 0, this.nextStencilID + d > 256 && this.clearStencil(); - const m = {}; - for (let y = 0; y < d; y++) m[y + u] = new hi({ - func: n.GEQUAL, - mask: 255 - }, y + this.nextStencilID, 255, n.KEEP, n.KEEP, n.REPLACE); - return this.nextStencilID += d, [m, s] - } - return [{ - [u]: hi.disabled - }, s] - } - stencilConfigForOverlapTwoPass(e) { - const n = this.context.gl, - s = e.sort(((m, y) => y.overscaledZ - m.overscaledZ)), - u = s[s.length - 1].overscaledZ, - d = s[0].overscaledZ - u + 1; - if (this.clearStencil(), d > 1) { - const m = {}, - y = {}; - for (let w = 0; w < d; w++) m[w + u] = new hi({ - func: n.GREATER, - mask: 255 - }, d + 1 + w, 255, n.KEEP, n.KEEP, n.REPLACE), y[w + u] = new hi({ - func: n.GREATER, - mask: 255 - }, 1 + w, 255, n.KEEP, n.KEEP, n.REPLACE); - return this.nextStencilID = 2 * d + 1, [m, y, s] - } - return this.nextStencilID = 3, [{ - [u]: new hi({ - func: n.GREATER, - mask: 255 - }, 2, 255, n.KEEP, n.KEEP, n.REPLACE) - }, { - [u]: new hi({ - func: n.GREATER, - mask: 255 - }, 1, 255, n.KEEP, n.KEEP, n.REPLACE) - }, s] - } - colorModeForRenderPass() { - const e = this.context.gl; - return this._showOverdrawInspector ? new Ti([e.CONSTANT_COLOR, e.ONE], new o.bf(.125, .125, .125, 0), [!0, !0, !0, !0]) : this.renderPass === "opaque" ? Ti.unblended : Ti.alphaBlended - } - getDepthModeForSublayer(e, n, s) { - if (!this.opaquePassEnabledForLayer()) return Vr.disabled; - const u = 1 - ((1 + this.currentLayer) * this.numSublayers + e) * this.depthEpsilon; - return new Vr(s || this.context.gl.LEQUAL, n, [u, u]) - } - getDepthModeFor3D() { - return new Vr(this.context.gl.LEQUAL, Vr.ReadWrite, this.depthRangeFor3D) - } - opaquePassEnabledForLayer() { - return this.currentLayer < this.opaquePassCutoff - } - render(e, n) { - var s, u; - this.style = e, this.options = n, this.lineAtlas = e.lineAtlas, this.imageManager = e.imageManager, this.glyphManager = e.glyphManager, this.symbolFadeChange = e.placement.symbolFadeChange(ye.now()), this.imageManager.beginFrame(); - const d = this.style._order, - m = this.style.sourceCaches, - y = {}, - w = {}, - P = {}, - M = { - isRenderingToTexture: !1, - isRenderingGlobe: ((s = e.projection) === null || s === void 0 ? void 0 : s.transitionState) > 0 - }; - for (const z in m) { - const B = m[z]; - B.used && B.prepare(this.context), y[z] = B.getVisibleCoordinates(!1), w[z] = y[z].slice().reverse(), P[z] = B.getVisibleCoordinates(!0).reverse() - } - this.opaquePassCutoff = 1 / 0; - for (let z = 0; z < d.length; z++) - if (this.style._layers[d[z]].is3D()) { - this.opaquePassCutoff = z; - break - } this.maybeDrawDepthAndCoords(!1), this.renderToTexture && (this.renderToTexture.prepareForRender(this.style, this.transform.zoom), this.opaquePassCutoff = 0), this.renderPass = "offscreen"; - for (const z of d) { - const B = this.style._layers[z]; - if (!B.hasOffscreenPass() || B.isHidden(this.transform.zoom)) continue; - const U = w[B.source]; - (B.type === "custom" || U.length) && this.renderLayer(this, m[B.source], B, U, M) - } - if ((u = this.style.projection) === null || u === void 0 || u.updateGPUdependent({ - context: this.context, - useProgram: z => this.useProgram(z) - }), this.context.viewport.set([0, 0, this.width, this.height]), this.context.bindFramebuffer.set(null), this.context.clear({ - color: n.showOverdrawInspector ? o.bf.black : o.bf.transparent, - depth: 1 - }), this.clearStencil(), this.style.sky && (function(z, B) { - const U = z.context, - ee = U.gl, - J = ((Te, he, De) => { - const He = Math.cos(he.rollInRadians), - je = Math.sin(he.rollInRadians), - qe = le(he), - $e = he.getProjectionData({ - overscaledTileID: null, - applyGlobeMatrix: !0, - applyTerrainMatrix: !0 - }).projectionTransition; - return { - u_sky_color: Te.properties.get("sky-color"), - u_horizon_color: Te.properties.get("horizon-color"), - u_horizon: [(he.width / 2 - qe * je) * De, (he.height / 2 + qe * He) * De], - u_horizon_normal: [-je, He], - u_sky_horizon_blend: Te.properties.get("sky-horizon-blend") * he.height / 2 * De, - u_sky_blend: $e - } - })(B, z.style.map.transform, z.pixelRatio), - re = new Vr(ee.LEQUAL, Vr.ReadWrite, [0, 1]), - se = hi.disabled, - de = z.colorModeForRenderPass(), - ue = z.useProgram("sky"), - ge = Ao(U, B); - ue.draw(U, ee.TRIANGLES, re, se, de, wr.disabled, J, null, void 0, "sky", ge.vertexBuffer, ge.indexBuffer, ge.segments) - })(this, this.style.sky), this._showOverdrawInspector = n.showOverdrawInspector, this.depthRangeFor3D = [0, 1 - (e._order.length + 2) * this.numSublayers * this.depthEpsilon], !this.renderToTexture) - for (this.renderPass = "opaque", this.currentLayer = d.length - 1; this.currentLayer >= 0; this.currentLayer--) { - const z = this.style._layers[d[this.currentLayer]], - B = m[z.source], - U = y[z.source]; - this._renderTileClippingMasks(z, U, !1), this.renderLayer(this, B, z, U, M) - } - this.renderPass = "translucent"; - let D = !1; - for (this.currentLayer = 0; this.currentLayer < d.length; this.currentLayer++) { - const z = this.style._layers[d[this.currentLayer]], - B = m[z.source]; - if (this.renderToTexture && this.renderToTexture.renderLayer(z, M)) continue; - this.opaquePassEnabledForLayer() || D || (D = !0, M.isRenderingGlobe && !this.style.map.terrain && this._renderTilesDepthBuffer()); - const U = (z.type === "symbol" ? P : w)[z.source]; - this._renderTileClippingMasks(z, y[z.source], !!this.renderToTexture), this.renderLayer(this, B, z, U, M) - } - if (M.isRenderingGlobe && (function(z, B, U) { - const ee = z.context, - J = ee.gl, - re = z.useProgram("atmosphere"), - se = new Vr(J.LEQUAL, Vr.ReadOnly, [0, 1]), - de = z.transform, - ue = (function($e, Rt) { - const Nt = $e.properties.get("position"), - yt = [-Nt.x, -Nt.y, -Nt.z], - sr = o.ag(new Float64Array(16)); - return $e.properties.get("anchor") === "map" && (o.b6(sr, sr, Rt.rollInRadians), o.b7(sr, sr, -Rt.pitchInRadians), o.b6(sr, sr, Rt.bearingInRadians), o.b7(sr, sr, Rt.center.lat * Math.PI / 180), o.bz(sr, sr, -Rt.center.lng * Math.PI / 180)), o.c5(yt, yt, sr), yt - })(U, z.transform), - ge = de.getProjectionData({ - overscaledTileID: null, - applyGlobeMatrix: !0, - applyTerrainMatrix: !0 - }), - Te = B.properties.get("atmosphere-blend") * ge.projectionTransition; - if (Te === 0) return; - const he = Bs(de.worldSize, de.center.lat), - De = de.inverseProjectionMatrix, - He = new Float64Array(4); - He[3] = 1, o.aw(He, He, de.modelViewProjectionMatrix), He[0] /= He[3], He[1] /= He[3], He[2] /= He[3], He[3] = 1, o.aw(He, He, De), He[0] /= He[3], He[1] /= He[3], He[2] /= He[3], He[3] = 1; - const je = (($e, Rt, Nt, yt, sr) => ({ - u_sun_pos: $e, - u_atmosphere_blend: Rt, - u_globe_position: Nt, - u_globe_radius: yt, - u_inv_proj_matrix: sr - }))(ue, Te, [He[0], He[1], He[2]], he, De), - qe = Ao(ee, B); - re.draw(ee, J.TRIANGLES, se, hi.disabled, Ti.alphaBlended, wr.disabled, je, null, null, "atmosphere", qe.vertexBuffer, qe.indexBuffer, qe.segments) - })(this, this.style.sky, this.style.light), this.options.showTileBoundaries) { - const z = (function(B, U) { - let ee = null; - const J = Object.values(B._layers).flatMap((ue => ue.source && !ue.isHidden(U) ? [B.sourceCaches[ue.source]] : [])), - re = J.filter((ue => ue.getSource().type === "vector")), - se = J.filter((ue => ue.getSource().type !== "vector")), - de = ue => { - (!ee || ee.getSource().maxzoom < ue.getSource().maxzoom) && (ee = ue) - }; - return re.forEach((ue => de(ue))), ee || se.forEach((ue => de(ue))), ee - })(this.style, this.transform.zoom); - z && (function(B, U, ee) { - for (let J = 0; J < ee.length; J++) ua(B, U, ee[J]) - })(this, z, z.getVisibleCoordinates()) - } - this.options.showPadding && (function(z) { - const B = z.transform.padding; - Nc(z, z.transform.height - (B.top || 0), 3, Oh), Nc(z, B.bottom || 0, 3, Nh), Vi(z, B.left || 0, 3, gl), Vi(z, z.transform.width - (B.right || 0), 3, Oc); - const U = z.transform.centerPoint; - (function(ee, J, re, se) { - Oa(ee, J - 1, re - 10, 2, 20, se), Oa(ee, J - 10, re - 1, 20, 2, se) - })(z, U.x, z.transform.height - U.y, mp) - })(this), this.context.setDefault() - } - maybeDrawDepthAndCoords(e) { - if (!this.style || !this.style.map || !this.style.map.terrain) return; - const n = this.terrainFacilitator.matrix, - s = this.transform.modelViewProjectionMatrix; - let u = this.terrainFacilitator.dirty; - u || (u = e ? !o.c8(n, s) : !o.c9(n, s)), u || (u = this.style.map.terrain.sourceCache.anyTilesAfterTime(this.terrainFacilitator.renderTime)), u && (o.ca(n, s), this.terrainFacilitator.renderTime = Date.now(), this.terrainFacilitator.dirty = !1, (function(d, m) { - const y = d.context, - w = y.gl, - P = d.transform, - M = Ti.unblended, - D = new Vr(w.LEQUAL, Vr.ReadWrite, [0, 1]), - z = m.sourceCache.getRenderableTiles(), - B = d.useProgram("terrainDepth"); - y.bindFramebuffer.set(m.getFramebuffer("depth").framebuffer), y.viewport.set([0, 0, d.width / devicePixelRatio, d.height / devicePixelRatio]), y.clear({ - color: o.bf.transparent, - depth: 1 - }); - for (const U of z) { - const ee = m.getTerrainMesh(U.tileID), - J = m.getTerrainData(U.tileID), - re = P.getProjectionData({ - overscaledTileID: U.tileID, - applyTerrainMatrix: !1, - applyGlobeMatrix: !0 - }), - se = { - u_ele_delta: m.getMeshFrameDelta(P.zoom) - }; - B.draw(y, w.TRIANGLES, D, hi.disabled, M, wr.backCCW, se, J, re, "terrain", ee.vertexBuffer, ee.indexBuffer, ee.segments) - } - y.bindFramebuffer.set(null), y.viewport.set([0, 0, d.width, d.height]) - })(this, this.style.map.terrain), (function(d, m) { - const y = d.context, - w = y.gl, - P = d.transform, - M = Ti.unblended, - D = new Vr(w.LEQUAL, Vr.ReadWrite, [0, 1]), - z = m.getCoordsTexture(), - B = m.sourceCache.getRenderableTiles(), - U = d.useProgram("terrainCoords"); - y.bindFramebuffer.set(m.getFramebuffer("coords").framebuffer), y.viewport.set([0, 0, d.width / devicePixelRatio, d.height / devicePixelRatio]), y.clear({ - color: o.bf.transparent, - depth: 1 - }), m.coordsIndex = []; - for (const ee of B) { - const J = m.getTerrainMesh(ee.tileID), - re = m.getTerrainData(ee.tileID); - y.activeTexture.set(w.TEXTURE0), w.bindTexture(w.TEXTURE_2D, z.texture); - const se = { - u_terrain_coords_id: (255 - m.coordsIndex.length) / 255, - u_texture: 0, - u_ele_delta: m.getMeshFrameDelta(P.zoom) - }, - de = P.getProjectionData({ - overscaledTileID: ee.tileID, - applyTerrainMatrix: !1, - applyGlobeMatrix: !0 - }); - U.draw(y, w.TRIANGLES, D, hi.disabled, M, wr.backCCW, se, re, de, "terrain", J.vertexBuffer, J.indexBuffer, J.segments), m.coordsIndex.push(ee.tileID.key) - } - y.bindFramebuffer.set(null), y.viewport.set([0, 0, d.width, d.height]) - })(this, this.style.map.terrain)) - } - renderLayer(e, n, s, u, d) { - s.isHidden(this.transform.zoom) || (s.type === "background" || s.type === "custom" || (u || []).length) && (this.id = s.id, o.cb(s) ? (function(m, y, w, P, M, D) { - if (m.renderPass !== "translucent") return; - const { - isRenderingToTexture: z - } = D, B = hi.disabled, U = m.colorModeForRenderPass(); - (w._unevaluatedLayout.hasValue("text-variable-anchor") || w._unevaluatedLayout.hasValue("text-variable-anchor-offset")) && (function(ee, J, re, se, de, ue, ge, Te, he) { - const De = J.transform, - He = J.style.map.terrain, - je = de === "map", - qe = ue === "map"; - for (const $e of ee) { - const Rt = se.getTile($e), - Nt = Rt.getBucket(re); - if (!Nt || !Nt.text || !Nt.text.segments.get().length) continue; - const yt = o.an(Nt.textSizeData, De.zoom), - sr = o.aC(Rt, 1, J.transform.zoom), - Xr = $r(je, J.transform, sr), - xi = re.layout.get("icon-text-fit") !== "none" && Nt.hasIconData(); - if (yt) { - const ki = Math.pow(2, De.zoom - Rt.tileID.overscaledZ), - Pi = He ? (ji, Ui) => He.getElevation($e, ji, Ui) : null; - Lc(Nt, je, qe, he, De, Xr, ki, yt, xi, o.aD(De, Rt, ge, Te), $e.toUnwrapped(), Pi) - } - } - })(P, m, w, y, w.layout.get("text-rotation-alignment"), w.layout.get("text-pitch-alignment"), w.paint.get("text-translate"), w.paint.get("text-translate-anchor"), M), w.paint.get("icon-opacity").constantOr(1) !== 0 && Co(m, y, w, P, !1, w.paint.get("icon-translate"), w.paint.get("icon-translate-anchor"), w.layout.get("icon-rotation-alignment"), w.layout.get("icon-pitch-alignment"), w.layout.get("icon-keep-upright"), B, U, z), w.paint.get("text-opacity").constantOr(1) !== 0 && Co(m, y, w, P, !0, w.paint.get("text-translate"), w.paint.get("text-translate-anchor"), w.layout.get("text-rotation-alignment"), w.layout.get("text-pitch-alignment"), w.layout.get("text-keep-upright"), B, U, z), y.map.showCollisionBoxes && (Rh(m, y, w, P, !0), Rh(m, y, w, P, !1)) - })(e, n, s, u, this.style.placement.variableOffsets, d) : o.cc(s) ? (function(m, y, w, P, M) { - if (m.renderPass !== "translucent") return; - const { - isRenderingToTexture: D - } = M, z = w.paint.get("circle-opacity"), B = w.paint.get("circle-stroke-width"), U = w.paint.get("circle-stroke-opacity"), ee = !w.layout.get("circle-sort-key").isConstant(); - if (z.constantOr(1) === 0 && (B.constantOr(1) === 0 || U.constantOr(1) === 0)) return; - const J = m.context, - re = J.gl, - se = m.transform, - de = m.getDepthModeForSublayer(0, Vr.ReadOnly), - ue = hi.disabled, - ge = m.colorModeForRenderPass(), - Te = [], - he = se.getCircleRadiusCorrection(); - for (let De = 0; De < P.length; De++) { - const He = P[De], - je = y.getTile(He), - qe = je.getBucket(w); - if (!qe) continue; - const $e = w.paint.get("circle-translate"), - Rt = w.paint.get("circle-translate-anchor"), - Nt = o.aD(se, je, $e, Rt), - yt = qe.programConfigurations.get(w.id), - sr = m.useProgram("circle", yt), - Xr = qe.layoutVertexBuffer, - xi = qe.indexBuffer, - ki = m.style.map.terrain && m.style.map.terrain.getTerrainData(He), - Pi = { - programConfiguration: yt, - program: sr, - layoutVertexBuffer: Xr, - indexBuffer: xi, - uniformValues: rp(m, je, w, Nt, he), - terrainData: ki, - projectionData: se.getProjectionData({ - overscaledTileID: He, - applyGlobeMatrix: !D, - applyTerrainMatrix: !0 - }) - }; - if (ee) { - const ji = qe.segments.get(); - for (const Ui of ji) Te.push({ - segments: new o.aM([Ui]), - sortKey: Ui.sortKey, - state: Pi - }) - } else Te.push({ - segments: qe.segments, - sortKey: 0, - state: Pi - }) - } - ee && Te.sort(((De, He) => De.sortKey - He.sortKey)); - for (const De of Te) { - const { - programConfiguration: He, - program: je, - layoutVertexBuffer: qe, - indexBuffer: $e, - uniformValues: Rt, - terrainData: Nt, - projectionData: yt - } = De.state; - je.draw(J, re.TRIANGLES, de, ue, ge, wr.backCCW, Rt, Nt, yt, w.id, qe, $e, De.segments, w.paint, m.transform.zoom, He) - } - })(e, n, s, u, d) : o.cd(s) ? (function(m, y, w, P, M) { - if (w.paint.get("heatmap-opacity") === 0) return; - const D = m.context, - { - isRenderingToTexture: z, - isRenderingGlobe: B - } = M; - if (m.style.map.terrain) { - for (const U of P) { - const ee = y.getTile(U); - y.hasRenderableParent(U) || (m.renderPass === "offscreen" ? Dc(m, ee, w, U, B) : m.renderPass === "translucent" && Fh(m, w, U, z, B)) - } - D.viewport.set([0, 0, m.width, m.height]) - } else m.renderPass === "offscreen" ? (function(U, ee, J, re) { - const se = U.context, - de = se.gl, - ue = U.transform, - ge = hi.disabled, - Te = new Ti([de.ONE, de.ONE], o.bf.transparent, [!0, !0, !0, !0]); - (function(he, De, He) { - const je = he.gl; - he.activeTexture.set(je.TEXTURE1), he.viewport.set([0, 0, De.width / 4, De.height / 4]); - let qe = He.heatmapFbos.get(o.c2); - qe ? (je.bindTexture(je.TEXTURE_2D, qe.colorAttachment.get()), he.bindFramebuffer.set(qe.framebuffer)) : (qe = Po(he, De.width / 4, De.height / 4), He.heatmapFbos.set(o.c2, qe)) - })(se, U, J), se.clear({ - color: o.bf.transparent - }); - for (let he = 0; he < re.length; he++) { - const De = re[he]; - if (ee.hasRenderableParent(De)) continue; - const He = ee.getTile(De), - je = He.getBucket(J); - if (!je) continue; - const qe = je.programConfigurations.get(J.id), - $e = U.useProgram("heatmap", qe), - Rt = ue.getProjectionData({ - overscaledTileID: De, - applyGlobeMatrix: !0, - applyTerrainMatrix: !1 - }), - Nt = ue.getCircleRadiusCorrection(); - $e.draw(se, de.TRIANGLES, Vr.disabled, ge, Te, wr.backCCW, vh(He, ue.zoom, J.paint.get("heatmap-intensity"), Nt), null, Rt, J.id, je.layoutVertexBuffer, je.indexBuffer, je.segments, J.paint, ue.zoom, qe) - } - se.viewport.set([0, 0, U.width, U.height]) - })(m, y, w, P) : m.renderPass === "translucent" && (function(U, ee) { - const J = U.context, - re = J.gl; - J.setColorMode(U.colorModeForRenderPass()); - const se = ee.heatmapFbos.get(o.c2); - se && (J.activeTexture.set(re.TEXTURE0), re.bindTexture(re.TEXTURE_2D, se.colorAttachment.get()), J.activeTexture.set(re.TEXTURE1), Io(J, ee).bind(re.LINEAR, re.CLAMP_TO_EDGE), U.useProgram("heatmapTexture").draw(J, re.TRIANGLES, Vr.disabled, hi.disabled, U.colorModeForRenderPass(), wr.disabled, xc(U, ee, 0, 1), null, null, ee.id, U.viewportBuffer, U.quadTriangleIndexBuffer, U.viewportSegments, ee.paint, U.transform.zoom)) - })(m, w) - })(e, n, s, u, d) : o.ce(s) ? (function(m, y, w, P, M) { - if (m.renderPass !== "translucent") return; - const { - isRenderingToTexture: D - } = M, z = w.paint.get("line-opacity"), B = w.paint.get("line-width"); - if (z.constantOr(1) === 0 || B.constantOr(1) === 0) return; - const U = m.getDepthModeForSublayer(0, Vr.ReadOnly), - ee = m.colorModeForRenderPass(), - J = w.paint.get("line-dasharray"), - re = w.paint.get("line-pattern"), - se = re.constantOr(1), - de = w.paint.get("line-gradient"), - ue = w.getCrossfadeParameters(), - ge = se ? "linePattern" : J ? "lineSDF" : de ? "lineGradient" : "line", - Te = m.context, - he = Te.gl, - De = m.transform; - let He = !0; - for (const je of P) { - const qe = y.getTile(je); - if (se && !qe.patternsLoaded()) continue; - const $e = qe.getBucket(w); - if (!$e) continue; - const Rt = $e.programConfigurations.get(w.id), - Nt = m.context.program.get(), - yt = m.useProgram(ge, Rt), - sr = He || yt.program !== Nt, - Xr = m.style.map.terrain && m.style.map.terrain.getTerrainData(je), - xi = re.constantOr(null); - if (xi && qe.imageAtlas) { - const Wr = qe.imageAtlas, - Ei = Wr.patternPositions[xi.to.toString()], - Qi = Wr.patternPositions[xi.from.toString()]; - Ei && Qi && Rt.setConstantPatternPositions(Ei, Qi) - } - const ki = De.getProjectionData({ - overscaledTileID: je, - applyGlobeMatrix: !D, - applyTerrainMatrix: !0 - }), - Pi = De.getPixelScale(), - ji = se ? wh(m, qe, w, Pi, ue) : J ? gs(m, qe, w, Pi, J, ue) : de ? bh(m, qe, w, Pi, $e.lineClipsArray.length) : sl(m, qe, w, Pi); - if (se) Te.activeTexture.set(he.TEXTURE0), qe.imageAtlasTexture.bind(he.LINEAR, he.CLAMP_TO_EDGE), Rt.updatePaintBuffers(ue); - else if (J && (sr || m.lineAtlas.dirty)) Te.activeTexture.set(he.TEXTURE0), m.lineAtlas.bind(Te); - else if (de) { - const Wr = $e.gradients[w.id]; - let Ei = Wr.texture; - if (w.gradientVersion !== Wr.version) { - let Qi = 256; - if (w.stepInterpolant) { - const dn = y.getSource().maxzoom, - xn = je.canonical.z === dn ? Math.ceil(1 << m.transform.maxZoom - je.canonical.z) : 1; - Qi = o.ah(o.c3($e.maxLineLength / o.$ * 1024 * xn), 256, Te.maxTextureSize) - } - Wr.gradient = o.c4({ - expression: w.gradientExpression(), - evaluationKey: "lineProgress", - resolution: Qi, - image: Wr.gradient || void 0, - clips: $e.lineClipsArray - }), Wr.texture ? Wr.texture.update(Wr.gradient) : Wr.texture = new o.T(Te, Wr.gradient, he.RGBA), Wr.version = w.gradientVersion, Ei = Wr.texture - } - Te.activeTexture.set(he.TEXTURE0), Ei.bind(w.stepInterpolant ? he.NEAREST : he.LINEAR, he.CLAMP_TO_EDGE) - } - const Ui = m.stencilModeForClipping(je); - yt.draw(Te, he.TRIANGLES, U, Ui, ee, wr.disabled, ji, Xr, ki, w.id, $e.layoutVertexBuffer, $e.indexBuffer, $e.segments, w.paint, m.transform.zoom, Rt, $e.layoutVertexBuffer2), He = !1 - } - })(e, n, s, u, d) : o.cf(s) ? (function(m, y, w, P, M) { - const D = w.paint.get("fill-color"), - z = w.paint.get("fill-opacity"); - if (z.constantOr(1) === 0) return; - const { - isRenderingToTexture: B - } = M, U = m.colorModeForRenderPass(), ee = w.paint.get("fill-pattern"), J = m.opaquePassEnabledForLayer() && !ee.constantOr(1) && D.constantOr(o.bf.transparent).a === 1 && z.constantOr(0) === 1 ? "opaque" : "translucent"; - if (m.renderPass === J) { - const re = m.getDepthModeForSublayer(1, m.renderPass === "opaque" ? Vr.ReadWrite : Vr.ReadOnly); - ml(m, y, w, P, re, U, !1, B) - } - if (m.renderPass === "translucent" && w.paint.get("fill-antialias")) { - const re = m.getDepthModeForSublayer(w.getPaintProperty("fill-outline-color") ? 2 : 0, Vr.ReadOnly); - ml(m, y, w, P, re, U, !0, B) - } - })(e, n, s, u, d) : o.cg(s) ? (function(m, y, w, P, M) { - const D = w.paint.get("fill-extrusion-opacity"); - if (D === 0) return; - const { - isRenderingToTexture: z - } = M; - if (m.renderPass === "translucent") { - const B = new Vr(m.context.gl.LEQUAL, Vr.ReadWrite, m.depthRangeFor3D); - if (D !== 1 || w.paint.get("fill-extrusion-pattern").constantOr(1)) Rc(m, y, w, P, B, hi.disabled, Ti.disabled, z), Rc(m, y, w, P, B, m.stencilModeFor3D(), m.colorModeForRenderPass(), z); - else { - const U = m.colorModeForRenderPass(); - Rc(m, y, w, P, B, hi.disabled, U, z) - } - } - })(e, n, s, u, d) : o.ch(s) ? (function(m, y, w, P, M) { - if (m.renderPass !== "offscreen" && m.renderPass !== "translucent") return; - const { - isRenderingToTexture: D - } = M, z = m.context, B = m.style.projection.useSubdivision, U = m.getDepthModeForSublayer(0, Vr.ReadOnly), ee = m.colorModeForRenderPass(); - if (m.renderPass === "offscreen")(function(J, re, se, de, ue, ge, Te) { - const he = J.context, - De = he.gl; - for (const He of se) { - const je = re.getTile(He), - qe = je.dem; - if (!qe || !qe.data || !je.needsHillshadePrepare) continue; - const $e = qe.dim, - Rt = qe.stride, - Nt = qe.getPixels(); - if (he.activeTexture.set(De.TEXTURE1), he.pixelStoreUnpackPremultiplyAlpha.set(!1), je.demTexture = je.demTexture || J.getTileTexture(Rt), je.demTexture) { - const sr = je.demTexture; - sr.update(Nt, { - premultiply: !1 - }), sr.bind(De.NEAREST, De.CLAMP_TO_EDGE) - } else je.demTexture = new o.T(he, Nt, De.RGBA, { - premultiply: !1 - }), je.demTexture.bind(De.NEAREST, De.CLAMP_TO_EDGE); - he.activeTexture.set(De.TEXTURE0); - let yt = je.fbo; - if (!yt) { - const sr = new o.T(he, { - width: $e, - height: $e, - data: null - }, De.RGBA); - sr.bind(De.LINEAR, De.CLAMP_TO_EDGE), yt = je.fbo = he.createFramebuffer($e, $e, !0, !1), yt.colorAttachment.set(sr.texture) - } - he.bindFramebuffer.set(yt.framebuffer), he.viewport.set([0, 0, $e, $e]), J.useProgram("hillshadePrepare").draw(he, De.TRIANGLES, ue, ge, Te, wr.disabled, yh(je.tileID, qe), null, null, de.id, J.rasterBoundsBuffer, J.quadTriangleIndexBuffer, J.rasterBoundsSegments), je.needsHillshadePrepare = !1 - } - })(m, y, P, w, U, hi.disabled, ee), z.viewport.set([0, 0, m.width, m.height]); - else if (m.renderPass === "translucent") - if (B) { - const [J, re, se] = m.stencilConfigForOverlapTwoPass(P); - bs(m, y, w, se, J, U, ee, !1, D), bs(m, y, w, se, re, U, ee, !0, D) - } else { - const [J, re] = m.getStencilConfigForOverlapAndUpdateStencilID(P); - bs(m, y, w, re, J, U, ee, !1, D) - } - })(e, n, s, u, d) : o.ci(s) ? (function(m, y, w, P, M) { - if (m.renderPass !== "translucent" || !P.length) return; - const { - isRenderingToTexture: D - } = M, z = m.style.projection.useSubdivision, B = m.getDepthModeForSublayer(0, Vr.ReadOnly), U = m.colorModeForRenderPass(); - if (z) { - const [ee, J, re] = m.stencilConfigForOverlapTwoPass(P); - Bc(m, y, w, re, ee, B, U, !1, D), Bc(m, y, w, re, J, B, U, !0, D) - } else { - const [ee, J] = m.getStencilConfigForOverlapAndUpdateStencilID(P); - Bc(m, y, w, J, ee, B, U, !1, D) - } - })(e, n, s, u, d) : o.cj(s) ? (function(m, y, w, P, M) { - if (m.renderPass !== "translucent" || w.paint.get("raster-opacity") === 0 || !P.length) return; - const { - isRenderingToTexture: D - } = M, z = y.getSource(), B = m.style.projection.useSubdivision; - if (z instanceof Ft) ws(m, y, w, P, null, !1, !1, z.tileCoords, z.flippedWindingOrder, D); - else if (B) { - const [U, ee, J] = m.stencilConfigForOverlapTwoPass(P); - ws(m, y, w, J, U, !1, !0, _l, !1, D), ws(m, y, w, J, ee, !0, !0, _l, !1, D) - } else { - const [U, ee] = m.getStencilConfigForOverlapAndUpdateStencilID(P); - ws(m, y, w, ee, U, !1, !0, _l, !1, D) - } - })(e, n, s, u, d) : o.ck(s) ? (function(m, y, w, P, M) { - const D = w.paint.get("background-color"), - z = w.paint.get("background-opacity"); - if (z === 0) return; - const { - isRenderingToTexture: B - } = M, U = m.context, ee = U.gl, J = m.style.projection, re = m.transform, se = re.tileSize, de = w.paint.get("background-pattern"); - if (m.isPatternMissing(de)) return; - const ue = !de && D.a === 1 && z === 1 && m.opaquePassEnabledForLayer() ? "opaque" : "translucent"; - if (m.renderPass !== ue) return; - const ge = hi.disabled, - Te = m.getDepthModeForSublayer(0, ue === "opaque" ? Vr.ReadWrite : Vr.ReadOnly), - he = m.colorModeForRenderPass(), - De = m.useProgram(de ? "backgroundPattern" : "background"), - He = P || xe(re, { - tileSize: se, - terrain: m.style.map.terrain - }); - de && (U.activeTexture.set(ee.TEXTURE0), m.imageManager.bind(m.context)); - const je = w.getCrossfadeParameters(); - for (const qe of He) { - const $e = re.getProjectionData({ - overscaledTileID: qe, - applyGlobeMatrix: !B, - applyTerrainMatrix: !0 - }), - Rt = de ? Sh(z, m, de, { - tileID: qe, - tileSize: se - }, je) : Ch(z, D), - Nt = m.style.map.terrain && m.style.map.terrain.getTerrainData(qe), - yt = J.getMeshFromTileID(U, qe.canonical, !1, !0, "raster"); - De.draw(U, ee.TRIANGLES, Te, ge, he, wr.backCCW, Rt, Nt, $e, w.id, yt.vertexBuffer, yt.indexBuffer, yt.segments) - } - })(e, 0, s, u, d) : o.cl(s) && (function(m, y, w, P) { - const { - isRenderingGlobe: M - } = P, D = m.context, z = w.implementation, B = m.style.projection, U = m.transform, ee = U.getProjectionDataForCustomLayer(M), J = { - farZ: U.farZ, - nearZ: U.nearZ, - fov: U.fov * Math.PI / 180, - modelViewProjectionMatrix: U.modelViewProjectionMatrix, - projectionMatrix: U.projectionMatrix, - shaderData: { - variantName: B.shaderVariantName, - vertexShaderPrelude: `const float PI = 3.141592653589793; -uniform mat4 u_projection_matrix; -${B.shaderPreludeCode.vertexSource}`, - define: B.shaderDefine - }, - defaultProjectionData: ee - }, re = z.renderingMode ? z.renderingMode : "2d"; - if (m.renderPass === "offscreen") { - const se = z.prerender; - se && (m.setCustomLayerDefaults(), D.setColorMode(m.colorModeForRenderPass()), se.call(z, D.gl, J), D.setDirty(), m.setBaseState()) - } else if (m.renderPass === "translucent") { - m.setCustomLayerDefaults(), D.setColorMode(m.colorModeForRenderPass()), D.setStencilMode(hi.disabled); - const se = re === "3d" ? m.getDepthModeFor3D() : m.getDepthModeForSublayer(0, Vr.ReadOnly); - D.setDepthMode(se), z.render(D.gl, J), D.setDirty(), m.setBaseState(), D.bindFramebuffer.set(null) - } - })(e, 0, s, d)) - } - saveTileTexture(e) { - const n = this._tileTextures[e.size[0]]; - n ? n.push(e) : this._tileTextures[e.size[0]] = [e] - } - getTileTexture(e) { - const n = this._tileTextures[e]; - return n && n.length > 0 ? n.pop() : null - } - isPatternMissing(e) { - if (!e) return !1; - if (!e.from || !e.to) return !0; - const n = this.imageManager.getPattern(e.from.toString()), - s = this.imageManager.getPattern(e.to.toString()); - return !n || !s - } - useProgram(e, n, s = !1, u = []) { - this.cache = this.cache || {}; - const d = !!this.style.map.terrain, - m = this.style.projection, - y = s ? pi.projectionMercator : m.shaderPreludeCode, - w = s ? Jr : m.shaderDefine, - P = e + (n ? n.cacheKey : "") + `/${s?ti:m.shaderVariantName}` + (this._showOverdrawInspector ? "/overdraw" : "") + (d ? "/terrain" : "") + (u ? `/${u.join("/")}` : ""); - return this.cache[P] || (this.cache[P] = new yc(this.context, pi[e], n, Sc[e], this._showOverdrawInspector, d, y, w, u)), this.cache[P] - } - 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 e = this.context.gl; - this.context.cullFace.set(!1), this.context.viewport.set([0, 0, this.width, this.height]), this.context.blendEquation.set(e.FUNC_ADD) - } - initDebugOverlayCanvas() { - this.debugOverlayCanvas == null && (this.debugOverlayCanvas = document.createElement("canvas"), this.debugOverlayCanvas.width = 512, this.debugOverlayCanvas.height = 512, this.debugOverlayTexture = new o.T(this.context, this.debugOverlayCanvas, this.context.gl.RGBA)) - } - destroy() { - this.debugOverlayTexture && this.debugOverlayTexture.destroy() - } - overLimit() { - const { - drawingBufferWidth: e, - drawingBufferHeight: n - } = this.context.gl; - return this.width !== e || this.height !== n - } - } - - function Ts(h, e) { - let n, s = !1, - u = null, - d = null; - const m = () => { - u = null, s && (h.apply(d, n), u = setTimeout(m, e), s = !1) - }; - return (...y) => (s = !0, d = this, n = y, u || m(), u) - } - class yl { - constructor(e) { - this._getCurrentHash = () => { - const n = window.location.hash.replace("#", ""); - if (this._hashName) { - let s; - return n.split("&").map((u => u.split("="))).forEach((u => { - u[0] === this._hashName && (s = u) - })), (s && s[1] || "").split("/") - } - return n.split("/") - }, this._onHashChange = () => { - const n = this._getCurrentHash(); - if (!this._isValidHash(n)) return !1; - const s = this._map.dragRotate.isEnabled() && this._map.touchZoomRotate.isEnabled() ? +(n[3] || 0) : this._map.getBearing(); - return this._map.jumpTo({ - center: [+n[2], +n[1]], - zoom: +n[0], - bearing: s, - pitch: +(n[4] || 0) - }), !0 - }, this._updateHashUnthrottled = () => { - const n = window.location.href.replace(/(#.*)?$/, this.getHashString()); - window.history.replaceState(window.history.state, null, n) - }, this._removeHash = () => { - const n = this._getCurrentHash(); - if (n.length === 0) return; - const s = n.join("/"); - let u = s; - u.split("&").length > 0 && (u = u.split("&")[0]), this._hashName && (u = `${this._hashName}=${s}`); - let d = window.location.hash.replace(u, ""); - d.startsWith("#&") ? d = d.slice(0, 1) + d.slice(2) : d === "#" && (d = ""); - let m = window.location.href.replace(/(#.+)?$/, d); - m = m.replace("&&", "&"), window.history.replaceState(window.history.state, null, m) - }, this._updateHash = Ts(this._updateHashUnthrottled, 300), this._hashName = e && encodeURIComponent(e) - } - addTo(e) { - return this._map = e, 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(e) { - const n = this._map.getCenter(), - s = Math.round(100 * this._map.getZoom()) / 100, - u = Math.ceil((s * Math.LN2 + Math.log(512 / 360 / .5)) / Math.LN10), - d = Math.pow(10, u), - m = Math.round(n.lng * d) / d, - y = Math.round(n.lat * d) / d, - w = this._map.getBearing(), - P = this._map.getPitch(); - let M = ""; - if (M += e ? `/${m}/${y}/${s}` : `${s}/${y}/${m}`, (w || P) && (M += "/" + Math.round(10 * w) / 10), P && (M += `/${Math.round(P)}`), this._hashName) { - const D = this._hashName; - let z = !1; - const B = window.location.hash.slice(1).split("&").map((U => { - const ee = U.split("=")[0]; - return ee === D ? (z = !0, `${ee}=${M}`) : U - })).filter((U => U)); - return z || B.push(`${D}=${M}`), `#${B.join("&")}` - } - return `#${M}` - } - _isValidHash(e) { - if (e.length < 3 || e.some(isNaN)) return !1; - try { - new o.S(+e[2], +e[1]) - } catch { - return !1 - } - const n = +e[0], - s = +(e[3] || 0), - u = +(e[4] || 0); - return n >= this._map.getMinZoom() && n <= this._map.getMaxZoom() && s >= -180 && s <= 180 && u >= this._map.getMinPitch() && u <= this._map.getMaxPitch() - } - } - const Ga = { - linearity: .3, - easing: o.cm(0, 0, .3, 1) - }, - jc = o.e({ - deceleration: 2500, - maxSpeed: 1400 - }, Ga), - qh = o.e({ - deceleration: 20, - maxSpeed: 1400 - }, Ga), - Vh = o.e({ - deceleration: 1e3, - maxSpeed: 360 - }, Ga), - Uh = o.e({ - deceleration: 1e3, - maxSpeed: 90 - }, Ga), - Zh = o.e({ - deceleration: 1e3, - maxSpeed: 360 - }, Ga); - class $h { - constructor(e) { - this._map = e, this.clear() - } - clear() { - this._inertiaBuffer = [] - } - record(e) { - this._drainInertiaBuffer(), this._inertiaBuffer.push({ - time: ye.now(), - settings: e - }) - } - _drainInertiaBuffer() { - const e = this._inertiaBuffer, - n = ye.now(); - for (; e.length > 0 && n - e[0].time > 160;) e.shift() - } - _onMoveEnd(e) { - if (this._drainInertiaBuffer(), this._inertiaBuffer.length < 2) return; - const n = { - zoom: 0, - bearing: 0, - pitch: 0, - roll: 0, - pan: new o.P(0, 0), - pinchAround: void 0, - around: void 0 - }; - for (const { - settings: d - } - of this._inertiaBuffer) n.zoom += d.zoomDelta || 0, n.bearing += d.bearingDelta || 0, n.pitch += d.pitchDelta || 0, n.roll += d.rollDelta || 0, d.panDelta && n.pan._add(d.panDelta), d.around && (n.around = d.around), d.pinchAround && (n.pinchAround = d.pinchAround); - const s = this._inertiaBuffer[this._inertiaBuffer.length - 1].time - this._inertiaBuffer[0].time, - u = {}; - if (n.pan.mag()) { - const d = js(n.pan.mag(), s, o.e({}, jc, e || {})), - m = n.pan.mult(d.amount / n.pan.mag()), - y = this._map.cameraHelper.handlePanInertia(m, this._map.transform); - u.center = y.easingCenter, u.offset = y.easingOffset, xa(u, d) - } - if (n.zoom) { - const d = js(n.zoom, s, qh); - u.zoom = this._map.transform.zoom + d.amount, xa(u, d) - } - if (n.bearing) { - const d = js(n.bearing, s, Vh); - u.bearing = this._map.transform.bearing + o.ah(d.amount, -179, 179), xa(u, d) - } - if (n.pitch) { - const d = js(n.pitch, s, Uh); - u.pitch = this._map.transform.pitch + d.amount, xa(u, d) - } - if (n.roll) { - const d = js(n.roll, s, Zh); - u.roll = this._map.transform.roll + o.ah(d.amount, -179, 179), xa(u, d) - } - if (u.zoom || u.bearing) { - const d = n.pinchAround === void 0 ? n.around : n.pinchAround; - u.around = d ? this._map.unproject(d) : this._map.getCenter() - } - return this.clear(), o.e(u, { - noMoveStart: !0 - }) - } - } - - function xa(h, e) { - (!h.duration || h.duration < e.duration) && (h.duration = e.duration, h.easing = e.easing) - } - - function js(h, e, n) { - const { - maxSpeed: s, - linearity: u, - deceleration: d - } = n, m = o.ah(h * u / (e / 1e3), -s, s), y = Math.abs(m) / (d * u); - return { - easing: n.easing, - duration: 1e3 * y, - amount: m * (y / 2) - } - } - class Wn extends o.l { - preventDefault() { - this._defaultPrevented = !0 - } - get defaultPrevented() { - return this._defaultPrevented - } - constructor(e, n, s, u = {}) { - s = s instanceof MouseEvent ? s : new MouseEvent(e, s); - const d = X.mousePos(n.getCanvas(), s), - m = n.unproject(d); - super(e, o.e({ - point: d, - lngLat: m, - originalEvent: s - }, u)), this._defaultPrevented = !1, this.target = n - } - } - class qs extends o.l { - preventDefault() { - this._defaultPrevented = !0 - } - get defaultPrevented() { - return this._defaultPrevented - } - constructor(e, n, s) { - const u = e === "touchend" ? s.changedTouches : s.touches, - d = X.touchPos(n.getCanvasContainer(), u), - m = d.map((w => n.unproject(w))), - y = d.reduce(((w, P, M, D) => w.add(P.div(D.length))), new o.P(0, 0)); - super(e, { - points: d, - point: y, - lngLats: m, - lngLat: n.unproject(y), - originalEvent: s - }), this._defaultPrevented = !1 - } - } - class qc extends o.l { - preventDefault() { - this._defaultPrevented = !0 - } - get defaultPrevented() { - return this._defaultPrevented - } - constructor(e, n, s) { - super(e, { - originalEvent: s - }), this._defaultPrevented = !1 - } - } - class Gh { - constructor(e, n) { - this._map = e, this._clickTolerance = n.clickTolerance - } - reset() { - delete this._mousedownPos - } - wheel(e) { - return this._firePreventable(new qc(e.type, this._map, e)) - } - mousedown(e, n) { - return this._mousedownPos = n, this._firePreventable(new Wn(e.type, this._map, e)) - } - mouseup(e) { - this._map.fire(new Wn(e.type, this._map, e)) - } - click(e, n) { - this._mousedownPos && this._mousedownPos.dist(n) >= this._clickTolerance || this._map.fire(new Wn(e.type, this._map, e)) - } - dblclick(e) { - return this._firePreventable(new Wn(e.type, this._map, e)) - } - mouseover(e) { - this._map.fire(new Wn(e.type, this._map, e)) - } - mouseout(e) { - this._map.fire(new Wn(e.type, this._map, e)) - } - touchstart(e) { - return this._firePreventable(new qs(e.type, this._map, e)) - } - touchmove(e) { - this._map.fire(new qs(e.type, this._map, e)) - } - touchend(e) { - this._map.fire(new qs(e.type, this._map, e)) - } - touchcancel(e) { - this._map.fire(new qs(e.type, this._map, e)) - } - _firePreventable(e) { - if (this._map.fire(e), e.defaultPrevented) return {} - } - isEnabled() { - return !0 - } - isActive() { - return !1 - } - enable() {} - disable() {} - } - class Hh { - constructor(e) { - this._map = e - } - reset() { - this._delayContextMenu = !1, this._ignoreContextMenu = !0, delete this._contextMenuEvent - } - mousemove(e) { - this._map.fire(new Wn(e.type, this._map, e)) - } - mousedown() { - this._delayContextMenu = !0, this._ignoreContextMenu = !1 - } - mouseup() { - this._delayContextMenu = !1, this._contextMenuEvent && (this._map.fire(new Wn("contextmenu", this._map, this._contextMenuEvent)), delete this._contextMenuEvent) - } - contextmenu(e) { - this._delayContextMenu ? this._contextMenuEvent = e : this._ignoreContextMenu || this._map.fire(new Wn(e.type, this._map, e)), this._map.listens("contextmenu") && e.preventDefault() - } - isEnabled() { - return !0 - } - isActive() { - return !1 - } - enable() {} - disable() {} - } - class Vs { - constructor(e) { - this._map = e - } - 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(e) { - return this.transform.screenPointToLocation(o.P.convert(e), this._map.terrain) - } - } - class Vc { - constructor(e, n) { - this._map = e, this._tr = new Vs(e), this._el = e.getCanvasContainer(), this._container = e.getContainer(), this._clickTolerance = n.clickTolerance || 1 - } - isEnabled() { - return !!this._enabled - } - isActive() { - return !!this._active - } - enable() { - this.isEnabled() || (this._enabled = !0) - } - disable() { - this.isEnabled() && (this._enabled = !1) - } - mousedown(e, n) { - this.isEnabled() && e.shiftKey && e.button === 0 && (X.disableDrag(), this._startPos = this._lastPos = n, this._active = !0) - } - mousemoveWindow(e, n) { - if (!this._active) return; - const s = n; - if (this._lastPos.equals(s) || !this._box && s.dist(this._startPos) < this._clickTolerance) return; - const u = this._startPos; - this._lastPos = s, this._box || (this._box = X.create("div", "maplibregl-boxzoom", this._container), this._container.classList.add("maplibregl-crosshair"), this._fireEvent("boxzoomstart", e)); - const d = Math.min(u.x, s.x), - m = Math.max(u.x, s.x), - y = Math.min(u.y, s.y), - w = Math.max(u.y, s.y); - X.setTransform(this._box, `translate(${d}px,${y}px)`), this._box.style.width = m - d + "px", this._box.style.height = w - y + "px" - } - mouseupWindow(e, n) { - if (!this._active || e.button !== 0) return; - const s = this._startPos, - u = n; - if (this.reset(), X.suppressClick(), s.x !== u.x || s.y !== u.y) return this._map.fire(new o.l("boxzoomend", { - originalEvent: e - })), { - cameraAnimation: d => d.fitScreenCoordinates(s, u, this._tr.bearing, { - linear: !0 - }) - }; - this._fireEvent("boxzoomcancel", e) - } - keydown(e) { - this._active && e.keyCode === 27 && (this.reset(), this._fireEvent("boxzoomcancel", e)) - } - reset() { - this._active = !1, this._container.classList.remove("maplibregl-crosshair"), this._box && (X.remove(this._box), this._box = null), X.enableDrag(), delete this._startPos, delete this._lastPos - } - _fireEvent(e, n) { - return this._map.fire(new o.l(e, { - originalEvent: n - })) - } - } - - function Us(h, e) { - if (h.length !== e.length) throw new Error(`The number of touches and points are not equal - touches ${h.length}, points ${e.length}`); - const n = {}; - for (let s = 0; s < h.length; s++) n[h[s].identifier] = e[s]; - return n - } - class Wh { - constructor(e) { - this.reset(), this.numTouches = e.numTouches - } - reset() { - delete this.centroid, delete this.startTime, delete this.touches, this.aborted = !1 - } - touchstart(e, n, s) { - (this.centroid || s.length > this.numTouches) && (this.aborted = !0), this.aborted || (this.startTime === void 0 && (this.startTime = e.timeStamp), s.length === this.numTouches && (this.centroid = (function(u) { - const d = new o.P(0, 0); - for (const m of u) d._add(m); - return d.div(u.length) - })(n), this.touches = Us(s, n))) - } - touchmove(e, n, s) { - if (this.aborted || !this.centroid) return; - const u = Us(s, n); - for (const d in this.touches) { - const m = u[d]; - (!m || m.dist(this.touches[d]) > 30) && (this.aborted = !0) - } - } - touchend(e, n, s) { - if ((!this.centroid || e.timeStamp - this.startTime > 500) && (this.aborted = !0), s.length === 0) { - const u = !this.aborted && this.centroid; - if (this.reset(), u) return u - } - } - } - class Xn { - constructor(e) { - this.singleTap = new Wh(e), this.numTaps = e.numTaps, this.reset() - } - reset() { - this.lastTime = 1 / 0, delete this.lastTap, this.count = 0, this.singleTap.reset() - } - touchstart(e, n, s) { - this.singleTap.touchstart(e, n, s) - } - touchmove(e, n, s) { - this.singleTap.touchmove(e, n, s) - } - touchend(e, n, s) { - const u = this.singleTap.touchend(e, n, s); - if (u) { - const d = e.timeStamp - this.lastTime < 500, - m = !this.lastTap || this.lastTap.dist(u) < 30; - if (d && m || this.reset(), this.count++, this.lastTime = e.timeStamp, this.lastTap = u, this.count === this.numTaps) return this.reset(), u - } - } - } - class ba { - constructor(e) { - this._tr = new Vs(e), this._zoomIn = new Xn({ - numTouches: 1, - numTaps: 2 - }), this._zoomOut = new Xn({ - numTouches: 2, - numTaps: 1 - }), this.reset() - } - reset() { - this._active = !1, this._zoomIn.reset(), this._zoomOut.reset() - } - touchstart(e, n, s) { - this._zoomIn.touchstart(e, n, s), this._zoomOut.touchstart(e, n, s) - } - touchmove(e, n, s) { - this._zoomIn.touchmove(e, n, s), this._zoomOut.touchmove(e, n, s) - } - touchend(e, n, s) { - const u = this._zoomIn.touchend(e, n, s), - d = this._zoomOut.touchend(e, n, s), - m = this._tr; - return u ? (this._active = !0, e.preventDefault(), setTimeout((() => this.reset()), 0), { - cameraAnimation: y => y.easeTo({ - duration: 300, - zoom: m.zoom + 1, - around: m.unproject(u) - }, { - originalEvent: e - }) - }) : d ? (this._active = !0, e.preventDefault(), setTimeout((() => this.reset()), 0), { - cameraAnimation: y => y.easeTo({ - duration: 300, - zoom: m.zoom - 1, - around: m.unproject(d) - }, { - originalEvent: e - }) - }) : void 0 - } - touchcancel() { - this.reset() - } - enable() { - this._enabled = !0 - } - disable() { - this._enabled = !1, this.reset() - } - isEnabled() { - return this._enabled - } - isActive() { - return this._active - } - } - class Zs { - constructor(e) { - this._enabled = !!e.enable, this._moveStateManager = e.moveStateManager, this._clickTolerance = e.clickTolerance || 1, this._moveFunction = e.move, this._activateOnStart = !!e.activateOnStart, e.assignEvents(this), this.reset() - } - reset(e) { - this._active = !1, this._moved = !1, delete this._lastPoint, this._moveStateManager.endMove(e) - } - _move(...e) { - const n = this._moveFunction(...e); - if (n.bearingDelta || n.pitchDelta || n.rollDelta || n.around || n.panDelta) return this._active = !0, n - } - dragStart(e, n) { - this.isEnabled() && !this._lastPoint && this._moveStateManager.isValidStartEvent(e) && (this._moveStateManager.startMove(e), this._lastPoint = Array.isArray(n) ? n[0] : n, this._activateOnStart && this._lastPoint && (this._active = !0)) - } - dragMove(e, n) { - if (!this.isEnabled()) return; - const s = this._lastPoint; - if (!s) return; - if (e.preventDefault(), !this._moveStateManager.isValidMoveEvent(e)) return void this.reset(e); - const u = Array.isArray(n) ? n[0] : n; - return !this._moved && u.dist(s) < this._clickTolerance ? void 0 : (this._moved = !0, this._lastPoint = u, this._move(s, u)) - } - dragEnd(e) { - this.isEnabled() && this._lastPoint && this._moveStateManager.isValidEndEvent(e) && (this._moved && X.suppressClick(), this.reset(e)) - } - enable() { - this._enabled = !0 - } - disable() { - this._enabled = !1, this.reset() - } - isEnabled() { - return this._enabled - } - isActive() { - return this._active - } - getClickTolerance() { - return this._clickTolerance - } - } - const wa = 0, - $s = 2, - _p = { - [wa]: 1, - [$s]: 2 - }; - class ko { - constructor(e) { - this._correctEvent = e.checkCorrectEvent - } - startMove(e) { - const n = X.mouseButton(e); - this._eventButton = n - } - endMove(e) { - delete this._eventButton - } - isValidStartEvent(e) { - return this._correctEvent(e) - } - isValidMoveEvent(e) { - return !(function(n, s) { - const u = _p[s]; - return n.buttons === void 0 || (n.buttons & u) !== u - })(e, this._eventButton) - } - isValidEndEvent(e) { - return X.mouseButton(e) === this._eventButton - } - } - class gp { - constructor() { - this._firstTouch = void 0 - } - _isOneFingerTouch(e) { - return e.targetTouches.length === 1 - } - _isSameTouchEvent(e) { - return e.targetTouches[0].identifier === this._firstTouch - } - startMove(e) { - this._firstTouch = e.targetTouches[0].identifier - } - endMove(e) { - delete this._firstTouch - } - isValidStartEvent(e) { - return this._isOneFingerTouch(e) - } - isValidMoveEvent(e) { - return this._isOneFingerTouch(e) && this._isSameTouchEvent(e) - } - isValidEndEvent(e) { - return this._isOneFingerTouch(e) && this._isSameTouchEvent(e) - } - } - class vp { - constructor(e = new ko({ - checkCorrectEvent: () => !0 - }), n = new gp) { - this.mouseMoveStateManager = e, this.oneFingerTouchMoveStateManager = n - } - _executeRelevantHandler(e, n, s) { - return e instanceof MouseEvent ? n(e) : typeof TouchEvent < "u" && e instanceof TouchEvent ? s(e) : void 0 - } - startMove(e) { - this._executeRelevantHandler(e, (n => this.mouseMoveStateManager.startMove(n)), (n => this.oneFingerTouchMoveStateManager.startMove(n))) - } - endMove(e) { - this._executeRelevantHandler(e, (n => this.mouseMoveStateManager.endMove(n)), (n => this.oneFingerTouchMoveStateManager.endMove(n))) - } - isValidStartEvent(e) { - return this._executeRelevantHandler(e, (n => this.mouseMoveStateManager.isValidStartEvent(n)), (n => this.oneFingerTouchMoveStateManager.isValidStartEvent(n))) - } - isValidMoveEvent(e) { - return this._executeRelevantHandler(e, (n => this.mouseMoveStateManager.isValidMoveEvent(n)), (n => this.oneFingerTouchMoveStateManager.isValidMoveEvent(n))) - } - isValidEndEvent(e) { - return this._executeRelevantHandler(e, (n => this.mouseMoveStateManager.isValidEndEvent(n)), (n => this.oneFingerTouchMoveStateManager.isValidEndEvent(n))) - } - } - const Eo = h => { - h.mousedown = h.dragStart, h.mousemoveWindow = h.dragMove, h.mouseup = h.dragEnd, h.contextmenu = e => { - e.preventDefault() - } - }; - class zo { - constructor(e, n) { - this._clickTolerance = e.clickTolerance || 1, this._map = n, this.reset() - } - reset() { - this._active = !1, this._touches = {}, this._sum = new o.P(0, 0) - } - _shouldBePrevented(e) { - return e < (this._map.cooperativeGestures.isEnabled() ? 2 : 1) - } - touchstart(e, n, s) { - return this._calculateTransform(e, n, s) - } - touchmove(e, n, s) { - if (this._active) { - if (!this._shouldBePrevented(s.length)) return e.preventDefault(), this._calculateTransform(e, n, s); - this._map.cooperativeGestures.notifyGestureBlocked("touch_pan", e) - } - } - touchend(e, n, s) { - this._calculateTransform(e, n, s), this._active && this._shouldBePrevented(s.length) && this.reset() - } - touchcancel() { - this.reset() - } - _calculateTransform(e, n, s) { - s.length > 0 && (this._active = !0); - const u = Us(s, n), - d = new o.P(0, 0), - m = new o.P(0, 0); - let y = 0; - for (const P in u) { - const M = u[P], - D = this._touches[P]; - D && (d._add(M), m._add(M.sub(D)), y++, u[P] = M) - } - if (this._touches = u, this._shouldBePrevented(y) || !m.mag()) return; - const w = m.div(y); - return this._sum._add(w), this._sum.mag() < this._clickTolerance ? void 0 : { - around: d.div(y), - panDelta: w - } - } - enable() { - this._enabled = !0 - } - disable() { - this._enabled = !1, this.reset() - } - isEnabled() { - return this._enabled - } - isActive() { - return this._active - } - } - class Ta { - constructor() { - this.reset() - } - reset() { - this._active = !1, delete this._firstTwoTouches - } - touchstart(e, n, s) { - this._firstTwoTouches || s.length < 2 || (this._firstTwoTouches = [s[0].identifier, s[1].identifier], this._start([n[0], n[1]])) - } - touchmove(e, n, s) { - if (!this._firstTwoTouches) return; - e.preventDefault(); - const [u, d] = this._firstTwoTouches, m = Kt(s, n, u), y = Kt(s, n, d); - if (!m || !y) return; - const w = this._aroundCenter ? null : m.add(y).div(2); - return this._move([m, y], w, e) - } - touchend(e, n, s) { - if (!this._firstTwoTouches) return; - const [u, d] = this._firstTwoTouches, m = Kt(s, n, u), y = Kt(s, n, d); - m && y || (this._active && X.suppressClick(), this.reset()) - } - touchcancel() { - this.reset() - } - enable(e) { - this._enabled = !0, this._aroundCenter = !!e && e.around === "center" - } - disable() { - this._enabled = !1, this.reset() - } - isEnabled() { - return !!this._enabled - } - isActive() { - return !!this._active - } - } - - function Kt(h, e, n) { - for (let s = 0; s < h.length; s++) - if (h[s].identifier === n) return e[s] - } - - function Uc(h, e) { - return Math.log(h / e) / Math.LN2 - } - class xl extends Ta { - reset() { - super.reset(), delete this._distance, delete this._startDistance - } - _start(e) { - this._startDistance = this._distance = e[0].dist(e[1]) - } - _move(e, n) { - const s = this._distance; - if (this._distance = e[0].dist(e[1]), this._active || !(Math.abs(Uc(this._distance, this._startDistance)) < .1)) return this._active = !0, { - zoomDelta: Uc(this._distance, s), - pinchAround: n - } - } - } - - function Zc(h, e) { - return 180 * h.angleWith(e) / Math.PI - } - class Gs extends Ta { - reset() { - super.reset(), delete this._minDiameter, delete this._startVector, delete this._vector - } - _start(e) { - this._startVector = this._vector = e[0].sub(e[1]), this._minDiameter = e[0].dist(e[1]) - } - _move(e, n, s) { - const u = this._vector; - if (this._vector = e[0].sub(e[1]), this._active || !this._isBelowThreshold(this._vector)) return this._active = !0, { - bearingDelta: Zc(this._vector, u), - pinchAround: n - } - } - _isBelowThreshold(e) { - this._minDiameter = Math.min(this._minDiameter, e.mag()); - const n = 25 / (Math.PI * this._minDiameter) * 360, - s = Zc(e, this._startVector); - return Math.abs(s) < n - } - } - - function Cs(h) { - return Math.abs(h.y) > Math.abs(h.x) - } - class bl extends Ta { - constructor(e) { - super(), this._currentTouchCount = 0, this._map = e - } - reset() { - super.reset(), this._valid = void 0, delete this._firstMove, delete this._lastPoints - } - touchstart(e, n, s) { - super.touchstart(e, n, s), this._currentTouchCount = s.length - } - _start(e) { - this._lastPoints = e, Cs(e[0].sub(e[1])) && (this._valid = !1) - } - _move(e, n, s) { - if (this._map.cooperativeGestures.isEnabled() && this._currentTouchCount < 3) return; - const u = e[0].sub(this._lastPoints[0]), - d = e[1].sub(this._lastPoints[1]); - return this._valid = this.gestureBeginsVertically(u, d, s.timeStamp), this._valid ? (this._lastPoints = e, this._active = !0, { - pitchDelta: (u.y + d.y) / 2 * -.5 - }) : void 0 - } - gestureBeginsVertically(e, n, s) { - if (this._valid !== void 0) return this._valid; - const u = e.mag() >= 2, - d = n.mag() >= 2; - if (!u && !d) return; - if (!u || !d) return this._firstMove === void 0 && (this._firstMove = s), s - this._firstMove < 100 && void 0; - const m = e.y > 0 == n.y > 0; - return Cs(e) && Cs(n) && m - } - } - const si = { - panStep: 100, - bearingStep: 15, - pitchStep: 10 - }; - class wl { - constructor(e) { - this._tr = new Vs(e); - const n = si; - this._panStep = n.panStep, this._bearingStep = n.bearingStep, this._pitchStep = n.pitchStep, this._rotationDisabled = !1 - } - reset() { - this._active = !1 - } - keydown(e) { - if (e.altKey || e.ctrlKey || e.metaKey) return; - let n = 0, - s = 0, - u = 0, - d = 0, - m = 0; - switch (e.keyCode) { - case 61: - case 107: - case 171: - case 187: - n = 1; - break; - case 189: - case 109: - case 173: - n = -1; - break; - case 37: - e.shiftKey ? s = -1 : (e.preventDefault(), d = -1); - break; - case 39: - e.shiftKey ? s = 1 : (e.preventDefault(), d = 1); - break; - case 38: - e.shiftKey ? u = 1 : (e.preventDefault(), m = -1); - break; - case 40: - e.shiftKey ? u = -1 : (e.preventDefault(), m = 1); - break; - default: - return - } - return this._rotationDisabled && (s = 0, u = 0), { - cameraAnimation: y => { - const w = this._tr; - y.easeTo({ - duration: 300, - easeId: "keyboardHandler", - easing: yp, - zoom: n ? Math.round(w.zoom) + n * (e.shiftKey ? 2 : 1) : w.zoom, - bearing: w.bearing + s * this._bearingStep, - pitch: w.pitch + u * this._pitchStep, - offset: [-d * this._panStep, -m * this._panStep], - center: w.center - }, { - originalEvent: e - }) - } - } - } - 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 yp(h) { - return h * (2 - h) - } - const Tl = 4.000244140625, - xp = 1 / 450; - class Xh { - constructor(e, n) { - this._onTimeout = s => { - this._type = "wheel", this._delta -= this._lastValue, this._active || this._start(s) - }, this._map = e, this._tr = new Vs(e), this._triggerRenderFrame = n, this._delta = 0, this._defaultZoomRate = .01, this._wheelZoomRate = xp - } - setZoomRate(e) { - this._defaultZoomRate = e - } - setWheelZoomRate(e) { - this._wheelZoomRate = e - } - isEnabled() { - return !!this._enabled - } - isActive() { - return !!this._active || this._finishTimeout !== void 0 - } - isZooming() { - return !!this._zooming - } - enable(e) { - this.isEnabled() || (this._enabled = !0, this._aroundCenter = !!e && e.around === "center") - } - disable() { - this.isEnabled() && (this._enabled = !1) - } - _shouldBePrevented(e) { - return !!this._map.cooperativeGestures.isEnabled() && !(e.ctrlKey || this._map.cooperativeGestures.isBypassed(e)) - } - wheel(e) { - if (!this.isEnabled()) return; - if (this._shouldBePrevented(e)) return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom", e); - let n = e.deltaMode === WheelEvent.DOM_DELTA_LINE ? 40 * e.deltaY : e.deltaY; - const s = ye.now(), - u = s - (this._lastWheelEventTime || 0); - this._lastWheelEventTime = s, n !== 0 && n % Tl == 0 ? this._type = "wheel" : n !== 0 && Math.abs(n) < 4 ? this._type = "trackpad" : u > 400 ? (this._type = null, this._lastValue = n, this._timeout = setTimeout(this._onTimeout, 40, e)) : this._type || (this._type = Math.abs(u * n) < 200 ? "trackpad" : "wheel", this._timeout && (clearTimeout(this._timeout), this._timeout = null, n += this._lastValue)), e.shiftKey && n && (n /= 4), this._type && (this._lastWheelEvent = e, this._delta -= n, this._active || this._start(e)), e.preventDefault() - } - _start(e) { - if (!this._delta) return; - this._frameId && (this._frameId = null), this._active = !0, this.isZooming() || (this._zooming = !0), this._finishTimeout && (clearTimeout(this._finishTimeout), delete this._finishTimeout); - const n = X.mousePos(this._map.getCanvas(), e), - s = this._tr; - this._aroundPoint = this._aroundCenter ? s.transform.locationToScreenPoint(o.S.convert(s.center)) : n, this._frameId || (this._frameId = !0, this._triggerRenderFrame()) - } - renderFrame() { - if (!this._frameId || (this._frameId = null, !this.isActive())) return; - const e = this._tr.transform; - if (typeof this._lastExpectedZoom == "number") { - const y = e.zoom - this._lastExpectedZoom; - typeof this._startZoom == "number" && (this._startZoom += y), typeof this._targetZoom == "number" && (this._targetZoom += y) - } - if (this._delta !== 0) { - const y = this._type === "wheel" && Math.abs(this._delta) > Tl ? this._wheelZoomRate : this._defaultZoomRate; - let w = 2 / (1 + Math.exp(-Math.abs(this._delta * y))); - this._delta < 0 && w !== 0 && (w = 1 / w); - const P = typeof this._targetZoom != "number" ? e.scale : o.af(this._targetZoom); - this._targetZoom = e.getConstrained(e.getCameraLngLat(), o.ak(P * w)).zoom, this._type === "wheel" && (this._startZoom = e.zoom, this._easing = this._smoothOutEasing(200)), this._delta = 0 - } - const n = typeof this._targetZoom != "number" ? e.zoom : this._targetZoom, - s = this._startZoom, - u = this._easing; - let d, m = !1; - if (this._type === "wheel" && s && u) { - const y = ye.now() - this._lastWheelEventTime, - w = Math.min((y + 5) / 200, 1), - P = u(w); - d = o.C.number(s, n, P), w < 1 ? this._frameId || (this._frameId = !0) : m = !0 - } else d = n, m = !0; - return this._active = !0, m && (this._active = !1, this._finishTimeout = setTimeout((() => { - this._zooming = !1, this._triggerRenderFrame(), delete this._targetZoom, delete this._lastExpectedZoom, delete this._finishTimeout - }), 200)), this._lastExpectedZoom = d, { - noInertia: !0, - needsRenderFrame: !m, - zoomDelta: d - e.zoom, - around: this._aroundPoint, - originalEvent: this._lastWheelEvent - } - } - _smoothOutEasing(e) { - let n = o.co; - if (this._prevEase) { - const s = this._prevEase, - u = (ye.now() - s.start) / s.duration, - d = s.easing(u + .01) - s.easing(u), - m = .27 / Math.sqrt(d * d + 1e-4) * .01, - y = Math.sqrt(.0729 - m * m); - n = o.cm(m, y, .25, 1) - } - return this._prevEase = { - start: ye.now(), - duration: e, - easing: n - }, n - } - reset() { - this._active = !1, this._zooming = !1, delete this._targetZoom, delete this._lastExpectedZoom, this._finishTimeout && (clearTimeout(this._finishTimeout), delete this._finishTimeout) - } - } - class $c { - constructor(e, n) { - this._clickZoom = e, this._tapZoom = n - } - 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 Gc { - constructor(e) { - this._tr = new Vs(e), this.reset() - } - reset() { - this._active = !1 - } - dblclick(e, n) { - return e.preventDefault(), { - cameraAnimation: s => { - s.easeTo({ - duration: 300, - zoom: this._tr.zoom + (e.shiftKey ? -1 : 1), - around: this._tr.unproject(n) - }, { - originalEvent: e - }) - } - } - } - enable() { - this._enabled = !0 - } - disable() { - this._enabled = !1, this.reset() - } - isEnabled() { - return this._enabled - } - isActive() { - return this._active - } - } - class Kh { - constructor() { - this._tap = new Xn({ - numTouches: 1, - numTaps: 1 - }), this.reset() - } - reset() { - this._active = !1, delete this._swipePoint, delete this._swipeTouch, delete this._tapTime, delete this._tapPoint, this._tap.reset() - } - touchstart(e, n, s) { - if (!this._swipePoint) - if (this._tapTime) { - const u = n[0], - d = e.timeStamp - this._tapTime < 500, - m = this._tapPoint.dist(u) < 30; - d && m ? s.length > 0 && (this._swipePoint = u, this._swipeTouch = s[0].identifier) : this.reset() - } else this._tap.touchstart(e, n, s) - } - touchmove(e, n, s) { - if (this._tapTime) { - if (this._swipePoint) { - if (s[0].identifier !== this._swipeTouch) return; - const u = n[0], - d = u.y - this._swipePoint.y; - return this._swipePoint = u, e.preventDefault(), this._active = !0, { - zoomDelta: d / 128 - } - } - } else this._tap.touchmove(e, n, s) - } - touchend(e, n, s) { - if (this._tapTime) this._swipePoint && s.length === 0 && this.reset(); - else { - const u = this._tap.touchend(e, n, s); - u && (this._tapTime = e.timeStamp, this._tapPoint = u) - } - } - touchcancel() { - this.reset() - } - enable() { - this._enabled = !0 - } - disable() { - this._enabled = !1, this.reset() - } - isEnabled() { - return this._enabled - } - isActive() { - return this._active - } - } - class Yh { - constructor(e, n, s) { - this._el = e, this._mousePan = n, this._touchPan = s - } - enable(e) { - this._inertiaOptions = e || {}, 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 Hc { - constructor(e, n, s, u) { - this._pitchWithRotate = e.pitchWithRotate, this._rollEnabled = e.rollEnabled, this._mouseRotate = n, this._mousePitch = s, this._mouseRoll = u - } - 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 Jh { - constructor(e, n, s, u) { - this._el = e, this._touchZoom = n, this._touchRotate = s, this._tapDragZoom = u, this._rotationDisabled = !1, this._enabled = !0 - } - enable(e) { - this._touchZoom.enable(e), this._rotationDisabled || this._touchRotate.enable(e), 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() - } - disableRotation() { - this._rotationDisabled = !0, this._touchRotate.disable() - } - enableRotation() { - this._rotationDisabled = !1, this._touchZoom.isEnabled() && this._touchRotate.enable() - } - } - class Qh { - constructor(e, n) { - this._bypassKey = navigator.userAgent.indexOf("Mac") !== -1 ? "metaKey" : "ctrlKey", this._map = e, this._options = n, this._enabled = !1 - } - isActive() { - return !1 - } - reset() {} - _setupUI() { - if (this._container) return; - const e = this._map.getCanvasContainer(); - e.classList.add("maplibregl-cooperative-gestures"), this._container = X.create("div", "maplibregl-cooperative-gesture-screen", e); - let n = this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText"); - this._bypassKey === "metaKey" && (n = this._map._getUIString("CooperativeGesturesHandler.MacHelpText")); - const s = this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"), - u = document.createElement("div"); - u.className = "maplibregl-desktop-message", u.textContent = n, this._container.appendChild(u); - const d = document.createElement("div"); - d.className = "maplibregl-mobile-message", d.textContent = s, this._container.appendChild(d), this._container.setAttribute("aria-hidden", "true") - } - _destroyUI() { - this._container && (X.remove(this._container), 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(e) { - return e[this._bypassKey] - } - notifyGestureBlocked(e, n) { - this._enabled && (this._map.fire(new o.l("cooperativegestureprevented", { - gestureType: e, - originalEvent: n - })), this._container.classList.add("maplibregl-show"), setTimeout((() => { - this._container.classList.remove("maplibregl-show") - }), 100)) - } - } - const Ca = h => h.zoom || h.drag || h.roll || h.pitch || h.rotate; - class Oi extends o.l {} - - function Hs(h) { - return h.panDelta && h.panDelta.mag() || h.zoomDelta || h.bearingDelta || h.pitchDelta || h.rollDelta - } - class Wc { - constructor(e, n) { - this.handleWindowEvent = u => { - this.handleEvent(u, `${u.type}Window`) - }, this.handleEvent = (u, d) => { - if (u.type === "blur") return void this.stop(!0); - this._updatingCamera = !0; - const m = u.type === "renderFrame" ? void 0 : u, - y = { - needsRenderFrame: !1 - }, - w = {}, - P = {}; - for (const { - handlerName: z, - handler: B, - allowed: U - } - of this._handlers) { - if (!B.isEnabled()) continue; - let ee; - if (this._blockedByActive(P, U, z)) B.reset(); - else if (B[d || u.type]) { - if (o.cp(u, d || u.type)) { - const J = X.mousePos(this._map.getCanvas(), u); - ee = B[d || u.type](u, J) - } else if (o.cq(u, d || u.type)) { - const J = this._getMapTouches(u.touches), - re = X.touchPos(this._map.getCanvas(), J); - ee = B[d || u.type](u, re, J) - } else o.cr(d || u.type) || (ee = B[d || u.type](u)); - this.mergeHandlerResult(y, w, ee, z, m), ee && ee.needsRenderFrame && this._triggerRenderFrame() - }(ee || B.isActive()) && (P[z] = B) - } - const M = {}; - for (const z in this._previousActiveHandlers) P[z] || (M[z] = m); - this._previousActiveHandlers = P, (Object.keys(M).length || Hs(y)) && (this._changes.push([y, w, M]), this._triggerRenderFrame()), (Object.keys(P).length || Hs(y)) && this._map._stop(!0), this._updatingCamera = !1; - const { - cameraAnimation: D - } = y; - D && (this._inertia.clear(), this._fireEvents({}, {}, !0), this._changes = [], D(this._map)) - }, this._map = e, this._el = this._map.getCanvasContainer(), this._handlers = [], this._handlersById = {}, this._changes = [], this._inertia = new $h(e), this._bearingSnap = n.bearingSnap, this._previousActiveHandlers = {}, this._eventsInProgress = {}, this._addDefaultHandlers(n); - const s = this._el; - this._listeners = [ - [s, "touchstart", { - passive: !0 - }], - [s, "touchmove", { - passive: !1 - }], - [s, "touchend", void 0], - [s, "touchcancel", void 0], - [s, "mousedown", void 0], - [s, "mousemove", void 0], - [s, "mouseup", void 0], - [document, "mousemove", { - capture: !0 - }], - [document, "mouseup", void 0], - [s, "mouseover", void 0], - [s, "mouseout", void 0], - [s, "dblclick", void 0], - [s, "click", void 0], - [s, "keydown", { - capture: !1 - }], - [s, "keyup", void 0], - [s, "wheel", { - passive: !1 - }], - [s, "contextmenu", void 0], - [window, "blur", void 0] - ]; - for (const [u, d, m] of this._listeners) X.addEventListener(u, d, u === document ? this.handleWindowEvent : this.handleEvent, m) - } - destroy() { - for (const [e, n, s] of this._listeners) X.removeEventListener(e, n, e === document ? this.handleWindowEvent : this.handleEvent, s) - } - _addDefaultHandlers(e) { - const n = this._map, - s = n.getCanvasContainer(); - this._add("mapEvent", new Gh(n, e)); - const u = n.boxZoom = new Vc(n, e); - this._add("boxZoom", u), e.interactive && e.boxZoom && u.enable(); - const d = n.cooperativeGestures = new Qh(n, e.cooperativeGestures); - this._add("cooperativeGestures", d), e.cooperativeGestures && d.enable(); - const m = new ba(n), - y = new Gc(n); - n.doubleClickZoom = new $c(y, m), this._add("tapZoom", m), this._add("clickZoom", y), e.interactive && e.doubleClickZoom && n.doubleClickZoom.enable(); - const w = new Kh; - this._add("tapDragZoom", w); - const P = n.touchPitch = new bl(n); - this._add("touchPitch", P), e.interactive && e.touchPitch && n.touchPitch.enable(e.touchPitch); - const M = () => n.project(n.getCenter()), - D = (function({ - enable: ue, - clickTolerance: ge, - aroundCenter: Te = !0, - minPixelCenterThreshold: he = 100, - rotateDegreesPerPixelMoved: De = .8 - }, He) { - const je = new ko({ - checkCorrectEvent: qe => X.mouseButton(qe) === 0 && qe.ctrlKey || X.mouseButton(qe) === 2 && !qe.ctrlKey - }); - return new Zs({ - clickTolerance: ge, - move: (qe, $e) => { - const Rt = He(); - if (Te && Math.abs(Rt.y - qe.y) > he) return { - bearingDelta: o.cn(new o.P(qe.x, $e.y), $e, Rt) - }; - let Nt = ($e.x - qe.x) * De; - return Te && $e.y < Rt.y && (Nt = -Nt), { - bearingDelta: Nt - } - }, - moveStateManager: je, - enable: ue, - assignEvents: Eo - }) - })(e, M), - z = (function({ - enable: ue, - clickTolerance: ge, - pitchDegreesPerPixelMoved: Te = -.5 - }) { - const he = new ko({ - checkCorrectEvent: De => X.mouseButton(De) === 0 && De.ctrlKey || X.mouseButton(De) === 2 - }); - return new Zs({ - clickTolerance: ge, - move: (De, He) => ({ - pitchDelta: (He.y - De.y) * Te - }), - moveStateManager: he, - enable: ue, - assignEvents: Eo - }) - })(e), - B = (function({ - enable: ue, - clickTolerance: ge, - rollDegreesPerPixelMoved: Te = .3 - }, he) { - const De = new ko({ - checkCorrectEvent: He => X.mouseButton(He) === 2 && He.ctrlKey - }); - return new Zs({ - clickTolerance: ge, - move: (He, je) => { - const qe = he(); - let $e = (je.x - He.x) * Te; - return je.y < qe.y && ($e = -$e), { - rollDelta: $e - } - }, - moveStateManager: De, - enable: ue, - assignEvents: Eo - }) - })(e, M); - n.dragRotate = new Hc(e, D, z, B), this._add("mouseRotate", D, ["mousePitch"]), this._add("mousePitch", z, ["mouseRotate", "mouseRoll"]), this._add("mouseRoll", B, ["mousePitch"]), e.interactive && e.dragRotate && n.dragRotate.enable(); - const U = (function({ - enable: ue, - clickTolerance: ge - }) { - const Te = new ko({ - checkCorrectEvent: he => X.mouseButton(he) === 0 && !he.ctrlKey - }); - return new Zs({ - clickTolerance: ge, - move: (he, De) => ({ - around: De, - panDelta: De.sub(he) - }), - activateOnStart: !0, - moveStateManager: Te, - enable: ue, - assignEvents: Eo - }) - })(e), - ee = new zo(e, n); - n.dragPan = new Yh(s, U, ee), this._add("mousePan", U), this._add("touchPan", ee, ["touchZoom", "touchRotate"]), e.interactive && e.dragPan && n.dragPan.enable(e.dragPan); - const J = new Gs, - re = new xl; - n.touchZoomRotate = new Jh(s, re, J, w), this._add("touchRotate", J, ["touchPan", "touchZoom"]), this._add("touchZoom", re, ["touchPan", "touchRotate"]), e.interactive && e.touchZoomRotate && n.touchZoomRotate.enable(e.touchZoomRotate); - const se = n.scrollZoom = new Xh(n, (() => this._triggerRenderFrame())); - this._add("scrollZoom", se, ["mousePan"]), e.interactive && e.scrollZoom && n.scrollZoom.enable(e.scrollZoom); - const de = n.keyboard = new wl(n); - this._add("keyboard", de), e.interactive && e.keyboard && n.keyboard.enable(), this._add("blockableMapEvent", new Hh(n)) - } - _add(e, n, s) { - this._handlers.push({ - handlerName: e, - handler: n, - allowed: s - }), this._handlersById[e] = n - } - stop(e) { - if (!this._updatingCamera) { - for (const { - handler: n - } - of this._handlers) n.reset(); - this._inertia.clear(), this._fireEvents({}, {}, e), this._changes = [] - } - } - isActive() { - for (const { - handler: e - } - of this._handlers) - if (e.isActive()) return !0; - return !1 - } - isZooming() { - return !!this._eventsInProgress.zoom || this._map.scrollZoom.isZooming() - } - isRotating() { - return !!this._eventsInProgress.rotate - } - isMoving() { - return !!Ca(this._eventsInProgress) || this.isZooming() - } - _blockedByActive(e, n, s) { - for (const u in e) - if (u !== s && (!n || n.indexOf(u) < 0)) return !0; - return !1 - } - _getMapTouches(e) { - const n = []; - for (const s of e) this._el.contains(s.target) && n.push(s); - return n - } - mergeHandlerResult(e, n, s, u, d) { - if (!s) return; - o.e(e, s); - const m = { - handlerName: u, - originalEvent: s.originalEvent || d - }; - s.zoomDelta !== void 0 && (n.zoom = m), s.panDelta !== void 0 && (n.drag = m), s.rollDelta !== void 0 && (n.roll = m), s.pitchDelta !== void 0 && (n.pitch = m), s.bearingDelta !== void 0 && (n.rotate = m) - } - _applyChanges() { - const e = {}, - n = {}, - s = {}; - for (const [u, d, m] of this._changes) u.panDelta && (e.panDelta = (e.panDelta || new o.P(0, 0))._add(u.panDelta)), u.zoomDelta && (e.zoomDelta = (e.zoomDelta || 0) + u.zoomDelta), u.bearingDelta && (e.bearingDelta = (e.bearingDelta || 0) + u.bearingDelta), u.pitchDelta && (e.pitchDelta = (e.pitchDelta || 0) + u.pitchDelta), u.rollDelta && (e.rollDelta = (e.rollDelta || 0) + u.rollDelta), u.around !== void 0 && (e.around = u.around), u.pinchAround !== void 0 && (e.pinchAround = u.pinchAround), u.noInertia && (e.noInertia = u.noInertia), o.e(n, d), o.e(s, m); - this._updateMapTransform(e, n, s), this._changes = [] - } - _updateMapTransform(e, n, s) { - const u = this._map, - d = u._getTransformForUpdate(), - m = u.terrain; - if (!(Hs(e) || m && this._terrainMovement)) return this._fireEvents(n, s, !0); - u._stop(!0); - let { - panDelta: y, - zoomDelta: w, - bearingDelta: P, - pitchDelta: M, - rollDelta: D, - around: z, - pinchAround: B - } = e; - B !== void 0 && (z = B), z = z || u.transform.centerPoint, m && !d.isPointOnMapSurface(z) && (z = d.centerPoint); - const U = { - panDelta: y, - zoomDelta: w, - rollDelta: D, - pitchDelta: M, - bearingDelta: P, - around: z - }; - this._map.cameraHelper.useGlobeControls && !d.isPointOnMapSurface(z) && (z = d.centerPoint); - const ee = z.distSqr(d.centerPoint) < .01 ? d.center : d.screenPointToLocation(y ? z.sub(y) : z); - m ? (this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(U, d), this._terrainMovement || !n.drag && !n.zoom ? n.drag && this._terrainMovement ? d.setCenter(d.screenPointToLocation(d.centerPoint.sub(y))) : this._map.cameraHelper.handleMapControlsPan(U, d, ee) : (this._terrainMovement = !0, this._map._elevationFreeze = !0, this._map.cameraHelper.handleMapControlsPan(U, d, ee))) : (this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(U, d), this._map.cameraHelper.handleMapControlsPan(U, d, ee)), u._applyUpdatedTransform(d), this._map._update(), e.noInertia || this._inertia.record(e), this._fireEvents(n, s, !0) - } - _fireEvents(e, n, s) { - const u = Ca(this._eventsInProgress), - d = Ca(e), - m = {}; - for (const D in e) { - const { - originalEvent: z - } = e[D]; - this._eventsInProgress[D] || (m[`${D}start`] = z), this._eventsInProgress[D] = e[D] - }!u && d && this._fireEvent("movestart", d.originalEvent); - for (const D in m) this._fireEvent(D, m[D]); - d && this._fireEvent("move", d.originalEvent); - for (const D in e) { - const { - originalEvent: z - } = e[D]; - this._fireEvent(D, z) - } - const y = {}; - let w; - for (const D in this._eventsInProgress) { - const { - handlerName: z, - originalEvent: B - } = this._eventsInProgress[D]; - this._handlersById[z].isActive() || (delete this._eventsInProgress[D], w = n[z] || B, y[`${D}end`] = w) - } - for (const D in y) this._fireEvent(D, y[D]); - const P = Ca(this._eventsInProgress), - M = (u || d) && !P; - if (M && this._terrainMovement) { - this._map._elevationFreeze = !1, this._terrainMovement = !1; - const D = this._map._getTransformForUpdate(); - this._map.getCenterClampedToGround() && D.recalculateZoomAndCenter(this._map.terrain), this._map._applyUpdatedTransform(D) - } - if (s && M) { - this._updatingCamera = !0; - const D = this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions), - z = B => B !== 0 && -this._bearingSnap < B && B < this._bearingSnap; - !D || !D.essential && ye.prefersReducedMotion ? (this._map.fire(new o.l("moveend", { - originalEvent: w - })), z(this._map.getBearing()) && this._map.resetNorth()) : (z(D.bearing || this._map.getBearing()) && (D.bearing = 0), D.freezeElevation = !0, this._map.easeTo(D, { - originalEvent: w - })), this._updatingCamera = !1 - } - } - _fireEvent(e, n) { - this._map.fire(new o.l(e, n ? { - originalEvent: n - } : {})) - } - _requestFrame() { - return this._map.triggerRepaint(), this._map._renderTaskQueue.add((e => { - delete this._frameId, this.handleEvent(new Oi("renderFrame", { - timeStamp: e - })), this._applyChanges() - })) - } - _triggerRenderFrame() { - this._frameId === void 0 && (this._frameId = this._requestFrame()) - } - } - class ed extends o.E { - constructor(e, n, s) { - super(), this._renderFrameCallback = () => { - const u = Math.min((ye.now() - this._easeStart) / this._easeOptions.duration, 1); - this._onEaseFrame(this._easeOptions.easing(u)), u < 1 && this._easeFrameId ? this._easeFrameId = this._requestRenderFrame(this._renderFrameCallback) : this.stop() - }, this._moving = !1, this._zooming = !1, this.transform = e, this._bearingSnap = s.bearingSnap, this.cameraHelper = n, this.on("moveend", (() => { - delete this._requestedCameraState - })) - } - migrateProjection(e, n) { - e.apply(this.transform), this.transform = e, this.cameraHelper = n - } - getCenter() { - return new o.S(this.transform.center.lng, this.transform.center.lat) - } - setCenter(e, n) { - return this.jumpTo({ - center: e - }, n) - } - getCenterElevation() { - return this.transform.elevation - } - setCenterElevation(e, n) { - return this.jumpTo({ - elevation: e - }, n), this - } - getCenterClampedToGround() { - return this._centerClampedToGround - } - setCenterClampedToGround(e) { - this._centerClampedToGround = e - } - panBy(e, n, s) { - return e = o.P.convert(e).mult(-1), this.panTo(this.transform.center, o.e({ - offset: e - }, n), s) - } - panTo(e, n, s) { - return this.easeTo(o.e({ - center: e - }, n), s) - } - getZoom() { - return this.transform.zoom - } - setZoom(e, n) { - return this.jumpTo({ - zoom: e - }, n), this - } - zoomTo(e, n, s) { - return this.easeTo(o.e({ - zoom: e - }, n), s) - } - zoomIn(e, n) { - return this.zoomTo(this.getZoom() + 1, e, n), this - } - zoomOut(e, n) { - return this.zoomTo(this.getZoom() - 1, e, n), this - } - getVerticalFieldOfView() { - return this.transform.fov - } - setVerticalFieldOfView(e, n) { - return e != this.transform.fov && (this.transform.setFov(e), this.fire(new o.l("movestart", n)).fire(new o.l("move", n)).fire(new o.l("moveend", n))), this - } - getBearing() { - return this.transform.bearing - } - setBearing(e, n) { - return this.jumpTo({ - bearing: e - }, n), this - } - getPadding() { - return this.transform.padding - } - setPadding(e, n) { - return this.jumpTo({ - padding: e - }, n), this - } - rotateTo(e, n, s) { - return this.easeTo(o.e({ - bearing: e - }, n), s) - } - resetNorth(e, n) { - return this.rotateTo(0, o.e({ - duration: 1e3 - }, e), n), this - } - resetNorthPitch(e, n) { - return this.easeTo(o.e({ - bearing: 0, - pitch: 0, - roll: 0, - duration: 1e3 - }, e), n), this - } - snapToNorth(e, n) { - return Math.abs(this.getBearing()) < this._bearingSnap ? this.resetNorth(e, n) : this - } - getPitch() { - return this.transform.pitch - } - setPitch(e, n) { - return this.jumpTo({ - pitch: e - }, n), this - } - getRoll() { - return this.transform.roll - } - setRoll(e, n) { - return this.jumpTo({ - roll: e - }, n), this - } - cameraForBounds(e, n) { - e = dt.convert(e).adjustAntiMeridian(); - const s = n && n.bearing || 0; - return this._cameraForBoxAndBearing(e.getNorthWest(), e.getSouthEast(), s, n) - } - _cameraForBoxAndBearing(e, n, s, u) { - const d = { - top: 0, - bottom: 0, - right: 0, - left: 0 - }; - if (typeof(u = o.e({ - padding: d, - offset: [0, 0], - maxZoom: this.transform.maxZoom - }, u)).padding == "number") { - const P = u.padding; - u.padding = { - top: P, - bottom: P, - right: P, - left: P - } - } - const m = o.e(d, u.padding); - u.padding = m; - const y = this.transform, - w = new dt(e, n); - return this.cameraHelper.cameraForBoxAndBearing(u, m, w, s, y) - } - fitBounds(e, n, s) { - return this._fitInternal(this.cameraForBounds(e, n), n, s) - } - fitScreenCoordinates(e, n, s, u, d) { - return this._fitInternal(this._cameraForBoxAndBearing(this.transform.screenPointToLocation(o.P.convert(e)), this.transform.screenPointToLocation(o.P.convert(n)), s, u), u, d) - } - _fitInternal(e, n, s) { - return e ? (delete(n = o.e(e, n)).padding, n.linear ? this.easeTo(n, s) : this.flyTo(n, s)) : this - } - jumpTo(e, n) { - this.stop(); - const s = this._getTransformForUpdate(); - let u = !1, - d = !1, - m = !1; - const y = s.zoom; - this.cameraHelper.handleJumpToCenterZoom(s, e); - const w = s.zoom !== y; - return "elevation" in e && s.elevation !== +e.elevation && s.setElevation(+e.elevation), "bearing" in e && s.bearing !== +e.bearing && (u = !0, s.setBearing(+e.bearing)), "pitch" in e && s.pitch !== +e.pitch && (d = !0, s.setPitch(+e.pitch)), "roll" in e && s.roll !== +e.roll && (m = !0, s.setRoll(+e.roll)), e.padding == null || s.isPaddingEqual(e.padding) || s.setPadding(e.padding), this._applyUpdatedTransform(s), this.fire(new o.l("movestart", n)).fire(new o.l("move", n)), w && this.fire(new o.l("zoomstart", n)).fire(new o.l("zoom", n)).fire(new o.l("zoomend", n)), u && this.fire(new o.l("rotatestart", n)).fire(new o.l("rotate", n)).fire(new o.l("rotateend", n)), d && this.fire(new o.l("pitchstart", n)).fire(new o.l("pitch", n)).fire(new o.l("pitchend", n)), m && this.fire(new o.l("rollstart", n)).fire(new o.l("roll", n)).fire(new o.l("rollend", n)), this.fire(new o.l("moveend", n)) - } - calculateCameraOptionsFromTo(e, n, s, u = 0) { - const d = o.a1.fromLngLat(e, n), - m = o.a1.fromLngLat(s, u), - y = m.x - d.x, - w = m.y - d.y, - P = m.z - d.z, - M = Math.hypot(y, w, P); - if (M === 0) throw new Error("Can't calculate camera options with same From and To"); - const D = Math.hypot(y, w), - z = o.ak(this.transform.cameraToCenterDistance / M / this.transform.tileSize), - B = 180 * Math.atan2(y, -w) / Math.PI; - let U = 180 * Math.acos(D / M) / Math.PI; - return U = P < 0 ? 90 - U : 90 + U, { - center: m.toLngLat(), - elevation: u, - zoom: z, - pitch: U, - bearing: B - } - } - calculateCameraOptionsFromCameraLngLatAltRotation(e, n, s, u, d) { - const m = this.transform.calculateCenterFromCameraLngLatAlt(e, n, s, u); - return { - center: m.center, - elevation: m.elevation, - zoom: m.zoom, - bearing: s, - pitch: u, - roll: d - } - } - easeTo(e, n) { - this._stop(!1, e.easeId), ((e = o.e({ - offset: [0, 0], - duration: 500, - easing: o.co - }, e)).animate === !1 || !e.essential && ye.prefersReducedMotion) && (e.duration = 0); - const s = this._getTransformForUpdate(), - u = this.getBearing(), - d = s.pitch, - m = s.roll, - y = "bearing" in e ? this._normalizeBearing(e.bearing, u) : u, - w = "pitch" in e ? +e.pitch : d, - P = "roll" in e ? this._normalizeBearing(e.roll, m) : m, - M = "padding" in e ? e.padding : s.padding, - D = o.P.convert(e.offset); - let z, B; - e.around && (z = o.S.convert(e.around), B = s.locationToScreenPoint(z)); - const U = { - moving: this._moving, - zooming: this._zooming, - rotating: this._rotating, - pitching: this._pitching, - rolling: this._rolling - }, - ee = this.cameraHelper.handleEaseTo(s, { - bearing: y, - pitch: w, - roll: P, - padding: M, - around: z, - aroundPoint: B, - offsetAsPoint: D, - offset: e.offset, - zoom: e.zoom, - center: e.center - }); - return this._rotating = this._rotating || u !== y, this._pitching = this._pitching || w !== d, this._rolling = this._rolling || P !== m, this._padding = !s.isPaddingEqual(M), this._zooming = this._zooming || ee.isZooming, this._easeId = e.easeId, this._prepareEase(n, e.noMoveStart, U), this.terrain && this._prepareElevation(ee.elevationCenter), this._ease((J => { - ee.easeFunc(J), this.terrain && !e.freezeElevation && this._updateElevation(J), this._applyUpdatedTransform(s), this._fireMoveEvents(n) - }), (J => { - this.terrain && e.freezeElevation && this._finalizeElevation(), this._afterEase(n, J) - }), e), this - } - _prepareEase(e, n, s = {}) { - this._moving = !0, n || s.moving || this.fire(new o.l("movestart", e)), this._zooming && !s.zooming && this.fire(new o.l("zoomstart", e)), this._rotating && !s.rotating && this.fire(new o.l("rotatestart", e)), this._pitching && !s.pitching && this.fire(new o.l("pitchstart", e)), this._rolling && !s.rolling && this.fire(new o.l("rollstart", e)) - } - _prepareElevation(e) { - this._elevationCenter = e, this._elevationStart = this.transform.elevation, this._elevationTarget = this.terrain.getElevationForLngLatZoom(e, this.transform.tileZoom), this._elevationFreeze = !0 - } - _updateElevation(e) { - this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter, this.transform.tileZoom)); - const n = this.terrain.getElevationForLngLatZoom(this._elevationCenter, this.transform.tileZoom); - if (e < 1 && n !== this._elevationTarget) { - const s = this._elevationTarget - this._elevationStart; - this._elevationStart += e * (s - (n - (s * e + this._elevationStart)) / (1 - e)), this._elevationTarget = n - } - this.transform.setElevation(o.C.number(this._elevationStart, this._elevationTarget, e)) - } - _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(e) { - if (!this.terrain && e.elevation >= 0 && e.pitch <= 90) return {}; - const n = e.getCameraLngLat(), - s = e.getCameraAltitude(), - u = this.terrain ? this.terrain.getElevationForLngLatZoom(n, e.zoom) : 0; - if (s < u) { - const d = this.calculateCameraOptionsFromTo(n, u, e.center, e.elevation); - return { - pitch: d.pitch, - zoom: d.zoom - } - } - return {} - } - _applyUpdatedTransform(e) { - const n = []; - if (n.push((u => this._elevateCameraIfInsideTerrain(u))), this.transformCameraUpdate && n.push((u => this.transformCameraUpdate(u))), !n.length) return; - const s = e.clone(); - for (const u of n) { - const d = s.clone(), - { - center: m, - zoom: y, - roll: w, - pitch: P, - bearing: M, - elevation: D - } = u(d); - m && d.setCenter(m), D !== void 0 && d.setElevation(D), y !== void 0 && d.setZoom(y), w !== void 0 && d.setRoll(w), P !== void 0 && d.setPitch(P), M !== void 0 && d.setBearing(M), s.apply(d) - } - this.transform.apply(s) - } - _fireMoveEvents(e) { - this.fire(new o.l("move", e)), this._zooming && this.fire(new o.l("zoom", e)), this._rotating && this.fire(new o.l("rotate", e)), this._pitching && this.fire(new o.l("pitch", e)), this._rolling && this.fire(new o.l("roll", e)) - } - _afterEase(e, n) { - if (this._easeId && n && this._easeId === n) return; - delete this._easeId; - const s = this._zooming, - u = this._rotating, - d = this._pitching, - m = this._rolling; - this._moving = !1, this._zooming = !1, this._rotating = !1, this._pitching = !1, this._rolling = !1, this._padding = !1, s && this.fire(new o.l("zoomend", e)), u && this.fire(new o.l("rotateend", e)), d && this.fire(new o.l("pitchend", e)), m && this.fire(new o.l("rollend", e)), this.fire(new o.l("moveend", e)) - } - flyTo(e, n) { - if (!e.essential && ye.prefersReducedMotion) { - const $e = o.Q(e, ["center", "zoom", "bearing", "pitch", "roll", "elevation"]); - return this.jumpTo($e, n) - } - this.stop(), e = o.e({ - offset: [0, 0], - speed: 1.2, - curve: 1.42, - easing: o.co - }, e); - const s = this._getTransformForUpdate(), - u = s.bearing, - d = s.pitch, - m = s.roll, - y = s.padding, - w = "bearing" in e ? this._normalizeBearing(e.bearing, u) : u, - P = "pitch" in e ? +e.pitch : d, - M = "roll" in e ? this._normalizeBearing(e.roll, m) : m, - D = "padding" in e ? e.padding : s.padding, - z = o.P.convert(e.offset); - let B = s.centerPoint.add(z); - const U = s.screenPointToLocation(B), - ee = this.cameraHelper.handleFlyTo(s, { - bearing: w, - pitch: P, - roll: M, - padding: D, - locationAtOffset: U, - offsetAsPoint: z, - center: e.center, - minZoom: e.minZoom, - zoom: e.zoom - }); - let J = e.curve; - const re = Math.max(s.width, s.height), - se = re / ee.scaleOfZoom, - de = ee.pixelPathLength; - typeof ee.scaleOfMinZoom == "number" && (J = Math.sqrt(re / ee.scaleOfMinZoom / de * 2)); - const ue = J * J; - - function ge($e) { - const Rt = (se * se - re * re + ($e ? -1 : 1) * ue * ue * de * de) / (2 * ($e ? se : re) * ue * de); - return Math.log(Math.sqrt(Rt * Rt + 1) - Rt) - } - - function Te($e) { - return (Math.exp($e) - Math.exp(-$e)) / 2 - } - - function he($e) { - return (Math.exp($e) + Math.exp(-$e)) / 2 - } - const De = ge(!1); - let He = function($e) { - return he(De) / he(De + J * $e) - }, - je = function($e) { - return re * ((he(De) * (Te(Rt = De + J * $e) / he(Rt)) - Te(De)) / ue) / de; - var Rt - }, - qe = (ge(!0) - De) / J; - if (Math.abs(de) < 2e-6 || !isFinite(qe)) { - if (Math.abs(re - se) < 1e-6) return this.easeTo(e, n); - const $e = se < re ? -1 : 1; - qe = Math.abs(Math.log(se / re)) / J, je = () => 0, He = Rt => Math.exp($e * J * Rt) - } - return e.duration = "duration" in e ? +e.duration : 1e3 * qe / ("screenSpeed" in e ? +e.screenSpeed / J : +e.speed), e.maxDuration && e.duration > e.maxDuration && (e.duration = 0), this._zooming = !0, this._rotating = u !== w, this._pitching = P !== d, this._rolling = M !== m, this._padding = !s.isPaddingEqual(D), this._prepareEase(n, !1), this.terrain && this._prepareElevation(ee.targetCenter), this._ease(($e => { - const Rt = $e * qe, - Nt = 1 / He(Rt), - yt = je(Rt); - this._rotating && s.setBearing(o.C.number(u, w, $e)), this._pitching && s.setPitch(o.C.number(d, P, $e)), this._rolling && s.setRoll(o.C.number(m, M, $e)), this._padding && (s.interpolatePadding(y, D, $e), B = s.centerPoint.add(z)), ee.easeFunc($e, Nt, yt, B), this.terrain && !e.freezeElevation && this._updateElevation($e), this._applyUpdatedTransform(s), this._fireMoveEvents(n) - }), (() => { - this.terrain && e.freezeElevation && this._finalizeElevation(), this._afterEase(n) - }), e), this - } - isEasing() { - return !!this._easeFrameId - } - stop() { - return this._stop() - } - _stop(e, n) { - var s; - if (this._easeFrameId && (this._cancelRenderFrame(this._easeFrameId), delete this._easeFrameId, delete this._onEaseFrame), this._onEaseEnd) { - const u = this._onEaseEnd; - delete this._onEaseEnd, u.call(this, n) - } - return e || (s = this.handlers) === null || s === void 0 || s.stop(!1), this - } - _ease(e, n, s) { - s.animate === !1 || s.duration === 0 ? (e(1), n()) : (this._easeStart = ye.now(), this._easeOptions = s, this._onEaseFrame = e, this._onEaseEnd = n, this._easeFrameId = this._requestRenderFrame(this._renderFrameCallback)) - } - _normalizeBearing(e, n) { - e = o.aO(e, -180, 180); - const s = Math.abs(e - n); - return Math.abs(e - 360 - n) < s && (e -= 360), Math.abs(e + 360 - n) < s && (e += 360), e - } - queryTerrainElevation(e) { - return this.terrain ? this.terrain.getElevationForLngLatZoom(o.S.convert(e), this.transform.tileZoom) : null - } - } - const Xc = { - compact: !0, - customAttribution: 'MapLibre' - }; - class Kc { - constructor(e = Xc) { - 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 = n => { - !n || n.sourceDataType !== "metadata" && n.sourceDataType !== "visibility" && n.dataType !== "style" && n.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 = e - } - getDefaultPosition() { - return "bottom-right" - } - onAdd(e) { - return this._map = e, this._compact = this.options.compact, this._container = X.create("details", "maplibregl-ctrl maplibregl-ctrl-attrib"), this._compactButton = X.create("summary", "maplibregl-ctrl-attrib-button", this._container), this._compactButton.addEventListener("click", this._toggleAttribution), this._setElementTitle(this._compactButton, "ToggleAttribution"), this._innerContainer = X.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() { - X.remove(this._container), 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(e, n) { - const s = this._map._getUIString(`AttributionControl.${n}`); - e.title = s, e.setAttribute("aria-label", s) - } - _updateAttributions() { - if (!this._map.style) return; - let e = []; - if (this.options.customAttribution && (Array.isArray(this.options.customAttribution) ? e = e.concat(this.options.customAttribution.map((u => typeof u != "string" ? "" : u))) : typeof this.options.customAttribution == "string" && e.push(this.options.customAttribution)), this._map.style.stylesheet) { - const u = this._map.style.stylesheet; - this.styleOwner = u.owner, this.styleId = u.id - } - const n = this._map.style.sourceCaches; - for (const u in n) { - const d = n[u]; - if (d.used || d.usedForTerrain) { - const m = d.getSource(); - m.attribution && e.indexOf(m.attribution) < 0 && e.push(m.attribution) - } - } - e = e.filter((u => String(u).trim())), e.sort(((u, d) => u.length - d.length)), e = e.filter(((u, d) => { - for (let m = d + 1; m < e.length; m++) - if (e[m].indexOf(u) >= 0) return !1; - return !0 - })); - const s = e.join(" | "); - s !== this._attribHTML && (this._attribHTML = s, e.length ? (this._innerContainer.innerHTML = X.sanitize(s), this._container.classList.remove("maplibregl-attrib-empty")) : this._container.classList.add("maplibregl-attrib-empty"), this._updateCompact(), this._editLink = null) - } - } - class td { - constructor(e = {}) { - this._updateCompact = () => { - const n = this._container.children; - if (n.length) { - const s = n[0]; - this._map.getCanvasContainer().offsetWidth <= 640 || this._compact ? this._compact !== !1 && s.classList.add("maplibregl-compact") : s.classList.remove("maplibregl-compact") - } - }, this.options = e - } - getDefaultPosition() { - return "bottom-left" - } - onAdd(e) { - this._map = e, this._compact = this.options && this.options.compact, this._container = X.create("div", "maplibregl-ctrl"); - const n = X.create("a", "maplibregl-ctrl-logo"); - return n.target = "_blank", n.rel = "noopener nofollow", n.href = "https://maplibre.org/", n.setAttribute("aria-label", this._map._getUIString("LogoControl.Title")), n.setAttribute("rel", "noopener nofollow"), this._container.appendChild(n), this._container.style.display = "block", this._map.on("resize", this._updateCompact), this._updateCompact(), this._container - } - onRemove() { - X.remove(this._container), this._map.off("resize", this._updateCompact), this._map = void 0, this._compact = void 0 - } - } - class Na { - constructor() { - this._queue = [], this._id = 0, this._cleared = !1, this._currentlyRunning = !1 - } - add(e) { - const n = ++this._id; - return this._queue.push({ - callback: e, - id: n, - cancelled: !1 - }), n - } - remove(e) { - const n = this._currentlyRunning, - s = n ? this._queue.concat(n) : this._queue; - for (const u of s) - if (u.id === e) return void(u.cancelled = !0) - } - run(e = 0) { - if (this._currentlyRunning) throw new Error("Attempting to run(), but is already running."); - const n = this._currentlyRunning = this._queue; - this._queue = []; - for (const s of n) - if (!s.cancelled && (s.callback(e), this._cleared)) break; - this._cleared = !1, this._currentlyRunning = !1 - } - clear() { - this._currentlyRunning && (this._cleared = !0), this._queue = [] - } - } - var Cl = o.aJ([{ - name: "a_pos3d", - type: "Int16", - components: 3 - }]); - class hr extends o.E { - constructor(e) { - super(), this._lastTilesetChange = ye.now(), this.sourceCache = e, this._tiles = {}, this._renderableTilesKeys = [], this._sourceTileCache = {}, this.minzoom = 0, this.maxzoom = 22, this.deltaZoom = 1, this.tileSize = e._source.tileSize * 2 ** this.deltaZoom, e.usedForTerrain = !0, e.tileSize = this.tileSize - } - destruct() { - this.sourceCache.usedForTerrain = !1, this.sourceCache.tileSize = null - } - update(e, n) { - this.sourceCache.update(e, n), this._renderableTilesKeys = []; - const s = {}; - for (const u of xe(e, { - tileSize: this.tileSize, - minzoom: this.minzoom, - maxzoom: this.maxzoom, - reparseOverscaled: !1, - terrain: n, - calculateTileZoom: this.sourceCache._source.calculateTileZoom - })) s[u.key] = !0, this._renderableTilesKeys.push(u.key), this._tiles[u.key] || (u.terrainRttPosMatrix32f = new Float64Array(16), o.bY(u.terrainRttPosMatrix32f, 0, o.$, o.$, 0, 0, 1), this._tiles[u.key] = new Nr(u, this.tileSize), this._lastTilesetChange = ye.now()); - for (const u in this._tiles) s[u] || delete this._tiles[u] - } - freeRtt(e) { - for (const n in this._tiles) { - const s = this._tiles[n]; - (!e || s.tileID.equals(e) || s.tileID.isChildOf(e) || e.isChildOf(s.tileID)) && (s.rtt = []) - } - } - getRenderableTiles() { - return this._renderableTilesKeys.map((e => this.getTileByID(e))) - } - getTileByID(e) { - return this._tiles[e] - } - getTerrainCoords(e, n) { - return n ? this._getTerrainCoordsForTileRanges(e, n) : this._getTerrainCoordsForRegularTile(e) - } - _getTerrainCoordsForRegularTile(e) { - const n = {}; - for (const s of this._renderableTilesKeys) { - const u = this._tiles[s].tileID, - d = e.clone(), - m = o.ba(); - if (u.canonical.equals(e.canonical)) o.bY(m, 0, o.$, o.$, 0, 0, 1); - else if (u.canonical.isChildOf(e.canonical)) { - const y = u.canonical.z - e.canonical.z, - w = u.canonical.x - (u.canonical.x >> y << y), - P = u.canonical.y - (u.canonical.y >> y << y), - M = o.$ >> y; - o.bY(m, 0, M, M, 0, 0, 1), o.M(m, m, [-w * M, -P * M, 0]) - } else { - if (!e.canonical.isChildOf(u.canonical)) continue; - { - const y = e.canonical.z - u.canonical.z, - w = e.canonical.x - (e.canonical.x >> y << y), - P = e.canonical.y - (e.canonical.y >> y << y), - M = o.$ >> y; - o.bY(m, 0, o.$, o.$, 0, 0, 1), o.M(m, m, [w * M, P * M, 0]), o.N(m, m, [1 / 2 ** y, 1 / 2 ** y, 0]) - } - } - d.terrainRttPosMatrix32f = new Float32Array(m), n[s] = d - } - return n - } - _getTerrainCoordsForTileRanges(e, n) { - const s = {}; - for (const u of this._renderableTilesKeys) { - const d = this._tiles[u].tileID; - if (!this._isWithinTileRanges(d, n)) continue; - const m = e.clone(), - y = o.ba(); - if (d.canonical.z === e.canonical.z) { - const w = e.canonical.x - d.canonical.x, - P = e.canonical.y - d.canonical.y; - o.bY(y, 0, o.$, o.$, 0, 0, 1), o.M(y, y, [w * o.$, P * o.$, 0]) - } else if (d.canonical.z > e.canonical.z) { - const w = d.canonical.z - e.canonical.z, - P = d.canonical.x - (d.canonical.x >> w << w), - M = d.canonical.y - (d.canonical.y >> w << w), - D = e.canonical.x - (d.canonical.x >> w), - z = e.canonical.y - (d.canonical.y >> w), - B = o.$ >> w; - o.bY(y, 0, B, B, 0, 0, 1), o.M(y, y, [-P * B + D * o.$, -M * B + z * o.$, 0]) - } else { - const w = e.canonical.z - d.canonical.z, - P = e.canonical.x - (e.canonical.x >> w << w), - M = e.canonical.y - (e.canonical.y >> w << w), - D = (e.canonical.x >> w) - d.canonical.x, - z = (e.canonical.y >> w) - d.canonical.y, - B = o.$ << w; - o.bY(y, 0, B, B, 0, 0, 1), o.M(y, y, [P * o.$ + D * B, M * o.$ + z * B, 0]) - } - m.terrainRttPosMatrix32f = new Float32Array(y), s[u] = m - } - return s - } - getSourceTile(e, n) { - const s = this.sourceCache._source; - let u = e.overscaledZ - this.deltaZoom; - if (u > s.maxzoom && (u = s.maxzoom), u < s.minzoom) return null; - this._sourceTileCache[e.key] || (this._sourceTileCache[e.key] = e.scaledTo(u).key); - let d = this.sourceCache.getTileByID(this._sourceTileCache[e.key]); - if ((!d || !d.dem) && n) - for (; u >= s.minzoom && (!d || !d.dem);) d = this.sourceCache.getTileByID(e.scaledTo(u--).key); - return d - } - anyTilesAfterTime(e = Date.now()) { - return this._lastTilesetChange >= e - } - _isWithinTileRanges(e, n) { - return n[e.canonical.z] && e.canonical.x >= n[e.canonical.z].minTileX && e.canonical.x <= n[e.canonical.z].maxTileX && e.canonical.y >= n[e.canonical.z].minTileY && e.canonical.y <= n[e.canonical.z].maxTileY - } - } - class Rr { - constructor(e, n, s) { - this._meshCache = {}, this.painter = e, this.sourceCache = new hr(n), this.options = s, this.exaggeration = typeof s.exaggeration == "number" ? s.exaggeration : 1, this.qualityFactor = 2, this.meshSize = 128, this._demMatrixCache = {}, this.coordsIndex = [], this._coordsTextureSize = 1024 - } - getDEMElevation(e, n, s, u = o.$) { - var d; - if (!(n >= 0 && n < u && s >= 0 && s < u)) return 0; - const m = this.getTerrainData(e), - y = (d = m.tile) === null || d === void 0 ? void 0 : d.dem; - if (!y) return 0; - const w = o.cs([], [n / u * o.$, s / u * o.$], m.u_terrain_matrix), - P = [w[0] * y.dim, w[1] * y.dim], - M = Math.floor(P[0]), - D = Math.floor(P[1]), - z = P[0] - M, - B = P[1] - D; - return y.get(M, D) * (1 - z) * (1 - B) + y.get(M + 1, D) * z * (1 - B) + y.get(M, D + 1) * (1 - z) * B + y.get(M + 1, D + 1) * z * B - } - getElevationForLngLatZoom(e, n) { - if (!o.ct(n, e.wrap())) return 0; - const { - tileID: s, - mercatorX: u, - mercatorY: d - } = this._getOverscaledTileIDFromLngLatZoom(e, n); - return this.getElevation(s, u % o.$, d % o.$, o.$) - } - getElevation(e, n, s, u = o.$) { - return this.getDEMElevation(e, n, s, u) * this.exaggeration - } - getTerrainData(e) { - if (!this._emptyDemTexture) { - const u = this.painter.context, - d = new o.R({ - width: 1, - height: 1 - }, new Uint8Array(4)); - this._emptyDepthTexture = new o.T(u, d, u.gl.RGBA, { - premultiply: !1 - }), this._emptyDemUnpack = [0, 0, 0, 0], this._emptyDemTexture = new o.T(u, new o.R({ - width: 1, - height: 1 - }), u.gl.RGBA, { - premultiply: !1 - }), this._emptyDemTexture.bind(u.gl.NEAREST, u.gl.CLAMP_TO_EDGE), this._emptyDemMatrix = o.ag([]) - } - const n = this.sourceCache.getSourceTile(e, !0); - if (n && n.dem && (!n.demTexture || n.needsTerrainPrepare)) { - const u = this.painter.context; - n.demTexture = this.painter.getTileTexture(n.dem.stride), n.demTexture ? n.demTexture.update(n.dem.getPixels(), { - premultiply: !1 - }) : n.demTexture = new o.T(u, n.dem.getPixels(), u.gl.RGBA, { - premultiply: !1 - }), n.demTexture.bind(u.gl.NEAREST, u.gl.CLAMP_TO_EDGE), n.needsTerrainPrepare = !1 - } - const s = n && n + n.tileID.key + e.key; - if (s && !this._demMatrixCache[s]) { - const u = this.sourceCache.sourceCache._source.maxzoom; - let d = e.canonical.z - n.tileID.canonical.z; - e.overscaledZ > e.canonical.z && (e.canonical.z >= u ? d = e.canonical.z - u : o.w("cannot calculate elevation if elevation maxzoom > source.maxzoom")); - const m = e.canonical.x - (e.canonical.x >> d << d), - y = e.canonical.y - (e.canonical.y >> d << d), - w = o.cu(new Float64Array(16), [1 / (o.$ << d), 1 / (o.$ << d), 0]); - o.M(w, w, [m * o.$, y * o.$, 0]), this._demMatrixCache[e.key] = { - matrix: w, - coord: e - } - } - return { - u_depth: 2, - u_terrain: 3, - u_terrain_dim: n && n.dem && n.dem.dim || 1, - u_terrain_matrix: s ? this._demMatrixCache[e.key].matrix : this._emptyDemMatrix, - u_terrain_unpack: n && n.dem && n.dem.getUnpackVector() || this._emptyDemUnpack, - u_terrain_exaggeration: this.exaggeration, - texture: (n && n.demTexture || this._emptyDemTexture).texture, - depthTexture: (this._fboDepthTexture || this._emptyDepthTexture).texture, - tile: n - } - } - getFramebuffer(e) { - const n = this.painter, - s = n.width / devicePixelRatio, - u = n.height / devicePixelRatio; - return !this._fbo || this._fbo.width === s && this._fbo.height === u || (this._fbo.destroy(), this._fboCoordsTexture.destroy(), this._fboDepthTexture.destroy(), delete this._fbo, delete this._fboDepthTexture, delete this._fboCoordsTexture), this._fboCoordsTexture || (this._fboCoordsTexture = new o.T(n.context, { - width: s, - height: u, - data: null - }, n.context.gl.RGBA, { - premultiply: !1 - }), this._fboCoordsTexture.bind(n.context.gl.NEAREST, n.context.gl.CLAMP_TO_EDGE)), this._fboDepthTexture || (this._fboDepthTexture = new o.T(n.context, { - width: s, - height: u, - data: null - }, n.context.gl.RGBA, { - premultiply: !1 - }), this._fboDepthTexture.bind(n.context.gl.NEAREST, n.context.gl.CLAMP_TO_EDGE)), this._fbo || (this._fbo = n.context.createFramebuffer(s, u, !0, !1), this._fbo.depthAttachment.set(n.context.createRenderbuffer(n.context.gl.DEPTH_COMPONENT16, s, u))), this._fbo.colorAttachment.set(e === "coords" ? this._fboCoordsTexture.texture : this._fboDepthTexture.texture), this._fbo - } - getCoordsTexture() { - const e = this.painter.context; - if (this._coordsTexture) return this._coordsTexture; - const n = new Uint8Array(this._coordsTextureSize * this._coordsTextureSize * 4); - for (let d = 0, m = 0; d < this._coordsTextureSize; d++) - for (let y = 0; y < this._coordsTextureSize; y++, m += 4) n[m + 0] = 255 & y, n[m + 1] = 255 & d, n[m + 2] = y >> 8 << 4 | d >> 8, n[m + 3] = 0; - const s = new o.R({ - width: this._coordsTextureSize, - height: this._coordsTextureSize - }, new Uint8Array(n.buffer)), - u = new o.T(e, s, e.gl.RGBA, { - premultiply: !1 - }); - return u.bind(e.gl.NEAREST, e.gl.CLAMP_TO_EDGE), this._coordsTexture = u, u - } - pointCoordinate(e) { - this.painter.maybeDrawDepthAndCoords(!0); - const n = new Uint8Array(4), - s = this.painter.context, - u = s.gl, - d = Math.round(e.x * this.painter.pixelRatio / devicePixelRatio), - m = Math.round(e.y * this.painter.pixelRatio / devicePixelRatio), - y = Math.round(this.painter.height / devicePixelRatio); - s.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer), u.readPixels(d, y - m - 1, 1, 1, u.RGBA, u.UNSIGNED_BYTE, n), s.bindFramebuffer.set(null); - const w = n[0] + (n[2] >> 4 << 8), - P = n[1] + ((15 & n[2]) << 8), - M = this.coordsIndex[255 - n[3]], - D = M && this.sourceCache.getTileByID(M); - if (!D) return null; - const z = this._coordsTextureSize, - B = (1 << D.tileID.canonical.z) * z; - return new o.a1((D.tileID.canonical.x * z + w) / B + D.tileID.wrap, (D.tileID.canonical.y * z + P) / B, this.getElevation(D.tileID, w, P, z)) - } - depthAtPoint(e) { - const n = new Uint8Array(4), - s = this.painter.context, - u = s.gl; - return s.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer), u.readPixels(e.x, this.painter.height / devicePixelRatio - e.y - 1, 1, 1, u.RGBA, u.UNSIGNED_BYTE, n), s.bindFramebuffer.set(null), (n[0] / 16777216 + n[1] / 65536 + n[2] / 256 + n[3]) / 256 - } - getTerrainMesh(e) { - var n; - const s = ((n = this.painter.style.projection) === null || n === void 0 ? void 0 : n.transitionState) > 0, - u = s && e.canonical.y === 0, - d = s && e.canonical.y === (1 << e.canonical.z) - 1, - m = `m_${u?"n":""}_${d?"s":""}`; - if (this._meshCache[m]) return this._meshCache[m]; - const y = this.painter.context, - w = new o.cv, - P = new o.aN, - M = this.meshSize, - D = o.$ / M, - z = M * M; - for (let he = 0; he <= M; he++) - for (let De = 0; De <= M; De++) w.emplaceBack(De * D, he * D, 0); - for (let he = 0; he < z; he += M + 1) - for (let De = 0; De < M; De++) P.emplaceBack(De + he, M + De + he + 1, M + De + he + 2), P.emplaceBack(De + he, M + De + he + 2, De + he + 1); - const B = w.length, - U = B + (M + 1), - ee = (M + 1) * M, - J = u ? o.bh : 0, - re = u ? 0 : 1, - se = d ? o.bi : o.$, - de = d ? 0 : 1; - for (let he = 0; he <= M; he++) w.emplaceBack(he * D, J, re); - for (let he = 0; he <= M; he++) w.emplaceBack(he * D, se, de); - for (let he = 0; he < M; he++) P.emplaceBack(ee + he, U + he, U + he + 1), P.emplaceBack(ee + he, U + he + 1, ee + he + 1), P.emplaceBack(0 + he, B + he + 1, B + he), P.emplaceBack(0 + he, 0 + he + 1, B + he + 1); - const ue = w.length, - ge = ue + 2 * (M + 1); - for (const he of [0, 1]) - for (let De = 0; De <= M; De++) - for (const He of [0, 1]) w.emplaceBack(he * o.$, De * D, He); - for (let he = 0; he < 2 * M; he += 2) P.emplaceBack(ue + he, ue + he + 1, ue + he + 3), P.emplaceBack(ue + he, ue + he + 3, ue + he + 2), P.emplaceBack(ge + he, ge + he + 3, ge + he + 1), P.emplaceBack(ge + he, ge + he + 2, ge + he + 3); - const Te = new Ri(y.createVertexBuffer(w, Cl.members), y.createIndexBuffer(P), o.aM.simpleSegment(0, 0, w.length, P.length)); - return this._meshCache[m] = Te, Te - } - getMeshFrameDelta(e) { - return 2 * Math.PI * o.bu / Math.pow(2, Math.max(e, 0)) / 5 - } - getMinTileElevationForLngLatZoom(e, n) { - var s; - const { - tileID: u - } = this._getOverscaledTileIDFromLngLatZoom(e, n); - return (s = this.getMinMaxElevation(u).minElevation) !== null && s !== void 0 ? s : 0 - } - getMinMaxElevation(e) { - const n = this.getTerrainData(e).tile, - s = { - minElevation: null, - maxElevation: null - }; - return n && n.dem && (s.minElevation = n.dem.min * this.exaggeration, s.maxElevation = n.dem.max * this.exaggeration), s - } - _getOverscaledTileIDFromLngLatZoom(e, n) { - const s = o.a1.fromLngLat(e.wrap()), - u = (1 << n) * o.$, - d = s.x * u, - m = s.y * u, - y = Math.floor(d / o.$), - w = Math.floor(m / o.$); - return { - tileID: new o.Z(n, 0, n, y, w), - mercatorX: d, - mercatorY: m - } - } - } - class Sl { - constructor(e, n, s) { - this._context = e, this._size = n, this._tileSize = s, this._objects = [], this._recentlyUsed = [], this._stamp = 0 - } - destruct() { - for (const e of this._objects) e.texture.destroy(), e.fbo.destroy() - } - _createObject(e) { - const n = this._context.createFramebuffer(this._tileSize, this._tileSize, !0, !0), - s = new o.T(this._context, { - width: this._tileSize, - height: this._tileSize, - data: null - }, this._context.gl.RGBA); - return s.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), n.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL, this._tileSize, this._tileSize)), n.colorAttachment.set(s.texture), { - id: e, - fbo: n, - texture: s, - stamp: -1, - inUse: !1 - } - } - getObjectForId(e) { - return this._objects[e] - } - useObject(e) { - e.inUse = !0, this._recentlyUsed = this._recentlyUsed.filter((n => e.id !== n)), this._recentlyUsed.push(e.id) - } - stampObject(e) { - e.stamp = ++this._stamp - } - getOrCreateFreeObject() { - for (const n of this._recentlyUsed) - if (!this._objects[n].inUse) return this._objects[n]; - if (this._objects.length >= this._size) throw new Error("No free RenderPool available, call freeAllObjects() required!"); - const e = this._createObject(this._objects.length); - return this._objects.push(e), e - } - freeObject(e) { - e.inUse = !1 - } - freeAllObjects() { - for (const e of this._objects) this.freeObject(e) - } - isFull() { - return !(this._objects.length < this._size) && this._objects.some((e => !e.inUse)) === !1 - } - } - const ns = { - background: !0, - fill: !0, - line: !0, - raster: !0, - hillshade: !0, - "color-relief": !0 - }; - class Pl { - constructor(e, n) { - this.painter = e, this.terrain = n, this.pool = new Sl(e.context, 30, n.sourceCache.tileSize * n.qualityFactor) - } - destruct() { - this.pool.destruct() - } - getTexture(e) { - return this.pool.getObjectForId(e.rtt[this._stacks.length - 1].id).texture - } - prepareForRender(e, n) { - this._stacks = [], this._prevType = null, this._rttTiles = [], this._renderableTiles = this.terrain.sourceCache.getRenderableTiles(), this._renderableLayerIds = e._order.filter((s => !e._layers[s].isHidden(n))), this._coordsAscending = {}; - for (const s in e.sourceCaches) { - this._coordsAscending[s] = {}; - const u = e.sourceCaches[s].getVisibleCoordinates(), - d = e.sourceCaches[s].getSource(), - m = d instanceof Ft ? d.terrainTileRanges : null; - for (const y of u) { - const w = this.terrain.sourceCache.getTerrainCoords(y, m); - for (const P in w) this._coordsAscending[s][P] || (this._coordsAscending[s][P] = []), this._coordsAscending[s][P].push(w[P]) - } - } - this._coordsAscendingStr = {}; - for (const s of e._order) { - const u = e._layers[s], - d = u.source; - if (ns[u.type] && !this._coordsAscendingStr[d]) { - this._coordsAscendingStr[d] = {}; - for (const m in this._coordsAscending[d]) this._coordsAscendingStr[d][m] = this._coordsAscending[d][m].map((y => y.key)).sort().join() - } - } - for (const s of this._renderableTiles) - for (const u in this._coordsAscendingStr) { - const d = this._coordsAscendingStr[u][s.tileID.key]; - d && d !== s.rttCoords[u] && (s.rtt = []) - } - } - renderLayer(e, n) { - if (e.isHidden(this.painter.transform.zoom)) return !1; - const s = Object.assign(Object.assign({}, n), { - isRenderingToTexture: !0 - }), - u = e.type, - d = this.painter, - m = this._renderableLayerIds[this._renderableLayerIds.length - 1] === e.id; - if (ns[u] && (this._prevType && ns[this._prevType] || this._stacks.push([]), this._prevType = u, this._stacks[this._stacks.length - 1].push(e.id), !m)) return !0; - if (ns[this._prevType] || ns[u] && m) { - this._prevType = u; - const y = this._stacks.length - 1, - w = this._stacks[y] || []; - for (const P of this._renderableTiles) { - if (this.pool.isFull() && (vl(this.painter, this.terrain, this._rttTiles, s), this._rttTiles = [], this.pool.freeAllObjects()), this._rttTiles.push(P), P.rtt[y]) { - const D = this.pool.getObjectForId(P.rtt[y].id); - if (D.stamp === P.rtt[y].stamp) { - this.pool.useObject(D); - continue - } - } - const M = this.pool.getOrCreateFreeObject(); - this.pool.useObject(M), this.pool.stampObject(M), P.rtt[y] = { - id: M.id, - stamp: M.stamp - }, d.context.bindFramebuffer.set(M.fbo.framebuffer), d.context.clear({ - color: o.bf.transparent, - stencil: 0 - }), d.currentStencilSource = void 0; - for (let D = 0; D < w.length; D++) { - const z = d.style._layers[w[D]], - B = z.source ? this._coordsAscending[z.source][P.tileID.key] : [P.tileID]; - d.context.viewport.set([0, 0, M.fbo.width, M.fbo.height]), d._renderTileClippingMasks(z, B, !0), d.renderLayer(d, d.style.sourceCaches[z.source], z, B, s), z.source && (P.rttCoords[z.source] = this._coordsAscendingStr[z.source][P.tileID.key]) - } - } - return vl(this.painter, this.terrain, this._rttTiles, s), this._rttTiles = [], this.pool.freeAllObjects(), ns[u] - } - return !1 - } - } - const jn = { - "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": "Reset bearing to 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" - }, - rd = $, - ha = { - hash: !1, - interactive: !0, - bearingSnap: 7, - attributionControl: Xc, - 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, - maxTileCacheSize: null, - maxTileCacheZoomLevels: o.a.MAX_TILE_CACHE_ZOOM_LEVELS, - transformRequest: null, - transformCameraUpdate: null, - fadeDuration: 300, - crossSourceCollisions: !0, - clickTolerance: 3, - localIdeographFontFamily: "sans-serif", - pitchWithRotate: !0, - rollEnabled: !1, - validateStyle: !0, - maxCanvasSize: [4096, 4096], - cancelPendingTileRequestsWhileZooming: !0, - centerClampedToGround: !0 - }, - bp = { - showCompass: !0, - showZoom: !0, - visualizePitch: !1, - visualizeRoll: !0 - }; - class Lo { - constructor(e, n, s = !1) { - this.mousedown = d => { - this.startMove(d, X.mousePos(this.element, d)), X.addEventListener(window, "mousemove", this.mousemove), X.addEventListener(window, "mouseup", this.mouseup) - }, this.mousemove = d => { - this.move(d, X.mousePos(this.element, d)) - }, this.mouseup = d => { - this._rotatePitchHandler.dragEnd(d), this.offTemp() - }, this.touchstart = d => { - d.targetTouches.length !== 1 ? this.reset() : (this._startPos = this._lastPos = X.touchPos(this.element, d.targetTouches)[0], this.startMove(d, this._startPos), X.addEventListener(window, "touchmove", this.touchmove, { - passive: !1 - }), X.addEventListener(window, "touchend", this.touchend)) - }, this.touchmove = d => { - d.targetTouches.length !== 1 ? this.reset() : (this._lastPos = X.touchPos(this.element, d.targetTouches)[0], this.move(d, this._lastPos)) - }, this.touchend = d => { - d.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 = n; - const u = new vp; - this._rotatePitchHandler = new Zs({ - clickTolerance: 3, - move: (d, m) => { - const y = n.getBoundingClientRect(), - w = new o.P((y.bottom - y.top) / 2, (y.right - y.left) / 2); - return { - bearingDelta: o.cn(new o.P(d.x, m.y), m, w), - pitchDelta: s ? -.5 * (m.y - d.y) : void 0 - } - }, - moveStateManager: u, - enable: !0, - assignEvents: () => {} - }), this.map = e, X.addEventListener(n, "mousedown", this.mousedown), X.addEventListener(n, "touchstart", this.touchstart, { - passive: !1 - }), X.addEventListener(n, "touchcancel", this.reset) - } - startMove(e, n) { - this._rotatePitchHandler.dragStart(e, n), X.disableDrag() - } - move(e, n) { - const s = this.map, - { - bearingDelta: u, - pitchDelta: d - } = this._rotatePitchHandler.dragMove(e, n) || {}; - u && s.setBearing(s.getBearing() + u), d && s.setPitch(s.getPitch() + d) - } - off() { - const e = this.element; - X.removeEventListener(e, "mousedown", this.mousedown), X.removeEventListener(e, "touchstart", this.touchstart, { - passive: !1 - }), X.removeEventListener(window, "touchmove", this.touchmove, { - passive: !1 - }), X.removeEventListener(window, "touchend", this.touchend), X.removeEventListener(e, "touchcancel", this.reset), this.offTemp() - } - offTemp() { - X.enableDrag(), X.removeEventListener(window, "mousemove", this.mousemove), X.removeEventListener(window, "mouseup", this.mouseup), X.removeEventListener(window, "touchmove", this.touchmove, { - passive: !1 - }), X.removeEventListener(window, "touchend", this.touchend) - } - } - let Ai; - - function Hi(h, e, n, s = !1) { - if (s || !n.getCoveringTilesDetailsProvider().allowWorldCopies()) return h == null ? void 0 : h.wrap(); - const u = new o.S(h.lng, h.lat); - if (h = new o.S(h.lng, h.lat), e) { - const d = new o.S(h.lng - 360, h.lat), - m = new o.S(h.lng + 360, h.lat), - y = n.locationToScreenPoint(h).distSqr(e); - n.locationToScreenPoint(d).distSqr(e) < y ? h = d : n.locationToScreenPoint(m).distSqr(e) < y && (h = m) - } - for (; Math.abs(h.lng - n.center.lng) > 180;) { - const d = n.locationToScreenPoint(h); - if (d.x >= 0 && d.y >= 0 && d.x <= n.width && d.y <= n.height) break; - h.lng > n.center.lng ? h.lng -= 360 : h.lng += 360 - } - return h.lng !== u.lng && n.isPointOnMapSurface(n.locationToScreenPoint(h)) ? h : u - } - const Il = { - 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 Ws(h, e, n) { - const s = h.classList; - for (const u in Il) s.remove(`maplibregl-${n}-anchor-${u}`); - s.add(`maplibregl-${n}-anchor-${e}`) - } - class Xs extends o.E { - constructor(e) { - if (super(), this._onKeyPress = n => { - const s = n.code, - u = n.charCode || n.keyCode; - s !== "Space" && s !== "Enter" && u !== 32 && u !== 13 || this.togglePopup() - }, this._onMapClick = n => { - const s = n.originalEvent.target, - u = this._element; - this._popup && (s === u || u.contains(s)) && this.togglePopup() - }, this._update = n => { - if (!this._map) return; - const s = this._map.loaded() && !this._map.isMoving(); - ((n == null ? void 0 : n.type) === "terrain" || (n == null ? void 0 : n.type) === "render" && !s) && this._map.once("render", this._update), this._lngLat = Hi(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 u = ""; - this._rotationAlignment === "viewport" || this._rotationAlignment === "auto" ? u = `rotateZ(${this._rotation}deg)` : this._rotationAlignment === "map" && (u = `rotateZ(${this._rotation-this._map.getBearing()}deg)`); - let d = ""; - this._pitchAlignment === "viewport" || this._pitchAlignment === "auto" ? d = "rotateX(0deg)" : this._pitchAlignment === "map" && (d = `rotateX(${this._map.getPitch()}deg)`), this._subpixelPositioning || n && n.type !== "moveend" || (this._pos = this._pos.round()), X.setTransform(this._element, `${Il[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${d} ${u}`), ye.frameAsync(new AbortController).then((() => { - this._updateOpacity(n && n.type === "moveend") - })).catch((() => {})) - }, this._onMove = n => { - if (!this._isDragging) { - const s = this._clickTolerance || this._map._clickTolerance; - this._isDragging = n.point.dist(this._pointerdownPos) >= s - } - this._isDragging && (this._pos = n.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 o.l("dragstart"))), this.fire(new o.l("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 o.l("dragend")), this._state = "inactive" - }, this._addDragHandler = n => { - this._element.contains(n.originalEvent.target) && (n.preventDefault(), this._positionDelta = n.point.sub(this._pos).add(this._offset), this._pointerdownPos = n.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 = e && e.anchor || "center", this._color = e && e.color || "#3FB1CE", this._scale = e && e.scale || 1, this._draggable = e && e.draggable || !1, this._clickTolerance = e && e.clickTolerance || 0, this._subpixelPositioning = e && e.subpixelPositioning || !1, this._isDragging = !1, this._state = "inactive", this._rotation = e && e.rotation || 0, this._rotationAlignment = e && e.rotationAlignment || "auto", this._pitchAlignment = e && e.pitchAlignment && e.pitchAlignment !== "auto" ? e.pitchAlignment : this._rotationAlignment, this.setOpacity(e == null ? void 0 : e.opacity, e == null ? void 0 : e.opacityWhenCovered), e && e.element) this._element = e.element, this._offset = o.P.convert(e && e.offset || [0, 0]); - else { - this._defaultMarker = !0, this._element = X.create("div"); - const n = X.createNS("http://www.w3.org/2000/svg", "svg"), - s = 41, - u = 27; - n.setAttributeNS(null, "display", "block"), n.setAttributeNS(null, "height", `${s}px`), n.setAttributeNS(null, "width", `${u}px`), n.setAttributeNS(null, "viewBox", `0 0 ${u} ${s}`); - const d = X.createNS("http://www.w3.org/2000/svg", "g"); - d.setAttributeNS(null, "stroke", "none"), d.setAttributeNS(null, "stroke-width", "1"), d.setAttributeNS(null, "fill", "none"), d.setAttributeNS(null, "fill-rule", "evenodd"); - const m = X.createNS("http://www.w3.org/2000/svg", "g"); - m.setAttributeNS(null, "fill-rule", "nonzero"); - const y = X.createNS("http://www.w3.org/2000/svg", "g"); - y.setAttributeNS(null, "transform", "translate(3.0, 29.0)"), y.setAttributeNS(null, "fill", "#000000"); - const w = [{ - 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 re of w) { - const se = X.createNS("http://www.w3.org/2000/svg", "ellipse"); - se.setAttributeNS(null, "opacity", "0.04"), se.setAttributeNS(null, "cx", "10.5"), se.setAttributeNS(null, "cy", "5.80029008"), se.setAttributeNS(null, "rx", re.rx), se.setAttributeNS(null, "ry", re.ry), y.appendChild(se) - } - const P = X.createNS("http://www.w3.org/2000/svg", "g"); - P.setAttributeNS(null, "fill", this._color); - const M = X.createNS("http://www.w3.org/2000/svg", "path"); - M.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"), P.appendChild(M); - const D = X.createNS("http://www.w3.org/2000/svg", "g"); - D.setAttributeNS(null, "opacity", "0.25"), D.setAttributeNS(null, "fill", "#000000"); - const z = X.createNS("http://www.w3.org/2000/svg", "path"); - z.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"), D.appendChild(z); - const B = X.createNS("http://www.w3.org/2000/svg", "g"); - B.setAttributeNS(null, "transform", "translate(6.0, 7.0)"), B.setAttributeNS(null, "fill", "#FFFFFF"); - const U = X.createNS("http://www.w3.org/2000/svg", "g"); - U.setAttributeNS(null, "transform", "translate(8.0, 8.0)"); - const ee = X.createNS("http://www.w3.org/2000/svg", "circle"); - ee.setAttributeNS(null, "fill", "#000000"), ee.setAttributeNS(null, "opacity", "0.25"), ee.setAttributeNS(null, "cx", "5.5"), ee.setAttributeNS(null, "cy", "5.5"), ee.setAttributeNS(null, "r", "5.4999962"); - const J = X.createNS("http://www.w3.org/2000/svg", "circle"); - J.setAttributeNS(null, "fill", "#FFFFFF"), J.setAttributeNS(null, "cx", "5.5"), J.setAttributeNS(null, "cy", "5.5"), J.setAttributeNS(null, "r", "5.4999962"), U.appendChild(ee), U.appendChild(J), m.appendChild(y), m.appendChild(P), m.appendChild(D), m.appendChild(B), m.appendChild(U), n.appendChild(m), n.setAttributeNS(null, "height", s * this._scale + "px"), n.setAttributeNS(null, "width", u * this._scale + "px"), this._element.appendChild(n), this._offset = o.P.convert(e && e.offset || [0, -14]) - } - if (this._element.classList.add("maplibregl-marker"), this._element.addEventListener("dragstart", (n => { - n.preventDefault() - })), this._element.addEventListener("mousedown", (n => { - n.preventDefault() - })), Ws(this._element, this._anchor, "marker"), e && e.className) - for (const n of e.className.split(" ")) this._element.classList.add(n); - this._popup = null - } - addTo(e) { - return this.remove(), this._map = e, this._element.hasAttribute("aria-label") || this._element.setAttribute("aria-label", e._getUIString("Marker.Title")), e.getCanvasContainer().appendChild(this._element), e.on("move", this._update), e.on("moveend", this._update), e.on("terrain", this._update), e.on("projectiontransition", this._update), 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), X.remove(this._element), this._popup && this._popup.remove(), this - } - getLngLat() { - return this._lngLat - } - setLngLat(e) { - return this._lngLat = o.S.convert(e), this._pos = null, this._popup && this._popup.setLngLat(this._lngLat), this._update(), this - } - getElement() { - return this._element - } - setPopup(e) { - if (this._popup && (this._popup.remove(), this._popup = null, this._element.removeEventListener("keypress", this._onKeyPress), this._originalTabIndex || this._element.removeAttribute("tabindex")), e) { - if (!("offset" in e.options)) { - const u = Math.abs(13.5) / Math.SQRT2; - e.options.offset = this._defaultMarker ? { - top: [0, 0], - "top-left": [0, 0], - "top-right": [0, 0], - bottom: [0, -38.1], - "bottom-left": [u, -1 * (38.1 - 13.5 + u)], - "bottom-right": [-u, -1 * (38.1 - 13.5 + u)], - left: [13.5, -1 * (38.1 - 13.5)], - right: [-13.5, -1 * (38.1 - 13.5)] - } : this._offset - } - this._popup = e, this._originalTabIndex = this._element.getAttribute("tabindex"), this._originalTabIndex || this._element.setAttribute("tabindex", "0"), this._element.addEventListener("keypress", this._onKeyPress) - } - return this - } - setSubpixelPositioning(e) { - return this._subpixelPositioning = e, this - } - getPopup() { - return this._popup - } - togglePopup() { - const e = this._popup; - return this._element.style.opacity === this._opacityWhenCovered ? this : e ? (e.isOpen() ? e.remove() : (e.setLngLat(this._lngLat), e.addTo(this._map)), this) : this - } - _updateOpacity(e = !1) { - var n, s; - const u = (n = this._map) === null || n === void 0 ? void 0 : n.terrain, - d = this._map.transform.isLocationOccluded(this._lngLat); - if (!u || d) { - const B = d ? this._opacityWhenCovered : this._opacity; - return void(this._element.style.opacity !== B && (this._element.style.opacity = B)) - } - if (e) this._opacityTimeout = null; - else { - if (this._opacityTimeout) return; - this._opacityTimeout = setTimeout((() => { - this._opacityTimeout = null - }), 100) - } - const m = this._map, - y = m.terrain.depthAtPoint(this._pos), - w = m.terrain.getElevationForLngLatZoom(this._lngLat, m.transform.tileZoom); - if (m.transform.lngLatToCameraDepth(this._lngLat, w) - y < .006) return void(this._element.style.opacity = this._opacity); - const P = -this._offset.y / m.transform.pixelsPerMeter, - M = Math.sin(m.getPitch() * Math.PI / 180) * P, - D = m.terrain.depthAtPoint(new o.P(this._pos.x, this._pos.y - this._offset.y)), - z = m.transform.lngLatToCameraDepth(this._lngLat, w + M) - D > .006; - !((s = this._popup) === null || s === void 0) && s.isOpen() && z && this._popup.remove(), this._element.style.opacity = z ? this._opacityWhenCovered : this._opacity - } - getOffset() { - return this._offset - } - setOffset(e) { - return this._offset = o.P.convert(e), this._update(), this - } - addClassName(e) { - this._element.classList.add(e) - } - removeClassName(e) { - this._element.classList.remove(e) - } - toggleClassName(e) { - return this._element.classList.toggle(e) - } - setDraggable(e) { - return this._draggable = !!e, this._map && (e ? (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(e) { - return this._rotation = e || 0, this._update(), this - } - getRotation() { - return this._rotation - } - setRotationAlignment(e) { - return this._rotationAlignment = e || "auto", this._update(), this - } - getRotationAlignment() { - return this._rotationAlignment - } - setPitchAlignment(e) { - return this._pitchAlignment = e && e !== "auto" ? e : this._rotationAlignment, this._update(), this - } - getPitchAlignment() { - return this._pitchAlignment - } - setOpacity(e, n) { - return (this._opacity === void 0 || e === void 0 && n === void 0) && (this._opacity = "1", this._opacityWhenCovered = "0.2"), e !== void 0 && (this._opacity = e), n !== void 0 && (this._opacityWhenCovered = n), this._map && this._updateOpacity(!0), this - } - } - const Yc = { - positionOptions: { - enableHighAccuracy: !1, - maximumAge: 0, - timeout: 6e3 - }, - fitBoundsOptions: { - maxZoom: 15 - }, - trackUserLocation: !1, - showAccuracyCircle: !0, - showUserLocation: !0 - }; - let Ks = 0, - Ss = !1; - const Do = { - maxWidth: 100, - unit: "metric" - }; - - function Ml(h, e, n) { - const s = n && n.maxWidth || 100, - u = h._container.clientHeight / 2, - d = h._container.clientWidth / 2, - m = h.unproject([d - s / 2, u]), - y = h.unproject([d + s / 2, u]), - w = Math.round(h.project(y).x - h.project(m).x), - P = Math.min(s, w, h._container.clientWidth), - M = m.distanceTo(y); - if (n && n.unit === "imperial") { - const D = 3.2808 * M; - D > 5280 ? Ps(e, P, D / 5280, h._getUIString("ScaleControl.Miles")) : Ps(e, P, D, h._getUIString("ScaleControl.Feet")) - } else n && n.unit === "nautical" ? Ps(e, P, M / 1852, h._getUIString("ScaleControl.NauticalMiles")) : M >= 1e3 ? Ps(e, P, M / 1e3, h._getUIString("ScaleControl.Kilometers")) : Ps(e, P, M, h._getUIString("ScaleControl.Meters")) - } - - function Ps(h, e, n, s) { - const u = (function(d) { - const m = Math.pow(10, `${Math.floor(d)}`.length - 1); - let y = d / m; - return y = y >= 10 ? 10 : y >= 5 ? 5 : y >= 3 ? 3 : y >= 2 ? 2 : y >= 1 ? 1 : (function(w) { - const P = Math.pow(10, Math.ceil(-Math.log(w) / Math.LN10)); - return Math.round(w * P) / P - })(y), m * y - })(n); - h.style.width = e * (u / n) + "px", h.innerHTML = `${u} ${s}` - } - const Jc = { - closeButton: !0, - closeOnClick: !0, - focusAfterOpen: !0, - className: "", - maxWidth: "240px", - subpixelPositioning: !1, - locationOccludedOpacity: void 0 - }, - Qc = ["a[href]", "[tabindex]:not([tabindex='-1'])", "[contenteditable]:not([contenteditable='false'])", "button:not([disabled])", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].join(", "); - - function Al(h) { - if (h) { - if (typeof h == "number") { - const e = Math.round(Math.abs(h) / Math.SQRT2); - return { - center: new o.P(0, 0), - top: new o.P(0, h), - "top-left": new o.P(e, e), - "top-right": new o.P(-e, e), - bottom: new o.P(0, -h), - "bottom-left": new o.P(e, -e), - "bottom-right": new o.P(-e, -e), - left: new o.P(h, 0), - right: new o.P(-h, 0) - } - } - if (h instanceof o.P || Array.isArray(h)) { - const e = o.P.convert(h); - return { - center: e, - top: e, - "top-left": e, - "top-right": e, - bottom: e, - "bottom-left": e, - "bottom-right": e, - left: e, - right: e - } - } - return { - center: o.P.convert(h.center || [0, 0]), - top: o.P.convert(h.top || [0, 0]), - "top-left": o.P.convert(h["top-left"] || [0, 0]), - "top-right": o.P.convert(h["top-right"] || [0, 0]), - bottom: o.P.convert(h.bottom || [0, 0]), - "bottom-left": o.P.convert(h["bottom-left"] || [0, 0]), - "bottom-right": o.P.convert(h["bottom-right"] || [0, 0]), - left: o.P.convert(h.left || [0, 0]), - right: o.P.convert(h.right || [0, 0]) - } - } - return Al(new o.P(0, 0)) - } - const eu = $; - T.AJAXError = o.cz, T.Event = o.l, T.Evented = o.E, T.LngLat = o.S, T.MercatorCoordinate = o.a1, T.Point = o.P, T.addProtocol = o.cA, T.config = o.a, T.removeProtocol = o.cB, T.AttributionControl = Kc, T.BoxZoomHandler = Vc, T.CanvasSource = _r, T.CooperativeGesturesHandler = Qh, T.DoubleClickZoomHandler = $c, T.DragPanHandler = Yh, T.DragRotateHandler = Hc, T.EdgeInsets = on, T.FullscreenControl = class extends o.E { - constructor(h = {}) { - super(), this._onFullscreenChange = () => { - var e; - let n = window.document.fullscreenElement || window.document.mozFullScreenElement || window.document.webkitFullscreenElement || window.document.msFullscreenElement; - for (; !((e = n == null ? void 0 : n.shadowRoot) === null || e === void 0) && e.fullscreenElement;) n = n.shadowRoot.fullscreenElement; - n === this._container !== this._fullscreen && this._handleFullscreenChange() - }, this._onClickFullscreen = () => { - this._isFullscreen() ? this._exitFullscreen() : this._requestFullscreen() - }, this._fullscreen = !1, h && h.container && (h.container instanceof HTMLElement ? this._container = h.container : o.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(h) { - return this._map = h, this._container || (this._container = this._map.getContainer()), this._controlContainer = X.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._setupUI(), this._controlContainer - } - onRemove() { - X.remove(this._controlContainer), this._map = null, window.document.removeEventListener(this._fullscreenchange, this._onFullscreenChange) - } - _setupUI() { - const h = this._fullscreenButton = X.create("button", "maplibregl-ctrl-fullscreen", this._controlContainer); - X.create("span", "maplibregl-ctrl-icon", h).setAttribute("aria-hidden", "true"), h.type = "button", this._updateTitle(), this._fullscreenButton.addEventListener("click", this._onClickFullscreen), window.document.addEventListener(this._fullscreenchange, this._onFullscreenChange) - } - _updateTitle() { - const h = this._getTitle(); - this._fullscreenButton.setAttribute("aria-label", h), this._fullscreenButton.title = h - } - _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 o.l("fullscreenstart")), this._prevCooperativeGesturesEnabled = this._map.cooperativeGestures.isEnabled(), this._map.cooperativeGestures.disable()) : (this.fire(new o.l("fullscreenend")), this._prevCooperativeGesturesEnabled && this._map.cooperativeGestures.enable()) - } - _exitFullscreen() { - window.document.exitFullscreen ? window.document.exitFullscreen() : window.document.mozCancelFullScreen ? window.document.mozCancelFullScreen() : window.document.msExitFullscreen ? window.document.msExitFullscreen() : window.document.webkitCancelFullScreen ? window.document.webkitCancelFullScreen() : this._togglePseudoFullScreen() - } - _requestFullscreen() { - this._container.requestFullscreen ? this._container.requestFullscreen() : this._container.mozRequestFullScreen ? this._container.mozRequestFullScreen() : this._container.msRequestFullscreen ? this._container.msRequestFullscreen() : this._container.webkitRequestFullscreen ? this._container.webkitRequestFullscreen() : this._togglePseudoFullScreen() - } - _togglePseudoFullScreen() { - this._container.classList.toggle("maplibregl-pseudo-fullscreen"), this._handleFullscreenChange(), this._map.resize() - } - }, T.GeoJSONSource = ar, T.GeolocateControl = class extends o.E { - constructor(h) { - super(), this._onSuccess = e => { - if (this._map) { - if (this._isOutOfMapMaxBounds(e)) return this._setErrorState(), this.fire(new o.l("outofmaxbounds", e)), this._updateMarker(), void this._finish(); - if (this.options.trackUserLocation) switch (this._lastKnownPosition = e, this._watchState) { - case "WAITING_ACTIVE": - case "ACTIVE_LOCK": - case "ACTIVE_ERROR": - 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(e), this.options.trackUserLocation && this._watchState !== "ACTIVE_LOCK" || this._updateCamera(e), this.options.showUserLocation && this._dotElement.classList.remove("maplibregl-user-location-dot-stale"), this.fire(new o.l("geolocate", e)), this._finish() - } - }, this._updateCamera = e => { - const n = new o.S(e.coords.longitude, e.coords.latitude), - s = e.coords.accuracy, - u = this._map.getBearing(), - d = o.e({ - bearing: u - }, this.options.fitBoundsOptions), - m = dt.fromLngLat(n, s); - this._map.fitBounds(m, d, { - geolocateSource: !0 - }) - }, this._updateMarker = e => { - if (e) { - const n = new o.S(e.coords.longitude, e.coords.latitude); - this._accuracyCircleMarker.setLngLat(n).addTo(this._map), this._userLocationDotMarker.setLngLat(n).addTo(this._map), this._accuracy = e.coords.accuracy, this.options.showUserLocation && this.options.showAccuracyCircle && this._updateCircleRadius() - } else this._userLocationDotMarker.remove(), this._accuracyCircleMarker.remove() - }, this._onZoom = () => { - this.options.showUserLocation && this.options.showAccuracyCircle && this._updateCircleRadius() - }, this._onError = e => { - if (this._map) { - if (e.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 n = this._map._getUIString("GeolocateControl.LocationNotAvailable"); - this._geolocateButton.title = n, this._geolocateButton.setAttribute("aria-label", n), this._geolocationWatchID !== void 0 && this._clearWatch() - } else { - if (e.code === 3 && Ss) return; - this.options.trackUserLocation && this._setErrorState() - } - this._watchState !== "OFF" && this.options.showUserLocation && this._dotElement.classList.add("maplibregl-user-location-dot-stale"), this.fire(new o.l("error", e)), this._finish() - } - }, this._finish = () => { - this._timeoutId && clearTimeout(this._timeoutId), this._timeoutId = void 0 - }, this._setupUI = () => { - this._map && (this._container.addEventListener("contextmenu", (e => e.preventDefault())), this._geolocateButton = X.create("button", "maplibregl-ctrl-geolocate", this._container), X.create("span", "maplibregl-ctrl-icon", this._geolocateButton).setAttribute("aria-hidden", "true"), this._geolocateButton.type = "button", this._geolocateButton.disabled = !0) - }, this._finishSetupUI = e => { - if (this._map) { - if (e === !1) { - o.w("Geolocation support is not available so the GeolocateControl will be disabled."); - const n = this._map._getUIString("GeolocateControl.LocationNotAvailable"); - this._geolocateButton.disabled = !0, this._geolocateButton.title = n, this._geolocateButton.setAttribute("aria-label", n) - } else { - const n = this._map._getUIString("GeolocateControl.FindMyLocation"); - this._geolocateButton.disabled = !1, this._geolocateButton.title = n, this._geolocateButton.setAttribute("aria-label", n) - } - this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement = X.create("div", "maplibregl-user-location-dot"), this._userLocationDotMarker = new Xs({ - element: this._dotElement - }), this._circleElement = X.create("div", "maplibregl-user-location-accuracy-circle"), this._accuracyCircleMarker = new Xs({ - element: this._circleElement, - pitchAlignment: "map" - }), this.options.trackUserLocation && (this._watchState = "OFF"), this._map.on("zoom", this._onZoom)), this._geolocateButton.addEventListener("click", (() => this.trigger())), this._setup = !0, this.options.trackUserLocation && this._map.on("movestart", (n => { - const s = (n == null ? void 0 : n[0]) instanceof ResizeObserverEntry; - n.geolocateSource || this._watchState !== "ACTIVE_LOCK" || s || 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 o.l("trackuserlocationend")), this.fire(new o.l("userlocationlostfocus"))) - })) - } - }, this.options = o.e({}, Yc, h) - } - onAdd(h) { - return this._map = h, this._container = X.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._setupUI(), (function() { - return o._(this, arguments, void 0, (function*(e = !1) { - if (Ai !== void 0 && !e) return Ai; - if (window.navigator.permissions === void 0) return Ai = !!window.navigator.geolocation, Ai; - try { - Ai = (yield window.navigator.permissions.query({ - name: "geolocation" - })).state !== "denied" - } catch { - Ai = !!window.navigator.geolocation - } - return Ai - })) - })().then((e => this._finishSetupUI(e))), 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(), X.remove(this._container), this._map.off("zoom", this._onZoom), this._map = void 0, Ks = 0, Ss = !1 - } - _isOutOfMapMaxBounds(h) { - const e = this._map.getMaxBounds(), - n = h.coords; - return e && (n.longitude < e.getWest() || n.longitude > e.getEast() || n.latitude < e.getSouth() || n.latitude > e.getNorth()) - } - _setErrorState() { - switch (this._watchState) { - case "WAITING_ACTIVE": - this._watchState = "ACTIVE_ERROR", 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": - break; - default: - throw new Error(`Unexpected watchState ${this._watchState}`) - } - } - _updateCircleRadius() { - const h = this._map.getBounds(), - e = h.getSouthEast(), - n = h.getNorthEast(), - s = e.distanceTo(n), - u = Math.ceil(this._accuracy / (s / this._map._container.clientHeight) * 2); - this._circleElement.style.width = `${u}px`, this._circleElement.style.height = `${u}px` - } - trigger() { - if (!this._setup) return o.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 o.l("trackuserlocationstart")); - break; - case "WAITING_ACTIVE": - case "ACTIVE_LOCK": - case "ACTIVE_ERROR": - case "BACKGROUND_ERROR": - Ks--, Ss = !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 o.l("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 o.l("trackuserlocationstart")), this.fire(new o.l("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 h; - this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"), this._geolocateButton.setAttribute("aria-pressed", "true"), Ks++, Ks > 1 ? (h = { - maximumAge: 6e5, - timeout: 0 - }, Ss = !0) : (h = this.options.positionOptions, Ss = !1), this._geolocationWatchID = window.navigator.geolocation.watchPosition(this._onSuccess, this._onError, h) - } - } 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) - } - }, T.GlobeControl = class { - constructor() { - this._toggleProjection = () => { - var h; - const e = (h = this._map.getProjection()) === null || h === void 0 ? void 0 : h.type; - this._map.setProjection(e !== "mercator" && e ? { - type: "mercator" - } : { - type: "globe" - }), this._updateGlobeIcon() - }, this._updateGlobeIcon = () => { - var h; - this._globeButton.classList.remove("maplibregl-ctrl-globe"), this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"), ((h = this._map.getProjection()) === null || h === void 0 ? void 0 : h.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(h) { - return this._map = h, this._container = X.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._globeButton = X.create("button", "maplibregl-ctrl-globe", this._container), X.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._container - } - onRemove() { - X.remove(this._container), this._map.off("styledata", this._updateGlobeIcon), this._globeButton.removeEventListener("click", this._toggleProjection), this._map = void 0 - } - }, T.Hash = yl, T.ImageSource = Ft, T.KeyboardHandler = wl, T.LngLatBounds = dt, T.LogoControl = td, T.Map = class extends ed { - constructor(h) { - var e, n; - o.cw.mark(o.cx.create); - const s = Object.assign(Object.assign(Object.assign({}, ha), h), { - canvasContextAttributes: Object.assign(Object.assign({}, ha.canvasContextAttributes), h.canvasContextAttributes) - }); - if (s.minZoom != null && s.maxZoom != null && s.minZoom > s.maxZoom) throw new Error("maxZoom must be greater than or equal to minZoom"); - if (s.minPitch != null && s.maxPitch != null && s.minPitch > s.maxPitch) throw new Error("maxPitch must be greater than or equal to minPitch"); - if (s.minPitch != null && s.minPitch < 0) throw new Error("minPitch must be greater than or equal to 0"); - if (s.maxPitch != null && s.maxPitch > 180) throw new Error("maxPitch must be less than or equal to 180"); - const u = new wi, - d = new hn; - if (s.minZoom !== void 0 && u.setMinZoom(s.minZoom), s.maxZoom !== void 0 && u.setMaxZoom(s.maxZoom), s.minPitch !== void 0 && u.setMinPitch(s.minPitch), s.maxPitch !== void 0 && u.setMaxPitch(s.maxPitch), s.renderWorldCopies !== void 0 && u.setRenderWorldCopies(s.renderWorldCopies), super(u, d, { - bearingSnap: s.bearingSnap - }), this._idleTriggered = !1, this._crossFadingFactor = 1, this._renderTaskQueue = new Na, this._controls = [], this._mapId = o.a7(), this._contextLost = y => { - y.preventDefault(), this._frameRequest && (this._frameRequest.abort(), this._frameRequest = null), this.fire(new o.l("webglcontextlost", { - originalEvent: y - })) - }, this._contextRestored = y => { - this._setupPainter(), this.resize(), this._update(), this.fire(new o.l("webglcontextrestored", { - originalEvent: y - })) - }, this._onMapScroll = y => { - if (y.target === this._container) return this._container.scrollTop = 0, this._container.scrollLeft = 0, !1 - }, this._onWindowOnline = () => { - this._update() - }, this._interactive = s.interactive, this._maxTileCacheSize = s.maxTileCacheSize, this._maxTileCacheZoomLevels = s.maxTileCacheZoomLevels, this._canvasContextAttributes = Object.assign({}, s.canvasContextAttributes), this._trackResize = s.trackResize === !0, this._bearingSnap = s.bearingSnap, this._centerClampedToGround = s.centerClampedToGround, this._refreshExpiredTiles = s.refreshExpiredTiles === !0, this._fadeDuration = s.fadeDuration, this._crossSourceCollisions = s.crossSourceCollisions === !0, this._collectResourceTiming = s.collectResourceTiming === !0, this._locale = Object.assign(Object.assign({}, jn), s.locale), this._clickTolerance = s.clickTolerance, this._overridePixelRatio = s.pixelRatio, this._maxCanvasSize = s.maxCanvasSize, this.transformCameraUpdate = s.transformCameraUpdate, this.cancelPendingTileRequestsWhileZooming = s.cancelPendingTileRequestsWhileZooming === !0, this._imageQueueHandle = Ne.addThrottleControl((() => this.isMoving())), this._requestManager = new ft(s.transformRequest), typeof s.container == "string") { - if (this._container = document.getElementById(s.container), !this._container) throw new Error(`Container '${s.container}' not found.`) - } else { - if (!(s.container instanceof HTMLElement)) throw new Error("Invalid type: 'container' must be a String or HTMLElement."); - this._container = s.container - } - if (s.maxBounds && this.setMaxBounds(s.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.dirty = !0, this._update(!0) - })), this.once("idle", (() => { - this._idleTriggered = !0 - })), typeof window < "u") { - addEventListener("online", this._onWindowOnline, !1); - let y = !1; - const w = Ts((P => { - this._trackResize && !this._removed && (this.resize(P), this.redraw()) - }), 50); - this._resizeObserver = new ResizeObserver((P => { - y ? w(P) : y = !0 - })), this._resizeObserver.observe(this._container) - } - this.handlers = new Wc(this, s), this._hash = s.hash && new yl(typeof s.hash == "string" && s.hash || void 0).addTo(this), this._hash && this._hash._onHashChange() || (this.jumpTo({ - center: s.center, - elevation: s.elevation, - zoom: s.zoom, - bearing: s.bearing, - pitch: s.pitch, - roll: s.roll - }), s.bounds && (this.resize(), this.fitBounds(s.bounds, o.e({}, s.fitBoundsOptions, { - duration: 0 - })))); - const m = typeof s.style == "string" || ((n = (e = s.style) === null || e === void 0 ? void 0 : e.projection) === null || n === void 0 ? void 0 : n.type) !== "globe"; - this.resize(null, m), this._localIdeographFontFamily = s.localIdeographFontFamily, this._validateStyle = s.validateStyle, s.style && this.setStyle(s.style, { - localIdeographFontFamily: s.localIdeographFontFamily - }), s.attributionControl && this.addControl(new Kc(typeof s.attributionControl == "boolean" ? void 0 : s.attributionControl)), s.maplibreLogo && this.addControl(new td, s.logoPosition), this.on("style.load", (() => { - if (m || this._resizeTransform(), this.transform.unmodified) { - const y = o.Q(this.style.stylesheet, ["center", "zoom", "bearing", "pitch", "roll"]); - this.jumpTo(y) - } - })), this.on("data", (y => { - this._update(y.dataType === "style"), this.fire(new o.l(`${y.dataType}data`, y)) - })), this.on("dataloading", (y => { - this.fire(new o.l(`${y.dataType}dataloading`, y)) - })), this.on("dataabort", (y => { - this.fire(new o.l("sourcedataabort", y)) - })) - } - _getMapId() { - return this._mapId - } - setGlobalStateProperty(h, e) { - return this.style.setGlobalStateProperty(h, e), this._update(!0) - } - getGlobalState() { - return this.style.getGlobalState() - } - addControl(h, e) { - if (e === void 0 && (e = h.getDefaultPosition ? h.getDefaultPosition() : "top-right"), !h || !h.onAdd) return this.fire(new o.k(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods."))); - const n = h.onAdd(this); - this._controls.push(h); - const s = this._controlPositions[e]; - return e.indexOf("bottom") !== -1 ? s.insertBefore(n, s.firstChild) : s.appendChild(n), this - } - removeControl(h) { - if (!h || !h.onRemove) return this.fire(new o.k(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods."))); - const e = this._controls.indexOf(h); - return e > -1 && this._controls.splice(e, 1), h.onRemove(this), this - } - hasControl(h) { - return this._controls.indexOf(h) > -1 - } - calculateCameraOptionsFromTo(h, e, n, s) { - return s == null && this.terrain && (s = this.terrain.getElevationForLngLatZoom(n, this.transform.tileZoom)), super.calculateCameraOptionsFromTo(h, e, n, s) - } - resize(h, e = !0) { - const [n, s] = this._containerDimensions(), u = this._getClampedPixelRatio(n, s); - if (this._resizeCanvas(n, s, u), this.painter.resize(n, s, u), this.painter.overLimit()) { - const m = this.painter.context.gl; - this._maxCanvasSize = [m.drawingBufferWidth, m.drawingBufferHeight]; - const y = this._getClampedPixelRatio(n, s); - this._resizeCanvas(n, s, y), this.painter.resize(n, s, y) - } - this._resizeTransform(e); - const d = !this._moving; - return d && (this.stop(), this.fire(new o.l("movestart", h)).fire(new o.l("move", h))), this.fire(new o.l("resize", h)), d && this.fire(new o.l("moveend", h)), this - } - _resizeTransform(h = !0) { - var e; - const [n, s] = this._containerDimensions(); - this.transform.resize(n, s, h), (e = this._requestedCameraState) === null || e === void 0 || e.resize(n, s, h) - } - _getClampedPixelRatio(h, e) { - const { - 0: n, - 1: s - } = this._maxCanvasSize, u = this.getPixelRatio(), d = h * u, m = e * u; - return Math.min(d > n ? n / d : 1, m > s ? s / m : 1) * u - } - getPixelRatio() { - var h; - return (h = this._overridePixelRatio) !== null && h !== void 0 ? h : devicePixelRatio - } - setPixelRatio(h) { - this._overridePixelRatio = h, this.resize() - } - getBounds() { - return this.transform.getBounds() - } - getMaxBounds() { - return this.transform.getMaxBounds() - } - setMaxBounds(h) { - return this.transform.setMaxBounds(dt.convert(h)), this._update() - } - setMinZoom(h) { - if ((h = h ?? -2) >= -2 && h <= this.transform.maxZoom) return this.transform.setMinZoom(h), this._update(), this.getZoom() < h && this.setZoom(h), this; - throw new Error("minZoom must be between -2 and the current maxZoom, inclusive") - } - getMinZoom() { - return this.transform.minZoom - } - setMaxZoom(h) { - if ((h = h ?? 22) >= this.transform.minZoom) return this.transform.setMaxZoom(h), this._update(), this.getZoom() > h && this.setZoom(h), this; - throw new Error("maxZoom must be greater than the current minZoom") - } - getMaxZoom() { - return this.transform.maxZoom - } - setMinPitch(h) { - if ((h = h ?? 0) < 0) throw new Error("minPitch must be greater than or equal to 0"); - if (h >= 0 && h <= this.transform.maxPitch) return this.transform.setMinPitch(h), this._update(), this.getPitch() < h && this.setPitch(h), this; - throw new Error("minPitch must be between 0 and the current maxPitch, inclusive") - } - getMinPitch() { - return this.transform.minPitch - } - setMaxPitch(h) { - if ((h = h ?? 60) > 180) throw new Error("maxPitch must be less than or equal to 180"); - if (h >= this.transform.minPitch) return this.transform.setMaxPitch(h), this._update(), this.getPitch() > h && this.setPitch(h), this; - throw new Error("maxPitch must be greater than the current minPitch") - } - getMaxPitch() { - return this.transform.maxPitch - } - getRenderWorldCopies() { - return this.transform.renderWorldCopies - } - setRenderWorldCopies(h) { - return this.transform.setRenderWorldCopies(h), this._update() - } - project(h) { - return this.transform.locationToScreenPoint(o.S.convert(h), this.style && this.terrain) - } - unproject(h) { - return this.transform.screenPointToLocation(o.P.convert(h), this.terrain) - } - isMoving() { - var h; - return this._moving || ((h = this.handlers) === null || h === void 0 ? void 0 : h.isMoving()) - } - isZooming() { - var h; - return this._zooming || ((h = this.handlers) === null || h === void 0 ? void 0 : h.isZooming()) - } - isRotating() { - var h; - return this._rotating || ((h = this.handlers) === null || h === void 0 ? void 0 : h.isRotating()) - } - _createDelegatedListener(h, e, n) { - if (h === "mouseenter" || h === "mouseover") { - let s = !1; - return { - layers: e, - listener: n, - delegates: { - mousemove: d => { - const m = e.filter((w => this.getLayer(w))), - y = m.length !== 0 ? this.queryRenderedFeatures(d.point, { - layers: m - }) : []; - y.length ? s || (s = !0, n.call(this, new Wn(h, this, d.originalEvent, { - features: y - }))) : s = !1 - }, - mouseout: () => { - s = !1 - } - } - } - } - if (h === "mouseleave" || h === "mouseout") { - let s = !1; - return { - layers: e, - listener: n, - delegates: { - mousemove: m => { - const y = e.filter((w => this.getLayer(w))); - (y.length !== 0 ? this.queryRenderedFeatures(m.point, { - layers: y - }) : []).length ? s = !0 : s && (s = !1, n.call(this, new Wn(h, this, m.originalEvent))) - }, - mouseout: m => { - s && (s = !1, n.call(this, new Wn(h, this, m.originalEvent))) - } - } - } - } { - const s = u => { - const d = e.filter((y => this.getLayer(y))), - m = d.length !== 0 ? this.queryRenderedFeatures(u.point, { - layers: d - }) : []; - m.length && (u.features = m, n.call(this, u), delete u.features) - }; - return { - layers: e, - listener: n, - delegates: { - [h]: s - } - } - } - } - _saveDelegatedListener(h, e) { - this._delegatedListeners = this._delegatedListeners || {}, this._delegatedListeners[h] = this._delegatedListeners[h] || [], this._delegatedListeners[h].push(e) - } - _removeDelegatedListener(h, e, n) { - if (!this._delegatedListeners || !this._delegatedListeners[h]) return; - const s = this._delegatedListeners[h]; - for (let u = 0; u < s.length; u++) { - const d = s[u]; - if (d.listener === n && d.layers.length === e.length && d.layers.every((m => e.includes(m)))) { - for (const m in d.delegates) this.off(m, d.delegates[m]); - return void s.splice(u, 1) - } - } - } - on(h, e, n) { - if (n === void 0) return super.on(h, e); - const s = typeof e == "string" ? [e] : e, - u = this._createDelegatedListener(h, s, n); - this._saveDelegatedListener(h, u); - for (const d in u.delegates) this.on(d, u.delegates[d]); - return { - unsubscribe: () => { - this._removeDelegatedListener(h, s, n) - } - } - } - once(h, e, n) { - if (n === void 0) return super.once(h, e); - const s = typeof e == "string" ? [e] : e, - u = this._createDelegatedListener(h, s, n); - for (const d in u.delegates) { - const m = u.delegates[d]; - u.delegates[d] = (...y) => { - this._removeDelegatedListener(h, s, n), m(...y) - } - } - this._saveDelegatedListener(h, u); - for (const d in u.delegates) this.once(d, u.delegates[d]); - return this - } - off(h, e, n) { - return n === void 0 ? super.off(h, e) : (this._removeDelegatedListener(h, typeof e == "string" ? [e] : e, n), this) - } - queryRenderedFeatures(h, e) { - if (!this.style) return []; - let n; - const s = h instanceof o.P || Array.isArray(h), - u = s ? h : [ - [0, 0], - [this.transform.width, this.transform.height] - ]; - if (e = e || (s ? {} : h) || {}, u instanceof o.P || typeof u[0] == "number") n = [o.P.convert(u)]; - else { - const d = o.P.convert(u[0]), - m = o.P.convert(u[1]); - n = [d, new o.P(m.x, d.y), m, new o.P(d.x, m.y), d] - } - return this.style.queryRenderedFeatures(n, e, this.transform) - } - querySourceFeatures(h, e) { - return this.style.querySourceFeatures(h, e) - } - setStyle(h, e) { - return (e = o.e({}, { - localIdeographFontFamily: this._localIdeographFontFamily, - validate: this._validateStyle - }, e)).diff !== !1 && e.localIdeographFontFamily === this._localIdeographFontFamily && this.style && h ? (this._diffStyle(h, e), this) : (this._localIdeographFontFamily = e.localIdeographFontFamily, this._updateStyle(h, e)) - } - setTransformRequest(h) { - return this._requestManager.setTransformRequest(h), this - } - _getUIString(h) { - const e = this._locale[h]; - if (e == null) throw new Error(`Missing UI string '${h}'`); - return e - } - _updateStyle(h, e) { - var n, s; - if (e.transformStyle && this.style && !this.style._loaded) return void this.style.once("style.load", (() => this._updateStyle(h, e))); - const u = this.style && e.transformStyle ? this.style.serialize() : void 0; - return this.style && (this.style.setEventedParent(null), this.style._remove(!h)), h ? (this.style = new gc(this, e || {}), this.style.setEventedParent(this, { - style: this.style - }), typeof h == "string" ? this.style.loadURL(h, e, u) : this.style.loadJSON(h, e, u), this) : ((s = (n = this.style) === null || n === void 0 ? void 0 : n.projection) === null || s === void 0 || s.destroy(), delete this.style, this) - } - _lazyInitEmptyStyle() { - this.style || (this.style = new gc(this, {}), this.style.setEventedParent(this, { - style: this.style - }), this.style.loadEmpty()) - } - _diffStyle(h, e) { - if (typeof h == "string") { - const n = this._requestManager.transformRequest(h, "Style"); - o.j(n, new AbortController).then((s => { - this._updateDiff(s.data, e) - })).catch((s => { - s && this.fire(new o.k(s)) - })) - } else typeof h == "object" && this._updateDiff(h, e) - } - _updateDiff(h, e) { - try { - this.style.setState(h, e) && this._update(!0) - } catch (n) { - o.w(`Unable to perform style diff: ${n.message||n.error||n}. Rebuilding the style from scratch.`), this._updateStyle(h, e) - } - } - getStyle() { - if (this.style) return this.style.serialize() - } - isStyleLoaded() { - return this.style ? this.style.loaded() : o.w("There is no style added to the map.") - } - addSource(h, e) { - return this._lazyInitEmptyStyle(), this.style.addSource(h, e), this._update(!0) - } - isSourceLoaded(h) { - const e = this.style && this.style.sourceCaches[h]; - if (e !== void 0) return e.loaded(); - this.fire(new o.k(new Error(`There is no source with ID '${h}'`))) - } - setTerrain(h) { - if (this.style._checkLoaded(), this._terrainDataCallback && this.style.off("data", this._terrainDataCallback), h) { - const e = this.style.sourceCaches[h.source]; - if (!e) throw new Error(`cannot load terrain, because there exists no source with ID: ${h.source}`); - this.terrain === null && e.reload(); - for (const n in this.style._layers) { - const s = this.style._layers[n]; - s.type === "hillshade" && s.source === h.source && o.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."), s.type === "color-relief" && s.source === h.source && o.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 Rr(this.painter, e, h), this.painter.renderToTexture = new Pl(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 = n => { - var s; - n.dataType === "style" ? this.terrain.sourceCache.freeRtt() : n.dataType === "source" && n.tile && (n.sourceId !== h.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))), ((s = n.source) === null || s === void 0 ? void 0 : s.type) === "image" ? this.terrain.sourceCache.freeRtt() : this.terrain.sourceCache.freeRtt(n.tile.tileID)) - }, this.style.on("data", this._terrainDataCallback) - } else this.terrain && this.terrain.sourceCache.destruct(), this.terrain = null, this.painter.renderToTexture && this.painter.renderToTexture.destruct(), this.painter.renderToTexture = null, this.transform.setMinElevationForCurrentTile(0), this._centerClampedToGround && this.transform.setElevation(0); - return this.fire(new o.l("terrain", { - terrain: h - })), this - } - getTerrain() { - var h, e; - return (e = (h = this.terrain) === null || h === void 0 ? void 0 : h.options) !== null && e !== void 0 ? e : null - } - areTilesLoaded() { - const h = this.style && this.style.sourceCaches; - for (const e in h) { - const n = h[e]._tiles; - for (const s in n) { - const u = n[s]; - if (u.state !== "loaded" && u.state !== "errored") return !1 - } - } - return !0 - } - removeSource(h) { - return this.style.removeSource(h), this._update(!0) - } - getSource(h) { - return this.style.getSource(h) - } - setSourceTileLodParams(h, e, n) { - if (n) { - const s = this.getSource(n); - if (!s) throw new Error(`There is no source with ID "${n}", cannot set LOD parameters`); - s.calculateTileZoom = ot(Math.max(1, h), Math.max(1, e)) - } else - for (const s in this.style.sourceCaches) this.style.sourceCaches[s].getSource().calculateTileZoom = ot(Math.max(1, h), Math.max(1, e)); - return this._update(!0), this - } - refreshTiles(h, e) { - const n = this.style.sourceCaches[h]; - if (!n) throw new Error(`There is no source cache with ID "${h}", cannot refresh tile`); - e === void 0 ? n.reload(!0) : n.refreshTiles(e.map((s => new o.a4(s.z, s.x, s.y)))) - } - addImage(h, e, n = {}) { - const { - pixelRatio: s = 1, - sdf: u = !1, - stretchX: d, - stretchY: m, - content: y, - textFitWidth: w, - textFitHeight: P - } = n; - if (this._lazyInitEmptyStyle(), !(e instanceof HTMLImageElement || o.b(e))) { - if (e.width === void 0 || e.height === void 0) return this.fire(new o.k(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: M, - height: D, - data: z - } = e, B = e; - return this.style.addImage(h, { - data: new o.R({ - width: M, - height: D - }, new Uint8Array(z)), - pixelRatio: s, - stretchX: d, - stretchY: m, - content: y, - textFitWidth: w, - textFitHeight: P, - sdf: u, - version: 0, - userImage: B - }), B.onAdd && B.onAdd(this, h), this - } - } { - const { - width: M, - height: D, - data: z - } = ye.getImageData(e); - this.style.addImage(h, { - data: new o.R({ - width: M, - height: D - }, z), - pixelRatio: s, - stretchX: d, - stretchY: m, - content: y, - textFitWidth: w, - textFitHeight: P, - sdf: u, - version: 0 - }) - } - } - updateImage(h, e) { - const n = this.style.getImage(h); - if (!n) return this.fire(new o.k(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead."))); - const s = e instanceof HTMLImageElement || o.b(e) ? ye.getImageData(e) : e, - { - width: u, - height: d, - data: m - } = s; - if (u === void 0 || d === void 0) return this.fire(new o.k(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 (u !== n.data.width || d !== n.data.height) return this.fire(new o.k(new Error("The width and height of the updated image must be that same as the previous version of the image"))); - const y = !(e instanceof HTMLImageElement || o.b(e)); - return n.data.replace(m, y), this.style.updateImage(h, n), this - } - getImage(h) { - return this.style.getImage(h) - } - hasImage(h) { - return h ? !!this.style.getImage(h) : (this.fire(new o.k(new Error("Missing required image id"))), !1) - } - removeImage(h) { - this.style.removeImage(h) - } - loadImage(h) { - return Ne.getImage(this._requestManager.transformRequest(h, "Image"), new AbortController) - } - listImages() { - return this.style.listImages() - } - addLayer(h, e) { - return this._lazyInitEmptyStyle(), this.style.addLayer(h, e), this._update(!0) - } - moveLayer(h, e) { - return this.style.moveLayer(h, e), this._update(!0) - } - removeLayer(h) { - return this.style.removeLayer(h), this._update(!0) - } - getLayer(h) { - return this.style.getLayer(h) - } - getLayersOrder() { - return this.style.getLayersOrder() - } - setLayerZoomRange(h, e, n) { - return this.style.setLayerZoomRange(h, e, n), this._update(!0) - } - setFilter(h, e, n = {}) { - return this.style.setFilter(h, e, n), this._update(!0) - } - getFilter(h) { - return this.style.getFilter(h) - } - setPaintProperty(h, e, n, s = {}) { - return this.style.setPaintProperty(h, e, n, s), this._update(!0) - } - getPaintProperty(h, e) { - return this.style.getPaintProperty(h, e) - } - setLayoutProperty(h, e, n, s = {}) { - return this.style.setLayoutProperty(h, e, n, s), this._update(!0) - } - getLayoutProperty(h, e) { - return this.style.getLayoutProperty(h, e) - } - setGlyphs(h, e = {}) { - return this._lazyInitEmptyStyle(), this.style.setGlyphs(h, e), this._update(!0) - } - getGlyphs() { - return this.style.getGlyphsUrl() - } - addSprite(h, e, n = {}) { - return this._lazyInitEmptyStyle(), this.style.addSprite(h, e, n, (s => { - s || this._update(!0) - })), this - } - removeSprite(h) { - return this._lazyInitEmptyStyle(), this.style.removeSprite(h), this._update(!0) - } - getSprite() { - return this.style.getSprite() - } - setSprite(h, e = {}) { - return this._lazyInitEmptyStyle(), this.style.setSprite(h, e, (n => { - n || this._update(!0) - })), this - } - setLight(h, e = {}) { - return this._lazyInitEmptyStyle(), this.style.setLight(h, e), this._update(!0) - } - getLight() { - return this.style.getLight() - } - setSky(h, e = {}) { - return this._lazyInitEmptyStyle(), this.style.setSky(h, e), this._update(!0) - } - getSky() { - return this.style.getSky() - } - setFeatureState(h, e) { - return this.style.setFeatureState(h, e), this._update() - } - removeFeatureState(h, e) { - return this.style.removeFeatureState(h, e), this._update() - } - getFeatureState(h) { - return this.style.getFeatureState(h) - } - getContainer() { - return this._container - } - getCanvasContainer() { - return this._canvasContainer - } - getCanvas() { - return this._canvas - } - _containerDimensions() { - let h = 0, - e = 0; - return this._container && (h = this._container.clientWidth || 400, e = this._container.clientHeight || 300), [h, e] - } - _setupContainer() { - const h = this._container; - h.classList.add("maplibregl-map"); - const e = this._canvasContainer = X.create("div", "maplibregl-canvas-container", h); - this._interactive && e.classList.add("maplibregl-interactive"), this._canvas = X.create("canvas", "maplibregl-canvas", e), 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 n = this._containerDimensions(), - s = this._getClampedPixelRatio(n[0], n[1]); - this._resizeCanvas(n[0], n[1], s); - const u = this._controlContainer = X.create("div", "maplibregl-control-container", h), - d = this._controlPositions = {}; - ["top-left", "top-right", "bottom-left", "bottom-right"].forEach((m => { - d[m] = X.create("div", `maplibregl-ctrl-${m} `, u) - })), this._container.addEventListener("scroll", this._onMapScroll, !1) - } - _resizeCanvas(h, e, n) { - this._canvas.width = Math.floor(n * h), this._canvas.height = Math.floor(n * e), this._canvas.style.width = `${h}px`, this._canvas.style.height = `${e}px` - } - _setupPainter() { - const h = Object.assign(Object.assign({}, this._canvasContextAttributes), { - alpha: !0, - depth: !0, - stencil: !0, - premultipliedAlpha: !0 - }); - let e = null; - this._canvas.addEventListener("webglcontextcreationerror", (s => { - e = { - requestedAttributes: h - }, s && (e.statusMessage = s.statusMessage, e.type = s.type) - }), { - once: !0 - }); - let n = null; - if (n = this._canvasContextAttributes.contextType ? this._canvas.getContext(this._canvasContextAttributes.contextType, h) : this._canvas.getContext("webgl2", h) || this._canvas.getContext("webgl", h), !n) { - const s = "Failed to initialize WebGL"; - throw e ? (e.message = s, new Error(JSON.stringify(e))) : new Error(s) - } - this.painter = new jh(n, this.transform), Se.testSupport(n) - } - migrateProjection(h, e) { - super.migrateProjection(h, e), this.painter.transform = h, this.fire(new o.l("projectiontransition", { - newProjection: this.style.projection.name - })) - } - loaded() { - return !this._styleDirty && !this._sourcesDirty && !!this.style && this.style.loaded() - } - _update(h) { - return this.style && this.style._loaded ? (this._styleDirty = this._styleDirty || h, this._sourcesDirty = !0, this.triggerRepaint(), this) : this - } - _requestRenderFrame(h) { - return this._update(), this._renderTaskQueue.add(h) - } - _cancelRenderFrame(h) { - this._renderTaskQueue.remove(h) - } - _render(h) { - var e, n, s, u, d; - const m = this._idleTriggered ? this._fadeDuration : 0, - y = ((e = this.style.projection) === null || e === void 0 ? void 0 : e.transitionState) > 0; - if (this.painter.context.setDirty(), this.painter.setBaseState(), this._renderTaskQueue.run(h), this._removed) return; - let w = !1; - if (this.style && this._styleDirty) { - this._styleDirty = !1; - const D = this.transform.zoom, - z = ye.now(); - this.style.zoomHistory.update(D, z); - const B = new o.F(D, { - now: z, - fadeDuration: m, - zoomHistory: this.style.zoomHistory, - transition: this.style.getTransition(), - globalState: this.style.getGlobalState() - }), - U = B.crossFadingFactor(); - U === 1 && U === this._crossFadingFactor || (w = !0, this._crossFadingFactor = U), this.style.update(B) - } - const P = ((n = this.style.projection) === null || n === void 0 ? void 0 : n.transitionState) > 0 !== y; - (s = this.style.projection) === null || s === void 0 || s.setErrorQueryLatitudeDegrees(this.transform.center.lat), this.transform.setTransitionState((u = this.style.projection) === null || u === void 0 ? void 0 : u.transitionState, (d = this.style.projection) === null || d === void 0 ? void 0 : d.latitudeErrorCorrectionRadians), this.style && (this._sourcesDirty || P) && (this._sourcesDirty = !1, this.style._updateSources(this.transform)), this.terrain ? (this.terrain.sourceCache.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._centerClampedToGround && this.transform.setElevation(0)), this._placementDirty = this.style && this.style._updatePlacement(this.transform, this.showCollisionBoxes, m, this._crossSourceCollisions, P), this.painter.render(this.style, { - showTileBoundaries: this.showTileBoundaries, - showOverdrawInspector: this._showOverdrawInspector, - rotating: this.isRotating(), - zooming: this.isZooming(), - moving: this.isMoving(), - fadeDuration: m, - showPadding: this.showPadding - }), this.fire(new o.l("render")), this.loaded() && !this._loaded && (this._loaded = !0, o.cw.mark(o.cx.load), this.fire(new o.l("load"))), this.style && (this.style.hasTransitions() || w) && (this._styleDirty = !0), this.style && !this._placementDirty && this.style._releaseSymbolFadeTiles(); - const M = this._sourcesDirty || this._styleDirty || this._placementDirty; - return M || this._repaint ? this.triggerRepaint() : !this.isMoving() && this.loaded() && this.fire(new o.l("idle")), !this._loaded || this._fullyLoaded || M || (this._fullyLoaded = !0, o.cw.mark(o.cx.fullLoad)), this - } - redraw() { - return this.style && (this._frameRequest && (this._frameRequest.abort(), this._frameRequest = null), this._render(0)), this - } - remove() { - var h; - this._hash && this._hash.remove(); - for (const n of this._controls) n.onRemove(this); - this._controls = [], this._frameRequest && (this._frameRequest.abort(), this._frameRequest = null), this._renderTaskQueue.clear(), this.painter.destroy(), this.handlers.destroy(), delete this.handlers, this.setStyle(null), typeof window < "u" && removeEventListener("online", this._onWindowOnline, !1), Ne.removeThrottleControl(this._imageQueueHandle), (h = this._resizeObserver) === null || h === void 0 || h.disconnect(); - const e = this.painter.context.gl.getExtension("WEBGL_lose_context"); - e != null && e.loseContext && e.loseContext(), this._canvas.removeEventListener("webglcontextrestored", this._contextRestored, !1), this._canvas.removeEventListener("webglcontextlost", this._contextLost, !1), X.remove(this._canvasContainer), X.remove(this._controlContainer), this._container.removeEventListener("scroll", this._onMapScroll, !1), this._container.classList.remove("maplibregl-map"), o.cw.clearMetrics(), this._removed = !0, this.fire(new o.l("remove")) - } - triggerRepaint() { - this.style && !this._frameRequest && (this._frameRequest = new AbortController, ye.frame(this._frameRequest, (h => { - o.cw.frame(h), this._frameRequest = null; - try { - this._render(h) - } catch (e) { - if (!o.cy(e) && !(function(n) { - return n.message === To - })(e)) throw e - } - }), (() => {}))) - } - get showTileBoundaries() { - return !!this._showTileBoundaries - } - set showTileBoundaries(h) { - this._showTileBoundaries !== h && (this._showTileBoundaries = h, this._update()) - } - get showPadding() { - return !!this._showPadding - } - set showPadding(h) { - this._showPadding !== h && (this._showPadding = h, this._update()) - } - get showCollisionBoxes() { - return !!this._showCollisionBoxes - } - set showCollisionBoxes(h) { - this._showCollisionBoxes !== h && (this._showCollisionBoxes = h, h ? this.style._generateCollisionBoxes() : this._update()) - } - get showOverdrawInspector() { - return !!this._showOverdrawInspector - } - set showOverdrawInspector(h) { - this._showOverdrawInspector !== h && (this._showOverdrawInspector = h, this._update()) - } - get repaint() { - return !!this._repaint - } - set repaint(h) { - this._repaint !== h && (this._repaint = h, this.triggerRepaint()) - } - get vertices() { - return !!this._vertices - } - set vertices(h) { - this._vertices = h, this._update() - } - get version() { - return rd - } - getCameraTargetElevation() { - return this.transform.elevation - } - getProjection() { - return this.style.getProjection() - } - setProjection(h) { - return this._lazyInitEmptyStyle(), this.style.setProjection(h), this._update(!0) - } - }, T.MapMouseEvent = Wn, T.MapTouchEvent = qs, T.MapWheelEvent = qc, T.Marker = Xs, T.NavigationControl = class { - constructor(h) { - this._updateZoomButtons = () => { - const e = this._map.getZoom(), - n = e === this._map.getMaxZoom(), - s = e === this._map.getMinZoom(); - this._zoomInButton.disabled = n, this._zoomOutButton.disabled = s, this._zoomInButton.setAttribute("aria-disabled", n.toString()), this._zoomOutButton.setAttribute("aria-disabled", s.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 = (e, n) => { - const s = this._map._getUIString(`NavigationControl.${n}`); - e.title = s, e.setAttribute("aria-label", s) - }, this.options = o.e({}, bp, h), this._container = X.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._container.addEventListener("contextmenu", (e => e.preventDefault())), this.options.showZoom && (this._zoomInButton = this._createButton("maplibregl-ctrl-zoom-in", (e => this._map.zoomIn({}, { - originalEvent: e - }))), X.create("span", "maplibregl-ctrl-icon", this._zoomInButton).setAttribute("aria-hidden", "true"), this._zoomOutButton = this._createButton("maplibregl-ctrl-zoom-out", (e => this._map.zoomOut({}, { - originalEvent: e - }))), X.create("span", "maplibregl-ctrl-icon", this._zoomOutButton).setAttribute("aria-hidden", "true")), this.options.showCompass && (this._compass = this._createButton("maplibregl-ctrl-compass", (e => { - this.options.visualizePitch ? this._map.resetNorthPitch({}, { - originalEvent: e - }) : this._map.resetNorth({}, { - originalEvent: e - }) - })), this._compassIcon = X.create("span", "maplibregl-ctrl-icon", this._compass), this._compassIcon.setAttribute("aria-hidden", "true")) - } - onAdd(h) { - return this._map = h, 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 Lo(this._map, this._compass, this.options.visualizePitch)), this._container - } - onRemove() { - X.remove(this._container), 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(h, e) { - const n = X.create("button", h, this._container); - return n.type = "button", n.addEventListener("click", e), n - } - }, T.Popup = class extends o.E { - constructor(h) { - 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 && X.remove(this._content), this._container && (X.remove(this._container), 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("mousemove", this._onMouseMove), this._map.off("mouseup", this._onMouseUp), this._map.off("drag", this._onDrag), this._map._canvasContainer.classList.remove("maplibregl-track-pointer"), delete this._map, this.fire(new o.l("close"))), this), this._onMouseUp = e => { - this._update(e.point) - }, this._onMouseMove = e => { - this._update(e.point) - }, this._onDrag = e => { - this._update(e.point) - }, this._update = e => { - if (!this._map || !this._lngLat && !this._trackPointer || !this._content) return; - if (!this._container) { - if (this._container = X.create("div", "maplibregl-popup", this._map.getContainer()), this._tip = X.create("div", "maplibregl-popup-tip", this._container), this._container.appendChild(this._content), this.options.className) - for (const m of this.options.className.split(" ")) this._container.classList.add(m); - this._closeButton && this._closeButton.setAttribute("aria-label", this._map._getUIString("Popup.Close")), this._trackPointer && this._container.classList.add("maplibregl-popup-track-pointer") - } - if (this.options.maxWidth && this._container.style.maxWidth !== this.options.maxWidth && (this._container.style.maxWidth = this.options.maxWidth), this._lngLat = Hi(this._lngLat, this._flatPos, this._map.transform, this._trackPointer), this._trackPointer && !e) return; - const n = this._flatPos = this._pos = this._trackPointer && e ? e : this._map.project(this._lngLat); - this._map.terrain && (this._flatPos = this._trackPointer && e ? e : this._map.transform.locationToScreenPoint(this._lngLat)); - let s = this.options.anchor; - const u = Al(this.options.offset); - if (!s) { - const m = this._container.offsetWidth, - y = this._container.offsetHeight; - let w; - w = n.y + u.bottom.y < y ? ["top"] : n.y > this._map.transform.height - y ? ["bottom"] : [], n.x < m / 2 ? w.push("left") : n.x > this._map.transform.width - m / 2 && w.push("right"), s = w.length === 0 ? "bottom" : w.join("-") - } - let d = n.add(u[s]); - this.options.subpixelPositioning || (d = d.round()), X.setTransform(this._container, `${Il[s]} translate(${d.x}px,${d.y}px)`), Ws(this._container, s, "popup"), this._updateOpacity() - }, this._onClose = () => { - this.remove() - }, this.options = o.e(Object.create(Jc), h) - } - addTo(h) { - return this._map && this.remove(), this._map = h, 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._update(), this._focusFirstElement(), this._trackPointer ? (this._map.on("mousemove", this._onMouseMove), this._map.on("mouseup", this._onMouseUp), 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 o.l("open")), this - } - isOpen() { - return !!this._map - } - getLngLat() { - return this._lngLat - } - setLngLat(h) { - return this._lngLat = o.S.convert(h), this._pos = null, this._flatPos = null, this._trackPointer = !1, this._update(), this._map && (this._map.on("move", this._update), this._map.off("mousemove", this._onMouseMove), 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._onMouseMove), this._map.on("drag", this._onDrag), this._container && this._container.classList.add("maplibregl-popup-track-pointer"), this._map._canvasContainer.classList.add("maplibregl-track-pointer")), this - } - getElement() { - return this._container - } - setText(h) { - return this.setDOMContent(document.createTextNode(h)) - } - setHTML(h) { - const e = document.createDocumentFragment(), - n = document.createElement("body"); - let s; - for (n.innerHTML = h; s = n.firstChild, s;) e.appendChild(s); - return this.setDOMContent(e) - } - getMaxWidth() { - var h; - return (h = this._container) === null || h === void 0 ? void 0 : h.style.maxWidth - } - setMaxWidth(h) { - return this.options.maxWidth = h, this._update(), this - } - setDOMContent(h) { - if (this._content) - for (; this._content.hasChildNodes();) this._content.firstChild && this._content.removeChild(this._content.firstChild); - else this._content = X.create("div", "maplibregl-popup-content", this._container); - return this._content.appendChild(h), this._createCloseButton(), this._update(), this._focusFirstElement(), this - } - addClassName(h) { - return this._container && this._container.classList.add(h), this - } - removeClassName(h) { - return this._container && this._container.classList.remove(h), this - } - setOffset(h) { - return this.options.offset = h, this._update(), this - } - toggleClassName(h) { - if (this._container) return this._container.classList.toggle(h) - } - setSubpixelPositioning(h) { - this.options.subpixelPositioning = h - } - _createCloseButton() { - this.options.closeButton && (this._closeButton = X.create("button", "maplibregl-popup-close-button", this._content), this._closeButton.type = "button", this._closeButton.innerHTML = "×", this._closeButton.addEventListener("click", this._onClose)) - } - _focusFirstElement() { - if (!this.options.focusAfterOpen || !this._container) return; - const h = this._container.querySelector(Qc); - h && h.focus() - } - }, T.RasterDEMTileSource = nr, T.RasterTileSource = Yt, T.ScaleControl = class { - constructor(h) { - this._onMove = () => { - Ml(this._map, this._container, this.options) - }, this.setUnit = e => { - this.options.unit = e, Ml(this._map, this._container, this.options) - }, this.options = Object.assign(Object.assign({}, Do), h) - } - getDefaultPosition() { - return "bottom-left" - } - onAdd(h) { - return this._map = h, this._container = X.create("div", "maplibregl-ctrl maplibregl-ctrl-scale", h.getContainer()), this._map.on("move", this._onMove), this._onMove(), this._container - } - onRemove() { - X.remove(this._container), this._map.off("move", this._onMove), this._map = void 0 - } - }, T.ScrollZoomHandler = Xh, T.Style = gc, T.TerrainControl = class { - constructor(h) { - 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 = h - } - onAdd(h) { - return this._map = h, this._container = X.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._terrainButton = X.create("button", "maplibregl-ctrl-terrain", this._container), X.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() { - X.remove(this._container), this._map.off("terrain", this._updateTerrainIcon), this._map = void 0 - } - }, T.TwoFingersTouchPitchHandler = bl, T.TwoFingersTouchRotateHandler = Gs, T.TwoFingersTouchZoomHandler = xl, T.TwoFingersTouchZoomRotateHandler = Jh, T.VectorTileSource = Xt, T.VideoSource = dr, T.addSourceType = (h, e) => o._(void 0, void 0, void 0, (function*() { - if (jr(h)) throw new Error(`A source type called "${h}" already exists.`); - ((n, s) => { - Ir[n] = s - })(h, e) - })), T.clearPrewarmedResources = function() { - const h = We; - h && (h.isPreloaded() && h.numActive() === 1 ? (h.release(Pe), We = 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()")) - }, T.createTileMesh = mc, T.getMaxParallelImageRequests = function() { - return o.a.MAX_PARALLEL_IMAGE_REQUESTS - }, T.getRTLTextPluginStatus = function() { - return kr().getRTLTextPluginStatus() - }, T.getVersion = function() { - return eu - }, T.getWorkerCount = function() { - return Me.workerCount - }, T.getWorkerUrl = function() { - return o.a.WORKER_URL - }, T.importScriptInWorkers = function(h) { - return tt().broadcast("IS", h) - }, T.prewarm = function() { - _t().acquire(Pe) - }, T.setMaxParallelImageRequests = function(h) { - o.a.MAX_PARALLEL_IMAGE_REQUESTS = h - }, T.setRTLTextPlugin = function(h, e) { - return kr().setRTLTextPlugin(h, e) - }, T.setWorkerCount = function(h) { - Me.workerCount = h - }, T.setWorkerUrl = function(h) { - o.a.WORKER_URL = h - } - })); - var F = _; - return F - })) - })(Pd)), Pd.exports -} -var DP = LP(); -const bd = nm(DP); -class fg { - constructor(l) { - lr(this, "gm"); - lr(this, "markers", new Map); - lr(this, "canvases", new Map); - lr(this, "canvasSize"); - lr(this, "canvasOpacity", .8); - this.input = l, this.gm = new hc(this.input.tileSize); - const _ = rv(l.img); - this.canvasSize = Math.ceil(2e3 / _) - } - place([l, _]) { - const C = this.gm.latLonToPixelsFloor(l, _, this.input.zoom), - L = this.getMarkerId(C), - F = this.gm.latLonToPixelBoundsLatLon(l, _, this.input.zoom), - T = this.input.map; - if (this.input.markerFn && !this.markers.has(L)) { - const pe = this.input.markerFn(); - pe.setLngLat({ - lat: F.min[0], - lng: (F.max[1] + F.min[1]) / 2 - }).addTo(T), this.markers.set(L, pe) - } - const { - key: o, - pos: $, - innerPos: W - } = this.getCanvasPos(C); - let ie = this.canvases.get(o); - if (!ie) { - const pe = this.canvasSize, - ye = $.x * pe, - X = $.y * pe, - Se = ye + pe - 1, - we = X + pe - 1, - Re = this.gm.pixelsToLatLon(ye, we + 1, this.input.zoom), - Ae = this.gm.pixelsToLatLon(Se + 1, X, this.input.zoom); - ie = new RP({ - id: `${this.input.id}-${o}`, - img: this.input.img, - canvasSize: this.canvasSize, - coordinates: rm({ - min: Re, - max: Ae - }), - layerPaint: { - "raster-resampling": "nearest", - "raster-opacity": this.canvasOpacity - } - }), ie.addTo(this.input.map), this.canvases.set(o, ie) - } - ie.place(W.x, W.y) - } - clear() { - const l = this.input.map; - for (const _ of this.canvases.values()) _.removeFrom(l), _.removeDOM(); - this.canvases.clear(); - for (const _ of this.markers.values()) _.remove(); - this.markers.clear() - } - clearAndPlace(l) { - this.clear(), this.place(l) - } - remove([l, _]) { - let C = !1; - const L = this.gm.latLonToPixelsFloor(l, _, this.input.zoom), - { - key: F, - innerPos: T - } = this.getCanvasPos(L), - o = this.canvases.get(F); - o && (C = o.remove(T.x, T.y), o.annotationsCount() === 0 && (this.canvases.delete(F), o.removeFrom(this.input.map), o.removeDOM())); - const $ = this.getMarkerId(L), - W = this.markers.get($); - return W == null || W.remove(), this.markers.delete($), C - } - setCanvasOpacity(l) { - this.canvasOpacity = l; - for (const _ of this.canvases.values()) _.setOpacity(l) - } - getMarkerId([l, _]) { - return `${this.input.id}:${l},${_}` - } - getCanvasPos([l, _]) { - const C = { - x: Math.floor(l / this.canvasSize), - y: Math.floor(_ / this.canvasSize) - }, - L = { - x: l % this.canvasSize, - y: _ % this.canvasSize - }, - F = `${C.x},${C.y}`; - return { - pos: C, - innerPos: L, - key: F - } - } -} -class RP { - constructor(l) { - lr(this, "annotations", new Set); - lr(this, "canvas"); - lr(this, "imgSize"); - lr(this, "maps", new Set); - this.input = l, this.imgSize = rv(l.img), this.canvas = document.createElement("canvas"), this.canvas.width = this.input.canvasSize * this.imgSize, this.canvas.height = this.input.canvasSize * this.imgSize - } - place(l, _) { - const C = this.getPixelKey(l, _); - if (this.annotations.has(C)) return !1; - const L = this.canvas.getContext("2d"); - if (L) { - const F = l * this.imgSize, - T = _ * this.imgSize; - L.drawImage(this.input.img, F, T) - } - return this.annotations.add(C), !0 - } - remove(l, _) { - const C = this.getPixelKey(l, _); - if (!this.annotations.has(C)) return !1; - const L = this.canvas.getContext("2d"); - if (L) { - const F = l * this.imgSize, - T = _ * this.imgSize; - L.clearRect(F, T, this.imgSize, this.imgSize) - } - return this.annotations.delete(C), !0 - } - addTo(l) { - const _ = this.input.id; - l.getSource(_) || l.addSource(_, { - type: "canvas", - canvas: this.canvas, - coordinates: this.input.coordinates - }), l.getLayer(_) || l.addLayer({ - id: _, - type: "raster", - source: _, - paint: this.input.layerPaint - }), this.maps.add(l) - } - removeFrom(l) { - const { - id: _ - } = this.input; - l.getLayer(_) && l.removeLayer(_), l.getSource(_) && l.removeSource(_), this.maps.delete(l) - } - removeDOM() { - this.canvas.remove() - } - annotationsCount() { - return this.annotations.size - } - setOpacity(l) { - for (const _ of this.maps.values()) _.setPaintProperty(this.input.id, "raster-opacity", l) - } - getPixelKey(l, _) { - return `${l},${_}` - } -} - -function rv(b) { - return Math.max(b.naturalWidth, b.naturalHeight) -} - -function BP() { - return window.matchMedia("(display-mode: standalone)").matches || "standalone" in window.navigator && window.navigator.standalone === !0 -} - -function Cu(b, l) { - return l.includes(b) -} - -function FP(b) { - const l = { - opaque: !0 - }, - _ = b.searchParams.get("lat"), - C = b.searchParams.get("lng"); - _ && C && (l.pos = { - lat: parseFloat(_), - lng: parseFloat(C) - }); - const L = b.searchParams.get("zoom"); - L && (l.zoom = parseFloat(L)); - const F = b.searchParams.get("season"); - F && (l.season = parseInt(F)); - const T = b.searchParams.get("opaque"); - return T && (l.opaque = T !== "0"), b.searchParams.get("select") && (l.select = !0), l.newUser = !!b.searchParams.get("new-user"), l.alliance = !!b.searchParams.get("alliance"), l -} - -function OP(b, l) { - return b = new URL(b), l.pos !== void 0 && (b.searchParams.set("lat", l.pos.lat.toString()), b.searchParams.set("lng", l.pos.lng.toString())), l.zoom !== void 0 && b.searchParams.set("zoom", l.zoom.toString()), l.season !== void 0 && b.searchParams.set("season", l.season.toString()), l.opaque !== void 0 && b.searchParams.set("opaque", l.opaque ? "1" : "0"), l.newUser !== void 0 && b.searchParams.set("new-user", l.newUser ? "1" : "0"), l.alliance !== void 0 && b.searchParams.set("alliance", l.alliance ? "1" : "0"), l.select && b.searchParams.set("alliance", "1"), b -} -const Id = zn({ - shouldReload: !0 -}); -var NP = Ie(' '), - jP = Ie(' '), - qP = Ie('
              '); - -function iv(b, l) { - Sr(l, !0); - let _ = Et(l, "value", 15), - C = Et(l, "validate", 15), - L = Qt(l, ["$$slots", "$$events", "$$legacy", "label", "placeholder", "value", "max", "min", "validate"]), - F = nt(""); - const T = lt(() => { - var Ae; - return ((Ae = _()) == null ? void 0 : Ae.length) ?? 0 - }); - C(o); - - function o() { - return l.min !== void 0 && x(T) < l.min ? (oe(F, l.min === 1 ? _P() : yP({ - min: l.min - }), !0), !1) : l.max !== void 0 && x(T) > l.max ? (oe(F, wP({ - max: l.max - }), !0), !1) : !0 - } - Zr(() => { - var Ae; - l.max !== void 0 && x(T) > l.max && _((Ae = _()) == null ? void 0 : Ae.substring(0, l.max)) - }); - var $ = qP(), - W = k($); - { - var ie = Ae => { - var Oe = NP(), - Ee = k(Oe, !0); - A(Oe), Ge(() => fe(Ee, l.label)), H(Ae, Oe) - }; - Ue(W, Ae => { - l.label && Ae(ie) - }) - } - var pe = V(W, 2); - Oy(pe), er(pe, Ae => ({ - ...L, - class: `textarea w-full ${l.class??""}`, - placeholder: l.placeholder, - [Uy]: Ae - }), [() => ({ - "textarea-error": !!x(F) - })]); - var ye = V(pe, 2), - X = k(ye), - Se = k(X, !0); - A(X); - var we = V(X, 2); - { - var Re = Ae => { - var Oe = jP(), - Ee = k(Oe, !0); - A(Oe), Ge(() => fe(Ee, l.max - x(T))), H(Ae, Oe) - }; - Ue(we, Ae => { - l.max !== void 0 && Ae(Re) - }) - } - A(ye), A($), Ge(() => fe(Se, x(F))), jd(pe, _), H(b, $), Pr() -} -var VP = (b, l) => { - var _; - (_ = l()) == null || _.close() - }, - UP = Ie(' '); - -function ZP(b, l) { - Sr(l, !0); - let _ = Et(l, "ref", 15), - C = nt(!1), - L = nt(zn(l.description)), - F = nt(void 0); - Ii(() => { - const Oe = Ee => { - var Ne; - Ee.key === "Escape" && ((Ne = _()) == null || Ne.close()) - }; - return document.addEventListener("keydown", Oe), () => document.removeEventListener("keydown", Oe) - }); - var T = UP(), - o = k(T), - $ = k(o), - W = k($, !0); - A($); - var ie = V($, 2), - pe = k(ie), - ye = k(pe); - { - let Oe = lt(() => Hg()); - iv(ye, { - class: "h-24 rounded-lg", - get placeholder() { - return x(Oe) - }, - max: 512, - get value() { - return x(L) - }, - set value(Ee) { - oe(L, Ee, !0) - }, - get validate() { - return x(F) - }, - set validate(Ee) { - oe(F, Ee, !0) - } - }) - } - A(pe); - var X = V(pe, 2), - Se = k(X); - Se.__click = [VP, _]; - var we = k(Se, !0); - A(Se); - var Re = V(Se, 2), - Ae = k(Re, !0); - A(Re), A(X), A(ie), A(o), fi(2), A(T), ps(T, Oe => _(Oe), () => _()), Ge((Oe, Ee, Ne) => { - fe(W, Oe), Se.disabled = x(C), fe(we, Ee), Re.disabled = x(C), fe(Ae, Ne) - }, [() => Zy(), () => qd(), () => ET()]), an("submit", ie, async () => { - var Oe, Ee, Ne; - try { - if (!((Oe = x(F)) != null && Oe())) return; - oe(C, !0), l.description !== x(L) && await ni.updateAllianceDescription(x(L)), await ((Ee = l.onsuccess) == null ? void 0 : Ee.call(l, x(L))), (Ne = _()) == null || Ne.close() - } catch (ft) { - qr.error(ft.message) - } finally { - oe(C, !1) - } - }), H(b, T), Pr() -} -Wi(["click"]); -var $P = (b, l, _) => { - navigator.clipboard.writeText(x(l).toString()), oe(_, !0), setTimeout(() => { - oe(_, !1) - }, 1e3) - }, - GP = Ie(''), - HP = Ie(' '); - -function WP(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15), - C = nt(""), - L = nt(!1); - const F = lt(() => La.url.origin + `/join?id=${x(C)}`); - Zr(() => { - _() && ni.getAllianceInvites().then(ht => { - oe(C, ht[0], !0) - }).catch(ht => { - qr.error(ht.message) - }) - }), Ii(() => { - const ht = Xe => { - Xe.key === "Escape" && _(!1) - }; - return document.addEventListener("keydown", ht), () => document.removeEventListener("keydown", ht) - }); - var T = HP(), - o = k(T), - $ = V(k(o), 2), - W = k($, !0); - A($); - var ie = V($, 2), - pe = k(ie, !0); - A(ie); - var ye = V(ie, 2), - X = k(ye); - let Se; - var we = k(X); - ea(we); - var Re = V(we, 2), - Ae = k(Re); - let Oe; - Ae.__click = [$P, F, L]; - var Ee = k(Ae, !0); - A(Ae), A(Re), A(X); - var Ne = V(X, 2); - { - var ft = ht => { - var Xe = GP(); - H(ht, Xe) - }; - Ue(Ne, ht => { - x(C) || ht(ft) - }) - } - A(ye), A(o), fi(2), A(T), On(T, () => ht => { - Zr(() => { - _() ? ht.show() : ht.close() - }) - }), Ge((ht, Xe, ct, Je, Be, st) => { - fe(W, ht), fe(pe, Xe), Se = Or(X, 1, "border-base-content/20 rounded-field relative flex w-full items-center gap-1 border-2 py-1.5 pl-4 pr-2.5", null, Se, ct), Jl(we, Je), Oe = Or(Ae, 1, "btn btn-primary", null, Oe, Be), fe(Ee, st) - }, [() => S5(), () => M5(), () => ({ - invisible: !x(C) - }), () => x(F).toString(), () => ({ - "btn-success": x(L) - }), () => x(L) ? Gg() : bf()]), an("close", T, () => _(!1)), H(b, T), Pr() -} -Wi(["click"]); -var XP = Tr(''); - -function am(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = XP(); - er(C, () => ({ - viewBox: "0 0 256 199", - width: "256", - height: "199", - xmlns: "http://www.w3.org/2000/svg", - preserveAspectRatio: "xMidYMid", - ..._ - })), H(b, C) -} -var KP = async (b, l) => { - await navigator.clipboard.writeText(l.username), qr.info(V3()) -}, YP = Ie(''); - -function ph(b, l) { - Sr(l, !0); - var _ = YP(), - C = k(_); - C.__click = [KP, l]; - var L = k(C); - am(L, { - class: "size-4 opacity-70" - }), A(C), A(_), Ge(() => zr(_, "data-tip", `Discord: ${l.username}`)), H(b, _), Pr() -} -Wi(["click"]); -var JP = Ie(''), - QP = Ie('
              '); - -function sm(b, l) { - Sr(l, !0); - const _ = []; - let C = Et(l, "value", 15, "today"), - L = [{ - value: "today", - label: Wd() - }, { - value: "week", - label: Z5() - }, { - value: "month", - label: H5() - }, { - value: "all-time", - label: K5() - }]; - var F = QP(); - nn(F, 21, () => L, T => T.value, (T, o) => { - var $ = JP(); - ea($); - var W; - Ge(() => { - zr($, "aria-label", x(o).label), W !== (W = x(o).value) && ($.value = ($.__value = x(o).value) ?? "") - }), Vd(_, [], $, () => (x(o).value, C()), C), H(T, $) - }), A(F), H(b, F), Pr() -} -const eI = typeof window < "u" ? window : void 0; - -function tI(b) { - let l = b.activeElement; - for (; l != null && l.shadowRoot;) { - const _ = l.shadowRoot.activeElement; - if (_ === l) break; - l = _ - } - return l -} -var rc, zu, Ig; -let rI = (Ig = class { - constructor(l = {}) { - br(this, rc); - br(this, zu); - const { - window: _ = eI, - document: C = _ == null ? void 0 : _.document - } = l; - _ !== void 0 && (Jn(this, rc, C), Jn(this, zu, zg(L => { - const F = Su(_, "focusin", L), - T = Su(_, "focusout", L); - return () => { - F(), T() - } - }))) - } - get current() { - var l; - return (l = et(this, zu)) == null || l.call(this), et(this, rc) ? tI(et(this, rc)) : null - } -}, rc = new WeakMap, zu = new WeakMap, Ig); -new rI; - -function iI(b, l) { - switch (b) { - case "post": - Zr(l); - break; - case "pre": - Hf(l); - break - } -} - -function nv(b, l, _, C = {}) { - const { - lazy: L = !1 - } = C; - let F = !L, - T = Array.isArray(b) ? [] : void 0; - iI(l, () => { - const o = Array.isArray(b) ? b.map(W => W()) : b(); - if (!F) { - F = !0, T = o; - return - } - const $ = Go(() => _(o, T)); - return T = o, $ - }) -} - -function dc(b, l, _) { - nv(b, "post", l, _) -} - -function nI(b, l, _) { - nv(b, "pre", l, _) -} -dc.pre = nI; -var aI = Ie(''), - sI = Ie('
              '), - oI = Ie(' '), - lI = (b, l, _) => { - l.onlastpixelclick({ - lat: x(_).lastLatitude ?? 0, - lng: x(_).lastLongitude ?? 0 - }) - }, - cI = Ie(""), - uI = Ie('
              '), - hI = Ie('
              '), - dI = Ie('
              '); - -function pI(b, l) { - Sr(l, !0); - let _ = Et(l, "reload", 15), - C = nt(!0), - L = nt([]), - F = nt(0), - T = nt("today"), - o = {}; - _($); - - function $() { - const we = x(T); - ni.allianceLeaderboard(we).then(Re => { - oe(L, Re), o = { - [we]: Re - }, oe(C, !1) - }).catch(Re => { - qr.error(Re.message) - }) - } - dc(() => [x(T)], () => { - const we = x(T), - Re = o[we]; - if (Re) { - oe(L, Re), oe(C, !1); - return - } - oe(C, !0), ni.allianceLeaderboard(we).then(Ae => { - oe(L, Ae), o[we] = Ae, oe(C, !1) - }).catch(Ae => { - qr.error(Ae.message) - }) - }); - var W = dI(), - ie = k(W); - sm(ie, { - get value() { - return x(T) - }, - set value(we) { - oe(T, we, !0) - } - }); - var pe = V(ie, 2), - ye = k(pe); - { - var X = we => { - var Re = aI(); - H(we, Re) - }, - Se = we => { - var Re = Jt(), - Ae = zt(Re); - { - var Oe = Ne => { - var ft = sI(), - ht = k(ft), - Xe = V(ht); - { - var ct = Be => { - var st = Fn(); - Ge(it => fe(st, it), [() => Wd().toLowerCase()]), H(Be, st) - }, - Je = Be => { - var st = Jt(), - it = zt(st); - { - var Qe = vt => { - var Q = Fn(); - Ge(te => fe(Q, te), [() => Qf()]), H(vt, Q) - }, - ke = vt => { - var Q = Jt(), - te = zt(Q); - { - var _e = ne => { - var Pe = Fn(); - Ge(Me => fe(Pe, Me), [() => em()]), H(ne, Pe) - }; - Ue(te, ne => { - x(T) === "month" && ne(_e) - }, !0) - } - H(vt, Q) - }; - Ue(it, vt => { - x(T) === "week" ? vt(Qe) : vt(ke, !1) - }, !0) - } - H(Be, st) - }; - Ue(Xe, Be => { - x(T) === "today" ? Be(ct) : Be(Je, !1) - }) - } - A(ft), Ge(Be => fe(ht, `${Be??""} `), [() => Jf()]), H(Ne, ft) - }, - Ee = Ne => { - var ft = hI(), - ht = k(ft), - Xe = k(ht), - ct = V(k(Xe)), - Je = k(ct, !0); - A(ct); - var Be = V(ct), - st = k(Be, !0); - A(Be), A(Xe), A(ht); - var it = V(ht); - nn(it, 31, () => x(L), Qe => Qe.userId, (Qe, ke, vt) => { - const Q = lt(() => { - var Yt; - return ((Yt = Dt.data) == null ? void 0 : Yt.id) === x(ke).userId - }); - var te = uI(); - let _e; - var ne = k(te), - Pe = k(ne, !0); - A(ne); - var Me = V(ne), - at = k(Me), - We = k(at); - es(We, { - class: "size-10 border", - get userId() { - return x(ke).userId - }, - get pictureUrl() { - return x(ke).picture - } - }); - var Ct = V(We, 2), - _t = k(Ct), - xt = V(_t), - tt = k(xt); - A(xt), A(Ct); - var pt = V(Ct, 2); - { - var It = Yt => { - const nr = lt(() => ds(x(ke).equippedFlag)); - var ar = oI(), - Ft = k(ar, !0); - A(ar), Ge(() => { - zr(ar, "data-tip", x(nr).name), fe(Ft, x(nr).flag) - }), H(Yt, ar) - }; - Ue(pt, Yt => { - x(ke).equippedFlag && Yt(It) - }) - } - var ut = V(pt, 2); - { - var bt = Yt => { - ph(Yt, { - get username() { - return x(ke).discord - } - }) - }; - Ue(ut, Yt => { - x(ke).discord && Yt(bt) - }) - } - A(at), A(Me); - var wt = V(Me), - dt = k(wt), - Lt = V(dt); - { - var Xt = Yt => { - var nr = cI(); - let ar; - nr.__click = [lI, l, ke]; - var Ft = k(nr); - Wf(Ft, { - class: "size-4" - }), A(nr), Ge((dr, _r) => { - ar = Or(nr, 1, "btn btn-sm btn-ghost absolute -right-2 top-1/2 !-translate-y-1/2 sm:right-4", null, ar, dr), zr(nr, "data-tip", _r) - }, [() => ({ - tooltip: x(F) > 640 - }), () => aT()]), H(Yt, nr) - }; - Ue(Lt, Yt => { - x(ke).lastLatitude && x(ke).lastLongitude && Yt(Xt) - }) - } - A(wt), A(te), Ge((Yt, nr, ar) => { - var Ft; - _e = Or(te, 1, "", null, _e, Yt), fe(Pe, x(vt) + 1), Or(Ct, 1, `font-semibold ${nr??""} flex gap-1`), fe(_t, `${(x(Q)?((Ft=Dt.data)==null?void 0:Ft.name)??x(ke).name:x(ke).name)??""} `), fe(tt, `#${x(ke).userId??""}`), fe(dt, `${ar??""} `) - }, [() => ({ - "bg-base-200": x(Q) - }), () => Zn(x(ke).userId), () => x(ke).pixelsPainted.toLocaleString("en-US")]), Zo(te, () => $o, () => ({ - duration: 200 - })), H(Qe, te) - }), A(it), A(ft), Ge((Qe, ke) => { - fe(Je, Qe), fe(st, ke) - }, [() => tm(), () => Xf()]), H(Ne, ft) - }; - Ue(Ae, Ne => { - x(L).length === 0 ? Ne(Oe) : Ne(Ee, !1) - }, !0) - } - H(we, Re) - }; - Ue(ye, we => { - x(C) ? we(X) : we(Se, !1) - }) - } - A(pe), A(W), $d("innerWidth", we => oe(F, we, !0)), H(b, W), Pr() -} -Wi(["click"]); -var fI = Tr(''); - -function om(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = fI(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var mI = (b, l) => l.onclickback(), - _I = Ie('
              ADMIN
              '), - gI = async (b, l) => { - try { - x(l).loading = !0, await ni.giveAllianceAdmin(x(l).id), x(l).role = "admin" - } catch { - qr.error(dC()) - } finally { - x(l).loading = !1 - } - }, vI = async (b, l, _) => { - try { - x(l).loading = !0, await ni.banAllianceUser(x(l).id), _.data = _.data.filter(C => C.id !== x(l).id) - } catch { - qr.error(DT()) - } finally { - x(l).loading = !1 - } - }, yI = Ie('
            1. ', 1), xI = Ie('
            2. '), bI = Ie('
              '), wI = Ie('
              '), TI = (b, l, _) => { - ni.unbanAllianceUser(x(l).id).then(() => { - _.data = _.data.filter(C => C.id !== x(l).id) - }).catch(C => qr.error(C.message)).finally(() => { - x(l).loading = !1 - }) - }, CI = Ie('
              '), SI = Ie('
              '), PI = Ie('
              '), II = Ie('

              '); - -function MI(b, l) { - Sr(l, !0); - let _ = zn({ - data: [], - page: 0, - hasNextPage: !0, - loading: !1 - }), - C = zn({ - data: [], - page: 0, - hasNextPage: !0, - loading: !1 - }); - var L = II(), - F = k(L), - T = k(F); - T.__click = [mI, l]; - var o = k(T); - gx(o, { - class: "size-5" - }), A(T); - var $ = V(T, 2), - W = k($, !0); - A($), A(F); - var ie = V(F, 2), - pe = k(ie); - ea(pe); - var ye = V(pe, 2), - X = k(ye), - Se = k(X); - nn(Se, 21, () => _.data, Je => Je.id, (Je, Be, st) => { - const it = lt(() => { - var It; - return ((It = Dt.data) == null ? void 0 : It.id) === x(Be).id - }); - var Qe = bI(), - ke = k(Qe), - vt = k(ke), - Q = k(vt); - es(Q, { - class: "size-10 border", - get userId() { - return x(Be).id - }, - get pictureUrl() { - return x(Be).picture - } - }); - var te = V(Q, 2), - _e = k(te); - A(te); - var ne = V(te, 2); - { - var Pe = It => { - var ut = _I(); - H(It, ut) - }; - Ue(ne, It => { - x(Be).role === "admin" && It(Pe) - }) - } - A(vt), A(ke); - var Me = V(ke), - at = k(Me), - We = k(at), - Ct = k(We); - om(Ct, { - class: "size-4" - }), A(We); - var _t = V(We, 2), - xt = k(_t); - { - var tt = It => { - var ut = yI(), - bt = zt(ut), - wt = k(bt); - wt.__click = [gI, Be]; - var dt = k(wt, !0); - A(wt), A(bt); - var Lt = V(bt, 2), - Xt = k(Lt); - Xt.__click = [vI, Be, _]; - var Yt = k(Xt, !0); - A(Xt), A(Lt), Ge((nr, ar) => { - wt.disabled = x(Be).loading, fe(dt, nr), Xt.disabled = x(Be).loading, fe(Yt, ar) - }, [() => gT(), () => Wg()]), H(It, ut) - }, - pt = It => { - var ut = xI(), - bt = k(ut); - bt.disabled = !0; - var wt = k(bt, !0); - A(bt), A(ut), Ge(dt => fe(wt, dt), [() => wT()]), H(It, ut) - }; - Ue(xt, It => { - x(Be).role === "member" ? It(tt) : It(pt, !1) - }) - } - A(_t), A(at), A(Me), A(Qe), Ge(It => { - var ut; - Or(te, 1, `font-semibold ${It??""}`), fe(_e, `${(x(it)?((ut=Dt.data)==null?void 0:ut.name)??x(Be).name:x(Be).name)??""} #${x(Be).id??""}`) - }, [() => Zn(x(Be).id)]), H(Je, Qe) - }), A(Se), A(X); - var we = V(X, 2); - { - var Re = Je => { - var Be = Jt(), - st = zt(Be); - Pu(st, () => _.page, it => { - var Qe = wI(); - On(Qe, () => ke => { - const vt = new IntersectionObserver(Q => { - Q[0].isIntersecting && !_.loading && (_.loading = !0, ni.getAllianceMembers(_.page).then(te => { - _.data = [..._.data, ...te.data], _.hasNextPage = te.hasNext, _.page++ - }).catch(te => { - qr.error(te.message) - }).finally(() => { - _.loading = !1 - })) - }); - return vt.observe(ke), () => { - vt.disconnect() - } - }), H(it, Qe) - }), H(Je, Be) - }; - Ue(we, Je => { - _.hasNextPage && Je(Re) - }) - } - A(ye); - var Ae = V(ye, 2), - Oe = V(Ae, 2), - Ee = k(Oe), - Ne = k(Ee); - nn(Ne, 21, () => C.data, Je => Je.id, (Je, Be, st) => { - var it = CI(), - Qe = k(it), - ke = k(Qe), - vt = k(ke); - es(vt, { - class: "size-10 border", - get userId() { - return x(Be).id - }, - get pictureUrl() { - return x(Be).picture - } - }); - var Q = V(vt, 2), - te = k(Q); - A(Q), A(ke), A(Qe); - var _e = V(Qe), - ne = k(_e); - ne.__click = [TI, Be, C]; - var Pe = k(ne, !0); - A(ne), A(_e), A(it), Ge((Me, at) => { - Or(Q, 1, `font-semibold ${Me??""}`), fe(te, `${x(Be).name??""} #${x(Be).id??""}`), ne.disabled = x(Be).loading, fe(Pe, at) - }, [() => Zn(x(Be).id), () => ST()]), H(Je, it) - }), A(Ne), A(Ee); - var ft = V(Ee, 2); - { - var ht = Je => { - var Be = SI(), - st = k(Be, !0); - A(Be), Ge(it => fe(st, it), [() => MT()]), H(Je, Be) - }; - Ue(ft, Je => { - !C.hasNextPage && C.data.length === 0 && Je(ht) - }) - } - var Xe = V(ft, 2); - { - var ct = Je => { - var Be = Jt(), - st = zt(Be); - Pu(st, () => C.page, it => { - var Qe = PI(); - On(Qe, () => ke => { - const vt = new IntersectionObserver(Q => { - Q[0].isIntersecting && !C.loading && (C.loading = !0, ni.getAllianceBannedMembers(C.page).then(te => { - C.data = [...C.data, ...te.data], C.hasNextPage = te.hasNext, C.page++ - }).catch(te => { - qr.error(te.message) - }).finally(() => { - C.loading = !1 - })) - }); - return vt.observe(ke), () => { - vt.disconnect() - } - }), H(it, Qe) - }), H(Je, Be) - }; - Ue(Xe, Je => { - C.hasNextPage && Je(ct) - }) - } - A(Oe), A(ie), A(L), Ge((Je, Be, st) => { - fe(W, Je), zr(pe, "aria-label", Be), zr(Ae, "aria-label", st) - }, [() => $g(), () => FT(), () => jT()]), H(b, L), Pr() -} -Wi(["click"]); -var AI = Ie(' '), - kI = Ie(''), - EI = Ie('

              '), - zI = Ie('
              '); - -function Tf(b, l) { - Sr(l, !0); - let _ = Et(l, "value", 15), - C = Et(l, "validate", 15), - L = nt(""); - const F = lt(() => { - var Ae; - return ((Ae = _()) == null ? void 0 : Ae.length) ?? 0 - }); - C(T); - - function T() { - return l.min !== void 0 && x(F) < l.min ? (oe(L, x(F) === 0 ? "Required" : `Min. characters: ${l.min}`, !0), !1) : l.max !== void 0 && x(F) > l.max ? (oe(L, `Max. characters: ${l.max}`), !1) : !0 - } - Zr(() => { - var Ae; - l.max !== void 0 && x(F) > l.max && _((Ae = _()) == null ? void 0 : Ae.substring(0, l.max)) - }); - var o = zI(), - $ = k(o); - let W; - var ie = k($); - { - var pe = Ae => { - var Oe = AI(), - Ee = k(Oe, !0); - A(Oe), Ge(() => fe(Ee, l.label)), H(Ae, Oe) - }; - Ue(ie, Ae => { - l.label && Ae(pe) - }) - } - var ye = V(ie, 2); - ea(ye); - var X = V(ye, 2); - { - var Se = Ae => { - var Oe = kI(), - Ee = k(Oe, !0); - A(Oe), Ge(() => fe(Ee, l.max - x(F))), H(Ae, Oe) - }; - Ue(X, Ae => { - l.max !== void 0 && Ae(Se) - }) - } - A($); - var we = V($, 2); - { - var Re = Ae => { - var Oe = EI(), - Ee = k(Oe, !0); - A(Oe), Ge(() => fe(Ee, x(L))), H(Ae, Oe) - }; - Ue(we, Ae => { - x(L) && Ae(Re) - }) - } - A(o), Ge(Ae => { - W = Or($, 1, "input w-full", null, W, Ae), zr(ye, "placeholder", l.placeholder), zr(ye, "maxlength", l.max) - }, [() => ({ - "input-error": !!x(L) - })]), jd(ye, _), H(b, o), Pr() -} -var LI = (b, l) => { - var _; - (_ = l()) == null || _.close() - }, - DI = Ie(' '); - -function RI(b, l) { - Sr(l, !0); - let _ = Et(l, "ref", 15), - C = nt(!1), - L = nt(""), - F = nt(void 0); - Ii(() => { - const Oe = Ee => { - var Ne; - Ee.key === "Escape" && ((Ne = _()) == null || Ne.close()) - }; - return document.addEventListener("keydown", Oe), () => document.removeEventListener("keydown", Oe) - }); - var T = DI(), - o = k(T), - $ = k(o), - W = k($, !0); - A($); - var ie = V($, 2), - pe = k(ie), - ye = k(pe); - { - let Oe = lt(() => xf()), - Ee = lt(() => hT()); - Tf(ye, { - get label() { - return x(Oe) - }, - get placeholder() { - return x(Ee) - }, - min: 1, - max: 16, - get value() { - return x(L) - }, - set value(Ne) { - oe(L, Ne, !0) - }, - get validate() { - return x(F) - }, - set validate(Ne) { - oe(F, Ne, !0) - } - }) - } - A(pe); - var X = V(pe, 2), - Se = k(X); - Se.__click = [LI, _]; - var we = k(Se, !0); - A(Se); - var Re = V(Se, 2), - Ae = k(Re, !0); - A(Re), A(X), A(ie), A(o), fi(2), A(T), ps(T, Oe => _(Oe), () => _()), Ge((Oe, Ee, Ne) => { - fe(W, Oe), Se.disabled = x(C), fe(we, Ee), Re.disabled = x(C), fe(Ae, Ne) - }, [() => lT(), () => qd(), () => fT()]), an("submit", ie, async () => { - var Oe, Ee; - try { - if (!((Oe = x(F)) != null && Oe())) return; - oe(C, !0); - const { - id: Ne - } = await ni.createAlliance(x(L)); - await l.onsuccess(Ne), (Ee = _()) == null || Ee.close() - } catch (Ne) { - qr.error(Ne.message) - } finally { - oe(C, !1) - } - }), H(b, T), Pr() -} -Wi(["click"]); -var BI = Tr(''); - -function fh(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = BI(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var FI = Tr(''), - OI = Tr(''); - -function Cf(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy", "filled"]); - var C = Jt(), - L = zt(C); - { - var F = o => { - var $ = FI(); - er($, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(o, $) - }, - T = o => { - var $ = OI(); - er($, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(o, $) - }; - Ue(L, o => { - l.filled ? o(F) : o(T, !1) - }) - } - H(b, C) -} -var NI = Tr(''); - -function jI(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = NI(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var qI = Tr(''); - -function VI(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = qI(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var UI = Tr(''); - -function ZI(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = UI(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var $I = Tr(''); - -function Xd(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = $I(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} - -function GI(b, l = "_blank") { - return b.replaceAll(/https?:\/\/[^\s]+/g, _ => `${_}`) -} -var HI = Ie('
              '), - WI = async (b, l, _, C) => { - try { - oe(l, !0), await ni.leaveAlliance(), oe(_, !0), await C() - } catch (L) { - qr.error(L.message) - } finally { - oe(l, !1) - } - }, XI = (b, l) => { - oe(l, !0) - }, KI = Ie('
              '), YI = (b, l) => { - var _; - (_ = x(l)) == null || _.show() - }, JI = Ie(''), QI = Ie(''), eM = Ie(' '), tM = (b, l) => oe(l, !0), rM = Ie(''), iM = (b, l, _) => { - var C; - (C = x(l)) != null && C.hq ? _.onhqclick({ - lat: x(l).hq.latitude, - lng: x(l).hq.longitude - }) : _.onhqchange() - }, nM = Ie(' '), aM = Ie(' '), sM = Ie(''), oM = Ie('
              '), lM = Ie('

              ', 1), cM = (b, l) => { - var _; - (_ = x(l)) == null || _.show() - }, uM = Ie('
              ', 1), hM = Ie('
              '); - -function dM(b, l) { - Sr(l, !0); - let _ = nt(void 0), - C = nt(!0), - L = nt(void 0), - F = nt(!1), - T = nt(void 0), - o = nt(!1), - $ = nt(!1), - W = nt(() => {}); - dc(() => l.open, () => { - l.open && Id.shouldReload && ie() - }), Ii(() => { - const we = setInterval(() => { - Id.shouldReload = !0 - }, 1e4); - return () => { - clearTimeout(we) - } - }); - async function ie() { - try { - oe(_, await ni.getAlliance(), !0), x(_) && x(W)(), oe(C, !1), Id.shouldReload = !1 - } catch (we) { - qr.error(we.message) - } - } - var pe = hM(), - ye = k(pe); - { - var X = we => { - var Re = HI(); - H(we, Re) - }, - Se = we => { - var Re = Jt(), - Ae = zt(Re); - { - var Oe = Ne => { - MI(Ne, { - onclickback: () => oe($, !1) - }) - }, - Ee = Ne => { - var ft = Jt(), - ht = zt(ft); - { - var Xe = Je => { - var Be = lM(), - st = zt(Be), - it = k(st), - Qe = k(it, !0); - A(it); - var ke = V(it, 2), - vt = k(ke), - Q = k(vt), - te = k(Q); - om(te, { - class: "size-4" - }), A(Q); - var _e = V(Q, 2), - ne = k(_e), - Pe = k(ne); - Pe.__click = [WI, F, C, ie]; - var Me = k(Pe, !0); - A(Pe), A(ne), A(_e), A(vt); - var at = V(vt, 2); - { - var We = ce => { - var O = KI(), - q = k(O); - q.__click = [XI, o]; - var G = k(q); - ZI(G, { - class: "size-4" - }), A(q), A(O), Ge(K => zr(O, "data-tip", K), [() => F5()]), H(ce, O) - }; - Ue(at, ce => { - x(_).role == "admin" && ce(We) - }) - } - A(ke), A(st); - var Ct = V(st, 2); - { - var _t = ce => { - var O = QI(), - q = k(O); - cx(q, () => GI(x(_).description || Hg())); - var G = V(q, 2); - { - var K = le => { - var ve = JI(); - ve.__click = [YI, T]; - var Le = k(ve); - Cf(Le, { - class: "size-4" - }), A(ve), H(le, ve) - }; - Ue(G, le => { - x(_).role === "admin" && le(K) - }) - } - A(O), H(ce, O) - }; - Ue(Ct, ce => { - (x(_).description || x(_).role === "admin") && ce(_t) - }) - } - var xt = V(Ct, 2), - tt = k(xt), - pt = k(tt); - fh(pt, { - class: "inline size-4" - }); - var It = V(pt, 2), - ut = k(It), - bt = V(ut), - wt = k(bt, !0); - A(bt), A(It), A(tt); - var dt = V(tt, 2), - Lt = k(dt); - Xd(Lt, { - class: "inline size-4" - }); - var Xt = V(Lt, 2), - Yt = k(Xt), - nr = V(Yt); - { - var ar = ce => { - var O = eM(), - q = k(O, !0); - A(O), Ge(G => fe(q, G), [() => x(_).members.toLocaleString("en-US")]), H(ce, O) - }, - Ft = ce => { - var O = rM(); - O.__click = [tM, $]; - var q = k(O, !0); - A(O), Ge(G => fe(q, G), [() => x(_).members.toLocaleString("en-US")]), H(ce, O) - }; - Ue(nr, ce => { - x(_).role === "member" ? ce(ar) : ce(Ft, !1) - }) - } - A(Xt), A(dt); - var dr = V(dt, 2); - { - var _r = ce => { - var O = oM(), - q = k(O); - jI(q, { - class: "inline size-4" - }); - var G = V(q, 2), - K = k(G), - le = V(K); - le.__click = [iM, _, l]; - var ve = k(le); - { - var Le = Ye => { - var Ot = nM(), - xe = k(Ot); - A(Ot), Ge((At, Pt) => fe(xe, `${At??""}, ${Pt??""}`), [() => x(_).hq.latitude.toFixed(3), () => x(_).hq.longitude.toFixed(3)]), H(Ye, Ot) - }, - Ce = Ye => { - var Ot = aM(), - xe = k(Ot, !0); - A(Ot), Ge(At => fe(xe, At), [() => u5()]), H(Ye, Ot) - }; - Ue(ve, Ye => { - x(_).hq ? Ye(Le) : Ye(Ce, !1) - }) - } - A(le), A(G); - var Ze = V(G, 2); - { - var ot = Ye => { - var Ot = sM(); - Ot.__click = function(...At) { - var Pt; - (Pt = l.onhqchange) == null || Pt.apply(this, At) - }; - var xe = k(Ot); - Cf(xe, { - class: "text-base-content/50 size-4" - }), A(Ot), H(Ye, Ot) - }; - Ue(Ze, Ye => { - x(_).role === "admin" && Ye(ot) - }) - } - A(O), Ge(Ye => fe(K, `${Ye??""}: `), [() => o5()]), H(ce, O) - }; - Ue(dr, ce => { - (x(_).hq || x(_).role === "admin") && ce(_r) - }) - } - A(xt); - var Ir = V(xt, 2), - jr = k(Ir), - ur = k(jr, !0); - A(jr); - var Mr = V(jr, 2), - Ar = k(Mr); - pI(Ar, { - get allianceId() { - return x(_).id - }, - get onlastpixelclick() { - return l.onlastpixelclick - }, - get reload() { - return x(W) - }, - set reload(ce) { - oe(W, ce, !0) - } - }), A(Mr), A(Ir); - var kr = V(Ir, 2); - ZP(kr, { - get description() { - return x(_).description - }, - onsuccess: async ce => { - x(_) && (x(_).description = ce) - }, - get ref() { - return x(T) - }, - set ref(ce) { - oe(T, ce, !0) - } - }); - var Nr = V(kr, 2); - WP(Nr, { - get open() { - return x(o) - }, - set open(ce) { - oe(o, ce, !0) - } - }), Ge((ce, O, q, G, K) => { - fe(Qe, x(_).name), Pe.disabled = x(F), fe(Me, ce), fe(ut, `${O??""}: `), fe(wt, q), fe(Yt, `${G??""}: `), fe(ur, K) - }, [() => r5(), () => Xf(), () => x(_).pixelsPainted.toLocaleString("en-US"), () => $g(), () => Yf()]), H(Je, Be) - }, - ct = Je => { - var Be = uM(), - st = zt(Be), - it = k(st), - Qe = k(it); - A(it); - var ke = V(it, 2), - vt = k(ke); - VI(vt, { - class: "size-5" - }); - var Q = V(vt, 1, !0); - A(ke); - var te = V(ke, 2), - _e = k(te), - ne = k(_e, !0); - A(_e), A(te); - var Pe = V(te, 2); - Pe.__click = [cM, L]; - var Me = k(Pe); - Dg(Me, { - class: "size-6" - }); - var at = V(Me); - A(Pe), A(st); - var We = V(st, 2); - RI(We, { - onsuccess: ie, - get ref() { - return x(L) - }, - set ref(Ct) { - oe(L, Ct, !0) - } - }), Ge((Ct, _t, xt, tt) => { - fe(Qe, `${Ct??""}:`), fe(Q, _t), fe(ne, xt), fe(at, ` ${tt??""}`) - }, [() => p5(), () => _5(), () => y5(), () => w5()]), H(Je, Be) - }; - Ue(ht, Je => { - x(_) ? Je(Xe) : Je(ct, !1) - }, !0) - } - H(Ne, ft) - }; - Ue(Ae, Ne => { - x($) ? Ne(Oe) : Ne(Ee, !1) - }, !0) - } - H(we, Re) - }; - Ue(ye, we => { - x(C) ? we(X) : we(Se, !1) - }) - } - A(pe), H(b, pe), Pr() -} -Wi(["click"]); -var pM = Tr(''); - -function Kd(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = pM(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -const fM = b => b; - -function mM(b) { - const l = b - 1; - return l * l * l + 1 -} - -function Qn(b, { - delay: l = 0, - duration: _ = 400, - easing: C = fM -} = {}) { - const L = +getComputedStyle(b).opacity; - return { - delay: l, - duration: _, - easing: C, - css: F => `opacity: ${F*L}` - } -} - -function uf(b, { - delay: l = 0, - duration: _ = 400, - easing: C = mM, - axis: L = "y" -} = {}) { - const F = getComputedStyle(b), - T = +F.opacity, - o = L === "y" ? "height" : "width", - $ = parseFloat(F[o]), - W = L === "y" ? ["top", "bottom"] : ["left", "right"], - ie = W.map(Ae => `${Ae[0].toUpperCase()}${Ae.slice(1)}`), - pe = parseFloat(F[`padding${ie[0]}`]), - ye = parseFloat(F[`padding${ie[1]}`]), - X = parseFloat(F[`margin${ie[0]}`]), - Se = parseFloat(F[`margin${ie[1]}`]), - we = parseFloat(F[`border${ie[0]}Width`]), - Re = parseFloat(F[`border${ie[1]}Width`]); - return { - delay: l, - duration: _, - easing: C, - css: Ae => `overflow: hidden;opacity: ${Math.min(Ae*20,1)*T};${o}: ${Ae*$}px;padding-${W[0]}: ${Ae*pe}px;padding-${W[1]}: ${Ae*ye}px;margin-${W[0]}: ${Ae*X}px;margin-${W[1]}: ${Ae*Se}px;border-${W[0]}-width: ${Ae*we}px;border-${W[1]}-width: ${Ae*Re}px;min-${o}: 0` - } -} -var _M = Ie(' '); - -function gM(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15); - Ii(() => { - const pe = ye => { - ye.key === "Escape" && _(!1) - }; - return document.addEventListener("keydown", pe), () => document.removeEventListener("keydown", pe) - }); - var C = _M(), - L = k(C), - F = V(k(L), 2), - T = k(F); - Kd(T, { - class: "size-5 max-sm:size-6" - }); - var o = V(T, 2), - $ = k(o, !0); - A(o), A(F); - var W = V(F, 2), - ie = k(W); - dM(ie, { - get open() { - return _() - }, - get onhqchange() { - return l.onhqchange - }, - get onhqclick() { - return l.onhqclick - }, - get onlastpixelclick() { - return l.onlastpixelclick - } - }), A(W), A(L), fi(2), A(C), On(C, () => pe => { - Zr(() => { - _() ? (pe.show(), La.url.searchParams.get("alliance") && (La.url.searchParams.delete("alliance"), Lg(La.url.toString()))) : pe.close() - }) - }), Ge(pe => fe($, pe), [() => Gd()]), an("close", C, () => _(!1)), En(2, W, () => Qn, () => ({ - duration: 300 - })), H(b, C), Pr() -} -var vM = Ie(''), - yM = (b, l) => { - l(!1) - }, - xM = Ie(' '); - -function bM(b, l) { - Sr(l, !0); - const _ = []; - let C = Et(l, "open", 15), - L = nt(!1), - F = nt(""), - T = nt(""), - o = nt(null), - $ = nt(null); - const W = [{ - value: "inappropriate-content", - label: Wy(), - description: Hy() - }, { - value: "hate-speech", - label: Ky(), - description: Xy() - }, { - value: "doxxing", - label: Jy(), - description: Yy() - }, { - value: "bot", - label: ex(), - description: Qy() - }, { - value: "griefing", - label: rx(), - description: tx() - }, { - value: "other", - label: ES(), - description: DS() - }]; - Ii(() => { - const _t = xt => { - xt.key === "Escape" && C(!1) - }; - return document.addEventListener("keydown", _t), () => document.removeEventListener("keydown", _t) - }), Zr(() => { - C() || (oe(F, ""), oe(T, "")) - }); - const ie = { - "report-user": `${Cd}/report-user`, - timeout: `${Cd}/moderator/timeout-user`, - ban: `${Cd}/admin/ban-user` - }; - var pe = xM(), - ye = k(pe), - X = V(k(ye), 2), - Se = k(X); - ea(Se); - var we = V(Se, 2); - ea(we); - var Re = V(we, 2); - ea(Re); - var Ae = V(Re, 2); - ea(Ae); - var Oe = V(Ae, 2), - Ee = k(Oe); - es(Ee, { - get userId() { - return l.paintedBy.id - }, - get pictureUrl() { - return l.paintedBy.picture - }, - class: "size-14" - }); - var Ne = V(Ee, 2), - ft = k(Ne), - ht = k(ft); - { - var Xe = _t => { - var xt = Fn(); - Ge(tt => fe(xt, tt), [() => Yg()]), H(_t, xt) - }, - ct = _t => { - var xt = Jt(), - tt = zt(xt); - { - var pt = ut => { - var bt = Fn(); - Ge(wt => fe(bt, wt), [() => Qg()]), H(ut, bt) - }, - It = ut => { - var bt = Jt(), - wt = zt(bt); - { - var dt = Lt => { - var Xt = Fn(); - Ge(Yt => fe(Xt, Yt), [() => Jg()]), H(Lt, Xt) - }; - Ue(wt, Lt => { - l.action === "ban" && Lt(dt) - }, !0) - } - H(ut, bt) - }; - Ue(tt, ut => { - l.action === "timeout" ? ut(pt) : ut(It, !1) - }, !0) - } - H(_t, xt) - }; - Ue(ht, _t => { - l.action === "report-user" ? _t(Xe) : _t(ct, !1) - }) - } - A(ft); - var Je = V(ft, 2), - Be = k(Je), - st = k(Be, !0); - A(Be); - var it = V(Be, 2), - Qe = k(it); - A(it), A(Je), A(Ne), A(Oe); - var ke = V(Oe, 2), - vt = k(ke), - Q = k(vt); - A(vt); - var te = V(vt, 2); - nn(te, 21, () => W, _t => _t.value, (_t, xt) => { - var tt = vM(), - pt = k(tt); - ea(pt); - var It, ut = V(pt, 2), - bt = k(ut), - wt = k(bt, !0); - A(bt); - var dt = V(bt, 2), - Lt = k(dt, !0); - A(dt), A(ut), A(tt), Ge(() => { - zr(pt, "aria-label", x(xt).label), It !== (It = x(xt).value) && (pt.value = (pt.__value = x(xt).value) ?? ""), fe(wt, x(xt).label), fe(Lt, x(xt).description) - }), Vd(_, [], pt, () => (x(xt).value, x(F)), Xt => oe(F, Xt)), H(_t, tt) - }), A(te), A(ke); - var _e = V(ke, 2), - ne = k(_e); - { - let _t = lt(() => FS()); - iv(ne, { - class: "h-20 rounded-lg", - name: "notes", - get placeholder() { - return x(_t) - }, - max: 2056, - min: 5, - get value() { - return x(T) - }, - set value(xt) { - oe(T, xt, !0) - }, - get validate() { - return x($) - }, - set validate(xt) { - oe($, xt, !0) - } - }) - } - A(_e); - var Pe = V(_e, 2), - Me = k(Pe); - Me.__click = [yM, C]; - var at = k(Me, !0); - A(Me); - var We = V(Me, 2), - Ct = k(We, !0); - A(We), A(Pe), A(X), ps(X, _t => oe(o, _t), () => x(o)), A(ye), fi(2), A(pe), On(pe, () => _t => { - Zr(() => { - C() ? _t.show() : _t.close() - }) - }), Ge((_t, xt, tt, pt) => { - zr(X, "action", ie[l.action]), Jl(Se, l.paintedBy.id), Jl(we, l.latLon[0]), Jl(Re, l.latLon[1]), Jl(Ae, l.zoom), Or(Je, 1, `font-medium ${_t??""} flex gap-1.5`), fe(st, l.paintedBy.name), fe(Qe, `#${l.paintedBy.id??""}`), fe(Q, `${xt??""}:`), fe(at, tt), We.disabled = x(L), fe(Ct, pt) - }, [() => Zn(l.paintedBy.id), () => MS(), () => qd(), () => jS()]), an("close", pe, () => C(!1)), an("submit", X, async _t => { - if (_t.preventDefault(), !x(L) && x($)()) try { - oe(L, !0); - const xt = new FormData(x(o)); - if (!xt.get("reason")) { - qr.error(GS()); - return - } - const tt = await l.image; - xt.append("image", tt, `report-${Date.now()}.jpeg`); - const pt = await fetch(x(o).action, { - method: "POST", - body: xt, - credentials: "include" - }); - pt.status === 200 || pt.status === 409 ? (qr.info(US()), C(!1)) : qr.error(XS()) - } finally { - oe(L, !1) - } - }), H(b, pe), Pr() -} -Wi(["click"]); - -function wM(b, l, _) { - return new Promise((C, L) => { - b.once("render", () => { - const F = b.getCanvas().toDataURL(), - T = document.createElement("img"); - T.src = F, T.onload = () => { - const o = document.createElement("canvas"); - o.width = T.width, o.height = T.height; - const $ = o.getContext("2d"); - if ($) { - $.drawImage(T, 0, 0); - const [W, ie, pe, ye] = $.getImageData(l, _, 1, 1).data; - C([W, ie, pe, ye]) - } else L(new Error("Could not get 2d context from canvas")); - T.remove(), o.remove() - } - }), b.triggerRepaint() - }) -} - -function av(b, l) { - return new Promise((_, C) => { - b.once("render", () => { - const L = b.getCanvas(); - let F = L; - if (l != null && l.maxWidth || l != null && l.maxHeight) { - const T = L.width, - o = L.height, - $ = (l == null ? void 0 : l.maxWidth) ?? T, - W = (l == null ? void 0 : l.maxHeight) ?? o; - F = document.createElement("canvas"); - const ie = Math.min($ / T, W / o); - F.width = Math.floor(T * ie), F.height = Math.floor(o * ie); - const pe = F.getContext("2d"); - pe && pe.drawImage(L, 0, 0, F.width, F.height) - } - try { - F.toBlob(T => { - T && _(T) - }, (l == null ? void 0 : l.type) ?? "image/png", (l == null ? void 0 : l.quality) ?? 1) - } catch (T) { - C(T) - } finally { - F !== L && F.remove() - } - }) - }) -} -var TM = Tr(''); - -function sv(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = TM(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var CM = Tr(''); - -function SM(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = CM(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - height: "24px", - viewBox: "0 -960 960 960", - width: "24px", - fill: "currentColor", - ..._ - })), H(b, C) -} -var PM = Tr(''); - -function ov(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = PM(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -const Yl = { - hour: 3600 * 1e3, - min: 60 * 1e3, - sec: 1e3 -}; - -function zd(b) { - const l = Math.floor(b / Yl.hour); - b -= l * Yl.hour; - const _ = Math.floor(b / Yl.min); - b -= _ * Yl.min; - const L = Math.floor(b / Yl.sec).toString().padStart(2, "0"); - return l > 0 ? `${l}:${_.toString().padStart(2,"0")}:${L}` : `${_}:${L}` -} - -function IM(b) { - const l = new Date, - _ = l.getFullYear(), - C = String(l.getMonth() + 1).padStart(2, "0"), - L = String(l.getDate()).padStart(2, "0"), - F = String(l.getHours()).padStart(2, "0"), - T = String(l.getMinutes()).padStart(2, "0"), - o = String(l.getSeconds()).padStart(2, "0"); - return `${_}-${C}-${L} ${F}:${T}:${o}` -} -var MM = (b, l, _) => { - navigator.clipboard.writeText(l.url.toString()), oe(_, !0), setTimeout(() => { - oe(_, !1) - }, 1e3) - }, - AM = Ie('Screenshot'), - kM = Ie('
              '), - EM = async (b, l) => { - x(l) && (await navigator.clipboard.write([new ClipboardItem({ - "image/png": x(l) - })]), qr.info(sS())) - }, zM = Ie(''), LM = Ie(' '); - -function DM(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15), - C = nt(!1); - Ii(() => { - const Ee = Ne => { - Ne.key === "Escape" && _(!1) - }; - return document.addEventListener("keydown", Ee), () => document.removeEventListener("keydown", Ee) - }); - let L = nt(null), - F = nt(""); - Zr(() => { - _() ? (l.hideHover(), setTimeout(async () => { - av(l.map).then(Ee => { - oe(L, Ee, !0), oe(F, URL.createObjectURL(x(L)), !0) - }).finally(() => { - l.showHover() - }) - }, 500)) : x(F) && (URL.revokeObjectURL(x(F)), oe(L, null), oe(F, "")) - }); - var T = LM(), - o = k(T), - $ = V(k(o), 2), - W = k($); - ov(W, { - class: "size-5" - }); - var ie = V(W); - A($); - var pe = V($, 2), - ye = k(pe); - ea(ye); - var X = V(ye, 2), - Se = k(X); - let we; - Se.__click = [MM, l, C]; - var Re = k(Se, !0); - A(Se), A(X), A(pe); - var Ae = V(pe, 2); - { - var Oe = Ee => { - const Ne = lt(() => { - var ne; - return (ne = l.map) == null ? void 0 : ne.getCanvas() - }); - var ft = zM(), - ht = k(ft), - Xe = k(ht); - SM(Xe, { - class: "inline size-5" - }); - var ct = V(Xe); - A(ht); - var Je = V(ht, 2); - { - var Be = ne => { - var Pe = AM(); - Ge(() => { - zr(Pe, "src", x(F)), zr(Pe, "width", x(Ne).width), zr(Pe, "height", x(Ne).height) - }), H(ne, Pe) - }, - st = ne => { - var Pe = kM(); - Ge(() => uc(Pe, `aspect-ratio: ${x(Ne).width/x(Ne).height}`)), H(ne, Pe) - }; - Ue(Je, ne => { - x(F) ? ne(Be) : ne(st, !1) - }) - } - var it = V(Je, 2), - Qe = k(it); - Qe.__click = [EM, L]; - var ke = k(Qe); - $y(ke, { - class: "size-5" - }); - var vt = V(ke); - A(Qe); - var Q = V(Qe, 2), - te = k(Q); - sv(te, { - class: "size-5" - }); - var _e = V(te); - A(Q), A(it), A(ft), Ge((ne, Pe, Me, at) => { - fe(ct, ` ${ne??""}`), fe(vt, ` ${Pe??""}`), zr(Q, "href", x(F)), zr(Q, "download", `wplace_${Me??""}.png`), fe(_e, ` ${at??""}`) - }, [() => eS(), () => bf(), () => IM().replaceAll(" ", "_").replaceAll(":", "-"), () => iS()]), En(2, ft, () => Qn, () => ({ - duration: 300 - })), H(Ee, ft) - }; - Ue(Ae, Ee => { - _() && Ee(Oe) - }) - } - A(o), fi(2), A(T), On(T, () => Ee => { - Zr(() => { - _() ? Ee.show() : Ee.close() - }) - }), Ge((Ee, Ne, ft, ht) => { - fe(ie, ` ${Ee??""}`), Jl(ye, Ne), we = Or(Se, 1, "btn btn-primary", null, we, ft), fe(Re, ht) - }, [() => I3(), () => l.url.toString(), () => ({ - "btn-success": x(C) - }), () => x(C) ? Gg() : bf()]), an("close", T, () => _(!1)), H(b, T), Pr() -} -Wi(["click"]); -var RM = Tr(''); - -function BM(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = RM(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var FM = Ie('
            3. '), - OM = Ie('

                '); - -function lm(b, l) { - Sr(l, !1); - const _ = ["📜 All users are responsible for the content they post. The platform reserves the right of final interpretation.", "🛑 Any violation may result in immediate removal of content and permanent ban of the account", "😈 Do not paint over other artworks using random colors or patterns just to mess things up", "🙅 Disclosing other's personal information is not allowed"]; - Og(); - var C = OM(), - L = k(C), - F = k(L); - BM(F, { - class: "size-5" - }); - var T = V(F, 2), - o = k(T), - $ = V(o), - W = k($, !0); - A($), A(T), A(L); - var ie = V(L, 2), - pe = k(ie); - nn(pe, 5, () => _, Zd, (Se, we) => { - var Re = FM(), - Ae = k(Re, !0); - A(Re), Ge(() => fe(Ae, x(we))), H(Se, Re) - }), A(pe); - var ye = V(pe, 2), - X = k(ye, !0); - A(ye), A(ie), A(C), Ge((Se, we, Re) => { - fe(o, `${Se??""} `), fe(W, we), fe(X, Re) - }, [() => I2(), () => k2(), () => ew()]), H(b, C), Pr() -} -var NM = (b, l) => { - l(!1) - }, - jM = Ie(' '); - -function qM(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15); - Ii(() => { - const W = ie => { - ie.key === "Escape" && _(!1) - }; - return document.addEventListener("keydown", W), () => document.removeEventListener("keydown", W) - }); - var C = jM(), - L = k(C), - F = V(k(L), 2), - T = V(k(F), 2), - o = k(T); - lm(o, {}), A(T); - var $ = V(T, 2); - $.__click = [NM, _], A(F), A(L), fi(2), A(C), On(C, () => W => { - Zr(() => { - _() ? W.show() : W.close() - }) - }), an("close", C, () => _(!1)), H(b, C), Pr() -} -Wi(["click"]); -var VM = () => { - La.url.searchParams.delete("new-user"), Lg(La.url.toString()) - }, - UM = Ie(''); - -function ZM(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15); - Ii(() => { - const we = Re => { - Re.key === "Escape" && _(!1) - }; - return document.addEventListener("keydown", we), () => document.removeEventListener("keydown", we) - }); - var C = UM(), - L = k(C), - F = k(L), - T = k(F), - o = k(T), - $ = k(o, !0); - A(o); - var W = V(o, 2); - Ng(W, { - hasText: !0, - size: "medium" - }), A(T), A(F); - var ie = V(F, 2), - pe = k(ie); - lm(pe, {}), A(ie); - var ye = V(ie, 2), - X = k(ye); - X.__click = [VM]; - var Se = k(X, !0); - A(X), A(ye), A(L), A(C), On(C, () => we => { - Zr(() => { - _() ? we.show() : we.close() - }) - }), Ge((we, Re) => { - fe($, we), fe(Se, Re) - }, [() => C2(), () => iw()]), an("close", C, () => _(!1)), H(b, C), Pr() -} -Wi(["click"]); - -function $M() { - const b = navigator.userAgent, - l = navigator.vendor; - return /Chrome/.test(b) && /Google Inc/.test(l) ? "Chrome" : /Safari/.test(b) && /Apple Computer/.test(l) ? "Safari" : /Firefox/.test(b) ? "Firefox" : /Edge/.test(b) ? "Edge" : /Opera|OPR/.test(b) ? "Opera" : "Unknown" -} -var GM = Tr(''); - -function HM(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = GM(); -} -var WM = Tr(''); - -function XM(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = WM(); -} -var KM = Tr(''); - -function Ld(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = KM(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var YM = Ie(' link', 1), - JM = Ie('chrome://settings/system.', 1), - QM = Ie('edge://settings/system/manageSystem.', 1), - e4 = Ie(' ', 1), - t4 = Ie(''), - r4 = Ie(' '); - -function i4(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15); - Ii(() => { - const pe = ye => { - ye.key === "Escape" && _(!1) - }; - return document.addEventListener("keydown", pe), () => document.removeEventListener("keydown", pe) - }); - const C = $M(); - var L = r4(), - F = k(L), - T = V(k(F), 2); - { - var o = pe => { - var ye = t4(), - X = k(ye), - Se = k(X); - Ng(Se, { - hasText: !0, - size: "medium" - }); - var we = V(Se, 2), - Re = k(we), - Ae = V(Re, 4); - fi(), A(we); - var Oe = V(we, 2), - Ee = k(Oe), - Ne = k(Ee), - ft = k(Ne, !0); - A(Ne); - var ht = V(Ne, 4), - Xe = k(ht); - am(Xe, { - class: "mr-0.5 inline size-4" - }), fi(2), A(ht); - var ct = V(ht, 4), - Je = k(ct); - HM(Je, { - class: "mr-0.5 inline size-4" - }), fi(2), A(ct); - var Be = V(ct, 4), - st = k(Be); - XM(st, { - class: "mr-0.5 inline size-4" - }), fi(2), A(Be), A(Ee), A(Oe), A(X); - var it = V(X, 2), - Qe = k(it), - ke = k(Qe, !0); - A(Qe); - var vt = V(Qe, 2); - A(it); - var Q = V(it, 2), - te = k(Q), - _e = k(te, !0); - A(te); - var ne = V(te, 2), - Pe = k(ne), - Me = V(Pe), - at = k(Me); - Ld(at, { - class: "size-5" - }), A(Me); - var We = V(Me); - A(ne); - var Ct = V(ne, 2), - _t = k(Ct), - xt = V(_t), - tt = k(xt, !0); - A(xt); - var pt = V(xt); - A(Ct), A(Q); - var It = V(Q, 2), - ut = k(It), - bt = k(ut, !0); - A(ut); - var wt = V(ut, 2), - dt = k(wt); - { - var Lt = jr => { - var ur = YM(), - Mr = zt(ur); - fi(), Ge(Ar => fe(Mr, `${Ar??""}: `), [() => bS()]), H(jr, ur) - }, - Xt = jr => { - var ur = e4(), - Mr = zt(ur), - Ar = V(Mr), - kr = k(Ar, !0); - A(Ar); - var Nr = V(Ar), - ce = V(Nr); - { - var O = G => { - var K = JM(); - fi(), H(G, K) - }, - q = G => { - var K = Jt(), - le = zt(K); - { - var ve = Le => { - var Ce = QM(); - fi(), H(Le, Ce) - }; - Ue(le, Le => { - C === "Edge" && Le(ve) - }, !0) - } - H(G, K) - }; - Ue(ce, G => { - C === "Chrome" ? G(O) : G(q, !1) - }) - } - Ge((G, K, le) => { - fe(Mr, `${G??""} `), fe(kr, K), fe(Nr, ` ${le??""} `) - }, [() => dS(), () => mS(), () => vS()]), H(jr, ur) - }; - Ue(dt, jr => { - C !== "Chrome" && C !== "Edge" ? jr(Lt) : jr(Xt, !1) - }) - } - A(wt), A(It); - var Yt = V(It, 2), - nr = k(Yt); - lm(nr, {}), A(Yt); - var ar = V(Yt, 4), - Ft = V(k(ar), 2), - dr = k(Ft, !0); - A(Ft); - var _r = V(Ft, 2), - Ir = k(_r, !0); - A(_r), A(ar), A(ye), Ge((jr, ur, Mr, Ar, kr, Nr, ce, O, q, G, K, le, ve) => { - fe(Re, `${jr??""} `), fe(Ae, ` © - ${ur??""} `), fe(ft, Mr), fe(ke, Ar), zr(vt, "src", oa.language === "pt" ? "https://www.youtube.com/embed/AcE85QM4iPQ?si=wbeZD8vxOzvlB_Z9" : "https://www.youtube.com/embed/xOXtd-WzRxA?si=fHz8Z6ecXGYrDhkN"), fe(_e, kr), fe(Pe, `${Nr??""} `), fe(We, ` ${ce??""}`), fe(_t, `${O??""} `), fe(tt, q), fe(pt, ` ${G??""}`), fe(bt, K), fe(dr, le), fe(Ir, ve) - }, [() => v1(), () => b1(), () => C1(), () => I1(), () => k1(), () => L1(), () => B1(), () => N1(), () => V1(), () => $1(), () => cS(), () => tP(), () => nP()]), En(2, ye, () => Qn, () => ({ - duration: 300 - })), H(pe, ye) - }; - Ue(T, pe => { - _() && pe(o) - }) - } - A(F); - var $ = V(F, 2), - W = k($), - ie = k(W, !0); - A(W), A($), A(L), On(L, () => pe => { - Zr(() => { - _() ? pe.show() : pe.close() - }) - }), Ge(pe => fe(ie, pe), [() => tc()]), an("close", L, () => _(!1)), H(b, L), Pr() -} - -function n4(b) { - return typeof b == "function" -} - -function mh(b) { - return b !== null && typeof b == "object" -} -const a4 = ["string", "number", "bigint", "boolean"]; - -function Sf(b) { - return b == null || a4.includes(typeof b) ? !0 : Array.isArray(b) ? b.every(l => Sf(l)) : typeof b == "object" ? Object.getPrototypeOf(b) === Object.prototype : !1 -} -const Iu = Symbol("box"), - cm = Symbol("is-writable"); - -function s4(b) { - return mh(b) && Iu in b -} - -function o4(b) { - return cr.isBox(b) && cm in b -} - -function cr(b) { - let l = nt(zn(b)); - return { - [Iu]: !0, - [cm]: !0, - get current() { - return x(l) - }, - set current(_) { - oe(l, _, !0) - } - } -} - -function l4(b, l) { - const _ = lt(b); - return l ? { - [Iu]: !0, - [cm]: !0, - get current() { - return x(_) - }, - set current(C) { - l(C) - } - } : { - [Iu]: !0, - get current() { - return b() - } - } -} - -function c4(b) { - return cr.isBox(b) ? b : n4(b) ? cr.with(b) : cr(b) -} - -function u4(b) { - return Object.entries(b).reduce((l, [_, C]) => cr.isBox(C) ? (cr.isWritableBox(C) ? Object.defineProperty(l, _, { - get() { - return C.current - }, - set(L) { - C.current = L - } - }) : Object.defineProperty(l, _, { - get() { - return C.current - } - }), l) : Object.assign(l, { - [_]: C - }), {}) -} - -function h4(b) { - return cr.isWritableBox(b) ? { - [Iu]: !0, - get current() { - return b.current - } - } : b -} -cr.from = c4; -cr.with = l4; -cr.flatten = u4; -cr.readonly = h4; -cr.isBox = s4; -cr.isWritableBox = o4; - -function d4(...b) { - return function(l) { - var _; - for (const C of b) - if (C) { - if (l.defaultPrevented) return; - typeof C == "function" ? C.call(this, l) : (_ = C.current) == null || _.call(this, l) - } - } -} -var Hl = {}, - hf, mg; - -function p4() { - if (mg) return hf; - mg = 1; - var b = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, - l = /\n/g, - _ = /^\s*/, - C = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, - L = /^:\s*/, - F = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, - T = /^[;\s]*/, - o = /^\s+|\s+$/g, - $ = ` -`, - W = "/", - ie = "*", - pe = "", - ye = "comment", - X = "declaration"; - hf = function(we, Re) { - if (typeof we != "string") throw new TypeError("First argument must be a string"); - if (!we) return []; - Re = Re || {}; - var Ae = 1, - Oe = 1; - - function Ee(Qe) { - var ke = Qe.match(l); - ke && (Ae += ke.length); - var vt = Qe.lastIndexOf($); - Oe = ~vt ? Qe.length - vt : Oe + Qe.length - } - - function Ne() { - var Qe = { - line: Ae, - column: Oe - }; - return function(ke) { - return ke.position = new ft(Qe), ct(), ke - } - } - - function ft(Qe) { - this.start = Qe, this.end = { - line: Ae, - column: Oe - }, this.source = Re.source - } - ft.prototype.content = we; - - function ht(Qe) { - var ke = new Error(Re.source + ":" + Ae + ":" + Oe + ": " + Qe); - if (ke.reason = Qe, ke.filename = Re.source, ke.line = Ae, ke.column = Oe, ke.source = we, !Re.silent) throw ke - } - - function Xe(Qe) { - var ke = Qe.exec(we); - if (ke) { - var vt = ke[0]; - return Ee(vt), we = we.slice(vt.length), ke - } - } - - function ct() { - Xe(_) - } - - function Je(Qe) { - var ke; - for (Qe = Qe || []; ke = Be();) ke !== !1 && Qe.push(ke); - return Qe - } - - function Be() { - var Qe = Ne(); - if (!(W != we.charAt(0) || ie != we.charAt(1))) { - for (var ke = 2; pe != we.charAt(ke) && (ie != we.charAt(ke) || W != we.charAt(ke + 1));) ++ke; - if (ke += 2, pe === we.charAt(ke - 1)) return ht("End of comment missing"); - var vt = we.slice(2, ke - 2); - return Oe += 2, Ee(vt), we = we.slice(ke), Oe += 2, Qe({ - type: ye, - comment: vt - }) - } - } - - function st() { - var Qe = Ne(), - ke = Xe(C); - if (ke) { - if (Be(), !Xe(L)) return ht("property missing ':'"); - var vt = Xe(F), - Q = Qe({ - type: X, - property: Se(ke[0].replace(b, pe)), - value: vt ? Se(vt[0].replace(b, pe)) : pe - }); - return Xe(T), Q - } - } - - function it() { - var Qe = []; - Je(Qe); - for (var ke; ke = st();) ke !== !1 && (Qe.push(ke), Je(Qe)); - return Qe - } - return ct(), it() - }; - - function Se(we) { - return we ? we.replace(o, pe) : pe - } - return hf -} -var _g; - -function f4() { - if (_g) return Hl; - _g = 1; - var b = Hl && Hl.__importDefault || function(C) { - return C && C.__esModule ? C : { - default: C - } - }; - Object.defineProperty(Hl, "__esModule", { - value: !0 - }), Hl.default = _; - var l = b(p4()); - - function _(C, L) { - var F = null; - if (!C || typeof C != "string") return F; - var T = (0, l.default)(C), - o = typeof L == "function"; - return T.forEach(function($) { - if ($.type === "declaration") { - var W = $.property, - ie = $.value; - o ? L(W, ie, $) : ie && (F = F || {}, F[W] = ie) - } - }), F - } - return Hl -} -var m4 = f4(); -const gg = nm(m4), - _4 = gg.default || gg, - g4 = /\d/, - v4 = ["-", "_", "/", "."]; - -function y4(b = "") { - if (!g4.test(b)) return b !== b.toLowerCase() -} - -function x4(b) { - const l = []; - let _ = "", - C, L; - for (const F of b) { - const T = v4.includes(F); - if (T === !0) { - l.push(_), _ = "", C = void 0; - continue - } - const o = y4(F); - if (L === !1) { - if (C === !1 && o === !0) { - l.push(_), _ = F, C = o; - continue - } - if (C === !0 && o === !1 && _.length > 1) { - const $ = _.at(-1); - l.push(_.slice(0, Math.max(0, _.length - 1))), _ = $ + F, C = o; - continue - } - } - _ += F, C = o, L = T - } - return l.push(_), l -} - -function lv(b) { - return b ? x4(b).map(l => w4(l)).join("") : "" -} - -function b4(b) { - return T4(lv(b || "")) -} - -function w4(b) { - return b ? b[0].toUpperCase() + b.slice(1) : "" -} - -function T4(b) { - return b ? b[0].toLowerCase() + b.slice(1) : "" -} - -function wd(b) { - if (!b) return {}; - const l = {}; - - function _(C, L) { - if (C.startsWith("-moz-") || C.startsWith("-webkit-") || C.startsWith("-ms-") || C.startsWith("-o-")) { - l[lv(C)] = L; - return - } - if (C.startsWith("--")) { - l[C] = L; - return - } - l[b4(C)] = L - } - return _4(b, _), l -} - -function C4(...b) { - return (...l) => { - for (const _ of b) typeof _ == "function" && _(...l) - } -} - -function S4(b, l) { - const _ = RegExp(b, "g"); - return C => { - if (typeof C != "string") throw new TypeError(`expected an argument of type string, but got ${typeof C}`); - return C.match(_) ? C.replace(_, l) : C - } -} -const P4 = S4(/[A-Z]/, b => `-${b.toLowerCase()}`); - -function I4(b) { - if (!b || typeof b != "object" || Array.isArray(b)) throw new TypeError(`expected an argument of type object, but got ${typeof b}`); - return Object.keys(b).map(l => `${P4(l)}: ${b[l]};`).join(` -`) -} - -function cv(b = {}) { - return I4(b).replace(` -`, " ") -} -const uv = { - position: "absolute", - width: "1px", - height: "1px", - padding: "0", - margin: "-1px", - overflow: "hidden", - clip: "rect(0, 0, 0, 0)", - whiteSpace: "nowrap", - borderWidth: "0", - transform: "translateX(-100%)" -}; -cv(uv); -const M4 = ["onabort", "onanimationcancel", "onanimationend", "onanimationiteration", "onanimationstart", "onauxclick", "onbeforeinput", "onbeforetoggle", "onblur", "oncancel", "oncanplay", "oncanplaythrough", "onchange", "onclick", "onclose", "oncompositionend", "oncompositionstart", "oncompositionupdate", "oncontextlost", "oncontextmenu", "oncontextrestored", "oncopy", "oncuechange", "oncut", "ondblclick", "ondrag", "ondragend", "ondragenter", "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onerror", "onfocus", "onfocusin", "onfocusout", "onformdata", "ongotpointercapture", "oninput", "oninvalid", "onkeydown", "onkeypress", "onkeyup", "onload", "onloadeddata", "onloadedmetadata", "onloadstart", "onlostpointercapture", "onmousedown", "onmouseenter", "onmouseleave", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onpaste", "onpause", "onplay", "onplaying", "onpointercancel", "onpointerdown", "onpointerenter", "onpointerleave", "onpointermove", "onpointerout", "onpointerover", "onpointerup", "onprogress", "onratechange", "onreset", "onresize", "onscroll", "onscrollend", "onsecuritypolicyviolation", "onseeked", "onseeking", "onselect", "onselectionchange", "onselectstart", "onslotchange", "onstalled", "onsubmit", "onsuspend", "ontimeupdate", "ontoggle", "ontouchcancel", "ontouchend", "ontouchmove", "ontouchstart", "ontransitioncancel", "ontransitionend", "ontransitionrun", "ontransitionstart", "onvolumechange", "onwaiting", "onwebkitanimationend", "onwebkitanimationiteration", "onwebkitanimationstart", "onwebkittransitionend", "onwheel"], - A4 = new Set(M4); - -function k4(b) { - return A4.has(b) -} - -function Da(...b) { - const l = { - ...b[0] - }; - for (let _ = 1; _ < b.length; _++) { - const C = b[_]; - if (C) { - for (const L of Object.keys(C)) { - const F = l[L], - T = C[L], - o = typeof F == "function", - $ = typeof T == "function"; - if (o && k4(L)) { - const W = F, - ie = T; - l[L] = d4(W, ie) - } else if (o && $) l[L] = C4(F, T); - else if (L === "class") { - const W = Sf(F), - ie = Sf(T); - W && ie ? l[L] = Tu(F, T) : W ? l[L] = Tu(F) : ie && (l[L] = Tu(T)) - } else if (L === "style") { - const W = typeof F == "object", - ie = typeof T == "object", - pe = typeof F == "string", - ye = typeof T == "string"; - if (W && ie) l[L] = { - ...F, - ...T - }; - else if (W && ye) { - const X = wd(T); - l[L] = { - ...F, - ...X - } - } else if (pe && ie) { - const X = wd(F); - l[L] = { - ...X, - ...T - } - } else if (pe && ye) { - const X = wd(F), - Se = wd(T); - l[L] = { - ...X, - ...Se - } - } else W ? l[L] = F : ie ? l[L] = T : pe ? l[L] = F : ye && (l[L] = T) - } else l[L] = T !== void 0 ? T : F - } - for (const L of Object.getOwnPropertySymbols(C)) { - const F = l[L], - T = C[L]; - l[L] = T !== void 0 ? T : F - } - } - } - return typeof l.style == "object" && (l.style = cv(l.style).replaceAll(` -`, " ")), l.hidden !== !0 && (l.hidden = void 0, delete l.hidden), l.disabled !== !0 && (l.disabled = void 0, delete l.disabled), l -} -const E4 = typeof window < "u" ? window : void 0; - -function z4(b) { - let l = b.activeElement; - for (; l != null && l.shadowRoot;) { - const _ = l.shadowRoot.activeElement; - if (_ === l) break; - l = _ - } - return l -} -var ic, Lu; -class L4 { - constructor(l = {}) { - br(this, ic); - br(this, Lu); - const { - window: _ = E4, - document: C = _ == null ? void 0 : _.document - } = l; - _ !== void 0 && (Jn(this, ic, C), Jn(this, Lu, zg(L => { - const F = Su(_, "focusin", L), - T = Su(_, "focusout", L); - return () => { - F(), T() - } - }))) - } - get current() { - var l; - return (l = et(this, Lu)) == null || l.call(this), et(this, ic) ? z4(et(this, ic)) : null - } -} -ic = new WeakMap, Lu = new WeakMap; -new L4; -var Du, zs; -class um { - constructor(l) { - br(this, Du); - br(this, zs); - Jn(this, Du, l), Jn(this, zs, Symbol(l)) - } - get key() { - return et(this, zs) - } - exists() { - return Ny(et(this, zs)) - } - get() { - const l = ag(et(this, zs)); - if (l === void 0) throw new Error(`Context "${et(this,Du)}" not found`); - return l - } - getOr(l) { - const _ = ag(et(this, zs)); - return _ === void 0 ? l : _ - } - set(l) { - return jy(et(this, zs), l) - } -} -Du = new WeakMap, zs = new WeakMap; - -function D4(b, l) { - switch (b) { - case "post": - Zr(l); - break; - case "pre": - Hf(l); - break - } -} - -function hv(b, l, _, C = {}) { - const { - lazy: L = !1 - } = C; - let F = !L, - T = Array.isArray(b) ? [] : void 0; - D4(l, () => { - const o = Array.isArray(b) ? b.map(W => W()) : b(); - if (!F) { - F = !0, T = o; - return - } - const $ = Go(() => _(o, T)); - return T = o, $ - }) -} - -function oo(b, l, _) { - hv(b, "post", l, _) -} - -function R4(b, l, _) { - hv(b, "pre", l, _) -} -oo.pre = R4; -var nc; -class B4 { - constructor(l, _) { - br(this, nc, nt(void 0)); - _ !== void 0 && oe(et(this, nc), _, !0), oo(() => l(), (C, L) => { - oe(et(this, nc), L, !0) - }) - } - get current() { - return x(et(this, nc)) - } -} -nc = new WeakMap; - -function F4(b, l) { - return setTimeout(l, b) -} - -function Wl(b) { - Mg().then(b) -} -const O4 = 1, - N4 = 9, - j4 = 11; - -function q4(b) { - return mh(b) && b.nodeType === O4 && typeof b.nodeName == "string" -} - -function dv(b) { - return mh(b) && b.nodeType === N4 -} - -function V4(b) { - var l; - return mh(b) && ((l = b.constructor) == null ? void 0 : l.name) === "VisualViewport" -} - -function U4(b) { - return mh(b) && b.nodeType !== void 0 -} - -function Z4(b) { - return U4(b) && b.nodeType === j4 && "host" in b -} - -function $4(b) { - return dv(b) ? b : V4(b) ? b.document : (b == null ? void 0 : b.ownerDocument) ?? document -} - -function pv(b) { - var l; - return Z4(b) ? pv(b.host) : dv(b) ? b.defaultView ?? window : q4(b) ? ((l = b.ownerDocument) == null ? void 0 : l.defaultView) ?? window : window -} - -function G4(b) { - let l = b.activeElement; - for (; l != null && l.shadowRoot;) { - const _ = l.shadowRoot.activeElement; - if (_ === l) break; - l = _ - } - return l -} -var Ru; -class H4 { - constructor(l) { - lr(this, "element"); - br(this, Ru, lt(() => this.element.current ? this.element.current.getRootNode() ?? document : document)); - lr(this, "getDocument", () => $4(this.root)); - lr(this, "getWindow", () => this.getDocument().defaultView ?? window); - lr(this, "getActiveElement", () => G4(this.root)); - lr(this, "isActiveElement", l => l === this.getActiveElement()); - lr(this, "querySelector", l => this.root ? this.root.querySelector(l) : null); - lr(this, "querySelectorAll", l => this.root ? this.root.querySelectorAll(l) : []); - lr(this, "setTimeout", (l, _) => this.getWindow().setTimeout(l, _)); - lr(this, "clearTimeout", l => this.getWindow().clearTimeout(l)); - typeof l == "function" ? this.element = cr.with(l) : this.element = l - } - get root() { - return x(et(this, Ru)) - } - set root(l) { - oe(et(this, Ru), l) - } - getElementById(l) { - return this.root.getElementById(l) - } -} -Ru = new WeakMap; - -function Va(b, l) { - return { - [Mx()]: _ => cr.isBox(b) ? (b.current = _, Go(() => l == null ? void 0 : l(_)), () => { - "isConnected" in _ && _.isConnected || (b.current = null, l == null || l(null)) - }) : (b(_), Go(() => l == null ? void 0 : l(_)), () => { - "isConnected" in _ && _.isConnected || (b(null), l == null || l(null)) - }) - } -} - -function W4(b) { - return b ? "true" : "false" -} - -function X4(b) { - return b ? "true" : "false" -} - -function K4(b) { - return b ? "" : void 0 -} - -function Y4(b) { - return b ? "true" : "false" -} - -function J4(b) { - return b ? "" : void 0 -} - -function Q4(b) { - return b ? !0 : void 0 -} -var ac, Bu; -class e6 { - constructor(l) { - br(this, ac); - br(this, Bu); - lr(this, "attrs"); - Jn(this, ac, l.getVariant ? l.getVariant() : null), Jn(this, Bu, et(this, ac) ? `data-${et(this,ac)}-` : `data-${l.component}-`), this.getAttr = this.getAttr.bind(this), this.selector = this.selector.bind(this), this.attrs = Object.fromEntries(l.parts.map(_ => [_, this.getAttr(_)])) - } - getAttr(l, _) { - return _ ? `data-${_}-${l}` : `${et(this,Bu)}${l}` - } - selector(l, _) { - return `[${this.getAttr(l,_)}]` - } -} -ac = new WeakMap, Bu = new WeakMap; - -function fv(b) { - const l = new e6(b); - return { - ...l.attrs, - selector: l.selector, - getAttr: l.getAttr - } -} -const t6 = "ArrowDown", - r6 = "ArrowLeft", - i6 = "ArrowRight", - n6 = "ArrowUp", - a6 = "End", - s6 = "Enter", - o6 = "Home", - l6 = "p", - c6 = "n", - u6 = "j", - h6 = "k", - d6 = "h", - p6 = "l"; - -function Mu() {} - -function Ua(b, l) { - return `bits-${b}` -} - -function f6(b) { - if (!b) return null; - for (const l of b.childNodes) - if (l.nodeType !== Node.COMMENT_NODE) return l; - return null -} -globalThis.bitsIdCounter ?? (globalThis.bitsIdCounter = { - current: 0 -}); - -function m6(b = "bits") { - return globalThis.bitsIdCounter.current++, `${b}-${globalThis.bitsIdCounter.current}` -} - -function _6(b, l) { - let _ = b.nextElementSibling; - for (; _;) { - if (_.matches(l)) return _; - _ = _.nextElementSibling - } -} - -function g6(b, l) { - let _ = b.previousElementSibling; - for (; _;) { - if (_.matches(l)) return _; - _ = _.previousElementSibling - } -} - -function mv(b) { - if (typeof CSS < "u" && typeof CSS.escape == "function") return CSS.escape(b); - const l = b.length; - let _ = -1, - C, L = ""; - const F = b.charCodeAt(0); - if (l === 1 && F === 45) return "\\" + b; - for (; ++_ < l;) { - if (C = b.charCodeAt(_), C === 0) { - L += "�"; - continue - } - if (C >= 1 && C <= 31 || C === 127 || _ === 0 && C >= 48 && C <= 57 || _ === 1 && C >= 48 && C <= 57 && F === 45) { - L += "\\" + C.toString(16) + " "; - continue - } - if (C >= 128 || C === 45 || C === 95 || C >= 48 && C <= 57 || C >= 65 && C <= 90 || C >= 97 && C <= 122) { - L += b.charAt(_); - continue - } - L += "\\" + b.charAt(_) - } - return L -} -const Uo = "data-value", - ma = fv({ - component: "command", - parts: ["root", "list", "input", "separator", "loading", "empty", "group", "group-items", "group-heading", "item", "viewport", "input-label"] - }), - Xl = ma.selector("group"), - df = ma.selector("group-items"), - vg = ma.selector("group-heading"), - _v = ma.selector("item"), - pf = `${ma.selector("item")}:not([aria-disabled="true"])`, - Xo = new um("Command.Root"), - v6 = new um("Command.List"), - Au = new um("Command.Group"), - yg = { - search: "", - value: "", - filtered: { - count: 0, - items: new Map, - groups: new Set - } - }; -var sc, Fu, Ou, Nu, ju, qu, Vu, Uu, ir, gv, Md, If, Ad, kd, Ed, no, vv, yv, Mf, yu, Af, kf, xv, xu, Ef, zf, bv, bu, wu, Zu; -const pm = class pm { - constructor(l) { - br(this, ir); - lr(this, "opts"); - lr(this, "attachment"); - br(this, sc, !1); - br(this, Fu, !0); - lr(this, "sortAfterTick", !1); - lr(this, "sortAndFilterAfterTick", !1); - lr(this, "allItems", new Set); - lr(this, "allGroups", new Map); - lr(this, "allIds", new Map); - br(this, Ou, nt(0)); - br(this, Nu, nt(null)); - br(this, ju, nt(null)); - br(this, qu, nt(null)); - br(this, Vu, nt(yg)); - br(this, Uu, nt(zn(yg))); - br(this, Zu, lt(() => ({ - id: this.opts.id.current, - role: "application", - [ma.root]: "", - tabindex: -1, - onkeydown: this.onkeydown, - ...this.attachment - }))); - this.opts = l, this.attachment = Va(this.opts.ref); - const _ = { - ...this._commandState, - value: this.opts.value.current ?? "" - }; - this._commandState = _, this.commandState = _, this.onkeydown = this.onkeydown.bind(this) - } - static create(l) { - return Xo.set(new pm(l)) - } - get key() { - return x(et(this, Ou)) - } - set key(l) { - oe(et(this, Ou), l, !0) - } - get viewportNode() { - return x(et(this, Nu)) - } - set viewportNode(l) { - oe(et(this, Nu), l, !0) - } - get inputNode() { - return x(et(this, ju)) - } - set inputNode(l) { - oe(et(this, ju), l, !0) - } - get labelNode() { - return x(et(this, qu)) - } - set labelNode(l) { - oe(et(this, qu), l, !0) - } - get commandState() { - return x(et(this, Vu)) - } - set commandState(l) { - oe(et(this, Vu), l) - } - get _commandState() { - return x(et(this, Uu)) - } - set _commandState(l) { - oe(et(this, Uu), l, !0) - } - setState(l, _, C) { - Object.is(this._commandState[l], _) || (this._commandState[l] = _, l === "search" ? (Fr(this, ir, Ed).call(this), Fr(this, ir, Ad).call(this)) : l === "value" && (C || Fr(this, ir, vv).call(this)), Fr(this, ir, Md).call(this)) - } - setValue(l, _) { - l !== this.opts.value.current && l === "" && Wl(() => { - this.key++ - }), this.setState("value", l, _), this.opts.value.current = l - } - getValidItems() { - const l = this.opts.ref.current; - return l ? Array.from(l.querySelectorAll(pf)).filter(C => !!C) : [] - } - getVisibleItems() { - const l = this.opts.ref.current; - return l ? Array.from(l.querySelectorAll(_v)).filter(C => !!C) : [] - } - get itemsGrid() { - var o, $, W, ie; - if (!this.isGrid) return []; - const l = this.opts.columns.current ?? 1, - _ = this.getVisibleItems(), - C = [ - [] - ]; - let L = (o = _[0]) == null ? void 0 : o.getAttribute("data-group"), - F = 0, - T = 0; - for (let pe = 0; pe < _.length; pe++) { - const ye = _[pe], - X = ye == null ? void 0 : ye.getAttribute("data-group"); - L !== X ? (L = X, F = 1, T++, C.push([{ - index: pe, - firstRowOfGroup: !0, - ref: ye - }])) : (F++, F > l && (T++, F = 1, C.push([])), (ie = C[T]) == null || ie.push({ - index: pe, - firstRowOfGroup: ((W = ($ = C[T]) == null ? void 0 : $[0]) == null ? void 0 : W.firstRowOfGroup) ?? pe === 0, - ref: ye - })) - } - return C - } - updateSelectedToIndex(l) { - const _ = this.getValidItems()[l]; - _ && this.setValue(_.getAttribute(Uo) ?? "") - } - updateSelectedByItem(l) { - const _ = Fr(this, ir, no).call(this), - C = this.getValidItems(), - L = C.findIndex(T => T === _); - let F = C[L + l]; - this.opts.loop.current && (F = L + l < 0 ? C[C.length - 1] : L + l === C.length ? C[0] : C[L + l]), F && this.setValue(F.getAttribute(Uo) ?? "") - } - updateSelectedByGroup(l) { - const _ = Fr(this, ir, no).call(this); - let C = _ == null ? void 0 : _.closest(Xl), - L; - for (; C && !L;) C = l > 0 ? _6(C, Xl) : g6(C, Xl), L = C == null ? void 0 : C.querySelector(pf); - L ? this.setValue(L.getAttribute(Uo) ?? "") : this.updateSelectedByItem(l) - } - registerValue(l, _) { - var C; - return l && l === ((C = this.allIds.get(l)) == null ? void 0 : C.value) || this.allIds.set(l, { - value: l, - keywords: _ - }), this._commandState.filtered.items.set(l, Fr(this, ir, If).call(this, l, _)), this.sortAfterTick || (this.sortAfterTick = !0, Wl(() => { - Fr(this, ir, Ad).call(this), this.sortAfterTick = !1 - })), () => { - this.allIds.delete(l) - } - } - registerItem(l, _) { - return this.allItems.add(l), _ && (this.allGroups.has(_) ? this.allGroups.get(_).add(l) : this.allGroups.set(_, new Set([l]))), this.sortAndFilterAfterTick || (this.sortAndFilterAfterTick = !0, Wl(() => { - Fr(this, ir, Ed).call(this), Fr(this, ir, Ad).call(this), this.sortAndFilterAfterTick = !1 - })), Fr(this, ir, Md).call(this), () => { - const C = Fr(this, ir, no).call(this); - this.allIds.delete(l), this.allItems.delete(l), this.commandState.filtered.items.delete(l), Fr(this, ir, Ed).call(this), (C == null ? void 0 : C.getAttribute("id")) === l && Fr(this, ir, kd).call(this), Fr(this, ir, Md).call(this) - } - } - registerGroup(l) { - return this.allGroups.has(l) || this.allGroups.set(l, new Set), () => { - this.allIds.delete(l), this.allGroups.delete(l) - } - } - get isGrid() { - return this.opts.columns.current !== null - } - onkeydown(l) { - const _ = this.opts.vimBindings.current && l.ctrlKey; - switch (l.key) { - case c6: - case u6: { - _ && (this.isGrid ? Fr(this, ir, Af).call(this, l) : Fr(this, ir, yu).call(this, l)); - break - } - case p6: { - _ && this.isGrid && Fr(this, ir, yu).call(this, l); - break - } - case t6: - this.isGrid ? Fr(this, ir, Af).call(this, l) : Fr(this, ir, yu).call(this, l); - break; - case i6: - if (!this.isGrid) break; - Fr(this, ir, yu).call(this, l); - break; - case l6: - case h6: { - _ && (this.isGrid ? Fr(this, ir, zf).call(this, l) : Fr(this, ir, wu).call(this, l)); - break - } - case d6: { - _ && this.isGrid && Fr(this, ir, wu).call(this, l); - break - } - case n6: - this.isGrid ? Fr(this, ir, zf).call(this, l) : Fr(this, ir, wu).call(this, l); - break; - case r6: - if (!this.isGrid) break; - Fr(this, ir, wu).call(this, l); - break; - case o6: - l.preventDefault(), this.updateSelectedToIndex(0); - break; - case a6: - l.preventDefault(), Fr(this, ir, Mf).call(this); - break; - case s6: - if (!l.isComposing && l.keyCode !== 229) { - l.preventDefault(); - const C = Fr(this, ir, no).call(this); - C && (C == null || C.click()) - } - } - } - get props() { - return x(et(this, Zu)) - } - set props(l) { - oe(et(this, Zu), l) - } -}; -sc = new WeakMap, Fu = new WeakMap, Ou = new WeakMap, Nu = new WeakMap, ju = new WeakMap, qu = new WeakMap, Vu = new WeakMap, Uu = new WeakMap, ir = new WeakSet, gv = function() { - return Ix(this._commandState) -}, Md = function() { - et(this, sc) || (Jn(this, sc, !0), Wl(() => { - var C, L; - Jn(this, sc, !1); - const l = Fr(this, ir, gv).call(this); - !Object.is(this.commandState, l) && (this.commandState = l, (L = (C = this.opts.onStateChange) == null ? void 0 : C.current) == null || L.call(C, l)) - })) -}, If = function(l, _) { - const C = this.opts.filter.current ?? Cv; - return l ? C(l, this._commandState.search, _) : 0 -}, Ad = function() { - var T; - if (!this._commandState.search || this.opts.shouldFilter.current === !1) { - Fr(this, ir, kd).call(this); - return - } - const l = this._commandState.filtered.items, - _ = []; - for (const o of this._commandState.filtered.groups) { - const $ = this.allGroups.get(o); - let W = 0; - if (!$) { - _.push([o, W]); - continue - } - for (const ie of $) { - const pe = l.get(ie); - W = Math.max(pe ?? 0, W) - } - _.push([o, W]) - } - const C = this.viewportNode, - L = this.getValidItems().sort((o, $) => { - const W = o.getAttribute("data-value"), - ie = $.getAttribute("data-value"), - pe = l.get(W) ?? 0; - return (l.get(ie) ?? 0) - pe - }); - for (const o of L) { - const $ = o.closest(df); - if ($) { - const W = o.parentElement === $ ? o : o.closest(`${df} > *`); - W && $.appendChild(W) - } else { - const W = o.parentElement === C ? o : o.closest(`${df} > *`); - W && (C == null || C.appendChild(W)) - } - } - const F = _.sort((o, $) => $[1] - o[1]); - for (const o of F) { - const $ = C == null ? void 0 : C.querySelector(`${Xl}[${Uo}="${mv(o[0])}"]`); - (T = $ == null ? void 0 : $.parentElement) == null || T.appendChild($) - } - Fr(this, ir, kd).call(this) -}, kd = function() { - Wl(() => { - const l = this.getValidItems().find(L => L.getAttribute("aria-disabled") !== "true"), - _ = l == null ? void 0 : l.getAttribute(Uo), - C = et(this, Fu) && this.opts.disableInitialScroll.current; - this.setValue(_ ?? "", C), Jn(this, Fu, !1) - }) -}, Ed = function() { - var _, C; - if (!this._commandState.search || this.opts.shouldFilter.current === !1) { - this._commandState.filtered.count = this.allItems.size; - return - } - this._commandState.filtered.groups = new Set; - let l = 0; - for (const L of this.allItems) { - const F = ((_ = this.allIds.get(L)) == null ? void 0 : _.value) ?? "", - T = ((C = this.allIds.get(L)) == null ? void 0 : C.keywords) ?? [], - o = Fr(this, ir, If).call(this, F, T); - this._commandState.filtered.items.set(L, o), o > 0 && l++ - } - for (const [L, F] of this.allGroups) - for (const T of F) { - const o = this._commandState.filtered.items.get(T); - if (o && o > 0) { - this._commandState.filtered.groups.add(L); - break - } - } - this._commandState.filtered.count = l -}, no = function() { - const l = this.opts.ref.current; - if (!l) return; - const _ = l.querySelector(`${pf}[data-selected]`); - if (_) return _ -}, vv = function() { - Wl(() => { - var C, L, F, T, o; - const l = Fr(this, ir, no).call(this); - if (!l) return; - const _ = (C = l.parentElement) == null ? void 0 : C.parentElement; - if (_) { - if (this.isGrid) { - const $ = Fr(this, ir, yv).call(this, l); - if (l.scrollIntoView({ - block: "nearest" - }), $) { - const W = (L = l == null ? void 0 : l.closest(Xl)) == null ? void 0 : L.querySelector(vg); - W == null || W.scrollIntoView({ - block: "nearest" - }); - return - } - } else { - const $ = f6(_); - if ($ && ((F = $.dataset) == null ? void 0 : F.value) === ((T = l.dataset) == null ? void 0 : T.value)) { - const W = (o = l == null ? void 0 : l.closest(Xl)) == null ? void 0 : o.querySelector(vg); - W == null || W.scrollIntoView({ - block: "nearest" - }); - return - } - } - l.scrollIntoView({ - block: "nearest" - }) - } - }) -}, yv = function(l) { - const _ = this.itemsGrid; - if (_.length === 0) return !1; - for (let C = 0; C < _.length; C++) { - const L = _[C]; - if (L !== void 0) - for (let F = 0; F < L.length; F++) { - const T = L[F]; - if (!(T === void 0 || T.ref !== l)) return T.firstRowOfGroup - } - } - return !1 -}, Mf = function() { - return this.updateSelectedToIndex(this.getValidItems().length - 1) -}, yu = function(l) { - l.preventDefault(), l.metaKey ? Fr(this, ir, Mf).call(this) : l.altKey ? this.updateSelectedByGroup(1) : this.updateSelectedByItem(1) -}, Af = function(l) { - this.opts.columns.current !== null && (l.preventDefault(), l.metaKey ? this.updateSelectedByGroup(1) : this.updateSelectedByItem(Fr(this, ir, xv).call(this, l))) -}, kf = function(l, _) { - if (_.length === 0) return null; - for (let C = 0; C < _.length; C++) { - const L = _[C]; - if (L !== void 0) - for (let F = 0; F < L.length; F++) { - const T = L[F]; - if (!(T === void 0 || T.ref !== l)) return { - columnIndex: F, - rowIndex: C - } - } - } - return null -}, xv = function(l) { - const _ = this.itemsGrid, - C = Fr(this, ir, no).call(this); - if (!C) return 0; - const L = Fr(this, ir, kf).call(this, C, _); - if (!L) return 0; - let F = null; - const T = l.altKey ? 1 : 0; - if (l.altKey && L.rowIndex === _.length - 2 && !this.opts.loop.current) F = Fr(this, ir, xu).call(this, { - start: _.length - 1, - end: _.length, - expectedColumnIndex: L.columnIndex, - grid: _ - }); - else if (L.rowIndex === _.length - 1) { - if (!this.opts.loop.current) return 0; - F = Fr(this, ir, xu).call(this, { - start: 0 + T, - end: L.rowIndex, - expectedColumnIndex: L.columnIndex, - grid: _ - }) - } else F = Fr(this, ir, xu).call(this, { - start: L.rowIndex + 1 + T, - end: _.length, - expectedColumnIndex: L.columnIndex, - grid: _ - }), F === null && this.opts.loop.current && (F = Fr(this, ir, xu).call(this, { - start: 0, - end: L.rowIndex, - expectedColumnIndex: L.columnIndex, - grid: _ - })); - return Fr(this, ir, Ef).call(this, C, F) -}, xu = function({ - start: l, - end: _, - grid: C, - expectedColumnIndex: L -}) { - var T; - let F = null; - for (let o = l; o < _; o++) { - const $ = C[o]; - if (F = ((T = $[L]) == null ? void 0 : T.ref) ?? null, F !== null && Td(F)) { - F = null; - continue - } - if (F === null) - for (let W = $.length - 1; W >= 0; W--) { - const ie = $[$.length - 1]; - if (!(ie === void 0 || Td(ie.ref))) { - F = ie.ref; - break - } - } - break - } - return F -}, Ef = function(l, _) { - if (_ === null) return 0; - const C = this.getValidItems(), - L = C.findIndex(T => T === l); - return C.findIndex(T => T === _) - L -}, zf = function(l) { - this.opts.columns.current !== null && (l.preventDefault(), l.metaKey ? this.updateSelectedByGroup(-1) : this.updateSelectedByItem(Fr(this, ir, bv).call(this, l))) -}, bv = function(l) { - const _ = this.itemsGrid, - C = Fr(this, ir, no).call(this); - if (C === void 0) return 0; - const L = Fr(this, ir, kf).call(this, C, _); - if (L === null) return 0; - let F = null; - const T = l.altKey ? 1 : 0; - if (l.altKey && L.rowIndex === 1 && this.opts.loop.current === !1) F = Fr(this, ir, bu).call(this, { - start: 0, - end: 0, - expectedColumnIndex: L.columnIndex, - grid: _ - }); - else if (L.rowIndex === 0) { - if (this.opts.loop.current === !1) return 0; - F = Fr(this, ir, bu).call(this, { - start: _.length - 1 - T, - end: L.rowIndex + 1, - expectedColumnIndex: L.columnIndex, - grid: _ - }) - } else F = Fr(this, ir, bu).call(this, { - start: L.rowIndex - 1 - T, - end: 0, - expectedColumnIndex: L.columnIndex, - grid: _ - }), F === null && this.opts.loop.current && (F = Fr(this, ir, bu).call(this, { - start: _.length - 1, - end: L.rowIndex + 1, - expectedColumnIndex: L.columnIndex, - grid: _ - })); - return Fr(this, ir, Ef).call(this, C, F) -}, bu = function({ - start: l, - end: _, - grid: C, - expectedColumnIndex: L -}) { - var T; - let F = null; - for (let o = l; o >= _; o--) { - const $ = C[o]; - if ($ !== void 0) { - if (F = ((T = $[L]) == null ? void 0 : T.ref) ?? null, F !== null && Td(F)) { - F = null; - continue - } - if (F === null) - for (let W = $.length - 1; W >= 0; W--) { - const ie = $[$.length - 1]; - if (!(ie === void 0 || Td(ie.ref))) { - F = ie.ref; - break - } - } - break - } - } - return F -}, wu = function(l) { - l.preventDefault(), l.metaKey ? this.updateSelectedToIndex(0) : l.altKey ? this.updateSelectedByGroup(-1) : this.updateSelectedByItem(-1) -}, Zu = new WeakMap; -let Pf = pm; - -function Td(b) { - return b.getAttribute("aria-disabled") === "true" -} -var $u, Gu, Hu; -const fm = class fm { - constructor(l, _) { - lr(this, "opts"); - lr(this, "root"); - lr(this, "attachment"); - br(this, $u, lt(() => this.root._commandState.filtered.count === 0 && et(this, Gu) === !1 || this.opts.forceMount.current)); - br(this, Gu, !0); - br(this, Hu, lt(() => ({ - id: this.opts.id.current, - role: "presentation", - [ma.empty]: "", - ...this.attachment - }))); - this.opts = l, this.root = _, this.attachment = Va(this.opts.ref), Hf(() => { - Jn(this, Gu, !1) - }) - } - static create(l) { - return new fm(l, Xo.get()) - } - get shouldRender() { - return x(et(this, $u)) - } - set shouldRender(l) { - oe(et(this, $u), l) - } - get props() { - return x(et(this, Hu)) - } - set props(l) { - oe(et(this, Hu), l) - } -}; -$u = new WeakMap, Gu = new WeakMap, Hu = new WeakMap; -let Lf = fm; -var Wu, Xu, Ku, Yu; -const mm = class mm { - constructor(l, _) { - lr(this, "opts"); - lr(this, "root"); - lr(this, "attachment"); - br(this, Wu, lt(() => this.opts.forceMount.current || this.root.opts.shouldFilter.current === !1 || !this.root.commandState.search ? !0 : this.root._commandState.filtered.groups.has(this.trueValue))); - br(this, Xu, nt(null)); - br(this, Ku, nt("")); - br(this, Yu, lt(() => ({ - id: this.opts.id.current, - role: "presentation", - hidden: this.shouldRender ? void 0 : !0, - "data-value": this.trueValue, - [ma.group]: "", - ...this.attachment - }))); - this.opts = l, this.root = _, this.attachment = Va(this.opts.ref), this.trueValue = l.value.current ?? l.id.current, oo(() => this.trueValue, () => this.root.registerGroup(this.trueValue)), Zr(() => this.opts.value.current ? (this.trueValue = this.opts.value.current, this.root.registerValue(this.opts.value.current)) : this.headingNode && this.headingNode.textContent ? (this.trueValue = this.headingNode.textContent.trim().toLowerCase(), this.root.registerValue(this.trueValue)) : (this.trueValue = `-----${this.opts.id.current}`, this.root.registerValue(this.trueValue))) - } - static create(l) { - return Au.set(new mm(l, Xo.get())) - } - get shouldRender() { - return x(et(this, Wu)) - } - set shouldRender(l) { - oe(et(this, Wu), l) - } - get headingNode() { - return x(et(this, Xu)) - } - set headingNode(l) { - oe(et(this, Xu), l, !0) - } - get trueValue() { - return x(et(this, Ku)) - } - set trueValue(l) { - oe(et(this, Ku), l, !0) - } - get props() { - return x(et(this, Yu)) - } - set props(l) { - oe(et(this, Yu), l) - } -}; -Wu = new WeakMap, Xu = new WeakMap, Ku = new WeakMap, Yu = new WeakMap; -let Df = mm; -var Ju; -const _m = class _m { - constructor(l, _) { - lr(this, "opts"); - lr(this, "group"); - lr(this, "attachment"); - br(this, Ju, lt(() => ({ - id: this.opts.id.current, - [ma["group-heading"]]: "", - ...this.attachment - }))); - this.opts = l, this.group = _, this.attachment = Va(this.opts.ref, C => this.group.headingNode = C) - } - static create(l) { - return new _m(l, Au.get()) - } - get props() { - return x(et(this, Ju)) - } - set props(l) { - oe(et(this, Ju), l) - } -}; -Ju = new WeakMap; -let Rf = _m; -var Qu; -const gm = class gm { - constructor(l, _) { - lr(this, "opts"); - lr(this, "group"); - lr(this, "attachment"); - br(this, Qu, lt(() => { - var l; - return { - id: this.opts.id.current, - role: "group", - [ma["group-items"]]: "", - "aria-labelledby": ((l = this.group.headingNode) == null ? void 0 : l.id) ?? void 0, - ...this.attachment - } - })); - this.opts = l, this.group = _, this.attachment = Va(this.opts.ref) - } - static create(l) { - return new gm(l, Au.get()) - } - get props() { - return x(et(this, Qu)) - } - set props(l) { - oe(et(this, Qu), l) - } -}; -Qu = new WeakMap; -let Bf = gm; -var Dd, eh; -const vm = class vm { - constructor(l, _) { - lr(this, "opts"); - lr(this, "root"); - lr(this, "attachment"); - br(this, Dd, lt(() => { - var _; - const l = (_ = this.root.viewportNode) == null ? void 0 : _.querySelector(`${_v}[${Uo}="${mv(this.root.opts.value.current)}"]`); - if (l != null) return l.getAttribute("id") ?? void 0 - })); - br(this, eh, lt(() => { - var l, _; - return { - id: this.opts.id.current, - type: "text", - [ma.input]: "", - autocomplete: "off", - autocorrect: "off", - spellcheck: !1, - "aria-autocomplete": "list", - role: "combobox", - "aria-expanded": X4(!0), - "aria-controls": ((l = this.root.viewportNode) == null ? void 0 : l.id) ?? void 0, - "aria-labelledby": ((_ = this.root.labelNode) == null ? void 0 : _.id) ?? void 0, - "aria-activedescendant": x(et(this, Dd)), - ...this.attachment - } - })); - this.opts = l, this.root = _, this.attachment = Va(this.opts.ref, C => this.root.inputNode = C), oo(() => this.opts.ref.current, () => { - const C = this.opts.ref.current; - C && this.opts.autofocus.current && F4(10, () => C.focus()) - }), oo(() => this.opts.value.current, () => { - this.root.commandState.search !== this.opts.value.current && this.root.setState("search", this.opts.value.current) - }) - } - static create(l) { - return new vm(l, Xo.get()) - } - get props() { - return x(et(this, eh)) - } - set props(l) { - oe(et(this, eh), l) - } -}; -Dd = new WeakMap, eh = new WeakMap; -let Ff = vm; -var ao, Rd, th, rh, ih, Wo, wv, Nf, nh; -const ym = class ym { - constructor(l, _) { - br(this, Wo); - lr(this, "opts"); - lr(this, "root"); - lr(this, "attachment"); - br(this, ao, null); - br(this, Rd, lt(() => { - var l; - return this.opts.forceMount.current || ((l = et(this, ao)) == null ? void 0 : l.opts.forceMount.current) === !0 - })); - br(this, th, lt(() => { - if (this.opts.ref.current, x(et(this, Rd)) || this.root.opts.shouldFilter.current === !1 || !this.root.commandState.search) return !0; - const l = this.root.commandState.filtered.items.get(this.trueValue); - return l === void 0 ? !1 : l > 0 - })); - br(this, rh, lt(() => this.root.opts.value.current === this.trueValue && this.trueValue !== "")); - br(this, ih, nt("")); - br(this, nh, lt(() => { - var l; - return { - id: this.opts.id.current, - "aria-disabled": W4(this.opts.disabled.current), - "aria-selected": Y4(this.isSelected), - "data-disabled": K4(this.opts.disabled.current), - "data-selected": J4(this.isSelected), - "data-value": this.trueValue, - "data-group": (l = et(this, ao)) == null ? void 0 : l.trueValue, - [ma.item]: "", - role: "option", - onpointermove: this.onpointermove, - onclick: this.onclick, - ...this.attachment - } - })); - this.opts = l, this.root = _, Jn(this, ao, Au.getOr(null)), this.trueValue = l.value.current, this.attachment = Va(this.opts.ref), oo([() => this.trueValue, () => { - var C; - return (C = et(this, ao)) == null ? void 0 : C.trueValue - }, () => this.opts.forceMount.current], () => { - var C; - if (!this.opts.forceMount.current) return this.root.registerItem(this.trueValue, (C = et(this, ao)) == null ? void 0 : C.trueValue) - }), oo([() => this.opts.value.current, () => this.opts.ref.current], () => { - var C, L; - !this.opts.value.current && ((C = this.opts.ref.current) != null && C.textContent) && (this.trueValue = this.opts.ref.current.textContent.trim()), this.root.registerValue(this.trueValue, l.keywords.current.map(F => F.trim())), (L = this.opts.ref.current) == null || L.setAttribute(Uo, this.trueValue) - }), this.onclick = this.onclick.bind(this), this.onpointermove = this.onpointermove.bind(this) - } - static create(l) { - const _ = Au.getOr(null); - return new ym({ - ...l, - group: _ - }, Xo.get()) - } - get shouldRender() { - return x(et(this, th)) - } - set shouldRender(l) { - oe(et(this, th), l) - } - get isSelected() { - return x(et(this, rh)) - } - set isSelected(l) { - oe(et(this, rh), l) - } - get trueValue() { - return x(et(this, ih)) - } - set trueValue(l) { - oe(et(this, ih), l, !0) - } - onpointermove(l) { - this.opts.disabled.current || this.root.opts.disablePointerSelection.current || Fr(this, Wo, Nf).call(this) - } - onclick(l) { - this.opts.disabled.current || Fr(this, Wo, wv).call(this) - } - get props() { - return x(et(this, nh)) - } - set props(l) { - oe(et(this, nh), l) - } -}; -ao = new WeakMap, Rd = new WeakMap, th = new WeakMap, rh = new WeakMap, ih = new WeakMap, Wo = new WeakSet, wv = function() { - var l; - this.opts.disabled.current || (Fr(this, Wo, Nf).call(this), (l = this.opts.onSelect) == null || l.current()) -}, Nf = function() { - this.opts.disabled.current || this.root.setValue(this.trueValue, !0) -}, nh = new WeakMap; -let Of = ym; -var ah; -const xm = class xm { - constructor(l, _) { - lr(this, "opts"); - lr(this, "root"); - lr(this, "attachment"); - br(this, ah, lt(() => ({ - id: this.opts.id.current, - role: "listbox", - "aria-label": this.opts.ariaLabel.current, - [ma.list]: "", - ...this.attachment - }))); - this.opts = l, this.root = _, this.attachment = Va(this.opts.ref) - } - static create(l) { - return v6.set(new xm(l, Xo.get())) - } - get props() { - return x(et(this, ah)) - } - set props(l) { - oe(et(this, ah), l) - } -}; -ah = new WeakMap; -let jf = xm; -var sh; -const bm = class bm { - constructor(l, _) { - lr(this, "opts"); - lr(this, "root"); - lr(this, "attachment"); - br(this, sh, lt(() => { - var l; - return { - id: this.opts.id.current, - [ma["input-label"]]: "", - for: (l = this.opts.for) == null ? void 0 : l.current, - style: uv, - ...this.attachment - } - })); - this.opts = l, this.root = _, this.attachment = Va(this.opts.ref, C => this.root.labelNode = C) - } - static create(l) { - return new bm(l, Xo.get()) - } - get props() { - return x(et(this, sh)) - } - set props(l) { - oe(et(this, sh), l) - } -}; -sh = new WeakMap; -let qf = bm; -var y6 = Ie(""); - -function x6(b, l) { - const _ = ts(); - Sr(l, !0); - let C = Et(l, "id", 19, () => Ua(_)), - L = Et(l, "ref", 15, null), - F = Qt(l, ["$$slots", "$$events", "$$legacy", "id", "ref", "children"]); - const T = qf.create({ - id: cr.with(() => C()), - ref: cr.with(() => L(), ie => L(ie)) - }), - o = lt(() => Da(F, T.props)); - var $ = y6(); - er($, () => ({ - ...x(o) - })); - var W = k($); - Ji(W, () => l.children ?? fa), A($), H(b, $), Pr() -} -var b6 = Ie(" ", 1), - w6 = Ie("
                "); - -function T6(b, l) { - const _ = ts(); - Sr(l, !0); - const C = it => { - x6(it, { - children: (Qe, ke) => { - fi(); - var vt = Fn(); - Ge(() => fe(vt, ye())), H(Qe, vt) - }, - $$slots: { - default: !0 - } - }) - }; - let L = Et(l, "id", 19, () => Ua(_)), - F = Et(l, "ref", 15, null), - T = Et(l, "value", 15, ""), - o = Et(l, "onValueChange", 3, Mu), - $ = Et(l, "onStateChange", 3, Mu), - W = Et(l, "loop", 3, !1), - ie = Et(l, "shouldFilter", 3, !0), - pe = Et(l, "filter", 3, Cv), - ye = Et(l, "label", 3, ""), - X = Et(l, "vimBindings", 3, !0), - Se = Et(l, "disablePointerSelection", 3, !1), - we = Et(l, "disableInitialScroll", 3, !1), - Re = Et(l, "columns", 3, null), - Ae = Qt(l, ["$$slots", "$$events", "$$legacy", "id", "ref", "value", "onValueChange", "onStateChange", "loop", "shouldFilter", "filter", "label", "vimBindings", "disablePointerSelection", "disableInitialScroll", "columns", "children", "child"]); - const Oe = Pf.create({ - id: cr.with(() => L()), - ref: cr.with(() => F(), it => F(it)), - filter: cr.with(() => pe()), - shouldFilter: cr.with(() => ie()), - loop: cr.with(() => W()), - value: cr.with(() => T(), it => { - T() !== it && (T(it), o()(it)) - }), - vimBindings: cr.with(() => X()), - disablePointerSelection: cr.with(() => Se()), - disableInitialScroll: cr.with(() => we()), - onStateChange: cr.with(() => $()), - columns: cr.with(() => Re()) - }), - Ee = it => Oe.updateSelectedToIndex(it), - Ne = it => Oe.updateSelectedByGroup(it), - ft = it => Oe.updateSelectedByItem(it), - ht = () => Oe.getValidItems(), - Xe = lt(() => Da(Ae, Oe.props)); - var ct = Jt(), - Je = zt(ct); - { - var Be = it => { - var Qe = b6(), - ke = zt(Qe); - C(ke); - var vt = V(ke, 2); - Ji(vt, () => l.child, () => ({ - props: x(Xe) - })), H(it, Qe) - }, - st = it => { - var Qe = w6(); - er(Qe, () => ({ - ...x(Xe) - })); - var ke = k(Qe); - C(ke); - var vt = V(ke, 2); - Ji(vt, () => l.children ?? fa), A(Qe), H(it, Qe) - }; - Ue(Je, it => { - l.child ? it(Be) : it(st, !1) - }) - } - return H(b, ct), Pr({ - updateSelectedToIndex: Ee, - updateSelectedByGroup: Ne, - updateSelectedByItem: ft, - getValidItems: ht - }) -} -var C6 = Ie("
                "); - -function S6(b, l) { - const _ = ts(); - Sr(l, !0); - let C = Et(l, "id", 19, () => Ua(_)), - L = Et(l, "ref", 15, null), - F = Et(l, "forceMount", 3, !1), - T = Qt(l, ["$$slots", "$$events", "$$legacy", "id", "ref", "children", "child", "forceMount"]); - const o = Lf.create({ - id: cr.with(() => C()), - ref: cr.with(() => L(), ye => L(ye)), - forceMount: cr.with(() => F()) - }), - $ = lt(() => Da(o.props, T)); - var W = Jt(), - ie = zt(W); - { - var pe = ye => { - var X = Jt(), - Se = zt(X); - { - var we = Ae => { - var Oe = Jt(), - Ee = zt(Oe); - Ji(Ee, () => l.child, () => ({ - props: x($) - })), H(Ae, Oe) - }, - Re = Ae => { - var Oe = C6(); - er(Oe, () => ({ - ...x($) - })); - var Ee = k(Oe); - Ji(Ee, () => l.children ?? fa), A(Oe), H(Ae, Oe) - }; - Ue(Se, Ae => { - l.child ? Ae(we) : Ae(Re, !1) - }) - } - H(ye, X) - }; - Ue(ie, ye => { - o.shouldRender && ye(pe) - }) - } - H(b, W), Pr() -} -var P6 = Ie("
                "); - -function I6(b, l) { - const _ = ts(); - Sr(l, !0); - let C = Et(l, "id", 19, () => Ua(_)), - L = Et(l, "ref", 15, null), - F = Et(l, "value", 3, ""), - T = Et(l, "forceMount", 3, !1), - o = Qt(l, ["$$slots", "$$events", "$$legacy", "id", "ref", "value", "forceMount", "children", "child"]); - const $ = Df.create({ - id: cr.with(() => C()), - ref: cr.with(() => L(), Se => L(Se)), - forceMount: cr.with(() => T()), - value: cr.with(() => F()) - }), - W = lt(() => Da(o, $.props)); - var ie = Jt(), - pe = zt(ie); - { - var ye = Se => { - var we = Jt(), - Re = zt(we); - Ji(Re, () => l.child, () => ({ - props: x(W) - })), H(Se, we) - }, - X = Se => { - var we = P6(); - er(we, () => ({ - ...x(W) - })); - var Re = k(we); - Ji(Re, () => l.children ?? fa), A(we), H(Se, we) - }; - Ue(pe, Se => { - l.child ? Se(ye) : Se(X, !1) - }) - } - H(b, ie), Pr() -} -var M6 = Ie("
                "); - -function A6(b, l) { - const _ = ts(); - Sr(l, !0); - let C = Et(l, "id", 19, () => Ua(_)), - L = Et(l, "ref", 15, null), - F = Qt(l, ["$$slots", "$$events", "$$legacy", "id", "ref", "children", "child"]); - const T = Rf.create({ - id: cr.with(() => C()), - ref: cr.with(() => L(), ye => L(ye)) - }), - o = lt(() => Da(F, T.props)); - var $ = Jt(), - W = zt($); - { - var ie = ye => { - var X = Jt(), - Se = zt(X); - Ji(Se, () => l.child, () => ({ - props: x(o) - })), H(ye, X) - }, - pe = ye => { - var X = M6(); - er(X, () => ({ - ...x(o) - })); - var Se = k(X); - Ji(Se, () => l.children ?? fa), A(X), H(ye, X) - }; - Ue(W, ye => { - l.child ? ye(ie) : ye(pe, !1) - }) - } - H(b, $), Pr() -} -var k6 = Ie("
                "), - E6 = Ie('
                '); - -function z6(b, l) { - const _ = ts(); - Sr(l, !0); - let C = Et(l, "id", 19, () => Ua(_)), - L = Et(l, "ref", 15, null), - F = Qt(l, ["$$slots", "$$events", "$$legacy", "id", "ref", "children", "child"]); - const T = Bf.create({ - id: cr.with(() => C()), - ref: cr.with(() => L(), ye => L(ye)) - }), - o = lt(() => Da(F, T.props)); - var $ = E6(), - W = k($); - { - var ie = ye => { - var X = Jt(), - Se = zt(X); - Ji(Se, () => l.child, () => ({ - props: x(o) - })), H(ye, X) - }, - pe = ye => { - var X = k6(); - er(X, () => ({ - ...x(o) - })); - var Se = k(X); - Ji(Se, () => l.children ?? fa), A(X), H(ye, X) - }; - Ue(W, ye => { - l.child ? ye(ie) : ye(pe, !1) - }) - } - A($), H(b, $), Pr() -} -var L6 = Ie(""); - -function D6(b, l) { - const _ = ts(); - Sr(l, !0); - let C = Et(l, "value", 15, ""), - L = Et(l, "autofocus", 3, !1), - F = Et(l, "id", 19, () => Ua(_)), - T = Et(l, "ref", 15, null), - o = Qt(l, ["$$slots", "$$events", "$$legacy", "value", "autofocus", "id", "ref", "child"]); - const $ = Ff.create({ - id: cr.with(() => F()), - ref: cr.with(() => T(), Se => T(Se)), - value: cr.with(() => C(), Se => { - C(Se) - }), - autofocus: cr.with(() => L() ?? !1) - }), - W = lt(() => Da(o, $.props)); - var ie = Jt(), - pe = zt(ie); - { - var ye = Se => { - var we = Jt(), - Re = zt(we); - Ji(Re, () => l.child, () => ({ - props: x(W) - })), H(Se, we) - }, - X = Se => { - var we = L6(); - ea(we), er(we, () => ({ - ...x(W) - })), jd(we, C), H(Se, we) - }; - Ue(pe, Se => { - l.child ? Se(ye) : Se(X, !1) - }) - } - H(b, ie), Pr() -} -var R6 = Ie("
                "), - B6 = Ie('
                '); - -function F6(b, l) { - const _ = ts(); - Sr(l, !0); - let C = Et(l, "id", 19, () => Ua(_)), - L = Et(l, "ref", 15, null), - F = Et(l, "value", 3, ""), - T = Et(l, "disabled", 3, !1), - o = Et(l, "onSelect", 3, Mu), - $ = Et(l, "forceMount", 3, !1), - W = Et(l, "keywords", 19, () => []), - ie = Qt(l, ["$$slots", "$$events", "$$legacy", "id", "ref", "value", "disabled", "children", "child", "onSelect", "forceMount", "keywords"]); - const pe = Of.create({ - id: cr.with(() => C()), - ref: cr.with(() => L(), we => L(we)), - value: cr.with(() => F()), - disabled: cr.with(() => T()), - onSelect: cr.with(() => o()), - forceMount: cr.with(() => $()), - keywords: cr.with(() => W()) - }), - ye = lt(() => Da(ie, pe.props)); - var X = Jt(), - Se = zt(X); - Pu(Se, () => pe.root.key, we => { - var Re = B6(), - Ae = k(Re); - { - var Oe = Ee => { - var Ne = Jt(), - ft = zt(Ne); - { - var ht = ct => { - var Je = Jt(), - Be = zt(Je); - Ji(Be, () => l.child, () => ({ - props: x(ye) - })), H(ct, Je) - }, - Xe = ct => { - var Je = R6(); - er(Je, () => ({ - ...x(ye) - })); - var Be = k(Je); - Ji(Be, () => l.children ?? fa), A(Je), H(ct, Je) - }; - Ue(ft, ct => { - l.child ? ct(ht) : ct(Xe, !1) - }) - } - H(Ee, Ne) - }; - Ue(Ae, Ee => { - pe.shouldRender && Ee(Oe) - }) - } - A(Re), Ge(() => zr(Re, "data-value", pe.trueValue)), H(we, Re) - }), H(b, X), Pr() -} -var O6 = Ie("
                "); - -function N6(b, l) { - const _ = ts(); - Sr(l, !0); - let C = Et(l, "id", 19, () => Ua(_)), - L = Et(l, "ref", 15, null), - F = Qt(l, ["$$slots", "$$events", "$$legacy", "id", "ref", "child", "children", "aria-label"]); - const T = jf.create({ - id: cr.with(() => C()), - ref: cr.with(() => L(), ie => L(ie)), - ariaLabel: cr.with(() => l["aria-label"] ?? "Suggestions...") - }), - o = lt(() => Da(F, T.props)); - var $ = Jt(), - W = zt($); - Pu(W, () => T.root._commandState.search === "", ie => { - var pe = Jt(), - ye = zt(pe); - { - var X = we => { - var Re = Jt(), - Ae = zt(Re); - Ji(Ae, () => l.child, () => ({ - props: x(o) - })), H(we, Re) - }, - Se = we => { - var Re = O6(); - er(Re, () => ({ - ...x(o) - })); - var Ae = k(Re); - Ji(Ae, () => l.children ?? fa), A(Re), H(we, Re) - }; - Ue(ye, we => { - l.child ? we(X) : we(Se, !1) - }) - } - H(ie, pe) - }), H(b, $), Pr() -} -const xg = 1, - j6 = .9, - q6 = .8, - V6 = .17, - ff = .1, - mf = .999, - U6 = .9999, - Z6 = .99, - $6 = /[\\/_+.#"@[({&]/, - G6 = /[\\/_+.#"@[({&]/g, - H6 = /[\s-]/, - Tv = /[\s-]/g; - -function Vf(b, l, _, C, L, F, T) { - if (F === l.length) return L === b.length ? xg : Z6; - const o = `${L},${F}`; - if (T[o] !== void 0) return T[o]; - const $ = C.charAt(F); - let W = _.indexOf($, L), - ie = 0, - pe, ye, X, Se; - for (; W >= 0;) pe = Vf(b, l, _, C, W + 1, F + 1, T), pe > ie && (W === L ? pe *= xg : $6.test(b.charAt(W - 1)) ? (pe *= q6, X = b.slice(L, W - 1).match(G6), X && L > 0 && (pe *= mf ** X.length)) : H6.test(b.charAt(W - 1)) ? (pe *= j6, Se = b.slice(L, W - 1).match(Tv), Se && L > 0 && (pe *= mf ** Se.length)) : (pe *= V6, L > 0 && (pe *= mf ** (W - L))), b.charAt(W) !== l.charAt(F) && (pe *= U6)), (pe < ff && _.charAt(W - 1) === C.charAt(F + 1) || C.charAt(F + 1) === C.charAt(F) && _.charAt(W - 1) !== C.charAt(F)) && (ye = Vf(b, l, _, C, W + 1, F + 2, T), ye * ff > pe && (pe = ye * ff)), pe > ie && (ie = pe), W = _.indexOf($, W + 1); - return T[o] = ie, ie -} - -function bg(b) { - return b.toLowerCase().replace(Tv, " ") -} - -function Cv(b, l, _) { - return b = _ && _.length > 0 ? `${`${b} ${_==null?void 0:_.join(" ")}`}` : b, Vf(b, l, bg(b), bg(l), 0, 0, {}) -} -const W6 = 18, - Sv = 40, - X6 = `${Sv}px`, - K6 = ["[data-lastpass-icon-root]", "com-1password-button", "[data-dashlanecreated]", '[style$="2147483647 !important;"]'].join(","); - -function Y6({ - containerRef: b, - inputRef: l, - pushPasswordManagerStrategy: _, - isFocused: C, - domContext: L -}) { - let F = nt(!1), - T = nt(!1), - o = nt(!1); - - function $() { - const ie = _.current; - return ie === "none" ? !1 : ie === "increase-width" && x(F) && x(T) - } - - function W() { - const ie = b.current, - pe = l.current; - if (!ie || !pe || x(o) || _.current === "none") return; - const ye = ie, - X = ye.getBoundingClientRect().left + ye.offsetWidth, - Se = ye.getBoundingClientRect().top + ye.offsetHeight / 2, - we = X - W6, - Re = Se; - L.querySelectorAll(K6).length === 0 && L.getDocument().elementFromPoint(we, Re) === ie || (oe(F, !0), oe(o, !0)) - } - return Zr(() => { - const ie = b.current; - if (!ie || _.current === "none") return; - - function pe() { - const Se = pv(ie).innerWidth - ie.getBoundingClientRect().right; - oe(T, Se >= Sv) - } - pe(); - const ye = setInterval(pe, 1e3); - return () => { - clearInterval(ye) - } - }), Zr(() => { - const ie = C.current || L.getActiveElement() === l.current; - if (_.current === "none" || !ie) return; - const pe = setTimeout(W, 0), - ye = setTimeout(W, 2e3), - X = setTimeout(W, 5e3), - Se = setTimeout(() => { - oe(o, !0) - }, 6e3); - return () => { - clearTimeout(pe), clearTimeout(ye), clearTimeout(X), clearTimeout(Se) - } - }), { - get hasPwmBadge() { - return x(F) - }, - get willPushPwmBadge() { - return $() - }, - PWM_BADGE_SPACE_WIDTH: X6 - } -} -const Pv = fv({ - component: "pin-input", - parts: ["root", "cell"] - }), - J6 = ["Backspace", "Delete", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End", "Escape", "Enter", "Tab", "Shift", "Control", "Meta"]; -var ja, oc, Ls, za, qa, lc, hs, Ds, so, cc, Bd, oh, lh, Fd, Od, Iv, ch, uh, Nd, hh; -const wm = class wm { - constructor(l) { - br(this, Od); - lr(this, "opts"); - lr(this, "attachment"); - br(this, ja, cr(null)); - br(this, oc, nt(!1)); - lr(this, "inputAttachment", Va(et(this, ja))); - br(this, Ls, cr(!1)); - br(this, za, nt(null)); - br(this, qa, nt(null)); - br(this, lc, new B4(() => this.opts.value.current ?? "")); - br(this, hs, lt(() => typeof this.opts.pattern.current == "string" ? new RegExp(this.opts.pattern.current) : this.opts.pattern.current)); - br(this, Ds, nt(zn({ - prev: [null, null, "none"], - willSyntheticBlur: !1 - }))); - br(this, so); - br(this, cc); - lr(this, "domContext"); - lr(this, "onkeydown", l => { - const _ = l.key; - J6.includes(_) || l.ctrlKey || l.metaKey || _ && x(et(this, hs)) && !x(et(this, hs)).test(_) && l.preventDefault() - }); - br(this, Bd, lt(() => ({ - position: "relative", - cursor: this.opts.disabled.current ? "default" : "text", - userSelect: "none", - WebkitUserSelect: "none", - pointerEvents: "none" - }))); - br(this, oh, lt(() => ({ - id: this.opts.id.current, - [Pv.root]: "", - style: x(et(this, Bd)), - ...this.attachment - }))); - br(this, lh, lt(() => ({ - style: { - position: "absolute", - inset: 0, - pointerEvents: "none" - } - }))); - br(this, Fd, lt(() => ({ - position: "absolute", - inset: 0, - width: et(this, so).willPushPwmBadge ? `calc(100% + ${et(this,so).PWM_BADGE_SPACE_WIDTH})` : "100%", - clipPath: et(this, so).willPushPwmBadge ? `inset(0 ${et(this,so).PWM_BADGE_SPACE_WIDTH} 0 0)` : void 0, - height: "100%", - display: "flex", - textAlign: this.opts.textAlign.current, - opacity: "1", - color: "transparent", - pointerEvents: "all", - background: "transparent", - caretColor: "transparent", - border: "0 solid transparent", - outline: "0 solid transparent", - boxShadow: "none", - lineHeight: "1", - letterSpacing: "-.5em", - fontSize: "var(--bits-pin-input-root-height)", - fontFamily: "monospace", - fontVariantNumeric: "tabular-nums" - }))); - br(this, ch, () => { - var we; - const l = et(this, ja).current, - _ = this.opts.ref.current; - if (!l || !_) return; - if (this.domContext.getActiveElement() !== l) { - oe(et(this, za), null), oe(et(this, qa), null); - return - } - const C = l.selectionStart, - L = l.selectionEnd, - F = l.selectionDirection ?? "none", - T = l.maxLength, - o = l.value, - $ = x(et(this, Ds)).prev; - let W = -1, - ie = -1, - pe; - if (o.length !== 0 && C !== null && L !== null) { - const Re = C === L, - Ae = C === o.length && o.length < T; - if (Re && !Ae) { - const Oe = C; - if (Oe === 0) W = 0, ie = 1, pe = "forward"; - else if (Oe === T) W = Oe - 1, ie = Oe, pe = "backward"; - else if (T > 1 && o.length > 1) { - let Ee = 0; - if ($[0] !== null && $[1] !== null) { - pe = Oe < $[0] ? "backward" : "forward"; - const Ne = $[0] === $[1] && $[0] < T; - pe === "backward" && !Ne && (Ee = -1) - } - W = Ee - Oe, ie = Ee + Oe + 1 - } - } - W !== -1 && ie !== -1 && W !== ie && ((we = et(this, ja).current) == null || we.setSelectionRange(W, ie, pe)) - } - const ye = W !== -1 ? W : C, - X = ie !== -1 ? ie : L, - Se = pe ?? F; - oe(et(this, za), ye, !0), oe(et(this, qa), X, !0), x(et(this, Ds)).prev = [ye, X, Se] - }); - lr(this, "oninput", l => { - const _ = l.currentTarget.value.slice(0, this.opts.maxLength.current); - if (_.length > 0 && x(et(this, hs)) && !x(et(this, hs)).test(_)) { - l.preventDefault(); - return - } - typeof et(this, lc).current == "string" && _.length < et(this, lc).current.length && this.domContext.getDocument().dispatchEvent(new Event("selectionchange")), this.opts.value.current = _ - }); - lr(this, "onfocus", l => { - const _ = et(this, ja).current; - if (_) { - const C = Math.min(_.value.length, this.opts.maxLength.current - 1), - L = _.value.length; - _.setSelectionRange(C, L), oe(et(this, za), C, !0), oe(et(this, qa), L, !0) - } - et(this, Ls).current = !0 - }); - lr(this, "onpaste", l => { - var ie, pe, ye, X; - const _ = et(this, ja).current; - if (!_) return; - const C = Se => { - const we = _.selectionStart === null ? void 0 : _.selectionStart, - Re = _.selectionEnd === null ? void 0 : _.selectionEnd, - Ae = we !== Re, - Oe = this.opts.value.current; - return (Ae ? Oe.slice(0, we) + Se + Oe.slice(Re) : Oe.slice(0, we) + Se + Oe.slice(we)).slice(0, this.opts.maxLength.current) - }, - L = Se => Se.length > 0 && x(et(this, hs)) && !x(et(this, hs)).test(Se); - if (!((ie = this.opts.pasteTransformer) != null && ie.current) && (!et(this, cc).isIOS || !l.clipboardData || !_)) { - const Se = C((pe = l.clipboardData) == null ? void 0 : pe.getData("text/plain")); - L(Se) && l.preventDefault(); - return - } - const F = ((ye = l.clipboardData) == null ? void 0 : ye.getData("text/plain")) ?? "", - T = (X = this.opts.pasteTransformer) != null && X.current ? this.opts.pasteTransformer.current(F) : F; - l.preventDefault(); - const o = C(T); - if (L(o)) return; - _.value = o, this.opts.value.current = o; - const $ = Math.min(o.length, this.opts.maxLength.current - 1), - W = o.length; - _.setSelectionRange($, W), oe(et(this, za), $, !0), oe(et(this, qa), W, !0) - }); - lr(this, "onmouseover", l => { - oe(et(this, oc), !0) - }); - lr(this, "onmouseleave", l => { - oe(et(this, oc), !1) - }); - lr(this, "onblur", l => { - if (x(et(this, Ds)).willSyntheticBlur) { - x(et(this, Ds)).willSyntheticBlur = !1; - return - } - et(this, Ls).current = !1 - }); - br(this, uh, lt(() => { - var l; - return { - id: this.opts.inputId.current, - style: x(et(this, Fd)), - autocomplete: this.opts.autocomplete.current || "one-time-code", - "data-pin-input-input": "", - "data-pin-input-input-mss": x(et(this, za)), - "data-pin-input-input-mse": x(et(this, qa)), - inputmode: this.opts.inputmode.current, - pattern: (l = x(et(this, hs))) == null ? void 0 : l.source, - maxlength: this.opts.maxLength.current, - value: this.opts.value.current, - disabled: Q4(this.opts.disabled.current), - onpaste: this.onpaste, - oninput: this.oninput, - onkeydown: this.onkeydown, - onmouseover: this.onmouseover, - onmouseleave: this.onmouseleave, - onfocus: this.onfocus, - onblur: this.onblur, - ...this.inputAttachment - } - })); - br(this, Nd, lt(() => Array.from({ - length: this.opts.maxLength.current - }).map((l, _) => { - const C = et(this, Ls).current && x(et(this, za)) !== null && x(et(this, qa)) !== null && (x(et(this, za)) === x(et(this, qa)) && _ === x(et(this, za)) || _ >= x(et(this, za)) && _ < x(et(this, qa))), - L = this.opts.value.current[_] !== void 0 ? this.opts.value.current[_] : null; - return { - char: L, - isActive: C, - hasFakeCaret: C && L === null - } - }))); - br(this, hh, lt(() => ({ - cells: x(et(this, Nd)), - isFocused: et(this, Ls).current, - isHovering: x(et(this, oc)) - }))); - var _; - this.opts = l, this.attachment = Va(this.opts.ref), this.domContext = new H4(l.ref), Jn(this, cc, { - value: this.opts.value, - isIOS: typeof window < "u" && ((_ = window == null ? void 0 : window.CSS) == null ? void 0 : _.supports("-webkit-touch-callout", "none")) - }), Jn(this, so, Y6({ - containerRef: this.opts.ref, - inputRef: et(this, ja), - isFocused: et(this, Ls), - pushPasswordManagerStrategy: this.opts.pushPasswordManagerStrategy, - domContext: this.domContext - })), Ii(() => { - const C = et(this, ja).current, - L = this.opts.ref.current; - if (!C || !L) return; - et(this, cc).value.current !== C.value && (this.opts.value.current = C.value), x(et(this, Ds)).prev = [C.selectionStart, C.selectionEnd, C.selectionDirection ?? "none"]; - const F = Su(this.domContext.getDocument(), "selectionchange", et(this, ch), { - capture: !0 - }); - et(this, ch).call(this), this.domContext.getActiveElement() === C && (et(this, Ls).current = !0), this.domContext.getElementById("pin-input-style") || Fr(this, Od, Iv).call(this); - const T = () => { - L && L.style.setProperty("--bits-pin-input-root-height", `${C.clientHeight}px`) - }; - T(); - const o = new ResizeObserver(T); - return o.observe(C), () => { - F(), o.disconnect() - } - }), oo([() => this.opts.value.current, () => et(this, ja).current], () => { - Q6(() => { - const C = et(this, ja).current; - if (!C) return; - C.dispatchEvent(new Event("input")); - const L = C.selectionStart, - F = C.selectionEnd, - T = C.selectionDirection ?? "none"; - L !== null && F !== null && (oe(et(this, za), L, !0), oe(et(this, qa), F, !0), x(et(this, Ds)).prev = [L, F, T]) - }, this.domContext) - }), Zr(() => { - const C = this.opts.value.current, - L = et(this, lc).current, - F = this.opts.maxLength.current, - T = this.opts.onComplete.current; - L !== void 0 && C !== L && L.length < F && C.length === F && T(C) - }) - } - static create(l) { - return new wm(l) - } - get rootProps() { - return x(et(this, oh)) - } - set rootProps(l) { - oe(et(this, oh), l) - } - get inputWrapperProps() { - return x(et(this, lh)) - } - set inputWrapperProps(l) { - oe(et(this, lh), l) - } - get inputProps() { - return x(et(this, uh)) - } - set inputProps(l) { - oe(et(this, uh), l) - } - get snippetProps() { - return x(et(this, hh)) - } - set snippetProps(l) { - oe(et(this, hh), l) - } -}; -ja = new WeakMap, oc = new WeakMap, Ls = new WeakMap, za = new WeakMap, qa = new WeakMap, lc = new WeakMap, hs = new WeakMap, Ds = new WeakMap, so = new WeakMap, cc = new WeakMap, Bd = new WeakMap, oh = new WeakMap, lh = new WeakMap, Fd = new WeakMap, Od = new WeakSet, Iv = function() { - const l = this.domContext.getDocument(), - _ = l.createElement("style"); - if (_.id = "pin-input-style", l.head.appendChild(_), _.sheet) { - const C = "background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;"; - vu(_.sheet, "[data-pin-input-input]::selection { background: transparent !important; color: transparent !important; }"), vu(_.sheet, `[data-pin-input-input]:autofill { ${C} }`), vu(_.sheet, `[data-pin-input-input]:-webkit-autofill { ${C} }`), vu(_.sheet, "@supports (-webkit-touch-callout: none) { [data-pin-input-input] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"), vu(_.sheet, "[data-pin-input-input] + * { pointer-events: all !important; }") - } -}, ch = new WeakMap, uh = new WeakMap, Nd = new WeakMap, hh = new WeakMap; -let Uf = wm; -var dh; -const Tm = class Tm { - constructor(l) { - lr(this, "opts"); - lr(this, "attachment"); - br(this, dh, lt(() => ({ - id: this.opts.id.current, - [Pv.cell]: "", - "data-active": this.opts.cell.current.isActive ? "" : void 0, - "data-inactive": this.opts.cell.current.isActive ? void 0 : "", - ...this.attachment - }))); - this.opts = l, this.attachment = Va(this.opts.ref) - } - static create(l) { - return new Tm(l) - } - get props() { - return x(et(this, dh)) - } - set props(l) { - oe(et(this, dh), l) - } -}; -dh = new WeakMap; -let Zf = Tm; - -function Q6(b, l) { - const _ = l.setTimeout(b, 0), - C = l.setTimeout(b, 10), - L = l.setTimeout(b, 50); - return [_, C, L] -} - -function vu(b, l) { - try { - b.insertRule(l) - } catch { - console.error("pin input could not insert CSS rule:", l) - } -} -var eA = Ie("
                "); - -function tA(b, l) { - const _ = ts(); - Sr(l, !0); - let C = Et(l, "id", 19, () => Ua(_)), - L = Et(l, "inputId", 19, () => `${Ua(_)}-input`), - F = Et(l, "ref", 15, null), - T = Et(l, "maxlength", 3, 6), - o = Et(l, "textalign", 3, "left"), - $ = Et(l, "inputmode", 3, "numeric"), - W = Et(l, "onComplete", 3, Mu), - ie = Et(l, "pushPasswordManagerStrategy", 3, "increase-width"), - pe = Et(l, "class", 3, ""), - ye = Et(l, "autocomplete", 3, "one-time-code"), - X = Et(l, "disabled", 3, !1), - Se = Et(l, "value", 15, ""), - we = Et(l, "onValueChange", 3, Mu), - Re = Qt(l, ["$$slots", "$$events", "$$legacy", "id", "inputId", "ref", "maxlength", "textalign", "pattern", "inputmode", "onComplete", "pushPasswordManagerStrategy", "class", "children", "autocomplete", "disabled", "value", "onValueChange", "pasteTransformer"]); - const Ae = Uf.create({ - id: cr.with(() => C()), - ref: cr.with(() => F(), Je => F(Je)), - inputId: cr.with(() => L()), - autocomplete: cr.with(() => ye()), - maxLength: cr.with(() => T()), - textAlign: cr.with(() => o()), - disabled: cr.with(() => X()), - inputmode: cr.with(() => $()), - pattern: cr.with(() => l.pattern), - onComplete: cr.with(() => W()), - value: cr.with(() => Se(), Je => { - Se(Je), we()(Je) - }), - pushPasswordManagerStrategy: cr.with(() => ie()), - pasteTransformer: cr.with(() => l.pasteTransformer) - }), - Oe = lt(() => Da(Re, Ae.inputProps)), - Ee = lt(() => Da(Ae.rootProps, { - class: pe() - })), - Ne = lt(() => Da(Ae.inputWrapperProps, {})); - var ft = eA(); - er(ft, () => ({ - ...x(Ee) - })); - var ht = k(ft); - Ji(ht, () => l.children ?? fa, () => Ae.snippetProps); - var Xe = V(ht, 2); - er(Xe, () => ({ - ...x(Ne) - })); - var ct = k(Xe); - ea(ct), er(ct, () => ({ - ...x(Oe) - })), A(Xe), A(ft), H(b, ft), Pr() -} -var rA = Ie("
                "); - -function iA(b, l) { - const _ = ts(); - Sr(l, !0); - let C = Et(l, "id", 19, () => Ua(_)), - L = Et(l, "ref", 15, null), - F = Qt(l, ["$$slots", "$$events", "$$legacy", "id", "ref", "cell", "child", "children"]); - const T = Zf.create({ - id: cr.with(() => C()), - ref: cr.with(() => L(), ye => L(ye)), - cell: cr.with(() => l.cell) - }), - o = lt(() => Da(F, T.props)); - var $ = Jt(), - W = zt($); - { - var ie = ye => { - var X = Jt(), - Se = zt(X); - Ji(Se, () => l.child, () => ({ - props: x(o) - })), H(ye, X) - }, - pe = ye => { - var X = rA(); - er(X, () => ({ - ...x(o) - })); - var Se = k(X); - Ji(Se, () => l.children ?? fa), A(X), H(ye, X) - }; - Ue(W, ye => { - l.child ? ye(ie) : ye(pe, !1) - }) - } - H(b, $), Pr() -} - -function pc(...b) { - return Fg(Tu(b)) -} - -function nA(b, l) { - Sr(l, !0); - let _ = Et(l, "ref", 15, null), - C = Et(l, "value", 15, ""), - L = Qt(l, ["$$slots", "$$events", "$$legacy", "ref", "value", "class"]); - var F = Jt(), - T = zt(F); - { - let o = lt(() => pc("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", l.class)); - _n(T, () => T6, ($, W) => { - W($, lo({ - "data-slot": "command", - get class() { - return x(o) - } - }, () => L, { - get value() { - return C() - }, - set value(ie) { - C(ie) - }, - get ref() { - return _() - }, - set ref(ie) { - _(ie) - } - })) - }) - } - H(b, F), Pr() -} -var aA = Tr(''); - -function fc(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = aA(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} - -function sA(b, l) { - Sr(l, !0); - let _ = Et(l, "ref", 15, null), - C = Qt(l, ["$$slots", "$$events", "$$legacy", "ref", "class"]); - var L = Jt(), - F = zt(L); - { - let T = lt(() => pc("py-6 text-center text-sm", l.class)); - _n(F, () => S6, (o, $) => { - $(o, lo({ - "data-slot": "command-empty", - get class() { - return x(T) - } - }, () => C, { - get ref() { - return _() - }, - set ref(W) { - _(W) - } - })) - }) - } - H(b, L), Pr() -} -var oA = Ie(" ", 1); - -function lA(b, l) { - Sr(l, !0); - let _ = Et(l, "ref", 15, null), - C = Qt(l, ["$$slots", "$$events", "$$legacy", "ref", "class", "children", "heading", "value"]); - var L = Jt(), - F = zt(L); - { - let T = lt(() => pc("text-foreground overflow-hidden p-1", l.class)), - o = lt(() => l.value ?? l.heading ?? `----${m6()}`); - _n(F, () => I6, ($, W) => { - W($, lo({ - "data-slot": "command-group", - get class() { - return x(T) - }, - get value() { - return x(o) - } - }, () => C, { - get ref() { - return _() - }, - set ref(ie) { - _(ie) - }, - children: (ie, pe) => { - var ye = oA(), - X = zt(ye); - { - var Se = Re => { - var Ae = Jt(), - Oe = zt(Ae); - _n(Oe, () => A6, (Ee, Ne) => { - Ne(Ee, { - class: "text-muted-foreground px-2 py-1.5 text-xs font-medium", - children: (ft, ht) => { - fi(); - var Xe = Fn(); - Ge(() => fe(Xe, l.heading)), H(ft, Xe) - }, - $$slots: { - default: !0 - } - }) - }), H(Re, Ae) - }; - Ue(X, Re => { - l.heading && Re(Se) - }) - } - var we = V(X, 2); - _n(we, () => z6, (Re, Ae) => { - Ae(Re, { - get children() { - return l.children - } - }) - }), H(ie, ye) - }, - $$slots: { - default: !0 - } - })) - }) - } - H(b, L), Pr() -} - -function cA(b, l) { - Sr(l, !0); - let _ = Et(l, "ref", 15, null), - C = Qt(l, ["$$slots", "$$events", "$$legacy", "ref", "class"]); - var L = Jt(), - F = zt(L); - { - let T = lt(() => pc("aria-selected:bg-base-300 aria-selected:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", l.class)); - _n(F, () => F6, (o, $) => { - $(o, lo({ - "data-slot": "command-item", - get class() { - return x(T) - } - }, () => C, { - get ref() { - return _() - }, - set ref(W) { - _(W) - } - })) - }) - } - H(b, L), Pr() -} -var uA = Tr(''); - -function hA(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = uA(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var dA = Ie('
                '); - -function pA(b, l) { - Sr(l, !0); - let _ = Et(l, "ref", 15, null), - C = Et(l, "value", 15, ""), - L = Qt(l, ["$$slots", "$$events", "$$legacy", "ref", "class", "value"]); - var F = dA(), - T = k(F); - hA(T, { - class: "size-5 opacity-50" - }); - var o = V(T, 2); - { - let $ = lt(() => pc("placeholder:text-muted-foreground outline-hidden flex h-10 w-full rounded-md bg-transparent py-3 text-sm disabled:cursor-not-allowed disabled:opacity-50", l.class)); - _n(o, () => D6, (W, ie) => { - ie(W, lo({ - "data-slot": "command-input", - get class() { - return x($) - } - }, () => L, { - get ref() { - return _() - }, - set ref(pe) { - _(pe) - }, - get value() { - return C() - }, - set value(pe) { - C(pe) - } - })) - }) - } - A(F), H(b, F), Pr() -} - -function fA(b, l) { - Sr(l, !0); - let _ = Et(l, "ref", 15, null), - C = Qt(l, ["$$slots", "$$events", "$$legacy", "ref", "class"]); - var L = Jt(), - F = zt(L); - { - let T = lt(() => pc("max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden", l.class)); - _n(F, () => N6, (o, $) => { - $(o, lo({ - "data-slot": "command-list", - get class() { - return x(T) - } - }, () => C, { - get ref() { - return _() - }, - set ref(W) { - _(W) - } - })) - }) - } - H(b, L), Pr() -} -var mA = Tr(''); - -function _A(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = mA(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var gA = Ie(" ", 1), - vA = Ie(' ', 1), - yA = Ie(' '), - xA = Ie(" ", 1), - bA = Ie(" ", 1), - wA = (b, l) => { - l(0) - }, - TA = Ie(''), - CA = Ie('
                '); - -function wg(b, l) { - Sr(l, !0); - let _ = Et(l, "countryId", 15, 0), - C = Et(l, "dropdownDirection", 3, "right"), - L = nt(null), - F = nt(null), - T = nt(""); - - function o() { - Mg().then(() => { - var Ee; - (Ee = document.activeElement) == null || Ee.blur(), oe(T, "") - }) - } - var $ = CA(), - W = k($), - ie = k(W), - pe = k(ie); - { - var ye = Ee => { - var Ne = gA(), - ft = zt(Ne), - ht = k(ft, !0); - A(ft); - var Xe = V(ft, 2); - _A(Xe, { - class: "size-3.5" - }), Ge(ct => fe(ht, ct), [() => Vg()]), H(Ee, Ne) - }, - X = Ee => { - const Ne = lt(() => ds(_())); - var ft = vA(), - ht = zt(ft), - Xe = k(ht, !0); - A(ht); - var ct = V(ht); - Ge(() => { - fe(Xe, x(Ne).flag), fe(ct, ` ${x(Ne).name??""}`) - }), H(Ee, ft) - }; - Ue(pe, Ee => { - _() === 0 ? Ee(ye) : Ee(X, !1) - }) - } - A(ie); - var Se = V(ie, 2); - let we; - var Re = k(Se); - _n(Re, () => nA, (Ee, Ne) => { - Ne(Ee, { - children: (ft, ht) => { - var Xe = bA(), - ct = zt(Xe); - _n(ct, () => pA, (Be, st) => { - st(Be, { - placeholder: "Country", - get ref() { - return x(L) - }, - set ref(it) { - oe(L, it) - }, - get value() { - return x(T) - }, - set value(it) { - oe(T, it, !0) - } - }) - }); - var Je = V(ct, 2); - _n(Je, () => fA, (Be, st) => { - st(Be, { - children: (it, Qe) => { - var ke = xA(), - vt = zt(ke); - _n(vt, () => sA, (te, _e) => { - _e(te, { - children: (ne, Pe) => { - fi(); - var Me = Fn(); - Ge(at => fe(Me, at), [() => b2()]), H(ne, Me) - }, - $$slots: { - default: !0 - } - }) - }); - var Q = V(vt, 2); - _n(Q, () => lA, (te, _e) => { - _e(te, { - children: (ne, Pe) => { - var Me = Jt(), - at = zt(Me); - nn(at, 17, () => $n.countries, We => We.id, (We, Ct) => { - var _t = Jt(), - xt = zt(_t); - _n(xt, () => cA, (tt, pt) => { - pt(tt, { - get value() { - return x(Ct).name - }, - onSelect: () => { - _(x(Ct).id), o() - }, - children: (It, ut) => { - var bt = yA(), - wt = k(bt), - dt = k(wt, !0); - A(wt); - var Lt = V(wt); - A(bt), Ge(() => { - fe(dt, x(Ct).flag), fe(Lt, ` ${x(Ct).name??""}`) - }), H(It, bt) - }, - $$slots: { - default: !0 - } - }) - }), H(We, _t) - }), H(ne, Me) - }, - $$slots: { - default: !0 - } - }) - }), H(it, ke) - }, - $$slots: { - default: !0 - } - }) - }), H(ft, Xe) - }, - $$slots: { - default: !0 - } - }) - }), A(Se), A(W); - var Ae = V(W, 2); - { - var Oe = Ee => { - var Ne = TA(); - Ne.__click = [wA, _]; - var ft = k(Ne); - fc(ft, { - class: "size-3.5" - }), A(Ne), H(Ee, Ne) - }; - Ue(Ae, Ee => { - _() != 0 && Ee(Oe) - }) - } - A($), ps($, Ee => oe(F, Ee), () => x(F)), Ge(Ee => we = Or(Se, 1, "dropdown-content menu bg-base-100 rounded-box z-1 border-base-content/10 w-52 rounded-lg border py-1 shadow-sm", null, we, Ee), [() => ({ - "right-1": C() === "left" - })]), an("focus", ie, () => { - x(L).focus() - }), H(b, $), Pr() -} -Wi(["click"]); -var SA = Tr(''); - -function PA(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = SA(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var IA = Tr(''), - MA = Tr(''); - -function $f(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy", "filled"]); - var C = Jt(), - L = zt(C); - { - var F = o => { - var $ = IA(); - er($, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(o, $) - }, - T = o => { - var $ = MA(); - er($, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(o, $) - }; - Ue(L, o => { - l.filled ? o(F) : o(T, !1) - }) - } - H(b, C) -} -var AA = Ie(''), - kA = Ie('
                '), - EA = Ie('
                '), - zA = (b, l, _) => { - l.onvisitclick({ - lat: x(_).lastLatitude, - lng: x(_).lastLongitude - }) - }, - LA = Ie(' '), - DA = Ie('

                '), - RA = Ie(' '), - BA = Ie('

                '), - FA = Ie(' '), - OA = Ie(" "), - NA = Ie('
                '), - jA = Ie('

                '), - qA = Ie(' '), - VA = Ie('

                '), - UA = Ie('
                '), - ZA = Ie('
                ', 1); - -function $A(b, l) { - Sr(l, !0); - const _ = []; - let C = nt(1e3); - const L = lt(() => x(C) <= 640); - let F = nt("today"), - T = { - regions: { - label: UT(), - icon: Wf - }, - countries: { - label: GT(), - icon: PA - }, - players: { - label: Xg(), - icon: Xd - }, - alliances: { - label: Kg(), - icon: Kd - } - }, - o = nt("regions"), - $ = nt(0), - W = zn({ - players: {}, - alliances: {}, - regions: {}, - countries: {} - }), - ie = lt(() => { - var Xe, ct, Je; - return x(o) === "regions" ? (ct = (Xe = W[x(o)][x($)]) == null ? void 0 : Xe[x(F)]) == null ? void 0 : ct.entries : (Je = W[x(o)][x(F)]) == null ? void 0 : Je.entries - }); - const pe = 5 * 1e3; - Zr(() => { - var Be; - if (!l.open) return; - const Xe = x(F), - ct = x(o), - Je = x($); - ct === "players" && (!W[ct][Xe] || Date.now() - W[ct][Xe].time > pe) ? ni.leaderboardPlayers(Xe).then(st => { - W[ct][Xe] = { - time: Date.now(), - entries: st - } - }).catch(st => qr.error(st.message)) : ct === "alliances" && (!W[ct][Xe] || Date.now() - W[ct][Xe].time > pe) ? ni.leaderboardAlliances(Xe).then(st => { - W[ct][Xe] = { - time: Date.now(), - entries: st - } - }).catch(st => qr.error(st.message)) : ct === "countries" && (!W[ct][Xe] || Date.now() - W[ct][Xe].time > pe) ? ni.leaderboardCountries(Xe).then(st => { - W[ct][Xe] = { - time: Date.now(), - entries: st - } - }).catch(st => qr.error(st.message)) : ct === "regions" && (!((Be = W[ct][Je]) != null && Be[Xe]) || Date.now() - W[ct][Je][Xe].time > pe) && ni.leaderboardRegions(Xe, Je).then(st => { - W[ct][Je] || (W[ct][Je] = {}), W[ct][Je][Xe] = { - time: Date.now(), - entries: st - } - }).catch(st => qr.error(st.message)) - }); - var ye = ZA(), - X = zt(ye); - nn(X, 21, () => Object.entries(T), ([Xe, { - label: ct, - icon: Je - }]) => Xe, (Xe, ct) => { - var Je = lt(() => Ag(x(ct), 2)); - let Be = () => x(Je)[0], - st = () => x(Je)[1].label, - it = () => x(Je)[1].icon; - const Qe = lt(it); - var ke = AA(), - vt = k(ke); - ea(vt); - var Q, te = V(vt, 2); - _n(te, () => x(Qe), (ne, Pe) => { - Pe(ne, { - get this() { - return it() - }, - class: "mr-1 size-5 max-sm:hidden" - }) - }); - var _e = V(te); - A(ke), Ge(() => { - zr(vt, "aria-label", st()), Q !== (Q = Be()) && (vt.value = (vt.__value = Be()) ?? ""), fe(_e, ` ${st()??""}`) - }), Vd(_, [], vt, () => (Be(), x(o)), ne => oe(o, ne)), H(Xe, ke) - }), A(X); - var Se = V(X, 2), - we = k(Se); - sm(we, { - get value() { - return x(F) - }, - set value(Xe) { - oe(F, Xe, !0) - } - }); - var Re = V(we, 2); - { - var Ae = Xe => { - wg(Xe, { - dropdownDirection: "left", - get countryId() { - return x($) - }, - set countryId(ct) { - oe($, ct, !0) - } - }) - }; - Ue(Re, Xe => { - x(o) === "regions" && !x(L) && Xe(Ae) - }) - } - A(Se); - var Oe = V(Se, 2); - { - var Ee = Xe => { - var ct = kA(), - Je = k(ct); - wg(Je, { - get countryId() { - return x($) - }, - set countryId(Be) { - oe($, Be, !0) - } - }), A(ct), H(Xe, ct) - }; - Ue(Oe, Xe => { - x(o) === "regions" && x(L) && Xe(Ee) - }) - } - var Ne = V(Oe, 2); - { - var ft = Xe => { - var ct = EA(), - Je = k(ct), - Be = V(Je); - { - var st = Qe => { - var ke = Fn(); - Ge(vt => fe(ke, vt), [() => Wd().toLowerCase()]), H(Qe, ke) - }, - it = Qe => { - var ke = Jt(), - vt = zt(ke); - { - var Q = _e => { - var ne = Fn(); - Ge(Pe => fe(ne, Pe), [() => Qf()]), H(_e, ne) - }, - te = _e => { - var ne = Jt(), - Pe = zt(ne); - { - var Me = at => { - var We = Fn(); - Ge(Ct => fe(We, Ct), [() => em()]), H(at, We) - }; - Ue(Pe, at => { - x(F) === "month" && at(Me) - }, !0) - } - H(_e, ne) - }; - Ue(vt, _e => { - x(F) === "week" ? _e(Q) : _e(te, !1) - }, !0) - } - H(Qe, ke) - }; - Ue(Be, Qe => { - x(F) === "today" ? Qe(st) : Qe(it, !1) - }) - } - A(ct), Ge(Qe => fe(Je, `${Qe??""} `), [() => Jf()]), H(Xe, ct) - }, - ht = Xe => { - var ct = Jt(), - Je = zt(ct); - { - var Be = it => { - var Qe = Jt(), - ke = zt(Qe); - { - var vt = te => { - const _e = lt(() => x(ie)); - var ne = DA(), - Pe = k(ne), - Me = k(Pe), - at = V(k(Me)), - We = k(at, !0); - A(at); - var Ct = V(at), - _t = k(Ct), - xt = V(_t, 2), - tt = V(xt), - pt = k(tt); - $f(pt, { - class: "text-base-content/50 mb-0.5 ml-1 inline size-4" - }), A(tt), A(Ct), fi(), A(Me), A(Pe); - var It = V(Pe); - nn(It, 31, () => x(_e), ut => ut.id, (ut, bt, wt) => { - const dt = lt(() => ds(x(bt).countryId)); - var Lt = LA(), - Xt = k(Lt), - Yt = k(Xt, !0); - A(Xt); - var nr = V(Xt), - ar = k(nr), - Ft = k(ar, !0); - A(ar); - var dr = V(ar, 2), - _r = k(dr), - Ir = V(_r), - jr = k(Ir); - A(Ir), A(dr), A(nr); - var ur = V(nr), - Mr = k(ur, !0); - A(ur); - var Ar = V(ur), - kr = k(Ar); - kr.__click = [zA, l, bt]; - var Nr = k(kr, !0); - A(kr), A(Ar), A(Lt), Ge((ce, O, q) => { - fe(Yt, x(wt) + 1), zr(ar, "data-tip", x(dt).name), fe(Ft, x(dt).flag), Or(dr, 1, `font-semibold ${ce??""}`), fe(_r, `${x(bt).name??""} `), fe(jr, ``), fe(Mr, O), fe(Nr, q) - }, [() => Zn(x(bt).cityId), () => x(bt).pixelsPainted.toLocaleString("en-US"), () => c3()]), Zo(Lt, () => $o, () => ({ - duration: 200 - })), H(ut, Lt) - }), A(It), A(ne), Ge((ut, bt, wt, dt) => { - fe(We, ut), fe(_t, `${bt??""} `), fe(xt, `${wt??""} `), zr(tt, "data-tip", dt) - }, [() => QT(), () => Ql(), () => ec().toLowerCase(), () => s3()]), H(te, ne) - }, - Q = te => { - var _e = Jt(), - ne = zt(_e); - { - var Pe = at => { - var We = BA(), - Ct = k(We), - _t = k(Ct), - xt = V(k(_t)), - tt = k(xt, !0); - A(xt); - var pt = V(xt), - It = k(pt), - ut = V(It, 2), - bt = V(ut), - wt = k(bt); - $f(wt, { - class: "text-base-content/50 mb-0.5 ml-1 inline size-4" - }), A(bt), A(pt), A(_t), A(Ct); - var dt = V(Ct); - nn(dt, 31, () => x(ie), Lt => Lt.id, (Lt, Xt, Yt) => { - const nr = lt(() => ds(x(Xt).id)); - var ar = RA(), - Ft = k(ar), - dr = k(Ft, !0); - A(Ft); - var _r = V(Ft), - Ir = k(_r), - jr = k(Ir, !0); - A(Ir); - var ur = V(Ir, 2), - Mr = k(ur, !0); - A(ur), A(_r); - var Ar = V(_r), - kr = k(Ar, !0); - A(Ar), A(ar), Ge((Nr, ce) => { - fe(dr, x(Yt) + 1), zr(Ir, "data-tip", x(nr).name), fe(jr, x(nr).flag), Or(ur, 1, `font-semibold ${Nr??""}`), fe(Mr, x(nr).name), fe(kr, ce) - }, [() => Zn(x(Xt).id), () => x(Xt).pixelsPainted.toLocaleString("en-US")]), Zo(ar, () => $o, () => ({ - duration: 200 - })), H(Lt, ar) - }), A(dt), A(We), Ge((Lt, Xt, Yt, nr) => { - fe(tt, Lt), fe(It, `${Xt??""} `), fe(ut, `${Yt??""} `), zr(bt, "data-tip", nr) - }, [() => Vg(), () => Ql(), () => ec().toLowerCase(), () => N3()]), H(at, We) - }, - Me = at => { - var We = Jt(), - Ct = zt(We); - { - var _t = tt => { - const pt = lt(() => x(ie)); - var It = jA(), - ut = k(It), - bt = k(ut), - wt = V(k(bt)), - dt = k(wt, !0); - A(wt); - var Lt = V(wt), - Xt = k(Lt), - Yt = V(Xt, 2, !0); - A(Lt), A(bt), A(ut); - var nr = V(ut); - nn(nr, 31, () => x(pt), ar => ar.id, (ar, Ft, dr) => { - const _r = lt(() => { - var xe; - return ((xe = Dt.data) == null ? void 0 : xe.id) === x(Ft).id - }); - var Ir = NA(); - let jr; - var ur = k(Ir), - Mr = k(ur, !0); - A(ur); - var Ar = V(ur), - kr = k(Ar), - Nr = k(kr); - es(Nr, { - class: "size-8 border sm:size-10", - get userId() { - return x(Ft).id - }, - get pictureUrl() { - return x(Ft).picture - } - }); - var ce = V(Nr, 2), - O = k(ce), - q = k(O), - G = V(q), - K = k(G); - A(G), A(O); - var le = V(O, 2); - { - var ve = xe => { - const At = lt(() => ds(x(Ft).equippedFlag)); - var Pt = FA(), - kt = k(Pt, !0); - A(Pt), Ge(() => { - zr(Pt, "data-tip", x(At).name), fe(kt, x(At).flag) - }), H(xe, Pt) - }; - Ue(le, xe => { - x(Ft).equippedFlag && xe(ve) - }) - } - var Le = V(le, 2); - { - var Ce = xe => { - ph(xe, { - get username() { - return x(Ft).discord - } - }) - }; - Ue(Le, xe => { - x(Ft).discord && xe(Ce) - }) - } - var Ze = V(Le, 2); - { - var ot = xe => { - var At = OA(), - Pt = k(At, !0); - A(At), Ge((kt, Wt) => { - Or(At, 1, `badge badge-sm ml-0.5 border-0 ${kt??""} ${Wt??""}`), fe(Pt, x(Ft).allianceName) - }, [() => Kf(x(Ft).allianceId), () => Zn(x(Ft).allianceId)]), H(xe, At) - }; - Ue(Ze, xe => { - "allianceName" in x(Ft) && x(Ft).allianceName && xe(ot) - }) - } - A(ce), A(kr), A(Ar); - var Ye = V(Ar), - Ot = k(Ye, !0); - A(Ye), A(Ir), Ge((xe, At, Pt) => { - jr = Or(Ir, 1, "", null, jr, xe), fe(Mr, x(dr) + 1), Or(O, 1, `font-semibold max-sm:ml-2 ${At??""} flex gap-1`), fe(q, `${x(Ft).name??""} `), fe(K, `#${x(Ft).id??""}`), fe(Ot, Pt) - }, [() => ({ - "bg-base-200": x(_r) - }), () => Zn(x(Ft).id), () => x(Ft).pixelsPainted.toLocaleString("en-US")]), Zo(Ir, () => $o, () => ({ - duration: 200 - })), H(ar, Ir) - }), A(nr), A(It), Ge((ar, Ft, dr) => { - fe(dt, ar), fe(Xt, `${Ft??""} `), fe(Yt, dr) - }, [() => tm(), () => Ql(), () => ec().toLowerCase()]), H(tt, It) - }, - xt = tt => { - var pt = Jt(), - It = zt(pt); - { - var ut = bt => { - var wt = VA(), - dt = k(wt), - Lt = k(dt), - Xt = V(k(Lt)), - Yt = k(Xt, !0); - A(Xt); - var nr = V(Xt), - ar = k(nr), - Ft = V(ar, 2, !0); - A(nr), A(Lt), A(dt); - var dr = V(dt); - nn(dr, 31, () => x(ie), _r => _r.id, (_r, Ir, jr) => { - const ur = lt(() => { - var le; - return ((le = Dt.data) == null ? void 0 : le.allianceId) === x(Ir).id - }); - var Mr = qA(); - let Ar; - var kr = k(Mr), - Nr = k(kr, !0); - A(kr); - var ce = V(kr), - O = k(ce), - q = k(O, !0); - A(O), A(ce); - var G = V(ce), - K = k(G, !0); - A(G), A(Mr), Ge((le, ve, Le) => { - Ar = Or(Mr, 1, "", null, Ar, le), fe(Nr, x(jr) + 1), Or(O, 1, `font-semibold ${ve??""}`), fe(q, x(Ir).name), fe(K, Le) - }, [() => ({ - "bg-base-200": x(ur) - }), () => Zn(x(Ir).id), () => x(Ir).pixelsPainted.toLocaleString("en-US")]), Zo(Mr, () => $o, () => ({ - duration: 200 - })), H(_r, Mr) - }), A(dr), A(wt), Ge((_r, Ir, jr) => { - fe(Yt, _r), fe(ar, `${Ir??""} `), fe(Ft, jr) - }, [() => Gd(), () => Ql(), () => ec().toLowerCase()]), H(bt, wt) - }; - Ue(It, bt => { - x(o) === "alliances" && bt(ut) - }, !0) - } - H(tt, pt) - }; - Ue(Ct, tt => { - x(o) === "players" ? tt(_t) : tt(xt, !1) - }, !0) - } - H(at, We) - }; - Ue(ne, at => { - x(o) === "countries" ? at(Pe) : at(Me, !1) - }, !0) - } - H(te, _e) - }; - Ue(ke, te => { - x(o) === "regions" ? te(vt) : te(Q, !1) - }) - } - H(it, Qe) - }, - st = it => { - var Qe = UA(); - H(it, Qe) - }; - Ue(Je, it => { - x(ie) ? it(Be) : it(st, !1) - }, !0) - } - H(Xe, ct) - }; - Ue(Ne, Xe => { - x(ie) && x(ie).length === 0 ? Xe(ft) : Xe(ht, !1) - }) - } - $d("innerWidth", Xe => oe(C, Xe, !0)), H(b, ye), Pr() -} -Wi(["click"]); -var GA = Tr(''); - -function Mv(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = GA(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var HA = Ie(' '); - -function WA(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15); - Ii(() => { - const pe = ye => { - ye.key === "Escape" && _(!1) - }; - return document.addEventListener("keydown", pe), () => document.removeEventListener("keydown", pe) - }); - var C = HA(), - L = k(C), - F = V(k(L), 2), - T = k(F); - Mv(T, { - class: "size-6" - }); - var o = V(T, 2), - $ = k(o, !0); - A(o), A(F); - var W = V(F, 2), - ie = k(W); - $A(ie, { - get onvisitclick() { - return l.onvisitclick - }, - get open() { - return _() - } - }), A(W), A(L), fi(2), A(C), On(C, () => pe => { - Zr(() => { - _() ? pe.show() : pe.close() - }) - }), Ge(pe => fe($, pe), [() => Yf()]), an("close", C, () => _(!1)), H(b, C), Pr() -} -var XA = Ie("
                "), - KA = Ie(' '); - -function YA(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15); - Ii(() => { - const o = $ => { - $.key === "Escape" && _(!1) - }; - return document.addEventListener("keydown", o), () => document.removeEventListener("keydown", o) - }); - var C = KA(), - L = k(C), - F = V(k(L), 2); - { - var T = o => { - var $ = XA(), - W = k($); - xx(W, {}), A($), En(2, $, () => Qn, () => ({ - duration: 300 - })), H(o, $) - }; - Ue(F, o => { - _() && o(T) - }) - } - A(L), fi(2), A(C), On(C, () => o => { - Zr(() => { - _() ? o.show() : o.close() - }) - }), an("close", C, () => _(!1)), H(b, C), Pr() -} -var JA = (b, l, _) => { - localStorage.setItem(x(l), "true"), oe(_, !1) - }, - QA = Ie('new'), - ek = Ie("
                "); - -function _f(b, l) { - Sr(l, !0); - let _ = nt(!1); - const C = lt(() => "showed:" + l.key); - Ii(() => { - oe(_, !localStorage.getItem(x(C))) - }); - var L = ek(); - L.__click = [JA, C, _]; - var F = k(L); - { - var T = $ => { - var W = QA(); - En(3, W, () => Qn, () => ({ - duration: 200 - })), H($, W) - }; - Ue(F, $ => { - x(_) && $(T) - }) - } - var o = V(F, 2); - Ji(o, () => l.children), A(L), Ge(() => Or(L, 1, `indicator ${l.class??""}`)), H(b, L), Pr() -} -Wi(["click"]); -// -var tk = Ie("

                " + Text1() + "

                "); - -function rk(b, l) { - Sr(l, !1), Og(); - var _ = tk(), - C = V(k(_), 2); - A(_), Ge(L => fe(C, ` `+Text2()+` ${L??""}`), [() => zd(Dt.cooldown ?? 0)]), H(b, _), Pr() -} -var ik = Ie(""); - -function Av(b, l) { - Sr(l, !0); - let _ = Et(l, "width", 15, 0), - C = Qt(l, ["$$slots", "$$events", "$$legacy", "value", "fontSize", "color", "weight", "mono", "width"]), - L = lt(() => Math.ceil(l.fontSize)), - F = nt(null); - const T = window.devicePixelRatio ?? 1, - o = '"Geist", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"', - $ = '"Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'; - Zr(() => { - const ie = x(F).getContext("2d"); - ie.textBaseline = "top", ie.font = `${l.weight??"normal"} ${l.fontSize}px ${l.mono?$:o}`, ie.fillStyle = l.color ?? "#394e6a", ie.setTransform(T, 0, 0, T, 0, 0), ie.clearRect(0, 0, _(), x(L)), ie.fillText(l.value, 0, 0); - const pe = ie.measureText(l.value); - _(Math.ceil(pe.actualBoundingBoxRight)), oe(L, pe.actualBoundingBoxDescent) - }); - var W = ik(); - er(W, () => ({ - width: _() * T, - height: x(L) * T, - style: `width: ${_()??""}px; height: ${x(L)??""}px`, - ...C - })), ps(W, ie => oe(F, ie), () => x(F)), H(b, W), Pr() -} -var nk = Ie(' '), - ak = Ie(' '), - sk = Ie(''), - ok = Ie(''); - -function kv(b, l) { - Sr(l, !0); - let _ = Qt(l, ["$$slots", "$$events", "$$legacy", "loading", "charges"]), - C = nt(0); - var L = ok(); - er(L, () => ({ - ..._, - class: `btn btn-primary btn-lg sm:btn-xl relative ${l.class??""}` - })); - var F = k(L); - fh(F, { - class: "size-6" - }); - var T = V(F, 2), - o = k(T), - $ = V(o); - { - var W = ye => { - const X = lt(() => `${Math.floor(l.charges)}/${Dt.data.charges.max}`); - var Se = ak(), - we = k(Se), - Re = k(we); - { - let Ee = lt(() => l.disabled ? "#394e6a33" : "#ffffff"); - Av(Re, { - weight: 600, - fontSize: 16, - get value() { - return x(X) - }, - get color() { - return x(Ee) - }, - get width() { - return x(C) - }, - set width(Ne) { - oe(C, Ne, !0) - } - }) - } - A(we); - var Ae = V(we, 2); - { - var Oe = Ee => { - var Ne = nk(), - ft = k(Ne); - A(Ne), Ge(ht => fe(ft, `(${ht??""})`), [() => zd(Dt.cooldown)]), H(Ee, Ne) - }; - Ue(Ae, Ee => { - l.charges < Dt.data.charges.max && Dt.cooldown !== void 0 && Ee(Oe) - }) - } - A(Se), Ge(Ee => uc(we, `width: ${Ee??""}px`), [() => (Math.floor(x(C) / 5) + 1) * 5]), H(ye, Se) - }; - Ue($, ye => { - l.charges !== void 0 && Dt.data && ye(W) - }) - } - A(T); - var ie = V(T, 2); - { - var pe = ye => { - var X = sk(); - H(ye, X) - }; - Ue(ie, ye => { - l.loading && ye(pe) - }) - } - A(L), Ge(ye => fe(o, `${ye??""} `), [() => Zg()]), H(b, L), Pr() -} -const lk = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAABVQTFRFAAAASkKEenHEta7xWmmLi5y0v8vc+SuCVQAAAAF0Uk5TAEDm2GYAAAA/SURBVHjaXcjBDcAwDMNAUW28/8hF0MCIzN9RV7aVfuxp+IGPe+AdPQRpFaRrgcNrn/Bb4LAE4W5aNb3TXUofoSgBYpzN5I4AAAAASUVORK5CYII=", - ck = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAFxJREFUeNq107EJACAMRFEHyxSu4jbuZ+0IyhUS4ZDogYEr3++Svp+ZDUzGrRTMIwKmiIApImCKiBgbOXOEcRxQsQcW7rVKeA9gj5gD2D3mgC/GcQSLMEdO+/qtE+/GV5duYCOPAAAAAElFTkSuQmCC", - uk = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAAXNSR0IArs4c6QAAAAJ0Uk5TAAB2k804AAAAKklEQVR42mOAAhsbCA3n//9vQ74ApqE2QIAgwIqBykFaICwMAQwt9HEpAIf2Me1Ro5Q9AAAAAElFTkSuQmCC", - hk = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAAXNSR0IArs4c6QAAABVJREFUeNpjYGA48x8DYwoB1Q0RlQDDCVmniJ241gAAAABJRU5ErkJggg=="; -class dk { - constructor(l) { - lr(this, "gm"); - lr(this, "opacity", 1); - lr(this, "id", `paint-preview-${Math.random()}`); - lr(this, "tiles", new Map); - this.input = l, this.gm = new hc(this.input.tileSize) - } - place([l, _], C) { - const { - tile: L, - pixel: F - } = this.gm.latLonToTileAndPixel(l, _, this.input.tileZoom), T = this.getTileKey(L[0], L[1]); - let o = this.tiles.get(T); - if (!o) { - const $ = this.gm.tileBoundsLatLon(L[0], L[1], this.input.tileZoom), - W = rm($, !0), - ie = new pk({ - coordinates: W, - id: `${this.id}-${T}`, - layerPaint: { - "raster-opacity": this.opacity, - "raster-resampling": "nearest" - }, - tileSize: this.input.tileSize, - beforeLayerId: this.input.beforeLayerId - }); - ie.addTo(this.input.map), this.tiles.set(T, ie), o = ie - } - o.place(F[0], this.input.tileSize - F[1] - 1, C) - } - clear() { - const l = this.input.map; - for (const _ of this.tiles.values()) _.removeFrom(l), _.removeDOM(); - this.tiles.clear() - } - clearAndPlace(l, _) { - this.clear(), this.place(l, _) - } - remove([l, _]) { - const { - tile: C, - pixel: L - } = this.gm.latLonToTileAndPixel(l, _, this.input.tileZoom), F = this.getTileKey(C[0], C[1]), T = this.tiles.get(F); - T && T.remove(L[0], this.input.tileSize - L[1] - 1) - } - setCanvasOpacity(l) { - this.opacity = l; - for (const _ of this.tiles.values()) _.setOpacity(l) - } - getTileKey(l, _) { - return `${l},${_}` - } -} -class pk { - constructor(l) { - lr(this, "canvas"); - lr(this, "maps", new Set); - this.input = l; - const _ = this.input.tileSize; - this.canvas = document.createElement("canvas"), this.canvas.width = _, this.canvas.height = _ - } - place(l, _, C) { - var T; - const L = ((T = $n.colors) == null ? void 0 : T[C]) ?? $n.colors[0], - F = this.canvas.getContext("2d"); - if (F) { - const o = F.createImageData(1, 1), - [$, W, ie] = L.rgb, - pe = C === 0 ? 0 : 255; - o.data[0] = $, o.data[1] = W, o.data[2] = ie, o.data[3] = pe, F.putImageData(o, l, _) - } - } - remove(l, _) { - const C = this.canvas.getContext("2d"); - C && C.clearRect(l, _, 1, 1) - } - addTo(l) { - const _ = this.input.id; - l.getSource(_) || l.addSource(_, { - type: "canvas", - canvas: this.canvas, - coordinates: this.input.coordinates - }), l.getLayer(_) || (l.addLayer({ - id: _, - type: "raster", - source: _, - paint: this.input.layerPaint - }), this.input.beforeLayerId && l.moveLayer(_, this.input.beforeLayerId)), this.maps.add(l) - } - removeFrom(l) { - const { - id: _ - } = this.input; - l.getLayer(_) && l.removeLayer(_), l.getSource(_) && l.removeSource(_), this.maps.delete(l) - } - removeDOM() { - this.canvas.remove() - } - setOpacity(l) { - for (const _ of this.maps.values()) _.setPaintProperty(this.input.id, "raster-opacity", l) - } -} -var fk = Tr(''); - -function mk(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = fk(); - er(C, () => ({ - viewBox: "0 0 24 24", - fill: "currentColor", - xmlns: "http://www.w3.org/2000/svg", - ..._ - })), H(b, C) -} -var _k = Tr(''); - -function gk(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = _k(); - er(C, () => ({ - viewBox: "0 0 24 24", - fill: "currentColor", - xmlns: "http://www.w3.org/2000/svg", - ..._ - })), H(b, C) -} -var vk = Ie("
                "); - -function Kl(b, l) { - Sr(l, !0); - var _ = vk(), - C = k(_); - Ji(C, () => l.children ?? fa), A(_), Ge(() => Or(_, 1, `bg-base-100/60 border-base-content/20 -top-15 pointer-events-none absolute left-1/2 line-clamp-1 flex w-max -translate-x-1/2 select-none items-center gap-1 rounded-full border-2 px-3 py-1.5 ${l.class??""}`)), H(b, _), Pr() -} -var yk = Ie('
                '), - xk = Ie("
                "); - -function hm(b, l) { - Sr(l, !0); - const _ = Et(l, "size", 3, 10), - C = Et(l, "x", 19, () => [-.5, .5]), - L = Et(l, "y", 19, () => [.25, 1]), - F = Et(l, "duration", 3, 2e3), - T = Et(l, "infinite", 3, !1), - o = Et(l, "delay", 19, () => [0, 50]), - $ = Et(l, "colorRange", 19, () => [0, 360]), - W = Et(l, "colorArray", 19, () => []), - ie = Et(l, "amount", 3, 50), - pe = Et(l, "iterationCount", 3, 1), - ye = Et(l, "fallDistance", 3, "100px"), - X = Et(l, "rounded", 3, !1), - Se = Et(l, "cone", 3, !1), - we = Et(l, "noGravity", 3, !1), - Re = Et(l, "xSpread", 3, .15), - Ae = Et(l, "destroyOnComplete", 3, !0), - Oe = Et(l, "disableForReducedMotion", 3, !1); - let Ee = nt(!1); - Ii(() => { - !Ae() || T() || typeof pe() == "string" || setTimeout(() => oe(Ee, !0), (F() + o()[1]) * pe()) - }); - - function Ne(Je, Be) { - return Math.random() * (Be - Je) + Je - } - - function ft() { - return W().length ? W()[Math.round(Math.random() * (W().length - 1))] : `hsl(${Math.round(Ne($()[0],$()[1]))}, 75%, 50%)` - } - var ht = Jt(), - Xe = zt(ht); - { - var ct = Je => { - var Be = xk(); - let st; - nn(Be, 21, () => ({ - length: ie() - }), Zd, (it, Qe) => { - var ke = yk(); - Ge((vt, Q, te, _e, ne, Pe, Me, at, We, Ct, _t) => uc(ke, ` - --color: ${vt??""}; - --skew: ${Q??""}deg,${te??""}deg; - --rotation-xyz: ${_e??""}, ${ne??""}, ${Pe??""}; - --rotation-deg: ${Me??""}deg; - --translate-y-multiplier: ${at??""}; - --translate-x-multiplier: ${We??""}; - --scale: ${Ct??""}; - --transition-delay: ${_t??""}ms; - --transition-duration: ${T()?`calc(${F()}ms * var(--scale))`:`${F()}ms`};`), [ft, () => Ne(-45, 45), () => Ne(-45, 45), () => Ne(-10, 10), () => Ne(-10, 10), () => Ne(-10, 10), () => Ne(0, 360), () => Ne(L()[0], L()[1]), () => Ne(C()[0], C()[1]), () => .1 * Ne(2, 10), () => Ne(o()[0], o()[1])]), H(it, ke) - }), A(Be), Ge(it => { - st = Or(Be, 1, "confetti-holder svelte-15ksp55", null, st, it), uc(Be, ` - --fall-distance: ${ye()??""}; - --size: ${_()??""}px; - --x-spread: ${1-Re()}; - --transition-iteration-count: ${(T()?"infinite":pe())??""};`) - }, [() => ({ - rounded: X(), - cone: Se(), - "no-gravity": we(), - "reduced-motion": Oe() - })]), H(Je, Be) - }; - Ue(Xe, Je => { - x(Ee) || Je(ct) - }) - } - H(b, ht), Pr() -} -var bk = async (b, l, _, C) => { - try { - oe(l, !0), await ni.purchase({ - id: _, - amount: 1, - variant: C.colorIdx - }), await Dt.refresh(), pa.notification1.play() - } catch (L) { - qr.error(L.message) - } finally { - oe(l, !1) - } -}, wk = Ie(''), Tk = Ie(' '+Text3()+'', 1), Ck = Ie(' Unlocked ', 1), Sk = (b, l) => l(!1), Pk = Ie('

                '+Text5()+'

                '+Text6()+'

                '), Ik = Ie(' '); - -function Mk(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15); - const C = lt(() => $n.colors[l.colorIdx]), - L = lt(() => { - var X; - return ((X = Dt.data) == null ? void 0 : X.droplets) ?? 0 - }); - let F = nt(!1); - const T = lt(() => (x(F), Dt.hasColor(l.colorIdx))); - Ii(() => { - const X = Se => { - Se.key === "Escape" && _(!1) - }; - return document.addEventListener("keydown", X), () => document.removeEventListener("keydown", X) - }); - const o = 100, - $ = $n.products[o]; - var W = Ik(), - ie = k(W), - pe = V(k(ie), 2); - { - var ye = X => { - var Se = Pk(), - we = k(Se), - Re = k(we), - Ae = k(Re); - Ld(Ae, { - class: "size-6" - }); - var Oe = V(Ae, 4), - Ee = k(Oe); - Rg(Ee, { - get value() { - return x(L) - } - }), A(Oe), A(Re), fi(2), A(we); - var Ne = V(we, 2), - ft = k(Ne), - ht = k(ft); - A(ft); - var Xe = V(ft, 2), - ct = k(Xe, !0); - A(Xe); - var Je = V(Xe, 2), - Be = k(Je); - let st; - var it = k(Be); - it.__click = [bk, F, o, l]; - var Qe = k(it); - { - var ke = ne => { - var Pe = wk(); - H(ne, Pe) - }; - Ue(Qe, ne => { - x(F) && ne(ke) - }) - } - var vt = V(Qe, 2); - { - var Q = ne => { - var Pe = Tk(), - Me = zt(Pe); - Ud(Me, { - class: "size-5" - }); - var at = V(Me); - fi(), Ge(We => fe(at, ` ${We??""} `), [() => $.price.toLocaleString("en-US")]), H(ne, Pe) - }, - te = ne => { - var Pe = Ck(), - Me = zt(Pe); - Ld(Me, { - class: "size-5" - }); - var at = V(Me, 2), - We = k(at); - hm(We, {}), A(at), H(ne, Pe) - }; - Ue(vt, ne => { - x(T) ? ne(te, !1) : ne(Q) - }) - } - A(it), A(Be); - var _e = V(Be, 2); - _e.__click = [Sk, _], A(Je), A(Ne), A(Se), Ge((ne, Pe) => { - uc(ht, `background: rgb(${x(C).rgb[0]} ${x(C).rgb[1]} ${x(C).rgb[2]})`), zr(ht, "aria-label", x(C).name), fe(ct, x(C).name), zr(Be, "data-tip", ne), st = Or(Be, 1, "", null, st, Pe), it.disabled = x(L) < $.price || x(F) || x(T) - }, [() => Hd(), () => ({ - tooltip: !x(T) && x(L) < $.price - })]), H(X, Se) - }; - Ue(pe, X => { - Dt.data && X(ye) - }) - } - A(ie), fi(2), A(W), On(W, () => X => { - Zr(() => { - _() ? X.show() : X.close() - }) - }), an("close", W, () => _(!1)), H(b, W), Pr() -} -Wi(["click"]); -var Ak = Tr(''); - -function Tg(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Ak(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var kk = Tr(''); - -function Cg(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = kk(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Ek = Tr(''); - -function Ev(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Ek(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var zk = Tr(''), - Lk = Tr(''); - -function zv(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy", "filled"]); - var C = Jt(), - L = zt(C); - { - var F = o => { - var $ = zk(); - er($, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(o, $) - }, - T = o => { - var $ = Lk(); - er($, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(o, $) - }; - Ue(L, o => { - l.filled ? o(F) : o(T, !1) - }) - } - H(b, C) -} -var Dk = Tr(''); - -function Gf(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Dk(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Rk = Tr(''); - -function Lv(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Rk(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Bk = Tr(''); - -function Fk(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Bk(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Ok = Tr(''); - -function Nk(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Ok(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var jk = Ie(" ", 1), - qk = Ie(" ", 1), - Vk = Ie(" ", 1), - Uk = Ie(' ', 1), - Zk = Ie(" ", 1), - $k = Ie(" ", 1), - Gk = (b, l) => oe(l, !x(l)), - Hk = (b, l) => { - oe(l, "colorpicker") - }, - Wk = (b, l) => { - l(!l()) - }, - Xk = (b, l) => { - oe(l, "cleararea") - }, - Kk = Ie('
                C
                '), - Yk = (b, l) => { - pa.smallPlop.play(), l() - }, - Jk = (b, l, _) => { - l(x(_).idx) - }, - Qk = Ie(' ', 1), - eE = Ie("
                "), - tE = (b, l) => { - oe(l, !x(l)) - }, - rE = (b, l) => { - oe(l, x(l) === "eraser" ? "pencil" : "eraser", !0) - }, - iE = Ie('

                I
                E
                ', 1); - -function nE(b, l) { - Sr(l, !0); - let _ = Et(l, "screenLocked", 15), - C = Et(l, "opaquePixelArt", 15); - const L = lt(() => new hc(l.tileSize)); - let F = nt(1), - T = nt("pencil"); - const o = new Map, - $ = new Map; - let W = nt(0), - ie = nt(!1), - pe = nt(!0), - ye = lt(() => Dt.charges ?? 0), - X = lt(() => x(ye) - x(W)), - Se = nt(!1), - we = !1, - Re = nt(!1), - Ae = nt(zn([])); - const Oe = lt(() => x(T) === "pencil"), - Ee = lt(() => x(T) === "eraser"), - Ne = lt(() => x(T) === "colorpicker"), - ft = lt(() => x(T) === "cleararea"), - ht = lt(() => { - var Mt, Ke; - return Cu((Ke = (Mt = Dt) == null ? void 0 : Mt.data) == null ? void 0 : Ke.role, ["admin", "global_moderator"]) - }); - let Xe = nt(!1), - ct = nt(0), - Je = nt(void 0), - Be = nt(void 0); - const st = [1, 2, 3, 32, 4, 5, 6, 33, 7, 34, 35, 8, 9, 10, 11, 37, 38, 39, 40, 41, 42, 12, 13, 14, 15, 16, 17, 43, 20, 44, 18, 19, 45, 46, 21, 22, 47, 48, 49, 23, 24, 25, 26, 27, 28, 53, 54, 55, 29, 30, 50, 56, 57, 36, 51, 31, 52, 61, 62, 63, 58, 59, 60, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77 ,78, 79 ,80 ,81, 82, 83, 84, 85, 86 ,87 ,88 ,89 ,90 ,91 ,92 ,93 ,94, 95, 0].map(Mt => ({ - ...$n.colors[Mt], - idx: Mt - })), - it = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0].map(Mt => ({ - ...$n.colors[Mt], - idx: Mt - })); - let Qe = nt(!1); - const ke = lt(() => x(Qe) ? st : it), - vt = "show-all-colors"; - Ii(() => { - oe(Qe, localStorage.getItem(vt) === "true") - }), Zr(() => { - localStorage.setItem(vt, x(Qe) ? "true" : "false") - }); - const Q = "selected-color"; - Ii(() => { - const Mt = Number(localStorage.getItem(Q)); - !isNaN(Mt) && Mt < $n.colors.length && Mt > 0 && oe(F, Mt, !0) - }), Zr(() => { - localStorage.setItem(Q, x(F).toString()) - }); - const te = new dk({ - map: l.map, - tileSize: l.tileSize, - tileZoom: l.tileZoom, - beforeLayerId: l.hoverLayerId - }); - Zr(() => { - const Mt = C() ? 1 : 0; - te.setCanvasOpacity(Mt) - }), Zr(() => { - C() ? yf() : Ct([...o.values()]) - }); - let _e = !1; - Ii(() => { - Qa(l.map.getCenter(), l.map.getZoom()); - const Mt = l.map.on("click", rr => { - var Qr; - l.zoom < l.tileZoom + 2 && ((Qr = Dt.data) == null ? void 0 : Qr.role) === "user" && l.map.easeTo({ - center: rr.lngLat, - zoom: 17 - }); - const yi = [rr.lngLat.lat, rr.lngLat.lng]; - if (x(Oe)) Pe([yi], x(F)); - else if (x(Ee)) Me([yi]); - else if (x(Ne)) at(yi, rr.point); - else if (x(ft) && (x(Ae).push(yi), Pe([yi], 0), x(Ae).length >= 2)) { - const [Yr, la] = x(Ae), [sn, ta] = x(L).latLonToPixelsFloor(Yr[0], Yr[1], l.tileZoom), [Fi, Xi] = x(L).latLonToPixelsFloor(la[0], la[1], l.tileZoom), Gn = Math.min(sn, Fi), Hn = Math.max(sn, Fi), Ln = Math.min(ta, Xi), gt = Math.max(ta, Xi), qt = []; - for (let vr = Ln; vr <= gt; vr++) { - const _i = x(L).pixelsToLatLon(Gn + .5, vr + .5, l.tileZoom), - Di = x(L).pixelsToLatLon(Hn + .5, vr + .5, l.tileZoom), - $i = Ke({ - lat: _i[0], - lng: _i[1] - }, { - lat: Di[0], - lng: Di[1] - }).slice(0, x(X) - qt.length); - if (qt.push(...$i), qt.length >= x(X)) break - } - Pe(qt, 0), oe(Ae, [], !0), oe(T, "pencil") - } - oe(Se, !0) - }); - - function Ke(rr, yi) { - const Qr = x(L).latLonToPixels(rr.lat, rr.lng, l.tileZoom), - Yr = yi ? x(L).latLonToPixels(yi.lat, yi.lng, l.tileZoom) : Qr; - return ux(Qr, Yr).map(sn => x(L).pixelsToLatLon(sn[0] + .5, sn[1] + .5, l.tileZoom)) - } - - function jt(rr, yi) { - const Qr = Ke(rr, yi); - x(Oe) ? Pe(Qr, x(F)) : x(Ee) && Me(Qr), oe(Se, !0) - } - let Gt; - - function Dr(rr) { - const yi = l.map.unproject([rr.clientX, rr.clientY]); - if (x(Re)) { - const Qr = Ke(yi, Gt); - Me(Qr) - }(_e || we) && jt(yi, Gt), Gt = yi - } - window.addEventListener("mousemove", Dr); - let Gr = !1; - const li = l.map.on("touchstart", rr => { - if (rr.points.length == 2) { - _(!1), pt(), Gr = !0, setTimeout(() => Gr = !1, 150); - return - } - _() && setTimeout(() => { - !Gr && jt(rr.lngLat) - }, 150), Gt = rr.lngLat - }), - fr = l.map.on("touchmove", rr => { - _() && jt(rr.lngLat, Gt), Gt = rr.lngLat - }), - bi = rr => { - rr.code === "Space" && (_e || Gt && jt(Gt), _e = !0, rr.preventDefault()) - }; - document.addEventListener("keydown", bi); - const Si = rr => { - rr.code === "Space" && (_e = !1, ne = !1, x(W) === 0 && x(Ee) && oe(T, "pencil")) - }; - document.addEventListener("keyup", Si); - - function zi(rr) { - if (rr.button === 2) { - oe(Re, !0); - const Qr = l.map.unproject([rr.clientX, rr.clientY]); - Me([ - [Qr.lat, Qr.lng] - ]) - } - } - document.addEventListener("mousedown", zi); - - function mi(rr) { - rr.button === 2 && oe(Re, !1) - } - document.addEventListener("mouseup", mi); - const Li = rr => { - switch (rr.code) { - case "KeyE": - x(W) > 0 && (x(Ee) ? oe(T, "pencil") : oe(T, "eraser")); - return; - case "KeyI": - oe(T, "colorpicker"); - return; - case "KeyC": - x(ht) && oe(T, "cleararea"); - return - } - }; - return document.addEventListener("keypress", Li), () => { - fr.unsubscribe(), li.unsubscribe(), Mt.unsubscribe(), document.removeEventListener("mousemove", Dr), document.removeEventListener("keydown", bi), document.removeEventListener("keyup", Si), document.removeEventListener("keypress", Li), document.removeEventListener("mousedown", zi), document.removeEventListener("mouseup", mi), _t() - } - }); - let ne = !1; - - function Pe(Mt, Ke) { - let jt = !1; - const Gt = Ke === 0; - for (let Dr of Mt) { - const [Gr, li] = Dr, fr = vx(Ke), { - tile: bi, - pixel: Si - } = x(L).latLonToTileAndPixel(Gr, li, l.tileZoom), zi = { - color: fr, - tile: bi, - pixel: Si, - season: l.season, - colorIdx: Ke - }, mi = cf(zi), Li = o.get(mi), rr = x(ye) - o.size; - if (!Li && rr < 1) { - if (ne && (_e || _())) continue; - ne = !0, qr.info($3()); - continue - } - Li && Li.colorIdx === Ke || (pa.plop.play(), jt || l.hidePixelHover(), o.set(mi, zi), te.place(Dr, Ke), l.crosshair.place(Dr), jt = !0, Gt && $.set(mi, zi)) - } - oe(W, o.size, !0), jt && !C() ? Ct([...o.values()]) : jt && C() && Gt && Ct([...$.values()]) - } - - function Me(Mt) { - let Ke = !1, - jt = !1; - for (let Gt of Mt) { - const [Dr, Gr] = Gt, { - tile: li, - pixel: fr - } = x(L).latLonToTileAndPixel(Dr, Gr, l.tileZoom), bi = cf({ - tile: li, - pixel: fr, - season: l.season - }), Si = o.get(bi); - Si && (pa.plop.play(), l.hidePixelHover(), o.delete(bi), $.delete(bi), te.remove([Dr, Gr]), l.crosshair.remove(Gt), Ke = !0, Si.colorIdx === 0 && (jt = !0)), o.size === 0 && !(_e || we || _()) && oe(T, "pencil") - } - oe(W, o.size, !0), Ke && !C() ? Ct([...o.values()]) : Ke && C() && jt && Ct([...$.values()]) - } - - function at(Mt, Ke) { - const { - tile: jt, - pixel: Gt - } = x(L).latLonToTileAndPixel(Mt[0], Mt[1], l.tileZoom), Dr = cf({ - tile: jt, - pixel: Gt, - season: l.season - }), Gr = o.get(Dr); - if (Gr) { - It(Gr.colorIdx), requestAnimationFrame(() => { - var Si; - (Si = document.getElementById(`color-${Gr.colorIdx}`)) == null || Si.focus() - }); - return - } - const li = window.devicePixelRatio, - fr = Math.floor(Ke.x * li), - bi = Math.floor(Ke.y * li); - l.hidePixelHover(), wM(l.map, fr, bi).then(([Si, zi, mi]) => { - const Li = yx({ - r: Si, - g: zi, - b: mi - }); - It(Li), requestAnimationFrame(() => { - var rr; - (rr = document.getElementById(`color-${Li}`)) == null || rr.focus() - }) - }) - } - dc(() => x(F), () => { - l.clickedLatLon && !x(Se) && (x(F) === void 0 && oe(F, 1), Pe([l.clickedLatLon], x(F))) - }), Zr(() => { - const Mt = x(pe) ? .8 : 0; - l.crosshair.setCanvasOpacity(Mt) - }); - let We = nt(16.5); - Zr(() => { - if (x(Je) && x(Be) && l.clickedLatLon) { - const Mt = l.map.getZoom(); - if (Mt < x(We)) { - const [Ke, jt] = l.clickedLatLon, Gt = x(L).latLonToPixelBoundsLatLon(Ke, jt, l.tileZoom), Dr = im(Gt), Gr = x(Je) - x(Be).clientHeight, li = x(Je) / 2 - Gr / 2; - l.map.flyTo({ - center: { - lat: Dr[0], - lng: Dr[1] - }, - zoom: 17.5, - offset: Mt > 11 ? [0, -li] : [0, 0] - }) - } - oe(We, l.tileZoom, !0) - } - }), Ii(() => { - const Mt = () => { - !document.hidden && (console.log("Tab visible again"), C() ? Ct([...$.values()]) : Ct([...o.values()])) - }; - return document.addEventListener("visibilitychange", Mt), () => document.removeEventListener("visibilitychange", Mt) - }), Zr(() => { - switch (x(T)) { - case "pencil": - l.map.getCanvas().style.cursor = `url('${uk}') 8 8, default`, l.map.setPaintProperty(l.hoverLayerId, "raster-opacity", .4); - return; - case "colorpicker": - l.map.getCanvas().style.cursor = `url('${lk}') 0 16, default`, l.map.setPaintProperty(l.hoverLayerId, "raster-opacity", 0); - return; - case "eraser": - l.map.getCanvas().style.cursor = `url('${ck}') 2 14, default`, l.map.setPaintProperty(l.hoverLayerId, "raster-opacity", .4); - return - } - }), Zr(() => { - _() ? tt() : pt() - }); - async function Ct(Mt) { - await sx(Mt), l.refreshPixelArt() - } - async function _t() { - await yf(), te.clear(), l.refreshPixelArt(), l.crosshair.clear() - } - async function xt() { - await _t(), pt(), l.map.getCanvas().style.cursor = "default", l.map.setPaintProperty(l.hoverLayerId, "raster-opacity", .4), l.onclose() - } - - function tt() { - l.map.dragPan.disable(), l.map.touchZoomRotate.disable(), document.body.style.overscrollBehavior = "none" - } - - function pt() { - l.map.dragPan.enable(), l.map.touchZoomRotate.enable(), document.body.style.overscrollBehavior = "" - } - - function It(Mt) { - return Mt >= 32 && oe(Qe, !0), Dt.hasColor(Mt) ? (pa.smallDropplet.play(), oe(F, Mt, !0), oe(T, "pencil"), !0) : (pa.smallDropplet.play(), oe(Xe, !0), oe(ct, Mt, !0), !1) - } - lx(Mt => { - Mt.type === "leave" && x(W) > 0 && Mt.cancel() - }); - const ut = "show-paint-more-than-one-pixel-msg"; - let bt = nt(!1); - Ii(() => { - var Mt; - oe(bt, !localStorage.getItem(ut) && (((Mt = Dt.data) == null ? void 0 : Mt.pixelsPainted) ?? 0) < 100, !0) - }), Zr(() => { - x(W) > 1 && (oe(bt, !1), localStorage.setItem(ut, "false")) - }); - const wt = "lp"; - Ii(() => { - var Ke; - const Mt = localStorage.getItem(wt); - if (Mt) try { - const jt = JSON.parse(atob(Mt)), - Gt = (jt == null ? void 0 : jt.time) ?? 0, - Dr = 60 * 1e3; - (jt == null ? void 0 : jt.userId) !== ((Ke = Dt.data) == null ? void 0 : Ke.id) && Date.now() - Gt < 30 * Dr && !hx && (qr.error(W3()), xt()) - } catch (jt) { - console.error(jt) - } - }); - - function dt() { - var Ke; - const Mt = btoa(JSON.stringify({ - userId: (Ke = Dt.data) == null ? void 0 : Ke.id, - time: Date.now() - })); - localStorage.setItem(wt, Mt) - } - var Lt = iE(), - Xt = zt(Lt), - Yt = k(Xt); - { - var nr = Mt => { - Kl(Mt, { - children: (Ke, jt) => { - var Gt = jk(), - Dr = zt(Gt); - Ev(Dr, { - class: "inline size-5" - }); - var Gr = V(Dr); - Ge(li => fe(Gr, ` ${li??""}`), [() => uw()]), H(Ke, Gt) - }, - $$slots: { - default: !0 - } - }) - }, - ar = Mt => { - var Ke = Jt(), - jt = zt(Ke); - { - var Gt = Gr => { - Kl(Gr, { - class: "not-touchscreen:hidden", - children: (li, fr) => { - var bi = qk(), - Si = zt(bi); - lg(Si, { - class: "inline size-5" - }); - var zi = V(Si); - Ge(mi => fe(zi, ` ${mi??""}`), [() => pw()]), H(li, bi) - }, - $$slots: { - default: !0 - } - }) - }, - Dr = Gr => { - var li = Jt(), - fr = zt(li); - { - var bi = zi => { - Kl(zi, { - class: "not-touchscreen:hidden", - children: (mi, Li) => { - var rr = Vk(), - yi = zt(rr); - Cg(yi, { - class: "inline size-5" - }); - var Qr = V(yi, 1, !0); - Ge(Yr => fe(Qr, Yr), [() => _w()]), H(mi, rr) - }, - $$slots: { - default: !0 - } - }) - }, - Si = zi => { - var mi = Jt(), - Li = zt(mi); - { - var rr = Qr => { - Kl(Qr, { - class: "touchscreen:hidden", - children: (Yr, la) => { - var sn = Uk(), - ta = zt(sn); - Lv(ta, { - class: "inline size-5" - }); - var Fi = V(ta), - Xi = k(Fi, !0); - A(Fi); - var Gn = V(Fi, 2), - Hn = k(Gn), - Ln = V(Hn), - gt = k(Ln, !0); - A(Ln), A(Gn); - var qt = V(Gn); - Ge((vr, _i, Di, $i) => { - fe(Xi, vr), fe(Hn, `${_i??""} `), fe(gt, Di), fe(qt, ` ${$i??""}`) - }, [() => yw(), () => Sw(), () => ww(), () => Mw()]), H(Yr, sn) - }, - $$slots: { - default: !0 - } - }) - }, - yi = Qr => { - var Yr = Jt(), - la = zt(Yr); - { - var sn = Fi => { - Kl(Fi, { - class: "bg-warning text-warning-content animate-bounce", - children: (Xi, Gn) => { - var Hn = Zk(), - Ln = zt(Hn); - fh(Ln, { - class: "inline size-5" - }); - var gt = V(Ln); - Ge(qt => fe(gt, ` ${qt??""}`), [() => Ew()]), H(Xi, Hn) - }, - $$slots: { - default: !0 - } - }) - }, - ta = Fi => { - var Xi = Jt(), - Gn = zt(Xi); - { - var Hn = Ln => { - Kl(Ln, { - class: "bg-warning text-warning-content animate-bounce", - children: (gt, qt) => { - var vr = $k(), - _i = zt(vr); - Tg(_i, { - class: "inline size-5" - }); - var Di = V(_i, 2); - { - var $i = Cr => { - var gn = Fn(); - Ge(tr => fe(gn, tr), [() => uP()]), H(Cr, gn) - }, - Mi = Cr => { - var gn = Jt(), - tr = zt(gn); - { - var Ht = ei => { - var ri = Fn(); - Ge(gi => fe(ri, gi), [() => pP()]), H(ei, ri) - }; - Ue(tr, ei => { - x(Ae).length === 1 && ei(Ht) - }, !0) - } - H(Cr, gn) - }; - Ue(Di, Cr => { - x(Ae).length === 0 ? Cr($i) : Cr(Mi, !1) - }) - } - H(gt, vr) - }, - $$slots: { - default: !0 - } - }) - }; - Ue(Gn, Ln => { - x(ft) && Ln(Hn) - }, !0) - } - H(Fi, Xi) - }; - Ue(la, Fi => { - x(bt) ? Fi(sn) : Fi(ta, !1) - }, !0) - } - H(Qr, Yr) - }; - Ue(Li, Qr => { - x(Oe) && x(W) === 0 ? Qr(rr) : Qr(yi, !1) - }, !0) - } - H(zi, mi) - }; - Ue(fr, zi => { - x(Ne) ? zi(bi) : zi(Si, !1) - }, !0) - } - H(Gr, li) - }; - Ue(jt, Gr => { - x(Ee) ? Gr(Gt) : Gr(Dr, !1) - }, !0) - } - H(Mt, Ke) - }; - Ue(Yt, Mt => { - x(Ee) && x(W) === 0 ? Mt(nr) : Mt(ar, !1) - }) - } - var Ft = V(Yt, 2), - dr = k(Ft); - dr.__click = [Gk, pe]; - var _r = k(dr); - { - var Ir = Mt => { - mk(Mt, { - class: "size-4" - }) - }, - jr = Mt => { - gk(Mt, { - class: "size-4" - }) - }; - Ue(_r, Mt => { - x(pe) ? Mt(Ir) : Mt(jr, !1) - }) - } - A(dr); - var ur = V(dr, 2), - Mr = k(ur), - Ar = k(Mr), - kr = V(Ar); - Av(kr, { - class: "inline", - fontSize: 14, - get value() { - return `(${x(W)??""})` - }, - mono: !0 - }), A(Mr); - var Nr = V(Mr, 2), - ce = k(Nr), - O = k(ce); - fi(), A(ce); - var q = V(ce, 2); - q.__click = [Hk, T]; - var G = k(q); - Cg(G, { - class: "size-4.5" - }), A(q), A(Nr); - var K = V(Nr, 2), - le = k(K); - let ve; - le.__click = [Wk, C]; - var Le = k(le); - { - let Mt = lt(() => !C()); - zv(Le, { - class: "size-4.5", - get filled() { - return x(Mt) - } - }) - } - A(le), A(K); - var Ce = V(K, 2); - { - var Ze = Mt => { - var Ke = Kk(), - jt = k(Ke), - Gt = k(jt); - fi(), A(jt); - var Dr = V(jt, 2); - Dr.__click = [Xk, T]; - var Gr = k(Dr); - Tg(Gr, { - class: "size-4.5" - }), A(Dr), A(Ke), Ge(li => { - fe(Gt, `${li??""} `), Or(Dr, 1, Vo({ - "btn btn-circle btn-sm": !0, - "btn-ghost": !x(ft), - "btn-primary": x(ft) - })) - }, [() => oP()]), H(Mt, Ke) - }; - Ue(Ce, Mt => { - x(ht) && Mt(Ze) - }) - } - A(ur); - var ot = V(ur, 2); - ot.__click = [Yk, xt]; - var Ye = k(ot); - fc(Ye, { - class: "size-4" - }), A(ot), A(Ft); - var Ot = V(Ft, 2), - xe = k(Ot); - nn(xe, 23, () => x(ke), Mt => Mt.idx, (Mt, Ke, jt) => { - const Gt = lt(() => { - const [mi, Li, rr] = x(Ke).rgb; - return { - r: mi, - g: Li, - b: rr - } - }), - Dr = lt(() => x(F) === x(Ke).idx && x(Oe)), - Gr = lt(() => x(Ke).idx === 0), - li = lt(() => Dt.hasColor(x(Ke).idx)); - var fr = eE(), - bi = k(fr); - bi.__click = [Jk, It, Ke]; - var Si = k(bi); - { - var zi = mi => { - var Li = Qk(), - rr = zt(Li); - Gf(rr, { - class: "center-absolute absolute size-4 opacity-30 sm:hidden sm:size-6" - }); - var yi = V(rr, 2), - Qr = k(yi); - Gf(Qr, { - class: "text-base-content/80 size-4" - }), A(yi), H(mi, Li) - }; - Ue(Si, mi => { - x(li) || mi(zi) - }) - } - A(bi), A(fr), Ge(() => { - Or(fr, 1, Vo({ - tooltip: !0, - "max-sm:h-6": x(Qe), - "max-sm:before:translate-x-1/4": x(jt) % 8 === 0 && x(Ke).name.length > 7, - "max-sm:before:-translate-x-1/4": (x(jt) - 7) % 8 === 0 && x(Ke).name.length > 7, - "max-xl:before:translate-x-1/4": x(jt) % 16 === 0 && x(Ke).name.length > 7, - "max-xl:before:-translate-x-1/4": (x(jt) - 15) % 16 === 0 && x(Ke).name.length > 7, - "xl:before:translate-x-1/4": x(Qe) && x(jt) % 32 === 0 && x(Ke).name.length > 7, - "xl:before:-translate-x-1/4": x(Qe) && (x(jt) - 31) % 32 === 0 && x(Ke).name.length > 7 - })), zr(fr, "data-tip", x(Ke).name), Or(bi, 1, Vo({ - "btn relative aspect-square w-full rounded-xl": !0, - "border-primary ring-primary ring-2": x(Dr), - "border-base-300": !x(Dr) && x(Gr), - "border-base-content/20": !x(Dr) && !x(Gr), - "max-sm:h-6 max-sm:rounded-md": x(Qe) - })), uc(bi, x(Gr) ? `background-image: url(${hk}); background-size: cover; image-rendering: pixelated;` : `background: rgb(${x(Gt).r} ${x(Gt).g} ${x(Gt).b})`), zr(bi, "aria-label", x(Ke).name), zr(bi, "id", `color-${x(Ke).idx??""}`) - }), an("focus", bi, () => { - x(li) && (oe(F, x(Ke).idx, !0), oe(T, "pencil")) - }), H(Mt, fr) - }), A(xe), A(Ot); - var At = V(Ot, 2), - Pt = k(At); - Pt.__click = [tE, Qe]; - var kt = k(Pt); - { - var Wt = Mt => { - Fk(Mt, { - class: "size-5" - }) - }, - Lr = Mt => { - Nk(Mt, { - class: "size-5" - }) - }; - Ue(kt, Mt => { - x(Qe) ? Mt(Wt) : Mt(Lr, !1) - }) - } - A(Pt); - var Kr = V(Pt, 2), - Hr = k(Kr); - { - let Mt = lt(() => x(W) > 100 ? "animate-pulse" : ""), - Ke = lt(() => x(W) === 0 || x(ie) || x(X) < 0 || !oa.captcha), - jt = lt(() => x(ie) || !oa.captcha); - kv(Hr, { - get class() { - return x(Mt) - }, - get charges() { - return x(X) - }, - get disabled() { - return x(Ke) - }, - get loading() { - return x(jt) - }, - onclick: async () => { - var Gr; - const Gt = (Gr = oa.captcha) == null ? void 0 : Gr.token; - if (!Gt) return; - pa.droppletAndPlop.play(); - const Dr = [...o.values()]; - oe(ie, !0); - try { - await ni.paint(Dr, Gt), await ox(Dr), dt(), Dt.refresh(), Id.shouldReload = !0, await xt() - } catch (li) { - qr.error(`${li.message}`, { - duration: 7e3 - }) - } finally { - oe(ie, !1) - } - } - }) - } - A(Kr); - var $r = V(Kr, 2), - mr = k($r), - gr = k(mr), - ai = k(gr); - fi(), A(gr); - var Tt = V(gr, 2); - let Ci; - Tt.__click = [rE, T]; - var di = k(Tt); - lg(di, { - class: "size-5", - get filled() { - return x(Ee) - } - }), A(Tt), A(mr), A($r), A(At), A(Xt), ps(Xt, Mt => oe(Be, Mt), () => x(Be)); - var Pn = V(Xt, 2); - Mk(Pn, { - get colorIdx() { - return x(ct) - }, - get open() { - return x(Xe) - }, - set open(Mt) { - oe(Xe, Mt, !0) - } - }), Ge((Mt, Ke, jt, Gt, Dr, Gr) => { - fe(Ar, `${Mt??""} `), fe(O, `${Ke??""} `), Or(q, 1, Vo({ - "btn btn-circle btn-sm": !0, - "btn-ghost": !x(Ne), - "btn-primary": x(Ne) - })), zr(K, "data-tip", jt), ve = Or(le, 1, "btn btn-sm btn-circle btn-ghost text-base-content/80", null, ve, Gt), Or(xe, 1, Vo({ - "md:grid-cols-16 min-[100rem]:grid-cols-32 grid grid-cols-8": !0, - "xl:grid-cols-32 sm:grid-cols-16 gap-0.5 sm:gap-1": x(Qe), - "gap-1": !x(Qe) - })), fe(ai, `${Dr??""} `), Ci = Or(Tt, 1, "btn btn-lg btn-square sm:btn-xl shadow-md", null, Ci, Gr), Tt.disabled = x(W) === 0 - }, [() => Dw(), () => Fw(), () => Ug(), () => ({ - "text-primary": !C() - }), () => dx(), () => ({ - "btn-primary": x(Ee) - })]), $d("innerHeight", Mt => oe(Je, Mt, !0)), H(b, Lt), Pr() -} -Wi(["click"]); - -function dm(...b) { - return Fg(Tu(b)) -} -var aE = Ie("
                "); - -function sE(b, l) { - Sr(l, !0); - let _ = Et(l, "ref", 15, null), - C = Qt(l, ["$$slots", "$$events", "$$legacy", "ref", "class", "children"]); - var L = aE(); - er(L, T => ({ - class: T, - ...C - }), [() => dm("flex items-center", l.class)]); - var F = k(L); - Ji(F, () => l.children ?? fa), A(L), ps(L, T => _(T), () => _()), H(b, L), Pr() -} -var oE = Ie('
                '), - lE = Ie(" ", 1); - -function cE(b, l) { - Sr(l, !0); - let _ = Et(l, "ref", 15, null), - C = Qt(l, ["$$slots", "$$events", "$$legacy", "ref", "cell", "class"]); - var L = Jt(), - F = zt(L); - { - let T = lt(() => dm("border-input relative flex size-12 items-center justify-center border-y border-r text-xl transition-all first:rounded-l-md first:border-l last:rounded-r-md", l.cell.isActive && "ring-base-content/40 z-10 ring-2", l.class)); - _n(F, () => iA, (o, $) => { - $(o, lo({ - get cell() { - return l.cell - }, - get class() { - return x(T) - } - }, () => C, { - get ref() { - return _() - }, - set ref(W) { - _(W) - }, - children: (W, ie) => { - fi(); - var pe = lE(), - ye = zt(pe), - X = V(ye); - { - var Se = we => { - var Re = oE(); - H(we, Re) - }; - Ue(X, we => { - l.cell.hasFakeCaret && we(Se) - }) - } - Ge(() => fe(ye, `${l.cell.char??""} `)), H(W, pe) - }, - $$slots: { - default: !0 - } - })) - }) - } - H(b, L), Pr() -} - -function uE(b, l) { - Sr(l, !0); - let _ = Et(l, "ref", 15, null), - C = Et(l, "value", 15, ""), - L = Qt(l, ["$$slots", "$$events", "$$legacy", "ref", "class", "value"]); - var F = Jt(), - T = zt(F); - { - let o = lt(() => dm("flex items-center gap-2 has-[:disabled]:opacity-50 [&_input]:disabled:cursor-not-allowed", l.class)); - _n(T, () => tA, ($, W) => { - W($, lo({ - get class() { - return x(o) - } - }, () => L, { - get ref() { - return _() - }, - set ref(ie) { - _(ie) - }, - get value() { - return C() - }, - set value(ie) { - C(ie) - } - })) - }) - } - H(b, F), Pr() -} -var gf = { - exports: {} - }, - Sg; - -function hE() { - return Sg || (Sg = 1, (function(b) { - (function(l) { - b.exports ? b.exports = l() : window.intlTelInput = l() - })(() => { - var l = (() => { - var _ = Object.defineProperty, - C = Object.getOwnPropertyDescriptor, - L = Object.getOwnPropertyNames, - F = Object.prototype.hasOwnProperty, - T = (Q, te) => { - for (var _e in te) _(Q, _e, { - get: te[_e], - enumerable: !0 - }) - }, - o = (Q, te, _e, ne) => { - if (te && typeof te == "object" || typeof te == "function") - for (let Pe of L(te)) !F.call(Q, Pe) && Pe !== _e && _(Q, Pe, { - get: () => te[Pe], - enumerable: !(ne = C(te, Pe)) || ne.enumerable - }); - return Q - }, - $ = Q => o(_({}, "__esModule", { - value: !0 - }), Q), - W = {}; - T(W, { - Iti: () => it, - default: () => vt - }); - var ie = [ - ["af", "93"], - ["ax", "358", 1], - ["al", "355"], - ["dz", "213"], - ["as", "1", 5, ["684"]], - ["ad", "376"], - ["ao", "244"], - ["ai", "1", 6, ["264"]], - ["ag", "1", 7, ["268"]], - ["ar", "54"], - ["am", "374"], - ["aw", "297"], - ["ac", "247"], - ["au", "61", 0, null, "0"], - ["at", "43"], - ["az", "994"], - ["bs", "1", 8, ["242"]], - ["bh", "973"], - ["bd", "880"], - ["bb", "1", 9, ["246"]], - ["by", "375"], - ["be", "32"], - ["bz", "501"], - ["bj", "229"], - ["bm", "1", 10, ["441"]], - ["bt", "975"], - ["bo", "591"], - ["ba", "387"], - ["bw", "267"], - ["br", "55"], - ["io", "246"], - ["vg", "1", 11, ["284"]], - ["bn", "673"], - ["bg", "359"], - ["bf", "226"], - ["bi", "257"], - ["kh", "855"], - ["cm", "237"], - ["ca", "1", 1, ["204", "226", "236", "249", "250", "263", "289", "306", "343", "354", "365", "367", "368", "382", "387", "403", "416", "418", "428", "431", "437", "438", "450", "584", "468", "474", "506", "514", "519", "548", "579", "581", "584", "587", "604", "613", "639", "647", "672", "683", "705", "709", "742", "753", "778", "780", "782", "807", "819", "825", "867", "873", "879", "902", "905"]], - ["cv", "238"], - ["bq", "599", 1, ["3", "4", "7"]], - ["ky", "1", 12, ["345"]], - ["cf", "236"], - ["td", "235"], - ["cl", "56"], - ["cn", "86"], - ["cx", "61", 2, ["89164"], "0"], - ["cc", "61", 1, ["89162"], "0"], - ["co", "57"], - ["km", "269"], - ["cg", "242"], - ["cd", "243"], - ["ck", "682"], - ["cr", "506"], - ["ci", "225"], - ["hr", "385"], - ["cu", "53"], - ["cw", "599", 0], - ["cy", "357"], - ["cz", "420"], - ["dk", "45"], - ["dj", "253"], - ["dm", "1", 13, ["767"]], - ["do", "1", 2, ["809", "829", "849"]], - ["ec", "593"], - ["eg", "20"], - ["sv", "503"], - ["gq", "240"], - ["er", "291"], - ["ee", "372"], - ["sz", "268"], - ["et", "251"], - ["fk", "500"], - ["fo", "298"], - ["fj", "679"], - ["fi", "358", 0], - ["fr", "33"], - ["gf", "594"], - ["pf", "689"], - ["ga", "241"], - ["gm", "220"], - ["ge", "995"], - ["de", "49"], - ["gh", "233"], - ["gi", "350"], - ["gr", "30"], - ["gl", "299"], - ["gd", "1", 14, ["473"]], - ["gp", "590", 0], - ["gu", "1", 15, ["671"]], - ["gt", "502"], - ["gg", "44", 1, ["1481", "7781", "7839", "7911"], "0"], - ["gn", "224"], - ["gw", "245"], - ["gy", "592"], - ["ht", "509"], - ["hn", "504"], - ["hk", "852"], - ["hu", "36"], - ["is", "354"], - ["in", "91"], - ["id", "62"], - ["ir", "98"], - ["iq", "964"], - ["ie", "353"], - ["im", "44", 2, ["1624", "74576", "7524", "7924", "7624"], "0"], - ["il", "972"], - ["it", "39", 0], - ["jm", "1", 4, ["876", "658"]], - ["jp", "81"], - ["je", "44", 3, ["1534", "7509", "7700", "7797", "7829", "7937"], "0"], - ["jo", "962"], - ["kz", "7", 1, ["33", "7"], "8"], - ["ke", "254"], - ["ki", "686"], - ["xk", "383"], - ["kw", "965"], - ["kg", "996"], - ["la", "856"], - ["lv", "371"], - ["lb", "961"], - ["ls", "266"], - ["lr", "231"], - ["ly", "218"], - ["li", "423"], - ["lt", "370"], - ["lu", "352"], - ["mo", "853"], - ["mg", "261"], - ["mw", "265"], - ["my", "60"], - ["mv", "960"], - ["ml", "223"], - ["mt", "356"], - ["mh", "692"], - ["mq", "596"], - ["mr", "222"], - ["mu", "230"], - ["yt", "262", 1, ["269", "639"], "0"], - ["mx", "52"], - ["fm", "691"], - ["md", "373"], - ["mc", "377"], - ["mn", "976"], - ["me", "382"], - ["ms", "1", 16, ["664"]], - ["ma", "212", 0, null, "0"], - ["mz", "258"], - ["mm", "95"], - ["na", "264"], - ["nr", "674"], - ["np", "977"], - ["nl", "31"], - ["nc", "687"], - ["nz", "64"], - ["ni", "505"], - ["ne", "227"], - ["ng", "234"], - ["nu", "683"], - ["nf", "672"], - ["kp", "850"], - ["mk", "389"], - ["mp", "1", 17, ["670"]], - ["no", "47", 0], - ["om", "968"], - ["pk", "92"], - ["pw", "680"], - ["ps", "970"], - ["pa", "507"], - ["pg", "675"], - ["py", "595"], - ["pe", "51"], - ["ph", "63"], - ["pl", "48"], - ["pt", "351"], - ["pr", "1", 3, ["787", "939"]], - ["qa", "974"], - ["re", "262", 0, null, "0"], - ["ro", "40"], - ["ru", "7", 0, null, "8"], - ["rw", "250"], - ["ws", "685"], - ["sm", "378"], - ["st", "239"], - ["sa", "966"], - ["sn", "221"], - ["rs", "381"], - ["sc", "248"], - ["sl", "232"], - ["sg", "65"], - ["sx", "1", 21, ["721"]], - ["sk", "421"], - ["si", "386"], - ["sb", "677"], - ["so", "252"], - ["za", "27"], - ["kr", "82"], - ["ss", "211"], - ["es", "34"], - ["lk", "94"], - ["bl", "590", 1], - ["sh", "290"], - ["kn", "1", 18, ["869"]], - ["lc", "1", 19, ["758"]], - ["mf", "590", 2], - ["pm", "508"], - ["vc", "1", 20, ["784"]], - ["sd", "249"], - ["sr", "597"], - ["sj", "47", 1, ["79"]], - ["se", "46"], - ["ch", "41"], - ["sy", "963"], - ["tw", "886"], - ["tj", "992"], - ["tz", "255"], - ["th", "66"], - ["tl", "670"], - ["tg", "228"], - ["tk", "690"], - ["to", "676"], - ["tt", "1", 22, ["868"]], - ["tn", "216"], - ["tr", "90"], - ["tm", "993"], - ["tc", "1", 23, ["649"]], - ["tv", "688"], - ["ug", "256"], - ["ua", "380"], - ["ae", "971"], - ["gb", "44", 0, null, "0"], - ["us", "1", 0], - ["uy", "598"], - ["vi", "1", 24, ["340"]], - ["uz", "998"], - ["vu", "678"], - ["va", "39", 1, ["06698"]], - ["ve", "58"], - ["vn", "84"], - ["wf", "681"], - ["eh", "212", 1, ["5288", "5289"], "0"], - ["ye", "967"], - ["zm", "260"], - ["zw", "263"] - ], - pe = []; - for (let Q = 0; Q < ie.length; Q++) { - const te = ie[Q]; - pe[Q] = { - name: "", - iso2: te[0], - dialCode: te[1], - priority: te[2] || 0, - areaCodes: te[3] || null, - nodeById: {}, - nationalPrefix: te[4] || null - } - } - var ye = pe, - X = { - ad: "Andorra", - ae: "United Arab Emirates", - af: "Afghanistan", - ag: "Antigua & Barbuda", - ai: "Anguilla", - al: "Albania", - am: "Armenia", - ao: "Angola", - ar: "Argentina", - as: "American Samoa", - at: "Austria", - au: "Australia", - aw: "Aruba", - ax: "Åland Islands", - az: "Azerbaijan", - ba: "Bosnia & Herzegovina", - bb: "Barbados", - bd: "Bangladesh", - be: "Belgium", - bf: "Burkina Faso", - bg: "Bulgaria", - bh: "Bahrain", - bi: "Burundi", - bj: "Benin", - bl: "St. Barthélemy", - bm: "Bermuda", - bn: "Brunei", - bo: "Bolivia", - bq: "Caribbean Netherlands", - br: "Brazil", - bs: "Bahamas", - bt: "Bhutan", - bw: "Botswana", - by: "Belarus", - bz: "Belize", - ca: "Canada", - cc: "Cocos (Keeling) Islands", - cd: "Congo - Kinshasa", - cf: "Central African Republic", - cg: "Congo - Brazzaville", - ch: "Switzerland", - ci: "Côte d’Ivoire", - ck: "Cook Islands", - cl: "Chile", - cm: "Cameroon", - cn: "China", - co: "Colombia", - cr: "Costa Rica", - cu: "Cuba", - cv: "Cape Verde", - cw: "Curaçao", - cx: "Christmas Island", - cy: "Cyprus", - cz: "Czechia", - de: "Germany", - dj: "Djibouti", - dk: "Denmark", - dm: "Dominica", - do: "Dominican Republic", - dz: "Algeria", - ec: "Ecuador", - ee: "Estonia", - eg: "Egypt", - eh: "Western Sahara", - er: "Eritrea", - es: "Spain", - et: "Ethiopia", - fi: "Finland", - fj: "Fiji", - fk: "Falkland Islands", - fm: "Micronesia", - fo: "Faroe Islands", - fr: "France", - ga: "Gabon", - gb: "United Kingdom", - gd: "Grenada", - ge: "Georgia", - gf: "French Guiana", - gg: "Guernsey", - gh: "Ghana", - gi: "Gibraltar", - gl: "Greenland", - gm: "Gambia", - gn: "Guinea", - gp: "Guadeloupe", - gq: "Equatorial Guinea", - gr: "Greece", - gt: "Guatemala", - gu: "Guam", - gw: "Guinea-Bissau", - gy: "Guyana", - hk: "Hong Kong SAR China", - hn: "Honduras", - hr: "Croatia", - ht: "Haiti", - hu: "Hungary", - id: "Indonesia", - ie: "Ireland", - il: "Israel", - im: "Isle of Man", - in: "India", - io: "British Indian Ocean Territory", - iq: "Iraq", - ir: "Iran", - is: "Iceland", - it: "Italy", - je: "Jersey", - jm: "Jamaica", - jo: "Jordan", - jp: "Japan", - ke: "Kenya", - kg: "Kyrgyzstan", - kh: "Cambodia", - ki: "Kiribati", - km: "Comoros", - kn: "St. Kitts & Nevis", - kp: "North Korea", - kr: "South Korea", - kw: "Kuwait", - ky: "Cayman Islands", - kz: "Kazakhstan", - la: "Laos", - lb: "Lebanon", - lc: "St. Lucia", - li: "Liechtenstein", - lk: "Sri Lanka", - lr: "Liberia", - ls: "Lesotho", - lt: "Lithuania", - lu: "Luxembourg", - lv: "Latvia", - ly: "Libya", - ma: "Morocco", - mc: "Monaco", - md: "Moldova", - me: "Montenegro", - mf: "St. Martin", - mg: "Madagascar", - mh: "Marshall Islands", - mk: "North Macedonia", - ml: "Mali", - mm: "Myanmar (Burma)", - mn: "Mongolia", - mo: "Macao SAR China", - mp: "Northern Mariana Islands", - mq: "Martinique", - mr: "Mauritania", - ms: "Montserrat", - mt: "Malta", - mu: "Mauritius", - mv: "Maldives", - mw: "Malawi", - mx: "Mexico", - my: "Malaysia", - mz: "Mozambique", - na: "Namibia", - nc: "New Caledonia", - ne: "Niger", - nf: "Norfolk Island", - ng: "Nigeria", - ni: "Nicaragua", - nl: "Netherlands", - no: "Norway", - np: "Nepal", - nr: "Nauru", - nu: "Niue", - nz: "New Zealand", - om: "Oman", - pa: "Panama", - pe: "Peru", - pf: "French Polynesia", - pg: "Papua New Guinea", - ph: "Philippines", - pk: "Pakistan", - pl: "Poland", - pm: "St. Pierre & Miquelon", - pr: "Puerto Rico", - ps: "Palestinian Territories", - pt: "Portugal", - pw: "Palau", - py: "Paraguay", - qa: "Qatar", - re: "Réunion", - ro: "Romania", - rs: "Serbia", - ru: "Russia", - rw: "Rwanda", - sa: "Saudi Arabia", - sb: "Solomon Islands", - sc: "Seychelles", - sd: "Sudan", - se: "Sweden", - sg: "Singapore", - sh: "St. Helena", - si: "Slovenia", - sj: "Svalbard & Jan Mayen", - sk: "Slovakia", - sl: "Sierra Leone", - sm: "San Marino", - sn: "Senegal", - so: "Somalia", - sr: "Suriname", - ss: "South Sudan", - st: "São Tomé & Príncipe", - sv: "El Salvador", - sx: "Sint Maarten", - sy: "Syria", - sz: "Eswatini", - tc: "Turks & Caicos Islands", - td: "Chad", - tg: "Togo", - th: "Thailand", - tj: "Tajikistan", - tk: "Tokelau", - tl: "Timor-Leste", - tm: "Turkmenistan", - tn: "Tunisia", - to: "Tonga", - tr: "Turkey", - tt: "Trinidad & Tobago", - tv: "Tuvalu", - tw: "Taiwan Province of China", - tz: "Tanzania", - ua: "Ukraine", - ug: "Uganda", - us: "United States", - uy: "Uruguay", - uz: "Uzbekistan", - va: "Vatican City", - vc: "St. Vincent & Grenadines", - ve: "Venezuela", - vg: "British Virgin Islands", - vi: "U.S. Virgin Islands", - vn: "Vietnam", - vu: "Vanuatu", - wf: "Wallis & Futuna", - ws: "Samoa", - ye: "Yemen", - yt: "Mayotte", - za: "South Africa", - zm: "Zambia", - zw: "Zimbabwe" - }, - Se = X, - we = { - selectedCountryAriaLabel: "Selected country", - noCountrySelected: "No country selected", - countryListAriaLabel: "List of countries", - searchPlaceholder: "Search", - zeroSearchResults: "No results found", - oneSearchResult: "1 result found", - multipleSearchResults: "${count} results found", - ac: "Ascension Island", - xk: "Kosovo" - }, - Re = we, - Ae = { - ...Se, - ...Re - }, - Oe = Ae; - for (let Q = 0; Q < ye.length; Q++) ye[Q].name = Oe[ye[Q].iso2]; - var Ee = 0, - Ne = { - allowDropdown: !0, - autoPlaceholder: "polite", - containerClass: "", - countryOrder: null, - countrySearch: !0, - customPlaceholder: null, - dropdownContainer: null, - excludeCountries: [], - fixDropdownWidth: !0, - formatAsYouType: !0, - formatOnDisplay: !0, - geoIpLookup: null, - hiddenInput: null, - i18n: {}, - initialCountry: "", - loadUtils: null, - nationalMode: !0, - onlyCountries: [], - placeholderNumberType: "MOBILE", - showFlags: !0, - separateDialCode: !1, - strictMode: !1, - useFullscreenPopup: typeof navigator < "u" && typeof window < "u" ? /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) || window.innerWidth <= 500 : !1, - validationNumberTypes: ["MOBILE"] - }, - ft = ["800", "822", "833", "844", "855", "866", "877", "880", "881", "882", "883", "884", "885", "886", "887", "888", "889"], - ht = Q => Q.replace(/\D/g, ""), - Xe = (Q = "") => Q.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), - ct = Q => { - const te = ht(Q); - if (te.charAt(0) === "1") { - const _e = te.substr(1, 3); - return ft.includes(_e) - } - return !1 - }, - Je = (Q, te, _e, ne) => { - if (_e === 0 && !ne) return 0; - let Pe = 0; - for (let Me = 0; Me < te.length; Me++) { - if (/[+0-9]/.test(te[Me]) && Pe++, Pe === Q && !ne) return Me + 1; - if (ne && Pe === Q + 1) return Me - } - return te.length - }, - Be = (Q, te, _e) => { - const ne = document.createElement(Q); - return te && Object.entries(te).forEach(([Pe, Me]) => ne.setAttribute(Pe, Me)), _e && _e.appendChild(ne), ne - }, - st = (Q, ...te) => { - const { - instances: _e - } = ke; - Object.values(_e).forEach(ne => ne[Q](...te)) - }, - it = class { - constructor(Q, te = {}) { - this.id = Ee++, this.telInput = Q, this.highlightedItem = null, this.options = Object.assign({}, Ne, te), this.hadInitialPlaceholder = !!Q.getAttribute("placeholder") - } - _init() { - this.options.useFullscreenPopup && (this.options.fixDropdownWidth = !1), this.options.onlyCountries.length === 1 && (this.options.initialCountry = this.options.onlyCountries[0]), this.options.separateDialCode && (this.options.nationalMode = !1), this.options.allowDropdown && !this.options.showFlags && !this.options.separateDialCode && (this.options.nationalMode = !1), this.options.useFullscreenPopup && !this.options.dropdownContainer && (this.options.dropdownContainer = document.body), this.isAndroid = typeof navigator < "u" ? /Android/i.test(navigator.userAgent) : !1, this.isRTL = !!this.telInput.closest("[dir=rtl]"); - const Q = this.options.allowDropdown || this.options.separateDialCode; - this.showSelectedCountryOnLeft = this.isRTL ? !Q : Q, this.options.separateDialCode && (this.isRTL ? this.originalPaddingRight = this.telInput.style.paddingRight : this.originalPaddingLeft = this.telInput.style.paddingLeft), this.options.i18n = { - ...Oe, - ...this.options.i18n - }; - const te = new Promise((ne, Pe) => { - this.resolveAutoCountryPromise = ne, this.rejectAutoCountryPromise = Pe - }), - _e = new Promise((ne, Pe) => { - this.resolveUtilsScriptPromise = ne, this.rejectUtilsScriptPromise = Pe - }); - this.promise = Promise.all([te, _e]), this.selectedCountryData = {}, this._processCountryData(), this._generateMarkup(), this._setInitialState(), this._initListeners(), this._initRequests() - } - _processCountryData() { - this._processAllCountries(), this._processDialCodes(), this._translateCountryNames(), this._sortCountries() - } - _sortCountries() { - this.options.countryOrder && (this.options.countryOrder = this.options.countryOrder.map(Q => Q.toLowerCase())), this.countries.sort((Q, te) => { - const { - countryOrder: _e - } = this.options; - if (_e) { - const ne = _e.indexOf(Q.iso2), - Pe = _e.indexOf(te.iso2), - Me = ne > -1, - at = Pe > -1; - if (Me || at) return Me && at ? ne - Pe : Me ? -1 : 1 - } - return Q.name.localeCompare(te.name) - }) - } - _addToDialCodeMap(Q, te, _e) { - te.length > this.dialCodeMaxLen && (this.dialCodeMaxLen = te.length), this.dialCodeToIso2Map.hasOwnProperty(te) || (this.dialCodeToIso2Map[te] = []); - for (let Pe = 0; Pe < this.dialCodeToIso2Map[te].length; Pe++) - if (this.dialCodeToIso2Map[te][Pe] === Q) return; - const ne = _e !== void 0 ? _e : this.dialCodeToIso2Map[te].length; - this.dialCodeToIso2Map[te][ne] = Q - } - _processAllCountries() { - const { - onlyCountries: Q, - excludeCountries: te - } = this.options; - if (Q.length) { - const _e = Q.map(ne => ne.toLowerCase()); - this.countries = ye.filter(ne => _e.includes(ne.iso2)) - } else if (te.length) { - const _e = te.map(ne => ne.toLowerCase()); - this.countries = ye.filter(ne => !_e.includes(ne.iso2)) - } else this.countries = ye - } - _translateCountryNames() { - for (let Q = 0; Q < this.countries.length; Q++) { - const te = this.countries[Q].iso2.toLowerCase(); - this.options.i18n.hasOwnProperty(te) && (this.countries[Q].name = this.options.i18n[te]) - } - } - _processDialCodes() { - this.dialCodes = {}, this.dialCodeMaxLen = 0, this.dialCodeToIso2Map = {}; - for (let Q = 0; Q < this.countries.length; Q++) { - const te = this.countries[Q]; - this.dialCodes[te.dialCode] || (this.dialCodes[te.dialCode] = !0), this._addToDialCodeMap(te.iso2, te.dialCode, te.priority) - } - for (let Q = 0; Q < this.countries.length; Q++) { - const te = this.countries[Q]; - if (te.areaCodes) { - const _e = this.dialCodeToIso2Map[te.dialCode][0]; - for (let ne = 0; ne < te.areaCodes.length; ne++) { - const Pe = te.areaCodes[ne]; - for (let Me = 1; Me < Pe.length; Me++) { - const at = Pe.substr(0, Me), - We = te.dialCode + at; - this._addToDialCodeMap(_e, We), this._addToDialCodeMap(te.iso2, We) - } - this._addToDialCodeMap(te.iso2, te.dialCode + Pe) - } - } - } - } - _generateMarkup() { - var pt, It, ut; - this.telInput.classList.add("iti__tel-input"), !this.telInput.hasAttribute("autocomplete") && !(this.telInput.form && this.telInput.form.hasAttribute("autocomplete")) && this.telInput.setAttribute("autocomplete", "off"); - const { - allowDropdown: Q, - separateDialCode: te, - showFlags: _e, - containerClass: ne, - hiddenInput: Pe, - dropdownContainer: Me, - fixDropdownWidth: at, - useFullscreenPopup: We, - countrySearch: Ct, - i18n: _t - } = this.options; - let xt = "iti"; - Q && (xt += " iti--allow-dropdown"), _e && (xt += " iti--show-flags"), ne && (xt += ` ${ne}`), We || (xt += " iti--inline-dropdown"); - const tt = Be("div", { - class: xt - }); - if ((pt = this.telInput.parentNode) == null || pt.insertBefore(tt, this.telInput), Q || _e || te) { - this.countryContainer = Be("div", { - class: "iti__country-container" - }, tt), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", Q ? (this.selectedCountry = Be("button", { - type: "button", - class: "iti__selected-country", - "aria-expanded": "false", - "aria-label": this.options.i18n.selectedCountryAriaLabel, - "aria-haspopup": "true", - "aria-controls": `iti-${this.id}__dropdown-content`, - role: "combobox" - }, this.countryContainer), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = Be("div", { - class: "iti__selected-country" - }, this.countryContainer); - const bt = Be("div", { - class: "iti__selected-country-primary" - }, this.selectedCountry); - if (this.selectedCountryInner = Be("div", { - class: "iti__flag" - }, bt), this.selectedCountryA11yText = Be("span", { - class: "iti__a11y-text" - }, this.selectedCountryInner), Q && (this.dropdownArrow = Be("div", { - class: "iti__arrow", - "aria-hidden": "true" - }, bt)), te && (this.selectedDialCode = Be("div", { - class: "iti__selected-dial-code" - }, this.selectedCountry)), Q) { - const wt = at ? "" : "iti--flexible-dropdown-width"; - if (this.dropdownContent = Be("div", { - id: `iti-${this.id}__dropdown-content`, - class: `iti__dropdown-content iti__hide ${wt}` - }), Ct && (this.searchInput = Be("input", { - type: "text", - class: "iti__search-input", - placeholder: _t.searchPlaceholder, - role: "combobox", - "aria-expanded": "true", - "aria-label": _t.searchPlaceholder, - "aria-controls": `iti-${this.id}__country-listbox`, - "aria-autocomplete": "list", - autocomplete: "off" - }, this.dropdownContent), this.searchResultsA11yText = Be("span", { - class: "iti__a11y-text" - }, this.dropdownContent)), this.countryList = Be("ul", { - class: "iti__country-list", - id: `iti-${this.id}__country-listbox`, - role: "listbox", - "aria-label": _t.countryListAriaLabel - }, this.dropdownContent), this._appendListItems(), Ct && this._updateSearchResultsText(), Me) { - let dt = "iti iti--container"; - We ? dt += " iti--fullscreen-popup" : dt += " iti--inline-dropdown", this.dropdown = Be("div", { - class: dt - }), this.dropdown.appendChild(this.dropdownContent) - } else this.countryContainer.appendChild(this.dropdownContent) - } - } - if (tt.appendChild(this.telInput), this._updateInputPadding(), Pe) { - const bt = this.telInput.getAttribute("name") || "", - wt = Pe(bt); - if (wt.phone) { - const dt = (It = this.telInput.form) == null ? void 0 : It.querySelector(`input[name="${wt.phone}"]`); - dt ? this.hiddenInput = dt : (this.hiddenInput = Be("input", { - type: "hidden", - name: wt.phone - }), tt.appendChild(this.hiddenInput)) - } - if (wt.country) { - const dt = (ut = this.telInput.form) == null ? void 0 : ut.querySelector(`input[name="${wt.country}"]`); - dt ? this.hiddenInputCountry = dt : (this.hiddenInputCountry = Be("input", { - type: "hidden", - name: wt.country - }), tt.appendChild(this.hiddenInputCountry)) - } - } - } - _appendListItems() { - for (let Q = 0; Q < this.countries.length; Q++) { - const te = this.countries[Q], - _e = Q === 0 ? "iti__highlight" : "", - ne = Be("li", { - id: `iti-${this.id}__item-${te.iso2}`, - class: `iti__country ${_e}`, - tabindex: "-1", - role: "option", - "data-dial-code": te.dialCode, - "data-country-code": te.iso2, - "aria-selected": "false" - }, this.countryList); - te.nodeById[this.id] = ne; - let Pe = ""; - this.options.showFlags && (Pe += `
                `), Pe += `${te.name}`, Pe += `+${te.dialCode}`, ne.insertAdjacentHTML("beforeend", Pe) - } - } - _setInitialState(Q = !1) { - const te = this.telInput.getAttribute("value"), - _e = this.telInput.value, - Pe = te && te.charAt(0) === "+" && (!_e || _e.charAt(0) !== "+") ? te : _e, - Me = this._getDialCode(Pe), - at = ct(Pe), - { - initialCountry: We, - geoIpLookup: Ct - } = this.options, - _t = We === "auto" && Ct; - if (Me && !at) this._updateCountryFromNumber(Pe); - else if (!_t || Q) { - const xt = We ? We.toLowerCase() : ""; - xt && this._getCountryData(xt, !0) ? this._setCountry(xt) : Me && at ? this._setCountry("us") : this._setCountry() - } - Pe && this._updateValFromNumber(Pe) - } - _initListeners() { - this._initTelInputListeners(), this.options.allowDropdown && this._initDropdownListeners(), (this.hiddenInput || this.hiddenInputCountry) && this.telInput.form && this._initHiddenInputListener() - } - _initHiddenInputListener() { - var Q; - this._handleHiddenInputSubmit = () => { - this.hiddenInput && (this.hiddenInput.value = this.getNumber()), this.hiddenInputCountry && (this.hiddenInputCountry.value = this.getSelectedCountryData().iso2 || "") - }, (Q = this.telInput.form) == null || Q.addEventListener("submit", this._handleHiddenInputSubmit) - } - _initDropdownListeners() { - this._handleLabelClick = te => { - this.dropdownContent.classList.contains("iti__hide") ? this.telInput.focus() : te.preventDefault() - }; - const Q = this.telInput.closest("label"); - Q && Q.addEventListener("click", this._handleLabelClick), this._handleClickSelectedCountry = () => { - this.dropdownContent.classList.contains("iti__hide") && !this.telInput.disabled && !this.telInput.readOnly && this._openDropdown() - }, this.selectedCountry.addEventListener("click", this._handleClickSelectedCountry), this._handleCountryContainerKeydown = te => { - this.dropdownContent.classList.contains("iti__hide") && ["ArrowUp", "ArrowDown", " ", "Enter"].includes(te.key) && (te.preventDefault(), te.stopPropagation(), this._openDropdown()), te.key === "Tab" && this._closeDropdown() - }, this.countryContainer.addEventListener("keydown", this._handleCountryContainerKeydown) - } - _initRequests() { - let { - loadUtils: Q, - initialCountry: te, - geoIpLookup: _e - } = this.options; - Q && !ke.utils ? (this._handlePageLoad = () => { - var Pe; - window.removeEventListener("load", this._handlePageLoad), (Pe = ke.attachUtils(Q)) == null || Pe.catch(() => {}) - }, ke.documentReady() ? this._handlePageLoad() : window.addEventListener("load", this._handlePageLoad)) : this.resolveUtilsScriptPromise(), te === "auto" && _e && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise() - } - _loadAutoCountry() { - ke.autoCountry ? this.handleAutoCountry() : ke.startedLoadingAutoCountry || (ke.startedLoadingAutoCountry = !0, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup((Q = "") => { - const te = Q.toLowerCase(); - te && this._getCountryData(te, !0) ? (ke.autoCountry = te, setTimeout(() => st("handleAutoCountry"))) : (this._setInitialState(!0), st("rejectAutoCountryPromise")) - }, () => { - this._setInitialState(!0), st("rejectAutoCountryPromise") - })) - } - _openDropdownWithPlus() { - this._openDropdown(), this.searchInput.value = "+", this._filterCountries("", !0) - } - _initTelInputListeners() { - const { - strictMode: Q, - formatAsYouType: te, - separateDialCode: _e, - formatOnDisplay: ne, - allowDropdown: Pe, - countrySearch: Me - } = this.options; - let at = !1; - new RegExp("\\p{L}", "u").test(this.telInput.value) && (at = !0), this._handleInputEvent = We => { - if (this.isAndroid && (We == null ? void 0 : We.data) === "+" && _e && Pe && Me) { - const tt = this.telInput.selectionStart || 0, - pt = this.telInput.value.substring(0, tt - 1), - It = this.telInput.value.substring(tt); - this.telInput.value = pt + It, this._openDropdownWithPlus(); - return - } - this._updateCountryFromNumber(this.telInput.value) && this._triggerCountryChange(); - const Ct = (We == null ? void 0 : We.data) && /[^+0-9]/.test(We.data), - _t = (We == null ? void 0 : We.inputType) === "insertFromPaste" && this.telInput.value; - Ct || _t && !Q ? at = !0 : /[^+0-9]/.test(this.telInput.value) || (at = !1); - const xt = (We == null ? void 0 : We.detail) && We.detail.isSetNumber && !ne; - if (te && !at && !xt) { - const tt = this.telInput.selectionStart || 0, - It = this.telInput.value.substring(0, tt).replace(/[^+0-9]/g, "").length, - ut = (We == null ? void 0 : We.inputType) === "deleteContentForward", - bt = this._formatNumberAsYouType(), - wt = Je(It, bt, tt, ut); - this.telInput.value = bt, this.telInput.setSelectionRange(wt, wt) - } - }, this.telInput.addEventListener("input", this._handleInputEvent), (Q || _e) && (this._handleKeydownEvent = We => { - if (We.key && We.key.length === 1 && !We.altKey && !We.ctrlKey && !We.metaKey) { - if (_e && Pe && Me && We.key === "+") { - We.preventDefault(), this._openDropdownWithPlus(); - return - } - if (Q) { - const Ct = this.telInput.value, - _t = Ct.charAt(0) === "+", - xt = !_t && this.telInput.selectionStart === 0 && We.key === "+", - tt = /^[0-9]$/.test(We.key), - pt = _e ? tt : xt || tt, - It = Ct.slice(0, this.telInput.selectionStart) + We.key + Ct.slice(this.telInput.selectionEnd), - ut = this._getFullNumber(It), - bt = ke.utils.getCoreNumber(ut, this.selectedCountryData.iso2), - wt = this.maxCoreNumberLength && bt.length > this.maxCoreNumberLength; - let dt = !1; - if (_t) { - const Lt = this.selectedCountryData.iso2; - dt = this._getCountryFromNumber(ut) !== Lt - }(!pt || wt && !dt && !xt) && We.preventDefault() - } - } - }, this.telInput.addEventListener("keydown", this._handleKeydownEvent)) - } - _cap(Q) { - const te = parseInt(this.telInput.getAttribute("maxlength") || "", 10); - return te && Q.length > te ? Q.substr(0, te) : Q - } - _trigger(Q, te = {}) { - const _e = new CustomEvent(Q, { - bubbles: !0, - cancelable: !0, - detail: te - }); - this.telInput.dispatchEvent(_e) - } - _openDropdown() { - const { - fixDropdownWidth: Q, - countrySearch: te - } = this.options; - if (Q && (this.dropdownContent.style.width = `${this.telInput.offsetWidth}px`), this.dropdownContent.classList.remove("iti__hide"), this.selectedCountry.setAttribute("aria-expanded", "true"), this._setDropdownPosition(), te) { - const _e = this.countryList.firstElementChild; - _e && (this._highlightListItem(_e, !1), this.countryList.scrollTop = 0), this.searchInput.focus() - } - this._bindDropdownListeners(), this.dropdownArrow.classList.add("iti__arrow--up"), this._trigger("open:countrydropdown") - } - _setDropdownPosition() { - if (this.options.dropdownContainer && this.options.dropdownContainer.appendChild(this.dropdown), !this.options.useFullscreenPopup) { - const Q = this.telInput.getBoundingClientRect(), - te = this.telInput.offsetHeight; - this.options.dropdownContainer && (this.dropdown.style.top = `${Q.top+te}px`, this.dropdown.style.left = `${Q.left}px`, this._handleWindowScroll = () => this._closeDropdown(), window.addEventListener("scroll", this._handleWindowScroll)) - } - } - _bindDropdownListeners() { - this._handleMouseoverCountryList = ne => { - var Me; - const Pe = (Me = ne.target) == null ? void 0 : Me.closest(".iti__country"); - Pe && this._highlightListItem(Pe, !1) - }, this.countryList.addEventListener("mouseover", this._handleMouseoverCountryList), this._handleClickCountryList = ne => { - var Me; - const Pe = (Me = ne.target) == null ? void 0 : Me.closest(".iti__country"); - Pe && this._selectListItem(Pe) - }, this.countryList.addEventListener("click", this._handleClickCountryList); - let Q = !0; - this._handleClickOffToClose = () => { - Q || this._closeDropdown(), Q = !1 - }, document.documentElement.addEventListener("click", this._handleClickOffToClose); - let te = "", - _e = null; - if (this._handleKeydownOnDropdown = ne => { - ["ArrowUp", "ArrowDown", "Enter", "Escape"].includes(ne.key) && (ne.preventDefault(), ne.stopPropagation(), ne.key === "ArrowUp" || ne.key === "ArrowDown" ? this._handleUpDownKey(ne.key) : ne.key === "Enter" ? this._handleEnterKey() : ne.key === "Escape" && this._closeDropdown()), !this.options.countrySearch && /^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(ne.key) && (ne.stopPropagation(), _e && clearTimeout(_e), te += ne.key.toLowerCase(), this._searchForCountry(te), _e = setTimeout(() => { - te = "" - }, 1e3)) - }, document.addEventListener("keydown", this._handleKeydownOnDropdown), this.options.countrySearch) { - const ne = () => { - const Me = this.searchInput.value.trim(); - Me ? this._filterCountries(Me) : this._filterCountries("", !0) - }; - let Pe = null; - this._handleSearchChange = () => { - Pe && clearTimeout(Pe), Pe = setTimeout(() => { - ne(), Pe = null - }, 100) - }, this.searchInput.addEventListener("input", this._handleSearchChange), this.searchInput.addEventListener("click", Me => Me.stopPropagation()) - } - } - _searchForCountry(Q) { - for (let te = 0; te < this.countries.length; te++) { - const _e = this.countries[te]; - if (_e.name.substr(0, Q.length).toLowerCase() === Q) { - const Pe = _e.nodeById[this.id]; - this._highlightListItem(Pe, !1), this._scrollTo(Pe); - break - } - } - } - _filterCountries(Q, te = !1) { - let _e = !0; - this.countryList.innerHTML = ""; - const ne = Xe(Q); - for (let Pe = 0; Pe < this.countries.length; Pe++) { - const Me = this.countries[Pe], - at = Xe(Me.name), - We = Me.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map(_t => _t[0]).join("").toLowerCase(), - Ct = `+${Me.dialCode}`; - if (te || at.includes(ne) || Ct.includes(ne) || Me.iso2.includes(ne) || We.includes(ne)) { - const _t = Me.nodeById[this.id]; - _t && this.countryList.appendChild(_t), _e && (this._highlightListItem(_t, !1), _e = !1) - } - } - _e && this._highlightListItem(null, !1), this.countryList.scrollTop = 0, this._updateSearchResultsText() - } - _updateSearchResultsText() { - const { - i18n: Q - } = this.options, te = this.countryList.childElementCount; - let _e; - te === 0 ? _e = Q.zeroSearchResults : te === 1 ? _e = Q.oneSearchResult : _e = Q.multipleSearchResults.replace("${count}", te.toString()), this.searchResultsA11yText.textContent = _e - } - _handleUpDownKey(Q) { - var _e, ne; - let te = Q === "ArrowUp" ? (_e = this.highlightedItem) == null ? void 0 : _e.previousElementSibling : (ne = this.highlightedItem) == null ? void 0 : ne.nextElementSibling; - !te && this.countryList.childElementCount > 1 && (te = Q === "ArrowUp" ? this.countryList.lastElementChild : this.countryList.firstElementChild), te && (this._scrollTo(te), this._highlightListItem(te, !1)) - } - _handleEnterKey() { - this.highlightedItem && this._selectListItem(this.highlightedItem) - } - _updateValFromNumber(Q) { - let te = Q; - if (this.options.formatOnDisplay && ke.utils && this.selectedCountryData) { - const _e = this.options.nationalMode || te.charAt(0) !== "+" && !this.options.separateDialCode, - { - NATIONAL: ne, - INTERNATIONAL: Pe - } = ke.utils.numberFormat, - Me = _e ? ne : Pe; - te = ke.utils.formatNumber(te, this.selectedCountryData.iso2, Me) - } - te = this._beforeSetNumber(te), this.telInput.value = te - } - _updateCountryFromNumber(Q) { - const te = this._getCountryFromNumber(Q); - return te !== null ? this._setCountry(te) : !1 - } - _ensureHasDialCode(Q) { - const { - dialCode: te, - nationalPrefix: _e - } = this.selectedCountryData; - if (Q.charAt(0) === "+" || !te) return Q; - const Me = _e && Q.charAt(0) === _e && !this.options.separateDialCode ? Q.substring(1) : Q; - return `+${te}${Me}` - } - _getCountryFromNumber(Q) { - const te = Q.indexOf("+"); - let _e = te ? Q.substring(te) : Q; - const ne = this.selectedCountryData.iso2, - Pe = this.selectedCountryData.dialCode; - _e = this._ensureHasDialCode(_e); - const Me = this._getDialCode(_e, !0), - at = ht(_e); - if (Me) { - const We = ht(Me), - Ct = this.dialCodeToIso2Map[We]; - if (!ne && this.defaultCountry && Ct.includes(this.defaultCountry)) return this.defaultCountry; - const _t = ne && Ct.includes(ne) && (at.length === We.length || !this.selectedCountryData.areaCodes); - if (!(Pe === "1" && ct(at)) && !_t) { - for (let tt = 0; tt < Ct.length; tt++) - if (Ct[tt]) return Ct[tt] - } - } else { - if (_e.charAt(0) === "+" && at.length) return ""; - if ((!_e || _e === "+") && !this.selectedCountryData.iso2) return this.defaultCountry - } - return null - } - _highlightListItem(Q, te) { - const _e = this.highlightedItem; - if (_e && (_e.classList.remove("iti__highlight"), _e.setAttribute("aria-selected", "false")), this.highlightedItem = Q, this.highlightedItem) { - this.highlightedItem.classList.add("iti__highlight"), this.highlightedItem.setAttribute("aria-selected", "true"); - const ne = this.highlightedItem.getAttribute("id") || ""; - this.selectedCountry.setAttribute("aria-activedescendant", ne), this.options.countrySearch && this.searchInput.setAttribute("aria-activedescendant", ne) - } - te && this.highlightedItem.focus() - } - _getCountryData(Q, te) { - for (let _e = 0; _e < this.countries.length; _e++) - if (this.countries[_e].iso2 === Q) return this.countries[_e]; - if (te) return null; - throw new Error(`No country data for '${Q}'`) - } - _setCountry(Q) { - const { - separateDialCode: te, - showFlags: _e, - i18n: ne - } = this.options, Pe = this.selectedCountryData.iso2 ? this.selectedCountryData : {}; - if (this.selectedCountryData = Q ? this._getCountryData(Q, !1) || {} : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountryInner) { - let Me = "", - at = ""; - Q && _e ? (Me = `iti__flag iti__${Q}`, at = `${this.selectedCountryData.name} +${this.selectedCountryData.dialCode}`) : (Me = "iti__flag iti__globe", at = ne.noCountrySelected), this.selectedCountryInner.className = Me, this.selectedCountryA11yText.textContent = at - } - if (this._setSelectedCountryTitleAttribute(Q, te), te) { - const Me = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : ""; - this.selectedDialCode.innerHTML = Me, this._updateInputPadding() - } - return this._updatePlaceholder(), this._updateMaxLength(), Pe.iso2 !== Q - } - _updateInputPadding() { - if (this.selectedCountry) { - const te = (this.selectedCountry.offsetWidth || this._getHiddenSelectedCountryWidth()) + 6; - this.showSelectedCountryOnLeft ? this.telInput.style.paddingLeft = `${te}px` : this.telInput.style.paddingRight = `${te}px` - } - } - _updateMaxLength() { - const { - strictMode: Q, - placeholderNumberType: te, - validationNumberTypes: _e - } = this.options, { - iso2: ne - } = this.selectedCountryData; - if (Q && ke.utils) - if (ne) { - const Pe = ke.utils.numberType[te]; - let Me = ke.utils.getExampleNumber(ne, !1, Pe, !0), - at = Me; - for (; ke.utils.isPossibleNumber(Me, ne, _e);) at = Me, Me += "0"; - const We = ke.utils.getCoreNumber(at, ne); - this.maxCoreNumberLength = We.length, ne === "by" && (this.maxCoreNumberLength = We.length + 1) - } else this.maxCoreNumberLength = null - } - _setSelectedCountryTitleAttribute(Q = null, te) { - if (!this.selectedCountry) return; - let _e; - Q && !te ? _e = `${this.selectedCountryData.name}: +${this.selectedCountryData.dialCode}` : Q ? _e = this.selectedCountryData.name : _e = "Unknown", this.selectedCountry.setAttribute("title", _e) - } - _getHiddenSelectedCountryWidth() { - if (this.telInput.parentNode) { - const Q = this.telInput.parentNode.cloneNode(!1); - Q.style.visibility = "hidden", document.body.appendChild(Q); - const te = this.countryContainer.cloneNode(); - Q.appendChild(te); - const _e = this.selectedCountry.cloneNode(!0); - te.appendChild(_e); - const ne = _e.offsetWidth; - return document.body.removeChild(Q), ne - } - return 0 - } - _updatePlaceholder() { - const { - autoPlaceholder: Q, - placeholderNumberType: te, - nationalMode: _e, - customPlaceholder: ne - } = this.options, Pe = Q === "aggressive" || !this.hadInitialPlaceholder && Q === "polite"; - if (ke.utils && Pe) { - const Me = ke.utils.numberType[te]; - let at = this.selectedCountryData.iso2 ? ke.utils.getExampleNumber(this.selectedCountryData.iso2, _e, Me) : ""; - at = this._beforeSetNumber(at), typeof ne == "function" && (at = ne(at, this.selectedCountryData)), this.telInput.setAttribute("placeholder", at) - } - } - _selectListItem(Q) { - const te = this._setCountry(Q.getAttribute("data-country-code")); - this._closeDropdown(), this._updateDialCode(Q.getAttribute("data-dial-code")), this.telInput.focus(), te && this._triggerCountryChange() - } - _closeDropdown() { - this.dropdownContent.classList.add("iti__hide"), this.selectedCountry.setAttribute("aria-expanded", "false"), this.selectedCountry.removeAttribute("aria-activedescendant"), this.highlightedItem && this.highlightedItem.setAttribute("aria-selected", "false"), this.options.countrySearch && this.searchInput.removeAttribute("aria-activedescendant"), this.dropdownArrow.classList.remove("iti__arrow--up"), document.removeEventListener("keydown", this._handleKeydownOnDropdown), this.options.countrySearch && this.searchInput.removeEventListener("input", this._handleSearchChange), document.documentElement.removeEventListener("click", this._handleClickOffToClose), this.countryList.removeEventListener("mouseover", this._handleMouseoverCountryList), this.countryList.removeEventListener("click", this._handleClickCountryList), this.options.dropdownContainer && (this.options.useFullscreenPopup || window.removeEventListener("scroll", this._handleWindowScroll), this.dropdown.parentNode && this.dropdown.parentNode.removeChild(this.dropdown)), this._handlePageLoad && window.removeEventListener("load", this._handlePageLoad), this._trigger("close:countrydropdown") - } - _scrollTo(Q) { - const te = this.countryList, - _e = document.documentElement.scrollTop, - ne = te.offsetHeight, - Pe = te.getBoundingClientRect().top + _e, - Me = Pe + ne, - at = Q.offsetHeight, - We = Q.getBoundingClientRect().top + _e, - Ct = We + at, - _t = We - Pe + te.scrollTop; - if (We < Pe) te.scrollTop = _t; - else if (Ct > Me) { - const xt = ne - at; - te.scrollTop = _t - xt - } - } - _updateDialCode(Q) { - const te = this.telInput.value, - _e = `+${Q}`; - let ne; - if (te.charAt(0) === "+") { - const Pe = this._getDialCode(te); - Pe ? ne = te.replace(Pe, _e) : ne = _e, this.telInput.value = ne - } - } - _getDialCode(Q, te) { - let _e = ""; - if (Q.charAt(0) === "+") { - let ne = ""; - for (let Pe = 0; Pe < Q.length; Pe++) { - const Me = Q.charAt(Pe); - if (!isNaN(parseInt(Me, 10))) { - if (ne += Me, te) this.dialCodeToIso2Map[ne] && (_e = Q.substr(0, Pe + 1)); - else if (this.dialCodes[ne]) { - _e = Q.substr(0, Pe + 1); - break - } - if (ne.length === this.dialCodeMaxLen) break - } - } - } - return _e - } - _getFullNumber(Q) { - const te = Q || this.telInput.value.trim(), - { - dialCode: _e - } = this.selectedCountryData; - let ne; - const Pe = ht(te); - return this.options.separateDialCode && te.charAt(0) !== "+" && _e && Pe ? ne = `+${_e}` : ne = "", ne + te - } - _beforeSetNumber(Q) { - let te = Q; - if (this.options.separateDialCode) { - let _e = this._getDialCode(te); - if (_e) { - _e = `+${this.selectedCountryData.dialCode}`; - const ne = te[_e.length] === " " || te[_e.length] === "-" ? _e.length + 1 : _e.length; - te = te.substr(ne) - } - } - return this._cap(te) - } - _triggerCountryChange() { - this._trigger("countrychange") - } - _formatNumberAsYouType() { - const Q = this._getFullNumber(), - te = ke.utils ? ke.utils.formatNumberAsYouType(Q, this.selectedCountryData.iso2) : Q, - { - dialCode: _e - } = this.selectedCountryData; - return this.options.separateDialCode && this.telInput.value.charAt(0) !== "+" && te.includes(`+${_e}`) ? (te.split(`+${_e}`)[1] || "").trim() : te - } - handleAutoCountry() { - this.options.initialCountry === "auto" && ke.autoCountry && (this.defaultCountry = ke.autoCountry, this.selectedCountryData.iso2 || this.selectedCountryInner.classList.contains("iti__globe") || this.setCountry(this.defaultCountry), this.resolveAutoCountryPromise()) - } - handleUtils() { - ke.utils && (this.telInput.value && this._updateValFromNumber(this.telInput.value), this.selectedCountryData.iso2 && (this._updatePlaceholder(), this._updateMaxLength())), this.resolveUtilsScriptPromise() - } - destroy() { - var Pe, Me; - const { - allowDropdown: Q, - separateDialCode: te - } = this.options; - if (Q) { - this._closeDropdown(), this.selectedCountry.removeEventListener("click", this._handleClickSelectedCountry), this.countryContainer.removeEventListener("keydown", this._handleCountryContainerKeydown); - const at = this.telInput.closest("label"); - at && at.removeEventListener("click", this._handleLabelClick) - } - const { - form: _e - } = this.telInput; - this._handleHiddenInputSubmit && _e && _e.removeEventListener("submit", this._handleHiddenInputSubmit), this.telInput.removeEventListener("input", this._handleInputEvent), this._handleKeydownEvent && this.telInput.removeEventListener("keydown", this._handleKeydownEvent), this.telInput.removeAttribute("data-intl-tel-input-id"), te && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft); - const ne = this.telInput.parentNode; - (Pe = ne == null ? void 0 : ne.parentNode) == null || Pe.insertBefore(this.telInput, ne), (Me = ne == null ? void 0 : ne.parentNode) == null || Me.removeChild(ne), delete ke.instances[this.id] - } - getExtension() { - return ke.utils ? ke.utils.getExtension(this._getFullNumber(), this.selectedCountryData.iso2) : "" - } - getNumber(Q) { - if (ke.utils) { - const { - iso2: te - } = this.selectedCountryData; - return ke.utils.formatNumber(this._getFullNumber(), te, Q) - } - return "" - } - getNumberType() { - return ke.utils ? ke.utils.getNumberType(this._getFullNumber(), this.selectedCountryData.iso2) : -99 - } - getSelectedCountryData() { - return this.selectedCountryData - } - getValidationError() { - if (ke.utils) { - const { - iso2: Q - } = this.selectedCountryData; - return ke.utils.getValidationError(this._getFullNumber(), Q) - } - return -99 - } - isValidNumber() { - if (!this.selectedCountryData.iso2) return !1; - const Q = this._getFullNumber(), - te = Q.search(new RegExp("\\p{L}", "u")); - if (te > -1) { - const _e = Q.substring(0, te), - ne = this._utilsIsPossibleNumber(_e), - Pe = this._utilsIsPossibleNumber(Q); - return ne && Pe - } - return this._utilsIsPossibleNumber(Q) - } - _utilsIsPossibleNumber(Q) { - return ke.utils ? ke.utils.isPossibleNumber(Q, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null - } - isValidNumberPrecise() { - if (!this.selectedCountryData.iso2) return !1; - const Q = this._getFullNumber(), - te = Q.search(new RegExp("\\p{L}", "u")); - if (te > -1) { - const _e = Q.substring(0, te), - ne = this._utilsIsValidNumber(_e), - Pe = this._utilsIsValidNumber(Q); - return ne && Pe - } - return this._utilsIsValidNumber(Q) - } - _utilsIsValidNumber(Q) { - return ke.utils ? ke.utils.isValidNumber(Q, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null - } - setCountry(Q) { - const te = Q == null ? void 0 : Q.toLowerCase(), - _e = this.selectedCountryData.iso2; - (Q && te !== _e || !Q && _e) && (this._setCountry(te), this._updateDialCode(this.selectedCountryData.dialCode), this._triggerCountryChange()) - } - setNumber(Q) { - const te = this._updateCountryFromNumber(Q); - this._updateValFromNumber(Q), te && this._triggerCountryChange(), this._trigger("input", { - isSetNumber: !0 - }) - } - setPlaceholderNumberType(Q) { - this.options.placeholderNumberType = Q, this._updatePlaceholder() - } - setDisabled(Q) { - this.telInput.disabled = Q, Q ? this.selectedCountry.setAttribute("disabled", "true") : this.selectedCountry.removeAttribute("disabled") - } - }, - Qe = Q => { - if (!ke.utils && !ke.startedLoadingUtilsScript) { - let te; - if (typeof Q == "function") try { - te = Promise.resolve(Q()) - } catch (_e) { - return Promise.reject(_e) - } else return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof Q}`)); - return ke.startedLoadingUtilsScript = !0, te.then(_e => { - const ne = _e == null ? void 0 : _e.default; - if (!ne || typeof ne != "object") throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export."); - return ke.utils = ne, st("handleUtils"), !0 - }).catch(_e => { - throw st("rejectUtilsScriptPromise", _e), _e - }) - } - return null - }, - ke = Object.assign((Q, te) => { - const _e = new it(Q, te); - return _e._init(), Q.setAttribute("data-intl-tel-input-id", _e.id.toString()), ke.instances[_e.id] = _e, _e - }, { - defaults: Ne, - documentReady: () => document.readyState === "complete", - getCountryData: () => ye, - getInstance: Q => { - const te = Q.getAttribute("data-intl-tel-input-id"); - return te ? ke.instances[te] : null - }, - instances: {}, - attachUtils: Qe, - startedLoadingUtilsScript: !1, - startedLoadingAutoCountry: !1, - version: "25.3.2" - }), - vt = ke; - return $(W) - })(); - return l.default - }) - })(gf)), gf.exports -} -var dE = hE(); -const pE = nm(dE); -var fE = Ie('
                '), - mE = Ie(' '), - _E = Ie('

                ', 1), - gE = async (b, l, _) => { - await l(x(_)) - }, vE = Ie(' '), yE = (b, l) => { - oe(l, "") - }, xE = Ie('

                ', 1), bE = Ie('
                '); - -function wE(b, l) { - Sr(l, !0); - let _ = nt(!0), - C = nt(""), - L = nt(0), - F = nt(!1); - const T = lt(() => x(L) > 0 || x(F)); - let o = nt(!1), - $ = nt(""), - W = nt(void 0); - const ie = lt(() => { - var Re; - return `phone:${(Re=Dt.data)==null?void 0:Re.id}` - }); - Zr(() => { - const Re = localStorage.getItem(x(ie)); - Re && oe(C, Re, !0) - }), Ii(() => { - ni.getOtpCooldown().then(Oe => { - oe(L, Oe.cooldownMs, !0) - }).catch(Oe => { - qr.error(Oe.message) - }).finally(() => { - oe(_, !1) - }); - const Re = 1e3, - Ae = setInterval(() => { - oe(L, Math.max(0, x(L) - Re), !0) - }, Re); - return () => { - clearInterval(Ae) - } - }); - async function pe(Re) { - try { - oe(F, !0); - const Ae = await ni.sendOtp(Re); - qr.info(`${Y3()} ${Ae.phone}`), oe(C, Ae.phone, !0), oe(L, Ae.cooldownMs, !0), localStorage.setItem(x(ie), x(C)) - } catch (Ae) { - qr.error(Ae.message) - } finally { - oe(F, !1) - } - } - Zr(() => { - x($).length === 6 && (oe(o, !0), (async () => { - try { - await ni.verifyOtp(x($)), await Dt.refresh(), qr.success(eC()), localStorage.removeItem(x(ie)), l.onsuccess(x(C)) - } catch (Re) { - qr.error(Re.message) - } finally { - oe($, ""), oe(o, !1) - } - })()) - }); - var ye = bE(), - X = k(ye); - { - var Se = Re => { - var Ae = fE(); - H(Re, Ae) - }, - we = Re => { - var Ae = Jt(), - Oe = zt(Ae); - { - var Ee = ft => { - var ht = _E(), - Xe = zt(ht), - ct = k(Xe), - Je = k(ct, !0); - A(ct); - var Be = V(ct, 2), - st = k(Be, !0); - A(Be), A(Xe); - var it = V(Xe, 2), - Qe = k(it); - On(Qe, () => _e => (oe(W, pE(_e, { - strictMode: !0, - initialCountry: "br", - loadUtils: () => wx(() => import("../chunks/1FgtjJRR.js"), [], import.meta.url), - containerClass: "w-full", - dropdownContainer: document.body - })), () => { - var ne; - (ne = x(W)) == null || ne.destroy() - })); - var ke = V(Qe, 2), - vt = k(ke), - Q = V(vt); - { - var te = _e => { - var ne = mE(), - Pe = k(ne); - A(ne), Ge(Me => fe(Pe, `(${Me??""})`), [() => zd(x(L))]), H(_e, ne) - }; - Ue(Q, _e => { - x(L) > 0 && _e(te) - }) - } - A(ke), A(it), Ge((_e, ne, Pe) => { - fe(Je, _e), fe(st, ne), ke.disabled = x(T), fe(vt, `${Pe??""} `) - }, [() => kC(), () => LC(), () => BC()]), an("submit", it, async () => { - var ne; - if (x(T)) return; - if (!((ne = x(W)) != null && ne.isValidNumber())) { - qr.error(iC()); - return - } - const _e = x(W).getNumber(); - await pe(_e) - }), H(ft, ht) - }, - Ne = ft => { - var ht = xE(), - Xe = zt(ht), - ct = k(Xe), - Je = k(ct, !0); - A(ct); - var Be = V(ct, 2), - st = k(Be); - A(Be), A(Xe); - var it = V(Xe, 2), - Qe = k(it); - { - const Me = (at, We) => { - let Ct = () => We == null ? void 0 : We().cells; - var _t = Jt(), - xt = zt(_t); - _n(xt, () => sE, (tt, pt) => { - pt(tt, { - class: "border-primary", - children: (It, ut) => { - var bt = Jt(), - wt = zt(bt); - nn(wt, 16, Ct, dt => dt, (dt, Lt) => { - var Xt = Jt(), - Yt = zt(Xt); - _n(Yt, () => cE, (nr, ar) => { - ar(nr, { - get cell() { - return Lt - }, - class: "border-base-content/20 size-11 sm:size-12" - }) - }), H(dt, Xt) - }), H(It, bt) - }, - $$slots: { - default: !0 - } - }) - }), H(at, _t) - }; - _n(Qe, () => uE, (at, We) => { - We(at, { - maxlength: 6, - class: "mx-auto w-max", - get disabled() { - return x(o) - }, - get value() { - return x($) - }, - set value(Ct) { - oe($, Ct, !0) - }, - children: Me, - $$slots: { - default: !0 - } - }) - }) - } - A(it); - var ke = V(it, 2), - vt = k(ke); - vt.__click = [gE, pe, C]; - var Q = k(vt), - te = V(Q); - { - var _e = Me => { - var at = vE(), - We = k(at); - A(at), Ge(Ct => fe(We, `(${Ct??""})`), [() => zd(x(L))]), H(Me, at) - }; - Ue(te, Me => { - x(L) > 0 && Me(_e) - }) - } - A(vt); - var ne = V(vt, 2); - ne.__click = [yE, C]; - var Pe = k(ne, !0); - A(ne), A(ke), Ge((Me, at, We, Ct) => { - fe(Je, Me), fe(st, `${at??""} ${x(C)??""}`), vt.disabled = x(T), fe(Q, `${We??""} `), fe(Pe, Ct) - }, [() => NC(), () => VC(), () => $C(), () => WC()]), H(ft, ht) - }; - Ue(Oe, ft => { - x(C) ? ft(Ne, !1) : ft(Ee) - }, !0) - } - H(Re, Ae) - }; - Ue(X, Re => { - x(_) ? Re(Se) : Re(we, !1) - }) - } - A(ye), H(b, ye), Pr() -} -Wi(["click"]); -var TE = Ie(''); - -function CE(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15); - var C = TE(), - L = k(C), - F = V(k(L), 2); - { - var T = o => { - wE(o, { - onsuccess: () => _(!1) - }) - }; - Ue(F, o => { - _() && o(T) - }) - } - A(L), A(C), On(C, () => o => { - Zr(() => { - _() ? o.show() : o.close() - }) - }), an("close", C, () => _(!1)), H(b, C), Pr() -} -var SE = (b, l) => { - l() - }, - PE = Ie(''), - IE = Ie(''), - ME = (b, l, _) => { - l(x(_).id) - }, - AE = Ie(''), - kE = Ie(''), - EE = Ie('
                '), - zE = (b, l) => { - var _; - (_ = x(l)) == null || _.show() - }, - LE = (b, l) => { - l(!1) - }, - DE = (b, l) => { - var _; - (_ = x(l)) == null || _.close() - }, - RE = async (b, l) => { - try { - oe(l, !0), await ni.deleteMe(), qr.warning(vC()), await Dt.logout() - } catch (_) { - qr.error(_.message) - } finally { - oe(l, !1) - } - }, BE = Ie(' ', 1); - -function FE(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15), - C = nt(zn(l.userData.name)), - L = nt(zn(l.userData.discord)), - F = nt(zn(l.userData.showLastPixel)), - T = nt(!1), - o = nt(void 0), - $ = nt(void 0); - Ii(() => { - const Ft = dr => { - dr.key === "Escape" && _(!1) - }; - return document.addEventListener("keydown", Ft), () => document.removeEventListener("keydown", Ft) - }); - let W = nt(void 0), - ie = nt(void 0); - Zr(() => { - oe(C, l.userData.name, !0), oe(F, l.userData.showLastPixel, !0) - }), Zr(() => { - _() && !x($) && ni.getMyProfilePictures().then(Ft => { - oe($, Ft, !0) - }).catch(Ft => { - qr.error(Ft.message) - }) - }); - let pe = nt(!1); - async function ye(Ft) { - try { - oe(pe, !0), await ni.changeProfilePicture(Ft), await Dt.refresh() - } finally { - oe(pe, !1) - } - } - var X = BE(), - Se = zt(X), - we = k(Se), - Re = V(k(we), 2), - Ae = k(Re, !0); - A(Re); - var Oe = V(Re, 2), - Ee = k(Oe), - Ne = k(Ee), - ft = k(Ne), - ht = k(ft); - es(ht, { - class: "size-30", - get userId() { - return l.userData.id - }, - get pictureUrl() { - return l.userData.picture - } - }); - var Xe = V(ht, 2), - ct = k(Xe); - Dg(ct, { - class: "size-5" - }), A(Xe), A(ft); - var Je = V(ft, 2); - { - var Be = Ft => { - var dr = EE(), - _r = k(dr), - Ir = k(_r, !0); - A(_r); - var jr = V(_r, 2), - ur = k(jr); - { - var Mr = kr => { - var Nr = IE(); - Nr.__click = [SE, ye]; - var ce = k(Nr); - es(ce, { - class: "size-10 border", - get userId() { - return l.userData.id - } - }); - var O = V(ce, 2); - { - var q = G => { - var K = PE(); - H(G, K) - }; - Ue(O, G => { - x(pe) && G(q) - }) - } - A(Nr), Ge(() => Nr.disabled = x(pe)), H(kr, Nr) - }; - Ue(ur, kr => { - l.userData.picture && kr(Mr) - }) - } - var Ar = V(ur, 2); - nn(Ar, 17, () => x($), kr => kr.id, (kr, Nr) => { - var ce = Jt(), - O = zt(ce); - { - var q = G => { - var K = kE(); - K.__click = [ME, ye, Nr]; - var le = k(K); - es(le, { - class: "size-10 border", - get userId() { - return l.userData.id - }, - get pictureUrl() { - return x(Nr).url - } - }); - var ve = V(le, 2); - { - var Le = Ce => { - var Ze = AE(); - H(Ce, Ze) - }; - Ue(ve, Ce => { - x(pe) && Ce(Le) - }) - } - A(K), Ge(() => K.disabled = x(pe)), H(G, K) - }; - Ue(O, G => { - l.userData.picture !== x(Nr).url && G(q) - }) - } - H(kr, ce) - }), A(jr), A(dr), Ge(kr => fe(Ir, kr), [() => qb()]), H(Ft, dr) - }; - Ue(Je, Ft => { - var dr; - (dr = x($)) != null && dr.length && Ft(Be) - }) - } - A(Ne); - var st = V(Ne, 2), - it = k(st); - { - let Ft = lt(() => xf()), - dr = lt(() => xf()); - Tf(it, { - get label() { - return x(Ft) - }, - get placeholder() { - return x(dr) - }, - min: 1, - max: 16, - get value() { - return x(C) - }, - set value(_r) { - oe(C, _r, !0) - }, - get validate() { - return x(W) - }, - set validate(_r) { - oe(W, _r, !0) - } - }) - } - var Qe = V(it, 2); - { - let Ft = lt(() => $w()); - Tf(Qe, { - label: "Discord", - get placeholder() { - return x(Ft) - }, - max: 32, - get value() { - return x(L) - }, - set value(dr) { - oe(L, dr, !0) - }, - get validate() { - return x(ie) - }, - set validate(dr) { - oe(ie, dr, !0) - } - }) - } - var ke = V(Qe, 2), - vt = k(ke); - ea(vt); - var Q = V(vt); - A(ke), A(st), A(Ee); - var te = V(Ee, 2), - _e = k(te); - _e.__click = [zE, o]; - var ne = k(_e, !0); - A(_e); - var Pe = V(_e, 2), - Me = k(Pe); - Me.__click = [LE, _]; - var at = k(Me, !0); - A(Me); - var We = V(Me, 2), - Ct = k(We, !0); - A(We), A(Pe), A(te), A(Oe), A(we), A(Se), On(Se, () => Ft => { - Zr(() => { - _() ? Ft.show() : Ft.close() - }) - }); - var _t = V(Se, 2), - xt = k(_t), - tt = V(k(xt), 2), - pt = k(tt, !0); - A(tt); - var It = V(tt, 2), - ut = k(It, !0); - A(It); - var bt = V(It, 2), - wt = k(bt); - wt.__click = [DE, o]; - var dt = k(wt, !0); - A(wt); - var Lt = V(wt, 2); - Lt.__click = [RE, T]; - var Xt = k(Lt, !0); - A(Lt), A(bt), A(xt); - var Yt = V(xt, 2), - nr = k(Yt), - ar = k(nr, !0); - A(nr), A(Yt), A(_t), ps(_t, Ft => oe(o, Ft), () => x(o)), Ge((Ft, dr, _r, Ir, jr, ur, Mr, Ar, kr, Nr, ce) => { - fe(Ae, Ft), zr(Xe, "data-tip", dr), fe(Q, ` ${_r??""}`), fe(ne, Ir), Me.disabled = x(T), fe(at, jr), We.disabled = x(T), fe(Ct, ur), fe(pt, Mr), fe(ut, Ar), fe(dt, kr), Lt.disabled = x(T), fe(Xt, Nr), fe(ar, ce) - }, [() => YC(), () => px(), () => Zb(), () => ug(), () => tc(), () => Xb(), () => Jb(), () => t2(), () => qd(), () => ug(), () => tc()]), an("close", Se, () => _(!1)), an("submit", Oe, async () => { - var Ft, dr; - try { - if (!((Ft = x(W)) != null && Ft()) || !((dr = x(ie)) != null && dr())) return; - oe(T, !0), await ni.updateMe({ - name: x(C), - showLastPixel: x(F), - discord: x(L) - }), Dt.refresh(), qr.success(mC()), _(!1) - } catch (_r) { - qr.error(_r.message) - } finally { - oe(T, !1) - } - }), fx(vt, () => x(F), Ft => oe(F, Ft)), H(b, X), Pr() -} -Wi(["click"]); -var OE = Tr(''); - -function NE(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = OE(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var jE = Tr(''); - -function Dv(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = jE(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var qE = Tr(''); - -function VE(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = qE(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var UE = Tr(''); - -function ZE(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = UE(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - "xmlns:xlink": "http://www.w3.org/1999/xlink", - viewBox: "0 0 216 216", - ..._ - }), void 0, void 0, "svelte-1977t4s"), H(b, C) -} -var $E = Tr(''); - -function GE(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = $E(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var HE = Tr(''); - -function WE(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = HE(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - height: "24px", - viewBox: "0 -960 960 960", - width: "24px", - fill: "currentColor", - ..._ - })), H(b, C) -} -var XE = Tr(''); - -function KE(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = XE(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var YE = Tr(''); - -function JE(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = YE(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var QE = (b, l) => { - oe(l, !0) - }, - e8 = Ie(' '), - t8 = Ie('
                '), - r8 = (b, l, _) => { - localStorage.setItem(_x, x(l).key), oe(_, x(l).key, !0), location.reload() - }, - i8 = Ie(''), - n8 = Ie("
              • "), - a8 = async (b, l) => { - var _; - try { - const C = await ((_ = x(l)) == null ? void 0 : _.prompt()); - (C == null ? void 0 : C.outcome) === "accepted" && oe(l, void 0) - } catch (C) { - qr.error(Pb({ - error: C.message - })) - } - }, s8 = Ie(''), o8 = Ie(' '), l8 = Ie('
                '), c8 = async (b, l, _, C) => { - var L; - try { - oe(l, !0), await _.user.logout(), C(), qr.warning(bC(), { - icon: Dv - }), (L = _.onlogout) == null || L.call(_) - } catch { - qr.error(CC()) - } finally { - oe(l, !1) - } - }, u8 = Ie(' ', 1); - -function h8(b, l) { - Sr(l, !0); - let _ = nt(!1), - C = nt(!1); - - function L() { - var pe; - (pe = document.activeElement) == null || pe.blur() - } - const F = [{ - label: "🇺🇸 English", - key: "en" - }, { - label: "🇨🇳 中文", - key: "zh" - }]; - let T = nt(""), - o = nt(void 0); - var $ = Jt(), - W = zt($); - { - var ie = pe => { - var ye = u8(), - X = zt(ye), - Se = k(X), - we = k(Se); - Bg(we, { - get userId() { - return l.user.data.id - }, - get level() { - return l.user.data.level - }, - get pictureUrl() { - return l.user.data.picture - } - }), A(Se); - var Re = V(Se, 2), - Ae = k(Re); - Ae.__click = L; - var Oe = k(Ae); - fc(Oe, { - class: "size-5" - }), A(Ae); - var Ee = V(Ae, 2), - Ne = k(Ee), - ft = k(Ne); - es(ft, { - get userId() { - return l.user.data.id - }, - get pictureUrl() { - return l.user.data.picture - } - }); - var ht = V(ft, 2); - ht.__click = [QE, _]; - var Xe = k(ht); - Cf(Xe, { - class: "size-4" - }), A(ht), A(Ne); - var ct = V(Ne, 2), - Je = k(ct), - Be = k(Je), - st = k(Be, !0); - A(Be); - var it = V(Be, 2), - Qe = k(it); - A(it); - var ke = V(it, 2); - { - var vt = At => { - const Pt = lt(() => ds(l.user.data.equippedFlag)); - var kt = e8(), - Wt = k(kt, !0); - A(kt), Ge(() => { - zr(kt, "data-tip", x(Pt).name), fe(Wt, x(Pt).flag) - }), H(At, kt) - }; - Ue(ke, At => { - l.user.data.equippedFlag && At(vt) - }) - } - var Q = V(ke, 2); - { - var te = At => { - var Pt = t8(), - kt = k(Pt); - ph(kt, { - get username() { - return l.user.data.discord - } - }), A(Pt), H(At, Pt) - }; - Ue(Q, At => { - l.user.data.discord && At(te) - }) - } - A(Je); - var _e = V(Je, 2), - ne = k(_e); - fh(ne, { - class: "inline size-4" - }); - var Pe = V(ne, 2), - Me = k(Pe), - at = V(Me), - We = k(at, !0); - A(at), A(Pe), A(_e); - var Ct = V(_e, 2), - _t = k(Ct); - NE(_t, { - class: "inline size-4" - }); - var xt = V(_t, 2), - tt = k(xt), - pt = k(tt); - A(tt); - var It = V(tt), - ut = V(It), - bt = k(ut); - $f(bt, { - class: "mb-0.5 inline size-4 opacity-50" - }), A(ut), A(xt), A(Ct), A(ct), A(Ee); - var wt = V(Ee, 2), - dt = k(wt), - Lt = k(dt), - Xt = k(Lt, !0); - A(Lt); - var Yt = V(Lt, 2), - nr = k(Yt), - ar = k(nr), - Ft = k(ar); - WE(Ft, { - class: "size-4" - }), A(ar); - var dr = V(ar, 2); - nn(dr, 21, () => F, Zd, (At, Pt) => { - const kt = lt(() => x(T) === x(Pt).key); - var Wt = n8(), - Lr = k(Wt); - let Kr; - Lr.__click = [r8, Pt, T]; - var Hr = k(Lr); - { - var $r = gr => { - var ai = i8(); - H(gr, ai) - }; - Ue(Hr, gr => { - x(kt) && gr($r) - }) - } - var mr = V(Hr); - A(Lr), A(Wt), Ge(gr => { - Kr = Or(Lr, 1, "font-flag relative font-medium", null, Kr, gr), fe(mr, ` ${x(Pt).label??""}`) - }, [() => ({ - "bg-base-200": x(kt) - })]), H(At, Wt) - }), A(dr), A(nr); - var _r = V(nr, 2), - Ir = k(_r); - Ir.__click = () => { - oa.muted = !oa.muted - }; - var jr = k(Ir); - { - var ur = At => { - KE(At, { - class: "size-4" - }) - }, - Mr = At => { - JE(At, { - class: "size-4" - }) - }; - Ue(jr, At => { - oa.muted ? At(ur) : At(Mr, !1) - }) - } - A(Ir), A(_r), A(Yt), A(dt); - var Ar = V(dt, 2); - { - var kr = At => { - var Pt = s8(); - Pt.__click = [a8, o]; - var kt = k(Pt); - sv(kt, { - class: "size-5" - }); - var Wt = V(kt); - A(Pt), Ge(Lr => fe(Wt, ` ${Lr??""}`), [() => Ab()]), H(At, Pt) - }; - Ue(Ar, At => { - x(o) && At(kr) - }) - } - var Nr = V(Ar, 2); - { - var ce = At => { - var Pt = o8(), - kt = k(Pt); - GE(kt, { - class: "size-5" - }); - var Wt = V(kt); - A(Pt), Ge(Lr => { - zr(Pt, "href", `${La.url.origin??""}/admin`), fe(Wt, ` ${Lr??""}`) - }, [() => JS()]), H(At, Pt) - }; - Ue(Nr, At => { - var Pt; - (Pt = l.user.data) != null && Pt.role && l.user.data.role !== "user" && At(ce) - }) - } - var O = V(Nr, 2), - q = k(O); - jg(q, { - class: "size-5" - }); - var G = V(q); - A(O); - var K = V(O, 2), - le = k(K); - am(le, { - class: "size-5" - }), fi(), A(K); - var ve = V(K, 2), - Le = k(ve); - ZE(Le, { - class: "size-5" - }), fi(), A(ve); - var Ce = V(ve, 2); - { - var Ze = At => { - var Pt = l8(), - kt = k(Pt), - Wt = k(kt); - VE(Wt, { - class: "size-5" - }), fi(), A(kt), A(Pt), Ge(() => zr(Pt, "action", `${Cd}/payment/create-portal-session`)), H(At, Pt) - }; - Ue(Ce, At => { - var Pt; - (Pt = l.user.data) != null && Pt.isCustomer && At(Ze) - }) - } - var ot = V(Ce, 2); - ot.__click = [c8, C, l, L]; - var Ye = k(ot); - Dv(Ye, { - class: "size-5" - }); - var Ot = V(Ye); - A(ot), A(wt), A(Re), A(X); - var xe = V(X, 2); - FE(xe, { - get userData() { - return l.user.data - }, - get open() { - return x(_) - }, - set open(At) { - oe(_, At, !0) - } - }), Ge((At, Pt, kt, Wt, Lr, Kr, Hr, $r, mr, gr, ai) => { - zr(Se, "title", At), zr(Be, "title", l.user.data.name), fe(st, l.user.data.name), Or(it, 1, Pt), fe(Qe, `#${l.user.data.id??""}`), fe(Me, `${kt??""}: `), fe(We, Wt), fe(pt, Text9() + ` ${Lr??""}`), fe(It, ` (${Kr??""}%) `), zr(ut, "data-tip", Hr), fe(Xt, $r), zr(_r, "data-tip", mr), fe(G, ` ${gr??""}`), ot.disabled = x(C), fe(Ot, ` ${ai??""}`) - }, [() => xb(), () => Vo(Zn(l.user.data.id)), () => Xf(), () => l.user.data.pixelsPainted.toLocaleString("en-US"), () => Math.floor(l.user.data.level), () => Math.floor(l.user.data.level % 1 * 100), () => jw(), () => Tb(), () => oa.muted ? L3() : k3(), () => zb(), () => Rb()]), an("focus", Se, () => { - oe(o, window.pwaInstallPrompt, !0) - }), H(pe, ye) - }; - Ue(W, pe => { - l.user.data && l.user.charges !== void 0 && pe(ie) - }) - } - H(b, $), Pr() -} -Wi(["click"]); -var d8 = Tr(''); - -function p8(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = d8(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - height: "24px", - viewBox: "0 -960 960 960", - width: "24px", - fill: "currentColor", - ..._ - })), H(b, C) -} -var f8 = Tr(''); - -function m8(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = f8(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var _8 = async (b, l, _, C, L, F) => { - if (x(l)) { - _.map.easeTo(x(l)), oe(l, void 0); - return - } - oe(C, !0); - try { - Qa(_.map.getCenter(), _.map.getZoom()); - const T = new hc(x(L)), - { - tile: o, - pixel: $ - } = await ni.getRandomTile(_.season), - W = o.x * x(L) + $.x, - ie = o.y * x(L) + $.y, - [pe, ye] = T.pixelsToLatLon(W, ie, x(F)), - X = { - lat: pe, - lng: ye - }, - Se = x(F) + 2; - oe(l, { - zoom: Se, - center: X - }, !0), _.map.flyTo(x(l)), Ho.isEmpty() && Ho.push({ - pos: _.map.getCenter(), - zoom: _.map.getZoom() - }), setTimeout(() => { - oe(l, void 0) - }, 2500), Ho.push({ - pos: X, - zoom: Se - }) - } catch (T) { - qr.error(T.message) - } finally { - oe(C, !1) - } -}, g8 = Ie(''); - -function v8(b, l) { - Sr(l, !0); - const _ = lt(() => $n.seasons[l.season].tileSize), - C = lt(() => $n.seasons[l.season].zoom); - let L = nt(!1), - F = nt(void 0); - var T = g8(); - T.__click = [_8, F, l, L, _, C]; - var o = k(T); - { - var $ = ie => { - m8(ie, { - class: "size-5" - }) - }, - W = ie => { - p8(ie, { - class: "size-5" - }) - }; - Ue(o, ie => { - x(F) ? ie(W, !1) : ie($) - }) - } - A(T), Ge(ie => { - zr(T, "title", ie), T.disabled = x(L) - }, [() => W1()]), H(b, T), Pr() -} -Wi(["click"]); -var y8 = Ie(''), - x8 = Ie('
                '), - b8 = Ie(' '), - w8 = Ie(" "), - T8 = Ie('
                '), - C8 = Ie('

                '), - S8 = Ie(' '), - P8 = Ie('

                '), - I8 = Ie('
                '), - M8 = Ie('
                ', 1); - -function A8(b, l) { - Sr(l, !0); - const _ = []; - let C = nt("today"), - L = { - players: { - label: Xg(), - icon: Xd - }, - alliances: { - label: Kg(), - icon: Kd - } - }, - F = nt("players"), - T = zn({ - players: {}, - alliances: {} - }); - const o = lt(() => T[x(F)][x(C)]); - Zr(() => { - if (x(o)) return; - const we = x(C), - Re = x(F); - Re === "players" ? ni.leaderboardRegionPlayers(l.regionId, we).then(Ae => { - T[Re][we] = Ae - }).catch(Ae => { - qr.error(Ae.message) - }) : Re === "alliances" && ni.leaderboardRegionAlliances(l.regionId, we).then(Ae => { - T[Re][we] = Ae - }).catch(Ae => { - qr.error(Ae.message) - }) - }); - var $ = M8(), - W = zt($); - nn(W, 21, () => Object.entries(L), ([we, { - label: Re, - icon: Ae - }]) => we, (we, Re) => { - var Ae = lt(() => Ag(x(Re), 2)); - let Oe = () => x(Ae)[0], - Ee = () => x(Ae)[1].label, - Ne = () => x(Ae)[1].icon; - const ft = lt(Ne); - var ht = y8(), - Xe = k(ht); - ea(Xe); - var ct, Je = V(Xe, 2); - _n(Je, () => x(ft), (st, it) => { - it(st, { - get this() { - return Ne() - }, - class: "mr-1 size-5 max-sm:hidden" - }) - }); - var Be = V(Je); - A(ht), Ge(() => { - zr(Xe, "aria-label", Ee()), ct !== (ct = Oe()) && (Xe.value = (Xe.__value = Oe()) ?? ""), fe(Be, ` ${Ee()??""}`) - }), Vd(_, [], Xe, () => (Oe(), x(F)), st => oe(F, st)), H(we, ht) - }), A(W); - var ie = V(W, 2), - pe = k(ie); - sm(pe, { - get value() { - return x(C) - }, - set value(we) { - oe(C, we, !0) - } - }), A(ie); - var ye = V(ie, 2); - { - var X = we => { - var Re = x8(), - Ae = k(Re), - Oe = V(Ae); - { - var Ee = ft => { - var ht = Fn(); - Ge(Xe => fe(ht, Xe), [() => Wd().toLowerCase()]), H(ft, ht) - }, - Ne = ft => { - var ht = Jt(), - Xe = zt(ht); - { - var ct = Be => { - var st = Fn(); - Ge(it => fe(st, it), [() => Qf()]), H(Be, st) - }, - Je = Be => { - var st = Jt(), - it = zt(st); - { - var Qe = ke => { - var vt = Fn(); - Ge(Q => fe(vt, Q), [() => em()]), H(ke, vt) - }; - Ue(it, ke => { - x(C) === "month" && ke(Qe) - }, !0) - } - H(Be, st) - }; - Ue(Xe, Be => { - x(C) === "week" ? Be(ct) : Be(Je, !1) - }, !0) - } - H(ft, ht) - }; - Ue(Oe, ft => { - x(C) === "today" ? ft(Ee) : ft(Ne, !1) - }) - } - A(Re), Ge(ft => fe(Ae, `${ft??""} `), [() => Jf()]), H(we, Re) - }, - Se = we => { - var Re = Jt(), - Ae = zt(Re); - { - var Oe = Ne => { - var ft = Jt(), - ht = zt(ft); - { - var Xe = Je => { - const Be = lt(() => x(o)); - var st = C8(), - it = k(st), - Qe = k(it), - ke = V(k(Qe)), - vt = k(ke, !0); - A(ke); - var Q = V(ke), - te = k(Q), - _e = V(te, 2, !0); - A(Q), A(Qe), A(it); - var ne = V(it); - nn(ne, 31, () => x(Be), Pe => Pe.id, (Pe, Me, at) => { - const We = lt(() => { - var ur; - return ((ur = Dt.data) == null ? void 0 : ur.id) === x(Me).id - }); - var Ct = T8(); - let _t; - var xt = k(Ct), - tt = k(xt, !0); - A(xt); - var pt = V(xt), - It = k(pt), - ut = k(It); - es(ut, { - class: "size-10 border", - get userId() { - return x(Me).id - }, - get pictureUrl() { - return x(Me).picture - } - }); - var bt = V(ut, 2), - wt = k(bt), - dt = k(wt), - Lt = V(dt), - Xt = k(Lt); - A(Lt), A(wt); - var Yt = V(wt, 2); - { - var nr = ur => { - const Mr = lt(() => ds(x(Me).equippedFlag)); - var Ar = b8(), - kr = k(Ar, !0); - A(Ar), Ge(() => { - zr(Ar, "data-tip", x(Mr).name), fe(kr, x(Mr).flag) - }), H(ur, Ar) - }; - Ue(Yt, ur => { - "equippedFlag" in x(Me) && x(Me).equippedFlag && ur(nr) - }) - } - var ar = V(Yt, 2); - { - var Ft = ur => { - ph(ur, { - get username() { - return x(Me).discord - } - }) - }; - Ue(ar, ur => { - x(Me).discord && ur(Ft) - }) - } - var dr = V(ar, 2); - { - var _r = ur => { - var Mr = w8(), - Ar = k(Mr, !0); - A(Mr), Ge((kr, Nr) => { - Or(Mr, 1, `badge badge-sm ml-0.5 border-0 ${kr??""} ${Nr??""}`), fe(Ar, x(Me).allianceName) - }, [() => Kf(x(Me).allianceId), () => Zn(x(Me).allianceId)]), H(ur, Mr) - }; - Ue(dr, ur => { - "allianceName" in x(Me) && x(Me).allianceName && ur(_r) - }) - } - A(bt), A(It), A(pt); - var Ir = V(pt), - jr = k(Ir, !0); - A(Ir), A(Ct), Ge((ur, Mr, Ar) => { - _t = Or(Ct, 1, "", null, _t, ur), fe(tt, x(at) + 1), Or(wt, 1, `font-semibold max-sm:ml-2 ${Mr??""} flex gap-1`), fe(dt, `${x(Me).name??""} `), fe(Xt, `#${x(Me).id??""}`), fe(jr, Ar) - }, [() => ({ - "bg-base-200": x(We) - }), () => Zn(x(Me).id), () => x(Me).pixelsPainted.toLocaleString("en-US")]), Zo(Ct, () => $o, () => ({ - duration: 200 - })), H(Pe, Ct) - }), A(ne), A(st), Ge((Pe, Me, at) => { - fe(vt, Pe), fe(te, `${Me??""} `), fe(_e, at) - }, [() => tm(), () => Ql(), () => ec().toLowerCase()]), H(Je, st) - }, - ct = Je => { - var Be = Jt(), - st = zt(Be); - { - var it = Qe => { - var ke = P8(), - vt = k(ke), - Q = k(vt), - te = V(k(Q)), - _e = k(te, !0); - A(te); - var ne = V(te), - Pe = k(ne), - Me = V(Pe, 2, !0); - A(ne), A(Q), A(vt); - var at = V(vt); - nn(at, 31, () => x(o), We => We.id, (We, Ct, _t) => { - const xt = lt(() => { - var Yt; - return ((Yt = Dt.data) == null ? void 0 : Yt.allianceId) === x(Ct).id - }); - var tt = S8(); - let pt; - var It = k(tt), - ut = k(It, !0); - A(It); - var bt = V(It), - wt = k(bt), - dt = k(wt, !0); - A(wt), A(bt); - var Lt = V(bt), - Xt = k(Lt, !0); - A(Lt), A(tt), Ge((Yt, nr, ar) => { - pt = Or(tt, 1, "", null, pt, Yt), fe(ut, x(_t) + 1), Or(wt, 1, `font-semibold ${nr??""}`), fe(dt, x(Ct).name), fe(Xt, ar) - }, [() => ({ - "bg-base-200": x(xt) - }), () => Zn(x(Ct).id), () => x(Ct).pixelsPainted.toLocaleString("en-US")]), Zo(tt, () => $o, () => ({ - duration: 200 - })), H(We, tt) - }), A(at), A(ke), Ge((We, Ct, _t) => { - fe(_e, We), fe(Pe, `${Ct??""} `), fe(Me, _t) - }, [() => Gd(), () => Ql(), () => ec().toLowerCase()]), H(Qe, ke) - }; - Ue(st, Qe => { - x(F) === "alliances" && Qe(it) - }, !0) - } - H(Je, Be) - }; - Ue(ht, Je => { - x(F) === "players" ? Je(Xe) : Je(ct, !1) - }) - } - H(Ne, ft) - }, - Ee = Ne => { - var ft = I8(); - H(Ne, ft) - }; - Ue(Ae, Ne => { - x(o) ? Ne(Oe) : Ne(Ee, !1) - }, !0) - } - H(we, Re) - }; - Ue(ye, we => { - x(o) && x(o).length === 0 ? we(X) : we(Se, !1) - }) - } - H(b, $), Pr() -} -var k8 = Ie('
                '), - E8 = Ie(' '); - -function z8(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15); - const C = lt(() => ds(l.region.countryId)); - Ii(() => { - const we = Re => { - Re.key === "Escape" && _(!1) - }; - return document.addEventListener("keydown", we), () => document.removeEventListener("keydown", we) - }); - var L = E8(), - F = k(L), - T = V(k(F), 2), - o = k(T), - $ = k(o, !0); - A(o); - var W = V(o, 2), - ie = k(W, !0); - A(W); - var pe = V(W, 2), - ye = k(pe); - A(pe), A(T); - var X = V(T, 2); - { - var Se = we => { - var Re = k8(), - Ae = k(Re); - A8(Ae, { - get regionId() { - return l.region.id - } - }), A(Re), En(2, Re, () => Qn, () => ({ - duration: 300 - })), H(we, Re) - }; - Ue(X, we => { - _() && we(Se) - }) - } - A(F), fi(2), A(L), On(L, () => we => { - Zr(() => { - _() ? we.show() : we.close() - }) - }), Ge(we => { - Or(T, 1, `flex gap-2 text-xl font-bold sm:text-2xl ${we??""}`), zr(o, "data-tip", x(C).name), fe($, x(C).flag), fe(ie, l.region.name), fe(ye, ``) - }, [() => Zn(l.region.cityId)]), an("close", L, () => _(!1)), H(b, L), Pr() -} -var L8 = Tr(''); - -function D8(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = L8(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - height: "24px", - viewBox: "0 -960 960 960", - width: "24px", - fill: "currentColor", - ..._ - })), H(b, C) -} -var R8 = Tr(''); - -function B8(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = R8(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var F8 = Tr(''), - O8 = Tr(''); - -function N8(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy", "filled"]); - var C = Jt(), - L = zt(C); - { - var F = o => { - var $ = F8(); - er($, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(o, $) - }, - T = o => { - var $ = O8(); - er($, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(o, $) - }; - Ue(L, o => { - l.filled ? o(F) : o(T, !1) - }) - } - H(b, C) -} -var j8 = (b, l, _, C, L) => { - if (x(l) && x(_)) { - const F = x(l) - x(_).clientHeight, - T = x(l) / 2 - F / 2; - C.map.flyTo({ - center: { - lat: x(L).center[0], - lng: x(L).center[1] - }, - zoom: 17.5, - offset: [0, -T] - }) - } - }, - q8 = (b, l, _) => l.onclickregion(x(_)), - V8 = Ie(''), - U8 = Ie('
                '), - Z8 = Ie('
                '), - $8 = Ie(' '), - G8 = Ie(" "), - H8 = (b, l) => { - l("report-user") - }, - W8 = Ie("
              • "), - X8 = (b, l) => { - l("timeout") - }, - K8 = Ie("
              • "), - Y8 = (b, l) => { - l("ban") - }, - J8 = Ie("
              • "), - Q8 = async (b, l, _, C, L, F) => { - oe(l, !0); - try { - await ni.banAllianceUser(x(_).id), await C({ - ...x(L), - season: F.season - }) - } catch (T) { - qr.error(T.message) - } finally { - oe(l, !1) - } - }, ez = Ie('
              • '), tz = Ie(''), rz = Ie('
                '), iz = (b, l) => l.onclickpaint(l.latLon), nz = async (b, l, _, C) => { - try { - oe(l, !0), x(_) ? (await ni.deleteFavoriteLocation(x(_).id), qr.warning(sC())) : (await ni.favoriteLocation(x(C).center), qr.success(cC())), pa.smallPlop.play(), Dt.refresh() - } catch (L) { - qr.error(L.message) - } finally { - oe(l, !1) - } - }, az = Ie(""), sz = (b, l, _) => l.onclickshare(OP(La.url, { - pos: { - lat: x(_).center[0], - lng: x(_).center[1] - }, - zoom: l.zoom - })), oz = Ie('

                '); - -function lz(b, l) { - Sr(l, !0); - let _ = nt(void 0); - const C = lt(() => new hc(l.tileSize)); - let L = nt(void 0), - F = nt(void 0), - T = nt(!1), - o = nt(!1); - const $ = lt(() => { - var tt, pt, It; - return !!((pt = (tt = x(_)) == null ? void 0 : tt.paintedBy) != null && pt.id) && ((It = Dt.data) == null ? void 0 : It.id) === x(_).paintedBy.id - }), - W = lt(() => { - const [tt, pt] = l.latLon ?? [0, 0], It = x(C).latLonToPixelBoundsLatLon(tt, pt, l.pixelArtZoom), ut = im(It), { - tile: bt, - pixel: wt - } = x(C).latLonToTileAndPixel(tt, pt, l.pixelArtZoom), dt = x(C).latLonToRegionAndPixel(tt, pt, l.pixelArtZoom); - return { - bounds: It, - center: ut, - tile: bt, - pixel: wt, - regionPixel: dt.pixel - } - }); - Zr(() => { - pa.plop.play(), l.crosshair.clearAndPlace(l.latLon) - }); - let ie = 0; - const pe = ({ - pixel: tt, - tile: pt, - season: It - }) => `s${It}:p(${tt[0]},${tt[1]}):t(${pt[0]},${pt[1]})`; - let ye; - dc(() => [x(W), l.season], () => { - const tt = { - ...x(W), - season: l.season - }, - pt = pe(tt); - if (oe(_, l.pixelInfoCache.get(pt), !0), x(_) !== void 0) return; - l.pixelInfoCache.size === 0 && (ie = 0), ie++, ie > 6 ? (clearTimeout(ye), ye = setTimeout(async () => X(tt), 500)) : X(tt) - }); - async function X(tt) { - const pt = await ni.getPixelInfo(tt); - if (pt.paintedBy !== void 0) { - const ut = pe(tt); - l.pixelInfoCache.set(ut, pt) - } - const It = pe({ - ...x(W), - season: l.season - }); - return oe(_, l.pixelInfoCache.get(It), !0), pt - } - - function Se() { - l.crosshair.clear(), pa.smallPlop.play(), l.onclose() - } - Ii(() => { - const tt = pt => { - pt.key === "Escape" && Se() - }; - return document.addEventListener("keydown", tt), () => document.removeEventListener("keydown", tt) - }); - const we = lt(() => { - var bt, wt, dt, Lt, Xt, Yt, nr; - const tt = [], - pt = (wt = (bt = Dt) == null ? void 0 : bt.data) == null ? void 0 : wt.role; - Cu(pt, ["admin"]) && !x($) && tt.push("ban-user"), Cu(pt, ["admin", "global_moderator", "moderator"]) && !x($) && tt.push("timeout-user"), ((((Lt = (dt = Dt) == null ? void 0 : dt.data) == null ? void 0 : Lt.id) ?? Number.MAX_SAFE_INTEGER) <= 3e6 || Cu(pt, ["admin", "moderator", "global_moderator"])) && !x($) && tt.push("report-user"); - const ut = (Xt = x(_)) == null ? void 0 : Xt.paintedBy; - return (ut == null ? void 0 : ut.allianceId) === ((Yt = Dt.data) == null ? void 0 : Yt.allianceId) && ((nr = Dt.data) == null ? void 0 : nr.allianceRole) === "admin" && Dt.data.id !== (ut == null ? void 0 : ut.id) && !x($) && tt.push("ban-alliance"), tt - }); - - function Re(tt) { - const pt = (async () => await av(l.map, { - maxHeight: 1080, - maxWidth: 1080, - quality: .8, - type: "image/jpeg" - }))(); - l.onclickmodaction(x(_), pt, l.latLon, tt) - } - var Ae = oz(), - Oe = k(Ae), - Ee = k(Oe), - Ne = k(Ee); - Ne.__click = [j8, L, F, l, W]; - var ft = k(Ne); - Wf(ft, { - class: "fill-primary size-5" - }), A(Ne); - var ht = V(Ne, 2), - Xe = k(ht), - ct = k(Xe); - A(Xe); - var Je = V(Xe, 2); - { - var Be = tt => { - const pt = lt(() => x(_).region), - It = lt(() => ds(x(pt).countryId)); - var ut = V8(); - ut.__click = [q8, l, pt]; - var bt = k(ut), - wt = k(bt, !0); - A(bt); - var dt = V(bt, 2), - Lt = k(dt, !0); - A(dt); - var Xt = V(dt, 2), - Yt = k(Xt); - A(Xt), A(ut), Ge(nr => { - Or(ut, 1, `btn btn-xs flex gap-1 py-3 text-sm max-sm:max-w-32 ${nr??""}`), zr(bt, "data-tip", x(It).name), fe(wt, x(It).flag), fe(Lt, x(pt).name), fe(Yt, ``) - }, [() => Zn(x(pt).cityId)]), H(tt, ut) - }, - st = tt => { - var pt = U8(); - H(tt, pt) - }; - Ue(Je, tt => { - var pt; - (pt = x(_)) != null && pt.region ? tt(Be) : tt(st, !1) - }) - } - A(ht), A(Ee); - var it = V(Ee, 2); - it.__click = Se; - var Qe = k(it); - fc(Qe, { - class: "size-4" - }), A(it), A(Oe); - var ke = V(Oe, 2), - vt = k(ke); - { - var Q = tt => { - var pt = Z8(); - H(tt, pt) - }, - te = tt => { - var pt = Jt(), - It = zt(pt); - { - var ut = wt => { - var dt = Fn(); - Ge(Lt => fe(dt, Lt), [() => d3()]), H(wt, dt) - }, - bt = wt => { - const dt = lt(() => x(_).paintedBy); - var Lt = rz(), - Xt = k(Lt), - Yt = k(Xt); - A(Xt); - var nr = V(Xt, 2), - ar = k(nr); - es(ar, { - class: "size-5 border-0", - get userId() { - return x(dt).id - }, - get pictureUrl() { - return x(dt).picture - } - }), A(nr); - var Ft = V(nr, 2), - dr = k(Ft), - _r = k(dr), - Ir = k(_r, !0); - A(_r); - var jr = V(_r, 2), - ur = k(jr); - A(jr), A(dr); - var Mr = V(dr, 2); - { - var Ar = K => { - const le = lt(() => ds(x(dt).equippedFlag)); - var ve = $8(), - Le = k(ve, !0); - A(ve), Ge(() => { - zr(ve, "data-tip", x(le).name), fe(Le, x(le).flag) - }), H(K, ve) - }; - Ue(Mr, K => { - x(dt).equippedFlag && K(Ar) - }) - } - var kr = V(Mr, 2); - { - var Nr = K => { - ph(K, { - get username() { - return x(dt).discord - } - }) - }; - Ue(kr, K => { - x(dt).discord && K(Nr) - }) - } - var ce = V(kr, 2); - { - var O = K => { - var le = G8(), - ve = k(le, !0); - A(le), Ge((Le, Ce) => { - Or(le, 1, `badge badge-sm ml-0.5 border-0 ${Le??""} ${Ce??""}`), fe(ve, x(dt).allianceName) - }, [() => Kf(x(dt).allianceId), () => Zn(x(dt).allianceId)]), H(K, le) - }; - Ue(ce, K => { - x(dt).allianceId && K(O) - }) - } - A(Ft); - var q = V(Ft, 2); - { - var G = K => { - var le = tz(), - ve = k(le), - Le = k(ve); - om(Le, { - class: "size-4" - }), A(ve); - var Ce = V(ve, 2); - nn(Ce, 21, () => x(we), Zd, (Ze, ot) => { - var Ye = Jt(), - Ot = zt(Ye); - { - var xe = Pt => { - var kt = W8(), - Wt = k(kt); - let Lr; - Wt.__click = [H8, Re]; - var Kr = k(Wt); - B8(Kr, { - class: "size-5" - }); - var Hr = V(Kr); - A(Wt), A(kt), Ge(($r, mr) => { - Lr = Or(Wt, 1, "text-error py-2 font-medium", null, Lr, $r), fe(Hr, ` ${mr??""}`) - }, [() => ({ - "cursor-not-allowed": x($) - }), () => Yg()]), H(Pt, kt) - }, - At = Pt => { - var kt = Jt(), - Wt = zt(kt); - { - var Lr = Hr => { - var $r = K8(), - mr = k($r); - let gr; - mr.__click = [X8, Re]; - var ai = k(mr); - Eg(ai, { - class: "size-5" - }); - var Tt = V(ai); - A(mr), A($r), Ge((Ci, di) => { - gr = Or(mr, 1, "text-error font-medium", null, gr, Ci), fe(Tt, ` ${di??""}`) - }, [() => ({ - "cursor-not-allowed": x($) - }), () => Qg()]), H(Hr, $r) - }, - Kr = Hr => { - var $r = Jt(), - mr = zt($r); - { - var gr = Tt => { - var Ci = J8(), - di = k(Ci); - let Pn; - di.__click = [Y8, Re]; - var Mt = k(di); - Gy(Mt, { - class: "size-5" - }); - var Ke = V(Mt); - A(di), A(Ci), Ge((jt, Gt) => { - Pn = Or(di, 1, "text-error font-medium", null, Pn, jt), fe(Ke, ` ${Gt??""}`) - }, [() => ({ - "cursor-not-allowed": x($) - }), () => Jg()]), H(Tt, Ci) - }, - ai = Tt => { - var Ci = Jt(), - di = zt(Ci); - { - var Pn = Mt => { - var Ke = ez(), - jt = k(Ke); - jt.__click = [Q8, o, dt, X, W, l]; - var Gt = k(jt); - D8(Gt, { - class: "size-5" - }); - var Dr = V(Gt); - A(jt), A(Ke), Ge(Gr => fe(Dr, ` ${Gr??""}`), [() => Wg()]), H(Mt, Ke) - }; - Ue(di, Mt => { - x(ot) === "ban-alliance" && Mt(Pn) - }, !0) - } - H(Tt, Ci) - }; - Ue(mr, Tt => { - x(ot) === "ban-user" ? Tt(gr) : Tt(ai, !1) - }, !0) - } - H(Hr, $r) - }; - Ue(Wt, Hr => { - x(ot) === "timeout-user" ? Hr(Lr) : Hr(Kr, !1) - }, !0) - } - H(Pt, kt) - }; - Ue(Ot, Pt => { - x(ot) === "report-user" ? Pt(xe) : Pt(At, !1) - }) - } - H(Ze, Ye) - }), A(Ce), A(le), H(K, le) - }; - Ue(q, K => { - x(we).length > 0 && K(G) - }) - } - A(Lt), Ge((K, le) => { - var ve; - fe(Yt, `${K??""}:`), Or(dr, 1, `font-medium ${le??""} flex gap-1.5`), fe(Ir, ((ve = Dt.data) == null ? void 0 : ve.id) === x(dt).id ? Dt.data.name : x(dt).name), fe(ur, `#${x(dt).id??""}`) - }, [() => m3(), () => Zn(x(dt).id)]), H(wt, Lt) - }; - Ue(It, wt => { - x(_).paintedBy.id === 0 ? wt(ut) : wt(bt, !1) - }, !0) - } - H(tt, pt) - }; - Ue(vt, tt => { - x(_) === void 0 ? tt(Q) : tt(te, !1) - }) - } - A(ke); - var _e = V(ke, 2), - ne = k(_e); - ne.__click = [iz, l]; - var Pe = k(ne); - fh(Pe, { - class: "size-4.5" - }); - var Me = V(Pe); - A(ne); - var at = V(ne, 2); - { - var We = tt => { - const pt = lt(() => Dt.data.favoriteLocations.find(Lt => Math.abs(Lt.latitude - x(W).center[0]) < 5e-5 && Math.abs(Lt.longitude - x(W).center[1]) < 5e-5)), - It = lt(() => !x(pt) && Dt.data.favoriteLocations.length >= Dt.data.maxFavoriteLocations); - var ut = az(); - let bt; - ut.__click = [nz, T, pt, W]; - var wt = k(ut); - { - let Lt = lt(() => !!x(pt)); - N8(wt, { - class: "size-4.5", - get filled() { - return x(Lt) - } - }) - } - var dt = V(wt); - A(ut), Ge((Lt, Xt) => { - bt = Or(ut, 1, "btn btn-primary btn-soft", null, bt, Lt), ut.disabled = x(T) || x(It), fe(dt, ` ${Xt??""}`) - }, [() => ({ - "text-yellow-400": !!x(pt) - }), () => x(It) ? v3() : b3()]), H(tt, ut) - }; - Ue(at, tt => { - Dt.data && tt(We) - }) - } - var Ct = V(at, 2); - Ct.__click = [sz, l, W]; - var _t = k(Ct); - ov(_t, { - class: "size-4.5" - }); - var xt = V(_t); - A(Ct), A(_e), A(Ae), ps(Ae, tt => oe(F, tt), () => x(F)), Ge((tt, pt) => { - fe(ct, `Pixel: ${x(W).regionPixel[0]??""}, ${x(W).regionPixel[1]??""}`), ne.disabled = Dt.loading, fe(Me, ` ${tt??""}`), fe(xt, ` ${pt??""}`) - }, [() => Zg(), () => C3()]), $d("innerHeight", tt => oe(L, tt, !0)), H(b, Ae), Pr() -} -Wi(["click"]); - -function cz(b) { - var C; - const l = document.createElement("div"); - (C = b.parentElement) == null || C.insertBefore(l, b.nextSibling); - const _ = new IntersectionObserver(L => { - L[0].isIntersecting ? b.classList.remove("stuck") : b.classList.add("stuck") - }, { - threshold: 0, - rootMargin: "0px" - }); - return _.observe(l), () => { - l.remove(), _.disconnect() - } -} -var uz = Tr(''), - hz = Tr(''); - -function dz(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy", "filled"]); - var C = Jt(), - L = zt(C); - { - var F = o => { - var $ = uz(); - er($, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(o, $) - }, - T = o => { - var $ = hz(); - er($, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(o, $) - }; - Ue(L, o => { - l.filled ? o(F) : o(T, !1) - }) - } - H(b, C) -} -var pz = Ie(''), - fz = Ie(''), - mz = Ie(''), - _z = Ie(' ', 1), - gz = Ie(' '), - vz = Ie(''), - yz = Ie('

                '), - xz = (b, l) => { - oe(l, !x(l)) - }, - bz = Ie('

                '+Text8()+'

                '); - -function wz(b, l) { - Sr(l, !0); - const _ = (Ee, Ne = fa) => { - const ft = lt(() => { - var ne; - return (((ne = Dt.data) == null ? void 0 : ne.droplets) ?? 0) >= T.price - }), - ht = lt(() => x($) === Ne().id); - var Xe = yz(), - ct = k(Xe), - Je = k(ct, !0); - A(ct); - var Be = V(ct, 2), - st = k(Be, !0); - A(Be); - var it = V(Be, 2); - { - var Qe = ne => { - hm(ne, {}) - }; - Ue(it, ne => { - Ne().id === x(W) && ne(Qe) - }) - } - var ke = V(it, 2); - let vt; - var Q = k(ke); - { - var te = ne => { - var Pe = fz(); - Pe.__click = async () => { - try { - const _t = Ne().id; - oe($, _t, !0), await ni.purchase({ - id: F, - amount: 1, - variant: _t - }), Dt.refresh(), pa.notification1.play(); - const xt = L.find(tt => tt.id === _t); - xt && (xt.owned = !0), oe(W, _t, !0) - } catch (_t) { - qr.error(_t.message) - } finally { - oe($, void 0) - } - }; - var Me = k(Pe); - { - var at = _t => { - var xt = pz(); - H(_t, xt) - }; - Ue(Me, _t => { - x(ht) && _t(at) - }) - } - var We = V(Me, 2); - Ud(We, { - class: "size-4" - }); - var Ct = V(We); - fi(), A(Pe), Ge(_t => { - Pe.disabled = !x(ft) || x(ht), fe(Ct, ` ${_t??""} `) - }, [() => T.price.toLocaleString("en-US")]), H(ne, Pe) - }, - _e = ne => { - const Pe = lt(() => { - var ut; - return ((ut = Dt.data) == null ? void 0 : ut.equippedFlag) === Ne().id - }); - var Me = vz(); - let at; - Me.__click = async () => { - try { - oe($, Ne().id, !0); - const ut = x(Pe) ? 0 : Ne().id; - await ni.equipFlag(ut), Dt.data && (Dt.data.equippedFlag = ut), Dt.refresh() - } catch (ut) { - qr.error(ut.message) - } finally { - oe($, void 0) - } - }; - var We = k(Me), - Ct = k(We, !0); - A(We); - var _t = V(We, 2); - { - var xt = ut => { - var bt = mz(); - H(ut, bt) - }; - Ue(_t, ut => { - x(ht) && ut(xt) - }) - } - var tt = V(_t, 2); - { - var pt = ut => { - var bt = _z(), - wt = zt(bt); - fc(wt, { - class: "size-4" - }); - var dt = V(wt, 2), - Lt = k(dt, !0); - A(dt), Ge(Xt => fe(Lt, Xt), [() => p2()]), H(ut, bt) - }, - It = ut => { - var bt = gz(), - wt = k(bt, !0); - A(bt), Ge(dt => fe(wt, dt), [() => _2()]), H(ut, bt) - }; - Ue(tt, ut => { - x(Pe) ? ut(pt) : ut(It, !1) - }) - } - A(Me), Ge((ut, bt) => { - at = Or(Me, 1, "btn btn-lg sm:btn-md tooltip tooltip-bottom relative h-10", null, at, ut), Me.disabled = x(ht), fe(Ct, bt) - }, [() => ({ - "btn-warning": x(Pe) - }), () => u2()]), H(ne, Me) - }; - Ue(Q, ne => { - Ne().owned ? ne(_e, !1) : ne(te) - }) - } - A(ke), A(Xe), Ge((ne, Pe) => { - fe(Je, Ne().flag), fe(st, Ne().name), vt = Or(ke, 1, "mt-3", null, vt, ne), zr(ke, "data-tip", Pe) - }, [() => ({ - tooltip: !x(ft) - }), () => Hd()]), H(Ee, Xe) - }, - C = $n.countries.map(Ee => ({ - ...Ee, - owned: Dt.flagsBitmap.get(Ee.id) - })); - C.sort((Ee, Ne) => Number(Ne.owned) - Number(Ee.owned)); - const L = zn(C), - F = 110, - T = $n.products[F]; - let o = nt(!1), - $ = nt(void 0), - W = nt(void 0); - var ie = bz(), - pe = k(ie), - ye = k(pe); - dz(ye, { - class: "size-5.5", - filled: !0 - }), fi(2), A(pe); - var X = V(pe, 2), - Se = k(X, !0); - A(X); - var we = V(X, 2); - nn(we, 23, () => L, Ee => Ee.id, (Ee, Ne, ft) => { - var ht = Jt(), - Xe = zt(ht); - { - var ct = Je => { - _(Je, () => x(Ne)) - }; - Ue(Xe, Je => { - (x(ft) < 8 || x(o)) && Je(ct) - }) - } - H(Ee, ht) - }), A(we); - var Re = V(we, 2), - Ae = k(Re); - Ae.__click = [xz, o]; - var Oe = k(Ae, !0); - A(Ae), A(Re), A(ie), Ge(Ee => { - fe(Se, Ee), fe(Oe, x(o) ? "Show less" : "Show more") - }, [() => o2()]), H(b, ie), Pr() -} -Wi(["click"]); -var Tz = Ie('

                '), - Cz = (b, l) => { - kg(l, -1) - }, - Sz = (b, l) => { - kg(l) - }, - Pz = (b, l, _) => { - l(x(_)) - }, - Iz = Ie(''), - Mz = async (b, l, _, C) => { - try { - oe(l, !0), await ni.purchase({ - id: _.productId, - amount: C() - }), pa.notification1.play(), _.onpurchasecompleted(C()) - } catch (L) { - qr.error(L.message) - } finally { - oe(l, !1) - } - }, Az = Ie(''), kz = Ie('

                '); - -function Pg(b, l) { - Sr(l, !0); - let _ = Et(l, "amount", 15, 1); - const C = lt(() => _() * l.unitPrice), - L = lt(() => Math.floor(l.userDroplets / l.unitPrice)); - let F = nt(!1); - Zr(() => { - _() < 0 && _(0) - }); - var T = kz(), - o = k(T), - $ = k(o); - Ji($, () => l.icon ?? fa), A(o); - var W = V(o, 2), - ie = k(W, !0); - A(W); - var pe = V(W, 2); - { - var ye = Be => { - var st = Tz(), - it = k(st, !0); - A(st), Ge(() => fe(it, l.subtitle)), H(Be, st) - }; - Ue(pe, Be => { - l.subtitle && Be(ye) - }) - } - var X = V(pe, 2), - Se = k(X); - Se.__click = [Cz, _]; - var we = V(Se, 2); - ea(we); - var Re = V(we, 2); - Re.__click = [Sz, _]; - var Ae = V(Re, 2); - { - var Oe = Be => { - var st = Iz(); - st.__click = [Pz, _, L], H(Be, st) - }; - Ue(Ae, Be => { - _() < x(L) && Be(Oe) - }) - } - A(X); - var Ee = V(X, 2); - let Ne; - var ft = k(Ee); - ft.__click = [Mz, F, l, _]; - var ht = k(ft); - { - var Xe = Be => { - var st = Az(); - H(Be, st) - }; - Ue(ht, Be => { - x(F) && Be(Xe) - }) - } - var ct = V(ht, 2); - Ud(ct, { - class: "size-4" - }); - var Je = V(ct); - fi(), A(ft), A(Ee), A(T), Ge((Be, st, it, Qe) => { - fe(ie, Be), Re.disabled = _() >= x(L), zr(Ee, "data-tip", st), Ne = Or(Ee, 1, "", null, Ne, it), ft.disabled = l.userDroplets < x(C) || x(F) || !_(), fe(Je, ` ${Qe??""} `) - }, [() => l.title(_()), () => Hd(), () => ({ - tooltip: l.userDroplets < x(C) - }), () => x(C).toLocaleString("en-US")]), jd(we, _), H(b, T), Pr() -} -Wi(["click"]); -var Ez = Tr(''); - -function zz(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Ez(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Lz = Tr(''); - -function Rv(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Lz(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Dz = Tr(''); - -function Rz(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Dz(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Bz = Tr(''); - -function Fz(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Bz(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Oz = Ie(''), - Nz = Ie(''), - jz = Ie(' ', 1); - -function qz(b, l) { - Sr(l, !0); - let _ = Et(l, "open", 15), - C = nt(void 0), - L = nt(zn({ - name: hg(), - prev: 1e3, - new: 1e5 - })); - Ii(() => { - const Me = at => { - at.key === "Escape" && _(!1) - }; - return document.addEventListener("keydown", Me), () => document.removeEventListener("keydown", Me) - }); - const F = { - id: 70, - product: $n.products[70] - }, - T = { - id: 80, - product: $n.products[80] - }, - o = { - product: $n.products[120] - }; - var $ = jz(), - W = zt($), - ie = k(W), - pe = k(ie); - { - var ye = Me => { - var at = Oz(), - We = k(at), - Ct = k(We), - _t = k(Ct); - Rv(_t, { - class: "size-8" - }); - var xt = V(_t, 2), - tt = k(xt, !0); - A(xt); - var pt = V(xt, 2), - It = k(pt); - { - let Pt = lt(() => { - var kt; - return ((kt = Dt.data) == null ? void 0 : kt.droplets) ?? 0 - }); - Rg(It, { - get value() { - return x(Pt) - } - }) - } - A(pt), fi(2), A(Ct), A(We), On(We, () => cz); - var ut = V(We, 2), - bt = k(ut), - wt = k(bt), - dt = k(wt); - zz(dt, { - class: "size-5.5", - filled: !0 - }); - var Lt = V(dt, 2), - Xt = k(Lt, !0); - A(Lt), A(wt); - var Yt = V(wt, 2), - nr = k(Yt, !0); - A(Yt); - var ar = V(Yt, 2), - Ft = k(ar); - { - const Pt = Wt => { - Fz(Wt, { - class: "text-primary size-26" - }) - }; - let kt = lt(() => cb()); - Pg(Ft, { - get productId() { - return F.id - }, - title: Wt => sb({ - amount: F.product.items[0].amount * Wt - }), - get subtitle() { - return x(kt) - }, - get unitPrice() { - return F.product.price - }, - get userDroplets() { - return Dt.data.droplets - }, - onpurchasecompleted: async Wt => { - var Hr, $r, mr, gr, ai; - const Lr = ($r = (Hr = Dt.data) == null ? void 0 : Hr.charges) == null ? void 0 : $r.max; - await Dt.refresh(); - const Kr = (gr = (mr = Dt.data) == null ? void 0 : mr.charges) == null ? void 0 : gr.max; - Lr !== void 0 && Kr !== void 0 && (oe(L, { - name: hg(), - prev: Lr, - new: Kr - }, !0), (ai = x(C)) == null || ai.show()) - }, - icon: Pt, - $$slots: { - icon: !0 - } - }) - } - var dr = V(Ft, 2); - { - const Pt = Wt => { - Ev(Wt, { - class: "text-primary my-3 size-20" - }) - }; - let kt = lt(() => Y1()); - Pg(dr, { - get productId() { - return T.id - }, - title: Wt => Qw({ - amount: T.product.items[0].amount * Wt - }), - get subtitle() { - return x(kt) - }, - get unitPrice() { - return T.product.price - }, - get userDroplets() { - return Dt.data.droplets - }, - onpurchasecompleted: async Wt => { - var Kr, Hr, $r; - const Lr = (Hr = (Kr = Dt.data) == null ? void 0 : Kr.charges) == null ? void 0 : Hr.count; - await Dt.refresh(), Lr !== void 0 && (oe(L, { - name: Kw(), - prev: Math.floor(Lr), - new: Math.floor(Lr + T.product.items[0].amount * Wt) - }, !0), ($r = x(C)) == null || $r.show()) - }, - icon: Pt, - $$slots: { - icon: !0 - } - }) - } - A(ar), A(bt); - var _r = V(bt, 2), - Ir = k(_r), - jr = k(Ir); - Xd(jr, { - class: "size-5.5", - filled: !0 - }); - var ur = V(jr, 2), - Mr = k(ur, !0); - A(ur), A(Ir); - var Ar = V(Ir, 2), - kr = k(Ar), - Nr = k(kr), - ce = k(Nr), - O = k(ce), - q = k(O); - Bg(q, { - get userId() { - return Dt.data.id - }, - get level() { - return Dt.data.level - }, - get pictureUrl() { - return Dt.data.picture - } - }), A(O), A(ce), A(Nr); - var G = V(Nr, 2), - K = k(G, !0); - A(G); - var le = V(G, 2), - ve = k(le, !0); - A(le); - var Le = V(le, 2); - let Ce; - var Ze = k(Le), - ot = k(Ze), - Ye = k(ot); - Ud(Ye, { - class: "size-4" - }); - var Ot = V(Ye); - fi(), A(ot), A(Ze), A(Le), A(kr), A(Ar), A(_r); - var xe = V(_r, 2), - At = k(xe); - wz(At, {}), A(xe), A(ut), A(at), Ge((Pt, kt, Wt, Lr, Kr, Hr, $r, mr, gr) => { - fe(tt, Pt), fe(Xt, kt), fe(nr, Wt), fe(Mr, Lr), fe(K, Kr), fe(ve, Hr), zr(Le, "data-tip", $r), Ce = Or(Le, 1, "", null, Ce, mr), ot.disabled = Dt.data.droplets < o.product.price, fe(Ot, ` ${gr??""} `) - }, [() => qg(), () => eb(), () => ib(), () => n2(), () => db(), () => mb(), () => Hd(), () => ({ - tooltip: Dt.data.droplets < o.product.price - }), () => o.product.price.toLocaleString("en-US")]), En(2, at, () => Qn), H(Me, at) - }; - Ue(pe, Me => { - Dt.data && _() && Me(ye) - }) - } - A(ie); - var X = V(ie, 2), - Se = k(X), - we = k(Se, !0); - A(Se), A(X), A(W), On(W, () => Me => { - Zr(() => { - _() ? Me.show() : Me.close() - }) - }); - var Re = V(W, 2), - Ae = k(Re), - Oe = k(Ae), - Ee = k(Oe), - Ne = k(Ee, !0); - A(Ee); - var ft = V(Ee, 2), - ht = k(ft), - Xe = k(ht), - ct = V(Xe), - Je = k(ct); - A(ct), A(ht); - var Be = V(ht, 2), - st = k(Be); - Rz(st, { - class: "size-5" - }), A(Be); - var it = V(Be, 2), - Qe = k(it, !0); - A(it), A(ft); - var ke = V(ft, 2), - vt = k(ke), - Q = k(vt), - te = V(Q); - Pu(te, () => x(L).new, Me => { - var at = Nz(), - We = k(at); - hm(We, {}), A(at), H(Me, at) - }), A(vt), A(ke), A(Oe), A(Ae); - var _e = V(Ae, 2), - ne = k(_e), - Pe = k(ne, !0); - A(ne), A(_e), A(Re), ps(Re, Me => oe(C, Me), () => x(C)), Ge((Me, at, We) => { - fe(we, Me), fe(Ne, x(L).name), fe(Xe, `${x(L).prev??""} `), fe(Je, `(+${x(L).new-x(L).prev})`), fe(Qe, x(L).new), fe(Q, `${at??""} `), fe(Pe, We) - }, [() => tc(), () => tc(), () => tc()]), an("close", W, () => _(!1)), H(b, $), Pr() -} -var Vz = Tr(''); - -function Uz(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Vz(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Zz = Tr(''); - -function $z(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Zz(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Gz = Tr(''); - -function Hz(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Gz(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Wz = Tr(''); - -function Xz(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Wz(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Kz = Tr(''); - -function Yz(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Kz(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var Jz = Tr(''); - -function Qz(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = Jz(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} -var eL = Tr(''); - -function tL(b, l) { - let _ = Qt(l, ["$$slots", "$$events", "$$legacy"]); - var C = eL(); - er(C, () => ({ - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 -960 960 960", - fill: "currentColor", - ..._ - })), H(b, C) -} - -function vf(b) { - const l = document.createElement("img"); - return l.src = b, new Promise((_, C) => { - l.addEventListener("load", () => { - _(l) - }), l.addEventListener("error", L => { - C(L) - }) - }) -} - -function rL(b) { - const l = document.createElement("canvas"); - l.width = b.naturalWidth, l.height = b.naturalHeight; - const _ = l.getContext("2d"); - return _ == null || _.drawImage(b, 0, 0), l -} - -function iL(b, l, _) { - return b < l ? l : b > _ ? _ : b -} - -function nL(b, l) { - const _ = 10 ** l; - return Math.round(b * _) / _ -} -var aL = Ie(' ', 1), - sL = (b, l) => { - oe(l, !x(l)) - }, - oL = Ie(""), - lL = async (b, l, _, C) => { - var L; - x(l) || oe(l, await new Promise((F, T) => { - navigator.geolocation.getCurrentPosition(o => { - F(o) - }, o => { - T(o) - }) - })), x(l) && (Qa({ - lat: x(l).coords.latitude, - lng: x(l).coords.longitude - }, x(_)), (L = x(C)) == null || L.flyTo({ - center: { - lat: x(l).coords.latitude, - lng: x(l).coords.longitude - }, - zoom: 16.5 - })) - }, cL = Ie('
                ?
                '), uL = Ie(''), hL = (b, l, _, C) => { - var L; - oe(l, !0), x(_) && Qa((L = x(_)) == null ? void 0 : L.getCenter(), x(C)) - }, dL = Ie(''), pL = Ie(' '), fL = Ie('
                '), mL = (b, l, _, C) => { - var F; - oe(l, !0); - const L = (F = x(_)) == null ? void 0 : F.getCenter(); - L && Qa(L, x(C)) - }, _L = Ie(''), gL = (b, l) => { - oe(l, !0) - }, vL = Ie(''), yL = (b, l) => { - oe(l, !0) - }, xL = Ie(''), bL = Ie('
                '), wL = (b, l) => { - oe(l, !x(l)) - }, TL = Ie('
                '), CL = Ie('
                '), SL = (b, l) => { - oe(l, !0) - }, PL = Ie(''), IL = (b, l) => { - var _; - (_ = x(l)) == null || _.zoomIn() - }, ML = (b, l) => { - var _; - (_ = x(l)) == null || _.zoomOut() - }, AL = Ie(''), kL = () => { - window.location.replace(La.url.origin) - }, EL = Ie(''), zL = (b, l) => { - x(l) && Ho.goToPrev(x(l)) - }, LL = Ie(''), DL = Ie('
                '), RL = (b, l, _) => { - var C; - (C = x(l)) == null || C.flyTo({ - center: x(l).getCenter(), - zoom: _ - }) - }, BL = Ie(''), FL = Ie(""), OL = Ie('
                '), NL = Ie('
                '), jL = (b, l) => { - oe(l, { - name: "mainMenu" - }, !0) - }, qL = Ie('
                '), VL = Ie('
                ', 1); - -function gD(b, l) { - Sr(l, !0); - const _ = og, - C = ix, - L = new hc(C), - F = _ - .4, - T = FP(La.url), - o = T.season ?? sg, - $ = new Map; - let W = nt(void 0), - ie = nt(14.5), - pe = nt(!1); - const ye = lt(() => { - var gt; - return ((gt = Dt.data) == null ? void 0 : gt.id) === 401 - }); - let X = nt(!1), - Se = nt(zn(T.select && T.pos ? { - name: "pixelSelected", - latLon: [T.pos.lat, T.pos.lng] - } : { - name: "mainMenu" - })); - Ii(() => { - Re().then(vr => oe(W, vr)); - let gt = [0, 0]; - - function qt(vr) { - var _i; - if (x(W) && x(ie) > _ + 1) { - const { - lat: Di, - lng: $i - } = x(W).unproject([vr.clientX, vr.clientY]), Mi = L.latLonToPixels(Di, $i, _), Cr = Math.floor(Mi[0]), gn = Math.floor(Mi[1]); - if (gt[0] !== Cr || gt[1] !== gn) { - const tr = L.latLonToPixelBoundsLatLon(Di, $i, _), - Ht = rm(tr, !0); - (_i = x(W).getSource(Ee)) == null || _i.setCoordinates(Ht), gt = [Cr, gn] - } - } - } - return window.addEventListener("mousemove", qt), () => { - var vr; - (vr = x(W)) == null || vr.remove(), window.removeEventListener("mousemove", qt), we && clearInterval(we), yf() - } - }); - let we; - async function Re() { - const gt = T.pos ? { - ...T.pos, - zoom: x(ie) - } : await IP(); - T.zoom !== void 0 && (gt.zoom = T.zoom); - const qt = await new Promise(Mi => { - const Cr = new bd.Map({ - style: "maps/styles/liberty", - center: gt, - zoom: gt.zoom, - container: "map", - dragRotate: !1, - doubleClickZoom: !1, - pitch: 0, - maxPitch: 0, - attributionControl: !1 - }); - Cr.touchZoomRotate.disableRotation(), Cr.on("style.load", () => { - Cr == null || Cr.setLayoutProperty("poi_transit", "visibility", "none"), Cr == null || Cr.setLayoutProperty("poi_r20", "visibility", "none"), Cr == null || Cr.setLayoutProperty("poi_r7", "visibility", "none"), Cr == null || Cr.setLayoutProperty("poi_r1", "visibility", "none"), Cr == null || Cr.setLayoutProperty("building", "visibility", "none"), Cr == null || Cr.setLayoutProperty("building-3d", "visibility", "none"), Cr == null || Cr.setLayoutProperty("landuse_pitch", "visibility", "none"), Cr == null || Cr.setLayoutProperty("landuse_hospital", "visibility", "none"), Cr == null || Cr.setLayoutProperty("landuse_school", "visibility", "none"), Cr == null || Cr.setLayoutProperty("landuse_residential", "visibility", "none"), Cr == null || Cr.setLayoutProperty("waterway_tunnel", "visibility", "none"), Cr == null || Cr.setFilter("water", ["all", ["!=", "brunnel", "tunnel"], - ["!=", "class", "swimming_pool"] - ]), Mi(Cr) - }) - }); - Oe(qt), Xe(); - const vr = $n.refreshIntervalMs; - - function _i() { - let Mi = x(ie) > _ + 1.5 ? vr : 2.5 * vr; - try { - document.visibilityState === "visible" && Oe(qt) - } finally { - setTimeout(_i, Mi) - } - } - we = setTimeout(_i, vr); - let Di = x(ie); - qt.on("zoom", () => { - oe(ie, qt.getZoom(), !0); - const Mi = nL(x(ie), 1); - Mi != Di && (x(ke) && x(ke).setOpacity(vt(Di)), Di = Mi) - }); - let $i = "default"; - return qt.on("dragstart", () => { - const Mi = qt.getCanvas(); - $i = Mi.style.cursor, Mi.style.cursor = "move" - }), qt.on("dragend", () => { - qt.getCanvas().style.cursor = $i - }), qt.on("mouseout", () => { - ct() - }), qt.on("click", async Mi => { - var ei; - const Cr = Mi.lngLat.lat, - gn = Mi.lngLat.lng, - tr = [Cr, gn]; - if (x(Se).name === "paintingPixel") return; - if (x(Se).name === "selectHq") { - x(Se).hq = tr, (ei = x(Q)) == null || ei.clearAndPlace(tr); - return - } - const Ht = qt.getZoom(); - if (Ht < F) { - qr.info(IC()); - return - } - Qa({ - lat: Cr, - lng: gn - }, Ht), oe(Se, { - name: "pixelSelected", - latLon: tr - }, !0) - }), qt - } - const Ae = "pixel-art-layer"; - - function Oe(gt) { - const qt = window.innerWidth, - vr = `${nx}/s${sg}/tiles/{x}/{y}.png`; - if ($.clear(), !gt.style) return; - gt.getSource(Ae) ? gt.refreshTiles(Ae) : gt.addSource(Ae, { - type: "raster", - tiles: [vr], - minzoom: _, - maxzoom: _, - tileSize: qt > 640 ? 550 : 400 - }), gt.getLayer(Ae) || gt.addLayer({ - id: Ae, - type: "raster", - source: Ae, - paint: { - "raster-resampling": "nearest", - "raster-opacity": x(Be) - } - }) - } - const Ee = "pixel-hover", - Ne = 1e-5, - ft = [ - [0, 0], - [Ne, 0], - [Ne, -Ne], - [0, -Ne] - ], - ht = .4; - async function Xe() { - var gt, qt, vr, _i; - if (!((gt = x(W)) != null && gt.getSource(Ee))) { - const Di = rL(await vf(SP)); - (qt = x(W)) == null || qt.addSource(Ee, { - type: "canvas", - canvas: Di, - coordinates: ft - }) - }(vr = x(W)) != null && vr.getLayer(Ee) || (_i = x(W)) == null || _i.addLayer({ - id: Ee, - type: "raster", - source: Ee, - paint: { - "raster-resampling": "nearest", - "raster-opacity": ht - } - }) - } - - function ct() { - var gt, qt; - (qt = (gt = x(W)) == null ? void 0 : gt.getSource(Ee)) == null || qt.setCoordinates(ft) - } - let Je = nt(zn(T.opaque ?? !0)), - Be = lt(() => x(Je) ? 1 : .1); - Zr(() => { - var gt; - (gt = x(W)) != null && gt.getLayer(Ae) && x(W).setPaintProperty(Ae, "raster-opacity", x(Be)) - }); - let st = nt(void 0), - it = nt(void 0), - Qe = nt(void 0); - Ii(() => (navigator.permissions.query({ - name: "geolocation" - }).then(gt => { - gt.state === "granted" && oe(Qe, navigator.geolocation.watchPosition(qt => { - oe(st, qt) - }, qt => { - oe(it, qt) - }, { - enableHighAccuracy: !1, - maximumAge: 1e3, - timeout: 6e3 - }), !0) - }), () => { - x(Qe) && navigator.geolocation.clearWatch(x(Qe)) - })); - let ke = nt(void 0); - dc(() => [x(st), x(W)], () => { - var gt, qt; - if (x(st) && x(W)) { - const vr = { - lat: x(st).coords.latitude, - lng: x(st).coords.longitude - }, - _i = vt(x(ie)); - if (!x(ke)) { - const Di = document.createElement("div"); - Di.classList.add("maplibregl-user-location-dot"), Di.classList.add("cursor-auto"), oe(ke, new bd.Marker({ - element: Di, - opacity: _i - }).setLngLat(vr).addTo(x(W))) - }(qt = (gt = x(ke)) == null ? void 0 : gt.setLngLat(vr)) == null || qt.setOpacity(_i) - } - }); - - function vt(gt) { - return gt < _ ? "1.0" : iL((gt - _) * .2, .5, 1).toFixed(2) - } - let Q = nt(void 0); - Zr(() => { - var gt; - x(W) && ((gt = Go(() => x(Q))) == null || gt.clear(), vf(dg).then(qt => { - oe(Q, new fg({ - id: "select-crosshair", - map: x(W), - tileSize: C, - zoom: _, - img: qt, - markerFn: () => { - const vr = new bd.Marker({ - color: "#0069ff" - }); - return vr.addClassName("z-20"), vr - } - })) - })) - }); - let te = nt(void 0); - Zr(() => { - var gt; - x(W) && ((gt = Go(() => x(Q))) == null || gt.clear(), vf(dg).then(qt => { - oe(te, new fg({ - id: "paint-crosshair", - map: x(W), - tileSize: C, - zoom: _, - img: qt - })) - })) - }); - let _e = nt(!1), - ne = nt(!1), - Pe = nt(!1), - Me = nt(!!T.newUser), - at = nt(!1), - We = nt(!!T.alliance), - Ct = nt(!1); - const _t = "void-message-2"; - let xt = nt(!1); - Zr(() => { - const gt = localStorage.getItem(_t); - Dt.data && !gt && (oe(xt, !0), localStorage.setItem(_t, "true")) - }); - let tt = nt(!1), - pt = nt(zn(La.url)), - It = nt(zn({ - cityId: 0, - countryId: 1, - id: 0, - name: "None", - number: 1 - })), - ut = nt(!1); - const bt = "view-rules"; - let wt = !1; - Zr(() => { - Dt.data && (!wt && Dt.data.pixelsPainted > 1 && (localStorage.getItem(bt) || (oe(ut, !0), localStorage.setItem(bt, "true"))), wt = !0) - }); - let dt = nt(!1); - Zr(() => { - var gt; - oe(dt, !!((gt = Dt.data) != null && gt.needsPhoneVerification)) - }); - let Lt = nt([]), - Xt = lt(() => x(ie) < F ? "1.0" : x(ie) < F + 2 ? "0.5" : "0.3"); - Zr(() => { - var qt; - const gt = (qt = Dt.data) == null ? void 0 : qt.favoriteLocations; - if (gt && x(W)) { - for (const vr of Go(() => x(Lt))) vr.remove(); - oe(Lt, gt.map(vr => { - const _i = document.createElement("div"); - _i.classList.add("text-yellow-400"), _i.classList.add("cursor-pointer"), _i.classList.add("z-10"), _i.innerHTML = ` - - - `; - const Di = { - lat: vr.latitude, - lng: vr.longitude - }; - return _i.addEventListener("click", Mi => { - Mi.stopPropagation(), Yt([vr.latitude, vr.longitude]) - }), new bd.Marker({ - element: _i, - opacity: x(Xt) - }).setLngLat(Di).addTo(x(W)) - })) - } - }); - - function Yt(gt) { - var vr; - const qt = { - lat: gt[0], - lng: gt[1] - }; - (vr = x(W)) == null || vr.flyTo({ - center: qt, - zoom: Math.max(x(ie), 15) - }), Qa(qt, x(ie)), oe(Se, { - name: "pixelSelected", - latLon: [qt.lat, qt.lng] - }, !0) - } - Zr(() => { - if (x(Se).name === "paintingPixel") - for (const gt of x(Lt)) gt.addClassName("hidden"); - else - for (const gt of x(Lt)) gt.removeClassName("hidden"), gt.setOpacity(x(Xt)) - }); - let nr = Number.MAX_VALUE; - Zr(() => { - if (Dt.charges !== void 0 && Dt.data) { - const gt = Dt.data.charges.max, - qt = Dt.charges; - nr < gt && qt >= gt && pa.notification1.play(), nr = Dt.charges - } - }); - let ar = nt(!1), - Ft = Date.now(); - Ii(() => { - const gt = BP(), - qt = () => { - var _i; - if (!document.hidden && Date.now() - Ft > 30 * Yl.min) { - if (gt) { - const $i = (_i = x(W)) == null ? void 0 : _i.getCenter(); - $i && Qa($i, x(ie)), window.location.replace(La.url.origin) - } else Dt.refresh(); - Ft = Date.now() - } - }; - return document.addEventListener("visibilitychange", qt), () => document.removeEventListener("visibilitychange", qt) - }), Ii(() => { - function gt() { - ni.online = !0 - } - window.addEventListener("online", gt); - - function qt() { - ni.online = !1 - } - return window.addEventListener("offline", qt), () => { - window.removeEventListener("online", gt), window.removeEventListener("offline", qt) - } - }), Zr(() => { - if (!ni.online) { - const gt = setInterval(() => { - ni.health().then(() => { - ni.online = !0, !Dt.data && !Dt.loading && Dt.refresh() - }) - }, 5e3); - return () => { - clearInterval(gt) - } - } - }), Ii(() => { - function gt(qt) { - qt.data.type && x(W) && Oe(x(W)) - } - return navigator.serviceWorker.addEventListener("message", gt), () => { - navigator.serviceWorker.removeEventListener("message", gt) - } - }); - let dr = nt(!1), - _r = nt("report-user"), - Ir = nt(void 0), - jr = nt(void 0), - ur = nt(void 0), - Mr = nt(0); - var Ar = VL(); - Vy(gt => { - var qt = aL(); - qy.title = "openplace - Paint the world", fi(6), H(gt, qt) - }); - var kr = zt(Ar); - { - const gt = tr => { - var Ht = oL(); - Ht.__click = [sL, Je]; - var ei = k(Ht); - { - let ri = lt(() => !x(Je)); - zv(ei, { - class: "size-5", - get filled() { - return x(ri) - } - }) - } - A(Ht), Ge(ri => { - zr(Ht, "title", ri), Or(Ht, 1, Vo({ - "btn btn-lg btn-square sm:btn-xl z-30 shadow-md": !0, - "text-base-content/80": x(Je), - "btn-primary btn-soft": !x(Je) - })) - }, [() => Ug()]), H(tr, Ht) - }, - qt = tr => { - var Ht = uL(); - Ht.__click = [lL, st, ie, W]; - var ei = k(Ht); - { - var ri = ci => { - Xz(ci, { - class: "size-5.5 fill-blue-800" - }) - }, - gi = ci => { - var pi = cL(), - Er = k(pi); - Hz(Er, { - class: "size-5.5 fill-red-400" - }), fi(2), A(pi), H(ci, pi) - }; - Ue(ei, ci => { - x(st) ? ci(ri) : ci(gi, !1) - }) - } - A(Ht), Ge(ci => zr(Ht, "title", ci), [() => d1()]), H(tr, Ht) - }; - var Nr = V(k(kr), 2); - let vr; - var ce = k(Nr); - let _i; - var O = k(ce); - { - var q = tr => { - var Ht = dL(); - Ht.__click = [hL, _e, W, ie]; - var ei = k(Ht, !0); - A(Ht), Ge(ri => fe(ei, ri), [() => Ex()]), H(tr, Ht) - }, - G = tr => { - var Ht = Jt(), - ei = zt(Ht); - { - var ri = gi => { - var ci = fL(), - pi = k(ci); - { - var Er = ui => { - var Jr = pL(), - ti = k(Jr, !0); - A(Jr), Ge(() => { - var yr; - zr(Jr, "href", `${La.url.origin??""}/admin`), fe(ti, ((yr = Dt.data) == null ? void 0 : yr.role) === "admin" ? "ADMIN" : "MOD") - }), H(ui, Jr) - }; - Ue(pi, ui => { - var Jr; - Cu((Jr = Dt.data) == null ? void 0 : Jr.role, ["admin", "moderator", "global_moderator"]) && ui(Er) - }) - } - var Ri = V(pi, 2); - h8(Ri, { - get user() { - return Dt - }, - onlogout: () => { - oe(Se, { - name: "mainMenu" - }, !0) - }, - onclickleaderboard: () => { - oe(Pe, !0) - }, - onclickshop: () => { - var Jr; - oe(ne, !0); - const ui = (Jr = x(W)) == null ? void 0 : Jr.getCenter(); - ui && Qa(ui, x(ie)) - } - }), A(ci), En(3, ci, () => Qn, () => ({ - duration: 150 - })), H(gi, ci) - }; - Ue(ei, gi => { - Dt.data && x(W) && x(Se).name !== "paintingPixel" && gi(ri) - }, !0) - } - H(tr, Ht) - }; - Ue(O, tr => { - !Dt.loading && !Dt.data ? tr(q) : tr(G, !1) - }) - } - var K = V(O, 2); - { - var le = tr => { - var Ht = bL(), - ei = k(Ht); - { - var ri = Ri => { - _f(Ri, { - key: "shop-profile-picture", - children: (ui, Jr) => { - var ti = _L(); - ti.__click = [mL, ne, W, ie]; - var yr = k(ti); - Rv(yr, { - class: "size-5" - }), A(ti), Ge(on => zr(ti, "title", on), [() => qg()]), H(ui, ti) - }, - $$slots: { - default: !0 - } - }) - }; - Ue(ei, Ri => { - Dt.data && Ri(ri) - }) - } - var gi = V(ei, 2); - { - var ci = Ri => { - var ui = vL(); - ui.__click = [gL, We]; - var Jr = k(ui); - Kd(Jr, { - class: "size-5" - }), A(ui), Ge(ti => zr(ui, "title", ti), [() => Gd()]), H(Ri, ui) - }; - Ue(gi, Ri => { - Dt.data && Ri(ci) - }) - } - var pi = V(gi, 2); - v8(pi, { - get map() { - return x(W) - }, - get season() { - return o - } - }); - var Er = V(pi, 2); - _f(Er, { - key: "region-leaderboard", - children: (Ri, ui) => { - var Jr = xL(); - Jr.__click = [yL, Pe]; - var ti = k(Jr); - Mv(ti, { - class: "size-5" - }), A(Jr), Ge(yr => zr(Jr, "title", yr), [() => Yf()]), H(Ri, Jr) - }, - $$slots: { - default: !0 - } - }), A(Ht), En(3, Ht, () => Qn, () => ({ - duration: 150 - })), H(tr, Ht) - }, - ve = tr => { - var Ht = Jt(), - ei = zt(Ht); - { - var ri = gi => { - var ci = TL(), - pi = k(ci); - let Er; - pi.__click = [wL, pe]; - var Ri = k(pi); - { - var ui = ti => { - Gf(ti, { - class: "size-5" - }) - }, - Jr = ti => { - Ld(ti, { - class: "size-5" - }) - }; - Ue(Ri, ti => { - x(pe) ? ti(ui) : ti(Jr, !1) - }) - } - A(pi), A(ci), Ge((ti, yr) => { - zr(pi, "title", ti), Er = Or(pi, 1, "btn btn-square not-touchscreen:hidden shadow-md", null, Er, yr) - }, [() => x(pe) ? jx() : Ux(), () => ({ - "btn-primary": x(pe) - })]), En(1, ci, () => Qn, () => ({ - delay: 150, - duration: 150 - })), H(gi, ci) - }; - Ue(ei, gi => { - x(W) && x(Se).name === "paintingPixel" && gi(ri) - }, !0) - } - H(tr, Ht) - }; - Ue(K, tr => { - x(W) && x(Se).name !== "paintingPixel" ? tr(le) : tr(ve, !1) - }) - } - A(ce), A(Nr); - var Le = V(Nr, 2); - { - var Ce = tr => { - var Ht = CL(), - ei = k(Ht); - { - oa.captcha = { token: "skip", time: Date.now() }; - } - A(Ht), En(2, Ht, () => Qn, () => ({ - duration: 300 - })), H(tr, Ht) - }; - Ue(Le, tr => { - (!oa.captcha || oa.now - oa.captcha.time > 180 * 1e3) && tr(Ce) - }) - } - var Ze = V(Le, 2); - let Di; - var ot = k(Ze); - { - var Ye = tr => { - _f(tr, { - key: "info", - children: (Ht, ei) => { - var ri = PL(); - ri.__click = [SL, at]; - var gi = k(ri); - $z(gi, { - class: "size-3.5" - }), A(ri), Ge(ci => zr(ri, "title", ci), [() => Gx()]), H(Ht, ri) - }, - $$slots: { - default: !0 - } - }) - }; - Ue(ot, tr => { - x(Se).name !== "paintingPixel" && tr(Ye) - }) - } - var Ot = V(ot, 2), - xe = k(Ot); - xe.__click = [IL, W]; - var At = V(xe, 2); - At.__click = [ML, W], A(Ot); - var Pt = V(Ot, 2), - kt = k(Pt), - Wt = k(kt); - jg(Wt, { - class: "size-4" - }), A(kt), A(Pt); - var Lr = V(Pt, 2); - { - var Kr = tr => { - var Ht = AL(), - ei = k(Ht); - tL(ei, { - class: "size-4", - onclick: () => { - oe(X, !x(X)) - } - }), A(Ht), Ge(ri => zr(Ht, "title", ri), [() => Ob()]), H(tr, Ht) - }; - Ue(Lr, tr => { - x(ye) && tr(Kr) - }) - } - var Hr = V(Lr, 2); - { - var $r = tr => { - var Ht = EL(); - Ht.__click = [kL]; - var ei = k(Ht); - Tx(ei, { - class: "size-3" - }), A(Ht), Ge(ri => zr(Ht, "title", ri), [() => Cx()]), H(tr, Ht) - }; - Ue(Hr, tr => { - x(Se).name !== "paintingPixel" && tr($r) - }) - } - var mr = V(Hr, 2); - { - var gr = tr => { - var Ht = LL(); - Ht.__click = [zL, W]; - var ei = k(Ht); - Qz(ei, { - class: "size-3" - }), A(Ht), Ge((ri, gi) => { - zr(Ht, "title", ri), Ht.disabled = gi - }, [() => t1(), () => !Ho.hasPrev()]), En(1, Ht, () => Qn, () => ({ - delay: 1e3, - duration: 300 - })), En(2, Ht, () => Qn, () => ({ - duration: 300 - })), H(tr, Ht) - }; - Ue(mr, tr => { - Ho.hasPrev() && x(Se).name !== "paintingPixel" && tr(gr) - }) - } - A(Ze); - var ai = V(Ze, 2); - let $i; - var Tt = k(ai); - { - var Ci = tr => { - var Ht = DL(), - ei = k(Ht); - Sx(ei, { - class: "size-5" - }); - var ri = V(ei); - A(Ht), Ge(gi => fe(ri, ` ${gi??""}`), [() => n1()]), En(1, Ht, () => Qn, () => ({ - duration: 1e3 - })), En(2, Ht, () => Qn), H(tr, Ht) - }; - Ue(Tt, tr => { - ni.online || tr(Ci) - }) - } - var di = V(Tt, 2); - { - var Pn = tr => { - var Ht = BL(); - Ht.__click = [RL, W, _]; - var ei = k(Ht); - Yz(ei, { - class: "size-5" - }); - var ri = V(ei); - A(Ht), Ge(gi => fe(ri, ` ${gi??""}`), [() => o1()]), En(3, Ht, () => Qn, () => ({ - duration: 300 - })), H(tr, Ht) - }; - Ue(di, tr => { - x(ie) < F && tr(Pn) - }) - } - A(ai); - var Mt = V(ai, 2); - let Mi; - var Ke = k(Mt); - gt(Ke), A(Mt); - var jt = V(Mt, 2); - let Cr; - var Gt = k(jt); - { - var Dr = tr => { - kv(tr, { - class: "z-30", - onclick: () => { - var Ht; - (Ht = Dt.data) != null && Ht.needsPhoneVerification ? (oe(dt, !0), qr.warning(cg())) : Dt.charges !== void 0 && Dt.charges < 1 ? qr.warning(rk, { - icon: Eg - }) : x(W) && Dt.data ? (pa.smallDropplet.play(), oe(Se, { - name: "paintingPixel" - }, !0)) : (oe(_e, !0), x(W) && Qa(x(W).getCenter(), x(ie))) - }, - get disabled() { - return Dt.loading - }, - get loading() { - return Dt.loading - }, - get charges() { - return Dt.charges - } - }) - }, - Gr = tr => { - var Ht = FL(); - H(tr, Ht) - }; - Ue(Gt, tr => { - x(Se).name === "mainMenu" ? tr(Dr) : tr(Gr, !1) - }) - } - A(jt); - var li = V(jt, 2); - let gn; - var fr = k(li); - qt(fr), A(li); - var bi = V(li, 2); - { - var Si = tr => { - var Ht = Jt(), - ei = zt(Ht); - { - var ri = ci => { - var pi = OL(), - Er = k(pi), - Ri = k(Er); - lz(Ri, { - get latLon() { - return x(Se).latLon - }, - get map() { - return x(W) - }, - get crosshair() { - return x(Q) - }, - get pixelInfoCache() { - return $ - }, - get season() { - return o - }, - get tileSize() { - return C - }, - get pixelArtZoom() { - return _ - }, - get zoom() { - return x(ie) - }, - get opaquePixelArt() { - return x(Je) - }, - onclose: () => oe(Se, { - name: "mainMenu" - }, !0), - onclickshare: ui => { - oe(pt, ui, !0), oe(tt, !0) - }, - onclickpaint: ([ui, Jr]) => { - var yr, on, vn; - if (!Dt.data) { - oe(_e, !0); - return - } - if ((yr = Dt.data) != null && yr.needsPhoneVerification) { - oe(dt, !0), qr.warning(cg()); - return - } - if (Dt.charges !== void 0 && Dt.charges < 1) { - qr.warning(m1()); - return - } - const ti = im(L.latLonToPixelBoundsLatLon(ui, Jr, _)); - (on = x(W)) == null || on.flyTo({ - center: { - lat: ti[0], - lon: ti[1] - } - }), oe(Se, { - name: "paintingPixel", - clickedLatLon: [ui, Jr] - }, !0), (vn = x(Q)) == null || vn.clear() - }, - onclickregion: ui => { - oe(It, ui, !0), oe(Ct, !0) - }, - onclickmodaction: (ui, Jr, ti, yr) => { - var on, vn, _a; - (on = x(W)) == null || on.setZoom(Math.max(x(ie), _ + 2)), (vn = x(W)) == null || vn.setCenter({ - lat: ti[0], - lng: ti[1] - }), oe(Ir, Jr, !0), oe(jr, ui, !0), oe(ur, ti, !0), oe(Mr, ((_a = x(W)) == null ? void 0 : _a.getZoom()) ?? 0, !0), oe(_r, yr, !0), oe(dr, !0) - } - }), A(Er), A(pi), En(3, Er, () => uf, () => ({ - duration: 100 - })), H(ci, pi) - }, - gi = ci => { - var pi = Jt(), - Er = zt(pi); - { - var Ri = Jr => { - var ti = NL(), - yr = k(ti), - on = k(yr); - nE(on, { - get map() { - return x(W) - }, - get clickedLatLon() { - return x(Se).clickedLatLon - }, - get tileSize() { - return C - }, - get tileZoom() { - return _ - }, - get season() { - return o - }, - get zoom() { - return x(ie) - }, - get crosshair() { - return x(te) - }, - refreshPixelArt: () => x(W) && Oe(x(W)), - hidePixelHover: ct, - hoverLayerId: Ee, - onclose: () => { - oe(Se, { - name: "mainMenu" - }, !0), ct() - }, - get screenLocked() { - return x(pe) - }, - set screenLocked(vn) { - oe(pe, vn, !0) - }, - get opaquePixelArt() { - return x(Je) - }, - set opaquePixelArt(vn) { - oe(Je, vn, !0) - } - }), A(yr), A(ti), En(3, yr, () => uf, () => ({ - duration: 100 - })), H(Jr, ti) - }, - ui = Jr => { - var ti = Jt(), - yr = zt(ti); - { - var on = vn => { - var _a = qL(), - ln = k(_a), - Ki = k(ln), - cn = k(Ki), - Ni = k(cn), - wi = k(Ni); - Lv(wi, { - class: "inline size-4" - }); - var Ko = V(wi); - A(Ni); - var un = V(Ni, 2); - un.__click = [jL, Se]; - var Nn = k(un); - fc(Nn, { - class: "size-4" - }), A(un), A(cn); - var hn = V(cn, 2), - Ti = k(hn); - Ti.__click = async () => { - var wr; - if (x(Se).name === "selectHq") { - const Vr = x(Se).hq; - if (Vr) try { - oe(ar, !0), await ni.updateAllianceHeadquarters(Vr[0], Vr[1]), (wr = x(Q)) == null || wr.clear(), oe(We, !0), oe(Se, { - name: "mainMenu" - }, !0) - } catch (ga) { - qr.error(ga.message) - } finally { - oe(ar, !1) - } - } - }; - var Za = k(Ti); - Uz(Za, { - class: "size-6" - }), A(Ti), A(hn), A(Ki), A(ln), A(_a), Ge(wr => { - fe(Ko, ` ${wr??""}`), Ti.disabled = x(Se).hq === void 0 || x(ar) - }, [() => B3()]), En(3, ln, () => uf, () => ({ - duration: 100 - })), H(vn, _a) - }; - Ue(yr, vn => { - x(Se).name === "selectHq" && vn(on) - }, !0) - } - H(Jr, ti) - }; - Ue(Er, Jr => { - x(Se).name === "paintingPixel" && x(te) ? Jr(Ri) : Jr(ui, !1) - }, !0) - } - H(ci, pi) - }; - Ue(ei, ci => { - x(Se).name === "pixelSelected" && x(Q) ? ci(ri) : ci(gi, !1) - }) - } - H(tr, Ht) - }; - Ue(bi, tr => { - x(W) && tr(Si) - }) - } - A(kr), Ge((tr, Ht, ei, ri, gi, ci, pi, Er, Ri) => { - vr = Or(Nr, 1, "absolute right-2 top-2 z-30", null, vr, tr), _i = Or(ce, 1, "flex flex-col gap-4", null, _i, Ht), Di = Or(Ze, 1, "absolute left-2 top-2 z-30 flex flex-col gap-3", null, Di, ei), zr(xe, "title", ri), zr(At, "title", gi), $i = Or(ai, 1, "absolute left-1/2 top-2 z-30 flex -translate-x-1/2 flex-col items-center justify-center gap-2", null, $i, ci), Mi = Or(Mt, 1, "absolute bottom-3 left-3 z-30", null, Mi, pi), Cr = Or(jt, 1, "absolute bottom-3 left-1/2 z-30 -translate-x-1/2", null, Cr, Er), gn = Or(li, 1, "absolute bottom-3 right-3 z-30", null, gn, Ri) - }, [() => ({ - hidden: x(X) - }), () => ({ - "items-end": !Dt.data, - "items-center": Dt.data - }), () => ({ - hidden: x(X) - }), () => Xx(), () => Jx(), () => ({ - hidden: x(X) - }), () => ({ - hidden: x(X) - }), () => ({ - hidden: x(X) - }), () => ({ - hidden: x(X) - })]) - } - var zi = V(kr, 2); - YA(zi, { - get open() { - return x(_e) - }, - set open(gt) { - oe(_e, gt, !0) - } - }); - var mi = V(zi, 2); - qz(mi, { - get open() { - return x(ne) - }, - set open(gt) { - oe(ne, gt, !0) - } - }); - var Li = V(mi, 2); - ZM(Li, { - get open() { - return x(Me) - }, - set open(gt) { - oe(Me, gt, !0) - } - }); - var rr = V(Li, 2); - i4(rr, { - get open() { - return x(at) - }, - set open(gt) { - oe(at, gt, !0) - } - }); - var yi = V(rr, 2); - qM(yi, { - get open() { - return x(ut) - }, - set open(gt) { - oe(ut, gt, !0) - } - }); - var Qr = V(yi, 2); - WA(Qr, { - onvisitclick: gt => { - var qt; - (qt = x(W)) == null || qt.flyTo({ - center: gt, - zoom: og + 1 - }), Qa(gt, x(ie)), Ho.push({ - pos: gt, - zoom: x(ie) - }), oe(Pe, !1) - }, - get open() { - return x(Pe) - }, - set open(gt) { - oe(Pe, gt, !0) - } - }); - var Yr = V(Qr, 2); - z8(Yr, { - get region() { - return x(It) - }, - get open() { - return x(Ct) - }, - set open(gt) { - oe(Ct, gt, !0) - } - }); - var la = V(Yr, 2); - mx(la, { - get open() { - return oa.dropletsDialogOpen - }, - set open(gt) { - oa.dropletsDialogOpen = gt - } - }); - var sn = V(la, 2); - { - var ta = gt => { - gM(gt, { - onhqchange: () => { - oe(Se, { - name: "selectHq" - }, !0), oe(We, !1) - }, - onhqclick: qt => { - var vr; - (vr = x(W)) == null || vr.flyTo({ - center: qt, - zoom: Math.max(x(ie), 15) - }), oe(Se, { - name: "pixelSelected", - latLon: [qt.lat, qt.lng] - }, !0), oe(We, !1) - }, - onlastpixelclick: qt => { - var vr; - (vr = x(W)) == null || vr.flyTo({ - center: qt, - zoom: Math.max(x(ie), 15) - }), oe(Se, { - name: "pixelSelected", - latLon: [qt.lat, qt.lng] - }, !0), oe(We, !1) - }, - get open() { - return x(We) - }, - set open(qt) { - oe(We, qt, !0) - } - }) - }; - Ue(sn, gt => { - x(W) && gt(ta) - }) - } - var Fi = V(sn, 2); - CE(Fi, { - get open() { - return x(dt) - }, - set open(gt) { - oe(dt, gt, !0) - } - }); - var Xi = V(Fi, 2); - { - var Gn = gt => { - DM(gt, { - get url() { - return x(pt) - }, - get map() { - return x(W) - }, - hideHover: () => { - var qt, vr; - (qt = x(W)) == null || qt.setPaintProperty(Ee, "raster-opacity", 0), (vr = x(Q)) == null || vr.setCanvasOpacity(0) - }, - showHover: () => { - var qt, vr; - (qt = x(W)) == null || qt.setPaintProperty(Ee, "raster-opacity", ht), (vr = x(Q)) == null || vr.setCanvasOpacity(1) - }, - get open() { - return x(tt) - }, - set open(qt) { - oe(tt, qt, !0) - } - }) - }; - Ue(Xi, gt => { - x(W) && gt(Gn) - }) - } - var Hn = V(Xi, 2); - { - var Ln = gt => { - bM(gt, { - get image() { - return x(Ir) - }, - get paintedBy() { - return x(jr).paintedBy - }, - get latLon() { - return x(ur) - }, - get zoom() { - return x(Mr) - }, - get action() { - return x(_r) - }, - get open() { - return x(dr) - }, - set open(qt) { - oe(dr, qt, !0) - } - }) - }; - Ue(Hn, gt => { - x(jr) && x(Ir) && x(ur) && gt(Ln) - }) - } - H(b, Ar), Pr() -} -Wi(["click"]); -export { - gD as component -}; \ No newline at end of file diff --git a/frontend-backup/_app/immutable/nodes/2.DTTH4yjc.js b/frontend-backup/_app/immutable/nodes/2.DTTH4yjc.js deleted file mode 100644 index 63f3aad..0000000 --- a/frontend-backup/_app/immutable/nodes/2.DTTH4yjc.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/B2cHk4HI.js";import{p as L,f as b,b as c,c as R,$ as S,d as t,n as y,r as s,s as x,t as W,g as n,u as $}from"../chunks/BDALf20I.js";import{s as j}from"../chunks/4k6DpCgf.js";import{s as z}from"../chunks/4WsUhDWi.js";import{k as M,t as g}from"../chunks/BCONGQnO.js";import{e as N,i as P}from"../chunks/CZW2bcQi.js";import{h as U}from"../chunks/BUhRjcOt.js";import{c as Y,s as q,a as B}from"../chunks/BNZUboE0.js";import{p as _}from"../chunks/C-Y7nmnD.js";import{L as C}from"../chunks/CYItkO2S.js";import{f as w}from"../chunks/DnhglgUZ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="b13ebcf7-0e8c-49ec-bc33-0015c8d1ee6b",e._sentryDebugIdIdentifier="sentry-dbid-b13ebcf7-0e8c-49ec-bc33-0015c8d1ee6b")})()}catch{}var F=b(' '),G=b("
                "),H=b('');function re(e,i){L(i,!0);const m=$(()=>_.url.pathname),k=[{label:"Dashboard",href:"/admin/dashboard",key:"dashboard"},{label:"Mods",href:"/admin/mods/leaderboard",key:"mods"},{label:"Users",href:"/admin/users",key:"users"},{label:"Alliances",href:"/admin/alliances",key:"alliances"}];function A(r){return n(m)===r||n(m).startsWith(r+"/")}var d=H();U(r=>{S.title="Wplace - Admin"});var l=t(d),f=t(l),p=t(f),D=t(p);C(D,{class:"h-7 w-auto"}),y(2),s(p),y(2),s(f);var u=x(f,2),v=t(u);N(v,21,()=>k,P,(r,a)=>{var o=F(),I=t(o,!0);s(o),W(T=>{q(o,"href",n(a).href),B(o,1,T),j(I,n(a).label)},[()=>Y({tab:!0,"font-semibold":!0,"tab-active":A(n(a).href)})]),c(r,o)}),s(v),s(u),s(l);var h=x(l,2),E=t(h);M(E,()=>_.url.pathname,r=>{var a=G(),o=t(a);z(o,()=>i.children),s(a),g(1,a,()=>w,()=>({duration:120})),g(2,a,()=>w,()=>({duration:80})),c(r,a)}),s(h),s(d),c(e,d),R()}export{re as component}; diff --git a/frontend-backup/_app/immutable/nodes/20.LCTNv26D.js b/frontend-backup/_app/immutable/nodes/20.LCTNv26D.js new file mode 100644 index 0000000..d053325 --- /dev/null +++ b/frontend-backup/_app/immutable/nodes/20.LCTNv26D.js @@ -0,0 +1,59 @@ +import "../chunks/Ch2Ub8FX.js"; +import "../chunks/BOREeBzQ.js"; +import { f as d, b as l, $ as t, d as s, r, n } from "../chunks/CMvZtFtm.js"; +import { h as c } from "../chunks/P77cUGnY.js"; +import { L as m } from "../chunks/D3yDgRbd.js"; +(function () { + try { + var o = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + o.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var o = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + e = new o.Error().stack; + e && + ((o._sentryDebugIds = o._sentryDebugIds || {}), + (o._sentryDebugIds[e] = "82b5f9ec-cd5e-4d29-a95b-a5ca1216383a"), + (o._sentryDebugIdIdentifier = + "sentry-dbid-82b5f9ec-cd5e-4d29-a95b-a5ca1216383a")); + })(); +} catch {} +var u = + d(`

                Política de Reembolso

                Última atualização: 17 de setembro de 2025

                Como solicitar um reembolso?

                • Entre em contato com nosso suporte através do email refund@wplace.live
                • Forneça seu ID de usuário, email da conta do Wplace, comprovante de pagamento e motivo da + solicitação.

                Você pode solicitar um reembolso quando:

                • Você for cobrado duas vezes pelo mesmo serviço.
                • Você não conseguir usar o serviço devido a problemas técnicos com o Wplace que durem mais de + 24 horas.
                • Você não utilizou os serviços dentro de 7 dias corridos após a compra.

                Reembolsos não serão concedidos quando:

                • Se passaram mais de 7 dias após a compra.
                • O cancelamento ocorrer depois que os serviços tiverem sido usados.
                • Houver violação dos termos de uso, especialmente em casos de banimento de conta.
                • Houver problemas relacionados ao uso do cartão, como:
                  • Perda, furto ou roubo do cartão;
                  • Uso não autorizado por terceiros;
                  • Contestações sobre compras feitas por usuários não autorizados, quando não for possível + provar uma falha do sistema.
                • Nesses casos, o portador do cartão deve entrar em contato diretamente com a instituição + financeira para tomar as ações apropriadas, como bloquear o cartão, contestar cobranças e + solicitar um estorno, de acordo com as regras do banco ou operadora do cartão.
                • Reembolsos só serão considerados em situações onde for comprovada uma falha técnica do sistema + da plataforma.

                Prazos:

                • O Wplace responderá dentro de 10 dias úteis.
                • O reembolso será processado usando o mesmo método de pagamento e ocorrerá dentro de 7 a 30 + dias.
                `); +function y(o) { + var e = u(); + c((p) => { + t.title = "FurryPlace - Política de Reembolso"; + }); + var a = s(e), + i = s(a); + m(i, { size: "lg", class: "mb-4", hasText: !0 }), r(a), n(20), r(e), l(o, e); +} +export { y as component }; diff --git a/frontend-backup/_app/immutable/nodes/20.ppFj_8Kx.js b/frontend-backup/_app/immutable/nodes/20.ppFj_8Kx.js deleted file mode 100644 index 498730b..0000000 --- a/frontend-backup/_app/immutable/nodes/20.ppFj_8Kx.js +++ /dev/null @@ -1,8 +0,0 @@ -import"../chunks/B2cHk4HI.js";import"../chunks/cUtKXcx3.js";import{f as d,b as l,$ as t,d as s,r,n}from"../chunks/BDALf20I.js";import{h as c}from"../chunks/BUhRjcOt.js";import{L as m}from"../chunks/CYItkO2S.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};o.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new o.Error().stack;e&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[e]="82b5f9ec-cd5e-4d29-a95b-a5ca1216383a",o._sentryDebugIdIdentifier="sentry-dbid-82b5f9ec-cd5e-4d29-a95b-a5ca1216383a")})()}catch{}var u=d(`

                Política de Reembolso

                Última atualização: 17 de setembro de 2025

                Como solicitar um reembolso?

                • Entre em contato com nosso suporte através do email refund@wplace.live
                • Forneça seu ID de usuário, email da conta do Wplace, comprovante de pagamento e motivo da - solicitação.

                Você pode solicitar um reembolso quando:

                • Você for cobrado duas vezes pelo mesmo serviço.
                • Você não conseguir usar o serviço devido a problemas técnicos com o Wplace que durem mais de - 24 horas.
                • Você não utilizou os serviços dentro de 7 dias corridos após a compra.

                Reembolsos não serão concedidos quando:

                • Se passaram mais de 7 dias após a compra.
                • O cancelamento ocorrer depois que os serviços tiverem sido usados.
                • Houver violação dos termos de uso, especialmente em casos de banimento de conta.
                • Houver problemas relacionados ao uso do cartão, como:
                  • Perda, furto ou roubo do cartão;
                  • Uso não autorizado por terceiros;
                  • Contestações sobre compras feitas por usuários não autorizados, quando não for possível - provar uma falha do sistema.
                • Nesses casos, o portador do cartão deve entrar em contato diretamente com a instituição - financeira para tomar as ações apropriadas, como bloquear o cartão, contestar cobranças e - solicitar um estorno, de acordo com as regras do banco ou operadora do cartão.
                • Reembolsos só serão considerados em situações onde for comprovada uma falha técnica do sistema - da plataforma.

                Prazos:

                • O Wplace responderá dentro de 10 dias úteis.
                • O reembolso será processado usando o mesmo método de pagamento e ocorrerá dentro de 7 a 30 - dias.
                `);function y(o){var e=u();c(p=>{t.title="Wplace - Política de Reembolso"});var a=s(e),i=s(a);m(i,{size:"lg",class:"mb-4",hasText:!0}),r(a),n(20),r(e),l(o,e)}export{y as component}; diff --git a/frontend-backup/_app/immutable/nodes/21.PUjACzZY.js b/frontend-backup/_app/immutable/nodes/21.zScYLJw9.js similarity index 98% rename from frontend-backup/_app/immutable/nodes/21.PUjACzZY.js rename to frontend-backup/_app/immutable/nodes/21.zScYLJw9.js index c33d030..5462d0f 100644 --- a/frontend-backup/_app/immutable/nodes/21.PUjACzZY.js +++ b/frontend-backup/_app/immutable/nodes/21.zScYLJw9.js @@ -1,4 +1,52 @@ -import"../chunks/B2cHk4HI.js";import"../chunks/cUtKXcx3.js";import{f as n,b as i,$ as r,d as l,r as a,n as c}from"../chunks/BDALf20I.js";import{h as v}from"../chunks/BUhRjcOt.js";import{L as d}from"../chunks/CYItkO2S.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="5f562edb-cbd5-40ec-9749-754fa5b546c1",t._sentryDebugIdIdentifier="sentry-dbid-5f562edb-cbd5-40ec-9749-754fa5b546c1")})()}catch{}var p=n(`

                TERMS OF SERVICE

                Last updated June 08, 2025


                AGREEMENT TO OUR LEGAL TERMS

                TERMS OF SERVICE

                Last updated June 08, 2025


                AGREEMENT TO OUR LEGAL TERMS

                We are Wplace ("Company," "we," "us," "our")
                Wplace
                wplacelive@gmail.com
                `);function u(t){var e=p();v(b=>{r.title="Wplace - Terms of Service"});var s=l(e),o=l(s);d(o,{class:"mb-4",hasText:!0}),a(s),c(2),a(e),i(t,e)}export{u as component}; +Calibri;color:#595959;mso-themecolor:text1;mso-themetint:166;" class="svelte-11vl9q8">wplacelive@gmail.com
                `); +function u(t) { + var e = p(); + v((b) => { + r.title = "FurryPlace - Terms of Service"; + }); + var s = l(e), + o = l(s); + d(o, { class: "mb-4", hasText: !0 }), a(s), c(2), a(e), i(t, e); +} +export { u as component }; diff --git a/frontend-backup/_app/immutable/nodes/3.BjOx-5ND.js b/frontend-backup/_app/immutable/nodes/3.BjOx-5ND.js deleted file mode 100644 index 58b9c0e..0000000 --- a/frontend-backup/_app/immutable/nodes/3.BjOx-5ND.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/B2cHk4HI.js";import{p as E,f as b,b as f,c as I,$ as D,d,s as v,r as s,t as A,g as i,u as L}from"../chunks/BDALf20I.js";import{s as R}from"../chunks/4k6DpCgf.js";import{s as M}from"../chunks/4WsUhDWi.js";import{k as S,t as h}from"../chunks/BCONGQnO.js";import{e as W,i as $}from"../chunks/CZW2bcQi.js";import{h as j}from"../chunks/BUhRjcOt.js";import{c as z,s as N,a as P}from"../chunks/BNZUboE0.js";import{p as x}from"../chunks/C-Y7nmnD.js";import{f as y}from"../chunks/DnhglgUZ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="5182694d-9a71-4d57-8522-89f3ef7ecde6",e._sentryDebugIdIdentifier="sentry-dbid-5182694d-9a71-4d57-8522-89f3ef7ecde6")})()}catch{}var Y=b(' '),q=b("
                "),B=b('');function X(e,o){E(o,!0);const c=L(()=>x.url.pathname),g=[{label:"Leaderboard (Tickets)",href:"/admin/mods/leaderboard",key:"leaderboard"},{label:"Leaderboard (Reports)",href:"/admin/mods/leaderboard-reports",key:"leaderboard-reports"}];function _(t){return i(c)===t||i(c).startsWith(t+"/")}var n=B();j(t=>{D.title="Wplace - Admin - Mods"});var l=d(n),m=v(d(l),2),p=d(m);W(p,21,()=>g,$,(t,a)=>{var r=Y(),k=d(r,!0);s(r),A(T=>{N(r,"href",i(a).href),P(r,1,T),R(k,i(a).label)},[()=>z({tab:!0,"font-semibold":!0,"tab-active":_(i(a).href)})]),f(t,r)}),s(p),s(m),s(l);var u=v(l,2),w=d(u);S(w,()=>x.url.pathname,t=>{var a=q(),r=d(a);M(r,()=>o.children),s(a),h(1,a,()=>y,()=>({duration:120})),h(2,a,()=>y,()=>({duration:80})),f(t,a)}),s(u),s(n),f(e,n),I()}export{X as component}; diff --git a/frontend-backup/_app/immutable/nodes/3.DOMAwJeg.js b/frontend-backup/_app/immutable/nodes/3.DOMAwJeg.js new file mode 100644 index 0000000..b457a78 --- /dev/null +++ b/frontend-backup/_app/immutable/nodes/3.DOMAwJeg.js @@ -0,0 +1,142 @@ +import "../chunks/Ch2Ub8FX.js"; +import { + p as E, + f as b, + b as f, + c as I, + $ as D, + d as o, + s as v, + r as s, + t as A, + g as i, + u as L, +} from "../chunks/CMvZtFtm.js"; +import { s as R } from "../chunks/DVA6u9-7.js"; +import { s as M } from "../chunks/DoL3ojdE.js"; +import { k as S, t as h } from "../chunks/BBgyHb-Z.js"; +import { e as W, i as $ } from "../chunks/CXkjfmFU.js"; +import { h as j } from "../chunks/P77cUGnY.js"; +import { c as z, s as N, a as P } from "../chunks/C5yqZvKC.js"; +import { p as x } from "../chunks/B6ZK_HZO.js"; +import { f as y } from "../chunks/wZ7b5CwQ.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + d = new e.Error().stack; + d && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[d] = "5182694d-9a71-4d57-8522-89f3ef7ecde6"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-5182694d-9a71-4d57-8522-89f3ef7ecde6")); + })(); +} catch {} +var Y = b(' '), + q = b("
                "), + B = b( + '' + ); +function X(e, d) { + E(d, !0); + const c = L(() => x.url.pathname), + g = [ + { + label: "Leaderboard (Tickets)", + href: "/admin/mods/leaderboard", + key: "leaderboard", + }, + { + label: "Leaderboard (Reports)", + href: "/admin/mods/leaderboard-reports", + key: "leaderboard-reports", + }, + ]; + function _(t) { + return i(c) === t || i(c).startsWith(t + "/"); + } + var n = B(); + j((t) => { + D.title = "FurryPlace - Admin - Mods"; + }); + var l = o(n), + m = v(o(l), 2), + p = o(m); + W( + p, + 21, + () => g, + $, + (t, a) => { + var r = Y(), + k = o(r, !0); + s(r), + A( + (T) => { + N(r, "href", i(a).href), P(r, 1, T), R(k, i(a).label); + }, + [ + () => + z({ tab: !0, "font-semibold": !0, "tab-active": _(i(a).href) }), + ] + ), + f(t, r); + } + ), + s(p), + s(m), + s(l); + var u = v(l, 2), + w = o(u); + S( + w, + () => x.url.pathname, + (t) => { + var a = q(), + r = o(a); + M(r, () => d.children), + s(a), + h( + 1, + a, + () => y, + () => ({ duration: 120 }) + ), + h( + 2, + a, + () => y, + () => ({ duration: 80 }) + ), + f(t, a); + } + ), + s(u), + s(n), + f(e, n), + I(); +} +export { X as component }; diff --git a/frontend-backup/_app/immutable/nodes/4.CrDfIbdR.js b/frontend-backup/_app/immutable/nodes/4.CrDfIbdR.js new file mode 100644 index 0000000..bd52856 --- /dev/null +++ b/frontend-backup/_app/immutable/nodes/4.CrDfIbdR.js @@ -0,0 +1,71782 @@ +var $1 = Object.defineProperty; +var $g = (m) => { + throw TypeError(m); +}; +var G1 = (m, a, p) => + a in m + ? $1(m, a, { enumerable: !0, configurable: !0, writable: !0, value: p }) + : (m[a] = p); +var xr = (m, a, p) => G1(m, typeof a != "symbol" ? a + "" : a, p), + zf = (m, a, p) => a.has(m) || $g("Cannot " + p); +var ot = (m, a, p) => ( + zf(m, a, "read from private field"), p ? p.call(m) : a.get(m) + ), + Ar = (m, a, p) => + a.has(m) + ? $g("Cannot add the same private member more than once") + : a instanceof WeakSet + ? a.add(m) + : a.set(m, p), + na = (m, a, p, y) => ( + zf(m, a, "write to private field"), y ? y.call(m, p) : a.set(m, p), p + ), + jr = (m, a, p) => (zf(m, a, "access private method"), p); +import "../chunks/Ch2Ub8FX.js"; +import { o as Fn, s as oi } from "../chunks/DoL3ojdE.js"; +import { + a1 as H1, + b8 as W1, + bp as X1, + ba as Y1, + bq as K1, + b3 as J1, + br as Q1, + au as st, + g as x, + aw as se, + av as bi, + at as $n, + p as Lr, + f as Te, + d as A, + r as k, + s as j, + u as ft, + n as yn, + t as We, + ax as di, + b as $, + c as Dr, + y as Wr, + v as Pr, + bn as Nu, + x as Mm, + z as ul, + ay as er, + a as Ct, + b4 as wi, + aI as ex, + aH as Gg, + aJ as tx, + aL as Iv, + bs as uo, + az as pa, + bt as Mv, + $ as rx, +} from "../chunks/CMvZtFtm.js"; +import { s as de } from "../chunks/DVA6u9-7.js"; +import { + p as zt, + i as Oe, + r as nr, + s as Is, + u as kv, +} from "../chunks/BF50aS-j.js"; +import { h as nx } from "../chunks/P77cUGnY.js"; +import { + r as Ka, + f as Ni, + a as zr, + g as Av, + b as ar, + s as Tr, + e as kc, + h as Ou, + c as Yo, +} from "../chunks/C5yqZvKC.js"; +import { a as ll, k as ju, t as Ai } from "../chunks/BBgyHb-Z.js"; +import { g as km, b as ix } from "../chunks/CyB--sFG.js"; +import { p as yi } from "../chunks/B6ZK_HZO.js"; +import { + S as Wi, + a as Qr, + t as Fr, + u as Mt, + v as So, + g as ai, + w as ax, + x as ox, + y as sx, + P as lx, + z as cx, + A as ux, + j as hx, + B as dx, + C as Hg, + D as Lf, + E as px, + F as fx, + d as mx, + G as _x, +} from "../chunks/BRM3t761.js"; +import { + c as Ev, + A as aa, + a as Hf, + g as Df, + p as gx, + b as vx, +} from "../chunks/C0GlPMrk.js"; +import { h as Am } from "../chunks/DueIxFLX.js"; +import { b as Ko } from "../chunks/0wx1llIh.js"; +import { L as yx } from "../chunks/CgCA7Awo.js"; +import { g as Ne, l as xx } from "../chunks/CV9xcpLq.js"; +import { c as Ah } from "../chunks/CHGjpGz-.js"; +import { d as bx, L as Em, p as zm } from "../chunks/BKioTOWR.js"; +import { + c as Wf, + D as zv, + p as wx, + r as Tx, + t as Cx, + b as Sx, + R as Px, +} from "../chunks/Cqwd83E5.js"; +import { e as hi, i as hp } from "../chunks/CXkjfmFU.js"; +import { c as Lm, b as dp, a as Ix } from "../chunks/Dpga8uG-.js"; +import { P as co, t as Lv } from "../chunks/D3yaN7Zl.js"; +import { + l as Mx, + p as Dm, + m as Dv, + v as kx, + s as Ax, +} from "../chunks/BsOIMr0T.js"; +import { g as Oi, a as pp, c as Ex, b as zx } from "../chunks/lE0oaQc5.js"; +import { f as cl, t as Lx } from "../chunks/DBSOMMI_.js"; +import { A as Dx, c as Ss } from "../chunks/Dt3xBOvm.js"; +import { + A as Rv, + d as Bv, + D as Fv, + a as fp, + r as Rx, + I as Wg, + e as Bx, + c as Fx, + P as Ov, + b as Ox, +} from "../chunks/BA2Qx8r3.js"; +import { f as ia, s as Hd } from "../chunks/wZ7b5CwQ.js"; +import { C as Rm, G as Xg, c as Nx, T as Xf } from "../chunks/DLfdYhzo.js"; +import "../chunks/BOREeBzQ.js"; +import { i as Nv } from "../chunks/Z_72d8Vp.js"; +import { L as jv } from "../chunks/D3yDgRbd.js"; +import { c as xi } from "../chunks/CdTXrPIO.js"; +import { L as jx, T as Vv, a as Vx } from "../chunks/Bn0Xcwmn.js"; +import { _ as qx } from "../chunks/BI7eddl7.js"; +import { c as qv } from "../chunks/C4yB2Gnm.js"; +import { R as Zx } from "../chunks/m3o6lEf1.js"; +import { W as Ux } from "../chunks/DCynssDD.js"; +import { r as $x } from "../chunks/C3E1P42D.js"; +(function () { + try { + var m = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + m.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var m = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + a = new m.Error().stack; + a && + ((m._sentryDebugIds = m._sentryDebugIds || {}), + (m._sentryDebugIds[a] = "adf93bd4-0a14-4f4e-9af7-5f1b369a26cd"), + (m._sentryDebugIdIdentifier = + "sentry-dbid-adf93bd4-0a14-4f4e-9af7-5f1b369a26cd")); + })(); +} catch {} +const Gx = []; +function Hx(m, a = !1, p = !1) { + return Wd(m, new Map(), "", Gx, null, p); +} +function Wd(m, a, p, y, M = null, z = !1) { + if (typeof m == "object" && m !== null) { + var T = a.get(m); + if (T !== void 0) return T; + if (m instanceof Map) return new Map(m); + if (m instanceof Set) return new Set(m); + if (H1(m)) { + var s = Array(m.length); + a.set(m, s), M !== null && a.set(M, s); + for (var B = 0; B < m.length; B += 1) { + var O = m[B]; + B in m && (s[B] = Wd(O, a, p, y, null, z)); + } + return s; + } + if (W1(m) === X1) { + (s = {}), a.set(m, s), M !== null && a.set(M, s); + for (var X in m) s[X] = Wd(m[X], a, p, y, null, z); + return s; + } + if (m instanceof Date) return structuredClone(m); + if (typeof m.toJSON == "function" && !z) return Wd(m.toJSON(), a, p, y, m); + } + if (m instanceof EventTarget) return m; + try { + return structuredClone(m); + } catch { + return m; + } +} +function Wx() { + return Symbol(Y1); +} +function mp(m, a) { + K1(window, ["resize"], () => J1(() => a(window[m]))); +} +const Xx = Q1, + Yx = () => "Log in", + Kx = () => "Entrar", + Jx = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? Yx() : Kx()), + Qx = () => "Store", + eb = () => "Loja", + Zv = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? Qx() : eb()), + tb = () => "Alliance", + rb = () => "Aliança", + _p = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? tb() : rb()), + nb = () => "Leaderboard", + ib = () => "Ranking", + Bm = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? nb() : ib()), + ab = () => "Unlock", + ob = () => "Destravar", + sb = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? ab() : ob()), + lb = () => "Lock", + cb = () => "Travar", + ub = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? lb() : cb()), + hb = () => "Info", + db = () => "Informações", + pb = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? hb() : db()), + fb = () => "Zoom in", + mb = () => "Aumentar zoom", + _b = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? fb() : mb()), + gb = () => "Zoom out", + vb = () => "Diminuir zoom", + yb = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? gb() : vb()), + xb = () => "Previous location", + bb = () => "Localização anterior", + wb = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? xb() : bb()), + Tb = () => "Offline", + Cb = () => "Offline", + Sb = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? Tb() : Cb()), + Pb = () => "Zoom in to see the pixels", + Ib = () => "Amplie para ver os pixels", + Mb = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? Pb() : Ib()), + kb = () => "Phone verification required", + Ab = () => "Verificação de telefone necessária", + Yg = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? kb() : Ab()), + Eb = () => "My location", + zb = () => "Minha localização", + Lb = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? Eb() : zb()), + Db = () => "You don't have charges to paint. Wait to recharge.", + Rb = () => "Você não possui tinta para pintar. Aguarde para carrega-las.", + Bb = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? Db() : Rb()), + Fb = () => "Map powered by:", + Ob = () => "Mapa fornecido por:", + Nb = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? Fb() : Ob()), + jb = () => "OpenMapTiles Data from", + Vb = () => "OpenMapTiles com dados do", + qb = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? jb() : Vb()), + Zb = () => "Overview", + Ub = () => "Visão Geral", + $b = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? Zb() : Ub()), + Gb = () => "How to paint faster", + Hb = () => "Como pintar mais rápido", + Wb = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? Gb() : Hb()), + Xb = () => "When painting, click on the button", + Yb = () => "Quando pintar clique no botão", + Kb = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? Xb() : Yb()), + Jb = () => + "on the top right corner of the screen. This will lock the screen but it'll also enable painting by moving your finger over the map.", + Qb = () => + "no canto superior direito da tela. Isso bloqueará a tela, mas também permitirá pintar movendo o dedo sobre o mapa.", + e2 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? Jb() : Qb()), + t2 = () => "Hold", + r2 = () => "Segure", + n2 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? t2() : r2()), + i2 = () => "SPACE", + a2 = () => "Espaço", + o2 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? i2() : a2()), + s2 = () => "and move your cursor over the map.", + l2 = () => "e mova seu cursor sobre o mapa.", + c2 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? s2() : l2()), + u2 = () => "Explore", + h2 = () => "Explorar", + d2 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? u2() : h2()), + p2 = () => "Recharge paint charges", + f2 = () => "Recarga de tinta", + m2 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? p2() : f2()), + _2 = () => "Items", + g2 = () => "Itens", + v2 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? _2() : g2()), + y2 = () => "Get more charges", + x2 = () => "Recarregue tinta para pintar", + b2 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? y2() : x2()), + w2 = (m) => `+${m.amount} Max. Charges`, + T2 = (m) => `+${m.amount} Tinta máxima`, + C2 = (m, a = {}) => ((a.locale ?? Ne()) === "en" ? w2(m) : T2(m)), + S2 = () => "Increase your maximum paint charges capacity", + P2 = () => "Aumente sua capacidade máxima de tinta", + I2 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? S2() : P2()), + M2 = () => "Profile picture", + k2 = () => "Imagem de perfil", + A2 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? M2() : k2()), + E2 = () => "Add a new 16x16 profile picture", + z2 = () => "Adicionar uma nova imagem de perfil 16x16", + L2 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? E2() : z2()), + D2 = () => "Not enough droplets", + R2 = () => "Droplets insuficientes", + gp = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? D2() : R2()), + B2 = () => "Show profile", + F2 = () => "Exibir perfil", + O2 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? B2() : F2()), + N2 = () => "Menu", + j2 = () => "Menu", + V2 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? N2() : j2()), + q2 = (m) => `Could not install the app: ${m.error}`, + Z2 = (m) => `Não pode instalar o app: ${m.error}`, + U2 = (m, a = {}) => ((a.locale ?? Ne()) === "en" ? q2(m) : Z2(m)), + $2 = () => "Install App", + G2 = () => "Instalar App", + H2 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? $2() : G2()), + W2 = () => "Livestreams", + X2 = () => "Livestreams", + Y2 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? W2() : X2()), + K2 = () => "Log Out", + J2 = () => "Log Out", + Q2 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? K2() : J2()), + ew = () => "Hide UI", + tw = () => "Esconder UI", + rw = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? ew() : tw()), + nw = () => "Change picture:", + iw = () => "Change picture:", + aw = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? nw() : iw()), + ow = () => "Show last painted pixel on alliance", + sw = () => "Mostrar último pixel pintado na aliança", + lw = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? ow() : sw()), + cw = () => "Delete Account", + uw = () => "Deletar Conta", + Yf = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? cw() : uw()), + hw = () => "Are you absolutely sure?", + dw = () => "Você tem certeza absoluta?", + pw = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? hw() : dw()), + fw = () => + "This will permanently delete your account and all associated data. This action cannot be undone.", + mw = () => + "Isso excluirá permanentemente sua conta e todos os dados associados. Esta ação não pode ser desfeita.", + _w = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? fw() : mw()), + gw = () => "Profile", + vw = () => "Perfil", + yw = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? gw() : vw()), + xw = () => + "Display your country’s flag next to your username. Plus, when painting in regions where you own the corresponding flag, you recover 10% of the charges spent.", + bw = () => + "Exiba a bandeira do seu país ao lado do seu nome de usuário. Além disso, ao pintar em regiões onde você possui a bandeira correspondente, você recupera 10% das tintas gastas.", + ww = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? xw() : bw()), + Tw = () => "Does not need to be equipped to provide the bonus", + Cw = () => "Não precisa estar equipada para obter o bônus", + Sw = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? Tw() : Cw()), + Pw = () => "Equipped", + Iw = () => "Equipado", + Mw = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? Pw() : Iw()), + kw = () => "Equip", + Aw = () => "Equipar", + Ew = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? kw() : Aw()), + zw = () => "Country", + Lw = () => "País", + Uv = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? zw() : Lw()), + Dw = () => "No country found.", + Rw = () => "País não encontrado.", + Bw = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? Dw() : Rw()), + Fw = () => "Welcome to", + Ow = () => "Bem vindo ao", + Nw = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? Fw() : Ow()), + jw = () => "Rules", + Vw = () => "Regras", + qw = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? jw() : Vw()), + Zw = () => "Important", + Uw = () => "Importante", + $w = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? Zw() : Uw()), + Gw = () => + "🚫 No inappropriate content (+18, hate speech, inappropriate links, highly suggestive material, ...)", + Hw = () => + "🚫 Conteúdo inapropriado não permitido (+18, discurso de ódio, links inapropriados, conteúdo altamente sugestivo, ...)", + Ww = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? Gw() : Hw()), + Xw = () => + "😈 Do not paint over other artworks using random colors or patterns just to mess things up", + Yw = () => + "😈 Não desenhe por cima de outras artes usando cores ou padrões aleatórios só para bagunçar", + Kw = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? Xw() : Yw()), + Jw = () => "🧑‍🤝‍🧑 Do not paint with more than one account", + Qw = () => "🧑‍🤝‍🧑 Não desenhe com mais de uma conta", + e5 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? Jw() : Qw()), + t5 = () => "🤖 Use of bots is not allowed", + r5 = () => "🤖 Usar bots não é permitido", + n5 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? t5() : r5()), + i5 = () => "🙅 Disclosing other's personal information is not allowed", + a5 = () => "🙅 Divulgar informações pessoais dos outros não é permitido", + o5 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? i5() : a5()), + s5 = () => + "✅ Painting over other artworks to complement them or create a new drawing is allowed", + l5 = () => + "✅ Desenhar sobre outras artes para complementar ou criar novas artes é permitido", + c5 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? s5() : l5()), + u5 = () => + "✅ Griefing political party flags or portraits of politicians is allowed", + h5 = () => + "✅ Desenhar sobre bandeiras de partidos e retratos de políticos é permitido", + d5 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? u5() : h5()), + p5 = () => + "Violations of these rules may lead to suspension of your account or removal of drawings.", + f5 = () => + "A violação destas regras pode levar à suspensão da conta ou à remoção de desenhos.", + m5 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? p5() : f5()), + _5 = () => "Understood", + g5 = () => "Entendido", + v5 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? _5() : g5()), + y5 = () => "Toggle art opacity", + x5 = () => "Alterar opacidade", + $v = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? y5() : x5()), + b5 = () => "Paint", + w5 = () => "Pintar", + Gv = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? b5() : w5()), + T5 = () => "Select a color", + C5 = () => "Selecione uma color", + S5 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? T5() : C5()), + P5 = () => "Select a pixel to erase", + I5 = () => "Selecione um pixel para apagar", + M5 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? P5() : I5()), + k5 = () => "Pick a color from the map", + A5 = () => "Escolha uma cor do mapa", + E5 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? k5() : A5()), + z5 = () => "Click", + L5 = () => "Clique", + D5 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? z5() : L5()), + R5 = () => "SPACE", + B5 = () => "ESPAÇO", + F5 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? R5() : B5()), + O5 = () => "or hold", + N5 = () => "ou segure", + j5 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? O5() : N5()), + V5 = () => "to paint,", + q5 = () => "para pintar", + Z5 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? V5() : q5()), + U5 = () => "You can paint more than 1 pixel", + $5 = () => "Você pode pintar mais de 1 pixel", + G5 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? U5() : $5()), + H5 = () => "Paint pixel", + W5 = () => "Pintar pixel", + X5 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? H5() : W5()), + Y5 = () => "Color Picker", + K5 = () => "Conta Gotas", + J5 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? Y5() : K5()), + Q5 = () => "+2 max. charge/level", + e3 = () => "+2 tinta máxima/level", + t3 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? Q5() : e3()), + r3 = () => "Name", + n3 = () => "Nome", + Kf = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? r3() : n3()), + i3 = () => "Discord Username", + a3 = () => "Usuário do Discord", + o3 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? i3() : a3()), + s3 = () => "Max. Charges", + l3 = () => "Tinta máxima", + Kg = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? s3() : l3()), + c3 = () => "Paint Charges", + u3 = () => "Tintas", + h3 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? c3() : u3()), + d3 = (m) => `+${m.amount} Paint Charges`, + p3 = (m) => `+${m.amount} Tintas`, + f3 = (m, a = {}) => ((a.locale ?? Ne()) === "en" ? d3(m) : p3(m)), + m3 = () => "Leave alliance", + _3 = () => "Sair da aliança", + g3 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? m3() : _3()), + v3 = () => "Headquarters", + y3 = () => "Quartel General", + x3 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? v3() : y3()), + b3 = () => "Not set", + w3 = () => "Não configurado", + T3 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? b3() : w3()), + C3 = () => "You are not in an alliance", + S3 = () => "Você não está em uma aliança", + P3 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? C3() : S3()), + I3 = () => "Get invited to an alliance", + M3 = () => "Seja convidado para uma aliança", + k3 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? I3() : M3()), + A3 = () => "OR", + E3 = () => "OU", + z3 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? A3() : E3()), + L3 = () => "Create an alliance", + D3 = () => "Crie uma aliança", + R3 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? L3() : D3()), + B3 = () => "Invite link", + F3 = () => "Link de convite", + O3 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? B3() : F3()), + N3 = () => + "Send the link below to everybody you want to invite to the alliance", + j3 = () => + "Envie o link abaixo para quem você deseja convidar para a aliança", + V3 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? N3() : j3()), + q3 = () => "Copied", + Z3 = () => "Copiado", + Fm = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? q3() : Z3()), + U3 = () => "No description", + $3 = () => "Sem descrição", + Hv = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? U3() : $3()), + G3 = () => "Invite", + H3 = () => "Convite", + W3 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? G3() : H3()), + X3 = () => "No pixels painted", + Y3 = () => "Nenhum pixel pintado", + Om = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? X3() : Y3()), + K3 = () => "Today", + J3 = () => "Hoje", + vp = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? K3() : J3()), + Q3 = () => "Week", + eT = () => "Semana", + tT = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? Q3() : eT()), + rT = () => "Month", + nT = () => "Mês", + iT = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? rT() : nT()), + aT = () => "All time", + oT = () => "Geral", + sT = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? aT() : oT()), + lT = () => "this week", + cT = () => "nesta semana", + Nm = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? lT() : cT()), + uT = () => "this month", + hT = () => "neste mês", + jm = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? uT() : hT()), + dT = () => "Create alliance", + pT = () => "Criar aliança", + fT = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? dT() : pT()), + mT = () => "Alliance Name", + _T = () => "Nome da aliança", + gT = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? mT() : _T()), + vT = () => "Create", + yT = () => "Criar", + xT = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? vT() : yT()), + bT = () => "Give admin", + wT = () => "Tornar admin", + TT = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? bT() : wT()), + CT = () => "Ban from alliance", + ST = () => "Banir da aliança", + Wv = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? CT() : ST()), + PT = () => "No action", + IT = () => "Sem opção", + MT = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? PT() : IT()), + kT = () => "Unban", + AT = () => "Desbanir", + ET = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? kT() : AT()), + zT = () => "No banned users", + LT = () => "Sem usuários banidos", + DT = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? zT() : LT()), + RT = () => "Update", + BT = () => "Atualizar", + FT = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? RT() : BT()), + OT = () => "Error giving admin to user", + NT = () => "Erro ao tornar usuário admin", + jT = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? OT() : NT()), + VT = () => "Users", + qT = () => "Usuários", + ZT = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? VT() : qT()), + UT = () => "Banned", + $T = () => "Banido", + Xv = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? UT() : $T()), + GT = () => "Regions", + HT = () => "Regiões", + WT = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? GT() : HT()), + XT = () => "Countries", + YT = () => "Países", + KT = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? XT() : YT()), + JT = () => "Players", + QT = () => "Jogadores", + Yv = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? JT() : QT()), + eC = () => "Alliances", + tC = () => "Alianças", + Kv = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? eC() : tC()), + rC = () => "Region", + nC = () => "Região", + iC = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? rC() : nC()), + aC = () => "Pixels", + oC = () => "Pixels", + vc = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? aC() : oC()), + sC = () => "Painted", + lC = () => "Pintados", + yc = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? sC() : lC()), + cC = () => "Pixels painted inside the region", + uC = () => "Pixels pintados dentro da região", + hC = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? cC() : uC()), + dC = () => "Not painted", + pC = () => "Não pintado", + fC = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? dC() : pC()), + mC = () => "Painted by", + _C = () => "Pintado por", + gC = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? mC() : _C()), + vC = () => "Limit reached", + yC = () => "Limite atingido", + xC = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? vC() : yC()), + bC = () => "Favorite", + wC = () => "Favoritar", + TC = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? bC() : wC()), + CC = () => "Share", + SC = () => "Compartilhar", + PC = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? CC() : SC()), + IC = () => "Share place", + MC = () => "Compartilhar local", + kC = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? IC() : MC()), + AC = () => "Mute", + EC = () => "Mutar", + zC = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? AC() : EC()), + LC = () => "Unmute", + DC = () => "Desmutar", + RC = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? LC() : DC()), + BC = () => "Select the headquarters location", + FC = () => "Selecione a localização do quartel general", + OC = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? BC() : FC()), + NC = () => "Pixels painted inside the country", + jC = () => "Pixels pintados dentro do país", + VC = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? NC() : jC()), + qC = () => "Username copied to clipboard", + ZC = () => "Usuário copiado", + UC = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? qC() : ZC()), + $C = () => "No more charges", + GC = () => "Acabou a tinta", + HC = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? $C() : GC()), + WC = () => + "You are not allowed to use multiple accounts. Use your main account to paint.", + XC = () => + "Não é permitido usar várias contas. Use sua conta principal para pintar.", + YC = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? WC() : XC()), + KC = () => "SMS sent to", + JC = () => "SMS enviado para", + QC = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? KC() : JC()), + eS = () => "Phone successfully verified", + tS = () => "Telefone verificado com sucesso", + rS = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? eS() : tS()), + nS = () => "Not a valid phone number", + iS = () => "Não é um número válido", + aS = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? nS() : iS()), + oS = () => "Location unfavorited", + sS = () => "Localização desfavoritada", + lS = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? oS() : sS()), + cS = () => "Location favorited", + uS = () => "Localização favoritada", + hS = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? cS() : uS()), + dS = () => "Giving admin to user", + pS = () => "Tornar usuário um admin", + fS = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? dS() : pS()), + mS = () => "Profile updated", + _S = () => "Perfil atualizado", + gS = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? mS() : _S()), + vS = () => "Successfully linked your Discord account.", + yS = () => "A sua conta Discord foi conectada com sucesso.", + xS = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? vS() : yS()), + bS = () => "Discord unlinked", + wS = () => "Discord desconectado", + TS = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? bS() : wS()), + CS = () => "Link your Discord", + SS = () => "Conectar Discord", + PS = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? CS() : SS()), + IS = (m) => `Unlink Discord (${m.username})`, + MS = (m) => `Desconectar Discord (${m.username})`, + kS = (m, a = {}) => ((a.locale ?? Ne()) === "en" ? IS(m) : MS(m)), + AS = () => "Account successfully deleted", + ES = () => "Conta deletada com sucesso", + zS = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? AS() : ES()), + LS = () => "Logged out", + DS = () => "Logout feito", + RS = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? LS() : DS()), + BS = () => "Could not logout. Try refreshing the page.", + FS = () => "Não foi possível sair da conta. Tente recarregar a página.", + OS = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? BS() : FS()), + NS = () => "You need to zoom in to select a pixel", + jS = () => "Dê zoom para selecionar um pixel", + VS = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? NS() : jS()), + qS = () => "Phone verification", + ZS = () => "Verificação de telefone", + US = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? qS() : ZS()), + $S = () => + "Please verify your phone number to continue playing. This helps us keep bots out and ensure a safe, creative experience for everyone.", + GS = () => + "Por favor, verifique com seu telefone para continuar jogando. Isso nos ajuda a filtrar bots e manter um experiência segura e criativa para todos.", + HS = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? $S() : GS()), + WS = () => "Send Code", + XS = () => "Enviar o código", + YS = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? WS() : XS()), + KS = () => "Input the code", + JS = () => "Insira o código", + QS = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? KS() : JS()), + eP = () => "Sent to", + tP = () => "Enviar para", + rP = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? eP() : tP()), + nP = () => "Resend Code", + iP = () => "Reenviar Código", + aP = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? nP() : iP()), + oP = () => "Try another number", + sP = () => "Tentar outro número", + lP = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? oP() : sP()), + cP = () => "Edit profile", + uP = () => "Editar perfil", + hP = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? cP() : uP()), + dP = () => "Image", + pP = () => "Imagem", + fP = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? dP() : pP()), + mP = () => "Download", + _P = () => "Download", + gP = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? mP() : _P()), + vP = () => "Image copied to clipboard", + yP = () => "Imagem copiada para a área de transferência", + xP = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? vP() : yP()), + bP = () => "My map is lagging", + wP = () => "Meu mapa está travando", + TP = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? bP() : wP()), + CP = () => "Verify if", + SP = () => "Verifique se", + PP = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? CP() : SP()), + IP = () => "Use hardware acceleration when available", + MP = () => "Usar aceleração gráfica quando disponível", + kP = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? IP() : MP()), + AP = () => "is enabled on", + EP = () => "está habilitado em", + zP = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? AP() : EP()), + LP = () => "Follow the instructions to enable hardware acceleration", + DP = () => "Siga a instrução para habilitar a aceleração de hardware", + RP = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? LP() : DP()), + BP = () => "Moderation", + FP = () => "Moderação", + OP = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? BP() : FP()), + NP = () => "Terms", + jP = () => "Termos", + VP = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? NP() : jP()), + qP = () => "Privacy", + ZP = () => "Privacidade", + UP = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? qP() : ZP()), + $P = () => "Refund", + GP = () => "Reembolso", + Jv = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? $P() : GP()), + HP = () => "Clear area", + WP = () => "Limpar área", + XP = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? HP() : WP()), + YP = () => "Select the area's first corner", + KP = () => "Selecione o primeiro canto da área", + Qv = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? YP() : KP()), + JP = () => "Select the area's opposite corner", + QP = () => "Selecione o canto oposto da área", + e0 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? JP() : QP()), + eI = () => "Admin", + tI = () => "Administração", + rI = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? eI() : tI()), + nI = (m) => `Reason: ${m.reason}`, + iI = (m) => `Motivo: ${m.reason}`, + aI = (m, a = {}) => ((a.locale ?? Ne()) === "en" ? nI(m) : iI(m)), + oI = () => "No corresponding region on the map (cosmetic effect only)", + sI = () => "Não possui região no mapa (apenas efeito cosmético)", + lI = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? oI() : sI()), + cI = () => "Flag without region on the map", + uI = () => "Bandeira sem região no mapa", + hI = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? cI() : uI()), + dI = (m) => + `The flag of ${m.country} does not have corresponding areas on the map and will only have cosmetic effects.`, + pI = (m) => + `A bandeira ${m.country} não possui regiões correspondente no mapa e só terá efeito cosmético.`, + fI = (m, a = {}) => ((a.locale ?? Ne()) === "en" ? dI(m) : pI(m)), + mI = () => "Dark mode", + _I = () => "Modo escuro", + gI = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? mI() : _I()), + vI = () => "Light mode", + yI = () => "Modo claro", + xI = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? vI() : yI()), + bI = () => "Log out from all devices", + wI = () => "Sair de todos os dispositivos", + TI = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? bI() : wI()), + CI = () => "Log out from all devices", + SI = () => "Sair de todos os dispositivos", + PI = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? CI() : SI()), + II = () => "This action will log your account out from all devices.", + MI = () => "Essa ação ira desconectar sua conta de todos os dispositivos.", + kI = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? II() : MI()), + AI = () => "Sessions successfully revoked", + EI = () => "Sessões encerradas com sucesso", + zI = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? AI() : EI()), + LI = () => "Error revoking sessions. Try again later.", + DI = () => "Erro ao encerrar sessões. Tente novamente mais tarde.", + RI = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? LI() : DI()), + BI = () => "More", + FI = () => "Mais", + OI = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? BI() : FI()), + NI = () => "This action is irreversible, do you want to proceed?", + jI = () => "Esta ação é irreversível,você quer prosseguir?", + VI = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? NI() : jI()), + qI = () => "Please confirm by entering your username:", + ZI = () => "Por favor, confirme digitando seu nome de usuário:", + UI = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? qI() : ZI()), + $I = () => "Type your username", + GI = () => "Digite seu nome de usuário", + HI = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? $I() : GI()), + WI = () => "This action may take some time to be completed.", + XI = () => "Essa ação pode levar algum tempo para ser realizada.", + YI = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? WI() : XI()), + KI = () => "Ban appeal", + JI = () => "Revisão de banimento", + QI = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? KI() : JI()), + e4 = () => "Suggestions", + t4 = () => "Sugestões", + r4 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? e4() : t4()), + n4 = () => "Bug report", + i4 = () => "Reportar bug", + a4 = (m = {}, a = {}) => ((a.locale ?? Ne()) === "en" ? n4() : i4()), + $o = (2 * Math.PI * 6378137) / 2; +class fl { + constructor(a = 256) { + xr(this, "initialResolution"); + (this.tileSize = a), (this.initialResolution = (2 * $o) / this.tileSize); + } + latLonToMeters(a, p) { + const y = (p / 180) * $o, + M = + ((Math.log(Math.tan(((90 + a) * Math.PI) / 360)) / (Math.PI / 180)) * + $o) / + 180; + return [y, M]; + } + metersToLatLon(a, p) { + const y = (a / $o) * 180; + let M = (p / $o) * 180; + return ( + (M = + (180 / Math.PI) * + (2 * Math.atan(Math.exp((M * Math.PI) / 180)) - Math.PI / 2)), + [M, y] + ); + } + pixelsToMeters(a, p, y) { + const M = this.resolution(y), + z = a * M - $o, + T = $o - p * M; + return [z, T]; + } + pixelsToLatLon(a, p, y) { + const [M, z] = this.pixelsToMeters(a, p, y); + return this.metersToLatLon(M, z); + } + latLonToPixels(a, p, y) { + const [M, z] = this.latLonToMeters(a, p); + return this.metersToPixels(M, z, y); + } + latLonToPixelsFloor(a, p, y) { + const [M, z] = this.latLonToPixels(a, p, y); + return [Math.floor(M), Math.floor(z)]; + } + metersToPixels(a, p, y) { + const M = this.resolution(y), + z = (a + $o) / M, + T = ($o - p) / M; + return [z, T]; + } + latLonToTile(a, p, y) { + const [M, z] = this.latLonToMeters(a, p); + return this.metersToTile(M, z, y); + } + metersToTile(a, p, y) { + const [M, z] = this.metersToPixels(a, p, y); + return this.pixelsToTile(M, z); + } + pixelsToTile(a, p) { + const y = Math.ceil(a / this.tileSize) - 1, + M = Math.ceil(p / this.tileSize) - 1; + return [y, M]; + } + pixelsToTileLocal(a, p) { + return { + tile: this.pixelsToTile(a, p), + pixel: [Math.floor(a) % this.tileSize, Math.floor(p) % this.tileSize], + }; + } + tileBounds(a, p, y) { + const [M, z] = this.pixelsToMeters(a * this.tileSize, p * this.tileSize, y), + [T, s] = this.pixelsToMeters( + (a + 1) * this.tileSize, + (p + 1) * this.tileSize, + y + ); + return { min: [M, z], max: [T, s] }; + } + tileBoundsLatLon(a, p, y) { + const M = this.tileBounds(a, p, y); + return { + min: this.metersToLatLon(M.min[0], M.min[1]), + max: this.metersToLatLon(M.max[0], M.max[1]), + }; + } + resolution(a) { + return this.initialResolution / 2 ** a; + } + latLonToTileAndPixel(a, p, y) { + const [M, z] = this.latLonToMeters(a, p), + [T, s] = this.metersToTile(M, z, y), + [B, O] = this.metersToPixels(M, z, y); + return { + tile: [T, s], + pixel: [Math.floor(B) % this.tileSize, Math.floor(O) % this.tileSize], + }; + } + pixelBounds(a, p, y) { + return { + min: this.pixelsToMeters(a, p, y), + max: this.pixelsToMeters(a + 1, p + 1, y), + }; + } + pixelToBoundsLatLon(a, p, y) { + const M = this.pixelBounds(a, p, y), + z = 0.001885, + T = (M.max[0] - M.min[0]) * z, + s = (M.max[1] - M.min[1]) * z; + return ( + (M.min[0] -= T), + (M.max[0] -= T), + (M.min[1] -= s), + (M.max[1] -= s), + { + min: this.metersToLatLon(M.min[0], M.min[1]), + max: this.metersToLatLon(M.max[0], M.max[1]), + } + ); + } + latLonToTileBoundsLatLon(a, p, y) { + const [M, z] = this.latLonToMeters(a, p), + [T, s] = this.metersToTile(M, z, y); + return this.tileBoundsLatLon(T, s, y); + } + latLonToPixelBoundsLatLon(a, p, y) { + const [M, z] = this.latLonToMeters(a, p), + [T, s] = this.metersToPixels(M, z, y); + return this.pixelToBoundsLatLon(Math.floor(T), Math.floor(s), y); + } + latLonToRegionAndPixel(a, p, y, M = Wi.regionSize) { + const [z, T] = this.latLonToPixelsFloor(a, p, y), + s = this.tileSize * M; + return { + region: [Math.floor(z / s), Math.floor(T / s)], + pixel: [z % s, T % s], + }; + } +} +function Vm(m, a = !0) { + const { min: p, max: y } = m; + return a + ? [ + [p[1], y[0]], + [y[1], y[0]], + [y[1], p[0]], + [p[1], p[0]], + ] + : [ + [p[0], y[1]], + [y[0], y[1]], + [y[0], p[1]], + [p[0], p[1]], + ]; +} +function qm(m) { + return [(m.min[0] + m.max[0]) / 2, (m.min[1] + m.max[1]) / 2]; +} +const o4 = + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAAAAACoWZBhAAAAAXNSR0IArs4c6QAAACpJREFUeNpj+AsEZ86ASIa/DAwMZ84ACRDzDBigMs/AARITq1oUwxBWAADaREUdDMswKwAAAABJRU5ErkJggg==", + Jg = + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAAXNSR0IArs4c6QAAACVJREFUeNpj+A8FDEAAZwMRBAIBmIYLIgHcgkQDIs3E6SRsjgcABYFLtfTgakEAAAAASUVORK5CYII="; +function s4(m) { + return Math.floor(Math.random() * m); +} +const Jf = 14.5; +async function l4() { + const m = h4(); + if (m) return m; + try { + if ( + (await navigator.permissions.query({ name: "geolocation" })).state === + "granted" + ) { + const p = await new Promise((y, M) => + navigator.geolocation.getCurrentPosition( + (z) => y(z), + (z) => M(z) + ) + ); + return { lat: p.coords.latitude, lng: p.coords.longitude, zoom: Jf }; + } + } catch (a) { + console.error(a); + } + return { ...c4().pos, zoom: Jf }; +} +function c4() { + const m = Object.entries(u4), + a = s4(m.length), + [p, y] = m[a]; + return { city: p, pos: y }; +} +const u4 = { + tokyo: { lat: 35.677545560719665, lng: 139.76394445809638 }, + paris: { lat: 48.8537151734952, lng: 2.3484026030630787 }, + newYork: { lat: 40.71283173786517, lng: -74.00599771376795 }, + saoPaulo: { lat: -23.550584064565356, lng: -46.63339720713918 }, + sydney: { lat: -33.86943325619071, lng: 151.2083447239608 }, + }, + t0 = "location"; +function Co(m, a) { + localStorage.setItem(t0, JSON.stringify({ ...m, zoom: a })); +} +function h4() { + const m = localStorage.getItem(t0); + if (!m) return; + const a = JSON.parse(m); + return a.zoom ?? (a.zoom = Jf), a; +} +var Hu, Wu; +class d4 { + constructor() { + Ar(this, Hu, st(-1)); + Ar(this, Wu, st([])); + } + get idx() { + return x(ot(this, Hu)); + } + set idx(a) { + se(ot(this, Hu), a, !0); + } + get entries() { + return x(ot(this, Wu)); + } + set entries(a) { + se(ot(this, Wu), a); + } + hasNext() { + return this.idx < this.entries.length - 1; + } + goToNext(a) { + const p = this.idx + 1, + y = this.entries[p]; + y && ((this.idx = p), a.flyTo({ center: y.pos, zoom: y.zoom })); + } + hasPrev() { + return this.idx > 0; + } + goToPrev(a) { + const p = this.idx - 1, + y = this.entries[p]; + y && ((this.idx = p), a.flyTo({ center: y.pos, zoom: y.zoom })); + } + isEmpty() { + return this.entries.length === 0; + } + push(a) { + (this.idx = this.idx + 1), + (this.entries = [...this.entries.slice(0, this.idx), a]); + } +} +(Hu = new WeakMap()), (Wu = new WeakMap()); +const hl = new d4(); +function Zm(m) { + return m && m.__esModule && Object.prototype.hasOwnProperty.call(m, "default") + ? m.default + : m; +} +var Xd = { exports: {} }; +/** + * MapLibre GL JS + * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.6.2/LICENSE.txt + */ var p4 = Xd.exports, + Qg; +function f4() { + return ( + Qg || + ((Qg = 1), + (function (m, a) { + (function (p, y) { + m.exports = y(); + })(p4, function () { + var p = {}, + y = {}; + function M(T, s, B) { + if (((y[T] = B), T === "index")) { + var O = + "var sharedModule = {}; (" + + y.shared + + ")(sharedModule); (" + + y.worker + + ")(sharedModule);", + X = {}; + return ( + y.shared(X), + y.index(p, X), + typeof window < "u" && + p.setWorkerUrl( + window.URL.createObjectURL( + new Blob([O], { type: "text/javascript" }) + ) + ), + p + ); + } + } + M("shared", ["exports"], function (T) { + function s(n, t, r, o) { + return new (r || (r = Promise))(function (c, f) { + function _(S) { + try { + b(o.next(S)); + } catch (I) { + f(I); + } + } + function v(S) { + try { + b(o.throw(S)); + } catch (I) { + f(I); + } + } + function b(S) { + var I; + S.done + ? c(S.value) + : ((I = S.value), + I instanceof r + ? I + : new r(function (L) { + L(I); + })).then(_, v); + } + b((o = o.apply(n, t || [])).next()); + }); + } + function B(n, t) { + (this.x = n), (this.y = t); + } + function O(n) { + return n && + n.__esModule && + Object.prototype.hasOwnProperty.call(n, "default") + ? n.default + : n; + } + var X, K; + typeof SuppressedError == "function" && SuppressedError, + (B.prototype = { + clone() { + return new B(this.x, this.y); + }, + add(n) { + return this.clone()._add(n); + }, + sub(n) { + return this.clone()._sub(n); + }, + multByPoint(n) { + return this.clone()._multByPoint(n); + }, + divByPoint(n) { + return this.clone()._divByPoint(n); + }, + mult(n) { + return this.clone()._mult(n); + }, + div(n) { + return this.clone()._div(n); + }, + rotate(n) { + return this.clone()._rotate(n); + }, + rotateAround(n, t) { + return this.clone()._rotateAround(n, t); + }, + matMult(n) { + return this.clone()._matMult(n); + }, + 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(n) { + return this.x === n.x && this.y === n.y; + }, + dist(n) { + return Math.sqrt(this.distSqr(n)); + }, + distSqr(n) { + const t = n.x - this.x, + r = n.y - this.y; + return t * t + r * r; + }, + angle() { + return Math.atan2(this.y, this.x); + }, + angleTo(n) { + return Math.atan2(this.y - n.y, this.x - n.x); + }, + angleWith(n) { + return this.angleWithSep(n.x, n.y); + }, + angleWithSep(n, t) { + return Math.atan2( + this.x * t - this.y * n, + this.x * n + this.y * t + ); + }, + _matMult(n) { + const t = n[2] * this.x + n[3] * this.y; + return ( + (this.x = n[0] * this.x + n[1] * this.y), (this.y = t), this + ); + }, + _add(n) { + return (this.x += n.x), (this.y += n.y), this; + }, + _sub(n) { + return (this.x -= n.x), (this.y -= n.y), this; + }, + _mult(n) { + return (this.x *= n), (this.y *= n), this; + }, + _div(n) { + return (this.x /= n), (this.y /= n), this; + }, + _multByPoint(n) { + return (this.x *= n.x), (this.y *= n.y), this; + }, + _divByPoint(n) { + return (this.x /= n.x), (this.y /= n.y), this; + }, + _unit() { + return this._div(this.mag()), this; + }, + _perp() { + const n = this.y; + return (this.y = this.x), (this.x = -n), this; + }, + _rotate(n) { + const t = Math.cos(n), + r = Math.sin(n), + o = r * this.x + t * this.y; + return (this.x = t * this.x - r * this.y), (this.y = o), this; + }, + _rotateAround(n, t) { + const r = Math.cos(n), + o = Math.sin(n), + c = t.y + o * (this.x - t.x) + r * (this.y - t.y); + return ( + (this.x = t.x + r * (this.x - t.x) - o * (this.y - t.y)), + (this.y = c), + this + ); + }, + _round() { + return ( + (this.x = Math.round(this.x)), + (this.y = Math.round(this.y)), + this + ); + }, + constructor: B, + }), + (B.convert = function (n) { + if (n instanceof B) return n; + if (Array.isArray(n)) return new B(+n[0], +n[1]); + if (n.x !== void 0 && n.y !== void 0) return new B(+n.x, +n.y); + throw new Error("Expected [x, y] or {x, y} point format"); + }); + var ne = (function () { + if (K) return X; + function n(t, r, o, c) { + (this.cx = 3 * t), + (this.bx = 3 * (o - t) - this.cx), + (this.ax = 1 - this.cx - this.bx), + (this.cy = 3 * r), + (this.by = 3 * (c - r) - this.cy), + (this.ay = 1 - this.cy - this.by), + (this.p1x = t), + (this.p1y = r), + (this.p2x = o), + (this.p2y = c); + } + return ( + (K = 1), + (X = n), + (n.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, r) { + if ((r === void 0 && (r = 1e-6), t < 0)) return 0; + if (t > 1) return 1; + for (var o = t, c = 0; c < 8; c++) { + var f = this.sampleCurveX(o) - t; + if (Math.abs(f) < r) return o; + var _ = this.sampleCurveDerivativeX(o); + if (Math.abs(_) < 1e-6) break; + o -= f / _; + } + var v = 0, + b = 1; + for ( + o = t, c = 0; + c < 20 && + ((f = this.sampleCurveX(o)), !(Math.abs(f - t) < r)); + c++ + ) + t > f ? (v = o) : (b = o), (o = 0.5 * (b - v) + v); + return o; + }, + solve: function (t, r) { + return this.sampleCurveY(this.solveCurveX(t, r)); + }, + }), + X + ); + })(), + H = O(ne); + let fe, ge; + function Ie() { + return ( + fe == null && + (fe = + typeof OffscreenCanvas < "u" && + new OffscreenCanvas(1, 1).getContext("2d") && + typeof createImageBitmap == "function"), + fe + ); + } + function Ae() { + if (ge == null && ((ge = !1), Ie())) { + const t = new OffscreenCanvas(5, 5).getContext("2d", { + willReadFrequently: !0, + }); + if (t) { + for (let o = 0; o < 25; o++) { + const c = 4 * o; + (t.fillStyle = `rgb(${c},${c + 1},${c + 2})`), + t.fillRect(o % 5, Math.floor(o / 5), 1, 1); + } + const r = t.getImageData(0, 0, 5, 5).data; + for (let o = 0; o < 100; o++) + if (o % 4 != 3 && r[o] !== o) { + ge = !0; + break; + } + } + } + return ge || !1; + } + var De = 1e-6, + Ee = typeof Float32Array < "u" ? Float32Array : Array; + function Fe() { + var n = new Ee(9); + return ( + Ee != Float32Array && + ((n[1] = 0), + (n[2] = 0), + (n[3] = 0), + (n[5] = 0), + (n[6] = 0), + (n[7] = 0)), + (n[0] = 1), + (n[4] = 1), + (n[8] = 1), + n + ); + } + function $e(n) { + return ( + (n[0] = 1), + (n[1] = 0), + (n[2] = 0), + (n[3] = 0), + (n[4] = 0), + (n[5] = 1), + (n[6] = 0), + (n[7] = 0), + (n[8] = 0), + (n[9] = 0), + (n[10] = 1), + (n[11] = 0), + (n[12] = 0), + (n[13] = 0), + (n[14] = 0), + (n[15] = 1), + n + ); + } + function Je() { + var n = new Ee(3); + return ( + Ee != Float32Array && ((n[0] = 0), (n[1] = 0), (n[2] = 0)), n + ); + } + function qe(n) { + return Math.hypot(n[0], n[1], n[2]); + } + function Ze(n, t, r) { + var o = new Ee(3); + return (o[0] = n), (o[1] = t), (o[2] = r), o; + } + function Qe(n, t, r) { + return ( + (n[0] = t[0] + r[0]), + (n[1] = t[1] + r[1]), + (n[2] = t[2] + r[2]), + n + ); + } + function Le(n, t, r) { + return (n[0] = t[0] * r), (n[1] = t[1] * r), (n[2] = t[2] * r), n; + } + function et(n, t, r) { + var o = t[0], + c = t[1], + f = t[2], + _ = r[0], + v = r[1], + b = r[2]; + return ( + (n[0] = c * b - f * v), + (n[1] = f * _ - o * b), + (n[2] = o * v - c * _), + n + ); + } + Math.hypot || + (Math.hypot = function () { + for (var n = 0, t = arguments.length; t--; ) + n += arguments[t] * arguments[t]; + return Math.sqrt(n); + }); + var nt, + Ue = qe; + function ke(n, t, r) { + var o = t[0], + c = t[1], + f = t[2], + _ = t[3]; + return ( + (n[0] = r[0] * o + r[4] * c + r[8] * f + r[12] * _), + (n[1] = r[1] * o + r[5] * c + r[9] * f + r[13] * _), + (n[2] = r[2] * o + r[6] * c + r[10] * f + r[14] * _), + (n[3] = r[3] * o + r[7] * c + r[11] * f + r[15] * _), + n + ); + } + function vt() { + var n = new Ee(4); + return ( + Ee != Float32Array && ((n[0] = 0), (n[1] = 0), (n[2] = 0)), + (n[3] = 1), + n + ); + } + function ee(n, t, r, o) { + var c = (0.5 * Math.PI) / 180; + (t *= c), (r *= c), (o *= c); + var f = Math.sin(t), + _ = Math.cos(t), + v = Math.sin(r), + b = Math.cos(r), + S = Math.sin(o), + I = Math.cos(o); + return ( + (n[0] = f * b * I - _ * v * S), + (n[1] = _ * v * I + f * b * S), + (n[2] = _ * b * S - f * v * I), + (n[3] = _ * b * I + f * v * S), + n + ); + } + function re() { + var n = new Ee(2); + return Ee != Float32Array && ((n[0] = 0), (n[1] = 0)), n; + } + function he(n, t) { + var r = new Ee(2); + return (r[0] = n), (r[1] = t), r; + } + Je(), + (nt = new Ee(4)), + Ee != Float32Array && + ((nt[0] = 0), (nt[1] = 0), (nt[2] = 0), (nt[3] = 0)), + Je(), + Ze(1, 0, 0), + Ze(0, 1, 0), + vt(), + vt(), + Fe(), + re(); + const oe = 8192; + function ze(n, t, r) { + return ( + t * (oe / (n.tileSize * Math.pow(2, r - n.tileID.overscaledZ))) + ); + } + function je(n, t) { + return ((n % t) + t) % t; + } + function pt(n, t, r) { + return n * (1 - r) + t * r; + } + function it(n) { + if (n <= 0) return 0; + if (n >= 1) return 1; + const t = n * n, + r = t * n; + return 4 * (n < 0.5 ? r : 3 * (n - t) + r - 0.75); + } + function ct(n, t, r, o) { + const c = new H(n, t, r, o); + return (f) => c.solve(f); + } + const It = ct(0.25, 0.1, 0.25, 1); + function Dt(n, t, r) { + return Math.min(r, Math.max(t, n)); + } + function at(n, t, r) { + const o = r - t, + c = ((((n - t) % o) + o) % o) + t; + return c === t ? r : c; + } + function dt(n, ...t) { + for (const r of t) for (const o in r) n[o] = r[o]; + return n; + } + let yt = 1; + function xt(n, t, r) { + const o = {}; + for (const c in n) o[c] = t.call(this, n[c], c, n); + return o; + } + function St(n, t, r) { + const o = {}; + for (const c in n) t.call(this, n[c], c, n) && (o[c] = n[c]); + return o; + } + function wt(n) { + return Array.isArray(n) + ? n.map(wt) + : typeof n == "object" && n + ? xt(n, wt) + : n; + } + const _t = {}; + function Lt(n) { + _t[n] || (typeof console < "u" && console.warn(n), (_t[n] = !0)); + } + function Rt(n, t, r) { + return (r.y - n.y) * (t.x - n.x) > (t.y - n.y) * (r.x - n.x); + } + function $t(n) { + return ( + typeof WorkerGlobalScope < "u" && + n !== void 0 && + n instanceof WorkerGlobalScope + ); + } + let tr = null; + function Qt(n) { + return typeof ImageBitmap < "u" && n instanceof ImageBitmap; + } + const Ot = + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="; + function Nt(n, t, r, o, c) { + return s(this, void 0, void 0, function* () { + if (typeof VideoFrame > "u") + throw new Error("VideoFrame not supported"); + const f = new VideoFrame(n, { timestamp: 0 }); + try { + const _ = f == null ? void 0 : f.format; + if (!_ || (!_.startsWith("BGR") && !_.startsWith("RGB"))) + throw new Error(`Unrecognized format ${_}`); + const v = _.startsWith("BGR"), + b = new Uint8ClampedArray(o * c * 4); + if ( + (yield f.copyTo( + b, + (function (S, I, L, F, q) { + const Z = 4 * Math.max(-I, 0), + W = (Math.max(0, L) - L) * F * 4 + Z, + J = 4 * F, + le = Math.max(0, I), + Re = Math.max(0, L); + return { + rect: { + x: le, + y: Re, + width: Math.min(S.width, I + F) - le, + height: Math.min(S.height, L + q) - Re, + }, + layout: [{ offset: W, stride: J }], + }; + })(n, t, r, o, c) + ), + v) + ) + for (let S = 0; S < b.length; S += 4) { + const I = b[S]; + (b[S] = b[S + 2]), (b[S + 2] = I); + } + return b; + } finally { + f.close(); + } + }); + } + let or, cr; + function Vr(n, t, r, o) { + return ( + n.addEventListener(t, r, o), + { + unsubscribe: () => { + n.removeEventListener(t, r, o); + }, + } + ); + } + function mr(n) { + return (n * Math.PI) / 180; + } + function hr(n) { + return (n / Math.PI) * 180; + } + const _r = { + touchstart: !0, + touchmove: !0, + touchmoveWindow: !0, + touchend: !0, + touchcancel: !0, + }, + Ir = { + dblclick: !0, + click: !0, + mouseover: !0, + mouseout: !0, + mousedown: !0, + mousemove: !0, + mousemoveWindow: !0, + mouseup: !0, + mouseupWindow: !0, + contextmenu: !0, + wheel: !0, + }, + qr = "AbortError"; + function ue() { + return new Error(qr); + } + const V = { + MAX_PARALLEL_IMAGE_REQUESTS: 16, + MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME: 8, + MAX_TILE_CACHE_ZOOM_LEVELS: 5, + REGISTERED_PROTOCOLS: {}, + WORKER_URL: "", + }; + function U(n) { + return V.REGISTERED_PROTOCOLS[n.substring(0, n.indexOf("://"))]; + } + const Y = "global-dispatcher"; + class ie extends Error { + constructor(t, r, o, c) { + super(`AJAXError: ${r} (${t}): ${o}`), + (this.status = t), + (this.statusText = r), + (this.url = o), + (this.body = c); + } + } + const pe = () => + $t(self) + ? self.worker && self.worker.referrer + : (window.location.protocol === "blob:" + ? window.parent + : window + ).location.href, + Se = function (n, t) { + if (/:\/\//.test(n.url) && !/^https?:|^file:/.test(n.url)) { + const o = U(n.url); + if (o) return o(n, t); + if ($t(self) && self.worker && self.worker.actor) + return self.worker.actor.sendAsync( + { type: "GR", data: n, targetMapId: Y }, + t + ); + } + if ( + !( + /^file:/.test((r = n.url)) || + (/^file:/.test(pe()) && !/^\w+:/.test(r)) + ) + ) { + if ( + fetch && + Request && + AbortController && + Object.prototype.hasOwnProperty.call( + Request.prototype, + "signal" + ) + ) + return (function (o, c) { + return s(this, void 0, void 0, function* () { + const f = new Request(o.url, { + method: o.method || "GET", + body: o.body, + credentials: o.credentials, + headers: o.headers, + cache: o.cache, + referrer: pe(), + signal: c.signal, + }); + let _, v; + o.type !== "json" || + f.headers.has("Accept") || + f.headers.set("Accept", "application/json"); + try { + _ = yield fetch(f); + } catch (S) { + throw new ie(0, S.message, o.url, new Blob()); + } + if (!_.ok) { + const S = yield _.blob(); + throw new ie(_.status, _.statusText, o.url, S); + } + v = + o.type === "arrayBuffer" || o.type === "image" + ? _.arrayBuffer() + : o.type === "json" + ? _.json() + : _.text(); + const b = yield v; + if (c.signal.aborted) throw ue(); + return { + data: b, + cacheControl: _.headers.get("Cache-Control"), + expires: _.headers.get("Expires"), + }; + }); + })(n, t); + if ($t(self) && self.worker && self.worker.actor) + return self.worker.actor.sendAsync( + { type: "GR", data: n, mustQueue: !0, targetMapId: Y }, + t + ); + } + var r; + return (function (o, c) { + return new Promise((f, _) => { + var v; + const b = new XMLHttpRequest(); + b.open(o.method || "GET", o.url, !0), + (o.type !== "arrayBuffer" && o.type !== "image") || + (b.responseType = "arraybuffer"); + for (const S in o.headers) + b.setRequestHeader(S, o.headers[S]); + o.type === "json" && + ((b.responseType = "text"), + (!((v = o.headers) === null || v === void 0) && + v.Accept) || + b.setRequestHeader("Accept", "application/json")), + (b.withCredentials = o.credentials === "include"), + (b.onerror = () => { + _(new Error(b.statusText)); + }), + (b.onload = () => { + if (!c.signal.aborted) + if ( + ((b.status >= 200 && b.status < 300) || + b.status === 0) && + b.response !== null + ) { + let S = b.response; + if (o.type === "json") + try { + S = JSON.parse(b.response); + } catch (I) { + return void _(I); + } + f({ + data: S, + cacheControl: + b.getResponseHeader("Cache-Control"), + expires: b.getResponseHeader("Expires"), + }); + } else { + const S = new Blob([b.response], { + type: b.getResponseHeader("Content-Type"), + }); + _(new ie(b.status, b.statusText, o.url, S)); + } + }), + c.signal.addEventListener("abort", () => { + b.abort(), _(ue()); + }), + b.send(o.body); + }); + })(n, t); + }; + function Me(n) { + if ( + !n || + n.indexOf("://") <= 0 || + n.indexOf("data:image/") === 0 || + n.indexOf("blob:") === 0 + ) + return !0; + const t = new URL(n), + r = window.location; + return t.protocol === r.protocol && t.host === r.host; + } + function we(n, t, r) { + (r[n] && r[n].indexOf(t) !== -1) || + ((r[n] = r[n] || []), r[n].push(t)); + } + function Ve(n, t, r) { + if (r && r[n]) { + const o = r[n].indexOf(t); + o !== -1 && r[n].splice(o, 1); + } + } + class ut { + constructor(t, r = {}) { + dt(this, r), (this.type = t); + } + } + class Ke extends ut { + constructor(t, r = {}) { + super("error", dt({ error: t }, r)); + } + } + class kt { + on(t, r) { + return ( + (this._listeners = this._listeners || {}), + we(t, r, this._listeners), + { + unsubscribe: () => { + this.off(t, r); + }, + } + ); + } + off(t, r) { + return ( + Ve(t, r, this._listeners), + Ve(t, r, this._oneTimeListeners), + this + ); + } + once(t, r) { + return r + ? ((this._oneTimeListeners = this._oneTimeListeners || {}), + we(t, r, this._oneTimeListeners), + this) + : new Promise((o) => this.once(t, o)); + } + fire(t, r) { + typeof t == "string" && (t = new ut(t, r || {})); + const o = t.type; + if (this.listens(o)) { + t.target = this; + const c = + this._listeners && this._listeners[o] + ? this._listeners[o].slice() + : []; + for (const v of c) v.call(this, t); + const f = + this._oneTimeListeners && this._oneTimeListeners[o] + ? this._oneTimeListeners[o].slice() + : []; + for (const v of f) + Ve(o, v, this._oneTimeListeners), v.call(this, t); + const _ = this._eventedParent; + _ && + (dt( + t, + typeof this._eventedParentData == "function" + ? this._eventedParentData() + : this._eventedParentData + ), + _.fire(t)); + } else t instanceof Ke && console.error(t.error); + return this; + } + listens(t) { + return ( + (this._listeners && + this._listeners[t] && + this._listeners[t].length > 0) || + (this._oneTimeListeners && + this._oneTimeListeners[t] && + this._oneTimeListeners[t].length > 0) || + (this._eventedParent && this._eventedParent.listens(t)) + ); + } + setEventedParent(t, r) { + return ( + (this._eventedParent = t), (this._eventedParentData = r), this + ); + } + } + var ye = { + $version: 8, + $root: { + version: { required: !0, type: "enum", values: [8] }, + name: { type: "string" }, + metadata: { type: "*" }, + center: { type: "array", value: "number" }, + 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" }, + 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 }, + "*": { 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: "*" }, + tolerance: { type: "number", default: 0.375 }, + cluster: { type: "boolean", default: !1 }, + clusterRadius: { type: "number", default: 50, minimum: 0 }, + 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", + "property-type": "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", + "property-type": "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", + "property-type": "constant", + }, + }, + layout_heatmap: { + visibility: { + type: "enum", + values: { visible: {}, none: {} }, + default: "visible", + "property-type": "constant", + }, + }, + "layout_fill-extrusion": { + visibility: { + type: "enum", + values: { visible: {}, none: {} }, + default: "visible", + "property-type": "constant", + }, + }, + layout_line: { + "line-cap": { + type: "enum", + values: { butt: {}, round: {}, square: {} }, + default: "butt", + expression: { interpolated: !1, parameters: ["zoom"] }, + "property-type": "data-constant", + }, + "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"] }, + "property-type": "data-constant", + }, + "line-round-limit": { + type: "number", + default: 1.05, + requires: [{ "line-join": "round" }], + expression: { interpolated: !0, parameters: ["zoom"] }, + "property-type": "data-constant", + }, + "line-sort-key": { + type: "number", + expression: { + interpolated: !1, + parameters: ["zoom", "feature"], + }, + "property-type": "data-driven", + }, + visibility: { + type: "enum", + values: { visible: {}, none: {} }, + default: "visible", + "property-type": "constant", + }, + }, + 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", + "property-type": "constant", + }, + }, + layout_raster: { + visibility: { + type: "enum", + values: { visible: {}, none: {} }, + default: "visible", + "property-type": "constant", + }, + }, + layout_hillshade: { + visibility: { + type: "enum", + values: { visible: {}, none: {} }, + default: "visible", + "property-type": "constant", + }, + }, + "layout_color-relief": { + visibility: { + type: "enum", + values: { visible: {}, none: {} }, + default: "visible", + "property-type": "constant", + }, + }, + filter: { type: "array", value: "*" }, + 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: "*", 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: 0.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: 0.5, + minimum: 0, + maximum: 1, + expression: { interpolated: !0, parameters: ["zoom"] }, + transition: !0, + }, + "horizon-fog-blend": { + type: "number", + "property-type": "data-constant", + default: 0.8, + minimum: 0, + maximum: 1, + expression: { interpolated: !0, parameters: ["zoom"] }, + transition: !0, + }, + "sky-horizon-blend": { + type: "number", + "property-type": "data-constant", + default: 0.8, + minimum: 0, + maximum: 1, + expression: { interpolated: !0, parameters: ["zoom"] }, + transition: !0, + }, + "atmosphere-blend": { + type: "number", + "property-type": "data-constant", + default: 0.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", + }, + "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"] }, + "property-type": "cross-faded", + }, + "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)", + 0.1, + "royalblue", + 0.3, + "cyan", + 0.5, + "lime", + 0.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", + }, + "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: 0.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", + }, + }, + "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", + }, + }, + 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" } }, + }; + const Bt = [ + "type", + "source", + "source-layer", + "minzoom", + "maxzoom", + "filter", + "layout", + ]; + function rr(n, t) { + const r = {}; + for (const o in n) o !== "ref" && (r[o] = n[o]); + return ( + Bt.forEach((o) => { + o in t && (r[o] = t[o]); + }), + r + ); + } + function Kt(n, t) { + if (Array.isArray(n)) { + if (!Array.isArray(t) || n.length !== t.length) return !1; + for (let r = 0; r < n.length; r++) + if (!Kt(n[r], t[r])) return !1; + return !0; + } + if (typeof n == "object" && n !== null && t !== null) { + if ( + typeof t != "object" || + Object.keys(n).length !== Object.keys(t).length + ) + return !1; + for (const r in n) if (!Kt(n[r], t[r])) return !1; + return !0; + } + return n === t; + } + function gr(n, t) { + n.push(t); + } + function Ur(n, t, r) { + gr(r, { command: "addSource", args: [n, t[n]] }); + } + function nn(n, t, r) { + gr(t, { command: "removeSource", args: [n] }), (r[n] = !0); + } + function mn(n, t, r, o) { + nn(n, r, o), Ur(n, t, r); + } + function _n(n, t, r) { + let o; + for (o in n[r]) + if ( + Object.prototype.hasOwnProperty.call(n[r], o) && + o !== "data" && + !Kt(n[r][o], t[r][o]) + ) + return !1; + for (o in t[r]) + if ( + Object.prototype.hasOwnProperty.call(t[r], o) && + o !== "data" && + !Kt(n[r][o], t[r][o]) + ) + return !1; + return !0; + } + function Vt(n, t, r, o, c, f) { + (n = n || {}), (t = t || {}); + for (const _ in n) + Object.prototype.hasOwnProperty.call(n, _) && + (Kt(n[_], t[_]) || + r.push({ command: f, args: [o, _, t[_], c] })); + for (const _ in t) + Object.prototype.hasOwnProperty.call(t, _) && + !Object.prototype.hasOwnProperty.call(n, _) && + (Kt(n[_], t[_]) || + r.push({ command: f, args: [o, _, t[_], c] })); + } + function Et(n) { + return n.id; + } + function dr(n, t) { + return (n[t.id] = t), n; + } + class ht { + constructor(t, r, o, c) { + (this.message = (t ? `${t}: ` : "") + o), + c && (this.identifier = c), + r != null && r.__line__ && (this.line = r.__line__); + } + } + function Xr(n, ...t) { + for (const r of t) for (const o in r) n[o] = r[o]; + return n; + } + class Yr extends Error { + constructor(t, r) { + super(r), (this.message = r), (this.key = t); + } + } + class Zr { + constructor(t, r = []) { + (this.parent = t), (this.bindings = {}); + for (const [o, c] of r) this.bindings[o] = c; + } + concat(t) { + return new Zr(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 mt = { kind: "null" }, + He = { kind: "number" }, + At = { kind: "string" }, + Ft = { kind: "boolean" }, + Jt = { kind: "color" }, + Cr = { kind: "projectionDefinition" }, + Er = { kind: "object" }, + ur = { kind: "value" }, + rn = { kind: "collator" }, + pn = { kind: "formatted" }, + gn = { kind: "padding" }, + ln = { kind: "colorArray" }, + En = { kind: "numberArray" }, + pr = { kind: "resolvedImage" }, + In = { kind: "variableAnchorOffsetCollection" }; + function tn(n, t) { + return { kind: "array", itemType: n, N: t }; + } + function en(n) { + if (n.kind === "array") { + const t = en(n.itemType); + return typeof n.N == "number" + ? `array<${t}, ${n.N}>` + : n.itemType.kind === "value" + ? "array" + : `array<${t}>`; + } + return n.kind; + } + const ma = [ + mt, + He, + At, + Ft, + Jt, + Cr, + pn, + Er, + tn(ur), + gn, + En, + ln, + pr, + In, + ]; + function pi(n, t) { + if (t.kind === "error") return null; + if (n.kind === "array") { + if ( + t.kind === "array" && + ((t.N === 0 && t.itemType.kind === "value") || + !pi(n.itemType, t.itemType)) && + (typeof n.N != "number" || n.N === t.N) + ) + return null; + } else { + if (n.kind === t.kind) return null; + if (n.kind === "value") { + for (const r of ma) if (!pi(r, t)) return null; + } + } + return `Expected ${en(n)} but found ${en(t)} instead.`; + } + function Xi(n, t) { + return t.some((r) => r.kind === n.kind); + } + function Zn(n, t) { + return t.some((r) => + r === "null" + ? n === null + : r === "array" + ? Array.isArray(n) + : r === "object" + ? n && !Array.isArray(n) && typeof n == "object" + : r === typeof n + ); + } + function ni(n, t) { + return n.kind === "array" && t.kind === "array" + ? n.itemType.kind === t.itemType.kind && typeof n.N == "number" + : n.kind === t.kind; + } + const Zi = 0.96422, + Yi = 0.82521, + Ei = 4 / 29, + zi = 6 / 29, + Ki = 3 * zi * zi, + oa = zi * zi * zi, + Ta = Math.PI / 180, + bt = 180 / Math.PI; + function Xt(n) { + return (n %= 360) < 0 && (n += 360), n; + } + function Br([n, t, r, o]) { + let c, f; + const _ = On( + (0.2225045 * (n = xn(n)) + + 0.7168786 * (t = xn(t)) + + 0.0606169 * (r = xn(r))) / + 1 + ); + n === t && t === r + ? (c = f = _) + : ((c = On( + (0.4360747 * n + 0.3850649 * t + 0.1430804 * r) / Zi + )), + (f = On( + (0.0139322 * n + 0.0971045 * t + 0.7141733 * r) / Yi + ))); + const v = 116 * _ - 16; + return [v < 0 ? 0 : v, 500 * (c - _), 200 * (_ - f), o]; + } + function xn(n) { + return n <= 0.04045 + ? n / 12.92 + : Math.pow((n + 0.055) / 1.055, 2.4); + } + function On(n) { + return n > oa ? Math.pow(n, 1 / 3) : n / Ki + Ei; + } + function Yn([n, t, r, o]) { + let c = (n + 16) / 116, + f = isNaN(t) ? c : c + t / 500, + _ = isNaN(r) ? c : c - r / 200; + return ( + (c = 1 * wn(c)), + (f = Zi * wn(f)), + (_ = Yi * wn(_)), + [ + Vn(3.1338561 * f - 1.6168667 * c - 0.4906146 * _), + Vn(-0.9787684 * f + 1.9161415 * c + 0.033454 * _), + Vn(0.0719453 * f - 0.2289914 * c + 1.4052427 * _), + o, + ] + ); + } + function Vn(n) { + return (n = + n <= 0.00304 + ? 12.92 * n + : 1.055 * Math.pow(n, 1 / 2.4) - 0.055) < 0 + ? 0 + : n > 1 + ? 1 + : n; + } + function wn(n) { + return n > zi ? n * n * n : Ki * (n - Ei); + } + const Ji = + Object.hasOwn || + function (n, t) { + return Object.prototype.hasOwnProperty.call(n, t); + }; + function sr(n, t) { + return Ji(n, t) ? n[t] : void 0; + } + function Ut(n) { + return parseInt(n.padEnd(2, n), 16) / 255; + } + function $r(n, t) { + return lr(t ? n / 100 : n, 0, 1); + } + function lr(n, t, r) { + return Math.min(Math.max(t, n), r); + } + function Tn(n) { + return !n.some(Number.isNaN); + } + const an = { + 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 Cn(n, t, r) { + return n + r * (t - n); + } + function Gn(n, t, r) { + return n.map((o, c) => Cn(o, t[c], r)); + } + class Mr { + constructor(t, r, o, c = 1, f = !0) { + (this.r = t), + (this.g = r), + (this.b = o), + (this.a = c), + f || + ((this.r *= c), + (this.g *= c), + (this.b *= c), + c || this.overwriteGetter("rgb", [t, r, o, c])); + } + static parse(t) { + if (t instanceof Mr) return t; + if (typeof t != "string") return; + const r = (function (o) { + if ((o = o.toLowerCase().trim()) === "transparent") + return [0, 0, 0, 0]; + const c = sr(an, o); + if (c) { + const [_, v, b] = c; + return [_ / 255, v / 255, b / 255, 1]; + } + if ( + o.startsWith("#") && + /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(o) + ) { + const _ = o.length < 6 ? 1 : 2; + let v = 1; + return [ + Ut(o.slice(v, (v += _))), + Ut(o.slice(v, (v += _))), + Ut(o.slice(v, (v += _))), + Ut(o.slice(v, v + _) || "ff"), + ]; + } + if (o.startsWith("rgb")) { + const _ = o.match( + /^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/ + ); + if (_) { + const [v, b, S, I, L, F, q, Z, W, J, le, Re] = _, + xe = [I || " ", q || " ", J].join(""); + if ( + xe === " " || + xe === " /" || + xe === ",," || + xe === ",,," + ) { + const Ce = [S, F, W].join(""), + Ye = Ce === "%%%" ? 100 : Ce === "" ? 255 : 0; + if (Ye) { + const lt = [ + lr(+b / Ye, 0, 1), + lr(+L / Ye, 0, 1), + lr(+Z / Ye, 0, 1), + le ? $r(+le, Re) : 1, + ]; + if (Tn(lt)) return lt; + } + } + return; + } + } + const f = o.match( + /^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/ + ); + if (f) { + const [_, v, b, S, I, L, F, q, Z] = f, + W = [b || " ", I || " ", F].join(""); + if ( + W === " " || + W === " /" || + W === ",," || + W === ",,," + ) { + const J = [ + +v, + lr(+S, 0, 100), + lr(+L, 0, 100), + q ? $r(+q, Z) : 1, + ]; + if (Tn(J)) + return (function ([le, Re, xe, Ce]) { + function Ye(lt) { + const Pt = (lt + le / 30) % 12, + Yt = Re * Math.min(xe, 1 - xe); + return ( + xe - + Yt * Math.max(-1, Math.min(Pt - 3, 9 - Pt, 1)) + ); + } + return ( + (le = Xt(le)), + (Re /= 100), + (xe /= 100), + [Ye(0), Ye(8), Ye(4), Ce] + ); + })(J); + } + } + })(t); + return r ? new Mr(...r, !1) : void 0; + } + get rgb() { + const { r: t, g: r, b: o, a: c } = this, + f = c || 1 / 0; + return this.overwriteGetter("rgb", [t / f, r / f, o / f, c]); + } + get hcl() { + return this.overwriteGetter( + "hcl", + (function (t) { + const [r, o, c, f] = Br(t), + _ = Math.sqrt(o * o + c * c); + return [ + Math.round(1e4 * _) ? Xt(Math.atan2(c, o) * bt) : NaN, + _, + r, + f, + ]; + })(this.rgb) + ); + } + get lab() { + return this.overwriteGetter("lab", Br(this.rgb)); + } + overwriteGetter(t, r) { + return Object.defineProperty(this, t, { value: r }), r; + } + toString() { + const [t, r, o, c] = this.rgb; + return `rgba(${[t, r, o] + .map((f) => Math.round(255 * f)) + .join(",")},${c})`; + } + static interpolate(t, r, o, c = "rgb") { + switch (c) { + case "rgb": { + const [f, _, v, b] = Gn(t.rgb, r.rgb, o); + return new Mr(f, _, v, b, !1); + } + case "hcl": { + const [f, _, v, b] = t.hcl, + [S, I, L, F] = r.hcl; + let q, Z; + if (isNaN(f) || isNaN(S)) + isNaN(f) + ? isNaN(S) + ? (q = NaN) + : ((q = S), (v !== 1 && v !== 0) || (Z = I)) + : ((q = f), (L !== 1 && L !== 0) || (Z = _)); + else { + let xe = S - f; + S > f && xe > 180 + ? (xe -= 360) + : S < f && f - S > 180 && (xe += 360), + (q = f + o * xe); + } + const [W, J, le, Re] = (function ([xe, Ce, Ye, lt]) { + return ( + (xe = isNaN(xe) ? 0 : xe * Ta), + Yn([Ye, Math.cos(xe) * Ce, Math.sin(xe) * Ce, lt]) + ); + })([q, Z ?? Cn(_, I, o), Cn(v, L, o), Cn(b, F, o)]); + return new Mr(W, J, le, Re, !1); + } + case "lab": { + const [f, _, v, b] = Yn(Gn(t.lab, r.lab, o)); + return new Mr(f, _, v, b, !1); + } + } + } + } + (Mr.black = new Mr(0, 0, 0, 1)), + (Mr.white = new Mr(1, 1, 1, 1)), + (Mr.transparent = new Mr(0, 0, 0, 0)), + (Mr.red = new Mr(1, 0, 0, 1)); + class Mn { + constructor(t, r, o) { + (this.sensitivity = t + ? r + ? "variant" + : "case" + : r + ? "accent" + : "base"), + (this.locale = o), + (this.collator = new Intl.Collator( + this.locale ? this.locale : [], + { sensitivity: this.sensitivity, usage: "search" } + )); + } + compare(t, r) { + return this.collator.compare(t, r); + } + resolvedLocale() { + return new Intl.Collator( + this.locale ? this.locale : [] + ).resolvedOptions().locale; + } + } + const bn = ["bottom", "center", "top"]; + class cn { + constructor(t, r, o, c, f, _) { + (this.text = t), + (this.image = r), + (this.scale = o), + (this.fontStack = c), + (this.textColor = f), + (this.verticalAlign = _); + } + } + class Sn { + constructor(t) { + this.sections = t; + } + static fromString(t) { + return new Sn([new cn(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 Sn ? t : Sn.fromString(t); + } + toString() { + return this.sections.length === 0 + ? "" + : this.sections.map((t) => t.text).join(""); + } + } + class kn { + constructor(t) { + this.values = t.slice(); + } + static parse(t) { + if (t instanceof kn) return t; + if (typeof t == "number") return new kn([t, t, t, t]); + if (Array.isArray(t) && !(t.length < 1 || t.length > 4)) { + for (const r of t) if (typeof r != "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 kn(t); + } + } + toString() { + return JSON.stringify(this.values); + } + static interpolate(t, r, o) { + return new kn(Gn(t.values, r.values, o)); + } + } + class vn { + constructor(t) { + this.values = t.slice(); + } + static parse(t) { + if (t instanceof vn) return t; + if (typeof t == "number") return new vn([t]); + if (Array.isArray(t)) { + for (const r of t) if (typeof r != "number") return; + return new vn(t); + } + } + toString() { + return JSON.stringify(this.values); + } + static interpolate(t, r, o) { + return new vn(Gn(t.values, r.values, o)); + } + } + class fn { + constructor(t) { + this.values = t.slice(); + } + static parse(t) { + if (t instanceof fn) return t; + if (typeof t == "string") { + const o = Mr.parse(t); + return o ? new fn([o]) : void 0; + } + if (!Array.isArray(t)) return; + const r = []; + for (const o of t) { + if (typeof o != "string") return; + const c = Mr.parse(o); + if (!c) return; + r.push(c); + } + return new fn(r); + } + toString() { + return JSON.stringify(this.values); + } + static interpolate(t, r, o, c = "rgb") { + const f = []; + if (t.values.length != r.values.length) + throw new Error( + `colorArray: Arrays have mismatched length (${t.values.length} vs. ${r.values.length}), cannot interpolate.` + ); + for (let _ = 0; _ < t.values.length; _++) + f.push(Mr.interpolate(t.values[_], r.values[_], o, c)); + return new fn(f); + } + } + class on extends Error { + constructor(t) { + super(t), (this.name = "RuntimeError"); + } + toJSON() { + return this.message; + } + } + const po = new Set([ + "center", + "left", + "right", + "top", + "bottom", + "top-left", + "top-right", + "bottom-left", + "bottom-right", + ]); + class fi { + constructor(t) { + this.values = t.slice(); + } + static parse(t) { + if (t instanceof fi) return t; + if (Array.isArray(t) && !(t.length < 1) && t.length % 2 == 0) { + for (let r = 0; r < t.length; r += 2) { + const o = t[r], + c = t[r + 1]; + if ( + typeof o != "string" || + !po.has(o) || + !Array.isArray(c) || + c.length !== 2 || + typeof c[0] != "number" || + typeof c[1] != "number" + ) + return; + } + return new fi(t); + } + } + toString() { + return JSON.stringify(this.values); + } + static interpolate(t, r, o) { + const c = t.values, + f = r.values; + if (c.length !== f.length) + throw new on( + `Cannot interpolate values of different length. from: ${t.toString()}, to: ${r.toString()}` + ); + const _ = []; + for (let v = 0; v < c.length; v += 2) { + if (c[v] !== f[v]) + throw new on( + `Cannot interpolate values containing mismatched anchors. from[${v}]: ${c[v]}, to[${v}]: ${f[v]}` + ); + _.push(c[v]); + const [b, S] = c[v + 1], + [I, L] = f[v + 1]; + _.push([Cn(b, I, o), Cn(S, L, o)]); + } + return new fi(_); + } + } + class Hn { + constructor(t) { + (this.name = t.name), (this.available = t.available); + } + toString() { + return this.name; + } + static fromString(t) { + return t ? new Hn({ name: t, available: !1 }) : null; + } + } + class jn { + constructor(t, r, o) { + (this.from = t), (this.to = r), (this.transition = o); + } + static interpolate(t, r, o) { + return new jn(t, r, o); + } + static parse(t) { + return t instanceof jn + ? t + : Array.isArray(t) && + t.length === 3 && + typeof t[0] == "string" && + typeof t[1] == "string" && + typeof t[2] == "number" + ? new jn(t[0], t[1], t[2]) + : typeof t == "object" && + typeof t.from == "string" && + typeof t.to == "string" && + typeof t.transition == "number" + ? new jn(t.from, t.to, t.transition) + : typeof t == "string" + ? new jn(t, t, 1) + : void 0; + } + } + function zn(n, t, r, o) { + return typeof n == "number" && + n >= 0 && + n <= 255 && + typeof t == "number" && + t >= 0 && + t <= 255 && + typeof r == "number" && + r >= 0 && + r <= 255 + ? o === void 0 || (typeof o == "number" && o >= 0 && o <= 1) + ? null + : `Invalid rgba value [${[n, t, r, o].join( + ", " + )}]: 'a' must be between 0 and 1.` + : `Invalid rgba value [${(typeof o == "number" + ? [n, t, r, o] + : [n, t, r] + ).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`; + } + function qa(n) { + if ( + n === null || + typeof n == "string" || + typeof n == "boolean" || + typeof n == "number" || + n instanceof jn || + n instanceof Mr || + n instanceof Mn || + n instanceof Sn || + n instanceof kn || + n instanceof vn || + n instanceof fn || + n instanceof fi || + n instanceof Hn + ) + return !0; + if (Array.isArray(n)) { + for (const t of n) if (!qa(t)) return !1; + return !0; + } + if (typeof n == "object") { + for (const t in n) if (!qa(n[t])) return !1; + return !0; + } + return !1; + } + function Rr(n) { + if (n === null) return mt; + if (typeof n == "string") return At; + if (typeof n == "boolean") return Ft; + if (typeof n == "number") return He; + if (n instanceof Mr) return Jt; + if (n instanceof jn) return Cr; + if (n instanceof Mn) return rn; + if (n instanceof Sn) return pn; + if (n instanceof kn) return gn; + if (n instanceof vn) return En; + if (n instanceof fn) return ln; + if (n instanceof fi) return In; + if (n instanceof Hn) return pr; + if (Array.isArray(n)) { + const t = n.length; + let r; + for (const o of n) { + const c = Rr(o); + if (r) { + if (r === c) continue; + r = ur; + break; + } + r = c; + } + return tn(r || ur, t); + } + return Er; + } + function Gr(n) { + const t = typeof n; + return n === null + ? "" + : t === "string" || t === "number" || t === "boolean" + ? String(n) + : n instanceof Mr || + n instanceof jn || + n instanceof Sn || + n instanceof kn || + n instanceof vn || + n instanceof fn || + n instanceof fi || + n instanceof Hn + ? n.toString() + : JSON.stringify(n); + } + class _a { + constructor(t, r) { + (this.type = t), (this.value = r); + } + static parse(t, r) { + if (t.length !== 2) + return r.error( + `'literal' expression requires exactly one argument, but found ${ + t.length - 1 + } instead.` + ); + if (!qa(t[1])) return r.error("invalid value"); + const o = t[1]; + let c = Rr(o); + const f = r.expectedType; + return ( + c.kind !== "array" || + c.N !== 0 || + !f || + f.kind !== "array" || + (typeof f.N == "number" && f.N !== 0) || + (c = f), + new _a(c, o) + ); + } + evaluate() { + return this.value; + } + eachChild() {} + outputDefined() { + return !0; + } + } + const un = { string: At, number: He, boolean: Ft, object: Er }; + class Li { + constructor(t, r) { + (this.type = t), (this.args = r); + } + static parse(t, r) { + if (t.length < 2) + return r.error("Expected at least one argument."); + let o, + c = 1; + const f = t[0]; + if (f === "array") { + let v, b; + if (t.length > 2) { + const S = t[1]; + if (typeof S != "string" || !(S in un) || S === "object") + return r.error( + 'The item type argument of "array" must be one of string, number, boolean', + 1 + ); + (v = un[S]), c++; + } else v = ur; + if (t.length > 3) { + if ( + t[2] !== null && + (typeof t[2] != "number" || + t[2] < 0 || + t[2] !== Math.floor(t[2])) + ) + return r.error( + 'The length argument to "array" must be a positive integer literal', + 2 + ); + (b = t[2]), c++; + } + o = tn(v, b); + } else { + if (!un[f]) + throw new Error(`Types doesn't contain name = ${f}`); + o = un[f]; + } + const _ = []; + for (; c < t.length; c++) { + const v = r.parse(t[c], c, ur); + if (!v) return null; + _.push(v); + } + return new Li(o, _); + } + evaluate(t) { + for (let r = 0; r < this.args.length; r++) { + const o = this.args[r].evaluate(t); + if (!pi(this.type, Rr(o))) return o; + if (r === this.args.length - 1) + throw new on( + `Expected value to be of type ${en( + this.type + )}, but found ${en(Rr(o))} instead.` + ); + } + throw new Error(); + } + eachChild(t) { + this.args.forEach(t); + } + outputDefined() { + return this.args.every((t) => t.outputDefined()); + } + } + const ga = { + "to-boolean": Ft, + "to-color": Jt, + "to-number": He, + "to-string": At, + }; + class sa { + constructor(t, r) { + (this.type = t), (this.args = r); + } + static parse(t, r) { + if (t.length < 2) + return r.error("Expected at least one argument."); + const o = t[0]; + if (!ga[o]) + throw new Error( + `Can't parse ${o} as it is not part of the known types` + ); + if ((o === "to-boolean" || o === "to-string") && t.length !== 2) + return r.error("Expected one argument."); + const c = ga[o], + f = []; + for (let _ = 1; _ < t.length; _++) { + const v = r.parse(t[_], _, ur); + if (!v) return null; + f.push(v); + } + return new sa(c, f); + } + evaluate(t) { + switch (this.type.kind) { + case "boolean": + return !!this.args[0].evaluate(t); + case "color": { + let r, o; + for (const c of this.args) { + if (((r = c.evaluate(t)), (o = null), r instanceof Mr)) + return r; + if (typeof r == "string") { + const f = t.parseColor(r); + if (f) return f; + } else if ( + Array.isArray(r) && + ((o = + r.length < 3 || r.length > 4 + ? `Invalid rgba value ${JSON.stringify( + r + )}: expected an array containing either three or four numeric values.` + : zn(r[0], r[1], r[2], r[3])), + !o) + ) + return new Mr(r[0] / 255, r[1] / 255, r[2] / 255, r[3]); + } + throw new on( + o || + `Could not parse color from value '${ + typeof r == "string" ? r : JSON.stringify(r) + }'` + ); + } + case "padding": { + let r; + for (const o of this.args) { + r = o.evaluate(t); + const c = kn.parse(r); + if (c) return c; + } + throw new on( + `Could not parse padding from value '${ + typeof r == "string" ? r : JSON.stringify(r) + }'` + ); + } + case "numberArray": { + let r; + for (const o of this.args) { + r = o.evaluate(t); + const c = vn.parse(r); + if (c) return c; + } + throw new on( + `Could not parse numberArray from value '${ + typeof r == "string" ? r : JSON.stringify(r) + }'` + ); + } + case "colorArray": { + let r; + for (const o of this.args) { + r = o.evaluate(t); + const c = fn.parse(r); + if (c) return c; + } + throw new on( + `Could not parse colorArray from value '${ + typeof r == "string" ? r : JSON.stringify(r) + }'` + ); + } + case "variableAnchorOffsetCollection": { + let r; + for (const o of this.args) { + r = o.evaluate(t); + const c = fi.parse(r); + if (c) return c; + } + throw new on( + `Could not parse variableAnchorOffsetCollection from value '${ + typeof r == "string" ? r : JSON.stringify(r) + }'` + ); + } + case "number": { + let r = null; + for (const o of this.args) { + if (((r = o.evaluate(t)), r === null)) return 0; + const c = Number(r); + if (!isNaN(c)) return c; + } + throw new on( + `Could not convert ${JSON.stringify(r)} to number.` + ); + } + case "formatted": + return Sn.fromString(Gr(this.args[0].evaluate(t))); + case "resolvedImage": + return Hn.fromString(Gr(this.args[0].evaluate(t))); + case "projectionDefinition": + return this.args[0].evaluate(t); + default: + return Gr(this.args[0].evaluate(t)); + } + } + eachChild(t) { + this.args.forEach(t); + } + outputDefined() { + return this.args.every((t) => t.outputDefined()); + } + } + const Ja = ["Unknown", "Point", "LineString", "Polygon"]; + class Ms { + 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" + ? Ja[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 r = this._parseColorCache.get(t); + return ( + r || ((r = Mr.parse(t)), this._parseColorCache.set(t, r)), r + ); + } + } + class Ca { + constructor(t, r, o = [], c, f = new Zr(), _ = []) { + (this.registry = t), + (this.path = o), + (this.key = o.map((v) => `[${v}]`).join("")), + (this.scope = f), + (this.errors = _), + (this.expectedType = c), + (this._isConstant = r); + } + parse(t, r, o, c, f = {}) { + return r + ? this.concat(r, o, c)._parse(t, f) + : this._parse(t, f); + } + _parse(t, r) { + function o(c, f, _) { + return _ === "assert" + ? new Li(f, [c]) + : _ === "coerce" + ? new sa(f, [c]) + : c; + } + 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 c = t[0]; + if (typeof c != "string") + return ( + this.error( + `Expression name must be a string, but found ${typeof c} instead. If you wanted a literal array, use ["literal", [...]].`, + 0 + ), + null + ); + const f = this.registry[c]; + if (f) { + let _ = f.parse(t, this); + if (!_) return null; + if (this.expectedType) { + const v = this.expectedType, + b = _.type; + if ( + (v.kind !== "string" && + v.kind !== "number" && + v.kind !== "boolean" && + v.kind !== "object" && + v.kind !== "array") || + b.kind !== "value" + ) { + if ( + (v.kind === "projectionDefinition" && + ["string", "array"].includes(b.kind)) || + (["color", "formatted", "resolvedImage"].includes( + v.kind + ) && + ["value", "string"].includes(b.kind)) || + (["padding", "numberArray"].includes(v.kind) && + ["value", "number", "array"].includes(b.kind)) || + (v.kind === "colorArray" && + ["value", "string", "array"].includes(b.kind)) || + (v.kind === "variableAnchorOffsetCollection" && + ["value", "array"].includes(b.kind)) + ) + _ = o(_, v, r.typeAnnotation || "coerce"); + else if (this.checkSubtype(v, b)) return null; + } else _ = o(_, v, r.typeAnnotation || "assert"); + } + if ( + !(_ instanceof _a) && + _.type.kind !== "resolvedImage" && + this._isConstant(_) + ) { + const v = new Ms(); + try { + _ = new _a(_.type, _.evaluate(v)); + } catch (b) { + return this.error(b.message), null; + } + } + return _; + } + return this.error( + `Unknown expression "${c}". 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, r, o) { + const c = + typeof t == "number" ? this.path.concat(t) : this.path, + f = o ? this.scope.concat(o) : this.scope; + return new Ca( + this.registry, + this._isConstant, + c, + r || null, + f, + this.errors + ); + } + error(t, ...r) { + const o = `${this.key}${r.map((c) => `[${c}]`).join("")}`; + this.errors.push(new Yr(o, t)); + } + checkSubtype(t, r) { + const o = pi(t, r); + return o && this.error(o), o; + } + } + class Qa { + constructor(t, r) { + (this.type = r.type), + (this.bindings = [].concat(t)), + (this.result = r); + } + evaluate(t) { + return this.result.evaluate(t); + } + eachChild(t) { + for (const r of this.bindings) t(r[1]); + t(this.result); + } + static parse(t, r) { + if (t.length < 4) + return r.error( + `Expected at least 3 arguments, but found ${ + t.length - 1 + } instead.` + ); + const o = []; + for (let f = 1; f < t.length - 1; f += 2) { + const _ = t[f]; + if (typeof _ != "string") + return r.error( + `Expected string, but found ${typeof _} instead.`, + f + ); + if (/[^a-zA-Z0-9_]/.test(_)) + return r.error( + "Variable names must contain only alphanumeric characters or '_'.", + f + ); + const v = r.parse(t[f + 1], f + 1); + if (!v) return null; + o.push([_, v]); + } + const c = r.parse( + t[t.length - 1], + t.length - 1, + r.expectedType, + o + ); + return c ? new Qa(o, c) : null; + } + outputDefined() { + return this.result.outputDefined(); + } + } + class Jo { + constructor(t, r) { + (this.type = r.type), + (this.name = t), + (this.boundExpression = r); + } + static parse(t, r) { + if (t.length !== 2 || typeof t[1] != "string") + return r.error( + "'var' expression requires exactly one string literal argument." + ); + const o = t[1]; + return r.scope.has(o) + ? new Jo(o, r.scope.get(o)) + : r.error( + `Unknown variable "${o}". Make sure "${o}" has been bound in an enclosing "let" expression before using it.`, + 1 + ); + } + evaluate(t) { + return this.boundExpression.evaluate(t); + } + eachChild() {} + outputDefined() { + return !1; + } + } + class gl { + constructor(t, r, o) { + (this.type = t), (this.index = r), (this.input = o); + } + static parse(t, r) { + if (t.length !== 3) + return r.error( + `Expected 2 arguments, but found ${t.length - 1} instead.` + ); + const o = r.parse(t[1], 1, He), + c = r.parse(t[2], 2, tn(r.expectedType || ur)); + return o && c ? new gl(c.type.itemType, o, c) : null; + } + evaluate(t) { + const r = this.index.evaluate(t), + o = this.input.evaluate(t); + if (r < 0) throw new on(`Array index out of bounds: ${r} < 0.`); + if (r >= o.length) + throw new on( + `Array index out of bounds: ${r} > ${o.length - 1}.` + ); + if (r !== Math.floor(r)) + throw new on( + `Array index must be an integer, but found ${r} instead.` + ); + return o[r]; + } + eachChild(t) { + t(this.index), t(this.input); + } + outputDefined() { + return !1; + } + } + class vl { + constructor(t, r) { + (this.type = Ft), (this.needle = t), (this.haystack = r); + } + static parse(t, r) { + if (t.length !== 3) + return r.error( + `Expected 2 arguments, but found ${t.length - 1} instead.` + ); + const o = r.parse(t[1], 1, ur), + c = r.parse(t[2], 2, ur); + return o && c + ? Xi(o.type, [Ft, At, He, mt, ur]) + ? new vl(o, c) + : r.error( + `Expected first argument to be of type boolean, string, number or null, but found ${en( + o.type + )} instead` + ) + : null; + } + evaluate(t) { + const r = this.needle.evaluate(t), + o = this.haystack.evaluate(t); + if (!o) return !1; + if (!Zn(r, ["boolean", "string", "number", "null"])) + throw new on( + `Expected first argument to be of type boolean, string, number or null, but found ${en( + Rr(r) + )} instead.` + ); + if (!Zn(o, ["string", "array"])) + throw new on( + `Expected second argument to be of type array or string, but found ${en( + Rr(o) + )} instead.` + ); + return o.indexOf(r) >= 0; + } + eachChild(t) { + t(this.needle), t(this.haystack); + } + outputDefined() { + return !0; + } + } + class Sa { + constructor(t, r, o) { + (this.type = He), + (this.needle = t), + (this.haystack = r), + (this.fromIndex = o); + } + static parse(t, r) { + if (t.length <= 2 || t.length >= 5) + return r.error( + `Expected 3 or 4 arguments, but found ${ + t.length - 1 + } instead.` + ); + const o = r.parse(t[1], 1, ur), + c = r.parse(t[2], 2, ur); + if (!o || !c) return null; + if (!Xi(o.type, [Ft, At, He, mt, ur])) + return r.error( + `Expected first argument to be of type boolean, string, number or null, but found ${en( + o.type + )} instead` + ); + if (t.length === 4) { + const f = r.parse(t[3], 3, He); + return f ? new Sa(o, c, f) : null; + } + return new Sa(o, c); + } + evaluate(t) { + const r = this.needle.evaluate(t), + o = this.haystack.evaluate(t); + if (!Zn(r, ["boolean", "string", "number", "null"])) + throw new on( + `Expected first argument to be of type boolean, string, number or null, but found ${en( + Rr(r) + )} instead.` + ); + let c; + if ( + (this.fromIndex && (c = this.fromIndex.evaluate(t)), + Zn(o, ["string"])) + ) { + const f = o.indexOf(r, c); + return f === -1 ? -1 : [...o.slice(0, f)].length; + } + if (Zn(o, ["array"])) return o.indexOf(r, c); + throw new on( + `Expected second argument to be of type array or string, but found ${en( + Rr(o) + )} instead.` + ); + } + eachChild(t) { + t(this.needle), + t(this.haystack), + this.fromIndex && t(this.fromIndex); + } + outputDefined() { + return !1; + } + } + class Ti { + constructor(t, r, o, c, f, _) { + (this.inputType = t), + (this.type = r), + (this.input = o), + (this.cases = c), + (this.outputs = f), + (this.otherwise = _); + } + static parse(t, r) { + if (t.length < 5) + return r.error( + `Expected at least 4 arguments, but found only ${ + t.length - 1 + }.` + ); + if (t.length % 2 != 1) + return r.error("Expected an even number of arguments."); + let o, c; + r.expectedType && + r.expectedType.kind !== "value" && + (c = r.expectedType); + const f = {}, + _ = []; + for (let S = 2; S < t.length - 1; S += 2) { + let I = t[S]; + const L = t[S + 1]; + Array.isArray(I) || (I = [I]); + const F = r.concat(S); + if (I.length === 0) + return F.error("Expected at least one branch label."); + for (const Z of I) { + if (typeof Z != "number" && typeof Z != "string") + return F.error( + "Branch labels must be numbers or strings." + ); + if ( + typeof Z == "number" && + Math.abs(Z) > Number.MAX_SAFE_INTEGER + ) + return F.error( + `Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.` + ); + if (typeof Z == "number" && Math.floor(Z) !== Z) + return F.error( + "Numeric branch labels must be integer values." + ); + if (o) { + if (F.checkSubtype(o, Rr(Z))) return null; + } else o = Rr(Z); + if (f[String(Z)] !== void 0) + return F.error("Branch labels must be unique."); + f[String(Z)] = _.length; + } + const q = r.parse(L, S, c); + if (!q) return null; + (c = c || q.type), _.push(q); + } + const v = r.parse(t[1], 1, ur); + if (!v) return null; + const b = r.parse(t[t.length - 1], t.length - 1, c); + return b + ? v.type.kind !== "value" && + r.concat(1).checkSubtype(o, v.type) + ? null + : new Ti(o, c, v, f, _, b) + : null; + } + evaluate(t) { + const r = this.input.evaluate(t); + return ( + (Rr(r) === this.inputType && this.outputs[this.cases[r]]) || + 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 Qo { + constructor(t, r, o) { + (this.type = t), (this.branches = r), (this.otherwise = o); + } + static parse(t, r) { + if (t.length < 4) + return r.error( + `Expected at least 3 arguments, but found only ${ + t.length - 1 + }.` + ); + if (t.length % 2 != 0) + return r.error("Expected an odd number of arguments."); + let o; + r.expectedType && + r.expectedType.kind !== "value" && + (o = r.expectedType); + const c = []; + for (let _ = 1; _ < t.length - 1; _ += 2) { + const v = r.parse(t[_], _, Ft); + if (!v) return null; + const b = r.parse(t[_ + 1], _ + 1, o); + if (!b) return null; + c.push([v, b]), (o = o || b.type); + } + const f = r.parse(t[t.length - 1], t.length - 1, o); + if (!f) return null; + if (!o) throw new Error("Can't infer output type"); + return new Qo(o, c, f); + } + evaluate(t) { + for (const [r, o] of this.branches) + if (r.evaluate(t)) return o.evaluate(t); + return this.otherwise.evaluate(t); + } + eachChild(t) { + for (const [r, o] of this.branches) t(r), t(o); + t(this.otherwise); + } + outputDefined() { + return ( + this.branches.every(([t, r]) => r.outputDefined()) && + this.otherwise.outputDefined() + ); + } + } + class ks { + constructor(t, r, o, c) { + (this.type = t), + (this.input = r), + (this.beginIndex = o), + (this.endIndex = c); + } + static parse(t, r) { + if (t.length <= 2 || t.length >= 5) + return r.error( + `Expected 3 or 4 arguments, but found ${ + t.length - 1 + } instead.` + ); + const o = r.parse(t[1], 1, ur), + c = r.parse(t[2], 2, He); + if (!o || !c) return null; + if (!Xi(o.type, [tn(ur), At, ur])) + return r.error( + `Expected first argument to be of type array or string, but found ${en( + o.type + )} instead` + ); + if (t.length === 4) { + const f = r.parse(t[3], 3, He); + return f ? new ks(o.type, o, c, f) : null; + } + return new ks(o.type, o, c); + } + evaluate(t) { + const r = this.input.evaluate(t), + o = this.beginIndex.evaluate(t); + let c; + if ( + (this.endIndex && (c = this.endIndex.evaluate(t)), + Zn(r, ["string"])) + ) + return [...r].slice(o, c).join(""); + if (Zn(r, ["array"])) return r.slice(o, c); + throw new on( + `Expected first argument to be of type array or string, but found ${en( + Rr(r) + )} instead.` + ); + } + eachChild(t) { + t(this.input), + t(this.beginIndex), + this.endIndex && t(this.endIndex); + } + outputDefined() { + return !1; + } + } + function Mo(n, t) { + const r = n.length - 1; + let o, + c, + f = 0, + _ = r, + v = 0; + for (; f <= _; ) + if ( + ((v = Math.floor((f + _) / 2)), + (o = n[v]), + (c = n[v + 1]), + o <= t) + ) { + if (v === r || t < c) return v; + f = v + 1; + } else { + if (!(o > t)) throw new on("Input is not a number."); + _ = v - 1; + } + return 0; + } + class ei { + constructor(t, r, o) { + (this.type = t), + (this.input = r), + (this.labels = []), + (this.outputs = []); + for (const [c, f] of o) + this.labels.push(c), this.outputs.push(f); + } + static parse(t, r) { + if (t.length - 1 < 4) + return r.error( + `Expected at least 4 arguments, but found only ${ + t.length - 1 + }.` + ); + if ((t.length - 1) % 2 != 0) + return r.error("Expected an even number of arguments."); + const o = r.parse(t[1], 1, He); + if (!o) return null; + const c = []; + let f = null; + r.expectedType && + r.expectedType.kind !== "value" && + (f = r.expectedType); + for (let _ = 1; _ < t.length; _ += 2) { + const v = _ === 1 ? -1 / 0 : t[_], + b = t[_ + 1], + S = _, + I = _ + 1; + if (typeof v != "number") + return r.error( + 'Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.', + S + ); + if (c.length && c[c.length - 1][0] >= v) + return r.error( + 'Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.', + S + ); + const L = r.parse(b, I, f); + if (!L) return null; + (f = f || L.type), c.push([v, L]); + } + return new ei(f, o, c); + } + evaluate(t) { + const r = this.labels, + o = this.outputs; + if (r.length === 1) return o[0].evaluate(t); + const c = this.input.evaluate(t); + if (c <= r[0]) return o[0].evaluate(t); + const f = r.length; + return c >= r[f - 1] + ? o[f - 1].evaluate(t) + : o[Mo(r, c)].evaluate(t); + } + eachChild(t) { + t(this.input); + for (const r of this.outputs) t(r); + } + outputDefined() { + return this.outputs.every((t) => t.outputDefined()); + } + } + function Fh(n) { + return n && + n.__esModule && + Object.prototype.hasOwnProperty.call(n, "default") + ? n.default + : n; + } + var As, + Ec, + bp = (function () { + if (Ec) return As; + function n(t, r, o, c) { + (this.cx = 3 * t), + (this.bx = 3 * (o - t) - this.cx), + (this.ax = 1 - this.cx - this.bx), + (this.cy = 3 * r), + (this.by = 3 * (c - r) - this.cy), + (this.ay = 1 - this.cy - this.by), + (this.p1x = t), + (this.p1y = r), + (this.p2x = o), + (this.p2y = c); + } + return ( + (Ec = 1), + (As = n), + (n.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, r) { + if ((r === void 0 && (r = 1e-6), t < 0)) return 0; + if (t > 1) return 1; + for (var o = t, c = 0; c < 8; c++) { + var f = this.sampleCurveX(o) - t; + if (Math.abs(f) < r) return o; + var _ = this.sampleCurveDerivativeX(o); + if (Math.abs(_) < 1e-6) break; + o -= f / _; + } + var v = 0, + b = 1; + for ( + o = t, c = 0; + c < 20 && + ((f = this.sampleCurveX(o)), !(Math.abs(f - t) < r)); + c++ + ) + t > f ? (v = o) : (b = o), (o = 0.5 * (b - v) + v); + return o; + }, + solve: function (t, r) { + return this.sampleCurveY(this.solveCurveX(t, r)); + }, + }), + As + ); + })(), + es = Fh(bp); + class Di { + constructor(t, r, o, c, f) { + (this.type = t), + (this.operator = r), + (this.interpolation = o), + (this.input = c), + (this.labels = []), + (this.outputs = []); + for (const [_, v] of f) + this.labels.push(_), this.outputs.push(v); + } + static interpolationFactor(t, r, o, c) { + let f = 0; + if (t.name === "exponential") f = Es(r, t.base, o, c); + else if (t.name === "linear") f = Es(r, 1, o, c); + else if (t.name === "cubic-bezier") { + const _ = t.controlPoints; + f = new es(_[0], _[1], _[2], _[3]).solve(Es(r, 1, o, c)); + } + return f; + } + static parse(t, r) { + let [o, c, f, ..._] = t; + if (!Array.isArray(c) || c.length === 0) + return r.error( + "Expected an interpolation type expression.", + 1 + ); + if (c[0] === "linear") c = { name: "linear" }; + else if (c[0] === "exponential") { + const S = c[1]; + if (typeof S != "number") + return r.error( + "Exponential interpolation requires a numeric base.", + 1, + 1 + ); + c = { name: "exponential", base: S }; + } else { + if (c[0] !== "cubic-bezier") + return r.error( + `Unknown interpolation type ${String(c[0])}`, + 1, + 0 + ); + { + const S = c.slice(1); + if ( + S.length !== 4 || + S.some((I) => typeof I != "number" || I < 0 || I > 1) + ) + return r.error( + "Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.", + 1 + ); + c = { name: "cubic-bezier", controlPoints: S }; + } + } + if (t.length - 1 < 4) + return r.error( + `Expected at least 4 arguments, but found only ${ + t.length - 1 + }.` + ); + if ((t.length - 1) % 2 != 0) + return r.error("Expected an even number of arguments."); + if (((f = r.parse(f, 2, He)), !f)) return null; + const v = []; + let b = null; + (o !== "interpolate-hcl" && o !== "interpolate-lab") || + r.expectedType == ln + ? r.expectedType && + r.expectedType.kind !== "value" && + (b = r.expectedType) + : (b = Jt); + for (let S = 0; S < _.length; S += 2) { + const I = _[S], + L = _[S + 1], + F = S + 3, + q = S + 4; + if (typeof I != "number") + return r.error( + 'Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.', + F + ); + if (v.length && v[v.length - 1][0] >= I) + return r.error( + 'Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.', + F + ); + const Z = r.parse(L, q, b); + if (!Z) return null; + (b = b || Z.type), v.push([I, Z]); + } + return ni(b, He) || + ni(b, Cr) || + ni(b, Jt) || + ni(b, gn) || + ni(b, En) || + ni(b, ln) || + ni(b, In) || + ni(b, tn(He)) + ? new Di(b, o, c, f, v) + : r.error(`Type ${en(b)} is not interpolatable.`); + } + evaluate(t) { + const r = this.labels, + o = this.outputs; + if (r.length === 1) return o[0].evaluate(t); + const c = this.input.evaluate(t); + if (c <= r[0]) return o[0].evaluate(t); + const f = r.length; + if (c >= r[f - 1]) return o[f - 1].evaluate(t); + const _ = Mo(r, c), + v = Di.interpolationFactor( + this.interpolation, + c, + r[_], + r[_ + 1] + ), + b = o[_].evaluate(t), + S = o[_ + 1].evaluate(t); + switch (this.operator) { + case "interpolate": + switch (this.type.kind) { + case "number": + return Cn(b, S, v); + case "color": + return Mr.interpolate(b, S, v); + case "padding": + return kn.interpolate(b, S, v); + case "colorArray": + return fn.interpolate(b, S, v); + case "numberArray": + return vn.interpolate(b, S, v); + case "variableAnchorOffsetCollection": + return fi.interpolate(b, S, v); + case "array": + return Gn(b, S, v); + case "projectionDefinition": + return jn.interpolate(b, S, v); + } + case "interpolate-hcl": + switch (this.type.kind) { + case "color": + return Mr.interpolate(b, S, v, "hcl"); + case "colorArray": + return fn.interpolate(b, S, v, "hcl"); + } + case "interpolate-lab": + switch (this.type.kind) { + case "color": + return Mr.interpolate(b, S, v, "lab"); + case "colorArray": + return fn.interpolate(b, S, v, "lab"); + } + } + } + eachChild(t) { + t(this.input); + for (const r of this.outputs) t(r); + } + outputDefined() { + return this.outputs.every((t) => t.outputDefined()); + } + } + function Es(n, t, r, o) { + const c = o - r, + f = n - r; + return c === 0 + ? 0 + : t === 1 + ? f / c + : (Math.pow(t, f) - 1) / (Math.pow(t, c) - 1); + } + const Za = { + color: Mr.interpolate, + number: Cn, + padding: kn.interpolate, + numberArray: vn.interpolate, + colorArray: fn.interpolate, + variableAnchorOffsetCollection: fi.interpolate, + array: Gn, + }; + class zs { + constructor(t, r) { + (this.type = t), (this.args = r); + } + static parse(t, r) { + if (t.length < 2) + return r.error("Expected at least one argument."); + let o = null; + const c = r.expectedType; + c && c.kind !== "value" && (o = c); + const f = []; + for (const v of t.slice(1)) { + const b = r.parse(v, 1 + f.length, o, void 0, { + typeAnnotation: "omit", + }); + if (!b) return null; + (o = o || b.type), f.push(b); + } + if (!o) throw new Error("No output type"); + const _ = c && f.some((v) => pi(c, v.type)); + return new zs(_ ? ur : o, f); + } + evaluate(t) { + let r, + o = null, + c = 0; + for (const f of this.args) + if ( + (c++, + (o = f.evaluate(t)), + o && + o instanceof Hn && + !o.available && + (r || (r = o.name), + (o = null), + c === this.args.length && (o = r)), + o !== null) + ) + break; + return o; + } + eachChild(t) { + this.args.forEach(t); + } + outputDefined() { + return this.args.every((t) => t.outputDefined()); + } + } + function Ls(n, t) { + return n === "==" || n === "!=" + ? 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 Ds(n, t, r, o) { + return o.compare(t, r) === 0; + } + function ji(n, t, r) { + const o = n !== "==" && n !== "!="; + return class r0 { + constructor(f, _, v) { + (this.type = Ft), + (this.lhs = f), + (this.rhs = _), + (this.collator = v), + (this.hasUntypedArgument = + f.type.kind === "value" || _.type.kind === "value"); + } + static parse(f, _) { + if (f.length !== 3 && f.length !== 4) + return _.error("Expected two or three arguments."); + const v = f[0]; + let b = _.parse(f[1], 1, ur); + if (!b) return null; + if (!Ls(v, b.type)) + return _.concat(1).error( + `"${v}" comparisons are not supported for type '${en( + b.type + )}'.` + ); + let S = _.parse(f[2], 2, ur); + if (!S) return null; + if (!Ls(v, S.type)) + return _.concat(2).error( + `"${v}" comparisons are not supported for type '${en( + S.type + )}'.` + ); + if ( + b.type.kind !== S.type.kind && + b.type.kind !== "value" && + S.type.kind !== "value" + ) + return _.error( + `Cannot compare types '${en(b.type)}' and '${en( + S.type + )}'.` + ); + o && + (b.type.kind === "value" && S.type.kind !== "value" + ? (b = new Li(S.type, [b])) + : b.type.kind !== "value" && + S.type.kind === "value" && + (S = new Li(b.type, [S]))); + let I = null; + if (f.length === 4) { + if ( + b.type.kind !== "string" && + S.type.kind !== "string" && + b.type.kind !== "value" && + S.type.kind !== "value" + ) + return _.error( + "Cannot use collator to compare non-string types." + ); + if (((I = _.parse(f[3], 3, rn)), !I)) return null; + } + return new r0(b, S, I); + } + evaluate(f) { + const _ = this.lhs.evaluate(f), + v = this.rhs.evaluate(f); + if (o && this.hasUntypedArgument) { + const b = Rr(_), + S = Rr(v); + if ( + b.kind !== S.kind || + (b.kind !== "string" && b.kind !== "number") + ) + throw new on( + `Expected arguments for "${n}" to be (string, string) or (number, number), but found (${b.kind}, ${S.kind}) instead.` + ); + } + if (this.collator && !o && this.hasUntypedArgument) { + const b = Rr(_), + S = Rr(v); + if (b.kind !== "string" || S.kind !== "string") + return t(f, _, v); + } + return this.collator + ? r(f, _, v, this.collator.evaluate(f)) + : t(f, _, v); + } + eachChild(f) { + f(this.lhs), f(this.rhs), this.collator && f(this.collator); + } + outputDefined() { + return !0; + } + }; + } + const Oh = ji( + "==", + function (n, t, r) { + return t === r; + }, + Ds + ), + yl = ji( + "!=", + function (n, t, r) { + return t !== r; + }, + function (n, t, r, o) { + return !Ds(0, t, r, o); + } + ), + wp = ji( + "<", + function (n, t, r) { + return t < r; + }, + function (n, t, r, o) { + return o.compare(t, r) < 0; + } + ), + zc = ji( + ">", + function (n, t, r) { + return t > r; + }, + function (n, t, r, o) { + return o.compare(t, r) > 0; + } + ), + Tp = ji( + "<=", + function (n, t, r) { + return t <= r; + }, + function (n, t, r, o) { + return o.compare(t, r) <= 0; + } + ), + Cp = ji( + ">=", + function (n, t, r) { + return t >= r; + }, + function (n, t, r, o) { + return o.compare(t, r) >= 0; + } + ); + class xl { + constructor(t, r, o) { + (this.type = rn), + (this.locale = o), + (this.caseSensitive = t), + (this.diacriticSensitive = r); + } + static parse(t, r) { + if (t.length !== 2) return r.error("Expected one argument."); + const o = t[1]; + if (typeof o != "object" || Array.isArray(o)) + return r.error( + "Collator options argument must be an object." + ); + const c = r.parse( + o["case-sensitive"] !== void 0 && o["case-sensitive"], + 1, + Ft + ); + if (!c) return null; + const f = r.parse( + o["diacritic-sensitive"] !== void 0 && + o["diacritic-sensitive"], + 1, + Ft + ); + if (!f) return null; + let _ = null; + return o.locale && ((_ = r.parse(o.locale, 1, At)), !_) + ? null + : new xl(c, f, _); + } + evaluate(t) { + return new Mn( + 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 Lc { + constructor(t, r, o, c, f) { + (this.type = At), + (this.number = t), + (this.locale = r), + (this.currency = o), + (this.minFractionDigits = c), + (this.maxFractionDigits = f); + } + static parse(t, r) { + if (t.length !== 3) return r.error("Expected two arguments."); + const o = r.parse(t[1], 1, He); + if (!o) return null; + const c = t[2]; + if (typeof c != "object" || Array.isArray(c)) + return r.error( + "NumberFormat options argument must be an object." + ); + let f = null; + if (c.locale && ((f = r.parse(c.locale, 1, At)), !f)) + return null; + let _ = null; + if (c.currency && ((_ = r.parse(c.currency, 1, At)), !_)) + return null; + let v = null; + if ( + c["min-fraction-digits"] && + ((v = r.parse(c["min-fraction-digits"], 1, He)), !v) + ) + return null; + let b = null; + return c["max-fraction-digits"] && + ((b = r.parse(c["max-fraction-digits"], 1, He)), !b) + ? null + : new Lc(o, f, _, v, b); + } + evaluate(t) { + return new Intl.NumberFormat( + this.locale ? this.locale.evaluate(t) : [], + { + style: this.currency ? "currency" : "decimal", + currency: this.currency + ? this.currency.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.minFractionDigits && t(this.minFractionDigits), + this.maxFractionDigits && t(this.maxFractionDigits); + } + outputDefined() { + return !1; + } + } + class ko { + constructor(t) { + (this.type = pn), (this.sections = t); + } + static parse(t, r) { + if (t.length < 2) + return r.error("Expected at least one argument."); + const o = t[1]; + if (!Array.isArray(o) && typeof o == "object") + return r.error( + "First argument must be an image or text section." + ); + const c = []; + let f = !1; + for (let _ = 1; _ <= t.length - 1; ++_) { + const v = t[_]; + if (f && typeof v == "object" && !Array.isArray(v)) { + f = !1; + let b = null; + if ( + v["font-scale"] && + ((b = r.parse(v["font-scale"], 1, He)), !b) + ) + return null; + let S = null; + if ( + v["text-font"] && + ((S = r.parse(v["text-font"], 1, tn(At))), !S) + ) + return null; + let I = null; + if ( + v["text-color"] && + ((I = r.parse(v["text-color"], 1, Jt)), !I) + ) + return null; + let L = null; + if (v["vertical-align"]) { + if ( + typeof v["vertical-align"] == "string" && + !bn.includes(v["vertical-align"]) + ) + return r.error( + `'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${v["vertical-align"]}' instead.` + ); + if (((L = r.parse(v["vertical-align"], 1, At)), !L)) + return null; + } + const F = c[c.length - 1]; + (F.scale = b), + (F.font = S), + (F.textColor = I), + (F.verticalAlign = L); + } else { + const b = r.parse(t[_], 1, ur); + if (!b) return null; + const S = b.type.kind; + if ( + S !== "string" && + S !== "value" && + S !== "null" && + S !== "resolvedImage" + ) + return r.error( + "Formatted text type must be 'string', 'value', 'image' or 'null'." + ); + (f = !0), + c.push({ + content: b, + scale: null, + font: null, + textColor: null, + verticalAlign: null, + }); + } + } + return new ko(c); + } + evaluate(t) { + return new Sn( + this.sections.map((r) => { + const o = r.content.evaluate(t); + return Rr(o) === pr + ? new cn( + "", + o, + null, + null, + null, + r.verticalAlign ? r.verticalAlign.evaluate(t) : null + ) + : new cn( + Gr(o), + null, + r.scale ? r.scale.evaluate(t) : null, + r.font ? r.font.evaluate(t).join(",") : null, + r.textColor ? r.textColor.evaluate(t) : null, + r.verticalAlign ? r.verticalAlign.evaluate(t) : null + ); + }) + ); + } + eachChild(t) { + for (const r of this.sections) + t(r.content), + r.scale && t(r.scale), + r.font && t(r.font), + r.textColor && t(r.textColor), + r.verticalAlign && t(r.verticalAlign); + } + outputDefined() { + return !1; + } + } + class Dc { + constructor(t) { + (this.type = pr), (this.input = t); + } + static parse(t, r) { + if (t.length !== 2) return r.error("Expected two arguments."); + const o = r.parse(t[1], 1, At); + return o ? new Dc(o) : r.error("No image name provided."); + } + evaluate(t) { + const r = this.input.evaluate(t), + o = Hn.fromString(r); + return ( + o && + t.availableImages && + (o.available = t.availableImages.indexOf(r) > -1), + o + ); + } + eachChild(t) { + t(this.input); + } + outputDefined() { + return !1; + } + } + class bl { + constructor(t) { + (this.type = He), (this.input = t); + } + static parse(t, r) { + if (t.length !== 2) + return r.error( + `Expected 1 argument, but found ${t.length - 1} instead.` + ); + const o = r.parse(t[1], 1); + return o + ? o.type.kind !== "array" && + o.type.kind !== "string" && + o.type.kind !== "value" + ? r.error( + `Expected argument of type string or array, but found ${en( + o.type + )} instead.` + ) + : new bl(o) + : null; + } + evaluate(t) { + const r = this.input.evaluate(t); + if (typeof r == "string") return [...r].length; + if (Array.isArray(r)) return r.length; + throw new on( + `Expected value to be of type string or array, but found ${en( + Rr(r) + )} instead.` + ); + } + eachChild(t) { + t(this.input); + } + outputDefined() { + return !1; + } + } + const Pa = 8192; + function Sp(n, t) { + const r = (180 + n[0]) / 360, + o = + (180 - + (180 / Math.PI) * + Math.log( + Math.tan(Math.PI / 4 + (n[1] * Math.PI) / 360) + )) / + 360, + c = Math.pow(2, t.z); + return [Math.round(r * c * Pa), Math.round(o * c * Pa)]; + } + function wl(n, t) { + const r = Math.pow(2, t.z); + return [ + ((c = (n[0] / Pa + t.x) / r), 360 * c - 180), + ((o = (n[1] / Pa + t.y) / r), + (360 / Math.PI) * + Math.atan(Math.exp(((180 - 360 * o) * Math.PI) / 180)) - + 90), + ]; + var o, c; + } + function Rs(n, t) { + (n[0] = Math.min(n[0], t[0])), + (n[1] = Math.min(n[1], t[1])), + (n[2] = Math.max(n[2], t[0])), + (n[3] = Math.max(n[3], t[1])); + } + function Bs(n, t) { + return !( + n[0] <= t[0] || + n[2] >= t[2] || + n[1] <= t[1] || + n[3] >= t[3] + ); + } + function Pp(n, t, r) { + const o = n[0] - t[0], + c = n[1] - t[1], + f = n[0] - r[0], + _ = n[1] - r[1]; + return o * _ - f * c == 0 && o * f <= 0 && c * _ <= 0; + } + function Tl(n, t, r, o) { + return ( + (c = [o[0] - r[0], o[1] - r[1]])[0] * + (f = [t[0] - n[0], t[1] - n[1]])[1] - + c[1] * f[0] != + 0 && !(!jh(n, t, r, o) || !jh(r, o, n, t)) + ); + var c, f; + } + function Ip(n, t, r) { + for (const o of r) + for (let c = 0; c < o.length - 1; ++c) + if (Tl(n, t, o[c], o[c + 1])) return !0; + return !1; + } + function Ao(n, t, r = !1) { + let o = !1; + for (const v of t) + for (let b = 0; b < v.length - 1; b++) { + if (Pp(n, v[b], v[b + 1])) return r; + (f = v[b])[1] > (c = n)[1] != (_ = v[b + 1])[1] > c[1] && + c[0] < + ((_[0] - f[0]) * (c[1] - f[1])) / (_[1] - f[1]) + f[0] && + (o = !o); + } + var c, f, _; + return o; + } + function Nh(n, t) { + for (const r of t) if (Ao(n, r)) return !0; + return !1; + } + function Rc(n, t) { + for (const r of n) if (!Ao(r, t)) return !1; + for (let r = 0; r < n.length - 1; ++r) + if (Ip(n[r], n[r + 1], t)) return !1; + return !0; + } + function Mp(n, t) { + for (const r of t) if (Rc(n, r)) return !0; + return !1; + } + function jh(n, t, r, o) { + const c = o[0] - r[0], + f = o[1] - r[1], + _ = (n[0] - r[0]) * f - c * (n[1] - r[1]), + v = (t[0] - r[0]) * f - c * (t[1] - r[1]); + return (_ > 0 && v < 0) || (_ < 0 && v > 0); + } + function Bc(n, t, r) { + const o = []; + for (let c = 0; c < n.length; c++) { + const f = []; + for (let _ = 0; _ < n[c].length; _++) { + const v = Sp(n[c][_], r); + Rs(t, v), f.push(v); + } + o.push(f); + } + return o; + } + function Vh(n, t, r) { + const o = []; + for (let c = 0; c < n.length; c++) { + const f = Bc(n[c], t, r); + o.push(f); + } + return o; + } + function Cl(n, t, r, o) { + if (n[0] < r[0] || n[0] > r[2]) { + const c = 0.5 * o; + let f = n[0] - r[0] > c ? -o : r[0] - n[0] > c ? o : 0; + f === 0 && (f = n[0] - r[2] > c ? -o : r[2] - n[0] > c ? o : 0), + (n[0] += f); + } + Rs(t, n); + } + function qh(n, t, r, o) { + const c = Math.pow(2, o.z) * Pa, + f = [o.x * Pa, o.y * Pa], + _ = []; + for (const v of n) + for (const b of v) { + const S = [b.x + f[0], b.y + f[1]]; + Cl(S, t, r, c), _.push(S); + } + return _; + } + function Zh(n, t, r, o) { + const c = Math.pow(2, o.z) * Pa, + f = [o.x * Pa, o.y * Pa], + _ = []; + for (const b of n) { + const S = []; + for (const I of b) { + const L = [I.x + f[0], I.y + f[1]]; + Rs(t, L), S.push(L); + } + _.push(S); + } + if (t[2] - t[0] <= c / 2) { + ((v = t)[0] = v[1] = 1 / 0), (v[2] = v[3] = -1 / 0); + for (const b of _) for (const S of b) Cl(S, t, r, c); + } + var v; + return _; + } + class Eo { + constructor(t, r) { + (this.type = Ft), (this.geojson = t), (this.geometries = r); + } + static parse(t, r) { + if (t.length !== 2) + return r.error( + `'within' expression requires exactly one argument, but found ${ + t.length - 1 + } instead.` + ); + if (qa(t[1])) { + const o = t[1]; + if (o.type === "FeatureCollection") { + const c = []; + for (const f of o.features) { + const { type: _, coordinates: v } = f.geometry; + _ === "Polygon" && c.push(v), + _ === "MultiPolygon" && c.push(...v); + } + if (c.length) + return new Eo(o, { + type: "MultiPolygon", + coordinates: c, + }); + } else if (o.type === "Feature") { + const c = o.geometry.type; + if (c === "Polygon" || c === "MultiPolygon") + return new Eo(o, o.geometry); + } else if (o.type === "Polygon" || o.type === "MultiPolygon") + return new Eo(o, o); + } + return r.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 (r, o) { + const c = [1 / 0, 1 / 0, -1 / 0, -1 / 0], + f = [1 / 0, 1 / 0, -1 / 0, -1 / 0], + _ = r.canonicalID(); + if (o.type === "Polygon") { + const v = Bc(o.coordinates, f, _), + b = qh(r.geometry(), c, f, _); + if (!Bs(c, f)) return !1; + for (const S of b) if (!Ao(S, v)) return !1; + } + if (o.type === "MultiPolygon") { + const v = Vh(o.coordinates, f, _), + b = qh(r.geometry(), c, f, _); + if (!Bs(c, f)) return !1; + for (const S of b) if (!Nh(S, v)) return !1; + } + return !0; + })(t, this.geometries); + if (t.geometryType() === "LineString") + return (function (r, o) { + const c = [1 / 0, 1 / 0, -1 / 0, -1 / 0], + f = [1 / 0, 1 / 0, -1 / 0, -1 / 0], + _ = r.canonicalID(); + if (o.type === "Polygon") { + const v = Bc(o.coordinates, f, _), + b = Zh(r.geometry(), c, f, _); + if (!Bs(c, f)) return !1; + for (const S of b) if (!Rc(S, v)) return !1; + } + if (o.type === "MultiPolygon") { + const v = Vh(o.coordinates, f, _), + b = Zh(r.geometry(), c, f, _); + if (!Bs(c, f)) return !1; + for (const S of b) if (!Mp(S, v)) return !1; + } + return !0; + })(t, this.geometries); + } + return !1; + } + eachChild() {} + outputDefined() { + return !0; + } + } + let Fc = class { + constructor(n = [], t = (r, o) => (r < o ? -1 : r > o ? 1 : 0)) { + if ( + ((this.data = n), + (this.length = this.data.length), + (this.compare = t), + this.length > 0) + ) + for (let r = (this.length >> 1) - 1; r >= 0; r--) + this._down(r); + } + push(n) { + this.data.push(n), this._up(this.length++); + } + pop() { + if (this.length === 0) return; + const n = this.data[0], + t = this.data.pop(); + return ( + --this.length > 0 && ((this.data[0] = t), this._down(0)), n + ); + } + peek() { + return this.data[0]; + } + _up(n) { + const { data: t, compare: r } = this, + o = t[n]; + for (; n > 0; ) { + const c = (n - 1) >> 1, + f = t[c]; + if (r(o, f) >= 0) break; + (t[n] = f), (n = c); + } + t[n] = o; + } + _down(n) { + const { data: t, compare: r } = this, + o = this.length >> 1, + c = t[n]; + for (; n < o; ) { + let f = 1 + (n << 1); + const _ = f + 1; + if ( + (_ < this.length && r(t[_], t[f]) < 0 && (f = _), + r(t[f], c) >= 0) + ) + break; + (t[n] = t[f]), (n = f); + } + t[n] = c; + } + }; + function Oc(n, t, r = 0, o = n.length - 1, c = kp) { + for (; o > r; ) { + if (o - r > 600) { + const b = o - r + 1, + S = t - r + 1, + I = Math.log(b), + L = 0.5 * Math.exp((2 * I) / 3), + F = + 0.5 * + Math.sqrt((I * L * (b - L)) / b) * + (S - b / 2 < 0 ? -1 : 1); + Oc( + n, + t, + Math.max(r, Math.floor(t - (S * L) / b + F)), + Math.min(o, Math.floor(t + ((b - S) * L) / b + F)), + c + ); + } + const f = n[t]; + let _ = r, + v = o; + for (Fs(n, r, t), c(n[o], f) > 0 && Fs(n, r, o); _ < v; ) { + for (Fs(n, _, v), _++, v--; c(n[_], f) < 0; ) _++; + for (; c(n[v], f) > 0; ) v--; + } + c(n[r], f) === 0 ? Fs(n, r, v) : (v++, Fs(n, v, o)), + v <= t && (r = v + 1), + t <= v && (o = v - 1); + } + } + function Fs(n, t, r) { + const o = n[t]; + (n[t] = n[r]), (n[r] = o); + } + function kp(n, t) { + return n < t ? -1 : n > t ? 1 : 0; + } + function Os(n, t) { + if (n.length <= 1) return [n]; + const r = []; + let o, c; + for (const f of n) { + const _ = Ap(f); + _ !== 0 && + ((f.area = Math.abs(_)), + c === void 0 && (c = _ < 0), + c === _ < 0 ? (o && r.push(o), (o = [f])) : o.push(f)); + } + if ((o && r.push(o), t > 1)) + for (let f = 0; f < r.length; f++) + r[f].length <= t || + (Oc(r[f], t, 1, r[f].length - 1, Uh), + (r[f] = r[f].slice(0, t))); + return r; + } + function Uh(n, t) { + return t.area - n.area; + } + function Ap(n) { + let t = 0; + for (let r, o, c = 0, f = n.length, _ = f - 1; c < f; _ = c++) + (r = n[c]), (o = n[_]), (t += (o.x - r.x) * (r.y + o.y)); + return t; + } + const $h = 1 / 298.257223563, + Gh = $h * (2 - $h), + Nc = Math.PI / 180; + class jc { + constructor(t) { + const r = 6378.137 * Nc * 1e3, + o = Math.cos(t * Nc), + c = 1 / (1 - Gh * (1 - o * o)), + f = Math.sqrt(c); + (this.kx = r * f * o), (this.ky = r * f * c * (1 - Gh)); + } + distance(t, r) { + const o = this.wrap(t[0] - r[0]) * this.kx, + c = (t[1] - r[1]) * this.ky; + return Math.sqrt(o * o + c * c); + } + pointOnLine(t, r) { + let o, + c, + f, + _, + v = 1 / 0; + for (let b = 0; b < t.length - 1; b++) { + let S = t[b][0], + I = t[b][1], + L = this.wrap(t[b + 1][0] - S) * this.kx, + F = (t[b + 1][1] - I) * this.ky, + q = 0; + (L === 0 && F === 0) || + ((q = + (this.wrap(r[0] - S) * this.kx * L + + (r[1] - I) * this.ky * F) / + (L * L + F * F)), + q > 1 + ? ((S = t[b + 1][0]), (I = t[b + 1][1])) + : q > 0 && + ((S += (L / this.kx) * q), (I += (F / this.ky) * q))), + (L = this.wrap(r[0] - S) * this.kx), + (F = (r[1] - I) * this.ky); + const Z = L * L + F * F; + Z < v && ((v = Z), (o = S), (c = I), (f = b), (_ = q)); + } + return { + point: [o, c], + index: f, + t: Math.max(0, Math.min(1, _)), + }; + } + wrap(t) { + for (; t < -180; ) t += 360; + for (; t > 180; ) t -= 360; + return t; + } + } + function Hh(n, t) { + return t[0] - n[0]; + } + function Sl(n) { + return n[1] - n[0] + 1; + } + function eo(n, t) { + return n[1] >= n[0] && n[1] < t; + } + function Pn(n, t) { + if (n[0] > n[1]) return [null, null]; + const r = Sl(n); + if (t) { + if (r === 2) return [n, null]; + const c = Math.floor(r / 2); + return [ + [n[0], n[0] + c], + [n[0] + c, n[1]], + ]; + } + if (r === 1) return [n, null]; + const o = Math.floor(r / 2) - 1; + return [ + [n[0], n[0] + o], + [n[0] + o + 1, n[1]], + ]; + } + function Vc(n, t) { + if (!eo(t, n.length)) return [1 / 0, 1 / 0, -1 / 0, -1 / 0]; + const r = [1 / 0, 1 / 0, -1 / 0, -1 / 0]; + for (let o = t[0]; o <= t[1]; ++o) Rs(r, n[o]); + return r; + } + function qc(n) { + const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0]; + for (const r of n) for (const o of r) Rs(t, o); + return t; + } + function Wh(n) { + return ( + n[0] !== -1 / 0 && + n[1] !== -1 / 0 && + n[2] !== 1 / 0 && + n[3] !== 1 / 0 + ); + } + function Zc(n, t, r) { + if (!Wh(n) || !Wh(t)) return NaN; + let o = 0, + c = 0; + return ( + n[2] < t[0] && (o = t[0] - n[2]), + n[0] > t[2] && (o = n[0] - t[2]), + n[1] > t[3] && (c = n[1] - t[3]), + n[3] < t[1] && (c = t[1] - n[3]), + r.distance([0, 0], [o, c]) + ); + } + function zo(n, t, r) { + const o = r.pointOnLine(t, n); + return r.distance(n, o.point); + } + function Uc(n, t, r, o, c) { + const f = Math.min(zo(n, [r, o], c), zo(t, [r, o], c)), + _ = Math.min(zo(r, [n, t], c), zo(o, [n, t], c)); + return Math.min(f, _); + } + function Ep(n, t, r, o, c) { + if (!eo(t, n.length) || !eo(o, r.length)) return 1 / 0; + let f = 1 / 0; + for (let _ = t[0]; _ < t[1]; ++_) { + const v = n[_], + b = n[_ + 1]; + for (let S = o[0]; S < o[1]; ++S) { + const I = r[S], + L = r[S + 1]; + if (Tl(v, b, I, L)) return 0; + f = Math.min(f, Uc(v, b, I, L, c)); + } + } + return f; + } + function zp(n, t, r, o, c) { + if (!eo(t, n.length) || !eo(o, r.length)) return NaN; + let f = 1 / 0; + for (let _ = t[0]; _ <= t[1]; ++_) + for (let v = o[0]; v <= o[1]; ++v) + if (((f = Math.min(f, c.distance(n[_], r[v]))), f === 0)) + return f; + return f; + } + function Lp(n, t, r) { + if (Ao(n, t, !0)) return 0; + let o = 1 / 0; + for (const c of t) { + const f = c[0], + _ = c[c.length - 1]; + if (f !== _ && ((o = Math.min(o, zo(n, [_, f], r))), o === 0)) + return o; + const v = r.pointOnLine(c, n); + if (((o = Math.min(o, r.distance(n, v.point))), o === 0)) + return o; + } + return o; + } + function Dp(n, t, r, o) { + if (!eo(t, n.length)) return NaN; + for (let f = t[0]; f <= t[1]; ++f) if (Ao(n[f], r, !0)) return 0; + let c = 1 / 0; + for (let f = t[0]; f < t[1]; ++f) { + const _ = n[f], + v = n[f + 1]; + for (const b of r) + for (let S = 0, I = b.length, L = I - 1; S < I; L = S++) { + const F = b[L], + q = b[S]; + if (Tl(_, v, F, q)) return 0; + c = Math.min(c, Uc(_, v, F, q, o)); + } + } + return c; + } + function Xh(n, t) { + for (const r of n) for (const o of r) if (Ao(o, t, !0)) return !0; + return !1; + } + function Rp(n, t, r, o = 1 / 0) { + const c = qc(n), + f = qc(t); + if (o !== 1 / 0 && Zc(c, f, r) >= o) return o; + if (Bs(c, f)) { + if (Xh(n, t)) return 0; + } else if (Xh(t, n)) return 0; + let _ = 1 / 0; + for (const v of n) + for (let b = 0, S = v.length, I = S - 1; b < S; I = b++) { + const L = v[I], + F = v[b]; + for (const q of t) + for (let Z = 0, W = q.length, J = W - 1; Z < W; J = Z++) { + const le = q[J], + Re = q[Z]; + if (Tl(L, F, le, Re)) return 0; + _ = Math.min(_, Uc(L, F, le, Re, r)); + } + } + return _; + } + function Yh(n, t, r, o, c, f) { + if (!f) return; + const _ = Zc(Vc(o, f), c, r); + _ < t && n.push([_, f, [0, 0]]); + } + function Pl(n, t, r, o, c, f, _) { + if (!f || !_) return; + const v = Zc(Vc(o, f), Vc(c, _), r); + v < t && n.push([v, f, _]); + } + function Il(n, t, r, o, c = 1 / 0) { + let f = Math.min(o.distance(n[0], r[0][0]), c); + if (f === 0) return f; + const _ = new Fc([[0, [0, n.length - 1], [0, 0]]], Hh), + v = qc(r); + for (; _.length > 0; ) { + const b = _.pop(); + if (b[0] >= f) continue; + const S = b[1], + I = t ? 50 : 100; + if (Sl(S) <= I) { + if (!eo(S, n.length)) return NaN; + if (t) { + const L = Dp(n, S, r, o); + if (isNaN(L) || L === 0) return L; + f = Math.min(f, L); + } else + for (let L = S[0]; L <= S[1]; ++L) { + const F = Lp(n[L], r, o); + if (((f = Math.min(f, F)), f === 0)) return 0; + } + } else { + const L = Pn(S, t); + Yh(_, f, o, n, v, L[0]), Yh(_, f, o, n, v, L[1]); + } + } + return f; + } + function Ml(n, t, r, o, c, f = 1 / 0) { + let _ = Math.min(f, c.distance(n[0], r[0])); + if (_ === 0) return _; + const v = new Fc([[0, [0, n.length - 1], [0, r.length - 1]]], Hh); + for (; v.length > 0; ) { + const b = v.pop(); + if (b[0] >= _) continue; + const S = b[1], + I = b[2], + L = t ? 50 : 100, + F = o ? 50 : 100; + if (Sl(S) <= L && Sl(I) <= F) { + if (!eo(S, n.length) && eo(I, r.length)) return NaN; + let q; + if (t && o) (q = Ep(n, S, r, I, c)), (_ = Math.min(_, q)); + else if (t && !o) { + const Z = n.slice(S[0], S[1] + 1); + for (let W = I[0]; W <= I[1]; ++W) + if (((q = zo(r[W], Z, c)), (_ = Math.min(_, q)), _ === 0)) + return _; + } else if (!t && o) { + const Z = r.slice(I[0], I[1] + 1); + for (let W = S[0]; W <= S[1]; ++W) + if (((q = zo(n[W], Z, c)), (_ = Math.min(_, q)), _ === 0)) + return _; + } else (q = zp(n, S, r, I, c)), (_ = Math.min(_, q)); + } else { + const q = Pn(S, t), + Z = Pn(I, o); + Pl(v, _, c, n, r, q[0], Z[0]), + Pl(v, _, c, n, r, q[0], Z[1]), + Pl(v, _, c, n, r, q[1], Z[0]), + Pl(v, _, c, n, r, q[1], Z[1]); + } + } + return _; + } + function $c(n) { + return n.type === "MultiPolygon" + ? n.coordinates.map((t) => ({ + type: "Polygon", + coordinates: t, + })) + : n.type === "MultiLineString" + ? n.coordinates.map((t) => ({ + type: "LineString", + coordinates: t, + })) + : n.type === "MultiPoint" + ? n.coordinates.map((t) => ({ type: "Point", coordinates: t })) + : [n]; + } + class Lo { + constructor(t, r) { + (this.type = He), (this.geojson = t), (this.geometries = r); + } + static parse(t, r) { + if (t.length !== 2) + return r.error( + `'distance' expression requires exactly one argument, but found ${ + t.length - 1 + } instead.` + ); + if (qa(t[1])) { + const o = t[1]; + if (o.type === "FeatureCollection") + return new Lo( + o, + o.features.map((c) => $c(c.geometry)).flat() + ); + if (o.type === "Feature") return new Lo(o, $c(o.geometry)); + if ("type" in o && "coordinates" in o) + return new Lo(o, $c(o)); + } + return r.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 (r, o) { + const c = r.geometry(), + f = c.flat().map((b) => wl([b.x, b.y], r.canonical)); + if (c.length === 0) return NaN; + const _ = new jc(f[0][1]); + let v = 1 / 0; + for (const b of o) { + switch (b.type) { + case "Point": + v = Math.min( + v, + Ml(f, !1, [b.coordinates], !1, _, v) + ); + break; + case "LineString": + v = Math.min(v, Ml(f, !1, b.coordinates, !0, _, v)); + break; + case "Polygon": + v = Math.min(v, Il(f, !1, b.coordinates, _, v)); + } + if (v === 0) return v; + } + return v; + })(t, this.geometries); + if (t.geometryType() === "LineString") + return (function (r, o) { + const c = r.geometry(), + f = c.flat().map((b) => wl([b.x, b.y], r.canonical)); + if (c.length === 0) return NaN; + const _ = new jc(f[0][1]); + let v = 1 / 0; + for (const b of o) { + switch (b.type) { + case "Point": + v = Math.min( + v, + Ml(f, !0, [b.coordinates], !1, _, v) + ); + break; + case "LineString": + v = Math.min(v, Ml(f, !0, b.coordinates, !0, _, v)); + break; + case "Polygon": + v = Math.min(v, Il(f, !0, b.coordinates, _, v)); + } + if (v === 0) return v; + } + return v; + })(t, this.geometries); + if (t.geometryType() === "Polygon") + return (function (r, o) { + const c = r.geometry(); + if (c.length === 0 || c[0].length === 0) return NaN; + const f = Os(c, 0).map((b) => + b.map((S) => + S.map((I) => wl([I.x, I.y], r.canonical)) + ) + ), + _ = new jc(f[0][0][0][1]); + let v = 1 / 0; + for (const b of o) + for (const S of f) { + switch (b.type) { + case "Point": + v = Math.min(v, Il([b.coordinates], !1, S, _, v)); + break; + case "LineString": + v = Math.min(v, Il(b.coordinates, !0, S, _, v)); + break; + case "Polygon": + v = Math.min(v, Rp(S, b.coordinates, _, v)); + } + if (v === 0) return v; + } + return v; + })(t, this.geometries); + } + return NaN; + } + eachChild() {} + outputDefined() { + return !0; + } + } + class Ns { + constructor(t) { + (this.type = ur), (this.key = t); + } + static parse(t, r) { + if (t.length !== 2) + return r.error( + `Expected 1 argument, but found ${t.length - 1} instead.` + ); + const o = t[1]; + return o == null + ? r.error("Global state property must be defined.") + : typeof o != "string" + ? r.error( + `Global state property must be string, but found ${typeof t[1]} instead.` + ) + : new Ns(o); + } + evaluate(t) { + var r; + const o = + (r = t.globals) === null || r === void 0 + ? void 0 + : r.globalState; + return o && Object.keys(o).length !== 0 + ? sr(o, this.key) + : null; + } + eachChild() {} + outputDefined() { + return !1; + } + } + const ts = { + "==": Oh, + "!=": yl, + ">": zc, + "<": wp, + ">=": Cp, + "<=": Tp, + array: Li, + at: gl, + boolean: Li, + case: Qo, + coalesce: zs, + collator: xl, + format: ko, + image: Dc, + in: vl, + "index-of": Sa, + interpolate: Di, + "interpolate-hcl": Di, + "interpolate-lab": Di, + length: bl, + let: Qa, + literal: _a, + match: Ti, + number: Li, + "number-format": Lc, + object: Li, + slice: ks, + step: ei, + string: Li, + "to-boolean": sa, + "to-color": sa, + "to-number": sa, + "to-string": sa, + var: Jo, + within: Eo, + distance: Lo, + "global-state": Ns, + }; + class va { + constructor(t, r, o, c) { + (this.name = t), + (this.type = r), + (this._evaluate = o), + (this.args = c); + } + evaluate(t) { + return this._evaluate(t, this.args); + } + eachChild(t) { + this.args.forEach(t); + } + outputDefined() { + return !1; + } + static parse(t, r) { + const o = t[0], + c = va.definitions[o]; + if (!c) + return r.error( + `Unknown expression "${o}". If you wanted a literal array, use ["literal", [...]].`, + 0 + ); + const f = Array.isArray(c) ? c[0] : c.type, + _ = Array.isArray(c) ? [[c[1], c[2]]] : c.overloads, + v = _.filter( + ([S]) => !Array.isArray(S) || S.length === t.length - 1 + ); + let b = null; + for (const [S, I] of v) { + b = new Ca(r.registry, kl, r.path, null, r.scope); + const L = []; + let F = !1; + for (let q = 1; q < t.length; q++) { + const Z = t[q], + W = Array.isArray(S) ? S[q - 1] : S.type, + J = b.parse(Z, 1 + L.length, W); + if (!J) { + F = !0; + break; + } + L.push(J); + } + if (!F) + if (Array.isArray(S) && S.length !== L.length) + b.error( + `Expected ${S.length} arguments, but found ${L.length} instead.` + ); + else { + for (let q = 0; q < L.length; q++) { + const Z = Array.isArray(S) ? S[q] : S.type, + W = L[q]; + b.concat(q + 1).checkSubtype(Z, W.type); + } + if (b.errors.length === 0) return new va(o, f, I, L); + } + } + if (v.length === 1) r.errors.push(...b.errors); + else { + const S = (v.length ? v : _) + .map(([L]) => { + return ( + (F = L), + Array.isArray(F) + ? `(${F.map(en).join(", ")})` + : `(${en(F.type)}...)` + ); + var F; + }) + .join(" | "), + I = []; + for (let L = 1; L < t.length; L++) { + const F = r.parse(t[L], 1 + I.length); + if (!F) return null; + I.push(en(F.type)); + } + r.error( + `Expected arguments of type ${S}, but found (${I.join( + ", " + )}) instead.` + ); + } + return null; + } + static register(t, r) { + va.definitions = r; + for (const o in r) t[o] = va; + } + } + function Kh(n, [t, r, o, c]) { + (t = t.evaluate(n)), (r = r.evaluate(n)), (o = o.evaluate(n)); + const f = c ? c.evaluate(n) : 1, + _ = zn(t, r, o, f); + if (_) throw new on(_); + return new Mr(t / 255, r / 255, o / 255, f, !1); + } + function Jh(n, t) { + return n in t; + } + function Gc(n, t) { + const r = t[n]; + return r === void 0 ? null : r; + } + function Do(n) { + return { type: n }; + } + function kl(n) { + if (n instanceof Jo) return kl(n.boundExpression); + if ( + (n instanceof va && n.name === "error") || + n instanceof xl || + n instanceof Eo || + n instanceof Lo || + n instanceof Ns + ) + return !1; + const t = n instanceof sa || n instanceof Li; + let r = !0; + return ( + n.eachChild((o) => { + r = t ? r && kl(o) : r && o instanceof _a; + }), + !!r && + Al(n) && + El(n, [ + "zoom", + "heatmap-density", + "elevation", + "line-progress", + "accumulated", + "is-supported-script", + ]) + ); + } + function Al(n) { + if ( + (n instanceof va && + ((n.name === "get" && n.args.length === 1) || + n.name === "feature-state" || + (n.name === "has" && n.args.length === 1) || + n.name === "properties" || + n.name === "geometry-type" || + n.name === "id" || + /^filter-/.test(n.name))) || + n instanceof Eo || + n instanceof Lo + ) + return !1; + let t = !0; + return ( + n.eachChild((r) => { + t && !Al(r) && (t = !1); + }), + t + ); + } + function js(n) { + if (n instanceof va && n.name === "feature-state") return !1; + let t = !0; + return ( + n.eachChild((r) => { + t && !js(r) && (t = !1); + }), + t + ); + } + function El(n, t) { + if (n instanceof va && t.indexOf(n.name) >= 0) return !1; + let r = !0; + return ( + n.eachChild((o) => { + r && !El(o, t) && (r = !1); + }), + r + ); + } + function Qh(n) { + return { result: "success", value: n }; + } + function rs(n) { + return { result: "error", value: n }; + } + function fo(n) { + return ( + n["property-type"] === "data-driven" || + n["property-type"] === "cross-faded-data-driven" + ); + } + function ed(n) { + return ( + !!n.expression && n.expression.parameters.indexOf("zoom") > -1 + ); + } + function Hc(n) { + return !!n.expression && n.expression.interpolated; + } + function sn(n) { + return n instanceof Number + ? "number" + : n instanceof String + ? "string" + : n instanceof Boolean + ? "boolean" + : Array.isArray(n) + ? "array" + : n === null + ? "null" + : typeof n; + } + function Vs(n) { + return ( + typeof n == "object" && + n !== null && + !Array.isArray(n) && + Rr(n) === Er + ); + } + function Bp(n) { + return n; + } + function td(n, t) { + const r = n.stops && typeof n.stops[0][0] == "object", + o = r || !(r || n.property !== void 0), + c = n.type || (Hc(t) ? "exponential" : "interval"), + f = (function (I) { + switch (I.type) { + case "color": + return Mr.parse; + case "padding": + return kn.parse; + case "numberArray": + return vn.parse; + case "colorArray": + return fn.parse; + default: + return null; + } + })(t); + if ( + (f && + ((n = Xr({}, n)).stops && + (n.stops = n.stops.map((I) => [I[0], f(I[1])])), + (n.default = f(n.default ? n.default : t.default))), + n.colorSpace && + (_ = n.colorSpace) !== "rgb" && + _ !== "hcl" && + _ !== "lab") + ) + throw new Error(`Unknown color space: "${n.colorSpace}"`); + var _; + const v = (function (I) { + switch (I) { + case "exponential": + return nd; + case "interval": + return Fp; + case "categorical": + return rd; + case "identity": + return Op; + default: + throw new Error(`Unknown function type "${I}"`); + } + })(c); + let b, S; + if (c === "categorical") { + b = Object.create(null); + for (const I of n.stops) b[I[0]] = I[1]; + S = typeof n.stops[0][0]; + } + if (r) { + const I = {}, + L = []; + for (let Z = 0; Z < n.stops.length; Z++) { + const W = n.stops[Z], + J = W[0].zoom; + I[J] === void 0 && + ((I[J] = { + zoom: J, + type: n.type, + property: n.property, + default: n.default, + stops: [], + }), + L.push(J)), + I[J].stops.push([W[0].value, W[1]]); + } + const F = []; + for (const Z of L) F.push([I[Z].zoom, td(I[Z], t)]); + const q = { name: "linear" }; + return { + kind: "composite", + interpolationType: q, + interpolationFactor: Di.interpolationFactor.bind(void 0, q), + zoomStops: F.map((Z) => Z[0]), + evaluate: ({ zoom: Z }, W) => + nd({ stops: F, base: n.base }, t, Z).evaluate(Z, W), + }; + } + if (o) { + const I = + c === "exponential" + ? { + name: "exponential", + base: n.base !== void 0 ? n.base : 1, + } + : null; + return { + kind: "camera", + interpolationType: I, + interpolationFactor: Di.interpolationFactor.bind(void 0, I), + zoomStops: n.stops.map((L) => L[0]), + evaluate: ({ zoom: L }) => v(n, t, L, b, S), + }; + } + return { + kind: "source", + evaluate(I, L) { + const F = + L && L.properties ? L.properties[n.property] : void 0; + return F === void 0 + ? mo(n.default, t.default) + : v(n, t, F, b, S); + }, + }; + } + function mo(n, t, r) { + return n !== void 0 + ? n + : t !== void 0 + ? t + : r !== void 0 + ? r + : void 0; + } + function rd(n, t, r, o, c) { + return mo(typeof r === c ? o[r] : void 0, n.default, t.default); + } + function Fp(n, t, r) { + if (sn(r) !== "number") return mo(n.default, t.default); + const o = n.stops.length; + if (o === 1 || r <= n.stops[0][0]) return n.stops[0][1]; + if (r >= n.stops[o - 1][0]) return n.stops[o - 1][1]; + const c = Mo( + n.stops.map((f) => f[0]), + r + ); + return n.stops[c][1]; + } + function nd(n, t, r) { + const o = n.base !== void 0 ? n.base : 1; + if (sn(r) !== "number") return mo(n.default, t.default); + const c = n.stops.length; + if (c === 1 || r <= n.stops[0][0]) return n.stops[0][1]; + if (r >= n.stops[c - 1][0]) return n.stops[c - 1][1]; + const f = Mo( + n.stops.map((I) => I[0]), + r + ), + _ = (function (I, L, F, q) { + const Z = q - F, + W = I - F; + return Z === 0 + ? 0 + : L === 1 + ? W / Z + : (Math.pow(L, W) - 1) / (Math.pow(L, Z) - 1); + })(r, o, n.stops[f][0], n.stops[f + 1][0]), + v = n.stops[f][1], + b = n.stops[f + 1][1], + S = Za[t.type] || Bp; + return typeof v.evaluate == "function" + ? { + evaluate(...I) { + const L = v.evaluate.apply(void 0, I), + F = b.evaluate.apply(void 0, I); + if (L !== void 0 && F !== void 0) + return S(L, F, _, n.colorSpace); + }, + } + : S(v, b, _, n.colorSpace); + } + function Op(n, t, r) { + switch (t.type) { + case "color": + r = Mr.parse(r); + break; + case "formatted": + r = Sn.fromString(r.toString()); + break; + case "resolvedImage": + r = Hn.fromString(r.toString()); + break; + case "padding": + r = kn.parse(r); + break; + case "colorArray": + r = fn.parse(r); + break; + case "numberArray": + r = vn.parse(r); + break; + default: + sn(r) === t.type || + (t.type === "enum" && t.values[r]) || + (r = void 0); + } + return mo(r, n.default, t.default); + } + va.register(ts, { + error: [ + { kind: "error" }, + [At], + (n, [t]) => { + throw new on(t.evaluate(n)); + }, + ], + typeof: [At, [ur], (n, [t]) => en(Rr(t.evaluate(n)))], + "to-rgba": [ + tn(He, 4), + [Jt], + (n, [t]) => { + const [r, o, c, f] = t.evaluate(n).rgb; + return [255 * r, 255 * o, 255 * c, f]; + }, + ], + rgb: [Jt, [He, He, He], Kh], + rgba: [Jt, [He, He, He, He], Kh], + has: { + type: Ft, + overloads: [ + [[At], (n, [t]) => Jh(t.evaluate(n), n.properties())], + [[At, Er], (n, [t, r]) => Jh(t.evaluate(n), r.evaluate(n))], + ], + }, + get: { + type: ur, + overloads: [ + [[At], (n, [t]) => Gc(t.evaluate(n), n.properties())], + [[At, Er], (n, [t, r]) => Gc(t.evaluate(n), r.evaluate(n))], + ], + }, + "feature-state": [ + ur, + [At], + (n, [t]) => Gc(t.evaluate(n), n.featureState || {}), + ], + properties: [Er, [], (n) => n.properties()], + "geometry-type": [At, [], (n) => n.geometryType()], + id: [ur, [], (n) => n.id()], + zoom: [He, [], (n) => n.globals.zoom], + "heatmap-density": [He, [], (n) => n.globals.heatmapDensity || 0], + elevation: [He, [], (n) => n.globals.elevation || 0], + "line-progress": [He, [], (n) => n.globals.lineProgress || 0], + accumulated: [ + ur, + [], + (n) => + n.globals.accumulated === void 0 + ? null + : n.globals.accumulated, + ], + "+": [ + He, + Do(He), + (n, t) => { + let r = 0; + for (const o of t) r += o.evaluate(n); + return r; + }, + ], + "*": [ + He, + Do(He), + (n, t) => { + let r = 1; + for (const o of t) r *= o.evaluate(n); + return r; + }, + ], + "-": { + type: He, + overloads: [ + [[He, He], (n, [t, r]) => t.evaluate(n) - r.evaluate(n)], + [[He], (n, [t]) => -t.evaluate(n)], + ], + }, + "/": [He, [He, He], (n, [t, r]) => t.evaluate(n) / r.evaluate(n)], + "%": [He, [He, He], (n, [t, r]) => t.evaluate(n) % r.evaluate(n)], + ln2: [He, [], () => Math.LN2], + pi: [He, [], () => Math.PI], + e: [He, [], () => Math.E], + "^": [ + He, + [He, He], + (n, [t, r]) => Math.pow(t.evaluate(n), r.evaluate(n)), + ], + sqrt: [He, [He], (n, [t]) => Math.sqrt(t.evaluate(n))], + log10: [ + He, + [He], + (n, [t]) => Math.log(t.evaluate(n)) / Math.LN10, + ], + ln: [He, [He], (n, [t]) => Math.log(t.evaluate(n))], + log2: [He, [He], (n, [t]) => Math.log(t.evaluate(n)) / Math.LN2], + sin: [He, [He], (n, [t]) => Math.sin(t.evaluate(n))], + cos: [He, [He], (n, [t]) => Math.cos(t.evaluate(n))], + tan: [He, [He], (n, [t]) => Math.tan(t.evaluate(n))], + asin: [He, [He], (n, [t]) => Math.asin(t.evaluate(n))], + acos: [He, [He], (n, [t]) => Math.acos(t.evaluate(n))], + atan: [He, [He], (n, [t]) => Math.atan(t.evaluate(n))], + min: [ + He, + Do(He), + (n, t) => Math.min(...t.map((r) => r.evaluate(n))), + ], + max: [ + He, + Do(He), + (n, t) => Math.max(...t.map((r) => r.evaluate(n))), + ], + abs: [He, [He], (n, [t]) => Math.abs(t.evaluate(n))], + round: [ + He, + [He], + (n, [t]) => { + const r = t.evaluate(n); + return r < 0 ? -Math.round(-r) : Math.round(r); + }, + ], + floor: [He, [He], (n, [t]) => Math.floor(t.evaluate(n))], + ceil: [He, [He], (n, [t]) => Math.ceil(t.evaluate(n))], + "filter-==": [ + Ft, + [At, ur], + (n, [t, r]) => n.properties()[t.value] === r.value, + ], + "filter-id-==": [Ft, [ur], (n, [t]) => n.id() === t.value], + "filter-type-==": [ + Ft, + [At], + (n, [t]) => n.geometryType() === t.value, + ], + "filter-<": [ + Ft, + [At, ur], + (n, [t, r]) => { + const o = n.properties()[t.value], + c = r.value; + return typeof o == typeof c && o < c; + }, + ], + "filter-id-<": [ + Ft, + [ur], + (n, [t]) => { + const r = n.id(), + o = t.value; + return typeof r == typeof o && r < o; + }, + ], + "filter->": [ + Ft, + [At, ur], + (n, [t, r]) => { + const o = n.properties()[t.value], + c = r.value; + return typeof o == typeof c && o > c; + }, + ], + "filter-id->": [ + Ft, + [ur], + (n, [t]) => { + const r = n.id(), + o = t.value; + return typeof r == typeof o && r > o; + }, + ], + "filter-<=": [ + Ft, + [At, ur], + (n, [t, r]) => { + const o = n.properties()[t.value], + c = r.value; + return typeof o == typeof c && o <= c; + }, + ], + "filter-id-<=": [ + Ft, + [ur], + (n, [t]) => { + const r = n.id(), + o = t.value; + return typeof r == typeof o && r <= o; + }, + ], + "filter->=": [ + Ft, + [At, ur], + (n, [t, r]) => { + const o = n.properties()[t.value], + c = r.value; + return typeof o == typeof c && o >= c; + }, + ], + "filter-id->=": [ + Ft, + [ur], + (n, [t]) => { + const r = n.id(), + o = t.value; + return typeof r == typeof o && r >= o; + }, + ], + "filter-has": [Ft, [ur], (n, [t]) => t.value in n.properties()], + "filter-has-id": [ + Ft, + [], + (n) => n.id() !== null && n.id() !== void 0, + ], + "filter-type-in": [ + Ft, + [tn(At)], + (n, [t]) => t.value.indexOf(n.geometryType()) >= 0, + ], + "filter-id-in": [ + Ft, + [tn(ur)], + (n, [t]) => t.value.indexOf(n.id()) >= 0, + ], + "filter-in-small": [ + Ft, + [At, tn(ur)], + (n, [t, r]) => r.value.indexOf(n.properties()[t.value]) >= 0, + ], + "filter-in-large": [ + Ft, + [At, tn(ur)], + (n, [t, r]) => + (function (o, c, f, _) { + for (; f <= _; ) { + const v = (f + _) >> 1; + if (c[v] === o) return !0; + c[v] > o ? (_ = v - 1) : (f = v + 1); + } + return !1; + })(n.properties()[t.value], r.value, 0, r.value.length - 1), + ], + all: { + type: Ft, + overloads: [ + [[Ft, Ft], (n, [t, r]) => t.evaluate(n) && r.evaluate(n)], + [ + Do(Ft), + (n, t) => { + for (const r of t) if (!r.evaluate(n)) return !1; + return !0; + }, + ], + ], + }, + any: { + type: Ft, + overloads: [ + [[Ft, Ft], (n, [t, r]) => t.evaluate(n) || r.evaluate(n)], + [ + Do(Ft), + (n, t) => { + for (const r of t) if (r.evaluate(n)) return !0; + return !1; + }, + ], + ], + }, + "!": [Ft, [Ft], (n, [t]) => !t.evaluate(n)], + "is-supported-script": [ + Ft, + [At], + (n, [t]) => { + const r = n.globals && n.globals.isSupportedScript; + return !r || r(t.evaluate(n)); + }, + ], + upcase: [At, [At], (n, [t]) => t.evaluate(n).toUpperCase()], + downcase: [At, [At], (n, [t]) => t.evaluate(n).toLowerCase()], + concat: [ + At, + Do(ur), + (n, t) => t.map((r) => Gr(r.evaluate(n))).join(""), + ], + "resolved-locale": [ + At, + [rn], + (n, [t]) => t.evaluate(n).resolvedLocale(), + ], + }); + class Wc { + constructor(t, r) { + (this.expression = t), + (this._warningHistory = {}), + (this._evaluator = new Ms()), + (this._defaultValue = r + ? (function (o) { + if (o.type === "color" && Vs(o.default)) + return new Mr(0, 0, 0, 0); + switch (o.type) { + case "color": + return Mr.parse(o.default) || null; + case "padding": + return kn.parse(o.default) || null; + case "numberArray": + return vn.parse(o.default) || null; + case "colorArray": + return fn.parse(o.default) || null; + case "variableAnchorOffsetCollection": + return fi.parse(o.default) || null; + case "projectionDefinition": + return jn.parse(o.default) || null; + default: + return o.default === void 0 ? null : o.default; + } + })(r) + : null), + (this._enumValues = r && r.type === "enum" ? r.values : null); + } + evaluateWithoutErrorHandling(t, r, o, c, f, _) { + return ( + (this._evaluator.globals = t), + (this._evaluator.feature = r), + (this._evaluator.featureState = o), + (this._evaluator.canonical = c), + (this._evaluator.availableImages = f || null), + (this._evaluator.formattedSection = _), + this.expression.evaluate(this._evaluator) + ); + } + evaluate(t, r, o, c, f, _) { + (this._evaluator.globals = t), + (this._evaluator.feature = r || null), + (this._evaluator.featureState = o || null), + (this._evaluator.canonical = c), + (this._evaluator.availableImages = f || null), + (this._evaluator.formattedSection = _ || null); + try { + const v = this.expression.evaluate(this._evaluator); + if (v == null || (typeof v == "number" && v != v)) + return this._defaultValue; + if (this._enumValues && !(v in this._enumValues)) + throw new on( + `Expected value to be one of ${Object.keys( + this._enumValues + ) + .map((b) => JSON.stringify(b)) + .join(", ")}, but found ${JSON.stringify(v)} instead.` + ); + return v; + } catch (v) { + return ( + this._warningHistory[v.message] || + ((this._warningHistory[v.message] = !0), + typeof console < "u" && console.warn(v.message)), + this._defaultValue + ); + } + } + } + function zl(n) { + return ( + Array.isArray(n) && + n.length > 0 && + typeof n[0] == "string" && + n[0] in ts + ); + } + function qs(n, t) { + const r = new Ca( + ts, + kl, + [], + t + ? (function (c) { + const f = { + color: Jt, + string: At, + number: He, + enum: At, + boolean: Ft, + formatted: pn, + padding: gn, + numberArray: En, + colorArray: ln, + projectionDefinition: Cr, + resolvedImage: pr, + variableAnchorOffsetCollection: In, + }; + return c.type === "array" + ? tn(f[c.value] || ur, c.length) + : f[c.type]; + })(t) + : void 0 + ), + o = r.parse( + n, + void 0, + void 0, + void 0, + t && t.type === "string" + ? { typeAnnotation: "coerce" } + : void 0 + ); + return o ? Qh(new Wc(o, t)) : rs(r.errors); + } + class Zs { + constructor(t, r) { + (this.kind = t), + (this._styleExpression = r), + (this.isStateDependent = + t !== "constant" && !js(r.expression)), + (this.globalStateRefs = Gs(r.expression)); + } + evaluateWithoutErrorHandling(t, r, o, c, f, _) { + return this._styleExpression.evaluateWithoutErrorHandling( + t, + r, + o, + c, + f, + _ + ); + } + evaluate(t, r, o, c, f, _) { + return this._styleExpression.evaluate(t, r, o, c, f, _); + } + } + class Xc { + constructor(t, r, o, c) { + (this.kind = t), + (this.zoomStops = o), + (this._styleExpression = r), + (this.isStateDependent = t !== "camera" && !js(r.expression)), + (this.globalStateRefs = Gs(r.expression)), + (this.interpolationType = c); + } + evaluateWithoutErrorHandling(t, r, o, c, f, _) { + return this._styleExpression.evaluateWithoutErrorHandling( + t, + r, + o, + c, + f, + _ + ); + } + evaluate(t, r, o, c, f, _) { + return this._styleExpression.evaluate(t, r, o, c, f, _); + } + interpolationFactor(t, r, o) { + return this.interpolationType + ? Di.interpolationFactor(this.interpolationType, t, r, o) + : 0; + } + } + function id(n, t) { + const r = qs(n, t); + if (r.result === "error") return r; + const o = r.value.expression, + c = Al(o); + if (!c && !fo(t)) + return rs([new Yr("", "data expressions not supported")]); + const f = El(o, ["zoom"]); + if (!f && !ed(t)) + return rs([new Yr("", "zoom expressions not supported")]); + const _ = $s(o); + return _ || f + ? _ instanceof Yr + ? rs([_]) + : _ instanceof Di && !Hc(t) + ? rs([ + new Yr( + "", + '"interpolate" expressions cannot be used with this property' + ), + ]) + : Qh( + _ + ? new Xc( + c ? "camera" : "composite", + r.value, + _.labels, + _ instanceof Di ? _.interpolation : void 0 + ) + : new Zs(c ? "constant" : "source", r.value) + ) + : rs([ + new Yr( + "", + '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.' + ), + ]); + } + class Us { + constructor(t, r) { + (this._parameters = t), + (this._specification = r), + Xr(this, td(this._parameters, this._specification)); + } + static deserialize(t) { + return new Us(t._parameters, t._specification); + } + static serialize(t) { + return { + _parameters: t._parameters, + _specification: t._specification, + }; + } + } + function $s(n) { + let t = null; + if (n instanceof Qa) t = $s(n.result); + else if (n instanceof zs) { + for (const r of n.args) if (((t = $s(r)), t)) break; + } else + (n instanceof ei || n instanceof Di) && + n.input instanceof va && + n.input.name === "zoom" && + (t = n); + return ( + t instanceof Yr || + n.eachChild((r) => { + const o = $s(r); + o instanceof Yr + ? (t = o) + : !t && o + ? (t = new Yr( + "", + '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.' + )) + : t && + o && + t !== o && + (t = new Yr( + "", + 'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.' + )); + }), + t + ); + } + function Gs(n, t = new Set()) { + return ( + n instanceof Ns && t.add(n.key), + n.eachChild((r) => { + Gs(r, t); + }), + t + ); + } + function Ll(n) { + if (n === !0 || n === !1) return !0; + if (!Array.isArray(n) || n.length === 0) return !1; + switch (n[0]) { + case "has": + return n.length >= 2 && n[1] !== "$id" && n[1] !== "$type"; + case "in": + return ( + n.length >= 3 && + (typeof n[1] != "string" || Array.isArray(n[2])) + ); + case "!in": + case "!has": + case "none": + return !1; + case "==": + case "!=": + case ">": + case ">=": + case "<": + case "<=": + return ( + n.length !== 3 || Array.isArray(n[1]) || Array.isArray(n[2]) + ); + case "any": + case "all": + for (const t of n.slice(1)) + if (!Ll(t) && typeof t != "boolean") return !1; + return !0; + default: + return !0; + } + } + const Yc = { + type: "boolean", + default: !1, + transition: !1, + "property-type": "data-driven", + expression: { interpolated: !1, parameters: ["zoom", "feature"] }, + }; + function Ro(n) { + if (n == null) + return { + filter: () => !0, + needGeometry: !1, + getGlobalStateRefs: () => new Set(), + }; + Ll(n) || (n = Bo(n)); + const t = qs(n, Yc); + if (t.result === "error") + throw new Error( + t.value.map((r) => `${r.key}: ${r.message}`).join(", ") + ); + return { + filter: (r, o, c) => t.value.evaluate(r, o, {}, c), + needGeometry: Dl(n), + getGlobalStateRefs: () => Gs(t.value.expression), + }; + } + function Kc(n, t) { + return n < t ? -1 : n > t ? 1 : 0; + } + function Dl(n) { + if (!Array.isArray(n)) return !1; + if (n[0] === "within" || n[0] === "distance") return !0; + for (let t = 1; t < n.length; t++) if (Dl(n[t])) return !0; + return !1; + } + function Bo(n) { + if (!n) return !0; + const t = n[0]; + return n.length <= 1 + ? t !== "any" + : t === "==" + ? Jc(n[1], n[2], "==") + : t === "!=" + ? Rl(Jc(n[1], n[2], "==")) + : t === "<" || t === ">" || t === "<=" || t === ">=" + ? Jc(n[1], n[2], t) + : t === "any" + ? ((r = n.slice(1)), ["any"].concat(r.map(Bo))) + : t === "all" + ? ["all"].concat(n.slice(1).map(Bo)) + : t === "none" + ? ["all"].concat(n.slice(1).map(Bo).map(Rl)) + : t === "in" + ? ad(n[1], n.slice(2)) + : t === "!in" + ? Rl(ad(n[1], n.slice(2))) + : t === "has" + ? od(n[1]) + : t !== "!has" || Rl(od(n[1])); + var r; + } + function Jc(n, t, r) { + switch (n) { + case "$type": + return [`filter-type-${r}`, t]; + case "$id": + return [`filter-id-${r}`, t]; + default: + return [`filter-${r}`, n, t]; + } + } + function ad(n, t) { + if (t.length === 0) return !1; + switch (n) { + case "$type": + return ["filter-type-in", ["literal", t]]; + case "$id": + return ["filter-id-in", ["literal", t]]; + default: + return t.length > 200 && + !t.some((r) => typeof r != typeof t[0]) + ? ["filter-in-large", n, ["literal", t.sort(Kc)]] + : ["filter-in-small", n, ["literal", t]]; + } + } + function od(n) { + switch (n) { + case "$type": + return !0; + case "$id": + return ["filter-has-id"]; + default: + return ["filter-has", n]; + } + } + function Rl(n) { + return ["!", n]; + } + function Qc(n) { + const t = typeof n; + if ( + t === "number" || + t === "boolean" || + t === "string" || + n == null + ) + return JSON.stringify(n); + if (Array.isArray(n)) { + let c = "["; + for (const f of n) c += `${Qc(f)},`; + return `${c}]`; + } + const r = Object.keys(n).sort(); + let o = "{"; + for (let c = 0; c < r.length; c++) + o += `${JSON.stringify(r[c])}:${Qc(n[r[c]])},`; + return `${o}}`; + } + function Np(n) { + let t = ""; + for (const r of Bt) t += `/${Qc(n[r])}`; + return t; + } + function eu(n) { + const t = n.value; + return t + ? [new ht(n.key, t, "constants have been deprecated as of v8")] + : []; + } + function Kn(n) { + return n instanceof Number || + n instanceof String || + n instanceof Boolean + ? n.valueOf() + : n; + } + function Ua(n) { + if (Array.isArray(n)) return n.map(Ua); + if ( + n instanceof Object && + !( + n instanceof Number || + n instanceof String || + n instanceof Boolean + ) + ) { + const t = {}; + for (const r in n) t[r] = Ua(n[r]); + return t; + } + return Kn(n); + } + function ya(n) { + const t = n.key, + r = n.value, + o = n.valueSpec || {}, + c = n.objectElementValidators || {}, + f = n.style, + _ = n.styleSpec, + v = n.validateSpec; + let b = []; + const S = sn(r); + if (S !== "object") + return [new ht(t, r, `object expected, ${S} found`)]; + for (const I in r) { + const L = I.split(".")[0], + F = sr(o, L) || o["*"]; + let q; + if (sr(c, L)) q = c[L]; + else if (sr(o, L)) q = v; + else if (c["*"]) q = c["*"]; + else { + if (!o["*"]) { + b.push(new ht(t, r[I], `unknown property "${I}"`)); + continue; + } + q = v; + } + b = b.concat( + q( + { + key: (t && `${t}.`) + I, + value: r[I], + valueSpec: F, + style: f, + styleSpec: _, + object: r, + objectKey: I, + validateSpec: v, + }, + r + ) + ); + } + for (const I in o) + c[I] || + (o[I].required && + o[I].default === void 0 && + r[I] === void 0 && + b.push(new ht(t, r, `missing required property "${I}"`))); + return b; + } + function Bl(n) { + const t = n.value, + r = n.valueSpec, + o = n.style, + c = n.styleSpec, + f = n.key, + _ = n.arrayElementValidator || n.validateSpec; + if (sn(t) !== "array") + return [new ht(f, t, `array expected, ${sn(t)} found`)]; + if (r.length && t.length !== r.length) + return [ + new ht( + f, + t, + `array length ${r.length} expected, length ${t.length} found` + ), + ]; + if (r["min-length"] && t.length < r["min-length"]) + return [ + new ht( + f, + t, + `array length at least ${r["min-length"]} expected, length ${t.length} found` + ), + ]; + let v = { type: r.value, values: r.values }; + c.$version < 7 && (v.function = r.function), + sn(r.value) === "object" && (v = r.value); + let b = []; + for (let S = 0; S < t.length; S++) + b = b.concat( + _({ + array: t, + arrayIndex: S, + value: t[S], + valueSpec: v, + validateSpec: n.validateSpec, + style: o, + styleSpec: c, + key: `${f}[${S}]`, + }) + ); + return b; + } + function Hs(n) { + const t = n.key, + r = n.value, + o = n.valueSpec; + let c = sn(r); + return ( + c === "number" && r != r && (c = "NaN"), + c !== "number" + ? [new ht(t, r, `number expected, ${c} found`)] + : "minimum" in o && r < o.minimum + ? [ + new ht( + t, + r, + `${r} is less than the minimum value ${o.minimum}` + ), + ] + : "maximum" in o && r > o.maximum + ? [ + new ht( + t, + r, + `${r} is greater than the maximum value ${o.maximum}` + ), + ] + : [] + ); + } + function sd(n) { + const t = n.valueSpec, + r = Kn(n.value.type); + let o, + c, + f, + _ = {}; + const v = r !== "categorical" && n.value.property === void 0, + b = !v, + S = + sn(n.value.stops) === "array" && + sn(n.value.stops[0]) === "array" && + sn(n.value.stops[0][0]) === "object", + I = ya({ + key: n.key, + value: n.value, + valueSpec: n.styleSpec.function, + validateSpec: n.validateSpec, + style: n.style, + styleSpec: n.styleSpec, + objectElementValidators: { + stops: function (q) { + if (r === "identity") + return [ + new ht( + q.key, + q.value, + 'identity function may not have a "stops" property' + ), + ]; + let Z = []; + const W = q.value; + return ( + (Z = Z.concat( + Bl({ + key: q.key, + value: W, + valueSpec: q.valueSpec, + validateSpec: q.validateSpec, + style: q.style, + styleSpec: q.styleSpec, + arrayElementValidator: L, + }) + )), + sn(W) === "array" && + W.length === 0 && + Z.push( + new ht( + q.key, + W, + "array must have at least one stop" + ) + ), + Z + ); + }, + default: function (q) { + return q.validateSpec({ + key: q.key, + value: q.value, + valueSpec: t, + validateSpec: q.validateSpec, + style: q.style, + styleSpec: q.styleSpec, + }); + }, + }, + }); + return ( + r === "identity" && + v && + I.push( + new ht( + n.key, + n.value, + 'missing required property "property"' + ) + ), + r === "identity" || + n.value.stops || + I.push( + new ht(n.key, n.value, 'missing required property "stops"') + ), + r === "exponential" && + n.valueSpec.expression && + !Hc(n.valueSpec) && + I.push( + new ht( + n.key, + n.value, + "exponential functions not supported" + ) + ), + n.styleSpec.$version >= 8 && + (b && !fo(n.valueSpec) + ? I.push( + new ht( + n.key, + n.value, + "property functions not supported" + ) + ) + : v && + !ed(n.valueSpec) && + I.push( + new ht(n.key, n.value, "zoom functions not supported") + )), + (r !== "categorical" && !S) || + n.value.property !== void 0 || + I.push( + new ht(n.key, n.value, '"property" property is required') + ), + I + ); + function L(q) { + let Z = []; + const W = q.value, + J = q.key; + if (sn(W) !== "array") + return [new ht(J, W, `array expected, ${sn(W)} found`)]; + if (W.length !== 2) + return [ + new ht( + J, + W, + `array length 2 expected, length ${W.length} found` + ), + ]; + if (S) { + if (sn(W[0]) !== "object") + return [new ht(J, W, `object expected, ${sn(W[0])} found`)]; + if (W[0].zoom === void 0) + return [new ht(J, W, "object stop key must have zoom")]; + if (W[0].value === void 0) + return [new ht(J, W, "object stop key must have value")]; + if (f && f > Kn(W[0].zoom)) + return [ + new ht( + J, + W[0].zoom, + "stop zoom values must appear in ascending order" + ), + ]; + Kn(W[0].zoom) !== f && + ((f = Kn(W[0].zoom)), (c = void 0), (_ = {})), + (Z = Z.concat( + ya({ + key: `${J}[0]`, + value: W[0], + valueSpec: { zoom: {} }, + validateSpec: q.validateSpec, + style: q.style, + styleSpec: q.styleSpec, + objectElementValidators: { zoom: Hs, value: F }, + }) + )); + } else Z = Z.concat(F({ key: `${J}[0]`, value: W[0], validateSpec: q.validateSpec, style: q.style, styleSpec: q.styleSpec }, W)); + return zl(Ua(W[1])) + ? Z.concat([ + new ht( + `${J}[1]`, + W[1], + "expressions are not allowed in function stops." + ), + ]) + : Z.concat( + q.validateSpec({ + key: `${J}[1]`, + value: W[1], + valueSpec: t, + validateSpec: q.validateSpec, + style: q.style, + styleSpec: q.styleSpec, + }) + ); + } + function F(q, Z) { + const W = sn(q.value), + J = Kn(q.value), + le = q.value !== null ? q.value : Z; + if (o) { + if (W !== o) + return [ + new ht( + q.key, + le, + `${W} stop domain type must match previous stop domain type ${o}` + ), + ]; + } else o = W; + if (W !== "number" && W !== "string" && W !== "boolean") + return [ + new ht( + q.key, + le, + "stop domain value must be a number, string, or boolean" + ), + ]; + if (W !== "number" && r !== "categorical") { + let Re = `number expected, ${W} found`; + return ( + fo(t) && + r === void 0 && + (Re += + '\nIf you intended to use a categorical function, specify `"type": "categorical"`.'), + [new ht(q.key, le, Re)] + ); + } + return r !== "categorical" || + W !== "number" || + (isFinite(J) && Math.floor(J) === J) + ? r !== "categorical" && + W === "number" && + c !== void 0 && + J < c + ? [ + new ht( + q.key, + le, + "stop domain values must appear in ascending order" + ), + ] + : ((c = J), + r === "categorical" && J in _ + ? [ + new ht( + q.key, + le, + "stop domain values must be unique" + ), + ] + : ((_[J] = !0), [])) + : [new ht(q.key, le, `integer expected, found ${J}`)]; + } + } + function Fo(n) { + const t = (n.expressionContext === "property" ? id : qs)( + Ua(n.value), + n.valueSpec + ); + if (t.result === "error") + return t.value.map( + (o) => new ht(`${n.key}${o.key}`, n.value, o.message) + ); + const r = + t.value.expression || t.value._styleExpression.expression; + if ( + n.expressionContext === "property" && + n.propertyKey === "text-font" && + !r.outputDefined() + ) + return [ + new ht( + n.key, + n.value, + `Invalid data expression for "${n.propertyKey}". Output values must be contained as literals within the expression.` + ), + ]; + if ( + n.expressionContext === "property" && + n.propertyType === "layout" && + !js(r) + ) + return [ + new ht( + n.key, + n.value, + '"feature-state" data expressions are not supported with layout properties.' + ), + ]; + if (n.expressionContext === "filter" && !js(r)) + return [ + new ht( + n.key, + n.value, + '"feature-state" data expressions are not supported with filters.' + ), + ]; + if ( + n.expressionContext && + n.expressionContext.indexOf("cluster") === 0 + ) { + if (!El(r, ["zoom", "feature-state"])) + return [ + new ht( + n.key, + n.value, + '"zoom" and "feature-state" expressions are not supported with cluster properties.' + ), + ]; + if (n.expressionContext === "cluster-initial" && !Al(r)) + return [ + new ht( + n.key, + n.value, + "Feature data expressions are not supported with initial expression part of cluster properties." + ), + ]; + } + return []; + } + function Fl(n) { + const t = n.key, + r = n.value, + o = sn(r); + return o !== "string" + ? [new ht(t, r, `color expected, ${o} found`)] + : Mr.parse(String(r)) + ? [] + : [new ht(t, r, `color expected, "${r}" found`)]; + } + function to(n) { + const t = n.key, + r = n.value, + o = n.valueSpec, + c = []; + return ( + Array.isArray(o.values) + ? o.values.indexOf(Kn(r)) === -1 && + c.push( + new ht( + t, + r, + `expected one of [${o.values.join( + ", " + )}], ${JSON.stringify(r)} found` + ) + ) + : Object.keys(o.values).indexOf(Kn(r)) === -1 && + c.push( + new ht( + t, + r, + `expected one of [${Object.keys(o.values).join( + ", " + )}], ${JSON.stringify(r)} found` + ) + ), + c + ); + } + function tu(n) { + return Ll(Ua(n.value)) + ? Fo( + Xr({}, n, { + expressionContext: "filter", + valueSpec: { value: "boolean" }, + }) + ) + : ld(n); + } + function ld(n) { + const t = n.value, + r = n.key; + if (sn(t) !== "array") + return [new ht(r, t, `array expected, ${sn(t)} found`)]; + const o = n.styleSpec; + let c, + f = []; + if (t.length < 1) + return [ + new ht(r, t, "filter array must have at least 1 element"), + ]; + switch ( + ((f = f.concat( + to({ + key: `${r}[0]`, + value: t[0], + valueSpec: o.filter_operator, + style: n.style, + styleSpec: n.styleSpec, + }) + )), + Kn(t[0])) + ) { + case "<": + case "<=": + case ">": + case ">=": + t.length >= 2 && + Kn(t[1]) === "$type" && + f.push( + new ht( + r, + t, + `"$type" cannot be use with operator "${t[0]}"` + ) + ); + case "==": + case "!=": + t.length !== 3 && + f.push( + new ht( + r, + t, + `filter array for operator "${t[0]}" must have 3 elements` + ) + ); + case "in": + case "!in": + t.length >= 2 && + ((c = sn(t[1])), + c !== "string" && + f.push( + new ht(`${r}[1]`, t[1], `string expected, ${c} found`) + )); + for (let _ = 2; _ < t.length; _++) + (c = sn(t[_])), + Kn(t[1]) === "$type" + ? (f = f.concat( + to({ + key: `${r}[${_}]`, + value: t[_], + valueSpec: o.geometry_type, + style: n.style, + styleSpec: n.styleSpec, + }) + )) + : c !== "string" && + c !== "number" && + c !== "boolean" && + f.push( + new ht( + `${r}[${_}]`, + t[_], + `string, number, or boolean expected, ${c} found` + ) + ); + break; + case "any": + case "all": + case "none": + for (let _ = 1; _ < t.length; _++) + f = f.concat( + ld({ + key: `${r}[${_}]`, + value: t[_], + style: n.style, + styleSpec: n.styleSpec, + }) + ); + break; + case "has": + case "!has": + (c = sn(t[1])), + t.length !== 2 + ? f.push( + new ht( + r, + t, + `filter array for "${t[0]}" operator must have 2 elements` + ) + ) + : c !== "string" && + f.push( + new ht(`${r}[1]`, t[1], `string expected, ${c} found`) + ); + } + return f; + } + function cd(n, t) { + const r = n.key, + o = n.validateSpec, + c = n.style, + f = n.styleSpec, + _ = n.value, + v = n.objectKey, + b = f[`${t}_${n.layerType}`]; + if (!b) return []; + const S = v.match(/^(.*)-transition$/); + if (t === "paint" && S && b[S[1]] && b[S[1]].transition) + return o({ + key: r, + value: _, + valueSpec: f.transition, + style: c, + styleSpec: f, + }); + const I = n.valueSpec || b[v]; + if (!I) return [new ht(r, _, `unknown property "${v}"`)]; + let L; + if ( + sn(_) === "string" && + fo(I) && + !I.tokens && + (L = /^{([^}]+)}$/.exec(_)) + ) + return [ + new ht( + r, + _, + `"${v}" does not support interpolation syntax +Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify( + L[1] + )} }\`.` + ), + ]; + const F = []; + return ( + n.layerType === "symbol" && + (v === "text-field" && + c && + !c.glyphs && + F.push( + new ht( + r, + _, + 'use of "text-field" requires a style "glyphs" property' + ) + ), + v === "text-font" && + Vs(Ua(_)) && + Kn(_.type) === "identity" && + F.push( + new ht( + r, + _, + '"text-font" does not support identity functions' + ) + )), + F.concat( + o({ + key: n.key, + value: _, + valueSpec: I, + style: c, + styleSpec: f, + expressionContext: "property", + propertyType: t, + propertyKey: v, + }) + ) + ); + } + function ud(n) { + return cd(n, "paint"); + } + function hd(n) { + return cd(n, "layout"); + } + function dd(n) { + let t = []; + const r = n.value, + o = n.key, + c = n.style, + f = n.styleSpec; + if (sn(r) !== "object") + return [new ht(o, r, `object expected, ${sn(r)} found`)]; + r.type || + r.ref || + t.push(new ht(o, r, 'either "type" or "ref" is required')); + let _ = Kn(r.type); + const v = Kn(r.ref); + if (r.id) { + const b = Kn(r.id); + for (let S = 0; S < n.arrayIndex; S++) { + const I = c.layers[S]; + Kn(I.id) === b && + t.push( + new ht( + o, + r.id, + `duplicate layer id "${r.id}", previously used at line ${I.id.__line__}` + ) + ); + } + } + if ("ref" in r) { + let b; + ["type", "source", "source-layer", "filter", "layout"].forEach( + (S) => { + S in r && + t.push( + new ht(o, r[S], `"${S}" is prohibited for ref layers`) + ); + } + ), + c.layers.forEach((S) => { + Kn(S.id) === v && (b = S); + }), + b + ? b.ref + ? t.push( + new ht( + o, + r.ref, + "ref cannot reference another ref layer" + ) + ) + : (_ = Kn(b.type)) + : t.push(new ht(o, r.ref, `ref layer "${v}" not found`)); + } else if (_ !== "background") + if (r.source) { + const b = c.sources && c.sources[r.source], + S = b && Kn(b.type); + b + ? S === "vector" && _ === "raster" + ? t.push( + new ht( + o, + r.source, + `layer "${r.id}" requires a raster source` + ) + ) + : (S !== "raster-dem" && _ === "hillshade") || + (S !== "raster-dem" && _ === "color-relief") + ? t.push( + new ht( + o, + r.source, + `layer "${r.id}" requires a raster-dem source` + ) + ) + : S === "raster" && _ !== "raster" + ? t.push( + new ht( + o, + r.source, + `layer "${r.id}" requires a vector source` + ) + ) + : S !== "vector" || r["source-layer"] + ? S === "raster-dem" && + _ !== "hillshade" && + _ !== "color-relief" + ? t.push( + new ht( + o, + r.source, + "raster-dem source can only be used with layer type 'hillshade' or 'color-relief'." + ) + ) + : _ !== "line" || + !r.paint || + !r.paint["line-gradient"] || + (S === "geojson" && b.lineMetrics) || + t.push( + new ht( + o, + r, + `layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.` + ) + ) + : t.push( + new ht( + o, + r, + `layer "${r.id}" must specify a "source-layer"` + ) + ) + : t.push( + new ht(o, r.source, `source "${r.source}" not found`) + ); + } else + t.push(new ht(o, r, 'missing required property "source"')); + return ( + (t = t.concat( + ya({ + key: o, + value: r, + valueSpec: f.layer, + style: n.style, + styleSpec: n.styleSpec, + validateSpec: n.validateSpec, + objectElementValidators: { + "*": () => [], + type: () => + n.validateSpec({ + key: `${o}.type`, + value: r.type, + valueSpec: f.layer.type, + style: n.style, + styleSpec: n.styleSpec, + validateSpec: n.validateSpec, + object: r, + objectKey: "type", + }), + filter: tu, + layout: (b) => + ya({ + layer: r, + key: b.key, + value: b.value, + style: b.style, + styleSpec: b.styleSpec, + validateSpec: b.validateSpec, + objectElementValidators: { + "*": (S) => hd(Xr({ layerType: _ }, S)), + }, + }), + paint: (b) => + ya({ + layer: r, + key: b.key, + value: b.value, + style: b.style, + styleSpec: b.styleSpec, + validateSpec: b.validateSpec, + objectElementValidators: { + "*": (S) => ud(Xr({ layerType: _ }, S)), + }, + }), + }, + }) + )), + t + ); + } + function Ia(n) { + const t = n.value, + r = n.key, + o = sn(t); + return o !== "string" + ? [new ht(r, t, `string expected, ${o} found`)] + : []; + } + const ns = { + promoteId: function ({ key: n, value: t }) { + if (sn(t) === "string") return Ia({ key: n, value: t }); + { + const r = []; + for (const o in t) + r.push(...Ia({ key: `${n}.${o}`, value: t[o] })); + return r; + } + }, + }; + function Qi(n) { + const t = n.value, + r = n.key, + o = n.styleSpec, + c = n.style, + f = n.validateSpec; + if (!t.type) return [new ht(r, t, '"type" is required')]; + const _ = Kn(t.type); + let v; + switch (_) { + case "vector": + case "raster": + return ( + (v = ya({ + key: r, + value: t, + valueSpec: o[`source_${_.replace("-", "_")}`], + style: n.style, + styleSpec: o, + objectElementValidators: ns, + validateSpec: f, + })), + v + ); + case "raster-dem": + return ( + (v = (function (b) { + var S; + const I = + (S = b.sourceName) !== null && S !== void 0 ? S : "", + L = b.value, + F = b.styleSpec, + q = F.source_raster_dem, + Z = b.style; + let W = []; + const J = sn(L); + if (L === void 0) return W; + if (J !== "object") + return ( + W.push( + new ht( + "source_raster_dem", + L, + `object expected, ${J} found` + ) + ), + W + ); + const le = Kn(L.encoding) === "custom", + Re = [ + "redFactor", + "greenFactor", + "blueFactor", + "baseShift", + ], + xe = b.value.encoding + ? `"${b.value.encoding}"` + : "Default"; + for (const Ce in L) + !le && Re.includes(Ce) + ? W.push( + new ht( + Ce, + L[Ce], + `In "${I}": "${Ce}" is only valid when "encoding" is set to "custom". ${xe} encoding found` + ) + ) + : q[Ce] + ? (W = W.concat( + b.validateSpec({ + key: Ce, + value: L[Ce], + valueSpec: q[Ce], + validateSpec: b.validateSpec, + style: Z, + styleSpec: F, + }) + )) + : W.push( + new ht(Ce, L[Ce], `unknown property "${Ce}"`) + ); + return W; + })({ + sourceName: r, + value: t, + style: n.style, + styleSpec: o, + validateSpec: f, + })), + v + ); + case "geojson": + if ( + ((v = ya({ + key: r, + value: t, + valueSpec: o.source_geojson, + style: c, + styleSpec: o, + validateSpec: f, + objectElementValidators: ns, + })), + t.cluster) + ) + for (const b in t.clusterProperties) { + const [S, I] = t.clusterProperties[b], + L = + typeof S == "string" + ? [S, ["accumulated"], ["get", b]] + : S; + v.push( + ...Fo({ + key: `${r}.${b}.map`, + value: I, + expressionContext: "cluster-map", + }) + ), + v.push( + ...Fo({ + key: `${r}.${b}.reduce`, + value: L, + expressionContext: "cluster-reduce", + }) + ); + } + return v; + case "video": + return ya({ + key: r, + value: t, + valueSpec: o.source_video, + style: c, + validateSpec: f, + styleSpec: o, + }); + case "image": + return ya({ + key: r, + value: t, + valueSpec: o.source_image, + style: c, + validateSpec: f, + styleSpec: o, + }); + case "canvas": + return [ + new ht( + r, + null, + "Please use runtime APIs to add canvas sources, rather than including them in stylesheets.", + "source.canvas" + ), + ]; + default: + return to({ + key: `${r}.type`, + value: t.type, + valueSpec: { + values: [ + "vector", + "raster", + "raster-dem", + "geojson", + "video", + "image", + ], + }, + }); + } + } + function is(n) { + const t = n.value, + r = n.styleSpec, + o = r.light, + c = n.style; + let f = []; + const _ = sn(t); + if (t === void 0) return f; + if (_ !== "object") + return ( + (f = f.concat([ + new ht("light", t, `object expected, ${_} found`), + ])), + f + ); + for (const v in t) { + const b = v.match(/^(.*)-transition$/); + f = f.concat( + b && o[b[1]] && o[b[1]].transition + ? n.validateSpec({ + key: v, + value: t[v], + valueSpec: r.transition, + validateSpec: n.validateSpec, + style: c, + styleSpec: r, + }) + : o[v] + ? n.validateSpec({ + key: v, + value: t[v], + valueSpec: o[v], + validateSpec: n.validateSpec, + style: c, + styleSpec: r, + }) + : [new ht(v, t[v], `unknown property "${v}"`)] + ); + } + return f; + } + function ru(n) { + const t = n.value, + r = n.styleSpec, + o = r.sky, + c = n.style, + f = sn(t); + if (t === void 0) return []; + if (f !== "object") + return [new ht("sky", t, `object expected, ${f} found`)]; + let _ = []; + for (const v in t) + _ = _.concat( + o[v] + ? n.validateSpec({ + key: v, + value: t[v], + valueSpec: o[v], + style: c, + styleSpec: r, + }) + : [new ht(v, t[v], `unknown property "${v}"`)] + ); + return _; + } + function pd(n) { + const t = n.value, + r = n.styleSpec, + o = r.terrain, + c = n.style; + let f = []; + const _ = sn(t); + if (t === void 0) return f; + if (_ !== "object") + return ( + (f = f.concat([ + new ht("terrain", t, `object expected, ${_} found`), + ])), + f + ); + for (const v in t) + f = f.concat( + o[v] + ? n.validateSpec({ + key: v, + value: t[v], + valueSpec: o[v], + validateSpec: n.validateSpec, + style: c, + styleSpec: r, + }) + : [new ht(v, t[v], `unknown property "${v}"`)] + ); + return f; + } + function fd(n) { + let t = []; + const r = n.value, + o = n.key; + if (Array.isArray(r)) { + const c = [], + f = []; + for (const _ in r) + r[_].id && + c.includes(r[_].id) && + t.push( + new ht( + o, + r, + `all the sprites' ids must be unique, but ${r[_].id} is duplicated` + ) + ), + c.push(r[_].id), + r[_].url && + f.includes(r[_].url) && + t.push( + new ht( + o, + r, + `all the sprites' URLs must be unique, but ${r[_].url} is duplicated` + ) + ), + f.push(r[_].url), + (t = t.concat( + ya({ + key: `${o}[${_}]`, + value: r[_], + valueSpec: { + id: { type: "string", required: !0 }, + url: { type: "string", required: !0 }, + }, + validateSpec: n.validateSpec, + }) + )); + return t; + } + return Ia({ key: o, value: r }); + } + function as(n) { + return ( + (t = n.value), + t && t.constructor === Object + ? [] + : [ + new ht( + n.key, + n.value, + `object expected, ${sn(n.value)} found` + ), + ] + ); + var t; + } + const nu = { + "*": () => [], + array: Bl, + boolean: function (n) { + const t = n.value, + r = n.key, + o = sn(t); + return o !== "boolean" + ? [new ht(r, t, `boolean expected, ${o} found`)] + : []; + }, + number: Hs, + color: Fl, + constants: eu, + enum: to, + filter: tu, + function: sd, + layer: dd, + object: ya, + source: Qi, + light: is, + sky: ru, + terrain: pd, + projection: function (n) { + const t = n.value, + r = n.styleSpec, + o = r.projection, + c = n.style, + f = sn(t); + if (t === void 0) return []; + if (f !== "object") + return [ + new ht("projection", t, `object expected, ${f} found`), + ]; + let _ = []; + for (const v in t) + _ = _.concat( + o[v] + ? n.validateSpec({ + key: v, + value: t[v], + valueSpec: o[v], + style: c, + styleSpec: r, + }) + : [new ht(v, t[v], `unknown property "${v}"`)] + ); + return _; + }, + projectionDefinition: function (n) { + const t = n.key; + let r = n.value; + r = r instanceof String ? r.valueOf() : r; + const o = sn(r); + return o !== "array" || + (function (c) { + return ( + Array.isArray(c) && + c.length === 3 && + typeof c[0] == "string" && + typeof c[1] == "string" && + typeof c[2] == "number" + ); + })(r) || + (function (c) { + return !!["interpolate", "step", "literal"].includes(c[0]); + })(r) + ? ["array", "string"].includes(o) + ? [] + : [ + new ht( + t, + r, + `projection expected, invalid type "${o}" found` + ), + ] + : [ + new ht( + t, + r, + `projection expected, invalid array ${JSON.stringify( + r + )} found` + ), + ]; + }, + string: Ia, + formatted: function (n) { + return Ia(n).length === 0 ? [] : Fo(n); + }, + resolvedImage: function (n) { + return Ia(n).length === 0 ? [] : Fo(n); + }, + padding: function (n) { + const t = n.key, + r = n.value; + if (sn(r) === "array") { + if (r.length < 1 || r.length > 4) + return [ + new ht( + t, + r, + `padding requires 1 to 4 values; ${r.length} values found` + ), + ]; + const o = { type: "number" }; + let c = []; + for (let f = 0; f < r.length; f++) + c = c.concat( + n.validateSpec({ + key: `${t}[${f}]`, + value: r[f], + validateSpec: n.validateSpec, + valueSpec: o, + }) + ); + return c; + } + return Hs({ key: t, value: r, valueSpec: {} }); + }, + numberArray: function (n) { + const t = n.key, + r = n.value; + if (sn(r) === "array") { + const o = { type: "number" }; + if (r.length < 1) + return [ + new ht( + t, + r, + "array length at least 1 expected, length 0 found" + ), + ]; + let c = []; + for (let f = 0; f < r.length; f++) + c = c.concat( + n.validateSpec({ + key: `${t}[${f}]`, + value: r[f], + validateSpec: n.validateSpec, + valueSpec: o, + }) + ); + return c; + } + return Hs({ key: t, value: r, valueSpec: {} }); + }, + colorArray: function (n) { + const t = n.key, + r = n.value; + if (sn(r) === "array") { + if (r.length < 1) + return [ + new ht( + t, + r, + "array length at least 1 expected, length 0 found" + ), + ]; + let o = []; + for (let c = 0; c < r.length; c++) + o = o.concat(Fl({ key: `${t}[${c}]`, value: r[c] })); + return o; + } + return Fl({ key: t, value: r }); + }, + variableAnchorOffsetCollection: function (n) { + const t = n.key, + r = n.value, + o = sn(r), + c = n.styleSpec; + if (o !== "array" || r.length < 1 || r.length % 2 != 0) + return [ + new ht( + t, + r, + "variableAnchorOffsetCollection requires a non-empty array of even length" + ), + ]; + let f = []; + for (let _ = 0; _ < r.length; _ += 2) + (f = f.concat( + to({ + key: `${t}[${_}]`, + value: r[_], + valueSpec: c.layout_symbol["text-anchor"], + }) + )), + (f = f.concat( + Bl({ + key: `${t}[${_ + 1}]`, + value: r[_ + 1], + valueSpec: { length: 2, value: "number" }, + validateSpec: n.validateSpec, + style: n.style, + styleSpec: c, + }) + )); + return f; + }, + sprite: fd, + state: as, + }; + function os(n) { + const t = n.value, + r = n.valueSpec, + o = n.styleSpec; + return ( + (n.validateSpec = os), + r.expression && Vs(Kn(t)) + ? sd(n) + : r.expression && zl(Ua(t)) + ? Fo(n) + : r.type && nu[r.type] + ? nu[r.type](n) + : ya(Xr({}, n, { valueSpec: r.type ? o[r.type] : r })) + ); + } + function md(n) { + const t = n.value, + r = n.key, + o = Ia(n); + return ( + o.length || + (t.indexOf("{fontstack}") === -1 && + o.push( + new ht( + r, + t, + '"glyphs" url must include a "{fontstack}" token' + ) + ), + t.indexOf("{range}") === -1 && + o.push( + new ht( + r, + t, + '"glyphs" url must include a "{range}" token' + ) + )), + o + ); + } + function ea(n, t = ye) { + let r = []; + return ( + (r = r.concat( + os({ + key: "", + value: n, + valueSpec: t.$root, + styleSpec: t, + style: n, + validateSpec: os, + objectElementValidators: { glyphs: md, "*": () => [] }, + }) + )), + n.constants && + (r = r.concat(eu({ key: "constants", value: n.constants }))), + ss(r) + ); + } + function Ma(n) { + return function (t) { + return n({ ...t, validateSpec: os }); + }; + } + function ss(n) { + return [].concat(n).sort((t, r) => t.line - r.line); + } + function ka(n) { + return function (...t) { + return ss(n.apply(this, t)); + }; + } + (ea.source = ka(Ma(Qi))), + (ea.sprite = ka(Ma(fd))), + (ea.glyphs = ka(Ma(md))), + (ea.light = ka(Ma(is))), + (ea.sky = ka(Ma(ru))), + (ea.terrain = ka(Ma(pd))), + (ea.state = ka(Ma(as))), + (ea.layer = ka(Ma(dd))), + (ea.filter = ka(Ma(tu))), + (ea.paintProperty = ka(Ma(ud))), + (ea.layoutProperty = ka(Ma(hd))); + const ls = ea, + jp = ls.light, + Ws = ls.sky, + Vp = ls.paintProperty, + qp = ls.layoutProperty; + function Xs(n, t) { + let r = !1; + if (t && t.length) + for (const o of t) + n.fire(new Ke(new Error(o.message))), (r = !0); + return r; + } + class Ys { + constructor(t, r, o) { + const c = (this.cells = []); + if (t instanceof ArrayBuffer) { + this.arrayBuffer = t; + const _ = new Int32Array(this.arrayBuffer); + (t = _[0]), (this.d = (r = _[1]) + 2 * (o = _[2])); + for (let b = 0; b < this.d * this.d; b++) { + const S = _[3 + b], + I = _[3 + b + 1]; + c.push(S === I ? null : _.subarray(S, I)); + } + const v = _[3 + c.length + 1]; + (this.keys = _.subarray(_[3 + c.length], v)), + (this.bboxes = _.subarray(v)), + (this.insert = this._insertReadonly); + } else { + this.d = r + 2 * o; + for (let _ = 0; _ < this.d * this.d; _++) c.push([]); + (this.keys = []), (this.bboxes = []); + } + (this.n = r), + (this.extent = t), + (this.padding = o), + (this.scale = r / t), + (this.uid = 0); + const f = (o / r) * t; + (this.min = -f), (this.max = t + f); + } + insert(t, r, o, c, f) { + this._forEachCell( + r, + o, + c, + f, + this._insertCell, + this.uid++, + void 0, + void 0 + ), + this.keys.push(t), + this.bboxes.push(r), + this.bboxes.push(o), + this.bboxes.push(c), + this.bboxes.push(f); + } + _insertReadonly() { + throw new Error( + "Cannot insert into a GridIndex created from an ArrayBuffer." + ); + } + _insertCell(t, r, o, c, f, _) { + this.cells[f].push(_); + } + query(t, r, o, c, f) { + const _ = this.min, + v = this.max; + if (t <= _ && r <= _ && v <= o && v <= c && !f) + return Array.prototype.slice.call(this.keys); + { + const b = []; + return ( + this._forEachCell(t, r, o, c, this._queryCell, b, {}, f), b + ); + } + } + _queryCell(t, r, o, c, f, _, v, b) { + const S = this.cells[f]; + if (S !== null) { + const I = this.keys, + L = this.bboxes; + for (let F = 0; F < S.length; F++) { + const q = S[F]; + if (v[q] === void 0) { + const Z = 4 * q; + ( + b + ? b(L[Z + 0], L[Z + 1], L[Z + 2], L[Z + 3]) + : t <= L[Z + 2] && + r <= L[Z + 3] && + o >= L[Z + 0] && + c >= L[Z + 1] + ) + ? ((v[q] = !0), _.push(I[q])) + : (v[q] = !1); + } + } + } + } + _forEachCell(t, r, o, c, f, _, v, b) { + const S = this._convertToCellCoord(t), + I = this._convertToCellCoord(r), + L = this._convertToCellCoord(o), + F = this._convertToCellCoord(c); + for (let q = S; q <= L; q++) + for (let Z = I; Z <= F; Z++) { + const W = this.d * Z + q; + if ( + (!b || + b( + this._convertFromCellCoord(q), + this._convertFromCellCoord(Z), + this._convertFromCellCoord(q + 1), + this._convertFromCellCoord(Z + 1) + )) && + f.call(this, t, r, o, c, W, _, v, b) + ) + 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, + r = 3 + this.cells.length + 1 + 1; + let o = 0; + for (let _ = 0; _ < this.cells.length; _++) + o += this.cells[_].length; + const c = new Int32Array( + r + o + this.keys.length + this.bboxes.length + ); + (c[0] = this.extent), (c[1] = this.n), (c[2] = this.padding); + let f = r; + for (let _ = 0; _ < t.length; _++) { + const v = t[_]; + (c[3 + _] = f), c.set(v, f), (f += v.length); + } + return ( + (c[3 + t.length] = f), + c.set(this.keys, f), + (f += this.keys.length), + (c[3 + t.length + 1] = f), + c.set(this.bboxes, f), + (f += this.bboxes.length), + c.buffer + ); + } + static serialize(t, r) { + const o = t.toArrayBuffer(); + return r && r.push(o), { buffer: o }; + } + static deserialize(t) { + return new Ys(t.buffer); + } + } + const Aa = {}; + function ir(n, t, r = {}) { + if (Aa[n]) throw new Error(`${n} is already registered.`); + Object.defineProperty(t, "_classRegistryKey", { + value: n, + writeable: !1, + }), + (Aa[n] = { + klass: t, + omit: r.omit || [], + shallow: r.shallow || [], + }); + } + ir("Object", Object), + ir("Set", Set), + ir("TransferableGridIndex", Ys), + ir("Color", Mr), + ir("Error", Error), + ir("AJAXError", ie), + ir("ResolvedImage", Hn), + ir("StylePropertyFunction", Us), + ir("StyleExpression", Wc, { omit: ["_evaluator"] }), + ir("ZoomDependentExpression", Xc), + ir("ZoomConstantExpression", Zs), + ir("CompoundExpression", va, { omit: ["_evaluate"] }); + for (const n in ts) + ts[n]._classRegistryKey || ir(`Expression_${n}`, ts[n]); + function iu(n) { + return ( + n && + typeof ArrayBuffer < "u" && + (n instanceof ArrayBuffer || + (n.constructor && n.constructor.name === "ArrayBuffer")) + ); + } + function Ol(n) { + return n.$name || n.constructor._classRegistryKey; + } + function au(n) { + return ( + !(function (t) { + if (t === null || typeof t != "object") return !1; + const r = Ol(t); + return !(!r || r === "Object"); + })(n) && + (n == null || + typeof n == "boolean" || + typeof n == "number" || + typeof n == "string" || + n instanceof Boolean || + n instanceof Number || + n instanceof String || + n instanceof Date || + n instanceof RegExp || + n instanceof Blob || + n instanceof Error || + iu(n) || + Qt(n) || + ArrayBuffer.isView(n) || + n instanceof ImageData) + ); + } + function cs(n, t) { + if (au(n)) + return ( + (iu(n) || Qt(n)) && t && t.push(n), + ArrayBuffer.isView(n) && t && t.push(n.buffer), + n instanceof ImageData && t && t.push(n.data.buffer), + n + ); + if (Array.isArray(n)) { + const f = []; + for (const _ of n) f.push(cs(_, t)); + return f; + } + if (typeof n != "object") + throw new Error("can't serialize object of type " + typeof n); + const r = Ol(n); + if (!r) + throw new Error( + `can't serialize object of unregistered class ${n.constructor.name}` + ); + if (!Aa[r]) throw new Error(`${r} is not registered.`); + const { klass: o } = Aa[r], + c = o.serialize ? o.serialize(n, t) : {}; + if (o.serialize) { + if (t && c === t[t.length - 1]) + throw new Error( + "statically serialized object won't survive transfer of $name property" + ); + } else { + for (const f in n) { + if (!n.hasOwnProperty(f) || Aa[r].omit.indexOf(f) >= 0) + continue; + const _ = n[f]; + c[f] = Aa[r].shallow.indexOf(f) >= 0 ? _ : cs(_, t); + } + n instanceof Error && (c.message = n.message); + } + if (c.$name) + throw new Error( + "$name property is reserved for worker serialization logic." + ); + return r !== "Object" && (c.$name = r), c; + } + function Oo(n) { + if (au(n)) return n; + if (Array.isArray(n)) return n.map(Oo); + if (typeof n != "object") + throw new Error("can't deserialize object of type " + typeof n); + const t = Ol(n) || "Object"; + if (!Aa[t]) + throw new Error(`can't deserialize unregistered class ${t}`); + const { klass: r } = Aa[t]; + if (!r) + throw new Error(`can't deserialize unregistered class ${t}`); + if (r.deserialize) return r.deserialize(n); + const o = Object.create(r.prototype); + for (const c of Object.keys(n)) { + if (c === "$name") continue; + const f = n[c]; + o[c] = Aa[t].shallow.indexOf(c) >= 0 ? f : Oo(f); + } + return o; + } + class Nl { + constructor() { + this.first = !0; + } + update(t, r) { + const o = Math.floor(t); + return this.first + ? ((this.first = !1), + (this.lastIntegerZoom = o), + (this.lastIntegerZoomTime = 0), + (this.lastZoom = t), + (this.lastFloorZoom = o), + !0) + : (this.lastFloorZoom > o + ? ((this.lastIntegerZoom = o + 1), + (this.lastIntegerZoomTime = r)) + : this.lastFloorZoom < o && + ((this.lastIntegerZoom = o), + (this.lastIntegerZoomTime = r)), + t !== this.lastZoom && + ((this.lastZoom = t), (this.lastFloorZoom = o), !0)); + } + } + const hn = { + "Latin-1 Supplement": (n) => n >= 128 && n <= 255, + "Hangul Jamo": (n) => n >= 4352 && n <= 4607, + Khmer: (n) => n >= 6016 && n <= 6143, + "General Punctuation": (n) => n >= 8192 && n <= 8303, + "Letterlike Symbols": (n) => n >= 8448 && n <= 8527, + "Number Forms": (n) => n >= 8528 && n <= 8591, + "Miscellaneous Technical": (n) => n >= 8960 && n <= 9215, + "Control Pictures": (n) => n >= 9216 && n <= 9279, + "Optical Character Recognition": (n) => n >= 9280 && n <= 9311, + "Enclosed Alphanumerics": (n) => n >= 9312 && n <= 9471, + "Geometric Shapes": (n) => n >= 9632 && n <= 9727, + "Miscellaneous Symbols": (n) => n >= 9728 && n <= 9983, + "Miscellaneous Symbols and Arrows": (n) => + n >= 11008 && n <= 11263, + "Ideographic Description Characters": (n) => + n >= 12272 && n <= 12287, + "CJK Symbols and Punctuation": (n) => n >= 12288 && n <= 12351, + Hiragana: (n) => n >= 12352 && n <= 12447, + Katakana: (n) => n >= 12448 && n <= 12543, + Kanbun: (n) => n >= 12688 && n <= 12703, + "CJK Strokes": (n) => n >= 12736 && n <= 12783, + "Enclosed CJK Letters and Months": (n) => + n >= 12800 && n <= 13055, + "CJK Compatibility": (n) => n >= 13056 && n <= 13311, + "Yijing Hexagram Symbols": (n) => n >= 19904 && n <= 19967, + "CJK Unified Ideographs": (n) => n >= 19968 && n <= 40959, + "Hangul Syllables": (n) => n >= 44032 && n <= 55215, + "Private Use Area": (n) => n >= 57344 && n <= 63743, + "Vertical Forms": (n) => n >= 65040 && n <= 65055, + "CJK Compatibility Forms": (n) => n >= 65072 && n <= 65103, + "Small Form Variants": (n) => n >= 65104 && n <= 65135, + "Halfwidth and Fullwidth Forms": (n) => n >= 65280 && n <= 65519, + }; + function jl(n) { + for (const t of n) if (su(t.charCodeAt(0))) return !0; + return !1; + } + function Zp(n) { + for (const t of n) if (!_d(t.charCodeAt(0))) return !1; + return !0; + } + function Vl(n) { + const t = n + .map((r) => { + try { + return new RegExp(`\\p{sc=${r}}`, "u").source; + } catch { + return null; + } + }) + .filter((r) => r); + return new RegExp(t.join("|"), "u"); + } + const Up = Vl(["Arab", "Dupl", "Mong", "Ougr", "Syrc"]); + function _d(n) { + return !Up.test(String.fromCodePoint(n)); + } + const ou = Vl([ + "Bopo", + "Hani", + "Hira", + "Kana", + "Kits", + "Nshu", + "Tang", + "Yiii", + ]); + function su(n) { + return !( + n !== 746 && + n !== 747 && + (n < 4352 || + !( + (hn["CJK Compatibility Forms"](n) && + !(n >= 65097 && n <= 65103)) || + hn["CJK Compatibility"](n) || + hn["CJK Strokes"](n) || + !( + !hn["CJK Symbols and Punctuation"](n) || + (n >= 12296 && n <= 12305) || + (n >= 12308 && n <= 12319) || + n === 12336 + ) || + hn["Enclosed CJK Letters and Months"](n) || + hn["Ideographic Description Characters"](n) || + hn.Kanbun(n) || + (hn.Katakana(n) && n !== 12540) || + !( + !hn["Halfwidth and Fullwidth Forms"](n) || + n === 65288 || + n === 65289 || + n === 65293 || + (n >= 65306 && n <= 65310) || + n === 65339 || + n === 65341 || + n === 65343 || + (n >= 65371 && n <= 65503) || + n === 65507 || + (n >= 65512 && n <= 65519) + ) || + !( + !hn["Small Form Variants"](n) || + (n >= 65112 && n <= 65118) || + (n >= 65123 && n <= 65126) + ) || + hn["Vertical Forms"](n) || + hn["Yijing Hexagram Symbols"](n) || + new RegExp("\\p{sc=Cans}", "u").test( + String.fromCodePoint(n) + ) || + new RegExp("\\p{sc=Hang}", "u").test( + String.fromCodePoint(n) + ) || + ou.test(String.fromCodePoint(n)) + )) + ); + } + function gd(n) { + return !( + su(n) || + (function (t) { + return !!( + (hn["Latin-1 Supplement"](t) && + (t === 167 || + t === 169 || + t === 174 || + t === 177 || + t === 188 || + t === 189 || + t === 190 || + t === 215 || + t === 247)) || + (hn["General Punctuation"](t) && + (t === 8214 || + t === 8224 || + t === 8225 || + t === 8240 || + t === 8241 || + t === 8251 || + t === 8252 || + t === 8258 || + t === 8263 || + t === 8264 || + t === 8265 || + t === 8273)) || + hn["Letterlike Symbols"](t) || + hn["Number Forms"](t) || + (hn["Miscellaneous Technical"](t) && + ((t >= 8960 && t <= 8967) || + (t >= 8972 && t <= 8991) || + (t >= 8996 && t <= 9e3) || + t === 9003 || + (t >= 9085 && t <= 9114) || + (t >= 9150 && t <= 9165) || + t === 9167 || + (t >= 9169 && t <= 9179) || + (t >= 9186 && t <= 9215))) || + (hn["Control Pictures"](t) && t !== 9251) || + hn["Optical Character Recognition"](t) || + hn["Enclosed Alphanumerics"](t) || + hn["Geometric Shapes"](t) || + (hn["Miscellaneous Symbols"](t) && + !(t >= 9754 && t <= 9759)) || + (hn["Miscellaneous Symbols and Arrows"](t) && + ((t >= 11026 && t <= 11055) || + (t >= 11088 && t <= 11097) || + (t >= 11192 && t <= 11243))) || + hn["CJK Symbols and Punctuation"](t) || + hn.Katakana(t) || + hn["Private Use Area"](t) || + hn["CJK Compatibility Forms"](t) || + hn["Small Form Variants"](t) || + hn["Halfwidth and Fullwidth Forms"](t) || + t === 8734 || + t === 8756 || + t === 8757 || + (t >= 9984 && t <= 10087) || + (t >= 10102 && t <= 10131) || + t === 65532 || + t === 65533 + ); + })(n) + ); + } + const vd = Vl([ + "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 lu(n) { + return vd.test(String.fromCodePoint(n)); + } + function yd(n, t) { + return !( + (!t && lu(n)) || + (n >= 2304 && n <= 3583) || + (n >= 3840 && n <= 4255) || + hn.Khmer(n) + ); + } + function xd(n) { + for (const t of n) if (lu(t.charCodeAt(0))) return !0; + return !1; + } + const Ea = new (class { + constructor() { + (this.TIMEOUT = 5e3), + (this.applyArabicShaping = null), + (this.processBidirectionalText = null), + (this.processStyledBidirectionalText = null), + (this.pluginStatus = "unavailable"), + (this.pluginURL = null), + (this.loadScriptResolve = () => {}); + } + setState(n) { + (this.pluginStatus = n.pluginStatus), + (this.pluginURL = n.pluginURL); + } + getState() { + return { + pluginStatus: this.pluginStatus, + pluginURL: this.pluginURL, + }; + } + setMethods(n) { + if (Ea.isParsed()) + throw new Error("RTL text plugin already registered."); + (this.applyArabicShaping = n.applyArabicShaping), + (this.processBidirectionalText = n.processBidirectionalText), + (this.processStyledBidirectionalText = + n.processStyledBidirectionalText), + this.loadScriptResolve(); + } + isParsed() { + return ( + this.applyArabicShaping != null && + this.processBidirectionalText != null && + this.processStyledBidirectionalText != null + ); + } + getRTLTextPluginStatus() { + return this.pluginStatus; + } + syncState(n, t) { + return s(this, void 0, void 0, function* () { + if (this.isParsed()) return this.getState(); + if (n.pluginStatus !== "loading") return this.setState(n), n; + const r = n.pluginURL, + o = new Promise((f) => { + this.loadScriptResolve = f; + }); + t(r); + const c = new Promise((f) => + setTimeout(() => f(), this.TIMEOUT) + ); + if ((yield Promise.race([o, c]), this.isParsed())) { + const f = { pluginStatus: "loaded", pluginURL: r }; + return this.setState(f), f; + } + throw ( + (this.setState({ pluginStatus: "error", pluginURL: "" }), + new Error( + `RTL Text Plugin failed to import scripts from ${r}` + )) + ); + }); + } + })(); + class Un { + constructor(t, r) { + (this.zoom = t), + r + ? ((this.now = r.now || 0), + (this.fadeDuration = r.fadeDuration || 0), + (this.zoomHistory = r.zoomHistory || new Nl()), + (this.transition = r.transition || {}), + (this.globalState = r.globalState || {})) + : ((this.now = 0), + (this.fadeDuration = 0), + (this.zoomHistory = new Nl()), + (this.transition = {}), + (this.globalState = {})); + } + isSupportedScript(t) { + return (function (r, o) { + for (const c of r) if (!yd(c.charCodeAt(0), o)) return !1; + return !0; + })(t, Ea.getRTLTextPluginStatus() === "loaded"); + } + crossFadingFactor() { + return this.fadeDuration === 0 + ? 1 + : Math.min( + (this.now - this.zoomHistory.lastIntegerZoomTime) / + this.fadeDuration, + 1 + ); + } + getCrossfadeParameters() { + const t = this.zoom, + r = t - Math.floor(t), + o = this.crossFadingFactor(); + return t > this.zoomHistory.lastIntegerZoom + ? { fromScale: 2, toScale: 1, t: r + (1 - r) * o } + : { fromScale: 0.5, toScale: 1, t: 1 - (1 - o) * r }; + } + } + class us { + constructor(t, r) { + (this.property = t), + (this.value = r), + (this.expression = (function (o, c) { + if (Vs(o)) return new Us(o, c); + if (zl(o)) { + const f = id(o, c); + if (f.result === "error") + throw new Error( + f.value + .map((_) => `${_.key}: ${_.message}`) + .join(", ") + ); + return f.value; + } + { + let f = o; + return ( + c.type === "color" && typeof o == "string" + ? (f = Mr.parse(o)) + : c.type !== "padding" || + (typeof o != "number" && !Array.isArray(o)) + ? c.type !== "numberArray" || + (typeof o != "number" && !Array.isArray(o)) + ? c.type !== "colorArray" || + (typeof o != "string" && !Array.isArray(o)) + ? c.type === "variableAnchorOffsetCollection" && + Array.isArray(o) + ? (f = fi.parse(o)) + : c.type === "projectionDefinition" && + typeof o == "string" && + (f = jn.parse(o)) + : (f = fn.parse(o)) + : (f = vn.parse(o)) + : (f = kn.parse(o)), + { + globalStateRefs: new Set(), + kind: "constant", + evaluate: () => f, + } + ); + } + })( + r === void 0 ? t.specification.default : r, + t.specification + )); + } + isDataDriven() { + return ( + this.expression.kind === "source" || + this.expression.kind === "composite" + ); + } + getGlobalStateRefs() { + return this.expression.globalStateRefs || new Set(); + } + possiblyEvaluate(t, r, o) { + return this.property.possiblyEvaluate(this, t, r, o); + } + } + class cu { + constructor(t) { + (this.property = t), (this.value = new us(t, void 0)); + } + transitioned(t, r) { + return new uu( + this.property, + this.value, + r, + dt({}, t.transition, this.transition), + t.now + ); + } + untransitioned() { + return new uu(this.property, this.value, null, {}, 0); + } + } + class bd { + constructor(t) { + (this._properties = t), + (this._values = Object.create( + t.defaultTransitionablePropertyValues + )); + } + getValue(t) { + return wt(this._values[t].value.value); + } + setValue(t, r) { + Object.prototype.hasOwnProperty.call(this._values, t) || + (this._values[t] = new cu(this._values[t].property)), + (this._values[t].value = new us( + this._values[t].property, + r === null ? void 0 : wt(r) + )); + } + getTransition(t) { + return wt(this._values[t].transition); + } + setTransition(t, r) { + Object.prototype.hasOwnProperty.call(this._values, t) || + (this._values[t] = new cu(this._values[t].property)), + (this._values[t].transition = wt(r) || void 0); + } + serialize() { + const t = {}; + for (const r of Object.keys(this._values)) { + const o = this.getValue(r); + o !== void 0 && (t[r] = o); + const c = this.getTransition(r); + c !== void 0 && (t[`${r}-transition`] = c); + } + return t; + } + transitioned(t, r) { + const o = new hu(this._properties); + for (const c of Object.keys(this._values)) + o._values[c] = this._values[c].transitioned(t, r._values[c]); + return o; + } + untransitioned() { + const t = new hu(this._properties); + for (const r of Object.keys(this._values)) + t._values[r] = this._values[r].untransitioned(); + return t; + } + } + class uu { + constructor(t, r, o, c, f) { + (this.property = t), + (this.value = r), + (this.begin = f + c.delay || 0), + (this.end = this.begin + c.duration || 0), + t.specification.transition && + (c.delay || c.duration) && + (this.prior = o); + } + possiblyEvaluate(t, r, o) { + const c = t.now || 0, + f = this.value.possiblyEvaluate(t, r, o), + _ = this.prior; + if (_) { + if (c > this.end) return (this.prior = null), f; + if (this.value.isDataDriven()) return (this.prior = null), f; + if (c < this.begin) return _.possiblyEvaluate(t, r, o); + { + const v = (c - this.begin) / (this.end - this.begin); + return this.property.interpolate( + _.possiblyEvaluate(t, r, o), + f, + it(v) + ); + } + } + return f; + } + } + class hu { + constructor(t) { + (this._properties = t), + (this._values = Object.create( + t.defaultTransitioningPropertyValues + )); + } + possiblyEvaluate(t, r, o) { + const c = new ql(this._properties); + for (const f of Object.keys(this._values)) + c._values[f] = this._values[f].possiblyEvaluate(t, r, o); + return c; + } + hasTransition() { + for (const t of Object.keys(this._values)) + if (this._values[t].prior) return !0; + return !1; + } + } + class wd { + constructor(t) { + (this._properties = t), + (this._values = Object.create(t.defaultPropertyValues)); + } + hasValue(t) { + return this._values[t].value !== void 0; + } + getValue(t) { + return wt(this._values[t].value); + } + setValue(t, r) { + this._values[t] = new us( + this._values[t].property, + r === null ? void 0 : wt(r) + ); + } + serialize() { + const t = {}; + for (const r of Object.keys(this._values)) { + const o = this.getValue(r); + o !== void 0 && (t[r] = o); + } + return t; + } + possiblyEvaluate(t, r, o) { + const c = new ql(this._properties); + for (const f of Object.keys(this._values)) + c._values[f] = this._values[f].possiblyEvaluate(t, r, o); + return c; + } + } + class $a { + constructor(t, r, o) { + (this.property = t), (this.value = r), (this.parameters = o); + } + isConstant() { + return this.value.kind === "constant"; + } + constantOr(t) { + return this.value.kind === "constant" ? this.value.value : t; + } + evaluate(t, r, o, c) { + return this.property.evaluate( + this.value, + this.parameters, + t, + r, + o, + c + ); + } + } + class ql { + constructor(t) { + (this._properties = t), + (this._values = Object.create( + t.defaultPossiblyEvaluatedValues + )); + } + get(t) { + return this._values[t]; + } + } + class wr { + constructor(t) { + this.specification = t; + } + possiblyEvaluate(t, r) { + if (t.isDataDriven()) + throw new Error("Value should not be data driven"); + return t.expression.evaluate(r); + } + interpolate(t, r, o) { + const c = Za[this.specification.type]; + return c ? c(t, r, o) : t; + } + } + class Or { + constructor(t, r) { + (this.specification = t), (this.overrides = r); + } + possiblyEvaluate(t, r, o, c) { + return new $a( + this, + t.expression.kind === "constant" || + t.expression.kind === "camera" + ? { + kind: "constant", + value: t.expression.evaluate(r, null, {}, o, c), + } + : t.expression, + r + ); + } + interpolate(t, r, o) { + if (t.value.kind !== "constant" || r.value.kind !== "constant") + return t; + if (t.value.value === void 0 || r.value.value === void 0) + return new $a( + this, + { kind: "constant", value: void 0 }, + t.parameters + ); + const c = Za[this.specification.type]; + if (c) { + const f = c(t.value.value, r.value.value, o); + return new $a( + this, + { kind: "constant", value: f }, + t.parameters + ); + } + return t; + } + evaluate(t, r, o, c, f, _) { + return t.kind === "constant" + ? t.value + : t.evaluate(r, o, c, f, _); + } + } + class Zl extends Or { + possiblyEvaluate(t, r, o, c) { + if (t.value === void 0) + return new $a(this, { kind: "constant", value: void 0 }, r); + if (t.expression.kind === "constant") { + const f = t.expression.evaluate(r, null, {}, o, c), + _ = + t.property.specification.type === "resolvedImage" && + typeof f != "string" + ? f.name + : f, + v = this._calculate(_, _, _, r); + return new $a(this, { kind: "constant", value: v }, r); + } + if (t.expression.kind === "camera") { + const f = this._calculate( + t.expression.evaluate({ zoom: r.zoom - 1 }), + t.expression.evaluate({ zoom: r.zoom }), + t.expression.evaluate({ zoom: r.zoom + 1 }), + r + ); + return new $a(this, { kind: "constant", value: f }, r); + } + return new $a(this, t.expression, r); + } + evaluate(t, r, o, c, f, _) { + if (t.kind === "source") { + const v = t.evaluate(r, o, c, f, _); + return this._calculate(v, v, v, r); + } + return t.kind === "composite" + ? this._calculate( + t.evaluate({ zoom: Math.floor(r.zoom) - 1 }, o, c), + t.evaluate({ zoom: Math.floor(r.zoom) }, o, c), + t.evaluate({ zoom: Math.floor(r.zoom) + 1 }, o, c), + r + ) + : t.value; + } + _calculate(t, r, o, c) { + return c.zoom > c.zoomHistory.lastIntegerZoom + ? { from: t, to: r } + : { from: o, to: r }; + } + interpolate(t) { + return t; + } + } + class _o { + constructor(t) { + this.specification = t; + } + possiblyEvaluate(t, r, o, c) { + if (t.value !== void 0) { + if (t.expression.kind === "constant") { + const f = t.expression.evaluate(r, null, {}, o, c); + return this._calculate(f, f, f, r); + } + return this._calculate( + t.expression.evaluate(new Un(Math.floor(r.zoom - 1), r)), + t.expression.evaluate(new Un(Math.floor(r.zoom), r)), + t.expression.evaluate(new Un(Math.floor(r.zoom + 1), r)), + r + ); + } + } + _calculate(t, r, o, c) { + return c.zoom > c.zoomHistory.lastIntegerZoom + ? { from: t, to: r } + : { from: o, to: r }; + } + interpolate(t) { + return t; + } + } + class Ul { + constructor(t) { + this.specification = t; + } + possiblyEvaluate(t, r, o, c) { + return !!t.expression.evaluate(r, null, {}, o, c); + } + interpolate() { + return !1; + } + } + class Ui { + constructor(t) { + (this.properties = t), + (this.defaultPropertyValues = {}), + (this.defaultTransitionablePropertyValues = {}), + (this.defaultTransitioningPropertyValues = {}), + (this.defaultPossiblyEvaluatedValues = {}), + (this.overridableProperties = []); + for (const r in t) { + const o = t[r]; + o.specification.overridable && + this.overridableProperties.push(r); + const c = (this.defaultPropertyValues[r] = new us(o, void 0)), + f = (this.defaultTransitionablePropertyValues[r] = new cu( + o + )); + (this.defaultTransitioningPropertyValues[r] = + f.untransitioned()), + (this.defaultPossiblyEvaluatedValues[r] = + c.possiblyEvaluate({})); + } + } + } + ir("DataDrivenProperty", Or), + ir("DataConstantProperty", wr), + ir("CrossFadedDataDrivenProperty", Zl), + ir("CrossFadedProperty", _o), + ir("ColorRampProperty", Ul); + const Td = "-transition"; + class xa extends kt { + constructor(t, r) { + if ( + (super(), + (this.id = t.id), + (this.type = t.type), + (this._featureFilter = { + filter: () => !0, + needGeometry: !1, + getGlobalStateRefs: () => new Set(), + }), + 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 = Ro(t.filter))), + r.layout && (this._unevaluatedLayout = new wd(r.layout)), + r.paint)) + ) { + this._transitionablePaint = new bd(r.paint); + for (const o in t.paint) + this.setPaintProperty(o, t.paint[o], { validate: !1 }); + for (const o in t.layout) + this.setLayoutProperty(o, t.layout[o], { validate: !1 }); + (this._transitioningPaint = + this._transitionablePaint.untransitioned()), + (this.paint = new ql(r.paint)); + } + } + setFilter(t) { + (this.filter = t), (this._featureFilter = Ro(t)); + } + getCrossfadeParameters() { + return this._crossfadeParameters; + } + getLayoutProperty(t) { + return t === "visibility" + ? this.visibility + : this._unevaluatedLayout.getValue(t); + } + getLayoutAffectingGlobalStateRefs() { + const t = new Set(); + if (this._unevaluatedLayout) + for (const r in this._unevaluatedLayout._values) { + const o = this._unevaluatedLayout._values[r]; + for (const c of o.getGlobalStateRefs()) t.add(c); + } + for (const r of this._featureFilter.getGlobalStateRefs()) + t.add(r); + return t; + } + setLayoutProperty(t, r, o = {}) { + (r != null && + this._validate( + qp, + `layers.${this.id}.layout.${t}`, + t, + r, + o + )) || + (t !== "visibility" + ? this._unevaluatedLayout.setValue(t, r) + : (this.visibility = r)); + } + getPaintProperty(t) { + return t.endsWith(Td) + ? this._transitionablePaint.getTransition(t.slice(0, -11)) + : this._transitionablePaint.getValue(t); + } + setPaintProperty(t, r, o = {}) { + if ( + r != null && + this._validate(Vp, `layers.${this.id}.paint.${t}`, t, r, o) + ) + return !1; + if (t.endsWith(Td)) + return ( + this._transitionablePaint.setTransition( + t.slice(0, -11), + r || void 0 + ), + !1 + ); + { + const c = this._transitionablePaint._values[t], + f = + c.property.specification["property-type"] === + "cross-faded-data-driven", + _ = c.value.isDataDriven(), + v = c.value; + this._transitionablePaint.setValue(t, r), + this._handleSpecialPaintPropertyUpdate(t); + const b = this._transitionablePaint._values[t].value; + return ( + b.isDataDriven() || + _ || + f || + this._handleOverridablePaintPropertyUpdate(t, v, b) + ); + } + } + _handleSpecialPaintPropertyUpdate(t) {} + _handleOverridablePaintPropertyUpdate(t, r, o) { + return !1; + } + isHidden(t) { + return ( + !!(this.minzoom && t < this.minzoom) || + !!(this.maxzoom && t >= this.maxzoom) || + this.visibility === "none" + ); + } + updateTransitions(t) { + this._transitioningPaint = + this._transitionablePaint.transitioned( + t, + this._transitioningPaint + ); + } + hasTransition() { + return this._transitioningPaint.hasTransition(); + } + recalculate(t, r) { + t.getCrossfadeParameters && + (this._crossfadeParameters = t.getCrossfadeParameters()), + this._unevaluatedLayout && + (this.layout = this._unevaluatedLayout.possiblyEvaluate( + t, + void 0, + r + )), + (this.paint = this._transitioningPaint.possiblyEvaluate( + t, + void 0, + r + )); + } + serialize() { + const t = { + 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: + this._unevaluatedLayout && + this._unevaluatedLayout.serialize(), + paint: + this._transitionablePaint && + this._transitionablePaint.serialize(), + }; + return ( + this.visibility && + ((t.layout = t.layout || {}), + (t.layout.visibility = this.visibility)), + St( + t, + (r, o) => + !( + r === void 0 || + (o === "layout" && !Object.keys(r).length) || + (o === "paint" && !Object.keys(r).length) + ) + ) + ); + } + _validate(t, r, o, c, f = {}) { + return ( + (!f || f.validate !== !1) && + Xs( + this, + t.call(ls, { + key: r, + layerType: this.type, + objectKey: o, + value: c, + styleSpec: ye, + style: { glyphs: !0, sprite: !0 }, + }) + ) + ); + } + is3D() { + return !1; + } + isTileClipped() { + return !1; + } + hasOffscreenPass() { + return !1; + } + resize() {} + isStateDependent() { + for (const t in this.paint._values) { + const r = this.paint.get(t); + if ( + r instanceof $a && + fo(r.property.specification) && + (r.value.kind === "source" || + r.value.kind === "composite") && + r.value.isStateDependent + ) + return !0; + } + return !1; + } + } + const $p = { + Int8: Int8Array, + Uint8: Uint8Array, + Int16: Int16Array, + Uint16: Uint16Array, + Int32: Int32Array, + Uint32: Uint32Array, + Float32: Float32Array, + }; + class Ks { + constructor(t, r) { + (this._structArray = t), + (this._pos1 = r * this.size), + (this._pos2 = this._pos1 / 2), + (this._pos4 = this._pos1 / 4), + (this._pos8 = this._pos1 / 8); + } + } + class Dn { + constructor() { + (this.isTransferred = !1), (this.capacity = -1), this.resize(0); + } + static serialize(t, r) { + return ( + t._trim(), + r && ((t.isTransferred = !0), r.push(t.arrayBuffer)), + { length: t.length, arrayBuffer: t.arrayBuffer } + ); + } + static deserialize(t) { + const r = Object.create(this.prototype); + return ( + (r.arrayBuffer = t.arrayBuffer), + (r.length = t.length), + (r.capacity = t.arrayBuffer.byteLength / r.bytesPerElement), + r._refreshViews(), + r + ); + } + _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 r = this.uint8; + this._refreshViews(), r && this.uint8.set(r); + } + } + _refreshViews() { + throw new Error( + "_refreshViews() must be implemented by each concrete StructArray layout" + ); + } + } + function ti(n, t = 1) { + let r = 0, + o = 0; + return { + members: n.map((c) => { + const f = $p[c.type].BYTES_PER_ELEMENT, + _ = (r = $l(r, Math.max(t, f))), + v = c.components || 1; + return ( + (o = Math.max(o, f)), + (r += f * v), + { name: c.name, type: c.type, components: v, offset: _ } + ); + }), + size: $l(r, Math.max(o, t)), + alignment: t, + }; + } + function $l(n, t) { + return Math.ceil(n / t) * t; + } + class hs extends Dn { + _refreshViews() { + (this.uint8 = new Uint8Array(this.arrayBuffer)), + (this.int16 = new Int16Array(this.arrayBuffer)); + } + emplaceBack(t, r) { + const o = this.length; + return this.resize(o + 1), this.emplace(o, t, r); + } + emplace(t, r, o) { + const c = 2 * t; + return (this.int16[c + 0] = r), (this.int16[c + 1] = o), t; + } + } + (hs.prototype.bytesPerElement = 4), ir("StructArrayLayout2i4", hs); + class ds extends Dn { + _refreshViews() { + (this.uint8 = new Uint8Array(this.arrayBuffer)), + (this.int16 = new Int16Array(this.arrayBuffer)); + } + emplaceBack(t, r, o) { + const c = this.length; + return this.resize(c + 1), this.emplace(c, t, r, o); + } + emplace(t, r, o, c) { + const f = 3 * t; + return ( + (this.int16[f + 0] = r), + (this.int16[f + 1] = o), + (this.int16[f + 2] = c), + t + ); + } + } + (ds.prototype.bytesPerElement = 6), ir("StructArrayLayout3i6", ds); + class du extends Dn { + _refreshViews() { + (this.uint8 = new Uint8Array(this.arrayBuffer)), + (this.int16 = new Int16Array(this.arrayBuffer)); + } + emplaceBack(t, r, o, c) { + const f = this.length; + return this.resize(f + 1), this.emplace(f, t, r, o, c); + } + emplace(t, r, o, c, f) { + const _ = 4 * t; + return ( + (this.int16[_ + 0] = r), + (this.int16[_ + 1] = o), + (this.int16[_ + 2] = c), + (this.int16[_ + 3] = f), + t + ); + } + } + (du.prototype.bytesPerElement = 8), ir("StructArrayLayout4i8", du); + class ps extends Dn { + _refreshViews() { + (this.uint8 = new Uint8Array(this.arrayBuffer)), + (this.int16 = new Int16Array(this.arrayBuffer)); + } + emplaceBack(t, r, o, c, f, _) { + const v = this.length; + return this.resize(v + 1), this.emplace(v, t, r, o, c, f, _); + } + emplace(t, r, o, c, f, _, v) { + const b = 6 * t; + return ( + (this.int16[b + 0] = r), + (this.int16[b + 1] = o), + (this.int16[b + 2] = c), + (this.int16[b + 3] = f), + (this.int16[b + 4] = _), + (this.int16[b + 5] = v), + t + ); + } + } + (ps.prototype.bytesPerElement = 12), + ir("StructArrayLayout2i4i12", ps); + class No extends Dn { + _refreshViews() { + (this.uint8 = new Uint8Array(this.arrayBuffer)), + (this.int16 = new Int16Array(this.arrayBuffer)); + } + emplaceBack(t, r, o, c, f, _) { + const v = this.length; + return this.resize(v + 1), this.emplace(v, t, r, o, c, f, _); + } + emplace(t, r, o, c, f, _, v) { + const b = 4 * t, + S = 8 * t; + return ( + (this.int16[b + 0] = r), + (this.int16[b + 1] = o), + (this.uint8[S + 4] = c), + (this.uint8[S + 5] = f), + (this.uint8[S + 6] = _), + (this.uint8[S + 7] = v), + t + ); + } + } + (No.prototype.bytesPerElement = 8), + ir("StructArrayLayout2i4ub8", No); + class Js extends Dn { + _refreshViews() { + (this.uint8 = new Uint8Array(this.arrayBuffer)), + (this.float32 = new Float32Array(this.arrayBuffer)); + } + emplaceBack(t, r) { + const o = this.length; + return this.resize(o + 1), this.emplace(o, t, r); + } + emplace(t, r, o) { + const c = 2 * t; + return (this.float32[c + 0] = r), (this.float32[c + 1] = o), t; + } + } + (Js.prototype.bytesPerElement = 8), ir("StructArrayLayout2f8", Js); + class Gl extends Dn { + _refreshViews() { + (this.uint8 = new Uint8Array(this.arrayBuffer)), + (this.uint16 = new Uint16Array(this.arrayBuffer)); + } + emplaceBack(t, r, o, c, f, _, v, b, S, I) { + const L = this.length; + return ( + this.resize(L + 1), + this.emplace(L, t, r, o, c, f, _, v, b, S, I) + ); + } + emplace(t, r, o, c, f, _, v, b, S, I, L) { + const F = 10 * t; + return ( + (this.uint16[F + 0] = r), + (this.uint16[F + 1] = o), + (this.uint16[F + 2] = c), + (this.uint16[F + 3] = f), + (this.uint16[F + 4] = _), + (this.uint16[F + 5] = v), + (this.uint16[F + 6] = b), + (this.uint16[F + 7] = S), + (this.uint16[F + 8] = I), + (this.uint16[F + 9] = L), + t + ); + } + } + (Gl.prototype.bytesPerElement = 20), + ir("StructArrayLayout10ui20", Gl); + class jo extends Dn { + _refreshViews() { + (this.uint8 = new Uint8Array(this.arrayBuffer)), + (this.int16 = new Int16Array(this.arrayBuffer)), + (this.uint16 = new Uint16Array(this.arrayBuffer)); + } + emplaceBack(t, r, o, c, f, _, v, b, S, I, L, F) { + const q = this.length; + return ( + this.resize(q + 1), + this.emplace(q, t, r, o, c, f, _, v, b, S, I, L, F) + ); + } + emplace(t, r, o, c, f, _, v, b, S, I, L, F, q) { + const Z = 12 * t; + return ( + (this.int16[Z + 0] = r), + (this.int16[Z + 1] = o), + (this.int16[Z + 2] = c), + (this.int16[Z + 3] = f), + (this.uint16[Z + 4] = _), + (this.uint16[Z + 5] = v), + (this.uint16[Z + 6] = b), + (this.uint16[Z + 7] = S), + (this.int16[Z + 8] = I), + (this.int16[Z + 9] = L), + (this.int16[Z + 10] = F), + (this.int16[Z + 11] = q), + t + ); + } + } + (jo.prototype.bytesPerElement = 24), + ir("StructArrayLayout4i4ui4i24", jo); + class pu extends Dn { + _refreshViews() { + (this.uint8 = new Uint8Array(this.arrayBuffer)), + (this.float32 = new Float32Array(this.arrayBuffer)); + } + emplaceBack(t, r, o) { + const c = this.length; + return this.resize(c + 1), this.emplace(c, t, r, o); + } + emplace(t, r, o, c) { + const f = 3 * t; + return ( + (this.float32[f + 0] = r), + (this.float32[f + 1] = o), + (this.float32[f + 2] = c), + t + ); + } + } + (pu.prototype.bytesPerElement = 12), + ir("StructArrayLayout3f12", pu); + class fu extends Dn { + _refreshViews() { + (this.uint8 = new Uint8Array(this.arrayBuffer)), + (this.uint32 = new Uint32Array(this.arrayBuffer)); + } + emplaceBack(t) { + const r = this.length; + return this.resize(r + 1), this.emplace(r, t); + } + emplace(t, r) { + return (this.uint32[1 * t + 0] = r), t; + } + } + (fu.prototype.bytesPerElement = 4), ir("StructArrayLayout1ul4", fu); + class Hl extends Dn { + _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, r, o, c, f, _, v, b, S) { + const I = this.length; + return ( + this.resize(I + 1), this.emplace(I, t, r, o, c, f, _, v, b, S) + ); + } + emplace(t, r, o, c, f, _, v, b, S, I) { + const L = 10 * t, + F = 5 * t; + return ( + (this.int16[L + 0] = r), + (this.int16[L + 1] = o), + (this.int16[L + 2] = c), + (this.int16[L + 3] = f), + (this.int16[L + 4] = _), + (this.int16[L + 5] = v), + (this.uint32[F + 3] = b), + (this.uint16[L + 8] = S), + (this.uint16[L + 9] = I), + t + ); + } + } + (Hl.prototype.bytesPerElement = 20), + ir("StructArrayLayout6i1ul2ui20", Hl); + class mu extends Dn { + _refreshViews() { + (this.uint8 = new Uint8Array(this.arrayBuffer)), + (this.int16 = new Int16Array(this.arrayBuffer)); + } + emplaceBack(t, r, o, c, f, _) { + const v = this.length; + return this.resize(v + 1), this.emplace(v, t, r, o, c, f, _); + } + emplace(t, r, o, c, f, _, v) { + const b = 6 * t; + return ( + (this.int16[b + 0] = r), + (this.int16[b + 1] = o), + (this.int16[b + 2] = c), + (this.int16[b + 3] = f), + (this.int16[b + 4] = _), + (this.int16[b + 5] = v), + t + ); + } + } + (mu.prototype.bytesPerElement = 12), + ir("StructArrayLayout2i2i2i12", mu); + class h extends Dn { + _refreshViews() { + (this.uint8 = new Uint8Array(this.arrayBuffer)), + (this.float32 = new Float32Array(this.arrayBuffer)), + (this.int16 = new Int16Array(this.arrayBuffer)); + } + emplaceBack(t, r, o, c, f) { + const _ = this.length; + return this.resize(_ + 1), this.emplace(_, t, r, o, c, f); + } + emplace(t, r, o, c, f, _) { + const v = 4 * t, + b = 8 * t; + return ( + (this.float32[v + 0] = r), + (this.float32[v + 1] = o), + (this.float32[v + 2] = c), + (this.int16[b + 6] = f), + (this.int16[b + 7] = _), + t + ); + } + } + (h.prototype.bytesPerElement = 16), + ir("StructArrayLayout2f1f2i16", h); + class e extends Dn { + _refreshViews() { + (this.uint8 = new Uint8Array(this.arrayBuffer)), + (this.float32 = new Float32Array(this.arrayBuffer)), + (this.int16 = new Int16Array(this.arrayBuffer)); + } + emplaceBack(t, r, o, c, f, _) { + const v = this.length; + return this.resize(v + 1), this.emplace(v, t, r, o, c, f, _); + } + emplace(t, r, o, c, f, _, v) { + const b = 16 * t, + S = 4 * t, + I = 8 * t; + return ( + (this.uint8[b + 0] = r), + (this.uint8[b + 1] = o), + (this.float32[S + 1] = c), + (this.float32[S + 2] = f), + (this.int16[I + 6] = _), + (this.int16[I + 7] = v), + t + ); + } + } + (e.prototype.bytesPerElement = 16), + ir("StructArrayLayout2ub2f2i16", e); + class i extends Dn { + _refreshViews() { + (this.uint8 = new Uint8Array(this.arrayBuffer)), + (this.uint16 = new Uint16Array(this.arrayBuffer)); + } + emplaceBack(t, r, o) { + const c = this.length; + return this.resize(c + 1), this.emplace(c, t, r, o); + } + emplace(t, r, o, c) { + const f = 3 * t; + return ( + (this.uint16[f + 0] = r), + (this.uint16[f + 1] = o), + (this.uint16[f + 2] = c), + t + ); + } + } + (i.prototype.bytesPerElement = 6), ir("StructArrayLayout3ui6", i); + class l extends Dn { + _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, r, o, c, f, _, v, b, S, I, L, F, q, Z, W, J, le) { + const Re = this.length; + return ( + this.resize(Re + 1), + this.emplace( + Re, + t, + r, + o, + c, + f, + _, + v, + b, + S, + I, + L, + F, + q, + Z, + W, + J, + le + ) + ); + } + emplace(t, r, o, c, f, _, v, b, S, I, L, F, q, Z, W, J, le, Re) { + const xe = 24 * t, + Ce = 12 * t, + Ye = 48 * t; + return ( + (this.int16[xe + 0] = r), + (this.int16[xe + 1] = o), + (this.uint16[xe + 2] = c), + (this.uint16[xe + 3] = f), + (this.uint32[Ce + 2] = _), + (this.uint32[Ce + 3] = v), + (this.uint32[Ce + 4] = b), + (this.uint16[xe + 10] = S), + (this.uint16[xe + 11] = I), + (this.uint16[xe + 12] = L), + (this.float32[Ce + 7] = F), + (this.float32[Ce + 8] = q), + (this.uint8[Ye + 36] = Z), + (this.uint8[Ye + 37] = W), + (this.uint8[Ye + 38] = J), + (this.uint32[Ce + 10] = le), + (this.int16[xe + 22] = Re), + t + ); + } + } + (l.prototype.bytesPerElement = 48), + ir("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48", l); + class u extends Dn { + _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, + r, + o, + c, + f, + _, + v, + b, + S, + I, + L, + F, + q, + Z, + W, + J, + le, + Re, + xe, + Ce, + Ye, + lt, + Pt, + Yt, + qt, + Ht, + Sr, + Gt + ) { + const Wt = this.length; + return ( + this.resize(Wt + 1), + this.emplace( + Wt, + t, + r, + o, + c, + f, + _, + v, + b, + S, + I, + L, + F, + q, + Z, + W, + J, + le, + Re, + xe, + Ce, + Ye, + lt, + Pt, + Yt, + qt, + Ht, + Sr, + Gt + ) + ); + } + emplace( + t, + r, + o, + c, + f, + _, + v, + b, + S, + I, + L, + F, + q, + Z, + W, + J, + le, + Re, + xe, + Ce, + Ye, + lt, + Pt, + Yt, + qt, + Ht, + Sr, + Gt, + Wt + ) { + const gt = 32 * t, + Nr = 16 * t; + return ( + (this.int16[gt + 0] = r), + (this.int16[gt + 1] = o), + (this.int16[gt + 2] = c), + (this.int16[gt + 3] = f), + (this.int16[gt + 4] = _), + (this.int16[gt + 5] = v), + (this.int16[gt + 6] = b), + (this.int16[gt + 7] = S), + (this.uint16[gt + 8] = I), + (this.uint16[gt + 9] = L), + (this.uint16[gt + 10] = F), + (this.uint16[gt + 11] = q), + (this.uint16[gt + 12] = Z), + (this.uint16[gt + 13] = W), + (this.uint16[gt + 14] = J), + (this.uint16[gt + 15] = le), + (this.uint16[gt + 16] = Re), + (this.uint16[gt + 17] = xe), + (this.uint16[gt + 18] = Ce), + (this.uint16[gt + 19] = Ye), + (this.uint16[gt + 20] = lt), + (this.uint16[gt + 21] = Pt), + (this.uint16[gt + 22] = Yt), + (this.uint32[Nr + 12] = qt), + (this.float32[Nr + 13] = Ht), + (this.float32[Nr + 14] = Sr), + (this.uint16[gt + 30] = Gt), + (this.uint16[gt + 31] = Wt), + t + ); + } + } + (u.prototype.bytesPerElement = 64), + ir("StructArrayLayout8i15ui1ul2f2ui64", u); + class d extends Dn { + _refreshViews() { + (this.uint8 = new Uint8Array(this.arrayBuffer)), + (this.float32 = new Float32Array(this.arrayBuffer)); + } + emplaceBack(t) { + const r = this.length; + return this.resize(r + 1), this.emplace(r, t); + } + emplace(t, r) { + return (this.float32[1 * t + 0] = r), t; + } + } + (d.prototype.bytesPerElement = 4), ir("StructArrayLayout1f4", d); + class g extends Dn { + _refreshViews() { + (this.uint8 = new Uint8Array(this.arrayBuffer)), + (this.uint16 = new Uint16Array(this.arrayBuffer)), + (this.float32 = new Float32Array(this.arrayBuffer)); + } + emplaceBack(t, r, o) { + const c = this.length; + return this.resize(c + 1), this.emplace(c, t, r, o); + } + emplace(t, r, o, c) { + const f = 3 * t; + return ( + (this.uint16[6 * t + 0] = r), + (this.float32[f + 1] = o), + (this.float32[f + 2] = c), + t + ); + } + } + (g.prototype.bytesPerElement = 12), + ir("StructArrayLayout1ui2f12", g); + class w extends Dn { + _refreshViews() { + (this.uint8 = new Uint8Array(this.arrayBuffer)), + (this.uint32 = new Uint32Array(this.arrayBuffer)), + (this.uint16 = new Uint16Array(this.arrayBuffer)); + } + emplaceBack(t, r, o) { + const c = this.length; + return this.resize(c + 1), this.emplace(c, t, r, o); + } + emplace(t, r, o, c) { + const f = 4 * t; + return ( + (this.uint32[2 * t + 0] = r), + (this.uint16[f + 2] = o), + (this.uint16[f + 3] = c), + t + ); + } + } + (w.prototype.bytesPerElement = 8), + ir("StructArrayLayout1ul2ui8", w); + class C extends Dn { + _refreshViews() { + (this.uint8 = new Uint8Array(this.arrayBuffer)), + (this.uint16 = new Uint16Array(this.arrayBuffer)); + } + emplaceBack(t, r) { + const o = this.length; + return this.resize(o + 1), this.emplace(o, t, r); + } + emplace(t, r, o) { + const c = 2 * t; + return (this.uint16[c + 0] = r), (this.uint16[c + 1] = o), t; + } + } + (C.prototype.bytesPerElement = 4), ir("StructArrayLayout2ui4", C); + class P extends Dn { + _refreshViews() { + (this.uint8 = new Uint8Array(this.arrayBuffer)), + (this.uint16 = new Uint16Array(this.arrayBuffer)); + } + emplaceBack(t) { + const r = this.length; + return this.resize(r + 1), this.emplace(r, t); + } + emplace(t, r) { + return (this.uint16[1 * t + 0] = r), t; + } + } + (P.prototype.bytesPerElement = 2), ir("StructArrayLayout1ui2", P); + class E extends Dn { + _refreshViews() { + (this.uint8 = new Uint8Array(this.arrayBuffer)), + (this.float32 = new Float32Array(this.arrayBuffer)); + } + emplaceBack(t, r, o, c) { + const f = this.length; + return this.resize(f + 1), this.emplace(f, t, r, o, c); + } + emplace(t, r, o, c, f) { + const _ = 4 * t; + return ( + (this.float32[_ + 0] = r), + (this.float32[_ + 1] = o), + (this.float32[_ + 2] = c), + (this.float32[_ + 3] = f), + t + ); + } + } + (E.prototype.bytesPerElement = 16), ir("StructArrayLayout4f16", E); + class R extends Ks { + 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]; + } + get anchorPoint() { + return new B(this.anchorPointX, this.anchorPointY); + } + } + R.prototype.size = 20; + class D extends Hl { + get(t) { + return new R(this, t); + } + } + ir("CollisionBoxArray", D); + class N extends Ks { + 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]; + } + } + N.prototype.size = 48; + class G extends l { + get(t) { + return new N(this, t); + } + } + ir("PlacedSymbolArray", G); + class te extends Ks { + 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]; + } + } + te.prototype.size = 64; + class Q extends u { + get(t) { + return new te(this, t); + } + } + ir("SymbolInstanceArray", Q); + class ae extends d { + getoffsetX(t) { + return this.float32[1 * t + 0]; + } + } + ir("GlyphOffsetArray", ae); + class ce extends ds { + getx(t) { + return this.int16[3 * t + 0]; + } + gety(t) { + return this.int16[3 * t + 1]; + } + gettileUnitDistanceFromAnchor(t) { + return this.int16[3 * t + 2]; + } + } + ir("SymbolLineVertexArray", ce); + class ve extends Ks { + 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]; + } + } + ve.prototype.size = 12; + class me extends g { + get(t) { + return new ve(this, t); + } + } + ir("TextAnchorOffsetArray", me); + class be extends Ks { + 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]; + } + } + be.prototype.size = 8; + class Pe extends w { + get(t) { + return new be(this, t); + } + } + ir("FeatureIndexArray", Pe); + class _e extends hs {} + class Be extends hs {} + class rt extends hs {} + class Ge extends ps {} + class Xe extends No {} + class tt extends Js {} + class jt extends Gl {} + class Zt extends jo {} + class Tt extends pu {} + class vr extends fu {} + class Jr extends mu {} + class An extends e {} + class Rn extends i {} + class Ln extends C {} + const Wn = ti([{ name: "a_pos", components: 2, type: "Int16" }], 4), + { members: Jn } = Wn; + class Kr { + constructor(t = []) { + (this._forceNewSegmentOnNextPrepare = !1), (this.segments = t); + } + prepareSegment(t, r, o, c) { + const f = this.segments[this.segments.length - 1]; + return ( + t > Kr.MAX_VERTEX_ARRAY_LENGTH && + Lt( + `Max vertices per segment is ${Kr.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${Kr.MAX_VERTEX_ARRAY_LENGTH} vertices.` + ), + this._forceNewSegmentOnNextPrepare || + !f || + f.vertexLength + t > Kr.MAX_VERTEX_ARRAY_LENGTH || + f.sortKey !== c + ? this.createNewSegment(r, o, c) + : f + ); + } + createNewSegment(t, r, o) { + const c = { + vertexOffset: t.length, + primitiveOffset: r.length, + vertexLength: 0, + primitiveLength: 0, + vaos: {}, + }; + return ( + o !== void 0 && (c.sortKey = o), + (this._forceNewSegmentOnNextPrepare = !1), + this.segments.push(c), + c + ); + } + getOrCreateLatestSegment(t, r, o) { + return this.prepareSegment(0, t, r, o); + } + forceNewSegmentOnNextPrepare() { + this._forceNewSegmentOnNextPrepare = !0; + } + get() { + return this.segments; + } + destroy() { + for (const t of this.segments) + for (const r in t.vaos) t.vaos[r].destroy(); + } + static simpleSegment(t, r, o, c) { + return new Kr([ + { + vertexOffset: t, + primitiveOffset: r, + vertexLength: o, + primitiveLength: c, + vaos: {}, + sortKey: 0, + }, + ]); + } + } + function Bn(n, t) { + return ( + 256 * (n = Dt(Math.floor(n), 0, 255)) + + Dt(Math.floor(t), 0, 255) + ); + } + (Kr.MAX_VERTEX_ARRAY_LENGTH = Math.pow(2, 16) - 1), + ir("SegmentVector", Kr); + const si = ti([ + { 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" }, + ]); + var mi, + Ci, + $i, + za = { exports: {} }, + go = { exports: {} }, + vo = { exports: {} }, + fs = (function () { + if ($i) return za.exports; + $i = 1; + var n = + (mi || + ((mi = 1), + (go.exports = function (r, o) { + var c, f, _, v, b, S, I, L; + for ( + f = r.length - (c = 3 & r.length), + _ = o, + b = 3432918353, + S = 461845907, + L = 0; + L < f; + + ) + (I = + (255 & r.charCodeAt(L)) | + ((255 & r.charCodeAt(++L)) << 8) | + ((255 & r.charCodeAt(++L)) << 16) | + ((255 & r.charCodeAt(++L)) << 24)), + ++L, + (_ = + 27492 + + (65535 & + (v = + (5 * + (65535 & + (_ = + ((_ ^= I = + ((65535 & + (I = + ((I = + ((65535 & I) * b + + ((((I >>> 16) * b) & 65535) << + 16)) & + 4294967295) << + 15) | + (I >>> 17))) * + S + + ((((I >>> 16) * S) & 65535) << + 16)) & + 4294967295) << + 13) | + (_ >>> 19))) + + (((5 * (_ >>> 16)) & 65535) << 16)) & + 4294967295)) + + (((58964 + (v >>> 16)) & 65535) << 16)); + switch (((I = 0), c)) { + case 3: + I ^= (255 & r.charCodeAt(L + 2)) << 16; + case 2: + I ^= (255 & r.charCodeAt(L + 1)) << 8; + case 1: + _ ^= I = + ((65535 & + (I = + ((I = + ((65535 & (I ^= 255 & r.charCodeAt(L))) * + b + + ((((I >>> 16) * b) & 65535) << 16)) & + 4294967295) << + 15) | + (I >>> 17))) * + S + + ((((I >>> 16) * S) & 65535) << 16)) & + 4294967295; + } + return ( + (_ ^= r.length), + (_ = + (2246822507 * (65535 & (_ ^= _ >>> 16)) + + (((2246822507 * (_ >>> 16)) & 65535) << 16)) & + 4294967295), + (_ = + (3266489909 * (65535 & (_ ^= _ >>> 13)) + + (((3266489909 * (_ >>> 16)) & 65535) << 16)) & + 4294967295), + (_ ^= _ >>> 16) >>> 0 + ); + })), + go.exports), + t = + (Ci || + ((Ci = 1), + (vo.exports = function (r, o) { + for (var c, f = r.length, _ = o ^ f, v = 0; f >= 4; ) + (c = + 1540483477 * + (65535 & + (c = + (255 & r.charCodeAt(v)) | + ((255 & r.charCodeAt(++v)) << 8) | + ((255 & r.charCodeAt(++v)) << 16) | + ((255 & r.charCodeAt(++v)) << 24))) + + (((1540483477 * (c >>> 16)) & 65535) << 16)), + (_ = + (1540483477 * (65535 & _) + + (((1540483477 * (_ >>> 16)) & 65535) << 16)) ^ + (c = + 1540483477 * (65535 & (c ^= c >>> 24)) + + (((1540483477 * (c >>> 16)) & 65535) << 16))), + (f -= 4), + ++v; + switch (f) { + case 3: + _ ^= (255 & r.charCodeAt(v + 2)) << 16; + case 2: + _ ^= (255 & r.charCodeAt(v + 1)) << 8; + case 1: + _ = + 1540483477 * + (65535 & (_ ^= 255 & r.charCodeAt(v))) + + (((1540483477 * (_ >>> 16)) & 65535) << 16); + } + return ( + (_ = + 1540483477 * (65535 & (_ ^= _ >>> 13)) + + (((1540483477 * (_ >>> 16)) & 65535) << 16)), + (_ ^= _ >>> 15) >>> 0 + ); + })), + vo.exports); + return ( + (za.exports = n), + (za.exports.murmur3 = n), + (za.exports.murmur2 = t), + za.exports + ); + })(), + ms = O(fs); + class Vo { + constructor() { + (this.ids = []), (this.positions = []), (this.indexed = !1); + } + add(t, r, o, c) { + this.ids.push(qo(t)), this.positions.push(r, o, c); + } + getPositions(t) { + if (!this.indexed) + throw new Error( + "Trying to get index, but feature positions are not indexed" + ); + const r = qo(t); + let o = 0, + c = this.ids.length - 1; + for (; o < c; ) { + const _ = (o + c) >> 1; + this.ids[_] >= r ? (c = _) : (o = _ + 1); + } + const f = []; + for (; this.ids[o] === r; ) + f.push({ + index: this.positions[3 * o], + start: this.positions[3 * o + 1], + end: this.positions[3 * o + 2], + }), + o++; + return f; + } + static serialize(t, r) { + const o = new Float64Array(t.ids), + c = new Uint32Array(t.positions); + return ( + ta(o, c, 0, o.length - 1), + r && r.push(o.buffer, c.buffer), + { ids: o, positions: c } + ); + } + static deserialize(t) { + const r = new Vo(); + return ( + (r.ids = t.ids), + (r.positions = t.positions), + (r.indexed = !0), + r + ); + } + } + function qo(n) { + const t = +n; + return !isNaN(t) && t <= Number.MAX_SAFE_INTEGER + ? t + : ms(String(n)); + } + function ta(n, t, r, o) { + for (; r < o; ) { + const c = n[(r + o) >> 1]; + let f = r - 1, + _ = o + 1; + for (;;) { + do f++; + while (n[f] < c); + do _--; + while (n[_] > c); + if (f >= _) break; + La(n, f, _), + La(t, 3 * f, 3 * _), + La(t, 3 * f + 1, 3 * _ + 1), + La(t, 3 * f + 2, 3 * _ + 2); + } + _ - r < o - _ + ? (ta(n, t, r, _), (r = _ + 1)) + : (ta(n, t, _ + 1, o), (o = _)); + } + } + function La(n, t, r) { + const o = n[t]; + (n[t] = n[r]), (n[r] = o); + } + ir("FeaturePositionMap", Vo); + class Gi { + constructor(t, r) { + (this.gl = t.gl), (this.location = r); + } + } + class yo extends Gi { + constructor(t, r) { + super(t, r), (this.current = 0); + } + set(t) { + this.current !== t && + ((this.current = t), this.gl.uniform1f(this.location, t)); + } + } + class li extends Gi { + constructor(t, r) { + super(t, r), (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 _i extends Gi { + constructor(t, r) { + super(t, r), (this.current = Mr.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 ba = new Float32Array(16); + function ci(n) { + return [Bn(255 * n.r, 255 * n.g), Bn(255 * n.b, 255 * n.a)]; + } + class Qs { + constructor(t, r, o) { + (this.value = t), + (this.uniformNames = r.map((c) => `u_${c}`)), + (this.type = o); + } + setUniform(t, r, o) { + t.set(o.constantOr(this.value)); + } + getBinding(t, r, o) { + return this.type === "color" ? new _i(t, r) : new yo(t, r); + } + } + class _s { + constructor(t, r) { + (this.uniformNames = r.map((o) => `u_${o}`)), + (this.patternFrom = null), + (this.patternTo = null), + (this.pixelRatioFrom = 1), + (this.pixelRatioTo = 1); + } + setConstantPatternPositions(t, r) { + (this.pixelRatioFrom = r.pixelRatio), + (this.pixelRatioTo = t.pixelRatio), + (this.patternFrom = r.tlbr), + (this.patternTo = t.tlbr); + } + setUniform(t, r, o, c) { + const f = + c === "u_pattern_to" + ? this.patternTo + : c === "u_pattern_from" + ? this.patternFrom + : c === "u_pixel_ratio_to" + ? this.pixelRatioTo + : c === "u_pixel_ratio_from" + ? this.pixelRatioFrom + : null; + f && t.set(f); + } + getBinding(t, r, o) { + return o.substr(0, 9) === "u_pattern" + ? new li(t, r) + : new yo(t, r); + } + } + class ro { + constructor(t, r, o, c) { + (this.expression = t), + (this.type = o), + (this.maxValue = 0), + (this.paintVertexAttributes = r.map((f) => ({ + name: `a_${f}`, + type: "Float32", + components: o === "color" ? 2 : 1, + offset: 0, + }))), + (this.paintVertexArray = new c()); + } + populatePaintArray(t, r, o, c, f) { + const _ = this.paintVertexArray.length, + v = this.expression.evaluate(new Un(0), r, {}, c, [], f); + this.paintVertexArray.resize(t), this._setPaintValue(_, t, v); + } + updatePaintArray(t, r, o, c) { + const f = this.expression.evaluate({ zoom: 0 }, o, c); + this._setPaintValue(t, r, f); + } + _setPaintValue(t, r, o) { + if (this.type === "color") { + const c = ci(o); + for (let f = t; f < r; f++) + this.paintVertexArray.emplace(f, c[0], c[1]); + } else { + for (let c = t; c < r; c++) + this.paintVertexArray.emplace(c, o); + this.maxValue = Math.max(this.maxValue, Math.abs(o)); + } + } + upload(t) { + this.paintVertexArray && + this.paintVertexArray.arrayBuffer && + (this.paintVertexBuffer && this.paintVertexBuffer.buffer + ? this.paintVertexBuffer.updateData(this.paintVertexArray) + : (this.paintVertexBuffer = t.createVertexBuffer( + this.paintVertexArray, + this.paintVertexAttributes, + this.expression.isStateDependent + ))); + } + destroy() { + this.paintVertexBuffer && this.paintVertexBuffer.destroy(); + } + } + class Da { + constructor(t, r, o, c, f, _) { + (this.expression = t), + (this.uniformNames = r.map((v) => `u_${v}_t`)), + (this.type = o), + (this.useIntegerZoom = c), + (this.zoom = f), + (this.maxValue = 0), + (this.paintVertexAttributes = r.map((v) => ({ + name: `a_${v}`, + type: "Float32", + components: o === "color" ? 4 : 2, + offset: 0, + }))), + (this.paintVertexArray = new _()); + } + populatePaintArray(t, r, o, c, f) { + const _ = this.expression.evaluate( + new Un(this.zoom), + r, + {}, + c, + [], + f + ), + v = this.expression.evaluate( + new Un(this.zoom + 1), + r, + {}, + c, + [], + f + ), + b = this.paintVertexArray.length; + this.paintVertexArray.resize(t), + this._setPaintValue(b, t, _, v); + } + updatePaintArray(t, r, o, c) { + const f = this.expression.evaluate({ zoom: this.zoom }, o, c), + _ = this.expression.evaluate({ zoom: this.zoom + 1 }, o, c); + this._setPaintValue(t, r, f, _); + } + _setPaintValue(t, r, o, c) { + if (this.type === "color") { + const f = ci(o), + _ = ci(c); + for (let v = t; v < r; v++) + this.paintVertexArray.emplace(v, f[0], f[1], _[0], _[1]); + } else { + for (let f = t; f < r; f++) + this.paintVertexArray.emplace(f, o, c); + this.maxValue = Math.max( + this.maxValue, + Math.abs(o), + Math.abs(c) + ); + } + } + upload(t) { + this.paintVertexArray && + this.paintVertexArray.arrayBuffer && + (this.paintVertexBuffer && this.paintVertexBuffer.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, r) { + const o = this.useIntegerZoom ? Math.floor(r.zoom) : r.zoom, + c = Dt( + this.expression.interpolationFactor( + o, + this.zoom, + this.zoom + 1 + ), + 0, + 1 + ); + t.set(c); + } + getBinding(t, r, o) { + return new yo(t, r); + } + } + class xo { + constructor(t, r, o, c, f, _) { + (this.expression = t), + (this.type = r), + (this.useIntegerZoom = o), + (this.zoom = c), + (this.layerId = _), + (this.zoomInPaintVertexArray = new f()), + (this.zoomOutPaintVertexArray = new f()); + } + populatePaintArray(t, r, o) { + const c = this.zoomInPaintVertexArray.length; + this.zoomInPaintVertexArray.resize(t), + this.zoomOutPaintVertexArray.resize(t), + this._setPaintValues( + c, + t, + r.patterns && r.patterns[this.layerId], + o + ); + } + updatePaintArray(t, r, o, c, f) { + this._setPaintValues( + t, + r, + o.patterns && o.patterns[this.layerId], + f + ); + } + _setPaintValues(t, r, o, c) { + if (!c || !o) return; + const { min: f, mid: _, max: v } = o, + b = c[f], + S = c[_], + I = c[v]; + if (b && S && I) + for (let L = t; L < r; L++) + this.zoomInPaintVertexArray.emplace( + L, + S.tl[0], + S.tl[1], + S.br[0], + S.br[1], + b.tl[0], + b.tl[1], + b.br[0], + b.br[1], + S.pixelRatio, + b.pixelRatio + ), + this.zoomOutPaintVertexArray.emplace( + L, + S.tl[0], + S.tl[1], + S.br[0], + S.br[1], + I.tl[0], + I.tl[1], + I.br[0], + I.br[1], + S.pixelRatio, + I.pixelRatio + ); + } + upload(t) { + this.zoomInPaintVertexArray && + this.zoomInPaintVertexArray.arrayBuffer && + this.zoomOutPaintVertexArray && + this.zoomOutPaintVertexArray.arrayBuffer && + ((this.zoomInPaintVertexBuffer = t.createVertexBuffer( + this.zoomInPaintVertexArray, + si.members, + this.expression.isStateDependent + )), + (this.zoomOutPaintVertexBuffer = t.createVertexBuffer( + this.zoomOutPaintVertexArray, + si.members, + this.expression.isStateDependent + ))); + } + destroy() { + this.zoomOutPaintVertexBuffer && + this.zoomOutPaintVertexBuffer.destroy(), + this.zoomInPaintVertexBuffer && + this.zoomInPaintVertexBuffer.destroy(); + } + } + class Cd { + constructor(t, r, o) { + (this.binders = {}), (this._buffers = []); + const c = []; + for (const f in t.paint._values) { + if (!o(f)) continue; + const _ = t.paint.get(f); + if (!(_ instanceof $a && fo(_.property.specification))) + continue; + const v = Sd(f, t.type), + b = _.value, + S = _.property.specification.type, + I = _.property.useIntegerZoom, + L = _.property.specification["property-type"], + F = L === "cross-faded" || L === "cross-faded-data-driven"; + if (b.kind === "constant") + (this.binders[f] = F + ? new _s(b.value, v) + : new Qs(b.value, v, S)), + c.push(`/u_${f}`); + else if (b.kind === "source" || F) { + const q = _u(f, S, "source"); + (this.binders[f] = F + ? new xo(b, S, I, r, q, t.id) + : new ro(b, v, S, q)), + c.push(`/a_${f}`); + } else { + const q = _u(f, S, "composite"); + (this.binders[f] = new Da(b, v, S, I, r, q)), + c.push(`/z_${f}`); + } + } + this.cacheKey = c.sort().join(""); + } + getMaxValue(t) { + const r = this.binders[t]; + return r instanceof ro || r instanceof Da ? r.maxValue : 0; + } + populatePaintArrays(t, r, o, c, f) { + for (const _ in this.binders) { + const v = this.binders[_]; + (v instanceof ro || v instanceof Da || v instanceof xo) && + v.populatePaintArray(t, r, o, c, f); + } + } + setConstantPatternPositions(t, r) { + for (const o in this.binders) { + const c = this.binders[o]; + c instanceof _s && c.setConstantPatternPositions(t, r); + } + } + updatePaintArrays(t, r, o, c, f) { + let _ = !1; + for (const v in t) { + const b = r.getPositions(v); + for (const S of b) { + const I = o.feature(S.index); + for (const L in this.binders) { + const F = this.binders[L]; + if ( + (F instanceof ro || + F instanceof Da || + F instanceof xo) && + F.expression.isStateDependent === !0 + ) { + const q = c.paint.get(L); + (F.expression = q.value), + F.updatePaintArray(S.start, S.end, I, t[v], f), + (_ = !0); + } + } + } + } + return _; + } + defines() { + const t = []; + for (const r in this.binders) { + const o = this.binders[r]; + (o instanceof Qs || o instanceof _s) && + t.push( + ...o.uniformNames.map((c) => `#define HAS_UNIFORM_${c}`) + ); + } + return t; + } + getBinderAttributes() { + const t = []; + for (const r in this.binders) { + const o = this.binders[r]; + if (o instanceof ro || o instanceof Da) + for (let c = 0; c < o.paintVertexAttributes.length; c++) + t.push(o.paintVertexAttributes[c].name); + else if (o instanceof xo) + for (let c = 0; c < si.members.length; c++) + t.push(si.members[c].name); + } + return t; + } + getBinderUniforms() { + const t = []; + for (const r in this.binders) { + const o = this.binders[r]; + if (o instanceof Qs || o instanceof _s || o instanceof Da) + for (const c of o.uniformNames) t.push(c); + } + return t; + } + getPaintVertexBuffers() { + return this._buffers; + } + getUniforms(t, r) { + const o = []; + for (const c in this.binders) { + const f = this.binders[c]; + if (f instanceof Qs || f instanceof _s || f instanceof Da) { + for (const _ of f.uniformNames) + if (r[_]) { + const v = f.getBinding(t, r[_], _); + o.push({ name: _, property: c, binding: v }); + } + } + } + return o; + } + setUniforms(t, r, o, c) { + for (const { name: f, property: _, binding: v } of r) + this.binders[_].setUniform(v, c, o.get(_), f); + } + updatePaintBuffers(t) { + this._buffers = []; + for (const r in this.binders) { + const o = this.binders[r]; + if (t && o instanceof xo) { + const c = + t.fromScale === 2 + ? o.zoomInPaintVertexBuffer + : o.zoomOutPaintVertexBuffer; + c && this._buffers.push(c); + } else + (o instanceof ro || o instanceof Da) && + o.paintVertexBuffer && + this._buffers.push(o.paintVertexBuffer); + } + } + upload(t) { + for (const r in this.binders) { + const o = this.binders[r]; + (o instanceof ro || o instanceof Da || o instanceof xo) && + o.upload(t); + } + this.updatePaintBuffers(); + } + destroy() { + for (const t in this.binders) { + const r = this.binders[t]; + (r instanceof ro || r instanceof Da || r instanceof xo) && + r.destroy(); + } + } + } + class la { + constructor(t, r, o = () => !0) { + this.programConfigurations = {}; + for (const c of t) + this.programConfigurations[c.id] = new Cd(c, r, o); + (this.needsUpload = !1), + (this._featureMap = new Vo()), + (this._bufferOffset = 0); + } + populatePaintArrays(t, r, o, c, f, _) { + for (const v in this.programConfigurations) + this.programConfigurations[v].populatePaintArrays( + t, + r, + c, + f, + _ + ); + r.id !== void 0 && + this._featureMap.add(r.id, o, this._bufferOffset, t), + (this._bufferOffset = t), + (this.needsUpload = !0); + } + updatePaintArrays(t, r, o, c) { + for (const f of o) + this.needsUpload = + this.programConfigurations[f.id].updatePaintArrays( + t, + this._featureMap, + r, + f, + c + ) || this.needsUpload; + } + get(t) { + return this.programConfigurations[t]; + } + upload(t) { + if (this.needsUpload) { + for (const r in this.programConfigurations) + this.programConfigurations[r].upload(t); + this.needsUpload = !1; + } + } + destroy() { + for (const t in this.programConfigurations) + this.programConfigurations[t].destroy(); + } + } + function Sd(n, 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": ["gapwidth"], + "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", + ], + }[n] || [n.replace(`${t}-`, "").replace(/-/g, "_")] + ); + } + function _u(n, t, r) { + const o = { + color: { source: Js, composite: E }, + number: { source: d, composite: Js }, + }, + c = (function (f) { + return { + "line-pattern": { source: jt, composite: jt }, + "fill-pattern": { source: jt, composite: jt }, + "fill-extrusion-pattern": { source: jt, composite: jt }, + }[f]; + })(n); + return (c && c[r]) || o[t][r]; + } + ir("ConstantBinder", Qs), + ir("CrossFadedConstantBinder", _s), + ir("SourceExpressionBinder", ro), + ir("CrossFadedCompositeBinder", xo), + ir("CompositeExpressionBinder", Da), + ir("ProgramConfiguration", Cd, { omit: ["_buffers"] }), + ir("ProgramConfigurationSet", la); + const Wl = Math.pow(2, 14) - 1, + Xl = -Wl - 1; + function bo(n) { + const t = oe / n.extent, + r = n.loadGeometry(); + for (let o = 0; o < r.length; o++) { + const c = r[o]; + for (let f = 0; f < c.length; f++) { + const _ = c[f], + v = Math.round(_.x * t), + b = Math.round(_.y * t); + (_.x = Dt(v, Xl, Wl)), + (_.y = Dt(b, Xl, Wl)), + (v < _.x || v > _.x + 1 || b < _.y || b > _.y + 1) && + Lt( + "Geometry exceeds allowed extent, reduce your vector tile buffer size" + ); + } + } + return r; + } + function no(n, t) { + return { + type: n.type, + id: n.id, + properties: n.properties, + geometry: t ? bo(n) : [], + }; + } + const h_ = -32768; + function K0(n, t, r, o, c) { + n.emplaceBack(h_ + 8 * t + o, h_ + 8 * r + c); + } + class Gp { + constructor(t) { + (this.zoom = t.zoom), + (this.globalState = t.globalState), + (this.overscaling = t.overscaling), + (this.layers = t.layers), + (this.layerIds = this.layers.map((r) => r.id)), + (this.index = t.index), + (this.hasPattern = !1), + (this.layoutVertexArray = new Be()), + (this.indexArray = new Rn()), + (this.segments = new Kr()), + (this.programConfigurations = new la(t.layers, t.zoom)), + (this.stateDependentLayerIds = this.layers + .filter((r) => r.isStateDependent()) + .map((r) => r.id)); + } + populate(t, r, o) { + const c = this.layers[0], + f = []; + let _ = null, + v = !1, + b = c.type === "heatmap"; + if (c.type === "circle") { + const I = c; + (_ = I.layout.get("circle-sort-key")), + (v = !_.isConstant()), + (b = b || I.paint.get("circle-pitch-alignment") === "map"); + } + const S = b ? r.subdivisionGranularity.circle : 1; + for (const { + feature: I, + id: L, + index: F, + sourceLayerIndex: q, + } of t) { + const Z = this.layers[0]._featureFilter.needGeometry, + W = no(I, Z); + if ( + !this.layers[0]._featureFilter.filter( + new Un(this.zoom, { globalState: this.globalState }), + W, + o + ) + ) + continue; + const J = v ? _.evaluate(W, {}, o) : void 0, + le = { + id: L, + properties: I.properties, + type: I.type, + sourceLayerIndex: q, + index: F, + geometry: Z ? W.geometry : bo(I), + patterns: {}, + sortKey: J, + }; + f.push(le); + } + v && f.sort((I, L) => I.sortKey - L.sortKey); + for (const I of f) { + const { geometry: L, index: F, sourceLayerIndex: q } = I, + Z = t[F].feature; + this.addFeature(I, L, F, o, S), + r.featureIndex.insert(Z, L, F, q, this.index); + } + } + update(t, r, o) { + this.stateDependentLayers.length && + this.programConfigurations.updatePaintArrays( + t, + r, + this.stateDependentLayers, + o + ); + } + isEmpty() { + return this.layoutVertexArray.length === 0; + } + uploadPending() { + return !this.uploaded || this.programConfigurations.needsUpload; + } + upload(t) { + this.uploaded || + ((this.layoutVertexBuffer = t.createVertexBuffer( + this.layoutVertexArray, + Jn + )), + (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, r, o, c, f = 1) { + let _; + switch (f) { + case 1: + _ = [0, 7]; + break; + case 3: + _ = [0, 2, 5, 7]; + break; + case 5: + _ = [0, 1, 3, 4, 6, 7]; + break; + case 7: + _ = [0, 1, 2, 3, 4, 5, 6, 7]; + break; + default: + throw new Error( + `Invalid circle bucket granularity: ${f}; valid values are 1, 3, 5, 7.` + ); + } + const v = _.length; + for (const b of r) + for (const S of b) { + const I = S.x, + L = S.y; + if (I < 0 || I >= oe || L < 0 || L >= oe) continue; + const F = this.segments.prepareSegment( + v * v, + this.layoutVertexArray, + this.indexArray, + t.sortKey + ), + q = F.vertexLength; + for (let Z = 0; Z < v; Z++) + for (let W = 0; W < v; W++) + K0(this.layoutVertexArray, I, L, _[W], _[Z]); + for (let Z = 0; Z < v - 1; Z++) + for (let W = 0; W < v - 1; W++) { + const J = q + Z * v + W, + le = q + (Z + 1) * v + W; + this.indexArray.emplaceBack(J, le + 1, J + 1), + this.indexArray.emplaceBack(J, le, le + 1); + } + (F.vertexLength += v * v), + (F.primitiveLength += (v - 1) * (v - 1) * 2); + } + this.programConfigurations.populatePaintArrays( + this.layoutVertexArray.length, + t, + o, + {}, + c + ); + } + } + function d_(n, t) { + for (let r = 0; r < n.length; r++) if (Yl(t, n[r])) return !0; + for (let r = 0; r < t.length; r++) if (Yl(n, t[r])) return !0; + return !!Hp(n, t); + } + function J0(n, t, r) { + return !!Yl(n, t) || !!Wp(t, n, r); + } + function p_(n, t) { + if (n.length === 1) return m_(t, n[0]); + for (let r = 0; r < t.length; r++) { + const o = t[r]; + for (let c = 0; c < o.length; c++) if (Yl(n, o[c])) return !0; + } + for (let r = 0; r < n.length; r++) if (m_(t, n[r])) return !0; + for (let r = 0; r < t.length; r++) if (Hp(n, t[r])) return !0; + return !1; + } + function Q0(n, t, r) { + if (n.length > 1) { + if (Hp(n, t)) return !0; + for (let o = 0; o < t.length; o++) + if (Wp(t[o], n, r)) return !0; + } + for (let o = 0; o < n.length; o++) if (Wp(n[o], t, r)) return !0; + return !1; + } + function Hp(n, t) { + if (n.length === 0 || t.length === 0) return !1; + for (let r = 0; r < n.length - 1; r++) { + const o = n[r], + c = n[r + 1]; + for (let f = 0; f < t.length - 1; f++) + if (ey(o, c, t[f], t[f + 1])) return !0; + } + return !1; + } + function ey(n, t, r, o) { + return Rt(n, r, o) !== Rt(t, r, o) && Rt(n, t, r) !== Rt(n, t, o); + } + function Wp(n, t, r) { + const o = r * r; + if (t.length === 1) return n.distSqr(t[0]) < o; + for (let c = 1; c < t.length; c++) + if (f_(n, t[c - 1], t[c]) < o) return !0; + return !1; + } + function f_(n, t, r) { + const o = t.distSqr(r); + if (o === 0) return n.distSqr(t); + const c = + ((n.x - t.x) * (r.x - t.x) + (n.y - t.y) * (r.y - t.y)) / o; + return n.distSqr( + c < 0 ? t : c > 1 ? r : r.sub(t)._mult(c)._add(t) + ); + } + function m_(n, t) { + let r, + o, + c, + f = !1; + for (let _ = 0; _ < n.length; _++) { + r = n[_]; + for (let v = 0, b = r.length - 1; v < r.length; b = v++) + (o = r[v]), + (c = r[b]), + o.y > t.y != c.y > t.y && + t.x < ((c.x - o.x) * (t.y - o.y)) / (c.y - o.y) + o.x && + (f = !f); + } + return f; + } + function Yl(n, t) { + let r = !1; + for (let o = 0, c = n.length - 1; o < n.length; c = o++) { + const f = n[o], + _ = n[c]; + f.y > t.y != _.y > t.y && + t.x < ((_.x - f.x) * (t.y - f.y)) / (_.y - f.y) + f.x && + (r = !r); + } + return r; + } + function ty(n, t, r) { + const o = r[0], + c = r[2]; + if ( + (n.x < o.x && t.x < o.x) || + (n.x > c.x && t.x > c.x) || + (n.y < o.y && t.y < o.y) || + (n.y > c.y && t.y > c.y) + ) + return !1; + const f = Rt(n, t, r[0]); + return ( + f !== Rt(n, t, r[1]) || + f !== Rt(n, t, r[2]) || + f !== Rt(n, t, r[3]) + ); + } + function gu(n, t, r) { + const o = t.paint.get(n).value; + return o.kind === "constant" + ? o.value + : r.programConfigurations.get(t.id).getMaxValue(n); + } + function Pd(n) { + return Math.sqrt(n[0] * n[0] + n[1] * n[1]); + } + function Id(n, t, r, o, c) { + if (!t[0] && !t[1]) return n; + const f = B.convert(t)._mult(c); + r === "viewport" && f._rotate(-o); + const _ = []; + for (let v = 0; v < n.length; v++) _.push(n[v].sub(f)); + return _; + } + let __, g_; + ir("CircleBucket", Gp, { omit: ["layers"] }); + var ry = { + get paint() { + return (g_ = + g_ || + new Ui({ + "circle-radius": new Or(ye.paint_circle["circle-radius"]), + "circle-color": new Or(ye.paint_circle["circle-color"]), + "circle-blur": new Or(ye.paint_circle["circle-blur"]), + "circle-opacity": new Or(ye.paint_circle["circle-opacity"]), + "circle-translate": new wr( + ye.paint_circle["circle-translate"] + ), + "circle-translate-anchor": new wr( + ye.paint_circle["circle-translate-anchor"] + ), + "circle-pitch-scale": new wr( + ye.paint_circle["circle-pitch-scale"] + ), + "circle-pitch-alignment": new wr( + ye.paint_circle["circle-pitch-alignment"] + ), + "circle-stroke-width": new Or( + ye.paint_circle["circle-stroke-width"] + ), + "circle-stroke-color": new Or( + ye.paint_circle["circle-stroke-color"] + ), + "circle-stroke-opacity": new Or( + ye.paint_circle["circle-stroke-opacity"] + ), + })); + }, + get layout() { + return (__ = + __ || + new Ui({ + "circle-sort-key": new Or( + ye.layout_circle["circle-sort-key"] + ), + })); + }, + }; + class ny extends xa { + constructor(t) { + super(t, ry); + } + createBucket(t) { + return new Gp(t); + } + queryRadius(t) { + const r = t; + return ( + gu("circle-radius", this, r) + + gu("circle-stroke-width", this, r) + + Pd(this.paint.get("circle-translate")) + ); + } + queryIntersectsFeature({ + queryGeometry: t, + feature: r, + featureState: o, + geometry: c, + transform: f, + pixelsToTileUnits: _, + unwrappedTileID: v, + getElevation: b, + }) { + const S = Id( + t, + this.paint.get("circle-translate"), + this.paint.get("circle-translate-anchor"), + -f.bearingInRadians, + _ + ), + I = + this.paint.get("circle-radius").evaluate(r, o) + + this.paint.get("circle-stroke-width").evaluate(r, o), + L = this.paint.get("circle-pitch-alignment") === "map", + F = L + ? S + : (function (Z, W, J, le) { + return Z.map((Re) => v_(Re, W, J, le)); + })(S, f, v, b), + q = L ? I * _ : I; + for (const Z of c) + for (const W of Z) { + const J = L ? W : v_(W, f, v, b); + let le = q; + const Re = f.projectTileCoordinates( + W.x, + W.y, + v, + b + ).signedDistanceFromCamera; + if ( + (this.paint.get("circle-pitch-scale") === "viewport" && + this.paint.get("circle-pitch-alignment") === "map" + ? (le *= Re / f.cameraToCenterDistance) + : this.paint.get("circle-pitch-scale") === "map" && + this.paint.get("circle-pitch-alignment") === + "viewport" && + (le *= f.cameraToCenterDistance / Re), + J0(F, J, le)) + ) + return !0; + } + return !1; + } + } + function v_(n, t, r, o) { + const c = t.projectTileCoordinates(n.x, n.y, r, o).point; + return new B( + (0.5 * c.x + 0.5) * t.width, + (0.5 * -c.y + 0.5) * t.height + ); + } + class y_ extends Gp {} + let x_; + ir("HeatmapBucket", y_, { omit: ["layers"] }); + var iy = { + get paint() { + return (x_ = + x_ || + new Ui({ + "heatmap-radius": new Or( + ye.paint_heatmap["heatmap-radius"] + ), + "heatmap-weight": new Or( + ye.paint_heatmap["heatmap-weight"] + ), + "heatmap-intensity": new wr( + ye.paint_heatmap["heatmap-intensity"] + ), + "heatmap-color": new Ul(ye.paint_heatmap["heatmap-color"]), + "heatmap-opacity": new wr( + ye.paint_heatmap["heatmap-opacity"] + ), + })); + }, + }; + function Xp(n, { width: t, height: r }, o, c) { + if (c) { + if (c instanceof Uint8ClampedArray) + c = new Uint8Array(c.buffer); + else if (c.length !== t * r * o) + throw new RangeError( + `mismatched image size. expected: ${c.length} but got: ${ + t * r * o + }` + ); + } else c = new Uint8Array(t * r * o); + return (n.width = t), (n.height = r), (n.data = c), n; + } + function b_(n, { width: t, height: r }, o) { + if (t === n.width && r === n.height) return; + const c = Xp({}, { width: t, height: r }, o); + Yp( + n, + c, + { x: 0, y: 0 }, + { x: 0, y: 0 }, + { width: Math.min(n.width, t), height: Math.min(n.height, r) }, + o + ), + (n.width = t), + (n.height = r), + (n.data = c.data); + } + function Yp(n, t, r, o, c, f) { + if (c.width === 0 || c.height === 0) return t; + if ( + c.width > n.width || + c.height > n.height || + r.x > n.width - c.width || + r.y > n.height - c.height + ) + throw new RangeError( + "out of range source coordinates for image copy" + ); + if ( + c.width > t.width || + c.height > t.height || + o.x > t.width - c.width || + o.y > t.height - c.height + ) + throw new RangeError( + "out of range destination coordinates for image copy" + ); + const _ = n.data, + v = t.data; + if (_ === v) + throw new Error( + "srcData equals dstData, so image is already copied" + ); + for (let b = 0; b < c.height; b++) { + const S = ((r.y + b) * n.width + r.x) * f, + I = ((o.y + b) * t.width + o.x) * f; + for (let L = 0; L < c.width * f; L++) v[I + L] = _[S + L]; + } + return t; + } + class vu { + constructor(t, r) { + Xp(this, t, 1, r); + } + resize(t) { + b_(this, t, 1); + } + clone() { + return new vu( + { width: this.width, height: this.height }, + new Uint8Array(this.data) + ); + } + static copy(t, r, o, c, f) { + Yp(t, r, o, c, f, 1); + } + } + class ca { + constructor(t, r) { + Xp(this, t, 4, r); + } + resize(t) { + b_(this, t, 4); + } + replace(t, r) { + r + ? this.data.set(t) + : (this.data = + t instanceof Uint8ClampedArray + ? new Uint8Array(t.buffer) + : t); + } + clone() { + return new ca( + { width: this.width, height: this.height }, + new Uint8Array(this.data) + ); + } + static copy(t, r, o, c, f) { + Yp(t, r, o, c, f, 4); + } + setPixel(t, r, o) { + const c = 4 * (t * this.width + r); + (this.data[c + 0] = Math.round((255 * o.r) / o.a)), + (this.data[c + 1] = Math.round((255 * o.g) / o.a)), + (this.data[c + 2] = Math.round((255 * o.b) / o.a)), + (this.data[c + 3] = Math.round(255 * o.a)); + } + } + function w_(n) { + const t = {}, + r = n.resolution || 256, + o = n.clips ? n.clips.length : 1, + c = n.image || new ca({ width: r, height: o }); + if ((Math.log(r) / Math.LN2) % 1 != 0) + throw new Error(`width is not a power of 2 - ${r}`); + const f = (_, v, b) => { + t[n.evaluationKey] = b; + const S = n.expression.evaluate(t); + c.setPixel(_ / 4 / r, v / 4, S); + }; + if (n.clips) + for (let _ = 0, v = 0; _ < o; ++_, v += 4 * r) + for (let b = 0, S = 0; b < r; b++, S += 4) { + const I = b / (r - 1), + { start: L, end: F } = n.clips[_]; + f(v, S, L * (1 - I) + F * I); + } + else + for (let _ = 0, v = 0; _ < r; _++, v += 4) f(0, v, _ / (r - 1)); + return c; + } + ir("AlphaImage", vu), ir("RGBAImage", ca); + const Kp = "big-fb"; + class ay extends xa { + createBucket(t) { + return new y_(t); + } + constructor(t) { + super(t, iy), + (this.heatmapFbos = new Map()), + this._updateColorRamp(); + } + _handleSpecialPaintPropertyUpdate(t) { + t === "heatmap-color" && this._updateColorRamp(); + } + _updateColorRamp() { + (this.colorRamp = w_({ + expression: + this._transitionablePaint._values["heatmap-color"].value + .expression, + evaluationKey: "heatmapDensity", + image: this.colorRamp, + })), + (this.colorRampTexture = null); + } + resize() { + this.heatmapFbos.has(Kp) && this.heatmapFbos.delete(Kp); + } + queryRadius() { + return 0; + } + queryIntersectsFeature() { + return !1; + } + hasOffscreenPass() { + return ( + this.paint.get("heatmap-opacity") !== 0 && + this.visibility !== "none" + ); + } + } + let T_; + var oy = { + get paint() { + return (T_ = + T_ || + new Ui({ + "hillshade-illumination-direction": new wr( + ye.paint_hillshade["hillshade-illumination-direction"] + ), + "hillshade-illumination-altitude": new wr( + ye.paint_hillshade["hillshade-illumination-altitude"] + ), + "hillshade-illumination-anchor": new wr( + ye.paint_hillshade["hillshade-illumination-anchor"] + ), + "hillshade-exaggeration": new wr( + ye.paint_hillshade["hillshade-exaggeration"] + ), + "hillshade-shadow-color": new wr( + ye.paint_hillshade["hillshade-shadow-color"] + ), + "hillshade-highlight-color": new wr( + ye.paint_hillshade["hillshade-highlight-color"] + ), + "hillshade-accent-color": new wr( + ye.paint_hillshade["hillshade-accent-color"] + ), + "hillshade-method": new wr( + ye.paint_hillshade["hillshade-method"] + ), + })); + }, + }; + class sy extends xa { + constructor(t) { + super(t, oy), + this.recalculate({ zoom: 0, zoomHistory: {} }, void 0); + } + getIlluminationProperties() { + let t = this.paint.get( + "hillshade-illumination-direction" + ).values, + r = this.paint.get("hillshade-illumination-altitude").values, + o = this.paint.get("hillshade-highlight-color").values, + c = this.paint.get("hillshade-shadow-color").values; + const f = Math.max(t.length, r.length, o.length, c.length); + (t = t.concat(Array(f - t.length).fill(t.at(-1)))), + (r = r.concat(Array(f - r.length).fill(r.at(-1)))), + (o = o.concat(Array(f - o.length).fill(o.at(-1)))), + (c = c.concat(Array(f - c.length).fill(c.at(-1)))); + const _ = r.map(mr); + return { + directionRadians: t.map(mr), + altitudeRadians: _, + shadowColor: c, + highlightColor: o, + }; + } + hasOffscreenPass() { + return ( + this.paint.get("hillshade-exaggeration") !== 0 && + this.visibility !== "none" + ); + } + } + let C_; + var ly = { + get paint() { + return (C_ = + C_ || + new Ui({ + "color-relief-opacity": new wr( + ye["paint_color-relief"]["color-relief-opacity"] + ), + "color-relief-color": new Ul( + ye["paint_color-relief"]["color-relief-color"] + ), + })); + }, + }; + class Jp { + constructor(t, r, o, c) { + (this.context = t), + (this.format = o), + (this.texture = t.gl.createTexture()), + this.update(r, c); + } + update(t, r, o) { + const { width: c, height: f } = t, + _ = !( + (this.size && this.size[0] === c && this.size[1] === f) || + o + ), + { context: v } = this, + { gl: b } = v; + if ( + ((this.useMipmap = !!(r && r.useMipmap)), + b.bindTexture(b.TEXTURE_2D, this.texture), + v.pixelStoreUnpackFlipY.set(!1), + v.pixelStoreUnpack.set(1), + v.pixelStoreUnpackPremultiplyAlpha.set( + this.format === b.RGBA && (!r || r.premultiply !== !1) + ), + _) + ) + (this.size = [c, f]), + t instanceof HTMLImageElement || + t instanceof HTMLCanvasElement || + t instanceof HTMLVideoElement || + t instanceof ImageData || + Qt(t) + ? b.texImage2D( + b.TEXTURE_2D, + 0, + this.format, + this.format, + b.UNSIGNED_BYTE, + t + ) + : b.texImage2D( + b.TEXTURE_2D, + 0, + this.format, + c, + f, + 0, + this.format, + b.UNSIGNED_BYTE, + t.data + ); + else { + const { x: S, y: I } = o || { x: 0, y: 0 }; + t instanceof HTMLImageElement || + t instanceof HTMLCanvasElement || + t instanceof HTMLVideoElement || + t instanceof ImageData || + Qt(t) + ? b.texSubImage2D( + b.TEXTURE_2D, + 0, + S, + I, + b.RGBA, + b.UNSIGNED_BYTE, + t + ) + : b.texSubImage2D( + b.TEXTURE_2D, + 0, + S, + I, + c, + f, + b.RGBA, + b.UNSIGNED_BYTE, + t.data + ); + } + this.useMipmap && + this.isSizePowerOfTwo() && + b.generateMipmap(b.TEXTURE_2D), + v.pixelStoreUnpackFlipY.setDefault(), + v.pixelStoreUnpack.setDefault(), + v.pixelStoreUnpackPremultiplyAlpha.setDefault(); + } + bind(t, r, o) { + const { context: c } = this, + { gl: f } = c; + f.bindTexture(f.TEXTURE_2D, this.texture), + o !== f.LINEAR_MIPMAP_NEAREST || + this.isSizePowerOfTwo() || + (o = f.LINEAR), + t !== this.filter && + (f.texParameteri(f.TEXTURE_2D, f.TEXTURE_MAG_FILTER, t), + f.texParameteri(f.TEXTURE_2D, f.TEXTURE_MIN_FILTER, o || t), + (this.filter = t)), + r !== this.wrap && + (f.texParameteri(f.TEXTURE_2D, f.TEXTURE_WRAP_S, r), + f.texParameteri(f.TEXTURE_2D, f.TEXTURE_WRAP_T, r), + (this.wrap = r)); + } + 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); + } + } + class S_ { + constructor(t, r, o, c = 1, f = 1, _ = 1, v = 0) { + if (((this.uid = t), r.height !== r.width)) + throw new RangeError("DEM tiles must be square"); + if (o && !["mapbox", "terrarium", "custom"].includes(o)) + return void Lt( + `"${o}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".` + ); + this.stride = r.height; + const b = (this.dim = r.height - 2); + switch (((this.data = new Uint32Array(r.data.buffer)), o)) { + case "terrarium": + (this.redFactor = 256), + (this.greenFactor = 1), + (this.blueFactor = 1 / 256), + (this.baseShift = 32768); + break; + case "custom": + (this.redFactor = c), + (this.greenFactor = f), + (this.blueFactor = _), + (this.baseShift = v); + break; + default: + (this.redFactor = 6553.6), + (this.greenFactor = 25.6), + (this.blueFactor = 0.1), + (this.baseShift = 1e4); + } + for (let S = 0; S < b; S++) + (this.data[this._idx(-1, S)] = this.data[this._idx(0, S)]), + (this.data[this._idx(b, S)] = + this.data[this._idx(b - 1, S)]), + (this.data[this._idx(S, -1)] = this.data[this._idx(S, 0)]), + (this.data[this._idx(S, b)] = + this.data[this._idx(S, b - 1)]); + (this.data[this._idx(-1, -1)] = this.data[this._idx(0, 0)]), + (this.data[this._idx(b, -1)] = + this.data[this._idx(b - 1, 0)]), + (this.data[this._idx(-1, b)] = + this.data[this._idx(0, b - 1)]), + (this.data[this._idx(b, b)] = + this.data[this._idx(b - 1, b - 1)]), + (this.min = Number.MAX_SAFE_INTEGER), + (this.max = Number.MIN_SAFE_INTEGER); + for (let S = 0; S < b; S++) + for (let I = 0; I < b; I++) { + const L = this.get(S, I); + L > this.max && (this.max = L), + L < this.min && (this.min = L); + } + } + get(t, r) { + const o = new Uint8Array(this.data.buffer), + c = 4 * this._idx(t, r); + return this.unpack(o[c], o[c + 1], o[c + 2]); + } + getUnpackVector() { + return [ + this.redFactor, + this.greenFactor, + this.blueFactor, + this.baseShift, + ]; + } + _idx(t, r) { + if (t < -1 || t >= this.dim + 1 || r < -1 || r >= this.dim + 1) + throw new RangeError( + "out of range source coordinates for DEM data" + ); + return (r + 1) * this.stride + (t + 1); + } + unpack(t, r, o) { + return ( + t * this.redFactor + + r * this.greenFactor + + o * this.blueFactor - + this.baseShift + ); + } + pack(t) { + return P_(t, this.getUnpackVector()); + } + getPixels() { + return new ca( + { width: this.stride, height: this.stride }, + new Uint8Array(this.data.buffer) + ); + } + backfillBorder(t, r, o) { + if (this.dim !== t.dim) + throw new Error("dem dimension mismatch"); + let c = r * this.dim, + f = r * this.dim + this.dim, + _ = o * this.dim, + v = o * this.dim + this.dim; + switch (r) { + case -1: + c = f - 1; + break; + case 1: + f = c + 1; + } + switch (o) { + case -1: + _ = v - 1; + break; + case 1: + v = _ + 1; + } + const b = -r * this.dim, + S = -o * this.dim; + for (let I = _; I < v; I++) + for (let L = c; L < f; L++) + this.data[this._idx(L, I)] = + t.data[this._idx(L + b, I + S)]; + } + } + function P_(n, t) { + const r = t[0], + o = t[1], + c = t[2], + f = t[3], + _ = Math.min(r, o, c), + v = Math.round((n + f) / _); + return { + r: Math.floor((v * _) / r) % 256, + g: Math.floor((v * _) / o) % 256, + b: Math.floor((v * _) / c) % 256, + }; + } + ir("DEMData", S_); + class cy extends xa { + constructor(t) { + super(t, ly); + } + _createColorRamp(t) { + const r = { elevationStops: [], colorStops: [] }, + o = + this._transitionablePaint._values["color-relief-color"] + .value.expression; + if ( + o instanceof Zs && + o._styleExpression.expression instanceof Di + ) { + this.colorRampExpression = o; + const _ = o._styleExpression.expression; + (r.elevationStops = _.labels), (r.colorStops = []); + for (const v of r.elevationStops) + r.colorStops.push( + _.evaluate({ globals: { elevation: v } }) + ); + } + if ( + (r.elevationStops.length < 1 && + ((r.elevationStops = [0]), + (r.colorStops = [Mr.transparent])), + r.elevationStops.length < 2 && + (r.elevationStops.push(r.elevationStops[0] + 1), + r.colorStops.push(r.colorStops[0])), + r.elevationStops.length <= t) + ) + return r; + const c = { elevationStops: [], colorStops: [] }, + f = (r.elevationStops.length - 1) / (t - 1); + for (let _ = 0; _ < r.elevationStops.length - 0.5; _ += f) + c.elevationStops.push(r.elevationStops[Math.round(_)]), + c.colorStops.push(r.colorStops[Math.round(_)]); + return ( + Lt( + `Too many colors in specification of ${this.id} color-relief layer, may not render properly.` + ), + c + ); + } + _colorRampChanged() { + return ( + this.colorRampExpression != + this._transitionablePaint._values["color-relief-color"].value + .expression + ); + } + getColorRampTextures(t, r, o) { + if (this.colorRampTextures && !this._colorRampChanged()) + return this.colorRampTextures; + const c = this._createColorRamp(r), + f = new ca({ width: c.colorStops.length, height: 1 }), + _ = new ca({ width: c.colorStops.length, height: 1 }); + for (let v = 0; v < c.elevationStops.length; v++) { + const b = P_(c.elevationStops[v], o); + _.setPixel(0, v, new Mr(b.r / 255, b.g / 255, b.b / 255, 1)), + f.setPixel(0, v, c.colorStops[v]); + } + return ( + (this.colorRampTextures = { + elevationTexture: new Jp(t, _, t.gl.RGBA), + colorTexture: new Jp(t, f, t.gl.RGBA), + }), + this.colorRampTextures + ); + } + hasOffscreenPass() { + return this.visibility !== "none" && !!this.colorRampTextures; + } + } + const uy = ti([{ name: "a_pos", components: 2, type: "Int16" }], 4), + { members: hy } = uy; + function Qp(n, t, r) { + const o = r.patternDependencies; + let c = !1; + for (const f of t) { + const _ = f.paint.get(`${n}-pattern`); + _.isConstant() || (c = !0); + const v = _.constantOr(null); + v && ((c = !0), (o[v.to] = !0), (o[v.from] = !0)); + } + return c; + } + function ef(n, t, r, o, c) { + const f = c.patternDependencies; + for (const _ of t) { + const v = _.paint.get(`${n}-pattern`).value; + if (v.kind !== "constant") { + let b = v.evaluate({ zoom: o - 1 }, r, {}, c.availableImages), + S = v.evaluate({ zoom: o }, r, {}, c.availableImages), + I = v.evaluate({ zoom: o + 1 }, r, {}, c.availableImages); + (b = b && b.name ? b.name : b), + (S = S && S.name ? S.name : S), + (I = I && I.name ? I.name : I), + (f[b] = !0), + (f[S] = !0), + (f[I] = !0), + (r.patterns[_.id] = { min: b, mid: S, max: I }); + } + } + return r; + } + function I_(n, t, r, o, c) { + let f; + if ( + c === + (function (_, v, b, S) { + let I = 0; + for (let L = v, F = b - S; L < b; L += S) + (I += (_[F] - _[L]) * (_[L + 1] + _[F + 1])), (F = L); + return I; + })(n, t, r, o) > + 0 + ) + for (let _ = t; _ < r; _ += o) + f = E_((_ / o) | 0, n[_], n[_ + 1], f); + else + for (let _ = r - o; _ >= t; _ -= o) + f = E_((_ / o) | 0, n[_], n[_ + 1], f); + return f && Kl(f, f.next) && (wu(f), (f = f.next)), f; + } + function el(n, t) { + if (!n) return n; + t || (t = n); + let r, + o = n; + do + if ( + ((r = !1), + o.steiner || (!Kl(o, o.next) && ii(o.prev, o, o.next) !== 0)) + ) + o = o.next; + else { + if ((wu(o), (o = t = o.prev), o === o.next)) break; + r = !0; + } + while (r || o !== t); + return t; + } + function yu(n, t, r, o, c, f, _) { + if (!n) return; + !_ && + f && + (function (b, S, I, L) { + let F = b; + do + F.z === 0 && (F.z = tf(F.x, F.y, S, I, L)), + (F.prevZ = F.prev), + (F.nextZ = F.next), + (F = F.next); + while (F !== b); + (F.prevZ.nextZ = null), + (F.prevZ = null), + (function (q) { + let Z, + W = 1; + do { + let J, + le = q; + q = null; + let Re = null; + for (Z = 0; le; ) { + Z++; + let xe = le, + Ce = 0; + for ( + let lt = 0; + lt < W && (Ce++, (xe = xe.nextZ), xe); + lt++ + ); + let Ye = W; + for (; Ce > 0 || (Ye > 0 && xe); ) + Ce !== 0 && (Ye === 0 || !xe || le.z <= xe.z) + ? ((J = le), (le = le.nextZ), Ce--) + : ((J = xe), (xe = xe.nextZ), Ye--), + Re ? (Re.nextZ = J) : (q = J), + (J.prevZ = Re), + (Re = J); + le = xe; + } + (Re.nextZ = null), (W *= 2); + } while (Z > 1); + })(F); + })(n, o, c, f); + let v = n; + for (; n.prev !== n.next; ) { + const b = n.prev, + S = n.next; + if (f ? py(n, o, c, f) : dy(n)) + t.push(b.i, n.i, S.i), wu(n), (n = S.next), (v = S.next); + else if ((n = S) === v) { + _ + ? _ === 1 + ? yu((n = fy(el(n), t)), t, r, o, c, f, 2) + : _ === 2 && my(n, t, r, o, c, f) + : yu(el(n), t, r, o, c, f, 1); + break; + } + } + } + function dy(n) { + const t = n.prev, + r = n, + o = n.next; + if (ii(t, r, o) >= 0) return !1; + const c = t.x, + f = r.x, + _ = o.x, + v = t.y, + b = r.y, + S = o.y, + I = Math.min(c, f, _), + L = Math.min(v, b, S), + F = Math.max(c, f, _), + q = Math.max(v, b, S); + let Z = o.next; + for (; Z !== t; ) { + if ( + Z.x >= I && + Z.x <= F && + Z.y >= L && + Z.y <= q && + xu(c, v, f, b, _, S, Z.x, Z.y) && + ii(Z.prev, Z, Z.next) >= 0 + ) + return !1; + Z = Z.next; + } + return !0; + } + function py(n, t, r, o) { + const c = n.prev, + f = n, + _ = n.next; + if (ii(c, f, _) >= 0) return !1; + const v = c.x, + b = f.x, + S = _.x, + I = c.y, + L = f.y, + F = _.y, + q = Math.min(v, b, S), + Z = Math.min(I, L, F), + W = Math.max(v, b, S), + J = Math.max(I, L, F), + le = tf(q, Z, t, r, o), + Re = tf(W, J, t, r, o); + let xe = n.prevZ, + Ce = n.nextZ; + for (; xe && xe.z >= le && Ce && Ce.z <= Re; ) { + if ( + (xe.x >= q && + xe.x <= W && + xe.y >= Z && + xe.y <= J && + xe !== c && + xe !== _ && + xu(v, I, b, L, S, F, xe.x, xe.y) && + ii(xe.prev, xe, xe.next) >= 0) || + ((xe = xe.prevZ), + Ce.x >= q && + Ce.x <= W && + Ce.y >= Z && + Ce.y <= J && + Ce !== c && + Ce !== _ && + xu(v, I, b, L, S, F, Ce.x, Ce.y) && + ii(Ce.prev, Ce, Ce.next) >= 0) + ) + return !1; + Ce = Ce.nextZ; + } + for (; xe && xe.z >= le; ) { + if ( + xe.x >= q && + xe.x <= W && + xe.y >= Z && + xe.y <= J && + xe !== c && + xe !== _ && + xu(v, I, b, L, S, F, xe.x, xe.y) && + ii(xe.prev, xe, xe.next) >= 0 + ) + return !1; + xe = xe.prevZ; + } + for (; Ce && Ce.z <= Re; ) { + if ( + Ce.x >= q && + Ce.x <= W && + Ce.y >= Z && + Ce.y <= J && + Ce !== c && + Ce !== _ && + xu(v, I, b, L, S, F, Ce.x, Ce.y) && + ii(Ce.prev, Ce, Ce.next) >= 0 + ) + return !1; + Ce = Ce.nextZ; + } + return !0; + } + function fy(n, t) { + let r = n; + do { + const o = r.prev, + c = r.next.next; + !Kl(o, c) && + k_(o, r, r.next, c) && + bu(o, c) && + bu(c, o) && + (t.push(o.i, r.i, c.i), wu(r), wu(r.next), (r = n = c)), + (r = r.next); + } while (r !== n); + return el(r); + } + function my(n, t, r, o, c, f) { + let _ = n; + do { + let v = _.next.next; + for (; v !== _.prev; ) { + if (_.i !== v.i && xy(_, v)) { + let b = A_(_, v); + return ( + (_ = el(_, _.next)), + (b = el(b, b.next)), + yu(_, t, r, o, c, f, 0), + void yu(b, t, r, o, c, f, 0) + ); + } + v = v.next; + } + _ = _.next; + } while (_ !== n); + } + function _y(n, t) { + let r = n.x - t.x; + return ( + r === 0 && + ((r = n.y - t.y), r === 0) && + (r = + (n.next.y - n.y) / (n.next.x - n.x) - + (t.next.y - t.y) / (t.next.x - t.x)), + r + ); + } + function gy(n, t) { + const r = (function (c, f) { + let _ = f; + const v = c.x, + b = c.y; + let S, + I = -1 / 0; + if (Kl(c, _)) return _; + do { + if (Kl(c, _.next)) return _.next; + if (b <= _.y && b >= _.next.y && _.next.y !== _.y) { + const W = + _.x + ((b - _.y) * (_.next.x - _.x)) / (_.next.y - _.y); + if ( + W <= v && + W > I && + ((I = W), (S = _.x < _.next.x ? _ : _.next), W === v) + ) + return S; + } + _ = _.next; + } while (_ !== f); + if (!S) return null; + const L = S, + F = S.x, + q = S.y; + let Z = 1 / 0; + _ = S; + do { + if ( + v >= _.x && + _.x >= F && + v !== _.x && + M_(b < q ? v : I, b, F, q, b < q ? I : v, b, _.x, _.y) + ) { + const W = Math.abs(b - _.y) / (v - _.x); + bu(_, c) && + (W < Z || + (W === Z && + (_.x > S.x || (_.x === S.x && vy(S, _))))) && + ((S = _), (Z = W)); + } + _ = _.next; + } while (_ !== L); + return S; + })(n, t); + if (!r) return t; + const o = A_(r, n); + return el(o, o.next), el(r, r.next); + } + function vy(n, t) { + return ii(n.prev, n, t.prev) < 0 && ii(t.next, n, n.next) < 0; + } + function tf(n, t, r, o, c) { + return ( + (n = + 1431655765 & + ((n = + 858993459 & + ((n = + 252645135 & + ((n = 16711935 & ((n = ((n - r) * c) | 0) | (n << 8))) | + (n << 4))) | + (n << 2))) | + (n << 1))) | + ((t = + 1431655765 & + ((t = + 858993459 & + ((t = + 252645135 & + ((t = 16711935 & ((t = ((t - o) * c) | 0) | (t << 8))) | + (t << 4))) | + (t << 2))) | + (t << 1))) << + 1) + ); + } + function yy(n) { + let t = n, + r = n; + do + (t.x < r.x || (t.x === r.x && t.y < r.y)) && (r = t), + (t = t.next); + while (t !== n); + return r; + } + function M_(n, t, r, o, c, f, _, v) { + return ( + (c - _) * (t - v) >= (n - _) * (f - v) && + (n - _) * (o - v) >= (r - _) * (t - v) && + (r - _) * (f - v) >= (c - _) * (o - v) + ); + } + function xu(n, t, r, o, c, f, _, v) { + return !(n === _ && t === v) && M_(n, t, r, o, c, f, _, v); + } + function xy(n, t) { + return ( + n.next.i !== t.i && + n.prev.i !== t.i && + !(function (r, o) { + let c = r; + do { + if ( + c.i !== r.i && + c.next.i !== r.i && + c.i !== o.i && + c.next.i !== o.i && + k_(c, c.next, r, o) + ) + return !0; + c = c.next; + } while (c !== r); + return !1; + })(n, t) && + ((bu(n, t) && + bu(t, n) && + (function (r, o) { + let c = r, + f = !1; + const _ = (r.x + o.x) / 2, + v = (r.y + o.y) / 2; + do + c.y > v != c.next.y > v && + c.next.y !== c.y && + _ < + ((c.next.x - c.x) * (v - c.y)) / (c.next.y - c.y) + + c.x && + (f = !f), + (c = c.next); + while (c !== r); + return f; + })(n, t) && + (ii(n.prev, n, t.prev) || ii(n, t.prev, t))) || + (Kl(n, t) && + ii(n.prev, n, n.next) > 0 && + ii(t.prev, t, t.next) > 0)) + ); + } + function ii(n, t, r) { + return (t.y - n.y) * (r.x - t.x) - (t.x - n.x) * (r.y - t.y); + } + function Kl(n, t) { + return n.x === t.x && n.y === t.y; + } + function k_(n, t, r, o) { + const c = kd(ii(n, t, r)), + f = kd(ii(n, t, o)), + _ = kd(ii(r, o, n)), + v = kd(ii(r, o, t)); + return ( + (c !== f && _ !== v) || + !(c !== 0 || !Md(n, r, t)) || + !(f !== 0 || !Md(n, o, t)) || + !(_ !== 0 || !Md(r, n, o)) || + !(v !== 0 || !Md(r, t, o)) + ); + } + function Md(n, t, r) { + return ( + t.x <= Math.max(n.x, r.x) && + t.x >= Math.min(n.x, r.x) && + t.y <= Math.max(n.y, r.y) && + t.y >= Math.min(n.y, r.y) + ); + } + function kd(n) { + return n > 0 ? 1 : n < 0 ? -1 : 0; + } + function bu(n, t) { + return ii(n.prev, n, n.next) < 0 + ? ii(n, t, n.next) >= 0 && ii(n, n.prev, t) >= 0 + : ii(n, t, n.prev) < 0 || ii(n, n.next, t) < 0; + } + function A_(n, t) { + const r = rf(n.i, n.x, n.y), + o = rf(t.i, t.x, t.y), + c = n.next, + f = t.prev; + return ( + (n.next = t), + (t.prev = n), + (r.next = c), + (c.prev = r), + (o.next = r), + (r.prev = o), + (f.next = o), + (o.prev = f), + o + ); + } + function E_(n, t, r, o) { + const c = rf(n, t, r); + return ( + o + ? ((c.next = o.next), + (c.prev = o), + (o.next.prev = c), + (o.next = c)) + : ((c.prev = c), (c.next = c)), + c + ); + } + function wu(n) { + (n.next.prev = n.prev), + (n.prev.next = n.next), + n.prevZ && (n.prevZ.nextZ = n.nextZ), + n.nextZ && (n.nextZ.prevZ = n.prevZ); + } + function rf(n, t, r) { + return { + i: n, + x: t, + y: r, + prev: null, + next: null, + z: 0, + prevZ: null, + nextZ: null, + steiner: !1, + }; + } + class Jl { + constructor(t, r) { + if (r > t) + throw new Error( + "Min granularity must not be greater than base granularity." + ); + (this._baseZoomGranularity = t), (this._minGranularity = r); + } + getGranularityForZoomLevel(t) { + return Math.max( + Math.floor(this._baseZoomGranularity / (1 << t)), + this._minGranularity, + 1 + ); + } + } + class Ad { + constructor(t) { + (this.fill = t.fill), + (this.line = t.line), + (this.tile = t.tile), + (this.stencil = t.stencil), + (this.circle = t.circle); + } + } + (Ad.noSubdivision = new Ad({ + fill: new Jl(0, 0), + line: new Jl(0, 0), + tile: new Jl(0, 0), + stencil: new Jl(0, 0), + circle: 1, + })), + ir("SubdivisionGranularityExpression", Jl), + ir("SubdivisionGranularitySetting", Ad); + const Ql = -32768, + Tu = 32767; + class by { + constructor(t, r) { + (this._vertexBuffer = []), + (this._vertexDictionary = new Map()), + (this._used = !1), + (this._granularity = t), + (this._granularityCellSize = oe / t), + (this._canonical = r); + } + _getKey(t, r) { + return ((t += 32768) << 16) | (r + 32768); + } + _vertexToIndex(t, r) { + if (t < -32768 || r < -32768 || t > 32767 || r > 32767) + throw new Error( + "Vertex coordinates are out of signed 16 bit integer range." + ); + const o = 0 | Math.round(t), + c = 0 | Math.round(r), + f = this._getKey(o, c); + if (this._vertexDictionary.has(f)) + return this._vertexDictionary.get(f); + const _ = this._vertexBuffer.length / 2; + return ( + this._vertexDictionary.set(f, _), + this._vertexBuffer.push(o, c), + _ + ); + } + _subdivideTrianglesScanline(t) { + if (this._granularity < 2) + return (function (c, f) { + const _ = []; + for (let v = 0; v < f.length; v += 3) { + const b = f[v], + S = f[v + 1], + I = f[v + 2], + L = c[2 * b], + F = c[2 * b + 1]; + (c[2 * S] - L) * (c[2 * I + 1] - F) - + (c[2 * S + 1] - F) * (c[2 * I] - L) > + 0 + ? (_.push(b), _.push(I), _.push(S)) + : (_.push(b), _.push(S), _.push(I)); + } + return _; + })(this._vertexBuffer, t); + const r = [], + o = t.length; + for (let c = 0; c < o; c += 3) { + const f = [t[c + 0], t[c + 1], t[c + 2]], + _ = [ + this._vertexBuffer[2 * t[c + 0] + 0], + this._vertexBuffer[2 * t[c + 0] + 1], + this._vertexBuffer[2 * t[c + 1] + 0], + this._vertexBuffer[2 * t[c + 1] + 1], + this._vertexBuffer[2 * t[c + 2] + 0], + this._vertexBuffer[2 * t[c + 2] + 1], + ]; + let v = 1 / 0, + b = 1 / 0, + S = -1 / 0, + I = -1 / 0; + for (let W = 0; W < 3; W++) { + const J = _[2 * W], + le = _[2 * W + 1]; + (v = Math.min(v, J)), + (S = Math.max(S, J)), + (b = Math.min(b, le)), + (I = Math.max(I, le)); + } + if (v === S || b === I) continue; + const L = Math.floor(v / this._granularityCellSize), + F = Math.ceil(S / this._granularityCellSize), + q = Math.floor(b / this._granularityCellSize), + Z = Math.ceil(I / this._granularityCellSize); + if (L !== F || q !== Z) + for (let W = q; W < Z; W++) { + const J = this._scanlineGenerateVertexRingForCellRow( + W, + _, + f + ); + wy(this._vertexBuffer, J, r); + } + else r.push(...f); + } + return r; + } + _scanlineGenerateVertexRingForCellRow(t, r, o) { + const c = t * this._granularityCellSize, + f = c + this._granularityCellSize, + _ = []; + for (let v = 0; v < 3; v++) { + const b = r[2 * v], + S = r[2 * v + 1], + I = r[(2 * (v + 1)) % 6], + L = r[(2 * (v + 1) + 1) % 6], + F = r[(2 * (v + 2)) % 6], + q = r[(2 * (v + 2) + 1) % 6], + Z = I - b, + W = L - S, + J = Z === 0, + le = W === 0, + Re = (c - S) / W, + xe = (f - S) / W, + Ce = Math.min(Re, xe), + Ye = Math.max(Re, xe); + if ( + (!le && (Ce >= 1 || Ye <= 0)) || + (le && (S < c || S > f)) + ) { + L >= c && L <= f && _.push(o[(v + 1) % 3]); + continue; + } + !le && + Ce > 0 && + _.push(this._vertexToIndex(b + Z * Ce, S + W * Ce)); + const lt = b + Z * Math.max(Ce, 0), + Pt = b + Z * Math.min(Ye, 1); + J || this._generateIntraEdgeVertices(_, b, S, I, L, lt, Pt), + !le && + Ye < 1 && + _.push(this._vertexToIndex(b + Z * Ye, S + W * Ye)), + (le || (L >= c && L <= f)) && _.push(o[(v + 1) % 3]), + !le && + (L <= c || L >= f) && + this._generateInterEdgeVertices( + _, + b, + S, + I, + L, + F, + q, + Pt, + c, + f + ); + } + return _; + } + _generateIntraEdgeVertices(t, r, o, c, f, _, v) { + const b = c - r, + S = f - o, + I = S === 0, + L = I ? Math.min(r, c) : Math.min(_, v), + F = I ? Math.max(r, c) : Math.max(_, v), + q = Math.floor(L / this._granularityCellSize) + 1, + Z = Math.ceil(F / this._granularityCellSize) - 1; + if (I ? r < c : _ < v) + for (let W = q; W <= Z; W++) { + const J = W * this._granularityCellSize; + t.push(this._vertexToIndex(J, o + (S * (J - r)) / b)); + } + else + for (let W = Z; W >= q; W--) { + const J = W * this._granularityCellSize; + t.push(this._vertexToIndex(J, o + (S * (J - r)) / b)); + } + } + _generateInterEdgeVertices(t, r, o, c, f, _, v, b, S, I) { + const L = f - o, + F = _ - c, + q = v - f, + Z = (S - f) / q, + W = (I - f) / q, + J = Math.min(Z, W), + le = Math.max(Z, W), + Re = c + F * J; + let xe = + Math.floor(Math.min(Re, b) / this._granularityCellSize) + 1, + Ce = + Math.ceil(Math.max(Re, b) / this._granularityCellSize) - 1, + Ye = b < Re; + const lt = q === 0; + if (lt && (v === S || v === I)) return; + if (lt || J >= 1 || le <= 0) { + const Yt = o - v, + qt = _ + (r - _) * Math.min((S - v) / Yt, (I - v) / Yt); + (xe = + Math.floor(Math.min(qt, b) / this._granularityCellSize) + + 1), + (Ce = + Math.ceil(Math.max(qt, b) / this._granularityCellSize) - + 1), + (Ye = b < qt); + } + const Pt = L > 0 ? I : S; + if (Ye) + for (let Yt = xe; Yt <= Ce; Yt++) + t.push( + this._vertexToIndex(Yt * this._granularityCellSize, Pt) + ); + else + for (let Yt = Ce; Yt >= xe; Yt--) + t.push( + this._vertexToIndex(Yt * this._granularityCellSize, Pt) + ); + } + _generateOutline(t) { + const r = []; + for (const o of t) { + const c = tl(o, this._granularity, !0), + f = this._pointArrayToIndices(c), + _ = []; + for (let v = 1; v < f.length; v++) + _.push(f[v - 1]), _.push(f[v]); + r.push(_); + } + return r; + } + _handlePoles(t) { + let r = !1, + o = !1; + this._canonical && + (this._canonical.y === 0 && (r = !0), + this._canonical.y === (1 << this._canonical.z) - 1 && + (o = !0)), + (r || o) && this._fillPoles(t, r, o); + } + _ensureNoPoleVertices() { + const t = this._vertexBuffer; + for (let r = 0; r < t.length; r += 2) { + const o = t[r + 1]; + o === Ql && (t[r + 1] = -32767), + o === Tu && (t[r + 1] = 32766); + } + } + _generatePoleQuad(t, r, o, c, f, _) { + c > f != (_ === Ql) + ? (t.push(r), + t.push(o), + t.push(this._vertexToIndex(c, _)), + t.push(o), + t.push(this._vertexToIndex(f, _)), + t.push(this._vertexToIndex(c, _))) + : (t.push(o), + t.push(r), + t.push(this._vertexToIndex(c, _)), + t.push(this._vertexToIndex(f, _)), + t.push(o), + t.push(this._vertexToIndex(c, _))); + } + _fillPoles(t, r, o) { + const c = this._vertexBuffer, + f = oe, + _ = t.length; + for (let v = 2; v < _; v += 3) { + const b = t[v - 2], + S = t[v - 1], + I = t[v], + L = c[2 * b], + F = c[2 * b + 1], + q = c[2 * S], + Z = c[2 * S + 1], + W = c[2 * I], + J = c[2 * I + 1]; + r && + (F === 0 && + Z === 0 && + this._generatePoleQuad(t, b, S, L, q, Ql), + Z === 0 && + J === 0 && + this._generatePoleQuad(t, S, I, q, W, Ql), + J === 0 && + F === 0 && + this._generatePoleQuad(t, I, b, W, L, Ql)), + o && + (F === f && + Z === f && + this._generatePoleQuad(t, b, S, L, q, Tu), + Z === f && + J === f && + this._generatePoleQuad(t, S, I, q, W, Tu), + J === f && + F === f && + this._generatePoleQuad(t, I, b, W, L, Tu)); + } + } + _initializeVertices(t) { + for (let r = 0; r < t.length; r += 2) + this._vertexToIndex(t[r], t[r + 1]); + } + subdividePolygonInternal(t, r) { + if (this._used) + throw new Error("Subdivision: multiple use not allowed."); + this._used = !0; + const { flattened: o, holeIndices: c } = (function (v) { + const b = [], + S = []; + for (const I of v) + if (I.length !== 0) { + I !== v[0] && b.push(S.length / 2); + for (let L = 0; L < I.length; L++) + S.push(I[L].x), S.push(I[L].y); + } + return { flattened: S, holeIndices: b }; + })(t); + let f; + this._initializeVertices(o); + try { + const v = (function (S, I, L = 2) { + const F = I && I.length, + q = F ? I[0] * L : S.length; + let Z = I_(S, 0, q, L, !0); + const W = []; + if (!Z || Z.next === Z.prev) return W; + let J, le, Re; + if ( + (F && + (Z = (function (xe, Ce, Ye, lt) { + const Pt = []; + for (let Yt = 0, qt = Ce.length; Yt < qt; Yt++) { + const Ht = I_( + xe, + Ce[Yt] * lt, + Yt < qt - 1 ? Ce[Yt + 1] * lt : xe.length, + lt, + !1 + ); + Ht === Ht.next && (Ht.steiner = !0), + Pt.push(yy(Ht)); + } + Pt.sort(_y); + for (let Yt = 0; Yt < Pt.length; Yt++) + Ye = gy(Pt[Yt], Ye); + return Ye; + })(S, I, Z, L)), + S.length > 80 * L) + ) { + (J = S[0]), (le = S[1]); + let xe = J, + Ce = le; + for (let Ye = L; Ye < q; Ye += L) { + const lt = S[Ye], + Pt = S[Ye + 1]; + lt < J && (J = lt), + Pt < le && (le = Pt), + lt > xe && (xe = lt), + Pt > Ce && (Ce = Pt); + } + (Re = Math.max(xe - J, Ce - le)), + (Re = Re !== 0 ? 32767 / Re : 0); + } + return yu(Z, W, L, J, le, Re, 0), W; + })(o, c), + b = this._convertIndices(o, v); + f = this._subdivideTrianglesScanline(b); + } catch (v) { + console.error(v); + } + let _ = []; + return ( + r && (_ = this._generateOutline(t)), + this._ensureNoPoleVertices(), + this._handlePoles(f), + { + verticesFlattened: this._vertexBuffer, + indicesTriangles: f, + indicesLineList: _, + } + ); + } + _convertIndices(t, r) { + const o = []; + for (let c = 0; c < r.length; c++) + o.push(this._vertexToIndex(t[2 * r[c]], t[2 * r[c] + 1])); + return o; + } + _pointArrayToIndices(t) { + const r = []; + for (let o = 0; o < t.length; o++) { + const c = t[o]; + r.push(this._vertexToIndex(c.x, c.y)); + } + return r; + } + } + function z_(n, t, r, o = !0) { + return new by(r, t).subdividePolygonInternal(n, o); + } + function tl(n, t, r = !1) { + if (!n || n.length < 1) return []; + if (n.length < 2) return []; + const o = n[0], + c = n[n.length - 1], + f = r && (o.x !== c.x || o.y !== c.y); + if (t < 2) return f ? [...n, n[0]] : [...n]; + const _ = Math.floor(oe / t), + v = []; + v.push(new B(n[0].x, n[0].y)); + const b = n.length, + S = f ? b : b - 1; + for (let I = 0; I < S; I++) { + const L = n[I], + F = I < b - 1 ? n[I + 1] : n[0], + q = L.x, + Z = L.y, + W = F.x, + J = F.y, + le = q !== W, + Re = Z !== J; + if (!le && !Re) continue; + const xe = W - q, + Ce = J - Z, + Ye = Math.abs(xe), + lt = Math.abs(Ce); + let Pt = q, + Yt = Z; + for (;;) { + const Ht = + xe > 0 + ? (Math.floor(Pt / _) + 1) * _ + : (Math.ceil(Pt / _) - 1) * _, + Sr = + Ce > 0 + ? (Math.floor(Yt / _) + 1) * _ + : (Math.ceil(Yt / _) - 1) * _, + Gt = Math.abs(Pt - Ht), + Wt = Math.abs(Yt - Sr), + gt = Math.abs(Pt - W), + Nr = Math.abs(Yt - J), + Hr = le ? Gt / Ye : Number.POSITIVE_INFINITY, + kr = Re ? Wt / lt : Number.POSITIVE_INFINITY; + if ((gt <= Gt || !le) && (Nr <= Wt || !Re)) break; + if ((Hr < kr && le) || !Re) { + (Pt = Ht), (Yt += Ce * Hr); + const yr = new B(Pt, Math.round(Yt)); + (v[v.length - 1].x === yr.x && + v[v.length - 1].y === yr.y) || + v.push(yr); + } else { + (Pt += xe * kr), (Yt = Sr); + const yr = new B(Math.round(Pt), Yt); + (v[v.length - 1].x === yr.x && + v[v.length - 1].y === yr.y) || + v.push(yr); + } + } + const qt = new B(W, J); + (v[v.length - 1].x === qt.x && v[v.length - 1].y === qt.y) || + v.push(qt); + } + return v; + } + function wy(n, t, r) { + if (t.length === 0) + throw new Error("Subdivision vertex ring is empty."); + let o = 0, + c = n[2 * t[0]]; + for (let b = 1; b < t.length; b++) { + const S = n[2 * t[b]]; + S < c && ((c = S), (o = b)); + } + const f = t.length; + let _ = o, + v = (_ + 1) % f; + for (;;) { + const b = _ - 1 >= 0 ? _ - 1 : f - 1, + S = (v + 1) % f, + I = n[2 * t[b]], + L = n[2 * t[S]], + F = n[2 * t[_]], + q = n[2 * t[_] + 1], + Z = n[2 * t[v] + 1]; + let W = !1; + if (I < L) W = !0; + else if (I > L) W = !1; + else { + const J = Z - q, + le = -(n[2 * t[v]] - F), + Re = q < Z ? 1 : -1; + ((I - F) * J + (n[2 * t[b] + 1] - q) * le) * Re > + ((L - F) * J + (n[2 * t[S] + 1] - q) * le) * Re && (W = !0); + } + if (W) { + const J = t[b], + le = t[_], + Re = t[v]; + J !== le && J !== Re && le !== Re && r.push(Re, le, J), + _--, + _ < 0 && (_ = f - 1); + } else { + const J = t[S], + le = t[_], + Re = t[v]; + J !== le && J !== Re && le !== Re && r.push(Re, le, J), + v++, + v >= f && (v = 0); + } + if (b === S) break; + } + } + function L_(n, t, r, o, c, f, _, v, b) { + const S = c.length / 2, + I = _ && v && b; + if (S < Kr.MAX_VERTEX_ARRAY_LENGTH) { + const L = t.prepareSegment(S, r, o), + F = L.vertexLength; + for (let W = 0; W < f.length; W += 3) + o.emplaceBack(F + f[W], F + f[W + 1], F + f[W + 2]); + let q, Z; + (L.vertexLength += S), + (L.primitiveLength += f.length / 3), + I && + ((Z = _.prepareSegment(S, r, v)), + (q = Z.vertexLength), + (Z.vertexLength += S)); + for (let W = 0; W < c.length; W += 2) n(c[W], c[W + 1]); + if (I) + for (let W = 0; W < b.length; W++) { + const J = b[W]; + for (let le = 1; le < J.length; le += 2) + v.emplaceBack(q + J[le - 1], q + J[le]); + Z.primitiveLength += J.length / 2; + } + } else + (function (L, F, q, Z, W, J) { + const le = []; + for (let lt = 0; lt < Z.length / 2; lt++) le.push(-1); + const Re = { count: 0 }; + let xe = 0, + Ce = L.getOrCreateLatestSegment(F, q), + Ye = Ce.vertexLength; + for (let lt = 2; lt < W.length; lt += 3) { + const Pt = W[lt - 2], + Yt = W[lt - 1], + qt = W[lt]; + let Ht = le[Pt] < xe, + Sr = le[Yt] < xe, + Gt = le[qt] < xe; + Ce.vertexLength + + ((Ht ? 1 : 0) + (Sr ? 1 : 0) + (Gt ? 1 : 0)) > + Kr.MAX_VERTEX_ARRAY_LENGTH && + ((Ce = L.createNewSegment(F, q)), + (xe = Re.count), + (Ht = !0), + (Sr = !0), + (Gt = !0), + (Ye = 0)); + const Wt = Cu(le, Z, J, Re, Pt, Ht, Ce), + gt = Cu(le, Z, J, Re, Yt, Sr, Ce), + Nr = Cu(le, Z, J, Re, qt, Gt, Ce); + q.emplaceBack(Ye + Wt - xe, Ye + gt - xe, Ye + Nr - xe), + Ce.primitiveLength++; + } + })(t, r, o, c, f, n), + I && + (function (L, F, q, Z, W, J) { + const le = []; + for (let lt = 0; lt < Z.length / 2; lt++) le.push(-1); + const Re = { count: 0 }; + let xe = 0, + Ce = L.getOrCreateLatestSegment(F, q), + Ye = Ce.vertexLength; + for (let lt = 0; lt < W.length; lt++) { + const Pt = W[lt]; + for (let Yt = 1; Yt < W[lt].length; Yt += 2) { + const qt = Pt[Yt - 1], + Ht = Pt[Yt]; + let Sr = le[qt] < xe, + Gt = le[Ht] < xe; + Ce.vertexLength + ((Sr ? 1 : 0) + (Gt ? 1 : 0)) > + Kr.MAX_VERTEX_ARRAY_LENGTH && + ((Ce = L.createNewSegment(F, q)), + (xe = Re.count), + (Sr = !0), + (Gt = !0), + (Ye = 0)); + const Wt = Cu(le, Z, J, Re, qt, Sr, Ce), + gt = Cu(le, Z, J, Re, Ht, Gt, Ce); + q.emplaceBack(Ye + Wt - xe, Ye + gt - xe), + Ce.primitiveLength++; + } + } + })(_, r, v, c, b, n), + t.forceNewSegmentOnNextPrepare(), + _ == null || _.forceNewSegmentOnNextPrepare(); + } + function Cu(n, t, r, o, c, f, _) { + if (f) { + const v = o.count; + return ( + r(t[2 * c], t[2 * c + 1]), + (n[c] = o.count), + o.count++, + _.vertexLength++, + v + ); + } + return n[c]; + } + class nf { + constructor(t) { + (this.zoom = t.zoom), + (this.globalState = t.globalState), + (this.overscaling = t.overscaling), + (this.layers = t.layers), + (this.layerIds = this.layers.map((r) => r.id)), + (this.index = t.index), + (this.hasPattern = !1), + (this.patternFeatures = []), + (this.layoutVertexArray = new rt()), + (this.indexArray = new Rn()), + (this.indexArray2 = new Ln()), + (this.programConfigurations = new la(t.layers, t.zoom)), + (this.segments = new Kr()), + (this.segments2 = new Kr()), + (this.stateDependentLayerIds = this.layers + .filter((r) => r.isStateDependent()) + .map((r) => r.id)); + } + populate(t, r, o) { + this.hasPattern = Qp("fill", this.layers, r); + const c = this.layers[0].layout.get("fill-sort-key"), + f = !c.isConstant(), + _ = []; + for (const { + feature: v, + id: b, + index: S, + sourceLayerIndex: I, + } of t) { + const L = this.layers[0]._featureFilter.needGeometry, + F = no(v, L); + if ( + !this.layers[0]._featureFilter.filter( + new Un(this.zoom, { globalState: this.globalState }), + F, + o + ) + ) + continue; + const q = f + ? c.evaluate(F, {}, o, r.availableImages) + : void 0, + Z = { + id: b, + properties: v.properties, + type: v.type, + sourceLayerIndex: I, + index: S, + geometry: L ? F.geometry : bo(v), + patterns: {}, + sortKey: q, + }; + _.push(Z); + } + f && _.sort((v, b) => v.sortKey - b.sortKey); + for (const v of _) { + const { geometry: b, index: S, sourceLayerIndex: I } = v; + if (this.hasPattern) { + const L = ef("fill", this.layers, v, this.zoom, r); + this.patternFeatures.push(L); + } else + this.addFeature(v, b, S, o, {}, r.subdivisionGranularity); + r.featureIndex.insert(t[S].feature, b, S, I, this.index); + } + } + update(t, r, o) { + this.stateDependentLayers.length && + this.programConfigurations.updatePaintArrays( + t, + r, + this.stateDependentLayers, + o + ); + } + addFeatures(t, r, o) { + for (const c of this.patternFeatures) + this.addFeature( + c, + c.geometry, + c.index, + r, + o, + 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, + hy + )), + (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, r, o, c, f, _) { + for (const v of Os(r, 500)) { + const b = z_(v, c, _.fill.getGranularityForZoomLevel(c.z)), + S = this.layoutVertexArray; + L_( + (I, L) => { + S.emplaceBack(I, L); + }, + this.segments, + this.layoutVertexArray, + this.indexArray, + b.verticesFlattened, + b.indicesTriangles, + this.segments2, + this.indexArray2, + b.indicesLineList + ); + } + this.programConfigurations.populatePaintArrays( + this.layoutVertexArray.length, + t, + o, + f, + c + ); + } + } + let D_, R_; + ir("FillBucket", nf, { omit: ["layers", "patternFeatures"] }); + var Ty = { + get paint() { + return (R_ = + R_ || + new Ui({ + "fill-antialias": new wr(ye.paint_fill["fill-antialias"]), + "fill-opacity": new Or(ye.paint_fill["fill-opacity"]), + "fill-color": new Or(ye.paint_fill["fill-color"]), + "fill-outline-color": new Or( + ye.paint_fill["fill-outline-color"] + ), + "fill-translate": new wr(ye.paint_fill["fill-translate"]), + "fill-translate-anchor": new wr( + ye.paint_fill["fill-translate-anchor"] + ), + "fill-pattern": new Zl(ye.paint_fill["fill-pattern"]), + })); + }, + get layout() { + return (D_ = + D_ || + new Ui({ + "fill-sort-key": new Or(ye.layout_fill["fill-sort-key"]), + })); + }, + }; + class Cy extends xa { + constructor(t) { + super(t, Ty); + } + recalculate(t, r) { + super.recalculate(t, r); + const o = this.paint._values["fill-outline-color"]; + o.value.kind === "constant" && + o.value.value === void 0 && + (this.paint._values["fill-outline-color"] = + this.paint._values["fill-color"]); + } + createBucket(t) { + return new nf(t); + } + queryRadius() { + return Pd(this.paint.get("fill-translate")); + } + queryIntersectsFeature({ + queryGeometry: t, + geometry: r, + transform: o, + pixelsToTileUnits: c, + }) { + return p_( + Id( + t, + this.paint.get("fill-translate"), + this.paint.get("fill-translate-anchor"), + -o.bearingInRadians, + c + ), + r + ); + } + isTileClipped() { + return !0; + } + } + const Sy = ti( + [ + { name: "a_pos", components: 2, type: "Int16" }, + { name: "a_normal_ed", components: 4, type: "Int16" }, + ], + 4 + ), + Py = ti( + [{ name: "a_centroid", components: 2, type: "Int16" }], + 4 + ), + { members: Iy } = Sy; + class ec { + constructor(t, r, o, c, f) { + (this.properties = {}), + (this.extent = o), + (this.type = 0), + (this.id = void 0), + (this._pbf = t), + (this._geometry = -1), + (this._keys = c), + (this._values = f), + t.readFields(My, this, r); + } + loadGeometry() { + const t = this._pbf; + t.pos = this._geometry; + const r = t.readVarint() + t.pos, + o = []; + let c, + f = 1, + _ = 0, + v = 0, + b = 0; + for (; t.pos < r; ) { + if (_ <= 0) { + const S = t.readVarint(); + (f = 7 & S), (_ = S >> 3); + } + if ((_--, f === 1 || f === 2)) + (v += t.readSVarint()), + (b += t.readSVarint()), + f === 1 && (c && o.push(c), (c = [])), + c && c.push(new B(v, b)); + else { + if (f !== 7) throw new Error(`unknown command ${f}`); + c && c.push(c[0].clone()); + } + } + return c && o.push(c), o; + } + bbox() { + const t = this._pbf; + t.pos = this._geometry; + const r = t.readVarint() + t.pos; + let o = 1, + c = 0, + f = 0, + _ = 0, + v = 1 / 0, + b = -1 / 0, + S = 1 / 0, + I = -1 / 0; + for (; t.pos < r; ) { + if (c <= 0) { + const L = t.readVarint(); + (o = 7 & L), (c = L >> 3); + } + if ((c--, o === 1 || o === 2)) + (f += t.readSVarint()), + (_ += t.readSVarint()), + f < v && (v = f), + f > b && (b = f), + _ < S && (S = _), + _ > I && (I = _); + else if (o !== 7) throw new Error(`unknown command ${o}`); + } + return [v, S, b, I]; + } + toGeoJSON(t, r, o) { + const c = this.extent * Math.pow(2, o), + f = this.extent * t, + _ = this.extent * r, + v = this.loadGeometry(); + function b(F) { + return [ + (360 * (F.x + f)) / c - 180, + (360 / Math.PI) * + Math.atan(Math.exp((1 - (2 * (F.y + _)) / c) * Math.PI)) - + 90, + ]; + } + function S(F) { + return F.map(b); + } + let I; + if (this.type === 1) { + const F = []; + for (const Z of v) F.push(Z[0]); + const q = S(F); + I = + F.length === 1 + ? { type: "Point", coordinates: q[0] } + : { type: "MultiPoint", coordinates: q }; + } else if (this.type === 2) { + const F = v.map(S); + I = + F.length === 1 + ? { type: "LineString", coordinates: F[0] } + : { type: "MultiLineString", coordinates: F }; + } else { + if (this.type !== 3) throw new Error("unknown feature type"); + { + const F = (function (Z) { + const W = Z.length; + if (W <= 1) return [Z]; + const J = []; + let le, Re; + for (let xe = 0; xe < W; xe++) { + const Ce = ky(Z[xe]); + Ce !== 0 && + (Re === void 0 && (Re = Ce < 0), + Re === Ce < 0 + ? (le && J.push(le), (le = [Z[xe]])) + : le && le.push(Z[xe])); + } + return le && J.push(le), J; + })(v), + q = []; + for (const Z of F) q.push(Z.map(S)); + I = + q.length === 1 + ? { type: "Polygon", coordinates: q[0] } + : { type: "MultiPolygon", coordinates: q }; + } + } + const L = { + type: "Feature", + geometry: I, + properties: this.properties, + }; + return this.id != null && (L.id = this.id), L; + } + } + function My(n, t, r) { + n === 1 + ? (t.id = r.readVarint()) + : n === 2 + ? (function (o, c) { + const f = o.readVarint() + o.pos; + for (; o.pos < f; ) { + const _ = c._keys[o.readVarint()], + v = c._values[o.readVarint()]; + c.properties[_] = v; + } + })(r, t) + : n === 3 + ? (t.type = r.readVarint()) + : n === 4 && (t._geometry = r.pos); + } + function ky(n) { + let t = 0; + for (let r, o, c = 0, f = n.length, _ = f - 1; c < f; _ = c++) + (r = n[c]), (o = n[_]), (t += (o.x - r.x) * (r.y + o.y)); + return t; + } + ec.types = ["Unknown", "Point", "LineString", "Polygon"]; + class B_ { + constructor(t, r) { + (this.version = 1), + (this.name = ""), + (this.extent = 4096), + (this.length = 0), + (this._pbf = t), + (this._keys = []), + (this._values = []), + (this._features = []), + t.readFields(Ay, this, r), + (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 r = this._pbf.readVarint() + this._pbf.pos; + return new ec( + this._pbf, + r, + this.extent, + this._keys, + this._values + ); + } + } + function Ay(n, t, r) { + n === 15 + ? (t.version = r.readVarint()) + : n === 1 + ? (t.name = r.readString()) + : n === 5 + ? (t.extent = r.readVarint()) + : n === 2 + ? t._features.push(r.pos) + : n === 3 + ? t._keys.push(r.readString()) + : n === 4 && + t._values.push( + (function (o) { + let c = null; + const f = o.readVarint() + o.pos; + for (; o.pos < f; ) { + const _ = o.readVarint() >> 3; + c = + _ === 1 + ? o.readString() + : _ === 2 + ? o.readFloat() + : _ === 3 + ? o.readDouble() + : _ === 4 + ? o.readVarint64() + : _ === 5 + ? o.readVarint() + : _ === 6 + ? o.readSVarint() + : _ === 7 + ? o.readBoolean() + : null; + } + if (c == null) throw new Error("unknown feature value"); + return c; + })(r) + ); + } + class F_ { + constructor(t, r) { + this.layers = t.readFields(Ey, {}, r); + } + } + function Ey(n, t, r) { + if (n === 3) { + const o = new B_(r, r.readVarint() + r.pos); + o.length && (t[o.name] = o); + } + } + const af = Math.pow(2, 13); + function Su(n, t, r, o, c, f, _, v) { + n.emplaceBack( + t, + r, + 2 * Math.floor(o * af) + _, + c * af * 2, + f * af * 2, + Math.round(v) + ); + } + class of { + constructor(t) { + (this.zoom = t.zoom), + (this.globalState = t.globalState), + (this.overscaling = t.overscaling), + (this.layers = t.layers), + (this.layerIds = this.layers.map((r) => r.id)), + (this.index = t.index), + (this.hasPattern = !1), + (this.layoutVertexArray = new Ge()), + (this.centroidVertexArray = new _e()), + (this.indexArray = new Rn()), + (this.programConfigurations = new la(t.layers, t.zoom)), + (this.segments = new Kr()), + (this.stateDependentLayerIds = this.layers + .filter((r) => r.isStateDependent()) + .map((r) => r.id)); + } + populate(t, r, o) { + (this.features = []), + (this.hasPattern = Qp("fill-extrusion", this.layers, r)); + for (const { + feature: c, + id: f, + index: _, + sourceLayerIndex: v, + } of t) { + const b = this.layers[0]._featureFilter.needGeometry, + S = no(c, b); + if ( + !this.layers[0]._featureFilter.filter( + new Un(this.zoom, { globalState: this.globalState }), + S, + o + ) + ) + continue; + const I = { + id: f, + sourceLayerIndex: v, + index: _, + geometry: b ? S.geometry : bo(c), + properties: c.properties, + type: c.type, + patterns: {}, + }; + this.hasPattern + ? this.features.push( + ef("fill-extrusion", this.layers, I, this.zoom, r) + ) + : this.addFeature( + I, + I.geometry, + _, + o, + {}, + r.subdivisionGranularity + ), + r.featureIndex.insert(c, I.geometry, _, v, this.index, !0); + } + } + addFeatures(t, r, o) { + for (const c of this.features) { + const { geometry: f } = c; + this.addFeature( + c, + f, + c.index, + r, + o, + t.subdivisionGranularity + ); + } + } + update(t, r, o) { + this.stateDependentLayers.length && + this.programConfigurations.updatePaintArrays( + t, + r, + this.stateDependentLayers, + o + ); + } + 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, + Iy + )), + (this.centroidVertexBuffer = t.createVertexBuffer( + this.centroidVertexArray, + Py.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, r, o, c, f, _) { + for (const v of Os(r, 500)) { + const b = { x: 0, y: 0, sampleCount: 0 }, + S = this.layoutVertexArray.length; + this.processPolygon(b, c, t, v, _); + const I = this.layoutVertexArray.length - S, + L = Math.floor(b.x / b.sampleCount), + F = Math.floor(b.y / b.sampleCount); + for (let q = 0; q < I; q++) + this.centroidVertexArray.emplaceBack(L, F); + } + this.programConfigurations.populatePaintArrays( + this.layoutVertexArray.length, + t, + o, + f, + c + ); + } + processPolygon(t, r, o, c, f) { + if (c.length < 1 || O_(c[0])) return; + for (const L of c) L.length !== 0 && zy(t, L); + const _ = { + segment: this.segments.prepareSegment( + 4, + this.layoutVertexArray, + this.indexArray + ), + }, + v = f.fill.getGranularityForZoomLevel(r.z), + b = ec.types[o.type] === "Polygon"; + for (const L of c) { + if (L.length === 0 || O_(L)) continue; + const F = tl(L, v, b); + this._generateSideFaces(F, _); + } + if (!b) return; + const S = z_(c, r, v, !1), + I = this.layoutVertexArray; + L_( + (L, F) => { + Su(I, L, F, 0, 0, 1, 1, 0); + }, + this.segments, + this.layoutVertexArray, + this.indexArray, + S.verticesFlattened, + S.indicesTriangles + ); + } + _generateSideFaces(t, r) { + let o = 0; + for (let c = 1; c < t.length; c++) { + const f = t[c], + _ = t[c - 1]; + if (Ly(f, _)) continue; + r.segment.vertexLength + 4 > Kr.MAX_VERTEX_ARRAY_LENGTH && + (r.segment = this.segments.prepareSegment( + 4, + this.layoutVertexArray, + this.indexArray + )); + const v = f.sub(_)._perp()._unit(), + b = _.dist(f); + o + b > 32768 && (o = 0), + Su(this.layoutVertexArray, f.x, f.y, v.x, v.y, 0, 0, o), + Su(this.layoutVertexArray, f.x, f.y, v.x, v.y, 0, 1, o), + (o += b), + Su(this.layoutVertexArray, _.x, _.y, v.x, v.y, 0, 0, o), + Su(this.layoutVertexArray, _.x, _.y, v.x, v.y, 0, 1, o); + const S = r.segment.vertexLength; + this.indexArray.emplaceBack(S, S + 2, S + 1), + this.indexArray.emplaceBack(S + 1, S + 2, S + 3), + (r.segment.vertexLength += 4), + (r.segment.primitiveLength += 2); + } + } + } + function zy(n, t) { + for (let r = 0; r < t.length; r++) { + const o = t[r]; + (r === t.length - 1 && t[0].x === o.x && t[0].y === o.y) || + ((n.x += o.x), (n.y += o.y), n.sampleCount++); + } + } + function Ly(n, t) { + return ( + (n.x === t.x && (n.x < 0 || n.x > oe)) || + (n.y === t.y && (n.y < 0 || n.y > oe)) + ); + } + function O_(n) { + return ( + n.every((t) => t.x < 0) || + n.every((t) => t.x > oe) || + n.every((t) => t.y < 0) || + n.every((t) => t.y > oe) + ); + } + let N_; + ir("FillExtrusionBucket", of, { omit: ["layers", "features"] }); + var Dy = { + get paint() { + return (N_ = + N_ || + new Ui({ + "fill-extrusion-opacity": new wr( + ye["paint_fill-extrusion"]["fill-extrusion-opacity"] + ), + "fill-extrusion-color": new Or( + ye["paint_fill-extrusion"]["fill-extrusion-color"] + ), + "fill-extrusion-translate": new wr( + ye["paint_fill-extrusion"]["fill-extrusion-translate"] + ), + "fill-extrusion-translate-anchor": new wr( + ye["paint_fill-extrusion"][ + "fill-extrusion-translate-anchor" + ] + ), + "fill-extrusion-pattern": new Zl( + ye["paint_fill-extrusion"]["fill-extrusion-pattern"] + ), + "fill-extrusion-height": new Or( + ye["paint_fill-extrusion"]["fill-extrusion-height"] + ), + "fill-extrusion-base": new Or( + ye["paint_fill-extrusion"]["fill-extrusion-base"] + ), + "fill-extrusion-vertical-gradient": new wr( + ye["paint_fill-extrusion"][ + "fill-extrusion-vertical-gradient" + ] + ), + })); + }, + }; + class Ry extends xa { + constructor(t) { + super(t, Dy); + } + createBucket(t) { + return new of(t); + } + queryRadius() { + return Pd(this.paint.get("fill-extrusion-translate")); + } + is3D() { + return !0; + } + queryIntersectsFeature({ + queryGeometry: t, + feature: r, + featureState: o, + geometry: c, + transform: f, + pixelsToTileUnits: _, + pixelPosMatrix: v, + }) { + const b = Id( + t, + this.paint.get("fill-extrusion-translate"), + this.paint.get("fill-extrusion-translate-anchor"), + -f.bearingInRadians, + _ + ), + S = this.paint.get("fill-extrusion-height").evaluate(r, o), + I = this.paint.get("fill-extrusion-base").evaluate(r, o), + L = (function (q, Z) { + const W = []; + for (const J of q) { + const le = [J.x, J.y, 0, 1]; + ke(le, le, Z), + W.push(new B(le[0] / le[3], le[1] / le[3])); + } + return W; + })(b, v), + F = (function (q, Z, W, J) { + const le = [], + Re = [], + xe = J[8] * Z, + Ce = J[9] * Z, + Ye = J[10] * Z, + lt = J[11] * Z, + Pt = J[8] * W, + Yt = J[9] * W, + qt = J[10] * W, + Ht = J[11] * W; + for (const Sr of q) { + const Gt = [], + Wt = []; + for (const gt of Sr) { + const Nr = gt.x, + Hr = gt.y, + kr = J[0] * Nr + J[4] * Hr + J[12], + yr = J[1] * Nr + J[5] * Hr + J[13], + dn = J[2] * Nr + J[6] * Hr + J[14], + Qn = J[3] * Nr + J[7] * Hr + J[15], + gi = dn + Ye, + qi = Qn + lt, + Ba = kr + Pt, + ua = yr + Yt, + Ri = dn + qt, + Xn = Qn + Ht, + Pi = new B((kr + xe) / qi, (yr + Ce) / qi); + (Pi.z = gi / qi), Gt.push(Pi); + const Bi = new B(Ba / Xn, ua / Xn); + (Bi.z = Ri / Xn), Wt.push(Bi); + } + le.push(Gt), Re.push(Wt); + } + return [le, Re]; + })(c, I, S, v); + return (function (q, Z, W) { + let J = 1 / 0; + p_(W, Z) && (J = j_(W, Z[0])); + for (let le = 0; le < Z.length; le++) { + const Re = Z[le], + xe = q[le]; + for (let Ce = 0; Ce < Re.length - 1; Ce++) { + const Ye = Re[Ce], + lt = [Ye, Re[Ce + 1], xe[Ce + 1], xe[Ce], Ye]; + d_(W, lt) && (J = Math.min(J, j_(W, lt))); + } + } + return J !== 1 / 0 && J; + })(F[0], F[1], L); + } + } + function Pu(n, t) { + return n.x * t.x + n.y * t.y; + } + function j_(n, t) { + if (n.length === 1) { + let r = 0; + const o = t[r++]; + let c; + for (; !c || o.equals(c); ) + if (((c = t[r++]), !c)) return 1 / 0; + for (; r < t.length; r++) { + const f = t[r], + _ = n[0], + v = c.sub(o), + b = f.sub(o), + S = _.sub(o), + I = Pu(v, v), + L = Pu(v, b), + F = Pu(b, b), + q = Pu(S, v), + Z = Pu(S, b), + W = I * F - L * L, + J = (F * q - L * Z) / W, + le = (I * Z - L * q) / W, + Re = o.z * (1 - J - le) + c.z * J + f.z * le; + if (isFinite(Re)) return Re; + } + return 1 / 0; + } + { + let r = 1 / 0; + for (const o of t) r = Math.min(r, o.z); + return r; + } + } + const By = ti( + [ + { name: "a_pos_normal", components: 2, type: "Int16" }, + { name: "a_data", components: 4, type: "Uint8" }, + ], + 4 + ), + { members: Fy } = By, + Oy = ti([ + { name: "a_uv_x", components: 1, type: "Float32" }, + { name: "a_split_index", components: 1, type: "Float32" }, + ]), + { members: Ny } = Oy, + jy = Math.cos((Math.PI / 180) * 37.5), + V_ = Math.pow(2, 14) / 0.5; + class sf { + constructor(t) { + (this.zoom = t.zoom), + (this.globalState = t.globalState), + (this.overscaling = t.overscaling), + (this.layers = t.layers), + (this.layerIds = this.layers.map((r) => r.id)), + (this.index = t.index), + (this.hasPattern = !1), + (this.patternFeatures = []), + (this.lineClipsArray = []), + (this.gradients = {}), + this.layers.forEach((r) => { + this.gradients[r.id] = {}; + }), + (this.layoutVertexArray = new Xe()), + (this.layoutVertexArray2 = new tt()), + (this.indexArray = new Rn()), + (this.programConfigurations = new la(t.layers, t.zoom)), + (this.segments = new Kr()), + (this.maxLineLength = 0), + (this.stateDependentLayerIds = this.layers + .filter((r) => r.isStateDependent()) + .map((r) => r.id)); + } + populate(t, r, o) { + this.hasPattern = Qp("line", this.layers, r); + const c = this.layers[0].layout.get("line-sort-key"), + f = !c.isConstant(), + _ = []; + for (const { + feature: v, + id: b, + index: S, + sourceLayerIndex: I, + } of t) { + const L = this.layers[0]._featureFilter.needGeometry, + F = no(v, L); + if ( + !this.layers[0]._featureFilter.filter( + new Un(this.zoom, { globalState: this.globalState }), + F, + o + ) + ) + continue; + const q = f ? c.evaluate(F, {}, o) : void 0, + Z = { + id: b, + properties: v.properties, + type: v.type, + sourceLayerIndex: I, + index: S, + geometry: L ? F.geometry : bo(v), + patterns: {}, + sortKey: q, + }; + _.push(Z); + } + f && _.sort((v, b) => v.sortKey - b.sortKey); + for (const v of _) { + const { geometry: b, index: S, sourceLayerIndex: I } = v; + if (this.hasPattern) { + const L = ef("line", this.layers, v, this.zoom, r); + this.patternFeatures.push(L); + } else + this.addFeature(v, b, S, o, {}, r.subdivisionGranularity); + r.featureIndex.insert(t[S].feature, b, S, I, this.index); + } + } + update(t, r, o) { + this.stateDependentLayers.length && + this.programConfigurations.updatePaintArrays( + t, + r, + this.stateDependentLayers, + o + ); + } + addFeatures(t, r, o) { + for (const c of this.patternFeatures) + this.addFeature( + c, + c.geometry, + c.index, + r, + o, + 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, + Ny + )), + (this.layoutVertexBuffer = t.createVertexBuffer( + this.layoutVertexArray, + Fy + )), + (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.prototype.hasOwnProperty.call( + t.properties, + "mapbox_clip_start" + ) && + Object.prototype.hasOwnProperty.call( + t.properties, + "mapbox_clip_end" + ) + ) + return { + start: +t.properties.mapbox_clip_start, + end: +t.properties.mapbox_clip_end, + }; + } + addFeature(t, r, o, c, f, _) { + const v = this.layers[0].layout, + b = v.get("line-join").evaluate(t, {}), + S = v.get("line-cap"), + I = v.get("line-miter-limit"), + L = v.get("line-round-limit"); + this.lineClips = this.lineFeatureClips(t); + for (const F of r) this.addLine(F, t, b, S, I, L, c, _); + this.programConfigurations.populatePaintArrays( + this.layoutVertexArray.length, + t, + o, + f, + c + ); + } + addLine(t, r, o, c, f, _, v, b) { + if ( + ((this.distance = 0), + (this.scaledDistance = 0), + (this.totalDistance = 0), + (t = tl(t, v ? b.line.getGranularityForZoomLevel(v.z) : 1)), + this.lineClips) + ) { + this.lineClipsArray.push(this.lineClips); + for (let xe = 0; xe < t.length - 1; xe++) + this.totalDistance += t[xe].dist(t[xe + 1]); + this.updateScaledDistance(), + (this.maxLineLength = Math.max( + this.maxLineLength, + this.totalDistance + )); + } + const S = ec.types[r.type] === "Polygon"; + let I = t.length; + for (; I >= 2 && t[I - 1].equals(t[I - 2]); ) I--; + let L = 0; + for (; L < I - 1 && t[L].equals(t[L + 1]); ) L++; + if (I < (S ? 3 : 2)) return; + o === "bevel" && (f = 1.05); + const F = + this.overscaling <= 16 + ? 122880 / (512 * this.overscaling) + : 0, + q = this.segments.prepareSegment( + 10 * I, + this.layoutVertexArray, + this.indexArray + ); + let Z, W, J, le, Re; + (this.e1 = this.e2 = -1), + S && ((Z = t[I - 2]), (Re = t[L].sub(Z)._unit()._perp())); + for (let xe = L; xe < I; xe++) { + if ( + ((J = xe === I - 1 ? (S ? t[L + 1] : void 0) : t[xe + 1]), + J && t[xe].equals(J)) + ) + continue; + Re && (le = Re), + Z && (W = Z), + (Z = t[xe]), + (Re = J ? J.sub(Z)._unit()._perp() : le), + (le = le || Re); + let Ce = le.add(Re); + (Ce.x === 0 && Ce.y === 0) || Ce._unit(); + const Ye = le.x * Re.x + le.y * Re.y, + lt = Ce.x * Re.x + Ce.y * Re.y, + Pt = lt !== 0 ? 1 / lt : 1 / 0, + Yt = 2 * Math.sqrt(2 - 2 * lt), + qt = lt < jy && W && J, + Ht = le.x * Re.y - le.y * Re.x > 0; + if (qt && xe > L) { + const Wt = Z.dist(W); + if (Wt > 2 * F) { + const gt = Z.sub( + Z.sub(W) + ._mult(F / Wt) + ._round() + ); + this.updateDistance(W, gt), + this.addCurrentVertex(gt, le, 0, 0, q), + (W = gt); + } + } + const Sr = W && J; + let Gt = Sr ? o : S ? "butt" : c; + if ( + (Sr && + Gt === "round" && + (Pt < _ ? (Gt = "miter") : Pt <= 2 && (Gt = "fakeround")), + Gt === "miter" && Pt > f && (Gt = "bevel"), + Gt === "bevel" && + (Pt > 2 && (Gt = "flipbevel"), Pt < f && (Gt = "miter")), + W && this.updateDistance(W, Z), + Gt === "miter") + ) + Ce._mult(Pt), this.addCurrentVertex(Z, Ce, 0, 0, q); + else if (Gt === "flipbevel") { + if (Pt > 100) Ce = Re.mult(-1); + else { + const Wt = (Pt * le.add(Re).mag()) / le.sub(Re).mag(); + Ce._perp()._mult(Wt * (Ht ? -1 : 1)); + } + this.addCurrentVertex(Z, Ce, 0, 0, q), + this.addCurrentVertex(Z, Ce.mult(-1), 0, 0, q); + } else if (Gt === "bevel" || Gt === "fakeround") { + const Wt = -Math.sqrt(Pt * Pt - 1), + gt = Ht ? Wt : 0, + Nr = Ht ? 0 : Wt; + if ( + (W && this.addCurrentVertex(Z, le, gt, Nr, q), + Gt === "fakeround") + ) { + const Hr = Math.round((180 * Yt) / Math.PI / 20); + for (let kr = 1; kr < Hr; kr++) { + let yr = kr / Hr; + if (yr !== 0.5) { + const Qn = yr - 0.5; + yr += + yr * + Qn * + (yr - 1) * + ((1.0904 + + Ye * (Ye * (3.55645 - 1.43519 * Ye) - 3.2452)) * + Qn * + Qn + + (0.848013 + Ye * (0.215638 * Ye - 1.06021))); + } + const dn = Re.sub(le) + ._mult(yr) + ._add(le) + ._unit() + ._mult(Ht ? -1 : 1); + this.addHalfVertex(Z, dn.x, dn.y, !1, Ht, 0, q); + } + } + J && this.addCurrentVertex(Z, Re, -gt, -Nr, q); + } else if (Gt === "butt") + this.addCurrentVertex(Z, Ce, 0, 0, q); + else if (Gt === "square") { + const Wt = W ? 1 : -1; + this.addCurrentVertex(Z, Ce, Wt, Wt, q); + } else + Gt === "round" && + (W && + (this.addCurrentVertex(Z, le, 0, 0, q), + this.addCurrentVertex(Z, le, 1, 1, q, !0)), + J && + (this.addCurrentVertex(Z, Re, -1, -1, q, !0), + this.addCurrentVertex(Z, Re, 0, 0, q))); + if (qt && xe < I - 1) { + const Wt = Z.dist(J); + if (Wt > 2 * F) { + const gt = Z.add( + J.sub(Z) + ._mult(F / Wt) + ._round() + ); + this.updateDistance(Z, gt), + this.addCurrentVertex(gt, Re, 0, 0, q), + (Z = gt); + } + } + } + } + addCurrentVertex(t, r, o, c, f, _ = !1) { + const v = r.y * c - r.x, + b = -r.y - r.x * c; + this.addHalfVertex( + t, + r.x + r.y * o, + r.y - r.x * o, + _, + !1, + o, + f + ), + this.addHalfVertex(t, v, b, _, !0, -c, f), + this.distance > V_ / 2 && + this.totalDistance === 0 && + ((this.distance = 0), + this.updateScaledDistance(), + this.addCurrentVertex(t, r, o, c, f, _)); + } + addHalfVertex({ x: t, y: r }, o, c, f, _, v, b) { + const S = + 0.5 * + (this.lineClips + ? this.scaledDistance * (V_ - 1) + : this.scaledDistance); + this.layoutVertexArray.emplaceBack( + (t << 1) + (f ? 1 : 0), + (r << 1) + (_ ? 1 : 0), + Math.round(63 * o) + 128, + Math.round(63 * c) + 128, + (1 + (v === 0 ? 0 : v < 0 ? -1 : 1)) | ((63 & S) << 2), + S >> 6 + ), + this.lineClips && + this.layoutVertexArray2.emplaceBack( + (this.scaledDistance - this.lineClips.start) / + (this.lineClips.end - this.lineClips.start), + this.lineClipsArray.length + ); + const I = b.vertexLength++; + this.e1 >= 0 && + this.e2 >= 0 && + (this.indexArray.emplaceBack(this.e1, I, this.e2), + b.primitiveLength++), + _ ? (this.e2 = I) : (this.e1 = I); + } + updateScaledDistance() { + this.scaledDistance = this.lineClips + ? this.lineClips.start + + ((this.lineClips.end - this.lineClips.start) * + this.distance) / + this.totalDistance + : this.distance; + } + updateDistance(t, r) { + (this.distance += t.dist(r)), this.updateScaledDistance(); + } + } + let q_, Z_; + ir("LineBucket", sf, { omit: ["layers", "patternFeatures"] }); + var U_ = { + get paint() { + return (Z_ = + Z_ || + new Ui({ + "line-opacity": new Or(ye.paint_line["line-opacity"]), + "line-color": new Or(ye.paint_line["line-color"]), + "line-translate": new wr(ye.paint_line["line-translate"]), + "line-translate-anchor": new wr( + ye.paint_line["line-translate-anchor"] + ), + "line-width": new Or(ye.paint_line["line-width"]), + "line-gap-width": new Or(ye.paint_line["line-gap-width"]), + "line-offset": new Or(ye.paint_line["line-offset"]), + "line-blur": new Or(ye.paint_line["line-blur"]), + "line-dasharray": new _o(ye.paint_line["line-dasharray"]), + "line-pattern": new Zl(ye.paint_line["line-pattern"]), + "line-gradient": new Ul(ye.paint_line["line-gradient"]), + })); + }, + get layout() { + return (q_ = + q_ || + new Ui({ + "line-cap": new wr(ye.layout_line["line-cap"]), + "line-join": new Or(ye.layout_line["line-join"]), + "line-miter-limit": new wr( + ye.layout_line["line-miter-limit"] + ), + "line-round-limit": new wr( + ye.layout_line["line-round-limit"] + ), + "line-sort-key": new Or(ye.layout_line["line-sort-key"]), + })); + }, + }; + class Vy extends Or { + possiblyEvaluate(t, r) { + return ( + (r = new Un(Math.floor(r.zoom), { + now: r.now, + fadeDuration: r.fadeDuration, + zoomHistory: r.zoomHistory, + transition: r.transition, + })), + super.possiblyEvaluate(t, r) + ); + } + evaluate(t, r, o, c) { + return ( + (r = dt({}, r, { zoom: Math.floor(r.zoom) })), + super.evaluate(t, r, o, c) + ); + } + } + let Ed; + class qy extends xa { + constructor(t) { + super(t, U_), + (this.gradientVersion = 0), + Ed || + ((Ed = new Vy( + U_.paint.properties["line-width"].specification + )), + (Ed.useIntegerZoom = !0)); + } + _handleSpecialPaintPropertyUpdate(t) { + if (t === "line-gradient") { + const r = this.gradientExpression(); + (this.stepInterpolant = + !!(function (o) { + return o._styleExpression !== void 0; + })(r) && r._styleExpression.expression instanceof ei), + (this.gradientVersion = + (this.gradientVersion + 1) % Number.MAX_SAFE_INTEGER); + } + } + gradientExpression() { + return this + ._transitionablePaint._values["line-gradient"].value.expression; + } + recalculate(t, r) { + super.recalculate(t, r), + (this.paint._values["line-floorwidth"] = Ed.possiblyEvaluate( + this._transitioningPaint._values["line-width"].value, + t + )); + } + createBucket(t) { + return new sf(t); + } + queryRadius(t) { + const r = t, + o = $_( + gu("line-width", this, r), + gu("line-gap-width", this, r) + ), + c = gu("line-offset", this, r); + return ( + o / 2 + Math.abs(c) + Pd(this.paint.get("line-translate")) + ); + } + queryIntersectsFeature({ + queryGeometry: t, + feature: r, + featureState: o, + geometry: c, + transform: f, + pixelsToTileUnits: _, + }) { + const v = Id( + t, + this.paint.get("line-translate"), + this.paint.get("line-translate-anchor"), + -f.bearingInRadians, + _ + ), + b = + (_ / 2) * + $_( + this.paint.get("line-width").evaluate(r, o), + this.paint.get("line-gap-width").evaluate(r, o) + ), + S = this.paint.get("line-offset").evaluate(r, o); + return ( + S && + (c = (function (I, L) { + const F = []; + for (let q = 0; q < I.length; q++) { + const Z = I[q], + W = []; + for (let J = 0; J < Z.length; J++) { + const le = Z[J - 1], + Re = Z[J], + xe = Z[J + 1], + Ce = + J === 0 + ? new B(0, 0) + : Re.sub(le)._unit()._perp(), + Ye = + J === Z.length - 1 + ? new B(0, 0) + : xe.sub(Re)._unit()._perp(), + lt = Ce._add(Ye)._unit(), + Pt = lt.x * Ye.x + lt.y * Ye.y; + Pt !== 0 && lt._mult(1 / Pt), + W.push(lt._mult(L)._add(Re)); + } + F.push(W); + } + return F; + })(c, S * _)), + (function (I, L, F) { + for (let q = 0; q < L.length; q++) { + const Z = L[q]; + if (I.length >= 3) { + for (let W = 0; W < Z.length; W++) + if (Yl(I, Z[W])) return !0; + } + if (Q0(I, Z, F)) return !0; + } + return !1; + })(v, c, b) + ); + } + isTileClipped() { + return !0; + } + } + function $_(n, t) { + return t > 0 ? t + 2 * n : n; + } + const Zy = ti( + [ + { name: "a_pos_offset", components: 4, type: "Int16" }, + { name: "a_data", components: 4, type: "Uint16" }, + { name: "a_pixeloffset", components: 4, type: "Int16" }, + ], + 4 + ), + Uy = ti( + [{ name: "a_projected_pos", components: 3, type: "Float32" }], + 4 + ); + ti([{ name: "a_fade_opacity", components: 1, type: "Uint32" }], 4); + const $y = ti([ + { name: "a_placed", components: 2, type: "Uint8" }, + { name: "a_shift", components: 2, type: "Float32" }, + { name: "a_box_real", components: 2, type: "Int16" }, + ]); + ti([ + { 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 G_ = ti( + [ + { name: "a_pos", components: 2, type: "Int16" }, + { name: "a_anchor_pos", components: 2, type: "Int16" }, + { name: "a_extrude", components: 2, type: "Int16" }, + ], + 4 + ), + Gy = ti( + [ + { name: "a_pos", components: 2, type: "Float32" }, + { name: "a_radius", components: 1, type: "Float32" }, + { name: "a_flags", components: 2, type: "Int16" }, + ], + 4 + ); + function Hy(n, t, r) { + return ( + n.sections.forEach((o) => { + o.text = (function (c, f, _) { + const v = f.layout.get("text-transform").evaluate(_, {}); + return ( + v === "uppercase" + ? (c = c.toLocaleUpperCase()) + : v === "lowercase" && (c = c.toLocaleLowerCase()), + Ea.applyArabicShaping && (c = Ea.applyArabicShaping(c)), + c + ); + })(o.text, t, r); + }), + n + ); + } + ti([{ name: "triangle", components: 3, type: "Uint16" }]), + ti([ + { 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" }, + ]), + ti([ + { 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" }, + ]), + ti([{ type: "Float32", name: "offsetX" }]), + ti([ + { type: "Int16", name: "x" }, + { type: "Int16", name: "y" }, + { type: "Int16", name: "tileUnitDistanceFromAnchor" }, + ]), + ti([ + { type: "Uint16", name: "textAnchor" }, + { type: "Float32", components: 2, name: "textOffset" }, + ]); + const Iu = { + "!": "︕", + "#": "#", + $: "$", + "%": "%", + "&": "&", + "(": "︵", + ")": "︶", + "*": "*", + "+": "+", + ",": "︐", + "-": "︲", + ".": "・", + "/": "/", + ":": "︓", + ";": "︔", + "<": "︿", + "=": "=", + ">": "﹀", + "?": "︖", + "@": "@", + "[": "﹇", + "\\": "\", + "]": "﹈", + "^": "^", + _: "︳", + "`": "`", + "{": "︷", + "|": "―", + "}": "︸", + "~": "~", + "¢": "¢", + "£": "£", + "¥": "¥", + "¦": "¦", + "¬": "¬", + "¯": " ̄", + "–": "︲", + "—": "︱", + "‘": "﹃", + "’": "﹄", + "“": "﹁", + "”": "﹂", + "…": "︙", + "‧": "・", + "₩": "₩", + "、": "︑", + "。": "︒", + "〈": "︿", + "〉": "﹀", + "《": "︽", + "》": "︾", + "「": "﹁", + "」": "﹂", + "『": "﹃", + "』": "﹄", + "【": "︻", + "】": "︼", + "〔": "︹", + "〕": "︺", + "〖": "︗", + "〗": "︘", + "!": "︕", + "(": "︵", + ")": "︶", + ",": "︐", + "-": "︲", + ".": "・", + ":": "︓", + ";": "︔", + "<": "︿", + ">": "﹀", + "?": "︖", + "[": "﹇", + "]": "﹈", + "_": "︳", + "{": "︷", + "|": "―", + "}": "︸", + "⦅": "︵", + "⦆": "︶", + "。": "︒", + "「": "﹁", + "」": "﹂", + }; + var Si = 24; + const lf = 4294967296, + H_ = 1 / lf, + W_ = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8"); + class cf { + 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, r, o = this.length) { + for (; this.pos < o; ) { + const c = this.readVarint(), + f = c >> 3, + _ = this.pos; + (this.type = 7 & c), + t(f, r, this), + this.pos === _ && this.skip(c); + } + return r; + } + readMessage(t, r) { + return this.readFields(t, r, 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) * lf; + return (this.pos += 8), t; + } + readSFixed64() { + const t = + this.dataView.getUint32(this.pos, !0) + + this.dataView.getInt32(this.pos + 4, !0) * lf; + 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 r = this.buf; + let o, c; + return ( + (c = r[this.pos++]), + (o = 127 & c), + c < 128 + ? o + : ((c = r[this.pos++]), + (o |= (127 & c) << 7), + c < 128 + ? o + : ((c = r[this.pos++]), + (o |= (127 & c) << 14), + c < 128 + ? o + : ((c = r[this.pos++]), + (o |= (127 & c) << 21), + c < 128 + ? o + : ((c = r[this.pos]), + (o |= (15 & c) << 28), + (function (f, _, v) { + const b = v.buf; + let S, I; + if ( + ((I = b[v.pos++]), + (S = (112 & I) >> 4), + I < 128 || + ((I = b[v.pos++]), + (S |= (127 & I) << 3), + I < 128) || + ((I = b[v.pos++]), + (S |= (127 & I) << 10), + I < 128) || + ((I = b[v.pos++]), + (S |= (127 & I) << 17), + I < 128) || + ((I = b[v.pos++]), + (S |= (127 & I) << 24), + I < 128) || + ((I = b[v.pos++]), + (S |= (1 & I) << 31), + I < 128)) + ) + return tc(f, S, _); + throw new Error( + "Expected varint not more than 10 bytes" + ); + })(o, 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, + r = this.pos; + return ( + (this.pos = t), + t - r >= 12 && W_ + ? W_.decode(this.buf.subarray(r, t)) + : (function (o, c, f) { + let _ = "", + v = c; + for (; v < f; ) { + const b = o[v]; + let S, + I, + L, + F = null, + q = b > 239 ? 4 : b > 223 ? 3 : b > 191 ? 2 : 1; + if (v + q > f) break; + q === 1 + ? b < 128 && (F = b) + : q === 2 + ? ((S = o[v + 1]), + (192 & S) == 128 && + ((F = ((31 & b) << 6) | (63 & S)), + F <= 127 && (F = null))) + : q === 3 + ? ((S = o[v + 1]), + (I = o[v + 2]), + (192 & S) == 128 && + (192 & I) == 128 && + ((F = + ((15 & b) << 12) | + ((63 & S) << 6) | + (63 & I)), + (F <= 2047 || (F >= 55296 && F <= 57343)) && + (F = null))) + : q === 4 && + ((S = o[v + 1]), + (I = o[v + 2]), + (L = o[v + 3]), + (192 & S) == 128 && + (192 & I) == 128 && + (192 & L) == 128 && + ((F = + ((15 & b) << 18) | + ((63 & S) << 12) | + ((63 & I) << 6) | + (63 & L)), + (F <= 65535 || F >= 1114112) && (F = null))), + F === null + ? ((F = 65533), (q = 1)) + : F > 65535 && + ((F -= 65536), + (_ += String.fromCharCode( + ((F >>> 10) & 1023) | 55296 + )), + (F = 56320 | (1023 & F))), + (_ += String.fromCharCode(F)), + (v += q); + } + return _; + })(this.buf, r, t) + ); + } + readBytes() { + const t = this.readVarint() + this.pos, + r = this.buf.subarray(this.pos, t); + return (this.pos = t), r; + } + readPackedVarint(t = [], r) { + const o = this.readPackedEnd(); + for (; this.pos < o; ) t.push(this.readVarint(r)); + return t; + } + readPackedSVarint(t = []) { + const r = this.readPackedEnd(); + for (; this.pos < r; ) t.push(this.readSVarint()); + return t; + } + readPackedBoolean(t = []) { + const r = this.readPackedEnd(); + for (; this.pos < r; ) t.push(this.readBoolean()); + return t; + } + readPackedFloat(t = []) { + const r = this.readPackedEnd(); + for (; this.pos < r; ) t.push(this.readFloat()); + return t; + } + readPackedDouble(t = []) { + const r = this.readPackedEnd(); + for (; this.pos < r; ) t.push(this.readDouble()); + return t; + } + readPackedFixed32(t = []) { + const r = this.readPackedEnd(); + for (; this.pos < r; ) t.push(this.readFixed32()); + return t; + } + readPackedSFixed32(t = []) { + const r = this.readPackedEnd(); + for (; this.pos < r; ) t.push(this.readSFixed32()); + return t; + } + readPackedFixed64(t = []) { + const r = this.readPackedEnd(); + for (; this.pos < r; ) t.push(this.readFixed64()); + return t; + } + readPackedSFixed64(t = []) { + const r = this.readPackedEnd(); + for (; this.pos < r; ) t.push(this.readSFixed64()); + return t; + } + readPackedEnd() { + return this.type === 2 + ? this.readVarint() + this.pos + : this.pos + 1; + } + skip(t) { + const r = 7 & t; + if (r === 0) for (; this.buf[this.pos++] > 127; ); + else if (r === 2) this.pos = this.readVarint() + this.pos; + else if (r === 5) this.pos += 4; + else { + if (r !== 1) throw new Error(`Unimplemented type: ${r}`); + this.pos += 8; + } + } + writeTag(t, r) { + this.writeVarint((t << 3) | r); + } + realloc(t) { + let r = this.length || 16; + for (; r < this.pos + t; ) r *= 2; + if (r !== this.length) { + const o = new Uint8Array(r); + o.set(this.buf), + (this.buf = o), + (this.dataView = new DataView(o.buffer)), + (this.length = r); + } + } + 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 * H_), !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 * H_), !0), + (this.pos += 8); + } + writeVarint(t) { + (t = +t || 0) > 268435455 || t < 0 + ? (function (r, o) { + let c, f; + if ( + (r >= 0 + ? ((c = r % 4294967296 | 0), + (f = (r / 4294967296) | 0)) + : ((c = ~(-r % 4294967296)), + (f = ~(-r / 4294967296)), + 4294967295 ^ c + ? (c = (c + 1) | 0) + : ((c = 0), (f = (f + 1) | 0))), + r >= 18446744073709552e3 || r < -18446744073709552e3) + ) + throw new Error( + "Given varint doesn't fit into 10 bytes" + ); + o.realloc(10), + (function (_, v, b) { + (b.buf[b.pos++] = (127 & _) | 128), + (_ >>>= 7), + (b.buf[b.pos++] = (127 & _) | 128), + (_ >>>= 7), + (b.buf[b.pos++] = (127 & _) | 128), + (_ >>>= 7), + (b.buf[b.pos++] = (127 & _) | 128), + (b.buf[b.pos] = 127 & (_ >>>= 7)); + })(c, 0, o), + (function (_, v) { + const b = (7 & _) << 4; + (v.buf[v.pos++] |= b | ((_ >>>= 3) ? 128 : 0)), + _ && + ((v.buf[v.pos++] = + (127 & _) | ((_ >>>= 7) ? 128 : 0)), + _ && + ((v.buf[v.pos++] = + (127 & _) | ((_ >>>= 7) ? 128 : 0)), + _ && + ((v.buf[v.pos++] = + (127 & _) | ((_ >>>= 7) ? 128 : 0)), + _ && + ((v.buf[v.pos++] = + (127 & _) | ((_ >>>= 7) ? 128 : 0)), + _ && (v.buf[v.pos++] = 127 & _))))); + })(f, o); + })(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 r = this.pos; + this.pos = (function (c, f, _) { + for (let v, b, S = 0; S < f.length; S++) { + if (((v = f.charCodeAt(S)), v > 55295 && v < 57344)) { + if (!b) { + v > 56319 || S + 1 === f.length + ? ((c[_++] = 239), (c[_++] = 191), (c[_++] = 189)) + : (b = v); + continue; + } + if (v < 56320) { + (c[_++] = 239), (c[_++] = 191), (c[_++] = 189), (b = v); + continue; + } + (v = ((b - 55296) << 10) | (v - 56320) | 65536), + (b = null); + } else + b && + ((c[_++] = 239), + (c[_++] = 191), + (c[_++] = 189), + (b = null)); + v < 128 + ? (c[_++] = v) + : (v < 2048 + ? (c[_++] = (v >> 6) | 192) + : (v < 65536 + ? (c[_++] = (v >> 12) | 224) + : ((c[_++] = (v >> 18) | 240), + (c[_++] = ((v >> 12) & 63) | 128)), + (c[_++] = ((v >> 6) & 63) | 128)), + (c[_++] = (63 & v) | 128)); + } + return _; + })(this.buf, t, this.pos); + const o = this.pos - r; + o >= 128 && X_(r, o, this), + (this.pos = r - 1), + this.writeVarint(o), + (this.pos += o); + } + 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 r = t.length; + this.writeVarint(r), this.realloc(r); + for (let o = 0; o < r; o++) this.buf[this.pos++] = t[o]; + } + writeRawMessage(t, r) { + this.pos++; + const o = this.pos; + t(r, this); + const c = this.pos - o; + c >= 128 && X_(o, c, this), + (this.pos = o - 1), + this.writeVarint(c), + (this.pos += c); + } + writeMessage(t, r, o) { + this.writeTag(t, 2), this.writeRawMessage(r, o); + } + writePackedVarint(t, r) { + r.length && this.writeMessage(t, Wy, r); + } + writePackedSVarint(t, r) { + r.length && this.writeMessage(t, Xy, r); + } + writePackedBoolean(t, r) { + r.length && this.writeMessage(t, Jy, r); + } + writePackedFloat(t, r) { + r.length && this.writeMessage(t, Yy, r); + } + writePackedDouble(t, r) { + r.length && this.writeMessage(t, Ky, r); + } + writePackedFixed32(t, r) { + r.length && this.writeMessage(t, Qy, r); + } + writePackedSFixed32(t, r) { + r.length && this.writeMessage(t, e1, r); + } + writePackedFixed64(t, r) { + r.length && this.writeMessage(t, t1, r); + } + writePackedSFixed64(t, r) { + r.length && this.writeMessage(t, r1, r); + } + writeBytesField(t, r) { + this.writeTag(t, 2), this.writeBytes(r); + } + writeFixed32Field(t, r) { + this.writeTag(t, 5), this.writeFixed32(r); + } + writeSFixed32Field(t, r) { + this.writeTag(t, 5), this.writeSFixed32(r); + } + writeFixed64Field(t, r) { + this.writeTag(t, 1), this.writeFixed64(r); + } + writeSFixed64Field(t, r) { + this.writeTag(t, 1), this.writeSFixed64(r); + } + writeVarintField(t, r) { + this.writeTag(t, 0), this.writeVarint(r); + } + writeSVarintField(t, r) { + this.writeTag(t, 0), this.writeSVarint(r); + } + writeStringField(t, r) { + this.writeTag(t, 2), this.writeString(r); + } + writeFloatField(t, r) { + this.writeTag(t, 5), this.writeFloat(r); + } + writeDoubleField(t, r) { + this.writeTag(t, 1), this.writeDouble(r); + } + writeBooleanField(t, r) { + this.writeVarintField(t, +r); + } + } + function tc(n, t, r) { + return r + ? 4294967296 * t + (n >>> 0) + : 4294967296 * (t >>> 0) + (n >>> 0); + } + function X_(n, t, r) { + const o = + t <= 16383 + ? 1 + : t <= 2097151 + ? 2 + : t <= 268435455 + ? 3 + : Math.floor(Math.log(t) / (7 * Math.LN2)); + r.realloc(o); + for (let c = r.pos - 1; c >= n; c--) r.buf[c + o] = r.buf[c]; + } + function Wy(n, t) { + for (let r = 0; r < n.length; r++) t.writeVarint(n[r]); + } + function Xy(n, t) { + for (let r = 0; r < n.length; r++) t.writeSVarint(n[r]); + } + function Yy(n, t) { + for (let r = 0; r < n.length; r++) t.writeFloat(n[r]); + } + function Ky(n, t) { + for (let r = 0; r < n.length; r++) t.writeDouble(n[r]); + } + function Jy(n, t) { + for (let r = 0; r < n.length; r++) t.writeBoolean(n[r]); + } + function Qy(n, t) { + for (let r = 0; r < n.length; r++) t.writeFixed32(n[r]); + } + function e1(n, t) { + for (let r = 0; r < n.length; r++) t.writeSFixed32(n[r]); + } + function t1(n, t) { + for (let r = 0; r < n.length; r++) t.writeFixed64(n[r]); + } + function r1(n, t) { + for (let r = 0; r < n.length; r++) t.writeSFixed64(n[r]); + } + function n1(n, t, r) { + n === 1 && r.readMessage(i1, t); + } + function i1(n, t, r) { + if (n === 3) { + const { + id: o, + bitmap: c, + width: f, + height: _, + left: v, + top: b, + advance: S, + } = r.readMessage(a1, {}); + t.push({ + id: o, + bitmap: new vu({ width: f + 6, height: _ + 6 }, c), + metrics: { width: f, height: _, left: v, top: b, advance: S }, + }); + } + } + function a1(n, t, r) { + n === 1 + ? (t.id = r.readVarint()) + : n === 2 + ? (t.bitmap = r.readBytes()) + : n === 3 + ? (t.width = r.readVarint()) + : n === 4 + ? (t.height = r.readVarint()) + : n === 5 + ? (t.left = r.readSVarint()) + : n === 6 + ? (t.top = r.readSVarint()) + : n === 7 && (t.advance = r.readVarint()); + } + function Y_(n) { + let t = 0, + r = 0; + for (const _ of n) (t += _.w * _.h), (r = Math.max(r, _.w)); + n.sort((_, v) => v.h - _.h); + const o = [ + { + x: 0, + y: 0, + w: Math.max(Math.ceil(Math.sqrt(t / 0.95)), r), + h: 1 / 0, + }, + ]; + let c = 0, + f = 0; + for (const _ of n) + for (let v = o.length - 1; v >= 0; v--) { + const b = o[v]; + if (!(_.w > b.w || _.h > b.h)) { + if ( + ((_.x = b.x), + (_.y = b.y), + (f = Math.max(f, _.y + _.h)), + (c = Math.max(c, _.x + _.w)), + _.w === b.w && _.h === b.h) + ) { + const S = o.pop(); + S && v < o.length && (o[v] = S); + } else + _.h === b.h + ? ((b.x += _.w), (b.w -= _.w)) + : _.w === b.w + ? ((b.y += _.h), (b.h -= _.h)) + : (o.push({ + x: b.x + _.w, + y: b.y, + w: b.w - _.w, + h: _.h, + }), + (b.y += _.h), + (b.h -= _.h)); + break; + } + } + return { w: c, h: f, fill: t / (c * f) || 0 }; + } + class uf { + constructor( + t, + { + pixelRatio: r, + version: o, + stretchX: c, + stretchY: f, + content: _, + textFitWidth: v, + textFitHeight: b, + } + ) { + (this.paddedRect = t), + (this.pixelRatio = r), + (this.stretchX = c), + (this.stretchY = f), + (this.content = _), + (this.version = o), + (this.textFitWidth = v), + (this.textFitHeight = b); + } + get 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 K_ { + constructor(t, r) { + const o = {}, + c = {}; + this.haveRenderCallbacks = []; + const f = []; + this.addImages(t, o, f), this.addImages(r, c, f); + const { w: _, h: v } = Y_(f), + b = new ca({ width: _ || 1, height: v || 1 }); + for (const S in t) { + const I = t[S], + L = o[S].paddedRect; + ca.copy( + I.data, + b, + { x: 0, y: 0 }, + { x: L.x + 1, y: L.y + 1 }, + I.data + ); + } + for (const S in r) { + const I = r[S], + L = c[S].paddedRect, + F = L.x + 1, + q = L.y + 1, + Z = I.data.width, + W = I.data.height; + ca.copy(I.data, b, { x: 0, y: 0 }, { x: F, y: q }, I.data), + ca.copy( + I.data, + b, + { x: 0, y: W - 1 }, + { x: F, y: q - 1 }, + { width: Z, height: 1 } + ), + ca.copy( + I.data, + b, + { x: 0, y: 0 }, + { x: F, y: q + W }, + { width: Z, height: 1 } + ), + ca.copy( + I.data, + b, + { x: Z - 1, y: 0 }, + { x: F - 1, y: q }, + { width: 1, height: W } + ), + ca.copy( + I.data, + b, + { x: 0, y: 0 }, + { x: F + Z, y: q }, + { width: 1, height: W } + ); + } + (this.image = b), + (this.iconPositions = o), + (this.patternPositions = c); + } + addImages(t, r, o) { + for (const c in t) { + const f = t[c], + _ = { + x: 0, + y: 0, + w: f.data.width + 2, + h: f.data.height + 2, + }; + o.push(_), + (r[c] = new uf(_, f)), + f.hasRenderCallback && this.haveRenderCallbacks.push(c); + } + } + patchUpdatedImages(t, r) { + t.dispatchRenderCallbacks(this.haveRenderCallbacks); + for (const o in t.updatedImages) + this.patchUpdatedImage( + this.iconPositions[o], + t.getImage(o), + r + ), + this.patchUpdatedImage( + this.patternPositions[o], + t.getImage(o), + r + ); + } + patchUpdatedImage(t, r, o) { + if (!t || !r || t.version === r.version) return; + t.version = r.version; + const [c, f] = t.tl; + o.update(r.data, void 0, { x: c, y: f }); + } + } + var gs; + ir("ImagePosition", uf), + ir("ImageAtlas", K_), + (T.ao = void 0), + ((gs = T.ao || (T.ao = {}))[(gs.none = 0)] = "none"), + (gs[(gs.horizontal = 1)] = "horizontal"), + (gs[(gs.vertical = 2)] = "vertical"), + (gs[(gs.horizontalOnly = 3)] = "horizontalOnly"); + class Mu { + constructor() { + (this.scale = 1), + (this.fontStack = ""), + (this.imageName = null), + (this.verticalAlign = "bottom"); + } + static forText(t, r, o) { + const c = new Mu(); + return ( + (c.scale = t || 1), + (c.fontStack = r), + (c.verticalAlign = o || "bottom"), + c + ); + } + static forImage(t, r) { + const o = new Mu(); + return (o.imageName = t), (o.verticalAlign = r || "bottom"), o; + } + } + class rc { + constructor() { + (this.text = ""), + (this.sectionIndex = []), + (this.sections = []), + (this.imageSectionID = null); + } + static fromFeature(t, r) { + const o = new rc(); + for (let c = 0; c < t.sections.length; c++) { + const f = t.sections[c]; + f.image ? o.addImageSection(f) : o.addTextSection(f, r); + } + return o; + } + length() { + return this.text.length; + } + getSection(t) { + return this.sections[this.sectionIndex[t]]; + } + getSectionIndex(t) { + return this.sectionIndex[t]; + } + getCharCode(t) { + return this.text.charCodeAt(t); + } + verticalizePunctuation() { + this.text = (function (t) { + let r = ""; + for (let o = 0; o < t.length; o++) { + const c = t.charCodeAt(o + 1) || null, + f = t.charCodeAt(o - 1) || null; + r += + (c && gd(c) && !Iu[t[o + 1]]) || + (f && gd(f) && !Iu[t[o - 1]]) || + !Iu[t[o]] + ? t[o] + : Iu[t[o]]; + } + return r; + })(this.text); + } + trim() { + let t = 0; + for ( + let o = 0; + o < this.text.length && Ld[this.text.charCodeAt(o)]; + o++ + ) + t++; + let r = this.text.length; + for ( + let o = this.text.length - 1; + o >= 0 && o >= t && Ld[this.text.charCodeAt(o)]; + o-- + ) + r--; + (this.text = this.text.substring(t, r)), + (this.sectionIndex = this.sectionIndex.slice(t, r)); + } + substring(t, r) { + const o = new rc(); + return ( + (o.text = this.text.substring(t, r)), + (o.sectionIndex = this.sectionIndex.slice(t, r)), + (o.sections = this.sections), + o + ); + } + toString() { + return this.text; + } + getMaxScale() { + return this.sectionIndex.reduce( + (t, r) => Math.max(t, this.sections[r].scale), + 0 + ); + } + getMaxImageSize(t) { + let r = 0, + o = 0; + for (let c = 0; c < this.length(); c++) { + const f = this.getSection(c); + if (f.imageName) { + const _ = t[f.imageName]; + if (!_) continue; + const v = _.displaySize; + (r = Math.max(r, v[0])), (o = Math.max(o, v[1])); + } + } + return { maxImageWidth: r, maxImageHeight: o }; + } + addTextSection(t, r) { + (this.text += t.text), + this.sections.push( + Mu.forText(t.scale, t.fontStack || r, t.verticalAlign) + ); + const o = this.sections.length - 1; + for (let c = 0; c < t.text.length; ++c) + this.sectionIndex.push(o); + } + addImageSection(t) { + const r = t.image ? t.image.name : ""; + if (r.length === 0) + return void Lt( + "Can't add FormattedSection with an empty image." + ); + const o = this.getNextImageSectionCharCode(); + o + ? ((this.text += String.fromCharCode(o)), + this.sections.push(Mu.forImage(r, t.verticalAlign)), + this.sectionIndex.push(this.sections.length - 1)) + : Lt("Reached maximum number of images 6401"); + } + getNextImageSectionCharCode() { + return this.imageSectionID + ? this.imageSectionID >= 63743 + ? null + : ++this.imageSectionID + : ((this.imageSectionID = 57344), this.imageSectionID); + } + } + function zd(n, t, r, o, c, f, _, v, b, S, I, L, F, q, Z) { + const W = rc.fromFeature(n, c); + let J; + L === T.ao.vertical && W.verticalizePunctuation(); + const { + processBidirectionalText: le, + processStyledBidirectionalText: Re, + } = Ea; + if (le && W.sections.length === 1) { + J = []; + const Ye = le(W.toString(), hf(W, S, f, t, o, q)); + for (const lt of Ye) { + const Pt = new rc(); + (Pt.text = lt), (Pt.sections = W.sections); + for (let Yt = 0; Yt < lt.length; Yt++) + Pt.sectionIndex.push(0); + J.push(Pt); + } + } else if (Re) { + J = []; + const Ye = Re(W.text, W.sectionIndex, hf(W, S, f, t, o, q)); + for (const lt of Ye) { + const Pt = new rc(); + (Pt.text = lt[0]), + (Pt.sectionIndex = lt[1]), + (Pt.sections = W.sections), + J.push(Pt); + } + } else + J = (function (Ye, lt) { + const Pt = [], + Yt = Ye.text; + let qt = 0; + for (const Ht of lt) Pt.push(Ye.substring(qt, Ht)), (qt = Ht); + return ( + qt < Yt.length && Pt.push(Ye.substring(qt, Yt.length)), Pt + ); + })(W, hf(W, S, f, t, o, q)); + const xe = [], + Ce = { + positionedLines: xe, + text: W.toString(), + top: I[1], + bottom: I[1], + left: I[0], + right: I[0], + writingMode: L, + iconsInText: !1, + verticalizable: !1, + }; + return ( + (function (Ye, lt, Pt, Yt, qt, Ht, Sr, Gt, Wt, gt, Nr, Hr) { + let kr = 0, + yr = 0, + dn = 0, + Qn = 0; + const gi = Gt === "right" ? 1 : Gt === "left" ? 0 : 0.5, + qi = Si / Hr; + let Ba = 0; + for (const Xn of qt) { + Xn.trim(); + const Pi = Xn.getMaxScale(), + Bi = { positionedGlyphs: [], lineOffset: 0 }; + Ye.positionedLines[Ba] = Bi; + const Fi = Bi.positionedGlyphs; + let ra = 0; + if (!Xn.length()) { + (yr += Ht), ++Ba; + continue; + } + const Fa = c1(Yt, Xn, qi); + for (let ha = 0; ha < Xn.length(); ha++) { + const vi = Xn.getSection(ha), + Mi = Xn.getSectionIndex(ha), + ki = Xn.getCharCode(ha), + ui = u1(Wt, Nr, ki); + let qn; + if (vi.imageName) { + if ( + ((Ye.iconsInText = !0), + (vi.scale = vi.scale * qi), + (qn = d1(vi, ui, Pi, Fa, Yt)), + !qn) + ) + continue; + ra = Math.max(ra, qn.imageOffset); + } else if (((qn = h1(vi, ki, ui, Fa, lt, Pt)), !qn)) + continue; + const { rect: io, metrics: oc, baselineOffset: ao } = qn; + Fi.push({ + glyph: ki, + imageName: vi.imageName, + x: kr, + y: yr + ao + -17, + vertical: ui, + scale: vi.scale, + fontStack: vi.fontStack, + sectionIndex: Mi, + metrics: oc, + rect: io, + }), + ui + ? ((Ye.verticalizable = !0), + (kr += + (vi.imageName ? oc.advance : Si) * vi.scale + gt)) + : (kr += oc.advance * vi.scale + gt); + } + Fi.length !== 0 && + ((dn = Math.max(kr - gt, dn)), + p1(Fi, 0, Fi.length - 1, gi)), + (kr = 0), + (Bi.lineOffset = Math.max(ra, (Pi - 1) * Si)); + const Ii = Ht * Pi + ra; + (yr += Ii), (Qn = Math.max(Ii, Qn)), ++Ba; + } + const { horizontalAlign: ua, verticalAlign: Ri } = df(Sr); + (function (Xn, Pi, Bi, Fi, ra, Fa, Ii, ha, vi) { + const Mi = (Pi - Bi) * ra; + let ki = 0; + ki = Fa !== Ii ? -ha * Fi - -17 : -Fi * vi * Ii + 0.5 * Ii; + for (const ui of Xn) + for (const qn of ui.positionedGlyphs) + (qn.x += Mi), (qn.y += ki); + })(Ye.positionedLines, gi, ua, Ri, dn, Qn, Ht, yr, qt.length), + (Ye.top += -Ri * yr), + (Ye.bottom = Ye.top + yr), + (Ye.left += -ua * dn), + (Ye.right = Ye.left + dn); + })(Ce, t, r, o, J, _, v, b, L, S, F, Z), + !(function (Ye) { + for (const lt of Ye) + if (lt.positionedGlyphs.length !== 0) return !1; + return !0; + })(xe) && Ce + ); + } + const Ld = { 9: !0, 10: !0, 11: !0, 12: !0, 13: !0, 32: !0 }, + o1 = { + 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, + }, + s1 = { 40: !0 }; + function J_(n, t, r, o, c, f) { + if (t.imageName) { + const _ = o[t.imageName]; + return _ ? (_.displaySize[0] * t.scale * Si) / f + c : 0; + } + { + const _ = r[t.fontStack], + v = _ && _[n]; + return v ? v.metrics.advance * t.scale + c : 0; + } + } + function Q_(n, t, r, o) { + const c = Math.pow(n - t, 2); + return o ? (n < t ? c / 2 : 2 * c) : c + Math.abs(r) * r; + } + function l1(n, t, r) { + let o = 0; + return ( + n === 10 && (o -= 1e4), + r && (o += 150), + (n !== 40 && n !== 65288) || (o += 50), + (t !== 41 && t !== 65289) || (o += 50), + o + ); + } + function eg(n, t, r, o, c, f) { + let _ = null, + v = Q_(t, r, c, f); + for (const b of o) { + const S = Q_(t - b.x, r, c, f) + b.badness; + S <= v && ((_ = b), (v = S)); + } + return { index: n, x: t, priorBreak: _, badness: v }; + } + function tg(n) { + return n ? tg(n.priorBreak).concat(n.index) : []; + } + function hf(n, t, r, o, c, f) { + if (!n) return []; + const _ = [], + v = (function (L, F, q, Z, W, J) { + let le = 0; + for (let Re = 0; Re < L.length(); Re++) { + const xe = L.getSection(Re); + le += J_(L.getCharCode(Re), xe, Z, W, F, J); + } + return le / Math.max(1, Math.ceil(le / q)); + })(n, t, r, o, c, f), + b = n.text.indexOf("​") >= 0; + let S = 0; + for (let L = 0; L < n.length(); L++) { + const F = n.getSection(L), + q = n.getCharCode(L); + if ( + (Ld[q] || (S += J_(q, F, o, c, t, f)), L < n.length() - 1) + ) { + const Z = + !((I = q) < 11904) && + (!!hn["CJK Compatibility Forms"](I) || + !!hn["CJK Compatibility"](I) || + !!hn["CJK Strokes"](I) || + !!hn["CJK Symbols and Punctuation"](I) || + !!hn["Enclosed CJK Letters and Months"](I) || + !!hn["Halfwidth and Fullwidth Forms"](I) || + !!hn["Ideographic Description Characters"](I) || + !!hn["Vertical Forms"](I) || + ou.test(String.fromCodePoint(I))); + (o1[q] || + Z || + F.imageName || + (L !== n.length() - 2 && s1[n.getCharCode(L + 1)])) && + _.push( + eg( + L + 1, + S, + v, + _, + l1(q, n.getCharCode(L + 1), Z && b), + !1 + ) + ); + } + } + var I; + return tg(eg(n.length(), S, v, _, 0, !0)); + } + function df(n) { + let t = 0.5, + r = 0.5; + switch (n) { + case "right": + case "top-right": + case "bottom-right": + t = 1; + break; + case "left": + case "top-left": + case "bottom-left": + t = 0; + } + switch (n) { + case "bottom": + case "bottom-right": + case "bottom-left": + r = 1; + break; + case "top": + case "top-right": + case "top-left": + r = 0; + } + return { horizontalAlign: t, verticalAlign: r }; + } + function c1(n, t, r) { + const o = t.getMaxScale() * Si, + { maxImageWidth: c, maxImageHeight: f } = t.getMaxImageSize(n), + _ = Math.max(o, f * r); + return { + verticalLineContentWidth: Math.max(o, c * r), + horizontalLineContentHeight: _, + }; + } + function rg(n) { + switch (n) { + case "top": + return 0; + case "center": + return 0.5; + default: + return 1; + } + } + function u1(n, t, r) { + return !( + n === T.ao.horizontal || + (!t && !su(r)) || + (t && + (Ld[r] || + ((o = r), + new RegExp("\\p{sc=Arab}", "u").test( + String.fromCodePoint(o) + )))) + ); + var o; + } + function h1(n, t, r, o, c, f) { + const _ = f[n.fontStack], + v = (function (S, I, L, F) { + if (S && S.rect) return S; + const q = I[L.fontStack], + Z = q && q[F]; + return Z ? { rect: null, metrics: Z.metrics } : null; + })(_ && _[t], c, n, t); + if (v === null) return null; + let b; + if (r) b = o.verticalLineContentWidth - n.scale * Si; + else { + const S = rg(n.verticalAlign); + b = (o.horizontalLineContentHeight - n.scale * Si) * S; + } + return { rect: v.rect, metrics: v.metrics, baselineOffset: b }; + } + function d1(n, t, r, o, c) { + const f = c[n.imageName]; + if (!f) return null; + const _ = f.paddedRect, + v = f.displaySize, + b = { + width: v[0], + height: v[1], + left: 1, + top: -3, + advance: t ? v[1] : v[0], + }; + let S; + if (t) S = o.verticalLineContentWidth - v[1] * n.scale; + else { + const I = rg(n.verticalAlign); + S = (o.horizontalLineContentHeight - v[1] * n.scale) * I; + } + return { + rect: _, + metrics: b, + baselineOffset: S, + imageOffset: (t ? v[0] : v[1]) * n.scale - Si * r, + }; + } + function p1(n, t, r, o) { + if (o === 0) return; + const c = n[r], + f = (n[r].x + c.metrics.advance * c.scale) * o; + for (let _ = t; _ <= r; _++) n[_].x -= f; + } + function f1(n, t, r) { + const { horizontalAlign: o, verticalAlign: c } = df(r), + f = t[0] - n.displaySize[0] * o, + _ = t[1] - n.displaySize[1] * c; + return { + image: n, + top: _, + bottom: _ + n.displaySize[1], + left: f, + right: f + n.displaySize[0], + }; + } + function ng(n) { + var t, r; + let o = n.left, + c = n.top, + f = n.right - o, + _ = n.bottom - c; + const v = + (t = n.image.textFitWidth) !== null && t !== void 0 + ? t + : "stretchOrShrink", + b = + (r = n.image.textFitHeight) !== null && r !== void 0 + ? r + : "stretchOrShrink", + S = + (n.image.content[2] - n.image.content[0]) / + (n.image.content[3] - n.image.content[1]); + if (b === "proportional") { + if ( + (v === "stretchOnly" && f / _ < S) || + v === "proportional" + ) { + const I = Math.ceil(_ * S); + (o *= I / f), (f = I); + } + } else if ( + v === "proportional" && + b === "stretchOnly" && + S !== 0 && + f / _ > S + ) { + const I = Math.ceil(f / S); + (c *= I / _), (_ = I); + } + return { x1: o, y1: c, x2: o + f, y2: c + _ }; + } + function ig(n, t, r, o, c, f) { + const _ = n.image; + let v; + if (_.content) { + const J = _.content, + le = _.pixelRatio || 1; + v = [ + J[0] / le, + J[1] / le, + _.displaySize[0] - J[2] / le, + _.displaySize[1] - J[3] / le, + ]; + } + const b = t.left * f, + S = t.right * f; + let I, L, F, q; + r === "width" || r === "both" + ? ((q = c[0] + b - o[3]), (L = c[0] + S + o[1])) + : ((q = c[0] + (b + S - _.displaySize[0]) / 2), + (L = q + _.displaySize[0])); + const Z = t.top * f, + W = t.bottom * f; + return ( + r === "height" || r === "both" + ? ((I = c[1] + Z - o[0]), (F = c[1] + W + o[2])) + : ((I = c[1] + (Z + W - _.displaySize[1]) / 2), + (F = I + _.displaySize[1])), + { + image: _, + top: I, + right: L, + bottom: F, + left: q, + collisionPadding: v, + } + ); + } + const Zo = 128, + vs = 32640; + function ag(n, t) { + const { expression: r } = t; + if (r.kind === "constant") + return { + kind: "constant", + layoutSize: r.evaluate(new Un(n + 1)), + }; + if (r.kind === "source") return { kind: "source" }; + { + const { zoomStops: o, interpolationType: c } = r; + let f = 0; + for (; f < o.length && o[f] <= n; ) f++; + f = Math.max(0, f - 1); + let _ = f; + for (; _ < o.length && o[_] < n + 1; ) _++; + _ = Math.min(o.length - 1, _); + const v = o[f], + b = o[_]; + return r.kind === "composite" + ? { + kind: "composite", + minZoom: v, + maxZoom: b, + interpolationType: c, + } + : { + kind: "camera", + minZoom: v, + maxZoom: b, + minSize: r.evaluate(new Un(v)), + maxSize: r.evaluate(new Un(b)), + interpolationType: c, + }; + } + } + function pf(n, t, r) { + let o = "never"; + const c = n.get(t); + return c ? (o = c) : n.get(r) && (o = "always"), o; + } + const m1 = [ + { + name: "a_fade_opacity", + components: 1, + type: "Uint8", + offset: 0, + }, + ]; + function Dd(n, t, r, o, c, f, _, v, b, S, I, L, F) { + const q = v ? Math.min(vs, Math.round(v[0])) : 0, + Z = v ? Math.min(vs, Math.round(v[1])) : 0; + n.emplaceBack( + t, + r, + Math.round(32 * o), + Math.round(32 * c), + f, + _, + (q << 1) + (b ? 1 : 0), + Z, + 16 * S, + 16 * I, + 256 * L, + 256 * F + ); + } + function ff(n, t, r) { + n.emplaceBack(t.x, t.y, r), + n.emplaceBack(t.x, t.y, r), + n.emplaceBack(t.x, t.y, r), + n.emplaceBack(t.x, t.y, r); + } + function _1(n) { + for (const t of n.sections) if (xd(t.text)) return !0; + return !1; + } + class mf { + constructor(t) { + (this.layoutVertexArray = new Zt()), + (this.indexArray = new Rn()), + (this.programConfigurations = t), + (this.segments = new Kr()), + (this.dynamicLayoutVertexArray = new Tt()), + (this.opacityVertexArray = new vr()), + (this.hasVisibleVertices = !1), + (this.placedSymbolArray = new G()); + } + isEmpty() { + return ( + this.layoutVertexArray.length === 0 && + this.indexArray.length === 0 && + this.dynamicLayoutVertexArray.length === 0 && + this.opacityVertexArray.length === 0 + ); + } + upload(t, r, o, c) { + this.isEmpty() || + (o && + ((this.layoutVertexBuffer = t.createVertexBuffer( + this.layoutVertexArray, + Zy.members + )), + (this.indexBuffer = t.createIndexBuffer( + this.indexArray, + r + )), + (this.dynamicLayoutVertexBuffer = t.createVertexBuffer( + this.dynamicLayoutVertexArray, + Uy.members, + !0 + )), + (this.opacityVertexBuffer = t.createVertexBuffer( + this.opacityVertexArray, + m1, + !0 + )), + (this.opacityVertexBuffer.itemSize = 1)), + (o || c) && 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()); + } + } + ir("SymbolBuffers", mf); + class _f { + constructor(t, r, o) { + (this.layoutVertexArray = new t()), + (this.layoutAttributes = r), + (this.indexArray = new o()), + (this.segments = new Kr()), + (this.collisionVertexArray = new An()); + } + upload(t) { + (this.layoutVertexBuffer = t.createVertexBuffer( + this.layoutVertexArray, + this.layoutAttributes + )), + (this.indexBuffer = t.createIndexBuffer(this.indexArray)), + (this.collisionVertexBuffer = t.createVertexBuffer( + this.collisionVertexArray, + $y.members, + !0 + )); + } + destroy() { + this.layoutVertexBuffer && + (this.layoutVertexBuffer.destroy(), + this.indexBuffer.destroy(), + this.segments.destroy(), + this.collisionVertexBuffer.destroy()); + } + } + ir("CollisionBuffers", _f); + class nc { + constructor(t) { + (this.collisionBoxArray = t.collisionBoxArray), + (this.zoom = t.zoom), + (this.globalState = t.globalState), + (this.overscaling = t.overscaling), + (this.layers = t.layers), + (this.layerIds = this.layers.map((_) => _.id)), + (this.index = t.index), + (this.pixelRatio = t.pixelRatio), + (this.sourceLayerIndex = t.sourceLayerIndex), + (this.hasPattern = !1), + (this.hasRTLText = !1), + (this.sortKeyRanges = []), + (this.collisionCircleArray = []); + const r = this.layers[0]._unevaluatedLayout._values; + (this.textSizeData = ag(this.zoom, r["text-size"])), + (this.iconSizeData = ag(this.zoom, r["icon-size"])); + const o = this.layers[0].layout, + c = o.get("symbol-sort-key"), + f = o.get("symbol-z-order"); + (this.canOverlap = + pf(o, "text-overlap", "text-allow-overlap") !== "never" || + pf(o, "icon-overlap", "icon-allow-overlap") !== "never" || + o.get("text-ignore-placement") || + o.get("icon-ignore-placement")), + (this.sortFeaturesByKey = + f !== "viewport-y" && !c.isConstant()), + (this.sortFeaturesByY = + (f === "viewport-y" || + (f === "auto" && !this.sortFeaturesByKey)) && + this.canOverlap), + o.get("symbol-placement") === "point" && + (this.writingModes = o + .get("text-writing-mode") + .map((_) => T.ao[_])), + (this.stateDependentLayerIds = this.layers + .filter((_) => _.isStateDependent()) + .map((_) => _.id)), + (this.sourceID = t.sourceID); + } + createArrays() { + (this.text = new mf( + new la(this.layers, this.zoom, (t) => /^text/.test(t)) + )), + (this.icon = new mf( + new la(this.layers, this.zoom, (t) => /^icon/.test(t)) + )), + (this.glyphOffsetArray = new ae()), + (this.lineVertexArray = new ce()), + (this.symbolInstances = new Q()), + (this.textAnchorOffsets = new me()); + } + calculateGlyphDependencies(t, r, o, c, f) { + for (let _ = 0; _ < t.length; _++) + if (((r[t.charCodeAt(_)] = !0), (o || c) && f)) { + const v = Iu[t.charAt(_)]; + v && (r[v.charCodeAt(0)] = !0); + } + } + populate(t, r, o) { + const c = this.layers[0], + f = c.layout, + _ = f.get("text-font"), + v = f.get("text-field"), + b = f.get("icon-image"), + S = + (v.value.kind !== "constant" || + (v.value.value instanceof Sn && + !v.value.value.isEmpty()) || + v.value.value.toString().length > 0) && + (_.value.kind !== "constant" || _.value.value.length > 0), + I = + b.value.kind !== "constant" || + !!b.value.value || + Object.keys(b.parameters).length > 0, + L = f.get("symbol-sort-key"); + if (((this.features = []), !S && !I)) return; + const F = r.iconDependencies, + q = r.glyphDependencies, + Z = r.availableImages, + W = new Un(this.zoom, { globalState: this.globalState }); + for (const { + feature: J, + id: le, + index: Re, + sourceLayerIndex: xe, + } of t) { + const Ce = c._featureFilter.needGeometry, + Ye = no(J, Ce); + if (!c._featureFilter.filter(W, Ye, o)) continue; + let lt, Pt; + if ((Ce || (Ye.geometry = bo(J)), S)) { + const qt = c.getValueAndResolveTokens( + "text-field", + Ye, + o, + Z + ), + Ht = Sn.factory(qt), + Sr = (this.hasRTLText = this.hasRTLText || _1(Ht)); + (!Sr || + Ea.getRTLTextPluginStatus() === "unavailable" || + (Sr && Ea.isParsed())) && + (lt = Hy(Ht, c, Ye)); + } + if (I) { + const qt = c.getValueAndResolveTokens( + "icon-image", + Ye, + o, + Z + ); + Pt = qt instanceof Hn ? qt : Hn.fromString(qt); + } + if (!lt && !Pt) continue; + const Yt = this.sortFeaturesByKey + ? L.evaluate(Ye, {}, o) + : void 0; + if ( + (this.features.push({ + id: le, + text: lt, + icon: Pt, + index: Re, + sourceLayerIndex: xe, + geometry: Ye.geometry, + properties: J.properties, + type: ec.types[J.type], + sortKey: Yt, + }), + Pt && (F[Pt.name] = !0), + lt) + ) { + const qt = _.evaluate(Ye, {}, o).join(","), + Ht = + f.get("text-rotation-alignment") !== "viewport" && + f.get("symbol-placement") !== "point"; + this.allowVerticalPlacement = + this.writingModes && + this.writingModes.indexOf(T.ao.vertical) >= 0; + for (const Sr of lt.sections) + if (Sr.image) F[Sr.image.name] = !0; + else { + const Gt = jl(lt.toString()), + Wt = Sr.fontStack || qt, + gt = (q[Wt] = q[Wt] || {}); + this.calculateGlyphDependencies( + Sr.text, + gt, + Ht, + this.allowVerticalPlacement, + Gt + ); + } + } + } + f.get("symbol-placement") === "line" && + (this.features = (function (J) { + const le = {}, + Re = {}, + xe = []; + let Ce = 0; + function Ye(qt) { + xe.push(J[qt]), Ce++; + } + function lt(qt, Ht, Sr) { + const Gt = Re[qt]; + return ( + delete Re[qt], + (Re[Ht] = Gt), + xe[Gt].geometry[0].pop(), + (xe[Gt].geometry[0] = xe[Gt].geometry[0].concat(Sr[0])), + Gt + ); + } + function Pt(qt, Ht, Sr) { + const Gt = le[Ht]; + return ( + delete le[Ht], + (le[qt] = Gt), + xe[Gt].geometry[0].shift(), + (xe[Gt].geometry[0] = Sr[0].concat(xe[Gt].geometry[0])), + Gt + ); + } + function Yt(qt, Ht, Sr) { + const Gt = Sr ? Ht[0][Ht[0].length - 1] : Ht[0][0]; + return `${qt}:${Gt.x}:${Gt.y}`; + } + for (let qt = 0; qt < J.length; qt++) { + const Ht = J[qt], + Sr = Ht.geometry, + Gt = Ht.text ? Ht.text.toString() : null; + if (!Gt) { + Ye(qt); + continue; + } + const Wt = Yt(Gt, Sr), + gt = Yt(Gt, Sr, !0); + if (Wt in Re && gt in le && Re[Wt] !== le[gt]) { + const Nr = Pt(Wt, gt, Sr), + Hr = lt(Wt, gt, xe[Nr].geometry); + delete le[Wt], + delete Re[gt], + (Re[Yt(Gt, xe[Hr].geometry, !0)] = Hr), + (xe[Nr].geometry = null); + } else + Wt in Re + ? lt(Wt, gt, Sr) + : gt in le + ? Pt(Wt, gt, Sr) + : (Ye(qt), (le[Wt] = Ce - 1), (Re[gt] = Ce - 1)); + } + return xe.filter((qt) => qt.geometry); + })(this.features)), + this.sortFeaturesByKey && + this.features.sort((J, le) => J.sortKey - le.sortKey); + } + update(t, r, o) { + this.stateDependentLayers.length && + (this.text.programConfigurations.updatePaintArrays( + t, + r, + this.layers, + o + ), + this.icon.programConfigurations.updatePaintArrays( + t, + r, + this.layers, + o + )); + } + 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, r) { + const o = this.lineVertexArray.length; + if (t.segment !== void 0) { + let c = t.dist(r[t.segment + 1]), + f = t.dist(r[t.segment]); + const _ = {}; + for (let v = t.segment + 1; v < r.length; v++) + (_[v] = { + x: r[v].x, + y: r[v].y, + tileUnitDistanceFromAnchor: c, + }), + v < r.length - 1 && (c += r[v + 1].dist(r[v])); + for (let v = t.segment || 0; v >= 0; v--) + (_[v] = { + x: r[v].x, + y: r[v].y, + tileUnitDistanceFromAnchor: f, + }), + v > 0 && (f += r[v - 1].dist(r[v])); + for (let v = 0; v < r.length; v++) { + const b = _[v]; + this.lineVertexArray.emplaceBack( + b.x, + b.y, + b.tileUnitDistanceFromAnchor + ); + } + } + return { + lineStartIndex: o, + lineLength: this.lineVertexArray.length - o, + }; + } + addSymbols(t, r, o, c, f, _, v, b, S, I, L, F) { + const q = t.indexArray, + Z = t.layoutVertexArray, + W = t.segments.prepareSegment( + 4 * r.length, + Z, + q, + this.canOverlap ? _.sortKey : void 0 + ), + J = this.glyphOffsetArray.length, + le = W.vertexLength, + Re = + this.allowVerticalPlacement && v === T.ao.vertical + ? Math.PI / 2 + : 0, + xe = _.text && _.text.sections; + for (let Ce = 0; Ce < r.length; Ce++) { + const { + tl: Ye, + tr: lt, + bl: Pt, + br: Yt, + tex: qt, + pixelOffsetTL: Ht, + pixelOffsetBR: Sr, + minFontScaleX: Gt, + minFontScaleY: Wt, + glyphOffset: gt, + isSDF: Nr, + sectionIndex: Hr, + } = r[Ce], + kr = W.vertexLength, + yr = gt[1]; + Dd( + Z, + b.x, + b.y, + Ye.x, + yr + Ye.y, + qt.x, + qt.y, + o, + Nr, + Ht.x, + Ht.y, + Gt, + Wt + ), + Dd( + Z, + b.x, + b.y, + lt.x, + yr + lt.y, + qt.x + qt.w, + qt.y, + o, + Nr, + Sr.x, + Ht.y, + Gt, + Wt + ), + Dd( + Z, + b.x, + b.y, + Pt.x, + yr + Pt.y, + qt.x, + qt.y + qt.h, + o, + Nr, + Ht.x, + Sr.y, + Gt, + Wt + ), + Dd( + Z, + b.x, + b.y, + Yt.x, + yr + Yt.y, + qt.x + qt.w, + qt.y + qt.h, + o, + Nr, + Sr.x, + Sr.y, + Gt, + Wt + ), + ff(t.dynamicLayoutVertexArray, b, Re), + q.emplaceBack(kr, kr + 2, kr + 1), + q.emplaceBack(kr + 1, kr + 2, kr + 3), + (W.vertexLength += 4), + (W.primitiveLength += 2), + this.glyphOffsetArray.emplaceBack(gt[0]), + (Ce !== r.length - 1 && Hr === r[Ce + 1].sectionIndex) || + t.programConfigurations.populatePaintArrays( + Z.length, + _, + _.index, + {}, + F, + xe && xe[Hr] + ); + } + t.placedSymbolArray.emplaceBack( + b.x, + b.y, + J, + this.glyphOffsetArray.length - J, + le, + S, + I, + b.segment, + o ? o[0] : 0, + o ? o[1] : 0, + c[0], + c[1], + v, + 0, + !1, + 0, + L + ); + } + _addCollisionDebugVertex(t, r, o, c, f, _) { + return ( + r.emplaceBack(0, 0), + t.emplaceBack( + o.x, + o.y, + c, + f, + Math.round(_.x), + Math.round(_.y) + ) + ); + } + addCollisionDebugVertices(t, r, o, c, f, _, v) { + const b = f.segments.prepareSegment( + 4, + f.layoutVertexArray, + f.indexArray + ), + S = b.vertexLength, + I = f.layoutVertexArray, + L = f.collisionVertexArray, + F = v.anchorX, + q = v.anchorY; + this._addCollisionDebugVertex(I, L, _, F, q, new B(t, r)), + this._addCollisionDebugVertex(I, L, _, F, q, new B(o, r)), + this._addCollisionDebugVertex(I, L, _, F, q, new B(o, c)), + this._addCollisionDebugVertex(I, L, _, F, q, new B(t, c)), + (b.vertexLength += 4); + const Z = f.indexArray; + Z.emplaceBack(S, S + 1), + Z.emplaceBack(S + 1, S + 2), + Z.emplaceBack(S + 2, S + 3), + Z.emplaceBack(S + 3, S), + (b.primitiveLength += 4); + } + addDebugCollisionBoxes(t, r, o, c) { + for (let f = t; f < r; f++) { + const _ = this.collisionBoxArray.get(f); + this.addCollisionDebugVertices( + _.x1, + _.y1, + _.x2, + _.y2, + c ? this.textCollisionBox : this.iconCollisionBox, + _.anchorPoint, + o + ); + } + } + generateCollisionDebugBuffers() { + this.hasDebugData() && this.destroyDebugData(), + (this.textCollisionBox = new _f(Jr, G_.members, Ln)), + (this.iconCollisionBox = new _f(Jr, G_.members, Ln)); + for (let t = 0; t < this.symbolInstances.length; t++) { + const r = this.symbolInstances.get(t); + this.addDebugCollisionBoxes( + r.textBoxStartIndex, + r.textBoxEndIndex, + r, + !0 + ), + this.addDebugCollisionBoxes( + r.verticalTextBoxStartIndex, + r.verticalTextBoxEndIndex, + r, + !0 + ), + this.addDebugCollisionBoxes( + r.iconBoxStartIndex, + r.iconBoxEndIndex, + r, + !1 + ), + this.addDebugCollisionBoxes( + r.verticalIconBoxStartIndex, + r.verticalIconBoxEndIndex, + r, + !1 + ); + } + } + _deserializeCollisionBoxesForSymbol(t, r, o, c, f, _, v, b, S) { + const I = {}; + for (let L = r; L < o; L++) { + const F = t.get(L); + (I.textBox = { + x1: F.x1, + y1: F.y1, + x2: F.x2, + y2: F.y2, + anchorPointX: F.anchorPointX, + anchorPointY: F.anchorPointY, + }), + (I.textFeatureIndex = F.featureIndex); + break; + } + for (let L = c; L < f; L++) { + const F = t.get(L); + (I.verticalTextBox = { + x1: F.x1, + y1: F.y1, + x2: F.x2, + y2: F.y2, + anchorPointX: F.anchorPointX, + anchorPointY: F.anchorPointY, + }), + (I.verticalTextFeatureIndex = F.featureIndex); + break; + } + for (let L = _; L < v; L++) { + const F = t.get(L); + (I.iconBox = { + x1: F.x1, + y1: F.y1, + x2: F.x2, + y2: F.y2, + anchorPointX: F.anchorPointX, + anchorPointY: F.anchorPointY, + }), + (I.iconFeatureIndex = F.featureIndex); + break; + } + for (let L = b; L < S; L++) { + const F = t.get(L); + (I.verticalIconBox = { + x1: F.x1, + y1: F.y1, + x2: F.x2, + y2: F.y2, + anchorPointX: F.anchorPointX, + anchorPointY: F.anchorPointY, + }), + (I.verticalIconFeatureIndex = F.featureIndex); + break; + } + return I; + } + deserializeCollisionBoxes(t) { + this.collisionArrays = []; + for (let r = 0; r < this.symbolInstances.length; r++) { + const o = this.symbolInstances.get(r); + this.collisionArrays.push( + this._deserializeCollisionBoxesForSymbol( + t, + o.textBoxStartIndex, + o.textBoxEndIndex, + o.verticalTextBoxStartIndex, + o.verticalTextBoxEndIndex, + o.iconBoxStartIndex, + o.iconBoxEndIndex, + o.verticalIconBoxStartIndex, + o.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, r) { + const o = t.placedSymbolArray.get(r), + c = o.vertexStartIndex + 4 * o.numGlyphs; + for (let f = o.vertexStartIndex; f < c; f += 4) + t.indexArray.emplaceBack(f, f + 2, f + 1), + t.indexArray.emplaceBack(f + 1, f + 2, f + 3); + } + getSortedSymbolIndexes(t) { + if ( + this.sortedAngle === t && + this.symbolInstanceIndexes !== void 0 + ) + return this.symbolInstanceIndexes; + const r = Math.sin(t), + o = Math.cos(t), + c = [], + f = [], + _ = []; + for (let v = 0; v < this.symbolInstances.length; ++v) { + _.push(v); + const b = this.symbolInstances.get(v); + c.push(0 | Math.round(r * b.anchorX + o * b.anchorY)), + f.push(b.featureIndex); + } + return _.sort((v, b) => c[v] - c[b] || f[b] - f[v]), _; + } + addToSortKeyRanges(t, r) { + const o = this.sortKeyRanges[this.sortKeyRanges.length - 1]; + o && o.sortKey === r + ? (o.symbolInstanceEnd = t + 1) + : this.sortKeyRanges.push({ + sortKey: r, + 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 r of this.symbolInstanceIndexes) { + const o = this.symbolInstances.get(r); + this.featureSortOrder.push(o.featureIndex), + [ + o.rightJustifiedTextSymbolIndex, + o.centerJustifiedTextSymbolIndex, + o.leftJustifiedTextSymbolIndex, + ].forEach((c, f, _) => { + c >= 0 && + _.indexOf(c) === f && + this.addIndicesForPlacedSymbol(this.text, c); + }), + o.verticalPlacedTextSymbolIndex >= 0 && + this.addIndicesForPlacedSymbol( + this.text, + o.verticalPlacedTextSymbolIndex + ), + o.placedIconSymbolIndex >= 0 && + this.addIndicesForPlacedSymbol( + this.icon, + o.placedIconSymbolIndex + ), + o.verticalPlacedIconSymbolIndex >= 0 && + this.addIndicesForPlacedSymbol( + this.icon, + o.verticalPlacedIconSymbolIndex + ); + } + this.text.indexBuffer && + this.text.indexBuffer.updateData(this.text.indexArray), + this.icon.indexBuffer && + this.icon.indexBuffer.updateData(this.icon.indexArray); + } + } + } + let og, sg; + ir("SymbolBucket", nc, { + omit: ["layers", "collisionBoxArray", "features", "compareText"], + }), + (nc.MAX_GLYPHS = 65535), + (nc.addDynamicAttributes = ff); + var gf = { + get paint() { + return (sg = + sg || + new Ui({ + "icon-opacity": new Or(ye.paint_symbol["icon-opacity"]), + "icon-color": new Or(ye.paint_symbol["icon-color"]), + "icon-halo-color": new Or( + ye.paint_symbol["icon-halo-color"] + ), + "icon-halo-width": new Or( + ye.paint_symbol["icon-halo-width"] + ), + "icon-halo-blur": new Or(ye.paint_symbol["icon-halo-blur"]), + "icon-translate": new wr(ye.paint_symbol["icon-translate"]), + "icon-translate-anchor": new wr( + ye.paint_symbol["icon-translate-anchor"] + ), + "text-opacity": new Or(ye.paint_symbol["text-opacity"]), + "text-color": new Or(ye.paint_symbol["text-color"], { + runtimeType: Jt, + getOverride: (n) => n.textColor, + hasOverride: (n) => !!n.textColor, + }), + "text-halo-color": new Or( + ye.paint_symbol["text-halo-color"] + ), + "text-halo-width": new Or( + ye.paint_symbol["text-halo-width"] + ), + "text-halo-blur": new Or(ye.paint_symbol["text-halo-blur"]), + "text-translate": new wr(ye.paint_symbol["text-translate"]), + "text-translate-anchor": new wr( + ye.paint_symbol["text-translate-anchor"] + ), + })); + }, + get layout() { + return (og = + og || + new Ui({ + "symbol-placement": new wr( + ye.layout_symbol["symbol-placement"] + ), + "symbol-spacing": new wr( + ye.layout_symbol["symbol-spacing"] + ), + "symbol-avoid-edges": new wr( + ye.layout_symbol["symbol-avoid-edges"] + ), + "symbol-sort-key": new Or( + ye.layout_symbol["symbol-sort-key"] + ), + "symbol-z-order": new wr( + ye.layout_symbol["symbol-z-order"] + ), + "icon-allow-overlap": new wr( + ye.layout_symbol["icon-allow-overlap"] + ), + "icon-overlap": new wr(ye.layout_symbol["icon-overlap"]), + "icon-ignore-placement": new wr( + ye.layout_symbol["icon-ignore-placement"] + ), + "icon-optional": new wr(ye.layout_symbol["icon-optional"]), + "icon-rotation-alignment": new wr( + ye.layout_symbol["icon-rotation-alignment"] + ), + "icon-size": new Or(ye.layout_symbol["icon-size"]), + "icon-text-fit": new wr(ye.layout_symbol["icon-text-fit"]), + "icon-text-fit-padding": new wr( + ye.layout_symbol["icon-text-fit-padding"] + ), + "icon-image": new Or(ye.layout_symbol["icon-image"]), + "icon-rotate": new Or(ye.layout_symbol["icon-rotate"]), + "icon-padding": new Or(ye.layout_symbol["icon-padding"]), + "icon-keep-upright": new wr( + ye.layout_symbol["icon-keep-upright"] + ), + "icon-offset": new Or(ye.layout_symbol["icon-offset"]), + "icon-anchor": new Or(ye.layout_symbol["icon-anchor"]), + "icon-pitch-alignment": new wr( + ye.layout_symbol["icon-pitch-alignment"] + ), + "text-pitch-alignment": new wr( + ye.layout_symbol["text-pitch-alignment"] + ), + "text-rotation-alignment": new wr( + ye.layout_symbol["text-rotation-alignment"] + ), + "text-field": new Or(ye.layout_symbol["text-field"]), + "text-font": new Or(ye.layout_symbol["text-font"]), + "text-size": new Or(ye.layout_symbol["text-size"]), + "text-max-width": new Or( + ye.layout_symbol["text-max-width"] + ), + "text-line-height": new wr( + ye.layout_symbol["text-line-height"] + ), + "text-letter-spacing": new Or( + ye.layout_symbol["text-letter-spacing"] + ), + "text-justify": new Or(ye.layout_symbol["text-justify"]), + "text-radial-offset": new Or( + ye.layout_symbol["text-radial-offset"] + ), + "text-variable-anchor": new wr( + ye.layout_symbol["text-variable-anchor"] + ), + "text-variable-anchor-offset": new Or( + ye.layout_symbol["text-variable-anchor-offset"] + ), + "text-anchor": new Or(ye.layout_symbol["text-anchor"]), + "text-max-angle": new wr( + ye.layout_symbol["text-max-angle"] + ), + "text-writing-mode": new wr( + ye.layout_symbol["text-writing-mode"] + ), + "text-rotate": new Or(ye.layout_symbol["text-rotate"]), + "text-padding": new wr(ye.layout_symbol["text-padding"]), + "text-keep-upright": new wr( + ye.layout_symbol["text-keep-upright"] + ), + "text-transform": new Or( + ye.layout_symbol["text-transform"] + ), + "text-offset": new Or(ye.layout_symbol["text-offset"]), + "text-allow-overlap": new wr( + ye.layout_symbol["text-allow-overlap"] + ), + "text-overlap": new wr(ye.layout_symbol["text-overlap"]), + "text-ignore-placement": new wr( + ye.layout_symbol["text-ignore-placement"] + ), + "text-optional": new wr(ye.layout_symbol["text-optional"]), + })); + }, + }; + class lg { + 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 + : mt), + (this.defaultValue = t); + } + evaluate(t) { + if (t.formattedSection) { + const r = this.defaultValue.property.overrides; + if (r && r.hasOverride(t.formattedSection)) + return r.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; + } + } + ir("FormatSectionOverride", lg, { omit: ["defaultValue"] }); + class Rd extends xa { + constructor(t) { + super(t, gf); + } + recalculate(t, r) { + if ( + (super.recalculate(t, r), + 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 o = this.layout.get("text-writing-mode"); + if (o) { + const c = []; + for (const f of o) c.indexOf(f) < 0 && c.push(f); + this.layout._values["text-writing-mode"] = c; + } else + this.layout._values["text-writing-mode"] = ["horizontal"]; + } + this._setPaintOverrides(); + } + getValueAndResolveTokens(t, r, o, c) { + const f = this.layout.get(t).evaluate(r, {}, o, c), + _ = this._unevaluatedLayout._values[t]; + return _.isDataDriven() || zl(_.value) || !f + ? f + : (function (v, b) { + return b.replace(/{([^{}]+)}/g, (S, I) => + v && I in v ? String(v[I]) : "" + ); + })(r.properties, f); + } + createBucket(t) { + return new nc(t); + } + queryRadius() { + return 0; + } + queryIntersectsFeature() { + throw new Error("Should take a different path in FeatureIndex"); + } + _setPaintOverrides() { + for (const t of gf.paint.overridableProperties) { + if (!Rd.hasPaintOverride(this.layout, t)) continue; + const r = this.paint.get(t), + o = new lg(r), + c = new Wc(o, r.property.specification); + let f = null; + (f = + r.value.kind === "constant" || r.value.kind === "source" + ? new Zs("source", c) + : new Xc("composite", c, r.value.zoomStops)), + (this.paint._values[t] = new $a( + r.property, + f, + r.parameters + )); + } + } + _handleOverridablePaintPropertyUpdate(t, r, o) { + return ( + !(!this.layout || r.isDataDriven() || o.isDataDriven()) && + Rd.hasPaintOverride(this.layout, t) + ); + } + static hasPaintOverride(t, r) { + const o = t.get("text-field"), + c = gf.paint.properties[r]; + let f = !1; + const _ = (v) => { + for (const b of v) + if (c.overrides && c.overrides.hasOverride(b)) + return void (f = !0); + }; + if (o.value.kind === "constant" && o.value.value instanceof Sn) + _(o.value.value.sections); + else if (o.value.kind === "source") { + const v = (S) => { + f || + (S instanceof _a && Rr(S.value) === pn + ? _(S.value.sections) + : S instanceof ko + ? _(S.sections) + : S.eachChild(v)); + }, + b = o.value; + b._styleExpression && v(b._styleExpression.expression); + } + return f; + } + } + let cg; + var g1 = { + get paint() { + return (cg = + cg || + new Ui({ + "background-color": new wr( + ye.paint_background["background-color"] + ), + "background-pattern": new _o( + ye.paint_background["background-pattern"] + ), + "background-opacity": new wr( + ye.paint_background["background-opacity"] + ), + })); + }, + }; + class v1 extends xa { + constructor(t) { + super(t, g1); + } + } + let ug; + var y1 = { + get paint() { + return (ug = + ug || + new Ui({ + "raster-opacity": new wr(ye.paint_raster["raster-opacity"]), + "raster-hue-rotate": new wr( + ye.paint_raster["raster-hue-rotate"] + ), + "raster-brightness-min": new wr( + ye.paint_raster["raster-brightness-min"] + ), + "raster-brightness-max": new wr( + ye.paint_raster["raster-brightness-max"] + ), + "raster-saturation": new wr( + ye.paint_raster["raster-saturation"] + ), + "raster-contrast": new wr( + ye.paint_raster["raster-contrast"] + ), + "raster-resampling": new wr( + ye.paint_raster["raster-resampling"] + ), + "raster-fade-duration": new wr( + ye.paint_raster["raster-fade-duration"] + ), + })); + }, + }; + class x1 extends xa { + constructor(t) { + super(t, y1); + } + } + class b1 extends xa { + constructor(t) { + super(t, {}), + (this.onAdd = (r) => { + this.implementation.onAdd && + this.implementation.onAdd(r, r.painter.context.gl); + }), + (this.onRemove = (r) => { + this.implementation.onRemove && + this.implementation.onRemove(r, r.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 w1 { + constructor(t) { + (this._methodToThrottle = t), + (this._triggered = !1), + typeof MessageChannel < "u" && + ((this._channel = new MessageChannel()), + (this._channel.port2.onmessage = () => { + (this._triggered = !1), this._methodToThrottle(); + })); + } + trigger() { + this._triggered || + ((this._triggered = !0), + this._channel + ? this._channel.port1.postMessage(!0) + : setTimeout(() => { + (this._triggered = !1), this._methodToThrottle(); + }, 0)); + } + remove() { + delete this._channel, (this._methodToThrottle = () => {}); + } + } + const T1 = { once: !0 }, + vf = 63710088e-1; + class ys { + constructor(t, r) { + if (isNaN(t) || isNaN(r)) + throw new Error(`Invalid LngLat object: (${t}, ${r})`); + if ( + ((this.lng = +t), + (this.lat = +r), + this.lat > 90 || this.lat < -90) + ) + throw new Error( + "Invalid LngLat latitude value: must be between -90 and 90" + ); + } + wrap() { + return new ys(at(this.lng, -180, 180), this.lat); + } + toArray() { + return [this.lng, this.lat]; + } + toString() { + return `LngLat(${this.lng}, ${this.lat})`; + } + distanceTo(t) { + const r = Math.PI / 180, + o = this.lat * r, + c = t.lat * r, + f = + Math.sin(o) * Math.sin(c) + + Math.cos(o) * + Math.cos(c) * + Math.cos((t.lng - this.lng) * r); + return vf * Math.acos(Math.min(f, 1)); + } + static convert(t) { + if (t instanceof ys) return t; + if (Array.isArray(t) && (t.length === 2 || t.length === 3)) + return new ys(Number(t[0]), Number(t[1])); + if (!Array.isArray(t) && typeof t == "object" && t !== null) + return new ys( + 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: , lat: }, an object {lon: , lat: }, or an array of [, ]" + ); + } + } + const hg = 2 * Math.PI * vf; + function dg(n) { + return hg * Math.cos((n * Math.PI) / 180); + } + function pg(n) { + return (180 + n) / 360; + } + function fg(n) { + return ( + (180 - + (180 / Math.PI) * + Math.log(Math.tan(Math.PI / 4 + (n * Math.PI) / 360))) / + 360 + ); + } + function mg(n, t) { + return n / dg(t); + } + function yf(n) { + return ( + (360 / Math.PI) * + Math.atan(Math.exp(((180 - 360 * n) * Math.PI) / 180)) - + 90 + ); + } + function _g(n, t) { + return n * dg(yf(t)); + } + class ku { + constructor(t, r, o = 0) { + (this.x = +t), (this.y = +r), (this.z = +o); + } + static fromLngLat(t, r = 0) { + const o = ys.convert(t); + return new ku(pg(o.lng), fg(o.lat), mg(r, o.lat)); + } + toLngLat() { + return new ys(360 * this.x - 180, yf(this.y)); + } + toAltitude() { + return _g(this.z, this.y); + } + meterInMercatorCoordinateUnits() { + return ( + (1 / hg) * + ((t = yf(this.y)), 1 / Math.cos((t * Math.PI) / 180)) + ); + var t; + } + } + function gg(n, t, r) { + var o = (2 * Math.PI * 6378137) / 256 / Math.pow(2, r); + return [ + n * o - (2 * Math.PI * 6378137) / 2, + t * o - (2 * Math.PI * 6378137) / 2, + ]; + } + class xf { + constructor(t, r, o) { + if ( + !(function (c, f, _) { + return !( + c < 0 || + c > 25 || + _ < 0 || + _ >= Math.pow(2, c) || + f < 0 || + f >= Math.pow(2, c) + ); + })(t, r, o) + ) + throw new Error( + `x=${r}, y=${o}, 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 = r), + (this.y = o), + (this.key = ic(0, t, t, r, o)); + } + equals(t) { + return this.z === t.z && this.x === t.x && this.y === t.y; + } + url(t, r, o) { + const c = + ((_ = this.y), + (v = this.z), + (b = gg( + 256 * (f = this.x), + 256 * (_ = Math.pow(2, v) - _ - 1), + v + )), + (S = gg(256 * (f + 1), 256 * (_ + 1), v)), + b[0] + "," + b[1] + "," + S[0] + "," + S[1]); + var f, _, v, b, S; + const I = (function (L, F, q) { + let Z, + W = ""; + for (let J = L; J > 0; J--) + (Z = 1 << (J - 1)), + (W += (F & Z ? 1 : 0) + (q & Z ? 2 : 0)); + return W; + })(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( + o === "tms" ? Math.pow(2, this.z) - this.y - 1 : this.y + ) + ) + .replace(/{ratio}/g, r > 1 ? "@2x" : "") + .replace(/{quadkey}/g, I) + .replace(/{bbox-epsg-3857}/g, c); + } + isChildOf(t) { + const r = this.z - t.z; + return r > 0 && t.x === this.x >> r && t.y === this.y >> r; + } + getTilePoint(t) { + const r = Math.pow(2, this.z); + return new B((t.x * r - this.x) * oe, (t.y * r - this.y) * oe); + } + toString() { + return `${this.z}/${this.x}/${this.y}`; + } + } + class vg { + constructor(t, r) { + (this.wrap = t), + (this.canonical = r), + (this.key = ic(t, r.z, r.z, r.x, r.y)); + } + } + class Ra { + constructor(t, r, o, c, f) { + if (((this.terrainRttPosMatrix32f = null), t < o)) + throw new Error( + `overscaledZ should be >= z; overscaledZ = ${t}; z = ${o}` + ); + (this.overscaledZ = t), + (this.wrap = r), + (this.canonical = new xf(o, +c, +f)), + (this.key = ic(r, t, o, c, f)); + } + clone() { + return new Ra( + 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 r = this.canonical.z - t; + return t > this.canonical.z + ? new Ra( + t, + this.wrap, + this.canonical.z, + this.canonical.x, + this.canonical.y + ) + : new Ra( + t, + this.wrap, + t, + this.canonical.x >> r, + this.canonical.y >> r + ); + } + calculateScaledKey(t, r) { + if (t > this.overscaledZ) + throw new Error( + `targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}` + ); + const o = this.canonical.z - t; + return t > this.canonical.z + ? ic( + this.wrap * +r, + t, + this.canonical.z, + this.canonical.x, + this.canonical.y + ) + : ic( + this.wrap * +r, + t, + t, + this.canonical.x >> o, + this.canonical.y >> o + ); + } + isChildOf(t) { + if (t.wrap !== this.wrap) return !1; + const r = this.canonical.z - t.canonical.z; + return ( + t.overscaledZ === 0 || + (t.overscaledZ < this.overscaledZ && + t.canonical.x === this.canonical.x >> r && + t.canonical.y === this.canonical.y >> r) + ); + } + children(t) { + if (this.overscaledZ >= t) + return [ + new Ra( + this.overscaledZ + 1, + this.wrap, + this.canonical.z, + this.canonical.x, + this.canonical.y + ), + ]; + const r = this.canonical.z + 1, + o = 2 * this.canonical.x, + c = 2 * this.canonical.y; + return [ + new Ra(r, this.wrap, r, o, c), + new Ra(r, this.wrap, r, o + 1, c), + new Ra(r, this.wrap, r, o, c + 1), + new Ra(r, this.wrap, r, o + 1, c + 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 Ra( + this.overscaledZ, + 0, + this.canonical.z, + this.canonical.x, + this.canonical.y + ); + } + unwrapTo(t) { + return new Ra( + 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 vg(this.wrap, this.canonical); + } + toString() { + return `${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`; + } + getTilePoint(t) { + return this.canonical.getTilePoint( + new ku(t.x - this.wrap, t.y) + ); + } + } + function ic(n, t, r, o, c) { + (n *= 2) < 0 && (n = -1 * n - 1); + const f = 1 << r; + return ( + (f * f * n + f * c + o).toString(36) + + r.toString(36) + + t.toString(36) + ); + } + function Au(n, t) { + return t ? n.properties[t] : n.id; + } + ir("CanonicalTileID", xf), + ir("OverscaledTileID", Ra, { omit: ["terrainRttPosMatrix32f"] }); + class rl { + 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 r = new rl(); + return ( + r.extend(t(new B(this.minX, this.minY))), + r.extend(t(new B(this.maxX, this.minY))), + r.extend(t(new B(this.minX, this.maxY))), + r.extend(t(new B(this.maxX, this.maxY))), + r + ); + } + static fromPoints(t) { + const r = new rl(); + for (const o of t) r.extend(o); + return r; + } + 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 yg { + constructor(t) { + (this._stringToNumber = {}), (this._numberToString = []); + for (let r = 0; r < t.length; r++) { + const o = t[r]; + (this._stringToNumber[o] = r), (this._numberToString[r] = o); + } + } + 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 xg { + constructor(t, r, o, c, f) { + (this.type = "Feature"), + (this._vectorTileFeature = t), + (t._z = r), + (t._x = o), + (t._y = c), + (this.properties = t.properties), + (this.id = f); + } + get geometry() { + return ( + this._geometry === void 0 && + (this._geometry = this._vectorTileFeature.toGeoJSON( + this._vectorTileFeature._x, + this._vectorTileFeature._y, + this._vectorTileFeature._z + ).geometry), + this._geometry + ); + } + set geometry(t) { + this._geometry = t; + } + toJSON() { + const t = { geometry: this.geometry }; + for (const r in this) + r !== "_geometry" && + r !== "_vectorTileFeature" && + (t[r] = this[r]); + return t; + } + } + class bg { + constructor(t, r) { + (this.tileID = t), + (this.x = t.canonical.x), + (this.y = t.canonical.y), + (this.z = t.canonical.z), + (this.grid = new Ys(oe, 16, 0)), + (this.grid3D = new Ys(oe, 16, 0)), + (this.featureIndexArray = new Pe()), + (this.promoteId = r); + } + insert(t, r, o, c, f, _) { + const v = this.featureIndexArray.length; + this.featureIndexArray.emplaceBack(o, c, f); + const b = _ ? this.grid3D : this.grid; + for (let S = 0; S < r.length; S++) { + const I = r[S], + L = [1 / 0, 1 / 0, -1 / 0, -1 / 0]; + for (let F = 0; F < I.length; F++) { + const q = I[F]; + (L[0] = Math.min(L[0], q.x)), + (L[1] = Math.min(L[1], q.y)), + (L[2] = Math.max(L[2], q.x)), + (L[3] = Math.max(L[3], q.y)); + } + L[0] < oe && + L[1] < oe && + L[2] >= 0 && + L[3] >= 0 && + b.insert(v, L[0], L[1], L[2], L[3]); + } + } + loadVTLayers() { + return ( + this.vtLayers || + ((this.vtLayers = new F_(new cf(this.rawTileData)).layers), + (this.sourceLayerCoder = new yg( + this.vtLayers + ? Object.keys(this.vtLayers).sort() + : ["_geojsonTileLayer"] + ))), + this.vtLayers + ); + } + query(t, r, o, c) { + this.loadVTLayers(); + const f = t.params, + _ = oe / t.tileSize / t.scale, + v = Ro(f.filter), + b = t.queryGeometry, + S = t.queryPadding * _, + I = rl.fromPoints(b), + L = this.grid.query( + I.minX - S, + I.minY - S, + I.maxX + S, + I.maxY + S + ), + F = rl.fromPoints(t.cameraQueryGeometry).expandBy(S), + q = this.grid3D.query( + F.minX, + F.minY, + F.maxX, + F.maxY, + (J, le, Re, xe) => + (function (Ce, Ye, lt, Pt, Yt) { + for (const Ht of Ce) + if ( + Ye <= Ht.x && + lt <= Ht.y && + Pt >= Ht.x && + Yt >= Ht.y + ) + return !0; + const qt = [ + new B(Ye, lt), + new B(Ye, Yt), + new B(Pt, Yt), + new B(Pt, lt), + ]; + if (Ce.length > 2) { + for (const Ht of qt) if (Yl(Ce, Ht)) return !0; + } + for (let Ht = 0; Ht < Ce.length - 1; Ht++) + if (ty(Ce[Ht], Ce[Ht + 1], qt)) return !0; + return !1; + })(t.cameraQueryGeometry, J - S, le - S, Re + S, xe + S) + ); + for (const J of q) L.push(J); + L.sort(C1); + const Z = {}; + let W; + for (let J = 0; J < L.length; J++) { + const le = L[J]; + if (le === W) continue; + W = le; + const Re = this.featureIndexArray.get(le); + let xe = null; + this.loadMatchingFeature( + Z, + Re.bucketIndex, + Re.sourceLayerIndex, + Re.featureIndex, + v, + f.layers, + f.availableImages, + r, + o, + c, + (Ce, Ye, lt) => ( + xe || (xe = bo(Ce)), + Ye.queryIntersectsFeature({ + queryGeometry: b, + feature: Ce, + featureState: lt, + geometry: xe, + zoom: this.z, + transform: t.transform, + pixelsToTileUnits: _, + pixelPosMatrix: t.pixelPosMatrix, + unwrappedTileID: this.tileID.toUnwrapped(), + getElevation: t.getElevation, + }) + ) + ); + } + return Z; + } + loadMatchingFeature(t, r, o, c, f, _, v, b, S, I, L) { + const F = this.bucketLayerIDs[r]; + if (_ && !F.some((J) => _.has(J))) return; + const q = this.sourceLayerCoder.decode(o), + Z = this.vtLayers[q].feature(c); + if (f.needGeometry) { + const J = no(Z, !0); + if ( + !f.filter( + new Un(this.tileID.overscaledZ), + J, + this.tileID.canonical + ) + ) + return; + } else if (!f.filter(new Un(this.tileID.overscaledZ), Z)) return; + const W = this.getId(Z, q); + for (let J = 0; J < F.length; J++) { + const le = F[J]; + if (_ && !_.has(le)) continue; + const Re = b[le]; + if (!Re) continue; + let xe = {}; + W && + I && + (xe = I.getState(Re.sourceLayer || "_geojsonTileLayer", W)); + const Ce = dt({}, S[le]); + (Ce.paint = wg(Ce.paint, Re.paint, Z, xe, v)), + (Ce.layout = wg(Ce.layout, Re.layout, Z, xe, v)); + const Ye = !L || L(Z, Re, xe); + if (!Ye) continue; + const lt = new xg(Z, this.z, this.x, this.y, W); + lt.layer = Ce; + let Pt = t[le]; + Pt === void 0 && (Pt = t[le] = []), + Pt.push({ + featureIndex: c, + feature: lt, + intersectionZ: Ye, + }); + } + } + lookupSymbolFeatures(t, r, o, c, f, _, v, b) { + const S = {}; + this.loadVTLayers(); + const I = Ro(f); + for (const L of t) + this.loadMatchingFeature(S, o, c, L, I, _, v, b, r); + return S; + } + hasLayer(t) { + for (const r of this.bucketLayerIDs) + for (const o of r) if (t === o) return !0; + return !1; + } + getId(t, r) { + var o; + let c = t.id; + return ( + this.promoteId && + ((c = + t.properties[ + typeof this.promoteId == "string" + ? this.promoteId + : this.promoteId[r] + ]), + typeof c == "boolean" && (c = Number(c)), + c === void 0 && + !((o = t.properties) === null || o === void 0) && + o.cluster && + this.promoteId && + (c = Number(t.properties.cluster_id))), + c + ); + } + } + function wg(n, t, r, o, c) { + return xt(n, (f, _) => { + const v = t instanceof ql ? t.get(_) : null; + return v && v.evaluate ? v.evaluate(r, o, c) : v; + }); + } + function C1(n, t) { + return t - n; + } + function Tg(n, t, r, o, c) { + const f = []; + for (let _ = 0; _ < n.length; _++) { + const v = n[_]; + let b; + for (let S = 0; S < v.length - 1; S++) { + let I = v[S], + L = v[S + 1]; + (I.x < t && L.x < t) || + (I.x < t + ? (I = new B( + t, + I.y + ((t - I.x) / (L.x - I.x)) * (L.y - I.y) + )._round()) + : L.x < t && + (L = new B( + t, + I.y + ((t - I.x) / (L.x - I.x)) * (L.y - I.y) + )._round()), + (I.y < r && L.y < r) || + (I.y < r + ? (I = new B( + I.x + ((r - I.y) / (L.y - I.y)) * (L.x - I.x), + r + )._round()) + : L.y < r && + (L = new B( + I.x + ((r - I.y) / (L.y - I.y)) * (L.x - I.x), + r + )._round()), + (I.x >= o && L.x >= o) || + (I.x >= o + ? (I = new B( + o, + I.y + ((o - I.x) / (L.x - I.x)) * (L.y - I.y) + )._round()) + : L.x >= o && + (L = new B( + o, + I.y + ((o - I.x) / (L.x - I.x)) * (L.y - I.y) + )._round()), + (I.y >= c && L.y >= c) || + (I.y >= c + ? (I = new B( + I.x + ((c - I.y) / (L.y - I.y)) * (L.x - I.x), + c + )._round()) + : L.y >= c && + (L = new B( + I.x + ((c - I.y) / (L.y - I.y)) * (L.x - I.x), + c + )._round()), + (b && I.equals(b[b.length - 1])) || + ((b = [I]), f.push(b)), + b.push(L))))); + } + } + return f; + } + ir("FeatureIndex", bg, { + omit: ["rawTileData", "sourceLayerCoder"], + }); + class xs extends B { + constructor(t, r, o, c) { + super(t, r), + (this.angle = o), + c !== void 0 && (this.segment = c); + } + clone() { + return new xs(this.x, this.y, this.angle, this.segment); + } + } + function Cg(n, t, r, o, c) { + if (t.segment === void 0 || r === 0) return !0; + let f = t, + _ = t.segment + 1, + v = 0; + for (; v > -r / 2; ) { + if ((_--, _ < 0)) return !1; + (v -= n[_].dist(f)), (f = n[_]); + } + (v += n[_].dist(n[_ + 1])), _++; + const b = []; + let S = 0; + for (; v < r / 2; ) { + const I = n[_], + L = n[_ + 1]; + if (!L) return !1; + let F = n[_ - 1].angleTo(I) - I.angleTo(L); + for ( + F = Math.abs(((F + 3 * Math.PI) % (2 * Math.PI)) - Math.PI), + b.push({ distance: v, angleDelta: F }), + S += F; + v - b[0].distance > o; + + ) + S -= b.shift().angleDelta; + if (S > c) return !1; + _++, (v += I.dist(L)); + } + return !0; + } + function Sg(n) { + let t = 0; + for (let r = 0; r < n.length - 1; r++) t += n[r].dist(n[r + 1]); + return t; + } + function Pg(n, t, r) { + return n ? 0.6 * t * r : 0; + } + function Ig(n, t) { + return Math.max( + n ? n.right - n.left : 0, + t ? t.right - t.left : 0 + ); + } + function S1(n, t, r, o, c, f) { + const _ = Pg(r, c, f), + v = Ig(r, o) * f; + let b = 0; + const S = Sg(n) / 2; + for (let I = 0; I < n.length - 1; I++) { + const L = n[I], + F = n[I + 1], + q = L.dist(F); + if (b + q > S) { + const Z = (S - b) / q, + W = Za.number(L.x, F.x, Z), + J = Za.number(L.y, F.y, Z), + le = new xs(W, J, F.angleTo(L), I); + return le._round(), !_ || Cg(n, le, v, _, t) ? le : void 0; + } + b += q; + } + } + function P1(n, t, r, o, c, f, _, v, b) { + const S = Pg(o, f, _), + I = Ig(o, c), + L = I * _, + F = + n[0].x === 0 || n[0].x === b || n[0].y === 0 || n[0].y === b; + return ( + t - L < t / 4 && (t = L + t / 4), + Mg( + n, + F ? ((t / 2) * v) % t : ((I / 2 + 2 * f) * _ * v) % t, + t, + S, + r, + L, + F, + !1, + b + ) + ); + } + function Mg(n, t, r, o, c, f, _, v, b) { + const S = f / 2, + I = Sg(n); + let L = 0, + F = t - r, + q = []; + for (let Z = 0; Z < n.length - 1; Z++) { + const W = n[Z], + J = n[Z + 1], + le = W.dist(J), + Re = J.angleTo(W); + for (; F + r < L + le; ) { + F += r; + const xe = (F - L) / le, + Ce = Za.number(W.x, J.x, xe), + Ye = Za.number(W.y, J.y, xe); + if ( + Ce >= 0 && + Ce < b && + Ye >= 0 && + Ye < b && + F - S >= 0 && + F + S <= I + ) { + const lt = new xs(Ce, Ye, Re, Z); + lt._round(), (o && !Cg(n, lt, f, o, c)) || q.push(lt); + } + } + L += le; + } + return ( + v || q.length || _ || (q = Mg(n, L / 2, r, o, c, f, _, !0, b)), + q + ); + } + function kg(n, t, r, o) { + const c = [], + f = n.image, + _ = f.pixelRatio, + v = f.paddedRect.w - 2, + b = f.paddedRect.h - 2; + let S = { x1: n.left, y1: n.top, x2: n.right, y2: n.bottom }; + const I = f.stretchX || [[0, v]], + L = f.stretchY || [[0, b]], + F = (gt, Nr) => gt + Nr[1] - Nr[0], + q = I.reduce(F, 0), + Z = L.reduce(F, 0), + W = v - q, + J = b - Z; + let le = 0, + Re = q, + xe = 0, + Ce = Z, + Ye = 0, + lt = W, + Pt = 0, + Yt = J; + if (f.content && o) { + const gt = f.content, + Nr = gt[2] - gt[0], + Hr = gt[3] - gt[1]; + (f.textFitWidth || f.textFitHeight) && (S = ng(n)), + (le = Bd(I, 0, gt[0])), + (xe = Bd(L, 0, gt[1])), + (Re = Bd(I, gt[0], gt[2])), + (Ce = Bd(L, gt[1], gt[3])), + (Ye = gt[0] - le), + (Pt = gt[1] - xe), + (lt = Nr - Re), + (Yt = Hr - Ce); + } + const qt = S.x1, + Ht = S.y1, + Sr = S.x2 - qt, + Gt = S.y2 - Ht, + Wt = (gt, Nr, Hr, kr) => { + const yr = Fd(gt.stretch - le, Re, Sr, qt), + dn = Od(gt.fixed - Ye, lt, gt.stretch, q), + Qn = Fd(Nr.stretch - xe, Ce, Gt, Ht), + gi = Od(Nr.fixed - Pt, Yt, Nr.stretch, Z), + qi = Fd(Hr.stretch - le, Re, Sr, qt), + Ba = Od(Hr.fixed - Ye, lt, Hr.stretch, q), + ua = Fd(kr.stretch - xe, Ce, Gt, Ht), + Ri = Od(kr.fixed - Pt, Yt, kr.stretch, Z), + Xn = new B(yr, Qn), + Pi = new B(qi, Qn), + Bi = new B(qi, ua), + Fi = new B(yr, ua), + ra = new B(dn / _, gi / _), + Fa = new B(Ba / _, Ri / _), + Ii = (t * Math.PI) / 180; + if (Ii) { + const Mi = Math.sin(Ii), + ki = Math.cos(Ii), + ui = [ki, -Mi, Mi, ki]; + Xn._matMult(ui), + Pi._matMult(ui), + Fi._matMult(ui), + Bi._matMult(ui); + } + const ha = gt.stretch + gt.fixed, + vi = Nr.stretch + Nr.fixed; + return { + tl: Xn, + tr: Pi, + bl: Fi, + br: Bi, + tex: { + x: f.paddedRect.x + 1 + ha, + y: f.paddedRect.y + 1 + vi, + w: Hr.stretch + Hr.fixed - ha, + h: kr.stretch + kr.fixed - vi, + }, + writingMode: void 0, + glyphOffset: [0, 0], + sectionIndex: 0, + pixelOffsetTL: ra, + pixelOffsetBR: Fa, + minFontScaleX: lt / _ / Sr, + minFontScaleY: Yt / _ / Gt, + isSDF: r, + }; + }; + if (o && (f.stretchX || f.stretchY)) { + const gt = Ag(I, W, q), + Nr = Ag(L, J, Z); + for (let Hr = 0; Hr < gt.length - 1; Hr++) { + const kr = gt[Hr], + yr = gt[Hr + 1]; + for (let dn = 0; dn < Nr.length - 1; dn++) + c.push(Wt(kr, Nr[dn], yr, Nr[dn + 1])); + } + } else c.push(Wt({ fixed: 0, stretch: -1 }, { fixed: 0, stretch: -1 }, { fixed: 0, stretch: v + 1 }, { fixed: 0, stretch: b + 1 })); + return c; + } + function Bd(n, t, r) { + let o = 0; + for (const c of n) + o += + Math.max(t, Math.min(r, c[1])) - + Math.max(t, Math.min(r, c[0])); + return o; + } + function Ag(n, t, r) { + const o = [{ fixed: -1, stretch: 0 }]; + for (const [c, f] of n) { + const _ = o[o.length - 1]; + o.push({ fixed: c - _.stretch, stretch: _.stretch }), + o.push({ + fixed: c - _.stretch, + stretch: _.stretch + (f - c), + }); + } + return o.push({ fixed: t + 1, stretch: r }), o; + } + function Fd(n, t, r, o) { + return (n / t) * r + o; + } + function Od(n, t, r, o) { + return n - (t * r) / o; + } + ir("Anchor", xs); + class Nd { + constructor(t, r, o, c, f, _, v, b, S, I) { + var L; + if (((this.boxStartIndex = t.length), S)) { + let F = _.top, + q = _.bottom; + const Z = _.collisionPadding; + Z && ((F -= Z[1]), (q += Z[3])); + let W = q - F; + W > 0 && ((W = Math.max(10, W)), (this.circleDiameter = W)); + } else { + const F = + !((L = _.image) === null || L === void 0) && + L.content && + (_.image.textFitWidth || _.image.textFitHeight) + ? ng(_) + : { x1: _.left, y1: _.top, x2: _.right, y2: _.bottom }; + (F.y1 = F.y1 * v - b[0]), + (F.y2 = F.y2 * v + b[2]), + (F.x1 = F.x1 * v - b[3]), + (F.x2 = F.x2 * v + b[1]); + const q = _.collisionPadding; + if ( + (q && + ((F.x1 -= q[0] * v), + (F.y1 -= q[1] * v), + (F.x2 += q[2] * v), + (F.y2 += q[3] * v)), + I) + ) { + const Z = new B(F.x1, F.y1), + W = new B(F.x2, F.y1), + J = new B(F.x1, F.y2), + le = new B(F.x2, F.y2), + Re = (I * Math.PI) / 180; + Z._rotate(Re), + W._rotate(Re), + J._rotate(Re), + le._rotate(Re), + (F.x1 = Math.min(Z.x, W.x, J.x, le.x)), + (F.x2 = Math.max(Z.x, W.x, J.x, le.x)), + (F.y1 = Math.min(Z.y, W.y, J.y, le.y)), + (F.y2 = Math.max(Z.y, W.y, J.y, le.y)); + } + t.emplaceBack(r.x, r.y, F.x1, F.y1, F.x2, F.y2, o, c, f); + } + this.boxEndIndex = t.length; + } + } + class I1 { + constructor(t = [], r = (o, c) => (o < c ? -1 : o > c ? 1 : 0)) { + if ( + ((this.data = t), + (this.length = this.data.length), + (this.compare = r), + this.length > 0) + ) + for (let o = (this.length >> 1) - 1; o >= 0; o--) + this._down(o); + } + push(t) { + this.data.push(t), this._up(this.length++); + } + pop() { + if (this.length === 0) return; + const t = this.data[0], + r = this.data.pop(); + return ( + --this.length > 0 && ((this.data[0] = r), this._down(0)), t + ); + } + peek() { + return this.data[0]; + } + _up(t) { + const { data: r, compare: o } = this, + c = r[t]; + for (; t > 0; ) { + const f = (t - 1) >> 1, + _ = r[f]; + if (o(c, _) >= 0) break; + (r[t] = _), (t = f); + } + r[t] = c; + } + _down(t) { + const { data: r, compare: o } = this, + c = this.length >> 1, + f = r[t]; + for (; t < c; ) { + let _ = 1 + (t << 1); + const v = _ + 1; + if ( + (v < this.length && o(r[v], r[_]) < 0 && (_ = v), + o(r[_], f) >= 0) + ) + break; + (r[t] = r[_]), (t = _); + } + r[t] = f; + } + } + function M1(n, t = 1, r = !1) { + const o = rl.fromPoints(n[0]), + c = Math.min(o.width(), o.height()); + let f = c / 2; + const _ = new I1([], k1), + { minX: v, minY: b, maxX: S, maxY: I } = o; + if (c === 0) return new B(v, b); + for (let q = v; q < S; q += c) + for (let Z = b; Z < I; Z += c) + _.push(new ac(q + f, Z + f, f, n)); + let L = (function (q) { + let Z = 0, + W = 0, + J = 0; + const le = q[0]; + for ( + let Re = 0, xe = le.length, Ce = xe - 1; + Re < xe; + Ce = Re++ + ) { + const Ye = le[Re], + lt = le[Ce], + Pt = Ye.x * lt.y - lt.x * Ye.y; + (W += (Ye.x + lt.x) * Pt), + (J += (Ye.y + lt.y) * Pt), + (Z += 3 * Pt); + } + return new ac(W / Z, J / Z, 0, q); + })(n), + F = _.length; + for (; _.length; ) { + const q = _.pop(); + (q.d > L.d || !L.d) && + ((L = q), + r && + console.log( + "found best %d after %d probes", + Math.round(1e4 * q.d) / 1e4, + F + )), + q.max - L.d <= t || + ((f = q.h / 2), + _.push(new ac(q.p.x - f, q.p.y - f, f, n)), + _.push(new ac(q.p.x + f, q.p.y - f, f, n)), + _.push(new ac(q.p.x - f, q.p.y + f, f, n)), + _.push(new ac(q.p.x + f, q.p.y + f, f, n)), + (F += 4)); + } + return ( + r && + (console.log(`num probes: ${F}`), + console.log(`best distance: ${L.d}`)), + L.p + ); + } + function k1(n, t) { + return t.max - n.max; + } + function ac(n, t, r, o) { + (this.p = new B(n, t)), + (this.h = r), + (this.d = (function (c, f) { + let _ = !1, + v = 1 / 0; + for (let b = 0; b < f.length; b++) { + const S = f[b]; + for (let I = 0, L = S.length, F = L - 1; I < L; F = I++) { + const q = S[I], + Z = S[F]; + q.y > c.y != Z.y > c.y && + c.x < ((Z.x - q.x) * (c.y - q.y)) / (Z.y - q.y) + q.x && + (_ = !_), + (v = Math.min(v, f_(c, q, Z))); + } + } + return (_ ? 1 : -1) * Math.sqrt(v); + })(this.p, o)), + (this.max = this.d + this.h * Math.SQRT2); + } + var Vi; + (T.aE = void 0), + ((Vi = T.aE || (T.aE = {}))[(Vi.center = 1)] = "center"), + (Vi[(Vi.left = 2)] = "left"), + (Vi[(Vi.right = 3)] = "right"), + (Vi[(Vi.top = 4)] = "top"), + (Vi[(Vi.bottom = 5)] = "bottom"), + (Vi[(Vi["top-left"] = 6)] = "top-left"), + (Vi[(Vi["top-right"] = 7)] = "top-right"), + (Vi[(Vi["bottom-left"] = 8)] = "bottom-left"), + (Vi[(Vi["bottom-right"] = 9)] = "bottom-right"); + const bf = Number.POSITIVE_INFINITY; + function Eg(n, t) { + return t[1] !== bf + ? (function (r, o, c) { + let f = 0, + _ = 0; + switch (((o = Math.abs(o)), (c = Math.abs(c)), r)) { + case "top-right": + case "top-left": + case "top": + _ = c - 7; + break; + case "bottom-right": + case "bottom-left": + case "bottom": + _ = 7 - c; + } + switch (r) { + case "top-right": + case "bottom-right": + case "right": + f = -o; + break; + case "top-left": + case "bottom-left": + case "left": + f = o; + } + return [f, _]; + })(n, t[0], t[1]) + : (function (r, o) { + let c = 0, + f = 0; + o < 0 && (o = 0); + const _ = o / Math.SQRT2; + switch (r) { + case "top-right": + case "top-left": + f = _ - 7; + break; + case "bottom-right": + case "bottom-left": + f = 7 - _; + break; + case "bottom": + f = 7 - o; + break; + case "top": + f = o - 7; + } + switch (r) { + case "top-right": + case "bottom-right": + c = -_; + break; + case "top-left": + case "bottom-left": + c = _; + break; + case "left": + c = o; + break; + case "right": + c = -o; + } + return [c, f]; + })(n, t[0]); + } + function zg(n, t, r) { + var o; + const c = n.layout, + f = + (o = c.get("text-variable-anchor-offset")) === null || + o === void 0 + ? void 0 + : o.evaluate(t, {}, r); + if (f) { + const v = f.values, + b = []; + for (let S = 0; S < v.length; S += 2) { + const I = (b[S] = v[S]), + L = v[S + 1].map((F) => F * Si); + I.startsWith("top") + ? (L[1] -= 7) + : I.startsWith("bottom") && (L[1] += 7), + (b[S + 1] = L); + } + return new fi(b); + } + const _ = c.get("text-variable-anchor"); + if (_) { + let v; + v = + n._unevaluatedLayout.getValue("text-radial-offset") !== void 0 + ? [c.get("text-radial-offset").evaluate(t, {}, r) * Si, bf] + : c + .get("text-offset") + .evaluate(t, {}, r) + .map((S) => S * Si); + const b = []; + for (const S of _) b.push(S, Eg(S, v)); + return new fi(b); + } + return null; + } + function wf(n) { + switch (n) { + case "right": + case "top-right": + case "bottom-right": + return "right"; + case "left": + case "top-left": + case "bottom-left": + return "left"; + } + return "center"; + } + function A1(n, t, r, o, c, f, _, v, b, S, I, L) { + let F = f.textMaxSize.evaluate(t, {}); + F === void 0 && (F = _); + const q = n.layers[0].layout, + Z = q.get("icon-offset").evaluate(t, {}, I), + W = Dg(r.horizontal), + J = _ / 24, + le = n.tilePixelRatio * J, + Re = (n.tilePixelRatio * F) / 24, + xe = n.tilePixelRatio * v, + Ce = n.tilePixelRatio * q.get("symbol-spacing"), + Ye = q.get("text-padding") * n.tilePixelRatio, + lt = (function (Hr, kr, yr, dn = 1) { + const Qn = Hr.get("icon-padding").evaluate(kr, {}, yr), + gi = Qn && Qn.values; + return [gi[0] * dn, gi[1] * dn, gi[2] * dn, gi[3] * dn]; + })(q, t, I, n.tilePixelRatio), + Pt = (q.get("text-max-angle") / 180) * Math.PI, + Yt = + q.get("text-rotation-alignment") !== "viewport" && + q.get("symbol-placement") !== "point", + qt = + q.get("icon-rotation-alignment") === "map" && + q.get("symbol-placement") !== "point", + Ht = q.get("symbol-placement"), + Sr = Ce / 2, + Gt = q.get("icon-text-fit"); + let Wt; + o && + Gt !== "none" && + (n.allowVerticalPlacement && + r.vertical && + (Wt = ig( + o, + r.vertical, + Gt, + q.get("icon-text-fit-padding"), + Z, + J + )), + W && (o = ig(o, W, Gt, q.get("icon-text-fit-padding"), Z, J))); + const gt = I ? L.line.getGranularityForZoomLevel(I.z) : 1, + Nr = (Hr, kr) => { + kr.x < 0 || + kr.x >= oe || + kr.y < 0 || + kr.y >= oe || + (function ( + yr, + dn, + Qn, + gi, + qi, + Ba, + ua, + Ri, + Xn, + Pi, + Bi, + Fi, + ra, + Fa, + Ii, + ha, + vi, + Mi, + ki, + ui, + qn, + io, + oc, + ao, + L1 + ) { + const sc = yr.addToLineVertexArray(dn, Qn); + let nl, + lc, + cc, + uc, + Og = 0, + Ng = 0, + jg = 0, + Vg = 0, + Af = -1, + Ef = -1; + const Uo = {}; + let qg = ms(""); + if (yr.allowVerticalPlacement && gi.vertical) { + const Hi = + Ri.layout.get("text-rotate").evaluate(qn, {}, ao) + + 90; + (cc = new Nd( + Xn, + dn, + Pi, + Bi, + Fi, + gi.vertical, + ra, + Fa, + Ii, + Hi + )), + ua && + (uc = new Nd( + Xn, + dn, + Pi, + Bi, + Fi, + ua, + vi, + Mi, + Ii, + Hi + )); + } + if (qi) { + const Hi = Ri.layout + .get("icon-rotate") + .evaluate(qn, {}), + Oa = Ri.layout.get("icon-text-fit") !== "none", + il = kg(qi, Hi, oc, Oa), + so = ua ? kg(ua, Hi, oc, Oa) : void 0; + (lc = new Nd(Xn, dn, Pi, Bi, Fi, qi, vi, Mi, !1, Hi)), + (Og = 4 * il.length); + const al = yr.iconSizeData; + let wo = null; + al.kind === "source" + ? ((wo = [ + Zo * Ri.layout.get("icon-size").evaluate(qn, {}), + ]), + wo[0] > vs && + Lt( + `${yr.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".` + )) + : al.kind === "composite" && + ((wo = [ + Zo * + io.compositeIconSizes[0].evaluate(qn, {}, ao), + Zo * + io.compositeIconSizes[1].evaluate(qn, {}, ao), + ]), + (wo[0] > vs || wo[1] > vs) && + Lt( + `${yr.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".` + )), + yr.addSymbols( + yr.icon, + il, + wo, + ui, + ki, + qn, + T.ao.none, + dn, + sc.lineStartIndex, + sc.lineLength, + -1, + ao + ), + (Af = yr.icon.placedSymbolArray.length - 1), + so && + ((Ng = 4 * so.length), + yr.addSymbols( + yr.icon, + so, + wo, + ui, + ki, + qn, + T.ao.vertical, + dn, + sc.lineStartIndex, + sc.lineLength, + -1, + ao + ), + (Ef = yr.icon.placedSymbolArray.length - 1)); + } + const Zg = Object.keys(gi.horizontal); + for (const Hi of Zg) { + const Oa = gi.horizontal[Hi]; + if (!nl) { + qg = ms(Oa.text); + const so = Ri.layout + .get("text-rotate") + .evaluate(qn, {}, ao); + nl = new Nd(Xn, dn, Pi, Bi, Fi, Oa, ra, Fa, Ii, so); + } + const il = Oa.positionedLines.length === 1; + if ( + ((jg += Lg( + yr, + dn, + Oa, + Ba, + Ri, + Ii, + qn, + ha, + sc, + gi.vertical ? T.ao.horizontal : T.ao.horizontalOnly, + il ? Zg : [Hi], + Uo, + Af, + io, + ao + )), + il) + ) + break; + } + gi.vertical && + (Vg += Lg( + yr, + dn, + gi.vertical, + Ba, + Ri, + Ii, + qn, + ha, + sc, + T.ao.vertical, + ["vertical"], + Uo, + Ef, + io, + ao + )); + const D1 = nl + ? nl.boxStartIndex + : yr.collisionBoxArray.length, + R1 = nl ? nl.boxEndIndex : yr.collisionBoxArray.length, + B1 = cc + ? cc.boxStartIndex + : yr.collisionBoxArray.length, + F1 = cc ? cc.boxEndIndex : yr.collisionBoxArray.length, + O1 = lc + ? lc.boxStartIndex + : yr.collisionBoxArray.length, + N1 = lc ? lc.boxEndIndex : yr.collisionBoxArray.length, + j1 = uc + ? uc.boxStartIndex + : yr.collisionBoxArray.length, + V1 = uc ? uc.boxEndIndex : yr.collisionBoxArray.length; + let oo = -1; + const Vd = (Hi, Oa) => + Hi && Hi.circleDiameter + ? Math.max(Hi.circleDiameter, Oa) + : Oa; + (oo = Vd(nl, oo)), + (oo = Vd(cc, oo)), + (oo = Vd(lc, oo)), + (oo = Vd(uc, oo)); + const Ug = oo > -1 ? 1 : 0; + Ug && (oo *= L1 / Si), + yr.glyphOffsetArray.length >= nc.MAX_GLYPHS && + Lt( + "Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907" + ), + qn.sortKey !== void 0 && + yr.addToSortKeyRanges( + yr.symbolInstances.length, + qn.sortKey + ); + const q1 = zg(Ri, qn, ao), + [Z1, U1] = (function (Hi, Oa) { + const il = Hi.length, + so = Oa == null ? void 0 : Oa.values; + if ((so == null ? void 0 : so.length) > 0) + for (let al = 0; al < so.length; al += 2) { + const wo = so[al + 1]; + Hi.emplaceBack(T.aE[so[al]], wo[0], wo[1]); + } + return [il, Hi.length]; + })(yr.textAnchorOffsets, q1); + yr.symbolInstances.emplaceBack( + dn.x, + dn.y, + Uo.right >= 0 ? Uo.right : -1, + Uo.center >= 0 ? Uo.center : -1, + Uo.left >= 0 ? Uo.left : -1, + Uo.vertical || -1, + Af, + Ef, + qg, + D1, + R1, + B1, + F1, + O1, + N1, + j1, + V1, + Pi, + jg, + Vg, + Og, + Ng, + Ug, + 0, + ra, + oo, + Z1, + U1 + ); + })( + n, + kr, + Hr, + r, + o, + c, + Wt, + n.layers[0], + n.collisionBoxArray, + t.index, + t.sourceLayerIndex, + n.index, + le, + [Ye, Ye, Ye, Ye], + Yt, + b, + xe, + lt, + qt, + Z, + t, + f, + S, + I, + _ + ); + }; + if (Ht === "line") + for (const Hr of Tg(t.geometry, 0, 0, oe, oe)) { + const kr = tl(Hr, gt), + yr = P1( + kr, + Ce, + Pt, + r.vertical || W, + o, + 24, + Re, + n.overscaling, + oe + ); + for (const dn of yr) + (W && E1(n, W.text, Sr, dn)) || Nr(kr, dn); + } + else if (Ht === "line-center") { + for (const Hr of t.geometry) + if (Hr.length > 1) { + const kr = tl(Hr, gt), + yr = S1(kr, Pt, r.vertical || W, o, 24, Re); + yr && Nr(kr, yr); + } + } else if (t.type === "Polygon") + for (const Hr of Os(t.geometry, 0)) { + const kr = M1(Hr, 16); + Nr(tl(Hr[0], gt, !0), new xs(kr.x, kr.y, 0)); + } + else if (t.type === "LineString") + for (const Hr of t.geometry) { + const kr = tl(Hr, gt); + Nr(kr, new xs(kr[0].x, kr[0].y, 0)); + } + else if (t.type === "Point") + for (const Hr of t.geometry) + for (const kr of Hr) Nr([kr], new xs(kr.x, kr.y, 0)); + } + function Lg(n, t, r, o, c, f, _, v, b, S, I, L, F, q, Z) { + const W = (function (Re, xe, Ce, Ye, lt, Pt, Yt, qt) { + const Ht = + (Ye.layout.get("text-rotate").evaluate(Pt, {}) * + Math.PI) / + 180, + Sr = []; + for (const Gt of xe.positionedLines) + for (const Wt of Gt.positionedGlyphs) { + if (!Wt.rect) continue; + const gt = Wt.rect || {}; + let Nr = 4, + Hr = !0, + kr = 1, + yr = 0; + const dn = (lt || qt) && Wt.vertical, + Qn = (Wt.metrics.advance * Wt.scale) / 2; + if ( + (qt && + xe.verticalizable && + (yr = + Gt.lineOffset / 2 - + (Wt.imageName + ? -(Si - Wt.metrics.width * Wt.scale) / 2 + : (Wt.scale - 1) * Si)), + Wt.imageName) + ) { + const Mi = Yt[Wt.imageName]; + (Hr = Mi.sdf), (kr = Mi.pixelRatio), (Nr = 1 / kr); + } + const gi = lt ? [Wt.x + Qn, Wt.y] : [0, 0]; + let qi = lt + ? [0, 0] + : [Wt.x + Qn + Ce[0], Wt.y + Ce[1] - yr], + Ba = [0, 0]; + dn && ((Ba = qi), (qi = [0, 0])); + const ua = Wt.metrics.isDoubleResolution ? 2 : 1, + Ri = (Wt.metrics.left - Nr) * Wt.scale - Qn + qi[0], + Xn = (-Wt.metrics.top - Nr) * Wt.scale + qi[1], + Pi = Ri + ((gt.w / ua) * Wt.scale) / kr, + Bi = Xn + ((gt.h / ua) * Wt.scale) / kr, + Fi = new B(Ri, Xn), + ra = new B(Pi, Xn), + Fa = new B(Ri, Bi), + Ii = new B(Pi, Bi); + if (dn) { + const Mi = new B(-Qn, Qn - -17), + ki = -Math.PI / 2, + ui = 12 - Qn, + qn = new B(22 - ui, -(Wt.imageName ? ui : 0)), + io = new B(...Ba); + Fi._rotateAround(ki, Mi)._add(qn)._add(io), + ra._rotateAround(ki, Mi)._add(qn)._add(io), + Fa._rotateAround(ki, Mi)._add(qn)._add(io), + Ii._rotateAround(ki, Mi)._add(qn)._add(io); + } + if (Ht) { + const Mi = Math.sin(Ht), + ki = Math.cos(Ht), + ui = [ki, -Mi, Mi, ki]; + Fi._matMult(ui), + ra._matMult(ui), + Fa._matMult(ui), + Ii._matMult(ui); + } + const ha = new B(0, 0), + vi = new B(0, 0); + Sr.push({ + tl: Fi, + tr: ra, + bl: Fa, + br: Ii, + tex: gt, + writingMode: xe.writingMode, + glyphOffset: gi, + sectionIndex: Wt.sectionIndex, + isSDF: Hr, + pixelOffsetTL: ha, + pixelOffsetBR: vi, + minFontScaleX: 0, + minFontScaleY: 0, + }); + } + return Sr; + })(0, r, v, c, f, _, o, n.allowVerticalPlacement), + J = n.textSizeData; + let le = null; + J.kind === "source" + ? ((le = [Zo * c.layout.get("text-size").evaluate(_, {})]), + le[0] > vs && + Lt( + `${n.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".` + )) + : J.kind === "composite" && + ((le = [ + Zo * q.compositeTextSizes[0].evaluate(_, {}, Z), + Zo * q.compositeTextSizes[1].evaluate(_, {}, Z), + ]), + (le[0] > vs || le[1] > vs) && + Lt( + `${n.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".` + )), + n.addSymbols( + n.text, + W, + le, + v, + f, + _, + S, + t, + b.lineStartIndex, + b.lineLength, + F, + Z + ); + for (const Re of I) L[Re] = n.text.placedSymbolArray.length - 1; + return 4 * W.length; + } + function Dg(n) { + for (const t in n) return n[t]; + return null; + } + function E1(n, t, r, o) { + const c = n.compareText; + if (t in c) { + const f = c[t]; + for (let _ = f.length - 1; _ >= 0; _--) + if (o.dist(f[_]) < r) return !0; + } else c[t] = []; + return c[t].push(o), !1; + } + const Rg = [ + Int8Array, + Uint8Array, + Uint8ClampedArray, + Int16Array, + Uint16Array, + Int32Array, + Uint32Array, + Float32Array, + Float64Array, + ]; + class Tf { + static from(t) { + if (!(t instanceof ArrayBuffer)) + throw new Error("Data must be an instance of ArrayBuffer."); + const [r, o] = new Uint8Array(t, 0, 2); + if (r !== 219) + throw new Error( + "Data does not appear to be in a KDBush format." + ); + const c = o >> 4; + if (c !== 1) + throw new Error(`Got v${c} data when expected v1.`); + const f = Rg[15 & o]; + if (!f) throw new Error("Unrecognized array type."); + const [_] = new Uint16Array(t, 2, 1), + [v] = new Uint32Array(t, 4, 1); + return new Tf(v, _, f, t); + } + constructor(t, r = 64, o = Float64Array, c) { + if (isNaN(t) || t < 0) + throw new Error(`Unpexpected numItems value: ${t}.`); + (this.numItems = +t), + (this.nodeSize = Math.min(Math.max(+r, 2), 65535)), + (this.ArrayType = o), + (this.IndexArrayType = t < 65536 ? Uint16Array : Uint32Array); + const f = Rg.indexOf(this.ArrayType), + _ = 2 * t * this.ArrayType.BYTES_PER_ELEMENT, + v = t * this.IndexArrayType.BYTES_PER_ELEMENT, + b = (8 - (v % 8)) % 8; + if (f < 0) + throw new Error(`Unexpected typed array class: ${o}.`); + c && c instanceof ArrayBuffer + ? ((this.data = c), + (this.ids = new this.IndexArrayType(this.data, 8, t)), + (this.coords = new this.ArrayType( + this.data, + 8 + v + b, + 2 * t + )), + (this._pos = 2 * t), + (this._finished = !0)) + : ((this.data = new ArrayBuffer(8 + _ + v + b)), + (this.ids = new this.IndexArrayType(this.data, 8, t)), + (this.coords = new this.ArrayType( + this.data, + 8 + v + b, + 2 * t + )), + (this._pos = 0), + (this._finished = !1), + new Uint8Array(this.data, 0, 2).set([219, 16 + f]), + (new Uint16Array(this.data, 2, 1)[0] = r), + (new Uint32Array(this.data, 4, 1)[0] = t)); + } + add(t, r) { + const o = this._pos >> 1; + return ( + (this.ids[o] = o), + (this.coords[this._pos++] = t), + (this.coords[this._pos++] = r), + o + ); + } + finish() { + const t = this._pos >> 1; + if (t !== this.numItems) + throw new Error( + `Added ${t} items when expected ${this.numItems}.` + ); + return ( + Cf( + this.ids, + this.coords, + this.nodeSize, + 0, + this.numItems - 1, + 0 + ), + (this._finished = !0), + this + ); + } + range(t, r, o, c) { + if (!this._finished) + throw new Error( + "Data not yet indexed - call index.finish()." + ); + const { ids: f, coords: _, nodeSize: v } = this, + b = [0, f.length - 1, 0], + S = []; + for (; b.length; ) { + const I = b.pop() || 0, + L = b.pop() || 0, + F = b.pop() || 0; + if (L - F <= v) { + for (let J = F; J <= L; J++) { + const le = _[2 * J], + Re = _[2 * J + 1]; + le >= t && le <= o && Re >= r && Re <= c && S.push(f[J]); + } + continue; + } + const q = (F + L) >> 1, + Z = _[2 * q], + W = _[2 * q + 1]; + Z >= t && Z <= o && W >= r && W <= c && S.push(f[q]), + (I === 0 ? t <= Z : r <= W) && + (b.push(F), b.push(q - 1), b.push(1 - I)), + (I === 0 ? o >= Z : c >= W) && + (b.push(q + 1), b.push(L), b.push(1 - I)); + } + return S; + } + within(t, r, o) { + if (!this._finished) + throw new Error( + "Data not yet indexed - call index.finish()." + ); + const { ids: c, coords: f, nodeSize: _ } = this, + v = [0, c.length - 1, 0], + b = [], + S = o * o; + for (; v.length; ) { + const I = v.pop() || 0, + L = v.pop() || 0, + F = v.pop() || 0; + if (L - F <= _) { + for (let J = F; J <= L; J++) + Fg(f[2 * J], f[2 * J + 1], t, r) <= S && b.push(c[J]); + continue; + } + const q = (F + L) >> 1, + Z = f[2 * q], + W = f[2 * q + 1]; + Fg(Z, W, t, r) <= S && b.push(c[q]), + (I === 0 ? t - o <= Z : r - o <= W) && + (v.push(F), v.push(q - 1), v.push(1 - I)), + (I === 0 ? t + o >= Z : r + o >= W) && + (v.push(q + 1), v.push(L), v.push(1 - I)); + } + return b; + } + } + function Cf(n, t, r, o, c, f) { + if (c - o <= r) return; + const _ = (o + c) >> 1; + Bg(n, t, _, o, c, f), + Cf(n, t, r, o, _ - 1, 1 - f), + Cf(n, t, r, _ + 1, c, 1 - f); + } + function Bg(n, t, r, o, c, f) { + for (; c > o; ) { + if (c - o > 600) { + const S = c - o + 1, + I = r - o + 1, + L = Math.log(S), + F = 0.5 * Math.exp((2 * L) / 3), + q = + 0.5 * + Math.sqrt((L * F * (S - F)) / S) * + (I - S / 2 < 0 ? -1 : 1); + Bg( + n, + t, + r, + Math.max(o, Math.floor(r - (I * F) / S + q)), + Math.min(c, Math.floor(r + ((S - I) * F) / S + q)), + f + ); + } + const _ = t[2 * r + f]; + let v = o, + b = c; + for ( + Eu(n, t, o, r), t[2 * c + f] > _ && Eu(n, t, o, c); + v < b; + + ) { + for (Eu(n, t, v, b), v++, b--; t[2 * v + f] < _; ) v++; + for (; t[2 * b + f] > _; ) b--; + } + t[2 * o + f] === _ ? Eu(n, t, o, b) : (b++, Eu(n, t, b, c)), + b <= r && (o = b + 1), + r <= b && (c = b - 1); + } + } + function Eu(n, t, r, o) { + Sf(n, r, o), Sf(t, 2 * r, 2 * o), Sf(t, 2 * r + 1, 2 * o + 1); + } + function Sf(n, t, r) { + const o = n[t]; + (n[t] = n[r]), (n[r] = o); + } + function Fg(n, t, r, o) { + const c = n - r, + f = t - o; + return c * c + f * f; + } + var Pf; + (T.cx = void 0), + ((Pf = T.cx || (T.cx = {})).create = "create"), + (Pf.load = "load"), + (Pf.fullLoad = "fullLoad"); + let jd = null, + zu = []; + const If = 1e3 / 60, + Mf = "loadTime", + kf = "fullLoadTime", + z1 = { + mark(n) { + performance.mark(n); + }, + frame(n) { + const t = n; + jd != null && zu.push(t - jd), (jd = t); + }, + clearMetrics() { + (jd = null), + (zu = []), + performance.clearMeasures(Mf), + performance.clearMeasures(kf); + for (const n in T.cx) performance.clearMarks(T.cx[n]); + }, + getPerformanceMetrics() { + performance.measure(Mf, T.cx.create, T.cx.load), + performance.measure(kf, T.cx.create, T.cx.fullLoad); + const n = performance.getEntriesByName(Mf)[0].duration, + t = performance.getEntriesByName(kf)[0].duration, + r = zu.length, + o = 1 / (zu.reduce((f, _) => f + _, 0) / r / 1e3), + c = zu + .filter((f) => f > If) + .reduce((f, _) => f + (_ - If) / If, 0); + return { + loadTime: n, + fullLoadTime: t, + fps: o, + percentDroppedFrames: (c / (r + c)) * 100, + totalFrames: r, + }; + }, + }; + (T.$ = oe), + (T.A = Ee), + (T.B = function ([n, t, r]) { + return ( + (t += 90), + (t *= Math.PI / 180), + (r *= Math.PI / 180), + { + x: n * Math.cos(t) * Math.sin(r), + y: n * Math.sin(t) * Math.sin(r), + z: n * Math.cos(r), + } + ); + }), + (T.C = Za), + (T.D = wr), + (T.E = kt), + (T.F = Un), + (T.G = Ws), + (T.H = function (n) { + if (tr == null) { + const t = n.navigator ? n.navigator.userAgent : null; + tr = + !!n.safari || + !( + !t || + !( + /\b(iPad|iPhone|iPod)\b/.test(t) || + (t.match("Safari") && !t.match("Chrome")) + ) + ); + } + return tr; + }), + (T.I = uf), + (T.J = class { + constructor(n, t) { + (this.target = n), + (this.mapId = t), + (this.resolveRejects = {}), + (this.tasks = {}), + (this.taskQueue = []), + (this.abortControllers = {}), + (this.messageHandlers = {}), + (this.invoker = new w1(() => this.process())), + (this.subscription = Vr( + this.target, + "message", + (r) => this.receive(r), + !1 + )), + (this.globalScope = $t(self) ? n : window); + } + registerMessageHandler(n, t) { + this.messageHandlers[n] = t; + } + sendAsync(n, t) { + return new Promise((r, o) => { + const c = Math.round(1e18 * Math.random()) + .toString(36) + .substring(0, 10), + f = t + ? Vr( + t.signal, + "abort", + () => { + f == null || f.unsubscribe(), + delete this.resolveRejects[c]; + const b = { + id: c, + type: "", + origin: location.origin, + targetMapId: n.targetMapId, + sourceMapId: this.mapId, + }; + this.target.postMessage(b); + }, + T1 + ) + : null; + this.resolveRejects[c] = { + resolve: (b) => { + f == null || f.unsubscribe(), r(b); + }, + reject: (b) => { + f == null || f.unsubscribe(), o(b); + }, + }; + const _ = [], + v = Object.assign(Object.assign({}, n), { + id: c, + sourceMapId: this.mapId, + origin: location.origin, + data: cs(n.data, _), + }); + this.target.postMessage(v, { transfer: _ }); + }); + } + receive(n) { + const t = n.data, + r = t.id; + if ( + !( + (t.origin !== "file://" && + location.origin !== "file://" && + t.origin !== "resource://android" && + location.origin !== "resource://android" && + t.origin !== location.origin) || + (t.targetMapId && this.mapId !== t.targetMapId) + ) + ) { + if (t.type === "") { + delete this.tasks[r]; + const o = this.abortControllers[r]; + return ( + delete this.abortControllers[r], void (o && o.abort()) + ); + } + if ($t(self) || t.mustQueue) + return ( + (this.tasks[r] = t), + this.taskQueue.push(r), + void this.invoker.trigger() + ); + this.processTask(r, t); + } + } + process() { + if (this.taskQueue.length === 0) return; + const n = this.taskQueue.shift(), + t = this.tasks[n]; + delete this.tasks[n], + this.taskQueue.length > 0 && this.invoker.trigger(), + t && this.processTask(n, t); + } + processTask(n, t) { + return s(this, void 0, void 0, function* () { + if (t.type === "") { + const c = this.resolveRejects[n]; + return ( + delete this.resolveRejects[n], + c + ? void (t.error + ? c.reject(Oo(t.error)) + : c.resolve(Oo(t.data))) + : void 0 + ); + } + if (!this.messageHandlers[t.type]) + return void this.completeTask( + n, + new Error( + `Could not find a registered handler for ${ + t.type + }, map ID: ${ + this.mapId + }, available handlers: ${Object.keys( + this.messageHandlers + ).join(", ")}` + ) + ); + const r = Oo(t.data), + o = new AbortController(); + this.abortControllers[n] = o; + try { + const c = yield this.messageHandlers[t.type]( + t.sourceMapId, + r, + o + ); + this.completeTask(n, null, c); + } catch (c) { + this.completeTask(n, c); + } + }); + } + completeTask(n, t, r) { + const o = []; + delete this.abortControllers[n]; + const c = { + id: n, + type: "", + sourceMapId: this.mapId, + origin: location.origin, + error: t ? cs(t) : null, + data: cs(r, o), + }; + this.target.postMessage(c, { transfer: o }); + } + remove() { + this.invoker.remove(), this.subscription.unsubscribe(); + } + }), + (T.K = Y), + (T.L = function () { + var n = new Ee(16); + return ( + Ee != Float32Array && + ((n[1] = 0), + (n[2] = 0), + (n[3] = 0), + (n[4] = 0), + (n[6] = 0), + (n[7] = 0), + (n[8] = 0), + (n[9] = 0), + (n[11] = 0), + (n[12] = 0), + (n[13] = 0), + (n[14] = 0)), + (n[0] = 1), + (n[5] = 1), + (n[10] = 1), + (n[15] = 1), + n + ); + }), + (T.M = function (n, t, r) { + var o, + c, + f, + _, + v, + b, + S, + I, + L, + F, + q, + Z, + W = r[0], + J = r[1], + le = r[2]; + return ( + t === n + ? ((n[12] = t[0] * W + t[4] * J + t[8] * le + t[12]), + (n[13] = t[1] * W + t[5] * J + t[9] * le + t[13]), + (n[14] = t[2] * W + t[6] * J + t[10] * le + t[14]), + (n[15] = t[3] * W + t[7] * J + t[11] * le + t[15])) + : ((c = t[1]), + (f = t[2]), + (_ = t[3]), + (v = t[4]), + (b = t[5]), + (S = t[6]), + (I = t[7]), + (L = t[8]), + (F = t[9]), + (q = t[10]), + (Z = t[11]), + (n[0] = o = t[0]), + (n[1] = c), + (n[2] = f), + (n[3] = _), + (n[4] = v), + (n[5] = b), + (n[6] = S), + (n[7] = I), + (n[8] = L), + (n[9] = F), + (n[10] = q), + (n[11] = Z), + (n[12] = o * W + v * J + L * le + t[12]), + (n[13] = c * W + b * J + F * le + t[13]), + (n[14] = f * W + S * J + q * le + t[14]), + (n[15] = _ * W + I * J + Z * le + t[15])), + n + ); + }), + (T.N = function (n, t, r) { + var o = r[0], + c = r[1], + f = r[2]; + return ( + (n[0] = t[0] * o), + (n[1] = t[1] * o), + (n[2] = t[2] * o), + (n[3] = t[3] * o), + (n[4] = t[4] * c), + (n[5] = t[5] * c), + (n[6] = t[6] * c), + (n[7] = t[7] * c), + (n[8] = t[8] * f), + (n[9] = t[9] * f), + (n[10] = t[10] * f), + (n[11] = t[11] * f), + (n[12] = t[12]), + (n[13] = t[13]), + (n[14] = t[14]), + (n[15] = t[15]), + n + ); + }), + (T.O = function (n, t, r) { + var o = t[0], + c = t[1], + f = t[2], + _ = t[3], + v = t[4], + b = t[5], + S = t[6], + I = t[7], + L = t[8], + F = t[9], + q = t[10], + Z = t[11], + W = t[12], + J = t[13], + le = t[14], + Re = t[15], + xe = r[0], + Ce = r[1], + Ye = r[2], + lt = r[3]; + return ( + (n[0] = xe * o + Ce * v + Ye * L + lt * W), + (n[1] = xe * c + Ce * b + Ye * F + lt * J), + (n[2] = xe * f + Ce * S + Ye * q + lt * le), + (n[3] = xe * _ + Ce * I + Ye * Z + lt * Re), + (n[4] = + (xe = r[4]) * o + + (Ce = r[5]) * v + + (Ye = r[6]) * L + + (lt = r[7]) * W), + (n[5] = xe * c + Ce * b + Ye * F + lt * J), + (n[6] = xe * f + Ce * S + Ye * q + lt * le), + (n[7] = xe * _ + Ce * I + Ye * Z + lt * Re), + (n[8] = + (xe = r[8]) * o + + (Ce = r[9]) * v + + (Ye = r[10]) * L + + (lt = r[11]) * W), + (n[9] = xe * c + Ce * b + Ye * F + lt * J), + (n[10] = xe * f + Ce * S + Ye * q + lt * le), + (n[11] = xe * _ + Ce * I + Ye * Z + lt * Re), + (n[12] = + (xe = r[12]) * o + + (Ce = r[13]) * v + + (Ye = r[14]) * L + + (lt = r[15]) * W), + (n[13] = xe * c + Ce * b + Ye * F + lt * J), + (n[14] = xe * f + Ce * S + Ye * q + lt * le), + (n[15] = xe * _ + Ce * I + Ye * Z + lt * Re), + n + ); + }), + (T.P = B), + (T.Q = function (n, t) { + const r = {}; + for (let o = 0; o < t.length; o++) { + const c = t[o]; + c in n && (r[c] = n[c]); + } + return r; + }), + (T.R = ca), + (T.S = ys), + (T.T = Jp), + (T.U = fg), + (T.V = pg), + (T.W = Ie), + (T.X = Ae), + (T.Y = Nt), + (T.Z = Ra), + (T._ = s), + (T.a = V), + (T.a$ = Ue), + (T.a0 = function (n, t) { + var r, o, c, f; + if (!n) return t ?? {}; + if (!t) return n; + const _ = Object.assign({}, n); + if ((t.removeAll && (_.removeAll = !0), t.remove)) { + const v = new Set( + _.remove ? _.remove.concat(t.remove) : t.remove + ); + _.remove = Array.from(v.values()); + } + if (t.add) { + const v = _.add ? _.add.concat(t.add) : t.add, + b = new Map(v.map((S) => [S.id, S])); + _.add = Array.from(b.values()); + } + if (t.update) { + const v = new Map( + (r = _.update) === null || r === void 0 + ? void 0 + : r.map((b) => [b.id, b]) + ); + for (const b of t.update) { + const S = + (o = v.get(b.id)) !== null && o !== void 0 + ? o + : { id: b.id }; + b.newGeometry && (S.newGeometry = b.newGeometry), + b.addOrUpdateProperties && + (S.addOrUpdateProperties = ( + (c = S.addOrUpdateProperties) !== null && c !== void 0 + ? c + : [] + ).concat(b.addOrUpdateProperties)), + b.removeProperties && + (S.removeProperties = ( + (f = S.removeProperties) !== null && f !== void 0 + ? f + : [] + ).concat(b.removeProperties)), + b.removeAllProperties && (S.removeAllProperties = !0), + v.set(b.id, S); + } + _.update = Array.from(v.values()); + } + return _; + }), + (T.a1 = ku), + (T.a2 = rl), + (T.a3 = 25), + (T.a4 = xf), + (T.a5 = (n) => { + const t = window.document.createElement("video"); + return ( + (t.muted = !0), + new Promise((r) => { + t.onloadstart = () => { + r(t); + }; + for (const o of n) { + const c = window.document.createElement("source"); + Me(o) || (t.crossOrigin = "Anonymous"), + (c.src = o), + t.appendChild(c); + } + }) + ); + }), + (T.a6 = ht), + (T.a7 = function () { + return yt++; + }), + (T.a8 = D), + (T.a9 = nc), + (T.aA = function (n) { + let t = 1 / 0, + r = 1 / 0, + o = -1 / 0, + c = -1 / 0; + for (const f of n) + (t = Math.min(t, f.x)), + (r = Math.min(r, f.y)), + (o = Math.max(o, f.x)), + (c = Math.max(c, f.y)); + return [t, r, o, c]; + }), + (T.aB = Si), + (T.aC = ze), + (T.aD = function (n, t, r, o, c = !1) { + if (!r[0] && !r[1]) return [0, 0]; + const f = c + ? o === "map" + ? -n.bearingInRadians + : 0 + : o === "viewport" + ? n.bearingInRadians + : 0; + if (f) { + const _ = Math.sin(f), + v = Math.cos(f); + r = [r[0] * v - r[1] * _, r[0] * _ + r[1] * v]; + } + return [ + c ? r[0] : ze(t, r[0], n.zoom), + c ? r[1] : ze(t, r[1], n.zoom), + ]; + }), + (T.aF = pf), + (T.aG = wf), + (T.aH = df), + (T.aI = Tf), + (T.aJ = ti), + (T.aK = Ad), + (T.aL = _e), + (T.aM = Kr), + (T.aN = Rn), + (T.aO = at), + (T.aP = hr), + (T.aQ = _g), + (T.aR = Le), + (T.aS = Qe), + (T.aT = function (n) { + var t = new Ee(3); + return (t[0] = n[0]), (t[1] = n[1]), (t[2] = n[2]), t; + }), + (T.aU = function (n, t, r) { + return ( + (n[0] = t[0] - r[0]), + (n[1] = t[1] - r[1]), + (n[2] = t[2] - r[2]), + n + ); + }), + (T.aV = function (n, t) { + var r = t[0], + o = t[1], + c = t[2], + f = r * r + o * o + c * c; + return ( + f > 0 && (f = 1 / Math.sqrt(f)), + (n[0] = t[0] * f), + (n[1] = t[1] * f), + (n[2] = t[2] * f), + n + ); + }), + (T.aW = et), + (T.aX = function (n, t) { + return n[0] * t[0] + n[1] * t[1] + n[2] * t[2]; + }), + (T.aY = function (n, t, r) { + return ( + (n[0] = t[0] * r[0]), + (n[1] = t[1] * r[1]), + (n[2] = t[2] * r[2]), + (n[3] = t[3] * r[3]), + n + ); + }), + (T.aZ = qe), + (T.a_ = function (n, t, r) { + const o = t[0] * r[0] + t[1] * r[1] + t[2] * r[2]; + return o === 0 + ? null + : (-(n[0] * r[0] + n[1] * r[1] + n[2] * r[2]) - r[3]) / o; + }), + (T.aa = Ro), + (T.ab = no), + (T.ac = xg), + (T.ad = function (n) { + const t = {}; + if ( + (n.replace( + /(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g, + (r, o, c, f) => { + const _ = c || f; + return (t[o] = !_ || _.toLowerCase()), ""; + } + ), + t["max-age"]) + ) { + const r = parseInt(t["max-age"], 10); + isNaN(r) ? delete t["max-age"] : (t["max-age"] = r); + } + return t; + }), + (T.ae = mr), + (T.af = function (n) { + return Math.pow(2, n); + }), + (T.ag = $e), + (T.ah = Dt), + (T.ai = 85.051129), + (T.aj = mg), + (T.ak = function (n) { + return Math.log(n) / Math.LN2; + }), + (T.al = function (n) { + var t = n[0], + r = n[1]; + return t * t + r * r; + }), + (T.am = function (n, t) { + const r = []; + for (const o in n) o in t || r.push(o); + return r; + }), + (T.an = function (n, t) { + let r = 0, + o = 0; + if (n.kind === "constant") o = n.layoutSize; + else if (n.kind !== "source") { + const { interpolationType: c, minZoom: f, maxZoom: _ } = n, + v = c ? Dt(Di.interpolationFactor(c, t, f, _), 0, 1) : 0; + n.kind === "camera" + ? (o = Za.number(n.minSize, n.maxSize, v)) + : (r = v); + } + return { uSizeT: r, uSize: o }; + }), + (T.ap = function ( + n, + { uSize: t, uSizeT: r }, + { lowerSize: o, upperSize: c } + ) { + return n.kind === "source" + ? o / Zo + : n.kind === "composite" + ? Za.number(o / Zo, c / Zo, r) + : t; + }), + (T.aq = function (n, t) { + var r = t[0], + o = t[1], + c = t[2], + f = t[3], + _ = t[4], + v = t[5], + b = t[6], + S = t[7], + I = t[8], + L = t[9], + F = t[10], + q = t[11], + Z = t[12], + W = t[13], + J = t[14], + le = t[15], + Re = r * v - o * _, + xe = r * b - c * _, + Ce = r * S - f * _, + Ye = o * b - c * v, + lt = o * S - f * v, + Pt = c * S - f * b, + Yt = I * W - L * Z, + qt = I * J - F * Z, + Ht = I * le - q * Z, + Sr = L * J - F * W, + Gt = L * le - q * W, + Wt = F * le - q * J, + gt = + Re * Wt - xe * Gt + Ce * Sr + Ye * Ht - lt * qt + Pt * Yt; + return gt + ? ((n[0] = (v * Wt - b * Gt + S * Sr) * (gt = 1 / gt)), + (n[1] = (c * Gt - o * Wt - f * Sr) * gt), + (n[2] = (W * Pt - J * lt + le * Ye) * gt), + (n[3] = (F * lt - L * Pt - q * Ye) * gt), + (n[4] = (b * Ht - _ * Wt - S * qt) * gt), + (n[5] = (r * Wt - c * Ht + f * qt) * gt), + (n[6] = (J * Ce - Z * Pt - le * xe) * gt), + (n[7] = (I * Pt - F * Ce + q * xe) * gt), + (n[8] = (_ * Gt - v * Ht + S * Yt) * gt), + (n[9] = (o * Ht - r * Gt - f * Yt) * gt), + (n[10] = (Z * lt - W * Ce + le * Re) * gt), + (n[11] = (L * Ce - I * lt - q * Re) * gt), + (n[12] = (v * qt - _ * Sr - b * Yt) * gt), + (n[13] = (r * Sr - o * qt + c * Yt) * gt), + (n[14] = (W * xe - Z * Ye - J * Re) * gt), + (n[15] = (I * Ye - L * xe + F * Re) * gt), + n) + : null; + }), + (T.ar = re), + (T.as = function (n) { + return Math.hypot(n[0], n[1]); + }), + (T.at = function (n) { + return (n[0] = 0), (n[1] = 0), n; + }), + (T.au = function (n, t, r) { + return (n[0] = t[0] * r), (n[1] = t[1] * r), n; + }), + (T.av = ff), + (T.aw = ke), + (T.ax = function (n, t, r, o) { + const c = t.y - n.y, + f = t.x - n.x, + _ = o.y - r.y, + v = o.x - r.x, + b = _ * f - v * c; + if (b === 0) return null; + const S = (v * (n.y - r.y) - _ * (n.x - r.x)) / b; + return new B(n.x + S * f, n.y + S * c); + }), + (T.ay = Tg), + (T.az = d_), + (T.b = Qt), + (T.b$ = class extends h {}), + (T.b0 = function (n, t, r) { + return ( + (n[0] = t[0] * r), + (n[1] = t[1] * r), + (n[2] = t[2] * r), + (n[3] = t[3] * r), + n + ); + }), + (T.b1 = function (n, t) { + return n[0] * t[0] + n[1] * t[1] + n[2] * t[2] + n[3]; + }), + (T.b2 = vg), + (T.b3 = ic), + (T.b4 = function (n, t, r, o, c) { + var f, + _ = 1 / Math.tan(t / 2); + return ( + (n[0] = _ / r), + (n[1] = 0), + (n[2] = 0), + (n[3] = 0), + (n[4] = 0), + (n[5] = _), + (n[6] = 0), + (n[7] = 0), + (n[8] = 0), + (n[9] = 0), + (n[11] = -1), + (n[12] = 0), + (n[13] = 0), + (n[15] = 0), + c != null && c !== 1 / 0 + ? ((n[10] = (c + o) * (f = 1 / (o - c))), + (n[14] = 2 * c * o * f)) + : ((n[10] = -1), (n[14] = -2 * o)), + n + ); + }), + (T.b5 = function (n) { + var t = new Ee(16); + return ( + (t[0] = n[0]), + (t[1] = n[1]), + (t[2] = n[2]), + (t[3] = n[3]), + (t[4] = n[4]), + (t[5] = n[5]), + (t[6] = n[6]), + (t[7] = n[7]), + (t[8] = n[8]), + (t[9] = n[9]), + (t[10] = n[10]), + (t[11] = n[11]), + (t[12] = n[12]), + (t[13] = n[13]), + (t[14] = n[14]), + (t[15] = n[15]), + t + ); + }), + (T.b6 = function (n, t, r) { + var o = Math.sin(r), + c = Math.cos(r), + f = t[0], + _ = t[1], + v = t[2], + b = t[3], + S = t[4], + I = t[5], + L = t[6], + F = t[7]; + return ( + t !== n && + ((n[8] = t[8]), + (n[9] = t[9]), + (n[10] = t[10]), + (n[11] = t[11]), + (n[12] = t[12]), + (n[13] = t[13]), + (n[14] = t[14]), + (n[15] = t[15])), + (n[0] = f * c + S * o), + (n[1] = _ * c + I * o), + (n[2] = v * c + L * o), + (n[3] = b * c + F * o), + (n[4] = S * c - f * o), + (n[5] = I * c - _ * o), + (n[6] = L * c - v * o), + (n[7] = F * c - b * o), + n + ); + }), + (T.b7 = function (n, t, r) { + var o = Math.sin(r), + c = Math.cos(r), + f = t[4], + _ = t[5], + v = t[6], + b = t[7], + S = t[8], + I = t[9], + L = t[10], + F = t[11]; + return ( + t !== n && + ((n[0] = t[0]), + (n[1] = t[1]), + (n[2] = t[2]), + (n[3] = t[3]), + (n[12] = t[12]), + (n[13] = t[13]), + (n[14] = t[14]), + (n[15] = t[15])), + (n[4] = f * c + S * o), + (n[5] = _ * c + I * o), + (n[6] = v * c + L * o), + (n[7] = b * c + F * o), + (n[8] = S * c - f * o), + (n[9] = I * c - _ * o), + (n[10] = L * c - v * o), + (n[11] = F * c - b * o), + n + ); + }), + (T.b8 = function () { + const n = new Float32Array(16); + return $e(n), n; + }), + (T.b9 = function () { + const n = new Float64Array(16); + return $e(n), n; + }), + (T.bA = function (n, t) { + const r = je(n, 360), + o = je(t, 360), + c = o - r, + f = o > r ? c - 360 : c + 360; + return Math.abs(c) < Math.abs(f) ? c : f; + }), + (T.bB = function (n) { + return (n[0] = 0), (n[1] = 0), (n[2] = 0), n; + }), + (T.bC = function (n, t, r, o) { + const c = Math.sqrt(n * n + t * t), + f = Math.sqrt(r * r + o * o); + (n /= c), (t /= c), (r /= f), (o /= f); + const _ = Math.acos(n * r + t * o); + return -t * r + n * o > 0 ? _ : -_; + }), + (T.bD = function (n, t) { + const r = je(n, 2 * Math.PI), + o = je(t, 2 * Math.PI); + return Math.min( + Math.abs(r - o), + Math.abs(r - o + 2 * Math.PI), + Math.abs(r - o - 2 * Math.PI) + ); + }), + (T.bE = function () { + const n = {}, + t = ye.$version; + for (const r in ye.$root) { + const o = ye.$root[r]; + if (o.required) { + let c = null; + (c = r === "version" ? t : o.type === "array" ? [] : {}), + c != null && (n[r] = c); + } + } + return n; + }), + (T.bF = Nl), + (T.bG = pe), + (T.bH = function n(t, r) { + if (Array.isArray(t)) { + if (!Array.isArray(r) || t.length !== r.length) return !1; + for (let o = 0; o < t.length; o++) + if (!n(t[o], r[o])) return !1; + return !0; + } + if (typeof t == "object" && t !== null && r !== null) { + if ( + typeof r != "object" || + Object.keys(t).length !== Object.keys(r).length + ) + return !1; + for (const o in t) if (!n(t[o], r[o])) return !1; + return !0; + } + return t === r; + }), + (T.bI = function (n) { + n = n.slice(); + const t = Object.create(null); + for (let r = 0; r < n.length; r++) t[n[r].id] = n[r]; + for (let r = 0; r < n.length; r++) + "ref" in n[r] && (n[r] = rr(n[r], t[n[r].ref])); + return n; + }), + (T.bJ = function (n) { + if (n.type === "custom") return new b1(n); + switch (n.type) { + case "background": + return new v1(n); + case "circle": + return new ny(n); + case "color-relief": + return new cy(n); + case "fill": + return new Cy(n); + case "fill-extrusion": + return new Ry(n); + case "heatmap": + return new ay(n); + case "hillshade": + return new sy(n); + case "line": + return new qy(n); + case "raster": + return new x1(n); + case "symbol": + return new Rd(n); + } + }), + (T.bK = wt), + (T.bL = function (n, t) { + if (!n) return [{ command: "setStyle", args: [t] }]; + let r = []; + try { + if (!Kt(n.version, t.version)) + return [{ command: "setStyle", args: [t] }]; + Kt(n.center, t.center) || + r.push({ command: "setCenter", args: [t.center] }), + Kt(n.state, t.state) || + r.push({ command: "setGlobalState", args: [t.state] }), + Kt(n.centerAltitude, t.centerAltitude) || + r.push({ + command: "setCenterAltitude", + args: [t.centerAltitude], + }), + Kt(n.zoom, t.zoom) || + r.push({ command: "setZoom", args: [t.zoom] }), + Kt(n.bearing, t.bearing) || + r.push({ command: "setBearing", args: [t.bearing] }), + Kt(n.pitch, t.pitch) || + r.push({ command: "setPitch", args: [t.pitch] }), + Kt(n.roll, t.roll) || + r.push({ command: "setRoll", args: [t.roll] }), + Kt(n.sprite, t.sprite) || + r.push({ command: "setSprite", args: [t.sprite] }), + Kt(n.glyphs, t.glyphs) || + r.push({ command: "setGlyphs", args: [t.glyphs] }), + Kt(n.transition, t.transition) || + r.push({ + command: "setTransition", + args: [t.transition], + }), + Kt(n.light, t.light) || + r.push({ command: "setLight", args: [t.light] }), + Kt(n.terrain, t.terrain) || + r.push({ command: "setTerrain", args: [t.terrain] }), + Kt(n.sky, t.sky) || + r.push({ command: "setSky", args: [t.sky] }), + Kt(n.projection, t.projection) || + r.push({ + command: "setProjection", + args: [t.projection], + }); + const o = {}, + c = []; + (function (_, v, b, S) { + let I; + for (I in ((v = v || {}), (_ = _ || {}))) + Object.prototype.hasOwnProperty.call(_, I) && + (Object.prototype.hasOwnProperty.call(v, I) || + nn(I, b, S)); + for (I in v) + Object.prototype.hasOwnProperty.call(v, I) && + (Object.prototype.hasOwnProperty.call(_, I) + ? Kt(_[I], v[I]) || + (_[I].type === "geojson" && + v[I].type === "geojson" && + _n(_, v, I) + ? gr(b, { + command: "setGeoJSONSourceData", + args: [I, v[I].data], + }) + : mn(I, v, b, S)) + : Ur(I, v, b)); + })(n.sources, t.sources, c, o); + const f = []; + n.layers && + n.layers.forEach((_) => { + "source" in _ && o[_.source] + ? r.push({ command: "removeLayer", args: [_.id] }) + : f.push(_); + }), + (r = r.concat(c)), + (function (_, v, b) { + v = v || []; + const S = (_ = _ || []).map(Et), + I = v.map(Et), + L = _.reduce(dr, {}), + F = v.reduce(dr, {}), + q = S.slice(), + Z = Object.create(null); + let W, J, le, Re, xe; + for (let Ce = 0, Ye = 0; Ce < S.length; Ce++) + (W = S[Ce]), + Object.prototype.hasOwnProperty.call(F, W) + ? Ye++ + : (gr(b, { command: "removeLayer", args: [W] }), + q.splice(q.indexOf(W, Ye), 1)); + for (let Ce = 0, Ye = 0; Ce < I.length; Ce++) + (W = I[I.length - 1 - Ce]), + q[q.length - 1 - Ce] !== W && + (Object.prototype.hasOwnProperty.call(L, W) + ? (gr(b, { command: "removeLayer", args: [W] }), + q.splice(q.lastIndexOf(W, q.length - Ye), 1)) + : Ye++, + (Re = q[q.length - Ce]), + gr(b, { command: "addLayer", args: [F[W], Re] }), + q.splice(q.length - Ce, 0, W), + (Z[W] = !0)); + for (let Ce = 0; Ce < I.length; Ce++) + if ( + ((W = I[Ce]), + (J = L[W]), + (le = F[W]), + !Z[W] && !Kt(J, le)) + ) + if ( + Kt(J.source, le.source) && + Kt(J["source-layer"], le["source-layer"]) && + Kt(J.type, le.type) + ) { + for (xe in (Vt( + J.layout, + le.layout, + b, + W, + null, + "setLayoutProperty" + ), + Vt( + J.paint, + le.paint, + b, + W, + null, + "setPaintProperty" + ), + Kt(J.filter, le.filter) || + gr(b, { + command: "setFilter", + args: [W, le.filter], + }), + (Kt(J.minzoom, le.minzoom) && + Kt(J.maxzoom, le.maxzoom)) || + gr(b, { + command: "setLayerZoomRange", + args: [W, le.minzoom, le.maxzoom], + }), + J)) + Object.prototype.hasOwnProperty.call(J, xe) && + xe !== "layout" && + xe !== "paint" && + xe !== "filter" && + xe !== "metadata" && + xe !== "minzoom" && + xe !== "maxzoom" && + (xe.indexOf("paint.") === 0 + ? Vt( + J[xe], + le[xe], + b, + W, + xe.slice(6), + "setPaintProperty" + ) + : Kt(J[xe], le[xe]) || + gr(b, { + command: "setLayerProperty", + args: [W, xe, le[xe]], + })); + for (xe in le) + Object.prototype.hasOwnProperty.call(le, xe) && + !Object.prototype.hasOwnProperty.call(J, xe) && + xe !== "layout" && + xe !== "paint" && + xe !== "filter" && + xe !== "metadata" && + xe !== "minzoom" && + xe !== "maxzoom" && + (xe.indexOf("paint.") === 0 + ? Vt( + J[xe], + le[xe], + b, + W, + xe.slice(6), + "setPaintProperty" + ) + : Kt(J[xe], le[xe]) || + gr(b, { + command: "setLayerProperty", + args: [W, xe, le[xe]], + })); + } else + gr(b, { command: "removeLayer", args: [W] }), + (Re = q[q.lastIndexOf(W) + 1]), + gr(b, { command: "addLayer", args: [le, Re] }); + })(f, t.layers, r); + } catch (o) { + console.warn("Unable to compute style diff:", o), + (r = [{ command: "setStyle", args: [t] }]); + } + return r; + }), + (T.bM = function (n) { + const t = [], + r = n.id; + return ( + r === void 0 && + t.push({ + message: `layers.${r}: missing required property "id"`, + }), + n.render === void 0 && + t.push({ + message: `layers.${r}: missing required method "render"`, + }), + n.renderingMode && + n.renderingMode !== "2d" && + n.renderingMode !== "3d" && + t.push({ + message: `layers.${r}: property "renderingMode" must be either "2d" or "3d"`, + }), + t + ); + }), + (T.bN = xt), + (T.bO = St), + (T.bP = class extends Gi { + constructor(n, t) { + super(n, t), (this.current = 0); + } + set(n) { + this.current !== n && + ((this.current = n), this.gl.uniform1i(this.location, n)); + } + }), + (T.bQ = _i), + (T.bR = class extends Gi { + constructor(n, t) { + super(n, t), (this.current = ba); + } + set(n) { + if (n[12] !== this.current[12] || n[0] !== this.current[0]) + return ( + (this.current = n), + void this.gl.uniformMatrix4fv(this.location, !1, n) + ); + for (let t = 1; t < 16; t++) + if (n[t] !== this.current[t]) { + (this.current = n), + this.gl.uniformMatrix4fv(this.location, !1, n); + break; + } + } + }), + (T.bS = li), + (T.bT = class extends Gi { + constructor(n, t) { + super(n, t), (this.current = [0, 0, 0]); + } + set(n) { + (n[0] === this.current[0] && + n[1] === this.current[1] && + n[2] === this.current[2]) || + ((this.current = n), + this.gl.uniform3f(this.location, n[0], n[1], n[2])); + } + }), + (T.bU = class extends Gi { + constructor(n, t) { + super(n, t), (this.current = [0, 0]); + } + set(n) { + (n[0] === this.current[0] && n[1] === this.current[1]) || + ((this.current = n), + this.gl.uniform2f(this.location, n[0], n[1])); + } + }), + (T.bV = Fe), + (T.bW = function (n, t) { + var r = Math.sin(t), + o = Math.cos(t); + return ( + (n[0] = o), + (n[1] = r), + (n[2] = 0), + (n[3] = -r), + (n[4] = o), + (n[5] = 0), + (n[6] = 0), + (n[7] = 0), + (n[8] = 1), + n + ); + }), + (T.bX = function (n, t, r) { + var o = t[0], + c = t[1], + f = t[2]; + return ( + (n[0] = o * r[0] + c * r[3] + f * r[6]), + (n[1] = o * r[1] + c * r[4] + f * r[7]), + (n[2] = o * r[2] + c * r[5] + f * r[8]), + n + ); + }), + (T.bY = function (n, t, r, o, c, f, _) { + var v = 1 / (t - r), + b = 1 / (o - c), + S = 1 / (f - _); + return ( + (n[0] = -2 * v), + (n[1] = 0), + (n[2] = 0), + (n[3] = 0), + (n[4] = 0), + (n[5] = -2 * b), + (n[6] = 0), + (n[7] = 0), + (n[8] = 0), + (n[9] = 0), + (n[10] = 2 * S), + (n[11] = 0), + (n[12] = (t + r) * v), + (n[13] = (c + o) * b), + (n[14] = (_ + f) * S), + (n[15] = 1), + n + ); + }), + (T.bZ = class extends Gi { + constructor(n, t) { + super(n, t), (this.current = new Array()); + } + set(n) { + if (n != this.current) { + this.current = n; + const t = new Float32Array(4 * n.length); + for (let r = 0; r < n.length; r++) + (t[4 * r] = n[r].r), + (t[4 * r + 1] = n[r].g), + (t[4 * r + 2] = n[r].b), + (t[4 * r + 3] = n[r].a); + this.gl.uniform4fv(this.location, t); + } + } + }), + (T.b_ = class extends Gi { + constructor(n, t) { + super(n, t), (this.current = new Array()); + } + set(n) { + if (n != this.current) { + this.current = n; + const t = new Float32Array(n); + this.gl.uniform1fv(this.location, t); + } + } + }), + (T.ba = function () { + return new Float64Array(16); + }), + (T.bb = function (n, t, r) { + const o = new Float64Array(4); + return ee(o, n, t - 90, r), o; + }), + (T.bc = function (n, t, r, o) { + var c, + f, + _, + v, + b, + S = t[0], + I = t[1], + L = t[2], + F = t[3], + q = r[0], + Z = r[1], + W = r[2], + J = r[3]; + return ( + (f = S * q + I * Z + L * W + F * J) < 0 && + ((f = -f), (q = -q), (Z = -Z), (W = -W), (J = -J)), + 1 - f > De + ? ((c = Math.acos(f)), + (_ = Math.sin(c)), + (v = Math.sin((1 - o) * c) / _), + (b = Math.sin(o * c) / _)) + : ((v = 1 - o), (b = o)), + (n[0] = v * S + b * q), + (n[1] = v * I + b * Z), + (n[2] = v * L + b * W), + (n[3] = v * F + b * J), + n + ); + }), + (T.bd = function (n) { + const t = new Float64Array(9); + var r, o, c, f, _, v, b, S, I, L, F, q, Z, W, J, le, Re, xe; + (L = (c = (o = n)[0]) * (b = c + c)), + (F = (f = o[1]) * b), + (Z = (_ = o[2]) * b), + (W = _ * (S = f + f)), + (le = (v = o[3]) * b), + (Re = v * S), + (xe = v * (I = _ + _)), + ((r = t)[0] = 1 - (q = f * S) - (J = _ * I)), + (r[3] = F - xe), + (r[6] = Z + Re), + (r[1] = F + xe), + (r[4] = 1 - L - J), + (r[7] = W - le), + (r[2] = Z - Re), + (r[5] = W + le), + (r[8] = 1 - L - q); + const Ce = hr(-Math.asin(Dt(t[2], -1, 1))); + let Ye, lt; + return ( + Math.hypot(t[5], t[8]) < 0.001 + ? ((Ye = 0), (lt = -hr(Math.atan2(t[3], t[4])))) + : ((Ye = hr( + t[5] === 0 && t[8] === 0 ? 0 : Math.atan2(t[5], t[8]) + )), + (lt = hr( + t[1] === 0 && t[0] === 0 ? 0 : Math.atan2(t[1], t[0]) + ))), + { roll: Ye, pitch: Ce + 90, bearing: lt } + ); + }), + (T.be = function (n, t) { + return ( + n.roll == t.roll && + n.pitch == t.pitch && + n.bearing == t.bearing + ); + }), + (T.bf = Mr), + (T.bg = yo), + (T.bh = Ql), + (T.bi = Tu), + (T.bj = Jl), + (T.bk = pt), + (T.bl = it), + (T.bm = jn), + (T.bn = function (n, t, r, o, c) { + return pt(o, c, Dt((n - t) / (r - t), 0, 1)); + }), + (T.bo = je), + (T.bp = function () { + return new Float64Array(3); + }), + (T.bq = function (n, t, r, o) { + return ( + (n[0] = t[0] + r[0] * o), + (n[1] = t[1] + r[1] * o), + (n[2] = t[2] + r[2] * o), + n + ); + }), + (T.br = ee), + (T.bs = function (n, t, r) { + var o = r[0], + c = r[1], + f = r[2], + _ = t[0], + v = t[1], + b = t[2], + S = c * b - f * v, + I = f * _ - o * b, + L = o * v - c * _, + F = c * L - f * I, + q = f * S - o * L, + Z = o * I - c * S, + W = 2 * r[3]; + return ( + (I *= W), + (L *= W), + (q *= 2), + (Z *= 2), + (n[0] = _ + (S *= W) + (F *= 2)), + (n[1] = v + I + q), + (n[2] = b + L + Z), + n + ); + }), + (T.bt = function (n, t, r) { + const o = + (c = [ + n[0], + n[1], + n[2], + t[0], + t[1], + t[2], + r[0], + r[1], + r[2], + ])[0] * + ((I = c[8]) * (_ = c[4]) - (v = c[5]) * (S = c[7])) + + c[1] * (-I * (f = c[3]) + v * (b = c[6])) + + c[2] * (S * f - _ * b); + var c, f, _, v, b, S, I; + if (o === 0) return null; + const L = et([], [t[0], t[1], t[2]], [r[0], r[1], r[2]]), + F = et([], [r[0], r[1], r[2]], [n[0], n[1], n[2]]), + q = et([], [n[0], n[1], n[2]], [t[0], t[1], t[2]]), + Z = Le([], L, -n[3]); + return ( + Qe(Z, Z, Le([], F, -t[3])), + Qe(Z, Z, Le([], q, -r[3])), + Le(Z, Z, 1 / o), + Z + ); + }), + (T.bu = vf), + (T.bv = function () { + return new Float64Array(4); + }), + (T.bw = function (n, t, r, o) { + var c = [], + f = []; + return ( + (c[0] = t[0] - r[0]), + (c[1] = t[1] - r[1]), + (c[2] = t[2] - r[2]), + (f[0] = c[0] * Math.cos(o) - c[1] * Math.sin(o)), + (f[1] = c[0] * Math.sin(o) + c[1] * Math.cos(o)), + (f[2] = c[2]), + (n[0] = f[0] + r[0]), + (n[1] = f[1] + r[1]), + (n[2] = f[2] + r[2]), + n + ); + }), + (T.bx = function (n, t, r, o) { + var c = [], + f = []; + return ( + (c[0] = t[0] - r[0]), + (c[1] = t[1] - r[1]), + (c[2] = t[2] - r[2]), + (f[0] = c[0]), + (f[1] = c[1] * Math.cos(o) - c[2] * Math.sin(o)), + (f[2] = c[1] * Math.sin(o) + c[2] * Math.cos(o)), + (n[0] = f[0] + r[0]), + (n[1] = f[1] + r[1]), + (n[2] = f[2] + r[2]), + n + ); + }), + (T.by = function (n, t, r, o) { + var c = [], + f = []; + return ( + (c[0] = t[0] - r[0]), + (c[1] = t[1] - r[1]), + (c[2] = t[2] - r[2]), + (f[0] = c[2] * Math.sin(o) + c[0] * Math.cos(o)), + (f[1] = c[1]), + (f[2] = c[2] * Math.cos(o) - c[0] * Math.sin(o)), + (n[0] = f[0] + r[0]), + (n[1] = f[1] + r[1]), + (n[2] = f[2] + r[2]), + n + ); + }), + (T.bz = function (n, t, r) { + var o = Math.sin(r), + c = Math.cos(r), + f = t[0], + _ = t[1], + v = t[2], + b = t[3], + S = t[8], + I = t[9], + L = t[10], + F = t[11]; + return ( + t !== n && + ((n[4] = t[4]), + (n[5] = t[5]), + (n[6] = t[6]), + (n[7] = t[7]), + (n[12] = t[12]), + (n[13] = t[13]), + (n[14] = t[14]), + (n[15] = t[15])), + (n[0] = f * c - S * o), + (n[1] = _ * c - I * o), + (n[2] = v * c - L * o), + (n[3] = b * c - F * o), + (n[8] = f * o + S * c), + (n[9] = _ * o + I * c), + (n[10] = v * o + L * c), + (n[11] = b * o + F * c), + n + ); + }), + (T.c = ue), + (T.c0 = Gy), + (T.c1 = class extends i {}), + (T.c2 = Kp), + (T.c3 = function (n) { + return n <= 1 + ? 1 + : Math.pow(2, Math.ceil(Math.log(n) / Math.LN2)); + }), + (T.c4 = w_), + (T.c5 = function (n, t, r) { + var o = t[0], + c = t[1], + f = t[2], + _ = r[3] * o + r[7] * c + r[11] * f + r[15]; + return ( + (n[0] = + (r[0] * o + r[4] * c + r[8] * f + r[12]) / (_ = _ || 1)), + (n[1] = (r[1] * o + r[5] * c + r[9] * f + r[13]) / _), + (n[2] = (r[2] * o + r[6] * c + r[10] * f + r[14]) / _), + n + ); + }), + (T.c6 = class extends du {}), + (T.c7 = class extends P {}), + (T.c8 = function (n, t) { + return ( + n[0] === t[0] && + n[1] === t[1] && + n[2] === t[2] && + n[3] === t[3] && + n[4] === t[4] && + n[5] === t[5] && + n[6] === t[6] && + n[7] === t[7] && + n[8] === t[8] && + n[9] === t[9] && + n[10] === t[10] && + n[11] === t[11] && + n[12] === t[12] && + n[13] === t[13] && + n[14] === t[14] && + n[15] === t[15] + ); + }), + (T.c9 = function (n, t) { + var r = n[0], + o = n[1], + c = n[2], + f = n[3], + _ = n[4], + v = n[5], + b = n[6], + S = n[7], + I = n[8], + L = n[9], + F = n[10], + q = n[11], + Z = n[12], + W = n[13], + J = n[14], + le = n[15], + Re = t[0], + xe = t[1], + Ce = t[2], + Ye = t[3], + lt = t[4], + Pt = t[5], + Yt = t[6], + qt = t[7], + Ht = t[8], + Sr = t[9], + Gt = t[10], + Wt = t[11], + gt = t[12], + Nr = t[13], + Hr = t[14], + kr = t[15]; + return ( + Math.abs(r - Re) <= + De * Math.max(1, Math.abs(r), Math.abs(Re)) && + Math.abs(o - xe) <= + De * Math.max(1, Math.abs(o), Math.abs(xe)) && + Math.abs(c - Ce) <= + De * Math.max(1, Math.abs(c), Math.abs(Ce)) && + Math.abs(f - Ye) <= + De * Math.max(1, Math.abs(f), Math.abs(Ye)) && + Math.abs(_ - lt) <= + De * Math.max(1, Math.abs(_), Math.abs(lt)) && + Math.abs(v - Pt) <= + De * Math.max(1, Math.abs(v), Math.abs(Pt)) && + Math.abs(b - Yt) <= + De * Math.max(1, Math.abs(b), Math.abs(Yt)) && + Math.abs(S - qt) <= + De * Math.max(1, Math.abs(S), Math.abs(qt)) && + Math.abs(I - Ht) <= + De * Math.max(1, Math.abs(I), Math.abs(Ht)) && + Math.abs(L - Sr) <= + De * Math.max(1, Math.abs(L), Math.abs(Sr)) && + Math.abs(F - Gt) <= + De * Math.max(1, Math.abs(F), Math.abs(Gt)) && + Math.abs(q - Wt) <= + De * Math.max(1, Math.abs(q), Math.abs(Wt)) && + Math.abs(Z - gt) <= + De * Math.max(1, Math.abs(Z), Math.abs(gt)) && + Math.abs(W - Nr) <= + De * Math.max(1, Math.abs(W), Math.abs(Nr)) && + Math.abs(J - Hr) <= + De * Math.max(1, Math.abs(J), Math.abs(Hr)) && + Math.abs(le - kr) <= + De * Math.max(1, Math.abs(le), Math.abs(kr)) + ); + }), + (T.cA = function (n, t) { + V.REGISTERED_PROTOCOLS[n] = t; + }), + (T.cB = function (n) { + delete V.REGISTERED_PROTOCOLS[n]; + }), + (T.cC = function (n, t) { + const r = {}; + for (let c = 0; c < n.length; c++) { + const f = (t && t[n[c].id]) || Np(n[c]); + t && (t[n[c].id] = f); + let _ = r[f]; + _ || (_ = r[f] = []), _.push(n[c]); + } + const o = []; + for (const c in r) o.push(r[c]); + return o; + }), + (T.cD = ir), + (T.cE = yg), + (T.cF = bg), + (T.cG = K_), + (T.cH = function (n) { + n.bucket.createArrays(), + (n.bucket.tilePixelRatio = oe / (512 * n.bucket.overscaling)), + (n.bucket.compareText = {}), + (n.bucket.iconsNeedLinear = !1); + const t = n.bucket.layers[0], + r = t.layout, + o = t._unevaluatedLayout._values, + c = { + layoutIconSize: o["icon-size"].possiblyEvaluate( + new Un(n.bucket.zoom + 1), + n.canonical + ), + layoutTextSize: o["text-size"].possiblyEvaluate( + new Un(n.bucket.zoom + 1), + n.canonical + ), + textMaxSize: o["text-size"].possiblyEvaluate(new Un(18)), + }; + if (n.bucket.textSizeData.kind === "composite") { + const { minZoom: S, maxZoom: I } = n.bucket.textSizeData; + c.compositeTextSizes = [ + o["text-size"].possiblyEvaluate(new Un(S), n.canonical), + o["text-size"].possiblyEvaluate(new Un(I), n.canonical), + ]; + } + if (n.bucket.iconSizeData.kind === "composite") { + const { minZoom: S, maxZoom: I } = n.bucket.iconSizeData; + c.compositeIconSizes = [ + o["icon-size"].possiblyEvaluate(new Un(S), n.canonical), + o["icon-size"].possiblyEvaluate(new Un(I), n.canonical), + ]; + } + const f = r.get("text-line-height") * Si, + _ = + r.get("text-rotation-alignment") !== "viewport" && + r.get("symbol-placement") !== "point", + v = r.get("text-keep-upright"), + b = r.get("text-size"); + for (const S of n.bucket.features) { + const I = r + .get("text-font") + .evaluate(S, {}, n.canonical) + .join(","), + L = b.evaluate(S, {}, n.canonical), + F = c.layoutTextSize.evaluate(S, {}, n.canonical), + q = c.layoutIconSize.evaluate(S, {}, n.canonical), + Z = { horizontal: {}, vertical: void 0 }, + W = S.text; + let J, + le = [0, 0]; + if (W) { + const Ce = W.toString(), + Ye = + r + .get("text-letter-spacing") + .evaluate(S, {}, n.canonical) * Si, + lt = Zp(Ce) ? Ye : 0, + Pt = r.get("text-anchor").evaluate(S, {}, n.canonical), + Yt = zg(t, S, n.canonical); + if (!Yt) { + const Gt = r + .get("text-radial-offset") + .evaluate(S, {}, n.canonical); + le = Gt + ? Eg(Pt, [Gt * Si, bf]) + : r + .get("text-offset") + .evaluate(S, {}, n.canonical) + .map((Wt) => Wt * Si); + } + let qt = _ + ? "center" + : r.get("text-justify").evaluate(S, {}, n.canonical); + const Ht = + r.get("symbol-placement") === "point" + ? r + .get("text-max-width") + .evaluate(S, {}, n.canonical) * Si + : 1 / 0, + Sr = () => { + n.bucket.allowVerticalPlacement && + jl(Ce) && + (Z.vertical = zd( + W, + n.glyphMap, + n.glyphPositions, + n.imagePositions, + I, + Ht, + f, + Pt, + "left", + lt, + le, + T.ao.vertical, + !0, + F, + L + )); + }; + if (!_ && Yt) { + const Gt = new Set(); + if (qt === "auto") + for (let gt = 0; gt < Yt.values.length; gt += 2) + Gt.add(wf(Yt.values[gt])); + else Gt.add(qt); + let Wt = !1; + for (const gt of Gt) + if (!Z.horizontal[gt]) + if (Wt) Z.horizontal[gt] = Z.horizontal[0]; + else { + const Nr = zd( + W, + n.glyphMap, + n.glyphPositions, + n.imagePositions, + I, + Ht, + f, + "center", + gt, + lt, + le, + T.ao.horizontal, + !1, + F, + L + ); + Nr && + ((Z.horizontal[gt] = Nr), + (Wt = Nr.positionedLines.length === 1)); + } + Sr(); + } else { + qt === "auto" && (qt = wf(Pt)); + const Gt = zd( + W, + n.glyphMap, + n.glyphPositions, + n.imagePositions, + I, + Ht, + f, + Pt, + qt, + lt, + le, + T.ao.horizontal, + !1, + F, + L + ); + Gt && (Z.horizontal[qt] = Gt), + Sr(), + jl(Ce) && + _ && + v && + (Z.vertical = zd( + W, + n.glyphMap, + n.glyphPositions, + n.imagePositions, + I, + Ht, + f, + Pt, + qt, + lt, + le, + T.ao.vertical, + !1, + F, + L + )); + } + } + let Re = !1; + if (S.icon && S.icon.name) { + const Ce = n.imageMap[S.icon.name]; + Ce && + ((J = f1( + n.imagePositions[S.icon.name], + r.get("icon-offset").evaluate(S, {}, n.canonical), + r.get("icon-anchor").evaluate(S, {}, n.canonical) + )), + (Re = !!Ce.sdf), + n.bucket.sdfIcons === void 0 + ? (n.bucket.sdfIcons = Re) + : n.bucket.sdfIcons !== Re && + Lt( + "Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer" + ), + (Ce.pixelRatio !== n.bucket.pixelRatio || + r.get("icon-rotate").constantOr(1) !== 0) && + (n.bucket.iconsNeedLinear = !0)); + } + const xe = Dg(Z.horizontal) || Z.vertical; + (n.bucket.iconsInText = !!xe && xe.iconsInText), + (xe || J) && + A1( + n.bucket, + S, + Z, + J, + n.imageMap, + c, + F, + q, + le, + Re, + n.canonical, + n.subdivisionGranularity + ); + } + n.showCollisionBoxes && + n.bucket.generateCollisionDebugBuffers(); + }), + (T.cI = sf), + (T.cJ = nf), + (T.cK = of), + (T.cL = F_), + (T.cM = cf), + (T.cN = class { + constructor(n) { + (this._marks = { + start: [n.url, "start"].join("#"), + end: [n.url, "end"].join("#"), + measure: n.url.toString(), + }), + performance.mark(this._marks.start); + } + finish() { + performance.mark(this._marks.end); + let n = performance.getEntriesByName(this._marks.measure); + return ( + n.length === 0 && + (performance.measure( + this._marks.measure, + this._marks.start, + this._marks.end + ), + (n = performance.getEntriesByName(this._marks.measure)), + performance.clearMarks(this._marks.start), + performance.clearMarks(this._marks.end), + performance.clearMeasures(this._marks.measure)), + n + ); + } + }), + (T.cO = function (n, t, r, o, c) { + return s(this, void 0, void 0, function* () { + if (Ae()) + try { + return yield Nt(n, t, r, o, c); + } catch {} + return (function (f, _, v, b, S) { + const I = f.width, + L = f.height; + (or && cr) || + ((or = new OffscreenCanvas(I, L)), + (cr = or.getContext("2d", { willReadFrequently: !0 }))), + (or.width = I), + (or.height = L), + cr.drawImage(f, 0, 0, I, L); + const F = cr.getImageData(_, v, b, S); + return cr.clearRect(0, 0, I, L), F.data; + })(n, t, r, o, c); + }); + }), + (T.cP = S_), + (T.cQ = O), + (T.cR = B_), + (T.cS = ec), + (T.cT = qs), + (T.cU = function (n, t) { + const r = new Map(); + if (n != null) + if (n.type === "Feature") r.set(Au(n, t), n); + else for (const o of n.features) r.set(Au(o, t), o); + return r; + }), + (T.cV = function (n, t) { + if (n == null) return !0; + if (n.type === "Feature") return Au(n, t) != null; + if (n.type === "FeatureCollection") { + const r = new Set(); + for (const o of n.features) { + const c = Au(o, t); + if (c == null || r.has(c)) return !1; + r.add(c); + } + return !0; + } + return !1; + }), + (T.cW = function (n, t, r) { + var o, c, f, _; + if ((t.removeAll && n.clear(), t.remove)) + for (const v of t.remove) n.delete(v); + if (t.add) + for (const v of t.add) { + const b = Au(v, r); + b != null && n.set(b, v); + } + if (t.update) + for (const v of t.update) { + let b = n.get(v.id); + if (b == null) continue; + const S = + !v.removeAllProperties && + (((o = v.removeProperties) === null || o === void 0 + ? void 0 + : o.length) > 0 || + ((c = v.addOrUpdateProperties) === null || c === void 0 + ? void 0 + : c.length) > 0); + if ( + ((v.newGeometry || v.removeAllProperties || S) && + ((b = Object.assign({}, b)), + n.set(v.id, b), + S && (b.properties = Object.assign({}, b.properties))), + v.newGeometry && (b.geometry = v.newGeometry), + v.removeAllProperties) + ) + b.properties = {}; + else if ( + ((f = v.removeProperties) === null || f === void 0 + ? void 0 + : f.length) > 0 + ) + for (const I of v.removeProperties) + Object.prototype.hasOwnProperty.call(b.properties, I) && + delete b.properties[I]; + if ( + ((_ = v.addOrUpdateProperties) === null || _ === void 0 + ? void 0 + : _.length) > 0 + ) + for (const { + key: I, + value: L, + } of v.addOrUpdateProperties) + b.properties[I] = L; + } + }), + (T.cX = Ea), + (T.ca = function (n, t) { + return ( + (n[0] = t[0]), + (n[1] = t[1]), + (n[2] = t[2]), + (n[3] = t[3]), + (n[4] = t[4]), + (n[5] = t[5]), + (n[6] = t[6]), + (n[7] = t[7]), + (n[8] = t[8]), + (n[9] = t[9]), + (n[10] = t[10]), + (n[11] = t[11]), + (n[12] = t[12]), + (n[13] = t[13]), + (n[14] = t[14]), + (n[15] = t[15]), + n + ); + }), + (T.cb = (n) => n.type === "symbol"), + (T.cc = (n) => n.type === "circle"), + (T.cd = (n) => n.type === "heatmap"), + (T.ce = (n) => n.type === "line"), + (T.cf = (n) => n.type === "fill"), + (T.cg = (n) => n.type === "fill-extrusion"), + (T.ch = (n) => n.type === "hillshade"), + (T.ci = (n) => n.type === "color-relief"), + (T.cj = (n) => n.type === "raster"), + (T.ck = (n) => n.type === "background"), + (T.cl = (n) => n.type === "custom"), + (T.cm = ct), + (T.cn = function (n, t, r) { + const o = he(t.x - r.x, t.y - r.y), + c = he(n.x - r.x, n.y - r.y); + var f, _; + return hr( + Math.atan2( + o[0] * c[1] - o[1] * c[0], + (f = o)[0] * (_ = c)[0] + f[1] * _[1] + ) + ); + }), + (T.co = It), + (T.cp = function (n, t) { + return ( + Ir[t] && (n instanceof MouseEvent || n instanceof WheelEvent) + ); + }), + (T.cq = function (n, t) { + return _r[t] && "touches" in n; + }), + (T.cr = function (n) { + return _r[n] || Ir[n]; + }), + (T.cs = function (n, t, r) { + var o = t[0], + c = t[1]; + return ( + (n[0] = r[0] * o + r[4] * c + r[12]), + (n[1] = r[1] * o + r[5] * c + r[13]), + n + ); + }), + (T.ct = function (n, t) { + const { x: r, y: o } = ku.fromLngLat(t); + return !(n < 0 || n > 25 || o < 0 || o >= 1 || r < 0 || r >= 1); + }), + (T.cu = function (n, t) { + return ( + (n[0] = t[0]), + (n[1] = 0), + (n[2] = 0), + (n[3] = 0), + (n[4] = 0), + (n[5] = t[1]), + (n[6] = 0), + (n[7] = 0), + (n[8] = 0), + (n[9] = 0), + (n[10] = t[2]), + (n[11] = 0), + (n[12] = 0), + (n[13] = 0), + (n[14] = 0), + (n[15] = 1), + n + ); + }), + (T.cv = class extends ds {}), + (T.cw = z1), + (T.cy = function (n) { + return n.message === qr; + }), + (T.cz = ie), + (T.d = Me), + (T.e = dt), + (T.f = (n) => + s(void 0, void 0, void 0, function* () { + if (n.byteLength === 0) + return createImageBitmap(new ImageData(1, 1)); + const t = new Blob([new Uint8Array(n)], { + type: "image/png", + }); + try { + return createImageBitmap(t); + } catch (r) { + throw new Error( + `Could not load image because of ${r.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.` + ); + } + })), + (T.g = U), + (T.h = (n) => + new Promise((t, r) => { + const o = new Image(); + (o.onload = () => { + t(o), + URL.revokeObjectURL(o.src), + (o.onload = null), + window.requestAnimationFrame(() => { + o.src = Ot; + }); + }), + (o.onerror = () => + r( + 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 c = new Blob([new Uint8Array(n)], { + type: "image/png", + }); + o.src = n.byteLength ? URL.createObjectURL(c) : Ot; + })), + (T.i = $t), + (T.j = (n, t) => Se(dt(n, { type: "json" }), t)), + (T.k = Ke), + (T.l = ut), + (T.m = Se), + (T.n = (n, t) => Se(dt(n, { type: "arrayBuffer" }), t)), + (T.o = function (n) { + return new cf(n).readFields(n1, []); + }), + (T.p = Y_), + (T.q = vu), + (T.r = Ui), + (T.s = Vr), + (T.t = bd), + (T.u = hn), + (T.v = ye), + (T.w = Lt), + (T.x = jp), + (T.y = Xs), + (T.z = ls); + }), + M("worker", ["./shared"], function (T) { + class s { + constructor(V) { + (this.keyCache = {}), V && this.replace(V); + } + replace(V) { + (this._layerConfigs = {}), + (this._layers = {}), + this.update(V, []); + } + update(V, U) { + for (const ie of V) { + this._layerConfigs[ie.id] = ie; + const pe = (this._layers[ie.id] = T.bJ(ie)); + (pe._featureFilter = T.aa(pe.filter)), + this.keyCache[ie.id] && delete this.keyCache[ie.id]; + } + for (const ie of U) + delete this.keyCache[ie], + delete this._layerConfigs[ie], + delete this._layers[ie]; + this.familiesBySource = {}; + const Y = T.cC( + Object.values(this._layerConfigs), + this.keyCache + ); + for (const ie of Y) { + const pe = ie.map((Ke) => this._layers[Ke.id]), + Se = pe[0]; + if (Se.visibility === "none") continue; + const Me = Se.source || ""; + let we = this.familiesBySource[Me]; + we || (we = this.familiesBySource[Me] = {}); + const Ve = Se.sourceLayer || "_geojsonTileLayer"; + let ut = we[Ve]; + ut || (ut = we[Ve] = []), ut.push(pe); + } + } + } + class B { + constructor(V) { + const U = {}, + Y = []; + for (const Me in V) { + const we = V[Me], + Ve = (U[Me] = {}); + for (const ut in we) { + const Ke = we[+ut]; + if ( + !Ke || + Ke.bitmap.width === 0 || + Ke.bitmap.height === 0 + ) + continue; + const kt = { + x: 0, + y: 0, + w: Ke.bitmap.width + 2, + h: Ke.bitmap.height + 2, + }; + Y.push(kt), (Ve[ut] = { rect: kt, metrics: Ke.metrics }); + } + } + const { w: ie, h: pe } = T.p(Y), + Se = new T.q({ width: ie || 1, height: pe || 1 }); + for (const Me in V) { + const we = V[Me]; + for (const Ve in we) { + const ut = we[+Ve]; + if ( + !ut || + ut.bitmap.width === 0 || + ut.bitmap.height === 0 + ) + continue; + const Ke = U[Me][Ve].rect; + T.q.copy( + ut.bitmap, + Se, + { x: 0, y: 0 }, + { x: Ke.x + 1, y: Ke.y + 1 }, + ut.bitmap + ); + } + } + (this.image = Se), (this.positions = U); + } + } + T.cD("GlyphAtlas", B); + class O { + constructor(V) { + (this.tileID = new T.Z( + V.tileID.overscaledZ, + V.tileID.wrap, + V.tileID.canonical.z, + V.tileID.canonical.x, + V.tileID.canonical.y + )), + (this.uid = V.uid), + (this.zoom = V.zoom), + (this.pixelRatio = V.pixelRatio), + (this.tileSize = V.tileSize), + (this.source = V.source), + (this.overscaling = this.tileID.overscaleFactor()), + (this.showCollisionBoxes = V.showCollisionBoxes), + (this.collectResourceTiming = !!V.collectResourceTiming), + (this.returnDependencies = !!V.returnDependencies), + (this.promoteId = V.promoteId), + (this.inFlightDependencies = []), + (this.globalState = V.globalState); + } + parse(V, U, Y, ie, pe) { + return T._(this, void 0, void 0, function* () { + (this.status = "parsing"), + (this.data = V), + (this.collisionBoxArray = new T.a8()); + const Se = new T.cE(Object.keys(V.layers).sort()), + Me = new T.cF(this.tileID, this.promoteId); + Me.bucketLayerIDs = []; + const we = {}, + Ve = { + featureIndex: Me, + iconDependencies: {}, + patternDependencies: {}, + glyphDependencies: {}, + availableImages: Y, + subdivisionGranularity: pe, + }, + ut = U.familiesBySource[this.source]; + for (const Vt in ut) { + const Et = V.layers[Vt]; + if (!Et) continue; + Et.version === 1 && + T.w( + `Vector tile source "${this.source}" layer "${Vt}" does not use vector tile spec v2 and therefore may have some rendering errors.` + ); + const dr = Se.encode(Vt), + ht = []; + for (let Xr = 0; Xr < Et.length; Xr++) { + const Yr = Et.feature(Xr), + Zr = Me.getId(Yr, Vt); + ht.push({ + feature: Yr, + id: Zr, + index: Xr, + sourceLayerIndex: dr, + }); + } + for (const Xr of ut[Vt]) { + const Yr = Xr[0]; + Yr.source !== this.source && + T.w( + `layer.source = ${Yr.source} does not equal this.source = ${this.source}` + ), + (Yr.minzoom && this.zoom < Math.floor(Yr.minzoom)) || + (Yr.maxzoom && this.zoom >= Yr.maxzoom) || + (Yr.visibility !== "none" && + (X(Xr, this.zoom, Y), + (we[Yr.id] = Yr.createBucket({ + index: Me.bucketLayerIDs.length, + layers: Xr, + zoom: this.zoom, + pixelRatio: this.pixelRatio, + overscaling: this.overscaling, + collisionBoxArray: this.collisionBoxArray, + sourceLayerIndex: dr, + sourceID: this.source, + globalState: this.globalState, + })).populate(ht, Ve, this.tileID.canonical), + Me.bucketLayerIDs.push(Xr.map((Zr) => Zr.id)))); + } + } + const Ke = T.bN(Ve.glyphDependencies, (Vt) => + Object.keys(Vt).map(Number) + ); + this.inFlightDependencies.forEach((Vt) => + Vt == null ? void 0 : Vt.abort() + ), + (this.inFlightDependencies = []); + let kt = Promise.resolve({}); + if (Object.keys(Ke).length) { + const Vt = new AbortController(); + this.inFlightDependencies.push(Vt), + (kt = ie.sendAsync( + { + type: "GG", + data: { + stacks: Ke, + source: this.source, + tileID: this.tileID, + type: "glyphs", + }, + }, + Vt + )); + } + const ye = Object.keys(Ve.iconDependencies); + let Bt = Promise.resolve({}); + if (ye.length) { + const Vt = new AbortController(); + this.inFlightDependencies.push(Vt), + (Bt = ie.sendAsync( + { + type: "GI", + data: { + icons: ye, + source: this.source, + tileID: this.tileID, + type: "icons", + }, + }, + Vt + )); + } + const rr = Object.keys(Ve.patternDependencies); + let Kt = Promise.resolve({}); + if (rr.length) { + const Vt = new AbortController(); + this.inFlightDependencies.push(Vt), + (Kt = ie.sendAsync( + { + type: "GI", + data: { + icons: rr, + source: this.source, + tileID: this.tileID, + type: "patterns", + }, + }, + Vt + )); + } + const [gr, Ur, nn] = yield Promise.all([kt, Bt, Kt]), + mn = new B(gr), + _n = new T.cG(Ur, nn); + for (const Vt in we) { + const Et = we[Vt]; + Et instanceof T.a9 + ? (X(Et.layers, this.zoom, Y), + T.cH({ + bucket: Et, + glyphMap: gr, + glyphPositions: mn.positions, + imageMap: Ur, + imagePositions: _n.iconPositions, + showCollisionBoxes: this.showCollisionBoxes, + canonical: this.tileID.canonical, + subdivisionGranularity: Ve.subdivisionGranularity, + })) + : Et.hasPattern && + (Et instanceof T.cI || + Et instanceof T.cJ || + Et instanceof T.cK) && + (X(Et.layers, this.zoom, Y), + Et.addFeatures( + Ve, + this.tileID.canonical, + _n.patternPositions + )); + } + return ( + (this.status = "done"), + { + buckets: Object.values(we).filter( + (Vt) => !Vt.isEmpty() + ), + featureIndex: Me, + collisionBoxArray: this.collisionBoxArray, + glyphAtlasImage: mn.image, + imageAtlas: _n, + glyphMap: this.returnDependencies ? gr : null, + iconMap: this.returnDependencies ? Ur : null, + glyphPositions: this.returnDependencies + ? mn.positions + : null, + } + ); + }); + } + } + function X(ue, V, U) { + const Y = new T.F(V); + for (const ie of ue) ie.recalculate(Y, U); + } + class K { + constructor(V, U, Y) { + (this.actor = V), + (this.layerIndex = U), + (this.availableImages = Y), + (this.fetching = {}), + (this.loading = {}), + (this.loaded = {}); + } + loadVectorTile(V, U) { + return T._(this, void 0, void 0, function* () { + const Y = yield T.n(V.request, U); + try { + return { + vectorTile: new T.cL(new T.cM(Y.data)), + rawData: Y.data, + cacheControl: Y.cacheControl, + expires: Y.expires, + }; + } catch (ie) { + const pe = new Uint8Array(Y.data); + let Se = `Unable to parse the tile at ${V.request.url}, `; + throw ( + ((Se += + pe[0] === 31 && pe[1] === 139 + ? "please make sure the data is not gzipped and that you have configured the relevant header in the server" + : `got error: ${ie.message}`), + new Error(Se)) + ); + } + }); + } + loadTile(V) { + return T._(this, void 0, void 0, function* () { + const U = V.uid, + Y = + !!(V && V.request && V.request.collectResourceTiming) && + new T.cN(V.request), + ie = new O(V); + this.loading[U] = ie; + const pe = new AbortController(); + ie.abort = pe; + try { + const Se = yield this.loadVectorTile(V, pe); + if ((delete this.loading[U], !Se)) return null; + const Me = Se.rawData, + we = {}; + Se.expires && (we.expires = Se.expires), + Se.cacheControl && (we.cacheControl = Se.cacheControl); + const Ve = {}; + if (Y) { + const Ke = Y.finish(); + Ke && + (Ve.resourceTiming = JSON.parse(JSON.stringify(Ke))); + } + ie.vectorTile = Se.vectorTile; + const ut = ie.parse( + Se.vectorTile, + this.layerIndex, + this.availableImages, + this.actor, + V.subdivisionGranularity + ); + (this.loaded[U] = ie), + (this.fetching[U] = { + rawTileData: Me, + cacheControl: we, + resourceTiming: Ve, + }); + try { + const Ke = yield ut; + return T.e({ rawTileData: Me.slice(0) }, Ke, we, Ve); + } finally { + delete this.fetching[U]; + } + } catch (Se) { + throw ( + (delete this.loading[U], + (ie.status = "done"), + (this.loaded[U] = ie), + Se) + ); + } + }); + } + reloadTile(V) { + return T._(this, void 0, void 0, function* () { + const U = V.uid; + if (!this.loaded || !this.loaded[U]) + throw new Error( + "Should not be trying to reload a tile that was never loaded or has been removed" + ); + const Y = this.loaded[U]; + if ( + ((Y.showCollisionBoxes = V.showCollisionBoxes), + (Y.globalState = V.globalState), + Y.status === "parsing") + ) { + const ie = yield Y.parse( + Y.vectorTile, + this.layerIndex, + this.availableImages, + this.actor, + V.subdivisionGranularity + ); + let pe; + if (this.fetching[U]) { + const { + rawTileData: Se, + cacheControl: Me, + resourceTiming: we, + } = this.fetching[U]; + delete this.fetching[U], + (pe = T.e({ rawTileData: Se.slice(0) }, ie, Me, we)); + } else pe = ie; + return pe; + } + if (Y.status === "done" && Y.vectorTile) + return Y.parse( + Y.vectorTile, + this.layerIndex, + this.availableImages, + this.actor, + V.subdivisionGranularity + ); + }); + } + abortTile(V) { + return T._(this, void 0, void 0, function* () { + const U = this.loading, + Y = V.uid; + U && + U[Y] && + U[Y].abort && + (U[Y].abort.abort(), delete U[Y]); + }); + } + removeTile(V) { + return T._(this, void 0, void 0, function* () { + this.loaded && + this.loaded[V.uid] && + delete this.loaded[V.uid]; + }); + } + } + class ne { + constructor() { + this.loaded = {}; + } + loadTile(V) { + return T._(this, void 0, void 0, function* () { + const { + uid: U, + encoding: Y, + rawImageData: ie, + redFactor: pe, + greenFactor: Se, + blueFactor: Me, + baseShift: we, + } = V, + Ve = ie.width + 2, + ut = ie.height + 2, + Ke = T.b(ie) + ? new T.R( + { width: Ve, height: ut }, + yield T.cO(ie, -1, -1, Ve, ut) + ) + : ie, + kt = new T.cP(U, Ke, Y, pe, Se, Me, we); + return ( + (this.loaded = this.loaded || {}), + (this.loaded[U] = kt), + kt + ); + }); + } + removeTile(V) { + const U = this.loaded, + Y = V.uid; + U && U[Y] && delete U[Y]; + } + } + var H, + fe, + ge = (function () { + if (fe) return H; + function ue(U, Y) { + if (U.length !== 0) { + V(U[0], Y); + for (var ie = 1; ie < U.length; ie++) V(U[ie], !Y); + } + } + function V(U, Y) { + for ( + var ie = 0, pe = 0, Se = 0, Me = U.length, we = Me - 1; + Se < Me; + we = Se++ + ) { + var Ve = (U[Se][0] - U[we][0]) * (U[we][1] + U[Se][1]), + ut = ie + Ve; + (pe += + Math.abs(ie) >= Math.abs(Ve) + ? ie - ut + Ve + : Ve - ut + ie), + (ie = ut); + } + ie + pe >= 0 != !!Y && U.reverse(); + } + return ( + (fe = 1), + (H = function U(Y, ie) { + var pe, + Se = Y && Y.type; + if (Se === "FeatureCollection") + for (pe = 0; pe < Y.features.length; pe++) + U(Y.features[pe], ie); + else if (Se === "GeometryCollection") + for (pe = 0; pe < Y.geometries.length; pe++) + U(Y.geometries[pe], ie); + else if (Se === "Feature") U(Y.geometry, ie); + else if (Se === "Polygon") ue(Y.coordinates, ie); + else if (Se === "MultiPolygon") + for (pe = 0; pe < Y.coordinates.length; pe++) + ue(Y.coordinates[pe], ie); + return Y; + }) + ); + })(), + Ie = T.cQ(ge); + class Ae extends T.cS { + constructor(V, U) { + super(new T.cM(), 0, U, [], []), + (this.feature = V), + (this.type = V.type), + (this.properties = V.tags ? V.tags : {}), + "id" in V && + (typeof V.id == "string" + ? (this.id = parseInt(V.id, 10)) + : typeof V.id != "number" || + isNaN(V.id) || + (this.id = V.id)); + } + loadGeometry() { + const V = [], + U = + this.feature.type === 1 + ? [this.feature.geometry] + : this.feature.geometry; + for (const Y of U) { + const ie = []; + for (const pe of Y) ie.push(new T.P(pe[0], pe[1])); + V.push(ie); + } + return V; + } + } + class De extends T.cR { + constructor(V, U) { + super(new T.cM()), + (this.layers = { _geojsonTileLayer: this }), + (this.name = "_geojsonTileLayer"), + (this.version = U ? U.version : 1), + (this.extent = U ? U.extent : 4096), + (this.length = V.length), + (this.features = V); + } + feature(V) { + return new Ae(this.features[V], this.extent); + } + } + function Ee(ue, V) { + V.writeVarintField(15, ue.version || 1), + V.writeStringField(1, ue.name || ""), + V.writeVarintField(5, ue.extent || 4096); + const U = { + keys: [], + values: [], + keycache: {}, + valuecache: {}, + }; + for (let pe = 0; pe < ue.length; pe++) + (U.feature = ue.feature(pe)), V.writeMessage(2, Fe, U); + const Y = U.keys; + for (const pe of Y) V.writeStringField(3, pe); + const ie = U.values; + for (const pe of ie) V.writeMessage(4, Qe, pe); + } + function Fe(ue, V) { + if (!ue.feature) return; + const U = ue.feature; + U.id !== void 0 && V.writeVarintField(1, U.id), + V.writeMessage(2, $e, ue), + V.writeVarintField(3, U.type), + V.writeMessage(4, Ze, U); + } + function $e(ue, V) { + var U; + for (const Y in (U = ue.feature) == null + ? void 0 + : U.properties) { + let ie = ue.feature.properties[Y], + pe = ue.keycache[Y]; + if (ie === null) continue; + pe === void 0 && + (ue.keys.push(Y), + (pe = ue.keys.length - 1), + (ue.keycache[Y] = pe)), + V.writeVarint(pe), + typeof ie != "string" && + typeof ie != "boolean" && + typeof ie != "number" && + (ie = JSON.stringify(ie)); + const Se = typeof ie + ":" + ie; + let Me = ue.valuecache[Se]; + Me === void 0 && + (ue.values.push(ie), + (Me = ue.values.length - 1), + (ue.valuecache[Se] = Me)), + V.writeVarint(Me); + } + } + function Je(ue, V) { + return (V << 3) + (7 & ue); + } + function qe(ue) { + return (ue << 1) ^ (ue >> 31); + } + function Ze(ue, V) { + const U = ue.loadGeometry(), + Y = ue.type; + let ie = 0, + pe = 0; + for (const Se of U) { + let Me = 1; + Y === 1 && (Me = Se.length), V.writeVarint(Je(1, Me)); + const we = Y === 3 ? Se.length - 1 : Se.length; + for (let Ve = 0; Ve < we; Ve++) { + Ve === 1 && Y !== 1 && V.writeVarint(Je(2, we - 1)); + const ut = Se[Ve].x - ie, + Ke = Se[Ve].y - pe; + V.writeVarint(qe(ut)), + V.writeVarint(qe(Ke)), + (ie += ut), + (pe += Ke); + } + ue.type === 3 && V.writeVarint(Je(7, 1)); + } + } + function Qe(ue, V) { + const U = typeof ue; + U === "string" + ? V.writeStringField(1, ue) + : U === "boolean" + ? V.writeBooleanField(7, ue) + : U === "number" && + (ue % 1 != 0 + ? V.writeDoubleField(3, ue) + : ue < 0 + ? V.writeSVarintField(6, ue) + : V.writeVarintField(5, ue)); + } + const Le = { + minZoom: 0, + maxZoom: 16, + minPoints: 2, + radius: 40, + extent: 512, + nodeSize: 64, + log: !1, + generateId: !1, + reduce: null, + map: (ue) => ue, + }, + et = + Math.fround || + ((nt = new Float32Array(1)), (ue) => ((nt[0] = +ue), nt[0])); + var nt; + class Ue { + constructor(V) { + (this.options = Object.assign(Object.create(Le), V)), + (this.trees = new Array(this.options.maxZoom + 1)), + (this.stride = this.options.reduce ? 7 : 6), + (this.clusterProps = []); + } + load(V) { + const { log: U, minZoom: Y, maxZoom: ie } = this.options; + U && console.time("total time"); + const pe = `prepare ${V.length} points`; + U && console.time(pe), (this.points = V); + const Se = []; + for (let we = 0; we < V.length; we++) { + const Ve = V[we]; + if (!Ve.geometry) continue; + const [ut, Ke] = Ve.geometry.coordinates, + kt = et(ee(ut)), + ye = et(re(Ke)); + Se.push(kt, ye, 1 / 0, we, -1, 1), + this.options.reduce && Se.push(0); + } + let Me = (this.trees[ie + 1] = this._createTree(Se)); + U && console.timeEnd(pe); + for (let we = ie; we >= Y; we--) { + const Ve = +Date.now(); + (Me = this.trees[we] = + this._createTree(this._cluster(Me, we))), + U && + console.log( + "z%d: %d clusters in %dms", + we, + Me.numItems, + +Date.now() - Ve + ); + } + return U && console.timeEnd("total time"), this; + } + getClusters(V, U) { + let Y = ((((V[0] + 180) % 360) + 360) % 360) - 180; + const ie = Math.max(-90, Math.min(90, V[1])); + let pe = + V[2] === 180 + ? 180 + : ((((V[2] + 180) % 360) + 360) % 360) - 180; + const Se = Math.max(-90, Math.min(90, V[3])); + if (V[2] - V[0] >= 360) (Y = -180), (pe = 180); + else if (Y > pe) { + const Ke = this.getClusters([Y, ie, 180, Se], U), + kt = this.getClusters([-180, ie, pe, Se], U); + return Ke.concat(kt); + } + const Me = this.trees[this._limitZoom(U)], + we = Me.range(ee(Y), re(Se), ee(pe), re(ie)), + Ve = Me.data, + ut = []; + for (const Ke of we) { + const kt = this.stride * Ke; + ut.push( + Ve[kt + 5] > 1 + ? ke(Ve, kt, this.clusterProps) + : this.points[Ve[kt + 3]] + ); + } + return ut; + } + getChildren(V) { + const U = this._getOriginId(V), + Y = this._getOriginZoom(V), + ie = "No cluster with the specified id.", + pe = this.trees[Y]; + if (!pe) throw new Error(ie); + const Se = pe.data; + if (U * this.stride >= Se.length) throw new Error(ie); + const Me = + this.options.radius / + (this.options.extent * Math.pow(2, Y - 1)), + we = pe.within( + Se[U * this.stride], + Se[U * this.stride + 1], + Me + ), + Ve = []; + for (const ut of we) { + const Ke = ut * this.stride; + Se[Ke + 4] === V && + Ve.push( + Se[Ke + 5] > 1 + ? ke(Se, Ke, this.clusterProps) + : this.points[Se[Ke + 3]] + ); + } + if (Ve.length === 0) throw new Error(ie); + return Ve; + } + getLeaves(V, U, Y) { + const ie = []; + return ( + this._appendLeaves(ie, V, (U = U || 10), (Y = Y || 0), 0), + ie + ); + } + getTile(V, U, Y) { + const ie = this.trees[this._limitZoom(V)], + pe = Math.pow(2, V), + { extent: Se, radius: Me } = this.options, + we = Me / Se, + Ve = (Y - we) / pe, + ut = (Y + 1 + we) / pe, + Ke = { features: [] }; + return ( + this._addTileFeatures( + ie.range((U - we) / pe, Ve, (U + 1 + we) / pe, ut), + ie.data, + U, + Y, + pe, + Ke + ), + U === 0 && + this._addTileFeatures( + ie.range(1 - we / pe, Ve, 1, ut), + ie.data, + pe, + Y, + pe, + Ke + ), + U === pe - 1 && + this._addTileFeatures( + ie.range(0, Ve, we / pe, ut), + ie.data, + -1, + Y, + pe, + Ke + ), + Ke.features.length ? Ke : null + ); + } + getClusterExpansionZoom(V) { + let U = this._getOriginZoom(V) - 1; + for (; U <= this.options.maxZoom; ) { + const Y = this.getChildren(V); + if ((U++, Y.length !== 1)) break; + V = Y[0].properties.cluster_id; + } + return U; + } + _appendLeaves(V, U, Y, ie, pe) { + const Se = this.getChildren(U); + for (const Me of Se) { + const we = Me.properties; + if ( + (we && we.cluster + ? pe + we.point_count <= ie + ? (pe += we.point_count) + : (pe = this._appendLeaves( + V, + we.cluster_id, + Y, + ie, + pe + )) + : pe < ie + ? pe++ + : V.push(Me), + V.length === Y) + ) + break; + } + return pe; + } + _createTree(V) { + const U = new T.aI( + (V.length / this.stride) | 0, + this.options.nodeSize, + Float32Array + ); + for (let Y = 0; Y < V.length; Y += this.stride) + U.add(V[Y], V[Y + 1]); + return U.finish(), (U.data = V), U; + } + _addTileFeatures(V, U, Y, ie, pe, Se) { + for (const Me of V) { + const we = Me * this.stride, + Ve = U[we + 5] > 1; + let ut, Ke, kt; + if (Ve) + (ut = vt(U, we, this.clusterProps)), + (Ke = U[we]), + (kt = U[we + 1]); + else { + const rr = this.points[U[we + 3]]; + ut = rr.properties; + const [Kt, gr] = rr.geometry.coordinates; + (Ke = ee(Kt)), (kt = re(gr)); + } + const ye = { + type: 1, + geometry: [ + [ + Math.round(this.options.extent * (Ke * pe - Y)), + Math.round(this.options.extent * (kt * pe - ie)), + ], + ], + tags: ut, + }; + let Bt; + (Bt = + Ve || this.options.generateId + ? U[we + 3] + : this.points[U[we + 3]].id), + Bt !== void 0 && (ye.id = Bt), + Se.features.push(ye); + } + } + _limitZoom(V) { + return Math.max( + this.options.minZoom, + Math.min(Math.floor(+V), this.options.maxZoom + 1) + ); + } + _cluster(V, U) { + const { + radius: Y, + extent: ie, + reduce: pe, + minPoints: Se, + } = this.options, + Me = Y / (ie * Math.pow(2, U)), + we = V.data, + Ve = [], + ut = this.stride; + for (let Ke = 0; Ke < we.length; Ke += ut) { + if (we[Ke + 2] <= U) continue; + we[Ke + 2] = U; + const kt = we[Ke], + ye = we[Ke + 1], + Bt = V.within(we[Ke], we[Ke + 1], Me), + rr = we[Ke + 5]; + let Kt = rr; + for (const gr of Bt) { + const Ur = gr * ut; + we[Ur + 2] > U && (Kt += we[Ur + 5]); + } + if (Kt > rr && Kt >= Se) { + let gr, + Ur = kt * rr, + nn = ye * rr, + mn = -1; + const _n = + ((Ke / ut) << 5) + (U + 1) + this.points.length; + for (const Vt of Bt) { + const Et = Vt * ut; + if (we[Et + 2] <= U) continue; + we[Et + 2] = U; + const dr = we[Et + 5]; + (Ur += we[Et] * dr), + (nn += we[Et + 1] * dr), + (we[Et + 4] = _n), + pe && + (gr || + ((gr = this._map(we, Ke, !0)), + (mn = this.clusterProps.length), + this.clusterProps.push(gr)), + pe(gr, this._map(we, Et))); + } + (we[Ke + 4] = _n), + Ve.push(Ur / Kt, nn / Kt, 1 / 0, _n, -1, Kt), + pe && Ve.push(mn); + } else { + for (let gr = 0; gr < ut; gr++) Ve.push(we[Ke + gr]); + if (Kt > 1) + for (const gr of Bt) { + const Ur = gr * ut; + if (!(we[Ur + 2] <= U)) { + we[Ur + 2] = U; + for (let nn = 0; nn < ut; nn++) + Ve.push(we[Ur + nn]); + } + } + } + } + return Ve; + } + _getOriginId(V) { + return (V - this.points.length) >> 5; + } + _getOriginZoom(V) { + return (V - this.points.length) % 32; + } + _map(V, U, Y) { + if (V[U + 5] > 1) { + const Se = this.clusterProps[V[U + 6]]; + return Y ? Object.assign({}, Se) : Se; + } + const ie = this.points[V[U + 3]].properties, + pe = this.options.map(ie); + return Y && pe === ie ? Object.assign({}, pe) : pe; + } + } + function ke(ue, V, U) { + return { + type: "Feature", + id: ue[V + 3], + properties: vt(ue, V, U), + geometry: { + type: "Point", + coordinates: [ + ((Y = ue[V]), 360 * (Y - 0.5)), + he(ue[V + 1]), + ], + }, + }; + var Y; + } + function vt(ue, V, U) { + const Y = ue[V + 5], + ie = + Y >= 1e4 + ? `${Math.round(Y / 1e3)}k` + : Y >= 1e3 + ? Math.round(Y / 100) / 10 + "k" + : Y, + pe = ue[V + 6], + Se = pe === -1 ? {} : Object.assign({}, U[pe]); + return Object.assign(Se, { + cluster: !0, + cluster_id: ue[V + 3], + point_count: Y, + point_count_abbreviated: ie, + }); + } + function ee(ue) { + return ue / 360 + 0.5; + } + function re(ue) { + const V = Math.sin((ue * Math.PI) / 180), + U = 0.5 - (0.25 * Math.log((1 + V) / (1 - V))) / Math.PI; + return U < 0 ? 0 : U > 1 ? 1 : U; + } + function he(ue) { + const V = ((180 - 360 * ue) * Math.PI) / 180; + return (360 * Math.atan(Math.exp(V))) / Math.PI - 90; + } + function oe(ue, V, U, Y) { + let ie = Y; + const pe = V + ((U - V) >> 1); + let Se, + Me = U - V; + const we = ue[V], + Ve = ue[V + 1], + ut = ue[U], + Ke = ue[U + 1]; + for (let kt = V + 3; kt < U; kt += 3) { + const ye = ze(ue[kt], ue[kt + 1], we, Ve, ut, Ke); + if (ye > ie) (Se = kt), (ie = ye); + else if (ye === ie) { + const Bt = Math.abs(kt - pe); + Bt < Me && ((Se = kt), (Me = Bt)); + } + } + ie > Y && + (Se - V > 3 && oe(ue, V, Se, Y), + (ue[Se + 2] = ie), + U - Se > 3 && oe(ue, Se, U, Y)); + } + function ze(ue, V, U, Y, ie, pe) { + let Se = ie - U, + Me = pe - Y; + if (Se !== 0 || Me !== 0) { + const we = + ((ue - U) * Se + (V - Y) * Me) / (Se * Se + Me * Me); + we > 1 + ? ((U = ie), (Y = pe)) + : we > 0 && ((U += Se * we), (Y += Me * we)); + } + return (Se = ue - U), (Me = V - Y), Se * Se + Me * Me; + } + function je(ue, V, U, Y) { + const ie = { + id: ue ?? null, + type: V, + geometry: U, + tags: Y, + minX: 1 / 0, + minY: 1 / 0, + maxX: -1 / 0, + maxY: -1 / 0, + }; + if (V === "Point" || V === "MultiPoint" || V === "LineString") + pt(ie, U); + else if (V === "Polygon") pt(ie, U[0]); + else if (V === "MultiLineString") + for (const pe of U) pt(ie, pe); + else if (V === "MultiPolygon") + for (const pe of U) pt(ie, pe[0]); + return ie; + } + function pt(ue, V) { + for (let U = 0; U < V.length; U += 3) + (ue.minX = Math.min(ue.minX, V[U])), + (ue.minY = Math.min(ue.minY, V[U + 1])), + (ue.maxX = Math.max(ue.maxX, V[U])), + (ue.maxY = Math.max(ue.maxY, V[U + 1])); + } + function it(ue, V, U, Y) { + if (!V.geometry) return; + const ie = V.geometry.coordinates; + if (ie && ie.length === 0) return; + const pe = V.geometry.type, + Se = Math.pow(U.tolerance / ((1 << U.maxZoom) * U.extent), 2); + let Me = [], + we = V.id; + if ( + (U.promoteId + ? (we = V.properties[U.promoteId]) + : U.generateId && (we = Y || 0), + pe === "Point") + ) + ct(ie, Me); + else if (pe === "MultiPoint") for (const Ve of ie) ct(Ve, Me); + else if (pe === "LineString") It(ie, Me, Se, !1); + else if (pe === "MultiLineString") { + if (U.lineMetrics) { + for (const Ve of ie) + (Me = []), + It(Ve, Me, Se, !1), + ue.push(je(we, "LineString", Me, V.properties)); + return; + } + Dt(ie, Me, Se, !1); + } else if (pe === "Polygon") Dt(ie, Me, Se, !0); + else { + if (pe !== "MultiPolygon") { + if (pe === "GeometryCollection") { + for (const Ve of V.geometry.geometries) + it( + ue, + { id: we, geometry: Ve, properties: V.properties }, + U, + Y + ); + return; + } + throw new Error( + "Input data is not a valid GeoJSON object." + ); + } + for (const Ve of ie) { + const ut = []; + Dt(Ve, ut, Se, !0), Me.push(ut); + } + } + ue.push(je(we, pe, Me, V.properties)); + } + function ct(ue, V) { + V.push(at(ue[0]), dt(ue[1]), 0); + } + function It(ue, V, U, Y) { + let ie, + pe, + Se = 0; + for (let we = 0; we < ue.length; we++) { + const Ve = at(ue[we][0]), + ut = dt(ue[we][1]); + V.push(Ve, ut, 0), + we > 0 && + (Se += Y + ? (ie * ut - Ve * pe) / 2 + : Math.sqrt( + Math.pow(Ve - ie, 2) + Math.pow(ut - pe, 2) + )), + (ie = Ve), + (pe = ut); + } + const Me = V.length - 3; + (V[2] = 1), + oe(V, 0, Me, U), + (V[Me + 2] = 1), + (V.size = Math.abs(Se)), + (V.start = 0), + (V.end = V.size); + } + function Dt(ue, V, U, Y) { + for (let ie = 0; ie < ue.length; ie++) { + const pe = []; + It(ue[ie], pe, U, Y), V.push(pe); + } + } + function at(ue) { + return ue / 360 + 0.5; + } + function dt(ue) { + const V = Math.sin((ue * Math.PI) / 180), + U = 0.5 - (0.25 * Math.log((1 + V) / (1 - V))) / Math.PI; + return U < 0 ? 0 : U > 1 ? 1 : U; + } + function yt(ue, V, U, Y, ie, pe, Se, Me) { + if (((Y /= V), pe >= (U /= V) && Se < Y)) return ue; + if (Se < U || pe >= Y) return null; + const we = []; + for (const Ve of ue) { + const ut = Ve.geometry; + let Ke = Ve.type; + const kt = ie === 0 ? Ve.minX : Ve.minY, + ye = ie === 0 ? Ve.maxX : Ve.maxY; + if (kt >= U && ye < Y) { + we.push(Ve); + continue; + } + if (ye < U || kt >= Y) continue; + let Bt = []; + if (Ke === "Point" || Ke === "MultiPoint") + xt(ut, Bt, U, Y, ie); + else if (Ke === "LineString") + St(ut, Bt, U, Y, ie, !1, Me.lineMetrics); + else if (Ke === "MultiLineString") _t(ut, Bt, U, Y, ie, !1); + else if (Ke === "Polygon") _t(ut, Bt, U, Y, ie, !0); + else if (Ke === "MultiPolygon") + for (const rr of ut) { + const Kt = []; + _t(rr, Kt, U, Y, ie, !0), Kt.length && Bt.push(Kt); + } + if (Bt.length) { + if (Me.lineMetrics && Ke === "LineString") { + for (const rr of Bt) we.push(je(Ve.id, Ke, rr, Ve.tags)); + continue; + } + (Ke !== "LineString" && Ke !== "MultiLineString") || + (Bt.length === 1 + ? ((Ke = "LineString"), (Bt = Bt[0])) + : (Ke = "MultiLineString")), + (Ke !== "Point" && Ke !== "MultiPoint") || + (Ke = Bt.length === 3 ? "Point" : "MultiPoint"), + we.push(je(Ve.id, Ke, Bt, Ve.tags)); + } + } + return we.length ? we : null; + } + function xt(ue, V, U, Y, ie) { + for (let pe = 0; pe < ue.length; pe += 3) { + const Se = ue[pe + ie]; + Se >= U && Se <= Y && Lt(V, ue[pe], ue[pe + 1], ue[pe + 2]); + } + } + function St(ue, V, U, Y, ie, pe, Se) { + let Me = wt(ue); + const we = ie === 0 ? Rt : $t; + let Ve, + ut, + Ke = ue.start; + for (let Kt = 0; Kt < ue.length - 3; Kt += 3) { + const gr = ue[Kt], + Ur = ue[Kt + 1], + nn = ue[Kt + 2], + mn = ue[Kt + 3], + _n = ue[Kt + 4], + Vt = ie === 0 ? gr : Ur, + Et = ie === 0 ? mn : _n; + let dr = !1; + Se && + (Ve = Math.sqrt( + Math.pow(gr - mn, 2) + Math.pow(Ur - _n, 2) + )), + Vt < U + ? Et > U && + ((ut = we(Me, gr, Ur, mn, _n, U)), + Se && (Me.start = Ke + Ve * ut)) + : Vt > Y + ? Et < Y && + ((ut = we(Me, gr, Ur, mn, _n, Y)), + Se && (Me.start = Ke + Ve * ut)) + : Lt(Me, gr, Ur, nn), + Et < U && + Vt >= U && + ((ut = we(Me, gr, Ur, mn, _n, U)), (dr = !0)), + Et > Y && + Vt <= Y && + ((ut = we(Me, gr, Ur, mn, _n, Y)), (dr = !0)), + !pe && + dr && + (Se && (Me.end = Ke + Ve * ut), + V.push(Me), + (Me = wt(ue))), + Se && (Ke += Ve); + } + let kt = ue.length - 3; + const ye = ue[kt], + Bt = ue[kt + 1], + rr = ie === 0 ? ye : Bt; + rr >= U && rr <= Y && Lt(Me, ye, Bt, ue[kt + 2]), + (kt = Me.length - 3), + pe && + kt >= 3 && + (Me[kt] !== Me[0] || Me[kt + 1] !== Me[1]) && + Lt(Me, Me[0], Me[1], Me[2]), + Me.length && V.push(Me); + } + function wt(ue) { + const V = []; + return ( + (V.size = ue.size), (V.start = ue.start), (V.end = ue.end), V + ); + } + function _t(ue, V, U, Y, ie, pe) { + for (const Se of ue) St(Se, V, U, Y, ie, pe, !1); + } + function Lt(ue, V, U, Y) { + ue.push(V, U, Y); + } + function Rt(ue, V, U, Y, ie, pe) { + const Se = (pe - V) / (Y - V); + return Lt(ue, pe, U + (ie - U) * Se, 1), Se; + } + function $t(ue, V, U, Y, ie, pe) { + const Se = (pe - U) / (ie - U); + return Lt(ue, V + (Y - V) * Se, pe, 1), Se; + } + function tr(ue, V) { + const U = []; + for (let Y = 0; Y < ue.length; Y++) { + const ie = ue[Y], + pe = ie.type; + let Se; + if ( + pe === "Point" || + pe === "MultiPoint" || + pe === "LineString" + ) + Se = Qt(ie.geometry, V); + else if (pe === "MultiLineString" || pe === "Polygon") { + Se = []; + for (const Me of ie.geometry) Se.push(Qt(Me, V)); + } else if (pe === "MultiPolygon") { + Se = []; + for (const Me of ie.geometry) { + const we = []; + for (const Ve of Me) we.push(Qt(Ve, V)); + Se.push(we); + } + } + U.push(je(ie.id, pe, Se, ie.tags)); + } + return U; + } + function Qt(ue, V) { + const U = []; + (U.size = ue.size), + ue.start !== void 0 && + ((U.start = ue.start), (U.end = ue.end)); + for (let Y = 0; Y < ue.length; Y += 3) + U.push(ue[Y] + V, ue[Y + 1], ue[Y + 2]); + return U; + } + function Ot(ue, V) { + if (ue.transformed) return ue; + const U = 1 << ue.z, + Y = ue.x, + ie = ue.y; + for (const pe of ue.features) { + const Se = pe.geometry, + Me = pe.type; + if (((pe.geometry = []), Me === 1)) + for (let we = 0; we < Se.length; we += 2) + pe.geometry.push(Nt(Se[we], Se[we + 1], V, U, Y, ie)); + else + for (let we = 0; we < Se.length; we++) { + const Ve = []; + for (let ut = 0; ut < Se[we].length; ut += 2) + Ve.push(Nt(Se[we][ut], Se[we][ut + 1], V, U, Y, ie)); + pe.geometry.push(Ve); + } + } + return (ue.transformed = !0), ue; + } + function Nt(ue, V, U, Y, ie, pe) { + return [ + Math.round(U * (ue * Y - ie)), + Math.round(U * (V * Y - pe)), + ]; + } + function or(ue, V, U, Y, ie) { + const pe = + V === ie.maxZoom + ? 0 + : ie.tolerance / ((1 << V) * ie.extent), + Se = { + features: [], + numPoints: 0, + numSimplified: 0, + numFeatures: ue.length, + source: null, + x: U, + y: Y, + z: V, + transformed: !1, + minX: 2, + minY: 1, + maxX: -1, + maxY: 0, + }; + for (const Me of ue) cr(Se, Me, pe, ie); + return Se; + } + function cr(ue, V, U, Y) { + const ie = V.geometry, + pe = V.type, + Se = []; + if ( + ((ue.minX = Math.min(ue.minX, V.minX)), + (ue.minY = Math.min(ue.minY, V.minY)), + (ue.maxX = Math.max(ue.maxX, V.maxX)), + (ue.maxY = Math.max(ue.maxY, V.maxY)), + pe === "Point" || pe === "MultiPoint") + ) + for (let Me = 0; Me < ie.length; Me += 3) + Se.push(ie[Me], ie[Me + 1]), + ue.numPoints++, + ue.numSimplified++; + else if (pe === "LineString") Vr(Se, ie, ue, U, !1, !1); + else if (pe === "MultiLineString" || pe === "Polygon") + for (let Me = 0; Me < ie.length; Me++) + Vr(Se, ie[Me], ue, U, pe === "Polygon", Me === 0); + else if (pe === "MultiPolygon") + for (let Me = 0; Me < ie.length; Me++) { + const we = ie[Me]; + for (let Ve = 0; Ve < we.length; Ve++) + Vr(Se, we[Ve], ue, U, !0, Ve === 0); + } + if (Se.length) { + let Me = V.tags || null; + if (pe === "LineString" && Y.lineMetrics) { + Me = {}; + for (const Ve in V.tags) Me[Ve] = V.tags[Ve]; + (Me.mapbox_clip_start = ie.start / ie.size), + (Me.mapbox_clip_end = ie.end / ie.size); + } + const we = { + geometry: Se, + type: + pe === "Polygon" || pe === "MultiPolygon" + ? 3 + : pe === "LineString" || pe === "MultiLineString" + ? 2 + : 1, + tags: Me, + }; + V.id !== null && (we.id = V.id), ue.features.push(we); + } + } + function Vr(ue, V, U, Y, ie, pe) { + const Se = Y * Y; + if (Y > 0 && V.size < (ie ? Se : Y)) + return void (U.numPoints += V.length / 3); + const Me = []; + for (let we = 0; we < V.length; we += 3) + (Y === 0 || V[we + 2] > Se) && + (U.numSimplified++, Me.push(V[we], V[we + 1])), + U.numPoints++; + ie && + (function (we, Ve) { + let ut = 0; + for ( + let Ke = 0, kt = we.length, ye = kt - 2; + Ke < kt; + ye = Ke, Ke += 2 + ) + ut += (we[Ke] - we[ye]) * (we[Ke + 1] + we[ye + 1]); + if (ut > 0 === Ve) + for (let Ke = 0, kt = we.length; Ke < kt / 2; Ke += 2) { + const ye = we[Ke], + Bt = we[Ke + 1]; + (we[Ke] = we[kt - 2 - Ke]), + (we[Ke + 1] = we[kt - 1 - Ke]), + (we[kt - 2 - Ke] = ye), + (we[kt - 1 - Ke] = Bt); + } + })(Me, pe), + ue.push(Me); + } + const mr = { + maxZoom: 14, + indexMaxZoom: 5, + indexMaxPoints: 1e5, + tolerance: 3, + extent: 4096, + buffer: 64, + lineMetrics: !1, + promoteId: null, + generateId: !1, + debug: 0, + }; + class hr { + constructor(V, U) { + const Y = (U = this.options = + (function (pe, Se) { + for (const Me in Se) pe[Me] = Se[Me]; + return pe; + })(Object.create(mr), U)).debug; + if ( + (Y && console.time("preprocess data"), + U.maxZoom < 0 || U.maxZoom > 24) + ) + throw new Error("maxZoom should be in the 0-24 range"); + if (U.promoteId && U.generateId) + throw new Error( + "promoteId and generateId cannot be used together." + ); + let ie = (function (pe, Se) { + const Me = []; + if (pe.type === "FeatureCollection") + for (let we = 0; we < pe.features.length; we++) + it(Me, pe.features[we], Se, we); + else + it(Me, pe.type === "Feature" ? pe : { geometry: pe }, Se); + return Me; + })(V, U); + (this.tiles = {}), + (this.tileCoords = []), + Y && + (console.timeEnd("preprocess data"), + console.log( + "index: maxZoom: %d, maxPoints: %d", + U.indexMaxZoom, + U.indexMaxPoints + ), + console.time("generate tiles"), + (this.stats = {}), + (this.total = 0)), + (ie = (function (pe, Se) { + const Me = Se.buffer / Se.extent; + let we = pe; + const Ve = yt(pe, 1, -1 - Me, Me, 0, -1, 2, Se), + ut = yt(pe, 1, 1 - Me, 2 + Me, 0, -1, 2, Se); + return ( + (Ve || ut) && + ((we = yt(pe, 1, -Me, 1 + Me, 0, -1, 2, Se) || []), + Ve && (we = tr(Ve, 1).concat(we)), + ut && (we = we.concat(tr(ut, -1)))), + we + ); + })(ie, U)), + ie.length && this.splitTile(ie, 0, 0, 0), + Y && + (ie.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) + )); + } + splitTile(V, U, Y, ie, pe, Se, Me) { + const we = [V, U, Y, ie], + Ve = this.options, + ut = Ve.debug; + for (; we.length; ) { + (ie = we.pop()), + (Y = we.pop()), + (U = we.pop()), + (V = we.pop()); + const Ke = 1 << U, + kt = _r(U, Y, ie); + let ye = this.tiles[kt]; + if ( + !ye && + (ut > 1 && console.time("creation"), + (ye = this.tiles[kt] = or(V, U, Y, ie, Ve)), + this.tileCoords.push({ z: U, x: Y, y: ie }), + ut) + ) { + ut > 1 && + (console.log( + "tile z%d-%d-%d (features: %d, points: %d, simplified: %d)", + U, + Y, + ie, + ye.numFeatures, + ye.numPoints, + ye.numSimplified + ), + console.timeEnd("creation")); + const dr = `z${U}`; + (this.stats[dr] = (this.stats[dr] || 0) + 1), + this.total++; + } + if (((ye.source = V), pe == null)) { + if ( + U === Ve.indexMaxZoom || + ye.numPoints <= Ve.indexMaxPoints + ) + continue; + } else { + if (U === Ve.maxZoom || U === pe) continue; + if (pe != null) { + const dr = pe - U; + if (Y !== Se >> dr || ie !== Me >> dr) continue; + } + } + if (((ye.source = null), V.length === 0)) continue; + ut > 1 && console.time("clipping"); + const Bt = (0.5 * Ve.buffer) / Ve.extent, + rr = 0.5 - Bt, + Kt = 0.5 + Bt, + gr = 1 + Bt; + let Ur = null, + nn = null, + mn = null, + _n = null, + Vt = yt(V, Ke, Y - Bt, Y + Kt, 0, ye.minX, ye.maxX, Ve), + Et = yt(V, Ke, Y + rr, Y + gr, 0, ye.minX, ye.maxX, Ve); + (V = null), + Vt && + ((Ur = yt( + Vt, + Ke, + ie - Bt, + ie + Kt, + 1, + ye.minY, + ye.maxY, + Ve + )), + (nn = yt( + Vt, + Ke, + ie + rr, + ie + gr, + 1, + ye.minY, + ye.maxY, + Ve + )), + (Vt = null)), + Et && + ((mn = yt( + Et, + Ke, + ie - Bt, + ie + Kt, + 1, + ye.minY, + ye.maxY, + Ve + )), + (_n = yt( + Et, + Ke, + ie + rr, + ie + gr, + 1, + ye.minY, + ye.maxY, + Ve + )), + (Et = null)), + ut > 1 && console.timeEnd("clipping"), + we.push(Ur || [], U + 1, 2 * Y, 2 * ie), + we.push(nn || [], U + 1, 2 * Y, 2 * ie + 1), + we.push(mn || [], U + 1, 2 * Y + 1, 2 * ie), + we.push(_n || [], U + 1, 2 * Y + 1, 2 * ie + 1); + } + } + getTile(V, U, Y) { + (V = +V), (U = +U), (Y = +Y); + const ie = this.options, + { extent: pe, debug: Se } = ie; + if (V < 0 || V > 24) return null; + const Me = 1 << V, + we = _r(V, (U = (U + Me) & (Me - 1)), Y); + if (this.tiles[we]) return Ot(this.tiles[we], pe); + Se > 1 && console.log("drilling down to z%d-%d-%d", V, U, Y); + let Ve, + ut = V, + Ke = U, + kt = Y; + for (; !Ve && ut > 0; ) + ut--, + (Ke >>= 1), + (kt >>= 1), + (Ve = this.tiles[_r(ut, Ke, kt)]); + return Ve && Ve.source + ? (Se > 1 && + (console.log("found parent tile z%d-%d-%d", ut, Ke, kt), + console.time("drilling down")), + this.splitTile(Ve.source, ut, Ke, kt, V, U, Y), + Se > 1 && console.timeEnd("drilling down"), + this.tiles[we] ? Ot(this.tiles[we], pe) : null) + : null; + } + } + function _r(ue, V, U) { + return 32 * ((1 << ue) * U + V) + ue; + } + class Ir extends K { + constructor() { + super(...arguments), (this._dataUpdateable = new Map()); + } + loadVectorTile(V, U) { + return T._(this, void 0, void 0, function* () { + const Y = V.tileID.canonical; + if (!this._geoJSONIndex) + throw new Error( + "Unable to parse the data into a cluster or geojson" + ); + const ie = this._geoJSONIndex.getTile(Y.z, Y.x, Y.y); + if (!ie) return null; + const pe = new De(ie.features, { version: 2, extent: T.$ }); + let Se = (function (Me) { + const we = new T.cM(); + return ( + (function (Ve, ut) { + for (const Ke in Ve.layers) + ut.writeMessage(3, Ee, Ve.layers[Ke]); + })(Me, we), + we.finish() + ); + })(pe); + return ( + (Se.byteOffset === 0 && + Se.byteLength === Se.buffer.byteLength) || + (Se = new Uint8Array(Se)), + { vectorTile: pe, rawData: Se.buffer } + ); + }); + } + loadData(V) { + return T._(this, void 0, void 0, function* () { + var U; + (U = this._pendingRequest) === null || + U === void 0 || + U.abort(); + const Y = + !!(V && V.request && V.request.collectResourceTiming) && + new T.cN(V.request); + this._pendingRequest = new AbortController(); + try { + this._pendingData = this.loadAndProcessGeoJSON( + V, + this._pendingRequest + ); + const ie = yield this._pendingData; + (this._geoJSONIndex = V.cluster + ? new Ue( + (function ({ + superclusterOptions: Se, + clusterProperties: Me, + }) { + if (!Me || !Se) return Se; + const we = {}, + Ve = {}, + ut = { accumulated: null, zoom: 0 }, + Ke = { properties: null }, + kt = Object.keys(Me); + for (const ye of kt) { + const [Bt, rr] = Me[ye], + Kt = T.cT(rr), + gr = T.cT( + typeof Bt == "string" + ? [Bt, ["accumulated"], ["get", ye]] + : Bt + ); + (we[ye] = Kt.value), (Ve[ye] = gr.value); + } + return ( + (Se.map = (ye) => { + Ke.properties = ye; + const Bt = {}; + for (const rr of kt) + Bt[rr] = we[rr].evaluate(ut, Ke); + return Bt; + }), + (Se.reduce = (ye, Bt) => { + Ke.properties = Bt; + for (const rr of kt) + (ut.accumulated = ye[rr]), + (ye[rr] = Ve[rr].evaluate(ut, Ke)); + }), + Se + ); + })(V) + ).load(ie.features) + : (function (Se, Me) { + return new hr(Se, Me); + })(ie, V.geojsonVtOptions)), + (this.loaded = {}); + const pe = { data: ie }; + if (Y) { + const Se = Y.finish(); + Se && + ((pe.resourceTiming = {}), + (pe.resourceTiming[V.source] = JSON.parse( + JSON.stringify(Se) + ))); + } + return pe; + } catch (ie) { + if ((delete this._pendingRequest, T.cy(ie))) + return { abandoned: !0 }; + throw ie; + } + }); + } + getData() { + return T._(this, void 0, void 0, function* () { + return this._pendingData; + }); + } + reloadTile(V) { + const U = this.loaded; + return U && U[V.uid] ? super.reloadTile(V) : this.loadTile(V); + } + loadAndProcessGeoJSON(V, U) { + return T._(this, void 0, void 0, function* () { + let Y = yield this.loadGeoJSON(V, U); + if ((delete this._pendingRequest, typeof Y != "object")) + throw new Error( + `Input data given to '${V.source}' is not a valid GeoJSON object.` + ); + if ((Ie(Y, !0), V.filter)) { + const ie = T.cT(V.filter, { + type: "boolean", + "property-type": "data-driven", + overridable: !1, + transition: !1, + }); + if (ie.result === "error") + throw new Error( + ie.value + .map((Se) => `${Se.key}: ${Se.message}`) + .join(", ") + ); + Y = { + type: "FeatureCollection", + features: Y.features.filter((Se) => + ie.value.evaluate({ zoom: 0 }, Se) + ), + }; + } + return Y; + }); + } + loadGeoJSON(V, U) { + return T._(this, void 0, void 0, function* () { + const { promoteId: Y } = V; + if (V.request) { + const ie = yield T.j(V.request, U); + return ( + (this._dataUpdateable = T.cV(ie.data, Y) + ? T.cU(ie.data, Y) + : void 0), + ie.data + ); + } + if (typeof V.data == "string") + try { + const ie = JSON.parse(V.data); + return ( + (this._dataUpdateable = T.cV(ie, Y) + ? T.cU(ie, Y) + : void 0), + ie + ); + } catch { + throw new Error( + `Input data given to '${V.source}' is not a valid GeoJSON object.` + ); + } + if (!V.dataDiff) + throw new Error( + `Input data given to '${V.source}' is not a valid GeoJSON object.` + ); + if (!this._dataUpdateable) + throw new Error( + `Cannot update existing geojson data in ${V.source}` + ); + return ( + T.cW(this._dataUpdateable, V.dataDiff, Y), + { + type: "FeatureCollection", + features: Array.from(this._dataUpdateable.values()), + } + ); + }); + } + removeSource(V) { + return T._(this, void 0, void 0, function* () { + this._pendingRequest && this._pendingRequest.abort(); + }); + } + getClusterExpansionZoom(V) { + return this._geoJSONIndex.getClusterExpansionZoom( + V.clusterId + ); + } + getClusterChildren(V) { + return this._geoJSONIndex.getChildren(V.clusterId); + } + getClusterLeaves(V) { + return this._geoJSONIndex.getLeaves( + V.clusterId, + V.limit, + V.offset + ); + } + } + class qr { + constructor(V) { + (this.self = V), + (this.actor = new T.J(V)), + (this.layerIndexes = {}), + (this.availableImages = {}), + (this.workerSources = {}), + (this.demWorkerSources = {}), + (this.externalWorkerSourceTypes = {}), + (this.self.registerWorkerSource = (U, Y) => { + if (this.externalWorkerSourceTypes[U]) + throw new Error( + `Worker source with name "${U}" already registered.` + ); + this.externalWorkerSourceTypes[U] = Y; + }), + (this.self.addProtocol = T.cA), + (this.self.removeProtocol = T.cB), + (this.self.registerRTLTextPlugin = (U) => { + T.cX.setMethods(U); + }), + this.actor.registerMessageHandler("LDT", (U, Y) => + this._getDEMWorkerSource(U, Y.source).loadTile(Y) + ), + this.actor.registerMessageHandler("RDT", (U, Y) => + T._(this, void 0, void 0, function* () { + this._getDEMWorkerSource(U, Y.source).removeTile(Y); + }) + ), + this.actor.registerMessageHandler("GCEZ", (U, Y) => + T._(this, void 0, void 0, function* () { + return this._getWorkerSource( + U, + Y.type, + Y.source + ).getClusterExpansionZoom(Y); + }) + ), + this.actor.registerMessageHandler("GCC", (U, Y) => + T._(this, void 0, void 0, function* () { + return this._getWorkerSource( + U, + Y.type, + Y.source + ).getClusterChildren(Y); + }) + ), + this.actor.registerMessageHandler("GCL", (U, Y) => + T._(this, void 0, void 0, function* () { + return this._getWorkerSource( + U, + Y.type, + Y.source + ).getClusterLeaves(Y); + }) + ), + this.actor.registerMessageHandler("LD", (U, Y) => + this._getWorkerSource(U, Y.type, Y.source).loadData(Y) + ), + this.actor.registerMessageHandler("GD", (U, Y) => + this._getWorkerSource(U, Y.type, Y.source).getData() + ), + this.actor.registerMessageHandler("LT", (U, Y) => + this._getWorkerSource(U, Y.type, Y.source).loadTile(Y) + ), + this.actor.registerMessageHandler("RT", (U, Y) => + this._getWorkerSource(U, Y.type, Y.source).reloadTile(Y) + ), + this.actor.registerMessageHandler("AT", (U, Y) => + this._getWorkerSource(U, Y.type, Y.source).abortTile(Y) + ), + this.actor.registerMessageHandler("RMT", (U, Y) => + this._getWorkerSource(U, Y.type, Y.source).removeTile(Y) + ), + this.actor.registerMessageHandler("RS", (U, Y) => + T._(this, void 0, void 0, function* () { + if ( + !this.workerSources[U] || + !this.workerSources[U][Y.type] || + !this.workerSources[U][Y.type][Y.source] + ) + return; + const ie = this.workerSources[U][Y.type][Y.source]; + delete this.workerSources[U][Y.type][Y.source], + ie.removeSource !== void 0 && ie.removeSource(Y); + }) + ), + this.actor.registerMessageHandler("RM", (U) => + T._(this, void 0, void 0, function* () { + delete this.layerIndexes[U], + delete this.availableImages[U], + delete this.workerSources[U], + delete this.demWorkerSources[U]; + }) + ), + this.actor.registerMessageHandler("SR", (U, Y) => + T._(this, void 0, void 0, function* () { + this.referrer = Y; + }) + ), + this.actor.registerMessageHandler("SRPS", (U, Y) => + this._syncRTLPluginState(U, Y) + ), + this.actor.registerMessageHandler("IS", (U, Y) => + T._(this, void 0, void 0, function* () { + this.self.importScripts(Y); + }) + ), + this.actor.registerMessageHandler("SI", (U, Y) => + this._setImages(U, Y) + ), + this.actor.registerMessageHandler("UL", (U, Y) => + T._(this, void 0, void 0, function* () { + this._getLayerIndex(U).update(Y.layers, Y.removedIds); + }) + ), + this.actor.registerMessageHandler("SL", (U, Y) => + T._(this, void 0, void 0, function* () { + this._getLayerIndex(U).replace(Y); + }) + ); + } + _setImages(V, U) { + return T._(this, void 0, void 0, function* () { + this.availableImages[V] = U; + for (const Y in this.workerSources[V]) { + const ie = this.workerSources[V][Y]; + for (const pe in ie) ie[pe].availableImages = U; + } + }); + } + _syncRTLPluginState(V, U) { + return T._(this, void 0, void 0, function* () { + return yield T.cX.syncState(U, this.self.importScripts); + }); + } + _getAvailableImages(V) { + let U = this.availableImages[V]; + return U || (U = []), U; + } + _getLayerIndex(V) { + let U = this.layerIndexes[V]; + return U || (U = this.layerIndexes[V] = new s()), U; + } + _getWorkerSource(V, U, Y) { + if ( + (this.workerSources[V] || (this.workerSources[V] = {}), + this.workerSources[V][U] || (this.workerSources[V][U] = {}), + !this.workerSources[V][U][Y]) + ) { + const ie = { + sendAsync: (pe, Se) => ( + (pe.targetMapId = V), this.actor.sendAsync(pe, Se) + ), + }; + switch (U) { + case "vector": + this.workerSources[V][U][Y] = new K( + ie, + this._getLayerIndex(V), + this._getAvailableImages(V) + ); + break; + case "geojson": + this.workerSources[V][U][Y] = new Ir( + ie, + this._getLayerIndex(V), + this._getAvailableImages(V) + ); + break; + default: + this.workerSources[V][U][Y] = + new this.externalWorkerSourceTypes[U]( + ie, + this._getLayerIndex(V), + this._getAvailableImages(V) + ); + } + } + return this.workerSources[V][U][Y]; + } + _getDEMWorkerSource(V, U) { + return ( + this.demWorkerSources[V] || (this.demWorkerSources[V] = {}), + this.demWorkerSources[V][U] || + (this.demWorkerSources[V][U] = new ne()), + this.demWorkerSources[V][U] + ); + } + } + return T.i(self) && (self.worker = new qr(self)), qr; + }), + M("index", ["exports", "./shared"], function (T, s) { + var B = "5.6.2"; + function O() { + var h = new s.A(4); + return ( + s.A != Float32Array && ((h[1] = 0), (h[2] = 0)), + (h[0] = 1), + (h[3] = 1), + h + ); + } + let X, K; + const ne = { + now: + typeof performance < "u" && performance && performance.now + ? performance.now.bind(performance) + : Date.now.bind(Date), + frame(h, e, i) { + const l = requestAnimationFrame((d) => { + u(), e(d); + }), + { unsubscribe: u } = s.s( + h.signal, + "abort", + () => { + u(), cancelAnimationFrame(l), i(s.c()); + }, + !1 + ); + }, + frameAsync(h) { + return new Promise((e, i) => { + this.frame(h, e, i); + }); + }, + getImageData(h, e = 0) { + return this.getImageCanvasContext(h).getImageData( + -e, + -e, + h.width + 2 * e, + h.height + 2 * e + ); + }, + getImageCanvasContext(h) { + const e = window.document.createElement("canvas"), + i = e.getContext("2d", { willReadFrequently: !0 }); + if (!i) throw new Error("failed to create canvas 2d context"); + return ( + (e.width = h.width), + (e.height = h.height), + i.drawImage(h, 0, 0, h.width, h.height), + i + ); + }, + resolveURL: (h) => ( + X || (X = document.createElement("a")), (X.href = h), X.href + ), + hardwareConcurrency: + (typeof navigator < "u" && navigator.hardwareConcurrency) || + 4, + get prefersReducedMotion() { + return ( + !!matchMedia && + (K == null && + (K = matchMedia("(prefers-reduced-motion: reduce)")), + K.matches) + ); + }, + }; + class H { + static testProp(e) { + if (!H.docStyle) return e[0]; + for (let i = 0; i < e.length; i++) + if (e[i] in H.docStyle) return e[i]; + return e[0]; + } + static create(e, i, l) { + const u = window.document.createElement(e); + return ( + i !== void 0 && (u.className = i), l && l.appendChild(u), u + ); + } + static createNS(e, i) { + return window.document.createElementNS(e, i); + } + static disableDrag() { + H.docStyle && + H.selectProp && + ((H.userSelect = H.docStyle[H.selectProp]), + (H.docStyle[H.selectProp] = "none")); + } + static enableDrag() { + H.docStyle && + H.selectProp && + (H.docStyle[H.selectProp] = H.userSelect); + } + static setTransform(e, i) { + e.style[H.transformProp] = i; + } + static addEventListener(e, i, l, u = {}) { + e.addEventListener(i, l, "passive" in u ? u : u.capture); + } + static removeEventListener(e, i, l, u = {}) { + e.removeEventListener(i, l, "passive" in u ? u : u.capture); + } + static suppressClickInternal(e) { + e.preventDefault(), + e.stopPropagation(), + window.removeEventListener( + "click", + H.suppressClickInternal, + !0 + ); + } + static suppressClick() { + window.addEventListener("click", H.suppressClickInternal, !0), + window.setTimeout(() => { + window.removeEventListener( + "click", + H.suppressClickInternal, + !0 + ); + }, 0); + } + static getScale(e) { + const i = e.getBoundingClientRect(); + return { + x: i.width / e.offsetWidth || 1, + y: i.height / e.offsetHeight || 1, + boundingClientRect: i, + }; + } + static getPoint(e, i, l) { + const u = i.boundingClientRect; + return new s.P( + (l.clientX - u.left) / i.x - e.clientLeft, + (l.clientY - u.top) / i.y - e.clientTop + ); + } + static mousePos(e, i) { + const l = H.getScale(e); + return H.getPoint(e, l, i); + } + static touchPos(e, i) { + const l = [], + u = H.getScale(e); + for (let d = 0; d < i.length; d++) + l.push(H.getPoint(e, u, i[d])); + return l; + } + static mouseButton(e) { + return e.button; + } + static remove(e) { + e.parentNode && e.parentNode.removeChild(e); + } + static sanitize(e) { + const i = + new DOMParser().parseFromString(e, "text/html").body || + document.createElement("body"), + l = i.querySelectorAll("script"); + for (const u of l) u.remove(); + return H.clean(i), i.innerHTML; + } + static isPossiblyDangerous(e, i) { + const l = i.replace(/\s+/g, "").toLowerCase(); + return ( + !( + !["src", "href", "xlink:href"].includes(e) || + (!l.includes("javascript:") && !l.includes("data:")) + ) || + !!e.startsWith("on") || + void 0 + ); + } + static clean(e) { + const i = e.children; + for (const l of i) H.removeAttributes(l), H.clean(l); + } + static removeAttributes(e) { + for (const { name: i, value: l } of e.attributes) + H.isPossiblyDangerous(i, l) && e.removeAttribute(i); + } + } + (H.docStyle = + typeof window < "u" && + window.document && + window.document.documentElement.style), + (H.selectProp = H.testProp([ + "userSelect", + "MozUserSelect", + "WebkitUserSelect", + "msUserSelect", + ])), + (H.transformProp = H.testProp([ + "transform", + "WebkitTransform", + ])); + const fe = { + supported: !1, + testSupport: function (h) { + !Ae && Ie && (De ? Ee(h) : (ge = h)); + }, + }; + let ge, + Ie, + Ae = !1, + De = !1; + function Ee(h) { + const e = h.createTexture(); + h.bindTexture(h.TEXTURE_2D, e); + try { + if ( + (h.texImage2D( + h.TEXTURE_2D, + 0, + h.RGBA, + h.RGBA, + h.UNSIGNED_BYTE, + Ie + ), + h.isContextLost()) + ) + return; + fe.supported = !0; + } catch {} + h.deleteTexture(e), (Ae = !0); + } + var Fe; + typeof document < "u" && + ((Ie = document.createElement("img")), + (Ie.onload = () => { + ge && Ee(ge), (ge = null), (De = !0); + }), + (Ie.onerror = () => { + (Ae = !0), (ge = null); + }), + (Ie.src = + "data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=")), + (function (h) { + let e, i, l, u; + (h.resetRequestQueue = () => { + (e = []), (i = 0), (l = 0), (u = {}); + }), + (h.addThrottleControl = (C) => { + const P = l++; + return (u[P] = C), P; + }), + (h.removeThrottleControl = (C) => { + delete u[C], g(); + }), + (h.getImage = (C, P, E = !0) => + new Promise((R, D) => { + fe.supported && + (C.headers || (C.headers = {}), + (C.headers.accept = "image/webp,*/*")), + s.e(C, { type: "image" }), + e.push({ + abortController: P, + requestParameters: C, + supportImageRefresh: E, + state: "queued", + onError: (N) => { + D(N); + }, + onSuccess: (N) => { + R(N); + }, + }), + g(); + })); + const d = (C) => + s._(this, void 0, void 0, function* () { + C.state = "running"; + const { + requestParameters: P, + supportImageRefresh: E, + onError: R, + onSuccess: D, + abortController: N, + } = C, + G = + E === !1 && + !s.i(self) && + !s.g(P.url) && + (!P.headers || + Object.keys(P.headers).reduce( + (ae, ce) => ae && ce === "accept", + !0 + )); + i++; + const te = G ? w(P, N) : s.m(P, N); + try { + const ae = yield te; + delete C.abortController, + (C.state = "completed"), + ae.data instanceof HTMLImageElement || s.b(ae.data) + ? D(ae) + : ae.data && + D({ + data: yield ((Q = ae.data), + typeof createImageBitmap == "function" + ? s.f(Q) + : s.h(Q)), + cacheControl: ae.cacheControl, + expires: ae.expires, + }); + } catch (ae) { + delete C.abortController, R(ae); + } finally { + i--, g(); + } + var Q; + }), + g = () => { + const C = (() => { + for (const P of Object.keys(u)) if (u[P]()) return !0; + return !1; + })() + ? s.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME + : s.a.MAX_PARALLEL_IMAGE_REQUESTS; + for (let P = i; P < C && e.length > 0; P++) { + const E = e.shift(); + E.abortController.signal.aborted ? P-- : d(E); + } + }, + w = (C, P) => + new Promise((E, R) => { + const D = new Image(), + N = C.url, + G = C.credentials; + G && G === "include" + ? (D.crossOrigin = "use-credentials") + : ((G && G === "same-origin") || !s.d(N)) && + (D.crossOrigin = "anonymous"), + P.signal.addEventListener("abort", () => { + (D.src = ""), R(s.c()); + }), + (D.fetchPriority = "high"), + (D.onload = () => { + (D.onerror = D.onload = null), E({ data: D }); + }), + (D.onerror = () => { + (D.onerror = D.onload = null), + P.signal.aborted || + R( + 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." + ) + ); + }), + (D.src = N); + }); + })(Fe || (Fe = {})), + Fe.resetRequestQueue(); + class $e { + constructor(e) { + this._transformRequestFn = e ?? null; + } + transformRequest(e, i) { + return ( + (this._transformRequestFn && + this._transformRequestFn(e, i)) || { url: e } + ); + } + setTransformRequest(e) { + this._transformRequestFn = e; + } + } + function Je(h) { + const e = []; + if (typeof h == "string") e.push({ id: "default", url: h }); + else if (h && h.length > 0) { + const i = []; + for (const { id: l, url: u } of h) { + const d = `${l}${u}`; + i.indexOf(d) === -1 && + (i.push(d), e.push({ id: l, url: u })); + } + } + return e; + } + function qe(h, e, i) { + try { + const l = new URL(h); + return (l.pathname += `${e}${i}`), l.toString(); + } catch { + throw new Error( + `Invalid sprite URL "${h}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically` + ); + } + } + function Ze(h) { + const { userImage: e } = h; + return ( + !!(e && e.render && e.render()) && + (h.data.replace(new Uint8Array(e.data.buffer)), !0) + ); + } + class Qe extends s.E { + constructor() { + super(), + (this.images = {}), + (this.updatedImages = {}), + (this.callbackDispatchedThisFrame = {}), + (this.loaded = !1), + (this.requestors = []), + (this.patterns = {}), + (this.atlasImage = new s.R({ width: 1, height: 1 })), + (this.dirty = !0); + } + isLoaded() { + return this.loaded; + } + setLoaded(e) { + if (this.loaded !== e && ((this.loaded = e), e)) { + for (const { ids: i, promiseResolve: l } of this.requestors) + l(this._getImagesForIds(i)); + this.requestors = []; + } + } + getImage(e) { + const i = this.images[e]; + if (i && !i.data && i.spriteData) { + const l = i.spriteData; + (i.data = new s.R( + { width: l.width, height: l.height }, + l.context.getImageData(l.x, l.y, l.width, l.height).data + )), + (i.spriteData = null); + } + return i; + } + addImage(e, i) { + if (this.images[e]) + throw new Error( + `Image id ${e} already exist, use updateImage instead` + ); + this._validate(e, i) && (this.images[e] = i); + } + _validate(e, i) { + let l = !0; + const u = i.data || i.spriteData; + return ( + this._validateStretch(i.stretchX, u && u.width) || + (this.fire( + new s.k( + new Error(`Image "${e}" has invalid "stretchX" value`) + ) + ), + (l = !1)), + this._validateStretch(i.stretchY, u && u.height) || + (this.fire( + new s.k( + new Error(`Image "${e}" has invalid "stretchY" value`) + ) + ), + (l = !1)), + this._validateContent(i.content, i) || + (this.fire( + new s.k( + new Error(`Image "${e}" has invalid "content" value`) + ) + ), + (l = !1)), + l + ); + } + _validateStretch(e, i) { + if (!e) return !0; + let l = 0; + for (const u of e) { + if (u[0] < l || u[1] < u[0] || i < u[1]) return !1; + l = u[1]; + } + return !0; + } + _validateContent(e, i) { + if (!e) return !0; + if (e.length !== 4) return !1; + const l = i.spriteData, + u = (l && l.width) || i.data.width, + d = (l && l.height) || i.data.height; + return !( + e[0] < 0 || + u < e[0] || + e[1] < 0 || + d < e[1] || + e[2] < 0 || + u < e[2] || + e[3] < 0 || + d < e[3] || + e[2] < e[0] || + e[3] < e[1] + ); + } + updateImage(e, i, l = !0) { + const u = this.getImage(e); + if ( + l && + (u.data.width !== i.data.width || + u.data.height !== i.data.height) + ) + throw new Error( + `size mismatch between old image (${u.data.width}x${u.data.height}) and new image (${i.data.width}x${i.data.height}).` + ); + (i.version = u.version + 1), + (this.images[e] = i), + (this.updatedImages[e] = !0); + } + removeImage(e) { + const i = this.images[e]; + delete this.images[e], + delete this.patterns[e], + i.userImage && + i.userImage.onRemove && + i.userImage.onRemove(); + } + listImages() { + return Object.keys(this.images); + } + getImages(e) { + return new Promise((i, l) => { + let u = !0; + if (!this.isLoaded()) + for (const d of e) this.images[d] || (u = !1); + this.isLoaded() || u + ? i(this._getImagesForIds(e)) + : this.requestors.push({ ids: e, promiseResolve: i }); + }); + } + _getImagesForIds(e) { + const i = {}; + for (const l of e) { + let u = this.getImage(l); + u || + (this.fire(new s.l("styleimagemissing", { id: l })), + (u = this.getImage(l))), + u + ? (i[l] = { + data: u.data.clone(), + pixelRatio: u.pixelRatio, + sdf: u.sdf, + version: u.version, + stretchX: u.stretchX, + stretchY: u.stretchY, + content: u.content, + textFitWidth: u.textFitWidth, + textFitHeight: u.textFitHeight, + hasRenderCallback: !!( + u.userImage && u.userImage.render + ), + }) + : s.w( + `Image "${l}" 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 i; + } + getPixelSize() { + const { width: e, height: i } = this.atlasImage; + return { width: e, height: i }; + } + getPattern(e) { + const i = this.patterns[e], + l = this.getImage(e); + if (!l) return null; + if (i && i.position.version === l.version) return i.position; + if (i) i.position.version = l.version; + else { + const u = { + w: l.data.width + 2, + h: l.data.height + 2, + x: 0, + y: 0, + }, + d = new s.I(u, l); + this.patterns[e] = { bin: u, position: d }; + } + return this._updatePatternAtlas(), this.patterns[e].position; + } + bind(e) { + const i = e.gl; + this.atlasTexture + ? this.dirty && + (this.atlasTexture.update(this.atlasImage), + (this.dirty = !1)) + : (this.atlasTexture = new s.T(e, this.atlasImage, i.RGBA)), + this.atlasTexture.bind(i.LINEAR, i.CLAMP_TO_EDGE); + } + _updatePatternAtlas() { + const e = []; + for (const d in this.patterns) e.push(this.patterns[d].bin); + const { w: i, h: l } = s.p(e), + u = this.atlasImage; + u.resize({ width: i || 1, height: l || 1 }); + for (const d in this.patterns) { + const { bin: g } = this.patterns[d], + w = g.x + 1, + C = g.y + 1, + P = this.getImage(d).data, + E = P.width, + R = P.height; + s.R.copy( + P, + u, + { x: 0, y: 0 }, + { x: w, y: C }, + { width: E, height: R } + ), + s.R.copy( + P, + u, + { x: 0, y: R - 1 }, + { x: w, y: C - 1 }, + { width: E, height: 1 } + ), + s.R.copy( + P, + u, + { x: 0, y: 0 }, + { x: w, y: C + R }, + { width: E, height: 1 } + ), + s.R.copy( + P, + u, + { x: E - 1, y: 0 }, + { x: w - 1, y: C }, + { width: 1, height: R } + ), + s.R.copy( + P, + u, + { x: 0, y: 0 }, + { x: w + E, y: C }, + { width: 1, height: R } + ); + } + this.dirty = !0; + } + beginFrame() { + this.callbackDispatchedThisFrame = {}; + } + dispatchRenderCallbacks(e) { + for (const i of e) { + if (this.callbackDispatchedThisFrame[i]) continue; + this.callbackDispatchedThisFrame[i] = !0; + const l = this.getImage(i); + l || s.w(`Image with ID: "${i}" was not found`), + Ze(l) && this.updateImage(i, l); + } + } + } + const Le = 1e20; + function et(h, e, i, l, u, d, g, w, C) { + for (let P = e; P < e + l; P++) nt(h, i * d + P, d, u, g, w, C); + for (let P = i; P < i + u; P++) nt(h, P * d + e, 1, l, g, w, C); + } + function nt(h, e, i, l, u, d, g) { + (d[0] = 0), (g[0] = -Le), (g[1] = Le), (u[0] = h[e]); + for (let w = 1, C = 0, P = 0; w < l; w++) { + u[w] = h[e + w * i]; + const E = w * w; + do { + const R = d[C]; + P = (u[w] - u[R] + E - R * R) / (w - R) / 2; + } while (P <= g[C] && --C > -1); + C++, (d[C] = w), (g[C] = P), (g[C + 1] = Le); + } + for (let w = 0, C = 0; w < l; w++) { + for (; g[C + 1] < w; ) C++; + const P = d[C], + E = w - P; + h[e + w * i] = u[P] + E * E; + } + } + class Ue { + constructor(e, i) { + (this.requestManager = e), + (this.localIdeographFontFamily = i), + (this.entries = {}); + } + setURL(e) { + this.url = e; + } + getGlyphs(e) { + return s._(this, void 0, void 0, function* () { + const i = []; + for (const d in e) + for (const g of e[d]) + i.push(this._getAndCacheGlyphsPromise(d, g)); + const l = yield Promise.all(i), + u = {}; + for (const { stack: d, id: g, glyph: w } of l) + u[d] || (u[d] = {}), + (u[d][g] = w && { + id: w.id, + bitmap: w.bitmap.clone(), + metrics: w.metrics, + }); + return u; + }); + } + _getAndCacheGlyphsPromise(e, i) { + return s._(this, void 0, void 0, function* () { + let l = this.entries[e]; + l || + (l = this.entries[e] = + { glyphs: {}, requests: {}, ranges: {} }); + let u = l.glyphs[i]; + if (u !== void 0) return { stack: e, id: i, glyph: u }; + if (((u = this._tinySDF(l, e, i)), u)) + return (l.glyphs[i] = u), { stack: e, id: i, glyph: u }; + const d = Math.floor(i / 256); + if (256 * d > 65535) + throw new Error("glyphs > 65535 not supported"); + if (l.ranges[d]) return { stack: e, id: i, glyph: u }; + if (!this.url) throw new Error("glyphsUrl is not set"); + if (!l.requests[d]) { + const w = Ue.loadGlyphRange( + e, + d, + this.url, + this.requestManager + ); + l.requests[d] = w; + } + const g = yield l.requests[d]; + for (const w in g) + this._doesCharSupportLocalGlyph(+w) || + (l.glyphs[+w] = g[+w]); + return ( + (l.ranges[d] = !0), + { stack: e, id: i, glyph: g[i] || null } + ); + }); + } + _doesCharSupportLocalGlyph(e) { + return ( + !!this.localIdeographFontFamily && + (new RegExp( + "\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}", + "u" + ).test(String.fromCodePoint(e)) || + s.u["CJK Unified Ideographs"](e) || + s.u["Hangul Syllables"](e) || + s.u.Hiragana(e) || + s.u.Katakana(e) || + s.u["CJK Symbols and Punctuation"](e) || + s.u["Halfwidth and Fullwidth Forms"](e)) + ); + } + _tinySDF(e, i, l) { + const u = this.localIdeographFontFamily; + if (!u || !this._doesCharSupportLocalGlyph(l)) return; + let d = e.tinySDF; + if (!d) { + let w = "400"; + /bold/i.test(i) + ? (w = "900") + : /medium/i.test(i) + ? (w = "500") + : /light/i.test(i) && (w = "200"), + (d = e.tinySDF = + new Ue.TinySDF({ + fontSize: 48, + buffer: 6, + radius: 16, + cutoff: 0.25, + fontFamily: u, + fontWeight: w, + })); + } + const g = d.draw(String.fromCharCode(l)); + return { + id: l, + bitmap: new s.q( + { width: g.width || 60, height: g.height || 60 }, + g.data + ), + metrics: { + width: g.glyphWidth / 2 || 24, + height: g.glyphHeight / 2 || 24, + left: g.glyphLeft / 2 + 0.5 || 0, + top: g.glyphTop / 2 - 27.5 || -8, + advance: g.glyphAdvance / 2 || 24, + isDoubleResolution: !0, + }, + }; + } + } + (Ue.loadGlyphRange = function (h, e, i, l) { + return s._(this, void 0, void 0, function* () { + const u = 256 * e, + d = u + 255, + g = l.transformRequest( + i + .replace("{fontstack}", h) + .replace("{range}", `${u}-${d}`), + "Glyphs" + ), + w = yield s.n(g, new AbortController()); + if (!w || !w.data) + throw new Error( + `Could not load glyph range. range: ${e}, ${u}-${d}` + ); + const C = {}; + for (const P of s.o(w.data)) C[P.id] = P; + return C; + }); + }), + (Ue.TinySDF = class { + constructor({ + fontSize: h = 24, + buffer: e = 3, + radius: i = 8, + cutoff: l = 0.25, + fontFamily: u = "sans-serif", + fontWeight: d = "normal", + fontStyle: g = "normal", + lang: w = null, + } = {}) { + (this.buffer = e), + (this.cutoff = l), + (this.radius = i), + (this.lang = w); + const C = (this.size = h + 4 * e), + P = this._createCanvas(C), + E = (this.ctx = P.getContext("2d", { + willReadFrequently: !0, + })); + (E.font = `${g} ${d} ${h}px ${u}`), + (E.textBaseline = "alphabetic"), + (E.textAlign = "left"), + (E.fillStyle = "black"), + (this.gridOuter = new Float64Array(C * C)), + (this.gridInner = new Float64Array(C * C)), + (this.f = new Float64Array(C)), + (this.z = new Float64Array(C + 1)), + (this.v = new Uint16Array(C)); + } + _createCanvas(h) { + const e = document.createElement("canvas"); + return (e.width = e.height = h), e; + } + draw(h) { + const { + width: e, + actualBoundingBoxAscent: i, + actualBoundingBoxDescent: l, + actualBoundingBoxLeft: u, + actualBoundingBoxRight: d, + } = this.ctx.measureText(h), + g = Math.ceil(i), + w = Math.max( + 0, + Math.min(this.size - this.buffer, Math.ceil(d - u)) + ), + C = Math.min(this.size - this.buffer, g + Math.ceil(l)), + P = w + 2 * this.buffer, + E = C + 2 * this.buffer, + R = Math.max(P * E, 0), + D = new Uint8ClampedArray(R), + N = { + data: D, + width: P, + height: E, + glyphWidth: w, + glyphHeight: C, + glyphTop: g, + glyphLeft: 0, + glyphAdvance: e, + }; + if (w === 0 || C === 0) return N; + const { + ctx: G, + buffer: te, + gridInner: Q, + gridOuter: ae, + } = this; + this.lang && (G.lang = this.lang), + G.clearRect(te, te, w, C), + G.fillText(h, te, te + g); + const ce = G.getImageData(te, te, w, C); + ae.fill(Le, 0, R), Q.fill(0, 0, R); + for (let ve = 0; ve < C; ve++) + for (let me = 0; me < w; me++) { + const be = ce.data[4 * (ve * w + me) + 3] / 255; + if (be === 0) continue; + const Pe = (ve + te) * P + me + te; + if (be === 1) (ae[Pe] = 0), (Q[Pe] = Le); + else { + const _e = 0.5 - be; + (ae[Pe] = _e > 0 ? _e * _e : 0), + (Q[Pe] = _e < 0 ? _e * _e : 0); + } + } + et(ae, 0, 0, P, E, P, this.f, this.v, this.z), + et(Q, te, te, w, C, P, this.f, this.v, this.z); + for (let ve = 0; ve < R; ve++) { + const me = Math.sqrt(ae[ve]) - Math.sqrt(Q[ve]); + D[ve] = Math.round( + 255 - 255 * (me / this.radius + this.cutoff) + ); + } + return N; + } + }); + class ke { + constructor() { + this.specification = s.v.light.position; + } + possiblyEvaluate(e, i) { + return s.B(e.expression.evaluate(i)); + } + interpolate(e, i, l) { + return { + x: s.C.number(e.x, i.x, l), + y: s.C.number(e.y, i.y, l), + z: s.C.number(e.z, i.z, l), + }; + } + } + let vt; + class ee extends s.E { + constructor(e) { + super(), + (vt = + vt || + new s.r({ + anchor: new s.D(s.v.light.anchor), + position: new ke(), + color: new s.D(s.v.light.color), + intensity: new s.D(s.v.light.intensity), + })), + (this._transitionable = new s.t(vt)), + this.setLight(e), + (this._transitioning = + this._transitionable.untransitioned()); + } + getLight() { + return this._transitionable.serialize(); + } + setLight(e, i = {}) { + if (!this._validate(s.x, e, i)) + for (const l in e) { + const u = e[l]; + l.endsWith("-transition") + ? this._transitionable.setTransition(l.slice(0, -11), u) + : this._transitionable.setValue(l, u); + } + } + updateTransitions(e) { + this._transitioning = this._transitionable.transitioned( + e, + this._transitioning + ); + } + hasTransition() { + return this._transitioning.hasTransition(); + } + recalculate(e) { + this.properties = this._transitioning.possiblyEvaluate(e); + } + _validate(e, i, l) { + return ( + (!l || l.validate !== !1) && + s.y( + this, + e.call(s.z, { + value: i, + style: { glyphs: !0, sprite: !0 }, + styleSpec: s.v, + }) + ) + ); + } + } + const re = new s.r({ + "sky-color": new s.D(s.v.sky["sky-color"]), + "horizon-color": new s.D(s.v.sky["horizon-color"]), + "fog-color": new s.D(s.v.sky["fog-color"]), + "fog-ground-blend": new s.D(s.v.sky["fog-ground-blend"]), + "horizon-fog-blend": new s.D(s.v.sky["horizon-fog-blend"]), + "sky-horizon-blend": new s.D(s.v.sky["sky-horizon-blend"]), + "atmosphere-blend": new s.D(s.v.sky["atmosphere-blend"]), + }); + class he extends s.E { + constructor(e) { + super(), + (this._transitionable = new s.t(re)), + this.setSky(e), + (this._transitioning = + this._transitionable.untransitioned()), + this.recalculate(new s.F(0)); + } + setSky(e, i = {}) { + if (!this._validate(s.G, e, i)) { + e || + (e = { + "sky-color": "transparent", + "horizon-color": "transparent", + "fog-color": "transparent", + "fog-ground-blend": 1, + "atmosphere-blend": 0, + }); + for (const l in e) { + const u = e[l]; + l.endsWith("-transition") + ? this._transitionable.setTransition(l.slice(0, -11), u) + : this._transitionable.setValue(l, u); + } + } + } + getSky() { + return this._transitionable.serialize(); + } + updateTransitions(e) { + this._transitioning = this._transitionable.transitioned( + e, + this._transitioning + ); + } + hasTransition() { + return this._transitioning.hasTransition(); + } + recalculate(e) { + this.properties = this._transitioning.possiblyEvaluate(e); + } + _validate(e, i, l = {}) { + return ( + (l == null ? void 0 : l.validate) !== !1 && + s.y( + this, + e.call( + s.z, + s.e({ + value: i, + style: { glyphs: !0, sprite: !0 }, + styleSpec: s.v, + }) + ) + ) + ); + } + calculateFogBlendOpacity(e) { + return e < 60 ? 0 : e < 70 ? (e - 60) / 10 : 1; + } + } + class oe { + constructor(e, i) { + (this.width = e), + (this.height = i), + (this.nextRow = 0), + (this.data = new Uint8Array(this.width * this.height)), + (this.dashEntry = {}); + } + getDash(e, i) { + const l = e.join(",") + String(i); + return ( + this.dashEntry[l] || + (this.dashEntry[l] = this.addDash(e, i)), + this.dashEntry[l] + ); + } + getDashRanges(e, i, l) { + const u = []; + let d = e.length % 2 == 1 ? -e[e.length - 1] * l : 0, + g = e[0] * l, + w = !0; + u.push({ + left: d, + right: g, + isDash: w, + zeroLength: e[0] === 0, + }); + let C = e[0]; + for (let P = 1; P < e.length; P++) { + w = !w; + const E = e[P]; + (d = C * l), + (C += E), + (g = C * l), + u.push({ + left: d, + right: g, + isDash: w, + zeroLength: E === 0, + }); + } + return u; + } + addRoundDash(e, i, l) { + const u = i / 2; + for (let d = -l; d <= l; d++) { + const g = this.width * (this.nextRow + l + d); + let w = 0, + C = e[w]; + for (let P = 0; P < this.width; P++) { + P / C.right > 1 && (C = e[++w]); + const E = Math.abs(P - C.left), + R = Math.abs(P - C.right), + D = Math.min(E, R); + let N; + const G = (d / l) * (u + 1); + if (C.isDash) { + const te = u - Math.abs(G); + N = Math.sqrt(D * D + te * te); + } else N = u - Math.sqrt(D * D + G * G); + this.data[g + P] = Math.max(0, Math.min(255, N + 128)); + } + } + } + addRegularDash(e) { + for (let w = e.length - 1; w >= 0; --w) { + const C = e[w], + P = e[w + 1]; + C.zeroLength + ? e.splice(w, 1) + : P && + P.isDash === C.isDash && + ((P.left = C.left), e.splice(w, 1)); + } + const i = e[0], + l = e[e.length - 1]; + i.isDash === l.isDash && + ((i.left = l.left - this.width), + (l.right = i.right + this.width)); + const u = this.width * this.nextRow; + let d = 0, + g = e[d]; + for (let w = 0; w < this.width; w++) { + w / g.right > 1 && (g = e[++d]); + const C = Math.abs(w - g.left), + P = Math.abs(w - g.right), + E = Math.min(C, P); + this.data[u + w] = Math.max( + 0, + Math.min(255, (g.isDash ? E : -E) + 128) + ); + } + } + addDash(e, i) { + const l = i ? 7 : 0, + u = 2 * l + 1; + if (this.nextRow + u > this.height) + return s.w("LineAtlas out of space"), null; + let d = 0; + for (let w = 0; w < e.length; w++) d += e[w]; + if (d !== 0) { + const w = this.width / d, + C = this.getDashRanges(e, this.width, w); + i ? this.addRoundDash(C, w, l) : this.addRegularDash(C); + } + const g = { + y: (this.nextRow + l + 0.5) / this.height, + height: (2 * l) / this.height, + width: d, + }; + return (this.nextRow += u), (this.dirty = !0), g; + } + bind(e) { + const i = e.gl; + this.texture + ? (i.bindTexture(i.TEXTURE_2D, this.texture), + this.dirty && + ((this.dirty = !1), + i.texSubImage2D( + i.TEXTURE_2D, + 0, + 0, + 0, + this.width, + this.height, + i.ALPHA, + i.UNSIGNED_BYTE, + this.data + ))) + : ((this.texture = i.createTexture()), + i.bindTexture(i.TEXTURE_2D, this.texture), + i.texParameteri(i.TEXTURE_2D, i.TEXTURE_WRAP_S, i.REPEAT), + i.texParameteri(i.TEXTURE_2D, i.TEXTURE_WRAP_T, i.REPEAT), + i.texParameteri( + i.TEXTURE_2D, + i.TEXTURE_MIN_FILTER, + i.LINEAR + ), + i.texParameteri( + i.TEXTURE_2D, + i.TEXTURE_MAG_FILTER, + i.LINEAR + ), + i.texImage2D( + i.TEXTURE_2D, + 0, + i.ALPHA, + this.width, + this.height, + 0, + i.ALPHA, + i.UNSIGNED_BYTE, + this.data + )); + } + } + const ze = "maplibre_preloaded_worker_pool"; + class je { + constructor() { + this.active = {}; + } + acquire(e) { + if (!this.workers) + for ( + this.workers = []; + this.workers.length < je.workerCount; + + ) + this.workers.push(new Worker(s.a.WORKER_URL)); + return (this.active[e] = !0), this.workers.slice(); + } + release(e) { + delete this.active[e], + this.numActive() === 0 && + (this.workers.forEach((i) => { + i.terminate(); + }), + (this.workers = null)); + } + isPreloaded() { + return !!this.active[ze]; + } + numActive() { + return Object.keys(this.active).length; + } + } + const pt = Math.floor(ne.hardwareConcurrency / 2); + let it, ct; + function It() { + return it || (it = new je()), it; + } + je.workerCount = s.H(globalThis) + ? Math.max(Math.min(pt, 3), 1) + : 1; + class Dt { + constructor(e, i) { + (this.workerPool = e), + (this.actors = []), + (this.currentActor = 0), + (this.id = i); + const l = this.workerPool.acquire(i); + for (let u = 0; u < l.length; u++) { + const d = new s.J(l[u], i); + (d.name = `Worker ${u}`), this.actors.push(d); + } + if (!this.actors.length) throw new Error("No actors found"); + } + broadcast(e, i) { + const l = []; + for (const u of this.actors) + l.push(u.sendAsync({ type: e, data: i })); + return Promise.all(l); + } + getActor() { + return ( + (this.currentActor = + (this.currentActor + 1) % this.actors.length), + this.actors[this.currentActor] + ); + } + remove(e = !0) { + this.actors.forEach((i) => { + i.remove(); + }), + (this.actors = []), + e && this.workerPool.release(this.id); + } + registerMessageHandler(e, i) { + for (const l of this.actors) l.registerMessageHandler(e, i); + } + } + function at() { + return ( + ct || + ((ct = new Dt(It(), s.K)), + ct.registerMessageHandler("GR", (h, e, i) => s.m(e, i))), + ct + ); + } + function dt(h, e) { + const i = s.L(); + return ( + s.M(i, i, [1, 1, 0]), + s.N(i, i, [0.5 * h.width, 0.5 * h.height, 1]), + h.calculatePosMatrix + ? s.O(i, i, h.calculatePosMatrix(e.toUnwrapped())) + : i + ); + } + function yt(h, e, i, l, u, d, g) { + var w; + const C = (function (D, N, G) { + if (D) + for (const te of D) { + const Q = N[te]; + if (Q && Q.source === G && Q.type === "fill-extrusion") + return !0; + } + else + for (const te in N) { + const Q = N[te]; + if (Q.source === G && Q.type === "fill-extrusion") + return !0; + } + return !1; + })( + (w = u == null ? void 0 : u.layers) !== null && w !== void 0 + ? w + : null, + e, + h.id + ), + P = d.maxPitchScaleFactor(), + E = h.tilesIn(l, P, C); + E.sort(xt); + const R = []; + for (const D of E) + R.push({ + wrappedTileID: D.tileID.wrapped().key, + queryResults: D.tile.queryRenderedFeatures( + e, + i, + h._state, + D.queryGeometry, + D.cameraQueryGeometry, + D.scale, + u, + d, + P, + dt(h.transform, D.tileID), + g ? (N, G) => g(D.tileID, N, G) : void 0 + ), + }); + return (function (D, N) { + for (const G in D) for (const te of D[G]) St(te, N); + return D; + })( + (function (D) { + const N = {}, + G = {}; + for (const te of D) { + const Q = te.queryResults, + ae = te.wrappedTileID, + ce = (G[ae] = G[ae] || {}); + for (const ve in Q) { + const me = Q[ve], + be = (ce[ve] = ce[ve] || {}), + Pe = (N[ve] = N[ve] || []); + for (const _e of me) + be[_e.featureIndex] || + ((be[_e.featureIndex] = !0), Pe.push(_e)); + } + } + return N; + })(R), + h + ); + } + function xt(h, e) { + const i = h.tileID, + l = e.tileID; + return ( + i.overscaledZ - l.overscaledZ || + i.canonical.y - l.canonical.y || + i.wrap - l.wrap || + i.canonical.x - l.canonical.x + ); + } + function St(h, e) { + const i = h.feature, + l = e.getFeatureState(i.layer["source-layer"], i.id); + (i.source = i.layer.source), + i.layer["source-layer"] && + (i.sourceLayer = i.layer["source-layer"]), + (i.state = l); + } + function wt(h, e, i) { + return s._(this, void 0, void 0, function* () { + let l = h; + if ( + (h.url + ? (l = (yield s.j(e.transformRequest(h.url, "Source"), i)) + .data) + : yield ne.frameAsync(i), + !l) + ) + return null; + const u = s.Q(s.e(l, h), [ + "tiles", + "minzoom", + "maxzoom", + "attribution", + "bounds", + "scheme", + "tileSize", + "encoding", + ]); + return ( + "vector_layers" in l && + l.vector_layers && + (u.vectorLayerIds = l.vector_layers.map((d) => d.id)), + u + ); + }); + } + class _t { + constructor(e, i) { + e && + (i + ? this.setSouthWest(e).setNorthEast(i) + : Array.isArray(e) && + (e.length === 4 + ? this.setSouthWest([e[0], e[1]]).setNorthEast([ + e[2], + e[3], + ]) + : this.setSouthWest(e[0]).setNorthEast(e[1]))); + } + setNorthEast(e) { + return ( + (this._ne = + e instanceof s.S + ? new s.S(e.lng, e.lat) + : s.S.convert(e)), + this + ); + } + setSouthWest(e) { + return ( + (this._sw = + e instanceof s.S + ? new s.S(e.lng, e.lat) + : s.S.convert(e)), + this + ); + } + extend(e) { + const i = this._sw, + l = this._ne; + let u, d; + if (e instanceof s.S) (u = e), (d = e); + else { + if (!(e instanceof _t)) + return Array.isArray(e) + ? e.length === 4 || e.every(Array.isArray) + ? this.extend(_t.convert(e)) + : this.extend(s.S.convert(e)) + : e && ("lng" in e || "lon" in e) && "lat" in e + ? this.extend(s.S.convert(e)) + : this; + if (((u = e._sw), (d = e._ne), !u || !d)) return this; + } + return ( + i || l + ? ((i.lng = Math.min(u.lng, i.lng)), + (i.lat = Math.min(u.lat, i.lat)), + (l.lng = Math.max(d.lng, l.lng)), + (l.lat = Math.max(d.lat, l.lat))) + : ((this._sw = new s.S(u.lng, u.lat)), + (this._ne = new s.S(d.lng, d.lat))), + this + ); + } + getCenter() { + return new s.S( + (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 s.S(this.getWest(), this.getNorth()); + } + getSouthEast() { + return new s.S(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(e) { + const { lng: i, lat: l } = s.S.convert(e); + let u = this._sw.lng <= i && i <= this._ne.lng; + return ( + this._sw.lng > this._ne.lng && + (u = this._sw.lng >= i && i >= this._ne.lng), + this._sw.lat <= l && l <= this._ne.lat && u + ); + } + static convert(e) { + return e instanceof _t ? e : e && new _t(e); + } + static fromLngLat(e, i = 0) { + const l = (360 * i) / 40075017, + u = l / Math.cos((Math.PI / 180) * e.lat); + return new _t( + new s.S(e.lng - u, e.lat - l), + new s.S(e.lng + u, e.lat + l) + ); + } + adjustAntiMeridian() { + const e = new s.S(this._sw.lng, this._sw.lat), + i = new s.S(this._ne.lng, this._ne.lat); + return new _t( + e, + e.lng > i.lng ? new s.S(i.lng + 360, i.lat) : i + ); + } + } + class Lt { + constructor(e, i, l) { + (this.bounds = _t.convert(this.validateBounds(e))), + (this.minzoom = i || 0), + (this.maxzoom = l || 24); + } + validateBounds(e) { + return Array.isArray(e) && e.length === 4 + ? [ + Math.max(-180, e[0]), + Math.max(-90, e[1]), + Math.min(180, e[2]), + Math.min(90, e[3]), + ] + : [-180, -90, 180, 90]; + } + contains(e) { + const i = Math.pow(2, e.z), + l = Math.floor(s.V(this.bounds.getWest()) * i), + u = Math.floor(s.U(this.bounds.getNorth()) * i), + d = Math.ceil(s.V(this.bounds.getEast()) * i), + g = Math.ceil(s.U(this.bounds.getSouth()) * i); + return e.x >= l && e.x < d && e.y >= u && e.y < g; + } + } + class Rt extends s.E { + constructor(e, i, l, u) { + if ( + (super(), + (this.id = e), + (this.dispatcher = l), + (this.type = "vector"), + (this.minzoom = 0), + (this.maxzoom = 22), + (this.scheme = "xyz"), + (this.tileSize = 512), + (this.reparseOverscaled = !0), + (this.isTileClipped = !0), + (this._loaded = !1), + s.e( + this, + s.Q(i, ["url", "scheme", "tileSize", "promoteId"]) + ), + (this._options = s.e({ type: "vector" }, i)), + (this._collectResourceTiming = i.collectResourceTiming), + this.tileSize !== 512) + ) + throw new Error( + "vector tile sources must have a tileSize of 512" + ); + this.setEventedParent(u); + } + load() { + return s._(this, void 0, void 0, function* () { + (this._loaded = !1), + this.fire(new s.l("dataloading", { dataType: "source" })), + (this._tileJSONRequest = new AbortController()); + try { + const e = yield wt( + this._options, + this.map._requestManager, + this._tileJSONRequest + ); + (this._tileJSONRequest = null), + (this._loaded = !0), + this.map.style.sourceCaches[this.id].clearTiles(), + e && + (s.e(this, e), + e.bounds && + (this.tileBounds = new Lt( + e.bounds, + this.minzoom, + this.maxzoom + )), + this.fire( + new s.l("data", { + dataType: "source", + sourceDataType: "metadata", + }) + ), + this.fire( + new s.l("data", { + dataType: "source", + sourceDataType: "content", + }) + )); + } catch (e) { + (this._tileJSONRequest = null), this.fire(new s.k(e)); + } + }); + } + loaded() { + return this._loaded; + } + hasTile(e) { + return ( + !this.tileBounds || this.tileBounds.contains(e.canonical) + ); + } + onAdd(e) { + (this.map = e), this.load(); + } + setSourceProperty(e) { + this._tileJSONRequest && this._tileJSONRequest.abort(), + e(), + this.load(); + } + setTiles(e) { + return ( + this.setSourceProperty(() => { + this._options.tiles = e; + }), + this + ); + } + setUrl(e) { + return ( + this.setSourceProperty(() => { + (this.url = e), (this._options.url = e); + }), + this + ); + } + onRemove() { + this._tileJSONRequest && + (this._tileJSONRequest.abort(), + (this._tileJSONRequest = null)); + } + serialize() { + return s.e({}, this._options); + } + loadTile(e) { + return s._(this, void 0, void 0, function* () { + const i = e.tileID.canonical.url( + this.tiles, + this.map.getPixelRatio(), + this.scheme + ), + l = { + request: this.map._requestManager.transformRequest( + i, + "Tile" + ), + uid: e.uid, + tileID: e.tileID, + zoom: e.tileID.overscaledZ, + tileSize: this.tileSize * e.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, + globalState: this.map.getGlobalState(), + }; + l.request.collectResourceTiming = + this._collectResourceTiming; + let u = "RT"; + if (e.actor && e.state !== "expired") { + if (e.state === "loading") + return new Promise((d, g) => { + e.reloadPromise = { resolve: d, reject: g }; + }); + } else (e.actor = this.dispatcher.getActor()), (u = "LT"); + e.abortController = new AbortController(); + try { + const d = yield e.actor.sendAsync( + { type: u, data: l }, + e.abortController + ); + if ((delete e.abortController, e.aborted)) return; + this._afterTileLoadWorkerResponse(e, d); + } catch (d) { + if ((delete e.abortController, e.aborted)) return; + if (d && d.status !== 404) throw d; + this._afterTileLoadWorkerResponse(e, null); + } + }); + } + _afterTileLoadWorkerResponse(e, i) { + if ( + (i && + i.resourceTiming && + (e.resourceTiming = i.resourceTiming), + i && this.map._refreshExpiredTiles && e.setExpiryData(i), + e.loadVectorData(i, this.map.painter), + e.reloadPromise) + ) { + const l = e.reloadPromise; + (e.reloadPromise = null), + this.loadTile(e).then(l.resolve).catch(l.reject); + } + } + abortTile(e) { + return s._(this, void 0, void 0, function* () { + e.abortController && + (e.abortController.abort(), delete e.abortController), + e.actor && + (yield e.actor.sendAsync({ + type: "AT", + data: { + uid: e.uid, + type: this.type, + source: this.id, + }, + })); + }); + } + unloadTile(e) { + return s._(this, void 0, void 0, function* () { + e.unloadVectorData(), + e.actor && + (yield e.actor.sendAsync({ + type: "RMT", + data: { + uid: e.uid, + type: this.type, + source: this.id, + }, + })); + }); + } + hasTransition() { + return !1; + } + } + class $t extends s.E { + constructor(e, i, l, u) { + super(), + (this.id = e), + (this.dispatcher = l), + this.setEventedParent(u), + (this.type = "raster"), + (this.minzoom = 0), + (this.maxzoom = 22), + (this.roundZoom = !0), + (this.scheme = "xyz"), + (this.tileSize = 512), + (this._loaded = !1), + (this._options = s.e({ type: "raster" }, i)), + s.e(this, s.Q(i, ["url", "scheme", "tileSize"])); + } + load() { + return s._(this, arguments, void 0, function* (e = !1) { + (this._loaded = !1), + this.fire(new s.l("dataloading", { dataType: "source" })), + (this._tileJSONRequest = new AbortController()); + try { + const i = yield wt( + this._options, + this.map._requestManager, + this._tileJSONRequest + ); + (this._tileJSONRequest = null), + (this._loaded = !0), + i && + (s.e(this, i), + i.bounds && + (this.tileBounds = new Lt( + i.bounds, + this.minzoom, + this.maxzoom + )), + this.fire( + new s.l("data", { + dataType: "source", + sourceDataType: "metadata", + }) + ), + this.fire( + new s.l("data", { + dataType: "source", + sourceDataType: "content", + sourceDataChanged: e, + }) + )); + } catch (i) { + (this._tileJSONRequest = null), this.fire(new s.k(i)); + } + }); + } + loaded() { + return this._loaded; + } + onAdd(e) { + (this.map = e), this.load(); + } + onRemove() { + this._tileJSONRequest && + (this._tileJSONRequest.abort(), + (this._tileJSONRequest = null)); + } + setSourceProperty(e) { + this._tileJSONRequest && + (this._tileJSONRequest.abort(), + (this._tileJSONRequest = null)), + e(), + this.load(!0); + } + setTiles(e) { + return ( + this.setSourceProperty(() => { + this._options.tiles = e; + }), + this + ); + } + setUrl(e) { + return ( + this.setSourceProperty(() => { + (this.url = e), (this._options.url = e); + }), + this + ); + } + serialize() { + return s.e({}, this._options); + } + hasTile(e) { + return ( + !this.tileBounds || this.tileBounds.contains(e.canonical) + ); + } + loadTile(e) { + return s._(this, void 0, void 0, function* () { + const i = e.tileID.canonical.url( + this.tiles, + this.map.getPixelRatio(), + this.scheme + ); + e.abortController = new AbortController(); + try { + const l = yield Fe.getImage( + this.map._requestManager.transformRequest(i, "Tile"), + e.abortController, + this.map._refreshExpiredTiles + ); + if ((delete e.abortController, e.aborted)) + return void (e.state = "unloaded"); + if (l && l.data) { + this.map._refreshExpiredTiles && + (l.cacheControl || l.expires) && + e.setExpiryData({ + cacheControl: l.cacheControl, + expires: l.expires, + }); + const u = this.map.painter.context, + d = u.gl, + g = l.data; + (e.texture = this.map.painter.getTileTexture(g.width)), + e.texture + ? e.texture.update(g, { useMipmap: !0 }) + : ((e.texture = new s.T(u, g, d.RGBA, { + useMipmap: !0, + })), + e.texture.bind( + d.LINEAR, + d.CLAMP_TO_EDGE, + d.LINEAR_MIPMAP_NEAREST + )), + (e.state = "loaded"); + } + } catch (l) { + if ((delete e.abortController, e.aborted)) + e.state = "unloaded"; + else if (l) throw ((e.state = "errored"), l); + } + }); + } + abortTile(e) { + return s._(this, void 0, void 0, function* () { + e.abortController && + (e.abortController.abort(), delete e.abortController); + }); + } + unloadTile(e) { + return s._(this, void 0, void 0, function* () { + e.texture && this.map.painter.saveTileTexture(e.texture); + }); + } + hasTransition() { + return !1; + } + } + class tr extends $t { + constructor(e, i, l, u) { + super(e, i, l, u), + (this.type = "raster-dem"), + (this.maxzoom = 22), + (this._options = s.e({ type: "raster-dem" }, i)), + (this.encoding = i.encoding || "mapbox"), + (this.redFactor = i.redFactor), + (this.greenFactor = i.greenFactor), + (this.blueFactor = i.blueFactor), + (this.baseShift = i.baseShift); + } + loadTile(e) { + return s._(this, void 0, void 0, function* () { + const i = e.tileID.canonical.url( + this.tiles, + this.map.getPixelRatio(), + this.scheme + ), + l = this.map._requestManager.transformRequest(i, "Tile"); + (e.neighboringTiles = this._getNeighboringTiles(e.tileID)), + (e.abortController = new AbortController()); + try { + const u = yield Fe.getImage( + l, + e.abortController, + this.map._refreshExpiredTiles + ); + if ((delete e.abortController, e.aborted)) + return void (e.state = "unloaded"); + if (u && u.data) { + const d = u.data; + this.map._refreshExpiredTiles && + (u.cacheControl || u.expires) && + e.setExpiryData({ + cacheControl: u.cacheControl, + expires: u.expires, + }); + const g = + s.b(d) && s.W() ? d : yield this.readImageNow(d), + w = { + type: this.type, + uid: e.uid, + source: this.id, + rawImageData: g, + encoding: this.encoding, + redFactor: this.redFactor, + greenFactor: this.greenFactor, + blueFactor: this.blueFactor, + baseShift: this.baseShift, + }; + if (!e.actor || e.state === "expired") { + e.actor = this.dispatcher.getActor(); + const C = yield e.actor.sendAsync({ + type: "LDT", + data: w, + }); + (e.dem = C), + (e.needsHillshadePrepare = !0), + (e.needsTerrainPrepare = !0), + (e.state = "loaded"); + } + } + } catch (u) { + if ((delete e.abortController, e.aborted)) + e.state = "unloaded"; + else if (u) throw ((e.state = "errored"), u); + } + }); + } + readImageNow(e) { + return s._(this, void 0, void 0, function* () { + if (typeof VideoFrame < "u" && s.X()) { + const i = e.width + 2, + l = e.height + 2; + try { + return new s.R( + { width: i, height: l }, + yield s.Y(e, -1, -1, i, l) + ); + } catch {} + } + return ne.getImageData(e, 1); + }); + } + _getNeighboringTiles(e) { + const i = e.canonical, + l = Math.pow(2, i.z), + u = (i.x - 1 + l) % l, + d = i.x === 0 ? e.wrap - 1 : e.wrap, + g = (i.x + 1 + l) % l, + w = i.x + 1 === l ? e.wrap + 1 : e.wrap, + C = {}; + return ( + (C[new s.Z(e.overscaledZ, d, i.z, u, i.y).key] = { + backfilled: !1, + }), + (C[new s.Z(e.overscaledZ, w, i.z, g, i.y).key] = { + backfilled: !1, + }), + i.y > 0 && + ((C[new s.Z(e.overscaledZ, d, i.z, u, i.y - 1).key] = { + backfilled: !1, + }), + (C[ + new s.Z(e.overscaledZ, e.wrap, i.z, i.x, i.y - 1).key + ] = { backfilled: !1 }), + (C[new s.Z(e.overscaledZ, w, i.z, g, i.y - 1).key] = { + backfilled: !1, + })), + i.y + 1 < l && + ((C[new s.Z(e.overscaledZ, d, i.z, u, i.y + 1).key] = { + backfilled: !1, + }), + (C[ + new s.Z(e.overscaledZ, e.wrap, i.z, i.x, i.y + 1).key + ] = { backfilled: !1 }), + (C[new s.Z(e.overscaledZ, w, i.z, g, i.y + 1).key] = { + backfilled: !1, + })), + C + ); + } + unloadTile(e) { + return s._(this, void 0, void 0, function* () { + e.demTexture && + this.map.painter.saveTileTexture(e.demTexture), + e.fbo && (e.fbo.destroy(), delete e.fbo), + e.dem && delete e.dem, + delete e.neighboringTiles, + (e.state = "unloaded"), + e.actor && + (yield e.actor.sendAsync({ + type: "RDT", + data: { + type: this.type, + uid: e.uid, + source: this.id, + }, + })); + }); + } + } + class Qt extends s.E { + constructor(e, i, l, u) { + super(), + (this.id = e), + (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: i.data }), + (this.actor = l.getActor()), + this.setEventedParent(u), + (this._data = i.data), + (this._options = s.e({}, i)), + (this._collectResourceTiming = i.collectResourceTiming), + i.maxzoom !== void 0 && (this.maxzoom = i.maxzoom), + i.type && (this.type = i.type), + i.attribution && (this.attribution = i.attribution), + (this.promoteId = i.promoteId), + i.clusterMaxZoom !== void 0 && + this.maxzoom <= i.clusterMaxZoom && + s.w( + `The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${i.clusterMaxZoom}".` + ), + (this.workerOptions = s.e( + { + source: this.id, + cluster: i.cluster || !1, + geojsonVtOptions: { + buffer: this._pixelsToTileUnits( + i.buffer !== void 0 ? i.buffer : 128 + ), + tolerance: this._pixelsToTileUnits( + i.tolerance !== void 0 ? i.tolerance : 0.375 + ), + extent: s.$, + maxZoom: this.maxzoom, + lineMetrics: i.lineMetrics || !1, + generateId: i.generateId || !1, + }, + superclusterOptions: { + maxZoom: this._getClusterMaxZoom(i.clusterMaxZoom), + minPoints: Math.max(2, i.clusterMinPoints || 2), + extent: s.$, + radius: this._pixelsToTileUnits( + i.clusterRadius || 50 + ), + log: !1, + generateId: i.generateId || !1, + }, + clusterProperties: i.clusterProperties, + filter: i.filter, + }, + i.workerOptions + )), + typeof this.promoteId == "string" && + (this.workerOptions.promoteId = this.promoteId); + } + _pixelsToTileUnits(e) { + return e * (s.$ / this.tileSize); + } + _getClusterMaxZoom(e) { + const i = e ? Math.round(e) : this.maxzoom - 1; + return ( + Number.isInteger(e) || + e === void 0 || + s.w( + `Integer expected for option 'clusterMaxZoom': provided value "${e}" rounded to "${i}"` + ), + i + ); + } + load() { + return s._(this, void 0, void 0, function* () { + yield this._updateWorkerData(); + }); + } + onAdd(e) { + (this.map = e), this.load(); + } + setData(e) { + return ( + (this._data = e), + (this._pendingWorkerUpdate = { data: e }), + this._updateWorkerData(), + this + ); + } + updateData(e) { + return ( + (this._pendingWorkerUpdate.diff = s.a0( + this._pendingWorkerUpdate.diff, + e + )), + this._updateWorkerData(), + this + ); + } + getData() { + return s._(this, void 0, void 0, function* () { + const e = s.e({ type: this.type }, this.workerOptions); + return this.actor.sendAsync({ type: "GD", data: e }); + }); + } + getCoordinatesFromGeometry(e) { + return e.type === "GeometryCollection" + ? e.geometries.map((i) => i.coordinates).flat(1 / 0) + : e.coordinates.flat(1 / 0); + } + getBounds() { + return s._(this, void 0, void 0, function* () { + const e = new _t(), + i = yield this.getData(); + let l; + switch (i.type) { + case "FeatureCollection": + l = i.features + .map((u) => + this.getCoordinatesFromGeometry(u.geometry) + ) + .flat(1 / 0); + break; + case "Feature": + l = this.getCoordinatesFromGeometry(i.geometry); + break; + default: + l = this.getCoordinatesFromGeometry(i); + } + if (l.length == 0) return e; + for (let u = 0; u < l.length - 1; u += 2) + e.extend([l[u], l[u + 1]]); + return e; + }); + } + setClusterOptions(e) { + return ( + (this.workerOptions.cluster = e.cluster), + e && + (e.clusterRadius !== void 0 && + (this.workerOptions.superclusterOptions.radius = + this._pixelsToTileUnits(e.clusterRadius)), + e.clusterMaxZoom !== void 0 && + (this.workerOptions.superclusterOptions.maxZoom = + this._getClusterMaxZoom(e.clusterMaxZoom))), + this._updateWorkerData(), + this + ); + } + getClusterExpansionZoom(e) { + return this.actor.sendAsync({ + type: "GCEZ", + data: { type: this.type, clusterId: e, source: this.id }, + }); + } + getClusterChildren(e) { + return this.actor.sendAsync({ + type: "GCC", + data: { type: this.type, clusterId: e, source: this.id }, + }); + } + getClusterLeaves(e, i, l) { + return this.actor.sendAsync({ + type: "GCL", + data: { + type: this.type, + source: this.id, + clusterId: e, + limit: i, + offset: l, + }, + }); + } + _updateWorkerData() { + return s._(this, void 0, void 0, function* () { + if (this._isUpdatingWorker) return; + const { data: e, diff: i } = this._pendingWorkerUpdate; + if (!e && !i) + return void s.w( + `No data or diff provided to GeoJSONSource ${this.id}.` + ); + const l = s.e({ type: this.type }, this.workerOptions); + e + ? (typeof e == "string" + ? ((l.request = + this.map._requestManager.transformRequest( + ne.resolveURL(e), + "Source" + )), + (l.request.collectResourceTiming = + this._collectResourceTiming)) + : (l.data = JSON.stringify(e)), + (this._pendingWorkerUpdate.data = void 0)) + : i && + ((l.dataDiff = i), + (this._pendingWorkerUpdate.diff = void 0)), + (this._isUpdatingWorker = !0), + this.fire(new s.l("dataloading", { dataType: "source" })); + try { + const u = yield this.actor.sendAsync({ + type: "LD", + data: l, + }); + if ( + ((this._isUpdatingWorker = !1), + this._removed || u.abandoned) + ) + return void this.fire( + new s.l("dataabort", { dataType: "source" }) + ); + this._data = u.data; + let d = null; + u.resourceTiming && + u.resourceTiming[this.id] && + (d = u.resourceTiming[this.id].slice(0)); + const g = { dataType: "source" }; + this._collectResourceTiming && + d && + d.length > 0 && + s.e(g, { resourceTiming: d }), + this.fire( + new s.l( + "data", + Object.assign(Object.assign({}, g), { + sourceDataType: "metadata", + }) + ) + ), + this.fire( + new s.l( + "data", + Object.assign(Object.assign({}, g), { + sourceDataType: "content", + }) + ) + ); + } catch (u) { + if (((this._isUpdatingWorker = !1), this._removed)) + return void this.fire( + new s.l("dataabort", { dataType: "source" }) + ); + this.fire(new s.k(u)); + } finally { + (this._pendingWorkerUpdate.data || + this._pendingWorkerUpdate.diff) && + this._updateWorkerData(); + } + }); + } + loaded() { + return ( + !this._isUpdatingWorker && + this._pendingWorkerUpdate.data === void 0 && + this._pendingWorkerUpdate.diff === void 0 + ); + } + loadTile(e) { + return s._(this, void 0, void 0, function* () { + const i = e.actor ? "RT" : "LT"; + e.actor = this.actor; + const l = { + type: this.type, + uid: e.uid, + tileID: e.tileID, + zoom: e.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, + globalState: this.map.getGlobalState(), + }; + e.abortController = new AbortController(); + const u = yield this.actor.sendAsync( + { type: i, data: l }, + e.abortController + ); + delete e.abortController, + e.unloadVectorData(), + e.aborted || + e.loadVectorData(u, this.map.painter, i === "RT"); + }); + } + abortTile(e) { + return s._(this, void 0, void 0, function* () { + e.abortController && + (e.abortController.abort(), delete e.abortController), + (e.aborted = !0); + }); + } + unloadTile(e) { + return s._(this, void 0, void 0, function* () { + e.unloadVectorData(), + yield this.actor.sendAsync({ + type: "RMT", + data: { uid: e.uid, type: this.type, source: this.id }, + }); + }); + } + onRemove() { + (this._removed = !0), + this.actor.sendAsync({ + type: "RS", + data: { type: this.type, source: this.id }, + }); + } + serialize() { + return s.e({}, this._options, { + type: this.type, + data: this._data, + }); + } + hasTransition() { + return !1; + } + } + class Ot extends s.E { + constructor(e, i, l, u) { + super(), + (this.flippedWindingOrder = !1), + (this.id = e), + (this.dispatcher = l), + (this.coordinates = i.coordinates), + (this.type = "image"), + (this.minzoom = 0), + (this.maxzoom = 22), + (this.tileSize = 512), + (this.tiles = {}), + (this._loaded = !1), + this.setEventedParent(u), + (this.options = i); + } + load(e) { + return s._(this, void 0, void 0, function* () { + (this._loaded = !1), + this.fire(new s.l("dataloading", { dataType: "source" })), + (this.url = this.options.url), + (this._request = new AbortController()); + try { + const i = yield Fe.getImage( + this.map._requestManager.transformRequest( + this.url, + "Image" + ), + this._request + ); + (this._request = null), + (this._loaded = !0), + i && + i.data && + ((this.image = i.data), + e && (this.coordinates = e), + this._finishLoading()); + } catch (i) { + (this._request = null), + (this._loaded = !0), + this.fire(new s.k(i)); + } + }); + } + loaded() { + return this._loaded; + } + updateImage(e) { + return e.url + ? (this._request && + (this._request.abort(), (this._request = null)), + (this.options.url = e.url), + this.load(e.coordinates).finally(() => { + this.texture = null; + }), + this) + : this; + } + _finishLoading() { + this.map && + (this.setCoordinates(this.coordinates), + this.fire( + new s.l("data", { + dataType: "source", + sourceDataType: "metadata", + }) + )); + } + onAdd(e) { + (this.map = e), this.load(); + } + onRemove() { + this._request && + (this._request.abort(), (this._request = null)); + } + setCoordinates(e) { + this.coordinates = e; + const i = e.map(s.a1.fromLngLat); + var l; + return ( + (this.tileID = (function (u) { + const d = s.a2.fromPoints(u), + g = d.width(), + w = d.height(), + C = Math.max(g, w), + P = Math.max(0, Math.floor(-Math.log(C) / Math.LN2)), + E = Math.pow(2, P); + return new s.a4( + P, + Math.floor(((d.minX + d.maxX) / 2) * E), + Math.floor(((d.minY + d.maxY) / 2) * E) + ); + })(i)), + (this.terrainTileRanges = + this._getOverlappingTileRanges(i)), + (this.minzoom = this.maxzoom = this.tileID.z), + (this.tileCoords = i.map((u) => + this.tileID.getTilePoint(u)._round() + )), + (this.flippedWindingOrder = + ((l = this.tileCoords)[1].x - l[0].x) * + (l[2].y - l[0].y) - + (l[1].y - l[0].y) * (l[2].x - l[0].x) < + 0), + this.fire( + new s.l("data", { + dataType: "source", + sourceDataType: "content", + }) + ), + this + ); + } + prepare() { + if (Object.keys(this.tiles).length === 0 || !this.image) + return; + const e = this.map.painter.context, + i = e.gl; + this.texture || + ((this.texture = new s.T(e, this.image, i.RGBA)), + this.texture.bind(i.LINEAR, i.CLAMP_TO_EDGE)); + let l = !1; + for (const u in this.tiles) { + const d = this.tiles[u]; + d.state !== "loaded" && + ((d.state = "loaded"), + (d.texture = this.texture), + (l = !0)); + } + l && + this.fire( + new s.l("data", { + dataType: "source", + sourceDataType: "idle", + sourceId: this.id, + }) + ); + } + loadTile(e) { + return s._(this, void 0, void 0, function* () { + this.tileID && this.tileID.equals(e.tileID.canonical) + ? ((this.tiles[String(e.tileID.wrap)] = e), + (e.buckets = {})) + : (e.state = "errored"); + }); + } + serialize() { + return { + type: "image", + url: this.options.url, + coordinates: this.coordinates, + }; + } + hasTransition() { + return !1; + } + _getOverlappingTileRanges(e) { + const { + minX: i, + minY: l, + maxX: u, + maxY: d, + } = s.a2.fromPoints(e), + g = {}; + for (let w = 0; w <= s.a3; w++) { + const C = Math.pow(2, w), + P = Math.floor(i * C), + E = Math.floor(l * C), + R = Math.floor(u * C), + D = Math.floor(d * C); + g[w] = { + minTileX: P, + minTileY: E, + maxTileX: R, + maxTileY: D, + }; + } + return g; + } + } + class Nt extends Ot { + constructor(e, i, l, u) { + super(e, i, l, u), + (this.roundZoom = !0), + (this.type = "video"), + (this.options = i); + } + load() { + return s._(this, void 0, void 0, function* () { + this._loaded = !1; + const e = this.options; + this.urls = []; + for (const i of e.urls) + this.urls.push( + this.map._requestManager.transformRequest(i, "Source") + .url + ); + try { + const i = yield s.a5(this.urls); + if (((this._loaded = !0), !i)) return; + (this.video = i), + (this.video.loop = !0), + this.video.addEventListener("playing", () => { + this.map.triggerRepaint(); + }), + this.map && this.video.play(), + this._finishLoading(); + } catch (i) { + this.fire(new s.k(i)); + } + }); + } + pause() { + this.video && this.video.pause(); + } + play() { + this.video && this.video.play(); + } + seek(e) { + if (this.video) { + const i = this.video.seekable; + e < i.start(0) || e > i.end(0) + ? this.fire( + new s.k( + new s.a6( + `sources.${this.id}`, + null, + `Playback for this video can be set only between the ${i.start( + 0 + )} and ${i.end(0)}-second mark.` + ) + ) + ) + : (this.video.currentTime = e); + } + } + getVideo() { + return this.video; + } + onAdd(e) { + this.map || + ((this.map = e), + this.load(), + this.video && + (this.video.play(), + this.setCoordinates(this.coordinates))); + } + prepare() { + if ( + Object.keys(this.tiles).length === 0 || + this.video.readyState < 2 + ) + return; + const e = this.map.painter.context, + i = e.gl; + this.texture + ? this.video.paused || + (this.texture.bind(i.LINEAR, i.CLAMP_TO_EDGE), + i.texSubImage2D( + i.TEXTURE_2D, + 0, + 0, + 0, + i.RGBA, + i.UNSIGNED_BYTE, + this.video + )) + : ((this.texture = new s.T(e, this.video, i.RGBA)), + this.texture.bind(i.LINEAR, i.CLAMP_TO_EDGE)); + let l = !1; + for (const u in this.tiles) { + const d = this.tiles[u]; + d.state !== "loaded" && + ((d.state = "loaded"), + (d.texture = this.texture), + (l = !0)); + } + l && + this.fire( + new s.l("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 or extends Ot { + constructor(e, i, l, u) { + super(e, i, l, u), + i.coordinates + ? (Array.isArray(i.coordinates) && + i.coordinates.length === 4 && + !i.coordinates.some( + (d) => + !Array.isArray(d) || + d.length !== 2 || + d.some((g) => typeof g != "number") + )) || + this.fire( + new s.k( + new s.a6( + `sources.${e}`, + null, + '"coordinates" property must be an array of 4 longitude/latitude array pairs' + ) + ) + ) + : this.fire( + new s.k( + new s.a6( + `sources.${e}`, + null, + 'missing required property "coordinates"' + ) + ) + ), + i.animate && + typeof i.animate != "boolean" && + this.fire( + new s.k( + new s.a6( + `sources.${e}`, + null, + 'optional "animate" property must be a boolean value' + ) + ) + ), + i.canvas + ? typeof i.canvas == "string" || + i.canvas instanceof HTMLCanvasElement || + this.fire( + new s.k( + new s.a6( + `sources.${e}`, + 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 s.k( + new s.a6( + `sources.${e}`, + null, + 'missing required property "canvas"' + ) + ) + ), + (this.options = i), + (this.animate = i.animate === void 0 || i.animate); + } + load() { + return s._(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 s.k( + 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(e) { + (this.map = e), + this.load(), + this.canvas && this.animate && this.play(); + } + onRemove() { + this.pause(); + } + prepare() { + let e = !1; + if ( + (this.canvas.width !== this.width && + ((this.width = this.canvas.width), (e = !0)), + this.canvas.height !== this.height && + ((this.height = this.canvas.height), (e = !0)), + this._hasInvalidDimensions() || + Object.keys(this.tiles).length === 0) + ) + return; + const i = this.map.painter.context, + l = i.gl; + this.texture + ? (e || this._playing) && + this.texture.update(this.canvas, { premultiply: !0 }) + : (this.texture = new s.T(i, this.canvas, l.RGBA, { + premultiply: !0, + })); + let u = !1; + for (const d in this.tiles) { + const g = this.tiles[d]; + g.state !== "loaded" && + ((g.state = "loaded"), + (g.texture = this.texture), + (u = !0)); + } + u && + this.fire( + new s.l("data", { + dataType: "source", + sourceDataType: "idle", + sourceId: this.id, + }) + ); + } + serialize() { + return { type: "canvas", coordinates: this.coordinates }; + } + hasTransition() { + return this._playing; + } + _hasInvalidDimensions() { + for (const e of [this.canvas.width, this.canvas.height]) + if (isNaN(e) || e <= 0) return !0; + return !1; + } + } + const cr = {}, + Vr = (h) => { + switch (h) { + case "geojson": + return Qt; + case "image": + return Ot; + case "raster": + return $t; + case "raster-dem": + return tr; + case "vector": + return Rt; + case "video": + return Nt; + case "canvas": + return or; + } + return cr[h]; + }, + mr = "RTLPluginLoaded"; + class hr extends s.E { + constructor() { + super(...arguments), + (this.status = "unavailable"), + (this.url = null), + (this.dispatcher = at()); + } + _syncState(e) { + return ( + (this.status = e), + this.dispatcher + .broadcast("SRPS", { + pluginStatus: e, + pluginURL: this.url, + }) + .catch((i) => { + throw ((this.status = "error"), i); + }) + ); + } + getRTLTextPluginStatus() { + return this.status; + } + clearRTLTextPlugin() { + (this.status = "unavailable"), (this.url = null); + } + setRTLTextPlugin(e) { + return s._(this, arguments, void 0, function* (i, l = !1) { + if (this.url) + throw new Error( + "setRTLTextPlugin cannot be called multiple times." + ); + if (((this.url = ne.resolveURL(i)), !this.url)) + throw new Error(`requested url ${i} is invalid`); + if (this.status === "unavailable") { + if (!l) return this._requestImport(); + (this.status = "deferred"), this._syncState(this.status); + } else if (this.status === "requested") return this._requestImport(); + }); + } + _requestImport() { + return s._(this, void 0, void 0, function* () { + yield this._syncState("loading"), + (this.status = "loaded"), + this.fire(new s.l(mr)); + }); + } + lazyLoad() { + this.status === "unavailable" + ? (this.status = "requested") + : this.status === "deferred" && this._requestImport(); + } + } + let _r = null; + function Ir() { + return _r || (_r = new hr()), _r; + } + class qr { + constructor(e, i) { + (this.timeAdded = 0), + (this.fadeEndTime = 0), + (this.tileID = e), + (this.uid = s.a7()), + (this.uses = 0), + (this.tileSize = i), + (this.buckets = {}), + (this.expirationTime = null), + (this.queryPadding = 0), + (this.hasSymbolBuckets = !1), + (this.hasRTLText = !1), + (this.dependencies = {}), + (this.rtt = []), + (this.rttCoords = {}), + (this.expiredRequestCount = 0), + (this.state = "loading"); + } + registerFadeDuration(e) { + const i = e + this.timeAdded; + i < this.fadeEndTime || (this.fadeEndTime = i); + } + wasRequested() { + return ( + this.state === "errored" || + this.state === "loaded" || + this.state === "reloading" + ); + } + clearTextures(e) { + this.demTexture && e.saveTileTexture(this.demTexture), + (this.demTexture = null); + } + loadVectorData(e, i, l) { + if ( + (this.hasData() && this.unloadVectorData(), + (this.state = "loaded"), + e) + ) { + e.featureIndex && + ((this.latestFeatureIndex = e.featureIndex), + e.rawTileData + ? ((this.latestRawTileData = e.rawTileData), + (this.latestFeatureIndex.rawTileData = e.rawTileData)) + : this.latestRawTileData && + (this.latestFeatureIndex.rawTileData = + this.latestRawTileData)), + (this.collisionBoxArray = e.collisionBoxArray), + (this.buckets = (function (u, d) { + const g = {}; + if (!d) return g; + for (const w of u) { + const C = w.layerIds + .map((P) => d.getLayer(P)) + .filter(Boolean); + if (C.length !== 0) { + (w.layers = C), + w.stateDependentLayerIds && + (w.stateDependentLayers = + w.stateDependentLayerIds.map( + (P) => C.filter((E) => E.id === P)[0] + )); + for (const P of C) g[P.id] = w; + } + } + return g; + })(e.buckets, i == null ? void 0 : i.style)), + (this.hasSymbolBuckets = !1); + for (const u in this.buckets) { + const d = this.buckets[u]; + if (d instanceof s.a9) { + if (((this.hasSymbolBuckets = !0), !l)) break; + d.justReloaded = !0; + } + } + if (((this.hasRTLText = !1), this.hasSymbolBuckets)) + for (const u in this.buckets) { + const d = this.buckets[u]; + if (d instanceof s.a9 && d.hasRTLText) { + (this.hasRTLText = !0), Ir().lazyLoad(); + break; + } + } + this.queryPadding = 0; + for (const u in this.buckets) { + const d = this.buckets[u]; + this.queryPadding = Math.max( + this.queryPadding, + i.style.getLayer(u).queryRadius(d) + ); + } + e.imageAtlas && (this.imageAtlas = e.imageAtlas), + e.glyphAtlasImage && + (this.glyphAtlasImage = e.glyphAtlasImage); + } else this.collisionBoxArray = new s.a8(); + } + unloadVectorData() { + for (const e in this.buckets) this.buckets[e].destroy(); + (this.buckets = {}), + this.imageAtlasTexture && this.imageAtlasTexture.destroy(), + this.imageAtlas && (this.imageAtlas = null), + this.glyphAtlasTexture && this.glyphAtlasTexture.destroy(), + (this.latestFeatureIndex = null), + (this.state = "unloaded"); + } + getBucket(e) { + return this.buckets[e.id]; + } + upload(e) { + for (const l in this.buckets) { + const u = this.buckets[l]; + u.uploadPending() && u.upload(e); + } + const i = e.gl; + this.imageAtlas && + !this.imageAtlas.uploaded && + ((this.imageAtlasTexture = new s.T( + e, + this.imageAtlas.image, + i.RGBA + )), + (this.imageAtlas.uploaded = !0)), + this.glyphAtlasImage && + ((this.glyphAtlasTexture = new s.T( + e, + this.glyphAtlasImage, + i.ALPHA + )), + (this.glyphAtlasImage = null)); + } + prepare(e) { + this.imageAtlas && + this.imageAtlas.patchUpdatedImages( + e, + this.imageAtlasTexture + ); + } + queryRenderedFeatures(e, i, l, u, d, g, w, C, P, E, R) { + return this.latestFeatureIndex && + this.latestFeatureIndex.rawTileData + ? this.latestFeatureIndex.query( + { + queryGeometry: u, + cameraQueryGeometry: d, + scale: g, + tileSize: this.tileSize, + pixelPosMatrix: E, + transform: C, + params: w, + queryPadding: this.queryPadding * P, + getElevation: R, + }, + e, + i, + l + ) + : {}; + } + querySourceFeatures(e, i) { + const l = this.latestFeatureIndex; + if (!l || !l.rawTileData) return; + const u = l.loadVTLayers(), + d = i && i.sourceLayer ? i.sourceLayer : "", + g = u._geojsonTileLayer || u[d]; + if (!g) return; + const w = s.aa(i && i.filter), + { z: C, x: P, y: E } = this.tileID.canonical, + R = { z: C, x: P, y: E }; + for (let D = 0; D < g.length; D++) { + const N = g.feature(D); + if (w.needGeometry) { + const Q = s.ab(N, !0); + if ( + !w.filter( + new s.F(this.tileID.overscaledZ), + Q, + this.tileID.canonical + ) + ) + continue; + } else if (!w.filter(new s.F(this.tileID.overscaledZ), N)) + continue; + const G = l.getId(N, d), + te = new s.ac(N, C, P, E, G); + (te.tile = R), e.push(te); + } + } + hasData() { + return ( + this.state === "loaded" || + this.state === "reloading" || + this.state === "expired" + ); + } + patternsLoaded() { + return ( + this.imageAtlas && + !!Object.keys(this.imageAtlas.patternPositions).length + ); + } + setExpiryData(e) { + const i = this.expirationTime; + if (e.cacheControl) { + const l = s.ad(e.cacheControl); + l["max-age"] && + (this.expirationTime = Date.now() + 1e3 * l["max-age"]); + } else e.expires && (this.expirationTime = new Date(e.expires).getTime()); + if (this.expirationTime) { + const l = Date.now(); + let u = !1; + if (this.expirationTime > l) u = !1; + else if (i) + if (this.expirationTime < i) u = !0; + else { + const d = this.expirationTime - i; + d + ? (this.expirationTime = l + Math.max(d, 3e4)) + : (u = !0); + } + else u = !0; + u + ? (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(e, i) { + if ( + !this.latestFeatureIndex || + !this.latestFeatureIndex.rawTileData || + Object.keys(e).length === 0 + ) + return; + const l = this.latestFeatureIndex.loadVTLayers(); + for (const u in this.buckets) { + if (!i.style.hasLayer(u)) continue; + const d = this.buckets[u], + g = d.layers[0].sourceLayer || "_geojsonTileLayer", + w = l[g], + C = e[g]; + if (!w || !C || Object.keys(C).length === 0) continue; + d.update( + C, + w, + (this.imageAtlas && this.imageAtlas.patternPositions) || + {} + ); + const P = i && i.style && i.style.getLayer(u); + P && + (this.queryPadding = Math.max( + this.queryPadding, + P.queryRadius(d) + )); + } + } + holdingForFade() { + return this.symbolFadeHoldUntil !== void 0; + } + symbolFadeFinished() { + return ( + !this.symbolFadeHoldUntil || + this.symbolFadeHoldUntil < ne.now() + ); + } + clearFadeHold() { + this.symbolFadeHoldUntil = void 0; + } + setHoldDuration(e) { + this.symbolFadeHoldUntil = ne.now() + e; + } + setDependencies(e, i) { + const l = {}; + for (const u of i) l[u] = !0; + this.dependencies[e] = l; + } + hasDependency(e, i) { + for (const l of e) { + const u = this.dependencies[l]; + if (u) { + for (const d of i) if (u[d]) return !0; + } + } + return !1; + } + } + class ue { + constructor(e, i) { + (this.max = e), (this.onRemove = i), this.reset(); + } + reset() { + for (const e in this.data) + for (const i of this.data[e]) + i.timeout && clearTimeout(i.timeout), + this.onRemove(i.value); + return (this.data = {}), (this.order = []), this; + } + add(e, i, l) { + const u = e.wrapped().key; + this.data[u] === void 0 && (this.data[u] = []); + const d = { value: i, timeout: void 0 }; + if ( + (l !== void 0 && + (d.timeout = setTimeout(() => { + this.remove(e, d); + }, l)), + this.data[u].push(d), + this.order.push(u), + this.order.length > this.max) + ) { + const g = this._getAndRemoveByKey(this.order[0]); + g && this.onRemove(g); + } + return this; + } + has(e) { + return e.wrapped().key in this.data; + } + getAndRemove(e) { + return this.has(e) + ? this._getAndRemoveByKey(e.wrapped().key) + : null; + } + _getAndRemoveByKey(e) { + const i = this.data[e].shift(); + return ( + i.timeout && clearTimeout(i.timeout), + this.data[e].length === 0 && delete this.data[e], + this.order.splice(this.order.indexOf(e), 1), + i.value + ); + } + getByKey(e) { + const i = this.data[e]; + return i ? i[0].value : null; + } + get(e) { + return this.has(e) + ? this.data[e.wrapped().key][0].value + : null; + } + remove(e, i) { + if (!this.has(e)) return this; + const l = e.wrapped().key, + u = i === void 0 ? 0 : this.data[l].indexOf(i), + d = this.data[l][u]; + return ( + this.data[l].splice(u, 1), + d.timeout && clearTimeout(d.timeout), + this.data[l].length === 0 && delete this.data[l], + this.onRemove(d.value), + this.order.splice(this.order.indexOf(l), 1), + this + ); + } + setMaxSize(e) { + for (this.max = e; this.order.length > this.max; ) { + const i = this._getAndRemoveByKey(this.order[0]); + i && this.onRemove(i); + } + return this; + } + filter(e) { + const i = []; + for (const l in this.data) + for (const u of this.data[l]) e(u.value) || i.push(u); + for (const l of i) this.remove(l.value.tileID, l); + } + } + class V { + constructor() { + (this.state = {}), + (this.stateChanges = {}), + (this.deletedStates = {}); + } + updateState(e, i, l) { + const u = String(i); + if ( + ((this.stateChanges[e] = this.stateChanges[e] || {}), + (this.stateChanges[e][u] = this.stateChanges[e][u] || {}), + s.e(this.stateChanges[e][u], l), + this.deletedStates[e] === null) + ) { + this.deletedStates[e] = {}; + for (const d in this.state[e]) + d !== u && (this.deletedStates[e][d] = null); + } else if ( + this.deletedStates[e] && + this.deletedStates[e][u] === null + ) { + this.deletedStates[e][u] = {}; + for (const d in this.state[e][u]) + l[d] || (this.deletedStates[e][u][d] = null); + } else + for (const d in l) + this.deletedStates[e] && + this.deletedStates[e][u] && + this.deletedStates[e][u][d] === null && + delete this.deletedStates[e][u][d]; + } + removeFeatureState(e, i, l) { + if (this.deletedStates[e] === null) return; + const u = String(i); + if ( + ((this.deletedStates[e] = this.deletedStates[e] || {}), + l && i !== void 0) + ) + this.deletedStates[e][u] !== null && + ((this.deletedStates[e][u] = + this.deletedStates[e][u] || {}), + (this.deletedStates[e][u][l] = null)); + else if (i !== void 0) + if (this.stateChanges[e] && this.stateChanges[e][u]) + for (l in ((this.deletedStates[e][u] = {}), + this.stateChanges[e][u])) + this.deletedStates[e][u][l] = null; + else this.deletedStates[e][u] = null; + else this.deletedStates[e] = null; + } + getState(e, i) { + const l = String(i), + u = s.e( + {}, + (this.state[e] || {})[l], + (this.stateChanges[e] || {})[l] + ); + if (this.deletedStates[e] === null) return {}; + if (this.deletedStates[e]) { + const d = this.deletedStates[e][i]; + if (d === null) return {}; + for (const g in d) delete u[g]; + } + return u; + } + initializeTileState(e, i) { + e.setFeatureState(this.state, i); + } + coalesceChanges(e, i) { + const l = {}; + for (const u in this.stateChanges) { + this.state[u] = this.state[u] || {}; + const d = {}; + for (const g in this.stateChanges[u]) + this.state[u][g] || (this.state[u][g] = {}), + s.e(this.state[u][g], this.stateChanges[u][g]), + (d[g] = this.state[u][g]); + l[u] = d; + } + for (const u in this.deletedStates) { + this.state[u] = this.state[u] || {}; + const d = {}; + if (this.deletedStates[u] === null) + for (const g in this.state[u]) + (d[g] = {}), (this.state[u][g] = {}); + else + for (const g in this.deletedStates[u]) { + if (this.deletedStates[u][g] === null) + this.state[u][g] = {}; + else + for (const w of Object.keys(this.deletedStates[u][g])) + delete this.state[u][g][w]; + d[g] = this.state[u][g]; + } + (l[u] = l[u] || {}), s.e(l[u], d); + } + if ( + ((this.stateChanges = {}), + (this.deletedStates = {}), + Object.keys(l).length !== 0) + ) + for (const u in e) e[u].setFeatureState(l, i); + } + } + const U = 89.25; + function Y(h, e) { + const i = s.ah(e.lat, -s.ai, s.ai); + return new s.P(s.V(e.lng) * h, s.U(i) * h); + } + function ie(h, e) { + return new s.a1(e.x / h, e.y / h).toLngLat(); + } + function pe(h) { + return ( + h.cameraToCenterDistance * + Math.min( + 0.85 * Math.tan(s.ae(90 - h.pitch)), + Math.tan(s.ae(U - h.pitch)) + ) + ); + } + function Se(h, e) { + const i = h.canonical, + l = e / s.af(i.z), + u = i.x + Math.pow(2, i.z) * h.wrap, + d = s.ag(new Float64Array(16)); + return ( + s.M(d, d, [u * l, i.y * l, 0]), + s.N(d, d, [l / s.$, l / s.$, 1]), + d + ); + } + function Me(h, e, i, l, u) { + const d = s.a1.fromLngLat(h, e), + g = u * s.aj(1, h.lat), + w = g * Math.cos(s.ae(i)), + C = Math.sqrt(g * g - w * w), + P = C * Math.sin(s.ae(-l)), + E = C * Math.cos(s.ae(-l)); + return new s.a1(d.x + P, d.y + E, d.z + w); + } + function we(h, e, i) { + const l = e.intersectsFrustum(h); + if (!i || l === 0) return l; + const u = e.intersectsPlane(i); + return u === 0 ? 0 : l === 2 && u === 2 ? 2 : 1; + } + function Ve(h, e, i) { + let l = 0; + const u = (i - e) / 10; + for (let d = 0; d < 10; d++) + l += + u * Math.pow(Math.cos(e + ((d + 0.5) / 10) * (i - e)), h); + return l; + } + function ut(h, e) { + return function (i, l, u, d, g) { + const w = + 2 * + ((h - 1) / + s.ak(Math.cos(s.ae(U - g)) / Math.cos(s.ae(U))) - + 1), + C = Math.acos(u / d), + P = 2 * Ve(w - 1, 0, s.ae(g / 2)), + E = Math.min(s.ae(U), C + s.ae(g / 2)), + R = Ve(w - 1, Math.min(E, C - s.ae(g / 2)), E), + D = Math.atan(l / u), + N = Math.hypot(l, u); + let G = i; + return ( + (G += s.ak(d / N / Math.max(0.5, Math.cos(s.ae(g / 2))))), + (G += (w * s.ak(Math.cos(D))) / 2), + (G -= s.ak(Math.max(1, R / P / e)) / 2), + G + ); + }; + } + const Ke = ut(9.314, 3); + function kt(h, e) { + const i = (e.roundZoom ? Math.round : Math.floor)( + h.zoom + s.ak(h.tileSize / e.tileSize) + ); + return Math.max(0, i); + } + function ye(h, e) { + const i = h.getCameraFrustum(), + l = h.getClippingPlane(), + u = h.screenPointToMercatorCoordinate(h.getCameraPoint()), + d = s.a1.fromLngLat(h.center, h.elevation); + u.z = + d.z + + (Math.cos(h.pitchInRadians) * h.cameraToCenterDistance) / + h.worldSize; + const g = h.getCoveringTilesDetailsProvider(), + w = g.allowVariableZoom(h, e), + C = kt(h, e), + P = e.minzoom || 0, + E = e.maxzoom !== void 0 ? e.maxzoom : h.maxZoom, + R = Math.min(Math.max(0, C), E), + D = Math.pow(2, R), + N = [D * u.x, D * u.y, 0], + G = [D * d.x, D * d.y, 0], + te = Math.hypot(d.x - u.x, d.y - u.y), + Q = Math.abs(d.z - u.z), + ae = Math.hypot(te, Q), + ce = (be) => ({ + zoom: 0, + x: 0, + y: 0, + wrap: be, + fullyVisible: !1, + }), + ve = [], + me = []; + if (h.renderWorldCopies && g.allowWorldCopies()) + for (let be = 1; be <= 3; be++) + ve.push(ce(-be)), ve.push(ce(be)); + for (ve.push(ce(0)); ve.length > 0; ) { + const be = ve.pop(), + Pe = be.x, + _e = be.y; + let Be = be.fullyVisible; + const rt = { x: Pe, y: _e, z: be.zoom }, + Ge = g.getTileBoundingVolume(rt, be.wrap, h.elevation, e); + if (!Be) { + const Zt = we(i, Ge, l); + if (Zt === 0) continue; + Be = Zt === 2; + } + const Xe = g.distanceToTile2d(u.x, u.y, rt, Ge); + let tt = C; + w && + (tt = (e.calculateTileZoom || Ke)( + h.zoom + s.ak(h.tileSize / e.tileSize), + Xe, + Q, + ae, + h.fov + )), + (tt = (e.roundZoom ? Math.round : Math.floor)(tt)), + (tt = Math.max(0, tt)); + const jt = Math.min(tt, E); + if (((be.wrap = g.getWrap(d, rt, be.wrap)), be.zoom >= jt)) { + if (be.zoom < P) continue; + const Zt = R - be.zoom, + Tt = N[0] - 0.5 - (Pe << Zt), + vr = N[1] - 0.5 - (_e << Zt), + Jr = e.reparseOverscaled + ? Math.max(be.zoom, tt) + : be.zoom; + me.push({ + tileID: new s.Z( + be.zoom === E ? Jr : be.zoom, + be.wrap, + be.zoom, + Pe, + _e + ), + distanceSq: s.al([G[0] - 0.5 - Pe, G[1] - 0.5 - _e]), + tileDistanceToCamera: Math.sqrt(Tt * Tt + vr * vr), + }); + } else + for (let Zt = 0; Zt < 4; Zt++) + ve.push({ + zoom: be.zoom + 1, + x: (Pe << 1) + (Zt % 2), + y: (_e << 1) + (Zt >> 1), + wrap: be.wrap, + fullyVisible: Be, + }); + } + return me + .sort((be, Pe) => be.distanceSq - Pe.distanceSq) + .map((be) => be.tileID); + } + const Bt = s.a2.fromPoints([new s.P(0, 0), new s.P(s.$, s.$)]); + class rr extends s.E { + constructor(e, i, l) { + super(), + (this.id = e), + (this.dispatcher = l), + this.on("data", (u) => this._dataHandler(u)), + this.on("dataloading", () => { + this._sourceErrored = !1; + }), + this.on("error", () => { + this._sourceErrored = this._source.loaded(); + }), + (this._source = ((u, d, g, w) => { + const C = new (Vr(d.type))(u, d, g, w); + if (C.id !== u) + throw new Error( + `Expected Source id to be ${u} instead of ${C.id}` + ); + return C; + })(e, i, l, this)), + (this._tiles = {}), + (this._cache = new ue(0, (u) => this._unloadTile(u))), + (this._timers = {}), + (this._cacheTimers = {}), + (this._maxTileCacheSize = null), + (this._maxTileCacheZoomLevels = null), + (this._loadedParentTiles = {}), + (this._coveredTiles = {}), + (this._state = new V()), + (this._didEmitContent = !1), + (this._updated = !1); + } + onAdd(e) { + (this.map = e), + (this._maxTileCacheSize = e ? e._maxTileCacheSize : null), + (this._maxTileCacheZoomLevels = e + ? e._maxTileCacheZoomLevels + : null), + this._source && this._source.onAdd && this._source.onAdd(e); + } + onRemove(e) { + this.clearTiles(), + this._source && + this._source.onRemove && + this._source.onRemove(e); + } + 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 e in this._tiles) { + const i = this._tiles[e]; + if (i.state !== "loaded" && i.state !== "errored") + return !1; + } + return !0; + } + getSource() { + return this._source; + } + pause() { + this._paused = !0; + } + resume() { + if (!this._paused) return; + const e = this._shouldReloadOnResume; + (this._paused = !1), + (this._shouldReloadOnResume = !1), + e && this.reload(), + this.transform && this.update(this.transform, this.terrain); + } + _loadTile(e, i, l) { + return s._(this, void 0, void 0, function* () { + try { + yield this._source.loadTile(e), this._tileLoaded(e, i, l); + } catch (u) { + (e.state = "errored"), + u.status !== 404 + ? this._source.fire(new s.k(u, { tile: e })) + : this.update(this.transform, this.terrain); + } + }); + } + _unloadTile(e) { + this._source.unloadTile && this._source.unloadTile(e); + } + _abortTile(e) { + this._source.abortTile && this._source.abortTile(e), + this._source.fire( + new s.l("dataabort", { + tile: e, + coord: e.tileID, + dataType: "source", + }) + ); + } + serialize() { + return this._source.serialize(); + } + prepare(e) { + this._source.prepare && this._source.prepare(), + this._state.coalesceChanges( + this._tiles, + this.map ? this.map.painter : null + ); + for (const i in this._tiles) { + const l = this._tiles[i]; + l.upload(e), l.prepare(this.map.style.imageManager); + } + } + getIds() { + return Object.values(this._tiles) + .map((e) => e.tileID) + .sort(Kt) + .map((e) => e.key); + } + getRenderableIds(e) { + const i = []; + for (const l in this._tiles) + this._isIdRenderable(l, e) && i.push(this._tiles[l]); + return e + ? i + .sort((l, u) => { + const d = l.tileID, + g = u.tileID, + w = new s.P(d.canonical.x, d.canonical.y)._rotate( + -this.transform.bearingInRadians + ), + C = new s.P(g.canonical.x, g.canonical.y)._rotate( + -this.transform.bearingInRadians + ); + return ( + d.overscaledZ - g.overscaledZ || + C.y - w.y || + C.x - w.x + ); + }) + .map((l) => l.tileID.key) + : i + .map((l) => l.tileID) + .sort(Kt) + .map((l) => l.key); + } + hasRenderableParent(e) { + const i = this.findLoadedParent(e, 0); + return !!i && this._isIdRenderable(i.tileID.key); + } + _isIdRenderable(e, i) { + return ( + this._tiles[e] && + this._tiles[e].hasData() && + !this._coveredTiles[e] && + (i || !this._tiles[e].holdingForFade()) + ); + } + reload(e) { + if (this._paused) this._shouldReloadOnResume = !0; + else { + this._cache.reset(); + for (const i in this._tiles) + e + ? this._reloadTile(i, "expired") + : this._tiles[i].state !== "errored" && + this._reloadTile(i, "reloading"); + } + } + _reloadTile(e, i) { + return s._(this, void 0, void 0, function* () { + const l = this._tiles[e]; + l && + (l.state !== "loading" && (l.state = i), + yield this._loadTile(l, e, i)); + }); + } + _tileLoaded(e, i, l) { + (e.timeAdded = ne.now()), + l === "expired" && (e.refreshedUponExpiration = !0), + this._setTileReloadTimer(i, e), + this.getSource().type === "raster-dem" && + e.dem && + this._backfillDEM(e), + this._state.initializeTileState( + e, + this.map ? this.map.painter : null + ), + e.aborted || + this._source.fire( + new s.l("data", { + dataType: "source", + tile: e, + coord: e.tileID, + }) + ); + } + _backfillDEM(e) { + const i = this.getRenderableIds(); + for (let u = 0; u < i.length; u++) { + const d = i[u]; + if (e.neighboringTiles && e.neighboringTiles[d]) { + const g = this.getTileByID(d); + l(e, g), l(g, e); + } + } + function l(u, d) { + (u.needsHillshadePrepare = !0), + (u.needsTerrainPrepare = !0); + let g = d.tileID.canonical.x - u.tileID.canonical.x; + const w = d.tileID.canonical.y - u.tileID.canonical.y, + C = Math.pow(2, u.tileID.canonical.z), + P = d.tileID.key; + (g === 0 && w === 0) || + Math.abs(w) > 1 || + (Math.abs(g) > 1 && + (Math.abs(g + C) === 1 + ? (g += C) + : Math.abs(g - C) === 1 && (g -= C)), + d.dem && + u.dem && + (u.dem.backfillBorder(d.dem, g, w), + u.neighboringTiles && + u.neighboringTiles[P] && + (u.neighboringTiles[P].backfilled = !0))); + } + } + getTile(e) { + return this.getTileByID(e.key); + } + getTileByID(e) { + return this._tiles[e]; + } + _retainLoadedChildren(e, i, l, u) { + for (const d in this._tiles) { + let g = this._tiles[d]; + if ( + u[d] || + !g.hasData() || + g.tileID.overscaledZ <= i || + g.tileID.overscaledZ > l + ) + continue; + let w = g.tileID; + for (; g && g.tileID.overscaledZ > i + 1; ) { + const P = g.tileID.scaledTo(g.tileID.overscaledZ - 1); + (g = this._tiles[P.key]), g && g.hasData() && (w = P); + } + let C = w; + for (; C.overscaledZ > i; ) + if ( + ((C = C.scaledTo(C.overscaledZ - 1)), + e[C.key] || e[C.canonical.key]) + ) { + u[w.key] = w; + break; + } + } + } + findLoadedParent(e, i) { + if (e.key in this._loadedParentTiles) { + const l = this._loadedParentTiles[e.key]; + return l && l.tileID.overscaledZ >= i ? l : null; + } + for (let l = e.overscaledZ - 1; l >= i; l--) { + const u = e.scaledTo(l), + d = this._getLoadedTile(u); + if (d) return d; + } + } + findLoadedSibling(e) { + return this._getLoadedTile(e); + } + _getLoadedTile(e) { + const i = this._tiles[e.key]; + return i && i.hasData() + ? i + : this._cache.getByKey(e.wrapped().key); + } + updateCacheSize(e) { + const i = Math.ceil(e.width / this._source.tileSize) + 1, + l = Math.ceil(e.height / this._source.tileSize) + 1, + u = Math.floor( + i * + l * + (this._maxTileCacheZoomLevels === null + ? s.a.MAX_TILE_CACHE_ZOOM_LEVELS + : this._maxTileCacheZoomLevels) + ), + d = + typeof this._maxTileCacheSize == "number" + ? Math.min(this._maxTileCacheSize, u) + : u; + this._cache.setMaxSize(d); + } + handleWrapJump(e) { + const i = Math.round( + (e - (this._prevLng === void 0 ? e : this._prevLng)) / 360 + ); + if (((this._prevLng = e), i)) { + const l = {}; + for (const u in this._tiles) { + const d = this._tiles[u]; + (d.tileID = d.tileID.unwrapTo(d.tileID.wrap + i)), + (l[d.tileID.key] = d); + } + this._tiles = l; + for (const u in this._timers) + clearTimeout(this._timers[u]), delete this._timers[u]; + for (const u in this._tiles) + this._setTileReloadTimer(u, this._tiles[u]); + } + } + _updateCoveredAndRetainedTiles(e, i, l, u, d, g) { + const w = {}, + C = {}, + P = Object.keys(e), + E = ne.now(); + for (const R of P) { + const D = e[R], + N = this._tiles[R]; + if (!N || (N.fadeEndTime !== 0 && N.fadeEndTime <= E)) + continue; + const G = this.findLoadedParent(D, i), + te = this.findLoadedSibling(D), + Q = G || te || null; + Q && + (this._addTile(Q.tileID), (w[Q.tileID.key] = Q.tileID)), + (C[R] = D); + } + this._retainLoadedChildren(C, u, l, e); + for (const R in w) + e[R] || ((this._coveredTiles[R] = !0), (e[R] = w[R])); + if (g) { + const R = {}, + D = {}; + for (const N of d) + this._tiles[N.key].hasData() + ? (R[N.key] = N) + : (D[N.key] = N); + for (const N in D) { + const G = D[N].children(this._source.maxzoom); + this._tiles[G[0].key] && + this._tiles[G[1].key] && + this._tiles[G[2].key] && + this._tiles[G[3].key] && + ((R[G[0].key] = e[G[0].key] = G[0]), + (R[G[1].key] = e[G[1].key] = G[1]), + (R[G[2].key] = e[G[2].key] = G[2]), + (R[G[3].key] = e[G[3].key] = G[3]), + delete D[N]); + } + for (const N in D) { + const G = D[N], + te = this.findLoadedParent(G, this._source.minzoom), + Q = this.findLoadedSibling(G), + ae = te || Q || null; + if (ae) { + R[ae.tileID.key] = e[ae.tileID.key] = ae.tileID; + for (const ce in R) + R[ce].isChildOf(ae.tileID) && delete R[ce]; + } + } + for (const N in this._tiles) + R[N] || (this._coveredTiles[N] = !0); + } + } + update(e, i) { + if (!this._sourceLoaded || this._paused) return; + let l; + (this.transform = e), + (this.terrain = i), + this.updateCacheSize(e), + this.handleWrapJump(this.transform.center.lng), + (this._coveredTiles = {}), + this.used || this.usedForTerrain + ? this._source.tileID + ? (l = e + .getVisibleUnwrappedCoordinates(this._source.tileID) + .map( + (E) => + new s.Z( + E.canonical.z, + E.wrap, + E.canonical.z, + E.canonical.x, + E.canonical.y + ) + )) + : ((l = ye(e, { + tileSize: this.usedForTerrain + ? this.tileSize + : this._source.tileSize, + minzoom: this._source.minzoom, + maxzoom: this._source.maxzoom, + roundZoom: + !this.usedForTerrain && this._source.roundZoom, + reparseOverscaled: this._source.reparseOverscaled, + terrain: i, + calculateTileZoom: this._source.calculateTileZoom, + })), + this._source.hasTile && + (l = l.filter((E) => this._source.hasTile(E)))) + : (l = []); + const u = kt(e, this._source), + d = Math.max(u - rr.maxOverzooming, this._source.minzoom), + g = Math.max(u + rr.maxUnderzooming, this._source.minzoom); + if (this.usedForTerrain) { + const E = {}; + for (const R of l) + if (R.canonical.z > this._source.minzoom) { + const D = R.scaledTo(R.canonical.z - 1); + E[D.key] = D; + const N = R.scaledTo( + Math.max( + this._source.minzoom, + Math.min(R.canonical.z, 5) + ) + ); + E[N.key] = N; + } + l = l.concat(Object.values(E)); + } + const w = + l.length === 0 && !this._updated && this._didEmitContent; + (this._updated = !0), + w && + this.fire( + new s.l("data", { + sourceDataType: "idle", + dataType: "source", + sourceId: this.id, + }) + ); + const C = this._updateRetainedTiles(l, u); + gr(this._source.type) && + this._updateCoveredAndRetainedTiles(C, d, g, u, l, i); + for (const E in C) this._tiles[E].clearFadeHold(); + const P = s.am(this._tiles, C); + for (const E of P) { + const R = this._tiles[E]; + R.hasSymbolBuckets && !R.holdingForFade() + ? R.setHoldDuration(this.map._fadeDuration) + : (R.hasSymbolBuckets && !R.symbolFadeFinished()) || + this._removeTile(E); + } + this._updateLoadedParentTileCache(), + this._updateLoadedSiblingTileCache(); + } + releaseSymbolFadeTiles() { + for (const e in this._tiles) + this._tiles[e].holdingForFade() && this._removeTile(e); + } + _updateRetainedTiles(e, i) { + var l; + const u = {}, + d = {}, + g = Math.max(i - rr.maxOverzooming, this._source.minzoom), + w = Math.max(i + rr.maxUnderzooming, this._source.minzoom), + C = {}; + for (const P of e) { + const E = this._addTile(P); + (u[P.key] = P), + E.hasData() || + (i < this._source.maxzoom && (C[P.key] = P)); + } + this._retainLoadedChildren(C, i, w, u); + for (const P of e) { + let E = this._tiles[P.key]; + if (E.hasData()) continue; + if (i + 1 > this._source.maxzoom) { + const D = P.children(this._source.maxzoom)[0], + N = this.getTile(D); + if (N && N.hasData()) { + u[D.key] = D; + continue; + } + } else { + const D = P.children(this._source.maxzoom); + if ( + u[D[0].key] && + u[D[1].key] && + u[D[2].key] && + u[D[3].key] + ) + continue; + } + let R = E.wasRequested(); + for (let D = P.overscaledZ - 1; D >= g; --D) { + const N = P.scaledTo(D); + if (d[N.key]) break; + if ( + ((d[N.key] = !0), + (E = this.getTile(N)), + !E && R && (E = this._addTile(N)), + E) + ) { + const G = E.hasData(); + if ( + ((G || + !( + !((l = this.map) === null || l === void 0) && + l.cancelPendingTileRequestsWhileZooming + ) || + R) && + (u[N.key] = N), + (R = E.wasRequested()), + G) + ) + break; + } + } + } + return u; + } + _updateLoadedParentTileCache() { + this._loadedParentTiles = {}; + for (const e in this._tiles) { + const i = []; + let l, + u = this._tiles[e].tileID; + for (; u.overscaledZ > 0; ) { + if (u.key in this._loadedParentTiles) { + l = this._loadedParentTiles[u.key]; + break; + } + i.push(u.key); + const d = u.scaledTo(u.overscaledZ - 1); + if (((l = this._getLoadedTile(d)), l)) break; + u = d; + } + for (const d of i) this._loadedParentTiles[d] = l; + } + } + _updateLoadedSiblingTileCache() { + this._loadedSiblingTiles = {}; + for (const e in this._tiles) { + const i = this._tiles[e].tileID, + l = this._getLoadedTile(i); + this._loadedSiblingTiles[i.key] = l; + } + } + _addTile(e) { + let i = this._tiles[e.key]; + if (i) return i; + (i = this._cache.getAndRemove(e)), + i && + (this._setTileReloadTimer(e.key, i), + (i.tileID = e), + this._state.initializeTileState( + i, + this.map ? this.map.painter : null + ), + this._cacheTimers[e.key] && + (clearTimeout(this._cacheTimers[e.key]), + delete this._cacheTimers[e.key], + this._setTileReloadTimer(e.key, i))); + const l = i; + return ( + i || + ((i = new qr( + e, + this._source.tileSize * e.overscaleFactor() + )), + this._loadTile(i, e.key, i.state)), + i.uses++, + (this._tiles[e.key] = i), + l || + this._source.fire( + new s.l("dataloading", { + tile: i, + coord: i.tileID, + dataType: "source", + }) + ), + i + ); + } + _setTileReloadTimer(e, i) { + e in this._timers && + (clearTimeout(this._timers[e]), delete this._timers[e]); + const l = i.getExpiryTimeout(); + l && + (this._timers[e] = setTimeout(() => { + this._reloadTile(e, "expired"), delete this._timers[e]; + }, l)); + } + refreshTiles(e) { + for (const i in this._tiles) + (this._isIdRenderable(i) || + this._tiles[i].state == "errored") && + e.some((l) => + l.equals(this._tiles[i].tileID.canonical) + ) && + this._reloadTile(i, "expired"); + } + _removeTile(e) { + const i = this._tiles[e]; + i && + (i.uses--, + delete this._tiles[e], + this._timers[e] && + (clearTimeout(this._timers[e]), delete this._timers[e]), + i.uses > 0 || + (i.hasData() && i.state !== "reloading" + ? this._cache.add(i.tileID, i, i.getExpiryTimeout()) + : ((i.aborted = !0), + this._abortTile(i), + this._unloadTile(i)))); + } + _dataHandler(e) { + const i = e.sourceDataType; + e.dataType === "source" && + i === "metadata" && + (this._sourceLoaded = !0), + this._sourceLoaded && + !this._paused && + e.dataType === "source" && + i === "content" && + (this.reload(e.sourceDataChanged), + this.transform && + this.update(this.transform, this.terrain), + (this._didEmitContent = !0)); + } + clearTiles() { + (this._shouldReloadOnResume = !1), (this._paused = !1); + for (const e in this._tiles) this._removeTile(e); + this._cache.reset(); + } + tilesIn(e, i, l) { + const u = [], + d = this.transform; + if (!d) return u; + const g = d + .getCoveringTilesDetailsProvider() + .allowWorldCopies(), + w = l ? d.getCameraQueryGeometry(e) : e, + C = (N) => + d.screenPointToMercatorCoordinate(N, this.terrain), + P = this.transformBbox(e, C, !g), + E = this.transformBbox(w, C, !g), + R = this.getIds(), + D = s.a2.fromPoints(E); + for (let N = 0; N < R.length; N++) { + const G = this._tiles[R[N]]; + if (G.holdingForFade()) continue; + const te = g + ? [G.tileID] + : [G.tileID.unwrapTo(-1), G.tileID.unwrapTo(0)], + Q = Math.pow(2, d.zoom - G.tileID.overscaledZ), + ae = (i * G.queryPadding * s.$) / G.tileSize / Q; + for (const ce of te) { + const ve = D.map((me) => + ce.getTilePoint(new s.a1(me.x, me.y)) + ); + if ((ve.expandBy(ae), ve.intersects(Bt))) { + const me = P.map((Pe) => ce.getTilePoint(Pe)), + be = E.map((Pe) => ce.getTilePoint(Pe)); + u.push({ + tile: G, + tileID: g ? ce : ce.unwrapTo(0), + queryGeometry: me, + cameraQueryGeometry: be, + scale: Q, + }); + } + } + } + return u; + } + transformBbox(e, i, l) { + let u = e.map(i); + if (l) { + const d = s.a2.fromPoints(e); + d.shrinkBy(0.001 * Math.min(d.width(), d.height())); + const g = d.map(i); + s.a2.fromPoints(u).covers(g) || + (u = u.map((w) => + w.x > 0.5 ? new s.a1(w.x - 1, w.y, w.z) : w + )); + } + return u; + } + getVisibleCoordinates(e) { + const i = this.getRenderableIds(e).map( + (l) => this._tiles[l].tileID + ); + return this.transform && this.transform.populateCache(i), i; + } + hasTransition() { + if (this._source.hasTransition()) return !0; + if (gr(this._source.type)) { + const e = ne.now(); + for (const i in this._tiles) + if (this._tiles[i].fadeEndTime >= e) return !0; + } + return !1; + } + setFeatureState(e, i, l) { + this._state.updateState((e = e || "_geojsonTileLayer"), i, l); + } + removeFeatureState(e, i, l) { + this._state.removeFeatureState( + (e = e || "_geojsonTileLayer"), + i, + l + ); + } + getFeatureState(e, i) { + return this._state.getState( + (e = e || "_geojsonTileLayer"), + i + ); + } + setDependencies(e, i, l) { + const u = this._tiles[e]; + u && u.setDependencies(i, l); + } + reloadTilesForDependencies(e, i) { + for (const l in this._tiles) + this._tiles[l].hasDependency(e, i) && + this._reloadTile(l, "reloading"); + this._cache.filter((l) => !l.hasDependency(e, i)); + } + } + function Kt(h, e) { + const i = Math.abs(2 * h.wrap) - +(h.wrap < 0), + l = Math.abs(2 * e.wrap) - +(e.wrap < 0); + return ( + h.overscaledZ - e.overscaledZ || + l - i || + e.canonical.y - h.canonical.y || + e.canonical.x - h.canonical.x + ); + } + function gr(h) { + return h === "raster" || h === "image" || h === "video"; + } + (rr.maxOverzooming = 10), (rr.maxUnderzooming = 3); + class Ur { + constructor(e, i) { + this.reset(e, i); + } + reset(e, i) { + (this.points = e || []), (this._distances = [0]); + for (let l = 1; l < this.points.length; l++) + this._distances[l] = + this._distances[l - 1] + + this.points[l].dist(this.points[l - 1]); + (this.length = this._distances[this._distances.length - 1]), + (this.padding = Math.min(i || 0, 0.5 * this.length)), + (this.paddedLength = this.length - 2 * this.padding); + } + lerp(e) { + if (this.points.length === 1) return this.points[0]; + e = s.ah(e, 0, 1); + let i = 1, + l = this._distances[i]; + const u = e * this.paddedLength + this.padding; + for (; l < u && i < this._distances.length; ) + l = this._distances[++i]; + const d = i - 1, + g = this._distances[d], + w = l - g, + C = w > 0 ? (u - g) / w : 0; + return this.points[d].mult(1 - C).add(this.points[i].mult(C)); + } + } + function nn(h, e) { + let i = !0; + return ( + h === "always" || + (h !== "never" && e !== "never") || + (i = !1), + i + ); + } + class mn { + constructor(e, i, l) { + const u = (this.boxCells = []), + d = (this.circleCells = []); + (this.xCellCount = Math.ceil(e / l)), + (this.yCellCount = Math.ceil(i / l)); + for (let g = 0; g < this.xCellCount * this.yCellCount; g++) + u.push([]), d.push([]); + (this.circleKeys = []), + (this.boxKeys = []), + (this.bboxes = []), + (this.circles = []), + (this.width = e), + (this.height = i), + (this.xScale = this.xCellCount / e), + (this.yScale = this.yCellCount / i), + (this.boxUid = 0), + (this.circleUid = 0); + } + keysLength() { + return this.boxKeys.length + this.circleKeys.length; + } + insert(e, i, l, u, d) { + this._forEachCell( + i, + l, + u, + d, + this._insertBoxCell, + this.boxUid++ + ), + this.boxKeys.push(e), + this.bboxes.push(i), + this.bboxes.push(l), + this.bboxes.push(u), + this.bboxes.push(d); + } + insertCircle(e, i, l, u) { + this._forEachCell( + i - u, + l - u, + i + u, + l + u, + this._insertCircleCell, + this.circleUid++ + ), + this.circleKeys.push(e), + this.circles.push(i), + this.circles.push(l), + this.circles.push(u); + } + _insertBoxCell(e, i, l, u, d, g) { + this.boxCells[d].push(g); + } + _insertCircleCell(e, i, l, u, d, g) { + this.circleCells[d].push(g); + } + _query(e, i, l, u, d, g, w) { + if (l < 0 || e > this.width || u < 0 || i > this.height) + return []; + const C = []; + if (e <= 0 && i <= 0 && this.width <= l && this.height <= u) { + if (d) return [{ key: null, x1: e, y1: i, x2: l, y2: u }]; + for (let P = 0; P < this.boxKeys.length; P++) + C.push({ + key: this.boxKeys[P], + x1: this.bboxes[4 * P], + y1: this.bboxes[4 * P + 1], + x2: this.bboxes[4 * P + 2], + y2: this.bboxes[4 * P + 3], + }); + for (let P = 0; P < this.circleKeys.length; P++) { + const E = this.circles[3 * P], + R = this.circles[3 * P + 1], + D = this.circles[3 * P + 2]; + C.push({ + key: this.circleKeys[P], + x1: E - D, + y1: R - D, + x2: E + D, + y2: R + D, + }); + } + } else this._forEachCell(e, i, l, u, this._queryCell, C, { hitTest: d, overlapMode: g, seenUids: { box: {}, circle: {} } }, w); + return C; + } + query(e, i, l, u) { + return this._query(e, i, l, u, !1, null); + } + hitTest(e, i, l, u, d, g) { + return this._query(e, i, l, u, !0, d, g).length > 0; + } + hitTestCircle(e, i, l, u, d) { + const g = e - l, + w = e + l, + C = i - l, + P = i + l; + if (w < 0 || g > this.width || P < 0 || C > this.height) + return !1; + const E = []; + return ( + this._forEachCell( + g, + C, + w, + P, + this._queryCellCircle, + E, + { + hitTest: !0, + overlapMode: u, + circle: { x: e, y: i, radius: l }, + seenUids: { box: {}, circle: {} }, + }, + d + ), + E.length > 0 + ); + } + _queryCell(e, i, l, u, d, g, w, C) { + const { seenUids: P, hitTest: E, overlapMode: R } = w, + D = this.boxCells[d]; + if (D !== null) { + const G = this.bboxes; + for (const te of D) + if (!P.box[te]) { + P.box[te] = !0; + const Q = 4 * te, + ae = this.boxKeys[te]; + if ( + e <= G[Q + 2] && + i <= G[Q + 3] && + l >= G[Q + 0] && + u >= G[Q + 1] && + (!C || C(ae)) && + (!E || !nn(R, ae.overlapMode)) && + (g.push({ + key: ae, + x1: G[Q], + y1: G[Q + 1], + x2: G[Q + 2], + y2: G[Q + 3], + }), + E) + ) + return !0; + } + } + const N = this.circleCells[d]; + if (N !== null) { + const G = this.circles; + for (const te of N) + if (!P.circle[te]) { + P.circle[te] = !0; + const Q = 3 * te, + ae = this.circleKeys[te]; + if ( + this._circleAndRectCollide( + G[Q], + G[Q + 1], + G[Q + 2], + e, + i, + l, + u + ) && + (!C || C(ae)) && + (!E || !nn(R, ae.overlapMode)) + ) { + const ce = G[Q], + ve = G[Q + 1], + me = G[Q + 2]; + if ( + (g.push({ + key: ae, + x1: ce - me, + y1: ve - me, + x2: ce + me, + y2: ve + me, + }), + E) + ) + return !0; + } + } + } + return !1; + } + _queryCellCircle(e, i, l, u, d, g, w, C) { + const { circle: P, seenUids: E, overlapMode: R } = w, + D = this.boxCells[d]; + if (D !== null) { + const G = this.bboxes; + for (const te of D) + if (!E.box[te]) { + E.box[te] = !0; + const Q = 4 * te, + ae = this.boxKeys[te]; + if ( + this._circleAndRectCollide( + P.x, + P.y, + P.radius, + G[Q + 0], + G[Q + 1], + G[Q + 2], + G[Q + 3] + ) && + (!C || C(ae)) && + !nn(R, ae.overlapMode) + ) + return g.push(!0), !0; + } + } + const N = this.circleCells[d]; + if (N !== null) { + const G = this.circles; + for (const te of N) + if (!E.circle[te]) { + E.circle[te] = !0; + const Q = 3 * te, + ae = this.circleKeys[te]; + if ( + this._circlesCollide( + G[Q], + G[Q + 1], + G[Q + 2], + P.x, + P.y, + P.radius + ) && + (!C || C(ae)) && + !nn(R, ae.overlapMode) + ) + return g.push(!0), !0; + } + } + } + _forEachCell(e, i, l, u, d, g, w, C) { + const P = this._convertToXCellCoord(e), + E = this._convertToYCellCoord(i), + R = this._convertToXCellCoord(l), + D = this._convertToYCellCoord(u); + for (let N = P; N <= R; N++) + for (let G = E; G <= D; G++) + if ( + d.call( + this, + e, + i, + l, + u, + this.xCellCount * G + N, + g, + w, + C + ) + ) + return; + } + _convertToXCellCoord(e) { + return Math.max( + 0, + Math.min(this.xCellCount - 1, Math.floor(e * this.xScale)) + ); + } + _convertToYCellCoord(e) { + return Math.max( + 0, + Math.min(this.yCellCount - 1, Math.floor(e * this.yScale)) + ); + } + _circlesCollide(e, i, l, u, d, g) { + const w = u - e, + C = d - i, + P = l + g; + return P * P > w * w + C * C; + } + _circleAndRectCollide(e, i, l, u, d, g, w) { + const C = (g - u) / 2, + P = Math.abs(e - (u + C)); + if (P > C + l) return !1; + const E = (w - d) / 2, + R = Math.abs(i - (d + E)); + if (R > E + l) return !1; + if (P <= C || R <= E) return !0; + const D = P - C, + N = R - E; + return D * D + N * N <= l * l; + } + } + function _n(h, e, i) { + const l = s.L(); + if (!h) { + const { vecSouth: R, vecEast: D } = Et(e), + N = O(); + (N[0] = D[0]), + (N[1] = D[1]), + (N[2] = R[0]), + (N[3] = R[1]), + (u = N), + (E = + (g = (d = N)[0]) * (P = d[3]) - + (C = d[2]) * (w = d[1])) && + ((u[0] = P * (E = 1 / E)), + (u[1] = -w * E), + (u[2] = -C * E), + (u[3] = g * E)), + (l[0] = N[0]), + (l[1] = N[1]), + (l[4] = N[2]), + (l[5] = N[3]); + } + var u, d, g, w, C, P, E; + return s.N(l, l, [1 / i, 1 / i, 1]), l; + } + function Vt(h, e, i, l) { + if (h) { + const u = s.L(); + if (!e) { + const { vecSouth: d, vecEast: g } = Et(i); + (u[0] = g[0]), (u[1] = g[1]), (u[4] = d[0]), (u[5] = d[1]); + } + return s.N(u, u, [l, l, 1]), u; + } + return i.pixelsToClipSpaceMatrix; + } + function Et(h) { + const e = Math.cos(h.rollInRadians), + i = Math.sin(h.rollInRadians), + l = Math.cos(h.pitchInRadians), + u = Math.cos(h.bearingInRadians), + d = Math.sin(h.bearingInRadians), + g = s.ar(); + (g[0] = -u * l * i - d * e), (g[1] = -d * l * i + u * e); + const w = s.as(g); + w < 1e-9 ? s.at(g) : s.au(g, g, 1 / w); + const C = s.ar(); + (C[0] = u * l * e - d * i), (C[1] = d * l * e + u * i); + const P = s.as(C); + return ( + P < 1e-9 ? s.at(C) : s.au(C, C, 1 / P), + { vecEast: C, vecSouth: g } + ); + } + function dr(h, e, i, l) { + let u; + l + ? ((u = [h, e, l(h, e), 1]), s.aw(u, u, i)) + : ((u = [h, e, 0, 1]), En(u, u, i)); + const d = u[3]; + return { + point: new s.P(u[0] / d, u[1] / d), + signedDistanceFromCamera: d, + isOccluded: !1, + }; + } + function ht(h, e) { + return 0.5 + (h / e) * 0.5; + } + function Xr(h, e) { + return ( + h.x >= -e[0] && h.x <= e[0] && h.y >= -e[1] && h.y <= e[1] + ); + } + function Yr(h, e, i, l, u, d, g, w, C, P, E, R, D) { + const N = i ? h.textSizeData : h.iconSizeData, + G = s.an(N, e.transform.zoom), + te = [(256 / e.width) * 2 + 1, (256 / e.height) * 2 + 1], + Q = i + ? h.text.dynamicLayoutVertexArray + : h.icon.dynamicLayoutVertexArray; + Q.clear(); + const ae = h.lineVertexArray, + ce = i ? h.text.placedSymbolArray : h.icon.placedSymbolArray, + ve = e.transform.width / e.transform.height; + let me = !1; + for (let be = 0; be < ce.length; be++) { + const Pe = ce.get(be); + if (Pe.hidden || (Pe.writingMode === s.ao.vertical && !me)) { + ln(Pe.numGlyphs, Q); + continue; + } + me = !1; + const _e = new s.P(Pe.anchorX, Pe.anchorY), + Be = { + getElevation: D, + pitchedLabelPlaneMatrix: l, + lineVertexArray: ae, + pitchWithMap: d, + projectionCache: { + projections: {}, + offsets: {}, + cachedAnchorPoint: void 0, + anyProjectionOccluded: !1, + }, + transform: e.transform, + tileAnchorPoint: _e, + unwrappedTileID: C, + width: P, + height: E, + translation: R, + }, + rt = Er(Pe.anchorX, Pe.anchorY, Be); + if (!Xr(rt.point, te)) { + ln(Pe.numGlyphs, Q); + continue; + } + const Ge = ht( + e.transform.cameraToCenterDistance, + rt.signedDistanceFromCamera + ), + Xe = s.ap(N, G, Pe), + tt = d + ? (Xe * + e.transform.getPitchedTextCorrection( + Pe.anchorX, + Pe.anchorY, + C + )) / + Ge + : Xe * Ge, + jt = He({ + projectionContext: Be, + pitchedLabelPlaneMatrixInverse: u, + symbol: Pe, + fontSize: tt, + flip: !1, + keepUpright: g, + glyphOffsetArray: h.glyphOffsetArray, + dynamicLayoutVertexArray: Q, + aspectRatio: ve, + rotateToLine: w, + }); + (me = jt.useVertical), + (jt.notEnoughRoom || + me || + (jt.needsFlipping && + He({ + projectionContext: Be, + pitchedLabelPlaneMatrixInverse: u, + symbol: Pe, + fontSize: tt, + flip: !0, + keepUpright: g, + glyphOffsetArray: h.glyphOffsetArray, + dynamicLayoutVertexArray: Q, + aspectRatio: ve, + rotateToLine: w, + }).notEnoughRoom)) && + ln(Pe.numGlyphs, Q); + } + i + ? h.text.dynamicLayoutVertexBuffer.updateData(Q) + : h.icon.dynamicLayoutVertexBuffer.updateData(Q); + } + function Zr(h, e, i, l, u, d, g, w) { + const C = d.glyphStartIndex + d.numGlyphs, + P = d.lineStartIndex, + E = d.lineStartIndex + d.lineLength, + R = e.getoffsetX(d.glyphStartIndex), + D = e.getoffsetX(C - 1), + N = pn(h * R, i, l, u, d.segment, P, E, w, g); + if (!N) return null; + const G = pn(h * D, i, l, u, d.segment, P, E, w, g); + return G + ? w.projectionCache.anyProjectionOccluded + ? null + : { first: N, last: G } + : null; + } + function mt(h, e, i, l) { + return h === s.ao.horizontal && + Math.abs(i.y - e.y) > Math.abs(i.x - e.x) * l + ? { useVertical: !0 } + : (h === s.ao.vertical ? e.y < i.y : e.x > i.x) + ? { needsFlipping: !0 } + : null; + } + function He(h) { + const { + projectionContext: e, + pitchedLabelPlaneMatrixInverse: i, + symbol: l, + fontSize: u, + flip: d, + keepUpright: g, + glyphOffsetArray: w, + dynamicLayoutVertexArray: C, + aspectRatio: P, + rotateToLine: E, + } = h, + R = u / 24, + D = l.lineOffsetX * R, + N = l.lineOffsetY * R; + let G; + if (l.numGlyphs > 1) { + const te = l.glyphStartIndex + l.numGlyphs, + Q = l.lineStartIndex, + ae = l.lineStartIndex + l.lineLength, + ce = Zr(R, w, D, N, d, l, E, e); + if (!ce) return { notEnoughRoom: !0 }; + const ve = Cr(ce.first.point.x, ce.first.point.y, e, i), + me = Cr(ce.last.point.x, ce.last.point.y, e, i); + if (g && !d) { + const be = mt(l.writingMode, ve, me, P); + if (be) return be; + } + G = [ce.first]; + for (let be = l.glyphStartIndex + 1; be < te - 1; be++) { + const Pe = pn( + R * w.getoffsetX(be), + D, + N, + d, + l.segment, + Q, + ae, + e, + E + ); + if (!Pe) return { notEnoughRoom: !0 }; + G.push(Pe); + } + G.push(ce.last); + } else { + if (g && !d) { + const Q = Jt( + e.tileAnchorPoint.x, + e.tileAnchorPoint.y, + e + ).point, + ae = l.lineStartIndex + l.segment + 1, + ce = new s.P( + e.lineVertexArray.getx(ae), + e.lineVertexArray.gety(ae) + ), + ve = Jt(ce.x, ce.y, e), + me = + ve.signedDistanceFromCamera > 0 + ? ve.point + : At(e.tileAnchorPoint, ce, Q, 1, e), + be = Cr(Q.x, Q.y, e, i), + Pe = Cr(me.x, me.y, e, i), + _e = mt(l.writingMode, be, Pe, P); + if (_e) return _e; + } + const te = pn( + R * w.getoffsetX(l.glyphStartIndex), + D, + N, + d, + l.segment, + l.lineStartIndex, + l.lineStartIndex + l.lineLength, + e, + E + ); + if (!te || e.projectionCache.anyProjectionOccluded) + return { notEnoughRoom: !0 }; + G = [te]; + } + for (const te of G) s.av(C, te.point, te.angle); + return {}; + } + function At(h, e, i, l, u) { + const d = h.add(h.sub(e)._unit()), + g = Jt(d.x, d.y, u).point, + w = i.sub(g); + return i.add(w._mult(l / w.mag())); + } + function Ft(h, e, i) { + const l = e.projectionCache; + if (l.projections[h]) return l.projections[h]; + const u = new s.P( + e.lineVertexArray.getx(h), + e.lineVertexArray.gety(h) + ), + d = Jt(u.x, u.y, e); + if (d.signedDistanceFromCamera > 0) + return ( + (l.projections[h] = d.point), + (l.anyProjectionOccluded = + l.anyProjectionOccluded || d.isOccluded), + d.point + ); + const g = h - i.direction; + return At( + i.distanceFromAnchor === 0 + ? e.tileAnchorPoint + : new s.P( + e.lineVertexArray.getx(g), + e.lineVertexArray.gety(g) + ), + u, + i.previousVertex, + i.absOffsetX - i.distanceFromAnchor + 1, + e + ); + } + function Jt(h, e, i) { + const l = h + i.translation[0], + u = e + i.translation[1]; + let d; + return ( + i.pitchWithMap + ? ((d = dr( + l, + u, + i.pitchedLabelPlaneMatrix, + i.getElevation + )), + (d.isOccluded = !1)) + : ((d = i.transform.projectTileCoordinates( + l, + u, + i.unwrappedTileID, + i.getElevation + )), + (d.point.x = (0.5 * d.point.x + 0.5) * i.width), + (d.point.y = (0.5 * -d.point.y + 0.5) * i.height)), + d + ); + } + function Cr(h, e, i, l) { + if (i.pitchWithMap) { + const u = [h, e, 0, 1]; + return ( + s.aw(u, u, l), + i.transform.projectTileCoordinates( + u[0] / u[3], + u[1] / u[3], + i.unwrappedTileID, + i.getElevation + ).point + ); + } + return { x: (h / i.width) * 2 - 1, y: 1 - (e / i.height) * 2 }; + } + function Er(h, e, i) { + return i.transform.projectTileCoordinates( + h, + e, + i.unwrappedTileID, + i.getElevation + ); + } + function ur(h, e, i) { + return h + ._unit() + ._perp() + ._mult(e * i); + } + function rn(h, e, i, l, u, d, g, w, C) { + if (w.projectionCache.offsets[h]) + return w.projectionCache.offsets[h]; + const P = i.add(e); + if (h + C.direction < l || h + C.direction >= u) + return (w.projectionCache.offsets[h] = P), P; + const E = Ft(h + C.direction, w, C), + R = ur(E.sub(i), g, C.direction), + D = i.add(R), + N = E.add(R); + return ( + (w.projectionCache.offsets[h] = s.ax(d, P, D, N) || P), + w.projectionCache.offsets[h] + ); + } + function pn(h, e, i, l, u, d, g, w, C) { + const P = l ? h - e : h + e; + let E = P > 0 ? 1 : -1, + R = 0; + l && ((E *= -1), (R = Math.PI)), E < 0 && (R += Math.PI); + let D, + N = E > 0 ? d + u : d + u + 1; + w.projectionCache.cachedAnchorPoint + ? (D = w.projectionCache.cachedAnchorPoint) + : ((D = Jt( + w.tileAnchorPoint.x, + w.tileAnchorPoint.y, + w + ).point), + (w.projectionCache.cachedAnchorPoint = D)); + let G, + te, + Q = D, + ae = D, + ce = 0, + ve = 0; + const me = Math.abs(P), + be = []; + let Pe; + for (; ce + ve <= me; ) { + if (((N += E), N < d || N >= g)) return null; + (ce += ve), (ae = Q), (te = G); + const rt = { + absOffsetX: me, + direction: E, + distanceFromAnchor: ce, + previousVertex: ae, + }; + if (((Q = Ft(N, w, rt)), i === 0)) + be.push(ae), (Pe = Q.sub(ae)); + else { + let Ge; + const Xe = Q.sub(ae); + (Ge = + Xe.mag() === 0 + ? ur(Ft(N + E, w, rt).sub(Q), i, E) + : ur(Xe, i, E)), + te || (te = ae.add(Ge)), + (G = rn(N, Ge, Q, d, g, te, i, w, rt)), + be.push(te), + (Pe = G.sub(te)); + } + ve = Pe.mag(); + } + const _e = Pe._mult((me - ce) / ve)._add(te || ae), + Be = R + Math.atan2(Q.y - ae.y, Q.x - ae.x); + return be.push(_e), { point: _e, angle: C ? Be : 0, path: be }; + } + const gn = new Float32Array([ + -1 / 0, + -1 / 0, + 0, + -1 / 0, + -1 / 0, + 0, + -1 / 0, + -1 / 0, + 0, + -1 / 0, + -1 / 0, + 0, + ]); + function ln(h, e) { + for (let i = 0; i < h; i++) { + const l = e.length; + e.resize(l + 4), e.float32.set(gn, 3 * l); + } + } + function En(h, e, i) { + const l = e[0], + u = e[1]; + return ( + (h[0] = i[0] * l + i[4] * u + i[12]), + (h[1] = i[1] * l + i[5] * u + i[13]), + (h[3] = i[3] * l + i[7] * u + i[15]), + h + ); + } + const pr = 100; + class In { + constructor( + e, + i = new mn(e.width + 200, e.height + 200, 25), + l = new mn(e.width + 200, e.height + 200, 25) + ) { + (this.transform = e), + (this.grid = i), + (this.ignoredGrid = l), + (this.pitchFactor = + Math.cos((e.pitch * Math.PI) / 180) * + e.cameraToCenterDistance), + (this.screenRightBoundary = e.width + pr), + (this.screenBottomBoundary = e.height + pr), + (this.gridRightBoundary = e.width + 200), + (this.gridBottomBoundary = e.height + 200), + (this.perspectiveRatioCutoff = 0.6); + } + placeCollisionBox(e, i, l, u, d, g, w, C, P, E, R, D) { + const N = this.projectAndGetPerspectiveRatio( + e.anchorPointX + C[0], + e.anchorPointY + C[1], + d, + E, + D + ), + G = l * N.perspectiveRatio; + let te; + if (g || w) + te = this._projectCollisionBox( + e, + G, + u, + d, + g, + w, + C, + N, + E, + R, + D + ); + else { + const Pe = N.x + (R ? R.x * G : 0), + _e = N.y + (R ? R.y * G : 0); + te = { + allPointsOccluded: !1, + box: [ + Pe + e.x1 * G, + _e + e.y1 * G, + Pe + e.x2 * G, + _e + e.y2 * G, + ], + }; + } + const [Q, ae, ce, ve] = te.box, + me = g ? te.allPointsOccluded : N.isOccluded; + let be = me; + return ( + be || + (be = N.perspectiveRatio < this.perspectiveRatioCutoff), + be || (be = !this.isInsideGrid(Q, ae, ce, ve)), + be || + (i !== "always" && this.grid.hitTest(Q, ae, ce, ve, i, P)) + ? { + box: [Q, ae, ce, ve], + placeable: !1, + offscreen: !1, + occluded: me, + } + : { + box: [Q, ae, ce, ve], + placeable: !0, + offscreen: this.isOffscreen(Q, ae, ce, ve), + occluded: me, + } + ); + } + placeCollisionCircles( + e, + i, + l, + u, + d, + g, + w, + C, + P, + E, + R, + D, + N, + G + ) { + const te = [], + Q = new s.P(i.anchorX, i.anchorY), + ae = this.getPerspectiveRatio(Q.x, Q.y, g, G), + ce = + (P + ? (d * + this.transform.getPitchedTextCorrection( + i.anchorX, + i.anchorY, + g + )) / + ae + : d * ae) / s.aB, + ve = { + getElevation: G, + pitchedLabelPlaneMatrix: w, + lineVertexArray: l, + pitchWithMap: P, + projectionCache: { + projections: {}, + offsets: {}, + cachedAnchorPoint: void 0, + anyProjectionOccluded: !1, + }, + transform: this.transform, + tileAnchorPoint: Q, + unwrappedTileID: g, + width: this.transform.width, + height: this.transform.height, + translation: N, + }, + me = Zr( + ce, + u, + i.lineOffsetX * ce, + i.lineOffsetY * ce, + !1, + i, + !1, + ve + ); + let be = !1, + Pe = !1, + _e = !0; + if (me) { + const Be = 0.5 * R * ae + D, + rt = new s.P(-100, -100), + Ge = new s.P( + this.screenRightBoundary, + this.screenBottomBoundary + ), + Xe = new Ur(), + tt = me.first, + jt = me.last; + let Zt = []; + for (let Jr = tt.path.length - 1; Jr >= 1; Jr--) + Zt.push(tt.path[Jr]); + for (let Jr = 1; Jr < jt.path.length; Jr++) + Zt.push(jt.path[Jr]); + const Tt = 2.5 * Be; + if (P) { + const Jr = this.projectPathToScreenSpace(Zt, ve); + Zt = Jr.some((An) => An.signedDistanceFromCamera <= 0) + ? [] + : Jr.map((An) => An.point); + } + let vr = []; + if (Zt.length > 0) { + const Jr = Zt[0].clone(), + An = Zt[0].clone(); + for (let Rn = 1; Rn < Zt.length; Rn++) + (Jr.x = Math.min(Jr.x, Zt[Rn].x)), + (Jr.y = Math.min(Jr.y, Zt[Rn].y)), + (An.x = Math.max(An.x, Zt[Rn].x)), + (An.y = Math.max(An.y, Zt[Rn].y)); + vr = + Jr.x >= rt.x && + An.x <= Ge.x && + Jr.y >= rt.y && + An.y <= Ge.y + ? [Zt] + : An.x < rt.x || + Jr.x > Ge.x || + An.y < rt.y || + Jr.y > Ge.y + ? [] + : s.ay([Zt], rt.x, rt.y, Ge.x, Ge.y); + } + for (const Jr of vr) { + Xe.reset(Jr, 0.25 * Be); + let An = 0; + An = + Xe.length <= 0.5 * Be + ? 1 + : Math.ceil(Xe.paddedLength / Tt) + 1; + for (let Rn = 0; Rn < An; Rn++) { + const Ln = Rn / Math.max(An - 1, 1), + Wn = Xe.lerp(Ln), + Jn = Wn.x + pr, + Kr = Wn.y + pr; + te.push(Jn, Kr, Be, 0); + const Bn = Jn - Be, + si = Kr - Be, + mi = Jn + Be, + Ci = Kr + Be; + if ( + ((_e = _e && this.isOffscreen(Bn, si, mi, Ci)), + (Pe = Pe || this.isInsideGrid(Bn, si, mi, Ci)), + e !== "always" && + this.grid.hitTestCircle(Jn, Kr, Be, e, E) && + ((be = !0), !C)) + ) + return { + circles: [], + offscreen: !1, + collisionDetected: be, + }; + } + } + } + return { + circles: + (!C && be) || !Pe || ae < this.perspectiveRatioCutoff + ? [] + : te, + offscreen: _e, + collisionDetected: be, + }; + } + projectPathToScreenSpace(e, i) { + const l = (function (u, d) { + const g = s.L(); + return ( + s.aq(g, d.pitchedLabelPlaneMatrix), + u.map((w) => { + const C = dr(w.x, w.y, g, d.getElevation), + P = d.transform.projectTileCoordinates( + C.point.x, + C.point.y, + d.unwrappedTileID, + d.getElevation + ); + return ( + (P.point.x = (0.5 * P.point.x + 0.5) * d.width), + (P.point.y = (0.5 * -P.point.y + 0.5) * d.height), + P + ); + }) + ); + })(e, i); + return (function (u) { + let d = 0, + g = 0, + w = 0, + C = 0; + for (let P = 0; P < u.length; P++) + u[P].isOccluded + ? ((w = P + 1), (C = 0)) + : (C++, C > g && ((g = C), (d = w))); + return u.slice(d, d + g); + })(l); + } + queryRenderedSymbols(e) { + if ( + e.length === 0 || + (this.grid.keysLength() === 0 && + this.ignoredGrid.keysLength() === 0) + ) + return {}; + const i = [], + l = new s.a2(); + for (const R of e) { + const D = new s.P(R.x + pr, R.y + pr); + l.extend(D), i.push(D); + } + const { minX: u, minY: d, maxX: g, maxY: w } = l, + C = this.grid + .query(u, d, g, w) + .concat(this.ignoredGrid.query(u, d, g, w)), + P = {}, + E = {}; + for (const R of C) { + const D = R.key; + if ( + (P[D.bucketInstanceId] === void 0 && + (P[D.bucketInstanceId] = {}), + P[D.bucketInstanceId][D.featureIndex]) + ) + continue; + const N = [ + new s.P(R.x1, R.y1), + new s.P(R.x2, R.y1), + new s.P(R.x2, R.y2), + new s.P(R.x1, R.y2), + ]; + s.az(i, N) && + ((P[D.bucketInstanceId][D.featureIndex] = !0), + E[D.bucketInstanceId] === void 0 && + (E[D.bucketInstanceId] = []), + E[D.bucketInstanceId].push(D.featureIndex)); + } + return E; + } + insertCollisionBox(e, i, l, u, d, g) { + (l ? this.ignoredGrid : this.grid).insert( + { + bucketInstanceId: u, + featureIndex: d, + collisionGroupID: g, + overlapMode: i, + }, + e[0], + e[1], + e[2], + e[3] + ); + } + insertCollisionCircles(e, i, l, u, d, g) { + const w = l ? this.ignoredGrid : this.grid, + C = { + bucketInstanceId: u, + featureIndex: d, + collisionGroupID: g, + overlapMode: i, + }; + for (let P = 0; P < e.length; P += 4) + w.insertCircle(C, e[P], e[P + 1], e[P + 2]); + } + projectAndGetPerspectiveRatio(e, i, l, u, d) { + if (d) { + let g; + u + ? ((g = [e, i, u(e, i), 1]), s.aw(g, g, d)) + : ((g = [e, i, 0, 1]), En(g, g, d)); + const w = g[3]; + return { + x: ((g[0] / w + 1) / 2) * this.transform.width + pr, + y: ((-g[1] / w + 1) / 2) * this.transform.height + pr, + perspectiveRatio: + 0.5 + (this.transform.cameraToCenterDistance / w) * 0.5, + isOccluded: !1, + signedDistanceFromCamera: w, + }; + } + { + const g = this.transform.projectTileCoordinates(e, i, l, u); + return { + x: ((g.point.x + 1) / 2) * this.transform.width + pr, + y: ((1 - g.point.y) / 2) * this.transform.height + pr, + perspectiveRatio: + 0.5 + + (this.transform.cameraToCenterDistance / + g.signedDistanceFromCamera) * + 0.5, + isOccluded: g.isOccluded, + signedDistanceFromCamera: g.signedDistanceFromCamera, + }; + } + } + getPerspectiveRatio(e, i, l, u) { + const d = this.transform.projectTileCoordinates(e, i, l, u); + return ( + 0.5 + + (this.transform.cameraToCenterDistance / + d.signedDistanceFromCamera) * + 0.5 + ); + } + isOffscreen(e, i, l, u) { + return ( + l < pr || + e >= this.screenRightBoundary || + u < pr || + i > this.screenBottomBoundary + ); + } + isInsideGrid(e, i, l, u) { + return ( + l >= 0 && + e < this.gridRightBoundary && + u >= 0 && + i < this.gridBottomBoundary + ); + } + getViewportMatrix() { + const e = s.ag([]); + return s.M(e, e, [-100, -100, 0]), e; + } + _projectCollisionBox(e, i, l, u, d, g, w, C, P, E, R) { + let D = 1, + N = 0, + G = 0, + te = 1; + const Q = e.anchorPointX + w[0], + ae = e.anchorPointY + w[1]; + if (g && !d) { + const Zt = this.projectAndGetPerspectiveRatio( + Q + 1, + ae, + u, + P, + R + ), + Tt = Zt.x - C.x, + vr = + Math.atan((Zt.y - C.y) / Tt) + (Tt < 0 ? Math.PI : 0), + Jr = Math.sin(vr), + An = Math.cos(vr); + (D = An), (N = Jr), (G = -Jr), (te = An); + } else if (!g && d) { + const Zt = Et(this.transform); + (D = Zt.vecEast[0]), + (N = Zt.vecEast[1]), + (G = Zt.vecSouth[0]), + (te = Zt.vecSouth[1]); + } + let ce = C.x, + ve = C.y, + me = i; + d && + ((ce = Q), + (ve = ae), + (me = Math.pow(2, -(this.transform.zoom - l.overscaledZ))), + (me *= this.transform.getPitchedTextCorrection(Q, ae, u)), + E || + (me *= s.ah( + 0.5 + + (C.signedDistanceFromCamera / + this.transform.cameraToCenterDistance) * + 0.5, + 0, + 4 + ))), + E && + ((ce += D * E.x * me + G * E.y * me), + (ve += N * E.x * me + te * E.y * me)); + const be = e.x1 * me, + Pe = e.x2 * me, + _e = (be + Pe) / 2, + Be = e.y1 * me, + rt = e.y2 * me, + Ge = (Be + rt) / 2, + Xe = [ + { offsetX: be, offsetY: Be }, + { offsetX: _e, offsetY: Be }, + { offsetX: Pe, offsetY: Be }, + { offsetX: Pe, offsetY: Ge }, + { offsetX: Pe, offsetY: rt }, + { offsetX: _e, offsetY: rt }, + { offsetX: be, offsetY: rt }, + { offsetX: be, offsetY: Ge }, + ]; + let tt = []; + for (const { offsetX: Zt, offsetY: Tt } of Xe) + tt.push( + new s.P(ce + D * Zt + G * Tt, ve + N * Zt + te * Tt) + ); + let jt = !1; + if (d) { + const Zt = tt.map((Tt) => + this.projectAndGetPerspectiveRatio(Tt.x, Tt.y, u, P, R) + ); + (jt = Zt.some((Tt) => !Tt.isOccluded)), + (tt = Zt.map((Tt) => new s.P(Tt.x, Tt.y))); + } else jt = !0; + return { box: s.aA(tt), allPointsOccluded: !jt }; + } + } + class tn { + constructor(e, i, l, u) { + (this.opacity = e + ? Math.max(0, Math.min(1, e.opacity + (e.placed ? i : -i))) + : u && l + ? 1 + : 0), + (this.placed = l); + } + isHidden() { + return this.opacity === 0 && !this.placed; + } + } + class en { + constructor(e, i, l, u, d) { + (this.text = new tn(e ? e.text : null, i, l, d)), + (this.icon = new tn(e ? e.icon : null, i, u, d)); + } + isHidden() { + return this.text.isHidden() && this.icon.isHidden(); + } + } + class ma { + constructor(e, i, l) { + (this.text = e), (this.icon = i), (this.skipFade = l); + } + } + class pi { + constructor(e, i, l, u, d) { + (this.bucketInstanceId = e), + (this.featureIndex = i), + (this.sourceLayerIndex = l), + (this.bucketIndex = u), + (this.tileID = d); + } + } + class Xi { + constructor(e) { + (this.crossSourceCollisions = e), + (this.maxGroupID = 0), + (this.collisionGroups = {}); + } + get(e) { + if (this.crossSourceCollisions) + return { ID: 0, predicate: null }; + if (!this.collisionGroups[e]) { + const i = ++this.maxGroupID; + this.collisionGroups[e] = { + ID: i, + predicate: (l) => l.collisionGroupID === i, + }; + } + return this.collisionGroups[e]; + } + } + function Zn(h, e, i, l, u) { + const { horizontalAlign: d, verticalAlign: g } = s.aH(h); + return new s.P( + -(d - 0.5) * e + l[0] * u, + -(g - 0.5) * i + l[1] * u + ); + } + class ni { + constructor(e, i, l, u, d) { + (this.transform = e.clone()), + (this.terrain = i), + (this.collisionIndex = new In(this.transform)), + (this.placements = {}), + (this.opacities = {}), + (this.variableOffsets = {}), + (this.stale = !1), + (this.commitTime = 0), + (this.fadeDuration = l), + (this.retainedQueryData = {}), + (this.collisionGroups = new Xi(u)), + (this.collisionCircleArrays = {}), + (this.collisionBoxArrays = new Map()), + (this.prevPlacement = d), + d && (d.prevPlacement = void 0), + (this.placedOrientations = {}); + } + _getTerrainElevationFunc(e) { + const i = this.terrain; + return i ? (l, u) => i.getElevation(e, l, u) : null; + } + getBucketParts(e, i, l, u) { + const d = l.getBucket(i), + g = l.latestFeatureIndex; + if (!d || !g || i.id !== d.layerIds[0]) return; + const w = l.collisionBoxArray, + C = d.layers[0].layout, + P = d.layers[0].paint, + E = Math.pow(2, this.transform.zoom - l.tileID.overscaledZ), + R = l.tileSize / s.$, + D = l.tileID.toUnwrapped(), + N = C.get("text-rotation-alignment") === "map", + G = s.aC(l, 1, this.transform.zoom), + te = s.aD( + this.collisionIndex.transform, + l, + P.get("text-translate"), + P.get("text-translate-anchor") + ), + Q = s.aD( + this.collisionIndex.transform, + l, + P.get("icon-translate"), + P.get("icon-translate-anchor") + ), + ae = _n(N, this.transform, G); + this.retainedQueryData[d.bucketInstanceId] = new pi( + d.bucketInstanceId, + g, + d.sourceLayerIndex, + d.index, + l.tileID + ); + const ce = { + bucket: d, + layout: C, + translationText: te, + translationIcon: Q, + unwrappedTileID: D, + pitchedLabelPlaneMatrix: ae, + scale: E, + textPixelRatio: R, + holdingForFade: l.holdingForFade(), + collisionBoxArray: w, + partiallyEvaluatedTextSize: s.an( + d.textSizeData, + this.transform.zoom + ), + collisionGroup: this.collisionGroups.get(d.sourceID), + }; + if (u) + for (const ve of d.sortKeyRanges) { + const { + sortKey: me, + symbolInstanceStart: be, + symbolInstanceEnd: Pe, + } = ve; + e.push({ + sortKey: me, + symbolInstanceStart: be, + symbolInstanceEnd: Pe, + parameters: ce, + }); + } + else + e.push({ + symbolInstanceStart: 0, + symbolInstanceEnd: d.symbolInstances.length, + parameters: ce, + }); + } + attemptAnchorPlacement( + e, + i, + l, + u, + d, + g, + w, + C, + P, + E, + R, + D, + N, + G, + te, + Q, + ae, + ce, + ve, + me + ) { + const be = s.aE[e.textAnchor], + Pe = [e.textOffset0, e.textOffset1], + _e = Zn(be, l, u, Pe, d), + Be = this.collisionIndex.placeCollisionBox( + i, + D, + C, + P, + E, + w, + g, + Q, + R.predicate, + ve, + _e, + me + ); + if ( + (!ce || + this.collisionIndex.placeCollisionBox( + ce, + D, + C, + P, + E, + w, + g, + ae, + R.predicate, + ve, + _e, + me + ).placeable) && + Be.placeable + ) { + let rt; + if ( + (this.prevPlacement && + this.prevPlacement.variableOffsets[N.crossTileID] && + this.prevPlacement.placements[N.crossTileID] && + this.prevPlacement.placements[N.crossTileID].text && + (rt = + this.prevPlacement.variableOffsets[N.crossTileID] + .anchor), + N.crossTileID === 0) + ) + throw new Error("symbolInstance.crossTileID can't be 0"); + return ( + (this.variableOffsets[N.crossTileID] = { + textOffset: Pe, + width: l, + height: u, + anchor: be, + textBoxScale: d, + prevAnchor: rt, + }), + this.markUsedJustification(G, be, N, te), + G.allowVerticalPlacement && + (this.markUsedOrientation(G, te, N), + (this.placedOrientations[N.crossTileID] = te)), + { shift: _e, placedGlyphBoxes: Be } + ); + } + } + placeLayerBucketPart(e, i, l) { + const { + bucket: u, + layout: d, + translationText: g, + translationIcon: w, + unwrappedTileID: C, + pitchedLabelPlaneMatrix: P, + textPixelRatio: E, + holdingForFade: R, + collisionBoxArray: D, + partiallyEvaluatedTextSize: N, + collisionGroup: G, + } = e.parameters, + te = d.get("text-optional"), + Q = d.get("icon-optional"), + ae = s.aF(d, "text-overlap", "text-allow-overlap"), + ce = ae === "always", + ve = s.aF(d, "icon-overlap", "icon-allow-overlap"), + me = ve === "always", + be = d.get("text-rotation-alignment") === "map", + Pe = d.get("text-pitch-alignment") === "map", + _e = d.get("icon-text-fit") !== "none", + Be = d.get("symbol-z-order") === "viewport-y", + rt = ce && (me || !u.hasIconData() || Q), + Ge = me && (ce || !u.hasTextData() || te); + !u.collisionArrays && D && u.deserializeCollisionBoxes(D); + const Xe = this.retainedQueryData[u.bucketInstanceId].tileID, + tt = this._getTerrainElevationFunc(Xe), + jt = this.transform.getFastPathSimpleProjectionMatrix(Xe), + Zt = (Tt, vr, Jr) => { + var An, Rn; + if (i[Tt.crossTileID]) return; + if (R) + return void (this.placements[Tt.crossTileID] = new ma( + !1, + !1, + !1 + )); + let Ln = !1, + Wn = !1, + Jn = !0, + Kr = null, + Bn = { + box: null, + placeable: !1, + offscreen: null, + occluded: !1, + }, + si = { placeable: !1 }, + mi = null, + Ci = null, + $i = null, + za = 0, + go = 0, + vo = 0; + vr.textFeatureIndex + ? (za = vr.textFeatureIndex) + : Tt.useRuntimeCollisionCircles && + (za = Tt.featureIndex), + vr.verticalTextFeatureIndex && + (go = vr.verticalTextFeatureIndex); + const fs = vr.textBox; + if (fs) { + const ta = (li) => { + let _i = s.ao.horizontal; + if ( + u.allowVerticalPlacement && + !li && + this.prevPlacement + ) { + const ba = + this.prevPlacement.placedOrientations[ + Tt.crossTileID + ]; + ba && + ((this.placedOrientations[Tt.crossTileID] = ba), + (_i = ba), + this.markUsedOrientation(u, _i, Tt)); + } + return _i; + }, + La = (li, _i) => { + if ( + u.allowVerticalPlacement && + Tt.numVerticalGlyphVertices > 0 && + vr.verticalTextBox + ) { + for (const ba of u.writingModes) + if ( + (ba === s.ao.vertical + ? ((Bn = _i()), (si = Bn)) + : (Bn = li()), + Bn && Bn.placeable) + ) + break; + } else Bn = li(); + }, + Gi = Tt.textAnchorOffsetStartIndex, + yo = Tt.textAnchorOffsetEndIndex; + if (yo === Gi) { + const li = (_i, ba) => { + const ci = this.collisionIndex.placeCollisionBox( + _i, + ae, + E, + Xe, + C, + Pe, + be, + g, + G.predicate, + tt, + void 0, + jt + ); + return ( + ci && + ci.placeable && + (this.markUsedOrientation(u, ba, Tt), + (this.placedOrientations[Tt.crossTileID] = ba)), + ci + ); + }; + La( + () => li(fs, s.ao.horizontal), + () => { + const _i = vr.verticalTextBox; + return u.allowVerticalPlacement && + Tt.numVerticalGlyphVertices > 0 && + _i + ? li(_i, s.ao.vertical) + : { box: null, offscreen: null }; + } + ), + ta(Bn && Bn.placeable); + } else { + let li = + s.aE[ + (Rn = + (An = this.prevPlacement) === null || + An === void 0 + ? void 0 + : An.variableOffsets[Tt.crossTileID]) === + null || Rn === void 0 + ? void 0 + : Rn.anchor + ]; + const _i = (ci, Qs, _s) => { + const ro = ci.x2 - ci.x1, + Da = ci.y2 - ci.y1, + xo = Tt.textBoxScale, + Cd = _e && ve === "never" ? Qs : null; + let la = null, + Sd = ae === "never" ? 1 : 2, + _u = "never"; + li && Sd++; + for (let Wl = 0; Wl < Sd; Wl++) { + for (let Xl = Gi; Xl < yo; Xl++) { + const bo = u.textAnchorOffsets.get(Xl); + if (li && bo.textAnchor !== li) continue; + const no = this.attemptAnchorPlacement( + bo, + ci, + ro, + Da, + xo, + be, + Pe, + E, + Xe, + C, + G, + _u, + Tt, + u, + _s, + g, + w, + Cd, + tt + ); + if ( + no && + ((la = no.placedGlyphBoxes), + la && la.placeable) + ) + return (Ln = !0), (Kr = no.shift), la; + } + li ? (li = null) : (_u = ae); + } + return ( + l && + !la && + (la = { + box: this.collisionIndex.placeCollisionBox( + fs, + "always", + E, + Xe, + C, + Pe, + be, + g, + G.predicate, + tt, + void 0, + jt + ).box, + offscreen: !1, + placeable: !1, + occluded: !1, + }), + la + ); + }; + La( + () => _i(fs, vr.iconBox, s.ao.horizontal), + () => { + const ci = vr.verticalTextBox; + return u.allowVerticalPlacement && + (!Bn || !Bn.placeable) && + Tt.numVerticalGlyphVertices > 0 && + ci + ? _i(ci, vr.verticalIconBox, s.ao.vertical) + : { box: null, occluded: !0, offscreen: null }; + } + ), + Bn && ((Ln = Bn.placeable), (Jn = Bn.offscreen)); + const ba = ta(Bn && Bn.placeable); + if (!Ln && this.prevPlacement) { + const ci = + this.prevPlacement.variableOffsets[ + Tt.crossTileID + ]; + ci && + ((this.variableOffsets[Tt.crossTileID] = ci), + this.markUsedJustification(u, ci.anchor, Tt, ba)); + } + } + } + if ( + ((mi = Bn), + (Ln = mi && mi.placeable), + (Jn = mi && mi.offscreen), + Tt.useRuntimeCollisionCircles) + ) { + const ta = u.text.placedSymbolArray.get( + Tt.centerJustifiedTextSymbolIndex + ), + La = s.ap(u.textSizeData, N, ta), + Gi = d.get("text-padding"); + (Ci = this.collisionIndex.placeCollisionCircles( + ae, + ta, + u.lineVertexArray, + u.glyphOffsetArray, + La, + C, + P, + l, + Pe, + G.predicate, + Tt.collisionCircleDiameter, + Gi, + g, + tt + )), + Ci.circles.length && + Ci.collisionDetected && + !l && + s.w( + "Collisions detected, but collision boxes are not shown" + ), + (Ln = + ce || + (Ci.circles.length > 0 && !Ci.collisionDetected)), + (Jn = Jn && Ci.offscreen); + } + if ( + (vr.iconFeatureIndex && (vo = vr.iconFeatureIndex), + vr.iconBox) + ) { + const ta = (La) => + this.collisionIndex.placeCollisionBox( + La, + ve, + E, + Xe, + C, + Pe, + be, + w, + G.predicate, + tt, + _e && Kr ? Kr : void 0, + jt + ); + si && si.placeable && vr.verticalIconBox + ? (($i = ta(vr.verticalIconBox)), (Wn = $i.placeable)) + : (($i = ta(vr.iconBox)), (Wn = $i.placeable)), + (Jn = Jn && $i.offscreen); + } + const ms = + te || + (Tt.numHorizontalGlyphVertices === 0 && + Tt.numVerticalGlyphVertices === 0), + Vo = Q || Tt.numIconVertices === 0; + ms || Vo + ? Vo + ? ms || (Wn = Wn && Ln) + : (Ln = Wn && Ln) + : (Wn = Ln = Wn && Ln); + const qo = Wn && $i.placeable; + if ( + (Ln && + mi.placeable && + this.collisionIndex.insertCollisionBox( + mi.box, + ae, + d.get("text-ignore-placement"), + u.bucketInstanceId, + si && si.placeable && go ? go : za, + G.ID + ), + qo && + this.collisionIndex.insertCollisionBox( + $i.box, + ve, + d.get("icon-ignore-placement"), + u.bucketInstanceId, + vo, + G.ID + ), + Ci && + Ln && + this.collisionIndex.insertCollisionCircles( + Ci.circles, + ae, + d.get("text-ignore-placement"), + u.bucketInstanceId, + za, + G.ID + ), + l && + this.storeCollisionData( + u.bucketInstanceId, + Jr, + vr, + mi, + $i, + Ci + ), + Tt.crossTileID === 0) + ) + throw new Error( + "symbolInstance.crossTileID can't be 0" + ); + if (u.bucketInstanceId === 0) + throw new Error("bucket.bucketInstanceId can't be 0"); + (this.placements[Tt.crossTileID] = new ma( + (Ln || rt) && !(mi != null && mi.occluded), + (Wn || Ge) && !($i != null && $i.occluded), + Jn || u.justReloaded + )), + (i[Tt.crossTileID] = !0); + }; + if (Be) { + if (e.symbolInstanceStart !== 0) + throw new Error("bucket.bucketInstanceId should be 0"); + const Tt = u.getSortedSymbolIndexes( + -this.transform.bearingInRadians + ); + for (let vr = Tt.length - 1; vr >= 0; --vr) { + const Jr = Tt[vr]; + Zt(u.symbolInstances.get(Jr), u.collisionArrays[Jr], Jr); + } + } else for (let Tt = e.symbolInstanceStart; Tt < e.symbolInstanceEnd; Tt++) Zt(u.symbolInstances.get(Tt), u.collisionArrays[Tt], Tt); + u.justReloaded = !1; + } + storeCollisionData(e, i, l, u, d, g) { + if (l.textBox || l.iconBox) { + let w, C; + this.collisionBoxArrays.has(e) + ? (w = this.collisionBoxArrays.get(e)) + : ((w = new Map()), this.collisionBoxArrays.set(e, w)), + w.has(i) + ? (C = w.get(i)) + : ((C = { text: null, icon: null }), w.set(i, C)), + l.textBox && (C.text = u.box), + l.iconBox && (C.icon = d.box); + } + if (g) { + let w = this.collisionCircleArrays[e]; + w === void 0 && (w = this.collisionCircleArrays[e] = []); + for (let C = 0; C < g.circles.length; C += 4) + w.push(g.circles[C + 0] - pr), + w.push(g.circles[C + 1] - pr), + w.push(g.circles[C + 2]), + w.push(g.collisionDetected ? 1 : 0); + } + } + markUsedJustification(e, i, l, u) { + let d; + d = + u === s.ao.vertical + ? l.verticalPlacedTextSymbolIndex + : { + left: l.leftJustifiedTextSymbolIndex, + center: l.centerJustifiedTextSymbolIndex, + right: l.rightJustifiedTextSymbolIndex, + }[s.aG(i)]; + const g = [ + l.leftJustifiedTextSymbolIndex, + l.centerJustifiedTextSymbolIndex, + l.rightJustifiedTextSymbolIndex, + l.verticalPlacedTextSymbolIndex, + ]; + for (const w of g) + w >= 0 && + (e.text.placedSymbolArray.get(w).crossTileID = + d >= 0 && w !== d ? 0 : l.crossTileID); + } + markUsedOrientation(e, i, l) { + const u = + i === s.ao.horizontal || i === s.ao.horizontalOnly + ? i + : 0, + d = i === s.ao.vertical ? i : 0, + g = [ + l.leftJustifiedTextSymbolIndex, + l.centerJustifiedTextSymbolIndex, + l.rightJustifiedTextSymbolIndex, + ]; + for (const w of g) + e.text.placedSymbolArray.get(w).placedOrientation = u; + l.verticalPlacedTextSymbolIndex && + (e.text.placedSymbolArray.get( + l.verticalPlacedTextSymbolIndex + ).placedOrientation = d); + } + commit(e) { + (this.commitTime = e), + (this.zoomAtLastRecencyCheck = this.transform.zoom); + const i = this.prevPlacement; + let l = !1; + this.prevZoomAdjustment = i + ? i.zoomAdjustment(this.transform.zoom) + : 0; + const u = i ? i.symbolFadeChange(e) : 1, + d = i ? i.opacities : {}, + g = i ? i.variableOffsets : {}, + w = i ? i.placedOrientations : {}; + for (const C in this.placements) { + const P = this.placements[C], + E = d[C]; + E + ? ((this.opacities[C] = new en(E, u, P.text, P.icon)), + (l = + l || + P.text !== E.text.placed || + P.icon !== E.icon.placed)) + : ((this.opacities[C] = new en( + null, + u, + P.text, + P.icon, + P.skipFade + )), + (l = l || P.text || P.icon)); + } + for (const C in d) { + const P = d[C]; + if (!this.opacities[C]) { + const E = new en(P, u, !1, !1); + E.isHidden() || + ((this.opacities[C] = E), + (l = l || P.text.placed || P.icon.placed)); + } + } + for (const C in g) + this.variableOffsets[C] || + !this.opacities[C] || + this.opacities[C].isHidden() || + (this.variableOffsets[C] = g[C]); + for (const C in w) + this.placedOrientations[C] || + !this.opacities[C] || + this.opacities[C].isHidden() || + (this.placedOrientations[C] = w[C]); + if (i && i.lastPlacementChangeTime === void 0) + throw new Error( + "Last placement time for previous placement is not defined" + ); + l + ? (this.lastPlacementChangeTime = e) + : typeof this.lastPlacementChangeTime != "number" && + (this.lastPlacementChangeTime = i + ? i.lastPlacementChangeTime + : e); + } + updateLayerOpacities(e, i) { + const l = {}; + for (const u of i) { + const d = u.getBucket(e); + d && + u.latestFeatureIndex && + e.id === d.layerIds[0] && + this.updateBucketOpacities( + d, + u.tileID, + l, + u.collisionBoxArray + ); + } + } + updateBucketOpacities(e, i, l, u) { + e.hasTextData() && + (e.text.opacityVertexArray.clear(), + (e.text.hasVisibleVertices = !1)), + e.hasIconData() && + (e.icon.opacityVertexArray.clear(), + (e.icon.hasVisibleVertices = !1)), + e.hasIconCollisionBoxData() && + e.iconCollisionBox.collisionVertexArray.clear(), + e.hasTextCollisionBoxData() && + e.textCollisionBox.collisionVertexArray.clear(); + const d = e.layers[0], + g = d.layout, + w = new en(null, 0, !1, !1, !0), + C = g.get("text-allow-overlap"), + P = g.get("icon-allow-overlap"), + E = + d._unevaluatedLayout.hasValue("text-variable-anchor") || + d._unevaluatedLayout.hasValue( + "text-variable-anchor-offset" + ), + R = g.get("text-rotation-alignment") === "map", + D = g.get("text-pitch-alignment") === "map", + N = g.get("icon-text-fit") !== "none", + G = new en( + null, + 0, + C && (P || !e.hasIconData() || g.get("icon-optional")), + P && (C || !e.hasTextData() || g.get("text-optional")), + !0 + ); + !e.collisionArrays && + u && + (e.hasIconCollisionBoxData() || + e.hasTextCollisionBoxData()) && + e.deserializeCollisionBoxes(u); + const te = (ae, ce, ve) => { + for (let me = 0; me < ce / 4; me++) + ae.opacityVertexArray.emplaceBack(ve); + ae.hasVisibleVertices = + ae.hasVisibleVertices || ve !== Br; + }, + Q = this.collisionBoxArrays.get(e.bucketInstanceId); + for (let ae = 0; ae < e.symbolInstances.length; ae++) { + const ce = e.symbolInstances.get(ae), + { + numHorizontalGlyphVertices: ve, + numVerticalGlyphVertices: me, + crossTileID: be, + } = ce; + let Pe = this.opacities[be]; + l[be] + ? (Pe = w) + : Pe || ((Pe = G), (this.opacities[be] = Pe)), + (l[be] = !0); + const _e = ce.numIconVertices > 0, + Be = this.placedOrientations[ce.crossTileID], + rt = Be === s.ao.vertical, + Ge = Be === s.ao.horizontal || Be === s.ao.horizontalOnly; + if (ve > 0 || me > 0) { + const tt = Xt(Pe.text); + te(e.text, ve, rt ? Br : tt), + te(e.text, me, Ge ? Br : tt); + const jt = Pe.text.isHidden(); + [ + ce.rightJustifiedTextSymbolIndex, + ce.centerJustifiedTextSymbolIndex, + ce.leftJustifiedTextSymbolIndex, + ].forEach((vr) => { + vr >= 0 && + (e.text.placedSymbolArray.get(vr).hidden = + jt || rt ? 1 : 0); + }), + ce.verticalPlacedTextSymbolIndex >= 0 && + (e.text.placedSymbolArray.get( + ce.verticalPlacedTextSymbolIndex + ).hidden = jt || Ge ? 1 : 0); + const Zt = this.variableOffsets[ce.crossTileID]; + Zt && this.markUsedJustification(e, Zt.anchor, ce, Be); + const Tt = this.placedOrientations[ce.crossTileID]; + Tt && + (this.markUsedJustification(e, "left", ce, Tt), + this.markUsedOrientation(e, Tt, ce)); + } + if (_e) { + const tt = Xt(Pe.icon), + jt = !(N && ce.verticalPlacedIconSymbolIndex && rt); + ce.placedIconSymbolIndex >= 0 && + (te(e.icon, ce.numIconVertices, jt ? tt : Br), + (e.icon.placedSymbolArray.get( + ce.placedIconSymbolIndex + ).hidden = Pe.icon.isHidden())), + ce.verticalPlacedIconSymbolIndex >= 0 && + (te(e.icon, ce.numVerticalIconVertices, jt ? Br : tt), + (e.icon.placedSymbolArray.get( + ce.verticalPlacedIconSymbolIndex + ).hidden = Pe.icon.isHidden())); + } + const Xe = + Q && Q.has(ae) ? Q.get(ae) : { text: null, icon: null }; + if ( + e.hasIconCollisionBoxData() || + e.hasTextCollisionBoxData() + ) { + const tt = e.collisionArrays[ae]; + if (tt) { + let jt = new s.P(0, 0); + if (tt.textBox || tt.verticalTextBox) { + let Zt = !0; + if (E) { + const Tt = this.variableOffsets[be]; + Tt + ? ((jt = Zn( + Tt.anchor, + Tt.width, + Tt.height, + Tt.textOffset, + Tt.textBoxScale + )), + R && + jt._rotate( + D + ? -this.transform.bearingInRadians + : this.transform.bearingInRadians + )) + : (Zt = !1); + } + if (tt.textBox || tt.verticalTextBox) { + let Tt; + tt.textBox && (Tt = rt), + tt.verticalTextBox && (Tt = Ge), + Zi( + e.textCollisionBox.collisionVertexArray, + Pe.text.placed, + !Zt || Tt, + Xe.text, + jt.x, + jt.y + ); + } + } + if (tt.iconBox || tt.verticalIconBox) { + const Zt = !!(!Ge && tt.verticalIconBox); + let Tt; + tt.iconBox && (Tt = Zt), + tt.verticalIconBox && (Tt = !Zt), + Zi( + e.iconCollisionBox.collisionVertexArray, + Pe.icon.placed, + Tt, + Xe.icon, + N ? jt.x : 0, + N ? jt.y : 0 + ); + } + } + } + } + if ( + (e.sortFeatures(-this.transform.bearingInRadians), + this.retainedQueryData[e.bucketInstanceId] && + (this.retainedQueryData[ + e.bucketInstanceId + ].featureSortOrder = e.featureSortOrder), + e.hasTextData() && + e.text.opacityVertexBuffer && + e.text.opacityVertexBuffer.updateData( + e.text.opacityVertexArray + ), + e.hasIconData() && + e.icon.opacityVertexBuffer && + e.icon.opacityVertexBuffer.updateData( + e.icon.opacityVertexArray + ), + e.hasIconCollisionBoxData() && + e.iconCollisionBox.collisionVertexBuffer && + e.iconCollisionBox.collisionVertexBuffer.updateData( + e.iconCollisionBox.collisionVertexArray + ), + e.hasTextCollisionBoxData() && + e.textCollisionBox.collisionVertexBuffer && + e.textCollisionBox.collisionVertexBuffer.updateData( + e.textCollisionBox.collisionVertexArray + ), + e.text.opacityVertexArray.length !== + e.text.layoutVertexArray.length / 4) + ) + throw new Error( + `bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4` + ); + if ( + e.icon.opacityVertexArray.length !== + e.icon.layoutVertexArray.length / 4 + ) + throw new Error( + `bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4` + ); + e.bucketInstanceId in this.collisionCircleArrays && + ((e.collisionCircleArray = + this.collisionCircleArrays[e.bucketInstanceId]), + delete this.collisionCircleArrays[e.bucketInstanceId]); + } + symbolFadeChange(e) { + return this.fadeDuration === 0 + ? 1 + : (e - this.commitTime) / this.fadeDuration + + this.prevZoomAdjustment; + } + zoomAdjustment(e) { + return Math.max(0, (this.transform.zoom - e) / 1.5); + } + hasTransitions(e) { + return ( + this.stale || + e - this.lastPlacementChangeTime < this.fadeDuration + ); + } + stillRecent(e, i) { + const l = + this.zoomAtLastRecencyCheck === i + ? 1 - this.zoomAdjustment(i) + : 1; + return ( + (this.zoomAtLastRecencyCheck = i), + this.commitTime + this.fadeDuration * l > e + ); + } + setStale() { + this.stale = !0; + } + } + function Zi(h, e, i, l, u, d) { + (l && l.length !== 0) || (l = [0, 0, 0, 0]); + const g = l[0] - pr, + w = l[1] - pr, + C = l[2] - pr, + P = l[3] - pr; + h.emplaceBack(e ? 1 : 0, i ? 1 : 0, u || 0, d || 0, g, w), + h.emplaceBack(e ? 1 : 0, i ? 1 : 0, u || 0, d || 0, C, w), + h.emplaceBack(e ? 1 : 0, i ? 1 : 0, u || 0, d || 0, C, P), + h.emplaceBack(e ? 1 : 0, i ? 1 : 0, u || 0, d || 0, g, P); + } + const Yi = Math.pow(2, 25), + Ei = Math.pow(2, 24), + zi = Math.pow(2, 17), + Ki = Math.pow(2, 16), + oa = Math.pow(2, 9), + Ta = Math.pow(2, 8), + bt = Math.pow(2, 1); + function Xt(h) { + if (h.opacity === 0 && !h.placed) return 0; + if (h.opacity === 1 && h.placed) return 4294967295; + const e = h.placed ? 1 : 0, + i = Math.floor(127 * h.opacity); + return ( + i * Yi + + e * Ei + + i * zi + + e * Ki + + i * oa + + e * Ta + + i * bt + + e + ); + } + const Br = 0; + class xn { + constructor(e) { + (this._sortAcrossTiles = + e.layout.get("symbol-z-order") !== "viewport-y" && + !e.layout.get("symbol-sort-key").isConstant()), + (this._currentTileIndex = 0), + (this._currentPartIndex = 0), + (this._seenCrossTileIDs = {}), + (this._bucketParts = []); + } + continuePlacement(e, i, l, u, d) { + const g = this._bucketParts; + for (; this._currentTileIndex < e.length; ) + if ( + (i.getBucketParts( + g, + u, + e[this._currentTileIndex], + this._sortAcrossTiles + ), + this._currentTileIndex++, + d()) + ) + return !0; + for ( + this._sortAcrossTiles && + ((this._sortAcrossTiles = !1), + g.sort((w, C) => w.sortKey - C.sortKey)); + this._currentPartIndex < g.length; + + ) + if ( + (i.placeLayerBucketPart( + g[this._currentPartIndex], + this._seenCrossTileIDs, + l + ), + this._currentPartIndex++, + d()) + ) + return !0; + return !1; + } + } + class On { + constructor(e, i, l, u, d, g, w, C) { + (this.placement = new ni(e, i, g, w, C)), + (this._currentPlacementIndex = l.length - 1), + (this._forceFullPlacement = u), + (this._showCollisionBoxes = d), + (this._done = !1); + } + isDone() { + return this._done; + } + continuePlacement(e, i, l) { + const u = ne.now(), + d = () => !this._forceFullPlacement && ne.now() - u > 2; + for (; this._currentPlacementIndex >= 0; ) { + const g = i[e[this._currentPlacementIndex]], + w = this.placement.collisionIndex.transform.zoom; + if ( + g.type === "symbol" && + (!g.minzoom || g.minzoom <= w) && + (!g.maxzoom || g.maxzoom > w) + ) { + if ( + (this._inProgressLayer || + (this._inProgressLayer = new xn(g)), + this._inProgressLayer.continuePlacement( + l[g.source], + this.placement, + this._showCollisionBoxes, + g, + d + )) + ) + return; + delete this._inProgressLayer; + } + this._currentPlacementIndex--; + } + this._done = !0; + } + commit(e) { + return this.placement.commit(e), this.placement; + } + } + const Yn = 512 / s.$ / 2; + class Vn { + constructor(e, i, l) { + (this.tileID = e), + (this.bucketInstanceId = l), + (this._symbolsByKey = {}); + const u = new Map(); + for (let d = 0; d < i.length; d++) { + const g = i.get(d), + w = g.key, + C = u.get(w); + C ? C.push(g) : u.set(w, [g]); + } + for (const [d, g] of u) { + const w = { + positions: g.map((C) => ({ + x: Math.floor(C.anchorX * Yn), + y: Math.floor(C.anchorY * Yn), + })), + crossTileIDs: g.map((C) => C.crossTileID), + }; + if (w.positions.length > 128) { + const C = new s.aI(w.positions.length, 16, Uint16Array); + for (const { x: P, y: E } of w.positions) C.add(P, E); + C.finish(), delete w.positions, (w.index = C); + } + this._symbolsByKey[d] = w; + } + } + getScaledCoordinates(e, i) { + const { x: l, y: u, z: d } = this.tileID.canonical, + { x: g, y: w, z: C } = i.canonical, + P = Yn / Math.pow(2, C - d), + E = (w * s.$ + e.anchorY) * P, + R = u * s.$ * Yn; + return { + x: Math.floor((g * s.$ + e.anchorX) * P - l * s.$ * Yn), + y: Math.floor(E - R), + }; + } + findMatches(e, i, l) { + const u = + this.tileID.canonical.z < i.canonical.z + ? 1 + : Math.pow(2, this.tileID.canonical.z - i.canonical.z); + for (let d = 0; d < e.length; d++) { + const g = e.get(d); + if (g.crossTileID) continue; + const w = this._symbolsByKey[g.key]; + if (!w) continue; + const C = this.getScaledCoordinates(g, i); + if (w.index) { + const P = w.index + .range(C.x - u, C.y - u, C.x + u, C.y + u) + .sort(); + for (const E of P) { + const R = w.crossTileIDs[E]; + if (!l[R]) { + (l[R] = !0), (g.crossTileID = R); + break; + } + } + } else if (w.positions) + for (let P = 0; P < w.positions.length; P++) { + const E = w.positions[P], + R = w.crossTileIDs[P]; + if ( + Math.abs(E.x - C.x) <= u && + Math.abs(E.y - C.y) <= u && + !l[R] + ) { + (l[R] = !0), (g.crossTileID = R); + break; + } + } + } + } + getCrossTileIDsLists() { + return Object.values(this._symbolsByKey).map( + ({ crossTileIDs: e }) => e + ); + } + } + class wn { + constructor() { + this.maxCrossTileID = 0; + } + generate() { + return ++this.maxCrossTileID; + } + } + class Ji { + constructor() { + (this.indexes = {}), + (this.usedCrossTileIDs = {}), + (this.lng = 0); + } + handleWrapJump(e) { + const i = Math.round((e - this.lng) / 360); + if (i !== 0) + for (const l in this.indexes) { + const u = this.indexes[l], + d = {}; + for (const g in u) { + const w = u[g]; + (w.tileID = w.tileID.unwrapTo(w.tileID.wrap + i)), + (d[w.tileID.key] = w); + } + this.indexes[l] = d; + } + this.lng = e; + } + addBucket(e, i, l) { + if ( + this.indexes[e.overscaledZ] && + this.indexes[e.overscaledZ][e.key] + ) { + if ( + this.indexes[e.overscaledZ][e.key].bucketInstanceId === + i.bucketInstanceId + ) + return !1; + this.removeBucketCrossTileIDs( + e.overscaledZ, + this.indexes[e.overscaledZ][e.key] + ); + } + for (let d = 0; d < i.symbolInstances.length; d++) + i.symbolInstances.get(d).crossTileID = 0; + this.usedCrossTileIDs[e.overscaledZ] || + (this.usedCrossTileIDs[e.overscaledZ] = {}); + const u = this.usedCrossTileIDs[e.overscaledZ]; + for (const d in this.indexes) { + const g = this.indexes[d]; + if (Number(d) > e.overscaledZ) + for (const w in g) { + const C = g[w]; + C.tileID.isChildOf(e) && + C.findMatches(i.symbolInstances, e, u); + } + else { + const w = g[e.scaledTo(Number(d)).key]; + w && w.findMatches(i.symbolInstances, e, u); + } + } + for (let d = 0; d < i.symbolInstances.length; d++) { + const g = i.symbolInstances.get(d); + g.crossTileID || + ((g.crossTileID = l.generate()), (u[g.crossTileID] = !0)); + } + return ( + this.indexes[e.overscaledZ] === void 0 && + (this.indexes[e.overscaledZ] = {}), + (this.indexes[e.overscaledZ][e.key] = new Vn( + e, + i.symbolInstances, + i.bucketInstanceId + )), + !0 + ); + } + removeBucketCrossTileIDs(e, i) { + for (const l of i.getCrossTileIDsLists()) + for (const u of l) delete this.usedCrossTileIDs[e][u]; + } + removeStaleBuckets(e) { + let i = !1; + for (const l in this.indexes) { + const u = this.indexes[l]; + for (const d in u) + e[u[d].bucketInstanceId] || + (this.removeBucketCrossTileIDs(l, u[d]), + delete u[d], + (i = !0)); + } + return i; + } + } + class sr { + constructor() { + (this.layerIndexes = {}), + (this.crossTileIDs = new wn()), + (this.maxBucketInstanceId = 0), + (this.bucketsInCurrentPlacement = {}); + } + addLayer(e, i, l) { + let u = this.layerIndexes[e.id]; + u === void 0 && (u = this.layerIndexes[e.id] = new Ji()); + let d = !1; + const g = {}; + u.handleWrapJump(l); + for (const w of i) { + const C = w.getBucket(e); + C && + e.id === C.layerIds[0] && + (C.bucketInstanceId || + (C.bucketInstanceId = ++this.maxBucketInstanceId), + u.addBucket(w.tileID, C, this.crossTileIDs) && (d = !0), + (g[C.bucketInstanceId] = !0)); + } + return u.removeStaleBuckets(g) && (d = !0), d; + } + pruneUnusedLayers(e) { + const i = {}; + e.forEach((l) => { + i[l] = !0; + }); + for (const l in this.layerIndexes) + i[l] || delete this.layerIndexes[l]; + } + } + var Ut = "void main() {fragColor=vec4(1.0);}"; + const $r = { + prelude: lr( + `#ifdef GL_ES +precision mediump float; +#else +#if !defined(lowp) +#define lowp +#endif +#if !defined(mediump) +#define mediump +#endif +#if !defined(highp) +#define highp +#endif +#endif +out highp vec4 fragColor;`, + `#ifdef GL_ES +precision highp float; +#else +#if !defined(lowp) +#define lowp +#endif +#if !defined(mediump) +#define mediump +#endif +#if !defined(highp) +#define highp +#endif +#endif +vec2 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 +);}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);return (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 +);} +#ifdef TERRAIN3D +uniform 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; +#endif +const 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) { +#ifdef TERRAIN3D +highp 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)); +#else +return 1.0; +#endif +}float calculate_visibility(vec4 pos) { +#ifdef TERRAIN3D +vec3 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; +#else +return 1.0; +#endif +}float ele(vec2 pos) { +#ifdef TERRAIN3D +vec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; +#else +return 0.0; +#endif +}float get_elevation(vec2 pos) { +#ifdef TERRAIN3D +#ifdef GLOBE +if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;} +#endif +vec2 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; +#else +return 0.0; +#endif +}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;` + ), + projectionMercator: lr( + "", + "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: lr( + "", + `#define GLOBE_RADIUS 6371008.8 +uniform 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 +);}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); +if (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 +);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: lr( + `uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`, + "in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}" + ), + backgroundPattern: lr( + `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;uniform 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; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`, + "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: lr( + `in vec3 v_data;in float v_visibility; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define mediump float radius +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define highp vec4 stroke_color +#pragma mapbox: define mediump float stroke_width +#pragma mapbox: define lowp float stroke_opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize mediump float radius +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize highp vec4 stroke_color +#pragma mapbox: initialize mediump float stroke_width +#pragma mapbox: initialize lowp float stroke_opacity +vec2 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;} +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`, + `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; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define mediump float radius +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define highp vec4 stroke_color +#pragma mapbox: define mediump float stroke_width +#pragma mapbox: define lowp float stroke_opacity +void main(void) { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize mediump float radius +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize highp vec4 stroke_color +#pragma mapbox: initialize mediump float stroke_width +#pragma mapbox: initialize lowp float stroke_opacity +vec2 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) { +#ifdef GLOBE +vec3 center_vector=projectToSphere(circle_center); +#endif +float 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 { +#ifdef GLOBE +vec4 projected_center=interpolateProjection(circle_center,center_vector,ele); +#else +vec4 projected_center=projectTileWithElevation(circle_center,ele); +#endif +corner_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);} +#ifdef GLOBE +vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele); +#else +gl_Position=projectTileWithElevation(corner_position,ele); +#endif +} 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: lr( + Ut, + "in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}" + ), + heatmap: lr( + `uniform highp float u_intensity;in vec2 v_extrude; +#pragma mapbox: define highp float weight +#define GAUSS_COEF 0.3989422804014327 +void main() { +#pragma mapbox: initialize highp float weight +float 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); +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`, + `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; +#pragma mapbox: define highp float weight +#pragma mapbox: define mediump float radius +const highp float ZERO=1.0/255.0/16.0; +#define GAUSS_COEF 0.3989422804014327 +void main(void) { +#pragma mapbox: initialize highp float weight +#pragma mapbox: initialize mediump float radius +vec2 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); +#ifdef GLOBE +vec2 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); +#else +gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center)); +#endif +}` + ), + heatmapTexture: lr( + `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; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(0.0); +#endif +}`, + "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: lr( + "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: lr( + "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: lr( + `#ifdef GL_ES +precision highp float; +#endif +uniform 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 +{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)); +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`, + "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: lr( + "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: lr( + Ut, + `in vec2 a_pos;void main() { +#ifdef GLOBE +gl_Position=projectTileFor3D(a_pos,0.0); +#else +gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0); +#endif +}` + ), + fill: lr( + `#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float opacity +fragColor=color*opacity; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`, + `uniform vec2 u_fill_translate;in vec2 a_pos; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float opacity +gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}` + ), + fillOutline: lr( + `in vec2 v_pos; +#ifdef GLOBE +in float v_depth; +#endif +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 outline_color +#pragma mapbox: initialize lowp float opacity +float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`, + `uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos; +#ifdef GLOBE +out float v_depth; +#endif +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 outline_color +#pragma mapbox: initialize lowp float opacity +gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +}` + ), + fillOutlinePattern: lr( + `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; +#ifdef GLOBE +in float v_depth; +#endif +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +vec2 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; +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`, + `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; +#ifdef GLOBE +out float v_depth; +#endif +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 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; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +}` + ), + fillPattern: lr( + `#ifdef GL_ES +precision highp float; +#endif +uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +vec2 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; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`, + `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; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 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;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: lr( + `in vec4 v_color;void main() {fragColor=v_color; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`, + `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; +#ifdef TERRAIN3D +in vec2 a_centroid; +#endif +out vec4 v_color; +#pragma mapbox: define highp float base +#pragma mapbox: define highp float height +#pragma mapbox: define highp vec4 color +void main() { +#pragma mapbox: initialize highp float base +#pragma mapbox: initialize highp float height +#pragma mapbox: initialize highp vec4 color +vec3 normal=a_normal_ed.xyz; +#ifdef TERRAIN3D +float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); +#else +float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; +#endif +base=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; +#ifdef GLOBE +vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); +#else +gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); +#endif +float 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); +#ifdef GLOBE +mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition); +#endif +directional=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: lr( + `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; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 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; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`, + `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; +#ifdef TERRAIN3D +in vec2 a_centroid; +#endif +#ifdef GLOBE +out vec3 v_sphere_pos; +#endif +out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 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; +#ifdef TERRAIN3D +float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); +#else +float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; +#endif +base=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; +#ifdef GLOBE +vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); +#else +gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); +#endif +vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 +? a_pos +: 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: lr( + `#ifdef GL_ES +precision highp float; +#endif +uniform 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/pow(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); +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`, + "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: lr( + `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]; +#define PI 3.141592653589793 +#define STANDARD 0 +#define COMBINED 1 +#define IGOR 2 +#define MULTIDIRECTIONAL 3 +#define BASIC 4 +float 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 +{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 +{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);} +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`, + "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: lr( + `uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale; +#ifdef GLOBE +in float v_depth; +#endif +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +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);fragColor=color*(alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`, + ` +#define scale 0.015873016 +in 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; +#ifdef GLOBE +out float v_depth; +#endif +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float 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);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; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float 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; +#endif +v_width2=vec2(outset,inset);}` + ), + lineGradient: lr( + `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; +#ifdef GLOBE +in float v_depth; +#endif +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +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);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`, + ` +#define scale 0.015873016 +in 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; +#ifdef GLOBE +out float v_depth; +#endif +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float 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; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float 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; +#endif +v_width2=vec2(outset,inset);}` + ), + linePattern: lr( + `#ifdef GL_ES +precision highp float; +#endif +uniform 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; +#ifdef GLOBE +in float v_depth; +#endif +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +vec2 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; +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`, + ` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +in 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; +#ifdef GLOBE +out float v_depth; +#endif +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +float 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; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float 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; +#endif +v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}` + ), + lineSDF: lr( + `uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;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; +#ifdef GLOBE +in float v_depth; +#endif +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +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 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);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`, + ` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +in 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_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale; +#ifdef GLOBE +out float v_depth; +#endif +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float 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; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float 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; +#endif +v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}` + ), + raster: lr( + `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); +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`, + `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; +#ifdef GLOBE +if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;} +#endif +v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}` + ), + symbolIcon: lr( + `uniform sampler2D u_texture;in vec2 v_tex;in float v_fade_opacity; +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +lowp float alpha=opacity*v_fade_opacity;fragColor=texture(u_texture,v_tex)*alpha; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`, + `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_fade_opacity; +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +vec2 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);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_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; +#ifdef GLOBE +if(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);} +#endif +vec4 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;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_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}` + ), + symbolSDF: lr( + `#define SDF_PX 8.0 +uniform bool u_is_halo;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; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float 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 fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}fragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`, + `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; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 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;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);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_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; +#ifdef GLOBE +if(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);} +#endif +vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*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;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));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}` + ), + symbolTextAndIcon: lr( + `#define SDF_PX 8.0 +#define SDF 1.0 +#define ICON 0.0 +uniform bool u_is_halo;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; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;fragColor=texture(u_texture_icon,tex_icon)*alpha; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +return;}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;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);fragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`, + `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; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 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);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_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; +#ifdef GLOBE +if(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);} +#endif +vec4 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;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));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}` + ), + terrain: lr( + "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 && 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);float 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,get_elevation(a_pos3d.xy)-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: lr( + "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: lr( + "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: lr( + "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: lr( + `in 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 +);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: lr( + "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);}" + ), + }; + function lr(h, e) { + const i = /#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g, + l = e.match(/in ([\w]+) ([\w]+)/g), + u = h.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g), + d = e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g), + g = d ? d.concat(u) : u, + w = {}; + return { + fragmentSource: (h = h.replace( + i, + (C, P, E, R, D) => ( + (w[D] = !0), + P === "define" + ? ` +#ifndef HAS_UNIFORM_u_${D} +in ${E} ${R} ${D}; +#else +uniform ${E} ${R} u_${D}; +#endif +` + : ` +#ifdef HAS_UNIFORM_u_${D} + ${E} ${R} ${D} = u_${D}; +#endif +` + ) + )), + vertexSource: (e = e.replace(i, (C, P, E, R, D) => { + const N = R === "float" ? "vec2" : "vec4", + G = D.match(/color/) ? "color" : N; + return w[D] + ? P === "define" + ? ` +#ifndef HAS_UNIFORM_u_${D} +uniform lowp float u_${D}_t; +in ${E} ${N} a_${D}; +out ${E} ${R} ${D}; +#else +uniform ${E} ${R} u_${D}; +#endif +` + : G === "vec4" + ? ` +#ifndef HAS_UNIFORM_u_${D} + ${D} = a_${D}; +#else + ${E} ${R} ${D} = u_${D}; +#endif +` + : ` +#ifndef HAS_UNIFORM_u_${D} + ${D} = unpack_mix_${G}(a_${D}, u_${D}_t); +#else + ${E} ${R} ${D} = u_${D}; +#endif +` + : P === "define" + ? ` +#ifndef HAS_UNIFORM_u_${D} +uniform lowp float u_${D}_t; +in ${E} ${N} a_${D}; +#else +uniform ${E} ${R} u_${D}; +#endif +` + : G === "vec4" + ? ` +#ifndef HAS_UNIFORM_u_${D} + ${E} ${R} ${D} = a_${D}; +#else + ${E} ${R} ${D} = u_${D}; +#endif +` + : ` +#ifndef HAS_UNIFORM_u_${D} + ${E} ${R} ${D} = unpack_mix_${G}(a_${D}, u_${D}_t); +#else + ${E} ${R} ${D} = u_${D}; +#endif +`; + })), + staticAttributes: l, + staticUniforms: g, + }; + } + class Tn { + constructor(e, i, l) { + (this.vertexBuffer = e), + (this.indexBuffer = i), + (this.segments = l); + } + destroy() { + this.vertexBuffer.destroy(), + this.indexBuffer.destroy(), + this.segments.destroy(), + (this.vertexBuffer = null), + (this.indexBuffer = null), + (this.segments = null); + } + } + var an = s.aJ([{ name: "a_pos", type: "Int16", components: 2 }]); + const Cn = "#define PROJECTION_MERCATOR", + Gn = "mercator"; + class Mr { + constructor() { + this._cachedMesh = null; + } + get name() { + return "mercator"; + } + get useSubdivision() { + return !1; + } + get shaderVariantName() { + return Gn; + } + get shaderDefine() { + return Cn; + } + get shaderPreludeCode() { + return $r.projectionMercator; + } + get vertexShaderPreludeCode() { + return $r.projectionMercator.vertexSource; + } + get subdivisionGranularity() { + return s.aK.noSubdivision; + } + get useGlobeControls() { + return !1; + } + get transitionState() { + return 0; + } + get latitudeErrorCorrectionRadians() { + return 0; + } + destroy() {} + updateGPUdependent(e) {} + getMeshFromTileID(e, i, l, u, d) { + if (this._cachedMesh) return this._cachedMesh; + const g = new s.aL(); + g.emplaceBack(0, 0), + g.emplaceBack(s.$, 0), + g.emplaceBack(0, s.$), + g.emplaceBack(s.$, s.$); + const w = e.createVertexBuffer(g, an.members), + C = s.aM.simpleSegment(0, 0, 4, 2), + P = new s.aN(); + P.emplaceBack(1, 0, 2), P.emplaceBack(1, 2, 3); + const E = e.createIndexBuffer(P); + return (this._cachedMesh = new Tn(w, E, C)), this._cachedMesh; + } + recalculate() {} + hasTransition() { + return !1; + } + setErrorQueryLatitudeDegrees(e) {} + } + class Mn { + constructor(e = 0, i = 0, l = 0, u = 0) { + if ( + isNaN(e) || + e < 0 || + isNaN(i) || + i < 0 || + isNaN(l) || + l < 0 || + isNaN(u) || + u < 0 + ) + throw new Error( + "Invalid value for edge-insets, top, bottom, left and right must all be numbers" + ); + (this.top = e), + (this.bottom = i), + (this.left = l), + (this.right = u); + } + interpolate(e, i, l) { + return ( + i.top != null && + e.top != null && + (this.top = s.C.number(e.top, i.top, l)), + i.bottom != null && + e.bottom != null && + (this.bottom = s.C.number(e.bottom, i.bottom, l)), + i.left != null && + e.left != null && + (this.left = s.C.number(e.left, i.left, l)), + i.right != null && + e.right != null && + (this.right = s.C.number(e.right, i.right, l)), + this + ); + } + getCenter(e, i) { + const l = s.ah((this.left + e - this.right) / 2, 0, e), + u = s.ah((this.top + i - this.bottom) / 2, 0, i); + return new s.P(l, u); + } + equals(e) { + return ( + this.top === e.top && + this.bottom === e.bottom && + this.left === e.left && + this.right === e.right + ); + } + clone() { + return new Mn(this.top, this.bottom, this.left, this.right); + } + toJSON() { + return { + top: this.top, + bottom: this.bottom, + left: this.left, + right: this.right, + }; + } + } + function bn(h, e) { + if (!h.renderWorldCopies || h.lngRange) return; + const i = e.lng - h.center.lng; + e.lng += i > 180 ? -360 : i < -180 ? 360 : 0; + } + function cn(h) { + return Math.max(0, Math.floor(h)); + } + class Sn { + constructor(e, i, l, u, d, g) { + (this._callbacks = e), + (this._tileSize = 512), + (this._renderWorldCopies = g === void 0 || !!g), + (this._minZoom = i || 0), + (this._maxZoom = l || 22), + (this._minPitch = u ?? 0), + (this._maxPitch = d ?? 60), + this.setMaxBounds(), + (this._width = 0), + (this._height = 0), + (this._center = new s.S(0, 0)), + (this._elevation = 0), + (this._zoom = 0), + (this._tileZoom = cn(this._zoom)), + (this._scale = s.af(this._zoom)), + (this._bearingInRadians = 0), + (this._fovInRadians = 0.6435011087932844), + (this._pitchInRadians = 0), + (this._rollInRadians = 0), + (this._unmodified = !0), + (this._edgeInsets = new Mn()), + (this._minElevationForCurrentTile = 0), + (this._autoCalculateNearFarZ = !0); + } + apply(e, i, l) { + (this._latRange = e.latRange), + (this._lngRange = e.lngRange), + (this._width = e.width), + (this._height = e.height), + (this._center = e.center), + (this._elevation = e.elevation), + (this._minElevationForCurrentTile = + e.minElevationForCurrentTile), + (this._zoom = e.zoom), + (this._tileZoom = cn(this._zoom)), + (this._scale = s.af(this._zoom)), + (this._bearingInRadians = e.bearingInRadians), + (this._fovInRadians = e.fovInRadians), + (this._pitchInRadians = e.pitchInRadians), + (this._rollInRadians = e.rollInRadians), + (this._unmodified = e.unmodified), + (this._edgeInsets = new Mn( + e.padding.top, + e.padding.bottom, + e.padding.left, + e.padding.right + )), + (this._minZoom = e.minZoom), + (this._maxZoom = e.maxZoom), + (this._minPitch = e.minPitch), + (this._maxPitch = e.maxPitch), + (this._renderWorldCopies = e.renderWorldCopies), + (this._cameraToCenterDistance = e.cameraToCenterDistance), + (this._nearZ = e.nearZ), + (this._farZ = e.farZ), + (this._autoCalculateNearFarZ = + !l && e.autoCalculateNearFarZ), + i && this._constrain(), + this._calcMatrices(); + } + get pixelsToClipSpaceMatrix() { + return this._pixelsToClipSpaceMatrix; + } + get clipSpaceToPixelsMatrix() { + return this._clipSpaceToPixelsMatrix; + } + get minElevationForCurrentTile() { + return this._minElevationForCurrentTile; + } + setMinElevationForCurrentTile(e) { + this._minElevationForCurrentTile = e; + } + 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(e) { + this._minZoom !== e && + ((this._minZoom = e), + this.setZoom( + this.getConstrained(this._center, this.zoom).zoom + )); + } + get maxZoom() { + return this._maxZoom; + } + setMaxZoom(e) { + this._maxZoom !== e && + ((this._maxZoom = e), + this.setZoom( + this.getConstrained(this._center, this.zoom).zoom + )); + } + get minPitch() { + return this._minPitch; + } + setMinPitch(e) { + this._minPitch !== e && + ((this._minPitch = e), + this.setPitch(Math.max(this.pitch, e))); + } + get maxPitch() { + return this._maxPitch; + } + setMaxPitch(e) { + this._maxPitch !== e && + ((this._maxPitch = e), + this.setPitch(Math.min(this.pitch, e))); + } + get renderWorldCopies() { + return this._renderWorldCopies; + } + setRenderWorldCopies(e) { + e === void 0 ? (e = !0) : e === null && (e = !1), + (this._renderWorldCopies = e); + } + get worldSize() { + return this._tileSize * this._scale; + } + get centerOffset() { + return this.centerPoint._sub(this.size._div(2)); + } + get size() { + return new s.P(this._width, this._height); + } + get bearing() { + return (this._bearingInRadians / Math.PI) * 180; + } + setBearing(e) { + const i = (s.aO(e, -180, 180) * Math.PI) / 180; + var l, u, d, g, w, C, P, E, R; + this._bearingInRadians !== i && + ((this._unmodified = !1), + (this._bearingInRadians = i), + this._calcMatrices(), + (this._rotationMatrix = O()), + (l = this._rotationMatrix), + (d = -this._bearingInRadians), + (g = (u = this._rotationMatrix)[0]), + (w = u[1]), + (C = u[2]), + (P = u[3]), + (E = Math.sin(d)), + (R = Math.cos(d)), + (l[0] = g * R + C * E), + (l[1] = w * R + P * E), + (l[2] = g * -E + C * R), + (l[3] = w * -E + P * R)); + } + get rotationMatrix() { + return this._rotationMatrix; + } + get pitchInRadians() { + return this._pitchInRadians; + } + get pitch() { + return (this._pitchInRadians / Math.PI) * 180; + } + setPitch(e) { + const i = + (s.ah(e, this.minPitch, this.maxPitch) / 180) * Math.PI; + this._pitchInRadians !== i && + ((this._unmodified = !1), + (this._pitchInRadians = i), + this._calcMatrices()); + } + get rollInRadians() { + return this._rollInRadians; + } + get roll() { + return (this._rollInRadians / Math.PI) * 180; + } + setRoll(e) { + const i = (e / 180) * Math.PI; + this._rollInRadians !== i && + ((this._unmodified = !1), + (this._rollInRadians = i), + this._calcMatrices()); + } + get fovInRadians() { + return this._fovInRadians; + } + get fov() { + return s.aP(this._fovInRadians); + } + setFov(e) { + (e = s.ah(e, 0.1, 150)), + this.fov !== e && + ((this._unmodified = !1), + (this._fovInRadians = s.ae(e)), + this._calcMatrices()); + } + get zoom() { + return this._zoom; + } + setZoom(e) { + const i = this.getConstrained(this._center, e).zoom; + this._zoom !== i && + ((this._unmodified = !1), + (this._zoom = i), + (this._tileZoom = Math.max(0, Math.floor(i))), + (this._scale = s.af(i)), + this._constrain(), + this._calcMatrices()); + } + get center() { + return this._center; + } + setCenter(e) { + (e.lat === this._center.lat && e.lng === this._center.lng) || + ((this._unmodified = !1), + (this._center = e), + this._constrain(), + this._calcMatrices()); + } + get elevation() { + return this._elevation; + } + setElevation(e) { + e !== this._elevation && + ((this._elevation = e), + this._constrain(), + this._calcMatrices()); + } + get padding() { + return this._edgeInsets.toJSON(); + } + setPadding(e) { + this._edgeInsets.equals(e) || + ((this._unmodified = !1), + this._edgeInsets.interpolate(this._edgeInsets, e, 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(e, i) { + (this._autoCalculateNearFarZ = !1), + (this._nearZ = e), + (this._farZ = i), + this._calcMatrices(); + } + clearNearFarZOverride() { + (this._autoCalculateNearFarZ = !0), this._calcMatrices(); + } + isPaddingEqual(e) { + return this._edgeInsets.equals(e); + } + interpolatePadding(e, i, l) { + (this._unmodified = !1), + this._edgeInsets.interpolate(e, i, l), + this._constrain(), + this._calcMatrices(); + } + resize(e, i, l = !0) { + (this._width = e), + (this._height = i), + l && this._constrain(), + this._calcMatrices(); + } + getMaxBounds() { + return this._latRange && + this._latRange.length === 2 && + this._lngRange && + this._lngRange.length === 2 + ? new _t( + [this._lngRange[0], this._latRange[0]], + [this._lngRange[1], this._latRange[1]] + ) + : null; + } + setMaxBounds(e) { + e + ? ((this._lngRange = [e.getWest(), e.getEast()]), + (this._latRange = [e.getSouth(), e.getNorth()]), + this._constrain()) + : ((this._lngRange = null), + (this._latRange = [-s.ai, s.ai])); + } + getConstrained(e, i) { + return this._callbacks.getConstrained(e, i); + } + getCameraQueryGeometry(e, i) { + if (i.length === 1) return [i[0], e]; + { + const { + minX: l, + minY: u, + maxX: d, + maxY: g, + } = s.a2.fromPoints(i).extend(e); + return [ + new s.P(l, u), + new s.P(d, u), + new s.P(d, g), + new s.P(l, g), + new s.P(l, u), + ]; + } + } + _constrain() { + if ( + !this.center || + !this._width || + !this._height || + this._constraining + ) + return; + this._constraining = !0; + const e = this._unmodified, + { center: i, zoom: l } = this.getConstrained( + this.center, + this.zoom + ); + this.setCenter(i), + this.setZoom(l), + (this._unmodified = e), + (this._constraining = !1); + } + _calcMatrices() { + if (this._width && this._height) { + this._pixelsToGLUnits = [ + 2 / this._width, + -2 / this._height, + ]; + let e = s.ag(new Float64Array(16)); + s.N(e, e, [this._width / 2, -this._height / 2, 1]), + s.M(e, e, [1, -1, 0]), + (this._clipSpaceToPixelsMatrix = e), + (e = s.ag(new Float64Array(16))), + s.N(e, e, [1, -1, 1]), + s.M(e, e, [-1, -1, 0]), + s.N(e, e, [2 / this._width, 2 / this._height, 1]), + (this._pixelsToClipSpaceMatrix = e), + (this._cameraToCenterDistance = + (0.5 / Math.tan(this.fovInRadians / 2)) * this._height); + } + this._callbacks.calcMatrices(); + } + calculateCenterFromCameraLngLatAlt(e, i, l, u) { + const d = l !== void 0 ? l : this.bearing, + g = (u = u !== void 0 ? u : this.pitch), + w = s.a1.fromLngLat(e, i), + C = -Math.cos(s.ae(g)), + P = Math.sin(s.ae(g)), + E = P * Math.sin(s.ae(d)), + R = -P * Math.cos(s.ae(d)); + let D = this.elevation; + const N = i - D; + let G; + C * N >= 0 || Math.abs(C) < 0.1 + ? ((G = 1e4), (D = i + G * C)) + : (G = -N / C); + let te, + Q, + ae = s.aQ(1, w.y), + ce = 0; + do { + if (((ce += 1), ce > 10)) break; + (Q = G / ae), + (te = new s.a1(w.x + E * Q, w.y + R * Q)), + (ae = 1 / te.meterInMercatorCoordinateUnits()); + } while (Math.abs(G - Q * ae) > 1e-12); + return { + center: te.toLngLat(), + elevation: D, + zoom: s.ak( + this.height / + 2 / + Math.tan(this.fovInRadians / 2) / + Q / + this.tileSize + ), + }; + } + recalculateZoomAndCenter(e) { + if (this.elevation - e == 0) return; + const i = s.aj(1, this.center.lat) * this.worldSize, + l = this.cameraToCenterDistance / i, + u = s.a1.fromLngLat(this.center, this.elevation), + d = Me( + this.center, + this.elevation, + this.pitch, + this.bearing, + l + ); + this._elevation = e; + const g = this.calculateCenterFromCameraLngLatAlt( + d.toLngLat(), + s.aQ(d.z, u.y), + this.bearing, + this.pitch + ); + (this._elevation = g.elevation), + (this._center = g.center), + this.setZoom(g.zoom); + } + getCameraPoint() { + const e = + Math.tan(this.pitchInRadians) * + (this.cameraToCenterDistance || 1); + return this.centerPoint.add( + new s.P( + e * Math.sin(this.rollInRadians), + e * Math.cos(this.rollInRadians) + ) + ); + } + getCameraAltitude() { + return ( + (Math.cos(this.pitchInRadians) * + this._cameraToCenterDistance) / + this._pixelPerMeter + + this.elevation + ); + } + getCameraLngLat() { + const e = s.aj(1, this.center.lat) * this.worldSize; + return Me( + this.center, + this.elevation, + this.pitch, + this.bearing, + this.cameraToCenterDistance / e + ).toLngLat(); + } + getMercatorTileCoordinates(e) { + if (!e) return [0, 0, 1, 1]; + const i = + e.canonical.z >= 0 + ? 1 << e.canonical.z + : Math.pow(2, e.canonical.z); + return [ + e.canonical.x / i, + e.canonical.y / i, + 1 / i / s.$, + 1 / i / s.$, + ]; + } + } + class kn { + constructor(e, i) { + (this.min = e), + (this.max = i), + (this.center = s.aR([], s.aS([], this.min, this.max), 0.5)); + } + quadrant(e) { + const i = [e % 2 == 0, e < 2], + l = s.aT(this.min), + u = s.aT(this.max); + for (let d = 0; d < i.length; d++) + (l[d] = i[d] ? this.min[d] : this.center[d]), + (u[d] = i[d] ? this.center[d] : this.max[d]); + return (u[2] = this.max[2]), new kn(l, u); + } + distanceX(e) { + return ( + Math.max(Math.min(this.max[0], e[0]), this.min[0]) - e[0] + ); + } + distanceY(e) { + return ( + Math.max(Math.min(this.max[1], e[1]), this.min[1]) - e[1] + ); + } + intersectsFrustum(e) { + let i = !0; + for (let l = 0; l < e.planes.length; l++) { + const u = this.intersectsPlane(e.planes[l]); + if (u === 0) return 0; + u === 1 && (i = !1); + } + return i + ? 2 + : e.aabb.min[0] > this.max[0] || + e.aabb.min[1] > this.max[1] || + e.aabb.min[2] > this.max[2] || + e.aabb.max[0] < this.min[0] || + e.aabb.max[1] < this.min[1] || + e.aabb.max[2] < this.min[2] + ? 0 + : 1; + } + intersectsPlane(e) { + let i = e[3], + l = e[3]; + for (let u = 0; u < 3; u++) + e[u] > 0 + ? ((i += e[u] * this.min[u]), (l += e[u] * this.max[u])) + : ((l += e[u] * this.min[u]), (i += e[u] * this.max[u])); + return i >= 0 ? 2 : l < 0 ? 0 : 1; + } + } + class vn { + distanceToTile2d(e, i, l, u) { + const d = u.distanceX([e, i]), + g = u.distanceY([e, i]); + return Math.hypot(d, g); + } + getWrap(e, i, l) { + return l; + } + getTileBoundingVolume(e, i, l, u) { + var d, g; + let w = 0, + C = 0; + if (u != null && u.terrain) { + const E = new s.Z(e.z, i, e.z, e.x, e.y), + R = u.terrain.getMinMaxElevation(E); + (w = + (d = R.minElevation) !== null && d !== void 0 + ? d + : Math.min(0, l)), + (C = + (g = R.maxElevation) !== null && g !== void 0 + ? g + : Math.max(0, l)); + } + const P = 1 << e.z; + return new kn( + [i + e.x / P, e.y / P, w], + [i + (e.x + 1) / P, (e.y + 1) / P, C] + ); + } + allowVariableZoom(e, i) { + const l = + (e.fov * + (Math.abs(Math.cos(e.rollInRadians)) * e.height + + Math.abs(Math.sin(e.rollInRadians)) * e.width)) / + e.height, + u = s.ah(78.5 - l / 2, 0, 60); + return !!i.terrain || e.pitch > u; + } + allowWorldCopies() { + return !0; + } + prepareNextFrame() {} + } + class fn { + constructor(e, i, l) { + (this.points = e), (this.planes = i), (this.aabb = l); + } + static fromInvProjectionMatrix(e, i = 1, l = 0, u, d) { + const g = d + ? [ + [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], + ], + w = Math.pow(2, l), + C = [ + [-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((D) => + (function (N, G, te, Q) { + const ae = s.aw([], N, G), + ce = (1 / ae[3] / te) * Q; + return s.aY(ae, ae, [ce, ce, 1 / ae[3], ce]); + })(D, e, i, w) + ); + u && + (function (D, N, G, te) { + const Q = te ? 4 : 0, + ae = te ? 0 : 4; + let ce = 0; + const ve = [], + me = []; + for (let _e = 0; _e < 4; _e++) { + const Be = s.aU([], D[_e + ae], D[_e + Q]), + rt = s.aZ(Be); + s.aR(Be, Be, 1 / rt), ve.push(rt), me.push(Be); + } + for (let _e = 0; _e < 4; _e++) { + const Be = s.a_(D[_e + Q], me[_e], G); + ce = + Be !== null && Be >= 0 + ? Math.max(ce, Be) + : Math.max(ce, ve[_e]); + } + const be = (function (_e, Be) { + const rt = s.aU([], _e[Be[0]], _e[Be[1]]), + Ge = s.aU([], _e[Be[2]], _e[Be[1]]), + Xe = [0, 0, 0, 0]; + return ( + s.aV(Xe, s.aW([], rt, Ge)), + (Xe[3] = -s.aX(Xe, _e[Be[0]])), + Xe + ); + })(D, N), + Pe = (function (_e, Be) { + const rt = s.a$(_e), + Ge = s.b0([], _e, 1 / rt), + Xe = s.aU([], Be, s.aR([], Ge, s.aX(Be, Ge))), + tt = s.a$(Xe); + if (tt > 0) { + const jt = Math.sqrt(1 - Ge[3] * Ge[3]), + Zt = s.aR([], Ge, -Ge[3]), + Tt = s.aS([], Zt, s.aR([], Xe, jt / tt)); + return s.b1(Be, Tt); + } + return null; + })(G, be); + if (Pe !== null) { + const _e = Pe / s.aX(me[0], be); + ce = Math.min(ce, _e); + } + for (let _e = 0; _e < 4; _e++) { + const Be = Math.min(ce, ve[_e]); + D[_e + ae] = [ + D[_e + Q][0] + me[_e][0] * Be, + D[_e + Q][1] + me[_e][1] * Be, + D[_e + Q][2] + me[_e][2] * Be, + 1, + ]; + } + })(C, g[0], u, d); + const P = g.map((D) => { + const N = s.aU([], C[D[0]], C[D[1]]), + G = s.aU([], C[D[2]], C[D[1]]), + te = s.aV([], s.aW([], N, G)), + Q = -s.aX(te, C[D[1]]); + return te.concat(Q); + }), + E = [ + Number.POSITIVE_INFINITY, + Number.POSITIVE_INFINITY, + Number.POSITIVE_INFINITY, + ], + R = [ + Number.NEGATIVE_INFINITY, + Number.NEGATIVE_INFINITY, + Number.NEGATIVE_INFINITY, + ]; + for (const D of C) + for (let N = 0; N < 3; N++) + (E[N] = Math.min(E[N], D[N])), + (R[N] = Math.max(R[N], D[N])); + return new fn(C, P, new kn(E, R)); + } + } + class on { + 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(e) { + this._helper.setMinZoom(e); + } + setMaxZoom(e) { + this._helper.setMaxZoom(e); + } + setMinPitch(e) { + this._helper.setMinPitch(e); + } + setMaxPitch(e) { + this._helper.setMaxPitch(e); + } + setRenderWorldCopies(e) { + this._helper.setRenderWorldCopies(e); + } + setBearing(e) { + this._helper.setBearing(e); + } + setPitch(e) { + this._helper.setPitch(e); + } + setRoll(e) { + this._helper.setRoll(e); + } + setFov(e) { + this._helper.setFov(e); + } + setZoom(e) { + this._helper.setZoom(e); + } + setCenter(e) { + this._helper.setCenter(e); + } + setElevation(e) { + this._helper.setElevation(e); + } + setMinElevationForCurrentTile(e) { + this._helper.setMinElevationForCurrentTile(e); + } + setPadding(e) { + this._helper.setPadding(e); + } + interpolatePadding(e, i, l) { + return this._helper.interpolatePadding(e, i, l); + } + isPaddingEqual(e) { + return this._helper.isPaddingEqual(e); + } + resize(e, i, l = !0) { + this._helper.resize(e, i, l); + } + getMaxBounds() { + return this._helper.getMaxBounds(); + } + setMaxBounds(e) { + this._helper.setMaxBounds(e); + } + overrideNearFarZ(e, i) { + this._helper.overrideNearFarZ(e, i); + } + clearNearFarZOverride() { + this._helper.clearNearFarZOverride(); + } + getCameraQueryGeometry(e) { + return this._helper.getCameraQueryGeometry( + this.getCameraPoint(), + e + ); + } + 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 nearZ() { + return this._helper.nearZ; + } + get farZ() { + return this._helper.farZ; + } + get autoCalculateNearFarZ() { + return this._helper.autoCalculateNearFarZ; + } + setTransitionState(e, i) {} + constructor(e, i, l, u, d) { + (this._posMatrixCache = new Map()), + (this._alignedPosMatrixCache = new Map()), + (this._fogMatrixCacheF32 = new Map()), + (this._helper = new Sn( + { + calcMatrices: () => { + this._calcMatrices(); + }, + getConstrained: (g, w) => this.getConstrained(g, w), + }, + e, + i, + l, + u, + d + )), + (this._coveringTilesDetailsProvider = new vn()); + } + clone() { + const e = new on(); + return e.apply(this), e; + } + apply(e, i, l) { + this._helper.apply(e, i, l); + } + 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(e) { + const i = [new s.b2(0, e)]; + if (this._helper._renderWorldCopies) { + const l = this.screenPointToMercatorCoordinate( + new s.P(0, 0) + ), + u = this.screenPointToMercatorCoordinate( + new s.P(this._helper._width, 0) + ), + d = this.screenPointToMercatorCoordinate( + new s.P(this._helper._width, this._helper._height) + ), + g = this.screenPointToMercatorCoordinate( + new s.P(0, this._helper._height) + ), + w = Math.floor(Math.min(l.x, u.x, d.x, g.x)), + C = Math.floor(Math.max(l.x, u.x, d.x, g.x)), + P = 1; + for (let E = w - P; E <= C + P; E++) + E !== 0 && i.push(new s.b2(E, e)); + } + return i; + } + getCameraFrustum() { + return fn.fromInvProjectionMatrix( + this._invViewProjMatrix, + this.worldSize + ); + } + getClippingPlane() { + return null; + } + getCoveringTilesDetailsProvider() { + return this._coveringTilesDetailsProvider; + } + recalculateZoomAndCenter(e) { + const i = this.screenPointToLocation(this.centerPoint, e), + l = e + ? e.getElevationForLngLatZoom(i, this._helper._tileZoom) + : 0; + this._helper.recalculateZoomAndCenter(l); + } + setLocationAtPoint(e, i) { + const l = s.aj(this.elevation, this.center.lat), + u = this.screenPointToMercatorCoordinateAtZ(i, l), + d = this.screenPointToMercatorCoordinateAtZ( + this.centerPoint, + l + ), + g = s.a1.fromLngLat(e), + w = new s.a1(g.x - (u.x - d.x), g.y - (u.y - d.y)); + this.setCenter(w == null ? void 0 : w.toLngLat()), + this._helper._renderWorldCopies && + this.setCenter(this.center.wrap()); + } + locationToScreenPoint(e, i) { + return i + ? this.coordinatePoint( + s.a1.fromLngLat(e), + i.getElevationForLngLatZoom(e, this._helper._tileZoom), + this._pixelMatrix3D + ) + : this.coordinatePoint(s.a1.fromLngLat(e)); + } + screenPointToLocation(e, i) { + var l; + return (l = this.screenPointToMercatorCoordinate(e, i)) === + null || l === void 0 + ? void 0 + : l.toLngLat(); + } + screenPointToMercatorCoordinate(e, i) { + if (i) { + const l = i.pointCoordinate(e); + if (l != null) return l; + } + return this.screenPointToMercatorCoordinateAtZ(e); + } + screenPointToMercatorCoordinateAtZ(e, i) { + const l = i || 0, + u = [e.x, e.y, 0, 1], + d = [e.x, e.y, 1, 1]; + s.aw(u, u, this._pixelMatrixInverse), + s.aw(d, d, this._pixelMatrixInverse); + const g = u[3], + w = d[3], + C = u[1] / g, + P = d[1] / w, + E = u[2] / g, + R = d[2] / w, + D = E === R ? 0 : (l - E) / (R - E); + return new s.a1( + s.C.number(u[0] / g, d[0] / w, D) / this.worldSize, + s.C.number(C, P, D) / this.worldSize, + l + ); + } + coordinatePoint(e, i = 0, l = this._pixelMatrix) { + const u = [e.x * this.worldSize, e.y * this.worldSize, i, 1]; + return s.aw(u, u, l), new s.P(u[0] / u[3], u[1] / u[3]); + } + getBounds() { + const e = Math.max(0, this._helper._height / 2 - pe(this)); + return new _t() + .extend(this.screenPointToLocation(new s.P(0, e))) + .extend( + this.screenPointToLocation( + new s.P(this._helper._width, e) + ) + ) + .extend( + this.screenPointToLocation( + new s.P(this._helper._width, this._helper._height) + ) + ) + .extend( + this.screenPointToLocation( + new s.P(0, this._helper._height) + ) + ); + } + isPointOnMapSurface(e, i) { + return i + ? i.pointCoordinate(e) != null + : e.y > this.height / 2 - pe(this); + } + calculatePosMatrix(e, i = !1, l) { + var u; + const d = + (u = e.key) !== null && u !== void 0 + ? u + : s.b3( + e.wrap, + e.canonical.z, + e.canonical.z, + e.canonical.x, + e.canonical.y + ), + g = i ? this._alignedPosMatrixCache : this._posMatrixCache; + if (g.has(d)) { + const P = g.get(d); + return l ? P.f32 : P.f64; + } + const w = Se(e, this.worldSize); + s.O(w, i ? this._alignedProjMatrix : this._viewProjMatrix, w); + const C = { f64: w, f32: new Float32Array(w) }; + return g.set(d, C), l ? C.f32 : C.f64; + } + calculateFogMatrix(e) { + const i = e.key, + l = this._fogMatrixCacheF32; + if (l.has(i)) return l.get(i); + const u = Se(e, this.worldSize); + return ( + s.O(u, this._fogMatrix, u), + l.set(i, new Float32Array(u)), + l.get(i) + ); + } + getConstrained(e, i) { + i = s.ah(+i, this.minZoom, this.maxZoom); + const l = { center: new s.S(e.lng, e.lat), zoom: i }; + let u = this._helper._lngRange; + if (!this._helper._renderWorldCopies && u === null) { + const ve = 179.9999999999; + u = [-ve, ve]; + } + const d = this.tileSize * s.af(l.zoom); + let g = 0, + w = d, + C = 0, + P = d, + E = 0, + R = 0; + const { x: D, y: N } = this.size; + if (this._helper._latRange) { + const ve = this._helper._latRange; + (g = s.U(ve[1]) * d), + (w = s.U(ve[0]) * d), + w - g < N && (E = N / (w - g)); + } + u && + ((C = s.aO(s.V(u[0]) * d, 0, d)), + (P = s.aO(s.V(u[1]) * d, 0, d)), + P < C && (P += d), + P - C < D && (R = D / (P - C))); + const { x: G, y: te } = Y(d, e); + let Q, ae; + const ce = Math.max(R || 0, E || 0); + if (ce) { + const ve = new s.P( + R ? (P + C) / 2 : G, + E ? (w + g) / 2 : te + ); + return ( + (l.center = ie(d, ve).wrap()), (l.zoom += s.ak(ce)), l + ); + } + if (this._helper._latRange) { + const ve = N / 2; + te - ve < g && (ae = g + ve), te + ve > w && (ae = w - ve); + } + if (u) { + const ve = (C + P) / 2; + let me = G; + this._helper._renderWorldCopies && + (me = s.aO(G, ve - d / 2, ve + d / 2)); + const be = D / 2; + me - be < C && (Q = C + be), me + be > P && (Q = P - be); + } + if (Q !== void 0 || ae !== void 0) { + const ve = new s.P(Q ?? G, ae ?? te); + l.center = ie(d, ve).wrap(); + } + return l; + } + calculateCenterFromCameraLngLatAlt(e, i, l, u) { + return this._helper.calculateCenterFromCameraLngLatAlt( + e, + i, + l, + u + ); + } + _calculateNearFarZIfNeeded(e, i, l) { + if (!this._helper.autoCalculateNearFarZ) return; + const u = Math.min( + this.elevation, + this.minElevationForCurrentTile, + this.getCameraAltitude() - 100 + ), + d = e - (u * this._helper._pixelPerMeter) / Math.cos(i), + g = u < 0 ? d : e, + w = Math.PI / 2 + this.pitchInRadians, + C = + ((s.ae(this.fov) * + (Math.abs(Math.cos(s.ae(this.roll))) * this.height + + Math.abs(Math.sin(s.ae(this.roll))) * this.width)) / + this.height) * + (0.5 + l.y / this.height), + P = + (Math.sin(C) * g) / + Math.sin(s.ah(Math.PI - w - C, 0.01, Math.PI - 0.01)), + E = pe(this), + R = Math.atan(E / this._helper.cameraToCenterDistance), + D = s.ae(0.75), + N = R > D ? 2 * R * (0.5 + l.y / (2 * E)) : D, + G = + (Math.sin(N) * g) / + Math.sin(s.ah(Math.PI - w - N, 0.01, Math.PI - 0.01)), + te = Math.min(P, G); + (this._helper._farZ = + 1.01 * (Math.cos(Math.PI / 2 - i) * te + g)), + (this._helper._nearZ = this._helper._height / 50); + } + _calcMatrices() { + if (!this._helper._height) return; + const e = this.centerOffset, + i = Y(this.worldSize, this.center), + l = i.x, + u = i.y; + this._helper._pixelPerMeter = + s.aj(1, this.center.lat) * this.worldSize; + const d = s.ae(Math.min(this.pitch, U)), + g = Math.max( + this._helper.cameraToCenterDistance / 2, + this._helper.cameraToCenterDistance + + (this._helper._elevation * + this._helper._pixelPerMeter) / + Math.cos(d) + ); + let w; + this._calculateNearFarZIfNeeded(g, d, e), + (w = new Float64Array(16)), + s.b4( + w, + this.fovInRadians, + this._helper._width / this._helper._height, + this._helper._nearZ, + this._helper._farZ + ), + (this._invProjMatrix = new Float64Array(16)), + s.aq(this._invProjMatrix, w), + (w[8] = (2 * -e.x) / this._helper._width), + (w[9] = (2 * e.y) / this._helper._height), + (this._projectionMatrix = s.b5(w)), + s.N(w, w, [1, -1, 1]), + s.M(w, w, [0, 0, -this._helper.cameraToCenterDistance]), + s.b6(w, w, -this.rollInRadians), + s.b7(w, w, this.pitchInRadians), + s.b6(w, w, -this.bearingInRadians), + s.M(w, w, [-l, -u, 0]), + (this._mercatorMatrix = s.N([], w, [ + this.worldSize, + this.worldSize, + this.worldSize, + ])), + s.N(w, w, [1, 1, this._helper._pixelPerMeter]), + (this._pixelMatrix = s.O( + new Float64Array(16), + this.clipSpaceToPixelsMatrix, + w + )), + s.M(w, w, [0, 0, -this.elevation]), + (this._viewProjMatrix = w), + (this._invViewProjMatrix = s.aq([], w)); + const C = [0, 0, -1, 1]; + s.aw(C, C, this._invViewProjMatrix), + (this._cameraPosition = [ + C[0] / C[3], + C[1] / C[3], + C[2] / C[3], + ]), + (this._fogMatrix = new Float64Array(16)), + s.b4( + this._fogMatrix, + this.fovInRadians, + this.width / this.height, + g, + this._helper._farZ + ), + (this._fogMatrix[8] = (2 * -e.x) / this.width), + (this._fogMatrix[9] = (2 * e.y) / this.height), + s.N(this._fogMatrix, this._fogMatrix, [1, -1, 1]), + s.M(this._fogMatrix, this._fogMatrix, [ + 0, + 0, + -this.cameraToCenterDistance, + ]), + s.b6(this._fogMatrix, this._fogMatrix, -this.rollInRadians), + s.b7(this._fogMatrix, this._fogMatrix, this.pitchInRadians), + s.b6( + this._fogMatrix, + this._fogMatrix, + -this.bearingInRadians + ), + s.M(this._fogMatrix, this._fogMatrix, [-l, -u, 0]), + s.N(this._fogMatrix, this._fogMatrix, [ + 1, + 1, + this._helper._pixelPerMeter, + ]), + s.M(this._fogMatrix, this._fogMatrix, [ + 0, + 0, + -this.elevation, + ]), + (this._pixelMatrix3D = s.O( + new Float64Array(16), + this.clipSpaceToPixelsMatrix, + w + )); + const P = (this._helper._width % 2) / 2, + E = (this._helper._height % 2) / 2, + R = Math.cos(this.bearingInRadians), + D = Math.sin(-this.bearingInRadians), + N = l - Math.round(l) + R * P + D * E, + G = u - Math.round(u) + R * E + D * P, + te = new Float64Array(w); + if ( + (s.M(te, te, [N > 0.5 ? N - 1 : N, G > 0.5 ? G - 1 : G, 0]), + (this._alignedProjMatrix = te), + (w = s.aq(new Float64Array(16), this._pixelMatrix)), + !w) + ) + throw new Error("failed to invert matrix"); + (this._pixelMatrixInverse = w), this._clearMatrixCaches(); + } + _clearMatrixCaches() { + this._posMatrixCache.clear(), + this._alignedPosMatrixCache.clear(), + this._fogMatrixCacheF32.clear(); + } + maxPitchScaleFactor() { + if (!this._pixelMatrixInverse) return 1; + const e = this.screenPointToMercatorCoordinate(new s.P(0, 0)), + i = [e.x * this.worldSize, e.y * this.worldSize, 0, 1]; + return ( + s.aw(i, i, this._pixelMatrix)[3] / + this._helper.cameraToCenterDistance + ); + } + getCameraPoint() { + return this._helper.getCameraPoint(); + } + getCameraAltitude() { + return this._helper.getCameraAltitude(); + } + getCameraLngLat() { + const e = s.aj(1, this.center.lat) * this.worldSize; + return Me( + this.center, + this.elevation, + this.pitch, + this.bearing, + this._helper.cameraToCenterDistance / e + ).toLngLat(); + } + lngLatToCameraDepth(e, i) { + const l = s.a1.fromLngLat(e), + u = [l.x * this.worldSize, l.y * this.worldSize, i, 1]; + return s.aw(u, u, this._viewProjMatrix), u[2] / u[3]; + } + getProjectionData(e) { + const { + overscaledTileID: i, + aligned: l, + applyTerrainMatrix: u, + } = e, + d = this._helper.getMercatorTileCoordinates(i), + g = i ? this.calculatePosMatrix(i, l, !0) : null; + let w; + return ( + (w = + i && i.terrainRttPosMatrix32f && u + ? i.terrainRttPosMatrix32f + : g || s.b8()), + { + mainMatrix: w, + tileMercatorCoords: d, + clippingPlane: [0, 0, 0, 0], + projectionTransition: 0, + fallbackMatrix: w, + } + ); + } + isLocationOccluded(e) { + return !1; + } + getPixelScale() { + return 1; + } + getCircleRadiusCorrection() { + return 1; + } + getPitchedTextCorrection(e, i, l) { + return 1; + } + transformLightDirection(e) { + return s.aT(e); + } + getRayDirectionFromPixel(e) { + throw new Error("Not implemented."); + } + projectTileCoordinates(e, i, l, u) { + const d = this.calculatePosMatrix(l); + let g; + u + ? ((g = [e, i, u(e, i), 1]), s.aw(g, g, d)) + : ((g = [e, i, 0, 1]), En(g, g, d)); + const w = g[3]; + return { + point: new s.P(g[0] / w, g[1] / w), + signedDistanceFromCamera: w, + isOccluded: !1, + }; + } + populateCache(e) { + for (const i of e) this.calculatePosMatrix(i); + } + getMatrixForModel(e, i) { + const l = s.a1.fromLngLat(e, i), + u = l.meterInMercatorCoordinateUnits(), + d = s.b9(); + return ( + s.M(d, d, [l.x, l.y, l.z]), + s.b6(d, d, Math.PI), + s.b7(d, d, Math.PI / 2), + s.N(d, d, [-u, u, u]), + d + ); + } + getProjectionDataForCustomLayer(e = !0) { + const i = new s.Z(0, 0, 0, 0, 0), + l = this.getProjectionData({ + overscaledTileID: i, + applyGlobeMatrix: e, + }), + u = Se(i, this.worldSize); + s.O(u, this._viewProjMatrix, u), + (l.tileMercatorCoords = [0, 0, 1, 1]); + const d = [ + s.$, + s.$, + this.worldSize / this._helper.pixelsPerMeter, + ], + g = s.ba(); + return ( + s.N(g, u, d), (l.fallbackMatrix = g), (l.mainMatrix = g), l + ); + } + getFastPathSimpleProjectionMatrix(e) { + return this.calculatePosMatrix(e); + } + } + function po() { + s.w( + "Map cannot fit within canvas with the given bounds, padding, and/or offset." + ); + } + function fi(h) { + if (h.useSlerp) + if (h.k < 1) { + const e = s.bb( + h.startEulerAngles.roll, + h.startEulerAngles.pitch, + h.startEulerAngles.bearing + ), + i = s.bb( + h.endEulerAngles.roll, + h.endEulerAngles.pitch, + h.endEulerAngles.bearing + ), + l = new Float64Array(4); + s.bc(l, e, i, h.k); + const u = s.bd(l); + h.tr.setRoll(u.roll), + h.tr.setPitch(u.pitch), + h.tr.setBearing(u.bearing); + } else + h.tr.setRoll(h.endEulerAngles.roll), + h.tr.setPitch(h.endEulerAngles.pitch), + h.tr.setBearing(h.endEulerAngles.bearing); + else + h.tr.setRoll( + s.C.number( + h.startEulerAngles.roll, + h.endEulerAngles.roll, + h.k + ) + ), + h.tr.setPitch( + s.C.number( + h.startEulerAngles.pitch, + h.endEulerAngles.pitch, + h.k + ) + ), + h.tr.setBearing( + s.C.number( + h.startEulerAngles.bearing, + h.endEulerAngles.bearing, + h.k + ) + ); + } + function Hn(h, e, i, l, u) { + const d = u.padding, + g = Y(u.worldSize, i.getNorthWest()), + w = Y(u.worldSize, i.getNorthEast()), + C = Y(u.worldSize, i.getSouthEast()), + P = Y(u.worldSize, i.getSouthWest()), + E = s.ae(-l), + R = g.rotate(E), + D = w.rotate(E), + N = C.rotate(E), + G = P.rotate(E), + te = new s.P( + Math.max(R.x, D.x, G.x, N.x), + Math.max(R.y, D.y, G.y, N.y) + ), + Q = new s.P( + Math.min(R.x, D.x, G.x, N.x), + Math.min(R.y, D.y, G.y, N.y) + ), + ae = te.sub(Q), + ce = (u.width - (d.left + d.right + e.left + e.right)) / ae.x, + ve = + (u.height - (d.top + d.bottom + e.top + e.bottom)) / ae.y; + if (ve < 0 || ce < 0) return void po(); + const me = Math.min( + s.ak(u.scale * Math.min(ce, ve)), + h.maxZoom + ), + be = s.P.convert(h.offset), + Pe = new s.P( + (e.left - e.right) / 2, + (e.top - e.bottom) / 2 + ).rotate(s.ae(l)), + _e = be.add(Pe).mult(u.scale / s.af(me)); + return { + center: ie(u.worldSize, g.add(C).div(2).sub(_e)), + zoom: me, + bearing: l, + }; + } + class jn { + get useGlobeControls() { + return !1; + } + handlePanInertia(e, i) { + return { easingOffset: e, easingCenter: i.center }; + } + handleMapControlsRollPitchBearingZoom(e, i) { + e.bearingDelta && i.setBearing(i.bearing + e.bearingDelta), + e.pitchDelta && i.setPitch(i.pitch + e.pitchDelta), + e.rollDelta && i.setRoll(i.roll + e.rollDelta), + e.zoomDelta && i.setZoom(i.zoom + e.zoomDelta); + } + handleMapControlsPan(e, i, l) { + e.around.distSqr(i.centerPoint) < 0.01 || + i.setLocationAtPoint(l, e.around); + } + cameraForBoxAndBearing(e, i, l, u, d) { + return Hn(e, i, l, u, d); + } + handleJumpToCenterZoom(e, i) { + e.zoom !== (i.zoom !== void 0 ? +i.zoom : e.zoom) && + e.setZoom(+i.zoom), + i.center !== void 0 && e.setCenter(s.S.convert(i.center)); + } + handleEaseTo(e, i) { + const l = e.zoom, + u = e.padding, + d = { roll: e.roll, pitch: e.pitch, bearing: e.bearing }, + g = { + roll: i.roll === void 0 ? e.roll : i.roll, + pitch: i.pitch === void 0 ? e.pitch : i.pitch, + bearing: i.bearing === void 0 ? e.bearing : i.bearing, + }, + w = i.zoom !== void 0, + C = !e.isPaddingEqual(i.padding); + let P = !1; + const E = w ? +i.zoom : e.zoom; + let R = e.centerPoint.add(i.offsetAsPoint); + const D = e.screenPointToLocation(R), + { center: N, zoom: G } = e.getConstrained( + s.S.convert(i.center || D), + E ?? l + ); + bn(e, N); + const te = Y(e.worldSize, D), + Q = Y(e.worldSize, N).sub(te), + ae = s.af(G - l); + return ( + (P = G !== l), + { + easeFunc: (ce) => { + if ( + (P && e.setZoom(s.C.number(l, G, ce)), + s.be(d, g) || + fi({ + startEulerAngles: d, + endEulerAngles: g, + tr: e, + k: ce, + useSlerp: d.roll != g.roll, + }), + C && + (e.interpolatePadding(u, i.padding, ce), + (R = e.centerPoint.add(i.offsetAsPoint))), + i.around) + ) + e.setLocationAtPoint(i.around, i.aroundPoint); + else { + const ve = s.af(e.zoom - l), + me = G > l ? Math.min(2, ae) : Math.max(0.5, ae), + be = Math.pow(me, 1 - ce), + Pe = ie( + e.worldSize, + te.add(Q.mult(ce * be)).mult(ve) + ); + e.setLocationAtPoint( + e.renderWorldCopies ? Pe.wrap() : Pe, + R + ); + } + }, + isZooming: P, + elevationCenter: N, + } + ); + } + handleFlyTo(e, i) { + const l = i.zoom !== void 0, + u = e.zoom, + d = e.getConstrained( + s.S.convert(i.center || i.locationAtOffset), + l ? +i.zoom : u + ), + g = d.center, + w = d.zoom; + bn(e, g); + const C = Y(e.worldSize, i.locationAtOffset), + P = Y(e.worldSize, g).sub(C), + E = P.mag(), + R = s.af(w - u); + let D; + if (i.minZoom !== void 0) { + const N = Math.min(+i.minZoom, u, w), + G = e.getConstrained(g, N).zoom; + D = s.af(G - u); + } + return { + easeFunc: (N, G, te, Q) => { + e.setZoom(N === 1 ? w : u + s.ak(G)); + const ae = + N === 1 + ? g + : ie(e.worldSize, C.add(P.mult(te)).mult(G)); + e.setLocationAtPoint( + e.renderWorldCopies ? ae.wrap() : ae, + Q + ); + }, + scaleOfZoom: R, + targetCenter: g, + scaleOfMinZoom: D, + pixelPathLength: E, + }; + } + } + class zn { + constructor(e, i, l) { + (this.blendFunction = e), + (this.blendColor = i), + (this.mask = l); + } + } + (zn.Replace = [1, 0]), + (zn.disabled = new zn(zn.Replace, s.bf.transparent, [ + !1, + !1, + !1, + !1, + ])), + (zn.unblended = new zn(zn.Replace, s.bf.transparent, [ + !0, + !0, + !0, + !0, + ])), + (zn.alphaBlended = new zn([1, 771], s.bf.transparent, [ + !0, + !0, + !0, + !0, + ])); + const qa = 2305; + class Rr { + constructor(e, i, l) { + (this.enable = e), (this.mode = i), (this.frontFace = l); + } + } + (Rr.disabled = new Rr(!1, 1029, qa)), + (Rr.backCCW = new Rr(!0, 1029, qa)), + (Rr.frontCCW = new Rr(!0, 1028, qa)); + class Gr { + constructor(e, i, l) { + (this.func = e), (this.mask = i), (this.range = l); + } + } + (Gr.ReadOnly = !1), + (Gr.ReadWrite = !0), + (Gr.disabled = new Gr(519, Gr.ReadOnly, [0, 1])); + const _a = 7680; + class un { + constructor(e, i, l, u, d, g) { + (this.test = e), + (this.ref = i), + (this.mask = l), + (this.fail = u), + (this.depthFail = d), + (this.pass = g); + } + } + un.disabled = new un({ func: 519, mask: 0 }, 0, 0, _a, _a, _a); + const Li = new WeakMap(); + function ga(h) { + var e; + if (Li.has(h)) return Li.get(h); + { + const i = + (e = h.getParameter(h.VERSION)) === null || e === void 0 + ? void 0 + : e.startsWith("WebGL 2.0"); + return Li.set(h, i), i; + } + } + class sa { + get awaitingQuery() { + return !!this._readbackQueue; + } + constructor(e) { + (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 = e); + const i = e.context, + l = i.gl; + (this._texFormat = l.RGBA), (this._texType = l.UNSIGNED_BYTE); + const u = new s.aL(); + u.emplaceBack(-1, -1), + u.emplaceBack(2, -1), + u.emplaceBack(-1, 2); + const d = new s.aN(); + d.emplaceBack(0, 1, 2), + (this._fullscreenTriangle = new Tn( + i.createVertexBuffer(u, an.members), + i.createIndexBuffer(d), + s.aM.simpleSegment(0, 0, u.length, d.length) + )), + (this._resultBuffer = new Uint8Array(4)), + i.activeTexture.set(l.TEXTURE1); + const g = l.createTexture(); + l.bindTexture(l.TEXTURE_2D, g), + l.texParameteri( + l.TEXTURE_2D, + l.TEXTURE_WRAP_S, + l.CLAMP_TO_EDGE + ), + l.texParameteri( + l.TEXTURE_2D, + l.TEXTURE_WRAP_T, + l.CLAMP_TO_EDGE + ), + l.texParameteri( + l.TEXTURE_2D, + l.TEXTURE_MIN_FILTER, + l.NEAREST + ), + l.texParameteri( + l.TEXTURE_2D, + l.TEXTURE_MAG_FILTER, + l.NEAREST + ), + l.texImage2D( + l.TEXTURE_2D, + 0, + this._texFormat, + this._texWidth, + this._texHeight, + 0, + this._texFormat, + this._texType, + null + ), + (this._fbo = i.createFramebuffer( + this._texWidth, + this._texHeight, + !1, + !1 + )), + this._fbo.colorAttachment.set(g), + ga(l) && + ((this._pbo = l.createBuffer()), + l.bindBuffer(l.PIXEL_PACK_BUFFER, this._pbo), + l.bufferData(l.PIXEL_PACK_BUFFER, 4, l.STREAM_READ), + l.bindBuffer(l.PIXEL_PACK_BUFFER, null)); + } + destroy() { + const e = this._cachedRenderContext.context.gl; + this._fullscreenTriangle.destroy(), + this._fbo.destroy(), + e.deleteBuffer(this._pbo), + (this._fullscreenTriangle = null), + (this._fbo = null), + (this._pbo = null), + (this._resultBuffer = null); + } + updateErrorLoop(e, i) { + const l = this._updateCount; + return ( + this._readbackQueue + ? l >= + this._readbackQueue.frameNumberIssued + + this._readbackWaitFrames && this._tryReadback() + : l >= + this._lastReadbackFrame + this._measureWaitFrames && + this._renderErrorTexture(e, i), + this._updateCount++, + this._measuredError + ); + } + _bindFramebuffer() { + const e = this._cachedRenderContext.context, + i = e.gl; + e.activeTexture.set(i.TEXTURE1), + i.bindTexture( + i.TEXTURE_2D, + this._fbo.colorAttachment.get() + ), + e.bindFramebuffer.set(this._fbo.framebuffer); + } + _renderErrorTexture(e, i) { + const l = this._cachedRenderContext.context, + u = l.gl; + if ( + (this._bindFramebuffer(), + l.viewport.set([0, 0, this._texWidth, this._texHeight]), + l.clear({ color: s.bf.transparent }), + this._cachedRenderContext + .useProgram("projectionErrorMeasurement") + .draw( + l, + u.TRIANGLES, + Gr.disabled, + un.disabled, + zn.unblended, + Rr.disabled, + ((d, g) => ({ u_input: d, u_output_expected: g }))( + e, + i + ), + null, + null, + "$clipping", + this._fullscreenTriangle.vertexBuffer, + this._fullscreenTriangle.indexBuffer, + this._fullscreenTriangle.segments + ), + this._pbo && ga(u)) + ) { + u.bindBuffer(u.PIXEL_PACK_BUFFER, this._pbo), + u.readBuffer(u.COLOR_ATTACHMENT0), + u.readPixels( + 0, + 0, + this._texWidth, + this._texHeight, + this._texFormat, + this._texType, + 0 + ), + u.bindBuffer(u.PIXEL_PACK_BUFFER, null); + const d = u.fenceSync(u.SYNC_GPU_COMMANDS_COMPLETE, 0); + u.flush(), + (this._readbackQueue = { + frameNumberIssued: this._updateCount, + sync: d, + }); + } else this._readbackQueue = { frameNumberIssued: this._updateCount, sync: null }; + } + _tryReadback() { + const e = this._cachedRenderContext.context.gl; + if (this._pbo && this._readbackQueue && ga(e)) { + const i = e.clientWaitSync(this._readbackQueue.sync, 0, 0); + if (i === e.WAIT_FAILED) + return ( + s.w("WebGL2 clientWaitSync failed."), + (this._readbackQueue = null), + void (this._lastReadbackFrame = this._updateCount) + ); + if (i === e.TIMEOUT_EXPIRED) return; + e.bindBuffer(e.PIXEL_PACK_BUFFER, this._pbo), + e.getBufferSubData( + e.PIXEL_PACK_BUFFER, + 0, + this._resultBuffer, + 0, + 4 + ), + e.bindBuffer(e.PIXEL_PACK_BUFFER, null); + } else this._bindFramebuffer(), e.readPixels(0, 0, this._texWidth, this._texHeight, this._texFormat, this._texType, this._resultBuffer); + (this._readbackQueue = null), + (this._measuredError = sa._parseRGBA8float( + this._resultBuffer + )), + (this._lastReadbackFrame = this._updateCount); + } + static _parseRGBA8float(e) { + let i = 0; + return ( + (i += e[0] / 256), + (i += e[1] / 65536), + (i += e[2] / 16777216), + e[3] < 127 && (i = -i), + i / 128 + ); + } + } + const Ja = s.$ / 128; + function Ms(h, e) { + const i = + h.granularity !== void 0 ? Math.max(h.granularity, 1) : 1, + l = i + (h.generateBorders ? 2 : 0), + u = + i + + (h.extendToNorthPole || h.generateBorders ? 1 : 0) + + (h.extendToSouthPole || h.generateBorders ? 1 : 0), + d = l + 1, + g = u + 1, + w = h.generateBorders ? -1 : 0, + C = h.generateBorders || h.extendToNorthPole ? -1 : 0, + P = i + (h.generateBorders ? 1 : 0), + E = i + (h.generateBorders || h.extendToSouthPole ? 1 : 0), + R = d * g, + D = l * u * 6, + N = d * g > 65536; + if (N && e === "16bit") + throw new Error( + "Granularity is too large and meshes would not fit inside 16 bit vertex indices." + ); + const G = N || e === "32bit", + te = new Int16Array(2 * R); + let Q = 0; + for (let ve = C; ve <= E; ve++) + for (let me = w; me <= P; me++) { + let be = (me / i) * s.$; + me === -1 && (be = -Ja), me === i + 1 && (be = s.$ + Ja); + let Pe = (ve / i) * s.$; + ve === -1 && (Pe = h.extendToNorthPole ? s.bh : -Ja), + ve === i + 1 && + (Pe = h.extendToSouthPole ? s.bi : s.$ + Ja), + (te[Q++] = be), + (te[Q++] = Pe); + } + const ae = G ? new Uint32Array(D) : new Uint16Array(D); + let ce = 0; + for (let ve = 0; ve < u; ve++) + for (let me = 0; me < l; me++) { + const be = me + 1 + ve * d, + Pe = me + (ve + 1) * d, + _e = me + 1 + (ve + 1) * d; + (ae[ce++] = me + ve * d), + (ae[ce++] = Pe), + (ae[ce++] = be), + (ae[ce++] = be), + (ae[ce++] = Pe), + (ae[ce++] = _e); + } + return { + vertices: te.buffer.slice(0), + indices: ae.buffer.slice(0), + uses32bitIndices: G, + }; + } + const Ca = new s.aK({ + fill: new s.bj(128, 2), + line: new s.bj(512, 0), + tile: new s.bj(128, 32), + stencil: new s.bj(128, 1), + circle: 3, + }); + class Qa { + 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 $r.projectionGlobe; + } + get vertexShaderPreludeCode() { + return $r.projectionMercator.vertexSource; + } + get subdivisionGranularity() { + return Ca; + } + get useGlobeControls() { + return !0; + } + get latitudeErrorCorrectionRadians() { + return this._errorCorrectionUsable; + } + destroy() { + this._errorMeasurement && this._errorMeasurement.destroy(); + } + updateGPUdependent(e) { + this._errorMeasurement || + (this._errorMeasurement = new sa(e)); + const i = s.U(this._errorQueryLatitudeDegrees), + l = + 2 * Math.atan(Math.exp(Math.PI - i * Math.PI * 2)) - + 0.5 * Math.PI, + u = this._errorMeasurement.updateErrorLoop(i, l), + d = ne.now(); + u !== this._errorMeasurementLastValue && + ((this._errorCorrectionPreviousValue = + this._errorCorrectionUsable), + (this._errorMeasurementLastValue = u), + (this._errorMeasurementLastChangeTime = d)); + const g = Math.min( + Math.max( + (d - this._errorMeasurementLastChangeTime) / 1e3 / 0.5, + 0 + ), + 1 + ); + this._errorCorrectionUsable = s.bk( + this._errorCorrectionPreviousValue, + -this._errorMeasurementLastValue, + s.bl(g) + ); + } + _getMeshKey(e) { + return `${e.granularity.toString( + 36 + )}_${e.generateBorders ? "b" : ""}${e.extendToNorthPole ? "n" : ""}${e.extendToSouthPole ? "s" : ""}`; + } + getMeshFromTileID(e, i, l, u, d) { + const g = ( + d === "stencil" ? Ca.stencil : Ca.tile + ).getGranularityForZoomLevel(i.z); + return this._getMesh(e, { + granularity: g, + generateBorders: l, + extendToNorthPole: i.y === 0 && u, + extendToSouthPole: i.y === (1 << i.z) - 1 && u, + }); + } + _getMesh(e, i) { + const l = this._getMeshKey(i); + if (l in this._tileMeshCache) return this._tileMeshCache[l]; + const u = (function (d, g) { + const w = Ms(g, "16bit"), + C = s.aL.deserialize({ + arrayBuffer: w.vertices, + length: w.vertices.byteLength / 2 / 2, + }), + P = s.aN.deserialize({ + arrayBuffer: w.indices, + length: w.indices.byteLength / 2 / 3, + }); + return new Tn( + d.createVertexBuffer(C, an.members), + d.createIndexBuffer(P), + s.aM.simpleSegment(0, 0, C.length, P.length) + ); + })(e, i); + return (this._tileMeshCache[l] = u), u; + } + recalculate(e) {} + hasTransition() { + const e = ne.now(); + let i = !1; + return ( + (i = + i || + (e - this._errorMeasurementLastChangeTime) / 1e3 < 0.7), + (i = + i || + (this._errorMeasurement && + this._errorMeasurement.awaitingQuery)), + i + ); + } + setErrorQueryLatitudeDegrees(e) { + this._errorQueryLatitudeDegrees = e; + } + } + const Jo = new s.r({ type: new s.D(s.v.projection.type) }); + class gl extends s.E { + constructor(e) { + super(), + (this._transitionable = new s.t(Jo)), + this.setProjection(e), + (this._transitioning = + this._transitionable.untransitioned()), + this.recalculate(new s.F(0)), + (this._mercatorProjection = new Mr()), + (this._verticalPerspectiveProjection = new Qa()); + } + get transitionState() { + const e = this.properties.get("type"); + if (typeof e == "string" && e === "mercator") return 0; + if (typeof e == "string" && e === "vertical-perspective") + return 1; + if (e instanceof s.bm) { + if ( + e.from === "vertical-perspective" && + e.to === "mercator" + ) + return 1 - e.transition; + if ( + e.from === "mercator" && + e.to === "vertical-perspective" + ) + return e.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(e) { + this._mercatorProjection.updateGPUdependent(e), + this._verticalPerspectiveProjection.updateGPUdependent(e); + } + getMeshFromTileID(e, i, l, u, d) { + return this.currentProjection.getMeshFromTileID( + e, + i, + l, + u, + d + ); + } + setProjection(e) { + this._transitionable.setValue( + "type", + (e == null ? void 0 : e.type) || "mercator" + ); + } + updateTransitions(e) { + this._transitioning = this._transitionable.transitioned( + e, + this._transitioning + ); + } + hasTransition() { + return ( + this._transitioning.hasTransition() || + this.currentProjection.hasTransition() + ); + } + recalculate(e) { + this.properties = this._transitioning.possiblyEvaluate(e); + } + setErrorQueryLatitudeDegrees(e) { + this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees( + e + ), + this._mercatorProjection.setErrorQueryLatitudeDegrees(e); + } + } + function vl(h) { + const e = Qo(h.worldSize, h.center.lat); + return 2 * Math.PI * e; + } + function Sa(h, e, i, l, u) { + const d = 1 / (1 << u), + g = (e / s.$) * d + l * d, + w = s.bo( + ((h / s.$) * d + i * d) * Math.PI * 2 + Math.PI, + 2 * Math.PI + ), + C = + 2 * Math.atan(Math.exp(Math.PI - g * Math.PI * 2)) - + 0.5 * Math.PI, + P = Math.cos(C), + E = new Float64Array(3); + return ( + (E[0] = Math.sin(w) * P), + (E[1] = Math.sin(C)), + (E[2] = Math.cos(w) * P), + E + ); + } + function Ti(h) { + return (function (e, i) { + const l = Math.cos(i), + u = new Float64Array(3); + return ( + (u[0] = Math.sin(e) * l), + (u[1] = Math.sin(i)), + (u[2] = Math.cos(e) * l), + u + ); + })((h.lng * Math.PI) / 180, (h.lat * Math.PI) / 180); + } + function Qo(h, e) { + return h / (2 * Math.PI) / Math.cos((e * Math.PI) / 180); + } + function ks(h) { + const e = (Math.asin(h[1]) / Math.PI) * 180, + i = Math.sqrt(h[0] * h[0] + h[2] * h[2]); + if (i > 1e-6) { + const l = h[0] / i, + u = Math.acos(h[2] / i), + d = ((l > 0 ? u : -u) / Math.PI) * 180; + return new s.S(s.aO(d, -180, 180), e); + } + return new s.S(0, e); + } + function Mo(h) { + return Math.cos((h * Math.PI) / 180); + } + function ei(h, e) { + const i = Mo(h), + l = Mo(e); + return s.ak(l / i); + } + function Fh(h, e) { + const i = h.rotate(e.bearingInRadians), + l = e.zoom + ei(e.center.lat, 0), + u = s.bk( + 1 / Mo(e.center.lat), + 1 / Mo(Math.min(Math.abs(e.center.lat), 60)), + s.bn(l, 7, 3, 0, 1) + ), + d = + 360 / + vl({ + worldSize: e.worldSize, + center: { lat: e.center.lat }, + }); + return new s.S( + e.center.lng - i.x * d * u, + s.ah(e.center.lat + i.y * d, -s.ai, s.ai) + ); + } + function As(h) { + const e = 0.5 * h, + i = Math.sin(e), + l = Math.cos(e); + return Math.log(i + l) - Math.log(l - i); + } + function Ec(h, e, i, l) { + const u = h.lat + i * l; + if (Math.abs(i) > 1) { + const d = + ((Math.sign(h.lat + i) !== Math.sign(h.lat) + ? -Math.abs(h.lat) + : Math.abs(h.lat)) * + Math.PI) / + 180, + g = (Math.abs(h.lat + i) * Math.PI) / 180, + w = As(d + l * (g - d)), + C = As(d), + P = As(g); + return new s.S(h.lng + e * ((w - C) / (P - C)), u); + } + return new s.S(h.lng + e * l, u); + } + class bp { + constructor(e) { + (this._cachePrevious = new Map()), + (this._cache = new Map()), + (this._hadAnyChanges = !1), + (this._boundingVolumeFactory = e); + } + swapBuffers() { + if (!this._hadAnyChanges) return; + const e = this._cachePrevious; + (this._cachePrevious = this._cache), + (this._cache = e), + this._cache.clear(), + (this._hadAnyChanges = !1); + } + getTileBoundingVolume(e, i, l, u) { + const d = `${e.z}_${e.x}_${e.y}_${ + u != null && u.terrain ? "t" : "" + }`, + g = this._cache.get(d); + if (g) return g; + const w = this._cachePrevious.get(d); + if (w) return this._cache.set(d, w), w; + const C = this._boundingVolumeFactory(e, i, l, u); + return this._cache.set(d, C), (this._hadAnyChanges = !0), C; + } + } + class es { + constructor(e, i, l, u) { + (this.min = l), + (this.max = u), + (this.points = e), + (this.planes = i); + } + static fromAabb(e, i) { + const l = []; + for (let u = 0; u < 8; u++) + l.push([ + 1 & ~u ? e[0] : i[0], + ((u >> 1) & 1) == 1 ? i[1] : e[1], + ((u >> 2) & 1) == 1 ? i[2] : e[2], + ]); + return new es( + l, + [ + [-1, 0, 0, i[0]], + [1, 0, 0, -e[0]], + [0, -1, 0, i[1]], + [0, 1, 0, -e[1]], + [0, 0, -1, i[2]], + [0, 0, 1, -e[2]], + ], + e, + i + ); + } + static fromCenterSizeAngles(e, i, l) { + const u = s.br([], l[0], l[1], l[2]), + d = s.bs([], [i[0], 0, 0], u), + g = s.bs([], [0, i[1], 0], u), + w = s.bs([], [0, 0, i[2]], u), + C = [...e], + P = [...e]; + for (let R = 0; R < 8; R++) + for (let D = 0; D < 3; D++) { + const N = + e[D] + + d[D] * (1 & ~R ? -1 : 1) + + g[D] * (((R >> 1) & 1) == 1 ? 1 : -1) + + w[D] * (((R >> 2) & 1) == 1 ? 1 : -1); + (C[D] = Math.min(C[D], N)), (P[D] = Math.max(P[D], N)); + } + const E = []; + for (let R = 0; R < 8; R++) { + const D = [...e]; + s.aS(D, D, s.aR([], d, 1 & ~R ? -1 : 1)), + s.aS(D, D, s.aR([], g, ((R >> 1) & 1) == 1 ? 1 : -1)), + s.aS(D, D, s.aR([], w, ((R >> 2) & 1) == 1 ? 1 : -1)), + E.push(D); + } + return new es( + E, + [ + [...d, -s.aX(d, E[0])], + [...g, -s.aX(g, E[0])], + [...w, -s.aX(w, E[0])], + [-d[0], -d[1], -d[2], -s.aX(d, E[7])], + [-g[0], -g[1], -g[2], -s.aX(g, E[7])], + [-w[0], -w[1], -w[2], -s.aX(w, E[7])], + ], + C, + P + ); + } + intersectsFrustum(e) { + let i = !0; + const l = this.points.length, + u = this.planes.length, + d = e.planes.length, + g = e.points.length; + for (let w = 0; w < d; w++) { + const C = e.planes[w]; + let P = 0; + for (let E = 0; E < l; E++) { + const R = this.points[E]; + C[0] * R[0] + C[1] * R[1] + C[2] * R[2] + C[3] >= 0 && + P++; + } + if (P === 0) return 0; + P < l && (i = !1); + } + if (i) return 2; + for (let w = 0; w < u; w++) { + const C = this.planes[w]; + let P = 0; + for (let E = 0; E < g; E++) { + const R = e.points[E]; + C[0] * R[0] + C[1] * R[1] + C[2] * R[2] + C[3] >= 0 && + P++; + } + if (P === 0) return 0; + } + return 1; + } + intersectsPlane(e) { + const i = this.points.length; + let l = 0; + for (let u = 0; u < i; u++) { + const d = this.points[u]; + e[0] * d[0] + e[1] * d[1] + e[2] * d[2] + e[3] >= 0 && l++; + } + return l === i ? 2 : l === 0 ? 0 : 1; + } + } + function Di(h, e, i) { + const l = h - e; + return l < 0 ? -l : Math.max(0, l - i); + } + function Es(h, e, i, l, u) { + const d = h - i; + let g; + return ( + (g = + d < 0 + ? Math.min(-d, 1 + d - u) + : d > 1 + ? Math.min(Math.max(d - u, 0), 1 - d) + : 0), + Math.max(g, Di(e, l, u)) + ); + } + class Za { + constructor() { + this._boundingVolumeCache = new bp( + this._computeTileBoundingVolume + ); + } + prepareNextFrame() { + this._boundingVolumeCache.swapBuffers(); + } + distanceToTile2d(e, i, l, u) { + const d = 1 << l.z, + g = 1 / d, + w = l.x / d, + C = l.y / d; + let P = 2; + return ( + (P = Math.min(P, Es(e, i, w, C, g))), + (P = Math.min(P, Es(e, i, w + 0.5, -C - g, g))), + (P = Math.min(P, Es(e, i, w + 0.5, 2 - C - g, g))), + P + ); + } + getWrap(e, i, l) { + const u = 1 << i.z, + d = 1 / u, + g = i.x / u, + w = Di(e.x, g, d), + C = Di(e.x, g - 1, d), + P = Di(e.x, g + 1, d), + E = Math.min(w, C, P); + return E === P ? 1 : E === C ? -1 : 0; + } + allowVariableZoom(e, i) { + return kt(e, i) > 4; + } + allowWorldCopies() { + return !1; + } + getTileBoundingVolume(e, i, l, u) { + return this._boundingVolumeCache.getTileBoundingVolume( + e, + i, + l, + u + ); + } + _computeTileBoundingVolume(e, i, l, u) { + var d, g; + let w = 0, + C = 0; + if (u != null && u.terrain) { + const P = new s.Z(e.z, i, e.z, e.x, e.y), + E = u.terrain.getMinMaxElevation(P); + (w = + (d = E.minElevation) !== null && d !== void 0 + ? d + : Math.min(0, l)), + (C = + (g = E.maxElevation) !== null && g !== void 0 + ? g + : Math.max(0, l)); + } + if (((w /= s.bu), (C /= s.bu), (w += 1), (C += 1), e.z <= 0)) + return es.fromAabb([-C, -C, -C], [C, C, C]); + if (e.z === 1) + return es.fromAabb( + [e.x === 0 ? -C : 0, e.y === 0 ? 0 : -C, -C], + [e.x === 0 ? 0 : C, e.y === 0 ? C : 0, C] + ); + { + const P = [ + Sa(0, 0, e.x, e.y, e.z), + Sa(s.$, 0, e.x, e.y, e.z), + Sa(s.$, s.$, e.x, e.y, e.z), + Sa(0, s.$, e.x, e.y, e.z), + ], + E = []; + for (const Xe of P) E.push(s.aR([], Xe, C)); + if (C !== w) for (const Xe of P) E.push(s.aR([], Xe, w)); + e.y === 0 && E.push([0, 1, 0]), + e.y === (1 << e.z) - 1 && E.push([0, -1, 0]); + const R = [1, 1, 1], + D = [-1, -1, -1]; + for (const Xe of E) + for (let tt = 0; tt < 3; tt++) + (R[tt] = Math.min(R[tt], Xe[tt])), + (D[tt] = Math.max(D[tt], Xe[tt])); + const N = Sa(s.$ / 2, s.$ / 2, e.x, e.y, e.z), + G = s.aW([], [0, 1, 0], N); + s.aV(G, G); + const te = s.aW([], N, G); + s.aV(te, te); + const Q = s.aW([], P[2], P[1]); + s.aV(Q, Q); + const ae = s.aW([], P[0], P[3]); + s.aV(ae, ae), + E.push(s.aR([], N, C)), + e.y >= (1 << e.z) / 2 && + E.push(s.aR([], Sa(s.$ / 2, 0, e.x, e.y, e.z), C)), + e.y < (1 << e.z) / 2 && + E.push(s.aR([], Sa(s.$ / 2, s.$, e.x, e.y, e.z), C)); + const ce = zs(N, E), + ve = zs(te, E), + me = [-N[0], -N[1], -N[2], ce.max], + be = [N[0], N[1], N[2], -ce.min], + Pe = [-te[0], -te[1], -te[2], ve.max], + _e = [te[0], te[1], te[2], -ve.min], + Be = [...Q, 0], + rt = [...ae, 0], + Ge = []; + return ( + e.y === 0 + ? Ge.push(s.bt(rt, Be, me), s.bt(rt, Be, be)) + : Ge.push( + s.bt(Pe, Be, me), + s.bt(Pe, Be, be), + s.bt(Pe, rt, me), + s.bt(Pe, rt, be) + ), + e.y === (1 << e.z) - 1 + ? Ge.push(s.bt(rt, Be, me), s.bt(rt, Be, be)) + : Ge.push( + s.bt(_e, Be, me), + s.bt(_e, Be, be), + s.bt(_e, rt, me), + s.bt(_e, rt, be) + ), + new es(Ge, [me, be, Pe, _e, Be, rt], R, D) + ); + } + } + } + function zs(h, e) { + let i = 1 / 0, + l = -1 / 0; + for (const u of e) { + const d = s.aX(h, u); + (i = Math.min(i, d)), (l = Math.max(l, d)); + } + return { min: i, max: l }; + } + class Ls { + 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(e) { + this._helper.setMinZoom(e); + } + setMaxZoom(e) { + this._helper.setMaxZoom(e); + } + setMinPitch(e) { + this._helper.setMinPitch(e); + } + setMaxPitch(e) { + this._helper.setMaxPitch(e); + } + setRenderWorldCopies(e) { + this._helper.setRenderWorldCopies(e); + } + setBearing(e) { + this._helper.setBearing(e); + } + setPitch(e) { + this._helper.setPitch(e); + } + setRoll(e) { + this._helper.setRoll(e); + } + setFov(e) { + this._helper.setFov(e); + } + setZoom(e) { + this._helper.setZoom(e); + } + setCenter(e) { + this._helper.setCenter(e); + } + setElevation(e) { + this._helper.setElevation(e); + } + setMinElevationForCurrentTile(e) { + this._helper.setMinElevationForCurrentTile(e); + } + setPadding(e) { + this._helper.setPadding(e); + } + interpolatePadding(e, i, l) { + return this._helper.interpolatePadding(e, i, l); + } + isPaddingEqual(e) { + return this._helper.isPaddingEqual(e); + } + resize(e, i) { + this._helper.resize(e, i); + } + getMaxBounds() { + return this._helper.getMaxBounds(); + } + setMaxBounds(e) { + this._helper.setMaxBounds(e); + } + overrideNearFarZ(e, i) { + this._helper.overrideNearFarZ(e, i); + } + clearNearFarZOverride() { + this._helper.clearNearFarZOverride(); + } + getCameraQueryGeometry(e) { + return this._helper.getCameraQueryGeometry( + this.getCameraPoint(), + e + ); + } + 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 nearZ() { + return this._helper.nearZ; + } + get farZ() { + return this._helper.farZ; + } + get autoCalculateNearFarZ() { + return this._helper.autoCalculateNearFarZ; + } + setTransitionState(e) {} + constructor() { + (this._cachedClippingPlane = s.bv()), + (this._projectionMatrix = s.b9()), + (this._globeViewProjMatrix32f = s.b8()), + (this._globeViewProjMatrixNoCorrection = s.b9()), + (this._globeViewProjMatrixNoCorrectionInverted = s.b9()), + (this._globeProjMatrixInverted = s.b9()), + (this._cameraPosition = s.bp()), + (this._globeLatitudeErrorCorrectionRadians = 0), + (this._helper = new Sn({ + calcMatrices: () => { + this._calcMatrices(); + }, + getConstrained: (e, i) => this.getConstrained(e, i), + })), + (this._coveringTilesDetailsProvider = new Za()); + } + clone() { + const e = new Ls(); + return e.apply(this), e; + } + apply(e, i) { + (this._globeLatitudeErrorCorrectionRadians = i || 0), + this._helper.apply(e); + } + get projectionMatrix() { + return this._projectionMatrix; + } + get modelViewProjectionMatrix() { + return this._globeViewProjMatrixNoCorrection; + } + get inverseProjectionMatrix() { + return this._globeProjMatrixInverted; + } + get cameraPosition() { + const e = s.bp(); + return ( + (e[0] = this._cameraPosition[0]), + (e[1] = this._cameraPosition[1]), + (e[2] = this._cameraPosition[2]), + e + ); + } + get cameraToCenterDistance() { + return this._helper.cameraToCenterDistance; + } + getProjectionData(e) { + const { overscaledTileID: i, applyGlobeMatrix: l } = e, + u = this._helper.getMercatorTileCoordinates(i); + return { + mainMatrix: this._globeViewProjMatrix32f, + tileMercatorCoords: u, + clippingPlane: this._cachedClippingPlane, + projectionTransition: l ? 1 : 0, + fallbackMatrix: this._globeViewProjMatrix32f, + }; + } + _computeClippingPlane(e) { + const i = this.pitchInRadians, + l = this.cameraToCenterDistance / e, + u = Math.sin(i) * l, + d = Math.cos(i) * l + 1, + g = (1 / Math.sqrt(u * u + d * d)) * 1; + let w = -u, + C = d; + const P = Math.sqrt(w * w + C * C); + (w /= P), (C /= P); + const E = [0, w, C]; + s.bw(E, E, [0, 0, 0], -this.bearingInRadians), + s.bx( + E, + E, + [0, 0, 0], + (-1 * this.center.lat * Math.PI) / 180 + ), + s.by(E, E, [0, 0, 0], (this.center.lng * Math.PI) / 180); + const R = 1 / s.aZ(E); + return s.aR(E, E, R), [...E, -g * R]; + } + isLocationOccluded(e) { + return !this.isSurfacePointVisible(Ti(e)); + } + transformLightDirection(e) { + const i = (this._helper._center.lng * Math.PI) / 180, + l = (this._helper._center.lat * Math.PI) / 180, + u = Math.cos(l), + d = [Math.sin(i) * u, Math.sin(l), Math.cos(i) * u], + g = [d[2], 0, -d[0]], + w = [0, 0, 0]; + s.aW(w, g, d), s.aV(g, g), s.aV(w, w); + const C = [0, 0, 0]; + return ( + s.aV(C, [ + g[0] * e[0] + w[0] * e[1] + d[0] * e[2], + g[1] * e[0] + w[1] * e[1] + d[1] * e[2], + g[2] * e[0] + w[2] * e[1] + d[2] * e[2], + ]), + C + ); + } + getPixelScale() { + return ( + 1 / Math.cos((this._helper._center.lat * Math.PI) / 180) + ); + } + getCircleRadiusCorrection() { + return Math.cos((this._helper._center.lat * Math.PI) / 180); + } + getPitchedTextCorrection(e, i, l) { + const u = (function (w, C, P) { + const E = 1 / (1 << P.z); + return new s.a1( + (w / s.$) * E + P.x * E, + (C / s.$) * E + P.y * E + ); + })(e, i, l.canonical), + d = + ((g = u.y), + [ + s.bo(u.x * Math.PI * 2 + Math.PI, 2 * Math.PI), + 2 * Math.atan(Math.exp(Math.PI - g * Math.PI * 2)) - + 0.5 * Math.PI, + ]); + var g; + return this.getCircleRadiusCorrection() / Math.cos(d[1]); + } + projectTileCoordinates(e, i, l, u) { + const d = l.canonical, + g = Sa(e, i, d.x, d.y, d.z), + w = 1 + (u ? u(e, i) : 0) / s.bu, + C = [g[0] * w, g[1] * w, g[2] * w, 1]; + s.aw(C, C, this._globeViewProjMatrixNoCorrection); + const P = this._cachedClippingPlane, + E = P[0] * g[0] + P[1] * g[1] + P[2] * g[2] + P[3] < 0; + return { + point: new s.P(C[0] / C[3], C[1] / C[3]), + signedDistanceFromCamera: C[3], + isOccluded: E, + }; + } + _calcMatrices() { + if (!this._helper._width || !this._helper._height) return; + const e = Qo(this.worldSize, this.center.lat), + i = s.ba(), + l = s.ba(); + this._helper.autoCalculateNearFarZ && + ((this._helper._nearZ = 0.5), + (this._helper._farZ = this.cameraToCenterDistance + 2 * e)), + s.b4( + i, + this.fovInRadians, + this.width / this.height, + this._helper._nearZ, + this._helper._farZ + ); + const u = this.centerOffset; + (i[8] = (2 * -u.x) / this._helper._width), + (i[9] = (2 * u.y) / this._helper._height), + (this._projectionMatrix = s.b5(i)), + (this._globeProjMatrixInverted = s.ba()), + s.aq(this._globeProjMatrixInverted, i), + s.M(i, i, [0, 0, -this.cameraToCenterDistance]), + s.b6(i, i, this.rollInRadians), + s.b7(i, i, -this.pitchInRadians), + s.b6(i, i, this.bearingInRadians), + s.M(i, i, [0, 0, -e]); + const d = s.bp(); + (d[0] = e), + (d[1] = e), + (d[2] = e), + s.b7(l, i, (this.center.lat * Math.PI) / 180), + s.bz(l, l, (-this.center.lng * Math.PI) / 180), + s.N(l, l, d), + (this._globeViewProjMatrixNoCorrection = l), + s.b7( + i, + i, + (this.center.lat * Math.PI) / 180 - + this._globeLatitudeErrorCorrectionRadians + ), + s.bz(i, i, (-this.center.lng * Math.PI) / 180), + s.N(i, i, d), + (this._globeViewProjMatrix32f = new Float32Array(i)), + (this._globeViewProjMatrixNoCorrectionInverted = s.ba()), + s.aq(this._globeViewProjMatrixNoCorrectionInverted, l); + const g = s.bp(); + (this._cameraPosition = s.bp()), + (this._cameraPosition[2] = this.cameraToCenterDistance / e), + s.bw( + this._cameraPosition, + this._cameraPosition, + g, + -this.rollInRadians + ), + s.bx( + this._cameraPosition, + this._cameraPosition, + g, + this.pitchInRadians + ), + s.bw( + this._cameraPosition, + this._cameraPosition, + g, + -this.bearingInRadians + ), + s.aS(this._cameraPosition, this._cameraPosition, [0, 0, 1]), + s.bx( + this._cameraPosition, + this._cameraPosition, + g, + (-this.center.lat * Math.PI) / 180 + ), + s.by( + this._cameraPosition, + this._cameraPosition, + g, + (this.center.lng * Math.PI) / 180 + ), + (this._cachedClippingPlane = this._computeClippingPlane(e)); + const w = s.b5(this._globeViewProjMatrixNoCorrectionInverted); + s.N(w, w, [1, 1, -1]), + (this._cachedFrustum = fn.fromInvProjectionMatrix( + w, + 1, + 0, + this._cachedClippingPlane, + !0 + )); + } + calculateFogMatrix(e) { + s.w( + "calculateFogMatrix is not supported on globe projection." + ); + const i = s.ba(); + return s.ag(i), i; + } + getVisibleUnwrappedCoordinates(e) { + return [new s.b2(0, e)]; + } + getCameraFrustum() { + return this._cachedFrustum; + } + getClippingPlane() { + return this._cachedClippingPlane; + } + getCoveringTilesDetailsProvider() { + return this._coveringTilesDetailsProvider; + } + recalculateZoomAndCenter(e) { + e && + s.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(e, i) { + if (!this._globeViewProjMatrixNoCorrection) return 1; + const l = Ti(e); + s.aR(l, l, 1 + i / s.bu); + const u = s.bv(); + return ( + s.aw( + u, + [l[0], l[1], l[2], 1], + this._globeViewProjMatrixNoCorrection + ), + u[2] / u[3] + ); + } + populateCache(e) {} + getBounds() { + const e = 0.5 * this.width, + i = 0.5 * this.height, + l = [ + new s.P(0, 0), + new s.P(e, 0), + new s.P(this.width, 0), + new s.P(this.width, i), + new s.P(this.width, this.height), + new s.P(e, this.height), + new s.P(0, this.height), + new s.P(0, i), + ], + u = []; + for (const R of l) u.push(this.unprojectScreenPoint(R)); + let d = 0, + g = 0, + w = 0, + C = 0; + const P = this.center; + for (const R of u) { + const D = s.bA(P.lng, R.lng), + N = s.bA(P.lat, R.lat); + D < g && (g = D), + D > d && (d = D), + N < C && (C = N), + N > w && (w = N); + } + const E = [P.lng + g, P.lat + C, P.lng + d, P.lat + w]; + return ( + this.isSurfacePointOnScreen([0, 1, 0]) && + ((E[3] = 90), (E[0] = -180), (E[2] = 180)), + this.isSurfacePointOnScreen([0, -1, 0]) && + ((E[1] = -90), (E[0] = -180), (E[2] = 180)), + new _t(E) + ); + } + getConstrained(e, i) { + const l = s.ah(e.lat, -s.ai, s.ai), + u = s.ah(+i, this.minZoom + ei(0, l), this.maxZoom); + return { center: new s.S(e.lng, l), zoom: u }; + } + calculateCenterFromCameraLngLatAlt(e, i, l, u) { + return this._helper.calculateCenterFromCameraLngLatAlt( + e, + i, + l, + u + ); + } + setLocationAtPoint(e, i) { + const l = Ti(this.unprojectScreenPoint(i)), + u = Ti(e), + d = s.bp(); + s.bB(d); + const g = s.bp(); + s.by(g, l, d, (-this.center.lng * Math.PI) / 180), + s.bx(g, g, d, (this.center.lat * Math.PI) / 180); + const w = u[0] * u[0] + u[2] * u[2], + C = g[0] * g[0]; + if (w < C) return; + const P = Math.sqrt(w - C), + E = -P, + R = s.bC(u[0], u[2], g[0], P), + D = s.bC(u[0], u[2], g[0], E), + N = s.bp(); + s.by(N, u, d, -R); + const G = s.bC(N[1], N[2], g[1], g[2]), + te = s.bp(); + s.by(te, u, d, -D); + const Q = s.bC(te[1], te[2], g[1], g[2]), + ae = 0.5 * Math.PI, + ce = G >= -ae && G <= ae, + ve = Q >= -ae && Q <= ae; + let me, be; + if (ce && ve) { + const rt = (this.center.lng * Math.PI) / 180, + Ge = (this.center.lat * Math.PI) / 180; + s.bD(R, rt) + s.bD(G, Ge) < s.bD(D, rt) + s.bD(Q, Ge) + ? ((me = R), (be = G)) + : ((me = D), (be = Q)); + } else if (ce) (me = R), (be = G); + else { + if (!ve) return; + (me = D), (be = Q); + } + const Pe = (me / Math.PI) * 180, + _e = (be / Math.PI) * 180, + Be = this.center.lat; + this.setCenter(new s.S(Pe, s.ah(_e, -90, 90))), + this.setZoom(this.zoom + ei(Be, this.center.lat)); + } + locationToScreenPoint(e, i) { + const l = Ti(e); + if (i) { + const u = i.getElevationForLngLatZoom( + e, + this._helper._tileZoom + ); + s.aR(l, l, 1 + u / s.bu); + } + return this._projectSurfacePointToScreen(l); + } + _projectSurfacePointToScreen(e) { + const i = s.bv(); + return ( + s.aw(i, [...e, 1], this._globeViewProjMatrixNoCorrection), + (i[0] /= i[3]), + (i[1] /= i[3]), + new s.P( + (0.5 * i[0] + 0.5) * this.width, + (0.5 * -i[1] + 0.5) * this.height + ) + ); + } + screenPointToMercatorCoordinate(e, i) { + if (i) { + const l = i.pointCoordinate(e); + if (l) return l; + } + return s.a1.fromLngLat(this.unprojectScreenPoint(e)); + } + screenPointToLocation(e, i) { + var l; + return (l = this.screenPointToMercatorCoordinate(e, i)) === + null || l === void 0 + ? void 0 + : l.toLngLat(); + } + isPointOnMapSurface(e, i) { + const l = this._cameraPosition, + u = this.getRayDirectionFromPixel(e); + return !!this.rayPlanetIntersection(l, u); + } + getRayDirectionFromPixel(e) { + const i = s.bv(); + (i[0] = (e.x / this.width) * 2 - 1), + (i[1] = -1 * ((e.y / this.height) * 2 - 1)), + (i[2] = 1), + (i[3] = 1), + s.aw(i, i, this._globeViewProjMatrixNoCorrectionInverted), + (i[0] /= i[3]), + (i[1] /= i[3]), + (i[2] /= i[3]); + const l = s.bp(); + (l[0] = i[0] - this._cameraPosition[0]), + (l[1] = i[1] - this._cameraPosition[1]), + (l[2] = i[2] - this._cameraPosition[2]); + const u = s.bp(); + return s.aV(u, l), u; + } + isSurfacePointVisible(e) { + const i = this._cachedClippingPlane; + return i[0] * e[0] + i[1] * e[1] + i[2] * e[2] + i[3] >= 0; + } + isSurfacePointOnScreen(e) { + if (!this.isSurfacePointVisible(e)) return !1; + const i = s.bv(); + return ( + s.aw(i, [...e, 1], this._globeViewProjMatrixNoCorrection), + (i[0] /= i[3]), + (i[1] /= i[3]), + (i[2] /= i[3]), + i[0] > -1 && + i[0] < 1 && + i[1] > -1 && + i[1] < 1 && + i[2] > -1 && + i[2] < 1 + ); + } + rayPlanetIntersection(e, i) { + const l = s.aX(e, i), + u = s.bp(), + d = s.bp(); + s.aR(d, i, l), s.aU(u, e, d); + const g = 1 - s.aX(u, u); + if (g < 0) return null; + const w = s.aX(e, e) - 1, + C = -l + (l < 0 ? 1 : -1) * Math.sqrt(g), + P = w / C, + E = C; + return { tMin: Math.min(P, E), tMax: Math.max(P, E) }; + } + unprojectScreenPoint(e) { + const i = this._cameraPosition, + l = this.getRayDirectionFromPixel(e), + u = this.rayPlanetIntersection(i, l); + if (u) { + const E = s.bp(); + s.aS(E, i, [l[0] * u.tMin, l[1] * u.tMin, l[2] * u.tMin]); + const R = s.bp(); + return s.aV(R, E), ks(R); + } + const d = this._cachedClippingPlane, + g = d[0] * l[0] + d[1] * l[1] + d[2] * l[2], + w = -s.b1(d, i) / g, + C = s.bp(); + if (w > 0) s.aS(C, i, [l[0] * w, l[1] * w, l[2] * w]); + else { + const E = s.bp(); + s.aS(E, i, [2 * l[0], 2 * l[1], 2 * l[2]]); + const R = s.b1(this._cachedClippingPlane, E); + s.aU(C, E, [ + this._cachedClippingPlane[0] * R, + this._cachedClippingPlane[1] * R, + this._cachedClippingPlane[2] * R, + ]); + } + const P = (function (E) { + const R = s.bp(); + return ( + (R[0] = E[0] * -E[3]), + (R[1] = E[1] * -E[3]), + (R[2] = E[2] * -E[3]), + { center: R, radius: Math.sqrt(1 - E[3] * E[3]) } + ); + })(d); + return ks( + (function (E, R, D) { + const N = s.bp(); + s.aU(N, D, E); + const G = s.bp(); + return s.bq(G, E, N, R / s.a$(N)), G; + })(P.center, P.radius, C) + ); + } + getMatrixForModel(e, i) { + const l = s.S.convert(e), + u = 1 / s.bu, + d = s.b9(); + return ( + s.bz(d, d, (l.lng / 180) * Math.PI), + s.b7(d, d, (-l.lat / 180) * Math.PI), + s.M(d, d, [0, 0, 1 + i / s.bu]), + s.b7(d, d, 0.5 * Math.PI), + s.N(d, d, [u, u, u]), + d + ); + } + getProjectionDataForCustomLayer(e = !0) { + const i = this.getProjectionData({ + overscaledTileID: new s.Z(0, 0, 0, 0, 0), + applyGlobeMatrix: e, + }); + return (i.tileMercatorCoords = [0, 0, 1, 1]), i; + } + getFastPathSimpleProjectionMatrix(e) {} + } + class Ds { + 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(e) { + this._helper.setMinZoom(e); + } + setMaxZoom(e) { + this._helper.setMaxZoom(e); + } + setMinPitch(e) { + this._helper.setMinPitch(e); + } + setMaxPitch(e) { + this._helper.setMaxPitch(e); + } + setRenderWorldCopies(e) { + this._helper.setRenderWorldCopies(e); + } + setBearing(e) { + this._helper.setBearing(e); + } + setPitch(e) { + this._helper.setPitch(e); + } + setRoll(e) { + this._helper.setRoll(e); + } + setFov(e) { + this._helper.setFov(e); + } + setZoom(e) { + this._helper.setZoom(e); + } + setCenter(e) { + this._helper.setCenter(e); + } + setElevation(e) { + this._helper.setElevation(e); + } + setMinElevationForCurrentTile(e) { + this._helper.setMinElevationForCurrentTile(e); + } + setPadding(e) { + this._helper.setPadding(e); + } + interpolatePadding(e, i, l) { + return this._helper.interpolatePadding(e, i, l); + } + isPaddingEqual(e) { + return this._helper.isPaddingEqual(e); + } + resize(e, i, l = !0) { + this._helper.resize(e, i, l); + } + getMaxBounds() { + return this._helper.getMaxBounds(); + } + setMaxBounds(e) { + this._helper.setMaxBounds(e); + } + overrideNearFarZ(e, i) { + this._helper.overrideNearFarZ(e, i); + } + clearNearFarZOverride() { + this._helper.clearNearFarZOverride(); + } + getCameraQueryGeometry(e) { + return this._helper.getCameraQueryGeometry( + this.getCameraPoint(), + e + ); + } + 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 nearZ() { + return this._helper.nearZ; + } + get farZ() { + return this._helper.farZ; + } + get autoCalculateNearFarZ() { + return this._helper.autoCalculateNearFarZ; + } + get isGlobeRendering() { + return this._globeness > 0; + } + setTransitionState(e, i) { + (this._globeness = e), + (this._globeLatitudeErrorCorrectionRadians = i), + this._calcMatrices(), + this._verticalPerspectiveTransform + .getCoveringTilesDetailsProvider() + .prepareNextFrame(), + this._mercatorTransform + .getCoveringTilesDetailsProvider() + .prepareNextFrame(); + } + get currentTransform() { + return this.isGlobeRendering + ? this._verticalPerspectiveTransform + : this._mercatorTransform; + } + constructor() { + (this._globeLatitudeErrorCorrectionRadians = 0), + (this._globeness = 1), + (this._helper = new Sn({ + calcMatrices: () => { + this._calcMatrices(); + }, + getConstrained: (e, i) => this.getConstrained(e, i), + })), + (this._globeness = 1), + (this._mercatorTransform = new on()), + (this._verticalPerspectiveTransform = new Ls()); + } + clone() { + const e = new Ds(); + return ( + (e._globeness = this._globeness), + (e._globeLatitudeErrorCorrectionRadians = + this._globeLatitudeErrorCorrectionRadians), + e.apply(this), + e + ); + } + apply(e) { + this._helper.apply(e), + this._mercatorTransform.apply(this), + this._verticalPerspectiveTransform.apply( + this, + 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(e) { + const i = this._mercatorTransform.getProjectionData(e), + l = this._verticalPerspectiveTransform.getProjectionData(e); + return { + mainMatrix: this.isGlobeRendering + ? l.mainMatrix + : i.mainMatrix, + clippingPlane: l.clippingPlane, + tileMercatorCoords: l.tileMercatorCoords, + projectionTransition: e.applyGlobeMatrix + ? this._globeness + : 0, + fallbackMatrix: i.fallbackMatrix, + }; + } + isLocationOccluded(e) { + return this.currentTransform.isLocationOccluded(e); + } + transformLightDirection(e) { + return this.currentTransform.transformLightDirection(e); + } + getPixelScale() { + return s.bk( + this._mercatorTransform.getPixelScale(), + this._verticalPerspectiveTransform.getPixelScale(), + this._globeness + ); + } + getCircleRadiusCorrection() { + return s.bk( + this._mercatorTransform.getCircleRadiusCorrection(), + this._verticalPerspectiveTransform.getCircleRadiusCorrection(), + this._globeness + ); + } + getPitchedTextCorrection(e, i, l) { + const u = this._mercatorTransform.getPitchedTextCorrection( + e, + i, + l + ), + d = + this._verticalPerspectiveTransform.getPitchedTextCorrection( + e, + i, + l + ); + return s.bk(u, d, this._globeness); + } + projectTileCoordinates(e, i, l, u) { + return this.currentTransform.projectTileCoordinates( + e, + i, + l, + u + ); + } + _calcMatrices() { + this._helper._width && + this._helper._height && + (this._verticalPerspectiveTransform.apply( + this, + 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(e) { + return this.currentTransform.calculateFogMatrix(e); + } + getVisibleUnwrappedCoordinates(e) { + return this.currentTransform.getVisibleUnwrappedCoordinates( + e + ); + } + getCameraFrustum() { + return this.currentTransform.getCameraFrustum(); + } + getClippingPlane() { + return this.currentTransform.getClippingPlane(); + } + getCoveringTilesDetailsProvider() { + return this.currentTransform.getCoveringTilesDetailsProvider(); + } + recalculateZoomAndCenter(e) { + this._mercatorTransform.recalculateZoomAndCenter(e), + this._verticalPerspectiveTransform.recalculateZoomAndCenter( + e + ); + } + maxPitchScaleFactor() { + return this._mercatorTransform.maxPitchScaleFactor(); + } + getCameraPoint() { + return this._helper.getCameraPoint(); + } + getCameraAltitude() { + return this._helper.getCameraAltitude(); + } + getCameraLngLat() { + return this._helper.getCameraLngLat(); + } + lngLatToCameraDepth(e, i) { + return this.currentTransform.lngLatToCameraDepth(e, i); + } + populateCache(e) { + this._mercatorTransform.populateCache(e), + this._verticalPerspectiveTransform.populateCache(e); + } + getBounds() { + return this.currentTransform.getBounds(); + } + getConstrained(e, i) { + return this.currentTransform.getConstrained(e, i); + } + calculateCenterFromCameraLngLatAlt(e, i, l, u) { + return this._helper.calculateCenterFromCameraLngLatAlt( + e, + i, + l, + u + ); + } + setLocationAtPoint(e, i) { + if (!this.isGlobeRendering) + return ( + this._mercatorTransform.setLocationAtPoint(e, i), + void this.apply(this._mercatorTransform) + ); + this._verticalPerspectiveTransform.setLocationAtPoint(e, i), + this.apply(this._verticalPerspectiveTransform); + } + locationToScreenPoint(e, i) { + return this.currentTransform.locationToScreenPoint(e, i); + } + screenPointToMercatorCoordinate(e, i) { + return this.currentTransform.screenPointToMercatorCoordinate( + e, + i + ); + } + screenPointToLocation(e, i) { + return this.currentTransform.screenPointToLocation(e, i); + } + isPointOnMapSurface(e, i) { + return this.currentTransform.isPointOnMapSurface(e, i); + } + getRayDirectionFromPixel(e) { + return this._verticalPerspectiveTransform.getRayDirectionFromPixel( + e + ); + } + getMatrixForModel(e, i) { + return this.currentTransform.getMatrixForModel(e, i); + } + getProjectionDataForCustomLayer(e = !0) { + const i = + this._mercatorTransform.getProjectionDataForCustomLayer(e); + if (!this.isGlobeRendering) return i; + const l = + this._verticalPerspectiveTransform.getProjectionDataForCustomLayer( + e + ); + return (l.fallbackMatrix = i.mainMatrix), l; + } + getFastPathSimpleProjectionMatrix(e) { + return this.currentTransform.getFastPathSimpleProjectionMatrix( + e + ); + } + } + class ji { + get useGlobeControls() { + return !0; + } + handlePanInertia(e, i) { + const l = Fh(e, i); + return ( + Math.abs(l.lng - i.center.lng) > 180 && + (l.lng = + i.center.lng + 179.5 * Math.sign(l.lng - i.center.lng)), + { easingCenter: l, easingOffset: new s.P(0, 0) } + ); + } + handleMapControlsRollPitchBearingZoom(e, i) { + const l = e.around, + u = i.screenPointToLocation(l); + e.bearingDelta && i.setBearing(i.bearing + e.bearingDelta), + e.pitchDelta && i.setPitch(i.pitch + e.pitchDelta), + e.rollDelta && i.setRoll(i.roll + e.rollDelta); + const d = i.zoom; + e.zoomDelta && i.setZoom(i.zoom + e.zoomDelta); + const g = i.zoom - d; + if (g === 0) return; + const w = s.bA(i.center.lng, u.lng), + C = w / (Math.abs(w / 180) + 1), + P = s.bA(i.center.lat, u.lat), + E = i.getRayDirectionFromPixel(l), + R = i.cameraPosition, + D = -1 * s.aX(R, E), + N = s.bp(); + s.aS(N, R, [E[0] * D, E[1] * D, E[2] * D]); + const G = s.aZ(N) - 1, + te = Math.exp(0.5 * -Math.max(G - 0.3, 0)), + Q = + Qo(i.worldSize, i.center.lat) / + Math.min(i.width, i.height), + ae = s.bn(Q, 0.9, 0.5, 1, 0.25), + ce = (1 - s.af(-g)) * Math.min(te, ae), + ve = i.center.lat, + me = i.zoom, + be = new s.S( + i.center.lng + C * ce, + s.ah(i.center.lat + P * ce, -s.ai, s.ai) + ); + i.setLocationAtPoint(u, l); + const Pe = i.center, + _e = s.bn(Math.abs(w), 45, 85, 0, 1), + Be = s.bn(Q, 0.75, 0.35, 0, 1), + rt = Math.pow(Math.max(_e, Be), 0.25), + Ge = s.bA(Pe.lng, be.lng), + Xe = s.bA(Pe.lat, be.lat); + i.setCenter( + new s.S(Pe.lng + Ge * rt, Pe.lat + Xe * rt).wrap() + ), + i.setZoom(me + ei(ve, i.center.lat)); + } + handleMapControlsPan(e, i, l) { + if (!e.panDelta) return; + const u = i.center.lat, + d = i.zoom; + i.setCenter(Fh(e.panDelta, i).wrap()), + i.setZoom(d + ei(u, i.center.lat)); + } + cameraForBoxAndBearing(e, i, l, u, d) { + const g = Hn(e, i, l, u, d), + w = (i.left / d.width) * 2 - 1, + C = ((d.width - i.right) / d.width) * 2 - 1, + P = (i.top / d.height) * -2 + 1, + E = ((d.height - i.bottom) / d.height) * -2 + 1, + R = s.bA(l.getWest(), l.getEast()) < 0, + D = R ? l.getEast() : l.getWest(), + N = R ? l.getWest() : l.getEast(), + G = Math.max(l.getNorth(), l.getSouth()), + te = Math.min(l.getNorth(), l.getSouth()), + Q = D + 0.5 * s.bA(D, N), + ae = G + 0.5 * s.bA(G, te), + ce = d.clone(); + ce.setCenter(g.center), + ce.setBearing(g.bearing), + ce.setPitch(0), + ce.setRoll(0), + ce.setZoom(g.zoom); + const ve = ce.modelViewProjectionMatrix, + me = [ + Ti(l.getNorthWest()), + Ti(l.getNorthEast()), + Ti(l.getSouthWest()), + Ti(l.getSouthEast()), + Ti(new s.S(N, ae)), + Ti(new s.S(D, ae)), + Ti(new s.S(Q, G)), + Ti(new s.S(Q, te)), + ], + be = Ti(g.center); + let Pe = Number.POSITIVE_INFINITY; + for (const _e of me) + w < 0 && + (Pe = ji.getLesserNonNegativeNonNull( + Pe, + ji.solveVectorScale(_e, be, ve, "x", w) + )), + C > 0 && + (Pe = ji.getLesserNonNegativeNonNull( + Pe, + ji.solveVectorScale(_e, be, ve, "x", C) + )), + P > 0 && + (Pe = ji.getLesserNonNegativeNonNull( + Pe, + ji.solveVectorScale(_e, be, ve, "y", P) + )), + E < 0 && + (Pe = ji.getLesserNonNegativeNonNull( + Pe, + ji.solveVectorScale(_e, be, ve, "y", E) + )); + if (Number.isFinite(Pe) && Pe !== 0) + return (g.zoom = ce.zoom + s.ak(Pe)), g; + po(); + } + handleJumpToCenterZoom(e, i) { + const l = e.center.lat, + u = e.getConstrained( + i.center ? s.S.convert(i.center) : e.center, + e.zoom + ).center; + e.setCenter(u.wrap()); + const d = i.zoom !== void 0 ? +i.zoom : e.zoom + ei(l, u.lat); + e.zoom !== d && e.setZoom(d); + } + handleEaseTo(e, i) { + const l = e.zoom, + u = e.center, + d = e.padding, + g = { roll: e.roll, pitch: e.pitch, bearing: e.bearing }, + w = { + roll: i.roll === void 0 ? e.roll : i.roll, + pitch: i.pitch === void 0 ? e.pitch : i.pitch, + bearing: i.bearing === void 0 ? e.bearing : i.bearing, + }, + C = i.zoom !== void 0, + P = !e.isPaddingEqual(i.padding); + let E = !1; + const R = i.center ? s.S.convert(i.center) : u, + D = e.getConstrained(R, l).center; + bn(e, D); + const N = e.clone(); + N.setCenter(D), + N.setZoom(C ? +i.zoom : l + ei(u.lat, R.lat)), + N.setBearing(i.bearing); + const G = new s.P( + s.ah(e.centerPoint.x + i.offsetAsPoint.x, 0, e.width), + s.ah(e.centerPoint.y + i.offsetAsPoint.y, 0, e.height) + ); + N.setLocationAtPoint(D, G); + const te = + (i.offset && i.offsetAsPoint.mag()) > 0 ? N.center : D, + Q = C ? +i.zoom : l + ei(u.lat, te.lat), + ae = l + ei(u.lat, 0), + ce = Q + ei(te.lat, 0), + ve = s.bA(u.lng, te.lng), + me = s.bA(u.lat, te.lat), + be = s.af(ce - ae); + return ( + (E = Q !== l), + { + easeFunc: (Pe) => { + if ( + (s.be(g, w) || + fi({ + startEulerAngles: g, + endEulerAngles: w, + tr: e, + k: Pe, + useSlerp: g.roll != w.roll, + }), + P && e.interpolatePadding(d, i.padding, Pe), + i.around) + ) + s.w( + "Easing around a point is not supported under globe projection." + ), + e.setLocationAtPoint(i.around, i.aroundPoint); + else { + const _e = + ce > ae ? Math.min(2, be) : Math.max(0.5, be), + Be = Math.pow(_e, 1 - Pe), + rt = Ec(u, ve, me, Pe * Be); + e.setCenter(rt.wrap()); + } + if (E) { + const _e = + s.C.number(ae, ce, Pe) + ei(0, e.center.lat); + e.setZoom(_e); + } + }, + isZooming: E, + elevationCenter: te, + } + ); + } + handleFlyTo(e, i) { + const l = i.zoom !== void 0, + u = e.center, + d = e.zoom, + g = e.padding, + w = !e.isPaddingEqual(i.padding), + C = e.getConstrained( + s.S.convert(i.center || i.locationAtOffset), + d + ).center, + P = l ? +i.zoom : e.zoom + ei(e.center.lat, C.lat), + E = e.clone(); + E.setCenter(C), E.setZoom(P), E.setBearing(i.bearing); + const R = new s.P( + s.ah(e.centerPoint.x + i.offsetAsPoint.x, 0, e.width), + s.ah(e.centerPoint.y + i.offsetAsPoint.y, 0, e.height) + ); + E.setLocationAtPoint(C, R); + const D = E.center; + bn(e, D); + const N = (function (me, be, Pe) { + const _e = Ti(be), + Be = Ti(Pe), + rt = s.aX(_e, Be), + Ge = Math.acos(rt), + Xe = vl(me); + return (Ge / (2 * Math.PI)) * Xe; + })(e, u, D), + G = d + ei(u.lat, 0), + te = P + ei(D.lat, 0), + Q = s.af(te - G); + let ae; + if (typeof i.minZoom == "number") { + const me = +i.minZoom + ei(D.lat, 0), + be = Math.min(me, G, te) + ei(0, D.lat), + Pe = e.getConstrained(D, be).zoom + ei(D.lat, 0); + ae = s.af(Pe - G); + } + const ce = s.bA(u.lng, D.lng), + ve = s.bA(u.lat, D.lat); + return { + easeFunc: (me, be, Pe, _e) => { + const Be = Ec(u, ce, ve, Pe); + w && e.interpolatePadding(g, i.padding, me); + const rt = me === 1 ? D : Be; + e.setCenter(rt.wrap()); + const Ge = G + s.ak(be); + e.setZoom(me === 1 ? P : Ge + ei(0, rt.lat)); + }, + scaleOfZoom: Q, + targetCenter: D, + scaleOfMinZoom: ae, + pixelPathLength: N, + }; + } + static solveVectorScale(e, i, l, u, d) { + const g = + u === "x" + ? [l[0], l[4], l[8], l[12]] + : [l[1], l[5], l[9], l[13]], + w = [l[3], l[7], l[11], l[15]], + C = e[0] * g[0] + e[1] * g[1] + e[2] * g[2], + P = e[0] * w[0] + e[1] * w[1] + e[2] * w[2], + E = i[0] * g[0] + i[1] * g[1] + i[2] * g[2], + R = i[0] * w[0] + i[1] * w[1] + i[2] * w[2]; + return E + d * P === C + d * R || + w[3] * (C - E) + g[3] * (R - P) + C * R == E * P + ? null + : (E + g[3] - d * R - d * w[3]) / (E - C - d * R + d * P); + } + static getLesserNonNegativeNonNull(e, i) { + return i !== null && i >= 0 && i < e ? i : e; + } + } + class Oh { + constructor(e) { + (this._globe = e), + (this._mercatorCameraHelper = new jn()), + (this._verticalPerspectiveCameraHelper = new ji()); + } + get useGlobeControls() { + return this._globe.useGlobeRendering; + } + get currentHelper() { + return this.useGlobeControls + ? this._verticalPerspectiveCameraHelper + : this._mercatorCameraHelper; + } + handlePanInertia(e, i) { + return this.currentHelper.handlePanInertia(e, i); + } + handleMapControlsRollPitchBearingZoom(e, i) { + return this.currentHelper.handleMapControlsRollPitchBearingZoom( + e, + i + ); + } + handleMapControlsPan(e, i, l) { + this.currentHelper.handleMapControlsPan(e, i, l); + } + cameraForBoxAndBearing(e, i, l, u, d) { + return this.currentHelper.cameraForBoxAndBearing( + e, + i, + l, + u, + d + ); + } + handleJumpToCenterZoom(e, i) { + this.currentHelper.handleJumpToCenterZoom(e, i); + } + handleEaseTo(e, i) { + return this.currentHelper.handleEaseTo(e, i); + } + handleFlyTo(e, i) { + return this.currentHelper.handleFlyTo(e, i); + } + } + const yl = (h, e) => + s.y( + h, + e && e.filter((i) => i.identifier !== "source.canvas") + ), + wp = s.bE(); + class zc extends s.E { + constructor(e, i = {}) { + super(), + (this._rtlPluginLoaded = () => { + for (const l in this.sourceCaches) { + const u = this.sourceCaches[l].getSource().type; + (u !== "vector" && u !== "geojson") || + this.sourceCaches[l].reload(); + } + }), + (this.map = e), + (this.dispatcher = new Dt(It(), e._getMapId())), + this.dispatcher.registerMessageHandler("GG", (l, u) => + this.getGlyphs(l, u) + ), + this.dispatcher.registerMessageHandler("GI", (l, u) => + this.getImages(l, u) + ), + (this.imageManager = new Qe()), + this.imageManager.setEventedParent(this), + (this.glyphManager = new Ue( + e._requestManager, + i.localIdeographFontFamily + )), + (this.lineAtlas = new oe(256, 512)), + (this.crossTileSymbolIndex = new sr()), + (this._spritesImagesIds = {}), + (this._layers = {}), + (this._order = []), + (this.sourceCaches = {}), + (this.zoomHistory = new s.bF()), + (this._loaded = !1), + (this._availableImages = []), + (this._globalState = {}), + this._resetUpdates(), + this.dispatcher.broadcast("SR", s.bG()), + Ir().on(mr, this._rtlPluginLoaded), + this.on("data", (l) => { + if ( + l.dataType !== "source" || + l.sourceDataType !== "metadata" + ) + return; + const u = this.sourceCaches[l.sourceId]; + if (!u) return; + const d = u.getSource(); + if (d && d.vectorLayerIds) + for (const g in this._layers) { + const w = this._layers[g]; + w.source === d.id && this._validateLayer(w); + } + }); + } + setGlobalStateProperty(e, i) { + var l, u, d; + this._checkLoaded(); + const g = + i === null + ? (d = + (u = + (l = this.stylesheet.state) === null || l === void 0 + ? void 0 + : l[e]) === null || u === void 0 + ? void 0 + : u.default) !== null && d !== void 0 + ? d + : null + : i; + if (s.bH(g, this._globalState[e])) return this; + this._globalState[e] = g; + const w = this._findGlobalStateAffectedSources([e]); + for (const C in this.sourceCaches) + w.has(C) && (this._reloadSource(C), (this._changed = !0)); + } + getGlobalState() { + return this._globalState; + } + setGlobalState(e) { + this._checkLoaded(); + const i = []; + for (const u in e) + !s.bH(this._globalState[u], e[u].default) && + (i.push(u), (this._globalState[u] = e[u].default)); + const l = this._findGlobalStateAffectedSources(i); + for (const u in this.sourceCaches) + l.has(u) && (this._reloadSource(u), (this._changed = !0)); + } + _findGlobalStateAffectedSources(e) { + if (e.length === 0) return new Set(); + const i = new Set(); + for (const l in this._layers) { + const u = this._layers[l], + d = u.getLayoutAffectingGlobalStateRefs(); + for (const g of e) d.has(g) && i.add(u.source); + } + return i; + } + loadURL(e, i = {}, l) { + this.fire(new s.l("dataloading", { dataType: "style" })), + (i.validate = typeof i.validate != "boolean" || i.validate); + const u = this.map._requestManager.transformRequest( + e, + "Style" + ); + this._loadStyleRequest = new AbortController(); + const d = this._loadStyleRequest; + s.j(u, this._loadStyleRequest) + .then((g) => { + (this._loadStyleRequest = null), this._load(g.data, i, l); + }) + .catch((g) => { + (this._loadStyleRequest = null), + g && !d.signal.aborted && this.fire(new s.k(g)); + }); + } + loadJSON(e, i = {}, l) { + this.fire(new s.l("dataloading", { dataType: "style" })), + (this._frameRequest = new AbortController()), + ne + .frameAsync(this._frameRequest) + .then(() => { + (this._frameRequest = null), + (i.validate = i.validate !== !1), + this._load(e, i, l); + }) + .catch(() => {}); + } + loadEmpty() { + this.fire(new s.l("dataloading", { dataType: "style" })), + this._load(wp, { validate: !1 }); + } + _load(e, i, l) { + var u, d, g; + const w = i.transformStyle ? i.transformStyle(l, e) : e; + if (!i.validate || !yl(this, s.z(w))) { + (this._loaded = !0), (this.stylesheet = w); + for (const C in w.sources) + this.addSource(C, w.sources[C], { validate: !1 }); + w.sprite + ? this._loadSprite(w.sprite) + : this.imageManager.setLoaded(!0), + this.glyphManager.setURL(w.glyphs), + this._createLayers(), + (this.light = new ee(this.stylesheet.light)), + this._setProjectionInternal( + ((u = this.stylesheet.projection) === null || + u === void 0 + ? void 0 + : u.type) || "mercator" + ), + (this.sky = new he(this.stylesheet.sky)), + this.map.setTerrain( + (d = this.stylesheet.terrain) !== null && d !== void 0 + ? d + : null + ), + this.setGlobalState( + (g = this.stylesheet.state) !== null && g !== void 0 + ? g + : null + ), + this.fire(new s.l("data", { dataType: "style" })), + this.fire(new s.l("style.load")); + } + } + _createLayers() { + const e = s.bI(this.stylesheet.layers); + this.dispatcher.broadcast("SL", e), + (this._order = e.map((i) => i.id)), + (this._layers = {}), + (this._serializedLayers = null); + for (const i of e) { + const l = s.bJ(i); + l.setEventedParent(this, { layer: { id: i.id } }), + (this._layers[i.id] = l); + } + } + _loadSprite(e, i = !1, l = void 0) { + let u; + this.imageManager.setLoaded(!1), + (this._spriteRequest = new AbortController()), + (function (d, g, w, C) { + return s._(this, void 0, void 0, function* () { + const P = Je(d), + E = w > 1 ? "@2x" : "", + R = {}, + D = {}; + for (const { id: N, url: G } of P) { + const te = g.transformRequest( + qe(G, E, ".json"), + "SpriteJSON" + ); + R[N] = s.j(te, C); + const Q = g.transformRequest( + qe(G, E, ".png"), + "SpriteImage" + ); + D[N] = Fe.getImage(Q, C); + } + return ( + yield Promise.all([ + ...Object.values(R), + ...Object.values(D), + ]), + (function (N, G) { + return s._(this, void 0, void 0, function* () { + const te = {}; + for (const Q in N) { + te[Q] = {}; + const ae = ne.getImageCanvasContext( + (yield G[Q]).data + ), + ce = (yield N[Q]).data; + for (const ve in ce) { + const { + width: me, + height: be, + x: Pe, + y: _e, + sdf: Be, + pixelRatio: rt, + stretchX: Ge, + stretchY: Xe, + content: tt, + textFitWidth: jt, + textFitHeight: Zt, + } = ce[ve]; + te[Q][ve] = { + data: null, + pixelRatio: rt, + sdf: Be, + stretchX: Ge, + stretchY: Xe, + content: tt, + textFitWidth: jt, + textFitHeight: Zt, + spriteData: { + width: me, + height: be, + x: Pe, + y: _e, + context: ae, + }, + }; + } + } + return te; + }); + })(R, D) + ); + }); + })( + e, + this.map._requestManager, + this.map.getPixelRatio(), + this._spriteRequest + ) + .then((d) => { + if (((this._spriteRequest = null), d)) + for (const g in d) { + this._spritesImagesIds[g] = []; + const w = this._spritesImagesIds[g] + ? this._spritesImagesIds[g].filter( + (C) => !(C in d) + ) + : []; + for (const C of w) + this.imageManager.removeImage(C), + (this._changedImages[C] = !0); + for (const C in d[g]) { + const P = g === "default" ? C : `${g}:${C}`; + this._spritesImagesIds[g].push(P), + P in this.imageManager.images + ? this.imageManager.updateImage( + P, + d[g][C], + !1 + ) + : this.imageManager.addImage(P, d[g][C]), + i && (this._changedImages[P] = !0); + } + } + }) + .catch((d) => { + (this._spriteRequest = null), + (u = d), + this.fire(new s.k(u)); + }) + .finally(() => { + this.imageManager.setLoaded(!0), + (this._availableImages = + this.imageManager.listImages()), + i && (this._changed = !0), + this.dispatcher.broadcast( + "SI", + this._availableImages + ), + this.fire(new s.l("data", { dataType: "style" })), + l && l(u); + }); + } + _unloadSprite() { + for (const e of Object.values(this._spritesImagesIds).flat()) + this.imageManager.removeImage(e), + (this._changedImages[e] = !0); + (this._spritesImagesIds = {}), + (this._availableImages = this.imageManager.listImages()), + (this._changed = !0), + this.dispatcher.broadcast("SI", this._availableImages), + this.fire(new s.l("data", { dataType: "style" })); + } + _validateLayer(e) { + const i = this.sourceCaches[e.source]; + if (!i) return; + const l = e.sourceLayer; + if (!l) return; + const u = i.getSource(); + (u.type === "geojson" || + (u.vectorLayerIds && u.vectorLayerIds.indexOf(l) === -1)) && + this.fire( + new s.k( + new Error( + `Source layer "${l}" does not exist on source "${u.id}" as specified by style layer "${e.id}".` + ) + ) + ); + } + loaded() { + if (!this._loaded || Object.keys(this._updatedSources).length) + return !1; + for (const e in this.sourceCaches) + if (!this.sourceCaches[e].loaded()) return !1; + return !!this.imageManager.isLoaded(); + } + _serializeByIds(e, i = !1) { + const l = this._serializedAllLayers(); + if (!e || e.length === 0) + return Object.values(i ? s.bK(l) : l); + const u = []; + for (const d of e) + if (l[d]) { + const g = i ? s.bK(l[d]) : l[d]; + u.push(g); + } + return u; + } + _serializedAllLayers() { + let e = this._serializedLayers; + if (e) return e; + e = this._serializedLayers = {}; + const i = Object.keys(this._layers); + for (const l of i) { + const u = this._layers[l]; + u.type !== "custom" && (e[l] = u.serialize()); + } + return e; + } + hasTransitions() { + var e, i, l; + if ( + (!((e = this.light) === null || e === void 0) && + e.hasTransition()) || + (!((i = this.sky) === null || i === void 0) && + i.hasTransition()) || + (!((l = this.projection) === null || l === void 0) && + l.hasTransition()) + ) + return !0; + for (const u in this.sourceCaches) + if (this.sourceCaches[u].hasTransition()) return !0; + for (const u in this._layers) + if (this._layers[u].hasTransition()) return !0; + return !1; + } + _checkLoaded() { + if (!this._loaded) + throw new Error("Style is not done loading."); + } + update(e) { + if (!this._loaded) return; + const i = this._changed; + if (i) { + const u = Object.keys(this._updatedLayers), + d = Object.keys(this._removedLayers); + (u.length || d.length) && this._updateWorkerLayers(u, d); + for (const g in this._updatedSources) { + const w = this._updatedSources[g]; + if (w === "reload") this._reloadSource(g); + else { + if (w !== "clear") + throw new Error(`Invalid action ${w}`); + this._clearSource(g); + } + } + this._updateTilesForChangedImages(), + this._updateTilesForChangedGlyphs(); + for (const g in this._updatedPaintProps) + this._layers[g].updateTransitions(e); + this.light.updateTransitions(e), + this.sky.updateTransitions(e), + this._resetUpdates(); + } + const l = {}; + for (const u in this.sourceCaches) { + const d = this.sourceCaches[u]; + (l[u] = d.used), (d.used = !1); + } + for (const u of this._order) { + const d = this._layers[u]; + d.recalculate(e, this._availableImages), + !d.isHidden(e.zoom) && + d.source && + (this.sourceCaches[d.source].used = !0); + } + for (const u in l) { + const d = this.sourceCaches[u]; + !!l[u] != !!d.used && + d.fire( + new s.l("data", { + sourceDataType: "visibility", + dataType: "source", + sourceId: u, + }) + ); + } + this.light.recalculate(e), + this.sky.recalculate(e), + this.projection.recalculate(e), + (this.z = e.zoom), + i && this.fire(new s.l("data", { dataType: "style" })); + } + _updateTilesForChangedImages() { + const e = Object.keys(this._changedImages); + if (e.length) { + for (const i in this.sourceCaches) + this.sourceCaches[i].reloadTilesForDependencies( + ["icons", "patterns"], + e + ); + this._changedImages = {}; + } + } + _updateTilesForChangedGlyphs() { + if (this._glyphsDidChange) { + for (const e in this.sourceCaches) + this.sourceCaches[e].reloadTilesForDependencies( + ["glyphs"], + [""] + ); + this._glyphsDidChange = !1; + } + } + _updateWorkerLayers(e, i) { + this.dispatcher.broadcast("UL", { + layers: this._serializeByIds(e, !1), + removedIds: i, + }); + } + _resetUpdates() { + (this._changed = !1), + (this._updatedLayers = {}), + (this._removedLayers = {}), + (this._updatedSources = {}), + (this._updatedPaintProps = {}), + (this._changedImages = {}), + (this._glyphsDidChange = !1); + } + setState(e, i = {}) { + var l; + this._checkLoaded(); + const u = this.serialize(); + if ( + ((e = i.transformStyle ? i.transformStyle(u, e) : e), + ((l = i.validate) === null || l === void 0 || l) && + yl(this, s.z(e))) + ) + return !1; + (e = s.bK(e)).layers = s.bI(e.layers); + const d = s.bL(u, e), + g = this._getOperationsToPerform(d); + if (g.unimplemented.length > 0) + throw new Error( + `Unimplemented: ${g.unimplemented.join(", ")}.` + ); + if (g.operations.length === 0) return !1; + for (const w of g.operations) w(); + return ( + (this.stylesheet = e), (this._serializedLayers = null), !0 + ); + } + _getOperationsToPerform(e) { + const i = [], + l = []; + for (const u of e) + switch (u.command) { + case "setCenter": + case "setZoom": + case "setBearing": + case "setPitch": + case "setRoll": + continue; + case "addLayer": + i.push(() => this.addLayer.apply(this, u.args)); + break; + case "removeLayer": + i.push(() => this.removeLayer.apply(this, u.args)); + break; + case "setPaintProperty": + i.push(() => this.setPaintProperty.apply(this, u.args)); + break; + case "setLayoutProperty": + i.push(() => + this.setLayoutProperty.apply(this, u.args) + ); + break; + case "setFilter": + i.push(() => this.setFilter.apply(this, u.args)); + break; + case "addSource": + i.push(() => this.addSource.apply(this, u.args)); + break; + case "removeSource": + i.push(() => this.removeSource.apply(this, u.args)); + break; + case "setLayerZoomRange": + i.push(() => + this.setLayerZoomRange.apply(this, u.args) + ); + break; + case "setLight": + i.push(() => this.setLight.apply(this, u.args)); + break; + case "setGeoJSONSourceData": + i.push(() => + this.setGeoJSONSourceData.apply(this, u.args) + ); + break; + case "setGlyphs": + i.push(() => this.setGlyphs.apply(this, u.args)); + break; + case "setSprite": + i.push(() => this.setSprite.apply(this, u.args)); + break; + case "setTerrain": + i.push(() => this.map.setTerrain.apply(this, u.args)); + break; + case "setSky": + i.push(() => this.setSky.apply(this, u.args)); + break; + case "setProjection": + this.setProjection.apply(this, u.args); + break; + case "setGlobalState": + i.push(() => this.setGlobalState.apply(this, u.args)); + break; + case "setTransition": + i.push(() => {}); + break; + default: + l.push(u.command); + } + return { operations: i, unimplemented: l }; + } + addImage(e, i) { + if (this.getImage(e)) + return this.fire( + new s.k( + new Error(`An image named "${e}" already exists.`) + ) + ); + this.imageManager.addImage(e, i), this._afterImageUpdated(e); + } + updateImage(e, i) { + this.imageManager.updateImage(e, i); + } + getImage(e) { + return this.imageManager.getImage(e); + } + removeImage(e) { + if (!this.getImage(e)) + return this.fire( + new s.k( + new Error(`An image named "${e}" does not exist.`) + ) + ); + this.imageManager.removeImage(e), this._afterImageUpdated(e); + } + _afterImageUpdated(e) { + (this._availableImages = this.imageManager.listImages()), + (this._changedImages[e] = !0), + (this._changed = !0), + this.dispatcher.broadcast("SI", this._availableImages), + this.fire(new s.l("data", { dataType: "style" })); + } + listImages() { + return this._checkLoaded(), this.imageManager.listImages(); + } + addSource(e, i, l = {}) { + if ((this._checkLoaded(), this.sourceCaches[e] !== void 0)) + throw new Error(`Source "${e}" already exists.`); + if (!i.type) + throw new Error( + `The type property must be defined, but only the following properties were given: ${Object.keys( + i + ).join(", ")}.` + ); + if ( + ["vector", "raster", "geojson", "video", "image"].indexOf( + i.type + ) >= 0 && + this._validate(s.z.source, `sources.${e}`, i, null, l) + ) + return; + this.map && + this.map._collectResourceTiming && + (i.collectResourceTiming = !0); + const u = (this.sourceCaches[e] = new rr( + e, + i, + this.dispatcher + )); + (u.style = this), + u.setEventedParent(this, () => ({ + isSourceLoaded: u.loaded(), + source: u.serialize(), + sourceId: e, + })), + u.onAdd(this.map), + (this._changed = !0); + } + removeSource(e) { + if ((this._checkLoaded(), this.sourceCaches[e] === void 0)) + throw new Error("There is no source with this ID"); + for (const l in this._layers) + if (this._layers[l].source === e) + return this.fire( + new s.k( + new Error( + `Source "${e}" cannot be removed while layer "${l}" is using it.` + ) + ) + ); + const i = this.sourceCaches[e]; + delete this.sourceCaches[e], + delete this._updatedSources[e], + i.fire( + new s.l("data", { + sourceDataType: "metadata", + dataType: "source", + sourceId: e, + }) + ), + i.setEventedParent(null), + i.onRemove(this.map), + (this._changed = !0); + } + setGeoJSONSourceData(e, i) { + if ((this._checkLoaded(), this.sourceCaches[e] === void 0)) + throw new Error(`There is no source with this ID=${e}`); + const l = this.sourceCaches[e].getSource(); + if (l.type !== "geojson") + throw new Error( + `geojsonSource.type is ${l.type}, which is !== 'geojson` + ); + l.setData(i), (this._changed = !0); + } + getSource(e) { + return ( + this.sourceCaches[e] && this.sourceCaches[e].getSource() + ); + } + addLayer(e, i, l = {}) { + this._checkLoaded(); + const u = e.id; + if (this.getLayer(u)) + return void this.fire( + new s.k( + new Error(`Layer "${u}" already exists on this map.`) + ) + ); + let d; + if (e.type === "custom") { + if (yl(this, s.bM(e))) return; + d = s.bJ(e); + } else { + if ( + ("source" in e && + typeof e.source == "object" && + (this.addSource(u, e.source), + (e = s.bK(e)), + (e = s.e(e, { source: u }))), + this._validate( + s.z.layer, + `layers.${u}`, + e, + { arrayIndex: -1 }, + l + )) + ) + return; + (d = s.bJ(e)), + this._validateLayer(d), + d.setEventedParent(this, { layer: { id: u } }); + } + const g = i ? this._order.indexOf(i) : this._order.length; + if (i && g === -1) + this.fire( + new s.k( + new Error( + `Cannot add layer "${u}" before non-existing layer "${i}".` + ) + ) + ); + else { + if ( + (this._order.splice(g, 0, u), + (this._layerOrderChanged = !0), + (this._layers[u] = d), + this._removedLayers[u] && d.source && d.type !== "custom") + ) { + const w = this._removedLayers[u]; + delete this._removedLayers[u], + w.type !== d.type + ? (this._updatedSources[d.source] = "clear") + : ((this._updatedSources[d.source] = "reload"), + this.sourceCaches[d.source].pause()); + } + this._updateLayer(d), d.onAdd && d.onAdd(this.map); + } + } + moveLayer(e, i) { + if ( + (this._checkLoaded(), + (this._changed = !0), + !this._layers[e]) + ) + return void this.fire( + new s.k( + new Error( + `The layer '${e}' does not exist in the map's style and cannot be moved.` + ) + ) + ); + if (e === i) return; + const l = this._order.indexOf(e); + this._order.splice(l, 1); + const u = i ? this._order.indexOf(i) : this._order.length; + i && u === -1 + ? this.fire( + new s.k( + new Error( + `Cannot move layer "${e}" before non-existing layer "${i}".` + ) + ) + ) + : (this._order.splice(u, 0, e), + (this._layerOrderChanged = !0)); + } + removeLayer(e) { + this._checkLoaded(); + const i = this._layers[e]; + if (!i) + return void this.fire( + new s.k( + new Error(`Cannot remove non-existing layer "${e}".`) + ) + ); + i.setEventedParent(null); + const l = this._order.indexOf(e); + this._order.splice(l, 1), + (this._layerOrderChanged = !0), + (this._changed = !0), + (this._removedLayers[e] = i), + delete this._layers[e], + this._serializedLayers && delete this._serializedLayers[e], + delete this._updatedLayers[e], + delete this._updatedPaintProps[e], + i.onRemove && i.onRemove(this.map); + } + getLayer(e) { + return this._layers[e]; + } + getLayersOrder() { + return [...this._order]; + } + hasLayer(e) { + return e in this._layers; + } + setLayerZoomRange(e, i, l) { + this._checkLoaded(); + const u = this.getLayer(e); + u + ? (u.minzoom === i && u.maxzoom === l) || + (i != null && (u.minzoom = i), + l != null && (u.maxzoom = l), + this._updateLayer(u)) + : this.fire( + new s.k( + new Error( + `Cannot set the zoom range of non-existing layer "${e}".` + ) + ) + ); + } + setFilter(e, i, l = {}) { + this._checkLoaded(); + const u = this.getLayer(e); + if (u) { + if (!s.bH(u.filter, i)) + return i == null + ? (u.setFilter(void 0), void this._updateLayer(u)) + : void ( + this._validate( + s.z.filter, + `layers.${u.id}.filter`, + i, + null, + l + ) || (u.setFilter(s.bK(i)), this._updateLayer(u)) + ); + } else this.fire(new s.k(new Error(`Cannot filter non-existing layer "${e}".`))); + } + getFilter(e) { + return s.bK(this.getLayer(e).filter); + } + setLayoutProperty(e, i, l, u = {}) { + this._checkLoaded(); + const d = this.getLayer(e); + d + ? s.bH(d.getLayoutProperty(i), l) || + (d.setLayoutProperty(i, l, u), this._updateLayer(d)) + : this.fire( + new s.k( + new Error(`Cannot style non-existing layer "${e}".`) + ) + ); + } + getLayoutProperty(e, i) { + const l = this.getLayer(e); + if (l) return l.getLayoutProperty(i); + this.fire( + new s.k( + new Error( + `Cannot get style of non-existing layer "${e}".` + ) + ) + ); + } + setPaintProperty(e, i, l, u = {}) { + this._checkLoaded(); + const d = this.getLayer(e); + d + ? s.bH(d.getPaintProperty(i), l) || + (d.setPaintProperty(i, l, u) && this._updateLayer(d), + (this._changed = !0), + (this._updatedPaintProps[e] = !0), + (this._serializedLayers = null)) + : this.fire( + new s.k( + new Error(`Cannot style non-existing layer "${e}".`) + ) + ); + } + getPaintProperty(e, i) { + return this.getLayer(e).getPaintProperty(i); + } + setFeatureState(e, i) { + this._checkLoaded(); + const l = e.source, + u = e.sourceLayer, + d = this.sourceCaches[l]; + if (d === void 0) + return void this.fire( + new s.k( + new Error( + `The source '${l}' does not exist in the map's style.` + ) + ) + ); + const g = d.getSource().type; + g === "geojson" && u + ? this.fire( + new s.k( + new Error( + "GeoJSON sources cannot have a sourceLayer parameter." + ) + ) + ) + : g !== "vector" || u + ? (e.id === void 0 && + this.fire( + new s.k( + new Error( + "The feature id parameter must be provided." + ) + ) + ), + d.setFeatureState(u, e.id, i)) + : this.fire( + new s.k( + new Error( + "The sourceLayer parameter must be provided for vector source types." + ) + ) + ); + } + removeFeatureState(e, i) { + this._checkLoaded(); + const l = e.source, + u = this.sourceCaches[l]; + if (u === void 0) + return void this.fire( + new s.k( + new Error( + `The source '${l}' does not exist in the map's style.` + ) + ) + ); + const d = u.getSource().type, + g = d === "vector" ? e.sourceLayer : void 0; + d !== "vector" || g + ? i && typeof e.id != "string" && typeof e.id != "number" + ? this.fire( + new s.k( + new Error( + "A feature id is required to remove its specific state property." + ) + ) + ) + : u.removeFeatureState(g, e.id, i) + : this.fire( + new s.k( + new Error( + "The sourceLayer parameter must be provided for vector source types." + ) + ) + ); + } + getFeatureState(e) { + this._checkLoaded(); + const i = e.source, + l = e.sourceLayer, + u = this.sourceCaches[i]; + if (u !== void 0) + return u.getSource().type !== "vector" || l + ? (e.id === void 0 && + this.fire( + new s.k( + new Error( + "The feature id parameter must be provided." + ) + ) + ), + u.getFeatureState(l, e.id)) + : void this.fire( + new s.k( + new Error( + "The sourceLayer parameter must be provided for vector source types." + ) + ) + ); + this.fire( + new s.k( + new Error( + `The source '${i}' does not exist in the map's style.` + ) + ) + ); + } + getTransition() { + return s.e( + { duration: 300, delay: 0 }, + this.stylesheet && this.stylesheet.transition + ); + } + serialize() { + if (!this._loaded) return; + const e = s.bN(this.sourceCaches, (d) => d.serialize()), + i = this._serializeByIds(this._order, !0), + l = this.map.getTerrain() || void 0, + u = this.stylesheet; + return s.bO( + { + version: u.version, + name: u.name, + metadata: u.metadata, + light: u.light, + sky: u.sky, + center: u.center, + zoom: u.zoom, + bearing: u.bearing, + pitch: u.pitch, + sprite: u.sprite, + glyphs: u.glyphs, + transition: u.transition, + projection: u.projection, + sources: e, + layers: i, + terrain: l, + }, + (d) => d !== void 0 + ); + } + _updateLayer(e) { + (this._updatedLayers[e.id] = !0), + e.source && + !this._updatedSources[e.source] && + this.sourceCaches[e.source].getSource().type !== + "raster" && + ((this._updatedSources[e.source] = "reload"), + this.sourceCaches[e.source].pause()), + (this._serializedLayers = null), + (this._changed = !0); + } + _flattenAndSortRenderedFeatures(e) { + const i = (g) => this._layers[g].type === "fill-extrusion", + l = {}, + u = []; + for (let g = this._order.length - 1; g >= 0; g--) { + const w = this._order[g]; + if (i(w)) { + l[w] = g; + for (const C of e) { + const P = C[w]; + if (P) for (const E of P) u.push(E); + } + } + } + u.sort((g, w) => w.intersectionZ - g.intersectionZ); + const d = []; + for (let g = this._order.length - 1; g >= 0; g--) { + const w = this._order[g]; + if (i(w)) + for (let C = u.length - 1; C >= 0; C--) { + const P = u[C].feature; + if (l[P.layer.id] < g) break; + d.push(P), u.pop(); + } + else + for (const C of e) { + const P = C[w]; + if (P) for (const E of P) d.push(E.feature); + } + } + return d; + } + queryRenderedFeatures(e, i, l) { + i && + i.filter && + this._validate( + s.z.filter, + "queryRenderedFeatures.filter", + i.filter, + null, + i + ); + const u = {}; + if (i && i.layers) { + if (!(Array.isArray(i.layers) || i.layers instanceof Set)) + return ( + this.fire( + new s.k( + new Error( + "parameters.layers must be an Array or a Set of strings" + ) + ) + ), + [] + ); + for (const P of i.layers) { + const E = this._layers[P]; + if (!E) + return ( + this.fire( + new s.k( + new Error( + `The layer '${P}' does not exist in the map's style and cannot be queried for features.` + ) + ) + ), + [] + ); + u[E.source] = !0; + } + } + const d = []; + i.availableImages = this._availableImages; + const g = this._serializedAllLayers(), + w = + i.layers instanceof Set + ? i.layers + : Array.isArray(i.layers) + ? new Set(i.layers) + : null, + C = Object.assign(Object.assign({}, i), { layers: w }); + for (const P in this.sourceCaches) + (i.layers && !u[P]) || + d.push( + yt( + this.sourceCaches[P], + this._layers, + g, + e, + C, + l, + this.map.terrain + ? (E, R, D) => + this.map.terrain.getElevation(E, R, D) + : void 0 + ) + ); + return ( + this.placement && + d.push( + (function (P, E, R, D, N, G, te) { + const Q = {}, + ae = G.queryRenderedSymbols(D), + ce = []; + for (const ve of Object.keys(ae).map(Number)) + ce.push(te[ve]); + ce.sort(xt); + for (const ve of ce) { + const me = ve.featureIndex.lookupSymbolFeatures( + ae[ve.bucketInstanceId], + E, + ve.bucketIndex, + ve.sourceLayerIndex, + N.filter, + N.layers, + N.availableImages, + P + ); + for (const be in me) { + const Pe = (Q[be] = Q[be] || []), + _e = me[be]; + _e.sort((Be, rt) => { + const Ge = ve.featureSortOrder; + if (Ge) { + const Xe = Ge.indexOf(Be.featureIndex); + return Ge.indexOf(rt.featureIndex) - Xe; + } + return rt.featureIndex - Be.featureIndex; + }); + for (const Be of _e) Pe.push(Be); + } + } + return (function (ve, me, be) { + for (const Pe in ve) + for (const _e of ve[Pe]) + St(_e, be[me[Pe].source]); + return ve; + })(Q, P, R); + })( + this._layers, + g, + this.sourceCaches, + e, + C, + this.placement.collisionIndex, + this.placement.retainedQueryData + ) + ), + this._flattenAndSortRenderedFeatures(d) + ); + } + querySourceFeatures(e, i) { + i && + i.filter && + this._validate( + s.z.filter, + "querySourceFeatures.filter", + i.filter, + null, + i + ); + const l = this.sourceCaches[e]; + return l + ? (function (u, d) { + const g = u + .getRenderableIds() + .map((P) => u.getTileByID(P)), + w = [], + C = {}; + for (let P = 0; P < g.length; P++) { + const E = g[P], + R = E.tileID.canonical.key; + C[R] || ((C[R] = !0), E.querySourceFeatures(w, d)); + } + return w; + })(l, i) + : []; + } + getLight() { + return this.light.getLight(); + } + setLight(e, i = {}) { + this._checkLoaded(); + const l = this.light.getLight(); + let u = !1; + for (const g in e) + if (!s.bH(e[g], l[g])) { + u = !0; + break; + } + if (!u) return; + const d = { + now: ne.now(), + transition: s.e( + { duration: 300, delay: 0 }, + this.stylesheet.transition + ), + }; + this.light.setLight(e, i), this.light.updateTransitions(d); + } + getProjection() { + var e; + return (e = this.stylesheet) === null || e === void 0 + ? void 0 + : e.projection; + } + setProjection(e) { + if ((this._checkLoaded(), this.projection)) { + if (this.projection.name === e.type) return; + this.projection.destroy(), delete this.projection; + } + (this.stylesheet.projection = e), + this._setProjectionInternal(e.type); + } + getSky() { + var e; + return (e = this.stylesheet) === null || e === void 0 + ? void 0 + : e.sky; + } + setSky(e, i = {}) { + this._checkLoaded(); + const l = this.getSky(); + let u = !1; + if (!e && !l) return; + if (e && !l) u = !0; + else if (!e && l) u = !0; + else + for (const g in e) + if (!s.bH(e[g], l[g])) { + u = !0; + break; + } + if (!u) return; + const d = { + now: ne.now(), + transition: s.e( + { duration: 300, delay: 0 }, + this.stylesheet.transition + ), + }; + (this.stylesheet.sky = e), + this.sky.setSky(e, i), + this.sky.updateTransitions(d); + } + _setProjectionInternal(e) { + const i = (function (l) { + if (Array.isArray(l)) { + const u = new gl({ type: l }); + return { + projection: u, + transform: new Ds(), + cameraHelper: new Oh(u), + }; + } + switch (l) { + case "mercator": + return { + projection: new Mr(), + transform: new on(), + cameraHelper: new jn(), + }; + case "globe": { + const u = new gl({ + type: [ + "interpolate", + ["linear"], + ["zoom"], + 11, + "vertical-perspective", + 12, + "mercator", + ], + }); + return { + projection: u, + transform: new Ds(), + cameraHelper: new Oh(u), + }; + } + case "vertical-perspective": + return { + projection: new Qa(), + transform: new Ls(), + cameraHelper: new ji(), + }; + default: + return ( + s.w( + `Unknown projection name: ${l}. Falling back to mercator projection.` + ), + { + projection: new Mr(), + transform: new on(), + cameraHelper: new jn(), + } + ); + } + })(e); + (this.projection = i.projection), + this.map.migrateProjection(i.transform, i.cameraHelper); + for (const l in this.sourceCaches) + this.sourceCaches[l].reload(); + } + _validate(e, i, l, u, d = {}) { + return ( + (!d || d.validate !== !1) && + yl( + this, + e.call( + s.z, + s.e( + { + key: i, + style: this.serialize(), + value: l, + styleSpec: s.v, + }, + u + ) + ) + ) + ); + } + _remove(e = !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)), + Ir().off(mr, this._rtlPluginLoaded); + for (const i in this._layers) + this._layers[i].setEventedParent(null); + for (const i in this.sourceCaches) { + const l = this.sourceCaches[i]; + l.setEventedParent(null), l.onRemove(this.map); + } + this.imageManager.setEventedParent(null), + this.setEventedParent(null), + e && this.dispatcher.broadcast("RM", void 0), + this.dispatcher.remove(e); + } + _clearSource(e) { + this.sourceCaches[e].clearTiles(); + } + _reloadSource(e) { + this.sourceCaches[e].resume(), this.sourceCaches[e].reload(); + } + _updateSources(e) { + for (const i in this.sourceCaches) + this.sourceCaches[i].update(e, this.map.terrain); + } + _generateCollisionBoxes() { + for (const e in this.sourceCaches) this._reloadSource(e); + } + _updatePlacement(e, i, l, u, d = !1) { + let g = !1, + w = !1; + const C = {}; + for (const P of this._order) { + const E = this._layers[P]; + if (E.type !== "symbol") continue; + if (!C[E.source]) { + const D = this.sourceCaches[E.source]; + C[E.source] = D.getRenderableIds(!0) + .map((N) => D.getTileByID(N)) + .sort( + (N, G) => + G.tileID.overscaledZ - N.tileID.overscaledZ || + (N.tileID.isLessThan(G.tileID) ? -1 : 1) + ); + } + const R = this.crossTileSymbolIndex.addLayer( + E, + C[E.source], + e.center.lng + ); + g = g || R; + } + if ( + (this.crossTileSymbolIndex.pruneUnusedLayers(this._order), + ((d = d || this._layerOrderChanged || l === 0) || + !this.pauseablePlacement || + (this.pauseablePlacement.isDone() && + !this.placement.stillRecent(ne.now(), e.zoom))) && + ((this.pauseablePlacement = new On( + e, + this.map.terrain, + this._order, + d, + i, + l, + u, + this.placement + )), + (this._layerOrderChanged = !1)), + this.pauseablePlacement.isDone() + ? this.placement.setStale() + : (this.pauseablePlacement.continuePlacement( + this._order, + this._layers, + C + ), + this.pauseablePlacement.isDone() && + ((this.placement = this.pauseablePlacement.commit( + ne.now() + )), + (w = !0)), + g && this.pauseablePlacement.placement.setStale()), + w || g) + ) + for (const P of this._order) { + const E = this._layers[P]; + E.type === "symbol" && + this.placement.updateLayerOpacities(E, C[E.source]); + } + return ( + !this.pauseablePlacement.isDone() || + this.placement.hasTransitions(ne.now()) + ); + } + _releaseSymbolFadeTiles() { + for (const e in this.sourceCaches) + this.sourceCaches[e].releaseSymbolFadeTiles(); + } + getImages(e, i) { + return s._(this, void 0, void 0, function* () { + const l = yield this.imageManager.getImages(i.icons); + this._updateTilesForChangedImages(); + const u = this.sourceCaches[i.source]; + return ( + u && u.setDependencies(i.tileID.key, i.type, i.icons), l + ); + }); + } + getGlyphs(e, i) { + return s._(this, void 0, void 0, function* () { + const l = yield this.glyphManager.getGlyphs(i.stacks), + u = this.sourceCaches[i.source]; + return ( + u && u.setDependencies(i.tileID.key, i.type, [""]), l + ); + }); + } + getGlyphsUrl() { + return this.stylesheet.glyphs || null; + } + setGlyphs(e, i = {}) { + this._checkLoaded(), + (e && this._validate(s.z.glyphs, "glyphs", e, null, i)) || + ((this._glyphsDidChange = !0), + (this.stylesheet.glyphs = e), + (this.glyphManager.entries = {}), + this.glyphManager.setURL(e)); + } + addSprite(e, i, l = {}, u) { + this._checkLoaded(); + const d = [{ id: e, url: i }], + g = [...Je(this.stylesheet.sprite), ...d]; + this._validate(s.z.sprite, "sprite", g, null, l) || + ((this.stylesheet.sprite = g), this._loadSprite(d, !0, u)); + } + removeSprite(e) { + this._checkLoaded(); + const i = Je(this.stylesheet.sprite); + if (i.find((l) => l.id === e)) { + if (this._spritesImagesIds[e]) + for (const l of this._spritesImagesIds[e]) + this.imageManager.removeImage(l), + (this._changedImages[l] = !0); + i.splice( + i.findIndex((l) => l.id === e), + 1 + ), + (this.stylesheet.sprite = i.length > 0 ? i : void 0), + delete this._spritesImagesIds[e], + (this._availableImages = this.imageManager.listImages()), + (this._changed = !0), + this.dispatcher.broadcast("SI", this._availableImages), + this.fire(new s.l("data", { dataType: "style" })); + } else this.fire(new s.k(new Error(`Sprite "${e}" doesn't exists on this map.`))); + } + getSprite() { + return Je(this.stylesheet.sprite); + } + setSprite(e, i = {}, l) { + this._checkLoaded(), + (e && this._validate(s.z.sprite, "sprite", e, null, i)) || + ((this.stylesheet.sprite = e), + e + ? this._loadSprite(e, !0, l) + : (this._unloadSprite(), l && l(null))); + } + } + var Tp = s.aJ([ + { name: "a_pos", type: "Int16", components: 2 }, + { name: "a_texture_pos", type: "Int16", components: 2 }, + ]); + class Cp { + constructor() { + (this.boundProgram = null), + (this.boundLayoutVertexBuffer = null), + (this.boundPaintVertexBuffers = []), + (this.boundIndexBuffer = null), + (this.boundVertexOffset = null), + (this.boundDynamicVertexBuffer = null), + (this.vao = null); + } + bind(e, i, l, u, d, g, w, C, P) { + this.context = e; + let E = this.boundPaintVertexBuffers.length !== u.length; + for (let R = 0; !E && R < u.length; R++) + this.boundPaintVertexBuffers[R] !== u[R] && (E = !0); + !this.vao || + this.boundProgram !== i || + this.boundLayoutVertexBuffer !== l || + E || + this.boundIndexBuffer !== d || + this.boundVertexOffset !== g || + this.boundDynamicVertexBuffer !== w || + this.boundDynamicVertexBuffer2 !== C || + this.boundDynamicVertexBuffer3 !== P + ? this.freshBind(i, l, u, d, g, w, C, P) + : (e.bindVertexArray.set(this.vao), + w && w.bind(), + d && d.dynamicDraw && d.bind(), + C && C.bind(), + P && P.bind()); + } + freshBind(e, i, l, u, d, g, w, C) { + const P = e.numAttributes, + E = this.context, + R = E.gl; + this.vao && this.destroy(), + (this.vao = E.createVertexArray()), + E.bindVertexArray.set(this.vao), + (this.boundProgram = e), + (this.boundLayoutVertexBuffer = i), + (this.boundPaintVertexBuffers = l), + (this.boundIndexBuffer = u), + (this.boundVertexOffset = d), + (this.boundDynamicVertexBuffer = g), + (this.boundDynamicVertexBuffer2 = w), + (this.boundDynamicVertexBuffer3 = C), + i.enableAttributes(R, e); + for (const D of l) D.enableAttributes(R, e); + g && g.enableAttributes(R, e), + w && w.enableAttributes(R, e), + C && C.enableAttributes(R, e), + i.bind(), + i.setVertexAttribPointers(R, e, d); + for (const D of l) + D.bind(), D.setVertexAttribPointers(R, e, d); + g && (g.bind(), g.setVertexAttribPointers(R, e, d)), + u && u.bind(), + w && (w.bind(), w.setVertexAttribPointers(R, e, d)), + C && (C.bind(), C.setVertexAttribPointers(R, e, d)), + (E.currentNumAttributes = P); + } + destroy() { + this.vao && + (this.context.deleteVertexArray(this.vao), + (this.vao = null)); + } + } + const xl = (h, e, i, l, u) => ({ + u_texture: 0, + u_ele_delta: h, + u_fog_matrix: e, + u_fog_color: i ? i.properties.get("fog-color") : s.bf.white, + u_fog_ground_blend: i + ? i.properties.get("fog-ground-blend") + : 1, + u_fog_ground_blend_opacity: u + ? 0 + : i + ? i.calculateFogBlendOpacity(l) + : 0, + u_horizon_color: i + ? i.properties.get("horizon-color") + : s.bf.white, + u_horizon_fog_blend: i + ? i.properties.get("horizon-fog-blend") + : 1, + u_is_globe_mode: u ? 1 : 0, + }), + Lc = { + 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(h) { + const e = []; + for (let i = 0; i < h.length; i++) { + if (h[i] === null) continue; + const l = h[i].split(" "); + e.push(l.pop()); + } + return e; + } + class Dc { + constructor(e, i, l, u, d, g, w, C, P = []) { + const E = e.gl; + this.program = E.createProgram(); + const R = ko(i.staticAttributes), + D = l ? l.getBinderAttributes() : [], + N = R.concat(D), + G = $r.prelude.staticUniforms + ? ko($r.prelude.staticUniforms) + : [], + te = w.staticUniforms ? ko(w.staticUniforms) : [], + Q = i.staticUniforms ? ko(i.staticUniforms) : [], + ae = l ? l.getBinderUniforms() : [], + ce = G.concat(te).concat(Q).concat(ae), + ve = []; + for (const Ge of ce) ve.indexOf(Ge) < 0 && ve.push(Ge); + const me = l ? l.defines() : []; + ga(E) && me.unshift("#version 300 es"), + d && me.push("#define OVERDRAW_INSPECTOR;"), + g && me.push("#define TERRAIN3D;"), + C && me.push(C), + P && me.push(...P); + let be = me.concat( + $r.prelude.fragmentSource, + w.fragmentSource, + i.fragmentSource + ).join(` +`), + Pe = me.concat( + $r.prelude.vertexSource, + w.vertexSource, + i.vertexSource + ).join(` +`); + ga(E) || + ((be = (function (Ge) { + return Ge.replace(/\bin\s/g, "varying ") + .replace("out highp vec4 fragColor;", "") + .replace(/fragColor/g, "gl_FragColor") + .replace(/texture\(/g, "texture2D("); + })(be)), + (Pe = (function (Ge) { + return Ge.replace(/\bin\s/g, "attribute ") + .replace(/\bout\s/g, "varying ") + .replace(/texture\(/g, "texture2D("); + })(Pe))); + const _e = E.createShader(E.FRAGMENT_SHADER); + if (E.isContextLost()) return void (this.failedToCreate = !0); + if ( + (E.shaderSource(_e, be), + E.compileShader(_e), + !E.getShaderParameter(_e, E.COMPILE_STATUS)) + ) + throw new Error( + `Could not compile fragment shader: ${E.getShaderInfoLog( + _e + )}` + ); + E.attachShader(this.program, _e); + const Be = E.createShader(E.VERTEX_SHADER); + if (E.isContextLost()) return void (this.failedToCreate = !0); + if ( + (E.shaderSource(Be, Pe), + E.compileShader(Be), + !E.getShaderParameter(Be, E.COMPILE_STATUS)) + ) + throw new Error( + `Could not compile vertex shader: ${E.getShaderInfoLog( + Be + )}` + ); + E.attachShader(this.program, Be), (this.attributes = {}); + const rt = {}; + this.numAttributes = N.length; + for (let Ge = 0; Ge < this.numAttributes; Ge++) + N[Ge] && + (E.bindAttribLocation(this.program, Ge, N[Ge]), + (this.attributes[N[Ge]] = Ge)); + if ( + (E.linkProgram(this.program), + !E.getProgramParameter(this.program, E.LINK_STATUS)) + ) + throw new Error( + `Program failed to link: ${E.getProgramInfoLog( + this.program + )}` + ); + E.deleteShader(Be), E.deleteShader(_e); + for (let Ge = 0; Ge < ve.length; Ge++) { + const Xe = ve[Ge]; + if (Xe && !rt[Xe]) { + const tt = E.getUniformLocation(this.program, Xe); + tt && (rt[Xe] = tt); + } + } + (this.fixedUniforms = u(e, rt)), + (this.terrainUniforms = ((Ge, Xe) => ({ + u_depth: new s.bP(Ge, Xe.u_depth), + u_terrain: new s.bP(Ge, Xe.u_terrain), + u_terrain_dim: new s.bg(Ge, Xe.u_terrain_dim), + u_terrain_matrix: new s.bR(Ge, Xe.u_terrain_matrix), + u_terrain_unpack: new s.bS(Ge, Xe.u_terrain_unpack), + u_terrain_exaggeration: new s.bg( + Ge, + Xe.u_terrain_exaggeration + ), + }))(e, rt)), + (this.projectionUniforms = ((Ge, Xe) => ({ + u_projection_matrix: new s.bR(Ge, Xe.u_projection_matrix), + u_projection_tile_mercator_coords: new s.bS( + Ge, + Xe.u_projection_tile_mercator_coords + ), + u_projection_clipping_plane: new s.bS( + Ge, + Xe.u_projection_clipping_plane + ), + u_projection_transition: new s.bg( + Ge, + Xe.u_projection_transition + ), + u_projection_fallback_matrix: new s.bR( + Ge, + Xe.u_projection_fallback_matrix + ), + }))(e, rt)), + (this.binderUniforms = l ? l.getUniforms(e, rt) : []); + } + draw( + e, + i, + l, + u, + d, + g, + w, + C, + P, + E, + R, + D, + N, + G, + te, + Q, + ae, + ce, + ve + ) { + const me = e.gl; + if (this.failedToCreate) return; + if ( + (e.program.set(this.program), + e.setDepthMode(l), + e.setStencilMode(u), + e.setColorMode(d), + e.setCullFace(g), + C) + ) { + e.activeTexture.set(me.TEXTURE2), + me.bindTexture(me.TEXTURE_2D, C.depthTexture), + e.activeTexture.set(me.TEXTURE3), + me.bindTexture(me.TEXTURE_2D, C.texture); + for (const Pe in this.terrainUniforms) + this.terrainUniforms[Pe].set(C[Pe]); + } + if (P) + for (const Pe in P) + this.projectionUniforms[Lc[Pe]].set(P[Pe]); + if (w) + for (const Pe in this.fixedUniforms) + this.fixedUniforms[Pe].set(w[Pe]); + Q && Q.setUniforms(e, this.binderUniforms, G, { zoom: te }); + let be = 0; + switch (i) { + case me.LINES: + be = 2; + break; + case me.TRIANGLES: + be = 3; + break; + case me.LINE_STRIP: + be = 1; + } + for (const Pe of N.get()) { + const _e = Pe.vaos || (Pe.vaos = {}); + (_e[E] || (_e[E] = new Cp())).bind( + e, + this, + R, + Q ? Q.getPaintVertexBuffers() : [], + D, + Pe.vertexOffset, + ae, + ce, + ve + ), + me.drawElements( + i, + Pe.primitiveLength * be, + me.UNSIGNED_SHORT, + Pe.primitiveOffset * be * 2 + ); + } + } + } + function bl(h, e, i) { + const l = 1 / s.aC(i, 1, e.transform.tileZoom), + u = Math.pow(2, i.tileID.overscaledZ), + d = (i.tileSize * Math.pow(2, e.transform.tileZoom)) / u, + g = d * (i.tileID.canonical.x + i.tileID.wrap * u), + w = d * i.tileID.canonical.y; + return { + u_image: 0, + u_texsize: i.imageAtlasTexture.size, + u_scale: [l, h.fromScale, h.toScale], + u_fade: h.t, + u_pixel_coord_upper: [g >> 16, w >> 16], + u_pixel_coord_lower: [65535 & g, 65535 & w], + }; + } + const Pa = (h, e, i, l) => { + const u = h.style.light, + d = u.properties.get("position"), + g = [d.x, d.y, d.z], + w = s.bV(); + u.properties.get("anchor") === "viewport" && + s.bW(w, h.transform.bearingInRadians), + s.bX(g, g, w); + const C = h.transform.transformLightDirection(g), + P = u.properties.get("color"); + return { + u_lightpos: g, + u_lightpos_globe: C, + u_lightintensity: u.properties.get("intensity"), + u_lightcolor: [P.r, P.g, P.b], + u_vertical_gradient: +e, + u_opacity: i, + u_fill_translate: l, + }; + }, + Sp = (h, e, i, l, u, d, g) => + s.e(Pa(h, e, i, l), bl(d, h, g), { + u_height_factor: + -Math.pow(2, u.overscaledZ) / g.tileSize / 8, + }), + wl = (h, e, i, l) => s.e(bl(e, h, i), { u_fill_translate: l }), + Rs = (h, e) => ({ u_world: h, u_fill_translate: e }), + Bs = (h, e, i, l, u) => s.e(wl(h, e, i, u), { u_world: l }), + Pp = (h, e, i, l, u) => { + const d = h.transform; + let g, + w, + C = 0; + if (i.paint.get("circle-pitch-alignment") === "map") { + const P = s.aC(e, 1, d.zoom); + (g = !0), + (w = [P, P]), + (C = + (P / (s.$ * Math.pow(2, e.tileID.overscaledZ))) * + 2 * + Math.PI * + u); + } else (g = !1), (w = d.pixelsToGLUnits); + return { + u_camera_to_center_distance: d.cameraToCenterDistance, + u_scale_with_map: +( + i.paint.get("circle-pitch-scale") === "map" + ), + u_pitch_with_map: +g, + u_device_pixel_ratio: h.pixelRatio, + u_extrude_scale: w, + u_globe_extrude_scale: C, + u_translate: l, + }; + }, + Tl = (h) => ({ + u_pixel_extrude_scale: [1 / h.width, 1 / h.height], + }), + Ip = (h) => ({ u_viewport_size: [h.width, h.height] }), + Ao = (h, e = 1) => ({ + u_color: h, + u_overlay: 0, + u_overlay_scale: e, + }), + Nh = (h, e, i, l) => { + const u = + (s.aC(h, 1, e) / + (s.$ * Math.pow(2, h.tileID.overscaledZ))) * + 2 * + Math.PI * + l; + return { + u_extrude_scale: s.aC(h, 1, e), + u_intensity: i, + u_globe_extrude_scale: u, + }; + }, + Rc = (h, e, i, l) => { + const u = s.L(); + s.bY(u, 0, h.width, h.height, 0, 0, 1); + const d = h.context.gl; + return { + u_matrix: u, + u_world: [d.drawingBufferWidth, d.drawingBufferHeight], + u_image: i, + u_color_ramp: l, + u_opacity: e.paint.get("heatmap-opacity"), + }; + }, + Mp = (h, e, i) => { + const l = i.paint.get("hillshade-accent-color"); + let u; + switch (i.paint.get("hillshade-method")) { + case "basic": + u = 4; + break; + case "combined": + u = 1; + break; + case "igor": + u = 2; + break; + case "multidirectional": + u = 3; + break; + default: + u = 0; + } + const d = i.getIlluminationProperties(); + for (let g = 0; g < d.directionRadians.length; g++) + i.paint.get("hillshade-illumination-anchor") === + "viewport" && + (d.directionRadians[g] += h.transform.bearingInRadians); + return { + u_image: 0, + u_latrange: Bc(0, e.tileID), + u_exaggeration: i.paint.get("hillshade-exaggeration"), + u_altitudes: d.altitudeRadians, + u_azimuths: d.directionRadians, + u_accent: l, + u_method: u, + u_highlights: d.highlightColor, + u_shadows: d.shadowColor, + }; + }, + jh = (h, e) => { + const i = e.stride, + l = s.L(); + return ( + s.bY(l, 0, s.$, -s.$, 0, 0, 1), + s.M(l, l, [0, -s.$, 0]), + { + u_matrix: l, + u_image: 1, + u_dimension: [i, i], + u_zoom: h.overscaledZ, + u_unpack: e.getUnpackVector(), + } + ); + }; + function Bc(h, e) { + const i = Math.pow(2, e.canonical.z), + l = e.canonical.y; + return [ + new s.a1(0, l / i).toLngLat().lat, + new s.a1(0, (l + 1) / i).toLngLat().lat, + ]; + } + const Vh = (h, e, i = 0) => ({ + u_image: 0, + u_unpack: e.getUnpackVector(), + u_dimension: [e.stride, e.stride], + u_elevation_stops: 1, + u_color_stops: 4, + u_color_ramp_size: i, + u_opacity: h.paint.get("color-relief-opacity"), + }), + Cl = (h, e, i, l) => { + const u = h.transform; + return { + u_translation: Oc(h, e, i), + u_ratio: l / s.aC(e, 1, u.zoom), + u_device_pixel_ratio: h.pixelRatio, + u_units_to_pixels: [ + 1 / u.pixelsToGLUnits[0], + 1 / u.pixelsToGLUnits[1], + ], + }; + }, + qh = (h, e, i, l, u) => + s.e(Cl(h, e, i, l), { u_image: 0, u_image_height: u }), + Zh = (h, e, i, l, u) => { + const d = h.transform, + g = Fc(e, d); + return { + u_translation: Oc(h, e, i), + u_texsize: e.imageAtlasTexture.size, + u_ratio: l / s.aC(e, 1, d.zoom), + u_device_pixel_ratio: h.pixelRatio, + u_image: 0, + u_scale: [g, u.fromScale, u.toScale], + u_fade: u.t, + u_units_to_pixels: [ + 1 / d.pixelsToGLUnits[0], + 1 / d.pixelsToGLUnits[1], + ], + }; + }, + Eo = (h, e, i, l, u, d) => { + const g = h.lineAtlas, + w = Fc(e, h.transform), + C = i.layout.get("line-cap") === "round", + P = g.getDash(u.from, C), + E = g.getDash(u.to, C), + R = P.width * d.fromScale, + D = E.width * d.toScale; + return s.e(Cl(h, e, i, l), { + u_patternscale_a: [w / R, -P.height / 2], + u_patternscale_b: [w / D, -E.height / 2], + u_sdfgamma: + g.width / (256 * Math.min(R, D) * h.pixelRatio) / 2, + u_image: 0, + u_tex_y_a: P.y, + u_tex_y_b: E.y, + u_mix: d.t, + }); + }; + function Fc(h, e) { + return 1 / s.aC(h, 1, e.tileZoom); + } + function Oc(h, e, i) { + return s.aD( + h.transform, + e, + i.paint.get("line-translate"), + i.paint.get("line-translate-anchor") + ); + } + const Fs = (h, e, i, l, u) => { + return { + u_tl_parent: h, + u_scale_parent: e, + u_buffer_scale: 1, + u_fade_t: i.mix, + u_opacity: i.opacity * l.paint.get("raster-opacity"), + u_image0: 0, + u_image1: 1, + u_brightness_low: l.paint.get("raster-brightness-min"), + u_brightness_high: l.paint.get("raster-brightness-max"), + u_saturation_factor: + ((g = l.paint.get("raster-saturation")), + g > 0 ? 1 - 1 / (1.001 - g) : -g), + u_contrast_factor: + ((d = l.paint.get("raster-contrast")), + d > 0 ? 1 / (1 - d) : 1 + d), + u_spin_weights: kp(l.paint.get("raster-hue-rotate")), + u_coords_top: [u[0].x, u[0].y, u[1].x, u[1].y], + u_coords_bottom: [u[3].x, u[3].y, u[2].x, u[2].y], + }; + var d, g; + }; + function kp(h) { + h *= Math.PI / 180; + const e = Math.sin(h), + i = Math.cos(h); + return [ + (2 * i + 1) / 3, + (-Math.sqrt(3) * e - i + 1) / 3, + (Math.sqrt(3) * e - i + 1) / 3, + ]; + } + const Os = (h, e, i, l, u, d, g, w, C, P, E, R, D) => { + const N = g.transform; + return { + u_is_size_zoom_constant: +( + h === "constant" || h === "source" + ), + u_is_size_feature_constant: +( + h === "constant" || h === "camera" + ), + u_size_t: e ? e.uSizeT : 0, + u_size: e ? e.uSize : 0, + u_camera_to_center_distance: N.cameraToCenterDistance, + u_pitch: (N.pitch / 360) * 2 * Math.PI, + u_rotate_symbol: +i, + u_aspect_ratio: N.width / N.height, + u_fade_change: g.options.fadeDuration + ? g.symbolFadeChange + : 1, + u_label_plane_matrix: w, + u_coord_matrix: C, + u_is_text: +E, + u_pitch_with_map: +l, + u_is_along_line: u, + u_is_variable_anchor: d, + u_texsize: R, + u_texture: 0, + u_translation: P, + u_pitched_scale: D, + }; + }, + Uh = (h, e, i, l, u, d, g, w, C, P, E, R, D, N) => { + const G = g.transform; + return s.e(Os(h, e, i, l, u, d, g, w, C, P, E, R, N), { + u_gamma_scale: l + ? Math.cos((G.pitch * Math.PI) / 180) * + G.cameraToCenterDistance + : 1, + u_device_pixel_ratio: g.pixelRatio, + u_is_halo: 1, + }); + }, + Ap = (h, e, i, l, u, d, g, w, C, P, E, R, D) => + s.e(Uh(h, e, i, l, u, d, g, w, C, P, !0, E, 0, D), { + u_texsize_icon: R, + u_texture_icon: 1, + }), + $h = (h, e) => ({ u_opacity: h, u_color: e }), + Gh = (h, e, i, l, u) => + s.e( + (function (d, g, w, C) { + const P = w.imageManager.getPattern(d.from.toString()), + E = w.imageManager.getPattern(d.to.toString()), + { width: R, height: D } = w.imageManager.getPixelSize(), + N = Math.pow(2, C.tileID.overscaledZ), + G = + (C.tileSize * Math.pow(2, w.transform.tileZoom)) / N, + te = G * (C.tileID.canonical.x + C.tileID.wrap * N), + Q = G * C.tileID.canonical.y; + return { + u_image: 0, + u_pattern_tl_a: P.tl, + u_pattern_br_a: P.br, + u_pattern_tl_b: E.tl, + u_pattern_br_b: E.br, + u_texsize: [R, D], + u_mix: g.t, + u_pattern_size_a: P.displaySize, + u_pattern_size_b: E.displaySize, + u_scale_a: g.fromScale, + u_scale_b: g.toScale, + u_tile_units_to_pixels: + 1 / s.aC(C, 1, w.transform.tileZoom), + u_pixel_coord_upper: [te >> 16, Q >> 16], + u_pixel_coord_lower: [65535 & te, 65535 & Q], + }; + })(i, u, e, l), + { u_opacity: h } + ), + Nc = (h, e) => {}, + jc = { + fillExtrusion: (h, e) => ({ + u_lightpos: new s.bT(h, e.u_lightpos), + u_lightpos_globe: new s.bT(h, e.u_lightpos_globe), + u_lightintensity: new s.bg(h, e.u_lightintensity), + u_lightcolor: new s.bT(h, e.u_lightcolor), + u_vertical_gradient: new s.bg(h, e.u_vertical_gradient), + u_opacity: new s.bg(h, e.u_opacity), + u_fill_translate: new s.bU(h, e.u_fill_translate), + }), + fillExtrusionPattern: (h, e) => ({ + u_lightpos: new s.bT(h, e.u_lightpos), + u_lightpos_globe: new s.bT(h, e.u_lightpos_globe), + u_lightintensity: new s.bg(h, e.u_lightintensity), + u_lightcolor: new s.bT(h, e.u_lightcolor), + u_vertical_gradient: new s.bg(h, e.u_vertical_gradient), + u_height_factor: new s.bg(h, e.u_height_factor), + u_opacity: new s.bg(h, e.u_opacity), + u_fill_translate: new s.bU(h, e.u_fill_translate), + u_image: new s.bP(h, e.u_image), + u_texsize: new s.bU(h, e.u_texsize), + u_pixel_coord_upper: new s.bU(h, e.u_pixel_coord_upper), + u_pixel_coord_lower: new s.bU(h, e.u_pixel_coord_lower), + u_scale: new s.bT(h, e.u_scale), + u_fade: new s.bg(h, e.u_fade), + }), + fill: (h, e) => ({ + u_fill_translate: new s.bU(h, e.u_fill_translate), + }), + fillPattern: (h, e) => ({ + u_image: new s.bP(h, e.u_image), + u_texsize: new s.bU(h, e.u_texsize), + u_pixel_coord_upper: new s.bU(h, e.u_pixel_coord_upper), + u_pixel_coord_lower: new s.bU(h, e.u_pixel_coord_lower), + u_scale: new s.bT(h, e.u_scale), + u_fade: new s.bg(h, e.u_fade), + u_fill_translate: new s.bU(h, e.u_fill_translate), + }), + fillOutline: (h, e) => ({ + u_world: new s.bU(h, e.u_world), + u_fill_translate: new s.bU(h, e.u_fill_translate), + }), + fillOutlinePattern: (h, e) => ({ + u_world: new s.bU(h, e.u_world), + u_image: new s.bP(h, e.u_image), + u_texsize: new s.bU(h, e.u_texsize), + u_pixel_coord_upper: new s.bU(h, e.u_pixel_coord_upper), + u_pixel_coord_lower: new s.bU(h, e.u_pixel_coord_lower), + u_scale: new s.bT(h, e.u_scale), + u_fade: new s.bg(h, e.u_fade), + u_fill_translate: new s.bU(h, e.u_fill_translate), + }), + circle: (h, e) => ({ + u_camera_to_center_distance: new s.bg( + h, + e.u_camera_to_center_distance + ), + u_scale_with_map: new s.bP(h, e.u_scale_with_map), + u_pitch_with_map: new s.bP(h, e.u_pitch_with_map), + u_extrude_scale: new s.bU(h, e.u_extrude_scale), + u_device_pixel_ratio: new s.bg(h, e.u_device_pixel_ratio), + u_globe_extrude_scale: new s.bg(h, e.u_globe_extrude_scale), + u_translate: new s.bU(h, e.u_translate), + }), + collisionBox: (h, e) => ({ + u_pixel_extrude_scale: new s.bU(h, e.u_pixel_extrude_scale), + }), + collisionCircle: (h, e) => ({ + u_viewport_size: new s.bU(h, e.u_viewport_size), + }), + debug: (h, e) => ({ + u_color: new s.bQ(h, e.u_color), + u_overlay: new s.bP(h, e.u_overlay), + u_overlay_scale: new s.bg(h, e.u_overlay_scale), + }), + depth: Nc, + clippingMask: Nc, + heatmap: (h, e) => ({ + u_extrude_scale: new s.bg(h, e.u_extrude_scale), + u_intensity: new s.bg(h, e.u_intensity), + u_globe_extrude_scale: new s.bg(h, e.u_globe_extrude_scale), + }), + heatmapTexture: (h, e) => ({ + u_matrix: new s.bR(h, e.u_matrix), + u_world: new s.bU(h, e.u_world), + u_image: new s.bP(h, e.u_image), + u_color_ramp: new s.bP(h, e.u_color_ramp), + u_opacity: new s.bg(h, e.u_opacity), + }), + hillshade: (h, e) => ({ + u_image: new s.bP(h, e.u_image), + u_latrange: new s.bU(h, e.u_latrange), + u_exaggeration: new s.bg(h, e.u_exaggeration), + u_altitudes: new s.b_(h, e.u_altitudes), + u_azimuths: new s.b_(h, e.u_azimuths), + u_accent: new s.bQ(h, e.u_accent), + u_method: new s.bP(h, e.u_method), + u_shadows: new s.bZ(h, e.u_shadows), + u_highlights: new s.bZ(h, e.u_highlights), + }), + hillshadePrepare: (h, e) => ({ + u_matrix: new s.bR(h, e.u_matrix), + u_image: new s.bP(h, e.u_image), + u_dimension: new s.bU(h, e.u_dimension), + u_zoom: new s.bg(h, e.u_zoom), + u_unpack: new s.bS(h, e.u_unpack), + }), + colorRelief: (h, e) => ({ + u_image: new s.bP(h, e.u_image), + u_unpack: new s.bS(h, e.u_unpack), + u_dimension: new s.bU(h, e.u_dimension), + u_elevation_stops: new s.bP(h, e.u_elevation_stops), + u_color_stops: new s.bP(h, e.u_color_stops), + u_color_ramp_size: new s.bP(h, e.u_color_ramp_size), + u_opacity: new s.bg(h, e.u_opacity), + }), + line: (h, e) => ({ + u_translation: new s.bU(h, e.u_translation), + u_ratio: new s.bg(h, e.u_ratio), + u_device_pixel_ratio: new s.bg(h, e.u_device_pixel_ratio), + u_units_to_pixels: new s.bU(h, e.u_units_to_pixels), + }), + lineGradient: (h, e) => ({ + u_translation: new s.bU(h, e.u_translation), + u_ratio: new s.bg(h, e.u_ratio), + u_device_pixel_ratio: new s.bg(h, e.u_device_pixel_ratio), + u_units_to_pixels: new s.bU(h, e.u_units_to_pixels), + u_image: new s.bP(h, e.u_image), + u_image_height: new s.bg(h, e.u_image_height), + }), + linePattern: (h, e) => ({ + u_translation: new s.bU(h, e.u_translation), + u_texsize: new s.bU(h, e.u_texsize), + u_ratio: new s.bg(h, e.u_ratio), + u_device_pixel_ratio: new s.bg(h, e.u_device_pixel_ratio), + u_image: new s.bP(h, e.u_image), + u_units_to_pixels: new s.bU(h, e.u_units_to_pixels), + u_scale: new s.bT(h, e.u_scale), + u_fade: new s.bg(h, e.u_fade), + }), + lineSDF: (h, e) => ({ + u_translation: new s.bU(h, e.u_translation), + u_ratio: new s.bg(h, e.u_ratio), + u_device_pixel_ratio: new s.bg(h, e.u_device_pixel_ratio), + u_units_to_pixels: new s.bU(h, e.u_units_to_pixels), + u_patternscale_a: new s.bU(h, e.u_patternscale_a), + u_patternscale_b: new s.bU(h, e.u_patternscale_b), + u_sdfgamma: new s.bg(h, e.u_sdfgamma), + u_image: new s.bP(h, e.u_image), + u_tex_y_a: new s.bg(h, e.u_tex_y_a), + u_tex_y_b: new s.bg(h, e.u_tex_y_b), + u_mix: new s.bg(h, e.u_mix), + }), + raster: (h, e) => ({ + u_tl_parent: new s.bU(h, e.u_tl_parent), + u_scale_parent: new s.bg(h, e.u_scale_parent), + u_buffer_scale: new s.bg(h, e.u_buffer_scale), + u_fade_t: new s.bg(h, e.u_fade_t), + u_opacity: new s.bg(h, e.u_opacity), + u_image0: new s.bP(h, e.u_image0), + u_image1: new s.bP(h, e.u_image1), + u_brightness_low: new s.bg(h, e.u_brightness_low), + u_brightness_high: new s.bg(h, e.u_brightness_high), + u_saturation_factor: new s.bg(h, e.u_saturation_factor), + u_contrast_factor: new s.bg(h, e.u_contrast_factor), + u_spin_weights: new s.bT(h, e.u_spin_weights), + u_coords_top: new s.bS(h, e.u_coords_top), + u_coords_bottom: new s.bS(h, e.u_coords_bottom), + }), + symbolIcon: (h, e) => ({ + u_is_size_zoom_constant: new s.bP( + h, + e.u_is_size_zoom_constant + ), + u_is_size_feature_constant: new s.bP( + h, + e.u_is_size_feature_constant + ), + u_size_t: new s.bg(h, e.u_size_t), + u_size: new s.bg(h, e.u_size), + u_camera_to_center_distance: new s.bg( + h, + e.u_camera_to_center_distance + ), + u_pitch: new s.bg(h, e.u_pitch), + u_rotate_symbol: new s.bP(h, e.u_rotate_symbol), + u_aspect_ratio: new s.bg(h, e.u_aspect_ratio), + u_fade_change: new s.bg(h, e.u_fade_change), + u_label_plane_matrix: new s.bR(h, e.u_label_plane_matrix), + u_coord_matrix: new s.bR(h, e.u_coord_matrix), + u_is_text: new s.bP(h, e.u_is_text), + u_pitch_with_map: new s.bP(h, e.u_pitch_with_map), + u_is_along_line: new s.bP(h, e.u_is_along_line), + u_is_variable_anchor: new s.bP(h, e.u_is_variable_anchor), + u_texsize: new s.bU(h, e.u_texsize), + u_texture: new s.bP(h, e.u_texture), + u_translation: new s.bU(h, e.u_translation), + u_pitched_scale: new s.bg(h, e.u_pitched_scale), + }), + symbolSDF: (h, e) => ({ + u_is_size_zoom_constant: new s.bP( + h, + e.u_is_size_zoom_constant + ), + u_is_size_feature_constant: new s.bP( + h, + e.u_is_size_feature_constant + ), + u_size_t: new s.bg(h, e.u_size_t), + u_size: new s.bg(h, e.u_size), + u_camera_to_center_distance: new s.bg( + h, + e.u_camera_to_center_distance + ), + u_pitch: new s.bg(h, e.u_pitch), + u_rotate_symbol: new s.bP(h, e.u_rotate_symbol), + u_aspect_ratio: new s.bg(h, e.u_aspect_ratio), + u_fade_change: new s.bg(h, e.u_fade_change), + u_label_plane_matrix: new s.bR(h, e.u_label_plane_matrix), + u_coord_matrix: new s.bR(h, e.u_coord_matrix), + u_is_text: new s.bP(h, e.u_is_text), + u_pitch_with_map: new s.bP(h, e.u_pitch_with_map), + u_is_along_line: new s.bP(h, e.u_is_along_line), + u_is_variable_anchor: new s.bP(h, e.u_is_variable_anchor), + u_texsize: new s.bU(h, e.u_texsize), + u_texture: new s.bP(h, e.u_texture), + u_gamma_scale: new s.bg(h, e.u_gamma_scale), + u_device_pixel_ratio: new s.bg(h, e.u_device_pixel_ratio), + u_is_halo: new s.bP(h, e.u_is_halo), + u_translation: new s.bU(h, e.u_translation), + u_pitched_scale: new s.bg(h, e.u_pitched_scale), + }), + symbolTextAndIcon: (h, e) => ({ + u_is_size_zoom_constant: new s.bP( + h, + e.u_is_size_zoom_constant + ), + u_is_size_feature_constant: new s.bP( + h, + e.u_is_size_feature_constant + ), + u_size_t: new s.bg(h, e.u_size_t), + u_size: new s.bg(h, e.u_size), + u_camera_to_center_distance: new s.bg( + h, + e.u_camera_to_center_distance + ), + u_pitch: new s.bg(h, e.u_pitch), + u_rotate_symbol: new s.bP(h, e.u_rotate_symbol), + u_aspect_ratio: new s.bg(h, e.u_aspect_ratio), + u_fade_change: new s.bg(h, e.u_fade_change), + u_label_plane_matrix: new s.bR(h, e.u_label_plane_matrix), + u_coord_matrix: new s.bR(h, e.u_coord_matrix), + u_is_text: new s.bP(h, e.u_is_text), + u_pitch_with_map: new s.bP(h, e.u_pitch_with_map), + u_is_along_line: new s.bP(h, e.u_is_along_line), + u_is_variable_anchor: new s.bP(h, e.u_is_variable_anchor), + u_texsize: new s.bU(h, e.u_texsize), + u_texsize_icon: new s.bU(h, e.u_texsize_icon), + u_texture: new s.bP(h, e.u_texture), + u_texture_icon: new s.bP(h, e.u_texture_icon), + u_gamma_scale: new s.bg(h, e.u_gamma_scale), + u_device_pixel_ratio: new s.bg(h, e.u_device_pixel_ratio), + u_is_halo: new s.bP(h, e.u_is_halo), + u_translation: new s.bU(h, e.u_translation), + u_pitched_scale: new s.bg(h, e.u_pitched_scale), + }), + background: (h, e) => ({ + u_opacity: new s.bg(h, e.u_opacity), + u_color: new s.bQ(h, e.u_color), + }), + backgroundPattern: (h, e) => ({ + u_opacity: new s.bg(h, e.u_opacity), + u_image: new s.bP(h, e.u_image), + u_pattern_tl_a: new s.bU(h, e.u_pattern_tl_a), + u_pattern_br_a: new s.bU(h, e.u_pattern_br_a), + u_pattern_tl_b: new s.bU(h, e.u_pattern_tl_b), + u_pattern_br_b: new s.bU(h, e.u_pattern_br_b), + u_texsize: new s.bU(h, e.u_texsize), + u_mix: new s.bg(h, e.u_mix), + u_pattern_size_a: new s.bU(h, e.u_pattern_size_a), + u_pattern_size_b: new s.bU(h, e.u_pattern_size_b), + u_scale_a: new s.bg(h, e.u_scale_a), + u_scale_b: new s.bg(h, e.u_scale_b), + u_pixel_coord_upper: new s.bU(h, e.u_pixel_coord_upper), + u_pixel_coord_lower: new s.bU(h, e.u_pixel_coord_lower), + u_tile_units_to_pixels: new s.bg( + h, + e.u_tile_units_to_pixels + ), + }), + terrain: (h, e) => ({ + u_texture: new s.bP(h, e.u_texture), + u_ele_delta: new s.bg(h, e.u_ele_delta), + u_fog_matrix: new s.bR(h, e.u_fog_matrix), + u_fog_color: new s.bQ(h, e.u_fog_color), + u_fog_ground_blend: new s.bg(h, e.u_fog_ground_blend), + u_fog_ground_blend_opacity: new s.bg( + h, + e.u_fog_ground_blend_opacity + ), + u_horizon_color: new s.bQ(h, e.u_horizon_color), + u_horizon_fog_blend: new s.bg(h, e.u_horizon_fog_blend), + u_is_globe_mode: new s.bg(h, e.u_is_globe_mode), + }), + terrainDepth: (h, e) => ({ + u_ele_delta: new s.bg(h, e.u_ele_delta), + }), + terrainCoords: (h, e) => ({ + u_texture: new s.bP(h, e.u_texture), + u_terrain_coords_id: new s.bg(h, e.u_terrain_coords_id), + u_ele_delta: new s.bg(h, e.u_ele_delta), + }), + projectionErrorMeasurement: (h, e) => ({ + u_input: new s.bg(h, e.u_input), + u_output_expected: new s.bg(h, e.u_output_expected), + }), + atmosphere: (h, e) => ({ + u_sun_pos: new s.bT(h, e.u_sun_pos), + u_atmosphere_blend: new s.bg(h, e.u_atmosphere_blend), + u_globe_position: new s.bT(h, e.u_globe_position), + u_globe_radius: new s.bg(h, e.u_globe_radius), + u_inv_proj_matrix: new s.bR(h, e.u_inv_proj_matrix), + }), + sky: (h, e) => ({ + u_sky_color: new s.bQ(h, e.u_sky_color), + u_horizon_color: new s.bQ(h, e.u_horizon_color), + u_horizon: new s.bU(h, e.u_horizon), + u_horizon_normal: new s.bU(h, e.u_horizon_normal), + u_sky_horizon_blend: new s.bg(h, e.u_sky_horizon_blend), + u_sky_blend: new s.bg(h, e.u_sky_blend), + }), + }; + class Hh { + constructor(e, i, l) { + this.context = e; + const u = e.gl; + (this.buffer = u.createBuffer()), + (this.dynamicDraw = !!l), + this.context.unbindVAO(), + e.bindElementBuffer.set(this.buffer), + u.bufferData( + u.ELEMENT_ARRAY_BUFFER, + i.arrayBuffer, + this.dynamicDraw ? u.DYNAMIC_DRAW : u.STATIC_DRAW + ), + this.dynamicDraw || delete i.arrayBuffer; + } + bind() { + this.context.bindElementBuffer.set(this.buffer); + } + updateData(e) { + const i = this.context.gl; + if (!this.dynamicDraw) + throw new Error( + "Attempted to update data while not in dynamic mode." + ); + this.context.unbindVAO(), + this.bind(), + i.bufferSubData(i.ELEMENT_ARRAY_BUFFER, 0, e.arrayBuffer); + } + destroy() { + this.buffer && + (this.context.gl.deleteBuffer(this.buffer), + delete this.buffer); + } + } + const Sl = { + Int8: "BYTE", + Uint8: "UNSIGNED_BYTE", + Int16: "SHORT", + Uint16: "UNSIGNED_SHORT", + Int32: "INT", + Uint32: "UNSIGNED_INT", + Float32: "FLOAT", + }; + class eo { + constructor(e, i, l, u) { + (this.length = i.length), + (this.attributes = l), + (this.itemSize = i.bytesPerElement), + (this.dynamicDraw = u), + (this.context = e); + const d = e.gl; + (this.buffer = d.createBuffer()), + e.bindVertexBuffer.set(this.buffer), + d.bufferData( + d.ARRAY_BUFFER, + i.arrayBuffer, + this.dynamicDraw ? d.DYNAMIC_DRAW : d.STATIC_DRAW + ), + this.dynamicDraw || delete i.arrayBuffer; + } + bind() { + this.context.bindVertexBuffer.set(this.buffer); + } + updateData(e) { + if (e.length !== this.length) + throw new Error( + `Length of new data is ${e.length}, which doesn't match current length of ${this.length}` + ); + const i = this.context.gl; + this.bind(), + i.bufferSubData(i.ARRAY_BUFFER, 0, e.arrayBuffer); + } + enableAttributes(e, i) { + for (let l = 0; l < this.attributes.length; l++) { + const u = i.attributes[this.attributes[l].name]; + u !== void 0 && e.enableVertexAttribArray(u); + } + } + setVertexAttribPointers(e, i, l) { + for (let u = 0; u < this.attributes.length; u++) { + const d = this.attributes[u], + g = i.attributes[d.name]; + g !== void 0 && + e.vertexAttribPointer( + g, + d.components, + e[Sl[d.type]], + !1, + this.itemSize, + d.offset + this.itemSize * (l || 0) + ); + } + } + destroy() { + this.buffer && + (this.context.gl.deleteBuffer(this.buffer), + delete this.buffer); + } + } + class Pn { + constructor(e) { + (this.gl = e.gl), + (this.default = this.getDefault()), + (this.current = this.default), + (this.dirty = !1); + } + get() { + return this.current; + } + set(e) {} + getDefault() { + return this.default; + } + setDefault() { + this.set(this.default); + } + } + class Vc extends Pn { + getDefault() { + return s.bf.transparent; + } + set(e) { + const i = this.current; + (e.r !== i.r || + e.g !== i.g || + e.b !== i.b || + e.a !== i.a || + this.dirty) && + (this.gl.clearColor(e.r, e.g, e.b, e.a), + (this.current = e), + (this.dirty = !1)); + } + } + class qc extends Pn { + getDefault() { + return 1; + } + set(e) { + (e !== this.current || this.dirty) && + (this.gl.clearDepth(e), + (this.current = e), + (this.dirty = !1)); + } + } + class Wh extends Pn { + getDefault() { + return 0; + } + set(e) { + (e !== this.current || this.dirty) && + (this.gl.clearStencil(e), + (this.current = e), + (this.dirty = !1)); + } + } + class Zc extends Pn { + getDefault() { + return [!0, !0, !0, !0]; + } + set(e) { + const i = this.current; + (e[0] !== i[0] || + e[1] !== i[1] || + e[2] !== i[2] || + e[3] !== i[3] || + this.dirty) && + (this.gl.colorMask(e[0], e[1], e[2], e[3]), + (this.current = e), + (this.dirty = !1)); + } + } + class zo extends Pn { + getDefault() { + return !0; + } + set(e) { + (e !== this.current || this.dirty) && + (this.gl.depthMask(e), + (this.current = e), + (this.dirty = !1)); + } + } + class Uc extends Pn { + getDefault() { + return 255; + } + set(e) { + (e !== this.current || this.dirty) && + (this.gl.stencilMask(e), + (this.current = e), + (this.dirty = !1)); + } + } + class Ep extends Pn { + getDefault() { + return { func: this.gl.ALWAYS, ref: 0, mask: 255 }; + } + set(e) { + const i = this.current; + (e.func !== i.func || + e.ref !== i.ref || + e.mask !== i.mask || + this.dirty) && + (this.gl.stencilFunc(e.func, e.ref, e.mask), + (this.current = e), + (this.dirty = !1)); + } + } + class zp extends Pn { + getDefault() { + const e = this.gl; + return [e.KEEP, e.KEEP, e.KEEP]; + } + set(e) { + const i = this.current; + (e[0] !== i[0] || + e[1] !== i[1] || + e[2] !== i[2] || + this.dirty) && + (this.gl.stencilOp(e[0], e[1], e[2]), + (this.current = e), + (this.dirty = !1)); + } + } + class Lp extends Pn { + getDefault() { + return !1; + } + set(e) { + if (e === this.current && !this.dirty) return; + const i = this.gl; + e ? i.enable(i.STENCIL_TEST) : i.disable(i.STENCIL_TEST), + (this.current = e), + (this.dirty = !1); + } + } + class Dp extends Pn { + getDefault() { + return [0, 1]; + } + set(e) { + const i = this.current; + (e[0] !== i[0] || e[1] !== i[1] || this.dirty) && + (this.gl.depthRange(e[0], e[1]), + (this.current = e), + (this.dirty = !1)); + } + } + class Xh extends Pn { + getDefault() { + return !1; + } + set(e) { + if (e === this.current && !this.dirty) return; + const i = this.gl; + e ? i.enable(i.DEPTH_TEST) : i.disable(i.DEPTH_TEST), + (this.current = e), + (this.dirty = !1); + } + } + class Rp extends Pn { + getDefault() { + return this.gl.LESS; + } + set(e) { + (e !== this.current || this.dirty) && + (this.gl.depthFunc(e), + (this.current = e), + (this.dirty = !1)); + } + } + class Yh extends Pn { + getDefault() { + return !1; + } + set(e) { + if (e === this.current && !this.dirty) return; + const i = this.gl; + e ? i.enable(i.BLEND) : i.disable(i.BLEND), + (this.current = e), + (this.dirty = !1); + } + } + class Pl extends Pn { + getDefault() { + const e = this.gl; + return [e.ONE, e.ZERO]; + } + set(e) { + const i = this.current; + (e[0] !== i[0] || e[1] !== i[1] || this.dirty) && + (this.gl.blendFunc(e[0], e[1]), + (this.current = e), + (this.dirty = !1)); + } + } + class Il extends Pn { + getDefault() { + return s.bf.transparent; + } + set(e) { + const i = this.current; + (e.r !== i.r || + e.g !== i.g || + e.b !== i.b || + e.a !== i.a || + this.dirty) && + (this.gl.blendColor(e.r, e.g, e.b, e.a), + (this.current = e), + (this.dirty = !1)); + } + } + class Ml extends Pn { + getDefault() { + return this.gl.FUNC_ADD; + } + set(e) { + (e !== this.current || this.dirty) && + (this.gl.blendEquation(e), + (this.current = e), + (this.dirty = !1)); + } + } + class $c extends Pn { + getDefault() { + return !1; + } + set(e) { + if (e === this.current && !this.dirty) return; + const i = this.gl; + e ? i.enable(i.CULL_FACE) : i.disable(i.CULL_FACE), + (this.current = e), + (this.dirty = !1); + } + } + class Lo extends Pn { + getDefault() { + return this.gl.BACK; + } + set(e) { + (e !== this.current || this.dirty) && + (this.gl.cullFace(e), + (this.current = e), + (this.dirty = !1)); + } + } + class Ns extends Pn { + getDefault() { + return this.gl.CCW; + } + set(e) { + (e !== this.current || this.dirty) && + (this.gl.frontFace(e), + (this.current = e), + (this.dirty = !1)); + } + } + class ts extends Pn { + getDefault() { + return null; + } + set(e) { + (e !== this.current || this.dirty) && + (this.gl.useProgram(e), + (this.current = e), + (this.dirty = !1)); + } + } + class va extends Pn { + getDefault() { + return this.gl.TEXTURE0; + } + set(e) { + (e !== this.current || this.dirty) && + (this.gl.activeTexture(e), + (this.current = e), + (this.dirty = !1)); + } + } + class Kh extends Pn { + getDefault() { + const e = this.gl; + return [0, 0, e.drawingBufferWidth, e.drawingBufferHeight]; + } + set(e) { + const i = this.current; + (e[0] !== i[0] || + e[1] !== i[1] || + e[2] !== i[2] || + e[3] !== i[3] || + this.dirty) && + (this.gl.viewport(e[0], e[1], e[2], e[3]), + (this.current = e), + (this.dirty = !1)); + } + } + class Jh extends Pn { + getDefault() { + return null; + } + set(e) { + if (e === this.current && !this.dirty) return; + const i = this.gl; + i.bindFramebuffer(i.FRAMEBUFFER, e), + (this.current = e), + (this.dirty = !1); + } + } + class Gc extends Pn { + getDefault() { + return null; + } + set(e) { + if (e === this.current && !this.dirty) return; + const i = this.gl; + i.bindRenderbuffer(i.RENDERBUFFER, e), + (this.current = e), + (this.dirty = !1); + } + } + class Do extends Pn { + getDefault() { + return null; + } + set(e) { + if (e === this.current && !this.dirty) return; + const i = this.gl; + i.bindTexture(i.TEXTURE_2D, e), + (this.current = e), + (this.dirty = !1); + } + } + class kl extends Pn { + getDefault() { + return null; + } + set(e) { + if (e === this.current && !this.dirty) return; + const i = this.gl; + i.bindBuffer(i.ARRAY_BUFFER, e), + (this.current = e), + (this.dirty = !1); + } + } + class Al extends Pn { + getDefault() { + return null; + } + set(e) { + const i = this.gl; + i.bindBuffer(i.ELEMENT_ARRAY_BUFFER, e), + (this.current = e), + (this.dirty = !1); + } + } + class js extends Pn { + getDefault() { + return null; + } + set(e) { + var i; + if (e === this.current && !this.dirty) return; + const l = this.gl; + ga(l) + ? l.bindVertexArray(e) + : (i = l.getExtension("OES_vertex_array_object")) === + null || + i === void 0 || + i.bindVertexArrayOES(e), + (this.current = e), + (this.dirty = !1); + } + } + class El extends Pn { + getDefault() { + return 4; + } + set(e) { + if (e === this.current && !this.dirty) return; + const i = this.gl; + i.pixelStorei(i.UNPACK_ALIGNMENT, e), + (this.current = e), + (this.dirty = !1); + } + } + class Qh extends Pn { + getDefault() { + return !1; + } + set(e) { + if (e === this.current && !this.dirty) return; + const i = this.gl; + i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL, e), + (this.current = e), + (this.dirty = !1); + } + } + class rs extends Pn { + getDefault() { + return !1; + } + set(e) { + if (e === this.current && !this.dirty) return; + const i = this.gl; + i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL, e), + (this.current = e), + (this.dirty = !1); + } + } + class fo extends Pn { + constructor(e, i) { + super(e), (this.context = e), (this.parent = i); + } + getDefault() { + return null; + } + } + class ed extends fo { + setDirty() { + this.dirty = !0; + } + set(e) { + if (e === this.current && !this.dirty) return; + this.context.bindFramebuffer.set(this.parent); + const i = this.gl; + i.framebufferTexture2D( + i.FRAMEBUFFER, + i.COLOR_ATTACHMENT0, + i.TEXTURE_2D, + e, + 0 + ), + (this.current = e), + (this.dirty = !1); + } + } + class Hc extends fo { + set(e) { + if (e === this.current && !this.dirty) return; + this.context.bindFramebuffer.set(this.parent); + const i = this.gl; + i.framebufferRenderbuffer( + i.FRAMEBUFFER, + i.DEPTH_ATTACHMENT, + i.RENDERBUFFER, + e + ), + (this.current = e), + (this.dirty = !1); + } + } + class sn extends fo { + set(e) { + if (e === this.current && !this.dirty) return; + this.context.bindFramebuffer.set(this.parent); + const i = this.gl; + i.framebufferRenderbuffer( + i.FRAMEBUFFER, + i.DEPTH_STENCIL_ATTACHMENT, + i.RENDERBUFFER, + e + ), + (this.current = e), + (this.dirty = !1); + } + } + const Vs = "Framebuffer is not complete"; + class Bp { + constructor(e, i, l, u, d) { + (this.context = e), (this.width = i), (this.height = l); + const g = e.gl, + w = (this.framebuffer = g.createFramebuffer()); + if (((this.colorAttachment = new ed(e, w)), u)) + this.depthAttachment = d ? new sn(e, w) : new Hc(e, w); + else if (d) + throw new Error("Stencil cannot be set without depth"); + if ( + g.checkFramebufferStatus(g.FRAMEBUFFER) !== + g.FRAMEBUFFER_COMPLETE + ) + throw new Error(Vs); + } + destroy() { + const e = this.context.gl, + i = this.colorAttachment.get(); + if ((i && e.deleteTexture(i), this.depthAttachment)) { + const l = this.depthAttachment.get(); + l && e.deleteRenderbuffer(l); + } + e.deleteFramebuffer(this.framebuffer); + } + } + class td { + constructor(e) { + var i, l; + if ( + ((this.gl = e), + (this.clearColor = new Vc(this)), + (this.clearDepth = new qc(this)), + (this.clearStencil = new Wh(this)), + (this.colorMask = new Zc(this)), + (this.depthMask = new zo(this)), + (this.stencilMask = new Uc(this)), + (this.stencilFunc = new Ep(this)), + (this.stencilOp = new zp(this)), + (this.stencilTest = new Lp(this)), + (this.depthRange = new Dp(this)), + (this.depthTest = new Xh(this)), + (this.depthFunc = new Rp(this)), + (this.blend = new Yh(this)), + (this.blendFunc = new Pl(this)), + (this.blendColor = new Il(this)), + (this.blendEquation = new Ml(this)), + (this.cullFace = new $c(this)), + (this.cullFaceSide = new Lo(this)), + (this.frontFace = new Ns(this)), + (this.program = new ts(this)), + (this.activeTexture = new va(this)), + (this.viewport = new Kh(this)), + (this.bindFramebuffer = new Jh(this)), + (this.bindRenderbuffer = new Gc(this)), + (this.bindTexture = new Do(this)), + (this.bindVertexBuffer = new kl(this)), + (this.bindElementBuffer = new Al(this)), + (this.bindVertexArray = new js(this)), + (this.pixelStoreUnpack = new El(this)), + (this.pixelStoreUnpackPremultiplyAlpha = new Qh(this)), + (this.pixelStoreUnpackFlipY = new rs(this)), + (this.extTextureFilterAnisotropic = + e.getExtension("EXT_texture_filter_anisotropic") || + e.getExtension("MOZ_EXT_texture_filter_anisotropic") || + e.getExtension("WEBKIT_EXT_texture_filter_anisotropic")), + this.extTextureFilterAnisotropic && + (this.extTextureFilterAnisotropicMax = e.getParameter( + this.extTextureFilterAnisotropic + .MAX_TEXTURE_MAX_ANISOTROPY_EXT + )), + (this.maxTextureSize = e.getParameter(e.MAX_TEXTURE_SIZE)), + ga(e)) + ) { + this.HALF_FLOAT = e.HALF_FLOAT; + const u = e.getExtension("EXT_color_buffer_half_float"); + (this.RGBA16F = + (i = e.RGBA16F) !== null && i !== void 0 + ? i + : u == null + ? void 0 + : u.RGBA16F_EXT), + (this.RGB16F = + (l = e.RGB16F) !== null && l !== void 0 + ? l + : u == null + ? void 0 + : u.RGB16F_EXT), + e.getExtension("EXT_color_buffer_float"); + } else { + e.getExtension("EXT_color_buffer_half_float"), + e.getExtension("OES_texture_half_float_linear"); + const u = e.getExtension("OES_texture_half_float"); + this.HALF_FLOAT = u == null ? void 0 : u.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(e, i) { + return new Hh(this, e, i); + } + createVertexBuffer(e, i, l) { + return new eo(this, e, i, l); + } + createRenderbuffer(e, i, l) { + const u = this.gl, + d = u.createRenderbuffer(); + return ( + this.bindRenderbuffer.set(d), + u.renderbufferStorage(u.RENDERBUFFER, e, i, l), + this.bindRenderbuffer.set(null), + d + ); + } + createFramebuffer(e, i, l, u) { + return new Bp(this, e, i, l, u); + } + clear({ color: e, depth: i, stencil: l }) { + const u = this.gl; + let d = 0; + e && + ((d |= u.COLOR_BUFFER_BIT), + this.clearColor.set(e), + this.colorMask.set([!0, !0, !0, !0])), + i !== void 0 && + ((d |= u.DEPTH_BUFFER_BIT), + this.depthRange.set([0, 1]), + this.clearDepth.set(i), + this.depthMask.set(!0)), + l !== void 0 && + ((d |= u.STENCIL_BUFFER_BIT), + this.clearStencil.set(l), + this.stencilMask.set(255)), + u.clear(d); + } + setCullFace(e) { + e.enable === !1 + ? this.cullFace.set(!1) + : (this.cullFace.set(!0), + this.cullFaceSide.set(e.mode), + this.frontFace.set(e.frontFace)); + } + setDepthMode(e) { + e.func !== this.gl.ALWAYS || e.mask + ? (this.depthTest.set(!0), + this.depthFunc.set(e.func), + this.depthMask.set(e.mask), + this.depthRange.set(e.range)) + : this.depthTest.set(!1); + } + setStencilMode(e) { + e.test.func !== this.gl.ALWAYS || e.mask + ? (this.stencilTest.set(!0), + this.stencilMask.set(e.mask), + this.stencilOp.set([e.fail, e.depthFail, e.pass]), + this.stencilFunc.set({ + func: e.test.func, + ref: e.ref, + mask: e.test.mask, + })) + : this.stencilTest.set(!1); + } + setColorMode(e) { + s.bH(e.blendFunction, zn.Replace) + ? this.blend.set(!1) + : (this.blend.set(!0), + this.blendFunc.set(e.blendFunction), + this.blendColor.set(e.blendColor)), + this.colorMask.set(e.mask); + } + createVertexArray() { + var e; + return ga(this.gl) + ? this.gl.createVertexArray() + : (e = this.gl.getExtension("OES_vertex_array_object")) === + null || e === void 0 + ? void 0 + : e.createVertexArrayOES(); + } + deleteVertexArray(e) { + var i; + return ga(this.gl) + ? this.gl.deleteVertexArray(e) + : (i = this.gl.getExtension("OES_vertex_array_object")) === + null || i === void 0 + ? void 0 + : i.deleteVertexArrayOES(e); + } + unbindVAO() { + this.bindVertexArray.set(null); + } + } + let mo; + function rd(h, e, i, l, u) { + const d = h.context, + g = h.transform, + w = d.gl, + C = h.useProgram("collisionBox"), + P = []; + let E = 0, + R = 0; + for (let ae = 0; ae < l.length; ae++) { + const ce = l[ae], + ve = e.getTile(ce).getBucket(i); + if (!ve) continue; + const me = u ? ve.textCollisionBox : ve.iconCollisionBox, + be = ve.collisionCircleArray; + be.length > 0 && + (P.push({ circleArray: be, circleOffset: R, coord: ce }), + (E += be.length / 4), + (R = E)), + me && + C.draw( + d, + w.LINES, + Gr.disabled, + un.disabled, + h.colorModeForRenderPass(), + Rr.disabled, + Tl(h.transform), + h.style.map.terrain && + h.style.map.terrain.getTerrainData(ce), + g.getProjectionData({ + overscaledTileID: ce, + applyGlobeMatrix: !0, + applyTerrainMatrix: !0, + }), + i.id, + me.layoutVertexBuffer, + me.indexBuffer, + me.segments, + null, + h.transform.zoom, + null, + null, + me.collisionVertexBuffer + ); + } + if (!u || !P.length) return; + const D = h.useProgram("collisionCircle"), + N = new s.b$(); + N.resize(4 * E), N._trim(); + let G = 0; + for (const ae of P) + for (let ce = 0; ce < ae.circleArray.length / 4; ce++) { + const ve = 4 * ce, + me = ae.circleArray[ve + 0], + be = ae.circleArray[ve + 1], + Pe = ae.circleArray[ve + 2], + _e = ae.circleArray[ve + 3]; + N.emplace(G++, me, be, Pe, _e, 0), + N.emplace(G++, me, be, Pe, _e, 1), + N.emplace(G++, me, be, Pe, _e, 2), + N.emplace(G++, me, be, Pe, _e, 3); + } + (!mo || mo.length < 2 * E) && + (mo = (function (ae) { + const ce = 2 * ae, + ve = new s.c1(); + ve.resize(ce), ve._trim(); + for (let me = 0; me < ce; me++) { + const be = 6 * me; + (ve.uint16[be + 0] = 4 * me + 0), + (ve.uint16[be + 1] = 4 * me + 1), + (ve.uint16[be + 2] = 4 * me + 2), + (ve.uint16[be + 3] = 4 * me + 2), + (ve.uint16[be + 4] = 4 * me + 3), + (ve.uint16[be + 5] = 4 * me + 0); + } + return ve; + })(E)); + const te = d.createIndexBuffer(mo, !0), + Q = d.createVertexBuffer(N, s.c0.members, !0); + for (const ae of P) { + const ce = Ip(h.transform); + D.draw( + d, + w.TRIANGLES, + Gr.disabled, + un.disabled, + h.colorModeForRenderPass(), + Rr.disabled, + ce, + h.style.map.terrain && + h.style.map.terrain.getTerrainData(ae.coord), + null, + i.id, + Q, + te, + s.aM.simpleSegment( + 0, + 2 * ae.circleOffset, + ae.circleArray.length, + ae.circleArray.length / 2 + ), + null, + h.transform.zoom, + null, + null, + null + ); + } + Q.destroy(), te.destroy(); + } + const Fp = s.ag(new Float32Array(16)); + function nd(h, e, i, l, u, d) { + const { horizontalAlign: g, verticalAlign: w } = s.aH(h); + return new s.P( + ((-(g - 0.5) * e) / u + l[0]) * d, + ((-(w - 0.5) * i) / u + l[1]) * d + ); + } + function Op(h, e, i, l, u, d) { + const g = e.tileAnchorPoint.add( + new s.P(e.translation[0], e.translation[1]) + ); + if (e.pitchWithMap) { + let w = l.mult(d); + i || (w = w.rotate(-u)); + const C = g.add(w); + return dr(C.x, C.y, e.pitchedLabelPlaneMatrix, e.getElevation) + .point; + } + if (i) { + const w = Jt( + e.tileAnchorPoint.x + 1, + e.tileAnchorPoint.y, + e + ).point.sub(h), + C = Math.atan(w.y / w.x) + (w.x < 0 ? Math.PI : 0); + return h.add(l.rotate(C)); + } + return h.add(l); + } + function Wc(h, e, i, l, u, d, g, w, C, P, E, R) { + const D = h.text.placedSymbolArray, + N = h.text.dynamicLayoutVertexArray, + G = h.icon.dynamicLayoutVertexArray, + te = {}; + N.clear(); + for (let Q = 0; Q < D.length; Q++) { + const ae = D.get(Q), + ce = + ae.hidden || + !ae.crossTileID || + (h.allowVerticalPlacement && !ae.placedOrientation) + ? null + : l[ae.crossTileID]; + if (ce) { + const ve = new s.P(ae.anchorX, ae.anchorY), + me = { + getElevation: R, + width: u.width, + height: u.height, + pitchedLabelPlaneMatrix: d, + pitchWithMap: i, + transform: u, + tileAnchorPoint: ve, + translation: P, + unwrappedTileID: E, + }, + be = i ? Er(ve.x, ve.y, me) : Jt(ve.x, ve.y, me), + Pe = ht( + u.cameraToCenterDistance, + be.signedDistanceFromCamera + ); + let _e = (s.ap(h.textSizeData, w, ae) * Pe) / s.aB; + i && (_e *= h.tilePixelRatio / g); + const { + width: Be, + height: rt, + anchor: Ge, + textOffset: Xe, + textBoxScale: tt, + } = ce, + jt = nd(Ge, Be, rt, Xe, tt, _e), + Zt = u.getPitchedTextCorrection( + ve.x + P[0], + ve.y + P[1], + E + ), + Tt = Op(be.point, me, e, jt, -u.bearingInRadians, Zt), + vr = + h.allowVerticalPlacement && + ae.placedOrientation === s.ao.vertical + ? Math.PI / 2 + : 0; + for (let Jr = 0; Jr < ae.numGlyphs; Jr++) s.av(N, Tt, vr); + C && + ae.associatedIconIndex >= 0 && + (te[ae.associatedIconIndex] = { + shiftedAnchor: Tt, + angle: vr, + }); + } else ln(ae.numGlyphs, N); + } + if (C) { + G.clear(); + const Q = h.icon.placedSymbolArray; + for (let ae = 0; ae < Q.length; ae++) { + const ce = Q.get(ae); + if (ce.hidden) ln(ce.numGlyphs, G); + else { + const ve = te[ae]; + if (ve) + for (let me = 0; me < ce.numGlyphs; me++) + s.av(G, ve.shiftedAnchor, ve.angle); + else ln(ce.numGlyphs, G); + } + } + h.icon.dynamicLayoutVertexBuffer.updateData(G); + } + h.text.dynamicLayoutVertexBuffer.updateData(N); + } + function zl(h, e, i) { + return i.iconsInText && e + ? "symbolTextAndIcon" + : h + ? "symbolSDF" + : "symbolIcon"; + } + function qs(h, e, i, l, u, d, g, w, C, P, E, R, D) { + const N = h.context, + G = N.gl, + te = h.transform, + Q = w === "map", + ae = C === "map", + ce = + w !== "viewport" && + i.layout.get("symbol-placement") !== "point", + ve = Q && !ae && !ce, + me = !i.layout.get("symbol-sort-key").isConstant(); + let be = !1; + const Pe = h.getDepthModeForSublayer(0, Gr.ReadOnly), + _e = + i._unevaluatedLayout.hasValue("text-variable-anchor") || + i._unevaluatedLayout.hasValue( + "text-variable-anchor-offset" + ), + Be = [], + rt = te.getCircleRadiusCorrection(); + for (const Ge of l) { + const Xe = e.getTile(Ge), + tt = Xe.getBucket(i); + if (!tt) continue; + const jt = u ? tt.text : tt.icon; + if ( + !jt || + !jt.segments.get().length || + !jt.hasVisibleVertices + ) + continue; + const Zt = jt.programConfigurations.get(i.id), + Tt = u || tt.sdfIcons, + vr = u ? tt.textSizeData : tt.iconSizeData, + Jr = ae || te.pitch !== 0, + An = h.useProgram(zl(Tt, u, tt), Zt), + Rn = s.an(vr, te.zoom), + Ln = + h.style.map.terrain && + h.style.map.terrain.getTerrainData(Ge); + let Wn, + Jn, + Kr, + Bn, + si = [0, 0], + mi = null; + if (u) + (Jn = Xe.glyphAtlasTexture), + (Kr = G.LINEAR), + (Wn = Xe.glyphAtlasTexture.size), + tt.iconsInText && + ((si = Xe.imageAtlasTexture.size), + (mi = Xe.imageAtlasTexture), + (Bn = + Jr || + h.options.rotating || + h.options.zooming || + vr.kind === "composite" || + vr.kind === "camera" + ? G.LINEAR + : G.NEAREST)); + else { + const li = + i.layout.get("icon-size").constantOr(0) !== 1 || + tt.iconsNeedLinear; + (Jn = Xe.imageAtlasTexture), + (Kr = + Tt || + h.options.rotating || + h.options.zooming || + li || + Jr + ? G.LINEAR + : G.NEAREST), + (Wn = Xe.imageAtlasTexture.size); + } + const Ci = s.aC(Xe, 1, h.transform.zoom), + $i = _n(Q, h.transform, Ci), + za = s.L(); + s.aq(za, $i); + const go = Vt(ae, Q, h.transform, Ci), + vo = s.aD(te, Xe, d, g), + fs = te.getProjectionData({ + overscaledTileID: Ge, + applyGlobeMatrix: !D, + applyTerrainMatrix: !0, + }), + ms = _e && tt.hasTextData(), + Vo = + i.layout.get("icon-text-fit") !== "none" && + ms && + tt.hasIconData(); + if (ce) { + const li = h.style.map.terrain + ? (ba, ci) => + h.style.map.terrain.getElevation(Ge, ba, ci) + : null, + _i = i.layout.get("text-rotation-alignment") === "map"; + Yr( + tt, + h, + u, + $i, + za, + ae, + P, + _i, + Ge.toUnwrapped(), + te.width, + te.height, + vo, + li + ); + } + const qo = (u && _e) || Vo, + ta = + ce || qo + ? Fp + : ae + ? $i + : h.transform.clipSpaceToPixelsMatrix, + La = + Tt && + i.paint + .get(u ? "text-halo-width" : "icon-halo-width") + .constantOr(1) !== 0; + let Gi; + Gi = Tt + ? tt.iconsInText + ? Ap( + vr.kind, + Rn, + ve, + ae, + ce, + qo, + h, + ta, + go, + vo, + Wn, + si, + rt + ) + : Uh( + vr.kind, + Rn, + ve, + ae, + ce, + qo, + h, + ta, + go, + vo, + u, + Wn, + 0, + rt + ) + : Os(vr.kind, Rn, ve, ae, ce, qo, h, ta, go, vo, u, Wn, rt); + const yo = { + program: An, + buffers: jt, + uniformValues: Gi, + projectionData: fs, + atlasTexture: Jn, + atlasTextureIcon: mi, + atlasInterpolation: Kr, + atlasInterpolationIcon: Bn, + isSDF: Tt, + hasHalo: La, + }; + if (me && tt.canOverlap) { + be = !0; + const li = jt.segments.get(); + for (const _i of li) + Be.push({ + segments: new s.aM([_i]), + sortKey: _i.sortKey, + state: yo, + terrainData: Ln, + }); + } else + Be.push({ + segments: jt.segments, + sortKey: 0, + state: yo, + terrainData: Ln, + }); + } + be && Be.sort((Ge, Xe) => Ge.sortKey - Xe.sortKey); + for (const Ge of Be) { + const Xe = Ge.state; + if ( + (N.activeTexture.set(G.TEXTURE0), + Xe.atlasTexture.bind( + Xe.atlasInterpolation, + G.CLAMP_TO_EDGE + ), + Xe.atlasTextureIcon && + (N.activeTexture.set(G.TEXTURE1), + Xe.atlasTextureIcon && + Xe.atlasTextureIcon.bind( + Xe.atlasInterpolationIcon, + G.CLAMP_TO_EDGE + )), + Xe.isSDF) + ) { + const tt = Xe.uniformValues; + Xe.hasHalo && + ((tt.u_is_halo = 1), + Zs( + Xe.buffers, + Ge.segments, + i, + h, + Xe.program, + Pe, + E, + R, + tt, + Xe.projectionData, + Ge.terrainData + )), + (tt.u_is_halo = 0); + } + Zs( + Xe.buffers, + Ge.segments, + i, + h, + Xe.program, + Pe, + E, + R, + Xe.uniformValues, + Xe.projectionData, + Ge.terrainData + ); + } + } + function Zs(h, e, i, l, u, d, g, w, C, P, E) { + const R = l.context; + u.draw( + R, + R.gl.TRIANGLES, + d, + g, + w, + Rr.backCCW, + C, + E, + P, + i.id, + h.layoutVertexBuffer, + h.indexBuffer, + e, + i.paint, + l.transform.zoom, + h.programConfigurations.get(i.id), + h.dynamicLayoutVertexBuffer, + h.opacityVertexBuffer + ); + } + function Xc(h, e, i, l, u) { + const d = h.context, + g = d.gl, + w = un.disabled, + C = new zn([g.ONE, g.ONE], s.bf.transparent, [ + !0, + !0, + !0, + !0, + ]), + P = e.getBucket(i); + if (!P) return; + const E = l.key; + let R = i.heatmapFbos.get(E); + R || + ((R = Us(d, e.tileSize, e.tileSize)), + i.heatmapFbos.set(E, R)), + d.bindFramebuffer.set(R.framebuffer), + d.viewport.set([0, 0, e.tileSize, e.tileSize]), + d.clear({ color: s.bf.transparent }); + const D = P.programConfigurations.get(i.id), + N = h.useProgram("heatmap", D, !u), + G = h.transform.getProjectionData({ + overscaledTileID: e.tileID, + applyGlobeMatrix: !0, + applyTerrainMatrix: !0, + }), + te = h.style.map.terrain.getTerrainData(l); + N.draw( + d, + g.TRIANGLES, + Gr.disabled, + w, + C, + Rr.disabled, + Nh(e, h.transform.zoom, i.paint.get("heatmap-intensity"), 1), + te, + G, + i.id, + P.layoutVertexBuffer, + P.indexBuffer, + P.segments, + i.paint, + h.transform.zoom, + D + ); + } + function id(h, e, i, l, u) { + const d = h.context, + g = d.gl, + w = h.transform; + d.setColorMode(h.colorModeForRenderPass()); + const C = $s(d, e), + P = i.key, + E = e.heatmapFbos.get(P); + if (!E) return; + d.activeTexture.set(g.TEXTURE0), + g.bindTexture(g.TEXTURE_2D, E.colorAttachment.get()), + d.activeTexture.set(g.TEXTURE1), + C.bind(g.LINEAR, g.CLAMP_TO_EDGE); + const R = w.getProjectionData({ + overscaledTileID: i, + applyTerrainMatrix: u, + applyGlobeMatrix: !l, + }); + h + .useProgram("heatmapTexture") + .draw( + d, + g.TRIANGLES, + Gr.disabled, + un.disabled, + h.colorModeForRenderPass(), + Rr.disabled, + Rc(h, e, 0, 1), + null, + R, + e.id, + h.rasterBoundsBuffer, + h.quadTriangleIndexBuffer, + h.rasterBoundsSegments, + e.paint, + w.zoom + ), + E.destroy(), + e.heatmapFbos.delete(P); + } + function Us(h, e, i) { + var l, u; + const d = h.gl, + g = d.createTexture(); + d.bindTexture(d.TEXTURE_2D, g), + d.texParameteri( + d.TEXTURE_2D, + d.TEXTURE_WRAP_S, + d.CLAMP_TO_EDGE + ), + d.texParameteri( + d.TEXTURE_2D, + d.TEXTURE_WRAP_T, + d.CLAMP_TO_EDGE + ), + d.texParameteri(d.TEXTURE_2D, d.TEXTURE_MIN_FILTER, d.LINEAR), + d.texParameteri(d.TEXTURE_2D, d.TEXTURE_MAG_FILTER, d.LINEAR); + const w = + (l = h.HALF_FLOAT) !== null && l !== void 0 + ? l + : d.UNSIGNED_BYTE, + C = (u = h.RGBA16F) !== null && u !== void 0 ? u : d.RGBA; + d.texImage2D(d.TEXTURE_2D, 0, C, e, i, 0, d.RGBA, w, null); + const P = h.createFramebuffer(e, i, !1, !1); + return P.colorAttachment.set(g), P; + } + function $s(h, e) { + return ( + e.colorRampTexture || + (e.colorRampTexture = new s.T(h, e.colorRamp, h.gl.RGBA)), + e.colorRampTexture + ); + } + function Gs(h, e, i, l, u) { + if (!i || !l || !l.imageAtlas) return; + const d = l.imageAtlas.patternPositions; + let g = d[i.to.toString()], + w = d[i.from.toString()]; + if ((!g && w && (g = w), !w && g && (w = g), !g || !w)) { + const C = u.getPaintProperty(e); + (g = d[C]), (w = d[C]); + } + g && w && h.setConstantPatternPositions(g, w); + } + function Ll(h, e, i, l, u, d, g, w) { + const C = h.context.gl, + P = "fill-pattern", + E = i.paint.get(P), + R = E && E.constantOr(1), + D = i.getCrossfadeParameters(); + let N, G, te, Q, ae; + const ce = h.transform, + ve = i.paint.get("fill-translate"), + me = i.paint.get("fill-translate-anchor"); + g + ? ((G = + R && !i.getPaintProperty("fill-outline-color") + ? "fillOutlinePattern" + : "fillOutline"), + (N = C.LINES)) + : ((G = R ? "fillPattern" : "fill"), (N = C.TRIANGLES)); + const be = E.constantOr(null); + for (const Pe of l) { + const _e = e.getTile(Pe); + if (R && !_e.patternsLoaded()) continue; + const Be = _e.getBucket(i); + if (!Be) continue; + const rt = Be.programConfigurations.get(i.id), + Ge = h.useProgram(G, rt), + Xe = + h.style.map.terrain && + h.style.map.terrain.getTerrainData(Pe); + R && + (h.context.activeTexture.set(C.TEXTURE0), + _e.imageAtlasTexture.bind(C.LINEAR, C.CLAMP_TO_EDGE), + rt.updatePaintBuffers(D)), + Gs(rt, P, be, _e, i); + const tt = ce.getProjectionData({ + overscaledTileID: Pe, + applyGlobeMatrix: !w, + applyTerrainMatrix: !0, + }), + jt = s.aD(ce, _e, ve, me); + if (g) { + (Q = Be.indexBuffer2), (ae = Be.segments2); + const Tt = [C.drawingBufferWidth, C.drawingBufferHeight]; + te = + G === "fillOutlinePattern" && R + ? Bs(h, D, _e, Tt, jt) + : Rs(Tt, jt); + } else + (Q = Be.indexBuffer), + (ae = Be.segments), + (te = R ? wl(h, D, _e, jt) : { u_fill_translate: jt }); + const Zt = h.stencilModeForClipping(Pe); + Ge.draw( + h.context, + N, + u, + Zt, + d, + Rr.backCCW, + te, + Xe, + tt, + i.id, + Be.layoutVertexBuffer, + Q, + ae, + i.paint, + h.transform.zoom, + rt + ); + } + } + function Yc(h, e, i, l, u, d, g, w) { + const C = h.context, + P = C.gl, + E = "fill-extrusion-pattern", + R = i.paint.get(E), + D = R.constantOr(1), + N = i.getCrossfadeParameters(), + G = i.paint.get("fill-extrusion-opacity"), + te = R.constantOr(null), + Q = h.transform; + for (const ae of l) { + const ce = e.getTile(ae), + ve = ce.getBucket(i); + if (!ve) continue; + const me = + h.style.map.terrain && + h.style.map.terrain.getTerrainData(ae), + be = ve.programConfigurations.get(i.id), + Pe = h.useProgram( + D ? "fillExtrusionPattern" : "fillExtrusion", + be + ); + D && + (h.context.activeTexture.set(P.TEXTURE0), + ce.imageAtlasTexture.bind(P.LINEAR, P.CLAMP_TO_EDGE), + be.updatePaintBuffers(N)); + const _e = Q.getProjectionData({ + overscaledTileID: ae, + applyGlobeMatrix: !w, + applyTerrainMatrix: !0, + }); + Gs(be, E, te, ce, i); + const Be = s.aD( + Q, + ce, + i.paint.get("fill-extrusion-translate"), + i.paint.get("fill-extrusion-translate-anchor") + ), + rt = i.paint.get("fill-extrusion-vertical-gradient"), + Ge = D ? Sp(h, rt, G, Be, ae, N, ce) : Pa(h, rt, G, Be); + Pe.draw( + C, + C.gl.TRIANGLES, + u, + d, + g, + Rr.backCCW, + Ge, + me, + _e, + i.id, + ve.layoutVertexBuffer, + ve.indexBuffer, + ve.segments, + i.paint, + h.transform.zoom, + be, + h.style.map.terrain && ve.centroidVertexBuffer + ); + } + } + function Ro(h, e, i, l, u, d, g, w, C) { + var P; + const E = h.style.projection, + R = h.context, + D = h.transform, + N = R.gl, + G = [ + `#define NUM_ILLUMINATION_SOURCES ${ + i.paint.get("hillshade-highlight-color").values.length + }`, + ], + te = h.useProgram("hillshade", null, !1, G), + Q = !h.options.moving; + for (const ae of l) { + const ce = e.getTile(ae), + ve = ce.fbo; + if (!ve) continue; + const me = E.getMeshFromTileID( + R, + ae.canonical, + w, + !0, + "raster" + ), + be = + (P = h.style.map.terrain) === null || P === void 0 + ? void 0 + : P.getTerrainData(ae); + R.activeTexture.set(N.TEXTURE0), + N.bindTexture(N.TEXTURE_2D, ve.colorAttachment.get()); + const Pe = D.getProjectionData({ + overscaledTileID: ae, + aligned: Q, + applyGlobeMatrix: !C, + applyTerrainMatrix: !0, + }); + te.draw( + R, + N.TRIANGLES, + d, + u[ae.overscaledZ], + g, + Rr.backCCW, + Mp(h, ce, i), + be, + Pe, + i.id, + me.vertexBuffer, + me.indexBuffer, + me.segments + ); + } + } + function Kc(h, e, i, l, u, d, g, w, C) { + var P; + const E = h.style.projection, + R = h.context, + D = h.transform, + N = R.gl, + G = h.useProgram("colorRelief"), + te = !h.options.moving; + let Q = !0, + ae = 0; + for (const ce of l) { + const ve = e.getTile(ce), + me = ve.dem; + if (Q) { + const Ge = N.getParameter(N.MAX_TEXTURE_SIZE), + { elevationTexture: Xe, colorTexture: tt } = + i.getColorRampTextures(R, Ge, me.getUnpackVector()); + R.activeTexture.set(N.TEXTURE1), + Xe.bind(N.NEAREST, N.CLAMP_TO_EDGE), + R.activeTexture.set(N.TEXTURE4), + tt.bind(N.LINEAR, N.CLAMP_TO_EDGE), + (Q = !1), + (ae = Xe.size[0]); + } + if (!me || !me.data) continue; + const be = me.stride, + Pe = me.getPixels(); + if ( + (R.activeTexture.set(N.TEXTURE0), + R.pixelStoreUnpackPremultiplyAlpha.set(!1), + (ve.demTexture = ve.demTexture || h.getTileTexture(be)), + ve.demTexture) + ) { + const Ge = ve.demTexture; + Ge.update(Pe, { premultiply: !1 }), + Ge.bind(N.LINEAR, N.CLAMP_TO_EDGE); + } else + (ve.demTexture = new s.T(R, Pe, N.RGBA, { + premultiply: !1, + })), + ve.demTexture.bind(N.LINEAR, N.CLAMP_TO_EDGE); + const _e = E.getMeshFromTileID( + R, + ce.canonical, + w, + !0, + "raster" + ), + Be = + (P = h.style.map.terrain) === null || P === void 0 + ? void 0 + : P.getTerrainData(ce), + rt = D.getProjectionData({ + overscaledTileID: ce, + aligned: te, + applyGlobeMatrix: !C, + applyTerrainMatrix: !0, + }); + G.draw( + R, + N.TRIANGLES, + d, + u[ce.overscaledZ], + g, + Rr.backCCW, + Vh(i, ve.dem, ae), + Be, + rt, + i.id, + _e.vertexBuffer, + _e.indexBuffer, + _e.segments + ); + } + } + const Dl = [ + new s.P(0, 0), + new s.P(s.$, 0), + new s.P(s.$, s.$), + new s.P(0, s.$), + ]; + function Bo(h, e, i, l, u, d, g, w, C = !1, P = !1) { + const E = l[l.length - 1].overscaledZ, + R = h.context, + D = R.gl, + N = h.useProgram("raster"), + G = h.transform, + te = h.style.projection, + Q = h.colorModeForRenderPass(), + ae = !h.options.moving; + for (const ce of l) { + const ve = h.getDepthModeForSublayer( + ce.overscaledZ - E, + i.paint.get("raster-opacity") === 1 + ? Gr.ReadWrite + : Gr.ReadOnly, + D.LESS + ), + me = e.getTile(ce); + me.registerFadeDuration(i.paint.get("raster-fade-duration")); + const be = e.findLoadedParent(ce, 0), + Pe = e.findLoadedSibling(ce), + _e = Jc( + me, + be || Pe || null, + e, + i, + h.transform, + h.style.map.terrain + ); + let Be, rt; + const Ge = + i.paint.get("raster-resampling") === "nearest" + ? D.NEAREST + : D.LINEAR; + R.activeTexture.set(D.TEXTURE0), + me.texture.bind( + Ge, + D.CLAMP_TO_EDGE, + D.LINEAR_MIPMAP_NEAREST + ), + R.activeTexture.set(D.TEXTURE1), + be + ? (be.texture.bind( + Ge, + D.CLAMP_TO_EDGE, + D.LINEAR_MIPMAP_NEAREST + ), + (Be = Math.pow( + 2, + be.tileID.overscaledZ - me.tileID.overscaledZ + )), + (rt = [ + (me.tileID.canonical.x * Be) % 1, + (me.tileID.canonical.y * Be) % 1, + ])) + : me.texture.bind( + Ge, + D.CLAMP_TO_EDGE, + D.LINEAR_MIPMAP_NEAREST + ), + me.texture.useMipmap && + R.extTextureFilterAnisotropic && + h.transform.pitch > 20 && + D.texParameterf( + D.TEXTURE_2D, + R.extTextureFilterAnisotropic + .TEXTURE_MAX_ANISOTROPY_EXT, + R.extTextureFilterAnisotropicMax + ); + const Xe = + h.style.map.terrain && + h.style.map.terrain.getTerrainData(ce), + tt = G.getProjectionData({ + overscaledTileID: ce, + aligned: ae, + applyGlobeMatrix: !P, + applyTerrainMatrix: !0, + }), + jt = Fs(rt || [0, 0], Be || 1, _e, i, w), + Zt = te.getMeshFromTileID(R, ce.canonical, d, g, "raster"); + N.draw( + R, + D.TRIANGLES, + ve, + u ? u[ce.overscaledZ] : un.disabled, + Q, + C ? Rr.frontCCW : Rr.backCCW, + jt, + Xe, + tt, + i.id, + Zt.vertexBuffer, + Zt.indexBuffer, + Zt.segments + ); + } + } + function Jc(h, e, i, l, u, d) { + const g = l.paint.get("raster-fade-duration"); + if (!d && g > 0) { + const w = ne.now(), + C = (w - h.timeAdded) / g, + P = e ? (w - e.timeAdded) / g : -1, + E = i.getSource(), + R = kt(u, { tileSize: E.tileSize, roundZoom: E.roundZoom }), + D = + !e || + Math.abs(e.tileID.overscaledZ - R) > + Math.abs(h.tileID.overscaledZ - R), + N = + D && h.refreshedUponExpiration + ? 1 + : s.ah(D ? C : 1 - P, 0, 1); + return ( + h.refreshedUponExpiration && + C >= 1 && + (h.refreshedUponExpiration = !1), + e ? { opacity: 1, mix: 1 - N } : { opacity: N, mix: 0 } + ); + } + return { opacity: 1, mix: 0 }; + } + const ad = new s.bf(1, 0, 0, 1), + od = new s.bf(0, 1, 0, 1), + Rl = new s.bf(0, 0, 1, 1), + Qc = new s.bf(1, 0, 1, 1), + Np = new s.bf(0, 1, 1, 1); + function eu(h, e, i, l) { + Ua(h, 0, e + i / 2, h.transform.width, i, l); + } + function Kn(h, e, i, l) { + Ua(h, e - i / 2, 0, i, h.transform.height, l); + } + function Ua(h, e, i, l, u, d) { + const g = h.context, + w = g.gl; + w.enable(w.SCISSOR_TEST), + w.scissor( + e * h.pixelRatio, + i * h.pixelRatio, + l * h.pixelRatio, + u * h.pixelRatio + ), + g.clear({ color: d }), + w.disable(w.SCISSOR_TEST); + } + function ya(h, e, i) { + const l = h.context, + u = l.gl, + d = h.useProgram("debug"), + g = Gr.disabled, + w = un.disabled, + C = h.colorModeForRenderPass(), + P = "$debug", + E = + h.style.map.terrain && + h.style.map.terrain.getTerrainData(i); + l.activeTexture.set(u.TEXTURE0); + const R = e.getTileByID(i.key).latestRawTileData, + D = Math.floor(((R && R.byteLength) || 0) / 1024), + N = e.getTile(i).tileSize, + G = + (512 / Math.min(N, 512)) * + (i.overscaledZ / h.transform.zoom) * + 0.5; + let te = i.canonical.toString(); + i.overscaledZ !== i.canonical.z && + (te += ` => ${i.overscaledZ}`), + (function (ae, ce) { + ae.initDebugOverlayCanvas(); + const ve = ae.debugOverlayCanvas, + me = ae.context.gl, + be = ae.debugOverlayCanvas.getContext("2d"); + be.clearRect(0, 0, ve.width, ve.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(ce, 5, 5), + be.strokeText(ce, 5, 5), + ae.debugOverlayTexture.update(ve), + ae.debugOverlayTexture.bind(me.LINEAR, me.CLAMP_TO_EDGE); + })(h, `${te} ${D}kB`); + const Q = h.transform.getProjectionData({ + overscaledTileID: i, + applyGlobeMatrix: !0, + applyTerrainMatrix: !0, + }); + d.draw( + l, + u.TRIANGLES, + g, + w, + zn.alphaBlended, + Rr.disabled, + Ao(s.bf.transparent, G), + null, + Q, + P, + h.debugBuffer, + h.quadTriangleIndexBuffer, + h.debugSegments + ), + d.draw( + l, + u.LINE_STRIP, + g, + w, + C, + Rr.disabled, + Ao(s.bf.red), + E, + Q, + P, + h.debugBuffer, + h.tileBorderIndexBuffer, + h.debugSegments + ); + } + function Bl(h, e, i, l) { + const { isRenderingGlobe: u } = l, + d = h.context, + g = d.gl, + w = h.transform, + C = h.colorModeForRenderPass(), + P = h.getDepthModeFor3D(), + E = h.useProgram("terrain"); + d.bindFramebuffer.set(null), + d.viewport.set([0, 0, h.width, h.height]); + for (const R of i) { + const D = e.getTerrainMesh(R.tileID), + N = h.renderToTexture.getTexture(R), + G = e.getTerrainData(R.tileID); + d.activeTexture.set(g.TEXTURE0), + g.bindTexture(g.TEXTURE_2D, N.texture); + const te = e.getMeshFrameDelta(w.zoom), + Q = w.calculateFogMatrix(R.tileID.toUnwrapped()), + ae = xl(te, Q, h.style.sky, w.pitch, u), + ce = w.getProjectionData({ + overscaledTileID: R.tileID, + applyTerrainMatrix: !1, + applyGlobeMatrix: !0, + }); + E.draw( + d, + g.TRIANGLES, + P, + un.disabled, + C, + Rr.backCCW, + ae, + G, + ce, + "terrain", + D.vertexBuffer, + D.indexBuffer, + D.segments + ); + } + } + function Hs(h, e) { + if (!e.mesh) { + const i = new s.aL(); + i.emplaceBack(-1, -1), + i.emplaceBack(1, -1), + i.emplaceBack(1, 1), + i.emplaceBack(-1, 1); + const l = new s.aN(); + l.emplaceBack(0, 1, 2), + l.emplaceBack(0, 2, 3), + (e.mesh = new Tn( + h.createVertexBuffer(i, an.members), + h.createIndexBuffer(l), + s.aM.simpleSegment(0, 0, i.length, l.length) + )); + } + return e.mesh; + } + class sd { + constructor(e, i) { + (this.context = new td(e)), + (this.transform = i), + (this._tileTextures = {}), + (this.terrainFacilitator = { + dirty: !0, + matrix: s.ag(new Float64Array(16)), + renderTime: 0, + }), + this.setup(), + (this.numSublayers = + rr.maxUnderzooming + rr.maxOverzooming + 1), + (this.depthEpsilon = 1 / Math.pow(2, 16)), + (this.crossTileSymbolIndex = new sr()); + } + resize(e, i, l) { + if ( + ((this.width = Math.floor(e * l)), + (this.height = Math.floor(i * l)), + (this.pixelRatio = l), + this.context.viewport.set([0, 0, this.width, this.height]), + this.style) + ) + for (const u of this.style._order) + this.style._layers[u].resize(); + } + setup() { + const e = this.context, + i = new s.aL(); + i.emplaceBack(0, 0), + i.emplaceBack(s.$, 0), + i.emplaceBack(0, s.$), + i.emplaceBack(s.$, s.$), + (this.tileExtentBuffer = e.createVertexBuffer( + i, + an.members + )), + (this.tileExtentSegments = s.aM.simpleSegment(0, 0, 4, 2)); + const l = new s.aL(); + l.emplaceBack(0, 0), + l.emplaceBack(s.$, 0), + l.emplaceBack(0, s.$), + l.emplaceBack(s.$, s.$), + (this.debugBuffer = e.createVertexBuffer(l, an.members)), + (this.debugSegments = s.aM.simpleSegment(0, 0, 4, 5)); + const u = new s.c6(); + u.emplaceBack(0, 0, 0, 0), + u.emplaceBack(s.$, 0, s.$, 0), + u.emplaceBack(0, s.$, 0, s.$), + u.emplaceBack(s.$, s.$, s.$, s.$), + (this.rasterBoundsBuffer = e.createVertexBuffer( + u, + Tp.members + )), + (this.rasterBoundsSegments = s.aM.simpleSegment( + 0, + 0, + 4, + 2 + )); + const d = new s.aL(); + d.emplaceBack(0, 0), + d.emplaceBack(s.$, 0), + d.emplaceBack(0, s.$), + d.emplaceBack(s.$, s.$), + (this.rasterBoundsBufferPosOnly = e.createVertexBuffer( + d, + an.members + )), + (this.rasterBoundsSegmentsPosOnly = s.aM.simpleSegment( + 0, + 0, + 4, + 5 + )); + const g = new s.aL(); + g.emplaceBack(0, 0), + g.emplaceBack(1, 0), + g.emplaceBack(0, 1), + g.emplaceBack(1, 1), + (this.viewportBuffer = e.createVertexBuffer(g, an.members)), + (this.viewportSegments = s.aM.simpleSegment(0, 0, 4, 2)); + const w = new s.c7(); + w.emplaceBack(0), + w.emplaceBack(1), + w.emplaceBack(3), + w.emplaceBack(2), + w.emplaceBack(0), + (this.tileBorderIndexBuffer = e.createIndexBuffer(w)); + const C = new s.aN(); + C.emplaceBack(1, 0, 2), + C.emplaceBack(1, 2, 3), + (this.quadTriangleIndexBuffer = e.createIndexBuffer(C)); + const P = this.context.gl; + (this.stencilClearMode = new un( + { func: P.ALWAYS, mask: 0 }, + 0, + 255, + P.ZERO, + P.ZERO, + P.ZERO + )), + (this.tileExtentMesh = new Tn( + this.tileExtentBuffer, + this.quadTriangleIndexBuffer, + this.tileExtentSegments + )); + } + clearStencil() { + const e = this.context, + i = e.gl; + (this.nextStencilID = 1), + (this.currentStencilSource = void 0); + const l = s.L(); + s.bY(l, 0, this.width, this.height, 0, 0, 1), + s.N(l, l, [i.drawingBufferWidth, i.drawingBufferHeight, 0]); + const u = { + mainMatrix: l, + tileMercatorCoords: [0, 0, 1, 1], + clippingPlane: [0, 0, 0, 0], + projectionTransition: 0, + fallbackMatrix: l, + }; + this.useProgram("clippingMask", null, !0).draw( + e, + i.TRIANGLES, + Gr.disabled, + this.stencilClearMode, + zn.disabled, + Rr.disabled, + null, + null, + u, + "$clipping", + this.viewportBuffer, + this.quadTriangleIndexBuffer, + this.viewportSegments + ); + } + _renderTileClippingMasks(e, i, l) { + if ( + this.currentStencilSource === e.source || + !e.isTileClipped() || + !i || + !i.length + ) + return; + (this.currentStencilSource = e.source), + this.nextStencilID + i.length > 256 && this.clearStencil(); + const u = this.context; + u.setColorMode(zn.disabled), u.setDepthMode(Gr.disabled); + const d = {}; + for (const g of i) d[g.key] = this.nextStencilID++; + this._renderTileMasks(d, i, l, !0), + this._renderTileMasks(d, i, l, !1), + (this._tileClippingMaskIDs = d); + } + _renderTileMasks(e, i, l, u) { + const d = this.context, + g = d.gl, + w = this.style.projection, + C = this.transform, + P = this.useProgram("clippingMask"); + for (const E of i) { + const R = e[E.key], + D = + this.style.map.terrain && + this.style.map.terrain.getTerrainData(E), + N = w.getMeshFromTileID( + this.context, + E.canonical, + u, + !0, + "stencil" + ), + G = C.getProjectionData({ + overscaledTileID: E, + applyGlobeMatrix: !l, + applyTerrainMatrix: !0, + }); + P.draw( + d, + g.TRIANGLES, + Gr.disabled, + new un( + { func: g.ALWAYS, mask: 0 }, + R, + 255, + g.KEEP, + g.KEEP, + g.REPLACE + ), + zn.disabled, + l ? Rr.disabled : Rr.backCCW, + null, + D, + G, + "$clipping", + N.vertexBuffer, + N.indexBuffer, + N.segments + ); + } + } + _renderTilesDepthBuffer() { + const e = this.context, + i = e.gl, + l = this.style.projection, + u = this.transform, + d = this.useProgram("depth"), + g = this.getDepthModeFor3D(), + w = ye(u, { tileSize: u.tileSize }); + for (const C of w) { + const P = + this.style.map.terrain && + this.style.map.terrain.getTerrainData(C), + E = l.getMeshFromTileID( + this.context, + C.canonical, + !0, + !0, + "raster" + ), + R = u.getProjectionData({ + overscaledTileID: C, + applyGlobeMatrix: !0, + applyTerrainMatrix: !0, + }); + d.draw( + e, + i.TRIANGLES, + g, + un.disabled, + zn.disabled, + Rr.backCCW, + null, + P, + R, + "$clipping", + E.vertexBuffer, + E.indexBuffer, + E.segments + ); + } + } + stencilModeFor3D() { + (this.currentStencilSource = void 0), + this.nextStencilID + 1 > 256 && this.clearStencil(); + const e = this.nextStencilID++, + i = this.context.gl; + return new un( + { func: i.NOTEQUAL, mask: 255 }, + e, + 255, + i.KEEP, + i.KEEP, + i.REPLACE + ); + } + stencilModeForClipping(e) { + const i = this.context.gl; + return new un( + { func: i.EQUAL, mask: 255 }, + this._tileClippingMaskIDs[e.key], + 0, + i.KEEP, + i.KEEP, + i.REPLACE + ); + } + getStencilConfigForOverlapAndUpdateStencilID(e) { + const i = this.context.gl, + l = e.sort((g, w) => w.overscaledZ - g.overscaledZ), + u = l[l.length - 1].overscaledZ, + d = l[0].overscaledZ - u + 1; + if (d > 1) { + (this.currentStencilSource = void 0), + this.nextStencilID + d > 256 && this.clearStencil(); + const g = {}; + for (let w = 0; w < d; w++) + g[w + u] = new un( + { func: i.GEQUAL, mask: 255 }, + w + this.nextStencilID, + 255, + i.KEEP, + i.KEEP, + i.REPLACE + ); + return (this.nextStencilID += d), [g, l]; + } + return [{ [u]: un.disabled }, l]; + } + stencilConfigForOverlapTwoPass(e) { + const i = this.context.gl, + l = e.sort((g, w) => w.overscaledZ - g.overscaledZ), + u = l[l.length - 1].overscaledZ, + d = l[0].overscaledZ - u + 1; + if ((this.clearStencil(), d > 1)) { + const g = {}, + w = {}; + for (let C = 0; C < d; C++) + (g[C + u] = new un( + { func: i.GREATER, mask: 255 }, + d + 1 + C, + 255, + i.KEEP, + i.KEEP, + i.REPLACE + )), + (w[C + u] = new un( + { func: i.GREATER, mask: 255 }, + 1 + C, + 255, + i.KEEP, + i.KEEP, + i.REPLACE + )); + return (this.nextStencilID = 2 * d + 1), [g, w, l]; + } + return ( + (this.nextStencilID = 3), + [ + { + [u]: new un( + { func: i.GREATER, mask: 255 }, + 2, + 255, + i.KEEP, + i.KEEP, + i.REPLACE + ), + }, + { + [u]: new un( + { func: i.GREATER, mask: 255 }, + 1, + 255, + i.KEEP, + i.KEEP, + i.REPLACE + ), + }, + l, + ] + ); + } + colorModeForRenderPass() { + const e = this.context.gl; + return this._showOverdrawInspector + ? new zn( + [e.CONSTANT_COLOR, e.ONE], + new s.bf(0.125, 0.125, 0.125, 0), + [!0, !0, !0, !0] + ) + : this.renderPass === "opaque" + ? zn.unblended + : zn.alphaBlended; + } + getDepthModeForSublayer(e, i, l) { + if (!this.opaquePassEnabledForLayer()) return Gr.disabled; + const u = + 1 - + ((1 + this.currentLayer) * this.numSublayers + e) * + this.depthEpsilon; + return new Gr(l || this.context.gl.LEQUAL, i, [u, u]); + } + getDepthModeFor3D() { + return new Gr( + this.context.gl.LEQUAL, + Gr.ReadWrite, + this.depthRangeFor3D + ); + } + opaquePassEnabledForLayer() { + return this.currentLayer < this.opaquePassCutoff; + } + render(e, i) { + var l, u; + (this.style = e), + (this.options = i), + (this.lineAtlas = e.lineAtlas), + (this.imageManager = e.imageManager), + (this.glyphManager = e.glyphManager), + (this.symbolFadeChange = e.placement.symbolFadeChange( + ne.now() + )), + this.imageManager.beginFrame(); + const d = this.style._order, + g = this.style.sourceCaches, + w = {}, + C = {}, + P = {}, + E = { + isRenderingToTexture: !1, + isRenderingGlobe: + ((l = e.projection) === null || l === void 0 + ? void 0 + : l.transitionState) > 0, + }; + for (const D in g) { + const N = g[D]; + N.used && N.prepare(this.context), + (w[D] = N.getVisibleCoordinates(!1)), + (C[D] = w[D].slice().reverse()), + (P[D] = N.getVisibleCoordinates(!0).reverse()); + } + this.opaquePassCutoff = 1 / 0; + for (let D = 0; D < d.length; D++) + if (this.style._layers[d[D]].is3D()) { + this.opaquePassCutoff = D; + break; + } + this.maybeDrawDepthAndCoords(!1), + this.renderToTexture && + (this.renderToTexture.prepareForRender( + this.style, + this.transform.zoom + ), + (this.opaquePassCutoff = 0)), + (this.renderPass = "offscreen"); + for (const D of d) { + const N = this.style._layers[D]; + if ( + !N.hasOffscreenPass() || + N.isHidden(this.transform.zoom) + ) + continue; + const G = C[N.source]; + (N.type === "custom" || G.length) && + this.renderLayer(this, g[N.source], N, G, E); + } + if ( + ((u = this.style.projection) === null || + u === void 0 || + u.updateGPUdependent({ + context: this.context, + useProgram: (D) => this.useProgram(D), + }), + this.context.viewport.set([0, 0, this.width, this.height]), + this.context.bindFramebuffer.set(null), + this.context.clear({ + color: i.showOverdrawInspector + ? s.bf.black + : s.bf.transparent, + depth: 1, + }), + this.clearStencil(), + this.style.sky && + (function (D, N) { + const G = D.context, + te = G.gl, + Q = ((Pe, _e, Be) => { + const rt = Math.cos(_e.rollInRadians), + Ge = Math.sin(_e.rollInRadians), + Xe = pe(_e), + tt = _e.getProjectionData({ + overscaledTileID: null, + applyGlobeMatrix: !0, + applyTerrainMatrix: !0, + }).projectionTransition; + return { + u_sky_color: Pe.properties.get("sky-color"), + u_horizon_color: + Pe.properties.get("horizon-color"), + u_horizon: [ + (_e.width / 2 - Xe * Ge) * Be, + (_e.height / 2 + Xe * rt) * Be, + ], + u_horizon_normal: [-Ge, rt], + u_sky_horizon_blend: + ((Pe.properties.get("sky-horizon-blend") * + _e.height) / + 2) * + Be, + u_sky_blend: tt, + }; + })(N, D.style.map.transform, D.pixelRatio), + ae = new Gr(te.LEQUAL, Gr.ReadWrite, [0, 1]), + ce = un.disabled, + ve = D.colorModeForRenderPass(), + me = D.useProgram("sky"), + be = Hs(G, N); + me.draw( + G, + te.TRIANGLES, + ae, + ce, + ve, + Rr.disabled, + Q, + null, + void 0, + "sky", + be.vertexBuffer, + be.indexBuffer, + be.segments + ); + })(this, this.style.sky), + (this._showOverdrawInspector = i.showOverdrawInspector), + (this.depthRangeFor3D = [ + 0, + 1 - + (e._order.length + 2) * + this.numSublayers * + this.depthEpsilon, + ]), + !this.renderToTexture) + ) + for ( + this.renderPass = "opaque", + this.currentLayer = d.length - 1; + this.currentLayer >= 0; + this.currentLayer-- + ) { + const D = this.style._layers[d[this.currentLayer]], + N = g[D.source], + G = w[D.source]; + this._renderTileClippingMasks(D, G, !1), + this.renderLayer(this, N, D, G, E); + } + this.renderPass = "translucent"; + let R = !1; + for ( + this.currentLayer = 0; + this.currentLayer < d.length; + this.currentLayer++ + ) { + const D = this.style._layers[d[this.currentLayer]], + N = g[D.source]; + if ( + this.renderToTexture && + this.renderToTexture.renderLayer(D, E) + ) + continue; + this.opaquePassEnabledForLayer() || + R || + ((R = !0), + E.isRenderingGlobe && + !this.style.map.terrain && + this._renderTilesDepthBuffer()); + const G = (D.type === "symbol" ? P : C)[D.source]; + this._renderTileClippingMasks( + D, + w[D.source], + !!this.renderToTexture + ), + this.renderLayer(this, N, D, G, E); + } + if ( + (E.isRenderingGlobe && + (function (D, N, G) { + const te = D.context, + Q = te.gl, + ae = D.useProgram("atmosphere"), + ce = new Gr(Q.LEQUAL, Gr.ReadOnly, [0, 1]), + ve = D.transform, + me = (function (tt, jt) { + const Zt = tt.properties.get("position"), + Tt = [-Zt.x, -Zt.y, -Zt.z], + vr = s.ag(new Float64Array(16)); + return ( + tt.properties.get("anchor") === "map" && + (s.b6(vr, vr, jt.rollInRadians), + s.b7(vr, vr, -jt.pitchInRadians), + s.b6(vr, vr, jt.bearingInRadians), + s.b7(vr, vr, (jt.center.lat * Math.PI) / 180), + s.bz(vr, vr, (-jt.center.lng * Math.PI) / 180)), + s.c5(Tt, Tt, vr), + Tt + ); + })(G, D.transform), + be = ve.getProjectionData({ + overscaledTileID: null, + applyGlobeMatrix: !0, + applyTerrainMatrix: !0, + }), + Pe = + N.properties.get("atmosphere-blend") * + be.projectionTransition; + if (Pe === 0) return; + const _e = Qo(ve.worldSize, ve.center.lat), + Be = ve.inverseProjectionMatrix, + rt = new Float64Array(4); + (rt[3] = 1), + s.aw(rt, rt, ve.modelViewProjectionMatrix), + (rt[0] /= rt[3]), + (rt[1] /= rt[3]), + (rt[2] /= rt[3]), + (rt[3] = 1), + s.aw(rt, rt, Be), + (rt[0] /= rt[3]), + (rt[1] /= rt[3]), + (rt[2] /= rt[3]), + (rt[3] = 1); + const Ge = ((tt, jt, Zt, Tt, vr) => ({ + u_sun_pos: tt, + u_atmosphere_blend: jt, + u_globe_position: Zt, + u_globe_radius: Tt, + u_inv_proj_matrix: vr, + }))(me, Pe, [rt[0], rt[1], rt[2]], _e, Be), + Xe = Hs(te, N); + ae.draw( + te, + Q.TRIANGLES, + ce, + un.disabled, + zn.alphaBlended, + Rr.disabled, + Ge, + null, + null, + "atmosphere", + Xe.vertexBuffer, + Xe.indexBuffer, + Xe.segments + ); + })(this, this.style.sky, this.style.light), + this.options.showTileBoundaries) + ) { + const D = (function (N, G) { + let te = null; + const Q = Object.values(N._layers).flatMap((me) => + me.source && !me.isHidden(G) + ? [N.sourceCaches[me.source]] + : [] + ), + ae = Q.filter((me) => me.getSource().type === "vector"), + ce = Q.filter((me) => me.getSource().type !== "vector"), + ve = (me) => { + (!te || + te.getSource().maxzoom < me.getSource().maxzoom) && + (te = me); + }; + return ( + ae.forEach((me) => ve(me)), + te || ce.forEach((me) => ve(me)), + te + ); + })(this.style, this.transform.zoom); + D && + (function (N, G, te) { + for (let Q = 0; Q < te.length; Q++) ya(N, G, te[Q]); + })(this, D, D.getVisibleCoordinates()); + } + this.options.showPadding && + (function (D) { + const N = D.transform.padding; + eu(D, D.transform.height - (N.top || 0), 3, ad), + eu(D, N.bottom || 0, 3, od), + Kn(D, N.left || 0, 3, Rl), + Kn(D, D.transform.width - (N.right || 0), 3, Qc); + const G = D.transform.centerPoint; + (function (te, Q, ae, ce) { + Ua(te, Q - 1, ae - 10, 2, 20, ce), + Ua(te, Q - 10, ae - 1, 20, 2, ce); + })(D, G.x, D.transform.height - G.y, Np); + })(this), + this.context.setDefault(); + } + maybeDrawDepthAndCoords(e) { + if (!this.style || !this.style.map || !this.style.map.terrain) + return; + const i = this.terrainFacilitator.matrix, + l = this.transform.modelViewProjectionMatrix; + let u = this.terrainFacilitator.dirty; + u || (u = e ? !s.c8(i, l) : !s.c9(i, l)), + u || + (u = this.style.map.terrain.sourceCache.anyTilesAfterTime( + this.terrainFacilitator.renderTime + )), + u && + (s.ca(i, l), + (this.terrainFacilitator.renderTime = Date.now()), + (this.terrainFacilitator.dirty = !1), + (function (d, g) { + const w = d.context, + C = w.gl, + P = d.transform, + E = zn.unblended, + R = new Gr(C.LEQUAL, Gr.ReadWrite, [0, 1]), + D = g.sourceCache.getRenderableTiles(), + N = d.useProgram("terrainDepth"); + w.bindFramebuffer.set( + g.getFramebuffer("depth").framebuffer + ), + w.viewport.set([ + 0, + 0, + d.width / devicePixelRatio, + d.height / devicePixelRatio, + ]), + w.clear({ color: s.bf.transparent, depth: 1 }); + for (const G of D) { + const te = g.getTerrainMesh(G.tileID), + Q = g.getTerrainData(G.tileID), + ae = P.getProjectionData({ + overscaledTileID: G.tileID, + applyTerrainMatrix: !1, + applyGlobeMatrix: !0, + }), + ce = { u_ele_delta: g.getMeshFrameDelta(P.zoom) }; + N.draw( + w, + C.TRIANGLES, + R, + un.disabled, + E, + Rr.backCCW, + ce, + Q, + ae, + "terrain", + te.vertexBuffer, + te.indexBuffer, + te.segments + ); + } + w.bindFramebuffer.set(null), + w.viewport.set([0, 0, d.width, d.height]); + })(this, this.style.map.terrain), + (function (d, g) { + const w = d.context, + C = w.gl, + P = d.transform, + E = zn.unblended, + R = new Gr(C.LEQUAL, Gr.ReadWrite, [0, 1]), + D = g.getCoordsTexture(), + N = g.sourceCache.getRenderableTiles(), + G = d.useProgram("terrainCoords"); + w.bindFramebuffer.set( + g.getFramebuffer("coords").framebuffer + ), + w.viewport.set([ + 0, + 0, + d.width / devicePixelRatio, + d.height / devicePixelRatio, + ]), + w.clear({ color: s.bf.transparent, depth: 1 }), + (g.coordsIndex = []); + for (const te of N) { + const Q = g.getTerrainMesh(te.tileID), + ae = g.getTerrainData(te.tileID); + w.activeTexture.set(C.TEXTURE0), + C.bindTexture(C.TEXTURE_2D, D.texture); + const ce = { + u_terrain_coords_id: + (255 - g.coordsIndex.length) / 255, + u_texture: 0, + u_ele_delta: g.getMeshFrameDelta(P.zoom), + }, + ve = P.getProjectionData({ + overscaledTileID: te.tileID, + applyTerrainMatrix: !1, + applyGlobeMatrix: !0, + }); + G.draw( + w, + C.TRIANGLES, + R, + un.disabled, + E, + Rr.backCCW, + ce, + ae, + ve, + "terrain", + Q.vertexBuffer, + Q.indexBuffer, + Q.segments + ), + g.coordsIndex.push(te.tileID.key); + } + w.bindFramebuffer.set(null), + w.viewport.set([0, 0, d.width, d.height]); + })(this, this.style.map.terrain)); + } + renderLayer(e, i, l, u, d) { + l.isHidden(this.transform.zoom) || + ((l.type === "background" || + l.type === "custom" || + (u || []).length) && + ((this.id = l.id), + s.cb(l) + ? (function (g, w, C, P, E, R) { + if (g.renderPass !== "translucent") return; + const { isRenderingToTexture: D } = R, + N = un.disabled, + G = g.colorModeForRenderPass(); + (C._unevaluatedLayout.hasValue( + "text-variable-anchor" + ) || + C._unevaluatedLayout.hasValue( + "text-variable-anchor-offset" + )) && + (function (te, Q, ae, ce, ve, me, be, Pe, _e) { + const Be = Q.transform, + rt = Q.style.map.terrain, + Ge = ve === "map", + Xe = me === "map"; + for (const tt of te) { + const jt = ce.getTile(tt), + Zt = jt.getBucket(ae); + if ( + !Zt || + !Zt.text || + !Zt.text.segments.get().length + ) + continue; + const Tt = s.an(Zt.textSizeData, Be.zoom), + vr = s.aC(jt, 1, Q.transform.zoom), + Jr = _n(Ge, Q.transform, vr), + An = + ae.layout.get("icon-text-fit") !== + "none" && Zt.hasIconData(); + if (Tt) { + const Rn = Math.pow( + 2, + Be.zoom - jt.tileID.overscaledZ + ), + Ln = rt + ? (Wn, Jn) => + rt.getElevation(tt, Wn, Jn) + : null; + Wc( + Zt, + Ge, + Xe, + _e, + Be, + Jr, + Rn, + Tt, + An, + s.aD(Be, jt, be, Pe), + tt.toUnwrapped(), + Ln + ); + } + } + })( + P, + g, + C, + w, + C.layout.get("text-rotation-alignment"), + C.layout.get("text-pitch-alignment"), + C.paint.get("text-translate"), + C.paint.get("text-translate-anchor"), + E + ), + C.paint.get("icon-opacity").constantOr(1) !== 0 && + qs( + g, + w, + C, + P, + !1, + C.paint.get("icon-translate"), + C.paint.get("icon-translate-anchor"), + C.layout.get("icon-rotation-alignment"), + C.layout.get("icon-pitch-alignment"), + C.layout.get("icon-keep-upright"), + N, + G, + D + ), + C.paint.get("text-opacity").constantOr(1) !== 0 && + qs( + g, + w, + C, + P, + !0, + C.paint.get("text-translate"), + C.paint.get("text-translate-anchor"), + C.layout.get("text-rotation-alignment"), + C.layout.get("text-pitch-alignment"), + C.layout.get("text-keep-upright"), + N, + G, + D + ), + w.map.showCollisionBoxes && + (rd(g, w, C, P, !0), rd(g, w, C, P, !1)); + })( + e, + i, + l, + u, + this.style.placement.variableOffsets, + d + ) + : s.cc(l) + ? (function (g, w, C, P, E) { + if (g.renderPass !== "translucent") return; + const { isRenderingToTexture: R } = E, + D = C.paint.get("circle-opacity"), + N = C.paint.get("circle-stroke-width"), + G = C.paint.get("circle-stroke-opacity"), + te = !C.layout + .get("circle-sort-key") + .isConstant(); + if ( + D.constantOr(1) === 0 && + (N.constantOr(1) === 0 || G.constantOr(1) === 0) + ) + return; + const Q = g.context, + ae = Q.gl, + ce = g.transform, + ve = g.getDepthModeForSublayer(0, Gr.ReadOnly), + me = un.disabled, + be = g.colorModeForRenderPass(), + Pe = [], + _e = ce.getCircleRadiusCorrection(); + for (let Be = 0; Be < P.length; Be++) { + const rt = P[Be], + Ge = w.getTile(rt), + Xe = Ge.getBucket(C); + if (!Xe) continue; + const tt = C.paint.get("circle-translate"), + jt = C.paint.get("circle-translate-anchor"), + Zt = s.aD(ce, Ge, tt, jt), + Tt = Xe.programConfigurations.get(C.id), + vr = g.useProgram("circle", Tt), + Jr = Xe.layoutVertexBuffer, + An = Xe.indexBuffer, + Rn = + g.style.map.terrain && + g.style.map.terrain.getTerrainData(rt), + Ln = { + programConfiguration: Tt, + program: vr, + layoutVertexBuffer: Jr, + indexBuffer: An, + uniformValues: Pp(g, Ge, C, Zt, _e), + terrainData: Rn, + projectionData: ce.getProjectionData({ + overscaledTileID: rt, + applyGlobeMatrix: !R, + applyTerrainMatrix: !0, + }), + }; + if (te) { + const Wn = Xe.segments.get(); + for (const Jn of Wn) + Pe.push({ + segments: new s.aM([Jn]), + sortKey: Jn.sortKey, + state: Ln, + }); + } else + Pe.push({ + segments: Xe.segments, + sortKey: 0, + state: Ln, + }); + } + te && Pe.sort((Be, rt) => Be.sortKey - rt.sortKey); + for (const Be of Pe) { + const { + programConfiguration: rt, + program: Ge, + layoutVertexBuffer: Xe, + indexBuffer: tt, + uniformValues: jt, + terrainData: Zt, + projectionData: Tt, + } = Be.state; + Ge.draw( + Q, + ae.TRIANGLES, + ve, + me, + be, + Rr.backCCW, + jt, + Zt, + Tt, + C.id, + Xe, + tt, + Be.segments, + C.paint, + g.transform.zoom, + rt + ); + } + })(e, i, l, u, d) + : s.cd(l) + ? (function (g, w, C, P, E) { + if (C.paint.get("heatmap-opacity") === 0) return; + const R = g.context, + { isRenderingToTexture: D, isRenderingGlobe: N } = + E; + if (g.style.map.terrain) { + for (const G of P) { + const te = w.getTile(G); + w.hasRenderableParent(G) || + (g.renderPass === "offscreen" + ? Xc(g, te, C, G, N) + : g.renderPass === "translucent" && + id(g, C, G, D, N)); + } + R.viewport.set([0, 0, g.width, g.height]); + } else + g.renderPass === "offscreen" + ? (function (G, te, Q, ae) { + const ce = G.context, + ve = ce.gl, + me = G.transform, + be = un.disabled, + Pe = new zn( + [ve.ONE, ve.ONE], + s.bf.transparent, + [!0, !0, !0, !0] + ); + (function (_e, Be, rt) { + const Ge = _e.gl; + _e.activeTexture.set(Ge.TEXTURE1), + _e.viewport.set([ + 0, + 0, + Be.width / 4, + Be.height / 4, + ]); + let Xe = rt.heatmapFbos.get(s.c2); + Xe + ? (Ge.bindTexture( + Ge.TEXTURE_2D, + Xe.colorAttachment.get() + ), + _e.bindFramebuffer.set( + Xe.framebuffer + )) + : ((Xe = Us( + _e, + Be.width / 4, + Be.height / 4 + )), + rt.heatmapFbos.set(s.c2, Xe)); + })(ce, G, Q), + ce.clear({ color: s.bf.transparent }); + for (let _e = 0; _e < ae.length; _e++) { + const Be = ae[_e]; + if (te.hasRenderableParent(Be)) continue; + const rt = te.getTile(Be), + Ge = rt.getBucket(Q); + if (!Ge) continue; + const Xe = Ge.programConfigurations.get( + Q.id + ), + tt = G.useProgram("heatmap", Xe), + jt = me.getProjectionData({ + overscaledTileID: Be, + applyGlobeMatrix: !0, + applyTerrainMatrix: !1, + }), + Zt = me.getCircleRadiusCorrection(); + tt.draw( + ce, + ve.TRIANGLES, + Gr.disabled, + be, + Pe, + Rr.backCCW, + Nh( + rt, + me.zoom, + Q.paint.get("heatmap-intensity"), + Zt + ), + null, + jt, + Q.id, + Ge.layoutVertexBuffer, + Ge.indexBuffer, + Ge.segments, + Q.paint, + me.zoom, + Xe + ); + } + ce.viewport.set([0, 0, G.width, G.height]); + })(g, w, C, P) + : g.renderPass === "translucent" && + (function (G, te) { + const Q = G.context, + ae = Q.gl; + Q.setColorMode(G.colorModeForRenderPass()); + const ce = te.heatmapFbos.get(s.c2); + ce && + (Q.activeTexture.set(ae.TEXTURE0), + ae.bindTexture( + ae.TEXTURE_2D, + ce.colorAttachment.get() + ), + Q.activeTexture.set(ae.TEXTURE1), + $s(Q, te).bind( + ae.LINEAR, + ae.CLAMP_TO_EDGE + ), + G.useProgram("heatmapTexture").draw( + Q, + ae.TRIANGLES, + Gr.disabled, + un.disabled, + G.colorModeForRenderPass(), + Rr.disabled, + Rc(G, te, 0, 1), + null, + null, + te.id, + G.viewportBuffer, + G.quadTriangleIndexBuffer, + G.viewportSegments, + te.paint, + G.transform.zoom + )); + })(g, C); + })(e, i, l, u, d) + : s.ce(l) + ? (function (g, w, C, P, E) { + if (g.renderPass !== "translucent") return; + const { isRenderingToTexture: R } = E, + D = C.paint.get("line-opacity"), + N = C.paint.get("line-width"); + if (D.constantOr(1) === 0 || N.constantOr(1) === 0) + return; + const G = g.getDepthModeForSublayer(0, Gr.ReadOnly), + te = g.colorModeForRenderPass(), + Q = C.paint.get("line-dasharray"), + ae = C.paint.get("line-pattern"), + ce = ae.constantOr(1), + ve = C.paint.get("line-gradient"), + me = C.getCrossfadeParameters(), + be = ce + ? "linePattern" + : Q + ? "lineSDF" + : ve + ? "lineGradient" + : "line", + Pe = g.context, + _e = Pe.gl, + Be = g.transform; + let rt = !0; + for (const Ge of P) { + const Xe = w.getTile(Ge); + if (ce && !Xe.patternsLoaded()) continue; + const tt = Xe.getBucket(C); + if (!tt) continue; + const jt = tt.programConfigurations.get(C.id), + Zt = g.context.program.get(), + Tt = g.useProgram(be, jt), + vr = rt || Tt.program !== Zt, + Jr = + g.style.map.terrain && + g.style.map.terrain.getTerrainData(Ge), + An = ae.constantOr(null); + if (An && Xe.imageAtlas) { + const Kr = Xe.imageAtlas, + Bn = Kr.patternPositions[An.to.toString()], + si = Kr.patternPositions[An.from.toString()]; + Bn && + si && + jt.setConstantPatternPositions(Bn, si); + } + const Rn = Be.getProjectionData({ + overscaledTileID: Ge, + applyGlobeMatrix: !R, + applyTerrainMatrix: !0, + }), + Ln = Be.getPixelScale(), + Wn = ce + ? Zh(g, Xe, C, Ln, me) + : Q + ? Eo(g, Xe, C, Ln, Q, me) + : ve + ? qh(g, Xe, C, Ln, tt.lineClipsArray.length) + : Cl(g, Xe, C, Ln); + if (ce) + Pe.activeTexture.set(_e.TEXTURE0), + Xe.imageAtlasTexture.bind( + _e.LINEAR, + _e.CLAMP_TO_EDGE + ), + jt.updatePaintBuffers(me); + else if (Q && (vr || g.lineAtlas.dirty)) + Pe.activeTexture.set(_e.TEXTURE0), + g.lineAtlas.bind(Pe); + else if (ve) { + const Kr = tt.gradients[C.id]; + let Bn = Kr.texture; + if (C.gradientVersion !== Kr.version) { + let si = 256; + if (C.stepInterpolant) { + const mi = w.getSource().maxzoom, + Ci = + Ge.canonical.z === mi + ? Math.ceil( + 1 << + (g.transform.maxZoom - + Ge.canonical.z) + ) + : 1; + si = s.ah( + s.c3( + (tt.maxLineLength / s.$) * 1024 * Ci + ), + 256, + Pe.maxTextureSize + ); + } + (Kr.gradient = s.c4({ + expression: C.gradientExpression(), + evaluationKey: "lineProgress", + resolution: si, + image: Kr.gradient || void 0, + clips: tt.lineClipsArray, + })), + Kr.texture + ? Kr.texture.update(Kr.gradient) + : (Kr.texture = new s.T( + Pe, + Kr.gradient, + _e.RGBA + )), + (Kr.version = C.gradientVersion), + (Bn = Kr.texture); + } + Pe.activeTexture.set(_e.TEXTURE0), + Bn.bind( + C.stepInterpolant ? _e.NEAREST : _e.LINEAR, + _e.CLAMP_TO_EDGE + ); + } + const Jn = g.stencilModeForClipping(Ge); + Tt.draw( + Pe, + _e.TRIANGLES, + G, + Jn, + te, + Rr.disabled, + Wn, + Jr, + Rn, + C.id, + tt.layoutVertexBuffer, + tt.indexBuffer, + tt.segments, + C.paint, + g.transform.zoom, + jt, + tt.layoutVertexBuffer2 + ), + (rt = !1); + } + })(e, i, l, u, d) + : s.cf(l) + ? (function (g, w, C, P, E) { + const R = C.paint.get("fill-color"), + D = C.paint.get("fill-opacity"); + if (D.constantOr(1) === 0) return; + const { isRenderingToTexture: N } = E, + G = g.colorModeForRenderPass(), + te = C.paint.get("fill-pattern"), + Q = + g.opaquePassEnabledForLayer() && + !te.constantOr(1) && + R.constantOr(s.bf.transparent).a === 1 && + D.constantOr(0) === 1 + ? "opaque" + : "translucent"; + if (g.renderPass === Q) { + const ae = g.getDepthModeForSublayer( + 1, + g.renderPass === "opaque" + ? Gr.ReadWrite + : Gr.ReadOnly + ); + Ll(g, w, C, P, ae, G, !1, N); + } + if ( + g.renderPass === "translucent" && + C.paint.get("fill-antialias") + ) { + const ae = g.getDepthModeForSublayer( + C.getPaintProperty("fill-outline-color") + ? 2 + : 0, + Gr.ReadOnly + ); + Ll(g, w, C, P, ae, G, !0, N); + } + })(e, i, l, u, d) + : s.cg(l) + ? (function (g, w, C, P, E) { + const R = C.paint.get("fill-extrusion-opacity"); + if (R === 0) return; + const { isRenderingToTexture: D } = E; + if (g.renderPass === "translucent") { + const N = new Gr( + g.context.gl.LEQUAL, + Gr.ReadWrite, + g.depthRangeFor3D + ); + if ( + R !== 1 || + C.paint + .get("fill-extrusion-pattern") + .constantOr(1) + ) + Yc(g, w, C, P, N, un.disabled, zn.disabled, D), + Yc( + g, + w, + C, + P, + N, + g.stencilModeFor3D(), + g.colorModeForRenderPass(), + D + ); + else { + const G = g.colorModeForRenderPass(); + Yc(g, w, C, P, N, un.disabled, G, D); + } + } + })(e, i, l, u, d) + : s.ch(l) + ? (function (g, w, C, P, E) { + if ( + g.renderPass !== "offscreen" && + g.renderPass !== "translucent" + ) + return; + const { isRenderingToTexture: R } = E, + D = g.context, + N = g.style.projection.useSubdivision, + G = g.getDepthModeForSublayer(0, Gr.ReadOnly), + te = g.colorModeForRenderPass(); + if (g.renderPass === "offscreen") + (function (Q, ae, ce, ve, me, be, Pe) { + const _e = Q.context, + Be = _e.gl; + for (const rt of ce) { + const Ge = ae.getTile(rt), + Xe = Ge.dem; + if ( + !Xe || + !Xe.data || + !Ge.needsHillshadePrepare + ) + continue; + const tt = Xe.dim, + jt = Xe.stride, + Zt = Xe.getPixels(); + if ( + (_e.activeTexture.set(Be.TEXTURE1), + _e.pixelStoreUnpackPremultiplyAlpha.set(!1), + (Ge.demTexture = + Ge.demTexture || Q.getTileTexture(jt)), + Ge.demTexture) + ) { + const vr = Ge.demTexture; + vr.update(Zt, { premultiply: !1 }), + vr.bind(Be.NEAREST, Be.CLAMP_TO_EDGE); + } else + (Ge.demTexture = new s.T(_e, Zt, Be.RGBA, { + premultiply: !1, + })), + Ge.demTexture.bind( + Be.NEAREST, + Be.CLAMP_TO_EDGE + ); + _e.activeTexture.set(Be.TEXTURE0); + let Tt = Ge.fbo; + if (!Tt) { + const vr = new s.T( + _e, + { width: tt, height: tt, data: null }, + Be.RGBA + ); + vr.bind(Be.LINEAR, Be.CLAMP_TO_EDGE), + (Tt = Ge.fbo = + _e.createFramebuffer(tt, tt, !0, !1)), + Tt.colorAttachment.set(vr.texture); + } + _e.bindFramebuffer.set(Tt.framebuffer), + _e.viewport.set([0, 0, tt, tt]), + Q.useProgram("hillshadePrepare").draw( + _e, + Be.TRIANGLES, + me, + be, + Pe, + Rr.disabled, + jh(Ge.tileID, Xe), + null, + null, + ve.id, + Q.rasterBoundsBuffer, + Q.quadTriangleIndexBuffer, + Q.rasterBoundsSegments + ), + (Ge.needsHillshadePrepare = !1); + } + })(g, w, P, C, G, un.disabled, te), + D.viewport.set([0, 0, g.width, g.height]); + else if (g.renderPass === "translucent") + if (N) { + const [Q, ae, ce] = + g.stencilConfigForOverlapTwoPass(P); + Ro(g, w, C, ce, Q, G, te, !1, R), + Ro(g, w, C, ce, ae, G, te, !0, R); + } else { + const [Q, ae] = + g.getStencilConfigForOverlapAndUpdateStencilID( + P + ); + Ro(g, w, C, ae, Q, G, te, !1, R); + } + })(e, i, l, u, d) + : s.ci(l) + ? (function (g, w, C, P, E) { + if (g.renderPass !== "translucent" || !P.length) + return; + const { isRenderingToTexture: R } = E, + D = g.style.projection.useSubdivision, + N = g.getDepthModeForSublayer(0, Gr.ReadOnly), + G = g.colorModeForRenderPass(); + if (D) { + const [te, Q, ae] = + g.stencilConfigForOverlapTwoPass(P); + Kc(g, w, C, ae, te, N, G, !1, R), + Kc(g, w, C, ae, Q, N, G, !0, R); + } else { + const [te, Q] = + g.getStencilConfigForOverlapAndUpdateStencilID( + P + ); + Kc(g, w, C, Q, te, N, G, !1, R); + } + })(e, i, l, u, d) + : s.cj(l) + ? (function (g, w, C, P, E) { + if ( + g.renderPass !== "translucent" || + C.paint.get("raster-opacity") === 0 || + !P.length + ) + return; + const { isRenderingToTexture: R } = E, + D = w.getSource(), + N = g.style.projection.useSubdivision; + if (D instanceof Ot) + Bo( + g, + w, + C, + P, + null, + !1, + !1, + D.tileCoords, + D.flippedWindingOrder, + R + ); + else if (N) { + const [G, te, Q] = + g.stencilConfigForOverlapTwoPass(P); + Bo(g, w, C, Q, G, !1, !0, Dl, !1, R), + Bo(g, w, C, Q, te, !0, !0, Dl, !1, R); + } else { + const [G, te] = + g.getStencilConfigForOverlapAndUpdateStencilID( + P + ); + Bo(g, w, C, te, G, !1, !0, Dl, !1, R); + } + })(e, i, l, u, d) + : s.ck(l) + ? (function (g, w, C, P, E) { + const R = C.paint.get("background-color"), + D = C.paint.get("background-opacity"); + if (D === 0) return; + const { isRenderingToTexture: N } = E, + G = g.context, + te = G.gl, + Q = g.style.projection, + ae = g.transform, + ce = ae.tileSize, + ve = C.paint.get("background-pattern"); + if (g.isPatternMissing(ve)) return; + const me = + !ve && + R.a === 1 && + D === 1 && + g.opaquePassEnabledForLayer() + ? "opaque" + : "translucent"; + if (g.renderPass !== me) return; + const be = un.disabled, + Pe = g.getDepthModeForSublayer( + 0, + me === "opaque" ? Gr.ReadWrite : Gr.ReadOnly + ), + _e = g.colorModeForRenderPass(), + Be = g.useProgram( + ve ? "backgroundPattern" : "background" + ), + rt = + P || + ye(ae, { + tileSize: ce, + terrain: g.style.map.terrain, + }); + ve && + (G.activeTexture.set(te.TEXTURE0), + g.imageManager.bind(g.context)); + const Ge = C.getCrossfadeParameters(); + for (const Xe of rt) { + const tt = ae.getProjectionData({ + overscaledTileID: Xe, + applyGlobeMatrix: !N, + applyTerrainMatrix: !0, + }), + jt = ve + ? Gh( + D, + g, + ve, + { tileID: Xe, tileSize: ce }, + Ge + ) + : $h(D, R), + Zt = + g.style.map.terrain && + g.style.map.terrain.getTerrainData(Xe), + Tt = Q.getMeshFromTileID( + G, + Xe.canonical, + !1, + !0, + "raster" + ); + Be.draw( + G, + te.TRIANGLES, + Pe, + be, + _e, + Rr.backCCW, + jt, + Zt, + tt, + C.id, + Tt.vertexBuffer, + Tt.indexBuffer, + Tt.segments + ); + } + })(e, 0, l, u, d) + : s.cl(l) && + (function (g, w, C, P) { + const { isRenderingGlobe: E } = P, + R = g.context, + D = C.implementation, + N = g.style.projection, + G = g.transform, + te = G.getProjectionDataForCustomLayer(E), + Q = { + farZ: G.farZ, + nearZ: G.nearZ, + fov: (G.fov * Math.PI) / 180, + modelViewProjectionMatrix: + G.modelViewProjectionMatrix, + projectionMatrix: G.projectionMatrix, + shaderData: { + variantName: N.shaderVariantName, + vertexShaderPrelude: `const float PI = 3.141592653589793; +uniform mat4 u_projection_matrix; +${N.shaderPreludeCode.vertexSource}`, + define: N.shaderDefine, + }, + defaultProjectionData: te, + }, + ae = D.renderingMode ? D.renderingMode : "2d"; + if (g.renderPass === "offscreen") { + const ce = D.prerender; + ce && + (g.setCustomLayerDefaults(), + R.setColorMode(g.colorModeForRenderPass()), + ce.call(D, R.gl, Q), + R.setDirty(), + g.setBaseState()); + } else if (g.renderPass === "translucent") { + g.setCustomLayerDefaults(), + R.setColorMode(g.colorModeForRenderPass()), + R.setStencilMode(un.disabled); + const ce = + ae === "3d" + ? g.getDepthModeFor3D() + : g.getDepthModeForSublayer(0, Gr.ReadOnly); + R.setDepthMode(ce), + D.render(R.gl, Q), + R.setDirty(), + g.setBaseState(), + R.bindFramebuffer.set(null); + } + })(e, 0, l, d))); + } + saveTileTexture(e) { + const i = this._tileTextures[e.size[0]]; + i ? i.push(e) : (this._tileTextures[e.size[0]] = [e]); + } + getTileTexture(e) { + const i = this._tileTextures[e]; + return i && i.length > 0 ? i.pop() : null; + } + isPatternMissing(e) { + if (!e) return !1; + if (!e.from || !e.to) return !0; + const i = this.imageManager.getPattern(e.from.toString()), + l = this.imageManager.getPattern(e.to.toString()); + return !i || !l; + } + useProgram(e, i, l = !1, u = []) { + this.cache = this.cache || {}; + const d = !!this.style.map.terrain, + g = this.style.projection, + w = l ? $r.projectionMercator : g.shaderPreludeCode, + C = l ? Cn : g.shaderDefine, + P = + e + + (i ? i.cacheKey : "") + + `/${l ? Gn : g.shaderVariantName}` + + (this._showOverdrawInspector ? "/overdraw" : "") + + (d ? "/terrain" : "") + + (u ? `/${u.join("/")}` : ""); + return ( + this.cache[P] || + (this.cache[P] = new Dc( + this.context, + $r[e], + i, + jc[e], + this._showOverdrawInspector, + d, + w, + C, + u + )), + this.cache[P] + ); + } + 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 e = this.context.gl; + this.context.cullFace.set(!1), + this.context.viewport.set([0, 0, this.width, this.height]), + this.context.blendEquation.set(e.FUNC_ADD); + } + initDebugOverlayCanvas() { + this.debugOverlayCanvas == null && + ((this.debugOverlayCanvas = + document.createElement("canvas")), + (this.debugOverlayCanvas.width = 512), + (this.debugOverlayCanvas.height = 512), + (this.debugOverlayTexture = new s.T( + this.context, + this.debugOverlayCanvas, + this.context.gl.RGBA + ))); + } + destroy() { + this.debugOverlayTexture && + this.debugOverlayTexture.destroy(); + } + overLimit() { + const { drawingBufferWidth: e, drawingBufferHeight: i } = + this.context.gl; + return this.width !== e || this.height !== i; + } + } + function Fo(h, e) { + let i, + l = !1, + u = null, + d = null; + const g = () => { + (u = null), + l && (h.apply(d, i), (u = setTimeout(g, e)), (l = !1)); + }; + return (...w) => ((l = !0), (d = this), (i = w), u || g(), u); + } + class Fl { + constructor(e) { + (this._getCurrentHash = () => { + const i = window.location.hash.replace("#", ""); + if (this._hashName) { + let l; + return ( + i + .split("&") + .map((u) => u.split("=")) + .forEach((u) => { + u[0] === this._hashName && (l = u); + }), + ((l && l[1]) || "").split("/") + ); + } + return i.split("/"); + }), + (this._onHashChange = () => { + const i = this._getCurrentHash(); + if (!this._isValidHash(i)) return !1; + const l = + this._map.dragRotate.isEnabled() && + this._map.touchZoomRotate.isEnabled() + ? +(i[3] || 0) + : this._map.getBearing(); + return ( + this._map.jumpTo({ + center: [+i[2], +i[1]], + zoom: +i[0], + bearing: l, + pitch: +(i[4] || 0), + }), + !0 + ); + }), + (this._updateHashUnthrottled = () => { + const i = window.location.href.replace( + /(#.*)?$/, + this.getHashString() + ); + window.history.replaceState( + window.history.state, + null, + i + ); + }), + (this._removeHash = () => { + const i = this._getCurrentHash(); + if (i.length === 0) return; + const l = i.join("/"); + let u = l; + u.split("&").length > 0 && (u = u.split("&")[0]), + this._hashName && (u = `${this._hashName}=${l}`); + let d = window.location.hash.replace(u, ""); + d.startsWith("#&") + ? (d = d.slice(0, 1) + d.slice(2)) + : d === "#" && (d = ""); + let g = window.location.href.replace(/(#.+)?$/, d); + (g = g.replace("&&", "&")), + window.history.replaceState( + window.history.state, + null, + g + ); + }), + (this._updateHash = Fo(this._updateHashUnthrottled, 300)), + (this._hashName = e && encodeURIComponent(e)); + } + addTo(e) { + return ( + (this._map = e), + 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(e) { + const i = this._map.getCenter(), + l = Math.round(100 * this._map.getZoom()) / 100, + u = Math.ceil( + (l * Math.LN2 + Math.log(512 / 360 / 0.5)) / Math.LN10 + ), + d = Math.pow(10, u), + g = Math.round(i.lng * d) / d, + w = Math.round(i.lat * d) / d, + C = this._map.getBearing(), + P = this._map.getPitch(); + let E = ""; + if ( + ((E += e ? `/${g}/${w}/${l}` : `${l}/${w}/${g}`), + (C || P) && (E += "/" + Math.round(10 * C) / 10), + P && (E += `/${Math.round(P)}`), + this._hashName) + ) { + const R = this._hashName; + let D = !1; + const N = window.location.hash + .slice(1) + .split("&") + .map((G) => { + const te = G.split("=")[0]; + return te === R ? ((D = !0), `${te}=${E}`) : G; + }) + .filter((G) => G); + return D || N.push(`${R}=${E}`), `#${N.join("&")}`; + } + return `#${E}`; + } + _isValidHash(e) { + if (e.length < 3 || e.some(isNaN)) return !1; + try { + new s.S(+e[2], +e[1]); + } catch { + return !1; + } + const i = +e[0], + l = +(e[3] || 0), + u = +(e[4] || 0); + return ( + i >= this._map.getMinZoom() && + i <= this._map.getMaxZoom() && + l >= -180 && + l <= 180 && + u >= this._map.getMinPitch() && + u <= this._map.getMaxPitch() + ); + } + } + const to = { linearity: 0.3, easing: s.cm(0, 0, 0.3, 1) }, + tu = s.e({ deceleration: 2500, maxSpeed: 1400 }, to), + ld = s.e({ deceleration: 20, maxSpeed: 1400 }, to), + cd = s.e({ deceleration: 1e3, maxSpeed: 360 }, to), + ud = s.e({ deceleration: 1e3, maxSpeed: 90 }, to), + hd = s.e({ deceleration: 1e3, maxSpeed: 360 }, to); + class dd { + constructor(e) { + (this._map = e), this.clear(); + } + clear() { + this._inertiaBuffer = []; + } + record(e) { + this._drainInertiaBuffer(), + this._inertiaBuffer.push({ time: ne.now(), settings: e }); + } + _drainInertiaBuffer() { + const e = this._inertiaBuffer, + i = ne.now(); + for (; e.length > 0 && i - e[0].time > 160; ) e.shift(); + } + _onMoveEnd(e) { + if ( + (this._drainInertiaBuffer(), this._inertiaBuffer.length < 2) + ) + return; + const i = { + zoom: 0, + bearing: 0, + pitch: 0, + roll: 0, + pan: new s.P(0, 0), + pinchAround: void 0, + around: void 0, + }; + for (const { settings: d } of this._inertiaBuffer) + (i.zoom += d.zoomDelta || 0), + (i.bearing += d.bearingDelta || 0), + (i.pitch += d.pitchDelta || 0), + (i.roll += d.rollDelta || 0), + d.panDelta && i.pan._add(d.panDelta), + d.around && (i.around = d.around), + d.pinchAround && (i.pinchAround = d.pinchAround); + const l = + this._inertiaBuffer[this._inertiaBuffer.length - 1].time - + this._inertiaBuffer[0].time, + u = {}; + if (i.pan.mag()) { + const d = ns(i.pan.mag(), l, s.e({}, tu, e || {})), + g = i.pan.mult(d.amount / i.pan.mag()), + w = this._map.cameraHelper.handlePanInertia( + g, + this._map.transform + ); + (u.center = w.easingCenter), + (u.offset = w.easingOffset), + Ia(u, d); + } + if (i.zoom) { + const d = ns(i.zoom, l, ld); + (u.zoom = this._map.transform.zoom + d.amount), Ia(u, d); + } + if (i.bearing) { + const d = ns(i.bearing, l, cd); + (u.bearing = + this._map.transform.bearing + s.ah(d.amount, -179, 179)), + Ia(u, d); + } + if (i.pitch) { + const d = ns(i.pitch, l, ud); + (u.pitch = this._map.transform.pitch + d.amount), Ia(u, d); + } + if (i.roll) { + const d = ns(i.roll, l, hd); + (u.roll = + this._map.transform.roll + s.ah(d.amount, -179, 179)), + Ia(u, d); + } + if (u.zoom || u.bearing) { + const d = + i.pinchAround === void 0 ? i.around : i.pinchAround; + u.around = d + ? this._map.unproject(d) + : this._map.getCenter(); + } + return this.clear(), s.e(u, { noMoveStart: !0 }); + } + } + function Ia(h, e) { + (!h.duration || h.duration < e.duration) && + ((h.duration = e.duration), (h.easing = e.easing)); + } + function ns(h, e, i) { + const { maxSpeed: l, linearity: u, deceleration: d } = i, + g = s.ah((h * u) / (e / 1e3), -l, l), + w = Math.abs(g) / (d * u); + return { + easing: i.easing, + duration: 1e3 * w, + amount: g * (w / 2), + }; + } + class Qi extends s.l { + preventDefault() { + this._defaultPrevented = !0; + } + get defaultPrevented() { + return this._defaultPrevented; + } + constructor(e, i, l, u = {}) { + l = l instanceof MouseEvent ? l : new MouseEvent(e, l); + const d = H.mousePos(i.getCanvas(), l), + g = i.unproject(d); + super(e, s.e({ point: d, lngLat: g, originalEvent: l }, u)), + (this._defaultPrevented = !1), + (this.target = i); + } + } + class is extends s.l { + preventDefault() { + this._defaultPrevented = !0; + } + get defaultPrevented() { + return this._defaultPrevented; + } + constructor(e, i, l) { + const u = e === "touchend" ? l.changedTouches : l.touches, + d = H.touchPos(i.getCanvasContainer(), u), + g = d.map((C) => i.unproject(C)), + w = d.reduce( + (C, P, E, R) => C.add(P.div(R.length)), + new s.P(0, 0) + ); + super(e, { + points: d, + point: w, + lngLats: g, + lngLat: i.unproject(w), + originalEvent: l, + }), + (this._defaultPrevented = !1); + } + } + class ru extends s.l { + preventDefault() { + this._defaultPrevented = !0; + } + get defaultPrevented() { + return this._defaultPrevented; + } + constructor(e, i, l) { + super(e, { originalEvent: l }), (this._defaultPrevented = !1); + } + } + class pd { + constructor(e, i) { + (this._map = e), (this._clickTolerance = i.clickTolerance); + } + reset() { + delete this._mousedownPos; + } + wheel(e) { + return this._firePreventable(new ru(e.type, this._map, e)); + } + mousedown(e, i) { + return ( + (this._mousedownPos = i), + this._firePreventable(new Qi(e.type, this._map, e)) + ); + } + mouseup(e) { + this._map.fire(new Qi(e.type, this._map, e)); + } + click(e, i) { + (this._mousedownPos && + this._mousedownPos.dist(i) >= this._clickTolerance) || + this._map.fire(new Qi(e.type, this._map, e)); + } + dblclick(e) { + return this._firePreventable(new Qi(e.type, this._map, e)); + } + mouseover(e) { + this._map.fire(new Qi(e.type, this._map, e)); + } + mouseout(e) { + this._map.fire(new Qi(e.type, this._map, e)); + } + touchstart(e) { + return this._firePreventable(new is(e.type, this._map, e)); + } + touchmove(e) { + this._map.fire(new is(e.type, this._map, e)); + } + touchend(e) { + this._map.fire(new is(e.type, this._map, e)); + } + touchcancel(e) { + this._map.fire(new is(e.type, this._map, e)); + } + _firePreventable(e) { + if ((this._map.fire(e), e.defaultPrevented)) return {}; + } + isEnabled() { + return !0; + } + isActive() { + return !1; + } + enable() {} + disable() {} + } + class fd { + constructor(e) { + this._map = e; + } + reset() { + (this._delayContextMenu = !1), + (this._ignoreContextMenu = !0), + delete this._contextMenuEvent; + } + mousemove(e) { + this._map.fire(new Qi(e.type, this._map, e)); + } + mousedown() { + (this._delayContextMenu = !0), (this._ignoreContextMenu = !1); + } + mouseup() { + (this._delayContextMenu = !1), + this._contextMenuEvent && + (this._map.fire( + new Qi("contextmenu", this._map, this._contextMenuEvent) + ), + delete this._contextMenuEvent); + } + contextmenu(e) { + this._delayContextMenu + ? (this._contextMenuEvent = e) + : this._ignoreContextMenu || + this._map.fire(new Qi(e.type, this._map, e)), + this._map.listens("contextmenu") && e.preventDefault(); + } + isEnabled() { + return !0; + } + isActive() { + return !1; + } + enable() {} + disable() {} + } + class as { + constructor(e) { + this._map = e; + } + 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(e) { + return this.transform.screenPointToLocation( + s.P.convert(e), + this._map.terrain + ); + } + } + class nu { + constructor(e, i) { + (this._map = e), + (this._tr = new as(e)), + (this._el = e.getCanvasContainer()), + (this._container = e.getContainer()), + (this._clickTolerance = i.clickTolerance || 1); + } + isEnabled() { + return !!this._enabled; + } + isActive() { + return !!this._active; + } + enable() { + this.isEnabled() || (this._enabled = !0); + } + disable() { + this.isEnabled() && (this._enabled = !1); + } + mousedown(e, i) { + this.isEnabled() && + e.shiftKey && + e.button === 0 && + (H.disableDrag(), + (this._startPos = this._lastPos = i), + (this._active = !0)); + } + mousemoveWindow(e, i) { + if (!this._active) return; + const l = i; + if ( + this._lastPos.equals(l) || + (!this._box && + l.dist(this._startPos) < this._clickTolerance) + ) + return; + const u = this._startPos; + (this._lastPos = l), + this._box || + ((this._box = H.create( + "div", + "maplibregl-boxzoom", + this._container + )), + this._container.classList.add("maplibregl-crosshair"), + this._fireEvent("boxzoomstart", e)); + const d = Math.min(u.x, l.x), + g = Math.max(u.x, l.x), + w = Math.min(u.y, l.y), + C = Math.max(u.y, l.y); + H.setTransform(this._box, `translate(${d}px,${w}px)`), + (this._box.style.width = g - d + "px"), + (this._box.style.height = C - w + "px"); + } + mouseupWindow(e, i) { + if (!this._active || e.button !== 0) return; + const l = this._startPos, + u = i; + if ( + (this.reset(), + H.suppressClick(), + l.x !== u.x || l.y !== u.y) + ) + return ( + this._map.fire( + new s.l("boxzoomend", { originalEvent: e }) + ), + { + cameraAnimation: (d) => + d.fitScreenCoordinates(l, u, this._tr.bearing, { + linear: !0, + }), + } + ); + this._fireEvent("boxzoomcancel", e); + } + keydown(e) { + this._active && + e.keyCode === 27 && + (this.reset(), this._fireEvent("boxzoomcancel", e)); + } + reset() { + (this._active = !1), + this._container.classList.remove("maplibregl-crosshair"), + this._box && (H.remove(this._box), (this._box = null)), + H.enableDrag(), + delete this._startPos, + delete this._lastPos; + } + _fireEvent(e, i) { + return this._map.fire(new s.l(e, { originalEvent: i })); + } + } + function os(h, e) { + if (h.length !== e.length) + throw new Error( + `The number of touches and points are not equal - touches ${h.length}, points ${e.length}` + ); + const i = {}; + for (let l = 0; l < h.length; l++) i[h[l].identifier] = e[l]; + return i; + } + class md { + constructor(e) { + this.reset(), (this.numTouches = e.numTouches); + } + reset() { + delete this.centroid, + delete this.startTime, + delete this.touches, + (this.aborted = !1); + } + touchstart(e, i, l) { + (this.centroid || l.length > this.numTouches) && + (this.aborted = !0), + this.aborted || + (this.startTime === void 0 && + (this.startTime = e.timeStamp), + l.length === this.numTouches && + ((this.centroid = (function (u) { + const d = new s.P(0, 0); + for (const g of u) d._add(g); + return d.div(u.length); + })(i)), + (this.touches = os(l, i)))); + } + touchmove(e, i, l) { + if (this.aborted || !this.centroid) return; + const u = os(l, i); + for (const d in this.touches) { + const g = u[d]; + (!g || g.dist(this.touches[d]) > 30) && (this.aborted = !0); + } + } + touchend(e, i, l) { + if ( + ((!this.centroid || e.timeStamp - this.startTime > 500) && + (this.aborted = !0), + l.length === 0) + ) { + const u = !this.aborted && this.centroid; + if ((this.reset(), u)) return u; + } + } + } + class ea { + constructor(e) { + (this.singleTap = new md(e)), + (this.numTaps = e.numTaps), + this.reset(); + } + reset() { + (this.lastTime = 1 / 0), + delete this.lastTap, + (this.count = 0), + this.singleTap.reset(); + } + touchstart(e, i, l) { + this.singleTap.touchstart(e, i, l); + } + touchmove(e, i, l) { + this.singleTap.touchmove(e, i, l); + } + touchend(e, i, l) { + const u = this.singleTap.touchend(e, i, l); + if (u) { + const d = e.timeStamp - this.lastTime < 500, + g = !this.lastTap || this.lastTap.dist(u) < 30; + if ( + ((d && g) || this.reset(), + this.count++, + (this.lastTime = e.timeStamp), + (this.lastTap = u), + this.count === this.numTaps) + ) + return this.reset(), u; + } + } + } + class Ma { + constructor(e) { + (this._tr = new as(e)), + (this._zoomIn = new ea({ numTouches: 1, numTaps: 2 })), + (this._zoomOut = new ea({ numTouches: 2, numTaps: 1 })), + this.reset(); + } + reset() { + (this._active = !1), + this._zoomIn.reset(), + this._zoomOut.reset(); + } + touchstart(e, i, l) { + this._zoomIn.touchstart(e, i, l), + this._zoomOut.touchstart(e, i, l); + } + touchmove(e, i, l) { + this._zoomIn.touchmove(e, i, l), + this._zoomOut.touchmove(e, i, l); + } + touchend(e, i, l) { + const u = this._zoomIn.touchend(e, i, l), + d = this._zoomOut.touchend(e, i, l), + g = this._tr; + return u + ? ((this._active = !0), + e.preventDefault(), + setTimeout(() => this.reset(), 0), + { + cameraAnimation: (w) => + w.easeTo( + { + duration: 300, + zoom: g.zoom + 1, + around: g.unproject(u), + }, + { originalEvent: e } + ), + }) + : d + ? ((this._active = !0), + e.preventDefault(), + setTimeout(() => this.reset(), 0), + { + cameraAnimation: (w) => + w.easeTo( + { + duration: 300, + zoom: g.zoom - 1, + around: g.unproject(d), + }, + { originalEvent: e } + ), + }) + : void 0; + } + touchcancel() { + this.reset(); + } + enable() { + this._enabled = !0; + } + disable() { + (this._enabled = !1), this.reset(); + } + isEnabled() { + return this._enabled; + } + isActive() { + return this._active; + } + } + class ss { + constructor(e) { + (this._enabled = !!e.enable), + (this._moveStateManager = e.moveStateManager), + (this._clickTolerance = e.clickTolerance || 1), + (this._moveFunction = e.move), + (this._activateOnStart = !!e.activateOnStart), + e.assignEvents(this), + this.reset(); + } + reset(e) { + (this._active = !1), + (this._moved = !1), + delete this._lastPoint, + this._moveStateManager.endMove(e); + } + _move(...e) { + const i = this._moveFunction(...e); + if ( + i.bearingDelta || + i.pitchDelta || + i.rollDelta || + i.around || + i.panDelta + ) + return (this._active = !0), i; + } + dragStart(e, i) { + this.isEnabled() && + !this._lastPoint && + this._moveStateManager.isValidStartEvent(e) && + (this._moveStateManager.startMove(e), + (this._lastPoint = Array.isArray(i) ? i[0] : i), + this._activateOnStart && + this._lastPoint && + (this._active = !0)); + } + dragMove(e, i) { + if (!this.isEnabled()) return; + const l = this._lastPoint; + if (!l) return; + if ( + (e.preventDefault(), + !this._moveStateManager.isValidMoveEvent(e)) + ) + return void this.reset(e); + const u = Array.isArray(i) ? i[0] : i; + return !this._moved && u.dist(l) < this._clickTolerance + ? void 0 + : ((this._moved = !0), + (this._lastPoint = u), + this._move(l, u)); + } + dragEnd(e) { + this.isEnabled() && + this._lastPoint && + this._moveStateManager.isValidEndEvent(e) && + (this._moved && H.suppressClick(), this.reset(e)); + } + enable() { + this._enabled = !0; + } + disable() { + (this._enabled = !1), this.reset(); + } + isEnabled() { + return this._enabled; + } + isActive() { + return this._active; + } + getClickTolerance() { + return this._clickTolerance; + } + } + const ka = 0, + ls = 2, + jp = { [ka]: 1, [ls]: 2 }; + class Ws { + constructor(e) { + this._correctEvent = e.checkCorrectEvent; + } + startMove(e) { + const i = H.mouseButton(e); + this._eventButton = i; + } + endMove(e) { + delete this._eventButton; + } + isValidStartEvent(e) { + return this._correctEvent(e); + } + isValidMoveEvent(e) { + return !(function (i, l) { + const u = jp[l]; + return i.buttons === void 0 || (i.buttons & u) !== u; + })(e, this._eventButton); + } + isValidEndEvent(e) { + return H.mouseButton(e) === this._eventButton; + } + } + class Vp { + constructor() { + this._firstTouch = void 0; + } + _isOneFingerTouch(e) { + return e.targetTouches.length === 1; + } + _isSameTouchEvent(e) { + return e.targetTouches[0].identifier === this._firstTouch; + } + startMove(e) { + this._firstTouch = e.targetTouches[0].identifier; + } + endMove(e) { + delete this._firstTouch; + } + isValidStartEvent(e) { + return this._isOneFingerTouch(e); + } + isValidMoveEvent(e) { + return this._isOneFingerTouch(e) && this._isSameTouchEvent(e); + } + isValidEndEvent(e) { + return this._isOneFingerTouch(e) && this._isSameTouchEvent(e); + } + } + class qp { + constructor( + e = new Ws({ checkCorrectEvent: () => !0 }), + i = new Vp() + ) { + (this.mouseMoveStateManager = e), + (this.oneFingerTouchMoveStateManager = i); + } + _executeRelevantHandler(e, i, l) { + return e instanceof MouseEvent + ? i(e) + : typeof TouchEvent < "u" && e instanceof TouchEvent + ? l(e) + : void 0; + } + startMove(e) { + this._executeRelevantHandler( + e, + (i) => this.mouseMoveStateManager.startMove(i), + (i) => this.oneFingerTouchMoveStateManager.startMove(i) + ); + } + endMove(e) { + this._executeRelevantHandler( + e, + (i) => this.mouseMoveStateManager.endMove(i), + (i) => this.oneFingerTouchMoveStateManager.endMove(i) + ); + } + isValidStartEvent(e) { + return this._executeRelevantHandler( + e, + (i) => this.mouseMoveStateManager.isValidStartEvent(i), + (i) => + this.oneFingerTouchMoveStateManager.isValidStartEvent(i) + ); + } + isValidMoveEvent(e) { + return this._executeRelevantHandler( + e, + (i) => this.mouseMoveStateManager.isValidMoveEvent(i), + (i) => + this.oneFingerTouchMoveStateManager.isValidMoveEvent(i) + ); + } + isValidEndEvent(e) { + return this._executeRelevantHandler( + e, + (i) => this.mouseMoveStateManager.isValidEndEvent(i), + (i) => + this.oneFingerTouchMoveStateManager.isValidEndEvent(i) + ); + } + } + const Xs = (h) => { + (h.mousedown = h.dragStart), + (h.mousemoveWindow = h.dragMove), + (h.mouseup = h.dragEnd), + (h.contextmenu = (e) => { + e.preventDefault(); + }); + }; + class Ys { + constructor(e, i) { + (this._clickTolerance = e.clickTolerance || 1), + (this._map = i), + this.reset(); + } + reset() { + (this._active = !1), + (this._touches = {}), + (this._sum = new s.P(0, 0)); + } + _shouldBePrevented(e) { + return ( + e < (this._map.cooperativeGestures.isEnabled() ? 2 : 1) + ); + } + touchstart(e, i, l) { + return this._calculateTransform(e, i, l); + } + touchmove(e, i, l) { + if (this._active) { + if (!this._shouldBePrevented(l.length)) + return ( + e.preventDefault(), this._calculateTransform(e, i, l) + ); + this._map.cooperativeGestures.notifyGestureBlocked( + "touch_pan", + e + ); + } + } + touchend(e, i, l) { + this._calculateTransform(e, i, l), + this._active && + this._shouldBePrevented(l.length) && + this.reset(); + } + touchcancel() { + this.reset(); + } + _calculateTransform(e, i, l) { + l.length > 0 && (this._active = !0); + const u = os(l, i), + d = new s.P(0, 0), + g = new s.P(0, 0); + let w = 0; + for (const P in u) { + const E = u[P], + R = this._touches[P]; + R && (d._add(E), g._add(E.sub(R)), w++, (u[P] = E)); + } + if ( + ((this._touches = u), + this._shouldBePrevented(w) || !g.mag()) + ) + return; + const C = g.div(w); + return ( + this._sum._add(C), + this._sum.mag() < this._clickTolerance + ? void 0 + : { around: d.div(w), panDelta: C } + ); + } + enable() { + this._enabled = !0; + } + disable() { + (this._enabled = !1), this.reset(); + } + isEnabled() { + return this._enabled; + } + isActive() { + return this._active; + } + } + class Aa { + constructor() { + this.reset(); + } + reset() { + (this._active = !1), delete this._firstTwoTouches; + } + touchstart(e, i, l) { + this._firstTwoTouches || + l.length < 2 || + ((this._firstTwoTouches = [ + l[0].identifier, + l[1].identifier, + ]), + this._start([i[0], i[1]])); + } + touchmove(e, i, l) { + if (!this._firstTwoTouches) return; + e.preventDefault(); + const [u, d] = this._firstTwoTouches, + g = ir(l, i, u), + w = ir(l, i, d); + if (!g || !w) return; + const C = this._aroundCenter ? null : g.add(w).div(2); + return this._move([g, w], C, e); + } + touchend(e, i, l) { + if (!this._firstTwoTouches) return; + const [u, d] = this._firstTwoTouches, + g = ir(l, i, u), + w = ir(l, i, d); + (g && w) || (this._active && H.suppressClick(), this.reset()); + } + touchcancel() { + this.reset(); + } + enable(e) { + (this._enabled = !0), + (this._aroundCenter = !!e && e.around === "center"); + } + disable() { + (this._enabled = !1), this.reset(); + } + isEnabled() { + return !!this._enabled; + } + isActive() { + return !!this._active; + } + } + function ir(h, e, i) { + for (let l = 0; l < h.length; l++) + if (h[l].identifier === i) return e[l]; + } + function iu(h, e) { + return Math.log(h / e) / Math.LN2; + } + class Ol extends Aa { + reset() { + super.reset(), + delete this._distance, + delete this._startDistance; + } + _start(e) { + this._startDistance = this._distance = e[0].dist(e[1]); + } + _move(e, i) { + const l = this._distance; + if ( + ((this._distance = e[0].dist(e[1])), + this._active || + !( + Math.abs(iu(this._distance, this._startDistance)) < 0.1 + )) + ) + return ( + (this._active = !0), + { zoomDelta: iu(this._distance, l), pinchAround: i } + ); + } + } + function au(h, e) { + return (180 * h.angleWith(e)) / Math.PI; + } + class cs extends Aa { + reset() { + super.reset(), + delete this._minDiameter, + delete this._startVector, + delete this._vector; + } + _start(e) { + (this._startVector = this._vector = e[0].sub(e[1])), + (this._minDiameter = e[0].dist(e[1])); + } + _move(e, i, l) { + const u = this._vector; + if ( + ((this._vector = e[0].sub(e[1])), + this._active || !this._isBelowThreshold(this._vector)) + ) + return ( + (this._active = !0), + { bearingDelta: au(this._vector, u), pinchAround: i } + ); + } + _isBelowThreshold(e) { + this._minDiameter = Math.min(this._minDiameter, e.mag()); + const i = (25 / (Math.PI * this._minDiameter)) * 360, + l = au(e, this._startVector); + return Math.abs(l) < i; + } + } + function Oo(h) { + return Math.abs(h.y) > Math.abs(h.x); + } + class Nl extends Aa { + constructor(e) { + super(), (this._currentTouchCount = 0), (this._map = e); + } + reset() { + super.reset(), + (this._valid = void 0), + delete this._firstMove, + delete this._lastPoints; + } + touchstart(e, i, l) { + super.touchstart(e, i, l), + (this._currentTouchCount = l.length); + } + _start(e) { + (this._lastPoints = e), + Oo(e[0].sub(e[1])) && (this._valid = !1); + } + _move(e, i, l) { + if ( + this._map.cooperativeGestures.isEnabled() && + this._currentTouchCount < 3 + ) + return; + const u = e[0].sub(this._lastPoints[0]), + d = e[1].sub(this._lastPoints[1]); + return ( + (this._valid = this.gestureBeginsVertically( + u, + d, + l.timeStamp + )), + this._valid + ? ((this._lastPoints = e), + (this._active = !0), + { pitchDelta: ((u.y + d.y) / 2) * -0.5 }) + : void 0 + ); + } + gestureBeginsVertically(e, i, l) { + if (this._valid !== void 0) return this._valid; + const u = e.mag() >= 2, + d = i.mag() >= 2; + if (!u && !d) return; + if (!u || !d) + return ( + this._firstMove === void 0 && (this._firstMove = l), + l - this._firstMove < 100 && void 0 + ); + const g = e.y > 0 == i.y > 0; + return Oo(e) && Oo(i) && g; + } + } + const hn = { panStep: 100, bearingStep: 15, pitchStep: 10 }; + class jl { + constructor(e) { + this._tr = new as(e); + const i = hn; + (this._panStep = i.panStep), + (this._bearingStep = i.bearingStep), + (this._pitchStep = i.pitchStep), + (this._rotationDisabled = !1); + } + reset() { + this._active = !1; + } + keydown(e) { + if (e.altKey || e.ctrlKey || e.metaKey) return; + let i = 0, + l = 0, + u = 0, + d = 0, + g = 0; + switch (e.keyCode) { + case 61: + case 107: + case 171: + case 187: + i = 1; + break; + case 189: + case 109: + case 173: + i = -1; + break; + case 37: + e.shiftKey ? (l = -1) : (e.preventDefault(), (d = -1)); + break; + case 39: + e.shiftKey ? (l = 1) : (e.preventDefault(), (d = 1)); + break; + case 38: + e.shiftKey ? (u = 1) : (e.preventDefault(), (g = -1)); + break; + case 40: + e.shiftKey ? (u = -1) : (e.preventDefault(), (g = 1)); + break; + default: + return; + } + return ( + this._rotationDisabled && ((l = 0), (u = 0)), + { + cameraAnimation: (w) => { + const C = this._tr; + w.easeTo( + { + duration: 300, + easeId: "keyboardHandler", + easing: Zp, + zoom: i + ? Math.round(C.zoom) + i * (e.shiftKey ? 2 : 1) + : C.zoom, + bearing: C.bearing + l * this._bearingStep, + pitch: C.pitch + u * this._pitchStep, + offset: [-d * this._panStep, -g * this._panStep], + center: C.center, + }, + { originalEvent: e } + ); + }, + } + ); + } + 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 Zp(h) { + return h * (2 - h); + } + const Vl = 4.000244140625, + Up = 1 / 450; + class _d { + constructor(e, i) { + (this._onTimeout = (l) => { + (this._type = "wheel"), + (this._delta -= this._lastValue), + this._active || this._start(l); + }), + (this._map = e), + (this._tr = new as(e)), + (this._triggerRenderFrame = i), + (this._delta = 0), + (this._defaultZoomRate = 0.01), + (this._wheelZoomRate = Up); + } + setZoomRate(e) { + this._defaultZoomRate = e; + } + setWheelZoomRate(e) { + this._wheelZoomRate = e; + } + isEnabled() { + return !!this._enabled; + } + isActive() { + return !!this._active || this._finishTimeout !== void 0; + } + isZooming() { + return !!this._zooming; + } + enable(e) { + this.isEnabled() || + ((this._enabled = !0), + (this._aroundCenter = !!e && e.around === "center")); + } + disable() { + this.isEnabled() && (this._enabled = !1); + } + _shouldBePrevented(e) { + return ( + !!this._map.cooperativeGestures.isEnabled() && + !(e.ctrlKey || this._map.cooperativeGestures.isBypassed(e)) + ); + } + wheel(e) { + if (!this.isEnabled()) return; + if (this._shouldBePrevented(e)) + return void this._map.cooperativeGestures.notifyGestureBlocked( + "wheel_zoom", + e + ); + let i = + e.deltaMode === WheelEvent.DOM_DELTA_LINE + ? 40 * e.deltaY + : e.deltaY; + const l = ne.now(), + u = l - (this._lastWheelEventTime || 0); + (this._lastWheelEventTime = l), + i !== 0 && i % Vl == 0 + ? (this._type = "wheel") + : i !== 0 && Math.abs(i) < 4 + ? (this._type = "trackpad") + : u > 400 + ? ((this._type = null), + (this._lastValue = i), + (this._timeout = setTimeout(this._onTimeout, 40, e))) + : this._type || + ((this._type = + Math.abs(u * i) < 200 ? "trackpad" : "wheel"), + this._timeout && + (clearTimeout(this._timeout), + (this._timeout = null), + (i += this._lastValue))), + e.shiftKey && i && (i /= 4), + this._type && + ((this._lastWheelEvent = e), + (this._delta -= i), + this._active || this._start(e)), + e.preventDefault(); + } + _start(e) { + if (!this._delta) return; + this._frameId && (this._frameId = null), + (this._active = !0), + this.isZooming() || (this._zooming = !0), + this._finishTimeout && + (clearTimeout(this._finishTimeout), + delete this._finishTimeout); + const i = H.mousePos(this._map.getCanvas(), e), + l = this._tr; + (this._aroundPoint = this._aroundCenter + ? l.transform.locationToScreenPoint(s.S.convert(l.center)) + : i), + this._frameId || + ((this._frameId = !0), this._triggerRenderFrame()); + } + renderFrame() { + if ( + !this._frameId || + ((this._frameId = null), !this.isActive()) + ) + return; + const e = this._tr.transform; + if (typeof this._lastExpectedZoom == "number") { + const w = e.zoom - this._lastExpectedZoom; + typeof this._startZoom == "number" && + (this._startZoom += w), + typeof this._targetZoom == "number" && + (this._targetZoom += w); + } + if (this._delta !== 0) { + const w = + this._type === "wheel" && Math.abs(this._delta) > Vl + ? this._wheelZoomRate + : this._defaultZoomRate; + let C = 2 / (1 + Math.exp(-Math.abs(this._delta * w))); + this._delta < 0 && C !== 0 && (C = 1 / C); + const P = + typeof this._targetZoom != "number" + ? e.scale + : s.af(this._targetZoom); + (this._targetZoom = e.getConstrained( + e.getCameraLngLat(), + s.ak(P * C) + ).zoom), + this._type === "wheel" && + ((this._startZoom = e.zoom), + (this._easing = this._smoothOutEasing(200))), + (this._delta = 0); + } + const i = + typeof this._targetZoom != "number" + ? e.zoom + : this._targetZoom, + l = this._startZoom, + u = this._easing; + let d, + g = !1; + if (this._type === "wheel" && l && u) { + const w = ne.now() - this._lastWheelEventTime, + C = Math.min((w + 5) / 200, 1), + P = u(C); + (d = s.C.number(l, i, P)), + C < 1 ? this._frameId || (this._frameId = !0) : (g = !0); + } else (d = i), (g = !0); + return ( + (this._active = !0), + g && + ((this._active = !1), + (this._finishTimeout = setTimeout(() => { + (this._zooming = !1), + this._triggerRenderFrame(), + delete this._targetZoom, + delete this._lastExpectedZoom, + delete this._finishTimeout; + }, 200))), + (this._lastExpectedZoom = d), + { + noInertia: !0, + needsRenderFrame: !g, + zoomDelta: d - e.zoom, + around: this._aroundPoint, + originalEvent: this._lastWheelEvent, + } + ); + } + _smoothOutEasing(e) { + let i = s.co; + if (this._prevEase) { + const l = this._prevEase, + u = (ne.now() - l.start) / l.duration, + d = l.easing(u + 0.01) - l.easing(u), + g = (0.27 / Math.sqrt(d * d + 1e-4)) * 0.01, + w = Math.sqrt(0.0729 - g * g); + i = s.cm(g, w, 0.25, 1); + } + return ( + (this._prevEase = { + start: ne.now(), + duration: e, + easing: i, + }), + i + ); + } + reset() { + (this._active = !1), + (this._zooming = !1), + delete this._targetZoom, + delete this._lastExpectedZoom, + this._finishTimeout && + (clearTimeout(this._finishTimeout), + delete this._finishTimeout); + } + } + class ou { + constructor(e, i) { + (this._clickZoom = e), (this._tapZoom = i); + } + 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 su { + constructor(e) { + (this._tr = new as(e)), this.reset(); + } + reset() { + this._active = !1; + } + dblclick(e, i) { + return ( + e.preventDefault(), + { + cameraAnimation: (l) => { + l.easeTo( + { + duration: 300, + zoom: this._tr.zoom + (e.shiftKey ? -1 : 1), + around: this._tr.unproject(i), + }, + { originalEvent: e } + ); + }, + } + ); + } + enable() { + this._enabled = !0; + } + disable() { + (this._enabled = !1), this.reset(); + } + isEnabled() { + return this._enabled; + } + isActive() { + return this._active; + } + } + class gd { + constructor() { + (this._tap = new ea({ numTouches: 1, numTaps: 1 })), + this.reset(); + } + reset() { + (this._active = !1), + delete this._swipePoint, + delete this._swipeTouch, + delete this._tapTime, + delete this._tapPoint, + this._tap.reset(); + } + touchstart(e, i, l) { + if (!this._swipePoint) + if (this._tapTime) { + const u = i[0], + d = e.timeStamp - this._tapTime < 500, + g = this._tapPoint.dist(u) < 30; + d && g + ? l.length > 0 && + ((this._swipePoint = u), + (this._swipeTouch = l[0].identifier)) + : this.reset(); + } else this._tap.touchstart(e, i, l); + } + touchmove(e, i, l) { + if (this._tapTime) { + if (this._swipePoint) { + if (l[0].identifier !== this._swipeTouch) return; + const u = i[0], + d = u.y - this._swipePoint.y; + return ( + (this._swipePoint = u), + e.preventDefault(), + (this._active = !0), + { zoomDelta: d / 128 } + ); + } + } else this._tap.touchmove(e, i, l); + } + touchend(e, i, l) { + if (this._tapTime) + this._swipePoint && l.length === 0 && this.reset(); + else { + const u = this._tap.touchend(e, i, l); + u && ((this._tapTime = e.timeStamp), (this._tapPoint = u)); + } + } + touchcancel() { + this.reset(); + } + enable() { + this._enabled = !0; + } + disable() { + (this._enabled = !1), this.reset(); + } + isEnabled() { + return this._enabled; + } + isActive() { + return this._active; + } + } + class vd { + constructor(e, i, l) { + (this._el = e), (this._mousePan = i), (this._touchPan = l); + } + enable(e) { + (this._inertiaOptions = e || {}), + 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 lu { + constructor(e, i, l, u) { + (this._pitchWithRotate = e.pitchWithRotate), + (this._rollEnabled = e.rollEnabled), + (this._mouseRotate = i), + (this._mousePitch = l), + (this._mouseRoll = u); + } + 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 yd { + constructor(e, i, l, u) { + (this._el = e), + (this._touchZoom = i), + (this._touchRotate = l), + (this._tapDragZoom = u), + (this._rotationDisabled = !1), + (this._enabled = !0); + } + enable(e) { + this._touchZoom.enable(e), + this._rotationDisabled || this._touchRotate.enable(e), + 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() + ); + } + disableRotation() { + (this._rotationDisabled = !0), this._touchRotate.disable(); + } + enableRotation() { + (this._rotationDisabled = !1), + this._touchZoom.isEnabled() && this._touchRotate.enable(); + } + } + class xd { + constructor(e, i) { + (this._bypassKey = + navigator.userAgent.indexOf("Mac") !== -1 + ? "metaKey" + : "ctrlKey"), + (this._map = e), + (this._options = i), + (this._enabled = !1); + } + isActive() { + return !1; + } + reset() {} + _setupUI() { + if (this._container) return; + const e = this._map.getCanvasContainer(); + e.classList.add("maplibregl-cooperative-gestures"), + (this._container = H.create( + "div", + "maplibregl-cooperative-gesture-screen", + e + )); + let i = this._map._getUIString( + "CooperativeGesturesHandler.WindowsHelpText" + ); + this._bypassKey === "metaKey" && + (i = this._map._getUIString( + "CooperativeGesturesHandler.MacHelpText" + )); + const l = this._map._getUIString( + "CooperativeGesturesHandler.MobileHelpText" + ), + u = document.createElement("div"); + (u.className = "maplibregl-desktop-message"), + (u.textContent = i), + this._container.appendChild(u); + const d = document.createElement("div"); + (d.className = "maplibregl-mobile-message"), + (d.textContent = l), + this._container.appendChild(d), + this._container.setAttribute("aria-hidden", "true"); + } + _destroyUI() { + this._container && + (H.remove(this._container), + 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(e) { + return e[this._bypassKey]; + } + notifyGestureBlocked(e, i) { + this._enabled && + (this._map.fire( + new s.l("cooperativegestureprevented", { + gestureType: e, + originalEvent: i, + }) + ), + this._container.classList.add("maplibregl-show"), + setTimeout(() => { + this._container.classList.remove("maplibregl-show"); + }, 100)); + } + } + const Ea = (h) => + h.zoom || h.drag || h.roll || h.pitch || h.rotate; + class Un extends s.l {} + function us(h) { + return ( + (h.panDelta && h.panDelta.mag()) || + h.zoomDelta || + h.bearingDelta || + h.pitchDelta || + h.rollDelta + ); + } + class cu { + constructor(e, i) { + (this.handleWindowEvent = (u) => { + this.handleEvent(u, `${u.type}Window`); + }), + (this.handleEvent = (u, d) => { + if (u.type === "blur") return void this.stop(!0); + this._updatingCamera = !0; + const g = u.type === "renderFrame" ? void 0 : u, + w = { needsRenderFrame: !1 }, + C = {}, + P = {}; + for (const { + handlerName: D, + handler: N, + allowed: G, + } of this._handlers) { + if (!N.isEnabled()) continue; + let te; + if (this._blockedByActive(P, G, D)) N.reset(); + else if (N[d || u.type]) { + if (s.cp(u, d || u.type)) { + const Q = H.mousePos(this._map.getCanvas(), u); + te = N[d || u.type](u, Q); + } else if (s.cq(u, d || u.type)) { + const Q = this._getMapTouches(u.touches), + ae = H.touchPos(this._map.getCanvas(), Q); + te = N[d || u.type](u, ae, Q); + } else s.cr(d || u.type) || (te = N[d || u.type](u)); + this.mergeHandlerResult(w, C, te, D, g), + te && + te.needsRenderFrame && + this._triggerRenderFrame(); + } + (te || N.isActive()) && (P[D] = N); + } + const E = {}; + for (const D in this._previousActiveHandlers) + P[D] || (E[D] = g); + (this._previousActiveHandlers = P), + (Object.keys(E).length || us(w)) && + (this._changes.push([w, C, E]), + this._triggerRenderFrame()), + (Object.keys(P).length || us(w)) && this._map._stop(!0), + (this._updatingCamera = !1); + const { cameraAnimation: R } = w; + R && + (this._inertia.clear(), + this._fireEvents({}, {}, !0), + (this._changes = []), + R(this._map)); + }), + (this._map = e), + (this._el = this._map.getCanvasContainer()), + (this._handlers = []), + (this._handlersById = {}), + (this._changes = []), + (this._inertia = new dd(e)), + (this._bearingSnap = i.bearingSnap), + (this._previousActiveHandlers = {}), + (this._eventsInProgress = {}), + this._addDefaultHandlers(i); + const l = this._el; + this._listeners = [ + [l, "touchstart", { passive: !0 }], + [l, "touchmove", { passive: !1 }], + [l, "touchend", void 0], + [l, "touchcancel", void 0], + [l, "mousedown", void 0], + [l, "mousemove", void 0], + [l, "mouseup", void 0], + [document, "mousemove", { capture: !0 }], + [document, "mouseup", void 0], + [l, "mouseover", void 0], + [l, "mouseout", void 0], + [l, "dblclick", void 0], + [l, "click", void 0], + [l, "keydown", { capture: !1 }], + [l, "keyup", void 0], + [l, "wheel", { passive: !1 }], + [l, "contextmenu", void 0], + [window, "blur", void 0], + ]; + for (const [u, d, g] of this._listeners) + H.addEventListener( + u, + d, + u === document + ? this.handleWindowEvent + : this.handleEvent, + g + ); + } + destroy() { + for (const [e, i, l] of this._listeners) + H.removeEventListener( + e, + i, + e === document + ? this.handleWindowEvent + : this.handleEvent, + l + ); + } + _addDefaultHandlers(e) { + const i = this._map, + l = i.getCanvasContainer(); + this._add("mapEvent", new pd(i, e)); + const u = (i.boxZoom = new nu(i, e)); + this._add("boxZoom", u), + e.interactive && e.boxZoom && u.enable(); + const d = (i.cooperativeGestures = new xd( + i, + e.cooperativeGestures + )); + this._add("cooperativeGestures", d), + e.cooperativeGestures && d.enable(); + const g = new Ma(i), + w = new su(i); + (i.doubleClickZoom = new ou(w, g)), + this._add("tapZoom", g), + this._add("clickZoom", w), + e.interactive && + e.doubleClickZoom && + i.doubleClickZoom.enable(); + const C = new gd(); + this._add("tapDragZoom", C); + const P = (i.touchPitch = new Nl(i)); + this._add("touchPitch", P), + e.interactive && + e.touchPitch && + i.touchPitch.enable(e.touchPitch); + const E = () => i.project(i.getCenter()), + R = (function ( + { + enable: me, + clickTolerance: be, + aroundCenter: Pe = !0, + minPixelCenterThreshold: _e = 100, + rotateDegreesPerPixelMoved: Be = 0.8, + }, + rt + ) { + const Ge = new Ws({ + checkCorrectEvent: (Xe) => + (H.mouseButton(Xe) === 0 && Xe.ctrlKey) || + (H.mouseButton(Xe) === 2 && !Xe.ctrlKey), + }); + return new ss({ + clickTolerance: be, + move: (Xe, tt) => { + const jt = rt(); + if (Pe && Math.abs(jt.y - Xe.y) > _e) + return { + bearingDelta: s.cn(new s.P(Xe.x, tt.y), tt, jt), + }; + let Zt = (tt.x - Xe.x) * Be; + return ( + Pe && tt.y < jt.y && (Zt = -Zt), + { bearingDelta: Zt } + ); + }, + moveStateManager: Ge, + enable: me, + assignEvents: Xs, + }); + })(e, E), + D = (function ({ + enable: me, + clickTolerance: be, + pitchDegreesPerPixelMoved: Pe = -0.5, + }) { + const _e = new Ws({ + checkCorrectEvent: (Be) => + (H.mouseButton(Be) === 0 && Be.ctrlKey) || + H.mouseButton(Be) === 2, + }); + return new ss({ + clickTolerance: be, + move: (Be, rt) => ({ pitchDelta: (rt.y - Be.y) * Pe }), + moveStateManager: _e, + enable: me, + assignEvents: Xs, + }); + })(e), + N = (function ( + { + enable: me, + clickTolerance: be, + rollDegreesPerPixelMoved: Pe = 0.3, + }, + _e + ) { + const Be = new Ws({ + checkCorrectEvent: (rt) => + H.mouseButton(rt) === 2 && rt.ctrlKey, + }); + return new ss({ + clickTolerance: be, + move: (rt, Ge) => { + const Xe = _e(); + let tt = (Ge.x - rt.x) * Pe; + return Ge.y < Xe.y && (tt = -tt), { rollDelta: tt }; + }, + moveStateManager: Be, + enable: me, + assignEvents: Xs, + }); + })(e, E); + (i.dragRotate = new lu(e, R, D, N)), + this._add("mouseRotate", R, ["mousePitch"]), + this._add("mousePitch", D, ["mouseRotate", "mouseRoll"]), + this._add("mouseRoll", N, ["mousePitch"]), + e.interactive && e.dragRotate && i.dragRotate.enable(); + const G = (function ({ enable: me, clickTolerance: be }) { + const Pe = new Ws({ + checkCorrectEvent: (_e) => + H.mouseButton(_e) === 0 && !_e.ctrlKey, + }); + return new ss({ + clickTolerance: be, + move: (_e, Be) => ({ + around: Be, + panDelta: Be.sub(_e), + }), + activateOnStart: !0, + moveStateManager: Pe, + enable: me, + assignEvents: Xs, + }); + })(e), + te = new Ys(e, i); + (i.dragPan = new vd(l, G, te)), + this._add("mousePan", G), + this._add("touchPan", te, ["touchZoom", "touchRotate"]), + e.interactive && e.dragPan && i.dragPan.enable(e.dragPan); + const Q = new cs(), + ae = new Ol(); + (i.touchZoomRotate = new yd(l, ae, Q, C)), + this._add("touchRotate", Q, ["touchPan", "touchZoom"]), + this._add("touchZoom", ae, ["touchPan", "touchRotate"]), + e.interactive && + e.touchZoomRotate && + i.touchZoomRotate.enable(e.touchZoomRotate); + const ce = (i.scrollZoom = new _d(i, () => + this._triggerRenderFrame() + )); + this._add("scrollZoom", ce, ["mousePan"]), + e.interactive && + e.scrollZoom && + i.scrollZoom.enable(e.scrollZoom); + const ve = (i.keyboard = new jl(i)); + this._add("keyboard", ve), + e.interactive && e.keyboard && i.keyboard.enable(), + this._add("blockableMapEvent", new fd(i)); + } + _add(e, i, l) { + this._handlers.push({ + handlerName: e, + handler: i, + allowed: l, + }), + (this._handlersById[e] = i); + } + stop(e) { + if (!this._updatingCamera) { + for (const { handler: i } of this._handlers) i.reset(); + this._inertia.clear(), + this._fireEvents({}, {}, e), + (this._changes = []); + } + } + isActive() { + for (const { handler: e } of this._handlers) + if (e.isActive()) return !0; + return !1; + } + isZooming() { + return ( + !!this._eventsInProgress.zoom || + this._map.scrollZoom.isZooming() + ); + } + isRotating() { + return !!this._eventsInProgress.rotate; + } + isMoving() { + return !!Ea(this._eventsInProgress) || this.isZooming(); + } + _blockedByActive(e, i, l) { + for (const u in e) + if (u !== l && (!i || i.indexOf(u) < 0)) return !0; + return !1; + } + _getMapTouches(e) { + const i = []; + for (const l of e) this._el.contains(l.target) && i.push(l); + return i; + } + mergeHandlerResult(e, i, l, u, d) { + if (!l) return; + s.e(e, l); + const g = { + handlerName: u, + originalEvent: l.originalEvent || d, + }; + l.zoomDelta !== void 0 && (i.zoom = g), + l.panDelta !== void 0 && (i.drag = g), + l.rollDelta !== void 0 && (i.roll = g), + l.pitchDelta !== void 0 && (i.pitch = g), + l.bearingDelta !== void 0 && (i.rotate = g); + } + _applyChanges() { + const e = {}, + i = {}, + l = {}; + for (const [u, d, g] of this._changes) + u.panDelta && + (e.panDelta = (e.panDelta || new s.P(0, 0))._add( + u.panDelta + )), + u.zoomDelta && + (e.zoomDelta = (e.zoomDelta || 0) + u.zoomDelta), + u.bearingDelta && + (e.bearingDelta = + (e.bearingDelta || 0) + u.bearingDelta), + u.pitchDelta && + (e.pitchDelta = (e.pitchDelta || 0) + u.pitchDelta), + u.rollDelta && + (e.rollDelta = (e.rollDelta || 0) + u.rollDelta), + u.around !== void 0 && (e.around = u.around), + u.pinchAround !== void 0 && + (e.pinchAround = u.pinchAround), + u.noInertia && (e.noInertia = u.noInertia), + s.e(i, d), + s.e(l, g); + this._updateMapTransform(e, i, l), (this._changes = []); + } + _updateMapTransform(e, i, l) { + const u = this._map, + d = u._getTransformForUpdate(), + g = u.terrain; + if (!(us(e) || (g && this._terrainMovement))) + return this._fireEvents(i, l, !0); + u._stop(!0); + let { + panDelta: w, + zoomDelta: C, + bearingDelta: P, + pitchDelta: E, + rollDelta: R, + around: D, + pinchAround: N, + } = e; + N !== void 0 && (D = N), + (D = D || u.transform.centerPoint), + g && !d.isPointOnMapSurface(D) && (D = d.centerPoint); + const G = { + panDelta: w, + zoomDelta: C, + rollDelta: R, + pitchDelta: E, + bearingDelta: P, + around: D, + }; + this._map.cameraHelper.useGlobeControls && + !d.isPointOnMapSurface(D) && + (D = d.centerPoint); + const te = + D.distSqr(d.centerPoint) < 0.01 + ? d.center + : d.screenPointToLocation(w ? D.sub(w) : D); + g + ? (this._map.cameraHelper.handleMapControlsRollPitchBearingZoom( + G, + d + ), + this._terrainMovement || (!i.drag && !i.zoom) + ? i.drag && this._terrainMovement + ? d.setCenter( + d.screenPointToLocation(d.centerPoint.sub(w)) + ) + : this._map.cameraHelper.handleMapControlsPan( + G, + d, + te + ) + : ((this._terrainMovement = !0), + (this._map._elevationFreeze = !0), + this._map.cameraHelper.handleMapControlsPan( + G, + d, + te + ))) + : (this._map.cameraHelper.handleMapControlsRollPitchBearingZoom( + G, + d + ), + this._map.cameraHelper.handleMapControlsPan(G, d, te)), + u._applyUpdatedTransform(d), + this._map._update(), + e.noInertia || this._inertia.record(e), + this._fireEvents(i, l, !0); + } + _fireEvents(e, i, l) { + const u = Ea(this._eventsInProgress), + d = Ea(e), + g = {}; + for (const R in e) { + const { originalEvent: D } = e[R]; + this._eventsInProgress[R] || (g[`${R}start`] = D), + (this._eventsInProgress[R] = e[R]); + } + !u && d && this._fireEvent("movestart", d.originalEvent); + for (const R in g) this._fireEvent(R, g[R]); + d && this._fireEvent("move", d.originalEvent); + for (const R in e) { + const { originalEvent: D } = e[R]; + this._fireEvent(R, D); + } + const w = {}; + let C; + for (const R in this._eventsInProgress) { + const { handlerName: D, originalEvent: N } = + this._eventsInProgress[R]; + this._handlersById[D].isActive() || + (delete this._eventsInProgress[R], + (C = i[D] || N), + (w[`${R}end`] = C)); + } + for (const R in w) this._fireEvent(R, w[R]); + const P = Ea(this._eventsInProgress), + E = (u || d) && !P; + if (E && this._terrainMovement) { + (this._map._elevationFreeze = !1), + (this._terrainMovement = !1); + const R = this._map._getTransformForUpdate(); + this._map.getCenterClampedToGround() && + R.recalculateZoomAndCenter(this._map.terrain), + this._map._applyUpdatedTransform(R); + } + if (l && E) { + this._updatingCamera = !0; + const R = this._inertia._onMoveEnd( + this._map.dragPan._inertiaOptions + ), + D = (N) => + N !== 0 && + -this._bearingSnap < N && + N < this._bearingSnap; + !R || (!R.essential && ne.prefersReducedMotion) + ? (this._map.fire( + new s.l("moveend", { originalEvent: C }) + ), + D(this._map.getBearing()) && this._map.resetNorth()) + : (D(R.bearing || this._map.getBearing()) && + (R.bearing = 0), + (R.freezeElevation = !0), + this._map.easeTo(R, { originalEvent: C })), + (this._updatingCamera = !1); + } + } + _fireEvent(e, i) { + this._map.fire(new s.l(e, i ? { originalEvent: i } : {})); + } + _requestFrame() { + return ( + this._map.triggerRepaint(), + this._map._renderTaskQueue.add((e) => { + delete this._frameId, + this.handleEvent( + new Un("renderFrame", { timeStamp: e }) + ), + this._applyChanges(); + }) + ); + } + _triggerRenderFrame() { + this._frameId === void 0 && + (this._frameId = this._requestFrame()); + } + } + class bd extends s.E { + constructor(e, i, l) { + super(), + (this._renderFrameCallback = () => { + const u = Math.min( + (ne.now() - this._easeStart) / + this._easeOptions.duration, + 1 + ); + this._onEaseFrame(this._easeOptions.easing(u)), + u < 1 && this._easeFrameId + ? (this._easeFrameId = this._requestRenderFrame( + this._renderFrameCallback + )) + : this.stop(); + }), + (this._moving = !1), + (this._zooming = !1), + (this.transform = e), + (this._bearingSnap = l.bearingSnap), + (this.cameraHelper = i), + this.on("moveend", () => { + delete this._requestedCameraState; + }); + } + migrateProjection(e, i) { + e.apply(this.transform), + (this.transform = e), + (this.cameraHelper = i); + } + getCenter() { + return new s.S( + this.transform.center.lng, + this.transform.center.lat + ); + } + setCenter(e, i) { + return this.jumpTo({ center: e }, i); + } + getCenterElevation() { + return this.transform.elevation; + } + setCenterElevation(e, i) { + return this.jumpTo({ elevation: e }, i), this; + } + getCenterClampedToGround() { + return this._centerClampedToGround; + } + setCenterClampedToGround(e) { + this._centerClampedToGround = e; + } + panBy(e, i, l) { + return ( + (e = s.P.convert(e).mult(-1)), + this.panTo(this.transform.center, s.e({ offset: e }, i), l) + ); + } + panTo(e, i, l) { + return this.easeTo(s.e({ center: e }, i), l); + } + getZoom() { + return this.transform.zoom; + } + setZoom(e, i) { + return this.jumpTo({ zoom: e }, i), this; + } + zoomTo(e, i, l) { + return this.easeTo(s.e({ zoom: e }, i), l); + } + zoomIn(e, i) { + return this.zoomTo(this.getZoom() + 1, e, i), this; + } + zoomOut(e, i) { + return this.zoomTo(this.getZoom() - 1, e, i), this; + } + getVerticalFieldOfView() { + return this.transform.fov; + } + setVerticalFieldOfView(e, i) { + return ( + e != this.transform.fov && + (this.transform.setFov(e), + this.fire(new s.l("movestart", i)) + .fire(new s.l("move", i)) + .fire(new s.l("moveend", i))), + this + ); + } + getBearing() { + return this.transform.bearing; + } + setBearing(e, i) { + return this.jumpTo({ bearing: e }, i), this; + } + getPadding() { + return this.transform.padding; + } + setPadding(e, i) { + return this.jumpTo({ padding: e }, i), this; + } + rotateTo(e, i, l) { + return this.easeTo(s.e({ bearing: e }, i), l); + } + resetNorth(e, i) { + return this.rotateTo(0, s.e({ duration: 1e3 }, e), i), this; + } + resetNorthPitch(e, i) { + return ( + this.easeTo( + s.e({ bearing: 0, pitch: 0, roll: 0, duration: 1e3 }, e), + i + ), + this + ); + } + snapToNorth(e, i) { + return Math.abs(this.getBearing()) < this._bearingSnap + ? this.resetNorth(e, i) + : this; + } + getPitch() { + return this.transform.pitch; + } + setPitch(e, i) { + return this.jumpTo({ pitch: e }, i), this; + } + getRoll() { + return this.transform.roll; + } + setRoll(e, i) { + return this.jumpTo({ roll: e }, i), this; + } + cameraForBounds(e, i) { + e = _t.convert(e).adjustAntiMeridian(); + const l = (i && i.bearing) || 0; + return this._cameraForBoxAndBearing( + e.getNorthWest(), + e.getSouthEast(), + l, + i + ); + } + _cameraForBoxAndBearing(e, i, l, u) { + const d = { top: 0, bottom: 0, right: 0, left: 0 }; + if ( + typeof (u = s.e( + { + padding: d, + offset: [0, 0], + maxZoom: this.transform.maxZoom, + }, + u + )).padding == "number" + ) { + const P = u.padding; + u.padding = { top: P, bottom: P, right: P, left: P }; + } + const g = s.e(d, u.padding); + u.padding = g; + const w = this.transform, + C = new _t(e, i); + return this.cameraHelper.cameraForBoxAndBearing( + u, + g, + C, + l, + w + ); + } + fitBounds(e, i, l) { + return this._fitInternal(this.cameraForBounds(e, i), i, l); + } + fitScreenCoordinates(e, i, l, u, d) { + return this._fitInternal( + this._cameraForBoxAndBearing( + this.transform.screenPointToLocation(s.P.convert(e)), + this.transform.screenPointToLocation(s.P.convert(i)), + l, + u + ), + u, + d + ); + } + _fitInternal(e, i, l) { + return e + ? (delete (i = s.e(e, i)).padding, + i.linear ? this.easeTo(i, l) : this.flyTo(i, l)) + : this; + } + jumpTo(e, i) { + this.stop(); + const l = this._getTransformForUpdate(); + let u = !1, + d = !1, + g = !1; + const w = l.zoom; + this.cameraHelper.handleJumpToCenterZoom(l, e); + const C = l.zoom !== w; + return ( + "elevation" in e && + l.elevation !== +e.elevation && + l.setElevation(+e.elevation), + "bearing" in e && + l.bearing !== +e.bearing && + ((u = !0), l.setBearing(+e.bearing)), + "pitch" in e && + l.pitch !== +e.pitch && + ((d = !0), l.setPitch(+e.pitch)), + "roll" in e && + l.roll !== +e.roll && + ((g = !0), l.setRoll(+e.roll)), + e.padding == null || + l.isPaddingEqual(e.padding) || + l.setPadding(e.padding), + this._applyUpdatedTransform(l), + this.fire(new s.l("movestart", i)).fire(new s.l("move", i)), + C && + this.fire(new s.l("zoomstart", i)) + .fire(new s.l("zoom", i)) + .fire(new s.l("zoomend", i)), + u && + this.fire(new s.l("rotatestart", i)) + .fire(new s.l("rotate", i)) + .fire(new s.l("rotateend", i)), + d && + this.fire(new s.l("pitchstart", i)) + .fire(new s.l("pitch", i)) + .fire(new s.l("pitchend", i)), + g && + this.fire(new s.l("rollstart", i)) + .fire(new s.l("roll", i)) + .fire(new s.l("rollend", i)), + this.fire(new s.l("moveend", i)) + ); + } + calculateCameraOptionsFromTo(e, i, l, u = 0) { + const d = s.a1.fromLngLat(e, i), + g = s.a1.fromLngLat(l, u), + w = g.x - d.x, + C = g.y - d.y, + P = g.z - d.z, + E = Math.hypot(w, C, P); + if (E === 0) + throw new Error( + "Can't calculate camera options with same From and To" + ); + const R = Math.hypot(w, C), + D = s.ak( + this.transform.cameraToCenterDistance / + E / + this.transform.tileSize + ), + N = (180 * Math.atan2(w, -C)) / Math.PI; + let G = (180 * Math.acos(R / E)) / Math.PI; + return ( + (G = P < 0 ? 90 - G : 90 + G), + { + center: g.toLngLat(), + elevation: u, + zoom: D, + pitch: G, + bearing: N, + } + ); + } + calculateCameraOptionsFromCameraLngLatAltRotation( + e, + i, + l, + u, + d + ) { + const g = this.transform.calculateCenterFromCameraLngLatAlt( + e, + i, + l, + u + ); + return { + center: g.center, + elevation: g.elevation, + zoom: g.zoom, + bearing: l, + pitch: u, + roll: d, + }; + } + easeTo(e, i) { + this._stop(!1, e.easeId), + ((e = s.e( + { offset: [0, 0], duration: 500, easing: s.co }, + e + )).animate === !1 || + (!e.essential && ne.prefersReducedMotion)) && + (e.duration = 0); + const l = this._getTransformForUpdate(), + u = this.getBearing(), + d = l.pitch, + g = l.roll, + w = + "bearing" in e ? this._normalizeBearing(e.bearing, u) : u, + C = "pitch" in e ? +e.pitch : d, + P = "roll" in e ? this._normalizeBearing(e.roll, g) : g, + E = "padding" in e ? e.padding : l.padding, + R = s.P.convert(e.offset); + let D, N; + e.around && + ((D = s.S.convert(e.around)), + (N = l.locationToScreenPoint(D))); + const G = { + moving: this._moving, + zooming: this._zooming, + rotating: this._rotating, + pitching: this._pitching, + rolling: this._rolling, + }, + te = this.cameraHelper.handleEaseTo(l, { + bearing: w, + pitch: C, + roll: P, + padding: E, + around: D, + aroundPoint: N, + offsetAsPoint: R, + offset: e.offset, + zoom: e.zoom, + center: e.center, + }); + return ( + (this._rotating = this._rotating || u !== w), + (this._pitching = this._pitching || C !== d), + (this._rolling = this._rolling || P !== g), + (this._padding = !l.isPaddingEqual(E)), + (this._zooming = this._zooming || te.isZooming), + (this._easeId = e.easeId), + this._prepareEase(i, e.noMoveStart, G), + this.terrain && this._prepareElevation(te.elevationCenter), + this._ease( + (Q) => { + te.easeFunc(Q), + this.terrain && + !e.freezeElevation && + this._updateElevation(Q), + this._applyUpdatedTransform(l), + this._fireMoveEvents(i); + }, + (Q) => { + this.terrain && + e.freezeElevation && + this._finalizeElevation(), + this._afterEase(i, Q); + }, + e + ), + this + ); + } + _prepareEase(e, i, l = {}) { + (this._moving = !0), + i || l.moving || this.fire(new s.l("movestart", e)), + this._zooming && + !l.zooming && + this.fire(new s.l("zoomstart", e)), + this._rotating && + !l.rotating && + this.fire(new s.l("rotatestart", e)), + this._pitching && + !l.pitching && + this.fire(new s.l("pitchstart", e)), + this._rolling && + !l.rolling && + this.fire(new s.l("rollstart", e)); + } + _prepareElevation(e) { + (this._elevationCenter = e), + (this._elevationStart = this.transform.elevation), + (this._elevationTarget = + this.terrain.getElevationForLngLatZoom( + e, + this.transform.tileZoom + )), + (this._elevationFreeze = !0); + } + _updateElevation(e) { + this.transform.setMinElevationForCurrentTile( + this.terrain.getMinTileElevationForLngLatZoom( + this._elevationCenter, + this.transform.tileZoom + ) + ); + const i = this.terrain.getElevationForLngLatZoom( + this._elevationCenter, + this.transform.tileZoom + ); + if (e < 1 && i !== this._elevationTarget) { + const l = this._elevationTarget - this._elevationStart; + (this._elevationStart += + e * (l - (i - (l * e + this._elevationStart)) / (1 - e))), + (this._elevationTarget = i); + } + this.transform.setElevation( + s.C.number(this._elevationStart, this._elevationTarget, e) + ); + } + _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(e) { + if (!this.terrain && e.elevation >= 0 && e.pitch <= 90) + return {}; + const i = e.getCameraLngLat(), + l = e.getCameraAltitude(), + u = this.terrain + ? this.terrain.getElevationForLngLatZoom(i, e.zoom) + : 0; + if (l < u) { + const d = this.calculateCameraOptionsFromTo( + i, + u, + e.center, + e.elevation + ); + return { pitch: d.pitch, zoom: d.zoom }; + } + return {}; + } + _applyUpdatedTransform(e) { + const i = []; + if ( + (i.push((u) => this._elevateCameraIfInsideTerrain(u)), + this.transformCameraUpdate && + i.push((u) => this.transformCameraUpdate(u)), + !i.length) + ) + return; + const l = e.clone(); + for (const u of i) { + const d = l.clone(), + { + center: g, + zoom: w, + roll: C, + pitch: P, + bearing: E, + elevation: R, + } = u(d); + g && d.setCenter(g), + R !== void 0 && d.setElevation(R), + w !== void 0 && d.setZoom(w), + C !== void 0 && d.setRoll(C), + P !== void 0 && d.setPitch(P), + E !== void 0 && d.setBearing(E), + l.apply(d); + } + this.transform.apply(l); + } + _fireMoveEvents(e) { + this.fire(new s.l("move", e)), + this._zooming && this.fire(new s.l("zoom", e)), + this._rotating && this.fire(new s.l("rotate", e)), + this._pitching && this.fire(new s.l("pitch", e)), + this._rolling && this.fire(new s.l("roll", e)); + } + _afterEase(e, i) { + if (this._easeId && i && this._easeId === i) return; + delete this._easeId; + const l = this._zooming, + u = this._rotating, + d = this._pitching, + g = this._rolling; + (this._moving = !1), + (this._zooming = !1), + (this._rotating = !1), + (this._pitching = !1), + (this._rolling = !1), + (this._padding = !1), + l && this.fire(new s.l("zoomend", e)), + u && this.fire(new s.l("rotateend", e)), + d && this.fire(new s.l("pitchend", e)), + g && this.fire(new s.l("rollend", e)), + this.fire(new s.l("moveend", e)); + } + flyTo(e, i) { + if (!e.essential && ne.prefersReducedMotion) { + const tt = s.Q(e, [ + "center", + "zoom", + "bearing", + "pitch", + "roll", + "elevation", + ]); + return this.jumpTo(tt, i); + } + this.stop(), + (e = s.e( + { offset: [0, 0], speed: 1.2, curve: 1.42, easing: s.co }, + e + )); + const l = this._getTransformForUpdate(), + u = l.bearing, + d = l.pitch, + g = l.roll, + w = l.padding, + C = + "bearing" in e ? this._normalizeBearing(e.bearing, u) : u, + P = "pitch" in e ? +e.pitch : d, + E = "roll" in e ? this._normalizeBearing(e.roll, g) : g, + R = "padding" in e ? e.padding : l.padding, + D = s.P.convert(e.offset); + let N = l.centerPoint.add(D); + const G = l.screenPointToLocation(N), + te = this.cameraHelper.handleFlyTo(l, { + bearing: C, + pitch: P, + roll: E, + padding: R, + locationAtOffset: G, + offsetAsPoint: D, + center: e.center, + minZoom: e.minZoom, + zoom: e.zoom, + }); + let Q = e.curve; + const ae = Math.max(l.width, l.height), + ce = ae / te.scaleOfZoom, + ve = te.pixelPathLength; + typeof te.scaleOfMinZoom == "number" && + (Q = Math.sqrt((ae / te.scaleOfMinZoom / ve) * 2)); + const me = Q * Q; + function be(tt) { + const jt = + (ce * ce - ae * ae + (tt ? -1 : 1) * me * me * ve * ve) / + (2 * (tt ? ce : ae) * me * ve); + return Math.log(Math.sqrt(jt * jt + 1) - jt); + } + function Pe(tt) { + return (Math.exp(tt) - Math.exp(-tt)) / 2; + } + function _e(tt) { + return (Math.exp(tt) + Math.exp(-tt)) / 2; + } + const Be = be(!1); + let rt = function (tt) { + return _e(Be) / _e(Be + Q * tt); + }, + Ge = function (tt) { + return ( + (ae * + ((_e(Be) * (Pe((jt = Be + Q * tt)) / _e(jt)) - + Pe(Be)) / + me)) / + ve + ); + var jt; + }, + Xe = (be(!0) - Be) / Q; + if (Math.abs(ve) < 2e-6 || !isFinite(Xe)) { + if (Math.abs(ae - ce) < 1e-6) return this.easeTo(e, i); + const tt = ce < ae ? -1 : 1; + (Xe = Math.abs(Math.log(ce / ae)) / Q), + (Ge = () => 0), + (rt = (jt) => Math.exp(tt * Q * jt)); + } + return ( + (e.duration = + "duration" in e + ? +e.duration + : (1e3 * Xe) / + ("screenSpeed" in e ? +e.screenSpeed / Q : +e.speed)), + e.maxDuration && + e.duration > e.maxDuration && + (e.duration = 0), + (this._zooming = !0), + (this._rotating = u !== C), + (this._pitching = P !== d), + (this._rolling = E !== g), + (this._padding = !l.isPaddingEqual(R)), + this._prepareEase(i, !1), + this.terrain && this._prepareElevation(te.targetCenter), + this._ease( + (tt) => { + const jt = tt * Xe, + Zt = 1 / rt(jt), + Tt = Ge(jt); + this._rotating && l.setBearing(s.C.number(u, C, tt)), + this._pitching && l.setPitch(s.C.number(d, P, tt)), + this._rolling && l.setRoll(s.C.number(g, E, tt)), + this._padding && + (l.interpolatePadding(w, R, tt), + (N = l.centerPoint.add(D))), + te.easeFunc(tt, Zt, Tt, N), + this.terrain && + !e.freezeElevation && + this._updateElevation(tt), + this._applyUpdatedTransform(l), + this._fireMoveEvents(i); + }, + () => { + this.terrain && + e.freezeElevation && + this._finalizeElevation(), + this._afterEase(i); + }, + e + ), + this + ); + } + isEasing() { + return !!this._easeFrameId; + } + stop() { + return this._stop(); + } + _stop(e, i) { + var l; + if ( + (this._easeFrameId && + (this._cancelRenderFrame(this._easeFrameId), + delete this._easeFrameId, + delete this._onEaseFrame), + this._onEaseEnd) + ) { + const u = this._onEaseEnd; + delete this._onEaseEnd, u.call(this, i); + } + return ( + e || + (l = this.handlers) === null || + l === void 0 || + l.stop(!1), + this + ); + } + _ease(e, i, l) { + l.animate === !1 || l.duration === 0 + ? (e(1), i()) + : ((this._easeStart = ne.now()), + (this._easeOptions = l), + (this._onEaseFrame = e), + (this._onEaseEnd = i), + (this._easeFrameId = this._requestRenderFrame( + this._renderFrameCallback + ))); + } + _normalizeBearing(e, i) { + e = s.aO(e, -180, 180); + const l = Math.abs(e - i); + return ( + Math.abs(e - 360 - i) < l && (e -= 360), + Math.abs(e + 360 - i) < l && (e += 360), + e + ); + } + queryTerrainElevation(e) { + return this.terrain + ? this.terrain.getElevationForLngLatZoom( + s.S.convert(e), + this.transform.tileZoom + ) + : null; + } + } + const uu = { + compact: !0, + customAttribution: + 'MapLibre', + }; + class hu { + constructor(e = uu) { + (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 = (i) => { + !i || + (i.sourceDataType !== "metadata" && + i.sourceDataType !== "visibility" && + i.dataType !== "style" && + i.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 = e); + } + getDefaultPosition() { + return "bottom-right"; + } + onAdd(e) { + return ( + (this._map = e), + (this._compact = this.options.compact), + (this._container = H.create( + "details", + "maplibregl-ctrl maplibregl-ctrl-attrib" + )), + (this._compactButton = H.create( + "summary", + "maplibregl-ctrl-attrib-button", + this._container + )), + this._compactButton.addEventListener( + "click", + this._toggleAttribution + ), + this._setElementTitle( + this._compactButton, + "ToggleAttribution" + ), + (this._innerContainer = H.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() { + H.remove(this._container), + 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(e, i) { + const l = this._map._getUIString(`AttributionControl.${i}`); + (e.title = l), e.setAttribute("aria-label", l); + } + _updateAttributions() { + if (!this._map.style) return; + let e = []; + if ( + (this.options.customAttribution && + (Array.isArray(this.options.customAttribution) + ? (e = e.concat( + this.options.customAttribution.map((u) => + typeof u != "string" ? "" : u + ) + )) + : typeof this.options.customAttribution == "string" && + e.push(this.options.customAttribution)), + this._map.style.stylesheet) + ) { + const u = this._map.style.stylesheet; + (this.styleOwner = u.owner), (this.styleId = u.id); + } + const i = this._map.style.sourceCaches; + for (const u in i) { + const d = i[u]; + if (d.used || d.usedForTerrain) { + const g = d.getSource(); + g.attribution && + e.indexOf(g.attribution) < 0 && + e.push(g.attribution); + } + } + (e = e.filter((u) => String(u).trim())), + e.sort((u, d) => u.length - d.length), + (e = e.filter((u, d) => { + for (let g = d + 1; g < e.length; g++) + if (e[g].indexOf(u) >= 0) return !1; + return !0; + })); + const l = e.join(" | "); + l !== this._attribHTML && + ((this._attribHTML = l), + e.length + ? ((this._innerContainer.innerHTML = H.sanitize(l)), + this._container.classList.remove( + "maplibregl-attrib-empty" + )) + : this._container.classList.add( + "maplibregl-attrib-empty" + ), + this._updateCompact(), + (this._editLink = null)); + } + } + class wd { + constructor(e = {}) { + (this._updateCompact = () => { + const i = this._container.children; + if (i.length) { + const l = i[0]; + this._map.getCanvasContainer().offsetWidth <= 640 || + this._compact + ? this._compact !== !1 && + l.classList.add("maplibregl-compact") + : l.classList.remove("maplibregl-compact"); + } + }), + (this.options = e); + } + getDefaultPosition() { + return "bottom-left"; + } + onAdd(e) { + (this._map = e), + (this._compact = this.options && this.options.compact), + (this._container = H.create("div", "maplibregl-ctrl")); + const i = H.create("a", "maplibregl-ctrl-logo"); + return ( + (i.target = "_blank"), + (i.rel = "noopener nofollow"), + (i.href = "https://maplibre.org/"), + i.setAttribute( + "aria-label", + this._map._getUIString("LogoControl.Title") + ), + i.setAttribute("rel", "noopener nofollow"), + this._container.appendChild(i), + (this._container.style.display = "block"), + this._map.on("resize", this._updateCompact), + this._updateCompact(), + this._container + ); + } + onRemove() { + H.remove(this._container), + this._map.off("resize", this._updateCompact), + (this._map = void 0), + (this._compact = void 0); + } + } + class $a { + constructor() { + (this._queue = []), + (this._id = 0), + (this._cleared = !1), + (this._currentlyRunning = !1); + } + add(e) { + const i = ++this._id; + return ( + this._queue.push({ callback: e, id: i, cancelled: !1 }), i + ); + } + remove(e) { + const i = this._currentlyRunning, + l = i ? this._queue.concat(i) : this._queue; + for (const u of l) + if (u.id === e) return void (u.cancelled = !0); + } + run(e = 0) { + if (this._currentlyRunning) + throw new Error( + "Attempting to run(), but is already running." + ); + const i = (this._currentlyRunning = this._queue); + this._queue = []; + for (const l of i) + if (!l.cancelled && (l.callback(e), this._cleared)) break; + (this._cleared = !1), (this._currentlyRunning = !1); + } + clear() { + this._currentlyRunning && (this._cleared = !0), + (this._queue = []); + } + } + var ql = s.aJ([ + { name: "a_pos3d", type: "Int16", components: 3 }, + ]); + class wr extends s.E { + constructor(e) { + super(), + (this._lastTilesetChange = ne.now()), + (this.sourceCache = e), + (this._tiles = {}), + (this._renderableTilesKeys = []), + (this._sourceTileCache = {}), + (this.minzoom = 0), + (this.maxzoom = 22), + (this.deltaZoom = 1), + (this.tileSize = e._source.tileSize * 2 ** this.deltaZoom), + (e.usedForTerrain = !0), + (e.tileSize = this.tileSize); + } + destruct() { + (this.sourceCache.usedForTerrain = !1), + (this.sourceCache.tileSize = null); + } + update(e, i) { + this.sourceCache.update(e, i), + (this._renderableTilesKeys = []); + const l = {}; + for (const u of ye(e, { + tileSize: this.tileSize, + minzoom: this.minzoom, + maxzoom: this.maxzoom, + reparseOverscaled: !1, + terrain: i, + calculateTileZoom: + this.sourceCache._source.calculateTileZoom, + })) + (l[u.key] = !0), + this._renderableTilesKeys.push(u.key), + this._tiles[u.key] || + ((u.terrainRttPosMatrix32f = new Float64Array(16)), + s.bY(u.terrainRttPosMatrix32f, 0, s.$, s.$, 0, 0, 1), + (this._tiles[u.key] = new qr(u, this.tileSize)), + (this._lastTilesetChange = ne.now())); + for (const u in this._tiles) l[u] || delete this._tiles[u]; + } + freeRtt(e) { + for (const i in this._tiles) { + const l = this._tiles[i]; + (!e || + l.tileID.equals(e) || + l.tileID.isChildOf(e) || + e.isChildOf(l.tileID)) && + (l.rtt = []); + } + } + getRenderableTiles() { + return this._renderableTilesKeys.map((e) => + this.getTileByID(e) + ); + } + getTileByID(e) { + return this._tiles[e]; + } + getTerrainCoords(e, i) { + return i + ? this._getTerrainCoordsForTileRanges(e, i) + : this._getTerrainCoordsForRegularTile(e); + } + _getTerrainCoordsForRegularTile(e) { + const i = {}; + for (const l of this._renderableTilesKeys) { + const u = this._tiles[l].tileID, + d = e.clone(), + g = s.ba(); + if (u.canonical.equals(e.canonical)) + s.bY(g, 0, s.$, s.$, 0, 0, 1); + else if (u.canonical.isChildOf(e.canonical)) { + const w = u.canonical.z - e.canonical.z, + C = u.canonical.x - ((u.canonical.x >> w) << w), + P = u.canonical.y - ((u.canonical.y >> w) << w), + E = s.$ >> w; + s.bY(g, 0, E, E, 0, 0, 1), s.M(g, g, [-C * E, -P * E, 0]); + } else { + if (!e.canonical.isChildOf(u.canonical)) continue; + { + const w = e.canonical.z - u.canonical.z, + C = e.canonical.x - ((e.canonical.x >> w) << w), + P = e.canonical.y - ((e.canonical.y >> w) << w), + E = s.$ >> w; + s.bY(g, 0, s.$, s.$, 0, 0, 1), + s.M(g, g, [C * E, P * E, 0]), + s.N(g, g, [1 / 2 ** w, 1 / 2 ** w, 0]); + } + } + (d.terrainRttPosMatrix32f = new Float32Array(g)), + (i[l] = d); + } + return i; + } + _getTerrainCoordsForTileRanges(e, i) { + const l = {}; + for (const u of this._renderableTilesKeys) { + const d = this._tiles[u].tileID; + if (!this._isWithinTileRanges(d, i)) continue; + const g = e.clone(), + w = s.ba(); + if (d.canonical.z === e.canonical.z) { + const C = e.canonical.x - d.canonical.x, + P = e.canonical.y - d.canonical.y; + s.bY(w, 0, s.$, s.$, 0, 0, 1), + s.M(w, w, [C * s.$, P * s.$, 0]); + } else if (d.canonical.z > e.canonical.z) { + const C = d.canonical.z - e.canonical.z, + P = d.canonical.x - ((d.canonical.x >> C) << C), + E = d.canonical.y - ((d.canonical.y >> C) << C), + R = e.canonical.x - (d.canonical.x >> C), + D = e.canonical.y - (d.canonical.y >> C), + N = s.$ >> C; + s.bY(w, 0, N, N, 0, 0, 1), + s.M(w, w, [-P * N + R * s.$, -E * N + D * s.$, 0]); + } else { + const C = e.canonical.z - d.canonical.z, + P = e.canonical.x - ((e.canonical.x >> C) << C), + E = e.canonical.y - ((e.canonical.y >> C) << C), + R = (e.canonical.x >> C) - d.canonical.x, + D = (e.canonical.y >> C) - d.canonical.y, + N = s.$ << C; + s.bY(w, 0, N, N, 0, 0, 1), + s.M(w, w, [P * s.$ + R * N, E * s.$ + D * N, 0]); + } + (g.terrainRttPosMatrix32f = new Float32Array(w)), + (l[u] = g); + } + return l; + } + getSourceTile(e, i) { + const l = this.sourceCache._source; + let u = e.overscaledZ - this.deltaZoom; + if ((u > l.maxzoom && (u = l.maxzoom), u < l.minzoom)) + return null; + this._sourceTileCache[e.key] || + (this._sourceTileCache[e.key] = e.scaledTo(u).key); + let d = this.sourceCache.getTileByID( + this._sourceTileCache[e.key] + ); + if ((!d || !d.dem) && i) + for (; u >= l.minzoom && (!d || !d.dem); ) + d = this.sourceCache.getTileByID(e.scaledTo(u--).key); + return d; + } + anyTilesAfterTime(e = Date.now()) { + return this._lastTilesetChange >= e; + } + _isWithinTileRanges(e, i) { + return ( + i[e.canonical.z] && + e.canonical.x >= i[e.canonical.z].minTileX && + e.canonical.x <= i[e.canonical.z].maxTileX && + e.canonical.y >= i[e.canonical.z].minTileY && + e.canonical.y <= i[e.canonical.z].maxTileY + ); + } + } + class Or { + constructor(e, i, l) { + (this._meshCache = {}), + (this.painter = e), + (this.sourceCache = new wr(i)), + (this.options = l), + (this.exaggeration = + typeof l.exaggeration == "number" ? l.exaggeration : 1), + (this.qualityFactor = 2), + (this.meshSize = 128), + (this._demMatrixCache = {}), + (this.coordsIndex = []), + (this._coordsTextureSize = 1024); + } + getDEMElevation(e, i, l, u = s.$) { + var d; + if (!(i >= 0 && i < u && l >= 0 && l < u)) return 0; + const g = this.getTerrainData(e), + w = (d = g.tile) === null || d === void 0 ? void 0 : d.dem; + if (!w) return 0; + const C = s.cs( + [], + [(i / u) * s.$, (l / u) * s.$], + g.u_terrain_matrix + ), + P = [C[0] * w.dim, C[1] * w.dim], + E = Math.floor(P[0]), + R = Math.floor(P[1]), + D = P[0] - E, + N = P[1] - R; + return ( + w.get(E, R) * (1 - D) * (1 - N) + + w.get(E + 1, R) * D * (1 - N) + + w.get(E, R + 1) * (1 - D) * N + + w.get(E + 1, R + 1) * D * N + ); + } + getElevationForLngLatZoom(e, i) { + if (!s.ct(i, e.wrap())) return 0; + const { + tileID: l, + mercatorX: u, + mercatorY: d, + } = this._getOverscaledTileIDFromLngLatZoom(e, i); + return this.getElevation(l, u % s.$, d % s.$, s.$); + } + getElevation(e, i, l, u = s.$) { + return this.getDEMElevation(e, i, l, u) * this.exaggeration; + } + getTerrainData(e) { + if (!this._emptyDemTexture) { + const u = this.painter.context, + d = new s.R({ width: 1, height: 1 }, new Uint8Array(4)); + (this._emptyDepthTexture = new s.T(u, d, u.gl.RGBA, { + premultiply: !1, + })), + (this._emptyDemUnpack = [0, 0, 0, 0]), + (this._emptyDemTexture = new s.T( + u, + new s.R({ width: 1, height: 1 }), + u.gl.RGBA, + { premultiply: !1 } + )), + this._emptyDemTexture.bind( + u.gl.NEAREST, + u.gl.CLAMP_TO_EDGE + ), + (this._emptyDemMatrix = s.ag([])); + } + const i = this.sourceCache.getSourceTile(e, !0); + if (i && i.dem && (!i.demTexture || i.needsTerrainPrepare)) { + const u = this.painter.context; + (i.demTexture = this.painter.getTileTexture(i.dem.stride)), + i.demTexture + ? i.demTexture.update(i.dem.getPixels(), { + premultiply: !1, + }) + : (i.demTexture = new s.T( + u, + i.dem.getPixels(), + u.gl.RGBA, + { premultiply: !1 } + )), + i.demTexture.bind(u.gl.NEAREST, u.gl.CLAMP_TO_EDGE), + (i.needsTerrainPrepare = !1); + } + const l = i && i + i.tileID.key + e.key; + if (l && !this._demMatrixCache[l]) { + const u = this.sourceCache.sourceCache._source.maxzoom; + let d = e.canonical.z - i.tileID.canonical.z; + e.overscaledZ > e.canonical.z && + (e.canonical.z >= u + ? (d = e.canonical.z - u) + : s.w( + "cannot calculate elevation if elevation maxzoom > source.maxzoom" + )); + const g = e.canonical.x - ((e.canonical.x >> d) << d), + w = e.canonical.y - ((e.canonical.y >> d) << d), + C = s.cu(new Float64Array(16), [ + 1 / (s.$ << d), + 1 / (s.$ << d), + 0, + ]); + s.M(C, C, [g * s.$, w * s.$, 0]), + (this._demMatrixCache[e.key] = { matrix: C, coord: e }); + } + return { + u_depth: 2, + u_terrain: 3, + u_terrain_dim: (i && i.dem && i.dem.dim) || 1, + u_terrain_matrix: l + ? this._demMatrixCache[e.key].matrix + : this._emptyDemMatrix, + u_terrain_unpack: + (i && i.dem && i.dem.getUnpackVector()) || + this._emptyDemUnpack, + u_terrain_exaggeration: this.exaggeration, + texture: ((i && i.demTexture) || this._emptyDemTexture) + .texture, + depthTexture: ( + this._fboDepthTexture || this._emptyDepthTexture + ).texture, + tile: i, + }; + } + getFramebuffer(e) { + const i = this.painter, + l = i.width / devicePixelRatio, + u = i.height / devicePixelRatio; + return ( + !this._fbo || + (this._fbo.width === l && this._fbo.height === u) || + (this._fbo.destroy(), + this._fboCoordsTexture.destroy(), + this._fboDepthTexture.destroy(), + delete this._fbo, + delete this._fboDepthTexture, + delete this._fboCoordsTexture), + this._fboCoordsTexture || + ((this._fboCoordsTexture = new s.T( + i.context, + { width: l, height: u, data: null }, + i.context.gl.RGBA, + { premultiply: !1 } + )), + this._fboCoordsTexture.bind( + i.context.gl.NEAREST, + i.context.gl.CLAMP_TO_EDGE + )), + this._fboDepthTexture || + ((this._fboDepthTexture = new s.T( + i.context, + { width: l, height: u, data: null }, + i.context.gl.RGBA, + { premultiply: !1 } + )), + this._fboDepthTexture.bind( + i.context.gl.NEAREST, + i.context.gl.CLAMP_TO_EDGE + )), + this._fbo || + ((this._fbo = i.context.createFramebuffer(l, u, !0, !1)), + this._fbo.depthAttachment.set( + i.context.createRenderbuffer( + i.context.gl.DEPTH_COMPONENT16, + l, + u + ) + )), + this._fbo.colorAttachment.set( + e === "coords" + ? this._fboCoordsTexture.texture + : this._fboDepthTexture.texture + ), + this._fbo + ); + } + getCoordsTexture() { + const e = this.painter.context; + if (this._coordsTexture) return this._coordsTexture; + const i = new Uint8Array( + this._coordsTextureSize * this._coordsTextureSize * 4 + ); + for (let d = 0, g = 0; d < this._coordsTextureSize; d++) + for (let w = 0; w < this._coordsTextureSize; w++, g += 4) + (i[g + 0] = 255 & w), + (i[g + 1] = 255 & d), + (i[g + 2] = ((w >> 8) << 4) | (d >> 8)), + (i[g + 3] = 0); + const l = new s.R( + { + width: this._coordsTextureSize, + height: this._coordsTextureSize, + }, + new Uint8Array(i.buffer) + ), + u = new s.T(e, l, e.gl.RGBA, { premultiply: !1 }); + return ( + u.bind(e.gl.NEAREST, e.gl.CLAMP_TO_EDGE), + (this._coordsTexture = u), + u + ); + } + pointCoordinate(e) { + this.painter.maybeDrawDepthAndCoords(!0); + const i = new Uint8Array(4), + l = this.painter.context, + u = l.gl, + d = Math.round( + (e.x * this.painter.pixelRatio) / devicePixelRatio + ), + g = Math.round( + (e.y * this.painter.pixelRatio) / devicePixelRatio + ), + w = Math.round(this.painter.height / devicePixelRatio); + l.bindFramebuffer.set( + this.getFramebuffer("coords").framebuffer + ), + u.readPixels( + d, + w - g - 1, + 1, + 1, + u.RGBA, + u.UNSIGNED_BYTE, + i + ), + l.bindFramebuffer.set(null); + const C = i[0] + ((i[2] >> 4) << 8), + P = i[1] + ((15 & i[2]) << 8), + E = this.coordsIndex[255 - i[3]], + R = E && this.sourceCache.getTileByID(E); + if (!R) return null; + const D = this._coordsTextureSize, + N = (1 << R.tileID.canonical.z) * D; + return new s.a1( + (R.tileID.canonical.x * D + C) / N + R.tileID.wrap, + (R.tileID.canonical.y * D + P) / N, + this.getElevation(R.tileID, C, P, D) + ); + } + depthAtPoint(e) { + const i = new Uint8Array(4), + l = this.painter.context, + u = l.gl; + return ( + l.bindFramebuffer.set( + this.getFramebuffer("depth").framebuffer + ), + u.readPixels( + e.x, + this.painter.height / devicePixelRatio - e.y - 1, + 1, + 1, + u.RGBA, + u.UNSIGNED_BYTE, + i + ), + l.bindFramebuffer.set(null), + (i[0] / 16777216 + i[1] / 65536 + i[2] / 256 + i[3]) / 256 + ); + } + getTerrainMesh(e) { + var i; + const l = + ((i = this.painter.style.projection) === null || + i === void 0 + ? void 0 + : i.transitionState) > 0, + u = l && e.canonical.y === 0, + d = l && e.canonical.y === (1 << e.canonical.z) - 1, + g = `m_${u ? "n" : ""}_${d ? "s" : ""}`; + if (this._meshCache[g]) return this._meshCache[g]; + const w = this.painter.context, + C = new s.cv(), + P = new s.aN(), + E = this.meshSize, + R = s.$ / E, + D = E * E; + for (let _e = 0; _e <= E; _e++) + for (let Be = 0; Be <= E; Be++) + C.emplaceBack(Be * R, _e * R, 0); + for (let _e = 0; _e < D; _e += E + 1) + for (let Be = 0; Be < E; Be++) + P.emplaceBack(Be + _e, E + Be + _e + 1, E + Be + _e + 2), + P.emplaceBack(Be + _e, E + Be + _e + 2, Be + _e + 1); + const N = C.length, + G = N + (E + 1), + te = (E + 1) * E, + Q = u ? s.bh : 0, + ae = u ? 0 : 1, + ce = d ? s.bi : s.$, + ve = d ? 0 : 1; + for (let _e = 0; _e <= E; _e++) C.emplaceBack(_e * R, Q, ae); + for (let _e = 0; _e <= E; _e++) C.emplaceBack(_e * R, ce, ve); + for (let _e = 0; _e < E; _e++) + P.emplaceBack(te + _e, G + _e, G + _e + 1), + P.emplaceBack(te + _e, G + _e + 1, te + _e + 1), + P.emplaceBack(0 + _e, N + _e + 1, N + _e), + P.emplaceBack(0 + _e, 0 + _e + 1, N + _e + 1); + const me = C.length, + be = me + 2 * (E + 1); + for (const _e of [0, 1]) + for (let Be = 0; Be <= E; Be++) + for (const rt of [0, 1]) + C.emplaceBack(_e * s.$, Be * R, rt); + for (let _e = 0; _e < 2 * E; _e += 2) + P.emplaceBack(me + _e, me + _e + 1, me + _e + 3), + P.emplaceBack(me + _e, me + _e + 3, me + _e + 2), + P.emplaceBack(be + _e, be + _e + 3, be + _e + 1), + P.emplaceBack(be + _e, be + _e + 2, be + _e + 3); + const Pe = new Tn( + w.createVertexBuffer(C, ql.members), + w.createIndexBuffer(P), + s.aM.simpleSegment(0, 0, C.length, P.length) + ); + return (this._meshCache[g] = Pe), Pe; + } + getMeshFrameDelta(e) { + return (2 * Math.PI * s.bu) / Math.pow(2, Math.max(e, 0)) / 5; + } + getMinTileElevationForLngLatZoom(e, i) { + var l; + const { tileID: u } = this._getOverscaledTileIDFromLngLatZoom( + e, + i + ); + return (l = this.getMinMaxElevation(u).minElevation) !== + null && l !== void 0 + ? l + : 0; + } + getMinMaxElevation(e) { + const i = this.getTerrainData(e).tile, + l = { minElevation: null, maxElevation: null }; + return ( + i && + i.dem && + ((l.minElevation = i.dem.min * this.exaggeration), + (l.maxElevation = i.dem.max * this.exaggeration)), + l + ); + } + _getOverscaledTileIDFromLngLatZoom(e, i) { + const l = s.a1.fromLngLat(e.wrap()), + u = (1 << i) * s.$, + d = l.x * u, + g = l.y * u, + w = Math.floor(d / s.$), + C = Math.floor(g / s.$); + return { + tileID: new s.Z(i, 0, i, w, C), + mercatorX: d, + mercatorY: g, + }; + } + } + class Zl { + constructor(e, i, l) { + (this._context = e), + (this._size = i), + (this._tileSize = l), + (this._objects = []), + (this._recentlyUsed = []), + (this._stamp = 0); + } + destruct() { + for (const e of this._objects) + e.texture.destroy(), e.fbo.destroy(); + } + _createObject(e) { + const i = this._context.createFramebuffer( + this._tileSize, + this._tileSize, + !0, + !0 + ), + l = new s.T( + this._context, + { + width: this._tileSize, + height: this._tileSize, + data: null, + }, + this._context.gl.RGBA + ); + return ( + l.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 + ), + i.depthAttachment.set( + this._context.createRenderbuffer( + this._context.gl.DEPTH_STENCIL, + this._tileSize, + this._tileSize + ) + ), + i.colorAttachment.set(l.texture), + { id: e, fbo: i, texture: l, stamp: -1, inUse: !1 } + ); + } + getObjectForId(e) { + return this._objects[e]; + } + useObject(e) { + (e.inUse = !0), + (this._recentlyUsed = this._recentlyUsed.filter( + (i) => e.id !== i + )), + this._recentlyUsed.push(e.id); + } + stampObject(e) { + e.stamp = ++this._stamp; + } + getOrCreateFreeObject() { + for (const i of this._recentlyUsed) + if (!this._objects[i].inUse) return this._objects[i]; + if (this._objects.length >= this._size) + throw new Error( + "No free RenderPool available, call freeAllObjects() required!" + ); + const e = this._createObject(this._objects.length); + return this._objects.push(e), e; + } + freeObject(e) { + e.inUse = !1; + } + freeAllObjects() { + for (const e of this._objects) this.freeObject(e); + } + isFull() { + return ( + !(this._objects.length < this._size) && + this._objects.some((e) => !e.inUse) === !1 + ); + } + } + const _o = { + background: !0, + fill: !0, + line: !0, + raster: !0, + hillshade: !0, + "color-relief": !0, + }; + class Ul { + constructor(e, i) { + (this.painter = e), + (this.terrain = i), + (this.pool = new Zl( + e.context, + 30, + i.sourceCache.tileSize * i.qualityFactor + )); + } + destruct() { + this.pool.destruct(); + } + getTexture(e) { + return this.pool.getObjectForId( + e.rtt[this._stacks.length - 1].id + ).texture; + } + prepareForRender(e, i) { + (this._stacks = []), + (this._prevType = null), + (this._rttTiles = []), + (this._renderableTiles = + this.terrain.sourceCache.getRenderableTiles()), + (this._renderableLayerIds = e._order.filter( + (l) => !e._layers[l].isHidden(i) + )), + (this._coordsAscending = {}); + for (const l in e.sourceCaches) { + this._coordsAscending[l] = {}; + const u = e.sourceCaches[l].getVisibleCoordinates(), + d = e.sourceCaches[l].getSource(), + g = d instanceof Ot ? d.terrainTileRanges : null; + for (const w of u) { + const C = this.terrain.sourceCache.getTerrainCoords(w, g); + for (const P in C) + this._coordsAscending[l][P] || + (this._coordsAscending[l][P] = []), + this._coordsAscending[l][P].push(C[P]); + } + } + this._coordsAscendingStr = {}; + for (const l of e._order) { + const u = e._layers[l], + d = u.source; + if (_o[u.type] && !this._coordsAscendingStr[d]) { + this._coordsAscendingStr[d] = {}; + for (const g in this._coordsAscending[d]) + this._coordsAscendingStr[d][g] = this._coordsAscending[ + d + ][g] + .map((w) => w.key) + .sort() + .join(); + } + } + for (const l of this._renderableTiles) + for (const u in this._coordsAscendingStr) { + const d = this._coordsAscendingStr[u][l.tileID.key]; + d && d !== l.rttCoords[u] && (l.rtt = []); + } + } + renderLayer(e, i) { + if (e.isHidden(this.painter.transform.zoom)) return !1; + const l = Object.assign(Object.assign({}, i), { + isRenderingToTexture: !0, + }), + u = e.type, + d = this.painter, + g = + this._renderableLayerIds[ + this._renderableLayerIds.length - 1 + ] === e.id; + if ( + _o[u] && + ((this._prevType && _o[this._prevType]) || + this._stacks.push([]), + (this._prevType = u), + this._stacks[this._stacks.length - 1].push(e.id), + !g) + ) + return !0; + if (_o[this._prevType] || (_o[u] && g)) { + this._prevType = u; + const w = this._stacks.length - 1, + C = this._stacks[w] || []; + for (const P of this._renderableTiles) { + if ( + (this.pool.isFull() && + (Bl(this.painter, this.terrain, this._rttTiles, l), + (this._rttTiles = []), + this.pool.freeAllObjects()), + this._rttTiles.push(P), + P.rtt[w]) + ) { + const R = this.pool.getObjectForId(P.rtt[w].id); + if (R.stamp === P.rtt[w].stamp) { + this.pool.useObject(R); + continue; + } + } + const E = this.pool.getOrCreateFreeObject(); + this.pool.useObject(E), + this.pool.stampObject(E), + (P.rtt[w] = { id: E.id, stamp: E.stamp }), + d.context.bindFramebuffer.set(E.fbo.framebuffer), + d.context.clear({ + color: s.bf.transparent, + stencil: 0, + }), + (d.currentStencilSource = void 0); + for (let R = 0; R < C.length; R++) { + const D = d.style._layers[C[R]], + N = D.source + ? this._coordsAscending[D.source][P.tileID.key] + : [P.tileID]; + d.context.viewport.set([ + 0, + 0, + E.fbo.width, + E.fbo.height, + ]), + d._renderTileClippingMasks(D, N, !0), + d.renderLayer( + d, + d.style.sourceCaches[D.source], + D, + N, + l + ), + D.source && + (P.rttCoords[D.source] = + this._coordsAscendingStr[D.source][P.tileID.key]); + } + } + return ( + Bl(this.painter, this.terrain, this._rttTiles, l), + (this._rttTiles = []), + this.pool.freeAllObjects(), + _o[u] + ); + } + return !1; + } + } + const Ui = { + "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": "Reset bearing to 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", + }, + Td = B, + xa = { + hash: !1, + interactive: !0, + bearingSnap: 7, + attributionControl: uu, + 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, + maxTileCacheSize: null, + maxTileCacheZoomLevels: s.a.MAX_TILE_CACHE_ZOOM_LEVELS, + transformRequest: null, + transformCameraUpdate: null, + fadeDuration: 300, + crossSourceCollisions: !0, + clickTolerance: 3, + localIdeographFontFamily: "sans-serif", + pitchWithRotate: !0, + rollEnabled: !1, + validateStyle: !0, + maxCanvasSize: [4096, 4096], + cancelPendingTileRequestsWhileZooming: !0, + centerClampedToGround: !0, + }, + $p = { + showCompass: !0, + showZoom: !0, + visualizePitch: !1, + visualizeRoll: !0, + }; + class Ks { + constructor(e, i, l = !1) { + (this.mousedown = (d) => { + this.startMove(d, H.mousePos(this.element, d)), + H.addEventListener(window, "mousemove", this.mousemove), + H.addEventListener(window, "mouseup", this.mouseup); + }), + (this.mousemove = (d) => { + this.move(d, H.mousePos(this.element, d)); + }), + (this.mouseup = (d) => { + this._rotatePitchHandler.dragEnd(d), this.offTemp(); + }), + (this.touchstart = (d) => { + d.targetTouches.length !== 1 + ? this.reset() + : ((this._startPos = this._lastPos = + H.touchPos(this.element, d.targetTouches)[0]), + this.startMove(d, this._startPos), + H.addEventListener( + window, + "touchmove", + this.touchmove, + { passive: !1 } + ), + H.addEventListener( + window, + "touchend", + this.touchend + )); + }), + (this.touchmove = (d) => { + d.targetTouches.length !== 1 + ? this.reset() + : ((this._lastPos = H.touchPos( + this.element, + d.targetTouches + )[0]), + this.move(d, this._lastPos)); + }), + (this.touchend = (d) => { + d.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 = i); + const u = new qp(); + (this._rotatePitchHandler = new ss({ + clickTolerance: 3, + move: (d, g) => { + const w = i.getBoundingClientRect(), + C = new s.P( + (w.bottom - w.top) / 2, + (w.right - w.left) / 2 + ); + return { + bearingDelta: s.cn(new s.P(d.x, g.y), g, C), + pitchDelta: l ? -0.5 * (g.y - d.y) : void 0, + }; + }, + moveStateManager: u, + enable: !0, + assignEvents: () => {}, + })), + (this.map = e), + H.addEventListener(i, "mousedown", this.mousedown), + H.addEventListener(i, "touchstart", this.touchstart, { + passive: !1, + }), + H.addEventListener(i, "touchcancel", this.reset); + } + startMove(e, i) { + this._rotatePitchHandler.dragStart(e, i), H.disableDrag(); + } + move(e, i) { + const l = this.map, + { bearingDelta: u, pitchDelta: d } = + this._rotatePitchHandler.dragMove(e, i) || {}; + u && l.setBearing(l.getBearing() + u), + d && l.setPitch(l.getPitch() + d); + } + off() { + const e = this.element; + H.removeEventListener(e, "mousedown", this.mousedown), + H.removeEventListener(e, "touchstart", this.touchstart, { + passive: !1, + }), + H.removeEventListener(window, "touchmove", this.touchmove, { + passive: !1, + }), + H.removeEventListener(window, "touchend", this.touchend), + H.removeEventListener(e, "touchcancel", this.reset), + this.offTemp(); + } + offTemp() { + H.enableDrag(), + H.removeEventListener(window, "mousemove", this.mousemove), + H.removeEventListener(window, "mouseup", this.mouseup), + H.removeEventListener(window, "touchmove", this.touchmove, { + passive: !1, + }), + H.removeEventListener(window, "touchend", this.touchend); + } + } + let Dn; + function ti(h, e, i, l = !1) { + if ( + l || + !i.getCoveringTilesDetailsProvider().allowWorldCopies() + ) + return h == null ? void 0 : h.wrap(); + const u = new s.S(h.lng, h.lat); + if (((h = new s.S(h.lng, h.lat)), e)) { + const d = new s.S(h.lng - 360, h.lat), + g = new s.S(h.lng + 360, h.lat), + w = i.locationToScreenPoint(h).distSqr(e); + i.locationToScreenPoint(d).distSqr(e) < w + ? (h = d) + : i.locationToScreenPoint(g).distSqr(e) < w && (h = g); + } + for (; Math.abs(h.lng - i.center.lng) > 180; ) { + const d = i.locationToScreenPoint(h); + if (d.x >= 0 && d.y >= 0 && d.x <= i.width && d.y <= i.height) + break; + h.lng > i.center.lng ? (h.lng -= 360) : (h.lng += 360); + } + return h.lng !== u.lng && + i.isPointOnMapSurface(i.locationToScreenPoint(h)) + ? h + : u; + } + const $l = { + 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 hs(h, e, i) { + const l = h.classList; + for (const u in $l) l.remove(`maplibregl-${i}-anchor-${u}`); + l.add(`maplibregl-${i}-anchor-${e}`); + } + class ds extends s.E { + constructor(e) { + if ( + (super(), + (this._onKeyPress = (i) => { + const l = i.code, + u = i.charCode || i.keyCode; + (l !== "Space" && + l !== "Enter" && + u !== 32 && + u !== 13) || + this.togglePopup(); + }), + (this._onMapClick = (i) => { + const l = i.originalEvent.target, + u = this._element; + this._popup && + (l === u || u.contains(l)) && + this.togglePopup(); + }), + (this._update = (i) => { + if (!this._map) return; + const l = this._map.loaded() && !this._map.isMoving(); + ((i == null ? void 0 : i.type) === "terrain" || + ((i == null ? void 0 : i.type) === "render" && !l)) && + this._map.once("render", this._update), + (this._lngLat = ti( + 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 u = ""; + this._rotationAlignment === "viewport" || + this._rotationAlignment === "auto" + ? (u = `rotateZ(${this._rotation}deg)`) + : this._rotationAlignment === "map" && + (u = `rotateZ(${ + this._rotation - this._map.getBearing() + }deg)`); + let d = ""; + this._pitchAlignment === "viewport" || + this._pitchAlignment === "auto" + ? (d = "rotateX(0deg)") + : this._pitchAlignment === "map" && + (d = `rotateX(${this._map.getPitch()}deg)`), + this._subpixelPositioning || + (i && i.type !== "moveend") || + (this._pos = this._pos.round()), + H.setTransform( + this._element, + `${$l[this._anchor]} translate(${this._pos.x}px, ${ + this._pos.y + }px) ${d} ${u}` + ), + ne + .frameAsync(new AbortController()) + .then(() => { + this._updateOpacity(i && i.type === "moveend"); + }) + .catch(() => {}); + }), + (this._onMove = (i) => { + if (!this._isDragging) { + const l = + this._clickTolerance || this._map._clickTolerance; + this._isDragging = + i.point.dist(this._pointerdownPos) >= l; + } + this._isDragging && + ((this._pos = i.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 s.l("dragstart"))), + this.fire(new s.l("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 s.l("dragend")), + (this._state = "inactive"); + }), + (this._addDragHandler = (i) => { + this._element.contains(i.originalEvent.target) && + (i.preventDefault(), + (this._positionDelta = i.point + .sub(this._pos) + .add(this._offset)), + (this._pointerdownPos = i.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 = (e && e.anchor) || "center"), + (this._color = (e && e.color) || "#3FB1CE"), + (this._scale = (e && e.scale) || 1), + (this._draggable = (e && e.draggable) || !1), + (this._clickTolerance = (e && e.clickTolerance) || 0), + (this._subpixelPositioning = + (e && e.subpixelPositioning) || !1), + (this._isDragging = !1), + (this._state = "inactive"), + (this._rotation = (e && e.rotation) || 0), + (this._rotationAlignment = + (e && e.rotationAlignment) || "auto"), + (this._pitchAlignment = + e && e.pitchAlignment && e.pitchAlignment !== "auto" + ? e.pitchAlignment + : this._rotationAlignment), + this.setOpacity( + e == null ? void 0 : e.opacity, + e == null ? void 0 : e.opacityWhenCovered + ), + e && e.element) + ) + (this._element = e.element), + (this._offset = s.P.convert((e && e.offset) || [0, 0])); + else { + (this._defaultMarker = !0), + (this._element = H.create("div")); + const i = H.createNS("http://www.w3.org/2000/svg", "svg"), + l = 41, + u = 27; + i.setAttributeNS(null, "display", "block"), + i.setAttributeNS(null, "height", `${l}px`), + i.setAttributeNS(null, "width", `${u}px`), + i.setAttributeNS(null, "viewBox", `0 0 ${u} ${l}`); + const d = H.createNS("http://www.w3.org/2000/svg", "g"); + d.setAttributeNS(null, "stroke", "none"), + d.setAttributeNS(null, "stroke-width", "1"), + d.setAttributeNS(null, "fill", "none"), + d.setAttributeNS(null, "fill-rule", "evenodd"); + const g = H.createNS("http://www.w3.org/2000/svg", "g"); + g.setAttributeNS(null, "fill-rule", "nonzero"); + const w = H.createNS("http://www.w3.org/2000/svg", "g"); + w.setAttributeNS(null, "transform", "translate(3.0, 29.0)"), + w.setAttributeNS(null, "fill", "#000000"); + const C = [ + { 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 ae of C) { + const ce = H.createNS( + "http://www.w3.org/2000/svg", + "ellipse" + ); + ce.setAttributeNS(null, "opacity", "0.04"), + ce.setAttributeNS(null, "cx", "10.5"), + ce.setAttributeNS(null, "cy", "5.80029008"), + ce.setAttributeNS(null, "rx", ae.rx), + ce.setAttributeNS(null, "ry", ae.ry), + w.appendChild(ce); + } + const P = H.createNS("http://www.w3.org/2000/svg", "g"); + P.setAttributeNS(null, "fill", this._color); + const E = H.createNS("http://www.w3.org/2000/svg", "path"); + E.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" + ), + P.appendChild(E); + const R = H.createNS("http://www.w3.org/2000/svg", "g"); + R.setAttributeNS(null, "opacity", "0.25"), + R.setAttributeNS(null, "fill", "#000000"); + const D = H.createNS("http://www.w3.org/2000/svg", "path"); + D.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" + ), + R.appendChild(D); + const N = H.createNS("http://www.w3.org/2000/svg", "g"); + N.setAttributeNS(null, "transform", "translate(6.0, 7.0)"), + N.setAttributeNS(null, "fill", "#FFFFFF"); + const G = H.createNS("http://www.w3.org/2000/svg", "g"); + G.setAttributeNS(null, "transform", "translate(8.0, 8.0)"); + const te = H.createNS( + "http://www.w3.org/2000/svg", + "circle" + ); + te.setAttributeNS(null, "fill", "#000000"), + te.setAttributeNS(null, "opacity", "0.25"), + te.setAttributeNS(null, "cx", "5.5"), + te.setAttributeNS(null, "cy", "5.5"), + te.setAttributeNS(null, "r", "5.4999962"); + const Q = H.createNS( + "http://www.w3.org/2000/svg", + "circle" + ); + Q.setAttributeNS(null, "fill", "#FFFFFF"), + Q.setAttributeNS(null, "cx", "5.5"), + Q.setAttributeNS(null, "cy", "5.5"), + Q.setAttributeNS(null, "r", "5.4999962"), + G.appendChild(te), + G.appendChild(Q), + g.appendChild(w), + g.appendChild(P), + g.appendChild(R), + g.appendChild(N), + g.appendChild(G), + i.appendChild(g), + i.setAttributeNS(null, "height", l * this._scale + "px"), + i.setAttributeNS(null, "width", u * this._scale + "px"), + this._element.appendChild(i), + (this._offset = s.P.convert((e && e.offset) || [0, -14])); + } + if ( + (this._element.classList.add("maplibregl-marker"), + this._element.addEventListener("dragstart", (i) => { + i.preventDefault(); + }), + this._element.addEventListener("mousedown", (i) => { + i.preventDefault(); + }), + hs(this._element, this._anchor, "marker"), + e && e.className) + ) + for (const i of e.className.split(" ")) + this._element.classList.add(i); + this._popup = null; + } + addTo(e) { + return ( + this.remove(), + (this._map = e), + this._element.hasAttribute("aria-label") || + this._element.setAttribute( + "aria-label", + e._getUIString("Marker.Title") + ), + e.getCanvasContainer().appendChild(this._element), + e.on("move", this._update), + e.on("moveend", this._update), + e.on("terrain", this._update), + e.on("projectiontransition", this._update), + 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), + H.remove(this._element), + this._popup && this._popup.remove(), + this + ); + } + getLngLat() { + return this._lngLat; + } + setLngLat(e) { + return ( + (this._lngLat = s.S.convert(e)), + (this._pos = null), + this._popup && this._popup.setLngLat(this._lngLat), + this._update(), + this + ); + } + getElement() { + return this._element; + } + setPopup(e) { + if ( + (this._popup && + (this._popup.remove(), + (this._popup = null), + this._element.removeEventListener( + "keypress", + this._onKeyPress + ), + this._originalTabIndex || + this._element.removeAttribute("tabindex")), + e) + ) { + if (!("offset" in e.options)) { + const u = Math.abs(13.5) / Math.SQRT2; + e.options.offset = this._defaultMarker + ? { + top: [0, 0], + "top-left": [0, 0], + "top-right": [0, 0], + bottom: [0, -38.1], + "bottom-left": [u, -1 * (38.1 - 13.5 + u)], + "bottom-right": [-u, -1 * (38.1 - 13.5 + u)], + left: [13.5, -1 * (38.1 - 13.5)], + right: [-13.5, -1 * (38.1 - 13.5)], + } + : this._offset; + } + (this._popup = e), + (this._originalTabIndex = + this._element.getAttribute("tabindex")), + this._originalTabIndex || + this._element.setAttribute("tabindex", "0"), + this._element.addEventListener( + "keypress", + this._onKeyPress + ); + } + return this; + } + setSubpixelPositioning(e) { + return (this._subpixelPositioning = e), this; + } + getPopup() { + return this._popup; + } + togglePopup() { + const e = this._popup; + return this._element.style.opacity === + this._opacityWhenCovered + ? this + : e + ? (e.isOpen() + ? e.remove() + : (e.setLngLat(this._lngLat), e.addTo(this._map)), + this) + : this; + } + _updateOpacity(e = !1) { + var i, l; + const u = + (i = this._map) === null || i === void 0 + ? void 0 + : i.terrain, + d = this._map.transform.isLocationOccluded(this._lngLat); + if (!u || d) { + const N = d ? this._opacityWhenCovered : this._opacity; + return void ( + this._element.style.opacity !== N && + (this._element.style.opacity = N) + ); + } + if (e) this._opacityTimeout = null; + else { + if (this._opacityTimeout) return; + this._opacityTimeout = setTimeout(() => { + this._opacityTimeout = null; + }, 100); + } + const g = this._map, + w = g.terrain.depthAtPoint(this._pos), + C = g.terrain.getElevationForLngLatZoom( + this._lngLat, + g.transform.tileZoom + ); + if ( + g.transform.lngLatToCameraDepth(this._lngLat, C) - w < + 0.006 + ) + return void (this._element.style.opacity = this._opacity); + const P = -this._offset.y / g.transform.pixelsPerMeter, + E = Math.sin((g.getPitch() * Math.PI) / 180) * P, + R = g.terrain.depthAtPoint( + new s.P(this._pos.x, this._pos.y - this._offset.y) + ), + D = + g.transform.lngLatToCameraDepth(this._lngLat, C + E) - R > + 0.006; + !((l = this._popup) === null || l === void 0) && + l.isOpen() && + D && + this._popup.remove(), + (this._element.style.opacity = D + ? this._opacityWhenCovered + : this._opacity); + } + getOffset() { + return this._offset; + } + setOffset(e) { + return (this._offset = s.P.convert(e)), this._update(), this; + } + addClassName(e) { + this._element.classList.add(e); + } + removeClassName(e) { + this._element.classList.remove(e); + } + toggleClassName(e) { + return this._element.classList.toggle(e); + } + setDraggable(e) { + return ( + (this._draggable = !!e), + this._map && + (e + ? (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(e) { + return (this._rotation = e || 0), this._update(), this; + } + getRotation() { + return this._rotation; + } + setRotationAlignment(e) { + return ( + (this._rotationAlignment = e || "auto"), + this._update(), + this + ); + } + getRotationAlignment() { + return this._rotationAlignment; + } + setPitchAlignment(e) { + return ( + (this._pitchAlignment = + e && e !== "auto" ? e : this._rotationAlignment), + this._update(), + this + ); + } + getPitchAlignment() { + return this._pitchAlignment; + } + setOpacity(e, i) { + return ( + (this._opacity === void 0 || + (e === void 0 && i === void 0)) && + ((this._opacity = "1"), + (this._opacityWhenCovered = "0.2")), + e !== void 0 && (this._opacity = e), + i !== void 0 && (this._opacityWhenCovered = i), + this._map && this._updateOpacity(!0), + this + ); + } + } + const du = { + positionOptions: { + enableHighAccuracy: !1, + maximumAge: 0, + timeout: 6e3, + }, + fitBoundsOptions: { maxZoom: 15 }, + trackUserLocation: !1, + showAccuracyCircle: !0, + showUserLocation: !0, + }; + let ps = 0, + No = !1; + const Js = { maxWidth: 100, unit: "metric" }; + function Gl(h, e, i) { + const l = (i && i.maxWidth) || 100, + u = h._container.clientHeight / 2, + d = h._container.clientWidth / 2, + g = h.unproject([d - l / 2, u]), + w = h.unproject([d + l / 2, u]), + C = Math.round(h.project(w).x - h.project(g).x), + P = Math.min(l, C, h._container.clientWidth), + E = g.distanceTo(w); + if (i && i.unit === "imperial") { + const R = 3.2808 * E; + R > 5280 + ? jo(e, P, R / 5280, h._getUIString("ScaleControl.Miles")) + : jo(e, P, R, h._getUIString("ScaleControl.Feet")); + } else i && i.unit === "nautical" ? jo(e, P, E / 1852, h._getUIString("ScaleControl.NauticalMiles")) : E >= 1e3 ? jo(e, P, E / 1e3, h._getUIString("ScaleControl.Kilometers")) : jo(e, P, E, h._getUIString("ScaleControl.Meters")); + } + function jo(h, e, i, l) { + const u = (function (d) { + const g = Math.pow(10, `${Math.floor(d)}`.length - 1); + let w = d / g; + return ( + (w = + w >= 10 + ? 10 + : w >= 5 + ? 5 + : w >= 3 + ? 3 + : w >= 2 + ? 2 + : w >= 1 + ? 1 + : (function (C) { + const P = Math.pow( + 10, + Math.ceil(-Math.log(C) / Math.LN10) + ); + return Math.round(C * P) / P; + })(w)), + g * w + ); + })(i); + (h.style.width = e * (u / i) + "px"), + (h.innerHTML = `${u} ${l}`); + } + const pu = { + closeButton: !0, + closeOnClick: !0, + focusAfterOpen: !0, + className: "", + maxWidth: "240px", + subpixelPositioning: !1, + locationOccludedOpacity: void 0, + }, + fu = [ + "a[href]", + "[tabindex]:not([tabindex='-1'])", + "[contenteditable]:not([contenteditable='false'])", + "button:not([disabled])", + "input:not([disabled])", + "select:not([disabled])", + "textarea:not([disabled])", + ].join(", "); + function Hl(h) { + if (h) { + if (typeof h == "number") { + const e = Math.round(Math.abs(h) / Math.SQRT2); + return { + center: new s.P(0, 0), + top: new s.P(0, h), + "top-left": new s.P(e, e), + "top-right": new s.P(-e, e), + bottom: new s.P(0, -h), + "bottom-left": new s.P(e, -e), + "bottom-right": new s.P(-e, -e), + left: new s.P(h, 0), + right: new s.P(-h, 0), + }; + } + if (h instanceof s.P || Array.isArray(h)) { + const e = s.P.convert(h); + return { + center: e, + top: e, + "top-left": e, + "top-right": e, + bottom: e, + "bottom-left": e, + "bottom-right": e, + left: e, + right: e, + }; + } + return { + center: s.P.convert(h.center || [0, 0]), + top: s.P.convert(h.top || [0, 0]), + "top-left": s.P.convert(h["top-left"] || [0, 0]), + "top-right": s.P.convert(h["top-right"] || [0, 0]), + bottom: s.P.convert(h.bottom || [0, 0]), + "bottom-left": s.P.convert(h["bottom-left"] || [0, 0]), + "bottom-right": s.P.convert(h["bottom-right"] || [0, 0]), + left: s.P.convert(h.left || [0, 0]), + right: s.P.convert(h.right || [0, 0]), + }; + } + return Hl(new s.P(0, 0)); + } + const mu = B; + (T.AJAXError = s.cz), + (T.Event = s.l), + (T.Evented = s.E), + (T.LngLat = s.S), + (T.MercatorCoordinate = s.a1), + (T.Point = s.P), + (T.addProtocol = s.cA), + (T.config = s.a), + (T.removeProtocol = s.cB), + (T.AttributionControl = hu), + (T.BoxZoomHandler = nu), + (T.CanvasSource = or), + (T.CooperativeGesturesHandler = xd), + (T.DoubleClickZoomHandler = ou), + (T.DragPanHandler = vd), + (T.DragRotateHandler = lu), + (T.EdgeInsets = Mn), + (T.FullscreenControl = class extends s.E { + constructor(h = {}) { + super(), + (this._onFullscreenChange = () => { + var e; + let i = + window.document.fullscreenElement || + window.document.mozFullScreenElement || + window.document.webkitFullscreenElement || + window.document.msFullscreenElement; + for ( + ; + !( + (e = i == null ? void 0 : i.shadowRoot) === null || + e === void 0 + ) && e.fullscreenElement; + + ) + i = i.shadowRoot.fullscreenElement; + (i === this._container) !== this._fullscreen && + this._handleFullscreenChange(); + }), + (this._onClickFullscreen = () => { + this._isFullscreen() + ? this._exitFullscreen() + : this._requestFullscreen(); + }), + (this._fullscreen = !1), + h && + h.container && + (h.container instanceof HTMLElement + ? (this._container = h.container) + : s.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(h) { + return ( + (this._map = h), + this._container || + (this._container = this._map.getContainer()), + (this._controlContainer = H.create( + "div", + "maplibregl-ctrl maplibregl-ctrl-group" + )), + this._setupUI(), + this._controlContainer + ); + } + onRemove() { + H.remove(this._controlContainer), + (this._map = null), + window.document.removeEventListener( + this._fullscreenchange, + this._onFullscreenChange + ); + } + _setupUI() { + const h = (this._fullscreenButton = H.create( + "button", + "maplibregl-ctrl-fullscreen", + this._controlContainer + )); + H.create("span", "maplibregl-ctrl-icon", h).setAttribute( + "aria-hidden", + "true" + ), + (h.type = "button"), + this._updateTitle(), + this._fullscreenButton.addEventListener( + "click", + this._onClickFullscreen + ), + window.document.addEventListener( + this._fullscreenchange, + this._onFullscreenChange + ); + } + _updateTitle() { + const h = this._getTitle(); + this._fullscreenButton.setAttribute("aria-label", h), + (this._fullscreenButton.title = h); + } + _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 s.l("fullscreenstart")), + (this._prevCooperativeGesturesEnabled = + this._map.cooperativeGestures.isEnabled()), + this._map.cooperativeGestures.disable()) + : (this.fire(new s.l("fullscreenend")), + this._prevCooperativeGesturesEnabled && + this._map.cooperativeGestures.enable()); + } + _exitFullscreen() { + window.document.exitFullscreen + ? window.document.exitFullscreen() + : window.document.mozCancelFullScreen + ? window.document.mozCancelFullScreen() + : window.document.msExitFullscreen + ? window.document.msExitFullscreen() + : window.document.webkitCancelFullScreen + ? window.document.webkitCancelFullScreen() + : this._togglePseudoFullScreen(); + } + _requestFullscreen() { + this._container.requestFullscreen + ? this._container.requestFullscreen() + : this._container.mozRequestFullScreen + ? this._container.mozRequestFullScreen() + : this._container.msRequestFullscreen + ? this._container.msRequestFullscreen() + : this._container.webkitRequestFullscreen + ? this._container.webkitRequestFullscreen() + : this._togglePseudoFullScreen(); + } + _togglePseudoFullScreen() { + this._container.classList.toggle( + "maplibregl-pseudo-fullscreen" + ), + this._handleFullscreenChange(), + this._map.resize(); + } + }), + (T.GeoJSONSource = Qt), + (T.GeolocateControl = class extends s.E { + constructor(h) { + super(), + (this._onSuccess = (e) => { + if (this._map) { + if (this._isOutOfMapMaxBounds(e)) + return ( + this._setErrorState(), + this.fire(new s.l("outofmaxbounds", e)), + this._updateMarker(), + void this._finish() + ); + if (this.options.trackUserLocation) + switch ( + ((this._lastKnownPosition = e), this._watchState) + ) { + case "WAITING_ACTIVE": + case "ACTIVE_LOCK": + case "ACTIVE_ERROR": + (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(e), + (this.options.trackUserLocation && + this._watchState !== "ACTIVE_LOCK") || + this._updateCamera(e), + this.options.showUserLocation && + this._dotElement.classList.remove( + "maplibregl-user-location-dot-stale" + ), + this.fire(new s.l("geolocate", e)), + this._finish(); + } + }), + (this._updateCamera = (e) => { + const i = new s.S( + e.coords.longitude, + e.coords.latitude + ), + l = e.coords.accuracy, + u = this._map.getBearing(), + d = s.e( + { bearing: u }, + this.options.fitBoundsOptions + ), + g = _t.fromLngLat(i, l); + this._map.fitBounds(g, d, { geolocateSource: !0 }); + }), + (this._updateMarker = (e) => { + if (e) { + const i = new s.S( + e.coords.longitude, + e.coords.latitude + ); + this._accuracyCircleMarker + .setLngLat(i) + .addTo(this._map), + this._userLocationDotMarker + .setLngLat(i) + .addTo(this._map), + (this._accuracy = e.coords.accuracy), + this.options.showUserLocation && + this.options.showAccuracyCircle && + this._updateCircleRadius(); + } else + this._userLocationDotMarker.remove(), + this._accuracyCircleMarker.remove(); + }), + (this._onZoom = () => { + this.options.showUserLocation && + this.options.showAccuracyCircle && + this._updateCircleRadius(); + }), + (this._onError = (e) => { + if (this._map) { + if (e.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 i = this._map._getUIString( + "GeolocateControl.LocationNotAvailable" + ); + (this._geolocateButton.title = i), + this._geolocateButton.setAttribute( + "aria-label", + i + ), + this._geolocationWatchID !== void 0 && + this._clearWatch(); + } else { + if (e.code === 3 && No) return; + this.options.trackUserLocation && + this._setErrorState(); + } + this._watchState !== "OFF" && + this.options.showUserLocation && + this._dotElement.classList.add( + "maplibregl-user-location-dot-stale" + ), + this.fire(new s.l("error", e)), + this._finish(); + } + }), + (this._finish = () => { + this._timeoutId && clearTimeout(this._timeoutId), + (this._timeoutId = void 0); + }), + (this._setupUI = () => { + this._map && + (this._container.addEventListener( + "contextmenu", + (e) => e.preventDefault() + ), + (this._geolocateButton = H.create( + "button", + "maplibregl-ctrl-geolocate", + this._container + )), + H.create( + "span", + "maplibregl-ctrl-icon", + this._geolocateButton + ).setAttribute("aria-hidden", "true"), + (this._geolocateButton.type = "button"), + (this._geolocateButton.disabled = !0)); + }), + (this._finishSetupUI = (e) => { + if (this._map) { + if (e === !1) { + s.w( + "Geolocation support is not available so the GeolocateControl will be disabled." + ); + const i = this._map._getUIString( + "GeolocateControl.LocationNotAvailable" + ); + (this._geolocateButton.disabled = !0), + (this._geolocateButton.title = i), + this._geolocateButton.setAttribute( + "aria-label", + i + ); + } else { + const i = this._map._getUIString( + "GeolocateControl.FindMyLocation" + ); + (this._geolocateButton.disabled = !1), + (this._geolocateButton.title = i), + this._geolocateButton.setAttribute( + "aria-label", + i + ); + } + this.options.trackUserLocation && + (this._geolocateButton.setAttribute( + "aria-pressed", + "false" + ), + (this._watchState = "OFF")), + this.options.showUserLocation && + ((this._dotElement = H.create( + "div", + "maplibregl-user-location-dot" + )), + (this._userLocationDotMarker = new ds({ + element: this._dotElement, + })), + (this._circleElement = H.create( + "div", + "maplibregl-user-location-accuracy-circle" + )), + (this._accuracyCircleMarker = new ds({ + element: this._circleElement, + pitchAlignment: "map", + })), + this.options.trackUserLocation && + (this._watchState = "OFF"), + this._map.on("zoom", this._onZoom)), + this._geolocateButton.addEventListener( + "click", + () => this.trigger() + ), + (this._setup = !0), + this.options.trackUserLocation && + this._map.on("movestart", (i) => { + const l = + (i == null ? void 0 : i[0]) instanceof + ResizeObserverEntry; + i.geolocateSource || + this._watchState !== "ACTIVE_LOCK" || + l || + 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 s.l("trackuserlocationend")), + this.fire(new s.l("userlocationlostfocus"))); + }); + } + }), + (this.options = s.e({}, du, h)); + } + onAdd(h) { + return ( + (this._map = h), + (this._container = H.create( + "div", + "maplibregl-ctrl maplibregl-ctrl-group" + )), + this._setupUI(), + (function () { + return s._(this, arguments, void 0, function* (e = !1) { + if (Dn !== void 0 && !e) return Dn; + if (window.navigator.permissions === void 0) + return (Dn = !!window.navigator.geolocation), Dn; + try { + Dn = + (yield window.navigator.permissions.query({ + name: "geolocation", + })).state !== "denied"; + } catch { + Dn = !!window.navigator.geolocation; + } + return Dn; + }); + })().then((e) => this._finishSetupUI(e)), + 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(), + H.remove(this._container), + this._map.off("zoom", this._onZoom), + (this._map = void 0), + (ps = 0), + (No = !1); + } + _isOutOfMapMaxBounds(h) { + const e = this._map.getMaxBounds(), + i = h.coords; + return ( + e && + (i.longitude < e.getWest() || + i.longitude > e.getEast() || + i.latitude < e.getSouth() || + i.latitude > e.getNorth()) + ); + } + _setErrorState() { + switch (this._watchState) { + case "WAITING_ACTIVE": + (this._watchState = "ACTIVE_ERROR"), + 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": + break; + default: + throw new Error( + `Unexpected watchState ${this._watchState}` + ); + } + } + _updateCircleRadius() { + const h = this._map.getBounds(), + e = h.getSouthEast(), + i = h.getNorthEast(), + l = e.distanceTo(i), + u = Math.ceil( + (this._accuracy / + (l / this._map._container.clientHeight)) * + 2 + ); + (this._circleElement.style.width = `${u}px`), + (this._circleElement.style.height = `${u}px`); + } + trigger() { + if (!this._setup) + return ( + s.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 s.l("trackuserlocationstart")); + break; + case "WAITING_ACTIVE": + case "ACTIVE_LOCK": + case "ACTIVE_ERROR": + case "BACKGROUND_ERROR": + ps--, + (No = !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 s.l("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 s.l("trackuserlocationstart")), + this.fire(new s.l("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 h; + this._geolocateButton.classList.add( + "maplibregl-ctrl-geolocate-waiting" + ), + this._geolocateButton.setAttribute( + "aria-pressed", + "true" + ), + ps++, + ps > 1 + ? ((h = { maximumAge: 6e5, timeout: 0 }), (No = !0)) + : ((h = this.options.positionOptions), (No = !1)), + (this._geolocationWatchID = + window.navigator.geolocation.watchPosition( + this._onSuccess, + this._onError, + h + )); + } + } 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); + } + }), + (T.GlobeControl = class { + constructor() { + (this._toggleProjection = () => { + var h; + const e = + (h = this._map.getProjection()) === null || h === void 0 + ? void 0 + : h.type; + this._map.setProjection( + e !== "mercator" && e + ? { type: "mercator" } + : { type: "globe" } + ), + this._updateGlobeIcon(); + }), + (this._updateGlobeIcon = () => { + var h; + this._globeButton.classList.remove( + "maplibregl-ctrl-globe" + ), + this._globeButton.classList.remove( + "maplibregl-ctrl-globe-enabled" + ), + ((h = this._map.getProjection()) === null || + h === void 0 + ? void 0 + : h.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(h) { + return ( + (this._map = h), + (this._container = H.create( + "div", + "maplibregl-ctrl maplibregl-ctrl-group" + )), + (this._globeButton = H.create( + "button", + "maplibregl-ctrl-globe", + this._container + )), + H.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._container + ); + } + onRemove() { + H.remove(this._container), + this._map.off("styledata", this._updateGlobeIcon), + this._globeButton.removeEventListener( + "click", + this._toggleProjection + ), + (this._map = void 0); + } + }), + (T.Hash = Fl), + (T.ImageSource = Ot), + (T.KeyboardHandler = jl), + (T.LngLatBounds = _t), + (T.LogoControl = wd), + (T.Map = class extends bd { + constructor(h) { + var e, i; + s.cw.mark(s.cx.create); + const l = Object.assign( + Object.assign(Object.assign({}, xa), h), + { + canvasContextAttributes: Object.assign( + Object.assign({}, xa.canvasContextAttributes), + h.canvasContextAttributes + ), + } + ); + if ( + l.minZoom != null && + l.maxZoom != null && + l.minZoom > l.maxZoom + ) + throw new Error( + "maxZoom must be greater than or equal to minZoom" + ); + if ( + l.minPitch != null && + l.maxPitch != null && + l.minPitch > l.maxPitch + ) + throw new Error( + "maxPitch must be greater than or equal to minPitch" + ); + if (l.minPitch != null && l.minPitch < 0) + throw new Error( + "minPitch must be greater than or equal to 0" + ); + if (l.maxPitch != null && l.maxPitch > 180) + throw new Error( + "maxPitch must be less than or equal to 180" + ); + const u = new on(), + d = new jn(); + if ( + (l.minZoom !== void 0 && u.setMinZoom(l.minZoom), + l.maxZoom !== void 0 && u.setMaxZoom(l.maxZoom), + l.minPitch !== void 0 && u.setMinPitch(l.minPitch), + l.maxPitch !== void 0 && u.setMaxPitch(l.maxPitch), + l.renderWorldCopies !== void 0 && + u.setRenderWorldCopies(l.renderWorldCopies), + super(u, d, { bearingSnap: l.bearingSnap }), + (this._idleTriggered = !1), + (this._crossFadingFactor = 1), + (this._renderTaskQueue = new $a()), + (this._controls = []), + (this._mapId = s.a7()), + (this._contextLost = (w) => { + w.preventDefault(), + this._frameRequest && + (this._frameRequest.abort(), + (this._frameRequest = null)), + this.fire( + new s.l("webglcontextlost", { originalEvent: w }) + ); + }), + (this._contextRestored = (w) => { + this._setupPainter(), + this.resize(), + this._update(), + this.fire( + new s.l("webglcontextrestored", { + originalEvent: w, + }) + ); + }), + (this._onMapScroll = (w) => { + if (w.target === this._container) + return ( + (this._container.scrollTop = 0), + (this._container.scrollLeft = 0), + !1 + ); + }), + (this._onWindowOnline = () => { + this._update(); + }), + (this._interactive = l.interactive), + (this._maxTileCacheSize = l.maxTileCacheSize), + (this._maxTileCacheZoomLevels = l.maxTileCacheZoomLevels), + (this._canvasContextAttributes = Object.assign( + {}, + l.canvasContextAttributes + )), + (this._trackResize = l.trackResize === !0), + (this._bearingSnap = l.bearingSnap), + (this._centerClampedToGround = l.centerClampedToGround), + (this._refreshExpiredTiles = + l.refreshExpiredTiles === !0), + (this._fadeDuration = l.fadeDuration), + (this._crossSourceCollisions = + l.crossSourceCollisions === !0), + (this._collectResourceTiming = + l.collectResourceTiming === !0), + (this._locale = Object.assign( + Object.assign({}, Ui), + l.locale + )), + (this._clickTolerance = l.clickTolerance), + (this._overridePixelRatio = l.pixelRatio), + (this._maxCanvasSize = l.maxCanvasSize), + (this.transformCameraUpdate = l.transformCameraUpdate), + (this.cancelPendingTileRequestsWhileZooming = + l.cancelPendingTileRequestsWhileZooming === !0), + (this._imageQueueHandle = Fe.addThrottleControl(() => + this.isMoving() + )), + (this._requestManager = new $e(l.transformRequest)), + typeof l.container == "string") + ) { + if ( + ((this._container = document.getElementById( + l.container + )), + !this._container) + ) + throw new Error( + `Container '${l.container}' not found.` + ); + } else { + if (!(l.container instanceof HTMLElement)) + throw new Error( + "Invalid type: 'container' must be a String or HTMLElement." + ); + this._container = l.container; + } + if ( + (l.maxBounds && this.setMaxBounds(l.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.dirty = !0), + this._update(!0); + }), + this.once("idle", () => { + this._idleTriggered = !0; + }), + typeof window < "u") + ) { + addEventListener("online", this._onWindowOnline, !1); + let w = !1; + const C = Fo((P) => { + this._trackResize && + !this._removed && + (this.resize(P), this.redraw()); + }, 50); + (this._resizeObserver = new ResizeObserver((P) => { + w ? C(P) : (w = !0); + })), + this._resizeObserver.observe(this._container); + } + (this.handlers = new cu(this, l)), + (this._hash = + l.hash && + new Fl( + (typeof l.hash == "string" && l.hash) || void 0 + ).addTo(this)), + (this._hash && this._hash._onHashChange()) || + (this.jumpTo({ + center: l.center, + elevation: l.elevation, + zoom: l.zoom, + bearing: l.bearing, + pitch: l.pitch, + roll: l.roll, + }), + l.bounds && + (this.resize(), + this.fitBounds( + l.bounds, + s.e({}, l.fitBoundsOptions, { duration: 0 }) + ))); + const g = + typeof l.style == "string" || + ((i = + (e = l.style) === null || e === void 0 + ? void 0 + : e.projection) === null || i === void 0 + ? void 0 + : i.type) !== "globe"; + this.resize(null, g), + (this._localIdeographFontFamily = + l.localIdeographFontFamily), + (this._validateStyle = l.validateStyle), + l.style && + this.setStyle(l.style, { + localIdeographFontFamily: l.localIdeographFontFamily, + }), + l.attributionControl && + this.addControl( + new hu( + typeof l.attributionControl == "boolean" + ? void 0 + : l.attributionControl + ) + ), + l.maplibreLogo && + this.addControl(new wd(), l.logoPosition), + this.on("style.load", () => { + if ( + (g || this._resizeTransform(), + this.transform.unmodified) + ) { + const w = s.Q(this.style.stylesheet, [ + "center", + "zoom", + "bearing", + "pitch", + "roll", + ]); + this.jumpTo(w); + } + }), + this.on("data", (w) => { + this._update(w.dataType === "style"), + this.fire(new s.l(`${w.dataType}data`, w)); + }), + this.on("dataloading", (w) => { + this.fire(new s.l(`${w.dataType}dataloading`, w)); + }), + this.on("dataabort", (w) => { + this.fire(new s.l("sourcedataabort", w)); + }); + } + _getMapId() { + return this._mapId; + } + setGlobalStateProperty(h, e) { + return ( + this.style.setGlobalStateProperty(h, e), this._update(!0) + ); + } + getGlobalState() { + return this.style.getGlobalState(); + } + addControl(h, e) { + if ( + (e === void 0 && + (e = h.getDefaultPosition + ? h.getDefaultPosition() + : "top-right"), + !h || !h.onAdd) + ) + return this.fire( + new s.k( + new Error( + "Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods." + ) + ) + ); + const i = h.onAdd(this); + this._controls.push(h); + const l = this._controlPositions[e]; + return ( + e.indexOf("bottom") !== -1 + ? l.insertBefore(i, l.firstChild) + : l.appendChild(i), + this + ); + } + removeControl(h) { + if (!h || !h.onRemove) + return this.fire( + new s.k( + new Error( + "Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods." + ) + ) + ); + const e = this._controls.indexOf(h); + return ( + e > -1 && this._controls.splice(e, 1), + h.onRemove(this), + this + ); + } + hasControl(h) { + return this._controls.indexOf(h) > -1; + } + calculateCameraOptionsFromTo(h, e, i, l) { + return ( + l == null && + this.terrain && + (l = this.terrain.getElevationForLngLatZoom( + i, + this.transform.tileZoom + )), + super.calculateCameraOptionsFromTo(h, e, i, l) + ); + } + resize(h, e = !0) { + const [i, l] = this._containerDimensions(), + u = this._getClampedPixelRatio(i, l); + if ( + (this._resizeCanvas(i, l, u), + this.painter.resize(i, l, u), + this.painter.overLimit()) + ) { + const g = this.painter.context.gl; + this._maxCanvasSize = [ + g.drawingBufferWidth, + g.drawingBufferHeight, + ]; + const w = this._getClampedPixelRatio(i, l); + this._resizeCanvas(i, l, w), this.painter.resize(i, l, w); + } + this._resizeTransform(e); + const d = !this._moving; + return ( + d && + (this.stop(), + this.fire(new s.l("movestart", h)).fire( + new s.l("move", h) + )), + this.fire(new s.l("resize", h)), + d && this.fire(new s.l("moveend", h)), + this + ); + } + _resizeTransform(h = !0) { + var e; + const [i, l] = this._containerDimensions(); + this.transform.resize(i, l, h), + (e = this._requestedCameraState) === null || + e === void 0 || + e.resize(i, l, h); + } + _getClampedPixelRatio(h, e) { + const { 0: i, 1: l } = this._maxCanvasSize, + u = this.getPixelRatio(), + d = h * u, + g = e * u; + return Math.min(d > i ? i / d : 1, g > l ? l / g : 1) * u; + } + getPixelRatio() { + var h; + return (h = this._overridePixelRatio) !== null && + h !== void 0 + ? h + : devicePixelRatio; + } + setPixelRatio(h) { + (this._overridePixelRatio = h), this.resize(); + } + getBounds() { + return this.transform.getBounds(); + } + getMaxBounds() { + return this.transform.getMaxBounds(); + } + setMaxBounds(h) { + return ( + this.transform.setMaxBounds(_t.convert(h)), this._update() + ); + } + setMinZoom(h) { + if ((h = h ?? -2) >= -2 && h <= this.transform.maxZoom) + return ( + this.transform.setMinZoom(h), + this._update(), + this.getZoom() < h && this.setZoom(h), + this + ); + throw new Error( + "minZoom must be between -2 and the current maxZoom, inclusive" + ); + } + getMinZoom() { + return this.transform.minZoom; + } + setMaxZoom(h) { + if ((h = h ?? 22) >= this.transform.minZoom) + return ( + this.transform.setMaxZoom(h), + this._update(), + this.getZoom() > h && this.setZoom(h), + this + ); + throw new Error( + "maxZoom must be greater than the current minZoom" + ); + } + getMaxZoom() { + return this.transform.maxZoom; + } + setMinPitch(h) { + if ((h = h ?? 0) < 0) + throw new Error( + "minPitch must be greater than or equal to 0" + ); + if (h >= 0 && h <= this.transform.maxPitch) + return ( + this.transform.setMinPitch(h), + this._update(), + this.getPitch() < h && this.setPitch(h), + this + ); + throw new Error( + "minPitch must be between 0 and the current maxPitch, inclusive" + ); + } + getMinPitch() { + return this.transform.minPitch; + } + setMaxPitch(h) { + if ((h = h ?? 60) > 180) + throw new Error( + "maxPitch must be less than or equal to 180" + ); + if (h >= this.transform.minPitch) + return ( + this.transform.setMaxPitch(h), + this._update(), + this.getPitch() > h && this.setPitch(h), + this + ); + throw new Error( + "maxPitch must be greater than the current minPitch" + ); + } + getMaxPitch() { + return this.transform.maxPitch; + } + getRenderWorldCopies() { + return this.transform.renderWorldCopies; + } + setRenderWorldCopies(h) { + return ( + this.transform.setRenderWorldCopies(h), this._update() + ); + } + project(h) { + return this.transform.locationToScreenPoint( + s.S.convert(h), + this.style && this.terrain + ); + } + unproject(h) { + return this.transform.screenPointToLocation( + s.P.convert(h), + this.terrain + ); + } + isMoving() { + var h; + return ( + this._moving || + ((h = this.handlers) === null || h === void 0 + ? void 0 + : h.isMoving()) + ); + } + isZooming() { + var h; + return ( + this._zooming || + ((h = this.handlers) === null || h === void 0 + ? void 0 + : h.isZooming()) + ); + } + isRotating() { + var h; + return ( + this._rotating || + ((h = this.handlers) === null || h === void 0 + ? void 0 + : h.isRotating()) + ); + } + _createDelegatedListener(h, e, i) { + if (h === "mouseenter" || h === "mouseover") { + let l = !1; + return { + layers: e, + listener: i, + delegates: { + mousemove: (d) => { + const g = e.filter((C) => this.getLayer(C)), + w = + g.length !== 0 + ? this.queryRenderedFeatures(d.point, { + layers: g, + }) + : []; + w.length + ? l || + ((l = !0), + i.call( + this, + new Qi(h, this, d.originalEvent, { + features: w, + }) + )) + : (l = !1); + }, + mouseout: () => { + l = !1; + }, + }, + }; + } + if (h === "mouseleave" || h === "mouseout") { + let l = !1; + return { + layers: e, + listener: i, + delegates: { + mousemove: (g) => { + const w = e.filter((C) => this.getLayer(C)); + (w.length !== 0 + ? this.queryRenderedFeatures(g.point, { + layers: w, + }) + : [] + ).length + ? (l = !0) + : l && + ((l = !1), + i.call(this, new Qi(h, this, g.originalEvent))); + }, + mouseout: (g) => { + l && + ((l = !1), + i.call(this, new Qi(h, this, g.originalEvent))); + }, + }, + }; + } + { + const l = (u) => { + const d = e.filter((w) => this.getLayer(w)), + g = + d.length !== 0 + ? this.queryRenderedFeatures(u.point, { + layers: d, + }) + : []; + g.length && + ((u.features = g), + i.call(this, u), + delete u.features); + }; + return { layers: e, listener: i, delegates: { [h]: l } }; + } + } + _saveDelegatedListener(h, e) { + (this._delegatedListeners = this._delegatedListeners || {}), + (this._delegatedListeners[h] = + this._delegatedListeners[h] || []), + this._delegatedListeners[h].push(e); + } + _removeDelegatedListener(h, e, i) { + if ( + !this._delegatedListeners || + !this._delegatedListeners[h] + ) + return; + const l = this._delegatedListeners[h]; + for (let u = 0; u < l.length; u++) { + const d = l[u]; + if ( + d.listener === i && + d.layers.length === e.length && + d.layers.every((g) => e.includes(g)) + ) { + for (const g in d.delegates) + this.off(g, d.delegates[g]); + return void l.splice(u, 1); + } + } + } + on(h, e, i) { + if (i === void 0) return super.on(h, e); + const l = typeof e == "string" ? [e] : e, + u = this._createDelegatedListener(h, l, i); + this._saveDelegatedListener(h, u); + for (const d in u.delegates) this.on(d, u.delegates[d]); + return { + unsubscribe: () => { + this._removeDelegatedListener(h, l, i); + }, + }; + } + once(h, e, i) { + if (i === void 0) return super.once(h, e); + const l = typeof e == "string" ? [e] : e, + u = this._createDelegatedListener(h, l, i); + for (const d in u.delegates) { + const g = u.delegates[d]; + u.delegates[d] = (...w) => { + this._removeDelegatedListener(h, l, i), g(...w); + }; + } + this._saveDelegatedListener(h, u); + for (const d in u.delegates) this.once(d, u.delegates[d]); + return this; + } + off(h, e, i) { + return i === void 0 + ? super.off(h, e) + : (this._removeDelegatedListener( + h, + typeof e == "string" ? [e] : e, + i + ), + this); + } + queryRenderedFeatures(h, e) { + if (!this.style) return []; + let i; + const l = h instanceof s.P || Array.isArray(h), + u = l + ? h + : [ + [0, 0], + [this.transform.width, this.transform.height], + ]; + if ( + ((e = e || (l ? {} : h) || {}), + u instanceof s.P || typeof u[0] == "number") + ) + i = [s.P.convert(u)]; + else { + const d = s.P.convert(u[0]), + g = s.P.convert(u[1]); + i = [d, new s.P(g.x, d.y), g, new s.P(d.x, g.y), d]; + } + return this.style.queryRenderedFeatures( + i, + e, + this.transform + ); + } + querySourceFeatures(h, e) { + return this.style.querySourceFeatures(h, e); + } + setStyle(h, e) { + return (e = s.e( + {}, + { + localIdeographFontFamily: + this._localIdeographFontFamily, + validate: this._validateStyle, + }, + e + )).diff !== !1 && + e.localIdeographFontFamily === + this._localIdeographFontFamily && + this.style && + h + ? (this._diffStyle(h, e), this) + : ((this._localIdeographFontFamily = + e.localIdeographFontFamily), + this._updateStyle(h, e)); + } + setTransformRequest(h) { + return this._requestManager.setTransformRequest(h), this; + } + _getUIString(h) { + const e = this._locale[h]; + if (e == null) throw new Error(`Missing UI string '${h}'`); + return e; + } + _updateStyle(h, e) { + var i, l; + if (e.transformStyle && this.style && !this.style._loaded) + return void this.style.once("style.load", () => + this._updateStyle(h, e) + ); + const u = + this.style && e.transformStyle + ? this.style.serialize() + : void 0; + return ( + this.style && + (this.style.setEventedParent(null), + this.style._remove(!h)), + h + ? ((this.style = new zc(this, e || {})), + this.style.setEventedParent(this, { + style: this.style, + }), + typeof h == "string" + ? this.style.loadURL(h, e, u) + : this.style.loadJSON(h, e, u), + this) + : ((l = + (i = this.style) === null || i === void 0 + ? void 0 + : i.projection) === null || + l === void 0 || + l.destroy(), + delete this.style, + this) + ); + } + _lazyInitEmptyStyle() { + this.style || + ((this.style = new zc(this, {})), + this.style.setEventedParent(this, { style: this.style }), + this.style.loadEmpty()); + } + _diffStyle(h, e) { + if (typeof h == "string") { + const i = this._requestManager.transformRequest( + h, + "Style" + ); + s.j(i, new AbortController()) + .then((l) => { + this._updateDiff(l.data, e); + }) + .catch((l) => { + l && this.fire(new s.k(l)); + }); + } else typeof h == "object" && this._updateDiff(h, e); + } + _updateDiff(h, e) { + try { + this.style.setState(h, e) && this._update(!0); + } catch (i) { + s.w( + `Unable to perform style diff: ${ + i.message || i.error || i + }. Rebuilding the style from scratch.` + ), + this._updateStyle(h, e); + } + } + getStyle() { + if (this.style) return this.style.serialize(); + } + isStyleLoaded() { + return this.style + ? this.style.loaded() + : s.w("There is no style added to the map."); + } + addSource(h, e) { + return ( + this._lazyInitEmptyStyle(), + this.style.addSource(h, e), + this._update(!0) + ); + } + isSourceLoaded(h) { + const e = this.style && this.style.sourceCaches[h]; + if (e !== void 0) return e.loaded(); + this.fire( + new s.k(new Error(`There is no source with ID '${h}'`)) + ); + } + setTerrain(h) { + if ( + (this.style._checkLoaded(), + this._terrainDataCallback && + this.style.off("data", this._terrainDataCallback), + h) + ) { + const e = this.style.sourceCaches[h.source]; + if (!e) + throw new Error( + `cannot load terrain, because there exists no source with ID: ${h.source}` + ); + this.terrain === null && e.reload(); + for (const i in this.style._layers) { + const l = this.style._layers[i]; + l.type === "hillshade" && + l.source === h.source && + s.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." + ), + l.type === "color-relief" && + l.source === h.source && + s.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 Or(this.painter, e, h)), + (this.painter.renderToTexture = new Ul( + 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 = (i) => { + var l; + i.dataType === "style" + ? this.terrain.sourceCache.freeRtt() + : i.dataType === "source" && + i.tile && + (i.sourceId !== h.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 + ) + )), + ((l = i.source) === null || l === void 0 + ? void 0 + : l.type) === "image" + ? this.terrain.sourceCache.freeRtt() + : this.terrain.sourceCache.freeRtt( + i.tile.tileID + )); + }), + this.style.on("data", this._terrainDataCallback); + } else + this.terrain && this.terrain.sourceCache.destruct(), + (this.terrain = null), + this.painter.renderToTexture && + this.painter.renderToTexture.destruct(), + (this.painter.renderToTexture = null), + this.transform.setMinElevationForCurrentTile(0), + this._centerClampedToGround && + this.transform.setElevation(0); + return this.fire(new s.l("terrain", { terrain: h })), this; + } + getTerrain() { + var h, e; + return (e = + (h = this.terrain) === null || h === void 0 + ? void 0 + : h.options) !== null && e !== void 0 + ? e + : null; + } + areTilesLoaded() { + const h = this.style && this.style.sourceCaches; + for (const e in h) { + const i = h[e]._tiles; + for (const l in i) { + const u = i[l]; + if (u.state !== "loaded" && u.state !== "errored") + return !1; + } + } + return !0; + } + removeSource(h) { + return this.style.removeSource(h), this._update(!0); + } + getSource(h) { + return this.style.getSource(h); + } + setSourceTileLodParams(h, e, i) { + if (i) { + const l = this.getSource(i); + if (!l) + throw new Error( + `There is no source with ID "${i}", cannot set LOD parameters` + ); + l.calculateTileZoom = ut(Math.max(1, h), Math.max(1, e)); + } else + for (const l in this.style.sourceCaches) + this.style.sourceCaches[ + l + ].getSource().calculateTileZoom = ut( + Math.max(1, h), + Math.max(1, e) + ); + return this._update(!0), this; + } + refreshTiles(h, e) { + const i = this.style.sourceCaches[h]; + if (!i) + throw new Error( + `There is no source cache with ID "${h}", cannot refresh tile` + ); + e === void 0 + ? i.reload(!0) + : i.refreshTiles(e.map((l) => new s.a4(l.z, l.x, l.y))); + } + addImage(h, e, i = {}) { + const { + pixelRatio: l = 1, + sdf: u = !1, + stretchX: d, + stretchY: g, + content: w, + textFitWidth: C, + textFitHeight: P, + } = i; + if ( + (this._lazyInitEmptyStyle(), + !(e instanceof HTMLImageElement || s.b(e))) + ) { + if (e.width === void 0 || e.height === void 0) + return this.fire( + new s.k( + 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: E, height: R, data: D } = e, + N = e; + return ( + this.style.addImage(h, { + data: new s.R( + { width: E, height: R }, + new Uint8Array(D) + ), + pixelRatio: l, + stretchX: d, + stretchY: g, + content: w, + textFitWidth: C, + textFitHeight: P, + sdf: u, + version: 0, + userImage: N, + }), + N.onAdd && N.onAdd(this, h), + this + ); + } + } + { + const { + width: E, + height: R, + data: D, + } = ne.getImageData(e); + this.style.addImage(h, { + data: new s.R({ width: E, height: R }, D), + pixelRatio: l, + stretchX: d, + stretchY: g, + content: w, + textFitWidth: C, + textFitHeight: P, + sdf: u, + version: 0, + }); + } + } + updateImage(h, e) { + const i = this.style.getImage(h); + if (!i) + return this.fire( + new s.k( + new Error( + "The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead." + ) + ) + ); + const l = + e instanceof HTMLImageElement || s.b(e) + ? ne.getImageData(e) + : e, + { width: u, height: d, data: g } = l; + if (u === void 0 || d === void 0) + return this.fire( + new s.k( + 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 (u !== i.data.width || d !== i.data.height) + return this.fire( + new s.k( + new Error( + "The width and height of the updated image must be that same as the previous version of the image" + ) + ) + ); + const w = !(e instanceof HTMLImageElement || s.b(e)); + return ( + i.data.replace(g, w), this.style.updateImage(h, i), this + ); + } + getImage(h) { + return this.style.getImage(h); + } + hasImage(h) { + return h + ? !!this.style.getImage(h) + : (this.fire( + new s.k(new Error("Missing required image id")) + ), + !1); + } + removeImage(h) { + this.style.removeImage(h); + } + loadImage(h) { + return Fe.getImage( + this._requestManager.transformRequest(h, "Image"), + new AbortController() + ); + } + listImages() { + return this.style.listImages(); + } + addLayer(h, e) { + return ( + this._lazyInitEmptyStyle(), + this.style.addLayer(h, e), + this._update(!0) + ); + } + moveLayer(h, e) { + return this.style.moveLayer(h, e), this._update(!0); + } + removeLayer(h) { + return this.style.removeLayer(h), this._update(!0); + } + getLayer(h) { + return this.style.getLayer(h); + } + getLayersOrder() { + return this.style.getLayersOrder(); + } + setLayerZoomRange(h, e, i) { + return ( + this.style.setLayerZoomRange(h, e, i), this._update(!0) + ); + } + setFilter(h, e, i = {}) { + return this.style.setFilter(h, e, i), this._update(!0); + } + getFilter(h) { + return this.style.getFilter(h); + } + setPaintProperty(h, e, i, l = {}) { + return ( + this.style.setPaintProperty(h, e, i, l), this._update(!0) + ); + } + getPaintProperty(h, e) { + return this.style.getPaintProperty(h, e); + } + setLayoutProperty(h, e, i, l = {}) { + return ( + this.style.setLayoutProperty(h, e, i, l), this._update(!0) + ); + } + getLayoutProperty(h, e) { + return this.style.getLayoutProperty(h, e); + } + setGlyphs(h, e = {}) { + return ( + this._lazyInitEmptyStyle(), + this.style.setGlyphs(h, e), + this._update(!0) + ); + } + getGlyphs() { + return this.style.getGlyphsUrl(); + } + addSprite(h, e, i = {}) { + return ( + this._lazyInitEmptyStyle(), + this.style.addSprite(h, e, i, (l) => { + l || this._update(!0); + }), + this + ); + } + removeSprite(h) { + return ( + this._lazyInitEmptyStyle(), + this.style.removeSprite(h), + this._update(!0) + ); + } + getSprite() { + return this.style.getSprite(); + } + setSprite(h, e = {}) { + return ( + this._lazyInitEmptyStyle(), + this.style.setSprite(h, e, (i) => { + i || this._update(!0); + }), + this + ); + } + setLight(h, e = {}) { + return ( + this._lazyInitEmptyStyle(), + this.style.setLight(h, e), + this._update(!0) + ); + } + getLight() { + return this.style.getLight(); + } + setSky(h, e = {}) { + return ( + this._lazyInitEmptyStyle(), + this.style.setSky(h, e), + this._update(!0) + ); + } + getSky() { + return this.style.getSky(); + } + setFeatureState(h, e) { + return this.style.setFeatureState(h, e), this._update(); + } + removeFeatureState(h, e) { + return this.style.removeFeatureState(h, e), this._update(); + } + getFeatureState(h) { + return this.style.getFeatureState(h); + } + getContainer() { + return this._container; + } + getCanvasContainer() { + return this._canvasContainer; + } + getCanvas() { + return this._canvas; + } + _containerDimensions() { + let h = 0, + e = 0; + return ( + this._container && + ((h = this._container.clientWidth || 400), + (e = this._container.clientHeight || 300)), + [h, e] + ); + } + _setupContainer() { + const h = this._container; + h.classList.add("maplibregl-map"); + const e = (this._canvasContainer = H.create( + "div", + "maplibregl-canvas-container", + h + )); + this._interactive && + e.classList.add("maplibregl-interactive"), + (this._canvas = H.create( + "canvas", + "maplibregl-canvas", + e + )), + 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 i = this._containerDimensions(), + l = this._getClampedPixelRatio(i[0], i[1]); + this._resizeCanvas(i[0], i[1], l); + const u = (this._controlContainer = H.create( + "div", + "maplibregl-control-container", + h + )), + d = (this._controlPositions = {}); + [ + "top-left", + "top-right", + "bottom-left", + "bottom-right", + ].forEach((g) => { + d[g] = H.create("div", `maplibregl-ctrl-${g} `, u); + }), + this._container.addEventListener( + "scroll", + this._onMapScroll, + !1 + ); + } + _resizeCanvas(h, e, i) { + (this._canvas.width = Math.floor(i * h)), + (this._canvas.height = Math.floor(i * e)), + (this._canvas.style.width = `${h}px`), + (this._canvas.style.height = `${e}px`); + } + _setupPainter() { + const h = Object.assign( + Object.assign({}, this._canvasContextAttributes), + { + alpha: !0, + depth: !0, + stencil: !0, + premultipliedAlpha: !0, + } + ); + let e = null; + this._canvas.addEventListener( + "webglcontextcreationerror", + (l) => { + (e = { requestedAttributes: h }), + l && + ((e.statusMessage = l.statusMessage), + (e.type = l.type)); + }, + { once: !0 } + ); + let i = null; + if ( + ((i = this._canvasContextAttributes.contextType + ? this._canvas.getContext( + this._canvasContextAttributes.contextType, + h + ) + : this._canvas.getContext("webgl2", h) || + this._canvas.getContext("webgl", h)), + !i) + ) { + const l = "Failed to initialize WebGL"; + throw e + ? ((e.message = l), new Error(JSON.stringify(e))) + : new Error(l); + } + (this.painter = new sd(i, this.transform)), + fe.testSupport(i); + } + migrateProjection(h, e) { + super.migrateProjection(h, e), + (this.painter.transform = h), + this.fire( + new s.l("projectiontransition", { + newProjection: this.style.projection.name, + }) + ); + } + loaded() { + return ( + !this._styleDirty && + !this._sourcesDirty && + !!this.style && + this.style.loaded() + ); + } + _update(h) { + return this.style && this.style._loaded + ? ((this._styleDirty = this._styleDirty || h), + (this._sourcesDirty = !0), + this.triggerRepaint(), + this) + : this; + } + _requestRenderFrame(h) { + return this._update(), this._renderTaskQueue.add(h); + } + _cancelRenderFrame(h) { + this._renderTaskQueue.remove(h); + } + _render(h) { + var e, i, l, u, d; + const g = this._idleTriggered ? this._fadeDuration : 0, + w = + ((e = this.style.projection) === null || e === void 0 + ? void 0 + : e.transitionState) > 0; + if ( + (this.painter.context.setDirty(), + this.painter.setBaseState(), + this._renderTaskQueue.run(h), + this._removed) + ) + return; + let C = !1; + if (this.style && this._styleDirty) { + this._styleDirty = !1; + const R = this.transform.zoom, + D = ne.now(); + this.style.zoomHistory.update(R, D); + const N = new s.F(R, { + now: D, + fadeDuration: g, + zoomHistory: this.style.zoomHistory, + transition: this.style.getTransition(), + globalState: this.style.getGlobalState(), + }), + G = N.crossFadingFactor(); + (G === 1 && G === this._crossFadingFactor) || + ((C = !0), (this._crossFadingFactor = G)), + this.style.update(N); + } + const P = + ((i = this.style.projection) === null || i === void 0 + ? void 0 + : i.transitionState) > + 0 !== + w; + (l = this.style.projection) === null || + l === void 0 || + l.setErrorQueryLatitudeDegrees(this.transform.center.lat), + this.transform.setTransitionState( + (u = this.style.projection) === null || u === void 0 + ? void 0 + : u.transitionState, + (d = this.style.projection) === null || d === void 0 + ? void 0 + : d.latitudeErrorCorrectionRadians + ), + this.style && + (this._sourcesDirty || P) && + ((this._sourcesDirty = !1), + this.style._updateSources(this.transform)), + this.terrain + ? (this.terrain.sourceCache.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._centerClampedToGround && + this.transform.setElevation(0)), + (this._placementDirty = + this.style && + this.style._updatePlacement( + this.transform, + this.showCollisionBoxes, + g, + this._crossSourceCollisions, + P + )), + this.painter.render(this.style, { + showTileBoundaries: this.showTileBoundaries, + showOverdrawInspector: this._showOverdrawInspector, + rotating: this.isRotating(), + zooming: this.isZooming(), + moving: this.isMoving(), + fadeDuration: g, + showPadding: this.showPadding, + }), + this.fire(new s.l("render")), + this.loaded() && + !this._loaded && + ((this._loaded = !0), + s.cw.mark(s.cx.load), + this.fire(new s.l("load"))), + this.style && + (this.style.hasTransitions() || C) && + (this._styleDirty = !0), + this.style && + !this._placementDirty && + this.style._releaseSymbolFadeTiles(); + const E = + this._sourcesDirty || + this._styleDirty || + this._placementDirty; + return ( + E || this._repaint + ? this.triggerRepaint() + : !this.isMoving() && + this.loaded() && + this.fire(new s.l("idle")), + !this._loaded || + this._fullyLoaded || + E || + ((this._fullyLoaded = !0), s.cw.mark(s.cx.fullLoad)), + this + ); + } + redraw() { + return ( + this.style && + (this._frameRequest && + (this._frameRequest.abort(), + (this._frameRequest = null)), + this._render(0)), + this + ); + } + remove() { + var h; + this._hash && this._hash.remove(); + for (const i of this._controls) i.onRemove(this); + (this._controls = []), + this._frameRequest && + (this._frameRequest.abort(), + (this._frameRequest = null)), + this._renderTaskQueue.clear(), + this.painter.destroy(), + this.handlers.destroy(), + delete this.handlers, + this.setStyle(null), + typeof window < "u" && + removeEventListener("online", this._onWindowOnline, !1), + Fe.removeThrottleControl(this._imageQueueHandle), + (h = this._resizeObserver) === null || + h === void 0 || + h.disconnect(); + const e = + this.painter.context.gl.getExtension( + "WEBGL_lose_context" + ); + e != null && e.loseContext && e.loseContext(), + this._canvas.removeEventListener( + "webglcontextrestored", + this._contextRestored, + !1 + ), + this._canvas.removeEventListener( + "webglcontextlost", + this._contextLost, + !1 + ), + H.remove(this._canvasContainer), + H.remove(this._controlContainer), + this._container.removeEventListener( + "scroll", + this._onMapScroll, + !1 + ), + this._container.classList.remove("maplibregl-map"), + s.cw.clearMetrics(), + (this._removed = !0), + this.fire(new s.l("remove")); + } + triggerRepaint() { + this.style && + !this._frameRequest && + ((this._frameRequest = new AbortController()), + ne.frame( + this._frameRequest, + (h) => { + s.cw.frame(h), (this._frameRequest = null); + try { + this._render(h); + } catch (e) { + if ( + !s.cy(e) && + !(function (i) { + return i.message === Vs; + })(e) + ) + throw e; + } + }, + () => {} + )); + } + get showTileBoundaries() { + return !!this._showTileBoundaries; + } + set showTileBoundaries(h) { + this._showTileBoundaries !== h && + ((this._showTileBoundaries = h), this._update()); + } + get showPadding() { + return !!this._showPadding; + } + set showPadding(h) { + this._showPadding !== h && + ((this._showPadding = h), this._update()); + } + get showCollisionBoxes() { + return !!this._showCollisionBoxes; + } + set showCollisionBoxes(h) { + this._showCollisionBoxes !== h && + ((this._showCollisionBoxes = h), + h + ? this.style._generateCollisionBoxes() + : this._update()); + } + get showOverdrawInspector() { + return !!this._showOverdrawInspector; + } + set showOverdrawInspector(h) { + this._showOverdrawInspector !== h && + ((this._showOverdrawInspector = h), this._update()); + } + get repaint() { + return !!this._repaint; + } + set repaint(h) { + this._repaint !== h && + ((this._repaint = h), this.triggerRepaint()); + } + get vertices() { + return !!this._vertices; + } + set vertices(h) { + (this._vertices = h), this._update(); + } + get version() { + return Td; + } + getCameraTargetElevation() { + return this.transform.elevation; + } + getProjection() { + return this.style.getProjection(); + } + setProjection(h) { + return ( + this._lazyInitEmptyStyle(), + this.style.setProjection(h), + this._update(!0) + ); + } + }), + (T.MapMouseEvent = Qi), + (T.MapTouchEvent = is), + (T.MapWheelEvent = ru), + (T.Marker = ds), + (T.NavigationControl = class { + constructor(h) { + (this._updateZoomButtons = () => { + const e = this._map.getZoom(), + i = e === this._map.getMaxZoom(), + l = e === this._map.getMinZoom(); + (this._zoomInButton.disabled = i), + (this._zoomOutButton.disabled = l), + this._zoomInButton.setAttribute( + "aria-disabled", + i.toString() + ), + this._zoomOutButton.setAttribute( + "aria-disabled", + l.toString() + ); + }), + (this._rotateCompassArrow = () => { + this._compassIcon.style.transform = + this.options.visualizePitch && + this.options.visualizeRoll + ? `scale(${ + 1 / + Math.pow( + Math.cos(this._map.transform.pitchInRadians), + 0.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), + 0.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 = (e, i) => { + const l = this._map._getUIString( + `NavigationControl.${i}` + ); + (e.title = l), e.setAttribute("aria-label", l); + }), + (this.options = s.e({}, $p, h)), + (this._container = H.create( + "div", + "maplibregl-ctrl maplibregl-ctrl-group" + )), + this._container.addEventListener("contextmenu", (e) => + e.preventDefault() + ), + this.options.showZoom && + ((this._zoomInButton = this._createButton( + "maplibregl-ctrl-zoom-in", + (e) => this._map.zoomIn({}, { originalEvent: e }) + )), + H.create( + "span", + "maplibregl-ctrl-icon", + this._zoomInButton + ).setAttribute("aria-hidden", "true"), + (this._zoomOutButton = this._createButton( + "maplibregl-ctrl-zoom-out", + (e) => this._map.zoomOut({}, { originalEvent: e }) + )), + H.create( + "span", + "maplibregl-ctrl-icon", + this._zoomOutButton + ).setAttribute("aria-hidden", "true")), + this.options.showCompass && + ((this._compass = this._createButton( + "maplibregl-ctrl-compass", + (e) => { + this.options.visualizePitch + ? this._map.resetNorthPitch( + {}, + { originalEvent: e } + ) + : this._map.resetNorth({}, { originalEvent: e }); + } + )), + (this._compassIcon = H.create( + "span", + "maplibregl-ctrl-icon", + this._compass + )), + this._compassIcon.setAttribute("aria-hidden", "true")); + } + onAdd(h) { + return ( + (this._map = h), + 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 Ks( + this._map, + this._compass, + this.options.visualizePitch + ))), + this._container + ); + } + onRemove() { + H.remove(this._container), + 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(h, e) { + const i = H.create("button", h, this._container); + return ( + (i.type = "button"), i.addEventListener("click", e), i + ); + } + }), + (T.Popup = class extends s.E { + constructor(h) { + 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 && H.remove(this._content), + this._container && + (H.remove(this._container), 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("mousemove", this._onMouseMove), + this._map.off("mouseup", this._onMouseUp), + this._map.off("drag", this._onDrag), + this._map._canvasContainer.classList.remove( + "maplibregl-track-pointer" + ), + delete this._map, + this.fire(new s.l("close"))), + this + )), + (this._onMouseUp = (e) => { + this._update(e.point); + }), + (this._onMouseMove = (e) => { + this._update(e.point); + }), + (this._onDrag = (e) => { + this._update(e.point); + }), + (this._update = (e) => { + if ( + !this._map || + (!this._lngLat && !this._trackPointer) || + !this._content + ) + return; + if (!this._container) { + if ( + ((this._container = H.create( + "div", + "maplibregl-popup", + this._map.getContainer() + )), + (this._tip = H.create( + "div", + "maplibregl-popup-tip", + this._container + )), + this._container.appendChild(this._content), + this.options.className) + ) + for (const g of this.options.className.split(" ")) + this._container.classList.add(g); + this._closeButton && + this._closeButton.setAttribute( + "aria-label", + this._map._getUIString("Popup.Close") + ), + this._trackPointer && + this._container.classList.add( + "maplibregl-popup-track-pointer" + ); + } + if ( + (this.options.maxWidth && + this._container.style.maxWidth !== + this.options.maxWidth && + (this._container.style.maxWidth = + this.options.maxWidth), + (this._lngLat = ti( + this._lngLat, + this._flatPos, + this._map.transform, + this._trackPointer + )), + this._trackPointer && !e) + ) + return; + const i = + (this._flatPos = + this._pos = + this._trackPointer && e + ? e + : this._map.project(this._lngLat)); + this._map.terrain && + (this._flatPos = + this._trackPointer && e + ? e + : this._map.transform.locationToScreenPoint( + this._lngLat + )); + let l = this.options.anchor; + const u = Hl(this.options.offset); + if (!l) { + const g = this._container.offsetWidth, + w = this._container.offsetHeight; + let C; + (C = + i.y + u.bottom.y < w + ? ["top"] + : i.y > this._map.transform.height - w + ? ["bottom"] + : []), + i.x < g / 2 + ? C.push("left") + : i.x > this._map.transform.width - g / 2 && + C.push("right"), + (l = C.length === 0 ? "bottom" : C.join("-")); + } + let d = i.add(u[l]); + this.options.subpixelPositioning || (d = d.round()), + H.setTransform( + this._container, + `${$l[l]} translate(${d.x}px,${d.y}px)` + ), + hs(this._container, l, "popup"), + this._updateOpacity(); + }), + (this._onClose = () => { + this.remove(); + }), + (this.options = s.e(Object.create(pu), h)); + } + addTo(h) { + return ( + this._map && this.remove(), + (this._map = h), + 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._update(), + this._focusFirstElement(), + this._trackPointer + ? (this._map.on("mousemove", this._onMouseMove), + this._map.on("mouseup", this._onMouseUp), + 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 s.l("open")), + this + ); + } + isOpen() { + return !!this._map; + } + getLngLat() { + return this._lngLat; + } + setLngLat(h) { + return ( + (this._lngLat = s.S.convert(h)), + (this._pos = null), + (this._flatPos = null), + (this._trackPointer = !1), + this._update(), + this._map && + (this._map.on("move", this._update), + this._map.off("mousemove", this._onMouseMove), + 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._onMouseMove), + this._map.on("drag", this._onDrag), + this._container && + this._container.classList.add( + "maplibregl-popup-track-pointer" + ), + this._map._canvasContainer.classList.add( + "maplibregl-track-pointer" + )), + this + ); + } + getElement() { + return this._container; + } + setText(h) { + return this.setDOMContent(document.createTextNode(h)); + } + setHTML(h) { + const e = document.createDocumentFragment(), + i = document.createElement("body"); + let l; + for (i.innerHTML = h; (l = i.firstChild), l; ) + e.appendChild(l); + return this.setDOMContent(e); + } + getMaxWidth() { + var h; + return (h = this._container) === null || h === void 0 + ? void 0 + : h.style.maxWidth; + } + setMaxWidth(h) { + return (this.options.maxWidth = h), this._update(), this; + } + setDOMContent(h) { + if (this._content) + for (; this._content.hasChildNodes(); ) + this._content.firstChild && + this._content.removeChild(this._content.firstChild); + else + this._content = H.create( + "div", + "maplibregl-popup-content", + this._container + ); + return ( + this._content.appendChild(h), + this._createCloseButton(), + this._update(), + this._focusFirstElement(), + this + ); + } + addClassName(h) { + return ( + this._container && this._container.classList.add(h), this + ); + } + removeClassName(h) { + return ( + this._container && this._container.classList.remove(h), + this + ); + } + setOffset(h) { + return (this.options.offset = h), this._update(), this; + } + toggleClassName(h) { + if (this._container) + return this._container.classList.toggle(h); + } + setSubpixelPositioning(h) { + this.options.subpixelPositioning = h; + } + _createCloseButton() { + this.options.closeButton && + ((this._closeButton = H.create( + "button", + "maplibregl-popup-close-button", + this._content + )), + (this._closeButton.type = "button"), + (this._closeButton.innerHTML = "×"), + this._closeButton.addEventListener( + "click", + this._onClose + )); + } + _focusFirstElement() { + if (!this.options.focusAfterOpen || !this._container) + return; + const h = this._container.querySelector(fu); + h && h.focus(); + } + }), + (T.RasterDEMTileSource = tr), + (T.RasterTileSource = $t), + (T.ScaleControl = class { + constructor(h) { + (this._onMove = () => { + Gl(this._map, this._container, this.options); + }), + (this.setUnit = (e) => { + (this.options.unit = e), + Gl(this._map, this._container, this.options); + }), + (this.options = Object.assign(Object.assign({}, Js), h)); + } + getDefaultPosition() { + return "bottom-left"; + } + onAdd(h) { + return ( + (this._map = h), + (this._container = H.create( + "div", + "maplibregl-ctrl maplibregl-ctrl-scale", + h.getContainer() + )), + this._map.on("move", this._onMove), + this._onMove(), + this._container + ); + } + onRemove() { + H.remove(this._container), + this._map.off("move", this._onMove), + (this._map = void 0); + } + }), + (T.ScrollZoomHandler = _d), + (T.Style = zc), + (T.TerrainControl = class { + constructor(h) { + (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 = h); + } + onAdd(h) { + return ( + (this._map = h), + (this._container = H.create( + "div", + "maplibregl-ctrl maplibregl-ctrl-group" + )), + (this._terrainButton = H.create( + "button", + "maplibregl-ctrl-terrain", + this._container + )), + H.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() { + H.remove(this._container), + this._map.off("terrain", this._updateTerrainIcon), + (this._map = void 0); + } + }), + (T.TwoFingersTouchPitchHandler = Nl), + (T.TwoFingersTouchRotateHandler = cs), + (T.TwoFingersTouchZoomHandler = Ol), + (T.TwoFingersTouchZoomRotateHandler = yd), + (T.VectorTileSource = Rt), + (T.VideoSource = Nt), + (T.addSourceType = (h, e) => + s._(void 0, void 0, void 0, function* () { + if (Vr(h)) + throw new Error( + `A source type called "${h}" already exists.` + ); + ((i, l) => { + cr[i] = l; + })(h, e); + })), + (T.clearPrewarmedResources = function () { + const h = it; + h && + (h.isPreloaded() && h.numActive() === 1 + ? (h.release(ze), (it = 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()" + )); + }), + (T.createTileMesh = Ms), + (T.getMaxParallelImageRequests = function () { + return s.a.MAX_PARALLEL_IMAGE_REQUESTS; + }), + (T.getRTLTextPluginStatus = function () { + return Ir().getRTLTextPluginStatus(); + }), + (T.getVersion = function () { + return mu; + }), + (T.getWorkerCount = function () { + return je.workerCount; + }), + (T.getWorkerUrl = function () { + return s.a.WORKER_URL; + }), + (T.importScriptInWorkers = function (h) { + return at().broadcast("IS", h); + }), + (T.prewarm = function () { + It().acquire(ze); + }), + (T.setMaxParallelImageRequests = function (h) { + s.a.MAX_PARALLEL_IMAGE_REQUESTS = h; + }), + (T.setRTLTextPlugin = function (h, e) { + return Ir().setRTLTextPlugin(h, e); + }), + (T.setWorkerCount = function (h) { + je.workerCount = h; + }), + (T.setWorkerUrl = function (h) { + s.a.WORKER_URL = h; + }); + }); + var z = p; + return z; + }); + })(Xd)), + Xd.exports + ); +} +var m4 = f4(); +const qd = Zm(m4); +class ev { + constructor(a) { + xr(this, "gm"); + xr(this, "markers", new Map()); + xr(this, "canvases", new Map()); + xr(this, "canvasSize"); + xr(this, "canvasOpacity", 0.8); + (this.input = a), (this.gm = new fl(this.input.tileSize)); + const p = n0(a.img); + this.canvasSize = Math.ceil(2e3 / p); + } + place([a, p]) { + const y = this.gm.latLonToPixelsFloor(a, p, this.input.zoom), + M = this.getMarkerId(y), + z = this.gm.latLonToPixelBoundsLatLon(a, p, this.input.zoom), + T = this.input.map; + if (this.input.markerFn && !this.markers.has(M)) { + const K = this.input.markerFn(); + K.setLngLat({ lat: z.min[0], lng: (z.max[1] + z.min[1]) / 2 }).addTo(T), + this.markers.set(M, K); + } + const { key: s, pos: B, innerPos: O } = this.getCanvasPos(y); + let X = this.canvases.get(s); + if (!X) { + const K = this.canvasSize, + ne = B.x * K, + H = B.y * K, + fe = ne + K - 1, + ge = H + K - 1, + Ie = this.gm.pixelsToLatLon(ne, ge + 1, this.input.zoom), + Ae = this.gm.pixelsToLatLon(fe + 1, H, this.input.zoom); + (X = new _4({ + id: `${this.input.id}-${s}`, + img: this.input.img, + canvasSize: this.canvasSize, + coordinates: Vm({ min: Ie, max: Ae }), + layerPaint: { + "raster-resampling": "nearest", + "raster-opacity": this.canvasOpacity, + }, + })), + X.addTo(this.input.map), + this.canvases.set(s, X); + } + X.place(O.x, O.y); + } + clear() { + const a = this.input.map; + for (const p of this.canvases.values()) p.removeFrom(a), p.removeDOM(); + this.canvases.clear(); + for (const p of this.markers.values()) p.remove(); + this.markers.clear(); + } + clearAndPlace(a) { + this.clear(), this.place(a); + } + remove([a, p]) { + let y = !1; + const M = this.gm.latLonToPixelsFloor(a, p, this.input.zoom), + { key: z, innerPos: T } = this.getCanvasPos(M), + s = this.canvases.get(z); + s && + ((y = s.remove(T.x, T.y)), + s.annotationsCount() === 0 && + (this.canvases.delete(z), s.removeFrom(this.input.map), s.removeDOM())); + const B = this.getMarkerId(M), + O = this.markers.get(B); + return O == null || O.remove(), this.markers.delete(B), y; + } + setCanvasOpacity(a) { + this.canvasOpacity = a; + for (const p of this.canvases.values()) p.setOpacity(a); + } + getMarkerId([a, p]) { + return `${this.input.id}:${a},${p}`; + } + getCanvasPos([a, p]) { + const y = { + x: Math.floor(a / this.canvasSize), + y: Math.floor(p / this.canvasSize), + }, + M = { x: a % this.canvasSize, y: p % this.canvasSize }, + z = `${y.x},${y.y}`; + return { pos: y, innerPos: M, key: z }; + } +} +class _4 { + constructor(a) { + xr(this, "annotations", new Set()); + xr(this, "canvas"); + xr(this, "imgSize"); + xr(this, "maps", new Set()); + (this.input = a), + (this.imgSize = n0(a.img)), + (this.canvas = document.createElement("canvas")), + (this.canvas.width = this.input.canvasSize * this.imgSize), + (this.canvas.height = this.input.canvasSize * this.imgSize); + } + place(a, p) { + const y = this.getPixelKey(a, p); + if (this.annotations.has(y)) return !1; + const M = this.canvas.getContext("2d"); + if (M) { + const z = a * this.imgSize, + T = p * this.imgSize; + M.drawImage(this.input.img, z, T); + } + return this.annotations.add(y), !0; + } + remove(a, p) { + const y = this.getPixelKey(a, p); + if (!this.annotations.has(y)) return !1; + const M = this.canvas.getContext("2d"); + if (M) { + const z = a * this.imgSize, + T = p * this.imgSize; + M.clearRect(z, T, this.imgSize, this.imgSize); + } + return this.annotations.delete(y), !0; + } + addTo(a) { + const p = this.input.id; + a.getSource(p) || + a.addSource(p, { + type: "canvas", + canvas: this.canvas, + coordinates: this.input.coordinates, + }), + a.getLayer(p) || + a.addLayer({ + id: p, + type: "raster", + source: p, + paint: this.input.layerPaint, + }), + this.maps.add(a); + } + removeFrom(a) { + const { id: p } = this.input; + a.getLayer(p) && a.removeLayer(p), + a.getSource(p) && a.removeSource(p), + this.maps.delete(a); + } + removeDOM() { + this.canvas.remove(); + } + annotationsCount() { + return this.annotations.size; + } + setOpacity(a) { + for (const p of this.maps.values()) + p.setPaintProperty(this.input.id, "raster-opacity", a); + } + getPixelKey(a, p) { + return `${a},${p}`; + } +} +function n0(m) { + return Math.max(m.naturalWidth, m.naturalHeight); +} +function g4() { + return ( + window.matchMedia("(display-mode: standalone)").matches || + ("standalone" in window.navigator && window.navigator.standalone === !0) + ); +} +function xc(m, a) { + return a.includes(m); +} +function v4(m) { + const a = { opaque: !0 }, + p = m.searchParams.get("lat"), + y = m.searchParams.get("lng"); + p && y && (a.pos = { lat: parseFloat(p), lng: parseFloat(y) }); + const M = m.searchParams.get("zoom"); + M && (a.zoom = parseFloat(M)); + const z = m.searchParams.get("season"); + z && (a.season = parseInt(z)); + const T = m.searchParams.get("opaque"); + return ( + T && (a.opaque = T !== "0"), + m.searchParams.get("select") && (a.select = !0), + (a.newUser = !!m.searchParams.get("new-user")), + (a.discordLinked = !!m.searchParams.get("discord-linked")), + (a.alliance = !!m.searchParams.get("alliance")), + a + ); +} +function y4(m, a) { + return ( + (m = new URL(m)), + a.pos !== void 0 && + (m.searchParams.set("lat", a.pos.lat.toString()), + m.searchParams.set("lng", a.pos.lng.toString())), + a.zoom !== void 0 && m.searchParams.set("zoom", a.zoom.toString()), + a.season !== void 0 && m.searchParams.set("season", a.season.toString()), + a.opaque !== void 0 && m.searchParams.set("opaque", a.opaque ? "1" : "0"), + a.newUser !== void 0 && + m.searchParams.set("new-user", a.newUser ? "1" : "0"), + a.alliance !== void 0 && + m.searchParams.set("alliance", a.alliance ? "1" : "0"), + a.select && m.searchParams.set("alliance", "1"), + m + ); +} +const Yd = bi({ shouldReload: !0 }); +var x4 = (m, a) => { + var p; + (p = a()) == null || p.close(); + }, + b4 = Te( + ' ' + ); +function w4(m, a) { + Lr(a, !0); + let p = zt(a, "ref", 15), + y = st(!1), + M = st(bi(a.description)), + z = st(void 0); + Fn(() => { + const De = (Ee) => { + var Fe; + Ee.key === "Escape" && ((Fe = p()) == null || Fe.close()); + }; + return ( + document.addEventListener("keydown", De), + () => document.removeEventListener("keydown", De) + ); + }); + var T = b4(), + s = A(T), + B = A(s), + O = A(B, !0); + k(B); + var X = j(B, 2), + K = A(X), + ne = A(K); + { + let De = ft(() => Hv()); + yx(ne, { + class: "h-24 rounded-lg", + get placeholder() { + return x(De); + }, + max: 512, + get value() { + return x(M); + }, + set value(Ee) { + se(M, Ee, !0); + }, + get validate() { + return x(z); + }, + set validate(Ee) { + se(z, Ee, !0); + }, + }); + } + k(K); + var H = j(K, 2), + fe = A(H); + fe.__click = [x4, p]; + var ge = A(fe, !0); + k(fe); + var Ie = j(fe, 2), + Ae = A(Ie, !0); + k(Ie), + k(H), + k(X), + k(s), + yn(2), + k(T), + Ko( + T, + (De) => p(De), + () => p() + ), + We( + (De, Ee, Fe) => { + de(O, De), + (fe.disabled = x(y)), + de(ge, Ee), + (Ie.disabled = x(y)), + de(Ae, Fe); + }, + [() => bx(), () => Ah(), () => FT()] + ), + di("submit", X, async () => { + var De, Ee, Fe; + try { + if (!((De = x(z)) != null && De())) return; + se(y, !0), + a.description !== x(M) && (await Qr.updateAllianceDescription(x(M))), + await ((Ee = a.onsuccess) == null ? void 0 : Ee.call(a, x(M))), + (Fe = p()) == null || Fe.close(); + } catch ($e) { + Fr.error($e.message); + } finally { + se(y, !1); + } + }), + $(m, T), + Dr(); +} +$n(["click"]); +var T4 = (m, a, p) => { + navigator.clipboard.writeText(x(a).toString()), + se(p, !0), + setTimeout(() => { + se(p, !1); + }, 1e3); + }, + C4 = Te( + '' + ), + S4 = Te( + ' ' + ); +function P4(m, a) { + Lr(a, !0); + let p = zt(a, "open", 15), + y = st(""), + M = st(!1); + const z = ft(() => yi.url.origin + `/join?id=${x(y)}`); + Wr(() => { + p() && + Qr.getAllianceInvites() + .then((Je) => { + se(y, Je[0], !0); + }) + .catch((Je) => { + Fr.error(Je.message); + }); + }), + Fn(() => { + const Je = (qe) => { + qe.key === "Escape" && p(!1); + }; + return ( + document.addEventListener("keydown", Je), + () => document.removeEventListener("keydown", Je) + ); + }); + var T = S4(), + s = A(T), + B = j(A(s), 2), + O = A(B, !0); + k(B); + var X = j(B, 2), + K = A(X, !0); + k(X); + var ne = j(X, 2), + H = A(ne); + let fe; + var ge = A(H); + Ka(ge); + var Ie = j(ge, 2), + Ae = A(Ie); + let De; + Ae.__click = [T4, z, M]; + var Ee = A(Ae, !0); + k(Ae), k(Ie), k(H); + var Fe = j(H, 2); + { + var $e = (Je) => { + var qe = C4(); + $(Je, qe); + }; + Oe(Fe, (Je) => { + x(y) || Je($e); + }); + } + k(ne), + k(s), + yn(2), + k(T), + Ni(T, () => (Je) => { + Wr(() => { + p() ? Je.show() : Je.close(); + }); + }), + We( + (Je, qe, Ze, Qe, Le, et) => { + de(O, Je), + de(K, qe), + (fe = zr( + H, + 1, + "border-base-content/20 rounded-field relative flex w-full items-center gap-1 border-2 py-1.5 pl-4 pr-2.5", + null, + fe, + Ze + )), + Av(ge, Qe), + (De = zr(Ae, 1, "btn btn-primary", null, De, Le)), + de(Ee, et); + }, + [ + () => O3(), + () => V3(), + () => ({ invisible: !x(y) }), + () => x(z).toString(), + () => ({ "btn-success": x(M) }), + () => (x(M) ? Fm() : Wf()), + ] + ), + di("close", T, () => p(!1)), + $(m, T), + Dr(); +} +$n(["click"]); +var I4 = Pr( + '' +); +function Qf(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = I4(); + ar(y, () => ({ + viewBox: "0 0 256 199", + width: "256", + height: "199", + xmlns: "http://www.w3.org/2000/svg", + preserveAspectRatio: "xMidYMid", + ...p, + })), + $(m, y); +} +var M4 = Te('(Verified)'), + k4 = Te(''), + A4 = async (m, a) => { + await navigator.clipboard.writeText(a.username), Fr.info(UC()); + }, + E4 = Te(""), + z4 = Te( + '
                ' + ); +function Eh(m, a) { + Lr(a, !0); + const p = !!a.id; + var y = z4(), + M = A(y), + z = A(M), + T = A(z); + k(z); + var s = j(z, 2); + { + var B = (ne) => { + var H = M4(); + $(ne, H); + }; + Oe(s, (ne) => { + p && ne(B); + }); + } + k(M); + var O = j(M, 2); + { + var X = (ne) => { + var H = k4(), + fe = A(H); + Qf(fe, { class: "size-4 opacity-70" }), + k(H), + We( + (ge) => Tr(H, "href", ge), + [() => `https://discord.com/users/${encodeURIComponent(a.id)}`] + ), + $(ne, H); + }, + K = (ne) => { + var H = E4(); + H.__click = [A4, a]; + var fe = A(H); + Qf(fe, { class: "size-4 opacity-70" }), k(H), $(ne, H); + }; + Oe(O, (ne) => { + p ? ne(X) : ne(K, !1); + }); + } + k(y), We(() => de(T, `Discord: ${a.username ?? ""}`)), $(m, y), Dr(); +} +$n(["click"]); +var L4 = Te(''), + D4 = Te('
                '); +function Um(m, a) { + Lr(a, !0); + const p = []; + let y = zt(a, "value", 15, "today"), + M = [ + { value: "today", label: vp() }, + { value: "week", label: tT() }, + { value: "month", label: iT() }, + { value: "all-time", label: sT() }, + ]; + var z = D4(); + hi( + z, + 21, + () => M, + (T) => T.value, + (T, s) => { + var B = L4(); + Ka(B); + var O; + We(() => { + Tr(B, "aria-label", x(s).label), + O !== (O = x(s).value) && (B.value = (B.__value = x(s).value) ?? ""); + }), + Lm(p, [], B, () => (x(s).value, y()), y), + $(T, B); + } + ), + k(z), + $(m, z), + Dr(); +} +const R4 = typeof window < "u" ? window : void 0; +function B4(m) { + let a = m.activeElement; + for (; a != null && a.shadowRoot; ) { + const p = a.shadowRoot.activeElement; + if (p === a) break; + a = p; + } + return a; +} +var bc, Xu, Pv; +let F4 = + ((Pv = class { + constructor(a = {}) { + Ar(this, bc); + Ar(this, Xu); + const { window: p = R4, document: y = p == null ? void 0 : p.document } = + a; + p !== void 0 && + (na(this, bc, y), + na( + this, + Xu, + Ev((M) => { + const z = Nu(p, "focusin", M), + T = Nu(p, "focusout", M); + return () => { + z(), T(); + }; + }) + )); + } + get current() { + var a; + return ( + (a = ot(this, Xu)) == null || a.call(this), + ot(this, bc) ? B4(ot(this, bc)) : null + ); + } + }), + (bc = new WeakMap()), + (Xu = new WeakMap()), + Pv); +new F4(); +function O4(m, a) { + switch (m) { + case "post": + Wr(a); + break; + case "pre": + Mm(a); + break; + } +} +function i0(m, a, p, y = {}) { + const { lazy: M = !1 } = y; + let z = !M, + T = Array.isArray(m) ? [] : void 0; + O4(a, () => { + const s = Array.isArray(m) ? m.map((O) => O()) : m(); + if (!z) { + (z = !0), (T = s); + return; + } + const B = ul(() => p(s, T)); + return (T = s), B; + }); +} +function dl(m, a, p) { + i0(m, "post", a, p); +} +function N4(m, a, p) { + i0(m, "pre", a, p); +} +dl.pre = N4; +var j4 = Te( + '' + ), + V4 = Te( + '
                ' + ), + q4 = Te(' '), + Z4 = (m, a, p) => { + a.onlastpixelclick({ + lat: x(p).lastLatitude ?? 0, + lng: x(p).lastLongitude ?? 0, + }); + }, + U4 = Te(""), + $4 = Te( + '
                ' + ), + G4 = Te( + '
                ' + ), + H4 = Te('
                '); +function W4(m, a) { + Lr(a, !0); + let p = zt(a, "reload", 15), + y = st(!0), + M = st([]), + z = st(0), + T = st("today"), + s = {}; + p(B); + function B() { + const ge = x(T); + Qr.allianceLeaderboard(ge) + .then((Ie) => { + se(M, Ie), (s = { [ge]: Ie }), se(y, !1); + }) + .catch((Ie) => { + Fr.error(Ie.message); + }); + } + dl( + () => [x(T)], + () => { + const ge = x(T), + Ie = s[ge]; + if (Ie) { + se(M, Ie), se(y, !1); + return; + } + se(y, !0), + Qr.allianceLeaderboard(ge) + .then((Ae) => { + se(M, Ae), (s[ge] = Ae), se(y, !1); + }) + .catch((Ae) => { + Fr.error(Ae.message); + }); + } + ); + var O = H4(), + X = A(O); + Um(X, { + get value() { + return x(T); + }, + set value(ge) { + se(T, ge, !0); + }, + }); + var K = j(X, 2), + ne = A(K); + { + var H = (ge) => { + var Ie = j4(); + $(ge, Ie); + }, + fe = (ge) => { + var Ie = er(), + Ae = Ct(Ie); + { + var De = (Fe) => { + var $e = V4(), + Je = A($e), + qe = j(Je); + { + var Ze = (Le) => { + var et = wi(); + We((nt) => de(et, nt), [() => vp().toLowerCase()]), + $(Le, et); + }, + Qe = (Le) => { + var et = er(), + nt = Ct(et); + { + var Ue = (vt) => { + var ee = wi(); + We((re) => de(ee, re), [() => Nm()]), $(vt, ee); + }, + ke = (vt) => { + var ee = er(), + re = Ct(ee); + { + var he = (oe) => { + var ze = wi(); + We((je) => de(ze, je), [() => jm()]), $(oe, ze); + }; + Oe( + re, + (oe) => { + x(T) === "month" && oe(he); + }, + !0 + ); + } + $(vt, ee); + }; + Oe( + nt, + (vt) => { + x(T) === "week" ? vt(Ue) : vt(ke, !1); + }, + !0 + ); + } + $(Le, et); + }; + Oe(qe, (Le) => { + x(T) === "today" ? Le(Ze) : Le(Qe, !1); + }); + } + k($e), + We((Le) => de(Je, `${Le ?? ""} `), [() => Om()]), + $(Fe, $e); + }, + Ee = (Fe) => { + var $e = G4(), + Je = A($e), + qe = A(Je), + Ze = j(A(qe)), + Qe = A(Ze, !0); + k(Ze); + var Le = j(Ze), + et = A(Le, !0); + k(Le), k(qe), k(Je); + var nt = j(Je); + hi( + nt, + 31, + () => x(M), + (Ue) => Ue.userId, + (Ue, ke, vt) => { + const ee = ft(() => { + var $t; + return ( + (($t = Mt.data) == null ? void 0 : $t.id) === x(ke).userId + ); + }); + var re = $4(); + let he; + var oe = A(re), + ze = A(oe, !0); + k(oe); + var je = j(oe), + pt = A(je), + it = A(pt); + co(it, { + class: "size-10 border", + get userId() { + return x(ke).userId; + }, + get pictureUrl() { + return x(ke).picture; + }, + }); + var ct = j(it, 2), + It = A(ct), + Dt = j(It), + at = A(Dt); + k(Dt), k(ct); + var dt = j(ct, 2); + { + var yt = ($t) => { + const tr = ft(() => So(x(ke).equippedFlag)); + var Qt = q4(), + Ot = A(Qt, !0); + k(Qt), + We(() => { + Tr(Qt, "data-tip", x(tr).name), de(Ot, x(tr).flag); + }), + $($t, Qt); + }; + Oe(dt, ($t) => { + x(ke).equippedFlag && $t(yt); + }); + } + var xt = j(dt, 2); + { + var St = ($t) => { + Eh($t, { + get username() { + return x(ke).discord; + }, + get id() { + return x(ke).discordId; + }, + }); + }; + Oe(xt, ($t) => { + x(ke).discord && $t(St); + }); + } + k(pt), k(je); + var wt = j(je), + _t = A(wt), + Lt = j(_t); + { + var Rt = ($t) => { + var tr = U4(); + let Qt; + tr.__click = [Z4, a, ke]; + var Ot = A(tr); + Em(Ot, { class: "size-4" }), + k(tr), + We( + (Nt, or) => { + (Qt = zr( + tr, + 1, + "btn btn-sm btn-ghost absolute -right-2 top-1/2 !-translate-y-1/2 sm:right-4", + null, + Qt, + Nt + )), + Tr(tr, "data-tip", or); + }, + [() => ({ tooltip: x(z) > 640 }), () => Mx()] + ), + $($t, tr); + }; + Oe(Lt, ($t) => { + x(ke).lastLatitude && x(ke).lastLongitude && $t(Rt); + }); + } + k(wt), + k(re), + We( + ($t, tr, Qt) => { + var Ot; + (he = zr(re, 1, "", null, he, $t)), + de(ze, x(vt) + 1), + zr(ct, 1, `font-semibold ${tr ?? ""} flex gap-1`), + de( + It, + `${ + (x(ee) + ? ((Ot = Mt.data) == null ? void 0 : Ot.name) ?? + x(ke).name + : x(ke).name) ?? "" + } ` + ), + de(at, `#${x(ke).userId ?? ""}`), + de(_t, `${Qt ?? ""} `); + }, + [ + () => ({ "bg-base-200": x(ee) }), + () => Oi(x(ke).userId), + () => x(ke).pixelsPainted.toLocaleString("en-US"), + ] + ), + ll( + re, + () => cl, + () => ({ duration: 200 }) + ), + $(Ue, re); + } + ), + k(nt), + k($e), + We( + (Ue, ke) => { + de(Qe, Ue), de(et, ke); + }, + [() => Dm(), () => zm()] + ), + $(Fe, $e); + }; + Oe( + Ae, + (Fe) => { + x(M).length === 0 ? Fe(De) : Fe(Ee, !1); + }, + !0 + ); + } + $(ge, Ie); + }; + Oe(ne, (ge) => { + x(y) ? ge(H) : ge(fe, !1); + }); + } + k(K), k(O), mp("innerWidth", (ge) => se(z, ge, !0)), $(m, O), Dr(); +} +$n(["click"]); +var X4 = Pr( + '' +); +function $m(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = X4(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var Y4 = (m, a) => a.onclickback(), + K4 = Te('
                ADMIN
                '), + J4 = async (m, a) => { + try { + (x(a).loading = !0), + await Qr.giveAllianceAdmin(x(a).id), + (x(a).role = "admin"); + } catch { + Fr.error(fS()); + } finally { + x(a).loading = !1; + } + }, + Q4 = async (m, a, p) => { + try { + (x(a).loading = !0), + await Qr.banAllianceUser(x(a).id), + (p.data = p.data.filter((y) => y.id !== x(a).id)); + } catch { + Fr.error(jT()); + } finally { + x(a).loading = !1; + } + }, + eM = Te( + '
              • ', + 1 + ), + tM = Te( + '
              • ' + ), + rM = Te( + '
                ' + ), + nM = Te( + '
                ' + ), + iM = (m, a, p) => { + Qr.unbanAllianceUser(x(a).id) + .then(() => { + p.data = p.data.filter((y) => y.id !== x(a).id); + }) + .catch((y) => Fr.error(y.message)) + .finally(() => { + x(a).loading = !1; + }); + }, + aM = Te( + '
                ' + ), + oM = Te('
                '), + sM = Te( + '
                ' + ), + lM = Te( + '

                ' + ); +function cM(m, a) { + Lr(a, !0); + let p = bi({ data: [], page: 0, hasNextPage: !0, loading: !1 }), + y = bi({ data: [], page: 0, hasNextPage: !0, loading: !1 }); + var M = lM(), + z = A(M), + T = A(z); + T.__click = [Y4, a]; + var s = A(T); + Dx(s, { class: "size-5" }), k(T); + var B = j(T, 2), + O = A(B, !0); + k(B), k(z); + var X = j(z, 2), + K = A(X); + Ka(K); + var ne = j(K, 2), + H = A(ne), + fe = A(H); + hi( + fe, + 21, + () => p.data, + (Qe) => Qe.id, + (Qe, Le, et) => { + const nt = ft(() => { + var yt; + return ((yt = Mt.data) == null ? void 0 : yt.id) === x(Le).id; + }); + var Ue = rM(), + ke = A(Ue), + vt = A(ke), + ee = A(vt); + co(ee, { + class: "size-10 border", + get userId() { + return x(Le).id; + }, + get pictureUrl() { + return x(Le).picture; + }, + }); + var re = j(ee, 2), + he = A(re); + k(re); + var oe = j(re, 2); + { + var ze = (yt) => { + var xt = K4(); + $(yt, xt); + }; + Oe(oe, (yt) => { + x(Le).role === "admin" && yt(ze); + }); + } + k(vt), k(ke); + var je = j(ke), + pt = A(je), + it = A(pt), + ct = A(it); + $m(ct, { class: "size-4" }), k(it); + var It = j(it, 2), + Dt = A(It); + { + var at = (yt) => { + var xt = eM(), + St = Ct(xt), + wt = A(St); + wt.__click = [J4, Le]; + var _t = A(wt, !0); + k(wt), k(St); + var Lt = j(St, 2), + Rt = A(Lt); + Rt.__click = [Q4, Le, p]; + var $t = A(Rt, !0); + k(Rt), + k(Lt), + We( + (tr, Qt) => { + (wt.disabled = x(Le).loading), + de(_t, tr), + (Rt.disabled = x(Le).loading), + de($t, Qt); + }, + [() => TT(), () => Wv()] + ), + $(yt, xt); + }, + dt = (yt) => { + var xt = tM(), + St = A(xt); + St.disabled = !0; + var wt = A(St, !0); + k(St), k(xt), We((_t) => de(wt, _t), [() => MT()]), $(yt, xt); + }; + Oe(Dt, (yt) => { + x(Le).role === "member" ? yt(at) : yt(dt, !1); + }); + } + k(It), + k(pt), + k(je), + k(Ue), + We( + (yt) => { + var xt; + zr(re, 1, `font-semibold ${yt ?? ""}`), + de( + he, + `${ + (x(nt) + ? ((xt = Mt.data) == null ? void 0 : xt.name) ?? x(Le).name + : x(Le).name) ?? "" + } #${x(Le).id ?? ""}` + ); + }, + [() => Oi(x(Le).id)] + ), + $(Qe, Ue); + } + ), + k(fe), + k(H); + var ge = j(H, 2); + { + var Ie = (Qe) => { + var Le = er(), + et = Ct(Le); + ju( + et, + () => p.page, + (nt) => { + var Ue = nM(); + Ni(Ue, () => (ke) => { + const vt = new IntersectionObserver((ee) => { + ee[0].isIntersecting && + !p.loading && + ((p.loading = !0), + Qr.getAllianceMembers(p.page) + .then((re) => { + (p.data = [...p.data, ...re.data]), + (p.hasNextPage = re.hasNext), + p.page++; + }) + .catch((re) => { + Fr.error(re.message); + }) + .finally(() => { + p.loading = !1; + })); + }); + return ( + vt.observe(ke), + () => { + vt.disconnect(); + } + ); + }), + $(nt, Ue); + } + ), + $(Qe, Le); + }; + Oe(ge, (Qe) => { + p.hasNextPage && Qe(Ie); + }); + } + k(ne); + var Ae = j(ne, 2), + De = j(Ae, 2), + Ee = A(De), + Fe = A(Ee); + hi( + Fe, + 21, + () => y.data, + (Qe) => Qe.id, + (Qe, Le, et) => { + var nt = aM(), + Ue = A(nt), + ke = A(Ue), + vt = A(ke); + co(vt, { + class: "size-10 border", + get userId() { + return x(Le).id; + }, + get pictureUrl() { + return x(Le).picture; + }, + }); + var ee = j(vt, 2), + re = A(ee); + k(ee), k(ke), k(Ue); + var he = j(Ue), + oe = A(he); + oe.__click = [iM, Le, y]; + var ze = A(oe, !0); + k(oe), + k(he), + k(nt), + We( + (je, pt) => { + zr(ee, 1, `font-semibold ${je ?? ""}`), + de(re, `${x(Le).name ?? ""} #${x(Le).id ?? ""}`), + (oe.disabled = x(Le).loading), + de(ze, pt); + }, + [() => Oi(x(Le).id), () => ET()] + ), + $(Qe, nt); + } + ), + k(Fe), + k(Ee); + var $e = j(Ee, 2); + { + var Je = (Qe) => { + var Le = oM(), + et = A(Le, !0); + k(Le), We((nt) => de(et, nt), [() => DT()]), $(Qe, Le); + }; + Oe($e, (Qe) => { + !y.hasNextPage && y.data.length === 0 && Qe(Je); + }); + } + var qe = j($e, 2); + { + var Ze = (Qe) => { + var Le = er(), + et = Ct(Le); + ju( + et, + () => y.page, + (nt) => { + var Ue = sM(); + Ni(Ue, () => (ke) => { + const vt = new IntersectionObserver((ee) => { + ee[0].isIntersecting && + !y.loading && + ((y.loading = !0), + Qr.getAllianceBannedMembers(y.page) + .then((re) => { + (y.data = [...y.data, ...re.data]), + (y.hasNextPage = re.hasNext), + y.page++; + }) + .catch((re) => { + Fr.error(re.message); + }) + .finally(() => { + y.loading = !1; + })); + }); + return ( + vt.observe(ke), + () => { + vt.disconnect(); + } + ); + }), + $(nt, Ue); + } + ), + $(Qe, Le); + }; + Oe(qe, (Qe) => { + y.hasNextPage && Qe(Ze); + }); + } + k(De), + k(X), + k(M), + We( + (Qe, Le, et) => { + de(O, Qe), Tr(K, "aria-label", Le), Tr(Ae, "aria-label", et); + }, + [() => Dv(), () => ZT(), () => Xv()] + ), + $(m, M), + Dr(); +} +$n(["click"]); +var uM = Te(' '), + hM = Te(''), + dM = Te('

                '), + pM = Te( + '
                ' + ); +function em(m, a) { + Lr(a, !0); + let p = zt(a, "value", 15), + y = zt(a, "validate", 15), + M = st(""); + const z = ft(() => { + var Ae; + return ((Ae = p()) == null ? void 0 : Ae.length) ?? 0; + }); + y(T); + function T() { + return a.min !== void 0 && x(z) < a.min + ? (se(M, x(z) === 0 ? "Required" : `Min. characters: ${a.min}`, !0), !1) + : a.max !== void 0 && x(z) > a.max + ? (se(M, `Max. characters: ${a.max}`), !1) + : !0; + } + Wr(() => { + var Ae; + a.max !== void 0 && + x(z) > a.max && + p((Ae = p()) == null ? void 0 : Ae.substring(0, a.max)); + }); + var s = pM(), + B = A(s); + let O; + var X = A(B); + { + var K = (Ae) => { + var De = uM(), + Ee = A(De, !0); + k(De), We(() => de(Ee, a.label)), $(Ae, De); + }; + Oe(X, (Ae) => { + a.label && Ae(K); + }); + } + var ne = j(X, 2); + Ka(ne); + var H = j(ne, 2); + { + var fe = (Ae) => { + var De = hM(), + Ee = A(De, !0); + k(De), We(() => de(Ee, a.max - x(z))), $(Ae, De); + }; + Oe(H, (Ae) => { + a.max !== void 0 && Ae(fe); + }); + } + k(B); + var ge = j(B, 2); + { + var Ie = (Ae) => { + var De = dM(), + Ee = A(De, !0); + k(De), We(() => de(Ee, x(M))), $(Ae, De); + }; + Oe(ge, (Ae) => { + x(M) && Ae(Ie); + }); + } + k(s), + We( + (Ae) => { + (O = zr(B, 1, "input w-full", null, O, Ae)), + Tr(ne, "placeholder", a.placeholder), + Tr(ne, "maxlength", a.max); + }, + [() => ({ "input-error": !!x(M) })] + ), + dp(ne, p), + $(m, s), + Dr(); +} +var fM = (m, a) => { + var p; + (p = a()) == null || p.close(); + }, + mM = Te( + ' ' + ); +function _M(m, a) { + Lr(a, !0); + let p = zt(a, "ref", 15), + y = st(!1), + M = st(""), + z = st(void 0); + Fn(() => { + const De = (Ee) => { + var Fe; + Ee.key === "Escape" && ((Fe = p()) == null || Fe.close()); + }; + return ( + document.addEventListener("keydown", De), + () => document.removeEventListener("keydown", De) + ); + }); + var T = mM(), + s = A(T), + B = A(s), + O = A(B, !0); + k(B); + var X = j(B, 2), + K = A(X), + ne = A(K); + { + let De = ft(() => Kf()), + Ee = ft(() => gT()); + em(ne, { + get label() { + return x(De); + }, + get placeholder() { + return x(Ee); + }, + min: 1, + max: 16, + get value() { + return x(M); + }, + set value(Fe) { + se(M, Fe, !0); + }, + get validate() { + return x(z); + }, + set validate(Fe) { + se(z, Fe, !0); + }, + }); + } + k(K); + var H = j(K, 2), + fe = A(H); + fe.__click = [fM, p]; + var ge = A(fe, !0); + k(fe); + var Ie = j(fe, 2), + Ae = A(Ie, !0); + k(Ie), + k(H), + k(X), + k(s), + yn(2), + k(T), + Ko( + T, + (De) => p(De), + () => p() + ), + We( + (De, Ee, Fe) => { + de(O, De), + (fe.disabled = x(y)), + de(ge, Ee), + (Ie.disabled = x(y)), + de(Ae, Fe); + }, + [() => fT(), () => Ah(), () => xT()] + ), + di("submit", X, async () => { + var De, Ee; + try { + if (!((De = x(z)) != null && De())) return; + se(y, !0); + const { id: Fe } = await Qr.createAlliance(x(M)); + await a.onsuccess(Fe), (Ee = p()) == null || Ee.close(); + } catch (Fe) { + Fr.error(Fe.message); + } finally { + se(y, !1); + } + }), + $(m, T), + Dr(); +} +$n(["click"]); +var gM = Pr( + '' +); +function zh(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = gM(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var vM = Pr( + '' + ), + yM = Pr( + '' + ); +function tm(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy", "filled"]); + var y = er(), + M = Ct(y); + { + var z = (s) => { + var B = vM(); + ar(B, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(s, B); + }, + T = (s) => { + var B = yM(); + ar(B, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(s, B); + }; + Oe(M, (s) => { + a.filled ? s(z) : s(T, !1); + }); + } + $(m, y); +} +var xM = Pr( + '' +); +function bM(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = xM(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var wM = Pr( + '' +); +function TM(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = wM(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var CM = Pr( + '' +); +function SM(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = CM(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var PM = Pr( + '' +); +function yp(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = PM(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +function IM(m, a = "_blank") { + return m.replaceAll( + /https?:\/\/[^\s]+/g, + (p) => `${p}` + ); +} +var MM = Te( + '
                ' + ), + kM = async (m, a, p, y) => { + try { + se(a, !0), await Qr.leaveAlliance(), se(p, !0), await y(); + } catch (M) { + Fr.error(M.message); + } finally { + se(a, !1); + } + }, + AM = (m, a) => { + se(a, !0); + }, + EM = Te('
                '), + zM = (m, a) => { + var p; + (p = x(a)) == null || p.show(); + }, + LM = Te( + '' + ), + DM = Te( + '' + ), + RM = Te(' '), + BM = (m, a) => se(a, !0), + FM = Te(''), + OM = (m, a, p) => { + var y; + (y = x(a)) != null && y.hq + ? p.onhqclick({ lat: x(a).hq.latitude, lng: x(a).hq.longitude }) + : p.onhqchange(); + }, + NM = Te(' '), + jM = Te(' '), + VM = Te(''), + qM = Te( + '
                ' + ), + ZM = Te( + '

                ', + 1 + ), + UM = (m, a) => { + var p; + (p = x(a)) == null || p.show(); + }, + $M = Te( + '
                ', + 1 + ), + GM = Te('
                '); +function HM(m, a) { + Lr(a, !0); + let p = st(void 0), + y = st(!0), + M = st(void 0), + z = st(!1), + T = st(void 0), + s = st(!1), + B = st(!1), + O = st(() => {}); + dl( + () => a.open, + () => { + a.open && Yd.shouldReload && X(); + } + ), + Fn(() => { + const ge = setInterval(() => { + Yd.shouldReload = !0; + }, 1e4); + return () => { + clearTimeout(ge); + }; + }); + async function X() { + try { + se(p, await Qr.getAlliance(), !0), + x(p) && x(O)(), + se(y, !1), + (Yd.shouldReload = !1); + } catch (ge) { + Fr.error(ge.message); + } + } + var K = GM(), + ne = A(K); + { + var H = (ge) => { + var Ie = MM(); + $(ge, Ie); + }, + fe = (ge) => { + var Ie = er(), + Ae = Ct(Ie); + { + var De = (Fe) => { + cM(Fe, { onclickback: () => se(B, !1) }); + }, + Ee = (Fe) => { + var $e = er(), + Je = Ct($e); + { + var qe = (Qe) => { + var Le = ZM(), + et = Ct(Le), + nt = A(et), + Ue = A(nt, !0); + k(nt); + var ke = j(nt, 2), + vt = A(ke), + ee = A(vt), + re = A(ee); + $m(re, { class: "size-4" }), k(ee); + var he = j(ee, 2), + oe = A(he), + ze = A(oe); + ze.__click = [kM, z, y, X]; + var je = A(ze, !0); + k(ze), k(oe), k(he), k(vt); + var pt = j(vt, 2); + { + var it = (ue) => { + var V = EM(), + U = A(V); + U.__click = [AM, s]; + var Y = A(U); + SM(Y, { class: "size-4" }), + k(U), + k(V), + We((ie) => Tr(V, "data-tip", ie), [() => W3()]), + $(ue, V); + }; + Oe(pt, (ue) => { + x(p).role == "admin" && ue(it); + }); + } + k(ke), k(et); + var ct = j(et, 2); + { + var It = (ue) => { + var V = DM(), + U = A(V); + Am(U, () => IM(x(p).description || Hv())); + var Y = j(U, 2); + { + var ie = (pe) => { + var Se = LM(); + Se.__click = [zM, T]; + var Me = A(Se); + tm(Me, { class: "size-4" }), k(Se), $(pe, Se); + }; + Oe(Y, (pe) => { + x(p).role === "admin" && pe(ie); + }); + } + k(V), $(ue, V); + }; + Oe(ct, (ue) => { + (x(p).description || x(p).role === "admin") && ue(It); + }); + } + var Dt = j(ct, 2), + at = A(Dt), + dt = A(at); + zh(dt, { class: "inline size-4" }); + var yt = j(dt, 2), + xt = A(yt), + St = j(xt), + wt = A(St, !0); + k(St), k(yt), k(at); + var _t = j(at, 2), + Lt = A(_t); + yp(Lt, { class: "inline size-4" }); + var Rt = j(Lt, 2), + $t = A(Rt), + tr = j($t); + { + var Qt = (ue) => { + var V = RM(), + U = A(V, !0); + k(V), + We( + (Y) => de(U, Y), + [() => x(p).members.toLocaleString("en-US")] + ), + $(ue, V); + }, + Ot = (ue) => { + var V = FM(); + V.__click = [BM, B]; + var U = A(V, !0); + k(V), + We( + (Y) => de(U, Y), + [() => x(p).members.toLocaleString("en-US")] + ), + $(ue, V); + }; + Oe(tr, (ue) => { + x(p).role === "member" ? ue(Qt) : ue(Ot, !1); + }); + } + k(Rt), k(_t); + var Nt = j(_t, 2); + { + var or = (ue) => { + var V = qM(), + U = A(V); + bM(U, { class: "inline size-4" }); + var Y = j(U, 2), + ie = A(Y), + pe = j(ie); + pe.__click = [OM, p, a]; + var Se = A(pe); + { + var Me = (Ke) => { + var kt = NM(), + ye = A(kt); + k(kt), + We( + (Bt, rr) => + de(ye, `${Bt ?? ""}, ${rr ?? ""}`), + [ + () => x(p).hq.latitude.toFixed(3), + () => x(p).hq.longitude.toFixed(3), + ] + ), + $(Ke, kt); + }, + we = (Ke) => { + var kt = jM(), + ye = A(kt, !0); + k(kt), + We((Bt) => de(ye, Bt), [() => T3()]), + $(Ke, kt); + }; + Oe(Se, (Ke) => { + x(p).hq ? Ke(Me) : Ke(we, !1); + }); + } + k(pe), k(Y); + var Ve = j(Y, 2); + { + var ut = (Ke) => { + var kt = VM(); + kt.__click = function (...Bt) { + var rr; + (rr = a.onhqchange) == null || rr.apply(this, Bt); + }; + var ye = A(kt); + tm(ye, { class: "text-base-content/50 size-4" }), + k(kt), + $(Ke, kt); + }; + Oe(Ve, (Ke) => { + x(p).role === "admin" && Ke(ut); + }); + } + k(V), + We((Ke) => de(ie, `${Ke ?? ""}: `), [() => x3()]), + $(ue, V); + }; + Oe(Nt, (ue) => { + (x(p).hq || x(p).role === "admin") && ue(or); + }); + } + k(Dt); + var cr = j(Dt, 2), + Vr = A(cr), + mr = A(Vr, !0); + k(Vr); + var hr = j(Vr, 2), + _r = A(hr); + W4(_r, { + get allianceId() { + return x(p).id; + }, + get onlastpixelclick() { + return a.onlastpixelclick; + }, + get reload() { + return x(O); + }, + set reload(ue) { + se(O, ue, !0); + }, + }), + k(hr), + k(cr); + var Ir = j(cr, 2); + w4(Ir, { + get description() { + return x(p).description; + }, + onsuccess: async (ue) => { + x(p) && (x(p).description = ue); + }, + get ref() { + return x(T); + }, + set ref(ue) { + se(T, ue, !0); + }, + }); + var qr = j(Ir, 2); + P4(qr, { + get open() { + return x(s); + }, + set open(ue) { + se(s, ue, !0); + }, + }), + We( + (ue, V, U, Y, ie) => { + de(Ue, x(p).name), + (ze.disabled = x(z)), + de(je, ue), + de(xt, `${V ?? ""}: `), + de(wt, U), + de($t, `${Y ?? ""}: `), + de(mr, ie); + }, + [ + () => g3(), + () => zm(), + () => x(p).pixelsPainted.toLocaleString("en-US"), + () => Dv(), + () => Bm(), + ] + ), + $(Qe, Le); + }, + Ze = (Qe) => { + var Le = $M(), + et = Ct(Le), + nt = A(et), + Ue = A(nt); + k(nt); + var ke = j(nt, 2), + vt = A(ke); + TM(vt, { class: "size-5" }); + var ee = j(vt, 1, !0); + k(ke); + var re = j(ke, 2), + he = A(re), + oe = A(he, !0); + k(he), k(re); + var ze = j(re, 2); + ze.__click = [UM, M]; + var je = A(ze); + Rv(je, { class: "size-6" }); + var pt = j(je); + k(ze), k(et); + var it = j(et, 2); + _M(it, { + onsuccess: X, + get ref() { + return x(M); + }, + set ref(ct) { + se(M, ct, !0); + }, + }), + We( + (ct, It, Dt, at) => { + de(Ue, `${ct ?? ""}:`), + de(ee, It), + de(oe, Dt), + de(pt, ` ${at ?? ""}`); + }, + [() => P3(), () => k3(), () => z3(), () => R3()] + ), + $(Qe, Le); + }; + Oe( + Je, + (Qe) => { + x(p) ? Qe(qe) : Qe(Ze, !1); + }, + !0 + ); + } + $(Fe, $e); + }; + Oe( + Ae, + (Fe) => { + x(B) ? Fe(De) : Fe(Ee, !1); + }, + !0 + ); + } + $(ge, Ie); + }; + Oe(ne, (ge) => { + x(y) ? ge(H) : ge(fe, !1); + }); + } + k(K), $(m, K), Dr(); +} +$n(["click"]); +var WM = Pr( + '' +); +function xp(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = WM(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var XM = Te( + ' ' +); +function YM(m, a) { + Lr(a, !0); + let p = zt(a, "open", 15); + Fn(() => { + const K = (ne) => { + ne.key === "Escape" && p(!1); + }; + return ( + document.addEventListener("keydown", K), + () => document.removeEventListener("keydown", K) + ); + }); + var y = XM(), + M = A(y), + z = j(A(M), 2), + T = A(z); + xp(T, { class: "size-5 max-sm:size-6" }); + var s = j(T, 2), + B = A(s, !0); + k(s), k(z); + var O = j(z, 2), + X = A(O); + HM(X, { + get open() { + return p(); + }, + get onhqchange() { + return a.onhqchange; + }, + get onhqclick() { + return a.onhqclick; + }, + get onlastpixelclick() { + return a.onlastpixelclick; + }, + }), + k(O), + k(M), + yn(2), + k(y), + Ni(y, () => (K) => { + Wr(() => { + p() + ? (K.show(), + yi.url.searchParams.get("alliance") && + (yi.url.searchParams.delete("alliance"), km(yi.url.toString()))) + : K.close(); + }); + }), + We((K) => de(B, K), [() => _p()]), + di("close", y, () => p(!1)), + Ai( + 2, + O, + () => ia, + () => ({ duration: 300 }) + ), + $(m, y), + Dr(); +} +function KM(m, a, p) { + return new Promise((y, M) => { + m.once("render", () => { + const z = m.getCanvas().toDataURL(), + T = document.createElement("img"); + (T.src = z), + (T.onload = () => { + const s = document.createElement("canvas"); + (s.width = T.width), (s.height = T.height); + const B = s.getContext("2d"); + if (B) { + B.drawImage(T, 0, 0); + const [O, X, K, ne] = B.getImageData(a, p, 1, 1).data; + y([O, X, K, ne]); + } else M(new Error("Could not get 2d context from canvas")); + T.remove(), s.remove(); + }); + }), + m.triggerRepaint(); + }); +} +function a0(m, a) { + return new Promise((p, y) => { + m.once("render", () => { + const M = m.getCanvas(); + let z = M; + if ((a != null && a.maxWidth) || (a != null && a.maxHeight)) { + const T = M.width, + s = M.height, + B = (a == null ? void 0 : a.maxWidth) ?? T, + O = (a == null ? void 0 : a.maxHeight) ?? s; + z = document.createElement("canvas"); + const X = Math.min(B / T, O / s); + (z.width = Math.floor(T * X)), (z.height = Math.floor(s * X)); + const K = z.getContext("2d"); + K && K.drawImage(M, 0, 0, z.width, z.height); + } + try { + z.toBlob( + (T) => { + T && p(T); + }, + (a == null ? void 0 : a.type) ?? "image/png", + (a == null ? void 0 : a.quality) ?? 1 + ); + } catch (T) { + y(T); + } finally { + z !== M && z.remove(); + } + }); + }); +} +var JM = Pr( + '' +); +function QM(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = JM(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + height: "24px", + viewBox: "0 -960 960 960", + width: "24px", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var e6 = Pr( + '' +); +function o0(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = e6(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +const gc = { hour: 3600 * 1e3, min: 60 * 1e3, sec: 1e3 }; +function rp(m) { + const a = Math.floor(m / gc.hour); + m -= a * gc.hour; + const p = Math.floor(m / gc.min); + m -= p * gc.min; + const M = Math.floor(m / gc.sec) + .toString() + .padStart(2, "0"); + return a > 0 ? `${a}:${p.toString().padStart(2, "0")}:${M}` : `${p}:${M}`; +} +function t6(m) { + const a = new Date(), + p = a.getFullYear(), + y = String(a.getMonth() + 1).padStart(2, "0"), + M = String(a.getDate()).padStart(2, "0"), + z = String(a.getHours()).padStart(2, "0"), + T = String(a.getMinutes()).padStart(2, "0"), + s = String(a.getSeconds()).padStart(2, "0"); + return `${p}-${y}-${M} ${z}:${T}:${s}`; +} +var r6 = (m, a, p) => { + navigator.clipboard.writeText(a.url.toString()), + se(p, !0), + setTimeout(() => { + se(p, !1); + }, 1e3); + }, + n6 = Te('Screenshot'), + i6 = Te( + '
                ' + ), + a6 = async (m, a) => { + x(a) && + (await navigator.clipboard.write([ + new ClipboardItem({ "image/png": x(a) }), + ]), + Fr.info(xP())); + }, + o6 = Te( + '' + ), + s6 = Te( + ' ' + ); +function l6(m, a) { + Lr(a, !0); + let p = zt(a, "open", 15), + y = st(!1); + Fn(() => { + const Ee = (Fe) => { + Fe.key === "Escape" && p(!1); + }; + return ( + document.addEventListener("keydown", Ee), + () => document.removeEventListener("keydown", Ee) + ); + }); + let M = st(null), + z = st(""); + Wr(() => { + p() + ? (a.hideHover(), + setTimeout(async () => { + a0(a.map) + .then((Ee) => { + se(M, Ee, !0), se(z, URL.createObjectURL(x(M)), !0); + }) + .finally(() => { + a.showHover(); + }); + }, 500)) + : x(z) && (URL.revokeObjectURL(x(z)), se(M, null), se(z, "")); + }); + var T = s6(), + s = A(T), + B = j(A(s), 2), + O = A(B); + o0(O, { class: "size-5" }); + var X = j(O); + k(B); + var K = j(B, 2), + ne = A(K); + Ka(ne); + var H = j(ne, 2), + fe = A(H); + let ge; + fe.__click = [r6, a, y]; + var Ie = A(fe, !0); + k(fe), k(H), k(K); + var Ae = j(K, 2); + { + var De = (Ee) => { + const Fe = ft(() => { + var oe; + return (oe = a.map) == null ? void 0 : oe.getCanvas(); + }); + var $e = o6(), + Je = A($e), + qe = A(Je); + QM(qe, { class: "inline size-5" }); + var Ze = j(qe); + k(Je); + var Qe = j(Je, 2); + { + var Le = (oe) => { + var ze = n6(); + We(() => { + Tr(ze, "src", x(z)), + Tr(ze, "width", x(Fe).width), + Tr(ze, "height", x(Fe).height); + }), + $(oe, ze); + }, + et = (oe) => { + var ze = i6(); + We(() => kc(ze, `aspect-ratio: ${x(Fe).width / x(Fe).height}`)), + $(oe, ze); + }; + Oe(Qe, (oe) => { + x(z) ? oe(Le) : oe(et, !1); + }); + } + var nt = j(Qe, 2), + Ue = A(nt); + Ue.__click = [a6, M]; + var ke = A(Ue); + Rm(ke, { class: "size-5" }); + var vt = j(ke); + k(Ue); + var ee = j(Ue, 2), + re = A(ee); + zv(re, { class: "size-5" }); + var he = j(re); + k(ee), + k(nt), + k($e), + We( + (oe, ze, je, pt) => { + de(Ze, ` ${oe ?? ""}`), + de(vt, ` ${ze ?? ""}`), + Tr(ee, "href", x(z)), + Tr(ee, "download", `wplace_${je ?? ""}.png`), + de(he, ` ${pt ?? ""}`); + }, + [ + () => fP(), + () => Wf(), + () => t6().replaceAll(" ", "_").replaceAll(":", "-"), + () => gP(), + ] + ), + Ai( + 2, + $e, + () => ia, + () => ({ duration: 300 }) + ), + $(Ee, $e); + }; + Oe(Ae, (Ee) => { + p() && Ee(De); + }); + } + k(s), + yn(2), + k(T), + Ni(T, () => (Ee) => { + Wr(() => { + p() ? Ee.show() : Ee.close(); + }); + }), + We( + (Ee, Fe, $e, Je) => { + de(X, ` ${Ee ?? ""}`), + Av(ne, Fe), + (ge = zr(fe, 1, "btn btn-primary", null, ge, $e)), + de(Ie, Je); + }, + [ + () => kC(), + () => a.url.toString(), + () => ({ "btn-success": x(y) }), + () => (x(y) ? Fm() : Wf()), + ] + ), + di("close", T, () => p(!1)), + $(m, T), + Dr(); +} +$n(["click"]); +var c6 = Pr( + '' +); +function u6(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = c6(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var h6 = Te( + '
              • ' + ), + d6 = Te( + '

                  ' + ); +function Gm(m, a) { + Lr(a, !1); + const p = [Kw(), Ww(), e5(), n5(), o5(), c5(), d5()]; + Nv(); + var y = d6(), + M = A(y), + z = A(M); + u6(z, { class: "size-5" }); + var T = j(z, 2), + s = A(T), + B = j(s), + O = A(B, !0); + k(B), k(T), k(M); + var X = j(M, 2), + K = A(X); + hi( + K, + 5, + () => p, + hp, + (fe, ge) => { + var Ie = h6(), + Ae = A(Ie, !0); + k(Ie), We(() => de(Ae, x(ge))), $(fe, Ie); + } + ), + k(K); + var ne = j(K, 2), + H = A(ne, !0); + k(ne), + k(X), + k(y), + We( + (fe, ge, Ie) => { + de(s, `${fe ?? ""} `), de(O, ge), de(H, Ie); + }, + [() => qw(), () => $w(), () => m5()] + ), + $(m, y), + Dr(); +} +var p6 = (m, a) => { + a(!1); + }, + f6 = Te( + ' ' + ); +function m6(m, a) { + Lr(a, !0); + let p = zt(a, "open", 15); + Fn(() => { + const O = (X) => { + X.key === "Escape" && p(!1); + }; + return ( + document.addEventListener("keydown", O), + () => document.removeEventListener("keydown", O) + ); + }); + var y = f6(), + M = A(y), + z = j(A(M), 2), + T = j(A(z), 2), + s = A(T); + Gm(s, {}), k(T); + var B = j(T, 2); + (B.__click = [p6, p]), + k(z), + k(M), + yn(2), + k(y), + Ni(y, () => (O) => { + Wr(() => { + p() ? O.show() : O.close(); + }); + }), + di("close", y, () => p(!1)), + $(m, y), + Dr(); +} +$n(["click"]); +var _6 = () => { + yi.url.searchParams.delete("new-user"), km(yi.url.toString()); + }, + g6 = Te( + '' + ); +function v6(m, a) { + Lr(a, !0); + let p = zt(a, "open", 15); + Fn(() => { + const ge = (Ie) => { + Ie.key === "Escape" && p(!1); + }; + return ( + document.addEventListener("keydown", ge), + () => document.removeEventListener("keydown", ge) + ); + }); + var y = g6(), + M = A(y), + z = A(M), + T = A(z), + s = A(T), + B = A(s, !0); + k(s); + var O = j(s, 2); + jv(O, { hasText: !0, size: "medium" }), k(T), k(z); + var X = j(z, 2), + K = A(X); + Gm(K, {}), k(X); + var ne = j(X, 2), + H = A(ne); + H.__click = [_6]; + var fe = A(H, !0); + k(H), + k(ne), + k(M), + k(y), + Ni(y, () => (ge) => { + Wr(() => { + p() ? ge.show() : ge.close(); + }); + }), + We( + (ge, Ie) => { + de(B, ge), de(fe, Ie); + }, + [() => Nw(), () => v5()] + ), + di("close", y, () => p(!1)), + $(m, y), + Dr(); +} +$n(["click"]); +function y6() { + const m = navigator.userAgent, + a = navigator.vendor; + return /Chrome/.test(m) && /Google Inc/.test(a) + ? "Chrome" + : /Safari/.test(m) && /Apple Computer/.test(a) + ? "Safari" + : /Firefox/.test(m) + ? "Firefox" + : /Edge/.test(m) + ? "Edge" + : /Opera|OPR/.test(m) + ? "Opera" + : "Unknown"; +} +var x6 = Pr( + '' +); +function b6(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = x6(); + ar(y, () => ({ + viewBox: "0 0 512 512", + fill: "currentColor", + xmlns: "http://www.w3.org/2000/svg", + ...p, + })), + $(m, y); +} +var w6 = Pr( + '' +); +function rm(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = w6(); + ar(y, () => ({ + viewBox: "0 0 256 199", + width: "256", + height: "199", + xmlns: "http://www.w3.org/2000/svg", + preserveAspectRatio: "xMidYMid", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var T6 = Pr( + '' +); +function C6(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = T6(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + preserveAspectRatio: "xMidYMid", + viewBox: "0 0 260 260", + ...p, + })), + $(m, y); +} +var S6 = Pr( + '' +); +function np(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = S6(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var P6 = Pr(``); +function I6(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = P6(); + ar(y, () => ({ + viewBox: "0 0 24 24", + fill: "currentColor", + xmlns: "http://www.w3.org/2000/svg", + "aria-label": "Tiktok", + ...p, + })), + $(m, y); +} +var M6 = Pr(``); +function k6(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = M6(); + ar(y, () => ({ + viewBox: "0 0 24 24", + fill: "currentColor", + xmlns: "http://www.w3.org/2000/svg", + "aria-label": "YouTube", + ...p, + })), + $(m, y); +} +var A6 = Te( + ' link', + 1 + ), + E6 = Te('chrome://settings/system.', 1), + z6 = Te( + 'edge://settings/system/manageSystem.', + 1 + ), + L6 = Te(' ', 1), + D6 = Te( + '' + ), + R6 = Te( + ' ' + ); +function B6(m, a) { + Lr(a, !0); + let p = zt(a, "open", 15); + Fn(() => { + const K = (ne) => { + ne.key === "Escape" && p(!1); + }; + return ( + document.addEventListener("keydown", K), + () => document.removeEventListener("keydown", K) + ); + }); + const y = y6(); + var M = R6(), + z = A(M), + T = j(A(z), 2); + { + var s = (K) => { + var ne = D6(), + H = A(ne), + fe = A(H); + jv(fe, { hasText: !0, size: "medium" }); + var ge = j(fe, 2), + Ie = A(ge), + Ae = j(Ie, 4); + yn(), k(ge); + var De = j(ge, 2), + Ee = A(De), + Fe = A(Ee), + $e = A(Fe); + rm($e, { class: "text-base-content mr-0.5 inline size-4" }), yn(2), k(Fe); + var Je = j(Fe, 4), + qe = A(Je); + b6(qe, { class: "size-4.5 mr-0.5 inline" }), yn(2), k(Je); + var Ze = j(Je, 4), + Qe = A(Ze); + C6(Qe, { class: "mr-0.5 inline size-3.5" }), yn(2), k(Ze); + var Le = j(Ze, 4), + et = A(Le); + k6(et, { class: "mr-0.5 inline size-3.5" }), yn(2), k(Le); + var nt = j(Le, 4), + Ue = A(nt); + I6(Ue, { class: "mr-0.5 inline size-3.5" }), + yn(2), + k(nt), + k(Ee), + k(De), + k(H); + var ke = j(H, 2), + vt = A(ke), + ee = A(vt, !0); + k(vt); + var re = j(vt, 2); + k(ke); + var he = j(ke, 2), + oe = A(he), + ze = A(oe, !0); + k(oe); + var je = j(oe, 2), + pt = A(je), + it = j(pt), + ct = A(it); + np(ct, { class: "size-5" }), k(it); + var It = j(it); + k(je); + var Dt = j(je, 2), + at = A(Dt), + dt = j(at), + yt = A(dt, !0); + k(dt); + var xt = j(dt); + k(Dt), k(he); + var St = j(he, 2), + wt = A(St), + _t = A(wt, !0); + k(wt); + var Lt = j(wt, 2), + Rt = A(Lt); + { + var $t = (ie) => { + var pe = A6(), + Se = Ct(pe); + yn(), We((Me) => de(Se, `${Me ?? ""}: `), [() => RP()]), $(ie, pe); + }, + tr = (ie) => { + var pe = L6(), + Se = Ct(pe), + Me = j(Se), + we = A(Me, !0); + k(Me); + var Ve = j(Me), + ut = j(Ve); + { + var Ke = (ye) => { + var Bt = E6(); + yn(), $(ye, Bt); + }, + kt = (ye) => { + var Bt = er(), + rr = Ct(Bt); + { + var Kt = (gr) => { + var Ur = z6(); + yn(), $(gr, Ur); + }; + Oe( + rr, + (gr) => { + y === "Edge" && gr(Kt); + }, + !0 + ); + } + $(ye, Bt); + }; + Oe(ut, (ye) => { + y === "Chrome" ? ye(Ke) : ye(kt, !1); + }); + } + We( + (ye, Bt, rr) => { + de(Se, `${ye ?? ""} `), de(we, Bt), de(Ve, ` ${rr ?? ""} `); + }, + [() => PP(), () => kP(), () => zP()] + ), + $(ie, pe); + }; + Oe(Rt, (ie) => { + y !== "Chrome" && y !== "Edge" ? ie($t) : ie(tr, !1); + }); + } + k(Lt), k(St); + var Qt = j(St, 2), + Ot = A(Qt); + Gm(Ot, {}), k(Qt); + var Nt = j(Qt, 4), + or = j(A(Nt), 2), + cr = A(or, !0); + k(or); + var Vr = j(or, 2), + mr = A(Vr, !0); + k(Vr); + var hr = j(Vr, 2), + _r = A(hr, !0); + k(hr); + var Ir = j(hr, 2), + qr = A(Ir, !0); + k(Ir); + var ue = j(Ir, 2), + V = A(ue, !0); + k(ue); + var U = j(ue, 2), + Y = A(U, !0); + k(U), + k(Nt), + k(ne), + We( + ( + ie, + pe, + Se, + Me, + we, + Ve, + ut, + Ke, + kt, + ye, + Bt, + rr, + Kt, + gr, + Ur, + nn, + mn + ) => { + de(Ie, `${ie ?? ""} `), + de( + Ae, + ` © + ${pe ?? ""} ` + ), + de(ee, Se), + Tr( + re, + "src", + ai.language === "pt" + ? "https://www.youtube.com/embed/AcE85QM4iPQ?si=wbeZD8vxOzvlB_Z9" + : "https://www.youtube.com/embed/xOXtd-WzRxA?si=fHz8Z6ecXGYrDhkN" + ), + de(ze, Me), + de(pt, `${we ?? ""} `), + de(It, ` ${Ve ?? ""}`), + de(at, `${ut ?? ""} `), + de(yt, Ke), + de(xt, ` ${kt ?? ""}`), + de(_t, ye), + Tr(or, "href", `${yi.url.origin ?? ""}/terms/terms-of-service`), + de(cr, Bt), + Tr(Vr, "href", `${yi.url.origin ?? ""}/terms/privacy`), + de(mr, rr), + Tr(hr, "href", Kt), + de(_r, gr), + de(qr, Ur), + de(V, nn), + de(Y, mn); + }, + [ + () => Nb(), + () => qb(), + () => $b(), + () => Wb(), + () => Kb(), + () => e2(), + () => n2(), + () => o2(), + () => c2(), + () => TP(), + () => VP(), + () => UP(), + () => Bv(yi.url.origin), + () => Jv(), + () => QI(), + () => r4(), + () => a4(), + ] + ), + Ai( + 2, + ne, + () => ia, + () => ({ duration: 300 }) + ), + $(K, ne); + }; + Oe(T, (K) => { + p() && K(s); + }); + } + k(z); + var B = j(z, 2), + O = A(B), + X = A(O, !0); + k(O), + k(B), + k(M), + Ni(M, () => (K) => { + Wr(() => { + p() ? K.show() : K.close(); + }); + }), + We((K) => de(X, K), [() => Ss()]), + di("close", M, () => p(!1)), + $(m, M), + Dr(); +} +function F6(m) { + return typeof m == "function"; +} +function Lh(m) { + return m !== null && typeof m == "object"; +} +const O6 = ["string", "number", "bigint", "boolean"]; +function nm(m) { + return m == null || O6.includes(typeof m) + ? !0 + : Array.isArray(m) + ? m.every((a) => nm(a)) + : typeof m == "object" + ? Object.getPrototypeOf(m) === Object.prototype + : !1; +} +const Vu = Symbol("box"), + Hm = Symbol("is-writable"); +function N6(m) { + return Lh(m) && Vu in m; +} +function j6(m) { + return br.isBox(m) && Hm in m; +} +function br(m) { + let a = st(bi(m)); + return { + [Vu]: !0, + [Hm]: !0, + get current() { + return x(a); + }, + set current(p) { + se(a, p, !0); + }, + }; +} +function V6(m, a) { + const p = ft(m); + return a + ? { + [Vu]: !0, + [Hm]: !0, + get current() { + return x(p); + }, + set current(y) { + a(y); + }, + } + : { + [Vu]: !0, + get current() { + return m(); + }, + }; +} +function q6(m) { + return br.isBox(m) ? m : F6(m) ? br.with(m) : br(m); +} +function Z6(m) { + return Object.entries(m).reduce( + (a, [p, y]) => + br.isBox(y) + ? (br.isWritableBox(y) + ? Object.defineProperty(a, p, { + get() { + return y.current; + }, + set(M) { + y.current = M; + }, + }) + : Object.defineProperty(a, p, { + get() { + return y.current; + }, + }), + a) + : Object.assign(a, { [p]: y }), + {} + ); +} +function U6(m) { + return br.isWritableBox(m) + ? { + [Vu]: !0, + get current() { + return m.current; + }, + } + : m; +} +br.from = q6; +br.with = V6; +br.flatten = Z6; +br.readonly = U6; +br.isBox = N6; +br.isWritableBox = j6; +function $6(...m) { + return function (a) { + var p; + for (const y of m) + if (y) { + if (a.defaultPrevented) return; + typeof y == "function" + ? y.call(this, a) + : (p = y.current) == null || p.call(this, a); + } + }; +} +var hc = {}, + Rf, + tv; +function G6() { + if (tv) return Rf; + tv = 1; + var m = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, + a = /\n/g, + p = /^\s*/, + y = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, + M = /^:\s*/, + z = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, + T = /^[;\s]*/, + s = /^\s+|\s+$/g, + B = ` +`, + O = "/", + X = "*", + K = "", + ne = "comment", + H = "declaration"; + Rf = function (ge, Ie) { + if (typeof ge != "string") + throw new TypeError("First argument must be a string"); + if (!ge) return []; + Ie = Ie || {}; + var Ae = 1, + De = 1; + function Ee(Ue) { + var ke = Ue.match(a); + ke && (Ae += ke.length); + var vt = Ue.lastIndexOf(B); + De = ~vt ? Ue.length - vt : De + Ue.length; + } + function Fe() { + var Ue = { line: Ae, column: De }; + return function (ke) { + return (ke.position = new $e(Ue)), Ze(), ke; + }; + } + function $e(Ue) { + (this.start = Ue), + (this.end = { line: Ae, column: De }), + (this.source = Ie.source); + } + $e.prototype.content = ge; + function Je(Ue) { + var ke = new Error(Ie.source + ":" + Ae + ":" + De + ": " + Ue); + if ( + ((ke.reason = Ue), + (ke.filename = Ie.source), + (ke.line = Ae), + (ke.column = De), + (ke.source = ge), + !Ie.silent) + ) + throw ke; + } + function qe(Ue) { + var ke = Ue.exec(ge); + if (ke) { + var vt = ke[0]; + return Ee(vt), (ge = ge.slice(vt.length)), ke; + } + } + function Ze() { + qe(p); + } + function Qe(Ue) { + var ke; + for (Ue = Ue || []; (ke = Le()); ) ke !== !1 && Ue.push(ke); + return Ue; + } + function Le() { + var Ue = Fe(); + if (!(O != ge.charAt(0) || X != ge.charAt(1))) { + for ( + var ke = 2; + K != ge.charAt(ke) && (X != ge.charAt(ke) || O != ge.charAt(ke + 1)); + + ) + ++ke; + if (((ke += 2), K === ge.charAt(ke - 1))) + return Je("End of comment missing"); + var vt = ge.slice(2, ke - 2); + return ( + (De += 2), + Ee(vt), + (ge = ge.slice(ke)), + (De += 2), + Ue({ type: ne, comment: vt }) + ); + } + } + function et() { + var Ue = Fe(), + ke = qe(y); + if (ke) { + if ((Le(), !qe(M))) return Je("property missing ':'"); + var vt = qe(z), + ee = Ue({ + type: H, + property: fe(ke[0].replace(m, K)), + value: vt ? fe(vt[0].replace(m, K)) : K, + }); + return qe(T), ee; + } + } + function nt() { + var Ue = []; + Qe(Ue); + for (var ke; (ke = et()); ) ke !== !1 && (Ue.push(ke), Qe(Ue)); + return Ue; + } + return Ze(), nt(); + }; + function fe(ge) { + return ge ? ge.replace(s, K) : K; + } + return Rf; +} +var rv; +function H6() { + if (rv) return hc; + rv = 1; + var m = + (hc && hc.__importDefault) || + function (y) { + return y && y.__esModule ? y : { default: y }; + }; + Object.defineProperty(hc, "__esModule", { value: !0 }), (hc.default = p); + var a = m(G6()); + function p(y, M) { + var z = null; + if (!y || typeof y != "string") return z; + var T = (0, a.default)(y), + s = typeof M == "function"; + return ( + T.forEach(function (B) { + if (B.type === "declaration") { + var O = B.property, + X = B.value; + s ? M(O, X, B) : X && ((z = z || {}), (z[O] = X)); + } + }), + z + ); + } + return hc; +} +var W6 = H6(); +const nv = Zm(W6), + X6 = nv.default || nv, + Y6 = /\d/, + K6 = ["-", "_", "/", "."]; +function J6(m = "") { + if (!Y6.test(m)) return m !== m.toLowerCase(); +} +function Q6(m) { + const a = []; + let p = "", + y, + M; + for (const z of m) { + const T = K6.includes(z); + if (T === !0) { + a.push(p), (p = ""), (y = void 0); + continue; + } + const s = J6(z); + if (M === !1) { + if (y === !1 && s === !0) { + a.push(p), (p = z), (y = s); + continue; + } + if (y === !0 && s === !1 && p.length > 1) { + const B = p.at(-1); + a.push(p.slice(0, Math.max(0, p.length - 1))), (p = B + z), (y = s); + continue; + } + } + (p += z), (y = s), (M = T); + } + return a.push(p), a; +} +function s0(m) { + return m + ? Q6(m) + .map((a) => tk(a)) + .join("") + : ""; +} +function ek(m) { + return rk(s0(m || "")); +} +function tk(m) { + return m ? m[0].toUpperCase() + m.slice(1) : ""; +} +function rk(m) { + return m ? m[0].toLowerCase() + m.slice(1) : ""; +} +function Zd(m) { + if (!m) return {}; + const a = {}; + function p(y, M) { + if ( + y.startsWith("-moz-") || + y.startsWith("-webkit-") || + y.startsWith("-ms-") || + y.startsWith("-o-") + ) { + a[s0(y)] = M; + return; + } + if (y.startsWith("--")) { + a[y] = M; + return; + } + a[ek(y)] = M; + } + return X6(m, p), a; +} +function nk(...m) { + return (...a) => { + for (const p of m) typeof p == "function" && p(...a); + }; +} +function ik(m, a) { + const p = RegExp(m, "g"); + return (y) => { + if (typeof y != "string") + throw new TypeError( + `expected an argument of type string, but got ${typeof y}` + ); + return y.match(p) ? y.replace(p, a) : y; + }; +} +const ak = ik(/[A-Z]/, (m) => `-${m.toLowerCase()}`); +function ok(m) { + if (!m || typeof m != "object" || Array.isArray(m)) + throw new TypeError( + `expected an argument of type object, but got ${typeof m}` + ); + return Object.keys(m).map((a) => `${ak(a)}: ${m[a]};`).join(` +`); +} +function l0(m = {}) { + return ok(m).replace( + ` +`, + " " + ); +} +const c0 = { + position: "absolute", + width: "1px", + height: "1px", + padding: "0", + margin: "-1px", + overflow: "hidden", + clip: "rect(0, 0, 0, 0)", + whiteSpace: "nowrap", + borderWidth: "0", + transform: "translateX(-100%)", +}; +l0(c0); +const sk = [ + "onabort", + "onanimationcancel", + "onanimationend", + "onanimationiteration", + "onanimationstart", + "onauxclick", + "onbeforeinput", + "onbeforetoggle", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncompositionend", + "oncompositionstart", + "oncompositionupdate", + "oncontextlost", + "oncontextmenu", + "oncontextrestored", + "oncopy", + "oncuechange", + "oncut", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "onfocusin", + "onfocusout", + "onformdata", + "ongotpointercapture", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onlostpointercapture", + "onmousedown", + "onmouseenter", + "onmouseleave", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onpaste", + "onpause", + "onplay", + "onplaying", + "onpointercancel", + "onpointerdown", + "onpointerenter", + "onpointerleave", + "onpointermove", + "onpointerout", + "onpointerover", + "onpointerup", + "onprogress", + "onratechange", + "onreset", + "onresize", + "onscroll", + "onscrollend", + "onsecuritypolicyviolation", + "onseeked", + "onseeking", + "onselect", + "onselectionchange", + "onselectstart", + "onslotchange", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "ontoggle", + "ontouchcancel", + "ontouchend", + "ontouchmove", + "ontouchstart", + "ontransitioncancel", + "ontransitionend", + "ontransitionrun", + "ontransitionstart", + "onvolumechange", + "onwaiting", + "onwebkitanimationend", + "onwebkitanimationiteration", + "onwebkitanimationstart", + "onwebkittransitionend", + "onwheel", + ], + lk = new Set(sk); +function ck(m) { + return lk.has(m); +} +function Va(...m) { + const a = { ...m[0] }; + for (let p = 1; p < m.length; p++) { + const y = m[p]; + if (y) { + for (const M of Object.keys(y)) { + const z = a[M], + T = y[M], + s = typeof z == "function", + B = typeof T == "function"; + if (s && ck(M)) { + const O = z, + X = T; + a[M] = $6(O, X); + } else if (s && B) a[M] = nk(z, T); + else if (M === "class") { + const O = nm(z), + X = nm(T); + O && X ? (a[M] = Ou(z, T)) : O ? (a[M] = Ou(z)) : X && (a[M] = Ou(T)); + } else if (M === "style") { + const O = typeof z == "object", + X = typeof T == "object", + K = typeof z == "string", + ne = typeof T == "string"; + if (O && X) a[M] = { ...z, ...T }; + else if (O && ne) { + const H = Zd(T); + a[M] = { ...z, ...H }; + } else if (K && X) { + const H = Zd(z); + a[M] = { ...H, ...T }; + } else if (K && ne) { + const H = Zd(z), + fe = Zd(T); + a[M] = { ...H, ...fe }; + } else + O ? (a[M] = z) : X ? (a[M] = T) : K ? (a[M] = z) : ne && (a[M] = T); + } else a[M] = T !== void 0 ? T : z; + } + for (const M of Object.getOwnPropertySymbols(y)) { + const z = a[M], + T = y[M]; + a[M] = T !== void 0 ? T : z; + } + } + } + return ( + typeof a.style == "object" && + (a.style = l0(a.style).replaceAll( + ` +`, + " " + )), + a.hidden !== !0 && ((a.hidden = void 0), delete a.hidden), + a.disabled !== !0 && ((a.disabled = void 0), delete a.disabled), + a + ); +} +const uk = typeof window < "u" ? window : void 0; +function hk(m) { + let a = m.activeElement; + for (; a != null && a.shadowRoot; ) { + const p = a.shadowRoot.activeElement; + if (p === a) break; + a = p; + } + return a; +} +var wc, Yu; +class dk { + constructor(a = {}) { + Ar(this, wc); + Ar(this, Yu); + const { window: p = uk, document: y = p == null ? void 0 : p.document } = a; + p !== void 0 && + (na(this, wc, y), + na( + this, + Yu, + Ev((M) => { + const z = Nu(p, "focusin", M), + T = Nu(p, "focusout", M); + return () => { + z(), T(); + }; + }) + )); + } + get current() { + var a; + return ( + (a = ot(this, Yu)) == null || a.call(this), + ot(this, wc) ? hk(ot(this, wc)) : null + ); + } +} +(wc = new WeakMap()), (Yu = new WeakMap()); +new dk(); +var Ku, Ho; +class Wm { + constructor(a) { + Ar(this, Ku); + Ar(this, Ho); + na(this, Ku, a), na(this, Ho, Symbol(a)); + } + get key() { + return ot(this, Ho); + } + exists() { + return ex(ot(this, Ho)); + } + get() { + const a = Gg(ot(this, Ho)); + if (a === void 0) throw new Error(`Context "${ot(this, Ku)}" not found`); + return a; + } + getOr(a) { + const p = Gg(ot(this, Ho)); + return p === void 0 ? a : p; + } + set(a) { + return tx(ot(this, Ho), a); + } +} +(Ku = new WeakMap()), (Ho = new WeakMap()); +function pk(m, a) { + switch (m) { + case "post": + Wr(a); + break; + case "pre": + Mm(a); + break; + } +} +function u0(m, a, p, y = {}) { + const { lazy: M = !1 } = y; + let z = !M, + T = Array.isArray(m) ? [] : void 0; + pk(a, () => { + const s = Array.isArray(m) ? m.map((O) => O()) : m(); + if (!z) { + (z = !0), (T = s); + return; + } + const B = ul(() => p(s, T)); + return (T = s), B; + }); +} +function Ps(m, a, p) { + u0(m, "post", a, p); +} +function fk(m, a, p) { + u0(m, "pre", a, p); +} +Ps.pre = fk; +var Tc; +class mk { + constructor(a, p) { + Ar(this, Tc, st(void 0)); + p !== void 0 && se(ot(this, Tc), p, !0), + Ps( + () => a(), + (y, M) => { + se(ot(this, Tc), M, !0); + } + ); + } + get current() { + return x(ot(this, Tc)); + } +} +Tc = new WeakMap(); +function _k(m, a) { + return setTimeout(a, m); +} +function dc(m) { + Iv().then(m); +} +const gk = 1, + vk = 9, + yk = 11; +function xk(m) { + return Lh(m) && m.nodeType === gk && typeof m.nodeName == "string"; +} +function h0(m) { + return Lh(m) && m.nodeType === vk; +} +function bk(m) { + var a; + return ( + Lh(m) && + ((a = m.constructor) == null ? void 0 : a.name) === "VisualViewport" + ); +} +function wk(m) { + return Lh(m) && m.nodeType !== void 0; +} +function Tk(m) { + return wk(m) && m.nodeType === yk && "host" in m; +} +function Ck(m) { + return h0(m) + ? m + : bk(m) + ? m.document + : (m == null ? void 0 : m.ownerDocument) ?? document; +} +function d0(m) { + var a; + return Tk(m) + ? d0(m.host) + : h0(m) + ? m.defaultView ?? window + : xk(m) + ? ((a = m.ownerDocument) == null ? void 0 : a.defaultView) ?? window + : window; +} +function Sk(m) { + let a = m.activeElement; + for (; a != null && a.shadowRoot; ) { + const p = a.shadowRoot.activeElement; + if (p === a) break; + a = p; + } + return a; +} +var Ju; +class Pk { + constructor(a) { + xr(this, "element"); + Ar( + this, + Ju, + ft(() => + this.element.current + ? this.element.current.getRootNode() ?? document + : document + ) + ); + xr(this, "getDocument", () => Ck(this.root)); + xr(this, "getWindow", () => this.getDocument().defaultView ?? window); + xr(this, "getActiveElement", () => Sk(this.root)); + xr(this, "isActiveElement", (a) => a === this.getActiveElement()); + xr(this, "querySelector", (a) => + this.root ? this.root.querySelector(a) : null + ); + xr(this, "querySelectorAll", (a) => + this.root ? this.root.querySelectorAll(a) : [] + ); + xr(this, "setTimeout", (a, p) => this.getWindow().setTimeout(a, p)); + xr(this, "clearTimeout", (a) => this.getWindow().clearTimeout(a)); + typeof a == "function" ? (this.element = br.with(a)) : (this.element = a); + } + get root() { + return x(ot(this, Ju)); + } + set root(a) { + se(ot(this, Ju), a); + } + getElementById(a) { + return this.root.getElementById(a); + } +} +Ju = new WeakMap(); +function Xa(m, a) { + return { + [Wx()]: (p) => + br.isBox(m) + ? ((m.current = p), + ul(() => (a == null ? void 0 : a(p))), + () => { + ("isConnected" in p && p.isConnected) || + ((m.current = null), a == null || a(null)); + }) + : (m(p), + ul(() => (a == null ? void 0 : a(p))), + () => { + ("isConnected" in p && p.isConnected) || + (m(null), a == null || a(null)); + }), + }; +} +function Ik(m) { + return m ? "true" : "false"; +} +function Mk(m) { + return m ? "true" : "false"; +} +function kk(m) { + return m ? "" : void 0; +} +function Ak(m) { + return m ? "true" : "false"; +} +function Ek(m) { + return m ? "" : void 0; +} +function zk(m) { + return m ? !0 : void 0; +} +var Cc, Qu; +class Lk { + constructor(a) { + Ar(this, Cc); + Ar(this, Qu); + xr(this, "attrs"); + na(this, Cc, a.getVariant ? a.getVariant() : null), + na( + this, + Qu, + ot(this, Cc) ? `data-${ot(this, Cc)}-` : `data-${a.component}-` + ), + (this.getAttr = this.getAttr.bind(this)), + (this.selector = this.selector.bind(this)), + (this.attrs = Object.fromEntries( + a.parts.map((p) => [p, this.getAttr(p)]) + )); + } + getAttr(a, p) { + return p ? `data-${p}-${a}` : `${ot(this, Qu)}${a}`; + } + selector(a, p) { + return `[${this.getAttr(a, p)}]`; + } +} +(Cc = new WeakMap()), (Qu = new WeakMap()); +function p0(m) { + const a = new Lk(m); + return { ...a.attrs, selector: a.selector, getAttr: a.getAttr }; +} +const Dk = "ArrowDown", + Rk = "ArrowLeft", + Bk = "ArrowRight", + Fk = "ArrowUp", + Ok = "End", + Nk = "Enter", + jk = "Home", + Vk = "p", + qk = "n", + Zk = "j", + Uk = "k", + $k = "h", + Gk = "l"; +function qu() {} +function Ya(m, a) { + return `bits-${m}`; +} +function Hk(m) { + if (!m) return null; + for (const a of m.childNodes) if (a.nodeType !== Node.COMMENT_NODE) return a; + return null; +} +globalThis.bitsIdCounter ?? (globalThis.bitsIdCounter = { current: 0 }); +function Wk(m = "bits") { + return ( + globalThis.bitsIdCounter.current++, + `${m}-${globalThis.bitsIdCounter.current}` + ); +} +function Xk(m, a) { + let p = m.nextElementSibling; + for (; p; ) { + if (p.matches(a)) return p; + p = p.nextElementSibling; + } +} +function Yk(m, a) { + let p = m.previousElementSibling; + for (; p; ) { + if (p.matches(a)) return p; + p = p.previousElementSibling; + } +} +function f0(m) { + if (typeof CSS < "u" && typeof CSS.escape == "function") return CSS.escape(m); + const a = m.length; + let p = -1, + y, + M = ""; + const z = m.charCodeAt(0); + if (a === 1 && z === 45) return "\\" + m; + for (; ++p < a; ) { + if (((y = m.charCodeAt(p)), y === 0)) { + M += "�"; + continue; + } + if ( + (y >= 1 && y <= 31) || + y === 127 || + (p === 0 && y >= 48 && y <= 57) || + (p === 1 && y >= 48 && y <= 57 && z === 45) + ) { + M += "\\" + y.toString(16) + " "; + continue; + } + if ( + y >= 128 || + y === 45 || + y === 95 || + (y >= 48 && y <= 57) || + (y >= 65 && y <= 90) || + (y >= 97 && y <= 122) + ) { + M += m.charAt(p); + continue; + } + M += "\\" + m.charAt(p); + } + return M; +} +const sl = "data-value", + wa = p0({ + component: "command", + parts: [ + "root", + "list", + "input", + "separator", + "loading", + "empty", + "group", + "group-items", + "group-heading", + "item", + "viewport", + "input-label", + ], + }), + pc = wa.selector("group"), + Bf = wa.selector("group-items"), + iv = wa.selector("group-heading"), + m0 = wa.selector("item"), + Ff = `${wa.selector("item")}:not([aria-disabled="true"])`, + ml = new Wm("Command.Root"), + Kk = new Wm("Command.List"), + Zu = new Wm("Command.Group"), + av = { + search: "", + value: "", + filtered: { count: 0, items: new Map(), groups: new Set() }, + }; +var Sc, + eh, + th, + rh, + nh, + ih, + ah, + oh, + fr, + _0, + Kd, + am, + Jd, + Qd, + ep, + ws, + g0, + v0, + om, + Du, + sm, + lm, + y0, + Ru, + cm, + um, + x0, + Bu, + Fu, + sh; +const e_ = class e_ { + constructor(a) { + Ar(this, fr); + xr(this, "opts"); + xr(this, "attachment"); + Ar(this, Sc, !1); + Ar(this, eh, !0); + xr(this, "sortAfterTick", !1); + xr(this, "sortAndFilterAfterTick", !1); + xr(this, "allItems", new Set()); + xr(this, "allGroups", new Map()); + xr(this, "allIds", new Map()); + Ar(this, th, st(0)); + Ar(this, rh, st(null)); + Ar(this, nh, st(null)); + Ar(this, ih, st(null)); + Ar(this, ah, st(av)); + Ar(this, oh, st(bi(av))); + Ar( + this, + sh, + ft(() => ({ + id: this.opts.id.current, + role: "application", + [wa.root]: "", + tabindex: -1, + onkeydown: this.onkeydown, + ...this.attachment, + })) + ); + (this.opts = a), (this.attachment = Xa(this.opts.ref)); + const p = { ...this._commandState, value: this.opts.value.current ?? "" }; + (this._commandState = p), + (this.commandState = p), + (this.onkeydown = this.onkeydown.bind(this)); + } + static create(a) { + return ml.set(new e_(a)); + } + get key() { + return x(ot(this, th)); + } + set key(a) { + se(ot(this, th), a, !0); + } + get viewportNode() { + return x(ot(this, rh)); + } + set viewportNode(a) { + se(ot(this, rh), a, !0); + } + get inputNode() { + return x(ot(this, nh)); + } + set inputNode(a) { + se(ot(this, nh), a, !0); + } + get labelNode() { + return x(ot(this, ih)); + } + set labelNode(a) { + se(ot(this, ih), a, !0); + } + get commandState() { + return x(ot(this, ah)); + } + set commandState(a) { + se(ot(this, ah), a); + } + get _commandState() { + return x(ot(this, oh)); + } + set _commandState(a) { + se(ot(this, oh), a, !0); + } + setState(a, p, y) { + Object.is(this._commandState[a], p) || + ((this._commandState[a] = p), + a === "search" + ? (jr(this, fr, ep).call(this), jr(this, fr, Jd).call(this)) + : a === "value" && (y || jr(this, fr, g0).call(this)), + jr(this, fr, Kd).call(this)); + } + setValue(a, p) { + a !== this.opts.value.current && + a === "" && + dc(() => { + this.key++; + }), + this.setState("value", a, p), + (this.opts.value.current = a); + } + getValidItems() { + const a = this.opts.ref.current; + return a ? Array.from(a.querySelectorAll(Ff)).filter((y) => !!y) : []; + } + getVisibleItems() { + const a = this.opts.ref.current; + return a ? Array.from(a.querySelectorAll(m0)).filter((y) => !!y) : []; + } + get itemsGrid() { + var s, B, O, X; + if (!this.isGrid) return []; + const a = this.opts.columns.current ?? 1, + p = this.getVisibleItems(), + y = [[]]; + let M = (s = p[0]) == null ? void 0 : s.getAttribute("data-group"), + z = 0, + T = 0; + for (let K = 0; K < p.length; K++) { + const ne = p[K], + H = ne == null ? void 0 : ne.getAttribute("data-group"); + M !== H + ? ((M = H), + (z = 1), + T++, + y.push([{ index: K, firstRowOfGroup: !0, ref: ne }])) + : (z++, + z > a && (T++, (z = 1), y.push([])), + (X = y[T]) == null || + X.push({ + index: K, + firstRowOfGroup: + ((O = (B = y[T]) == null ? void 0 : B[0]) == null + ? void 0 + : O.firstRowOfGroup) ?? K === 0, + ref: ne, + })); + } + return y; + } + updateSelectedToIndex(a) { + const p = this.getValidItems()[a]; + p && this.setValue(p.getAttribute(sl) ?? ""); + } + updateSelectedByItem(a) { + const p = jr(this, fr, ws).call(this), + y = this.getValidItems(), + M = y.findIndex((T) => T === p); + let z = y[M + a]; + this.opts.loop.current && + (z = M + a < 0 ? y[y.length - 1] : M + a === y.length ? y[0] : y[M + a]), + z && this.setValue(z.getAttribute(sl) ?? ""); + } + updateSelectedByGroup(a) { + const p = jr(this, fr, ws).call(this); + let y = p == null ? void 0 : p.closest(pc), + M; + for (; y && !M; ) + (y = a > 0 ? Xk(y, pc) : Yk(y, pc)), + (M = y == null ? void 0 : y.querySelector(Ff)); + M ? this.setValue(M.getAttribute(sl) ?? "") : this.updateSelectedByItem(a); + } + registerValue(a, p) { + var y; + return ( + (a && a === ((y = this.allIds.get(a)) == null ? void 0 : y.value)) || + this.allIds.set(a, { value: a, keywords: p }), + this._commandState.filtered.items.set( + a, + jr(this, fr, am).call(this, a, p) + ), + this.sortAfterTick || + ((this.sortAfterTick = !0), + dc(() => { + jr(this, fr, Jd).call(this), (this.sortAfterTick = !1); + })), + () => { + this.allIds.delete(a); + } + ); + } + registerItem(a, p) { + return ( + this.allItems.add(a), + p && + (this.allGroups.has(p) + ? this.allGroups.get(p).add(a) + : this.allGroups.set(p, new Set([a]))), + this.sortAndFilterAfterTick || + ((this.sortAndFilterAfterTick = !0), + dc(() => { + jr(this, fr, ep).call(this), + jr(this, fr, Jd).call(this), + (this.sortAndFilterAfterTick = !1); + })), + jr(this, fr, Kd).call(this), + () => { + const y = jr(this, fr, ws).call(this); + this.allIds.delete(a), + this.allItems.delete(a), + this.commandState.filtered.items.delete(a), + jr(this, fr, ep).call(this), + (y == null ? void 0 : y.getAttribute("id")) === a && + jr(this, fr, Qd).call(this), + jr(this, fr, Kd).call(this); + } + ); + } + registerGroup(a) { + return ( + this.allGroups.has(a) || this.allGroups.set(a, new Set()), + () => { + this.allIds.delete(a), this.allGroups.delete(a); + } + ); + } + get isGrid() { + return this.opts.columns.current !== null; + } + onkeydown(a) { + const p = this.opts.vimBindings.current && a.ctrlKey; + switch (a.key) { + case qk: + case Zk: { + p && + (this.isGrid + ? jr(this, fr, sm).call(this, a) + : jr(this, fr, Du).call(this, a)); + break; + } + case Gk: { + p && this.isGrid && jr(this, fr, Du).call(this, a); + break; + } + case Dk: + this.isGrid + ? jr(this, fr, sm).call(this, a) + : jr(this, fr, Du).call(this, a); + break; + case Bk: + if (!this.isGrid) break; + jr(this, fr, Du).call(this, a); + break; + case Vk: + case Uk: { + p && + (this.isGrid + ? jr(this, fr, um).call(this, a) + : jr(this, fr, Fu).call(this, a)); + break; + } + case $k: { + p && this.isGrid && jr(this, fr, Fu).call(this, a); + break; + } + case Fk: + this.isGrid + ? jr(this, fr, um).call(this, a) + : jr(this, fr, Fu).call(this, a); + break; + case Rk: + if (!this.isGrid) break; + jr(this, fr, Fu).call(this, a); + break; + case jk: + a.preventDefault(), this.updateSelectedToIndex(0); + break; + case Ok: + a.preventDefault(), jr(this, fr, om).call(this); + break; + case Nk: + if (!a.isComposing && a.keyCode !== 229) { + a.preventDefault(); + const y = jr(this, fr, ws).call(this); + y && (y == null || y.click()); + } + } + } + get props() { + return x(ot(this, sh)); + } + set props(a) { + se(ot(this, sh), a); + } +}; +(Sc = new WeakMap()), + (eh = new WeakMap()), + (th = new WeakMap()), + (rh = new WeakMap()), + (nh = new WeakMap()), + (ih = new WeakMap()), + (ah = new WeakMap()), + (oh = new WeakMap()), + (fr = new WeakSet()), + (_0 = function () { + return Hx(this._commandState); + }), + (Kd = function () { + ot(this, Sc) || + (na(this, Sc, !0), + dc(() => { + var y, M; + na(this, Sc, !1); + const a = jr(this, fr, _0).call(this); + !Object.is(this.commandState, a) && + ((this.commandState = a), + (M = (y = this.opts.onStateChange) == null ? void 0 : y.current) == + null || M.call(y, a)); + })); + }), + (am = function (a, p) { + const y = this.opts.filter.current ?? T0; + return a ? y(a, this._commandState.search, p) : 0; + }), + (Jd = function () { + var T; + if (!this._commandState.search || this.opts.shouldFilter.current === !1) { + jr(this, fr, Qd).call(this); + return; + } + const a = this._commandState.filtered.items, + p = []; + for (const s of this._commandState.filtered.groups) { + const B = this.allGroups.get(s); + let O = 0; + if (!B) { + p.push([s, O]); + continue; + } + for (const X of B) { + const K = a.get(X); + O = Math.max(K ?? 0, O); + } + p.push([s, O]); + } + const y = this.viewportNode, + M = this.getValidItems().sort((s, B) => { + const O = s.getAttribute("data-value"), + X = B.getAttribute("data-value"), + K = a.get(O) ?? 0; + return (a.get(X) ?? 0) - K; + }); + for (const s of M) { + const B = s.closest(Bf); + if (B) { + const O = s.parentElement === B ? s : s.closest(`${Bf} > *`); + O && B.appendChild(O); + } else { + const O = s.parentElement === y ? s : s.closest(`${Bf} > *`); + O && (y == null || y.appendChild(O)); + } + } + const z = p.sort((s, B) => B[1] - s[1]); + for (const s of z) { + const B = + y == null ? void 0 : y.querySelector(`${pc}[${sl}="${f0(s[0])}"]`); + (T = B == null ? void 0 : B.parentElement) == null || T.appendChild(B); + } + jr(this, fr, Qd).call(this); + }), + (Qd = function () { + dc(() => { + const a = this.getValidItems().find( + (M) => M.getAttribute("aria-disabled") !== "true" + ), + p = a == null ? void 0 : a.getAttribute(sl), + y = ot(this, eh) && this.opts.disableInitialScroll.current; + this.setValue(p ?? "", y), na(this, eh, !1); + }); + }), + (ep = function () { + var p, y; + if (!this._commandState.search || this.opts.shouldFilter.current === !1) { + this._commandState.filtered.count = this.allItems.size; + return; + } + this._commandState.filtered.groups = new Set(); + let a = 0; + for (const M of this.allItems) { + const z = ((p = this.allIds.get(M)) == null ? void 0 : p.value) ?? "", + T = ((y = this.allIds.get(M)) == null ? void 0 : y.keywords) ?? [], + s = jr(this, fr, am).call(this, z, T); + this._commandState.filtered.items.set(M, s), s > 0 && a++; + } + for (const [M, z] of this.allGroups) + for (const T of z) { + const s = this._commandState.filtered.items.get(T); + if (s && s > 0) { + this._commandState.filtered.groups.add(M); + break; + } + } + this._commandState.filtered.count = a; + }), + (ws = function () { + const a = this.opts.ref.current; + if (!a) return; + const p = a.querySelector(`${Ff}[data-selected]`); + if (p) return p; + }), + (g0 = function () { + dc(() => { + var y, M, z, T, s; + const a = jr(this, fr, ws).call(this); + if (!a) return; + const p = (y = a.parentElement) == null ? void 0 : y.parentElement; + if (p) { + if (this.isGrid) { + const B = jr(this, fr, v0).call(this, a); + if ((a.scrollIntoView({ block: "nearest" }), B)) { + const O = + (M = a == null ? void 0 : a.closest(pc)) == null + ? void 0 + : M.querySelector(iv); + O == null || O.scrollIntoView({ block: "nearest" }); + return; + } + } else { + const B = Hk(p); + if ( + B && + ((z = B.dataset) == null ? void 0 : z.value) === + ((T = a.dataset) == null ? void 0 : T.value) + ) { + const O = + (s = a == null ? void 0 : a.closest(pc)) == null + ? void 0 + : s.querySelector(iv); + O == null || O.scrollIntoView({ block: "nearest" }); + return; + } + } + a.scrollIntoView({ block: "nearest" }); + } + }); + }), + (v0 = function (a) { + const p = this.itemsGrid; + if (p.length === 0) return !1; + for (let y = 0; y < p.length; y++) { + const M = p[y]; + if (M !== void 0) + for (let z = 0; z < M.length; z++) { + const T = M[z]; + if (!(T === void 0 || T.ref !== a)) return T.firstRowOfGroup; + } + } + return !1; + }), + (om = function () { + return this.updateSelectedToIndex(this.getValidItems().length - 1); + }), + (Du = function (a) { + a.preventDefault(), + a.metaKey + ? jr(this, fr, om).call(this) + : a.altKey + ? this.updateSelectedByGroup(1) + : this.updateSelectedByItem(1); + }), + (sm = function (a) { + this.opts.columns.current !== null && + (a.preventDefault(), + a.metaKey + ? this.updateSelectedByGroup(1) + : this.updateSelectedByItem(jr(this, fr, y0).call(this, a))); + }), + (lm = function (a, p) { + if (p.length === 0) return null; + for (let y = 0; y < p.length; y++) { + const M = p[y]; + if (M !== void 0) + for (let z = 0; z < M.length; z++) { + const T = M[z]; + if (!(T === void 0 || T.ref !== a)) + return { columnIndex: z, rowIndex: y }; + } + } + return null; + }), + (y0 = function (a) { + const p = this.itemsGrid, + y = jr(this, fr, ws).call(this); + if (!y) return 0; + const M = jr(this, fr, lm).call(this, y, p); + if (!M) return 0; + let z = null; + const T = a.altKey ? 1 : 0; + if (a.altKey && M.rowIndex === p.length - 2 && !this.opts.loop.current) + z = jr(this, fr, Ru).call(this, { + start: p.length - 1, + end: p.length, + expectedColumnIndex: M.columnIndex, + grid: p, + }); + else if (M.rowIndex === p.length - 1) { + if (!this.opts.loop.current) return 0; + z = jr(this, fr, Ru).call(this, { + start: 0 + T, + end: M.rowIndex, + expectedColumnIndex: M.columnIndex, + grid: p, + }); + } else + (z = jr(this, fr, Ru).call(this, { + start: M.rowIndex + 1 + T, + end: p.length, + expectedColumnIndex: M.columnIndex, + grid: p, + })), + z === null && + this.opts.loop.current && + (z = jr(this, fr, Ru).call(this, { + start: 0, + end: M.rowIndex, + expectedColumnIndex: M.columnIndex, + grid: p, + })); + return jr(this, fr, cm).call(this, y, z); + }), + (Ru = function ({ start: a, end: p, grid: y, expectedColumnIndex: M }) { + var T; + let z = null; + for (let s = a; s < p; s++) { + const B = y[s]; + if ( + ((z = ((T = B[M]) == null ? void 0 : T.ref) ?? null), + z !== null && Ud(z)) + ) { + z = null; + continue; + } + if (z === null) + for (let O = B.length - 1; O >= 0; O--) { + const X = B[B.length - 1]; + if (!(X === void 0 || Ud(X.ref))) { + z = X.ref; + break; + } + } + break; + } + return z; + }), + (cm = function (a, p) { + if (p === null) return 0; + const y = this.getValidItems(), + M = y.findIndex((T) => T === a); + return y.findIndex((T) => T === p) - M; + }), + (um = function (a) { + this.opts.columns.current !== null && + (a.preventDefault(), + a.metaKey + ? this.updateSelectedByGroup(-1) + : this.updateSelectedByItem(jr(this, fr, x0).call(this, a))); + }), + (x0 = function (a) { + const p = this.itemsGrid, + y = jr(this, fr, ws).call(this); + if (y === void 0) return 0; + const M = jr(this, fr, lm).call(this, y, p); + if (M === null) return 0; + let z = null; + const T = a.altKey ? 1 : 0; + if (a.altKey && M.rowIndex === 1 && this.opts.loop.current === !1) + z = jr(this, fr, Bu).call(this, { + start: 0, + end: 0, + expectedColumnIndex: M.columnIndex, + grid: p, + }); + else if (M.rowIndex === 0) { + if (this.opts.loop.current === !1) return 0; + z = jr(this, fr, Bu).call(this, { + start: p.length - 1 - T, + end: M.rowIndex + 1, + expectedColumnIndex: M.columnIndex, + grid: p, + }); + } else + (z = jr(this, fr, Bu).call(this, { + start: M.rowIndex - 1 - T, + end: 0, + expectedColumnIndex: M.columnIndex, + grid: p, + })), + z === null && + this.opts.loop.current && + (z = jr(this, fr, Bu).call(this, { + start: p.length - 1, + end: M.rowIndex + 1, + expectedColumnIndex: M.columnIndex, + grid: p, + })); + return jr(this, fr, cm).call(this, y, z); + }), + (Bu = function ({ start: a, end: p, grid: y, expectedColumnIndex: M }) { + var T; + let z = null; + for (let s = a; s >= p; s--) { + const B = y[s]; + if (B !== void 0) { + if ( + ((z = ((T = B[M]) == null ? void 0 : T.ref) ?? null), + z !== null && Ud(z)) + ) { + z = null; + continue; + } + if (z === null) + for (let O = B.length - 1; O >= 0; O--) { + const X = B[B.length - 1]; + if (!(X === void 0 || Ud(X.ref))) { + z = X.ref; + break; + } + } + break; + } + } + return z; + }), + (Fu = function (a) { + a.preventDefault(), + a.metaKey + ? this.updateSelectedToIndex(0) + : a.altKey + ? this.updateSelectedByGroup(-1) + : this.updateSelectedByItem(-1); + }), + (sh = new WeakMap()); +let im = e_; +function Ud(m) { + return m.getAttribute("aria-disabled") === "true"; +} +var lh, ch, uh; +const t_ = class t_ { + constructor(a, p) { + xr(this, "opts"); + xr(this, "root"); + xr(this, "attachment"); + Ar( + this, + lh, + ft( + () => + (this.root._commandState.filtered.count === 0 && + ot(this, ch) === !1) || + this.opts.forceMount.current + ) + ); + Ar(this, ch, !0); + Ar( + this, + uh, + ft(() => ({ + id: this.opts.id.current, + role: "presentation", + [wa.empty]: "", + ...this.attachment, + })) + ); + (this.opts = a), + (this.root = p), + (this.attachment = Xa(this.opts.ref)), + Mm(() => { + na(this, ch, !1); + }); + } + static create(a) { + return new t_(a, ml.get()); + } + get shouldRender() { + return x(ot(this, lh)); + } + set shouldRender(a) { + se(ot(this, lh), a); + } + get props() { + return x(ot(this, uh)); + } + set props(a) { + se(ot(this, uh), a); + } +}; +(lh = new WeakMap()), (ch = new WeakMap()), (uh = new WeakMap()); +let hm = t_; +var hh, dh, ph, fh; +const r_ = class r_ { + constructor(a, p) { + xr(this, "opts"); + xr(this, "root"); + xr(this, "attachment"); + Ar( + this, + hh, + ft(() => + this.opts.forceMount.current || + this.root.opts.shouldFilter.current === !1 || + !this.root.commandState.search + ? !0 + : this.root._commandState.filtered.groups.has(this.trueValue) + ) + ); + Ar(this, dh, st(null)); + Ar(this, ph, st("")); + Ar( + this, + fh, + ft(() => ({ + id: this.opts.id.current, + role: "presentation", + hidden: this.shouldRender ? void 0 : !0, + "data-value": this.trueValue, + [wa.group]: "", + ...this.attachment, + })) + ); + (this.opts = a), + (this.root = p), + (this.attachment = Xa(this.opts.ref)), + (this.trueValue = a.value.current ?? a.id.current), + Ps( + () => this.trueValue, + () => this.root.registerGroup(this.trueValue) + ), + Wr(() => + this.opts.value.current + ? ((this.trueValue = this.opts.value.current), + this.root.registerValue(this.opts.value.current)) + : this.headingNode && this.headingNode.textContent + ? ((this.trueValue = this.headingNode.textContent + .trim() + .toLowerCase()), + this.root.registerValue(this.trueValue)) + : ((this.trueValue = `-----${this.opts.id.current}`), + this.root.registerValue(this.trueValue)) + ); + } + static create(a) { + return Zu.set(new r_(a, ml.get())); + } + get shouldRender() { + return x(ot(this, hh)); + } + set shouldRender(a) { + se(ot(this, hh), a); + } + get headingNode() { + return x(ot(this, dh)); + } + set headingNode(a) { + se(ot(this, dh), a, !0); + } + get trueValue() { + return x(ot(this, ph)); + } + set trueValue(a) { + se(ot(this, ph), a, !0); + } + get props() { + return x(ot(this, fh)); + } + set props(a) { + se(ot(this, fh), a); + } +}; +(hh = new WeakMap()), + (dh = new WeakMap()), + (ph = new WeakMap()), + (fh = new WeakMap()); +let dm = r_; +var mh; +const n_ = class n_ { + constructor(a, p) { + xr(this, "opts"); + xr(this, "group"); + xr(this, "attachment"); + Ar( + this, + mh, + ft(() => ({ + id: this.opts.id.current, + [wa["group-heading"]]: "", + ...this.attachment, + })) + ); + (this.opts = a), + (this.group = p), + (this.attachment = Xa( + this.opts.ref, + (y) => (this.group.headingNode = y) + )); + } + static create(a) { + return new n_(a, Zu.get()); + } + get props() { + return x(ot(this, mh)); + } + set props(a) { + se(ot(this, mh), a); + } +}; +mh = new WeakMap(); +let pm = n_; +var _h; +const i_ = class i_ { + constructor(a, p) { + xr(this, "opts"); + xr(this, "group"); + xr(this, "attachment"); + Ar( + this, + _h, + ft(() => { + var a; + return { + id: this.opts.id.current, + role: "group", + [wa["group-items"]]: "", + "aria-labelledby": + ((a = this.group.headingNode) == null ? void 0 : a.id) ?? void 0, + ...this.attachment, + }; + }) + ); + (this.opts = a), (this.group = p), (this.attachment = Xa(this.opts.ref)); + } + static create(a) { + return new i_(a, Zu.get()); + } + get props() { + return x(ot(this, _h)); + } + set props(a) { + se(ot(this, _h), a); + } +}; +_h = new WeakMap(); +let fm = i_; +var ap, gh; +const a_ = class a_ { + constructor(a, p) { + xr(this, "opts"); + xr(this, "root"); + xr(this, "attachment"); + Ar( + this, + ap, + ft(() => { + var p; + const a = + (p = this.root.viewportNode) == null + ? void 0 + : p.querySelector( + `${m0}[${sl}="${f0(this.root.opts.value.current)}"]` + ); + if (a != null) return a.getAttribute("id") ?? void 0; + }) + ); + Ar( + this, + gh, + ft(() => { + var a, p; + return { + id: this.opts.id.current, + type: "text", + [wa.input]: "", + autocomplete: "off", + autocorrect: "off", + spellcheck: !1, + "aria-autocomplete": "list", + role: "combobox", + "aria-expanded": Mk(!0), + "aria-controls": + ((a = this.root.viewportNode) == null ? void 0 : a.id) ?? void 0, + "aria-labelledby": + ((p = this.root.labelNode) == null ? void 0 : p.id) ?? void 0, + "aria-activedescendant": x(ot(this, ap)), + ...this.attachment, + }; + }) + ); + (this.opts = a), + (this.root = p), + (this.attachment = Xa(this.opts.ref, (y) => (this.root.inputNode = y))), + Ps( + () => this.opts.ref.current, + () => { + const y = this.opts.ref.current; + y && this.opts.autofocus.current && _k(10, () => y.focus()); + } + ), + Ps( + () => this.opts.value.current, + () => { + this.root.commandState.search !== this.opts.value.current && + this.root.setState("search", this.opts.value.current); + } + ); + } + static create(a) { + return new a_(a, ml.get()); + } + get props() { + return x(ot(this, gh)); + } + set props(a) { + se(ot(this, gh), a); + } +}; +(ap = new WeakMap()), (gh = new WeakMap()); +let mm = a_; +var Ts, op, vh, yh, xh, pl, b0, gm, bh; +const o_ = class o_ { + constructor(a, p) { + Ar(this, pl); + xr(this, "opts"); + xr(this, "root"); + xr(this, "attachment"); + Ar(this, Ts, null); + Ar( + this, + op, + ft(() => { + var a; + return ( + this.opts.forceMount.current || + ((a = ot(this, Ts)) == null ? void 0 : a.opts.forceMount.current) === + !0 + ); + }) + ); + Ar( + this, + vh, + ft(() => { + if ( + (this.opts.ref.current, + x(ot(this, op)) || + this.root.opts.shouldFilter.current === !1 || + !this.root.commandState.search) + ) + return !0; + const a = this.root.commandState.filtered.items.get(this.trueValue); + return a === void 0 ? !1 : a > 0; + }) + ); + Ar( + this, + yh, + ft( + () => + this.root.opts.value.current === this.trueValue && + this.trueValue !== "" + ) + ); + Ar(this, xh, st("")); + Ar( + this, + bh, + ft(() => { + var a; + return { + id: this.opts.id.current, + "aria-disabled": Ik(this.opts.disabled.current), + "aria-selected": Ak(this.isSelected), + "data-disabled": kk(this.opts.disabled.current), + "data-selected": Ek(this.isSelected), + "data-value": this.trueValue, + "data-group": (a = ot(this, Ts)) == null ? void 0 : a.trueValue, + [wa.item]: "", + role: "option", + onpointermove: this.onpointermove, + onclick: this.onclick, + ...this.attachment, + }; + }) + ); + (this.opts = a), + (this.root = p), + na(this, Ts, Zu.getOr(null)), + (this.trueValue = a.value.current), + (this.attachment = Xa(this.opts.ref)), + Ps( + [ + () => this.trueValue, + () => { + var y; + return (y = ot(this, Ts)) == null ? void 0 : y.trueValue; + }, + () => this.opts.forceMount.current, + ], + () => { + var y; + if (!this.opts.forceMount.current) + return this.root.registerItem( + this.trueValue, + (y = ot(this, Ts)) == null ? void 0 : y.trueValue + ); + } + ), + Ps([() => this.opts.value.current, () => this.opts.ref.current], () => { + var y, M; + !this.opts.value.current && + (y = this.opts.ref.current) != null && + y.textContent && + (this.trueValue = this.opts.ref.current.textContent.trim()), + this.root.registerValue( + this.trueValue, + a.keywords.current.map((z) => z.trim()) + ), + (M = this.opts.ref.current) == null || + M.setAttribute(sl, this.trueValue); + }), + (this.onclick = this.onclick.bind(this)), + (this.onpointermove = this.onpointermove.bind(this)); + } + static create(a) { + const p = Zu.getOr(null); + return new o_({ ...a, group: p }, ml.get()); + } + get shouldRender() { + return x(ot(this, vh)); + } + set shouldRender(a) { + se(ot(this, vh), a); + } + get isSelected() { + return x(ot(this, yh)); + } + set isSelected(a) { + se(ot(this, yh), a); + } + get trueValue() { + return x(ot(this, xh)); + } + set trueValue(a) { + se(ot(this, xh), a, !0); + } + onpointermove(a) { + this.opts.disabled.current || + this.root.opts.disablePointerSelection.current || + jr(this, pl, gm).call(this); + } + onclick(a) { + this.opts.disabled.current || jr(this, pl, b0).call(this); + } + get props() { + return x(ot(this, bh)); + } + set props(a) { + se(ot(this, bh), a); + } +}; +(Ts = new WeakMap()), + (op = new WeakMap()), + (vh = new WeakMap()), + (yh = new WeakMap()), + (xh = new WeakMap()), + (pl = new WeakSet()), + (b0 = function () { + var a; + this.opts.disabled.current || + (jr(this, pl, gm).call(this), + (a = this.opts.onSelect) == null || a.current()); + }), + (gm = function () { + this.opts.disabled.current || this.root.setValue(this.trueValue, !0); + }), + (bh = new WeakMap()); +let _m = o_; +var wh; +const s_ = class s_ { + constructor(a, p) { + xr(this, "opts"); + xr(this, "root"); + xr(this, "attachment"); + Ar( + this, + wh, + ft(() => ({ + id: this.opts.id.current, + role: "listbox", + "aria-label": this.opts.ariaLabel.current, + [wa.list]: "", + ...this.attachment, + })) + ); + (this.opts = a), (this.root = p), (this.attachment = Xa(this.opts.ref)); + } + static create(a) { + return Kk.set(new s_(a, ml.get())); + } + get props() { + return x(ot(this, wh)); + } + set props(a) { + se(ot(this, wh), a); + } +}; +wh = new WeakMap(); +let vm = s_; +var Th; +const l_ = class l_ { + constructor(a, p) { + xr(this, "opts"); + xr(this, "root"); + xr(this, "attachment"); + Ar( + this, + Th, + ft(() => { + var a; + return { + id: this.opts.id.current, + [wa["input-label"]]: "", + for: (a = this.opts.for) == null ? void 0 : a.current, + style: c0, + ...this.attachment, + }; + }) + ); + (this.opts = a), + (this.root = p), + (this.attachment = Xa(this.opts.ref, (y) => (this.root.labelNode = y))); + } + static create(a) { + return new l_(a, ml.get()); + } + get props() { + return x(ot(this, Th)); + } + set props(a) { + se(ot(this, Th), a); + } +}; +Th = new WeakMap(); +let ym = l_; +var Jk = Te(""); +function Qk(m, a) { + const p = uo(); + Lr(a, !0); + let y = zt(a, "id", 19, () => Ya(p)), + M = zt(a, "ref", 15, null), + z = nr(a, ["$$slots", "$$events", "$$legacy", "id", "ref", "children"]); + const T = ym.create({ + id: br.with(() => y()), + ref: br.with( + () => M(), + (X) => M(X) + ), + }), + s = ft(() => Va(z, T.props)); + var B = Jk(); + ar(B, () => ({ ...x(s) })); + var O = A(B); + oi(O, () => a.children ?? pa), k(B), $(m, B), Dr(); +} +var eA = Te(" ", 1), + tA = Te("
                  "); +function rA(m, a) { + const p = uo(); + Lr(a, !0); + const y = (nt) => { + Qk(nt, { + children: (Ue, ke) => { + yn(); + var vt = wi(); + We(() => de(vt, ne())), $(Ue, vt); + }, + $$slots: { default: !0 }, + }); + }; + let M = zt(a, "id", 19, () => Ya(p)), + z = zt(a, "ref", 15, null), + T = zt(a, "value", 15, ""), + s = zt(a, "onValueChange", 3, qu), + B = zt(a, "onStateChange", 3, qu), + O = zt(a, "loop", 3, !1), + X = zt(a, "shouldFilter", 3, !0), + K = zt(a, "filter", 3, T0), + ne = zt(a, "label", 3, ""), + H = zt(a, "vimBindings", 3, !0), + fe = zt(a, "disablePointerSelection", 3, !1), + ge = zt(a, "disableInitialScroll", 3, !1), + Ie = zt(a, "columns", 3, null), + Ae = nr(a, [ + "$$slots", + "$$events", + "$$legacy", + "id", + "ref", + "value", + "onValueChange", + "onStateChange", + "loop", + "shouldFilter", + "filter", + "label", + "vimBindings", + "disablePointerSelection", + "disableInitialScroll", + "columns", + "children", + "child", + ]); + const De = im.create({ + id: br.with(() => M()), + ref: br.with( + () => z(), + (nt) => z(nt) + ), + filter: br.with(() => K()), + shouldFilter: br.with(() => X()), + loop: br.with(() => O()), + value: br.with( + () => T(), + (nt) => { + T() !== nt && (T(nt), s()(nt)); + } + ), + vimBindings: br.with(() => H()), + disablePointerSelection: br.with(() => fe()), + disableInitialScroll: br.with(() => ge()), + onStateChange: br.with(() => B()), + columns: br.with(() => Ie()), + }), + Ee = (nt) => De.updateSelectedToIndex(nt), + Fe = (nt) => De.updateSelectedByGroup(nt), + $e = (nt) => De.updateSelectedByItem(nt), + Je = () => De.getValidItems(), + qe = ft(() => Va(Ae, De.props)); + var Ze = er(), + Qe = Ct(Ze); + { + var Le = (nt) => { + var Ue = eA(), + ke = Ct(Ue); + y(ke); + var vt = j(ke, 2); + oi( + vt, + () => a.child, + () => ({ props: x(qe) }) + ), + $(nt, Ue); + }, + et = (nt) => { + var Ue = tA(); + ar(Ue, () => ({ ...x(qe) })); + var ke = A(Ue); + y(ke); + var vt = j(ke, 2); + oi(vt, () => a.children ?? pa), k(Ue), $(nt, Ue); + }; + Oe(Qe, (nt) => { + a.child ? nt(Le) : nt(et, !1); + }); + } + return ( + $(m, Ze), + Dr({ + updateSelectedToIndex: Ee, + updateSelectedByGroup: Fe, + updateSelectedByItem: $e, + getValidItems: Je, + }) + ); +} +var nA = Te("
                  "); +function iA(m, a) { + const p = uo(); + Lr(a, !0); + let y = zt(a, "id", 19, () => Ya(p)), + M = zt(a, "ref", 15, null), + z = zt(a, "forceMount", 3, !1), + T = nr(a, [ + "$$slots", + "$$events", + "$$legacy", + "id", + "ref", + "children", + "child", + "forceMount", + ]); + const s = hm.create({ + id: br.with(() => y()), + ref: br.with( + () => M(), + (ne) => M(ne) + ), + forceMount: br.with(() => z()), + }), + B = ft(() => Va(s.props, T)); + var O = er(), + X = Ct(O); + { + var K = (ne) => { + var H = er(), + fe = Ct(H); + { + var ge = (Ae) => { + var De = er(), + Ee = Ct(De); + oi( + Ee, + () => a.child, + () => ({ props: x(B) }) + ), + $(Ae, De); + }, + Ie = (Ae) => { + var De = nA(); + ar(De, () => ({ ...x(B) })); + var Ee = A(De); + oi(Ee, () => a.children ?? pa), k(De), $(Ae, De); + }; + Oe(fe, (Ae) => { + a.child ? Ae(ge) : Ae(Ie, !1); + }); + } + $(ne, H); + }; + Oe(X, (ne) => { + s.shouldRender && ne(K); + }); + } + $(m, O), Dr(); +} +var aA = Te("
                  "); +function oA(m, a) { + const p = uo(); + Lr(a, !0); + let y = zt(a, "id", 19, () => Ya(p)), + M = zt(a, "ref", 15, null), + z = zt(a, "value", 3, ""), + T = zt(a, "forceMount", 3, !1), + s = nr(a, [ + "$$slots", + "$$events", + "$$legacy", + "id", + "ref", + "value", + "forceMount", + "children", + "child", + ]); + const B = dm.create({ + id: br.with(() => y()), + ref: br.with( + () => M(), + (fe) => M(fe) + ), + forceMount: br.with(() => T()), + value: br.with(() => z()), + }), + O = ft(() => Va(s, B.props)); + var X = er(), + K = Ct(X); + { + var ne = (fe) => { + var ge = er(), + Ie = Ct(ge); + oi( + Ie, + () => a.child, + () => ({ props: x(O) }) + ), + $(fe, ge); + }, + H = (fe) => { + var ge = aA(); + ar(ge, () => ({ ...x(O) })); + var Ie = A(ge); + oi(Ie, () => a.children ?? pa), k(ge), $(fe, ge); + }; + Oe(K, (fe) => { + a.child ? fe(ne) : fe(H, !1); + }); + } + $(m, X), Dr(); +} +var sA = Te("
                  "); +function lA(m, a) { + const p = uo(); + Lr(a, !0); + let y = zt(a, "id", 19, () => Ya(p)), + M = zt(a, "ref", 15, null), + z = nr(a, [ + "$$slots", + "$$events", + "$$legacy", + "id", + "ref", + "children", + "child", + ]); + const T = pm.create({ + id: br.with(() => y()), + ref: br.with( + () => M(), + (ne) => M(ne) + ), + }), + s = ft(() => Va(z, T.props)); + var B = er(), + O = Ct(B); + { + var X = (ne) => { + var H = er(), + fe = Ct(H); + oi( + fe, + () => a.child, + () => ({ props: x(s) }) + ), + $(ne, H); + }, + K = (ne) => { + var H = sA(); + ar(H, () => ({ ...x(s) })); + var fe = A(H); + oi(fe, () => a.children ?? pa), k(H), $(ne, H); + }; + Oe(O, (ne) => { + a.child ? ne(X) : ne(K, !1); + }); + } + $(m, B), Dr(); +} +var cA = Te("
                  "), + uA = Te('
                  '); +function hA(m, a) { + const p = uo(); + Lr(a, !0); + let y = zt(a, "id", 19, () => Ya(p)), + M = zt(a, "ref", 15, null), + z = nr(a, [ + "$$slots", + "$$events", + "$$legacy", + "id", + "ref", + "children", + "child", + ]); + const T = fm.create({ + id: br.with(() => y()), + ref: br.with( + () => M(), + (ne) => M(ne) + ), + }), + s = ft(() => Va(z, T.props)); + var B = uA(), + O = A(B); + { + var X = (ne) => { + var H = er(), + fe = Ct(H); + oi( + fe, + () => a.child, + () => ({ props: x(s) }) + ), + $(ne, H); + }, + K = (ne) => { + var H = cA(); + ar(H, () => ({ ...x(s) })); + var fe = A(H); + oi(fe, () => a.children ?? pa), k(H), $(ne, H); + }; + Oe(O, (ne) => { + a.child ? ne(X) : ne(K, !1); + }); + } + k(B), $(m, B), Dr(); +} +var dA = Te(""); +function pA(m, a) { + const p = uo(); + Lr(a, !0); + let y = zt(a, "value", 15, ""), + M = zt(a, "autofocus", 3, !1), + z = zt(a, "id", 19, () => Ya(p)), + T = zt(a, "ref", 15, null), + s = nr(a, [ + "$$slots", + "$$events", + "$$legacy", + "value", + "autofocus", + "id", + "ref", + "child", + ]); + const B = mm.create({ + id: br.with(() => z()), + ref: br.with( + () => T(), + (fe) => T(fe) + ), + value: br.with( + () => y(), + (fe) => { + y(fe); + } + ), + autofocus: br.with(() => M() ?? !1), + }), + O = ft(() => Va(s, B.props)); + var X = er(), + K = Ct(X); + { + var ne = (fe) => { + var ge = er(), + Ie = Ct(ge); + oi( + Ie, + () => a.child, + () => ({ props: x(O) }) + ), + $(fe, ge); + }, + H = (fe) => { + var ge = dA(); + Ka(ge), ar(ge, () => ({ ...x(O) })), dp(ge, y), $(fe, ge); + }; + Oe(K, (fe) => { + a.child ? fe(ne) : fe(H, !1); + }); + } + $(m, X), Dr(); +} +var fA = Te("
                  "), + mA = Te('
                  '); +function _A(m, a) { + const p = uo(); + Lr(a, !0); + let y = zt(a, "id", 19, () => Ya(p)), + M = zt(a, "ref", 15, null), + z = zt(a, "value", 3, ""), + T = zt(a, "disabled", 3, !1), + s = zt(a, "onSelect", 3, qu), + B = zt(a, "forceMount", 3, !1), + O = zt(a, "keywords", 19, () => []), + X = nr(a, [ + "$$slots", + "$$events", + "$$legacy", + "id", + "ref", + "value", + "disabled", + "children", + "child", + "onSelect", + "forceMount", + "keywords", + ]); + const K = _m.create({ + id: br.with(() => y()), + ref: br.with( + () => M(), + (ge) => M(ge) + ), + value: br.with(() => z()), + disabled: br.with(() => T()), + onSelect: br.with(() => s()), + forceMount: br.with(() => B()), + keywords: br.with(() => O()), + }), + ne = ft(() => Va(X, K.props)); + var H = er(), + fe = Ct(H); + ju( + fe, + () => K.root.key, + (ge) => { + var Ie = mA(), + Ae = A(Ie); + { + var De = (Ee) => { + var Fe = er(), + $e = Ct(Fe); + { + var Je = (Ze) => { + var Qe = er(), + Le = Ct(Qe); + oi( + Le, + () => a.child, + () => ({ props: x(ne) }) + ), + $(Ze, Qe); + }, + qe = (Ze) => { + var Qe = fA(); + ar(Qe, () => ({ ...x(ne) })); + var Le = A(Qe); + oi(Le, () => a.children ?? pa), k(Qe), $(Ze, Qe); + }; + Oe($e, (Ze) => { + a.child ? Ze(Je) : Ze(qe, !1); + }); + } + $(Ee, Fe); + }; + Oe(Ae, (Ee) => { + K.shouldRender && Ee(De); + }); + } + k(Ie), We(() => Tr(Ie, "data-value", K.trueValue)), $(ge, Ie); + } + ), + $(m, H), + Dr(); +} +var gA = Te("
                  "); +function vA(m, a) { + const p = uo(); + Lr(a, !0); + let y = zt(a, "id", 19, () => Ya(p)), + M = zt(a, "ref", 15, null), + z = nr(a, [ + "$$slots", + "$$events", + "$$legacy", + "id", + "ref", + "child", + "children", + "aria-label", + ]); + const T = vm.create({ + id: br.with(() => y()), + ref: br.with( + () => M(), + (X) => M(X) + ), + ariaLabel: br.with(() => a["aria-label"] ?? "Suggestions..."), + }), + s = ft(() => Va(z, T.props)); + var B = er(), + O = Ct(B); + ju( + O, + () => T.root._commandState.search === "", + (X) => { + var K = er(), + ne = Ct(K); + { + var H = (ge) => { + var Ie = er(), + Ae = Ct(Ie); + oi( + Ae, + () => a.child, + () => ({ props: x(s) }) + ), + $(ge, Ie); + }, + fe = (ge) => { + var Ie = gA(); + ar(Ie, () => ({ ...x(s) })); + var Ae = A(Ie); + oi(Ae, () => a.children ?? pa), k(Ie), $(ge, Ie); + }; + Oe(ne, (ge) => { + a.child ? ge(H) : ge(fe, !1); + }); + } + $(X, K); + } + ), + $(m, B), + Dr(); +} +const ov = 1, + yA = 0.9, + xA = 0.8, + bA = 0.17, + Of = 0.1, + Nf = 0.999, + wA = 0.9999, + TA = 0.99, + CA = /[\\/_+.#"@[({&]/, + SA = /[\\/_+.#"@[({&]/g, + PA = /[\s-]/, + w0 = /[\s-]/g; +function xm(m, a, p, y, M, z, T) { + if (z === a.length) return M === m.length ? ov : TA; + const s = `${M},${z}`; + if (T[s] !== void 0) return T[s]; + const B = y.charAt(z); + let O = p.indexOf(B, M), + X = 0, + K, + ne, + H, + fe; + for (; O >= 0; ) + (K = xm(m, a, p, y, O + 1, z + 1, T)), + K > X && + (O === M + ? (K *= ov) + : CA.test(m.charAt(O - 1)) + ? ((K *= xA), + (H = m.slice(M, O - 1).match(SA)), + H && M > 0 && (K *= Nf ** H.length)) + : PA.test(m.charAt(O - 1)) + ? ((K *= yA), + (fe = m.slice(M, O - 1).match(w0)), + fe && M > 0 && (K *= Nf ** fe.length)) + : ((K *= bA), M > 0 && (K *= Nf ** (O - M))), + m.charAt(O) !== a.charAt(z) && (K *= wA)), + ((K < Of && p.charAt(O - 1) === y.charAt(z + 1)) || + (y.charAt(z + 1) === y.charAt(z) && p.charAt(O - 1) !== y.charAt(z))) && + ((ne = xm(m, a, p, y, O + 1, z + 2, T)), ne * Of > K && (K = ne * Of)), + K > X && (X = K), + (O = p.indexOf(B, O + 1)); + return (T[s] = X), X; +} +function sv(m) { + return m.toLowerCase().replace(w0, " "); +} +function T0(m, a, p) { + return ( + (m = + p && p.length > 0 ? `${`${m} ${p == null ? void 0 : p.join(" ")}`}` : m), + xm(m, a, sv(m), sv(a), 0, 0, {}) + ); +} +const IA = 18, + C0 = 40, + MA = `${C0}px`, + kA = [ + "[data-lastpass-icon-root]", + "com-1password-button", + "[data-dashlanecreated]", + '[style$="2147483647 !important;"]', + ].join(","); +function AA({ + containerRef: m, + inputRef: a, + pushPasswordManagerStrategy: p, + isFocused: y, + domContext: M, +}) { + let z = st(!1), + T = st(!1), + s = st(!1); + function B() { + const X = p.current; + return X === "none" ? !1 : X === "increase-width" && x(z) && x(T); + } + function O() { + const X = m.current, + K = a.current; + if (!X || !K || x(s) || p.current === "none") return; + const ne = X, + H = ne.getBoundingClientRect().left + ne.offsetWidth, + fe = ne.getBoundingClientRect().top + ne.offsetHeight / 2, + ge = H - IA, + Ie = fe; + (M.querySelectorAll(kA).length === 0 && + M.getDocument().elementFromPoint(ge, Ie) === X) || + (se(z, !0), se(s, !0)); + } + return ( + Wr(() => { + const X = m.current; + if (!X || p.current === "none") return; + function K() { + const fe = d0(X).innerWidth - X.getBoundingClientRect().right; + se(T, fe >= C0); + } + K(); + const ne = setInterval(K, 1e3); + return () => { + clearInterval(ne); + }; + }), + Wr(() => { + const X = y.current || M.getActiveElement() === a.current; + if (p.current === "none" || !X) return; + const K = setTimeout(O, 0), + ne = setTimeout(O, 2e3), + H = setTimeout(O, 5e3), + fe = setTimeout(() => { + se(s, !0); + }, 6e3); + return () => { + clearTimeout(K), clearTimeout(ne), clearTimeout(H), clearTimeout(fe); + }; + }), + { + get hasPwmBadge() { + return x(z); + }, + get willPushPwmBadge() { + return B(); + }, + PWM_BADGE_SPACE_WIDTH: MA, + } + ); +} +const S0 = p0({ component: "pin-input", parts: ["root", "cell"] }), + EA = [ + "Backspace", + "Delete", + "ArrowLeft", + "ArrowRight", + "ArrowUp", + "ArrowDown", + "Home", + "End", + "Escape", + "Enter", + "Tab", + "Shift", + "Control", + "Meta", + ]; +var Ha, + Pc, + Wo, + ja, + Wa, + Ic, + To, + Xo, + Cs, + Mc, + sp, + Ch, + Sh, + lp, + cp, + P0, + Ph, + Ih, + up, + Mh; +const c_ = class c_ { + constructor(a) { + Ar(this, cp); + xr(this, "opts"); + xr(this, "attachment"); + Ar(this, Ha, br(null)); + Ar(this, Pc, st(!1)); + xr(this, "inputAttachment", Xa(ot(this, Ha))); + Ar(this, Wo, br(!1)); + Ar(this, ja, st(null)); + Ar(this, Wa, st(null)); + Ar(this, Ic, new mk(() => this.opts.value.current ?? "")); + Ar( + this, + To, + ft(() => + typeof this.opts.pattern.current == "string" + ? new RegExp(this.opts.pattern.current) + : this.opts.pattern.current + ) + ); + Ar(this, Xo, st(bi({ prev: [null, null, "none"], willSyntheticBlur: !1 }))); + Ar(this, Cs); + Ar(this, Mc); + xr(this, "domContext"); + xr(this, "onkeydown", (a) => { + const p = a.key; + EA.includes(p) || + a.ctrlKey || + a.metaKey || + (p && + x(ot(this, To)) && + !x(ot(this, To)).test(p) && + a.preventDefault()); + }); + Ar( + this, + sp, + ft(() => ({ + position: "relative", + cursor: this.opts.disabled.current ? "default" : "text", + userSelect: "none", + WebkitUserSelect: "none", + pointerEvents: "none", + })) + ); + Ar( + this, + Ch, + ft(() => ({ + id: this.opts.id.current, + [S0.root]: "", + style: x(ot(this, sp)), + ...this.attachment, + })) + ); + Ar( + this, + Sh, + ft(() => ({ + style: { position: "absolute", inset: 0, pointerEvents: "none" }, + })) + ); + Ar( + this, + lp, + ft(() => ({ + position: "absolute", + inset: 0, + width: ot(this, Cs).willPushPwmBadge + ? `calc(100% + ${ot(this, Cs).PWM_BADGE_SPACE_WIDTH})` + : "100%", + clipPath: ot(this, Cs).willPushPwmBadge + ? `inset(0 ${ot(this, Cs).PWM_BADGE_SPACE_WIDTH} 0 0)` + : void 0, + height: "100%", + display: "flex", + textAlign: this.opts.textAlign.current, + opacity: "1", + color: "transparent", + pointerEvents: "all", + background: "transparent", + caretColor: "transparent", + border: "0 solid transparent", + outline: "0 solid transparent", + boxShadow: "none", + lineHeight: "1", + letterSpacing: "-.5em", + fontSize: "var(--bits-pin-input-root-height)", + fontFamily: "monospace", + fontVariantNumeric: "tabular-nums", + })) + ); + Ar(this, Ph, () => { + var ge; + const a = ot(this, Ha).current, + p = this.opts.ref.current; + if (!a || !p) return; + if (this.domContext.getActiveElement() !== a) { + se(ot(this, ja), null), se(ot(this, Wa), null); + return; + } + const y = a.selectionStart, + M = a.selectionEnd, + z = a.selectionDirection ?? "none", + T = a.maxLength, + s = a.value, + B = x(ot(this, Xo)).prev; + let O = -1, + X = -1, + K; + if (s.length !== 0 && y !== null && M !== null) { + const Ie = y === M, + Ae = y === s.length && s.length < T; + if (Ie && !Ae) { + const De = y; + if (De === 0) (O = 0), (X = 1), (K = "forward"); + else if (De === T) (O = De - 1), (X = De), (K = "backward"); + else if (T > 1 && s.length > 1) { + let Ee = 0; + if (B[0] !== null && B[1] !== null) { + K = De < B[0] ? "backward" : "forward"; + const Fe = B[0] === B[1] && B[0] < T; + K === "backward" && !Fe && (Ee = -1); + } + (O = Ee - De), (X = Ee + De + 1); + } + } + O !== -1 && + X !== -1 && + O !== X && + ((ge = ot(this, Ha).current) == null || + ge.setSelectionRange(O, X, K)); + } + const ne = O !== -1 ? O : y, + H = X !== -1 ? X : M, + fe = K ?? z; + se(ot(this, ja), ne, !0), + se(ot(this, Wa), H, !0), + (x(ot(this, Xo)).prev = [ne, H, fe]); + }); + xr(this, "oninput", (a) => { + const p = a.currentTarget.value.slice(0, this.opts.maxLength.current); + if (p.length > 0 && x(ot(this, To)) && !x(ot(this, To)).test(p)) { + a.preventDefault(); + return; + } + typeof ot(this, Ic).current == "string" && + p.length < ot(this, Ic).current.length && + this.domContext + .getDocument() + .dispatchEvent(new Event("selectionchange")), + (this.opts.value.current = p); + }); + xr(this, "onfocus", (a) => { + const p = ot(this, Ha).current; + if (p) { + const y = Math.min(p.value.length, this.opts.maxLength.current - 1), + M = p.value.length; + p.setSelectionRange(y, M), + se(ot(this, ja), y, !0), + se(ot(this, Wa), M, !0); + } + ot(this, Wo).current = !0; + }); + xr(this, "onpaste", (a) => { + var X, K, ne, H; + const p = ot(this, Ha).current; + if (!p) return; + const y = (fe) => { + const ge = p.selectionStart === null ? void 0 : p.selectionStart, + Ie = p.selectionEnd === null ? void 0 : p.selectionEnd, + Ae = ge !== Ie, + De = this.opts.value.current; + return ( + Ae + ? De.slice(0, ge) + fe + De.slice(Ie) + : De.slice(0, ge) + fe + De.slice(ge) + ).slice(0, this.opts.maxLength.current); + }, + M = (fe) => + fe.length > 0 && x(ot(this, To)) && !x(ot(this, To)).test(fe); + if ( + !((X = this.opts.pasteTransformer) != null && X.current) && + (!ot(this, Mc).isIOS || !a.clipboardData || !p) + ) { + const fe = y( + (K = a.clipboardData) == null ? void 0 : K.getData("text/plain") + ); + M(fe) && a.preventDefault(); + return; + } + const z = + ((ne = a.clipboardData) == null + ? void 0 + : ne.getData("text/plain")) ?? "", + T = + (H = this.opts.pasteTransformer) != null && H.current + ? this.opts.pasteTransformer.current(z) + : z; + a.preventDefault(); + const s = y(T); + if (M(s)) return; + (p.value = s), (this.opts.value.current = s); + const B = Math.min(s.length, this.opts.maxLength.current - 1), + O = s.length; + p.setSelectionRange(B, O), + se(ot(this, ja), B, !0), + se(ot(this, Wa), O, !0); + }); + xr(this, "onmouseover", (a) => { + se(ot(this, Pc), !0); + }); + xr(this, "onmouseleave", (a) => { + se(ot(this, Pc), !1); + }); + xr(this, "onblur", (a) => { + if (x(ot(this, Xo)).willSyntheticBlur) { + x(ot(this, Xo)).willSyntheticBlur = !1; + return; + } + ot(this, Wo).current = !1; + }); + Ar( + this, + Ih, + ft(() => { + var a; + return { + id: this.opts.inputId.current, + style: x(ot(this, lp)), + autocomplete: this.opts.autocomplete.current || "one-time-code", + "data-pin-input-input": "", + "data-pin-input-input-mss": x(ot(this, ja)), + "data-pin-input-input-mse": x(ot(this, Wa)), + inputmode: this.opts.inputmode.current, + pattern: (a = x(ot(this, To))) == null ? void 0 : a.source, + maxlength: this.opts.maxLength.current, + value: this.opts.value.current, + disabled: zk(this.opts.disabled.current), + onpaste: this.onpaste, + oninput: this.oninput, + onkeydown: this.onkeydown, + onmouseover: this.onmouseover, + onmouseleave: this.onmouseleave, + onfocus: this.onfocus, + onblur: this.onblur, + ...this.inputAttachment, + }; + }) + ); + Ar( + this, + up, + ft(() => + Array.from({ length: this.opts.maxLength.current }).map((a, p) => { + const y = + ot(this, Wo).current && + x(ot(this, ja)) !== null && + x(ot(this, Wa)) !== null && + ((x(ot(this, ja)) === x(ot(this, Wa)) && p === x(ot(this, ja))) || + (p >= x(ot(this, ja)) && p < x(ot(this, Wa)))), + M = + this.opts.value.current[p] !== void 0 + ? this.opts.value.current[p] + : null; + return { char: M, isActive: y, hasFakeCaret: y && M === null }; + }) + ) + ); + Ar( + this, + Mh, + ft(() => ({ + cells: x(ot(this, up)), + isFocused: ot(this, Wo).current, + isHovering: x(ot(this, Pc)), + })) + ); + var p; + (this.opts = a), + (this.attachment = Xa(this.opts.ref)), + (this.domContext = new Pk(a.ref)), + na(this, Mc, { + value: this.opts.value, + isIOS: + typeof window < "u" && + ((p = window == null ? void 0 : window.CSS) == null + ? void 0 + : p.supports("-webkit-touch-callout", "none")), + }), + na( + this, + Cs, + AA({ + containerRef: this.opts.ref, + inputRef: ot(this, Ha), + isFocused: ot(this, Wo), + pushPasswordManagerStrategy: this.opts.pushPasswordManagerStrategy, + domContext: this.domContext, + }) + ), + Fn(() => { + const y = ot(this, Ha).current, + M = this.opts.ref.current; + if (!y || !M) return; + ot(this, Mc).value.current !== y.value && + (this.opts.value.current = y.value), + (x(ot(this, Xo)).prev = [ + y.selectionStart, + y.selectionEnd, + y.selectionDirection ?? "none", + ]); + const z = Nu( + this.domContext.getDocument(), + "selectionchange", + ot(this, Ph), + { capture: !0 } + ); + ot(this, Ph).call(this), + this.domContext.getActiveElement() === y && + (ot(this, Wo).current = !0), + this.domContext.getElementById("pin-input-style") || + jr(this, cp, P0).call(this); + const T = () => { + M && + M.style.setProperty( + "--bits-pin-input-root-height", + `${y.clientHeight}px` + ); + }; + T(); + const s = new ResizeObserver(T); + return ( + s.observe(y), + () => { + z(), s.disconnect(); + } + ); + }), + Ps([() => this.opts.value.current, () => ot(this, Ha).current], () => { + zA(() => { + const y = ot(this, Ha).current; + if (!y) return; + y.dispatchEvent(new Event("input")); + const M = y.selectionStart, + z = y.selectionEnd, + T = y.selectionDirection ?? "none"; + M !== null && + z !== null && + (se(ot(this, ja), M, !0), + se(ot(this, Wa), z, !0), + (x(ot(this, Xo)).prev = [M, z, T])); + }, this.domContext); + }), + Wr(() => { + const y = this.opts.value.current, + M = ot(this, Ic).current, + z = this.opts.maxLength.current, + T = this.opts.onComplete.current; + M !== void 0 && y !== M && M.length < z && y.length === z && T(y); + }); + } + static create(a) { + return new c_(a); + } + get rootProps() { + return x(ot(this, Ch)); + } + set rootProps(a) { + se(ot(this, Ch), a); + } + get inputWrapperProps() { + return x(ot(this, Sh)); + } + set inputWrapperProps(a) { + se(ot(this, Sh), a); + } + get inputProps() { + return x(ot(this, Ih)); + } + set inputProps(a) { + se(ot(this, Ih), a); + } + get snippetProps() { + return x(ot(this, Mh)); + } + set snippetProps(a) { + se(ot(this, Mh), a); + } +}; +(Ha = new WeakMap()), + (Pc = new WeakMap()), + (Wo = new WeakMap()), + (ja = new WeakMap()), + (Wa = new WeakMap()), + (Ic = new WeakMap()), + (To = new WeakMap()), + (Xo = new WeakMap()), + (Cs = new WeakMap()), + (Mc = new WeakMap()), + (sp = new WeakMap()), + (Ch = new WeakMap()), + (Sh = new WeakMap()), + (lp = new WeakMap()), + (cp = new WeakSet()), + (P0 = function () { + const a = this.domContext.getDocument(), + p = a.createElement("style"); + if (((p.id = "pin-input-style"), a.head.appendChild(p), p.sheet)) { + const y = + "background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;"; + Lu( + p.sheet, + "[data-pin-input-input]::selection { background: transparent !important; color: transparent !important; }" + ), + Lu(p.sheet, `[data-pin-input-input]:autofill { ${y} }`), + Lu(p.sheet, `[data-pin-input-input]:-webkit-autofill { ${y} }`), + Lu( + p.sheet, + "@supports (-webkit-touch-callout: none) { [data-pin-input-input] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }" + ), + Lu( + p.sheet, + "[data-pin-input-input] + * { pointer-events: all !important; }" + ); + } + }), + (Ph = new WeakMap()), + (Ih = new WeakMap()), + (up = new WeakMap()), + (Mh = new WeakMap()); +let bm = c_; +var kh; +const u_ = class u_ { + constructor(a) { + xr(this, "opts"); + xr(this, "attachment"); + Ar( + this, + kh, + ft(() => ({ + id: this.opts.id.current, + [S0.cell]: "", + "data-active": this.opts.cell.current.isActive ? "" : void 0, + "data-inactive": this.opts.cell.current.isActive ? void 0 : "", + ...this.attachment, + })) + ); + (this.opts = a), (this.attachment = Xa(this.opts.ref)); + } + static create(a) { + return new u_(a); + } + get props() { + return x(ot(this, kh)); + } + set props(a) { + se(ot(this, kh), a); + } +}; +kh = new WeakMap(); +let wm = u_; +function zA(m, a) { + const p = a.setTimeout(m, 0), + y = a.setTimeout(m, 10), + M = a.setTimeout(m, 50); + return [p, y, M]; +} +function Lu(m, a) { + try { + m.insertRule(a); + } catch { + console.error("pin input could not insert CSS rule:", a); + } +} +var LA = Te("
                  "); +function DA(m, a) { + const p = uo(); + Lr(a, !0); + let y = zt(a, "id", 19, () => Ya(p)), + M = zt(a, "inputId", 19, () => `${Ya(p)}-input`), + z = zt(a, "ref", 15, null), + T = zt(a, "maxlength", 3, 6), + s = zt(a, "textalign", 3, "left"), + B = zt(a, "inputmode", 3, "numeric"), + O = zt(a, "onComplete", 3, qu), + X = zt(a, "pushPasswordManagerStrategy", 3, "increase-width"), + K = zt(a, "class", 3, ""), + ne = zt(a, "autocomplete", 3, "one-time-code"), + H = zt(a, "disabled", 3, !1), + fe = zt(a, "value", 15, ""), + ge = zt(a, "onValueChange", 3, qu), + Ie = nr(a, [ + "$$slots", + "$$events", + "$$legacy", + "id", + "inputId", + "ref", + "maxlength", + "textalign", + "pattern", + "inputmode", + "onComplete", + "pushPasswordManagerStrategy", + "class", + "children", + "autocomplete", + "disabled", + "value", + "onValueChange", + "pasteTransformer", + ]); + const Ae = bm.create({ + id: br.with(() => y()), + ref: br.with( + () => z(), + (Qe) => z(Qe) + ), + inputId: br.with(() => M()), + autocomplete: br.with(() => ne()), + maxLength: br.with(() => T()), + textAlign: br.with(() => s()), + disabled: br.with(() => H()), + inputmode: br.with(() => B()), + pattern: br.with(() => a.pattern), + onComplete: br.with(() => O()), + value: br.with( + () => fe(), + (Qe) => { + fe(Qe), ge()(Qe); + } + ), + pushPasswordManagerStrategy: br.with(() => X()), + pasteTransformer: br.with(() => a.pasteTransformer), + }), + De = ft(() => Va(Ie, Ae.inputProps)), + Ee = ft(() => Va(Ae.rootProps, { class: K() })), + Fe = ft(() => Va(Ae.inputWrapperProps, {})); + var $e = LA(); + ar($e, () => ({ ...x(Ee) })); + var Je = A($e); + oi( + Je, + () => a.children ?? pa, + () => Ae.snippetProps + ); + var qe = j(Je, 2); + ar(qe, () => ({ ...x(Fe) })); + var Ze = A(qe); + Ka(Ze), ar(Ze, () => ({ ...x(De) })), k(qe), k($e), $(m, $e), Dr(); +} +var RA = Te("
                  "); +function BA(m, a) { + const p = uo(); + Lr(a, !0); + let y = zt(a, "id", 19, () => Ya(p)), + M = zt(a, "ref", 15, null), + z = nr(a, [ + "$$slots", + "$$events", + "$$legacy", + "id", + "ref", + "cell", + "child", + "children", + ]); + const T = wm.create({ + id: br.with(() => y()), + ref: br.with( + () => M(), + (ne) => M(ne) + ), + cell: br.with(() => a.cell), + }), + s = ft(() => Va(z, T.props)); + var B = er(), + O = Ct(B); + { + var X = (ne) => { + var H = er(), + fe = Ct(H); + oi( + fe, + () => a.child, + () => ({ props: x(s) }) + ), + $(ne, H); + }, + K = (ne) => { + var H = RA(); + ar(H, () => ({ ...x(s) })); + var fe = A(H); + oi(fe, () => a.children ?? pa), k(H), $(ne, H); + }; + Oe(O, (ne) => { + a.child ? ne(X) : ne(K, !1); + }); + } + $(m, B), Dr(); +} +function Ac(...m) { + return Lv(Ou(m)); +} +function FA(m, a) { + Lr(a, !0); + let p = zt(a, "ref", 15, null), + y = zt(a, "value", 15, ""), + M = nr(a, ["$$slots", "$$events", "$$legacy", "ref", "value", "class"]); + var z = er(), + T = Ct(z); + { + let s = ft(() => + Ac( + "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", + a.class + ) + ); + xi( + T, + () => rA, + (B, O) => { + O( + B, + Is( + { + "data-slot": "command", + get class() { + return x(s); + }, + }, + () => M, + { + get value() { + return y(); + }, + set value(X) { + y(X); + }, + get ref() { + return p(); + }, + set ref(X) { + p(X); + }, + } + ) + ); + } + ); + } + $(m, z), Dr(); +} +var OA = Pr( + '' +); +function _l(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = OA(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +function NA(m, a) { + Lr(a, !0); + let p = zt(a, "ref", 15, null), + y = nr(a, ["$$slots", "$$events", "$$legacy", "ref", "class"]); + var M = er(), + z = Ct(M); + { + let T = ft(() => Ac("py-6 text-center text-sm", a.class)); + xi( + z, + () => iA, + (s, B) => { + B( + s, + Is( + { + "data-slot": "command-empty", + get class() { + return x(T); + }, + }, + () => y, + { + get ref() { + return p(); + }, + set ref(O) { + p(O); + }, + } + ) + ); + } + ); + } + $(m, M), Dr(); +} +var jA = Te(" ", 1); +function VA(m, a) { + Lr(a, !0); + let p = zt(a, "ref", 15, null), + y = nr(a, [ + "$$slots", + "$$events", + "$$legacy", + "ref", + "class", + "children", + "heading", + "value", + ]); + var M = er(), + z = Ct(M); + { + let T = ft(() => Ac("text-foreground overflow-hidden p-1", a.class)), + s = ft(() => a.value ?? a.heading ?? `----${Wk()}`); + xi( + z, + () => oA, + (B, O) => { + O( + B, + Is( + { + "data-slot": "command-group", + get class() { + return x(T); + }, + get value() { + return x(s); + }, + }, + () => y, + { + get ref() { + return p(); + }, + set ref(X) { + p(X); + }, + children: (X, K) => { + var ne = jA(), + H = Ct(ne); + { + var fe = (Ie) => { + var Ae = er(), + De = Ct(Ae); + xi( + De, + () => lA, + (Ee, Fe) => { + Fe(Ee, { + class: + "text-muted-foreground px-2 py-1.5 text-xs font-medium", + children: ($e, Je) => { + yn(); + var qe = wi(); + We(() => de(qe, a.heading)), $($e, qe); + }, + $$slots: { default: !0 }, + }); + } + ), + $(Ie, Ae); + }; + Oe(H, (Ie) => { + a.heading && Ie(fe); + }); + } + var ge = j(H, 2); + xi( + ge, + () => hA, + (Ie, Ae) => { + Ae(Ie, { + get children() { + return a.children; + }, + }); + } + ), + $(X, ne); + }, + $$slots: { default: !0 }, + } + ) + ); + } + ); + } + $(m, M), Dr(); +} +function qA(m, a) { + Lr(a, !0); + let p = zt(a, "ref", 15, null), + y = nr(a, ["$$slots", "$$events", "$$legacy", "ref", "class"]); + var M = er(), + z = Ct(M); + { + let T = ft(() => + Ac( + "aria-selected:bg-base-300 aria-selected:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", + a.class + ) + ); + xi( + z, + () => _A, + (s, B) => { + B( + s, + Is( + { + "data-slot": "command-item", + get class() { + return x(T); + }, + }, + () => y, + { + get ref() { + return p(); + }, + set ref(O) { + p(O); + }, + } + ) + ); + } + ); + } + $(m, M), Dr(); +} +var ZA = Pr( + '' +); +function UA(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = ZA(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var $A = Te( + '
                  ' +); +function GA(m, a) { + Lr(a, !0); + let p = zt(a, "ref", 15, null), + y = zt(a, "value", 15, ""), + M = nr(a, ["$$slots", "$$events", "$$legacy", "ref", "class", "value"]); + var z = $A(), + T = A(z); + UA(T, { class: "size-5 opacity-50" }); + var s = j(T, 2); + { + let B = ft(() => + Ac( + "placeholder:text-muted-foreground outline-hidden flex h-10 w-full rounded-md bg-transparent py-3 text-sm disabled:cursor-not-allowed disabled:opacity-50", + a.class + ) + ); + xi( + s, + () => pA, + (O, X) => { + X( + O, + Is( + { + "data-slot": "command-input", + get class() { + return x(B); + }, + }, + () => M, + { + get ref() { + return p(); + }, + set ref(K) { + p(K); + }, + get value() { + return y(); + }, + set value(K) { + y(K); + }, + } + ) + ); + } + ); + } + k(z), $(m, z), Dr(); +} +function HA(m, a) { + Lr(a, !0); + let p = zt(a, "ref", 15, null), + y = nr(a, ["$$slots", "$$events", "$$legacy", "ref", "class"]); + var M = er(), + z = Ct(M); + { + let T = ft(() => + Ac("max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden", a.class) + ); + xi( + z, + () => vA, + (s, B) => { + B( + s, + Is( + { + "data-slot": "command-list", + get class() { + return x(T); + }, + }, + () => y, + { + get ref() { + return p(); + }, + set ref(O) { + p(O); + }, + } + ) + ); + } + ); + } + $(m, M), Dr(); +} +var WA = Pr( + '' +); +function XA(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = WA(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var YA = Te(" ", 1), + KA = Te(' ', 1), + JA = Te( + ' ' + ), + QA = Te(" ", 1), + eE = Te(" ", 1), + tE = (m, a) => { + a(0); + }, + rE = Te(''), + nE = Te( + '
                  ' + ); +function lv(m, a) { + Lr(a, !0); + let p = zt(a, "countryId", 15, 0), + y = zt(a, "dropdownDirection", 3, "right"), + M = st(null), + z = st(null), + T = st(""); + function s() { + Iv().then(() => { + var Ee; + (Ee = document.activeElement) == null || Ee.blur(), se(T, ""); + }); + } + var B = nE(), + O = A(B), + X = A(O), + K = A(X); + { + var ne = (Ee) => { + var Fe = YA(), + $e = Ct(Fe), + Je = A($e, !0); + k($e); + var qe = j($e, 2); + XA(qe, { class: "size-3.5" }), + We((Ze) => de(Je, Ze), [() => Uv()]), + $(Ee, Fe); + }, + H = (Ee) => { + const Fe = ft(() => So(p())); + var $e = KA(), + Je = Ct($e), + qe = A(Je, !0); + k(Je); + var Ze = j(Je); + We(() => { + de(qe, x(Fe).flag), de(Ze, ` ${x(Fe).name ?? ""}`); + }), + $(Ee, $e); + }; + Oe(K, (Ee) => { + p() === 0 ? Ee(ne) : Ee(H, !1); + }); + } + k(X); + var fe = j(X, 2); + let ge; + var Ie = A(fe); + xi( + Ie, + () => FA, + (Ee, Fe) => { + Fe(Ee, { + children: ($e, Je) => { + var qe = eE(), + Ze = Ct(qe); + xi( + Ze, + () => GA, + (Le, et) => { + et(Le, { + placeholder: "Country", + get ref() { + return x(M); + }, + set ref(nt) { + se(M, nt); + }, + get value() { + return x(T); + }, + set value(nt) { + se(T, nt, !0); + }, + }); + } + ); + var Qe = j(Ze, 2); + xi( + Qe, + () => HA, + (Le, et) => { + et(Le, { + children: (nt, Ue) => { + var ke = QA(), + vt = Ct(ke); + xi( + vt, + () => NA, + (re, he) => { + he(re, { + children: (oe, ze) => { + yn(); + var je = wi(); + We((pt) => de(je, pt), [() => Bw()]), $(oe, je); + }, + $$slots: { default: !0 }, + }); + } + ); + var ee = j(vt, 2); + xi( + ee, + () => VA, + (re, he) => { + he(re, { + children: (oe, ze) => { + var je = er(), + pt = Ct(je); + hi( + pt, + 17, + () => Wi.countries, + (it) => it.id, + (it, ct) => { + var It = er(), + Dt = Ct(It); + xi( + Dt, + () => qA, + (at, dt) => { + dt(at, { + get value() { + return x(ct).name; + }, + onSelect: () => { + p(x(ct).id), s(); + }, + children: (yt, xt) => { + var St = JA(), + wt = A(St), + _t = A(wt, !0); + k(wt); + var Lt = j(wt); + k(St), + We(() => { + de(_t, x(ct).flag), + de(Lt, ` ${x(ct).name ?? ""}`); + }), + $(yt, St); + }, + $$slots: { default: !0 }, + }); + } + ), + $(it, It); + } + ), + $(oe, je); + }, + $$slots: { default: !0 }, + }); + } + ), + $(nt, ke); + }, + $$slots: { default: !0 }, + }); + } + ), + $($e, qe); + }, + $$slots: { default: !0 }, + }); + } + ), + k(fe), + k(O); + var Ae = j(O, 2); + { + var De = (Ee) => { + var Fe = rE(); + Fe.__click = [tE, p]; + var $e = A(Fe); + _l($e, { class: "size-3.5" }), k(Fe), $(Ee, Fe); + }; + Oe(Ae, (Ee) => { + p() != 0 && Ee(De); + }); + } + k(B), + Ko( + B, + (Ee) => se(z, Ee), + () => x(z) + ), + We( + (Ee) => + (ge = zr( + fe, + 1, + "dropdown-content menu bg-base-100 rounded-box z-1 border-base-content/10 w-52 rounded-lg border py-1 shadow-sm", + null, + ge, + Ee + )), + [() => ({ "right-1": y() === "left" })] + ), + di("focus", X, () => { + x(M).focus(); + }), + $(m, B), + Dr(); +} +$n(["click"]); +var iE = Pr( + '' +); +function aE(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = iE(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var oE = Pr( + '' + ), + sE = Pr( + '' + ); +function Uu(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy", "filled"]); + var y = er(), + M = Ct(y); + { + var z = (s) => { + var B = oE(); + ar(B, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(s, B); + }, + T = (s) => { + var B = sE(); + ar(B, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(s, B); + }; + Oe(M, (s) => { + a.filled ? s(z) : s(T, !1); + }); + } + $(m, y); +} +var lE = Te( + '' + ), + cE = Te('
                  '), + uE = Te( + '
                  ' + ), + hE = (m, a, p) => { + a.onvisitclick({ lat: x(p).lastLatitude, lng: x(p).lastLongitude }); + }, + dE = Te( + ' ' + ), + pE = Te( + '

                  ' + ), + fE = Te( + ' ' + ), + mE = Te( + '

                  ' + ), + _E = Te(' '), + gE = Te(" "), + vE = Te( + '
                  ' + ), + yE = Te( + '

                  ' + ), + xE = Te( + ' ' + ), + bE = Te( + '

                  ' + ), + wE = Te( + '
                  ' + ), + TE = Te( + '
                  ', + 1 + ); +function CE(m, a) { + Lr(a, !0); + const p = []; + let y = st(1e3); + const M = ft(() => x(y) <= 640); + let z = st("today"), + T = { + regions: { label: WT(), icon: Em }, + countries: { label: KT(), icon: aE }, + players: { label: Yv(), icon: yp }, + alliances: { label: Kv(), icon: xp }, + }, + s = st("regions"), + B = st(0), + O = bi({ players: {}, alliances: {}, regions: {}, countries: {} }), + X = ft(() => { + var qe, Ze, Qe; + return x(s) === "regions" + ? (Ze = (qe = O[x(s)][x(B)]) == null ? void 0 : qe[x(z)]) == null + ? void 0 + : Ze.entries + : (Qe = O[x(s)][x(z)]) == null + ? void 0 + : Qe.entries; + }); + const K = 5 * 1e3; + Wr(() => { + var Le; + if (!a.open) return; + const qe = x(z), + Ze = x(s), + Qe = x(B); + Ze === "players" && (!O[Ze][qe] || Date.now() - O[Ze][qe].time > K) + ? Qr.leaderboardPlayers(qe) + .then((et) => { + O[Ze][qe] = { time: Date.now(), entries: et }; + }) + .catch((et) => Fr.error(et.message)) + : Ze === "alliances" && (!O[Ze][qe] || Date.now() - O[Ze][qe].time > K) + ? Qr.leaderboardAlliances(qe) + .then((et) => { + O[Ze][qe] = { time: Date.now(), entries: et }; + }) + .catch((et) => Fr.error(et.message)) + : Ze === "countries" && (!O[Ze][qe] || Date.now() - O[Ze][qe].time > K) + ? Qr.leaderboardCountries(qe) + .then((et) => { + O[Ze][qe] = { time: Date.now(), entries: et }; + }) + .catch((et) => Fr.error(et.message)) + : Ze === "regions" && + (!((Le = O[Ze][Qe]) != null && Le[qe]) || + Date.now() - O[Ze][Qe][qe].time > K) && + Qr.leaderboardRegions(qe, Qe) + .then((et) => { + O[Ze][Qe] || (O[Ze][Qe] = {}), + (O[Ze][Qe][qe] = { time: Date.now(), entries: et }); + }) + .catch((et) => Fr.error(et.message)); + }); + var ne = TE(), + H = Ct(ne); + hi( + H, + 21, + () => Object.entries(T), + ([qe, { label: Ze, icon: Qe }]) => qe, + (qe, Ze) => { + var Qe = ft(() => Mv(x(Ze), 2)); + let Le = () => x(Qe)[0], + et = () => x(Qe)[1].label, + nt = () => x(Qe)[1].icon; + const Ue = ft(nt); + var ke = lE(), + vt = A(ke); + Ka(vt); + var ee, + re = j(vt, 2); + xi( + re, + () => x(Ue), + (oe, ze) => { + ze(oe, { + get this() { + return nt(); + }, + class: "mr-1 size-5 max-sm:hidden", + }); + } + ); + var he = j(re); + k(ke), + We(() => { + Tr(vt, "aria-label", et()), + ee !== (ee = Le()) && (vt.value = (vt.__value = Le()) ?? ""), + de(he, ` ${et() ?? ""}`); + }), + Lm( + p, + [], + vt, + () => (Le(), x(s)), + (oe) => se(s, oe) + ), + $(qe, ke); + } + ), + k(H); + var fe = j(H, 2), + ge = A(fe); + Um(ge, { + get value() { + return x(z); + }, + set value(qe) { + se(z, qe, !0); + }, + }); + var Ie = j(ge, 2); + { + var Ae = (qe) => { + lv(qe, { + dropdownDirection: "left", + get countryId() { + return x(B); + }, + set countryId(Ze) { + se(B, Ze, !0); + }, + }); + }; + Oe(Ie, (qe) => { + x(s) === "regions" && !x(M) && qe(Ae); + }); + } + k(fe); + var De = j(fe, 2); + { + var Ee = (qe) => { + var Ze = cE(), + Qe = A(Ze); + lv(Qe, { + get countryId() { + return x(B); + }, + set countryId(Le) { + se(B, Le, !0); + }, + }), + k(Ze), + $(qe, Ze); + }; + Oe(De, (qe) => { + x(s) === "regions" && x(M) && qe(Ee); + }); + } + var Fe = j(De, 2); + { + var $e = (qe) => { + var Ze = uE(), + Qe = A(Ze), + Le = j(Qe); + { + var et = (Ue) => { + var ke = wi(); + We((vt) => de(ke, vt), [() => vp().toLowerCase()]), $(Ue, ke); + }, + nt = (Ue) => { + var ke = er(), + vt = Ct(ke); + { + var ee = (he) => { + var oe = wi(); + We((ze) => de(oe, ze), [() => Nm()]), $(he, oe); + }, + re = (he) => { + var oe = er(), + ze = Ct(oe); + { + var je = (pt) => { + var it = wi(); + We((ct) => de(it, ct), [() => jm()]), $(pt, it); + }; + Oe( + ze, + (pt) => { + x(z) === "month" && pt(je); + }, + !0 + ); + } + $(he, oe); + }; + Oe( + vt, + (he) => { + x(z) === "week" ? he(ee) : he(re, !1); + }, + !0 + ); + } + $(Ue, ke); + }; + Oe(Le, (Ue) => { + x(z) === "today" ? Ue(et) : Ue(nt, !1); + }); + } + k(Ze), We((Ue) => de(Qe, `${Ue ?? ""} `), [() => Om()]), $(qe, Ze); + }, + Je = (qe) => { + var Ze = er(), + Qe = Ct(Ze); + { + var Le = (nt) => { + var Ue = er(), + ke = Ct(Ue); + { + var vt = (re) => { + const he = ft(() => x(X)); + var oe = pE(), + ze = A(oe), + je = A(ze), + pt = j(A(je)), + it = A(pt, !0); + k(pt); + var ct = j(pt), + It = A(ct), + Dt = j(It, 2), + at = j(Dt), + dt = A(at); + Uu(dt, { + class: "text-base-content/50 mb-0.5 ml-1 inline size-4", + }), + k(at), + k(ct), + yn(), + k(je), + k(ze); + var yt = j(ze); + hi( + yt, + 31, + () => x(he), + (xt) => xt.id, + (xt, St, wt) => { + const _t = ft(() => So(x(St).countryId)); + var Lt = dE(), + Rt = A(Lt), + $t = A(Rt, !0); + k(Rt); + var tr = j(Rt), + Qt = A(tr), + Ot = A(Qt, !0); + k(Qt); + var Nt = j(Qt, 2), + or = A(Nt), + cr = j(or), + Vr = A(cr); + k(cr), k(Nt), k(tr); + var mr = j(tr), + hr = A(mr, !0); + k(mr); + var _r = j(mr), + Ir = A(_r); + Ir.__click = [hE, a, St]; + var qr = A(Ir, !0); + k(Ir), + k(_r), + k(Lt), + We( + (ue, V, U) => { + de($t, x(wt) + 1), + Tr(Qt, "data-tip", x(_t).name), + de(Ot, x(_t).flag), + zr(Nt, 1, `font-semibold ${ue ?? ""}`), + de(or, `${x(St).name ?? ""} `), + de(Vr, `#${x(St).number ?? ""}`), + de(hr, V), + de(qr, U); + }, + [ + () => Oi(x(St).cityId), + () => x(St).pixelsPainted.toLocaleString("en-US"), + () => kx(), + ] + ), + ll( + Lt, + () => cl, + () => ({ duration: 200 }) + ), + $(xt, Lt); + } + ), + k(yt), + k(oe), + We( + (xt, St, wt, _t) => { + de(it, xt), + de(It, `${St ?? ""} `), + de(Dt, `${wt ?? ""} `), + Tr(at, "data-tip", _t); + }, + [ + () => iC(), + () => vc(), + () => yc().toLowerCase(), + () => hC(), + ] + ), + $(re, oe); + }, + ee = (re) => { + var he = er(), + oe = Ct(he); + { + var ze = (pt) => { + var it = mE(), + ct = A(it), + It = A(ct), + Dt = j(A(It)), + at = A(Dt, !0); + k(Dt); + var dt = j(Dt), + yt = A(dt), + xt = j(yt, 2), + St = j(xt), + wt = A(St); + Uu(wt, { + class: + "text-base-content/50 mb-0.5 ml-1 inline size-4", + }), + k(St), + k(dt), + k(It), + k(ct); + var _t = j(ct); + hi( + _t, + 31, + () => x(X), + (Lt) => Lt.id, + (Lt, Rt, $t) => { + const tr = ft(() => So(x(Rt).id)); + var Qt = fE(), + Ot = A(Qt), + Nt = A(Ot, !0); + k(Ot); + var or = j(Ot), + cr = A(or), + Vr = A(cr, !0); + k(cr); + var mr = j(cr, 2), + hr = A(mr, !0); + k(mr), k(or); + var _r = j(or), + Ir = A(_r, !0); + k(_r), + k(Qt), + We( + (qr, ue) => { + de(Nt, x($t) + 1), + Tr(cr, "data-tip", x(tr).name), + de(Vr, x(tr).flag), + zr(mr, 1, `font-semibold ${qr ?? ""}`), + de(hr, x(tr).name), + de(Ir, ue); + }, + [ + () => Oi(x(Rt).id), + () => + x(Rt).pixelsPainted.toLocaleString( + "en-US" + ), + ] + ), + ll( + Qt, + () => cl, + () => ({ duration: 200 }) + ), + $(Lt, Qt); + } + ), + k(_t), + k(it), + We( + (Lt, Rt, $t, tr) => { + de(at, Lt), + de(yt, `${Rt ?? ""} `), + de(xt, `${$t ?? ""} `), + Tr(St, "data-tip", tr); + }, + [ + () => Uv(), + () => vc(), + () => yc().toLowerCase(), + () => VC(), + ] + ), + $(pt, it); + }, + je = (pt) => { + var it = er(), + ct = Ct(it); + { + var It = (at) => { + const dt = ft(() => x(X)); + var yt = yE(), + xt = A(yt), + St = A(xt), + wt = j(A(St)), + _t = A(wt, !0); + k(wt); + var Lt = j(wt), + Rt = A(Lt), + $t = j(Rt, 2, !0); + k(Lt), k(St), k(xt); + var tr = j(xt); + hi( + tr, + 31, + () => x(dt), + (Qt) => Qt.id, + (Qt, Ot, Nt) => { + const or = ft(() => { + var ye; + return ( + ((ye = Mt.data) == null + ? void 0 + : ye.id) === x(Ot).id + ); + }); + var cr = vE(); + let Vr; + var mr = A(cr), + hr = A(mr, !0); + k(mr); + var _r = j(mr), + Ir = A(_r), + qr = A(Ir); + co(qr, { + class: "size-8 border sm:size-10", + get userId() { + return x(Ot).id; + }, + get pictureUrl() { + return x(Ot).picture; + }, + }); + var ue = j(qr, 2), + V = A(ue), + U = A(V), + Y = j(U), + ie = A(Y); + k(Y), k(V); + var pe = j(V, 2); + { + var Se = (ye) => { + const Bt = ft(() => + So(x(Ot).equippedFlag) + ); + var rr = _E(), + Kt = A(rr, !0); + k(rr), + We(() => { + Tr(rr, "data-tip", x(Bt).name), + de(Kt, x(Bt).flag); + }), + $(ye, rr); + }; + Oe(pe, (ye) => { + x(Ot).equippedFlag && ye(Se); + }); + } + var Me = j(pe, 2); + { + var we = (ye) => { + Eh(ye, { + get username() { + return x(Ot).discord; + }, + get id() { + return x(Ot).discordId; + }, + }); + }; + Oe(Me, (ye) => { + x(Ot).discord && ye(we); + }); + } + var Ve = j(Me, 2); + { + var ut = (ye) => { + var Bt = gE(), + rr = A(Bt, !0); + k(Bt), + We( + (Kt, gr) => { + zr( + Bt, + 1, + `badge badge-sm ml-0.5 border-0 ${ + Kt ?? "" + } ${gr ?? ""}` + ), + de(rr, x(Ot).allianceName); + }, + [ + () => pp(x(Ot).allianceId), + () => Oi(x(Ot).allianceId), + ] + ), + $(ye, Bt); + }; + Oe(Ve, (ye) => { + "allianceName" in x(Ot) && + x(Ot).allianceName && + ye(ut); + }); + } + k(ue), k(Ir), k(_r); + var Ke = j(_r), + kt = A(Ke, !0); + k(Ke), + k(cr), + We( + (ye, Bt, rr) => { + (Vr = zr(cr, 1, "", null, Vr, ye)), + de(hr, x(Nt) + 1), + zr( + V, + 1, + `font-semibold max-sm:ml-2 ${ + Bt ?? "" + } flex gap-1` + ), + de(U, `${x(Ot).name ?? ""} `), + de(ie, `#${x(Ot).id ?? ""}`), + de(kt, rr); + }, + [ + () => ({ "bg-base-200": x(or) }), + () => Oi(x(Ot).id), + () => + x(Ot).pixelsPainted.toLocaleString( + "en-US" + ), + ] + ), + ll( + cr, + () => cl, + () => ({ duration: 200 }) + ), + $(Qt, cr); + } + ), + k(tr), + k(yt), + We( + (Qt, Ot, Nt) => { + de(_t, Qt), + de(Rt, `${Ot ?? ""} `), + de($t, Nt); + }, + [ + () => Dm(), + () => vc(), + () => yc().toLowerCase(), + ] + ), + $(at, yt); + }, + Dt = (at) => { + var dt = er(), + yt = Ct(dt); + { + var xt = (St) => { + var wt = bE(), + _t = A(wt), + Lt = A(_t), + Rt = j(A(Lt)), + $t = A(Rt, !0); + k(Rt); + var tr = j(Rt), + Qt = A(tr), + Ot = j(Qt, 2, !0); + k(tr), k(Lt), k(_t); + var Nt = j(_t); + hi( + Nt, + 31, + () => x(X), + (or) => or.id, + (or, cr, Vr) => { + const mr = ft(() => { + var pe; + return ( + ((pe = Mt.data) == null + ? void 0 + : pe.allianceId) === x(cr).id + ); + }); + var hr = xE(); + let _r; + var Ir = A(hr), + qr = A(Ir, !0); + k(Ir); + var ue = j(Ir), + V = A(ue), + U = A(V, !0); + k(V), k(ue); + var Y = j(ue), + ie = A(Y, !0); + k(Y), + k(hr), + We( + (pe, Se, Me) => { + (_r = zr( + hr, + 1, + "", + null, + _r, + pe + )), + de(qr, x(Vr) + 1), + zr( + V, + 1, + `font-semibold ${Se ?? ""}` + ), + de(U, x(cr).name), + de(ie, Me); + }, + [ + () => ({ "bg-base-200": x(mr) }), + () => Oi(x(cr).id), + () => + x( + cr + ).pixelsPainted.toLocaleString( + "en-US" + ), + ] + ), + ll( + hr, + () => cl, + () => ({ duration: 200 }) + ), + $(or, hr); + } + ), + k(Nt), + k(wt), + We( + (or, cr, Vr) => { + de($t, or), + de(Qt, `${cr ?? ""} `), + de(Ot, Vr); + }, + [ + () => _p(), + () => vc(), + () => yc().toLowerCase(), + ] + ), + $(St, wt); + }; + Oe( + yt, + (St) => { + x(s) === "alliances" && St(xt); + }, + !0 + ); + } + $(at, dt); + }; + Oe( + ct, + (at) => { + x(s) === "players" ? at(It) : at(Dt, !1); + }, + !0 + ); + } + $(pt, it); + }; + Oe( + oe, + (pt) => { + x(s) === "countries" ? pt(ze) : pt(je, !1); + }, + !0 + ); + } + $(re, he); + }; + Oe(ke, (re) => { + x(s) === "regions" ? re(vt) : re(ee, !1); + }); + } + $(nt, Ue); + }, + et = (nt) => { + var Ue = wE(); + $(nt, Ue); + }; + Oe( + Qe, + (nt) => { + x(X) ? nt(Le) : nt(et, !1); + }, + !0 + ); + } + $(qe, Ze); + }; + Oe(Fe, (qe) => { + x(X) && x(X).length === 0 ? qe($e) : qe(Je, !1); + }); + } + mp("innerWidth", (qe) => se(y, qe, !0)), $(m, ne), Dr(); +} +$n(["click"]); +var SE = Pr( + '' +); +function I0(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = SE(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var PE = Te( + ' ' +); +function IE(m, a) { + Lr(a, !0); + let p = zt(a, "open", 15); + Fn(() => { + const K = (ne) => { + ne.key === "Escape" && p(!1); + }; + return ( + document.addEventListener("keydown", K), + () => document.removeEventListener("keydown", K) + ); + }); + var y = PE(), + M = A(y), + z = j(A(M), 2), + T = A(z); + I0(T, { class: "size-6" }); + var s = j(T, 2), + B = A(s, !0); + k(s), k(z); + var O = j(z, 2), + X = A(O); + CE(X, { + get onvisitclick() { + return a.onvisitclick; + }, + get open() { + return p(); + }, + }), + k(O), + k(M), + yn(2), + k(y), + Ni(y, () => (K) => { + Wr(() => { + p() ? K.show() : K.close(); + }); + }), + We((K) => de(B, K), [() => Bm()]), + di("close", y, () => p(!1)), + $(m, y), + Dr(); +} +var ME = Te("
                  "), + kE = Te( + ' ' + ); +function AE(m, a) { + Lr(a, !0); + let p = zt(a, "open", 15); + Fn(() => { + const s = (B) => { + B.key === "Escape" && p(!1); + }; + return ( + document.addEventListener("keydown", s), + () => document.removeEventListener("keydown", s) + ); + }); + var y = kE(), + M = A(y), + z = j(A(M), 2); + { + var T = (s) => { + var B = ME(), + O = A(B); + jx(O, {}), + k(B), + Ai( + 2, + B, + () => ia, + () => ({ duration: 300 }) + ), + $(s, B); + }; + Oe(z, (s) => { + p() && s(T); + }); + } + k(M), + yn(2), + k(y), + Ni(y, () => (s) => { + Wr(() => { + p() ? s.show() : s.close(); + }); + }), + di("close", y, () => p(!1)), + $(m, y), + Dr(); +} +var EE = (m, a, p) => { + localStorage.setItem(x(a), "true"), se(p, !1); + }, + zE = Te( + 'new' + ), + LE = Te("
                  "); +function jf(m, a) { + Lr(a, !0); + let p = st(!1); + const y = ft(() => "showed:" + a.key); + Fn(() => { + se(p, !localStorage.getItem(x(y))); + }); + var M = LE(); + M.__click = [EE, y, p]; + var z = A(M); + { + var T = (B) => { + var O = zE(); + Ai( + 3, + O, + () => ia, + () => ({ duration: 200 }) + ), + $(B, O); + }; + Oe(z, (B) => { + x(p) && B(T); + }); + } + var s = j(z, 2); + oi(s, () => a.children), + k(M), + We(() => zr(M, 1, `indicator ${a.class ?? ""}`)), + $(m, M), + Dr(); +} +$n(["click"]); +var DE = Te("

                  You don't have charges to paint.

                  "); +function RE(m, a) { + Lr(a, !1), Nv(); + var p = DE(), + y = j(A(p), 2); + k(p), + We( + (M) => de(y, ` Next charge in ${M ?? ""}`), + [() => rp(Mt.cooldown ?? 0)] + ), + $(m, p), + Dr(); +} +var BE = Te(""); +function M0(m, a) { + Lr(a, !0); + let p = zt(a, "width", 15, 0), + y = nr(a, [ + "$$slots", + "$$events", + "$$legacy", + "value", + "fontSize", + "color", + "weight", + "mono", + "width", + ]), + M = ft(() => Math.ceil(a.fontSize)), + z = st(null); + const T = window.devicePixelRatio ?? 1, + s = + '"Geist", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"', + B = + '"Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'; + Wr(() => { + const X = x(z).getContext("2d"); + (X.textBaseline = "top"), + (X.font = `${a.weight ?? "normal"} ${a.fontSize}px ${a.mono ? B : s}`), + (X.fillStyle = a.color ?? "#394e6a"), + X.setTransform(T, 0, 0, T, 0, 0), + X.clearRect(0, 0, p(), x(M)), + X.fillText(a.value, 0, 0); + const K = X.measureText(a.value); + p(Math.ceil(K.actualBoundingBoxRight)), se(M, K.actualBoundingBoxDescent); + }); + var O = BE(); + ar(O, () => ({ + width: p() * T, + height: x(M) * T, + style: `width: ${p() ?? ""}px; height: ${x(M) ?? ""}px`, + ...y, + })), + Ko( + O, + (X) => se(z, X), + () => x(z) + ), + $(m, O), + Dr(); +} +var FE = Te(' '), + OE = Te( + ' ' + ), + NE = Te( + '' + ), + jE = Te( + '' + ); +function k0(m, a) { + Lr(a, !0); + let p = nr(a, ["$$slots", "$$events", "$$legacy", "loading", "charges"]), + y = st(0); + var M = jE(); + ar(M, () => ({ + ...p, + class: `btn btn-primary btn-lg sm:btn-xl relative ${a.class ?? ""}`, + })); + var z = A(M); + zh(z, { class: "size-6" }); + var T = j(z, 2), + s = A(T), + B = j(s); + { + var O = (ne) => { + const H = ft(() => `${Math.floor(a.charges)}/${Mt.data.charges.max}`); + var fe = OE(), + ge = A(fe), + Ie = A(ge); + { + let Ee = ft(() => (a.disabled ? "#394e6a33" : "#ffffff")); + M0(Ie, { + weight: 600, + fontSize: 16, + get value() { + return x(H); + }, + get color() { + return x(Ee); + }, + get width() { + return x(y); + }, + set width(Fe) { + se(y, Fe, !0); + }, + }); + } + k(ge); + var Ae = j(ge, 2); + { + var De = (Ee) => { + var Fe = FE(), + $e = A(Fe); + k(Fe), + We((Je) => de($e, `(${Je ?? ""})`), [() => rp(Mt.cooldown)]), + $(Ee, Fe); + }; + Oe(Ae, (Ee) => { + a.charges < Mt.data.charges.max && Mt.cooldown !== void 0 && Ee(De); + }); + } + k(fe), + We( + (Ee) => kc(ge, `width: ${Ee ?? ""}px`), + [() => (Math.floor(x(y) / 5) + 1) * 5] + ), + $(ne, fe); + }; + Oe(B, (ne) => { + a.charges !== void 0 && Mt.data && ne(O); + }); + } + k(T); + var X = j(T, 2); + { + var K = (ne) => { + var H = NE(); + $(ne, H); + }; + Oe(X, (ne) => { + a.loading && ne(K); + }); + } + k(M), We((ne) => de(s, `${ne ?? ""} `), [() => Gv()]), $(m, M), Dr(); +} +const VE = + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAABVQTFRFAAAASkKEenHEta7xWmmLi5y0v8vc+SuCVQAAAAF0Uk5TAEDm2GYAAAA/SURBVHjaXcjBDcAwDMNAUW28/8hF0MCIzN9RV7aVfuxp+IGPe+AdPQRpFaRrgcNrn/Bb4LAE4W5aNb3TXUofoSgBYpzN5I4AAAAASUVORK5CYII=", + qE = + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAFxJREFUeNq107EJACAMRFEHyxSu4jbuZ+0IyhUS4ZDogYEr3++Svp+ZDUzGrRTMIwKmiIApImCKiBgbOXOEcRxQsQcW7rVKeA9gj5gD2D3mgC/GcQSLMEdO+/qtE+/GV5duYCOPAAAAAElFTkSuQmCC", + ZE = + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAAXNSR0IArs4c6QAAAAJ0Uk5TAAB2k804AAAAKklEQVR42mOAAhsbCA3n//9vQ74ApqE2QIAgwIqBykFaICwMAQwt9HEpAIf2Me1Ro5Q9AAAAAElFTkSuQmCC", + UE = + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAAXNSR0IArs4c6QAAABVJREFUeNpjYGA48x8DYwoB1Q0RlQDDCVmniJ241gAAAABJRU5ErkJggg=="; +class $E { + constructor(a) { + xr(this, "gm"); + xr(this, "opacity", 1); + xr(this, "id", `paint-preview-${Math.random()}`); + xr(this, "tiles", new Map()); + (this.input = a), (this.gm = new fl(this.input.tileSize)); + } + place([a, p], y) { + const { tile: M, pixel: z } = this.gm.latLonToTileAndPixel( + a, + p, + this.input.tileZoom + ), + T = this.getTileKey(M[0], M[1]); + let s = this.tiles.get(T); + if (!s) { + const B = this.gm.tileBoundsLatLon(M[0], M[1], this.input.tileZoom), + O = Vm(B, !0), + X = new GE({ + coordinates: O, + id: `${this.id}-${T}`, + layerPaint: { + "raster-opacity": this.opacity, + "raster-resampling": "nearest", + }, + tileSize: this.input.tileSize, + beforeLayerId: this.input.beforeLayerId, + }); + X.addTo(this.input.map), this.tiles.set(T, X), (s = X); + } + s.place(z[0], this.input.tileSize - z[1] - 1, y); + } + clear() { + const a = this.input.map; + for (const p of this.tiles.values()) p.removeFrom(a), p.removeDOM(); + this.tiles.clear(); + } + clearAndPlace(a, p) { + this.clear(), this.place(a, p); + } + remove([a, p]) { + const { tile: y, pixel: M } = this.gm.latLonToTileAndPixel( + a, + p, + this.input.tileZoom + ), + z = this.getTileKey(y[0], y[1]), + T = this.tiles.get(z); + T && T.remove(M[0], this.input.tileSize - M[1] - 1); + } + setCanvasOpacity(a) { + this.opacity = a; + for (const p of this.tiles.values()) p.setOpacity(a); + } + getTileKey(a, p) { + return `${a},${p}`; + } +} +class GE { + constructor(a) { + xr(this, "canvas"); + xr(this, "maps", new Set()); + this.input = a; + const p = this.input.tileSize; + (this.canvas = document.createElement("canvas")), + (this.canvas.width = p), + (this.canvas.height = p); + } + place(a, p, y) { + var T; + const M = ((T = Wi.colors) == null ? void 0 : T[y]) ?? Wi.colors[0], + z = this.canvas.getContext("2d"); + if (z) { + const s = z.createImageData(1, 1), + [B, O, X] = M.rgb, + K = y === 0 ? 0 : 255; + (s.data[0] = B), + (s.data[1] = O), + (s.data[2] = X), + (s.data[3] = K), + z.putImageData(s, a, p); + } + } + remove(a, p) { + const y = this.canvas.getContext("2d"); + y && y.clearRect(a, p, 1, 1); + } + addTo(a) { + const p = this.input.id; + a.getSource(p) || + a.addSource(p, { + type: "canvas", + canvas: this.canvas, + coordinates: this.input.coordinates, + }), + a.getLayer(p) || + (a.addLayer({ + id: p, + type: "raster", + source: p, + paint: this.input.layerPaint, + }), + this.input.beforeLayerId && a.moveLayer(p, this.input.beforeLayerId)), + this.maps.add(a); + } + removeFrom(a) { + const { id: p } = this.input; + a.getLayer(p) && a.removeLayer(p), + a.getSource(p) && a.removeSource(p), + this.maps.delete(a); + } + removeDOM() { + this.canvas.remove(); + } + setOpacity(a) { + for (const p of this.maps.values()) + p.setPaintProperty(this.input.id, "raster-opacity", a); + } +} +var HE = Pr( + '' +); +function WE(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = HE(); + ar(y, () => ({ + viewBox: "0 0 24 24", + fill: "currentColor", + xmlns: "http://www.w3.org/2000/svg", + ...p, + })), + $(m, y); +} +var XE = Pr( + '' +); +function YE(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = XE(); + ar(y, () => ({ + viewBox: "0 0 24 24", + fill: "currentColor", + xmlns: "http://www.w3.org/2000/svg", + ...p, + })), + $(m, y); +} +var KE = Te("
                  "); +function ol(m, a) { + Lr(a, !0); + var p = KE(), + y = A(p); + oi(y, () => a.children ?? pa), + k(p), + We(() => + zr( + p, + 1, + `bg-base-100/60 border-base-content/20 -top-15 pointer-events-none absolute left-1/2 line-clamp-1 flex w-max -translate-x-1/2 select-none items-center gap-1 rounded-full border-2 px-3 py-1.5 ${ + a.class ?? "" + }` + ) + ), + $(m, p), + Dr(); +} +var JE = Te('
                  '), + QE = Te("
                  "); +function Xm(m, a) { + Lr(a, !0); + const p = zt(a, "size", 3, 10), + y = zt(a, "x", 19, () => [-0.5, 0.5]), + M = zt(a, "y", 19, () => [0.25, 1]), + z = zt(a, "duration", 3, 2e3), + T = zt(a, "infinite", 3, !1), + s = zt(a, "delay", 19, () => [0, 50]), + B = zt(a, "colorRange", 19, () => [0, 360]), + O = zt(a, "colorArray", 19, () => []), + X = zt(a, "amount", 3, 50), + K = zt(a, "iterationCount", 3, 1), + ne = zt(a, "fallDistance", 3, "100px"), + H = zt(a, "rounded", 3, !1), + fe = zt(a, "cone", 3, !1), + ge = zt(a, "noGravity", 3, !1), + Ie = zt(a, "xSpread", 3, 0.15), + Ae = zt(a, "destroyOnComplete", 3, !0), + De = zt(a, "disableForReducedMotion", 3, !1); + let Ee = st(!1); + Fn(() => { + !Ae() || + T() || + typeof K() == "string" || + setTimeout(() => se(Ee, !0), (z() + s()[1]) * K()); + }); + function Fe(Qe, Le) { + return Math.random() * (Le - Qe) + Qe; + } + function $e() { + return O().length + ? O()[Math.round(Math.random() * (O().length - 1))] + : `hsl(${Math.round(Fe(B()[0], B()[1]))}, 75%, 50%)`; + } + var Je = er(), + qe = Ct(Je); + { + var Ze = (Qe) => { + var Le = QE(); + let et; + hi( + Le, + 21, + () => ({ length: X() }), + hp, + (nt, Ue) => { + var ke = JE(); + We( + (vt, ee, re, he, oe, ze, je, pt, it, ct, It) => + kc( + ke, + ` + --color: ${vt ?? ""}; + --skew: ${ee ?? ""}deg,${re ?? ""}deg; + --rotation-xyz: ${he ?? ""}, ${oe ?? ""}, ${ze ?? ""}; + --rotation-deg: ${je ?? ""}deg; + --translate-y-multiplier: ${pt ?? ""}; + --translate-x-multiplier: ${it ?? ""}; + --scale: ${ct ?? ""}; + --transition-delay: ${It ?? ""}ms; + --transition-duration: ${ + T() ? `calc(${z()}ms * var(--scale))` : `${z()}ms` + };` + ), + [ + $e, + () => Fe(-45, 45), + () => Fe(-45, 45), + () => Fe(-10, 10), + () => Fe(-10, 10), + () => Fe(-10, 10), + () => Fe(0, 360), + () => Fe(M()[0], M()[1]), + () => Fe(y()[0], y()[1]), + () => 0.1 * Fe(2, 10), + () => Fe(s()[0], s()[1]), + ] + ), + $(nt, ke); + } + ), + k(Le), + We( + (nt) => { + (et = zr(Le, 1, "confetti-holder svelte-15ksp55", null, et, nt)), + kc( + Le, + ` + --fall-distance: ${ne() ?? ""}; + --size: ${p() ?? ""}px; + --x-spread: ${1 - Ie()}; + --transition-iteration-count: ${(T() ? "infinite" : K()) ?? ""};` + ); + }, + [ + () => ({ + rounded: H(), + cone: fe(), + "no-gravity": ge(), + "reduced-motion": De(), + }), + ] + ), + $(Qe, Le); + }; + Oe(qe, (Qe) => { + x(Ee) || Qe(Ze); + }); + } + $(m, Je), Dr(); +} +var e8 = async (m, a, p, y) => { + try { + se(a, !0), + await Qr.purchase({ id: p, amount: 1, variant: y.colorIdx }), + await Mt.refresh(), + aa.notification1.play(); + } catch (M) { + Fr.error(M.message); + } finally { + se(a, !1); + } + }, + t8 = Te( + '' + ), + r8 = Te(' Droplets', 1), + n8 = Te(' Unlocked ', 1), + i8 = (m, a) => a(!1), + a8 = Te( + '

                  Unlock

                  Permanently unlock the color

                  ' + ), + o8 = Te( + ' ' + ); +function s8(m, a) { + Lr(a, !0); + let p = zt(a, "open", 15); + const y = ft(() => Wi.colors[a.colorIdx]), + M = ft(() => { + var H; + return ((H = Mt.data) == null ? void 0 : H.droplets) ?? 0; + }); + let z = st(!1); + const T = ft(() => (x(z), Mt.hasColor(a.colorIdx))); + Fn(() => { + const H = (fe) => { + fe.key === "Escape" && p(!1); + }; + return ( + document.addEventListener("keydown", H), + () => document.removeEventListener("keydown", H) + ); + }); + const s = 100, + B = Wi.products[s]; + var O = o8(), + X = A(O), + K = j(A(X), 2); + { + var ne = (H) => { + var fe = a8(), + ge = A(fe), + Ie = A(ge), + Ae = A(Ie); + np(Ae, { class: "size-6" }); + var De = j(Ae, 4), + Ee = A(De); + Fv(Ee, { + get value() { + return x(M); + }, + }), + k(De), + k(Ie), + yn(2), + k(ge); + var Fe = j(ge, 2), + $e = A(Fe), + Je = A($e); + k($e); + var qe = j($e, 2), + Ze = A(qe, !0); + k(qe); + var Qe = j(qe, 2), + Le = A(Qe); + let et; + var nt = A(Le); + nt.__click = [e8, z, s, a]; + var Ue = A(nt); + { + var ke = (oe) => { + var ze = t8(); + $(oe, ze); + }; + Oe(Ue, (oe) => { + x(z) && oe(ke); + }); + } + var vt = j(Ue, 2); + { + var ee = (oe) => { + var ze = r8(), + je = Ct(ze); + fp(je, { class: "size-5" }); + var pt = j(je); + yn(), + We( + (it) => de(pt, ` ${it ?? ""} `), + [() => B.price.toLocaleString("en-US")] + ), + $(oe, ze); + }, + re = (oe) => { + var ze = n8(), + je = Ct(ze); + np(je, { class: "size-5" }); + var pt = j(je, 2), + it = A(pt); + Xm(it, {}), k(pt), $(oe, ze); + }; + Oe(vt, (oe) => { + x(T) ? oe(re, !1) : oe(ee); + }); + } + k(nt), k(Le); + var he = j(Le, 2); + (he.__click = [i8, p]), + k(Qe), + k(Fe), + k(fe), + We( + (oe, ze) => { + kc( + Je, + `background: rgb(${x(y).rgb[0]} ${x(y).rgb[1]} ${x(y).rgb[2]})` + ), + Tr(Je, "aria-label", x(y).name), + de(Ze, x(y).name), + Tr(Le, "data-tip", oe), + (et = zr(Le, 1, "", null, et, ze)), + (nt.disabled = x(M) < B.price || x(z) || x(T)); + }, + [() => gp(), () => ({ tooltip: !x(T) && x(M) < B.price })] + ), + $(H, fe); + }; + Oe(K, (H) => { + Mt.data && H(ne); + }); + } + k(X), + yn(2), + k(O), + Ni(O, () => (H) => { + Wr(() => { + p() ? H.show() : H.close(); + }); + }), + di("close", O, () => p(!1)), + $(m, O), + Dr(); +} +$n(["click"]); +var Tm = function () { + return ( + (Tm = + Object.assign || + function (a) { + for (var p, y = 1, M = arguments.length; y < M; y++) { + p = arguments[y]; + for (var z in p) + Object.prototype.hasOwnProperty.call(p, z) && (a[z] = p[z]); + } + return a; + }), + Tm.apply(this, arguments) + ); +}; +function Po(m, a, p, y) { + function M(z) { + return z instanceof p + ? z + : new p(function (T) { + T(z); + }); + } + return new (p || (p = Promise))(function (z, T) { + function s(X) { + try { + O(y.next(X)); + } catch (K) { + T(K); + } + } + function B(X) { + try { + O(y.throw(X)); + } catch (K) { + T(K); + } + } + function O(X) { + X.done ? z(X.value) : M(X.value).then(s, B); + } + O((y = y.apply(m, a || [])).next()); + }); +} +function Io(m, a) { + var p = { + label: 0, + sent: function () { + if (z[0] & 1) throw z[1]; + return z[1]; + }, + trys: [], + ops: [], + }, + y, + M, + z, + T = Object.create( + (typeof Iterator == "function" ? Iterator : Object).prototype + ); + return ( + (T.next = s(0)), + (T.throw = s(1)), + (T.return = s(2)), + typeof Symbol == "function" && + (T[Symbol.iterator] = function () { + return this; + }), + T + ); + function s(O) { + return function (X) { + return B([O, X]); + }; + } + function B(O) { + if (y) throw new TypeError("Generator is already executing."); + for (; T && ((T = 0), O[0] && (p = 0)), p; ) + try { + if ( + ((y = 1), + M && + (z = + O[0] & 2 + ? M.return + : O[0] + ? M.throw || ((z = M.return) && z.call(M), 0) + : M.next) && + !(z = z.call(M, O[1])).done) + ) + return z; + switch (((M = 0), z && (O = [O[0] & 2, z.value]), O[0])) { + case 0: + case 1: + z = O; + break; + case 4: + return p.label++, { value: O[1], done: !1 }; + case 5: + p.label++, (M = O[1]), (O = [0]); + continue; + case 7: + (O = p.ops.pop()), p.trys.pop(); + continue; + default: + if ( + ((z = p.trys), + !(z = z.length > 0 && z[z.length - 1]) && + (O[0] === 6 || O[0] === 2)) + ) { + p = 0; + continue; + } + if (O[0] === 3 && (!z || (O[1] > z[0] && O[1] < z[3]))) { + p.label = O[1]; + break; + } + if (O[0] === 6 && p.label < z[1]) { + (p.label = z[1]), (z = O); + break; + } + if (z && p.label < z[2]) { + (p.label = z[2]), p.ops.push(O); + break; + } + z[2] && p.ops.pop(), p.trys.pop(); + continue; + } + O = a.call(m, p); + } catch (X) { + (O = [6, X]), (M = 0); + } finally { + y = z = 0; + } + if (O[0] & 5) throw O[1]; + return { value: O[0] ? O[1] : void 0, done: !0 }; + } +} +function A0(m, a, p) { + if (p || arguments.length === 2) + for (var y = 0, M = a.length, z; y < M; y++) + (z || !(y in a)) && + (z || (z = Array.prototype.slice.call(a, 0, y)), (z[y] = a[y])); + return m.concat(z || Array.prototype.slice.call(a)); +} +var E0 = "4.6.2"; +function ip(m, a) { + return new Promise(function (p) { + return setTimeout(p, m, a); + }); +} +function l8() { + return new Promise(function (m) { + var a = new MessageChannel(); + (a.port1.onmessage = function () { + return m(); + }), + a.port2.postMessage(null); + }); +} +function c8(m, a) { + a === void 0 && (a = 1 / 0); + var p = window.requestIdleCallback; + return p + ? new Promise(function (y) { + return p.call( + window, + function () { + return y(); + }, + { timeout: a } + ); + }) + : ip(Math.min(m, a)); +} +function z0(m) { + return !!m && typeof m.then == "function"; +} +function cv(m, a) { + try { + var p = m(); + z0(p) + ? p.then( + function (y) { + return a(!0, y); + }, + function (y) { + return a(!1, y); + } + ) + : a(!0, p); + } catch (y) { + a(!1, y); + } +} +function uv(m, a, p) { + return ( + p === void 0 && (p = 16), + Po(this, void 0, void 0, function () { + var y, M, z, T; + return Io(this, function (s) { + switch (s.label) { + case 0: + (y = Array(m.length)), (M = Date.now()), (z = 0), (s.label = 1); + case 1: + return z < m.length + ? ((y[z] = a(m[z], z)), + (T = Date.now()), + T >= M + p ? ((M = T), [4, l8()]) : [3, 3]) + : [3, 4]; + case 2: + s.sent(), (s.label = 3); + case 3: + return ++z, [3, 1]; + case 4: + return [2, y]; + } + }); + }) + ); +} +function $u(m) { + return m.then(void 0, function () {}), m; +} +function u8(m, a) { + for (var p = 0, y = m.length; p < y; ++p) if (m[p] === a) return !0; + return !1; +} +function h8(m, a) { + return !u8(m, a); +} +function Ym(m) { + return parseInt(m); +} +function lo(m) { + return parseFloat(m); +} +function Go(m, a) { + return typeof m == "number" && isNaN(m) ? a : m; +} +function fa(m) { + return m.reduce(function (a, p) { + return a + (p ? 1 : 0); + }, 0); +} +function L0(m, a) { + if ((a === void 0 && (a = 1), Math.abs(a) >= 1)) return Math.round(m / a) * a; + var p = 1 / a; + return Math.round(m * p) / p; +} +function d8(m) { + for ( + var a, + p, + y = "Unexpected syntax '".concat(m, "'"), + M = /^\s*([a-z-]*)(.*)$/i.exec(m), + z = M[1] || void 0, + T = {}, + s = /([.:#][\w-]+|\[.+?\])/gi, + B = function (ne, H) { + (T[ne] = T[ne] || []), T[ne].push(H); + }; + ; + + ) { + var O = s.exec(M[2]); + if (!O) break; + var X = O[0]; + switch (X[0]) { + case ".": + B("class", X.slice(1)); + break; + case "#": + B("id", X.slice(1)); + break; + case "[": { + var K = /^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec( + X + ); + if (K) + B( + K[1], + (p = (a = K[4]) !== null && a !== void 0 ? a : K[5]) !== null && + p !== void 0 + ? p + : "" + ); + else throw new Error(y); + break; + } + default: + throw new Error(y); + } + } + return [z, T]; +} +function p8(m) { + for (var a = new Uint8Array(m.length), p = 0; p < m.length; p++) { + var y = m.charCodeAt(p); + if (y > 127) return new TextEncoder().encode(m); + a[p] = y; + } + return a; +} +function bs(m, a) { + var p = m[0] >>> 16, + y = m[0] & 65535, + M = m[1] >>> 16, + z = m[1] & 65535, + T = a[0] >>> 16, + s = a[0] & 65535, + B = a[1] >>> 16, + O = a[1] & 65535, + X = 0, + K = 0, + ne = 0, + H = 0; + (H += z + O), + (ne += H >>> 16), + (H &= 65535), + (ne += M + B), + (K += ne >>> 16), + (ne &= 65535), + (K += y + s), + (X += K >>> 16), + (K &= 65535), + (X += p + T), + (X &= 65535), + (m[0] = (X << 16) | K), + (m[1] = (ne << 16) | H); +} +function Ga(m, a) { + var p = m[0] >>> 16, + y = m[0] & 65535, + M = m[1] >>> 16, + z = m[1] & 65535, + T = a[0] >>> 16, + s = a[0] & 65535, + B = a[1] >>> 16, + O = a[1] & 65535, + X = 0, + K = 0, + ne = 0, + H = 0; + (H += z * O), + (ne += H >>> 16), + (H &= 65535), + (ne += M * O), + (K += ne >>> 16), + (ne &= 65535), + (ne += z * B), + (K += ne >>> 16), + (ne &= 65535), + (K += y * O), + (X += K >>> 16), + (K &= 65535), + (K += M * B), + (X += K >>> 16), + (K &= 65535), + (K += z * s), + (X += K >>> 16), + (K &= 65535), + (X += p * O + y * B + M * s + z * T), + (X &= 65535), + (m[0] = (X << 16) | K), + (m[1] = (ne << 16) | H); +} +function fc(m, a) { + var p = m[0]; + (a %= 64), + a === 32 + ? ((m[0] = m[1]), (m[1] = p)) + : a < 32 + ? ((m[0] = (p << a) | (m[1] >>> (32 - a))), + (m[1] = (m[1] << a) | (p >>> (32 - a)))) + : ((a -= 32), + (m[0] = (m[1] << a) | (p >>> (32 - a))), + (m[1] = (p << a) | (m[1] >>> (32 - a)))); +} +function Na(m, a) { + (a %= 64), + a !== 0 && + (a < 32 + ? ((m[0] = m[1] >>> (32 - a)), (m[1] = m[1] << a)) + : ((m[0] = m[1] << (a - 32)), (m[1] = 0))); +} +function ri(m, a) { + (m[0] ^= a[0]), (m[1] ^= a[1]); +} +var f8 = [4283543511, 3981806797], + m8 = [3301882366, 444984403]; +function hv(m) { + var a = [0, m[0] >>> 1]; + ri(m, a), + Ga(m, f8), + (a[1] = m[0] >>> 1), + ri(m, a), + Ga(m, m8), + (a[1] = m[0] >>> 1), + ri(m, a); +} +var $d = [2277735313, 289559509], + Gd = [1291169091, 658871167], + dv = [0, 5], + _8 = [0, 1390208809], + g8 = [0, 944331445]; +function v8(m, a) { + var p = p8(m); + a = a || 0; + var y = [0, p.length], + M = y[1] % 16, + z = y[1] - M, + T = [0, a], + s = [0, a], + B = [0, 0], + O = [0, 0], + X; + for (X = 0; X < z; X = X + 16) + (B[0] = p[X + 4] | (p[X + 5] << 8) | (p[X + 6] << 16) | (p[X + 7] << 24)), + (B[1] = p[X] | (p[X + 1] << 8) | (p[X + 2] << 16) | (p[X + 3] << 24)), + (O[0] = + p[X + 12] | (p[X + 13] << 8) | (p[X + 14] << 16) | (p[X + 15] << 24)), + (O[1] = + p[X + 8] | (p[X + 9] << 8) | (p[X + 10] << 16) | (p[X + 11] << 24)), + Ga(B, $d), + fc(B, 31), + Ga(B, Gd), + ri(T, B), + fc(T, 27), + bs(T, s), + Ga(T, dv), + bs(T, _8), + Ga(O, Gd), + fc(O, 33), + Ga(O, $d), + ri(s, O), + fc(s, 31), + bs(s, T), + Ga(s, dv), + bs(s, g8); + (B[0] = 0), (B[1] = 0), (O[0] = 0), (O[1] = 0); + var K = [0, 0]; + switch (M) { + case 15: + (K[1] = p[X + 14]), Na(K, 48), ri(O, K); + case 14: + (K[1] = p[X + 13]), Na(K, 40), ri(O, K); + case 13: + (K[1] = p[X + 12]), Na(K, 32), ri(O, K); + case 12: + (K[1] = p[X + 11]), Na(K, 24), ri(O, K); + case 11: + (K[1] = p[X + 10]), Na(K, 16), ri(O, K); + case 10: + (K[1] = p[X + 9]), Na(K, 8), ri(O, K); + case 9: + (K[1] = p[X + 8]), ri(O, K), Ga(O, Gd), fc(O, 33), Ga(O, $d), ri(s, O); + case 8: + (K[1] = p[X + 7]), Na(K, 56), ri(B, K); + case 7: + (K[1] = p[X + 6]), Na(K, 48), ri(B, K); + case 6: + (K[1] = p[X + 5]), Na(K, 40), ri(B, K); + case 5: + (K[1] = p[X + 4]), Na(K, 32), ri(B, K); + case 4: + (K[1] = p[X + 3]), Na(K, 24), ri(B, K); + case 3: + (K[1] = p[X + 2]), Na(K, 16), ri(B, K); + case 2: + (K[1] = p[X + 1]), Na(K, 8), ri(B, K); + case 1: + (K[1] = p[X]), ri(B, K), Ga(B, $d), fc(B, 31), Ga(B, Gd), ri(T, B); + } + return ( + ri(T, y), + ri(s, y), + bs(T, s), + bs(s, T), + hv(T), + hv(s), + bs(T, s), + bs(s, T), + ("00000000" + (T[0] >>> 0).toString(16)).slice(-8) + + ("00000000" + (T[1] >>> 0).toString(16)).slice(-8) + + ("00000000" + (s[0] >>> 0).toString(16)).slice(-8) + + ("00000000" + (s[1] >>> 0).toString(16)).slice(-8) + ); +} +function y8(m) { + var a; + return Tm( + { + name: m.name, + message: m.message, + stack: + (a = m.stack) === null || a === void 0 + ? void 0 + : a.split(` +`), + }, + m + ); +} +function x8(m) { + return /^function\s.*?\{\s*\[native code]\s*}$/.test(String(m)); +} +function b8(m) { + return typeof m != "function"; +} +function w8(m, a) { + var p = $u( + new Promise(function (y) { + var M = Date.now(); + cv(m.bind(null, a), function () { + for (var z = [], T = 0; T < arguments.length; T++) z[T] = arguments[T]; + var s = Date.now() - M; + if (!z[0]) + return y(function () { + return { error: z[1], duration: s }; + }); + var B = z[1]; + if (b8(B)) + return y(function () { + return { value: B, duration: s }; + }); + y(function () { + return new Promise(function (O) { + var X = Date.now(); + cv(B, function () { + for (var K = [], ne = 0; ne < arguments.length; ne++) + K[ne] = arguments[ne]; + var H = s + Date.now() - X; + if (!K[0]) return O({ error: K[1], duration: H }); + O({ value: K[1], duration: H }); + }); + }); + }); + }); + }) + ); + return function () { + return p.then(function (M) { + return M(); + }); + }; +} +function T8(m, a, p, y) { + var M = Object.keys(m).filter(function (T) { + return h8(p, T); + }), + z = $u( + uv( + M, + function (T) { + return w8(m[T], a); + }, + y + ) + ); + return function () { + return Po(this, void 0, void 0, function () { + var s, B, O, X, K; + return Io(this, function (ne) { + switch (ne.label) { + case 0: + return [4, z]; + case 1: + return ( + (s = ne.sent()), + [ + 4, + uv( + s, + function (H) { + return $u(H()); + }, + y + ), + ] + ); + case 2: + return (B = ne.sent()), [4, Promise.all(B)]; + case 3: + for (O = ne.sent(), X = {}, K = 0; K < M.length; ++K) + X[M[K]] = O[K]; + return [2, X]; + } + }); + }); + }; +} +function D0() { + var m = window, + a = navigator; + return ( + fa([ + "MSCSSMatrix" in m, + "msSetImmediate" in m, + "msIndexedDB" in m, + "msMaxTouchPoints" in a, + "msPointerEnabled" in a, + ]) >= 4 + ); +} +function C8() { + var m = window, + a = navigator; + return ( + fa([ + "msWriteProfilerMark" in m, + "MSStream" in m, + "msLaunchUri" in a, + "msSaveBlob" in a, + ]) >= 3 && !D0() + ); +} +function Dh() { + var m = window, + a = navigator; + return ( + fa([ + "webkitPersistentStorage" in a, + "webkitTemporaryStorage" in a, + (a.vendor || "").indexOf("Google") === 0, + "webkitResolveLocalFileSystemURL" in m, + "BatteryManager" in m, + "webkitMediaStream" in m, + "webkitSpeechGrammar" in m, + ]) >= 5 + ); +} +function ho() { + var m = window, + a = navigator; + return ( + fa([ + "ApplePayError" in m, + "CSSPrimitiveValue" in m, + "Counter" in m, + a.vendor.indexOf("Apple") === 0, + "RGBColor" in m, + "WebKitMediaKeys" in m, + ]) >= 4 + ); +} +function Km() { + var m = window, + a = m.HTMLElement, + p = m.Document; + return ( + fa([ + "safari" in m, + !("ongestureend" in m), + !("TouchEvent" in m), + !("orientation" in m), + a && !("autocapitalize" in a.prototype), + p && "pointerLockElement" in p.prototype, + ]) >= 4 + ); +} +function Rh() { + var m = window; + return x8(m.print) && String(m.browser) === "[object WebPageNamespace]"; +} +function R0() { + var m, + a, + p = window; + return ( + fa([ + "buildID" in navigator, + "MozAppearance" in + ((a = + (m = document.documentElement) === null || m === void 0 + ? void 0 + : m.style) !== null && a !== void 0 + ? a + : {}), + "onmozfullscreenchange" in p, + "mozInnerScreenX" in p, + "CSSMozDocumentRule" in p, + "CanvasCaptureMediaStream" in p, + ]) >= 4 + ); +} +function S8() { + var m = window; + return ( + fa([ + !("MediaSettingsRange" in m), + "RTCEncodedAudioFrame" in m, + "" + m.Intl == "[object Intl]", + "" + m.Reflect == "[object Reflect]", + ]) >= 3 + ); +} +function P8() { + var m = window, + a = m.URLPattern; + return ( + fa([ + "union" in Set.prototype, + "Iterator" in m, + a && "hasRegExpGroups" in a.prototype, + "RGB8" in WebGLRenderingContext.prototype, + ]) >= 3 + ); +} +function I8() { + var m = window; + return ( + fa([ + "DOMRectList" in m, + "RTCPeerConnectionIceEvent" in m, + "SVGGeometryElement" in m, + "ontransitioncancel" in m, + ]) >= 3 + ); +} +function Bh() { + var m = window, + a = navigator, + p = m.CSS, + y = m.HTMLButtonElement; + return ( + fa([ + !("getStorageUpdates" in a), + y && "popover" in y.prototype, + "CSSCounterStyleRule" in m, + p.supports("font-size-adjust: ex-height 0.5"), + p.supports("text-transform: full-width"), + ]) >= 4 + ); +} +function M8() { + if (navigator.platform === "iPad") return !0; + var m = screen, + a = m.width / m.height; + return ( + fa([ + "MediaSource" in window, + !!Element.prototype.webkitRequestFullscreen, + a > 0.65 && a < 1.53, + ]) >= 2 + ); +} +function k8() { + var m = document; + return ( + m.fullscreenElement || + m.msFullscreenElement || + m.mozFullScreenElement || + m.webkitFullscreenElement || + null + ); +} +function A8() { + var m = document; + return ( + m.exitFullscreen || + m.msExitFullscreen || + m.mozCancelFullScreen || + m.webkitExitFullscreen + ).call(m); +} +function Jm() { + var m = Dh(), + a = R0(), + p = window, + y = navigator, + M = "connection"; + return m + ? fa([ + !("SharedWorker" in p), + y[M] && "ontypechange" in y[M], + !("sinkId" in new Audio()), + ]) >= 2 + : a + ? fa([ + "onorientationchange" in p, + "orientation" in p, + /android/i.test(y.appVersion), + ]) >= 2 + : !1; +} +function E8() { + var m = navigator, + a = window, + p = Audio.prototype, + y = a.visualViewport; + return ( + fa([ + "srLatency" in p, + "srChannelCount" in p, + "devicePosture" in m, + y && "segments" in y, + "getTextInformation" in Image.prototype, + ]) >= 3 + ); +} +function z8() { + return R8() ? -4 : L8(); +} +function L8() { + var m = window, + a = m.OfflineAudioContext || m.webkitOfflineAudioContext; + if (!a) return -2; + if (D8()) return -1; + var p = 4500, + y = 5e3, + M = new a(1, y, 44100), + z = M.createOscillator(); + (z.type = "triangle"), (z.frequency.value = 1e4); + var T = M.createDynamicsCompressor(); + (T.threshold.value = -50), + (T.knee.value = 40), + (T.ratio.value = 12), + (T.attack.value = 0), + (T.release.value = 0.25), + z.connect(T), + T.connect(M.destination), + z.start(0); + var s = B8(M), + B = s[0], + O = s[1], + X = $u( + B.then( + function (K) { + return F8(K.getChannelData(0).subarray(p)); + }, + function (K) { + if (K.name === "timeout" || K.name === "suspended") return -3; + throw K; + } + ) + ); + return function () { + return O(), X; + }; +} +function D8() { + return ho() && !Km() && !I8(); +} +function R8() { + return (ho() && Bh() && Rh()) || (Dh() && E8() && P8()); +} +function B8(m) { + var a = 3, + p = 500, + y = 500, + M = 5e3, + z = function () {}, + T = new Promise(function (s, B) { + var O = !1, + X = 0, + K = 0; + m.oncomplete = function (fe) { + return s(fe.renderedBuffer); + }; + var ne = function () { + setTimeout(function () { + return B(pv("timeout")); + }, Math.min(y, K + M - Date.now())); + }, + H = function () { + try { + var fe = m.startRendering(); + switch ((z0(fe) && $u(fe), m.state)) { + case "running": + (K = Date.now()), O && ne(); + break; + case "suspended": + document.hidden || X++, + O && X >= a ? B(pv("suspended")) : setTimeout(H, p); + break; + } + } catch (ge) { + B(ge); + } + }; + H(), + (z = function () { + O || ((O = !0), K > 0 && ne()); + }); + }); + return [T, z]; +} +function F8(m) { + for (var a = 0, p = 0; p < m.length; ++p) a += Math.abs(m[p]); + return a; +} +function pv(m) { + var a = new Error(m); + return (a.name = m), a; +} +function B0(m, a, p) { + var y, M, z; + return ( + p === void 0 && (p = 50), + Po(this, void 0, void 0, function () { + var T, s; + return Io(this, function (B) { + switch (B.label) { + case 0: + (T = document), (B.label = 1); + case 1: + return T.body ? [3, 3] : [4, ip(p)]; + case 2: + return B.sent(), [3, 1]; + case 3: + (s = T.createElement("iframe")), (B.label = 4); + case 4: + return ( + B.trys.push([4, , 10, 11]), + [ + 4, + new Promise(function (O, X) { + var K = !1, + ne = function () { + (K = !0), O(); + }, + H = function (Ie) { + (K = !0), X(Ie); + }; + (s.onload = ne), (s.onerror = H); + var fe = s.style; + fe.setProperty("display", "block", "important"), + (fe.position = "absolute"), + (fe.top = "0"), + (fe.left = "0"), + (fe.visibility = "hidden"), + a && "srcdoc" in s + ? (s.srcdoc = a) + : (s.src = "about:blank"), + T.body.appendChild(s); + var ge = function () { + var Ie, Ae; + K || + (((Ae = + (Ie = s.contentWindow) === null || Ie === void 0 + ? void 0 + : Ie.document) === null || Ae === void 0 + ? void 0 + : Ae.readyState) === "complete" + ? ne() + : setTimeout(ge, 10)); + }; + ge(); + }), + ] + ); + case 5: + B.sent(), (B.label = 6); + case 6: + return !( + (M = + (y = s.contentWindow) === null || y === void 0 + ? void 0 + : y.document) === null || M === void 0 + ) && M.body + ? [3, 8] + : [4, ip(p)]; + case 7: + return B.sent(), [3, 6]; + case 8: + return [4, m(s, s.contentWindow)]; + case 9: + return [2, B.sent()]; + case 10: + return ( + (z = s.parentNode) === null || z === void 0 || z.removeChild(s), + [7] + ); + case 11: + return [2]; + } + }); + }) + ); +} +function O8(m) { + for ( + var a = d8(m), + p = a[0], + y = a[1], + M = document.createElement(p ?? "div"), + z = 0, + T = Object.keys(y); + z < T.length; + z++ + ) { + var s = T[z], + B = y[s].join(" "); + s === "style" ? N8(M.style, B) : M.setAttribute(s, B); + } + return M; +} +function N8(m, a) { + for (var p = 0, y = a.split(";"); p < y.length; p++) { + var M = y[p], + z = /^\s*([\w-]+)\s*:\s*(.+?)(\s*!([\w-]+))?\s*$/.exec(M); + if (z) { + var T = z[1], + s = z[2], + B = z[4]; + m.setProperty(T, s, B || ""); + } + } +} +function j8() { + for (var m = window; ; ) { + var a = m.parent; + if (!a || a === m) return !1; + try { + if (a.location.origin !== m.location.origin) return !0; + } catch (p) { + if (p instanceof Error && p.name === "SecurityError") return !0; + throw p; + } + m = a; + } +} +var V8 = "mmMwWLliI0O&1", + q8 = "48px", + mc = ["monospace", "sans-serif", "serif"], + fv = [ + "sans-serif-thin", + "ARNO PRO", + "Agency FB", + "Arabic Typesetting", + "Arial Unicode MS", + "AvantGarde Bk BT", + "BankGothic Md BT", + "Batang", + "Bitstream Vera Sans Mono", + "Calibri", + "Century", + "Century Gothic", + "Clarendon", + "EUROSTILE", + "Franklin Gothic", + "Futura Bk BT", + "Futura Md BT", + "GOTHAM", + "Gill Sans", + "HELV", + "Haettenschweiler", + "Helvetica Neue", + "Humanst521 BT", + "Leelawadee", + "Letter Gothic", + "Levenim MT", + "Lucida Bright", + "Lucida Sans", + "Menlo", + "MS Mincho", + "MS Outlook", + "MS Reference Specialty", + "MS UI Gothic", + "MT Extra", + "MYRIAD PRO", + "Marlett", + "Meiryo UI", + "Microsoft Uighur", + "Minion Pro", + "Monotype Corsiva", + "PMingLiU", + "Pristina", + "SCRIPTINA", + "Segoe UI Light", + "Serifa", + "SimHei", + "Small Fonts", + "Staccato222 BT", + "TRAJAN PRO", + "Univers CE 55 Medium", + "Vrinda", + "ZWAdobeF", + ]; +function Z8() { + var m = this; + return B0(function (a, p) { + var y = p.document; + return Po(m, void 0, void 0, function () { + var M, z, T, s, B, O, X, K, ne, H, fe, ge; + return Io(this, function (Ie) { + for ( + M = y.body, + M.style.fontSize = q8, + z = y.createElement("div"), + z.style.setProperty("visibility", "hidden", "important"), + T = {}, + s = {}, + B = function (Ae) { + var De = y.createElement("span"), + Ee = De.style; + return ( + (Ee.position = "absolute"), + (Ee.top = "0"), + (Ee.left = "0"), + (Ee.fontFamily = Ae), + (De.textContent = V8), + z.appendChild(De), + De + ); + }, + O = function (Ae, De) { + return B("'".concat(Ae, "',").concat(De)); + }, + X = function () { + return mc.map(B); + }, + K = function () { + for ( + var Ae = {}, + De = function (Je) { + Ae[Je] = mc.map(function (qe) { + return O(Je, qe); + }); + }, + Ee = 0, + Fe = fv; + Ee < Fe.length; + Ee++ + ) { + var $e = Fe[Ee]; + De($e); + } + return Ae; + }, + ne = function (Ae) { + return mc.some(function (De, Ee) { + return ( + Ae[Ee].offsetWidth !== T[De] || Ae[Ee].offsetHeight !== s[De] + ); + }); + }, + H = X(), + fe = K(), + M.appendChild(z), + ge = 0; + ge < mc.length; + ge++ + ) + (T[mc[ge]] = H[ge].offsetWidth), (s[mc[ge]] = H[ge].offsetHeight); + return [ + 2, + fv.filter(function (Ae) { + return ne(fe[Ae]); + }), + ]; + }); + }); + }); +} +function U8() { + var m = navigator.plugins; + if (m) { + for (var a = [], p = 0; p < m.length; ++p) { + var y = m[p]; + if (y) { + for (var M = [], z = 0; z < y.length; ++z) { + var T = y[z]; + M.push({ type: T.type, suffixes: T.suffixes }); + } + a.push({ name: y.name, description: y.description, mimeTypes: M }); + } + } + return a; + } +} +function $8() { + return G8(Q8()); +} +function G8(m) { + var a, + p = !1, + y, + M, + z = H8(), + T = z[0], + s = z[1]; + return ( + W8(T, s) + ? ((p = X8(s)), + m ? (y = M = "skipped") : ((a = Y8(T, s)), (y = a[0]), (M = a[1]))) + : (y = M = "unsupported"), + { winding: p, geometry: y, text: M } + ); +} +function H8() { + var m = document.createElement("canvas"); + return (m.width = 1), (m.height = 1), [m, m.getContext("2d")]; +} +function W8(m, a) { + return !!(a && m.toDataURL); +} +function X8(m) { + return ( + m.rect(0, 0, 10, 10), m.rect(2, 2, 6, 6), !m.isPointInPath(5, 5, "evenodd") + ); +} +function Y8(m, a) { + K8(m, a); + var p = Vf(m), + y = Vf(m); + if (p !== y) return ["unstable", "unstable"]; + J8(m, a); + var M = Vf(m); + return [M, p]; +} +function K8(m, a) { + (m.width = 240), + (m.height = 60), + (a.textBaseline = "alphabetic"), + (a.fillStyle = "#f60"), + a.fillRect(100, 1, 62, 20), + (a.fillStyle = "#069"), + (a.font = '11pt "Times New Roman"'); + var p = "Cwm fjordbank gly ".concat("😃"); + a.fillText(p, 2, 15), + (a.fillStyle = "rgba(102, 204, 0, 0.2)"), + (a.font = "18pt Arial"), + a.fillText(p, 4, 45); +} +function J8(m, a) { + (m.width = 122), (m.height = 110), (a.globalCompositeOperation = "multiply"); + for ( + var p = 0, + y = [ + ["#f2f", 40, 40], + ["#2ff", 80, 40], + ["#ff2", 60, 80], + ]; + p < y.length; + p++ + ) { + var M = y[p], + z = M[0], + T = M[1], + s = M[2]; + (a.fillStyle = z), + a.beginPath(), + a.arc(T, s, 40, 0, Math.PI * 2, !0), + a.closePath(), + a.fill(); + } + (a.fillStyle = "#f9c"), + a.arc(60, 60, 60, 0, Math.PI * 2, !0), + a.arc(60, 60, 20, 0, Math.PI * 2, !0), + a.fill("evenodd"); +} +function Vf(m) { + return m.toDataURL(); +} +function Q8() { + return ho() && Bh() && Rh(); +} +function ez() { + var m = navigator, + a = 0, + p; + m.maxTouchPoints !== void 0 + ? (a = Ym(m.maxTouchPoints)) + : m.msMaxTouchPoints !== void 0 && (a = m.msMaxTouchPoints); + try { + document.createEvent("TouchEvent"), (p = !0); + } catch { + p = !1; + } + var y = "ontouchstart" in window; + return { maxTouchPoints: a, touchEvent: p, touchStart: y }; +} +function tz() { + return navigator.oscpu; +} +function rz() { + var m = navigator, + a = [], + p = m.language || m.userLanguage || m.browserLanguage || m.systemLanguage; + if ((p !== void 0 && a.push([p]), Array.isArray(m.languages))) + (Dh() && S8()) || a.push(m.languages); + else if (typeof m.languages == "string") { + var y = m.languages; + y && a.push(y.split(",")); + } + return a; +} +function nz() { + return window.screen.colorDepth; +} +function iz() { + return Go(lo(navigator.deviceMemory), void 0); +} +function az() { + if (!(ho() && Bh() && Rh())) return oz(); +} +function oz() { + var m = screen, + a = function (y) { + return Go(Ym(y), null); + }, + p = [a(m.width), a(m.height)]; + return p.sort().reverse(), p; +} +var sz = 2500, + lz = 10, + tp, + qf; +function cz() { + if (qf === void 0) { + var m = function () { + var a = Cm(); + Sm(a) ? (qf = setTimeout(m, sz)) : ((tp = a), (qf = void 0)); + }; + m(); + } +} +function uz() { + var m = this; + return ( + cz(), + function () { + return Po(m, void 0, void 0, function () { + var a; + return Io(this, function (p) { + switch (p.label) { + case 0: + return ( + (a = Cm()), + Sm(a) + ? tp + ? [2, A0([], tp, !0)] + : k8() + ? [4, A8()] + : [3, 2] + : [3, 2] + ); + case 1: + p.sent(), (a = Cm()), (p.label = 2); + case 2: + return Sm(a) || (tp = a), [2, a]; + } + }); + }); + } + ); +} +function hz() { + var m = this; + if (ho() && Bh() && Rh()) + return function () { + return Promise.resolve(void 0); + }; + var a = uz(); + return function () { + return Po(m, void 0, void 0, function () { + var p, y; + return Io(this, function (M) { + switch (M.label) { + case 0: + return [4, a()]; + case 1: + return ( + (p = M.sent()), + (y = function (z) { + return z === null ? null : L0(z, lz); + }), + [2, [y(p[0]), y(p[1]), y(p[2]), y(p[3])]] + ); + } + }); + }); + }; +} +function Cm() { + var m = screen; + return [ + Go(lo(m.availTop), null), + Go(lo(m.width) - lo(m.availWidth) - Go(lo(m.availLeft), 0), null), + Go(lo(m.height) - lo(m.availHeight) - Go(lo(m.availTop), 0), null), + Go(lo(m.availLeft), null), + ]; +} +function Sm(m) { + for (var a = 0; a < 4; ++a) if (m[a]) return !1; + return !0; +} +function dz() { + return Go(Ym(navigator.hardwareConcurrency), void 0); +} +function pz() { + var m, + a = (m = window.Intl) === null || m === void 0 ? void 0 : m.DateTimeFormat; + if (a) { + var p = new a().resolvedOptions().timeZone; + if (p) return p; + } + var y = -fz(); + return "UTC".concat(y >= 0 ? "+" : "").concat(y); +} +function fz() { + var m = new Date().getFullYear(); + return Math.max( + lo(new Date(m, 0, 1).getTimezoneOffset()), + lo(new Date(m, 6, 1).getTimezoneOffset()) + ); +} +function mz() { + try { + return !!window.sessionStorage; + } catch { + return !0; + } +} +function _z() { + try { + return !!window.localStorage; + } catch { + return !0; + } +} +function gz() { + if (!(D0() || C8())) + try { + return !!window.indexedDB; + } catch { + return !0; + } +} +function vz() { + return !!window.openDatabase; +} +function yz() { + return navigator.cpuClass; +} +function xz() { + var m = navigator.platform; + return m === "MacIntel" && ho() && !Km() ? (M8() ? "iPad" : "iPhone") : m; +} +function bz() { + return navigator.vendor || ""; +} +function wz() { + for ( + var m = [], + a = 0, + p = [ + "chrome", + "safari", + "__crWeb", + "__gCrWeb", + "yandex", + "__yb", + "__ybro", + "__firefox__", + "__edgeTrackingPreventionStatistics", + "webkit", + "oprt", + "samsungAr", + "ucweb", + "UCShellJava", + "puffinDevice", + ]; + a < p.length; + a++ + ) { + var y = p[a], + M = window[y]; + M && typeof M == "object" && m.push(y); + } + return m.sort(); +} +function Tz() { + var m = document; + try { + m.cookie = "cookietest=1; SameSite=Strict;"; + var a = m.cookie.indexOf("cookietest=") !== -1; + return ( + (m.cookie = + "cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT"), + a + ); + } catch { + return !1; + } +} +function Cz() { + var m = atob; + return { + abpIndo: [ + "#Iklan-Melayang", + "#Kolom-Iklan-728", + "#SidebarIklan-wrapper", + '[title="ALIENBOLA" i]', + m("I0JveC1CYW5uZXItYWRz"), + ], + abpvn: [ + ".quangcao", + "#mobileCatfish", + m("LmNsb3NlLWFkcw=="), + '[id^="bn_bottom_fixed_"]', + "#pmadv", + ], + adBlockFinland: [ + ".mainostila", + m("LnNwb25zb3JpdA=="), + ".ylamainos", + m("YVtocmVmKj0iL2NsaWNrdGhyZ2guYXNwPyJd"), + m("YVtocmVmXj0iaHR0cHM6Ly9hcHAucmVhZHBlYWsuY29tL2FkcyJd"), + ], + adBlockPersian: [ + "#navbar_notice_50", + ".kadr", + 'TABLE[width="140px"]', + "#divAgahi", + m("YVtocmVmXj0iaHR0cDovL2cxLnYuZndtcm0ubmV0L2FkLyJd"), + ], + adBlockWarningRemoval: [ + "#adblock-honeypot", + ".adblocker-root", + ".wp_adblock_detect", + m("LmhlYWRlci1ibG9ja2VkLWFk"), + m("I2FkX2Jsb2NrZXI="), + ], + adGuardAnnoyances: [ + ".hs-sosyal", + "#cookieconsentdiv", + 'div[class^="app_gdpr"]', + ".as-oil", + '[data-cypress="soft-push-notification-modal"]', + ], + adGuardBase: [ + ".BetterJsPopOverlay", + m("I2FkXzMwMFgyNTA="), + m("I2Jhbm5lcmZsb2F0MjI="), + m("I2NhbXBhaWduLWJhbm5lcg=="), + m("I0FkLUNvbnRlbnQ="), + ], + adGuardChinese: [ + m("LlppX2FkX2FfSA=="), + m("YVtocmVmKj0iLmh0aGJldDM0LmNvbSJd"), + "#widget-quan", + m("YVtocmVmKj0iLzg0OTkyMDIwLnh5eiJd"), + m("YVtocmVmKj0iLjE5NTZobC5jb20vIl0="), + ], + adGuardFrench: [ + "#pavePub", + m("LmFkLWRlc2t0b3AtcmVjdGFuZ2xl"), + ".mobile_adhesion", + ".widgetadv", + m("LmFkc19iYW4="), + ], + adGuardGerman: ['aside[data-portal-id="leaderboard"]'], + adGuardJapanese: [ + "#kauli_yad_1", + m("YVtocmVmXj0iaHR0cDovL2FkMi50cmFmZmljZ2F0ZS5uZXQvIl0="), + m("Ll9wb3BJbl9pbmZpbml0ZV9hZA=="), + m("LmFkZ29vZ2xl"), + m("Ll9faXNib29zdFJldHVybkFk"), + ], + adGuardMobile: [ + m("YW1wLWF1dG8tYWRz"), + m("LmFtcF9hZA=="), + 'amp-embed[type="24smi"]', + "#mgid_iframe1", + m("I2FkX2ludmlld19hcmVh"), + ], + adGuardRussian: [ + m("YVtocmVmXj0iaHR0cHM6Ly9hZC5sZXRtZWFkcy5jb20vIl0="), + m("LnJlY2xhbWE="), + 'div[id^="smi2adblock"]', + m("ZGl2W2lkXj0iQWRGb3hfYmFubmVyXyJd"), + "#psyduckpockeball", + ], + adGuardSocial: [ + m("YVtocmVmXj0iLy93d3cuc3R1bWJsZXVwb24uY29tL3N1Ym1pdD91cmw9Il0="), + m("YVtocmVmXj0iLy90ZWxlZ3JhbS5tZS9zaGFyZS91cmw/Il0="), + ".etsy-tweet", + "#inlineShare", + ".popup-social", + ], + adGuardSpanishPortuguese: [ + "#barraPublicidade", + "#Publicidade", + "#publiEspecial", + "#queTooltip", + ".cnt-publi", + ], + adGuardTrackingProtection: [ + "#qoo-counter", + m("YVtocmVmXj0iaHR0cDovL2NsaWNrLmhvdGxvZy5ydS8iXQ=="), + m("YVtocmVmXj0iaHR0cDovL2hpdGNvdW50ZXIucnUvdG9wL3N0YXQucGhwIl0="), + m("YVtocmVmXj0iaHR0cDovL3RvcC5tYWlsLnJ1L2p1bXAiXQ=="), + "#top100counter", + ], + adGuardTurkish: [ + "#backkapat", + m("I3Jla2xhbWk="), + m("YVtocmVmXj0iaHR0cDovL2Fkc2Vydi5vbnRlay5jb20udHIvIl0="), + m("YVtocmVmXj0iaHR0cDovL2l6bGVuemkuY29tL2NhbXBhaWduLyJd"), + m("YVtocmVmXj0iaHR0cDovL3d3dy5pbnN0YWxsYWRzLm5ldC8iXQ=="), + ], + bulgarian: [ + m("dGQjZnJlZW5ldF90YWJsZV9hZHM="), + "#ea_intext_div", + ".lapni-pop-over", + "#xenium_hot_offers", + ], + easyList: [ + ".yb-floorad", + m("LndpZGdldF9wb19hZHNfd2lkZ2V0"), + m("LnRyYWZmaWNqdW5reS1hZA=="), + ".textad_headline", + m("LnNwb25zb3JlZC10ZXh0LWxpbmtz"), + ], + easyListChina: [ + m("LmFwcGd1aWRlLXdyYXBbb25jbGljayo9ImJjZWJvcy5jb20iXQ=="), + m("LmZyb250cGFnZUFkdk0="), + "#taotaole", + "#aafoot.top_box", + ".cfa_popup", + ], + easyListCookie: [ + ".ezmob-footer", + ".cc-CookieWarning", + "[data-cookie-number]", + m("LmF3LWNvb2tpZS1iYW5uZXI="), + ".sygnal24-gdpr-modal-wrap", + ], + easyListCzechSlovak: [ + "#onlajny-stickers", + m("I3Jla2xhbW5pLWJveA=="), + m("LnJla2xhbWEtbWVnYWJvYXJk"), + ".sklik", + m("W2lkXj0ic2tsaWtSZWtsYW1hIl0="), + ], + easyListDutch: [ + m("I2FkdmVydGVudGll"), + m("I3ZpcEFkbWFya3RCYW5uZXJCbG9jaw=="), + ".adstekst", + m("YVtocmVmXj0iaHR0cHM6Ly94bHR1YmUubmwvY2xpY2svIl0="), + "#semilo-lrectangle", + ], + easyListGermany: [ + "#SSpotIMPopSlider", + m("LnNwb25zb3JsaW5rZ3J1ZW4="), + m("I3dlcmJ1bmdza3k="), + m("I3Jla2xhbWUtcmVjaHRzLW1pdHRl"), + m("YVtocmVmXj0iaHR0cHM6Ly9iZDc0Mi5jb20vIl0="), + ], + easyListItaly: [ + m("LmJveF9hZHZfYW5udW5jaQ=="), + ".sb-box-pubbliredazionale", + m("YVtocmVmXj0iaHR0cDovL2FmZmlsaWF6aW9uaWFkcy5zbmFpLml0LyJd"), + m("YVtocmVmXj0iaHR0cHM6Ly9hZHNlcnZlci5odG1sLml0LyJd"), + m("YVtocmVmXj0iaHR0cHM6Ly9hZmZpbGlhemlvbmlhZHMuc25haS5pdC8iXQ=="), + ], + easyListLithuania: [ + m("LnJla2xhbW9zX3RhcnBhcw=="), + m("LnJla2xhbW9zX251b3JvZG9z"), + m("aW1nW2FsdD0iUmVrbGFtaW5pcyBza3lkZWxpcyJd"), + m("aW1nW2FsdD0iRGVkaWt1b3RpLmx0IHNlcnZlcmlhaSJd"), + m("aW1nW2FsdD0iSG9zdGluZ2FzIFNlcnZlcmlhaS5sdCJd"), + ], + estonian: [m("QVtocmVmKj0iaHR0cDovL3BheTRyZXN1bHRzMjQuZXUiXQ==")], + fanboyAnnoyances: [ + "#ac-lre-player", + ".navigate-to-top", + "#subscribe_popup", + ".newsletter_holder", + "#back-top", + ], + fanboyAntiFacebook: [".util-bar-module-firefly-visible"], + fanboyEnhancedTrackers: [ + ".open.pushModal", + "#issuem-leaky-paywall-articles-zero-remaining-nag", + "#sovrn_container", + 'div[class$="-hide"][zoompage-fontsize][style="display: block;"]', + ".BlockNag__Card", + ], + fanboySocial: [ + "#FollowUs", + "#meteored_share", + "#social_follow", + ".article-sharer", + ".community__social-desc", + ], + frellwitSwedish: [ + m("YVtocmVmKj0iY2FzaW5vcHJvLnNlIl1bdGFyZ2V0PSJfYmxhbmsiXQ=="), + m("YVtocmVmKj0iZG9rdG9yLXNlLm9uZWxpbmsubWUiXQ=="), + "article.category-samarbete", + m("ZGl2LmhvbGlkQWRz"), + "ul.adsmodern", + ], + greekAdBlock: [ + m("QVtocmVmKj0iYWRtYW4ub3RlbmV0LmdyL2NsaWNrPyJd"), + m("QVtocmVmKj0iaHR0cDovL2F4aWFiYW5uZXJzLmV4b2R1cy5nci8iXQ=="), + m("QVtocmVmKj0iaHR0cDovL2ludGVyYWN0aXZlLmZvcnRobmV0LmdyL2NsaWNrPyJd"), + "DIV.agores300", + "TABLE.advright", + ], + hungarian: [ + "#cemp_doboz", + ".optimonk-iframe-container", + m("LmFkX19tYWlu"), + m("W2NsYXNzKj0iR29vZ2xlQWRzIl0="), + "#hirdetesek_box", + ], + iDontCareAboutCookies: [ + '.alert-info[data-block-track*="CookieNotice"]', + ".ModuleTemplateCookieIndicator", + ".o--cookies--container", + "#cookies-policy-sticky", + "#stickyCookieBar", + ], + icelandicAbp: [ + m("QVtocmVmXj0iL2ZyYW1ld29yay9yZXNvdXJjZXMvZm9ybXMvYWRzLmFzcHgiXQ=="), + ], + latvian: [ + m( + "YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiAxMjBweDsgaGVpZ2h0OiA0MHB4OyBvdmVyZmxvdzogaGlkZGVuOyBwb3NpdGlvbjogcmVsYXRpdmU7Il0=" + ), + m( + "YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiA4OHB4OyBoZWlnaHQ6IDMxcHg7IG92ZXJmbG93OiBoaWRkZW47IHBvc2l0aW9uOiByZWxhdGl2ZTsiXQ==" + ), + ], + listKr: [ + m("YVtocmVmKj0iLy9hZC5wbGFuYnBsdXMuY28ua3IvIl0="), + m("I2xpdmVyZUFkV3JhcHBlcg=="), + m("YVtocmVmKj0iLy9hZHYuaW1hZHJlcC5jby5rci8iXQ=="), + m("aW5zLmZhc3R2aWV3LWFk"), + ".revenue_unit_item.dable", + ], + listeAr: [ + m("LmdlbWluaUxCMUFk"), + ".right-and-left-sponsers", + m("YVtocmVmKj0iLmFmbGFtLmluZm8iXQ=="), + m("YVtocmVmKj0iYm9vcmFxLm9yZyJd"), + m("YVtocmVmKj0iZHViaXp6bGUuY29tL2FyLz91dG1fc291cmNlPSJd"), + ], + listeFr: [ + m("YVtocmVmXj0iaHR0cDovL3Byb21vLnZhZG9yLmNvbS8iXQ=="), + m("I2FkY29udGFpbmVyX3JlY2hlcmNoZQ=="), + m("YVtocmVmKj0id2Vib3JhbWEuZnIvZmNnaS1iaW4vIl0="), + ".site-pub-interstitiel", + 'div[id^="crt-"][data-criteo-id]', + ], + officialPolish: [ + "#ceneo-placeholder-ceneo-12", + m("W2hyZWZePSJodHRwczovL2FmZi5zZW5kaHViLnBsLyJd"), + m("YVtocmVmXj0iaHR0cDovL2Fkdm1hbmFnZXIudGVjaGZ1bi5wbC9yZWRpcmVjdC8iXQ=="), + m("YVtocmVmXj0iaHR0cDovL3d3dy50cml6ZXIucGwvP3V0bV9zb3VyY2UiXQ=="), + m("ZGl2I3NrYXBpZWNfYWQ="), + ], + ro: [ + m("YVtocmVmXj0iLy9hZmZ0cmsuYWx0ZXgucm8vQ291bnRlci9DbGljayJd"), + m("YVtocmVmXj0iaHR0cHM6Ly9ibGFja2ZyaWRheXNhbGVzLnJvL3Ryay9zaG9wLyJd"), + m( + "YVtocmVmXj0iaHR0cHM6Ly9ldmVudC4ycGVyZm9ybWFudC5jb20vZXZlbnRzL2NsaWNrIl0=" + ), + m("YVtocmVmXj0iaHR0cHM6Ly9sLnByb2ZpdHNoYXJlLnJvLyJd"), + 'a[href^="/url/"]', + ], + ruAd: [ + m("YVtocmVmKj0iLy9mZWJyYXJlLnJ1LyJd"), + m("YVtocmVmKj0iLy91dGltZy5ydS8iXQ=="), + m("YVtocmVmKj0iOi8vY2hpa2lkaWtpLnJ1Il0="), + "#pgeldiz", + ".yandex-rtb-block", + ], + thaiAds: [ + "a[href*=macau-uta-popup]", + m("I2Fkcy1nb29nbGUtbWlkZGxlX3JlY3RhbmdsZS1ncm91cA=="), + m("LmFkczMwMHM="), + ".bumq", + ".img-kosana", + ], + webAnnoyancesUltralist: [ + "#mod-social-share-2", + "#social-tools", + m("LmN0cGwtZnVsbGJhbm5lcg=="), + ".zergnet-recommend", + ".yt.btn-link.btn-md.btn", + ], + }; +} +function Sz(m) { + var a = m === void 0 ? {} : m, + p = a.debug; + return Po(this, void 0, void 0, function () { + var y, M, z, T, s, B; + return Io(this, function (O) { + switch (O.label) { + case 0: + return Pz() + ? ((y = Cz()), + (M = Object.keys(y)), + (z = (B = []).concat.apply( + B, + M.map(function (X) { + return y[X]; + }) + )), + [4, Iz(z)]) + : [2, void 0]; + case 1: + return ( + (T = O.sent()), + p && Mz(y, T), + (s = M.filter(function (X) { + var K = y[X], + ne = fa( + K.map(function (H) { + return T[H]; + }) + ); + return ne > K.length * 0.6; + })), + s.sort(), + [2, s] + ); + } + }); + }); +} +function Pz() { + return ho() || Jm(); +} +function Iz(m) { + var a; + return Po(this, void 0, void 0, function () { + var p, y, M, z, B, T, s, B; + return Io(this, function (O) { + switch (O.label) { + case 0: + for ( + p = document, + y = p.createElement("div"), + M = new Array(m.length), + z = {}, + mv(y), + B = 0; + B < m.length; + ++B + ) + (T = O8(m[B])), + T.tagName === "DIALOG" && T.show(), + (s = p.createElement("div")), + mv(s), + s.appendChild(T), + y.appendChild(s), + (M[B] = T); + O.label = 1; + case 1: + return p.body ? [3, 3] : [4, ip(50)]; + case 2: + return O.sent(), [3, 1]; + case 3: + p.body.appendChild(y); + try { + for (B = 0; B < m.length; ++B) M[B].offsetParent || (z[m[B]] = !0); + } finally { + (a = y.parentNode) === null || a === void 0 || a.removeChild(y); + } + return [2, z]; + } + }); + }); +} +function mv(m) { + m.style.setProperty("visibility", "hidden", "important"), + m.style.setProperty("display", "block", "important"); +} +function Mz(m, a) { + for ( + var p = "DOM blockers debug:\n```", y = 0, M = Object.keys(m); + y < M.length; + y++ + ) { + var z = M[y]; + p += ` +`.concat(z, ":"); + for (var T = 0, s = m[z]; T < s.length; T++) { + var B = s[T]; + p += ` + ` + .concat(a[B] ? "🚫" : "➡️", " ") + .concat(B); + } + } + console.log("".concat(p, "\n```")); +} +function kz() { + for (var m = 0, a = ["rec2020", "p3", "srgb"]; m < a.length; m++) { + var p = a[m]; + if (matchMedia("(color-gamut: ".concat(p, ")")).matches) return p; + } +} +function Az() { + if (_v("inverted")) return !0; + if (_v("none")) return !1; +} +function _v(m) { + return matchMedia("(inverted-colors: ".concat(m, ")")).matches; +} +function Ez() { + if (gv("active")) return !0; + if (gv("none")) return !1; +} +function gv(m) { + return matchMedia("(forced-colors: ".concat(m, ")")).matches; +} +var zz = 100; +function Lz() { + if (matchMedia("(min-monochrome: 0)").matches) { + for (var m = 0; m <= zz; ++m) + if (matchMedia("(max-monochrome: ".concat(m, ")")).matches) return m; + throw new Error("Too high value"); + } +} +function Dz() { + if (_c("no-preference")) return 0; + if (_c("high") || _c("more")) return 1; + if (_c("low") || _c("less")) return -1; + if (_c("forced")) return 10; +} +function _c(m) { + return matchMedia("(prefers-contrast: ".concat(m, ")")).matches; +} +function Rz() { + if (vv("reduce")) return !0; + if (vv("no-preference")) return !1; +} +function vv(m) { + return matchMedia("(prefers-reduced-motion: ".concat(m, ")")).matches; +} +function Bz() { + if (yv("reduce")) return !0; + if (yv("no-preference")) return !1; +} +function yv(m) { + return matchMedia("(prefers-reduced-transparency: ".concat(m, ")")).matches; +} +function Fz() { + if (xv("high")) return !0; + if (xv("standard")) return !1; +} +function xv(m) { + return matchMedia("(dynamic-range: ".concat(m, ")")).matches; +} +var Nn = Math, + da = function () { + return 0; + }; +function Oz() { + var m = Nn.acos || da, + a = Nn.acosh || da, + p = Nn.asin || da, + y = Nn.asinh || da, + M = Nn.atanh || da, + z = Nn.atan || da, + T = Nn.sin || da, + s = Nn.sinh || da, + B = Nn.cos || da, + O = Nn.cosh || da, + X = Nn.tan || da, + K = Nn.tanh || da, + ne = Nn.exp || da, + H = Nn.expm1 || da, + fe = Nn.log1p || da, + ge = function (Ze) { + return Nn.pow(Nn.PI, Ze); + }, + Ie = function (Ze) { + return Nn.log(Ze + Nn.sqrt(Ze * Ze - 1)); + }, + Ae = function (Ze) { + return Nn.log(Ze + Nn.sqrt(Ze * Ze + 1)); + }, + De = function (Ze) { + return Nn.log((1 + Ze) / (1 - Ze)) / 2; + }, + Ee = function (Ze) { + return Nn.exp(Ze) - 1 / Nn.exp(Ze) / 2; + }, + Fe = function (Ze) { + return (Nn.exp(Ze) + 1 / Nn.exp(Ze)) / 2; + }, + $e = function (Ze) { + return Nn.exp(Ze) - 1; + }, + Je = function (Ze) { + return (Nn.exp(2 * Ze) - 1) / (Nn.exp(2 * Ze) + 1); + }, + qe = function (Ze) { + return Nn.log(1 + Ze); + }; + return { + acos: m(0.12312423423423424), + acosh: a(1e308), + acoshPf: Ie(1e154), + asin: p(0.12312423423423424), + asinh: y(1), + asinhPf: Ae(1), + atanh: M(0.5), + atanhPf: De(0.5), + atan: z(0.5), + sin: T(-1e300), + sinh: s(1), + sinhPf: Ee(1), + cos: B(10.000000000123), + cosh: O(1), + coshPf: Fe(1), + tan: X(-1e300), + tanh: K(1), + tanhPf: Je(1), + exp: ne(1), + expm1: H(1), + expm1Pf: $e(1), + log1p: fe(10), + log1pPf: qe(10), + powPI: ge(-100), + }; +} +var Nz = "mmMwWLliI0fiflO&1", + Zf = { + default: [], + apple: [{ font: "-apple-system-body" }], + serif: [{ fontFamily: "serif" }], + sans: [{ fontFamily: "sans-serif" }], + mono: [{ fontFamily: "monospace" }], + min: [{ fontSize: "1px" }], + system: [{ fontFamily: "system-ui" }], + }; +function jz() { + return Vz(function (m, a) { + for (var p = {}, y = {}, M = 0, z = Object.keys(Zf); M < z.length; M++) { + var T = z[M], + s = Zf[T], + B = s[0], + O = B === void 0 ? {} : B, + X = s[1], + K = X === void 0 ? Nz : X, + ne = m.createElement("span"); + (ne.textContent = K), (ne.style.whiteSpace = "nowrap"); + for (var H = 0, fe = Object.keys(O); H < fe.length; H++) { + var ge = fe[H], + Ie = O[ge]; + Ie !== void 0 && (ne.style[ge] = Ie); + } + (p[T] = ne), a.append(m.createElement("br"), ne); + } + for (var Ae = 0, De = Object.keys(Zf); Ae < De.length; Ae++) { + var T = De[Ae]; + y[T] = p[T].getBoundingClientRect().width; + } + return y; + }); +} +function Vz(m, a) { + return ( + a === void 0 && (a = 4e3), + B0(function (p, y) { + var M = y.document, + z = M.body, + T = z.style; + (T.width = "".concat(a, "px")), + (T.webkitTextSizeAdjust = T.textSizeAdjust = "none"), + Dh() + ? (z.style.zoom = "".concat(1 / y.devicePixelRatio)) + : ho() && (z.style.zoom = "reset"); + var s = M.createElement("div"); + return ( + (s.textContent = A0([], Array((a / 20) << 0), !0) + .map(function () { + return "word"; + }) + .join(" ")), + z.appendChild(s), + m(M, z) + ); + }, '') + ); +} +function qz() { + return navigator.pdfViewerEnabled; +} +function Zz() { + var m = new Float32Array(1), + a = new Uint8Array(m.buffer); + return (m[0] = 1 / 0), (m[0] = m[0] - m[0]), a[3]; +} +function Uz() { + var m = window.ApplePaySession; + if (typeof (m == null ? void 0 : m.canMakePayments) != "function") return -1; + if ($z()) return -3; + try { + return m.canMakePayments() ? 1 : 0; + } catch (a) { + return Gz(a); + } +} +var $z = j8; +function Gz(m) { + if ( + m instanceof Error && + m.name === "InvalidAccessError" && + /\bfrom\b.*\binsecure\b/i.test(m.message) + ) + return -2; + throw m; +} +function Hz() { + var m, + a = document.createElement("a"), + p = + (m = a.attributionSourceId) !== null && m !== void 0 + ? m + : a.attributionsourceid; + return p === void 0 ? void 0 : String(p); +} +var F0 = -1, + O0 = -2, + Wz = new Set([ + 10752, 2849, 2884, 2885, 2886, 2928, 2929, 2930, 2931, 2932, 2960, 2961, + 2962, 2963, 2964, 2965, 2966, 2967, 2968, 2978, 3024, 3042, 3088, 3089, + 3106, 3107, 32773, 32777, 32777, 32823, 32824, 32936, 32937, 32938, 32939, + 32968, 32969, 32970, 32971, 3317, 33170, 3333, 3379, 3386, 33901, 33902, + 34016, 34024, 34076, 3408, 3410, 3411, 3412, 3413, 3414, 3415, 34467, 34816, + 34817, 34818, 34819, 34877, 34921, 34930, 35660, 35661, 35724, 35738, 35739, + 36003, 36004, 36005, 36347, 36348, 36349, 37440, 37441, 37443, 7936, 7937, + 7938, + ]), + Xz = new Set([ + 34047, 35723, 36063, 34852, 34853, 34854, 34229, 36392, 36795, 38449, + ]), + Yz = ["FRAGMENT_SHADER", "VERTEX_SHADER"], + Kz = [ + "LOW_FLOAT", + "MEDIUM_FLOAT", + "HIGH_FLOAT", + "LOW_INT", + "MEDIUM_INT", + "HIGH_INT", + ], + N0 = "WEBGL_debug_renderer_info", + Jz = "WEBGL_polygon_mode"; +function Qz(m) { + var a, + p, + y, + M, + z, + T, + s = m.cache, + B = j0(s); + if (!B) return F0; + if (!q0(B)) return O0; + var O = V0() ? null : B.getExtension(N0); + return { + version: + ((a = B.getParameter(B.VERSION)) === null || a === void 0 + ? void 0 + : a.toString()) || "", + vendor: + ((p = B.getParameter(B.VENDOR)) === null || p === void 0 + ? void 0 + : p.toString()) || "", + vendorUnmasked: O + ? (y = B.getParameter(O.UNMASKED_VENDOR_WEBGL)) === null || y === void 0 + ? void 0 + : y.toString() + : "", + renderer: + ((M = B.getParameter(B.RENDERER)) === null || M === void 0 + ? void 0 + : M.toString()) || "", + rendererUnmasked: O + ? (z = B.getParameter(O.UNMASKED_RENDERER_WEBGL)) === null || z === void 0 + ? void 0 + : z.toString() + : "", + shadingLanguageVersion: + ((T = B.getParameter(B.SHADING_LANGUAGE_VERSION)) === null || T === void 0 + ? void 0 + : T.toString()) || "", + }; +} +function eL(m) { + var a = m.cache, + p = j0(a); + if (!p) return F0; + if (!q0(p)) return O0; + var y = p.getSupportedExtensions(), + M = p.getContextAttributes(), + z = [], + T = [], + s = [], + B = [], + O = []; + if (M) + for (var X = 0, K = Object.keys(M); X < K.length; X++) { + var ne = K[X]; + T.push("".concat(ne, "=").concat(M[ne])); + } + for (var H = bv(p), fe = 0, ge = H; fe < ge.length; fe++) { + var Ie = ge[fe], + Ae = p[Ie]; + s.push( + "" + .concat(Ie, "=") + .concat(Ae) + .concat(Wz.has(Ae) ? "=".concat(p.getParameter(Ae)) : "") + ); + } + if (y) + for (var De = 0, Ee = y; De < Ee.length; De++) { + var Fe = Ee[De]; + if (!((Fe === N0 && V0()) || (Fe === Jz && nL()))) { + var $e = p.getExtension(Fe); + if (!$e) { + z.push(Fe); + continue; + } + for (var Je = 0, qe = bv($e); Je < qe.length; Je++) { + var Ie = qe[Je], + Ae = $e[Ie]; + B.push( + "" + .concat(Ie, "=") + .concat(Ae) + .concat(Xz.has(Ae) ? "=".concat(p.getParameter(Ae)) : "") + ); + } + } + } + for (var Ze = 0, Qe = Yz; Ze < Qe.length; Ze++) + for (var Le = Qe[Ze], et = 0, nt = Kz; et < nt.length; et++) { + var Ue = nt[et], + ke = tL(p, Le, Ue); + O.push("".concat(Le, ".").concat(Ue, "=").concat(ke.join(","))); + } + return ( + B.sort(), + s.sort(), + { + contextAttributes: T, + parameters: s, + shaderPrecisions: O, + extensions: y, + extensionParameters: B, + unsupportedExtensions: z, + } + ); +} +function j0(m) { + if (m.webgl) return m.webgl.context; + var a = document.createElement("canvas"), + p; + a.addEventListener("webglCreateContextError", function () { + return (p = void 0); + }); + for (var y = 0, M = ["webgl", "experimental-webgl"]; y < M.length; y++) { + var z = M[y]; + try { + p = a.getContext(z); + } catch {} + if (p) break; + } + return (m.webgl = { context: p }), p; +} +function tL(m, a, p) { + var y = m.getShaderPrecisionFormat(m[a], m[p]); + return y ? [y.rangeMin, y.rangeMax, y.precision] : []; +} +function bv(m) { + var a = Object.keys(m.__proto__); + return a.filter(rL); +} +function rL(m) { + return typeof m == "string" && !m.match(/[^A-Z0-9_x]/); +} +function V0() { + return R0(); +} +function nL() { + return Dh() || ho(); +} +function q0(m) { + return typeof m.getParameter == "function"; +} +function iL() { + var m = Jm() || ho(); + if (!m) return -2; + if (!window.AudioContext) return -1; + var a = new AudioContext().baseLatency; + return a == null ? -1 : isFinite(a) ? a : -3; +} +function aL() { + if (!window.Intl) return -1; + var m = window.Intl.DateTimeFormat; + if (!m) return -2; + var a = m().resolvedOptions().locale; + return !a && a !== "" ? -3 : a; +} +var oL = { + fonts: Z8, + domBlockers: Sz, + fontPreferences: jz, + audio: z8, + screenFrame: hz, + canvas: $8, + osCpu: tz, + languages: rz, + colorDepth: nz, + deviceMemory: iz, + screenResolution: az, + hardwareConcurrency: dz, + timezone: pz, + sessionStorage: mz, + localStorage: _z, + indexedDB: gz, + openDatabase: vz, + cpuClass: yz, + platform: xz, + plugins: U8, + touchSupport: ez, + vendor: bz, + vendorFlavors: wz, + cookiesEnabled: Tz, + colorGamut: kz, + invertedColors: Az, + forcedColors: Ez, + monochrome: Lz, + contrast: Dz, + reducedMotion: Rz, + reducedTransparency: Bz, + hdr: Fz, + math: Oz, + pdfViewerEnabled: qz, + architecture: Zz, + applePay: Uz, + privateClickMeasurement: Hz, + audioBaseLatency: iL, + dateTimeLocale: aL, + webGlBasics: Qz, + webGlExtensions: eL, +}; +function sL(m) { + return T8(oL, m, []); +} +var lL = "$ if upgrade to Pro: https://fpjs.dev/pro"; +function cL(m) { + var a = uL(m), + p = hL(a); + return { score: a, comment: lL.replace(/\$/g, "".concat(p)) }; +} +function uL(m) { + if (Jm()) return 0.4; + if (ho()) return Km() && !(Bh() && Rh()) ? 0.5 : 0.3; + var a = "value" in m.platform ? m.platform.value : ""; + return /^Win/.test(a) ? 0.6 : /^Mac/.test(a) ? 0.5 : 0.7; +} +function hL(m) { + return L0(0.99 + 0.01 * m, 1e-4); +} +function dL(m) { + for (var a = "", p = 0, y = Object.keys(m).sort(); p < y.length; p++) { + var M = y[p], + z = m[M], + T = "error" in z ? "error" : JSON.stringify(z.value); + a += "" + .concat(a ? "|" : "") + .concat(M.replace(/([:|\\])/g, "\\$1"), ":") + .concat(T); + } + return a; +} +function Z0(m) { + return JSON.stringify( + m, + function (a, p) { + return p instanceof Error ? y8(p) : p; + }, + 2 + ); +} +function U0(m) { + return v8(dL(m)); +} +function pL(m) { + var a, + p = cL(m); + return { + get visitorId() { + return a === void 0 && (a = U0(this.components)), a; + }, + set visitorId(y) { + a = y; + }, + confidence: p, + components: m, + version: E0, + }; +} +function fL(m) { + return m === void 0 && (m = 50), c8(m, m * 2); +} +function mL(m, a) { + var p = Date.now(); + return { + get: function (y) { + return Po(this, void 0, void 0, function () { + var M, z, T; + return Io(this, function (s) { + switch (s.label) { + case 0: + return (M = Date.now()), [4, m()]; + case 1: + return ( + (z = s.sent()), + (T = pL(z)), + (a || (y != null && y.debug)) && + console.log( + "Copy the text below to get the debug data:\n\n```\nversion: " + .concat( + T.version, + ` +userAgent: ` + ) + .concat( + navigator.userAgent, + ` +timeBetweenLoadAndGet: ` + ) + .concat( + M - p, + ` +visitorId: ` + ) + .concat( + T.visitorId, + ` +components: ` + ) + .concat(Z0(z), "\n```") + ), + [2, T] + ); + } + }); + }); + }, + }; +} +function _L() { + if (!(window.__fpjs_d_m || Math.random() >= 0.001)) + try { + var m = new XMLHttpRequest(); + m.open( + "get", + "https://m1.openfpcdn.io/fingerprintjs/v".concat(E0, "/npm-monitoring"), + !0 + ), + m.send(); + } catch (a) { + console.error(a); + } +} +function gL(m) { + var a; + return ( + m === void 0 && (m = {}), + Po(this, void 0, void 0, function () { + var p, y, M; + return Io(this, function (z) { + switch (z.label) { + case 0: + return ( + (!((a = m.monitoring) !== null && a !== void 0) || a) && _L(), + (p = m.delayFallback), + (y = m.debug), + [4, fL(p)] + ); + case 1: + return z.sent(), (M = sL({ cache: {}, debug: y })), [2, mL(M, y)]; + } + }); + }) + ); +} +var vL = { load: gL, hashComponents: U0, componentsToDebugString: Z0 }; +let Uf = null; +async function yL() { + return Uf || (Uf = vL.load()), Uf; +} +async function xL() { + return (await (await yL()).get()).visitorId; +} +var bL = Pr( + '' +); +function Gu(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = bL(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var wL = Pr( + '' +); +function wv(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = wL(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var TL = Pr( + '' +); +function $0(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = TL(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var CL = Pr( + '' + ), + SL = Pr( + '' + ); +function G0(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy", "filled"]); + var y = er(), + M = Ct(y); + { + var z = (s) => { + var B = CL(); + ar(B, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(s, B); + }, + T = (s) => { + var B = SL(); + ar(B, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(s, B); + }; + Oe(M, (s) => { + a.filled ? s(z) : s(T, !1); + }); + } + $(m, y); +} +var PL = Pr( + '' +); +function Pm(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = PL(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var IL = Pr( + '' +); +function H0(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = IL(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var ML = Pr( + '' +); +function kL(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = ML(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var AL = Pr( + '' +); +function EL(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = AL(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var zL = Te(" ", 1), + LL = Te(" ", 1), + DL = Te(" ", 1), + RL = Te( + ' ', + 1 + ), + BL = Te(" ", 1), + FL = Te(" ", 1), + OL = (m, a) => se(a, !x(a)), + NL = (m, a) => { + se(a, "colorpicker"); + }, + jL = (m, a) => { + a(!a()); + }, + VL = (m, a) => { + se(a, "cleararea"); + }, + qL = Te( + '
                  C
                  ' + ), + ZL = (m, a) => { + aa.smallPlop.play(), a(); + }, + UL = (m, a, p) => { + a(x(p).idx); + }, + $L = Te( + ' ', + 1 + ), + GL = Te("
                  "), + HL = (m, a) => { + se(a, !x(a)); + }, + WL = (m, a) => { + se(a, x(a) === "eraser" ? "pencil" : "eraser", !0); + }, + XL = Te( + '

                  I
                  E
                  ', + 1 + ); +function YL(m, a) { + Lr(a, !0); + let p = zt(a, "screenLocked", 15), + y = zt(a, "opaquePixelArt", 15); + const M = ft(() => new fl(a.tileSize)); + let z = st(1), + T = st("pencil"); + const s = new Map(), + B = new Map(); + let O = st(0), + X = st(!1), + K = st(!0), + ne = ft(() => Mt.charges ?? 0), + H = ft(() => x(ne) - x(O)), + fe = st(!1), + ge = !1, + Ie = st(!1), + Ae = st(bi([])); + const De = ft(() => x(T) === "pencil"), + Ee = ft(() => x(T) === "eraser"), + Fe = ft(() => x(T) === "colorpicker"), + $e = ft(() => x(T) === "cleararea"), + Je = ft(() => { + var mt, He; + return xc( + (He = (mt = Mt) == null ? void 0 : mt.data) == null ? void 0 : He.role, + ["admin", "global_moderator"] + ); + }); + let qe = st(!1), + Ze = st(0), + Qe = st(void 0), + Le = st(void 0); + const et = [ + 1, 2, 3, 32, 4, 5, 6, 33, 7, 34, 35, 8, 9, 10, 11, 37, 38, 39, 40, 41, 42, + 12, 13, 14, 15, 16, 17, 43, 20, 44, 18, 19, 45, 46, 21, 22, 47, 48, 49, + 23, 24, 25, 26, 27, 28, 53, 54, 55, 29, 30, 50, 56, 57, 36, 51, 31, 52, + 61, 62, 63, 58, 59, 60, 0, + ].map((mt) => ({ ...Wi.colors[mt], idx: mt })), + nt = [ + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0, + ].map((mt) => ({ ...Wi.colors[mt], idx: mt })); + let Ue = st(!1); + const ke = ft(() => (x(Ue) ? et : nt)), + vt = "show-all-colors"; + Fn(() => { + se(Ue, localStorage.getItem(vt) === "true"); + }), + Wr(() => { + localStorage.setItem(vt, x(Ue) ? "true" : "false"); + }); + const ee = "selected-color"; + Fn(() => { + const mt = Number(localStorage.getItem(ee)); + !isNaN(mt) && mt < Wi.colors.length && mt > 0 && se(z, mt, !0); + }), + Wr(() => { + localStorage.setItem(ee, x(z).toString()); + }); + const re = new $E({ + map: a.map, + tileSize: a.tileSize, + tileZoom: a.tileZoom, + beforeLayerId: a.hoverLayerId, + }); + Wr(() => { + const mt = y() ? 1 : 0; + re.setCanvasOpacity(mt); + }), + Wr(() => { + y() ? Hf() : ct([...s.values()]); + }); + let he = !1; + Fn(() => { + Co(a.map.getCenter(), a.map.getZoom()); + const mt = a.map.on("click", (pr) => { + var tn; + a.zoom < a.tileZoom + 2 && + ((tn = Mt.data) == null ? void 0 : tn.role) === "user" && + a.map.easeTo({ center: pr.lngLat, zoom: 17 }); + const In = [pr.lngLat.lat, pr.lngLat.lng]; + if (x(De)) ze([In], x(z)); + else if (x(Ee)) je([In]); + else if (x(Fe)) pt(In, pr.point); + else if (x($e) && (x(Ae).push(In), ze([In], 0), x(Ae).length >= 2)) { + const [en, ma] = x(Ae), + [pi, Xi] = x(M).latLonToPixelsFloor(en[0], en[1], a.tileZoom), + [Zn, ni] = x(M).latLonToPixelsFloor(ma[0], ma[1], a.tileZoom), + Zi = Math.min(pi, Zn), + Yi = Math.max(pi, Zn), + Ei = Math.min(Xi, ni), + zi = Math.max(Xi, ni), + Ki = []; + for (let oa = Ei; oa <= zi; oa++) { + const Ta = x(M).pixelsToLatLon(Zi + 0.5, oa + 0.5, a.tileZoom), + bt = x(M).pixelsToLatLon(Yi + 0.5, oa + 0.5, a.tileZoom), + Xt = He( + { lat: Ta[0], lng: Ta[1] }, + { lat: bt[0], lng: bt[1] } + ).slice(0, x(H) - Ki.length); + if ((Ki.push(...Xt), Ki.length >= x(H))) break; + } + ze(Ki, 0), se(Ae, [], !0), se(T, "pencil"); + } + se(fe, !0); + }); + function He(pr, In) { + const tn = x(M).latLonToPixels(pr.lat, pr.lng, a.tileZoom), + en = In ? x(M).latLonToPixels(In.lat, In.lng, a.tileZoom) : tn; + return Rx(tn, en).map((pi) => + x(M).pixelsToLatLon(pi[0] + 0.5, pi[1] + 0.5, a.tileZoom) + ); + } + function At(pr, In) { + const tn = He(pr, In); + x(De) ? ze(tn, x(z)) : x(Ee) && je(tn), se(fe, !0); + } + let Ft; + function Jt(pr) { + const In = a.map.unproject([pr.clientX, pr.clientY]); + if (x(Ie)) { + const tn = He(In, Ft); + je(tn); + } + (he || ge) && At(In, Ft), (Ft = In); + } + window.addEventListener("mousemove", Jt); + let Cr = !1; + const Er = a.map.on("touchstart", (pr) => { + if (pr.points.length == 2) { + p(!1), dt(), (Cr = !0), setTimeout(() => (Cr = !1), 150); + return; + } + p() && + setTimeout(() => { + !Cr && At(pr.lngLat); + }, 150), + (Ft = pr.lngLat); + }), + ur = a.map.on("touchmove", (pr) => { + p() && At(pr.lngLat, Ft), (Ft = pr.lngLat); + }), + rn = (pr) => { + pr.code === "Space" && + (he || (Ft && At(Ft)), (he = !0), pr.preventDefault()); + }; + document.addEventListener("keydown", rn); + const pn = (pr) => { + pr.code === "Space" && + ((he = !1), (oe = !1), x(O) === 0 && x(Ee) && se(T, "pencil")); + }; + document.addEventListener("keyup", pn); + function gn(pr) { + if (pr.button === 2) { + se(Ie, !0); + const tn = a.map.unproject([pr.clientX, pr.clientY]); + je([[tn.lat, tn.lng]]); + } + } + document.addEventListener("mousedown", gn); + function ln(pr) { + pr.button === 2 && se(Ie, !1); + } + document.addEventListener("mouseup", ln); + const En = (pr) => { + switch (pr.code) { + case "KeyE": + x(O) > 0 && (x(Ee) ? se(T, "pencil") : se(T, "eraser")); + return; + case "KeyI": + se(T, "colorpicker"); + return; + case "KeyC": + x(Je) && se(T, "cleararea"); + return; + } + }; + return ( + document.addEventListener("keypress", En), + () => { + ur.unsubscribe(), + Er.unsubscribe(), + mt.unsubscribe(), + document.removeEventListener("mousemove", Jt), + document.removeEventListener("keydown", rn), + document.removeEventListener("keyup", pn), + document.removeEventListener("keypress", En), + document.removeEventListener("mousedown", gn), + document.removeEventListener("mouseup", ln), + It(); + } + ); + }); + let oe = !1; + function ze(mt, He) { + let At = !1; + const Ft = He === 0; + for (let Jt of mt) { + const [Cr, Er] = Jt, + ur = Ex(He), + { tile: rn, pixel: pn } = x(M).latLonToTileAndPixel(Cr, Er, a.tileZoom), + gn = { color: ur, tile: rn, pixel: pn, season: a.season, colorIdx: He }, + ln = Df(gn), + En = s.get(ln), + pr = x(ne) - s.size; + if (!En && pr < 1) { + if (oe && (he || p())) continue; + (oe = !0), Fr.info(HC()); + continue; + } + (En && En.colorIdx === He) || + (aa.plop.play(), + At || a.hidePixelHover(), + s.set(ln, gn), + re.place(Jt, He), + a.crosshair.place(Jt), + (At = !0), + Ft && B.set(ln, gn)); + } + se(O, s.size, !0), + At && !y() ? ct([...s.values()]) : At && y() && Ft && ct([...B.values()]); + } + function je(mt) { + let He = !1, + At = !1; + for (let Ft of mt) { + const [Jt, Cr] = Ft, + { tile: Er, pixel: ur } = x(M).latLonToTileAndPixel(Jt, Cr, a.tileZoom), + rn = Df({ tile: Er, pixel: ur, season: a.season }), + pn = s.get(rn); + pn && + (aa.plop.play(), + a.hidePixelHover(), + s.delete(rn), + B.delete(rn), + re.remove([Jt, Cr]), + a.crosshair.remove(Ft), + (He = !0), + pn.colorIdx === 0 && (At = !0)), + s.size === 0 && !(he || ge || p()) && se(T, "pencil"); + } + se(O, s.size, !0), + He && !y() ? ct([...s.values()]) : He && y() && At && ct([...B.values()]); + } + function pt(mt, He) { + const { tile: At, pixel: Ft } = x(M).latLonToTileAndPixel( + mt[0], + mt[1], + a.tileZoom + ), + Jt = Df({ tile: At, pixel: Ft, season: a.season }), + Cr = s.get(Jt); + if (Cr) { + yt(Cr.colorIdx), + requestAnimationFrame(() => { + var pn; + (pn = document.getElementById(`color-${Cr.colorIdx}`)) == null || + pn.focus(); + }); + return; + } + const Er = window.devicePixelRatio, + ur = Math.floor(He.x * Er), + rn = Math.floor(He.y * Er); + a.hidePixelHover(), + KM(a.map, ur, rn).then(([pn, gn, ln]) => { + const En = zx({ r: pn, g: gn, b: ln }); + yt(En), + requestAnimationFrame(() => { + var pr; + (pr = document.getElementById(`color-${En}`)) == null || pr.focus(); + }); + }); + } + dl( + () => x(z), + () => { + a.clickedLatLon && + !x(fe) && + (x(z) === void 0 && se(z, 1), ze([a.clickedLatLon], x(z))); + } + ), + Wr(() => { + const mt = x(K) ? 0.8 : 0; + a.crosshair.setCanvasOpacity(mt); + }); + let it = st(16.5); + Wr(() => { + if (x(Qe) && x(Le) && a.clickedLatLon) { + const mt = a.map.getZoom(); + if (mt < x(it)) { + const [He, At] = a.clickedLatLon, + Ft = x(M).latLonToPixelBoundsLatLon(He, At, a.tileZoom), + Jt = qm(Ft), + Cr = x(Qe) - x(Le).clientHeight, + Er = x(Qe) / 2 - Cr / 2; + a.map.flyTo({ + center: { lat: Jt[0], lng: Jt[1] }, + zoom: 17.5, + offset: mt > 11 ? [0, -Er] : [0, 0], + }); + } + se(it, a.tileZoom, !0); + } + }), + Fn(() => { + const mt = () => { + !document.hidden && + (console.log("Tab visible again"), + y() ? ct([...B.values()]) : ct([...s.values()])); + }; + return ( + document.addEventListener("visibilitychange", mt), + () => document.removeEventListener("visibilitychange", mt) + ); + }), + Wr(() => { + switch (x(T)) { + case "pencil": + (a.map.getCanvas().style.cursor = `url('${ZE}') 8 8, default`), + a.map.setPaintProperty(a.hoverLayerId, "raster-opacity", 0.4); + return; + case "colorpicker": + (a.map.getCanvas().style.cursor = `url('${VE}') 0 16, default`), + a.map.setPaintProperty(a.hoverLayerId, "raster-opacity", 0); + return; + case "eraser": + (a.map.getCanvas().style.cursor = `url('${qE}') 2 14, default`), + a.map.setPaintProperty(a.hoverLayerId, "raster-opacity", 0.4); + return; + } + }), + Wr(() => { + p() ? at() : dt(); + }); + async function ct(mt) { + await gx(mt), a.refreshPixelArt(); + } + async function It() { + await Hf(), re.clear(), a.refreshPixelArt(), a.crosshair.clear(); + } + async function Dt() { + await It(), + dt(), + (a.map.getCanvas().style.cursor = "default"), + a.map.setPaintProperty(a.hoverLayerId, "raster-opacity", 0.4), + a.onclose(); + } + function at() { + a.map.dragPan.disable(), + a.map.touchZoomRotate.disable(), + (document.body.style.overscrollBehavior = "none"); + } + function dt() { + a.map.dragPan.enable(), + a.map.touchZoomRotate.enable(), + (document.body.style.overscrollBehavior = ""); + } + function yt(mt) { + return ( + mt >= 32 && se(Ue, !0), + Mt.hasColor(mt) + ? (aa.smallDropplet.play(), se(z, mt, !0), se(T, "pencil"), !0) + : (aa.smallDropplet.play(), se(qe, !0), se(Ze, mt, !0), !1) + ); + } + ix((mt) => { + mt.type === "leave" && x(O) > 0 && mt.cancel(); + }); + const xt = "show-paint-more-than-one-pixel-msg"; + let St = st(!1); + Fn(() => { + var mt; + se( + St, + !localStorage.getItem(xt) && + (((mt = Mt.data) == null ? void 0 : mt.pixelsPainted) ?? 0) < 100, + !0 + ); + }), + Wr(() => { + x(O) > 1 && (se(St, !1), localStorage.setItem(xt, "false")); + }); + const wt = "lp"; + Fn(() => { + var He; + const mt = localStorage.getItem(wt); + if (mt) + try { + const At = JSON.parse(atob(mt)), + Ft = (At == null ? void 0 : At.time) ?? 0, + Jt = 60 * 1e3; + (At == null ? void 0 : At.userId) !== + ((He = Mt.data) == null ? void 0 : He.id) && + Date.now() - Ft < 30 * Jt && + !Xx && + (Fr.error(YC()), Dt()); + } catch (At) { + console.error(At); + } + }); + function _t() { + var He; + const mt = btoa( + JSON.stringify({ + userId: (He = Mt.data) == null ? void 0 : He.id, + time: Date.now(), + }) + ); + localStorage.setItem(wt, mt); + } + var Lt = XL(), + Rt = Ct(Lt), + $t = A(Rt); + { + var tr = (mt) => { + ol(mt, { + children: (He, At) => { + var Ft = zL(), + Jt = Ct(Ft); + $0(Jt, { class: "inline size-5" }); + var Cr = j(Jt); + We((Er) => de(Cr, ` ${Er ?? ""}`), [() => S5()]), $(He, Ft); + }, + $$slots: { default: !0 }, + }); + }, + Qt = (mt) => { + var He = er(), + At = Ct(He); + { + var Ft = (Cr) => { + ol(Cr, { + class: "not-touchscreen:hidden", + children: (Er, ur) => { + var rn = LL(), + pn = Ct(rn); + Wg(pn, { class: "inline size-5" }); + var gn = j(pn); + We((ln) => de(gn, ` ${ln ?? ""}`), [() => M5()]), $(Er, rn); + }, + $$slots: { default: !0 }, + }); + }, + Jt = (Cr) => { + var Er = er(), + ur = Ct(Er); + { + var rn = (gn) => { + ol(gn, { + class: "not-touchscreen:hidden", + children: (ln, En) => { + var pr = DL(), + In = Ct(pr); + wv(In, { class: "inline size-5" }); + var tn = j(In, 1, !0); + We((en) => de(tn, en), [() => E5()]), $(ln, pr); + }, + $$slots: { default: !0 }, + }); + }, + pn = (gn) => { + var ln = er(), + En = Ct(ln); + { + var pr = (tn) => { + ol(tn, { + class: "touchscreen:hidden", + children: (en, ma) => { + var pi = RL(), + Xi = Ct(pi); + H0(Xi, { class: "inline size-5" }); + var Zn = j(Xi), + ni = A(Zn, !0); + k(Zn); + var Zi = j(Zn, 2), + Yi = A(Zi), + Ei = j(Yi), + zi = A(Ei, !0); + k(Ei), k(Zi); + var Ki = j(Zi); + We( + (oa, Ta, bt, Xt) => { + de(ni, oa), + de(Yi, `${Ta ?? ""} `), + de(zi, bt), + de(Ki, ` ${Xt ?? ""}`); + }, + [() => D5(), () => j5(), () => F5(), () => Z5()] + ), + $(en, pi); + }, + $$slots: { default: !0 }, + }); + }, + In = (tn) => { + var en = er(), + ma = Ct(en); + { + var pi = (Zn) => { + ol(Zn, { + class: + "bg-warning text-warning-content animate-bounce", + children: (ni, Zi) => { + var Yi = BL(), + Ei = Ct(Yi); + zh(Ei, { class: "inline size-5" }); + var zi = j(Ei); + We( + (Ki) => de(zi, ` ${Ki ?? ""}`), + [() => G5()] + ), + $(ni, Yi); + }, + $$slots: { default: !0 }, + }); + }, + Xi = (Zn) => { + var ni = er(), + Zi = Ct(ni); + { + var Yi = (Ei) => { + ol(Ei, { + class: + "bg-warning text-warning-content animate-bounce", + children: (zi, Ki) => { + var oa = FL(), + Ta = Ct(oa); + Gu(Ta, { class: "inline size-5" }); + var bt = j(Ta, 2); + { + var Xt = (xn) => { + var On = wi(); + We( + (Yn) => de(On, Yn), + [() => Qv()] + ), + $(xn, On); + }, + Br = (xn) => { + var On = er(), + Yn = Ct(On); + { + var Vn = (wn) => { + var Ji = wi(); + We( + (sr) => de(Ji, sr), + [() => e0()] + ), + $(wn, Ji); + }; + Oe( + Yn, + (wn) => { + x(Ae).length === 1 && + wn(Vn); + }, + !0 + ); + } + $(xn, On); + }; + Oe(bt, (xn) => { + x(Ae).length === 0 + ? xn(Xt) + : xn(Br, !1); + }); + } + $(zi, oa); + }, + $$slots: { default: !0 }, + }); + }; + Oe( + Zi, + (Ei) => { + x($e) && Ei(Yi); + }, + !0 + ); + } + $(Zn, ni); + }; + Oe( + ma, + (Zn) => { + x(St) ? Zn(pi) : Zn(Xi, !1); + }, + !0 + ); + } + $(tn, en); + }; + Oe( + En, + (tn) => { + x(De) && x(O) === 0 ? tn(pr) : tn(In, !1); + }, + !0 + ); + } + $(gn, ln); + }; + Oe( + ur, + (gn) => { + x(Fe) ? gn(rn) : gn(pn, !1); + }, + !0 + ); + } + $(Cr, Er); + }; + Oe( + At, + (Cr) => { + x(Ee) ? Cr(Ft) : Cr(Jt, !1); + }, + !0 + ); + } + $(mt, He); + }; + Oe($t, (mt) => { + x(Ee) && x(O) === 0 ? mt(tr) : mt(Qt, !1); + }); + } + var Ot = j($t, 2), + Nt = A(Ot); + Nt.__click = [OL, K]; + var or = A(Nt); + { + var cr = (mt) => { + WE(mt, { class: "size-4" }); + }, + Vr = (mt) => { + YE(mt, { class: "size-4" }); + }; + Oe(or, (mt) => { + x(K) ? mt(cr) : mt(Vr, !1); + }); + } + k(Nt); + var mr = j(Nt, 2), + hr = A(mr), + _r = A(hr), + Ir = j(_r); + M0(Ir, { + class: "inline", + fontSize: 14, + get value() { + return `(${x(O) ?? ""})`; + }, + mono: !0, + }), + k(hr); + var qr = j(hr, 2), + ue = A(qr), + V = A(ue); + yn(), k(ue); + var U = j(ue, 2); + U.__click = [NL, T]; + var Y = A(U); + wv(Y, { class: "size-4.5" }), k(U), k(qr); + var ie = j(qr, 2), + pe = A(ie); + let Se; + pe.__click = [jL, y]; + var Me = A(pe); + { + let mt = ft(() => !y()); + G0(Me, { + class: "size-4.5", + get filled() { + return x(mt); + }, + }); + } + k(pe), k(ie); + var we = j(ie, 2); + { + var Ve = (mt) => { + var He = qL(), + At = A(He), + Ft = A(At); + yn(), k(At); + var Jt = j(At, 2); + Jt.__click = [VL, T]; + var Cr = A(Jt); + Gu(Cr, { class: "size-4.5" }), + k(Jt), + k(He), + We( + (Er) => { + de(Ft, `${Er ?? ""} `), + zr( + Jt, + 1, + Yo({ + "btn btn-circle btn-sm": !0, + "btn-ghost": !x($e), + "btn-primary": x($e), + }) + ); + }, + [() => XP()] + ), + $(mt, He); + }; + Oe(we, (mt) => { + x(Je) && mt(Ve); + }); + } + k(mr); + var ut = j(mr, 2); + ut.__click = [ZL, Dt]; + var Ke = A(ut); + _l(Ke, { class: "size-4" }), k(ut), k(Ot); + var kt = j(Ot, 2), + ye = A(kt); + hi( + ye, + 23, + () => x(ke), + (mt) => mt.idx, + (mt, He, At) => { + const Ft = ft(() => { + const [ln, En, pr] = x(He).rgb; + return { r: ln, g: En, b: pr }; + }), + Jt = ft(() => x(z) === x(He).idx && x(De)), + Cr = ft(() => x(He).idx === 0), + Er = ft(() => Mt.hasColor(x(He).idx)); + var ur = GL(), + rn = A(ur); + rn.__click = [UL, yt, He]; + var pn = A(rn); + { + var gn = (ln) => { + var En = $L(), + pr = Ct(En); + Pm(pr, { + class: + "center-absolute absolute size-4 opacity-30 sm:hidden sm:size-6", + }); + var In = j(pr, 2), + tn = A(In); + Pm(tn, { class: "text-base-content/80 size-4" }), k(In), $(ln, En); + }; + Oe(pn, (ln) => { + x(Er) || ln(gn); + }); + } + k(rn), + k(ur), + We(() => { + zr( + ur, + 1, + Yo({ + tooltip: !0, + "max-sm:h-6": x(Ue), + "max-sm:before:translate-x-1/4": + x(At) % 8 === 0 && x(He).name.length > 7, + "max-sm:before:-translate-x-1/4": + (x(At) - 7) % 8 === 0 && x(He).name.length > 7, + "max-xl:before:translate-x-1/4": + x(At) % 16 === 0 && x(He).name.length > 7, + "max-xl:before:-translate-x-1/4": + (x(At) - 15) % 16 === 0 && x(He).name.length > 7, + "xl:before:translate-x-1/4": + x(Ue) && x(At) % 32 === 0 && x(He).name.length > 7, + "xl:before:-translate-x-1/4": + x(Ue) && (x(At) - 31) % 32 === 0 && x(He).name.length > 7, + }) + ), + Tr(ur, "data-tip", x(He).name), + zr( + rn, + 1, + Yo({ + "btn relative aspect-square w-full rounded-xl": !0, + "border-primary ring-primary ring-2": x(Jt), + "border-base-300": !x(Jt) && x(Cr), + "border-base-content/20": !x(Jt) && !x(Cr), + "max-sm:h-6 max-sm:rounded-md": x(Ue), + }) + ), + kc( + rn, + x(Cr) + ? `background-image: url(${UE}); background-size: cover; image-rendering: pixelated;` + : `background: rgb(${x(Ft).r} ${x(Ft).g} ${x(Ft).b})` + ), + Tr(rn, "aria-label", x(He).name), + Tr(rn, "id", `color-${x(He).idx ?? ""}`); + }), + di("focus", rn, () => { + x(Er) && (se(z, x(He).idx, !0), se(T, "pencil")); + }), + $(mt, ur); + } + ), + k(ye), + k(kt); + var Bt = j(kt, 2), + rr = A(Bt); + rr.__click = [HL, Ue]; + var Kt = A(rr); + { + var gr = (mt) => { + kL(mt, { class: "size-5" }); + }, + Ur = (mt) => { + EL(mt, { class: "size-5" }); + }; + Oe(Kt, (mt) => { + x(Ue) ? mt(gr) : mt(Ur, !1); + }); + } + k(rr); + var nn = j(rr, 2), + mn = A(nn); + { + let mt = ft(() => (x(O) > 100 ? "animate-pulse" : "")), + He = ft(() => x(O) === 0 || x(X) || x(H) < 0 || !ai.captcha), + At = ft(() => x(X) || !ai.captcha); + k0(mn, { + get class() { + return x(mt); + }, + get charges() { + return x(H); + }, + get disabled() { + return x(He); + }, + get loading() { + return x(At); + }, + onclick: async () => { + var Cr; + const Ft = (Cr = ai.captcha) == null ? void 0 : Cr.token; + if (!Ft) return; + aa.droppletAndPlop.play(); + const Jt = [...s.values()]; + se(X, !0); + try { + const Er = await xL(); + await Qr.paint(Jt, Ft, Er), + await vx(Jt), + _t(), + Mt.refresh(), + (Yd.shouldReload = !0), + await Dt(); + } catch (Er) { + Fr.error(`${Er.message}`, { duration: 7e3 }); + } finally { + se(X, !1), (ai.captcha = void 0); + } + }, + }); + } + k(nn); + var _n = j(nn, 2), + Vt = A(_n), + Et = A(Vt), + dr = A(Et); + yn(), k(Et); + var ht = j(Et, 2); + let Xr; + ht.__click = [WL, T]; + var Yr = A(ht); + Wg(Yr, { + class: "size-5", + get filled() { + return x(Ee); + }, + }), + k(ht), + k(Vt), + k(_n), + k(Bt), + k(Rt), + Ko( + Rt, + (mt) => se(Le, mt), + () => x(Le) + ); + var Zr = j(Rt, 2); + s8(Zr, { + get colorIdx() { + return x(Ze); + }, + get open() { + return x(qe); + }, + set open(mt) { + se(qe, mt, !0); + }, + }), + We( + (mt, He, At, Ft, Jt, Cr) => { + de(_r, `${mt ?? ""} `), + de(V, `${He ?? ""} `), + zr( + U, + 1, + Yo({ + "btn btn-circle btn-sm": !0, + "btn-ghost": !x(Fe), + "btn-primary": x(Fe), + }) + ), + Tr(ie, "data-tip", At), + (Se = zr( + pe, + 1, + "btn btn-sm btn-circle btn-ghost text-base-content/80", + null, + Se, + Ft + )), + zr( + ye, + 1, + Yo({ + "md:grid-cols-16 min-[100rem]:grid-cols-32 grid grid-cols-8": !0, + "xl:grid-cols-32 sm:grid-cols-16 gap-0.5 sm:gap-1": x(Ue), + "gap-1": !x(Ue), + }) + ), + de(dr, `${Jt ?? ""} `), + (Xr = zr( + ht, + 1, + "btn btn-lg btn-square sm:btn-xl shadow-md", + null, + Xr, + Cr + )), + (ht.disabled = x(O) === 0); + }, + [ + () => X5(), + () => J5(), + () => $v(), + () => ({ "text-primary": !y() }), + () => Bx(), + () => ({ "btn-primary": x(Ee) }), + ] + ), + mp("innerHeight", (mt) => se(Qe, mt, !0)), + $(m, Lt), + Dr(); +} +$n(["click"]); +function Qm(...m) { + return Lv(Ou(m)); +} +var KL = Te("
                  "); +function JL(m, a) { + Lr(a, !0); + let p = zt(a, "ref", 15, null), + y = nr(a, ["$$slots", "$$events", "$$legacy", "ref", "class", "children"]); + var M = KL(); + ar(M, (T) => ({ class: T, ...y }), [() => Qm("flex items-center", a.class)]); + var z = A(M); + oi(z, () => a.children ?? pa), + k(M), + Ko( + M, + (T) => p(T), + () => p() + ), + $(m, M), + Dr(); +} +var QL = Te( + '
                  ' + ), + eD = Te(" ", 1); +function tD(m, a) { + Lr(a, !0); + let p = zt(a, "ref", 15, null), + y = nr(a, ["$$slots", "$$events", "$$legacy", "ref", "cell", "class"]); + var M = er(), + z = Ct(M); + { + let T = ft(() => + Qm( + "border-input relative flex size-12 items-center justify-center border-y border-r text-xl transition-all first:rounded-l-md first:border-l last:rounded-r-md", + a.cell.isActive && "ring-base-content/40 z-10 ring-2", + a.class + ) + ); + xi( + z, + () => BA, + (s, B) => { + B( + s, + Is( + { + get cell() { + return a.cell; + }, + get class() { + return x(T); + }, + }, + () => y, + { + get ref() { + return p(); + }, + set ref(O) { + p(O); + }, + children: (O, X) => { + yn(); + var K = eD(), + ne = Ct(K), + H = j(ne); + { + var fe = (ge) => { + var Ie = QL(); + $(ge, Ie); + }; + Oe(H, (ge) => { + a.cell.hasFakeCaret && ge(fe); + }); + } + We(() => de(ne, `${a.cell.char ?? ""} `)), $(O, K); + }, + $$slots: { default: !0 }, + } + ) + ); + } + ); + } + $(m, M), Dr(); +} +function rD(m, a) { + Lr(a, !0); + let p = zt(a, "ref", 15, null), + y = zt(a, "value", 15, ""), + M = nr(a, ["$$slots", "$$events", "$$legacy", "ref", "class", "value"]); + var z = er(), + T = Ct(z); + { + let s = ft(() => + Qm( + "flex items-center gap-2 has-[:disabled]:opacity-50 [&_input]:disabled:cursor-not-allowed", + a.class + ) + ); + xi( + T, + () => DA, + (B, O) => { + O( + B, + Is( + { + get class() { + return x(s); + }, + }, + () => M, + { + get ref() { + return p(); + }, + set ref(X) { + p(X); + }, + get value() { + return y(); + }, + set value(X) { + y(X); + }, + } + ) + ); + } + ); + } + $(m, z), Dr(); +} +var $f = { exports: {} }, + Tv; +function nD() { + return ( + Tv || + ((Tv = 1), + (function (m) { + (function (a) { + m.exports ? (m.exports = a()) : (window.intlTelInput = a()); + })(() => { + var a = (() => { + var p = Object.defineProperty, + y = Object.getOwnPropertyDescriptor, + M = Object.getOwnPropertyNames, + z = Object.prototype.hasOwnProperty, + T = (ee, re) => { + for (var he in re) p(ee, he, { get: re[he], enumerable: !0 }); + }, + s = (ee, re, he, oe) => { + if ((re && typeof re == "object") || typeof re == "function") + for (let ze of M(re)) + !z.call(ee, ze) && + ze !== he && + p(ee, ze, { + get: () => re[ze], + enumerable: !(oe = y(re, ze)) || oe.enumerable, + }); + return ee; + }, + B = (ee) => s(p({}, "__esModule", { value: !0 }), ee), + O = {}; + T(O, { Iti: () => nt, default: () => vt }); + var X = [ + ["af", "93"], + ["ax", "358", 1], + ["al", "355"], + ["dz", "213"], + ["as", "1", 5, ["684"]], + ["ad", "376"], + ["ao", "244"], + ["ai", "1", 6, ["264"]], + ["ag", "1", 7, ["268"]], + ["ar", "54"], + ["am", "374"], + ["aw", "297"], + ["ac", "247"], + ["au", "61", 0, null, "0"], + ["at", "43"], + ["az", "994"], + ["bs", "1", 8, ["242"]], + ["bh", "973"], + ["bd", "880"], + ["bb", "1", 9, ["246"]], + ["by", "375"], + ["be", "32"], + ["bz", "501"], + ["bj", "229"], + ["bm", "1", 10, ["441"]], + ["bt", "975"], + ["bo", "591"], + ["ba", "387"], + ["bw", "267"], + ["br", "55"], + ["io", "246"], + ["vg", "1", 11, ["284"]], + ["bn", "673"], + ["bg", "359"], + ["bf", "226"], + ["bi", "257"], + ["kh", "855"], + ["cm", "237"], + [ + "ca", + "1", + 1, + [ + "204", + "226", + "236", + "249", + "250", + "263", + "289", + "306", + "343", + "354", + "365", + "367", + "368", + "382", + "387", + "403", + "416", + "418", + "428", + "431", + "437", + "438", + "450", + "584", + "468", + "474", + "506", + "514", + "519", + "548", + "579", + "581", + "584", + "587", + "604", + "613", + "639", + "647", + "672", + "683", + "705", + "709", + "742", + "753", + "778", + "780", + "782", + "807", + "819", + "825", + "867", + "873", + "879", + "902", + "905", + ], + ], + ["cv", "238"], + ["bq", "599", 1, ["3", "4", "7"]], + ["ky", "1", 12, ["345"]], + ["cf", "236"], + ["td", "235"], + ["cl", "56"], + ["cn", "86"], + ["cx", "61", 2, ["89164"], "0"], + ["cc", "61", 1, ["89162"], "0"], + ["co", "57"], + ["km", "269"], + ["cg", "242"], + ["cd", "243"], + ["ck", "682"], + ["cr", "506"], + ["ci", "225"], + ["hr", "385"], + ["cu", "53"], + ["cw", "599", 0], + ["cy", "357"], + ["cz", "420"], + ["dk", "45"], + ["dj", "253"], + ["dm", "1", 13, ["767"]], + ["do", "1", 2, ["809", "829", "849"]], + ["ec", "593"], + ["eg", "20"], + ["sv", "503"], + ["gq", "240"], + ["er", "291"], + ["ee", "372"], + ["sz", "268"], + ["et", "251"], + ["fk", "500"], + ["fo", "298"], + ["fj", "679"], + ["fi", "358", 0], + ["fr", "33"], + ["gf", "594"], + ["pf", "689"], + ["ga", "241"], + ["gm", "220"], + ["ge", "995"], + ["de", "49"], + ["gh", "233"], + ["gi", "350"], + ["gr", "30"], + ["gl", "299"], + ["gd", "1", 14, ["473"]], + ["gp", "590", 0], + ["gu", "1", 15, ["671"]], + ["gt", "502"], + ["gg", "44", 1, ["1481", "7781", "7839", "7911"], "0"], + ["gn", "224"], + ["gw", "245"], + ["gy", "592"], + ["ht", "509"], + ["hn", "504"], + ["hk", "852"], + ["hu", "36"], + ["is", "354"], + ["in", "91"], + ["id", "62"], + ["ir", "98"], + ["iq", "964"], + ["ie", "353"], + ["im", "44", 2, ["1624", "74576", "7524", "7924", "7624"], "0"], + ["il", "972"], + ["it", "39", 0], + ["jm", "1", 4, ["876", "658"]], + ["jp", "81"], + [ + "je", + "44", + 3, + ["1534", "7509", "7700", "7797", "7829", "7937"], + "0", + ], + ["jo", "962"], + ["kz", "7", 1, ["33", "7"], "8"], + ["ke", "254"], + ["ki", "686"], + ["xk", "383"], + ["kw", "965"], + ["kg", "996"], + ["la", "856"], + ["lv", "371"], + ["lb", "961"], + ["ls", "266"], + ["lr", "231"], + ["ly", "218"], + ["li", "423"], + ["lt", "370"], + ["lu", "352"], + ["mo", "853"], + ["mg", "261"], + ["mw", "265"], + ["my", "60"], + ["mv", "960"], + ["ml", "223"], + ["mt", "356"], + ["mh", "692"], + ["mq", "596"], + ["mr", "222"], + ["mu", "230"], + ["yt", "262", 1, ["269", "639"], "0"], + ["mx", "52"], + ["fm", "691"], + ["md", "373"], + ["mc", "377"], + ["mn", "976"], + ["me", "382"], + ["ms", "1", 16, ["664"]], + ["ma", "212", 0, null, "0"], + ["mz", "258"], + ["mm", "95"], + ["na", "264"], + ["nr", "674"], + ["np", "977"], + ["nl", "31"], + ["nc", "687"], + ["nz", "64"], + ["ni", "505"], + ["ne", "227"], + ["ng", "234"], + ["nu", "683"], + ["nf", "672"], + ["kp", "850"], + ["mk", "389"], + ["mp", "1", 17, ["670"]], + ["no", "47", 0], + ["om", "968"], + ["pk", "92"], + ["pw", "680"], + ["ps", "970"], + ["pa", "507"], + ["pg", "675"], + ["py", "595"], + ["pe", "51"], + ["ph", "63"], + ["pl", "48"], + ["pt", "351"], + ["pr", "1", 3, ["787", "939"]], + ["qa", "974"], + ["re", "262", 0, null, "0"], + ["ro", "40"], + ["ru", "7", 0, null, "8"], + ["rw", "250"], + ["ws", "685"], + ["sm", "378"], + ["st", "239"], + ["sa", "966"], + ["sn", "221"], + ["rs", "381"], + ["sc", "248"], + ["sl", "232"], + ["sg", "65"], + ["sx", "1", 21, ["721"]], + ["sk", "421"], + ["si", "386"], + ["sb", "677"], + ["so", "252"], + ["za", "27"], + ["kr", "82"], + ["ss", "211"], + ["es", "34"], + ["lk", "94"], + ["bl", "590", 1], + ["sh", "290"], + ["kn", "1", 18, ["869"]], + ["lc", "1", 19, ["758"]], + ["mf", "590", 2], + ["pm", "508"], + ["vc", "1", 20, ["784"]], + ["sd", "249"], + ["sr", "597"], + ["sj", "47", 1, ["79"]], + ["se", "46"], + ["ch", "41"], + ["sy", "963"], + ["tw", "886"], + ["tj", "992"], + ["tz", "255"], + ["th", "66"], + ["tl", "670"], + ["tg", "228"], + ["tk", "690"], + ["to", "676"], + ["tt", "1", 22, ["868"]], + ["tn", "216"], + ["tr", "90"], + ["tm", "993"], + ["tc", "1", 23, ["649"]], + ["tv", "688"], + ["ug", "256"], + ["ua", "380"], + ["ae", "971"], + ["gb", "44", 0, null, "0"], + ["us", "1", 0], + ["uy", "598"], + ["vi", "1", 24, ["340"]], + ["uz", "998"], + ["vu", "678"], + ["va", "39", 1, ["06698"]], + ["ve", "58"], + ["vn", "84"], + ["wf", "681"], + ["eh", "212", 1, ["5288", "5289"], "0"], + ["ye", "967"], + ["zm", "260"], + ["zw", "263"], + ], + K = []; + for (let ee = 0; ee < X.length; ee++) { + const re = X[ee]; + K[ee] = { + name: "", + iso2: re[0], + dialCode: re[1], + priority: re[2] || 0, + areaCodes: re[3] || null, + nodeById: {}, + nationalPrefix: re[4] || null, + }; + } + var ne = K, + H = { + ad: "Andorra", + ae: "United Arab Emirates", + af: "Afghanistan", + ag: "Antigua & Barbuda", + ai: "Anguilla", + al: "Albania", + am: "Armenia", + ao: "Angola", + ar: "Argentina", + as: "American Samoa", + at: "Austria", + au: "Australia", + aw: "Aruba", + ax: "Åland Islands", + az: "Azerbaijan", + ba: "Bosnia & Herzegovina", + bb: "Barbados", + bd: "Bangladesh", + be: "Belgium", + bf: "Burkina Faso", + bg: "Bulgaria", + bh: "Bahrain", + bi: "Burundi", + bj: "Benin", + bl: "St. Barthélemy", + bm: "Bermuda", + bn: "Brunei", + bo: "Bolivia", + bq: "Caribbean Netherlands", + br: "Brazil", + bs: "Bahamas", + bt: "Bhutan", + bw: "Botswana", + by: "Belarus", + bz: "Belize", + ca: "Canada", + cc: "Cocos (Keeling) Islands", + cd: "Congo - Kinshasa", + cf: "Central African Republic", + cg: "Congo - Brazzaville", + ch: "Switzerland", + ci: "Côte d’Ivoire", + ck: "Cook Islands", + cl: "Chile", + cm: "Cameroon", + cn: "China", + co: "Colombia", + cr: "Costa Rica", + cu: "Cuba", + cv: "Cape Verde", + cw: "Curaçao", + cx: "Christmas Island", + cy: "Cyprus", + cz: "Czechia", + de: "Germany", + dj: "Djibouti", + dk: "Denmark", + dm: "Dominica", + do: "Dominican Republic", + dz: "Algeria", + ec: "Ecuador", + ee: "Estonia", + eg: "Egypt", + eh: "Western Sahara", + er: "Eritrea", + es: "Spain", + et: "Ethiopia", + fi: "Finland", + fj: "Fiji", + fk: "Falkland Islands", + fm: "Micronesia", + fo: "Faroe Islands", + fr: "France", + ga: "Gabon", + gb: "United Kingdom", + gd: "Grenada", + ge: "Georgia", + gf: "French Guiana", + gg: "Guernsey", + gh: "Ghana", + gi: "Gibraltar", + gl: "Greenland", + gm: "Gambia", + gn: "Guinea", + gp: "Guadeloupe", + gq: "Equatorial Guinea", + gr: "Greece", + gt: "Guatemala", + gu: "Guam", + gw: "Guinea-Bissau", + gy: "Guyana", + hk: "Hong Kong SAR China", + hn: "Honduras", + hr: "Croatia", + ht: "Haiti", + hu: "Hungary", + id: "Indonesia", + ie: "Ireland", + il: "Israel", + im: "Isle of Man", + in: "India", + io: "British Indian Ocean Territory", + iq: "Iraq", + ir: "Iran", + is: "Iceland", + it: "Italy", + je: "Jersey", + jm: "Jamaica", + jo: "Jordan", + jp: "Japan", + ke: "Kenya", + kg: "Kyrgyzstan", + kh: "Cambodia", + ki: "Kiribati", + km: "Comoros", + kn: "St. Kitts & Nevis", + kp: "North Korea", + kr: "South Korea", + kw: "Kuwait", + ky: "Cayman Islands", + kz: "Kazakhstan", + la: "Laos", + lb: "Lebanon", + lc: "St. Lucia", + li: "Liechtenstein", + lk: "Sri Lanka", + lr: "Liberia", + ls: "Lesotho", + lt: "Lithuania", + lu: "Luxembourg", + lv: "Latvia", + ly: "Libya", + ma: "Morocco", + mc: "Monaco", + md: "Moldova", + me: "Montenegro", + mf: "St. Martin", + mg: "Madagascar", + mh: "Marshall Islands", + mk: "North Macedonia", + ml: "Mali", + mm: "Myanmar (Burma)", + mn: "Mongolia", + mo: "Macao SAR China", + mp: "Northern Mariana Islands", + mq: "Martinique", + mr: "Mauritania", + ms: "Montserrat", + mt: "Malta", + mu: "Mauritius", + mv: "Maldives", + mw: "Malawi", + mx: "Mexico", + my: "Malaysia", + mz: "Mozambique", + na: "Namibia", + nc: "New Caledonia", + ne: "Niger", + nf: "Norfolk Island", + ng: "Nigeria", + ni: "Nicaragua", + nl: "Netherlands", + no: "Norway", + np: "Nepal", + nr: "Nauru", + nu: "Niue", + nz: "New Zealand", + om: "Oman", + pa: "Panama", + pe: "Peru", + pf: "French Polynesia", + pg: "Papua New Guinea", + ph: "Philippines", + pk: "Pakistan", + pl: "Poland", + pm: "St. Pierre & Miquelon", + pr: "Puerto Rico", + ps: "Palestinian Territories", + pt: "Portugal", + pw: "Palau", + py: "Paraguay", + qa: "Qatar", + re: "Réunion", + ro: "Romania", + rs: "Serbia", + ru: "Russia", + rw: "Rwanda", + sa: "Saudi Arabia", + sb: "Solomon Islands", + sc: "Seychelles", + sd: "Sudan", + se: "Sweden", + sg: "Singapore", + sh: "St. Helena", + si: "Slovenia", + sj: "Svalbard & Jan Mayen", + sk: "Slovakia", + sl: "Sierra Leone", + sm: "San Marino", + sn: "Senegal", + so: "Somalia", + sr: "Suriname", + ss: "South Sudan", + st: "São Tomé & Príncipe", + sv: "El Salvador", + sx: "Sint Maarten", + sy: "Syria", + sz: "Eswatini", + tc: "Turks & Caicos Islands", + td: "Chad", + tg: "Togo", + th: "Thailand", + tj: "Tajikistan", + tk: "Tokelau", + tl: "Timor-Leste", + tm: "Turkmenistan", + tn: "Tunisia", + to: "Tonga", + tr: "Turkey", + tt: "Trinidad & Tobago", + tv: "Tuvalu", + tw: "Taiwan", + tz: "Tanzania", + ua: "Ukraine", + ug: "Uganda", + us: "United States", + uy: "Uruguay", + uz: "Uzbekistan", + va: "Vatican City", + vc: "St. Vincent & Grenadines", + ve: "Venezuela", + vg: "British Virgin Islands", + vi: "U.S. Virgin Islands", + vn: "Vietnam", + vu: "Vanuatu", + wf: "Wallis & Futuna", + ws: "Samoa", + ye: "Yemen", + yt: "Mayotte", + za: "South Africa", + zm: "Zambia", + zw: "Zimbabwe", + }, + fe = H, + ge = { + selectedCountryAriaLabel: "Selected country", + noCountrySelected: "No country selected", + countryListAriaLabel: "List of countries", + searchPlaceholder: "Search", + zeroSearchResults: "No results found", + oneSearchResult: "1 result found", + multipleSearchResults: "${count} results found", + ac: "Ascension Island", + xk: "Kosovo", + }, + Ie = ge, + Ae = { ...fe, ...Ie }, + De = Ae; + for (let ee = 0; ee < ne.length; ee++) + ne[ee].name = De[ne[ee].iso2]; + var Ee = 0, + Fe = { + allowDropdown: !0, + autoPlaceholder: "polite", + containerClass: "", + countryOrder: null, + countrySearch: !0, + customPlaceholder: null, + dropdownContainer: null, + excludeCountries: [], + fixDropdownWidth: !0, + formatAsYouType: !0, + formatOnDisplay: !0, + geoIpLookup: null, + hiddenInput: null, + i18n: {}, + initialCountry: "", + loadUtils: null, + nationalMode: !0, + onlyCountries: [], + placeholderNumberType: "MOBILE", + showFlags: !0, + separateDialCode: !1, + strictMode: !1, + useFullscreenPopup: + typeof navigator < "u" && typeof window < "u" + ? /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test( + navigator.userAgent + ) || window.innerWidth <= 500 + : !1, + validationNumberTypes: ["MOBILE"], + }, + $e = [ + "800", + "822", + "833", + "844", + "855", + "866", + "877", + "880", + "881", + "882", + "883", + "884", + "885", + "886", + "887", + "888", + "889", + ], + Je = (ee) => ee.replace(/\D/g, ""), + qe = (ee = "") => + ee + .normalize("NFD") + .replace(/[\u0300-\u036f]/g, "") + .toLowerCase(), + Ze = (ee) => { + const re = Je(ee); + if (re.charAt(0) === "1") { + const he = re.substr(1, 3); + return $e.includes(he); + } + return !1; + }, + Qe = (ee, re, he, oe) => { + if (he === 0 && !oe) return 0; + let ze = 0; + for (let je = 0; je < re.length; je++) { + if ((/[+0-9]/.test(re[je]) && ze++, ze === ee && !oe)) + return je + 1; + if (oe && ze === ee + 1) return je; + } + return re.length; + }, + Le = (ee, re, he) => { + const oe = document.createElement(ee); + return ( + re && + Object.entries(re).forEach(([ze, je]) => + oe.setAttribute(ze, je) + ), + he && he.appendChild(oe), + oe + ); + }, + et = (ee, ...re) => { + const { instances: he } = ke; + Object.values(he).forEach((oe) => oe[ee](...re)); + }, + nt = class { + constructor(ee, re = {}) { + (this.id = Ee++), + (this.telInput = ee), + (this.highlightedItem = null), + (this.options = Object.assign({}, Fe, re)), + (this.hadInitialPlaceholder = + !!ee.getAttribute("placeholder")); + } + _init() { + this.options.useFullscreenPopup && + (this.options.fixDropdownWidth = !1), + this.options.onlyCountries.length === 1 && + (this.options.initialCountry = + this.options.onlyCountries[0]), + this.options.separateDialCode && + (this.options.nationalMode = !1), + this.options.allowDropdown && + !this.options.showFlags && + !this.options.separateDialCode && + (this.options.nationalMode = !1), + this.options.useFullscreenPopup && + !this.options.dropdownContainer && + (this.options.dropdownContainer = document.body), + (this.isAndroid = + typeof navigator < "u" + ? /Android/i.test(navigator.userAgent) + : !1), + (this.isRTL = !!this.telInput.closest("[dir=rtl]")); + const ee = + this.options.allowDropdown || this.options.separateDialCode; + (this.showSelectedCountryOnLeft = this.isRTL ? !ee : ee), + this.options.separateDialCode && + (this.isRTL + ? (this.originalPaddingRight = + this.telInput.style.paddingRight) + : (this.originalPaddingLeft = + this.telInput.style.paddingLeft)), + (this.options.i18n = { ...De, ...this.options.i18n }); + const re = new Promise((oe, ze) => { + (this.resolveAutoCountryPromise = oe), + (this.rejectAutoCountryPromise = ze); + }), + he = new Promise((oe, ze) => { + (this.resolveUtilsScriptPromise = oe), + (this.rejectUtilsScriptPromise = ze); + }); + (this.promise = Promise.all([re, he])), + (this.selectedCountryData = {}), + this._processCountryData(), + this._generateMarkup(), + this._setInitialState(), + this._initListeners(), + this._initRequests(); + } + _processCountryData() { + this._processAllCountries(), + this._processDialCodes(), + this._translateCountryNames(), + this._sortCountries(); + } + _sortCountries() { + this.options.countryOrder && + (this.options.countryOrder = this.options.countryOrder.map( + (ee) => ee.toLowerCase() + )), + this.countries.sort((ee, re) => { + const { countryOrder: he } = this.options; + if (he) { + const oe = he.indexOf(ee.iso2), + ze = he.indexOf(re.iso2), + je = oe > -1, + pt = ze > -1; + if (je || pt) return je && pt ? oe - ze : je ? -1 : 1; + } + return ee.name.localeCompare(re.name); + }); + } + _addToDialCodeMap(ee, re, he) { + re.length > this.dialCodeMaxLen && + (this.dialCodeMaxLen = re.length), + this.dialCodeToIso2Map.hasOwnProperty(re) || + (this.dialCodeToIso2Map[re] = []); + for (let ze = 0; ze < this.dialCodeToIso2Map[re].length; ze++) + if (this.dialCodeToIso2Map[re][ze] === ee) return; + const oe = + he !== void 0 ? he : this.dialCodeToIso2Map[re].length; + this.dialCodeToIso2Map[re][oe] = ee; + } + _processAllCountries() { + const { onlyCountries: ee, excludeCountries: re } = + this.options; + if (ee.length) { + const he = ee.map((oe) => oe.toLowerCase()); + this.countries = ne.filter((oe) => he.includes(oe.iso2)); + } else if (re.length) { + const he = re.map((oe) => oe.toLowerCase()); + this.countries = ne.filter((oe) => !he.includes(oe.iso2)); + } else this.countries = ne; + } + _translateCountryNames() { + for (let ee = 0; ee < this.countries.length; ee++) { + const re = this.countries[ee].iso2.toLowerCase(); + this.options.i18n.hasOwnProperty(re) && + (this.countries[ee].name = this.options.i18n[re]); + } + } + _processDialCodes() { + (this.dialCodes = {}), + (this.dialCodeMaxLen = 0), + (this.dialCodeToIso2Map = {}); + for (let ee = 0; ee < this.countries.length; ee++) { + const re = this.countries[ee]; + this.dialCodes[re.dialCode] || + (this.dialCodes[re.dialCode] = !0), + this._addToDialCodeMap(re.iso2, re.dialCode, re.priority); + } + for (let ee = 0; ee < this.countries.length; ee++) { + const re = this.countries[ee]; + if (re.areaCodes) { + const he = this.dialCodeToIso2Map[re.dialCode][0]; + for (let oe = 0; oe < re.areaCodes.length; oe++) { + const ze = re.areaCodes[oe]; + for (let je = 1; je < ze.length; je++) { + const pt = ze.substr(0, je), + it = re.dialCode + pt; + this._addToDialCodeMap(he, it), + this._addToDialCodeMap(re.iso2, it); + } + this._addToDialCodeMap(re.iso2, re.dialCode + ze); + } + } + } + } + _generateMarkup() { + var dt, yt, xt; + this.telInput.classList.add("iti__tel-input"), + !this.telInput.hasAttribute("autocomplete") && + !( + this.telInput.form && + this.telInput.form.hasAttribute("autocomplete") + ) && + this.telInput.setAttribute("autocomplete", "off"); + const { + allowDropdown: ee, + separateDialCode: re, + showFlags: he, + containerClass: oe, + hiddenInput: ze, + dropdownContainer: je, + fixDropdownWidth: pt, + useFullscreenPopup: it, + countrySearch: ct, + i18n: It, + } = this.options; + let Dt = "iti"; + ee && (Dt += " iti--allow-dropdown"), + he && (Dt += " iti--show-flags"), + oe && (Dt += ` ${oe}`), + it || (Dt += " iti--inline-dropdown"); + const at = Le("div", { class: Dt }); + if ( + ((dt = this.telInput.parentNode) == null || + dt.insertBefore(at, this.telInput), + ee || he || re) + ) { + (this.countryContainer = Le( + "div", + { class: "iti__country-container" }, + at + )), + this.showSelectedCountryOnLeft + ? (this.countryContainer.style.left = "0px") + : (this.countryContainer.style.right = "0px"), + ee + ? ((this.selectedCountry = Le( + "button", + { + type: "button", + class: "iti__selected-country", + "aria-expanded": "false", + "aria-label": + this.options.i18n.selectedCountryAriaLabel, + "aria-haspopup": "true", + "aria-controls": `iti-${this.id}__dropdown-content`, + role: "combobox", + }, + this.countryContainer + )), + this.telInput.disabled && + this.selectedCountry.setAttribute( + "disabled", + "true" + )) + : (this.selectedCountry = Le( + "div", + { class: "iti__selected-country" }, + this.countryContainer + )); + const St = Le( + "div", + { class: "iti__selected-country-primary" }, + this.selectedCountry + ); + if ( + ((this.selectedCountryInner = Le( + "div", + { class: "iti__flag" }, + St + )), + (this.selectedCountryA11yText = Le( + "span", + { class: "iti__a11y-text" }, + this.selectedCountryInner + )), + ee && + (this.dropdownArrow = Le( + "div", + { class: "iti__arrow", "aria-hidden": "true" }, + St + )), + re && + (this.selectedDialCode = Le( + "div", + { class: "iti__selected-dial-code" }, + this.selectedCountry + )), + ee) + ) { + const wt = pt ? "" : "iti--flexible-dropdown-width"; + if ( + ((this.dropdownContent = Le("div", { + id: `iti-${this.id}__dropdown-content`, + class: `iti__dropdown-content iti__hide ${wt}`, + })), + ct && + ((this.searchInput = Le( + "input", + { + type: "text", + class: "iti__search-input", + placeholder: It.searchPlaceholder, + role: "combobox", + "aria-expanded": "true", + "aria-label": It.searchPlaceholder, + "aria-controls": `iti-${this.id}__country-listbox`, + "aria-autocomplete": "list", + autocomplete: "off", + }, + this.dropdownContent + )), + (this.searchResultsA11yText = Le( + "span", + { class: "iti__a11y-text" }, + this.dropdownContent + ))), + (this.countryList = Le( + "ul", + { + class: "iti__country-list", + id: `iti-${this.id}__country-listbox`, + role: "listbox", + "aria-label": It.countryListAriaLabel, + }, + this.dropdownContent + )), + this._appendListItems(), + ct && this._updateSearchResultsText(), + je) + ) { + let _t = "iti iti--container"; + it + ? (_t += " iti--fullscreen-popup") + : (_t += " iti--inline-dropdown"), + (this.dropdown = Le("div", { class: _t })), + this.dropdown.appendChild(this.dropdownContent); + } else + this.countryContainer.appendChild(this.dropdownContent); + } + } + if ( + (at.appendChild(this.telInput), + this._updateInputPadding(), + ze) + ) { + const St = this.telInput.getAttribute("name") || "", + wt = ze(St); + if (wt.phone) { + const _t = + (yt = this.telInput.form) == null + ? void 0 + : yt.querySelector(`input[name="${wt.phone}"]`); + _t + ? (this.hiddenInput = _t) + : ((this.hiddenInput = Le("input", { + type: "hidden", + name: wt.phone, + })), + at.appendChild(this.hiddenInput)); + } + if (wt.country) { + const _t = + (xt = this.telInput.form) == null + ? void 0 + : xt.querySelector(`input[name="${wt.country}"]`); + _t + ? (this.hiddenInputCountry = _t) + : ((this.hiddenInputCountry = Le("input", { + type: "hidden", + name: wt.country, + })), + at.appendChild(this.hiddenInputCountry)); + } + } + } + _appendListItems() { + for (let ee = 0; ee < this.countries.length; ee++) { + const re = this.countries[ee], + he = ee === 0 ? "iti__highlight" : "", + oe = Le( + "li", + { + id: `iti-${this.id}__item-${re.iso2}`, + class: `iti__country ${he}`, + tabindex: "-1", + role: "option", + "data-dial-code": re.dialCode, + "data-country-code": re.iso2, + "aria-selected": "false", + }, + this.countryList + ); + re.nodeById[this.id] = oe; + let ze = ""; + this.options.showFlags && + (ze += `
                  `), + (ze += `${re.name}`), + (ze += `+${re.dialCode}`), + oe.insertAdjacentHTML("beforeend", ze); + } + } + _setInitialState(ee = !1) { + const re = this.telInput.getAttribute("value"), + he = this.telInput.value, + ze = + re && + re.charAt(0) === "+" && + (!he || he.charAt(0) !== "+") + ? re + : he, + je = this._getDialCode(ze), + pt = Ze(ze), + { initialCountry: it, geoIpLookup: ct } = this.options, + It = it === "auto" && ct; + if (je && !pt) this._updateCountryFromNumber(ze); + else if (!It || ee) { + const Dt = it ? it.toLowerCase() : ""; + Dt && this._getCountryData(Dt, !0) + ? this._setCountry(Dt) + : je && pt + ? this._setCountry("us") + : this._setCountry(); + } + ze && this._updateValFromNumber(ze); + } + _initListeners() { + this._initTelInputListeners(), + this.options.allowDropdown && this._initDropdownListeners(), + (this.hiddenInput || this.hiddenInputCountry) && + this.telInput.form && + this._initHiddenInputListener(); + } + _initHiddenInputListener() { + var ee; + (this._handleHiddenInputSubmit = () => { + this.hiddenInput && + (this.hiddenInput.value = this.getNumber()), + this.hiddenInputCountry && + (this.hiddenInputCountry.value = + this.getSelectedCountryData().iso2 || ""); + }), + (ee = this.telInput.form) == null || + ee.addEventListener( + "submit", + this._handleHiddenInputSubmit + ); + } + _initDropdownListeners() { + this._handleLabelClick = (re) => { + this.dropdownContent.classList.contains("iti__hide") + ? this.telInput.focus() + : re.preventDefault(); + }; + const ee = this.telInput.closest("label"); + ee && ee.addEventListener("click", this._handleLabelClick), + (this._handleClickSelectedCountry = () => { + this.dropdownContent.classList.contains("iti__hide") && + !this.telInput.disabled && + !this.telInput.readOnly && + this._openDropdown(); + }), + this.selectedCountry.addEventListener( + "click", + this._handleClickSelectedCountry + ), + (this._handleCountryContainerKeydown = (re) => { + this.dropdownContent.classList.contains("iti__hide") && + ["ArrowUp", "ArrowDown", " ", "Enter"].includes( + re.key + ) && + (re.preventDefault(), + re.stopPropagation(), + this._openDropdown()), + re.key === "Tab" && this._closeDropdown(); + }), + this.countryContainer.addEventListener( + "keydown", + this._handleCountryContainerKeydown + ); + } + _initRequests() { + let { + loadUtils: ee, + initialCountry: re, + geoIpLookup: he, + } = this.options; + ee && !ke.utils + ? ((this._handlePageLoad = () => { + var ze; + window.removeEventListener( + "load", + this._handlePageLoad + ), + (ze = ke.attachUtils(ee)) == null || + ze.catch(() => {}); + }), + ke.documentReady() + ? this._handlePageLoad() + : window.addEventListener("load", this._handlePageLoad)) + : this.resolveUtilsScriptPromise(), + re === "auto" && he && !this.selectedCountryData.iso2 + ? this._loadAutoCountry() + : this.resolveAutoCountryPromise(); + } + _loadAutoCountry() { + ke.autoCountry + ? this.handleAutoCountry() + : ke.startedLoadingAutoCountry || + ((ke.startedLoadingAutoCountry = !0), + typeof this.options.geoIpLookup == "function" && + this.options.geoIpLookup( + (ee = "") => { + const re = ee.toLowerCase(); + re && this._getCountryData(re, !0) + ? ((ke.autoCountry = re), + setTimeout(() => et("handleAutoCountry"))) + : (this._setInitialState(!0), + et("rejectAutoCountryPromise")); + }, + () => { + this._setInitialState(!0), + et("rejectAutoCountryPromise"); + } + )); + } + _openDropdownWithPlus() { + this._openDropdown(), + (this.searchInput.value = "+"), + this._filterCountries("", !0); + } + _initTelInputListeners() { + const { + strictMode: ee, + formatAsYouType: re, + separateDialCode: he, + formatOnDisplay: oe, + allowDropdown: ze, + countrySearch: je, + } = this.options; + let pt = !1; + new RegExp("\\p{L}", "u").test(this.telInput.value) && + (pt = !0), + (this._handleInputEvent = (it) => { + if ( + this.isAndroid && + (it == null ? void 0 : it.data) === "+" && + he && + ze && + je + ) { + const at = this.telInput.selectionStart || 0, + dt = this.telInput.value.substring(0, at - 1), + yt = this.telInput.value.substring(at); + (this.telInput.value = dt + yt), + this._openDropdownWithPlus(); + return; + } + this._updateCountryFromNumber(this.telInput.value) && + this._triggerCountryChange(); + const ct = + (it == null ? void 0 : it.data) && + /[^+0-9]/.test(it.data), + It = + (it == null ? void 0 : it.inputType) === + "insertFromPaste" && this.telInput.value; + ct || (It && !ee) + ? (pt = !0) + : /[^+0-9]/.test(this.telInput.value) || (pt = !1); + const Dt = + (it == null ? void 0 : it.detail) && + it.detail.isSetNumber && + !oe; + if (re && !pt && !Dt) { + const at = this.telInput.selectionStart || 0, + yt = this.telInput.value + .substring(0, at) + .replace(/[^+0-9]/g, "").length, + xt = + (it == null ? void 0 : it.inputType) === + "deleteContentForward", + St = this._formatNumberAsYouType(), + wt = Qe(yt, St, at, xt); + (this.telInput.value = St), + this.telInput.setSelectionRange(wt, wt); + } + }), + this.telInput.addEventListener( + "input", + this._handleInputEvent + ), + (ee || he) && + ((this._handleKeydownEvent = (it) => { + if ( + it.key && + it.key.length === 1 && + !it.altKey && + !it.ctrlKey && + !it.metaKey + ) { + if (he && ze && je && it.key === "+") { + it.preventDefault(), this._openDropdownWithPlus(); + return; + } + if (ee) { + const ct = this.telInput.value, + It = ct.charAt(0) === "+", + Dt = + !It && + this.telInput.selectionStart === 0 && + it.key === "+", + at = /^[0-9]$/.test(it.key), + dt = he ? at : Dt || at, + yt = + ct.slice(0, this.telInput.selectionStart) + + it.key + + ct.slice(this.telInput.selectionEnd), + xt = this._getFullNumber(yt), + St = ke.utils.getCoreNumber( + xt, + this.selectedCountryData.iso2 + ), + wt = + this.maxCoreNumberLength && + St.length > this.maxCoreNumberLength; + let _t = !1; + if (It) { + const Lt = this.selectedCountryData.iso2; + _t = this._getCountryFromNumber(xt) !== Lt; + } + (!dt || (wt && !_t && !Dt)) && it.preventDefault(); + } + } + }), + this.telInput.addEventListener( + "keydown", + this._handleKeydownEvent + )); + } + _cap(ee) { + const re = parseInt( + this.telInput.getAttribute("maxlength") || "", + 10 + ); + return re && ee.length > re ? ee.substr(0, re) : ee; + } + _trigger(ee, re = {}) { + const he = new CustomEvent(ee, { + bubbles: !0, + cancelable: !0, + detail: re, + }); + this.telInput.dispatchEvent(he); + } + _openDropdown() { + const { fixDropdownWidth: ee, countrySearch: re } = + this.options; + if ( + (ee && + (this.dropdownContent.style.width = `${this.telInput.offsetWidth}px`), + this.dropdownContent.classList.remove("iti__hide"), + this.selectedCountry.setAttribute("aria-expanded", "true"), + this._setDropdownPosition(), + re) + ) { + const he = this.countryList.firstElementChild; + he && + (this._highlightListItem(he, !1), + (this.countryList.scrollTop = 0)), + this.searchInput.focus(); + } + this._bindDropdownListeners(), + this.dropdownArrow.classList.add("iti__arrow--up"), + this._trigger("open:countrydropdown"); + } + _setDropdownPosition() { + if ( + (this.options.dropdownContainer && + this.options.dropdownContainer.appendChild(this.dropdown), + !this.options.useFullscreenPopup) + ) { + const ee = this.telInput.getBoundingClientRect(), + re = this.telInput.offsetHeight; + this.options.dropdownContainer && + ((this.dropdown.style.top = `${ee.top + re}px`), + (this.dropdown.style.left = `${ee.left}px`), + (this._handleWindowScroll = () => this._closeDropdown()), + window.addEventListener( + "scroll", + this._handleWindowScroll + )); + } + } + _bindDropdownListeners() { + (this._handleMouseoverCountryList = (oe) => { + var je; + const ze = + (je = oe.target) == null + ? void 0 + : je.closest(".iti__country"); + ze && this._highlightListItem(ze, !1); + }), + this.countryList.addEventListener( + "mouseover", + this._handleMouseoverCountryList + ), + (this._handleClickCountryList = (oe) => { + var je; + const ze = + (je = oe.target) == null + ? void 0 + : je.closest(".iti__country"); + ze && this._selectListItem(ze); + }), + this.countryList.addEventListener( + "click", + this._handleClickCountryList + ); + let ee = !0; + (this._handleClickOffToClose = () => { + ee || this._closeDropdown(), (ee = !1); + }), + document.documentElement.addEventListener( + "click", + this._handleClickOffToClose + ); + let re = "", + he = null; + if ( + ((this._handleKeydownOnDropdown = (oe) => { + ["ArrowUp", "ArrowDown", "Enter", "Escape"].includes( + oe.key + ) && + (oe.preventDefault(), + oe.stopPropagation(), + oe.key === "ArrowUp" || oe.key === "ArrowDown" + ? this._handleUpDownKey(oe.key) + : oe.key === "Enter" + ? this._handleEnterKey() + : oe.key === "Escape" && this._closeDropdown()), + !this.options.countrySearch && + /^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(oe.key) && + (oe.stopPropagation(), + he && clearTimeout(he), + (re += oe.key.toLowerCase()), + this._searchForCountry(re), + (he = setTimeout(() => { + re = ""; + }, 1e3))); + }), + document.addEventListener( + "keydown", + this._handleKeydownOnDropdown + ), + this.options.countrySearch) + ) { + const oe = () => { + const je = this.searchInput.value.trim(); + je + ? this._filterCountries(je) + : this._filterCountries("", !0); + }; + let ze = null; + (this._handleSearchChange = () => { + ze && clearTimeout(ze), + (ze = setTimeout(() => { + oe(), (ze = null); + }, 100)); + }), + this.searchInput.addEventListener( + "input", + this._handleSearchChange + ), + this.searchInput.addEventListener("click", (je) => + je.stopPropagation() + ); + } + } + _searchForCountry(ee) { + for (let re = 0; re < this.countries.length; re++) { + const he = this.countries[re]; + if (he.name.substr(0, ee.length).toLowerCase() === ee) { + const ze = he.nodeById[this.id]; + this._highlightListItem(ze, !1), this._scrollTo(ze); + break; + } + } + } + _filterCountries(ee, re = !1) { + let he = !0; + this.countryList.innerHTML = ""; + const oe = qe(ee); + for (let ze = 0; ze < this.countries.length; ze++) { + const je = this.countries[ze], + pt = qe(je.name), + it = je.name + .split(/[^a-zA-ZÀ-ÿа-яА-Я]/) + .map((It) => It[0]) + .join("") + .toLowerCase(), + ct = `+${je.dialCode}`; + if ( + re || + pt.includes(oe) || + ct.includes(oe) || + je.iso2.includes(oe) || + it.includes(oe) + ) { + const It = je.nodeById[this.id]; + It && this.countryList.appendChild(It), + he && (this._highlightListItem(It, !1), (he = !1)); + } + } + he && this._highlightListItem(null, !1), + (this.countryList.scrollTop = 0), + this._updateSearchResultsText(); + } + _updateSearchResultsText() { + const { i18n: ee } = this.options, + re = this.countryList.childElementCount; + let he; + re === 0 + ? (he = ee.zeroSearchResults) + : re === 1 + ? (he = ee.oneSearchResult) + : (he = ee.multipleSearchResults.replace( + "${count}", + re.toString() + )), + (this.searchResultsA11yText.textContent = he); + } + _handleUpDownKey(ee) { + var he, oe; + let re = + ee === "ArrowUp" + ? (he = this.highlightedItem) == null + ? void 0 + : he.previousElementSibling + : (oe = this.highlightedItem) == null + ? void 0 + : oe.nextElementSibling; + !re && + this.countryList.childElementCount > 1 && + (re = + ee === "ArrowUp" + ? this.countryList.lastElementChild + : this.countryList.firstElementChild), + re && (this._scrollTo(re), this._highlightListItem(re, !1)); + } + _handleEnterKey() { + this.highlightedItem && + this._selectListItem(this.highlightedItem); + } + _updateValFromNumber(ee) { + let re = ee; + if ( + this.options.formatOnDisplay && + ke.utils && + this.selectedCountryData + ) { + const he = + this.options.nationalMode || + (re.charAt(0) !== "+" && + !this.options.separateDialCode), + { NATIONAL: oe, INTERNATIONAL: ze } = + ke.utils.numberFormat, + je = he ? oe : ze; + re = ke.utils.formatNumber( + re, + this.selectedCountryData.iso2, + je + ); + } + (re = this._beforeSetNumber(re)), (this.telInput.value = re); + } + _updateCountryFromNumber(ee) { + const re = this._getCountryFromNumber(ee); + return re !== null ? this._setCountry(re) : !1; + } + _ensureHasDialCode(ee) { + const { dialCode: re, nationalPrefix: he } = + this.selectedCountryData; + if (ee.charAt(0) === "+" || !re) return ee; + const je = + he && ee.charAt(0) === he && !this.options.separateDialCode + ? ee.substring(1) + : ee; + return `+${re}${je}`; + } + _getCountryFromNumber(ee) { + const re = ee.indexOf("+"); + let he = re ? ee.substring(re) : ee; + const oe = this.selectedCountryData.iso2, + ze = this.selectedCountryData.dialCode; + he = this._ensureHasDialCode(he); + const je = this._getDialCode(he, !0), + pt = Je(he); + if (je) { + const it = Je(je), + ct = this.dialCodeToIso2Map[it]; + if ( + !oe && + this.defaultCountry && + ct.includes(this.defaultCountry) + ) + return this.defaultCountry; + const It = + oe && + ct.includes(oe) && + (pt.length === it.length || + !this.selectedCountryData.areaCodes); + if (!(ze === "1" && Ze(pt)) && !It) { + for (let at = 0; at < ct.length; at++) + if (ct[at]) return ct[at]; + } + } else { + if (he.charAt(0) === "+" && pt.length) return ""; + if ((!he || he === "+") && !this.selectedCountryData.iso2) + return this.defaultCountry; + } + return null; + } + _highlightListItem(ee, re) { + const he = this.highlightedItem; + if ( + (he && + (he.classList.remove("iti__highlight"), + he.setAttribute("aria-selected", "false")), + (this.highlightedItem = ee), + this.highlightedItem) + ) { + this.highlightedItem.classList.add("iti__highlight"), + this.highlightedItem.setAttribute( + "aria-selected", + "true" + ); + const oe = this.highlightedItem.getAttribute("id") || ""; + this.selectedCountry.setAttribute( + "aria-activedescendant", + oe + ), + this.options.countrySearch && + this.searchInput.setAttribute( + "aria-activedescendant", + oe + ); + } + re && this.highlightedItem.focus(); + } + _getCountryData(ee, re) { + for (let he = 0; he < this.countries.length; he++) + if (this.countries[he].iso2 === ee) + return this.countries[he]; + if (re) return null; + throw new Error(`No country data for '${ee}'`); + } + _setCountry(ee) { + const { + separateDialCode: re, + showFlags: he, + i18n: oe, + } = this.options, + ze = this.selectedCountryData.iso2 + ? this.selectedCountryData + : {}; + if ( + ((this.selectedCountryData = ee + ? this._getCountryData(ee, !1) || {} + : {}), + this.selectedCountryData.iso2 && + (this.defaultCountry = this.selectedCountryData.iso2), + this.selectedCountryInner) + ) { + let je = "", + pt = ""; + ee && he + ? ((je = `iti__flag iti__${ee}`), + (pt = `${this.selectedCountryData.name} +${this.selectedCountryData.dialCode}`)) + : ((je = "iti__flag iti__globe"), + (pt = oe.noCountrySelected)), + (this.selectedCountryInner.className = je), + (this.selectedCountryA11yText.textContent = pt); + } + if ((this._setSelectedCountryTitleAttribute(ee, re), re)) { + const je = this.selectedCountryData.dialCode + ? `+${this.selectedCountryData.dialCode}` + : ""; + (this.selectedDialCode.innerHTML = je), + this._updateInputPadding(); + } + return ( + this._updatePlaceholder(), + this._updateMaxLength(), + ze.iso2 !== ee + ); + } + _updateInputPadding() { + if (this.selectedCountry) { + const re = + (this.selectedCountry.offsetWidth || + this._getHiddenSelectedCountryWidth()) + 6; + this.showSelectedCountryOnLeft + ? (this.telInput.style.paddingLeft = `${re}px`) + : (this.telInput.style.paddingRight = `${re}px`); + } + } + _updateMaxLength() { + const { + strictMode: ee, + placeholderNumberType: re, + validationNumberTypes: he, + } = this.options, + { iso2: oe } = this.selectedCountryData; + if (ee && ke.utils) + if (oe) { + const ze = ke.utils.numberType[re]; + let je = ke.utils.getExampleNumber(oe, !1, ze, !0), + pt = je; + for (; ke.utils.isPossibleNumber(je, oe, he); ) + (pt = je), (je += "0"); + const it = ke.utils.getCoreNumber(pt, oe); + (this.maxCoreNumberLength = it.length), + oe === "by" && + (this.maxCoreNumberLength = it.length + 1); + } else this.maxCoreNumberLength = null; + } + _setSelectedCountryTitleAttribute(ee = null, re) { + if (!this.selectedCountry) return; + let he; + ee && !re + ? (he = `${this.selectedCountryData.name}: +${this.selectedCountryData.dialCode}`) + : ee + ? (he = this.selectedCountryData.name) + : (he = "Unknown"), + this.selectedCountry.setAttribute("title", he); + } + _getHiddenSelectedCountryWidth() { + if (this.telInput.parentNode) { + const ee = this.telInput.parentNode.cloneNode(!1); + (ee.style.visibility = "hidden"), + document.body.appendChild(ee); + const re = this.countryContainer.cloneNode(); + ee.appendChild(re); + const he = this.selectedCountry.cloneNode(!0); + re.appendChild(he); + const oe = he.offsetWidth; + return document.body.removeChild(ee), oe; + } + return 0; + } + _updatePlaceholder() { + const { + autoPlaceholder: ee, + placeholderNumberType: re, + nationalMode: he, + customPlaceholder: oe, + } = this.options, + ze = + ee === "aggressive" || + (!this.hadInitialPlaceholder && ee === "polite"); + if (ke.utils && ze) { + const je = ke.utils.numberType[re]; + let pt = this.selectedCountryData.iso2 + ? ke.utils.getExampleNumber( + this.selectedCountryData.iso2, + he, + je + ) + : ""; + (pt = this._beforeSetNumber(pt)), + typeof oe == "function" && + (pt = oe(pt, this.selectedCountryData)), + this.telInput.setAttribute("placeholder", pt); + } + } + _selectListItem(ee) { + const re = this._setCountry( + ee.getAttribute("data-country-code") + ); + this._closeDropdown(), + this._updateDialCode(ee.getAttribute("data-dial-code")), + this.telInput.focus(), + re && this._triggerCountryChange(); + } + _closeDropdown() { + this.dropdownContent.classList.add("iti__hide"), + this.selectedCountry.setAttribute("aria-expanded", "false"), + this.selectedCountry.removeAttribute( + "aria-activedescendant" + ), + this.highlightedItem && + this.highlightedItem.setAttribute( + "aria-selected", + "false" + ), + this.options.countrySearch && + this.searchInput.removeAttribute("aria-activedescendant"), + this.dropdownArrow.classList.remove("iti__arrow--up"), + document.removeEventListener( + "keydown", + this._handleKeydownOnDropdown + ), + this.options.countrySearch && + this.searchInput.removeEventListener( + "input", + this._handleSearchChange + ), + document.documentElement.removeEventListener( + "click", + this._handleClickOffToClose + ), + this.countryList.removeEventListener( + "mouseover", + this._handleMouseoverCountryList + ), + this.countryList.removeEventListener( + "click", + this._handleClickCountryList + ), + this.options.dropdownContainer && + (this.options.useFullscreenPopup || + window.removeEventListener( + "scroll", + this._handleWindowScroll + ), + this.dropdown.parentNode && + this.dropdown.parentNode.removeChild(this.dropdown)), + this._handlePageLoad && + window.removeEventListener("load", this._handlePageLoad), + this._trigger("close:countrydropdown"); + } + _scrollTo(ee) { + const re = this.countryList, + he = document.documentElement.scrollTop, + oe = re.offsetHeight, + ze = re.getBoundingClientRect().top + he, + je = ze + oe, + pt = ee.offsetHeight, + it = ee.getBoundingClientRect().top + he, + ct = it + pt, + It = it - ze + re.scrollTop; + if (it < ze) re.scrollTop = It; + else if (ct > je) { + const Dt = oe - pt; + re.scrollTop = It - Dt; + } + } + _updateDialCode(ee) { + const re = this.telInput.value, + he = `+${ee}`; + let oe; + if (re.charAt(0) === "+") { + const ze = this._getDialCode(re); + ze ? (oe = re.replace(ze, he)) : (oe = he), + (this.telInput.value = oe); + } + } + _getDialCode(ee, re) { + let he = ""; + if (ee.charAt(0) === "+") { + let oe = ""; + for (let ze = 0; ze < ee.length; ze++) { + const je = ee.charAt(ze); + if (!isNaN(parseInt(je, 10))) { + if (((oe += je), re)) + this.dialCodeToIso2Map[oe] && + (he = ee.substr(0, ze + 1)); + else if (this.dialCodes[oe]) { + he = ee.substr(0, ze + 1); + break; + } + if (oe.length === this.dialCodeMaxLen) break; + } + } + } + return he; + } + _getFullNumber(ee) { + const re = ee || this.telInput.value.trim(), + { dialCode: he } = this.selectedCountryData; + let oe; + const ze = Je(re); + return ( + this.options.separateDialCode && + re.charAt(0) !== "+" && + he && + ze + ? (oe = `+${he}`) + : (oe = ""), + oe + re + ); + } + _beforeSetNumber(ee) { + let re = ee; + if (this.options.separateDialCode) { + let he = this._getDialCode(re); + if (he) { + he = `+${this.selectedCountryData.dialCode}`; + const oe = + re[he.length] === " " || re[he.length] === "-" + ? he.length + 1 + : he.length; + re = re.substr(oe); + } + } + return this._cap(re); + } + _triggerCountryChange() { + this._trigger("countrychange"); + } + _formatNumberAsYouType() { + const ee = this._getFullNumber(), + re = ke.utils + ? ke.utils.formatNumberAsYouType( + ee, + this.selectedCountryData.iso2 + ) + : ee, + { dialCode: he } = this.selectedCountryData; + return this.options.separateDialCode && + this.telInput.value.charAt(0) !== "+" && + re.includes(`+${he}`) + ? (re.split(`+${he}`)[1] || "").trim() + : re; + } + handleAutoCountry() { + this.options.initialCountry === "auto" && + ke.autoCountry && + ((this.defaultCountry = ke.autoCountry), + this.selectedCountryData.iso2 || + this.selectedCountryInner.classList.contains( + "iti__globe" + ) || + this.setCountry(this.defaultCountry), + this.resolveAutoCountryPromise()); + } + handleUtils() { + ke.utils && + (this.telInput.value && + this._updateValFromNumber(this.telInput.value), + this.selectedCountryData.iso2 && + (this._updatePlaceholder(), this._updateMaxLength())), + this.resolveUtilsScriptPromise(); + } + destroy() { + var ze, je; + const { allowDropdown: ee, separateDialCode: re } = + this.options; + if (ee) { + this._closeDropdown(), + this.selectedCountry.removeEventListener( + "click", + this._handleClickSelectedCountry + ), + this.countryContainer.removeEventListener( + "keydown", + this._handleCountryContainerKeydown + ); + const pt = this.telInput.closest("label"); + pt && + pt.removeEventListener("click", this._handleLabelClick); + } + const { form: he } = this.telInput; + this._handleHiddenInputSubmit && + he && + he.removeEventListener( + "submit", + this._handleHiddenInputSubmit + ), + this.telInput.removeEventListener( + "input", + this._handleInputEvent + ), + this._handleKeydownEvent && + this.telInput.removeEventListener( + "keydown", + this._handleKeydownEvent + ), + this.telInput.removeAttribute("data-intl-tel-input-id"), + re && + (this.isRTL + ? (this.telInput.style.paddingRight = + this.originalPaddingRight) + : (this.telInput.style.paddingLeft = + this.originalPaddingLeft)); + const oe = this.telInput.parentNode; + (ze = oe == null ? void 0 : oe.parentNode) == null || + ze.insertBefore(this.telInput, oe), + (je = oe == null ? void 0 : oe.parentNode) == null || + je.removeChild(oe), + delete ke.instances[this.id]; + } + getExtension() { + return ke.utils + ? ke.utils.getExtension( + this._getFullNumber(), + this.selectedCountryData.iso2 + ) + : ""; + } + getNumber(ee) { + if (ke.utils) { + const { iso2: re } = this.selectedCountryData; + return ke.utils.formatNumber(this._getFullNumber(), re, ee); + } + return ""; + } + getNumberType() { + return ke.utils + ? ke.utils.getNumberType( + this._getFullNumber(), + this.selectedCountryData.iso2 + ) + : -99; + } + getSelectedCountryData() { + return this.selectedCountryData; + } + getValidationError() { + if (ke.utils) { + const { iso2: ee } = this.selectedCountryData; + return ke.utils.getValidationError( + this._getFullNumber(), + ee + ); + } + return -99; + } + isValidNumber() { + if (!this.selectedCountryData.iso2) return !1; + const ee = this._getFullNumber(), + re = ee.search(new RegExp("\\p{L}", "u")); + if (re > -1) { + const he = ee.substring(0, re), + oe = this._utilsIsPossibleNumber(he), + ze = this._utilsIsPossibleNumber(ee); + return oe && ze; + } + return this._utilsIsPossibleNumber(ee); + } + _utilsIsPossibleNumber(ee) { + return ke.utils + ? ke.utils.isPossibleNumber( + ee, + this.selectedCountryData.iso2, + this.options.validationNumberTypes + ) + : null; + } + isValidNumberPrecise() { + if (!this.selectedCountryData.iso2) return !1; + const ee = this._getFullNumber(), + re = ee.search(new RegExp("\\p{L}", "u")); + if (re > -1) { + const he = ee.substring(0, re), + oe = this._utilsIsValidNumber(he), + ze = this._utilsIsValidNumber(ee); + return oe && ze; + } + return this._utilsIsValidNumber(ee); + } + _utilsIsValidNumber(ee) { + return ke.utils + ? ke.utils.isValidNumber( + ee, + this.selectedCountryData.iso2, + this.options.validationNumberTypes + ) + : null; + } + setCountry(ee) { + const re = ee == null ? void 0 : ee.toLowerCase(), + he = this.selectedCountryData.iso2; + ((ee && re !== he) || (!ee && he)) && + (this._setCountry(re), + this._updateDialCode(this.selectedCountryData.dialCode), + this._triggerCountryChange()); + } + setNumber(ee) { + const re = this._updateCountryFromNumber(ee); + this._updateValFromNumber(ee), + re && this._triggerCountryChange(), + this._trigger("input", { isSetNumber: !0 }); + } + setPlaceholderNumberType(ee) { + (this.options.placeholderNumberType = ee), + this._updatePlaceholder(); + } + setDisabled(ee) { + (this.telInput.disabled = ee), + ee + ? this.selectedCountry.setAttribute("disabled", "true") + : this.selectedCountry.removeAttribute("disabled"); + } + }, + Ue = (ee) => { + if (!ke.utils && !ke.startedLoadingUtilsScript) { + let re; + if (typeof ee == "function") + try { + re = Promise.resolve(ee()); + } catch (he) { + return Promise.reject(he); + } + else + return Promise.reject( + new TypeError( + `The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof ee}` + ) + ); + return ( + (ke.startedLoadingUtilsScript = !0), + re + .then((he) => { + const oe = he == null ? void 0 : he.default; + if (!oe || typeof oe != "object") + throw new TypeError( + "The loader function passed to attachUtils did not resolve to a module object with utils as its default export." + ); + return (ke.utils = oe), et("handleUtils"), !0; + }) + .catch((he) => { + throw (et("rejectUtilsScriptPromise", he), he); + }) + ); + } + return null; + }, + ke = Object.assign( + (ee, re) => { + const he = new nt(ee, re); + return ( + he._init(), + ee.setAttribute("data-intl-tel-input-id", he.id.toString()), + (ke.instances[he.id] = he), + he + ); + }, + { + defaults: Fe, + documentReady: () => document.readyState === "complete", + getCountryData: () => ne, + getInstance: (ee) => { + const re = ee.getAttribute("data-intl-tel-input-id"); + return re ? ke.instances[re] : null; + }, + instances: {}, + attachUtils: Ue, + startedLoadingUtilsScript: !1, + startedLoadingAutoCountry: !1, + version: "25.3.2", + } + ), + vt = ke; + return B(O); + })(); + return a.default; + }); + })($f)), + $f.exports + ); +} +var iD = nD(); +const aD = Zm(iD); +var oD = Te( + '
                  ' + ), + sD = Te(' '), + lD = Te( + '

                  ', + 1 + ), + cD = async (m, a, p) => { + await a(x(p)); + }, + uD = Te(' '), + hD = (m, a) => { + se(a, ""); + }, + dD = Te( + '

                  ', + 1 + ), + pD = Te( + '
                  ' + ); +function fD(m, a) { + Lr(a, !0); + let p = st(!0), + y = st(""), + M = st(0), + z = st(!1); + const T = ft(() => x(M) > 0 || x(z)); + let s = st(!1), + B = st(""), + O = st(void 0); + const X = ft(() => { + var Ie; + return `phone:${(Ie = Mt.data) == null ? void 0 : Ie.id}`; + }); + Wr(() => { + const Ie = localStorage.getItem(x(X)); + Ie && se(y, Ie, !0); + }), + Fn(() => { + Qr.getOtpCooldown() + .then((De) => { + se(M, De.cooldownMs, !0); + }) + .catch((De) => { + Fr.error(De.message); + }) + .finally(() => { + se(p, !1); + }); + const Ie = 1e3, + Ae = setInterval(() => { + se(M, Math.max(0, x(M) - Ie), !0); + }, Ie); + return () => { + clearInterval(Ae); + }; + }); + async function K(Ie) { + try { + se(z, !0); + const Ae = await Qr.sendOtp(Ie); + Fr.info(`${QC()} ${Ae.phone}`), + se(y, Ae.phone, !0), + se(M, Ae.cooldownMs, !0), + localStorage.setItem(x(X), x(y)); + } catch (Ae) { + Fr.error(Ae.message); + } finally { + se(z, !1); + } + } + Wr(() => { + x(B).length === 6 && + (se(s, !0), + (async () => { + try { + await Qr.verifyOtp(x(B)), + await Mt.refresh(), + Fr.success(rS()), + localStorage.removeItem(x(X)), + a.onsuccess(x(y)); + } catch (Ie) { + Fr.error(Ie.message); + } finally { + se(B, ""), se(s, !1); + } + })()); + }); + var ne = pD(), + H = A(ne); + { + var fe = (Ie) => { + var Ae = oD(); + $(Ie, Ae); + }, + ge = (Ie) => { + var Ae = er(), + De = Ct(Ae); + { + var Ee = ($e) => { + var Je = lD(), + qe = Ct(Je), + Ze = A(qe), + Qe = A(Ze, !0); + k(Ze); + var Le = j(Ze, 2), + et = A(Le, !0); + k(Le), k(qe); + var nt = j(qe, 2), + Ue = A(nt); + Ni( + Ue, + () => (he) => ( + se( + O, + aD(he, { + strictMode: !0, + initialCountry: "br", + loadUtils: () => + qx( + () => import("../chunks/yW7U80iv.js"), + [], + import.meta.url + ), + containerClass: "w-full", + dropdownContainer: document.body, + }) + ), + () => { + var oe; + (oe = x(O)) == null || oe.destroy(); + } + ) + ); + var ke = j(Ue, 2), + vt = A(ke), + ee = j(vt); + { + var re = (he) => { + var oe = sD(), + ze = A(oe); + k(oe), + We((je) => de(ze, `(${je ?? ""})`), [() => rp(x(M))]), + $(he, oe); + }; + Oe(ee, (he) => { + x(M) > 0 && he(re); + }); + } + k(ke), + k(nt), + We( + (he, oe, ze) => { + de(Qe, he), + de(et, oe), + (ke.disabled = x(T)), + de(vt, `${ze ?? ""} `); + }, + [() => US(), () => HS(), () => YS()] + ), + di("submit", nt, async () => { + var oe; + if (x(T)) return; + if (!((oe = x(O)) != null && oe.isValidNumber())) { + Fr.error(aS()); + return; + } + const he = x(O).getNumber(); + await K(he); + }), + $($e, Je); + }, + Fe = ($e) => { + var Je = dD(), + qe = Ct(Je), + Ze = A(qe), + Qe = A(Ze, !0); + k(Ze); + var Le = j(Ze, 2), + et = A(Le); + k(Le), k(qe); + var nt = j(qe, 2), + Ue = A(nt); + { + const je = (pt, it) => { + let ct = () => (it == null ? void 0 : it().cells); + var It = er(), + Dt = Ct(It); + xi( + Dt, + () => JL, + (at, dt) => { + dt(at, { + class: "border-primary", + children: (yt, xt) => { + var St = er(), + wt = Ct(St); + hi( + wt, + 16, + ct, + (_t) => _t, + (_t, Lt) => { + var Rt = er(), + $t = Ct(Rt); + xi( + $t, + () => tD, + (tr, Qt) => { + Qt(tr, { + get cell() { + return Lt; + }, + class: + "border-base-content/20 size-11 sm:size-12", + }); + } + ), + $(_t, Rt); + } + ), + $(yt, St); + }, + $$slots: { default: !0 }, + }); + } + ), + $(pt, It); + }; + xi( + Ue, + () => rD, + (pt, it) => { + it(pt, { + maxlength: 6, + class: "mx-auto w-max", + get disabled() { + return x(s); + }, + get value() { + return x(B); + }, + set value(ct) { + se(B, ct, !0); + }, + children: je, + $$slots: { default: !0 }, + }); + } + ); + } + k(nt); + var ke = j(nt, 2), + vt = A(ke); + vt.__click = [cD, K, y]; + var ee = A(vt), + re = j(ee); + { + var he = (je) => { + var pt = uD(), + it = A(pt); + k(pt), + We((ct) => de(it, `(${ct ?? ""})`), [() => rp(x(M))]), + $(je, pt); + }; + Oe(re, (je) => { + x(M) > 0 && je(he); + }); + } + k(vt); + var oe = j(vt, 2); + oe.__click = [hD, y]; + var ze = A(oe, !0); + k(oe), + k(ke), + We( + (je, pt, it, ct) => { + de(Qe, je), + de(et, `${pt ?? ""} ${x(y) ?? ""}`), + (vt.disabled = x(T)), + de(ee, `${it ?? ""} `), + de(ze, ct); + }, + [() => QS(), () => rP(), () => aP(), () => lP()] + ), + $($e, Je); + }; + Oe( + De, + ($e) => { + x(y) ? $e(Fe, !1) : $e(Ee); + }, + !0 + ); + } + $(Ie, Ae); + }; + Oe(H, (Ie) => { + x(p) ? Ie(fe) : Ie(ge, !1); + }); + } + k(ne), $(m, ne), Dr(); +} +$n(["click"]); +var mD = Te( + '' +); +function _D(m, a) { + Lr(a, !0); + let p = zt(a, "open", 15); + var y = mD(), + M = A(y), + z = j(A(M), 2); + { + var T = (s) => { + fD(s, { onsuccess: () => p(!1) }); + }; + Oe(z, (s) => { + p() && s(T); + }); + } + k(M), + k(y), + Ni(y, () => (s) => { + Wr(() => { + p() ? s.show() : s.close(); + }); + }), + di("close", y, () => p(!1)), + $(m, y), + Dr(); +} +var gD = Pr( + '' +); +function vD(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = gD(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var yD = Te('

                  '), + xD = (m, a) => { + a(!1); + }, + bD = async (m, a, p, y, M, z) => { + if (x(a) !== x(p)) { + se(y, ax(), !0); + return; + } + try { + se(M, !0), + await Qr.deleteMe(x(p)), + Fr.warning(zS()), + await Mt.logout(), + z(!1); + } catch (T) { + Fr.error(T.message); + } finally { + se(M, !1); + } + }, + wD = Te( + '' + ), + TD = Te( + ' ' + ); +function CD(m, a) { + Lr(a, !0); + let p = zt(a, "open", 15), + y = st(""), + M = st(null), + z = st(!1), + T = ft(() => { + var he; + return ((he = Mt.data) == null ? void 0 : he.name) ?? ""; + }); + Wr(() => { + p() || (se(y, ""), se(M, null)); + }); + var s = TD(), + B = A(s), + O = j(A(B), 2), + X = A(O); + vD(X, { class: "text-error size-5" }); + var K = j(X, 2), + ne = A(K, !0); + k(K), k(O); + var H = j(O, 2), + fe = A(H), + ge = A(fe, !0); + k(fe); + var Ie = j(fe); + k(H); + var Ae = j(H, 2), + De = A(Ae); + k(Ae); + var Ee = j(Ae, 2), + Fe = A(Ee, !0); + k(Ee); + var $e = j(Ee, 2); + Ka($e); + var Je = j($e, 2); + { + var qe = (he) => { + var oe = yD(), + ze = A(oe, !0); + k(oe), We(() => de(ze, x(M))), $(he, oe); + }; + Oe(Je, (he) => { + x(M) && he(qe); + }); + } + var Ze = j(Je, 2), + Qe = A(Ze); + Qe.__click = [xD, p]; + var Le = A(Qe, !0); + k(Qe); + var et = j(Qe, 2); + et.__click = [bD, y, T, M, z, p]; + var nt = A(et), + Ue = j(nt); + { + var ke = (he) => { + var oe = wD(); + $(he, oe); + }; + Oe(Ue, (he) => { + x(z) && he(ke); + }); + } + k(et), k(Ze), k(B); + var vt = j(B, 2), + ee = A(vt), + re = A(ee, !0); + k(ee), + k(vt), + k(s), + Ni(s, () => (he) => { + Wr(() => { + p() ? he.show() : he.close(); + }); + }), + We( + (he, oe, ze, je, pt, it, ct, It, Dt) => { + de(ne, he), + de(ge, oe), + de(Ie, ` ${ze ?? ""}`), + de(De, `${je ?? ""} ${pt ?? ""}`), + de(Fe, x(T)), + Tr($e, "placeholder", it), + de(Le, ct), + (et.disabled = x(z)), + de(nt, `${It ?? ""} `), + de(re, Dt); + }, + [ + () => Yf(), + () => pw(), + () => _w(), + () => VI(), + () => UI(), + () => HI(), + () => Ah(), + () => Yf(), + () => Ss(), + ] + ), + di("close", s, () => p(!1)), + dp( + $e, + () => x(y), + (he) => se(y, he) + ), + $(m, s), + Dr(); +} +$n(["click"]); +var SD = async (m, a, p) => { + try { + se(a, !0), + await Qr.deleteSessions(), + Fr.success(zI()), + await Mt.logout(), + p(!1); + } catch { + Fr.error(RI()); + } finally { + se(a, !1); + } + }, + PD = Te( + '' + ), + ID = Te( + ' ' + ); +function MD(m, a) { + Lr(a, !0); + let p = zt(a, "open", 15), + y = st(!1); + var M = ID(), + z = A(M), + T = j(A(z), 2), + s = A(T, !0); + k(T); + var B = j(T, 2), + O = A(B, !0); + k(B); + var X = j(B, 2), + K = A(X, !0); + k(X); + var ne = j(X, 2), + H = A(ne), + fe = A(H, !0); + k(H); + var ge = j(H, 2); + ge.__click = [SD, y, p]; + var Ie = A(ge), + Ae = j(Ie); + { + var De = (Je) => { + var qe = PD(); + $(Je, qe); + }; + Oe(Ae, (Je) => { + x(y) && Je(De); + }); + } + k(ge), k(ne), k(z); + var Ee = j(z, 2), + Fe = A(Ee), + $e = A(Fe, !0); + k(Fe), + k(Ee), + k(M), + Ni(M, () => (Je) => { + Wr(() => { + p() ? Je.show() : Je.close(); + }); + }), + We( + (Je, qe, Ze, Qe, Le, et) => { + de(s, Je), + de(O, qe), + de(K, Ze), + de(fe, Qe), + (ge.disabled = x(y)), + de(Ie, `${Le ?? ""} `), + de($e, et); + }, + [() => PI(), () => kI(), () => YI(), () => Ah(), () => qv(), () => Ss()] + ), + di("close", M, () => p(!1)), + $(m, M), + Dr(); +} +$n(["click"]); +var kD = (m, a) => { + a(); + }, + AD = Te( + '' + ), + ED = Te( + '' + ), + zD = (m, a, p) => { + a(x(p).id); + }, + LD = Te( + '' + ), + DD = Te( + '' + ), + RD = Te( + '
                  ' + ), + BD = Te(' '), + FD = async (m, a, p) => { + try { + se(a, !0), + await Qr.unlinkDiscord(), + Mt.refresh(), + Fr.success(TS()), + se(p, !1); + } catch (y) { + Fr.error(y.message, { duration: 5e3 }); + } finally { + se(a, !1); + } + }, + OD = Te(''), + ND = (m, a) => { + se(a, !0); + }, + jD = (m, a) => { + se(a, !0); + }, + VD = (m, a) => { + a(!1); + }, + qD = Te( + ' ', + 1 + ); +function ZD(m, a) { + Lr(a, !0); + let p = zt(a, "open", 15), + y = st(bi(a.userData.name)), + M = st(bi(a.userData.discord)), + z = st(bi(a.userData.showLastPixel)), + T = st(!1), + s = st(void 0), + B = st(!1), + O = st(!1); + const X = ox("2025-09_discord_linking"); + let K = st(!!a.userData.discordId), + ne = st(void 0), + H = st(void 0); + Wr(() => { + se(y, a.userData.name, !0), se(z, a.userData.showLastPixel, !0); + }), + Wr(() => { + p() && + !x(s) && + Qr.getMyProfilePictures() + .then((Nt) => { + se(s, Nt, !0); + }) + .catch((Nt) => { + Fr.error(Nt.message); + }); + }); + let fe = st(!1); + async function ge(Nt) { + try { + se(fe, !0), await Qr.changeProfilePicture(Nt), await Mt.refresh(); + } finally { + se(fe, !1); + } + } + var Ie = qD(), + Ae = Ct(Ie), + De = A(Ae), + Ee = j(A(De), 2), + Fe = A(Ee, !0); + k(Ee); + var $e = j(Ee, 2), + Je = A($e), + qe = A(Je), + Ze = A(qe), + Qe = A(Ze); + co(Qe, { + class: "size-30", + get userId() { + return a.userData.id; + }, + get pictureUrl() { + return a.userData.picture; + }, + }); + var Le = j(Qe, 2), + et = A(Le); + Rv(et, { class: "size-5" }), k(Le), k(Ze); + var nt = j(Ze, 2); + { + var Ue = (Nt) => { + var or = RD(), + cr = A(or), + Vr = A(cr, !0); + k(cr); + var mr = j(cr, 2), + hr = A(mr); + { + var _r = (qr) => { + var ue = ED(); + ue.__click = [kD, ge]; + var V = A(ue); + co(V, { + class: "size-10 border", + get userId() { + return a.userData.id; + }, + }); + var U = j(V, 2); + { + var Y = (ie) => { + var pe = AD(); + $(ie, pe); + }; + Oe(U, (ie) => { + x(fe) && ie(Y); + }); + } + k(ue), We(() => (ue.disabled = x(fe))), $(qr, ue); + }; + Oe(hr, (qr) => { + a.userData.picture && qr(_r); + }); + } + var Ir = j(hr, 2); + hi( + Ir, + 17, + () => x(s), + (qr) => qr.id, + (qr, ue) => { + var V = er(), + U = Ct(V); + { + var Y = (ie) => { + var pe = DD(); + pe.__click = [zD, ge, ue]; + var Se = A(pe); + co(Se, { + class: "size-10 border", + get userId() { + return a.userData.id; + }, + get pictureUrl() { + return x(ue).url; + }, + }); + var Me = j(Se, 2); + { + var we = (Ve) => { + var ut = LD(); + $(Ve, ut); + }; + Oe(Me, (Ve) => { + x(fe) && Ve(we); + }); + } + k(pe), We(() => (pe.disabled = x(fe))), $(ie, pe); + }; + Oe(U, (ie) => { + a.userData.picture !== x(ue).url && ie(Y); + }); + } + $(qr, V); + } + ), + k(mr), + k(or), + We((qr) => de(Vr, qr), [() => aw()]), + $(Nt, or); + }; + Oe(nt, (Nt) => { + var or; + (or = x(s)) != null && or.length && Nt(Ue); + }); + } + k(qe); + var ke = j(qe, 2), + vt = A(ke); + { + let Nt = ft(() => Kf()), + or = ft(() => Kf()); + em(vt, { + get label() { + return x(Nt); + }, + get placeholder() { + return x(or); + }, + min: 1, + max: 16, + get value() { + return x(y); + }, + set value(cr) { + se(y, cr, !0); + }, + get validate() { + return x(ne); + }, + set validate(cr) { + se(ne, cr, !0); + }, + }); + } + var ee = j(vt, 2); + { + var re = (Nt) => { + var or = er(), + cr = Ct(or); + { + var Vr = (hr) => { + var _r = BD(), + Ir = A(_r); + rm(Ir, { class: "size-4.5" }); + var qr = j(Ir); + k(_r), + We( + (ue, V) => { + Tr(_r, "href", ue), de(qr, ` ${V ?? ""}`); + }, + [() => sx("/discord/authorize"), () => PS()] + ), + $(hr, _r); + }, + mr = (hr) => { + var _r = OD(); + _r.__click = [FD, T, K]; + var Ir = A(_r); + rm(Ir, { class: "size-4.5" }); + var qr = j(Ir); + k(_r), + We( + (ue) => { + (_r.disabled = x(T)), de(qr, ` ${ue ?? ""}`); + }, + [ + () => { + var ue; + return kS({ + username: + ((ue = a.userData) == null ? void 0 : ue.discord) ?? + "", + }); + }, + ] + ), + $(hr, _r); + }; + Oe(cr, (hr) => { + x(K) ? hr(mr, !1) : hr(Vr); + }); + } + $(Nt, or); + }, + he = (Nt) => { + { + let or = ft(() => o3()); + em(Nt, { + label: "Discord", + get placeholder() { + return x(or); + }, + max: 32, + get value() { + return x(M); + }, + set value(cr) { + se(M, cr, !0); + }, + get validate() { + return x(H); + }, + set validate(cr) { + se(H, cr, !0); + }, + }); + } + }; + Oe(ee, (Nt) => { + X ? Nt(re) : Nt(he, !1); + }); + } + var oe = j(ee, 2), + ze = A(oe); + Ka(ze); + var je = j(ze); + k(oe), k(ke), k(Je); + var pt = j(Je, 2), + it = A(pt), + ct = A(it), + It = A(ct, !0); + k(ct); + var Dt = j(ct, 2), + at = A(Dt), + dt = A(at); + dt.__click = [ND, O]; + var yt = A(dt, !0); + k(dt), k(at); + var xt = j(at, 2), + St = A(xt); + St.__click = [jD, B]; + var wt = A(St, !0); + k(St), k(xt), k(Dt), k(it); + var _t = j(it, 2), + Lt = A(_t); + Lt.__click = [VD, p]; + var Rt = A(Lt, !0); + k(Lt); + var $t = j(Lt, 2), + tr = A($t, !0); + k($t), + k(_t), + k(pt), + k($e), + k(De), + k(Ae), + Ni(Ae, () => (Nt) => { + Wr(() => { + p() ? Nt.show() : Nt.close(); + }); + }); + var Qt = j(Ae, 2); + CD(Qt, { + get open() { + return x(B); + }, + set open(Nt) { + se(B, Nt, !0); + }, + }); + var Ot = j(Qt, 2); + MD(Ot, { + get open() { + return x(O); + }, + set open(Nt) { + se(O, Nt, !0); + }, + }), + We( + (Nt, or, cr, Vr, mr, hr, _r, Ir) => { + de(Fe, Nt), + Tr(Le, "data-tip", or), + de(je, ` ${cr ?? ""}`), + de(It, Vr), + de(yt, mr), + de(wt, hr), + (Lt.disabled = x(T)), + de(Rt, _r), + ($t.disabled = x(T)), + de(tr, Ir); + }, + [ + () => hP(), + () => Fx(), + () => lw(), + () => OI(), + () => TI(), + () => Yf(), + () => Ss(), + () => Ax(), + ] + ), + di("close", Ae, () => p(!1)), + di("submit", $e, async () => { + var Nt, or; + try { + if (!((Nt = x(ne)) != null && Nt()) || !((or = x(H)) != null && or())) + return; + se(T, !0), + await Qr.updateMe({ name: x(y), showLastPixel: x(z), discord: x(M) }), + Mt.refresh(), + Fr.success(gS()), + p(!1); + } catch (cr) { + Fr.error(cr.message, { duration: 5e3 }); + } finally { + se(T, !1); + } + }), + Ix( + ze, + () => x(z), + (Nt) => se(z, Nt) + ), + $(m, Ie), + Dr(); +} +$n(["click"]); +var UD = Pr( + '' +); +function $D(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = UD(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var GD = Pr( + '' +); +function HD(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = GD(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var WD = Pr( + '' +); +function XD(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = WD(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var YD = Pr( + '' +); +function W0(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = YD(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var KD = Pr( + '' +); +function JD(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = KD(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var QD = Pr( + '' +); +function eR(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = QD(); + ar( + y, + () => ({ + xmlns: "http://www.w3.org/2000/svg", + "xmlns:xlink": "http://www.w3.org/1999/xlink", + viewBox: "0 0 216 216", + ...p, + }), + void 0, + void 0, + "svelte-1977t4s" + ), + $(m, y); +} +var tR = Pr( + '' +); +function X0(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = tR(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var rR = Pr( + '' +); +function Cv(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = rR(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var nR = Pr( + '' +); +function iR(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = nR(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + height: "24px", + viewBox: "0 -960 960 960", + width: "24px", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var aR = Pr( + '' +); +function oR(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = aR(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var sR = Pr( + '' +); +function lR(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = sR(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var cR = (m, a) => { + se(a, !0); + }, + uR = Te(' '), + hR = Te('
                  '), + dR = Te('

                  '), + pR = Te('

                  '), + fR = Te('
                  '), + mR = (m, a, p) => { + localStorage.setItem(xx, x(a).key), se(p, x(a).key, !0), location.reload(); + }, + _R = Te( + '' + ), + gR = Te("
                • "), + vR = Te( + '
                  ' + ), + yR = async (m, a) => { + var p; + try { + const y = await ((p = x(a)) == null ? void 0 : p.prompt()); + (y == null ? void 0 : y.outcome) === "accepted" && se(a, void 0); + } catch (y) { + Fr.error(U2({ error: y.message })); + } + }, + xR = Te(''), + bR = Te(' '), + wR = Te(' '), + TR = Te( + '
                  ', + 1 + ), + CR = async (m, a, p, y) => { + var M; + try { + se(a, !0), + await p.user.logout(), + y(), + Fr.warning(RS(), { icon: W0 }), + (M = p.onlogout) == null || M.call(p); + } catch { + Fr.error(OS()); + } finally { + se(a, !1); + } + }, + SR = Te( + ' ', + 1 + ); +function PR(m, a) { + Lr(a, !0); + let p = st(!1), + y = st(!1); + function M() { + var ne; + (ne = document.activeElement) == null || ne.blur(); + } + const z = [ + { label: "🇺🇸 English", key: "en" }, + { label: "🇧🇷 Português", key: "pt" }, + ]; + let T = st(""), + s = st(void 0); + const B = ft(() => { + var ne; + return !!((ne = a.user.data) != null && ne.banned) || !!a.user.timeoutUntil; + }); + var O = er(), + X = Ct(O); + { + var K = (ne) => { + var H = SR(), + fe = Ct(H), + ge = A(fe); + let Ie; + var Ae = A(ge); + Ov(Ae, { + get userId() { + return a.user.data.id; + }, + get level() { + return a.user.data.level; + }, + get pictureUrl() { + return a.user.data.picture; + }, + }), + k(ge); + var De = j(ge, 2), + Ee = A(De); + Ee.__click = M; + var Fe = A(Ee); + _l(Fe, { class: "size-5" }), k(Ee); + var $e = j(Ee, 2), + Je = A($e), + qe = A(Je); + co(qe, { + get userId() { + return a.user.data.id; + }, + get pictureUrl() { + return a.user.data.picture; + }, + get isSuspended() { + return x(B); + }, + }); + var Ze = j(qe, 2); + Ze.__click = [cR, p]; + var Qe = A(Ze); + tm(Qe, { class: "size-4" }), k(Ze), k(Je); + var Le = j(Je, 2), + et = A(Le), + nt = A(et), + Ue = A(nt, !0); + k(nt); + var ke = j(nt, 2), + vt = A(ke); + k(ke); + var ee = j(ke, 2); + { + var re = (Vt) => { + const Et = ft(() => So(a.user.data.equippedFlag)); + var dr = uR(), + ht = A(dr, !0); + k(dr), + We(() => { + Tr(dr, "data-tip", x(Et).name), de(ht, x(Et).flag); + }), + $(Vt, dr); + }; + Oe(ee, (Vt) => { + a.user.data.equippedFlag && Vt(re); + }); + } + var he = j(ee, 2); + { + var oe = (Vt) => { + var Et = hR(), + dr = A(Et); + Eh(dr, { + get username() { + return a.user.data.discord; + }, + get id() { + return a.user.data.discordId; + }, + }), + k(Et), + $(Vt, Et); + }; + Oe(he, (Vt) => { + a.user.data.discord && Vt(oe); + }); + } + k(et); + var ze = j(et, 2), + je = A(ze); + zh(je, { class: "inline size-4" }); + var pt = j(je, 2), + it = A(pt), + ct = j(it), + It = A(ct, !0); + k(ct), k(pt), k(ze); + var Dt = j(ze, 2), + at = A(Dt); + $D(at, { class: "inline size-4" }); + var dt = j(at, 2), + yt = A(dt), + xt = A(yt); + k(yt); + var St = j(yt), + wt = j(St), + _t = A(wt); + Uu(_t, { class: "mb-0.5 inline size-4 opacity-50" }), + k(wt), + k(dt), + k(Dt), + k(Le), + k($e); + var Lt = j($e, 2), + Rt = A(Lt); + { + var $t = (Vt) => { + var Et = fR(), + dr = A(Et); + X0(dr, { class: "size-6 text-red-500" }); + var ht = j(dr, 2); + { + var Xr = (Zr) => { + var mt = dR(), + He = A(mt), + At = j(He); + { + var Ft = (Jt) => { + var Cr = wi(); + We( + (Er) => de(Cr, `(${Er ?? ""})`), + [() => aI({ reason: hx() })] + ), + $(Jt, Cr); + }; + Oe(At, (Jt) => { + a.user.data.suspensionReason === "bot" && Jt(Ft); + }); + } + k(mt), + We((Jt) => de(He, `${Jt ?? ""} `), [() => cx()]), + $(Zr, mt); + }, + Yr = (Zr) => { + var mt = er(), + He = Ct(mt); + { + var At = (Ft) => { + var Jt = pR(), + Cr = A(Jt); + Am(Cr, () => + ux({ + until: `${a.user.timeoutUntil.toLocaleString()}`, + }) + ), + k(Jt), + $(Ft, Jt); + }; + Oe( + He, + (Ft) => { + a.user.timeoutUntil && Ft(At); + }, + !0 + ); + } + $(Zr, mt); + }; + Oe(ht, (Zr) => { + var mt; + (mt = a.user.data) != null && mt.banned ? Zr(Xr) : Zr(Yr, !1); + }); + } + k(Et), $(Vt, Et); + }; + Oe(Rt, (Vt) => { + x(B) && Vt($t); + }); + } + var tr = j(Rt, 2), + Qt = A(tr), + Ot = A(Qt, !0); + k(Qt); + var Nt = j(Qt, 2), + or = A(Nt), + cr = A(or), + Vr = A(cr); + iR(Vr, { class: "size-4" }), k(cr); + var mr = j(cr, 2); + hi( + mr, + 21, + () => z, + hp, + (Vt, Et) => { + const dr = ft(() => x(T) === x(Et).key); + var ht = gR(), + Xr = A(ht); + let Yr; + Xr.__click = [mR, Et, T]; + var Zr = A(Xr); + { + var mt = (At) => { + var Ft = _R(); + $(At, Ft); + }; + Oe(Zr, (At) => { + x(dr) && At(mt); + }); + } + var He = j(Zr); + k(Xr), + k(ht), + We( + (At) => { + (Yr = zr( + Xr, + 1, + "font-flag relative font-medium", + null, + Yr, + At + )), + de(He, ` ${x(Et).label ?? ""}`); + }, + [() => ({ "bg-base-200": x(dr) })] + ), + $(Vt, ht); + } + ), + k(mr), + k(or); + var hr = j(or, 2), + _r = A(hr); + _r.__click = () => { + ai.muted = !ai.muted; + }; + var Ir = A(_r); + { + var qr = (Vt) => { + oR(Vt, { class: "size-4" }); + }, + ue = (Vt) => { + lR(Vt, { class: "size-4" }); + }; + Oe(Ir, (Vt) => { + ai.muted ? Vt(qr) : Vt(ue, !1); + }); + } + k(_r), k(hr); + var V = j(hr, 2); + { + var U = (Vt) => { + var Et = vR(), + dr = A(Et); + dr.__click = () => { + ai.theme = ai.theme === "dark" ? "custom-winter" : "dark"; + }; + var ht = A(dr); + { + var Xr = (Zr) => { + XD(Zr, { class: "size-4" }); + }, + Yr = (Zr) => { + HD(Zr, { class: "size-4" }); + }; + Oe(ht, (Zr) => { + ai.theme === "dark" ? Zr(Xr) : Zr(Yr, !1); + }); + } + k(dr), + k(Et), + We( + (Zr) => Tr(Et, "data-tip", Zr), + [() => (ai.theme === "dark" ? xI() : gI())] + ), + $(Vt, Et); + }; + Oe(V, (Vt) => { + var Et, dr; + xc( + (dr = (Et = a.user) == null ? void 0 : Et.data) == null + ? void 0 + : dr.role, + ["admin", "moderator", "global_moderator"] + ) && Vt(U); + }); + } + k(Nt), k(tr); + var Y = j(tr, 2); + { + var ie = (Vt) => { + var Et = xR(); + Et.__click = [yR, s]; + var dr = A(Et); + zv(dr, { class: "size-5" }); + var ht = j(dr); + k(Et), We((Xr) => de(ht, ` ${Xr ?? ""}`), [() => H2()]), $(Vt, Et); + }; + Oe(Y, (Vt) => { + x(s) && Vt(ie); + }); + } + var pe = j(Y, 2); + { + var Se = (Vt) => { + var Et = bR(), + dr = A(Et); + Cv(dr, { class: "size-5" }); + var ht = j(dr); + k(Et), + We( + (Xr) => { + Tr(Et, "href", `${yi.url.origin ?? ""}/admin`), + de(ht, ` ${Xr ?? ""}`); + }, + [() => rI()] + ), + $(Vt, Et); + }; + Oe(pe, (Vt) => { + var Et; + ((Et = a.user.data) == null ? void 0 : Et.role) === "admin" && Vt(Se); + }); + } + var Me = j(pe, 2); + { + var we = (Vt) => { + var Et = wR(), + dr = A(Et); + Cv(dr, { class: "size-5" }); + var ht = j(dr); + k(Et), + We( + (Xr) => { + Tr(Et, "href", `${yi.url.origin ?? ""}/moderation`), + de(ht, ` ${Xr ?? ""}`); + }, + [() => OP()] + ), + $(Vt, Et); + }; + Oe(Me, (Vt) => { + var Et; + (Et = a.user.data) != null && + Et.role && + a.user.data.role !== "user" && + Vt(we); + }); + } + var Ve = j(Me, 2), + ut = A(Ve); + Vv(ut, { class: "size-5" }); + var Ke = j(ut); + k(Ve); + var kt = j(Ve, 2), + ye = A(kt); + Qf(ye, { class: "size-5" }), yn(), k(kt); + var Bt = j(kt, 2), + rr = A(Bt); + eR(rr, { class: "size-5" }), yn(), k(Bt); + var Kt = j(Bt, 2); + { + var gr = (Vt) => { + var Et = TR(), + dr = Ct(Et), + ht = A(dr), + Xr = A(ht); + JD(Xr, { class: "size-5" }); + var Yr = j(Xr); + k(ht), k(dr); + var Zr = j(dr, 2), + mt = A(Zr); + Uu(mt, { class: "size-5" }); + var He = j(mt); + k(Zr), + We( + (At, Ft, Jt) => { + Tr(dr, "action", `${lx}/payment/create-portal-session`), + de(Yr, ` ${At ?? ""}`), + Tr(Zr, "href", Ft), + de(He, ` ${Jt ?? ""}`); + }, + [() => wx(), () => Bv(yi.url.origin), () => Jv()] + ), + $(Vt, Et); + }; + Oe(Kt, (Vt) => { + var Et; + (Et = a.user.data) != null && Et.isCustomer && Vt(gr); + }); + } + var Ur = j(Kt, 2); + Ur.__click = [CR, y, a, M]; + var nn = A(Ur); + W0(nn, { class: "size-5" }); + var mn = j(nn); + k(Ur), k(Lt), k(De), k(fe); + var _n = j(fe, 2); + ZD(_n, { + get userData() { + return a.user.data; + }, + get open() { + return x(p); + }, + set open(Vt) { + se(p, Vt, !0); + }, + }), + We( + (Vt, Et, dr, ht, Xr, Yr, Zr, mt, He, At, Ft, Jt) => { + (Ie = zr(ge, 1, "btn size-12 p-0 shadow-md", null, Ie, Vt)), + Tr(ge, "title", Et), + Tr(nt, "title", a.user.data.name), + de(Ue, a.user.data.name), + zr(ke, 1, dr), + de(vt, `#${a.user.data.id ?? ""}`), + de(it, `${ht ?? ""}: `), + de(It, Xr), + de(xt, `Level ${Yr ?? ""}`), + de(St, ` (${Zr ?? ""}%) `), + Tr(wt, "data-tip", mt), + de(Ot, He), + Tr(hr, "data-tip", At), + de(Ke, ` ${Ft ?? ""}`), + (Ur.disabled = x(y)), + de(mn, ` ${Jt ?? ""}`); + }, + [ + () => ({ "bg-red-500": x(B) }), + () => O2(), + () => Yo(Oi(a.user.data.id)), + () => zm(), + () => a.user.data.pixelsPainted.toLocaleString("en-US"), + () => Math.floor(a.user.data.level), + () => Math.floor((a.user.data.level % 1) * 100), + () => t3(), + () => V2(), + () => (ai.muted ? RC() : zC()), + () => Y2(), + () => Q2(), + ] + ), + di("focus", ge, () => { + se(s, window.pwaInstallPrompt, !0); + }), + $(ne, H); + }; + Oe(X, (ne) => { + a.user.data && a.user.charges !== void 0 && ne(K); + }); + } + $(m, O), Dr(); +} +$n(["click"]); +var IR = Pr( + '' +); +function MR(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = IR(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + height: "24px", + viewBox: "0 -960 960 960", + width: "24px", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var kR = Pr( + '' +); +function AR(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = kR(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var ER = async (m, a, p, y, M, z) => { + if (x(a)) { + p.map.easeTo(x(a)), se(a, void 0); + return; + } + se(y, !0); + try { + Co(p.map.getCenter(), p.map.getZoom()); + const T = new fl(x(M)), + { tile: s, pixel: B } = await Qr.getRandomTile(p.season), + O = s.x * x(M) + B.x, + X = s.y * x(M) + B.y, + [K, ne] = T.pixelsToLatLon(O, X, x(z)), + H = { lat: K, lng: ne }, + fe = x(z) + 2; + se(a, { zoom: fe, center: H }, !0), + p.map.flyTo(x(a)), + hl.isEmpty() && + hl.push({ pos: p.map.getCenter(), zoom: p.map.getZoom() }), + setTimeout(() => { + se(a, void 0); + }, 2500), + hl.push({ pos: H, zoom: fe }); + } catch (T) { + Fr.error(T.message); + } finally { + se(y, !1); + } + }, + zR = Te(''); +function LR(m, a) { + Lr(a, !0); + const p = ft(() => Wi.seasons[a.season].tileSize), + y = ft(() => Wi.seasons[a.season].zoom); + let M = st(!1), + z = st(void 0); + var T = zR(); + T.__click = [ER, z, a, M, p, y]; + var s = A(T); + { + var B = (X) => { + AR(X, { class: "size-5" }); + }, + O = (X) => { + MR(X, { class: "size-5" }); + }; + Oe(s, (X) => { + x(z) ? X(O, !1) : X(B); + }); + } + k(T), + We( + (X) => { + Tr(T, "title", X), (T.disabled = x(M)); + }, + [() => d2()] + ), + $(m, T), + Dr(); +} +$n(["click"]); +var DR = Te( + '' + ), + RR = Te( + '
                  ' + ), + BR = Te(' '), + FR = Te(" "), + OR = Te( + '
                  ' + ), + NR = Te( + '

                  ' + ), + jR = Te( + ' ' + ), + VR = Te( + '

                  ' + ), + qR = Te( + '
                  ' + ), + ZR = Te( + '
                  ', + 1 + ); +function UR(m, a) { + Lr(a, !0); + const p = []; + let y = st("today"), + M = { + players: { label: Yv(), icon: yp }, + alliances: { label: Kv(), icon: xp }, + }, + z = st("players"), + T = bi({ players: {}, alliances: {} }); + const s = ft(() => T[x(z)][x(y)]); + Wr(() => { + if (x(s)) return; + const ge = x(y), + Ie = x(z); + Ie === "players" + ? Qr.leaderboardRegionPlayers(a.regionId, ge) + .then((Ae) => { + T[Ie][ge] = Ae; + }) + .catch((Ae) => { + Fr.error(Ae.message); + }) + : Ie === "alliances" && + Qr.leaderboardRegionAlliances(a.regionId, ge) + .then((Ae) => { + T[Ie][ge] = Ae; + }) + .catch((Ae) => { + Fr.error(Ae.message); + }); + }); + var B = ZR(), + O = Ct(B); + hi( + O, + 21, + () => Object.entries(M), + ([ge, { label: Ie, icon: Ae }]) => ge, + (ge, Ie) => { + var Ae = ft(() => Mv(x(Ie), 2)); + let De = () => x(Ae)[0], + Ee = () => x(Ae)[1].label, + Fe = () => x(Ae)[1].icon; + const $e = ft(Fe); + var Je = DR(), + qe = A(Je); + Ka(qe); + var Ze, + Qe = j(qe, 2); + xi( + Qe, + () => x($e), + (et, nt) => { + nt(et, { + get this() { + return Fe(); + }, + class: "mr-1 size-5 max-sm:hidden", + }); + } + ); + var Le = j(Qe); + k(Je), + We(() => { + Tr(qe, "aria-label", Ee()), + Ze !== (Ze = De()) && (qe.value = (qe.__value = De()) ?? ""), + de(Le, ` ${Ee() ?? ""}`); + }), + Lm( + p, + [], + qe, + () => (De(), x(z)), + (et) => se(z, et) + ), + $(ge, Je); + } + ), + k(O); + var X = j(O, 2), + K = A(X); + Um(K, { + get value() { + return x(y); + }, + set value(ge) { + se(y, ge, !0); + }, + }), + k(X); + var ne = j(X, 2); + { + var H = (ge) => { + var Ie = RR(), + Ae = A(Ie), + De = j(Ae); + { + var Ee = ($e) => { + var Je = wi(); + We((qe) => de(Je, qe), [() => vp().toLowerCase()]), $($e, Je); + }, + Fe = ($e) => { + var Je = er(), + qe = Ct(Je); + { + var Ze = (Le) => { + var et = wi(); + We((nt) => de(et, nt), [() => Nm()]), $(Le, et); + }, + Qe = (Le) => { + var et = er(), + nt = Ct(et); + { + var Ue = (ke) => { + var vt = wi(); + We((ee) => de(vt, ee), [() => jm()]), $(ke, vt); + }; + Oe( + nt, + (ke) => { + x(y) === "month" && ke(Ue); + }, + !0 + ); + } + $(Le, et); + }; + Oe( + qe, + (Le) => { + x(y) === "week" ? Le(Ze) : Le(Qe, !1); + }, + !0 + ); + } + $($e, Je); + }; + Oe(De, ($e) => { + x(y) === "today" ? $e(Ee) : $e(Fe, !1); + }); + } + k(Ie), We(($e) => de(Ae, `${$e ?? ""} `), [() => Om()]), $(ge, Ie); + }, + fe = (ge) => { + var Ie = er(), + Ae = Ct(Ie); + { + var De = (Fe) => { + var $e = er(), + Je = Ct($e); + { + var qe = (Qe) => { + const Le = ft(() => x(s)); + var et = NR(), + nt = A(et), + Ue = A(nt), + ke = j(A(Ue)), + vt = A(ke, !0); + k(ke); + var ee = j(ke), + re = A(ee), + he = j(re, 2, !0); + k(ee), k(Ue), k(nt); + var oe = j(nt); + hi( + oe, + 31, + () => x(Le), + (ze) => ze.id, + (ze, je, pt) => { + const it = ft(() => { + var mr; + return ( + ((mr = Mt.data) == null ? void 0 : mr.id) === + x(je).id + ); + }); + var ct = OR(); + let It; + var Dt = A(ct), + at = A(Dt, !0); + k(Dt); + var dt = j(Dt), + yt = A(dt), + xt = A(yt); + co(xt, { + class: "size-10 border", + get userId() { + return x(je).id; + }, + get pictureUrl() { + return x(je).picture; + }, + }); + var St = j(xt, 2), + wt = A(St), + _t = A(wt), + Lt = j(_t), + Rt = A(Lt); + k(Lt), k(wt); + var $t = j(wt, 2); + { + var tr = (mr) => { + const hr = ft(() => So(x(je).equippedFlag)); + var _r = BR(), + Ir = A(_r, !0); + k(_r), + We(() => { + Tr(_r, "data-tip", x(hr).name), + de(Ir, x(hr).flag); + }), + $(mr, _r); + }; + Oe($t, (mr) => { + "equippedFlag" in x(je) && + x(je).equippedFlag && + mr(tr); + }); + } + var Qt = j($t, 2); + { + var Ot = (mr) => { + Eh(mr, { + get username() { + return x(je).discord; + }, + get id() { + return x(je).discordId; + }, + }); + }; + Oe(Qt, (mr) => { + x(je).discord && mr(Ot); + }); + } + var Nt = j(Qt, 2); + { + var or = (mr) => { + var hr = FR(), + _r = A(hr, !0); + k(hr), + We( + (Ir, qr) => { + zr( + hr, + 1, + `badge badge-sm ml-0.5 border-0 ${ + Ir ?? "" + } ${qr ?? ""}` + ), + de(_r, x(je).allianceName); + }, + [ + () => pp(x(je).allianceId), + () => Oi(x(je).allianceId), + ] + ), + $(mr, hr); + }; + Oe(Nt, (mr) => { + "allianceName" in x(je) && + x(je).allianceName && + mr(or); + }); + } + k(St), k(yt), k(dt); + var cr = j(dt), + Vr = A(cr, !0); + k(cr), + k(ct), + We( + (mr, hr, _r) => { + (It = zr(ct, 1, "", null, It, mr)), + de(at, x(pt) + 1), + zr( + wt, + 1, + `font-semibold max-sm:ml-2 ${ + hr ?? "" + } flex gap-1` + ), + de(_t, `${x(je).name ?? ""} `), + de(Rt, `#${x(je).id ?? ""}`), + de(Vr, _r); + }, + [ + () => ({ "bg-base-200": x(it) }), + () => Oi(x(je).id), + () => x(je).pixelsPainted.toLocaleString("en-US"), + ] + ), + ll( + ct, + () => cl, + () => ({ duration: 200 }) + ), + $(ze, ct); + } + ), + k(oe), + k(et), + We( + (ze, je, pt) => { + de(vt, ze), de(re, `${je ?? ""} `), de(he, pt); + }, + [() => Dm(), () => vc(), () => yc().toLowerCase()] + ), + $(Qe, et); + }, + Ze = (Qe) => { + var Le = er(), + et = Ct(Le); + { + var nt = (Ue) => { + var ke = VR(), + vt = A(ke), + ee = A(vt), + re = j(A(ee)), + he = A(re, !0); + k(re); + var oe = j(re), + ze = A(oe), + je = j(ze, 2, !0); + k(oe), k(ee), k(vt); + var pt = j(vt); + hi( + pt, + 31, + () => x(s), + (it) => it.id, + (it, ct, It) => { + const Dt = ft(() => { + var $t; + return ( + (($t = Mt.data) == null + ? void 0 + : $t.allianceId) === x(ct).id + ); + }); + var at = jR(); + let dt; + var yt = A(at), + xt = A(yt, !0); + k(yt); + var St = j(yt), + wt = A(St), + _t = A(wt, !0); + k(wt), k(St); + var Lt = j(St), + Rt = A(Lt, !0); + k(Lt), + k(at), + We( + ($t, tr, Qt) => { + (dt = zr(at, 1, "", null, dt, $t)), + de(xt, x(It) + 1), + zr(wt, 1, `font-semibold ${tr ?? ""}`), + de(_t, x(ct).name), + de(Rt, Qt); + }, + [ + () => ({ "bg-base-200": x(Dt) }), + () => Oi(x(ct).id), + () => + x(ct).pixelsPainted.toLocaleString("en-US"), + ] + ), + ll( + at, + () => cl, + () => ({ duration: 200 }) + ), + $(it, at); + } + ), + k(pt), + k(ke), + We( + (it, ct, It) => { + de(he, it), de(ze, `${ct ?? ""} `), de(je, It); + }, + [() => _p(), () => vc(), () => yc().toLowerCase()] + ), + $(Ue, ke); + }; + Oe( + et, + (Ue) => { + x(z) === "alliances" && Ue(nt); + }, + !0 + ); + } + $(Qe, Le); + }; + Oe(Je, (Qe) => { + x(z) === "players" ? Qe(qe) : Qe(Ze, !1); + }); + } + $(Fe, $e); + }, + Ee = (Fe) => { + var $e = qR(); + $(Fe, $e); + }; + Oe( + Ae, + (Fe) => { + x(s) ? Fe(De) : Fe(Ee, !1); + }, + !0 + ); + } + $(ge, Ie); + }; + Oe(ne, (ge) => { + x(s) && x(s).length === 0 ? ge(H) : ge(fe, !1); + }); + } + $(m, B), Dr(); +} +var $R = Te('
                  '), + GR = Te( + ' ' + ); +function HR(m, a) { + Lr(a, !0); + let p = zt(a, "open", 15); + const y = ft(() => So(a.region.countryId)); + Fn(() => { + const ge = (Ie) => { + Ie.key === "Escape" && p(!1); + }; + return ( + document.addEventListener("keydown", ge), + () => document.removeEventListener("keydown", ge) + ); + }); + var M = GR(), + z = A(M), + T = j(A(z), 2), + s = A(T), + B = A(s, !0); + k(s); + var O = j(s, 2), + X = A(O, !0); + k(O); + var K = j(O, 2), + ne = A(K); + k(K), k(T); + var H = j(T, 2); + { + var fe = (ge) => { + var Ie = $R(), + Ae = A(Ie); + UR(Ae, { + get regionId() { + return a.region.id; + }, + }), + k(Ie), + Ai( + 2, + Ie, + () => ia, + () => ({ duration: 300 }) + ), + $(ge, Ie); + }; + Oe(H, (ge) => { + p() && ge(fe); + }); + } + k(z), + yn(2), + k(M), + Ni(M, () => (ge) => { + Wr(() => { + p() ? ge.show() : ge.close(); + }); + }), + We( + (ge) => { + zr(T, 1, `flex gap-2 text-xl font-bold sm:text-2xl ${ge ?? ""}`), + Tr(s, "data-tip", x(y).name), + de(B, x(y).flag), + de(X, a.region.name), + de(ne, `#${a.region.number ?? ""}`); + }, + [() => Oi(a.region.cityId)] + ), + di("close", M, () => p(!1)), + $(m, M), + Dr(); +} +var WR = Pr( + '' +); +function XR(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = WR(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + height: "24px", + viewBox: "0 -960 960 960", + width: "24px", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var YR = Pr( + '' + ), + KR = Pr( + '' + ); +function JR(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy", "filled"]); + var y = er(), + M = Ct(y); + { + var z = (s) => { + var B = YR(); + ar(B, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(s, B); + }, + T = (s) => { + var B = KR(); + ar(B, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(s, B); + }; + Oe(M, (s) => { + a.filled ? s(z) : s(T, !1); + }); + } + $(m, y); +} +var QR = (m, a, p, y, M) => { + if (x(a) && x(p)) { + const z = x(a) - x(p).clientHeight, + T = x(a) / 2 - z / 2; + y.map.flyTo({ + center: { lat: x(M).center[0], lng: x(M).center[1] }, + zoom: 17.5, + offset: [0, -T], + }); + } + }, + e7 = (m, a, p) => a.onclickregion(x(p)), + t7 = Te( + '' + ), + r7 = Te('
                  '), + n7 = Te('
                  '), + i7 = Te(' '), + a7 = (m, a) => { + navigator.clipboard.writeText(x(a).allianceId.toString()), Fr.success(Fm()); + }, + o7 = Te(""), + s7 = Te(" ", 1), + l7 = Te(''), + c7 = Te(''), + u7 = (m, a) => { + a("report-user"); + }, + h7 = Te("
                • "), + d7 = (m, a) => { + a("timeout"); + }, + p7 = Te("
                • "), + f7 = (m, a) => { + a("ban"); + }, + m7 = Te("
                • "), + _7 = async (m, a, p, y, M, z) => { + se(a, !0); + try { + await Qr.banAllianceUser(x(p).id), await y({ ...x(M), season: z.season }); + } catch (T) { + Fr.error(T.message); + } finally { + se(a, !1); + } + }, + g7 = Te('
                • '), + v7 = Te( + '' + ), + y7 = Te( + '
                  ' + ), + x7 = (m, a) => a.onclickpaint(a.latLon), + b7 = async (m, a, p, y) => { + try { + se(a, !0), + x(p) + ? (await Qr.deleteFavoriteLocation(x(p).id), Fr.warning(lS())) + : (await Qr.favoriteLocation(x(y).center), Fr.success(hS())), + aa.smallPlop.play(), + Mt.refresh(); + } catch (M) { + Fr.error(M.message); + } finally { + se(a, !1); + } + }, + w7 = Te(""), + T7 = (m, a, p) => + a.onclickshare( + y4(yi.url, { + pos: { lat: x(p).center[0], lng: x(p).center[1] }, + zoom: a.zoom, + }) + ), + C7 = Te( + '

                  ' + ); +function S7(m, a) { + Lr(a, !0); + let p = st(void 0); + const y = ft(() => new fl(a.tileSize)); + let M = st(void 0), + z = st(void 0), + T = st(!1), + s = st(!1); + const B = ft(() => { + var at, dt, yt; + return ( + !!( + (dt = (at = x(p)) == null ? void 0 : at.paintedBy) != null && dt.id + ) && ((yt = Mt.data) == null ? void 0 : yt.id) === x(p).paintedBy.id + ); + }), + O = ft(() => { + const [at, dt] = a.latLon ?? [0, 0], + yt = x(y).latLonToPixelBoundsLatLon(at, dt, a.pixelArtZoom), + xt = qm(yt), + { tile: St, pixel: wt } = x(y).latLonToTileAndPixel( + at, + dt, + a.pixelArtZoom + ), + _t = x(y).latLonToRegionAndPixel(at, dt, a.pixelArtZoom); + return { + bounds: yt, + center: xt, + tile: St, + pixel: wt, + regionPixel: _t.pixel, + }; + }); + Wr(() => { + aa.plop.play(), a.crosshair.clearAndPlace(a.latLon); + }); + let X = 0; + const K = ({ pixel: at, tile: dt, season: yt }) => + `s${yt}:p(${at[0]},${at[1]}):t(${dt[0]},${dt[1]})`; + let ne; + dl( + () => [x(O), a.season], + () => { + const at = { ...x(O), season: a.season }, + dt = K(at); + if ((se(p, a.pixelInfoCache.get(dt), !0), x(p) !== void 0)) return; + a.pixelInfoCache.size === 0 && (X = 0), + X++, + X > 6 + ? (clearTimeout(ne), (ne = setTimeout(async () => H(at), 500))) + : H(at); + } + ); + async function H(at) { + var xt; + const dt = await Qr.getPixelInfo({ + ...at, + isModerator: xc((xt = Mt.data) == null ? void 0 : xt.role, [ + "admin", + "global_moderator", + "moderator", + ]), + }); + if (dt.paintedBy !== void 0) { + const St = K(at); + a.pixelInfoCache.set(St, dt); + } + const yt = K({ ...x(O), season: a.season }); + return se(p, a.pixelInfoCache.get(yt), !0), dt; + } + function fe() { + a.crosshair.clear(), aa.smallPlop.play(), a.onclose(); + } + Fn(() => { + const at = (dt) => { + dt.key === "Escape" && fe(); + }; + return ( + document.addEventListener("keydown", at), + () => document.removeEventListener("keydown", at) + ); + }); + const ge = ft(() => { + var xt, St, wt, _t, Lt; + const at = [], + dt = + (St = (xt = Mt) == null ? void 0 : xt.data) == null ? void 0 : St.role; + xc(dt, ["admin"]) && !x(B) && at.push("ban-user"), + xc(dt, ["admin", "global_moderator", "moderator"]) && + !x(B) && + at.push("timeout-user"), + !x(B) && Mt.data && at.push("report-user"); + const yt = (wt = x(p)) == null ? void 0 : wt.paintedBy; + return ( + (yt == null ? void 0 : yt.allianceId) === + ((_t = Mt.data) == null ? void 0 : _t.allianceId) && + ((Lt = Mt.data) == null ? void 0 : Lt.allianceRole) === "admin" && + Mt.data.id !== (yt == null ? void 0 : yt.id) && + !x(B) && + at.push("ban-alliance"), + at + ); + }); + function Ie(at) { + const dt = (async () => + await a0(a.map, { + maxHeight: 1080, + maxWidth: 1080, + quality: 0.8, + type: "image/jpeg", + }))(); + a.onclickmodaction(x(p), dt, a.latLon, at); + } + var Ae = C7(), + De = A(Ae), + Ee = A(De), + Fe = A(Ee); + Fe.__click = [QR, M, z, a, O]; + var $e = A(Fe); + Em($e, { class: "fill-primary size-5" }), k(Fe); + var Je = j(Fe, 2), + qe = A(Je), + Ze = A(qe); + k(qe); + var Qe = j(qe, 2); + { + var Le = (at) => { + const dt = ft(() => x(p).region), + yt = ft(() => So(x(dt).countryId)); + var xt = t7(); + xt.__click = [e7, a, dt]; + var St = A(xt), + wt = A(St, !0); + k(St); + var _t = j(St, 2), + Lt = A(_t, !0); + k(_t); + var Rt = j(_t, 2), + $t = A(Rt); + k(Rt), + k(xt), + We( + (tr) => { + zr( + xt, + 1, + `btn btn-xs flex gap-1 py-3 text-sm max-sm:max-w-32 ${tr ?? ""}` + ), + Tr(St, "data-tip", x(yt).name), + de(wt, x(yt).flag), + de(Lt, x(dt).name), + de($t, `#${x(dt).number ?? ""}`); + }, + [() => Oi(x(dt).cityId)] + ), + $(at, xt); + }, + et = (at) => { + var dt = r7(); + $(at, dt); + }; + Oe(Qe, (at) => { + var dt; + (dt = x(p)) != null && dt.region ? at(Le) : at(et, !1); + }); + } + k(Je), k(Ee); + var nt = j(Ee, 2); + nt.__click = fe; + var Ue = A(nt); + _l(Ue, { class: "size-4" }), k(nt), k(De); + var ke = j(De, 2), + vt = A(ke); + { + var ee = (at) => { + var dt = n7(); + $(at, dt); + }, + re = (at) => { + var dt = er(), + yt = Ct(dt); + { + var xt = (wt) => { + var _t = wi(); + We((Lt) => de(_t, Lt), [() => fC()]), $(wt, _t); + }, + St = (wt) => { + const _t = ft(() => x(p).paintedBy); + var Lt = y7(), + Rt = A(Lt), + $t = A(Rt); + k(Rt); + var tr = j(Rt, 2), + Qt = A(tr); + co(Qt, { + class: "size-5 border-0", + get userId() { + return x(_t).id; + }, + get pictureUrl() { + return x(_t).picture; + }, + }), + k(tr); + var Ot = j(tr, 2), + Nt = A(Ot), + or = A(Nt), + cr = A(or, !0); + k(or); + var Vr = j(or, 2), + mr = A(Vr); + k(Vr), k(Nt); + var hr = j(Nt, 2); + { + var _r = (Me) => { + const we = ft(() => So(x(_t).equippedFlag)); + var Ve = i7(), + ut = A(Ve, !0); + k(Ve), + We(() => { + Tr(Ve, "data-tip", x(we).name), de(ut, x(we).flag); + }), + $(Me, Ve); + }; + Oe(hr, (Me) => { + x(_t).equippedFlag && Me(_r); + }); + } + var Ir = j(hr, 2); + { + var qr = (Me) => { + Eh(Me, { + get username() { + return x(_t).discord; + }, + get id() { + return x(_t).discordId; + }, + }); + }; + Oe(Ir, (Me) => { + x(_t).discord && Me(qr); + }); + } + var ue = j(Ir, 2); + { + var V = (Me) => { + var we = s7(), + Ve = Ct(we), + ut = A(Ve, !0); + k(Ve); + var Ke = j(Ve, 2); + { + var kt = (ye) => { + var Bt = o7(); + Bt.__click = [a7, _t]; + var rr = A(Bt); + Rm(rr, { class: "size-3" }), + k(Bt), + We( + (Kt, gr) => { + zr(Bt, 1, Kt), Tr(Bt, "title", gr); + }, + [ + () => Yo(Oi(x(_t).allianceId)), + () => Nx({ allianceId: x(_t).allianceId }), + ] + ), + $(ye, Bt); + }; + Oe(Ke, (ye) => { + var Bt, rr, Kt; + (((Bt = Mt.data) == null ? void 0 : Bt.role) === + "admin" || + ((rr = Mt.data) == null ? void 0 : rr.role) === + "moderator" || + ((Kt = Mt.data) == null ? void 0 : Kt.role) === + "global_moderator") && + ye(kt); + }); + } + We( + (ye, Bt) => { + zr( + Ve, + 1, + `badge badge-sm ml-0.5 border-0 ${ye ?? ""} ${Bt ?? ""}` + ), + de(ut, x(_t).allianceName); + }, + [() => pp(x(_t).allianceId), () => Oi(x(_t).allianceId)] + ), + $(Me, we); + }; + Oe(ue, (Me) => { + x(_t).allianceId && Me(V); + }); + } + var U = j(ue, 2); + { + var Y = (Me) => { + var we = l7(), + Ve = A(we); + Xg(Ve, { class: "text-error size-4" }), + k(we), + We((ut) => Tr(we, "data-tip", ut), [() => Xv()]), + $(Me, we); + }, + ie = (Me) => { + var we = er(), + Ve = Ct(we); + { + var ut = (Ke) => { + var kt = c7(), + ye = A(kt); + Xf(ye, { class: "text-error size-4" }), + k(kt), + We((Bt) => Tr(kt, "data-tip", Bt), [() => Lx()]), + $(Ke, kt); + }; + Oe( + Ve, + (Ke) => { + x(p).paintedBy.timedOut && Ke(ut); + }, + !0 + ); + } + $(Me, we); + }; + Oe(U, (Me) => { + x(p).paintedBy.banned ? Me(Y) : Me(ie, !1); + }); + } + k(Ot); + var pe = j(Ot, 2); + { + var Se = (Me) => { + var we = v7(), + Ve = A(we), + ut = A(Ve); + $m(ut, { class: "size-4" }), k(Ve); + var Ke = j(Ve, 2); + hi( + Ke, + 21, + () => x(ge), + hp, + (kt, ye) => { + var Bt = er(), + rr = Ct(Bt); + { + var Kt = (Ur) => { + var nn = h7(), + mn = A(nn); + let _n; + mn.__click = [u7, Ie]; + var Vt = A(mn); + X0(Vt, { class: "size-5" }); + var Et = j(Vt); + k(mn), + k(nn), + We( + (dr, ht) => { + (_n = zr( + mn, + 1, + "text-error py-2 font-medium", + null, + _n, + dr + )), + de(Et, ` ${ht ?? ""}`); + }, + [ + () => ({ "cursor-not-allowed": x(B) }), + () => Tx(), + ] + ), + $(Ur, nn); + }, + gr = (Ur) => { + var nn = er(), + mn = Ct(nn); + { + var _n = (Et) => { + var dr = p7(), + ht = A(dr); + let Xr; + ht.__click = [d7, Ie]; + var Yr = A(ht); + Xf(Yr, { class: "size-5" }); + var Zr = j(Yr); + k(ht), + k(dr), + We( + (mt, He) => { + (Xr = zr( + ht, + 1, + "text-error font-medium", + null, + Xr, + mt + )), + de(Zr, ` ${He ?? ""}`); + }, + [ + () => ({ "cursor-not-allowed": x(B) }), + () => Cx(), + ] + ), + $(Et, dr); + }, + Vt = (Et) => { + var dr = er(), + ht = Ct(dr); + { + var Xr = (Zr) => { + var mt = m7(), + He = A(mt); + let At; + He.__click = [f7, Ie]; + var Ft = A(He); + Xg(Ft, { class: "size-5" }); + var Jt = j(Ft); + k(He), + k(mt), + We( + (Cr, Er) => { + (At = zr( + He, + 1, + "text-error font-medium", + null, + At, + Cr + )), + de(Jt, ` ${Er ?? ""}`); + }, + [ + () => ({ + "cursor-not-allowed": x(B), + }), + () => Sx(), + ] + ), + $(Zr, mt); + }, + Yr = (Zr) => { + var mt = er(), + He = Ct(mt); + { + var At = (Ft) => { + var Jt = g7(), + Cr = A(Jt); + Cr.__click = [_7, s, _t, H, O, a]; + var Er = A(Cr); + XR(Er, { class: "size-5" }); + var ur = j(Er); + k(Cr), + k(Jt), + We( + (rn) => de(ur, ` ${rn ?? ""}`), + [() => Wv()] + ), + $(Ft, Jt); + }; + Oe( + He, + (Ft) => { + x(ye) === "ban-alliance" && + Ft(At); + }, + !0 + ); + } + $(Zr, mt); + }; + Oe( + ht, + (Zr) => { + x(ye) === "ban-user" + ? Zr(Xr) + : Zr(Yr, !1); + }, + !0 + ); + } + $(Et, dr); + }; + Oe( + mn, + (Et) => { + x(ye) === "timeout-user" + ? Et(_n) + : Et(Vt, !1); + }, + !0 + ); + } + $(Ur, nn); + }; + Oe(rr, (Ur) => { + x(ye) === "report-user" ? Ur(Kt) : Ur(gr, !1); + }); + } + $(kt, Bt); + } + ), + k(Ke), + k(we), + $(Me, we); + }; + Oe(pe, (Me) => { + x(ge).length > 0 && Me(Se); + }); + } + k(Lt), + We( + (Me, we) => { + var Ve; + de($t, `${Me ?? ""}:`), + zr(Nt, 1, `font-medium ${we ?? ""} flex gap-1.5`), + de( + cr, + ((Ve = Mt.data) == null ? void 0 : Ve.id) === x(_t).id + ? Mt.data.name + : x(_t).name + ), + de(mr, `#${x(_t).id ?? ""}`); + }, + [() => gC(), () => Oi(x(_t).id)] + ), + $(wt, Lt); + }; + Oe( + yt, + (wt) => { + x(p).paintedBy.id === 0 ? wt(xt) : wt(St, !1); + }, + !0 + ); + } + $(at, dt); + }; + Oe(vt, (at) => { + x(p) === void 0 ? at(ee) : at(re, !1); + }); + } + k(ke); + var he = j(ke, 2), + oe = A(he); + oe.__click = [x7, a]; + var ze = A(oe); + zh(ze, { class: "size-4.5" }); + var je = j(ze); + k(oe); + var pt = j(oe, 2); + { + var it = (at) => { + const dt = ft(() => + Mt.data.favoriteLocations.find( + (Lt) => + Math.abs(Lt.latitude - x(O).center[0]) < 5e-5 && + Math.abs(Lt.longitude - x(O).center[1]) < 5e-5 + ) + ), + yt = ft( + () => + !x(dt) && + Mt.data.favoriteLocations.length >= Mt.data.maxFavoriteLocations + ); + var xt = w7(); + let St; + xt.__click = [b7, T, dt, O]; + var wt = A(xt); + { + let Lt = ft(() => !!x(dt)); + JR(wt, { + class: "size-4.5", + get filled() { + return x(Lt); + }, + }); + } + var _t = j(wt); + k(xt), + We( + (Lt, Rt) => { + (St = zr(xt, 1, "btn btn-primary btn-soft", null, St, Lt)), + (xt.disabled = x(T) || x(yt)), + de(_t, ` ${Rt ?? ""}`); + }, + [() => ({ "text-yellow-400": !!x(dt) }), () => (x(yt) ? xC() : TC())] + ), + $(at, xt); + }; + Oe(pt, (at) => { + Mt.data && at(it); + }); + } + var ct = j(pt, 2); + ct.__click = [T7, a, O]; + var It = A(ct); + o0(It, { class: "size-4.5" }); + var Dt = j(It); + k(ct), + k(he), + k(Ae), + Ko( + Ae, + (at) => se(z, at), + () => x(z) + ), + We( + (at, dt) => { + de( + Ze, + `Pixel: ${x(O).regionPixel[0] ?? ""}, ${x(O).regionPixel[1] ?? ""}` + ), + (oe.disabled = Mt.loading), + de(je, ` ${at ?? ""}`), + de(Dt, ` ${dt ?? ""}`); + }, + [() => Gv(), () => PC()] + ), + mp("innerHeight", (at) => se(M, at, !0)), + $(m, Ae), + Dr(); +} +$n(["click"]); +var P7 = Te(" ", 1), + I7 = (m, a, p) => { + a(x(p)); + }, + M7 = Te( + '
                  ' + ), + k7 = Te( + '

                  No one has painted in this area yet.

                  ' + ), + A7 = (m, a) => { + navigator.clipboard.writeText( + x(a) + .map((p) => p.id) + .join(", ") + ), + Fr.success("Player IDs copied to clipboard"); + }, + E7 = (m, a, p, y, M) => { + a.crosshair.clear(), p(x(y).painted), se(M, x(y).id, !0); + }, + z7 = Te(" "), + L7 = Te( + '
                  ' + ), + D7 = Te( + '
                  Player Pixels Painted
                  ' + ), + R7 = Te( + '

                  Selected area

                  ' + ); +function B7(m, a) { + Lr(a, !0); + let p = bi([]), + y = st(bi([])), + M = st(!1), + z = st(void 0); + Fn(() => { + const H = a.map.on("click", async (fe) => { + if (p.length >= 2) { + a.onclose(); + return; + } + if ( + (p.push(fe.lngLat), + a.crosshair.place([fe.lngLat.lat, fe.lngLat.lng]), + aa.plop.play(), + p.length === 2) + ) + try { + se(M, !0), se(y, await T(p[0], p[1]), !0), s(x(y)); + } finally { + se(M, !1); + } + }); + return () => { + H.unsubscribe(), a.crosshair.clear(); + }; + }); + async function T(H, fe) { + const ge = new fl(a.tileSize), + [Ie, Ae] = ge.latLonToPixelsFloor(H.lat, H.lng, a.pixelArtZoom), + [De, Ee] = ge.latLonToPixelsFloor(fe.lat, fe.lng, a.pixelArtZoom), + [Fe, $e] = [Math.min(Ie, De), Math.min(Ae, Ee)], + [Je, qe] = [Math.max(Ie, De), Math.max(Ae, Ee)], + Ze = Je - Fe, + Qe = qe - $e; + if (Ze * Qe > 1e6) + return ( + Fr.error( + "The selected area is too big. Please select an area smaller than 1,000,000 pixels." + ), + [] + ); + const et = Math.floor(Fe / a.tileSize), + nt = Math.floor($e / a.tileSize), + Ue = Math.floor(Je / a.tileSize), + ke = Math.floor(qe / a.tileSize), + vt = Ue - et + 1, + ee = ke - nt + 1, + re = new Array(ee).fill(0).flatMap((it, ct) => + new Array(vt).fill(0).map(async (It, Dt) => { + const at = et + Dt, + dt = nt + ct; + let yt = 0, + xt = 0, + St = a.tileSize - 1, + wt = a.tileSize - 1; + dt === nt && (xt = $e % a.tileSize), + at === et && (yt = Fe % a.tileSize), + dt === ke && (wt = qe % a.tileSize), + at === Ue && (St = Je % a.tileSize); + const tr = [at, dt], + Qt = [yt, xt], + Ot = [St, wt]; + return { + response: await Qr.getPixelAreaInfo({ + season: a.season, + tile: tr, + p0: Qt, + p1: Ot, + }), + tile: tr, + p0: Qt, + p1: Ot, + }; + }) + ), + he = await Promise.all(re), + oe = new Map(); + for (const { response: it, p0: ct, p1: It, tile: Dt } of he) { + const [at, dt] = Dt, + [yt, xt] = ct, + [St, wt] = It, + _t = St - yt + 1, + Lt = wt - xt + 1; + for (let Rt = 0; Rt < Lt; Rt++) + for (let $t = 0; $t < _t; $t++) { + const tr = Rt * _t + $t, + Qt = it.paintedBy[tr]; + let Ot = oe.get(Qt); + Ot || ((Ot = { latitudes: [], longitudes: [] }), oe.set(Qt, Ot)); + const [Nt, or] = ge.pixelsToLatLon( + at * a.tileSize + (yt + $t + 0.5), + dt * a.tileSize + (xt + Rt + 0.5), + a.pixelArtZoom + ); + Ot.latitudes.push(Nt), Ot.longitudes.push(or); + } + } + const { users: ze } = await Qr.getMultipleUsersInfoById([...oe.keys()]), + je = dx(ze, (it) => it.id), + pt = [...oe.entries()].map(([it, ct]) => ({ + ...(je[it] ?? { id: it, name: "Player" }), + painted: ct, + })); + return ( + pt.sort( + (it, ct) => ct.painted.latitudes.length - it.painted.latitudes.length + ), + pt + ); + } + function s(H) { + for (const fe of H) B(fe.painted); + se(z, void 0); + } + function B(H) { + for (let fe = 0; fe < H.latitudes.length; fe++) + a.crosshair.place([H.latitudes[fe], H.longitudes[fe]]); + aa.plop.play(); + } + var O = er(), + X = Ct(O); + { + var K = (H) => { + ol(H, { + class: "bg-warning", + children: (fe, ge) => { + var Ie = P7(), + Ae = Ct(Ie); + Gu(Ae, { class: "inline size-5" }); + var De = j(Ae, 2); + { + var Ee = ($e) => { + var Je = wi(); + We((qe) => de(Je, qe), [() => Qv()]), $($e, Je); + }, + Fe = ($e) => { + var Je = er(), + qe = Ct(Je); + { + var Ze = (Qe) => { + var Le = wi(); + We((et) => de(Le, et), [() => e0()]), $(Qe, Le); + }; + Oe( + qe, + (Qe) => { + p.length === 1 && Qe(Ze); + }, + !0 + ); + } + $($e, Je); + }; + Oe(De, ($e) => { + p.length === 0 ? $e(Ee) : $e(Fe, !1); + }); + } + $(fe, Ie); + }, + $$slots: { default: !0 }, + }); + }, + ne = (H) => { + const fe = ft(() => x(y).filter((Ue) => Ue.id !== 0)); + var ge = R7(), + Ie = A(ge), + Ae = A(Ie), + De = A(Ae), + Ee = A(De); + Ee.__click = [I7, s, y]; + var Fe = A(Ee); + Gu(Fe, { class: "size-4" }), k(Ee); + var $e = j(Ee, 4), + Je = A($e); + k($e), k(De); + var qe = j(De, 2); + qe.__click = function (...Ue) { + var ke; + (ke = a.onclose) == null || ke.apply(this, Ue); + }; + var Ze = A(qe); + _l(Ze, { class: "size-4" }), k(qe), k(Ae); + var Qe = j(Ae, 2), + Le = A(Qe); + { + var et = (Ue) => { + var ke = M7(); + $(Ue, ke); + }, + nt = (Ue) => { + var ke = er(), + vt = Ct(ke); + { + var ee = (he) => { + var oe = k7(); + $(he, oe); + }, + re = (he) => { + var oe = D7(), + ze = A(oe), + je = A(ze), + pt = A(je), + it = j(A(pt)), + ct = j(A(it)); + ct.__click = [A7, fe]; + var It = A(ct); + Rm(It, { class: "size-3" }), + k(ct), + k(it), + yn(), + k(pt), + k(je); + var Dt = j(je); + hi( + Dt, + 23, + () => x(fe), + (at) => at.id, + (at, dt, yt) => { + var xt = L7(); + let St; + xt.__click = [E7, a, B, dt, z]; + var wt = A(xt), + _t = A(wt, !0); + k(wt); + var Lt = j(wt), + Rt = A(Lt); + co(Rt, { + class: "size-5 border-0", + get userId() { + return x(dt).id; + }, + get pictureUrl() { + return x(dt).picture; + }, + }); + var $t = j(Rt, 2), + tr = A($t), + Qt = A(tr), + Ot = A(Qt, !0); + k(Qt); + var Nt = j(Qt, 2), + or = A(Nt); + k(Nt), k(tr); + var cr = j(tr, 2); + { + var Vr = (_r) => { + var Ir = z7(), + qr = A(Ir, !0); + k(Ir), + We( + (ue, V) => { + zr( + Ir, + 1, + `badge badge-sm ml-0.5 border-0 ${ + ue ?? "" + } ${V ?? ""}` + ), + de(qr, x(dt).allianceName); + }, + [ + () => pp(x(dt).allianceId), + () => Oi(x(dt).allianceId), + ] + ), + $(_r, Ir); + }; + Oe(cr, (_r) => { + x(dt).allianceId && _r(Vr); + }); + } + k($t), k(Lt); + var mr = j(Lt), + hr = A(mr, !0); + k(mr), + k(xt), + We( + (_r, Ir, qr) => { + (St = zr( + xt, + 1, + "hover:bg-base-200 cursor-pointer", + null, + St, + _r + )), + de(_t, x(yt) + 1), + zr( + tr, + 1, + `font-medium ${Ir ?? ""} flex gap-1.5` + ), + de(Ot, x(dt).name), + de(or, `#${x(dt).id ?? ""}`), + de(hr, qr); + }, + [ + () => ({ "!bg-base-300": x(dt).id === x(z) }), + () => Oi(x(dt).id), + () => + x(dt).painted.latitudes.length.toLocaleString(), + ] + ), + $(at, xt); + } + ), + k(Dt), + k(ze), + k(oe), + $(he, oe); + }; + Oe( + vt, + (he) => { + x(fe).length === 0 ? he(ee) : he(re, !1); + }, + !0 + ); + } + $(Ue, ke); + }; + Oe(Le, (Ue) => { + x(M) ? Ue(et) : Ue(nt, !1); + }); + } + k(Qe), + k(Ie), + k(ge), + We( + (Ue) => de(Je, `(Pixels: ${Ue ?? ""})`), + [() => x(y).reduce((Ue, ke) => Ue + ke.painted.latitudes.length, 0)] + ), + Ai( + 3, + ge, + () => Hd, + () => ({ duration: 100 }) + ), + $(H, ge); + }; + Oe(X, (H) => { + p.length < 2 ? H(K) : H(ne, !1); + }); + } + $(m, O), Dr(); +} +$n(["click"]); +function F7(m) { + var y; + const a = document.createElement("div"); + (y = m.parentElement) == null || y.insertBefore(a, m.nextSibling); + const p = new IntersectionObserver( + (M) => { + M[0].isIntersecting + ? m.classList.remove("stuck") + : m.classList.add("stuck"); + }, + { threshold: 0, rootMargin: "0px" } + ); + return ( + p.observe(a), + () => { + a.remove(), p.disconnect(); + } + ); +} +var Im; +((m) => { + function a() { + let p, y; + return { + promise: new Promise((z, T) => { + (p = z), (y = T); + }), + resolve: p, + reject: y, + }; + } + m.withResolvers = a; +})(Im || (Im = {})); +var O7 = Pr( + '' + ), + N7 = Pr( + '' + ); +function j7(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy", "filled"]); + var y = er(), + M = Ct(y); + { + var z = (s) => { + var B = O7(); + ar(B, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(s, B); + }, + T = (s) => { + var B = N7(); + ar(B, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(s, B); + }; + Oe(M, (s) => { + a.filled ? s(z) : s(T, !1); + }); + } + $(m, y); +} +var V7 = Te("

                  "), + q7 = Te( + '' + ), + Z7 = Te( + '' + ), + U7 = Te( + '' + ), + $7 = Te(' ', 1), + G7 = Te(' '), + H7 = Te( + '' + ), + W7 = Te( + '

                  ' + ), + X7 = (m, a) => { + se(a, !x(a)); + }, + Y7 = Te( + '

                  Flags

                  ' + ); +function K7(m, a) { + Lr(a, !0); + const p = (Fe, $e = pa, Je = pa) => { + const qe = ft(() => { + var ct; + return ( + (((ct = Mt.data) == null ? void 0 : ct.droplets) ?? 0) >= s.price + ); + }), + Ze = ft(() => x(O) === $e().id), + Qe = ft(() => y.has($e().id)); + var Le = W7(), + et = A(Le), + nt = A(et, !0); + k(et); + var Ue = j(et, 2), + ke = A(Ue), + vt = j(ke); + { + var ee = (ct) => { + var It = V7(), + Dt = A(It); + Uu(Dt, { class: "text-base-content/60 size-4.5 inline pb-0.5" }), + k(It), + We( + (at) => { + zr( + It, + 1, + Yo({ + "tooltip inline": !0, + "lg:before:-translate-x-1/3": (Je() + 1) % 4 === 0, + "lg:before:translate-x-1/3": Je() % 4 === 0, + "before:-translate-x-1/3": (Je() + 1) % 2 === 0, + "before:translate-x-1/3": Je() % 2 === 0, + }) + ), + Tr(It, "data-tip", at); + }, + [() => lI()] + ), + $(ct, It); + }; + Oe(vt, (ct) => { + x(Qe) && ct(ee); + }); + } + k(Ue); + var re = j(Ue, 2); + { + var he = (ct) => { + Xm(ct, {}); + }; + Oe(re, (ct) => { + $e().id === x(X) && ct(he); + }); + } + var oe = j(re, 2); + let ze; + var je = A(oe); + { + var pt = (ct) => { + var It = Z7(); + It.__click = async () => { + if (!(x(Qe) && !(await a.promptUserConfirmation($e().name)))) + try { + const xt = $e().id; + se(O, xt, !0), + await Qr.purchase({ id: T, amount: 1, variant: xt }), + Mt.refresh(), + aa.notification1.play(); + const St = z.find((wt) => wt.id === xt); + St && (St.owned = !0), se(X, xt, !0); + } catch (xt) { + Fr.error(xt.message); + } finally { + se(O, void 0); + } + }; + var Dt = A(It); + { + var at = (xt) => { + var St = q7(); + $(xt, St); + }; + Oe(Dt, (xt) => { + x(Ze) && xt(at); + }); + } + var dt = j(Dt, 2); + fp(dt, { class: "size-4" }); + var yt = j(dt); + yn(), + k(It), + We( + (xt) => { + (It.disabled = !x(qe) || x(Ze)), de(yt, ` ${xt ?? ""} `); + }, + [() => s.price.toLocaleString("en-US")] + ), + $(ct, It); + }, + it = (ct) => { + const It = ft(() => { + var Rt; + return ( + ((Rt = Mt.data) == null ? void 0 : Rt.equippedFlag) === $e().id + ); + }); + var Dt = H7(); + let at; + Dt.__click = async () => { + try { + se(O, $e().id, !0); + const Rt = x(It) ? 0 : $e().id; + await Qr.equipFlag(Rt), + Mt.data && (Mt.data.equippedFlag = Rt), + Mt.refresh(); + } catch (Rt) { + Fr.error(Rt.message); + } finally { + se(O, void 0); + } + }; + var dt = A(Dt), + yt = A(dt, !0); + k(dt); + var xt = j(dt, 2); + { + var St = (Rt) => { + var $t = U7(); + $(Rt, $t); + }; + Oe(xt, (Rt) => { + x(Ze) && Rt(St); + }); + } + var wt = j(xt, 2); + { + var _t = (Rt) => { + var $t = $7(), + tr = Ct($t); + _l(tr, { class: "size-4" }); + var Qt = j(tr, 2), + Ot = A(Qt, !0); + k(Qt), We((Nt) => de(Ot, Nt), [() => Mw()]), $(Rt, $t); + }, + Lt = (Rt) => { + var $t = G7(), + tr = A($t, !0); + k($t), We((Qt) => de(tr, Qt), [() => Ew()]), $(Rt, $t); + }; + Oe(wt, (Rt) => { + x(It) ? Rt(_t) : Rt(Lt, !1); + }); + } + k(Dt), + We( + (Rt, $t) => { + (at = zr( + Dt, + 1, + "btn btn-lg sm:btn-md tooltip tooltip-bottom relative h-10", + null, + at, + Rt + )), + (Dt.disabled = x(Ze)), + de(yt, $t); + }, + [() => ({ "btn-warning": x(It) }), () => Sw()] + ), + $(ct, Dt); + }; + Oe(je, (ct) => { + $e().owned ? ct(it, !1) : ct(pt); + }); + } + k(oe), + k(Le), + We( + (ct, It) => { + de(nt, $e().flag), + de(ke, `${$e().name ?? ""} `), + (ze = zr(oe, 1, "mt-3", null, ze, ct)), + Tr(oe, "data-tip", It); + }, + [() => ({ tooltip: !x(qe) }), () => gp()] + ), + $(Fe, Le); + }, + y = new Set([ + 8, 30, 32, 84, 96, 125, 143, 146, 150, 192, 200, 236, 240, 251, + ]), + M = Wi.countries.map((Fe) => ({ ...Fe, owned: Mt.flagsBitmap.get(Fe.id) })); + M.sort((Fe, $e) => Number($e.owned) - Number(Fe.owned)); + const z = bi(M), + T = 110, + s = Wi.products[T]; + let B = st(!1), + O = st(void 0), + X = st(void 0); + var K = Y7(), + ne = A(K), + H = A(ne); + j7(H, { class: "size-5.5", filled: !0 }), yn(2), k(ne); + var fe = j(ne, 2), + ge = A(fe, !0); + k(fe); + var Ie = j(fe, 2); + hi( + Ie, + 23, + () => z, + (Fe) => Fe.id, + (Fe, $e, Je) => { + var qe = er(), + Ze = Ct(qe); + { + var Qe = (Le) => { + p( + Le, + () => x($e), + () => x(Je) + ); + }; + Oe(Ze, (Le) => { + (x(Je) < 8 || x(B)) && Le(Qe); + }); + } + $(Fe, qe); + } + ), + k(Ie); + var Ae = j(Ie, 2), + De = A(Ae); + De.__click = [X7, B]; + var Ee = A(De, !0); + k(De), + k(Ae), + k(K), + We( + (Fe) => { + de(ge, Fe), de(Ee, x(B) ? "Show less" : "Show more"); + }, + [() => ww()] + ), + $(m, K), + Dr(); +} +$n(["click"]); +var J7 = Te('

                  '), + Q7 = (m, a) => { + kv(a, -1); + }, + e9 = (m, a) => { + kv(a); + }, + t9 = (m, a, p) => { + a(x(p)); + }, + r9 = Te( + '' + ), + n9 = async (m, a, p, y) => { + try { + se(a, !0), + await Qr.purchase({ id: p.productId, amount: y() }), + aa.notification1.play(), + p.onpurchasecompleted(y()); + } catch (M) { + Fr.error(M.message); + } finally { + se(a, !1); + } + }, + i9 = Te( + '' + ), + a9 = Te( + '

                  ' + ); +function Sv(m, a) { + Lr(a, !0); + let p = zt(a, "amount", 15, 1); + const y = ft(() => p() * a.unitPrice), + M = ft(() => Math.floor(a.userDroplets / a.unitPrice)); + let z = st(!1); + Wr(() => { + p() < 0 && p(0); + }); + var T = a9(), + s = A(T), + B = A(s); + oi(B, () => a.icon ?? pa), k(s); + var O = j(s, 2), + X = A(O, !0); + k(O); + var K = j(O, 2); + { + var ne = (Le) => { + var et = J7(), + nt = A(et, !0); + k(et), We(() => de(nt, a.subtitle)), $(Le, et); + }; + Oe(K, (Le) => { + a.subtitle && Le(ne); + }); + } + var H = j(K, 2), + fe = A(H); + fe.__click = [Q7, p]; + var ge = j(fe, 2); + Ka(ge); + var Ie = j(ge, 2); + Ie.__click = [e9, p]; + var Ae = j(Ie, 2); + { + var De = (Le) => { + var et = r9(); + (et.__click = [t9, p, M]), $(Le, et); + }; + Oe(Ae, (Le) => { + p() < x(M) && Le(De); + }); + } + k(H); + var Ee = j(H, 2); + let Fe; + var $e = A(Ee); + $e.__click = [n9, z, a, p]; + var Je = A($e); + { + var qe = (Le) => { + var et = i9(); + $(Le, et); + }; + Oe(Je, (Le) => { + x(z) && Le(qe); + }); + } + var Ze = j(Je, 2); + fp(Ze, { class: "size-4" }); + var Qe = j(Ze); + yn(), + k($e), + k(Ee), + k(T), + We( + (Le, et, nt, Ue) => { + de(X, Le), + (Ie.disabled = p() >= x(M)), + Tr(Ee, "data-tip", et), + (Fe = zr(Ee, 1, "", null, Fe, nt)), + ($e.disabled = a.userDroplets < x(y) || x(z) || !p()), + de(Qe, ` ${Ue ?? ""} `); + }, + [ + () => a.title(p()), + () => gp(), + () => ({ tooltip: a.userDroplets < x(y) }), + () => x(y).toLocaleString("en-US"), + ] + ), + dp(ge, p), + $(m, T), + Dr(); +} +$n(["click"]); +var o9 = Pr( + '' +); +function s9(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = o9(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var l9 = Pr( + '' +); +function Y0(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = l9(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var c9 = Pr( + '' +); +function u9(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = c9(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var h9 = Pr( + '' +); +function d9(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = h9(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var p9 = Te( + '' + ), + f9 = Te(''), + m9 = (m, a, p) => { + var y; + (y = x(a)) == null || y.resolve(!1), x(p).close(); + }, + _9 = (m, a, p) => { + var y; + (y = x(a)) == null || y.resolve(!0), x(p).close(); + }, + g9 = Te( + ' ', + 1 + ); +function v9(m, a) { + Lr(a, !0); + let p = zt(a, "open", 15), + y = st(null), + M = st(bi({ name: Kg(), prev: 1e3, new: 1e5 })); + Fn(() => { + const Ot = (Nt) => { + Nt.key === "Escape" && p(!1); + }; + return ( + document.addEventListener("keydown", Ot), + () => document.removeEventListener("keydown", Ot) + ); + }); + const z = { id: 70, product: Wi.products[70] }, + T = { id: 80, product: Wi.products[80] }, + s = { product: Wi.products[120] }; + let B = st(null), + O = st(null), + X = st(""); + async function K(Ot) { + return ( + x(B).showModal(), + se(O, Im.withResolvers(), !0), + se(X, Ot, !0), + x(O).promise + ); + } + var ne = g9(), + H = Ct(ne), + fe = A(H), + ge = A(fe); + { + var Ie = (Ot) => { + var Nt = p9(), + or = A(Nt), + cr = A(or), + Vr = A(cr); + Y0(Vr, { class: "size-8" }); + var mr = j(Vr, 2), + hr = A(mr, !0); + k(mr); + var _r = j(mr, 2), + Ir = A(_r); + { + let Jt = ft(() => { + var Cr; + return ((Cr = Mt.data) == null ? void 0 : Cr.droplets) ?? 0; + }); + Fv(Ir, { + get value() { + return x(Jt); + }, + }); + } + k(_r), yn(2), k(cr), k(or), Ni(or, () => F7); + var qr = j(or, 2), + ue = A(qr), + V = A(ue), + U = A(V); + s9(U, { class: "size-5.5", filled: !0 }); + var Y = j(U, 2), + ie = A(Y, !0); + k(Y), k(V); + var pe = j(V, 2), + Se = A(pe, !0); + k(pe); + var Me = j(pe, 2), + we = A(Me); + { + const Jt = (Er) => { + d9(Er, { class: "text-primary size-26" }); + }; + let Cr = ft(() => I2()); + Sv(we, { + get productId() { + return z.id; + }, + title: (Er) => C2({ amount: z.product.items[0].amount * Er }), + get subtitle() { + return x(Cr); + }, + get unitPrice() { + return z.product.price; + }, + get userDroplets() { + return Mt.data.droplets; + }, + onpurchasecompleted: async (Er) => { + var pn, gn, ln, En; + const ur = + (gn = (pn = Mt.data) == null ? void 0 : pn.charges) == null + ? void 0 + : gn.max; + await Mt.refresh(); + const rn = + (En = (ln = Mt.data) == null ? void 0 : ln.charges) == null + ? void 0 + : En.max; + ur !== void 0 && + rn !== void 0 && + (se(M, { name: Kg(), prev: ur, new: rn }, !0), x(y).show()); + }, + icon: Jt, + $$slots: { icon: !0 }, + }); + } + var Ve = j(we, 2); + { + const Jt = (Er) => { + $0(Er, { class: "text-primary my-3 size-20" }); + }; + let Cr = ft(() => m2()); + Sv(Ve, { + get productId() { + return T.id; + }, + title: (Er) => f3({ amount: T.product.items[0].amount * Er }), + get subtitle() { + return x(Cr); + }, + get unitPrice() { + return T.product.price; + }, + get userDroplets() { + return Mt.data.droplets; + }, + onpurchasecompleted: async (Er) => { + var rn, pn, gn; + const ur = + (pn = (rn = Mt.data) == null ? void 0 : rn.charges) == null + ? void 0 + : pn.count; + await Mt.refresh(), + ur !== void 0 && + (se( + M, + { + name: h3(), + prev: Math.floor(ur), + new: Math.floor(ur + T.product.items[0].amount * Er), + }, + !0 + ), + (gn = x(y)) == null || gn.show()); + }, + icon: Jt, + $$slots: { icon: !0 }, + }); + } + k(Me), k(ue); + var ut = j(ue, 2), + Ke = A(ut), + kt = A(Ke); + yp(kt, { class: "size-5.5", filled: !0 }); + var ye = j(kt, 2), + Bt = A(ye, !0); + k(ye), k(Ke); + var rr = j(Ke, 2), + Kt = A(rr), + gr = A(Kt), + Ur = A(gr), + nn = A(Ur), + mn = A(nn); + Ov(mn, { + get userId() { + return Mt.data.id; + }, + get level() { + return Mt.data.level; + }, + get pictureUrl() { + return Mt.data.picture; + }, + }), + k(nn), + k(Ur), + k(gr); + var _n = j(gr, 2), + Vt = A(_n, !0); + k(_n); + var Et = j(_n, 2), + dr = A(Et, !0); + k(Et); + var ht = j(Et, 2); + let Xr; + var Yr = A(ht), + Zr = A(Yr), + mt = A(Zr); + fp(mt, { class: "size-4" }); + var He = j(mt); + yn(), k(Zr), k(Yr), k(ht), k(Kt), k(rr), k(ut); + var At = j(ut, 2), + Ft = A(At); + K7(Ft, { promptUserConfirmation: K }), + k(At), + k(qr), + k(Nt), + We( + (Jt, Cr, Er, ur, rn, pn, gn, ln, En) => { + de(hr, Jt), + de(ie, Cr), + de(Se, Er), + de(Bt, ur), + de(Vt, rn), + de(dr, pn), + Tr(ht, "data-tip", gn), + (Xr = zr(ht, 1, "", null, Xr, ln)), + (Zr.disabled = Mt.data.droplets < s.product.price), + de(He, ` ${En ?? ""} `); + }, + [ + () => Zv(), + () => v2(), + () => b2(), + () => yw(), + () => A2(), + () => L2(), + () => gp(), + () => ({ tooltip: Mt.data.droplets < s.product.price }), + () => s.product.price.toLocaleString("en-US"), + ] + ), + Ai(2, Nt, () => ia), + $(Ot, Nt); + }; + Oe(ge, (Ot) => { + Mt.data && p() && Ot(Ie); + }); + } + k(fe); + var Ae = j(fe, 2), + De = A(Ae), + Ee = A(De, !0); + k(De), + k(Ae), + k(H), + Ni(H, () => (Ot) => { + Wr(() => { + p() ? Ot.show() : Ot.close(); + }); + }); + var Fe = j(H, 2), + $e = A(Fe), + Je = A($e), + qe = A(Je), + Ze = A(qe, !0); + k(qe); + var Qe = j(qe, 2), + Le = A(Qe), + et = A(Le), + nt = j(et), + Ue = A(nt); + k(nt), k(Le); + var ke = j(Le, 2), + vt = A(ke); + u9(vt, { class: "size-5" }), k(ke); + var ee = j(ke, 2), + re = A(ee, !0); + k(ee), k(Qe); + var he = j(Qe, 2), + oe = A(he), + ze = A(oe), + je = j(ze); + ju( + je, + () => x(M).new, + (Ot) => { + var Nt = f9(), + or = A(Nt); + Xm(or, {}), k(Nt), $(Ot, Nt); + } + ), + k(oe), + k(he), + k(Je), + k($e); + var pt = j($e, 2), + it = A(pt), + ct = A(it, !0); + k(it), + k(pt), + k(Fe), + Ko( + Fe, + (Ot) => se(y, Ot), + () => x(y) + ); + var It = j(Fe, 2), + Dt = A(It), + at = A(Dt), + dt = A(at, !0); + k(at); + var yt = j(at, 2), + xt = A(yt); + Am(xt, () => fI({ country: x(X) })), k(yt); + var St = j(yt, 2), + wt = A(St); + wt.__click = [m9, O, B]; + var _t = A(wt, !0); + k(wt); + var Lt = j(wt, 2); + Lt.__click = [_9, O, B]; + var Rt = A(Lt, !0); + k(Lt), k(St), k(Dt); + var $t = j(Dt, 2), + tr = A($t), + Qt = A(tr, !0); + k(tr), + k($t), + k(It), + Ko( + It, + (Ot) => se(B, Ot), + () => x(B) + ), + We( + (Ot, Nt, or, cr, Vr, mr, hr) => { + de(Ee, Ot), + de(Ze, x(M).name), + de(et, `${x(M).prev ?? ""} `), + de(Ue, `(+${x(M).new - x(M).prev})`), + de(re, x(M).new), + de(ze, `${Nt ?? ""} `), + de(ct, or), + de(dt, cr), + de(_t, Vr), + de(Rt, mr), + de(Qt, hr); + }, + [ + () => Ss(), + () => Ss(), + () => Ss(), + () => hI(), + () => Ah(), + () => qv(), + () => Ss(), + ] + ), + di("close", H, () => p(!1)), + $(m, ne), + Dr(); +} +$n(["click"]); +var y9 = Pr( + '' +); +function x9(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = y9(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var b9 = Pr( + '' +); +function w9(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = b9(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var T9 = Pr( + '' +); +function C9(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = T9(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var S9 = Pr( + '' +); +function P9(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = S9(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var I9 = Pr( + '' +); +function M9(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = I9(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var k9 = Pr( + '' +); +function A9(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = k9(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +var E9 = Pr( + '' +); +function z9(m, a) { + let p = nr(a, ["$$slots", "$$events", "$$legacy"]); + var y = E9(); + ar(y, () => ({ + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 -960 960 960", + fill: "currentColor", + ...p, + })), + $(m, y); +} +function Gf(m) { + const a = document.createElement("img"); + return ( + (a.src = m), + new Promise((p, y) => { + a.addEventListener("load", () => { + p(a); + }), + a.addEventListener("error", (M) => { + y(M); + }); + }) + ); +} +function L9(m) { + const a = document.createElement("canvas"); + (a.width = m.naturalWidth), (a.height = m.naturalHeight); + const p = a.getContext("2d"); + return p == null || p.drawImage(m, 0, 0), a; +} +function D9(m, a, p) { + return m < a ? a : m > p ? p : m; +} +function R9(m, a) { + const p = 10 ** a; + return Math.round(m * p) / p; +} +var B9 = Te( + ' ', + 1 + ), + F9 = (m, a) => { + se(a, !x(a)); + }, + O9 = Te(""), + N9 = async (m, a, p, y) => { + var M; + x(a) || + se( + a, + await new Promise((z, T) => { + navigator.geolocation.getCurrentPosition( + (s) => { + z(s); + }, + (s) => { + T(s); + } + ); + }) + ), + x(a) && + (Co({ lat: x(a).coords.latitude, lng: x(a).coords.longitude }, x(p)), + (M = x(y)) == null || + M.flyTo({ + center: { lat: x(a).coords.latitude, lng: x(a).coords.longitude }, + zoom: 16.5, + })); + }, + j9 = Te( + '
                  ?
                  ' + ), + V9 = Te( + '' + ), + q9 = (m, a, p, y) => { + var M; + se(a, !0), x(p) && Co((M = x(p)) == null ? void 0 : M.getCenter(), x(y)); + }, + Z9 = Te(''), + U9 = Te( + '' + ), + $9 = Te('
                  '), + G9 = (m, a, p, y) => { + var z; + se(a, !0); + const M = (z = x(p)) == null ? void 0 : z.getCenter(); + M && Co(M, x(y)); + }, + H9 = Te(''), + W9 = (m, a) => { + se(a, !0); + }, + X9 = Te(''), + Y9 = (m, a) => { + se(a, !0); + }, + K9 = Te(''), + J9 = Te( + '
                  ' + ), + Q9 = (m, a) => { + se(a, !x(a)); + }, + eB = Te('
                  '), + tB = Te( + '
                  ' + ), + rB = (m, a) => { + se(a, !0); + }, + nB = Te(''), + iB = (m, a) => { + var p; + (p = x(a)) == null || p.zoomIn(); + }, + aB = (m, a) => { + var p; + (p = x(a)) == null || p.zoomOut(); + }, + oB = (m, a) => { + se(a, { name: "getPixelAreaInfo" }, !0); + }, + sB = Te( + '' + ), + lB = Te(''), + cB = () => { + window.location.replace(yi.url.origin); + }, + uB = Te(''), + hB = (m, a) => { + x(a) && hl.goToPrev(x(a)); + }, + dB = Te(''), + pB = Te( + '
                  ' + ), + fB = (m, a, p) => { + var y; + (y = x(a)) == null || y.flyTo({ center: x(a).getCenter(), zoom: p }); + }, + mB = Te( + '' + ), + _B = Te(""), + gB = Te( + '
                  ' + ), + vB = Te( + '
                  ' + ), + yB = Te( + '
                  ' + ), + xB = (m, a) => { + se(a, { name: "mainMenu" }, !0); + }, + bB = Te( + '
                  ' + ), + wB = Te( + '
                  ', + 1 + ); +function uF(m, a) { + Lr(a, !0); + const p = Lf, + y = px, + M = new fl(y), + z = p - 0.4, + T = v4(yi.url), + s = T.season ?? Hg, + B = new Map(); + let O = st(void 0), + X = st(14.5), + K = st(!1); + const ne = ft(() => { + var bt; + return ((bt = Mt.data) == null ? void 0 : bt.id) === 401; + }); + let H = st(!1), + fe = st( + bi( + T.select && T.pos + ? { name: "pixelSelected", latLon: [T.pos.lat, T.pos.lng] } + : { name: "mainMenu" } + ) + ); + Fn(() => { + De().then((Br) => se(O, Br)); + let bt = [0, 0]; + function Xt(Br) { + var xn; + if (x(O) && x(X) > p + 1) { + const { lat: On, lng: Yn } = x(O).unproject([Br.clientX, Br.clientY]), + Vn = M.latLonToPixels(On, Yn, p), + wn = Math.floor(Vn[0]), + Ji = Math.floor(Vn[1]); + if (bt[0] !== wn || bt[1] !== Ji) { + const sr = M.latLonToPixelBoundsLatLon(On, Yn, p), + Ut = Vm(sr, !0); + (xn = x(O).getSource($e)) == null || xn.setCoordinates(Ut), + (bt = [wn, Ji]); + } + } + } + return ( + window.addEventListener("mousemove", Xt), + () => { + var Br; + (Br = x(O)) == null || Br.remove(), + window.removeEventListener("mousemove", Xt), + Ae && clearInterval(Ae), + Hf(); + } + ); + }), + dl( + () => [ai.theme], + () => { + if (x(O)) { + Ie = !1; + const bt = ge(ai.theme); + x(O).setStyle(bt); + } + } + ); + function ge(bt) { + return `/maps/styles/${ + bt === "custom-winter" ? "liberty" : "fiord" + }`; + } + let Ie = !1, + Ae; + async function De() { + const bt = T.pos ? { ...T.pos, zoom: x(X) } : await l4(); + T.zoom !== void 0 && (bt.zoom = T.zoom); + const Xt = await new Promise((Vn) => { + const wn = new qd.Map({ + style: ge(ai.theme), + center: bt, + zoom: bt.zoom, + container: "map", + dragRotate: !1, + doubleClickZoom: !1, + pitch: 0, + maxPitch: 0, + attributionControl: !1, + }); + wn.touchZoomRotate.disableRotation(), + wn.on("styledata", (Ji) => { + Ie || + (ai.theme === "custom-winter" && + (wn.setLayoutProperty("poi_transit", "visibility", "none"), + wn.setLayoutProperty("poi_r20", "visibility", "none"), + wn.setLayoutProperty("poi_r7", "visibility", "none"), + wn.setLayoutProperty("poi_r1", "visibility", "none"), + wn.setLayoutProperty("building", "visibility", "none"), + wn.setLayoutProperty("building-3d", "visibility", "none"), + wn.setLayoutProperty("landuse_pitch", "visibility", "none"), + wn.setLayoutProperty("landuse_hospital", "visibility", "none"), + wn.setLayoutProperty("landuse_school", "visibility", "none"), + wn.setLayoutProperty( + "landuse_residential", + "visibility", + "none" + ), + wn.setLayoutProperty("waterway_tunnel", "visibility", "none"), + wn.setFilter("water", [ + "all", + ["!=", "brunnel", "tunnel"], + ["!=", "class", "swimming_pool"], + ])), + Fe(wn), + Qe(), + (Ie = !0)); + }), + wn.on("style.load", () => { + Vn(wn); + }); + }), + Br = Wi.refreshIntervalMs; + function xn() { + let Vn = x(X) > p + 1.5 ? Br : 2.5 * Br; + try { + document.visibilityState === "visible" && Fe(Xt); + } finally { + setTimeout(xn, Vn); + } + } + (Ae = setTimeout(xn, Br)), + Xt.on("load", () => { + T.discordLinked && + (Fr.success(xS()), + yi.url.searchParams.delete("discord-linked"), + km(yi.url.toString())); + }); + let On = x(X); + Xt.on("zoom", () => { + se(X, Xt.getZoom(), !0); + const Vn = R9(x(X), 1); + Vn != On && (x(ee) && x(ee).setOpacity(re(On)), (On = Vn)); + }); + let Yn = "default"; + return ( + Xt.on("dragstart", () => { + const Vn = Xt.getCanvas(); + (Yn = Vn.style.cursor), (Vn.style.cursor = "move"); + }), + Xt.on("dragend", () => { + Xt.getCanvas().style.cursor = Yn; + }), + Xt.on("mouseout", () => { + Le(); + }), + Xt.on("click", async (Vn) => { + var $r; + const wn = Vn.lngLat.lat, + Ji = Vn.lngLat.lng, + sr = [wn, Ji]; + if (x(fe).name === "paintingPixel" || x(fe).name === "getPixelAreaInfo") + return; + if (x(fe).name === "selectHq") { + (x(fe).hq = sr), ($r = x(he)) == null || $r.clearAndPlace(sr); + return; + } + const Ut = Xt.getZoom(); + if (Ut < z) { + Fr.info(VS()); + return; + } + Co({ lat: wn, lng: Ji }, Ut), + se(fe, { name: "pixelSelected", latLon: sr }, !0); + }), + Xt + ); + } + const Ee = "pixel-art-layer"; + function Fe(bt) { + const Xt = window.innerWidth, + Br = `${fx}/s${Hg}/tiles/{x}/{y}.png`; + if ((B.clear(), !bt.style)) return; + bt.getSource(Ee) + ? bt.refreshTiles(Ee) + : bt.addSource(Ee, { + type: "raster", + tiles: [Br], + minzoom: p, + maxzoom: p, + tileSize: Xt > 640 ? 550 : 400, + }), + bt.getLayer(Ee) || + bt.addLayer({ + id: Ee, + type: "raster", + source: Ee, + paint: { "raster-resampling": "nearest", "raster-opacity": x(nt) }, + }); + } + const $e = "pixel-hover", + Je = 1e-5, + qe = [ + [0, 0], + [Je, 0], + [Je, -Je], + [0, -Je], + ], + Ze = 0.4; + async function Qe() { + var bt, Xt, Br, xn; + if (!((bt = x(O)) != null && bt.getSource($e))) { + const On = L9(await Gf(o4)); + (Xt = x(O)) == null || + Xt.addSource($e, { type: "canvas", canvas: On, coordinates: qe }); + } + ((Br = x(O)) != null && Br.getLayer($e)) || + (xn = x(O)) == null || + xn.addLayer({ + id: $e, + type: "raster", + source: $e, + paint: { "raster-resampling": "nearest", "raster-opacity": Ze }, + }); + } + function Le() { + var bt, Xt; + (Xt = (bt = x(O)) == null ? void 0 : bt.getSource($e)) == null || + Xt.setCoordinates(qe); + } + let et = st(bi(T.opaque ?? !0)), + nt = ft(() => (x(et) ? 1 : 0.1)); + Wr(() => { + var bt; + (bt = x(O)) != null && + bt.getLayer(Ee) && + x(O).setPaintProperty(Ee, "raster-opacity", x(nt)); + }); + let Ue = st(void 0), + ke = st(void 0), + vt = st(void 0); + Fn( + () => ( + navigator.permissions.query({ name: "geolocation" }).then((bt) => { + bt.state === "granted" && + se( + vt, + navigator.geolocation.watchPosition( + (Xt) => { + se(Ue, Xt); + }, + (Xt) => { + se(ke, Xt); + }, + { enableHighAccuracy: !1, maximumAge: 1e3, timeout: 6e3 } + ), + !0 + ); + }), + () => { + x(vt) && navigator.geolocation.clearWatch(x(vt)); + } + ) + ); + let ee = st(void 0); + dl( + () => [x(Ue), x(O)], + () => { + var bt, Xt; + if (x(Ue) && x(O)) { + const Br = { lat: x(Ue).coords.latitude, lng: x(Ue).coords.longitude }, + xn = re(x(X)); + if (!x(ee)) { + const On = document.createElement("div"); + On.classList.add("maplibregl-user-location-dot"), + On.classList.add("cursor-auto"), + se( + ee, + new qd.Marker({ element: On, opacity: xn }) + .setLngLat(Br) + .addTo(x(O)) + ); + } + (Xt = (bt = x(ee)) == null ? void 0 : bt.setLngLat(Br)) == null || + Xt.setOpacity(xn); + } + } + ); + function re(bt) { + return bt < p ? "1.0" : D9((bt - p) * 0.2, 0.5, 1).toFixed(2); + } + let he = st(void 0); + Wr(() => { + var bt; + x(O) && + ((bt = ul(() => x(he))) == null || bt.clear(), + Gf(Jg).then((Xt) => { + se( + he, + new ev({ + id: "select-crosshair", + map: x(O), + tileSize: y, + zoom: p, + img: Xt, + markerFn: () => { + const Br = new qd.Marker({ color: "#0069ff" }); + return Br.addClassName("z-20"), Br; + }, + }) + ); + })); + }); + let oe = st(void 0); + Wr(() => { + var bt; + x(O) && + ((bt = ul(() => x(he))) == null || bt.clear(), + Gf(Jg).then((Xt) => { + se( + oe, + new ev({ + id: "paint-crosshair", + map: x(O), + tileSize: y, + zoom: p, + img: Xt, + }) + ); + })); + }); + let ze = st(!1), + je = st(!1), + pt = st(!1), + it = st(!!T.newUser), + ct = st(!1), + It = st(!!T.alliance), + Dt = st(!1); + const at = "void-message-2"; + let dt = st(!1); + Wr(() => { + const bt = localStorage.getItem(at); + Mt.data && !bt && (se(dt, !0), localStorage.setItem(at, "true")); + }); + let yt = st(!1), + xt = st(bi(yi.url)), + St = st(bi({ cityId: 0, countryId: 1, id: 0, name: "None", number: 1 })), + wt = st(!1); + const _t = "view-rules"; + let Lt = !1; + Wr(() => { + Mt.data && + (!Lt && + Mt.data.pixelsPainted > 1 && + (localStorage.getItem(_t) || + (se(wt, !0), localStorage.setItem(_t, "true"))), + (Lt = !0)); + }); + let Rt = st(!1); + Wr(() => { + var bt; + se(Rt, !!((bt = Mt.data) != null && bt.needsPhoneVerification)); + }); + let $t = st([]), + tr = ft(() => (x(X) < z ? "1.0" : x(X) < z + 2 ? "0.5" : "0.3")); + Wr(() => { + var Xt; + const bt = (Xt = Mt.data) == null ? void 0 : Xt.favoriteLocations; + if (bt && x(O)) { + for (const Br of ul(() => x($t))) Br.remove(); + se( + $t, + bt.map((Br) => { + const xn = document.createElement("div"); + xn.classList.add("text-yellow-400"), + xn.classList.add("cursor-pointer"), + xn.classList.add("z-10"), + (xn.innerHTML = ` + + + `); + const On = { lat: Br.latitude, lng: Br.longitude }; + return ( + xn.addEventListener("click", (Vn) => { + Vn.stopPropagation(), Qt([Br.latitude, Br.longitude]); + }), + new qd.Marker({ element: xn, opacity: x(tr) }) + .setLngLat(On) + .addTo(x(O)) + ); + }) + ); + } + }); + function Qt(bt) { + var Br; + const Xt = { lat: bt[0], lng: bt[1] }; + (Br = x(O)) == null || Br.flyTo({ center: Xt, zoom: Math.max(x(X), 15) }), + Co(Xt, x(X)), + se(fe, { name: "pixelSelected", latLon: [Xt.lat, Xt.lng] }, !0); + } + Wr(() => { + if (x(fe).name === "paintingPixel") + for (const bt of x($t)) bt.addClassName("hidden"); + else + for (const bt of x($t)) + bt.removeClassName("hidden"), bt.setOpacity(x(tr)); + }); + let Ot = Number.MAX_VALUE; + Wr(() => { + if (Mt.charges !== void 0 && Mt.data) { + const bt = Mt.data.charges.max, + Xt = Mt.charges; + Ot < bt && Xt >= bt && aa.notification1.play(), (Ot = Mt.charges); + } + }); + let Nt = st(!1), + or = Date.now(); + Fn(() => { + const bt = g4(), + Xt = () => { + var xn; + if (!document.hidden && Date.now() - or > 30 * gc.min) { + if (bt) { + const Yn = (xn = x(O)) == null ? void 0 : xn.getCenter(); + Yn && Co(Yn, x(X)), window.location.replace(yi.url.origin); + } else Mt.refresh(); + or = Date.now(); + } + }; + return ( + document.addEventListener("visibilitychange", Xt), + () => document.removeEventListener("visibilitychange", Xt) + ); + }), + Fn(() => { + function bt() { + Qr.online = !0; + } + window.addEventListener("online", bt); + function Xt() { + Qr.online = !1; + } + return ( + window.addEventListener("offline", Xt), + () => { + window.removeEventListener("online", bt), + window.removeEventListener("offline", Xt); + } + ); + }), + Wr(() => { + if (!Qr.online) { + const bt = setInterval(() => { + Qr.health().then(() => { + (Qr.online = !0), !Mt.data && !Mt.loading && Mt.refresh(); + }); + }, 5e3); + return () => { + clearInterval(bt); + }; + } + }), + Fn(() => { + function bt(Xt) { + Xt.data.type && x(O) && Fe(x(O)); + } + return ( + navigator.serviceWorker.addEventListener("message", bt), + () => { + navigator.serviceWorker.removeEventListener("message", bt); + } + ); + }); + let cr = st(!1), + Vr = st("report-user"), + mr = st(void 0), + hr = st(void 0), + _r = st(void 0), + Ir = st(0); + var qr = wB(); + nx((bt) => { + var Xt = B9(); + (rx.title = "FurryPlace - Paint the world"), yn(6), $(bt, Xt); + }); + var ue = Ct(qr); + { + const bt = (sr) => { + var Ut = O9(); + Ut.__click = [F9, et]; + var $r = A(Ut); + { + let lr = ft(() => !x(et)); + G0($r, { + class: "size-5", + get filled() { + return x(lr); + }, + }); + } + k(Ut), + We( + (lr) => { + Tr(Ut, "title", lr), + zr( + Ut, + 1, + Yo({ + "btn btn-lg btn-square sm:btn-xl z-30 shadow-md": !0, + "text-base-content/80": x(et), + "btn-primary btn-soft": !x(et), + }) + ); + }, + [() => $v()] + ), + $(sr, Ut); + }, + Xt = (sr) => { + var Ut = V9(); + Ut.__click = [N9, Ue, X, O]; + var $r = A(Ut); + { + var lr = (an) => { + P9(an, { class: "size-5.5 fill-blue-800" }); + }, + Tn = (an) => { + var Cn = j9(), + Gn = A(Cn); + C9(Gn, { class: "size-5.5 fill-red-400" }), + yn(2), + k(Cn), + $(an, Cn); + }; + Oe($r, (an) => { + x(Ue) ? an(lr) : an(Tn, !1); + }); + } + k(Ut), We((an) => Tr(Ut, "title", an), [() => Lb()]), $(sr, Ut); + }; + var V = j(A(ue), 2); + let Br; + var U = A(V); + let xn; + var Y = A(U); + { + var ie = (sr) => { + var Ut = Z9(); + Ut.__click = [q9, ze, O, X]; + var $r = A(Ut, !0); + k(Ut), We((lr) => de($r, lr), [() => Jx()]), $(sr, Ut); + }, + pe = (sr) => { + var Ut = er(), + $r = Ct(Ut); + { + var lr = (Tn) => { + var an = $9(), + Cn = A(an); + { + var Gn = (Mn) => { + var bn = U9(), + cn = A(bn); + { + var Sn = (vn) => { + var fn = wi("MOD"); + $(vn, fn); + }, + kn = (vn) => { + var fn = er(), + on = Ct(fn); + { + var po = (Hn) => { + var jn = wi("GM"); + $(Hn, jn); + }, + fi = (Hn) => { + var jn = wi("ADMIN"); + $(Hn, jn); + }; + Oe( + on, + (Hn) => { + var jn; + ((jn = Mt.data) == null ? void 0 : jn.role) === + "global_moderator" + ? Hn(po) + : Hn(fi, !1); + }, + !0 + ); + } + $(vn, fn); + }; + Oe(cn, (vn) => { + var fn; + ((fn = Mt.data) == null ? void 0 : fn.role) === + "moderator" + ? vn(Sn) + : vn(kn, !1); + }); + } + k(bn), + We(() => { + var vn; + return Tr( + bn, + "href", + ((vn = Mt.data) == null ? void 0 : vn.role) === "admin" + ? `${yi.url.origin}/admin` + : `${yi.url.origin}/moderation` + ); + }), + $(Mn, bn); + }; + Oe(Cn, (Mn) => { + var bn; + xc((bn = Mt.data) == null ? void 0 : bn.role, [ + "admin", + "moderator", + "global_moderator", + ]) && Mn(Gn); + }); + } + var Mr = j(Cn, 2); + PR(Mr, { + get user() { + return Mt; + }, + onlogout: () => { + se(fe, { name: "mainMenu" }, !0); + }, + }), + k(an), + Ai( + 3, + an, + () => ia, + () => ({ duration: 150 }) + ), + $(Tn, an); + }; + Oe( + $r, + (Tn) => { + Mt.data && x(O) && x(fe).name !== "paintingPixel" && Tn(lr); + }, + !0 + ); + } + $(sr, Ut); + }; + Oe(Y, (sr) => { + !Mt.loading && !Mt.data ? sr(ie) : sr(pe, !1); + }); + } + var Se = j(Y, 2); + { + var Me = (sr) => { + var Ut = J9(), + $r = A(Ut); + { + var lr = (Mr) => { + jf(Mr, { + key: "shop-profile-picture", + children: (Mn, bn) => { + var cn = H9(); + cn.__click = [G9, je, O, X]; + var Sn = A(cn); + Y0(Sn, { class: "size-5" }), + k(cn), + We((kn) => Tr(cn, "title", kn), [() => Zv()]), + $(Mn, cn); + }, + $$slots: { default: !0 }, + }); + }; + Oe($r, (Mr) => { + Mt.data && Mr(lr); + }); + } + var Tn = j($r, 2); + { + var an = (Mr) => { + var Mn = X9(); + Mn.__click = [W9, It]; + var bn = A(Mn); + xp(bn, { class: "size-5" }), + k(Mn), + We((cn) => Tr(Mn, "title", cn), [() => _p()]), + $(Mr, Mn); + }; + Oe(Tn, (Mr) => { + Mt.data && Mr(an); + }); + } + var Cn = j(Tn, 2); + LR(Cn, { + get map() { + return x(O); + }, + get season() { + return s; + }, + }); + var Gn = j(Cn, 2); + jf(Gn, { + key: "region-leaderboard", + children: (Mr, Mn) => { + var bn = K9(); + bn.__click = [Y9, pt]; + var cn = A(bn); + I0(cn, { class: "size-5" }), + k(bn), + We((Sn) => Tr(bn, "title", Sn), [() => Bm()]), + $(Mr, bn); + }, + $$slots: { default: !0 }, + }), + k(Ut), + Ai( + 3, + Ut, + () => ia, + () => ({ duration: 150 }) + ), + $(sr, Ut); + }, + we = (sr) => { + var Ut = er(), + $r = Ct(Ut); + { + var lr = (Tn) => { + var an = eB(), + Cn = A(an); + let Gn; + Cn.__click = [Q9, K]; + var Mr = A(Cn); + { + var Mn = (cn) => { + Pm(cn, { class: "size-5" }); + }, + bn = (cn) => { + np(cn, { class: "size-5" }); + }; + Oe(Mr, (cn) => { + x(K) ? cn(Mn) : cn(bn, !1); + }); + } + k(Cn), + k(an), + We( + (cn, Sn) => { + Tr(Cn, "title", cn), + (Gn = zr( + Cn, + 1, + "btn btn-square not-touchscreen:hidden shadow-md", + null, + Gn, + Sn + )); + }, + [() => (x(K) ? sb() : ub()), () => ({ "btn-primary": x(K) })] + ), + Ai( + 1, + an, + () => ia, + () => ({ delay: 150, duration: 150 }) + ), + $(Tn, an); + }; + Oe( + $r, + (Tn) => { + x(O) && x(fe).name === "paintingPixel" && Tn(lr); + }, + !0 + ); + } + $(sr, Ut); + }; + Oe(Se, (sr) => { + x(O) && x(fe).name !== "paintingPixel" ? sr(Me) : sr(we, !1); + }); + } + k(U), k(V); + var Ve = j(V, 2); + { + var ut = (sr) => { + var Ut = tB(), + $r = A(Ut); + { + let lr = ft(() => _x.trim()); + Vx($r, { + get siteKey() { + return x(lr); + }, + refreshExpired: "auto", + appearance: "interaction-only", + callback: (Tn) => { + ai.captcha = { token: Tn, time: Date.now() }; + }, + }); + } + k(Ut), + Ai( + 2, + Ut, + () => ia, + () => ({ duration: 300 }) + ), + $(sr, Ut); + }; + Oe(Ve, (sr) => { + mx && (!ai.captcha || ai.now - ai.captcha.time > 180 * 1e3) && sr(ut); + }); + } + var Ke = j(Ve, 2); + let On; + var kt = A(Ke); + { + var ye = (sr) => { + jf(sr, { + key: "info", + children: (Ut, $r) => { + var lr = nB(); + lr.__click = [rB, ct]; + var Tn = A(lr); + w9(Tn, { class: "size-3.5" }), + k(lr), + We((an) => Tr(lr, "title", an), [() => pb()]), + $(Ut, lr); + }, + $$slots: { default: !0 }, + }); + }; + Oe(kt, (sr) => { + x(fe).name !== "paintingPixel" && sr(ye); + }); + } + var Bt = j(kt, 2), + rr = A(Bt); + rr.__click = [iB, O]; + var Kt = j(rr, 2); + (Kt.__click = [aB, O]), k(Bt); + var gr = j(Bt, 2), + Ur = A(gr), + nn = A(Ur); + Vv(nn, { class: "size-4" }), k(Ur), k(gr); + var mn = j(gr, 2); + { + var _n = (sr) => { + var Ut = sB(); + Ut.__click = [oB, fe]; + var $r = A(Ut); + Gu($r, { class: "size-4" }), k(Ut), $(sr, Ut); + }; + Oe(mn, (sr) => { + var Ut, $r; + x(fe).name !== "paintingPixel" && + (((Ut = Mt.data) == null ? void 0 : Ut.role) === "admin" || + (($r = Mt.data) == null ? void 0 : $r.role) === + "global_moderator") && + sr(_n); + }); + } + var Vt = j(mn, 2); + { + var Et = (sr) => { + var Ut = lB(), + $r = A(Ut); + z9($r, { + class: "size-4", + onclick: () => { + se(H, !x(H)); + }, + }), + k(Ut), + We((lr) => Tr(Ut, "title", lr), [() => rw()]), + $(sr, Ut); + }; + Oe(Vt, (sr) => { + x(ne) && sr(Et); + }); + } + var dr = j(Vt, 2); + { + var ht = (sr) => { + var Ut = uB(); + Ut.__click = [cB]; + var $r = A(Ut); + Zx($r, { class: "size-3" }), + k(Ut), + We((lr) => Tr(Ut, "title", lr), [() => $x()]), + $(sr, Ut); + }; + Oe(dr, (sr) => { + x(fe).name !== "paintingPixel" && sr(ht); + }); + } + var Xr = j(dr, 2); + { + var Yr = (sr) => { + var Ut = dB(); + Ut.__click = [hB, O]; + var $r = A(Ut); + A9($r, { class: "size-3" }), + k(Ut), + We( + (lr, Tn) => { + Tr(Ut, "title", lr), (Ut.disabled = Tn); + }, + [() => wb(), () => !hl.hasPrev()] + ), + Ai( + 1, + Ut, + () => ia, + () => ({ delay: 1e3, duration: 300 }) + ), + Ai( + 2, + Ut, + () => ia, + () => ({ duration: 300 }) + ), + $(sr, Ut); + }; + Oe(Xr, (sr) => { + hl.hasPrev() && x(fe).name !== "paintingPixel" && sr(Yr); + }); + } + k(Ke); + var Zr = j(Ke, 2); + let Yn; + var mt = A(Zr); + { + var He = (sr) => { + var Ut = pB(), + $r = A(Ut); + Ux($r, { class: "size-5" }); + var lr = j($r); + k(Ut), + We((Tn) => de(lr, ` ${Tn ?? ""}`), [() => Sb()]), + Ai( + 1, + Ut, + () => ia, + () => ({ duration: 1e3 }) + ), + Ai(2, Ut, () => ia), + $(sr, Ut); + }; + Oe(mt, (sr) => { + Qr.online || sr(He); + }); + } + var At = j(mt, 2); + { + var Ft = (sr) => { + var Ut = mB(); + Ut.__click = [fB, O, p]; + var $r = A(Ut); + M9($r, { class: "size-5" }); + var lr = j($r); + k(Ut), + We((Tn) => de(lr, ` ${Tn ?? ""}`), [() => Mb()]), + Ai( + 3, + Ut, + () => ia, + () => ({ duration: 300 }) + ), + $(sr, Ut); + }; + Oe(At, (sr) => { + x(X) < z && sr(Ft); + }); + } + k(Zr); + var Jt = j(Zr, 2); + let Vn; + var Cr = A(Jt); + bt(Cr), k(Jt); + var Er = j(Jt, 2); + let wn; + var ur = A(Er); + { + var rn = (sr) => { + k0(sr, { + class: "z-30", + onclick: () => { + var Ut; + (Ut = Mt.data) != null && Ut.needsPhoneVerification + ? (se(Rt, !0), Fr.warning(Yg())) + : Mt.charges !== void 0 && Mt.charges < 1 + ? Fr.warning(RE, { icon: Xf }) + : x(O) && Mt.data + ? (aa.smallDropplet.play(), + se(fe, { name: "paintingPixel" }, !0)) + : (se(ze, !0), x(O) && Co(x(O).getCenter(), x(X))); + }, + get disabled() { + return Mt.loading; + }, + get loading() { + return Mt.loading; + }, + get charges() { + return Mt.charges; + }, + }); + }, + pn = (sr) => { + var Ut = _B(); + $(sr, Ut); + }; + Oe(ur, (sr) => { + x(fe).name === "mainMenu" ? sr(rn) : sr(pn, !1); + }); + } + k(Er); + var gn = j(Er, 2); + let Ji; + var ln = A(gn); + Xt(ln), k(gn); + var En = j(gn, 2); + { + var pr = (sr) => { + var Ut = er(), + $r = Ct(Ut); + { + var lr = (an) => { + var Cn = gB(), + Gn = A(Cn), + Mr = A(Gn); + S7(Mr, { + get latLon() { + return x(fe).latLon; + }, + get map() { + return x(O); + }, + get crosshair() { + return x(he); + }, + get pixelInfoCache() { + return B; + }, + get season() { + return s; + }, + get tileSize() { + return y; + }, + get pixelArtZoom() { + return p; + }, + get zoom() { + return x(X); + }, + get opaquePixelArt() { + return x(et); + }, + onclose: () => se(fe, { name: "mainMenu" }, !0), + onclickshare: (Mn) => { + se(xt, Mn, !0), se(yt, !0); + }, + onclickpaint: ([Mn, bn]) => { + var Sn, kn, vn; + if (!Mt.data) { + se(ze, !0); + return; + } + if ((Sn = Mt.data) != null && Sn.needsPhoneVerification) { + se(Rt, !0), Fr.warning(Yg()); + return; + } + if (Mt.charges !== void 0 && Mt.charges < 1) { + Fr.warning(Bb()); + return; + } + const cn = qm(M.latLonToPixelBoundsLatLon(Mn, bn, p)); + (kn = x(O)) == null || + kn.flyTo({ center: { lat: cn[0], lon: cn[1] } }), + se( + fe, + { name: "paintingPixel", clickedLatLon: [Mn, bn] }, + !0 + ), + (vn = x(he)) == null || vn.clear(); + }, + onclickregion: (Mn) => { + se(St, Mn, !0), se(Dt, !0); + }, + onclickmodaction: (Mn, bn, cn, Sn) => { + var vn, fn, on; + (vn = x(O)) == null || vn.setZoom(Math.max(x(X), p + 3.5)); + const kn = M.latLonToPixelBoundsLatLon(cn[0], cn[1], p); + (fn = x(O)) == null || + fn.setCenter({ + lat: kn.min[0], + lng: (kn.max[1] + kn.min[1]) / 2, + }), + se(mr, bn, !0), + se(hr, Mn, !0), + se(_r, cn, !0), + se( + Ir, + ((on = x(O)) == null ? void 0 : on.getZoom()) ?? 0, + !0 + ), + se(Vr, Sn, !0), + se(cr, !0); + }, + }), + k(Gn), + k(Cn), + Ai( + 3, + Gn, + () => Hd, + () => ({ duration: 100 }) + ), + $(an, Cn); + }, + Tn = (an) => { + var Cn = er(), + Gn = Ct(Cn); + { + var Mr = (bn) => { + var cn = vB(), + Sn = A(cn), + kn = A(Sn); + YL(kn, { + get map() { + return x(O); + }, + get clickedLatLon() { + return x(fe).clickedLatLon; + }, + get tileSize() { + return y; + }, + get tileZoom() { + return p; + }, + get season() { + return s; + }, + get zoom() { + return x(X); + }, + get crosshair() { + return x(oe); + }, + refreshPixelArt: () => x(O) && Fe(x(O)), + hidePixelHover: Le, + hoverLayerId: $e, + onclose: () => { + se(fe, { name: "mainMenu" }, !0), Le(); + }, + get screenLocked() { + return x(K); + }, + set screenLocked(vn) { + se(K, vn, !0); + }, + get opaquePixelArt() { + return x(et); + }, + set opaquePixelArt(vn) { + se(et, vn, !0); + }, + }), + k(Sn), + k(cn), + Ai( + 3, + Sn, + () => Hd, + () => ({ duration: 100 }) + ), + $(bn, cn); + }, + Mn = (bn) => { + var cn = er(), + Sn = Ct(cn); + { + var kn = (fn) => { + var on = yB(), + po = A(on); + B7(po, { + get map() { + return x(O); + }, + get tileSize() { + return y; + }, + get pixelArtZoom() { + return Lf; + }, + get season() { + return s; + }, + get crosshair() { + return x(oe); + }, + onclose: () => { + se(fe, { name: "mainMenu" }, !0), Le(); + }, + }), + k(on), + $(fn, on); + }, + vn = (fn) => { + var on = er(), + po = Ct(on); + { + var fi = (Hn) => { + var jn = bB(), + zn = A(jn), + qa = A(zn), + Rr = A(qa), + Gr = A(Rr), + _a = A(Gr); + H0(_a, { class: "inline size-4" }); + var un = j(_a); + k(Gr); + var Li = j(Gr, 2); + Li.__click = [xB, fe]; + var ga = A(Li); + _l(ga, { class: "size-4" }), k(Li), k(Rr); + var sa = j(Rr, 2), + Ja = A(sa); + Ja.__click = async () => { + var Ca; + if (x(fe).name === "selectHq") { + const Qa = x(fe).hq; + if (Qa) + try { + se(Nt, !0), + await Qr.updateAllianceHeadquarters( + Qa[0], + Qa[1] + ), + (Ca = x(he)) == null || Ca.clear(), + se(It, !0), + se(fe, { name: "mainMenu" }, !0); + } catch (Jo) { + Fr.error(Jo.message); + } finally { + se(Nt, !1); + } + } + }; + var Ms = A(Ja); + x9(Ms, { class: "size-6" }), + k(Ja), + k(sa), + k(qa), + k(zn), + k(jn), + We( + (Ca) => { + de(un, ` ${Ca ?? ""}`), + (Ja.disabled = + x(fe).hq === void 0 || x(Nt)); + }, + [() => OC()] + ), + Ai( + 3, + zn, + () => Hd, + () => ({ duration: 100 }) + ), + $(Hn, jn); + }; + Oe( + po, + (Hn) => { + x(fe).name === "selectHq" && Hn(fi); + }, + !0 + ); + } + $(fn, on); + }; + Oe( + Sn, + (fn) => { + x(fe).name === "getPixelAreaInfo" + ? fn(kn) + : fn(vn, !1); + }, + !0 + ); + } + $(bn, cn); + }; + Oe( + Gn, + (bn) => { + x(fe).name === "paintingPixel" && x(oe) + ? bn(Mr) + : bn(Mn, !1); + }, + !0 + ); + } + $(an, Cn); + }; + Oe($r, (an) => { + x(fe).name === "pixelSelected" && x(he) ? an(lr) : an(Tn, !1); + }); + } + $(sr, Ut); + }; + Oe(En, (sr) => { + x(O) && sr(pr); + }); + } + k(ue), + We( + (sr, Ut, $r, lr, Tn, an, Cn, Gn, Mr) => { + (Br = zr(V, 1, "absolute right-2 top-2 z-30", null, Br, sr)), + (xn = zr(U, 1, "flex flex-col gap-4", null, xn, Ut)), + (On = zr( + Ke, + 1, + "absolute left-2 top-2 z-30 flex flex-col gap-3", + null, + On, + $r + )), + Tr(rr, "title", lr), + Tr(Kt, "title", Tn), + (Yn = zr( + Zr, + 1, + "absolute left-1/2 top-2 z-30 flex -translate-x-1/2 flex-col items-center justify-center gap-2", + null, + Yn, + an + )), + (Vn = zr(Jt, 1, "absolute bottom-3 left-3 z-30", null, Vn, Cn)), + (wn = zr( + Er, + 1, + "absolute bottom-3 left-1/2 z-30 -translate-x-1/2", + null, + wn, + Gn + )), + (Ji = zr(gn, 1, "absolute bottom-3 right-3 z-30", null, Ji, Mr)); + }, + [ + () => ({ hidden: x(H) }), + () => ({ "items-end": !Mt.data, "items-center": Mt.data }), + () => ({ hidden: x(H) }), + () => _b(), + () => yb(), + () => ({ hidden: x(H) }), + () => ({ hidden: x(H) }), + () => ({ hidden: x(H) }), + () => ({ hidden: x(H) }), + ] + ); + } + var In = j(ue, 2); + AE(In, { + get open() { + return x(ze); + }, + set open(bt) { + se(ze, bt, !0); + }, + }); + var tn = j(In, 2); + v9(tn, { + get open() { + return x(je); + }, + set open(bt) { + se(je, bt, !0); + }, + }); + var en = j(tn, 2); + v6(en, { + get open() { + return x(it); + }, + set open(bt) { + se(it, bt, !0); + }, + }); + var ma = j(en, 2); + B6(ma, { + get open() { + return x(ct); + }, + set open(bt) { + se(ct, bt, !0); + }, + }); + var pi = j(ma, 2); + m6(pi, { + get open() { + return x(wt); + }, + set open(bt) { + se(wt, bt, !0); + }, + }); + var Xi = j(pi, 2); + IE(Xi, { + onvisitclick: (bt) => { + var Xt; + (Xt = x(O)) == null || Xt.flyTo({ center: bt, zoom: Lf + 1 }), + Co(bt, x(X)), + hl.push({ pos: bt, zoom: x(X) }), + se(pt, !1); + }, + get open() { + return x(pt); + }, + set open(bt) { + se(pt, bt, !0); + }, + }); + var Zn = j(Xi, 2); + HR(Zn, { + get region() { + return x(St); + }, + get open() { + return x(Dt); + }, + set open(bt) { + se(Dt, bt, !0); + }, + }); + var ni = j(Zn, 2); + Ox(ni, { + get open() { + return ai.dropletsDialogOpen; + }, + set open(bt) { + ai.dropletsDialogOpen = bt; + }, + }); + var Zi = j(ni, 2); + { + var Yi = (bt) => { + YM(bt, { + onhqchange: () => { + se(fe, { name: "selectHq" }, !0), se(It, !1); + }, + onhqclick: (Xt) => { + var Br; + (Br = x(O)) == null || + Br.flyTo({ center: Xt, zoom: Math.max(x(X), 15) }), + se(fe, { name: "pixelSelected", latLon: [Xt.lat, Xt.lng] }, !0), + se(It, !1); + }, + onlastpixelclick: (Xt) => { + var Br; + (Br = x(O)) == null || + Br.flyTo({ center: Xt, zoom: Math.max(x(X), 15) }), + se(fe, { name: "pixelSelected", latLon: [Xt.lat, Xt.lng] }, !0), + se(It, !1); + }, + get open() { + return x(It); + }, + set open(Xt) { + se(It, Xt, !0); + }, + }); + }; + Oe(Zi, (bt) => { + x(O) && bt(Yi); + }); + } + var Ei = j(Zi, 2); + _D(Ei, { + get open() { + return x(Rt); + }, + set open(bt) { + se(Rt, bt, !0); + }, + }); + var zi = j(Ei, 2); + { + var Ki = (bt) => { + l6(bt, { + get url() { + return x(xt); + }, + get map() { + return x(O); + }, + hideHover: () => { + var Xt, Br; + (Xt = x(O)) == null || Xt.setPaintProperty($e, "raster-opacity", 0), + (Br = x(he)) == null || Br.setCanvasOpacity(0); + }, + showHover: () => { + var Xt, Br; + (Xt = x(O)) == null || Xt.setPaintProperty($e, "raster-opacity", Ze), + (Br = x(he)) == null || Br.setCanvasOpacity(1); + }, + get open() { + return x(yt); + }, + set open(Xt) { + se(yt, Xt, !0); + }, + }); + }; + Oe(zi, (bt) => { + x(O) && bt(Ki); + }); + } + var oa = j(zi, 2); + { + var Ta = (bt) => { + Px(bt, { + get image() { + return x(mr); + }, + get paintedBy() { + return x(hr).paintedBy; + }, + get latLon() { + return x(_r); + }, + get zoom() { + return x(Ir); + }, + get action() { + return x(Vr); + }, + get open() { + return x(cr); + }, + set open(Xt) { + se(cr, Xt, !0); + }, + }); + }; + Oe(oa, (bt) => { + x(hr) && x(mr) && x(_r) && bt(Ta); + }); + } + $(m, qr), Dr(); +} +$n(["click"]); +export { uF as component }; diff --git a/frontend-backup/_app/immutable/nodes/4.DB4WphWP.js b/frontend-backup/_app/immutable/nodes/4.DB4WphWP.js new file mode 100644 index 0000000..ee450fd --- /dev/null +++ b/frontend-backup/_app/immutable/nodes/4.DB4WphWP.js @@ -0,0 +1,781 @@ +var $1=Object.defineProperty;var $g=m=>{throw TypeError(m)};var G1=(m,a,p)=>a in m?$1(m,a,{enumerable:!0,configurable:!0,writable:!0,value:p}):m[a]=p;var yr=(m,a,p)=>G1(m,typeof a!="symbol"?a+"":a,p),zf=(m,a,p)=>a.has(m)||$g("Cannot "+p);var at=(m,a,p)=>(zf(m,a,"read from private field"),p?p.call(m):a.get(m)),Ar=(m,a,p)=>a.has(m)?$g("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(m):a.set(m,p),na=(m,a,p,y)=>(zf(m,a,"write to private field"),y?y.call(m,p):a.set(m,p),p),jr=(m,a,p)=>(zf(m,a,"access private method"),p);import"../chunks/eWGjsHWS.js";import{o as Fn,s as oi}from"../chunks/C7Eza_iV.js";import{a1 as H1,b8 as W1,bp as X1,ba as Y1,bq as K1,b3 as J1,br as Q1,au as st,g as x,aw as se,av as bi,at as $n,p as Lr,f as Te,d as A,r as k,s as V,u as pt,n as vn,t as We,ax as di,b as $,c as Dr,y as Hr,v as Sr,bn as Nu,x as Mm,z as ul,ay as Qt,a as Ct,b4 as wi,aI as ex,aH as Gg,aJ as tx,aL as Iv,bs as uo,az as pa,bt as Mv,$ as rx}from"../chunks/Cp2nYQu0.js";import{s as de}from"../chunks/BNRHrDsD.js";import{p as Lt,i as Ne,r as rr,s as Is,u as kv}from"../chunks/Cpqp1vmU.js";import{h as nx}from"../chunks/BwJYhDht.js";import{r as Ka,f as Ni,a as zr,g as Av,b as ir,s as wr,e as kc,h as Ou,c as Yo}from"../chunks/Ce8MKdB4.js";import{a as ll,k as ju,t as Ai}from"../chunks/uosWZzaS.js";import{g as km,b as ix}from"../chunks/DKHAn3wZ.js";import{p as yi}from"../chunks/DV9-nCbM.js";import{S as Wi,a as Qr,t as Fr,u as Mt,v as So,g as ai,w as ax,x as ox,y as sx,P as lx,z as cx,A as ux,j as hx,B as dx,C as Hg,D as Lf,E as px,F as fx,d as mx,G as _x}from"../chunks/CyIXPQQB.js";import{c as Ev,A as aa,a as Hf,g as Df,p as gx,b as vx}from"../chunks/Bkcd-b_t.js";import{h as Am}from"../chunks/BOGIWsTs.js";import{b as Ko}from"../chunks/C29uIekv.js";import{L as yx}from"../chunks/L8vjeDxW.js";import{g as Ve,l as xx}from"../chunks/DcZIlShl.js";import{c as Ah}from"../chunks/Cb0F7pe6.js";import{d as bx,L as Em,p as zm}from"../chunks/CpqkZ6zO.js";import{c as Wf,D as zv,p as wx,r as Tx,t as Cx,b as Sx,R as Px}from"../chunks/DeBW6Gbm.js";import{e as hi,i as hp}from"../chunks/re32H7hA.js";import{c as Lm,b as dp,a as Ix}from"../chunks/FmeLqAoX.js";import{P as co,t as Lv}from"../chunks/De3UNOhq.js";import{l as Mx,p as Dm,m as Dv,v as kx,s as Ax}from"../chunks/BQI8t4BB.js";import{g as Oi,a as pp,c as Ex,b as zx}from"../chunks/CBsBC6Ub.js";import{f as cl,t as Lx}from"../chunks/CcDxFfeM.js";import{A as Dx,c as Ss}from"../chunks/Cy3DZJWx.js";import{A as Rv,d as Bv,D as Fv,a as fp,r as Rx,I as Wg,e as Bx,c as Fx,P as Ov,b as Ox}from"../chunks/Bcqi99Xv.js";import{f as ia,s as Hd}from"../chunks/BHFxxBat.js";import{C as Rm,G as Xg,c as Nx,T as Xf}from"../chunks/CeZUIGlq.js";import"../chunks/CfFUN4Z3.js";import{i as Nv}from"../chunks/DZ6yarur.js";import{L as jv}from"../chunks/BD43Ca7B.js";import{c as xi}from"../chunks/CLi1yBm0.js";import{L as jx,T as Vv,a as Vx}from"../chunks/B_LoXNWD.js";import{_ as qx}from"../chunks/B6eLJOiY.js";import{c as qv}from"../chunks/BV74CxeL.js";import{R as Zx}from"../chunks/CWuH4SsR.js";import{W as Ux}from"../chunks/NOyaXYee.js";import{r as $x}from"../chunks/COhuejkh.js";(function(){try{var m=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};m.SENTRY_RELEASE={id:"fe77e0a32f22395333b3f54fb7a95ef6936c7140"}}catch{}})();try{(function(){var m=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new m.Error().stack;a&&(m._sentryDebugIds=m._sentryDebugIds||{},m._sentryDebugIds[a]="1d1052fa-3dff-44f8-a878-8349605644f4",m._sentryDebugIdIdentifier="sentry-dbid-1d1052fa-3dff-44f8-a878-8349605644f4")})()}catch{}const Gx=[];function Hx(m,a=!1,p=!1){return Wd(m,new Map,"",Gx,null,p)}function Wd(m,a,p,y,M=null,z=!1){if(typeof m=="object"&&m!==null){var T=a.get(m);if(T!==void 0)return T;if(m instanceof Map)return new Map(m);if(m instanceof Set)return new Set(m);if(H1(m)){var s=Array(m.length);a.set(m,s),M!==null&&a.set(M,s);for(var B=0;BJ1(()=>a(window[m])))}const Xx=Q1,Yx=()=>"Log in",Kx=()=>"Entrar",Jx=(m={},a={})=>(a.locale??Ve())==="en"?Yx():Kx(),Qx=()=>"Store",eb=()=>"Loja",Zv=(m={},a={})=>(a.locale??Ve())==="en"?Qx():eb(),tb=()=>"Alliance",rb=()=>"Aliança",_p=(m={},a={})=>(a.locale??Ve())==="en"?tb():rb(),nb=()=>"Leaderboard",ib=()=>"Ranking",Bm=(m={},a={})=>(a.locale??Ve())==="en"?nb():ib(),ab=()=>"Unlock",ob=()=>"Destravar",sb=(m={},a={})=>(a.locale??Ve())==="en"?ab():ob(),lb=()=>"Lock",cb=()=>"Travar",ub=(m={},a={})=>(a.locale??Ve())==="en"?lb():cb(),hb=()=>"Info",db=()=>"Informações",pb=(m={},a={})=>(a.locale??Ve())==="en"?hb():db(),fb=()=>"Zoom in",mb=()=>"Aumentar zoom",_b=(m={},a={})=>(a.locale??Ve())==="en"?fb():mb(),gb=()=>"Zoom out",vb=()=>"Diminuir zoom",yb=(m={},a={})=>(a.locale??Ve())==="en"?gb():vb(),xb=()=>"Previous location",bb=()=>"Localização anterior",wb=(m={},a={})=>(a.locale??Ve())==="en"?xb():bb(),Tb=()=>"Offline",Cb=()=>"Offline",Sb=(m={},a={})=>(a.locale??Ve())==="en"?Tb():Cb(),Pb=()=>"Zoom in to see the pixels",Ib=()=>"Amplie para ver os pixels",Mb=(m={},a={})=>(a.locale??Ve())==="en"?Pb():Ib(),kb=()=>"Phone verification required",Ab=()=>"Verificação de telefone necessária",Yg=(m={},a={})=>(a.locale??Ve())==="en"?kb():Ab(),Eb=()=>"My location",zb=()=>"Minha localização",Lb=(m={},a={})=>(a.locale??Ve())==="en"?Eb():zb(),Db=()=>"You don't have charges to paint. Wait to recharge.",Rb=()=>"Você não possui tinta para pintar. Aguarde para carrega-las.",Bb=(m={},a={})=>(a.locale??Ve())==="en"?Db():Rb(),Fb=()=>"Map powered by:",Ob=()=>"Mapa fornecido por:",Nb=(m={},a={})=>(a.locale??Ve())==="en"?Fb():Ob(),jb=()=>"OpenMapTiles Data from",Vb=()=>"OpenMapTiles com dados do",qb=(m={},a={})=>(a.locale??Ve())==="en"?jb():Vb(),Zb=()=>"Feedback and bugs",Ub=()=>"Feedback e bugs",$b=(m={},a={})=>(a.locale??Ve())==="en"?Zb():Ub(),Gb=()=>"Overview",Hb=()=>"Visão Geral",Wb=(m={},a={})=>(a.locale??Ve())==="en"?Gb():Hb(),Xb=()=>"How to paint faster",Yb=()=>"Como pintar mais rápido",Kb=(m={},a={})=>(a.locale??Ve())==="en"?Xb():Yb(),Jb=()=>"When painting, click on the button",Qb=()=>"Quando pintar clique no botão",e2=(m={},a={})=>(a.locale??Ve())==="en"?Jb():Qb(),t2=()=>"on the top right corner of the screen. This will lock the screen but it'll also enable painting by moving your finger over the map.",r2=()=>"no canto superior direito da tela. Isso bloqueará a tela, mas também permitirá pintar movendo o dedo sobre o mapa.",n2=(m={},a={})=>(a.locale??Ve())==="en"?t2():r2(),i2=()=>"Hold",a2=()=>"Segure",o2=(m={},a={})=>(a.locale??Ve())==="en"?i2():a2(),s2=()=>"SPACE",l2=()=>"Espaço",c2=(m={},a={})=>(a.locale??Ve())==="en"?s2():l2(),u2=()=>"and move your cursor over the map.",h2=()=>"e mova seu cursor sobre o mapa.",d2=(m={},a={})=>(a.locale??Ve())==="en"?u2():h2(),p2=()=>"Explore",f2=()=>"Explorar",m2=(m={},a={})=>(a.locale??Ve())==="en"?p2():f2(),_2=()=>"Recharge paint charges",g2=()=>"Recarga de tinta",v2=(m={},a={})=>(a.locale??Ve())==="en"?_2():g2(),y2=()=>"Items",x2=()=>"Itens",b2=(m={},a={})=>(a.locale??Ve())==="en"?y2():x2(),w2=()=>"Get more charges",T2=()=>"Recarregue tinta para pintar",C2=(m={},a={})=>(a.locale??Ve())==="en"?w2():T2(),S2=m=>`+${m.amount} Max. Charges`,P2=m=>`+${m.amount} Tinta máxima`,I2=(m,a={})=>(a.locale??Ve())==="en"?S2(m):P2(m),M2=()=>"Increase your maximum paint charges capacity",k2=()=>"Aumente sua capacidade máxima de tinta",A2=(m={},a={})=>(a.locale??Ve())==="en"?M2():k2(),E2=()=>"Profile picture",z2=()=>"Imagem de perfil",L2=(m={},a={})=>(a.locale??Ve())==="en"?E2():z2(),D2=()=>"Add a new 16x16 profile picture",R2=()=>"Adicionar uma nova imagem de perfil 16x16",B2=(m={},a={})=>(a.locale??Ve())==="en"?D2():R2(),F2=()=>"Not enough droplets",O2=()=>"Droplets insuficientes",gp=(m={},a={})=>(a.locale??Ve())==="en"?F2():O2(),N2=()=>"Show profile",j2=()=>"Exibir perfil",V2=(m={},a={})=>(a.locale??Ve())==="en"?N2():j2(),q2=()=>"Menu",Z2=()=>"Menu",U2=(m={},a={})=>(a.locale??Ve())==="en"?q2():Z2(),$2=m=>`Could not install the app: ${m.error}`,G2=m=>`Não pode instalar o app: ${m.error}`,H2=(m,a={})=>(a.locale??Ve())==="en"?$2(m):G2(m),W2=()=>"Install App",X2=()=>"Instalar App",Y2=(m={},a={})=>(a.locale??Ve())==="en"?W2():X2(),K2=()=>"Livestreams",J2=()=>"Livestreams",Q2=(m={},a={})=>(a.locale??Ve())==="en"?K2():J2(),ew=()=>"Log Out",tw=()=>"Log Out",rw=(m={},a={})=>(a.locale??Ve())==="en"?ew():tw(),nw=()=>"Hide UI",iw=()=>"Esconder UI",aw=(m={},a={})=>(a.locale??Ve())==="en"?nw():iw(),ow=()=>"Change picture:",sw=()=>"Change picture:",lw=(m={},a={})=>(a.locale??Ve())==="en"?ow():sw(),cw=()=>"Show last painted pixel on alliance",uw=()=>"Mostrar último pixel pintado na aliança",hw=(m={},a={})=>(a.locale??Ve())==="en"?cw():uw(),dw=()=>"Delete Account",pw=()=>"Deletar Conta",Yf=(m={},a={})=>(a.locale??Ve())==="en"?dw():pw(),fw=()=>"Are you absolutely sure?",mw=()=>"Você tem certeza absoluta?",_w=(m={},a={})=>(a.locale??Ve())==="en"?fw():mw(),gw=()=>"This will permanently delete your account and all associated data. This action cannot be undone.",vw=()=>"Isso excluirá permanentemente sua conta e todos os dados associados. Esta ação não pode ser desfeita.",yw=(m={},a={})=>(a.locale??Ve())==="en"?gw():vw(),xw=()=>"Profile",bw=()=>"Perfil",ww=(m={},a={})=>(a.locale??Ve())==="en"?xw():bw(),Tw=()=>"Display your country’s flag next to your username. Plus, when painting in regions where you own the corresponding flag, you recover 10% of the charges spent.",Cw=()=>"Exiba a bandeira do seu país ao lado do seu nome de usuário. Além disso, ao pintar em regiões onde você possui a bandeira correspondente, você recupera 10% das tintas gastas.",Sw=(m={},a={})=>(a.locale??Ve())==="en"?Tw():Cw(),Pw=()=>"Does not need to be equipped to provide the bonus",Iw=()=>"Não precisa estar equipada para obter o bônus",Mw=(m={},a={})=>(a.locale??Ve())==="en"?Pw():Iw(),kw=()=>"Equipped",Aw=()=>"Equipado",Ew=(m={},a={})=>(a.locale??Ve())==="en"?kw():Aw(),zw=()=>"Equip",Lw=()=>"Equipar",Dw=(m={},a={})=>(a.locale??Ve())==="en"?zw():Lw(),Rw=()=>"Country",Bw=()=>"País",Uv=(m={},a={})=>(a.locale??Ve())==="en"?Rw():Bw(),Fw=()=>"No country found.",Ow=()=>"País não encontrado.",Nw=(m={},a={})=>(a.locale??Ve())==="en"?Fw():Ow(),jw=()=>"Welcome to",Vw=()=>"Bem vindo ao",qw=(m={},a={})=>(a.locale??Ve())==="en"?jw():Vw(),Zw=()=>"Rules",Uw=()=>"Regras",$w=(m={},a={})=>(a.locale??Ve())==="en"?Zw():Uw(),Gw=()=>"Important",Hw=()=>"Importante",Ww=(m={},a={})=>(a.locale??Ve())==="en"?Gw():Hw(),Xw=()=>"🚫 No inappropriate content (+18, hate speech, inappropriate links, highly suggestive material, ...)",Yw=()=>"🚫 Conteúdo inapropriado não permitido (+18, discurso de ódio, links inapropriados, conteúdo altamente sugestivo, ...)",Kw=(m={},a={})=>(a.locale??Ve())==="en"?Xw():Yw(),Jw=()=>"😈 Do not paint over other artworks using random colors or patterns just to mess things up",Qw=()=>"😈 Não desenhe por cima de outras artes usando cores ou padrões aleatórios só para bagunçar",e5=(m={},a={})=>(a.locale??Ve())==="en"?Jw():Qw(),t5=()=>"🧑‍🤝‍🧑 Do not paint with more than one account",r5=()=>"🧑‍🤝‍🧑 Não desenhe com mais de uma conta",n5=(m={},a={})=>(a.locale??Ve())==="en"?t5():r5(),i5=()=>"🤖 Use of bots is not allowed",a5=()=>"🤖 Usar bots não é permitido",o5=(m={},a={})=>(a.locale??Ve())==="en"?i5():a5(),s5=()=>"🙅 Disclosing other's personal information is not allowed",l5=()=>"🙅 Divulgar informações pessoais dos outros não é permitido",c5=(m={},a={})=>(a.locale??Ve())==="en"?s5():l5(),u5=()=>"✅ Painting over other artworks to complement them or create a new drawing is allowed",h5=()=>"✅ Desenhar sobre outras artes para complementar ou criar novas artes é permitido",d5=(m={},a={})=>(a.locale??Ve())==="en"?u5():h5(),p5=()=>"✅ Griefing political party flags or portraits of politicians is allowed",f5=()=>"✅ Desenhar sobre bandeiras de partidos e retratos de políticos é permitido",m5=(m={},a={})=>(a.locale??Ve())==="en"?p5():f5(),_5=()=>"Violations of these rules may lead to suspension of your account or removal of drawings.",g5=()=>"A violação destas regras pode levar à suspensão da conta ou à remoção de desenhos.",v5=(m={},a={})=>(a.locale??Ve())==="en"?_5():g5(),y5=()=>"Understood",x5=()=>"Entendido",b5=(m={},a={})=>(a.locale??Ve())==="en"?y5():x5(),w5=()=>"Toggle art opacity",T5=()=>"Alterar opacidade",$v=(m={},a={})=>(a.locale??Ve())==="en"?w5():T5(),C5=()=>"Paint",S5=()=>"Pintar",Gv=(m={},a={})=>(a.locale??Ve())==="en"?C5():S5(),P5=()=>"Select a color",I5=()=>"Selecione uma color",M5=(m={},a={})=>(a.locale??Ve())==="en"?P5():I5(),k5=()=>"Select a pixel to erase",A5=()=>"Selecione um pixel para apagar",E5=(m={},a={})=>(a.locale??Ve())==="en"?k5():A5(),z5=()=>"Pick a color from the map",L5=()=>"Escolha uma cor do mapa",D5=(m={},a={})=>(a.locale??Ve())==="en"?z5():L5(),R5=()=>"Click",B5=()=>"Clique",F5=(m={},a={})=>(a.locale??Ve())==="en"?R5():B5(),O5=()=>"SPACE",N5=()=>"ESPAÇO",j5=(m={},a={})=>(a.locale??Ve())==="en"?O5():N5(),V5=()=>"or hold",q5=()=>"ou segure",Z5=(m={},a={})=>(a.locale??Ve())==="en"?V5():q5(),U5=()=>"to paint,",$5=()=>"para pintar",G5=(m={},a={})=>(a.locale??Ve())==="en"?U5():$5(),H5=()=>"You can paint more than 1 pixel",W5=()=>"Você pode pintar mais de 1 pixel",X5=(m={},a={})=>(a.locale??Ve())==="en"?H5():W5(),Y5=()=>"Paint pixel",K5=()=>"Pintar pixel",J5=(m={},a={})=>(a.locale??Ve())==="en"?Y5():K5(),Q5=()=>"Color Picker",e3=()=>"Conta Gotas",t3=(m={},a={})=>(a.locale??Ve())==="en"?Q5():e3(),r3=()=>"+2 max. charge/level",n3=()=>"+2 tinta máxima/level",i3=(m={},a={})=>(a.locale??Ve())==="en"?r3():n3(),a3=()=>"Name",o3=()=>"Nome",Kf=(m={},a={})=>(a.locale??Ve())==="en"?a3():o3(),s3=()=>"Discord Username",l3=()=>"Usuário do Discord",c3=(m={},a={})=>(a.locale??Ve())==="en"?s3():l3(),u3=()=>"Max. Charges",h3=()=>"Tinta máxima",Kg=(m={},a={})=>(a.locale??Ve())==="en"?u3():h3(),d3=()=>"Paint Charges",p3=()=>"Tintas",f3=(m={},a={})=>(a.locale??Ve())==="en"?d3():p3(),m3=m=>`+${m.amount} Paint Charges`,_3=m=>`+${m.amount} Tintas`,g3=(m,a={})=>(a.locale??Ve())==="en"?m3(m):_3(m),v3=()=>"Leave alliance",y3=()=>"Sair da aliança",x3=(m={},a={})=>(a.locale??Ve())==="en"?v3():y3(),b3=()=>"Headquarters",w3=()=>"Quartel General",T3=(m={},a={})=>(a.locale??Ve())==="en"?b3():w3(),C3=()=>"Not set",S3=()=>"Não configurado",P3=(m={},a={})=>(a.locale??Ve())==="en"?C3():S3(),I3=()=>"You are not in an alliance",M3=()=>"Você não está em uma aliança",k3=(m={},a={})=>(a.locale??Ve())==="en"?I3():M3(),A3=()=>"Get invited to an alliance",E3=()=>"Seja convidado para uma aliança",z3=(m={},a={})=>(a.locale??Ve())==="en"?A3():E3(),L3=()=>"OR",D3=()=>"OU",R3=(m={},a={})=>(a.locale??Ve())==="en"?L3():D3(),B3=()=>"Create an alliance",F3=()=>"Crie uma aliança",O3=(m={},a={})=>(a.locale??Ve())==="en"?B3():F3(),N3=()=>"Invite link",j3=()=>"Link de convite",V3=(m={},a={})=>(a.locale??Ve())==="en"?N3():j3(),q3=()=>"Send the link below to everybody you want to invite to the alliance",Z3=()=>"Envie o link abaixo para quem você deseja convidar para a aliança",U3=(m={},a={})=>(a.locale??Ve())==="en"?q3():Z3(),$3=()=>"Copied",G3=()=>"Copiado",Fm=(m={},a={})=>(a.locale??Ve())==="en"?$3():G3(),H3=()=>"No description",W3=()=>"Sem descrição",Hv=(m={},a={})=>(a.locale??Ve())==="en"?H3():W3(),X3=()=>"Invite",Y3=()=>"Convite",K3=(m={},a={})=>(a.locale??Ve())==="en"?X3():Y3(),J3=()=>"No pixels painted",Q3=()=>"Nenhum pixel pintado",Om=(m={},a={})=>(a.locale??Ve())==="en"?J3():Q3(),eT=()=>"Today",tT=()=>"Hoje",vp=(m={},a={})=>(a.locale??Ve())==="en"?eT():tT(),rT=()=>"Week",nT=()=>"Semana",iT=(m={},a={})=>(a.locale??Ve())==="en"?rT():nT(),aT=()=>"Month",oT=()=>"Mês",sT=(m={},a={})=>(a.locale??Ve())==="en"?aT():oT(),lT=()=>"All time",cT=()=>"Geral",uT=(m={},a={})=>(a.locale??Ve())==="en"?lT():cT(),hT=()=>"this week",dT=()=>"nesta semana",Nm=(m={},a={})=>(a.locale??Ve())==="en"?hT():dT(),pT=()=>"this month",fT=()=>"neste mês",jm=(m={},a={})=>(a.locale??Ve())==="en"?pT():fT(),mT=()=>"Create alliance",_T=()=>"Criar aliança",gT=(m={},a={})=>(a.locale??Ve())==="en"?mT():_T(),vT=()=>"Alliance Name",yT=()=>"Nome da aliança",xT=(m={},a={})=>(a.locale??Ve())==="en"?vT():yT(),bT=()=>"Create",wT=()=>"Criar",TT=(m={},a={})=>(a.locale??Ve())==="en"?bT():wT(),CT=()=>"Give admin",ST=()=>"Tornar admin",PT=(m={},a={})=>(a.locale??Ve())==="en"?CT():ST(),IT=()=>"Ban from alliance",MT=()=>"Banir da aliança",Wv=(m={},a={})=>(a.locale??Ve())==="en"?IT():MT(),kT=()=>"No action",AT=()=>"Sem opção",ET=(m={},a={})=>(a.locale??Ve())==="en"?kT():AT(),zT=()=>"Unban",LT=()=>"Desbanir",DT=(m={},a={})=>(a.locale??Ve())==="en"?zT():LT(),RT=()=>"No banned users",BT=()=>"Sem usuários banidos",FT=(m={},a={})=>(a.locale??Ve())==="en"?RT():BT(),OT=()=>"Update",NT=()=>"Atualizar",jT=(m={},a={})=>(a.locale??Ve())==="en"?OT():NT(),VT=()=>"Error giving admin to user",qT=()=>"Erro ao tornar usuário admin",ZT=(m={},a={})=>(a.locale??Ve())==="en"?VT():qT(),UT=()=>"Users",$T=()=>"Usuários",GT=(m={},a={})=>(a.locale??Ve())==="en"?UT():$T(),HT=()=>"Banned",WT=()=>"Banido",Xv=(m={},a={})=>(a.locale??Ve())==="en"?HT():WT(),XT=()=>"Regions",YT=()=>"Regiões",KT=(m={},a={})=>(a.locale??Ve())==="en"?XT():YT(),JT=()=>"Countries",QT=()=>"Países",eC=(m={},a={})=>(a.locale??Ve())==="en"?JT():QT(),tC=()=>"Players",rC=()=>"Jogadores",Yv=(m={},a={})=>(a.locale??Ve())==="en"?tC():rC(),nC=()=>"Alliances",iC=()=>"Alianças",Kv=(m={},a={})=>(a.locale??Ve())==="en"?nC():iC(),aC=()=>"Region",oC=()=>"Região",sC=(m={},a={})=>(a.locale??Ve())==="en"?aC():oC(),lC=()=>"Pixels",cC=()=>"Pixels",vc=(m={},a={})=>(a.locale??Ve())==="en"?lC():cC(),uC=()=>"Painted",hC=()=>"Pintados",yc=(m={},a={})=>(a.locale??Ve())==="en"?uC():hC(),dC=()=>"Pixels painted inside the region",pC=()=>"Pixels pintados dentro da região",fC=(m={},a={})=>(a.locale??Ve())==="en"?dC():pC(),mC=()=>"Not painted",_C=()=>"Não pintado",gC=(m={},a={})=>(a.locale??Ve())==="en"?mC():_C(),vC=()=>"Painted by",yC=()=>"Pintado por",xC=(m={},a={})=>(a.locale??Ve())==="en"?vC():yC(),bC=()=>"Limit reached",wC=()=>"Limite atingido",TC=(m={},a={})=>(a.locale??Ve())==="en"?bC():wC(),CC=()=>"Favorite",SC=()=>"Favoritar",PC=(m={},a={})=>(a.locale??Ve())==="en"?CC():SC(),IC=()=>"Share",MC=()=>"Compartilhar",kC=(m={},a={})=>(a.locale??Ve())==="en"?IC():MC(),AC=()=>"Share place",EC=()=>"Compartilhar local",zC=(m={},a={})=>(a.locale??Ve())==="en"?AC():EC(),LC=()=>"Mute",DC=()=>"Mutar",RC=(m={},a={})=>(a.locale??Ve())==="en"?LC():DC(),BC=()=>"Unmute",FC=()=>"Desmutar",OC=(m={},a={})=>(a.locale??Ve())==="en"?BC():FC(),NC=()=>"Select the headquarters location",jC=()=>"Selecione a localização do quartel general",VC=(m={},a={})=>(a.locale??Ve())==="en"?NC():jC(),qC=()=>"Pixels painted inside the country",ZC=()=>"Pixels pintados dentro do país",UC=(m={},a={})=>(a.locale??Ve())==="en"?qC():ZC(),$C=()=>"Username copied to clipboard",GC=()=>"Usuário copiado",HC=(m={},a={})=>(a.locale??Ve())==="en"?$C():GC(),WC=()=>"No more charges",XC=()=>"Acabou a tinta",YC=(m={},a={})=>(a.locale??Ve())==="en"?WC():XC(),KC=()=>"You are not allowed to use multiple accounts. Use your main account to paint.",JC=()=>"Não é permitido usar várias contas. Use sua conta principal para pintar.",QC=(m={},a={})=>(a.locale??Ve())==="en"?KC():JC(),eS=()=>"SMS sent to",tS=()=>"SMS enviado para",rS=(m={},a={})=>(a.locale??Ve())==="en"?eS():tS(),nS=()=>"Phone successfully verified",iS=()=>"Telefone verificado com sucesso",aS=(m={},a={})=>(a.locale??Ve())==="en"?nS():iS(),oS=()=>"Not a valid phone number",sS=()=>"Não é um número válido",lS=(m={},a={})=>(a.locale??Ve())==="en"?oS():sS(),cS=()=>"Location unfavorited",uS=()=>"Localização desfavoritada",hS=(m={},a={})=>(a.locale??Ve())==="en"?cS():uS(),dS=()=>"Location favorited",pS=()=>"Localização favoritada",fS=(m={},a={})=>(a.locale??Ve())==="en"?dS():pS(),mS=()=>"Giving admin to user",_S=()=>"Tornar usuário um admin",gS=(m={},a={})=>(a.locale??Ve())==="en"?mS():_S(),vS=()=>"Profile updated",yS=()=>"Perfil atualizado",xS=(m={},a={})=>(a.locale??Ve())==="en"?vS():yS(),bS=()=>"Successfully linked your Discord account.",wS=()=>"A sua conta Discord foi conectada com sucesso.",TS=(m={},a={})=>(a.locale??Ve())==="en"?bS():wS(),CS=()=>"Discord unlinked",SS=()=>"Discord desconectado",PS=(m={},a={})=>(a.locale??Ve())==="en"?CS():SS(),IS=()=>"Link your Discord",MS=()=>"Conectar Discord",kS=(m={},a={})=>(a.locale??Ve())==="en"?IS():MS(),AS=m=>`Unlink Discord (${m.username})`,ES=m=>`Desconectar Discord (${m.username})`,zS=(m,a={})=>(a.locale??Ve())==="en"?AS(m):ES(m),LS=()=>"Account successfully deleted",DS=()=>"Conta deletada com sucesso",RS=(m={},a={})=>(a.locale??Ve())==="en"?LS():DS(),BS=()=>"Logged out",FS=()=>"Logout feito",OS=(m={},a={})=>(a.locale??Ve())==="en"?BS():FS(),NS=()=>"Could not logout. Try refreshing the page.",jS=()=>"Não foi possível sair da conta. Tente recarregar a página.",VS=(m={},a={})=>(a.locale??Ve())==="en"?NS():jS(),qS=()=>"You need to zoom in to select a pixel",ZS=()=>"Dê zoom para selecionar um pixel",US=(m={},a={})=>(a.locale??Ve())==="en"?qS():ZS(),$S=()=>"Phone verification",GS=()=>"Verificação de telefone",HS=(m={},a={})=>(a.locale??Ve())==="en"?$S():GS(),WS=()=>"Please verify your phone number to continue playing. This helps us keep bots out and ensure a safe, creative experience for everyone.",XS=()=>"Por favor, verifique com seu telefone para continuar jogando. Isso nos ajuda a filtrar bots e manter um experiência segura e criativa para todos.",YS=(m={},a={})=>(a.locale??Ve())==="en"?WS():XS(),KS=()=>"Send Code",JS=()=>"Enviar o código",QS=(m={},a={})=>(a.locale??Ve())==="en"?KS():JS(),eP=()=>"Input the code",tP=()=>"Insira o código",rP=(m={},a={})=>(a.locale??Ve())==="en"?eP():tP(),nP=()=>"Sent to",iP=()=>"Enviar para",aP=(m={},a={})=>(a.locale??Ve())==="en"?nP():iP(),oP=()=>"Resend Code",sP=()=>"Reenviar Código",lP=(m={},a={})=>(a.locale??Ve())==="en"?oP():sP(),cP=()=>"Try another number",uP=()=>"Tentar outro número",hP=(m={},a={})=>(a.locale??Ve())==="en"?cP():uP(),dP=()=>"Edit profile",pP=()=>"Editar perfil",fP=(m={},a={})=>(a.locale??Ve())==="en"?dP():pP(),mP=()=>"Image",_P=()=>"Imagem",gP=(m={},a={})=>(a.locale??Ve())==="en"?mP():_P(),vP=()=>"Download",yP=()=>"Download",xP=(m={},a={})=>(a.locale??Ve())==="en"?vP():yP(),bP=()=>"Image copied to clipboard",wP=()=>"Imagem copiada para a área de transferência",TP=(m={},a={})=>(a.locale??Ve())==="en"?bP():wP(),CP=()=>"My map is lagging",SP=()=>"Meu mapa está travando",PP=(m={},a={})=>(a.locale??Ve())==="en"?CP():SP(),IP=()=>"Verify if",MP=()=>"Verifique se",kP=(m={},a={})=>(a.locale??Ve())==="en"?IP():MP(),AP=()=>"Use hardware acceleration when available",EP=()=>"Usar aceleração gráfica quando disponível",zP=(m={},a={})=>(a.locale??Ve())==="en"?AP():EP(),LP=()=>"is enabled on",DP=()=>"está habilitado em",RP=(m={},a={})=>(a.locale??Ve())==="en"?LP():DP(),BP=()=>"Follow the instructions to enable hardware acceleration",FP=()=>"Siga a instrução para habilitar a aceleração de hardware",OP=(m={},a={})=>(a.locale??Ve())==="en"?BP():FP(),NP=()=>"Moderation",jP=()=>"Moderação",VP=(m={},a={})=>(a.locale??Ve())==="en"?NP():jP(),qP=()=>"Terms",ZP=()=>"Termos",UP=(m={},a={})=>(a.locale??Ve())==="en"?qP():ZP(),$P=()=>"Privacy",GP=()=>"Privacidade",HP=(m={},a={})=>(a.locale??Ve())==="en"?$P():GP(),WP=()=>"Refund",XP=()=>"Reembolso",Jv=(m={},a={})=>(a.locale??Ve())==="en"?WP():XP(),YP=()=>"Clear area",KP=()=>"Limpar área",JP=(m={},a={})=>(a.locale??Ve())==="en"?YP():KP(),QP=()=>"Select the area's first corner",eI=()=>"Selecione o primeiro canto da área",Qv=(m={},a={})=>(a.locale??Ve())==="en"?QP():eI(),tI=()=>"Select the area's opposite corner",rI=()=>"Selecione o canto oposto da área",e0=(m={},a={})=>(a.locale??Ve())==="en"?tI():rI(),nI=()=>"Admin",iI=()=>"Administração",aI=(m={},a={})=>(a.locale??Ve())==="en"?nI():iI(),oI=m=>`Reason: ${m.reason}`,sI=m=>`Motivo: ${m.reason}`,lI=(m,a={})=>(a.locale??Ve())==="en"?oI(m):sI(m),cI=()=>"No corresponding region on the map (cosmetic effect only)",uI=()=>"Não possui região no mapa (apenas efeito cosmético)",hI=(m={},a={})=>(a.locale??Ve())==="en"?cI():uI(),dI=()=>"Flag without region on the map",pI=()=>"Bandeira sem região no mapa",fI=(m={},a={})=>(a.locale??Ve())==="en"?dI():pI(),mI=m=>`The flag of ${m.country} does not have corresponding areas on the map and will only have cosmetic effects.`,_I=m=>`A bandeira ${m.country} não possui regiões correspondente no mapa e só terá efeito cosmético.`,gI=(m,a={})=>(a.locale??Ve())==="en"?mI(m):_I(m),vI=()=>"Dark mode",yI=()=>"Modo escuro",xI=(m={},a={})=>(a.locale??Ve())==="en"?vI():yI(),bI=()=>"Light mode",wI=()=>"Modo claro",TI=(m={},a={})=>(a.locale??Ve())==="en"?bI():wI(),CI=()=>"Log out from all devices",SI=()=>"Sair de todos os dispositivos",PI=(m={},a={})=>(a.locale??Ve())==="en"?CI():SI(),II=()=>"Log out from all devices",MI=()=>"Sair de todos os dispositivos",kI=(m={},a={})=>(a.locale??Ve())==="en"?II():MI(),AI=()=>"This action will log your account out from all devices.",EI=()=>"Essa ação ira desconectar sua conta de todos os dispositivos.",zI=(m={},a={})=>(a.locale??Ve())==="en"?AI():EI(),LI=()=>"Sessions successfully revoked",DI=()=>"Sessões encerradas com sucesso",RI=(m={},a={})=>(a.locale??Ve())==="en"?LI():DI(),BI=()=>"Error revoking sessions. Try again later.",FI=()=>"Erro ao encerrar sessões. Tente novamente mais tarde.",OI=(m={},a={})=>(a.locale??Ve())==="en"?BI():FI(),NI=()=>"More",jI=()=>"Mais",VI=(m={},a={})=>(a.locale??Ve())==="en"?NI():jI(),qI=()=>"This action is irreversible, do you want to proceed?",ZI=()=>"Esta ação é irreversível,você quer prosseguir?",UI=(m={},a={})=>(a.locale??Ve())==="en"?qI():ZI(),$I=()=>"Please confirm by entering your username:",GI=()=>"Por favor, confirme digitando seu nome de usuário:",HI=(m={},a={})=>(a.locale??Ve())==="en"?$I():GI(),WI=()=>"Type your username",XI=()=>"Digite seu nome de usuário",YI=(m={},a={})=>(a.locale??Ve())==="en"?WI():XI(),KI=()=>"This action may take some time to be completed.",JI=()=>"Essa ação pode levar algum tempo para ser realizada.",QI=(m={},a={})=>(a.locale??Ve())==="en"?KI():JI(),$o=2*Math.PI*6378137/2;class fl{constructor(a=256){yr(this,"initialResolution");this.tileSize=a,this.initialResolution=2*$o/this.tileSize}latLonToMeters(a,p){const y=p/180*$o,M=Math.log(Math.tan((90+a)*Math.PI/360))/(Math.PI/180)*$o/180;return[y,M]}metersToLatLon(a,p){const y=a/$o*180;let M=p/$o*180;return M=180/Math.PI*(2*Math.atan(Math.exp(M*Math.PI/180))-Math.PI/2),[M,y]}pixelsToMeters(a,p,y){const M=this.resolution(y),z=a*M-$o,T=$o-p*M;return[z,T]}pixelsToLatLon(a,p,y){const[M,z]=this.pixelsToMeters(a,p,y);return this.metersToLatLon(M,z)}latLonToPixels(a,p,y){const[M,z]=this.latLonToMeters(a,p);return this.metersToPixels(M,z,y)}latLonToPixelsFloor(a,p,y){const[M,z]=this.latLonToPixels(a,p,y);return[Math.floor(M),Math.floor(z)]}metersToPixels(a,p,y){const M=this.resolution(y),z=(a+$o)/M,T=($o-p)/M;return[z,T]}latLonToTile(a,p,y){const[M,z]=this.latLonToMeters(a,p);return this.metersToTile(M,z,y)}metersToTile(a,p,y){const[M,z]=this.metersToPixels(a,p,y);return this.pixelsToTile(M,z)}pixelsToTile(a,p){const y=Math.ceil(a/this.tileSize)-1,M=Math.ceil(p/this.tileSize)-1;return[y,M]}pixelsToTileLocal(a,p){return{tile:this.pixelsToTile(a,p),pixel:[Math.floor(a)%this.tileSize,Math.floor(p)%this.tileSize]}}tileBounds(a,p,y){const[M,z]=this.pixelsToMeters(a*this.tileSize,p*this.tileSize,y),[T,s]=this.pixelsToMeters((a+1)*this.tileSize,(p+1)*this.tileSize,y);return{min:[M,z],max:[T,s]}}tileBoundsLatLon(a,p,y){const M=this.tileBounds(a,p,y);return{min:this.metersToLatLon(M.min[0],M.min[1]),max:this.metersToLatLon(M.max[0],M.max[1])}}resolution(a){return this.initialResolution/2**a}latLonToTileAndPixel(a,p,y){const[M,z]=this.latLonToMeters(a,p),[T,s]=this.metersToTile(M,z,y),[B,O]=this.metersToPixels(M,z,y);return{tile:[T,s],pixel:[Math.floor(B)%this.tileSize,Math.floor(O)%this.tileSize]}}pixelBounds(a,p,y){return{min:this.pixelsToMeters(a,p,y),max:this.pixelsToMeters(a+1,p+1,y)}}pixelToBoundsLatLon(a,p,y){const M=this.pixelBounds(a,p,y),z=.001885,T=(M.max[0]-M.min[0])*z,s=(M.max[1]-M.min[1])*z;return M.min[0]-=T,M.max[0]-=T,M.min[1]-=s,M.max[1]-=s,{min:this.metersToLatLon(M.min[0],M.min[1]),max:this.metersToLatLon(M.max[0],M.max[1])}}latLonToTileBoundsLatLon(a,p,y){const[M,z]=this.latLonToMeters(a,p),[T,s]=this.metersToTile(M,z,y);return this.tileBoundsLatLon(T,s,y)}latLonToPixelBoundsLatLon(a,p,y){const[M,z]=this.latLonToMeters(a,p),[T,s]=this.metersToPixels(M,z,y);return this.pixelToBoundsLatLon(Math.floor(T),Math.floor(s),y)}latLonToRegionAndPixel(a,p,y,M=Wi.regionSize){const[z,T]=this.latLonToPixelsFloor(a,p,y),s=this.tileSize*M;return{region:[Math.floor(z/s),Math.floor(T/s)],pixel:[z%s,T%s]}}}function Vm(m,a=!0){const{min:p,max:y}=m;return a?[[p[1],y[0]],[y[1],y[0]],[y[1],p[0]],[p[1],p[0]]]:[[p[0],y[1]],[y[0],y[1]],[y[0],p[1]],[p[0],p[1]]]}function qm(m){return[(m.min[0]+m.max[0])/2,(m.min[1]+m.max[1])/2]}const e4="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAAAAACoWZBhAAAAAXNSR0IArs4c6QAAACpJREFUeNpj+AsEZ86ASIa/DAwMZ84ACRDzDBigMs/AARITq1oUwxBWAADaREUdDMswKwAAAABJRU5ErkJggg==",Jg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAAXNSR0IArs4c6QAAACVJREFUeNpj+A8FDEAAZwMRBAIBmIYLIgHcgkQDIs3E6SRsjgcABYFLtfTgakEAAAAASUVORK5CYII=";function t4(m){return Math.floor(Math.random()*m)}const Jf=14.5;async function r4(){const m=a4();if(m)return m;try{if((await navigator.permissions.query({name:"geolocation"})).state==="granted"){const p=await new Promise((y,M)=>navigator.geolocation.getCurrentPosition(z=>y(z),z=>M(z)));return{lat:p.coords.latitude,lng:p.coords.longitude,zoom:Jf}}}catch(a){console.error(a)}return{...n4().pos,zoom:Jf}}function n4(){const m=Object.entries(i4),a=t4(m.length),[p,y]=m[a];return{city:p,pos:y}}const i4={tokyo:{lat:35.677545560719665,lng:139.76394445809638},paris:{lat:48.8537151734952,lng:2.3484026030630787},newYork:{lat:40.71283173786517,lng:-74.00599771376795},saoPaulo:{lat:-23.550584064565356,lng:-46.63339720713918},sydney:{lat:-33.86943325619071,lng:151.2083447239608}},t0="location";function Co(m,a){localStorage.setItem(t0,JSON.stringify({...m,zoom:a}))}function a4(){const m=localStorage.getItem(t0);if(!m)return;const a=JSON.parse(m);return a.zoom??(a.zoom=Jf),a}var Hu,Wu;class o4{constructor(){Ar(this,Hu,st(-1));Ar(this,Wu,st([]))}get idx(){return x(at(this,Hu))}set idx(a){se(at(this,Hu),a,!0)}get entries(){return x(at(this,Wu))}set entries(a){se(at(this,Wu),a)}hasNext(){return this.idx0}goToPrev(a){const p=this.idx-1,y=this.entries[p];y&&(this.idx=p,a.flyTo({center:y.pos,zoom:y.zoom}))}isEmpty(){return this.entries.length===0}push(a){this.idx=this.idx+1,this.entries=[...this.entries.slice(0,this.idx),a]}}Hu=new WeakMap,Wu=new WeakMap;const hl=new o4;function Zm(m){return m&&m.__esModule&&Object.prototype.hasOwnProperty.call(m,"default")?m.default:m}var Xd={exports:{}};/** + * MapLibre GL JS + * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.6.2/LICENSE.txt + */var s4=Xd.exports,Qg;function l4(){return Qg||(Qg=1,(function(m,a){(function(p,y){m.exports=y()})(s4,(function(){var p={},y={};function M(T,s,B){if(y[T]=B,T==="index"){var O="var sharedModule = {}; ("+y.shared+")(sharedModule); ("+y.worker+")(sharedModule);",X={};return y.shared(X),y.index(p,X),typeof window<"u"&&p.setWorkerUrl(window.URL.createObjectURL(new Blob([O],{type:"text/javascript"}))),p}}M("shared",["exports"],(function(T){function s(n,t,r,o){return new(r||(r=Promise))((function(c,f){function _(S){try{b(o.next(S))}catch(I){f(I)}}function v(S){try{b(o.throw(S))}catch(I){f(I)}}function b(S){var I;S.done?c(S.value):(I=S.value,I instanceof r?I:new r((function(L){L(I)}))).then(_,v)}b((o=o.apply(n,t||[])).next())}))}function B(n,t){this.x=n,this.y=t}function O(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var X,K;typeof SuppressedError=="function"&&SuppressedError,B.prototype={clone(){return new B(this.x,this.y)},add(n){return this.clone()._add(n)},sub(n){return this.clone()._sub(n)},multByPoint(n){return this.clone()._multByPoint(n)},divByPoint(n){return this.clone()._divByPoint(n)},mult(n){return this.clone()._mult(n)},div(n){return this.clone()._div(n)},rotate(n){return this.clone()._rotate(n)},rotateAround(n,t){return this.clone()._rotateAround(n,t)},matMult(n){return this.clone()._matMult(n)},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(n){return this.x===n.x&&this.y===n.y},dist(n){return Math.sqrt(this.distSqr(n))},distSqr(n){const t=n.x-this.x,r=n.y-this.y;return t*t+r*r},angle(){return Math.atan2(this.y,this.x)},angleTo(n){return Math.atan2(this.y-n.y,this.x-n.x)},angleWith(n){return this.angleWithSep(n.x,n.y)},angleWithSep(n,t){return Math.atan2(this.x*t-this.y*n,this.x*n+this.y*t)},_matMult(n){const t=n[2]*this.x+n[3]*this.y;return this.x=n[0]*this.x+n[1]*this.y,this.y=t,this},_add(n){return this.x+=n.x,this.y+=n.y,this},_sub(n){return this.x-=n.x,this.y-=n.y,this},_mult(n){return this.x*=n,this.y*=n,this},_div(n){return this.x/=n,this.y/=n,this},_multByPoint(n){return this.x*=n.x,this.y*=n.y,this},_divByPoint(n){return this.x/=n.x,this.y/=n.y,this},_unit(){return this._div(this.mag()),this},_perp(){const n=this.y;return this.y=this.x,this.x=-n,this},_rotate(n){const t=Math.cos(n),r=Math.sin(n),o=r*this.x+t*this.y;return this.x=t*this.x-r*this.y,this.y=o,this},_rotateAround(n,t){const r=Math.cos(n),o=Math.sin(n),c=t.y+o*(this.x-t.x)+r*(this.y-t.y);return this.x=t.x+r*(this.x-t.x)-o*(this.y-t.y),this.y=c,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:B},B.convert=function(n){if(n instanceof B)return n;if(Array.isArray(n))return new B(+n[0],+n[1]);if(n.x!==void 0&&n.y!==void 0)return new B(+n.x,+n.y);throw new Error("Expected [x, y] or {x, y} point format")};var ne=(function(){if(K)return X;function n(t,r,o,c){this.cx=3*t,this.bx=3*(o-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*r,this.by=3*(c-r)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=o,this.p2y=c}return K=1,X=n,n.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,r){if(r===void 0&&(r=1e-6),t<0)return 0;if(t>1)return 1;for(var o=t,c=0;c<8;c++){var f=this.sampleCurveX(o)-t;if(Math.abs(f)f?v=o:b=o,o=.5*(b-v)+v;return o},solve:function(t,r){return this.sampleCurveY(this.solveCurveX(t,r))}},X})(),H=O(ne);let pe,ge;function Ie(){return pe==null&&(pe=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),pe}function Ee(){if(ge==null&&(ge=!1,Ie())){const t=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(t){for(let o=0;o<25;o++){const c=4*o;t.fillStyle=`rgb(${c},${c+1},${c+2})`,t.fillRect(o%5,Math.floor(o/5),1,1)}const r=t.getImageData(0,0,5,5).data;for(let o=0;o<100;o++)if(o%4!=3&&r[o]!==o){ge=!0;break}}}return ge||!1}var De=1e-6,ze=typeof Float32Array<"u"?Float32Array:Array;function Fe(){var n=new ze(9);return ze!=Float32Array&&(n[1]=0,n[2]=0,n[3]=0,n[5]=0,n[6]=0,n[7]=0),n[0]=1,n[4]=1,n[8]=1,n}function $e(n){return n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=1,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=1,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}function Je(){var n=new ze(3);return ze!=Float32Array&&(n[0]=0,n[1]=0,n[2]=0),n}function qe(n){return Math.hypot(n[0],n[1],n[2])}function Ze(n,t,r){var o=new ze(3);return o[0]=n,o[1]=t,o[2]=r,o}function Qe(n,t,r){return n[0]=t[0]+r[0],n[1]=t[1]+r[1],n[2]=t[2]+r[2],n}function Le(n,t,r){return n[0]=t[0]*r,n[1]=t[1]*r,n[2]=t[2]*r,n}function et(n,t,r){var o=t[0],c=t[1],f=t[2],_=r[0],v=r[1],b=r[2];return n[0]=c*b-f*v,n[1]=f*_-o*b,n[2]=o*v-c*_,n}Math.hypot||(Math.hypot=function(){for(var n=0,t=arguments.length;t--;)n+=arguments[t]*arguments[t];return Math.sqrt(n)});var nt,Ue=qe;function Me(n,t,r){var o=t[0],c=t[1],f=t[2],_=t[3];return n[0]=r[0]*o+r[4]*c+r[8]*f+r[12]*_,n[1]=r[1]*o+r[5]*c+r[9]*f+r[13]*_,n[2]=r[2]*o+r[6]*c+r[10]*f+r[14]*_,n[3]=r[3]*o+r[7]*c+r[11]*f+r[15]*_,n}function yt(){var n=new ze(4);return ze!=Float32Array&&(n[0]=0,n[1]=0,n[2]=0),n[3]=1,n}function Q(n,t,r,o){var c=.5*Math.PI/180;t*=c,r*=c,o*=c;var f=Math.sin(t),_=Math.cos(t),v=Math.sin(r),b=Math.cos(r),S=Math.sin(o),I=Math.cos(o);return n[0]=f*b*I-_*v*S,n[1]=_*v*I+f*b*S,n[2]=_*b*S-f*v*I,n[3]=_*b*I+f*v*S,n}function re(){var n=new ze(2);return ze!=Float32Array&&(n[0]=0,n[1]=0),n}function he(n,t){var r=new ze(2);return r[0]=n,r[1]=t,r}Je(),nt=new ze(4),ze!=Float32Array&&(nt[0]=0,nt[1]=0,nt[2]=0,nt[3]=0),Je(),Ze(1,0,0),Ze(0,1,0),yt(),yt(),Fe(),re();const oe=8192;function Ae(n,t,r){return t*(oe/(n.tileSize*Math.pow(2,r-n.tileID.overscaledZ)))}function je(n,t){return(n%t+t)%t}function ft(n,t,r){return n*(1-r)+t*r}function it(n){if(n<=0)return 0;if(n>=1)return 1;const t=n*n,r=t*n;return 4*(n<.5?r:3*(n-t)+r-.75)}function ut(n,t,r,o){const c=new H(n,t,r,o);return f=>c.solve(f)}const Pt=ut(.25,.1,.25,1);function Dt(n,t,r){return Math.min(r,Math.max(t,n))}function ot(n,t,r){const o=r-t,c=((n-t)%o+o)%o+t;return c===t?r:c}function dt(n,...t){for(const r of t)for(const o in r)n[o]=r[o];return n}let vt=1;function xt(n,t,r){const o={};for(const c in n)o[c]=t.call(this,n[c],c,n);return o}function It(n,t,r){const o={};for(const c in n)t.call(this,n[c],c,n)&&(o[c]=n[c]);return o}function wt(n){return Array.isArray(n)?n.map(wt):typeof n=="object"&&n?xt(n,wt):n}const _t={};function Et(n){_t[n]||(typeof console<"u"&&console.warn(n),_t[n]=!0)}function Rt(n,t,r){return(r.y-n.y)*(t.x-n.x)>(t.y-n.y)*(r.x-n.x)}function Ut(n){return typeof WorkerGlobalScope<"u"&&n!==void 0&&n instanceof WorkerGlobalScope}let er=null;function tr(n){return typeof ImageBitmap<"u"&&n instanceof ImageBitmap}const Nt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Ft(n,t,r,o,c){return s(this,void 0,void 0,(function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const f=new VideoFrame(n,{timestamp:0});try{const _=f==null?void 0:f.format;if(!_||!_.startsWith("BGR")&&!_.startsWith("RGB"))throw new Error(`Unrecognized format ${_}`);const v=_.startsWith("BGR"),b=new Uint8ClampedArray(o*c*4);if(yield f.copyTo(b,(function(S,I,L,F,q){const U=4*Math.max(-I,0),W=(Math.max(0,L)-L)*F*4+U,J=4*F,ce=Math.max(0,I),Re=Math.max(0,L);return{rect:{x:ce,y:Re,width:Math.min(S.width,I+F)-ce,height:Math.min(S.height,L+q)-Re},layout:[{offset:W,stride:J}]}})(n,t,r,o,c)),v)for(let S=0;S{n.removeEventListener(t,r,o)}}}function mr(n){return n*Math.PI/180}function hr(n){return n/Math.PI*180}const _r={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},Ir={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},qr="AbortError";function le(){return new Error(qr)}const j={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function Z(n){return j.REGISTERED_PROTOCOLS[n.substring(0,n.indexOf("://"))]}const Y="global-dispatcher";class ae extends Error{constructor(t,r,o,c){super(`AJAXError: ${r} (${t}): ${o}`),this.status=t,this.statusText=r,this.url=o,this.body=c}}const fe=()=>Ut(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Se=function(n,t){if(/:\/\//.test(n.url)&&!/^https?:|^file:/.test(n.url)){const o=Z(n.url);if(o)return o(n,t);if(Ut(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:n,targetMapId:Y},t)}if(!(/^file:/.test(r=n.url)||/^file:/.test(fe())&&!/^\w+:/.test(r))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return(function(o,c){return s(this,void 0,void 0,(function*(){const f=new Request(o.url,{method:o.method||"GET",body:o.body,credentials:o.credentials,headers:o.headers,cache:o.cache,referrer:fe(),signal:c.signal});let _,v;o.type!=="json"||f.headers.has("Accept")||f.headers.set("Accept","application/json");try{_=yield fetch(f)}catch(S){throw new ae(0,S.message,o.url,new Blob)}if(!_.ok){const S=yield _.blob();throw new ae(_.status,_.statusText,o.url,S)}v=o.type==="arrayBuffer"||o.type==="image"?_.arrayBuffer():o.type==="json"?_.json():_.text();const b=yield v;if(c.signal.aborted)throw le();return{data:b,cacheControl:_.headers.get("Cache-Control"),expires:_.headers.get("Expires")}}))})(n,t);if(Ut(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:n,mustQueue:!0,targetMapId:Y},t)}var r;return(function(o,c){return new Promise(((f,_)=>{var v;const b=new XMLHttpRequest;b.open(o.method||"GET",o.url,!0),o.type!=="arrayBuffer"&&o.type!=="image"||(b.responseType="arraybuffer");for(const S in o.headers)b.setRequestHeader(S,o.headers[S]);o.type==="json"&&(b.responseType="text",!((v=o.headers)===null||v===void 0)&&v.Accept||b.setRequestHeader("Accept","application/json")),b.withCredentials=o.credentials==="include",b.onerror=()=>{_(new Error(b.statusText))},b.onload=()=>{if(!c.signal.aborted)if((b.status>=200&&b.status<300||b.status===0)&&b.response!==null){let S=b.response;if(o.type==="json")try{S=JSON.parse(b.response)}catch(I){return void _(I)}f({data:S,cacheControl:b.getResponseHeader("Cache-Control"),expires:b.getResponseHeader("Expires")})}else{const S=new Blob([b.response],{type:b.getResponseHeader("Content-Type")});_(new ae(b.status,b.statusText,o.url,S))}},c.signal.addEventListener("abort",(()=>{b.abort(),_(le())})),b.send(o.body)}))})(n,t)};function ke(n){if(!n||n.indexOf("://")<=0||n.indexOf("data:image/")===0||n.indexOf("blob:")===0)return!0;const t=new URL(n),r=window.location;return t.protocol===r.protocol&&t.host===r.host}function we(n,t,r){r[n]&&r[n].indexOf(t)!==-1||(r[n]=r[n]||[],r[n].push(t))}function Oe(n,t,r){if(r&&r[n]){const o=r[n].indexOf(t);o!==-1&&r[n].splice(o,1)}}class lt{constructor(t,r={}){dt(this,r),this.type=t}}class Ye extends lt{constructor(t,r={}){super("error",dt({error:t},r))}}class kt{on(t,r){return this._listeners=this._listeners||{},we(t,r,this._listeners),{unsubscribe:()=>{this.off(t,r)}}}off(t,r){return Oe(t,r,this._listeners),Oe(t,r,this._oneTimeListeners),this}once(t,r){return r?(this._oneTimeListeners=this._oneTimeListeners||{},we(t,r,this._oneTimeListeners),this):new Promise((o=>this.once(t,o)))}fire(t,r){typeof t=="string"&&(t=new lt(t,r||{}));const o=t.type;if(this.listens(o)){t.target=this;const c=this._listeners&&this._listeners[o]?this._listeners[o].slice():[];for(const v of c)v.call(this,t);const f=this._oneTimeListeners&&this._oneTimeListeners[o]?this._oneTimeListeners[o].slice():[];for(const v of f)Oe(o,v,this._oneTimeListeners),v.call(this,t);const _=this._eventedParent;_&&(dt(t,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),_.fire(t))}else t instanceof Ye&&console.error(t.error);return this}listens(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)}setEventedParent(t,r){return this._eventedParent=t,this._eventedParentData=r,this}}var xe={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},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"},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},"*":{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:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},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","property-type":"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","property-type":"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","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"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"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},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","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},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:"*",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"},"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"]},"property-type":"cross-faded"},"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"},"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"}},"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"}},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"}}};const Ot=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function cr(n,t){const r={};for(const o in n)o!=="ref"&&(r[o]=n[o]);return Ot.forEach((o=>{o in t&&(r[o]=t[o])})),r}function Jt(n,t){if(Array.isArray(n)){if(!Array.isArray(t)||n.length!==t.length)return!1;for(let r=0;r`:n.itemType.kind==="value"?"array":`array<${t}>`}return n.kind}const ma=[mt,He,At,Bt,Kt,Tr,pn,Er,tn(ur),_n,En,sn,pr,In];function pi(n,t){if(t.kind==="error")return null;if(n.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!pi(n.itemType,t.itemType))&&(typeof n.N!="number"||n.N===t.N))return null}else{if(n.kind===t.kind)return null;if(n.kind==="value"){for(const r of ma)if(!pi(r,t))return null}}return`Expected ${en(n)} but found ${en(t)} instead.`}function Xi(n,t){return t.some((r=>r.kind===n.kind))}function Zn(n,t){return t.some((r=>r==="null"?n===null:r==="array"?Array.isArray(n):r==="object"?n&&!Array.isArray(n)&&typeof n=="object":r===typeof n))}function ni(n,t){return n.kind==="array"&&t.kind==="array"?n.itemType.kind===t.itemType.kind&&typeof n.N=="number":n.kind===t.kind}const Zi=.96422,Yi=.82521,Ei=4/29,zi=6/29,Ki=3*zi*zi,oa=zi*zi*zi,Ta=Math.PI/180,bt=180/Math.PI;function Xt(n){return(n%=360)<0&&(n+=360),n}function Br([n,t,r,o]){let c,f;const _=On((.2225045*(n=yn(n))+.7168786*(t=yn(t))+.0606169*(r=yn(r)))/1);n===t&&t===r?c=f=_:(c=On((.4360747*n+.3850649*t+.1430804*r)/Zi),f=On((.0139322*n+.0971045*t+.7141733*r)/Yi));const v=116*_-16;return[v<0?0:v,500*(c-_),200*(_-f),o]}function yn(n){return n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function On(n){return n>oa?Math.pow(n,1/3):n/Ki+Ei}function Yn([n,t,r,o]){let c=(n+16)/116,f=isNaN(t)?c:c+t/500,_=isNaN(r)?c:c-r/200;return c=1*wn(c),f=Zi*wn(f),_=Yi*wn(_),[Vn(3.1338561*f-1.6168667*c-.4906146*_),Vn(-.9787684*f+1.9161415*c+.033454*_),Vn(.0719453*f-.2289914*c+1.4052427*_),o]}function Vn(n){return(n=n<=.00304?12.92*n:1.055*Math.pow(n,1/2.4)-.055)<0?0:n>1?1:n}function wn(n){return n>zi?n*n*n:Ki*(n-Ei)}const Ji=Object.hasOwn||function(n,t){return Object.prototype.hasOwnProperty.call(n,t)};function ar(n,t){return Ji(n,t)?n[t]:void 0}function $t(n){return parseInt(n.padEnd(2,n),16)/255}function Ur(n,t){return or(t?n/100:n,0,1)}function or(n,t,r){return Math.min(Math.max(t,n),r)}function Tn(n){return!n.some(Number.isNaN)}const nn={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 Cn(n,t,r){return n+r*(t-n)}function Gn(n,t,r){return n.map(((o,c)=>Cn(o,t[c],r)))}class Mr{constructor(t,r,o,c=1,f=!0){this.r=t,this.g=r,this.b=o,this.a=c,f||(this.r*=c,this.g*=c,this.b*=c,c||this.overwriteGetter("rgb",[t,r,o,c]))}static parse(t){if(t instanceof Mr)return t;if(typeof t!="string")return;const r=(function(o){if((o=o.toLowerCase().trim())==="transparent")return[0,0,0,0];const c=ar(nn,o);if(c){const[_,v,b]=c;return[_/255,v/255,b/255,1]}if(o.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(o)){const _=o.length<6?1:2;let v=1;return[$t(o.slice(v,v+=_)),$t(o.slice(v,v+=_)),$t(o.slice(v,v+=_)),$t(o.slice(v,v+_)||"ff")]}if(o.startsWith("rgb")){const _=o.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(_){const[v,b,S,I,L,F,q,U,W,J,ce,Re]=_,ye=[I||" ",q||" ",J].join("");if(ye===" "||ye===" /"||ye===",,"||ye===",,,"){const Ce=[S,F,W].join(""),Ke=Ce==="%%%"?100:Ce===""?255:0;if(Ke){const ct=[or(+b/Ke,0,1),or(+L/Ke,0,1),or(+U/Ke,0,1),ce?Ur(+ce,Re):1];if(Tn(ct))return ct}}return}}const f=o.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(f){const[_,v,b,S,I,L,F,q,U]=f,W=[b||" ",I||" ",F].join("");if(W===" "||W===" /"||W===",,"||W===",,,"){const J=[+v,or(+S,0,100),or(+L,0,100),q?Ur(+q,U):1];if(Tn(J))return(function([ce,Re,ye,Ce]){function Ke(ct){const St=(ct+ce/30)%12,Yt=Re*Math.min(ye,1-ye);return ye-Yt*Math.max(-1,Math.min(St-3,9-St,1))}return ce=Xt(ce),Re/=100,ye/=100,[Ke(0),Ke(8),Ke(4),Ce]})(J)}}})(t);return r?new Mr(...r,!1):void 0}get rgb(){const{r:t,g:r,b:o,a:c}=this,f=c||1/0;return this.overwriteGetter("rgb",[t/f,r/f,o/f,c])}get hcl(){return this.overwriteGetter("hcl",(function(t){const[r,o,c,f]=Br(t),_=Math.sqrt(o*o+c*c);return[Math.round(1e4*_)?Xt(Math.atan2(c,o)*bt):NaN,_,r,f]})(this.rgb))}get lab(){return this.overwriteGetter("lab",Br(this.rgb))}overwriteGetter(t,r){return Object.defineProperty(this,t,{value:r}),r}toString(){const[t,r,o,c]=this.rgb;return`rgba(${[t,r,o].map((f=>Math.round(255*f))).join(",")},${c})`}static interpolate(t,r,o,c="rgb"){switch(c){case"rgb":{const[f,_,v,b]=Gn(t.rgb,r.rgb,o);return new Mr(f,_,v,b,!1)}case"hcl":{const[f,_,v,b]=t.hcl,[S,I,L,F]=r.hcl;let q,U;if(isNaN(f)||isNaN(S))isNaN(f)?isNaN(S)?q=NaN:(q=S,v!==1&&v!==0||(U=I)):(q=f,L!==1&&L!==0||(U=_));else{let ye=S-f;S>f&&ye>180?ye-=360:S180&&(ye+=360),q=f+o*ye}const[W,J,ce,Re]=(function([ye,Ce,Ke,ct]){return ye=isNaN(ye)?0:ye*Ta,Yn([Ke,Math.cos(ye)*Ce,Math.sin(ye)*Ce,ct])})([q,U??Cn(_,I,o),Cn(v,L,o),Cn(b,F,o)]);return new Mr(W,J,ce,Re,!1)}case"lab":{const[f,_,v,b]=Yn(Gn(t.lab,r.lab,o));return new Mr(f,_,v,b,!1)}}}}Mr.black=new Mr(0,0,0,1),Mr.white=new Mr(1,1,1,1),Mr.transparent=new Mr(0,0,0,0),Mr.red=new Mr(1,0,0,1);class Mn{constructor(t,r,o){this.sensitivity=t?r?"variant":"case":r?"accent":"base",this.locale=o,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,r){return this.collator.compare(t,r)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}const bn=["bottom","center","top"];class ln{constructor(t,r,o,c,f,_){this.text=t,this.image=r,this.scale=o,this.fontStack=c,this.textColor=f,this.verticalAlign=_}}class Sn{constructor(t){this.sections=t}static fromString(t){return new Sn([new ln(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 Sn?t:Sn.fromString(t)}toString(){return this.sections.length===0?"":this.sections.map((t=>t.text)).join("")}}class kn{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof kn)return t;if(typeof t=="number")return new kn([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(const r of t)if(typeof r!="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 kn(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,o){return new kn(Gn(t.values,r.values,o))}}class gn{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof gn)return t;if(typeof t=="number")return new gn([t]);if(Array.isArray(t)){for(const r of t)if(typeof r!="number")return;return new gn(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,o){return new gn(Gn(t.values,r.values,o))}}class fn{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof fn)return t;if(typeof t=="string"){const o=Mr.parse(t);return o?new fn([o]):void 0}if(!Array.isArray(t))return;const r=[];for(const o of t){if(typeof o!="string")return;const c=Mr.parse(o);if(!c)return;r.push(c)}return new fn(r)}toString(){return JSON.stringify(this.values)}static interpolate(t,r,o,c="rgb"){const f=[];if(t.values.length!=r.values.length)throw new Error(`colorArray: Arrays have mismatched length (${t.values.length} vs. ${r.values.length}), cannot interpolate.`);for(let _=0;_=0&&n<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof r=="number"&&r>=0&&r<=255?o===void 0||typeof o=="number"&&o>=0&&o<=1?null:`Invalid rgba value [${[n,t,r,o].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof o=="number"?[n,t,r,o]:[n,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function qa(n){if(n===null||typeof n=="string"||typeof n=="boolean"||typeof n=="number"||n instanceof jn||n instanceof Mr||n instanceof Mn||n instanceof Sn||n instanceof kn||n instanceof gn||n instanceof fn||n instanceof fi||n instanceof Hn)return!0;if(Array.isArray(n)){for(const t of n)if(!qa(t))return!1;return!0}if(typeof n=="object"){for(const t in n)if(!qa(n[t]))return!1;return!0}return!1}function Rr(n){if(n===null)return mt;if(typeof n=="string")return At;if(typeof n=="boolean")return Bt;if(typeof n=="number")return He;if(n instanceof Mr)return Kt;if(n instanceof jn)return Tr;if(n instanceof Mn)return rn;if(n instanceof Sn)return pn;if(n instanceof kn)return _n;if(n instanceof gn)return En;if(n instanceof fn)return sn;if(n instanceof fi)return In;if(n instanceof Hn)return pr;if(Array.isArray(n)){const t=n.length;let r;for(const o of n){const c=Rr(o);if(r){if(r===c)continue;r=ur;break}r=c}return tn(r||ur,t)}return Er}function $r(n){const t=typeof n;return n===null?"":t==="string"||t==="number"||t==="boolean"?String(n):n instanceof Mr||n instanceof jn||n instanceof Sn||n instanceof kn||n instanceof gn||n instanceof fn||n instanceof fi||n instanceof Hn?n.toString():JSON.stringify(n)}class _a{constructor(t,r){this.type=t,this.value=r}static parse(t,r){if(t.length!==2)return r.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!qa(t[1]))return r.error("invalid value");const o=t[1];let c=Rr(o);const f=r.expectedType;return c.kind!=="array"||c.N!==0||!f||f.kind!=="array"||typeof f.N=="number"&&f.N!==0||(c=f),new _a(c,o)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}const cn={string:At,number:He,boolean:Bt,object:Er};class Li{constructor(t,r){this.type=t,this.args=r}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let o,c=1;const f=t[0];if(f==="array"){let v,b;if(t.length>2){const S=t[1];if(typeof S!="string"||!(S in cn)||S==="object")return r.error('The item type argument of "array" must be one of string, number, boolean',1);v=cn[S],c++}else v=ur;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return r.error('The length argument to "array" must be a positive integer literal',2);b=t[2],c++}o=tn(v,b)}else{if(!cn[f])throw new Error(`Types doesn't contain name = ${f}`);o=cn[f]}const _=[];for(;ct.outputDefined()))}}const ga={"to-boolean":Bt,"to-color":Kt,"to-number":He,"to-string":At};class sa{constructor(t,r){this.type=t,this.args=r}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");const o=t[0];if(!ga[o])throw new Error(`Can't parse ${o} as it is not part of the known types`);if((o==="to-boolean"||o==="to-string")&&t.length!==2)return r.error("Expected one argument.");const c=ga[o],f=[];for(let _=1;_4?`Invalid rgba value ${JSON.stringify(r)}: expected an array containing either three or four numeric values.`:zn(r[0],r[1],r[2],r[3]),!o))return new Mr(r[0]/255,r[1]/255,r[2]/255,r[3])}throw new an(o||`Could not parse color from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"padding":{let r;for(const o of this.args){r=o.evaluate(t);const c=kn.parse(r);if(c)return c}throw new an(`Could not parse padding from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"numberArray":{let r;for(const o of this.args){r=o.evaluate(t);const c=gn.parse(r);if(c)return c}throw new an(`Could not parse numberArray from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"colorArray":{let r;for(const o of this.args){r=o.evaluate(t);const c=fn.parse(r);if(c)return c}throw new an(`Could not parse colorArray from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"variableAnchorOffsetCollection":{let r;for(const o of this.args){r=o.evaluate(t);const c=fi.parse(r);if(c)return c}throw new an(`Could not parse variableAnchorOffsetCollection from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"number":{let r=null;for(const o of this.args){if(r=o.evaluate(t),r===null)return 0;const c=Number(r);if(!isNaN(c))return c}throw new an(`Could not convert ${JSON.stringify(r)} to number.`)}case"formatted":return Sn.fromString($r(this.args[0].evaluate(t)));case"resolvedImage":return Hn.fromString($r(this.args[0].evaluate(t)));case"projectionDefinition":return this.args[0].evaluate(t);default:return $r(this.args[0].evaluate(t))}}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}}const Ja=["Unknown","Point","LineString","Polygon"];class Ms{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"?Ja[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 r=this._parseColorCache.get(t);return r||(r=Mr.parse(t),this._parseColorCache.set(t,r)),r}}class Ca{constructor(t,r,o=[],c,f=new Zr,_=[]){this.registry=t,this.path=o,this.key=o.map((v=>`[${v}]`)).join(""),this.scope=f,this.errors=_,this.expectedType=c,this._isConstant=r}parse(t,r,o,c,f={}){return r?this.concat(r,o,c)._parse(t,f):this._parse(t,f)}_parse(t,r){function o(c,f,_){return _==="assert"?new Li(f,[c]):_==="coerce"?new sa(f,[c]):c}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 c=t[0];if(typeof c!="string")return this.error(`Expression name must be a string, but found ${typeof c} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const f=this.registry[c];if(f){let _=f.parse(t,this);if(!_)return null;if(this.expectedType){const v=this.expectedType,b=_.type;if(v.kind!=="string"&&v.kind!=="number"&&v.kind!=="boolean"&&v.kind!=="object"&&v.kind!=="array"||b.kind!=="value"){if(v.kind==="projectionDefinition"&&["string","array"].includes(b.kind)||["color","formatted","resolvedImage"].includes(v.kind)&&["value","string"].includes(b.kind)||["padding","numberArray"].includes(v.kind)&&["value","number","array"].includes(b.kind)||v.kind==="colorArray"&&["value","string","array"].includes(b.kind)||v.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(b.kind))_=o(_,v,r.typeAnnotation||"coerce");else if(this.checkSubtype(v,b))return null}else _=o(_,v,r.typeAnnotation||"assert")}if(!(_ instanceof _a)&&_.type.kind!=="resolvedImage"&&this._isConstant(_)){const v=new Ms;try{_=new _a(_.type,_.evaluate(v))}catch(b){return this.error(b.message),null}}return _}return this.error(`Unknown expression "${c}". 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,r,o){const c=typeof t=="number"?this.path.concat(t):this.path,f=o?this.scope.concat(o):this.scope;return new Ca(this.registry,this._isConstant,c,r||null,f,this.errors)}error(t,...r){const o=`${this.key}${r.map((c=>`[${c}]`)).join("")}`;this.errors.push(new Yr(o,t))}checkSubtype(t,r){const o=pi(t,r);return o&&this.error(o),o}}class Qa{constructor(t,r){this.type=r.type,this.bindings=[].concat(t),this.result=r}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const r of this.bindings)t(r[1]);t(this.result)}static parse(t,r){if(t.length<4)return r.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const o=[];for(let f=1;f=o.length)throw new an(`Array index out of bounds: ${r} > ${o.length-1}.`);if(r!==Math.floor(r))throw new an(`Array index must be an integer, but found ${r} instead.`);return o[r]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}}class vl{constructor(t,r){this.type=Bt,this.needle=t,this.haystack=r}static parse(t,r){if(t.length!==3)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const o=r.parse(t[1],1,ur),c=r.parse(t[2],2,ur);return o&&c?Xi(o.type,[Bt,At,He,mt,ur])?new vl(o,c):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${en(o.type)} instead`):null}evaluate(t){const r=this.needle.evaluate(t),o=this.haystack.evaluate(t);if(!o)return!1;if(!Zn(r,["boolean","string","number","null"]))throw new an(`Expected first argument to be of type boolean, string, number or null, but found ${en(Rr(r))} instead.`);if(!Zn(o,["string","array"]))throw new an(`Expected second argument to be of type array or string, but found ${en(Rr(o))} instead.`);return o.indexOf(r)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}}class Sa{constructor(t,r,o){this.type=He,this.needle=t,this.haystack=r,this.fromIndex=o}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const o=r.parse(t[1],1,ur),c=r.parse(t[2],2,ur);if(!o||!c)return null;if(!Xi(o.type,[Bt,At,He,mt,ur]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${en(o.type)} instead`);if(t.length===4){const f=r.parse(t[3],3,He);return f?new Sa(o,c,f):null}return new Sa(o,c)}evaluate(t){const r=this.needle.evaluate(t),o=this.haystack.evaluate(t);if(!Zn(r,["boolean","string","number","null"]))throw new an(`Expected first argument to be of type boolean, string, number or null, but found ${en(Rr(r))} instead.`);let c;if(this.fromIndex&&(c=this.fromIndex.evaluate(t)),Zn(o,["string"])){const f=o.indexOf(r,c);return f===-1?-1:[...o.slice(0,f)].length}if(Zn(o,["array"]))return o.indexOf(r,c);throw new an(`Expected second argument to be of type array or string, but found ${en(Rr(o))} instead.`)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}}class Ti{constructor(t,r,o,c,f,_){this.inputType=t,this.type=r,this.input=o,this.cases=c,this.outputs=f,this.otherwise=_}static parse(t,r){if(t.length<5)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return r.error("Expected an even number of arguments.");let o,c;r.expectedType&&r.expectedType.kind!=="value"&&(c=r.expectedType);const f={},_=[];for(let S=2;SNumber.MAX_SAFE_INTEGER)return F.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof U=="number"&&Math.floor(U)!==U)return F.error("Numeric branch labels must be integer values.");if(o){if(F.checkSubtype(o,Rr(U)))return null}else o=Rr(U);if(f[String(U)]!==void 0)return F.error("Branch labels must be unique.");f[String(U)]=_.length}const q=r.parse(L,S,c);if(!q)return null;c=c||q.type,_.push(q)}const v=r.parse(t[1],1,ur);if(!v)return null;const b=r.parse(t[t.length-1],t.length-1,c);return b?v.type.kind!=="value"&&r.concat(1).checkSubtype(o,v.type)?null:new Ti(o,c,v,f,_,b):null}evaluate(t){const r=this.input.evaluate(t);return(Rr(r)===this.inputType&&this.outputs[this.cases[r]]||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 Qo{constructor(t,r,o){this.type=t,this.branches=r,this.otherwise=o}static parse(t,r){if(t.length<4)return r.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return r.error("Expected an odd number of arguments.");let o;r.expectedType&&r.expectedType.kind!=="value"&&(o=r.expectedType);const c=[];for(let _=1;_r.outputDefined()))&&this.otherwise.outputDefined()}}class ks{constructor(t,r,o,c){this.type=t,this.input=r,this.beginIndex=o,this.endIndex=c}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const o=r.parse(t[1],1,ur),c=r.parse(t[2],2,He);if(!o||!c)return null;if(!Xi(o.type,[tn(ur),At,ur]))return r.error(`Expected first argument to be of type array or string, but found ${en(o.type)} instead`);if(t.length===4){const f=r.parse(t[3],3,He);return f?new ks(o.type,o,c,f):null}return new ks(o.type,o,c)}evaluate(t){const r=this.input.evaluate(t),o=this.beginIndex.evaluate(t);let c;if(this.endIndex&&(c=this.endIndex.evaluate(t)),Zn(r,["string"]))return[...r].slice(o,c).join("");if(Zn(r,["array"]))return r.slice(o,c);throw new an(`Expected first argument to be of type array or string, but found ${en(Rr(r))} instead.`)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}}function Mo(n,t){const r=n.length-1;let o,c,f=0,_=r,v=0;for(;f<=_;)if(v=Math.floor((f+_)/2),o=n[v],c=n[v+1],o<=t){if(v===r||tt))throw new an("Input is not a number.");_=v-1}return 0}class ei{constructor(t,r,o){this.type=t,this.input=r,this.labels=[],this.outputs=[];for(const[c,f]of o)this.labels.push(c),this.outputs.push(f)}static parse(t,r){if(t.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return r.error("Expected an even number of arguments.");const o=r.parse(t[1],1,He);if(!o)return null;const c=[];let f=null;r.expectedType&&r.expectedType.kind!=="value"&&(f=r.expectedType);for(let _=1;_=v)return r.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',S);const L=r.parse(b,I,f);if(!L)return null;f=f||L.type,c.push([v,L])}return new ei(f,o,c)}evaluate(t){const r=this.labels,o=this.outputs;if(r.length===1)return o[0].evaluate(t);const c=this.input.evaluate(t);if(c<=r[0])return o[0].evaluate(t);const f=r.length;return c>=r[f-1]?o[f-1].evaluate(t):o[Mo(r,c)].evaluate(t)}eachChild(t){t(this.input);for(const r of this.outputs)t(r)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}}function Fh(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var As,Ec,bp=(function(){if(Ec)return As;function n(t,r,o,c){this.cx=3*t,this.bx=3*(o-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*r,this.by=3*(c-r)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=o,this.p2y=c}return Ec=1,As=n,n.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,r){if(r===void 0&&(r=1e-6),t<0)return 0;if(t>1)return 1;for(var o=t,c=0;c<8;c++){var f=this.sampleCurveX(o)-t;if(Math.abs(f)f?v=o:b=o,o=.5*(b-v)+v;return o},solve:function(t,r){return this.sampleCurveY(this.solveCurveX(t,r))}},As})(),es=Fh(bp);class Di{constructor(t,r,o,c,f){this.type=t,this.operator=r,this.interpolation=o,this.input=c,this.labels=[],this.outputs=[];for(const[_,v]of f)this.labels.push(_),this.outputs.push(v)}static interpolationFactor(t,r,o,c){let f=0;if(t.name==="exponential")f=Es(r,t.base,o,c);else if(t.name==="linear")f=Es(r,1,o,c);else if(t.name==="cubic-bezier"){const _=t.controlPoints;f=new es(_[0],_[1],_[2],_[3]).solve(Es(r,1,o,c))}return f}static parse(t,r){let[o,c,f,..._]=t;if(!Array.isArray(c)||c.length===0)return r.error("Expected an interpolation type expression.",1);if(c[0]==="linear")c={name:"linear"};else if(c[0]==="exponential"){const S=c[1];if(typeof S!="number")return r.error("Exponential interpolation requires a numeric base.",1,1);c={name:"exponential",base:S}}else{if(c[0]!=="cubic-bezier")return r.error(`Unknown interpolation type ${String(c[0])}`,1,0);{const S=c.slice(1);if(S.length!==4||S.some((I=>typeof I!="number"||I<0||I>1)))return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);c={name:"cubic-bezier",controlPoints:S}}}if(t.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return r.error("Expected an even number of arguments.");if(f=r.parse(f,2,He),!f)return null;const v=[];let b=null;o!=="interpolate-hcl"&&o!=="interpolate-lab"||r.expectedType==sn?r.expectedType&&r.expectedType.kind!=="value"&&(b=r.expectedType):b=Kt;for(let S=0;S<_.length;S+=2){const I=_[S],L=_[S+1],F=S+3,q=S+4;if(typeof I!="number")return r.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',F);if(v.length&&v[v.length-1][0]>=I)return r.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',F);const U=r.parse(L,q,b);if(!U)return null;b=b||U.type,v.push([I,U])}return ni(b,He)||ni(b,Tr)||ni(b,Kt)||ni(b,_n)||ni(b,En)||ni(b,sn)||ni(b,In)||ni(b,tn(He))?new Di(b,o,c,f,v):r.error(`Type ${en(b)} is not interpolatable.`)}evaluate(t){const r=this.labels,o=this.outputs;if(r.length===1)return o[0].evaluate(t);const c=this.input.evaluate(t);if(c<=r[0])return o[0].evaluate(t);const f=r.length;if(c>=r[f-1])return o[f-1].evaluate(t);const _=Mo(r,c),v=Di.interpolationFactor(this.interpolation,c,r[_],r[_+1]),b=o[_].evaluate(t),S=o[_+1].evaluate(t);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return Cn(b,S,v);case"color":return Mr.interpolate(b,S,v);case"padding":return kn.interpolate(b,S,v);case"colorArray":return fn.interpolate(b,S,v);case"numberArray":return gn.interpolate(b,S,v);case"variableAnchorOffsetCollection":return fi.interpolate(b,S,v);case"array":return Gn(b,S,v);case"projectionDefinition":return jn.interpolate(b,S,v)}case"interpolate-hcl":switch(this.type.kind){case"color":return Mr.interpolate(b,S,v,"hcl");case"colorArray":return fn.interpolate(b,S,v,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return Mr.interpolate(b,S,v,"lab");case"colorArray":return fn.interpolate(b,S,v,"lab")}}}eachChild(t){t(this.input);for(const r of this.outputs)t(r)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}}function Es(n,t,r,o){const c=o-r,f=n-r;return c===0?0:t===1?f/c:(Math.pow(t,f)-1)/(Math.pow(t,c)-1)}const Za={color:Mr.interpolate,number:Cn,padding:kn.interpolate,numberArray:gn.interpolate,colorArray:fn.interpolate,variableAnchorOffsetCollection:fi.interpolate,array:Gn};class zs{constructor(t,r){this.type=t,this.args=r}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let o=null;const c=r.expectedType;c&&c.kind!=="value"&&(o=c);const f=[];for(const v of t.slice(1)){const b=r.parse(v,1+f.length,o,void 0,{typeAnnotation:"omit"});if(!b)return null;o=o||b.type,f.push(b)}if(!o)throw new Error("No output type");const _=c&&f.some((v=>pi(c,v.type)));return new zs(_?ur:o,f)}evaluate(t){let r,o=null,c=0;for(const f of this.args)if(c++,o=f.evaluate(t),o&&o instanceof Hn&&!o.available&&(r||(r=o.name),o=null,c===this.args.length&&(o=r)),o!==null)break;return o}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}}function Ls(n,t){return n==="=="||n==="!="?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 Ds(n,t,r,o){return o.compare(t,r)===0}function ji(n,t,r){const o=n!=="=="&&n!=="!=";return class r0{constructor(f,_,v){this.type=Bt,this.lhs=f,this.rhs=_,this.collator=v,this.hasUntypedArgument=f.type.kind==="value"||_.type.kind==="value"}static parse(f,_){if(f.length!==3&&f.length!==4)return _.error("Expected two or three arguments.");const v=f[0];let b=_.parse(f[1],1,ur);if(!b)return null;if(!Ls(v,b.type))return _.concat(1).error(`"${v}" comparisons are not supported for type '${en(b.type)}'.`);let S=_.parse(f[2],2,ur);if(!S)return null;if(!Ls(v,S.type))return _.concat(2).error(`"${v}" comparisons are not supported for type '${en(S.type)}'.`);if(b.type.kind!==S.type.kind&&b.type.kind!=="value"&&S.type.kind!=="value")return _.error(`Cannot compare types '${en(b.type)}' and '${en(S.type)}'.`);o&&(b.type.kind==="value"&&S.type.kind!=="value"?b=new Li(S.type,[b]):b.type.kind!=="value"&&S.type.kind==="value"&&(S=new Li(b.type,[S])));let I=null;if(f.length===4){if(b.type.kind!=="string"&&S.type.kind!=="string"&&b.type.kind!=="value"&&S.type.kind!=="value")return _.error("Cannot use collator to compare non-string types.");if(I=_.parse(f[3],3,rn),!I)return null}return new r0(b,S,I)}evaluate(f){const _=this.lhs.evaluate(f),v=this.rhs.evaluate(f);if(o&&this.hasUntypedArgument){const b=Rr(_),S=Rr(v);if(b.kind!==S.kind||b.kind!=="string"&&b.kind!=="number")throw new an(`Expected arguments for "${n}" to be (string, string) or (number, number), but found (${b.kind}, ${S.kind}) instead.`)}if(this.collator&&!o&&this.hasUntypedArgument){const b=Rr(_),S=Rr(v);if(b.kind!=="string"||S.kind!=="string")return t(f,_,v)}return this.collator?r(f,_,v,this.collator.evaluate(f)):t(f,_,v)}eachChild(f){f(this.lhs),f(this.rhs),this.collator&&f(this.collator)}outputDefined(){return!0}}}const Oh=ji("==",(function(n,t,r){return t===r}),Ds),yl=ji("!=",(function(n,t,r){return t!==r}),(function(n,t,r,o){return!Ds(0,t,r,o)})),wp=ji("<",(function(n,t,r){return t",(function(n,t,r){return t>r}),(function(n,t,r,o){return o.compare(t,r)>0})),Tp=ji("<=",(function(n,t,r){return t<=r}),(function(n,t,r,o){return o.compare(t,r)<=0})),Cp=ji(">=",(function(n,t,r){return t>=r}),(function(n,t,r,o){return o.compare(t,r)>=0}));class xl{constructor(t,r,o){this.type=rn,this.locale=o,this.caseSensitive=t,this.diacriticSensitive=r}static parse(t,r){if(t.length!==2)return r.error("Expected one argument.");const o=t[1];if(typeof o!="object"||Array.isArray(o))return r.error("Collator options argument must be an object.");const c=r.parse(o["case-sensitive"]!==void 0&&o["case-sensitive"],1,Bt);if(!c)return null;const f=r.parse(o["diacritic-sensitive"]!==void 0&&o["diacritic-sensitive"],1,Bt);if(!f)return null;let _=null;return o.locale&&(_=r.parse(o.locale,1,At),!_)?null:new xl(c,f,_)}evaluate(t){return new Mn(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 Lc{constructor(t,r,o,c,f){this.type=At,this.number=t,this.locale=r,this.currency=o,this.minFractionDigits=c,this.maxFractionDigits=f}static parse(t,r){if(t.length!==3)return r.error("Expected two arguments.");const o=r.parse(t[1],1,He);if(!o)return null;const c=t[2];if(typeof c!="object"||Array.isArray(c))return r.error("NumberFormat options argument must be an object.");let f=null;if(c.locale&&(f=r.parse(c.locale,1,At),!f))return null;let _=null;if(c.currency&&(_=r.parse(c.currency,1,At),!_))return null;let v=null;if(c["min-fraction-digits"]&&(v=r.parse(c["min-fraction-digits"],1,He),!v))return null;let b=null;return c["max-fraction-digits"]&&(b=r.parse(c["max-fraction-digits"],1,He),!b)?null:new Lc(o,f,_,v,b)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.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.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}}class ko{constructor(t){this.type=pn,this.sections=t}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");const o=t[1];if(!Array.isArray(o)&&typeof o=="object")return r.error("First argument must be an image or text section.");const c=[];let f=!1;for(let _=1;_<=t.length-1;++_){const v=t[_];if(f&&typeof v=="object"&&!Array.isArray(v)){f=!1;let b=null;if(v["font-scale"]&&(b=r.parse(v["font-scale"],1,He),!b))return null;let S=null;if(v["text-font"]&&(S=r.parse(v["text-font"],1,tn(At)),!S))return null;let I=null;if(v["text-color"]&&(I=r.parse(v["text-color"],1,Kt),!I))return null;let L=null;if(v["vertical-align"]){if(typeof v["vertical-align"]=="string"&&!bn.includes(v["vertical-align"]))return r.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${v["vertical-align"]}' instead.`);if(L=r.parse(v["vertical-align"],1,At),!L)return null}const F=c[c.length-1];F.scale=b,F.font=S,F.textColor=I,F.verticalAlign=L}else{const b=r.parse(t[_],1,ur);if(!b)return null;const S=b.type.kind;if(S!=="string"&&S!=="value"&&S!=="null"&&S!=="resolvedImage")return r.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");f=!0,c.push({content:b,scale:null,font:null,textColor:null,verticalAlign:null})}}return new ko(c)}evaluate(t){return new Sn(this.sections.map((r=>{const o=r.content.evaluate(t);return Rr(o)===pr?new ln("",o,null,null,null,r.verticalAlign?r.verticalAlign.evaluate(t):null):new ln($r(o),null,r.scale?r.scale.evaluate(t):null,r.font?r.font.evaluate(t).join(","):null,r.textColor?r.textColor.evaluate(t):null,r.verticalAlign?r.verticalAlign.evaluate(t):null)})))}eachChild(t){for(const r of this.sections)t(r.content),r.scale&&t(r.scale),r.font&&t(r.font),r.textColor&&t(r.textColor),r.verticalAlign&&t(r.verticalAlign)}outputDefined(){return!1}}class Dc{constructor(t){this.type=pr,this.input=t}static parse(t,r){if(t.length!==2)return r.error("Expected two arguments.");const o=r.parse(t[1],1,At);return o?new Dc(o):r.error("No image name provided.")}evaluate(t){const r=this.input.evaluate(t),o=Hn.fromString(r);return o&&t.availableImages&&(o.available=t.availableImages.indexOf(r)>-1),o}eachChild(t){t(this.input)}outputDefined(){return!1}}class bl{constructor(t){this.type=He,this.input=t}static parse(t,r){if(t.length!==2)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);const o=r.parse(t[1],1);return o?o.type.kind!=="array"&&o.type.kind!=="string"&&o.type.kind!=="value"?r.error(`Expected argument of type string or array, but found ${en(o.type)} instead.`):new bl(o):null}evaluate(t){const r=this.input.evaluate(t);if(typeof r=="string")return[...r].length;if(Array.isArray(r))return r.length;throw new an(`Expected value to be of type string or array, but found ${en(Rr(r))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}}const Pa=8192;function Sp(n,t){const r=(180+n[0])/360,o=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n[1]*Math.PI/360)))/360,c=Math.pow(2,t.z);return[Math.round(r*c*Pa),Math.round(o*c*Pa)]}function wl(n,t){const r=Math.pow(2,t.z);return[(c=(n[0]/Pa+t.x)/r,360*c-180),(o=(n[1]/Pa+t.y)/r,360/Math.PI*Math.atan(Math.exp((180-360*o)*Math.PI/180))-90)];var o,c}function Rs(n,t){n[0]=Math.min(n[0],t[0]),n[1]=Math.min(n[1],t[1]),n[2]=Math.max(n[2],t[0]),n[3]=Math.max(n[3],t[1])}function Bs(n,t){return!(n[0]<=t[0]||n[2]>=t[2]||n[1]<=t[1]||n[3]>=t[3])}function Pp(n,t,r){const o=n[0]-t[0],c=n[1]-t[1],f=n[0]-r[0],_=n[1]-r[1];return o*_-f*c==0&&o*f<=0&&c*_<=0}function Tl(n,t,r,o){return(c=[o[0]-r[0],o[1]-r[1]])[0]*(f=[t[0]-n[0],t[1]-n[1]])[1]-c[1]*f[0]!=0&&!(!jh(n,t,r,o)||!jh(r,o,n,t));var c,f}function Ip(n,t,r){for(const o of r)for(let c=0;c(c=n)[1]!=(_=v[b+1])[1]>c[1]&&c[0]<(_[0]-f[0])*(c[1]-f[1])/(_[1]-f[1])+f[0]&&(o=!o)}var c,f,_;return o}function Nh(n,t){for(const r of t)if(Ao(n,r))return!0;return!1}function Rc(n,t){for(const r of n)if(!Ao(r,t))return!1;for(let r=0;r0&&v<0||_<0&&v>0}function Bc(n,t,r){const o=[];for(let c=0;cr[2]){const c=.5*o;let f=n[0]-r[0]>c?-o:r[0]-n[0]>c?o:0;f===0&&(f=n[0]-r[2]>c?-o:r[2]-n[0]>c?o:0),n[0]+=f}Rs(t,n)}function qh(n,t,r,o){const c=Math.pow(2,o.z)*Pa,f=[o.x*Pa,o.y*Pa],_=[];for(const v of n)for(const b of v){const S=[b.x+f[0],b.y+f[1]];Cl(S,t,r,c),_.push(S)}return _}function Zh(n,t,r,o){const c=Math.pow(2,o.z)*Pa,f=[o.x*Pa,o.y*Pa],_=[];for(const b of n){const S=[];for(const I of b){const L=[I.x+f[0],I.y+f[1]];Rs(t,L),S.push(L)}_.push(S)}if(t[2]-t[0]<=c/2){(v=t)[0]=v[1]=1/0,v[2]=v[3]=-1/0;for(const b of _)for(const S of b)Cl(S,t,r,c)}var v;return _}class Eo{constructor(t,r){this.type=Bt,this.geojson=t,this.geometries=r}static parse(t,r){if(t.length!==2)return r.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(qa(t[1])){const o=t[1];if(o.type==="FeatureCollection"){const c=[];for(const f of o.features){const{type:_,coordinates:v}=f.geometry;_==="Polygon"&&c.push(v),_==="MultiPolygon"&&c.push(...v)}if(c.length)return new Eo(o,{type:"MultiPolygon",coordinates:c})}else if(o.type==="Feature"){const c=o.geometry.type;if(c==="Polygon"||c==="MultiPolygon")return new Eo(o,o.geometry)}else if(o.type==="Polygon"||o.type==="MultiPolygon")return new Eo(o,o)}return r.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(r,o){const c=[1/0,1/0,-1/0,-1/0],f=[1/0,1/0,-1/0,-1/0],_=r.canonicalID();if(o.type==="Polygon"){const v=Bc(o.coordinates,f,_),b=qh(r.geometry(),c,f,_);if(!Bs(c,f))return!1;for(const S of b)if(!Ao(S,v))return!1}if(o.type==="MultiPolygon"){const v=Vh(o.coordinates,f,_),b=qh(r.geometry(),c,f,_);if(!Bs(c,f))return!1;for(const S of b)if(!Nh(S,v))return!1}return!0})(t,this.geometries);if(t.geometryType()==="LineString")return(function(r,o){const c=[1/0,1/0,-1/0,-1/0],f=[1/0,1/0,-1/0,-1/0],_=r.canonicalID();if(o.type==="Polygon"){const v=Bc(o.coordinates,f,_),b=Zh(r.geometry(),c,f,_);if(!Bs(c,f))return!1;for(const S of b)if(!Rc(S,v))return!1}if(o.type==="MultiPolygon"){const v=Vh(o.coordinates,f,_),b=Zh(r.geometry(),c,f,_);if(!Bs(c,f))return!1;for(const S of b)if(!Mp(S,v))return!1}return!0})(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Fc=class{constructor(n=[],t=(r,o)=>ro?1:0){if(this.data=n,this.length=this.data.length,this.compare=t,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(n){this.data.push(n),this._up(this.length++)}pop(){if(this.length===0)return;const n=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),n}peek(){return this.data[0]}_up(n){const{data:t,compare:r}=this,o=t[n];for(;n>0;){const c=n-1>>1,f=t[c];if(r(o,f)>=0)break;t[n]=f,n=c}t[n]=o}_down(n){const{data:t,compare:r}=this,o=this.length>>1,c=t[n];for(;n=0)break;t[n]=t[f],n=f}t[n]=c}};function Oc(n,t,r=0,o=n.length-1,c=kp){for(;o>r;){if(o-r>600){const b=o-r+1,S=t-r+1,I=Math.log(b),L=.5*Math.exp(2*I/3),F=.5*Math.sqrt(I*L*(b-L)/b)*(S-b/2<0?-1:1);Oc(n,t,Math.max(r,Math.floor(t-S*L/b+F)),Math.min(o,Math.floor(t+(b-S)*L/b+F)),c)}const f=n[t];let _=r,v=o;for(Fs(n,r,t),c(n[o],f)>0&&Fs(n,r,o);_0;)v--}c(n[r],f)===0?Fs(n,r,v):(v++,Fs(n,v,o)),v<=t&&(r=v+1),t<=v&&(o=v-1)}}function Fs(n,t,r){const o=n[t];n[t]=n[r],n[r]=o}function kp(n,t){return nt?1:0}function Os(n,t){if(n.length<=1)return[n];const r=[];let o,c;for(const f of n){const _=Ap(f);_!==0&&(f.area=Math.abs(_),c===void 0&&(c=_<0),c===_<0?(o&&r.push(o),o=[f]):o.push(f))}if(o&&r.push(o),t>1)for(let f=0;f1?(S=t[b+1][0],I=t[b+1][1]):q>0&&(S+=L/this.kx*q,I+=F/this.ky*q)),L=this.wrap(r[0]-S)*this.kx,F=(r[1]-I)*this.ky;const U=L*L+F*F;U180;)t-=360;return t}}function Hh(n,t){return t[0]-n[0]}function Sl(n){return n[1]-n[0]+1}function eo(n,t){return n[1]>=n[0]&&n[1]n[1])return[null,null];const r=Sl(n);if(t){if(r===2)return[n,null];const c=Math.floor(r/2);return[[n[0],n[0]+c],[n[0]+c,n[1]]]}if(r===1)return[n,null];const o=Math.floor(r/2)-1;return[[n[0],n[0]+o],[n[0]+o+1,n[1]]]}function Vc(n,t){if(!eo(t,n.length))return[1/0,1/0,-1/0,-1/0];const r=[1/0,1/0,-1/0,-1/0];for(let o=t[0];o<=t[1];++o)Rs(r,n[o]);return r}function qc(n){const t=[1/0,1/0,-1/0,-1/0];for(const r of n)for(const o of r)Rs(t,o);return t}function Wh(n){return n[0]!==-1/0&&n[1]!==-1/0&&n[2]!==1/0&&n[3]!==1/0}function Zc(n,t,r){if(!Wh(n)||!Wh(t))return NaN;let o=0,c=0;return n[2]t[2]&&(o=n[0]-t[2]),n[1]>t[3]&&(c=n[1]-t[3]),n[3]=o)return o;if(Bs(c,f)){if(Xh(n,t))return 0}else if(Xh(t,n))return 0;let _=1/0;for(const v of n)for(let b=0,S=v.length,I=S-1;b0;){const b=_.pop();if(b[0]>=f)continue;const S=b[1],I=t?50:100;if(Sl(S)<=I){if(!eo(S,n.length))return NaN;if(t){const L=Dp(n,S,r,o);if(isNaN(L)||L===0)return L;f=Math.min(f,L)}else for(let L=S[0];L<=S[1];++L){const F=Lp(n[L],r,o);if(f=Math.min(f,F),f===0)return 0}}else{const L=Pn(S,t);Yh(_,f,o,n,v,L[0]),Yh(_,f,o,n,v,L[1])}}return f}function Ml(n,t,r,o,c,f=1/0){let _=Math.min(f,c.distance(n[0],r[0]));if(_===0)return _;const v=new Fc([[0,[0,n.length-1],[0,r.length-1]]],Hh);for(;v.length>0;){const b=v.pop();if(b[0]>=_)continue;const S=b[1],I=b[2],L=t?50:100,F=o?50:100;if(Sl(S)<=L&&Sl(I)<=F){if(!eo(S,n.length)&&eo(I,r.length))return NaN;let q;if(t&&o)q=Ep(n,S,r,I,c),_=Math.min(_,q);else if(t&&!o){const U=n.slice(S[0],S[1]+1);for(let W=I[0];W<=I[1];++W)if(q=zo(r[W],U,c),_=Math.min(_,q),_===0)return _}else if(!t&&o){const U=r.slice(I[0],I[1]+1);for(let W=S[0];W<=S[1];++W)if(q=zo(n[W],U,c),_=Math.min(_,q),_===0)return _}else q=zp(n,S,r,I,c),_=Math.min(_,q)}else{const q=Pn(S,t),U=Pn(I,o);Pl(v,_,c,n,r,q[0],U[0]),Pl(v,_,c,n,r,q[0],U[1]),Pl(v,_,c,n,r,q[1],U[0]),Pl(v,_,c,n,r,q[1],U[1])}}return _}function $c(n){return n.type==="MultiPolygon"?n.coordinates.map((t=>({type:"Polygon",coordinates:t}))):n.type==="MultiLineString"?n.coordinates.map((t=>({type:"LineString",coordinates:t}))):n.type==="MultiPoint"?n.coordinates.map((t=>({type:"Point",coordinates:t}))):[n]}class Lo{constructor(t,r){this.type=He,this.geojson=t,this.geometries=r}static parse(t,r){if(t.length!==2)return r.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`);if(qa(t[1])){const o=t[1];if(o.type==="FeatureCollection")return new Lo(o,o.features.map((c=>$c(c.geometry))).flat());if(o.type==="Feature")return new Lo(o,$c(o.geometry));if("type"in o&&"coordinates"in o)return new Lo(o,$c(o))}return r.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(r,o){const c=r.geometry(),f=c.flat().map((b=>wl([b.x,b.y],r.canonical)));if(c.length===0)return NaN;const _=new jc(f[0][1]);let v=1/0;for(const b of o){switch(b.type){case"Point":v=Math.min(v,Ml(f,!1,[b.coordinates],!1,_,v));break;case"LineString":v=Math.min(v,Ml(f,!1,b.coordinates,!0,_,v));break;case"Polygon":v=Math.min(v,Il(f,!1,b.coordinates,_,v))}if(v===0)return v}return v})(t,this.geometries);if(t.geometryType()==="LineString")return(function(r,o){const c=r.geometry(),f=c.flat().map((b=>wl([b.x,b.y],r.canonical)));if(c.length===0)return NaN;const _=new jc(f[0][1]);let v=1/0;for(const b of o){switch(b.type){case"Point":v=Math.min(v,Ml(f,!0,[b.coordinates],!1,_,v));break;case"LineString":v=Math.min(v,Ml(f,!0,b.coordinates,!0,_,v));break;case"Polygon":v=Math.min(v,Il(f,!0,b.coordinates,_,v))}if(v===0)return v}return v})(t,this.geometries);if(t.geometryType()==="Polygon")return(function(r,o){const c=r.geometry();if(c.length===0||c[0].length===0)return NaN;const f=Os(c,0).map((b=>b.map((S=>S.map((I=>wl([I.x,I.y],r.canonical))))))),_=new jc(f[0][0][0][1]);let v=1/0;for(const b of o)for(const S of f){switch(b.type){case"Point":v=Math.min(v,Il([b.coordinates],!1,S,_,v));break;case"LineString":v=Math.min(v,Il(b.coordinates,!0,S,_,v));break;case"Polygon":v=Math.min(v,Rp(S,b.coordinates,_,v))}if(v===0)return v}return v})(t,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class Ns{constructor(t){this.type=ur,this.key=t}static parse(t,r){if(t.length!==2)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);const o=t[1];return o==null?r.error("Global state property must be defined."):typeof o!="string"?r.error(`Global state property must be string, but found ${typeof t[1]} instead.`):new Ns(o)}evaluate(t){var r;const o=(r=t.globals)===null||r===void 0?void 0:r.globalState;return o&&Object.keys(o).length!==0?ar(o,this.key):null}eachChild(){}outputDefined(){return!1}}const ts={"==":Oh,"!=":yl,">":zc,"<":wp,">=":Cp,"<=":Tp,array:Li,at:gl,boolean:Li,case:Qo,coalesce:zs,collator:xl,format:ko,image:Dc,in:vl,"index-of":Sa,interpolate:Di,"interpolate-hcl":Di,"interpolate-lab":Di,length:bl,let:Qa,literal:_a,match:Ti,number:Li,"number-format":Lc,object:Li,slice:ks,step:ei,string:Li,"to-boolean":sa,"to-color":sa,"to-number":sa,"to-string":sa,var:Jo,within:Eo,distance:Lo,"global-state":Ns};class va{constructor(t,r,o,c){this.name=t,this.type=r,this._evaluate=o,this.args=c}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}static parse(t,r){const o=t[0],c=va.definitions[o];if(!c)return r.error(`Unknown expression "${o}". If you wanted a literal array, use ["literal", [...]].`,0);const f=Array.isArray(c)?c[0]:c.type,_=Array.isArray(c)?[[c[1],c[2]]]:c.overloads,v=_.filter((([S])=>!Array.isArray(S)||S.length===t.length-1));let b=null;for(const[S,I]of v){b=new Ca(r.registry,kl,r.path,null,r.scope);const L=[];let F=!1;for(let q=1;q{return F=L,Array.isArray(F)?`(${F.map(en).join(", ")})`:`(${en(F.type)}...)`;var F})).join(" | "),I=[];for(let L=1;L{r=t?r&&kl(o):r&&o instanceof _a})),!!r&&Al(n)&&El(n,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function Al(n){if(n instanceof va&&(n.name==="get"&&n.args.length===1||n.name==="feature-state"||n.name==="has"&&n.args.length===1||n.name==="properties"||n.name==="geometry-type"||n.name==="id"||/^filter-/.test(n.name))||n instanceof Eo||n instanceof Lo)return!1;let t=!0;return n.eachChild((r=>{t&&!Al(r)&&(t=!1)})),t}function js(n){if(n instanceof va&&n.name==="feature-state")return!1;let t=!0;return n.eachChild((r=>{t&&!js(r)&&(t=!1)})),t}function El(n,t){if(n instanceof va&&t.indexOf(n.name)>=0)return!1;let r=!0;return n.eachChild((o=>{r&&!El(o,t)&&(r=!1)})),r}function Qh(n){return{result:"success",value:n}}function rs(n){return{result:"error",value:n}}function fo(n){return n["property-type"]==="data-driven"||n["property-type"]==="cross-faded-data-driven"}function ed(n){return!!n.expression&&n.expression.parameters.indexOf("zoom")>-1}function Hc(n){return!!n.expression&&n.expression.interpolated}function on(n){return n instanceof Number?"number":n instanceof String?"string":n instanceof Boolean?"boolean":Array.isArray(n)?"array":n===null?"null":typeof n}function Vs(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)&&Rr(n)===Er}function Bp(n){return n}function td(n,t){const r=n.stops&&typeof n.stops[0][0]=="object",o=r||!(r||n.property!==void 0),c=n.type||(Hc(t)?"exponential":"interval"),f=(function(I){switch(I.type){case"color":return Mr.parse;case"padding":return kn.parse;case"numberArray":return gn.parse;case"colorArray":return fn.parse;default:return null}})(t);if(f&&((n=Wr({},n)).stops&&(n.stops=n.stops.map((I=>[I[0],f(I[1])]))),n.default=f(n.default?n.default:t.default)),n.colorSpace&&(_=n.colorSpace)!=="rgb"&&_!=="hcl"&&_!=="lab")throw new Error(`Unknown color space: "${n.colorSpace}"`);var _;const v=(function(I){switch(I){case"exponential":return nd;case"interval":return Fp;case"categorical":return rd;case"identity":return Op;default:throw new Error(`Unknown function type "${I}"`)}})(c);let b,S;if(c==="categorical"){b=Object.create(null);for(const I of n.stops)b[I[0]]=I[1];S=typeof n.stops[0][0]}if(r){const I={},L=[];for(let U=0;UU[0])),evaluate:({zoom:U},W)=>nd({stops:F,base:n.base},t,U).evaluate(U,W)}}if(o){const I=c==="exponential"?{name:"exponential",base:n.base!==void 0?n.base:1}:null;return{kind:"camera",interpolationType:I,interpolationFactor:Di.interpolationFactor.bind(void 0,I),zoomStops:n.stops.map((L=>L[0])),evaluate:({zoom:L})=>v(n,t,L,b,S)}}return{kind:"source",evaluate(I,L){const F=L&&L.properties?L.properties[n.property]:void 0;return F===void 0?mo(n.default,t.default):v(n,t,F,b,S)}}}function mo(n,t,r){return n!==void 0?n:t!==void 0?t:r!==void 0?r:void 0}function rd(n,t,r,o,c){return mo(typeof r===c?o[r]:void 0,n.default,t.default)}function Fp(n,t,r){if(on(r)!=="number")return mo(n.default,t.default);const o=n.stops.length;if(o===1||r<=n.stops[0][0])return n.stops[0][1];if(r>=n.stops[o-1][0])return n.stops[o-1][1];const c=Mo(n.stops.map((f=>f[0])),r);return n.stops[c][1]}function nd(n,t,r){const o=n.base!==void 0?n.base:1;if(on(r)!=="number")return mo(n.default,t.default);const c=n.stops.length;if(c===1||r<=n.stops[0][0])return n.stops[0][1];if(r>=n.stops[c-1][0])return n.stops[c-1][1];const f=Mo(n.stops.map((I=>I[0])),r),_=(function(I,L,F,q){const U=q-F,W=I-F;return U===0?0:L===1?W/U:(Math.pow(L,W)-1)/(Math.pow(L,U)-1)})(r,o,n.stops[f][0],n.stops[f+1][0]),v=n.stops[f][1],b=n.stops[f+1][1],S=Za[t.type]||Bp;return typeof v.evaluate=="function"?{evaluate(...I){const L=v.evaluate.apply(void 0,I),F=b.evaluate.apply(void 0,I);if(L!==void 0&&F!==void 0)return S(L,F,_,n.colorSpace)}}:S(v,b,_,n.colorSpace)}function Op(n,t,r){switch(t.type){case"color":r=Mr.parse(r);break;case"formatted":r=Sn.fromString(r.toString());break;case"resolvedImage":r=Hn.fromString(r.toString());break;case"padding":r=kn.parse(r);break;case"colorArray":r=fn.parse(r);break;case"numberArray":r=gn.parse(r);break;default:on(r)===t.type||t.type==="enum"&&t.values[r]||(r=void 0)}return mo(r,n.default,t.default)}va.register(ts,{error:[{kind:"error"},[At],(n,[t])=>{throw new an(t.evaluate(n))}],typeof:[At,[ur],(n,[t])=>en(Rr(t.evaluate(n)))],"to-rgba":[tn(He,4),[Kt],(n,[t])=>{const[r,o,c,f]=t.evaluate(n).rgb;return[255*r,255*o,255*c,f]}],rgb:[Kt,[He,He,He],Kh],rgba:[Kt,[He,He,He,He],Kh],has:{type:Bt,overloads:[[[At],(n,[t])=>Jh(t.evaluate(n),n.properties())],[[At,Er],(n,[t,r])=>Jh(t.evaluate(n),r.evaluate(n))]]},get:{type:ur,overloads:[[[At],(n,[t])=>Gc(t.evaluate(n),n.properties())],[[At,Er],(n,[t,r])=>Gc(t.evaluate(n),r.evaluate(n))]]},"feature-state":[ur,[At],(n,[t])=>Gc(t.evaluate(n),n.featureState||{})],properties:[Er,[],n=>n.properties()],"geometry-type":[At,[],n=>n.geometryType()],id:[ur,[],n=>n.id()],zoom:[He,[],n=>n.globals.zoom],"heatmap-density":[He,[],n=>n.globals.heatmapDensity||0],elevation:[He,[],n=>n.globals.elevation||0],"line-progress":[He,[],n=>n.globals.lineProgress||0],accumulated:[ur,[],n=>n.globals.accumulated===void 0?null:n.globals.accumulated],"+":[He,Do(He),(n,t)=>{let r=0;for(const o of t)r+=o.evaluate(n);return r}],"*":[He,Do(He),(n,t)=>{let r=1;for(const o of t)r*=o.evaluate(n);return r}],"-":{type:He,overloads:[[[He,He],(n,[t,r])=>t.evaluate(n)-r.evaluate(n)],[[He],(n,[t])=>-t.evaluate(n)]]},"/":[He,[He,He],(n,[t,r])=>t.evaluate(n)/r.evaluate(n)],"%":[He,[He,He],(n,[t,r])=>t.evaluate(n)%r.evaluate(n)],ln2:[He,[],()=>Math.LN2],pi:[He,[],()=>Math.PI],e:[He,[],()=>Math.E],"^":[He,[He,He],(n,[t,r])=>Math.pow(t.evaluate(n),r.evaluate(n))],sqrt:[He,[He],(n,[t])=>Math.sqrt(t.evaluate(n))],log10:[He,[He],(n,[t])=>Math.log(t.evaluate(n))/Math.LN10],ln:[He,[He],(n,[t])=>Math.log(t.evaluate(n))],log2:[He,[He],(n,[t])=>Math.log(t.evaluate(n))/Math.LN2],sin:[He,[He],(n,[t])=>Math.sin(t.evaluate(n))],cos:[He,[He],(n,[t])=>Math.cos(t.evaluate(n))],tan:[He,[He],(n,[t])=>Math.tan(t.evaluate(n))],asin:[He,[He],(n,[t])=>Math.asin(t.evaluate(n))],acos:[He,[He],(n,[t])=>Math.acos(t.evaluate(n))],atan:[He,[He],(n,[t])=>Math.atan(t.evaluate(n))],min:[He,Do(He),(n,t)=>Math.min(...t.map((r=>r.evaluate(n))))],max:[He,Do(He),(n,t)=>Math.max(...t.map((r=>r.evaluate(n))))],abs:[He,[He],(n,[t])=>Math.abs(t.evaluate(n))],round:[He,[He],(n,[t])=>{const r=t.evaluate(n);return r<0?-Math.round(-r):Math.round(r)}],floor:[He,[He],(n,[t])=>Math.floor(t.evaluate(n))],ceil:[He,[He],(n,[t])=>Math.ceil(t.evaluate(n))],"filter-==":[Bt,[At,ur],(n,[t,r])=>n.properties()[t.value]===r.value],"filter-id-==":[Bt,[ur],(n,[t])=>n.id()===t.value],"filter-type-==":[Bt,[At],(n,[t])=>n.geometryType()===t.value],"filter-<":[Bt,[At,ur],(n,[t,r])=>{const o=n.properties()[t.value],c=r.value;return typeof o==typeof c&&o{const r=n.id(),o=t.value;return typeof r==typeof o&&r":[Bt,[At,ur],(n,[t,r])=>{const o=n.properties()[t.value],c=r.value;return typeof o==typeof c&&o>c}],"filter-id->":[Bt,[ur],(n,[t])=>{const r=n.id(),o=t.value;return typeof r==typeof o&&r>o}],"filter-<=":[Bt,[At,ur],(n,[t,r])=>{const o=n.properties()[t.value],c=r.value;return typeof o==typeof c&&o<=c}],"filter-id-<=":[Bt,[ur],(n,[t])=>{const r=n.id(),o=t.value;return typeof r==typeof o&&r<=o}],"filter->=":[Bt,[At,ur],(n,[t,r])=>{const o=n.properties()[t.value],c=r.value;return typeof o==typeof c&&o>=c}],"filter-id->=":[Bt,[ur],(n,[t])=>{const r=n.id(),o=t.value;return typeof r==typeof o&&r>=o}],"filter-has":[Bt,[ur],(n,[t])=>t.value in n.properties()],"filter-has-id":[Bt,[],n=>n.id()!==null&&n.id()!==void 0],"filter-type-in":[Bt,[tn(At)],(n,[t])=>t.value.indexOf(n.geometryType())>=0],"filter-id-in":[Bt,[tn(ur)],(n,[t])=>t.value.indexOf(n.id())>=0],"filter-in-small":[Bt,[At,tn(ur)],(n,[t,r])=>r.value.indexOf(n.properties()[t.value])>=0],"filter-in-large":[Bt,[At,tn(ur)],(n,[t,r])=>(function(o,c,f,_){for(;f<=_;){const v=f+_>>1;if(c[v]===o)return!0;c[v]>o?_=v-1:f=v+1}return!1})(n.properties()[t.value],r.value,0,r.value.length-1)],all:{type:Bt,overloads:[[[Bt,Bt],(n,[t,r])=>t.evaluate(n)&&r.evaluate(n)],[Do(Bt),(n,t)=>{for(const r of t)if(!r.evaluate(n))return!1;return!0}]]},any:{type:Bt,overloads:[[[Bt,Bt],(n,[t,r])=>t.evaluate(n)||r.evaluate(n)],[Do(Bt),(n,t)=>{for(const r of t)if(r.evaluate(n))return!0;return!1}]]},"!":[Bt,[Bt],(n,[t])=>!t.evaluate(n)],"is-supported-script":[Bt,[At],(n,[t])=>{const r=n.globals&&n.globals.isSupportedScript;return!r||r(t.evaluate(n))}],upcase:[At,[At],(n,[t])=>t.evaluate(n).toUpperCase()],downcase:[At,[At],(n,[t])=>t.evaluate(n).toLowerCase()],concat:[At,Do(ur),(n,t)=>t.map((r=>$r(r.evaluate(n)))).join("")],"resolved-locale":[At,[rn],(n,[t])=>t.evaluate(n).resolvedLocale()]});class Wc{constructor(t,r){this.expression=t,this._warningHistory={},this._evaluator=new Ms,this._defaultValue=r?(function(o){if(o.type==="color"&&Vs(o.default))return new Mr(0,0,0,0);switch(o.type){case"color":return Mr.parse(o.default)||null;case"padding":return kn.parse(o.default)||null;case"numberArray":return gn.parse(o.default)||null;case"colorArray":return fn.parse(o.default)||null;case"variableAnchorOffsetCollection":return fi.parse(o.default)||null;case"projectionDefinition":return jn.parse(o.default)||null;default:return o.default===void 0?null:o.default}})(r):null,this._enumValues=r&&r.type==="enum"?r.values:null}evaluateWithoutErrorHandling(t,r,o,c,f,_){return this._evaluator.globals=t,this._evaluator.feature=r,this._evaluator.featureState=o,this._evaluator.canonical=c,this._evaluator.availableImages=f||null,this._evaluator.formattedSection=_,this.expression.evaluate(this._evaluator)}evaluate(t,r,o,c,f,_){this._evaluator.globals=t,this._evaluator.feature=r||null,this._evaluator.featureState=o||null,this._evaluator.canonical=c,this._evaluator.availableImages=f||null,this._evaluator.formattedSection=_||null;try{const v=this.expression.evaluate(this._evaluator);if(v==null||typeof v=="number"&&v!=v)return this._defaultValue;if(this._enumValues&&!(v in this._enumValues))throw new an(`Expected value to be one of ${Object.keys(this._enumValues).map((b=>JSON.stringify(b))).join(", ")}, but found ${JSON.stringify(v)} instead.`);return v}catch(v){return this._warningHistory[v.message]||(this._warningHistory[v.message]=!0,typeof console<"u"&&console.warn(v.message)),this._defaultValue}}}function zl(n){return Array.isArray(n)&&n.length>0&&typeof n[0]=="string"&&n[0]in ts}function qs(n,t){const r=new Ca(ts,kl,[],t?(function(c){const f={color:Kt,string:At,number:He,enum:At,boolean:Bt,formatted:pn,padding:_n,numberArray:En,colorArray:sn,projectionDefinition:Tr,resolvedImage:pr,variableAnchorOffsetCollection:In};return c.type==="array"?tn(f[c.value]||ur,c.length):f[c.type]})(t):void 0),o=r.parse(n,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return o?Qh(new Wc(o,t)):rs(r.errors)}class Zs{constructor(t,r){this.kind=t,this._styleExpression=r,this.isStateDependent=t!=="constant"&&!js(r.expression),this.globalStateRefs=Gs(r.expression)}evaluateWithoutErrorHandling(t,r,o,c,f,_){return this._styleExpression.evaluateWithoutErrorHandling(t,r,o,c,f,_)}evaluate(t,r,o,c,f,_){return this._styleExpression.evaluate(t,r,o,c,f,_)}}class Xc{constructor(t,r,o,c){this.kind=t,this.zoomStops=o,this._styleExpression=r,this.isStateDependent=t!=="camera"&&!js(r.expression),this.globalStateRefs=Gs(r.expression),this.interpolationType=c}evaluateWithoutErrorHandling(t,r,o,c,f,_){return this._styleExpression.evaluateWithoutErrorHandling(t,r,o,c,f,_)}evaluate(t,r,o,c,f,_){return this._styleExpression.evaluate(t,r,o,c,f,_)}interpolationFactor(t,r,o){return this.interpolationType?Di.interpolationFactor(this.interpolationType,t,r,o):0}}function id(n,t){const r=qs(n,t);if(r.result==="error")return r;const o=r.value.expression,c=Al(o);if(!c&&!fo(t))return rs([new Yr("","data expressions not supported")]);const f=El(o,["zoom"]);if(!f&&!ed(t))return rs([new Yr("","zoom expressions not supported")]);const _=$s(o);return _||f?_ instanceof Yr?rs([_]):_ instanceof Di&&!Hc(t)?rs([new Yr("",'"interpolate" expressions cannot be used with this property')]):Qh(_?new Xc(c?"camera":"composite",r.value,_.labels,_ instanceof Di?_.interpolation:void 0):new Zs(c?"constant":"source",r.value)):rs([new Yr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Us{constructor(t,r){this._parameters=t,this._specification=r,Wr(this,td(this._parameters,this._specification))}static deserialize(t){return new Us(t._parameters,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification}}}function $s(n){let t=null;if(n instanceof Qa)t=$s(n.result);else if(n instanceof zs){for(const r of n.args)if(t=$s(r),t)break}else(n instanceof ei||n instanceof Di)&&n.input instanceof va&&n.input.name==="zoom"&&(t=n);return t instanceof Yr||n.eachChild((r=>{const o=$s(r);o instanceof Yr?t=o:!t&&o?t=new Yr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&o&&t!==o&&(t=new Yr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),t}function Gs(n,t=new Set){return n instanceof Ns&&t.add(n.key),n.eachChild((r=>{Gs(r,t)})),t}function Ll(n){if(n===!0||n===!1)return!0;if(!Array.isArray(n)||n.length===0)return!1;switch(n[0]){case"has":return n.length>=2&&n[1]!=="$id"&&n[1]!=="$type";case"in":return n.length>=3&&(typeof n[1]!="string"||Array.isArray(n[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return n.length!==3||Array.isArray(n[1])||Array.isArray(n[2]);case"any":case"all":for(const t of n.slice(1))if(!Ll(t)&&typeof t!="boolean")return!1;return!0;default:return!0}}const Yc={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Ro(n){if(n==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};Ll(n)||(n=Bo(n));const t=qs(n,Yc);if(t.result==="error")throw new Error(t.value.map((r=>`${r.key}: ${r.message}`)).join(", "));return{filter:(r,o,c)=>t.value.evaluate(r,o,{},c),needGeometry:Dl(n),getGlobalStateRefs:()=>Gs(t.value.expression)}}function Kc(n,t){return nt?1:0}function Dl(n){if(!Array.isArray(n))return!1;if(n[0]==="within"||n[0]==="distance")return!0;for(let t=1;t"||t==="<="||t===">="?Jc(n[1],n[2],t):t==="any"?(r=n.slice(1),["any"].concat(r.map(Bo))):t==="all"?["all"].concat(n.slice(1).map(Bo)):t==="none"?["all"].concat(n.slice(1).map(Bo).map(Rl)):t==="in"?ad(n[1],n.slice(2)):t==="!in"?Rl(ad(n[1],n.slice(2))):t==="has"?od(n[1]):t!=="!has"||Rl(od(n[1]));var r}function Jc(n,t,r){switch(n){case"$type":return[`filter-type-${r}`,t];case"$id":return[`filter-id-${r}`,t];default:return[`filter-${r}`,n,t]}}function ad(n,t){if(t.length===0)return!1;switch(n){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((r=>typeof r!=typeof t[0]))?["filter-in-large",n,["literal",t.sort(Kc)]]:["filter-in-small",n,["literal",t]]}}function od(n){switch(n){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",n]}}function Rl(n){return["!",n]}function Qc(n){const t=typeof n;if(t==="number"||t==="boolean"||t==="string"||n==null)return JSON.stringify(n);if(Array.isArray(n)){let c="[";for(const f of n)c+=`${Qc(f)},`;return`${c}]`}const r=Object.keys(n).sort();let o="{";for(let c=0;co.maximum?[new ht(t,r,`${r} is greater than the maximum value ${o.maximum}`)]:[]}function sd(n){const t=n.valueSpec,r=Kn(n.value.type);let o,c,f,_={};const v=r!=="categorical"&&n.value.property===void 0,b=!v,S=on(n.value.stops)==="array"&&on(n.value.stops[0])==="array"&&on(n.value.stops[0][0])==="object",I=ya({key:n.key,value:n.value,valueSpec:n.styleSpec.function,validateSpec:n.validateSpec,style:n.style,styleSpec:n.styleSpec,objectElementValidators:{stops:function(q){if(r==="identity")return[new ht(q.key,q.value,'identity function may not have a "stops" property')];let U=[];const W=q.value;return U=U.concat(Bl({key:q.key,value:W,valueSpec:q.valueSpec,validateSpec:q.validateSpec,style:q.style,styleSpec:q.styleSpec,arrayElementValidator:L})),on(W)==="array"&&W.length===0&&U.push(new ht(q.key,W,"array must have at least one stop")),U},default:function(q){return q.validateSpec({key:q.key,value:q.value,valueSpec:t,validateSpec:q.validateSpec,style:q.style,styleSpec:q.styleSpec})}}});return r==="identity"&&v&&I.push(new ht(n.key,n.value,'missing required property "property"')),r==="identity"||n.value.stops||I.push(new ht(n.key,n.value,'missing required property "stops"')),r==="exponential"&&n.valueSpec.expression&&!Hc(n.valueSpec)&&I.push(new ht(n.key,n.value,"exponential functions not supported")),n.styleSpec.$version>=8&&(b&&!fo(n.valueSpec)?I.push(new ht(n.key,n.value,"property functions not supported")):v&&!ed(n.valueSpec)&&I.push(new ht(n.key,n.value,"zoom functions not supported"))),r!=="categorical"&&!S||n.value.property!==void 0||I.push(new ht(n.key,n.value,'"property" property is required')),I;function L(q){let U=[];const W=q.value,J=q.key;if(on(W)!=="array")return[new ht(J,W,`array expected, ${on(W)} found`)];if(W.length!==2)return[new ht(J,W,`array length 2 expected, length ${W.length} found`)];if(S){if(on(W[0])!=="object")return[new ht(J,W,`object expected, ${on(W[0])} found`)];if(W[0].zoom===void 0)return[new ht(J,W,"object stop key must have zoom")];if(W[0].value===void 0)return[new ht(J,W,"object stop key must have value")];if(f&&f>Kn(W[0].zoom))return[new ht(J,W[0].zoom,"stop zoom values must appear in ascending order")];Kn(W[0].zoom)!==f&&(f=Kn(W[0].zoom),c=void 0,_={}),U=U.concat(ya({key:`${J}[0]`,value:W[0],valueSpec:{zoom:{}},validateSpec:q.validateSpec,style:q.style,styleSpec:q.styleSpec,objectElementValidators:{zoom:Hs,value:F}}))}else U=U.concat(F({key:`${J}[0]`,value:W[0],validateSpec:q.validateSpec,style:q.style,styleSpec:q.styleSpec},W));return zl(Ua(W[1]))?U.concat([new ht(`${J}[1]`,W[1],"expressions are not allowed in function stops.")]):U.concat(q.validateSpec({key:`${J}[1]`,value:W[1],valueSpec:t,validateSpec:q.validateSpec,style:q.style,styleSpec:q.styleSpec}))}function F(q,U){const W=on(q.value),J=Kn(q.value),ce=q.value!==null?q.value:U;if(o){if(W!==o)return[new ht(q.key,ce,`${W} stop domain type must match previous stop domain type ${o}`)]}else o=W;if(W!=="number"&&W!=="string"&&W!=="boolean")return[new ht(q.key,ce,"stop domain value must be a number, string, or boolean")];if(W!=="number"&&r!=="categorical"){let Re=`number expected, ${W} found`;return fo(t)&&r===void 0&&(Re+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new ht(q.key,ce,Re)]}return r!=="categorical"||W!=="number"||isFinite(J)&&Math.floor(J)===J?r!=="categorical"&&W==="number"&&c!==void 0&&Jnew ht(`${n.key}${o.key}`,n.value,o.message)));const r=t.value.expression||t.value._styleExpression.expression;if(n.expressionContext==="property"&&n.propertyKey==="text-font"&&!r.outputDefined())return[new ht(n.key,n.value,`Invalid data expression for "${n.propertyKey}". Output values must be contained as literals within the expression.`)];if(n.expressionContext==="property"&&n.propertyType==="layout"&&!js(r))return[new ht(n.key,n.value,'"feature-state" data expressions are not supported with layout properties.')];if(n.expressionContext==="filter"&&!js(r))return[new ht(n.key,n.value,'"feature-state" data expressions are not supported with filters.')];if(n.expressionContext&&n.expressionContext.indexOf("cluster")===0){if(!El(r,["zoom","feature-state"]))return[new ht(n.key,n.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(n.expressionContext==="cluster-initial"&&!Al(r))return[new ht(n.key,n.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Fl(n){const t=n.key,r=n.value,o=on(r);return o!=="string"?[new ht(t,r,`color expected, ${o} found`)]:Mr.parse(String(r))?[]:[new ht(t,r,`color expected, "${r}" found`)]}function to(n){const t=n.key,r=n.value,o=n.valueSpec,c=[];return Array.isArray(o.values)?o.values.indexOf(Kn(r))===-1&&c.push(new ht(t,r,`expected one of [${o.values.join(", ")}], ${JSON.stringify(r)} found`)):Object.keys(o.values).indexOf(Kn(r))===-1&&c.push(new ht(t,r,`expected one of [${Object.keys(o.values).join(", ")}], ${JSON.stringify(r)} found`)),c}function tu(n){return Ll(Ua(n.value))?Fo(Wr({},n,{expressionContext:"filter",valueSpec:{value:"boolean"}})):ld(n)}function ld(n){const t=n.value,r=n.key;if(on(t)!=="array")return[new ht(r,t,`array expected, ${on(t)} found`)];const o=n.styleSpec;let c,f=[];if(t.length<1)return[new ht(r,t,"filter array must have at least 1 element")];switch(f=f.concat(to({key:`${r}[0]`,value:t[0],valueSpec:o.filter_operator,style:n.style,styleSpec:n.styleSpec})),Kn(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&Kn(t[1])==="$type"&&f.push(new ht(r,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":t.length!==3&&f.push(new ht(r,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(c=on(t[1]),c!=="string"&&f.push(new ht(`${r}[1]`,t[1],`string expected, ${c} found`)));for(let _=2;_{S in r&&t.push(new ht(o,r[S],`"${S}" is prohibited for ref layers`))})),c.layers.forEach((S=>{Kn(S.id)===v&&(b=S)})),b?b.ref?t.push(new ht(o,r.ref,"ref cannot reference another ref layer")):_=Kn(b.type):t.push(new ht(o,r.ref,`ref layer "${v}" not found`))}else if(_!=="background")if(r.source){const b=c.sources&&c.sources[r.source],S=b&&Kn(b.type);b?S==="vector"&&_==="raster"?t.push(new ht(o,r.source,`layer "${r.id}" requires a raster source`)):S!=="raster-dem"&&_==="hillshade"||S!=="raster-dem"&&_==="color-relief"?t.push(new ht(o,r.source,`layer "${r.id}" requires a raster-dem source`)):S==="raster"&&_!=="raster"?t.push(new ht(o,r.source,`layer "${r.id}" requires a vector source`)):S!=="vector"||r["source-layer"]?S==="raster-dem"&&_!=="hillshade"&&_!=="color-relief"?t.push(new ht(o,r.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):_!=="line"||!r.paint||!r.paint["line-gradient"]||S==="geojson"&&b.lineMetrics||t.push(new ht(o,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new ht(o,r,`layer "${r.id}" must specify a "source-layer"`)):t.push(new ht(o,r.source,`source "${r.source}" not found`))}else t.push(new ht(o,r,'missing required property "source"'));return t=t.concat(ya({key:o,value:r,valueSpec:f.layer,style:n.style,styleSpec:n.styleSpec,validateSpec:n.validateSpec,objectElementValidators:{"*":()=>[],type:()=>n.validateSpec({key:`${o}.type`,value:r.type,valueSpec:f.layer.type,style:n.style,styleSpec:n.styleSpec,validateSpec:n.validateSpec,object:r,objectKey:"type"}),filter:tu,layout:b=>ya({layer:r,key:b.key,value:b.value,style:b.style,styleSpec:b.styleSpec,validateSpec:b.validateSpec,objectElementValidators:{"*":S=>hd(Wr({layerType:_},S))}}),paint:b=>ya({layer:r,key:b.key,value:b.value,style:b.style,styleSpec:b.styleSpec,validateSpec:b.validateSpec,objectElementValidators:{"*":S=>ud(Wr({layerType:_},S))}})}})),t}function Ia(n){const t=n.value,r=n.key,o=on(t);return o!=="string"?[new ht(r,t,`string expected, ${o} found`)]:[]}const ns={promoteId:function({key:n,value:t}){if(on(t)==="string")return Ia({key:n,value:t});{const r=[];for(const o in t)r.push(...Ia({key:`${n}.${o}`,value:t[o]}));return r}}};function Qi(n){const t=n.value,r=n.key,o=n.styleSpec,c=n.style,f=n.validateSpec;if(!t.type)return[new ht(r,t,'"type" is required')];const _=Kn(t.type);let v;switch(_){case"vector":case"raster":return v=ya({key:r,value:t,valueSpec:o[`source_${_.replace("-","_")}`],style:n.style,styleSpec:o,objectElementValidators:ns,validateSpec:f}),v;case"raster-dem":return v=(function(b){var S;const I=(S=b.sourceName)!==null&&S!==void 0?S:"",L=b.value,F=b.styleSpec,q=F.source_raster_dem,U=b.style;let W=[];const J=on(L);if(L===void 0)return W;if(J!=="object")return W.push(new ht("source_raster_dem",L,`object expected, ${J} found`)),W;const ce=Kn(L.encoding)==="custom",Re=["redFactor","greenFactor","blueFactor","baseShift"],ye=b.value.encoding?`"${b.value.encoding}"`:"Default";for(const Ce in L)!ce&&Re.includes(Ce)?W.push(new ht(Ce,L[Ce],`In "${I}": "${Ce}" is only valid when "encoding" is set to "custom". ${ye} encoding found`)):q[Ce]?W=W.concat(b.validateSpec({key:Ce,value:L[Ce],valueSpec:q[Ce],validateSpec:b.validateSpec,style:U,styleSpec:F})):W.push(new ht(Ce,L[Ce],`unknown property "${Ce}"`));return W})({sourceName:r,value:t,style:n.style,styleSpec:o,validateSpec:f}),v;case"geojson":if(v=ya({key:r,value:t,valueSpec:o.source_geojson,style:c,styleSpec:o,validateSpec:f,objectElementValidators:ns}),t.cluster)for(const b in t.clusterProperties){const[S,I]=t.clusterProperties[b],L=typeof S=="string"?[S,["accumulated"],["get",b]]:S;v.push(...Fo({key:`${r}.${b}.map`,value:I,expressionContext:"cluster-map"})),v.push(...Fo({key:`${r}.${b}.reduce`,value:L,expressionContext:"cluster-reduce"}))}return v;case"video":return ya({key:r,value:t,valueSpec:o.source_video,style:c,validateSpec:f,styleSpec:o});case"image":return ya({key:r,value:t,valueSpec:o.source_image,style:c,validateSpec:f,styleSpec:o});case"canvas":return[new ht(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return to({key:`${r}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function is(n){const t=n.value,r=n.styleSpec,o=r.light,c=n.style;let f=[];const _=on(t);if(t===void 0)return f;if(_!=="object")return f=f.concat([new ht("light",t,`object expected, ${_} found`)]),f;for(const v in t){const b=v.match(/^(.*)-transition$/);f=f.concat(b&&o[b[1]]&&o[b[1]].transition?n.validateSpec({key:v,value:t[v],valueSpec:r.transition,validateSpec:n.validateSpec,style:c,styleSpec:r}):o[v]?n.validateSpec({key:v,value:t[v],valueSpec:o[v],validateSpec:n.validateSpec,style:c,styleSpec:r}):[new ht(v,t[v],`unknown property "${v}"`)])}return f}function ru(n){const t=n.value,r=n.styleSpec,o=r.sky,c=n.style,f=on(t);if(t===void 0)return[];if(f!=="object")return[new ht("sky",t,`object expected, ${f} found`)];let _=[];for(const v in t)_=_.concat(o[v]?n.validateSpec({key:v,value:t[v],valueSpec:o[v],style:c,styleSpec:r}):[new ht(v,t[v],`unknown property "${v}"`)]);return _}function pd(n){const t=n.value,r=n.styleSpec,o=r.terrain,c=n.style;let f=[];const _=on(t);if(t===void 0)return f;if(_!=="object")return f=f.concat([new ht("terrain",t,`object expected, ${_} found`)]),f;for(const v in t)f=f.concat(o[v]?n.validateSpec({key:v,value:t[v],valueSpec:o[v],validateSpec:n.validateSpec,style:c,styleSpec:r}):[new ht(v,t[v],`unknown property "${v}"`)]);return f}function fd(n){let t=[];const r=n.value,o=n.key;if(Array.isArray(r)){const c=[],f=[];for(const _ in r)r[_].id&&c.includes(r[_].id)&&t.push(new ht(o,r,`all the sprites' ids must be unique, but ${r[_].id} is duplicated`)),c.push(r[_].id),r[_].url&&f.includes(r[_].url)&&t.push(new ht(o,r,`all the sprites' URLs must be unique, but ${r[_].url} is duplicated`)),f.push(r[_].url),t=t.concat(ya({key:`${o}[${_}]`,value:r[_],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:n.validateSpec}));return t}return Ia({key:o,value:r})}function as(n){return t=n.value,t&&t.constructor===Object?[]:[new ht(n.key,n.value,`object expected, ${on(n.value)} found`)];var t}const nu={"*":()=>[],array:Bl,boolean:function(n){const t=n.value,r=n.key,o=on(t);return o!=="boolean"?[new ht(r,t,`boolean expected, ${o} found`)]:[]},number:Hs,color:Fl,constants:eu,enum:to,filter:tu,function:sd,layer:dd,object:ya,source:Qi,light:is,sky:ru,terrain:pd,projection:function(n){const t=n.value,r=n.styleSpec,o=r.projection,c=n.style,f=on(t);if(t===void 0)return[];if(f!=="object")return[new ht("projection",t,`object expected, ${f} found`)];let _=[];for(const v in t)_=_.concat(o[v]?n.validateSpec({key:v,value:t[v],valueSpec:o[v],style:c,styleSpec:r}):[new ht(v,t[v],`unknown property "${v}"`)]);return _},projectionDefinition:function(n){const t=n.key;let r=n.value;r=r instanceof String?r.valueOf():r;const o=on(r);return o!=="array"||(function(c){return Array.isArray(c)&&c.length===3&&typeof c[0]=="string"&&typeof c[1]=="string"&&typeof c[2]=="number"})(r)||(function(c){return!!["interpolate","step","literal"].includes(c[0])})(r)?["array","string"].includes(o)?[]:[new ht(t,r,`projection expected, invalid type "${o}" found`)]:[new ht(t,r,`projection expected, invalid array ${JSON.stringify(r)} found`)]},string:Ia,formatted:function(n){return Ia(n).length===0?[]:Fo(n)},resolvedImage:function(n){return Ia(n).length===0?[]:Fo(n)},padding:function(n){const t=n.key,r=n.value;if(on(r)==="array"){if(r.length<1||r.length>4)return[new ht(t,r,`padding requires 1 to 4 values; ${r.length} values found`)];const o={type:"number"};let c=[];for(let f=0;f[]}})),n.constants&&(r=r.concat(eu({key:"constants",value:n.constants}))),ss(r)}function Ma(n){return function(t){return n({...t,validateSpec:os})}}function ss(n){return[].concat(n).sort(((t,r)=>t.line-r.line))}function ka(n){return function(...t){return ss(n.apply(this,t))}}ea.source=ka(Ma(Qi)),ea.sprite=ka(Ma(fd)),ea.glyphs=ka(Ma(md)),ea.light=ka(Ma(is)),ea.sky=ka(Ma(ru)),ea.terrain=ka(Ma(pd)),ea.state=ka(Ma(as)),ea.layer=ka(Ma(dd)),ea.filter=ka(Ma(tu)),ea.paintProperty=ka(Ma(ud)),ea.layoutProperty=ka(Ma(hd));const ls=ea,jp=ls.light,Ws=ls.sky,Vp=ls.paintProperty,qp=ls.layoutProperty;function Xs(n,t){let r=!1;if(t&&t.length)for(const o of t)n.fire(new Ye(new Error(o.message))),r=!0;return r}class Ys{constructor(t,r,o){const c=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;const _=new Int32Array(this.arrayBuffer);t=_[0],this.d=(r=_[1])+2*(o=_[2]);for(let b=0;b=L[U+0]&&c>=L[U+1])?(v[q]=!0,_.push(I[q])):v[q]=!1}}}}_forEachCell(t,r,o,c,f,_,v,b){const S=this._convertToCellCoord(t),I=this._convertToCellCoord(r),L=this._convertToCellCoord(o),F=this._convertToCellCoord(c);for(let q=S;q<=L;q++)for(let U=I;U<=F;U++){const W=this.d*U+q;if((!b||b(this._convertFromCellCoord(q),this._convertFromCellCoord(U),this._convertFromCellCoord(q+1),this._convertFromCellCoord(U+1)))&&f.call(this,t,r,o,c,W,_,v,b))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,r=3+this.cells.length+1+1;let o=0;for(let _=0;_=0)continue;const _=n[f];c[f]=Aa[r].shallow.indexOf(f)>=0?_:cs(_,t)}n instanceof Error&&(c.message=n.message)}if(c.$name)throw new Error("$name property is reserved for worker serialization logic.");return r!=="Object"&&(c.$name=r),c}function Oo(n){if(au(n))return n;if(Array.isArray(n))return n.map(Oo);if(typeof n!="object")throw new Error("can't deserialize object of type "+typeof n);const t=Ol(n)||"Object";if(!Aa[t])throw new Error(`can't deserialize unregistered class ${t}`);const{klass:r}=Aa[t];if(!r)throw new Error(`can't deserialize unregistered class ${t}`);if(r.deserialize)return r.deserialize(n);const o=Object.create(r.prototype);for(const c of Object.keys(n)){if(c==="$name")continue;const f=n[c];o[c]=Aa[t].shallow.indexOf(c)>=0?f:Oo(f)}return o}class Nl{constructor(){this.first=!0}update(t,r){const o=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=o,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=o,!0):(this.lastFloorZoom>o?(this.lastIntegerZoom=o+1,this.lastIntegerZoomTime=r):this.lastFloorZoomn>=128&&n<=255,"Hangul Jamo":n=>n>=4352&&n<=4607,Khmer:n=>n>=6016&&n<=6143,"General Punctuation":n=>n>=8192&&n<=8303,"Letterlike Symbols":n=>n>=8448&&n<=8527,"Number Forms":n=>n>=8528&&n<=8591,"Miscellaneous Technical":n=>n>=8960&&n<=9215,"Control Pictures":n=>n>=9216&&n<=9279,"Optical Character Recognition":n=>n>=9280&&n<=9311,"Enclosed Alphanumerics":n=>n>=9312&&n<=9471,"Geometric Shapes":n=>n>=9632&&n<=9727,"Miscellaneous Symbols":n=>n>=9728&&n<=9983,"Miscellaneous Symbols and Arrows":n=>n>=11008&&n<=11263,"Ideographic Description Characters":n=>n>=12272&&n<=12287,"CJK Symbols and Punctuation":n=>n>=12288&&n<=12351,Hiragana:n=>n>=12352&&n<=12447,Katakana:n=>n>=12448&&n<=12543,Kanbun:n=>n>=12688&&n<=12703,"CJK Strokes":n=>n>=12736&&n<=12783,"Enclosed CJK Letters and Months":n=>n>=12800&&n<=13055,"CJK Compatibility":n=>n>=13056&&n<=13311,"Yijing Hexagram Symbols":n=>n>=19904&&n<=19967,"CJK Unified Ideographs":n=>n>=19968&&n<=40959,"Hangul Syllables":n=>n>=44032&&n<=55215,"Private Use Area":n=>n>=57344&&n<=63743,"Vertical Forms":n=>n>=65040&&n<=65055,"CJK Compatibility Forms":n=>n>=65072&&n<=65103,"Small Form Variants":n=>n>=65104&&n<=65135,"Halfwidth and Fullwidth Forms":n=>n>=65280&&n<=65519};function jl(n){for(const t of n)if(su(t.charCodeAt(0)))return!0;return!1}function Zp(n){for(const t of n)if(!_d(t.charCodeAt(0)))return!1;return!0}function Vl(n){const t=n.map((r=>{try{return new RegExp(`\\p{sc=${r}}`,"u").source}catch{return null}})).filter((r=>r));return new RegExp(t.join("|"),"u")}const Up=Vl(["Arab","Dupl","Mong","Ougr","Syrc"]);function _d(n){return!Up.test(String.fromCodePoint(n))}const ou=Vl(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function su(n){return!(n!==746&&n!==747&&(n<4352||!(un["CJK Compatibility Forms"](n)&&!(n>=65097&&n<=65103)||un["CJK Compatibility"](n)||un["CJK Strokes"](n)||!(!un["CJK Symbols and Punctuation"](n)||n>=12296&&n<=12305||n>=12308&&n<=12319||n===12336)||un["Enclosed CJK Letters and Months"](n)||un["Ideographic Description Characters"](n)||un.Kanbun(n)||un.Katakana(n)&&n!==12540||!(!un["Halfwidth and Fullwidth Forms"](n)||n===65288||n===65289||n===65293||n>=65306&&n<=65310||n===65339||n===65341||n===65343||n>=65371&&n<=65503||n===65507||n>=65512&&n<=65519)||!(!un["Small Form Variants"](n)||n>=65112&&n<=65118||n>=65123&&n<=65126)||un["Vertical Forms"](n)||un["Yijing Hexagram Symbols"](n)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(n))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(n))||ou.test(String.fromCodePoint(n)))))}function gd(n){return!(su(n)||(function(t){return!!(un["Latin-1 Supplement"](t)&&(t===167||t===169||t===174||t===177||t===188||t===189||t===190||t===215||t===247)||un["General Punctuation"](t)&&(t===8214||t===8224||t===8225||t===8240||t===8241||t===8251||t===8252||t===8258||t===8263||t===8264||t===8265||t===8273)||un["Letterlike Symbols"](t)||un["Number Forms"](t)||un["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||t===9003||t>=9085&&t<=9114||t>=9150&&t<=9165||t===9167||t>=9169&&t<=9179||t>=9186&&t<=9215)||un["Control Pictures"](t)&&t!==9251||un["Optical Character Recognition"](t)||un["Enclosed Alphanumerics"](t)||un["Geometric Shapes"](t)||un["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||un["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||un["CJK Symbols and Punctuation"](t)||un.Katakana(t)||un["Private Use Area"](t)||un["CJK Compatibility Forms"](t)||un["Small Form Variants"](t)||un["Halfwidth and Fullwidth Forms"](t)||t===8734||t===8756||t===8757||t>=9984&&t<=10087||t>=10102&&t<=10131||t===65532||t===65533)})(n))}const vd=Vl(["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 lu(n){return vd.test(String.fromCodePoint(n))}function yd(n,t){return!(!t&&lu(n)||n>=2304&&n<=3583||n>=3840&&n<=4255||un.Khmer(n))}function xd(n){for(const t of n)if(lu(t.charCodeAt(0)))return!0;return!1}const Ea=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(n){this.pluginStatus=n.pluginStatus,this.pluginURL=n.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(n){if(Ea.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=n.applyArabicShaping,this.processBidirectionalText=n.processBidirectionalText,this.processStyledBidirectionalText=n.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(n,t){return s(this,void 0,void 0,(function*(){if(this.isParsed())return this.getState();if(n.pluginStatus!=="loading")return this.setState(n),n;const r=n.pluginURL,o=new Promise((f=>{this.loadScriptResolve=f}));t(r);const c=new Promise((f=>setTimeout((()=>f()),this.TIMEOUT)));if(yield Promise.race([o,c]),this.isParsed()){const f={pluginStatus:"loaded",pluginURL:r};return this.setState(f),f}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${r}`)}))}};class Un{constructor(t,r){this.zoom=t,r?(this.now=r.now||0,this.fadeDuration=r.fadeDuration||0,this.zoomHistory=r.zoomHistory||new Nl,this.transition=r.transition||{},this.globalState=r.globalState||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Nl,this.transition={},this.globalState={})}isSupportedScript(t){return(function(r,o){for(const c of r)if(!yd(c.charCodeAt(0),o))return!1;return!0})(t,Ea.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const t=this.zoom,r=t-Math.floor(t),o=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:r+(1-r)*o}:{fromScale:.5,toScale:1,t:1-(1-o)*r}}}class us{constructor(t,r){this.property=t,this.value=r,this.expression=(function(o,c){if(Vs(o))return new Us(o,c);if(zl(o)){const f=id(o,c);if(f.result==="error")throw new Error(f.value.map((_=>`${_.key}: ${_.message}`)).join(", "));return f.value}{let f=o;return c.type==="color"&&typeof o=="string"?f=Mr.parse(o):c.type!=="padding"||typeof o!="number"&&!Array.isArray(o)?c.type!=="numberArray"||typeof o!="number"&&!Array.isArray(o)?c.type!=="colorArray"||typeof o!="string"&&!Array.isArray(o)?c.type==="variableAnchorOffsetCollection"&&Array.isArray(o)?f=fi.parse(o):c.type==="projectionDefinition"&&typeof o=="string"&&(f=jn.parse(o)):f=fn.parse(o):f=gn.parse(o):f=kn.parse(o),{globalStateRefs:new Set,kind:"constant",evaluate:()=>f}}})(r===void 0?t.specification.default:r,t.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(t,r,o){return this.property.possiblyEvaluate(this,t,r,o)}}class cu{constructor(t){this.property=t,this.value=new us(t,void 0)}transitioned(t,r){return new uu(this.property,this.value,r,dt({},t.transition,this.transition),t.now)}untransitioned(){return new uu(this.property,this.value,null,{},0)}}class bd{constructor(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)}getValue(t){return wt(this._values[t].value.value)}setValue(t,r){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new cu(this._values[t].property)),this._values[t].value=new us(this._values[t].property,r===null?void 0:wt(r))}getTransition(t){return wt(this._values[t].transition)}setTransition(t,r){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new cu(this._values[t].property)),this._values[t].transition=wt(r)||void 0}serialize(){const t={};for(const r of Object.keys(this._values)){const o=this.getValue(r);o!==void 0&&(t[r]=o);const c=this.getTransition(r);c!==void 0&&(t[`${r}-transition`]=c)}return t}transitioned(t,r){const o=new hu(this._properties);for(const c of Object.keys(this._values))o._values[c]=this._values[c].transitioned(t,r._values[c]);return o}untransitioned(){const t=new hu(this._properties);for(const r of Object.keys(this._values))t._values[r]=this._values[r].untransitioned();return t}}class uu{constructor(t,r,o,c,f){this.property=t,this.value=r,this.begin=f+c.delay||0,this.end=this.begin+c.duration||0,t.specification.transition&&(c.delay||c.duration)&&(this.prior=o)}possiblyEvaluate(t,r,o){const c=t.now||0,f=this.value.possiblyEvaluate(t,r,o),_=this.prior;if(_){if(c>this.end)return this.prior=null,f;if(this.value.isDataDriven())return this.prior=null,f;if(cc.zoomHistory.lastIntegerZoom?{from:t,to:r}:{from:o,to:r}}interpolate(t){return t}}class _o{constructor(t){this.specification=t}possiblyEvaluate(t,r,o,c){if(t.value!==void 0){if(t.expression.kind==="constant"){const f=t.expression.evaluate(r,null,{},o,c);return this._calculate(f,f,f,r)}return this._calculate(t.expression.evaluate(new Un(Math.floor(r.zoom-1),r)),t.expression.evaluate(new Un(Math.floor(r.zoom),r)),t.expression.evaluate(new Un(Math.floor(r.zoom+1),r)),r)}}_calculate(t,r,o,c){return c.zoom>c.zoomHistory.lastIntegerZoom?{from:t,to:r}:{from:o,to:r}}interpolate(t){return t}}class Ul{constructor(t){this.specification=t}possiblyEvaluate(t,r,o,c){return!!t.expression.evaluate(r,null,{},o,c)}interpolate(){return!1}}class Ui{constructor(t){this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const r in t){const o=t[r];o.specification.overridable&&this.overridableProperties.push(r);const c=this.defaultPropertyValues[r]=new us(o,void 0),f=this.defaultTransitionablePropertyValues[r]=new cu(o);this.defaultTransitioningPropertyValues[r]=f.untransitioned(),this.defaultPossiblyEvaluatedValues[r]=c.possiblyEvaluate({})}}}nr("DataDrivenProperty",Or),nr("DataConstantProperty",br),nr("CrossFadedDataDrivenProperty",Zl),nr("CrossFadedProperty",_o),nr("ColorRampProperty",Ul);const Td="-transition";class xa extends kt{constructor(t,r){if(super(),this.id=t.id,this.type=t.type,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},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=Ro(t.filter)),r.layout&&(this._unevaluatedLayout=new wd(r.layout)),r.paint)){this._transitionablePaint=new bd(r.paint);for(const o in t.paint)this.setPaintProperty(o,t.paint[o],{validate:!1});for(const o in t.layout)this.setLayoutProperty(o,t.layout[o],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new ql(r.paint)}}setFilter(t){this.filter=t,this._featureFilter=Ro(t)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(t){return t==="visibility"?this.visibility:this._unevaluatedLayout.getValue(t)}getLayoutAffectingGlobalStateRefs(){const t=new Set;if(this._unevaluatedLayout)for(const r in this._unevaluatedLayout._values){const o=this._unevaluatedLayout._values[r];for(const c of o.getGlobalStateRefs())t.add(c)}for(const r of this._featureFilter.getGlobalStateRefs())t.add(r);return t}setLayoutProperty(t,r,o={}){r!=null&&this._validate(qp,`layers.${this.id}.layout.${t}`,t,r,o)||(t!=="visibility"?this._unevaluatedLayout.setValue(t,r):this.visibility=r)}getPaintProperty(t){return t.endsWith(Td)?this._transitionablePaint.getTransition(t.slice(0,-11)):this._transitionablePaint.getValue(t)}setPaintProperty(t,r,o={}){if(r!=null&&this._validate(Vp,`layers.${this.id}.paint.${t}`,t,r,o))return!1;if(t.endsWith(Td))return this._transitionablePaint.setTransition(t.slice(0,-11),r||void 0),!1;{const c=this._transitionablePaint._values[t],f=c.property.specification["property-type"]==="cross-faded-data-driven",_=c.value.isDataDriven(),v=c.value;this._transitionablePaint.setValue(t,r),this._handleSpecialPaintPropertyUpdate(t);const b=this._transitionablePaint._values[t].value;return b.isDataDriven()||_||f||this._handleOverridablePaintPropertyUpdate(t,v,b)}}_handleSpecialPaintPropertyUpdate(t){}_handleOverridablePaintPropertyUpdate(t,r,o){return!1}isHidden(t){return!!(this.minzoom&&t=this.maxzoom)||this.visibility==="none"}updateTransitions(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(t,r){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,r)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,r)}serialize(){const t={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:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),It(t,((r,o)=>!(r===void 0||o==="layout"&&!Object.keys(r).length||o==="paint"&&!Object.keys(r).length)))}_validate(t,r,o,c,f={}){return(!f||f.validate!==!1)&&Xs(this,t.call(ls,{key:r,layerType:this.type,objectKey:o,value:c,styleSpec:xe,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const t in this.paint._values){const r=this.paint.get(t);if(r instanceof $a&&fo(r.property.specification)&&(r.value.kind==="source"||r.value.kind==="composite")&&r.value.isStateDependent)return!0}return!1}}const $p={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Ks{constructor(t,r){this._structArray=t,this._pos1=r*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Dn{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(t,r){return t._trim(),r&&(t.isTransferred=!0,r.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}static deserialize(t){const r=Object.create(this.prototype);return r.arrayBuffer=t.arrayBuffer,r.length=t.length,r.capacity=t.arrayBuffer.byteLength/r.bytesPerElement,r._refreshViews(),r}_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 r=this.uint8;this._refreshViews(),r&&this.uint8.set(r)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function ti(n,t=1){let r=0,o=0;return{members:n.map((c=>{const f=$p[c.type].BYTES_PER_ELEMENT,_=r=$l(r,Math.max(t,f)),v=c.components||1;return o=Math.max(o,f),r+=f*v,{name:c.name,type:c.type,components:v,offset:_}})),size:$l(r,Math.max(o,t)),alignment:t}}function $l(n,t){return Math.ceil(n/t)*t}class hs extends Dn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r){const o=this.length;return this.resize(o+1),this.emplace(o,t,r)}emplace(t,r,o){const c=2*t;return this.int16[c+0]=r,this.int16[c+1]=o,t}}hs.prototype.bytesPerElement=4,nr("StructArrayLayout2i4",hs);class ds extends Dn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,o){const c=this.length;return this.resize(c+1),this.emplace(c,t,r,o)}emplace(t,r,o,c){const f=3*t;return this.int16[f+0]=r,this.int16[f+1]=o,this.int16[f+2]=c,t}}ds.prototype.bytesPerElement=6,nr("StructArrayLayout3i6",ds);class du extends Dn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,o,c){const f=this.length;return this.resize(f+1),this.emplace(f,t,r,o,c)}emplace(t,r,o,c,f){const _=4*t;return this.int16[_+0]=r,this.int16[_+1]=o,this.int16[_+2]=c,this.int16[_+3]=f,t}}du.prototype.bytesPerElement=8,nr("StructArrayLayout4i8",du);class ps extends Dn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,o,c,f,_){const v=this.length;return this.resize(v+1),this.emplace(v,t,r,o,c,f,_)}emplace(t,r,o,c,f,_,v){const b=6*t;return this.int16[b+0]=r,this.int16[b+1]=o,this.int16[b+2]=c,this.int16[b+3]=f,this.int16[b+4]=_,this.int16[b+5]=v,t}}ps.prototype.bytesPerElement=12,nr("StructArrayLayout2i4i12",ps);class No extends Dn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,o,c,f,_){const v=this.length;return this.resize(v+1),this.emplace(v,t,r,o,c,f,_)}emplace(t,r,o,c,f,_,v){const b=4*t,S=8*t;return this.int16[b+0]=r,this.int16[b+1]=o,this.uint8[S+4]=c,this.uint8[S+5]=f,this.uint8[S+6]=_,this.uint8[S+7]=v,t}}No.prototype.bytesPerElement=8,nr("StructArrayLayout2i4ub8",No);class Js extends Dn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,r){const o=this.length;return this.resize(o+1),this.emplace(o,t,r)}emplace(t,r,o){const c=2*t;return this.float32[c+0]=r,this.float32[c+1]=o,t}}Js.prototype.bytesPerElement=8,nr("StructArrayLayout2f8",Js);class Gl extends Dn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,r,o,c,f,_,v,b,S,I){const L=this.length;return this.resize(L+1),this.emplace(L,t,r,o,c,f,_,v,b,S,I)}emplace(t,r,o,c,f,_,v,b,S,I,L){const F=10*t;return this.uint16[F+0]=r,this.uint16[F+1]=o,this.uint16[F+2]=c,this.uint16[F+3]=f,this.uint16[F+4]=_,this.uint16[F+5]=v,this.uint16[F+6]=b,this.uint16[F+7]=S,this.uint16[F+8]=I,this.uint16[F+9]=L,t}}Gl.prototype.bytesPerElement=20,nr("StructArrayLayout10ui20",Gl);class jo extends Dn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,r,o,c,f,_,v,b,S,I,L,F){const q=this.length;return this.resize(q+1),this.emplace(q,t,r,o,c,f,_,v,b,S,I,L,F)}emplace(t,r,o,c,f,_,v,b,S,I,L,F,q){const U=12*t;return this.int16[U+0]=r,this.int16[U+1]=o,this.int16[U+2]=c,this.int16[U+3]=f,this.uint16[U+4]=_,this.uint16[U+5]=v,this.uint16[U+6]=b,this.uint16[U+7]=S,this.int16[U+8]=I,this.int16[U+9]=L,this.int16[U+10]=F,this.int16[U+11]=q,t}}jo.prototype.bytesPerElement=24,nr("StructArrayLayout4i4ui4i24",jo);class pu extends Dn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,r,o){const c=this.length;return this.resize(c+1),this.emplace(c,t,r,o)}emplace(t,r,o,c){const f=3*t;return this.float32[f+0]=r,this.float32[f+1]=o,this.float32[f+2]=c,t}}pu.prototype.bytesPerElement=12,nr("StructArrayLayout3f12",pu);class fu extends Dn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t){const r=this.length;return this.resize(r+1),this.emplace(r,t)}emplace(t,r){return this.uint32[1*t+0]=r,t}}fu.prototype.bytesPerElement=4,nr("StructArrayLayout1ul4",fu);class Hl extends Dn{_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,r,o,c,f,_,v,b,S){const I=this.length;return this.resize(I+1),this.emplace(I,t,r,o,c,f,_,v,b,S)}emplace(t,r,o,c,f,_,v,b,S,I){const L=10*t,F=5*t;return this.int16[L+0]=r,this.int16[L+1]=o,this.int16[L+2]=c,this.int16[L+3]=f,this.int16[L+4]=_,this.int16[L+5]=v,this.uint32[F+3]=b,this.uint16[L+8]=S,this.uint16[L+9]=I,t}}Hl.prototype.bytesPerElement=20,nr("StructArrayLayout6i1ul2ui20",Hl);class mu extends Dn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,o,c,f,_){const v=this.length;return this.resize(v+1),this.emplace(v,t,r,o,c,f,_)}emplace(t,r,o,c,f,_,v){const b=6*t;return this.int16[b+0]=r,this.int16[b+1]=o,this.int16[b+2]=c,this.int16[b+3]=f,this.int16[b+4]=_,this.int16[b+5]=v,t}}mu.prototype.bytesPerElement=12,nr("StructArrayLayout2i2i2i12",mu);class h extends Dn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,o,c,f){const _=this.length;return this.resize(_+1),this.emplace(_,t,r,o,c,f)}emplace(t,r,o,c,f,_){const v=4*t,b=8*t;return this.float32[v+0]=r,this.float32[v+1]=o,this.float32[v+2]=c,this.int16[b+6]=f,this.int16[b+7]=_,t}}h.prototype.bytesPerElement=16,nr("StructArrayLayout2f1f2i16",h);class e extends Dn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,o,c,f,_){const v=this.length;return this.resize(v+1),this.emplace(v,t,r,o,c,f,_)}emplace(t,r,o,c,f,_,v){const b=16*t,S=4*t,I=8*t;return this.uint8[b+0]=r,this.uint8[b+1]=o,this.float32[S+1]=c,this.float32[S+2]=f,this.int16[I+6]=_,this.int16[I+7]=v,t}}e.prototype.bytesPerElement=16,nr("StructArrayLayout2ub2f2i16",e);class i extends Dn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,r,o){const c=this.length;return this.resize(c+1),this.emplace(c,t,r,o)}emplace(t,r,o,c){const f=3*t;return this.uint16[f+0]=r,this.uint16[f+1]=o,this.uint16[f+2]=c,t}}i.prototype.bytesPerElement=6,nr("StructArrayLayout3ui6",i);class l extends Dn{_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,r,o,c,f,_,v,b,S,I,L,F,q,U,W,J,ce){const Re=this.length;return this.resize(Re+1),this.emplace(Re,t,r,o,c,f,_,v,b,S,I,L,F,q,U,W,J,ce)}emplace(t,r,o,c,f,_,v,b,S,I,L,F,q,U,W,J,ce,Re){const ye=24*t,Ce=12*t,Ke=48*t;return this.int16[ye+0]=r,this.int16[ye+1]=o,this.uint16[ye+2]=c,this.uint16[ye+3]=f,this.uint32[Ce+2]=_,this.uint32[Ce+3]=v,this.uint32[Ce+4]=b,this.uint16[ye+10]=S,this.uint16[ye+11]=I,this.uint16[ye+12]=L,this.float32[Ce+7]=F,this.float32[Ce+8]=q,this.uint8[Ke+36]=U,this.uint8[Ke+37]=W,this.uint8[Ke+38]=J,this.uint32[Ce+10]=ce,this.int16[ye+22]=Re,t}}l.prototype.bytesPerElement=48,nr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",l);class u extends Dn{_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,r,o,c,f,_,v,b,S,I,L,F,q,U,W,J,ce,Re,ye,Ce,Ke,ct,St,Yt,qt,Ht,Cr,Gt){const Wt=this.length;return this.resize(Wt+1),this.emplace(Wt,t,r,o,c,f,_,v,b,S,I,L,F,q,U,W,J,ce,Re,ye,Ce,Ke,ct,St,Yt,qt,Ht,Cr,Gt)}emplace(t,r,o,c,f,_,v,b,S,I,L,F,q,U,W,J,ce,Re,ye,Ce,Ke,ct,St,Yt,qt,Ht,Cr,Gt,Wt){const gt=32*t,Nr=16*t;return this.int16[gt+0]=r,this.int16[gt+1]=o,this.int16[gt+2]=c,this.int16[gt+3]=f,this.int16[gt+4]=_,this.int16[gt+5]=v,this.int16[gt+6]=b,this.int16[gt+7]=S,this.uint16[gt+8]=I,this.uint16[gt+9]=L,this.uint16[gt+10]=F,this.uint16[gt+11]=q,this.uint16[gt+12]=U,this.uint16[gt+13]=W,this.uint16[gt+14]=J,this.uint16[gt+15]=ce,this.uint16[gt+16]=Re,this.uint16[gt+17]=ye,this.uint16[gt+18]=Ce,this.uint16[gt+19]=Ke,this.uint16[gt+20]=ct,this.uint16[gt+21]=St,this.uint16[gt+22]=Yt,this.uint32[Nr+12]=qt,this.float32[Nr+13]=Ht,this.float32[Nr+14]=Cr,this.uint16[gt+30]=Gt,this.uint16[gt+31]=Wt,t}}u.prototype.bytesPerElement=64,nr("StructArrayLayout8i15ui1ul2f2ui64",u);class d extends Dn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t){const r=this.length;return this.resize(r+1),this.emplace(r,t)}emplace(t,r){return this.float32[1*t+0]=r,t}}d.prototype.bytesPerElement=4,nr("StructArrayLayout1f4",d);class g extends Dn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,r,o){const c=this.length;return this.resize(c+1),this.emplace(c,t,r,o)}emplace(t,r,o,c){const f=3*t;return this.uint16[6*t+0]=r,this.float32[f+1]=o,this.float32[f+2]=c,t}}g.prototype.bytesPerElement=12,nr("StructArrayLayout1ui2f12",g);class w extends Dn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,r,o){const c=this.length;return this.resize(c+1),this.emplace(c,t,r,o)}emplace(t,r,o,c){const f=4*t;return this.uint32[2*t+0]=r,this.uint16[f+2]=o,this.uint16[f+3]=c,t}}w.prototype.bytesPerElement=8,nr("StructArrayLayout1ul2ui8",w);class C extends Dn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,r){const o=this.length;return this.resize(o+1),this.emplace(o,t,r)}emplace(t,r,o){const c=2*t;return this.uint16[c+0]=r,this.uint16[c+1]=o,t}}C.prototype.bytesPerElement=4,nr("StructArrayLayout2ui4",C);class P extends Dn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t){const r=this.length;return this.resize(r+1),this.emplace(r,t)}emplace(t,r){return this.uint16[1*t+0]=r,t}}P.prototype.bytesPerElement=2,nr("StructArrayLayout1ui2",P);class E extends Dn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,r,o,c){const f=this.length;return this.resize(f+1),this.emplace(f,t,r,o,c)}emplace(t,r,o,c,f){const _=4*t;return this.float32[_+0]=r,this.float32[_+1]=o,this.float32[_+2]=c,this.float32[_+3]=f,t}}E.prototype.bytesPerElement=16,nr("StructArrayLayout4f16",E);class R extends Ks{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]}get anchorPoint(){return new B(this.anchorPointX,this.anchorPointY)}}R.prototype.size=20;class D extends Hl{get(t){return new R(this,t)}}nr("CollisionBoxArray",D);class N extends Ks{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]}}N.prototype.size=48;class G extends l{get(t){return new N(this,t)}}nr("PlacedSymbolArray",G);class te extends Ks{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]}}te.prototype.size=64;class ee extends u{get(t){return new te(this,t)}}nr("SymbolInstanceArray",ee);class ie extends d{getoffsetX(t){return this.float32[1*t+0]}}nr("GlyphOffsetArray",ie);class ue extends ds{getx(t){return this.int16[3*t+0]}gety(t){return this.int16[3*t+1]}gettileUnitDistanceFromAnchor(t){return this.int16[3*t+2]}}nr("SymbolLineVertexArray",ue);class ve extends Ks{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]}}ve.prototype.size=12;class me extends g{get(t){return new ve(this,t)}}nr("TextAnchorOffsetArray",me);class be extends Ks{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]}}be.prototype.size=8;class Pe extends w{get(t){return new be(this,t)}}nr("FeatureIndexArray",Pe);class _e extends hs{}class Be extends hs{}class rt extends hs{}class Ge extends ps{}class Xe extends No{}class tt extends Js{}class jt extends Gl{}class Zt extends jo{}class Tt extends pu{}class gr extends fu{}class Jr extends mu{}class An extends e{}class Rn extends i{}class Ln extends C{}const Wn=ti([{name:"a_pos",components:2,type:"Int16"}],4),{members:Jn}=Wn;class Kr{constructor(t=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=t}prepareSegment(t,r,o,c){const f=this.segments[this.segments.length-1];return t>Kr.MAX_VERTEX_ARRAY_LENGTH&&Et(`Max vertices per segment is ${Kr.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${Kr.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!f||f.vertexLength+t>Kr.MAX_VERTEX_ARRAY_LENGTH||f.sortKey!==c?this.createNewSegment(r,o,c):f}createNewSegment(t,r,o){const c={vertexOffset:t.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0,vaos:{}};return o!==void 0&&(c.sortKey=o),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(c),c}getOrCreateLatestSegment(t,r,o){return this.prepareSegment(0,t,r,o)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(const t of this.segments)for(const r in t.vaos)t.vaos[r].destroy()}static simpleSegment(t,r,o,c){return new Kr([{vertexOffset:t,primitiveOffset:r,vertexLength:o,primitiveLength:c,vaos:{},sortKey:0}])}}function Bn(n,t){return 256*(n=Dt(Math.floor(n),0,255))+Dt(Math.floor(t),0,255)}Kr.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,nr("SegmentVector",Kr);const si=ti([{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"}]);var mi,Ci,$i,za={exports:{}},go={exports:{}},vo={exports:{}},fs=(function(){if($i)return za.exports;$i=1;var n=(mi||(mi=1,go.exports=function(r,o){var c,f,_,v,b,S,I,L;for(f=r.length-(c=3&r.length),_=o,b=3432918353,S=461845907,L=0;L>>16)*b&65535)<<16)&4294967295)<<15|I>>>17))*S+(((I>>>16)*S&65535)<<16)&4294967295)<<13|_>>>19))+((5*(_>>>16)&65535)<<16)&4294967295))+((58964+(v>>>16)&65535)<<16);switch(I=0,c){case 3:I^=(255&r.charCodeAt(L+2))<<16;case 2:I^=(255&r.charCodeAt(L+1))<<8;case 1:_^=I=(65535&(I=(I=(65535&(I^=255&r.charCodeAt(L)))*b+(((I>>>16)*b&65535)<<16)&4294967295)<<15|I>>>17))*S+(((I>>>16)*S&65535)<<16)&4294967295}return _^=r.length,_=2246822507*(65535&(_^=_>>>16))+((2246822507*(_>>>16)&65535)<<16)&4294967295,_=3266489909*(65535&(_^=_>>>13))+((3266489909*(_>>>16)&65535)<<16)&4294967295,(_^=_>>>16)>>>0}),go.exports),t=(Ci||(Ci=1,vo.exports=function(r,o){for(var c,f=r.length,_=o^f,v=0;f>=4;)c=1540483477*(65535&(c=255&r.charCodeAt(v)|(255&r.charCodeAt(++v))<<8|(255&r.charCodeAt(++v))<<16|(255&r.charCodeAt(++v))<<24))+((1540483477*(c>>>16)&65535)<<16),_=1540483477*(65535&_)+((1540483477*(_>>>16)&65535)<<16)^(c=1540483477*(65535&(c^=c>>>24))+((1540483477*(c>>>16)&65535)<<16)),f-=4,++v;switch(f){case 3:_^=(255&r.charCodeAt(v+2))<<16;case 2:_^=(255&r.charCodeAt(v+1))<<8;case 1:_=1540483477*(65535&(_^=255&r.charCodeAt(v)))+((1540483477*(_>>>16)&65535)<<16)}return _=1540483477*(65535&(_^=_>>>13))+((1540483477*(_>>>16)&65535)<<16),(_^=_>>>15)>>>0}),vo.exports);return za.exports=n,za.exports.murmur3=n,za.exports.murmur2=t,za.exports})(),ms=O(fs);class Vo{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(t,r,o,c){this.ids.push(qo(t)),this.positions.push(r,o,c)}getPositions(t){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const r=qo(t);let o=0,c=this.ids.length-1;for(;o>1;this.ids[_]>=r?c=_:o=_+1}const f=[];for(;this.ids[o]===r;)f.push({index:this.positions[3*o],start:this.positions[3*o+1],end:this.positions[3*o+2]}),o++;return f}static serialize(t,r){const o=new Float64Array(t.ids),c=new Uint32Array(t.positions);return ta(o,c,0,o.length-1),r&&r.push(o.buffer,c.buffer),{ids:o,positions:c}}static deserialize(t){const r=new Vo;return r.ids=t.ids,r.positions=t.positions,r.indexed=!0,r}}function qo(n){const t=+n;return!isNaN(t)&&t<=Number.MAX_SAFE_INTEGER?t:ms(String(n))}function ta(n,t,r,o){for(;r>1];let f=r-1,_=o+1;for(;;){do f++;while(n[f]c);if(f>=_)break;La(n,f,_),La(t,3*f,3*_),La(t,3*f+1,3*_+1),La(t,3*f+2,3*_+2)}_-r`u_${c}`)),this.type=o}setUniform(t,r,o){t.set(o.constantOr(this.value))}getBinding(t,r,o){return this.type==="color"?new _i(t,r):new yo(t,r)}}class _s{constructor(t,r){this.uniformNames=r.map((o=>`u_${o}`)),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(t,r){this.pixelRatioFrom=r.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=r.tlbr,this.patternTo=t.tlbr}setUniform(t,r,o,c){const f=c==="u_pattern_to"?this.patternTo:c==="u_pattern_from"?this.patternFrom:c==="u_pixel_ratio_to"?this.pixelRatioTo:c==="u_pixel_ratio_from"?this.pixelRatioFrom:null;f&&t.set(f)}getBinding(t,r,o){return o.substr(0,9)==="u_pattern"?new li(t,r):new yo(t,r)}}class ro{constructor(t,r,o,c){this.expression=t,this.type=o,this.maxValue=0,this.paintVertexAttributes=r.map((f=>({name:`a_${f}`,type:"Float32",components:o==="color"?2:1,offset:0}))),this.paintVertexArray=new c}populatePaintArray(t,r,o,c,f){const _=this.paintVertexArray.length,v=this.expression.evaluate(new Un(0),r,{},c,[],f);this.paintVertexArray.resize(t),this._setPaintValue(_,t,v)}updatePaintArray(t,r,o,c){const f=this.expression.evaluate({zoom:0},o,c);this._setPaintValue(t,r,f)}_setPaintValue(t,r,o){if(this.type==="color"){const c=ci(o);for(let f=t;f`u_${v}_t`)),this.type=o,this.useIntegerZoom=c,this.zoom=f,this.maxValue=0,this.paintVertexAttributes=r.map((v=>({name:`a_${v}`,type:"Float32",components:o==="color"?4:2,offset:0}))),this.paintVertexArray=new _}populatePaintArray(t,r,o,c,f){const _=this.expression.evaluate(new Un(this.zoom),r,{},c,[],f),v=this.expression.evaluate(new Un(this.zoom+1),r,{},c,[],f),b=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(b,t,_,v)}updatePaintArray(t,r,o,c){const f=this.expression.evaluate({zoom:this.zoom},o,c),_=this.expression.evaluate({zoom:this.zoom+1},o,c);this._setPaintValue(t,r,f,_)}_setPaintValue(t,r,o,c){if(this.type==="color"){const f=ci(o),_=ci(c);for(let v=t;v`#define HAS_UNIFORM_${c}`)))}return t}getBinderAttributes(){const t=[];for(const r in this.binders){const o=this.binders[r];if(o instanceof ro||o instanceof Da)for(let c=0;c!0){this.programConfigurations={};for(const c of t)this.programConfigurations[c.id]=new Cd(c,r,o);this.needsUpload=!1,this._featureMap=new Vo,this._bufferOffset=0}populatePaintArrays(t,r,o,c,f,_){for(const v in this.programConfigurations)this.programConfigurations[v].populatePaintArrays(t,r,c,f,_);r.id!==void 0&&this._featureMap.add(r.id,o,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0}updatePaintArrays(t,r,o,c){for(const f of o)this.needsUpload=this.programConfigurations[f.id].updatePaintArrays(t,this._featureMap,r,f,c)||this.needsUpload}get(t){return this.programConfigurations[t]}upload(t){if(this.needsUpload){for(const r in this.programConfigurations)this.programConfigurations[r].upload(t);this.needsUpload=!1}}destroy(){for(const t in this.programConfigurations)this.programConfigurations[t].destroy()}}function Sd(n,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":["gapwidth"],"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"]}[n]||[n.replace(`${t}-`,"").replace(/-/g,"_")]}function _u(n,t,r){const o={color:{source:Js,composite:E},number:{source:d,composite:Js}},c=(function(f){return{"line-pattern":{source:jt,composite:jt},"fill-pattern":{source:jt,composite:jt},"fill-extrusion-pattern":{source:jt,composite:jt}}[f]})(n);return c&&c[r]||o[t][r]}nr("ConstantBinder",Qs),nr("CrossFadedConstantBinder",_s),nr("SourceExpressionBinder",ro),nr("CrossFadedCompositeBinder",xo),nr("CompositeExpressionBinder",Da),nr("ProgramConfiguration",Cd,{omit:["_buffers"]}),nr("ProgramConfigurationSet",la);const Wl=Math.pow(2,14)-1,Xl=-Wl-1;function bo(n){const t=oe/n.extent,r=n.loadGeometry();for(let o=0;o_.x+1||b<_.y||b>_.y+1)&&Et("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return r}function no(n,t){return{type:n.type,id:n.id,properties:n.properties,geometry:t?bo(n):[]}}const h_=-32768;function K0(n,t,r,o,c){n.emplaceBack(h_+8*t+o,h_+8*r+c)}class Gp{constructor(t){this.zoom=t.zoom,this.globalState=t.globalState,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((r=>r.id)),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Be,this.indexArray=new Rn,this.segments=new Kr,this.programConfigurations=new la(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((r=>r.isStateDependent())).map((r=>r.id))}populate(t,r,o){const c=this.layers[0],f=[];let _=null,v=!1,b=c.type==="heatmap";if(c.type==="circle"){const I=c;_=I.layout.get("circle-sort-key"),v=!_.isConstant(),b=b||I.paint.get("circle-pitch-alignment")==="map"}const S=b?r.subdivisionGranularity.circle:1;for(const{feature:I,id:L,index:F,sourceLayerIndex:q}of t){const U=this.layers[0]._featureFilter.needGeometry,W=no(I,U);if(!this.layers[0]._featureFilter.filter(new Un(this.zoom,{globalState:this.globalState}),W,o))continue;const J=v?_.evaluate(W,{},o):void 0,ce={id:L,properties:I.properties,type:I.type,sourceLayerIndex:q,index:F,geometry:U?W.geometry:bo(I),patterns:{},sortKey:J};f.push(ce)}v&&f.sort(((I,L)=>I.sortKey-L.sortKey));for(const I of f){const{geometry:L,index:F,sourceLayerIndex:q}=I,U=t[F].feature;this.addFeature(I,L,F,o,S),r.featureIndex.insert(U,L,F,q,this.index)}}update(t,r,o){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,r,this.stateDependentLayers,o)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Jn),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,r,o,c,f=1){let _;switch(f){case 1:_=[0,7];break;case 3:_=[0,2,5,7];break;case 5:_=[0,1,3,4,6,7];break;case 7:_=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${f}; valid values are 1, 3, 5, 7.`)}const v=_.length;for(const b of r)for(const S of b){const I=S.x,L=S.y;if(I<0||I>=oe||L<0||L>=oe)continue;const F=this.segments.prepareSegment(v*v,this.layoutVertexArray,this.indexArray,t.sortKey),q=F.vertexLength;for(let U=0;U1){if(Hp(n,t))return!0;for(let o=0;o1?r:r.sub(t)._mult(c)._add(t))}function m_(n,t){let r,o,c,f=!1;for(let _=0;_t.y!=c.y>t.y&&t.x<(c.x-o.x)*(t.y-o.y)/(c.y-o.y)+o.x&&(f=!f)}return f}function Yl(n,t){let r=!1;for(let o=0,c=n.length-1;ot.y!=_.y>t.y&&t.x<(_.x-f.x)*(t.y-f.y)/(_.y-f.y)+f.x&&(r=!r)}return r}function ty(n,t,r){const o=r[0],c=r[2];if(n.xc.x&&t.x>c.x||n.yc.y&&t.y>c.y)return!1;const f=Rt(n,t,r[0]);return f!==Rt(n,t,r[1])||f!==Rt(n,t,r[2])||f!==Rt(n,t,r[3])}function gu(n,t,r){const o=t.paint.get(n).value;return o.kind==="constant"?o.value:r.programConfigurations.get(t.id).getMaxValue(n)}function Pd(n){return Math.sqrt(n[0]*n[0]+n[1]*n[1])}function Id(n,t,r,o,c){if(!t[0]&&!t[1])return n;const f=B.convert(t)._mult(c);r==="viewport"&&f._rotate(-o);const _=[];for(let v=0;vv_(Re,W,J,ce)))})(S,f,v,b),q=L?I*_:I;for(const U of c)for(const W of U){const J=L?W:v_(W,f,v,b);let ce=q;const Re=f.projectTileCoordinates(W.x,W.y,v,b).signedDistanceFromCamera;if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?ce*=Re/f.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(ce*=f.cameraToCenterDistance/Re),J0(F,J,ce))return!0}return!1}}function v_(n,t,r,o){const c=t.projectTileCoordinates(n.x,n.y,r,o).point;return new B((.5*c.x+.5)*t.width,(.5*-c.y+.5)*t.height)}class y_ extends Gp{}let x_;nr("HeatmapBucket",y_,{omit:["layers"]});var iy={get paint(){return x_=x_||new Ui({"heatmap-radius":new Or(xe.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Or(xe.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new br(xe.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Ul(xe.paint_heatmap["heatmap-color"]),"heatmap-opacity":new br(xe.paint_heatmap["heatmap-opacity"])})}};function Xp(n,{width:t,height:r},o,c){if(c){if(c instanceof Uint8ClampedArray)c=new Uint8Array(c.buffer);else if(c.length!==t*r*o)throw new RangeError(`mismatched image size. expected: ${c.length} but got: ${t*r*o}`)}else c=new Uint8Array(t*r*o);return n.width=t,n.height=r,n.data=c,n}function b_(n,{width:t,height:r},o){if(t===n.width&&r===n.height)return;const c=Xp({},{width:t,height:r},o);Yp(n,c,{x:0,y:0},{x:0,y:0},{width:Math.min(n.width,t),height:Math.min(n.height,r)},o),n.width=t,n.height=r,n.data=c.data}function Yp(n,t,r,o,c,f){if(c.width===0||c.height===0)return t;if(c.width>n.width||c.height>n.height||r.x>n.width-c.width||r.y>n.height-c.height)throw new RangeError("out of range source coordinates for image copy");if(c.width>t.width||c.height>t.height||o.x>t.width-c.width||o.y>t.height-c.height)throw new RangeError("out of range destination coordinates for image copy");const _=n.data,v=t.data;if(_===v)throw new Error("srcData equals dstData, so image is already copied");for(let b=0;b{t[n.evaluationKey]=b;const S=n.expression.evaluate(t);c.setPixel(_/4/r,v/4,S)};if(n.clips)for(let _=0,v=0;_this.max&&(this.max=L),L=this.dim+1||r<-1||r>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(r+1)*this.stride+(t+1)}unpack(t,r,o){return t*this.redFactor+r*this.greenFactor+o*this.blueFactor-this.baseShift}pack(t){return P_(t,this.getUnpackVector())}getPixels(){return new ca({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(t,r,o){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");let c=r*this.dim,f=r*this.dim+this.dim,_=o*this.dim,v=o*this.dim+this.dim;switch(r){case-1:c=f-1;break;case 1:f=c+1}switch(o){case-1:_=v-1;break;case 1:v=_+1}const b=-r*this.dim,S=-o*this.dim;for(let I=_;I0)for(let _=t;_=t;_-=o)f=E_(_/o|0,n[_],n[_+1],f);return f&&Kl(f,f.next)&&(wu(f),f=f.next),f}function el(n,t){if(!n)return n;t||(t=n);let r,o=n;do if(r=!1,o.steiner||!Kl(o,o.next)&&ii(o.prev,o,o.next)!==0)o=o.next;else{if(wu(o),o=t=o.prev,o===o.next)break;r=!0}while(r||o!==t);return t}function yu(n,t,r,o,c,f,_){if(!n)return;!_&&f&&(function(b,S,I,L){let F=b;do F.z===0&&(F.z=tf(F.x,F.y,S,I,L)),F.prevZ=F.prev,F.nextZ=F.next,F=F.next;while(F!==b);F.prevZ.nextZ=null,F.prevZ=null,(function(q){let U,W=1;do{let J,ce=q;q=null;let Re=null;for(U=0;ce;){U++;let ye=ce,Ce=0;for(let ct=0;ct0||Ke>0&&ye;)Ce!==0&&(Ke===0||!ye||ce.z<=ye.z)?(J=ce,ce=ce.nextZ,Ce--):(J=ye,ye=ye.nextZ,Ke--),Re?Re.nextZ=J:q=J,J.prevZ=Re,Re=J;ce=ye}Re.nextZ=null,W*=2}while(U>1)})(F)})(n,o,c,f);let v=n;for(;n.prev!==n.next;){const b=n.prev,S=n.next;if(f?py(n,o,c,f):dy(n))t.push(b.i,n.i,S.i),wu(n),n=S.next,v=S.next;else if((n=S)===v){_?_===1?yu(n=fy(el(n),t),t,r,o,c,f,2):_===2&&my(n,t,r,o,c,f):yu(el(n),t,r,o,c,f,1);break}}}function dy(n){const t=n.prev,r=n,o=n.next;if(ii(t,r,o)>=0)return!1;const c=t.x,f=r.x,_=o.x,v=t.y,b=r.y,S=o.y,I=Math.min(c,f,_),L=Math.min(v,b,S),F=Math.max(c,f,_),q=Math.max(v,b,S);let U=o.next;for(;U!==t;){if(U.x>=I&&U.x<=F&&U.y>=L&&U.y<=q&&xu(c,v,f,b,_,S,U.x,U.y)&&ii(U.prev,U,U.next)>=0)return!1;U=U.next}return!0}function py(n,t,r,o){const c=n.prev,f=n,_=n.next;if(ii(c,f,_)>=0)return!1;const v=c.x,b=f.x,S=_.x,I=c.y,L=f.y,F=_.y,q=Math.min(v,b,S),U=Math.min(I,L,F),W=Math.max(v,b,S),J=Math.max(I,L,F),ce=tf(q,U,t,r,o),Re=tf(W,J,t,r,o);let ye=n.prevZ,Ce=n.nextZ;for(;ye&&ye.z>=ce&&Ce&&Ce.z<=Re;){if(ye.x>=q&&ye.x<=W&&ye.y>=U&&ye.y<=J&&ye!==c&&ye!==_&&xu(v,I,b,L,S,F,ye.x,ye.y)&&ii(ye.prev,ye,ye.next)>=0||(ye=ye.prevZ,Ce.x>=q&&Ce.x<=W&&Ce.y>=U&&Ce.y<=J&&Ce!==c&&Ce!==_&&xu(v,I,b,L,S,F,Ce.x,Ce.y)&&ii(Ce.prev,Ce,Ce.next)>=0))return!1;Ce=Ce.nextZ}for(;ye&&ye.z>=ce;){if(ye.x>=q&&ye.x<=W&&ye.y>=U&&ye.y<=J&&ye!==c&&ye!==_&&xu(v,I,b,L,S,F,ye.x,ye.y)&&ii(ye.prev,ye,ye.next)>=0)return!1;ye=ye.prevZ}for(;Ce&&Ce.z<=Re;){if(Ce.x>=q&&Ce.x<=W&&Ce.y>=U&&Ce.y<=J&&Ce!==c&&Ce!==_&&xu(v,I,b,L,S,F,Ce.x,Ce.y)&&ii(Ce.prev,Ce,Ce.next)>=0)return!1;Ce=Ce.nextZ}return!0}function fy(n,t){let r=n;do{const o=r.prev,c=r.next.next;!Kl(o,c)&&k_(o,r,r.next,c)&&bu(o,c)&&bu(c,o)&&(t.push(o.i,r.i,c.i),wu(r),wu(r.next),r=n=c),r=r.next}while(r!==n);return el(r)}function my(n,t,r,o,c,f){let _=n;do{let v=_.next.next;for(;v!==_.prev;){if(_.i!==v.i&&xy(_,v)){let b=A_(_,v);return _=el(_,_.next),b=el(b,b.next),yu(_,t,r,o,c,f,0),void yu(b,t,r,o,c,f,0)}v=v.next}_=_.next}while(_!==n)}function _y(n,t){let r=n.x-t.x;return r===0&&(r=n.y-t.y,r===0)&&(r=(n.next.y-n.y)/(n.next.x-n.x)-(t.next.y-t.y)/(t.next.x-t.x)),r}function gy(n,t){const r=(function(c,f){let _=f;const v=c.x,b=c.y;let S,I=-1/0;if(Kl(c,_))return _;do{if(Kl(c,_.next))return _.next;if(b<=_.y&&b>=_.next.y&&_.next.y!==_.y){const W=_.x+(b-_.y)*(_.next.x-_.x)/(_.next.y-_.y);if(W<=v&&W>I&&(I=W,S=_.x<_.next.x?_:_.next,W===v))return S}_=_.next}while(_!==f);if(!S)return null;const L=S,F=S.x,q=S.y;let U=1/0;_=S;do{if(v>=_.x&&_.x>=F&&v!==_.x&&M_(bS.x||_.x===S.x&&vy(S,_)))&&(S=_,U=W)}_=_.next}while(_!==L);return S})(n,t);if(!r)return t;const o=A_(r,n);return el(o,o.next),el(r,r.next)}function vy(n,t){return ii(n.prev,n,t.prev)<0&&ii(t.next,n,n.next)<0}function tf(n,t,r,o,c){return(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n=(n-r)*c|0)|n<<8))|n<<4))|n<<2))|n<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-o)*c|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function yy(n){let t=n,r=n;do(t.x=(n-_)*(f-v)&&(n-_)*(o-v)>=(r-_)*(t-v)&&(r-_)*(f-v)>=(c-_)*(o-v)}function xu(n,t,r,o,c,f,_,v){return!(n===_&&t===v)&&M_(n,t,r,o,c,f,_,v)}function xy(n,t){return n.next.i!==t.i&&n.prev.i!==t.i&&!(function(r,o){let c=r;do{if(c.i!==r.i&&c.next.i!==r.i&&c.i!==o.i&&c.next.i!==o.i&&k_(c,c.next,r,o))return!0;c=c.next}while(c!==r);return!1})(n,t)&&(bu(n,t)&&bu(t,n)&&(function(r,o){let c=r,f=!1;const _=(r.x+o.x)/2,v=(r.y+o.y)/2;do c.y>v!=c.next.y>v&&c.next.y!==c.y&&_<(c.next.x-c.x)*(v-c.y)/(c.next.y-c.y)+c.x&&(f=!f),c=c.next;while(c!==r);return f})(n,t)&&(ii(n.prev,n,t.prev)||ii(n,t.prev,t))||Kl(n,t)&&ii(n.prev,n,n.next)>0&&ii(t.prev,t,t.next)>0)}function ii(n,t,r){return(t.y-n.y)*(r.x-t.x)-(t.x-n.x)*(r.y-t.y)}function Kl(n,t){return n.x===t.x&&n.y===t.y}function k_(n,t,r,o){const c=kd(ii(n,t,r)),f=kd(ii(n,t,o)),_=kd(ii(r,o,n)),v=kd(ii(r,o,t));return c!==f&&_!==v||!(c!==0||!Md(n,r,t))||!(f!==0||!Md(n,o,t))||!(_!==0||!Md(r,n,o))||!(v!==0||!Md(r,t,o))}function Md(n,t,r){return t.x<=Math.max(n.x,r.x)&&t.x>=Math.min(n.x,r.x)&&t.y<=Math.max(n.y,r.y)&&t.y>=Math.min(n.y,r.y)}function kd(n){return n>0?1:n<0?-1:0}function bu(n,t){return ii(n.prev,n,n.next)<0?ii(n,t,n.next)>=0&&ii(n,n.prev,t)>=0:ii(n,t,n.prev)<0||ii(n,n.next,t)<0}function A_(n,t){const r=rf(n.i,n.x,n.y),o=rf(t.i,t.x,t.y),c=n.next,f=t.prev;return n.next=t,t.prev=n,r.next=c,c.prev=r,o.next=r,r.prev=o,f.next=o,o.prev=f,o}function E_(n,t,r,o){const c=rf(n,t,r);return o?(c.next=o.next,c.prev=o,o.next.prev=c,o.next=c):(c.prev=c,c.next=c),c}function wu(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function rf(n,t,r){return{i:n,x:t,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class Jl{constructor(t,r){if(r>t)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=t,this._minGranularity=r}getGranularityForZoomLevel(t){return Math.max(Math.floor(this._baseZoomGranularity/(1<32767||r>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");const o=0|Math.round(t),c=0|Math.round(r),f=this._getKey(o,c);if(this._vertexDictionary.has(f))return this._vertexDictionary.get(f);const _=this._vertexBuffer.length/2;return this._vertexDictionary.set(f,_),this._vertexBuffer.push(o,c),_}_subdivideTrianglesScanline(t){if(this._granularity<2)return(function(c,f){const _=[];for(let v=0;v0?(_.push(b),_.push(I),_.push(S)):(_.push(b),_.push(S),_.push(I))}return _})(this._vertexBuffer,t);const r=[],o=t.length;for(let c=0;c=1||Ke<=0)||ce&&(Sf)){L>=c&&L<=f&&_.push(o[(v+1)%3]);continue}!ce&&Ce>0&&_.push(this._vertexToIndex(b+U*Ce,S+W*Ce));const ct=b+U*Math.max(Ce,0),St=b+U*Math.min(Ke,1);J||this._generateIntraEdgeVertices(_,b,S,I,L,ct,St),!ce&&Ke<1&&_.push(this._vertexToIndex(b+U*Ke,S+W*Ke)),(ce||L>=c&&L<=f)&&_.push(o[(v+1)%3]),!ce&&(L<=c||L>=f)&&this._generateInterEdgeVertices(_,b,S,I,L,F,q,St,c,f)}return _}_generateIntraEdgeVertices(t,r,o,c,f,_,v){const b=c-r,S=f-o,I=S===0,L=I?Math.min(r,c):Math.min(_,v),F=I?Math.max(r,c):Math.max(_,v),q=Math.floor(L/this._granularityCellSize)+1,U=Math.ceil(F/this._granularityCellSize)-1;if(I?r=q;W--){const J=W*this._granularityCellSize;t.push(this._vertexToIndex(J,o+S*(J-r)/b))}}_generateInterEdgeVertices(t,r,o,c,f,_,v,b,S,I){const L=f-o,F=_-c,q=v-f,U=(S-f)/q,W=(I-f)/q,J=Math.min(U,W),ce=Math.max(U,W),Re=c+F*J;let ye=Math.floor(Math.min(Re,b)/this._granularityCellSize)+1,Ce=Math.ceil(Math.max(Re,b)/this._granularityCellSize)-1,Ke=b=1||ce<=0){const Yt=o-v,qt=_+(r-_)*Math.min((S-v)/Yt,(I-v)/Yt);ye=Math.floor(Math.min(qt,b)/this._granularityCellSize)+1,Ce=Math.ceil(Math.max(qt,b)/this._granularityCellSize)-1,Ke=b0?I:S;if(Ke)for(let Yt=ye;Yt<=Ce;Yt++)t.push(this._vertexToIndex(Yt*this._granularityCellSize,St));else for(let Yt=Ce;Yt>=ye;Yt--)t.push(this._vertexToIndex(Yt*this._granularityCellSize,St))}_generateOutline(t){const r=[];for(const o of t){const c=tl(o,this._granularity,!0),f=this._pointArrayToIndices(c),_=[];for(let v=1;vf!=(_===Ql)?(t.push(r),t.push(o),t.push(this._vertexToIndex(c,_)),t.push(o),t.push(this._vertexToIndex(f,_)),t.push(this._vertexToIndex(c,_))):(t.push(o),t.push(r),t.push(this._vertexToIndex(c,_)),t.push(this._vertexToIndex(f,_)),t.push(o),t.push(this._vertexToIndex(c,_)))}_fillPoles(t,r,o){const c=this._vertexBuffer,f=oe,_=t.length;for(let v=2;v<_;v+=3){const b=t[v-2],S=t[v-1],I=t[v],L=c[2*b],F=c[2*b+1],q=c[2*S],U=c[2*S+1],W=c[2*I],J=c[2*I+1];r&&(F===0&&U===0&&this._generatePoleQuad(t,b,S,L,q,Ql),U===0&&J===0&&this._generatePoleQuad(t,S,I,q,W,Ql),J===0&&F===0&&this._generatePoleQuad(t,I,b,W,L,Ql)),o&&(F===f&&U===f&&this._generatePoleQuad(t,b,S,L,q,Tu),U===f&&J===f&&this._generatePoleQuad(t,S,I,q,W,Tu),J===f&&F===f&&this._generatePoleQuad(t,I,b,W,L,Tu))}}_initializeVertices(t){for(let r=0;r80*L){J=S[0],ce=S[1];let ye=J,Ce=ce;for(let Ke=L;Keye&&(ye=ct),St>Ce&&(Ce=St)}Re=Math.max(ye-J,Ce-ce),Re=Re!==0?32767/Re:0}return yu(U,W,L,J,ce,Re,0),W})(o,c),b=this._convertIndices(o,v);f=this._subdivideTrianglesScanline(b)}catch(v){console.error(v)}let _=[];return r&&(_=this._generateOutline(t)),this._ensureNoPoleVertices(),this._handlePoles(f),{verticesFlattened:this._vertexBuffer,indicesTriangles:f,indicesLineList:_}}_convertIndices(t,r){const o=[];for(let c=0;c0?(Math.floor(St/_)+1)*_:(Math.ceil(St/_)-1)*_,Cr=Ce>0?(Math.floor(Yt/_)+1)*_:(Math.ceil(Yt/_)-1)*_,Gt=Math.abs(St-Ht),Wt=Math.abs(Yt-Cr),gt=Math.abs(St-W),Nr=Math.abs(Yt-J),Gr=ce?Gt/Ke:Number.POSITIVE_INFINITY,kr=Re?Wt/ct:Number.POSITIVE_INFINITY;if((gt<=Gt||!ce)&&(Nr<=Wt||!Re))break;if(Gr=0?_-1:f-1,S=(v+1)%f,I=n[2*t[b]],L=n[2*t[S]],F=n[2*t[_]],q=n[2*t[_]+1],U=n[2*t[v]+1];let W=!1;if(IL)W=!1;else{const J=U-q,ce=-(n[2*t[v]]-F),Re=q((L-F)*J+(n[2*t[S]+1]-q)*ce)*Re&&(W=!0)}if(W){const J=t[b],ce=t[_],Re=t[v];J!==ce&&J!==Re&&ce!==Re&&r.push(Re,ce,J),_--,_<0&&(_=f-1)}else{const J=t[S],ce=t[_],Re=t[v];J!==ce&&J!==Re&&ce!==Re&&r.push(Re,ce,J),v++,v>=f&&(v=0)}if(b===S)break}}function L_(n,t,r,o,c,f,_,v,b){const S=c.length/2,I=_&&v&&b;if(SKr.MAX_VERTEX_ARRAY_LENGTH&&(Ce=L.createNewSegment(F,q),ye=Re.count,Ht=!0,Cr=!0,Gt=!0,Ke=0);const Wt=Cu(ce,U,J,Re,St,Ht,Ce),gt=Cu(ce,U,J,Re,Yt,Cr,Ce),Nr=Cu(ce,U,J,Re,qt,Gt,Ce);q.emplaceBack(Ke+Wt-ye,Ke+gt-ye,Ke+Nr-ye),Ce.primitiveLength++}})(t,r,o,c,f,n),I&&(function(L,F,q,U,W,J){const ce=[];for(let ct=0;ctKr.MAX_VERTEX_ARRAY_LENGTH&&(Ce=L.createNewSegment(F,q),ye=Re.count,Cr=!0,Gt=!0,Ke=0);const Wt=Cu(ce,U,J,Re,qt,Cr,Ce),gt=Cu(ce,U,J,Re,Ht,Gt,Ce);q.emplaceBack(Ke+Wt-ye,Ke+gt-ye),Ce.primitiveLength++}}})(_,r,v,c,b,n),t.forceNewSegmentOnNextPrepare(),_==null||_.forceNewSegmentOnNextPrepare()}function Cu(n,t,r,o,c,f,_){if(f){const v=o.count;return r(t[2*c],t[2*c+1]),n[c]=o.count,o.count++,_.vertexLength++,v}return n[c]}class nf{constructor(t){this.zoom=t.zoom,this.globalState=t.globalState,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((r=>r.id)),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new rt,this.indexArray=new Rn,this.indexArray2=new Ln,this.programConfigurations=new la(t.layers,t.zoom),this.segments=new Kr,this.segments2=new Kr,this.stateDependentLayerIds=this.layers.filter((r=>r.isStateDependent())).map((r=>r.id))}populate(t,r,o){this.hasPattern=Qp("fill",this.layers,r);const c=this.layers[0].layout.get("fill-sort-key"),f=!c.isConstant(),_=[];for(const{feature:v,id:b,index:S,sourceLayerIndex:I}of t){const L=this.layers[0]._featureFilter.needGeometry,F=no(v,L);if(!this.layers[0]._featureFilter.filter(new Un(this.zoom,{globalState:this.globalState}),F,o))continue;const q=f?c.evaluate(F,{},o,r.availableImages):void 0,U={id:b,properties:v.properties,type:v.type,sourceLayerIndex:I,index:S,geometry:L?F.geometry:bo(v),patterns:{},sortKey:q};_.push(U)}f&&_.sort(((v,b)=>v.sortKey-b.sortKey));for(const v of _){const{geometry:b,index:S,sourceLayerIndex:I}=v;if(this.hasPattern){const L=ef("fill",this.layers,v,this.zoom,r);this.patternFeatures.push(L)}else this.addFeature(v,b,S,o,{},r.subdivisionGranularity);r.featureIndex.insert(t[S].feature,b,S,I,this.index)}}update(t,r,o){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,r,this.stateDependentLayers,o)}addFeatures(t,r,o){for(const c of this.patternFeatures)this.addFeature(c,c.geometry,c.index,r,o,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,hy),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,r,o,c,f,_){for(const v of Os(r,500)){const b=z_(v,c,_.fill.getGranularityForZoomLevel(c.z)),S=this.layoutVertexArray;L_(((I,L)=>{S.emplaceBack(I,L)}),this.segments,this.layoutVertexArray,this.indexArray,b.verticesFlattened,b.indicesTriangles,this.segments2,this.indexArray2,b.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,o,f,c)}}let D_,R_;nr("FillBucket",nf,{omit:["layers","patternFeatures"]});var Ty={get paint(){return R_=R_||new Ui({"fill-antialias":new br(xe.paint_fill["fill-antialias"]),"fill-opacity":new Or(xe.paint_fill["fill-opacity"]),"fill-color":new Or(xe.paint_fill["fill-color"]),"fill-outline-color":new Or(xe.paint_fill["fill-outline-color"]),"fill-translate":new br(xe.paint_fill["fill-translate"]),"fill-translate-anchor":new br(xe.paint_fill["fill-translate-anchor"]),"fill-pattern":new Zl(xe.paint_fill["fill-pattern"])})},get layout(){return D_=D_||new Ui({"fill-sort-key":new Or(xe.layout_fill["fill-sort-key"])})}};class Cy extends xa{constructor(t){super(t,Ty)}recalculate(t,r){super.recalculate(t,r);const o=this.paint._values["fill-outline-color"];o.value.kind==="constant"&&o.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(t){return new nf(t)}queryRadius(){return Pd(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:t,geometry:r,transform:o,pixelsToTileUnits:c}){return p_(Id(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-o.bearingInRadians,c),r)}isTileClipped(){return!0}}const Sy=ti([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Py=ti([{name:"a_centroid",components:2,type:"Int16"}],4),{members:Iy}=Sy;class ec{constructor(t,r,o,c,f){this.properties={},this.extent=o,this.type=0,this.id=void 0,this._pbf=t,this._geometry=-1,this._keys=c,this._values=f,t.readFields(My,this,r)}loadGeometry(){const t=this._pbf;t.pos=this._geometry;const r=t.readVarint()+t.pos,o=[];let c,f=1,_=0,v=0,b=0;for(;t.pos>3}if(_--,f===1||f===2)v+=t.readSVarint(),b+=t.readSVarint(),f===1&&(c&&o.push(c),c=[]),c&&c.push(new B(v,b));else{if(f!==7)throw new Error(`unknown command ${f}`);c&&c.push(c[0].clone())}}return c&&o.push(c),o}bbox(){const t=this._pbf;t.pos=this._geometry;const r=t.readVarint()+t.pos;let o=1,c=0,f=0,_=0,v=1/0,b=-1/0,S=1/0,I=-1/0;for(;t.pos>3}if(c--,o===1||o===2)f+=t.readSVarint(),_+=t.readSVarint(),fb&&(b=f),_I&&(I=_);else if(o!==7)throw new Error(`unknown command ${o}`)}return[v,S,b,I]}toGeoJSON(t,r,o){const c=this.extent*Math.pow(2,o),f=this.extent*t,_=this.extent*r,v=this.loadGeometry();function b(F){return[360*(F.x+f)/c-180,360/Math.PI*Math.atan(Math.exp((1-2*(F.y+_)/c)*Math.PI))-90]}function S(F){return F.map(b)}let I;if(this.type===1){const F=[];for(const U of v)F.push(U[0]);const q=S(F);I=F.length===1?{type:"Point",coordinates:q[0]}:{type:"MultiPoint",coordinates:q}}else if(this.type===2){const F=v.map(S);I=F.length===1?{type:"LineString",coordinates:F[0]}:{type:"MultiLineString",coordinates:F}}else{if(this.type!==3)throw new Error("unknown feature type");{const F=(function(U){const W=U.length;if(W<=1)return[U];const J=[];let ce,Re;for(let ye=0;ye=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];const r=this._pbf.readVarint()+this._pbf.pos;return new ec(this._pbf,r,this.extent,this._keys,this._values)}}function Ay(n,t,r){n===15?t.version=r.readVarint():n===1?t.name=r.readString():n===5?t.extent=r.readVarint():n===2?t._features.push(r.pos):n===3?t._keys.push(r.readString()):n===4&&t._values.push((function(o){let c=null;const f=o.readVarint()+o.pos;for(;o.pos>3;c=_===1?o.readString():_===2?o.readFloat():_===3?o.readDouble():_===4?o.readVarint64():_===5?o.readVarint():_===6?o.readSVarint():_===7?o.readBoolean():null}if(c==null)throw new Error("unknown feature value");return c})(r))}class F_{constructor(t,r){this.layers=t.readFields(Ey,{},r)}}function Ey(n,t,r){if(n===3){const o=new B_(r,r.readVarint()+r.pos);o.length&&(t[o.name]=o)}}const af=Math.pow(2,13);function Su(n,t,r,o,c,f,_,v){n.emplaceBack(t,r,2*Math.floor(o*af)+_,c*af*2,f*af*2,Math.round(v))}class of{constructor(t){this.zoom=t.zoom,this.globalState=t.globalState,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((r=>r.id)),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Ge,this.centroidVertexArray=new _e,this.indexArray=new Rn,this.programConfigurations=new la(t.layers,t.zoom),this.segments=new Kr,this.stateDependentLayerIds=this.layers.filter((r=>r.isStateDependent())).map((r=>r.id))}populate(t,r,o){this.features=[],this.hasPattern=Qp("fill-extrusion",this.layers,r);for(const{feature:c,id:f,index:_,sourceLayerIndex:v}of t){const b=this.layers[0]._featureFilter.needGeometry,S=no(c,b);if(!this.layers[0]._featureFilter.filter(new Un(this.zoom,{globalState:this.globalState}),S,o))continue;const I={id:f,sourceLayerIndex:v,index:_,geometry:b?S.geometry:bo(c),properties:c.properties,type:c.type,patterns:{}};this.hasPattern?this.features.push(ef("fill-extrusion",this.layers,I,this.zoom,r)):this.addFeature(I,I.geometry,_,o,{},r.subdivisionGranularity),r.featureIndex.insert(c,I.geometry,_,v,this.index,!0)}}addFeatures(t,r,o){for(const c of this.features){const{geometry:f}=c;this.addFeature(c,f,c.index,r,o,t.subdivisionGranularity)}}update(t,r,o){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,r,this.stateDependentLayers,o)}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,Iy),this.centroidVertexBuffer=t.createVertexBuffer(this.centroidVertexArray,Py.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,r,o,c,f,_){for(const v of Os(r,500)){const b={x:0,y:0,sampleCount:0},S=this.layoutVertexArray.length;this.processPolygon(b,c,t,v,_);const I=this.layoutVertexArray.length-S,L=Math.floor(b.x/b.sampleCount),F=Math.floor(b.y/b.sampleCount);for(let q=0;q{Su(I,L,F,0,0,1,1,0)}),this.segments,this.layoutVertexArray,this.indexArray,S.verticesFlattened,S.indicesTriangles)}_generateSideFaces(t,r){let o=0;for(let c=1;cKr.MAX_VERTEX_ARRAY_LENGTH&&(r.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const v=f.sub(_)._perp()._unit(),b=_.dist(f);o+b>32768&&(o=0),Su(this.layoutVertexArray,f.x,f.y,v.x,v.y,0,0,o),Su(this.layoutVertexArray,f.x,f.y,v.x,v.y,0,1,o),o+=b,Su(this.layoutVertexArray,_.x,_.y,v.x,v.y,0,0,o),Su(this.layoutVertexArray,_.x,_.y,v.x,v.y,0,1,o);const S=r.segment.vertexLength;this.indexArray.emplaceBack(S,S+2,S+1),this.indexArray.emplaceBack(S+1,S+2,S+3),r.segment.vertexLength+=4,r.segment.primitiveLength+=2}}}function zy(n,t){for(let r=0;roe)||n.y===t.y&&(n.y<0||n.y>oe)}function O_(n){return n.every((t=>t.x<0))||n.every((t=>t.x>oe))||n.every((t=>t.y<0))||n.every((t=>t.y>oe))}let N_;nr("FillExtrusionBucket",of,{omit:["layers","features"]});var Dy={get paint(){return N_=N_||new Ui({"fill-extrusion-opacity":new br(xe["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Or(xe["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new br(xe["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new br(xe["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Zl(xe["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Or(xe["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Or(xe["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new br(xe["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Ry extends xa{constructor(t){super(t,Dy)}createBucket(t){return new of(t)}queryRadius(){return Pd(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:t,feature:r,featureState:o,geometry:c,transform:f,pixelsToTileUnits:_,pixelPosMatrix:v}){const b=Id(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-f.bearingInRadians,_),S=this.paint.get("fill-extrusion-height").evaluate(r,o),I=this.paint.get("fill-extrusion-base").evaluate(r,o),L=(function(q,U){const W=[];for(const J of q){const ce=[J.x,J.y,0,1];Me(ce,ce,U),W.push(new B(ce[0]/ce[3],ce[1]/ce[3]))}return W})(b,v),F=(function(q,U,W,J){const ce=[],Re=[],ye=J[8]*U,Ce=J[9]*U,Ke=J[10]*U,ct=J[11]*U,St=J[8]*W,Yt=J[9]*W,qt=J[10]*W,Ht=J[11]*W;for(const Cr of q){const Gt=[],Wt=[];for(const gt of Cr){const Nr=gt.x,Gr=gt.y,kr=J[0]*Nr+J[4]*Gr+J[12],vr=J[1]*Nr+J[5]*Gr+J[13],hn=J[2]*Nr+J[6]*Gr+J[14],Qn=J[3]*Nr+J[7]*Gr+J[15],gi=hn+Ke,qi=Qn+ct,Ba=kr+St,ua=vr+Yt,Ri=hn+qt,Xn=Qn+Ht,Pi=new B((kr+ye)/qi,(vr+Ce)/qi);Pi.z=gi/qi,Gt.push(Pi);const Bi=new B(Ba/Xn,ua/Xn);Bi.z=Ri/Xn,Wt.push(Bi)}ce.push(Gt),Re.push(Wt)}return[ce,Re]})(c,I,S,v);return(function(q,U,W){let J=1/0;p_(W,U)&&(J=j_(W,U[0]));for(let ce=0;cer.id)),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach((r=>{this.gradients[r.id]={}})),this.layoutVertexArray=new Xe,this.layoutVertexArray2=new tt,this.indexArray=new Rn,this.programConfigurations=new la(t.layers,t.zoom),this.segments=new Kr,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((r=>r.isStateDependent())).map((r=>r.id))}populate(t,r,o){this.hasPattern=Qp("line",this.layers,r);const c=this.layers[0].layout.get("line-sort-key"),f=!c.isConstant(),_=[];for(const{feature:v,id:b,index:S,sourceLayerIndex:I}of t){const L=this.layers[0]._featureFilter.needGeometry,F=no(v,L);if(!this.layers[0]._featureFilter.filter(new Un(this.zoom,{globalState:this.globalState}),F,o))continue;const q=f?c.evaluate(F,{},o):void 0,U={id:b,properties:v.properties,type:v.type,sourceLayerIndex:I,index:S,geometry:L?F.geometry:bo(v),patterns:{},sortKey:q};_.push(U)}f&&_.sort(((v,b)=>v.sortKey-b.sortKey));for(const v of _){const{geometry:b,index:S,sourceLayerIndex:I}=v;if(this.hasPattern){const L=ef("line",this.layers,v,this.zoom,r);this.patternFeatures.push(L)}else this.addFeature(v,b,S,o,{},r.subdivisionGranularity);r.featureIndex.insert(t[S].feature,b,S,I,this.index)}}update(t,r,o){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,r,this.stateDependentLayers,o)}addFeatures(t,r,o){for(const c of this.patternFeatures)this.addFeature(c,c.geometry,c.index,r,o,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,Ny)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Fy),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.prototype.hasOwnProperty.call(t.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(t.properties,"mapbox_clip_end"))return{start:+t.properties.mapbox_clip_start,end:+t.properties.mapbox_clip_end}}addFeature(t,r,o,c,f,_){const v=this.layers[0].layout,b=v.get("line-join").evaluate(t,{}),S=v.get("line-cap"),I=v.get("line-miter-limit"),L=v.get("line-round-limit");this.lineClips=this.lineFeatureClips(t);for(const F of r)this.addLine(F,t,b,S,I,L,c,_);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,o,f,c)}addLine(t,r,o,c,f,_,v,b){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,t=tl(t,v?b.line.getGranularityForZoomLevel(v.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let ye=0;ye=2&&t[I-1].equals(t[I-2]);)I--;let L=0;for(;L0;if(qt&&ye>L){const Wt=U.dist(W);if(Wt>2*F){const gt=U.sub(U.sub(W)._mult(F/Wt)._round());this.updateDistance(W,gt),this.addCurrentVertex(gt,ce,0,0,q),W=gt}}const Cr=W&&J;let Gt=Cr?o:S?"butt":c;if(Cr&&Gt==="round"&&(St<_?Gt="miter":St<=2&&(Gt="fakeround")),Gt==="miter"&&St>f&&(Gt="bevel"),Gt==="bevel"&&(St>2&&(Gt="flipbevel"),St100)Ce=Re.mult(-1);else{const Wt=St*ce.add(Re).mag()/ce.sub(Re).mag();Ce._perp()._mult(Wt*(Ht?-1:1))}this.addCurrentVertex(U,Ce,0,0,q),this.addCurrentVertex(U,Ce.mult(-1),0,0,q)}else if(Gt==="bevel"||Gt==="fakeround"){const Wt=-Math.sqrt(St*St-1),gt=Ht?Wt:0,Nr=Ht?0:Wt;if(W&&this.addCurrentVertex(U,ce,gt,Nr,q),Gt==="fakeround"){const Gr=Math.round(180*Yt/Math.PI/20);for(let kr=1;kr2*F){const gt=U.add(J.sub(U)._mult(F/Wt)._round());this.updateDistance(U,gt),this.addCurrentVertex(gt,Re,0,0,q),U=gt}}}}addCurrentVertex(t,r,o,c,f,_=!1){const v=r.y*c-r.x,b=-r.y-r.x*c;this.addHalfVertex(t,r.x+r.y*o,r.y-r.x*o,_,!1,o,f),this.addHalfVertex(t,v,b,_,!0,-c,f),this.distance>V_/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(t,r,o,c,f,_))}addHalfVertex({x:t,y:r},o,c,f,_,v,b){const S=.5*(this.lineClips?this.scaledDistance*(V_-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((t<<1)+(f?1:0),(r<<1)+(_?1:0),Math.round(63*o)+128,Math.round(63*c)+128,1+(v===0?0:v<0?-1:1)|(63&S)<<2,S>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const I=b.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,I,this.e2),b.primitiveLength++),_?this.e2=I:this.e1=I}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(t,r){this.distance+=t.dist(r),this.updateScaledDistance()}}let q_,Z_;nr("LineBucket",sf,{omit:["layers","patternFeatures"]});var U_={get paint(){return Z_=Z_||new Ui({"line-opacity":new Or(xe.paint_line["line-opacity"]),"line-color":new Or(xe.paint_line["line-color"]),"line-translate":new br(xe.paint_line["line-translate"]),"line-translate-anchor":new br(xe.paint_line["line-translate-anchor"]),"line-width":new Or(xe.paint_line["line-width"]),"line-gap-width":new Or(xe.paint_line["line-gap-width"]),"line-offset":new Or(xe.paint_line["line-offset"]),"line-blur":new Or(xe.paint_line["line-blur"]),"line-dasharray":new _o(xe.paint_line["line-dasharray"]),"line-pattern":new Zl(xe.paint_line["line-pattern"]),"line-gradient":new Ul(xe.paint_line["line-gradient"])})},get layout(){return q_=q_||new Ui({"line-cap":new br(xe.layout_line["line-cap"]),"line-join":new Or(xe.layout_line["line-join"]),"line-miter-limit":new br(xe.layout_line["line-miter-limit"]),"line-round-limit":new br(xe.layout_line["line-round-limit"]),"line-sort-key":new Or(xe.layout_line["line-sort-key"])})}};class Vy extends Or{possiblyEvaluate(t,r){return r=new Un(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),super.possiblyEvaluate(t,r)}evaluate(t,r,o,c){return r=dt({},r,{zoom:Math.floor(r.zoom)}),super.evaluate(t,r,o,c)}}let Ed;class qy extends xa{constructor(t){super(t,U_),this.gradientVersion=0,Ed||(Ed=new Vy(U_.paint.properties["line-width"].specification),Ed.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(t){if(t==="line-gradient"){const r=this.gradientExpression();this.stepInterpolant=!!(function(o){return o._styleExpression!==void 0})(r)&&r._styleExpression.expression instanceof ei,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(t,r){super.recalculate(t,r),this.paint._values["line-floorwidth"]=Ed.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}createBucket(t){return new sf(t)}queryRadius(t){const r=t,o=$_(gu("line-width",this,r),gu("line-gap-width",this,r)),c=gu("line-offset",this,r);return o/2+Math.abs(c)+Pd(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:t,feature:r,featureState:o,geometry:c,transform:f,pixelsToTileUnits:_}){const v=Id(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-f.bearingInRadians,_),b=_/2*$_(this.paint.get("line-width").evaluate(r,o),this.paint.get("line-gap-width").evaluate(r,o)),S=this.paint.get("line-offset").evaluate(r,o);return S&&(c=(function(I,L){const F=[];for(let q=0;q=3){for(let W=0;W0?t+2*n:n}const Zy=ti([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Uy=ti([{name:"a_projected_pos",components:3,type:"Float32"}],4);ti([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const $y=ti([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ti([{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 G_=ti([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Gy=ti([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Hy(n,t,r){return n.sections.forEach((o=>{o.text=(function(c,f,_){const v=f.layout.get("text-transform").evaluate(_,{});return v==="uppercase"?c=c.toLocaleUpperCase():v==="lowercase"&&(c=c.toLocaleLowerCase()),Ea.applyArabicShaping&&(c=Ea.applyArabicShaping(c)),c})(o.text,t,r)})),n}ti([{name:"triangle",components:3,type:"Uint16"}]),ti([{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"}]),ti([{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"}]),ti([{type:"Float32",name:"offsetX"}]),ti([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ti([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const Iu={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var Si=24;const lf=4294967296,H_=1/lf,W_=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");class cf{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,r,o=this.length){for(;this.pos>3,_=this.pos;this.type=7&c,t(f,r,this),this.pos===_&&this.skip(c)}return r}readMessage(t,r){return this.readFields(t,r,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)*lf;return this.pos+=8,t}readSFixed64(){const t=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*lf;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 r=this.buf;let o,c;return c=r[this.pos++],o=127&c,c<128?o:(c=r[this.pos++],o|=(127&c)<<7,c<128?o:(c=r[this.pos++],o|=(127&c)<<14,c<128?o:(c=r[this.pos++],o|=(127&c)<<21,c<128?o:(c=r[this.pos],o|=(15&c)<<28,(function(f,_,v){const b=v.buf;let S,I;if(I=b[v.pos++],S=(112&I)>>4,I<128||(I=b[v.pos++],S|=(127&I)<<3,I<128)||(I=b[v.pos++],S|=(127&I)<<10,I<128)||(I=b[v.pos++],S|=(127&I)<<17,I<128)||(I=b[v.pos++],S|=(127&I)<<24,I<128)||(I=b[v.pos++],S|=(1&I)<<31,I<128))return tc(f,S,_);throw new Error("Expected varint not more than 10 bytes")})(o,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,r=this.pos;return this.pos=t,t-r>=12&&W_?W_.decode(this.buf.subarray(r,t)):(function(o,c,f){let _="",v=c;for(;v239?4:b>223?3:b>191?2:1;if(v+q>f)break;q===1?b<128&&(F=b):q===2?(S=o[v+1],(192&S)==128&&(F=(31&b)<<6|63&S,F<=127&&(F=null))):q===3?(S=o[v+1],I=o[v+2],(192&S)==128&&(192&I)==128&&(F=(15&b)<<12|(63&S)<<6|63&I,(F<=2047||F>=55296&&F<=57343)&&(F=null))):q===4&&(S=o[v+1],I=o[v+2],L=o[v+3],(192&S)==128&&(192&I)==128&&(192&L)==128&&(F=(15&b)<<18|(63&S)<<12|(63&I)<<6|63&L,(F<=65535||F>=1114112)&&(F=null))),F===null?(F=65533,q=1):F>65535&&(F-=65536,_+=String.fromCharCode(F>>>10&1023|55296),F=56320|1023&F),_+=String.fromCharCode(F),v+=q}return _})(this.buf,r,t)}readBytes(){const t=this.readVarint()+this.pos,r=this.buf.subarray(this.pos,t);return this.pos=t,r}readPackedVarint(t=[],r){const o=this.readPackedEnd();for(;this.pos127;);else if(r===2)this.pos=this.readVarint()+this.pos;else if(r===5)this.pos+=4;else{if(r!==1)throw new Error(`Unimplemented type: ${r}`);this.pos+=8}}writeTag(t,r){this.writeVarint(t<<3|r)}realloc(t){let r=this.length||16;for(;r268435455||t<0?(function(r,o){let c,f;if(r>=0?(c=r%4294967296|0,f=r/4294967296|0):(c=~(-r%4294967296),f=~(-r/4294967296),4294967295^c?c=c+1|0:(c=0,f=f+1|0)),r>=18446744073709552e3||r<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");o.realloc(10),(function(_,v,b){b.buf[b.pos++]=127&_|128,_>>>=7,b.buf[b.pos++]=127&_|128,_>>>=7,b.buf[b.pos++]=127&_|128,_>>>=7,b.buf[b.pos++]=127&_|128,b.buf[b.pos]=127&(_>>>=7)})(c,0,o),(function(_,v){const b=(7&_)<<4;v.buf[v.pos++]|=b|((_>>>=3)?128:0),_&&(v.buf[v.pos++]=127&_|((_>>>=7)?128:0),_&&(v.buf[v.pos++]=127&_|((_>>>=7)?128:0),_&&(v.buf[v.pos++]=127&_|((_>>>=7)?128:0),_&&(v.buf[v.pos++]=127&_|((_>>>=7)?128:0),_&&(v.buf[v.pos++]=127&_)))))})(f,o)})(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 r=this.pos;this.pos=(function(c,f,_){for(let v,b,S=0;S55295&&v<57344){if(!b){v>56319||S+1===f.length?(c[_++]=239,c[_++]=191,c[_++]=189):b=v;continue}if(v<56320){c[_++]=239,c[_++]=191,c[_++]=189,b=v;continue}v=b-55296<<10|v-56320|65536,b=null}else b&&(c[_++]=239,c[_++]=191,c[_++]=189,b=null);v<128?c[_++]=v:(v<2048?c[_++]=v>>6|192:(v<65536?c[_++]=v>>12|224:(c[_++]=v>>18|240,c[_++]=v>>12&63|128),c[_++]=v>>6&63|128),c[_++]=63&v|128)}return _})(this.buf,t,this.pos);const o=this.pos-r;o>=128&&X_(r,o,this),this.pos=r-1,this.writeVarint(o),this.pos+=o}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 r=t.length;this.writeVarint(r),this.realloc(r);for(let o=0;o=128&&X_(o,c,this),this.pos=o-1,this.writeVarint(c),this.pos+=c}writeMessage(t,r,o){this.writeTag(t,2),this.writeRawMessage(r,o)}writePackedVarint(t,r){r.length&&this.writeMessage(t,Wy,r)}writePackedSVarint(t,r){r.length&&this.writeMessage(t,Xy,r)}writePackedBoolean(t,r){r.length&&this.writeMessage(t,Jy,r)}writePackedFloat(t,r){r.length&&this.writeMessage(t,Yy,r)}writePackedDouble(t,r){r.length&&this.writeMessage(t,Ky,r)}writePackedFixed32(t,r){r.length&&this.writeMessage(t,Qy,r)}writePackedSFixed32(t,r){r.length&&this.writeMessage(t,e1,r)}writePackedFixed64(t,r){r.length&&this.writeMessage(t,t1,r)}writePackedSFixed64(t,r){r.length&&this.writeMessage(t,r1,r)}writeBytesField(t,r){this.writeTag(t,2),this.writeBytes(r)}writeFixed32Field(t,r){this.writeTag(t,5),this.writeFixed32(r)}writeSFixed32Field(t,r){this.writeTag(t,5),this.writeSFixed32(r)}writeFixed64Field(t,r){this.writeTag(t,1),this.writeFixed64(r)}writeSFixed64Field(t,r){this.writeTag(t,1),this.writeSFixed64(r)}writeVarintField(t,r){this.writeTag(t,0),this.writeVarint(r)}writeSVarintField(t,r){this.writeTag(t,0),this.writeSVarint(r)}writeStringField(t,r){this.writeTag(t,2),this.writeString(r)}writeFloatField(t,r){this.writeTag(t,5),this.writeFloat(r)}writeDoubleField(t,r){this.writeTag(t,1),this.writeDouble(r)}writeBooleanField(t,r){this.writeVarintField(t,+r)}}function tc(n,t,r){return r?4294967296*t+(n>>>0):4294967296*(t>>>0)+(n>>>0)}function X_(n,t,r){const o=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(o);for(let c=r.pos-1;c>=n;c--)r.buf[c+o]=r.buf[c]}function Wy(n,t){for(let r=0;rv.h-_.h));const o=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),r),h:1/0}];let c=0,f=0;for(const _ of n)for(let v=o.length-1;v>=0;v--){const b=o[v];if(!(_.w>b.w||_.h>b.h)){if(_.x=b.x,_.y=b.y,f=Math.max(f,_.y+_.h),c=Math.max(c,_.x+_.w),_.w===b.w&&_.h===b.h){const S=o.pop();S&&v=0&&o>=t&&Ld[this.text.charCodeAt(o)];o--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)}substring(t,r){const o=new rc;return o.text=this.text.substring(t,r),o.sectionIndex=this.sectionIndex.slice(t,r),o.sections=this.sections,o}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce(((t,r)=>Math.max(t,this.sections[r].scale)),0)}getMaxImageSize(t){let r=0,o=0;for(let c=0;c=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function zd(n,t,r,o,c,f,_,v,b,S,I,L,F,q,U){const W=rc.fromFeature(n,c);let J;L===T.ao.vertical&&W.verticalizePunctuation();const{processBidirectionalText:ce,processStyledBidirectionalText:Re}=Ea;if(ce&&W.sections.length===1){J=[];const Ke=ce(W.toString(),hf(W,S,f,t,o,q));for(const ct of Ke){const St=new rc;St.text=ct,St.sections=W.sections;for(let Yt=0;Yt=0;let S=0;for(let L=0;LS){const I=Math.ceil(f/S);c*=I/_,_=I}return{x1:o,y1:c,x2:o+f,y2:c+_}}function ig(n,t,r,o,c,f){const _=n.image;let v;if(_.content){const J=_.content,ce=_.pixelRatio||1;v=[J[0]/ce,J[1]/ce,_.displaySize[0]-J[2]/ce,_.displaySize[1]-J[3]/ce]}const b=t.left*f,S=t.right*f;let I,L,F,q;r==="width"||r==="both"?(q=c[0]+b-o[3],L=c[0]+S+o[1]):(q=c[0]+(b+S-_.displaySize[0])/2,L=q+_.displaySize[0]);const U=t.top*f,W=t.bottom*f;return r==="height"||r==="both"?(I=c[1]+U-o[0],F=c[1]+W+o[2]):(I=c[1]+(U+W-_.displaySize[1])/2,F=I+_.displaySize[1]),{image:_,top:I,right:L,bottom:F,left:q,collisionPadding:v}}const Zo=128,vs=32640;function ag(n,t){const{expression:r}=t;if(r.kind==="constant")return{kind:"constant",layoutSize:r.evaluate(new Un(n+1))};if(r.kind==="source")return{kind:"source"};{const{zoomStops:o,interpolationType:c}=r;let f=0;for(;f_.id)),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];const r=this.layers[0]._unevaluatedLayout._values;this.textSizeData=ag(this.zoom,r["text-size"]),this.iconSizeData=ag(this.zoom,r["icon-size"]);const o=this.layers[0].layout,c=o.get("symbol-sort-key"),f=o.get("symbol-z-order");this.canOverlap=pf(o,"text-overlap","text-allow-overlap")!=="never"||pf(o,"icon-overlap","icon-allow-overlap")!=="never"||o.get("text-ignore-placement")||o.get("icon-ignore-placement"),this.sortFeaturesByKey=f!=="viewport-y"&&!c.isConstant(),this.sortFeaturesByY=(f==="viewport-y"||f==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,o.get("symbol-placement")==="point"&&(this.writingModes=o.get("text-writing-mode").map((_=>T.ao[_]))),this.stateDependentLayerIds=this.layers.filter((_=>_.isStateDependent())).map((_=>_.id)),this.sourceID=t.sourceID}createArrays(){this.text=new mf(new la(this.layers,this.zoom,(t=>/^text/.test(t)))),this.icon=new mf(new la(this.layers,this.zoom,(t=>/^icon/.test(t)))),this.glyphOffsetArray=new ie,this.lineVertexArray=new ue,this.symbolInstances=new ee,this.textAnchorOffsets=new me}calculateGlyphDependencies(t,r,o,c,f){for(let _=0;_0)&&(_.value.kind!=="constant"||_.value.value.length>0),I=b.value.kind!=="constant"||!!b.value.value||Object.keys(b.parameters).length>0,L=f.get("symbol-sort-key");if(this.features=[],!S&&!I)return;const F=r.iconDependencies,q=r.glyphDependencies,U=r.availableImages,W=new Un(this.zoom,{globalState:this.globalState});for(const{feature:J,id:ce,index:Re,sourceLayerIndex:ye}of t){const Ce=c._featureFilter.needGeometry,Ke=no(J,Ce);if(!c._featureFilter.filter(W,Ke,o))continue;let ct,St;if(Ce||(Ke.geometry=bo(J)),S){const qt=c.getValueAndResolveTokens("text-field",Ke,o,U),Ht=Sn.factory(qt),Cr=this.hasRTLText=this.hasRTLText||_1(Ht);(!Cr||Ea.getRTLTextPluginStatus()==="unavailable"||Cr&&Ea.isParsed())&&(ct=Hy(Ht,c,Ke))}if(I){const qt=c.getValueAndResolveTokens("icon-image",Ke,o,U);St=qt instanceof Hn?qt:Hn.fromString(qt)}if(!ct&&!St)continue;const Yt=this.sortFeaturesByKey?L.evaluate(Ke,{},o):void 0;if(this.features.push({id:ce,text:ct,icon:St,index:Re,sourceLayerIndex:ye,geometry:Ke.geometry,properties:J.properties,type:ec.types[J.type],sortKey:Yt}),St&&(F[St.name]=!0),ct){const qt=_.evaluate(Ke,{},o).join(","),Ht=f.get("text-rotation-alignment")!=="viewport"&&f.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(T.ao.vertical)>=0;for(const Cr of ct.sections)if(Cr.image)F[Cr.image.name]=!0;else{const Gt=jl(ct.toString()),Wt=Cr.fontStack||qt,gt=q[Wt]=q[Wt]||{};this.calculateGlyphDependencies(Cr.text,gt,Ht,this.allowVerticalPlacement,Gt)}}}f.get("symbol-placement")==="line"&&(this.features=(function(J){const ce={},Re={},ye=[];let Ce=0;function Ke(qt){ye.push(J[qt]),Ce++}function ct(qt,Ht,Cr){const Gt=Re[qt];return delete Re[qt],Re[Ht]=Gt,ye[Gt].geometry[0].pop(),ye[Gt].geometry[0]=ye[Gt].geometry[0].concat(Cr[0]),Gt}function St(qt,Ht,Cr){const Gt=ce[Ht];return delete ce[Ht],ce[qt]=Gt,ye[Gt].geometry[0].shift(),ye[Gt].geometry[0]=Cr[0].concat(ye[Gt].geometry[0]),Gt}function Yt(qt,Ht,Cr){const Gt=Cr?Ht[0][Ht[0].length-1]:Ht[0][0];return`${qt}:${Gt.x}:${Gt.y}`}for(let qt=0;qtqt.geometry))})(this.features)),this.sortFeaturesByKey&&this.features.sort(((J,ce)=>J.sortKey-ce.sortKey))}update(t,r,o){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,r,this.layers,o),this.icon.programConfigurations.updatePaintArrays(t,r,this.layers,o))}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,r){const o=this.lineVertexArray.length;if(t.segment!==void 0){let c=t.dist(r[t.segment+1]),f=t.dist(r[t.segment]);const _={};for(let v=t.segment+1;v=0;v--)_[v]={x:r[v].x,y:r[v].y,tileUnitDistanceFromAnchor:f},v>0&&(f+=r[v-1].dist(r[v]));for(let v=0;v0}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,r){const o=t.placedSymbolArray.get(r),c=o.vertexStartIndex+4*o.numGlyphs;for(let f=o.vertexStartIndex;fc[v]-c[b]||f[b]-f[v])),_}addToSortKeyRanges(t,r){const o=this.sortKeyRanges[this.sortKeyRanges.length-1];o&&o.sortKey===r?o.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:r,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 r of this.symbolInstanceIndexes){const o=this.symbolInstances.get(r);this.featureSortOrder.push(o.featureIndex),[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex].forEach(((c,f,_)=>{c>=0&&_.indexOf(c)===f&&this.addIndicesForPlacedSymbol(this.text,c)})),o.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,o.verticalPlacedTextSymbolIndex),o.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.placedIconSymbolIndex),o.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let og,sg;nr("SymbolBucket",nc,{omit:["layers","collisionBoxArray","features","compareText"]}),nc.MAX_GLYPHS=65535,nc.addDynamicAttributes=ff;var gf={get paint(){return sg=sg||new Ui({"icon-opacity":new Or(xe.paint_symbol["icon-opacity"]),"icon-color":new Or(xe.paint_symbol["icon-color"]),"icon-halo-color":new Or(xe.paint_symbol["icon-halo-color"]),"icon-halo-width":new Or(xe.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Or(xe.paint_symbol["icon-halo-blur"]),"icon-translate":new br(xe.paint_symbol["icon-translate"]),"icon-translate-anchor":new br(xe.paint_symbol["icon-translate-anchor"]),"text-opacity":new Or(xe.paint_symbol["text-opacity"]),"text-color":new Or(xe.paint_symbol["text-color"],{runtimeType:Kt,getOverride:n=>n.textColor,hasOverride:n=>!!n.textColor}),"text-halo-color":new Or(xe.paint_symbol["text-halo-color"]),"text-halo-width":new Or(xe.paint_symbol["text-halo-width"]),"text-halo-blur":new Or(xe.paint_symbol["text-halo-blur"]),"text-translate":new br(xe.paint_symbol["text-translate"]),"text-translate-anchor":new br(xe.paint_symbol["text-translate-anchor"])})},get layout(){return og=og||new Ui({"symbol-placement":new br(xe.layout_symbol["symbol-placement"]),"symbol-spacing":new br(xe.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new br(xe.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Or(xe.layout_symbol["symbol-sort-key"]),"symbol-z-order":new br(xe.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new br(xe.layout_symbol["icon-allow-overlap"]),"icon-overlap":new br(xe.layout_symbol["icon-overlap"]),"icon-ignore-placement":new br(xe.layout_symbol["icon-ignore-placement"]),"icon-optional":new br(xe.layout_symbol["icon-optional"]),"icon-rotation-alignment":new br(xe.layout_symbol["icon-rotation-alignment"]),"icon-size":new Or(xe.layout_symbol["icon-size"]),"icon-text-fit":new br(xe.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new br(xe.layout_symbol["icon-text-fit-padding"]),"icon-image":new Or(xe.layout_symbol["icon-image"]),"icon-rotate":new Or(xe.layout_symbol["icon-rotate"]),"icon-padding":new Or(xe.layout_symbol["icon-padding"]),"icon-keep-upright":new br(xe.layout_symbol["icon-keep-upright"]),"icon-offset":new Or(xe.layout_symbol["icon-offset"]),"icon-anchor":new Or(xe.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new br(xe.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new br(xe.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new br(xe.layout_symbol["text-rotation-alignment"]),"text-field":new Or(xe.layout_symbol["text-field"]),"text-font":new Or(xe.layout_symbol["text-font"]),"text-size":new Or(xe.layout_symbol["text-size"]),"text-max-width":new Or(xe.layout_symbol["text-max-width"]),"text-line-height":new br(xe.layout_symbol["text-line-height"]),"text-letter-spacing":new Or(xe.layout_symbol["text-letter-spacing"]),"text-justify":new Or(xe.layout_symbol["text-justify"]),"text-radial-offset":new Or(xe.layout_symbol["text-radial-offset"]),"text-variable-anchor":new br(xe.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Or(xe.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Or(xe.layout_symbol["text-anchor"]),"text-max-angle":new br(xe.layout_symbol["text-max-angle"]),"text-writing-mode":new br(xe.layout_symbol["text-writing-mode"]),"text-rotate":new Or(xe.layout_symbol["text-rotate"]),"text-padding":new br(xe.layout_symbol["text-padding"]),"text-keep-upright":new br(xe.layout_symbol["text-keep-upright"]),"text-transform":new Or(xe.layout_symbol["text-transform"]),"text-offset":new Or(xe.layout_symbol["text-offset"]),"text-allow-overlap":new br(xe.layout_symbol["text-allow-overlap"]),"text-overlap":new br(xe.layout_symbol["text-overlap"]),"text-ignore-placement":new br(xe.layout_symbol["text-ignore-placement"]),"text-optional":new br(xe.layout_symbol["text-optional"])})}};class lg{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:mt,this.defaultValue=t}evaluate(t){if(t.formattedSection){const r=this.defaultValue.property.overrides;if(r&&r.hasOverride(t.formattedSection))return r.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}}nr("FormatSectionOverride",lg,{omit:["defaultValue"]});class Rd extends xa{constructor(t){super(t,gf)}recalculate(t,r){if(super.recalculate(t,r),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 o=this.layout.get("text-writing-mode");if(o){const c=[];for(const f of o)c.indexOf(f)<0&&c.push(f);this.layout._values["text-writing-mode"]=c}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(t,r,o,c){const f=this.layout.get(t).evaluate(r,{},o,c),_=this._unevaluatedLayout._values[t];return _.isDataDriven()||zl(_.value)||!f?f:(function(v,b){return b.replace(/{([^{}]+)}/g,((S,I)=>v&&I in v?String(v[I]):""))})(r.properties,f)}createBucket(t){return new nc(t)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const t of gf.paint.overridableProperties){if(!Rd.hasPaintOverride(this.layout,t))continue;const r=this.paint.get(t),o=new lg(r),c=new Wc(o,r.property.specification);let f=null;f=r.value.kind==="constant"||r.value.kind==="source"?new Zs("source",c):new Xc("composite",c,r.value.zoomStops),this.paint._values[t]=new $a(r.property,f,r.parameters)}}_handleOverridablePaintPropertyUpdate(t,r,o){return!(!this.layout||r.isDataDriven()||o.isDataDriven())&&Rd.hasPaintOverride(this.layout,t)}static hasPaintOverride(t,r){const o=t.get("text-field"),c=gf.paint.properties[r];let f=!1;const _=v=>{for(const b of v)if(c.overrides&&c.overrides.hasOverride(b))return void(f=!0)};if(o.value.kind==="constant"&&o.value.value instanceof Sn)_(o.value.value.sections);else if(o.value.kind==="source"){const v=S=>{f||(S instanceof _a&&Rr(S.value)===pn?_(S.value.sections):S instanceof ko?_(S.sections):S.eachChild(v))},b=o.value;b._styleExpression&&v(b._styleExpression.expression)}return f}}let cg;var g1={get paint(){return cg=cg||new Ui({"background-color":new br(xe.paint_background["background-color"]),"background-pattern":new _o(xe.paint_background["background-pattern"]),"background-opacity":new br(xe.paint_background["background-opacity"])})}};class v1 extends xa{constructor(t){super(t,g1)}}let ug;var y1={get paint(){return ug=ug||new Ui({"raster-opacity":new br(xe.paint_raster["raster-opacity"]),"raster-hue-rotate":new br(xe.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new br(xe.paint_raster["raster-brightness-min"]),"raster-brightness-max":new br(xe.paint_raster["raster-brightness-max"]),"raster-saturation":new br(xe.paint_raster["raster-saturation"]),"raster-contrast":new br(xe.paint_raster["raster-contrast"]),"raster-resampling":new br(xe.paint_raster["raster-resampling"]),"raster-fade-duration":new br(xe.paint_raster["raster-fade-duration"])})}};class x1 extends xa{constructor(t){super(t,y1)}}class b1 extends xa{constructor(t){super(t,{}),this.onAdd=r=>{this.implementation.onAdd&&this.implementation.onAdd(r,r.painter.context.gl)},this.onRemove=r=>{this.implementation.onRemove&&this.implementation.onRemove(r,r.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 w1{constructor(t){this._methodToThrottle=t,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._methodToThrottle()}),0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}const T1={once:!0},vf=63710088e-1;class ys{constructor(t,r){if(isNaN(t)||isNaN(r))throw new Error(`Invalid LngLat object: (${t}, ${r})`);if(this.lng=+t,this.lat=+r,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new ys(ot(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(t){const r=Math.PI/180,o=this.lat*r,c=t.lat*r,f=Math.sin(o)*Math.sin(c)+Math.cos(o)*Math.cos(c)*Math.cos((t.lng-this.lng)*r);return vf*Math.acos(Math.min(f,1))}static convert(t){if(t instanceof ys)return t;if(Array.isArray(t)&&(t.length===2||t.length===3))return new ys(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&typeof t=="object"&&t!==null)return new ys(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: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}const hg=2*Math.PI*vf;function dg(n){return hg*Math.cos(n*Math.PI/180)}function pg(n){return(180+n)/360}function fg(n){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n*Math.PI/360)))/360}function mg(n,t){return n/dg(t)}function yf(n){return 360/Math.PI*Math.atan(Math.exp((180-360*n)*Math.PI/180))-90}function _g(n,t){return n*dg(yf(t))}class ku{constructor(t,r,o=0){this.x=+t,this.y=+r,this.z=+o}static fromLngLat(t,r=0){const o=ys.convert(t);return new ku(pg(o.lng),fg(o.lat),mg(r,o.lat))}toLngLat(){return new ys(360*this.x-180,yf(this.y))}toAltitude(){return _g(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/hg*(t=yf(this.y),1/Math.cos(t*Math.PI/180));var t}}function gg(n,t,r){var o=2*Math.PI*6378137/256/Math.pow(2,r);return[n*o-2*Math.PI*6378137/2,t*o-2*Math.PI*6378137/2]}class xf{constructor(t,r,o){if(!(function(c,f,_){return!(c<0||c>25||_<0||_>=Math.pow(2,c)||f<0||f>=Math.pow(2,c))})(t,r,o))throw new Error(`x=${r}, y=${o}, 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=r,this.y=o,this.key=ic(0,t,t,r,o)}equals(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}url(t,r,o){const c=(_=this.y,v=this.z,b=gg(256*(f=this.x),256*(_=Math.pow(2,v)-_-1),v),S=gg(256*(f+1),256*(_+1),v),b[0]+","+b[1]+","+S[0]+","+S[1]);var f,_,v,b,S;const I=(function(L,F,q){let U,W="";for(let J=L;J>0;J--)U=1<1?"@2x":"").replace(/{quadkey}/g,I).replace(/{bbox-epsg-3857}/g,c)}isChildOf(t){const r=this.z-t.z;return r>0&&t.x===this.x>>r&&t.y===this.y>>r}getTilePoint(t){const r=Math.pow(2,this.z);return new B((t.x*r-this.x)*oe,(t.y*r-this.y)*oe)}toString(){return`${this.z}/${this.x}/${this.y}`}}class vg{constructor(t,r){this.wrap=t,this.canonical=r,this.key=ic(t,r.z,r.z,r.x,r.y)}}class Ra{constructor(t,r,o,c,f){if(this.terrainRttPosMatrix32f=null,t= z; overscaledZ = ${t}; z = ${o}`);this.overscaledZ=t,this.wrap=r,this.canonical=new xf(o,+c,+f),this.key=ic(r,t,o,c,f)}clone(){return new Ra(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 r=this.canonical.z-t;return t>this.canonical.z?new Ra(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Ra(t,this.wrap,t,this.canonical.x>>r,this.canonical.y>>r)}calculateScaledKey(t,r){if(t>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);const o=this.canonical.z-t;return t>this.canonical.z?ic(this.wrap*+r,t,this.canonical.z,this.canonical.x,this.canonical.y):ic(this.wrap*+r,t,t,this.canonical.x>>o,this.canonical.y>>o)}isChildOf(t){if(t.wrap!==this.wrap)return!1;const r=this.canonical.z-t.canonical.z;return t.overscaledZ===0||t.overscaledZ>r&&t.canonical.y===this.canonical.y>>r}children(t){if(this.overscaledZ>=t)return[new Ra(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const r=this.canonical.z+1,o=2*this.canonical.x,c=2*this.canonical.y;return[new Ra(r,this.wrap,r,o,c),new Ra(r,this.wrap,r,o+1,c),new Ra(r,this.wrap,r,o,c+1),new Ra(r,this.wrap,r,o+1,c+1)]}isLessThan(t){return this.wrapt.wrap)&&(this.overscaledZt.overscaledZ)&&(this.canonical.xt.canonical.x)&&this.canonical.ythis.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 r=new rl;return r.extend(t(new B(this.minX,this.minY))),r.extend(t(new B(this.maxX,this.minY))),r.extend(t(new B(this.minX,this.maxY))),r.extend(t(new B(this.maxX,this.maxY))),r}static fromPoints(t){const r=new rl;for(const o of t)r.extend(o);return r}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 yg{constructor(t){this._stringToNumber={},this._numberToString=[];for(let r=0;r=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 xg{constructor(t,r,o,c,f){this.type="Feature",this._vectorTileFeature=t,t._z=r,t._x=o,t._y=c,this.properties=t.properties,this.id=f}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(t){this._geometry=t}toJSON(){const t={geometry:this.geometry};for(const r in this)r!=="_geometry"&&r!=="_vectorTileFeature"&&(t[r]=this[r]);return t}}class bg{constructor(t,r){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new Ys(oe,16,0),this.grid3D=new Ys(oe,16,0),this.featureIndexArray=new Pe,this.promoteId=r}insert(t,r,o,c,f,_){const v=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(o,c,f);const b=_?this.grid3D:this.grid;for(let S=0;S=0&&L[3]>=0&&b.insert(v,L[0],L[1],L[2],L[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new F_(new cf(this.rawTileData)).layers,this.sourceLayerCoder=new yg(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(t,r,o,c){this.loadVTLayers();const f=t.params,_=oe/t.tileSize/t.scale,v=Ro(f.filter),b=t.queryGeometry,S=t.queryPadding*_,I=rl.fromPoints(b),L=this.grid.query(I.minX-S,I.minY-S,I.maxX+S,I.maxY+S),F=rl.fromPoints(t.cameraQueryGeometry).expandBy(S),q=this.grid3D.query(F.minX,F.minY,F.maxX,F.maxY,((J,ce,Re,ye)=>(function(Ce,Ke,ct,St,Yt){for(const Ht of Ce)if(Ke<=Ht.x&&ct<=Ht.y&&St>=Ht.x&&Yt>=Ht.y)return!0;const qt=[new B(Ke,ct),new B(Ke,Yt),new B(St,Yt),new B(St,ct)];if(Ce.length>2){for(const Ht of qt)if(Yl(Ce,Ht))return!0}for(let Ht=0;Ht(ye||(ye=bo(Ce)),Ke.queryIntersectsFeature({queryGeometry:b,feature:Ce,featureState:ct,geometry:ye,zoom:this.z,transform:t.transform,pixelsToTileUnits:_,pixelPosMatrix:t.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:t.getElevation}))))}return U}loadMatchingFeature(t,r,o,c,f,_,v,b,S,I,L){const F=this.bucketLayerIDs[r];if(_&&!F.some((J=>_.has(J))))return;const q=this.sourceLayerCoder.decode(o),U=this.vtLayers[q].feature(c);if(f.needGeometry){const J=no(U,!0);if(!f.filter(new Un(this.tileID.overscaledZ),J,this.tileID.canonical))return}else if(!f.filter(new Un(this.tileID.overscaledZ),U))return;const W=this.getId(U,q);for(let J=0;J{const v=t instanceof ql?t.get(_):null;return v&&v.evaluate?v.evaluate(r,o,c):v}))}function C1(n,t){return t-n}function Tg(n,t,r,o,c){const f=[];for(let _=0;_=o&&L.x>=o||(I.x>=o?I=new B(o,I.y+(o-I.x)/(L.x-I.x)*(L.y-I.y))._round():L.x>=o&&(L=new B(o,I.y+(o-I.x)/(L.x-I.x)*(L.y-I.y))._round()),I.y>=c&&L.y>=c||(I.y>=c?I=new B(I.x+(c-I.y)/(L.y-I.y)*(L.x-I.x),c)._round():L.y>=c&&(L=new B(I.x+(c-I.y)/(L.y-I.y)*(L.x-I.x),c)._round()),b&&I.equals(b[b.length-1])||(b=[I],f.push(b)),b.push(L)))))}}return f}nr("FeatureIndex",bg,{omit:["rawTileData","sourceLayerCoder"]});class xs extends B{constructor(t,r,o,c){super(t,r),this.angle=o,c!==void 0&&(this.segment=c)}clone(){return new xs(this.x,this.y,this.angle,this.segment)}}function Cg(n,t,r,o,c){if(t.segment===void 0||r===0)return!0;let f=t,_=t.segment+1,v=0;for(;v>-r/2;){if(_--,_<0)return!1;v-=n[_].dist(f),f=n[_]}v+=n[_].dist(n[_+1]),_++;const b=[];let S=0;for(;vo;)S-=b.shift().angleDelta;if(S>c)return!1;_++,v+=I.dist(L)}return!0}function Sg(n){let t=0;for(let r=0;rS){const U=(S-b)/q,W=Za.number(L.x,F.x,U),J=Za.number(L.y,F.y,U),ce=new xs(W,J,F.angleTo(L),I);return ce._round(),!_||Cg(n,ce,v,_,t)?ce:void 0}b+=q}}function P1(n,t,r,o,c,f,_,v,b){const S=Pg(o,f,_),I=Ig(o,c),L=I*_,F=n[0].x===0||n[0].x===b||n[0].y===0||n[0].y===b;return t-L=0&&Ce=0&&Ke=0&&F+S<=I){const ct=new xs(Ce,Ke,Re,U);ct._round(),o&&!Cg(n,ct,f,o,c)||q.push(ct)}}L+=ce}return v||q.length||_||(q=Mg(n,L/2,r,o,c,f,_,!0,b)),q}function kg(n,t,r,o){const c=[],f=n.image,_=f.pixelRatio,v=f.paddedRect.w-2,b=f.paddedRect.h-2;let S={x1:n.left,y1:n.top,x2:n.right,y2:n.bottom};const I=f.stretchX||[[0,v]],L=f.stretchY||[[0,b]],F=(gt,Nr)=>gt+Nr[1]-Nr[0],q=I.reduce(F,0),U=L.reduce(F,0),W=v-q,J=b-U;let ce=0,Re=q,ye=0,Ce=U,Ke=0,ct=W,St=0,Yt=J;if(f.content&&o){const gt=f.content,Nr=gt[2]-gt[0],Gr=gt[3]-gt[1];(f.textFitWidth||f.textFitHeight)&&(S=ng(n)),ce=Bd(I,0,gt[0]),ye=Bd(L,0,gt[1]),Re=Bd(I,gt[0],gt[2]),Ce=Bd(L,gt[1],gt[3]),Ke=gt[0]-ce,St=gt[1]-ye,ct=Nr-Re,Yt=Gr-Ce}const qt=S.x1,Ht=S.y1,Cr=S.x2-qt,Gt=S.y2-Ht,Wt=(gt,Nr,Gr,kr)=>{const vr=Fd(gt.stretch-ce,Re,Cr,qt),hn=Od(gt.fixed-Ke,ct,gt.stretch,q),Qn=Fd(Nr.stretch-ye,Ce,Gt,Ht),gi=Od(Nr.fixed-St,Yt,Nr.stretch,U),qi=Fd(Gr.stretch-ce,Re,Cr,qt),Ba=Od(Gr.fixed-Ke,ct,Gr.stretch,q),ua=Fd(kr.stretch-ye,Ce,Gt,Ht),Ri=Od(kr.fixed-St,Yt,kr.stretch,U),Xn=new B(vr,Qn),Pi=new B(qi,Qn),Bi=new B(qi,ua),Fi=new B(vr,ua),ra=new B(hn/_,gi/_),Fa=new B(Ba/_,Ri/_),Ii=t*Math.PI/180;if(Ii){const Mi=Math.sin(Ii),ki=Math.cos(Ii),ui=[ki,-Mi,Mi,ki];Xn._matMult(ui),Pi._matMult(ui),Fi._matMult(ui),Bi._matMult(ui)}const ha=gt.stretch+gt.fixed,vi=Nr.stretch+Nr.fixed;return{tl:Xn,tr:Pi,bl:Fi,br:Bi,tex:{x:f.paddedRect.x+1+ha,y:f.paddedRect.y+1+vi,w:Gr.stretch+Gr.fixed-ha,h:kr.stretch+kr.fixed-vi},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:ra,pixelOffsetBR:Fa,minFontScaleX:ct/_/Cr,minFontScaleY:Yt/_/Gt,isSDF:r}};if(o&&(f.stretchX||f.stretchY)){const gt=Ag(I,W,q),Nr=Ag(L,J,U);for(let Gr=0;Gr0&&(W=Math.max(10,W),this.circleDiameter=W)}else{const F=!((L=_.image)===null||L===void 0)&&L.content&&(_.image.textFitWidth||_.image.textFitHeight)?ng(_):{x1:_.left,y1:_.top,x2:_.right,y2:_.bottom};F.y1=F.y1*v-b[0],F.y2=F.y2*v+b[2],F.x1=F.x1*v-b[3],F.x2=F.x2*v+b[1];const q=_.collisionPadding;if(q&&(F.x1-=q[0]*v,F.y1-=q[1]*v,F.x2+=q[2]*v,F.y2+=q[3]*v),I){const U=new B(F.x1,F.y1),W=new B(F.x2,F.y1),J=new B(F.x1,F.y2),ce=new B(F.x2,F.y2),Re=I*Math.PI/180;U._rotate(Re),W._rotate(Re),J._rotate(Re),ce._rotate(Re),F.x1=Math.min(U.x,W.x,J.x,ce.x),F.x2=Math.max(U.x,W.x,J.x,ce.x),F.y1=Math.min(U.y,W.y,J.y,ce.y),F.y2=Math.max(U.y,W.y,J.y,ce.y)}t.emplaceBack(r.x,r.y,F.x1,F.y1,F.x2,F.y2,o,c,f)}this.boxEndIndex=t.length}}class I1{constructor(t=[],r=(o,c)=>oc?1:0){if(this.data=t,this.length=this.data.length,this.compare=r,this.length>0)for(let o=(this.length>>1)-1;o>=0;o--)this._down(o)}push(t){this.data.push(t),this._up(this.length++)}pop(){if(this.length===0)return;const t=this.data[0],r=this.data.pop();return--this.length>0&&(this.data[0]=r,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:r,compare:o}=this,c=r[t];for(;t>0;){const f=t-1>>1,_=r[f];if(o(c,_)>=0)break;r[t]=_,t=f}r[t]=c}_down(t){const{data:r,compare:o}=this,c=this.length>>1,f=r[t];for(;t=0)break;r[t]=r[_],t=_}r[t]=f}}function M1(n,t=1,r=!1){const o=rl.fromPoints(n[0]),c=Math.min(o.width(),o.height());let f=c/2;const _=new I1([],k1),{minX:v,minY:b,maxX:S,maxY:I}=o;if(c===0)return new B(v,b);for(let q=v;qL.d||!L.d)&&(L=q,r&&console.log("found best %d after %d probes",Math.round(1e4*q.d)/1e4,F)),q.max-L.d<=t||(f=q.h/2,_.push(new ac(q.p.x-f,q.p.y-f,f,n)),_.push(new ac(q.p.x+f,q.p.y-f,f,n)),_.push(new ac(q.p.x-f,q.p.y+f,f,n)),_.push(new ac(q.p.x+f,q.p.y+f,f,n)),F+=4)}return r&&(console.log(`num probes: ${F}`),console.log(`best distance: ${L.d}`)),L.p}function k1(n,t){return t.max-n.max}function ac(n,t,r,o){this.p=new B(n,t),this.h=r,this.d=(function(c,f){let _=!1,v=1/0;for(let b=0;bc.y!=U.y>c.y&&c.x<(U.x-q.x)*(c.y-q.y)/(U.y-q.y)+q.x&&(_=!_),v=Math.min(v,f_(c,q,U))}}return(_?1:-1)*Math.sqrt(v)})(this.p,o),this.max=this.d+this.h*Math.SQRT2}var Vi;T.aE=void 0,(Vi=T.aE||(T.aE={}))[Vi.center=1]="center",Vi[Vi.left=2]="left",Vi[Vi.right=3]="right",Vi[Vi.top=4]="top",Vi[Vi.bottom=5]="bottom",Vi[Vi["top-left"]=6]="top-left",Vi[Vi["top-right"]=7]="top-right",Vi[Vi["bottom-left"]=8]="bottom-left",Vi[Vi["bottom-right"]=9]="bottom-right";const bf=Number.POSITIVE_INFINITY;function Eg(n,t){return t[1]!==bf?(function(r,o,c){let f=0,_=0;switch(o=Math.abs(o),c=Math.abs(c),r){case"top-right":case"top-left":case"top":_=c-7;break;case"bottom-right":case"bottom-left":case"bottom":_=7-c}switch(r){case"top-right":case"bottom-right":case"right":f=-o;break;case"top-left":case"bottom-left":case"left":f=o}return[f,_]})(n,t[0],t[1]):(function(r,o){let c=0,f=0;o<0&&(o=0);const _=o/Math.SQRT2;switch(r){case"top-right":case"top-left":f=_-7;break;case"bottom-right":case"bottom-left":f=7-_;break;case"bottom":f=7-o;break;case"top":f=o-7}switch(r){case"top-right":case"bottom-right":c=-_;break;case"top-left":case"bottom-left":c=_;break;case"left":c=o;break;case"right":c=-o}return[c,f]})(n,t[0])}function zg(n,t,r){var o;const c=n.layout,f=(o=c.get("text-variable-anchor-offset"))===null||o===void 0?void 0:o.evaluate(t,{},r);if(f){const v=f.values,b=[];for(let S=0;SF*Si));I.startsWith("top")?L[1]-=7:I.startsWith("bottom")&&(L[1]+=7),b[S+1]=L}return new fi(b)}const _=c.get("text-variable-anchor");if(_){let v;v=n._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[c.get("text-radial-offset").evaluate(t,{},r)*Si,bf]:c.get("text-offset").evaluate(t,{},r).map((S=>S*Si));const b=[];for(const S of _)b.push(S,Eg(S,v));return new fi(b)}return null}function wf(n){switch(n){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function A1(n,t,r,o,c,f,_,v,b,S,I,L){let F=f.textMaxSize.evaluate(t,{});F===void 0&&(F=_);const q=n.layers[0].layout,U=q.get("icon-offset").evaluate(t,{},I),W=Dg(r.horizontal),J=_/24,ce=n.tilePixelRatio*J,Re=n.tilePixelRatio*F/24,ye=n.tilePixelRatio*v,Ce=n.tilePixelRatio*q.get("symbol-spacing"),Ke=q.get("text-padding")*n.tilePixelRatio,ct=(function(Gr,kr,vr,hn=1){const Qn=Gr.get("icon-padding").evaluate(kr,{},vr),gi=Qn&&Qn.values;return[gi[0]*hn,gi[1]*hn,gi[2]*hn,gi[3]*hn]})(q,t,I,n.tilePixelRatio),St=q.get("text-max-angle")/180*Math.PI,Yt=q.get("text-rotation-alignment")!=="viewport"&&q.get("symbol-placement")!=="point",qt=q.get("icon-rotation-alignment")==="map"&&q.get("symbol-placement")!=="point",Ht=q.get("symbol-placement"),Cr=Ce/2,Gt=q.get("icon-text-fit");let Wt;o&&Gt!=="none"&&(n.allowVerticalPlacement&&r.vertical&&(Wt=ig(o,r.vertical,Gt,q.get("icon-text-fit-padding"),U,J)),W&&(o=ig(o,W,Gt,q.get("icon-text-fit-padding"),U,J)));const gt=I?L.line.getGranularityForZoomLevel(I.z):1,Nr=(Gr,kr)=>{kr.x<0||kr.x>=oe||kr.y<0||kr.y>=oe||(function(vr,hn,Qn,gi,qi,Ba,ua,Ri,Xn,Pi,Bi,Fi,ra,Fa,Ii,ha,vi,Mi,ki,ui,qn,io,oc,ao,L1){const sc=vr.addToLineVertexArray(hn,Qn);let nl,lc,cc,uc,Og=0,Ng=0,jg=0,Vg=0,Af=-1,Ef=-1;const Uo={};let qg=ms("");if(vr.allowVerticalPlacement&&gi.vertical){const Hi=Ri.layout.get("text-rotate").evaluate(qn,{},ao)+90;cc=new Nd(Xn,hn,Pi,Bi,Fi,gi.vertical,ra,Fa,Ii,Hi),ua&&(uc=new Nd(Xn,hn,Pi,Bi,Fi,ua,vi,Mi,Ii,Hi))}if(qi){const Hi=Ri.layout.get("icon-rotate").evaluate(qn,{}),Oa=Ri.layout.get("icon-text-fit")!=="none",il=kg(qi,Hi,oc,Oa),so=ua?kg(ua,Hi,oc,Oa):void 0;lc=new Nd(Xn,hn,Pi,Bi,Fi,qi,vi,Mi,!1,Hi),Og=4*il.length;const al=vr.iconSizeData;let wo=null;al.kind==="source"?(wo=[Zo*Ri.layout.get("icon-size").evaluate(qn,{})],wo[0]>vs&&Et(`${vr.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):al.kind==="composite"&&(wo=[Zo*io.compositeIconSizes[0].evaluate(qn,{},ao),Zo*io.compositeIconSizes[1].evaluate(qn,{},ao)],(wo[0]>vs||wo[1]>vs)&&Et(`${vr.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),vr.addSymbols(vr.icon,il,wo,ui,ki,qn,T.ao.none,hn,sc.lineStartIndex,sc.lineLength,-1,ao),Af=vr.icon.placedSymbolArray.length-1,so&&(Ng=4*so.length,vr.addSymbols(vr.icon,so,wo,ui,ki,qn,T.ao.vertical,hn,sc.lineStartIndex,sc.lineLength,-1,ao),Ef=vr.icon.placedSymbolArray.length-1)}const Zg=Object.keys(gi.horizontal);for(const Hi of Zg){const Oa=gi.horizontal[Hi];if(!nl){qg=ms(Oa.text);const so=Ri.layout.get("text-rotate").evaluate(qn,{},ao);nl=new Nd(Xn,hn,Pi,Bi,Fi,Oa,ra,Fa,Ii,so)}const il=Oa.positionedLines.length===1;if(jg+=Lg(vr,hn,Oa,Ba,Ri,Ii,qn,ha,sc,gi.vertical?T.ao.horizontal:T.ao.horizontalOnly,il?Zg:[Hi],Uo,Af,io,ao),il)break}gi.vertical&&(Vg+=Lg(vr,hn,gi.vertical,Ba,Ri,Ii,qn,ha,sc,T.ao.vertical,["vertical"],Uo,Ef,io,ao));const D1=nl?nl.boxStartIndex:vr.collisionBoxArray.length,R1=nl?nl.boxEndIndex:vr.collisionBoxArray.length,B1=cc?cc.boxStartIndex:vr.collisionBoxArray.length,F1=cc?cc.boxEndIndex:vr.collisionBoxArray.length,O1=lc?lc.boxStartIndex:vr.collisionBoxArray.length,N1=lc?lc.boxEndIndex:vr.collisionBoxArray.length,j1=uc?uc.boxStartIndex:vr.collisionBoxArray.length,V1=uc?uc.boxEndIndex:vr.collisionBoxArray.length;let oo=-1;const Vd=(Hi,Oa)=>Hi&&Hi.circleDiameter?Math.max(Hi.circleDiameter,Oa):Oa;oo=Vd(nl,oo),oo=Vd(cc,oo),oo=Vd(lc,oo),oo=Vd(uc,oo);const Ug=oo>-1?1:0;Ug&&(oo*=L1/Si),vr.glyphOffsetArray.length>=nc.MAX_GLYPHS&&Et("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),qn.sortKey!==void 0&&vr.addToSortKeyRanges(vr.symbolInstances.length,qn.sortKey);const q1=zg(Ri,qn,ao),[Z1,U1]=(function(Hi,Oa){const il=Hi.length,so=Oa==null?void 0:Oa.values;if((so==null?void 0:so.length)>0)for(let al=0;al=0?Uo.right:-1,Uo.center>=0?Uo.center:-1,Uo.left>=0?Uo.left:-1,Uo.vertical||-1,Af,Ef,qg,D1,R1,B1,F1,O1,N1,j1,V1,Pi,jg,Vg,Og,Ng,Ug,0,ra,oo,Z1,U1)})(n,kr,Gr,r,o,c,Wt,n.layers[0],n.collisionBoxArray,t.index,t.sourceLayerIndex,n.index,ce,[Ke,Ke,Ke,Ke],Yt,b,ye,ct,qt,U,t,f,S,I,_)};if(Ht==="line")for(const Gr of Tg(t.geometry,0,0,oe,oe)){const kr=tl(Gr,gt),vr=P1(kr,Ce,St,r.vertical||W,o,24,Re,n.overscaling,oe);for(const hn of vr)W&&E1(n,W.text,Cr,hn)||Nr(kr,hn)}else if(Ht==="line-center"){for(const Gr of t.geometry)if(Gr.length>1){const kr=tl(Gr,gt),vr=S1(kr,St,r.vertical||W,o,24,Re);vr&&Nr(kr,vr)}}else if(t.type==="Polygon")for(const Gr of Os(t.geometry,0)){const kr=M1(Gr,16);Nr(tl(Gr[0],gt,!0),new xs(kr.x,kr.y,0))}else if(t.type==="LineString")for(const Gr of t.geometry){const kr=tl(Gr,gt);Nr(kr,new xs(kr[0].x,kr[0].y,0))}else if(t.type==="Point")for(const Gr of t.geometry)for(const kr of Gr)Nr([kr],new xs(kr.x,kr.y,0))}function Lg(n,t,r,o,c,f,_,v,b,S,I,L,F,q,U){const W=(function(Re,ye,Ce,Ke,ct,St,Yt,qt){const Ht=Ke.layout.get("text-rotate").evaluate(St,{})*Math.PI/180,Cr=[];for(const Gt of ye.positionedLines)for(const Wt of Gt.positionedGlyphs){if(!Wt.rect)continue;const gt=Wt.rect||{};let Nr=4,Gr=!0,kr=1,vr=0;const hn=(ct||qt)&&Wt.vertical,Qn=Wt.metrics.advance*Wt.scale/2;if(qt&&ye.verticalizable&&(vr=Gt.lineOffset/2-(Wt.imageName?-(Si-Wt.metrics.width*Wt.scale)/2:(Wt.scale-1)*Si)),Wt.imageName){const Mi=Yt[Wt.imageName];Gr=Mi.sdf,kr=Mi.pixelRatio,Nr=1/kr}const gi=ct?[Wt.x+Qn,Wt.y]:[0,0];let qi=ct?[0,0]:[Wt.x+Qn+Ce[0],Wt.y+Ce[1]-vr],Ba=[0,0];hn&&(Ba=qi,qi=[0,0]);const ua=Wt.metrics.isDoubleResolution?2:1,Ri=(Wt.metrics.left-Nr)*Wt.scale-Qn+qi[0],Xn=(-Wt.metrics.top-Nr)*Wt.scale+qi[1],Pi=Ri+gt.w/ua*Wt.scale/kr,Bi=Xn+gt.h/ua*Wt.scale/kr,Fi=new B(Ri,Xn),ra=new B(Pi,Xn),Fa=new B(Ri,Bi),Ii=new B(Pi,Bi);if(hn){const Mi=new B(-Qn,Qn- -17),ki=-Math.PI/2,ui=12-Qn,qn=new B(22-ui,-(Wt.imageName?ui:0)),io=new B(...Ba);Fi._rotateAround(ki,Mi)._add(qn)._add(io),ra._rotateAround(ki,Mi)._add(qn)._add(io),Fa._rotateAround(ki,Mi)._add(qn)._add(io),Ii._rotateAround(ki,Mi)._add(qn)._add(io)}if(Ht){const Mi=Math.sin(Ht),ki=Math.cos(Ht),ui=[ki,-Mi,Mi,ki];Fi._matMult(ui),ra._matMult(ui),Fa._matMult(ui),Ii._matMult(ui)}const ha=new B(0,0),vi=new B(0,0);Cr.push({tl:Fi,tr:ra,bl:Fa,br:Ii,tex:gt,writingMode:ye.writingMode,glyphOffset:gi,sectionIndex:Wt.sectionIndex,isSDF:Gr,pixelOffsetTL:ha,pixelOffsetBR:vi,minFontScaleX:0,minFontScaleY:0})}return Cr})(0,r,v,c,f,_,o,n.allowVerticalPlacement),J=n.textSizeData;let ce=null;J.kind==="source"?(ce=[Zo*c.layout.get("text-size").evaluate(_,{})],ce[0]>vs&&Et(`${n.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):J.kind==="composite"&&(ce=[Zo*q.compositeTextSizes[0].evaluate(_,{},U),Zo*q.compositeTextSizes[1].evaluate(_,{},U)],(ce[0]>vs||ce[1]>vs)&&Et(`${n.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),n.addSymbols(n.text,W,ce,v,f,_,S,t,b.lineStartIndex,b.lineLength,F,U);for(const Re of I)L[Re]=n.text.placedSymbolArray.length-1;return 4*W.length}function Dg(n){for(const t in n)return n[t];return null}function E1(n,t,r,o){const c=n.compareText;if(t in c){const f=c[t];for(let _=f.length-1;_>=0;_--)if(o.dist(f[_])>4;if(c!==1)throw new Error(`Got v${c} data when expected v1.`);const f=Rg[15&o];if(!f)throw new Error("Unrecognized array type.");const[_]=new Uint16Array(t,2,1),[v]=new Uint32Array(t,4,1);return new Tf(v,_,f,t)}constructor(t,r=64,o=Float64Array,c){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=o,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const f=Rg.indexOf(this.ArrayType),_=2*t*this.ArrayType.BYTES_PER_ELEMENT,v=t*this.IndexArrayType.BYTES_PER_ELEMENT,b=(8-v%8)%8;if(f<0)throw new Error(`Unexpected typed array class: ${o}.`);c&&c instanceof ArrayBuffer?(this.data=c,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+v+b,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+_+v+b),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+v+b,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+f]),new Uint16Array(this.data,2,1)[0]=r,new Uint32Array(this.data,4,1)[0]=t)}add(t,r){const o=this._pos>>1;return this.ids[o]=o,this.coords[this._pos++]=t,this.coords[this._pos++]=r,o}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return Cf(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,r,o,c){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:f,coords:_,nodeSize:v}=this,b=[0,f.length-1,0],S=[];for(;b.length;){const I=b.pop()||0,L=b.pop()||0,F=b.pop()||0;if(L-F<=v){for(let J=F;J<=L;J++){const ce=_[2*J],Re=_[2*J+1];ce>=t&&ce<=o&&Re>=r&&Re<=c&&S.push(f[J])}continue}const q=F+L>>1,U=_[2*q],W=_[2*q+1];U>=t&&U<=o&&W>=r&&W<=c&&S.push(f[q]),(I===0?t<=U:r<=W)&&(b.push(F),b.push(q-1),b.push(1-I)),(I===0?o>=U:c>=W)&&(b.push(q+1),b.push(L),b.push(1-I))}return S}within(t,r,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:c,coords:f,nodeSize:_}=this,v=[0,c.length-1,0],b=[],S=o*o;for(;v.length;){const I=v.pop()||0,L=v.pop()||0,F=v.pop()||0;if(L-F<=_){for(let J=F;J<=L;J++)Fg(f[2*J],f[2*J+1],t,r)<=S&&b.push(c[J]);continue}const q=F+L>>1,U=f[2*q],W=f[2*q+1];Fg(U,W,t,r)<=S&&b.push(c[q]),(I===0?t-o<=U:r-o<=W)&&(v.push(F),v.push(q-1),v.push(1-I)),(I===0?t+o>=U:r+o>=W)&&(v.push(q+1),v.push(L),v.push(1-I))}return b}}function Cf(n,t,r,o,c,f){if(c-o<=r)return;const _=o+c>>1;Bg(n,t,_,o,c,f),Cf(n,t,r,o,_-1,1-f),Cf(n,t,r,_+1,c,1-f)}function Bg(n,t,r,o,c,f){for(;c>o;){if(c-o>600){const S=c-o+1,I=r-o+1,L=Math.log(S),F=.5*Math.exp(2*L/3),q=.5*Math.sqrt(L*F*(S-F)/S)*(I-S/2<0?-1:1);Bg(n,t,r,Math.max(o,Math.floor(r-I*F/S+q)),Math.min(c,Math.floor(r+(S-I)*F/S+q)),f)}const _=t[2*r+f];let v=o,b=c;for(Eu(n,t,o,r),t[2*c+f]>_&&Eu(n,t,o,c);v_;)b--}t[2*o+f]===_?Eu(n,t,o,b):(b++,Eu(n,t,b,c)),b<=r&&(o=b+1),r<=b&&(c=b-1)}}function Eu(n,t,r,o){Sf(n,r,o),Sf(t,2*r,2*o),Sf(t,2*r+1,2*o+1)}function Sf(n,t,r){const o=n[t];n[t]=n[r],n[r]=o}function Fg(n,t,r,o){const c=n-r,f=t-o;return c*c+f*f}var Pf;T.cx=void 0,(Pf=T.cx||(T.cx={})).create="create",Pf.load="load",Pf.fullLoad="fullLoad";let jd=null,zu=[];const If=1e3/60,Mf="loadTime",kf="fullLoadTime",z1={mark(n){performance.mark(n)},frame(n){const t=n;jd!=null&&zu.push(t-jd),jd=t},clearMetrics(){jd=null,zu=[],performance.clearMeasures(Mf),performance.clearMeasures(kf);for(const n in T.cx)performance.clearMarks(T.cx[n])},getPerformanceMetrics(){performance.measure(Mf,T.cx.create,T.cx.load),performance.measure(kf,T.cx.create,T.cx.fullLoad);const n=performance.getEntriesByName(Mf)[0].duration,t=performance.getEntriesByName(kf)[0].duration,r=zu.length,o=1/(zu.reduce(((f,_)=>f+_),0)/r/1e3),c=zu.filter((f=>f>If)).reduce(((f,_)=>f+(_-If)/If),0);return{loadTime:n,fullLoadTime:t,fps:o,percentDroppedFrames:c/(r+c)*100,totalFrames:r}}};T.$=oe,T.A=ze,T.B=function([n,t,r]){return t+=90,t*=Math.PI/180,r*=Math.PI/180,{x:n*Math.cos(t)*Math.sin(r),y:n*Math.sin(t)*Math.sin(r),z:n*Math.cos(r)}},T.C=Za,T.D=br,T.E=kt,T.F=Un,T.G=Ws,T.H=function(n){if(er==null){const t=n.navigator?n.navigator.userAgent:null;er=!!n.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return er},T.I=uf,T.J=class{constructor(n,t){this.target=n,this.mapId=t,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new w1((()=>this.process())),this.subscription=Vr(this.target,"message",(r=>this.receive(r)),!1),this.globalScope=Ut(self)?n:window}registerMessageHandler(n,t){this.messageHandlers[n]=t}sendAsync(n,t){return new Promise(((r,o)=>{const c=Math.round(1e18*Math.random()).toString(36).substring(0,10),f=t?Vr(t.signal,"abort",(()=>{f==null||f.unsubscribe(),delete this.resolveRejects[c];const b={id:c,type:"",origin:location.origin,targetMapId:n.targetMapId,sourceMapId:this.mapId};this.target.postMessage(b)}),T1):null;this.resolveRejects[c]={resolve:b=>{f==null||f.unsubscribe(),r(b)},reject:b=>{f==null||f.unsubscribe(),o(b)}};const _=[],v=Object.assign(Object.assign({},n),{id:c,sourceMapId:this.mapId,origin:location.origin,data:cs(n.data,_)});this.target.postMessage(v,{transfer:_})}))}receive(n){const t=n.data,r=t.id;if(!(t.origin!=="file://"&&location.origin!=="file://"&&t.origin!=="resource://android"&&location.origin!=="resource://android"&&t.origin!==location.origin||t.targetMapId&&this.mapId!==t.targetMapId)){if(t.type===""){delete this.tasks[r];const o=this.abortControllers[r];return delete this.abortControllers[r],void(o&&o.abort())}if(Ut(self)||t.mustQueue)return this.tasks[r]=t,this.taskQueue.push(r),void this.invoker.trigger();this.processTask(r,t)}}process(){if(this.taskQueue.length===0)return;const n=this.taskQueue.shift(),t=this.tasks[n];delete this.tasks[n],this.taskQueue.length>0&&this.invoker.trigger(),t&&this.processTask(n,t)}processTask(n,t){return s(this,void 0,void 0,(function*(){if(t.type===""){const c=this.resolveRejects[n];return delete this.resolveRejects[n],c?void(t.error?c.reject(Oo(t.error)):c.resolve(Oo(t.data))):void 0}if(!this.messageHandlers[t.type])return void this.completeTask(n,new Error(`Could not find a registered handler for ${t.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const r=Oo(t.data),o=new AbortController;this.abortControllers[n]=o;try{const c=yield this.messageHandlers[t.type](t.sourceMapId,r,o);this.completeTask(n,null,c)}catch(c){this.completeTask(n,c)}}))}completeTask(n,t,r){const o=[];delete this.abortControllers[n];const c={id:n,type:"",sourceMapId:this.mapId,origin:location.origin,error:t?cs(t):null,data:cs(r,o)};this.target.postMessage(c,{transfer:o})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},T.K=Y,T.L=function(){var n=new ze(16);return ze!=Float32Array&&(n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0),n[0]=1,n[5]=1,n[10]=1,n[15]=1,n},T.M=function(n,t,r){var o,c,f,_,v,b,S,I,L,F,q,U,W=r[0],J=r[1],ce=r[2];return t===n?(n[12]=t[0]*W+t[4]*J+t[8]*ce+t[12],n[13]=t[1]*W+t[5]*J+t[9]*ce+t[13],n[14]=t[2]*W+t[6]*J+t[10]*ce+t[14],n[15]=t[3]*W+t[7]*J+t[11]*ce+t[15]):(c=t[1],f=t[2],_=t[3],v=t[4],b=t[5],S=t[6],I=t[7],L=t[8],F=t[9],q=t[10],U=t[11],n[0]=o=t[0],n[1]=c,n[2]=f,n[3]=_,n[4]=v,n[5]=b,n[6]=S,n[7]=I,n[8]=L,n[9]=F,n[10]=q,n[11]=U,n[12]=o*W+v*J+L*ce+t[12],n[13]=c*W+b*J+F*ce+t[13],n[14]=f*W+S*J+q*ce+t[14],n[15]=_*W+I*J+U*ce+t[15]),n},T.N=function(n,t,r){var o=r[0],c=r[1],f=r[2];return n[0]=t[0]*o,n[1]=t[1]*o,n[2]=t[2]*o,n[3]=t[3]*o,n[4]=t[4]*c,n[5]=t[5]*c,n[6]=t[6]*c,n[7]=t[7]*c,n[8]=t[8]*f,n[9]=t[9]*f,n[10]=t[10]*f,n[11]=t[11]*f,n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},T.O=function(n,t,r){var o=t[0],c=t[1],f=t[2],_=t[3],v=t[4],b=t[5],S=t[6],I=t[7],L=t[8],F=t[9],q=t[10],U=t[11],W=t[12],J=t[13],ce=t[14],Re=t[15],ye=r[0],Ce=r[1],Ke=r[2],ct=r[3];return n[0]=ye*o+Ce*v+Ke*L+ct*W,n[1]=ye*c+Ce*b+Ke*F+ct*J,n[2]=ye*f+Ce*S+Ke*q+ct*ce,n[3]=ye*_+Ce*I+Ke*U+ct*Re,n[4]=(ye=r[4])*o+(Ce=r[5])*v+(Ke=r[6])*L+(ct=r[7])*W,n[5]=ye*c+Ce*b+Ke*F+ct*J,n[6]=ye*f+Ce*S+Ke*q+ct*ce,n[7]=ye*_+Ce*I+Ke*U+ct*Re,n[8]=(ye=r[8])*o+(Ce=r[9])*v+(Ke=r[10])*L+(ct=r[11])*W,n[9]=ye*c+Ce*b+Ke*F+ct*J,n[10]=ye*f+Ce*S+Ke*q+ct*ce,n[11]=ye*_+Ce*I+Ke*U+ct*Re,n[12]=(ye=r[12])*o+(Ce=r[13])*v+(Ke=r[14])*L+(ct=r[15])*W,n[13]=ye*c+Ce*b+Ke*F+ct*J,n[14]=ye*f+Ce*S+Ke*q+ct*ce,n[15]=ye*_+Ce*I+Ke*U+ct*Re,n},T.P=B,T.Q=function(n,t){const r={};for(let o=0;o[S.id,S])));_.add=Array.from(b.values())}if(t.update){const v=new Map((r=_.update)===null||r===void 0?void 0:r.map((b=>[b.id,b])));for(const b of t.update){const S=(o=v.get(b.id))!==null&&o!==void 0?o:{id:b.id};b.newGeometry&&(S.newGeometry=b.newGeometry),b.addOrUpdateProperties&&(S.addOrUpdateProperties=((c=S.addOrUpdateProperties)!==null&&c!==void 0?c:[]).concat(b.addOrUpdateProperties)),b.removeProperties&&(S.removeProperties=((f=S.removeProperties)!==null&&f!==void 0?f:[]).concat(b.removeProperties)),b.removeAllProperties&&(S.removeAllProperties=!0),v.set(b.id,S)}_.update=Array.from(v.values())}return _},T.a1=ku,T.a2=rl,T.a3=25,T.a4=xf,T.a5=n=>{const t=window.document.createElement("video");return t.muted=!0,new Promise((r=>{t.onloadstart=()=>{r(t)};for(const o of n){const c=window.document.createElement("source");ke(o)||(t.crossOrigin="Anonymous"),c.src=o,t.appendChild(c)}}))},T.a6=ht,T.a7=function(){return vt++},T.a8=D,T.a9=nc,T.aA=function(n){let t=1/0,r=1/0,o=-1/0,c=-1/0;for(const f of n)t=Math.min(t,f.x),r=Math.min(r,f.y),o=Math.max(o,f.x),c=Math.max(c,f.y);return[t,r,o,c]},T.aB=Si,T.aC=Ae,T.aD=function(n,t,r,o,c=!1){if(!r[0]&&!r[1])return[0,0];const f=c?o==="map"?-n.bearingInRadians:0:o==="viewport"?n.bearingInRadians:0;if(f){const _=Math.sin(f),v=Math.cos(f);r=[r[0]*v-r[1]*_,r[0]*_+r[1]*v]}return[c?r[0]:Ae(t,r[0],n.zoom),c?r[1]:Ae(t,r[1],n.zoom)]},T.aF=pf,T.aG=wf,T.aH=df,T.aI=Tf,T.aJ=ti,T.aK=Ad,T.aL=_e,T.aM=Kr,T.aN=Rn,T.aO=ot,T.aP=hr,T.aQ=_g,T.aR=Le,T.aS=Qe,T.aT=function(n){var t=new ze(3);return t[0]=n[0],t[1]=n[1],t[2]=n[2],t},T.aU=function(n,t,r){return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],n},T.aV=function(n,t){var r=t[0],o=t[1],c=t[2],f=r*r+o*o+c*c;return f>0&&(f=1/Math.sqrt(f)),n[0]=t[0]*f,n[1]=t[1]*f,n[2]=t[2]*f,n},T.aW=et,T.aX=function(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]},T.aY=function(n,t,r){return n[0]=t[0]*r[0],n[1]=t[1]*r[1],n[2]=t[2]*r[2],n[3]=t[3]*r[3],n},T.aZ=qe,T.a_=function(n,t,r){const o=t[0]*r[0]+t[1]*r[1]+t[2]*r[2];return o===0?null:(-(n[0]*r[0]+n[1]*r[1]+n[2]*r[2])-r[3])/o},T.aa=Ro,T.ab=no,T.ac=xg,T.ad=function(n){const t={};if(n.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((r,o,c,f)=>{const _=c||f;return t[o]=!_||_.toLowerCase(),""})),t["max-age"]){const r=parseInt(t["max-age"],10);isNaN(r)?delete t["max-age"]:t["max-age"]=r}return t},T.ae=mr,T.af=function(n){return Math.pow(2,n)},T.ag=$e,T.ah=Dt,T.ai=85.051129,T.aj=mg,T.ak=function(n){return Math.log(n)/Math.LN2},T.al=function(n){var t=n[0],r=n[1];return t*t+r*r},T.am=function(n,t){const r=[];for(const o in n)o in t||r.push(o);return r},T.an=function(n,t){let r=0,o=0;if(n.kind==="constant")o=n.layoutSize;else if(n.kind!=="source"){const{interpolationType:c,minZoom:f,maxZoom:_}=n,v=c?Dt(Di.interpolationFactor(c,t,f,_),0,1):0;n.kind==="camera"?o=Za.number(n.minSize,n.maxSize,v):r=v}return{uSizeT:r,uSize:o}},T.ap=function(n,{uSize:t,uSizeT:r},{lowerSize:o,upperSize:c}){return n.kind==="source"?o/Zo:n.kind==="composite"?Za.number(o/Zo,c/Zo,r):t},T.aq=function(n,t){var r=t[0],o=t[1],c=t[2],f=t[3],_=t[4],v=t[5],b=t[6],S=t[7],I=t[8],L=t[9],F=t[10],q=t[11],U=t[12],W=t[13],J=t[14],ce=t[15],Re=r*v-o*_,ye=r*b-c*_,Ce=r*S-f*_,Ke=o*b-c*v,ct=o*S-f*v,St=c*S-f*b,Yt=I*W-L*U,qt=I*J-F*U,Ht=I*ce-q*U,Cr=L*J-F*W,Gt=L*ce-q*W,Wt=F*ce-q*J,gt=Re*Wt-ye*Gt+Ce*Cr+Ke*Ht-ct*qt+St*Yt;return gt?(n[0]=(v*Wt-b*Gt+S*Cr)*(gt=1/gt),n[1]=(c*Gt-o*Wt-f*Cr)*gt,n[2]=(W*St-J*ct+ce*Ke)*gt,n[3]=(F*ct-L*St-q*Ke)*gt,n[4]=(b*Ht-_*Wt-S*qt)*gt,n[5]=(r*Wt-c*Ht+f*qt)*gt,n[6]=(J*Ce-U*St-ce*ye)*gt,n[7]=(I*St-F*Ce+q*ye)*gt,n[8]=(_*Gt-v*Ht+S*Yt)*gt,n[9]=(o*Ht-r*Gt-f*Yt)*gt,n[10]=(U*ct-W*Ce+ce*Re)*gt,n[11]=(L*Ce-I*ct-q*Re)*gt,n[12]=(v*qt-_*Cr-b*Yt)*gt,n[13]=(r*Cr-o*qt+c*Yt)*gt,n[14]=(W*ye-U*Ke-J*Re)*gt,n[15]=(I*Ke-L*ye+F*Re)*gt,n):null},T.ar=re,T.as=function(n){return Math.hypot(n[0],n[1])},T.at=function(n){return n[0]=0,n[1]=0,n},T.au=function(n,t,r){return n[0]=t[0]*r,n[1]=t[1]*r,n},T.av=ff,T.aw=Me,T.ax=function(n,t,r,o){const c=t.y-n.y,f=t.x-n.x,_=o.y-r.y,v=o.x-r.x,b=_*f-v*c;if(b===0)return null;const S=(v*(n.y-r.y)-_*(n.x-r.x))/b;return new B(n.x+S*f,n.y+S*c)},T.ay=Tg,T.az=d_,T.b=tr,T.b$=class extends h{},T.b0=function(n,t,r){return n[0]=t[0]*r,n[1]=t[1]*r,n[2]=t[2]*r,n[3]=t[3]*r,n},T.b1=function(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]},T.b2=vg,T.b3=ic,T.b4=function(n,t,r,o,c){var f,_=1/Math.tan(t/2);return n[0]=_/r,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=_,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[11]=-1,n[12]=0,n[13]=0,n[15]=0,c!=null&&c!==1/0?(n[10]=(c+o)*(f=1/(o-c)),n[14]=2*c*o*f):(n[10]=-1,n[14]=-2*o),n},T.b5=function(n){var t=new ze(16);return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t},T.b6=function(n,t,r){var o=Math.sin(r),c=Math.cos(r),f=t[0],_=t[1],v=t[2],b=t[3],S=t[4],I=t[5],L=t[6],F=t[7];return t!==n&&(n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15]),n[0]=f*c+S*o,n[1]=_*c+I*o,n[2]=v*c+L*o,n[3]=b*c+F*o,n[4]=S*c-f*o,n[5]=I*c-_*o,n[6]=L*c-v*o,n[7]=F*c-b*o,n},T.b7=function(n,t,r){var o=Math.sin(r),c=Math.cos(r),f=t[4],_=t[5],v=t[6],b=t[7],S=t[8],I=t[9],L=t[10],F=t[11];return t!==n&&(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15]),n[4]=f*c+S*o,n[5]=_*c+I*o,n[6]=v*c+L*o,n[7]=b*c+F*o,n[8]=S*c-f*o,n[9]=I*c-_*o,n[10]=L*c-v*o,n[11]=F*c-b*o,n},T.b8=function(){const n=new Float32Array(16);return $e(n),n},T.b9=function(){const n=new Float64Array(16);return $e(n),n},T.bA=function(n,t){const r=je(n,360),o=je(t,360),c=o-r,f=o>r?c-360:c+360;return Math.abs(c)0?_:-_},T.bD=function(n,t){const r=je(n,2*Math.PI),o=je(t,2*Math.PI);return Math.min(Math.abs(r-o),Math.abs(r-o+2*Math.PI),Math.abs(r-o-2*Math.PI))},T.bE=function(){const n={},t=xe.$version;for(const r in xe.$root){const o=xe.$root[r];if(o.required){let c=null;c=r==="version"?t:o.type==="array"?[]:{},c!=null&&(n[r]=c)}}return n},T.bF=Nl,T.bG=fe,T.bH=function n(t,r){if(Array.isArray(t)){if(!Array.isArray(r)||t.length!==r.length)return!1;for(let o=0;o{"source"in _&&o[_.source]?r.push({command:"removeLayer",args:[_.id]}):f.push(_)})),r=r.concat(c),(function(_,v,b){v=v||[];const S=(_=_||[]).map(zt),I=v.map(zt),L=_.reduce(dr,{}),F=v.reduce(dr,{}),q=S.slice(),U=Object.create(null);let W,J,ce,Re,ye;for(let Ce=0,Ke=0;CeDe?(c=Math.acos(f),_=Math.sin(c),v=Math.sin((1-o)*c)/_,b=Math.sin(o*c)/_):(v=1-o,b=o),n[0]=v*S+b*q,n[1]=v*I+b*U,n[2]=v*L+b*W,n[3]=v*F+b*J,n},T.bd=function(n){const t=new Float64Array(9);var r,o,c,f,_,v,b,S,I,L,F,q,U,W,J,ce,Re,ye;L=(c=(o=n)[0])*(b=c+c),F=(f=o[1])*b,U=(_=o[2])*b,W=_*(S=f+f),ce=(v=o[3])*b,Re=v*S,ye=v*(I=_+_),(r=t)[0]=1-(q=f*S)-(J=_*I),r[3]=F-ye,r[6]=U+Re,r[1]=F+ye,r[4]=1-L-J,r[7]=W-ce,r[2]=U-Re,r[5]=W+ce,r[8]=1-L-q;const Ce=hr(-Math.asin(Dt(t[2],-1,1)));let Ke,ct;return Math.hypot(t[5],t[8])<.001?(Ke=0,ct=-hr(Math.atan2(t[3],t[4]))):(Ke=hr(t[5]===0&&t[8]===0?0:Math.atan2(t[5],t[8])),ct=hr(t[1]===0&&t[0]===0?0:Math.atan2(t[1],t[0]))),{roll:Ke,pitch:Ce+90,bearing:ct}},T.be=function(n,t){return n.roll==t.roll&&n.pitch==t.pitch&&n.bearing==t.bearing},T.bf=Mr,T.bg=yo,T.bh=Ql,T.bi=Tu,T.bj=Jl,T.bk=ft,T.bl=it,T.bm=jn,T.bn=function(n,t,r,o,c){return ft(o,c,Dt((n-t)/(r-t),0,1))},T.bo=je,T.bp=function(){return new Float64Array(3)},T.bq=function(n,t,r,o){return n[0]=t[0]+r[0]*o,n[1]=t[1]+r[1]*o,n[2]=t[2]+r[2]*o,n},T.br=Q,T.bs=function(n,t,r){var o=r[0],c=r[1],f=r[2],_=t[0],v=t[1],b=t[2],S=c*b-f*v,I=f*_-o*b,L=o*v-c*_,F=c*L-f*I,q=f*S-o*L,U=o*I-c*S,W=2*r[3];return I*=W,L*=W,q*=2,U*=2,n[0]=_+(S*=W)+(F*=2),n[1]=v+I+q,n[2]=b+L+U,n},T.bt=function(n,t,r){const o=(c=[n[0],n[1],n[2],t[0],t[1],t[2],r[0],r[1],r[2]])[0]*((I=c[8])*(_=c[4])-(v=c[5])*(S=c[7]))+c[1]*(-I*(f=c[3])+v*(b=c[6]))+c[2]*(S*f-_*b);var c,f,_,v,b,S,I;if(o===0)return null;const L=et([],[t[0],t[1],t[2]],[r[0],r[1],r[2]]),F=et([],[r[0],r[1],r[2]],[n[0],n[1],n[2]]),q=et([],[n[0],n[1],n[2]],[t[0],t[1],t[2]]),U=Le([],L,-n[3]);return Qe(U,U,Le([],F,-t[3])),Qe(U,U,Le([],q,-r[3])),Le(U,U,1/o),U},T.bu=vf,T.bv=function(){return new Float64Array(4)},T.bw=function(n,t,r,o){var c=[],f=[];return c[0]=t[0]-r[0],c[1]=t[1]-r[1],c[2]=t[2]-r[2],f[0]=c[0]*Math.cos(o)-c[1]*Math.sin(o),f[1]=c[0]*Math.sin(o)+c[1]*Math.cos(o),f[2]=c[2],n[0]=f[0]+r[0],n[1]=f[1]+r[1],n[2]=f[2]+r[2],n},T.bx=function(n,t,r,o){var c=[],f=[];return c[0]=t[0]-r[0],c[1]=t[1]-r[1],c[2]=t[2]-r[2],f[0]=c[0],f[1]=c[1]*Math.cos(o)-c[2]*Math.sin(o),f[2]=c[1]*Math.sin(o)+c[2]*Math.cos(o),n[0]=f[0]+r[0],n[1]=f[1]+r[1],n[2]=f[2]+r[2],n},T.by=function(n,t,r,o){var c=[],f=[];return c[0]=t[0]-r[0],c[1]=t[1]-r[1],c[2]=t[2]-r[2],f[0]=c[2]*Math.sin(o)+c[0]*Math.cos(o),f[1]=c[1],f[2]=c[2]*Math.cos(o)-c[0]*Math.sin(o),n[0]=f[0]+r[0],n[1]=f[1]+r[1],n[2]=f[2]+r[2],n},T.bz=function(n,t,r){var o=Math.sin(r),c=Math.cos(r),f=t[0],_=t[1],v=t[2],b=t[3],S=t[8],I=t[9],L=t[10],F=t[11];return t!==n&&(n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15]),n[0]=f*c-S*o,n[1]=_*c-I*o,n[2]=v*c-L*o,n[3]=b*c-F*o,n[8]=f*o+S*c,n[9]=_*o+I*c,n[10]=v*o+L*c,n[11]=b*o+F*c,n},T.c=le,T.c0=Gy,T.c1=class extends i{},T.c2=Kp,T.c3=function(n){return n<=1?1:Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))},T.c4=w_,T.c5=function(n,t,r){var o=t[0],c=t[1],f=t[2],_=r[3]*o+r[7]*c+r[11]*f+r[15];return n[0]=(r[0]*o+r[4]*c+r[8]*f+r[12])/(_=_||1),n[1]=(r[1]*o+r[5]*c+r[9]*f+r[13])/_,n[2]=(r[2]*o+r[6]*c+r[10]*f+r[14])/_,n},T.c6=class extends du{},T.c7=class extends P{},T.c8=function(n,t){return n[0]===t[0]&&n[1]===t[1]&&n[2]===t[2]&&n[3]===t[3]&&n[4]===t[4]&&n[5]===t[5]&&n[6]===t[6]&&n[7]===t[7]&&n[8]===t[8]&&n[9]===t[9]&&n[10]===t[10]&&n[11]===t[11]&&n[12]===t[12]&&n[13]===t[13]&&n[14]===t[14]&&n[15]===t[15]},T.c9=function(n,t){var r=n[0],o=n[1],c=n[2],f=n[3],_=n[4],v=n[5],b=n[6],S=n[7],I=n[8],L=n[9],F=n[10],q=n[11],U=n[12],W=n[13],J=n[14],ce=n[15],Re=t[0],ye=t[1],Ce=t[2],Ke=t[3],ct=t[4],St=t[5],Yt=t[6],qt=t[7],Ht=t[8],Cr=t[9],Gt=t[10],Wt=t[11],gt=t[12],Nr=t[13],Gr=t[14],kr=t[15];return Math.abs(r-Re)<=De*Math.max(1,Math.abs(r),Math.abs(Re))&&Math.abs(o-ye)<=De*Math.max(1,Math.abs(o),Math.abs(ye))&&Math.abs(c-Ce)<=De*Math.max(1,Math.abs(c),Math.abs(Ce))&&Math.abs(f-Ke)<=De*Math.max(1,Math.abs(f),Math.abs(Ke))&&Math.abs(_-ct)<=De*Math.max(1,Math.abs(_),Math.abs(ct))&&Math.abs(v-St)<=De*Math.max(1,Math.abs(v),Math.abs(St))&&Math.abs(b-Yt)<=De*Math.max(1,Math.abs(b),Math.abs(Yt))&&Math.abs(S-qt)<=De*Math.max(1,Math.abs(S),Math.abs(qt))&&Math.abs(I-Ht)<=De*Math.max(1,Math.abs(I),Math.abs(Ht))&&Math.abs(L-Cr)<=De*Math.max(1,Math.abs(L),Math.abs(Cr))&&Math.abs(F-Gt)<=De*Math.max(1,Math.abs(F),Math.abs(Gt))&&Math.abs(q-Wt)<=De*Math.max(1,Math.abs(q),Math.abs(Wt))&&Math.abs(U-gt)<=De*Math.max(1,Math.abs(U),Math.abs(gt))&&Math.abs(W-Nr)<=De*Math.max(1,Math.abs(W),Math.abs(Nr))&&Math.abs(J-Gr)<=De*Math.max(1,Math.abs(J),Math.abs(Gr))&&Math.abs(ce-kr)<=De*Math.max(1,Math.abs(ce),Math.abs(kr))},T.cA=function(n,t){j.REGISTERED_PROTOCOLS[n]=t},T.cB=function(n){delete j.REGISTERED_PROTOCOLS[n]},T.cC=function(n,t){const r={};for(let c=0;cWt*Si))}let qt=_?"center":r.get("text-justify").evaluate(S,{},n.canonical);const Ht=r.get("symbol-placement")==="point"?r.get("text-max-width").evaluate(S,{},n.canonical)*Si:1/0,Cr=()=>{n.bucket.allowVerticalPlacement&&jl(Ce)&&(U.vertical=zd(W,n.glyphMap,n.glyphPositions,n.imagePositions,I,Ht,f,St,"left",ct,ce,T.ao.vertical,!0,F,L))};if(!_&&Yt){const Gt=new Set;if(qt==="auto")for(let gt=0;gt0||((c=v.addOrUpdateProperties)===null||c===void 0?void 0:c.length)>0);if((v.newGeometry||v.removeAllProperties||S)&&(b=Object.assign({},b),n.set(v.id,b),S&&(b.properties=Object.assign({},b.properties))),v.newGeometry&&(b.geometry=v.newGeometry),v.removeAllProperties)b.properties={};else if(((f=v.removeProperties)===null||f===void 0?void 0:f.length)>0)for(const I of v.removeProperties)Object.prototype.hasOwnProperty.call(b.properties,I)&&delete b.properties[I];if(((_=v.addOrUpdateProperties)===null||_===void 0?void 0:_.length)>0)for(const{key:I,value:L}of v.addOrUpdateProperties)b.properties[I]=L}},T.cX=Ea,T.ca=function(n,t){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},T.cb=n=>n.type==="symbol",T.cc=n=>n.type==="circle",T.cd=n=>n.type==="heatmap",T.ce=n=>n.type==="line",T.cf=n=>n.type==="fill",T.cg=n=>n.type==="fill-extrusion",T.ch=n=>n.type==="hillshade",T.ci=n=>n.type==="color-relief",T.cj=n=>n.type==="raster",T.ck=n=>n.type==="background",T.cl=n=>n.type==="custom",T.cm=ut,T.cn=function(n,t,r){const o=he(t.x-r.x,t.y-r.y),c=he(n.x-r.x,n.y-r.y);var f,_;return hr(Math.atan2(o[0]*c[1]-o[1]*c[0],(f=o)[0]*(_=c)[0]+f[1]*_[1]))},T.co=Pt,T.cp=function(n,t){return Ir[t]&&(n instanceof MouseEvent||n instanceof WheelEvent)},T.cq=function(n,t){return _r[t]&&"touches"in n},T.cr=function(n){return _r[n]||Ir[n]},T.cs=function(n,t,r){var o=t[0],c=t[1];return n[0]=r[0]*o+r[4]*c+r[12],n[1]=r[1]*o+r[5]*c+r[13],n},T.ct=function(n,t){const{x:r,y:o}=ku.fromLngLat(t);return!(n<0||n>25||o<0||o>=1||r<0||r>=1)},T.cu=function(n,t){return n[0]=t[0],n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=t[1],n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=t[2],n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n},T.cv=class extends ds{},T.cw=z1,T.cy=function(n){return n.message===qr},T.cz=ae,T.d=ke,T.e=dt,T.f=n=>s(void 0,void 0,void 0,(function*(){if(n.byteLength===0)return createImageBitmap(new ImageData(1,1));const t=new Blob([new Uint8Array(n)],{type:"image/png"});try{return createImageBitmap(t)}catch(r){throw new Error(`Could not load image because of ${r.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}})),T.g=Z,T.h=n=>new Promise(((t,r)=>{const o=new Image;o.onload=()=>{t(o),URL.revokeObjectURL(o.src),o.onload=null,window.requestAnimationFrame((()=>{o.src=Nt}))},o.onerror=()=>r(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 c=new Blob([new Uint8Array(n)],{type:"image/png"});o.src=n.byteLength?URL.createObjectURL(c):Nt})),T.i=Ut,T.j=(n,t)=>Se(dt(n,{type:"json"}),t),T.k=Ye,T.l=lt,T.m=Se,T.n=(n,t)=>Se(dt(n,{type:"arrayBuffer"}),t),T.o=function(n){return new cf(n).readFields(n1,[])},T.p=Y_,T.q=vu,T.r=Ui,T.s=Vr,T.t=bd,T.u=un,T.v=xe,T.w=Et,T.x=jp,T.y=Xs,T.z=ls})),M("worker",["./shared"],(function(T){class s{constructor(j){this.keyCache={},j&&this.replace(j)}replace(j){this._layerConfigs={},this._layers={},this.update(j,[])}update(j,Z){for(const ae of j){this._layerConfigs[ae.id]=ae;const fe=this._layers[ae.id]=T.bJ(ae);fe._featureFilter=T.aa(fe.filter),this.keyCache[ae.id]&&delete this.keyCache[ae.id]}for(const ae of Z)delete this.keyCache[ae],delete this._layerConfigs[ae],delete this._layers[ae];this.familiesBySource={};const Y=T.cC(Object.values(this._layerConfigs),this.keyCache);for(const ae of Y){const fe=ae.map((Ye=>this._layers[Ye.id])),Se=fe[0];if(Se.visibility==="none")continue;const ke=Se.source||"";let we=this.familiesBySource[ke];we||(we=this.familiesBySource[ke]={});const Oe=Se.sourceLayer||"_geojsonTileLayer";let lt=we[Oe];lt||(lt=we[Oe]=[]),lt.push(fe)}}}class B{constructor(j){const Z={},Y=[];for(const ke in j){const we=j[ke],Oe=Z[ke]={};for(const lt in we){const Ye=we[+lt];if(!Ye||Ye.bitmap.width===0||Ye.bitmap.height===0)continue;const kt={x:0,y:0,w:Ye.bitmap.width+2,h:Ye.bitmap.height+2};Y.push(kt),Oe[lt]={rect:kt,metrics:Ye.metrics}}}const{w:ae,h:fe}=T.p(Y),Se=new T.q({width:ae||1,height:fe||1});for(const ke in j){const we=j[ke];for(const Oe in we){const lt=we[+Oe];if(!lt||lt.bitmap.width===0||lt.bitmap.height===0)continue;const Ye=Z[ke][Oe].rect;T.q.copy(lt.bitmap,Se,{x:0,y:0},{x:Ye.x+1,y:Ye.y+1},lt.bitmap)}}this.image=Se,this.positions=Z}}T.cD("GlyphAtlas",B);class O{constructor(j){this.tileID=new T.Z(j.tileID.overscaledZ,j.tileID.wrap,j.tileID.canonical.z,j.tileID.canonical.x,j.tileID.canonical.y),this.uid=j.uid,this.zoom=j.zoom,this.pixelRatio=j.pixelRatio,this.tileSize=j.tileSize,this.source=j.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=j.showCollisionBoxes,this.collectResourceTiming=!!j.collectResourceTiming,this.returnDependencies=!!j.returnDependencies,this.promoteId=j.promoteId,this.inFlightDependencies=[],this.globalState=j.globalState}parse(j,Z,Y,ae,fe){return T._(this,void 0,void 0,(function*(){this.status="parsing",this.data=j,this.collisionBoxArray=new T.a8;const Se=new T.cE(Object.keys(j.layers).sort()),ke=new T.cF(this.tileID,this.promoteId);ke.bucketLayerIDs=[];const we={},Oe={featureIndex:ke,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Y,subdivisionGranularity:fe},lt=Z.familiesBySource[this.source];for(const Vt in lt){const zt=j.layers[Vt];if(!zt)continue;zt.version===1&&T.w(`Vector tile source "${this.source}" layer "${Vt}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const dr=Se.encode(Vt),ht=[];for(let Wr=0;Wr=Yr.maxzoom||Yr.visibility!=="none"&&(X(Wr,this.zoom,Y),(we[Yr.id]=Yr.createBucket({index:ke.bucketLayerIDs.length,layers:Wr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:dr,sourceID:this.source,globalState:this.globalState})).populate(ht,Oe,this.tileID.canonical),ke.bucketLayerIDs.push(Wr.map((Zr=>Zr.id))))}}const Ye=T.bN(Oe.glyphDependencies,(Vt=>Object.keys(Vt).map(Number)));this.inFlightDependencies.forEach((Vt=>Vt==null?void 0:Vt.abort())),this.inFlightDependencies=[];let kt=Promise.resolve({});if(Object.keys(Ye).length){const Vt=new AbortController;this.inFlightDependencies.push(Vt),kt=ae.sendAsync({type:"GG",data:{stacks:Ye,source:this.source,tileID:this.tileID,type:"glyphs"}},Vt)}const xe=Object.keys(Oe.iconDependencies);let Ot=Promise.resolve({});if(xe.length){const Vt=new AbortController;this.inFlightDependencies.push(Vt),Ot=ae.sendAsync({type:"GI",data:{icons:xe,source:this.source,tileID:this.tileID,type:"icons"}},Vt)}const cr=Object.keys(Oe.patternDependencies);let Jt=Promise.resolve({});if(cr.length){const Vt=new AbortController;this.inFlightDependencies.push(Vt),Jt=ae.sendAsync({type:"GI",data:{icons:cr,source:this.source,tileID:this.tileID,type:"patterns"}},Vt)}const[Pr,Xr,dn]=yield Promise.all([kt,Ot,Jt]),xn=new B(Pr),mn=new T.cG(Xr,dn);for(const Vt in we){const zt=we[Vt];zt instanceof T.a9?(X(zt.layers,this.zoom,Y),T.cH({bucket:zt,glyphMap:Pr,glyphPositions:xn.positions,imageMap:Xr,imagePositions:mn.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:Oe.subdivisionGranularity})):zt.hasPattern&&(zt instanceof T.cI||zt instanceof T.cJ||zt instanceof T.cK)&&(X(zt.layers,this.zoom,Y),zt.addFeatures(Oe,this.tileID.canonical,mn.patternPositions))}return this.status="done",{buckets:Object.values(we).filter((Vt=>!Vt.isEmpty())),featureIndex:ke,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:xn.image,imageAtlas:mn,glyphMap:this.returnDependencies?Pr:null,iconMap:this.returnDependencies?Xr:null,glyphPositions:this.returnDependencies?xn.positions:null}}))}}function X(le,j,Z){const Y=new T.F(j);for(const ae of le)ae.recalculate(Y,Z)}class K{constructor(j,Z,Y){this.actor=j,this.layerIndex=Z,this.availableImages=Y,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(j,Z){return T._(this,void 0,void 0,(function*(){const Y=yield T.n(j.request,Z);try{return{vectorTile:new T.cL(new T.cM(Y.data)),rawData:Y.data,cacheControl:Y.cacheControl,expires:Y.expires}}catch(ae){const fe=new Uint8Array(Y.data);let Se=`Unable to parse the tile at ${j.request.url}, `;throw Se+=fe[0]===31&&fe[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${ae.message}`,new Error(Se)}}))}loadTile(j){return T._(this,void 0,void 0,(function*(){const Z=j.uid,Y=!!(j&&j.request&&j.request.collectResourceTiming)&&new T.cN(j.request),ae=new O(j);this.loading[Z]=ae;const fe=new AbortController;ae.abort=fe;try{const Se=yield this.loadVectorTile(j,fe);if(delete this.loading[Z],!Se)return null;const ke=Se.rawData,we={};Se.expires&&(we.expires=Se.expires),Se.cacheControl&&(we.cacheControl=Se.cacheControl);const Oe={};if(Y){const Ye=Y.finish();Ye&&(Oe.resourceTiming=JSON.parse(JSON.stringify(Ye)))}ae.vectorTile=Se.vectorTile;const lt=ae.parse(Se.vectorTile,this.layerIndex,this.availableImages,this.actor,j.subdivisionGranularity);this.loaded[Z]=ae,this.fetching[Z]={rawTileData:ke,cacheControl:we,resourceTiming:Oe};try{const Ye=yield lt;return T.e({rawTileData:ke.slice(0)},Ye,we,Oe)}finally{delete this.fetching[Z]}}catch(Se){throw delete this.loading[Z],ae.status="done",this.loaded[Z]=ae,Se}}))}reloadTile(j){return T._(this,void 0,void 0,(function*(){const Z=j.uid;if(!this.loaded||!this.loaded[Z])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const Y=this.loaded[Z];if(Y.showCollisionBoxes=j.showCollisionBoxes,Y.globalState=j.globalState,Y.status==="parsing"){const ae=yield Y.parse(Y.vectorTile,this.layerIndex,this.availableImages,this.actor,j.subdivisionGranularity);let fe;if(this.fetching[Z]){const{rawTileData:Se,cacheControl:ke,resourceTiming:we}=this.fetching[Z];delete this.fetching[Z],fe=T.e({rawTileData:Se.slice(0)},ae,ke,we)}else fe=ae;return fe}if(Y.status==="done"&&Y.vectorTile)return Y.parse(Y.vectorTile,this.layerIndex,this.availableImages,this.actor,j.subdivisionGranularity)}))}abortTile(j){return T._(this,void 0,void 0,(function*(){const Z=this.loading,Y=j.uid;Z&&Z[Y]&&Z[Y].abort&&(Z[Y].abort.abort(),delete Z[Y])}))}removeTile(j){return T._(this,void 0,void 0,(function*(){this.loaded&&this.loaded[j.uid]&&delete this.loaded[j.uid]}))}}class ne{constructor(){this.loaded={}}loadTile(j){return T._(this,void 0,void 0,(function*(){const{uid:Z,encoding:Y,rawImageData:ae,redFactor:fe,greenFactor:Se,blueFactor:ke,baseShift:we}=j,Oe=ae.width+2,lt=ae.height+2,Ye=T.b(ae)?new T.R({width:Oe,height:lt},yield T.cO(ae,-1,-1,Oe,lt)):ae,kt=new T.cP(Z,Ye,Y,fe,Se,ke,we);return this.loaded=this.loaded||{},this.loaded[Z]=kt,kt}))}removeTile(j){const Z=this.loaded,Y=j.uid;Z&&Z[Y]&&delete Z[Y]}}var H,pe,ge=(function(){if(pe)return H;function le(Z,Y){if(Z.length!==0){j(Z[0],Y);for(var ae=1;ae=Math.abs(Oe)?ae-lt+Oe:Oe-lt+ae,ae=lt}ae+fe>=0!=!!Y&&Z.reverse()}return pe=1,H=function Z(Y,ae){var fe,Se=Y&&Y.type;if(Se==="FeatureCollection")for(fe=0;fe>31}function Ze(le,j){const Z=le.loadGeometry(),Y=le.type;let ae=0,fe=0;for(const Se of Z){let ke=1;Y===1&&(ke=Se.length),j.writeVarint(Je(1,ke));const we=Y===3?Se.length-1:Se.length;for(let Oe=0;Oele},et=Math.fround||(nt=new Float32Array(1),le=>(nt[0]=+le,nt[0]));var nt;class Ue{constructor(j){this.options=Object.assign(Object.create(Le),j),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(j){const{log:Z,minZoom:Y,maxZoom:ae}=this.options;Z&&console.time("total time");const fe=`prepare ${j.length} points`;Z&&console.time(fe),this.points=j;const Se=[];for(let we=0;we=Y;we--){const Oe=+Date.now();ke=this.trees[we]=this._createTree(this._cluster(ke,we)),Z&&console.log("z%d: %d clusters in %dms",we,ke.numItems,+Date.now()-Oe)}return Z&&console.timeEnd("total time"),this}getClusters(j,Z){let Y=((j[0]+180)%360+360)%360-180;const ae=Math.max(-90,Math.min(90,j[1]));let fe=j[2]===180?180:((j[2]+180)%360+360)%360-180;const Se=Math.max(-90,Math.min(90,j[3]));if(j[2]-j[0]>=360)Y=-180,fe=180;else if(Y>fe){const Ye=this.getClusters([Y,ae,180,Se],Z),kt=this.getClusters([-180,ae,fe,Se],Z);return Ye.concat(kt)}const ke=this.trees[this._limitZoom(Z)],we=ke.range(Q(Y),re(Se),Q(fe),re(ae)),Oe=ke.data,lt=[];for(const Ye of we){const kt=this.stride*Ye;lt.push(Oe[kt+5]>1?Me(Oe,kt,this.clusterProps):this.points[Oe[kt+3]])}return lt}getChildren(j){const Z=this._getOriginId(j),Y=this._getOriginZoom(j),ae="No cluster with the specified id.",fe=this.trees[Y];if(!fe)throw new Error(ae);const Se=fe.data;if(Z*this.stride>=Se.length)throw new Error(ae);const ke=this.options.radius/(this.options.extent*Math.pow(2,Y-1)),we=fe.within(Se[Z*this.stride],Se[Z*this.stride+1],ke),Oe=[];for(const lt of we){const Ye=lt*this.stride;Se[Ye+4]===j&&Oe.push(Se[Ye+5]>1?Me(Se,Ye,this.clusterProps):this.points[Se[Ye+3]])}if(Oe.length===0)throw new Error(ae);return Oe}getLeaves(j,Z,Y){const ae=[];return this._appendLeaves(ae,j,Z=Z||10,Y=Y||0,0),ae}getTile(j,Z,Y){const ae=this.trees[this._limitZoom(j)],fe=Math.pow(2,j),{extent:Se,radius:ke}=this.options,we=ke/Se,Oe=(Y-we)/fe,lt=(Y+1+we)/fe,Ye={features:[]};return this._addTileFeatures(ae.range((Z-we)/fe,Oe,(Z+1+we)/fe,lt),ae.data,Z,Y,fe,Ye),Z===0&&this._addTileFeatures(ae.range(1-we/fe,Oe,1,lt),ae.data,fe,Y,fe,Ye),Z===fe-1&&this._addTileFeatures(ae.range(0,Oe,we/fe,lt),ae.data,-1,Y,fe,Ye),Ye.features.length?Ye:null}getClusterExpansionZoom(j){let Z=this._getOriginZoom(j)-1;for(;Z<=this.options.maxZoom;){const Y=this.getChildren(j);if(Z++,Y.length!==1)break;j=Y[0].properties.cluster_id}return Z}_appendLeaves(j,Z,Y,ae,fe){const Se=this.getChildren(Z);for(const ke of Se){const we=ke.properties;if(we&&we.cluster?fe+we.point_count<=ae?fe+=we.point_count:fe=this._appendLeaves(j,we.cluster_id,Y,ae,fe):fe1;let lt,Ye,kt;if(Oe)lt=yt(Z,we,this.clusterProps),Ye=Z[we],kt=Z[we+1];else{const cr=this.points[Z[we+3]];lt=cr.properties;const[Jt,Pr]=cr.geometry.coordinates;Ye=Q(Jt),kt=re(Pr)}const xe={type:1,geometry:[[Math.round(this.options.extent*(Ye*fe-Y)),Math.round(this.options.extent*(kt*fe-ae))]],tags:lt};let Ot;Ot=Oe||this.options.generateId?Z[we+3]:this.points[Z[we+3]].id,Ot!==void 0&&(xe.id=Ot),Se.features.push(xe)}}_limitZoom(j){return Math.max(this.options.minZoom,Math.min(Math.floor(+j),this.options.maxZoom+1))}_cluster(j,Z){const{radius:Y,extent:ae,reduce:fe,minPoints:Se}=this.options,ke=Y/(ae*Math.pow(2,Z)),we=j.data,Oe=[],lt=this.stride;for(let Ye=0;YeZ&&(Jt+=we[Xr+5])}if(Jt>cr&&Jt>=Se){let Pr,Xr=kt*cr,dn=xe*cr,xn=-1;const mn=(Ye/lt<<5)+(Z+1)+this.points.length;for(const Vt of Ot){const zt=Vt*lt;if(we[zt+2]<=Z)continue;we[zt+2]=Z;const dr=we[zt+5];Xr+=we[zt]*dr,dn+=we[zt+1]*dr,we[zt+4]=mn,fe&&(Pr||(Pr=this._map(we,Ye,!0),xn=this.clusterProps.length,this.clusterProps.push(Pr)),fe(Pr,this._map(we,zt)))}we[Ye+4]=mn,Oe.push(Xr/Jt,dn/Jt,1/0,mn,-1,Jt),fe&&Oe.push(xn)}else{for(let Pr=0;Pr1)for(const Pr of Ot){const Xr=Pr*lt;if(!(we[Xr+2]<=Z)){we[Xr+2]=Z;for(let dn=0;dn>5}_getOriginZoom(j){return(j-this.points.length)%32}_map(j,Z,Y){if(j[Z+5]>1){const Se=this.clusterProps[j[Z+6]];return Y?Object.assign({},Se):Se}const ae=this.points[j[Z+3]].properties,fe=this.options.map(ae);return Y&&fe===ae?Object.assign({},fe):fe}}function Me(le,j,Z){return{type:"Feature",id:le[j+3],properties:yt(le,j,Z),geometry:{type:"Point",coordinates:[(Y=le[j],360*(Y-.5)),he(le[j+1])]}};var Y}function yt(le,j,Z){const Y=le[j+5],ae=Y>=1e4?`${Math.round(Y/1e3)}k`:Y>=1e3?Math.round(Y/100)/10+"k":Y,fe=le[j+6],Se=fe===-1?{}:Object.assign({},Z[fe]);return Object.assign(Se,{cluster:!0,cluster_id:le[j+3],point_count:Y,point_count_abbreviated:ae})}function Q(le){return le/360+.5}function re(le){const j=Math.sin(le*Math.PI/180),Z=.5-.25*Math.log((1+j)/(1-j))/Math.PI;return Z<0?0:Z>1?1:Z}function he(le){const j=(180-360*le)*Math.PI/180;return 360*Math.atan(Math.exp(j))/Math.PI-90}function oe(le,j,Z,Y){let ae=Y;const fe=j+(Z-j>>1);let Se,ke=Z-j;const we=le[j],Oe=le[j+1],lt=le[Z],Ye=le[Z+1];for(let kt=j+3;ktae)Se=kt,ae=xe;else if(xe===ae){const Ot=Math.abs(kt-fe);OtY&&(Se-j>3&&oe(le,j,Se,Y),le[Se+2]=ae,Z-Se>3&&oe(le,Se,Z,Y))}function Ae(le,j,Z,Y,ae,fe){let Se=ae-Z,ke=fe-Y;if(Se!==0||ke!==0){const we=((le-Z)*Se+(j-Y)*ke)/(Se*Se+ke*ke);we>1?(Z=ae,Y=fe):we>0&&(Z+=Se*we,Y+=ke*we)}return Se=le-Z,ke=j-Y,Se*Se+ke*ke}function je(le,j,Z,Y){const ae={id:le??null,type:j,geometry:Z,tags:Y,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(j==="Point"||j==="MultiPoint"||j==="LineString")ft(ae,Z);else if(j==="Polygon")ft(ae,Z[0]);else if(j==="MultiLineString")for(const fe of Z)ft(ae,fe);else if(j==="MultiPolygon")for(const fe of Z)ft(ae,fe[0]);return ae}function ft(le,j){for(let Z=0;Z0&&(Se+=Y?(ae*lt-Oe*fe)/2:Math.sqrt(Math.pow(Oe-ae,2)+Math.pow(lt-fe,2))),ae=Oe,fe=lt}const ke=j.length-3;j[2]=1,oe(j,0,ke,Z),j[ke+2]=1,j.size=Math.abs(Se),j.start=0,j.end=j.size}function Dt(le,j,Z,Y){for(let ae=0;ae1?1:Z}function vt(le,j,Z,Y,ae,fe,Se,ke){if(Y/=j,fe>=(Z/=j)&&Se=Y)return null;const we=[];for(const Oe of le){const lt=Oe.geometry;let Ye=Oe.type;const kt=ae===0?Oe.minX:Oe.minY,xe=ae===0?Oe.maxX:Oe.maxY;if(kt>=Z&&xe=Y)continue;let Ot=[];if(Ye==="Point"||Ye==="MultiPoint")xt(lt,Ot,Z,Y,ae);else if(Ye==="LineString")It(lt,Ot,Z,Y,ae,!1,ke.lineMetrics);else if(Ye==="MultiLineString")_t(lt,Ot,Z,Y,ae,!1);else if(Ye==="Polygon")_t(lt,Ot,Z,Y,ae,!0);else if(Ye==="MultiPolygon")for(const cr of lt){const Jt=[];_t(cr,Jt,Z,Y,ae,!0),Jt.length&&Ot.push(Jt)}if(Ot.length){if(ke.lineMetrics&&Ye==="LineString"){for(const cr of Ot)we.push(je(Oe.id,Ye,cr,Oe.tags));continue}Ye!=="LineString"&&Ye!=="MultiLineString"||(Ot.length===1?(Ye="LineString",Ot=Ot[0]):Ye="MultiLineString"),Ye!=="Point"&&Ye!=="MultiPoint"||(Ye=Ot.length===3?"Point":"MultiPoint"),we.push(je(Oe.id,Ye,Ot,Oe.tags))}}return we.length?we:null}function xt(le,j,Z,Y,ae){for(let fe=0;fe=Z&&Se<=Y&&Et(j,le[fe],le[fe+1],le[fe+2])}}function It(le,j,Z,Y,ae,fe,Se){let ke=wt(le);const we=ae===0?Rt:Ut;let Oe,lt,Ye=le.start;for(let Jt=0;JtZ&&(lt=we(ke,Pr,Xr,xn,mn,Z),Se&&(ke.start=Ye+Oe*lt)):Vt>Y?zt=Z&&(lt=we(ke,Pr,Xr,xn,mn,Z),dr=!0),zt>Y&&Vt<=Y&&(lt=we(ke,Pr,Xr,xn,mn,Y),dr=!0),!fe&&dr&&(Se&&(ke.end=Ye+Oe*lt),j.push(ke),ke=wt(le)),Se&&(Ye+=Oe)}let kt=le.length-3;const xe=le[kt],Ot=le[kt+1],cr=ae===0?xe:Ot;cr>=Z&&cr<=Y&&Et(ke,xe,Ot,le[kt+2]),kt=ke.length-3,fe&&kt>=3&&(ke[kt]!==ke[0]||ke[kt+1]!==ke[1])&&Et(ke,ke[0],ke[1],ke[2]),ke.length&&j.push(ke)}function wt(le){const j=[];return j.size=le.size,j.start=le.start,j.end=le.end,j}function _t(le,j,Z,Y,ae,fe){for(const Se of le)It(Se,j,Z,Y,ae,fe,!1)}function Et(le,j,Z,Y){le.push(j,Z,Y)}function Rt(le,j,Z,Y,ae,fe){const Se=(fe-j)/(Y-j);return Et(le,fe,Z+(ae-Z)*Se,1),Se}function Ut(le,j,Z,Y,ae,fe){const Se=(fe-Z)/(ae-Z);return Et(le,j+(Y-j)*Se,fe,1),Se}function er(le,j){const Z=[];for(let Y=0;Y0&&j.size<(ae?Se:Y))return void(Z.numPoints+=j.length/3);const ke=[];for(let we=0;weSe)&&(Z.numSimplified++,ke.push(j[we],j[we+1])),Z.numPoints++;ae&&(function(we,Oe){let lt=0;for(let Ye=0,kt=we.length,xe=kt-2;Ye0===Oe)for(let Ye=0,kt=we.length;Ye24)throw new Error("maxZoom should be in the 0-24 range");if(Z.promoteId&&Z.generateId)throw new Error("promoteId and generateId cannot be used together.");let ae=(function(fe,Se){const ke=[];if(fe.type==="FeatureCollection")for(let we=0;we1&&console.time("creation"),xe=this.tiles[kt]=sr(j,Z,Y,ae,Oe),this.tileCoords.push({z:Z,x:Y,y:ae}),lt)){lt>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Z,Y,ae,xe.numFeatures,xe.numPoints,xe.numSimplified),console.timeEnd("creation"));const dr=`z${Z}`;this.stats[dr]=(this.stats[dr]||0)+1,this.total++}if(xe.source=j,fe==null){if(Z===Oe.indexMaxZoom||xe.numPoints<=Oe.indexMaxPoints)continue}else{if(Z===Oe.maxZoom||Z===fe)continue;if(fe!=null){const dr=fe-Z;if(Y!==Se>>dr||ae!==ke>>dr)continue}}if(xe.source=null,j.length===0)continue;lt>1&&console.time("clipping");const Ot=.5*Oe.buffer/Oe.extent,cr=.5-Ot,Jt=.5+Ot,Pr=1+Ot;let Xr=null,dn=null,xn=null,mn=null,Vt=vt(j,Ye,Y-Ot,Y+Jt,0,xe.minX,xe.maxX,Oe),zt=vt(j,Ye,Y+cr,Y+Pr,0,xe.minX,xe.maxX,Oe);j=null,Vt&&(Xr=vt(Vt,Ye,ae-Ot,ae+Jt,1,xe.minY,xe.maxY,Oe),dn=vt(Vt,Ye,ae+cr,ae+Pr,1,xe.minY,xe.maxY,Oe),Vt=null),zt&&(xn=vt(zt,Ye,ae-Ot,ae+Jt,1,xe.minY,xe.maxY,Oe),mn=vt(zt,Ye,ae+cr,ae+Pr,1,xe.minY,xe.maxY,Oe),zt=null),lt>1&&console.timeEnd("clipping"),we.push(Xr||[],Z+1,2*Y,2*ae),we.push(dn||[],Z+1,2*Y,2*ae+1),we.push(xn||[],Z+1,2*Y+1,2*ae),we.push(mn||[],Z+1,2*Y+1,2*ae+1)}}getTile(j,Z,Y){j=+j,Z=+Z,Y=+Y;const ae=this.options,{extent:fe,debug:Se}=ae;if(j<0||j>24)return null;const ke=1<1&&console.log("drilling down to z%d-%d-%d",j,Z,Y);let Oe,lt=j,Ye=Z,kt=Y;for(;!Oe&<>0;)lt--,Ye>>=1,kt>>=1,Oe=this.tiles[_r(lt,Ye,kt)];return Oe&&Oe.source?(Se>1&&(console.log("found parent tile z%d-%d-%d",lt,Ye,kt),console.time("drilling down")),this.splitTile(Oe.source,lt,Ye,kt,j,Z,Y),Se>1&&console.timeEnd("drilling down"),this.tiles[we]?Nt(this.tiles[we],fe):null):null}}function _r(le,j,Z){return 32*((1<{Ye.properties=xe;const Ot={};for(const cr of kt)Ot[cr]=we[cr].evaluate(lt,Ye);return Ot},Se.reduce=(xe,Ot)=>{Ye.properties=Ot;for(const cr of kt)lt.accumulated=xe[cr],xe[cr]=Oe[cr].evaluate(lt,Ye)},Se})(j)).load(ae.features):(function(Se,ke){return new hr(Se,ke)})(ae,j.geojsonVtOptions),this.loaded={};const fe={data:ae};if(Y){const Se=Y.finish();Se&&(fe.resourceTiming={},fe.resourceTiming[j.source]=JSON.parse(JSON.stringify(Se)))}return fe}catch(ae){if(delete this._pendingRequest,T.cy(ae))return{abandoned:!0};throw ae}}))}getData(){return T._(this,void 0,void 0,(function*(){return this._pendingData}))}reloadTile(j){const Z=this.loaded;return Z&&Z[j.uid]?super.reloadTile(j):this.loadTile(j)}loadAndProcessGeoJSON(j,Z){return T._(this,void 0,void 0,(function*(){let Y=yield this.loadGeoJSON(j,Z);if(delete this._pendingRequest,typeof Y!="object")throw new Error(`Input data given to '${j.source}' is not a valid GeoJSON object.`);if(Ie(Y,!0),j.filter){const ae=T.cT(j.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(ae.result==="error")throw new Error(ae.value.map((Se=>`${Se.key}: ${Se.message}`)).join(", "));Y={type:"FeatureCollection",features:Y.features.filter((Se=>ae.value.evaluate({zoom:0},Se)))}}return Y}))}loadGeoJSON(j,Z){return T._(this,void 0,void 0,(function*(){const{promoteId:Y}=j;if(j.request){const ae=yield T.j(j.request,Z);return this._dataUpdateable=T.cV(ae.data,Y)?T.cU(ae.data,Y):void 0,ae.data}if(typeof j.data=="string")try{const ae=JSON.parse(j.data);return this._dataUpdateable=T.cV(ae,Y)?T.cU(ae,Y):void 0,ae}catch{throw new Error(`Input data given to '${j.source}' is not a valid GeoJSON object.`)}if(!j.dataDiff)throw new Error(`Input data given to '${j.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${j.source}`);return T.cW(this._dataUpdateable,j.dataDiff,Y),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}}))}removeSource(j){return T._(this,void 0,void 0,(function*(){this._pendingRequest&&this._pendingRequest.abort()}))}getClusterExpansionZoom(j){return this._geoJSONIndex.getClusterExpansionZoom(j.clusterId)}getClusterChildren(j){return this._geoJSONIndex.getChildren(j.clusterId)}getClusterLeaves(j){return this._geoJSONIndex.getLeaves(j.clusterId,j.limit,j.offset)}}class qr{constructor(j){this.self=j,this.actor=new T.J(j),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Z,Y)=>{if(this.externalWorkerSourceTypes[Z])throw new Error(`Worker source with name "${Z}" already registered.`);this.externalWorkerSourceTypes[Z]=Y},this.self.addProtocol=T.cA,this.self.removeProtocol=T.cB,this.self.registerRTLTextPlugin=Z=>{T.cX.setMethods(Z)},this.actor.registerMessageHandler("LDT",((Z,Y)=>this._getDEMWorkerSource(Z,Y.source).loadTile(Y))),this.actor.registerMessageHandler("RDT",((Z,Y)=>T._(this,void 0,void 0,(function*(){this._getDEMWorkerSource(Z,Y.source).removeTile(Y)})))),this.actor.registerMessageHandler("GCEZ",((Z,Y)=>T._(this,void 0,void 0,(function*(){return this._getWorkerSource(Z,Y.type,Y.source).getClusterExpansionZoom(Y)})))),this.actor.registerMessageHandler("GCC",((Z,Y)=>T._(this,void 0,void 0,(function*(){return this._getWorkerSource(Z,Y.type,Y.source).getClusterChildren(Y)})))),this.actor.registerMessageHandler("GCL",((Z,Y)=>T._(this,void 0,void 0,(function*(){return this._getWorkerSource(Z,Y.type,Y.source).getClusterLeaves(Y)})))),this.actor.registerMessageHandler("LD",((Z,Y)=>this._getWorkerSource(Z,Y.type,Y.source).loadData(Y))),this.actor.registerMessageHandler("GD",((Z,Y)=>this._getWorkerSource(Z,Y.type,Y.source).getData())),this.actor.registerMessageHandler("LT",((Z,Y)=>this._getWorkerSource(Z,Y.type,Y.source).loadTile(Y))),this.actor.registerMessageHandler("RT",((Z,Y)=>this._getWorkerSource(Z,Y.type,Y.source).reloadTile(Y))),this.actor.registerMessageHandler("AT",((Z,Y)=>this._getWorkerSource(Z,Y.type,Y.source).abortTile(Y))),this.actor.registerMessageHandler("RMT",((Z,Y)=>this._getWorkerSource(Z,Y.type,Y.source).removeTile(Y))),this.actor.registerMessageHandler("RS",((Z,Y)=>T._(this,void 0,void 0,(function*(){if(!this.workerSources[Z]||!this.workerSources[Z][Y.type]||!this.workerSources[Z][Y.type][Y.source])return;const ae=this.workerSources[Z][Y.type][Y.source];delete this.workerSources[Z][Y.type][Y.source],ae.removeSource!==void 0&&ae.removeSource(Y)})))),this.actor.registerMessageHandler("RM",(Z=>T._(this,void 0,void 0,(function*(){delete this.layerIndexes[Z],delete this.availableImages[Z],delete this.workerSources[Z],delete this.demWorkerSources[Z]})))),this.actor.registerMessageHandler("SR",((Z,Y)=>T._(this,void 0,void 0,(function*(){this.referrer=Y})))),this.actor.registerMessageHandler("SRPS",((Z,Y)=>this._syncRTLPluginState(Z,Y))),this.actor.registerMessageHandler("IS",((Z,Y)=>T._(this,void 0,void 0,(function*(){this.self.importScripts(Y)})))),this.actor.registerMessageHandler("SI",((Z,Y)=>this._setImages(Z,Y))),this.actor.registerMessageHandler("UL",((Z,Y)=>T._(this,void 0,void 0,(function*(){this._getLayerIndex(Z).update(Y.layers,Y.removedIds)})))),this.actor.registerMessageHandler("SL",((Z,Y)=>T._(this,void 0,void 0,(function*(){this._getLayerIndex(Z).replace(Y)}))))}_setImages(j,Z){return T._(this,void 0,void 0,(function*(){this.availableImages[j]=Z;for(const Y in this.workerSources[j]){const ae=this.workerSources[j][Y];for(const fe in ae)ae[fe].availableImages=Z}}))}_syncRTLPluginState(j,Z){return T._(this,void 0,void 0,(function*(){return yield T.cX.syncState(Z,this.self.importScripts)}))}_getAvailableImages(j){let Z=this.availableImages[j];return Z||(Z=[]),Z}_getLayerIndex(j){let Z=this.layerIndexes[j];return Z||(Z=this.layerIndexes[j]=new s),Z}_getWorkerSource(j,Z,Y){if(this.workerSources[j]||(this.workerSources[j]={}),this.workerSources[j][Z]||(this.workerSources[j][Z]={}),!this.workerSources[j][Z][Y]){const ae={sendAsync:(fe,Se)=>(fe.targetMapId=j,this.actor.sendAsync(fe,Se))};switch(Z){case"vector":this.workerSources[j][Z][Y]=new K(ae,this._getLayerIndex(j),this._getAvailableImages(j));break;case"geojson":this.workerSources[j][Z][Y]=new Ir(ae,this._getLayerIndex(j),this._getAvailableImages(j));break;default:this.workerSources[j][Z][Y]=new this.externalWorkerSourceTypes[Z](ae,this._getLayerIndex(j),this._getAvailableImages(j))}}return this.workerSources[j][Z][Y]}_getDEMWorkerSource(j,Z){return this.demWorkerSources[j]||(this.demWorkerSources[j]={}),this.demWorkerSources[j][Z]||(this.demWorkerSources[j][Z]=new ne),this.demWorkerSources[j][Z]}}return T.i(self)&&(self.worker=new qr(self)),qr})),M("index",["exports","./shared"],(function(T,s){var B="5.6.2";function O(){var h=new s.A(4);return s.A!=Float32Array&&(h[1]=0,h[2]=0),h[0]=1,h[3]=1,h}let X,K;const ne={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frame(h,e,i){const l=requestAnimationFrame((d=>{u(),e(d)})),{unsubscribe:u}=s.s(h.signal,"abort",(()=>{u(),cancelAnimationFrame(l),i(s.c())}),!1)},frameAsync(h){return new Promise(((e,i)=>{this.frame(h,e,i)}))},getImageData(h,e=0){return this.getImageCanvasContext(h).getImageData(-e,-e,h.width+2*e,h.height+2*e)},getImageCanvasContext(h){const e=window.document.createElement("canvas"),i=e.getContext("2d",{willReadFrequently:!0});if(!i)throw new Error("failed to create canvas 2d context");return e.width=h.width,e.height=h.height,i.drawImage(h,0,0,h.width,h.height),i},resolveURL:h=>(X||(X=document.createElement("a")),X.href=h,X.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(K==null&&(K=matchMedia("(prefers-reduced-motion: reduce)")),K.matches)}};class H{static testProp(e){if(!H.docStyle)return e[0];for(let i=0;i{window.removeEventListener("click",H.suppressClickInternal,!0)}),0)}static getScale(e){const i=e.getBoundingClientRect();return{x:i.width/e.offsetWidth||1,y:i.height/e.offsetHeight||1,boundingClientRect:i}}static getPoint(e,i,l){const u=i.boundingClientRect;return new s.P((l.clientX-u.left)/i.x-e.clientLeft,(l.clientY-u.top)/i.y-e.clientTop)}static mousePos(e,i){const l=H.getScale(e);return H.getPoint(e,l,i)}static touchPos(e,i){const l=[],u=H.getScale(e);for(let d=0;d{ge&&ze(ge),ge=null,De=!0},Ie.onerror=()=>{Ee=!0,ge=null},Ie.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),(function(h){let e,i,l,u;h.resetRequestQueue=()=>{e=[],i=0,l=0,u={}},h.addThrottleControl=C=>{const P=l++;return u[P]=C,P},h.removeThrottleControl=C=>{delete u[C],g()},h.getImage=(C,P,E=!0)=>new Promise(((R,D)=>{pe.supported&&(C.headers||(C.headers={}),C.headers.accept="image/webp,*/*"),s.e(C,{type:"image"}),e.push({abortController:P,requestParameters:C,supportImageRefresh:E,state:"queued",onError:N=>{D(N)},onSuccess:N=>{R(N)}}),g()}));const d=C=>s._(this,void 0,void 0,(function*(){C.state="running";const{requestParameters:P,supportImageRefresh:E,onError:R,onSuccess:D,abortController:N}=C,G=E===!1&&!s.i(self)&&!s.g(P.url)&&(!P.headers||Object.keys(P.headers).reduce(((ie,ue)=>ie&&ue==="accept"),!0));i++;const te=G?w(P,N):s.m(P,N);try{const ie=yield te;delete C.abortController,C.state="completed",ie.data instanceof HTMLImageElement||s.b(ie.data)?D(ie):ie.data&&D({data:yield(ee=ie.data,typeof createImageBitmap=="function"?s.f(ee):s.h(ee)),cacheControl:ie.cacheControl,expires:ie.expires})}catch(ie){delete C.abortController,R(ie)}finally{i--,g()}var ee})),g=()=>{const C=(()=>{for(const P of Object.keys(u))if(u[P]())return!0;return!1})()?s.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:s.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let P=i;P0;P++){const E=e.shift();E.abortController.signal.aborted?P--:d(E)}},w=(C,P)=>new Promise(((E,R)=>{const D=new Image,N=C.url,G=C.credentials;G&&G==="include"?D.crossOrigin="use-credentials":(G&&G==="same-origin"||!s.d(N))&&(D.crossOrigin="anonymous"),P.signal.addEventListener("abort",(()=>{D.src="",R(s.c())})),D.fetchPriority="high",D.onload=()=>{D.onerror=D.onload=null,E({data:D})},D.onerror=()=>{D.onerror=D.onload=null,P.signal.aborted||R(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."))},D.src=N}))})(Fe||(Fe={})),Fe.resetRequestQueue();class $e{constructor(e){this._transformRequestFn=e??null}transformRequest(e,i){return this._transformRequestFn&&this._transformRequestFn(e,i)||{url:e}}setTransformRequest(e){this._transformRequestFn=e}}function Je(h){const e=[];if(typeof h=="string")e.push({id:"default",url:h});else if(h&&h.length>0){const i=[];for(const{id:l,url:u}of h){const d=`${l}${u}`;i.indexOf(d)===-1&&(i.push(d),e.push({id:l,url:u}))}}return e}function qe(h,e,i){try{const l=new URL(h);return l.pathname+=`${e}${i}`,l.toString()}catch{throw new Error(`Invalid sprite URL "${h}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function Ze(h){const{userImage:e}=h;return!!(e&&e.render&&e.render())&&(h.data.replace(new Uint8Array(e.data.buffer)),!0)}class Qe extends s.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new s.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(const{ids:i,promiseResolve:l}of this.requestors)l(this._getImagesForIds(i));this.requestors=[]}}getImage(e){const i=this.images[e];if(i&&!i.data&&i.spriteData){const l=i.spriteData;i.data=new s.R({width:l.width,height:l.height},l.context.getImageData(l.x,l.y,l.width,l.height).data),i.spriteData=null}return i}addImage(e,i){if(this.images[e])throw new Error(`Image id ${e} already exist, use updateImage instead`);this._validate(e,i)&&(this.images[e]=i)}_validate(e,i){let l=!0;const u=i.data||i.spriteData;return this._validateStretch(i.stretchX,u&&u.width)||(this.fire(new s.k(new Error(`Image "${e}" has invalid "stretchX" value`))),l=!1),this._validateStretch(i.stretchY,u&&u.height)||(this.fire(new s.k(new Error(`Image "${e}" has invalid "stretchY" value`))),l=!1),this._validateContent(i.content,i)||(this.fire(new s.k(new Error(`Image "${e}" has invalid "content" value`))),l=!1),l}_validateStretch(e,i){if(!e)return!0;let l=0;for(const u of e){if(u[0]{let u=!0;if(!this.isLoaded())for(const d of e)this.images[d]||(u=!1);this.isLoaded()||u?i(this._getImagesForIds(e)):this.requestors.push({ids:e,promiseResolve:i})}))}_getImagesForIds(e){const i={};for(const l of e){let u=this.getImage(l);u||(this.fire(new s.l("styleimagemissing",{id:l})),u=this.getImage(l)),u?i[l]={data:u.data.clone(),pixelRatio:u.pixelRatio,sdf:u.sdf,version:u.version,stretchX:u.stretchX,stretchY:u.stretchY,content:u.content,textFitWidth:u.textFitWidth,textFitHeight:u.textFitHeight,hasRenderCallback:!!(u.userImage&&u.userImage.render)}:s.w(`Image "${l}" 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 i}getPixelSize(){const{width:e,height:i}=this.atlasImage;return{width:e,height:i}}getPattern(e){const i=this.patterns[e],l=this.getImage(e);if(!l)return null;if(i&&i.position.version===l.version)return i.position;if(i)i.position.version=l.version;else{const u={w:l.data.width+2,h:l.data.height+2,x:0,y:0},d=new s.I(u,l);this.patterns[e]={bin:u,position:d}}return this._updatePatternAtlas(),this.patterns[e].position}bind(e){const i=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new s.T(e,this.atlasImage,i.RGBA),this.atlasTexture.bind(i.LINEAR,i.CLAMP_TO_EDGE)}_updatePatternAtlas(){const e=[];for(const d in this.patterns)e.push(this.patterns[d].bin);const{w:i,h:l}=s.p(e),u=this.atlasImage;u.resize({width:i||1,height:l||1});for(const d in this.patterns){const{bin:g}=this.patterns[d],w=g.x+1,C=g.y+1,P=this.getImage(d).data,E=P.width,R=P.height;s.R.copy(P,u,{x:0,y:0},{x:w,y:C},{width:E,height:R}),s.R.copy(P,u,{x:0,y:R-1},{x:w,y:C-1},{width:E,height:1}),s.R.copy(P,u,{x:0,y:0},{x:w,y:C+R},{width:E,height:1}),s.R.copy(P,u,{x:E-1,y:0},{x:w-1,y:C},{width:1,height:R}),s.R.copy(P,u,{x:0,y:0},{x:w+E,y:C},{width:1,height:R})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(e){for(const i of e){if(this.callbackDispatchedThisFrame[i])continue;this.callbackDispatchedThisFrame[i]=!0;const l=this.getImage(i);l||s.w(`Image with ID: "${i}" was not found`),Ze(l)&&this.updateImage(i,l)}}}const Le=1e20;function et(h,e,i,l,u,d,g,w,C){for(let P=e;P-1);C++,d[C]=w,g[C]=P,g[C+1]=Le}for(let w=0,C=0;w65535)throw new Error("glyphs > 65535 not supported");if(l.ranges[d])return{stack:e,id:i,glyph:u};if(!this.url)throw new Error("glyphsUrl is not set");if(!l.requests[d]){const w=Ue.loadGlyphRange(e,d,this.url,this.requestManager);l.requests[d]=w}const g=yield l.requests[d];for(const w in g)this._doesCharSupportLocalGlyph(+w)||(l.glyphs[+w]=g[+w]);return l.ranges[d]=!0,{stack:e,id:i,glyph:g[i]||null}}))}_doesCharSupportLocalGlyph(e){return!!this.localIdeographFontFamily&&(new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(e))||s.u["CJK Unified Ideographs"](e)||s.u["Hangul Syllables"](e)||s.u.Hiragana(e)||s.u.Katakana(e)||s.u["CJK Symbols and Punctuation"](e)||s.u["Halfwidth and Fullwidth Forms"](e))}_tinySDF(e,i,l){const u=this.localIdeographFontFamily;if(!u||!this._doesCharSupportLocalGlyph(l))return;let d=e.tinySDF;if(!d){let w="400";/bold/i.test(i)?w="900":/medium/i.test(i)?w="500":/light/i.test(i)&&(w="200"),d=e.tinySDF=new Ue.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:u,fontWeight:w})}const g=d.draw(String.fromCharCode(l));return{id:l,bitmap:new s.q({width:g.width||60,height:g.height||60},g.data),metrics:{width:g.glyphWidth/2||24,height:g.glyphHeight/2||24,left:g.glyphLeft/2+.5||0,top:g.glyphTop/2-27.5||-8,advance:g.glyphAdvance/2||24,isDoubleResolution:!0}}}}Ue.loadGlyphRange=function(h,e,i,l){return s._(this,void 0,void 0,(function*(){const u=256*e,d=u+255,g=l.transformRequest(i.replace("{fontstack}",h).replace("{range}",`${u}-${d}`),"Glyphs"),w=yield s.n(g,new AbortController);if(!w||!w.data)throw new Error(`Could not load glyph range. range: ${e}, ${u}-${d}`);const C={};for(const P of s.o(w.data))C[P.id]=P;return C}))},Ue.TinySDF=class{constructor({fontSize:h=24,buffer:e=3,radius:i=8,cutoff:l=.25,fontFamily:u="sans-serif",fontWeight:d="normal",fontStyle:g="normal",lang:w=null}={}){this.buffer=e,this.cutoff=l,this.radius=i,this.lang=w;const C=this.size=h+4*e,P=this._createCanvas(C),E=this.ctx=P.getContext("2d",{willReadFrequently:!0});E.font=`${g} ${d} ${h}px ${u}`,E.textBaseline="alphabetic",E.textAlign="left",E.fillStyle="black",this.gridOuter=new Float64Array(C*C),this.gridInner=new Float64Array(C*C),this.f=new Float64Array(C),this.z=new Float64Array(C+1),this.v=new Uint16Array(C)}_createCanvas(h){const e=document.createElement("canvas");return e.width=e.height=h,e}draw(h){const{width:e,actualBoundingBoxAscent:i,actualBoundingBoxDescent:l,actualBoundingBoxLeft:u,actualBoundingBoxRight:d}=this.ctx.measureText(h),g=Math.ceil(i),w=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(d-u))),C=Math.min(this.size-this.buffer,g+Math.ceil(l)),P=w+2*this.buffer,E=C+2*this.buffer,R=Math.max(P*E,0),D=new Uint8ClampedArray(R),N={data:D,width:P,height:E,glyphWidth:w,glyphHeight:C,glyphTop:g,glyphLeft:0,glyphAdvance:e};if(w===0||C===0)return N;const{ctx:G,buffer:te,gridInner:ee,gridOuter:ie}=this;this.lang&&(G.lang=this.lang),G.clearRect(te,te,w,C),G.fillText(h,te,te+g);const ue=G.getImageData(te,te,w,C);ie.fill(Le,0,R),ee.fill(0,0,R);for(let ve=0;ve0?_e*_e:0,ee[Pe]=_e<0?_e*_e:0}}et(ie,0,0,P,E,P,this.f,this.v,this.z),et(ee,te,te,w,C,P,this.f,this.v,this.z);for(let ve=0;ve1&&(C=e[++w]);const E=Math.abs(P-C.left),R=Math.abs(P-C.right),D=Math.min(E,R);let N;const G=d/l*(u+1);if(C.isDash){const te=u-Math.abs(G);N=Math.sqrt(D*D+te*te)}else N=u-Math.sqrt(D*D+G*G);this.data[g+P]=Math.max(0,Math.min(255,N+128))}}}addRegularDash(e){for(let w=e.length-1;w>=0;--w){const C=e[w],P=e[w+1];C.zeroLength?e.splice(w,1):P&&P.isDash===C.isDash&&(P.left=C.left,e.splice(w,1))}const i=e[0],l=e[e.length-1];i.isDash===l.isDash&&(i.left=l.left-this.width,l.right=i.right+this.width);const u=this.width*this.nextRow;let d=0,g=e[d];for(let w=0;w1&&(g=e[++d]);const C=Math.abs(w-g.left),P=Math.abs(w-g.right),E=Math.min(C,P);this.data[u+w]=Math.max(0,Math.min(255,(g.isDash?E:-E)+128))}}addDash(e,i){const l=i?7:0,u=2*l+1;if(this.nextRow+u>this.height)return s.w("LineAtlas out of space"),null;let d=0;for(let w=0;w{i.terminate()})),this.workers=null)}isPreloaded(){return!!this.active[Ae]}numActive(){return Object.keys(this.active).length}}const ft=Math.floor(ne.hardwareConcurrency/2);let it,ut;function Pt(){return it||(it=new je),it}je.workerCount=s.H(globalThis)?Math.max(Math.min(ft,3),1):1;class Dt{constructor(e,i){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=i;const l=this.workerPool.acquire(i);for(let u=0;u{i.remove()})),this.actors=[],e&&this.workerPool.release(this.id)}registerMessageHandler(e,i){for(const l of this.actors)l.registerMessageHandler(e,i)}}function ot(){return ut||(ut=new Dt(Pt(),s.K),ut.registerMessageHandler("GR",((h,e,i)=>s.m(e,i)))),ut}function dt(h,e){const i=s.L();return s.M(i,i,[1,1,0]),s.N(i,i,[.5*h.width,.5*h.height,1]),h.calculatePosMatrix?s.O(i,i,h.calculatePosMatrix(e.toUnwrapped())):i}function vt(h,e,i,l,u,d,g){var w;const C=(function(D,N,G){if(D)for(const te of D){const ee=N[te];if(ee&&ee.source===G&&ee.type==="fill-extrusion")return!0}else for(const te in N){const ee=N[te];if(ee.source===G&&ee.type==="fill-extrusion")return!0}return!1})((w=u==null?void 0:u.layers)!==null&&w!==void 0?w:null,e,h.id),P=d.maxPitchScaleFactor(),E=h.tilesIn(l,P,C);E.sort(xt);const R=[];for(const D of E)R.push({wrappedTileID:D.tileID.wrapped().key,queryResults:D.tile.queryRenderedFeatures(e,i,h._state,D.queryGeometry,D.cameraQueryGeometry,D.scale,u,d,P,dt(h.transform,D.tileID),g?(N,G)=>g(D.tileID,N,G):void 0)});return(function(D,N){for(const G in D)for(const te of D[G])It(te,N);return D})((function(D){const N={},G={};for(const te of D){const ee=te.queryResults,ie=te.wrappedTileID,ue=G[ie]=G[ie]||{};for(const ve in ee){const me=ee[ve],be=ue[ve]=ue[ve]||{},Pe=N[ve]=N[ve]||[];for(const _e of me)be[_e.featureIndex]||(be[_e.featureIndex]=!0,Pe.push(_e))}}return N})(R),h)}function xt(h,e){const i=h.tileID,l=e.tileID;return i.overscaledZ-l.overscaledZ||i.canonical.y-l.canonical.y||i.wrap-l.wrap||i.canonical.x-l.canonical.x}function It(h,e){const i=h.feature,l=e.getFeatureState(i.layer["source-layer"],i.id);i.source=i.layer.source,i.layer["source-layer"]&&(i.sourceLayer=i.layer["source-layer"]),i.state=l}function wt(h,e,i){return s._(this,void 0,void 0,(function*(){let l=h;if(h.url?l=(yield s.j(e.transformRequest(h.url,"Source"),i)).data:yield ne.frameAsync(i),!l)return null;const u=s.Q(s.e(l,h),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in l&&l.vector_layers&&(u.vectorLayerIds=l.vector_layers.map((d=>d.id))),u}))}class _t{constructor(e,i){e&&(i?this.setSouthWest(e).setNorthEast(i):Array.isArray(e)&&(e.length===4?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1])))}setNorthEast(e){return this._ne=e instanceof s.S?new s.S(e.lng,e.lat):s.S.convert(e),this}setSouthWest(e){return this._sw=e instanceof s.S?new s.S(e.lng,e.lat):s.S.convert(e),this}extend(e){const i=this._sw,l=this._ne;let u,d;if(e instanceof s.S)u=e,d=e;else{if(!(e instanceof _t))return Array.isArray(e)?e.length===4||e.every(Array.isArray)?this.extend(_t.convert(e)):this.extend(s.S.convert(e)):e&&("lng"in e||"lon"in e)&&"lat"in e?this.extend(s.S.convert(e)):this;if(u=e._sw,d=e._ne,!u||!d)return this}return i||l?(i.lng=Math.min(u.lng,i.lng),i.lat=Math.min(u.lat,i.lat),l.lng=Math.max(d.lng,l.lng),l.lat=Math.max(d.lat,l.lat)):(this._sw=new s.S(u.lng,u.lat),this._ne=new s.S(d.lng,d.lat)),this}getCenter(){return new s.S((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 s.S(this.getWest(),this.getNorth())}getSouthEast(){return new s.S(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(e){const{lng:i,lat:l}=s.S.convert(e);let u=this._sw.lng<=i&&i<=this._ne.lng;return this._sw.lng>this._ne.lng&&(u=this._sw.lng>=i&&i>=this._ne.lng),this._sw.lat<=l&&l<=this._ne.lat&&u}static convert(e){return e instanceof _t?e:e&&new _t(e)}static fromLngLat(e,i=0){const l=360*i/40075017,u=l/Math.cos(Math.PI/180*e.lat);return new _t(new s.S(e.lng-u,e.lat-l),new s.S(e.lng+u,e.lat+l))}adjustAntiMeridian(){const e=new s.S(this._sw.lng,this._sw.lat),i=new s.S(this._ne.lng,this._ne.lat);return new _t(e,e.lng>i.lng?new s.S(i.lng+360,i.lat):i)}}class Et{constructor(e,i,l){this.bounds=_t.convert(this.validateBounds(e)),this.minzoom=i||0,this.maxzoom=l||24}validateBounds(e){return Array.isArray(e)&&e.length===4?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]}contains(e){const i=Math.pow(2,e.z),l=Math.floor(s.V(this.bounds.getWest())*i),u=Math.floor(s.U(this.bounds.getNorth())*i),d=Math.ceil(s.V(this.bounds.getEast())*i),g=Math.ceil(s.U(this.bounds.getSouth())*i);return e.x>=l&&e.x=u&&e.y{this._options.tiles=e})),this}setUrl(e){return this.setSourceProperty((()=>{this.url=e,this._options.url=e})),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return s.e({},this._options)}loadTile(e){return s._(this,void 0,void 0,(function*(){const i=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),l={request:this.map._requestManager.transformRequest(i,"Tile"),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.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,globalState:this.map.getGlobalState()};l.request.collectResourceTiming=this._collectResourceTiming;let u="RT";if(e.actor&&e.state!=="expired"){if(e.state==="loading")return new Promise(((d,g)=>{e.reloadPromise={resolve:d,reject:g}}))}else e.actor=this.dispatcher.getActor(),u="LT";e.abortController=new AbortController;try{const d=yield e.actor.sendAsync({type:u,data:l},e.abortController);if(delete e.abortController,e.aborted)return;this._afterTileLoadWorkerResponse(e,d)}catch(d){if(delete e.abortController,e.aborted)return;if(d&&d.status!==404)throw d;this._afterTileLoadWorkerResponse(e,null)}}))}_afterTileLoadWorkerResponse(e,i){if(i&&i.resourceTiming&&(e.resourceTiming=i.resourceTiming),i&&this.map._refreshExpiredTiles&&e.setExpiryData(i),e.loadVectorData(i,this.map.painter),e.reloadPromise){const l=e.reloadPromise;e.reloadPromise=null,this.loadTile(e).then(l.resolve).catch(l.reject)}}abortTile(e){return s._(this,void 0,void 0,(function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.actor&&(yield e.actor.sendAsync({type:"AT",data:{uid:e.uid,type:this.type,source:this.id}}))}))}unloadTile(e){return s._(this,void 0,void 0,(function*(){e.unloadVectorData(),e.actor&&(yield e.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}}))}))}hasTransition(){return!1}}class Ut extends s.E{constructor(e,i,l,u){super(),this.id=e,this.dispatcher=l,this.setEventedParent(u),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=s.e({type:"raster"},i),s.e(this,s.Q(i,["url","scheme","tileSize"]))}load(){return s._(this,arguments,void 0,(function*(e=!1){this._loaded=!1,this.fire(new s.l("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const i=yield wt(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,i&&(s.e(this,i),i.bounds&&(this.tileBounds=new Et(i.bounds,this.minzoom,this.maxzoom)),this.fire(new s.l("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new s.l("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:e})))}catch(i){this._tileJSONRequest=null,this.fire(new s.k(i))}}))}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(e){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),e(),this.load(!0)}setTiles(e){return this.setSourceProperty((()=>{this._options.tiles=e})),this}setUrl(e){return this.setSourceProperty((()=>{this.url=e,this._options.url=e})),this}serialize(){return s.e({},this._options)}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(e){return s._(this,void 0,void 0,(function*(){const i=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.abortController=new AbortController;try{const l=yield Fe.getImage(this.map._requestManager.transformRequest(i,"Tile"),e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(l&&l.data){this.map._refreshExpiredTiles&&(l.cacheControl||l.expires)&&e.setExpiryData({cacheControl:l.cacheControl,expires:l.expires});const u=this.map.painter.context,d=u.gl,g=l.data;e.texture=this.map.painter.getTileTexture(g.width),e.texture?e.texture.update(g,{useMipmap:!0}):(e.texture=new s.T(u,g,d.RGBA,{useMipmap:!0}),e.texture.bind(d.LINEAR,d.CLAMP_TO_EDGE,d.LINEAR_MIPMAP_NEAREST)),e.state="loaded"}}catch(l){if(delete e.abortController,e.aborted)e.state="unloaded";else if(l)throw e.state="errored",l}}))}abortTile(e){return s._(this,void 0,void 0,(function*(){e.abortController&&(e.abortController.abort(),delete e.abortController)}))}unloadTile(e){return s._(this,void 0,void 0,(function*(){e.texture&&this.map.painter.saveTileTexture(e.texture)}))}hasTransition(){return!1}}class er extends Ut{constructor(e,i,l,u){super(e,i,l,u),this.type="raster-dem",this.maxzoom=22,this._options=s.e({type:"raster-dem"},i),this.encoding=i.encoding||"mapbox",this.redFactor=i.redFactor,this.greenFactor=i.greenFactor,this.blueFactor=i.blueFactor,this.baseShift=i.baseShift}loadTile(e){return s._(this,void 0,void 0,(function*(){const i=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),l=this.map._requestManager.transformRequest(i,"Tile");e.neighboringTiles=this._getNeighboringTiles(e.tileID),e.abortController=new AbortController;try{const u=yield Fe.getImage(l,e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(u&&u.data){const d=u.data;this.map._refreshExpiredTiles&&(u.cacheControl||u.expires)&&e.setExpiryData({cacheControl:u.cacheControl,expires:u.expires});const g=s.b(d)&&s.W()?d:yield this.readImageNow(d),w={type:this.type,uid:e.uid,source:this.id,rawImageData:g,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!e.actor||e.state==="expired"){e.actor=this.dispatcher.getActor();const C=yield e.actor.sendAsync({type:"LDT",data:w});e.dem=C,e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.state="loaded"}}}catch(u){if(delete e.abortController,e.aborted)e.state="unloaded";else if(u)throw e.state="errored",u}}))}readImageNow(e){return s._(this,void 0,void 0,(function*(){if(typeof VideoFrame<"u"&&s.X()){const i=e.width+2,l=e.height+2;try{return new s.R({width:i,height:l},yield s.Y(e,-1,-1,i,l))}catch{}}return ne.getImageData(e,1)}))}_getNeighboringTiles(e){const i=e.canonical,l=Math.pow(2,i.z),u=(i.x-1+l)%l,d=i.x===0?e.wrap-1:e.wrap,g=(i.x+1+l)%l,w=i.x+1===l?e.wrap+1:e.wrap,C={};return C[new s.Z(e.overscaledZ,d,i.z,u,i.y).key]={backfilled:!1},C[new s.Z(e.overscaledZ,w,i.z,g,i.y).key]={backfilled:!1},i.y>0&&(C[new s.Z(e.overscaledZ,d,i.z,u,i.y-1).key]={backfilled:!1},C[new s.Z(e.overscaledZ,e.wrap,i.z,i.x,i.y-1).key]={backfilled:!1},C[new s.Z(e.overscaledZ,w,i.z,g,i.y-1).key]={backfilled:!1}),i.y+1i.coordinates)).flat(1/0):e.coordinates.flat(1/0)}getBounds(){return s._(this,void 0,void 0,(function*(){const e=new _t,i=yield this.getData();let l;switch(i.type){case"FeatureCollection":l=i.features.map((u=>this.getCoordinatesFromGeometry(u.geometry))).flat(1/0);break;case"Feature":l=this.getCoordinatesFromGeometry(i.geometry);break;default:l=this.getCoordinatesFromGeometry(i)}if(l.length==0)return e;for(let u=0;u0&&s.e(g,{resourceTiming:d}),this.fire(new s.l("data",Object.assign(Object.assign({},g),{sourceDataType:"metadata"}))),this.fire(new s.l("data",Object.assign(Object.assign({},g),{sourceDataType:"content"})))}catch(u){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new s.l("dataabort",{dataType:"source"}));this.fire(new s.k(u))}finally{(this._pendingWorkerUpdate.data||this._pendingWorkerUpdate.diff)&&this._updateWorkerData()}}))}loaded(){return!this._isUpdatingWorker&&this._pendingWorkerUpdate.data===void 0&&this._pendingWorkerUpdate.diff===void 0}loadTile(e){return s._(this,void 0,void 0,(function*(){const i=e.actor?"RT":"LT";e.actor=this.actor;const l={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.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,globalState:this.map.getGlobalState()};e.abortController=new AbortController;const u=yield this.actor.sendAsync({type:i,data:l},e.abortController);delete e.abortController,e.unloadVectorData(),e.aborted||e.loadVectorData(u,this.map.painter,i==="RT")}))}abortTile(e){return s._(this,void 0,void 0,(function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.aborted=!0}))}unloadTile(e){return s._(this,void 0,void 0,(function*(){e.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}})}))}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return s.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}class Nt extends s.E{constructor(e,i,l,u){super(),this.flippedWindingOrder=!1,this.id=e,this.dispatcher=l,this.coordinates=i.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(u),this.options=i}load(e){return s._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new s.l("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const i=yield Fe.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,i&&i.data&&(this.image=i.data,e&&(this.coordinates=e),this._finishLoading())}catch(i){this._request=null,this._loaded=!0,this.fire(new s.k(i))}}))}loaded(){return this._loaded}updateImage(e){return e.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=e.url,this.load(e.coordinates).finally((()=>{this.texture=null})),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new s.l("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(e){this.coordinates=e;const i=e.map(s.a1.fromLngLat);var l;return this.tileID=(function(u){const d=s.a2.fromPoints(u),g=d.width(),w=d.height(),C=Math.max(g,w),P=Math.max(0,Math.floor(-Math.log(C)/Math.LN2)),E=Math.pow(2,P);return new s.a4(P,Math.floor((d.minX+d.maxX)/2*E),Math.floor((d.minY+d.maxY)/2*E))})(i),this.terrainTileRanges=this._getOverlappingTileRanges(i),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=i.map((u=>this.tileID.getTilePoint(u)._round())),this.flippedWindingOrder=((l=this.tileCoords)[1].x-l[0].x)*(l[2].y-l[0].y)-(l[1].y-l[0].y)*(l[2].x-l[0].x)<0,this.fire(new s.l("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const e=this.map.painter.context,i=e.gl;this.texture||(this.texture=new s.T(e,this.image,i.RGBA),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE));let l=!1;for(const u in this.tiles){const d=this.tiles[u];d.state!=="loaded"&&(d.state="loaded",d.texture=this.texture,l=!0)}l&&this.fire(new s.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(e){return s._(this,void 0,void 0,(function*(){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={}):e.state="errored"}))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(e){const{minX:i,minY:l,maxX:u,maxY:d}=s.a2.fromPoints(e),g={};for(let w=0;w<=s.a3;w++){const C=Math.pow(2,w),P=Math.floor(i*C),E=Math.floor(l*C),R=Math.floor(u*C),D=Math.floor(d*C);g[w]={minTileX:P,minTileY:E,maxTileX:R,maxTileY:D}}return g}}class Ft extends Nt{constructor(e,i,l,u){super(e,i,l,u),this.roundZoom=!0,this.type="video",this.options=i}load(){return s._(this,void 0,void 0,(function*(){this._loaded=!1;const e=this.options;this.urls=[];for(const i of e.urls)this.urls.push(this.map._requestManager.transformRequest(i,"Source").url);try{const i=yield s.a5(this.urls);if(this._loaded=!0,!i)return;this.video=i,this.video.loop=!0,this.video.addEventListener("playing",(()=>{this.map.triggerRepaint()})),this.map&&this.video.play(),this._finishLoading()}catch(i){this.fire(new s.k(i))}}))}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){const i=this.video.seekable;ei.end(0)?this.fire(new s.k(new s.a6(`sources.${this.id}`,null,`Playback for this video can be set only between the ${i.start(0)} and ${i.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;const e=this.map.painter.context,i=e.gl;this.texture?this.video.paused||(this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE),i.texSubImage2D(i.TEXTURE_2D,0,0,0,i.RGBA,i.UNSIGNED_BYTE,this.video)):(this.texture=new s.T(e,this.video,i.RGBA),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE));let l=!1;for(const u in this.tiles){const d=this.tiles[u];d.state!=="loaded"&&(d.state="loaded",d.texture=this.texture,l=!0)}l&&this.fire(new s.l("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 sr extends Nt{constructor(e,i,l,u){super(e,i,l,u),i.coordinates?Array.isArray(i.coordinates)&&i.coordinates.length===4&&!i.coordinates.some((d=>!Array.isArray(d)||d.length!==2||d.some((g=>typeof g!="number"))))||this.fire(new s.k(new s.a6(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new s.k(new s.a6(`sources.${e}`,null,'missing required property "coordinates"'))),i.animate&&typeof i.animate!="boolean"&&this.fire(new s.k(new s.a6(`sources.${e}`,null,'optional "animate" property must be a boolean value'))),i.canvas?typeof i.canvas=="string"||i.canvas instanceof HTMLCanvasElement||this.fire(new s.k(new s.a6(`sources.${e}`,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 s.k(new s.a6(`sources.${e}`,null,'missing required property "canvas"'))),this.options=i,this.animate=i.animate===void 0||i.animate}load(){return s._(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 s.k(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(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const i=this.map.painter.context,l=i.gl;this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new s.T(i,this.canvas,l.RGBA,{premultiply:!0});let u=!1;for(const d in this.tiles){const g=this.tiles[d];g.state!=="loaded"&&(g.state="loaded",g.texture=this.texture,u=!0)}u&&this.fire(new s.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}}const lr={},Vr=h=>{switch(h){case"geojson":return tr;case"image":return Nt;case"raster":return Ut;case"raster-dem":return er;case"vector":return Rt;case"video":return Ft;case"canvas":return sr}return lr[h]},mr="RTLPluginLoaded";class hr extends s.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=ot()}_syncState(e){return this.status=e,this.dispatcher.broadcast("SRPS",{pluginStatus:e,pluginURL:this.url}).catch((i=>{throw this.status="error",i}))}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(e){return s._(this,arguments,void 0,(function*(i,l=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=ne.resolveURL(i),!this.url)throw new Error(`requested url ${i} is invalid`);if(this.status==="unavailable"){if(!l)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()}))}_requestImport(){return s._(this,void 0,void 0,(function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new s.l(mr))}))}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let _r=null;function Ir(){return _r||(_r=new hr),_r}class qr{constructor(e,i){this.timeAdded=0,this.fadeEndTime=0,this.tileID=e,this.uid=s.a7(),this.uses=0,this.tileSize=i,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(e){const i=e+this.timeAdded;id.getLayer(P))).filter(Boolean);if(C.length!==0){w.layers=C,w.stateDependentLayerIds&&(w.stateDependentLayers=w.stateDependentLayerIds.map((P=>C.filter((E=>E.id===P))[0])));for(const P of C)g[P.id]=w}}return g})(e.buckets,i==null?void 0:i.style),this.hasSymbolBuckets=!1;for(const u in this.buckets){const d=this.buckets[u];if(d instanceof s.a9){if(this.hasSymbolBuckets=!0,!l)break;d.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const u in this.buckets){const d=this.buckets[u];if(d instanceof s.a9&&d.hasRTLText){this.hasRTLText=!0,Ir().lazyLoad();break}}this.queryPadding=0;for(const u in this.buckets){const d=this.buckets[u];this.queryPadding=Math.max(this.queryPadding,i.style.getLayer(u).queryRadius(d))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage)}else this.collisionBoxArray=new s.a8}unloadVectorData(){for(const e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(e){return this.buckets[e.id]}upload(e){for(const l in this.buckets){const u=this.buckets[l];u.uploadPending()&&u.upload(e)}const i=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new s.T(e,this.imageAtlas.image,i.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new s.T(e,this.glyphAtlasImage,i.ALPHA),this.glyphAtlasImage=null)}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,i,l,u,d,g,w,C,P,E,R){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:u,cameraQueryGeometry:d,scale:g,tileSize:this.tileSize,pixelPosMatrix:E,transform:C,params:w,queryPadding:this.queryPadding*P,getElevation:R},e,i,l):{}}querySourceFeatures(e,i){const l=this.latestFeatureIndex;if(!l||!l.rawTileData)return;const u=l.loadVTLayers(),d=i&&i.sourceLayer?i.sourceLayer:"",g=u._geojsonTileLayer||u[d];if(!g)return;const w=s.aa(i&&i.filter),{z:C,x:P,y:E}=this.tileID.canonical,R={z:C,x:P,y:E};for(let D=0;Dl)u=!1;else if(i)if(this.expirationTime{this.remove(e,d)}),l)),this.data[u].push(d),this.order.push(u),this.order.length>this.max){const g=this._getAndRemoveByKey(this.order[0]);g&&this.onRemove(g)}return this}has(e){return e.wrapped().key in this.data}getAndRemove(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null}_getAndRemoveByKey(e){const i=this.data[e].shift();return i.timeout&&clearTimeout(i.timeout),this.data[e].length===0&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),i.value}getByKey(e){const i=this.data[e];return i?i[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,i){if(!this.has(e))return this;const l=e.wrapped().key,u=i===void 0?0:this.data[l].indexOf(i),d=this.data[l][u];return this.data[l].splice(u,1),d.timeout&&clearTimeout(d.timeout),this.data[l].length===0&&delete this.data[l],this.onRemove(d.value),this.order.splice(this.order.indexOf(l),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){const i=this._getAndRemoveByKey(this.order[0]);i&&this.onRemove(i)}return this}filter(e){const i=[];for(const l in this.data)for(const u of this.data[l])e(u.value)||i.push(u);for(const l of i)this.remove(l.value.tileID,l)}}class j{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(e,i,l){const u=String(i);if(this.stateChanges[e]=this.stateChanges[e]||{},this.stateChanges[e][u]=this.stateChanges[e][u]||{},s.e(this.stateChanges[e][u],l),this.deletedStates[e]===null){this.deletedStates[e]={};for(const d in this.state[e])d!==u&&(this.deletedStates[e][d]=null)}else if(this.deletedStates[e]&&this.deletedStates[e][u]===null){this.deletedStates[e][u]={};for(const d in this.state[e][u])l[d]||(this.deletedStates[e][u][d]=null)}else for(const d in l)this.deletedStates[e]&&this.deletedStates[e][u]&&this.deletedStates[e][u][d]===null&&delete this.deletedStates[e][u][d]}removeFeatureState(e,i,l){if(this.deletedStates[e]===null)return;const u=String(i);if(this.deletedStates[e]=this.deletedStates[e]||{},l&&i!==void 0)this.deletedStates[e][u]!==null&&(this.deletedStates[e][u]=this.deletedStates[e][u]||{},this.deletedStates[e][u][l]=null);else if(i!==void 0)if(this.stateChanges[e]&&this.stateChanges[e][u])for(l in this.deletedStates[e][u]={},this.stateChanges[e][u])this.deletedStates[e][u][l]=null;else this.deletedStates[e][u]=null;else this.deletedStates[e]=null}getState(e,i){const l=String(i),u=s.e({},(this.state[e]||{})[l],(this.stateChanges[e]||{})[l]);if(this.deletedStates[e]===null)return{};if(this.deletedStates[e]){const d=this.deletedStates[e][i];if(d===null)return{};for(const g in d)delete u[g]}return u}initializeTileState(e,i){e.setFeatureState(this.state,i)}coalesceChanges(e,i){const l={};for(const u in this.stateChanges){this.state[u]=this.state[u]||{};const d={};for(const g in this.stateChanges[u])this.state[u][g]||(this.state[u][g]={}),s.e(this.state[u][g],this.stateChanges[u][g]),d[g]=this.state[u][g];l[u]=d}for(const u in this.deletedStates){this.state[u]=this.state[u]||{};const d={};if(this.deletedStates[u]===null)for(const g in this.state[u])d[g]={},this.state[u][g]={};else for(const g in this.deletedStates[u]){if(this.deletedStates[u][g]===null)this.state[u][g]={};else for(const w of Object.keys(this.deletedStates[u][g]))delete this.state[u][g][w];d[g]=this.state[u][g]}l[u]=l[u]||{},s.e(l[u],d)}if(this.stateChanges={},this.deletedStates={},Object.keys(l).length!==0)for(const u in e)e[u].setFeatureState(l,i)}}const Z=89.25;function Y(h,e){const i=s.ah(e.lat,-s.ai,s.ai);return new s.P(s.V(e.lng)*h,s.U(i)*h)}function ae(h,e){return new s.a1(e.x/h,e.y/h).toLngLat()}function fe(h){return h.cameraToCenterDistance*Math.min(.85*Math.tan(s.ae(90-h.pitch)),Math.tan(s.ae(Z-h.pitch)))}function Se(h,e){const i=h.canonical,l=e/s.af(i.z),u=i.x+Math.pow(2,i.z)*h.wrap,d=s.ag(new Float64Array(16));return s.M(d,d,[u*l,i.y*l,0]),s.N(d,d,[l/s.$,l/s.$,1]),d}function ke(h,e,i,l,u){const d=s.a1.fromLngLat(h,e),g=u*s.aj(1,h.lat),w=g*Math.cos(s.ae(i)),C=Math.sqrt(g*g-w*w),P=C*Math.sin(s.ae(-l)),E=C*Math.cos(s.ae(-l));return new s.a1(d.x+P,d.y+E,d.z+w)}function we(h,e,i){const l=e.intersectsFrustum(h);if(!i||l===0)return l;const u=e.intersectsPlane(i);return u===0?0:l===2&&u===2?2:1}function Oe(h,e,i){let l=0;const u=(i-e)/10;for(let d=0;d<10;d++)l+=u*Math.pow(Math.cos(e+(d+.5)/10*(i-e)),h);return l}function lt(h,e){return function(i,l,u,d,g){const w=2*((h-1)/s.ak(Math.cos(s.ae(Z-g))/Math.cos(s.ae(Z)))-1),C=Math.acos(u/d),P=2*Oe(w-1,0,s.ae(g/2)),E=Math.min(s.ae(Z),C+s.ae(g/2)),R=Oe(w-1,Math.min(E,C-s.ae(g/2)),E),D=Math.atan(l/u),N=Math.hypot(l,u);let G=i;return G+=s.ak(d/N/Math.max(.5,Math.cos(s.ae(g/2)))),G+=w*s.ak(Math.cos(D))/2,G-=s.ak(Math.max(1,R/P/e))/2,G}}const Ye=lt(9.314,3);function kt(h,e){const i=(e.roundZoom?Math.round:Math.floor)(h.zoom+s.ak(h.tileSize/e.tileSize));return Math.max(0,i)}function xe(h,e){const i=h.getCameraFrustum(),l=h.getClippingPlane(),u=h.screenPointToMercatorCoordinate(h.getCameraPoint()),d=s.a1.fromLngLat(h.center,h.elevation);u.z=d.z+Math.cos(h.pitchInRadians)*h.cameraToCenterDistance/h.worldSize;const g=h.getCoveringTilesDetailsProvider(),w=g.allowVariableZoom(h,e),C=kt(h,e),P=e.minzoom||0,E=e.maxzoom!==void 0?e.maxzoom:h.maxZoom,R=Math.min(Math.max(0,C),E),D=Math.pow(2,R),N=[D*u.x,D*u.y,0],G=[D*d.x,D*d.y,0],te=Math.hypot(d.x-u.x,d.y-u.y),ee=Math.abs(d.z-u.z),ie=Math.hypot(te,ee),ue=be=>({zoom:0,x:0,y:0,wrap:be,fullyVisible:!1}),ve=[],me=[];if(h.renderWorldCopies&&g.allowWorldCopies())for(let be=1;be<=3;be++)ve.push(ue(-be)),ve.push(ue(be));for(ve.push(ue(0));ve.length>0;){const be=ve.pop(),Pe=be.x,_e=be.y;let Be=be.fullyVisible;const rt={x:Pe,y:_e,z:be.zoom},Ge=g.getTileBoundingVolume(rt,be.wrap,h.elevation,e);if(!Be){const Zt=we(i,Ge,l);if(Zt===0)continue;Be=Zt===2}const Xe=g.distanceToTile2d(u.x,u.y,rt,Ge);let tt=C;w&&(tt=(e.calculateTileZoom||Ye)(h.zoom+s.ak(h.tileSize/e.tileSize),Xe,ee,ie,h.fov)),tt=(e.roundZoom?Math.round:Math.floor)(tt),tt=Math.max(0,tt);const jt=Math.min(tt,E);if(be.wrap=g.getWrap(d,rt,be.wrap),be.zoom>=jt){if(be.zoom>1),wrap:be.wrap,fullyVisible:Be})}return me.sort(((be,Pe)=>be.distanceSq-Pe.distanceSq)).map((be=>be.tileID))}const Ot=s.a2.fromPoints([new s.P(0,0),new s.P(s.$,s.$)]);class cr extends s.E{constructor(e,i,l){super(),this.id=e,this.dispatcher=l,this.on("data",(u=>this._dataHandler(u))),this.on("dataloading",(()=>{this._sourceErrored=!1})),this.on("error",(()=>{this._sourceErrored=this._source.loaded()})),this._source=((u,d,g,w)=>{const C=new(Vr(d.type))(u,d,g,w);if(C.id!==u)throw new Error(`Expected Source id to be ${u} instead of ${C.id}`);return C})(e,i,l,this),this._tiles={},this._cache=new le(0,(u=>this._unloadTile(u))),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new j,this._didEmitContent=!1,this._updated=!1}onAdd(e){this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._maxTileCacheZoomLevels=e?e._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(e)}onRemove(e){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(e)}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 e in this._tiles){const i=this._tiles[e];if(i.state!=="loaded"&&i.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(e,i,l){return s._(this,void 0,void 0,(function*(){try{yield this._source.loadTile(e),this._tileLoaded(e,i,l)}catch(u){e.state="errored",u.status!==404?this._source.fire(new s.k(u,{tile:e})):this.update(this.transform,this.terrain)}}))}_unloadTile(e){this._source.unloadTile&&this._source.unloadTile(e)}_abortTile(e){this._source.abortTile&&this._source.abortTile(e),this._source.fire(new s.l("dataabort",{tile:e,coord:e.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(e){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const i in this._tiles){const l=this._tiles[i];l.upload(e),l.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map((e=>e.tileID)).sort(Jt).map((e=>e.key))}getRenderableIds(e){const i=[];for(const l in this._tiles)this._isIdRenderable(l,e)&&i.push(this._tiles[l]);return e?i.sort(((l,u)=>{const d=l.tileID,g=u.tileID,w=new s.P(d.canonical.x,d.canonical.y)._rotate(-this.transform.bearingInRadians),C=new s.P(g.canonical.x,g.canonical.y)._rotate(-this.transform.bearingInRadians);return d.overscaledZ-g.overscaledZ||C.y-w.y||C.x-w.x})).map((l=>l.tileID.key)):i.map((l=>l.tileID)).sort(Jt).map((l=>l.key))}hasRenderableParent(e){const i=this.findLoadedParent(e,0);return!!i&&this._isIdRenderable(i.tileID.key)}_isIdRenderable(e,i){return this._tiles[e]&&this._tiles[e].hasData()&&!this._coveredTiles[e]&&(i||!this._tiles[e].holdingForFade())}reload(e){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const i in this._tiles)e?this._reloadTile(i,"expired"):this._tiles[i].state!=="errored"&&this._reloadTile(i,"reloading")}}_reloadTile(e,i){return s._(this,void 0,void 0,(function*(){const l=this._tiles[e];l&&(l.state!=="loading"&&(l.state=i),yield this._loadTile(l,e,i))}))}_tileLoaded(e,i,l){e.timeAdded=ne.now(),l==="expired"&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(i,e),this.getSource().type==="raster-dem"&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),e.aborted||this._source.fire(new s.l("data",{dataType:"source",tile:e,coord:e.tileID}))}_backfillDEM(e){const i=this.getRenderableIds();for(let u=0;u1||(Math.abs(g)>1&&(Math.abs(g+C)===1?g+=C:Math.abs(g-C)===1&&(g-=C)),d.dem&&u.dem&&(u.dem.backfillBorder(d.dem,g,w),u.neighboringTiles&&u.neighboringTiles[P]&&(u.neighboringTiles[P].backfilled=!0)))}}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._tiles[e]}_retainLoadedChildren(e,i,l,u){for(const d in this._tiles){let g=this._tiles[d];if(u[d]||!g.hasData()||g.tileID.overscaledZ<=i||g.tileID.overscaledZ>l)continue;let w=g.tileID;for(;g&&g.tileID.overscaledZ>i+1;){const P=g.tileID.scaledTo(g.tileID.overscaledZ-1);g=this._tiles[P.key],g&&g.hasData()&&(w=P)}let C=w;for(;C.overscaledZ>i;)if(C=C.scaledTo(C.overscaledZ-1),e[C.key]||e[C.canonical.key]){u[w.key]=w;break}}}findLoadedParent(e,i){if(e.key in this._loadedParentTiles){const l=this._loadedParentTiles[e.key];return l&&l.tileID.overscaledZ>=i?l:null}for(let l=e.overscaledZ-1;l>=i;l--){const u=e.scaledTo(l),d=this._getLoadedTile(u);if(d)return d}}findLoadedSibling(e){return this._getLoadedTile(e)}_getLoadedTile(e){const i=this._tiles[e.key];return i&&i.hasData()?i:this._cache.getByKey(e.wrapped().key)}updateCacheSize(e){const i=Math.ceil(e.width/this._source.tileSize)+1,l=Math.ceil(e.height/this._source.tileSize)+1,u=Math.floor(i*l*(this._maxTileCacheZoomLevels===null?s.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),d=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,u):u;this._cache.setMaxSize(d)}handleWrapJump(e){const i=Math.round((e-(this._prevLng===void 0?e:this._prevLng))/360);if(this._prevLng=e,i){const l={};for(const u in this._tiles){const d=this._tiles[u];d.tileID=d.tileID.unwrapTo(d.tileID.wrap+i),l[d.tileID.key]=d}this._tiles=l;for(const u in this._timers)clearTimeout(this._timers[u]),delete this._timers[u];for(const u in this._tiles)this._setTileReloadTimer(u,this._tiles[u])}}_updateCoveredAndRetainedTiles(e,i,l,u,d,g){const w={},C={},P=Object.keys(e),E=ne.now();for(const R of P){const D=e[R],N=this._tiles[R];if(!N||N.fadeEndTime!==0&&N.fadeEndTime<=E)continue;const G=this.findLoadedParent(D,i),te=this.findLoadedSibling(D),ee=G||te||null;ee&&(this._addTile(ee.tileID),w[ee.tileID.key]=ee.tileID),C[R]=D}this._retainLoadedChildren(C,u,l,e);for(const R in w)e[R]||(this._coveredTiles[R]=!0,e[R]=w[R]);if(g){const R={},D={};for(const N of d)this._tiles[N.key].hasData()?R[N.key]=N:D[N.key]=N;for(const N in D){const G=D[N].children(this._source.maxzoom);this._tiles[G[0].key]&&this._tiles[G[1].key]&&this._tiles[G[2].key]&&this._tiles[G[3].key]&&(R[G[0].key]=e[G[0].key]=G[0],R[G[1].key]=e[G[1].key]=G[1],R[G[2].key]=e[G[2].key]=G[2],R[G[3].key]=e[G[3].key]=G[3],delete D[N])}for(const N in D){const G=D[N],te=this.findLoadedParent(G,this._source.minzoom),ee=this.findLoadedSibling(G),ie=te||ee||null;if(ie){R[ie.tileID.key]=e[ie.tileID.key]=ie.tileID;for(const ue in R)R[ue].isChildOf(ie.tileID)&&delete R[ue]}}for(const N in this._tiles)R[N]||(this._coveredTiles[N]=!0)}}update(e,i){if(!this._sourceLoaded||this._paused)return;let l;this.transform=e,this.terrain=i,this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?l=e.getVisibleUnwrappedCoordinates(this._source.tileID).map((E=>new s.Z(E.canonical.z,E.wrap,E.canonical.z,E.canonical.x,E.canonical.y))):(l=xe(e,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:i,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(l=l.filter((E=>this._source.hasTile(E))))):l=[];const u=kt(e,this._source),d=Math.max(u-cr.maxOverzooming,this._source.minzoom),g=Math.max(u+cr.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const E={};for(const R of l)if(R.canonical.z>this._source.minzoom){const D=R.scaledTo(R.canonical.z-1);E[D.key]=D;const N=R.scaledTo(Math.max(this._source.minzoom,Math.min(R.canonical.z,5)));E[N.key]=N}l=l.concat(Object.values(E))}const w=l.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,w&&this.fire(new s.l("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const C=this._updateRetainedTiles(l,u);Pr(this._source.type)&&this._updateCoveredAndRetainedTiles(C,d,g,u,l,i);for(const E in C)this._tiles[E].clearFadeHold();const P=s.am(this._tiles,C);for(const E of P){const R=this._tiles[E];R.hasSymbolBuckets&&!R.holdingForFade()?R.setHoldDuration(this.map._fadeDuration):R.hasSymbolBuckets&&!R.symbolFadeFinished()||this._removeTile(E)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(const e in this._tiles)this._tiles[e].holdingForFade()&&this._removeTile(e)}_updateRetainedTiles(e,i){var l;const u={},d={},g=Math.max(i-cr.maxOverzooming,this._source.minzoom),w=Math.max(i+cr.maxUnderzooming,this._source.minzoom),C={};for(const P of e){const E=this._addTile(P);u[P.key]=P,E.hasData()||ithis._source.maxzoom){const D=P.children(this._source.maxzoom)[0],N=this.getTile(D);if(N&&N.hasData()){u[D.key]=D;continue}}else{const D=P.children(this._source.maxzoom);if(u[D[0].key]&&u[D[1].key]&&u[D[2].key]&&u[D[3].key])continue}let R=E.wasRequested();for(let D=P.overscaledZ-1;D>=g;--D){const N=P.scaledTo(D);if(d[N.key])break;if(d[N.key]=!0,E=this.getTile(N),!E&&R&&(E=this._addTile(N)),E){const G=E.hasData();if((G||!(!((l=this.map)===null||l===void 0)&&l.cancelPendingTileRequestsWhileZooming)||R)&&(u[N.key]=N),R=E.wasRequested(),G)break}}}return u}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const e in this._tiles){const i=[];let l,u=this._tiles[e].tileID;for(;u.overscaledZ>0;){if(u.key in this._loadedParentTiles){l=this._loadedParentTiles[u.key];break}i.push(u.key);const d=u.scaledTo(u.overscaledZ-1);if(l=this._getLoadedTile(d),l)break;u=d}for(const d of i)this._loadedParentTiles[d]=l}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(const e in this._tiles){const i=this._tiles[e].tileID,l=this._getLoadedTile(i);this._loadedSiblingTiles[i.key]=l}}_addTile(e){let i=this._tiles[e.key];if(i)return i;i=this._cache.getAndRemove(e),i&&(this._setTileReloadTimer(e.key,i),i.tileID=e,this._state.initializeTileState(i,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,i)));const l=i;return i||(i=new qr(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(i,e.key,i.state)),i.uses++,this._tiles[e.key]=i,l||this._source.fire(new s.l("dataloading",{tile:i,coord:i.tileID,dataType:"source"})),i}_setTileReloadTimer(e,i){e in this._timers&&(clearTimeout(this._timers[e]),delete this._timers[e]);const l=i.getExpiryTimeout();l&&(this._timers[e]=setTimeout((()=>{this._reloadTile(e,"expired"),delete this._timers[e]}),l))}refreshTiles(e){for(const i in this._tiles)(this._isIdRenderable(i)||this._tiles[i].state=="errored")&&e.some((l=>l.equals(this._tiles[i].tileID.canonical)))&&this._reloadTile(i,"expired")}_removeTile(e){const i=this._tiles[e];i&&(i.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),delete this._timers[e]),i.uses>0||(i.hasData()&&i.state!=="reloading"?this._cache.add(i.tileID,i,i.getExpiryTimeout()):(i.aborted=!0,this._abortTile(i),this._unloadTile(i))))}_dataHandler(e){const i=e.sourceDataType;e.dataType==="source"&&i==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&e.dataType==="source"&&i==="content"&&(this.reload(e.sourceDataChanged),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const e in this._tiles)this._removeTile(e);this._cache.reset()}tilesIn(e,i,l){const u=[],d=this.transform;if(!d)return u;const g=d.getCoveringTilesDetailsProvider().allowWorldCopies(),w=l?d.getCameraQueryGeometry(e):e,C=N=>d.screenPointToMercatorCoordinate(N,this.terrain),P=this.transformBbox(e,C,!g),E=this.transformBbox(w,C,!g),R=this.getIds(),D=s.a2.fromPoints(E);for(let N=0;Nue.getTilePoint(new s.a1(me.x,me.y))));if(ve.expandBy(ie),ve.intersects(Ot)){const me=P.map((Pe=>ue.getTilePoint(Pe))),be=E.map((Pe=>ue.getTilePoint(Pe)));u.push({tile:G,tileID:g?ue:ue.unwrapTo(0),queryGeometry:me,cameraQueryGeometry:be,scale:ee})}}}return u}transformBbox(e,i,l){let u=e.map(i);if(l){const d=s.a2.fromPoints(e);d.shrinkBy(.001*Math.min(d.width(),d.height()));const g=d.map(i);s.a2.fromPoints(u).covers(g)||(u=u.map((w=>w.x>.5?new s.a1(w.x-1,w.y,w.z):w)))}return u}getVisibleCoordinates(e){const i=this.getRenderableIds(e).map((l=>this._tiles[l].tileID));return this.transform&&this.transform.populateCache(i),i}hasTransition(){if(this._source.hasTransition())return!0;if(Pr(this._source.type)){const e=ne.now();for(const i in this._tiles)if(this._tiles[i].fadeEndTime>=e)return!0}return!1}setFeatureState(e,i,l){this._state.updateState(e=e||"_geojsonTileLayer",i,l)}removeFeatureState(e,i,l){this._state.removeFeatureState(e=e||"_geojsonTileLayer",i,l)}getFeatureState(e,i){return this._state.getState(e=e||"_geojsonTileLayer",i)}setDependencies(e,i,l){const u=this._tiles[e];u&&u.setDependencies(i,l)}reloadTilesForDependencies(e,i){for(const l in this._tiles)this._tiles[l].hasDependency(e,i)&&this._reloadTile(l,"reloading");this._cache.filter((l=>!l.hasDependency(e,i)))}}function Jt(h,e){const i=Math.abs(2*h.wrap)-+(h.wrap<0),l=Math.abs(2*e.wrap)-+(e.wrap<0);return h.overscaledZ-e.overscaledZ||l-i||e.canonical.y-h.canonical.y||e.canonical.x-h.canonical.x}function Pr(h){return h==="raster"||h==="image"||h==="video"}cr.maxOverzooming=10,cr.maxUnderzooming=3;class Xr{constructor(e,i){this.reset(e,i)}reset(e,i){this.points=e||[],this._distances=[0];for(let l=1;l0?(u-g)/w:0;return this.points[d].mult(1-C).add(this.points[i].mult(C))}}function dn(h,e){let i=!0;return h==="always"||h!=="never"&&e!=="never"||(i=!1),i}class xn{constructor(e,i,l){const u=this.boxCells=[],d=this.circleCells=[];this.xCellCount=Math.ceil(e/l),this.yCellCount=Math.ceil(i/l);for(let g=0;gthis.width||u<0||i>this.height)return[];const C=[];if(e<=0&&i<=0&&this.width<=l&&this.height<=u){if(d)return[{key:null,x1:e,y1:i,x2:l,y2:u}];for(let P=0;P0}hitTestCircle(e,i,l,u,d){const g=e-l,w=e+l,C=i-l,P=i+l;if(w<0||g>this.width||P<0||C>this.height)return!1;const E=[];return this._forEachCell(g,C,w,P,this._queryCellCircle,E,{hitTest:!0,overlapMode:u,circle:{x:e,y:i,radius:l},seenUids:{box:{},circle:{}}},d),E.length>0}_queryCell(e,i,l,u,d,g,w,C){const{seenUids:P,hitTest:E,overlapMode:R}=w,D=this.boxCells[d];if(D!==null){const G=this.bboxes;for(const te of D)if(!P.box[te]){P.box[te]=!0;const ee=4*te,ie=this.boxKeys[te];if(e<=G[ee+2]&&i<=G[ee+3]&&l>=G[ee+0]&&u>=G[ee+1]&&(!C||C(ie))&&(!E||!dn(R,ie.overlapMode))&&(g.push({key:ie,x1:G[ee],y1:G[ee+1],x2:G[ee+2],y2:G[ee+3]}),E))return!0}}const N=this.circleCells[d];if(N!==null){const G=this.circles;for(const te of N)if(!P.circle[te]){P.circle[te]=!0;const ee=3*te,ie=this.circleKeys[te];if(this._circleAndRectCollide(G[ee],G[ee+1],G[ee+2],e,i,l,u)&&(!C||C(ie))&&(!E||!dn(R,ie.overlapMode))){const ue=G[ee],ve=G[ee+1],me=G[ee+2];if(g.push({key:ie,x1:ue-me,y1:ve-me,x2:ue+me,y2:ve+me}),E)return!0}}}return!1}_queryCellCircle(e,i,l,u,d,g,w,C){const{circle:P,seenUids:E,overlapMode:R}=w,D=this.boxCells[d];if(D!==null){const G=this.bboxes;for(const te of D)if(!E.box[te]){E.box[te]=!0;const ee=4*te,ie=this.boxKeys[te];if(this._circleAndRectCollide(P.x,P.y,P.radius,G[ee+0],G[ee+1],G[ee+2],G[ee+3])&&(!C||C(ie))&&!dn(R,ie.overlapMode))return g.push(!0),!0}}const N=this.circleCells[d];if(N!==null){const G=this.circles;for(const te of N)if(!E.circle[te]){E.circle[te]=!0;const ee=3*te,ie=this.circleKeys[te];if(this._circlesCollide(G[ee],G[ee+1],G[ee+2],P.x,P.y,P.radius)&&(!C||C(ie))&&!dn(R,ie.overlapMode))return g.push(!0),!0}}}_forEachCell(e,i,l,u,d,g,w,C){const P=this._convertToXCellCoord(e),E=this._convertToYCellCoord(i),R=this._convertToXCellCoord(l),D=this._convertToYCellCoord(u);for(let N=P;N<=R;N++)for(let G=E;G<=D;G++)if(d.call(this,e,i,l,u,this.xCellCount*G+N,g,w,C))return}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,i,l,u,d,g){const w=u-e,C=d-i,P=l+g;return P*P>w*w+C*C}_circleAndRectCollide(e,i,l,u,d,g,w){const C=(g-u)/2,P=Math.abs(e-(u+C));if(P>C+l)return!1;const E=(w-d)/2,R=Math.abs(i-(d+E));if(R>E+l)return!1;if(P<=C||R<=E)return!0;const D=P-C,N=R-E;return D*D+N*N<=l*l}}function mn(h,e,i){const l=s.L();if(!h){const{vecSouth:R,vecEast:D}=zt(e),N=O();N[0]=D[0],N[1]=D[1],N[2]=R[0],N[3]=R[1],u=N,(E=(g=(d=N)[0])*(P=d[3])-(C=d[2])*(w=d[1]))&&(u[0]=P*(E=1/E),u[1]=-w*E,u[2]=-C*E,u[3]=g*E),l[0]=N[0],l[1]=N[1],l[4]=N[2],l[5]=N[3]}var u,d,g,w,C,P,E;return s.N(l,l,[1/i,1/i,1]),l}function Vt(h,e,i,l){if(h){const u=s.L();if(!e){const{vecSouth:d,vecEast:g}=zt(i);u[0]=g[0],u[1]=g[1],u[4]=d[0],u[5]=d[1]}return s.N(u,u,[l,l,1]),u}return i.pixelsToClipSpaceMatrix}function zt(h){const e=Math.cos(h.rollInRadians),i=Math.sin(h.rollInRadians),l=Math.cos(h.pitchInRadians),u=Math.cos(h.bearingInRadians),d=Math.sin(h.bearingInRadians),g=s.ar();g[0]=-u*l*i-d*e,g[1]=-d*l*i+u*e;const w=s.as(g);w<1e-9?s.at(g):s.au(g,g,1/w);const C=s.ar();C[0]=u*l*e-d*i,C[1]=d*l*e+u*i;const P=s.as(C);return P<1e-9?s.at(C):s.au(C,C,1/P),{vecEast:C,vecSouth:g}}function dr(h,e,i,l){let u;l?(u=[h,e,l(h,e),1],s.aw(u,u,i)):(u=[h,e,0,1],En(u,u,i));const d=u[3];return{point:new s.P(u[0]/d,u[1]/d),signedDistanceFromCamera:d,isOccluded:!1}}function ht(h,e){return .5+h/e*.5}function Wr(h,e){return h.x>=-e[0]&&h.x<=e[0]&&h.y>=-e[1]&&h.y<=e[1]}function Yr(h,e,i,l,u,d,g,w,C,P,E,R,D){const N=i?h.textSizeData:h.iconSizeData,G=s.an(N,e.transform.zoom),te=[256/e.width*2+1,256/e.height*2+1],ee=i?h.text.dynamicLayoutVertexArray:h.icon.dynamicLayoutVertexArray;ee.clear();const ie=h.lineVertexArray,ue=i?h.text.placedSymbolArray:h.icon.placedSymbolArray,ve=e.transform.width/e.transform.height;let me=!1;for(let be=0;beMath.abs(i.x-e.x)*l?{useVertical:!0}:(h===s.ao.vertical?e.yi.x)?{needsFlipping:!0}:null}function He(h){const{projectionContext:e,pitchedLabelPlaneMatrixInverse:i,symbol:l,fontSize:u,flip:d,keepUpright:g,glyphOffsetArray:w,dynamicLayoutVertexArray:C,aspectRatio:P,rotateToLine:E}=h,R=u/24,D=l.lineOffsetX*R,N=l.lineOffsetY*R;let G;if(l.numGlyphs>1){const te=l.glyphStartIndex+l.numGlyphs,ee=l.lineStartIndex,ie=l.lineStartIndex+l.lineLength,ue=Zr(R,w,D,N,d,l,E,e);if(!ue)return{notEnoughRoom:!0};const ve=Tr(ue.first.point.x,ue.first.point.y,e,i),me=Tr(ue.last.point.x,ue.last.point.y,e,i);if(g&&!d){const be=mt(l.writingMode,ve,me,P);if(be)return be}G=[ue.first];for(let be=l.glyphStartIndex+1;be0?ve.point:At(e.tileAnchorPoint,ue,ee,1,e),be=Tr(ee.x,ee.y,e,i),Pe=Tr(me.x,me.y,e,i),_e=mt(l.writingMode,be,Pe,P);if(_e)return _e}const te=pn(R*w.getoffsetX(l.glyphStartIndex),D,N,d,l.segment,l.lineStartIndex,l.lineStartIndex+l.lineLength,e,E);if(!te||e.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};G=[te]}for(const te of G)s.av(C,te.point,te.angle);return{}}function At(h,e,i,l,u){const d=h.add(h.sub(e)._unit()),g=Kt(d.x,d.y,u).point,w=i.sub(g);return i.add(w._mult(l/w.mag()))}function Bt(h,e,i){const l=e.projectionCache;if(l.projections[h])return l.projections[h];const u=new s.P(e.lineVertexArray.getx(h),e.lineVertexArray.gety(h)),d=Kt(u.x,u.y,e);if(d.signedDistanceFromCamera>0)return l.projections[h]=d.point,l.anyProjectionOccluded=l.anyProjectionOccluded||d.isOccluded,d.point;const g=h-i.direction;return At(i.distanceFromAnchor===0?e.tileAnchorPoint:new s.P(e.lineVertexArray.getx(g),e.lineVertexArray.gety(g)),u,i.previousVertex,i.absOffsetX-i.distanceFromAnchor+1,e)}function Kt(h,e,i){const l=h+i.translation[0],u=e+i.translation[1];let d;return i.pitchWithMap?(d=dr(l,u,i.pitchedLabelPlaneMatrix,i.getElevation),d.isOccluded=!1):(d=i.transform.projectTileCoordinates(l,u,i.unwrappedTileID,i.getElevation),d.point.x=(.5*d.point.x+.5)*i.width,d.point.y=(.5*-d.point.y+.5)*i.height),d}function Tr(h,e,i,l){if(i.pitchWithMap){const u=[h,e,0,1];return s.aw(u,u,l),i.transform.projectTileCoordinates(u[0]/u[3],u[1]/u[3],i.unwrappedTileID,i.getElevation).point}return{x:h/i.width*2-1,y:1-e/i.height*2}}function Er(h,e,i){return i.transform.projectTileCoordinates(h,e,i.unwrappedTileID,i.getElevation)}function ur(h,e,i){return h._unit()._perp()._mult(e*i)}function rn(h,e,i,l,u,d,g,w,C){if(w.projectionCache.offsets[h])return w.projectionCache.offsets[h];const P=i.add(e);if(h+C.direction=u)return w.projectionCache.offsets[h]=P,P;const E=Bt(h+C.direction,w,C),R=ur(E.sub(i),g,C.direction),D=i.add(R),N=E.add(R);return w.projectionCache.offsets[h]=s.ax(d,P,D,N)||P,w.projectionCache.offsets[h]}function pn(h,e,i,l,u,d,g,w,C){const P=l?h-e:h+e;let E=P>0?1:-1,R=0;l&&(E*=-1,R=Math.PI),E<0&&(R+=Math.PI);let D,N=E>0?d+u:d+u+1;w.projectionCache.cachedAnchorPoint?D=w.projectionCache.cachedAnchorPoint:(D=Kt(w.tileAnchorPoint.x,w.tileAnchorPoint.y,w).point,w.projectionCache.cachedAnchorPoint=D);let G,te,ee=D,ie=D,ue=0,ve=0;const me=Math.abs(P),be=[];let Pe;for(;ue+ve<=me;){if(N+=E,N=g)return null;ue+=ve,ie=ee,te=G;const rt={absOffsetX:me,direction:E,distanceFromAnchor:ue,previousVertex:ie};if(ee=Bt(N,w,rt),i===0)be.push(ie),Pe=ee.sub(ie);else{let Ge;const Xe=ee.sub(ie);Ge=Xe.mag()===0?ur(Bt(N+E,w,rt).sub(ee),i,E):ur(Xe,i,E),te||(te=ie.add(Ge)),G=rn(N,Ge,ee,d,g,te,i,w,rt),be.push(te),Pe=G.sub(te)}ve=Pe.mag()}const _e=Pe._mult((me-ue)/ve)._add(te||ie),Be=R+Math.atan2(ee.y-ie.y,ee.x-ie.x);return be.push(_e),{point:_e,angle:C?Be:0,path:be}}const _n=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function sn(h,e){for(let i=0;i=1;Jr--)Zt.push(tt.path[Jr]);for(let Jr=1;JrAn.signedDistanceFromCamera<=0))?[]:Jr.map((An=>An.point))}let gr=[];if(Zt.length>0){const Jr=Zt[0].clone(),An=Zt[0].clone();for(let Rn=1;Rn=rt.x&&An.x<=Ge.x&&Jr.y>=rt.y&&An.y<=Ge.y?[Zt]:An.xGe.x||An.yGe.y?[]:s.ay([Zt],rt.x,rt.y,Ge.x,Ge.y)}for(const Jr of gr){Xe.reset(Jr,.25*Be);let An=0;An=Xe.length<=.5*Be?1:Math.ceil(Xe.paddedLength/Tt)+1;for(let Rn=0;Rn{const C=dr(w.x,w.y,g,d.getElevation),P=d.transform.projectTileCoordinates(C.point.x,C.point.y,d.unwrappedTileID,d.getElevation);return P.point.x=(.5*P.point.x+.5)*d.width,P.point.y=(.5*-P.point.y+.5)*d.height,P}))})(e,i);return(function(u){let d=0,g=0,w=0,C=0;for(let P=0;Pg&&(g=C,d=w));return u.slice(d,d+g)})(l)}queryRenderedSymbols(e){if(e.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const i=[],l=new s.a2;for(const R of e){const D=new s.P(R.x+pr,R.y+pr);l.extend(D),i.push(D)}const{minX:u,minY:d,maxX:g,maxY:w}=l,C=this.grid.query(u,d,g,w).concat(this.ignoredGrid.query(u,d,g,w)),P={},E={};for(const R of C){const D=R.key;if(P[D.bucketInstanceId]===void 0&&(P[D.bucketInstanceId]={}),P[D.bucketInstanceId][D.featureIndex])continue;const N=[new s.P(R.x1,R.y1),new s.P(R.x2,R.y1),new s.P(R.x2,R.y2),new s.P(R.x1,R.y2)];s.az(i,N)&&(P[D.bucketInstanceId][D.featureIndex]=!0,E[D.bucketInstanceId]===void 0&&(E[D.bucketInstanceId]=[]),E[D.bucketInstanceId].push(D.featureIndex))}return E}insertCollisionBox(e,i,l,u,d,g){(l?this.ignoredGrid:this.grid).insert({bucketInstanceId:u,featureIndex:d,collisionGroupID:g,overlapMode:i},e[0],e[1],e[2],e[3])}insertCollisionCircles(e,i,l,u,d,g){const w=l?this.ignoredGrid:this.grid,C={bucketInstanceId:u,featureIndex:d,collisionGroupID:g,overlapMode:i};for(let P=0;P=this.screenRightBoundary||uthis.screenBottomBoundary}isInsideGrid(e,i,l,u){return l>=0&&e=0&&ithis.projectAndGetPerspectiveRatio(Tt.x,Tt.y,u,P,R)));jt=Zt.some((Tt=>!Tt.isOccluded)),tt=Zt.map((Tt=>new s.P(Tt.x,Tt.y)))}else jt=!0;return{box:s.aA(tt),allPointsOccluded:!jt}}}class tn{constructor(e,i,l,u){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?i:-i))):u&&l?1:0,this.placed=l}isHidden(){return this.opacity===0&&!this.placed}}class en{constructor(e,i,l,u,d){this.text=new tn(e?e.text:null,i,l,d),this.icon=new tn(e?e.icon:null,i,u,d)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class ma{constructor(e,i,l){this.text=e,this.icon=i,this.skipFade=l}}class pi{constructor(e,i,l,u,d){this.bucketInstanceId=e,this.featureIndex=i,this.sourceLayerIndex=l,this.bucketIndex=u,this.tileID=d}}class Xi{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){const i=++this.maxGroupID;this.collisionGroups[e]={ID:i,predicate:l=>l.collisionGroupID===i}}return this.collisionGroups[e]}}function Zn(h,e,i,l,u){const{horizontalAlign:d,verticalAlign:g}=s.aH(h);return new s.P(-(d-.5)*e+l[0]*u,-(g-.5)*i+l[1]*u)}class ni{constructor(e,i,l,u,d){this.transform=e.clone(),this.terrain=i,this.collisionIndex=new In(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=l,this.retainedQueryData={},this.collisionGroups=new Xi(u),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=d,d&&(d.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(e){const i=this.terrain;return i?(l,u)=>i.getElevation(e,l,u):null}getBucketParts(e,i,l,u){const d=l.getBucket(i),g=l.latestFeatureIndex;if(!d||!g||i.id!==d.layerIds[0])return;const w=l.collisionBoxArray,C=d.layers[0].layout,P=d.layers[0].paint,E=Math.pow(2,this.transform.zoom-l.tileID.overscaledZ),R=l.tileSize/s.$,D=l.tileID.toUnwrapped(),N=C.get("text-rotation-alignment")==="map",G=s.aC(l,1,this.transform.zoom),te=s.aD(this.collisionIndex.transform,l,P.get("text-translate"),P.get("text-translate-anchor")),ee=s.aD(this.collisionIndex.transform,l,P.get("icon-translate"),P.get("icon-translate-anchor")),ie=mn(N,this.transform,G);this.retainedQueryData[d.bucketInstanceId]=new pi(d.bucketInstanceId,g,d.sourceLayerIndex,d.index,l.tileID);const ue={bucket:d,layout:C,translationText:te,translationIcon:ee,unwrappedTileID:D,pitchedLabelPlaneMatrix:ie,scale:E,textPixelRatio:R,holdingForFade:l.holdingForFade(),collisionBoxArray:w,partiallyEvaluatedTextSize:s.an(d.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(d.sourceID)};if(u)for(const ve of d.sortKeyRanges){const{sortKey:me,symbolInstanceStart:be,symbolInstanceEnd:Pe}=ve;e.push({sortKey:me,symbolInstanceStart:be,symbolInstanceEnd:Pe,parameters:ue})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:d.symbolInstances.length,parameters:ue})}attemptAnchorPlacement(e,i,l,u,d,g,w,C,P,E,R,D,N,G,te,ee,ie,ue,ve,me){const be=s.aE[e.textAnchor],Pe=[e.textOffset0,e.textOffset1],_e=Zn(be,l,u,Pe,d),Be=this.collisionIndex.placeCollisionBox(i,D,C,P,E,w,g,ee,R.predicate,ve,_e,me);if((!ue||this.collisionIndex.placeCollisionBox(ue,D,C,P,E,w,g,ie,R.predicate,ve,_e,me).placeable)&&Be.placeable){let rt;if(this.prevPlacement&&this.prevPlacement.variableOffsets[N.crossTileID]&&this.prevPlacement.placements[N.crossTileID]&&this.prevPlacement.placements[N.crossTileID].text&&(rt=this.prevPlacement.variableOffsets[N.crossTileID].anchor),N.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[N.crossTileID]={textOffset:Pe,width:l,height:u,anchor:be,textBoxScale:d,prevAnchor:rt},this.markUsedJustification(G,be,N,te),G.allowVerticalPlacement&&(this.markUsedOrientation(G,te,N),this.placedOrientations[N.crossTileID]=te),{shift:_e,placedGlyphBoxes:Be}}}placeLayerBucketPart(e,i,l){const{bucket:u,layout:d,translationText:g,translationIcon:w,unwrappedTileID:C,pitchedLabelPlaneMatrix:P,textPixelRatio:E,holdingForFade:R,collisionBoxArray:D,partiallyEvaluatedTextSize:N,collisionGroup:G}=e.parameters,te=d.get("text-optional"),ee=d.get("icon-optional"),ie=s.aF(d,"text-overlap","text-allow-overlap"),ue=ie==="always",ve=s.aF(d,"icon-overlap","icon-allow-overlap"),me=ve==="always",be=d.get("text-rotation-alignment")==="map",Pe=d.get("text-pitch-alignment")==="map",_e=d.get("icon-text-fit")!=="none",Be=d.get("symbol-z-order")==="viewport-y",rt=ue&&(me||!u.hasIconData()||ee),Ge=me&&(ue||!u.hasTextData()||te);!u.collisionArrays&&D&&u.deserializeCollisionBoxes(D);const Xe=this.retainedQueryData[u.bucketInstanceId].tileID,tt=this._getTerrainElevationFunc(Xe),jt=this.transform.getFastPathSimpleProjectionMatrix(Xe),Zt=(Tt,gr,Jr)=>{var An,Rn;if(i[Tt.crossTileID])return;if(R)return void(this.placements[Tt.crossTileID]=new ma(!1,!1,!1));let Ln=!1,Wn=!1,Jn=!0,Kr=null,Bn={box:null,placeable:!1,offscreen:null,occluded:!1},si={placeable:!1},mi=null,Ci=null,$i=null,za=0,go=0,vo=0;gr.textFeatureIndex?za=gr.textFeatureIndex:Tt.useRuntimeCollisionCircles&&(za=Tt.featureIndex),gr.verticalTextFeatureIndex&&(go=gr.verticalTextFeatureIndex);const fs=gr.textBox;if(fs){const ta=li=>{let _i=s.ao.horizontal;if(u.allowVerticalPlacement&&!li&&this.prevPlacement){const ba=this.prevPlacement.placedOrientations[Tt.crossTileID];ba&&(this.placedOrientations[Tt.crossTileID]=ba,_i=ba,this.markUsedOrientation(u,_i,Tt))}return _i},La=(li,_i)=>{if(u.allowVerticalPlacement&&Tt.numVerticalGlyphVertices>0&&gr.verticalTextBox){for(const ba of u.writingModes)if(ba===s.ao.vertical?(Bn=_i(),si=Bn):Bn=li(),Bn&&Bn.placeable)break}else Bn=li()},Gi=Tt.textAnchorOffsetStartIndex,yo=Tt.textAnchorOffsetEndIndex;if(yo===Gi){const li=(_i,ba)=>{const ci=this.collisionIndex.placeCollisionBox(_i,ie,E,Xe,C,Pe,be,g,G.predicate,tt,void 0,jt);return ci&&ci.placeable&&(this.markUsedOrientation(u,ba,Tt),this.placedOrientations[Tt.crossTileID]=ba),ci};La((()=>li(fs,s.ao.horizontal)),(()=>{const _i=gr.verticalTextBox;return u.allowVerticalPlacement&&Tt.numVerticalGlyphVertices>0&&_i?li(_i,s.ao.vertical):{box:null,offscreen:null}})),ta(Bn&&Bn.placeable)}else{let li=s.aE[(Rn=(An=this.prevPlacement)===null||An===void 0?void 0:An.variableOffsets[Tt.crossTileID])===null||Rn===void 0?void 0:Rn.anchor];const _i=(ci,Qs,_s)=>{const ro=ci.x2-ci.x1,Da=ci.y2-ci.y1,xo=Tt.textBoxScale,Cd=_e&&ve==="never"?Qs:null;let la=null,Sd=ie==="never"?1:2,_u="never";li&&Sd++;for(let Wl=0;Wl_i(fs,gr.iconBox,s.ao.horizontal)),(()=>{const ci=gr.verticalTextBox;return u.allowVerticalPlacement&&(!Bn||!Bn.placeable)&&Tt.numVerticalGlyphVertices>0&&ci?_i(ci,gr.verticalIconBox,s.ao.vertical):{box:null,occluded:!0,offscreen:null}})),Bn&&(Ln=Bn.placeable,Jn=Bn.offscreen);const ba=ta(Bn&&Bn.placeable);if(!Ln&&this.prevPlacement){const ci=this.prevPlacement.variableOffsets[Tt.crossTileID];ci&&(this.variableOffsets[Tt.crossTileID]=ci,this.markUsedJustification(u,ci.anchor,Tt,ba))}}}if(mi=Bn,Ln=mi&&mi.placeable,Jn=mi&&mi.offscreen,Tt.useRuntimeCollisionCircles){const ta=u.text.placedSymbolArray.get(Tt.centerJustifiedTextSymbolIndex),La=s.ap(u.textSizeData,N,ta),Gi=d.get("text-padding");Ci=this.collisionIndex.placeCollisionCircles(ie,ta,u.lineVertexArray,u.glyphOffsetArray,La,C,P,l,Pe,G.predicate,Tt.collisionCircleDiameter,Gi,g,tt),Ci.circles.length&&Ci.collisionDetected&&!l&&s.w("Collisions detected, but collision boxes are not shown"),Ln=ue||Ci.circles.length>0&&!Ci.collisionDetected,Jn=Jn&&Ci.offscreen}if(gr.iconFeatureIndex&&(vo=gr.iconFeatureIndex),gr.iconBox){const ta=La=>this.collisionIndex.placeCollisionBox(La,ve,E,Xe,C,Pe,be,w,G.predicate,tt,_e&&Kr?Kr:void 0,jt);si&&si.placeable&&gr.verticalIconBox?($i=ta(gr.verticalIconBox),Wn=$i.placeable):($i=ta(gr.iconBox),Wn=$i.placeable),Jn=Jn&&$i.offscreen}const ms=te||Tt.numHorizontalGlyphVertices===0&&Tt.numVerticalGlyphVertices===0,Vo=ee||Tt.numIconVertices===0;ms||Vo?Vo?ms||(Wn=Wn&&Ln):Ln=Wn&&Ln:Wn=Ln=Wn&&Ln;const qo=Wn&&$i.placeable;if(Ln&&mi.placeable&&this.collisionIndex.insertCollisionBox(mi.box,ie,d.get("text-ignore-placement"),u.bucketInstanceId,si&&si.placeable&&go?go:za,G.ID),qo&&this.collisionIndex.insertCollisionBox($i.box,ve,d.get("icon-ignore-placement"),u.bucketInstanceId,vo,G.ID),Ci&&Ln&&this.collisionIndex.insertCollisionCircles(Ci.circles,ie,d.get("text-ignore-placement"),u.bucketInstanceId,za,G.ID),l&&this.storeCollisionData(u.bucketInstanceId,Jr,gr,mi,$i,Ci),Tt.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(u.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[Tt.crossTileID]=new ma((Ln||rt)&&!(mi!=null&&mi.occluded),(Wn||Ge)&&!($i!=null&&$i.occluded),Jn||u.justReloaded),i[Tt.crossTileID]=!0};if(Be){if(e.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const Tt=u.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let gr=Tt.length-1;gr>=0;--gr){const Jr=Tt[gr];Zt(u.symbolInstances.get(Jr),u.collisionArrays[Jr],Jr)}}else for(let Tt=e.symbolInstanceStart;Tt=0&&(e.text.placedSymbolArray.get(w).crossTileID=d>=0&&w!==d?0:l.crossTileID)}markUsedOrientation(e,i,l){const u=i===s.ao.horizontal||i===s.ao.horizontalOnly?i:0,d=i===s.ao.vertical?i:0,g=[l.leftJustifiedTextSymbolIndex,l.centerJustifiedTextSymbolIndex,l.rightJustifiedTextSymbolIndex];for(const w of g)e.text.placedSymbolArray.get(w).placedOrientation=u;l.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(l.verticalPlacedTextSymbolIndex).placedOrientation=d)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;const i=this.prevPlacement;let l=!1;this.prevZoomAdjustment=i?i.zoomAdjustment(this.transform.zoom):0;const u=i?i.symbolFadeChange(e):1,d=i?i.opacities:{},g=i?i.variableOffsets:{},w=i?i.placedOrientations:{};for(const C in this.placements){const P=this.placements[C],E=d[C];E?(this.opacities[C]=new en(E,u,P.text,P.icon),l=l||P.text!==E.text.placed||P.icon!==E.icon.placed):(this.opacities[C]=new en(null,u,P.text,P.icon,P.skipFade),l=l||P.text||P.icon)}for(const C in d){const P=d[C];if(!this.opacities[C]){const E=new en(P,u,!1,!1);E.isHidden()||(this.opacities[C]=E,l=l||P.text.placed||P.icon.placed)}}for(const C in g)this.variableOffsets[C]||!this.opacities[C]||this.opacities[C].isHidden()||(this.variableOffsets[C]=g[C]);for(const C in w)this.placedOrientations[C]||!this.opacities[C]||this.opacities[C].isHidden()||(this.placedOrientations[C]=w[C]);if(i&&i.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");l?this.lastPlacementChangeTime=e:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=i?i.lastPlacementChangeTime:e)}updateLayerOpacities(e,i){const l={};for(const u of i){const d=u.getBucket(e);d&&u.latestFeatureIndex&&e.id===d.layerIds[0]&&this.updateBucketOpacities(d,u.tileID,l,u.collisionBoxArray)}}updateBucketOpacities(e,i,l,u){e.hasTextData()&&(e.text.opacityVertexArray.clear(),e.text.hasVisibleVertices=!1),e.hasIconData()&&(e.icon.opacityVertexArray.clear(),e.icon.hasVisibleVertices=!1),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();const d=e.layers[0],g=d.layout,w=new en(null,0,!1,!1,!0),C=g.get("text-allow-overlap"),P=g.get("icon-allow-overlap"),E=d._unevaluatedLayout.hasValue("text-variable-anchor")||d._unevaluatedLayout.hasValue("text-variable-anchor-offset"),R=g.get("text-rotation-alignment")==="map",D=g.get("text-pitch-alignment")==="map",N=g.get("icon-text-fit")!=="none",G=new en(null,0,C&&(P||!e.hasIconData()||g.get("icon-optional")),P&&(C||!e.hasTextData()||g.get("text-optional")),!0);!e.collisionArrays&&u&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(u);const te=(ie,ue,ve)=>{for(let me=0;me0,Be=this.placedOrientations[ue.crossTileID],rt=Be===s.ao.vertical,Ge=Be===s.ao.horizontal||Be===s.ao.horizontalOnly;if(ve>0||me>0){const tt=Xt(Pe.text);te(e.text,ve,rt?Br:tt),te(e.text,me,Ge?Br:tt);const jt=Pe.text.isHidden();[ue.rightJustifiedTextSymbolIndex,ue.centerJustifiedTextSymbolIndex,ue.leftJustifiedTextSymbolIndex].forEach((gr=>{gr>=0&&(e.text.placedSymbolArray.get(gr).hidden=jt||rt?1:0)})),ue.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(ue.verticalPlacedTextSymbolIndex).hidden=jt||Ge?1:0);const Zt=this.variableOffsets[ue.crossTileID];Zt&&this.markUsedJustification(e,Zt.anchor,ue,Be);const Tt=this.placedOrientations[ue.crossTileID];Tt&&(this.markUsedJustification(e,"left",ue,Tt),this.markUsedOrientation(e,Tt,ue))}if(_e){const tt=Xt(Pe.icon),jt=!(N&&ue.verticalPlacedIconSymbolIndex&&rt);ue.placedIconSymbolIndex>=0&&(te(e.icon,ue.numIconVertices,jt?tt:Br),e.icon.placedSymbolArray.get(ue.placedIconSymbolIndex).hidden=Pe.icon.isHidden()),ue.verticalPlacedIconSymbolIndex>=0&&(te(e.icon,ue.numVerticalIconVertices,jt?Br:tt),e.icon.placedSymbolArray.get(ue.verticalPlacedIconSymbolIndex).hidden=Pe.icon.isHidden())}const Xe=ee&&ee.has(ie)?ee.get(ie):{text:null,icon:null};if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){const tt=e.collisionArrays[ie];if(tt){let jt=new s.P(0,0);if(tt.textBox||tt.verticalTextBox){let Zt=!0;if(E){const Tt=this.variableOffsets[be];Tt?(jt=Zn(Tt.anchor,Tt.width,Tt.height,Tt.textOffset,Tt.textBoxScale),R&&jt._rotate(D?-this.transform.bearingInRadians:this.transform.bearingInRadians)):Zt=!1}if(tt.textBox||tt.verticalTextBox){let Tt;tt.textBox&&(Tt=rt),tt.verticalTextBox&&(Tt=Ge),Zi(e.textCollisionBox.collisionVertexArray,Pe.text.placed,!Zt||Tt,Xe.text,jt.x,jt.y)}}if(tt.iconBox||tt.verticalIconBox){const Zt=!!(!Ge&&tt.verticalIconBox);let Tt;tt.iconBox&&(Tt=Zt),tt.verticalIconBox&&(Tt=!Zt),Zi(e.iconCollisionBox.collisionVertexArray,Pe.icon.placed,Tt,Xe.icon,N?jt.x:0,N?jt.y:0)}}}}if(e.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.text.opacityVertexArray.length!==e.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`);if(e.icon.opacityVertexArray.length!==e.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`);e.bucketInstanceId in this.collisionCircleArrays&&(e.collisionCircleArray=this.collisionCircleArrays[e.bucketInstanceId],delete this.collisionCircleArrays[e.bucketInstanceId])}symbolFadeChange(e){return this.fadeDuration===0?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTimee}setStale(){this.stale=!0}}function Zi(h,e,i,l,u,d){l&&l.length!==0||(l=[0,0,0,0]);const g=l[0]-pr,w=l[1]-pr,C=l[2]-pr,P=l[3]-pr;h.emplaceBack(e?1:0,i?1:0,u||0,d||0,g,w),h.emplaceBack(e?1:0,i?1:0,u||0,d||0,C,w),h.emplaceBack(e?1:0,i?1:0,u||0,d||0,C,P),h.emplaceBack(e?1:0,i?1:0,u||0,d||0,g,P)}const Yi=Math.pow(2,25),Ei=Math.pow(2,24),zi=Math.pow(2,17),Ki=Math.pow(2,16),oa=Math.pow(2,9),Ta=Math.pow(2,8),bt=Math.pow(2,1);function Xt(h){if(h.opacity===0&&!h.placed)return 0;if(h.opacity===1&&h.placed)return 4294967295;const e=h.placed?1:0,i=Math.floor(127*h.opacity);return i*Yi+e*Ei+i*zi+e*Ki+i*oa+e*Ta+i*bt+e}const Br=0;class yn{constructor(e){this._sortAcrossTiles=e.layout.get("symbol-z-order")!=="viewport-y"&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,i,l,u,d){const g=this._bucketParts;for(;this._currentTileIndexw.sortKey-C.sortKey)));this._currentPartIndex!this._forceFullPlacement&&ne.now()-u>2;for(;this._currentPlacementIndex>=0;){const g=i[e[this._currentPlacementIndex]],w=this.placement.collisionIndex.transform.zoom;if(g.type==="symbol"&&(!g.minzoom||g.minzoom<=w)&&(!g.maxzoom||g.maxzoom>w)){if(this._inProgressLayer||(this._inProgressLayer=new yn(g)),this._inProgressLayer.continuePlacement(l[g.source],this.placement,this._showCollisionBoxes,g,d))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}const Yn=512/s.$/2;class Vn{constructor(e,i,l){this.tileID=e,this.bucketInstanceId=l,this._symbolsByKey={};const u=new Map;for(let d=0;d({x:Math.floor(C.anchorX*Yn),y:Math.floor(C.anchorY*Yn)}))),crossTileIDs:g.map((C=>C.crossTileID))};if(w.positions.length>128){const C=new s.aI(w.positions.length,16,Uint16Array);for(const{x:P,y:E}of w.positions)C.add(P,E);C.finish(),delete w.positions,w.index=C}this._symbolsByKey[d]=w}}getScaledCoordinates(e,i){const{x:l,y:u,z:d}=this.tileID.canonical,{x:g,y:w,z:C}=i.canonical,P=Yn/Math.pow(2,C-d),E=(w*s.$+e.anchorY)*P,R=u*s.$*Yn;return{x:Math.floor((g*s.$+e.anchorX)*P-l*s.$*Yn),y:Math.floor(E-R)}}findMatches(e,i,l){const u=this.tileID.canonical.ze))}}class wn{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Ji{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){const i=Math.round((e-this.lng)/360);if(i!==0)for(const l in this.indexes){const u=this.indexes[l],d={};for(const g in u){const w=u[g];w.tileID=w.tileID.unwrapTo(w.tileID.wrap+i),d[w.tileID.key]=w}this.indexes[l]=d}this.lng=e}addBucket(e,i,l){if(this.indexes[e.overscaledZ]&&this.indexes[e.overscaledZ][e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===i.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let d=0;de.overscaledZ)for(const w in g){const C=g[w];C.tileID.isChildOf(e)&&C.findMatches(i.symbolInstances,e,u)}else{const w=g[e.scaledTo(Number(d)).key];w&&w.findMatches(i.symbolInstances,e,u)}}for(let d=0;d{i[l]=!0}));for(const l in this.layerIndexes)i[l]||delete this.layerIndexes[l]}}var $t="void main() {fragColor=vec4(1.0);}";const Ur={prelude:or(`#ifdef GL_ES +precision mediump float; +#else +#if !defined(lowp) +#define lowp +#endif +#if !defined(mediump) +#define mediump +#endif +#if !defined(highp) +#define highp +#endif +#endif +out highp vec4 fragColor;`,`#ifdef GL_ES +precision highp float; +#else +#if !defined(lowp) +#define lowp +#endif +#if !defined(mediump) +#define mediump +#endif +#if !defined(highp) +#define highp +#endif +#endif +vec2 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 +);}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);return (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 +);} +#ifdef TERRAIN3D +uniform 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; +#endif +const 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) { +#ifdef TERRAIN3D +highp 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)); +#else +return 1.0; +#endif +}float calculate_visibility(vec4 pos) { +#ifdef TERRAIN3D +vec3 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; +#else +return 1.0; +#endif +}float ele(vec2 pos) { +#ifdef TERRAIN3D +vec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; +#else +return 0.0; +#endif +}float get_elevation(vec2 pos) { +#ifdef TERRAIN3D +#ifdef GLOBE +if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;} +#endif +vec2 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; +#else +return 0.0; +#endif +}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`),projectionMercator:or("","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:or("",`#define GLOBE_RADIUS 6371008.8 +uniform 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 +);}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); +if (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 +);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:or(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:or(`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;uniform 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; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,"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:or(`in vec3 v_data;in float v_visibility; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define mediump float radius +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define highp vec4 stroke_color +#pragma mapbox: define mediump float stroke_width +#pragma mapbox: define lowp float stroke_opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize mediump float radius +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize highp vec4 stroke_color +#pragma mapbox: initialize mediump float stroke_width +#pragma mapbox: initialize lowp float stroke_opacity +vec2 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;} +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`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; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define mediump float radius +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define highp vec4 stroke_color +#pragma mapbox: define mediump float stroke_width +#pragma mapbox: define lowp float stroke_opacity +void main(void) { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize mediump float radius +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize highp vec4 stroke_color +#pragma mapbox: initialize mediump float stroke_width +#pragma mapbox: initialize lowp float stroke_opacity +vec2 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) { +#ifdef GLOBE +vec3 center_vector=projectToSphere(circle_center); +#endif +float 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 { +#ifdef GLOBE +vec4 projected_center=interpolateProjection(circle_center,center_vector,ele); +#else +vec4 projected_center=projectTileWithElevation(circle_center,ele); +#endif +corner_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);} +#ifdef GLOBE +vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele); +#else +gl_Position=projectTileWithElevation(corner_position,ele); +#endif +} 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:or($t,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:or(`uniform highp float u_intensity;in vec2 v_extrude; +#pragma mapbox: define highp float weight +#define GAUSS_COEF 0.3989422804014327 +void main() { +#pragma mapbox: initialize highp float weight +float 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); +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`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; +#pragma mapbox: define highp float weight +#pragma mapbox: define mediump float radius +const highp float ZERO=1.0/255.0/16.0; +#define GAUSS_COEF 0.3989422804014327 +void main(void) { +#pragma mapbox: initialize highp float weight +#pragma mapbox: initialize mediump float radius +vec2 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); +#ifdef GLOBE +vec2 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); +#else +gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center)); +#endif +}`),heatmapTexture:or(`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; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(0.0); +#endif +}`,"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:or("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:or("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:or(`#ifdef GL_ES +precision highp float; +#endif +uniform 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 +{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)); +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,"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:or("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:or($t,`in vec2 a_pos;void main() { +#ifdef GLOBE +gl_Position=projectTileFor3D(a_pos,0.0); +#else +gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0); +#endif +}`),fill:or(`#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float opacity +fragColor=color*opacity; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`uniform vec2 u_fill_translate;in vec2 a_pos; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float opacity +gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:or(`in vec2 v_pos; +#ifdef GLOBE +in float v_depth; +#endif +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 outline_color +#pragma mapbox: initialize lowp float opacity +float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos; +#ifdef GLOBE +out float v_depth; +#endif +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 outline_color +#pragma mapbox: initialize lowp float opacity +gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +}`),fillOutlinePattern:or(`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; +#ifdef GLOBE +in float v_depth; +#endif +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +vec2 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; +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`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; +#ifdef GLOBE +out float v_depth; +#endif +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 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; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +}`),fillPattern:or(`#ifdef GL_ES +precision highp float; +#endif +uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +vec2 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; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`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; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 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;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:or(`in vec4 v_color;void main() {fragColor=v_color; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`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; +#ifdef TERRAIN3D +in vec2 a_centroid; +#endif +out vec4 v_color; +#pragma mapbox: define highp float base +#pragma mapbox: define highp float height +#pragma mapbox: define highp vec4 color +void main() { +#pragma mapbox: initialize highp float base +#pragma mapbox: initialize highp float height +#pragma mapbox: initialize highp vec4 color +vec3 normal=a_normal_ed.xyz; +#ifdef TERRAIN3D +float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); +#else +float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; +#endif +base=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; +#ifdef GLOBE +vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); +#else +gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); +#endif +float 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); +#ifdef GLOBE +mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition); +#endif +directional=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:or(`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; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 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; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`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; +#ifdef TERRAIN3D +in vec2 a_centroid; +#endif +#ifdef GLOBE +out vec3 v_sphere_pos; +#endif +out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 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; +#ifdef TERRAIN3D +float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); +#else +float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; +#endif +base=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; +#ifdef GLOBE +vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); +#else +gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); +#endif +vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 +? a_pos +: 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:or(`#ifdef GL_ES +precision highp float; +#endif +uniform 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/pow(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); +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,"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:or(`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]; +#define PI 3.141592653589793 +#define STANDARD 0 +#define COMBINED 1 +#define IGOR 2 +#define MULTIDIRECTIONAL 3 +#define BASIC 4 +float 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 +{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 +{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);} +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,"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:or(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale; +#ifdef GLOBE +in float v_depth; +#endif +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +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);fragColor=color*(alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +in 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; +#ifdef GLOBE +out float v_depth; +#endif +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float 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);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; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float 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; +#endif +v_width2=vec2(outset,inset);}`),lineGradient:or(`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; +#ifdef GLOBE +in float v_depth; +#endif +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +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);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +in 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; +#ifdef GLOBE +out float v_depth; +#endif +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float 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; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float 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; +#endif +v_width2=vec2(outset,inset);}`),linePattern:or(`#ifdef GL_ES +precision highp float; +#endif +uniform 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; +#ifdef GLOBE +in float v_depth; +#endif +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +vec2 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; +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +in 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; +#ifdef GLOBE +out float v_depth; +#endif +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +float 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; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float 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; +#endif +v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:or(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;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; +#ifdef GLOBE +in float v_depth; +#endif +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +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 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);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +in 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_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale; +#ifdef GLOBE +out float v_depth; +#endif +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float 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; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float 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; +#endif +v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:or(`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); +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`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; +#ifdef GLOBE +if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;} +#endif +v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`),symbolIcon:or(`uniform sampler2D u_texture;in vec2 v_tex;in float v_fade_opacity; +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +lowp float alpha=opacity*v_fade_opacity;fragColor=texture(u_texture,v_tex)*alpha; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`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_fade_opacity; +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +vec2 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);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_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; +#ifdef GLOBE +if(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);} +#endif +vec4 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;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_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:or(`#define SDF_PX 8.0 +uniform bool u_is_halo;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; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float 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 fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}fragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`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; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 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;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);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_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; +#ifdef GLOBE +if(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);} +#endif +vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*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;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));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:or(`#define SDF_PX 8.0 +#define SDF 1.0 +#define ICON 0.0 +uniform bool u_is_halo;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; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;fragColor=texture(u_texture_icon,tex_icon)*alpha; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +return;}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;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);fragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`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; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 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);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_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; +#ifdef GLOBE +if(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);} +#endif +vec4 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;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));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:or("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 && 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);float 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,get_elevation(a_pos3d.xy)-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:or("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:or("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:or("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:or(`in 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 +);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:or("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);}")};function or(h,e){const i=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,l=e.match(/in ([\w]+) ([\w]+)/g),u=h.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),d=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),g=d?d.concat(u):u,w={};return{fragmentSource:h=h.replace(i,((C,P,E,R,D)=>(w[D]=!0,P==="define"?` +#ifndef HAS_UNIFORM_u_${D} +in ${E} ${R} ${D}; +#else +uniform ${E} ${R} u_${D}; +#endif +`:` +#ifdef HAS_UNIFORM_u_${D} + ${E} ${R} ${D} = u_${D}; +#endif +`))),vertexSource:e=e.replace(i,((C,P,E,R,D)=>{const N=R==="float"?"vec2":"vec4",G=D.match(/color/)?"color":N;return w[D]?P==="define"?` +#ifndef HAS_UNIFORM_u_${D} +uniform lowp float u_${D}_t; +in ${E} ${N} a_${D}; +out ${E} ${R} ${D}; +#else +uniform ${E} ${R} u_${D}; +#endif +`:G==="vec4"?` +#ifndef HAS_UNIFORM_u_${D} + ${D} = a_${D}; +#else + ${E} ${R} ${D} = u_${D}; +#endif +`:` +#ifndef HAS_UNIFORM_u_${D} + ${D} = unpack_mix_${G}(a_${D}, u_${D}_t); +#else + ${E} ${R} ${D} = u_${D}; +#endif +`:P==="define"?` +#ifndef HAS_UNIFORM_u_${D} +uniform lowp float u_${D}_t; +in ${E} ${N} a_${D}; +#else +uniform ${E} ${R} u_${D}; +#endif +`:G==="vec4"?` +#ifndef HAS_UNIFORM_u_${D} + ${E} ${R} ${D} = a_${D}; +#else + ${E} ${R} ${D} = u_${D}; +#endif +`:` +#ifndef HAS_UNIFORM_u_${D} + ${E} ${R} ${D} = unpack_mix_${G}(a_${D}, u_${D}_t); +#else + ${E} ${R} ${D} = u_${D}; +#endif +`})),staticAttributes:l,staticUniforms:g}}class Tn{constructor(e,i,l){this.vertexBuffer=e,this.indexBuffer=i,this.segments=l}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var nn=s.aJ([{name:"a_pos",type:"Int16",components:2}]);const Cn="#define PROJECTION_MERCATOR",Gn="mercator";class Mr{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return Gn}get shaderDefine(){return Cn}get shaderPreludeCode(){return Ur.projectionMercator}get vertexShaderPreludeCode(){return Ur.projectionMercator.vertexSource}get subdivisionGranularity(){return s.aK.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(e){}getMeshFromTileID(e,i,l,u,d){if(this._cachedMesh)return this._cachedMesh;const g=new s.aL;g.emplaceBack(0,0),g.emplaceBack(s.$,0),g.emplaceBack(0,s.$),g.emplaceBack(s.$,s.$);const w=e.createVertexBuffer(g,nn.members),C=s.aM.simpleSegment(0,0,4,2),P=new s.aN;P.emplaceBack(1,0,2),P.emplaceBack(1,2,3);const E=e.createIndexBuffer(P);return this._cachedMesh=new Tn(w,E,C),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(e){}}class Mn{constructor(e=0,i=0,l=0,u=0){if(isNaN(e)||e<0||isNaN(i)||i<0||isNaN(l)||l<0||isNaN(u)||u<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=i,this.left=l,this.right=u}interpolate(e,i,l){return i.top!=null&&e.top!=null&&(this.top=s.C.number(e.top,i.top,l)),i.bottom!=null&&e.bottom!=null&&(this.bottom=s.C.number(e.bottom,i.bottom,l)),i.left!=null&&e.left!=null&&(this.left=s.C.number(e.left,i.left,l)),i.right!=null&&e.right!=null&&(this.right=s.C.number(e.right,i.right,l)),this}getCenter(e,i){const l=s.ah((this.left+e-this.right)/2,0,e),u=s.ah((this.top+i-this.bottom)/2,0,i);return new s.P(l,u)}equals(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right}clone(){return new Mn(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function bn(h,e){if(!h.renderWorldCopies||h.lngRange)return;const i=e.lng-h.center.lng;e.lng+=i>180?-360:i<-180?360:0}function ln(h){return Math.max(0,Math.floor(h))}class Sn{constructor(e,i,l,u,d,g){this._callbacks=e,this._tileSize=512,this._renderWorldCopies=g===void 0||!!g,this._minZoom=i||0,this._maxZoom=l||22,this._minPitch=u??0,this._maxPitch=d??60,this.setMaxBounds(),this._width=0,this._height=0,this._center=new s.S(0,0),this._elevation=0,this._zoom=0,this._tileZoom=ln(this._zoom),this._scale=s.af(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new Mn,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(e,i,l){this._latRange=e.latRange,this._lngRange=e.lngRange,this._width=e.width,this._height=e.height,this._center=e.center,this._elevation=e.elevation,this._minElevationForCurrentTile=e.minElevationForCurrentTile,this._zoom=e.zoom,this._tileZoom=ln(this._zoom),this._scale=s.af(this._zoom),this._bearingInRadians=e.bearingInRadians,this._fovInRadians=e.fovInRadians,this._pitchInRadians=e.pitchInRadians,this._rollInRadians=e.rollInRadians,this._unmodified=e.unmodified,this._edgeInsets=new Mn(e.padding.top,e.padding.bottom,e.padding.left,e.padding.right),this._minZoom=e.minZoom,this._maxZoom=e.maxZoom,this._minPitch=e.minPitch,this._maxPitch=e.maxPitch,this._renderWorldCopies=e.renderWorldCopies,this._cameraToCenterDistance=e.cameraToCenterDistance,this._nearZ=e.nearZ,this._farZ=e.farZ,this._autoCalculateNearFarZ=!l&&e.autoCalculateNearFarZ,i&&this._constrain(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(e){this._minElevationForCurrentTile=e}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(e){this._minZoom!==e&&(this._minZoom=e,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(e){this._minPitch!==e&&(this._minPitch=e,this.setPitch(Math.max(this.pitch,e)))}get maxPitch(){return this._maxPitch}setMaxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.setPitch(Math.min(this.pitch,e)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(e){e===void 0?e=!0:e===null&&(e=!1),this._renderWorldCopies=e}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new s.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(e){const i=s.aO(e,-180,180)*Math.PI/180;var l,u,d,g,w,C,P,E,R;this._bearingInRadians!==i&&(this._unmodified=!1,this._bearingInRadians=i,this._calcMatrices(),this._rotationMatrix=O(),l=this._rotationMatrix,d=-this._bearingInRadians,g=(u=this._rotationMatrix)[0],w=u[1],C=u[2],P=u[3],E=Math.sin(d),R=Math.cos(d),l[0]=g*R+C*E,l[1]=w*R+P*E,l[2]=g*-E+C*R,l[3]=w*-E+P*R)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(e){const i=s.ah(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==i&&(this._unmodified=!1,this._pitchInRadians=i,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(e){const i=e/180*Math.PI;this._rollInRadians!==i&&(this._unmodified=!1,this._rollInRadians=i,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return s.aP(this._fovInRadians)}setFov(e){e=s.ah(e,.1,150),this.fov!==e&&(this._unmodified=!1,this._fovInRadians=s.ae(e),this._calcMatrices())}get zoom(){return this._zoom}setZoom(e){const i=this.getConstrained(this._center,e).zoom;this._zoom!==i&&(this._unmodified=!1,this._zoom=i,this._tileZoom=Math.max(0,Math.floor(i)),this._scale=s.af(i),this._constrain(),this._calcMatrices())}get center(){return this._center}setCenter(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(e){e!==this._elevation&&(this._elevation=e,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,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(e,i){this._autoCalculateNearFarZ=!1,this._nearZ=e,this._farZ=i,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,i,l){this._unmodified=!1,this._edgeInsets.interpolate(e,i,l),this._constrain(),this._calcMatrices()}resize(e,i,l=!0){this._width=e,this._height=i,l&&this._constrain(),this._calcMatrices()}getMaxBounds(){return this._latRange&&this._latRange.length===2&&this._lngRange&&this._lngRange.length===2?new _t([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]]):null}setMaxBounds(e){e?(this._lngRange=[e.getWest(),e.getEast()],this._latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this._lngRange=null,this._latRange=[-s.ai,s.ai])}getConstrained(e,i){return this._callbacks.getConstrained(e,i)}getCameraQueryGeometry(e,i){if(i.length===1)return[i[0],e];{const{minX:l,minY:u,maxX:d,maxY:g}=s.a2.fromPoints(i).extend(e);return[new s.P(l,u),new s.P(d,u),new s.P(d,g),new s.P(l,g),new s.P(l,u)]}}_constrain(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;const e=this._unmodified,{center:i,zoom:l}=this.getConstrained(this.center,this.zoom);this.setCenter(i),this.setZoom(l),this._unmodified=e,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let e=s.ag(new Float64Array(16));s.N(e,e,[this._width/2,-this._height/2,1]),s.M(e,e,[1,-1,0]),this._clipSpaceToPixelsMatrix=e,e=s.ag(new Float64Array(16)),s.N(e,e,[1,-1,1]),s.M(e,e,[-1,-1,0]),s.N(e,e,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=e,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(e,i,l,u){const d=l!==void 0?l:this.bearing,g=u=u!==void 0?u:this.pitch,w=s.a1.fromLngLat(e,i),C=-Math.cos(s.ae(g)),P=Math.sin(s.ae(g)),E=P*Math.sin(s.ae(d)),R=-P*Math.cos(s.ae(d));let D=this.elevation;const N=i-D;let G;C*N>=0||Math.abs(C)<.1?(G=1e4,D=i+G*C):G=-N/C;let te,ee,ie=s.aQ(1,w.y),ue=0;do{if(ue+=1,ue>10)break;ee=G/ie,te=new s.a1(w.x+E*ee,w.y+R*ee),ie=1/te.meterInMercatorCoordinateUnits()}while(Math.abs(G-ee*ie)>1e-12);return{center:te.toLngLat(),elevation:D,zoom:s.ak(this.height/2/Math.tan(this.fovInRadians/2)/ee/this.tileSize)}}recalculateZoomAndCenter(e){if(this.elevation-e==0)return;const i=s.aj(1,this.center.lat)*this.worldSize,l=this.cameraToCenterDistance/i,u=s.a1.fromLngLat(this.center,this.elevation),d=ke(this.center,this.elevation,this.pitch,this.bearing,l);this._elevation=e;const g=this.calculateCenterFromCameraLngLatAlt(d.toLngLat(),s.aQ(d.z,u.y),this.bearing,this.pitch);this._elevation=g.elevation,this._center=g.center,this.setZoom(g.zoom)}getCameraPoint(){const e=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new s.P(e*Math.sin(this.rollInRadians),e*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){const e=s.aj(1,this.center.lat)*this.worldSize;return ke(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/e).toLngLat()}getMercatorTileCoordinates(e){if(!e)return[0,0,1,1];const i=e.canonical.z>=0?1<this.max[0]||e.aabb.min[1]>this.max[1]||e.aabb.min[2]>this.max[2]||e.aabb.max[0]0?(i+=e[u]*this.min[u],l+=e[u]*this.max[u]):(l+=e[u]*this.min[u],i+=e[u]*this.max[u]);return i>=0?2:l<0?0:1}}class gn{distanceToTile2d(e,i,l,u){const d=u.distanceX([e,i]),g=u.distanceY([e,i]);return Math.hypot(d,g)}getWrap(e,i,l){return l}getTileBoundingVolume(e,i,l,u){var d,g;let w=0,C=0;if(u!=null&&u.terrain){const E=new s.Z(e.z,i,e.z,e.x,e.y),R=u.terrain.getMinMaxElevation(E);w=(d=R.minElevation)!==null&&d!==void 0?d:Math.min(0,l),C=(g=R.maxElevation)!==null&&g!==void 0?g:Math.max(0,l)}const P=1<u}allowWorldCopies(){return!0}prepareNextFrame(){}}class fn{constructor(e,i,l){this.points=e,this.planes=i,this.aabb=l}static fromInvProjectionMatrix(e,i=1,l=0,u,d){const g=d?[[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]],w=Math.pow(2,l),C=[[-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((D=>(function(N,G,te,ee){const ie=s.aw([],N,G),ue=1/ie[3]/te*ee;return s.aY(ie,ie,[ue,ue,1/ie[3],ue])})(D,e,i,w)));u&&(function(D,N,G,te){const ee=te?4:0,ie=te?0:4;let ue=0;const ve=[],me=[];for(let _e=0;_e<4;_e++){const Be=s.aU([],D[_e+ie],D[_e+ee]),rt=s.aZ(Be);s.aR(Be,Be,1/rt),ve.push(rt),me.push(Be)}for(let _e=0;_e<4;_e++){const Be=s.a_(D[_e+ee],me[_e],G);ue=Be!==null&&Be>=0?Math.max(ue,Be):Math.max(ue,ve[_e])}const be=(function(_e,Be){const rt=s.aU([],_e[Be[0]],_e[Be[1]]),Ge=s.aU([],_e[Be[2]],_e[Be[1]]),Xe=[0,0,0,0];return s.aV(Xe,s.aW([],rt,Ge)),Xe[3]=-s.aX(Xe,_e[Be[0]]),Xe})(D,N),Pe=(function(_e,Be){const rt=s.a$(_e),Ge=s.b0([],_e,1/rt),Xe=s.aU([],Be,s.aR([],Ge,s.aX(Be,Ge))),tt=s.a$(Xe);if(tt>0){const jt=Math.sqrt(1-Ge[3]*Ge[3]),Zt=s.aR([],Ge,-Ge[3]),Tt=s.aS([],Zt,s.aR([],Xe,jt/tt));return s.b1(Be,Tt)}return null})(G,be);if(Pe!==null){const _e=Pe/s.aX(me[0],be);ue=Math.min(ue,_e)}for(let _e=0;_e<4;_e++){const Be=Math.min(ue,ve[_e]);D[_e+ie]=[D[_e+ee][0]+me[_e][0]*Be,D[_e+ee][1]+me[_e][1]*Be,D[_e+ee][2]+me[_e][2]*Be,1]}})(C,g[0],u,d);const P=g.map((D=>{const N=s.aU([],C[D[0]],C[D[1]]),G=s.aU([],C[D[2]],C[D[1]]),te=s.aV([],s.aW([],N,G)),ee=-s.aX(te,C[D[1]]);return te.concat(ee)})),E=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],R=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(const D of C)for(let N=0;N<3;N++)E[N]=Math.min(E[N],D[N]),R[N]=Math.max(R[N],D[N]);return new fn(C,P,new kn(E,R))}}class an{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(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,i,l){return this._helper.interpolatePadding(e,i,l)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,i,l=!0){this._helper.resize(e,i,l)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}overrideNearFarZ(e,i){this._helper.overrideNearFarZ(e,i)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}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 nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(e,i){}constructor(e,i,l,u,d){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this._helper=new Sn({calcMatrices:()=>{this._calcMatrices()},getConstrained:(g,w)=>this.getConstrained(g,w)},e,i,l,u,d),this._coveringTilesDetailsProvider=new gn}clone(){const e=new an;return e.apply(this),e}apply(e,i,l){this._helper.apply(e,i,l)}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(e){const i=[new s.b2(0,e)];if(this._helper._renderWorldCopies){const l=this.screenPointToMercatorCoordinate(new s.P(0,0)),u=this.screenPointToMercatorCoordinate(new s.P(this._helper._width,0)),d=this.screenPointToMercatorCoordinate(new s.P(this._helper._width,this._helper._height)),g=this.screenPointToMercatorCoordinate(new s.P(0,this._helper._height)),w=Math.floor(Math.min(l.x,u.x,d.x,g.x)),C=Math.floor(Math.max(l.x,u.x,d.x,g.x)),P=1;for(let E=w-P;E<=C+P;E++)E!==0&&i.push(new s.b2(E,e))}return i}getCameraFrustum(){return fn.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){const i=this.screenPointToLocation(this.centerPoint,e),l=e?e.getElevationForLngLatZoom(i,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(l)}setLocationAtPoint(e,i){const l=s.aj(this.elevation,this.center.lat),u=this.screenPointToMercatorCoordinateAtZ(i,l),d=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,l),g=s.a1.fromLngLat(e),w=new s.a1(g.x-(u.x-d.x),g.y-(u.y-d.y));this.setCenter(w==null?void 0:w.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(e,i){return i?this.coordinatePoint(s.a1.fromLngLat(e),i.getElevationForLngLatZoom(e,this._helper._tileZoom),this._pixelMatrix3D):this.coordinatePoint(s.a1.fromLngLat(e))}screenPointToLocation(e,i){var l;return(l=this.screenPointToMercatorCoordinate(e,i))===null||l===void 0?void 0:l.toLngLat()}screenPointToMercatorCoordinate(e,i){if(i){const l=i.pointCoordinate(e);if(l!=null)return l}return this.screenPointToMercatorCoordinateAtZ(e)}screenPointToMercatorCoordinateAtZ(e,i){const l=i||0,u=[e.x,e.y,0,1],d=[e.x,e.y,1,1];s.aw(u,u,this._pixelMatrixInverse),s.aw(d,d,this._pixelMatrixInverse);const g=u[3],w=d[3],C=u[1]/g,P=d[1]/w,E=u[2]/g,R=d[2]/w,D=E===R?0:(l-E)/(R-E);return new s.a1(s.C.number(u[0]/g,d[0]/w,D)/this.worldSize,s.C.number(C,P,D)/this.worldSize,l)}coordinatePoint(e,i=0,l=this._pixelMatrix){const u=[e.x*this.worldSize,e.y*this.worldSize,i,1];return s.aw(u,u,l),new s.P(u[0]/u[3],u[1]/u[3])}getBounds(){const e=Math.max(0,this._helper._height/2-fe(this));return new _t().extend(this.screenPointToLocation(new s.P(0,e))).extend(this.screenPointToLocation(new s.P(this._helper._width,e))).extend(this.screenPointToLocation(new s.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new s.P(0,this._helper._height)))}isPointOnMapSurface(e,i){return i?i.pointCoordinate(e)!=null:e.y>this.height/2-fe(this)}calculatePosMatrix(e,i=!1,l){var u;const d=(u=e.key)!==null&&u!==void 0?u:s.b3(e.wrap,e.canonical.z,e.canonical.z,e.canonical.x,e.canonical.y),g=i?this._alignedPosMatrixCache:this._posMatrixCache;if(g.has(d)){const P=g.get(d);return l?P.f32:P.f64}const w=Se(e,this.worldSize);s.O(w,i?this._alignedProjMatrix:this._viewProjMatrix,w);const C={f64:w,f32:new Float32Array(w)};return g.set(d,C),l?C.f32:C.f64}calculateFogMatrix(e){const i=e.key,l=this._fogMatrixCacheF32;if(l.has(i))return l.get(i);const u=Se(e,this.worldSize);return s.O(u,this._fogMatrix,u),l.set(i,new Float32Array(u)),l.get(i)}getConstrained(e,i){i=s.ah(+i,this.minZoom,this.maxZoom);const l={center:new s.S(e.lng,e.lat),zoom:i};let u=this._helper._lngRange;if(!this._helper._renderWorldCopies&&u===null){const ve=179.9999999999;u=[-ve,ve]}const d=this.tileSize*s.af(l.zoom);let g=0,w=d,C=0,P=d,E=0,R=0;const{x:D,y:N}=this.size;if(this._helper._latRange){const ve=this._helper._latRange;g=s.U(ve[1])*d,w=s.U(ve[0])*d,w-gw&&(ie=w-ve)}if(u){const ve=(C+P)/2;let me=G;this._helper._renderWorldCopies&&(me=s.aO(G,ve-d/2,ve+d/2));const be=D/2;me-beP&&(ee=P-be)}if(ee!==void 0||ie!==void 0){const ve=new s.P(ee??G,ie??te);l.center=ae(d,ve).wrap()}return l}calculateCenterFromCameraLngLatAlt(e,i,l,u){return this._helper.calculateCenterFromCameraLngLatAlt(e,i,l,u)}_calculateNearFarZIfNeeded(e,i,l){if(!this._helper.autoCalculateNearFarZ)return;const u=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),d=e-u*this._helper._pixelPerMeter/Math.cos(i),g=u<0?d:e,w=Math.PI/2+this.pitchInRadians,C=s.ae(this.fov)*(Math.abs(Math.cos(s.ae(this.roll)))*this.height+Math.abs(Math.sin(s.ae(this.roll)))*this.width)/this.height*(.5+l.y/this.height),P=Math.sin(C)*g/Math.sin(s.ah(Math.PI-w-C,.01,Math.PI-.01)),E=fe(this),R=Math.atan(E/this._helper.cameraToCenterDistance),D=s.ae(.75),N=R>D?2*R*(.5+l.y/(2*E)):D,G=Math.sin(N)*g/Math.sin(s.ah(Math.PI-w-N,.01,Math.PI-.01)),te=Math.min(P,G);this._helper._farZ=1.01*(Math.cos(Math.PI/2-i)*te+g),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;const e=this.centerOffset,i=Y(this.worldSize,this.center),l=i.x,u=i.y;this._helper._pixelPerMeter=s.aj(1,this.center.lat)*this.worldSize;const d=s.ae(Math.min(this.pitch,Z)),g=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(d));let w;this._calculateNearFarZIfNeeded(g,d,e),w=new Float64Array(16),s.b4(w,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),s.aq(this._invProjMatrix,w),w[8]=2*-e.x/this._helper._width,w[9]=2*e.y/this._helper._height,this._projectionMatrix=s.b5(w),s.N(w,w,[1,-1,1]),s.M(w,w,[0,0,-this._helper.cameraToCenterDistance]),s.b6(w,w,-this.rollInRadians),s.b7(w,w,this.pitchInRadians),s.b6(w,w,-this.bearingInRadians),s.M(w,w,[-l,-u,0]),this._mercatorMatrix=s.N([],w,[this.worldSize,this.worldSize,this.worldSize]),s.N(w,w,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=s.O(new Float64Array(16),this.clipSpaceToPixelsMatrix,w),s.M(w,w,[0,0,-this.elevation]),this._viewProjMatrix=w,this._invViewProjMatrix=s.aq([],w);const C=[0,0,-1,1];s.aw(C,C,this._invViewProjMatrix),this._cameraPosition=[C[0]/C[3],C[1]/C[3],C[2]/C[3]],this._fogMatrix=new Float64Array(16),s.b4(this._fogMatrix,this.fovInRadians,this.width/this.height,g,this._helper._farZ),this._fogMatrix[8]=2*-e.x/this.width,this._fogMatrix[9]=2*e.y/this.height,s.N(this._fogMatrix,this._fogMatrix,[1,-1,1]),s.M(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),s.b6(this._fogMatrix,this._fogMatrix,-this.rollInRadians),s.b7(this._fogMatrix,this._fogMatrix,this.pitchInRadians),s.b6(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),s.M(this._fogMatrix,this._fogMatrix,[-l,-u,0]),s.N(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),s.M(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=s.O(new Float64Array(16),this.clipSpaceToPixelsMatrix,w);const P=this._helper._width%2/2,E=this._helper._height%2/2,R=Math.cos(this.bearingInRadians),D=Math.sin(-this.bearingInRadians),N=l-Math.round(l)+R*P+D*E,G=u-Math.round(u)+R*E+D*P,te=new Float64Array(w);if(s.M(te,te,[N>.5?N-1:N,G>.5?G-1:G,0]),this._alignedProjMatrix=te,w=s.aq(new Float64Array(16),this._pixelMatrix),!w)throw new Error("failed to invert matrix");this._pixelMatrixInverse=w,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;const e=this.screenPointToMercatorCoordinate(new s.P(0,0)),i=[e.x*this.worldSize,e.y*this.worldSize,0,1];return s.aw(i,i,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){const e=s.aj(1,this.center.lat)*this.worldSize;return ke(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/e).toLngLat()}lngLatToCameraDepth(e,i){const l=s.a1.fromLngLat(e),u=[l.x*this.worldSize,l.y*this.worldSize,i,1];return s.aw(u,u,this._viewProjMatrix),u[2]/u[3]}getProjectionData(e){const{overscaledTileID:i,aligned:l,applyTerrainMatrix:u}=e,d=this._helper.getMercatorTileCoordinates(i),g=i?this.calculatePosMatrix(i,l,!0):null;let w;return w=i&&i.terrainRttPosMatrix32f&&u?i.terrainRttPosMatrix32f:g||s.b8(),{mainMatrix:w,tileMercatorCoords:d,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:w}}isLocationOccluded(e){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(e,i,l){return 1}transformLightDirection(e){return s.aT(e)}getRayDirectionFromPixel(e){throw new Error("Not implemented.")}projectTileCoordinates(e,i,l,u){const d=this.calculatePosMatrix(l);let g;u?(g=[e,i,u(e,i),1],s.aw(g,g,d)):(g=[e,i,0,1],En(g,g,d));const w=g[3];return{point:new s.P(g[0]/w,g[1]/w),signedDistanceFromCamera:w,isOccluded:!1}}populateCache(e){for(const i of e)this.calculatePosMatrix(i)}getMatrixForModel(e,i){const l=s.a1.fromLngLat(e,i),u=l.meterInMercatorCoordinateUnits(),d=s.b9();return s.M(d,d,[l.x,l.y,l.z]),s.b6(d,d,Math.PI),s.b7(d,d,Math.PI/2),s.N(d,d,[-u,u,u]),d}getProjectionDataForCustomLayer(e=!0){const i=new s.Z(0,0,0,0,0),l=this.getProjectionData({overscaledTileID:i,applyGlobeMatrix:e}),u=Se(i,this.worldSize);s.O(u,this._viewProjMatrix,u),l.tileMercatorCoords=[0,0,1,1];const d=[s.$,s.$,this.worldSize/this._helper.pixelsPerMeter],g=s.ba();return s.N(g,u,d),l.fallbackMatrix=g,l.mainMatrix=g,l}getFastPathSimpleProjectionMatrix(e){return this.calculatePosMatrix(e)}}function po(){s.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function fi(h){if(h.useSlerp)if(h.k<1){const e=s.bb(h.startEulerAngles.roll,h.startEulerAngles.pitch,h.startEulerAngles.bearing),i=s.bb(h.endEulerAngles.roll,h.endEulerAngles.pitch,h.endEulerAngles.bearing),l=new Float64Array(4);s.bc(l,e,i,h.k);const u=s.bd(l);h.tr.setRoll(u.roll),h.tr.setPitch(u.pitch),h.tr.setBearing(u.bearing)}else h.tr.setRoll(h.endEulerAngles.roll),h.tr.setPitch(h.endEulerAngles.pitch),h.tr.setBearing(h.endEulerAngles.bearing);else h.tr.setRoll(s.C.number(h.startEulerAngles.roll,h.endEulerAngles.roll,h.k)),h.tr.setPitch(s.C.number(h.startEulerAngles.pitch,h.endEulerAngles.pitch,h.k)),h.tr.setBearing(s.C.number(h.startEulerAngles.bearing,h.endEulerAngles.bearing,h.k))}function Hn(h,e,i,l,u){const d=u.padding,g=Y(u.worldSize,i.getNorthWest()),w=Y(u.worldSize,i.getNorthEast()),C=Y(u.worldSize,i.getSouthEast()),P=Y(u.worldSize,i.getSouthWest()),E=s.ae(-l),R=g.rotate(E),D=w.rotate(E),N=C.rotate(E),G=P.rotate(E),te=new s.P(Math.max(R.x,D.x,G.x,N.x),Math.max(R.y,D.y,G.y,N.y)),ee=new s.P(Math.min(R.x,D.x,G.x,N.x),Math.min(R.y,D.y,G.y,N.y)),ie=te.sub(ee),ue=(u.width-(d.left+d.right+e.left+e.right))/ie.x,ve=(u.height-(d.top+d.bottom+e.top+e.bottom))/ie.y;if(ve<0||ue<0)return void po();const me=Math.min(s.ak(u.scale*Math.min(ue,ve)),h.maxZoom),be=s.P.convert(h.offset),Pe=new s.P((e.left-e.right)/2,(e.top-e.bottom)/2).rotate(s.ae(l)),_e=be.add(Pe).mult(u.scale/s.af(me));return{center:ae(u.worldSize,g.add(C).div(2).sub(_e)),zoom:me,bearing:l}}class jn{get useGlobeControls(){return!1}handlePanInertia(e,i){return{easingOffset:e,easingCenter:i.center}}handleMapControlsRollPitchBearingZoom(e,i){e.bearingDelta&&i.setBearing(i.bearing+e.bearingDelta),e.pitchDelta&&i.setPitch(i.pitch+e.pitchDelta),e.rollDelta&&i.setRoll(i.roll+e.rollDelta),e.zoomDelta&&i.setZoom(i.zoom+e.zoomDelta)}handleMapControlsPan(e,i,l){e.around.distSqr(i.centerPoint)<.01||i.setLocationAtPoint(l,e.around)}cameraForBoxAndBearing(e,i,l,u,d){return Hn(e,i,l,u,d)}handleJumpToCenterZoom(e,i){e.zoom!==(i.zoom!==void 0?+i.zoom:e.zoom)&&e.setZoom(+i.zoom),i.center!==void 0&&e.setCenter(s.S.convert(i.center))}handleEaseTo(e,i){const l=e.zoom,u=e.padding,d={roll:e.roll,pitch:e.pitch,bearing:e.bearing},g={roll:i.roll===void 0?e.roll:i.roll,pitch:i.pitch===void 0?e.pitch:i.pitch,bearing:i.bearing===void 0?e.bearing:i.bearing},w=i.zoom!==void 0,C=!e.isPaddingEqual(i.padding);let P=!1;const E=w?+i.zoom:e.zoom;let R=e.centerPoint.add(i.offsetAsPoint);const D=e.screenPointToLocation(R),{center:N,zoom:G}=e.getConstrained(s.S.convert(i.center||D),E??l);bn(e,N);const te=Y(e.worldSize,D),ee=Y(e.worldSize,N).sub(te),ie=s.af(G-l);return P=G!==l,{easeFunc:ue=>{if(P&&e.setZoom(s.C.number(l,G,ue)),s.be(d,g)||fi({startEulerAngles:d,endEulerAngles:g,tr:e,k:ue,useSlerp:d.roll!=g.roll}),C&&(e.interpolatePadding(u,i.padding,ue),R=e.centerPoint.add(i.offsetAsPoint)),i.around)e.setLocationAtPoint(i.around,i.aroundPoint);else{const ve=s.af(e.zoom-l),me=G>l?Math.min(2,ie):Math.max(.5,ie),be=Math.pow(me,1-ue),Pe=ae(e.worldSize,te.add(ee.mult(ue*be)).mult(ve));e.setLocationAtPoint(e.renderWorldCopies?Pe.wrap():Pe,R)}},isZooming:P,elevationCenter:N}}handleFlyTo(e,i){const l=i.zoom!==void 0,u=e.zoom,d=e.getConstrained(s.S.convert(i.center||i.locationAtOffset),l?+i.zoom:u),g=d.center,w=d.zoom;bn(e,g);const C=Y(e.worldSize,i.locationAtOffset),P=Y(e.worldSize,g).sub(C),E=P.mag(),R=s.af(w-u);let D;if(i.minZoom!==void 0){const N=Math.min(+i.minZoom,u,w),G=e.getConstrained(g,N).zoom;D=s.af(G-u)}return{easeFunc:(N,G,te,ee)=>{e.setZoom(N===1?w:u+s.ak(G));const ie=N===1?g:ae(e.worldSize,C.add(P.mult(te)).mult(G));e.setLocationAtPoint(e.renderWorldCopies?ie.wrap():ie,ee)},scaleOfZoom:R,targetCenter:g,scaleOfMinZoom:D,pixelPathLength:E}}}class zn{constructor(e,i,l){this.blendFunction=e,this.blendColor=i,this.mask=l}}zn.Replace=[1,0],zn.disabled=new zn(zn.Replace,s.bf.transparent,[!1,!1,!1,!1]),zn.unblended=new zn(zn.Replace,s.bf.transparent,[!0,!0,!0,!0]),zn.alphaBlended=new zn([1,771],s.bf.transparent,[!0,!0,!0,!0]);const qa=2305;class Rr{constructor(e,i,l){this.enable=e,this.mode=i,this.frontFace=l}}Rr.disabled=new Rr(!1,1029,qa),Rr.backCCW=new Rr(!0,1029,qa),Rr.frontCCW=new Rr(!0,1028,qa);class $r{constructor(e,i,l){this.func=e,this.mask=i,this.range=l}}$r.ReadOnly=!1,$r.ReadWrite=!0,$r.disabled=new $r(519,$r.ReadOnly,[0,1]);const _a=7680;class cn{constructor(e,i,l,u,d,g){this.test=e,this.ref=i,this.mask=l,this.fail=u,this.depthFail=d,this.pass=g}}cn.disabled=new cn({func:519,mask:0},0,0,_a,_a,_a);const Li=new WeakMap;function ga(h){var e;if(Li.has(h))return Li.get(h);{const i=(e=h.getParameter(h.VERSION))===null||e===void 0?void 0:e.startsWith("WebGL 2.0");return Li.set(h,i),i}}class sa{get awaitingQuery(){return!!this._readbackQueue}constructor(e){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=e;const i=e.context,l=i.gl;this._texFormat=l.RGBA,this._texType=l.UNSIGNED_BYTE;const u=new s.aL;u.emplaceBack(-1,-1),u.emplaceBack(2,-1),u.emplaceBack(-1,2);const d=new s.aN;d.emplaceBack(0,1,2),this._fullscreenTriangle=new Tn(i.createVertexBuffer(u,nn.members),i.createIndexBuffer(d),s.aM.simpleSegment(0,0,u.length,d.length)),this._resultBuffer=new Uint8Array(4),i.activeTexture.set(l.TEXTURE1);const g=l.createTexture();l.bindTexture(l.TEXTURE_2D,g),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,l.NEAREST),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,l.NEAREST),l.texImage2D(l.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=i.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(g),ga(l)&&(this._pbo=l.createBuffer(),l.bindBuffer(l.PIXEL_PACK_BUFFER,this._pbo),l.bufferData(l.PIXEL_PACK_BUFFER,4,l.STREAM_READ),l.bindBuffer(l.PIXEL_PACK_BUFFER,null))}destroy(){const e=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),e.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(e,i){const l=this._updateCount;return this._readbackQueue?l>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():l>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(e,i),this._updateCount++,this._measuredError}_bindFramebuffer(){const e=this._cachedRenderContext.context,i=e.gl;e.activeTexture.set(i.TEXTURE1),i.bindTexture(i.TEXTURE_2D,this._fbo.colorAttachment.get()),e.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(e,i){const l=this._cachedRenderContext.context,u=l.gl;if(this._bindFramebuffer(),l.viewport.set([0,0,this._texWidth,this._texHeight]),l.clear({color:s.bf.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(l,u.TRIANGLES,$r.disabled,cn.disabled,zn.unblended,Rr.disabled,((d,g)=>({u_input:d,u_output_expected:g}))(e,i),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&ga(u)){u.bindBuffer(u.PIXEL_PACK_BUFFER,this._pbo),u.readBuffer(u.COLOR_ATTACHMENT0),u.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),u.bindBuffer(u.PIXEL_PACK_BUFFER,null);const d=u.fenceSync(u.SYNC_GPU_COMMANDS_COMPLETE,0);u.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:d}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){const e=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&ga(e)){const i=e.clientWaitSync(this._readbackQueue.sync,0,0);if(i===e.WAIT_FAILED)return s.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(i===e.TIMEOUT_EXPIRED)return;e.bindBuffer(e.PIXEL_PACK_BUFFER,this._pbo),e.getBufferSubData(e.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),e.bindBuffer(e.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),e.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=sa._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(e){let i=0;return i+=e[0]/256,i+=e[1]/65536,i+=e[2]/16777216,e[3]<127&&(i=-i),i/128}}const Ja=s.$/128;function Ms(h,e){const i=h.granularity!==void 0?Math.max(h.granularity,1):1,l=i+(h.generateBorders?2:0),u=i+(h.extendToNorthPole||h.generateBorders?1:0)+(h.extendToSouthPole||h.generateBorders?1:0),d=l+1,g=u+1,w=h.generateBorders?-1:0,C=h.generateBorders||h.extendToNorthPole?-1:0,P=i+(h.generateBorders?1:0),E=i+(h.generateBorders||h.extendToSouthPole?1:0),R=d*g,D=l*u*6,N=d*g>65536;if(N&&e==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");const G=N||e==="32bit",te=new Int16Array(2*R);let ee=0;for(let ve=C;ve<=E;ve++)for(let me=w;me<=P;me++){let be=me/i*s.$;me===-1&&(be=-Ja),me===i+1&&(be=s.$+Ja);let Pe=ve/i*s.$;ve===-1&&(Pe=h.extendToNorthPole?s.bh:-Ja),ve===i+1&&(Pe=h.extendToSouthPole?s.bi:s.$+Ja),te[ee++]=be,te[ee++]=Pe}const ie=G?new Uint32Array(D):new Uint16Array(D);let ue=0;for(let ve=0;ve0}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(e){this._mercatorProjection.updateGPUdependent(e),this._verticalPerspectiveProjection.updateGPUdependent(e)}getMeshFromTileID(e,i,l,u,d){return this.currentProjection.getMeshFromTileID(e,i,l,u,d)}setProjection(e){this._transitionable.setValue("type",(e==null?void 0:e.type)||"mercator")}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}setErrorQueryLatitudeDegrees(e){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(e),this._mercatorProjection.setErrorQueryLatitudeDegrees(e)}}function vl(h){const e=Qo(h.worldSize,h.center.lat);return 2*Math.PI*e}function Sa(h,e,i,l,u){const d=1/(1<1e-6){const l=h[0]/i,u=Math.acos(h[2]/i),d=(l>0?u:-u)/Math.PI*180;return new s.S(s.aO(d,-180,180),e)}return new s.S(0,e)}function Mo(h){return Math.cos(h*Math.PI/180)}function ei(h,e){const i=Mo(h),l=Mo(e);return s.ak(l/i)}function Fh(h,e){const i=h.rotate(e.bearingInRadians),l=e.zoom+ei(e.center.lat,0),u=s.bk(1/Mo(e.center.lat),1/Mo(Math.min(Math.abs(e.center.lat),60)),s.bn(l,7,3,0,1)),d=360/vl({worldSize:e.worldSize,center:{lat:e.center.lat}});return new s.S(e.center.lng-i.x*d*u,s.ah(e.center.lat+i.y*d,-s.ai,s.ai))}function As(h){const e=.5*h,i=Math.sin(e),l=Math.cos(e);return Math.log(i+l)-Math.log(l-i)}function Ec(h,e,i,l){const u=h.lat+i*l;if(Math.abs(i)>1){const d=(Math.sign(h.lat+i)!==Math.sign(h.lat)?-Math.abs(h.lat):Math.abs(h.lat))*Math.PI/180,g=Math.abs(h.lat+i)*Math.PI/180,w=As(d+l*(g-d)),C=As(d),P=As(g);return new s.S(h.lng+e*((w-C)/(P-C)),u)}return new s.S(h.lng+e*l,u)}class bp{constructor(e){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=e}swapBuffers(){if(!this._hadAnyChanges)return;const e=this._cachePrevious;this._cachePrevious=this._cache,this._cache=e,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(e,i,l,u){const d=`${e.z}_${e.x}_${e.y}_${u!=null&&u.terrain?"t":""}`,g=this._cache.get(d);if(g)return g;const w=this._cachePrevious.get(d);if(w)return this._cache.set(d,w),w;const C=this._boundingVolumeFactory(e,i,l,u);return this._cache.set(d,C),this._hadAnyChanges=!0,C}}class es{constructor(e,i,l,u){this.min=l,this.max=u,this.points=e,this.planes=i}static fromAabb(e,i){const l=[];for(let u=0;u<8;u++)l.push([1&~u?e[0]:i[0],(u>>1&1)==1?i[1]:e[1],(u>>2&1)==1?i[2]:e[2]]);return new es(l,[[-1,0,0,i[0]],[1,0,0,-e[0]],[0,-1,0,i[1]],[0,1,0,-e[1]],[0,0,-1,i[2]],[0,0,1,-e[2]]],e,i)}static fromCenterSizeAngles(e,i,l){const u=s.br([],l[0],l[1],l[2]),d=s.bs([],[i[0],0,0],u),g=s.bs([],[0,i[1],0],u),w=s.bs([],[0,0,i[2]],u),C=[...e],P=[...e];for(let R=0;R<8;R++)for(let D=0;D<3;D++){const N=e[D]+d[D]*(1&~R?-1:1)+g[D]*((R>>1&1)==1?1:-1)+w[D]*((R>>2&1)==1?1:-1);C[D]=Math.min(C[D],N),P[D]=Math.max(P[D],N)}const E=[];for(let R=0;R<8;R++){const D=[...e];s.aS(D,D,s.aR([],d,1&~R?-1:1)),s.aS(D,D,s.aR([],g,(R>>1&1)==1?1:-1)),s.aS(D,D,s.aR([],w,(R>>2&1)==1?1:-1)),E.push(D)}return new es(E,[[...d,-s.aX(d,E[0])],[...g,-s.aX(g,E[0])],[...w,-s.aX(w,E[0])],[-d[0],-d[1],-d[2],-s.aX(d,E[7])],[-g[0],-g[1],-g[2],-s.aX(g,E[7])],[-w[0],-w[1],-w[2],-s.aX(w,E[7])]],C,P)}intersectsFrustum(e){let i=!0;const l=this.points.length,u=this.planes.length,d=e.planes.length,g=e.points.length;for(let w=0;w=0&&P++}if(P===0)return 0;P=0&&P++}if(P===0)return 0}return 1}intersectsPlane(e){const i=this.points.length;let l=0;for(let u=0;u=0&&l++}return l===i?2:l===0?0:1}}function Di(h,e,i){const l=h-e;return l<0?-l:Math.max(0,l-i)}function Es(h,e,i,l,u){const d=h-i;let g;return g=d<0?Math.min(-d,1+d-u):d>1?Math.min(Math.max(d-u,0),1-d):0,Math.max(g,Di(e,l,u))}class Za{constructor(){this._boundingVolumeCache=new bp(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(e,i,l,u){const d=1<4}allowWorldCopies(){return!1}getTileBoundingVolume(e,i,l,u){return this._boundingVolumeCache.getTileBoundingVolume(e,i,l,u)}_computeTileBoundingVolume(e,i,l,u){var d,g;let w=0,C=0;if(u!=null&&u.terrain){const P=new s.Z(e.z,i,e.z,e.x,e.y),E=u.terrain.getMinMaxElevation(P);w=(d=E.minElevation)!==null&&d!==void 0?d:Math.min(0,l),C=(g=E.maxElevation)!==null&&g!==void 0?g:Math.max(0,l)}if(w/=s.bu,C/=s.bu,w+=1,C+=1,e.z<=0)return es.fromAabb([-C,-C,-C],[C,C,C]);if(e.z===1)return es.fromAabb([e.x===0?-C:0,e.y===0?0:-C,-C],[e.x===0?0:C,e.y===0?C:0,C]);{const P=[Sa(0,0,e.x,e.y,e.z),Sa(s.$,0,e.x,e.y,e.z),Sa(s.$,s.$,e.x,e.y,e.z),Sa(0,s.$,e.x,e.y,e.z)],E=[];for(const Xe of P)E.push(s.aR([],Xe,C));if(C!==w)for(const Xe of P)E.push(s.aR([],Xe,w));e.y===0&&E.push([0,1,0]),e.y===(1<=(1<{this._calcMatrices()},getConstrained:(e,i)=>this.getConstrained(e,i)}),this._coveringTilesDetailsProvider=new Za}clone(){const e=new Ls;return e.apply(this),e}apply(e,i){this._globeLatitudeErrorCorrectionRadians=i||0,this._helper.apply(e)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){const e=s.bp();return e[0]=this._cameraPosition[0],e[1]=this._cameraPosition[1],e[2]=this._cameraPosition[2],e}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(e){const{overscaledTileID:i,applyGlobeMatrix:l}=e,u=this._helper.getMercatorTileCoordinates(i);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:u,clippingPlane:this._cachedClippingPlane,projectionTransition:l?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(e){const i=this.pitchInRadians,l=this.cameraToCenterDistance/e,u=Math.sin(i)*l,d=Math.cos(i)*l+1,g=1/Math.sqrt(u*u+d*d)*1;let w=-u,C=d;const P=Math.sqrt(w*w+C*C);w/=P,C/=P;const E=[0,w,C];s.bw(E,E,[0,0,0],-this.bearingInRadians),s.bx(E,E,[0,0,0],-1*this.center.lat*Math.PI/180),s.by(E,E,[0,0,0],this.center.lng*Math.PI/180);const R=1/s.aZ(E);return s.aR(E,E,R),[...E,-g*R]}isLocationOccluded(e){return!this.isSurfacePointVisible(Ti(e))}transformLightDirection(e){const i=this._helper._center.lng*Math.PI/180,l=this._helper._center.lat*Math.PI/180,u=Math.cos(l),d=[Math.sin(i)*u,Math.sin(l),Math.cos(i)*u],g=[d[2],0,-d[0]],w=[0,0,0];s.aW(w,g,d),s.aV(g,g),s.aV(w,w);const C=[0,0,0];return s.aV(C,[g[0]*e[0]+w[0]*e[1]+d[0]*e[2],g[1]*e[0]+w[1]*e[1]+d[1]*e[2],g[2]*e[0]+w[2]*e[1]+d[2]*e[2]]),C}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(e,i,l){const u=(function(w,C,P){const E=1/(1<d&&(d=D),Nw&&(w=N)}const E=[P.lng+g,P.lat+C,P.lng+d,P.lat+w];return this.isSurfacePointOnScreen([0,1,0])&&(E[3]=90,E[0]=-180,E[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(E[1]=-90,E[0]=-180,E[2]=180),new _t(E)}getConstrained(e,i){const l=s.ah(e.lat,-s.ai,s.ai),u=s.ah(+i,this.minZoom+ei(0,l),this.maxZoom);return{center:new s.S(e.lng,l),zoom:u}}calculateCenterFromCameraLngLatAlt(e,i,l,u){return this._helper.calculateCenterFromCameraLngLatAlt(e,i,l,u)}setLocationAtPoint(e,i){const l=Ti(this.unprojectScreenPoint(i)),u=Ti(e),d=s.bp();s.bB(d);const g=s.bp();s.by(g,l,d,-this.center.lng*Math.PI/180),s.bx(g,g,d,this.center.lat*Math.PI/180);const w=u[0]*u[0]+u[2]*u[2],C=g[0]*g[0];if(w=-ie&&G<=ie,ve=ee>=-ie&&ee<=ie;let me,be;if(ue&&ve){const rt=this.center.lng*Math.PI/180,Ge=this.center.lat*Math.PI/180;s.bD(R,rt)+s.bD(G,Ge)=0}isSurfacePointOnScreen(e){if(!this.isSurfacePointVisible(e))return!1;const i=s.bv();return s.aw(i,[...e,1],this._globeViewProjMatrixNoCorrection),i[0]/=i[3],i[1]/=i[3],i[2]/=i[3],i[0]>-1&&i[0]<1&&i[1]>-1&&i[1]<1&&i[2]>-1&&i[2]<1}rayPlanetIntersection(e,i){const l=s.aX(e,i),u=s.bp(),d=s.bp();s.aR(d,i,l),s.aU(u,e,d);const g=1-s.aX(u,u);if(g<0)return null;const w=s.aX(e,e)-1,C=-l+(l<0?1:-1)*Math.sqrt(g),P=w/C,E=C;return{tMin:Math.min(P,E),tMax:Math.max(P,E)}}unprojectScreenPoint(e){const i=this._cameraPosition,l=this.getRayDirectionFromPixel(e),u=this.rayPlanetIntersection(i,l);if(u){const E=s.bp();s.aS(E,i,[l[0]*u.tMin,l[1]*u.tMin,l[2]*u.tMin]);const R=s.bp();return s.aV(R,E),ks(R)}const d=this._cachedClippingPlane,g=d[0]*l[0]+d[1]*l[1]+d[2]*l[2],w=-s.b1(d,i)/g,C=s.bp();if(w>0)s.aS(C,i,[l[0]*w,l[1]*w,l[2]*w]);else{const E=s.bp();s.aS(E,i,[2*l[0],2*l[1],2*l[2]]);const R=s.b1(this._cachedClippingPlane,E);s.aU(C,E,[this._cachedClippingPlane[0]*R,this._cachedClippingPlane[1]*R,this._cachedClippingPlane[2]*R])}const P=(function(E){const R=s.bp();return R[0]=E[0]*-E[3],R[1]=E[1]*-E[3],R[2]=E[2]*-E[3],{center:R,radius:Math.sqrt(1-E[3]*E[3])}})(d);return ks((function(E,R,D){const N=s.bp();s.aU(N,D,E);const G=s.bp();return s.bq(G,E,N,R/s.a$(N)),G})(P.center,P.radius,C))}getMatrixForModel(e,i){const l=s.S.convert(e),u=1/s.bu,d=s.b9();return s.bz(d,d,l.lng/180*Math.PI),s.b7(d,d,-l.lat/180*Math.PI),s.M(d,d,[0,0,1+i/s.bu]),s.b7(d,d,.5*Math.PI),s.N(d,d,[u,u,u]),d}getProjectionDataForCustomLayer(e=!0){const i=this.getProjectionData({overscaledTileID:new s.Z(0,0,0,0,0),applyGlobeMatrix:e});return i.tileMercatorCoords=[0,0,1,1],i}getFastPathSimpleProjectionMatrix(e){}}class Ds{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(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,i,l){return this._helper.interpolatePadding(e,i,l)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,i,l=!0){this._helper.resize(e,i,l)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}overrideNearFarZ(e,i){this._helper.overrideNearFarZ(e,i)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}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 nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(e,i){this._globeness=e,this._globeLatitudeErrorCorrectionRadians=i,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this._helper=new Sn({calcMatrices:()=>{this._calcMatrices()},getConstrained:(e,i)=>this.getConstrained(e,i)}),this._globeness=1,this._mercatorTransform=new an,this._verticalPerspectiveTransform=new Ls}clone(){const e=new Ds;return e._globeness=this._globeness,e._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,e.apply(this),e}apply(e){this._helper.apply(e),this._mercatorTransform.apply(this),this._verticalPerspectiveTransform.apply(this,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(e){const i=this._mercatorTransform.getProjectionData(e),l=this._verticalPerspectiveTransform.getProjectionData(e);return{mainMatrix:this.isGlobeRendering?l.mainMatrix:i.mainMatrix,clippingPlane:l.clippingPlane,tileMercatorCoords:l.tileMercatorCoords,projectionTransition:e.applyGlobeMatrix?this._globeness:0,fallbackMatrix:i.fallbackMatrix}}isLocationOccluded(e){return this.currentTransform.isLocationOccluded(e)}transformLightDirection(e){return this.currentTransform.transformLightDirection(e)}getPixelScale(){return s.bk(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return s.bk(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(e,i,l){const u=this._mercatorTransform.getPitchedTextCorrection(e,i,l),d=this._verticalPerspectiveTransform.getPitchedTextCorrection(e,i,l);return s.bk(u,d,this._globeness)}projectTileCoordinates(e,i,l,u){return this.currentTransform.projectTileCoordinates(e,i,l,u)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,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(e){return this.currentTransform.calculateFogMatrix(e)}getVisibleUnwrappedCoordinates(e){return this.currentTransform.getVisibleUnwrappedCoordinates(e)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(e){this._mercatorTransform.recalculateZoomAndCenter(e),this._verticalPerspectiveTransform.recalculateZoomAndCenter(e)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(e,i){return this.currentTransform.lngLatToCameraDepth(e,i)}populateCache(e){this._mercatorTransform.populateCache(e),this._verticalPerspectiveTransform.populateCache(e)}getBounds(){return this.currentTransform.getBounds()}getConstrained(e,i){return this.currentTransform.getConstrained(e,i)}calculateCenterFromCameraLngLatAlt(e,i,l,u){return this._helper.calculateCenterFromCameraLngLatAlt(e,i,l,u)}setLocationAtPoint(e,i){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(e,i),void this.apply(this._mercatorTransform);this._verticalPerspectiveTransform.setLocationAtPoint(e,i),this.apply(this._verticalPerspectiveTransform)}locationToScreenPoint(e,i){return this.currentTransform.locationToScreenPoint(e,i)}screenPointToMercatorCoordinate(e,i){return this.currentTransform.screenPointToMercatorCoordinate(e,i)}screenPointToLocation(e,i){return this.currentTransform.screenPointToLocation(e,i)}isPointOnMapSurface(e,i){return this.currentTransform.isPointOnMapSurface(e,i)}getRayDirectionFromPixel(e){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(e)}getMatrixForModel(e,i){return this.currentTransform.getMatrixForModel(e,i)}getProjectionDataForCustomLayer(e=!0){const i=this._mercatorTransform.getProjectionDataForCustomLayer(e);if(!this.isGlobeRendering)return i;const l=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(e);return l.fallbackMatrix=i.mainMatrix,l}getFastPathSimpleProjectionMatrix(e){return this.currentTransform.getFastPathSimpleProjectionMatrix(e)}}class ji{get useGlobeControls(){return!0}handlePanInertia(e,i){const l=Fh(e,i);return Math.abs(l.lng-i.center.lng)>180&&(l.lng=i.center.lng+179.5*Math.sign(l.lng-i.center.lng)),{easingCenter:l,easingOffset:new s.P(0,0)}}handleMapControlsRollPitchBearingZoom(e,i){const l=e.around,u=i.screenPointToLocation(l);e.bearingDelta&&i.setBearing(i.bearing+e.bearingDelta),e.pitchDelta&&i.setPitch(i.pitch+e.pitchDelta),e.rollDelta&&i.setRoll(i.roll+e.rollDelta);const d=i.zoom;e.zoomDelta&&i.setZoom(i.zoom+e.zoomDelta);const g=i.zoom-d;if(g===0)return;const w=s.bA(i.center.lng,u.lng),C=w/(Math.abs(w/180)+1),P=s.bA(i.center.lat,u.lat),E=i.getRayDirectionFromPixel(l),R=i.cameraPosition,D=-1*s.aX(R,E),N=s.bp();s.aS(N,R,[E[0]*D,E[1]*D,E[2]*D]);const G=s.aZ(N)-1,te=Math.exp(.5*-Math.max(G-.3,0)),ee=Qo(i.worldSize,i.center.lat)/Math.min(i.width,i.height),ie=s.bn(ee,.9,.5,1,.25),ue=(1-s.af(-g))*Math.min(te,ie),ve=i.center.lat,me=i.zoom,be=new s.S(i.center.lng+C*ue,s.ah(i.center.lat+P*ue,-s.ai,s.ai));i.setLocationAtPoint(u,l);const Pe=i.center,_e=s.bn(Math.abs(w),45,85,0,1),Be=s.bn(ee,.75,.35,0,1),rt=Math.pow(Math.max(_e,Be),.25),Ge=s.bA(Pe.lng,be.lng),Xe=s.bA(Pe.lat,be.lat);i.setCenter(new s.S(Pe.lng+Ge*rt,Pe.lat+Xe*rt).wrap()),i.setZoom(me+ei(ve,i.center.lat))}handleMapControlsPan(e,i,l){if(!e.panDelta)return;const u=i.center.lat,d=i.zoom;i.setCenter(Fh(e.panDelta,i).wrap()),i.setZoom(d+ei(u,i.center.lat))}cameraForBoxAndBearing(e,i,l,u,d){const g=Hn(e,i,l,u,d),w=i.left/d.width*2-1,C=(d.width-i.right)/d.width*2-1,P=i.top/d.height*-2+1,E=(d.height-i.bottom)/d.height*-2+1,R=s.bA(l.getWest(),l.getEast())<0,D=R?l.getEast():l.getWest(),N=R?l.getWest():l.getEast(),G=Math.max(l.getNorth(),l.getSouth()),te=Math.min(l.getNorth(),l.getSouth()),ee=D+.5*s.bA(D,N),ie=G+.5*s.bA(G,te),ue=d.clone();ue.setCenter(g.center),ue.setBearing(g.bearing),ue.setPitch(0),ue.setRoll(0),ue.setZoom(g.zoom);const ve=ue.modelViewProjectionMatrix,me=[Ti(l.getNorthWest()),Ti(l.getNorthEast()),Ti(l.getSouthWest()),Ti(l.getSouthEast()),Ti(new s.S(N,ie)),Ti(new s.S(D,ie)),Ti(new s.S(ee,G)),Ti(new s.S(ee,te))],be=Ti(g.center);let Pe=Number.POSITIVE_INFINITY;for(const _e of me)w<0&&(Pe=ji.getLesserNonNegativeNonNull(Pe,ji.solveVectorScale(_e,be,ve,"x",w))),C>0&&(Pe=ji.getLesserNonNegativeNonNull(Pe,ji.solveVectorScale(_e,be,ve,"x",C))),P>0&&(Pe=ji.getLesserNonNegativeNonNull(Pe,ji.solveVectorScale(_e,be,ve,"y",P))),E<0&&(Pe=ji.getLesserNonNegativeNonNull(Pe,ji.solveVectorScale(_e,be,ve,"y",E)));if(Number.isFinite(Pe)&&Pe!==0)return g.zoom=ue.zoom+s.ak(Pe),g;po()}handleJumpToCenterZoom(e,i){const l=e.center.lat,u=e.getConstrained(i.center?s.S.convert(i.center):e.center,e.zoom).center;e.setCenter(u.wrap());const d=i.zoom!==void 0?+i.zoom:e.zoom+ei(l,u.lat);e.zoom!==d&&e.setZoom(d)}handleEaseTo(e,i){const l=e.zoom,u=e.center,d=e.padding,g={roll:e.roll,pitch:e.pitch,bearing:e.bearing},w={roll:i.roll===void 0?e.roll:i.roll,pitch:i.pitch===void 0?e.pitch:i.pitch,bearing:i.bearing===void 0?e.bearing:i.bearing},C=i.zoom!==void 0,P=!e.isPaddingEqual(i.padding);let E=!1;const R=i.center?s.S.convert(i.center):u,D=e.getConstrained(R,l).center;bn(e,D);const N=e.clone();N.setCenter(D),N.setZoom(C?+i.zoom:l+ei(u.lat,R.lat)),N.setBearing(i.bearing);const G=new s.P(s.ah(e.centerPoint.x+i.offsetAsPoint.x,0,e.width),s.ah(e.centerPoint.y+i.offsetAsPoint.y,0,e.height));N.setLocationAtPoint(D,G);const te=(i.offset&&i.offsetAsPoint.mag())>0?N.center:D,ee=C?+i.zoom:l+ei(u.lat,te.lat),ie=l+ei(u.lat,0),ue=ee+ei(te.lat,0),ve=s.bA(u.lng,te.lng),me=s.bA(u.lat,te.lat),be=s.af(ue-ie);return E=ee!==l,{easeFunc:Pe=>{if(s.be(g,w)||fi({startEulerAngles:g,endEulerAngles:w,tr:e,k:Pe,useSlerp:g.roll!=w.roll}),P&&e.interpolatePadding(d,i.padding,Pe),i.around)s.w("Easing around a point is not supported under globe projection."),e.setLocationAtPoint(i.around,i.aroundPoint);else{const _e=ue>ie?Math.min(2,be):Math.max(.5,be),Be=Math.pow(_e,1-Pe),rt=Ec(u,ve,me,Pe*Be);e.setCenter(rt.wrap())}if(E){const _e=s.C.number(ie,ue,Pe)+ei(0,e.center.lat);e.setZoom(_e)}},isZooming:E,elevationCenter:te}}handleFlyTo(e,i){const l=i.zoom!==void 0,u=e.center,d=e.zoom,g=e.padding,w=!e.isPaddingEqual(i.padding),C=e.getConstrained(s.S.convert(i.center||i.locationAtOffset),d).center,P=l?+i.zoom:e.zoom+ei(e.center.lat,C.lat),E=e.clone();E.setCenter(C),E.setZoom(P),E.setBearing(i.bearing);const R=new s.P(s.ah(e.centerPoint.x+i.offsetAsPoint.x,0,e.width),s.ah(e.centerPoint.y+i.offsetAsPoint.y,0,e.height));E.setLocationAtPoint(C,R);const D=E.center;bn(e,D);const N=(function(me,be,Pe){const _e=Ti(be),Be=Ti(Pe),rt=s.aX(_e,Be),Ge=Math.acos(rt),Xe=vl(me);return Ge/(2*Math.PI)*Xe})(e,u,D),G=d+ei(u.lat,0),te=P+ei(D.lat,0),ee=s.af(te-G);let ie;if(typeof i.minZoom=="number"){const me=+i.minZoom+ei(D.lat,0),be=Math.min(me,G,te)+ei(0,D.lat),Pe=e.getConstrained(D,be).zoom+ei(D.lat,0);ie=s.af(Pe-G)}const ue=s.bA(u.lng,D.lng),ve=s.bA(u.lat,D.lat);return{easeFunc:(me,be,Pe,_e)=>{const Be=Ec(u,ue,ve,Pe);w&&e.interpolatePadding(g,i.padding,me);const rt=me===1?D:Be;e.setCenter(rt.wrap());const Ge=G+s.ak(be);e.setZoom(me===1?P:Ge+ei(0,rt.lat))},scaleOfZoom:ee,targetCenter:D,scaleOfMinZoom:ie,pixelPathLength:N}}static solveVectorScale(e,i,l,u,d){const g=u==="x"?[l[0],l[4],l[8],l[12]]:[l[1],l[5],l[9],l[13]],w=[l[3],l[7],l[11],l[15]],C=e[0]*g[0]+e[1]*g[1]+e[2]*g[2],P=e[0]*w[0]+e[1]*w[1]+e[2]*w[2],E=i[0]*g[0]+i[1]*g[1]+i[2]*g[2],R=i[0]*w[0]+i[1]*w[1]+i[2]*w[2];return E+d*P===C+d*R||w[3]*(C-E)+g[3]*(R-P)+C*R==E*P?null:(E+g[3]-d*R-d*w[3])/(E-C-d*R+d*P)}static getLesserNonNegativeNonNull(e,i){return i!==null&&i>=0&&is.y(h,e&&e.filter((i=>i.identifier!=="source.canvas"))),wp=s.bE();class zc extends s.E{constructor(e,i={}){super(),this._rtlPluginLoaded=()=>{for(const l in this.sourceCaches){const u=this.sourceCaches[l].getSource().type;u!=="vector"&&u!=="geojson"||this.sourceCaches[l].reload()}},this.map=e,this.dispatcher=new Dt(Pt(),e._getMapId()),this.dispatcher.registerMessageHandler("GG",((l,u)=>this.getGlyphs(l,u))),this.dispatcher.registerMessageHandler("GI",((l,u)=>this.getImages(l,u))),this.imageManager=new Qe,this.imageManager.setEventedParent(this),this.glyphManager=new Ue(e._requestManager,i.localIdeographFontFamily),this.lineAtlas=new oe(256,512),this.crossTileSymbolIndex=new ar,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new s.bF,this._loaded=!1,this._availableImages=[],this._globalState={},this._resetUpdates(),this.dispatcher.broadcast("SR",s.bG()),Ir().on(mr,this._rtlPluginLoaded),this.on("data",(l=>{if(l.dataType!=="source"||l.sourceDataType!=="metadata")return;const u=this.sourceCaches[l.sourceId];if(!u)return;const d=u.getSource();if(d&&d.vectorLayerIds)for(const g in this._layers){const w=this._layers[g];w.source===d.id&&this._validateLayer(w)}}))}setGlobalStateProperty(e,i){var l,u,d;this._checkLoaded();const g=i===null?(d=(u=(l=this.stylesheet.state)===null||l===void 0?void 0:l[e])===null||u===void 0?void 0:u.default)!==null&&d!==void 0?d:null:i;if(s.bH(g,this._globalState[e]))return this;this._globalState[e]=g;const w=this._findGlobalStateAffectedSources([e]);for(const C in this.sourceCaches)w.has(C)&&(this._reloadSource(C),this._changed=!0)}getGlobalState(){return this._globalState}setGlobalState(e){this._checkLoaded();const i=[];for(const u in e)!s.bH(this._globalState[u],e[u].default)&&(i.push(u),this._globalState[u]=e[u].default);const l=this._findGlobalStateAffectedSources(i);for(const u in this.sourceCaches)l.has(u)&&(this._reloadSource(u),this._changed=!0)}_findGlobalStateAffectedSources(e){if(e.length===0)return new Set;const i=new Set;for(const l in this._layers){const u=this._layers[l],d=u.getLayoutAffectingGlobalStateRefs();for(const g of e)d.has(g)&&i.add(u.source)}return i}loadURL(e,i={},l){this.fire(new s.l("dataloading",{dataType:"style"})),i.validate=typeof i.validate!="boolean"||i.validate;const u=this.map._requestManager.transformRequest(e,"Style");this._loadStyleRequest=new AbortController;const d=this._loadStyleRequest;s.j(u,this._loadStyleRequest).then((g=>{this._loadStyleRequest=null,this._load(g.data,i,l)})).catch((g=>{this._loadStyleRequest=null,g&&!d.signal.aborted&&this.fire(new s.k(g))}))}loadJSON(e,i={},l){this.fire(new s.l("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,ne.frameAsync(this._frameRequest).then((()=>{this._frameRequest=null,i.validate=i.validate!==!1,this._load(e,i,l)})).catch((()=>{}))}loadEmpty(){this.fire(new s.l("dataloading",{dataType:"style"})),this._load(wp,{validate:!1})}_load(e,i,l){var u,d,g;const w=i.transformStyle?i.transformStyle(l,e):e;if(!i.validate||!yl(this,s.z(w))){this._loaded=!0,this.stylesheet=w;for(const C in w.sources)this.addSource(C,w.sources[C],{validate:!1});w.sprite?this._loadSprite(w.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(w.glyphs),this._createLayers(),this.light=new Q(this.stylesheet.light),this._setProjectionInternal(((u=this.stylesheet.projection)===null||u===void 0?void 0:u.type)||"mercator"),this.sky=new he(this.stylesheet.sky),this.map.setTerrain((d=this.stylesheet.terrain)!==null&&d!==void 0?d:null),this.setGlobalState((g=this.stylesheet.state)!==null&&g!==void 0?g:null),this.fire(new s.l("data",{dataType:"style"})),this.fire(new s.l("style.load"))}}_createLayers(){const e=s.bI(this.stylesheet.layers);this.dispatcher.broadcast("SL",e),this._order=e.map((i=>i.id)),this._layers={},this._serializedLayers=null;for(const i of e){const l=s.bJ(i);l.setEventedParent(this,{layer:{id:i.id}}),this._layers[i.id]=l}}_loadSprite(e,i=!1,l=void 0){let u;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,(function(d,g,w,C){return s._(this,void 0,void 0,(function*(){const P=Je(d),E=w>1?"@2x":"",R={},D={};for(const{id:N,url:G}of P){const te=g.transformRequest(qe(G,E,".json"),"SpriteJSON");R[N]=s.j(te,C);const ee=g.transformRequest(qe(G,E,".png"),"SpriteImage");D[N]=Fe.getImage(ee,C)}return yield Promise.all([...Object.values(R),...Object.values(D)]),(function(N,G){return s._(this,void 0,void 0,(function*(){const te={};for(const ee in N){te[ee]={};const ie=ne.getImageCanvasContext((yield G[ee]).data),ue=(yield N[ee]).data;for(const ve in ue){const{width:me,height:be,x:Pe,y:_e,sdf:Be,pixelRatio:rt,stretchX:Ge,stretchY:Xe,content:tt,textFitWidth:jt,textFitHeight:Zt}=ue[ve];te[ee][ve]={data:null,pixelRatio:rt,sdf:Be,stretchX:Ge,stretchY:Xe,content:tt,textFitWidth:jt,textFitHeight:Zt,spriteData:{width:me,height:be,x:Pe,y:_e,context:ie}}}}return te}))})(R,D)}))})(e,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then((d=>{if(this._spriteRequest=null,d)for(const g in d){this._spritesImagesIds[g]=[];const w=this._spritesImagesIds[g]?this._spritesImagesIds[g].filter((C=>!(C in d))):[];for(const C of w)this.imageManager.removeImage(C),this._changedImages[C]=!0;for(const C in d[g]){const P=g==="default"?C:`${g}:${C}`;this._spritesImagesIds[g].push(P),P in this.imageManager.images?this.imageManager.updateImage(P,d[g][C],!1):this.imageManager.addImage(P,d[g][C]),i&&(this._changedImages[P]=!0)}}})).catch((d=>{this._spriteRequest=null,u=d,this.fire(new s.k(u))})).finally((()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),i&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new s.l("data",{dataType:"style"})),l&&l(u)}))}_unloadSprite(){for(const e of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(e),this._changedImages[e]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new s.l("data",{dataType:"style"}))}_validateLayer(e){const i=this.sourceCaches[e.source];if(!i)return;const l=e.sourceLayer;if(!l)return;const u=i.getSource();(u.type==="geojson"||u.vectorLayerIds&&u.vectorLayerIds.indexOf(l)===-1)&&this.fire(new s.k(new Error(`Source layer "${l}" does not exist on source "${u.id}" as specified by style layer "${e.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const e in this.sourceCaches)if(!this.sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(e,i=!1){const l=this._serializedAllLayers();if(!e||e.length===0)return Object.values(i?s.bK(l):l);const u=[];for(const d of e)if(l[d]){const g=i?s.bK(l[d]):l[d];u.push(g)}return u}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;e=this._serializedLayers={};const i=Object.keys(this._layers);for(const l of i){const u=this._layers[l];u.type!=="custom"&&(e[l]=u.serialize())}return e}hasTransitions(){var e,i,l;if(!((e=this.light)===null||e===void 0)&&e.hasTransition()||!((i=this.sky)===null||i===void 0)&&i.hasTransition()||!((l=this.projection)===null||l===void 0)&&l.hasTransition())return!0;for(const u in this.sourceCaches)if(this.sourceCaches[u].hasTransition())return!0;for(const u in this._layers)if(this._layers[u].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(e){if(!this._loaded)return;const i=this._changed;if(i){const u=Object.keys(this._updatedLayers),d=Object.keys(this._removedLayers);(u.length||d.length)&&this._updateWorkerLayers(u,d);for(const g in this._updatedSources){const w=this._updatedSources[g];if(w==="reload")this._reloadSource(g);else{if(w!=="clear")throw new Error(`Invalid action ${w}`);this._clearSource(g)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const g in this._updatedPaintProps)this._layers[g].updateTransitions(e);this.light.updateTransitions(e),this.sky.updateTransitions(e),this._resetUpdates()}const l={};for(const u in this.sourceCaches){const d=this.sourceCaches[u];l[u]=d.used,d.used=!1}for(const u of this._order){const d=this._layers[u];d.recalculate(e,this._availableImages),!d.isHidden(e.zoom)&&d.source&&(this.sourceCaches[d.source].used=!0)}for(const u in l){const d=this.sourceCaches[u];!!l[u]!=!!d.used&&d.fire(new s.l("data",{sourceDataType:"visibility",dataType:"source",sourceId:u}))}this.light.recalculate(e),this.sky.recalculate(e),this.projection.recalculate(e),this.z=e.zoom,i&&this.fire(new s.l("data",{dataType:"style"}))}_updateTilesForChangedImages(){const e=Object.keys(this._changedImages);if(e.length){for(const i in this.sourceCaches)this.sourceCaches[i].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const e in this.sourceCaches)this.sourceCaches[e].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(e,i){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(e,!1),removedIds:i})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(e,i={}){var l;this._checkLoaded();const u=this.serialize();if(e=i.transformStyle?i.transformStyle(u,e):e,((l=i.validate)===null||l===void 0||l)&&yl(this,s.z(e)))return!1;(e=s.bK(e)).layers=s.bI(e.layers);const d=s.bL(u,e),g=this._getOperationsToPerform(d);if(g.unimplemented.length>0)throw new Error(`Unimplemented: ${g.unimplemented.join(", ")}.`);if(g.operations.length===0)return!1;for(const w of g.operations)w();return this.stylesheet=e,this._serializedLayers=null,!0}_getOperationsToPerform(e){const i=[],l=[];for(const u of e)switch(u.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":i.push((()=>this.addLayer.apply(this,u.args)));break;case"removeLayer":i.push((()=>this.removeLayer.apply(this,u.args)));break;case"setPaintProperty":i.push((()=>this.setPaintProperty.apply(this,u.args)));break;case"setLayoutProperty":i.push((()=>this.setLayoutProperty.apply(this,u.args)));break;case"setFilter":i.push((()=>this.setFilter.apply(this,u.args)));break;case"addSource":i.push((()=>this.addSource.apply(this,u.args)));break;case"removeSource":i.push((()=>this.removeSource.apply(this,u.args)));break;case"setLayerZoomRange":i.push((()=>this.setLayerZoomRange.apply(this,u.args)));break;case"setLight":i.push((()=>this.setLight.apply(this,u.args)));break;case"setGeoJSONSourceData":i.push((()=>this.setGeoJSONSourceData.apply(this,u.args)));break;case"setGlyphs":i.push((()=>this.setGlyphs.apply(this,u.args)));break;case"setSprite":i.push((()=>this.setSprite.apply(this,u.args)));break;case"setTerrain":i.push((()=>this.map.setTerrain.apply(this,u.args)));break;case"setSky":i.push((()=>this.setSky.apply(this,u.args)));break;case"setProjection":this.setProjection.apply(this,u.args);break;case"setGlobalState":i.push((()=>this.setGlobalState.apply(this,u.args)));break;case"setTransition":i.push((()=>{}));break;default:l.push(u.command)}return{operations:i,unimplemented:l}}addImage(e,i){if(this.getImage(e))return this.fire(new s.k(new Error(`An image named "${e}" already exists.`)));this.imageManager.addImage(e,i),this._afterImageUpdated(e)}updateImage(e,i){this.imageManager.updateImage(e,i)}getImage(e){return this.imageManager.getImage(e)}removeImage(e){if(!this.getImage(e))return this.fire(new s.k(new Error(`An image named "${e}" does not exist.`)));this.imageManager.removeImage(e),this._afterImageUpdated(e)}_afterImageUpdated(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new s.l("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,i,l={}){if(this._checkLoaded(),this.sourceCaches[e]!==void 0)throw new Error(`Source "${e}" already exists.`);if(!i.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(i).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(i.type)>=0&&this._validate(s.z.source,`sources.${e}`,i,null,l))return;this.map&&this.map._collectResourceTiming&&(i.collectResourceTiming=!0);const u=this.sourceCaches[e]=new cr(e,i,this.dispatcher);u.style=this,u.setEventedParent(this,(()=>({isSourceLoaded:u.loaded(),source:u.serialize(),sourceId:e}))),u.onAdd(this.map),this._changed=!0}removeSource(e){if(this._checkLoaded(),this.sourceCaches[e]===void 0)throw new Error("There is no source with this ID");for(const l in this._layers)if(this._layers[l].source===e)return this.fire(new s.k(new Error(`Source "${e}" cannot be removed while layer "${l}" is using it.`)));const i=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],i.fire(new s.l("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),i.setEventedParent(null),i.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,i){if(this._checkLoaded(),this.sourceCaches[e]===void 0)throw new Error(`There is no source with this ID=${e}`);const l=this.sourceCaches[e].getSource();if(l.type!=="geojson")throw new Error(`geojsonSource.type is ${l.type}, which is !== 'geojson`);l.setData(i),this._changed=!0}getSource(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()}addLayer(e,i,l={}){this._checkLoaded();const u=e.id;if(this.getLayer(u))return void this.fire(new s.k(new Error(`Layer "${u}" already exists on this map.`)));let d;if(e.type==="custom"){if(yl(this,s.bM(e)))return;d=s.bJ(e)}else{if("source"in e&&typeof e.source=="object"&&(this.addSource(u,e.source),e=s.bK(e),e=s.e(e,{source:u})),this._validate(s.z.layer,`layers.${u}`,e,{arrayIndex:-1},l))return;d=s.bJ(e),this._validateLayer(d),d.setEventedParent(this,{layer:{id:u}})}const g=i?this._order.indexOf(i):this._order.length;if(i&&g===-1)this.fire(new s.k(new Error(`Cannot add layer "${u}" before non-existing layer "${i}".`)));else{if(this._order.splice(g,0,u),this._layerOrderChanged=!0,this._layers[u]=d,this._removedLayers[u]&&d.source&&d.type!=="custom"){const w=this._removedLayers[u];delete this._removedLayers[u],w.type!==d.type?this._updatedSources[d.source]="clear":(this._updatedSources[d.source]="reload",this.sourceCaches[d.source].pause())}this._updateLayer(d),d.onAdd&&d.onAdd(this.map)}}moveLayer(e,i){if(this._checkLoaded(),this._changed=!0,!this._layers[e])return void this.fire(new s.k(new Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));if(e===i)return;const l=this._order.indexOf(e);this._order.splice(l,1);const u=i?this._order.indexOf(i):this._order.length;i&&u===-1?this.fire(new s.k(new Error(`Cannot move layer "${e}" before non-existing layer "${i}".`))):(this._order.splice(u,0,e),this._layerOrderChanged=!0)}removeLayer(e){this._checkLoaded();const i=this._layers[e];if(!i)return void this.fire(new s.k(new Error(`Cannot remove non-existing layer "${e}".`)));i.setEventedParent(null);const l=this._order.indexOf(e);this._order.splice(l,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=i,delete this._layers[e],this._serializedLayers&&delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],i.onRemove&&i.onRemove(this.map)}getLayer(e){return this._layers[e]}getLayersOrder(){return[...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(e,i,l){this._checkLoaded();const u=this.getLayer(e);u?u.minzoom===i&&u.maxzoom===l||(i!=null&&(u.minzoom=i),l!=null&&(u.maxzoom=l),this._updateLayer(u)):this.fire(new s.k(new Error(`Cannot set the zoom range of non-existing layer "${e}".`)))}setFilter(e,i,l={}){this._checkLoaded();const u=this.getLayer(e);if(u){if(!s.bH(u.filter,i))return i==null?(u.setFilter(void 0),void this._updateLayer(u)):void(this._validate(s.z.filter,`layers.${u.id}.filter`,i,null,l)||(u.setFilter(s.bK(i)),this._updateLayer(u)))}else this.fire(new s.k(new Error(`Cannot filter non-existing layer "${e}".`)))}getFilter(e){return s.bK(this.getLayer(e).filter)}setLayoutProperty(e,i,l,u={}){this._checkLoaded();const d=this.getLayer(e);d?s.bH(d.getLayoutProperty(i),l)||(d.setLayoutProperty(i,l,u),this._updateLayer(d)):this.fire(new s.k(new Error(`Cannot style non-existing layer "${e}".`)))}getLayoutProperty(e,i){const l=this.getLayer(e);if(l)return l.getLayoutProperty(i);this.fire(new s.k(new Error(`Cannot get style of non-existing layer "${e}".`)))}setPaintProperty(e,i,l,u={}){this._checkLoaded();const d=this.getLayer(e);d?s.bH(d.getPaintProperty(i),l)||(d.setPaintProperty(i,l,u)&&this._updateLayer(d),this._changed=!0,this._updatedPaintProps[e]=!0,this._serializedLayers=null):this.fire(new s.k(new Error(`Cannot style non-existing layer "${e}".`)))}getPaintProperty(e,i){return this.getLayer(e).getPaintProperty(i)}setFeatureState(e,i){this._checkLoaded();const l=e.source,u=e.sourceLayer,d=this.sourceCaches[l];if(d===void 0)return void this.fire(new s.k(new Error(`The source '${l}' does not exist in the map's style.`)));const g=d.getSource().type;g==="geojson"&&u?this.fire(new s.k(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):g!=="vector"||u?(e.id===void 0&&this.fire(new s.k(new Error("The feature id parameter must be provided."))),d.setFeatureState(u,e.id,i)):this.fire(new s.k(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(e,i){this._checkLoaded();const l=e.source,u=this.sourceCaches[l];if(u===void 0)return void this.fire(new s.k(new Error(`The source '${l}' does not exist in the map's style.`)));const d=u.getSource().type,g=d==="vector"?e.sourceLayer:void 0;d!=="vector"||g?i&&typeof e.id!="string"&&typeof e.id!="number"?this.fire(new s.k(new Error("A feature id is required to remove its specific state property."))):u.removeFeatureState(g,e.id,i):this.fire(new s.k(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(e){this._checkLoaded();const i=e.source,l=e.sourceLayer,u=this.sourceCaches[i];if(u!==void 0)return u.getSource().type!=="vector"||l?(e.id===void 0&&this.fire(new s.k(new Error("The feature id parameter must be provided."))),u.getFeatureState(l,e.id)):void this.fire(new s.k(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new s.k(new Error(`The source '${i}' does not exist in the map's style.`)))}getTransition(){return s.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const e=s.bN(this.sourceCaches,(d=>d.serialize())),i=this._serializeByIds(this._order,!0),l=this.map.getTerrain()||void 0,u=this.stylesheet;return s.bO({version:u.version,name:u.name,metadata:u.metadata,light:u.light,sky:u.sky,center:u.center,zoom:u.zoom,bearing:u.bearing,pitch:u.pitch,sprite:u.sprite,glyphs:u.glyphs,transition:u.transition,projection:u.projection,sources:e,layers:i,terrain:l},(d=>d!==void 0))}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&this.sourceCaches[e.source].getSource().type!=="raster"&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(e){const i=g=>this._layers[g].type==="fill-extrusion",l={},u=[];for(let g=this._order.length-1;g>=0;g--){const w=this._order[g];if(i(w)){l[w]=g;for(const C of e){const P=C[w];if(P)for(const E of P)u.push(E)}}}u.sort(((g,w)=>w.intersectionZ-g.intersectionZ));const d=[];for(let g=this._order.length-1;g>=0;g--){const w=this._order[g];if(i(w))for(let C=u.length-1;C>=0;C--){const P=u[C].feature;if(l[P.layer.id]this.map.terrain.getElevation(E,R,D):void 0));return this.placement&&d.push((function(P,E,R,D,N,G,te){const ee={},ie=G.queryRenderedSymbols(D),ue=[];for(const ve of Object.keys(ie).map(Number))ue.push(te[ve]);ue.sort(xt);for(const ve of ue){const me=ve.featureIndex.lookupSymbolFeatures(ie[ve.bucketInstanceId],E,ve.bucketIndex,ve.sourceLayerIndex,N.filter,N.layers,N.availableImages,P);for(const be in me){const Pe=ee[be]=ee[be]||[],_e=me[be];_e.sort(((Be,rt)=>{const Ge=ve.featureSortOrder;if(Ge){const Xe=Ge.indexOf(Be.featureIndex);return Ge.indexOf(rt.featureIndex)-Xe}return rt.featureIndex-Be.featureIndex}));for(const Be of _e)Pe.push(Be)}}return(function(ve,me,be){for(const Pe in ve)for(const _e of ve[Pe])It(_e,be[me[Pe].source]);return ve})(ee,P,R)})(this._layers,g,this.sourceCaches,e,C,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(d)}querySourceFeatures(e,i){i&&i.filter&&this._validate(s.z.filter,"querySourceFeatures.filter",i.filter,null,i);const l=this.sourceCaches[e];return l?(function(u,d){const g=u.getRenderableIds().map((P=>u.getTileByID(P))),w=[],C={};for(let P=0;PD.getTileByID(N))).sort(((N,G)=>G.tileID.overscaledZ-N.tileID.overscaledZ||(N.tileID.isLessThan(G.tileID)?-1:1)))}const R=this.crossTileSymbolIndex.addLayer(E,C[E.source],e.center.lng);g=g||R}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((d=d||this._layerOrderChanged||l===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(ne.now(),e.zoom))&&(this.pauseablePlacement=new On(e,this.map.terrain,this._order,d,i,l,u,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,C),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(ne.now()),w=!0),g&&this.pauseablePlacement.placement.setStale()),w||g)for(const P of this._order){const E=this._layers[P];E.type==="symbol"&&this.placement.updateLayerOpacities(E,C[E.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(ne.now())}_releaseSymbolFadeTiles(){for(const e in this.sourceCaches)this.sourceCaches[e].releaseSymbolFadeTiles()}getImages(e,i){return s._(this,void 0,void 0,(function*(){const l=yield this.imageManager.getImages(i.icons);this._updateTilesForChangedImages();const u=this.sourceCaches[i.source];return u&&u.setDependencies(i.tileID.key,i.type,i.icons),l}))}getGlyphs(e,i){return s._(this,void 0,void 0,(function*(){const l=yield this.glyphManager.getGlyphs(i.stacks),u=this.sourceCaches[i.source];return u&&u.setDependencies(i.tileID.key,i.type,[""]),l}))}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(e,i={}){this._checkLoaded(),e&&this._validate(s.z.glyphs,"glyphs",e,null,i)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=e,this.glyphManager.entries={},this.glyphManager.setURL(e))}addSprite(e,i,l={},u){this._checkLoaded();const d=[{id:e,url:i}],g=[...Je(this.stylesheet.sprite),...d];this._validate(s.z.sprite,"sprite",g,null,l)||(this.stylesheet.sprite=g,this._loadSprite(d,!0,u))}removeSprite(e){this._checkLoaded();const i=Je(this.stylesheet.sprite);if(i.find((l=>l.id===e))){if(this._spritesImagesIds[e])for(const l of this._spritesImagesIds[e])this.imageManager.removeImage(l),this._changedImages[l]=!0;i.splice(i.findIndex((l=>l.id===e)),1),this.stylesheet.sprite=i.length>0?i:void 0,delete this._spritesImagesIds[e],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new s.l("data",{dataType:"style"}))}else this.fire(new s.k(new Error(`Sprite "${e}" doesn't exists on this map.`)))}getSprite(){return Je(this.stylesheet.sprite)}setSprite(e,i={},l){this._checkLoaded(),e&&this._validate(s.z.sprite,"sprite",e,null,i)||(this.stylesheet.sprite=e,e?this._loadSprite(e,!0,l):(this._unloadSprite(),l&&l(null)))}}var Tp=s.aJ([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Cp{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,i,l,u,d,g,w,C,P){this.context=e;let E=this.boundPaintVertexBuffers.length!==u.length;for(let R=0;!E&&R({u_texture:0,u_ele_delta:h,u_fog_matrix:e,u_fog_color:i?i.properties.get("fog-color"):s.bf.white,u_fog_ground_blend:i?i.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:u?0:i?i.calculateFogBlendOpacity(l):0,u_horizon_color:i?i.properties.get("horizon-color"):s.bf.white,u_horizon_fog_blend:i?i.properties.get("horizon-fog-blend"):1,u_is_globe_mode:u?1:0}),Lc={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(h){const e=[];for(let i=0;i({u_depth:new s.bP(Ge,Xe.u_depth),u_terrain:new s.bP(Ge,Xe.u_terrain),u_terrain_dim:new s.bg(Ge,Xe.u_terrain_dim),u_terrain_matrix:new s.bR(Ge,Xe.u_terrain_matrix),u_terrain_unpack:new s.bS(Ge,Xe.u_terrain_unpack),u_terrain_exaggeration:new s.bg(Ge,Xe.u_terrain_exaggeration)}))(e,rt),this.projectionUniforms=((Ge,Xe)=>({u_projection_matrix:new s.bR(Ge,Xe.u_projection_matrix),u_projection_tile_mercator_coords:new s.bS(Ge,Xe.u_projection_tile_mercator_coords),u_projection_clipping_plane:new s.bS(Ge,Xe.u_projection_clipping_plane),u_projection_transition:new s.bg(Ge,Xe.u_projection_transition),u_projection_fallback_matrix:new s.bR(Ge,Xe.u_projection_fallback_matrix)}))(e,rt),this.binderUniforms=l?l.getUniforms(e,rt):[]}draw(e,i,l,u,d,g,w,C,P,E,R,D,N,G,te,ee,ie,ue,ve){const me=e.gl;if(this.failedToCreate)return;if(e.program.set(this.program),e.setDepthMode(l),e.setStencilMode(u),e.setColorMode(d),e.setCullFace(g),C){e.activeTexture.set(me.TEXTURE2),me.bindTexture(me.TEXTURE_2D,C.depthTexture),e.activeTexture.set(me.TEXTURE3),me.bindTexture(me.TEXTURE_2D,C.texture);for(const Pe in this.terrainUniforms)this.terrainUniforms[Pe].set(C[Pe])}if(P)for(const Pe in P)this.projectionUniforms[Lc[Pe]].set(P[Pe]);if(w)for(const Pe in this.fixedUniforms)this.fixedUniforms[Pe].set(w[Pe]);ee&&ee.setUniforms(e,this.binderUniforms,G,{zoom:te});let be=0;switch(i){case me.LINES:be=2;break;case me.TRIANGLES:be=3;break;case me.LINE_STRIP:be=1}for(const Pe of N.get()){const _e=Pe.vaos||(Pe.vaos={});(_e[E]||(_e[E]=new Cp)).bind(e,this,R,ee?ee.getPaintVertexBuffers():[],D,Pe.vertexOffset,ie,ue,ve),me.drawElements(i,Pe.primitiveLength*be,me.UNSIGNED_SHORT,Pe.primitiveOffset*be*2)}}}function bl(h,e,i){const l=1/s.aC(i,1,e.transform.tileZoom),u=Math.pow(2,i.tileID.overscaledZ),d=i.tileSize*Math.pow(2,e.transform.tileZoom)/u,g=d*(i.tileID.canonical.x+i.tileID.wrap*u),w=d*i.tileID.canonical.y;return{u_image:0,u_texsize:i.imageAtlasTexture.size,u_scale:[l,h.fromScale,h.toScale],u_fade:h.t,u_pixel_coord_upper:[g>>16,w>>16],u_pixel_coord_lower:[65535&g,65535&w]}}const Pa=(h,e,i,l)=>{const u=h.style.light,d=u.properties.get("position"),g=[d.x,d.y,d.z],w=s.bV();u.properties.get("anchor")==="viewport"&&s.bW(w,h.transform.bearingInRadians),s.bX(g,g,w);const C=h.transform.transformLightDirection(g),P=u.properties.get("color");return{u_lightpos:g,u_lightpos_globe:C,u_lightintensity:u.properties.get("intensity"),u_lightcolor:[P.r,P.g,P.b],u_vertical_gradient:+e,u_opacity:i,u_fill_translate:l}},Sp=(h,e,i,l,u,d,g)=>s.e(Pa(h,e,i,l),bl(d,h,g),{u_height_factor:-Math.pow(2,u.overscaledZ)/g.tileSize/8}),wl=(h,e,i,l)=>s.e(bl(e,h,i),{u_fill_translate:l}),Rs=(h,e)=>({u_world:h,u_fill_translate:e}),Bs=(h,e,i,l,u)=>s.e(wl(h,e,i,u),{u_world:l}),Pp=(h,e,i,l,u)=>{const d=h.transform;let g,w,C=0;if(i.paint.get("circle-pitch-alignment")==="map"){const P=s.aC(e,1,d.zoom);g=!0,w=[P,P],C=P/(s.$*Math.pow(2,e.tileID.overscaledZ))*2*Math.PI*u}else g=!1,w=d.pixelsToGLUnits;return{u_camera_to_center_distance:d.cameraToCenterDistance,u_scale_with_map:+(i.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+g,u_device_pixel_ratio:h.pixelRatio,u_extrude_scale:w,u_globe_extrude_scale:C,u_translate:l}},Tl=h=>({u_pixel_extrude_scale:[1/h.width,1/h.height]}),Ip=h=>({u_viewport_size:[h.width,h.height]}),Ao=(h,e=1)=>({u_color:h,u_overlay:0,u_overlay_scale:e}),Nh=(h,e,i,l)=>{const u=s.aC(h,1,e)/(s.$*Math.pow(2,h.tileID.overscaledZ))*2*Math.PI*l;return{u_extrude_scale:s.aC(h,1,e),u_intensity:i,u_globe_extrude_scale:u}},Rc=(h,e,i,l)=>{const u=s.L();s.bY(u,0,h.width,h.height,0,0,1);const d=h.context.gl;return{u_matrix:u,u_world:[d.drawingBufferWidth,d.drawingBufferHeight],u_image:i,u_color_ramp:l,u_opacity:e.paint.get("heatmap-opacity")}},Mp=(h,e,i)=>{const l=i.paint.get("hillshade-accent-color");let u;switch(i.paint.get("hillshade-method")){case"basic":u=4;break;case"combined":u=1;break;case"igor":u=2;break;case"multidirectional":u=3;break;default:u=0}const d=i.getIlluminationProperties();for(let g=0;g{const i=e.stride,l=s.L();return s.bY(l,0,s.$,-s.$,0,0,1),s.M(l,l,[0,-s.$,0]),{u_matrix:l,u_image:1,u_dimension:[i,i],u_zoom:h.overscaledZ,u_unpack:e.getUnpackVector()}};function Bc(h,e){const i=Math.pow(2,e.canonical.z),l=e.canonical.y;return[new s.a1(0,l/i).toLngLat().lat,new s.a1(0,(l+1)/i).toLngLat().lat]}const Vh=(h,e,i=0)=>({u_image:0,u_unpack:e.getUnpackVector(),u_dimension:[e.stride,e.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:i,u_opacity:h.paint.get("color-relief-opacity")}),Cl=(h,e,i,l)=>{const u=h.transform;return{u_translation:Oc(h,e,i),u_ratio:l/s.aC(e,1,u.zoom),u_device_pixel_ratio:h.pixelRatio,u_units_to_pixels:[1/u.pixelsToGLUnits[0],1/u.pixelsToGLUnits[1]]}},qh=(h,e,i,l,u)=>s.e(Cl(h,e,i,l),{u_image:0,u_image_height:u}),Zh=(h,e,i,l,u)=>{const d=h.transform,g=Fc(e,d);return{u_translation:Oc(h,e,i),u_texsize:e.imageAtlasTexture.size,u_ratio:l/s.aC(e,1,d.zoom),u_device_pixel_ratio:h.pixelRatio,u_image:0,u_scale:[g,u.fromScale,u.toScale],u_fade:u.t,u_units_to_pixels:[1/d.pixelsToGLUnits[0],1/d.pixelsToGLUnits[1]]}},Eo=(h,e,i,l,u,d)=>{const g=h.lineAtlas,w=Fc(e,h.transform),C=i.layout.get("line-cap")==="round",P=g.getDash(u.from,C),E=g.getDash(u.to,C),R=P.width*d.fromScale,D=E.width*d.toScale;return s.e(Cl(h,e,i,l),{u_patternscale_a:[w/R,-P.height/2],u_patternscale_b:[w/D,-E.height/2],u_sdfgamma:g.width/(256*Math.min(R,D)*h.pixelRatio)/2,u_image:0,u_tex_y_a:P.y,u_tex_y_b:E.y,u_mix:d.t})};function Fc(h,e){return 1/s.aC(h,1,e.tileZoom)}function Oc(h,e,i){return s.aD(h.transform,e,i.paint.get("line-translate"),i.paint.get("line-translate-anchor"))}const Fs=(h,e,i,l,u)=>{return{u_tl_parent:h,u_scale_parent:e,u_buffer_scale:1,u_fade_t:i.mix,u_opacity:i.opacity*l.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:l.paint.get("raster-brightness-min"),u_brightness_high:l.paint.get("raster-brightness-max"),u_saturation_factor:(g=l.paint.get("raster-saturation"),g>0?1-1/(1.001-g):-g),u_contrast_factor:(d=l.paint.get("raster-contrast"),d>0?1/(1-d):1+d),u_spin_weights:kp(l.paint.get("raster-hue-rotate")),u_coords_top:[u[0].x,u[0].y,u[1].x,u[1].y],u_coords_bottom:[u[3].x,u[3].y,u[2].x,u[2].y]};var d,g};function kp(h){h*=Math.PI/180;const e=Math.sin(h),i=Math.cos(h);return[(2*i+1)/3,(-Math.sqrt(3)*e-i+1)/3,(Math.sqrt(3)*e-i+1)/3]}const Os=(h,e,i,l,u,d,g,w,C,P,E,R,D)=>{const N=g.transform;return{u_is_size_zoom_constant:+(h==="constant"||h==="source"),u_is_size_feature_constant:+(h==="constant"||h==="camera"),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:N.cameraToCenterDistance,u_pitch:N.pitch/360*2*Math.PI,u_rotate_symbol:+i,u_aspect_ratio:N.width/N.height,u_fade_change:g.options.fadeDuration?g.symbolFadeChange:1,u_label_plane_matrix:w,u_coord_matrix:C,u_is_text:+E,u_pitch_with_map:+l,u_is_along_line:u,u_is_variable_anchor:d,u_texsize:R,u_texture:0,u_translation:P,u_pitched_scale:D}},Uh=(h,e,i,l,u,d,g,w,C,P,E,R,D,N)=>{const G=g.transform;return s.e(Os(h,e,i,l,u,d,g,w,C,P,E,R,N),{u_gamma_scale:l?Math.cos(G.pitch*Math.PI/180)*G.cameraToCenterDistance:1,u_device_pixel_ratio:g.pixelRatio,u_is_halo:1})},Ap=(h,e,i,l,u,d,g,w,C,P,E,R,D)=>s.e(Uh(h,e,i,l,u,d,g,w,C,P,!0,E,0,D),{u_texsize_icon:R,u_texture_icon:1}),$h=(h,e)=>({u_opacity:h,u_color:e}),Gh=(h,e,i,l,u)=>s.e((function(d,g,w,C){const P=w.imageManager.getPattern(d.from.toString()),E=w.imageManager.getPattern(d.to.toString()),{width:R,height:D}=w.imageManager.getPixelSize(),N=Math.pow(2,C.tileID.overscaledZ),G=C.tileSize*Math.pow(2,w.transform.tileZoom)/N,te=G*(C.tileID.canonical.x+C.tileID.wrap*N),ee=G*C.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:P.tl,u_pattern_br_a:P.br,u_pattern_tl_b:E.tl,u_pattern_br_b:E.br,u_texsize:[R,D],u_mix:g.t,u_pattern_size_a:P.displaySize,u_pattern_size_b:E.displaySize,u_scale_a:g.fromScale,u_scale_b:g.toScale,u_tile_units_to_pixels:1/s.aC(C,1,w.transform.tileZoom),u_pixel_coord_upper:[te>>16,ee>>16],u_pixel_coord_lower:[65535&te,65535&ee]}})(i,u,e,l),{u_opacity:h}),Nc=(h,e)=>{},jc={fillExtrusion:(h,e)=>({u_lightpos:new s.bT(h,e.u_lightpos),u_lightpos_globe:new s.bT(h,e.u_lightpos_globe),u_lightintensity:new s.bg(h,e.u_lightintensity),u_lightcolor:new s.bT(h,e.u_lightcolor),u_vertical_gradient:new s.bg(h,e.u_vertical_gradient),u_opacity:new s.bg(h,e.u_opacity),u_fill_translate:new s.bU(h,e.u_fill_translate)}),fillExtrusionPattern:(h,e)=>({u_lightpos:new s.bT(h,e.u_lightpos),u_lightpos_globe:new s.bT(h,e.u_lightpos_globe),u_lightintensity:new s.bg(h,e.u_lightintensity),u_lightcolor:new s.bT(h,e.u_lightcolor),u_vertical_gradient:new s.bg(h,e.u_vertical_gradient),u_height_factor:new s.bg(h,e.u_height_factor),u_opacity:new s.bg(h,e.u_opacity),u_fill_translate:new s.bU(h,e.u_fill_translate),u_image:new s.bP(h,e.u_image),u_texsize:new s.bU(h,e.u_texsize),u_pixel_coord_upper:new s.bU(h,e.u_pixel_coord_upper),u_pixel_coord_lower:new s.bU(h,e.u_pixel_coord_lower),u_scale:new s.bT(h,e.u_scale),u_fade:new s.bg(h,e.u_fade)}),fill:(h,e)=>({u_fill_translate:new s.bU(h,e.u_fill_translate)}),fillPattern:(h,e)=>({u_image:new s.bP(h,e.u_image),u_texsize:new s.bU(h,e.u_texsize),u_pixel_coord_upper:new s.bU(h,e.u_pixel_coord_upper),u_pixel_coord_lower:new s.bU(h,e.u_pixel_coord_lower),u_scale:new s.bT(h,e.u_scale),u_fade:new s.bg(h,e.u_fade),u_fill_translate:new s.bU(h,e.u_fill_translate)}),fillOutline:(h,e)=>({u_world:new s.bU(h,e.u_world),u_fill_translate:new s.bU(h,e.u_fill_translate)}),fillOutlinePattern:(h,e)=>({u_world:new s.bU(h,e.u_world),u_image:new s.bP(h,e.u_image),u_texsize:new s.bU(h,e.u_texsize),u_pixel_coord_upper:new s.bU(h,e.u_pixel_coord_upper),u_pixel_coord_lower:new s.bU(h,e.u_pixel_coord_lower),u_scale:new s.bT(h,e.u_scale),u_fade:new s.bg(h,e.u_fade),u_fill_translate:new s.bU(h,e.u_fill_translate)}),circle:(h,e)=>({u_camera_to_center_distance:new s.bg(h,e.u_camera_to_center_distance),u_scale_with_map:new s.bP(h,e.u_scale_with_map),u_pitch_with_map:new s.bP(h,e.u_pitch_with_map),u_extrude_scale:new s.bU(h,e.u_extrude_scale),u_device_pixel_ratio:new s.bg(h,e.u_device_pixel_ratio),u_globe_extrude_scale:new s.bg(h,e.u_globe_extrude_scale),u_translate:new s.bU(h,e.u_translate)}),collisionBox:(h,e)=>({u_pixel_extrude_scale:new s.bU(h,e.u_pixel_extrude_scale)}),collisionCircle:(h,e)=>({u_viewport_size:new s.bU(h,e.u_viewport_size)}),debug:(h,e)=>({u_color:new s.bQ(h,e.u_color),u_overlay:new s.bP(h,e.u_overlay),u_overlay_scale:new s.bg(h,e.u_overlay_scale)}),depth:Nc,clippingMask:Nc,heatmap:(h,e)=>({u_extrude_scale:new s.bg(h,e.u_extrude_scale),u_intensity:new s.bg(h,e.u_intensity),u_globe_extrude_scale:new s.bg(h,e.u_globe_extrude_scale)}),heatmapTexture:(h,e)=>({u_matrix:new s.bR(h,e.u_matrix),u_world:new s.bU(h,e.u_world),u_image:new s.bP(h,e.u_image),u_color_ramp:new s.bP(h,e.u_color_ramp),u_opacity:new s.bg(h,e.u_opacity)}),hillshade:(h,e)=>({u_image:new s.bP(h,e.u_image),u_latrange:new s.bU(h,e.u_latrange),u_exaggeration:new s.bg(h,e.u_exaggeration),u_altitudes:new s.b_(h,e.u_altitudes),u_azimuths:new s.b_(h,e.u_azimuths),u_accent:new s.bQ(h,e.u_accent),u_method:new s.bP(h,e.u_method),u_shadows:new s.bZ(h,e.u_shadows),u_highlights:new s.bZ(h,e.u_highlights)}),hillshadePrepare:(h,e)=>({u_matrix:new s.bR(h,e.u_matrix),u_image:new s.bP(h,e.u_image),u_dimension:new s.bU(h,e.u_dimension),u_zoom:new s.bg(h,e.u_zoom),u_unpack:new s.bS(h,e.u_unpack)}),colorRelief:(h,e)=>({u_image:new s.bP(h,e.u_image),u_unpack:new s.bS(h,e.u_unpack),u_dimension:new s.bU(h,e.u_dimension),u_elevation_stops:new s.bP(h,e.u_elevation_stops),u_color_stops:new s.bP(h,e.u_color_stops),u_color_ramp_size:new s.bP(h,e.u_color_ramp_size),u_opacity:new s.bg(h,e.u_opacity)}),line:(h,e)=>({u_translation:new s.bU(h,e.u_translation),u_ratio:new s.bg(h,e.u_ratio),u_device_pixel_ratio:new s.bg(h,e.u_device_pixel_ratio),u_units_to_pixels:new s.bU(h,e.u_units_to_pixels)}),lineGradient:(h,e)=>({u_translation:new s.bU(h,e.u_translation),u_ratio:new s.bg(h,e.u_ratio),u_device_pixel_ratio:new s.bg(h,e.u_device_pixel_ratio),u_units_to_pixels:new s.bU(h,e.u_units_to_pixels),u_image:new s.bP(h,e.u_image),u_image_height:new s.bg(h,e.u_image_height)}),linePattern:(h,e)=>({u_translation:new s.bU(h,e.u_translation),u_texsize:new s.bU(h,e.u_texsize),u_ratio:new s.bg(h,e.u_ratio),u_device_pixel_ratio:new s.bg(h,e.u_device_pixel_ratio),u_image:new s.bP(h,e.u_image),u_units_to_pixels:new s.bU(h,e.u_units_to_pixels),u_scale:new s.bT(h,e.u_scale),u_fade:new s.bg(h,e.u_fade)}),lineSDF:(h,e)=>({u_translation:new s.bU(h,e.u_translation),u_ratio:new s.bg(h,e.u_ratio),u_device_pixel_ratio:new s.bg(h,e.u_device_pixel_ratio),u_units_to_pixels:new s.bU(h,e.u_units_to_pixels),u_patternscale_a:new s.bU(h,e.u_patternscale_a),u_patternscale_b:new s.bU(h,e.u_patternscale_b),u_sdfgamma:new s.bg(h,e.u_sdfgamma),u_image:new s.bP(h,e.u_image),u_tex_y_a:new s.bg(h,e.u_tex_y_a),u_tex_y_b:new s.bg(h,e.u_tex_y_b),u_mix:new s.bg(h,e.u_mix)}),raster:(h,e)=>({u_tl_parent:new s.bU(h,e.u_tl_parent),u_scale_parent:new s.bg(h,e.u_scale_parent),u_buffer_scale:new s.bg(h,e.u_buffer_scale),u_fade_t:new s.bg(h,e.u_fade_t),u_opacity:new s.bg(h,e.u_opacity),u_image0:new s.bP(h,e.u_image0),u_image1:new s.bP(h,e.u_image1),u_brightness_low:new s.bg(h,e.u_brightness_low),u_brightness_high:new s.bg(h,e.u_brightness_high),u_saturation_factor:new s.bg(h,e.u_saturation_factor),u_contrast_factor:new s.bg(h,e.u_contrast_factor),u_spin_weights:new s.bT(h,e.u_spin_weights),u_coords_top:new s.bS(h,e.u_coords_top),u_coords_bottom:new s.bS(h,e.u_coords_bottom)}),symbolIcon:(h,e)=>({u_is_size_zoom_constant:new s.bP(h,e.u_is_size_zoom_constant),u_is_size_feature_constant:new s.bP(h,e.u_is_size_feature_constant),u_size_t:new s.bg(h,e.u_size_t),u_size:new s.bg(h,e.u_size),u_camera_to_center_distance:new s.bg(h,e.u_camera_to_center_distance),u_pitch:new s.bg(h,e.u_pitch),u_rotate_symbol:new s.bP(h,e.u_rotate_symbol),u_aspect_ratio:new s.bg(h,e.u_aspect_ratio),u_fade_change:new s.bg(h,e.u_fade_change),u_label_plane_matrix:new s.bR(h,e.u_label_plane_matrix),u_coord_matrix:new s.bR(h,e.u_coord_matrix),u_is_text:new s.bP(h,e.u_is_text),u_pitch_with_map:new s.bP(h,e.u_pitch_with_map),u_is_along_line:new s.bP(h,e.u_is_along_line),u_is_variable_anchor:new s.bP(h,e.u_is_variable_anchor),u_texsize:new s.bU(h,e.u_texsize),u_texture:new s.bP(h,e.u_texture),u_translation:new s.bU(h,e.u_translation),u_pitched_scale:new s.bg(h,e.u_pitched_scale)}),symbolSDF:(h,e)=>({u_is_size_zoom_constant:new s.bP(h,e.u_is_size_zoom_constant),u_is_size_feature_constant:new s.bP(h,e.u_is_size_feature_constant),u_size_t:new s.bg(h,e.u_size_t),u_size:new s.bg(h,e.u_size),u_camera_to_center_distance:new s.bg(h,e.u_camera_to_center_distance),u_pitch:new s.bg(h,e.u_pitch),u_rotate_symbol:new s.bP(h,e.u_rotate_symbol),u_aspect_ratio:new s.bg(h,e.u_aspect_ratio),u_fade_change:new s.bg(h,e.u_fade_change),u_label_plane_matrix:new s.bR(h,e.u_label_plane_matrix),u_coord_matrix:new s.bR(h,e.u_coord_matrix),u_is_text:new s.bP(h,e.u_is_text),u_pitch_with_map:new s.bP(h,e.u_pitch_with_map),u_is_along_line:new s.bP(h,e.u_is_along_line),u_is_variable_anchor:new s.bP(h,e.u_is_variable_anchor),u_texsize:new s.bU(h,e.u_texsize),u_texture:new s.bP(h,e.u_texture),u_gamma_scale:new s.bg(h,e.u_gamma_scale),u_device_pixel_ratio:new s.bg(h,e.u_device_pixel_ratio),u_is_halo:new s.bP(h,e.u_is_halo),u_translation:new s.bU(h,e.u_translation),u_pitched_scale:new s.bg(h,e.u_pitched_scale)}),symbolTextAndIcon:(h,e)=>({u_is_size_zoom_constant:new s.bP(h,e.u_is_size_zoom_constant),u_is_size_feature_constant:new s.bP(h,e.u_is_size_feature_constant),u_size_t:new s.bg(h,e.u_size_t),u_size:new s.bg(h,e.u_size),u_camera_to_center_distance:new s.bg(h,e.u_camera_to_center_distance),u_pitch:new s.bg(h,e.u_pitch),u_rotate_symbol:new s.bP(h,e.u_rotate_symbol),u_aspect_ratio:new s.bg(h,e.u_aspect_ratio),u_fade_change:new s.bg(h,e.u_fade_change),u_label_plane_matrix:new s.bR(h,e.u_label_plane_matrix),u_coord_matrix:new s.bR(h,e.u_coord_matrix),u_is_text:new s.bP(h,e.u_is_text),u_pitch_with_map:new s.bP(h,e.u_pitch_with_map),u_is_along_line:new s.bP(h,e.u_is_along_line),u_is_variable_anchor:new s.bP(h,e.u_is_variable_anchor),u_texsize:new s.bU(h,e.u_texsize),u_texsize_icon:new s.bU(h,e.u_texsize_icon),u_texture:new s.bP(h,e.u_texture),u_texture_icon:new s.bP(h,e.u_texture_icon),u_gamma_scale:new s.bg(h,e.u_gamma_scale),u_device_pixel_ratio:new s.bg(h,e.u_device_pixel_ratio),u_is_halo:new s.bP(h,e.u_is_halo),u_translation:new s.bU(h,e.u_translation),u_pitched_scale:new s.bg(h,e.u_pitched_scale)}),background:(h,e)=>({u_opacity:new s.bg(h,e.u_opacity),u_color:new s.bQ(h,e.u_color)}),backgroundPattern:(h,e)=>({u_opacity:new s.bg(h,e.u_opacity),u_image:new s.bP(h,e.u_image),u_pattern_tl_a:new s.bU(h,e.u_pattern_tl_a),u_pattern_br_a:new s.bU(h,e.u_pattern_br_a),u_pattern_tl_b:new s.bU(h,e.u_pattern_tl_b),u_pattern_br_b:new s.bU(h,e.u_pattern_br_b),u_texsize:new s.bU(h,e.u_texsize),u_mix:new s.bg(h,e.u_mix),u_pattern_size_a:new s.bU(h,e.u_pattern_size_a),u_pattern_size_b:new s.bU(h,e.u_pattern_size_b),u_scale_a:new s.bg(h,e.u_scale_a),u_scale_b:new s.bg(h,e.u_scale_b),u_pixel_coord_upper:new s.bU(h,e.u_pixel_coord_upper),u_pixel_coord_lower:new s.bU(h,e.u_pixel_coord_lower),u_tile_units_to_pixels:new s.bg(h,e.u_tile_units_to_pixels)}),terrain:(h,e)=>({u_texture:new s.bP(h,e.u_texture),u_ele_delta:new s.bg(h,e.u_ele_delta),u_fog_matrix:new s.bR(h,e.u_fog_matrix),u_fog_color:new s.bQ(h,e.u_fog_color),u_fog_ground_blend:new s.bg(h,e.u_fog_ground_blend),u_fog_ground_blend_opacity:new s.bg(h,e.u_fog_ground_blend_opacity),u_horizon_color:new s.bQ(h,e.u_horizon_color),u_horizon_fog_blend:new s.bg(h,e.u_horizon_fog_blend),u_is_globe_mode:new s.bg(h,e.u_is_globe_mode)}),terrainDepth:(h,e)=>({u_ele_delta:new s.bg(h,e.u_ele_delta)}),terrainCoords:(h,e)=>({u_texture:new s.bP(h,e.u_texture),u_terrain_coords_id:new s.bg(h,e.u_terrain_coords_id),u_ele_delta:new s.bg(h,e.u_ele_delta)}),projectionErrorMeasurement:(h,e)=>({u_input:new s.bg(h,e.u_input),u_output_expected:new s.bg(h,e.u_output_expected)}),atmosphere:(h,e)=>({u_sun_pos:new s.bT(h,e.u_sun_pos),u_atmosphere_blend:new s.bg(h,e.u_atmosphere_blend),u_globe_position:new s.bT(h,e.u_globe_position),u_globe_radius:new s.bg(h,e.u_globe_radius),u_inv_proj_matrix:new s.bR(h,e.u_inv_proj_matrix)}),sky:(h,e)=>({u_sky_color:new s.bQ(h,e.u_sky_color),u_horizon_color:new s.bQ(h,e.u_horizon_color),u_horizon:new s.bU(h,e.u_horizon),u_horizon_normal:new s.bU(h,e.u_horizon_normal),u_sky_horizon_blend:new s.bg(h,e.u_sky_horizon_blend),u_sky_blend:new s.bg(h,e.u_sky_blend)})};class Hh{constructor(e,i,l){this.context=e;const u=e.gl;this.buffer=u.createBuffer(),this.dynamicDraw=!!l,this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),u.bufferData(u.ELEMENT_ARRAY_BUFFER,i.arrayBuffer,this.dynamicDraw?u.DYNAMIC_DRAW:u.STATIC_DRAW),this.dynamicDraw||delete i.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){const i=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),i.bufferSubData(i.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Sl={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class eo{constructor(e,i,l,u){this.length=i.length,this.attributes=l,this.itemSize=i.bytesPerElement,this.dynamicDraw=u,this.context=e;const d=e.gl;this.buffer=d.createBuffer(),e.bindVertexBuffer.set(this.buffer),d.bufferData(d.ARRAY_BUFFER,i.arrayBuffer,this.dynamicDraw?d.DYNAMIC_DRAW:d.STATIC_DRAW),this.dynamicDraw||delete i.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(e){if(e.length!==this.length)throw new Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`);const i=this.context.gl;this.bind(),i.bufferSubData(i.ARRAY_BUFFER,0,e.arrayBuffer)}enableAttributes(e,i){for(let l=0;l0&&(P.push({circleArray:be,circleOffset:R,coord:ue}),E+=be.length/4,R=E),me&&C.draw(d,w.LINES,$r.disabled,cn.disabled,h.colorModeForRenderPass(),Rr.disabled,Tl(h.transform),h.style.map.terrain&&h.style.map.terrain.getTerrainData(ue),g.getProjectionData({overscaledTileID:ue,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),i.id,me.layoutVertexBuffer,me.indexBuffer,me.segments,null,h.transform.zoom,null,null,me.collisionVertexBuffer)}if(!u||!P.length)return;const D=h.useProgram("collisionCircle"),N=new s.b$;N.resize(4*E),N._trim();let G=0;for(const ie of P)for(let ue=0;ue=0&&(te[ie.associatedIconIndex]={shiftedAnchor:Tt,angle:gr})}else sn(ie.numGlyphs,N)}if(C){G.clear();const ee=h.icon.placedSymbolArray;for(let ie=0;ieh.style.map.terrain.getElevation(Ge,ba,ci):null,_i=i.layout.get("text-rotation-alignment")==="map";Yr(tt,h,u,$i,za,ie,P,_i,Ge.toUnwrapped(),te.width,te.height,vo,li)}const qo=u&&_e||Vo,ta=ue||qo?Fp:ie?$i:h.transform.clipSpaceToPixelsMatrix,La=Tt&&i.paint.get(u?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let Gi;Gi=Tt?tt.iconsInText?Ap(gr.kind,Rn,ve,ie,ue,qo,h,ta,go,vo,Wn,si,rt):Uh(gr.kind,Rn,ve,ie,ue,qo,h,ta,go,vo,u,Wn,0,rt):Os(gr.kind,Rn,ve,ie,ue,qo,h,ta,go,vo,u,Wn,rt);const yo={program:An,buffers:jt,uniformValues:Gi,projectionData:fs,atlasTexture:Jn,atlasTextureIcon:mi,atlasInterpolation:Kr,atlasInterpolationIcon:Bn,isSDF:Tt,hasHalo:La};if(me&&tt.canOverlap){be=!0;const li=jt.segments.get();for(const _i of li)Be.push({segments:new s.aM([_i]),sortKey:_i.sortKey,state:yo,terrainData:Ln})}else Be.push({segments:jt.segments,sortKey:0,state:yo,terrainData:Ln})}be&&Be.sort(((Ge,Xe)=>Ge.sortKey-Xe.sortKey));for(const Ge of Be){const Xe=Ge.state;if(N.activeTexture.set(G.TEXTURE0),Xe.atlasTexture.bind(Xe.atlasInterpolation,G.CLAMP_TO_EDGE),Xe.atlasTextureIcon&&(N.activeTexture.set(G.TEXTURE1),Xe.atlasTextureIcon&&Xe.atlasTextureIcon.bind(Xe.atlasInterpolationIcon,G.CLAMP_TO_EDGE)),Xe.isSDF){const tt=Xe.uniformValues;Xe.hasHalo&&(tt.u_is_halo=1,Zs(Xe.buffers,Ge.segments,i,h,Xe.program,Pe,E,R,tt,Xe.projectionData,Ge.terrainData)),tt.u_is_halo=0}Zs(Xe.buffers,Ge.segments,i,h,Xe.program,Pe,E,R,Xe.uniformValues,Xe.projectionData,Ge.terrainData)}}function Zs(h,e,i,l,u,d,g,w,C,P,E){const R=l.context;u.draw(R,R.gl.TRIANGLES,d,g,w,Rr.backCCW,C,E,P,i.id,h.layoutVertexBuffer,h.indexBuffer,e,i.paint,l.transform.zoom,h.programConfigurations.get(i.id),h.dynamicLayoutVertexBuffer,h.opacityVertexBuffer)}function Xc(h,e,i,l,u){const d=h.context,g=d.gl,w=cn.disabled,C=new zn([g.ONE,g.ONE],s.bf.transparent,[!0,!0,!0,!0]),P=e.getBucket(i);if(!P)return;const E=l.key;let R=i.heatmapFbos.get(E);R||(R=Us(d,e.tileSize,e.tileSize),i.heatmapFbos.set(E,R)),d.bindFramebuffer.set(R.framebuffer),d.viewport.set([0,0,e.tileSize,e.tileSize]),d.clear({color:s.bf.transparent});const D=P.programConfigurations.get(i.id),N=h.useProgram("heatmap",D,!u),G=h.transform.getProjectionData({overscaledTileID:e.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),te=h.style.map.terrain.getTerrainData(l);N.draw(d,g.TRIANGLES,$r.disabled,w,C,Rr.disabled,Nh(e,h.transform.zoom,i.paint.get("heatmap-intensity"),1),te,G,i.id,P.layoutVertexBuffer,P.indexBuffer,P.segments,i.paint,h.transform.zoom,D)}function id(h,e,i,l,u){const d=h.context,g=d.gl,w=h.transform;d.setColorMode(h.colorModeForRenderPass());const C=$s(d,e),P=i.key,E=e.heatmapFbos.get(P);if(!E)return;d.activeTexture.set(g.TEXTURE0),g.bindTexture(g.TEXTURE_2D,E.colorAttachment.get()),d.activeTexture.set(g.TEXTURE1),C.bind(g.LINEAR,g.CLAMP_TO_EDGE);const R=w.getProjectionData({overscaledTileID:i,applyTerrainMatrix:u,applyGlobeMatrix:!l});h.useProgram("heatmapTexture").draw(d,g.TRIANGLES,$r.disabled,cn.disabled,h.colorModeForRenderPass(),Rr.disabled,Rc(h,e,0,1),null,R,e.id,h.rasterBoundsBuffer,h.quadTriangleIndexBuffer,h.rasterBoundsSegments,e.paint,w.zoom),E.destroy(),e.heatmapFbos.delete(P)}function Us(h,e,i){var l,u;const d=h.gl,g=d.createTexture();d.bindTexture(d.TEXTURE_2D,g),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR);const w=(l=h.HALF_FLOAT)!==null&&l!==void 0?l:d.UNSIGNED_BYTE,C=(u=h.RGBA16F)!==null&&u!==void 0?u:d.RGBA;d.texImage2D(d.TEXTURE_2D,0,C,e,i,0,d.RGBA,w,null);const P=h.createFramebuffer(e,i,!1,!1);return P.colorAttachment.set(g),P}function $s(h,e){return e.colorRampTexture||(e.colorRampTexture=new s.T(h,e.colorRamp,h.gl.RGBA)),e.colorRampTexture}function Gs(h,e,i,l,u){if(!i||!l||!l.imageAtlas)return;const d=l.imageAtlas.patternPositions;let g=d[i.to.toString()],w=d[i.from.toString()];if(!g&&w&&(g=w),!w&&g&&(w=g),!g||!w){const C=u.getPaintProperty(e);g=d[C],w=d[C]}g&&w&&h.setConstantPatternPositions(g,w)}function Ll(h,e,i,l,u,d,g,w){const C=h.context.gl,P="fill-pattern",E=i.paint.get(P),R=E&&E.constantOr(1),D=i.getCrossfadeParameters();let N,G,te,ee,ie;const ue=h.transform,ve=i.paint.get("fill-translate"),me=i.paint.get("fill-translate-anchor");g?(G=R&&!i.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",N=C.LINES):(G=R?"fillPattern":"fill",N=C.TRIANGLES);const be=E.constantOr(null);for(const Pe of l){const _e=e.getTile(Pe);if(R&&!_e.patternsLoaded())continue;const Be=_e.getBucket(i);if(!Be)continue;const rt=Be.programConfigurations.get(i.id),Ge=h.useProgram(G,rt),Xe=h.style.map.terrain&&h.style.map.terrain.getTerrainData(Pe);R&&(h.context.activeTexture.set(C.TEXTURE0),_e.imageAtlasTexture.bind(C.LINEAR,C.CLAMP_TO_EDGE),rt.updatePaintBuffers(D)),Gs(rt,P,be,_e,i);const tt=ue.getProjectionData({overscaledTileID:Pe,applyGlobeMatrix:!w,applyTerrainMatrix:!0}),jt=s.aD(ue,_e,ve,me);if(g){ee=Be.indexBuffer2,ie=Be.segments2;const Tt=[C.drawingBufferWidth,C.drawingBufferHeight];te=G==="fillOutlinePattern"&&R?Bs(h,D,_e,Tt,jt):Rs(Tt,jt)}else ee=Be.indexBuffer,ie=Be.segments,te=R?wl(h,D,_e,jt):{u_fill_translate:jt};const Zt=h.stencilModeForClipping(Pe);Ge.draw(h.context,N,u,Zt,d,Rr.backCCW,te,Xe,tt,i.id,Be.layoutVertexBuffer,ee,ie,i.paint,h.transform.zoom,rt)}}function Yc(h,e,i,l,u,d,g,w){const C=h.context,P=C.gl,E="fill-extrusion-pattern",R=i.paint.get(E),D=R.constantOr(1),N=i.getCrossfadeParameters(),G=i.paint.get("fill-extrusion-opacity"),te=R.constantOr(null),ee=h.transform;for(const ie of l){const ue=e.getTile(ie),ve=ue.getBucket(i);if(!ve)continue;const me=h.style.map.terrain&&h.style.map.terrain.getTerrainData(ie),be=ve.programConfigurations.get(i.id),Pe=h.useProgram(D?"fillExtrusionPattern":"fillExtrusion",be);D&&(h.context.activeTexture.set(P.TEXTURE0),ue.imageAtlasTexture.bind(P.LINEAR,P.CLAMP_TO_EDGE),be.updatePaintBuffers(N));const _e=ee.getProjectionData({overscaledTileID:ie,applyGlobeMatrix:!w,applyTerrainMatrix:!0});Gs(be,E,te,ue,i);const Be=s.aD(ee,ue,i.paint.get("fill-extrusion-translate"),i.paint.get("fill-extrusion-translate-anchor")),rt=i.paint.get("fill-extrusion-vertical-gradient"),Ge=D?Sp(h,rt,G,Be,ie,N,ue):Pa(h,rt,G,Be);Pe.draw(C,C.gl.TRIANGLES,u,d,g,Rr.backCCW,Ge,me,_e,i.id,ve.layoutVertexBuffer,ve.indexBuffer,ve.segments,i.paint,h.transform.zoom,be,h.style.map.terrain&&ve.centroidVertexBuffer)}}function Ro(h,e,i,l,u,d,g,w,C){var P;const E=h.style.projection,R=h.context,D=h.transform,N=R.gl,G=[`#define NUM_ILLUMINATION_SOURCES ${i.paint.get("hillshade-highlight-color").values.length}`],te=h.useProgram("hillshade",null,!1,G),ee=!h.options.moving;for(const ie of l){const ue=e.getTile(ie),ve=ue.fbo;if(!ve)continue;const me=E.getMeshFromTileID(R,ie.canonical,w,!0,"raster"),be=(P=h.style.map.terrain)===null||P===void 0?void 0:P.getTerrainData(ie);R.activeTexture.set(N.TEXTURE0),N.bindTexture(N.TEXTURE_2D,ve.colorAttachment.get());const Pe=D.getProjectionData({overscaledTileID:ie,aligned:ee,applyGlobeMatrix:!C,applyTerrainMatrix:!0});te.draw(R,N.TRIANGLES,d,u[ie.overscaledZ],g,Rr.backCCW,Mp(h,ue,i),be,Pe,i.id,me.vertexBuffer,me.indexBuffer,me.segments)}}function Kc(h,e,i,l,u,d,g,w,C){var P;const E=h.style.projection,R=h.context,D=h.transform,N=R.gl,G=h.useProgram("colorRelief"),te=!h.options.moving;let ee=!0,ie=0;for(const ue of l){const ve=e.getTile(ue),me=ve.dem;if(ee){const Ge=N.getParameter(N.MAX_TEXTURE_SIZE),{elevationTexture:Xe,colorTexture:tt}=i.getColorRampTextures(R,Ge,me.getUnpackVector());R.activeTexture.set(N.TEXTURE1),Xe.bind(N.NEAREST,N.CLAMP_TO_EDGE),R.activeTexture.set(N.TEXTURE4),tt.bind(N.LINEAR,N.CLAMP_TO_EDGE),ee=!1,ie=Xe.size[0]}if(!me||!me.data)continue;const be=me.stride,Pe=me.getPixels();if(R.activeTexture.set(N.TEXTURE0),R.pixelStoreUnpackPremultiplyAlpha.set(!1),ve.demTexture=ve.demTexture||h.getTileTexture(be),ve.demTexture){const Ge=ve.demTexture;Ge.update(Pe,{premultiply:!1}),Ge.bind(N.LINEAR,N.CLAMP_TO_EDGE)}else ve.demTexture=new s.T(R,Pe,N.RGBA,{premultiply:!1}),ve.demTexture.bind(N.LINEAR,N.CLAMP_TO_EDGE);const _e=E.getMeshFromTileID(R,ue.canonical,w,!0,"raster"),Be=(P=h.style.map.terrain)===null||P===void 0?void 0:P.getTerrainData(ue),rt=D.getProjectionData({overscaledTileID:ue,aligned:te,applyGlobeMatrix:!C,applyTerrainMatrix:!0});G.draw(R,N.TRIANGLES,d,u[ue.overscaledZ],g,Rr.backCCW,Vh(i,ve.dem,ie),Be,rt,i.id,_e.vertexBuffer,_e.indexBuffer,_e.segments)}}const Dl=[new s.P(0,0),new s.P(s.$,0),new s.P(s.$,s.$),new s.P(0,s.$)];function Bo(h,e,i,l,u,d,g,w,C=!1,P=!1){const E=l[l.length-1].overscaledZ,R=h.context,D=R.gl,N=h.useProgram("raster"),G=h.transform,te=h.style.projection,ee=h.colorModeForRenderPass(),ie=!h.options.moving;for(const ue of l){const ve=h.getDepthModeForSublayer(ue.overscaledZ-E,i.paint.get("raster-opacity")===1?$r.ReadWrite:$r.ReadOnly,D.LESS),me=e.getTile(ue);me.registerFadeDuration(i.paint.get("raster-fade-duration"));const be=e.findLoadedParent(ue,0),Pe=e.findLoadedSibling(ue),_e=Jc(me,be||Pe||null,e,i,h.transform,h.style.map.terrain);let Be,rt;const Ge=i.paint.get("raster-resampling")==="nearest"?D.NEAREST:D.LINEAR;R.activeTexture.set(D.TEXTURE0),me.texture.bind(Ge,D.CLAMP_TO_EDGE,D.LINEAR_MIPMAP_NEAREST),R.activeTexture.set(D.TEXTURE1),be?(be.texture.bind(Ge,D.CLAMP_TO_EDGE,D.LINEAR_MIPMAP_NEAREST),Be=Math.pow(2,be.tileID.overscaledZ-me.tileID.overscaledZ),rt=[me.tileID.canonical.x*Be%1,me.tileID.canonical.y*Be%1]):me.texture.bind(Ge,D.CLAMP_TO_EDGE,D.LINEAR_MIPMAP_NEAREST),me.texture.useMipmap&&R.extTextureFilterAnisotropic&&h.transform.pitch>20&&D.texParameterf(D.TEXTURE_2D,R.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,R.extTextureFilterAnisotropicMax);const Xe=h.style.map.terrain&&h.style.map.terrain.getTerrainData(ue),tt=G.getProjectionData({overscaledTileID:ue,aligned:ie,applyGlobeMatrix:!P,applyTerrainMatrix:!0}),jt=Fs(rt||[0,0],Be||1,_e,i,w),Zt=te.getMeshFromTileID(R,ue.canonical,d,g,"raster");N.draw(R,D.TRIANGLES,ve,u?u[ue.overscaledZ]:cn.disabled,ee,C?Rr.frontCCW:Rr.backCCW,jt,Xe,tt,i.id,Zt.vertexBuffer,Zt.indexBuffer,Zt.segments)}}function Jc(h,e,i,l,u,d){const g=l.paint.get("raster-fade-duration");if(!d&&g>0){const w=ne.now(),C=(w-h.timeAdded)/g,P=e?(w-e.timeAdded)/g:-1,E=i.getSource(),R=kt(u,{tileSize:E.tileSize,roundZoom:E.roundZoom}),D=!e||Math.abs(e.tileID.overscaledZ-R)>Math.abs(h.tileID.overscaledZ-R),N=D&&h.refreshedUponExpiration?1:s.ah(D?C:1-P,0,1);return h.refreshedUponExpiration&&C>=1&&(h.refreshedUponExpiration=!1),e?{opacity:1,mix:1-N}:{opacity:N,mix:0}}return{opacity:1,mix:0}}const ad=new s.bf(1,0,0,1),od=new s.bf(0,1,0,1),Rl=new s.bf(0,0,1,1),Qc=new s.bf(1,0,1,1),Np=new s.bf(0,1,1,1);function eu(h,e,i,l){Ua(h,0,e+i/2,h.transform.width,i,l)}function Kn(h,e,i,l){Ua(h,e-i/2,0,i,h.transform.height,l)}function Ua(h,e,i,l,u,d){const g=h.context,w=g.gl;w.enable(w.SCISSOR_TEST),w.scissor(e*h.pixelRatio,i*h.pixelRatio,l*h.pixelRatio,u*h.pixelRatio),g.clear({color:d}),w.disable(w.SCISSOR_TEST)}function ya(h,e,i){const l=h.context,u=l.gl,d=h.useProgram("debug"),g=$r.disabled,w=cn.disabled,C=h.colorModeForRenderPass(),P="$debug",E=h.style.map.terrain&&h.style.map.terrain.getTerrainData(i);l.activeTexture.set(u.TEXTURE0);const R=e.getTileByID(i.key).latestRawTileData,D=Math.floor((R&&R.byteLength||0)/1024),N=e.getTile(i).tileSize,G=512/Math.min(N,512)*(i.overscaledZ/h.transform.zoom)*.5;let te=i.canonical.toString();i.overscaledZ!==i.canonical.z&&(te+=` => ${i.overscaledZ}`),(function(ie,ue){ie.initDebugOverlayCanvas();const ve=ie.debugOverlayCanvas,me=ie.context.gl,be=ie.debugOverlayCanvas.getContext("2d");be.clearRect(0,0,ve.width,ve.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(ue,5,5),be.strokeText(ue,5,5),ie.debugOverlayTexture.update(ve),ie.debugOverlayTexture.bind(me.LINEAR,me.CLAMP_TO_EDGE)})(h,`${te} ${D}kB`);const ee=h.transform.getProjectionData({overscaledTileID:i,applyGlobeMatrix:!0,applyTerrainMatrix:!0});d.draw(l,u.TRIANGLES,g,w,zn.alphaBlended,Rr.disabled,Ao(s.bf.transparent,G),null,ee,P,h.debugBuffer,h.quadTriangleIndexBuffer,h.debugSegments),d.draw(l,u.LINE_STRIP,g,w,C,Rr.disabled,Ao(s.bf.red),E,ee,P,h.debugBuffer,h.tileBorderIndexBuffer,h.debugSegments)}function Bl(h,e,i,l){const{isRenderingGlobe:u}=l,d=h.context,g=d.gl,w=h.transform,C=h.colorModeForRenderPass(),P=h.getDepthModeFor3D(),E=h.useProgram("terrain");d.bindFramebuffer.set(null),d.viewport.set([0,0,h.width,h.height]);for(const R of i){const D=e.getTerrainMesh(R.tileID),N=h.renderToTexture.getTexture(R),G=e.getTerrainData(R.tileID);d.activeTexture.set(g.TEXTURE0),g.bindTexture(g.TEXTURE_2D,N.texture);const te=e.getMeshFrameDelta(w.zoom),ee=w.calculateFogMatrix(R.tileID.toUnwrapped()),ie=xl(te,ee,h.style.sky,w.pitch,u),ue=w.getProjectionData({overscaledTileID:R.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});E.draw(d,g.TRIANGLES,P,cn.disabled,C,Rr.backCCW,ie,G,ue,"terrain",D.vertexBuffer,D.indexBuffer,D.segments)}}function Hs(h,e){if(!e.mesh){const i=new s.aL;i.emplaceBack(-1,-1),i.emplaceBack(1,-1),i.emplaceBack(1,1),i.emplaceBack(-1,1);const l=new s.aN;l.emplaceBack(0,1,2),l.emplaceBack(0,2,3),e.mesh=new Tn(h.createVertexBuffer(i,nn.members),h.createIndexBuffer(l),s.aM.simpleSegment(0,0,i.length,l.length))}return e.mesh}class sd{constructor(e,i){this.context=new td(e),this.transform=i,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:s.ag(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=cr.maxUnderzooming+cr.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new ar}resize(e,i,l){if(this.width=Math.floor(e*l),this.height=Math.floor(i*l),this.pixelRatio=l,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const u of this.style._order)this.style._layers[u].resize()}setup(){const e=this.context,i=new s.aL;i.emplaceBack(0,0),i.emplaceBack(s.$,0),i.emplaceBack(0,s.$),i.emplaceBack(s.$,s.$),this.tileExtentBuffer=e.createVertexBuffer(i,nn.members),this.tileExtentSegments=s.aM.simpleSegment(0,0,4,2);const l=new s.aL;l.emplaceBack(0,0),l.emplaceBack(s.$,0),l.emplaceBack(0,s.$),l.emplaceBack(s.$,s.$),this.debugBuffer=e.createVertexBuffer(l,nn.members),this.debugSegments=s.aM.simpleSegment(0,0,4,5);const u=new s.c6;u.emplaceBack(0,0,0,0),u.emplaceBack(s.$,0,s.$,0),u.emplaceBack(0,s.$,0,s.$),u.emplaceBack(s.$,s.$,s.$,s.$),this.rasterBoundsBuffer=e.createVertexBuffer(u,Tp.members),this.rasterBoundsSegments=s.aM.simpleSegment(0,0,4,2);const d=new s.aL;d.emplaceBack(0,0),d.emplaceBack(s.$,0),d.emplaceBack(0,s.$),d.emplaceBack(s.$,s.$),this.rasterBoundsBufferPosOnly=e.createVertexBuffer(d,nn.members),this.rasterBoundsSegmentsPosOnly=s.aM.simpleSegment(0,0,4,5);const g=new s.aL;g.emplaceBack(0,0),g.emplaceBack(1,0),g.emplaceBack(0,1),g.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(g,nn.members),this.viewportSegments=s.aM.simpleSegment(0,0,4,2);const w=new s.c7;w.emplaceBack(0),w.emplaceBack(1),w.emplaceBack(3),w.emplaceBack(2),w.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(w);const C=new s.aN;C.emplaceBack(1,0,2),C.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(C);const P=this.context.gl;this.stencilClearMode=new cn({func:P.ALWAYS,mask:0},0,255,P.ZERO,P.ZERO,P.ZERO),this.tileExtentMesh=new Tn(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){const e=this.context,i=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const l=s.L();s.bY(l,0,this.width,this.height,0,0,1),s.N(l,l,[i.drawingBufferWidth,i.drawingBufferHeight,0]);const u={mainMatrix:l,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:l};this.useProgram("clippingMask",null,!0).draw(e,i.TRIANGLES,$r.disabled,this.stencilClearMode,zn.disabled,Rr.disabled,null,null,u,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(e,i,l){if(this.currentStencilSource===e.source||!e.isTileClipped()||!i||!i.length)return;this.currentStencilSource=e.source,this.nextStencilID+i.length>256&&this.clearStencil();const u=this.context;u.setColorMode(zn.disabled),u.setDepthMode($r.disabled);const d={};for(const g of i)d[g.key]=this.nextStencilID++;this._renderTileMasks(d,i,l,!0),this._renderTileMasks(d,i,l,!1),this._tileClippingMaskIDs=d}_renderTileMasks(e,i,l,u){const d=this.context,g=d.gl,w=this.style.projection,C=this.transform,P=this.useProgram("clippingMask");for(const E of i){const R=e[E.key],D=this.style.map.terrain&&this.style.map.terrain.getTerrainData(E),N=w.getMeshFromTileID(this.context,E.canonical,u,!0,"stencil"),G=C.getProjectionData({overscaledTileID:E,applyGlobeMatrix:!l,applyTerrainMatrix:!0});P.draw(d,g.TRIANGLES,$r.disabled,new cn({func:g.ALWAYS,mask:0},R,255,g.KEEP,g.KEEP,g.REPLACE),zn.disabled,l?Rr.disabled:Rr.backCCW,null,D,G,"$clipping",N.vertexBuffer,N.indexBuffer,N.segments)}}_renderTilesDepthBuffer(){const e=this.context,i=e.gl,l=this.style.projection,u=this.transform,d=this.useProgram("depth"),g=this.getDepthModeFor3D(),w=xe(u,{tileSize:u.tileSize});for(const C of w){const P=this.style.map.terrain&&this.style.map.terrain.getTerrainData(C),E=l.getMeshFromTileID(this.context,C.canonical,!0,!0,"raster"),R=u.getProjectionData({overscaledTileID:C,applyGlobeMatrix:!0,applyTerrainMatrix:!0});d.draw(e,i.TRIANGLES,g,cn.disabled,zn.disabled,Rr.backCCW,null,P,R,"$clipping",E.vertexBuffer,E.indexBuffer,E.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const e=this.nextStencilID++,i=this.context.gl;return new cn({func:i.NOTEQUAL,mask:255},e,255,i.KEEP,i.KEEP,i.REPLACE)}stencilModeForClipping(e){const i=this.context.gl;return new cn({func:i.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,i.KEEP,i.KEEP,i.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(e){const i=this.context.gl,l=e.sort(((g,w)=>w.overscaledZ-g.overscaledZ)),u=l[l.length-1].overscaledZ,d=l[0].overscaledZ-u+1;if(d>1){this.currentStencilSource=void 0,this.nextStencilID+d>256&&this.clearStencil();const g={};for(let w=0;ww.overscaledZ-g.overscaledZ)),u=l[l.length-1].overscaledZ,d=l[0].overscaledZ-u+1;if(this.clearStencil(),d>1){const g={},w={};for(let C=0;C0};for(const D in g){const N=g[D];N.used&&N.prepare(this.context),w[D]=N.getVisibleCoordinates(!1),C[D]=w[D].slice().reverse(),P[D]=N.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let D=0;Dthis.useProgram(D)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:i.showOverdrawInspector?s.bf.black:s.bf.transparent,depth:1}),this.clearStencil(),this.style.sky&&(function(D,N){const G=D.context,te=G.gl,ee=((Pe,_e,Be)=>{const rt=Math.cos(_e.rollInRadians),Ge=Math.sin(_e.rollInRadians),Xe=fe(_e),tt=_e.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:Pe.properties.get("sky-color"),u_horizon_color:Pe.properties.get("horizon-color"),u_horizon:[(_e.width/2-Xe*Ge)*Be,(_e.height/2+Xe*rt)*Be],u_horizon_normal:[-Ge,rt],u_sky_horizon_blend:Pe.properties.get("sky-horizon-blend")*_e.height/2*Be,u_sky_blend:tt}})(N,D.style.map.transform,D.pixelRatio),ie=new $r(te.LEQUAL,$r.ReadWrite,[0,1]),ue=cn.disabled,ve=D.colorModeForRenderPass(),me=D.useProgram("sky"),be=Hs(G,N);me.draw(G,te.TRIANGLES,ie,ue,ve,Rr.disabled,ee,null,void 0,"sky",be.vertexBuffer,be.indexBuffer,be.segments)})(this,this.style.sky),this._showOverdrawInspector=i.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=d.length-1;this.currentLayer>=0;this.currentLayer--){const D=this.style._layers[d[this.currentLayer]],N=g[D.source],G=w[D.source];this._renderTileClippingMasks(D,G,!1),this.renderLayer(this,N,D,G,E)}this.renderPass="translucent";let R=!1;for(this.currentLayer=0;this.currentLayer({u_sun_pos:tt,u_atmosphere_blend:jt,u_globe_position:Zt,u_globe_radius:Tt,u_inv_proj_matrix:gr}))(me,Pe,[rt[0],rt[1],rt[2]],_e,Be),Xe=Hs(te,N);ie.draw(te,ee.TRIANGLES,ue,cn.disabled,zn.alphaBlended,Rr.disabled,Ge,null,null,"atmosphere",Xe.vertexBuffer,Xe.indexBuffer,Xe.segments)})(this,this.style.sky,this.style.light),this.options.showTileBoundaries){const D=(function(N,G){let te=null;const ee=Object.values(N._layers).flatMap((me=>me.source&&!me.isHidden(G)?[N.sourceCaches[me.source]]:[])),ie=ee.filter((me=>me.getSource().type==="vector")),ue=ee.filter((me=>me.getSource().type!=="vector")),ve=me=>{(!te||te.getSource().maxzoomve(me))),te||ue.forEach((me=>ve(me))),te})(this.style,this.transform.zoom);D&&(function(N,G,te){for(let ee=0;eert.getElevation(tt,Wn,Jn):null;Wc(Zt,Ge,Xe,_e,Be,Jr,Rn,Tt,An,s.aD(Be,jt,be,Pe),tt.toUnwrapped(),Ln)}}})(P,g,C,w,C.layout.get("text-rotation-alignment"),C.layout.get("text-pitch-alignment"),C.paint.get("text-translate"),C.paint.get("text-translate-anchor"),E),C.paint.get("icon-opacity").constantOr(1)!==0&&qs(g,w,C,P,!1,C.paint.get("icon-translate"),C.paint.get("icon-translate-anchor"),C.layout.get("icon-rotation-alignment"),C.layout.get("icon-pitch-alignment"),C.layout.get("icon-keep-upright"),N,G,D),C.paint.get("text-opacity").constantOr(1)!==0&&qs(g,w,C,P,!0,C.paint.get("text-translate"),C.paint.get("text-translate-anchor"),C.layout.get("text-rotation-alignment"),C.layout.get("text-pitch-alignment"),C.layout.get("text-keep-upright"),N,G,D),w.map.showCollisionBoxes&&(rd(g,w,C,P,!0),rd(g,w,C,P,!1))})(e,i,l,u,this.style.placement.variableOffsets,d):s.cc(l)?(function(g,w,C,P,E){if(g.renderPass!=="translucent")return;const{isRenderingToTexture:R}=E,D=C.paint.get("circle-opacity"),N=C.paint.get("circle-stroke-width"),G=C.paint.get("circle-stroke-opacity"),te=!C.layout.get("circle-sort-key").isConstant();if(D.constantOr(1)===0&&(N.constantOr(1)===0||G.constantOr(1)===0))return;const ee=g.context,ie=ee.gl,ue=g.transform,ve=g.getDepthModeForSublayer(0,$r.ReadOnly),me=cn.disabled,be=g.colorModeForRenderPass(),Pe=[],_e=ue.getCircleRadiusCorrection();for(let Be=0;BeBe.sortKey-rt.sortKey));for(const Be of Pe){const{programConfiguration:rt,program:Ge,layoutVertexBuffer:Xe,indexBuffer:tt,uniformValues:jt,terrainData:Zt,projectionData:Tt}=Be.state;Ge.draw(ee,ie.TRIANGLES,ve,me,be,Rr.backCCW,jt,Zt,Tt,C.id,Xe,tt,Be.segments,C.paint,g.transform.zoom,rt)}})(e,i,l,u,d):s.cd(l)?(function(g,w,C,P,E){if(C.paint.get("heatmap-opacity")===0)return;const R=g.context,{isRenderingToTexture:D,isRenderingGlobe:N}=E;if(g.style.map.terrain){for(const G of P){const te=w.getTile(G);w.hasRenderableParent(G)||(g.renderPass==="offscreen"?Xc(g,te,C,G,N):g.renderPass==="translucent"&&id(g,C,G,D,N))}R.viewport.set([0,0,g.width,g.height])}else g.renderPass==="offscreen"?(function(G,te,ee,ie){const ue=G.context,ve=ue.gl,me=G.transform,be=cn.disabled,Pe=new zn([ve.ONE,ve.ONE],s.bf.transparent,[!0,!0,!0,!0]);(function(_e,Be,rt){const Ge=_e.gl;_e.activeTexture.set(Ge.TEXTURE1),_e.viewport.set([0,0,Be.width/4,Be.height/4]);let Xe=rt.heatmapFbos.get(s.c2);Xe?(Ge.bindTexture(Ge.TEXTURE_2D,Xe.colorAttachment.get()),_e.bindFramebuffer.set(Xe.framebuffer)):(Xe=Us(_e,Be.width/4,Be.height/4),rt.heatmapFbos.set(s.c2,Xe))})(ue,G,ee),ue.clear({color:s.bf.transparent});for(let _e=0;_e0?i.pop():null}isPatternMissing(e){if(!e)return!1;if(!e.from||!e.to)return!0;const i=this.imageManager.getPattern(e.from.toString()),l=this.imageManager.getPattern(e.to.toString());return!i||!l}useProgram(e,i,l=!1,u=[]){this.cache=this.cache||{};const d=!!this.style.map.terrain,g=this.style.projection,w=l?Ur.projectionMercator:g.shaderPreludeCode,C=l?Cn:g.shaderDefine,P=e+(i?i.cacheKey:"")+`/${l?Gn:g.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(d?"/terrain":"")+(u?`/${u.join("/")}`:"");return this.cache[P]||(this.cache[P]=new Dc(this.context,Ur[e],i,jc[e],this._showOverdrawInspector,d,w,C,u)),this.cache[P]}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 e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new s.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:e,drawingBufferHeight:i}=this.context.gl;return this.width!==e||this.height!==i}}function Fo(h,e){let i,l=!1,u=null,d=null;const g=()=>{u=null,l&&(h.apply(d,i),u=setTimeout(g,e),l=!1)};return(...w)=>(l=!0,d=this,i=w,u||g(),u)}class Fl{constructor(e){this._getCurrentHash=()=>{const i=window.location.hash.replace("#","");if(this._hashName){let l;return i.split("&").map((u=>u.split("="))).forEach((u=>{u[0]===this._hashName&&(l=u)})),(l&&l[1]||"").split("/")}return i.split("/")},this._onHashChange=()=>{const i=this._getCurrentHash();if(!this._isValidHash(i))return!1;const l=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(i[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+i[2],+i[1]],zoom:+i[0],bearing:l,pitch:+(i[4]||0)}),!0},this._updateHashUnthrottled=()=>{const i=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,i)},this._removeHash=()=>{const i=this._getCurrentHash();if(i.length===0)return;const l=i.join("/");let u=l;u.split("&").length>0&&(u=u.split("&")[0]),this._hashName&&(u=`${this._hashName}=${l}`);let d=window.location.hash.replace(u,"");d.startsWith("#&")?d=d.slice(0,1)+d.slice(2):d==="#"&&(d="");let g=window.location.href.replace(/(#.+)?$/,d);g=g.replace("&&","&"),window.history.replaceState(window.history.state,null,g)},this._updateHash=Fo(this._updateHashUnthrottled,300),this._hashName=e&&encodeURIComponent(e)}addTo(e){return this._map=e,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(e){const i=this._map.getCenter(),l=Math.round(100*this._map.getZoom())/100,u=Math.ceil((l*Math.LN2+Math.log(512/360/.5))/Math.LN10),d=Math.pow(10,u),g=Math.round(i.lng*d)/d,w=Math.round(i.lat*d)/d,C=this._map.getBearing(),P=this._map.getPitch();let E="";if(E+=e?`/${g}/${w}/${l}`:`${l}/${w}/${g}`,(C||P)&&(E+="/"+Math.round(10*C)/10),P&&(E+=`/${Math.round(P)}`),this._hashName){const R=this._hashName;let D=!1;const N=window.location.hash.slice(1).split("&").map((G=>{const te=G.split("=")[0];return te===R?(D=!0,`${te}=${E}`):G})).filter((G=>G));return D||N.push(`${R}=${E}`),`#${N.join("&")}`}return`#${E}`}_isValidHash(e){if(e.length<3||e.some(isNaN))return!1;try{new s.S(+e[2],+e[1])}catch{return!1}const i=+e[0],l=+(e[3]||0),u=+(e[4]||0);return i>=this._map.getMinZoom()&&i<=this._map.getMaxZoom()&&l>=-180&&l<=180&&u>=this._map.getMinPitch()&&u<=this._map.getMaxPitch()}}const to={linearity:.3,easing:s.cm(0,0,.3,1)},tu=s.e({deceleration:2500,maxSpeed:1400},to),ld=s.e({deceleration:20,maxSpeed:1400},to),cd=s.e({deceleration:1e3,maxSpeed:360},to),ud=s.e({deceleration:1e3,maxSpeed:90},to),hd=s.e({deceleration:1e3,maxSpeed:360},to);class dd{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:ne.now(),settings:e})}_drainInertiaBuffer(){const e=this._inertiaBuffer,i=ne.now();for(;e.length>0&&i-e[0].time>160;)e.shift()}_onMoveEnd(e){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const i={zoom:0,bearing:0,pitch:0,roll:0,pan:new s.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:d}of this._inertiaBuffer)i.zoom+=d.zoomDelta||0,i.bearing+=d.bearingDelta||0,i.pitch+=d.pitchDelta||0,i.roll+=d.rollDelta||0,d.panDelta&&i.pan._add(d.panDelta),d.around&&(i.around=d.around),d.pinchAround&&(i.pinchAround=d.pinchAround);const l=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,u={};if(i.pan.mag()){const d=ns(i.pan.mag(),l,s.e({},tu,e||{})),g=i.pan.mult(d.amount/i.pan.mag()),w=this._map.cameraHelper.handlePanInertia(g,this._map.transform);u.center=w.easingCenter,u.offset=w.easingOffset,Ia(u,d)}if(i.zoom){const d=ns(i.zoom,l,ld);u.zoom=this._map.transform.zoom+d.amount,Ia(u,d)}if(i.bearing){const d=ns(i.bearing,l,cd);u.bearing=this._map.transform.bearing+s.ah(d.amount,-179,179),Ia(u,d)}if(i.pitch){const d=ns(i.pitch,l,ud);u.pitch=this._map.transform.pitch+d.amount,Ia(u,d)}if(i.roll){const d=ns(i.roll,l,hd);u.roll=this._map.transform.roll+s.ah(d.amount,-179,179),Ia(u,d)}if(u.zoom||u.bearing){const d=i.pinchAround===void 0?i.around:i.pinchAround;u.around=d?this._map.unproject(d):this._map.getCenter()}return this.clear(),s.e(u,{noMoveStart:!0})}}function Ia(h,e){(!h.duration||h.durationi.unproject(C))),w=d.reduce(((C,P,E,R)=>C.add(P.div(R.length))),new s.P(0,0));super(e,{points:d,point:w,lngLats:g,lngLat:i.unproject(w),originalEvent:l}),this._defaultPrevented=!1}}class ru extends s.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,i,l){super(e,{originalEvent:l}),this._defaultPrevented=!1}}class pd{constructor(e,i){this._map=e,this._clickTolerance=i.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new ru(e.type,this._map,e))}mousedown(e,i){return this._mousedownPos=i,this._firePreventable(new Qi(e.type,this._map,e))}mouseup(e){this._map.fire(new Qi(e.type,this._map,e))}click(e,i){this._mousedownPos&&this._mousedownPos.dist(i)>=this._clickTolerance||this._map.fire(new Qi(e.type,this._map,e))}dblclick(e){return this._firePreventable(new Qi(e.type,this._map,e))}mouseover(e){this._map.fire(new Qi(e.type,this._map,e))}mouseout(e){this._map.fire(new Qi(e.type,this._map,e))}touchstart(e){return this._firePreventable(new is(e.type,this._map,e))}touchmove(e){this._map.fire(new is(e.type,this._map,e))}touchend(e){this._map.fire(new is(e.type,this._map,e))}touchcancel(e){this._map.fire(new is(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class fd{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(e){this._map.fire(new Qi(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Qi("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new Qi(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class as{constructor(e){this._map=e}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(e){return this.transform.screenPointToLocation(s.P.convert(e),this._map.terrain)}}class nu{constructor(e,i){this._map=e,this._tr=new as(e),this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=i.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,i){this.isEnabled()&&e.shiftKey&&e.button===0&&(H.disableDrag(),this._startPos=this._lastPos=i,this._active=!0)}mousemoveWindow(e,i){if(!this._active)return;const l=i;if(this._lastPos.equals(l)||!this._box&&l.dist(this._startPos)d.fitScreenCoordinates(l,u,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",e)}keydown(e){this._active&&e.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(H.remove(this._box),this._box=null),H.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(e,i){return this._map.fire(new s.l(e,{originalEvent:i}))}}function os(h,e){if(h.length!==e.length)throw new Error(`The number of touches and points are not equal - touches ${h.length}, points ${e.length}`);const i={};for(let l=0;lthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=e.timeStamp),l.length===this.numTouches&&(this.centroid=(function(u){const d=new s.P(0,0);for(const g of u)d._add(g);return d.div(u.length)})(i),this.touches=os(l,i)))}touchmove(e,i,l){if(this.aborted||!this.centroid)return;const u=os(l,i);for(const d in this.touches){const g=u[d];(!g||g.dist(this.touches[d])>30)&&(this.aborted=!0)}}touchend(e,i,l){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),l.length===0){const u=!this.aborted&&this.centroid;if(this.reset(),u)return u}}}class ea{constructor(e){this.singleTap=new md(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,i,l){this.singleTap.touchstart(e,i,l)}touchmove(e,i,l){this.singleTap.touchmove(e,i,l)}touchend(e,i,l){const u=this.singleTap.touchend(e,i,l);if(u){const d=e.timeStamp-this.lastTime<500,g=!this.lastTap||this.lastTap.dist(u)<30;if(d&&g||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=u,this.count===this.numTaps)return this.reset(),u}}}class Ma{constructor(e){this._tr=new as(e),this._zoomIn=new ea({numTouches:1,numTaps:2}),this._zoomOut=new ea({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,i,l){this._zoomIn.touchstart(e,i,l),this._zoomOut.touchstart(e,i,l)}touchmove(e,i,l){this._zoomIn.touchmove(e,i,l),this._zoomOut.touchmove(e,i,l)}touchend(e,i,l){const u=this._zoomIn.touchend(e,i,l),d=this._zoomOut.touchend(e,i,l),g=this._tr;return u?(this._active=!0,e.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:w=>w.easeTo({duration:300,zoom:g.zoom+1,around:g.unproject(u)},{originalEvent:e})}):d?(this._active=!0,e.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:w=>w.easeTo({duration:300,zoom:g.zoom-1,around:g.unproject(d)},{originalEvent:e})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ss{constructor(e){this._enabled=!!e.enable,this._moveStateManager=e.moveStateManager,this._clickTolerance=e.clickTolerance||1,this._moveFunction=e.move,this._activateOnStart=!!e.activateOnStart,e.assignEvents(this),this.reset()}reset(e){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(e)}_move(...e){const i=this._moveFunction(...e);if(i.bearingDelta||i.pitchDelta||i.rollDelta||i.around||i.panDelta)return this._active=!0,i}dragStart(e,i){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(e)&&(this._moveStateManager.startMove(e),this._lastPoint=Array.isArray(i)?i[0]:i,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(e,i){if(!this.isEnabled())return;const l=this._lastPoint;if(!l)return;if(e.preventDefault(),!this._moveStateManager.isValidMoveEvent(e))return void this.reset(e);const u=Array.isArray(i)?i[0]:i;return!this._moved&&u.dist(l)!0}),i=new Vp){this.mouseMoveStateManager=e,this.oneFingerTouchMoveStateManager=i}_executeRelevantHandler(e,i,l){return e instanceof MouseEvent?i(e):typeof TouchEvent<"u"&&e instanceof TouchEvent?l(e):void 0}startMove(e){this._executeRelevantHandler(e,(i=>this.mouseMoveStateManager.startMove(i)),(i=>this.oneFingerTouchMoveStateManager.startMove(i)))}endMove(e){this._executeRelevantHandler(e,(i=>this.mouseMoveStateManager.endMove(i)),(i=>this.oneFingerTouchMoveStateManager.endMove(i)))}isValidStartEvent(e){return this._executeRelevantHandler(e,(i=>this.mouseMoveStateManager.isValidStartEvent(i)),(i=>this.oneFingerTouchMoveStateManager.isValidStartEvent(i)))}isValidMoveEvent(e){return this._executeRelevantHandler(e,(i=>this.mouseMoveStateManager.isValidMoveEvent(i)),(i=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(i)))}isValidEndEvent(e){return this._executeRelevantHandler(e,(i=>this.mouseMoveStateManager.isValidEndEvent(i)),(i=>this.oneFingerTouchMoveStateManager.isValidEndEvent(i)))}}const Xs=h=>{h.mousedown=h.dragStart,h.mousemoveWindow=h.dragMove,h.mouseup=h.dragEnd,h.contextmenu=e=>{e.preventDefault()}};class Ys{constructor(e,i){this._clickTolerance=e.clickTolerance||1,this._map=i,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new s.P(0,0)}_shouldBePrevented(e){return e<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(e,i,l){return this._calculateTransform(e,i,l)}touchmove(e,i,l){if(this._active){if(!this._shouldBePrevented(l.length))return e.preventDefault(),this._calculateTransform(e,i,l);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",e)}}touchend(e,i,l){this._calculateTransform(e,i,l),this._active&&this._shouldBePrevented(l.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,i,l){l.length>0&&(this._active=!0);const u=os(l,i),d=new s.P(0,0),g=new s.P(0,0);let w=0;for(const P in u){const E=u[P],R=this._touches[P];R&&(d._add(E),g._add(E.sub(R)),w++,u[P]=E)}if(this._touches=u,this._shouldBePrevented(w)||!g.mag())return;const C=g.div(w);return this._sum._add(C),this._sum.mag()Math.abs(h.x)}class Nl extends Aa{constructor(e){super(),this._currentTouchCount=0,this._map=e}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(e,i,l){super.touchstart(e,i,l),this._currentTouchCount=l.length}_start(e){this._lastPoints=e,Oo(e[0].sub(e[1]))&&(this._valid=!1)}_move(e,i,l){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const u=e[0].sub(this._lastPoints[0]),d=e[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(u,d,l.timeStamp),this._valid?(this._lastPoints=e,this._active=!0,{pitchDelta:(u.y+d.y)/2*-.5}):void 0}gestureBeginsVertically(e,i,l){if(this._valid!==void 0)return this._valid;const u=e.mag()>=2,d=i.mag()>=2;if(!u&&!d)return;if(!u||!d)return this._firstMove===void 0&&(this._firstMove=l),l-this._firstMove<100&&void 0;const g=e.y>0==i.y>0;return Oo(e)&&Oo(i)&&g}}const un={panStep:100,bearingStep:15,pitchStep:10};class jl{constructor(e){this._tr=new as(e);const i=un;this._panStep=i.panStep,this._bearingStep=i.bearingStep,this._pitchStep=i.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let i=0,l=0,u=0,d=0,g=0;switch(e.keyCode){case 61:case 107:case 171:case 187:i=1;break;case 189:case 109:case 173:i=-1;break;case 37:e.shiftKey?l=-1:(e.preventDefault(),d=-1);break;case 39:e.shiftKey?l=1:(e.preventDefault(),d=1);break;case 38:e.shiftKey?u=1:(e.preventDefault(),g=-1);break;case 40:e.shiftKey?u=-1:(e.preventDefault(),g=1);break;default:return}return this._rotationDisabled&&(l=0,u=0),{cameraAnimation:w=>{const C=this._tr;w.easeTo({duration:300,easeId:"keyboardHandler",easing:Zp,zoom:i?Math.round(C.zoom)+i*(e.shiftKey?2:1):C.zoom,bearing:C.bearing+l*this._bearingStep,pitch:C.pitch+u*this._pitchStep,offset:[-d*this._panStep,-g*this._panStep],center:C.center},{originalEvent:e})}}}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 Zp(h){return h*(2-h)}const Vl=4.000244140625,Up=1/450;class _d{constructor(e,i){this._onTimeout=l=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(l)},this._map=e,this._tr=new as(e),this._triggerRenderFrame=i,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=Up}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&e.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(e){return!!this._map.cooperativeGestures.isEnabled()&&!(e.ctrlKey||this._map.cooperativeGestures.isBypassed(e))}wheel(e){if(!this.isEnabled())return;if(this._shouldBePrevented(e))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",e);let i=e.deltaMode===WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY;const l=ne.now(),u=l-(this._lastWheelEventTime||0);this._lastWheelEventTime=l,i!==0&&i%Vl==0?this._type="wheel":i!==0&&Math.abs(i)<4?this._type="trackpad":u>400?(this._type=null,this._lastValue=i,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(u*i)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,i+=this._lastValue)),e.shiftKey&&i&&(i/=4),this._type&&(this._lastWheelEvent=e,this._delta-=i,this._active||this._start(e)),e.preventDefault()}_start(e){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const i=H.mousePos(this._map.getCanvas(),e),l=this._tr;this._aroundPoint=this._aroundCenter?l.transform.locationToScreenPoint(s.S.convert(l.center)):i,this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const e=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){const w=e.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=w),typeof this._targetZoom=="number"&&(this._targetZoom+=w)}if(this._delta!==0){const w=this._type==="wheel"&&Math.abs(this._delta)>Vl?this._wheelZoomRate:this._defaultZoomRate;let C=2/(1+Math.exp(-Math.abs(this._delta*w)));this._delta<0&&C!==0&&(C=1/C);const P=typeof this._targetZoom!="number"?e.scale:s.af(this._targetZoom);this._targetZoom=e.getConstrained(e.getCameraLngLat(),s.ak(P*C)).zoom,this._type==="wheel"&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const i=typeof this._targetZoom!="number"?e.zoom:this._targetZoom,l=this._startZoom,u=this._easing;let d,g=!1;if(this._type==="wheel"&&l&&u){const w=ne.now()-this._lastWheelEventTime,C=Math.min((w+5)/200,1),P=u(C);d=s.C.number(l,i,P),C<1?this._frameId||(this._frameId=!0):g=!0}else d=i,g=!0;return this._active=!0,g&&(this._active=!1,this._finishTimeout=setTimeout((()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout}),200)),this._lastExpectedZoom=d,{noInertia:!0,needsRenderFrame:!g,zoomDelta:d-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let i=s.co;if(this._prevEase){const l=this._prevEase,u=(ne.now()-l.start)/l.duration,d=l.easing(u+.01)-l.easing(u),g=.27/Math.sqrt(d*d+1e-4)*.01,w=Math.sqrt(.0729-g*g);i=s.cm(g,w,.25,1)}return this._prevEase={start:ne.now(),duration:e,easing:i},i}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class ou{constructor(e,i){this._clickZoom=e,this._tapZoom=i}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 su{constructor(e){this._tr=new as(e),this.reset()}reset(){this._active=!1}dblclick(e,i){return e.preventDefault(),{cameraAnimation:l=>{l.easeTo({duration:300,zoom:this._tr.zoom+(e.shiftKey?-1:1),around:this._tr.unproject(i)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class gd{constructor(){this._tap=new ea({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(e,i,l){if(!this._swipePoint)if(this._tapTime){const u=i[0],d=e.timeStamp-this._tapTime<500,g=this._tapPoint.dist(u)<30;d&&g?l.length>0&&(this._swipePoint=u,this._swipeTouch=l[0].identifier):this.reset()}else this._tap.touchstart(e,i,l)}touchmove(e,i,l){if(this._tapTime){if(this._swipePoint){if(l[0].identifier!==this._swipeTouch)return;const u=i[0],d=u.y-this._swipePoint.y;return this._swipePoint=u,e.preventDefault(),this._active=!0,{zoomDelta:d/128}}}else this._tap.touchmove(e,i,l)}touchend(e,i,l){if(this._tapTime)this._swipePoint&&l.length===0&&this.reset();else{const u=this._tap.touchend(e,i,l);u&&(this._tapTime=e.timeStamp,this._tapPoint=u)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class vd{constructor(e,i,l){this._el=e,this._mousePan=i,this._touchPan=l}enable(e){this._inertiaOptions=e||{},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 lu{constructor(e,i,l,u){this._pitchWithRotate=e.pitchWithRotate,this._rollEnabled=e.rollEnabled,this._mouseRotate=i,this._mousePitch=l,this._mouseRoll=u}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 yd{constructor(e,i,l,u){this._el=e,this._touchZoom=i,this._touchRotate=l,this._tapDragZoom=u,this._rotationDisabled=!1,this._enabled=!0}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),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()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class xd{constructor(e,i){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=e,this._options=i,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const e=this._map.getCanvasContainer();e.classList.add("maplibregl-cooperative-gestures"),this._container=H.create("div","maplibregl-cooperative-gesture-screen",e);let i=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(i=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const l=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),u=document.createElement("div");u.className="maplibregl-desktop-message",u.textContent=i,this._container.appendChild(u);const d=document.createElement("div");d.className="maplibregl-mobile-message",d.textContent=l,this._container.appendChild(d),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(H.remove(this._container),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(e){return e[this._bypassKey]}notifyGestureBlocked(e,i){this._enabled&&(this._map.fire(new s.l("cooperativegestureprevented",{gestureType:e,originalEvent:i})),this._container.classList.add("maplibregl-show"),setTimeout((()=>{this._container.classList.remove("maplibregl-show")}),100))}}const Ea=h=>h.zoom||h.drag||h.roll||h.pitch||h.rotate;class Un extends s.l{}function us(h){return h.panDelta&&h.panDelta.mag()||h.zoomDelta||h.bearingDelta||h.pitchDelta||h.rollDelta}class cu{constructor(e,i){this.handleWindowEvent=u=>{this.handleEvent(u,`${u.type}Window`)},this.handleEvent=(u,d)=>{if(u.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const g=u.type==="renderFrame"?void 0:u,w={needsRenderFrame:!1},C={},P={};for(const{handlerName:D,handler:N,allowed:G}of this._handlers){if(!N.isEnabled())continue;let te;if(this._blockedByActive(P,G,D))N.reset();else if(N[d||u.type]){if(s.cp(u,d||u.type)){const ee=H.mousePos(this._map.getCanvas(),u);te=N[d||u.type](u,ee)}else if(s.cq(u,d||u.type)){const ee=this._getMapTouches(u.touches),ie=H.touchPos(this._map.getCanvas(),ee);te=N[d||u.type](u,ie,ee)}else s.cr(d||u.type)||(te=N[d||u.type](u));this.mergeHandlerResult(w,C,te,D,g),te&&te.needsRenderFrame&&this._triggerRenderFrame()}(te||N.isActive())&&(P[D]=N)}const E={};for(const D in this._previousActiveHandlers)P[D]||(E[D]=g);this._previousActiveHandlers=P,(Object.keys(E).length||us(w))&&(this._changes.push([w,C,E]),this._triggerRenderFrame()),(Object.keys(P).length||us(w))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:R}=w;R&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],R(this._map))},this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new dd(e),this._bearingSnap=i.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(i);const l=this._el;this._listeners=[[l,"touchstart",{passive:!0}],[l,"touchmove",{passive:!1}],[l,"touchend",void 0],[l,"touchcancel",void 0],[l,"mousedown",void 0],[l,"mousemove",void 0],[l,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[l,"mouseover",void 0],[l,"mouseout",void 0],[l,"dblclick",void 0],[l,"click",void 0],[l,"keydown",{capture:!1}],[l,"keyup",void 0],[l,"wheel",{passive:!1}],[l,"contextmenu",void 0],[window,"blur",void 0]];for(const[u,d,g]of this._listeners)H.addEventListener(u,d,u===document?this.handleWindowEvent:this.handleEvent,g)}destroy(){for(const[e,i,l]of this._listeners)H.removeEventListener(e,i,e===document?this.handleWindowEvent:this.handleEvent,l)}_addDefaultHandlers(e){const i=this._map,l=i.getCanvasContainer();this._add("mapEvent",new pd(i,e));const u=i.boxZoom=new nu(i,e);this._add("boxZoom",u),e.interactive&&e.boxZoom&&u.enable();const d=i.cooperativeGestures=new xd(i,e.cooperativeGestures);this._add("cooperativeGestures",d),e.cooperativeGestures&&d.enable();const g=new Ma(i),w=new su(i);i.doubleClickZoom=new ou(w,g),this._add("tapZoom",g),this._add("clickZoom",w),e.interactive&&e.doubleClickZoom&&i.doubleClickZoom.enable();const C=new gd;this._add("tapDragZoom",C);const P=i.touchPitch=new Nl(i);this._add("touchPitch",P),e.interactive&&e.touchPitch&&i.touchPitch.enable(e.touchPitch);const E=()=>i.project(i.getCenter()),R=(function({enable:me,clickTolerance:be,aroundCenter:Pe=!0,minPixelCenterThreshold:_e=100,rotateDegreesPerPixelMoved:Be=.8},rt){const Ge=new Ws({checkCorrectEvent:Xe=>H.mouseButton(Xe)===0&&Xe.ctrlKey||H.mouseButton(Xe)===2&&!Xe.ctrlKey});return new ss({clickTolerance:be,move:(Xe,tt)=>{const jt=rt();if(Pe&&Math.abs(jt.y-Xe.y)>_e)return{bearingDelta:s.cn(new s.P(Xe.x,tt.y),tt,jt)};let Zt=(tt.x-Xe.x)*Be;return Pe&&tt.yH.mouseButton(Be)===0&&Be.ctrlKey||H.mouseButton(Be)===2});return new ss({clickTolerance:be,move:(Be,rt)=>({pitchDelta:(rt.y-Be.y)*Pe}),moveStateManager:_e,enable:me,assignEvents:Xs})})(e),N=(function({enable:me,clickTolerance:be,rollDegreesPerPixelMoved:Pe=.3},_e){const Be=new Ws({checkCorrectEvent:rt=>H.mouseButton(rt)===2&&rt.ctrlKey});return new ss({clickTolerance:be,move:(rt,Ge)=>{const Xe=_e();let tt=(Ge.x-rt.x)*Pe;return Ge.yH.mouseButton(_e)===0&&!_e.ctrlKey});return new ss({clickTolerance:be,move:(_e,Be)=>({around:Be,panDelta:Be.sub(_e)}),activateOnStart:!0,moveStateManager:Pe,enable:me,assignEvents:Xs})})(e),te=new Ys(e,i);i.dragPan=new vd(l,G,te),this._add("mousePan",G),this._add("touchPan",te,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&i.dragPan.enable(e.dragPan);const ee=new cs,ie=new Ol;i.touchZoomRotate=new yd(l,ie,ee,C),this._add("touchRotate",ee,["touchPan","touchZoom"]),this._add("touchZoom",ie,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&i.touchZoomRotate.enable(e.touchZoomRotate);const ue=i.scrollZoom=new _d(i,(()=>this._triggerRenderFrame()));this._add("scrollZoom",ue,["mousePan"]),e.interactive&&e.scrollZoom&&i.scrollZoom.enable(e.scrollZoom);const ve=i.keyboard=new jl(i);this._add("keyboard",ve),e.interactive&&e.keyboard&&i.keyboard.enable(),this._add("blockableMapEvent",new fd(i))}_add(e,i,l){this._handlers.push({handlerName:e,handler:i,allowed:l}),this._handlersById[e]=i}stop(e){if(!this._updatingCamera){for(const{handler:i}of this._handlers)i.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[]}}isActive(){for(const{handler:e}of this._handlers)if(e.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Ea(this._eventsInProgress)||this.isZooming()}_blockedByActive(e,i,l){for(const u in e)if(u!==l&&(!i||i.indexOf(u)<0))return!0;return!1}_getMapTouches(e){const i=[];for(const l of e)this._el.contains(l.target)&&i.push(l);return i}mergeHandlerResult(e,i,l,u,d){if(!l)return;s.e(e,l);const g={handlerName:u,originalEvent:l.originalEvent||d};l.zoomDelta!==void 0&&(i.zoom=g),l.panDelta!==void 0&&(i.drag=g),l.rollDelta!==void 0&&(i.roll=g),l.pitchDelta!==void 0&&(i.pitch=g),l.bearingDelta!==void 0&&(i.rotate=g)}_applyChanges(){const e={},i={},l={};for(const[u,d,g]of this._changes)u.panDelta&&(e.panDelta=(e.panDelta||new s.P(0,0))._add(u.panDelta)),u.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+u.zoomDelta),u.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+u.bearingDelta),u.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+u.pitchDelta),u.rollDelta&&(e.rollDelta=(e.rollDelta||0)+u.rollDelta),u.around!==void 0&&(e.around=u.around),u.pinchAround!==void 0&&(e.pinchAround=u.pinchAround),u.noInertia&&(e.noInertia=u.noInertia),s.e(i,d),s.e(l,g);this._updateMapTransform(e,i,l),this._changes=[]}_updateMapTransform(e,i,l){const u=this._map,d=u._getTransformForUpdate(),g=u.terrain;if(!(us(e)||g&&this._terrainMovement))return this._fireEvents(i,l,!0);u._stop(!0);let{panDelta:w,zoomDelta:C,bearingDelta:P,pitchDelta:E,rollDelta:R,around:D,pinchAround:N}=e;N!==void 0&&(D=N),D=D||u.transform.centerPoint,g&&!d.isPointOnMapSurface(D)&&(D=d.centerPoint);const G={panDelta:w,zoomDelta:C,rollDelta:R,pitchDelta:E,bearingDelta:P,around:D};this._map.cameraHelper.useGlobeControls&&!d.isPointOnMapSurface(D)&&(D=d.centerPoint);const te=D.distSqr(d.centerPoint)<.01?d.center:d.screenPointToLocation(w?D.sub(w):D);g?(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(G,d),this._terrainMovement||!i.drag&&!i.zoom?i.drag&&this._terrainMovement?d.setCenter(d.screenPointToLocation(d.centerPoint.sub(w))):this._map.cameraHelper.handleMapControlsPan(G,d,te):(this._terrainMovement=!0,this._map._elevationFreeze=!0,this._map.cameraHelper.handleMapControlsPan(G,d,te))):(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(G,d),this._map.cameraHelper.handleMapControlsPan(G,d,te)),u._applyUpdatedTransform(d),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(i,l,!0)}_fireEvents(e,i,l){const u=Ea(this._eventsInProgress),d=Ea(e),g={};for(const R in e){const{originalEvent:D}=e[R];this._eventsInProgress[R]||(g[`${R}start`]=D),this._eventsInProgress[R]=e[R]}!u&&d&&this._fireEvent("movestart",d.originalEvent);for(const R in g)this._fireEvent(R,g[R]);d&&this._fireEvent("move",d.originalEvent);for(const R in e){const{originalEvent:D}=e[R];this._fireEvent(R,D)}const w={};let C;for(const R in this._eventsInProgress){const{handlerName:D,originalEvent:N}=this._eventsInProgress[R];this._handlersById[D].isActive()||(delete this._eventsInProgress[R],C=i[D]||N,w[`${R}end`]=C)}for(const R in w)this._fireEvent(R,w[R]);const P=Ea(this._eventsInProgress),E=(u||d)&&!P;if(E&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const R=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&R.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(R)}if(l&&E){this._updatingCamera=!0;const R=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),D=N=>N!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Un("renderFrame",{timeStamp:e})),this._applyChanges()}))}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class bd extends s.E{constructor(e,i,l){super(),this._renderFrameCallback=()=>{const u=Math.min((ne.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(u)),u<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=e,this._bearingSnap=l.bearingSnap,this.cameraHelper=i,this.on("moveend",(()=>{delete this._requestedCameraState}))}migrateProjection(e,i){e.apply(this.transform),this.transform=e,this.cameraHelper=i}getCenter(){return new s.S(this.transform.center.lng,this.transform.center.lat)}setCenter(e,i){return this.jumpTo({center:e},i)}getCenterElevation(){return this.transform.elevation}setCenterElevation(e,i){return this.jumpTo({elevation:e},i),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(e){this._centerClampedToGround=e}panBy(e,i,l){return e=s.P.convert(e).mult(-1),this.panTo(this.transform.center,s.e({offset:e},i),l)}panTo(e,i,l){return this.easeTo(s.e({center:e},i),l)}getZoom(){return this.transform.zoom}setZoom(e,i){return this.jumpTo({zoom:e},i),this}zoomTo(e,i,l){return this.easeTo(s.e({zoom:e},i),l)}zoomIn(e,i){return this.zoomTo(this.getZoom()+1,e,i),this}zoomOut(e,i){return this.zoomTo(this.getZoom()-1,e,i),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(e,i){return e!=this.transform.fov&&(this.transform.setFov(e),this.fire(new s.l("movestart",i)).fire(new s.l("move",i)).fire(new s.l("moveend",i))),this}getBearing(){return this.transform.bearing}setBearing(e,i){return this.jumpTo({bearing:e},i),this}getPadding(){return this.transform.padding}setPadding(e,i){return this.jumpTo({padding:e},i),this}rotateTo(e,i,l){return this.easeTo(s.e({bearing:e},i),l)}resetNorth(e,i){return this.rotateTo(0,s.e({duration:1e3},e),i),this}resetNorthPitch(e,i){return this.easeTo(s.e({bearing:0,pitch:0,roll:0,duration:1e3},e),i),this}snapToNorth(e,i){return Math.abs(this.getBearing()){te.easeFunc(ee),this.terrain&&!e.freezeElevation&&this._updateElevation(ee),this._applyUpdatedTransform(l),this._fireMoveEvents(i)}),(ee=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(i,ee)}),e),this}_prepareEase(e,i,l={}){this._moving=!0,i||l.moving||this.fire(new s.l("movestart",e)),this._zooming&&!l.zooming&&this.fire(new s.l("zoomstart",e)),this._rotating&&!l.rotating&&this.fire(new s.l("rotatestart",e)),this._pitching&&!l.pitching&&this.fire(new s.l("pitchstart",e)),this._rolling&&!l.rolling&&this.fire(new s.l("rollstart",e))}_prepareElevation(e){this._elevationCenter=e,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(e,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(e){this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));const i=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(e<1&&i!==this._elevationTarget){const l=this._elevationTarget-this._elevationStart;this._elevationStart+=e*(l-(i-(l*e+this._elevationStart))/(1-e)),this._elevationTarget=i}this.transform.setElevation(s.C.number(this._elevationStart,this._elevationTarget,e))}_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(e){if(!this.terrain&&e.elevation>=0&&e.pitch<=90)return{};const i=e.getCameraLngLat(),l=e.getCameraAltitude(),u=this.terrain?this.terrain.getElevationForLngLatZoom(i,e.zoom):0;if(lthis._elevateCameraIfInsideTerrain(u))),this.transformCameraUpdate&&i.push((u=>this.transformCameraUpdate(u))),!i.length)return;const l=e.clone();for(const u of i){const d=l.clone(),{center:g,zoom:w,roll:C,pitch:P,bearing:E,elevation:R}=u(d);g&&d.setCenter(g),R!==void 0&&d.setElevation(R),w!==void 0&&d.setZoom(w),C!==void 0&&d.setRoll(C),P!==void 0&&d.setPitch(P),E!==void 0&&d.setBearing(E),l.apply(d)}this.transform.apply(l)}_fireMoveEvents(e){this.fire(new s.l("move",e)),this._zooming&&this.fire(new s.l("zoom",e)),this._rotating&&this.fire(new s.l("rotate",e)),this._pitching&&this.fire(new s.l("pitch",e)),this._rolling&&this.fire(new s.l("roll",e))}_afterEase(e,i){if(this._easeId&&i&&this._easeId===i)return;delete this._easeId;const l=this._zooming,u=this._rotating,d=this._pitching,g=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,l&&this.fire(new s.l("zoomend",e)),u&&this.fire(new s.l("rotateend",e)),d&&this.fire(new s.l("pitchend",e)),g&&this.fire(new s.l("rollend",e)),this.fire(new s.l("moveend",e))}flyTo(e,i){if(!e.essential&&ne.prefersReducedMotion){const tt=s.Q(e,["center","zoom","bearing","pitch","roll","elevation"]);return this.jumpTo(tt,i)}this.stop(),e=s.e({offset:[0,0],speed:1.2,curve:1.42,easing:s.co},e);const l=this._getTransformForUpdate(),u=l.bearing,d=l.pitch,g=l.roll,w=l.padding,C="bearing"in e?this._normalizeBearing(e.bearing,u):u,P="pitch"in e?+e.pitch:d,E="roll"in e?this._normalizeBearing(e.roll,g):g,R="padding"in e?e.padding:l.padding,D=s.P.convert(e.offset);let N=l.centerPoint.add(D);const G=l.screenPointToLocation(N),te=this.cameraHelper.handleFlyTo(l,{bearing:C,pitch:P,roll:E,padding:R,locationAtOffset:G,offsetAsPoint:D,center:e.center,minZoom:e.minZoom,zoom:e.zoom});let ee=e.curve;const ie=Math.max(l.width,l.height),ue=ie/te.scaleOfZoom,ve=te.pixelPathLength;typeof te.scaleOfMinZoom=="number"&&(ee=Math.sqrt(ie/te.scaleOfMinZoom/ve*2));const me=ee*ee;function be(tt){const jt=(ue*ue-ie*ie+(tt?-1:1)*me*me*ve*ve)/(2*(tt?ue:ie)*me*ve);return Math.log(Math.sqrt(jt*jt+1)-jt)}function Pe(tt){return(Math.exp(tt)-Math.exp(-tt))/2}function _e(tt){return(Math.exp(tt)+Math.exp(-tt))/2}const Be=be(!1);let rt=function(tt){return _e(Be)/_e(Be+ee*tt)},Ge=function(tt){return ie*((_e(Be)*(Pe(jt=Be+ee*tt)/_e(jt))-Pe(Be))/me)/ve;var jt},Xe=(be(!0)-Be)/ee;if(Math.abs(ve)<2e-6||!isFinite(Xe)){if(Math.abs(ie-ue)<1e-6)return this.easeTo(e,i);const tt=ue0,rt=jt=>Math.exp(tt*ee*jt)}return e.duration="duration"in e?+e.duration:1e3*Xe/("screenSpeed"in e?+e.screenSpeed/ee:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=u!==C,this._pitching=P!==d,this._rolling=E!==g,this._padding=!l.isPaddingEqual(R),this._prepareEase(i,!1),this.terrain&&this._prepareElevation(te.targetCenter),this._ease((tt=>{const jt=tt*Xe,Zt=1/rt(jt),Tt=Ge(jt);this._rotating&&l.setBearing(s.C.number(u,C,tt)),this._pitching&&l.setPitch(s.C.number(d,P,tt)),this._rolling&&l.setRoll(s.C.number(g,E,tt)),this._padding&&(l.interpolatePadding(w,R,tt),N=l.centerPoint.add(D)),te.easeFunc(tt,Zt,Tt,N),this.terrain&&!e.freezeElevation&&this._updateElevation(tt),this._applyUpdatedTransform(l),this._fireMoveEvents(i)}),(()=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(i)}),e),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(e,i){var l;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const u=this._onEaseEnd;delete this._onEaseEnd,u.call(this,i)}return e||(l=this.handlers)===null||l===void 0||l.stop(!1),this}_ease(e,i,l){l.animate===!1||l.duration===0?(e(1),i()):(this._easeStart=ne.now(),this._easeOptions=l,this._onEaseFrame=e,this._onEaseEnd=i,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(e,i){e=s.aO(e,-180,180);const l=Math.abs(e-i);return Math.abs(e-360-i)MapLibre'};class hu{constructor(e=uu){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=i=>{!i||i.sourceDataType!=="metadata"&&i.sourceDataType!=="visibility"&&i.dataType!=="style"&&i.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=e}getDefaultPosition(){return"bottom-right"}onAdd(e){return this._map=e,this._compact=this.options.compact,this._container=H.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=H.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=H.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(){H.remove(this._container),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(e,i){const l=this._map._getUIString(`AttributionControl.${i}`);e.title=l,e.setAttribute("aria-label",l)}_updateAttributions(){if(!this._map.style)return;let e=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map((u=>typeof u!="string"?"":u))):typeof this.options.customAttribution=="string"&&e.push(this.options.customAttribution)),this._map.style.stylesheet){const u=this._map.style.stylesheet;this.styleOwner=u.owner,this.styleId=u.id}const i=this._map.style.sourceCaches;for(const u in i){const d=i[u];if(d.used||d.usedForTerrain){const g=d.getSource();g.attribution&&e.indexOf(g.attribution)<0&&e.push(g.attribution)}}e=e.filter((u=>String(u).trim())),e.sort(((u,d)=>u.length-d.length)),e=e.filter(((u,d)=>{for(let g=d+1;g=0)return!1;return!0}));const l=e.join(" | ");l!==this._attribHTML&&(this._attribHTML=l,e.length?(this._innerContainer.innerHTML=H.sanitize(l),this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class wd{constructor(e={}){this._updateCompact=()=>{const i=this._container.children;if(i.length){const l=i[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&l.classList.add("maplibregl-compact"):l.classList.remove("maplibregl-compact")}},this.options=e}getDefaultPosition(){return"bottom-left"}onAdd(e){this._map=e,this._compact=this.options&&this.options.compact,this._container=H.create("div","maplibregl-ctrl");const i=H.create("a","maplibregl-ctrl-logo");return i.target="_blank",i.rel="noopener nofollow",i.href="https://maplibre.org/",i.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),i.setAttribute("rel","noopener nofollow"),this._container.appendChild(i),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){H.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class $a{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){const i=++this._id;return this._queue.push({callback:e,id:i,cancelled:!1}),i}remove(e){const i=this._currentlyRunning,l=i?this._queue.concat(i):this._queue;for(const u of l)if(u.id===e)return void(u.cancelled=!0)}run(e=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const i=this._currentlyRunning=this._queue;this._queue=[];for(const l of i)if(!l.cancelled&&(l.callback(e),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var ql=s.aJ([{name:"a_pos3d",type:"Int16",components:3}]);class br extends s.E{constructor(e){super(),this._lastTilesetChange=ne.now(),this.sourceCache=e,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=e._source.tileSize*2**this.deltaZoom,e.usedForTerrain=!0,e.tileSize=this.tileSize}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(e,i){this.sourceCache.update(e,i),this._renderableTilesKeys=[];const l={};for(const u of xe(e,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:i,calculateTileZoom:this.sourceCache._source.calculateTileZoom}))l[u.key]=!0,this._renderableTilesKeys.push(u.key),this._tiles[u.key]||(u.terrainRttPosMatrix32f=new Float64Array(16),s.bY(u.terrainRttPosMatrix32f,0,s.$,s.$,0,0,1),this._tiles[u.key]=new qr(u,this.tileSize),this._lastTilesetChange=ne.now());for(const u in this._tiles)l[u]||delete this._tiles[u]}freeRtt(e){for(const i in this._tiles){const l=this._tiles[i];(!e||l.tileID.equals(e)||l.tileID.isChildOf(e)||e.isChildOf(l.tileID))&&(l.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map((e=>this.getTileByID(e)))}getTileByID(e){return this._tiles[e]}getTerrainCoords(e,i){return i?this._getTerrainCoordsForTileRanges(e,i):this._getTerrainCoordsForRegularTile(e)}_getTerrainCoordsForRegularTile(e){const i={};for(const l of this._renderableTilesKeys){const u=this._tiles[l].tileID,d=e.clone(),g=s.ba();if(u.canonical.equals(e.canonical))s.bY(g,0,s.$,s.$,0,0,1);else if(u.canonical.isChildOf(e.canonical)){const w=u.canonical.z-e.canonical.z,C=u.canonical.x-(u.canonical.x>>w<>w<>w;s.bY(g,0,E,E,0,0,1),s.M(g,g,[-C*E,-P*E,0])}else{if(!e.canonical.isChildOf(u.canonical))continue;{const w=e.canonical.z-u.canonical.z,C=e.canonical.x-(e.canonical.x>>w<>w<>w;s.bY(g,0,s.$,s.$,0,0,1),s.M(g,g,[C*E,P*E,0]),s.N(g,g,[1/2**w,1/2**w,0])}}d.terrainRttPosMatrix32f=new Float32Array(g),i[l]=d}return i}_getTerrainCoordsForTileRanges(e,i){const l={};for(const u of this._renderableTilesKeys){const d=this._tiles[u].tileID;if(!this._isWithinTileRanges(d,i))continue;const g=e.clone(),w=s.ba();if(d.canonical.z===e.canonical.z){const C=e.canonical.x-d.canonical.x,P=e.canonical.y-d.canonical.y;s.bY(w,0,s.$,s.$,0,0,1),s.M(w,w,[C*s.$,P*s.$,0])}else if(d.canonical.z>e.canonical.z){const C=d.canonical.z-e.canonical.z,P=d.canonical.x-(d.canonical.x>>C<>C<>C),D=e.canonical.y-(d.canonical.y>>C),N=s.$>>C;s.bY(w,0,N,N,0,0,1),s.M(w,w,[-P*N+R*s.$,-E*N+D*s.$,0])}else{const C=e.canonical.z-d.canonical.z,P=e.canonical.x-(e.canonical.x>>C<>C<>C)-d.canonical.x,D=(e.canonical.y>>C)-d.canonical.y,N=s.$<l.maxzoom&&(u=l.maxzoom),u=l.minzoom&&(!d||!d.dem);)d=this.sourceCache.getTileByID(e.scaledTo(u--).key);return d}anyTilesAfterTime(e=Date.now()){return this._lastTilesetChange>=e}_isWithinTileRanges(e,i){return i[e.canonical.z]&&e.canonical.x>=i[e.canonical.z].minTileX&&e.canonical.x<=i[e.canonical.z].maxTileX&&e.canonical.y>=i[e.canonical.z].minTileY&&e.canonical.y<=i[e.canonical.z].maxTileY}}class Or{constructor(e,i,l){this._meshCache={},this.painter=e,this.sourceCache=new br(i),this.options=l,this.exaggeration=typeof l.exaggeration=="number"?l.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(e,i,l,u=s.$){var d;if(!(i>=0&&i=0&&le.canonical.z&&(e.canonical.z>=u?d=e.canonical.z-u:s.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const g=e.canonical.x-(e.canonical.x>>d<>d<>8<<4|d>>8,i[g+3]=0;const l=new s.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(i.buffer)),u=new s.T(e,l,e.gl.RGBA,{premultiply:!1});return u.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._coordsTexture=u,u}pointCoordinate(e){this.painter.maybeDrawDepthAndCoords(!0);const i=new Uint8Array(4),l=this.painter.context,u=l.gl,d=Math.round(e.x*this.painter.pixelRatio/devicePixelRatio),g=Math.round(e.y*this.painter.pixelRatio/devicePixelRatio),w=Math.round(this.painter.height/devicePixelRatio);l.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),u.readPixels(d,w-g-1,1,1,u.RGBA,u.UNSIGNED_BYTE,i),l.bindFramebuffer.set(null);const C=i[0]+(i[2]>>4<<8),P=i[1]+((15&i[2])<<8),E=this.coordsIndex[255-i[3]],R=E&&this.sourceCache.getTileByID(E);if(!R)return null;const D=this._coordsTextureSize,N=(1<0,u=l&&e.canonical.y===0,d=l&&e.canonical.y===(1<e.id!==i)),this._recentlyUsed.push(e.id)}stampObject(e){e.stamp=++this._stamp}getOrCreateFreeObject(){for(const i of this._recentlyUsed)if(!this._objects[i].inUse)return this._objects[i];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const e=this._createObject(this._objects.length);return this._objects.push(e),e}freeObject(e){e.inUse=!1}freeAllObjects(){for(const e of this._objects)this.freeObject(e)}isFull(){return!(this._objects.length!e.inUse))===!1}}const _o={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class Ul{constructor(e,i){this.painter=e,this.terrain=i,this.pool=new Zl(e.context,30,i.sourceCache.tileSize*i.qualityFactor)}destruct(){this.pool.destruct()}getTexture(e){return this.pool.getObjectForId(e.rtt[this._stacks.length-1].id).texture}prepareForRender(e,i){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=e._order.filter((l=>!e._layers[l].isHidden(i))),this._coordsAscending={};for(const l in e.sourceCaches){this._coordsAscending[l]={};const u=e.sourceCaches[l].getVisibleCoordinates(),d=e.sourceCaches[l].getSource(),g=d instanceof Nt?d.terrainTileRanges:null;for(const w of u){const C=this.terrain.sourceCache.getTerrainCoords(w,g);for(const P in C)this._coordsAscending[l][P]||(this._coordsAscending[l][P]=[]),this._coordsAscending[l][P].push(C[P])}}this._coordsAscendingStr={};for(const l of e._order){const u=e._layers[l],d=u.source;if(_o[u.type]&&!this._coordsAscendingStr[d]){this._coordsAscendingStr[d]={};for(const g in this._coordsAscending[d])this._coordsAscendingStr[d][g]=this._coordsAscending[d][g].map((w=>w.key)).sort().join()}}for(const l of this._renderableTiles)for(const u in this._coordsAscendingStr){const d=this._coordsAscendingStr[u][l.tileID.key];d&&d!==l.rttCoords[u]&&(l.rtt=[])}}renderLayer(e,i){if(e.isHidden(this.painter.transform.zoom))return!1;const l=Object.assign(Object.assign({},i),{isRenderingToTexture:!0}),u=e.type,d=this.painter,g=this._renderableLayerIds[this._renderableLayerIds.length-1]===e.id;if(_o[u]&&(this._prevType&&_o[this._prevType]||this._stacks.push([]),this._prevType=u,this._stacks[this._stacks.length-1].push(e.id),!g))return!0;if(_o[this._prevType]||_o[u]&&g){this._prevType=u;const w=this._stacks.length-1,C=this._stacks[w]||[];for(const P of this._renderableTiles){if(this.pool.isFull()&&(Bl(this.painter,this.terrain,this._rttTiles,l),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(P),P.rtt[w]){const R=this.pool.getObjectForId(P.rtt[w].id);if(R.stamp===P.rtt[w].stamp){this.pool.useObject(R);continue}}const E=this.pool.getOrCreateFreeObject();this.pool.useObject(E),this.pool.stampObject(E),P.rtt[w]={id:E.id,stamp:E.stamp},d.context.bindFramebuffer.set(E.fbo.framebuffer),d.context.clear({color:s.bf.transparent,stencil:0}),d.currentStencilSource=void 0;for(let R=0;R{this.startMove(d,H.mousePos(this.element,d)),H.addEventListener(window,"mousemove",this.mousemove),H.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=d=>{this.move(d,H.mousePos(this.element,d))},this.mouseup=d=>{this._rotatePitchHandler.dragEnd(d),this.offTemp()},this.touchstart=d=>{d.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=H.touchPos(this.element,d.targetTouches)[0],this.startMove(d,this._startPos),H.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),H.addEventListener(window,"touchend",this.touchend))},this.touchmove=d=>{d.targetTouches.length!==1?this.reset():(this._lastPos=H.touchPos(this.element,d.targetTouches)[0],this.move(d,this._lastPos))},this.touchend=d=>{d.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this._rotatePitchHandler.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=i;const u=new qp;this._rotatePitchHandler=new ss({clickTolerance:3,move:(d,g)=>{const w=i.getBoundingClientRect(),C=new s.P((w.bottom-w.top)/2,(w.right-w.left)/2);return{bearingDelta:s.cn(new s.P(d.x,g.y),g,C),pitchDelta:l?-.5*(g.y-d.y):void 0}},moveStateManager:u,enable:!0,assignEvents:()=>{}}),this.map=e,H.addEventListener(i,"mousedown",this.mousedown),H.addEventListener(i,"touchstart",this.touchstart,{passive:!1}),H.addEventListener(i,"touchcancel",this.reset)}startMove(e,i){this._rotatePitchHandler.dragStart(e,i),H.disableDrag()}move(e,i){const l=this.map,{bearingDelta:u,pitchDelta:d}=this._rotatePitchHandler.dragMove(e,i)||{};u&&l.setBearing(l.getBearing()+u),d&&l.setPitch(l.getPitch()+d)}off(){const e=this.element;H.removeEventListener(e,"mousedown",this.mousedown),H.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),H.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),H.removeEventListener(window,"touchend",this.touchend),H.removeEventListener(e,"touchcancel",this.reset),this.offTemp()}offTemp(){H.enableDrag(),H.removeEventListener(window,"mousemove",this.mousemove),H.removeEventListener(window,"mouseup",this.mouseup),H.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),H.removeEventListener(window,"touchend",this.touchend)}}let Dn;function ti(h,e,i,l=!1){if(l||!i.getCoveringTilesDetailsProvider().allowWorldCopies())return h==null?void 0:h.wrap();const u=new s.S(h.lng,h.lat);if(h=new s.S(h.lng,h.lat),e){const d=new s.S(h.lng-360,h.lat),g=new s.S(h.lng+360,h.lat),w=i.locationToScreenPoint(h).distSqr(e);i.locationToScreenPoint(d).distSqr(e)180;){const d=i.locationToScreenPoint(h);if(d.x>=0&&d.y>=0&&d.x<=i.width&&d.y<=i.height)break;h.lng>i.center.lng?h.lng-=360:h.lng+=360}return h.lng!==u.lng&&i.isPointOnMapSurface(i.locationToScreenPoint(h))?h:u}const $l={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 hs(h,e,i){const l=h.classList;for(const u in $l)l.remove(`maplibregl-${i}-anchor-${u}`);l.add(`maplibregl-${i}-anchor-${e}`)}class ds extends s.E{constructor(e){if(super(),this._onKeyPress=i=>{const l=i.code,u=i.charCode||i.keyCode;l!=="Space"&&l!=="Enter"&&u!==32&&u!==13||this.togglePopup()},this._onMapClick=i=>{const l=i.originalEvent.target,u=this._element;this._popup&&(l===u||u.contains(l))&&this.togglePopup()},this._update=i=>{if(!this._map)return;const l=this._map.loaded()&&!this._map.isMoving();((i==null?void 0:i.type)==="terrain"||(i==null?void 0:i.type)==="render"&&!l)&&this._map.once("render",this._update),this._lngLat=ti(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 u="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?u=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(u=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let d="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?d="rotateX(0deg)":this._pitchAlignment==="map"&&(d=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||i&&i.type!=="moveend"||(this._pos=this._pos.round()),H.setTransform(this._element,`${$l[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${d} ${u}`),ne.frameAsync(new AbortController).then((()=>{this._updateOpacity(i&&i.type==="moveend")})).catch((()=>{}))},this._onMove=i=>{if(!this._isDragging){const l=this._clickTolerance||this._map._clickTolerance;this._isDragging=i.point.dist(this._pointerdownPos)>=l}this._isDragging&&(this._pos=i.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 s.l("dragstart"))),this.fire(new s.l("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 s.l("dragend")),this._state="inactive"},this._addDragHandler=i=>{this._element.contains(i.originalEvent.target)&&(i.preventDefault(),this._positionDelta=i.point.sub(this._pos).add(this._offset),this._pointerdownPos=i.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=e&&e.anchor||"center",this._color=e&&e.color||"#3FB1CE",this._scale=e&&e.scale||1,this._draggable=e&&e.draggable||!1,this._clickTolerance=e&&e.clickTolerance||0,this._subpixelPositioning=e&&e.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=e&&e.rotation||0,this._rotationAlignment=e&&e.rotationAlignment||"auto",this._pitchAlignment=e&&e.pitchAlignment&&e.pitchAlignment!=="auto"?e.pitchAlignment:this._rotationAlignment,this.setOpacity(e==null?void 0:e.opacity,e==null?void 0:e.opacityWhenCovered),e&&e.element)this._element=e.element,this._offset=s.P.convert(e&&e.offset||[0,0]);else{this._defaultMarker=!0,this._element=H.create("div");const i=H.createNS("http://www.w3.org/2000/svg","svg"),l=41,u=27;i.setAttributeNS(null,"display","block"),i.setAttributeNS(null,"height",`${l}px`),i.setAttributeNS(null,"width",`${u}px`),i.setAttributeNS(null,"viewBox",`0 0 ${u} ${l}`);const d=H.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,"stroke","none"),d.setAttributeNS(null,"stroke-width","1"),d.setAttributeNS(null,"fill","none"),d.setAttributeNS(null,"fill-rule","evenodd");const g=H.createNS("http://www.w3.org/2000/svg","g");g.setAttributeNS(null,"fill-rule","nonzero");const w=H.createNS("http://www.w3.org/2000/svg","g");w.setAttributeNS(null,"transform","translate(3.0, 29.0)"),w.setAttributeNS(null,"fill","#000000");const C=[{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 ie of C){const ue=H.createNS("http://www.w3.org/2000/svg","ellipse");ue.setAttributeNS(null,"opacity","0.04"),ue.setAttributeNS(null,"cx","10.5"),ue.setAttributeNS(null,"cy","5.80029008"),ue.setAttributeNS(null,"rx",ie.rx),ue.setAttributeNS(null,"ry",ie.ry),w.appendChild(ue)}const P=H.createNS("http://www.w3.org/2000/svg","g");P.setAttributeNS(null,"fill",this._color);const E=H.createNS("http://www.w3.org/2000/svg","path");E.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"),P.appendChild(E);const R=H.createNS("http://www.w3.org/2000/svg","g");R.setAttributeNS(null,"opacity","0.25"),R.setAttributeNS(null,"fill","#000000");const D=H.createNS("http://www.w3.org/2000/svg","path");D.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"),R.appendChild(D);const N=H.createNS("http://www.w3.org/2000/svg","g");N.setAttributeNS(null,"transform","translate(6.0, 7.0)"),N.setAttributeNS(null,"fill","#FFFFFF");const G=H.createNS("http://www.w3.org/2000/svg","g");G.setAttributeNS(null,"transform","translate(8.0, 8.0)");const te=H.createNS("http://www.w3.org/2000/svg","circle");te.setAttributeNS(null,"fill","#000000"),te.setAttributeNS(null,"opacity","0.25"),te.setAttributeNS(null,"cx","5.5"),te.setAttributeNS(null,"cy","5.5"),te.setAttributeNS(null,"r","5.4999962");const ee=H.createNS("http://www.w3.org/2000/svg","circle");ee.setAttributeNS(null,"fill","#FFFFFF"),ee.setAttributeNS(null,"cx","5.5"),ee.setAttributeNS(null,"cy","5.5"),ee.setAttributeNS(null,"r","5.4999962"),G.appendChild(te),G.appendChild(ee),g.appendChild(w),g.appendChild(P),g.appendChild(R),g.appendChild(N),g.appendChild(G),i.appendChild(g),i.setAttributeNS(null,"height",l*this._scale+"px"),i.setAttributeNS(null,"width",u*this._scale+"px"),this._element.appendChild(i),this._offset=s.P.convert(e&&e.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",(i=>{i.preventDefault()})),this._element.addEventListener("mousedown",(i=>{i.preventDefault()})),hs(this._element,this._anchor,"marker"),e&&e.className)for(const i of e.className.split(" "))this._element.classList.add(i);this._popup=null}addTo(e){return this.remove(),this._map=e,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",e._getUIString("Marker.Title")),e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),e.on("terrain",this._update),e.on("projectiontransition",this._update),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),H.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=s.S.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),e){if(!("offset"in e.options)){const u=Math.abs(13.5)/Math.SQRT2;e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[u,-1*(38.1-13.5+u)],"bottom-right":[-u,-1*(38.1-13.5+u)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=e,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(e){return this._subpixelPositioning=e,this}getPopup(){return this._popup}togglePopup(){const e=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:e?(e.isOpen()?e.remove():(e.setLngLat(this._lngLat),e.addTo(this._map)),this):this}_updateOpacity(e=!1){var i,l;const u=(i=this._map)===null||i===void 0?void 0:i.terrain,d=this._map.transform.isLocationOccluded(this._lngLat);if(!u||d){const N=d?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==N&&(this._element.style.opacity=N))}if(e)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout((()=>{this._opacityTimeout=null}),100)}const g=this._map,w=g.terrain.depthAtPoint(this._pos),C=g.terrain.getElevationForLngLatZoom(this._lngLat,g.transform.tileZoom);if(g.transform.lngLatToCameraDepth(this._lngLat,C)-w<.006)return void(this._element.style.opacity=this._opacity);const P=-this._offset.y/g.transform.pixelsPerMeter,E=Math.sin(g.getPitch()*Math.PI/180)*P,R=g.terrain.depthAtPoint(new s.P(this._pos.x,this._pos.y-this._offset.y)),D=g.transform.lngLatToCameraDepth(this._lngLat,C+E)-R>.006;!((l=this._popup)===null||l===void 0)&&l.isOpen()&&D&&this._popup.remove(),this._element.style.opacity=D?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(e){return this._offset=s.P.convert(e),this._update(),this}addClassName(e){this._element.classList.add(e)}removeClassName(e){this._element.classList.remove(e)}toggleClassName(e){return this._element.classList.toggle(e)}setDraggable(e){return this._draggable=!!e,this._map&&(e?(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(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&e!=="auto"?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(e,i){return(this._opacity===void 0||e===void 0&&i===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),e!==void 0&&(this._opacity=e),i!==void 0&&(this._opacityWhenCovered=i),this._map&&this._updateOpacity(!0),this}}const du={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let ps=0,No=!1;const Js={maxWidth:100,unit:"metric"};function Gl(h,e,i){const l=i&&i.maxWidth||100,u=h._container.clientHeight/2,d=h._container.clientWidth/2,g=h.unproject([d-l/2,u]),w=h.unproject([d+l/2,u]),C=Math.round(h.project(w).x-h.project(g).x),P=Math.min(l,C,h._container.clientWidth),E=g.distanceTo(w);if(i&&i.unit==="imperial"){const R=3.2808*E;R>5280?jo(e,P,R/5280,h._getUIString("ScaleControl.Miles")):jo(e,P,R,h._getUIString("ScaleControl.Feet"))}else i&&i.unit==="nautical"?jo(e,P,E/1852,h._getUIString("ScaleControl.NauticalMiles")):E>=1e3?jo(e,P,E/1e3,h._getUIString("ScaleControl.Kilometers")):jo(e,P,E,h._getUIString("ScaleControl.Meters"))}function jo(h,e,i,l){const u=(function(d){const g=Math.pow(10,`${Math.floor(d)}`.length-1);let w=d/g;return w=w>=10?10:w>=5?5:w>=3?3:w>=2?2:w>=1?1:(function(C){const P=Math.pow(10,Math.ceil(-Math.log(C)/Math.LN10));return Math.round(C*P)/P})(w),g*w})(i);h.style.width=e*(u/i)+"px",h.innerHTML=`${u} ${l}`}const pu={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0},fu=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Hl(h){if(h){if(typeof h=="number"){const e=Math.round(Math.abs(h)/Math.SQRT2);return{center:new s.P(0,0),top:new s.P(0,h),"top-left":new s.P(e,e),"top-right":new s.P(-e,e),bottom:new s.P(0,-h),"bottom-left":new s.P(e,-e),"bottom-right":new s.P(-e,-e),left:new s.P(h,0),right:new s.P(-h,0)}}if(h instanceof s.P||Array.isArray(h)){const e=s.P.convert(h);return{center:e,top:e,"top-left":e,"top-right":e,bottom:e,"bottom-left":e,"bottom-right":e,left:e,right:e}}return{center:s.P.convert(h.center||[0,0]),top:s.P.convert(h.top||[0,0]),"top-left":s.P.convert(h["top-left"]||[0,0]),"top-right":s.P.convert(h["top-right"]||[0,0]),bottom:s.P.convert(h.bottom||[0,0]),"bottom-left":s.P.convert(h["bottom-left"]||[0,0]),"bottom-right":s.P.convert(h["bottom-right"]||[0,0]),left:s.P.convert(h.left||[0,0]),right:s.P.convert(h.right||[0,0])}}return Hl(new s.P(0,0))}const mu=B;T.AJAXError=s.cz,T.Event=s.l,T.Evented=s.E,T.LngLat=s.S,T.MercatorCoordinate=s.a1,T.Point=s.P,T.addProtocol=s.cA,T.config=s.a,T.removeProtocol=s.cB,T.AttributionControl=hu,T.BoxZoomHandler=nu,T.CanvasSource=sr,T.CooperativeGesturesHandler=xd,T.DoubleClickZoomHandler=ou,T.DragPanHandler=vd,T.DragRotateHandler=lu,T.EdgeInsets=Mn,T.FullscreenControl=class extends s.E{constructor(h={}){super(),this._onFullscreenChange=()=>{var e;let i=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((e=i==null?void 0:i.shadowRoot)===null||e===void 0)&&e.fullscreenElement;)i=i.shadowRoot.fullscreenElement;i===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,h&&h.container&&(h.container instanceof HTMLElement?this._container=h.container:s.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(h){return this._map=h,this._container||(this._container=this._map.getContainer()),this._controlContainer=H.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){H.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const h=this._fullscreenButton=H.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);H.create("span","maplibregl-ctrl-icon",h).setAttribute("aria-hidden","true"),h.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const h=this._getTitle();this._fullscreenButton.setAttribute("aria-label",h),this._fullscreenButton.title=h}_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 s.l("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new s.l("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},T.GeoJSONSource=tr,T.GeolocateControl=class extends s.E{constructor(h){super(),this._onSuccess=e=>{if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new s.l("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":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(e),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new s.l("geolocate",e)),this._finish()}},this._updateCamera=e=>{const i=new s.S(e.coords.longitude,e.coords.latitude),l=e.coords.accuracy,u=this._map.getBearing(),d=s.e({bearing:u},this.options.fitBoundsOptions),g=_t.fromLngLat(i,l);this._map.fitBounds(g,d,{geolocateSource:!0})},this._updateMarker=e=>{if(e){const i=new s.S(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(i).addTo(this._map),this._userLocationDotMarker.setLngLat(i).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=e=>{if(this._map){if(e.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 i=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(e.code===3&&No)return;this.options.trackUserLocation&&this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new s.l("error",e)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",(e=>e.preventDefault())),this._geolocateButton=H.create("button","maplibregl-ctrl-geolocate",this._container),H.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=e=>{if(this._map){if(e===!1){s.w("Geolocation support is not available so the GeolocateControl will be disabled.");const i=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i)}else{const i=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=H.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new ds({element:this._dotElement}),this._circleElement=H.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new ds({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",(()=>this.trigger())),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(i=>{const l=(i==null?void 0:i[0])instanceof ResizeObserverEntry;i.geolocateSource||this._watchState!=="ACTIVE_LOCK"||l||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 s.l("trackuserlocationend")),this.fire(new s.l("userlocationlostfocus")))}))}},this.options=s.e({},du,h)}onAdd(h){return this._map=h,this._container=H.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return s._(this,arguments,void 0,(function*(e=!1){if(Dn!==void 0&&!e)return Dn;if(window.navigator.permissions===void 0)return Dn=!!window.navigator.geolocation,Dn;try{Dn=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Dn=!!window.navigator.geolocation}return Dn}))})().then((e=>this._finishSetupUI(e))),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(),H.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,ps=0,No=!1}_isOutOfMapMaxBounds(h){const e=this._map.getMaxBounds(),i=h.coords;return e&&(i.longitudee.getEast()||i.latitudee.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",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":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const h=this._map.getBounds(),e=h.getSouthEast(),i=h.getNorthEast(),l=e.distanceTo(i),u=Math.ceil(this._accuracy/(l/this._map._container.clientHeight)*2);this._circleElement.style.width=`${u}px`,this._circleElement.style.height=`${u}px`}trigger(){if(!this._setup)return s.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 s.l("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":ps--,No=!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 s.l("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 s.l("trackuserlocationstart")),this.fire(new s.l("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 h;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),ps++,ps>1?(h={maximumAge:6e5,timeout:0},No=!0):(h=this.options.positionOptions,No=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,h)}}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)}},T.GlobeControl=class{constructor(){this._toggleProjection=()=>{var h;const e=(h=this._map.getProjection())===null||h===void 0?void 0:h.type;this._map.setProjection(e!=="mercator"&&e?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var h;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((h=this._map.getProjection())===null||h===void 0?void 0:h.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(h){return this._map=h,this._container=H.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=H.create("button","maplibregl-ctrl-globe",this._container),H.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._container}onRemove(){H.remove(this._container),this._map.off("styledata",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},T.Hash=Fl,T.ImageSource=Nt,T.KeyboardHandler=jl,T.LngLatBounds=_t,T.LogoControl=wd,T.Map=class extends bd{constructor(h){var e,i;s.cw.mark(s.cx.create);const l=Object.assign(Object.assign(Object.assign({},xa),h),{canvasContextAttributes:Object.assign(Object.assign({},xa.canvasContextAttributes),h.canvasContextAttributes)});if(l.minZoom!=null&&l.maxZoom!=null&&l.minZoom>l.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(l.minPitch!=null&&l.maxPitch!=null&&l.minPitch>l.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(l.minPitch!=null&&l.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(l.maxPitch!=null&&l.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");const u=new an,d=new jn;if(l.minZoom!==void 0&&u.setMinZoom(l.minZoom),l.maxZoom!==void 0&&u.setMaxZoom(l.maxZoom),l.minPitch!==void 0&&u.setMinPitch(l.minPitch),l.maxPitch!==void 0&&u.setMaxPitch(l.maxPitch),l.renderWorldCopies!==void 0&&u.setRenderWorldCopies(l.renderWorldCopies),super(u,d,{bearingSnap:l.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new $a,this._controls=[],this._mapId=s.a7(),this._contextLost=w=>{w.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new s.l("webglcontextlost",{originalEvent:w}))},this._contextRestored=w=>{this._setupPainter(),this.resize(),this._update(),this.fire(new s.l("webglcontextrestored",{originalEvent:w}))},this._onMapScroll=w=>{if(w.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=l.interactive,this._maxTileCacheSize=l.maxTileCacheSize,this._maxTileCacheZoomLevels=l.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},l.canvasContextAttributes),this._trackResize=l.trackResize===!0,this._bearingSnap=l.bearingSnap,this._centerClampedToGround=l.centerClampedToGround,this._refreshExpiredTiles=l.refreshExpiredTiles===!0,this._fadeDuration=l.fadeDuration,this._crossSourceCollisions=l.crossSourceCollisions===!0,this._collectResourceTiming=l.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Ui),l.locale),this._clickTolerance=l.clickTolerance,this._overridePixelRatio=l.pixelRatio,this._maxCanvasSize=l.maxCanvasSize,this.transformCameraUpdate=l.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=l.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=Fe.addThrottleControl((()=>this.isMoving())),this._requestManager=new $e(l.transformRequest),typeof l.container=="string"){if(this._container=document.getElementById(l.container),!this._container)throw new Error(`Container '${l.container}' not found.`)}else{if(!(l.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=l.container}if(l.maxBounds&&this.setMaxBounds(l.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.dirty=!0,this._update(!0)})),this.once("idle",(()=>{this._idleTriggered=!0})),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let w=!1;const C=Fo((P=>{this._trackResize&&!this._removed&&(this.resize(P),this.redraw())}),50);this._resizeObserver=new ResizeObserver((P=>{w?C(P):w=!0})),this._resizeObserver.observe(this._container)}this.handlers=new cu(this,l),this._hash=l.hash&&new Fl(typeof l.hash=="string"&&l.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:l.center,elevation:l.elevation,zoom:l.zoom,bearing:l.bearing,pitch:l.pitch,roll:l.roll}),l.bounds&&(this.resize(),this.fitBounds(l.bounds,s.e({},l.fitBoundsOptions,{duration:0}))));const g=typeof l.style=="string"||((i=(e=l.style)===null||e===void 0?void 0:e.projection)===null||i===void 0?void 0:i.type)!=="globe";this.resize(null,g),this._localIdeographFontFamily=l.localIdeographFontFamily,this._validateStyle=l.validateStyle,l.style&&this.setStyle(l.style,{localIdeographFontFamily:l.localIdeographFontFamily}),l.attributionControl&&this.addControl(new hu(typeof l.attributionControl=="boolean"?void 0:l.attributionControl)),l.maplibreLogo&&this.addControl(new wd,l.logoPosition),this.on("style.load",(()=>{if(g||this._resizeTransform(),this.transform.unmodified){const w=s.Q(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(w)}})),this.on("data",(w=>{this._update(w.dataType==="style"),this.fire(new s.l(`${w.dataType}data`,w))})),this.on("dataloading",(w=>{this.fire(new s.l(`${w.dataType}dataloading`,w))})),this.on("dataabort",(w=>{this.fire(new s.l("sourcedataabort",w))}))}_getMapId(){return this._mapId}setGlobalStateProperty(h,e){return this.style.setGlobalStateProperty(h,e),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(h,e){if(e===void 0&&(e=h.getDefaultPosition?h.getDefaultPosition():"top-right"),!h||!h.onAdd)return this.fire(new s.k(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const i=h.onAdd(this);this._controls.push(h);const l=this._controlPositions[e];return e.indexOf("bottom")!==-1?l.insertBefore(i,l.firstChild):l.appendChild(i),this}removeControl(h){if(!h||!h.onRemove)return this.fire(new s.k(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const e=this._controls.indexOf(h);return e>-1&&this._controls.splice(e,1),h.onRemove(this),this}hasControl(h){return this._controls.indexOf(h)>-1}calculateCameraOptionsFromTo(h,e,i,l){return l==null&&this.terrain&&(l=this.terrain.getElevationForLngLatZoom(i,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(h,e,i,l)}resize(h,e=!0){const[i,l]=this._containerDimensions(),u=this._getClampedPixelRatio(i,l);if(this._resizeCanvas(i,l,u),this.painter.resize(i,l,u),this.painter.overLimit()){const g=this.painter.context.gl;this._maxCanvasSize=[g.drawingBufferWidth,g.drawingBufferHeight];const w=this._getClampedPixelRatio(i,l);this._resizeCanvas(i,l,w),this.painter.resize(i,l,w)}this._resizeTransform(e);const d=!this._moving;return d&&(this.stop(),this.fire(new s.l("movestart",h)).fire(new s.l("move",h))),this.fire(new s.l("resize",h)),d&&this.fire(new s.l("moveend",h)),this}_resizeTransform(h=!0){var e;const[i,l]=this._containerDimensions();this.transform.resize(i,l,h),(e=this._requestedCameraState)===null||e===void 0||e.resize(i,l,h)}_getClampedPixelRatio(h,e){const{0:i,1:l}=this._maxCanvasSize,u=this.getPixelRatio(),d=h*u,g=e*u;return Math.min(d>i?i/d:1,g>l?l/g:1)*u}getPixelRatio(){var h;return(h=this._overridePixelRatio)!==null&&h!==void 0?h:devicePixelRatio}setPixelRatio(h){this._overridePixelRatio=h,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(h){return this.transform.setMaxBounds(_t.convert(h)),this._update()}setMinZoom(h){if((h=h??-2)>=-2&&h<=this.transform.maxZoom)return this.transform.setMinZoom(h),this._update(),this.getZoom()=this.transform.minZoom)return this.transform.setMaxZoom(h),this._update(),this.getZoom()>h&&this.setZoom(h),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(h){if((h=h??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(h>=0&&h<=this.transform.maxPitch)return this.transform.setMinPitch(h),this._update(),this.getPitch()180)throw new Error("maxPitch must be less than or equal to 180");if(h>=this.transform.minPitch)return this.transform.setMaxPitch(h),this._update(),this.getPitch()>h&&this.setPitch(h),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(h){return this.transform.setRenderWorldCopies(h),this._update()}project(h){return this.transform.locationToScreenPoint(s.S.convert(h),this.style&&this.terrain)}unproject(h){return this.transform.screenPointToLocation(s.P.convert(h),this.terrain)}isMoving(){var h;return this._moving||((h=this.handlers)===null||h===void 0?void 0:h.isMoving())}isZooming(){var h;return this._zooming||((h=this.handlers)===null||h===void 0?void 0:h.isZooming())}isRotating(){var h;return this._rotating||((h=this.handlers)===null||h===void 0?void 0:h.isRotating())}_createDelegatedListener(h,e,i){if(h==="mouseenter"||h==="mouseover"){let l=!1;return{layers:e,listener:i,delegates:{mousemove:d=>{const g=e.filter((C=>this.getLayer(C))),w=g.length!==0?this.queryRenderedFeatures(d.point,{layers:g}):[];w.length?l||(l=!0,i.call(this,new Qi(h,this,d.originalEvent,{features:w}))):l=!1},mouseout:()=>{l=!1}}}}if(h==="mouseleave"||h==="mouseout"){let l=!1;return{layers:e,listener:i,delegates:{mousemove:g=>{const w=e.filter((C=>this.getLayer(C)));(w.length!==0?this.queryRenderedFeatures(g.point,{layers:w}):[]).length?l=!0:l&&(l=!1,i.call(this,new Qi(h,this,g.originalEvent)))},mouseout:g=>{l&&(l=!1,i.call(this,new Qi(h,this,g.originalEvent)))}}}}{const l=u=>{const d=e.filter((w=>this.getLayer(w))),g=d.length!==0?this.queryRenderedFeatures(u.point,{layers:d}):[];g.length&&(u.features=g,i.call(this,u),delete u.features)};return{layers:e,listener:i,delegates:{[h]:l}}}}_saveDelegatedListener(h,e){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[h]=this._delegatedListeners[h]||[],this._delegatedListeners[h].push(e)}_removeDelegatedListener(h,e,i){if(!this._delegatedListeners||!this._delegatedListeners[h])return;const l=this._delegatedListeners[h];for(let u=0;ue.includes(g)))){for(const g in d.delegates)this.off(g,d.delegates[g]);return void l.splice(u,1)}}}on(h,e,i){if(i===void 0)return super.on(h,e);const l=typeof e=="string"?[e]:e,u=this._createDelegatedListener(h,l,i);this._saveDelegatedListener(h,u);for(const d in u.delegates)this.on(d,u.delegates[d]);return{unsubscribe:()=>{this._removeDelegatedListener(h,l,i)}}}once(h,e,i){if(i===void 0)return super.once(h,e);const l=typeof e=="string"?[e]:e,u=this._createDelegatedListener(h,l,i);for(const d in u.delegates){const g=u.delegates[d];u.delegates[d]=(...w)=>{this._removeDelegatedListener(h,l,i),g(...w)}}this._saveDelegatedListener(h,u);for(const d in u.delegates)this.once(d,u.delegates[d]);return this}off(h,e,i){return i===void 0?super.off(h,e):(this._removeDelegatedListener(h,typeof e=="string"?[e]:e,i),this)}queryRenderedFeatures(h,e){if(!this.style)return[];let i;const l=h instanceof s.P||Array.isArray(h),u=l?h:[[0,0],[this.transform.width,this.transform.height]];if(e=e||(l?{}:h)||{},u instanceof s.P||typeof u[0]=="number")i=[s.P.convert(u)];else{const d=s.P.convert(u[0]),g=s.P.convert(u[1]);i=[d,new s.P(g.x,d.y),g,new s.P(d.x,g.y),d]}return this.style.queryRenderedFeatures(i,e,this.transform)}querySourceFeatures(h,e){return this.style.querySourceFeatures(h,e)}setStyle(h,e){return(e=s.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},e)).diff!==!1&&e.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&h?(this._diffStyle(h,e),this):(this._localIdeographFontFamily=e.localIdeographFontFamily,this._updateStyle(h,e))}setTransformRequest(h){return this._requestManager.setTransformRequest(h),this}_getUIString(h){const e=this._locale[h];if(e==null)throw new Error(`Missing UI string '${h}'`);return e}_updateStyle(h,e){var i,l;if(e.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",(()=>this._updateStyle(h,e)));const u=this.style&&e.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!h)),h?(this.style=new zc(this,e||{}),this.style.setEventedParent(this,{style:this.style}),typeof h=="string"?this.style.loadURL(h,e,u):this.style.loadJSON(h,e,u),this):((l=(i=this.style)===null||i===void 0?void 0:i.projection)===null||l===void 0||l.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new zc(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(h,e){if(typeof h=="string"){const i=this._requestManager.transformRequest(h,"Style");s.j(i,new AbortController).then((l=>{this._updateDiff(l.data,e)})).catch((l=>{l&&this.fire(new s.k(l))}))}else typeof h=="object"&&this._updateDiff(h,e)}_updateDiff(h,e){try{this.style.setState(h,e)&&this._update(!0)}catch(i){s.w(`Unable to perform style diff: ${i.message||i.error||i}. Rebuilding the style from scratch.`),this._updateStyle(h,e)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():s.w("There is no style added to the map.")}addSource(h,e){return this._lazyInitEmptyStyle(),this.style.addSource(h,e),this._update(!0)}isSourceLoaded(h){const e=this.style&&this.style.sourceCaches[h];if(e!==void 0)return e.loaded();this.fire(new s.k(new Error(`There is no source with ID '${h}'`)))}setTerrain(h){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),h){const e=this.style.sourceCaches[h.source];if(!e)throw new Error(`cannot load terrain, because there exists no source with ID: ${h.source}`);this.terrain===null&&e.reload();for(const i in this.style._layers){const l=this.style._layers[i];l.type==="hillshade"&&l.source===h.source&&s.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."),l.type==="color-relief"&&l.source===h.source&&s.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 Or(this.painter,e,h),this.painter.renderToTexture=new Ul(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=i=>{var l;i.dataType==="style"?this.terrain.sourceCache.freeRtt():i.dataType==="source"&&i.tile&&(i.sourceId!==h.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))),((l=i.source)===null||l===void 0?void 0:l.type)==="image"?this.terrain.sourceCache.freeRtt():this.terrain.sourceCache.freeRtt(i.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new s.l("terrain",{terrain:h})),this}getTerrain(){var h,e;return(e=(h=this.terrain)===null||h===void 0?void 0:h.options)!==null&&e!==void 0?e:null}areTilesLoaded(){const h=this.style&&this.style.sourceCaches;for(const e in h){const i=h[e]._tiles;for(const l in i){const u=i[l];if(u.state!=="loaded"&&u.state!=="errored")return!1}}return!0}removeSource(h){return this.style.removeSource(h),this._update(!0)}getSource(h){return this.style.getSource(h)}setSourceTileLodParams(h,e,i){if(i){const l=this.getSource(i);if(!l)throw new Error(`There is no source with ID "${i}", cannot set LOD parameters`);l.calculateTileZoom=lt(Math.max(1,h),Math.max(1,e))}else for(const l in this.style.sourceCaches)this.style.sourceCaches[l].getSource().calculateTileZoom=lt(Math.max(1,h),Math.max(1,e));return this._update(!0),this}refreshTiles(h,e){const i=this.style.sourceCaches[h];if(!i)throw new Error(`There is no source cache with ID "${h}", cannot refresh tile`);e===void 0?i.reload(!0):i.refreshTiles(e.map((l=>new s.a4(l.z,l.x,l.y))))}addImage(h,e,i={}){const{pixelRatio:l=1,sdf:u=!1,stretchX:d,stretchY:g,content:w,textFitWidth:C,textFitHeight:P}=i;if(this._lazyInitEmptyStyle(),!(e instanceof HTMLImageElement||s.b(e))){if(e.width===void 0||e.height===void 0)return this.fire(new s.k(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:E,height:R,data:D}=e,N=e;return this.style.addImage(h,{data:new s.R({width:E,height:R},new Uint8Array(D)),pixelRatio:l,stretchX:d,stretchY:g,content:w,textFitWidth:C,textFitHeight:P,sdf:u,version:0,userImage:N}),N.onAdd&&N.onAdd(this,h),this}}{const{width:E,height:R,data:D}=ne.getImageData(e);this.style.addImage(h,{data:new s.R({width:E,height:R},D),pixelRatio:l,stretchX:d,stretchY:g,content:w,textFitWidth:C,textFitHeight:P,sdf:u,version:0})}}updateImage(h,e){const i=this.style.getImage(h);if(!i)return this.fire(new s.k(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const l=e instanceof HTMLImageElement||s.b(e)?ne.getImageData(e):e,{width:u,height:d,data:g}=l;if(u===void 0||d===void 0)return this.fire(new s.k(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(u!==i.data.width||d!==i.data.height)return this.fire(new s.k(new Error("The width and height of the updated image must be that same as the previous version of the image")));const w=!(e instanceof HTMLImageElement||s.b(e));return i.data.replace(g,w),this.style.updateImage(h,i),this}getImage(h){return this.style.getImage(h)}hasImage(h){return h?!!this.style.getImage(h):(this.fire(new s.k(new Error("Missing required image id"))),!1)}removeImage(h){this.style.removeImage(h)}loadImage(h){return Fe.getImage(this._requestManager.transformRequest(h,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(h,e){return this._lazyInitEmptyStyle(),this.style.addLayer(h,e),this._update(!0)}moveLayer(h,e){return this.style.moveLayer(h,e),this._update(!0)}removeLayer(h){return this.style.removeLayer(h),this._update(!0)}getLayer(h){return this.style.getLayer(h)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(h,e,i){return this.style.setLayerZoomRange(h,e,i),this._update(!0)}setFilter(h,e,i={}){return this.style.setFilter(h,e,i),this._update(!0)}getFilter(h){return this.style.getFilter(h)}setPaintProperty(h,e,i,l={}){return this.style.setPaintProperty(h,e,i,l),this._update(!0)}getPaintProperty(h,e){return this.style.getPaintProperty(h,e)}setLayoutProperty(h,e,i,l={}){return this.style.setLayoutProperty(h,e,i,l),this._update(!0)}getLayoutProperty(h,e){return this.style.getLayoutProperty(h,e)}setGlyphs(h,e={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(h,e),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(h,e,i={}){return this._lazyInitEmptyStyle(),this.style.addSprite(h,e,i,(l=>{l||this._update(!0)})),this}removeSprite(h){return this._lazyInitEmptyStyle(),this.style.removeSprite(h),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(h,e={}){return this._lazyInitEmptyStyle(),this.style.setSprite(h,e,(i=>{i||this._update(!0)})),this}setLight(h,e={}){return this._lazyInitEmptyStyle(),this.style.setLight(h,e),this._update(!0)}getLight(){return this.style.getLight()}setSky(h,e={}){return this._lazyInitEmptyStyle(),this.style.setSky(h,e),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(h,e){return this.style.setFeatureState(h,e),this._update()}removeFeatureState(h,e){return this.style.removeFeatureState(h,e),this._update()}getFeatureState(h){return this.style.getFeatureState(h)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let h=0,e=0;return this._container&&(h=this._container.clientWidth||400,e=this._container.clientHeight||300),[h,e]}_setupContainer(){const h=this._container;h.classList.add("maplibregl-map");const e=this._canvasContainer=H.create("div","maplibregl-canvas-container",h);this._interactive&&e.classList.add("maplibregl-interactive"),this._canvas=H.create("canvas","maplibregl-canvas",e),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 i=this._containerDimensions(),l=this._getClampedPixelRatio(i[0],i[1]);this._resizeCanvas(i[0],i[1],l);const u=this._controlContainer=H.create("div","maplibregl-control-container",h),d=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((g=>{d[g]=H.create("div",`maplibregl-ctrl-${g} `,u)})),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(h,e,i){this._canvas.width=Math.floor(i*h),this._canvas.height=Math.floor(i*e),this._canvas.style.width=`${h}px`,this._canvas.style.height=`${e}px`}_setupPainter(){const h=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0});let e=null;this._canvas.addEventListener("webglcontextcreationerror",(l=>{e={requestedAttributes:h},l&&(e.statusMessage=l.statusMessage,e.type=l.type)}),{once:!0});let i=null;if(i=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,h):this._canvas.getContext("webgl2",h)||this._canvas.getContext("webgl",h),!i){const l="Failed to initialize WebGL";throw e?(e.message=l,new Error(JSON.stringify(e))):new Error(l)}this.painter=new sd(i,this.transform),pe.testSupport(i)}migrateProjection(h,e){super.migrateProjection(h,e),this.painter.transform=h,this.fire(new s.l("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(h){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||h,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(h){return this._update(),this._renderTaskQueue.add(h)}_cancelRenderFrame(h){this._renderTaskQueue.remove(h)}_render(h){var e,i,l,u,d;const g=this._idleTriggered?this._fadeDuration:0,w=((e=this.style.projection)===null||e===void 0?void 0:e.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(h),this._removed)return;let C=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const R=this.transform.zoom,D=ne.now();this.style.zoomHistory.update(R,D);const N=new s.F(R,{now:D,fadeDuration:g,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition(),globalState:this.style.getGlobalState()}),G=N.crossFadingFactor();G===1&&G===this._crossFadingFactor||(C=!0,this._crossFadingFactor=G),this.style.update(N)}const P=((i=this.style.projection)===null||i===void 0?void 0:i.transitionState)>0!==w;(l=this.style.projection)===null||l===void 0||l.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((u=this.style.projection)===null||u===void 0?void 0:u.transitionState,(d=this.style.projection)===null||d===void 0?void 0:d.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||P)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.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._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=this.style&&this.style._updatePlacement(this.transform,this.showCollisionBoxes,g,this._crossSourceCollisions,P),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:g,showPadding:this.showPadding}),this.fire(new s.l("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,s.cw.mark(s.cx.load),this.fire(new s.l("load"))),this.style&&(this.style.hasTransitions()||C)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const E=this._sourcesDirty||this._styleDirty||this._placementDirty;return E||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new s.l("idle")),!this._loaded||this._fullyLoaded||E||(this._fullyLoaded=!0,s.cw.mark(s.cx.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var h;this._hash&&this._hash.remove();for(const i of this._controls)i.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),Fe.removeThrottleControl(this._imageQueueHandle),(h=this._resizeObserver)===null||h===void 0||h.disconnect();const e=this.painter.context.gl.getExtension("WEBGL_lose_context");e!=null&&e.loseContext&&e.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),H.remove(this._canvasContainer),H.remove(this._controlContainer),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),s.cw.clearMetrics(),this._removed=!0,this.fire(new s.l("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,ne.frame(this._frameRequest,(h=>{s.cw.frame(h),this._frameRequest=null;try{this._render(h)}catch(e){if(!s.cy(e)&&!(function(i){return i.message===Vs})(e))throw e}}),(()=>{})))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(h){this._showTileBoundaries!==h&&(this._showTileBoundaries=h,this._update())}get showPadding(){return!!this._showPadding}set showPadding(h){this._showPadding!==h&&(this._showPadding=h,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(h){this._showCollisionBoxes!==h&&(this._showCollisionBoxes=h,h?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(h){this._showOverdrawInspector!==h&&(this._showOverdrawInspector=h,this._update())}get repaint(){return!!this._repaint}set repaint(h){this._repaint!==h&&(this._repaint=h,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(h){this._vertices=h,this._update()}get version(){return Td}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(h){return this._lazyInitEmptyStyle(),this.style.setProjection(h),this._update(!0)}},T.MapMouseEvent=Qi,T.MapTouchEvent=is,T.MapWheelEvent=ru,T.Marker=ds,T.NavigationControl=class{constructor(h){this._updateZoomButtons=()=>{const e=this._map.getZoom(),i=e===this._map.getMaxZoom(),l=e===this._map.getMinZoom();this._zoomInButton.disabled=i,this._zoomOutButton.disabled=l,this._zoomInButton.setAttribute("aria-disabled",i.toString()),this._zoomOutButton.setAttribute("aria-disabled",l.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=(e,i)=>{const l=this._map._getUIString(`NavigationControl.${i}`);e.title=l,e.setAttribute("aria-label",l)},this.options=s.e({},$p,h),this._container=H.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",(e=>e.preventDefault())),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",(e=>this._map.zoomIn({},{originalEvent:e}))),H.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",(e=>this._map.zoomOut({},{originalEvent:e}))),H.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",(e=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:e}):this._map.resetNorth({},{originalEvent:e})})),this._compassIcon=H.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(h){return this._map=h,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 Ks(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){H.remove(this._container),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(h,e){const i=H.create("button",h,this._container);return i.type="button",i.addEventListener("click",e),i}},T.Popup=class extends s.E{constructor(h){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&&H.remove(this._content),this._container&&(H.remove(this._container),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("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new s.l("close"))),this),this._onMouseUp=e=>{this._update(e.point)},this._onMouseMove=e=>{this._update(e.point)},this._onDrag=e=>{this._update(e.point)},this._update=e=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=H.create("div","maplibregl-popup",this._map.getContainer()),this._tip=H.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const g of this.options.className.split(" "))this._container.classList.add(g);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=ti(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),this._trackPointer&&!e)return;const i=this._flatPos=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&e?e:this._map.transform.locationToScreenPoint(this._lngLat));let l=this.options.anchor;const u=Hl(this.options.offset);if(!l){const g=this._container.offsetWidth,w=this._container.offsetHeight;let C;C=i.y+u.bottom.ythis._map.transform.height-w?["bottom"]:[],i.xthis._map.transform.width-g/2&&C.push("right"),l=C.length===0?"bottom":C.join("-")}let d=i.add(u[l]);this.options.subpixelPositioning||(d=d.round()),H.setTransform(this._container,`${$l[l]} translate(${d.x}px,${d.y}px)`),hs(this._container,l,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=s.e(Object.create(pu),h)}addTo(h){return this._map&&this.remove(),this._map=h,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._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),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 s.l("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(h){return this._lngLat=s.S.convert(h),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),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._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(h){return this.setDOMContent(document.createTextNode(h))}setHTML(h){const e=document.createDocumentFragment(),i=document.createElement("body");let l;for(i.innerHTML=h;l=i.firstChild,l;)e.appendChild(l);return this.setDOMContent(e)}getMaxWidth(){var h;return(h=this._container)===null||h===void 0?void 0:h.style.maxWidth}setMaxWidth(h){return this.options.maxWidth=h,this._update(),this}setDOMContent(h){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=H.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(h),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(h){return this._container&&this._container.classList.add(h),this}removeClassName(h){return this._container&&this._container.classList.remove(h),this}setOffset(h){return this.options.offset=h,this._update(),this}toggleClassName(h){if(this._container)return this._container.classList.toggle(h)}setSubpixelPositioning(h){this.options.subpixelPositioning=h}_createCloseButton(){this.options.closeButton&&(this._closeButton=H.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const h=this._container.querySelector(fu);h&&h.focus()}},T.RasterDEMTileSource=er,T.RasterTileSource=Ut,T.ScaleControl=class{constructor(h){this._onMove=()=>{Gl(this._map,this._container,this.options)},this.setUnit=e=>{this.options.unit=e,Gl(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Js),h)}getDefaultPosition(){return"bottom-left"}onAdd(h){return this._map=h,this._container=H.create("div","maplibregl-ctrl maplibregl-ctrl-scale",h.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){H.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},T.ScrollZoomHandler=_d,T.Style=zc,T.TerrainControl=class{constructor(h){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=h}onAdd(h){return this._map=h,this._container=H.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=H.create("button","maplibregl-ctrl-terrain",this._container),H.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(){H.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},T.TwoFingersTouchPitchHandler=Nl,T.TwoFingersTouchRotateHandler=cs,T.TwoFingersTouchZoomHandler=Ol,T.TwoFingersTouchZoomRotateHandler=yd,T.VectorTileSource=Rt,T.VideoSource=Ft,T.addSourceType=(h,e)=>s._(void 0,void 0,void 0,(function*(){if(Vr(h))throw new Error(`A source type called "${h}" already exists.`);((i,l)=>{lr[i]=l})(h,e)})),T.clearPrewarmedResources=function(){const h=it;h&&(h.isPreloaded()&&h.numActive()===1?(h.release(Ae),it=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()"))},T.createTileMesh=Ms,T.getMaxParallelImageRequests=function(){return s.a.MAX_PARALLEL_IMAGE_REQUESTS},T.getRTLTextPluginStatus=function(){return Ir().getRTLTextPluginStatus()},T.getVersion=function(){return mu},T.getWorkerCount=function(){return je.workerCount},T.getWorkerUrl=function(){return s.a.WORKER_URL},T.importScriptInWorkers=function(h){return ot().broadcast("IS",h)},T.prewarm=function(){Pt().acquire(Ae)},T.setMaxParallelImageRequests=function(h){s.a.MAX_PARALLEL_IMAGE_REQUESTS=h},T.setRTLTextPlugin=function(h,e){return Ir().setRTLTextPlugin(h,e)},T.setWorkerCount=function(h){je.workerCount=h},T.setWorkerUrl=function(h){s.a.WORKER_URL=h}}));var z=p;return z}))})(Xd)),Xd.exports}var c4=l4();const qd=Zm(c4);class ev{constructor(a){yr(this,"gm");yr(this,"markers",new Map);yr(this,"canvases",new Map);yr(this,"canvasSize");yr(this,"canvasOpacity",.8);this.input=a,this.gm=new fl(this.input.tileSize);const p=n0(a.img);this.canvasSize=Math.ceil(2e3/p)}place([a,p]){const y=this.gm.latLonToPixelsFloor(a,p,this.input.zoom),M=this.getMarkerId(y),z=this.gm.latLonToPixelBoundsLatLon(a,p,this.input.zoom),T=this.input.map;if(this.input.markerFn&&!this.markers.has(M)){const K=this.input.markerFn();K.setLngLat({lat:z.min[0],lng:(z.max[1]+z.min[1])/2}).addTo(T),this.markers.set(M,K)}const{key:s,pos:B,innerPos:O}=this.getCanvasPos(y);let X=this.canvases.get(s);if(!X){const K=this.canvasSize,ne=B.x*K,H=B.y*K,pe=ne+K-1,ge=H+K-1,Ie=this.gm.pixelsToLatLon(ne,ge+1,this.input.zoom),Ee=this.gm.pixelsToLatLon(pe+1,H,this.input.zoom);X=new u4({id:`${this.input.id}-${s}`,img:this.input.img,canvasSize:this.canvasSize,coordinates:Vm({min:Ie,max:Ee}),layerPaint:{"raster-resampling":"nearest","raster-opacity":this.canvasOpacity}}),X.addTo(this.input.map),this.canvases.set(s,X)}X.place(O.x,O.y)}clear(){const a=this.input.map;for(const p of this.canvases.values())p.removeFrom(a),p.removeDOM();this.canvases.clear();for(const p of this.markers.values())p.remove();this.markers.clear()}clearAndPlace(a){this.clear(),this.place(a)}remove([a,p]){let y=!1;const M=this.gm.latLonToPixelsFloor(a,p,this.input.zoom),{key:z,innerPos:T}=this.getCanvasPos(M),s=this.canvases.get(z);s&&(y=s.remove(T.x,T.y),s.annotationsCount()===0&&(this.canvases.delete(z),s.removeFrom(this.input.map),s.removeDOM()));const B=this.getMarkerId(M),O=this.markers.get(B);return O==null||O.remove(),this.markers.delete(B),y}setCanvasOpacity(a){this.canvasOpacity=a;for(const p of this.canvases.values())p.setOpacity(a)}getMarkerId([a,p]){return`${this.input.id}:${a},${p}`}getCanvasPos([a,p]){const y={x:Math.floor(a/this.canvasSize),y:Math.floor(p/this.canvasSize)},M={x:a%this.canvasSize,y:p%this.canvasSize},z=`${y.x},${y.y}`;return{pos:y,innerPos:M,key:z}}}class u4{constructor(a){yr(this,"annotations",new Set);yr(this,"canvas");yr(this,"imgSize");yr(this,"maps",new Set);this.input=a,this.imgSize=n0(a.img),this.canvas=document.createElement("canvas"),this.canvas.width=this.input.canvasSize*this.imgSize,this.canvas.height=this.input.canvasSize*this.imgSize}place(a,p){const y=this.getPixelKey(a,p);if(this.annotations.has(y))return!1;const M=this.canvas.getContext("2d");if(M){const z=a*this.imgSize,T=p*this.imgSize;M.drawImage(this.input.img,z,T)}return this.annotations.add(y),!0}remove(a,p){const y=this.getPixelKey(a,p);if(!this.annotations.has(y))return!1;const M=this.canvas.getContext("2d");if(M){const z=a*this.imgSize,T=p*this.imgSize;M.clearRect(z,T,this.imgSize,this.imgSize)}return this.annotations.delete(y),!0}addTo(a){const p=this.input.id;a.getSource(p)||a.addSource(p,{type:"canvas",canvas:this.canvas,coordinates:this.input.coordinates}),a.getLayer(p)||a.addLayer({id:p,type:"raster",source:p,paint:this.input.layerPaint}),this.maps.add(a)}removeFrom(a){const{id:p}=this.input;a.getLayer(p)&&a.removeLayer(p),a.getSource(p)&&a.removeSource(p),this.maps.delete(a)}removeDOM(){this.canvas.remove()}annotationsCount(){return this.annotations.size}setOpacity(a){for(const p of this.maps.values())p.setPaintProperty(this.input.id,"raster-opacity",a)}getPixelKey(a,p){return`${a},${p}`}}function n0(m){return Math.max(m.naturalWidth,m.naturalHeight)}function h4(){return window.matchMedia("(display-mode: standalone)").matches||"standalone"in window.navigator&&window.navigator.standalone===!0}function xc(m,a){return a.includes(m)}function d4(m){const a={opaque:!0},p=m.searchParams.get("lat"),y=m.searchParams.get("lng");p&&y&&(a.pos={lat:parseFloat(p),lng:parseFloat(y)});const M=m.searchParams.get("zoom");M&&(a.zoom=parseFloat(M));const z=m.searchParams.get("season");z&&(a.season=parseInt(z));const T=m.searchParams.get("opaque");return T&&(a.opaque=T!=="0"),m.searchParams.get("select")&&(a.select=!0),a.newUser=!!m.searchParams.get("new-user"),a.discordLinked=!!m.searchParams.get("discord-linked"),a.alliance=!!m.searchParams.get("alliance"),a}function p4(m,a){return m=new URL(m),a.pos!==void 0&&(m.searchParams.set("lat",a.pos.lat.toString()),m.searchParams.set("lng",a.pos.lng.toString())),a.zoom!==void 0&&m.searchParams.set("zoom",a.zoom.toString()),a.season!==void 0&&m.searchParams.set("season",a.season.toString()),a.opaque!==void 0&&m.searchParams.set("opaque",a.opaque?"1":"0"),a.newUser!==void 0&&m.searchParams.set("new-user",a.newUser?"1":"0"),a.alliance!==void 0&&m.searchParams.set("alliance",a.alliance?"1":"0"),a.select&&m.searchParams.set("alliance","1"),m}const Yd=bi({shouldReload:!0});var f4=(m,a)=>{var p;(p=a())==null||p.close()},m4=Te(' ');function _4(m,a){Lr(a,!0);let p=Lt(a,"ref",15),y=st(!1),M=st(bi(a.description)),z=st(void 0);Fn(()=>{const De=ze=>{var Fe;ze.key==="Escape"&&((Fe=p())==null||Fe.close())};return document.addEventListener("keydown",De),()=>document.removeEventListener("keydown",De)});var T=m4(),s=A(T),B=A(s),O=A(B,!0);k(B);var X=V(B,2),K=A(X),ne=A(K);{let De=pt(()=>Hv());yx(ne,{class:"h-24 rounded-lg",get placeholder(){return x(De)},max:512,get value(){return x(M)},set value(ze){se(M,ze,!0)},get validate(){return x(z)},set validate(ze){se(z,ze,!0)}})}k(K);var H=V(K,2),pe=A(H);pe.__click=[f4,p];var ge=A(pe,!0);k(pe);var Ie=V(pe,2),Ee=A(Ie,!0);k(Ie),k(H),k(X),k(s),vn(2),k(T),Ko(T,De=>p(De),()=>p()),We((De,ze,Fe)=>{de(O,De),pe.disabled=x(y),de(ge,ze),Ie.disabled=x(y),de(Ee,Fe)},[()=>bx(),()=>Ah(),()=>jT()]),di("submit",X,async()=>{var De,ze,Fe;try{if(!((De=x(z))!=null&&De()))return;se(y,!0),a.description!==x(M)&&await Qr.updateAllianceDescription(x(M)),await((ze=a.onsuccess)==null?void 0:ze.call(a,x(M))),(Fe=p())==null||Fe.close()}catch($e){Fr.error($e.message)}finally{se(y,!1)}}),$(m,T),Dr()}$n(["click"]);var g4=(m,a,p)=>{navigator.clipboard.writeText(x(a).toString()),se(p,!0),setTimeout(()=>{se(p,!1)},1e3)},v4=Te(''),y4=Te(' ');function x4(m,a){Lr(a,!0);let p=Lt(a,"open",15),y=st(""),M=st(!1);const z=pt(()=>yi.url.origin+`/join?id=${x(y)}`);Hr(()=>{p()&&Qr.getAllianceInvites().then(Je=>{se(y,Je[0],!0)}).catch(Je=>{Fr.error(Je.message)})}),Fn(()=>{const Je=qe=>{qe.key==="Escape"&&p(!1)};return document.addEventListener("keydown",Je),()=>document.removeEventListener("keydown",Je)});var T=y4(),s=A(T),B=V(A(s),2),O=A(B,!0);k(B);var X=V(B,2),K=A(X,!0);k(X);var ne=V(X,2),H=A(ne);let pe;var ge=A(H);Ka(ge);var Ie=V(ge,2),Ee=A(Ie);let De;Ee.__click=[g4,z,M];var ze=A(Ee,!0);k(Ee),k(Ie),k(H);var Fe=V(H,2);{var $e=Je=>{var qe=v4();$(Je,qe)};Ne(Fe,Je=>{x(y)||Je($e)})}k(ne),k(s),vn(2),k(T),Ni(T,()=>Je=>{Hr(()=>{p()?Je.show():Je.close()})}),We((Je,qe,Ze,Qe,Le,et)=>{de(O,Je),de(K,qe),pe=zr(H,1,"border-base-content/20 rounded-field relative flex w-full items-center gap-1 border-2 py-1.5 pl-4 pr-2.5",null,pe,Ze),Av(ge,Qe),De=zr(Ee,1,"btn btn-primary",null,De,Le),de(ze,et)},[()=>V3(),()=>U3(),()=>({invisible:!x(y)}),()=>x(z).toString(),()=>({"btn-success":x(M)}),()=>x(M)?Fm():Wf()]),di("close",T,()=>p(!1)),$(m,T),Dr()}$n(["click"]);var b4=Sr('');function Qf(m,a){let p=rr(a,["$$slots","$$events","$$legacy"]);var y=b4();ir(y,()=>({viewBox:"0 0 256 199",width:"256",height:"199",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid",...p})),$(m,y)}var w4=Te('(Verified)'),T4=Te(''),C4=async(m,a)=>{await navigator.clipboard.writeText(a.username),Fr.info(HC())},S4=Te(""),P4=Te('
                  ');function Eh(m,a){Lr(a,!0);const p=!!a.id;var y=P4(),M=A(y),z=A(M),T=A(z);k(z);var s=V(z,2);{var B=ne=>{var H=w4();$(ne,H)};Ne(s,ne=>{p&&ne(B)})}k(M);var O=V(M,2);{var X=ne=>{var H=T4(),pe=A(H);Qf(pe,{class:"size-4 opacity-70"}),k(H),We(ge=>wr(H,"href",ge),[()=>`https://discord.com/users/${encodeURIComponent(a.id)}`]),$(ne,H)},K=ne=>{var H=S4();H.__click=[C4,a];var pe=A(H);Qf(pe,{class:"size-4 opacity-70"}),k(H),$(ne,H)};Ne(O,ne=>{p?ne(X):ne(K,!1)})}k(y),We(()=>de(T,`Discord: ${a.username??""}`)),$(m,y),Dr()}$n(["click"]);var I4=Te(''),M4=Te('
                  ');function Um(m,a){Lr(a,!0);const p=[];let y=Lt(a,"value",15,"today"),M=[{value:"today",label:vp()},{value:"week",label:iT()},{value:"month",label:sT()},{value:"all-time",label:uT()}];var z=M4();hi(z,21,()=>M,T=>T.value,(T,s)=>{var B=I4();Ka(B);var O;We(()=>{wr(B,"aria-label",x(s).label),O!==(O=x(s).value)&&(B.value=(B.__value=x(s).value)??"")}),Lm(p,[],B,()=>(x(s).value,y()),y),$(T,B)}),k(z),$(m,z),Dr()}const k4=typeof window<"u"?window:void 0;function A4(m){let a=m.activeElement;for(;a!=null&&a.shadowRoot;){const p=a.shadowRoot.activeElement;if(p===a)break;a=p}return a}var bc,Xu,Pv;let E4=(Pv=class{constructor(a={}){Ar(this,bc);Ar(this,Xu);const{window:p=k4,document:y=p==null?void 0:p.document}=a;p!==void 0&&(na(this,bc,y),na(this,Xu,Ev(M=>{const z=Nu(p,"focusin",M),T=Nu(p,"focusout",M);return()=>{z(),T()}})))}get current(){var a;return(a=at(this,Xu))==null||a.call(this),at(this,bc)?A4(at(this,bc)):null}},bc=new WeakMap,Xu=new WeakMap,Pv);new E4;function z4(m,a){switch(m){case"post":Hr(a);break;case"pre":Mm(a);break}}function i0(m,a,p,y={}){const{lazy:M=!1}=y;let z=!M,T=Array.isArray(m)?[]:void 0;z4(a,()=>{const s=Array.isArray(m)?m.map(O=>O()):m();if(!z){z=!0,T=s;return}const B=ul(()=>p(s,T));return T=s,B})}function dl(m,a,p){i0(m,"post",a,p)}function L4(m,a,p){i0(m,"pre",a,p)}dl.pre=L4;var D4=Te(''),R4=Te('
                  '),B4=Te(' '),F4=(m,a,p)=>{a.onlastpixelclick({lat:x(p).lastLatitude??0,lng:x(p).lastLongitude??0})},O4=Te(""),N4=Te('
                  '),j4=Te('
                  '),V4=Te('
                  ');function q4(m,a){Lr(a,!0);let p=Lt(a,"reload",15),y=st(!0),M=st([]),z=st(0),T=st("today"),s={};p(B);function B(){const ge=x(T);Qr.allianceLeaderboard(ge).then(Ie=>{se(M,Ie),s={[ge]:Ie},se(y,!1)}).catch(Ie=>{Fr.error(Ie.message)})}dl(()=>[x(T)],()=>{const ge=x(T),Ie=s[ge];if(Ie){se(M,Ie),se(y,!1);return}se(y,!0),Qr.allianceLeaderboard(ge).then(Ee=>{se(M,Ee),s[ge]=Ee,se(y,!1)}).catch(Ee=>{Fr.error(Ee.message)})});var O=V4(),X=A(O);Um(X,{get value(){return x(T)},set value(ge){se(T,ge,!0)}});var K=V(X,2),ne=A(K);{var H=ge=>{var Ie=D4();$(ge,Ie)},pe=ge=>{var Ie=Qt(),Ee=Ct(Ie);{var De=Fe=>{var $e=R4(),Je=A($e),qe=V(Je);{var Ze=Le=>{var et=wi();We(nt=>de(et,nt),[()=>vp().toLowerCase()]),$(Le,et)},Qe=Le=>{var et=Qt(),nt=Ct(et);{var Ue=yt=>{var Q=wi();We(re=>de(Q,re),[()=>Nm()]),$(yt,Q)},Me=yt=>{var Q=Qt(),re=Ct(Q);{var he=oe=>{var Ae=wi();We(je=>de(Ae,je),[()=>jm()]),$(oe,Ae)};Ne(re,oe=>{x(T)==="month"&&oe(he)},!0)}$(yt,Q)};Ne(nt,yt=>{x(T)==="week"?yt(Ue):yt(Me,!1)},!0)}$(Le,et)};Ne(qe,Le=>{x(T)==="today"?Le(Ze):Le(Qe,!1)})}k($e),We(Le=>de(Je,`${Le??""} `),[()=>Om()]),$(Fe,$e)},ze=Fe=>{var $e=j4(),Je=A($e),qe=A(Je),Ze=V(A(qe)),Qe=A(Ze,!0);k(Ze);var Le=V(Ze),et=A(Le,!0);k(Le),k(qe),k(Je);var nt=V(Je);hi(nt,31,()=>x(M),Ue=>Ue.userId,(Ue,Me,yt)=>{const Q=pt(()=>{var Ut;return((Ut=Mt.data)==null?void 0:Ut.id)===x(Me).userId});var re=N4();let he;var oe=A(re),Ae=A(oe,!0);k(oe);var je=V(oe),ft=A(je),it=A(ft);co(it,{class:"size-10 border",get userId(){return x(Me).userId},get pictureUrl(){return x(Me).picture}});var ut=V(it,2),Pt=A(ut),Dt=V(Pt),ot=A(Dt);k(Dt),k(ut);var dt=V(ut,2);{var vt=Ut=>{const er=pt(()=>So(x(Me).equippedFlag));var tr=B4(),Nt=A(tr,!0);k(tr),We(()=>{wr(tr,"data-tip",x(er).name),de(Nt,x(er).flag)}),$(Ut,tr)};Ne(dt,Ut=>{x(Me).equippedFlag&&Ut(vt)})}var xt=V(dt,2);{var It=Ut=>{Eh(Ut,{get username(){return x(Me).discord},get id(){return x(Me).discordId}})};Ne(xt,Ut=>{x(Me).discord&&Ut(It)})}k(ft),k(je);var wt=V(je),_t=A(wt),Et=V(_t);{var Rt=Ut=>{var er=O4();let tr;er.__click=[F4,a,Me];var Nt=A(er);Em(Nt,{class:"size-4"}),k(er),We((Ft,sr)=>{tr=zr(er,1,"btn btn-sm btn-ghost absolute -right-2 top-1/2 !-translate-y-1/2 sm:right-4",null,tr,Ft),wr(er,"data-tip",sr)},[()=>({tooltip:x(z)>640}),()=>Mx()]),$(Ut,er)};Ne(Et,Ut=>{x(Me).lastLatitude&&x(Me).lastLongitude&&Ut(Rt)})}k(wt),k(re),We((Ut,er,tr)=>{var Nt;he=zr(re,1,"",null,he,Ut),de(Ae,x(yt)+1),zr(ut,1,`font-semibold ${er??""} flex gap-1`),de(Pt,`${(x(Q)?((Nt=Mt.data)==null?void 0:Nt.name)??x(Me).name:x(Me).name)??""} `),de(ot,`#${x(Me).userId??""}`),de(_t,`${tr??""} `)},[()=>({"bg-base-200":x(Q)}),()=>Oi(x(Me).userId),()=>x(Me).pixelsPainted.toLocaleString("en-US")]),ll(re,()=>cl,()=>({duration:200})),$(Ue,re)}),k(nt),k($e),We((Ue,Me)=>{de(Qe,Ue),de(et,Me)},[()=>Dm(),()=>zm()]),$(Fe,$e)};Ne(Ee,Fe=>{x(M).length===0?Fe(De):Fe(ze,!1)},!0)}$(ge,Ie)};Ne(ne,ge=>{x(y)?ge(H):ge(pe,!1)})}k(K),k(O),mp("innerWidth",ge=>se(z,ge,!0)),$(m,O),Dr()}$n(["click"]);var Z4=Sr('');function $m(m,a){let p=rr(a,["$$slots","$$events","$$legacy"]);var y=Z4();ir(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...p})),$(m,y)}var U4=(m,a)=>a.onclickback(),$4=Te('
                  ADMIN
                  '),G4=async(m,a)=>{try{x(a).loading=!0,await Qr.giveAllianceAdmin(x(a).id),x(a).role="admin"}catch{Fr.error(gS())}finally{x(a).loading=!1}},H4=async(m,a,p)=>{try{x(a).loading=!0,await Qr.banAllianceUser(x(a).id),p.data=p.data.filter(y=>y.id!==x(a).id)}catch{Fr.error(ZT())}finally{x(a).loading=!1}},W4=Te('
                • ',1),X4=Te('
                • '),Y4=Te('
                  '),K4=Te('
                  '),J4=(m,a,p)=>{Qr.unbanAllianceUser(x(a).id).then(()=>{p.data=p.data.filter(y=>y.id!==x(a).id)}).catch(y=>Fr.error(y.message)).finally(()=>{x(a).loading=!1})},Q4=Te('
                  '),eM=Te('
                  '),tM=Te('
                  '),rM=Te('

                  ');function nM(m,a){Lr(a,!0);let p=bi({data:[],page:0,hasNextPage:!0,loading:!1}),y=bi({data:[],page:0,hasNextPage:!0,loading:!1});var M=rM(),z=A(M),T=A(z);T.__click=[U4,a];var s=A(T);Dx(s,{class:"size-5"}),k(T);var B=V(T,2),O=A(B,!0);k(B),k(z);var X=V(z,2),K=A(X);Ka(K);var ne=V(K,2),H=A(ne),pe=A(H);hi(pe,21,()=>p.data,Qe=>Qe.id,(Qe,Le,et)=>{const nt=pt(()=>{var vt;return((vt=Mt.data)==null?void 0:vt.id)===x(Le).id});var Ue=Y4(),Me=A(Ue),yt=A(Me),Q=A(yt);co(Q,{class:"size-10 border",get userId(){return x(Le).id},get pictureUrl(){return x(Le).picture}});var re=V(Q,2),he=A(re);k(re);var oe=V(re,2);{var Ae=vt=>{var xt=$4();$(vt,xt)};Ne(oe,vt=>{x(Le).role==="admin"&&vt(Ae)})}k(yt),k(Me);var je=V(Me),ft=A(je),it=A(ft),ut=A(it);$m(ut,{class:"size-4"}),k(it);var Pt=V(it,2),Dt=A(Pt);{var ot=vt=>{var xt=W4(),It=Ct(xt),wt=A(It);wt.__click=[G4,Le];var _t=A(wt,!0);k(wt),k(It);var Et=V(It,2),Rt=A(Et);Rt.__click=[H4,Le,p];var Ut=A(Rt,!0);k(Rt),k(Et),We((er,tr)=>{wt.disabled=x(Le).loading,de(_t,er),Rt.disabled=x(Le).loading,de(Ut,tr)},[()=>PT(),()=>Wv()]),$(vt,xt)},dt=vt=>{var xt=X4(),It=A(xt);It.disabled=!0;var wt=A(It,!0);k(It),k(xt),We(_t=>de(wt,_t),[()=>ET()]),$(vt,xt)};Ne(Dt,vt=>{x(Le).role==="member"?vt(ot):vt(dt,!1)})}k(Pt),k(ft),k(je),k(Ue),We(vt=>{var xt;zr(re,1,`font-semibold ${vt??""}`),de(he,`${(x(nt)?((xt=Mt.data)==null?void 0:xt.name)??x(Le).name:x(Le).name)??""} #${x(Le).id??""}`)},[()=>Oi(x(Le).id)]),$(Qe,Ue)}),k(pe),k(H);var ge=V(H,2);{var Ie=Qe=>{var Le=Qt(),et=Ct(Le);ju(et,()=>p.page,nt=>{var Ue=K4();Ni(Ue,()=>Me=>{const yt=new IntersectionObserver(Q=>{Q[0].isIntersecting&&!p.loading&&(p.loading=!0,Qr.getAllianceMembers(p.page).then(re=>{p.data=[...p.data,...re.data],p.hasNextPage=re.hasNext,p.page++}).catch(re=>{Fr.error(re.message)}).finally(()=>{p.loading=!1}))});return yt.observe(Me),()=>{yt.disconnect()}}),$(nt,Ue)}),$(Qe,Le)};Ne(ge,Qe=>{p.hasNextPage&&Qe(Ie)})}k(ne);var Ee=V(ne,2),De=V(Ee,2),ze=A(De),Fe=A(ze);hi(Fe,21,()=>y.data,Qe=>Qe.id,(Qe,Le,et)=>{var nt=Q4(),Ue=A(nt),Me=A(Ue),yt=A(Me);co(yt,{class:"size-10 border",get userId(){return x(Le).id},get pictureUrl(){return x(Le).picture}});var Q=V(yt,2),re=A(Q);k(Q),k(Me),k(Ue);var he=V(Ue),oe=A(he);oe.__click=[J4,Le,y];var Ae=A(oe,!0);k(oe),k(he),k(nt),We((je,ft)=>{zr(Q,1,`font-semibold ${je??""}`),de(re,`${x(Le).name??""} #${x(Le).id??""}`),oe.disabled=x(Le).loading,de(Ae,ft)},[()=>Oi(x(Le).id),()=>DT()]),$(Qe,nt)}),k(Fe),k(ze);var $e=V(ze,2);{var Je=Qe=>{var Le=eM(),et=A(Le,!0);k(Le),We(nt=>de(et,nt),[()=>FT()]),$(Qe,Le)};Ne($e,Qe=>{!y.hasNextPage&&y.data.length===0&&Qe(Je)})}var qe=V($e,2);{var Ze=Qe=>{var Le=Qt(),et=Ct(Le);ju(et,()=>y.page,nt=>{var Ue=tM();Ni(Ue,()=>Me=>{const yt=new IntersectionObserver(Q=>{Q[0].isIntersecting&&!y.loading&&(y.loading=!0,Qr.getAllianceBannedMembers(y.page).then(re=>{y.data=[...y.data,...re.data],y.hasNextPage=re.hasNext,y.page++}).catch(re=>{Fr.error(re.message)}).finally(()=>{y.loading=!1}))});return yt.observe(Me),()=>{yt.disconnect()}}),$(nt,Ue)}),$(Qe,Le)};Ne(qe,Qe=>{y.hasNextPage&&Qe(Ze)})}k(De),k(X),k(M),We((Qe,Le,et)=>{de(O,Qe),wr(K,"aria-label",Le),wr(Ee,"aria-label",et)},[()=>Dv(),()=>GT(),()=>Xv()]),$(m,M),Dr()}$n(["click"]);var iM=Te(' '),aM=Te(''),oM=Te('

                  '),sM=Te('
                  ');function em(m,a){Lr(a,!0);let p=Lt(a,"value",15),y=Lt(a,"validate",15),M=st("");const z=pt(()=>{var Ee;return((Ee=p())==null?void 0:Ee.length)??0});y(T);function T(){return a.min!==void 0&&x(z)a.max?(se(M,`Max. characters: ${a.max}`),!1):!0}Hr(()=>{var Ee;a.max!==void 0&&x(z)>a.max&&p((Ee=p())==null?void 0:Ee.substring(0,a.max))});var s=sM(),B=A(s);let O;var X=A(B);{var K=Ee=>{var De=iM(),ze=A(De,!0);k(De),We(()=>de(ze,a.label)),$(Ee,De)};Ne(X,Ee=>{a.label&&Ee(K)})}var ne=V(X,2);Ka(ne);var H=V(ne,2);{var pe=Ee=>{var De=aM(),ze=A(De,!0);k(De),We(()=>de(ze,a.max-x(z))),$(Ee,De)};Ne(H,Ee=>{a.max!==void 0&&Ee(pe)})}k(B);var ge=V(B,2);{var Ie=Ee=>{var De=oM(),ze=A(De,!0);k(De),We(()=>de(ze,x(M))),$(Ee,De)};Ne(ge,Ee=>{x(M)&&Ee(Ie)})}k(s),We(Ee=>{O=zr(B,1,"input w-full",null,O,Ee),wr(ne,"placeholder",a.placeholder),wr(ne,"maxlength",a.max)},[()=>({"input-error":!!x(M)})]),dp(ne,p),$(m,s),Dr()}var lM=(m,a)=>{var p;(p=a())==null||p.close()},cM=Te(' ');function uM(m,a){Lr(a,!0);let p=Lt(a,"ref",15),y=st(!1),M=st(""),z=st(void 0);Fn(()=>{const De=ze=>{var Fe;ze.key==="Escape"&&((Fe=p())==null||Fe.close())};return document.addEventListener("keydown",De),()=>document.removeEventListener("keydown",De)});var T=cM(),s=A(T),B=A(s),O=A(B,!0);k(B);var X=V(B,2),K=A(X),ne=A(K);{let De=pt(()=>Kf()),ze=pt(()=>xT());em(ne,{get label(){return x(De)},get placeholder(){return x(ze)},min:1,max:16,get value(){return x(M)},set value(Fe){se(M,Fe,!0)},get validate(){return x(z)},set validate(Fe){se(z,Fe,!0)}})}k(K);var H=V(K,2),pe=A(H);pe.__click=[lM,p];var ge=A(pe,!0);k(pe);var Ie=V(pe,2),Ee=A(Ie,!0);k(Ie),k(H),k(X),k(s),vn(2),k(T),Ko(T,De=>p(De),()=>p()),We((De,ze,Fe)=>{de(O,De),pe.disabled=x(y),de(ge,ze),Ie.disabled=x(y),de(Ee,Fe)},[()=>gT(),()=>Ah(),()=>TT()]),di("submit",X,async()=>{var De,ze;try{if(!((De=x(z))!=null&&De()))return;se(y,!0);const{id:Fe}=await Qr.createAlliance(x(M));await a.onsuccess(Fe),(ze=p())==null||ze.close()}catch(Fe){Fr.error(Fe.message)}finally{se(y,!1)}}),$(m,T),Dr()}$n(["click"]);var hM=Sr('');function zh(m,a){let p=rr(a,["$$slots","$$events","$$legacy"]);var y=hM();ir(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...p})),$(m,y)}var dM=Sr(''),pM=Sr('');function tm(m,a){let p=rr(a,["$$slots","$$events","$$legacy","filled"]);var y=Qt(),M=Ct(y);{var z=s=>{var B=dM();ir(B,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...p})),$(s,B)},T=s=>{var B=pM();ir(B,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...p})),$(s,B)};Ne(M,s=>{a.filled?s(z):s(T,!1)})}$(m,y)}var fM=Sr('');function mM(m,a){let p=rr(a,["$$slots","$$events","$$legacy"]);var y=fM();ir(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...p})),$(m,y)}var _M=Sr('');function gM(m,a){let p=rr(a,["$$slots","$$events","$$legacy"]);var y=_M();ir(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...p})),$(m,y)}var vM=Sr('');function yM(m,a){let p=rr(a,["$$slots","$$events","$$legacy"]);var y=vM();ir(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...p})),$(m,y)}var xM=Sr('');function yp(m,a){let p=rr(a,["$$slots","$$events","$$legacy"]);var y=xM();ir(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...p})),$(m,y)}function bM(m,a="_blank"){return m.replaceAll(/https?:\/\/[^\s]+/g,p=>`${p}`)}var wM=Te('
                  '),TM=async(m,a,p,y)=>{try{se(a,!0),await Qr.leaveAlliance(),se(p,!0),await y()}catch(M){Fr.error(M.message)}finally{se(a,!1)}},CM=(m,a)=>{se(a,!0)},SM=Te('
                  '),PM=(m,a)=>{var p;(p=x(a))==null||p.show()},IM=Te(''),MM=Te(''),kM=Te(' '),AM=(m,a)=>se(a,!0),EM=Te(''),zM=(m,a,p)=>{var y;(y=x(a))!=null&&y.hq?p.onhqclick({lat:x(a).hq.latitude,lng:x(a).hq.longitude}):p.onhqchange()},LM=Te(' '),DM=Te(' '),RM=Te(''),BM=Te('
                  '),FM=Te('

                  ',1),OM=(m,a)=>{var p;(p=x(a))==null||p.show()},NM=Te('
                  ',1),jM=Te('
                  ');function VM(m,a){Lr(a,!0);let p=st(void 0),y=st(!0),M=st(void 0),z=st(!1),T=st(void 0),s=st(!1),B=st(!1),O=st(()=>{});dl(()=>a.open,()=>{a.open&&Yd.shouldReload&&X()}),Fn(()=>{const ge=setInterval(()=>{Yd.shouldReload=!0},1e4);return()=>{clearTimeout(ge)}});async function X(){try{se(p,await Qr.getAlliance(),!0),x(p)&&x(O)(),se(y,!1),Yd.shouldReload=!1}catch(ge){Fr.error(ge.message)}}var K=jM(),ne=A(K);{var H=ge=>{var Ie=wM();$(ge,Ie)},pe=ge=>{var Ie=Qt(),Ee=Ct(Ie);{var De=Fe=>{nM(Fe,{onclickback:()=>se(B,!1)})},ze=Fe=>{var $e=Qt(),Je=Ct($e);{var qe=Qe=>{var Le=FM(),et=Ct(Le),nt=A(et),Ue=A(nt,!0);k(nt);var Me=V(nt,2),yt=A(Me),Q=A(yt),re=A(Q);$m(re,{class:"size-4"}),k(Q);var he=V(Q,2),oe=A(he),Ae=A(oe);Ae.__click=[TM,z,y,X];var je=A(Ae,!0);k(Ae),k(oe),k(he),k(yt);var ft=V(yt,2);{var it=le=>{var j=SM(),Z=A(j);Z.__click=[CM,s];var Y=A(Z);yM(Y,{class:"size-4"}),k(Z),k(j),We(ae=>wr(j,"data-tip",ae),[()=>K3()]),$(le,j)};Ne(ft,le=>{x(p).role=="admin"&&le(it)})}k(Me),k(et);var ut=V(et,2);{var Pt=le=>{var j=MM(),Z=A(j);Am(Z,()=>bM(x(p).description||Hv()));var Y=V(Z,2);{var ae=fe=>{var Se=IM();Se.__click=[PM,T];var ke=A(Se);tm(ke,{class:"size-4"}),k(Se),$(fe,Se)};Ne(Y,fe=>{x(p).role==="admin"&&fe(ae)})}k(j),$(le,j)};Ne(ut,le=>{(x(p).description||x(p).role==="admin")&&le(Pt)})}var Dt=V(ut,2),ot=A(Dt),dt=A(ot);zh(dt,{class:"inline size-4"});var vt=V(dt,2),xt=A(vt),It=V(xt),wt=A(It,!0);k(It),k(vt),k(ot);var _t=V(ot,2),Et=A(_t);yp(Et,{class:"inline size-4"});var Rt=V(Et,2),Ut=A(Rt),er=V(Ut);{var tr=le=>{var j=kM(),Z=A(j,!0);k(j),We(Y=>de(Z,Y),[()=>x(p).members.toLocaleString("en-US")]),$(le,j)},Nt=le=>{var j=EM();j.__click=[AM,B];var Z=A(j,!0);k(j),We(Y=>de(Z,Y),[()=>x(p).members.toLocaleString("en-US")]),$(le,j)};Ne(er,le=>{x(p).role==="member"?le(tr):le(Nt,!1)})}k(Rt),k(_t);var Ft=V(_t,2);{var sr=le=>{var j=BM(),Z=A(j);mM(Z,{class:"inline size-4"});var Y=V(Z,2),ae=A(Y),fe=V(ae);fe.__click=[zM,p,a];var Se=A(fe);{var ke=Ye=>{var kt=LM(),xe=A(kt);k(kt),We((Ot,cr)=>de(xe,`${Ot??""}, ${cr??""}`),[()=>x(p).hq.latitude.toFixed(3),()=>x(p).hq.longitude.toFixed(3)]),$(Ye,kt)},we=Ye=>{var kt=DM(),xe=A(kt,!0);k(kt),We(Ot=>de(xe,Ot),[()=>P3()]),$(Ye,kt)};Ne(Se,Ye=>{x(p).hq?Ye(ke):Ye(we,!1)})}k(fe),k(Y);var Oe=V(Y,2);{var lt=Ye=>{var kt=RM();kt.__click=function(...Ot){var cr;(cr=a.onhqchange)==null||cr.apply(this,Ot)};var xe=A(kt);tm(xe,{class:"text-base-content/50 size-4"}),k(kt),$(Ye,kt)};Ne(Oe,Ye=>{x(p).role==="admin"&&Ye(lt)})}k(j),We(Ye=>de(ae,`${Ye??""}: `),[()=>T3()]),$(le,j)};Ne(Ft,le=>{(x(p).hq||x(p).role==="admin")&&le(sr)})}k(Dt);var lr=V(Dt,2),Vr=A(lr),mr=A(Vr,!0);k(Vr);var hr=V(Vr,2),_r=A(hr);q4(_r,{get allianceId(){return x(p).id},get onlastpixelclick(){return a.onlastpixelclick},get reload(){return x(O)},set reload(le){se(O,le,!0)}}),k(hr),k(lr);var Ir=V(lr,2);_4(Ir,{get description(){return x(p).description},onsuccess:async le=>{x(p)&&(x(p).description=le)},get ref(){return x(T)},set ref(le){se(T,le,!0)}});var qr=V(Ir,2);x4(qr,{get open(){return x(s)},set open(le){se(s,le,!0)}}),We((le,j,Z,Y,ae)=>{de(Ue,x(p).name),Ae.disabled=x(z),de(je,le),de(xt,`${j??""}: `),de(wt,Z),de(Ut,`${Y??""}: `),de(mr,ae)},[()=>x3(),()=>zm(),()=>x(p).pixelsPainted.toLocaleString("en-US"),()=>Dv(),()=>Bm()]),$(Qe,Le)},Ze=Qe=>{var Le=NM(),et=Ct(Le),nt=A(et),Ue=A(nt);k(nt);var Me=V(nt,2),yt=A(Me);gM(yt,{class:"size-5"});var Q=V(yt,1,!0);k(Me);var re=V(Me,2),he=A(re),oe=A(he,!0);k(he),k(re);var Ae=V(re,2);Ae.__click=[OM,M];var je=A(Ae);Rv(je,{class:"size-6"});var ft=V(je);k(Ae),k(et);var it=V(et,2);uM(it,{onsuccess:X,get ref(){return x(M)},set ref(ut){se(M,ut,!0)}}),We((ut,Pt,Dt,ot)=>{de(Ue,`${ut??""}:`),de(Q,Pt),de(oe,Dt),de(ft,` ${ot??""}`)},[()=>k3(),()=>z3(),()=>R3(),()=>O3()]),$(Qe,Le)};Ne(Je,Qe=>{x(p)?Qe(qe):Qe(Ze,!1)},!0)}$(Fe,$e)};Ne(Ee,Fe=>{x(B)?Fe(De):Fe(ze,!1)},!0)}$(ge,Ie)};Ne(ne,ge=>{x(y)?ge(H):ge(pe,!1)})}k(K),$(m,K),Dr()}$n(["click"]);var qM=Sr('');function xp(m,a){let p=rr(a,["$$slots","$$events","$$legacy"]);var y=qM();ir(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...p})),$(m,y)}var ZM=Te(' ');function UM(m,a){Lr(a,!0);let p=Lt(a,"open",15);Fn(()=>{const K=ne=>{ne.key==="Escape"&&p(!1)};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)});var y=ZM(),M=A(y),z=V(A(M),2),T=A(z);xp(T,{class:"size-5 max-sm:size-6"});var s=V(T,2),B=A(s,!0);k(s),k(z);var O=V(z,2),X=A(O);VM(X,{get open(){return p()},get onhqchange(){return a.onhqchange},get onhqclick(){return a.onhqclick},get onlastpixelclick(){return a.onlastpixelclick}}),k(O),k(M),vn(2),k(y),Ni(y,()=>K=>{Hr(()=>{p()?(K.show(),yi.url.searchParams.get("alliance")&&(yi.url.searchParams.delete("alliance"),km(yi.url.toString()))):K.close()})}),We(K=>de(B,K),[()=>_p()]),di("close",y,()=>p(!1)),Ai(2,O,()=>ia,()=>({duration:300})),$(m,y),Dr()}function $M(m,a,p){return new Promise((y,M)=>{m.once("render",()=>{const z=m.getCanvas().toDataURL(),T=document.createElement("img");T.src=z,T.onload=()=>{const s=document.createElement("canvas");s.width=T.width,s.height=T.height;const B=s.getContext("2d");if(B){B.drawImage(T,0,0);const[O,X,K,ne]=B.getImageData(a,p,1,1).data;y([O,X,K,ne])}else M(new Error("Could not get 2d context from canvas"));T.remove(),s.remove()}}),m.triggerRepaint()})}function a0(m,a){return new Promise((p,y)=>{m.once("render",()=>{const M=m.getCanvas();let z=M;if(a!=null&&a.maxWidth||a!=null&&a.maxHeight){const T=M.width,s=M.height,B=(a==null?void 0:a.maxWidth)??T,O=(a==null?void 0:a.maxHeight)??s;z=document.createElement("canvas");const X=Math.min(B/T,O/s);z.width=Math.floor(T*X),z.height=Math.floor(s*X);const K=z.getContext("2d");K&&K.drawImage(M,0,0,z.width,z.height)}try{z.toBlob(T=>{T&&p(T)},(a==null?void 0:a.type)??"image/png",(a==null?void 0:a.quality)??1)}catch(T){y(T)}finally{z!==M&&z.remove()}})})}var GM=Sr('');function HM(m,a){let p=rr(a,["$$slots","$$events","$$legacy"]);var y=GM();ir(y,()=>({xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...p})),$(m,y)}var WM=Sr('');function o0(m,a){let p=rr(a,["$$slots","$$events","$$legacy"]);var y=WM();ir(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...p})),$(m,y)}const gc={hour:3600*1e3,min:60*1e3,sec:1e3};function rp(m){const a=Math.floor(m/gc.hour);m-=a*gc.hour;const p=Math.floor(m/gc.min);m-=p*gc.min;const M=Math.floor(m/gc.sec).toString().padStart(2,"0");return a>0?`${a}:${p.toString().padStart(2,"0")}:${M}`:`${p}:${M}`}function XM(m){const a=new Date,p=a.getFullYear(),y=String(a.getMonth()+1).padStart(2,"0"),M=String(a.getDate()).padStart(2,"0"),z=String(a.getHours()).padStart(2,"0"),T=String(a.getMinutes()).padStart(2,"0"),s=String(a.getSeconds()).padStart(2,"0");return`${p}-${y}-${M} ${z}:${T}:${s}`}var YM=(m,a,p)=>{navigator.clipboard.writeText(a.url.toString()),se(p,!0),setTimeout(()=>{se(p,!1)},1e3)},KM=Te('Screenshot'),JM=Te('
                  '),QM=async(m,a)=>{x(a)&&(await navigator.clipboard.write([new ClipboardItem({"image/png":x(a)})]),Fr.info(TP()))},e6=Te(''),t6=Te(' ');function r6(m,a){Lr(a,!0);let p=Lt(a,"open",15),y=st(!1);Fn(()=>{const ze=Fe=>{Fe.key==="Escape"&&p(!1)};return document.addEventListener("keydown",ze),()=>document.removeEventListener("keydown",ze)});let M=st(null),z=st("");Hr(()=>{p()?(a.hideHover(),setTimeout(async()=>{a0(a.map).then(ze=>{se(M,ze,!0),se(z,URL.createObjectURL(x(M)),!0)}).finally(()=>{a.showHover()})},500)):x(z)&&(URL.revokeObjectURL(x(z)),se(M,null),se(z,""))});var T=t6(),s=A(T),B=V(A(s),2),O=A(B);o0(O,{class:"size-5"});var X=V(O);k(B);var K=V(B,2),ne=A(K);Ka(ne);var H=V(ne,2),pe=A(H);let ge;pe.__click=[YM,a,y];var Ie=A(pe,!0);k(pe),k(H),k(K);var Ee=V(K,2);{var De=ze=>{const Fe=pt(()=>{var oe;return(oe=a.map)==null?void 0:oe.getCanvas()});var $e=e6(),Je=A($e),qe=A(Je);HM(qe,{class:"inline size-5"});var Ze=V(qe);k(Je);var Qe=V(Je,2);{var Le=oe=>{var Ae=KM();We(()=>{wr(Ae,"src",x(z)),wr(Ae,"width",x(Fe).width),wr(Ae,"height",x(Fe).height)}),$(oe,Ae)},et=oe=>{var Ae=JM();We(()=>kc(Ae,`aspect-ratio: ${x(Fe).width/x(Fe).height}`)),$(oe,Ae)};Ne(Qe,oe=>{x(z)?oe(Le):oe(et,!1)})}var nt=V(Qe,2),Ue=A(nt);Ue.__click=[QM,M];var Me=A(Ue);Rm(Me,{class:"size-5"});var yt=V(Me);k(Ue);var Q=V(Ue,2),re=A(Q);zv(re,{class:"size-5"});var he=V(re);k(Q),k(nt),k($e),We((oe,Ae,je,ft)=>{de(Ze,` ${oe??""}`),de(yt,` ${Ae??""}`),wr(Q,"href",x(z)),wr(Q,"download",`wplace_${je??""}.png`),de(he,` ${ft??""}`)},[()=>gP(),()=>Wf(),()=>XM().replaceAll(" ","_").replaceAll(":","-"),()=>xP()]),Ai(2,$e,()=>ia,()=>({duration:300})),$(ze,$e)};Ne(Ee,ze=>{p()&&ze(De)})}k(s),vn(2),k(T),Ni(T,()=>ze=>{Hr(()=>{p()?ze.show():ze.close()})}),We((ze,Fe,$e,Je)=>{de(X,` ${ze??""}`),Av(ne,Fe),ge=zr(pe,1,"btn btn-primary",null,ge,$e),de(Ie,Je)},[()=>zC(),()=>a.url.toString(),()=>({"btn-success":x(y)}),()=>x(y)?Fm():Wf()]),di("close",T,()=>p(!1)),$(m,T),Dr()}$n(["click"]);var n6=Sr('');function i6(m,a){let p=rr(a,["$$slots","$$events","$$legacy"]);var y=n6();ir(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...p})),$(m,y)}var a6=Te('
                • '),o6=Te('

                    ');function Gm(m,a){Lr(a,!1);const p=[e5(),Kw(),n5(),o5(),c5(),d5(),m5()];Nv();var y=o6(),M=A(y),z=A(M);i6(z,{class:"size-5"});var T=V(z,2),s=A(T),B=V(s),O=A(B,!0);k(B),k(T),k(M);var X=V(M,2),K=A(X);hi(K,5,()=>p,hp,(pe,ge)=>{var Ie=a6(),Ee=A(Ie,!0);k(Ie),We(()=>de(Ee,x(ge))),$(pe,Ie)}),k(K);var ne=V(K,2),H=A(ne,!0);k(ne),k(X),k(y),We((pe,ge,Ie)=>{de(s,`${pe??""} `),de(O,ge),de(H,Ie)},[()=>$w(),()=>Ww(),()=>v5()]),$(m,y),Dr()}var s6=(m,a)=>{a(!1)},l6=Te(' ');function c6(m,a){Lr(a,!0);let p=Lt(a,"open",15);Fn(()=>{const O=X=>{X.key==="Escape"&&p(!1)};return document.addEventListener("keydown",O),()=>document.removeEventListener("keydown",O)});var y=l6(),M=A(y),z=V(A(M),2),T=V(A(z),2),s=A(T);Gm(s,{}),k(T);var B=V(T,2);B.__click=[s6,p],k(z),k(M),vn(2),k(y),Ni(y,()=>O=>{Hr(()=>{p()?O.show():O.close()})}),di("close",y,()=>p(!1)),$(m,y),Dr()}$n(["click"]);var u6=()=>{yi.url.searchParams.delete("new-user"),km(yi.url.toString())},h6=Te('');function d6(m,a){Lr(a,!0);let p=Lt(a,"open",15);Fn(()=>{const ge=Ie=>{Ie.key==="Escape"&&p(!1)};return document.addEventListener("keydown",ge),()=>document.removeEventListener("keydown",ge)});var y=h6(),M=A(y),z=A(M),T=A(z),s=A(T),B=A(s,!0);k(s);var O=V(s,2);jv(O,{hasText:!0,size:"medium"}),k(T),k(z);var X=V(z,2),K=A(X);Gm(K,{}),k(X);var ne=V(X,2),H=A(ne);H.__click=[u6];var pe=A(H,!0);k(H),k(ne),k(M),k(y),Ni(y,()=>ge=>{Hr(()=>{p()?ge.show():ge.close()})}),We((ge,Ie)=>{de(B,ge),de(pe,Ie)},[()=>qw(),()=>b5()]),di("close",y,()=>p(!1)),$(m,y),Dr()}$n(["click"]);function p6(){const m=navigator.userAgent,a=navigator.vendor;return/Chrome/.test(m)&&/Google Inc/.test(a)?"Chrome":/Safari/.test(m)&&/Apple Computer/.test(a)?"Safari":/Firefox/.test(m)?"Firefox":/Edge/.test(m)?"Edge":/Opera|OPR/.test(m)?"Opera":"Unknown"}var f6=Sr('');function m6(m,a){let p=rr(a,["$$slots","$$events","$$legacy"]);var y=f6();ir(y,()=>({viewBox:"0 0 512 512",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...p})),$(m,y)}var _6=Sr('');function rm(m,a){let p=rr(a,["$$slots","$$events","$$legacy"]);var y=_6();ir(y,()=>({viewBox:"0 0 256 199",width:"256",height:"199",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid",fill:"currentColor",...p})),$(m,y)}var g6=Sr('');function v6(m,a){let p=rr(a,["$$slots","$$events","$$legacy"]);var y=g6();ir(y,()=>({xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid",viewBox:"0 0 260 260",...p})),$(m,y)}var y6=Sr('');function np(m,a){let p=rr(a,["$$slots","$$events","$$legacy"]);var y=y6();ir(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...p})),$(m,y)}var x6=Sr(``);function b6(m,a){let p=rr(a,["$$slots","$$events","$$legacy"]);var y=x6();ir(y,()=>({viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-label":"Tiktok",...p})),$(m,y)}var w6=Sr(``);function T6(m,a){let p=rr(a,["$$slots","$$events","$$legacy"]);var y=w6();ir(y,()=>({viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-label":"YouTube",...p})),$(m,y)}var C6=Te(' link',1),S6=Te('chrome://settings/system.',1),P6=Te('edge://settings/system/manageSystem.',1),I6=Te(' ',1),M6=Te(''),k6=Te(' ');function A6(m,a){Lr(a,!0);let p=Lt(a,"open",15);Fn(()=>{const K=ne=>{ne.key==="Escape"&&p(!1)};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)});const y=p6();var M=k6(),z=A(M),T=V(A(z),2);{var s=K=>{var ne=M6(),H=A(ne),pe=A(H);jv(pe,{hasText:!0,size:"medium"});var ge=V(pe,2),Ie=A(ge),Ee=V(Ie,4);vn(),k(ge);var De=V(ge,2),ze=A(De),Fe=A(ze),$e=A(Fe,!0);k(Fe);var Je=V(Fe,4),qe=A(Je);rm(qe,{class:"text-base-content mr-0.5 inline size-4"}),vn(2),k(Je);var Ze=V(Je,4),Qe=A(Ze);m6(Qe,{class:"size-4.5 mr-0.5 inline"}),vn(2),k(Ze);var Le=V(Ze,4),et=A(Le);v6(et,{class:"mr-0.5 inline size-3.5"}),vn(2),k(Le);var nt=V(Le,4),Ue=A(nt);T6(Ue,{class:"mr-0.5 inline size-3.5"}),vn(2),k(nt);var Me=V(nt,4),yt=A(Me);b6(yt,{class:"mr-0.5 inline size-3.5"}),vn(2),k(Me),k(ze),k(De),k(H);var Q=V(H,2),re=A(Q),he=A(re,!0);k(re);var oe=V(re,2);k(Q);var Ae=V(Q,2),je=A(Ae),ft=A(je,!0);k(je);var it=V(je,2),ut=A(it),Pt=V(ut),Dt=A(Pt);np(Dt,{class:"size-5"}),k(Pt);var ot=V(Pt);k(it);var dt=V(it,2),vt=A(dt),xt=V(vt),It=A(xt,!0);k(xt);var wt=V(xt);k(dt),k(Ae);var _t=V(Ae,2),Et=A(_t),Rt=A(Et,!0);k(Et);var Ut=V(Et,2),er=A(Ut);{var tr=le=>{var j=C6(),Z=Ct(j);vn(),We(Y=>de(Z,`${Y??""}: `),[()=>OP()]),$(le,j)},Nt=le=>{var j=I6(),Z=Ct(j),Y=V(Z),ae=A(Y,!0);k(Y);var fe=V(Y),Se=V(fe);{var ke=Oe=>{var lt=S6();vn(),$(Oe,lt)},we=Oe=>{var lt=Qt(),Ye=Ct(lt);{var kt=xe=>{var Ot=P6();vn(),$(xe,Ot)};Ne(Ye,xe=>{y==="Edge"&&xe(kt)},!0)}$(Oe,lt)};Ne(Se,Oe=>{y==="Chrome"?Oe(ke):Oe(we,!1)})}We((Oe,lt,Ye)=>{de(Z,`${Oe??""} `),de(ae,lt),de(fe,` ${Ye??""} `)},[()=>kP(),()=>zP(),()=>RP()]),$(le,j)};Ne(er,le=>{y!=="Chrome"&&y!=="Edge"?le(tr):le(Nt,!1)})}k(Ut),k(_t);var Ft=V(_t,2),sr=A(Ft);Gm(sr,{}),k(Ft);var lr=V(Ft,4),Vr=V(A(lr),2),mr=A(Vr,!0);k(Vr);var hr=V(Vr,2),_r=A(hr,!0);k(hr);var Ir=V(hr,2),qr=A(Ir,!0);k(Ir),k(lr),k(ne),We((le,j,Z,Y,ae,fe,Se,ke,we,Oe,lt,Ye,kt,xe,Ot)=>{de(Ie,`${le??""} `),de(Ee,` © + ${j??""} `),de($e,Z),de(he,Y),wr(oe,"src",ai.language==="pt"?"https://www.youtube.com/embed/AcE85QM4iPQ?si=wbeZD8vxOzvlB_Z9":"https://www.youtube.com/embed/xOXtd-WzRxA?si=fHz8Z6ecXGYrDhkN"),de(ft,ae),de(ut,`${fe??""} `),de(ot,` ${Se??""}`),de(vt,`${ke??""} `),de(It,we),de(wt,` ${Oe??""}`),de(Rt,lt),wr(Vr,"href",`${yi.url.origin??""}/terms/terms-of-service`),de(mr,Ye),wr(hr,"href",`${yi.url.origin??""}/terms/privacy`),de(_r,kt),wr(Ir,"href",xe),de(qr,Ot)},[()=>Nb(),()=>qb(),()=>$b(),()=>Wb(),()=>Kb(),()=>e2(),()=>n2(),()=>o2(),()=>c2(),()=>d2(),()=>PP(),()=>UP(),()=>HP(),()=>Bv(yi.url.origin),()=>Jv()]),Ai(2,ne,()=>ia,()=>({duration:300})),$(K,ne)};Ne(T,K=>{p()&&K(s)})}k(z);var B=V(z,2),O=A(B),X=A(O,!0);k(O),k(B),k(M),Ni(M,()=>K=>{Hr(()=>{p()?K.show():K.close()})}),We(K=>de(X,K),[()=>Ss()]),di("close",M,()=>p(!1)),$(m,M),Dr()}function E6(m){return typeof m=="function"}function Lh(m){return m!==null&&typeof m=="object"}const z6=["string","number","bigint","boolean"];function nm(m){return m==null||z6.includes(typeof m)?!0:Array.isArray(m)?m.every(a=>nm(a)):typeof m=="object"?Object.getPrototypeOf(m)===Object.prototype:!1}const Vu=Symbol("box"),Hm=Symbol("is-writable");function L6(m){return Lh(m)&&Vu in m}function D6(m){return xr.isBox(m)&&Hm in m}function xr(m){let a=st(bi(m));return{[Vu]:!0,[Hm]:!0,get current(){return x(a)},set current(p){se(a,p,!0)}}}function R6(m,a){const p=pt(m);return a?{[Vu]:!0,[Hm]:!0,get current(){return x(p)},set current(y){a(y)}}:{[Vu]:!0,get current(){return m()}}}function B6(m){return xr.isBox(m)?m:E6(m)?xr.with(m):xr(m)}function F6(m){return Object.entries(m).reduce((a,[p,y])=>xr.isBox(y)?(xr.isWritableBox(y)?Object.defineProperty(a,p,{get(){return y.current},set(M){y.current=M}}):Object.defineProperty(a,p,{get(){return y.current}}),a):Object.assign(a,{[p]:y}),{})}function O6(m){return xr.isWritableBox(m)?{[Vu]:!0,get current(){return m.current}}:m}xr.from=B6;xr.with=R6;xr.flatten=F6;xr.readonly=O6;xr.isBox=L6;xr.isWritableBox=D6;function N6(...m){return function(a){var p;for(const y of m)if(y){if(a.defaultPrevented)return;typeof y=="function"?y.call(this,a):(p=y.current)==null||p.call(this,a)}}}var hc={},Rf,tv;function j6(){if(tv)return Rf;tv=1;var m=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,a=/\n/g,p=/^\s*/,y=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,M=/^:\s*/,z=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,T=/^[;\s]*/,s=/^\s+|\s+$/g,B=` +`,O="/",X="*",K="",ne="comment",H="declaration";Rf=function(ge,Ie){if(typeof ge!="string")throw new TypeError("First argument must be a string");if(!ge)return[];Ie=Ie||{};var Ee=1,De=1;function ze(Ue){var Me=Ue.match(a);Me&&(Ee+=Me.length);var yt=Ue.lastIndexOf(B);De=~yt?Ue.length-yt:De+Ue.length}function Fe(){var Ue={line:Ee,column:De};return function(Me){return Me.position=new $e(Ue),Ze(),Me}}function $e(Ue){this.start=Ue,this.end={line:Ee,column:De},this.source=Ie.source}$e.prototype.content=ge;function Je(Ue){var Me=new Error(Ie.source+":"+Ee+":"+De+": "+Ue);if(Me.reason=Ue,Me.filename=Ie.source,Me.line=Ee,Me.column=De,Me.source=ge,!Ie.silent)throw Me}function qe(Ue){var Me=Ue.exec(ge);if(Me){var yt=Me[0];return ze(yt),ge=ge.slice(yt.length),Me}}function Ze(){qe(p)}function Qe(Ue){var Me;for(Ue=Ue||[];Me=Le();)Me!==!1&&Ue.push(Me);return Ue}function Le(){var Ue=Fe();if(!(O!=ge.charAt(0)||X!=ge.charAt(1))){for(var Me=2;K!=ge.charAt(Me)&&(X!=ge.charAt(Me)||O!=ge.charAt(Me+1));)++Me;if(Me+=2,K===ge.charAt(Me-1))return Je("End of comment missing");var yt=ge.slice(2,Me-2);return De+=2,ze(yt),ge=ge.slice(Me),De+=2,Ue({type:ne,comment:yt})}}function et(){var Ue=Fe(),Me=qe(y);if(Me){if(Le(),!qe(M))return Je("property missing ':'");var yt=qe(z),Q=Ue({type:H,property:pe(Me[0].replace(m,K)),value:yt?pe(yt[0].replace(m,K)):K});return qe(T),Q}}function nt(){var Ue=[];Qe(Ue);for(var Me;Me=et();)Me!==!1&&(Ue.push(Me),Qe(Ue));return Ue}return Ze(),nt()};function pe(ge){return ge?ge.replace(s,K):K}return Rf}var rv;function V6(){if(rv)return hc;rv=1;var m=hc&&hc.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(hc,"__esModule",{value:!0}),hc.default=p;var a=m(j6());function p(y,M){var z=null;if(!y||typeof y!="string")return z;var T=(0,a.default)(y),s=typeof M=="function";return T.forEach(function(B){if(B.type==="declaration"){var O=B.property,X=B.value;s?M(O,X,B):X&&(z=z||{},z[O]=X)}}),z}return hc}var q6=V6();const nv=Zm(q6),Z6=nv.default||nv,U6=/\d/,$6=["-","_","/","."];function G6(m=""){if(!U6.test(m))return m!==m.toLowerCase()}function H6(m){const a=[];let p="",y,M;for(const z of m){const T=$6.includes(z);if(T===!0){a.push(p),p="",y=void 0;continue}const s=G6(z);if(M===!1){if(y===!1&&s===!0){a.push(p),p=z,y=s;continue}if(y===!0&&s===!1&&p.length>1){const B=p.at(-1);a.push(p.slice(0,Math.max(0,p.length-1))),p=B+z,y=s;continue}}p+=z,y=s,M=T}return a.push(p),a}function s0(m){return m?H6(m).map(a=>X6(a)).join(""):""}function W6(m){return Y6(s0(m||""))}function X6(m){return m?m[0].toUpperCase()+m.slice(1):""}function Y6(m){return m?m[0].toLowerCase()+m.slice(1):""}function Zd(m){if(!m)return{};const a={};function p(y,M){if(y.startsWith("-moz-")||y.startsWith("-webkit-")||y.startsWith("-ms-")||y.startsWith("-o-")){a[s0(y)]=M;return}if(y.startsWith("--")){a[y]=M;return}a[W6(y)]=M}return Z6(m,p),a}function K6(...m){return(...a)=>{for(const p of m)typeof p=="function"&&p(...a)}}function J6(m,a){const p=RegExp(m,"g");return y=>{if(typeof y!="string")throw new TypeError(`expected an argument of type string, but got ${typeof y}`);return y.match(p)?y.replace(p,a):y}}const Q6=J6(/[A-Z]/,m=>`-${m.toLowerCase()}`);function ek(m){if(!m||typeof m!="object"||Array.isArray(m))throw new TypeError(`expected an argument of type object, but got ${typeof m}`);return Object.keys(m).map(a=>`${Q6(a)}: ${m[a]};`).join(` +`)}function l0(m={}){return ek(m).replace(` +`," ")}const c0={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"};l0(c0);const tk=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel"],rk=new Set(tk);function nk(m){return rk.has(m)}function Va(...m){const a={...m[0]};for(let p=1;p{const z=Nu(p,"focusin",M),T=Nu(p,"focusout",M);return()=>{z(),T()}})))}get current(){var a;return(a=at(this,Yu))==null||a.call(this),at(this,wc)?ak(at(this,wc)):null}}wc=new WeakMap,Yu=new WeakMap;new ok;var Ku,Ho;class Wm{constructor(a){Ar(this,Ku);Ar(this,Ho);na(this,Ku,a),na(this,Ho,Symbol(a))}get key(){return at(this,Ho)}exists(){return ex(at(this,Ho))}get(){const a=Gg(at(this,Ho));if(a===void 0)throw new Error(`Context "${at(this,Ku)}" not found`);return a}getOr(a){const p=Gg(at(this,Ho));return p===void 0?a:p}set(a){return tx(at(this,Ho),a)}}Ku=new WeakMap,Ho=new WeakMap;function sk(m,a){switch(m){case"post":Hr(a);break;case"pre":Mm(a);break}}function u0(m,a,p,y={}){const{lazy:M=!1}=y;let z=!M,T=Array.isArray(m)?[]:void 0;sk(a,()=>{const s=Array.isArray(m)?m.map(O=>O()):m();if(!z){z=!0,T=s;return}const B=ul(()=>p(s,T));return T=s,B})}function Ps(m,a,p){u0(m,"post",a,p)}function lk(m,a,p){u0(m,"pre",a,p)}Ps.pre=lk;var Tc;class ck{constructor(a,p){Ar(this,Tc,st(void 0));p!==void 0&&se(at(this,Tc),p,!0),Ps(()=>a(),(y,M)=>{se(at(this,Tc),M,!0)})}get current(){return x(at(this,Tc))}}Tc=new WeakMap;function uk(m,a){return setTimeout(a,m)}function dc(m){Iv().then(m)}const hk=1,dk=9,pk=11;function fk(m){return Lh(m)&&m.nodeType===hk&&typeof m.nodeName=="string"}function h0(m){return Lh(m)&&m.nodeType===dk}function mk(m){var a;return Lh(m)&&((a=m.constructor)==null?void 0:a.name)==="VisualViewport"}function _k(m){return Lh(m)&&m.nodeType!==void 0}function gk(m){return _k(m)&&m.nodeType===pk&&"host"in m}function vk(m){return h0(m)?m:mk(m)?m.document:(m==null?void 0:m.ownerDocument)??document}function d0(m){var a;return gk(m)?d0(m.host):h0(m)?m.defaultView??window:fk(m)?((a=m.ownerDocument)==null?void 0:a.defaultView)??window:window}function yk(m){let a=m.activeElement;for(;a!=null&&a.shadowRoot;){const p=a.shadowRoot.activeElement;if(p===a)break;a=p}return a}var Ju;class xk{constructor(a){yr(this,"element");Ar(this,Ju,pt(()=>this.element.current?this.element.current.getRootNode()??document:document));yr(this,"getDocument",()=>vk(this.root));yr(this,"getWindow",()=>this.getDocument().defaultView??window);yr(this,"getActiveElement",()=>yk(this.root));yr(this,"isActiveElement",a=>a===this.getActiveElement());yr(this,"querySelector",a=>this.root?this.root.querySelector(a):null);yr(this,"querySelectorAll",a=>this.root?this.root.querySelectorAll(a):[]);yr(this,"setTimeout",(a,p)=>this.getWindow().setTimeout(a,p));yr(this,"clearTimeout",a=>this.getWindow().clearTimeout(a));typeof a=="function"?this.element=xr.with(a):this.element=a}get root(){return x(at(this,Ju))}set root(a){se(at(this,Ju),a)}getElementById(a){return this.root.getElementById(a)}}Ju=new WeakMap;function Xa(m,a){return{[Wx()]:p=>xr.isBox(m)?(m.current=p,ul(()=>a==null?void 0:a(p)),()=>{"isConnected"in p&&p.isConnected||(m.current=null,a==null||a(null))}):(m(p),ul(()=>a==null?void 0:a(p)),()=>{"isConnected"in p&&p.isConnected||(m(null),a==null||a(null))})}}function bk(m){return m?"true":"false"}function wk(m){return m?"true":"false"}function Tk(m){return m?"":void 0}function Ck(m){return m?"true":"false"}function Sk(m){return m?"":void 0}function Pk(m){return m?!0:void 0}var Cc,Qu;class Ik{constructor(a){Ar(this,Cc);Ar(this,Qu);yr(this,"attrs");na(this,Cc,a.getVariant?a.getVariant():null),na(this,Qu,at(this,Cc)?`data-${at(this,Cc)}-`:`data-${a.component}-`),this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(a.parts.map(p=>[p,this.getAttr(p)]))}getAttr(a,p){return p?`data-${p}-${a}`:`${at(this,Qu)}${a}`}selector(a,p){return`[${this.getAttr(a,p)}]`}}Cc=new WeakMap,Qu=new WeakMap;function p0(m){const a=new Ik(m);return{...a.attrs,selector:a.selector,getAttr:a.getAttr}}const Mk="ArrowDown",kk="ArrowLeft",Ak="ArrowRight",Ek="ArrowUp",zk="End",Lk="Enter",Dk="Home",Rk="p",Bk="n",Fk="j",Ok="k",Nk="h",jk="l";function qu(){}function Ya(m,a){return`bits-${m}`}function Vk(m){if(!m)return null;for(const a of m.childNodes)if(a.nodeType!==Node.COMMENT_NODE)return a;return null}globalThis.bitsIdCounter??(globalThis.bitsIdCounter={current:0});function qk(m="bits"){return globalThis.bitsIdCounter.current++,`${m}-${globalThis.bitsIdCounter.current}`}function Zk(m,a){let p=m.nextElementSibling;for(;p;){if(p.matches(a))return p;p=p.nextElementSibling}}function Uk(m,a){let p=m.previousElementSibling;for(;p;){if(p.matches(a))return p;p=p.previousElementSibling}}function f0(m){if(typeof CSS<"u"&&typeof CSS.escape=="function")return CSS.escape(m);const a=m.length;let p=-1,y,M="";const z=m.charCodeAt(0);if(a===1&&z===45)return"\\"+m;for(;++p=1&&y<=31||y===127||p===0&&y>=48&&y<=57||p===1&&y>=48&&y<=57&&z===45){M+="\\"+y.toString(16)+" ";continue}if(y>=128||y===45||y===95||y>=48&&y<=57||y>=65&&y<=90||y>=97&&y<=122){M+=m.charAt(p);continue}M+="\\"+m.charAt(p)}return M}const sl="data-value",wa=p0({component:"command",parts:["root","list","input","separator","loading","empty","group","group-items","group-heading","item","viewport","input-label"]}),pc=wa.selector("group"),Bf=wa.selector("group-items"),iv=wa.selector("group-heading"),m0=wa.selector("item"),Ff=`${wa.selector("item")}:not([aria-disabled="true"])`,ml=new Wm("Command.Root"),$k=new Wm("Command.List"),Zu=new Wm("Command.Group"),av={search:"",value:"",filtered:{count:0,items:new Map,groups:new Set}};var Sc,eh,th,rh,nh,ih,ah,oh,fr,_0,Kd,am,Jd,Qd,ep,ws,g0,v0,om,Du,sm,lm,y0,Ru,cm,um,x0,Bu,Fu,sh;const e_=class e_{constructor(a){Ar(this,fr);yr(this,"opts");yr(this,"attachment");Ar(this,Sc,!1);Ar(this,eh,!0);yr(this,"sortAfterTick",!1);yr(this,"sortAndFilterAfterTick",!1);yr(this,"allItems",new Set);yr(this,"allGroups",new Map);yr(this,"allIds",new Map);Ar(this,th,st(0));Ar(this,rh,st(null));Ar(this,nh,st(null));Ar(this,ih,st(null));Ar(this,ah,st(av));Ar(this,oh,st(bi(av)));Ar(this,sh,pt(()=>({id:this.opts.id.current,role:"application",[wa.root]:"",tabindex:-1,onkeydown:this.onkeydown,...this.attachment})));this.opts=a,this.attachment=Xa(this.opts.ref);const p={...this._commandState,value:this.opts.value.current??""};this._commandState=p,this.commandState=p,this.onkeydown=this.onkeydown.bind(this)}static create(a){return ml.set(new e_(a))}get key(){return x(at(this,th))}set key(a){se(at(this,th),a,!0)}get viewportNode(){return x(at(this,rh))}set viewportNode(a){se(at(this,rh),a,!0)}get inputNode(){return x(at(this,nh))}set inputNode(a){se(at(this,nh),a,!0)}get labelNode(){return x(at(this,ih))}set labelNode(a){se(at(this,ih),a,!0)}get commandState(){return x(at(this,ah))}set commandState(a){se(at(this,ah),a)}get _commandState(){return x(at(this,oh))}set _commandState(a){se(at(this,oh),a,!0)}setState(a,p,y){Object.is(this._commandState[a],p)||(this._commandState[a]=p,a==="search"?(jr(this,fr,ep).call(this),jr(this,fr,Jd).call(this)):a==="value"&&(y||jr(this,fr,g0).call(this)),jr(this,fr,Kd).call(this))}setValue(a,p){a!==this.opts.value.current&&a===""&&dc(()=>{this.key++}),this.setState("value",a,p),this.opts.value.current=a}getValidItems(){const a=this.opts.ref.current;return a?Array.from(a.querySelectorAll(Ff)).filter(y=>!!y):[]}getVisibleItems(){const a=this.opts.ref.current;return a?Array.from(a.querySelectorAll(m0)).filter(y=>!!y):[]}get itemsGrid(){var s,B,O,X;if(!this.isGrid)return[];const a=this.opts.columns.current??1,p=this.getVisibleItems(),y=[[]];let M=(s=p[0])==null?void 0:s.getAttribute("data-group"),z=0,T=0;for(let K=0;Ka&&(T++,z=1,y.push([])),(X=y[T])==null||X.push({index:K,firstRowOfGroup:((O=(B=y[T])==null?void 0:B[0])==null?void 0:O.firstRowOfGroup)??K===0,ref:ne}))}return y}updateSelectedToIndex(a){const p=this.getValidItems()[a];p&&this.setValue(p.getAttribute(sl)??"")}updateSelectedByItem(a){const p=jr(this,fr,ws).call(this),y=this.getValidItems(),M=y.findIndex(T=>T===p);let z=y[M+a];this.opts.loop.current&&(z=M+a<0?y[y.length-1]:M+a===y.length?y[0]:y[M+a]),z&&this.setValue(z.getAttribute(sl)??"")}updateSelectedByGroup(a){const p=jr(this,fr,ws).call(this);let y=p==null?void 0:p.closest(pc),M;for(;y&&!M;)y=a>0?Zk(y,pc):Uk(y,pc),M=y==null?void 0:y.querySelector(Ff);M?this.setValue(M.getAttribute(sl)??""):this.updateSelectedByItem(a)}registerValue(a,p){var y;return a&&a===((y=this.allIds.get(a))==null?void 0:y.value)||this.allIds.set(a,{value:a,keywords:p}),this._commandState.filtered.items.set(a,jr(this,fr,am).call(this,a,p)),this.sortAfterTick||(this.sortAfterTick=!0,dc(()=>{jr(this,fr,Jd).call(this),this.sortAfterTick=!1})),()=>{this.allIds.delete(a)}}registerItem(a,p){return this.allItems.add(a),p&&(this.allGroups.has(p)?this.allGroups.get(p).add(a):this.allGroups.set(p,new Set([a]))),this.sortAndFilterAfterTick||(this.sortAndFilterAfterTick=!0,dc(()=>{jr(this,fr,ep).call(this),jr(this,fr,Jd).call(this),this.sortAndFilterAfterTick=!1})),jr(this,fr,Kd).call(this),()=>{const y=jr(this,fr,ws).call(this);this.allIds.delete(a),this.allItems.delete(a),this.commandState.filtered.items.delete(a),jr(this,fr,ep).call(this),(y==null?void 0:y.getAttribute("id"))===a&&jr(this,fr,Qd).call(this),jr(this,fr,Kd).call(this)}}registerGroup(a){return this.allGroups.has(a)||this.allGroups.set(a,new Set),()=>{this.allIds.delete(a),this.allGroups.delete(a)}}get isGrid(){return this.opts.columns.current!==null}onkeydown(a){const p=this.opts.vimBindings.current&&a.ctrlKey;switch(a.key){case Bk:case Fk:{p&&(this.isGrid?jr(this,fr,sm).call(this,a):jr(this,fr,Du).call(this,a));break}case jk:{p&&this.isGrid&&jr(this,fr,Du).call(this,a);break}case Mk:this.isGrid?jr(this,fr,sm).call(this,a):jr(this,fr,Du).call(this,a);break;case Ak:if(!this.isGrid)break;jr(this,fr,Du).call(this,a);break;case Rk:case Ok:{p&&(this.isGrid?jr(this,fr,um).call(this,a):jr(this,fr,Fu).call(this,a));break}case Nk:{p&&this.isGrid&&jr(this,fr,Fu).call(this,a);break}case Ek:this.isGrid?jr(this,fr,um).call(this,a):jr(this,fr,Fu).call(this,a);break;case kk:if(!this.isGrid)break;jr(this,fr,Fu).call(this,a);break;case Dk:a.preventDefault(),this.updateSelectedToIndex(0);break;case zk:a.preventDefault(),jr(this,fr,om).call(this);break;case Lk:if(!a.isComposing&&a.keyCode!==229){a.preventDefault();const y=jr(this,fr,ws).call(this);y&&(y==null||y.click())}}}get props(){return x(at(this,sh))}set props(a){se(at(this,sh),a)}};Sc=new WeakMap,eh=new WeakMap,th=new WeakMap,rh=new WeakMap,nh=new WeakMap,ih=new WeakMap,ah=new WeakMap,oh=new WeakMap,fr=new WeakSet,_0=function(){return Hx(this._commandState)},Kd=function(){at(this,Sc)||(na(this,Sc,!0),dc(()=>{var y,M;na(this,Sc,!1);const a=jr(this,fr,_0).call(this);!Object.is(this.commandState,a)&&(this.commandState=a,(M=(y=this.opts.onStateChange)==null?void 0:y.current)==null||M.call(y,a))}))},am=function(a,p){const y=this.opts.filter.current??T0;return a?y(a,this._commandState.search,p):0},Jd=function(){var T;if(!this._commandState.search||this.opts.shouldFilter.current===!1){jr(this,fr,Qd).call(this);return}const a=this._commandState.filtered.items,p=[];for(const s of this._commandState.filtered.groups){const B=this.allGroups.get(s);let O=0;if(!B){p.push([s,O]);continue}for(const X of B){const K=a.get(X);O=Math.max(K??0,O)}p.push([s,O])}const y=this.viewportNode,M=this.getValidItems().sort((s,B)=>{const O=s.getAttribute("data-value"),X=B.getAttribute("data-value"),K=a.get(O)??0;return(a.get(X)??0)-K});for(const s of M){const B=s.closest(Bf);if(B){const O=s.parentElement===B?s:s.closest(`${Bf} > *`);O&&B.appendChild(O)}else{const O=s.parentElement===y?s:s.closest(`${Bf} > *`);O&&(y==null||y.appendChild(O))}}const z=p.sort((s,B)=>B[1]-s[1]);for(const s of z){const B=y==null?void 0:y.querySelector(`${pc}[${sl}="${f0(s[0])}"]`);(T=B==null?void 0:B.parentElement)==null||T.appendChild(B)}jr(this,fr,Qd).call(this)},Qd=function(){dc(()=>{const a=this.getValidItems().find(M=>M.getAttribute("aria-disabled")!=="true"),p=a==null?void 0:a.getAttribute(sl),y=at(this,eh)&&this.opts.disableInitialScroll.current;this.setValue(p??"",y),na(this,eh,!1)})},ep=function(){var p,y;if(!this._commandState.search||this.opts.shouldFilter.current===!1){this._commandState.filtered.count=this.allItems.size;return}this._commandState.filtered.groups=new Set;let a=0;for(const M of this.allItems){const z=((p=this.allIds.get(M))==null?void 0:p.value)??"",T=((y=this.allIds.get(M))==null?void 0:y.keywords)??[],s=jr(this,fr,am).call(this,z,T);this._commandState.filtered.items.set(M,s),s>0&&a++}for(const[M,z]of this.allGroups)for(const T of z){const s=this._commandState.filtered.items.get(T);if(s&&s>0){this._commandState.filtered.groups.add(M);break}}this._commandState.filtered.count=a},ws=function(){const a=this.opts.ref.current;if(!a)return;const p=a.querySelector(`${Ff}[data-selected]`);if(p)return p},g0=function(){dc(()=>{var y,M,z,T,s;const a=jr(this,fr,ws).call(this);if(!a)return;const p=(y=a.parentElement)==null?void 0:y.parentElement;if(p){if(this.isGrid){const B=jr(this,fr,v0).call(this,a);if(a.scrollIntoView({block:"nearest"}),B){const O=(M=a==null?void 0:a.closest(pc))==null?void 0:M.querySelector(iv);O==null||O.scrollIntoView({block:"nearest"});return}}else{const B=Vk(p);if(B&&((z=B.dataset)==null?void 0:z.value)===((T=a.dataset)==null?void 0:T.value)){const O=(s=a==null?void 0:a.closest(pc))==null?void 0:s.querySelector(iv);O==null||O.scrollIntoView({block:"nearest"});return}}a.scrollIntoView({block:"nearest"})}})},v0=function(a){const p=this.itemsGrid;if(p.length===0)return!1;for(let y=0;y=0;O--){const X=B[B.length-1];if(!(X===void 0||Ud(X.ref))){z=X.ref;break}}break}return z},cm=function(a,p){if(p===null)return 0;const y=this.getValidItems(),M=y.findIndex(T=>T===a);return y.findIndex(T=>T===p)-M},um=function(a){this.opts.columns.current!==null&&(a.preventDefault(),a.metaKey?this.updateSelectedByGroup(-1):this.updateSelectedByItem(jr(this,fr,x0).call(this,a)))},x0=function(a){const p=this.itemsGrid,y=jr(this,fr,ws).call(this);if(y===void 0)return 0;const M=jr(this,fr,lm).call(this,y,p);if(M===null)return 0;let z=null;const T=a.altKey?1:0;if(a.altKey&&M.rowIndex===1&&this.opts.loop.current===!1)z=jr(this,fr,Bu).call(this,{start:0,end:0,expectedColumnIndex:M.columnIndex,grid:p});else if(M.rowIndex===0){if(this.opts.loop.current===!1)return 0;z=jr(this,fr,Bu).call(this,{start:p.length-1-T,end:M.rowIndex+1,expectedColumnIndex:M.columnIndex,grid:p})}else z=jr(this,fr,Bu).call(this,{start:M.rowIndex-1-T,end:0,expectedColumnIndex:M.columnIndex,grid:p}),z===null&&this.opts.loop.current&&(z=jr(this,fr,Bu).call(this,{start:p.length-1,end:M.rowIndex+1,expectedColumnIndex:M.columnIndex,grid:p}));return jr(this,fr,cm).call(this,y,z)},Bu=function({start:a,end:p,grid:y,expectedColumnIndex:M}){var T;let z=null;for(let s=a;s>=p;s--){const B=y[s];if(B!==void 0){if(z=((T=B[M])==null?void 0:T.ref)??null,z!==null&&Ud(z)){z=null;continue}if(z===null)for(let O=B.length-1;O>=0;O--){const X=B[B.length-1];if(!(X===void 0||Ud(X.ref))){z=X.ref;break}}break}}return z},Fu=function(a){a.preventDefault(),a.metaKey?this.updateSelectedToIndex(0):a.altKey?this.updateSelectedByGroup(-1):this.updateSelectedByItem(-1)},sh=new WeakMap;let im=e_;function Ud(m){return m.getAttribute("aria-disabled")==="true"}var lh,ch,uh;const t_=class t_{constructor(a,p){yr(this,"opts");yr(this,"root");yr(this,"attachment");Ar(this,lh,pt(()=>this.root._commandState.filtered.count===0&&at(this,ch)===!1||this.opts.forceMount.current));Ar(this,ch,!0);Ar(this,uh,pt(()=>({id:this.opts.id.current,role:"presentation",[wa.empty]:"",...this.attachment})));this.opts=a,this.root=p,this.attachment=Xa(this.opts.ref),Mm(()=>{na(this,ch,!1)})}static create(a){return new t_(a,ml.get())}get shouldRender(){return x(at(this,lh))}set shouldRender(a){se(at(this,lh),a)}get props(){return x(at(this,uh))}set props(a){se(at(this,uh),a)}};lh=new WeakMap,ch=new WeakMap,uh=new WeakMap;let hm=t_;var hh,dh,ph,fh;const r_=class r_{constructor(a,p){yr(this,"opts");yr(this,"root");yr(this,"attachment");Ar(this,hh,pt(()=>this.opts.forceMount.current||this.root.opts.shouldFilter.current===!1||!this.root.commandState.search?!0:this.root._commandState.filtered.groups.has(this.trueValue)));Ar(this,dh,st(null));Ar(this,ph,st(""));Ar(this,fh,pt(()=>({id:this.opts.id.current,role:"presentation",hidden:this.shouldRender?void 0:!0,"data-value":this.trueValue,[wa.group]:"",...this.attachment})));this.opts=a,this.root=p,this.attachment=Xa(this.opts.ref),this.trueValue=a.value.current??a.id.current,Ps(()=>this.trueValue,()=>this.root.registerGroup(this.trueValue)),Hr(()=>this.opts.value.current?(this.trueValue=this.opts.value.current,this.root.registerValue(this.opts.value.current)):this.headingNode&&this.headingNode.textContent?(this.trueValue=this.headingNode.textContent.trim().toLowerCase(),this.root.registerValue(this.trueValue)):(this.trueValue=`-----${this.opts.id.current}`,this.root.registerValue(this.trueValue)))}static create(a){return Zu.set(new r_(a,ml.get()))}get shouldRender(){return x(at(this,hh))}set shouldRender(a){se(at(this,hh),a)}get headingNode(){return x(at(this,dh))}set headingNode(a){se(at(this,dh),a,!0)}get trueValue(){return x(at(this,ph))}set trueValue(a){se(at(this,ph),a,!0)}get props(){return x(at(this,fh))}set props(a){se(at(this,fh),a)}};hh=new WeakMap,dh=new WeakMap,ph=new WeakMap,fh=new WeakMap;let dm=r_;var mh;const n_=class n_{constructor(a,p){yr(this,"opts");yr(this,"group");yr(this,"attachment");Ar(this,mh,pt(()=>({id:this.opts.id.current,[wa["group-heading"]]:"",...this.attachment})));this.opts=a,this.group=p,this.attachment=Xa(this.opts.ref,y=>this.group.headingNode=y)}static create(a){return new n_(a,Zu.get())}get props(){return x(at(this,mh))}set props(a){se(at(this,mh),a)}};mh=new WeakMap;let pm=n_;var _h;const i_=class i_{constructor(a,p){yr(this,"opts");yr(this,"group");yr(this,"attachment");Ar(this,_h,pt(()=>{var a;return{id:this.opts.id.current,role:"group",[wa["group-items"]]:"","aria-labelledby":((a=this.group.headingNode)==null?void 0:a.id)??void 0,...this.attachment}}));this.opts=a,this.group=p,this.attachment=Xa(this.opts.ref)}static create(a){return new i_(a,Zu.get())}get props(){return x(at(this,_h))}set props(a){se(at(this,_h),a)}};_h=new WeakMap;let fm=i_;var ap,gh;const a_=class a_{constructor(a,p){yr(this,"opts");yr(this,"root");yr(this,"attachment");Ar(this,ap,pt(()=>{var p;const a=(p=this.root.viewportNode)==null?void 0:p.querySelector(`${m0}[${sl}="${f0(this.root.opts.value.current)}"]`);if(a!=null)return a.getAttribute("id")??void 0}));Ar(this,gh,pt(()=>{var a,p;return{id:this.opts.id.current,type:"text",[wa.input]:"",autocomplete:"off",autocorrect:"off",spellcheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":wk(!0),"aria-controls":((a=this.root.viewportNode)==null?void 0:a.id)??void 0,"aria-labelledby":((p=this.root.labelNode)==null?void 0:p.id)??void 0,"aria-activedescendant":x(at(this,ap)),...this.attachment}}));this.opts=a,this.root=p,this.attachment=Xa(this.opts.ref,y=>this.root.inputNode=y),Ps(()=>this.opts.ref.current,()=>{const y=this.opts.ref.current;y&&this.opts.autofocus.current&&uk(10,()=>y.focus())}),Ps(()=>this.opts.value.current,()=>{this.root.commandState.search!==this.opts.value.current&&this.root.setState("search",this.opts.value.current)})}static create(a){return new a_(a,ml.get())}get props(){return x(at(this,gh))}set props(a){se(at(this,gh),a)}};ap=new WeakMap,gh=new WeakMap;let mm=a_;var Ts,op,vh,yh,xh,pl,b0,gm,bh;const o_=class o_{constructor(a,p){Ar(this,pl);yr(this,"opts");yr(this,"root");yr(this,"attachment");Ar(this,Ts,null);Ar(this,op,pt(()=>{var a;return this.opts.forceMount.current||((a=at(this,Ts))==null?void 0:a.opts.forceMount.current)===!0}));Ar(this,vh,pt(()=>{if(this.opts.ref.current,x(at(this,op))||this.root.opts.shouldFilter.current===!1||!this.root.commandState.search)return!0;const a=this.root.commandState.filtered.items.get(this.trueValue);return a===void 0?!1:a>0}));Ar(this,yh,pt(()=>this.root.opts.value.current===this.trueValue&&this.trueValue!==""));Ar(this,xh,st(""));Ar(this,bh,pt(()=>{var a;return{id:this.opts.id.current,"aria-disabled":bk(this.opts.disabled.current),"aria-selected":Ck(this.isSelected),"data-disabled":Tk(this.opts.disabled.current),"data-selected":Sk(this.isSelected),"data-value":this.trueValue,"data-group":(a=at(this,Ts))==null?void 0:a.trueValue,[wa.item]:"",role:"option",onpointermove:this.onpointermove,onclick:this.onclick,...this.attachment}}));this.opts=a,this.root=p,na(this,Ts,Zu.getOr(null)),this.trueValue=a.value.current,this.attachment=Xa(this.opts.ref),Ps([()=>this.trueValue,()=>{var y;return(y=at(this,Ts))==null?void 0:y.trueValue},()=>this.opts.forceMount.current],()=>{var y;if(!this.opts.forceMount.current)return this.root.registerItem(this.trueValue,(y=at(this,Ts))==null?void 0:y.trueValue)}),Ps([()=>this.opts.value.current,()=>this.opts.ref.current],()=>{var y,M;!this.opts.value.current&&((y=this.opts.ref.current)!=null&&y.textContent)&&(this.trueValue=this.opts.ref.current.textContent.trim()),this.root.registerValue(this.trueValue,a.keywords.current.map(z=>z.trim())),(M=this.opts.ref.current)==null||M.setAttribute(sl,this.trueValue)}),this.onclick=this.onclick.bind(this),this.onpointermove=this.onpointermove.bind(this)}static create(a){const p=Zu.getOr(null);return new o_({...a,group:p},ml.get())}get shouldRender(){return x(at(this,vh))}set shouldRender(a){se(at(this,vh),a)}get isSelected(){return x(at(this,yh))}set isSelected(a){se(at(this,yh),a)}get trueValue(){return x(at(this,xh))}set trueValue(a){se(at(this,xh),a,!0)}onpointermove(a){this.opts.disabled.current||this.root.opts.disablePointerSelection.current||jr(this,pl,gm).call(this)}onclick(a){this.opts.disabled.current||jr(this,pl,b0).call(this)}get props(){return x(at(this,bh))}set props(a){se(at(this,bh),a)}};Ts=new WeakMap,op=new WeakMap,vh=new WeakMap,yh=new WeakMap,xh=new WeakMap,pl=new WeakSet,b0=function(){var a;this.opts.disabled.current||(jr(this,pl,gm).call(this),(a=this.opts.onSelect)==null||a.current())},gm=function(){this.opts.disabled.current||this.root.setValue(this.trueValue,!0)},bh=new WeakMap;let _m=o_;var wh;const s_=class s_{constructor(a,p){yr(this,"opts");yr(this,"root");yr(this,"attachment");Ar(this,wh,pt(()=>({id:this.opts.id.current,role:"listbox","aria-label":this.opts.ariaLabel.current,[wa.list]:"",...this.attachment})));this.opts=a,this.root=p,this.attachment=Xa(this.opts.ref)}static create(a){return $k.set(new s_(a,ml.get()))}get props(){return x(at(this,wh))}set props(a){se(at(this,wh),a)}};wh=new WeakMap;let vm=s_;var Th;const l_=class l_{constructor(a,p){yr(this,"opts");yr(this,"root");yr(this,"attachment");Ar(this,Th,pt(()=>{var a;return{id:this.opts.id.current,[wa["input-label"]]:"",for:(a=this.opts.for)==null?void 0:a.current,style:c0,...this.attachment}}));this.opts=a,this.root=p,this.attachment=Xa(this.opts.ref,y=>this.root.labelNode=y)}static create(a){return new l_(a,ml.get())}get props(){return x(at(this,Th))}set props(a){se(at(this,Th),a)}};Th=new WeakMap;let ym=l_;var Gk=Te("");function Hk(m,a){const p=uo();Lr(a,!0);let y=Lt(a,"id",19,()=>Ya(p)),M=Lt(a,"ref",15,null),z=rr(a,["$$slots","$$events","$$legacy","id","ref","children"]);const T=ym.create({id:xr.with(()=>y()),ref:xr.with(()=>M(),X=>M(X))}),s=pt(()=>Va(z,T.props));var B=Gk();ir(B,()=>({...x(s)}));var O=A(B);oi(O,()=>a.children??pa),k(B),$(m,B),Dr()}var Wk=Te(" ",1),Xk=Te("
                    ");function Yk(m,a){const p=uo();Lr(a,!0);const y=nt=>{Hk(nt,{children:(Ue,Me)=>{vn();var yt=wi();We(()=>de(yt,ne())),$(Ue,yt)},$$slots:{default:!0}})};let M=Lt(a,"id",19,()=>Ya(p)),z=Lt(a,"ref",15,null),T=Lt(a,"value",15,""),s=Lt(a,"onValueChange",3,qu),B=Lt(a,"onStateChange",3,qu),O=Lt(a,"loop",3,!1),X=Lt(a,"shouldFilter",3,!0),K=Lt(a,"filter",3,T0),ne=Lt(a,"label",3,""),H=Lt(a,"vimBindings",3,!0),pe=Lt(a,"disablePointerSelection",3,!1),ge=Lt(a,"disableInitialScroll",3,!1),Ie=Lt(a,"columns",3,null),Ee=rr(a,["$$slots","$$events","$$legacy","id","ref","value","onValueChange","onStateChange","loop","shouldFilter","filter","label","vimBindings","disablePointerSelection","disableInitialScroll","columns","children","child"]);const De=im.create({id:xr.with(()=>M()),ref:xr.with(()=>z(),nt=>z(nt)),filter:xr.with(()=>K()),shouldFilter:xr.with(()=>X()),loop:xr.with(()=>O()),value:xr.with(()=>T(),nt=>{T()!==nt&&(T(nt),s()(nt))}),vimBindings:xr.with(()=>H()),disablePointerSelection:xr.with(()=>pe()),disableInitialScroll:xr.with(()=>ge()),onStateChange:xr.with(()=>B()),columns:xr.with(()=>Ie())}),ze=nt=>De.updateSelectedToIndex(nt),Fe=nt=>De.updateSelectedByGroup(nt),$e=nt=>De.updateSelectedByItem(nt),Je=()=>De.getValidItems(),qe=pt(()=>Va(Ee,De.props));var Ze=Qt(),Qe=Ct(Ze);{var Le=nt=>{var Ue=Wk(),Me=Ct(Ue);y(Me);var yt=V(Me,2);oi(yt,()=>a.child,()=>({props:x(qe)})),$(nt,Ue)},et=nt=>{var Ue=Xk();ir(Ue,()=>({...x(qe)}));var Me=A(Ue);y(Me);var yt=V(Me,2);oi(yt,()=>a.children??pa),k(Ue),$(nt,Ue)};Ne(Qe,nt=>{a.child?nt(Le):nt(et,!1)})}return $(m,Ze),Dr({updateSelectedToIndex:ze,updateSelectedByGroup:Fe,updateSelectedByItem:$e,getValidItems:Je})}var Kk=Te("
                    ");function Jk(m,a){const p=uo();Lr(a,!0);let y=Lt(a,"id",19,()=>Ya(p)),M=Lt(a,"ref",15,null),z=Lt(a,"forceMount",3,!1),T=rr(a,["$$slots","$$events","$$legacy","id","ref","children","child","forceMount"]);const s=hm.create({id:xr.with(()=>y()),ref:xr.with(()=>M(),ne=>M(ne)),forceMount:xr.with(()=>z())}),B=pt(()=>Va(s.props,T));var O=Qt(),X=Ct(O);{var K=ne=>{var H=Qt(),pe=Ct(H);{var ge=Ee=>{var De=Qt(),ze=Ct(De);oi(ze,()=>a.child,()=>({props:x(B)})),$(Ee,De)},Ie=Ee=>{var De=Kk();ir(De,()=>({...x(B)}));var ze=A(De);oi(ze,()=>a.children??pa),k(De),$(Ee,De)};Ne(pe,Ee=>{a.child?Ee(ge):Ee(Ie,!1)})}$(ne,H)};Ne(X,ne=>{s.shouldRender&&ne(K)})}$(m,O),Dr()}var Qk=Te("
                    ");function eA(m,a){const p=uo();Lr(a,!0);let y=Lt(a,"id",19,()=>Ya(p)),M=Lt(a,"ref",15,null),z=Lt(a,"value",3,""),T=Lt(a,"forceMount",3,!1),s=rr(a,["$$slots","$$events","$$legacy","id","ref","value","forceMount","children","child"]);const B=dm.create({id:xr.with(()=>y()),ref:xr.with(()=>M(),pe=>M(pe)),forceMount:xr.with(()=>T()),value:xr.with(()=>z())}),O=pt(()=>Va(s,B.props));var X=Qt(),K=Ct(X);{var ne=pe=>{var ge=Qt(),Ie=Ct(ge);oi(Ie,()=>a.child,()=>({props:x(O)})),$(pe,ge)},H=pe=>{var ge=Qk();ir(ge,()=>({...x(O)}));var Ie=A(ge);oi(Ie,()=>a.children??pa),k(ge),$(pe,ge)};Ne(K,pe=>{a.child?pe(ne):pe(H,!1)})}$(m,X),Dr()}var tA=Te("
                    ");function rA(m,a){const p=uo();Lr(a,!0);let y=Lt(a,"id",19,()=>Ya(p)),M=Lt(a,"ref",15,null),z=rr(a,["$$slots","$$events","$$legacy","id","ref","children","child"]);const T=pm.create({id:xr.with(()=>y()),ref:xr.with(()=>M(),ne=>M(ne))}),s=pt(()=>Va(z,T.props));var B=Qt(),O=Ct(B);{var X=ne=>{var H=Qt(),pe=Ct(H);oi(pe,()=>a.child,()=>({props:x(s)})),$(ne,H)},K=ne=>{var H=tA();ir(H,()=>({...x(s)}));var pe=A(H);oi(pe,()=>a.children??pa),k(H),$(ne,H)};Ne(O,ne=>{a.child?ne(X):ne(K,!1)})}$(m,B),Dr()}var nA=Te("
                    "),iA=Te('
                    ');function aA(m,a){const p=uo();Lr(a,!0);let y=Lt(a,"id",19,()=>Ya(p)),M=Lt(a,"ref",15,null),z=rr(a,["$$slots","$$events","$$legacy","id","ref","children","child"]);const T=fm.create({id:xr.with(()=>y()),ref:xr.with(()=>M(),ne=>M(ne))}),s=pt(()=>Va(z,T.props));var B=iA(),O=A(B);{var X=ne=>{var H=Qt(),pe=Ct(H);oi(pe,()=>a.child,()=>({props:x(s)})),$(ne,H)},K=ne=>{var H=nA();ir(H,()=>({...x(s)}));var pe=A(H);oi(pe,()=>a.children??pa),k(H),$(ne,H)};Ne(O,ne=>{a.child?ne(X):ne(K,!1)})}k(B),$(m,B),Dr()}var oA=Te("");function sA(m,a){const p=uo();Lr(a,!0);let y=Lt(a,"value",15,""),M=Lt(a,"autofocus",3,!1),z=Lt(a,"id",19,()=>Ya(p)),T=Lt(a,"ref",15,null),s=rr(a,["$$slots","$$events","$$legacy","value","autofocus","id","ref","child"]);const B=mm.create({id:xr.with(()=>z()),ref:xr.with(()=>T(),pe=>T(pe)),value:xr.with(()=>y(),pe=>{y(pe)}),autofocus:xr.with(()=>M()??!1)}),O=pt(()=>Va(s,B.props));var X=Qt(),K=Ct(X);{var ne=pe=>{var ge=Qt(),Ie=Ct(ge);oi(Ie,()=>a.child,()=>({props:x(O)})),$(pe,ge)},H=pe=>{var ge=oA();Ka(ge),ir(ge,()=>({...x(O)})),dp(ge,y),$(pe,ge)};Ne(K,pe=>{a.child?pe(ne):pe(H,!1)})}$(m,X),Dr()}var lA=Te("
                    "),cA=Te('
                    ');function uA(m,a){const p=uo();Lr(a,!0);let y=Lt(a,"id",19,()=>Ya(p)),M=Lt(a,"ref",15,null),z=Lt(a,"value",3,""),T=Lt(a,"disabled",3,!1),s=Lt(a,"onSelect",3,qu),B=Lt(a,"forceMount",3,!1),O=Lt(a,"keywords",19,()=>[]),X=rr(a,["$$slots","$$events","$$legacy","id","ref","value","disabled","children","child","onSelect","forceMount","keywords"]);const K=_m.create({id:xr.with(()=>y()),ref:xr.with(()=>M(),ge=>M(ge)),value:xr.with(()=>z()),disabled:xr.with(()=>T()),onSelect:xr.with(()=>s()),forceMount:xr.with(()=>B()),keywords:xr.with(()=>O())}),ne=pt(()=>Va(X,K.props));var H=Qt(),pe=Ct(H);ju(pe,()=>K.root.key,ge=>{var Ie=cA(),Ee=A(Ie);{var De=ze=>{var Fe=Qt(),$e=Ct(Fe);{var Je=Ze=>{var Qe=Qt(),Le=Ct(Qe);oi(Le,()=>a.child,()=>({props:x(ne)})),$(Ze,Qe)},qe=Ze=>{var Qe=lA();ir(Qe,()=>({...x(ne)}));var Le=A(Qe);oi(Le,()=>a.children??pa),k(Qe),$(Ze,Qe)};Ne($e,Ze=>{a.child?Ze(Je):Ze(qe,!1)})}$(ze,Fe)};Ne(Ee,ze=>{K.shouldRender&&ze(De)})}k(Ie),We(()=>wr(Ie,"data-value",K.trueValue)),$(ge,Ie)}),$(m,H),Dr()}var hA=Te("
                    ");function dA(m,a){const p=uo();Lr(a,!0);let y=Lt(a,"id",19,()=>Ya(p)),M=Lt(a,"ref",15,null),z=rr(a,["$$slots","$$events","$$legacy","id","ref","child","children","aria-label"]);const T=vm.create({id:xr.with(()=>y()),ref:xr.with(()=>M(),X=>M(X)),ariaLabel:xr.with(()=>a["aria-label"]??"Suggestions...")}),s=pt(()=>Va(z,T.props));var B=Qt(),O=Ct(B);ju(O,()=>T.root._commandState.search==="",X=>{var K=Qt(),ne=Ct(K);{var H=ge=>{var Ie=Qt(),Ee=Ct(Ie);oi(Ee,()=>a.child,()=>({props:x(s)})),$(ge,Ie)},pe=ge=>{var Ie=hA();ir(Ie,()=>({...x(s)}));var Ee=A(Ie);oi(Ee,()=>a.children??pa),k(Ie),$(ge,Ie)};Ne(ne,ge=>{a.child?ge(H):ge(pe,!1)})}$(X,K)}),$(m,B),Dr()}const ov=1,pA=.9,fA=.8,mA=.17,Of=.1,Nf=.999,_A=.9999,gA=.99,vA=/[\\/_+.#"@[({&]/,yA=/[\\/_+.#"@[({&]/g,xA=/[\s-]/,w0=/[\s-]/g;function xm(m,a,p,y,M,z,T){if(z===a.length)return M===m.length?ov:gA;const s=`${M},${z}`;if(T[s]!==void 0)return T[s];const B=y.charAt(z);let O=p.indexOf(B,M),X=0,K,ne,H,pe;for(;O>=0;)K=xm(m,a,p,y,O+1,z+1,T),K>X&&(O===M?K*=ov:vA.test(m.charAt(O-1))?(K*=fA,H=m.slice(M,O-1).match(yA),H&&M>0&&(K*=Nf**H.length)):xA.test(m.charAt(O-1))?(K*=pA,pe=m.slice(M,O-1).match(w0),pe&&M>0&&(K*=Nf**pe.length)):(K*=mA,M>0&&(K*=Nf**(O-M))),m.charAt(O)!==a.charAt(z)&&(K*=_A)),(KK&&(K=ne*Of)),K>X&&(X=K),O=p.indexOf(B,O+1);return T[s]=X,X}function sv(m){return m.toLowerCase().replace(w0," ")}function T0(m,a,p){return m=p&&p.length>0?`${`${m} ${p==null?void 0:p.join(" ")}`}`:m,xm(m,a,sv(m),sv(a),0,0,{})}const bA=18,C0=40,wA=`${C0}px`,TA=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function CA({containerRef:m,inputRef:a,pushPasswordManagerStrategy:p,isFocused:y,domContext:M}){let z=st(!1),T=st(!1),s=st(!1);function B(){const X=p.current;return X==="none"?!1:X==="increase-width"&&x(z)&&x(T)}function O(){const X=m.current,K=a.current;if(!X||!K||x(s)||p.current==="none")return;const ne=X,H=ne.getBoundingClientRect().left+ne.offsetWidth,pe=ne.getBoundingClientRect().top+ne.offsetHeight/2,ge=H-bA,Ie=pe;M.querySelectorAll(TA).length===0&&M.getDocument().elementFromPoint(ge,Ie)===X||(se(z,!0),se(s,!0))}return Hr(()=>{const X=m.current;if(!X||p.current==="none")return;function K(){const pe=d0(X).innerWidth-X.getBoundingClientRect().right;se(T,pe>=C0)}K();const ne=setInterval(K,1e3);return()=>{clearInterval(ne)}}),Hr(()=>{const X=y.current||M.getActiveElement()===a.current;if(p.current==="none"||!X)return;const K=setTimeout(O,0),ne=setTimeout(O,2e3),H=setTimeout(O,5e3),pe=setTimeout(()=>{se(s,!0)},6e3);return()=>{clearTimeout(K),clearTimeout(ne),clearTimeout(H),clearTimeout(pe)}}),{get hasPwmBadge(){return x(z)},get willPushPwmBadge(){return B()},PWM_BADGE_SPACE_WIDTH:wA}}const S0=p0({component:"pin-input",parts:["root","cell"]}),SA=["Backspace","Delete","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","Escape","Enter","Tab","Shift","Control","Meta"];var Ha,Pc,Wo,ja,Wa,Ic,To,Xo,Cs,Mc,sp,Ch,Sh,lp,cp,P0,Ph,Ih,up,Mh;const c_=class c_{constructor(a){Ar(this,cp);yr(this,"opts");yr(this,"attachment");Ar(this,Ha,xr(null));Ar(this,Pc,st(!1));yr(this,"inputAttachment",Xa(at(this,Ha)));Ar(this,Wo,xr(!1));Ar(this,ja,st(null));Ar(this,Wa,st(null));Ar(this,Ic,new ck(()=>this.opts.value.current??""));Ar(this,To,pt(()=>typeof this.opts.pattern.current=="string"?new RegExp(this.opts.pattern.current):this.opts.pattern.current));Ar(this,Xo,st(bi({prev:[null,null,"none"],willSyntheticBlur:!1})));Ar(this,Cs);Ar(this,Mc);yr(this,"domContext");yr(this,"onkeydown",a=>{const p=a.key;SA.includes(p)||a.ctrlKey||a.metaKey||p&&x(at(this,To))&&!x(at(this,To)).test(p)&&a.preventDefault()});Ar(this,sp,pt(()=>({position:"relative",cursor:this.opts.disabled.current?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"})));Ar(this,Ch,pt(()=>({id:this.opts.id.current,[S0.root]:"",style:x(at(this,sp)),...this.attachment})));Ar(this,Sh,pt(()=>({style:{position:"absolute",inset:0,pointerEvents:"none"}})));Ar(this,lp,pt(()=>({position:"absolute",inset:0,width:at(this,Cs).willPushPwmBadge?`calc(100% + ${at(this,Cs).PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:at(this,Cs).willPushPwmBadge?`inset(0 ${at(this,Cs).PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:this.opts.textAlign.current,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--bits-pin-input-root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"})));Ar(this,Ph,()=>{var ge;const a=at(this,Ha).current,p=this.opts.ref.current;if(!a||!p)return;if(this.domContext.getActiveElement()!==a){se(at(this,ja),null),se(at(this,Wa),null);return}const y=a.selectionStart,M=a.selectionEnd,z=a.selectionDirection??"none",T=a.maxLength,s=a.value,B=x(at(this,Xo)).prev;let O=-1,X=-1,K;if(s.length!==0&&y!==null&&M!==null){const Ie=y===M,Ee=y===s.length&&s.length1&&s.length>1){let ze=0;if(B[0]!==null&&B[1]!==null){K=De{const p=a.currentTarget.value.slice(0,this.opts.maxLength.current);if(p.length>0&&x(at(this,To))&&!x(at(this,To)).test(p)){a.preventDefault();return}typeof at(this,Ic).current=="string"&&p.length{const p=at(this,Ha).current;if(p){const y=Math.min(p.value.length,this.opts.maxLength.current-1),M=p.value.length;p.setSelectionRange(y,M),se(at(this,ja),y,!0),se(at(this,Wa),M,!0)}at(this,Wo).current=!0});yr(this,"onpaste",a=>{var X,K,ne,H;const p=at(this,Ha).current;if(!p)return;const y=pe=>{const ge=p.selectionStart===null?void 0:p.selectionStart,Ie=p.selectionEnd===null?void 0:p.selectionEnd,Ee=ge!==Ie,De=this.opts.value.current;return(Ee?De.slice(0,ge)+pe+De.slice(Ie):De.slice(0,ge)+pe+De.slice(ge)).slice(0,this.opts.maxLength.current)},M=pe=>pe.length>0&&x(at(this,To))&&!x(at(this,To)).test(pe);if(!((X=this.opts.pasteTransformer)!=null&&X.current)&&(!at(this,Mc).isIOS||!a.clipboardData||!p)){const pe=y((K=a.clipboardData)==null?void 0:K.getData("text/plain"));M(pe)&&a.preventDefault();return}const z=((ne=a.clipboardData)==null?void 0:ne.getData("text/plain"))??"",T=(H=this.opts.pasteTransformer)!=null&&H.current?this.opts.pasteTransformer.current(z):z;a.preventDefault();const s=y(T);if(M(s))return;p.value=s,this.opts.value.current=s;const B=Math.min(s.length,this.opts.maxLength.current-1),O=s.length;p.setSelectionRange(B,O),se(at(this,ja),B,!0),se(at(this,Wa),O,!0)});yr(this,"onmouseover",a=>{se(at(this,Pc),!0)});yr(this,"onmouseleave",a=>{se(at(this,Pc),!1)});yr(this,"onblur",a=>{if(x(at(this,Xo)).willSyntheticBlur){x(at(this,Xo)).willSyntheticBlur=!1;return}at(this,Wo).current=!1});Ar(this,Ih,pt(()=>{var a;return{id:this.opts.inputId.current,style:x(at(this,lp)),autocomplete:this.opts.autocomplete.current||"one-time-code","data-pin-input-input":"","data-pin-input-input-mss":x(at(this,ja)),"data-pin-input-input-mse":x(at(this,Wa)),inputmode:this.opts.inputmode.current,pattern:(a=x(at(this,To)))==null?void 0:a.source,maxlength:this.opts.maxLength.current,value:this.opts.value.current,disabled:Pk(this.opts.disabled.current),onpaste:this.onpaste,oninput:this.oninput,onkeydown:this.onkeydown,onmouseover:this.onmouseover,onmouseleave:this.onmouseleave,onfocus:this.onfocus,onblur:this.onblur,...this.inputAttachment}}));Ar(this,up,pt(()=>Array.from({length:this.opts.maxLength.current}).map((a,p)=>{const y=at(this,Wo).current&&x(at(this,ja))!==null&&x(at(this,Wa))!==null&&(x(at(this,ja))===x(at(this,Wa))&&p===x(at(this,ja))||p>=x(at(this,ja))&&p({cells:x(at(this,up)),isFocused:at(this,Wo).current,isHovering:x(at(this,Pc))})));var p;this.opts=a,this.attachment=Xa(this.opts.ref),this.domContext=new xk(a.ref),na(this,Mc,{value:this.opts.value,isIOS:typeof window<"u"&&((p=window==null?void 0:window.CSS)==null?void 0:p.supports("-webkit-touch-callout","none"))}),na(this,Cs,CA({containerRef:this.opts.ref,inputRef:at(this,Ha),isFocused:at(this,Wo),pushPasswordManagerStrategy:this.opts.pushPasswordManagerStrategy,domContext:this.domContext})),Fn(()=>{const y=at(this,Ha).current,M=this.opts.ref.current;if(!y||!M)return;at(this,Mc).value.current!==y.value&&(this.opts.value.current=y.value),x(at(this,Xo)).prev=[y.selectionStart,y.selectionEnd,y.selectionDirection??"none"];const z=Nu(this.domContext.getDocument(),"selectionchange",at(this,Ph),{capture:!0});at(this,Ph).call(this),this.domContext.getActiveElement()===y&&(at(this,Wo).current=!0),this.domContext.getElementById("pin-input-style")||jr(this,cp,P0).call(this);const T=()=>{M&&M.style.setProperty("--bits-pin-input-root-height",`${y.clientHeight}px`)};T();const s=new ResizeObserver(T);return s.observe(y),()=>{z(),s.disconnect()}}),Ps([()=>this.opts.value.current,()=>at(this,Ha).current],()=>{PA(()=>{const y=at(this,Ha).current;if(!y)return;y.dispatchEvent(new Event("input"));const M=y.selectionStart,z=y.selectionEnd,T=y.selectionDirection??"none";M!==null&&z!==null&&(se(at(this,ja),M,!0),se(at(this,Wa),z,!0),x(at(this,Xo)).prev=[M,z,T])},this.domContext)}),Hr(()=>{const y=this.opts.value.current,M=at(this,Ic).current,z=this.opts.maxLength.current,T=this.opts.onComplete.current;M!==void 0&&y!==M&&M.length({id:this.opts.id.current,[S0.cell]:"","data-active":this.opts.cell.current.isActive?"":void 0,"data-inactive":this.opts.cell.current.isActive?void 0:"",...this.attachment})));this.opts=a,this.attachment=Xa(this.opts.ref)}static create(a){return new u_(a)}get props(){return x(at(this,kh))}set props(a){se(at(this,kh),a)}};kh=new WeakMap;let wm=u_;function PA(m,a){const p=a.setTimeout(m,0),y=a.setTimeout(m,10),M=a.setTimeout(m,50);return[p,y,M]}function Lu(m,a){try{m.insertRule(a)}catch{console.error("pin input could not insert CSS rule:",a)}}var IA=Te("
                    ");function MA(m,a){const p=uo();Lr(a,!0);let y=Lt(a,"id",19,()=>Ya(p)),M=Lt(a,"inputId",19,()=>`${Ya(p)}-input`),z=Lt(a,"ref",15,null),T=Lt(a,"maxlength",3,6),s=Lt(a,"textalign",3,"left"),B=Lt(a,"inputmode",3,"numeric"),O=Lt(a,"onComplete",3,qu),X=Lt(a,"pushPasswordManagerStrategy",3,"increase-width"),K=Lt(a,"class",3,""),ne=Lt(a,"autocomplete",3,"one-time-code"),H=Lt(a,"disabled",3,!1),pe=Lt(a,"value",15,""),ge=Lt(a,"onValueChange",3,qu),Ie=rr(a,["$$slots","$$events","$$legacy","id","inputId","ref","maxlength","textalign","pattern","inputmode","onComplete","pushPasswordManagerStrategy","class","children","autocomplete","disabled","value","onValueChange","pasteTransformer"]);const Ee=bm.create({id:xr.with(()=>y()),ref:xr.with(()=>z(),Qe=>z(Qe)),inputId:xr.with(()=>M()),autocomplete:xr.with(()=>ne()),maxLength:xr.with(()=>T()),textAlign:xr.with(()=>s()),disabled:xr.with(()=>H()),inputmode:xr.with(()=>B()),pattern:xr.with(()=>a.pattern),onComplete:xr.with(()=>O()),value:xr.with(()=>pe(),Qe=>{pe(Qe),ge()(Qe)}),pushPasswordManagerStrategy:xr.with(()=>X()),pasteTransformer:xr.with(()=>a.pasteTransformer)}),De=pt(()=>Va(Ie,Ee.inputProps)),ze=pt(()=>Va(Ee.rootProps,{class:K()})),Fe=pt(()=>Va(Ee.inputWrapperProps,{}));var $e=IA();ir($e,()=>({...x(ze)}));var Je=A($e);oi(Je,()=>a.children??pa,()=>Ee.snippetProps);var qe=V(Je,2);ir(qe,()=>({...x(Fe)}));var Ze=A(qe);Ka(Ze),ir(Ze,()=>({...x(De)})),k(qe),k($e),$(m,$e),Dr()}var kA=Te("
                    ");function AA(m,a){const p=uo();Lr(a,!0);let y=Lt(a,"id",19,()=>Ya(p)),M=Lt(a,"ref",15,null),z=rr(a,["$$slots","$$events","$$legacy","id","ref","cell","child","children"]);const T=wm.create({id:xr.with(()=>y()),ref:xr.with(()=>M(),ne=>M(ne)),cell:xr.with(()=>a.cell)}),s=pt(()=>Va(z,T.props));var B=Qt(),O=Ct(B);{var X=ne=>{var H=Qt(),pe=Ct(H);oi(pe,()=>a.child,()=>({props:x(s)})),$(ne,H)},K=ne=>{var H=kA();ir(H,()=>({...x(s)}));var pe=A(H);oi(pe,()=>a.children??pa),k(H),$(ne,H)};Ne(O,ne=>{a.child?ne(X):ne(K,!1)})}$(m,B),Dr()}function Ac(...m){return Lv(Ou(m))}function EA(m,a){Lr(a,!0);let p=Lt(a,"ref",15,null),y=Lt(a,"value",15,""),M=rr(a,["$$slots","$$events","$$legacy","ref","value","class"]);var z=Qt(),T=Ct(z);{let s=pt(()=>Ac("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",a.class));xi(T,()=>Yk,(B,O)=>{O(B,Is({"data-slot":"command",get class(){return x(s)}},()=>M,{get value(){return y()},set value(X){y(X)},get ref(){return p()},set ref(X){p(X)}}))})}$(m,z),Dr()}var zA=Sr('');function _l(m,a){let p=rr(a,["$$slots","$$events","$$legacy"]);var y=zA();ir(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...p})),$(m,y)}function LA(m,a){Lr(a,!0);let p=Lt(a,"ref",15,null),y=rr(a,["$$slots","$$events","$$legacy","ref","class"]);var M=Qt(),z=Ct(M);{let T=pt(()=>Ac("py-6 text-center text-sm",a.class));xi(z,()=>Jk,(s,B)=>{B(s,Is({"data-slot":"command-empty",get class(){return x(T)}},()=>y,{get ref(){return p()},set ref(O){p(O)}}))})}$(m,M),Dr()}var DA=Te(" ",1);function RA(m,a){Lr(a,!0);let p=Lt(a,"ref",15,null),y=rr(a,["$$slots","$$events","$$legacy","ref","class","children","heading","value"]);var M=Qt(),z=Ct(M);{let T=pt(()=>Ac("text-foreground overflow-hidden p-1",a.class)),s=pt(()=>a.value??a.heading??`----${qk()}`);xi(z,()=>eA,(B,O)=>{O(B,Is({"data-slot":"command-group",get class(){return x(T)},get value(){return x(s)}},()=>y,{get ref(){return p()},set ref(X){p(X)},children:(X,K)=>{var ne=DA(),H=Ct(ne);{var pe=Ie=>{var Ee=Qt(),De=Ct(Ee);xi(De,()=>rA,(ze,Fe)=>{Fe(ze,{class:"text-muted-foreground px-2 py-1.5 text-xs font-medium",children:($e,Je)=>{vn();var qe=wi();We(()=>de(qe,a.heading)),$($e,qe)},$$slots:{default:!0}})}),$(Ie,Ee)};Ne(H,Ie=>{a.heading&&Ie(pe)})}var ge=V(H,2);xi(ge,()=>aA,(Ie,Ee)=>{Ee(Ie,{get children(){return a.children}})}),$(X,ne)},$$slots:{default:!0}}))})}$(m,M),Dr()}function BA(m,a){Lr(a,!0);let p=Lt(a,"ref",15,null),y=rr(a,["$$slots","$$events","$$legacy","ref","class"]);var M=Qt(),z=Ct(M);{let T=pt(()=>Ac("aria-selected:bg-base-300 aria-selected:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",a.class));xi(z,()=>uA,(s,B)=>{B(s,Is({"data-slot":"command-item",get class(){return x(T)}},()=>y,{get ref(){return p()},set ref(O){p(O)}}))})}$(m,M),Dr()}var FA=Sr('');function OA(m,a){let p=rr(a,["$$slots","$$events","$$legacy"]);var y=FA();ir(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...p})),$(m,y)}var NA=Te('
                    ');function jA(m,a){Lr(a,!0);let p=Lt(a,"ref",15,null),y=Lt(a,"value",15,""),M=rr(a,["$$slots","$$events","$$legacy","ref","class","value"]);var z=NA(),T=A(z);OA(T,{class:"size-5 opacity-50"});var s=V(T,2);{let B=pt(()=>Ac("placeholder:text-muted-foreground outline-hidden flex h-10 w-full rounded-md bg-transparent py-3 text-sm disabled:cursor-not-allowed disabled:opacity-50",a.class));xi(s,()=>sA,(O,X)=>{X(O,Is({"data-slot":"command-input",get class(){return x(B)}},()=>M,{get ref(){return p()},set ref(K){p(K)},get value(){return y()},set value(K){y(K)}}))})}k(z),$(m,z),Dr()}function VA(m,a){Lr(a,!0);let p=Lt(a,"ref",15,null),y=rr(a,["$$slots","$$events","$$legacy","ref","class"]);var M=Qt(),z=Ct(M);{let T=pt(()=>Ac("max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden",a.class));xi(z,()=>dA,(s,B)=>{B(s,Is({"data-slot":"command-list",get class(){return x(T)}},()=>y,{get ref(){return p()},set ref(O){p(O)}}))})}$(m,M),Dr()}var qA=Sr('');function ZA(m,a){let p=rr(a,["$$slots","$$events","$$legacy"]);var y=qA();ir(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...p})),$(m,y)}var UA=Te(" ",1),$A=Te(' ',1),GA=Te(' '),HA=Te(" ",1),WA=Te(" ",1),XA=(m,a)=>{a(0)},YA=Te(''),KA=Te('
                    ');function lv(m,a){Lr(a,!0);let p=Lt(a,"countryId",15,0),y=Lt(a,"dropdownDirection",3,"right"),M=st(null),z=st(null),T=st("");function s(){Iv().then(()=>{var ze;(ze=document.activeElement)==null||ze.blur(),se(T,"")})}var B=KA(),O=A(B),X=A(O),K=A(X);{var ne=ze=>{var Fe=UA(),$e=Ct(Fe),Je=A($e,!0);k($e);var qe=V($e,2);ZA(qe,{class:"size-3.5"}),We(Ze=>de(Je,Ze),[()=>Uv()]),$(ze,Fe)},H=ze=>{const Fe=pt(()=>So(p()));var $e=$A(),Je=Ct($e),qe=A(Je,!0);k(Je);var Ze=V(Je);We(()=>{de(qe,x(Fe).flag),de(Ze,` ${x(Fe).name??""}`)}),$(ze,$e)};Ne(K,ze=>{p()===0?ze(ne):ze(H,!1)})}k(X);var pe=V(X,2);let ge;var Ie=A(pe);xi(Ie,()=>EA,(ze,Fe)=>{Fe(ze,{children:($e,Je)=>{var qe=WA(),Ze=Ct(qe);xi(Ze,()=>jA,(Le,et)=>{et(Le,{placeholder:"Country",get ref(){return x(M)},set ref(nt){se(M,nt)},get value(){return x(T)},set value(nt){se(T,nt,!0)}})});var Qe=V(Ze,2);xi(Qe,()=>VA,(Le,et)=>{et(Le,{children:(nt,Ue)=>{var Me=HA(),yt=Ct(Me);xi(yt,()=>LA,(re,he)=>{he(re,{children:(oe,Ae)=>{vn();var je=wi();We(ft=>de(je,ft),[()=>Nw()]),$(oe,je)},$$slots:{default:!0}})});var Q=V(yt,2);xi(Q,()=>RA,(re,he)=>{he(re,{children:(oe,Ae)=>{var je=Qt(),ft=Ct(je);hi(ft,17,()=>Wi.countries,it=>it.id,(it,ut)=>{var Pt=Qt(),Dt=Ct(Pt);xi(Dt,()=>BA,(ot,dt)=>{dt(ot,{get value(){return x(ut).name},onSelect:()=>{p(x(ut).id),s()},children:(vt,xt)=>{var It=GA(),wt=A(It),_t=A(wt,!0);k(wt);var Et=V(wt);k(It),We(()=>{de(_t,x(ut).flag),de(Et,` ${x(ut).name??""}`)}),$(vt,It)},$$slots:{default:!0}})}),$(it,Pt)}),$(oe,je)},$$slots:{default:!0}})}),$(nt,Me)},$$slots:{default:!0}})}),$($e,qe)},$$slots:{default:!0}})}),k(pe),k(O);var Ee=V(O,2);{var De=ze=>{var Fe=YA();Fe.__click=[XA,p];var $e=A(Fe);_l($e,{class:"size-3.5"}),k(Fe),$(ze,Fe)};Ne(Ee,ze=>{p()!=0&&ze(De)})}k(B),Ko(B,ze=>se(z,ze),()=>x(z)),We(ze=>ge=zr(pe,1,"dropdown-content menu bg-base-100 rounded-box z-1 border-base-content/10 w-52 rounded-lg border py-1 shadow-sm",null,ge,ze),[()=>({"right-1":y()==="left"})]),di("focus",X,()=>{x(M).focus()}),$(m,B),Dr()}$n(["click"]);var JA=Sr('');function QA(m,a){let p=rr(a,["$$slots","$$events","$$legacy"]);var y=JA();ir(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...p})),$(m,y)}var e8=Sr(''),t8=Sr('');function Uu(m,a){let p=rr(a,["$$slots","$$events","$$legacy","filled"]);var y=Qt(),M=Ct(y);{var z=s=>{var B=e8();ir(B,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...p})),$(s,B)},T=s=>{var B=t8();ir(B,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...p})),$(s,B)};Ne(M,s=>{a.filled?s(z):s(T,!1)})}$(m,y)}var r8=Te(''),n8=Te('
                    '),i8=Te('
                    '),a8=(m,a,p)=>{a.onvisitclick({lat:x(p).lastLatitude,lng:x(p).lastLongitude})},o8=Te(' '),s8=Te('

                    '),l8=Te(' '),c8=Te('

                    '),u8=Te(' '),h8=Te(" "),d8=Te('
                    '),p8=Te('

                    '),f8=Te(' '),m8=Te('

                    '),_8=Te('
                    '),g8=Te('
                    ',1);function v8(m,a){Lr(a,!0);const p=[];let y=st(1e3);const M=pt(()=>x(y)<=640);let z=st("today"),T={regions:{label:KT(),icon:Em},countries:{label:eC(),icon:QA},players:{label:Yv(),icon:yp},alliances:{label:Kv(),icon:xp}},s=st("regions"),B=st(0),O=bi({players:{},alliances:{},regions:{},countries:{}}),X=pt(()=>{var qe,Ze,Qe;return x(s)==="regions"?(Ze=(qe=O[x(s)][x(B)])==null?void 0:qe[x(z)])==null?void 0:Ze.entries:(Qe=O[x(s)][x(z)])==null?void 0:Qe.entries});const K=5*1e3;Hr(()=>{var Le;if(!a.open)return;const qe=x(z),Ze=x(s),Qe=x(B);Ze==="players"&&(!O[Ze][qe]||Date.now()-O[Ze][qe].time>K)?Qr.leaderboardPlayers(qe).then(et=>{O[Ze][qe]={time:Date.now(),entries:et}}).catch(et=>Fr.error(et.message)):Ze==="alliances"&&(!O[Ze][qe]||Date.now()-O[Ze][qe].time>K)?Qr.leaderboardAlliances(qe).then(et=>{O[Ze][qe]={time:Date.now(),entries:et}}).catch(et=>Fr.error(et.message)):Ze==="countries"&&(!O[Ze][qe]||Date.now()-O[Ze][qe].time>K)?Qr.leaderboardCountries(qe).then(et=>{O[Ze][qe]={time:Date.now(),entries:et}}).catch(et=>Fr.error(et.message)):Ze==="regions"&&(!((Le=O[Ze][Qe])!=null&&Le[qe])||Date.now()-O[Ze][Qe][qe].time>K)&&Qr.leaderboardRegions(qe,Qe).then(et=>{O[Ze][Qe]||(O[Ze][Qe]={}),O[Ze][Qe][qe]={time:Date.now(),entries:et}}).catch(et=>Fr.error(et.message))});var ne=g8(),H=Ct(ne);hi(H,21,()=>Object.entries(T),([qe,{label:Ze,icon:Qe}])=>qe,(qe,Ze)=>{var Qe=pt(()=>Mv(x(Ze),2));let Le=()=>x(Qe)[0],et=()=>x(Qe)[1].label,nt=()=>x(Qe)[1].icon;const Ue=pt(nt);var Me=r8(),yt=A(Me);Ka(yt);var Q,re=V(yt,2);xi(re,()=>x(Ue),(oe,Ae)=>{Ae(oe,{get this(){return nt()},class:"mr-1 size-5 max-sm:hidden"})});var he=V(re);k(Me),We(()=>{wr(yt,"aria-label",et()),Q!==(Q=Le())&&(yt.value=(yt.__value=Le())??""),de(he,` ${et()??""}`)}),Lm(p,[],yt,()=>(Le(),x(s)),oe=>se(s,oe)),$(qe,Me)}),k(H);var pe=V(H,2),ge=A(pe);Um(ge,{get value(){return x(z)},set value(qe){se(z,qe,!0)}});var Ie=V(ge,2);{var Ee=qe=>{lv(qe,{dropdownDirection:"left",get countryId(){return x(B)},set countryId(Ze){se(B,Ze,!0)}})};Ne(Ie,qe=>{x(s)==="regions"&&!x(M)&&qe(Ee)})}k(pe);var De=V(pe,2);{var ze=qe=>{var Ze=n8(),Qe=A(Ze);lv(Qe,{get countryId(){return x(B)},set countryId(Le){se(B,Le,!0)}}),k(Ze),$(qe,Ze)};Ne(De,qe=>{x(s)==="regions"&&x(M)&&qe(ze)})}var Fe=V(De,2);{var $e=qe=>{var Ze=i8(),Qe=A(Ze),Le=V(Qe);{var et=Ue=>{var Me=wi();We(yt=>de(Me,yt),[()=>vp().toLowerCase()]),$(Ue,Me)},nt=Ue=>{var Me=Qt(),yt=Ct(Me);{var Q=he=>{var oe=wi();We(Ae=>de(oe,Ae),[()=>Nm()]),$(he,oe)},re=he=>{var oe=Qt(),Ae=Ct(oe);{var je=ft=>{var it=wi();We(ut=>de(it,ut),[()=>jm()]),$(ft,it)};Ne(Ae,ft=>{x(z)==="month"&&ft(je)},!0)}$(he,oe)};Ne(yt,he=>{x(z)==="week"?he(Q):he(re,!1)},!0)}$(Ue,Me)};Ne(Le,Ue=>{x(z)==="today"?Ue(et):Ue(nt,!1)})}k(Ze),We(Ue=>de(Qe,`${Ue??""} `),[()=>Om()]),$(qe,Ze)},Je=qe=>{var Ze=Qt(),Qe=Ct(Ze);{var Le=nt=>{var Ue=Qt(),Me=Ct(Ue);{var yt=re=>{const he=pt(()=>x(X));var oe=s8(),Ae=A(oe),je=A(Ae),ft=V(A(je)),it=A(ft,!0);k(ft);var ut=V(ft),Pt=A(ut),Dt=V(Pt,2),ot=V(Dt),dt=A(ot);Uu(dt,{class:"text-base-content/50 mb-0.5 ml-1 inline size-4"}),k(ot),k(ut),vn(),k(je),k(Ae);var vt=V(Ae);hi(vt,31,()=>x(he),xt=>xt.id,(xt,It,wt)=>{const _t=pt(()=>So(x(It).countryId));var Et=o8(),Rt=A(Et),Ut=A(Rt,!0);k(Rt);var er=V(Rt),tr=A(er),Nt=A(tr,!0);k(tr);var Ft=V(tr,2),sr=A(Ft),lr=V(sr),Vr=A(lr);k(lr),k(Ft),k(er);var mr=V(er),hr=A(mr,!0);k(mr);var _r=V(mr),Ir=A(_r);Ir.__click=[a8,a,It];var qr=A(Ir,!0);k(Ir),k(_r),k(Et),We((le,j,Z)=>{de(Ut,x(wt)+1),wr(tr,"data-tip",x(_t).name),de(Nt,x(_t).flag),zr(Ft,1,`font-semibold ${le??""}`),de(sr,`${x(It).name??""} `),de(Vr,`#${x(It).number??""}`),de(hr,j),de(qr,Z)},[()=>Oi(x(It).cityId),()=>x(It).pixelsPainted.toLocaleString("en-US"),()=>kx()]),ll(Et,()=>cl,()=>({duration:200})),$(xt,Et)}),k(vt),k(oe),We((xt,It,wt,_t)=>{de(it,xt),de(Pt,`${It??""} `),de(Dt,`${wt??""} `),wr(ot,"data-tip",_t)},[()=>sC(),()=>vc(),()=>yc().toLowerCase(),()=>fC()]),$(re,oe)},Q=re=>{var he=Qt(),oe=Ct(he);{var Ae=ft=>{var it=c8(),ut=A(it),Pt=A(ut),Dt=V(A(Pt)),ot=A(Dt,!0);k(Dt);var dt=V(Dt),vt=A(dt),xt=V(vt,2),It=V(xt),wt=A(It);Uu(wt,{class:"text-base-content/50 mb-0.5 ml-1 inline size-4"}),k(It),k(dt),k(Pt),k(ut);var _t=V(ut);hi(_t,31,()=>x(X),Et=>Et.id,(Et,Rt,Ut)=>{const er=pt(()=>So(x(Rt).id));var tr=l8(),Nt=A(tr),Ft=A(Nt,!0);k(Nt);var sr=V(Nt),lr=A(sr),Vr=A(lr,!0);k(lr);var mr=V(lr,2),hr=A(mr,!0);k(mr),k(sr);var _r=V(sr),Ir=A(_r,!0);k(_r),k(tr),We((qr,le)=>{de(Ft,x(Ut)+1),wr(lr,"data-tip",x(er).name),de(Vr,x(er).flag),zr(mr,1,`font-semibold ${qr??""}`),de(hr,x(er).name),de(Ir,le)},[()=>Oi(x(Rt).id),()=>x(Rt).pixelsPainted.toLocaleString("en-US")]),ll(tr,()=>cl,()=>({duration:200})),$(Et,tr)}),k(_t),k(it),We((Et,Rt,Ut,er)=>{de(ot,Et),de(vt,`${Rt??""} `),de(xt,`${Ut??""} `),wr(It,"data-tip",er)},[()=>Uv(),()=>vc(),()=>yc().toLowerCase(),()=>UC()]),$(ft,it)},je=ft=>{var it=Qt(),ut=Ct(it);{var Pt=ot=>{const dt=pt(()=>x(X));var vt=p8(),xt=A(vt),It=A(xt),wt=V(A(It)),_t=A(wt,!0);k(wt);var Et=V(wt),Rt=A(Et),Ut=V(Rt,2,!0);k(Et),k(It),k(xt);var er=V(xt);hi(er,31,()=>x(dt),tr=>tr.id,(tr,Nt,Ft)=>{const sr=pt(()=>{var xe;return((xe=Mt.data)==null?void 0:xe.id)===x(Nt).id});var lr=d8();let Vr;var mr=A(lr),hr=A(mr,!0);k(mr);var _r=V(mr),Ir=A(_r),qr=A(Ir);co(qr,{class:"size-8 border sm:size-10",get userId(){return x(Nt).id},get pictureUrl(){return x(Nt).picture}});var le=V(qr,2),j=A(le),Z=A(j),Y=V(Z),ae=A(Y);k(Y),k(j);var fe=V(j,2);{var Se=xe=>{const Ot=pt(()=>So(x(Nt).equippedFlag));var cr=u8(),Jt=A(cr,!0);k(cr),We(()=>{wr(cr,"data-tip",x(Ot).name),de(Jt,x(Ot).flag)}),$(xe,cr)};Ne(fe,xe=>{x(Nt).equippedFlag&&xe(Se)})}var ke=V(fe,2);{var we=xe=>{Eh(xe,{get username(){return x(Nt).discord},get id(){return x(Nt).discordId}})};Ne(ke,xe=>{x(Nt).discord&&xe(we)})}var Oe=V(ke,2);{var lt=xe=>{var Ot=h8(),cr=A(Ot,!0);k(Ot),We((Jt,Pr)=>{zr(Ot,1,`badge badge-sm ml-0.5 border-0 ${Jt??""} ${Pr??""}`),de(cr,x(Nt).allianceName)},[()=>pp(x(Nt).allianceId),()=>Oi(x(Nt).allianceId)]),$(xe,Ot)};Ne(Oe,xe=>{"allianceName"in x(Nt)&&x(Nt).allianceName&&xe(lt)})}k(le),k(Ir),k(_r);var Ye=V(_r),kt=A(Ye,!0);k(Ye),k(lr),We((xe,Ot,cr)=>{Vr=zr(lr,1,"",null,Vr,xe),de(hr,x(Ft)+1),zr(j,1,`font-semibold max-sm:ml-2 ${Ot??""} flex gap-1`),de(Z,`${x(Nt).name??""} `),de(ae,`#${x(Nt).id??""}`),de(kt,cr)},[()=>({"bg-base-200":x(sr)}),()=>Oi(x(Nt).id),()=>x(Nt).pixelsPainted.toLocaleString("en-US")]),ll(lr,()=>cl,()=>({duration:200})),$(tr,lr)}),k(er),k(vt),We((tr,Nt,Ft)=>{de(_t,tr),de(Rt,`${Nt??""} `),de(Ut,Ft)},[()=>Dm(),()=>vc(),()=>yc().toLowerCase()]),$(ot,vt)},Dt=ot=>{var dt=Qt(),vt=Ct(dt);{var xt=It=>{var wt=m8(),_t=A(wt),Et=A(_t),Rt=V(A(Et)),Ut=A(Rt,!0);k(Rt);var er=V(Rt),tr=A(er),Nt=V(tr,2,!0);k(er),k(Et),k(_t);var Ft=V(_t);hi(Ft,31,()=>x(X),sr=>sr.id,(sr,lr,Vr)=>{const mr=pt(()=>{var fe;return((fe=Mt.data)==null?void 0:fe.allianceId)===x(lr).id});var hr=f8();let _r;var Ir=A(hr),qr=A(Ir,!0);k(Ir);var le=V(Ir),j=A(le),Z=A(j,!0);k(j),k(le);var Y=V(le),ae=A(Y,!0);k(Y),k(hr),We((fe,Se,ke)=>{_r=zr(hr,1,"",null,_r,fe),de(qr,x(Vr)+1),zr(j,1,`font-semibold ${Se??""}`),de(Z,x(lr).name),de(ae,ke)},[()=>({"bg-base-200":x(mr)}),()=>Oi(x(lr).id),()=>x(lr).pixelsPainted.toLocaleString("en-US")]),ll(hr,()=>cl,()=>({duration:200})),$(sr,hr)}),k(Ft),k(wt),We((sr,lr,Vr)=>{de(Ut,sr),de(tr,`${lr??""} `),de(Nt,Vr)},[()=>_p(),()=>vc(),()=>yc().toLowerCase()]),$(It,wt)};Ne(vt,It=>{x(s)==="alliances"&&It(xt)},!0)}$(ot,dt)};Ne(ut,ot=>{x(s)==="players"?ot(Pt):ot(Dt,!1)},!0)}$(ft,it)};Ne(oe,ft=>{x(s)==="countries"?ft(Ae):ft(je,!1)},!0)}$(re,he)};Ne(Me,re=>{x(s)==="regions"?re(yt):re(Q,!1)})}$(nt,Ue)},et=nt=>{var Ue=_8();$(nt,Ue)};Ne(Qe,nt=>{x(X)?nt(Le):nt(et,!1)},!0)}$(qe,Ze)};Ne(Fe,qe=>{x(X)&&x(X).length===0?qe($e):qe(Je,!1)})}mp("innerWidth",qe=>se(y,qe,!0)),$(m,ne),Dr()}$n(["click"]);var y8=Sr('');function I0(m,a){let p=rr(a,["$$slots","$$events","$$legacy"]);var y=y8();ir(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...p})),$(m,y)}var x8=Te(' ');function b8(m,a){Lr(a,!0);let p=Lt(a,"open",15);Fn(()=>{const K=ne=>{ne.key==="Escape"&&p(!1)};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)});var y=x8(),M=A(y),z=V(A(M),2),T=A(z);I0(T,{class:"size-6"});var s=V(T,2),B=A(s,!0);k(s),k(z);var O=V(z,2),X=A(O);v8(X,{get onvisitclick(){return a.onvisitclick},get open(){return p()}}),k(O),k(M),vn(2),k(y),Ni(y,()=>K=>{Hr(()=>{p()?K.show():K.close()})}),We(K=>de(B,K),[()=>Bm()]),di("close",y,()=>p(!1)),$(m,y),Dr()}var w8=Te("
                    "),T8=Te(' ');function C8(m,a){Lr(a,!0);let p=Lt(a,"open",15);Fn(()=>{const s=B=>{B.key==="Escape"&&p(!1)};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)});var y=T8(),M=A(y),z=V(A(M),2);{var T=s=>{var B=w8(),O=A(B);jx(O,{}),k(B),Ai(2,B,()=>ia,()=>({duration:300})),$(s,B)};Ne(z,s=>{p()&&s(T)})}k(M),vn(2),k(y),Ni(y,()=>s=>{Hr(()=>{p()?s.show():s.close()})}),di("close",y,()=>p(!1)),$(m,y),Dr()}var S8=(m,a,p)=>{localStorage.setItem(x(a),"true"),se(p,!1)},P8=Te('new'),I8=Te("
                    ");function jf(m,a){Lr(a,!0);let p=st(!1);const y=pt(()=>"showed:"+a.key);Fn(()=>{se(p,!localStorage.getItem(x(y)))});var M=I8();M.__click=[S8,y,p];var z=A(M);{var T=B=>{var O=P8();Ai(3,O,()=>ia,()=>({duration:200})),$(B,O)};Ne(z,B=>{x(p)&&B(T)})}var s=V(z,2);oi(s,()=>a.children),k(M),We(()=>zr(M,1,`indicator ${a.class??""}`)),$(m,M),Dr()}$n(["click"]);var M8=Te("

                    You don't have charges to paint.

                    ");function k8(m,a){Lr(a,!1),Nv();var p=M8(),y=V(A(p),2);k(p),We(M=>de(y,` Next charge in ${M??""}`),[()=>rp(Mt.cooldown??0)]),$(m,p),Dr()}var A8=Te("");function M0(m,a){Lr(a,!0);let p=Lt(a,"width",15,0),y=rr(a,["$$slots","$$events","$$legacy","value","fontSize","color","weight","mono","width"]),M=pt(()=>Math.ceil(a.fontSize)),z=st(null);const T=window.devicePixelRatio??1,s='"Geist", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',B='"Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace';Hr(()=>{const X=x(z).getContext("2d");X.textBaseline="top",X.font=`${a.weight??"normal"} ${a.fontSize}px ${a.mono?B:s}`,X.fillStyle=a.color??"#394e6a",X.setTransform(T,0,0,T,0,0),X.clearRect(0,0,p(),x(M)),X.fillText(a.value,0,0);const K=X.measureText(a.value);p(Math.ceil(K.actualBoundingBoxRight)),se(M,K.actualBoundingBoxDescent)});var O=A8();ir(O,()=>({width:p()*T,height:x(M)*T,style:`width: ${p()??""}px; height: ${x(M)??""}px`,...y})),Ko(O,X=>se(z,X),()=>x(z)),$(m,O),Dr()}var E8=Te(' '),z8=Te(' '),L8=Te(''),D8=Te('');function k0(m,a){Lr(a,!0);let p=rr(a,["$$slots","$$events","$$legacy","loading","charges"]),y=st(0);var M=D8();ir(M,()=>({...p,class:`btn btn-primary btn-lg sm:btn-xl relative ${a.class??""}`}));var z=A(M);zh(z,{class:"size-6"});var T=V(z,2),s=A(T),B=V(s);{var O=ne=>{const H=pt(()=>`${Math.floor(a.charges)}/${Mt.data.charges.max}`);var pe=z8(),ge=A(pe),Ie=A(ge);{let ze=pt(()=>a.disabled?"#394e6a33":"#ffffff");M0(Ie,{weight:600,fontSize:16,get value(){return x(H)},get color(){return x(ze)},get width(){return x(y)},set width(Fe){se(y,Fe,!0)}})}k(ge);var Ee=V(ge,2);{var De=ze=>{var Fe=E8(),$e=A(Fe);k(Fe),We(Je=>de($e,`(${Je??""})`),[()=>rp(Mt.cooldown)]),$(ze,Fe)};Ne(Ee,ze=>{a.chargeskc(ge,`width: ${ze??""}px`),[()=>(Math.floor(x(y)/5)+1)*5]),$(ne,pe)};Ne(B,ne=>{a.charges!==void 0&&Mt.data&&ne(O)})}k(T);var X=V(T,2);{var K=ne=>{var H=L8();$(ne,H)};Ne(X,ne=>{a.loading&&ne(K)})}k(M),We(ne=>de(s,`${ne??""} `),[()=>Gv()]),$(m,M),Dr()}const R8="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAABVQTFRFAAAASkKEenHEta7xWmmLi5y0v8vc+SuCVQAAAAF0Uk5TAEDm2GYAAAA/SURBVHjaXcjBDcAwDMNAUW28/8hF0MCIzN9RV7aVfuxp+IGPe+AdPQRpFaRrgcNrn/Bb4LAE4W5aNb3TXUofoSgBYpzN5I4AAAAASUVORK5CYII=",B8="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAFxJREFUeNq107EJACAMRFEHyxSu4jbuZ+0IyhUS4ZDogYEr3++Svp+ZDUzGrRTMIwKmiIApImCKiBgbOXOEcRxQsQcW7rVKeA9gj5gD2D3mgC/GcQSLMEdO+/qtE+/GV5duYCOPAAAAAElFTkSuQmCC",F8="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAAXNSR0IArs4c6QAAAAJ0Uk5TAAB2k804AAAAKklEQVR42mOAAhsbCA3n//9vQ74ApqE2QIAgwIqBykFaICwMAQwt9HEpAIf2Me1Ro5Q9AAAAAElFTkSuQmCC",O8="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAAXNSR0IArs4c6QAAABVJREFUeNpjYGA48x8DYwoB1Q0RlQDDCVmniJ241gAAAABJRU5ErkJggg==";class N8{constructor(a){yr(this,"gm");yr(this,"opacity",1);yr(this,"id",`paint-preview-${Math.random()}`);yr(this,"tiles",new Map);this.input=a,this.gm=new fl(this.input.tileSize)}place([a,p],y){const{tile:M,pixel:z}=this.gm.latLonToTileAndPixel(a,p,this.input.tileZoom),T=this.getTileKey(M[0],M[1]);let s=this.tiles.get(T);if(!s){const B=this.gm.tileBoundsLatLon(M[0],M[1],this.input.tileZoom),O=Vm(B,!0),X=new j8({coordinates:O,id:`${this.id}-${T}`,layerPaint:{"raster-opacity":this.opacity,"raster-resampling":"nearest"},tileSize:this.input.tileSize,beforeLayerId:this.input.beforeLayerId});X.addTo(this.input.map),this.tiles.set(T,X),s=X}s.place(z[0],this.input.tileSize-z[1]-1,y)}clear(){const a=this.input.map;for(const p of this.tiles.values())p.removeFrom(a),p.removeDOM();this.tiles.clear()}clearAndPlace(a,p){this.clear(),this.place(a,p)}remove([a,p]){const{tile:y,pixel:M}=this.gm.latLonToTileAndPixel(a,p,this.input.tileZoom),z=this.getTileKey(y[0],y[1]),T=this.tiles.get(z);T&&T.remove(M[0],this.input.tileSize-M[1]-1)}setCanvasOpacity(a){this.opacity=a;for(const p of this.tiles.values())p.setOpacity(a)}getTileKey(a,p){return`${a},${p}`}}class j8{constructor(a){yr(this,"canvas");yr(this,"maps",new Set);this.input=a;const p=this.input.tileSize;this.canvas=document.createElement("canvas"),this.canvas.width=p,this.canvas.height=p}place(a,p,y){var T;const M=((T=Wi.colors)==null?void 0:T[y])??Wi.colors[0],z=this.canvas.getContext("2d");if(z){const s=z.createImageData(1,1),[B,O,X]=M.rgb,K=y===0?0:255;s.data[0]=B,s.data[1]=O,s.data[2]=X,s.data[3]=K,z.putImageData(s,a,p)}}remove(a,p){const y=this.canvas.getContext("2d");y&&y.clearRect(a,p,1,1)}addTo(a){const p=this.input.id;a.getSource(p)||a.addSource(p,{type:"canvas",canvas:this.canvas,coordinates:this.input.coordinates}),a.getLayer(p)||(a.addLayer({id:p,type:"raster",source:p,paint:this.input.layerPaint}),this.input.beforeLayerId&&a.moveLayer(p,this.input.beforeLayerId)),this.maps.add(a)}removeFrom(a){const{id:p}=this.input;a.getLayer(p)&&a.removeLayer(p),a.getSource(p)&&a.removeSource(p),this.maps.delete(a)}removeDOM(){this.canvas.remove()}setOpacity(a){for(const p of this.maps.values())p.setPaintProperty(this.input.id,"raster-opacity",a)}}var V8=Sr('');function q8(m,a){let p=rr(a,["$$slots","$$events","$$legacy"]);var y=V8();ir(y,()=>({viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...p})),$(m,y)}var Z8=Sr('');function U8(m,a){let p=rr(a,["$$slots","$$events","$$legacy"]);var y=Z8();ir(y,()=>({viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...p})),$(m,y)}var $8=Te("
                    ");function ol(m,a){Lr(a,!0);var p=$8(),y=A(p);oi(y,()=>a.children??pa),k(p),We(()=>zr(p,1,`bg-base-100/60 border-base-content/20 -top-15 pointer-events-none absolute left-1/2 line-clamp-1 flex w-max -translate-x-1/2 select-none items-center gap-1 rounded-full border-2 px-3 py-1.5 ${a.class??""}`)),$(m,p),Dr()}var G8=Te('
                    '),H8=Te("
                    ");function Xm(m,a){Lr(a,!0);const p=Lt(a,"size",3,10),y=Lt(a,"x",19,()=>[-.5,.5]),M=Lt(a,"y",19,()=>[.25,1]),z=Lt(a,"duration",3,2e3),T=Lt(a,"infinite",3,!1),s=Lt(a,"delay",19,()=>[0,50]),B=Lt(a,"colorRange",19,()=>[0,360]),O=Lt(a,"colorArray",19,()=>[]),X=Lt(a,"amount",3,50),K=Lt(a,"iterationCount",3,1),ne=Lt(a,"fallDistance",3,"100px"),H=Lt(a,"rounded",3,!1),pe=Lt(a,"cone",3,!1),ge=Lt(a,"noGravity",3,!1),Ie=Lt(a,"xSpread",3,.15),Ee=Lt(a,"destroyOnComplete",3,!0),De=Lt(a,"disableForReducedMotion",3,!1);let ze=st(!1);Fn(()=>{!Ee()||T()||typeof K()=="string"||setTimeout(()=>se(ze,!0),(z()+s()[1])*K())});function Fe(Qe,Le){return Math.random()*(Le-Qe)+Qe}function $e(){return O().length?O()[Math.round(Math.random()*(O().length-1))]:`hsl(${Math.round(Fe(B()[0],B()[1]))}, 75%, 50%)`}var Je=Qt(),qe=Ct(Je);{var Ze=Qe=>{var Le=H8();let et;hi(Le,21,()=>({length:X()}),hp,(nt,Ue)=>{var Me=G8();We((yt,Q,re,he,oe,Ae,je,ft,it,ut,Pt)=>kc(Me,` + --color: ${yt??""}; + --skew: ${Q??""}deg,${re??""}deg; + --rotation-xyz: ${he??""}, ${oe??""}, ${Ae??""}; + --rotation-deg: ${je??""}deg; + --translate-y-multiplier: ${ft??""}; + --translate-x-multiplier: ${it??""}; + --scale: ${ut??""}; + --transition-delay: ${Pt??""}ms; + --transition-duration: ${T()?`calc(${z()}ms * var(--scale))`:`${z()}ms`};`),[$e,()=>Fe(-45,45),()=>Fe(-45,45),()=>Fe(-10,10),()=>Fe(-10,10),()=>Fe(-10,10),()=>Fe(0,360),()=>Fe(M()[0],M()[1]),()=>Fe(y()[0],y()[1]),()=>.1*Fe(2,10),()=>Fe(s()[0],s()[1])]),$(nt,Me)}),k(Le),We(nt=>{et=zr(Le,1,"confetti-holder svelte-15ksp55",null,et,nt),kc(Le,` + --fall-distance: ${ne()??""}; + --size: ${p()??""}px; + --x-spread: ${1-Ie()}; + --transition-iteration-count: ${(T()?"infinite":K())??""};`)},[()=>({rounded:H(),cone:pe(),"no-gravity":ge(),"reduced-motion":De()})]),$(Qe,Le)};Ne(qe,Qe=>{x(ze)||Qe(Ze)})}$(m,Je),Dr()}var W8=async(m,a,p,y)=>{try{se(a,!0),await Qr.purchase({id:p,amount:1,variant:y.colorIdx}),await Mt.refresh(),aa.notification1.play()}catch(M){Fr.error(M.message)}finally{se(a,!1)}},X8=Te(''),Y8=Te(' Droplets',1),K8=Te(' Unlocked ',1),J8=(m,a)=>a(!1),Q8=Te('

                    Unlock

                    Permanently unlock the color

                    '),eE=Te(' ');function tE(m,a){Lr(a,!0);let p=Lt(a,"open",15);const y=pt(()=>Wi.colors[a.colorIdx]),M=pt(()=>{var H;return((H=Mt.data)==null?void 0:H.droplets)??0});let z=st(!1);const T=pt(()=>(x(z),Mt.hasColor(a.colorIdx)));Fn(()=>{const H=pe=>{pe.key==="Escape"&&p(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)});const s=100,B=Wi.products[s];var O=eE(),X=A(O),K=V(A(X),2);{var ne=H=>{var pe=Q8(),ge=A(pe),Ie=A(ge),Ee=A(Ie);np(Ee,{class:"size-6"});var De=V(Ee,4),ze=A(De);Fv(ze,{get value(){return x(M)}}),k(De),k(Ie),vn(2),k(ge);var Fe=V(ge,2),$e=A(Fe),Je=A($e);k($e);var qe=V($e,2),Ze=A(qe,!0);k(qe);var Qe=V(qe,2),Le=A(Qe);let et;var nt=A(Le);nt.__click=[W8,z,s,a];var Ue=A(nt);{var Me=oe=>{var Ae=X8();$(oe,Ae)};Ne(Ue,oe=>{x(z)&&oe(Me)})}var yt=V(Ue,2);{var Q=oe=>{var Ae=Y8(),je=Ct(Ae);fp(je,{class:"size-5"});var ft=V(je);vn(),We(it=>de(ft,` ${it??""} `),[()=>B.price.toLocaleString("en-US")]),$(oe,Ae)},re=oe=>{var Ae=K8(),je=Ct(Ae);np(je,{class:"size-5"});var ft=V(je,2),it=A(ft);Xm(it,{}),k(ft),$(oe,Ae)};Ne(yt,oe=>{x(T)?oe(re,!1):oe(Q)})}k(nt),k(Le);var he=V(Le,2);he.__click=[J8,p],k(Qe),k(Fe),k(pe),We((oe,Ae)=>{kc(Je,`background: rgb(${x(y).rgb[0]} ${x(y).rgb[1]} ${x(y).rgb[2]})`),wr(Je,"aria-label",x(y).name),de(Ze,x(y).name),wr(Le,"data-tip",oe),et=zr(Le,1,"",null,et,Ae),nt.disabled=x(M)gp(),()=>({tooltip:!x(T)&&x(M){Mt.data&&H(ne)})}k(X),vn(2),k(O),Ni(O,()=>H=>{Hr(()=>{p()?H.show():H.close()})}),di("close",O,()=>p(!1)),$(m,O),Dr()}$n(["click"]);var Tm=function(){return Tm=Object.assign||function(a){for(var p,y=1,M=arguments.length;y0&&z[z.length-1])&&(O[0]===6||O[0]===2)){p=0;continue}if(O[0]===3&&(!z||O[1]>z[0]&&O[1]=M+p?(M=T,[4,rE()]):[3,3]):[3,4];case 2:s.sent(),s.label=3;case 3:return++z,[3,1];case 4:return[2,y]}})})}function $u(m){return m.then(void 0,function(){}),m}function iE(m,a){for(var p=0,y=m.length;p=1)return Math.round(m/a)*a;var p=1/a;return Math.round(m*p)/p}function oE(m){for(var a,p,y="Unexpected syntax '".concat(m,"'"),M=/^\s*([a-z-]*)(.*)$/i.exec(m),z=M[1]||void 0,T={},s=/([.:#][\w-]+|\[.+?\])/gi,B=function(ne,H){T[ne]=T[ne]||[],T[ne].push(H)};;){var O=s.exec(M[2]);if(!O)break;var X=O[0];switch(X[0]){case".":B("class",X.slice(1));break;case"#":B("id",X.slice(1));break;case"[":{var K=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(X);if(K)B(K[1],(p=(a=K[4])!==null&&a!==void 0?a:K[5])!==null&&p!==void 0?p:"");else throw new Error(y);break}default:throw new Error(y)}}return[z,T]}function sE(m){for(var a=new Uint8Array(m.length),p=0;p127)return new TextEncoder().encode(m);a[p]=y}return a}function bs(m,a){var p=m[0]>>>16,y=m[0]&65535,M=m[1]>>>16,z=m[1]&65535,T=a[0]>>>16,s=a[0]&65535,B=a[1]>>>16,O=a[1]&65535,X=0,K=0,ne=0,H=0;H+=z+O,ne+=H>>>16,H&=65535,ne+=M+B,K+=ne>>>16,ne&=65535,K+=y+s,X+=K>>>16,K&=65535,X+=p+T,X&=65535,m[0]=X<<16|K,m[1]=ne<<16|H}function Ga(m,a){var p=m[0]>>>16,y=m[0]&65535,M=m[1]>>>16,z=m[1]&65535,T=a[0]>>>16,s=a[0]&65535,B=a[1]>>>16,O=a[1]&65535,X=0,K=0,ne=0,H=0;H+=z*O,ne+=H>>>16,H&=65535,ne+=M*O,K+=ne>>>16,ne&=65535,ne+=z*B,K+=ne>>>16,ne&=65535,K+=y*O,X+=K>>>16,K&=65535,K+=M*B,X+=K>>>16,K&=65535,K+=z*s,X+=K>>>16,K&=65535,X+=p*O+y*B+M*s+z*T,X&=65535,m[0]=X<<16|K,m[1]=ne<<16|H}function fc(m,a){var p=m[0];a%=64,a===32?(m[0]=m[1],m[1]=p):a<32?(m[0]=p<>>32-a,m[1]=m[1]<>>32-a):(a-=32,m[0]=m[1]<>>32-a,m[1]=p<>>32-a)}function Na(m,a){a%=64,a!==0&&(a<32?(m[0]=m[1]>>>32-a,m[1]=m[1]<>>1];ri(m,a),Ga(m,lE),a[1]=m[0]>>>1,ri(m,a),Ga(m,cE),a[1]=m[0]>>>1,ri(m,a)}var $d=[2277735313,289559509],Gd=[1291169091,658871167],dv=[0,5],uE=[0,1390208809],hE=[0,944331445];function dE(m,a){var p=sE(m);a=a||0;var y=[0,p.length],M=y[1]%16,z=y[1]-M,T=[0,a],s=[0,a],B=[0,0],O=[0,0],X;for(X=0;X>>0).toString(16)).slice(-8)+("00000000"+(T[1]>>>0).toString(16)).slice(-8)+("00000000"+(s[0]>>>0).toString(16)).slice(-8)+("00000000"+(s[1]>>>0).toString(16)).slice(-8)}function pE(m){var a;return Tm({name:m.name,message:m.message,stack:(a=m.stack)===null||a===void 0?void 0:a.split(` +`)},m)}function fE(m){return/^function\s.*?\{\s*\[native code]\s*}$/.test(String(m))}function mE(m){return typeof m!="function"}function _E(m,a){var p=$u(new Promise(function(y){var M=Date.now();cv(m.bind(null,a),function(){for(var z=[],T=0;T=4}function vE(){var m=window,a=navigator;return fa(["msWriteProfilerMark"in m,"MSStream"in m,"msLaunchUri"in a,"msSaveBlob"in a])>=3&&!D0()}function Dh(){var m=window,a=navigator;return fa(["webkitPersistentStorage"in a,"webkitTemporaryStorage"in a,(a.vendor||"").indexOf("Google")===0,"webkitResolveLocalFileSystemURL"in m,"BatteryManager"in m,"webkitMediaStream"in m,"webkitSpeechGrammar"in m])>=5}function ho(){var m=window,a=navigator;return fa(["ApplePayError"in m,"CSSPrimitiveValue"in m,"Counter"in m,a.vendor.indexOf("Apple")===0,"RGBColor"in m,"WebKitMediaKeys"in m])>=4}function Km(){var m=window,a=m.HTMLElement,p=m.Document;return fa(["safari"in m,!("ongestureend"in m),!("TouchEvent"in m),!("orientation"in m),a&&!("autocapitalize"in a.prototype),p&&"pointerLockElement"in p.prototype])>=4}function Rh(){var m=window;return fE(m.print)&&String(m.browser)==="[object WebPageNamespace]"}function R0(){var m,a,p=window;return fa(["buildID"in navigator,"MozAppearance"in((a=(m=document.documentElement)===null||m===void 0?void 0:m.style)!==null&&a!==void 0?a:{}),"onmozfullscreenchange"in p,"mozInnerScreenX"in p,"CSSMozDocumentRule"in p,"CanvasCaptureMediaStream"in p])>=4}function yE(){var m=window;return fa([!("MediaSettingsRange"in m),"RTCEncodedAudioFrame"in m,""+m.Intl=="[object Intl]",""+m.Reflect=="[object Reflect]"])>=3}function xE(){var m=window,a=m.URLPattern;return fa(["union"in Set.prototype,"Iterator"in m,a&&"hasRegExpGroups"in a.prototype,"RGB8"in WebGLRenderingContext.prototype])>=3}function bE(){var m=window;return fa(["DOMRectList"in m,"RTCPeerConnectionIceEvent"in m,"SVGGeometryElement"in m,"ontransitioncancel"in m])>=3}function Bh(){var m=window,a=navigator,p=m.CSS,y=m.HTMLButtonElement;return fa([!("getStorageUpdates"in a),y&&"popover"in y.prototype,"CSSCounterStyleRule"in m,p.supports("font-size-adjust: ex-height 0.5"),p.supports("text-transform: full-width")])>=4}function wE(){if(navigator.platform==="iPad")return!0;var m=screen,a=m.width/m.height;return fa(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,a>.65&&a<1.53])>=2}function TE(){var m=document;return m.fullscreenElement||m.msFullscreenElement||m.mozFullScreenElement||m.webkitFullscreenElement||null}function CE(){var m=document;return(m.exitFullscreen||m.msExitFullscreen||m.mozCancelFullScreen||m.webkitExitFullscreen).call(m)}function Jm(){var m=Dh(),a=R0(),p=window,y=navigator,M="connection";return m?fa([!("SharedWorker"in p),y[M]&&"ontypechange"in y[M],!("sinkId"in new Audio)])>=2:a?fa(["onorientationchange"in p,"orientation"in p,/android/i.test(y.appVersion)])>=2:!1}function SE(){var m=navigator,a=window,p=Audio.prototype,y=a.visualViewport;return fa(["srLatency"in p,"srChannelCount"in p,"devicePosture"in m,y&&"segments"in y,"getTextInformation"in Image.prototype])>=3}function PE(){return kE()?-4:IE()}function IE(){var m=window,a=m.OfflineAudioContext||m.webkitOfflineAudioContext;if(!a)return-2;if(ME())return-1;var p=4500,y=5e3,M=new a(1,y,44100),z=M.createOscillator();z.type="triangle",z.frequency.value=1e4;var T=M.createDynamicsCompressor();T.threshold.value=-50,T.knee.value=40,T.ratio.value=12,T.attack.value=0,T.release.value=.25,z.connect(T),T.connect(M.destination),z.start(0);var s=AE(M),B=s[0],O=s[1],X=$u(B.then(function(K){return EE(K.getChannelData(0).subarray(p))},function(K){if(K.name==="timeout"||K.name==="suspended")return-3;throw K}));return function(){return O(),X}}function ME(){return ho()&&!Km()&&!bE()}function kE(){return ho()&&Bh()&&Rh()||Dh()&&SE()&&xE()}function AE(m){var a=3,p=500,y=500,M=5e3,z=function(){},T=new Promise(function(s,B){var O=!1,X=0,K=0;m.oncomplete=function(pe){return s(pe.renderedBuffer)};var ne=function(){setTimeout(function(){return B(pv("timeout"))},Math.min(y,K+M-Date.now()))},H=function(){try{var pe=m.startRendering();switch(z0(pe)&&$u(pe),m.state){case"running":K=Date.now(),O&&ne();break;case"suspended":document.hidden||X++,O&&X>=a?B(pv("suspended")):setTimeout(H,p);break}}catch(ge){B(ge)}};H(),z=function(){O||(O=!0,K>0&&ne())}});return[T,z]}function EE(m){for(var a=0,p=0;p=0?"+":"").concat(y)}function lz(){var m=new Date().getFullYear();return Math.max(lo(new Date(m,0,1).getTimezoneOffset()),lo(new Date(m,6,1).getTimezoneOffset()))}function cz(){try{return!!window.sessionStorage}catch{return!0}}function uz(){try{return!!window.localStorage}catch{return!0}}function hz(){if(!(D0()||vE()))try{return!!window.indexedDB}catch{return!0}}function dz(){return!!window.openDatabase}function pz(){return navigator.cpuClass}function fz(){var m=navigator.platform;return m==="MacIntel"&&ho()&&!Km()?wE()?"iPad":"iPhone":m}function mz(){return navigator.vendor||""}function _z(){for(var m=[],a=0,p=["chrome","safari","__crWeb","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice"];aK.length*.6}),s.sort(),[2,s]}})})}function xz(){return ho()||Jm()}function bz(m){var a;return Po(this,void 0,void 0,function(){var p,y,M,z,B,T,s,B;return Io(this,function(O){switch(O.label){case 0:for(p=document,y=p.createElement("div"),M=new Array(m.length),z={},mv(y),B=0;B')}function Bz(){return navigator.pdfViewerEnabled}function Fz(){var m=new Float32Array(1),a=new Uint8Array(m.buffer);return m[0]=1/0,m[0]=m[0]-m[0],a[3]}function Oz(){var m=window.ApplePaySession;if(typeof(m==null?void 0:m.canMakePayments)!="function")return-1;if(Nz())return-3;try{return m.canMakePayments()?1:0}catch(a){return jz(a)}}var Nz=DE;function jz(m){if(m instanceof Error&&m.name==="InvalidAccessError"&&/\bfrom\b.*\binsecure\b/i.test(m.message))return-2;throw m}function Vz(){var m,a=document.createElement("a"),p=(m=a.attributionSourceId)!==null&&m!==void 0?m:a.attributionsourceid;return p===void 0?void 0:String(p)}var F0=-1,O0=-2,qz=new Set([10752,2849,2884,2885,2886,2928,2929,2930,2931,2932,2960,2961,2962,2963,2964,2965,2966,2967,2968,2978,3024,3042,3088,3089,3106,3107,32773,32777,32777,32823,32824,32936,32937,32938,32939,32968,32969,32970,32971,3317,33170,3333,3379,3386,33901,33902,34016,34024,34076,3408,3410,3411,3412,3413,3414,3415,34467,34816,34817,34818,34819,34877,34921,34930,35660,35661,35724,35738,35739,36003,36004,36005,36347,36348,36349,37440,37441,37443,7936,7937,7938]),Zz=new Set([34047,35723,36063,34852,34853,34854,34229,36392,36795,38449]),Uz=["FRAGMENT_SHADER","VERTEX_SHADER"],$z=["LOW_FLOAT","MEDIUM_FLOAT","HIGH_FLOAT","LOW_INT","MEDIUM_INT","HIGH_INT"],N0="WEBGL_debug_renderer_info",Gz="WEBGL_polygon_mode";function Hz(m){var a,p,y,M,z,T,s=m.cache,B=j0(s);if(!B)return F0;if(!q0(B))return O0;var O=V0()?null:B.getExtension(N0);return{version:((a=B.getParameter(B.VERSION))===null||a===void 0?void 0:a.toString())||"",vendor:((p=B.getParameter(B.VENDOR))===null||p===void 0?void 0:p.toString())||"",vendorUnmasked:O?(y=B.getParameter(O.UNMASKED_VENDOR_WEBGL))===null||y===void 0?void 0:y.toString():"",renderer:((M=B.getParameter(B.RENDERER))===null||M===void 0?void 0:M.toString())||"",rendererUnmasked:O?(z=B.getParameter(O.UNMASKED_RENDERER_WEBGL))===null||z===void 0?void 0:z.toString():"",shadingLanguageVersion:((T=B.getParameter(B.SHADING_LANGUAGE_VERSION))===null||T===void 0?void 0:T.toString())||""}}function Wz(m){var a=m.cache,p=j0(a);if(!p)return F0;if(!q0(p))return O0;var y=p.getSupportedExtensions(),M=p.getContextAttributes(),z=[],T=[],s=[],B=[],O=[];if(M)for(var X=0,K=Object.keys(M);X + + `;const On={lat:Br.latitude,lng:Br.longitude};return yn.addEventListener("click",Vn=>{Vn.stopPropagation(),tr([Br.latitude,Br.longitude])}),new qd.Marker({element:yn,opacity:x(er)}).setLngLat(On).addTo(x(O))}))}});function tr(bt){var Br;const Xt={lat:bt[0],lng:bt[1]};(Br=x(O))==null||Br.flyTo({center:Xt,zoom:Math.max(x(X),15)}),Co(Xt,x(X)),se(pe,{name:"pixelSelected",latLon:[Xt.lat,Xt.lng]},!0)}Hr(()=>{if(x(pe).name==="paintingPixel")for(const bt of x(Ut))bt.addClassName("hidden");else for(const bt of x(Ut))bt.removeClassName("hidden"),bt.setOpacity(x(er))});let Nt=Number.MAX_VALUE;Hr(()=>{if(Mt.charges!==void 0&&Mt.data){const bt=Mt.data.charges.max,Xt=Mt.charges;Nt=bt&&aa.notification1.play(),Nt=Mt.charges}});let Ft=st(!1),sr=Date.now();Fn(()=>{const bt=h4(),Xt=()=>{var yn;if(!document.hidden&&Date.now()-sr>30*gc.min){if(bt){const Yn=(yn=x(O))==null?void 0:yn.getCenter();Yn&&Co(Yn,x(X)),window.location.replace(yi.url.origin)}else Mt.refresh();sr=Date.now()}};return document.addEventListener("visibilitychange",Xt),()=>document.removeEventListener("visibilitychange",Xt)}),Fn(()=>{function bt(){Qr.online=!0}window.addEventListener("online",bt);function Xt(){Qr.online=!1}return window.addEventListener("offline",Xt),()=>{window.removeEventListener("online",bt),window.removeEventListener("offline",Xt)}}),Hr(()=>{if(!Qr.online){const bt=setInterval(()=>{Qr.health().then(()=>{Qr.online=!0,!Mt.data&&!Mt.loading&&Mt.refresh()})},5e3);return()=>{clearInterval(bt)}}}),Fn(()=>{function bt(Xt){Xt.data.type&&x(O)&&Fe(x(O))}return navigator.serviceWorker.addEventListener("message",bt),()=>{navigator.serviceWorker.removeEventListener("message",bt)}});let lr=st(!1),Vr=st("report-user"),mr=st(void 0),hr=st(void 0),_r=st(void 0),Ir=st(0);var qr=_B();nx(bt=>{var Xt=A9();rx.title="Wplace - Paint the world",vn(6),$(bt,Xt)});var le=Ct(qr);{const bt=ar=>{var $t=z9();$t.__click=[E9,et];var Ur=A($t);{let or=pt(()=>!x(et));G0(Ur,{class:"size-5",get filled(){return x(or)}})}k($t),We(or=>{wr($t,"title",or),zr($t,1,Yo({"btn btn-lg btn-square sm:btn-xl z-30 shadow-md":!0,"text-base-content/80":x(et),"btn-primary btn-soft":!x(et)}))},[()=>$v()]),$(ar,$t)},Xt=ar=>{var $t=R9();$t.__click=[L9,Ue,X,O];var Ur=A($t);{var or=nn=>{x9(nn,{class:"size-5.5 fill-blue-800"})},Tn=nn=>{var Cn=D9(),Gn=A(Cn);v9(Gn,{class:"size-5.5 fill-red-400"}),vn(2),k(Cn),$(nn,Cn)};Ne(Ur,nn=>{x(Ue)?nn(or):nn(Tn,!1)})}k($t),We(nn=>wr($t,"title",nn),[()=>Lb()]),$(ar,$t)};var j=V(A(le),2);let Br;var Z=A(j);let yn;var Y=A(Z);{var ae=ar=>{var $t=F9();$t.__click=[B9,Ae,O,X];var Ur=A($t,!0);k($t),We(or=>de(Ur,or),[()=>Jx()]),$(ar,$t)},fe=ar=>{var $t=Qt(),Ur=Ct($t);{var or=Tn=>{var nn=N9(),Cn=A(nn);{var Gn=Mn=>{var bn=O9(),ln=A(bn);{var Sn=gn=>{var fn=wi("MOD");$(gn,fn)},kn=gn=>{var fn=Qt(),an=Ct(fn);{var po=Hn=>{var jn=wi("GM");$(Hn,jn)},fi=Hn=>{var jn=wi("ADMIN");$(Hn,jn)};Ne(an,Hn=>{var jn;((jn=Mt.data)==null?void 0:jn.role)==="global_moderator"?Hn(po):Hn(fi,!1)},!0)}$(gn,fn)};Ne(ln,gn=>{var fn;((fn=Mt.data)==null?void 0:fn.role)==="moderator"?gn(Sn):gn(kn,!1)})}k(bn),We(()=>{var gn;return wr(bn,"href",((gn=Mt.data)==null?void 0:gn.role)==="admin"?`${yi.url.origin}/admin/dashboard`:`${yi.url.origin}/moderation`)}),$(Mn,bn)};Ne(Cn,Mn=>{var bn;xc((bn=Mt.data)==null?void 0:bn.role,["admin","moderator","global_moderator"])&&Mn(Gn)})}var Mr=V(Cn,2);xR(Mr,{get user(){return Mt},onlogout:()=>{se(pe,{name:"mainMenu"},!0)}}),k(nn),Ai(3,nn,()=>ia,()=>({duration:150})),$(Tn,nn)};Ne(Ur,Tn=>{Mt.data&&x(O)&&x(pe).name!=="paintingPixel"&&Tn(or)},!0)}$(ar,$t)};Ne(Y,ar=>{!Mt.loading&&!Mt.data?ar(ae):ar(fe,!1)})}var Se=V(Y,2);{var ke=ar=>{var $t=G9(),Ur=A($t);{var or=Mr=>{jf(Mr,{key:"shop-profile-picture",children:(Mn,bn)=>{var ln=V9();ln.__click=[j9,je,O,X];var Sn=A(ln);Y0(Sn,{class:"size-5"}),k(ln),We(kn=>wr(ln,"title",kn),[()=>Zv()]),$(Mn,ln)},$$slots:{default:!0}})};Ne(Ur,Mr=>{Mt.data&&Mr(or)})}var Tn=V(Ur,2);{var nn=Mr=>{var Mn=Z9();Mn.__click=[q9,Pt];var bn=A(Mn);xp(bn,{class:"size-5"}),k(Mn),We(ln=>wr(Mn,"title",ln),[()=>_p()]),$(Mr,Mn)};Ne(Tn,Mr=>{Mt.data&&Mr(nn)})}var Cn=V(Tn,2);IR(Cn,{get map(){return x(O)},get season(){return s}});var Gn=V(Cn,2);jf(Gn,{key:"region-leaderboard",children:(Mr,Mn)=>{var bn=$9();bn.__click=[U9,ft];var ln=A(bn);I0(ln,{class:"size-5"}),k(bn),We(Sn=>wr(bn,"title",Sn),[()=>Bm()]),$(Mr,bn)},$$slots:{default:!0}}),k($t),Ai(3,$t,()=>ia,()=>({duration:150})),$(ar,$t)},we=ar=>{var $t=Qt(),Ur=Ct($t);{var or=Tn=>{var nn=W9(),Cn=A(nn);let Gn;Cn.__click=[H9,K];var Mr=A(Cn);{var Mn=ln=>{Pm(ln,{class:"size-5"})},bn=ln=>{np(ln,{class:"size-5"})};Ne(Mr,ln=>{x(K)?ln(Mn):ln(bn,!1)})}k(Cn),k(nn),We((ln,Sn)=>{wr(Cn,"title",ln),Gn=zr(Cn,1,"btn btn-square not-touchscreen:hidden shadow-md",null,Gn,Sn)},[()=>x(K)?sb():ub(),()=>({"btn-primary":x(K)})]),Ai(1,nn,()=>ia,()=>({delay:150,duration:150})),$(Tn,nn)};Ne(Ur,Tn=>{x(O)&&x(pe).name==="paintingPixel"&&Tn(or)},!0)}$(ar,$t)};Ne(Se,ar=>{x(O)&&x(pe).name!=="paintingPixel"?ar(ke):ar(we,!1)})}k(Z),k(j);var Oe=V(j,2);{var lt=ar=>{var $t=X9(),Ur=A($t);{let or=pt(()=>_x.trim());Vx(Ur,{get siteKey(){return x(or)},refreshExpired:"auto",appearance:"interaction-only",callback:Tn=>{ai.captcha={token:Tn,time:Date.now()}}})}k($t),Ai(2,$t,()=>ia,()=>({duration:300})),$(ar,$t)};Ne(Oe,ar=>{mx&&(!ai.captcha||ai.now-ai.captcha.time>180*1e3)&&ar(lt)})}var Ye=V(Oe,2);let On;var kt=A(Ye);{var xe=ar=>{jf(ar,{key:"info",children:($t,Ur)=>{var or=K9();or.__click=[Y9,ut];var Tn=A(or);_9(Tn,{class:"size-3.5"}),k(or),We(nn=>wr(or,"title",nn),[()=>pb()]),$($t,or)},$$slots:{default:!0}})};Ne(kt,ar=>{x(pe).name!=="paintingPixel"&&ar(xe)})}var Ot=V(kt,2),cr=A(Ot);cr.__click=[J9,O];var Jt=V(cr,2);Jt.__click=[Q9,O],k(Ot);var Pr=V(Ot,2),Xr=A(Pr),dn=A(Xr);Vv(dn,{class:"size-4"}),k(Xr),k(Pr);var xn=V(Pr,2);{var mn=ar=>{var $t=tB();$t.__click=[eB,pe];var Ur=A($t);Gu(Ur,{class:"size-4"}),k($t),$(ar,$t)};Ne(xn,ar=>{var $t,Ur;x(pe).name!=="paintingPixel"&&((($t=Mt.data)==null?void 0:$t.role)==="admin"||((Ur=Mt.data)==null?void 0:Ur.role)==="global_moderator")&&ar(mn)})}var Vt=V(xn,2);{var zt=ar=>{var $t=rB(),Ur=A($t);P9(Ur,{class:"size-4",onclick:()=>{se(H,!x(H))}}),k($t),We(or=>wr($t,"title",or),[()=>aw()]),$(ar,$t)};Ne(Vt,ar=>{x(ne)&&ar(zt)})}var dr=V(Vt,2);{var ht=ar=>{var $t=iB();$t.__click=[nB];var Ur=A($t);Zx(Ur,{class:"size-3"}),k($t),We(or=>wr($t,"title",or),[()=>$x()]),$(ar,$t)};Ne(dr,ar=>{x(pe).name!=="paintingPixel"&&ar(ht)})}var Wr=V(dr,2);{var Yr=ar=>{var $t=oB();$t.__click=[aB,O];var Ur=A($t);C9(Ur,{class:"size-3"}),k($t),We((or,Tn)=>{wr($t,"title",or),$t.disabled=Tn},[()=>wb(),()=>!hl.hasPrev()]),Ai(1,$t,()=>ia,()=>({delay:1e3,duration:300})),Ai(2,$t,()=>ia,()=>({duration:300})),$(ar,$t)};Ne(Wr,ar=>{hl.hasPrev()&&x(pe).name!=="paintingPixel"&&ar(Yr)})}k(Ye);var Zr=V(Ye,2);let Yn;var mt=A(Zr);{var He=ar=>{var $t=sB(),Ur=A($t);Ux(Ur,{class:"size-5"});var or=V(Ur);k($t),We(Tn=>de(or,` ${Tn??""}`),[()=>Sb()]),Ai(1,$t,()=>ia,()=>({duration:1e3})),Ai(2,$t,()=>ia),$(ar,$t)};Ne(mt,ar=>{Qr.online||ar(He)})}var At=V(mt,2);{var Bt=ar=>{var $t=cB();$t.__click=[lB,O,p];var Ur=A($t);w9(Ur,{class:"size-5"});var or=V(Ur);k($t),We(Tn=>de(or,` ${Tn??""}`),[()=>Mb()]),Ai(3,$t,()=>ia,()=>({duration:300})),$(ar,$t)};Ne(At,ar=>{x(X){k0(ar,{class:"z-30",onclick:()=>{var $t;($t=Mt.data)!=null&&$t.needsPhoneVerification?(se(Rt,!0),Fr.warning(Yg())):Mt.charges!==void 0&&Mt.charges<1?Fr.warning(k8,{icon:Xf}):x(O)&&Mt.data?(aa.smallDropplet.play(),se(pe,{name:"paintingPixel"},!0)):(se(Ae,!0),x(O)&&Co(x(O).getCenter(),x(X)))},get disabled(){return Mt.loading},get loading(){return Mt.loading},get charges(){return Mt.charges}})},pn=ar=>{var $t=uB();$(ar,$t)};Ne(ur,ar=>{x(pe).name==="mainMenu"?ar(rn):ar(pn,!1)})}k(Er);var _n=V(Er,2);let Ji;var sn=A(_n);Xt(sn),k(_n);var En=V(_n,2);{var pr=ar=>{var $t=Qt(),Ur=Ct($t);{var or=nn=>{var Cn=hB(),Gn=A(Cn),Mr=A(Gn);y7(Mr,{get latLon(){return x(pe).latLon},get map(){return x(O)},get crosshair(){return x(he)},get pixelInfoCache(){return B},get season(){return s},get tileSize(){return y},get pixelArtZoom(){return p},get zoom(){return x(X)},get opaquePixelArt(){return x(et)},onclose:()=>se(pe,{name:"mainMenu"},!0),onclickshare:Mn=>{se(xt,Mn,!0),se(vt,!0)},onclickpaint:([Mn,bn])=>{var Sn,kn,gn;if(!Mt.data){se(Ae,!0);return}if((Sn=Mt.data)!=null&&Sn.needsPhoneVerification){se(Rt,!0),Fr.warning(Yg());return}if(Mt.charges!==void 0&&Mt.charges<1){Fr.warning(Bb());return}const ln=qm(M.latLonToPixelBoundsLatLon(Mn,bn,p));(kn=x(O))==null||kn.flyTo({center:{lat:ln[0],lon:ln[1]}}),se(pe,{name:"paintingPixel",clickedLatLon:[Mn,bn]},!0),(gn=x(he))==null||gn.clear()},onclickregion:Mn=>{se(It,Mn,!0),se(Dt,!0)},onclickmodaction:(Mn,bn,ln,Sn)=>{var gn,fn,an;(gn=x(O))==null||gn.setZoom(Math.max(x(X),p+3.5));const kn=M.latLonToPixelBoundsLatLon(ln[0],ln[1],p);(fn=x(O))==null||fn.setCenter({lat:kn.min[0],lng:(kn.max[1]+kn.min[1])/2}),se(mr,bn,!0),se(hr,Mn,!0),se(_r,ln,!0),se(Ir,((an=x(O))==null?void 0:an.getZoom())??0,!0),se(Vr,Sn,!0),se(lr,!0)}}),k(Gn),k(Cn),Ai(3,Gn,()=>Hd,()=>({duration:100})),$(nn,Cn)},Tn=nn=>{var Cn=Qt(),Gn=Ct(Cn);{var Mr=bn=>{var ln=dB(),Sn=A(ln),kn=A(Sn);UL(kn,{get map(){return x(O)},get clickedLatLon(){return x(pe).clickedLatLon},get tileSize(){return y},get tileZoom(){return p},get season(){return s},get zoom(){return x(X)},get crosshair(){return x(oe)},refreshPixelArt:()=>x(O)&&Fe(x(O)),hidePixelHover:Le,hoverLayerId:$e,onclose:()=>{se(pe,{name:"mainMenu"},!0),Le()},get screenLocked(){return x(K)},set screenLocked(gn){se(K,gn,!0)},get opaquePixelArt(){return x(et)},set opaquePixelArt(gn){se(et,gn,!0)}}),k(Sn),k(ln),Ai(3,Sn,()=>Hd,()=>({duration:100})),$(bn,ln)},Mn=bn=>{var ln=Qt(),Sn=Ct(ln);{var kn=fn=>{var an=pB(),po=A(an);A7(po,{get map(){return x(O)},get tileSize(){return y},get pixelArtZoom(){return Lf},get season(){return s},get crosshair(){return x(oe)},onclose:()=>{se(pe,{name:"mainMenu"},!0),Le()}}),k(an),$(fn,an)},gn=fn=>{var an=Qt(),po=Ct(an);{var fi=Hn=>{var jn=mB(),zn=A(jn),qa=A(zn),Rr=A(qa),$r=A(Rr),_a=A($r);H0(_a,{class:"inline size-4"});var cn=V(_a);k($r);var Li=V($r,2);Li.__click=[fB,pe];var ga=A(Li);_l(ga,{class:"size-4"}),k(Li),k(Rr);var sa=V(Rr,2),Ja=A(sa);Ja.__click=async()=>{var Ca;if(x(pe).name==="selectHq"){const Qa=x(pe).hq;if(Qa)try{se(Ft,!0),await Qr.updateAllianceHeadquarters(Qa[0],Qa[1]),(Ca=x(he))==null||Ca.clear(),se(Pt,!0),se(pe,{name:"mainMenu"},!0)}catch(Jo){Fr.error(Jo.message)}finally{se(Ft,!1)}}};var Ms=A(Ja);f9(Ms,{class:"size-6"}),k(Ja),k(sa),k(qa),k(zn),k(jn),We(Ca=>{de(cn,` ${Ca??""}`),Ja.disabled=x(pe).hq===void 0||x(Ft)},[()=>VC()]),Ai(3,zn,()=>Hd,()=>({duration:100})),$(Hn,jn)};Ne(po,Hn=>{x(pe).name==="selectHq"&&Hn(fi)},!0)}$(fn,an)};Ne(Sn,fn=>{x(pe).name==="getPixelAreaInfo"?fn(kn):fn(gn,!1)},!0)}$(bn,ln)};Ne(Gn,bn=>{x(pe).name==="paintingPixel"&&x(oe)?bn(Mr):bn(Mn,!1)},!0)}$(nn,Cn)};Ne(Ur,nn=>{x(pe).name==="pixelSelected"&&x(he)?nn(or):nn(Tn,!1)})}$(ar,$t)};Ne(En,ar=>{x(O)&&ar(pr)})}k(le),We((ar,$t,Ur,or,Tn,nn,Cn,Gn,Mr)=>{Br=zr(j,1,"absolute right-2 top-2 z-30",null,Br,ar),yn=zr(Z,1,"flex flex-col gap-4",null,yn,$t),On=zr(Ye,1,"absolute left-2 top-2 z-30 flex flex-col gap-3",null,On,Ur),wr(cr,"title",or),wr(Jt,"title",Tn),Yn=zr(Zr,1,"absolute left-1/2 top-2 z-30 flex -translate-x-1/2 flex-col items-center justify-center gap-2",null,Yn,nn),Vn=zr(Kt,1,"absolute bottom-3 left-3 z-30",null,Vn,Cn),wn=zr(Er,1,"absolute bottom-3 left-1/2 z-30 -translate-x-1/2",null,wn,Gn),Ji=zr(_n,1,"absolute bottom-3 right-3 z-30",null,Ji,Mr)},[()=>({hidden:x(H)}),()=>({"items-end":!Mt.data,"items-center":Mt.data}),()=>({hidden:x(H)}),()=>_b(),()=>yb(),()=>({hidden:x(H)}),()=>({hidden:x(H)}),()=>({hidden:x(H)}),()=>({hidden:x(H)})])}var In=V(le,2);C8(In,{get open(){return x(Ae)},set open(bt){se(Ae,bt,!0)}});var tn=V(In,2);d9(tn,{get open(){return x(je)},set open(bt){se(je,bt,!0)}});var en=V(tn,2);d6(en,{get open(){return x(it)},set open(bt){se(it,bt,!0)}});var ma=V(en,2);A6(ma,{get open(){return x(ut)},set open(bt){se(ut,bt,!0)}});var pi=V(ma,2);c6(pi,{get open(){return x(wt)},set open(bt){se(wt,bt,!0)}});var Xi=V(pi,2);b8(Xi,{onvisitclick:bt=>{var Xt;(Xt=x(O))==null||Xt.flyTo({center:bt,zoom:Lf+1}),Co(bt,x(X)),hl.push({pos:bt,zoom:x(X)}),se(ft,!1)},get open(){return x(ft)},set open(bt){se(ft,bt,!0)}});var Zn=V(Xi,2);VR(Zn,{get region(){return x(It)},get open(){return x(Dt)},set open(bt){se(Dt,bt,!0)}});var ni=V(Zn,2);Ox(ni,{get open(){return ai.dropletsDialogOpen},set open(bt){ai.dropletsDialogOpen=bt}});var Zi=V(ni,2);{var Yi=bt=>{UM(bt,{onhqchange:()=>{se(pe,{name:"selectHq"},!0),se(Pt,!1)},onhqclick:Xt=>{var Br;(Br=x(O))==null||Br.flyTo({center:Xt,zoom:Math.max(x(X),15)}),se(pe,{name:"pixelSelected",latLon:[Xt.lat,Xt.lng]},!0),se(Pt,!1)},onlastpixelclick:Xt=>{var Br;(Br=x(O))==null||Br.flyTo({center:Xt,zoom:Math.max(x(X),15)}),se(pe,{name:"pixelSelected",latLon:[Xt.lat,Xt.lng]},!0),se(Pt,!1)},get open(){return x(Pt)},set open(Xt){se(Pt,Xt,!0)}})};Ne(Zi,bt=>{x(O)&&bt(Yi)})}var Ei=V(Zi,2);uD(Ei,{get open(){return x(Rt)},set open(bt){se(Rt,bt,!0)}});var zi=V(Ei,2);{var Ki=bt=>{r6(bt,{get url(){return x(xt)},get map(){return x(O)},hideHover:()=>{var Xt,Br;(Xt=x(O))==null||Xt.setPaintProperty($e,"raster-opacity",0),(Br=x(he))==null||Br.setCanvasOpacity(0)},showHover:()=>{var Xt,Br;(Xt=x(O))==null||Xt.setPaintProperty($e,"raster-opacity",Ze),(Br=x(he))==null||Br.setCanvasOpacity(1)},get open(){return x(vt)},set open(Xt){se(vt,Xt,!0)}})};Ne(zi,bt=>{x(O)&&bt(Ki)})}var oa=V(zi,2);{var Ta=bt=>{Px(bt,{get image(){return x(mr)},get paintedBy(){return x(hr).paintedBy},get latLon(){return x(_r)},get zoom(){return x(Ir)},get action(){return x(Vr)},get open(){return x(lr)},set open(Xt){se(lr,Xt,!0)}})};Ne(oa,bt=>{x(hr)&&x(mr)&&x(_r)&&bt(Ta)})}$(m,qr),Dr()}$n(["click"]);export{iF as component}; diff --git a/frontend-backup/_app/immutable/nodes/4.DLrwqUeR.js b/frontend-backup/_app/immutable/nodes/4.DLrwqUeR.js deleted file mode 100644 index a7abea8..0000000 --- a/frontend-backup/_app/immutable/nodes/4.DLrwqUeR.js +++ /dev/null @@ -1,782 +0,0 @@ -var U1=Object.defineProperty;var Ug=m=>{throw TypeError(m)};var $1=(m,o,f)=>o in m?U1(m,o,{enumerable:!0,configurable:!0,writable:!0,value:f}):m[o]=f;var gr=(m,o,f)=>$1(m,typeof o!="symbol"?o+"":o,f),Ef=(m,o,f)=>o.has(m)||Ug("Cannot "+f);var it=(m,o,f)=>(Ef(m,o,"read from private field"),f?f.call(m):o.get(m)),Mr=(m,o,f)=>o.has(m)?Ug("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(m):o.set(m,f),na=(m,o,f,y)=>(Ef(m,o,"write to private field"),y?y.call(m,f):o.set(m,f),f),Vr=(m,o,f)=>(Ef(m,o,"access private method"),f);import"../chunks/B2cHk4HI.js";import{o as Dn,s as oi}from"../chunks/4WsUhDWi.js";import{a3 as G1,b8 as H1,bp as W1,ba as X1,bq as Y1,b3 as K1,br as J1,au as ct,g as x,aw as ce,av as xi,at as Qn,p as Br,f as Te,d as E,r as k,s as q,u as ft,n as vn,t as Ye,ax as Ai,b as G,c as Fr,y as Wr,v as Cr,bn as Nu,x as Pm,z as ul,ay as er,a as Ct,b4 as bi,aI as Q1,aH as $g,aJ as ex,aL as Iv,bs as co,az as pa,bt as Mv,$ as tx}from"../chunks/BDALf20I.js";import{s as fe}from"../chunks/4k6DpCgf.js";import{p as Lt,i as je,r as ir,s as Ps,u as kv}from"../chunks/Bke_korE.js";import{h as rx}from"../chunks/BUhRjcOt.js";import{r as uo,f as Wi,a as zr,g as Av,b as ar,s as xr,e as kc,h as Ou,c as Ko}from"../chunks/BNZUboE0.js";import{a as sl,k as ju,t as ki}from"../chunks/BCONGQnO.js";import{g as Im,b as nx}from"../chunks/B4HM4TqG.js";import{p as vi}from"../chunks/C-Y7nmnD.js";import{S as Hi,a as en,t as Nr,u as kt,v as So,g as ai,w as ix,x as ax,P as ox,y as sx,z as lx,j as cx,A as ux,C as Gg,B as zf,D as hx,E as dx,d as px,F as fx}from"../chunks/DffDvEhl.js";import{c as Ev,A as aa,a as Gf,g as Lf,p as mx,b as _x}from"../chunks/BvbG2Lay.js";import{h as Mm}from"../chunks/DV6L2nvf.js";import{b as Po}from"../chunks/BrZ10JY-.js";import{L as gx}from"../chunks/CAQlJ3np.js";import{g as Ve,l as vx}from"../chunks/DklPLC_x.js";import{c as up}from"../chunks/CDZgL_Bh.js";import{d as yx,L as km,p as Am}from"../chunks/sZ1mzRzK.js";import{c as Hf,D as zv,p as xx,r as bx,t as wx,b as Tx,R as Cx}from"../chunks/fZ59cmjx.js";import{e as hi,i as hp}from"../chunks/CZW2bcQi.js";import{c as Em,b as zm,a as Sx}from"../chunks/DS58drb5.js";import{P as lo,t as Lv}from"../chunks/DCxPsWiR.js";import{l as Px,p as Lm,m as Dv,v as Ix,s as Mx}from"../chunks/DhR_xAc4.js";import{g as Oi,a as dp,c as kx,b as Ax}from"../chunks/ClOhzjRc.js";import{f as ll,t as Ex}from"../chunks/DS5O-Inb.js";import{A as zx}from"../chunks/CVCd3urP.js";import{A as Rv,d as cl,f as Bv,D as Fv,a as pp,r as Lx,I as Hg,e as Dx,c as Rx,P as Ov,b as Bx}from"../chunks/C2Ms0SfR.js";import{f as ia,s as Gd}from"../chunks/DnhglgUZ.js";import{C as Dm,G as Wg,c as Fx,T as Wf}from"../chunks/ZzI7cLBE.js";import"../chunks/cUtKXcx3.js";import{i as Nv}from"../chunks/BuTItAOu.js";import{L as jv}from"../chunks/CYItkO2S.js";import{c as yi}from"../chunks/ChY_8ULT.js";import{L as Ox,T as Vv,a as Nx}from"../chunks/BHr_eBwR.js";import{_ as jx}from"../chunks/x1RL6Wqy.js";import{c as Vx}from"../chunks/EXYzlOI1.js";import{R as qx}from"../chunks/rLj4C5Bn.js";import{W as Zx}from"../chunks/BtAj0icR.js";import{r as Ux}from"../chunks/Drv8f_fG.js";(function(){try{var m=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};m.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var m=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new m.Error().stack;o&&(m._sentryDebugIds=m._sentryDebugIds||{},m._sentryDebugIds[o]="6fef6fdc-a71e-45b5-84b2-c8bbb8d8e209",m._sentryDebugIdIdentifier="sentry-dbid-6fef6fdc-a71e-45b5-84b2-c8bbb8d8e209")})()}catch{}const $x=[];function Gx(m,o=!1,f=!1){return Hd(m,new Map,"",$x,null,f)}function Hd(m,o,f,y,M=null,z=!1){if(typeof m=="object"&&m!==null){var T=o.get(m);if(T!==void 0)return T;if(m instanceof Map)return new Map(m);if(m instanceof Set)return new Set(m);if(G1(m)){var s=Array(m.length);o.set(m,s),M!==null&&o.set(M,s);for(var B=0;BK1(()=>o(window[m])))}const Wx=J1,Xx=()=>"Log in",Yx=()=>"Entrar",Kx=(m={},o={})=>(o.locale??Ve())==="en"?Xx():Yx(),Jx=()=>"Store",Qx=()=>"Loja",qv=(m={},o={})=>(o.locale??Ve())==="en"?Jx():Qx(),eb=()=>"Alliance",tb=()=>"Aliança",mp=(m={},o={})=>(o.locale??Ve())==="en"?eb():tb(),rb=()=>"Leaderboard",nb=()=>"Ranking",Rm=(m={},o={})=>(o.locale??Ve())==="en"?rb():nb(),ib=()=>"Unlock",ab=()=>"Destravar",ob=(m={},o={})=>(o.locale??Ve())==="en"?ib():ab(),sb=()=>"Lock",lb=()=>"Travar",cb=(m={},o={})=>(o.locale??Ve())==="en"?sb():lb(),ub=()=>"Info",hb=()=>"Informações",db=(m={},o={})=>(o.locale??Ve())==="en"?ub():hb(),pb=()=>"Zoom in",fb=()=>"Aumentar zoom",mb=(m={},o={})=>(o.locale??Ve())==="en"?pb():fb(),_b=()=>"Zoom out",gb=()=>"Diminuir zoom",vb=(m={},o={})=>(o.locale??Ve())==="en"?_b():gb(),yb=()=>"Previous location",xb=()=>"Localização anterior",bb=(m={},o={})=>(o.locale??Ve())==="en"?yb():xb(),wb=()=>"Offline",Tb=()=>"Offline",Cb=(m={},o={})=>(o.locale??Ve())==="en"?wb():Tb(),Sb=()=>"Zoom in to see the pixels",Pb=()=>"Amplie para ver os pixels",Ib=(m={},o={})=>(o.locale??Ve())==="en"?Sb():Pb(),Mb=()=>"Phone verification required",kb=()=>"Verificação de telefone necessária",Xg=(m={},o={})=>(o.locale??Ve())==="en"?Mb():kb(),Ab=()=>"My location",Eb=()=>"Minha localização",zb=(m={},o={})=>(o.locale??Ve())==="en"?Ab():Eb(),Lb=()=>"You don't have charges to paint. Wait to recharge.",Db=()=>"Você não possui tinta para pintar. Aguarde para carrega-las.",Rb=(m={},o={})=>(o.locale??Ve())==="en"?Lb():Db(),Bb=()=>"Map powered by:",Fb=()=>"Mapa fornecido por:",Ob=(m={},o={})=>(o.locale??Ve())==="en"?Bb():Fb(),Nb=()=>"OpenMapTiles Data from",jb=()=>"OpenMapTiles com dados do",Vb=(m={},o={})=>(o.locale??Ve())==="en"?Nb():jb(),qb=()=>"Feedback and bugs",Zb=()=>"Feedback e bugs",Ub=(m={},o={})=>(o.locale??Ve())==="en"?qb():Zb(),$b=()=>"Overview",Gb=()=>"Visão Geral",Hb=(m={},o={})=>(o.locale??Ve())==="en"?$b():Gb(),Wb=()=>"How to paint faster",Xb=()=>"Como pintar mais rápido",Yb=(m={},o={})=>(o.locale??Ve())==="en"?Wb():Xb(),Kb=()=>"When painting, click on the button",Jb=()=>"Quando pintar clique no botão",Qb=(m={},o={})=>(o.locale??Ve())==="en"?Kb():Jb(),e2=()=>"on the top right corner of the screen. This will lock the screen but it'll also enable painting by moving your finger over the map.",t2=()=>"no canto superior direito da tela. Isso bloqueará a tela, mas também permitirá pintar movendo o dedo sobre o mapa.",r2=(m={},o={})=>(o.locale??Ve())==="en"?e2():t2(),n2=()=>"Hold",i2=()=>"Segure",a2=(m={},o={})=>(o.locale??Ve())==="en"?n2():i2(),o2=()=>"SPACE",s2=()=>"Espaço",l2=(m={},o={})=>(o.locale??Ve())==="en"?o2():s2(),c2=()=>"and move your cursor over the map.",u2=()=>"e mova seu cursor sobre o mapa.",h2=(m={},o={})=>(o.locale??Ve())==="en"?c2():u2(),d2=()=>"Explore",p2=()=>"Explorar",f2=(m={},o={})=>(o.locale??Ve())==="en"?d2():p2(),m2=()=>"Recharge paint charges",_2=()=>"Recarga de tinta",g2=(m={},o={})=>(o.locale??Ve())==="en"?m2():_2(),v2=()=>"Items",y2=()=>"Itens",x2=(m={},o={})=>(o.locale??Ve())==="en"?v2():y2(),b2=()=>"Get more charges",w2=()=>"Recarregue tinta para pintar",T2=(m={},o={})=>(o.locale??Ve())==="en"?b2():w2(),C2=m=>`+${m.amount} Max. Charges`,S2=m=>`+${m.amount} Tinta máxima`,P2=(m,o={})=>(o.locale??Ve())==="en"?C2(m):S2(m),I2=()=>"Increase your maximum paint charges capacity",M2=()=>"Aumente sua capacidade máxima de tinta",k2=(m={},o={})=>(o.locale??Ve())==="en"?I2():M2(),A2=()=>"Profile picture",E2=()=>"Imagem de perfil",z2=(m={},o={})=>(o.locale??Ve())==="en"?A2():E2(),L2=()=>"Add a new 16x16 profile picture",D2=()=>"Adicionar uma nova imagem de perfil 16x16",R2=(m={},o={})=>(o.locale??Ve())==="en"?L2():D2(),B2=()=>"Not enough droplets",F2=()=>"Droplets insuficientes",_p=(m={},o={})=>(o.locale??Ve())==="en"?B2():F2(),O2=()=>"Show profile",N2=()=>"Exibir perfil",j2=(m={},o={})=>(o.locale??Ve())==="en"?O2():N2(),V2=()=>"Menu",q2=()=>"Menu",Z2=(m={},o={})=>(o.locale??Ve())==="en"?V2():q2(),U2=m=>`Could not install the app: ${m.error}`,$2=m=>`Não pode instalar o app: ${m.error}`,G2=(m,o={})=>(o.locale??Ve())==="en"?U2(m):$2(m),H2=()=>"Install App",W2=()=>"Instalar App",X2=(m={},o={})=>(o.locale??Ve())==="en"?H2():W2(),Y2=()=>"Livestreams",K2=()=>"Livestreams",J2=(m={},o={})=>(o.locale??Ve())==="en"?Y2():K2(),Q2=()=>"Log Out",ew=()=>"Log Out",tw=(m={},o={})=>(o.locale??Ve())==="en"?Q2():ew(),rw=()=>"Hide UI",nw=()=>"Esconder UI",iw=(m={},o={})=>(o.locale??Ve())==="en"?rw():nw(),aw=()=>"Change picture:",ow=()=>"Change picture:",sw=(m={},o={})=>(o.locale??Ve())==="en"?aw():ow(),lw=()=>"Show last painted pixel on alliance",cw=()=>"Mostrar último pixel pintado na aliança",uw=(m={},o={})=>(o.locale??Ve())==="en"?lw():cw(),hw=()=>"Delete Account",dw=()=>"Deletar Conta",Yg=(m={},o={})=>(o.locale??Ve())==="en"?hw():dw(),pw=()=>"Are you absolutely sure?",fw=()=>"Você tem certeza absoluta?",mw=(m={},o={})=>(o.locale??Ve())==="en"?pw():fw(),_w=()=>"This will permanently delete your account and all associated data. This action cannot be undone.",gw=()=>"Isso excluirá permanentemente sua conta e todos os dados associados. Esta ação não pode ser desfeita.",vw=(m={},o={})=>(o.locale??Ve())==="en"?_w():gw(),yw=()=>"Profile",xw=()=>"Perfil",bw=(m={},o={})=>(o.locale??Ve())==="en"?yw():xw(),ww=()=>"Display your country’s flag next to your username. Plus, when painting in regions where you own the corresponding flag, you recover 10% of the charges spent.",Tw=()=>"Exiba a bandeira do seu país ao lado do seu nome de usuário. Além disso, ao pintar em regiões onde você possui a bandeira correspondente, você recupera 10% das tintas gastas.",Cw=(m={},o={})=>(o.locale??Ve())==="en"?ww():Tw(),Sw=()=>"Does not need to be equipped to provide the bonus",Pw=()=>"Não precisa estar equipada para obter o bônus",Iw=(m={},o={})=>(o.locale??Ve())==="en"?Sw():Pw(),Mw=()=>"Equipped",kw=()=>"Equipado",Aw=(m={},o={})=>(o.locale??Ve())==="en"?Mw():kw(),Ew=()=>"Equip",zw=()=>"Equipar",Lw=(m={},o={})=>(o.locale??Ve())==="en"?Ew():zw(),Dw=()=>"Country",Rw=()=>"País",Zv=(m={},o={})=>(o.locale??Ve())==="en"?Dw():Rw(),Bw=()=>"No country found.",Fw=()=>"País não encontrado.",Ow=(m={},o={})=>(o.locale??Ve())==="en"?Bw():Fw(),Nw=()=>"Welcome to",jw=()=>"Bem vindo ao",Vw=(m={},o={})=>(o.locale??Ve())==="en"?Nw():jw(),qw=()=>"Rules",Zw=()=>"Regras",Uw=(m={},o={})=>(o.locale??Ve())==="en"?qw():Zw(),$w=()=>"Important",Gw=()=>"Importante",Hw=(m={},o={})=>(o.locale??Ve())==="en"?$w():Gw(),Ww=()=>"🚫 No inappropriate content (+18, hate speech, inappropriate links, highly suggestive material, ...)",Xw=()=>"🚫 Conteúdo inapropriado não permitido (+18, discurso de ódio, links inapropriados, conteúdo altamente sugestivo, ...)",Yw=(m={},o={})=>(o.locale??Ve())==="en"?Ww():Xw(),Kw=()=>"😈 Do not paint over other artworks using random colors or patterns just to mess things up",Jw=()=>"😈 Não desenhe por cima de outras artes usando cores ou padrões aleatórios só para bagunçar",Qw=(m={},o={})=>(o.locale??Ve())==="en"?Kw():Jw(),e5=()=>"🧑‍🤝‍🧑 Do not paint with more than one account",t5=()=>"🧑‍🤝‍🧑 Não desenhe com mais de uma conta",r5=(m={},o={})=>(o.locale??Ve())==="en"?e5():t5(),n5=()=>"🤖 Use of bots is not allowed",i5=()=>"🤖 Usar bots não é permitido",a5=(m={},o={})=>(o.locale??Ve())==="en"?n5():i5(),o5=()=>"🙅 Disclosing other's personal information is not allowed",s5=()=>"🙅 Divulgar informações pessoais dos outros não é permitido",l5=(m={},o={})=>(o.locale??Ve())==="en"?o5():s5(),c5=()=>"✅ Painting over other artworks to complement them or create a new drawing is allowed",u5=()=>"✅ Desenhar sobre outras artes para complementar ou criar novas artes é permitido",h5=(m={},o={})=>(o.locale??Ve())==="en"?c5():u5(),d5=()=>"✅ Griefing political party flags or portraits of politicians is allowed",p5=()=>"✅ Desenhar sobre bandeiras de partidos e retratos de políticos é permitido",f5=(m={},o={})=>(o.locale??Ve())==="en"?d5():p5(),m5=()=>"Violations of these rules may lead to suspension of your account or removal of drawings.",_5=()=>"A violação destas regras pode levar à suspensão da conta ou à remoção de desenhos.",g5=(m={},o={})=>(o.locale??Ve())==="en"?m5():_5(),v5=()=>"Understood",y5=()=>"Entendido",x5=(m={},o={})=>(o.locale??Ve())==="en"?v5():y5(),b5=()=>"Toggle art opacity",w5=()=>"Alterar opacidade",Uv=(m={},o={})=>(o.locale??Ve())==="en"?b5():w5(),T5=()=>"Paint",C5=()=>"Pintar",$v=(m={},o={})=>(o.locale??Ve())==="en"?T5():C5(),S5=()=>"Select a color",P5=()=>"Selecione uma color",I5=(m={},o={})=>(o.locale??Ve())==="en"?S5():P5(),M5=()=>"Select a pixel to erase",k5=()=>"Selecione um pixel para apagar",A5=(m={},o={})=>(o.locale??Ve())==="en"?M5():k5(),E5=()=>"Pick a color from the map",z5=()=>"Escolha uma cor do mapa",L5=(m={},o={})=>(o.locale??Ve())==="en"?E5():z5(),D5=()=>"Click",R5=()=>"Clique",B5=(m={},o={})=>(o.locale??Ve())==="en"?D5():R5(),F5=()=>"SPACE",O5=()=>"ESPAÇO",N5=(m={},o={})=>(o.locale??Ve())==="en"?F5():O5(),j5=()=>"or hold",V5=()=>"ou segure",q5=(m={},o={})=>(o.locale??Ve())==="en"?j5():V5(),Z5=()=>"to paint,",U5=()=>"para pintar",$5=(m={},o={})=>(o.locale??Ve())==="en"?Z5():U5(),G5=()=>"You can paint more than 1 pixel",H5=()=>"Você pode pintar mais de 1 pixel",W5=(m={},o={})=>(o.locale??Ve())==="en"?G5():H5(),X5=()=>"Paint pixel",Y5=()=>"Pintar pixel",K5=(m={},o={})=>(o.locale??Ve())==="en"?X5():Y5(),J5=()=>"Color Picker",Q5=()=>"Conta Gotas",e3=(m={},o={})=>(o.locale??Ve())==="en"?J5():Q5(),t3=()=>"+2 max. charge/level",r3=()=>"+2 tinta máxima/level",n3=(m={},o={})=>(o.locale??Ve())==="en"?t3():r3(),i3=()=>"Name",a3=()=>"Nome",Xf=(m={},o={})=>(o.locale??Ve())==="en"?i3():a3(),o3=()=>"Discord Username",s3=()=>"Usuário do Discord",l3=(m={},o={})=>(o.locale??Ve())==="en"?o3():s3(),c3=()=>"Max. Charges",u3=()=>"Tinta máxima",Kg=(m={},o={})=>(o.locale??Ve())==="en"?c3():u3(),h3=()=>"Paint Charges",d3=()=>"Tintas",p3=(m={},o={})=>(o.locale??Ve())==="en"?h3():d3(),f3=m=>`+${m.amount} Paint Charges`,m3=m=>`+${m.amount} Tintas`,_3=(m,o={})=>(o.locale??Ve())==="en"?f3(m):m3(m),g3=()=>"Leave alliance",v3=()=>"Sair da aliança",y3=(m={},o={})=>(o.locale??Ve())==="en"?g3():v3(),x3=()=>"Headquarters",b3=()=>"Quartel General",w3=(m={},o={})=>(o.locale??Ve())==="en"?x3():b3(),T3=()=>"Not set",C3=()=>"Não configurado",S3=(m={},o={})=>(o.locale??Ve())==="en"?T3():C3(),P3=()=>"You are not in an alliance",I3=()=>"Você não está em uma aliança",M3=(m={},o={})=>(o.locale??Ve())==="en"?P3():I3(),k3=()=>"Get invited to an alliance",A3=()=>"Seja convidado para uma aliança",E3=(m={},o={})=>(o.locale??Ve())==="en"?k3():A3(),z3=()=>"OR",L3=()=>"OU",D3=(m={},o={})=>(o.locale??Ve())==="en"?z3():L3(),R3=()=>"Create an alliance",B3=()=>"Crie uma aliança",F3=(m={},o={})=>(o.locale??Ve())==="en"?R3():B3(),O3=()=>"Invite link",N3=()=>"Link de convite",j3=(m={},o={})=>(o.locale??Ve())==="en"?O3():N3(),V3=()=>"Send the link below to everybody you want to invite to the alliance",q3=()=>"Envie o link abaixo para quem você deseja convidar para a aliança",Z3=(m={},o={})=>(o.locale??Ve())==="en"?V3():q3(),U3=()=>"Copied",$3=()=>"Copiado",Bm=(m={},o={})=>(o.locale??Ve())==="en"?U3():$3(),G3=()=>"No description",H3=()=>"Sem descrição",Gv=(m={},o={})=>(o.locale??Ve())==="en"?G3():H3(),W3=()=>"Invite",X3=()=>"Convite",Y3=(m={},o={})=>(o.locale??Ve())==="en"?W3():X3(),K3=()=>"No pixels painted",J3=()=>"Nenhum pixel pintado",Fm=(m={},o={})=>(o.locale??Ve())==="en"?K3():J3(),Q3=()=>"Today",eT=()=>"Hoje",gp=(m={},o={})=>(o.locale??Ve())==="en"?Q3():eT(),tT=()=>"Week",rT=()=>"Semana",nT=(m={},o={})=>(o.locale??Ve())==="en"?tT():rT(),iT=()=>"Month",aT=()=>"Mês",oT=(m={},o={})=>(o.locale??Ve())==="en"?iT():aT(),sT=()=>"All time",lT=()=>"Geral",cT=(m={},o={})=>(o.locale??Ve())==="en"?sT():lT(),uT=()=>"this week",hT=()=>"nesta semana",Om=(m={},o={})=>(o.locale??Ve())==="en"?uT():hT(),dT=()=>"this month",pT=()=>"neste mês",Nm=(m={},o={})=>(o.locale??Ve())==="en"?dT():pT(),fT=()=>"Create alliance",mT=()=>"Criar aliança",_T=(m={},o={})=>(o.locale??Ve())==="en"?fT():mT(),gT=()=>"Alliance Name",vT=()=>"Nome da aliança",yT=(m={},o={})=>(o.locale??Ve())==="en"?gT():vT(),xT=()=>"Create",bT=()=>"Criar",wT=(m={},o={})=>(o.locale??Ve())==="en"?xT():bT(),TT=()=>"Give admin",CT=()=>"Tornar admin",ST=(m={},o={})=>(o.locale??Ve())==="en"?TT():CT(),PT=()=>"Ban from alliance",IT=()=>"Banir da aliança",Hv=(m={},o={})=>(o.locale??Ve())==="en"?PT():IT(),MT=()=>"No action",kT=()=>"Sem opção",AT=(m={},o={})=>(o.locale??Ve())==="en"?MT():kT(),ET=()=>"Unban",zT=()=>"Desbanir",LT=(m={},o={})=>(o.locale??Ve())==="en"?ET():zT(),DT=()=>"No banned users",RT=()=>"Sem usuários banidos",BT=(m={},o={})=>(o.locale??Ve())==="en"?DT():RT(),FT=()=>"Update",OT=()=>"Atualizar",NT=(m={},o={})=>(o.locale??Ve())==="en"?FT():OT(),jT=()=>"Error giving admin to user",VT=()=>"Erro ao tornar usuário admin",qT=(m={},o={})=>(o.locale??Ve())==="en"?jT():VT(),ZT=()=>"Users",UT=()=>"Usuários",$T=(m={},o={})=>(o.locale??Ve())==="en"?ZT():UT(),GT=()=>"Banned",HT=()=>"Banido",Wv=(m={},o={})=>(o.locale??Ve())==="en"?GT():HT(),WT=()=>"Regions",XT=()=>"Regiões",YT=(m={},o={})=>(o.locale??Ve())==="en"?WT():XT(),KT=()=>"Countries",JT=()=>"Países",QT=(m={},o={})=>(o.locale??Ve())==="en"?KT():JT(),eC=()=>"Players",tC=()=>"Jogadores",Xv=(m={},o={})=>(o.locale??Ve())==="en"?eC():tC(),rC=()=>"Alliances",nC=()=>"Alianças",Yv=(m={},o={})=>(o.locale??Ve())==="en"?rC():nC(),iC=()=>"Region",aC=()=>"Região",oC=(m={},o={})=>(o.locale??Ve())==="en"?iC():aC(),sC=()=>"Pixels",lC=()=>"Pixels",vc=(m={},o={})=>(o.locale??Ve())==="en"?sC():lC(),cC=()=>"Painted",uC=()=>"Pintados",yc=(m={},o={})=>(o.locale??Ve())==="en"?cC():uC(),hC=()=>"Pixels painted inside the region",dC=()=>"Pixels pintados dentro da região",pC=(m={},o={})=>(o.locale??Ve())==="en"?hC():dC(),fC=()=>"Not painted",mC=()=>"Não pintado",_C=(m={},o={})=>(o.locale??Ve())==="en"?fC():mC(),gC=()=>"Painted by",vC=()=>"Pintado por",yC=(m={},o={})=>(o.locale??Ve())==="en"?gC():vC(),xC=()=>"Limit reached",bC=()=>"Limite atingido",wC=(m={},o={})=>(o.locale??Ve())==="en"?xC():bC(),TC=()=>"Favorite",CC=()=>"Favoritar",SC=(m={},o={})=>(o.locale??Ve())==="en"?TC():CC(),PC=()=>"Share",IC=()=>"Compartilhar",MC=(m={},o={})=>(o.locale??Ve())==="en"?PC():IC(),kC=()=>"Share place",AC=()=>"Compartilhar local",EC=(m={},o={})=>(o.locale??Ve())==="en"?kC():AC(),zC=()=>"Mute",LC=()=>"Mutar",DC=(m={},o={})=>(o.locale??Ve())==="en"?zC():LC(),RC=()=>"Unmute",BC=()=>"Desmutar",FC=(m={},o={})=>(o.locale??Ve())==="en"?RC():BC(),OC=()=>"Select the headquarters location",NC=()=>"Selecione a localização do quartel general",jC=(m={},o={})=>(o.locale??Ve())==="en"?OC():NC(),VC=()=>"Pixels painted inside the country",qC=()=>"Pixels pintados dentro do país",ZC=(m={},o={})=>(o.locale??Ve())==="en"?VC():qC(),UC=()=>"Username copied to clipboard",$C=()=>"Usuário copiado",GC=(m={},o={})=>(o.locale??Ve())==="en"?UC():$C(),HC=()=>"No more charges",WC=()=>"Acabou a tinta",XC=(m={},o={})=>(o.locale??Ve())==="en"?HC():WC(),YC=()=>"You are not allowed to use multiple accounts. Use your main account to paint.",KC=()=>"Não é permitido usar várias contas. Use sua conta principal para pintar.",JC=(m={},o={})=>(o.locale??Ve())==="en"?YC():KC(),QC=()=>"SMS sent to",eS=()=>"SMS enviado para",tS=(m={},o={})=>(o.locale??Ve())==="en"?QC():eS(),rS=()=>"Phone successfully verified",nS=()=>"Telefone verificado com sucesso",iS=(m={},o={})=>(o.locale??Ve())==="en"?rS():nS(),aS=()=>"Not a valid phone number",oS=()=>"Não é um número válido",sS=(m={},o={})=>(o.locale??Ve())==="en"?aS():oS(),lS=()=>"Location unfavorited",cS=()=>"Localização desfavoritada",uS=(m={},o={})=>(o.locale??Ve())==="en"?lS():cS(),hS=()=>"Location favorited",dS=()=>"Localização favoritada",pS=(m={},o={})=>(o.locale??Ve())==="en"?hS():dS(),fS=()=>"Giving admin to user",mS=()=>"Tornar usuário um admin",_S=(m={},o={})=>(o.locale??Ve())==="en"?fS():mS(),gS=()=>"Profile updated",vS=()=>"Perfil atualizado",yS=(m={},o={})=>(o.locale??Ve())==="en"?gS():vS(),xS=()=>"Successfully linked your Discord account.",bS=()=>"A sua conta Discord foi conectada com sucesso.",wS=(m={},o={})=>(o.locale??Ve())==="en"?xS():bS(),TS=()=>"Discord unlinked",CS=()=>"Discord desconectado",SS=(m={},o={})=>(o.locale??Ve())==="en"?TS():CS(),PS=()=>"Link your Discord",IS=()=>"Conectar Discord",MS=(m={},o={})=>(o.locale??Ve())==="en"?PS():IS(),kS=m=>`Unlink Discord (${m.username})`,AS=m=>`Desconectar Discord (${m.username})`,ES=(m,o={})=>(o.locale??Ve())==="en"?kS(m):AS(m),zS=()=>"Account successfully deleted",LS=()=>"Conta deletada com sucesso",DS=(m={},o={})=>(o.locale??Ve())==="en"?zS():LS(),RS=()=>"Logged out",BS=()=>"Logout feito",FS=(m={},o={})=>(o.locale??Ve())==="en"?RS():BS(),OS=()=>"Could not logout. Try refreshing the page.",NS=()=>"Não foi possível sair da conta. Tente recarregar a página.",jS=(m={},o={})=>(o.locale??Ve())==="en"?OS():NS(),VS=()=>"You need to zoom in to select a pixel",qS=()=>"Dê zoom para selecionar um pixel",ZS=(m={},o={})=>(o.locale??Ve())==="en"?VS():qS(),US=()=>"Phone verification",$S=()=>"Verificação de telefone",GS=(m={},o={})=>(o.locale??Ve())==="en"?US():$S(),HS=()=>"Please verify your phone number to continue playing. This helps us keep bots out and ensure a safe, creative experience for everyone.",WS=()=>"Por favor, verifique com seu telefone para continuar jogando. Isso nos ajuda a filtrar bots e manter um experiência segura e criativa para todos.",XS=(m={},o={})=>(o.locale??Ve())==="en"?HS():WS(),YS=()=>"Send Code",KS=()=>"Enviar o código",JS=(m={},o={})=>(o.locale??Ve())==="en"?YS():KS(),QS=()=>"Input the code",eP=()=>"Insira o código",tP=(m={},o={})=>(o.locale??Ve())==="en"?QS():eP(),rP=()=>"Sent to",nP=()=>"Enviar para",iP=(m={},o={})=>(o.locale??Ve())==="en"?rP():nP(),aP=()=>"Resend Code",oP=()=>"Reenviar Código",sP=(m={},o={})=>(o.locale??Ve())==="en"?aP():oP(),lP=()=>"Try another number",cP=()=>"Tentar outro número",uP=(m={},o={})=>(o.locale??Ve())==="en"?lP():cP(),hP=()=>"Edit profile",dP=()=>"Editar perfil",pP=(m={},o={})=>(o.locale??Ve())==="en"?hP():dP(),fP=()=>"Image",mP=()=>"Imagem",_P=(m={},o={})=>(o.locale??Ve())==="en"?fP():mP(),gP=()=>"Download",vP=()=>"Download",yP=(m={},o={})=>(o.locale??Ve())==="en"?gP():vP(),xP=()=>"Image copied to clipboard",bP=()=>"Imagem copiada para a área de transferência",wP=(m={},o={})=>(o.locale??Ve())==="en"?xP():bP(),TP=()=>"My map is lagging",CP=()=>"Meu mapa está travando",SP=(m={},o={})=>(o.locale??Ve())==="en"?TP():CP(),PP=()=>"Verify if",IP=()=>"Verifique se",MP=(m={},o={})=>(o.locale??Ve())==="en"?PP():IP(),kP=()=>"Use hardware acceleration when available",AP=()=>"Usar aceleração gráfica quando disponível",EP=(m={},o={})=>(o.locale??Ve())==="en"?kP():AP(),zP=()=>"is enabled on",LP=()=>"está habilitado em",DP=(m={},o={})=>(o.locale??Ve())==="en"?zP():LP(),RP=()=>"Follow the instructions to enable hardware acceleration",BP=()=>"Siga a instrução para habilitar a aceleração de hardware",FP=(m={},o={})=>(o.locale??Ve())==="en"?RP():BP(),OP=()=>"Moderation",NP=()=>"Moderação",jP=(m={},o={})=>(o.locale??Ve())==="en"?OP():NP(),VP=()=>"Terms",qP=()=>"Termos",ZP=(m={},o={})=>(o.locale??Ve())==="en"?VP():qP(),UP=()=>"Privacy",$P=()=>"Privacidade",GP=(m={},o={})=>(o.locale??Ve())==="en"?UP():$P(),HP=()=>"Refund",WP=()=>"Reembolso",Kv=(m={},o={})=>(o.locale??Ve())==="en"?HP():WP(),XP=()=>"Clear area",YP=()=>"Limpar área",KP=(m={},o={})=>(o.locale??Ve())==="en"?XP():YP(),JP=()=>"Select the area's first corner",QP=()=>"Selecione o primeiro canto da área",Jv=(m={},o={})=>(o.locale??Ve())==="en"?JP():QP(),eI=()=>"Select the area's opposite corner",tI=()=>"Selecione o canto oposto da área",Qv=(m={},o={})=>(o.locale??Ve())==="en"?eI():tI(),rI=()=>"Admin",nI=()=>"Administração",iI=(m={},o={})=>(o.locale??Ve())==="en"?rI():nI(),aI=m=>`Reason: ${m.reason}`,oI=m=>`Motivo: ${m.reason}`,sI=(m,o={})=>(o.locale??Ve())==="en"?aI(m):oI(m),lI=()=>"No corresponding region on the map (cosmetic effect only)",cI=()=>"Não possui região no mapa (apenas efeito cosmético)",uI=(m={},o={})=>(o.locale??Ve())==="en"?lI():cI(),hI=()=>"Flag without region on the map",dI=()=>"Bandeira sem região no mapa",pI=(m={},o={})=>(o.locale??Ve())==="en"?hI():dI(),fI=m=>`The flag of ${m.country} does not have corresponding areas on the map and will only have cosmetic effects.`,mI=m=>`A bandeira ${m.country} não possui regiões correspondente no mapa e só terá efeito cosmético.`,_I=(m,o={})=>(o.locale??Ve())==="en"?fI(m):mI(m),gI=()=>"Dark mode",vI=()=>"Modo escuro",yI=(m={},o={})=>(o.locale??Ve())==="en"?gI():vI(),xI=()=>"Light mode",bI=()=>"Modo claro",wI=(m={},o={})=>(o.locale??Ve())==="en"?xI():bI(),Go=2*Math.PI*6378137/2;class fl{constructor(o=256){gr(this,"initialResolution");this.tileSize=o,this.initialResolution=2*Go/this.tileSize}latLonToMeters(o,f){const y=f/180*Go,M=Math.log(Math.tan((90+o)*Math.PI/360))/(Math.PI/180)*Go/180;return[y,M]}metersToLatLon(o,f){const y=o/Go*180;let M=f/Go*180;return M=180/Math.PI*(2*Math.atan(Math.exp(M*Math.PI/180))-Math.PI/2),[M,y]}pixelsToMeters(o,f,y){const M=this.resolution(y),z=o*M-Go,T=Go-f*M;return[z,T]}pixelsToLatLon(o,f,y){const[M,z]=this.pixelsToMeters(o,f,y);return this.metersToLatLon(M,z)}latLonToPixels(o,f,y){const[M,z]=this.latLonToMeters(o,f);return this.metersToPixels(M,z,y)}latLonToPixelsFloor(o,f,y){const[M,z]=this.latLonToPixels(o,f,y);return[Math.floor(M),Math.floor(z)]}metersToPixels(o,f,y){const M=this.resolution(y),z=(o+Go)/M,T=(Go-f)/M;return[z,T]}latLonToTile(o,f,y){const[M,z]=this.latLonToMeters(o,f);return this.metersToTile(M,z,y)}metersToTile(o,f,y){const[M,z]=this.metersToPixels(o,f,y);return this.pixelsToTile(M,z)}pixelsToTile(o,f){const y=Math.ceil(o/this.tileSize)-1,M=Math.ceil(f/this.tileSize)-1;return[y,M]}pixelsToTileLocal(o,f){return{tile:this.pixelsToTile(o,f),pixel:[Math.floor(o)%this.tileSize,Math.floor(f)%this.tileSize]}}tileBounds(o,f,y){const[M,z]=this.pixelsToMeters(o*this.tileSize,f*this.tileSize,y),[T,s]=this.pixelsToMeters((o+1)*this.tileSize,(f+1)*this.tileSize,y);return{min:[M,z],max:[T,s]}}tileBoundsLatLon(o,f,y){const M=this.tileBounds(o,f,y);return{min:this.metersToLatLon(M.min[0],M.min[1]),max:this.metersToLatLon(M.max[0],M.max[1])}}resolution(o){return this.initialResolution/2**o}latLonToTileAndPixel(o,f,y){const[M,z]=this.latLonToMeters(o,f),[T,s]=this.metersToTile(M,z,y),[B,N]=this.metersToPixels(M,z,y);return{tile:[T,s],pixel:[Math.floor(B)%this.tileSize,Math.floor(N)%this.tileSize]}}pixelBounds(o,f,y){return{min:this.pixelsToMeters(o,f,y),max:this.pixelsToMeters(o+1,f+1,y)}}pixelToBoundsLatLon(o,f,y){const M=this.pixelBounds(o,f,y),z=.001885,T=(M.max[0]-M.min[0])*z,s=(M.max[1]-M.min[1])*z;return M.min[0]-=T,M.max[0]-=T,M.min[1]-=s,M.max[1]-=s,{min:this.metersToLatLon(M.min[0],M.min[1]),max:this.metersToLatLon(M.max[0],M.max[1])}}latLonToTileBoundsLatLon(o,f,y){const[M,z]=this.latLonToMeters(o,f),[T,s]=this.metersToTile(M,z,y);return this.tileBoundsLatLon(T,s,y)}latLonToPixelBoundsLatLon(o,f,y){const[M,z]=this.latLonToMeters(o,f),[T,s]=this.metersToPixels(M,z,y);return this.pixelToBoundsLatLon(Math.floor(T),Math.floor(s),y)}latLonToRegionAndPixel(o,f,y,M=Hi.regionSize){const[z,T]=this.latLonToPixelsFloor(o,f,y),s=this.tileSize*M;return{region:[Math.floor(z/s),Math.floor(T/s)],pixel:[z%s,T%s]}}}function jm(m,o=!0){const{min:f,max:y}=m;return o?[[f[1],y[0]],[y[1],y[0]],[y[1],f[0]],[f[1],f[0]]]:[[f[0],y[1]],[y[0],y[1]],[y[0],f[1]],[f[0],f[1]]]}function Vm(m){return[(m.min[0]+m.max[0])/2,(m.min[1]+m.max[1])/2]}const TI="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAAAAACoWZBhAAAAAXNSR0IArs4c6QAAACpJREFUeNpj+AsEZ86ASIa/DAwMZ84ACRDzDBigMs/AARITq1oUwxBWAADaREUdDMswKwAAAABJRU5ErkJggg==",Jg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAAXNSR0IArs4c6QAAACVJREFUeNpj+A8FDEAAZwMRBAIBmIYLIgHcgkQDIs3E6SRsjgcABYFLtfTgakEAAAAASUVORK5CYII=";function CI(m){return Math.floor(Math.random()*m)}const Yf=14.5;async function SI(){const m=MI();if(m)return m;try{if((await navigator.permissions.query({name:"geolocation"})).state==="granted"){const f=await new Promise((y,M)=>navigator.geolocation.getCurrentPosition(z=>y(z),z=>M(z)));return{lat:f.coords.latitude,lng:f.coords.longitude,zoom:Yf}}}catch(o){console.error(o)}return{...PI().pos,zoom:Yf}}function PI(){const m=Object.entries(II),o=CI(m.length),[f,y]=m[o];return{city:f,pos:y}}const II={tokyo:{lat:35.677545560719665,lng:139.76394445809638},paris:{lat:48.8537151734952,lng:2.3484026030630787},newYork:{lat:40.71283173786517,lng:-74.00599771376795},saoPaulo:{lat:-23.550584064565356,lng:-46.63339720713918},sydney:{lat:-33.86943325619071,lng:151.2083447239608}},e0="location";function Co(m,o){localStorage.setItem(e0,JSON.stringify({...m,zoom:o}))}function MI(){const m=localStorage.getItem(e0);if(!m)return;const o=JSON.parse(m);return o.zoom??(o.zoom=Yf),o}var Hu,Wu;class kI{constructor(){Mr(this,Hu,ct(-1));Mr(this,Wu,ct([]))}get idx(){return x(it(this,Hu))}set idx(o){ce(it(this,Hu),o,!0)}get entries(){return x(it(this,Wu))}set entries(o){ce(it(this,Wu),o)}hasNext(){return this.idx0}goToPrev(o){const f=this.idx-1,y=this.entries[f];y&&(this.idx=f,o.flyTo({center:y.pos,zoom:y.zoom}))}isEmpty(){return this.entries.length===0}push(o){this.idx=this.idx+1,this.entries=[...this.entries.slice(0,this.idx),o]}}Hu=new WeakMap,Wu=new WeakMap;const hl=new kI;function qm(m){return m&&m.__esModule&&Object.prototype.hasOwnProperty.call(m,"default")?m.default:m}var Wd={exports:{}};/** - * MapLibre GL JS - * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.6.2/LICENSE.txt - */var AI=Wd.exports,Qg;function EI(){return Qg||(Qg=1,(function(m,o){(function(f,y){m.exports=y()})(AI,(function(){var f={},y={};function M(T,s,B){if(y[T]=B,T==="index"){var N="var sharedModule = {}; ("+y.shared+")(sharedModule); ("+y.worker+")(sharedModule);",Y={};return y.shared(Y),y.index(f,Y),typeof window<"u"&&f.setWorkerUrl(window.URL.createObjectURL(new Blob([N],{type:"text/javascript"}))),f}}M("shared",["exports"],(function(T){function s(n,t,r,a){return new(r||(r=Promise))((function(c,p){function _(S){try{b(a.next(S))}catch(I){p(I)}}function v(S){try{b(a.throw(S))}catch(I){p(I)}}function b(S){var I;S.done?c(S.value):(I=S.value,I instanceof r?I:new r((function(L){L(I)}))).then(_,v)}b((a=a.apply(n,t||[])).next())}))}function B(n,t){this.x=n,this.y=t}function N(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Y,K;typeof SuppressedError=="function"&&SuppressedError,B.prototype={clone(){return new B(this.x,this.y)},add(n){return this.clone()._add(n)},sub(n){return this.clone()._sub(n)},multByPoint(n){return this.clone()._multByPoint(n)},divByPoint(n){return this.clone()._divByPoint(n)},mult(n){return this.clone()._mult(n)},div(n){return this.clone()._div(n)},rotate(n){return this.clone()._rotate(n)},rotateAround(n,t){return this.clone()._rotateAround(n,t)},matMult(n){return this.clone()._matMult(n)},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(n){return this.x===n.x&&this.y===n.y},dist(n){return Math.sqrt(this.distSqr(n))},distSqr(n){const t=n.x-this.x,r=n.y-this.y;return t*t+r*r},angle(){return Math.atan2(this.y,this.x)},angleTo(n){return Math.atan2(this.y-n.y,this.x-n.x)},angleWith(n){return this.angleWithSep(n.x,n.y)},angleWithSep(n,t){return Math.atan2(this.x*t-this.y*n,this.x*n+this.y*t)},_matMult(n){const t=n[2]*this.x+n[3]*this.y;return this.x=n[0]*this.x+n[1]*this.y,this.y=t,this},_add(n){return this.x+=n.x,this.y+=n.y,this},_sub(n){return this.x-=n.x,this.y-=n.y,this},_mult(n){return this.x*=n,this.y*=n,this},_div(n){return this.x/=n,this.y/=n,this},_multByPoint(n){return this.x*=n.x,this.y*=n.y,this},_divByPoint(n){return this.x/=n.x,this.y/=n.y,this},_unit(){return this._div(this.mag()),this},_perp(){const n=this.y;return this.y=this.x,this.x=-n,this},_rotate(n){const t=Math.cos(n),r=Math.sin(n),a=r*this.x+t*this.y;return this.x=t*this.x-r*this.y,this.y=a,this},_rotateAround(n,t){const r=Math.cos(n),a=Math.sin(n),c=t.y+a*(this.x-t.x)+r*(this.y-t.y);return this.x=t.x+r*(this.x-t.x)-a*(this.y-t.y),this.y=c,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:B},B.convert=function(n){if(n instanceof B)return n;if(Array.isArray(n))return new B(+n[0],+n[1]);if(n.x!==void 0&&n.y!==void 0)return new B(+n.x,+n.y);throw new Error("Expected [x, y] or {x, y} point format")};var ie=(function(){if(K)return Y;function n(t,r,a,c){this.cx=3*t,this.bx=3*(a-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*r,this.by=3*(c-r)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=a,this.p2y=c}return K=1,Y=n,n.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,r){if(r===void 0&&(r=1e-6),t<0)return 0;if(t>1)return 1;for(var a=t,c=0;c<8;c++){var p=this.sampleCurveX(a)-t;if(Math.abs(p)p?v=a:b=a,a=.5*(b-v)+v;return a},solve:function(t,r){return this.sampleCurveY(this.solveCurveX(t,r))}},Y})(),H=N(ie);let me,ve;function Me(){return me==null&&(me=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),me}function Ee(){if(ve==null&&(ve=!1,Me())){const t=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(t){for(let a=0;a<25;a++){const c=4*a;t.fillStyle=`rgb(${c},${c+1},${c+2})`,t.fillRect(a%5,Math.floor(a/5),1,1)}const r=t.getImageData(0,0,5,5).data;for(let a=0;a<100;a++)if(a%4!=3&&r[a]!==a){ve=!0;break}}}return ve||!1}var Re=1e-6,ze=typeof Float32Array<"u"?Float32Array:Array;function Fe(){var n=new ze(9);return ze!=Float32Array&&(n[1]=0,n[2]=0,n[3]=0,n[5]=0,n[6]=0,n[7]=0),n[0]=1,n[4]=1,n[8]=1,n}function Ke(n){return n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=1,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=1,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}function rt(){var n=new ze(3);return ze!=Float32Array&&(n[0]=0,n[1]=0,n[2]=0),n}function qe(n){return Math.hypot(n[0],n[1],n[2])}function He(n,t,r){var a=new ze(3);return a[0]=n,a[1]=t,a[2]=r,a}function et(n,t,r){return n[0]=t[0]+r[0],n[1]=t[1]+r[1],n[2]=t[2]+r[2],n}function De(n,t,r){return n[0]=t[0]*r,n[1]=t[1]*r,n[2]=t[2]*r,n}function tt(n,t,r){var a=t[0],c=t[1],p=t[2],_=r[0],v=r[1],b=r[2];return n[0]=c*b-p*v,n[1]=p*_-a*b,n[2]=a*v-c*_,n}Math.hypot||(Math.hypot=function(){for(var n=0,t=arguments.length;t--;)n+=arguments[t]*arguments[t];return Math.sqrt(n)});var nt,Ze=qe;function ke(n,t,r){var a=t[0],c=t[1],p=t[2],_=t[3];return n[0]=r[0]*a+r[4]*c+r[8]*p+r[12]*_,n[1]=r[1]*a+r[5]*c+r[9]*p+r[13]*_,n[2]=r[2]*a+r[6]*c+r[10]*p+r[14]*_,n[3]=r[3]*a+r[7]*c+r[11]*p+r[15]*_,n}function bt(){var n=new ze(4);return ze!=Float32Array&&(n[0]=0,n[1]=0,n[2]=0),n[3]=1,n}function te(n,t,r,a){var c=.5*Math.PI/180;t*=c,r*=c,a*=c;var p=Math.sin(t),_=Math.cos(t),v=Math.sin(r),b=Math.cos(r),S=Math.sin(a),I=Math.cos(a);return n[0]=p*b*I-_*v*S,n[1]=_*v*I+p*b*S,n[2]=_*b*S-p*v*I,n[3]=_*b*I+p*v*S,n}function re(){var n=new ze(2);return ze!=Float32Array&&(n[0]=0,n[1]=0),n}function ge(n,t){var r=new ze(2);return r[0]=n,r[1]=t,r}rt(),nt=new ze(4),ze!=Float32Array&&(nt[0]=0,nt[1]=0,nt[2]=0,nt[3]=0),rt(),He(1,0,0),He(0,1,0),bt(),bt(),Fe(),re();const oe=8192;function Ae(n,t,r){return t*(oe/(n.tileSize*Math.pow(2,r-n.tileID.overscaledZ)))}function Ne(n,t){return(n%t+t)%t}function pt(n,t,r){return n*(1-r)+t*r}function ot(n){if(n<=0)return 0;if(n>=1)return 1;const t=n*n,r=t*n;return 4*(n<.5?r:3*(n-t)+r-.75)}function ut(n,t,r,a){const c=new H(n,t,r,a);return p=>c.solve(p)}const St=ut(.25,.1,.25,1);function Bt(n,t,r){return Math.min(r,Math.max(t,n))}function at(n,t,r){const a=r-t,c=((n-t)%a+a)%a+t;return c===t?r:c}function dt(n,...t){for(const r of t)for(const a in r)n[a]=r[a];return n}let vt=1;function yt(n,t,r){const a={};for(const c in n)a[c]=t.call(this,n[c],c,n);return a}function It(n,t,r){const a={};for(const c in n)t.call(this,n[c],c,n)&&(a[c]=n[c]);return a}function wt(n){return Array.isArray(n)?n.map(wt):typeof n=="object"&&n?yt(n,wt):n}const mt={};function Dt(n){mt[n]||(typeof console<"u"&&console.warn(n),mt[n]=!0)}function zt(n,t,r){return(r.y-n.y)*(t.x-n.x)>(t.y-n.y)*(r.x-n.x)}function qt(n){return typeof WorkerGlobalScope<"u"&&n!==void 0&&n instanceof WorkerGlobalScope}let tr=null;function Qt(n){return typeof ImageBitmap<"u"&&n instanceof ImageBitmap}const Ot="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function fr(n,t,r,a,c){return s(this,void 0,void 0,(function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const p=new VideoFrame(n,{timestamp:0});try{const _=p==null?void 0:p.format;if(!_||!_.startsWith("BGR")&&!_.startsWith("RGB"))throw new Error(`Unrecognized format ${_}`);const v=_.startsWith("BGR"),b=new Uint8ClampedArray(a*c*4);if(yield p.copyTo(b,(function(S,I,L,F,V){const U=4*Math.max(-I,0),W=(Math.max(0,L)-L)*F*4+U,J=4*F,le=Math.max(0,I),Le=Math.max(0,L);return{rect:{x:le,y:Le,width:Math.min(S.width,I+F)-le,height:Math.min(S.height,L+V)-Le},layout:[{offset:W,stride:J}]}})(n,t,r,a,c)),v)for(let S=0;S{n.removeEventListener(t,r,a)}}}function Kt(n){return n*Math.PI/180}function or(n){return n/Math.PI*180}const Sr={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},Dr={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},Zr="AbortError";function se(){return new Error(Zr)}const j={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function Z(n){return j.REGISTERED_PROTOCOLS[n.substring(0,n.indexOf("://"))]}const X="global-dispatcher";class ae extends Error{constructor(t,r,a,c){super(`AJAXError: ${r} (${t}): ${a}`),this.status=t,this.statusText=r,this.url=a,this.body=c}}const de=()=>qt(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Se=function(n,t){if(/:\/\//.test(n.url)&&!/^https?:|^file:/.test(n.url)){const a=Z(n.url);if(a)return a(n,t);if(qt(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:n,targetMapId:X},t)}if(!(/^file:/.test(r=n.url)||/^file:/.test(de())&&!/^\w+:/.test(r))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return(function(a,c){return s(this,void 0,void 0,(function*(){const p=new Request(a.url,{method:a.method||"GET",body:a.body,credentials:a.credentials,headers:a.headers,cache:a.cache,referrer:de(),signal:c.signal});let _,v;a.type!=="json"||p.headers.has("Accept")||p.headers.set("Accept","application/json");try{_=yield fetch(p)}catch(S){throw new ae(0,S.message,a.url,new Blob)}if(!_.ok){const S=yield _.blob();throw new ae(_.status,_.statusText,a.url,S)}v=a.type==="arrayBuffer"||a.type==="image"?_.arrayBuffer():a.type==="json"?_.json():_.text();const b=yield v;if(c.signal.aborted)throw se();return{data:b,cacheControl:_.headers.get("Cache-Control"),expires:_.headers.get("Expires")}}))})(n,t);if(qt(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:n,mustQueue:!0,targetMapId:X},t)}var r;return(function(a,c){return new Promise(((p,_)=>{var v;const b=new XMLHttpRequest;b.open(a.method||"GET",a.url,!0),a.type!=="arrayBuffer"&&a.type!=="image"||(b.responseType="arraybuffer");for(const S in a.headers)b.setRequestHeader(S,a.headers[S]);a.type==="json"&&(b.responseType="text",!((v=a.headers)===null||v===void 0)&&v.Accept||b.setRequestHeader("Accept","application/json")),b.withCredentials=a.credentials==="include",b.onerror=()=>{_(new Error(b.statusText))},b.onload=()=>{if(!c.signal.aborted)if((b.status>=200&&b.status<300||b.status===0)&&b.response!==null){let S=b.response;if(a.type==="json")try{S=JSON.parse(b.response)}catch(I){return void _(I)}p({data:S,cacheControl:b.getResponseHeader("Cache-Control"),expires:b.getResponseHeader("Expires")})}else{const S=new Blob([b.response],{type:b.getResponseHeader("Content-Type")});_(new ae(b.status,b.statusText,a.url,S))}},c.signal.addEventListener("abort",(()=>{b.abort(),_(se())})),b.send(a.body)}))})(n,t)};function Ie(n){if(!n||n.indexOf("://")<=0||n.indexOf("data:image/")===0||n.indexOf("blob:")===0)return!0;const t=new URL(n),r=window.location;return t.protocol===r.protocol&&t.host===r.host}function be(n,t,r){r[n]&&r[n].indexOf(t)!==-1||(r[n]=r[n]||[],r[n].push(t))}function Oe(n,t,r){if(r&&r[n]){const a=r[n].indexOf(t);a!==-1&&r[n].splice(a,1)}}class st{constructor(t,r={}){dt(this,r),this.type=t}}class $e extends st{constructor(t,r={}){super("error",dt({error:t},r))}}class Mt{on(t,r){return this._listeners=this._listeners||{},be(t,r,this._listeners),{unsubscribe:()=>{this.off(t,r)}}}off(t,r){return Oe(t,r,this._listeners),Oe(t,r,this._oneTimeListeners),this}once(t,r){return r?(this._oneTimeListeners=this._oneTimeListeners||{},be(t,r,this._oneTimeListeners),this):new Promise((a=>this.once(t,a)))}fire(t,r){typeof t=="string"&&(t=new st(t,r||{}));const a=t.type;if(this.listens(a)){t.target=this;const c=this._listeners&&this._listeners[a]?this._listeners[a].slice():[];for(const v of c)v.call(this,t);const p=this._oneTimeListeners&&this._oneTimeListeners[a]?this._oneTimeListeners[a].slice():[];for(const v of p)Oe(a,v,this._oneTimeListeners),v.call(this,t);const _=this._eventedParent;_&&(dt(t,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),_.fire(t))}else t instanceof $e&&console.error(t.error);return this}listens(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)}setEventedParent(t,r){return this._eventedParent=t,this._eventedParentData=r,this}}var xe={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},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"},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},"*":{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:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},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","property-type":"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","property-type":"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","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"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"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},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","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},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:"*",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"},"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"]},"property-type":"cross-faded"},"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"},"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"}},"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"}},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"}}};const Ft=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function cr(n,t){const r={};for(const a in n)a!=="ref"&&(r[a]=n[a]);return Ft.forEach((a=>{a in t&&(r[a]=t[a])})),r}function Jt(n,t){if(Array.isArray(n)){if(!Array.isArray(t)||n.length!==t.length)return!1;for(let r=0;r`:n.itemType.kind==="value"?"array":`array<${t}>`}return n.kind}const ma=[_t,Ge,At,Rt,Yt,br,pn,Er,tn(ur),_n,En,sn,dr,In];function di(n,t){if(t.kind==="error")return null;if(n.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!di(n.itemType,t.itemType))&&(typeof n.N!="number"||n.N===t.N))return null}else{if(n.kind===t.kind)return null;if(n.kind==="value"){for(const r of ma)if(!di(r,t))return null}}return`Expected ${Qr(n)} but found ${Qr(t)} instead.`}function Xi(n,t){return t.some((r=>r.kind===n.kind))}function Zn(n,t){return t.some((r=>r==="null"?n===null:r==="array"?Array.isArray(n):r==="object"?n&&!Array.isArray(n)&&typeof n=="object":r===typeof n))}function ni(n,t){return n.kind==="array"&&t.kind==="array"?n.itemType.kind===t.itemType.kind&&typeof n.N=="number":n.kind===t.kind}const qi=.96422,Yi=.82521,Ei=4/29,zi=6/29,Ki=3*zi*zi,oa=zi*zi*zi,Ta=Math.PI/180,xt=180/Math.PI;function Wt(n){return(n%=360)<0&&(n+=360),n}function Rr([n,t,r,a]){let c,p;const _=On((.2225045*(n=yn(n))+.7168786*(t=yn(t))+.0606169*(r=yn(r)))/1);n===t&&t===r?c=p=_:(c=On((.4360747*n+.3850649*t+.1430804*r)/qi),p=On((.0139322*n+.0971045*t+.7141733*r)/Yi));const v=116*_-16;return[v<0?0:v,500*(c-_),200*(_-p),a]}function yn(n){return n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function On(n){return n>oa?Math.pow(n,1/3):n/Ki+Ei}function Xn([n,t,r,a]){let c=(n+16)/116,p=isNaN(t)?c:c+t/500,_=isNaN(r)?c:c-r/200;return c=1*wn(c),p=qi*wn(p),_=Yi*wn(_),[Vn(3.1338561*p-1.6168667*c-.4906146*_),Vn(-.9787684*p+1.9161415*c+.033454*_),Vn(.0719453*p-.2289914*c+1.4052427*_),a]}function Vn(n){return(n=n<=.00304?12.92*n:1.055*Math.pow(n,1/2.4)-.055)<0?0:n>1?1:n}function wn(n){return n>zi?n*n*n:Ki*(n-Ei)}const Ji=Object.hasOwn||function(n,t){return Object.prototype.hasOwnProperty.call(n,t)};function sr(n,t){return Ji(n,t)?n[t]:void 0}function Ut(n){return parseInt(n.padEnd(2,n),16)/255}function Ur(n,t){return lr(t?n/100:n,0,1)}function lr(n,t,r){return Math.min(Math.max(t,n),r)}function Tn(n){return!n.some(Number.isNaN)}const nn={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 Cn(n,t,r){return n+r*(t-n)}function $n(n,t,r){return n.map(((a,c)=>Cn(a,t[c],r)))}class Pr{constructor(t,r,a,c=1,p=!0){this.r=t,this.g=r,this.b=a,this.a=c,p||(this.r*=c,this.g*=c,this.b*=c,c||this.overwriteGetter("rgb",[t,r,a,c]))}static parse(t){if(t instanceof Pr)return t;if(typeof t!="string")return;const r=(function(a){if((a=a.toLowerCase().trim())==="transparent")return[0,0,0,0];const c=sr(nn,a);if(c){const[_,v,b]=c;return[_/255,v/255,b/255,1]}if(a.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(a)){const _=a.length<6?1:2;let v=1;return[Ut(a.slice(v,v+=_)),Ut(a.slice(v,v+=_)),Ut(a.slice(v,v+=_)),Ut(a.slice(v,v+_)||"ff")]}if(a.startsWith("rgb")){const _=a.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(_){const[v,b,S,I,L,F,V,U,W,J,le,Le]=_,ye=[I||" ",V||" ",J].join("");if(ye===" "||ye===" /"||ye===",,"||ye===",,,"){const Ce=[S,F,W].join(""),Xe=Ce==="%%%"?100:Ce===""?255:0;if(Xe){const lt=[lr(+b/Xe,0,1),lr(+L/Xe,0,1),lr(+U/Xe,0,1),le?Ur(+le,Le):1];if(Tn(lt))return lt}}return}}const p=a.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(p){const[_,v,b,S,I,L,F,V,U]=p,W=[b||" ",I||" ",F].join("");if(W===" "||W===" /"||W===",,"||W===",,,"){const J=[+v,lr(+S,0,100),lr(+L,0,100),V?Ur(+V,U):1];if(Tn(J))return(function([le,Le,ye,Ce]){function Xe(lt){const Pt=(lt+le/30)%12,Xt=Le*Math.min(ye,1-ye);return ye-Xt*Math.max(-1,Math.min(Pt-3,9-Pt,1))}return le=Wt(le),Le/=100,ye/=100,[Xe(0),Xe(8),Xe(4),Ce]})(J)}}})(t);return r?new Pr(...r,!1):void 0}get rgb(){const{r:t,g:r,b:a,a:c}=this,p=c||1/0;return this.overwriteGetter("rgb",[t/p,r/p,a/p,c])}get hcl(){return this.overwriteGetter("hcl",(function(t){const[r,a,c,p]=Rr(t),_=Math.sqrt(a*a+c*c);return[Math.round(1e4*_)?Wt(Math.atan2(c,a)*xt):NaN,_,r,p]})(this.rgb))}get lab(){return this.overwriteGetter("lab",Rr(this.rgb))}overwriteGetter(t,r){return Object.defineProperty(this,t,{value:r}),r}toString(){const[t,r,a,c]=this.rgb;return`rgba(${[t,r,a].map((p=>Math.round(255*p))).join(",")},${c})`}static interpolate(t,r,a,c="rgb"){switch(c){case"rgb":{const[p,_,v,b]=$n(t.rgb,r.rgb,a);return new Pr(p,_,v,b,!1)}case"hcl":{const[p,_,v,b]=t.hcl,[S,I,L,F]=r.hcl;let V,U;if(isNaN(p)||isNaN(S))isNaN(p)?isNaN(S)?V=NaN:(V=S,v!==1&&v!==0||(U=I)):(V=p,L!==1&&L!==0||(U=_));else{let ye=S-p;S>p&&ye>180?ye-=360:S180&&(ye+=360),V=p+a*ye}const[W,J,le,Le]=(function([ye,Ce,Xe,lt]){return ye=isNaN(ye)?0:ye*Ta,Xn([Xe,Math.cos(ye)*Ce,Math.sin(ye)*Ce,lt])})([V,U??Cn(_,I,a),Cn(v,L,a),Cn(b,F,a)]);return new Pr(W,J,le,Le,!1)}case"lab":{const[p,_,v,b]=Xn($n(t.lab,r.lab,a));return new Pr(p,_,v,b,!1)}}}}Pr.black=new Pr(0,0,0,1),Pr.white=new Pr(1,1,1,1),Pr.transparent=new Pr(0,0,0,0),Pr.red=new Pr(1,0,0,1);class Mn{constructor(t,r,a){this.sensitivity=t?r?"variant":"case":r?"accent":"base",this.locale=a,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,r){return this.collator.compare(t,r)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}const bn=["bottom","center","top"];class ln{constructor(t,r,a,c,p,_){this.text=t,this.image=r,this.scale=a,this.fontStack=c,this.textColor=p,this.verticalAlign=_}}class Sn{constructor(t){this.sections=t}static fromString(t){return new Sn([new ln(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 Sn?t:Sn.fromString(t)}toString(){return this.sections.length===0?"":this.sections.map((t=>t.text)).join("")}}class kn{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof kn)return t;if(typeof t=="number")return new kn([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(const r of t)if(typeof r!="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 kn(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,a){return new kn($n(t.values,r.values,a))}}class gn{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof gn)return t;if(typeof t=="number")return new gn([t]);if(Array.isArray(t)){for(const r of t)if(typeof r!="number")return;return new gn(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,a){return new gn($n(t.values,r.values,a))}}class fn{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof fn)return t;if(typeof t=="string"){const a=Pr.parse(t);return a?new fn([a]):void 0}if(!Array.isArray(t))return;const r=[];for(const a of t){if(typeof a!="string")return;const c=Pr.parse(a);if(!c)return;r.push(c)}return new fn(r)}toString(){return JSON.stringify(this.values)}static interpolate(t,r,a,c="rgb"){const p=[];if(t.values.length!=r.values.length)throw new Error(`colorArray: Arrays have mismatched length (${t.values.length} vs. ${r.values.length}), cannot interpolate.`);for(let _=0;_=0&&n<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof r=="number"&&r>=0&&r<=255?a===void 0||typeof a=="number"&&a>=0&&a<=1?null:`Invalid rgba value [${[n,t,r,a].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof a=="number"?[n,t,r,a]:[n,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function qa(n){if(n===null||typeof n=="string"||typeof n=="boolean"||typeof n=="number"||n instanceof jn||n instanceof Pr||n instanceof Mn||n instanceof Sn||n instanceof kn||n instanceof gn||n instanceof fn||n instanceof pi||n instanceof Gn)return!0;if(Array.isArray(n)){for(const t of n)if(!qa(t))return!1;return!0}if(typeof n=="object"){for(const t in n)if(!qa(n[t]))return!1;return!0}return!1}function Lr(n){if(n===null)return _t;if(typeof n=="string")return At;if(typeof n=="boolean")return Rt;if(typeof n=="number")return Ge;if(n instanceof Pr)return Yt;if(n instanceof jn)return br;if(n instanceof Mn)return rn;if(n instanceof Sn)return pn;if(n instanceof kn)return _n;if(n instanceof gn)return En;if(n instanceof fn)return sn;if(n instanceof pi)return In;if(n instanceof Gn)return dr;if(Array.isArray(n)){const t=n.length;let r;for(const a of n){const c=Lr(a);if(r){if(r===c)continue;r=ur;break}r=c}return tn(r||ur,t)}return Er}function $r(n){const t=typeof n;return n===null?"":t==="string"||t==="number"||t==="boolean"?String(n):n instanceof Pr||n instanceof jn||n instanceof Sn||n instanceof kn||n instanceof gn||n instanceof fn||n instanceof pi||n instanceof Gn?n.toString():JSON.stringify(n)}class _a{constructor(t,r){this.type=t,this.value=r}static parse(t,r){if(t.length!==2)return r.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!qa(t[1]))return r.error("invalid value");const a=t[1];let c=Lr(a);const p=r.expectedType;return c.kind!=="array"||c.N!==0||!p||p.kind!=="array"||typeof p.N=="number"&&p.N!==0||(c=p),new _a(c,a)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}const cn={string:At,number:Ge,boolean:Rt,object:Er};class Li{constructor(t,r){this.type=t,this.args=r}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let a,c=1;const p=t[0];if(p==="array"){let v,b;if(t.length>2){const S=t[1];if(typeof S!="string"||!(S in cn)||S==="object")return r.error('The item type argument of "array" must be one of string, number, boolean',1);v=cn[S],c++}else v=ur;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return r.error('The length argument to "array" must be a positive integer literal',2);b=t[2],c++}a=tn(v,b)}else{if(!cn[p])throw new Error(`Types doesn't contain name = ${p}`);a=cn[p]}const _=[];for(;ct.outputDefined()))}}const ga={"to-boolean":Rt,"to-color":Yt,"to-number":Ge,"to-string":At};class sa{constructor(t,r){this.type=t,this.args=r}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");const a=t[0];if(!ga[a])throw new Error(`Can't parse ${a} as it is not part of the known types`);if((a==="to-boolean"||a==="to-string")&&t.length!==2)return r.error("Expected one argument.");const c=ga[a],p=[];for(let _=1;_4?`Invalid rgba value ${JSON.stringify(r)}: expected an array containing either three or four numeric values.`:zn(r[0],r[1],r[2],r[3]),!a))return new Pr(r[0]/255,r[1]/255,r[2]/255,r[3])}throw new an(a||`Could not parse color from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"padding":{let r;for(const a of this.args){r=a.evaluate(t);const c=kn.parse(r);if(c)return c}throw new an(`Could not parse padding from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"numberArray":{let r;for(const a of this.args){r=a.evaluate(t);const c=gn.parse(r);if(c)return c}throw new an(`Could not parse numberArray from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"colorArray":{let r;for(const a of this.args){r=a.evaluate(t);const c=fn.parse(r);if(c)return c}throw new an(`Could not parse colorArray from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"variableAnchorOffsetCollection":{let r;for(const a of this.args){r=a.evaluate(t);const c=pi.parse(r);if(c)return c}throw new an(`Could not parse variableAnchorOffsetCollection from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"number":{let r=null;for(const a of this.args){if(r=a.evaluate(t),r===null)return 0;const c=Number(r);if(!isNaN(c))return c}throw new an(`Could not convert ${JSON.stringify(r)} to number.`)}case"formatted":return Sn.fromString($r(this.args[0].evaluate(t)));case"resolvedImage":return Gn.fromString($r(this.args[0].evaluate(t)));case"projectionDefinition":return this.args[0].evaluate(t);default:return $r(this.args[0].evaluate(t))}}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}}const Ka=["Unknown","Point","LineString","Polygon"];class Is{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"?Ka[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 r=this._parseColorCache.get(t);return r||(r=Pr.parse(t),this._parseColorCache.set(t,r)),r}}class Ca{constructor(t,r,a=[],c,p=new qr,_=[]){this.registry=t,this.path=a,this.key=a.map((v=>`[${v}]`)).join(""),this.scope=p,this.errors=_,this.expectedType=c,this._isConstant=r}parse(t,r,a,c,p={}){return r?this.concat(r,a,c)._parse(t,p):this._parse(t,p)}_parse(t,r){function a(c,p,_){return _==="assert"?new Li(p,[c]):_==="coerce"?new sa(p,[c]):c}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 c=t[0];if(typeof c!="string")return this.error(`Expression name must be a string, but found ${typeof c} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const p=this.registry[c];if(p){let _=p.parse(t,this);if(!_)return null;if(this.expectedType){const v=this.expectedType,b=_.type;if(v.kind!=="string"&&v.kind!=="number"&&v.kind!=="boolean"&&v.kind!=="object"&&v.kind!=="array"||b.kind!=="value"){if(v.kind==="projectionDefinition"&&["string","array"].includes(b.kind)||["color","formatted","resolvedImage"].includes(v.kind)&&["value","string"].includes(b.kind)||["padding","numberArray"].includes(v.kind)&&["value","number","array"].includes(b.kind)||v.kind==="colorArray"&&["value","string","array"].includes(b.kind)||v.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(b.kind))_=a(_,v,r.typeAnnotation||"coerce");else if(this.checkSubtype(v,b))return null}else _=a(_,v,r.typeAnnotation||"assert")}if(!(_ instanceof _a)&&_.type.kind!=="resolvedImage"&&this._isConstant(_)){const v=new Is;try{_=new _a(_.type,_.evaluate(v))}catch(b){return this.error(b.message),null}}return _}return this.error(`Unknown expression "${c}". 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,r,a){const c=typeof t=="number"?this.path.concat(t):this.path,p=a?this.scope.concat(a):this.scope;return new Ca(this.registry,this._isConstant,c,r||null,p,this.errors)}error(t,...r){const a=`${this.key}${r.map((c=>`[${c}]`)).join("")}`;this.errors.push(new Yr(a,t))}checkSubtype(t,r){const a=di(t,r);return a&&this.error(a),a}}class Ja{constructor(t,r){this.type=r.type,this.bindings=[].concat(t),this.result=r}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const r of this.bindings)t(r[1]);t(this.result)}static parse(t,r){if(t.length<4)return r.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const a=[];for(let p=1;p=a.length)throw new an(`Array index out of bounds: ${r} > ${a.length-1}.`);if(r!==Math.floor(r))throw new an(`Array index must be an integer, but found ${r} instead.`);return a[r]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}}class vl{constructor(t,r){this.type=Rt,this.needle=t,this.haystack=r}static parse(t,r){if(t.length!==3)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const a=r.parse(t[1],1,ur),c=r.parse(t[2],2,ur);return a&&c?Xi(a.type,[Rt,At,Ge,_t,ur])?new vl(a,c):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${Qr(a.type)} instead`):null}evaluate(t){const r=this.needle.evaluate(t),a=this.haystack.evaluate(t);if(!a)return!1;if(!Zn(r,["boolean","string","number","null"]))throw new an(`Expected first argument to be of type boolean, string, number or null, but found ${Qr(Lr(r))} instead.`);if(!Zn(a,["string","array"]))throw new an(`Expected second argument to be of type array or string, but found ${Qr(Lr(a))} instead.`);return a.indexOf(r)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}}class Sa{constructor(t,r,a){this.type=Ge,this.needle=t,this.haystack=r,this.fromIndex=a}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const a=r.parse(t[1],1,ur),c=r.parse(t[2],2,ur);if(!a||!c)return null;if(!Xi(a.type,[Rt,At,Ge,_t,ur]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${Qr(a.type)} instead`);if(t.length===4){const p=r.parse(t[3],3,Ge);return p?new Sa(a,c,p):null}return new Sa(a,c)}evaluate(t){const r=this.needle.evaluate(t),a=this.haystack.evaluate(t);if(!Zn(r,["boolean","string","number","null"]))throw new an(`Expected first argument to be of type boolean, string, number or null, but found ${Qr(Lr(r))} instead.`);let c;if(this.fromIndex&&(c=this.fromIndex.evaluate(t)),Zn(a,["string"])){const p=a.indexOf(r,c);return p===-1?-1:[...a.slice(0,p)].length}if(Zn(a,["array"]))return a.indexOf(r,c);throw new an(`Expected second argument to be of type array or string, but found ${Qr(Lr(a))} instead.`)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}}class wi{constructor(t,r,a,c,p,_){this.inputType=t,this.type=r,this.input=a,this.cases=c,this.outputs=p,this.otherwise=_}static parse(t,r){if(t.length<5)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return r.error("Expected an even number of arguments.");let a,c;r.expectedType&&r.expectedType.kind!=="value"&&(c=r.expectedType);const p={},_=[];for(let S=2;SNumber.MAX_SAFE_INTEGER)return F.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof U=="number"&&Math.floor(U)!==U)return F.error("Numeric branch labels must be integer values.");if(a){if(F.checkSubtype(a,Lr(U)))return null}else a=Lr(U);if(p[String(U)]!==void 0)return F.error("Branch labels must be unique.");p[String(U)]=_.length}const V=r.parse(L,S,c);if(!V)return null;c=c||V.type,_.push(V)}const v=r.parse(t[1],1,ur);if(!v)return null;const b=r.parse(t[t.length-1],t.length-1,c);return b?v.type.kind!=="value"&&r.concat(1).checkSubtype(a,v.type)?null:new wi(a,c,v,p,_,b):null}evaluate(t){const r=this.input.evaluate(t);return(Lr(r)===this.inputType&&this.outputs[this.cases[r]]||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 Qo{constructor(t,r,a){this.type=t,this.branches=r,this.otherwise=a}static parse(t,r){if(t.length<4)return r.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return r.error("Expected an odd number of arguments.");let a;r.expectedType&&r.expectedType.kind!=="value"&&(a=r.expectedType);const c=[];for(let _=1;_r.outputDefined()))&&this.otherwise.outputDefined()}}class Ms{constructor(t,r,a,c){this.type=t,this.input=r,this.beginIndex=a,this.endIndex=c}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const a=r.parse(t[1],1,ur),c=r.parse(t[2],2,Ge);if(!a||!c)return null;if(!Xi(a.type,[tn(ur),At,ur]))return r.error(`Expected first argument to be of type array or string, but found ${Qr(a.type)} instead`);if(t.length===4){const p=r.parse(t[3],3,Ge);return p?new Ms(a.type,a,c,p):null}return new Ms(a.type,a,c)}evaluate(t){const r=this.input.evaluate(t),a=this.beginIndex.evaluate(t);let c;if(this.endIndex&&(c=this.endIndex.evaluate(t)),Zn(r,["string"]))return[...r].slice(a,c).join("");if(Zn(r,["array"]))return r.slice(a,c);throw new an(`Expected first argument to be of type array or string, but found ${Qr(Lr(r))} instead.`)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}}function ko(n,t){const r=n.length-1;let a,c,p=0,_=r,v=0;for(;p<=_;)if(v=Math.floor((p+_)/2),a=n[v],c=n[v+1],a<=t){if(v===r||tt))throw new an("Input is not a number.");_=v-1}return 0}class ei{constructor(t,r,a){this.type=t,this.input=r,this.labels=[],this.outputs=[];for(const[c,p]of a)this.labels.push(c),this.outputs.push(p)}static parse(t,r){if(t.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return r.error("Expected an even number of arguments.");const a=r.parse(t[1],1,Ge);if(!a)return null;const c=[];let p=null;r.expectedType&&r.expectedType.kind!=="value"&&(p=r.expectedType);for(let _=1;_=v)return r.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',S);const L=r.parse(b,I,p);if(!L)return null;p=p||L.type,c.push([v,L])}return new ei(p,a,c)}evaluate(t){const r=this.labels,a=this.outputs;if(r.length===1)return a[0].evaluate(t);const c=this.input.evaluate(t);if(c<=r[0])return a[0].evaluate(t);const p=r.length;return c>=r[p-1]?a[p-1].evaluate(t):a[ko(r,c)].evaluate(t)}eachChild(t){t(this.input);for(const r of this.outputs)t(r)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}}function Bh(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ks,Ec,xp=(function(){if(Ec)return ks;function n(t,r,a,c){this.cx=3*t,this.bx=3*(a-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*r,this.by=3*(c-r)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=a,this.p2y=c}return Ec=1,ks=n,n.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,r){if(r===void 0&&(r=1e-6),t<0)return 0;if(t>1)return 1;for(var a=t,c=0;c<8;c++){var p=this.sampleCurveX(a)-t;if(Math.abs(p)p?v=a:b=a,a=.5*(b-v)+v;return a},solve:function(t,r){return this.sampleCurveY(this.solveCurveX(t,r))}},ks})(),es=Bh(xp);class Di{constructor(t,r,a,c,p){this.type=t,this.operator=r,this.interpolation=a,this.input=c,this.labels=[],this.outputs=[];for(const[_,v]of p)this.labels.push(_),this.outputs.push(v)}static interpolationFactor(t,r,a,c){let p=0;if(t.name==="exponential")p=As(r,t.base,a,c);else if(t.name==="linear")p=As(r,1,a,c);else if(t.name==="cubic-bezier"){const _=t.controlPoints;p=new es(_[0],_[1],_[2],_[3]).solve(As(r,1,a,c))}return p}static parse(t,r){let[a,c,p,..._]=t;if(!Array.isArray(c)||c.length===0)return r.error("Expected an interpolation type expression.",1);if(c[0]==="linear")c={name:"linear"};else if(c[0]==="exponential"){const S=c[1];if(typeof S!="number")return r.error("Exponential interpolation requires a numeric base.",1,1);c={name:"exponential",base:S}}else{if(c[0]!=="cubic-bezier")return r.error(`Unknown interpolation type ${String(c[0])}`,1,0);{const S=c.slice(1);if(S.length!==4||S.some((I=>typeof I!="number"||I<0||I>1)))return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);c={name:"cubic-bezier",controlPoints:S}}}if(t.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return r.error("Expected an even number of arguments.");if(p=r.parse(p,2,Ge),!p)return null;const v=[];let b=null;a!=="interpolate-hcl"&&a!=="interpolate-lab"||r.expectedType==sn?r.expectedType&&r.expectedType.kind!=="value"&&(b=r.expectedType):b=Yt;for(let S=0;S<_.length;S+=2){const I=_[S],L=_[S+1],F=S+3,V=S+4;if(typeof I!="number")return r.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',F);if(v.length&&v[v.length-1][0]>=I)return r.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',F);const U=r.parse(L,V,b);if(!U)return null;b=b||U.type,v.push([I,U])}return ni(b,Ge)||ni(b,br)||ni(b,Yt)||ni(b,_n)||ni(b,En)||ni(b,sn)||ni(b,In)||ni(b,tn(Ge))?new Di(b,a,c,p,v):r.error(`Type ${Qr(b)} is not interpolatable.`)}evaluate(t){const r=this.labels,a=this.outputs;if(r.length===1)return a[0].evaluate(t);const c=this.input.evaluate(t);if(c<=r[0])return a[0].evaluate(t);const p=r.length;if(c>=r[p-1])return a[p-1].evaluate(t);const _=ko(r,c),v=Di.interpolationFactor(this.interpolation,c,r[_],r[_+1]),b=a[_].evaluate(t),S=a[_+1].evaluate(t);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return Cn(b,S,v);case"color":return Pr.interpolate(b,S,v);case"padding":return kn.interpolate(b,S,v);case"colorArray":return fn.interpolate(b,S,v);case"numberArray":return gn.interpolate(b,S,v);case"variableAnchorOffsetCollection":return pi.interpolate(b,S,v);case"array":return $n(b,S,v);case"projectionDefinition":return jn.interpolate(b,S,v)}case"interpolate-hcl":switch(this.type.kind){case"color":return Pr.interpolate(b,S,v,"hcl");case"colorArray":return fn.interpolate(b,S,v,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return Pr.interpolate(b,S,v,"lab");case"colorArray":return fn.interpolate(b,S,v,"lab")}}}eachChild(t){t(this.input);for(const r of this.outputs)t(r)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}}function As(n,t,r,a){const c=a-r,p=n-r;return c===0?0:t===1?p/c:(Math.pow(t,p)-1)/(Math.pow(t,c)-1)}const Za={color:Pr.interpolate,number:Cn,padding:kn.interpolate,numberArray:gn.interpolate,colorArray:fn.interpolate,variableAnchorOffsetCollection:pi.interpolate,array:$n};class Es{constructor(t,r){this.type=t,this.args=r}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let a=null;const c=r.expectedType;c&&c.kind!=="value"&&(a=c);const p=[];for(const v of t.slice(1)){const b=r.parse(v,1+p.length,a,void 0,{typeAnnotation:"omit"});if(!b)return null;a=a||b.type,p.push(b)}if(!a)throw new Error("No output type");const _=c&&p.some((v=>di(c,v.type)));return new Es(_?ur:a,p)}evaluate(t){let r,a=null,c=0;for(const p of this.args)if(c++,a=p.evaluate(t),a&&a instanceof Gn&&!a.available&&(r||(r=a.name),a=null,c===this.args.length&&(a=r)),a!==null)break;return a}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}}function zs(n,t){return n==="=="||n==="!="?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 Ls(n,t,r,a){return a.compare(t,r)===0}function Ni(n,t,r){const a=n!=="=="&&n!=="!=";return class t0{constructor(p,_,v){this.type=Rt,this.lhs=p,this.rhs=_,this.collator=v,this.hasUntypedArgument=p.type.kind==="value"||_.type.kind==="value"}static parse(p,_){if(p.length!==3&&p.length!==4)return _.error("Expected two or three arguments.");const v=p[0];let b=_.parse(p[1],1,ur);if(!b)return null;if(!zs(v,b.type))return _.concat(1).error(`"${v}" comparisons are not supported for type '${Qr(b.type)}'.`);let S=_.parse(p[2],2,ur);if(!S)return null;if(!zs(v,S.type))return _.concat(2).error(`"${v}" comparisons are not supported for type '${Qr(S.type)}'.`);if(b.type.kind!==S.type.kind&&b.type.kind!=="value"&&S.type.kind!=="value")return _.error(`Cannot compare types '${Qr(b.type)}' and '${Qr(S.type)}'.`);a&&(b.type.kind==="value"&&S.type.kind!=="value"?b=new Li(S.type,[b]):b.type.kind!=="value"&&S.type.kind==="value"&&(S=new Li(b.type,[S])));let I=null;if(p.length===4){if(b.type.kind!=="string"&&S.type.kind!=="string"&&b.type.kind!=="value"&&S.type.kind!=="value")return _.error("Cannot use collator to compare non-string types.");if(I=_.parse(p[3],3,rn),!I)return null}return new t0(b,S,I)}evaluate(p){const _=this.lhs.evaluate(p),v=this.rhs.evaluate(p);if(a&&this.hasUntypedArgument){const b=Lr(_),S=Lr(v);if(b.kind!==S.kind||b.kind!=="string"&&b.kind!=="number")throw new an(`Expected arguments for "${n}" to be (string, string) or (number, number), but found (${b.kind}, ${S.kind}) instead.`)}if(this.collator&&!a&&this.hasUntypedArgument){const b=Lr(_),S=Lr(v);if(b.kind!=="string"||S.kind!=="string")return t(p,_,v)}return this.collator?r(p,_,v,this.collator.evaluate(p)):t(p,_,v)}eachChild(p){p(this.lhs),p(this.rhs),this.collator&&p(this.collator)}outputDefined(){return!0}}}const Fh=Ni("==",(function(n,t,r){return t===r}),Ls),yl=Ni("!=",(function(n,t,r){return t!==r}),(function(n,t,r,a){return!Ls(0,t,r,a)})),bp=Ni("<",(function(n,t,r){return t",(function(n,t,r){return t>r}),(function(n,t,r,a){return a.compare(t,r)>0})),wp=Ni("<=",(function(n,t,r){return t<=r}),(function(n,t,r,a){return a.compare(t,r)<=0})),Tp=Ni(">=",(function(n,t,r){return t>=r}),(function(n,t,r,a){return a.compare(t,r)>=0}));class xl{constructor(t,r,a){this.type=rn,this.locale=a,this.caseSensitive=t,this.diacriticSensitive=r}static parse(t,r){if(t.length!==2)return r.error("Expected one argument.");const a=t[1];if(typeof a!="object"||Array.isArray(a))return r.error("Collator options argument must be an object.");const c=r.parse(a["case-sensitive"]!==void 0&&a["case-sensitive"],1,Rt);if(!c)return null;const p=r.parse(a["diacritic-sensitive"]!==void 0&&a["diacritic-sensitive"],1,Rt);if(!p)return null;let _=null;return a.locale&&(_=r.parse(a.locale,1,At),!_)?null:new xl(c,p,_)}evaluate(t){return new Mn(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 Lc{constructor(t,r,a,c,p){this.type=At,this.number=t,this.locale=r,this.currency=a,this.minFractionDigits=c,this.maxFractionDigits=p}static parse(t,r){if(t.length!==3)return r.error("Expected two arguments.");const a=r.parse(t[1],1,Ge);if(!a)return null;const c=t[2];if(typeof c!="object"||Array.isArray(c))return r.error("NumberFormat options argument must be an object.");let p=null;if(c.locale&&(p=r.parse(c.locale,1,At),!p))return null;let _=null;if(c.currency&&(_=r.parse(c.currency,1,At),!_))return null;let v=null;if(c["min-fraction-digits"]&&(v=r.parse(c["min-fraction-digits"],1,Ge),!v))return null;let b=null;return c["max-fraction-digits"]&&(b=r.parse(c["max-fraction-digits"],1,Ge),!b)?null:new Lc(a,p,_,v,b)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.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.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}}class Ao{constructor(t){this.type=pn,this.sections=t}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");const a=t[1];if(!Array.isArray(a)&&typeof a=="object")return r.error("First argument must be an image or text section.");const c=[];let p=!1;for(let _=1;_<=t.length-1;++_){const v=t[_];if(p&&typeof v=="object"&&!Array.isArray(v)){p=!1;let b=null;if(v["font-scale"]&&(b=r.parse(v["font-scale"],1,Ge),!b))return null;let S=null;if(v["text-font"]&&(S=r.parse(v["text-font"],1,tn(At)),!S))return null;let I=null;if(v["text-color"]&&(I=r.parse(v["text-color"],1,Yt),!I))return null;let L=null;if(v["vertical-align"]){if(typeof v["vertical-align"]=="string"&&!bn.includes(v["vertical-align"]))return r.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${v["vertical-align"]}' instead.`);if(L=r.parse(v["vertical-align"],1,At),!L)return null}const F=c[c.length-1];F.scale=b,F.font=S,F.textColor=I,F.verticalAlign=L}else{const b=r.parse(t[_],1,ur);if(!b)return null;const S=b.type.kind;if(S!=="string"&&S!=="value"&&S!=="null"&&S!=="resolvedImage")return r.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");p=!0,c.push({content:b,scale:null,font:null,textColor:null,verticalAlign:null})}}return new Ao(c)}evaluate(t){return new Sn(this.sections.map((r=>{const a=r.content.evaluate(t);return Lr(a)===dr?new ln("",a,null,null,null,r.verticalAlign?r.verticalAlign.evaluate(t):null):new ln($r(a),null,r.scale?r.scale.evaluate(t):null,r.font?r.font.evaluate(t).join(","):null,r.textColor?r.textColor.evaluate(t):null,r.verticalAlign?r.verticalAlign.evaluate(t):null)})))}eachChild(t){for(const r of this.sections)t(r.content),r.scale&&t(r.scale),r.font&&t(r.font),r.textColor&&t(r.textColor),r.verticalAlign&&t(r.verticalAlign)}outputDefined(){return!1}}class Dc{constructor(t){this.type=dr,this.input=t}static parse(t,r){if(t.length!==2)return r.error("Expected two arguments.");const a=r.parse(t[1],1,At);return a?new Dc(a):r.error("No image name provided.")}evaluate(t){const r=this.input.evaluate(t),a=Gn.fromString(r);return a&&t.availableImages&&(a.available=t.availableImages.indexOf(r)>-1),a}eachChild(t){t(this.input)}outputDefined(){return!1}}class bl{constructor(t){this.type=Ge,this.input=t}static parse(t,r){if(t.length!==2)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);const a=r.parse(t[1],1);return a?a.type.kind!=="array"&&a.type.kind!=="string"&&a.type.kind!=="value"?r.error(`Expected argument of type string or array, but found ${Qr(a.type)} instead.`):new bl(a):null}evaluate(t){const r=this.input.evaluate(t);if(typeof r=="string")return[...r].length;if(Array.isArray(r))return r.length;throw new an(`Expected value to be of type string or array, but found ${Qr(Lr(r))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}}const Pa=8192;function Cp(n,t){const r=(180+n[0])/360,a=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n[1]*Math.PI/360)))/360,c=Math.pow(2,t.z);return[Math.round(r*c*Pa),Math.round(a*c*Pa)]}function wl(n,t){const r=Math.pow(2,t.z);return[(c=(n[0]/Pa+t.x)/r,360*c-180),(a=(n[1]/Pa+t.y)/r,360/Math.PI*Math.atan(Math.exp((180-360*a)*Math.PI/180))-90)];var a,c}function Ds(n,t){n[0]=Math.min(n[0],t[0]),n[1]=Math.min(n[1],t[1]),n[2]=Math.max(n[2],t[0]),n[3]=Math.max(n[3],t[1])}function Rs(n,t){return!(n[0]<=t[0]||n[2]>=t[2]||n[1]<=t[1]||n[3]>=t[3])}function Sp(n,t,r){const a=n[0]-t[0],c=n[1]-t[1],p=n[0]-r[0],_=n[1]-r[1];return a*_-p*c==0&&a*p<=0&&c*_<=0}function Tl(n,t,r,a){return(c=[a[0]-r[0],a[1]-r[1]])[0]*(p=[t[0]-n[0],t[1]-n[1]])[1]-c[1]*p[0]!=0&&!(!Nh(n,t,r,a)||!Nh(r,a,n,t));var c,p}function Pp(n,t,r){for(const a of r)for(let c=0;c(c=n)[1]!=(_=v[b+1])[1]>c[1]&&c[0]<(_[0]-p[0])*(c[1]-p[1])/(_[1]-p[1])+p[0]&&(a=!a)}var c,p,_;return a}function Oh(n,t){for(const r of t)if(Eo(n,r))return!0;return!1}function Rc(n,t){for(const r of n)if(!Eo(r,t))return!1;for(let r=0;r0&&v<0||_<0&&v>0}function Bc(n,t,r){const a=[];for(let c=0;cr[2]){const c=.5*a;let p=n[0]-r[0]>c?-a:r[0]-n[0]>c?a:0;p===0&&(p=n[0]-r[2]>c?-a:r[2]-n[0]>c?a:0),n[0]+=p}Ds(t,n)}function Vh(n,t,r,a){const c=Math.pow(2,a.z)*Pa,p=[a.x*Pa,a.y*Pa],_=[];for(const v of n)for(const b of v){const S=[b.x+p[0],b.y+p[1]];Cl(S,t,r,c),_.push(S)}return _}function qh(n,t,r,a){const c=Math.pow(2,a.z)*Pa,p=[a.x*Pa,a.y*Pa],_=[];for(const b of n){const S=[];for(const I of b){const L=[I.x+p[0],I.y+p[1]];Ds(t,L),S.push(L)}_.push(S)}if(t[2]-t[0]<=c/2){(v=t)[0]=v[1]=1/0,v[2]=v[3]=-1/0;for(const b of _)for(const S of b)Cl(S,t,r,c)}var v;return _}class zo{constructor(t,r){this.type=Rt,this.geojson=t,this.geometries=r}static parse(t,r){if(t.length!==2)return r.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(qa(t[1])){const a=t[1];if(a.type==="FeatureCollection"){const c=[];for(const p of a.features){const{type:_,coordinates:v}=p.geometry;_==="Polygon"&&c.push(v),_==="MultiPolygon"&&c.push(...v)}if(c.length)return new zo(a,{type:"MultiPolygon",coordinates:c})}else if(a.type==="Feature"){const c=a.geometry.type;if(c==="Polygon"||c==="MultiPolygon")return new zo(a,a.geometry)}else if(a.type==="Polygon"||a.type==="MultiPolygon")return new zo(a,a)}return r.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(r,a){const c=[1/0,1/0,-1/0,-1/0],p=[1/0,1/0,-1/0,-1/0],_=r.canonicalID();if(a.type==="Polygon"){const v=Bc(a.coordinates,p,_),b=Vh(r.geometry(),c,p,_);if(!Rs(c,p))return!1;for(const S of b)if(!Eo(S,v))return!1}if(a.type==="MultiPolygon"){const v=jh(a.coordinates,p,_),b=Vh(r.geometry(),c,p,_);if(!Rs(c,p))return!1;for(const S of b)if(!Oh(S,v))return!1}return!0})(t,this.geometries);if(t.geometryType()==="LineString")return(function(r,a){const c=[1/0,1/0,-1/0,-1/0],p=[1/0,1/0,-1/0,-1/0],_=r.canonicalID();if(a.type==="Polygon"){const v=Bc(a.coordinates,p,_),b=qh(r.geometry(),c,p,_);if(!Rs(c,p))return!1;for(const S of b)if(!Rc(S,v))return!1}if(a.type==="MultiPolygon"){const v=jh(a.coordinates,p,_),b=qh(r.geometry(),c,p,_);if(!Rs(c,p))return!1;for(const S of b)if(!Ip(S,v))return!1}return!0})(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Fc=class{constructor(n=[],t=(r,a)=>ra?1:0){if(this.data=n,this.length=this.data.length,this.compare=t,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(n){this.data.push(n),this._up(this.length++)}pop(){if(this.length===0)return;const n=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),n}peek(){return this.data[0]}_up(n){const{data:t,compare:r}=this,a=t[n];for(;n>0;){const c=n-1>>1,p=t[c];if(r(a,p)>=0)break;t[n]=p,n=c}t[n]=a}_down(n){const{data:t,compare:r}=this,a=this.length>>1,c=t[n];for(;n=0)break;t[n]=t[p],n=p}t[n]=c}};function Oc(n,t,r=0,a=n.length-1,c=Mp){for(;a>r;){if(a-r>600){const b=a-r+1,S=t-r+1,I=Math.log(b),L=.5*Math.exp(2*I/3),F=.5*Math.sqrt(I*L*(b-L)/b)*(S-b/2<0?-1:1);Oc(n,t,Math.max(r,Math.floor(t-S*L/b+F)),Math.min(a,Math.floor(t+(b-S)*L/b+F)),c)}const p=n[t];let _=r,v=a;for(Bs(n,r,t),c(n[a],p)>0&&Bs(n,r,a);_0;)v--}c(n[r],p)===0?Bs(n,r,v):(v++,Bs(n,v,a)),v<=t&&(r=v+1),t<=v&&(a=v-1)}}function Bs(n,t,r){const a=n[t];n[t]=n[r],n[r]=a}function Mp(n,t){return nt?1:0}function Fs(n,t){if(n.length<=1)return[n];const r=[];let a,c;for(const p of n){const _=kp(p);_!==0&&(p.area=Math.abs(_),c===void 0&&(c=_<0),c===_<0?(a&&r.push(a),a=[p]):a.push(p))}if(a&&r.push(a),t>1)for(let p=0;p1?(S=t[b+1][0],I=t[b+1][1]):V>0&&(S+=L/this.kx*V,I+=F/this.ky*V)),L=this.wrap(r[0]-S)*this.kx,F=(r[1]-I)*this.ky;const U=L*L+F*F;U180;)t-=360;return t}}function Gh(n,t){return t[0]-n[0]}function Sl(n){return n[1]-n[0]+1}function Qa(n,t){return n[1]>=n[0]&&n[1]n[1])return[null,null];const r=Sl(n);if(t){if(r===2)return[n,null];const c=Math.floor(r/2);return[[n[0],n[0]+c],[n[0]+c,n[1]]]}if(r===1)return[n,null];const a=Math.floor(r/2)-1;return[[n[0],n[0]+a],[n[0]+a+1,n[1]]]}function Vc(n,t){if(!Qa(t,n.length))return[1/0,1/0,-1/0,-1/0];const r=[1/0,1/0,-1/0,-1/0];for(let a=t[0];a<=t[1];++a)Ds(r,n[a]);return r}function qc(n){const t=[1/0,1/0,-1/0,-1/0];for(const r of n)for(const a of r)Ds(t,a);return t}function Hh(n){return n[0]!==-1/0&&n[1]!==-1/0&&n[2]!==1/0&&n[3]!==1/0}function Zc(n,t,r){if(!Hh(n)||!Hh(t))return NaN;let a=0,c=0;return n[2]t[2]&&(a=n[0]-t[2]),n[1]>t[3]&&(c=n[1]-t[3]),n[3]=a)return a;if(Rs(c,p)){if(Wh(n,t))return 0}else if(Wh(t,n))return 0;let _=1/0;for(const v of n)for(let b=0,S=v.length,I=S-1;b0;){const b=_.pop();if(b[0]>=p)continue;const S=b[1],I=t?50:100;if(Sl(S)<=I){if(!Qa(S,n.length))return NaN;if(t){const L=Lp(n,S,r,a);if(isNaN(L)||L===0)return L;p=Math.min(p,L)}else for(let L=S[0];L<=S[1];++L){const F=zp(n[L],r,a);if(p=Math.min(p,F),p===0)return 0}}else{const L=Pn(S,t);Xh(_,p,a,n,v,L[0]),Xh(_,p,a,n,v,L[1])}}return p}function Ml(n,t,r,a,c,p=1/0){let _=Math.min(p,c.distance(n[0],r[0]));if(_===0)return _;const v=new Fc([[0,[0,n.length-1],[0,r.length-1]]],Gh);for(;v.length>0;){const b=v.pop();if(b[0]>=_)continue;const S=b[1],I=b[2],L=t?50:100,F=a?50:100;if(Sl(S)<=L&&Sl(I)<=F){if(!Qa(S,n.length)&&Qa(I,r.length))return NaN;let V;if(t&&a)V=Ap(n,S,r,I,c),_=Math.min(_,V);else if(t&&!a){const U=n.slice(S[0],S[1]+1);for(let W=I[0];W<=I[1];++W)if(V=Lo(r[W],U,c),_=Math.min(_,V),_===0)return _}else if(!t&&a){const U=r.slice(I[0],I[1]+1);for(let W=S[0];W<=S[1];++W)if(V=Lo(n[W],U,c),_=Math.min(_,V),_===0)return _}else V=Ep(n,S,r,I,c),_=Math.min(_,V)}else{const V=Pn(S,t),U=Pn(I,a);Pl(v,_,c,n,r,V[0],U[0]),Pl(v,_,c,n,r,V[0],U[1]),Pl(v,_,c,n,r,V[1],U[0]),Pl(v,_,c,n,r,V[1],U[1])}}return _}function $c(n){return n.type==="MultiPolygon"?n.coordinates.map((t=>({type:"Polygon",coordinates:t}))):n.type==="MultiLineString"?n.coordinates.map((t=>({type:"LineString",coordinates:t}))):n.type==="MultiPoint"?n.coordinates.map((t=>({type:"Point",coordinates:t}))):[n]}class Do{constructor(t,r){this.type=Ge,this.geojson=t,this.geometries=r}static parse(t,r){if(t.length!==2)return r.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`);if(qa(t[1])){const a=t[1];if(a.type==="FeatureCollection")return new Do(a,a.features.map((c=>$c(c.geometry))).flat());if(a.type==="Feature")return new Do(a,$c(a.geometry));if("type"in a&&"coordinates"in a)return new Do(a,$c(a))}return r.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(r,a){const c=r.geometry(),p=c.flat().map((b=>wl([b.x,b.y],r.canonical)));if(c.length===0)return NaN;const _=new jc(p[0][1]);let v=1/0;for(const b of a){switch(b.type){case"Point":v=Math.min(v,Ml(p,!1,[b.coordinates],!1,_,v));break;case"LineString":v=Math.min(v,Ml(p,!1,b.coordinates,!0,_,v));break;case"Polygon":v=Math.min(v,Il(p,!1,b.coordinates,_,v))}if(v===0)return v}return v})(t,this.geometries);if(t.geometryType()==="LineString")return(function(r,a){const c=r.geometry(),p=c.flat().map((b=>wl([b.x,b.y],r.canonical)));if(c.length===0)return NaN;const _=new jc(p[0][1]);let v=1/0;for(const b of a){switch(b.type){case"Point":v=Math.min(v,Ml(p,!0,[b.coordinates],!1,_,v));break;case"LineString":v=Math.min(v,Ml(p,!0,b.coordinates,!0,_,v));break;case"Polygon":v=Math.min(v,Il(p,!0,b.coordinates,_,v))}if(v===0)return v}return v})(t,this.geometries);if(t.geometryType()==="Polygon")return(function(r,a){const c=r.geometry();if(c.length===0||c[0].length===0)return NaN;const p=Fs(c,0).map((b=>b.map((S=>S.map((I=>wl([I.x,I.y],r.canonical))))))),_=new jc(p[0][0][0][1]);let v=1/0;for(const b of a)for(const S of p){switch(b.type){case"Point":v=Math.min(v,Il([b.coordinates],!1,S,_,v));break;case"LineString":v=Math.min(v,Il(b.coordinates,!0,S,_,v));break;case"Polygon":v=Math.min(v,Dp(S,b.coordinates,_,v))}if(v===0)return v}return v})(t,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class Os{constructor(t){this.type=ur,this.key=t}static parse(t,r){if(t.length!==2)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);const a=t[1];return a==null?r.error("Global state property must be defined."):typeof a!="string"?r.error(`Global state property must be string, but found ${typeof t[1]} instead.`):new Os(a)}evaluate(t){var r;const a=(r=t.globals)===null||r===void 0?void 0:r.globalState;return a&&Object.keys(a).length!==0?sr(a,this.key):null}eachChild(){}outputDefined(){return!1}}const ts={"==":Fh,"!=":yl,">":zc,"<":bp,">=":Tp,"<=":wp,array:Li,at:gl,boolean:Li,case:Qo,coalesce:Es,collator:xl,format:Ao,image:Dc,in:vl,"index-of":Sa,interpolate:Di,"interpolate-hcl":Di,"interpolate-lab":Di,length:bl,let:Ja,literal:_a,match:wi,number:Li,"number-format":Lc,object:Li,slice:Ms,step:ei,string:Li,"to-boolean":sa,"to-color":sa,"to-number":sa,"to-string":sa,var:Jo,within:zo,distance:Do,"global-state":Os};class va{constructor(t,r,a,c){this.name=t,this.type=r,this._evaluate=a,this.args=c}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}static parse(t,r){const a=t[0],c=va.definitions[a];if(!c)return r.error(`Unknown expression "${a}". If you wanted a literal array, use ["literal", [...]].`,0);const p=Array.isArray(c)?c[0]:c.type,_=Array.isArray(c)?[[c[1],c[2]]]:c.overloads,v=_.filter((([S])=>!Array.isArray(S)||S.length===t.length-1));let b=null;for(const[S,I]of v){b=new Ca(r.registry,kl,r.path,null,r.scope);const L=[];let F=!1;for(let V=1;V{return F=L,Array.isArray(F)?`(${F.map(Qr).join(", ")})`:`(${Qr(F.type)}...)`;var F})).join(" | "),I=[];for(let L=1;L{r=t?r&&kl(a):r&&a instanceof _a})),!!r&&Al(n)&&El(n,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function Al(n){if(n instanceof va&&(n.name==="get"&&n.args.length===1||n.name==="feature-state"||n.name==="has"&&n.args.length===1||n.name==="properties"||n.name==="geometry-type"||n.name==="id"||/^filter-/.test(n.name))||n instanceof zo||n instanceof Do)return!1;let t=!0;return n.eachChild((r=>{t&&!Al(r)&&(t=!1)})),t}function Ns(n){if(n instanceof va&&n.name==="feature-state")return!1;let t=!0;return n.eachChild((r=>{t&&!Ns(r)&&(t=!1)})),t}function El(n,t){if(n instanceof va&&t.indexOf(n.name)>=0)return!1;let r=!0;return n.eachChild((a=>{r&&!El(a,t)&&(r=!1)})),r}function Jh(n){return{result:"success",value:n}}function rs(n){return{result:"error",value:n}}function fo(n){return n["property-type"]==="data-driven"||n["property-type"]==="cross-faded-data-driven"}function Qh(n){return!!n.expression&&n.expression.parameters.indexOf("zoom")>-1}function Hc(n){return!!n.expression&&n.expression.interpolated}function on(n){return n instanceof Number?"number":n instanceof String?"string":n instanceof Boolean?"boolean":Array.isArray(n)?"array":n===null?"null":typeof n}function js(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)&&Lr(n)===Er}function Rp(n){return n}function ed(n,t){const r=n.stops&&typeof n.stops[0][0]=="object",a=r||!(r||n.property!==void 0),c=n.type||(Hc(t)?"exponential":"interval"),p=(function(I){switch(I.type){case"color":return Pr.parse;case"padding":return kn.parse;case"numberArray":return gn.parse;case"colorArray":return fn.parse;default:return null}})(t);if(p&&((n=Hr({},n)).stops&&(n.stops=n.stops.map((I=>[I[0],p(I[1])]))),n.default=p(n.default?n.default:t.default)),n.colorSpace&&(_=n.colorSpace)!=="rgb"&&_!=="hcl"&&_!=="lab")throw new Error(`Unknown color space: "${n.colorSpace}"`);var _;const v=(function(I){switch(I){case"exponential":return rd;case"interval":return Bp;case"categorical":return td;case"identity":return Fp;default:throw new Error(`Unknown function type "${I}"`)}})(c);let b,S;if(c==="categorical"){b=Object.create(null);for(const I of n.stops)b[I[0]]=I[1];S=typeof n.stops[0][0]}if(r){const I={},L=[];for(let U=0;UU[0])),evaluate:({zoom:U},W)=>rd({stops:F,base:n.base},t,U).evaluate(U,W)}}if(a){const I=c==="exponential"?{name:"exponential",base:n.base!==void 0?n.base:1}:null;return{kind:"camera",interpolationType:I,interpolationFactor:Di.interpolationFactor.bind(void 0,I),zoomStops:n.stops.map((L=>L[0])),evaluate:({zoom:L})=>v(n,t,L,b,S)}}return{kind:"source",evaluate(I,L){const F=L&&L.properties?L.properties[n.property]:void 0;return F===void 0?mo(n.default,t.default):v(n,t,F,b,S)}}}function mo(n,t,r){return n!==void 0?n:t!==void 0?t:r!==void 0?r:void 0}function td(n,t,r,a,c){return mo(typeof r===c?a[r]:void 0,n.default,t.default)}function Bp(n,t,r){if(on(r)!=="number")return mo(n.default,t.default);const a=n.stops.length;if(a===1||r<=n.stops[0][0])return n.stops[0][1];if(r>=n.stops[a-1][0])return n.stops[a-1][1];const c=ko(n.stops.map((p=>p[0])),r);return n.stops[c][1]}function rd(n,t,r){const a=n.base!==void 0?n.base:1;if(on(r)!=="number")return mo(n.default,t.default);const c=n.stops.length;if(c===1||r<=n.stops[0][0])return n.stops[0][1];if(r>=n.stops[c-1][0])return n.stops[c-1][1];const p=ko(n.stops.map((I=>I[0])),r),_=(function(I,L,F,V){const U=V-F,W=I-F;return U===0?0:L===1?W/U:(Math.pow(L,W)-1)/(Math.pow(L,U)-1)})(r,a,n.stops[p][0],n.stops[p+1][0]),v=n.stops[p][1],b=n.stops[p+1][1],S=Za[t.type]||Rp;return typeof v.evaluate=="function"?{evaluate(...I){const L=v.evaluate.apply(void 0,I),F=b.evaluate.apply(void 0,I);if(L!==void 0&&F!==void 0)return S(L,F,_,n.colorSpace)}}:S(v,b,_,n.colorSpace)}function Fp(n,t,r){switch(t.type){case"color":r=Pr.parse(r);break;case"formatted":r=Sn.fromString(r.toString());break;case"resolvedImage":r=Gn.fromString(r.toString());break;case"padding":r=kn.parse(r);break;case"colorArray":r=fn.parse(r);break;case"numberArray":r=gn.parse(r);break;default:on(r)===t.type||t.type==="enum"&&t.values[r]||(r=void 0)}return mo(r,n.default,t.default)}va.register(ts,{error:[{kind:"error"},[At],(n,[t])=>{throw new an(t.evaluate(n))}],typeof:[At,[ur],(n,[t])=>Qr(Lr(t.evaluate(n)))],"to-rgba":[tn(Ge,4),[Yt],(n,[t])=>{const[r,a,c,p]=t.evaluate(n).rgb;return[255*r,255*a,255*c,p]}],rgb:[Yt,[Ge,Ge,Ge],Yh],rgba:[Yt,[Ge,Ge,Ge,Ge],Yh],has:{type:Rt,overloads:[[[At],(n,[t])=>Kh(t.evaluate(n),n.properties())],[[At,Er],(n,[t,r])=>Kh(t.evaluate(n),r.evaluate(n))]]},get:{type:ur,overloads:[[[At],(n,[t])=>Gc(t.evaluate(n),n.properties())],[[At,Er],(n,[t,r])=>Gc(t.evaluate(n),r.evaluate(n))]]},"feature-state":[ur,[At],(n,[t])=>Gc(t.evaluate(n),n.featureState||{})],properties:[Er,[],n=>n.properties()],"geometry-type":[At,[],n=>n.geometryType()],id:[ur,[],n=>n.id()],zoom:[Ge,[],n=>n.globals.zoom],"heatmap-density":[Ge,[],n=>n.globals.heatmapDensity||0],elevation:[Ge,[],n=>n.globals.elevation||0],"line-progress":[Ge,[],n=>n.globals.lineProgress||0],accumulated:[ur,[],n=>n.globals.accumulated===void 0?null:n.globals.accumulated],"+":[Ge,Ro(Ge),(n,t)=>{let r=0;for(const a of t)r+=a.evaluate(n);return r}],"*":[Ge,Ro(Ge),(n,t)=>{let r=1;for(const a of t)r*=a.evaluate(n);return r}],"-":{type:Ge,overloads:[[[Ge,Ge],(n,[t,r])=>t.evaluate(n)-r.evaluate(n)],[[Ge],(n,[t])=>-t.evaluate(n)]]},"/":[Ge,[Ge,Ge],(n,[t,r])=>t.evaluate(n)/r.evaluate(n)],"%":[Ge,[Ge,Ge],(n,[t,r])=>t.evaluate(n)%r.evaluate(n)],ln2:[Ge,[],()=>Math.LN2],pi:[Ge,[],()=>Math.PI],e:[Ge,[],()=>Math.E],"^":[Ge,[Ge,Ge],(n,[t,r])=>Math.pow(t.evaluate(n),r.evaluate(n))],sqrt:[Ge,[Ge],(n,[t])=>Math.sqrt(t.evaluate(n))],log10:[Ge,[Ge],(n,[t])=>Math.log(t.evaluate(n))/Math.LN10],ln:[Ge,[Ge],(n,[t])=>Math.log(t.evaluate(n))],log2:[Ge,[Ge],(n,[t])=>Math.log(t.evaluate(n))/Math.LN2],sin:[Ge,[Ge],(n,[t])=>Math.sin(t.evaluate(n))],cos:[Ge,[Ge],(n,[t])=>Math.cos(t.evaluate(n))],tan:[Ge,[Ge],(n,[t])=>Math.tan(t.evaluate(n))],asin:[Ge,[Ge],(n,[t])=>Math.asin(t.evaluate(n))],acos:[Ge,[Ge],(n,[t])=>Math.acos(t.evaluate(n))],atan:[Ge,[Ge],(n,[t])=>Math.atan(t.evaluate(n))],min:[Ge,Ro(Ge),(n,t)=>Math.min(...t.map((r=>r.evaluate(n))))],max:[Ge,Ro(Ge),(n,t)=>Math.max(...t.map((r=>r.evaluate(n))))],abs:[Ge,[Ge],(n,[t])=>Math.abs(t.evaluate(n))],round:[Ge,[Ge],(n,[t])=>{const r=t.evaluate(n);return r<0?-Math.round(-r):Math.round(r)}],floor:[Ge,[Ge],(n,[t])=>Math.floor(t.evaluate(n))],ceil:[Ge,[Ge],(n,[t])=>Math.ceil(t.evaluate(n))],"filter-==":[Rt,[At,ur],(n,[t,r])=>n.properties()[t.value]===r.value],"filter-id-==":[Rt,[ur],(n,[t])=>n.id()===t.value],"filter-type-==":[Rt,[At],(n,[t])=>n.geometryType()===t.value],"filter-<":[Rt,[At,ur],(n,[t,r])=>{const a=n.properties()[t.value],c=r.value;return typeof a==typeof c&&a{const r=n.id(),a=t.value;return typeof r==typeof a&&r":[Rt,[At,ur],(n,[t,r])=>{const a=n.properties()[t.value],c=r.value;return typeof a==typeof c&&a>c}],"filter-id->":[Rt,[ur],(n,[t])=>{const r=n.id(),a=t.value;return typeof r==typeof a&&r>a}],"filter-<=":[Rt,[At,ur],(n,[t,r])=>{const a=n.properties()[t.value],c=r.value;return typeof a==typeof c&&a<=c}],"filter-id-<=":[Rt,[ur],(n,[t])=>{const r=n.id(),a=t.value;return typeof r==typeof a&&r<=a}],"filter->=":[Rt,[At,ur],(n,[t,r])=>{const a=n.properties()[t.value],c=r.value;return typeof a==typeof c&&a>=c}],"filter-id->=":[Rt,[ur],(n,[t])=>{const r=n.id(),a=t.value;return typeof r==typeof a&&r>=a}],"filter-has":[Rt,[ur],(n,[t])=>t.value in n.properties()],"filter-has-id":[Rt,[],n=>n.id()!==null&&n.id()!==void 0],"filter-type-in":[Rt,[tn(At)],(n,[t])=>t.value.indexOf(n.geometryType())>=0],"filter-id-in":[Rt,[tn(ur)],(n,[t])=>t.value.indexOf(n.id())>=0],"filter-in-small":[Rt,[At,tn(ur)],(n,[t,r])=>r.value.indexOf(n.properties()[t.value])>=0],"filter-in-large":[Rt,[At,tn(ur)],(n,[t,r])=>(function(a,c,p,_){for(;p<=_;){const v=p+_>>1;if(c[v]===a)return!0;c[v]>a?_=v-1:p=v+1}return!1})(n.properties()[t.value],r.value,0,r.value.length-1)],all:{type:Rt,overloads:[[[Rt,Rt],(n,[t,r])=>t.evaluate(n)&&r.evaluate(n)],[Ro(Rt),(n,t)=>{for(const r of t)if(!r.evaluate(n))return!1;return!0}]]},any:{type:Rt,overloads:[[[Rt,Rt],(n,[t,r])=>t.evaluate(n)||r.evaluate(n)],[Ro(Rt),(n,t)=>{for(const r of t)if(r.evaluate(n))return!0;return!1}]]},"!":[Rt,[Rt],(n,[t])=>!t.evaluate(n)],"is-supported-script":[Rt,[At],(n,[t])=>{const r=n.globals&&n.globals.isSupportedScript;return!r||r(t.evaluate(n))}],upcase:[At,[At],(n,[t])=>t.evaluate(n).toUpperCase()],downcase:[At,[At],(n,[t])=>t.evaluate(n).toLowerCase()],concat:[At,Ro(ur),(n,t)=>t.map((r=>$r(r.evaluate(n)))).join("")],"resolved-locale":[At,[rn],(n,[t])=>t.evaluate(n).resolvedLocale()]});class Wc{constructor(t,r){this.expression=t,this._warningHistory={},this._evaluator=new Is,this._defaultValue=r?(function(a){if(a.type==="color"&&js(a.default))return new Pr(0,0,0,0);switch(a.type){case"color":return Pr.parse(a.default)||null;case"padding":return kn.parse(a.default)||null;case"numberArray":return gn.parse(a.default)||null;case"colorArray":return fn.parse(a.default)||null;case"variableAnchorOffsetCollection":return pi.parse(a.default)||null;case"projectionDefinition":return jn.parse(a.default)||null;default:return a.default===void 0?null:a.default}})(r):null,this._enumValues=r&&r.type==="enum"?r.values:null}evaluateWithoutErrorHandling(t,r,a,c,p,_){return this._evaluator.globals=t,this._evaluator.feature=r,this._evaluator.featureState=a,this._evaluator.canonical=c,this._evaluator.availableImages=p||null,this._evaluator.formattedSection=_,this.expression.evaluate(this._evaluator)}evaluate(t,r,a,c,p,_){this._evaluator.globals=t,this._evaluator.feature=r||null,this._evaluator.featureState=a||null,this._evaluator.canonical=c,this._evaluator.availableImages=p||null,this._evaluator.formattedSection=_||null;try{const v=this.expression.evaluate(this._evaluator);if(v==null||typeof v=="number"&&v!=v)return this._defaultValue;if(this._enumValues&&!(v in this._enumValues))throw new an(`Expected value to be one of ${Object.keys(this._enumValues).map((b=>JSON.stringify(b))).join(", ")}, but found ${JSON.stringify(v)} instead.`);return v}catch(v){return this._warningHistory[v.message]||(this._warningHistory[v.message]=!0,typeof console<"u"&&console.warn(v.message)),this._defaultValue}}}function zl(n){return Array.isArray(n)&&n.length>0&&typeof n[0]=="string"&&n[0]in ts}function Vs(n,t){const r=new Ca(ts,kl,[],t?(function(c){const p={color:Yt,string:At,number:Ge,enum:At,boolean:Rt,formatted:pn,padding:_n,numberArray:En,colorArray:sn,projectionDefinition:br,resolvedImage:dr,variableAnchorOffsetCollection:In};return c.type==="array"?tn(p[c.value]||ur,c.length):p[c.type]})(t):void 0),a=r.parse(n,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return a?Jh(new Wc(a,t)):rs(r.errors)}class qs{constructor(t,r){this.kind=t,this._styleExpression=r,this.isStateDependent=t!=="constant"&&!Ns(r.expression),this.globalStateRefs=$s(r.expression)}evaluateWithoutErrorHandling(t,r,a,c,p,_){return this._styleExpression.evaluateWithoutErrorHandling(t,r,a,c,p,_)}evaluate(t,r,a,c,p,_){return this._styleExpression.evaluate(t,r,a,c,p,_)}}class Xc{constructor(t,r,a,c){this.kind=t,this.zoomStops=a,this._styleExpression=r,this.isStateDependent=t!=="camera"&&!Ns(r.expression),this.globalStateRefs=$s(r.expression),this.interpolationType=c}evaluateWithoutErrorHandling(t,r,a,c,p,_){return this._styleExpression.evaluateWithoutErrorHandling(t,r,a,c,p,_)}evaluate(t,r,a,c,p,_){return this._styleExpression.evaluate(t,r,a,c,p,_)}interpolationFactor(t,r,a){return this.interpolationType?Di.interpolationFactor(this.interpolationType,t,r,a):0}}function nd(n,t){const r=Vs(n,t);if(r.result==="error")return r;const a=r.value.expression,c=Al(a);if(!c&&!fo(t))return rs([new Yr("","data expressions not supported")]);const p=El(a,["zoom"]);if(!p&&!Qh(t))return rs([new Yr("","zoom expressions not supported")]);const _=Us(a);return _||p?_ instanceof Yr?rs([_]):_ instanceof Di&&!Hc(t)?rs([new Yr("",'"interpolate" expressions cannot be used with this property')]):Jh(_?new Xc(c?"camera":"composite",r.value,_.labels,_ instanceof Di?_.interpolation:void 0):new qs(c?"constant":"source",r.value)):rs([new Yr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Zs{constructor(t,r){this._parameters=t,this._specification=r,Hr(this,ed(this._parameters,this._specification))}static deserialize(t){return new Zs(t._parameters,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification}}}function Us(n){let t=null;if(n instanceof Ja)t=Us(n.result);else if(n instanceof Es){for(const r of n.args)if(t=Us(r),t)break}else(n instanceof ei||n instanceof Di)&&n.input instanceof va&&n.input.name==="zoom"&&(t=n);return t instanceof Yr||n.eachChild((r=>{const a=Us(r);a instanceof Yr?t=a:!t&&a?t=new Yr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&a&&t!==a&&(t=new Yr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),t}function $s(n,t=new Set){return n instanceof Os&&t.add(n.key),n.eachChild((r=>{$s(r,t)})),t}function Ll(n){if(n===!0||n===!1)return!0;if(!Array.isArray(n)||n.length===0)return!1;switch(n[0]){case"has":return n.length>=2&&n[1]!=="$id"&&n[1]!=="$type";case"in":return n.length>=3&&(typeof n[1]!="string"||Array.isArray(n[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return n.length!==3||Array.isArray(n[1])||Array.isArray(n[2]);case"any":case"all":for(const t of n.slice(1))if(!Ll(t)&&typeof t!="boolean")return!1;return!0;default:return!0}}const Yc={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Bo(n){if(n==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};Ll(n)||(n=Fo(n));const t=Vs(n,Yc);if(t.result==="error")throw new Error(t.value.map((r=>`${r.key}: ${r.message}`)).join(", "));return{filter:(r,a,c)=>t.value.evaluate(r,a,{},c),needGeometry:Dl(n),getGlobalStateRefs:()=>$s(t.value.expression)}}function Kc(n,t){return nt?1:0}function Dl(n){if(!Array.isArray(n))return!1;if(n[0]==="within"||n[0]==="distance")return!0;for(let t=1;t"||t==="<="||t===">="?Jc(n[1],n[2],t):t==="any"?(r=n.slice(1),["any"].concat(r.map(Fo))):t==="all"?["all"].concat(n.slice(1).map(Fo)):t==="none"?["all"].concat(n.slice(1).map(Fo).map(Rl)):t==="in"?id(n[1],n.slice(2)):t==="!in"?Rl(id(n[1],n.slice(2))):t==="has"?ad(n[1]):t!=="!has"||Rl(ad(n[1]));var r}function Jc(n,t,r){switch(n){case"$type":return[`filter-type-${r}`,t];case"$id":return[`filter-id-${r}`,t];default:return[`filter-${r}`,n,t]}}function id(n,t){if(t.length===0)return!1;switch(n){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((r=>typeof r!=typeof t[0]))?["filter-in-large",n,["literal",t.sort(Kc)]]:["filter-in-small",n,["literal",t]]}}function ad(n){switch(n){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",n]}}function Rl(n){return["!",n]}function Qc(n){const t=typeof n;if(t==="number"||t==="boolean"||t==="string"||n==null)return JSON.stringify(n);if(Array.isArray(n)){let c="[";for(const p of n)c+=`${Qc(p)},`;return`${c}]`}const r=Object.keys(n).sort();let a="{";for(let c=0;ca.maximum?[new ht(t,r,`${r} is greater than the maximum value ${a.maximum}`)]:[]}function od(n){const t=n.valueSpec,r=Yn(n.value.type);let a,c,p,_={};const v=r!=="categorical"&&n.value.property===void 0,b=!v,S=on(n.value.stops)==="array"&&on(n.value.stops[0])==="array"&&on(n.value.stops[0][0])==="object",I=ya({key:n.key,value:n.value,valueSpec:n.styleSpec.function,validateSpec:n.validateSpec,style:n.style,styleSpec:n.styleSpec,objectElementValidators:{stops:function(V){if(r==="identity")return[new ht(V.key,V.value,'identity function may not have a "stops" property')];let U=[];const W=V.value;return U=U.concat(Bl({key:V.key,value:W,valueSpec:V.valueSpec,validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec,arrayElementValidator:L})),on(W)==="array"&&W.length===0&&U.push(new ht(V.key,W,"array must have at least one stop")),U},default:function(V){return V.validateSpec({key:V.key,value:V.value,valueSpec:t,validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec})}}});return r==="identity"&&v&&I.push(new ht(n.key,n.value,'missing required property "property"')),r==="identity"||n.value.stops||I.push(new ht(n.key,n.value,'missing required property "stops"')),r==="exponential"&&n.valueSpec.expression&&!Hc(n.valueSpec)&&I.push(new ht(n.key,n.value,"exponential functions not supported")),n.styleSpec.$version>=8&&(b&&!fo(n.valueSpec)?I.push(new ht(n.key,n.value,"property functions not supported")):v&&!Qh(n.valueSpec)&&I.push(new ht(n.key,n.value,"zoom functions not supported"))),r!=="categorical"&&!S||n.value.property!==void 0||I.push(new ht(n.key,n.value,'"property" property is required')),I;function L(V){let U=[];const W=V.value,J=V.key;if(on(W)!=="array")return[new ht(J,W,`array expected, ${on(W)} found`)];if(W.length!==2)return[new ht(J,W,`array length 2 expected, length ${W.length} found`)];if(S){if(on(W[0])!=="object")return[new ht(J,W,`object expected, ${on(W[0])} found`)];if(W[0].zoom===void 0)return[new ht(J,W,"object stop key must have zoom")];if(W[0].value===void 0)return[new ht(J,W,"object stop key must have value")];if(p&&p>Yn(W[0].zoom))return[new ht(J,W[0].zoom,"stop zoom values must appear in ascending order")];Yn(W[0].zoom)!==p&&(p=Yn(W[0].zoom),c=void 0,_={}),U=U.concat(ya({key:`${J}[0]`,value:W[0],valueSpec:{zoom:{}},validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec,objectElementValidators:{zoom:Gs,value:F}}))}else U=U.concat(F({key:`${J}[0]`,value:W[0],validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec},W));return zl(Ua(W[1]))?U.concat([new ht(`${J}[1]`,W[1],"expressions are not allowed in function stops.")]):U.concat(V.validateSpec({key:`${J}[1]`,value:W[1],valueSpec:t,validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec}))}function F(V,U){const W=on(V.value),J=Yn(V.value),le=V.value!==null?V.value:U;if(a){if(W!==a)return[new ht(V.key,le,`${W} stop domain type must match previous stop domain type ${a}`)]}else a=W;if(W!=="number"&&W!=="string"&&W!=="boolean")return[new ht(V.key,le,"stop domain value must be a number, string, or boolean")];if(W!=="number"&&r!=="categorical"){let Le=`number expected, ${W} found`;return fo(t)&&r===void 0&&(Le+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new ht(V.key,le,Le)]}return r!=="categorical"||W!=="number"||isFinite(J)&&Math.floor(J)===J?r!=="categorical"&&W==="number"&&c!==void 0&&Jnew ht(`${n.key}${a.key}`,n.value,a.message)));const r=t.value.expression||t.value._styleExpression.expression;if(n.expressionContext==="property"&&n.propertyKey==="text-font"&&!r.outputDefined())return[new ht(n.key,n.value,`Invalid data expression for "${n.propertyKey}". Output values must be contained as literals within the expression.`)];if(n.expressionContext==="property"&&n.propertyType==="layout"&&!Ns(r))return[new ht(n.key,n.value,'"feature-state" data expressions are not supported with layout properties.')];if(n.expressionContext==="filter"&&!Ns(r))return[new ht(n.key,n.value,'"feature-state" data expressions are not supported with filters.')];if(n.expressionContext&&n.expressionContext.indexOf("cluster")===0){if(!El(r,["zoom","feature-state"]))return[new ht(n.key,n.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(n.expressionContext==="cluster-initial"&&!Al(r))return[new ht(n.key,n.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Fl(n){const t=n.key,r=n.value,a=on(r);return a!=="string"?[new ht(t,r,`color expected, ${a} found`)]:Pr.parse(String(r))?[]:[new ht(t,r,`color expected, "${r}" found`)]}function eo(n){const t=n.key,r=n.value,a=n.valueSpec,c=[];return Array.isArray(a.values)?a.values.indexOf(Yn(r))===-1&&c.push(new ht(t,r,`expected one of [${a.values.join(", ")}], ${JSON.stringify(r)} found`)):Object.keys(a.values).indexOf(Yn(r))===-1&&c.push(new ht(t,r,`expected one of [${Object.keys(a.values).join(", ")}], ${JSON.stringify(r)} found`)),c}function tu(n){return Ll(Ua(n.value))?Oo(Hr({},n,{expressionContext:"filter",valueSpec:{value:"boolean"}})):sd(n)}function sd(n){const t=n.value,r=n.key;if(on(t)!=="array")return[new ht(r,t,`array expected, ${on(t)} found`)];const a=n.styleSpec;let c,p=[];if(t.length<1)return[new ht(r,t,"filter array must have at least 1 element")];switch(p=p.concat(eo({key:`${r}[0]`,value:t[0],valueSpec:a.filter_operator,style:n.style,styleSpec:n.styleSpec})),Yn(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&Yn(t[1])==="$type"&&p.push(new ht(r,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":t.length!==3&&p.push(new ht(r,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(c=on(t[1]),c!=="string"&&p.push(new ht(`${r}[1]`,t[1],`string expected, ${c} found`)));for(let _=2;_{S in r&&t.push(new ht(a,r[S],`"${S}" is prohibited for ref layers`))})),c.layers.forEach((S=>{Yn(S.id)===v&&(b=S)})),b?b.ref?t.push(new ht(a,r.ref,"ref cannot reference another ref layer")):_=Yn(b.type):t.push(new ht(a,r.ref,`ref layer "${v}" not found`))}else if(_!=="background")if(r.source){const b=c.sources&&c.sources[r.source],S=b&&Yn(b.type);b?S==="vector"&&_==="raster"?t.push(new ht(a,r.source,`layer "${r.id}" requires a raster source`)):S!=="raster-dem"&&_==="hillshade"||S!=="raster-dem"&&_==="color-relief"?t.push(new ht(a,r.source,`layer "${r.id}" requires a raster-dem source`)):S==="raster"&&_!=="raster"?t.push(new ht(a,r.source,`layer "${r.id}" requires a vector source`)):S!=="vector"||r["source-layer"]?S==="raster-dem"&&_!=="hillshade"&&_!=="color-relief"?t.push(new ht(a,r.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):_!=="line"||!r.paint||!r.paint["line-gradient"]||S==="geojson"&&b.lineMetrics||t.push(new ht(a,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new ht(a,r,`layer "${r.id}" must specify a "source-layer"`)):t.push(new ht(a,r.source,`source "${r.source}" not found`))}else t.push(new ht(a,r,'missing required property "source"'));return t=t.concat(ya({key:a,value:r,valueSpec:p.layer,style:n.style,styleSpec:n.styleSpec,validateSpec:n.validateSpec,objectElementValidators:{"*":()=>[],type:()=>n.validateSpec({key:`${a}.type`,value:r.type,valueSpec:p.layer.type,style:n.style,styleSpec:n.styleSpec,validateSpec:n.validateSpec,object:r,objectKey:"type"}),filter:tu,layout:b=>ya({layer:r,key:b.key,value:b.value,style:b.style,styleSpec:b.styleSpec,validateSpec:b.validateSpec,objectElementValidators:{"*":S=>ud(Hr({layerType:_},S))}}),paint:b=>ya({layer:r,key:b.key,value:b.value,style:b.style,styleSpec:b.styleSpec,validateSpec:b.validateSpec,objectElementValidators:{"*":S=>cd(Hr({layerType:_},S))}})}})),t}function Ia(n){const t=n.value,r=n.key,a=on(t);return a!=="string"?[new ht(r,t,`string expected, ${a} found`)]:[]}const ns={promoteId:function({key:n,value:t}){if(on(t)==="string")return Ia({key:n,value:t});{const r=[];for(const a in t)r.push(...Ia({key:`${n}.${a}`,value:t[a]}));return r}}};function Qi(n){const t=n.value,r=n.key,a=n.styleSpec,c=n.style,p=n.validateSpec;if(!t.type)return[new ht(r,t,'"type" is required')];const _=Yn(t.type);let v;switch(_){case"vector":case"raster":return v=ya({key:r,value:t,valueSpec:a[`source_${_.replace("-","_")}`],style:n.style,styleSpec:a,objectElementValidators:ns,validateSpec:p}),v;case"raster-dem":return v=(function(b){var S;const I=(S=b.sourceName)!==null&&S!==void 0?S:"",L=b.value,F=b.styleSpec,V=F.source_raster_dem,U=b.style;let W=[];const J=on(L);if(L===void 0)return W;if(J!=="object")return W.push(new ht("source_raster_dem",L,`object expected, ${J} found`)),W;const le=Yn(L.encoding)==="custom",Le=["redFactor","greenFactor","blueFactor","baseShift"],ye=b.value.encoding?`"${b.value.encoding}"`:"Default";for(const Ce in L)!le&&Le.includes(Ce)?W.push(new ht(Ce,L[Ce],`In "${I}": "${Ce}" is only valid when "encoding" is set to "custom". ${ye} encoding found`)):V[Ce]?W=W.concat(b.validateSpec({key:Ce,value:L[Ce],valueSpec:V[Ce],validateSpec:b.validateSpec,style:U,styleSpec:F})):W.push(new ht(Ce,L[Ce],`unknown property "${Ce}"`));return W})({sourceName:r,value:t,style:n.style,styleSpec:a,validateSpec:p}),v;case"geojson":if(v=ya({key:r,value:t,valueSpec:a.source_geojson,style:c,styleSpec:a,validateSpec:p,objectElementValidators:ns}),t.cluster)for(const b in t.clusterProperties){const[S,I]=t.clusterProperties[b],L=typeof S=="string"?[S,["accumulated"],["get",b]]:S;v.push(...Oo({key:`${r}.${b}.map`,value:I,expressionContext:"cluster-map"})),v.push(...Oo({key:`${r}.${b}.reduce`,value:L,expressionContext:"cluster-reduce"}))}return v;case"video":return ya({key:r,value:t,valueSpec:a.source_video,style:c,validateSpec:p,styleSpec:a});case"image":return ya({key:r,value:t,valueSpec:a.source_image,style:c,validateSpec:p,styleSpec:a});case"canvas":return[new ht(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return eo({key:`${r}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function is(n){const t=n.value,r=n.styleSpec,a=r.light,c=n.style;let p=[];const _=on(t);if(t===void 0)return p;if(_!=="object")return p=p.concat([new ht("light",t,`object expected, ${_} found`)]),p;for(const v in t){const b=v.match(/^(.*)-transition$/);p=p.concat(b&&a[b[1]]&&a[b[1]].transition?n.validateSpec({key:v,value:t[v],valueSpec:r.transition,validateSpec:n.validateSpec,style:c,styleSpec:r}):a[v]?n.validateSpec({key:v,value:t[v],valueSpec:a[v],validateSpec:n.validateSpec,style:c,styleSpec:r}):[new ht(v,t[v],`unknown property "${v}"`)])}return p}function ru(n){const t=n.value,r=n.styleSpec,a=r.sky,c=n.style,p=on(t);if(t===void 0)return[];if(p!=="object")return[new ht("sky",t,`object expected, ${p} found`)];let _=[];for(const v in t)_=_.concat(a[v]?n.validateSpec({key:v,value:t[v],valueSpec:a[v],style:c,styleSpec:r}):[new ht(v,t[v],`unknown property "${v}"`)]);return _}function dd(n){const t=n.value,r=n.styleSpec,a=r.terrain,c=n.style;let p=[];const _=on(t);if(t===void 0)return p;if(_!=="object")return p=p.concat([new ht("terrain",t,`object expected, ${_} found`)]),p;for(const v in t)p=p.concat(a[v]?n.validateSpec({key:v,value:t[v],valueSpec:a[v],validateSpec:n.validateSpec,style:c,styleSpec:r}):[new ht(v,t[v],`unknown property "${v}"`)]);return p}function pd(n){let t=[];const r=n.value,a=n.key;if(Array.isArray(r)){const c=[],p=[];for(const _ in r)r[_].id&&c.includes(r[_].id)&&t.push(new ht(a,r,`all the sprites' ids must be unique, but ${r[_].id} is duplicated`)),c.push(r[_].id),r[_].url&&p.includes(r[_].url)&&t.push(new ht(a,r,`all the sprites' URLs must be unique, but ${r[_].url} is duplicated`)),p.push(r[_].url),t=t.concat(ya({key:`${a}[${_}]`,value:r[_],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:n.validateSpec}));return t}return Ia({key:a,value:r})}function as(n){return t=n.value,t&&t.constructor===Object?[]:[new ht(n.key,n.value,`object expected, ${on(n.value)} found`)];var t}const nu={"*":()=>[],array:Bl,boolean:function(n){const t=n.value,r=n.key,a=on(t);return a!=="boolean"?[new ht(r,t,`boolean expected, ${a} found`)]:[]},number:Gs,color:Fl,constants:eu,enum:eo,filter:tu,function:od,layer:hd,object:ya,source:Qi,light:is,sky:ru,terrain:dd,projection:function(n){const t=n.value,r=n.styleSpec,a=r.projection,c=n.style,p=on(t);if(t===void 0)return[];if(p!=="object")return[new ht("projection",t,`object expected, ${p} found`)];let _=[];for(const v in t)_=_.concat(a[v]?n.validateSpec({key:v,value:t[v],valueSpec:a[v],style:c,styleSpec:r}):[new ht(v,t[v],`unknown property "${v}"`)]);return _},projectionDefinition:function(n){const t=n.key;let r=n.value;r=r instanceof String?r.valueOf():r;const a=on(r);return a!=="array"||(function(c){return Array.isArray(c)&&c.length===3&&typeof c[0]=="string"&&typeof c[1]=="string"&&typeof c[2]=="number"})(r)||(function(c){return!!["interpolate","step","literal"].includes(c[0])})(r)?["array","string"].includes(a)?[]:[new ht(t,r,`projection expected, invalid type "${a}" found`)]:[new ht(t,r,`projection expected, invalid array ${JSON.stringify(r)} found`)]},string:Ia,formatted:function(n){return Ia(n).length===0?[]:Oo(n)},resolvedImage:function(n){return Ia(n).length===0?[]:Oo(n)},padding:function(n){const t=n.key,r=n.value;if(on(r)==="array"){if(r.length<1||r.length>4)return[new ht(t,r,`padding requires 1 to 4 values; ${r.length} values found`)];const a={type:"number"};let c=[];for(let p=0;p[]}})),n.constants&&(r=r.concat(eu({key:"constants",value:n.constants}))),ss(r)}function Ma(n){return function(t){return n({...t,validateSpec:os})}}function ss(n){return[].concat(n).sort(((t,r)=>t.line-r.line))}function ka(n){return function(...t){return ss(n.apply(this,t))}}ea.source=ka(Ma(Qi)),ea.sprite=ka(Ma(pd)),ea.glyphs=ka(Ma(fd)),ea.light=ka(Ma(is)),ea.sky=ka(Ma(ru)),ea.terrain=ka(Ma(dd)),ea.state=ka(Ma(as)),ea.layer=ka(Ma(hd)),ea.filter=ka(Ma(tu)),ea.paintProperty=ka(Ma(cd)),ea.layoutProperty=ka(Ma(ud));const ls=ea,Np=ls.light,Hs=ls.sky,jp=ls.paintProperty,Vp=ls.layoutProperty;function Ws(n,t){let r=!1;if(t&&t.length)for(const a of t)n.fire(new $e(new Error(a.message))),r=!0;return r}class Xs{constructor(t,r,a){const c=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;const _=new Int32Array(this.arrayBuffer);t=_[0],this.d=(r=_[1])+2*(a=_[2]);for(let b=0;b=L[U+0]&&c>=L[U+1])?(v[V]=!0,_.push(I[V])):v[V]=!1}}}}_forEachCell(t,r,a,c,p,_,v,b){const S=this._convertToCellCoord(t),I=this._convertToCellCoord(r),L=this._convertToCellCoord(a),F=this._convertToCellCoord(c);for(let V=S;V<=L;V++)for(let U=I;U<=F;U++){const W=this.d*U+V;if((!b||b(this._convertFromCellCoord(V),this._convertFromCellCoord(U),this._convertFromCellCoord(V+1),this._convertFromCellCoord(U+1)))&&p.call(this,t,r,a,c,W,_,v,b))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,r=3+this.cells.length+1+1;let a=0;for(let _=0;_=0)continue;const _=n[p];c[p]=Aa[r].shallow.indexOf(p)>=0?_:cs(_,t)}n instanceof Error&&(c.message=n.message)}if(c.$name)throw new Error("$name property is reserved for worker serialization logic.");return r!=="Object"&&(c.$name=r),c}function No(n){if(au(n))return n;if(Array.isArray(n))return n.map(No);if(typeof n!="object")throw new Error("can't deserialize object of type "+typeof n);const t=Ol(n)||"Object";if(!Aa[t])throw new Error(`can't deserialize unregistered class ${t}`);const{klass:r}=Aa[t];if(!r)throw new Error(`can't deserialize unregistered class ${t}`);if(r.deserialize)return r.deserialize(n);const a=Object.create(r.prototype);for(const c of Object.keys(n)){if(c==="$name")continue;const p=n[c];a[c]=Aa[t].shallow.indexOf(c)>=0?p:No(p)}return a}class Nl{constructor(){this.first=!0}update(t,r){const a=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=a,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=a,!0):(this.lastFloorZoom>a?(this.lastIntegerZoom=a+1,this.lastIntegerZoomTime=r):this.lastFloorZoomn>=128&&n<=255,"Hangul Jamo":n=>n>=4352&&n<=4607,Khmer:n=>n>=6016&&n<=6143,"General Punctuation":n=>n>=8192&&n<=8303,"Letterlike Symbols":n=>n>=8448&&n<=8527,"Number Forms":n=>n>=8528&&n<=8591,"Miscellaneous Technical":n=>n>=8960&&n<=9215,"Control Pictures":n=>n>=9216&&n<=9279,"Optical Character Recognition":n=>n>=9280&&n<=9311,"Enclosed Alphanumerics":n=>n>=9312&&n<=9471,"Geometric Shapes":n=>n>=9632&&n<=9727,"Miscellaneous Symbols":n=>n>=9728&&n<=9983,"Miscellaneous Symbols and Arrows":n=>n>=11008&&n<=11263,"Ideographic Description Characters":n=>n>=12272&&n<=12287,"CJK Symbols and Punctuation":n=>n>=12288&&n<=12351,Hiragana:n=>n>=12352&&n<=12447,Katakana:n=>n>=12448&&n<=12543,Kanbun:n=>n>=12688&&n<=12703,"CJK Strokes":n=>n>=12736&&n<=12783,"Enclosed CJK Letters and Months":n=>n>=12800&&n<=13055,"CJK Compatibility":n=>n>=13056&&n<=13311,"Yijing Hexagram Symbols":n=>n>=19904&&n<=19967,"CJK Unified Ideographs":n=>n>=19968&&n<=40959,"Hangul Syllables":n=>n>=44032&&n<=55215,"Private Use Area":n=>n>=57344&&n<=63743,"Vertical Forms":n=>n>=65040&&n<=65055,"CJK Compatibility Forms":n=>n>=65072&&n<=65103,"Small Form Variants":n=>n>=65104&&n<=65135,"Halfwidth and Fullwidth Forms":n=>n>=65280&&n<=65519};function jl(n){for(const t of n)if(su(t.charCodeAt(0)))return!0;return!1}function qp(n){for(const t of n)if(!md(t.charCodeAt(0)))return!1;return!0}function Vl(n){const t=n.map((r=>{try{return new RegExp(`\\p{sc=${r}}`,"u").source}catch{return null}})).filter((r=>r));return new RegExp(t.join("|"),"u")}const Zp=Vl(["Arab","Dupl","Mong","Ougr","Syrc"]);function md(n){return!Zp.test(String.fromCodePoint(n))}const ou=Vl(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function su(n){return!(n!==746&&n!==747&&(n<4352||!(un["CJK Compatibility Forms"](n)&&!(n>=65097&&n<=65103)||un["CJK Compatibility"](n)||un["CJK Strokes"](n)||!(!un["CJK Symbols and Punctuation"](n)||n>=12296&&n<=12305||n>=12308&&n<=12319||n===12336)||un["Enclosed CJK Letters and Months"](n)||un["Ideographic Description Characters"](n)||un.Kanbun(n)||un.Katakana(n)&&n!==12540||!(!un["Halfwidth and Fullwidth Forms"](n)||n===65288||n===65289||n===65293||n>=65306&&n<=65310||n===65339||n===65341||n===65343||n>=65371&&n<=65503||n===65507||n>=65512&&n<=65519)||!(!un["Small Form Variants"](n)||n>=65112&&n<=65118||n>=65123&&n<=65126)||un["Vertical Forms"](n)||un["Yijing Hexagram Symbols"](n)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(n))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(n))||ou.test(String.fromCodePoint(n)))))}function _d(n){return!(su(n)||(function(t){return!!(un["Latin-1 Supplement"](t)&&(t===167||t===169||t===174||t===177||t===188||t===189||t===190||t===215||t===247)||un["General Punctuation"](t)&&(t===8214||t===8224||t===8225||t===8240||t===8241||t===8251||t===8252||t===8258||t===8263||t===8264||t===8265||t===8273)||un["Letterlike Symbols"](t)||un["Number Forms"](t)||un["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||t===9003||t>=9085&&t<=9114||t>=9150&&t<=9165||t===9167||t>=9169&&t<=9179||t>=9186&&t<=9215)||un["Control Pictures"](t)&&t!==9251||un["Optical Character Recognition"](t)||un["Enclosed Alphanumerics"](t)||un["Geometric Shapes"](t)||un["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||un["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||un["CJK Symbols and Punctuation"](t)||un.Katakana(t)||un["Private Use Area"](t)||un["CJK Compatibility Forms"](t)||un["Small Form Variants"](t)||un["Halfwidth and Fullwidth Forms"](t)||t===8734||t===8756||t===8757||t>=9984&&t<=10087||t>=10102&&t<=10131||t===65532||t===65533)})(n))}const gd=Vl(["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 lu(n){return gd.test(String.fromCodePoint(n))}function vd(n,t){return!(!t&&lu(n)||n>=2304&&n<=3583||n>=3840&&n<=4255||un.Khmer(n))}function yd(n){for(const t of n)if(lu(t.charCodeAt(0)))return!0;return!1}const Ea=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(n){this.pluginStatus=n.pluginStatus,this.pluginURL=n.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(n){if(Ea.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=n.applyArabicShaping,this.processBidirectionalText=n.processBidirectionalText,this.processStyledBidirectionalText=n.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(n,t){return s(this,void 0,void 0,(function*(){if(this.isParsed())return this.getState();if(n.pluginStatus!=="loading")return this.setState(n),n;const r=n.pluginURL,a=new Promise((p=>{this.loadScriptResolve=p}));t(r);const c=new Promise((p=>setTimeout((()=>p()),this.TIMEOUT)));if(yield Promise.race([a,c]),this.isParsed()){const p={pluginStatus:"loaded",pluginURL:r};return this.setState(p),p}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${r}`)}))}};class Un{constructor(t,r){this.zoom=t,r?(this.now=r.now||0,this.fadeDuration=r.fadeDuration||0,this.zoomHistory=r.zoomHistory||new Nl,this.transition=r.transition||{},this.globalState=r.globalState||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Nl,this.transition={},this.globalState={})}isSupportedScript(t){return(function(r,a){for(const c of r)if(!vd(c.charCodeAt(0),a))return!1;return!0})(t,Ea.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const t=this.zoom,r=t-Math.floor(t),a=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:r+(1-r)*a}:{fromScale:.5,toScale:1,t:1-(1-a)*r}}}class us{constructor(t,r){this.property=t,this.value=r,this.expression=(function(a,c){if(js(a))return new Zs(a,c);if(zl(a)){const p=nd(a,c);if(p.result==="error")throw new Error(p.value.map((_=>`${_.key}: ${_.message}`)).join(", "));return p.value}{let p=a;return c.type==="color"&&typeof a=="string"?p=Pr.parse(a):c.type!=="padding"||typeof a!="number"&&!Array.isArray(a)?c.type!=="numberArray"||typeof a!="number"&&!Array.isArray(a)?c.type!=="colorArray"||typeof a!="string"&&!Array.isArray(a)?c.type==="variableAnchorOffsetCollection"&&Array.isArray(a)?p=pi.parse(a):c.type==="projectionDefinition"&&typeof a=="string"&&(p=jn.parse(a)):p=fn.parse(a):p=gn.parse(a):p=kn.parse(a),{globalStateRefs:new Set,kind:"constant",evaluate:()=>p}}})(r===void 0?t.specification.default:r,t.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(t,r,a){return this.property.possiblyEvaluate(this,t,r,a)}}class cu{constructor(t){this.property=t,this.value=new us(t,void 0)}transitioned(t,r){return new uu(this.property,this.value,r,dt({},t.transition,this.transition),t.now)}untransitioned(){return new uu(this.property,this.value,null,{},0)}}class xd{constructor(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)}getValue(t){return wt(this._values[t].value.value)}setValue(t,r){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new cu(this._values[t].property)),this._values[t].value=new us(this._values[t].property,r===null?void 0:wt(r))}getTransition(t){return wt(this._values[t].transition)}setTransition(t,r){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new cu(this._values[t].property)),this._values[t].transition=wt(r)||void 0}serialize(){const t={};for(const r of Object.keys(this._values)){const a=this.getValue(r);a!==void 0&&(t[r]=a);const c=this.getTransition(r);c!==void 0&&(t[`${r}-transition`]=c)}return t}transitioned(t,r){const a=new hu(this._properties);for(const c of Object.keys(this._values))a._values[c]=this._values[c].transitioned(t,r._values[c]);return a}untransitioned(){const t=new hu(this._properties);for(const r of Object.keys(this._values))t._values[r]=this._values[r].untransitioned();return t}}class uu{constructor(t,r,a,c,p){this.property=t,this.value=r,this.begin=p+c.delay||0,this.end=this.begin+c.duration||0,t.specification.transition&&(c.delay||c.duration)&&(this.prior=a)}possiblyEvaluate(t,r,a){const c=t.now||0,p=this.value.possiblyEvaluate(t,r,a),_=this.prior;if(_){if(c>this.end)return this.prior=null,p;if(this.value.isDataDriven())return this.prior=null,p;if(cc.zoomHistory.lastIntegerZoom?{from:t,to:r}:{from:a,to:r}}interpolate(t){return t}}class _o{constructor(t){this.specification=t}possiblyEvaluate(t,r,a,c){if(t.value!==void 0){if(t.expression.kind==="constant"){const p=t.expression.evaluate(r,null,{},a,c);return this._calculate(p,p,p,r)}return this._calculate(t.expression.evaluate(new Un(Math.floor(r.zoom-1),r)),t.expression.evaluate(new Un(Math.floor(r.zoom),r)),t.expression.evaluate(new Un(Math.floor(r.zoom+1),r)),r)}}_calculate(t,r,a,c){return c.zoom>c.zoomHistory.lastIntegerZoom?{from:t,to:r}:{from:a,to:r}}interpolate(t){return t}}class Ul{constructor(t){this.specification=t}possiblyEvaluate(t,r,a,c){return!!t.expression.evaluate(r,null,{},a,c)}interpolate(){return!1}}class Zi{constructor(t){this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const r in t){const a=t[r];a.specification.overridable&&this.overridableProperties.push(r);const c=this.defaultPropertyValues[r]=new us(a,void 0),p=this.defaultTransitionablePropertyValues[r]=new cu(a);this.defaultTransitioningPropertyValues[r]=p.untransitioned(),this.defaultPossiblyEvaluatedValues[r]=c.possiblyEvaluate({})}}}nr("DataDrivenProperty",Or),nr("DataConstantProperty",yr),nr("CrossFadedDataDrivenProperty",Zl),nr("CrossFadedProperty",_o),nr("ColorRampProperty",Ul);const wd="-transition";class xa extends Mt{constructor(t,r){if(super(),this.id=t.id,this.type=t.type,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},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=Bo(t.filter)),r.layout&&(this._unevaluatedLayout=new bd(r.layout)),r.paint)){this._transitionablePaint=new xd(r.paint);for(const a in t.paint)this.setPaintProperty(a,t.paint[a],{validate:!1});for(const a in t.layout)this.setLayoutProperty(a,t.layout[a],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new ql(r.paint)}}setFilter(t){this.filter=t,this._featureFilter=Bo(t)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(t){return t==="visibility"?this.visibility:this._unevaluatedLayout.getValue(t)}getLayoutAffectingGlobalStateRefs(){const t=new Set;if(this._unevaluatedLayout)for(const r in this._unevaluatedLayout._values){const a=this._unevaluatedLayout._values[r];for(const c of a.getGlobalStateRefs())t.add(c)}for(const r of this._featureFilter.getGlobalStateRefs())t.add(r);return t}setLayoutProperty(t,r,a={}){r!=null&&this._validate(Vp,`layers.${this.id}.layout.${t}`,t,r,a)||(t!=="visibility"?this._unevaluatedLayout.setValue(t,r):this.visibility=r)}getPaintProperty(t){return t.endsWith(wd)?this._transitionablePaint.getTransition(t.slice(0,-11)):this._transitionablePaint.getValue(t)}setPaintProperty(t,r,a={}){if(r!=null&&this._validate(jp,`layers.${this.id}.paint.${t}`,t,r,a))return!1;if(t.endsWith(wd))return this._transitionablePaint.setTransition(t.slice(0,-11),r||void 0),!1;{const c=this._transitionablePaint._values[t],p=c.property.specification["property-type"]==="cross-faded-data-driven",_=c.value.isDataDriven(),v=c.value;this._transitionablePaint.setValue(t,r),this._handleSpecialPaintPropertyUpdate(t);const b=this._transitionablePaint._values[t].value;return b.isDataDriven()||_||p||this._handleOverridablePaintPropertyUpdate(t,v,b)}}_handleSpecialPaintPropertyUpdate(t){}_handleOverridablePaintPropertyUpdate(t,r,a){return!1}isHidden(t){return!!(this.minzoom&&t=this.maxzoom)||this.visibility==="none"}updateTransitions(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(t,r){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,r)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,r)}serialize(){const t={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:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),It(t,((r,a)=>!(r===void 0||a==="layout"&&!Object.keys(r).length||a==="paint"&&!Object.keys(r).length)))}_validate(t,r,a,c,p={}){return(!p||p.validate!==!1)&&Ws(this,t.call(ls,{key:r,layerType:this.type,objectKey:a,value:c,styleSpec:xe,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const t in this.paint._values){const r=this.paint.get(t);if(r instanceof $a&&fo(r.property.specification)&&(r.value.kind==="source"||r.value.kind==="composite")&&r.value.isStateDependent)return!0}return!1}}const Up={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Ys{constructor(t,r){this._structArray=t,this._pos1=r*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Rn{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(t,r){return t._trim(),r&&(t.isTransferred=!0,r.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}static deserialize(t){const r=Object.create(this.prototype);return r.arrayBuffer=t.arrayBuffer,r.length=t.length,r.capacity=t.arrayBuffer.byteLength/r.bytesPerElement,r._refreshViews(),r}_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 r=this.uint8;this._refreshViews(),r&&this.uint8.set(r)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function ti(n,t=1){let r=0,a=0;return{members:n.map((c=>{const p=Up[c.type].BYTES_PER_ELEMENT,_=r=$l(r,Math.max(t,p)),v=c.components||1;return a=Math.max(a,p),r+=p*v,{name:c.name,type:c.type,components:v,offset:_}})),size:$l(r,Math.max(a,t)),alignment:t}}function $l(n,t){return Math.ceil(n/t)*t}class hs extends Rn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r){const a=this.length;return this.resize(a+1),this.emplace(a,t,r)}emplace(t,r,a){const c=2*t;return this.int16[c+0]=r,this.int16[c+1]=a,t}}hs.prototype.bytesPerElement=4,nr("StructArrayLayout2i4",hs);class ds extends Rn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,a){const c=this.length;return this.resize(c+1),this.emplace(c,t,r,a)}emplace(t,r,a,c){const p=3*t;return this.int16[p+0]=r,this.int16[p+1]=a,this.int16[p+2]=c,t}}ds.prototype.bytesPerElement=6,nr("StructArrayLayout3i6",ds);class du extends Rn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,a,c){const p=this.length;return this.resize(p+1),this.emplace(p,t,r,a,c)}emplace(t,r,a,c,p){const _=4*t;return this.int16[_+0]=r,this.int16[_+1]=a,this.int16[_+2]=c,this.int16[_+3]=p,t}}du.prototype.bytesPerElement=8,nr("StructArrayLayout4i8",du);class ps extends Rn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,a,c,p,_){const v=this.length;return this.resize(v+1),this.emplace(v,t,r,a,c,p,_)}emplace(t,r,a,c,p,_,v){const b=6*t;return this.int16[b+0]=r,this.int16[b+1]=a,this.int16[b+2]=c,this.int16[b+3]=p,this.int16[b+4]=_,this.int16[b+5]=v,t}}ps.prototype.bytesPerElement=12,nr("StructArrayLayout2i4i12",ps);class jo extends Rn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,a,c,p,_){const v=this.length;return this.resize(v+1),this.emplace(v,t,r,a,c,p,_)}emplace(t,r,a,c,p,_,v){const b=4*t,S=8*t;return this.int16[b+0]=r,this.int16[b+1]=a,this.uint8[S+4]=c,this.uint8[S+5]=p,this.uint8[S+6]=_,this.uint8[S+7]=v,t}}jo.prototype.bytesPerElement=8,nr("StructArrayLayout2i4ub8",jo);class Ks extends Rn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,r){const a=this.length;return this.resize(a+1),this.emplace(a,t,r)}emplace(t,r,a){const c=2*t;return this.float32[c+0]=r,this.float32[c+1]=a,t}}Ks.prototype.bytesPerElement=8,nr("StructArrayLayout2f8",Ks);class Gl extends Rn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,r,a,c,p,_,v,b,S,I){const L=this.length;return this.resize(L+1),this.emplace(L,t,r,a,c,p,_,v,b,S,I)}emplace(t,r,a,c,p,_,v,b,S,I,L){const F=10*t;return this.uint16[F+0]=r,this.uint16[F+1]=a,this.uint16[F+2]=c,this.uint16[F+3]=p,this.uint16[F+4]=_,this.uint16[F+5]=v,this.uint16[F+6]=b,this.uint16[F+7]=S,this.uint16[F+8]=I,this.uint16[F+9]=L,t}}Gl.prototype.bytesPerElement=20,nr("StructArrayLayout10ui20",Gl);class Vo extends Rn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,r,a,c,p,_,v,b,S,I,L,F){const V=this.length;return this.resize(V+1),this.emplace(V,t,r,a,c,p,_,v,b,S,I,L,F)}emplace(t,r,a,c,p,_,v,b,S,I,L,F,V){const U=12*t;return this.int16[U+0]=r,this.int16[U+1]=a,this.int16[U+2]=c,this.int16[U+3]=p,this.uint16[U+4]=_,this.uint16[U+5]=v,this.uint16[U+6]=b,this.uint16[U+7]=S,this.int16[U+8]=I,this.int16[U+9]=L,this.int16[U+10]=F,this.int16[U+11]=V,t}}Vo.prototype.bytesPerElement=24,nr("StructArrayLayout4i4ui4i24",Vo);class pu extends Rn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,r,a){const c=this.length;return this.resize(c+1),this.emplace(c,t,r,a)}emplace(t,r,a,c){const p=3*t;return this.float32[p+0]=r,this.float32[p+1]=a,this.float32[p+2]=c,t}}pu.prototype.bytesPerElement=12,nr("StructArrayLayout3f12",pu);class fu extends Rn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t){const r=this.length;return this.resize(r+1),this.emplace(r,t)}emplace(t,r){return this.uint32[1*t+0]=r,t}}fu.prototype.bytesPerElement=4,nr("StructArrayLayout1ul4",fu);class Hl extends Rn{_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,r,a,c,p,_,v,b,S){const I=this.length;return this.resize(I+1),this.emplace(I,t,r,a,c,p,_,v,b,S)}emplace(t,r,a,c,p,_,v,b,S,I){const L=10*t,F=5*t;return this.int16[L+0]=r,this.int16[L+1]=a,this.int16[L+2]=c,this.int16[L+3]=p,this.int16[L+4]=_,this.int16[L+5]=v,this.uint32[F+3]=b,this.uint16[L+8]=S,this.uint16[L+9]=I,t}}Hl.prototype.bytesPerElement=20,nr("StructArrayLayout6i1ul2ui20",Hl);class mu extends Rn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,a,c,p,_){const v=this.length;return this.resize(v+1),this.emplace(v,t,r,a,c,p,_)}emplace(t,r,a,c,p,_,v){const b=6*t;return this.int16[b+0]=r,this.int16[b+1]=a,this.int16[b+2]=c,this.int16[b+3]=p,this.int16[b+4]=_,this.int16[b+5]=v,t}}mu.prototype.bytesPerElement=12,nr("StructArrayLayout2i2i2i12",mu);class h extends Rn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,a,c,p){const _=this.length;return this.resize(_+1),this.emplace(_,t,r,a,c,p)}emplace(t,r,a,c,p,_){const v=4*t,b=8*t;return this.float32[v+0]=r,this.float32[v+1]=a,this.float32[v+2]=c,this.int16[b+6]=p,this.int16[b+7]=_,t}}h.prototype.bytesPerElement=16,nr("StructArrayLayout2f1f2i16",h);class e extends Rn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,r,a,c,p,_){const v=this.length;return this.resize(v+1),this.emplace(v,t,r,a,c,p,_)}emplace(t,r,a,c,p,_,v){const b=16*t,S=4*t,I=8*t;return this.uint8[b+0]=r,this.uint8[b+1]=a,this.float32[S+1]=c,this.float32[S+2]=p,this.int16[I+6]=_,this.int16[I+7]=v,t}}e.prototype.bytesPerElement=16,nr("StructArrayLayout2ub2f2i16",e);class i extends Rn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,r,a){const c=this.length;return this.resize(c+1),this.emplace(c,t,r,a)}emplace(t,r,a,c){const p=3*t;return this.uint16[p+0]=r,this.uint16[p+1]=a,this.uint16[p+2]=c,t}}i.prototype.bytesPerElement=6,nr("StructArrayLayout3ui6",i);class l extends Rn{_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,r,a,c,p,_,v,b,S,I,L,F,V,U,W,J,le){const Le=this.length;return this.resize(Le+1),this.emplace(Le,t,r,a,c,p,_,v,b,S,I,L,F,V,U,W,J,le)}emplace(t,r,a,c,p,_,v,b,S,I,L,F,V,U,W,J,le,Le){const ye=24*t,Ce=12*t,Xe=48*t;return this.int16[ye+0]=r,this.int16[ye+1]=a,this.uint16[ye+2]=c,this.uint16[ye+3]=p,this.uint32[Ce+2]=_,this.uint32[Ce+3]=v,this.uint32[Ce+4]=b,this.uint16[ye+10]=S,this.uint16[ye+11]=I,this.uint16[ye+12]=L,this.float32[Ce+7]=F,this.float32[Ce+8]=V,this.uint8[Xe+36]=U,this.uint8[Xe+37]=W,this.uint8[Xe+38]=J,this.uint32[Ce+10]=le,this.int16[ye+22]=Le,t}}l.prototype.bytesPerElement=48,nr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",l);class u extends Rn{_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,r,a,c,p,_,v,b,S,I,L,F,V,U,W,J,le,Le,ye,Ce,Xe,lt,Pt,Xt,Vt,Gt,wr,$t){const Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,t,r,a,c,p,_,v,b,S,I,L,F,V,U,W,J,le,Le,ye,Ce,Xe,lt,Pt,Xt,Vt,Gt,wr,$t)}emplace(t,r,a,c,p,_,v,b,S,I,L,F,V,U,W,J,le,Le,ye,Ce,Xe,lt,Pt,Xt,Vt,Gt,wr,$t,Ht){const gt=32*t,jr=16*t;return this.int16[gt+0]=r,this.int16[gt+1]=a,this.int16[gt+2]=c,this.int16[gt+3]=p,this.int16[gt+4]=_,this.int16[gt+5]=v,this.int16[gt+6]=b,this.int16[gt+7]=S,this.uint16[gt+8]=I,this.uint16[gt+9]=L,this.uint16[gt+10]=F,this.uint16[gt+11]=V,this.uint16[gt+12]=U,this.uint16[gt+13]=W,this.uint16[gt+14]=J,this.uint16[gt+15]=le,this.uint16[gt+16]=Le,this.uint16[gt+17]=ye,this.uint16[gt+18]=Ce,this.uint16[gt+19]=Xe,this.uint16[gt+20]=lt,this.uint16[gt+21]=Pt,this.uint16[gt+22]=Xt,this.uint32[jr+12]=Vt,this.float32[jr+13]=Gt,this.float32[jr+14]=wr,this.uint16[gt+30]=$t,this.uint16[gt+31]=Ht,t}}u.prototype.bytesPerElement=64,nr("StructArrayLayout8i15ui1ul2f2ui64",u);class d extends Rn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t){const r=this.length;return this.resize(r+1),this.emplace(r,t)}emplace(t,r){return this.float32[1*t+0]=r,t}}d.prototype.bytesPerElement=4,nr("StructArrayLayout1f4",d);class g extends Rn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,r,a){const c=this.length;return this.resize(c+1),this.emplace(c,t,r,a)}emplace(t,r,a,c){const p=3*t;return this.uint16[6*t+0]=r,this.float32[p+1]=a,this.float32[p+2]=c,t}}g.prototype.bytesPerElement=12,nr("StructArrayLayout1ui2f12",g);class w extends Rn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,r,a){const c=this.length;return this.resize(c+1),this.emplace(c,t,r,a)}emplace(t,r,a,c){const p=4*t;return this.uint32[2*t+0]=r,this.uint16[p+2]=a,this.uint16[p+3]=c,t}}w.prototype.bytesPerElement=8,nr("StructArrayLayout1ul2ui8",w);class C extends Rn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,r){const a=this.length;return this.resize(a+1),this.emplace(a,t,r)}emplace(t,r,a){const c=2*t;return this.uint16[c+0]=r,this.uint16[c+1]=a,t}}C.prototype.bytesPerElement=4,nr("StructArrayLayout2ui4",C);class P extends Rn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t){const r=this.length;return this.resize(r+1),this.emplace(r,t)}emplace(t,r){return this.uint16[1*t+0]=r,t}}P.prototype.bytesPerElement=2,nr("StructArrayLayout1ui2",P);class A extends Rn{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,r,a,c){const p=this.length;return this.resize(p+1),this.emplace(p,t,r,a,c)}emplace(t,r,a,c,p){const _=4*t;return this.float32[_+0]=r,this.float32[_+1]=a,this.float32[_+2]=c,this.float32[_+3]=p,t}}A.prototype.bytesPerElement=16,nr("StructArrayLayout4f16",A);class R extends Ys{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]}get anchorPoint(){return new B(this.anchorPointX,this.anchorPointY)}}R.prototype.size=20;class D extends Hl{get(t){return new R(this,t)}}nr("CollisionBoxArray",D);class O extends Ys{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]}}O.prototype.size=48;class $ extends l{get(t){return new O(this,t)}}nr("PlacedSymbolArray",$);class ee extends Ys{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]}}ee.prototype.size=64;class Q extends u{get(t){return new ee(this,t)}}nr("SymbolInstanceArray",Q);class ne extends d{getoffsetX(t){return this.float32[1*t+0]}}nr("GlyphOffsetArray",ne);class ue extends ds{getx(t){return this.int16[3*t+0]}gety(t){return this.int16[3*t+1]}gettileUnitDistanceFromAnchor(t){return this.int16[3*t+2]}}nr("SymbolLineVertexArray",ue);class _e extends Ys{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]}}_e.prototype.size=12;class he extends g{get(t){return new _e(this,t)}}nr("TextAnchorOffsetArray",he);class we extends Ys{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]}}we.prototype.size=8;class Pe extends w{get(t){return new we(this,t)}}nr("FeatureIndexArray",Pe);class pe extends hs{}class Be extends hs{}class Qe extends hs{}class Ue extends ps{}class We extends jo{}class Je extends Ks{}class Nt extends Gl{}class Zt extends Vo{}class Tt extends pu{}class mr extends fu{}class Jr extends mu{}class An extends e{}class Bn extends i{}class Ln extends C{}const Hn=ti([{name:"a_pos",components:2,type:"Int16"}],4),{members:Kn}=Hn;class Kr{constructor(t=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=t}prepareSegment(t,r,a,c){const p=this.segments[this.segments.length-1];return t>Kr.MAX_VERTEX_ARRAY_LENGTH&&Dt(`Max vertices per segment is ${Kr.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${Kr.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!p||p.vertexLength+t>Kr.MAX_VERTEX_ARRAY_LENGTH||p.sortKey!==c?this.createNewSegment(r,a,c):p}createNewSegment(t,r,a){const c={vertexOffset:t.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0,vaos:{}};return a!==void 0&&(c.sortKey=a),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(c),c}getOrCreateLatestSegment(t,r,a){return this.prepareSegment(0,t,r,a)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(const t of this.segments)for(const r in t.vaos)t.vaos[r].destroy()}static simpleSegment(t,r,a,c){return new Kr([{vertexOffset:t,primitiveOffset:r,vertexLength:a,primitiveLength:c,vaos:{},sortKey:0}])}}function Fn(n,t){return 256*(n=Bt(Math.floor(n),0,255))+Bt(Math.floor(t),0,255)}Kr.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,nr("SegmentVector",Kr);const si=ti([{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"}]);var fi,Ti,Ui,za={exports:{}},go={exports:{}},vo={exports:{}},fs=(function(){if(Ui)return za.exports;Ui=1;var n=(fi||(fi=1,go.exports=function(r,a){var c,p,_,v,b,S,I,L;for(p=r.length-(c=3&r.length),_=a,b=3432918353,S=461845907,L=0;L>>16)*b&65535)<<16)&4294967295)<<15|I>>>17))*S+(((I>>>16)*S&65535)<<16)&4294967295)<<13|_>>>19))+((5*(_>>>16)&65535)<<16)&4294967295))+((58964+(v>>>16)&65535)<<16);switch(I=0,c){case 3:I^=(255&r.charCodeAt(L+2))<<16;case 2:I^=(255&r.charCodeAt(L+1))<<8;case 1:_^=I=(65535&(I=(I=(65535&(I^=255&r.charCodeAt(L)))*b+(((I>>>16)*b&65535)<<16)&4294967295)<<15|I>>>17))*S+(((I>>>16)*S&65535)<<16)&4294967295}return _^=r.length,_=2246822507*(65535&(_^=_>>>16))+((2246822507*(_>>>16)&65535)<<16)&4294967295,_=3266489909*(65535&(_^=_>>>13))+((3266489909*(_>>>16)&65535)<<16)&4294967295,(_^=_>>>16)>>>0}),go.exports),t=(Ti||(Ti=1,vo.exports=function(r,a){for(var c,p=r.length,_=a^p,v=0;p>=4;)c=1540483477*(65535&(c=255&r.charCodeAt(v)|(255&r.charCodeAt(++v))<<8|(255&r.charCodeAt(++v))<<16|(255&r.charCodeAt(++v))<<24))+((1540483477*(c>>>16)&65535)<<16),_=1540483477*(65535&_)+((1540483477*(_>>>16)&65535)<<16)^(c=1540483477*(65535&(c^=c>>>24))+((1540483477*(c>>>16)&65535)<<16)),p-=4,++v;switch(p){case 3:_^=(255&r.charCodeAt(v+2))<<16;case 2:_^=(255&r.charCodeAt(v+1))<<8;case 1:_=1540483477*(65535&(_^=255&r.charCodeAt(v)))+((1540483477*(_>>>16)&65535)<<16)}return _=1540483477*(65535&(_^=_>>>13))+((1540483477*(_>>>16)&65535)<<16),(_^=_>>>15)>>>0}),vo.exports);return za.exports=n,za.exports.murmur3=n,za.exports.murmur2=t,za.exports})(),ms=N(fs);class qo{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(t,r,a,c){this.ids.push(Zo(t)),this.positions.push(r,a,c)}getPositions(t){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const r=Zo(t);let a=0,c=this.ids.length-1;for(;a>1;this.ids[_]>=r?c=_:a=_+1}const p=[];for(;this.ids[a]===r;)p.push({index:this.positions[3*a],start:this.positions[3*a+1],end:this.positions[3*a+2]}),a++;return p}static serialize(t,r){const a=new Float64Array(t.ids),c=new Uint32Array(t.positions);return ta(a,c,0,a.length-1),r&&r.push(a.buffer,c.buffer),{ids:a,positions:c}}static deserialize(t){const r=new qo;return r.ids=t.ids,r.positions=t.positions,r.indexed=!0,r}}function Zo(n){const t=+n;return!isNaN(t)&&t<=Number.MAX_SAFE_INTEGER?t:ms(String(n))}function ta(n,t,r,a){for(;r>1];let p=r-1,_=a+1;for(;;){do p++;while(n[p]c);if(p>=_)break;La(n,p,_),La(t,3*p,3*_),La(t,3*p+1,3*_+1),La(t,3*p+2,3*_+2)}_-r`u_${c}`)),this.type=a}setUniform(t,r,a){t.set(a.constantOr(this.value))}getBinding(t,r,a){return this.type==="color"?new mi(t,r):new yo(t,r)}}class _s{constructor(t,r){this.uniformNames=r.map((a=>`u_${a}`)),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(t,r){this.pixelRatioFrom=r.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=r.tlbr,this.patternTo=t.tlbr}setUniform(t,r,a,c){const p=c==="u_pattern_to"?this.patternTo:c==="u_pattern_from"?this.patternFrom:c==="u_pixel_ratio_to"?this.pixelRatioTo:c==="u_pixel_ratio_from"?this.pixelRatioFrom:null;p&&t.set(p)}getBinding(t,r,a){return a.substr(0,9)==="u_pattern"?new li(t,r):new yo(t,r)}}class to{constructor(t,r,a,c){this.expression=t,this.type=a,this.maxValue=0,this.paintVertexAttributes=r.map((p=>({name:`a_${p}`,type:"Float32",components:a==="color"?2:1,offset:0}))),this.paintVertexArray=new c}populatePaintArray(t,r,a,c,p){const _=this.paintVertexArray.length,v=this.expression.evaluate(new Un(0),r,{},c,[],p);this.paintVertexArray.resize(t),this._setPaintValue(_,t,v)}updatePaintArray(t,r,a,c){const p=this.expression.evaluate({zoom:0},a,c);this._setPaintValue(t,r,p)}_setPaintValue(t,r,a){if(this.type==="color"){const c=ci(a);for(let p=t;p`u_${v}_t`)),this.type=a,this.useIntegerZoom=c,this.zoom=p,this.maxValue=0,this.paintVertexAttributes=r.map((v=>({name:`a_${v}`,type:"Float32",components:a==="color"?4:2,offset:0}))),this.paintVertexArray=new _}populatePaintArray(t,r,a,c,p){const _=this.expression.evaluate(new Un(this.zoom),r,{},c,[],p),v=this.expression.evaluate(new Un(this.zoom+1),r,{},c,[],p),b=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(b,t,_,v)}updatePaintArray(t,r,a,c){const p=this.expression.evaluate({zoom:this.zoom},a,c),_=this.expression.evaluate({zoom:this.zoom+1},a,c);this._setPaintValue(t,r,p,_)}_setPaintValue(t,r,a,c){if(this.type==="color"){const p=ci(a),_=ci(c);for(let v=t;v`#define HAS_UNIFORM_${c}`)))}return t}getBinderAttributes(){const t=[];for(const r in this.binders){const a=this.binders[r];if(a instanceof to||a instanceof Da)for(let c=0;c!0){this.programConfigurations={};for(const c of t)this.programConfigurations[c.id]=new Td(c,r,a);this.needsUpload=!1,this._featureMap=new qo,this._bufferOffset=0}populatePaintArrays(t,r,a,c,p,_){for(const v in this.programConfigurations)this.programConfigurations[v].populatePaintArrays(t,r,c,p,_);r.id!==void 0&&this._featureMap.add(r.id,a,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0}updatePaintArrays(t,r,a,c){for(const p of a)this.needsUpload=this.programConfigurations[p.id].updatePaintArrays(t,this._featureMap,r,p,c)||this.needsUpload}get(t){return this.programConfigurations[t]}upload(t){if(this.needsUpload){for(const r in this.programConfigurations)this.programConfigurations[r].upload(t);this.needsUpload=!1}}destroy(){for(const t in this.programConfigurations)this.programConfigurations[t].destroy()}}function Cd(n,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":["gapwidth"],"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"]}[n]||[n.replace(`${t}-`,"").replace(/-/g,"_")]}function _u(n,t,r){const a={color:{source:Ks,composite:A},number:{source:d,composite:Ks}},c=(function(p){return{"line-pattern":{source:Nt,composite:Nt},"fill-pattern":{source:Nt,composite:Nt},"fill-extrusion-pattern":{source:Nt,composite:Nt}}[p]})(n);return c&&c[r]||a[t][r]}nr("ConstantBinder",Js),nr("CrossFadedConstantBinder",_s),nr("SourceExpressionBinder",to),nr("CrossFadedCompositeBinder",xo),nr("CompositeExpressionBinder",Da),nr("ProgramConfiguration",Td,{omit:["_buffers"]}),nr("ProgramConfigurationSet",la);const Wl=Math.pow(2,14)-1,Xl=-Wl-1;function bo(n){const t=oe/n.extent,r=n.loadGeometry();for(let a=0;a_.x+1||b<_.y||b>_.y+1)&&Dt("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return r}function ro(n,t){return{type:n.type,id:n.id,properties:n.properties,geometry:t?bo(n):[]}}const u_=-32768;function Y0(n,t,r,a,c){n.emplaceBack(u_+8*t+a,u_+8*r+c)}class $p{constructor(t){this.zoom=t.zoom,this.globalState=t.globalState,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((r=>r.id)),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Be,this.indexArray=new Bn,this.segments=new Kr,this.programConfigurations=new la(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((r=>r.isStateDependent())).map((r=>r.id))}populate(t,r,a){const c=this.layers[0],p=[];let _=null,v=!1,b=c.type==="heatmap";if(c.type==="circle"){const I=c;_=I.layout.get("circle-sort-key"),v=!_.isConstant(),b=b||I.paint.get("circle-pitch-alignment")==="map"}const S=b?r.subdivisionGranularity.circle:1;for(const{feature:I,id:L,index:F,sourceLayerIndex:V}of t){const U=this.layers[0]._featureFilter.needGeometry,W=ro(I,U);if(!this.layers[0]._featureFilter.filter(new Un(this.zoom,{globalState:this.globalState}),W,a))continue;const J=v?_.evaluate(W,{},a):void 0,le={id:L,properties:I.properties,type:I.type,sourceLayerIndex:V,index:F,geometry:U?W.geometry:bo(I),patterns:{},sortKey:J};p.push(le)}v&&p.sort(((I,L)=>I.sortKey-L.sortKey));for(const I of p){const{geometry:L,index:F,sourceLayerIndex:V}=I,U=t[F].feature;this.addFeature(I,L,F,a,S),r.featureIndex.insert(U,L,F,V,this.index)}}update(t,r,a){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,r,this.stateDependentLayers,a)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Kn),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,r,a,c,p=1){let _;switch(p){case 1:_=[0,7];break;case 3:_=[0,2,5,7];break;case 5:_=[0,1,3,4,6,7];break;case 7:_=[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 v=_.length;for(const b of r)for(const S of b){const I=S.x,L=S.y;if(I<0||I>=oe||L<0||L>=oe)continue;const F=this.segments.prepareSegment(v*v,this.layoutVertexArray,this.indexArray,t.sortKey),V=F.vertexLength;for(let U=0;U1){if(Gp(n,t))return!0;for(let a=0;a1?r:r.sub(t)._mult(c)._add(t))}function f_(n,t){let r,a,c,p=!1;for(let _=0;_t.y!=c.y>t.y&&t.x<(c.x-a.x)*(t.y-a.y)/(c.y-a.y)+a.x&&(p=!p)}return p}function Yl(n,t){let r=!1;for(let a=0,c=n.length-1;at.y!=_.y>t.y&&t.x<(_.x-p.x)*(t.y-p.y)/(_.y-p.y)+p.x&&(r=!r)}return r}function ey(n,t,r){const a=r[0],c=r[2];if(n.xc.x&&t.x>c.x||n.yc.y&&t.y>c.y)return!1;const p=zt(n,t,r[0]);return p!==zt(n,t,r[1])||p!==zt(n,t,r[2])||p!==zt(n,t,r[3])}function gu(n,t,r){const a=t.paint.get(n).value;return a.kind==="constant"?a.value:r.programConfigurations.get(t.id).getMaxValue(n)}function Sd(n){return Math.sqrt(n[0]*n[0]+n[1]*n[1])}function Pd(n,t,r,a,c){if(!t[0]&&!t[1])return n;const p=B.convert(t)._mult(c);r==="viewport"&&p._rotate(-a);const _=[];for(let v=0;vg_(Le,W,J,le)))})(S,p,v,b),V=L?I*_:I;for(const U of c)for(const W of U){const J=L?W:g_(W,p,v,b);let le=V;const Le=p.projectTileCoordinates(W.x,W.y,v,b).signedDistanceFromCamera;if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?le*=Le/p.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(le*=p.cameraToCenterDistance/Le),K0(F,J,le))return!0}return!1}}function g_(n,t,r,a){const c=t.projectTileCoordinates(n.x,n.y,r,a).point;return new B((.5*c.x+.5)*t.width,(.5*-c.y+.5)*t.height)}class v_ extends $p{}let y_;nr("HeatmapBucket",v_,{omit:["layers"]});var ny={get paint(){return y_=y_||new Zi({"heatmap-radius":new Or(xe.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Or(xe.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new yr(xe.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Ul(xe.paint_heatmap["heatmap-color"]),"heatmap-opacity":new yr(xe.paint_heatmap["heatmap-opacity"])})}};function Wp(n,{width:t,height:r},a,c){if(c){if(c instanceof Uint8ClampedArray)c=new Uint8Array(c.buffer);else if(c.length!==t*r*a)throw new RangeError(`mismatched image size. expected: ${c.length} but got: ${t*r*a}`)}else c=new Uint8Array(t*r*a);return n.width=t,n.height=r,n.data=c,n}function x_(n,{width:t,height:r},a){if(t===n.width&&r===n.height)return;const c=Wp({},{width:t,height:r},a);Xp(n,c,{x:0,y:0},{x:0,y:0},{width:Math.min(n.width,t),height:Math.min(n.height,r)},a),n.width=t,n.height=r,n.data=c.data}function Xp(n,t,r,a,c,p){if(c.width===0||c.height===0)return t;if(c.width>n.width||c.height>n.height||r.x>n.width-c.width||r.y>n.height-c.height)throw new RangeError("out of range source coordinates for image copy");if(c.width>t.width||c.height>t.height||a.x>t.width-c.width||a.y>t.height-c.height)throw new RangeError("out of range destination coordinates for image copy");const _=n.data,v=t.data;if(_===v)throw new Error("srcData equals dstData, so image is already copied");for(let b=0;b{t[n.evaluationKey]=b;const S=n.expression.evaluate(t);c.setPixel(_/4/r,v/4,S)};if(n.clips)for(let _=0,v=0;_this.max&&(this.max=L),L=this.dim+1||r<-1||r>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(r+1)*this.stride+(t+1)}unpack(t,r,a){return t*this.redFactor+r*this.greenFactor+a*this.blueFactor-this.baseShift}pack(t){return S_(t,this.getUnpackVector())}getPixels(){return new ca({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(t,r,a){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");let c=r*this.dim,p=r*this.dim+this.dim,_=a*this.dim,v=a*this.dim+this.dim;switch(r){case-1:c=p-1;break;case 1:p=c+1}switch(a){case-1:_=v-1;break;case 1:v=_+1}const b=-r*this.dim,S=-a*this.dim;for(let I=_;I0)for(let _=t;_=t;_-=a)p=A_(_/a|0,n[_],n[_+1],p);return p&&Kl(p,p.next)&&(wu(p),p=p.next),p}function Qs(n,t){if(!n)return n;t||(t=n);let r,a=n;do if(r=!1,a.steiner||!Kl(a,a.next)&&ii(a.prev,a,a.next)!==0)a=a.next;else{if(wu(a),a=t=a.prev,a===a.next)break;r=!0}while(r||a!==t);return t}function yu(n,t,r,a,c,p,_){if(!n)return;!_&&p&&(function(b,S,I,L){let F=b;do F.z===0&&(F.z=ef(F.x,F.y,S,I,L)),F.prevZ=F.prev,F.nextZ=F.next,F=F.next;while(F!==b);F.prevZ.nextZ=null,F.prevZ=null,(function(V){let U,W=1;do{let J,le=V;V=null;let Le=null;for(U=0;le;){U++;let ye=le,Ce=0;for(let lt=0;lt0||Xe>0&&ye;)Ce!==0&&(Xe===0||!ye||le.z<=ye.z)?(J=le,le=le.nextZ,Ce--):(J=ye,ye=ye.nextZ,Xe--),Le?Le.nextZ=J:V=J,J.prevZ=Le,Le=J;le=ye}Le.nextZ=null,W*=2}while(U>1)})(F)})(n,a,c,p);let v=n;for(;n.prev!==n.next;){const b=n.prev,S=n.next;if(p?dy(n,a,c,p):hy(n))t.push(b.i,n.i,S.i),wu(n),n=S.next,v=S.next;else if((n=S)===v){_?_===1?yu(n=py(Qs(n),t),t,r,a,c,p,2):_===2&&fy(n,t,r,a,c,p):yu(Qs(n),t,r,a,c,p,1);break}}}function hy(n){const t=n.prev,r=n,a=n.next;if(ii(t,r,a)>=0)return!1;const c=t.x,p=r.x,_=a.x,v=t.y,b=r.y,S=a.y,I=Math.min(c,p,_),L=Math.min(v,b,S),F=Math.max(c,p,_),V=Math.max(v,b,S);let U=a.next;for(;U!==t;){if(U.x>=I&&U.x<=F&&U.y>=L&&U.y<=V&&xu(c,v,p,b,_,S,U.x,U.y)&&ii(U.prev,U,U.next)>=0)return!1;U=U.next}return!0}function dy(n,t,r,a){const c=n.prev,p=n,_=n.next;if(ii(c,p,_)>=0)return!1;const v=c.x,b=p.x,S=_.x,I=c.y,L=p.y,F=_.y,V=Math.min(v,b,S),U=Math.min(I,L,F),W=Math.max(v,b,S),J=Math.max(I,L,F),le=ef(V,U,t,r,a),Le=ef(W,J,t,r,a);let ye=n.prevZ,Ce=n.nextZ;for(;ye&&ye.z>=le&&Ce&&Ce.z<=Le;){if(ye.x>=V&&ye.x<=W&&ye.y>=U&&ye.y<=J&&ye!==c&&ye!==_&&xu(v,I,b,L,S,F,ye.x,ye.y)&&ii(ye.prev,ye,ye.next)>=0||(ye=ye.prevZ,Ce.x>=V&&Ce.x<=W&&Ce.y>=U&&Ce.y<=J&&Ce!==c&&Ce!==_&&xu(v,I,b,L,S,F,Ce.x,Ce.y)&&ii(Ce.prev,Ce,Ce.next)>=0))return!1;Ce=Ce.nextZ}for(;ye&&ye.z>=le;){if(ye.x>=V&&ye.x<=W&&ye.y>=U&&ye.y<=J&&ye!==c&&ye!==_&&xu(v,I,b,L,S,F,ye.x,ye.y)&&ii(ye.prev,ye,ye.next)>=0)return!1;ye=ye.prevZ}for(;Ce&&Ce.z<=Le;){if(Ce.x>=V&&Ce.x<=W&&Ce.y>=U&&Ce.y<=J&&Ce!==c&&Ce!==_&&xu(v,I,b,L,S,F,Ce.x,Ce.y)&&ii(Ce.prev,Ce,Ce.next)>=0)return!1;Ce=Ce.nextZ}return!0}function py(n,t){let r=n;do{const a=r.prev,c=r.next.next;!Kl(a,c)&&M_(a,r,r.next,c)&&bu(a,c)&&bu(c,a)&&(t.push(a.i,r.i,c.i),wu(r),wu(r.next),r=n=c),r=r.next}while(r!==n);return Qs(r)}function fy(n,t,r,a,c,p){let _=n;do{let v=_.next.next;for(;v!==_.prev;){if(_.i!==v.i&&yy(_,v)){let b=k_(_,v);return _=Qs(_,_.next),b=Qs(b,b.next),yu(_,t,r,a,c,p,0),void yu(b,t,r,a,c,p,0)}v=v.next}_=_.next}while(_!==n)}function my(n,t){let r=n.x-t.x;return r===0&&(r=n.y-t.y,r===0)&&(r=(n.next.y-n.y)/(n.next.x-n.x)-(t.next.y-t.y)/(t.next.x-t.x)),r}function _y(n,t){const r=(function(c,p){let _=p;const v=c.x,b=c.y;let S,I=-1/0;if(Kl(c,_))return _;do{if(Kl(c,_.next))return _.next;if(b<=_.y&&b>=_.next.y&&_.next.y!==_.y){const W=_.x+(b-_.y)*(_.next.x-_.x)/(_.next.y-_.y);if(W<=v&&W>I&&(I=W,S=_.x<_.next.x?_:_.next,W===v))return S}_=_.next}while(_!==p);if(!S)return null;const L=S,F=S.x,V=S.y;let U=1/0;_=S;do{if(v>=_.x&&_.x>=F&&v!==_.x&&I_(bS.x||_.x===S.x&&gy(S,_)))&&(S=_,U=W)}_=_.next}while(_!==L);return S})(n,t);if(!r)return t;const a=k_(r,n);return Qs(a,a.next),Qs(r,r.next)}function gy(n,t){return ii(n.prev,n,t.prev)<0&&ii(t.next,n,n.next)<0}function ef(n,t,r,a,c){return(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n=(n-r)*c|0)|n<<8))|n<<4))|n<<2))|n<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-a)*c|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function vy(n){let t=n,r=n;do(t.x=(n-_)*(p-v)&&(n-_)*(a-v)>=(r-_)*(t-v)&&(r-_)*(p-v)>=(c-_)*(a-v)}function xu(n,t,r,a,c,p,_,v){return!(n===_&&t===v)&&I_(n,t,r,a,c,p,_,v)}function yy(n,t){return n.next.i!==t.i&&n.prev.i!==t.i&&!(function(r,a){let c=r;do{if(c.i!==r.i&&c.next.i!==r.i&&c.i!==a.i&&c.next.i!==a.i&&M_(c,c.next,r,a))return!0;c=c.next}while(c!==r);return!1})(n,t)&&(bu(n,t)&&bu(t,n)&&(function(r,a){let c=r,p=!1;const _=(r.x+a.x)/2,v=(r.y+a.y)/2;do c.y>v!=c.next.y>v&&c.next.y!==c.y&&_<(c.next.x-c.x)*(v-c.y)/(c.next.y-c.y)+c.x&&(p=!p),c=c.next;while(c!==r);return p})(n,t)&&(ii(n.prev,n,t.prev)||ii(n,t.prev,t))||Kl(n,t)&&ii(n.prev,n,n.next)>0&&ii(t.prev,t,t.next)>0)}function ii(n,t,r){return(t.y-n.y)*(r.x-t.x)-(t.x-n.x)*(r.y-t.y)}function Kl(n,t){return n.x===t.x&&n.y===t.y}function M_(n,t,r,a){const c=Md(ii(n,t,r)),p=Md(ii(n,t,a)),_=Md(ii(r,a,n)),v=Md(ii(r,a,t));return c!==p&&_!==v||!(c!==0||!Id(n,r,t))||!(p!==0||!Id(n,a,t))||!(_!==0||!Id(r,n,a))||!(v!==0||!Id(r,t,a))}function Id(n,t,r){return t.x<=Math.max(n.x,r.x)&&t.x>=Math.min(n.x,r.x)&&t.y<=Math.max(n.y,r.y)&&t.y>=Math.min(n.y,r.y)}function Md(n){return n>0?1:n<0?-1:0}function bu(n,t){return ii(n.prev,n,n.next)<0?ii(n,t,n.next)>=0&&ii(n,n.prev,t)>=0:ii(n,t,n.prev)<0||ii(n,n.next,t)<0}function k_(n,t){const r=tf(n.i,n.x,n.y),a=tf(t.i,t.x,t.y),c=n.next,p=t.prev;return n.next=t,t.prev=n,r.next=c,c.prev=r,a.next=r,r.prev=a,p.next=a,a.prev=p,a}function A_(n,t,r,a){const c=tf(n,t,r);return a?(c.next=a.next,c.prev=a,a.next.prev=c,a.next=c):(c.prev=c,c.next=c),c}function wu(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function tf(n,t,r){return{i:n,x:t,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class Jl{constructor(t,r){if(r>t)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=t,this._minGranularity=r}getGranularityForZoomLevel(t){return Math.max(Math.floor(this._baseZoomGranularity/(1<32767||r>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");const a=0|Math.round(t),c=0|Math.round(r),p=this._getKey(a,c);if(this._vertexDictionary.has(p))return this._vertexDictionary.get(p);const _=this._vertexBuffer.length/2;return this._vertexDictionary.set(p,_),this._vertexBuffer.push(a,c),_}_subdivideTrianglesScanline(t){if(this._granularity<2)return(function(c,p){const _=[];for(let v=0;v0?(_.push(b),_.push(I),_.push(S)):(_.push(b),_.push(S),_.push(I))}return _})(this._vertexBuffer,t);const r=[],a=t.length;for(let c=0;c=1||Xe<=0)||le&&(Sp)){L>=c&&L<=p&&_.push(a[(v+1)%3]);continue}!le&&Ce>0&&_.push(this._vertexToIndex(b+U*Ce,S+W*Ce));const lt=b+U*Math.max(Ce,0),Pt=b+U*Math.min(Xe,1);J||this._generateIntraEdgeVertices(_,b,S,I,L,lt,Pt),!le&&Xe<1&&_.push(this._vertexToIndex(b+U*Xe,S+W*Xe)),(le||L>=c&&L<=p)&&_.push(a[(v+1)%3]),!le&&(L<=c||L>=p)&&this._generateInterEdgeVertices(_,b,S,I,L,F,V,Pt,c,p)}return _}_generateIntraEdgeVertices(t,r,a,c,p,_,v){const b=c-r,S=p-a,I=S===0,L=I?Math.min(r,c):Math.min(_,v),F=I?Math.max(r,c):Math.max(_,v),V=Math.floor(L/this._granularityCellSize)+1,U=Math.ceil(F/this._granularityCellSize)-1;if(I?r=V;W--){const J=W*this._granularityCellSize;t.push(this._vertexToIndex(J,a+S*(J-r)/b))}}_generateInterEdgeVertices(t,r,a,c,p,_,v,b,S,I){const L=p-a,F=_-c,V=v-p,U=(S-p)/V,W=(I-p)/V,J=Math.min(U,W),le=Math.max(U,W),Le=c+F*J;let ye=Math.floor(Math.min(Le,b)/this._granularityCellSize)+1,Ce=Math.ceil(Math.max(Le,b)/this._granularityCellSize)-1,Xe=b=1||le<=0){const Xt=a-v,Vt=_+(r-_)*Math.min((S-v)/Xt,(I-v)/Xt);ye=Math.floor(Math.min(Vt,b)/this._granularityCellSize)+1,Ce=Math.ceil(Math.max(Vt,b)/this._granularityCellSize)-1,Xe=b0?I:S;if(Xe)for(let Xt=ye;Xt<=Ce;Xt++)t.push(this._vertexToIndex(Xt*this._granularityCellSize,Pt));else for(let Xt=Ce;Xt>=ye;Xt--)t.push(this._vertexToIndex(Xt*this._granularityCellSize,Pt))}_generateOutline(t){const r=[];for(const a of t){const c=el(a,this._granularity,!0),p=this._pointArrayToIndices(c),_=[];for(let v=1;vp!=(_===Ql)?(t.push(r),t.push(a),t.push(this._vertexToIndex(c,_)),t.push(a),t.push(this._vertexToIndex(p,_)),t.push(this._vertexToIndex(c,_))):(t.push(a),t.push(r),t.push(this._vertexToIndex(c,_)),t.push(this._vertexToIndex(p,_)),t.push(a),t.push(this._vertexToIndex(c,_)))}_fillPoles(t,r,a){const c=this._vertexBuffer,p=oe,_=t.length;for(let v=2;v<_;v+=3){const b=t[v-2],S=t[v-1],I=t[v],L=c[2*b],F=c[2*b+1],V=c[2*S],U=c[2*S+1],W=c[2*I],J=c[2*I+1];r&&(F===0&&U===0&&this._generatePoleQuad(t,b,S,L,V,Ql),U===0&&J===0&&this._generatePoleQuad(t,S,I,V,W,Ql),J===0&&F===0&&this._generatePoleQuad(t,I,b,W,L,Ql)),a&&(F===p&&U===p&&this._generatePoleQuad(t,b,S,L,V,Tu),U===p&&J===p&&this._generatePoleQuad(t,S,I,V,W,Tu),J===p&&F===p&&this._generatePoleQuad(t,I,b,W,L,Tu))}}_initializeVertices(t){for(let r=0;r80*L){J=S[0],le=S[1];let ye=J,Ce=le;for(let Xe=L;Xeye&&(ye=lt),Pt>Ce&&(Ce=Pt)}Le=Math.max(ye-J,Ce-le),Le=Le!==0?32767/Le:0}return yu(U,W,L,J,le,Le,0),W})(a,c),b=this._convertIndices(a,v);p=this._subdivideTrianglesScanline(b)}catch(v){console.error(v)}let _=[];return r&&(_=this._generateOutline(t)),this._ensureNoPoleVertices(),this._handlePoles(p),{verticesFlattened:this._vertexBuffer,indicesTriangles:p,indicesLineList:_}}_convertIndices(t,r){const a=[];for(let c=0;c0?(Math.floor(Pt/_)+1)*_:(Math.ceil(Pt/_)-1)*_,wr=Ce>0?(Math.floor(Xt/_)+1)*_:(Math.ceil(Xt/_)-1)*_,$t=Math.abs(Pt-Gt),Ht=Math.abs(Xt-wr),gt=Math.abs(Pt-W),jr=Math.abs(Xt-J),Gr=le?$t/Xe:Number.POSITIVE_INFINITY,Ir=Le?Ht/lt:Number.POSITIVE_INFINITY;if((gt<=$t||!le)&&(jr<=Ht||!Le))break;if(Gr=0?_-1:p-1,S=(v+1)%p,I=n[2*t[b]],L=n[2*t[S]],F=n[2*t[_]],V=n[2*t[_]+1],U=n[2*t[v]+1];let W=!1;if(IL)W=!1;else{const J=U-V,le=-(n[2*t[v]]-F),Le=V((L-F)*J+(n[2*t[S]+1]-V)*le)*Le&&(W=!0)}if(W){const J=t[b],le=t[_],Le=t[v];J!==le&&J!==Le&&le!==Le&&r.push(Le,le,J),_--,_<0&&(_=p-1)}else{const J=t[S],le=t[_],Le=t[v];J!==le&&J!==Le&&le!==Le&&r.push(Le,le,J),v++,v>=p&&(v=0)}if(b===S)break}}function z_(n,t,r,a,c,p,_,v,b){const S=c.length/2,I=_&&v&&b;if(SKr.MAX_VERTEX_ARRAY_LENGTH&&(Ce=L.createNewSegment(F,V),ye=Le.count,Gt=!0,wr=!0,$t=!0,Xe=0);const Ht=Cu(le,U,J,Le,Pt,Gt,Ce),gt=Cu(le,U,J,Le,Xt,wr,Ce),jr=Cu(le,U,J,Le,Vt,$t,Ce);V.emplaceBack(Xe+Ht-ye,Xe+gt-ye,Xe+jr-ye),Ce.primitiveLength++}})(t,r,a,c,p,n),I&&(function(L,F,V,U,W,J){const le=[];for(let lt=0;ltKr.MAX_VERTEX_ARRAY_LENGTH&&(Ce=L.createNewSegment(F,V),ye=Le.count,wr=!0,$t=!0,Xe=0);const Ht=Cu(le,U,J,Le,Vt,wr,Ce),gt=Cu(le,U,J,Le,Gt,$t,Ce);V.emplaceBack(Xe+Ht-ye,Xe+gt-ye),Ce.primitiveLength++}}})(_,r,v,c,b,n),t.forceNewSegmentOnNextPrepare(),_==null||_.forceNewSegmentOnNextPrepare()}function Cu(n,t,r,a,c,p,_){if(p){const v=a.count;return r(t[2*c],t[2*c+1]),n[c]=a.count,a.count++,_.vertexLength++,v}return n[c]}class rf{constructor(t){this.zoom=t.zoom,this.globalState=t.globalState,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((r=>r.id)),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Qe,this.indexArray=new Bn,this.indexArray2=new Ln,this.programConfigurations=new la(t.layers,t.zoom),this.segments=new Kr,this.segments2=new Kr,this.stateDependentLayerIds=this.layers.filter((r=>r.isStateDependent())).map((r=>r.id))}populate(t,r,a){this.hasPattern=Jp("fill",this.layers,r);const c=this.layers[0].layout.get("fill-sort-key"),p=!c.isConstant(),_=[];for(const{feature:v,id:b,index:S,sourceLayerIndex:I}of t){const L=this.layers[0]._featureFilter.needGeometry,F=ro(v,L);if(!this.layers[0]._featureFilter.filter(new Un(this.zoom,{globalState:this.globalState}),F,a))continue;const V=p?c.evaluate(F,{},a,r.availableImages):void 0,U={id:b,properties:v.properties,type:v.type,sourceLayerIndex:I,index:S,geometry:L?F.geometry:bo(v),patterns:{},sortKey:V};_.push(U)}p&&_.sort(((v,b)=>v.sortKey-b.sortKey));for(const v of _){const{geometry:b,index:S,sourceLayerIndex:I}=v;if(this.hasPattern){const L=Qp("fill",this.layers,v,this.zoom,r);this.patternFeatures.push(L)}else this.addFeature(v,b,S,a,{},r.subdivisionGranularity);r.featureIndex.insert(t[S].feature,b,S,I,this.index)}}update(t,r,a){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,r,this.stateDependentLayers,a)}addFeatures(t,r,a){for(const c of this.patternFeatures)this.addFeature(c,c.geometry,c.index,r,a,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,uy),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,r,a,c,p,_){for(const v of Fs(r,500)){const b=E_(v,c,_.fill.getGranularityForZoomLevel(c.z)),S=this.layoutVertexArray;z_(((I,L)=>{S.emplaceBack(I,L)}),this.segments,this.layoutVertexArray,this.indexArray,b.verticesFlattened,b.indicesTriangles,this.segments2,this.indexArray2,b.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,a,p,c)}}let L_,D_;nr("FillBucket",rf,{omit:["layers","patternFeatures"]});var wy={get paint(){return D_=D_||new Zi({"fill-antialias":new yr(xe.paint_fill["fill-antialias"]),"fill-opacity":new Or(xe.paint_fill["fill-opacity"]),"fill-color":new Or(xe.paint_fill["fill-color"]),"fill-outline-color":new Or(xe.paint_fill["fill-outline-color"]),"fill-translate":new yr(xe.paint_fill["fill-translate"]),"fill-translate-anchor":new yr(xe.paint_fill["fill-translate-anchor"]),"fill-pattern":new Zl(xe.paint_fill["fill-pattern"])})},get layout(){return L_=L_||new Zi({"fill-sort-key":new Or(xe.layout_fill["fill-sort-key"])})}};class Ty extends xa{constructor(t){super(t,wy)}recalculate(t,r){super.recalculate(t,r);const a=this.paint._values["fill-outline-color"];a.value.kind==="constant"&&a.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(t){return new rf(t)}queryRadius(){return Sd(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:t,geometry:r,transform:a,pixelsToTileUnits:c}){return d_(Pd(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-a.bearingInRadians,c),r)}isTileClipped(){return!0}}const Cy=ti([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Sy=ti([{name:"a_centroid",components:2,type:"Int16"}],4),{members:Py}=Cy;class ec{constructor(t,r,a,c,p){this.properties={},this.extent=a,this.type=0,this.id=void 0,this._pbf=t,this._geometry=-1,this._keys=c,this._values=p,t.readFields(Iy,this,r)}loadGeometry(){const t=this._pbf;t.pos=this._geometry;const r=t.readVarint()+t.pos,a=[];let c,p=1,_=0,v=0,b=0;for(;t.pos>3}if(_--,p===1||p===2)v+=t.readSVarint(),b+=t.readSVarint(),p===1&&(c&&a.push(c),c=[]),c&&c.push(new B(v,b));else{if(p!==7)throw new Error(`unknown command ${p}`);c&&c.push(c[0].clone())}}return c&&a.push(c),a}bbox(){const t=this._pbf;t.pos=this._geometry;const r=t.readVarint()+t.pos;let a=1,c=0,p=0,_=0,v=1/0,b=-1/0,S=1/0,I=-1/0;for(;t.pos>3}if(c--,a===1||a===2)p+=t.readSVarint(),_+=t.readSVarint(),pb&&(b=p),_I&&(I=_);else if(a!==7)throw new Error(`unknown command ${a}`)}return[v,S,b,I]}toGeoJSON(t,r,a){const c=this.extent*Math.pow(2,a),p=this.extent*t,_=this.extent*r,v=this.loadGeometry();function b(F){return[360*(F.x+p)/c-180,360/Math.PI*Math.atan(Math.exp((1-2*(F.y+_)/c)*Math.PI))-90]}function S(F){return F.map(b)}let I;if(this.type===1){const F=[];for(const U of v)F.push(U[0]);const V=S(F);I=F.length===1?{type:"Point",coordinates:V[0]}:{type:"MultiPoint",coordinates:V}}else if(this.type===2){const F=v.map(S);I=F.length===1?{type:"LineString",coordinates:F[0]}:{type:"MultiLineString",coordinates:F}}else{if(this.type!==3)throw new Error("unknown feature type");{const F=(function(U){const W=U.length;if(W<=1)return[U];const J=[];let le,Le;for(let ye=0;ye=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];const r=this._pbf.readVarint()+this._pbf.pos;return new ec(this._pbf,r,this.extent,this._keys,this._values)}}function ky(n,t,r){n===15?t.version=r.readVarint():n===1?t.name=r.readString():n===5?t.extent=r.readVarint():n===2?t._features.push(r.pos):n===3?t._keys.push(r.readString()):n===4&&t._values.push((function(a){let c=null;const p=a.readVarint()+a.pos;for(;a.pos>3;c=_===1?a.readString():_===2?a.readFloat():_===3?a.readDouble():_===4?a.readVarint64():_===5?a.readVarint():_===6?a.readSVarint():_===7?a.readBoolean():null}if(c==null)throw new Error("unknown feature value");return c})(r))}class B_{constructor(t,r){this.layers=t.readFields(Ay,{},r)}}function Ay(n,t,r){if(n===3){const a=new R_(r,r.readVarint()+r.pos);a.length&&(t[a.name]=a)}}const nf=Math.pow(2,13);function Su(n,t,r,a,c,p,_,v){n.emplaceBack(t,r,2*Math.floor(a*nf)+_,c*nf*2,p*nf*2,Math.round(v))}class af{constructor(t){this.zoom=t.zoom,this.globalState=t.globalState,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((r=>r.id)),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Ue,this.centroidVertexArray=new pe,this.indexArray=new Bn,this.programConfigurations=new la(t.layers,t.zoom),this.segments=new Kr,this.stateDependentLayerIds=this.layers.filter((r=>r.isStateDependent())).map((r=>r.id))}populate(t,r,a){this.features=[],this.hasPattern=Jp("fill-extrusion",this.layers,r);for(const{feature:c,id:p,index:_,sourceLayerIndex:v}of t){const b=this.layers[0]._featureFilter.needGeometry,S=ro(c,b);if(!this.layers[0]._featureFilter.filter(new Un(this.zoom,{globalState:this.globalState}),S,a))continue;const I={id:p,sourceLayerIndex:v,index:_,geometry:b?S.geometry:bo(c),properties:c.properties,type:c.type,patterns:{}};this.hasPattern?this.features.push(Qp("fill-extrusion",this.layers,I,this.zoom,r)):this.addFeature(I,I.geometry,_,a,{},r.subdivisionGranularity),r.featureIndex.insert(c,I.geometry,_,v,this.index,!0)}}addFeatures(t,r,a){for(const c of this.features){const{geometry:p}=c;this.addFeature(c,p,c.index,r,a,t.subdivisionGranularity)}}update(t,r,a){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,r,this.stateDependentLayers,a)}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,Py),this.centroidVertexBuffer=t.createVertexBuffer(this.centroidVertexArray,Sy.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,r,a,c,p,_){for(const v of Fs(r,500)){const b={x:0,y:0,sampleCount:0},S=this.layoutVertexArray.length;this.processPolygon(b,c,t,v,_);const I=this.layoutVertexArray.length-S,L=Math.floor(b.x/b.sampleCount),F=Math.floor(b.y/b.sampleCount);for(let V=0;V{Su(I,L,F,0,0,1,1,0)}),this.segments,this.layoutVertexArray,this.indexArray,S.verticesFlattened,S.indicesTriangles)}_generateSideFaces(t,r){let a=0;for(let c=1;cKr.MAX_VERTEX_ARRAY_LENGTH&&(r.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const v=p.sub(_)._perp()._unit(),b=_.dist(p);a+b>32768&&(a=0),Su(this.layoutVertexArray,p.x,p.y,v.x,v.y,0,0,a),Su(this.layoutVertexArray,p.x,p.y,v.x,v.y,0,1,a),a+=b,Su(this.layoutVertexArray,_.x,_.y,v.x,v.y,0,0,a),Su(this.layoutVertexArray,_.x,_.y,v.x,v.y,0,1,a);const S=r.segment.vertexLength;this.indexArray.emplaceBack(S,S+2,S+1),this.indexArray.emplaceBack(S+1,S+2,S+3),r.segment.vertexLength+=4,r.segment.primitiveLength+=2}}}function Ey(n,t){for(let r=0;roe)||n.y===t.y&&(n.y<0||n.y>oe)}function F_(n){return n.every((t=>t.x<0))||n.every((t=>t.x>oe))||n.every((t=>t.y<0))||n.every((t=>t.y>oe))}let O_;nr("FillExtrusionBucket",af,{omit:["layers","features"]});var Ly={get paint(){return O_=O_||new Zi({"fill-extrusion-opacity":new yr(xe["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Or(xe["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new yr(xe["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new yr(xe["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Zl(xe["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Or(xe["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Or(xe["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new yr(xe["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Dy extends xa{constructor(t){super(t,Ly)}createBucket(t){return new af(t)}queryRadius(){return Sd(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:t,feature:r,featureState:a,geometry:c,transform:p,pixelsToTileUnits:_,pixelPosMatrix:v}){const b=Pd(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-p.bearingInRadians,_),S=this.paint.get("fill-extrusion-height").evaluate(r,a),I=this.paint.get("fill-extrusion-base").evaluate(r,a),L=(function(V,U){const W=[];for(const J of V){const le=[J.x,J.y,0,1];ke(le,le,U),W.push(new B(le[0]/le[3],le[1]/le[3]))}return W})(b,v),F=(function(V,U,W,J){const le=[],Le=[],ye=J[8]*U,Ce=J[9]*U,Xe=J[10]*U,lt=J[11]*U,Pt=J[8]*W,Xt=J[9]*W,Vt=J[10]*W,Gt=J[11]*W;for(const wr of V){const $t=[],Ht=[];for(const gt of wr){const jr=gt.x,Gr=gt.y,Ir=J[0]*jr+J[4]*Gr+J[12],_r=J[1]*jr+J[5]*Gr+J[13],hn=J[2]*jr+J[6]*Gr+J[14],Jn=J[3]*jr+J[7]*Gr+J[15],_i=hn+Xe,Vi=Jn+lt,Ba=Ir+Pt,ua=_r+Xt,Ri=hn+Vt,Wn=Jn+Gt,Si=new B((Ir+ye)/Vi,(_r+Ce)/Vi);Si.z=_i/Vi,$t.push(Si);const Bi=new B(Ba/Wn,ua/Wn);Bi.z=Ri/Wn,Ht.push(Bi)}le.push($t),Le.push(Ht)}return[le,Le]})(c,I,S,v);return(function(V,U,W){let J=1/0;d_(W,U)&&(J=N_(W,U[0]));for(let le=0;ler.id)),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach((r=>{this.gradients[r.id]={}})),this.layoutVertexArray=new We,this.layoutVertexArray2=new Je,this.indexArray=new Bn,this.programConfigurations=new la(t.layers,t.zoom),this.segments=new Kr,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((r=>r.isStateDependent())).map((r=>r.id))}populate(t,r,a){this.hasPattern=Jp("line",this.layers,r);const c=this.layers[0].layout.get("line-sort-key"),p=!c.isConstant(),_=[];for(const{feature:v,id:b,index:S,sourceLayerIndex:I}of t){const L=this.layers[0]._featureFilter.needGeometry,F=ro(v,L);if(!this.layers[0]._featureFilter.filter(new Un(this.zoom,{globalState:this.globalState}),F,a))continue;const V=p?c.evaluate(F,{},a):void 0,U={id:b,properties:v.properties,type:v.type,sourceLayerIndex:I,index:S,geometry:L?F.geometry:bo(v),patterns:{},sortKey:V};_.push(U)}p&&_.sort(((v,b)=>v.sortKey-b.sortKey));for(const v of _){const{geometry:b,index:S,sourceLayerIndex:I}=v;if(this.hasPattern){const L=Qp("line",this.layers,v,this.zoom,r);this.patternFeatures.push(L)}else this.addFeature(v,b,S,a,{},r.subdivisionGranularity);r.featureIndex.insert(t[S].feature,b,S,I,this.index)}}update(t,r,a){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,r,this.stateDependentLayers,a)}addFeatures(t,r,a){for(const c of this.patternFeatures)this.addFeature(c,c.geometry,c.index,r,a,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,Oy)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,By),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.prototype.hasOwnProperty.call(t.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(t.properties,"mapbox_clip_end"))return{start:+t.properties.mapbox_clip_start,end:+t.properties.mapbox_clip_end}}addFeature(t,r,a,c,p,_){const v=this.layers[0].layout,b=v.get("line-join").evaluate(t,{}),S=v.get("line-cap"),I=v.get("line-miter-limit"),L=v.get("line-round-limit");this.lineClips=this.lineFeatureClips(t);for(const F of r)this.addLine(F,t,b,S,I,L,c,_);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,a,p,c)}addLine(t,r,a,c,p,_,v,b){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,t=el(t,v?b.line.getGranularityForZoomLevel(v.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let ye=0;ye=2&&t[I-1].equals(t[I-2]);)I--;let L=0;for(;L0;if(Vt&&ye>L){const Ht=U.dist(W);if(Ht>2*F){const gt=U.sub(U.sub(W)._mult(F/Ht)._round());this.updateDistance(W,gt),this.addCurrentVertex(gt,le,0,0,V),W=gt}}const wr=W&&J;let $t=wr?a:S?"butt":c;if(wr&&$t==="round"&&(Pt<_?$t="miter":Pt<=2&&($t="fakeround")),$t==="miter"&&Pt>p&&($t="bevel"),$t==="bevel"&&(Pt>2&&($t="flipbevel"),Pt100)Ce=Le.mult(-1);else{const Ht=Pt*le.add(Le).mag()/le.sub(Le).mag();Ce._perp()._mult(Ht*(Gt?-1:1))}this.addCurrentVertex(U,Ce,0,0,V),this.addCurrentVertex(U,Ce.mult(-1),0,0,V)}else if($t==="bevel"||$t==="fakeround"){const Ht=-Math.sqrt(Pt*Pt-1),gt=Gt?Ht:0,jr=Gt?0:Ht;if(W&&this.addCurrentVertex(U,le,gt,jr,V),$t==="fakeround"){const Gr=Math.round(180*Xt/Math.PI/20);for(let Ir=1;Ir2*F){const gt=U.add(J.sub(U)._mult(F/Ht)._round());this.updateDistance(U,gt),this.addCurrentVertex(gt,Le,0,0,V),U=gt}}}}addCurrentVertex(t,r,a,c,p,_=!1){const v=r.y*c-r.x,b=-r.y-r.x*c;this.addHalfVertex(t,r.x+r.y*a,r.y-r.x*a,_,!1,a,p),this.addHalfVertex(t,v,b,_,!0,-c,p),this.distance>j_/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(t,r,a,c,p,_))}addHalfVertex({x:t,y:r},a,c,p,_,v,b){const S=.5*(this.lineClips?this.scaledDistance*(j_-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((t<<1)+(p?1:0),(r<<1)+(_?1:0),Math.round(63*a)+128,Math.round(63*c)+128,1+(v===0?0:v<0?-1:1)|(63&S)<<2,S>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const I=b.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,I,this.e2),b.primitiveLength++),_?this.e2=I:this.e1=I}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(t,r){this.distance+=t.dist(r),this.updateScaledDistance()}}let V_,q_;nr("LineBucket",of,{omit:["layers","patternFeatures"]});var Z_={get paint(){return q_=q_||new Zi({"line-opacity":new Or(xe.paint_line["line-opacity"]),"line-color":new Or(xe.paint_line["line-color"]),"line-translate":new yr(xe.paint_line["line-translate"]),"line-translate-anchor":new yr(xe.paint_line["line-translate-anchor"]),"line-width":new Or(xe.paint_line["line-width"]),"line-gap-width":new Or(xe.paint_line["line-gap-width"]),"line-offset":new Or(xe.paint_line["line-offset"]),"line-blur":new Or(xe.paint_line["line-blur"]),"line-dasharray":new _o(xe.paint_line["line-dasharray"]),"line-pattern":new Zl(xe.paint_line["line-pattern"]),"line-gradient":new Ul(xe.paint_line["line-gradient"])})},get layout(){return V_=V_||new Zi({"line-cap":new yr(xe.layout_line["line-cap"]),"line-join":new Or(xe.layout_line["line-join"]),"line-miter-limit":new yr(xe.layout_line["line-miter-limit"]),"line-round-limit":new yr(xe.layout_line["line-round-limit"]),"line-sort-key":new Or(xe.layout_line["line-sort-key"])})}};class jy extends Or{possiblyEvaluate(t,r){return r=new Un(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),super.possiblyEvaluate(t,r)}evaluate(t,r,a,c){return r=dt({},r,{zoom:Math.floor(r.zoom)}),super.evaluate(t,r,a,c)}}let Ad;class Vy extends xa{constructor(t){super(t,Z_),this.gradientVersion=0,Ad||(Ad=new jy(Z_.paint.properties["line-width"].specification),Ad.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(t){if(t==="line-gradient"){const r=this.gradientExpression();this.stepInterpolant=!!(function(a){return a._styleExpression!==void 0})(r)&&r._styleExpression.expression instanceof ei,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(t,r){super.recalculate(t,r),this.paint._values["line-floorwidth"]=Ad.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}createBucket(t){return new of(t)}queryRadius(t){const r=t,a=U_(gu("line-width",this,r),gu("line-gap-width",this,r)),c=gu("line-offset",this,r);return a/2+Math.abs(c)+Sd(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:t,feature:r,featureState:a,geometry:c,transform:p,pixelsToTileUnits:_}){const v=Pd(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-p.bearingInRadians,_),b=_/2*U_(this.paint.get("line-width").evaluate(r,a),this.paint.get("line-gap-width").evaluate(r,a)),S=this.paint.get("line-offset").evaluate(r,a);return S&&(c=(function(I,L){const F=[];for(let V=0;V=3){for(let W=0;W0?t+2*n:n}const qy=ti([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Zy=ti([{name:"a_projected_pos",components:3,type:"Float32"}],4);ti([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const Uy=ti([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ti([{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 $_=ti([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),$y=ti([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Gy(n,t,r){return n.sections.forEach((a=>{a.text=(function(c,p,_){const v=p.layout.get("text-transform").evaluate(_,{});return v==="uppercase"?c=c.toLocaleUpperCase():v==="lowercase"&&(c=c.toLocaleLowerCase()),Ea.applyArabicShaping&&(c=Ea.applyArabicShaping(c)),c})(a.text,t,r)})),n}ti([{name:"triangle",components:3,type:"Uint16"}]),ti([{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"}]),ti([{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"}]),ti([{type:"Float32",name:"offsetX"}]),ti([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ti([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const Iu={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var Ci=24;const sf=4294967296,G_=1/sf,H_=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");class lf{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,r,a=this.length){for(;this.pos>3,_=this.pos;this.type=7&c,t(p,r,this),this.pos===_&&this.skip(c)}return r}readMessage(t,r){return this.readFields(t,r,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)*sf;return this.pos+=8,t}readSFixed64(){const t=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*sf;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 r=this.buf;let a,c;return c=r[this.pos++],a=127&c,c<128?a:(c=r[this.pos++],a|=(127&c)<<7,c<128?a:(c=r[this.pos++],a|=(127&c)<<14,c<128?a:(c=r[this.pos++],a|=(127&c)<<21,c<128?a:(c=r[this.pos],a|=(15&c)<<28,(function(p,_,v){const b=v.buf;let S,I;if(I=b[v.pos++],S=(112&I)>>4,I<128||(I=b[v.pos++],S|=(127&I)<<3,I<128)||(I=b[v.pos++],S|=(127&I)<<10,I<128)||(I=b[v.pos++],S|=(127&I)<<17,I<128)||(I=b[v.pos++],S|=(127&I)<<24,I<128)||(I=b[v.pos++],S|=(1&I)<<31,I<128))return tc(p,S,_);throw new Error("Expected varint not more than 10 bytes")})(a,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,r=this.pos;return this.pos=t,t-r>=12&&H_?H_.decode(this.buf.subarray(r,t)):(function(a,c,p){let _="",v=c;for(;v239?4:b>223?3:b>191?2:1;if(v+V>p)break;V===1?b<128&&(F=b):V===2?(S=a[v+1],(192&S)==128&&(F=(31&b)<<6|63&S,F<=127&&(F=null))):V===3?(S=a[v+1],I=a[v+2],(192&S)==128&&(192&I)==128&&(F=(15&b)<<12|(63&S)<<6|63&I,(F<=2047||F>=55296&&F<=57343)&&(F=null))):V===4&&(S=a[v+1],I=a[v+2],L=a[v+3],(192&S)==128&&(192&I)==128&&(192&L)==128&&(F=(15&b)<<18|(63&S)<<12|(63&I)<<6|63&L,(F<=65535||F>=1114112)&&(F=null))),F===null?(F=65533,V=1):F>65535&&(F-=65536,_+=String.fromCharCode(F>>>10&1023|55296),F=56320|1023&F),_+=String.fromCharCode(F),v+=V}return _})(this.buf,r,t)}readBytes(){const t=this.readVarint()+this.pos,r=this.buf.subarray(this.pos,t);return this.pos=t,r}readPackedVarint(t=[],r){const a=this.readPackedEnd();for(;this.pos127;);else if(r===2)this.pos=this.readVarint()+this.pos;else if(r===5)this.pos+=4;else{if(r!==1)throw new Error(`Unimplemented type: ${r}`);this.pos+=8}}writeTag(t,r){this.writeVarint(t<<3|r)}realloc(t){let r=this.length||16;for(;r268435455||t<0?(function(r,a){let c,p;if(r>=0?(c=r%4294967296|0,p=r/4294967296|0):(c=~(-r%4294967296),p=~(-r/4294967296),4294967295^c?c=c+1|0:(c=0,p=p+1|0)),r>=18446744073709552e3||r<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");a.realloc(10),(function(_,v,b){b.buf[b.pos++]=127&_|128,_>>>=7,b.buf[b.pos++]=127&_|128,_>>>=7,b.buf[b.pos++]=127&_|128,_>>>=7,b.buf[b.pos++]=127&_|128,b.buf[b.pos]=127&(_>>>=7)})(c,0,a),(function(_,v){const b=(7&_)<<4;v.buf[v.pos++]|=b|((_>>>=3)?128:0),_&&(v.buf[v.pos++]=127&_|((_>>>=7)?128:0),_&&(v.buf[v.pos++]=127&_|((_>>>=7)?128:0),_&&(v.buf[v.pos++]=127&_|((_>>>=7)?128:0),_&&(v.buf[v.pos++]=127&_|((_>>>=7)?128:0),_&&(v.buf[v.pos++]=127&_)))))})(p,a)})(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 r=this.pos;this.pos=(function(c,p,_){for(let v,b,S=0;S55295&&v<57344){if(!b){v>56319||S+1===p.length?(c[_++]=239,c[_++]=191,c[_++]=189):b=v;continue}if(v<56320){c[_++]=239,c[_++]=191,c[_++]=189,b=v;continue}v=b-55296<<10|v-56320|65536,b=null}else b&&(c[_++]=239,c[_++]=191,c[_++]=189,b=null);v<128?c[_++]=v:(v<2048?c[_++]=v>>6|192:(v<65536?c[_++]=v>>12|224:(c[_++]=v>>18|240,c[_++]=v>>12&63|128),c[_++]=v>>6&63|128),c[_++]=63&v|128)}return _})(this.buf,t,this.pos);const a=this.pos-r;a>=128&&W_(r,a,this),this.pos=r-1,this.writeVarint(a),this.pos+=a}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 r=t.length;this.writeVarint(r),this.realloc(r);for(let a=0;a=128&&W_(a,c,this),this.pos=a-1,this.writeVarint(c),this.pos+=c}writeMessage(t,r,a){this.writeTag(t,2),this.writeRawMessage(r,a)}writePackedVarint(t,r){r.length&&this.writeMessage(t,Hy,r)}writePackedSVarint(t,r){r.length&&this.writeMessage(t,Wy,r)}writePackedBoolean(t,r){r.length&&this.writeMessage(t,Ky,r)}writePackedFloat(t,r){r.length&&this.writeMessage(t,Xy,r)}writePackedDouble(t,r){r.length&&this.writeMessage(t,Yy,r)}writePackedFixed32(t,r){r.length&&this.writeMessage(t,Jy,r)}writePackedSFixed32(t,r){r.length&&this.writeMessage(t,Qy,r)}writePackedFixed64(t,r){r.length&&this.writeMessage(t,e1,r)}writePackedSFixed64(t,r){r.length&&this.writeMessage(t,t1,r)}writeBytesField(t,r){this.writeTag(t,2),this.writeBytes(r)}writeFixed32Field(t,r){this.writeTag(t,5),this.writeFixed32(r)}writeSFixed32Field(t,r){this.writeTag(t,5),this.writeSFixed32(r)}writeFixed64Field(t,r){this.writeTag(t,1),this.writeFixed64(r)}writeSFixed64Field(t,r){this.writeTag(t,1),this.writeSFixed64(r)}writeVarintField(t,r){this.writeTag(t,0),this.writeVarint(r)}writeSVarintField(t,r){this.writeTag(t,0),this.writeSVarint(r)}writeStringField(t,r){this.writeTag(t,2),this.writeString(r)}writeFloatField(t,r){this.writeTag(t,5),this.writeFloat(r)}writeDoubleField(t,r){this.writeTag(t,1),this.writeDouble(r)}writeBooleanField(t,r){this.writeVarintField(t,+r)}}function tc(n,t,r){return r?4294967296*t+(n>>>0):4294967296*(t>>>0)+(n>>>0)}function W_(n,t,r){const a=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(a);for(let c=r.pos-1;c>=n;c--)r.buf[c+a]=r.buf[c]}function Hy(n,t){for(let r=0;rv.h-_.h));const a=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),r),h:1/0}];let c=0,p=0;for(const _ of n)for(let v=a.length-1;v>=0;v--){const b=a[v];if(!(_.w>b.w||_.h>b.h)){if(_.x=b.x,_.y=b.y,p=Math.max(p,_.y+_.h),c=Math.max(c,_.x+_.w),_.w===b.w&&_.h===b.h){const S=a.pop();S&&v=0&&a>=t&&zd[this.text.charCodeAt(a)];a--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)}substring(t,r){const a=new rc;return a.text=this.text.substring(t,r),a.sectionIndex=this.sectionIndex.slice(t,r),a.sections=this.sections,a}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce(((t,r)=>Math.max(t,this.sections[r].scale)),0)}getMaxImageSize(t){let r=0,a=0;for(let c=0;c=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Ed(n,t,r,a,c,p,_,v,b,S,I,L,F,V,U){const W=rc.fromFeature(n,c);let J;L===T.ao.vertical&&W.verticalizePunctuation();const{processBidirectionalText:le,processStyledBidirectionalText:Le}=Ea;if(le&&W.sections.length===1){J=[];const Xe=le(W.toString(),uf(W,S,p,t,a,V));for(const lt of Xe){const Pt=new rc;Pt.text=lt,Pt.sections=W.sections;for(let Xt=0;Xt=0;let S=0;for(let L=0;LS){const I=Math.ceil(p/S);c*=I/_,_=I}return{x1:a,y1:c,x2:a+p,y2:c+_}}function ng(n,t,r,a,c,p){const _=n.image;let v;if(_.content){const J=_.content,le=_.pixelRatio||1;v=[J[0]/le,J[1]/le,_.displaySize[0]-J[2]/le,_.displaySize[1]-J[3]/le]}const b=t.left*p,S=t.right*p;let I,L,F,V;r==="width"||r==="both"?(V=c[0]+b-a[3],L=c[0]+S+a[1]):(V=c[0]+(b+S-_.displaySize[0])/2,L=V+_.displaySize[0]);const U=t.top*p,W=t.bottom*p;return r==="height"||r==="both"?(I=c[1]+U-a[0],F=c[1]+W+a[2]):(I=c[1]+(U+W-_.displaySize[1])/2,F=I+_.displaySize[1]),{image:_,top:I,right:L,bottom:F,left:V,collisionPadding:v}}const Uo=128,vs=32640;function ig(n,t){const{expression:r}=t;if(r.kind==="constant")return{kind:"constant",layoutSize:r.evaluate(new Un(n+1))};if(r.kind==="source")return{kind:"source"};{const{zoomStops:a,interpolationType:c}=r;let p=0;for(;p_.id)),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];const r=this.layers[0]._unevaluatedLayout._values;this.textSizeData=ig(this.zoom,r["text-size"]),this.iconSizeData=ig(this.zoom,r["icon-size"]);const a=this.layers[0].layout,c=a.get("symbol-sort-key"),p=a.get("symbol-z-order");this.canOverlap=df(a,"text-overlap","text-allow-overlap")!=="never"||df(a,"icon-overlap","icon-allow-overlap")!=="never"||a.get("text-ignore-placement")||a.get("icon-ignore-placement"),this.sortFeaturesByKey=p!=="viewport-y"&&!c.isConstant(),this.sortFeaturesByY=(p==="viewport-y"||p==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,a.get("symbol-placement")==="point"&&(this.writingModes=a.get("text-writing-mode").map((_=>T.ao[_]))),this.stateDependentLayerIds=this.layers.filter((_=>_.isStateDependent())).map((_=>_.id)),this.sourceID=t.sourceID}createArrays(){this.text=new ff(new la(this.layers,this.zoom,(t=>/^text/.test(t)))),this.icon=new ff(new la(this.layers,this.zoom,(t=>/^icon/.test(t)))),this.glyphOffsetArray=new ne,this.lineVertexArray=new ue,this.symbolInstances=new Q,this.textAnchorOffsets=new he}calculateGlyphDependencies(t,r,a,c,p){for(let _=0;_0)&&(_.value.kind!=="constant"||_.value.value.length>0),I=b.value.kind!=="constant"||!!b.value.value||Object.keys(b.parameters).length>0,L=p.get("symbol-sort-key");if(this.features=[],!S&&!I)return;const F=r.iconDependencies,V=r.glyphDependencies,U=r.availableImages,W=new Un(this.zoom,{globalState:this.globalState});for(const{feature:J,id:le,index:Le,sourceLayerIndex:ye}of t){const Ce=c._featureFilter.needGeometry,Xe=ro(J,Ce);if(!c._featureFilter.filter(W,Xe,a))continue;let lt,Pt;if(Ce||(Xe.geometry=bo(J)),S){const Vt=c.getValueAndResolveTokens("text-field",Xe,a,U),Gt=Sn.factory(Vt),wr=this.hasRTLText=this.hasRTLText||m1(Gt);(!wr||Ea.getRTLTextPluginStatus()==="unavailable"||wr&&Ea.isParsed())&&(lt=Gy(Gt,c,Xe))}if(I){const Vt=c.getValueAndResolveTokens("icon-image",Xe,a,U);Pt=Vt instanceof Gn?Vt:Gn.fromString(Vt)}if(!lt&&!Pt)continue;const Xt=this.sortFeaturesByKey?L.evaluate(Xe,{},a):void 0;if(this.features.push({id:le,text:lt,icon:Pt,index:Le,sourceLayerIndex:ye,geometry:Xe.geometry,properties:J.properties,type:ec.types[J.type],sortKey:Xt}),Pt&&(F[Pt.name]=!0),lt){const Vt=_.evaluate(Xe,{},a).join(","),Gt=p.get("text-rotation-alignment")!=="viewport"&&p.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(T.ao.vertical)>=0;for(const wr of lt.sections)if(wr.image)F[wr.image.name]=!0;else{const $t=jl(lt.toString()),Ht=wr.fontStack||Vt,gt=V[Ht]=V[Ht]||{};this.calculateGlyphDependencies(wr.text,gt,Gt,this.allowVerticalPlacement,$t)}}}p.get("symbol-placement")==="line"&&(this.features=(function(J){const le={},Le={},ye=[];let Ce=0;function Xe(Vt){ye.push(J[Vt]),Ce++}function lt(Vt,Gt,wr){const $t=Le[Vt];return delete Le[Vt],Le[Gt]=$t,ye[$t].geometry[0].pop(),ye[$t].geometry[0]=ye[$t].geometry[0].concat(wr[0]),$t}function Pt(Vt,Gt,wr){const $t=le[Gt];return delete le[Gt],le[Vt]=$t,ye[$t].geometry[0].shift(),ye[$t].geometry[0]=wr[0].concat(ye[$t].geometry[0]),$t}function Xt(Vt,Gt,wr){const $t=wr?Gt[0][Gt[0].length-1]:Gt[0][0];return`${Vt}:${$t.x}:${$t.y}`}for(let Vt=0;VtVt.geometry))})(this.features)),this.sortFeaturesByKey&&this.features.sort(((J,le)=>J.sortKey-le.sortKey))}update(t,r,a){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,r,this.layers,a),this.icon.programConfigurations.updatePaintArrays(t,r,this.layers,a))}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,r){const a=this.lineVertexArray.length;if(t.segment!==void 0){let c=t.dist(r[t.segment+1]),p=t.dist(r[t.segment]);const _={};for(let v=t.segment+1;v=0;v--)_[v]={x:r[v].x,y:r[v].y,tileUnitDistanceFromAnchor:p},v>0&&(p+=r[v-1].dist(r[v]));for(let v=0;v0}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,r){const a=t.placedSymbolArray.get(r),c=a.vertexStartIndex+4*a.numGlyphs;for(let p=a.vertexStartIndex;pc[v]-c[b]||p[b]-p[v])),_}addToSortKeyRanges(t,r){const a=this.sortKeyRanges[this.sortKeyRanges.length-1];a&&a.sortKey===r?a.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:r,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 r of this.symbolInstanceIndexes){const a=this.symbolInstances.get(r);this.featureSortOrder.push(a.featureIndex),[a.rightJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.leftJustifiedTextSymbolIndex].forEach(((c,p,_)=>{c>=0&&_.indexOf(c)===p&&this.addIndicesForPlacedSymbol(this.text,c)})),a.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,a.verticalPlacedTextSymbolIndex),a.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.placedIconSymbolIndex),a.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let ag,og;nr("SymbolBucket",nc,{omit:["layers","collisionBoxArray","features","compareText"]}),nc.MAX_GLYPHS=65535,nc.addDynamicAttributes=pf;var _f={get paint(){return og=og||new Zi({"icon-opacity":new Or(xe.paint_symbol["icon-opacity"]),"icon-color":new Or(xe.paint_symbol["icon-color"]),"icon-halo-color":new Or(xe.paint_symbol["icon-halo-color"]),"icon-halo-width":new Or(xe.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Or(xe.paint_symbol["icon-halo-blur"]),"icon-translate":new yr(xe.paint_symbol["icon-translate"]),"icon-translate-anchor":new yr(xe.paint_symbol["icon-translate-anchor"]),"text-opacity":new Or(xe.paint_symbol["text-opacity"]),"text-color":new Or(xe.paint_symbol["text-color"],{runtimeType:Yt,getOverride:n=>n.textColor,hasOverride:n=>!!n.textColor}),"text-halo-color":new Or(xe.paint_symbol["text-halo-color"]),"text-halo-width":new Or(xe.paint_symbol["text-halo-width"]),"text-halo-blur":new Or(xe.paint_symbol["text-halo-blur"]),"text-translate":new yr(xe.paint_symbol["text-translate"]),"text-translate-anchor":new yr(xe.paint_symbol["text-translate-anchor"])})},get layout(){return ag=ag||new Zi({"symbol-placement":new yr(xe.layout_symbol["symbol-placement"]),"symbol-spacing":new yr(xe.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new yr(xe.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Or(xe.layout_symbol["symbol-sort-key"]),"symbol-z-order":new yr(xe.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new yr(xe.layout_symbol["icon-allow-overlap"]),"icon-overlap":new yr(xe.layout_symbol["icon-overlap"]),"icon-ignore-placement":new yr(xe.layout_symbol["icon-ignore-placement"]),"icon-optional":new yr(xe.layout_symbol["icon-optional"]),"icon-rotation-alignment":new yr(xe.layout_symbol["icon-rotation-alignment"]),"icon-size":new Or(xe.layout_symbol["icon-size"]),"icon-text-fit":new yr(xe.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new yr(xe.layout_symbol["icon-text-fit-padding"]),"icon-image":new Or(xe.layout_symbol["icon-image"]),"icon-rotate":new Or(xe.layout_symbol["icon-rotate"]),"icon-padding":new Or(xe.layout_symbol["icon-padding"]),"icon-keep-upright":new yr(xe.layout_symbol["icon-keep-upright"]),"icon-offset":new Or(xe.layout_symbol["icon-offset"]),"icon-anchor":new Or(xe.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new yr(xe.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new yr(xe.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new yr(xe.layout_symbol["text-rotation-alignment"]),"text-field":new Or(xe.layout_symbol["text-field"]),"text-font":new Or(xe.layout_symbol["text-font"]),"text-size":new Or(xe.layout_symbol["text-size"]),"text-max-width":new Or(xe.layout_symbol["text-max-width"]),"text-line-height":new yr(xe.layout_symbol["text-line-height"]),"text-letter-spacing":new Or(xe.layout_symbol["text-letter-spacing"]),"text-justify":new Or(xe.layout_symbol["text-justify"]),"text-radial-offset":new Or(xe.layout_symbol["text-radial-offset"]),"text-variable-anchor":new yr(xe.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Or(xe.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Or(xe.layout_symbol["text-anchor"]),"text-max-angle":new yr(xe.layout_symbol["text-max-angle"]),"text-writing-mode":new yr(xe.layout_symbol["text-writing-mode"]),"text-rotate":new Or(xe.layout_symbol["text-rotate"]),"text-padding":new yr(xe.layout_symbol["text-padding"]),"text-keep-upright":new yr(xe.layout_symbol["text-keep-upright"]),"text-transform":new Or(xe.layout_symbol["text-transform"]),"text-offset":new Or(xe.layout_symbol["text-offset"]),"text-allow-overlap":new yr(xe.layout_symbol["text-allow-overlap"]),"text-overlap":new yr(xe.layout_symbol["text-overlap"]),"text-ignore-placement":new yr(xe.layout_symbol["text-ignore-placement"]),"text-optional":new yr(xe.layout_symbol["text-optional"])})}};class sg{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:_t,this.defaultValue=t}evaluate(t){if(t.formattedSection){const r=this.defaultValue.property.overrides;if(r&&r.hasOverride(t.formattedSection))return r.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}}nr("FormatSectionOverride",sg,{omit:["defaultValue"]});class Dd extends xa{constructor(t){super(t,_f)}recalculate(t,r){if(super.recalculate(t,r),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 a=this.layout.get("text-writing-mode");if(a){const c=[];for(const p of a)c.indexOf(p)<0&&c.push(p);this.layout._values["text-writing-mode"]=c}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(t,r,a,c){const p=this.layout.get(t).evaluate(r,{},a,c),_=this._unevaluatedLayout._values[t];return _.isDataDriven()||zl(_.value)||!p?p:(function(v,b){return b.replace(/{([^{}]+)}/g,((S,I)=>v&&I in v?String(v[I]):""))})(r.properties,p)}createBucket(t){return new nc(t)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const t of _f.paint.overridableProperties){if(!Dd.hasPaintOverride(this.layout,t))continue;const r=this.paint.get(t),a=new sg(r),c=new Wc(a,r.property.specification);let p=null;p=r.value.kind==="constant"||r.value.kind==="source"?new qs("source",c):new Xc("composite",c,r.value.zoomStops),this.paint._values[t]=new $a(r.property,p,r.parameters)}}_handleOverridablePaintPropertyUpdate(t,r,a){return!(!this.layout||r.isDataDriven()||a.isDataDriven())&&Dd.hasPaintOverride(this.layout,t)}static hasPaintOverride(t,r){const a=t.get("text-field"),c=_f.paint.properties[r];let p=!1;const _=v=>{for(const b of v)if(c.overrides&&c.overrides.hasOverride(b))return void(p=!0)};if(a.value.kind==="constant"&&a.value.value instanceof Sn)_(a.value.value.sections);else if(a.value.kind==="source"){const v=S=>{p||(S instanceof _a&&Lr(S.value)===pn?_(S.value.sections):S instanceof Ao?_(S.sections):S.eachChild(v))},b=a.value;b._styleExpression&&v(b._styleExpression.expression)}return p}}let lg;var _1={get paint(){return lg=lg||new Zi({"background-color":new yr(xe.paint_background["background-color"]),"background-pattern":new _o(xe.paint_background["background-pattern"]),"background-opacity":new yr(xe.paint_background["background-opacity"])})}};class g1 extends xa{constructor(t){super(t,_1)}}let cg;var v1={get paint(){return cg=cg||new Zi({"raster-opacity":new yr(xe.paint_raster["raster-opacity"]),"raster-hue-rotate":new yr(xe.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new yr(xe.paint_raster["raster-brightness-min"]),"raster-brightness-max":new yr(xe.paint_raster["raster-brightness-max"]),"raster-saturation":new yr(xe.paint_raster["raster-saturation"]),"raster-contrast":new yr(xe.paint_raster["raster-contrast"]),"raster-resampling":new yr(xe.paint_raster["raster-resampling"]),"raster-fade-duration":new yr(xe.paint_raster["raster-fade-duration"])})}};class y1 extends xa{constructor(t){super(t,v1)}}class x1 extends xa{constructor(t){super(t,{}),this.onAdd=r=>{this.implementation.onAdd&&this.implementation.onAdd(r,r.painter.context.gl)},this.onRemove=r=>{this.implementation.onRemove&&this.implementation.onRemove(r,r.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 b1{constructor(t){this._methodToThrottle=t,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._methodToThrottle()}),0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}const w1={once:!0},gf=63710088e-1;class ys{constructor(t,r){if(isNaN(t)||isNaN(r))throw new Error(`Invalid LngLat object: (${t}, ${r})`);if(this.lng=+t,this.lat=+r,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new ys(at(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(t){const r=Math.PI/180,a=this.lat*r,c=t.lat*r,p=Math.sin(a)*Math.sin(c)+Math.cos(a)*Math.cos(c)*Math.cos((t.lng-this.lng)*r);return gf*Math.acos(Math.min(p,1))}static convert(t){if(t instanceof ys)return t;if(Array.isArray(t)&&(t.length===2||t.length===3))return new ys(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&typeof t=="object"&&t!==null)return new ys(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: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}const ug=2*Math.PI*gf;function hg(n){return ug*Math.cos(n*Math.PI/180)}function dg(n){return(180+n)/360}function pg(n){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n*Math.PI/360)))/360}function fg(n,t){return n/hg(t)}function vf(n){return 360/Math.PI*Math.atan(Math.exp((180-360*n)*Math.PI/180))-90}function mg(n,t){return n*hg(vf(t))}class ku{constructor(t,r,a=0){this.x=+t,this.y=+r,this.z=+a}static fromLngLat(t,r=0){const a=ys.convert(t);return new ku(dg(a.lng),pg(a.lat),fg(r,a.lat))}toLngLat(){return new ys(360*this.x-180,vf(this.y))}toAltitude(){return mg(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/ug*(t=vf(this.y),1/Math.cos(t*Math.PI/180));var t}}function _g(n,t,r){var a=2*Math.PI*6378137/256/Math.pow(2,r);return[n*a-2*Math.PI*6378137/2,t*a-2*Math.PI*6378137/2]}class yf{constructor(t,r,a){if(!(function(c,p,_){return!(c<0||c>25||_<0||_>=Math.pow(2,c)||p<0||p>=Math.pow(2,c))})(t,r,a))throw new Error(`x=${r}, y=${a}, 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=r,this.y=a,this.key=ic(0,t,t,r,a)}equals(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}url(t,r,a){const c=(_=this.y,v=this.z,b=_g(256*(p=this.x),256*(_=Math.pow(2,v)-_-1),v),S=_g(256*(p+1),256*(_+1),v),b[0]+","+b[1]+","+S[0]+","+S[1]);var p,_,v,b,S;const I=(function(L,F,V){let U,W="";for(let J=L;J>0;J--)U=1<1?"@2x":"").replace(/{quadkey}/g,I).replace(/{bbox-epsg-3857}/g,c)}isChildOf(t){const r=this.z-t.z;return r>0&&t.x===this.x>>r&&t.y===this.y>>r}getTilePoint(t){const r=Math.pow(2,this.z);return new B((t.x*r-this.x)*oe,(t.y*r-this.y)*oe)}toString(){return`${this.z}/${this.x}/${this.y}`}}class gg{constructor(t,r){this.wrap=t,this.canonical=r,this.key=ic(t,r.z,r.z,r.x,r.y)}}class Ra{constructor(t,r,a,c,p){if(this.terrainRttPosMatrix32f=null,t= z; overscaledZ = ${t}; z = ${a}`);this.overscaledZ=t,this.wrap=r,this.canonical=new yf(a,+c,+p),this.key=ic(r,t,a,c,p)}clone(){return new Ra(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 r=this.canonical.z-t;return t>this.canonical.z?new Ra(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Ra(t,this.wrap,t,this.canonical.x>>r,this.canonical.y>>r)}calculateScaledKey(t,r){if(t>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);const a=this.canonical.z-t;return t>this.canonical.z?ic(this.wrap*+r,t,this.canonical.z,this.canonical.x,this.canonical.y):ic(this.wrap*+r,t,t,this.canonical.x>>a,this.canonical.y>>a)}isChildOf(t){if(t.wrap!==this.wrap)return!1;const r=this.canonical.z-t.canonical.z;return t.overscaledZ===0||t.overscaledZ>r&&t.canonical.y===this.canonical.y>>r}children(t){if(this.overscaledZ>=t)return[new Ra(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const r=this.canonical.z+1,a=2*this.canonical.x,c=2*this.canonical.y;return[new Ra(r,this.wrap,r,a,c),new Ra(r,this.wrap,r,a+1,c),new Ra(r,this.wrap,r,a,c+1),new Ra(r,this.wrap,r,a+1,c+1)]}isLessThan(t){return this.wrapt.wrap)&&(this.overscaledZt.overscaledZ)&&(this.canonical.xt.canonical.x)&&this.canonical.ythis.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 r=new tl;return r.extend(t(new B(this.minX,this.minY))),r.extend(t(new B(this.maxX,this.minY))),r.extend(t(new B(this.minX,this.maxY))),r.extend(t(new B(this.maxX,this.maxY))),r}static fromPoints(t){const r=new tl;for(const a of t)r.extend(a);return r}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 vg{constructor(t){this._stringToNumber={},this._numberToString=[];for(let r=0;r=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 yg{constructor(t,r,a,c,p){this.type="Feature",this._vectorTileFeature=t,t._z=r,t._x=a,t._y=c,this.properties=t.properties,this.id=p}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(t){this._geometry=t}toJSON(){const t={geometry:this.geometry};for(const r in this)r!=="_geometry"&&r!=="_vectorTileFeature"&&(t[r]=this[r]);return t}}class xg{constructor(t,r){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new Xs(oe,16,0),this.grid3D=new Xs(oe,16,0),this.featureIndexArray=new Pe,this.promoteId=r}insert(t,r,a,c,p,_){const v=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(a,c,p);const b=_?this.grid3D:this.grid;for(let S=0;S=0&&L[3]>=0&&b.insert(v,L[0],L[1],L[2],L[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new B_(new lf(this.rawTileData)).layers,this.sourceLayerCoder=new vg(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(t,r,a,c){this.loadVTLayers();const p=t.params,_=oe/t.tileSize/t.scale,v=Bo(p.filter),b=t.queryGeometry,S=t.queryPadding*_,I=tl.fromPoints(b),L=this.grid.query(I.minX-S,I.minY-S,I.maxX+S,I.maxY+S),F=tl.fromPoints(t.cameraQueryGeometry).expandBy(S),V=this.grid3D.query(F.minX,F.minY,F.maxX,F.maxY,((J,le,Le,ye)=>(function(Ce,Xe,lt,Pt,Xt){for(const Gt of Ce)if(Xe<=Gt.x&<<=Gt.y&&Pt>=Gt.x&&Xt>=Gt.y)return!0;const Vt=[new B(Xe,lt),new B(Xe,Xt),new B(Pt,Xt),new B(Pt,lt)];if(Ce.length>2){for(const Gt of Vt)if(Yl(Ce,Gt))return!0}for(let Gt=0;Gt(ye||(ye=bo(Ce)),Xe.queryIntersectsFeature({queryGeometry:b,feature:Ce,featureState:lt,geometry:ye,zoom:this.z,transform:t.transform,pixelsToTileUnits:_,pixelPosMatrix:t.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:t.getElevation}))))}return U}loadMatchingFeature(t,r,a,c,p,_,v,b,S,I,L){const F=this.bucketLayerIDs[r];if(_&&!F.some((J=>_.has(J))))return;const V=this.sourceLayerCoder.decode(a),U=this.vtLayers[V].feature(c);if(p.needGeometry){const J=ro(U,!0);if(!p.filter(new Un(this.tileID.overscaledZ),J,this.tileID.canonical))return}else if(!p.filter(new Un(this.tileID.overscaledZ),U))return;const W=this.getId(U,V);for(let J=0;J{const v=t instanceof ql?t.get(_):null;return v&&v.evaluate?v.evaluate(r,a,c):v}))}function T1(n,t){return t-n}function wg(n,t,r,a,c){const p=[];for(let _=0;_=a&&L.x>=a||(I.x>=a?I=new B(a,I.y+(a-I.x)/(L.x-I.x)*(L.y-I.y))._round():L.x>=a&&(L=new B(a,I.y+(a-I.x)/(L.x-I.x)*(L.y-I.y))._round()),I.y>=c&&L.y>=c||(I.y>=c?I=new B(I.x+(c-I.y)/(L.y-I.y)*(L.x-I.x),c)._round():L.y>=c&&(L=new B(I.x+(c-I.y)/(L.y-I.y)*(L.x-I.x),c)._round()),b&&I.equals(b[b.length-1])||(b=[I],p.push(b)),b.push(L)))))}}return p}nr("FeatureIndex",xg,{omit:["rawTileData","sourceLayerCoder"]});class xs extends B{constructor(t,r,a,c){super(t,r),this.angle=a,c!==void 0&&(this.segment=c)}clone(){return new xs(this.x,this.y,this.angle,this.segment)}}function Tg(n,t,r,a,c){if(t.segment===void 0||r===0)return!0;let p=t,_=t.segment+1,v=0;for(;v>-r/2;){if(_--,_<0)return!1;v-=n[_].dist(p),p=n[_]}v+=n[_].dist(n[_+1]),_++;const b=[];let S=0;for(;va;)S-=b.shift().angleDelta;if(S>c)return!1;_++,v+=I.dist(L)}return!0}function Cg(n){let t=0;for(let r=0;rS){const U=(S-b)/V,W=Za.number(L.x,F.x,U),J=Za.number(L.y,F.y,U),le=new xs(W,J,F.angleTo(L),I);return le._round(),!_||Tg(n,le,v,_,t)?le:void 0}b+=V}}function S1(n,t,r,a,c,p,_,v,b){const S=Sg(a,p,_),I=Pg(a,c),L=I*_,F=n[0].x===0||n[0].x===b||n[0].y===0||n[0].y===b;return t-L=0&&Ce=0&&Xe=0&&F+S<=I){const lt=new xs(Ce,Xe,Le,U);lt._round(),a&&!Tg(n,lt,p,a,c)||V.push(lt)}}L+=le}return v||V.length||_||(V=Ig(n,L/2,r,a,c,p,_,!0,b)),V}function Mg(n,t,r,a){const c=[],p=n.image,_=p.pixelRatio,v=p.paddedRect.w-2,b=p.paddedRect.h-2;let S={x1:n.left,y1:n.top,x2:n.right,y2:n.bottom};const I=p.stretchX||[[0,v]],L=p.stretchY||[[0,b]],F=(gt,jr)=>gt+jr[1]-jr[0],V=I.reduce(F,0),U=L.reduce(F,0),W=v-V,J=b-U;let le=0,Le=V,ye=0,Ce=U,Xe=0,lt=W,Pt=0,Xt=J;if(p.content&&a){const gt=p.content,jr=gt[2]-gt[0],Gr=gt[3]-gt[1];(p.textFitWidth||p.textFitHeight)&&(S=rg(n)),le=Rd(I,0,gt[0]),ye=Rd(L,0,gt[1]),Le=Rd(I,gt[0],gt[2]),Ce=Rd(L,gt[1],gt[3]),Xe=gt[0]-le,Pt=gt[1]-ye,lt=jr-Le,Xt=Gr-Ce}const Vt=S.x1,Gt=S.y1,wr=S.x2-Vt,$t=S.y2-Gt,Ht=(gt,jr,Gr,Ir)=>{const _r=Bd(gt.stretch-le,Le,wr,Vt),hn=Fd(gt.fixed-Xe,lt,gt.stretch,V),Jn=Bd(jr.stretch-ye,Ce,$t,Gt),_i=Fd(jr.fixed-Pt,Xt,jr.stretch,U),Vi=Bd(Gr.stretch-le,Le,wr,Vt),Ba=Fd(Gr.fixed-Xe,lt,Gr.stretch,V),ua=Bd(Ir.stretch-ye,Ce,$t,Gt),Ri=Fd(Ir.fixed-Pt,Xt,Ir.stretch,U),Wn=new B(_r,Jn),Si=new B(Vi,Jn),Bi=new B(Vi,ua),Fi=new B(_r,ua),ra=new B(hn/_,_i/_),Fa=new B(Ba/_,Ri/_),Pi=t*Math.PI/180;if(Pi){const Ii=Math.sin(Pi),Mi=Math.cos(Pi),ui=[Mi,-Ii,Ii,Mi];Wn._matMult(ui),Si._matMult(ui),Fi._matMult(ui),Bi._matMult(ui)}const ha=gt.stretch+gt.fixed,gi=jr.stretch+jr.fixed;return{tl:Wn,tr:Si,bl:Fi,br:Bi,tex:{x:p.paddedRect.x+1+ha,y:p.paddedRect.y+1+gi,w:Gr.stretch+Gr.fixed-ha,h:Ir.stretch+Ir.fixed-gi},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:ra,pixelOffsetBR:Fa,minFontScaleX:lt/_/wr,minFontScaleY:Xt/_/$t,isSDF:r}};if(a&&(p.stretchX||p.stretchY)){const gt=kg(I,W,V),jr=kg(L,J,U);for(let Gr=0;Gr0&&(W=Math.max(10,W),this.circleDiameter=W)}else{const F=!((L=_.image)===null||L===void 0)&&L.content&&(_.image.textFitWidth||_.image.textFitHeight)?rg(_):{x1:_.left,y1:_.top,x2:_.right,y2:_.bottom};F.y1=F.y1*v-b[0],F.y2=F.y2*v+b[2],F.x1=F.x1*v-b[3],F.x2=F.x2*v+b[1];const V=_.collisionPadding;if(V&&(F.x1-=V[0]*v,F.y1-=V[1]*v,F.x2+=V[2]*v,F.y2+=V[3]*v),I){const U=new B(F.x1,F.y1),W=new B(F.x2,F.y1),J=new B(F.x1,F.y2),le=new B(F.x2,F.y2),Le=I*Math.PI/180;U._rotate(Le),W._rotate(Le),J._rotate(Le),le._rotate(Le),F.x1=Math.min(U.x,W.x,J.x,le.x),F.x2=Math.max(U.x,W.x,J.x,le.x),F.y1=Math.min(U.y,W.y,J.y,le.y),F.y2=Math.max(U.y,W.y,J.y,le.y)}t.emplaceBack(r.x,r.y,F.x1,F.y1,F.x2,F.y2,a,c,p)}this.boxEndIndex=t.length}}class P1{constructor(t=[],r=(a,c)=>ac?1:0){if(this.data=t,this.length=this.data.length,this.compare=r,this.length>0)for(let a=(this.length>>1)-1;a>=0;a--)this._down(a)}push(t){this.data.push(t),this._up(this.length++)}pop(){if(this.length===0)return;const t=this.data[0],r=this.data.pop();return--this.length>0&&(this.data[0]=r,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:r,compare:a}=this,c=r[t];for(;t>0;){const p=t-1>>1,_=r[p];if(a(c,_)>=0)break;r[t]=_,t=p}r[t]=c}_down(t){const{data:r,compare:a}=this,c=this.length>>1,p=r[t];for(;t=0)break;r[t]=r[_],t=_}r[t]=p}}function I1(n,t=1,r=!1){const a=tl.fromPoints(n[0]),c=Math.min(a.width(),a.height());let p=c/2;const _=new P1([],M1),{minX:v,minY:b,maxX:S,maxY:I}=a;if(c===0)return new B(v,b);for(let V=v;VL.d||!L.d)&&(L=V,r&&console.log("found best %d after %d probes",Math.round(1e4*V.d)/1e4,F)),V.max-L.d<=t||(p=V.h/2,_.push(new ac(V.p.x-p,V.p.y-p,p,n)),_.push(new ac(V.p.x+p,V.p.y-p,p,n)),_.push(new ac(V.p.x-p,V.p.y+p,p,n)),_.push(new ac(V.p.x+p,V.p.y+p,p,n)),F+=4)}return r&&(console.log(`num probes: ${F}`),console.log(`best distance: ${L.d}`)),L.p}function M1(n,t){return t.max-n.max}function ac(n,t,r,a){this.p=new B(n,t),this.h=r,this.d=(function(c,p){let _=!1,v=1/0;for(let b=0;bc.y!=U.y>c.y&&c.x<(U.x-V.x)*(c.y-V.y)/(U.y-V.y)+V.x&&(_=!_),v=Math.min(v,p_(c,V,U))}}return(_?1:-1)*Math.sqrt(v)})(this.p,a),this.max=this.d+this.h*Math.SQRT2}var ji;T.aE=void 0,(ji=T.aE||(T.aE={}))[ji.center=1]="center",ji[ji.left=2]="left",ji[ji.right=3]="right",ji[ji.top=4]="top",ji[ji.bottom=5]="bottom",ji[ji["top-left"]=6]="top-left",ji[ji["top-right"]=7]="top-right",ji[ji["bottom-left"]=8]="bottom-left",ji[ji["bottom-right"]=9]="bottom-right";const xf=Number.POSITIVE_INFINITY;function Ag(n,t){return t[1]!==xf?(function(r,a,c){let p=0,_=0;switch(a=Math.abs(a),c=Math.abs(c),r){case"top-right":case"top-left":case"top":_=c-7;break;case"bottom-right":case"bottom-left":case"bottom":_=7-c}switch(r){case"top-right":case"bottom-right":case"right":p=-a;break;case"top-left":case"bottom-left":case"left":p=a}return[p,_]})(n,t[0],t[1]):(function(r,a){let c=0,p=0;a<0&&(a=0);const _=a/Math.SQRT2;switch(r){case"top-right":case"top-left":p=_-7;break;case"bottom-right":case"bottom-left":p=7-_;break;case"bottom":p=7-a;break;case"top":p=a-7}switch(r){case"top-right":case"bottom-right":c=-_;break;case"top-left":case"bottom-left":c=_;break;case"left":c=a;break;case"right":c=-a}return[c,p]})(n,t[0])}function Eg(n,t,r){var a;const c=n.layout,p=(a=c.get("text-variable-anchor-offset"))===null||a===void 0?void 0:a.evaluate(t,{},r);if(p){const v=p.values,b=[];for(let S=0;SF*Ci));I.startsWith("top")?L[1]-=7:I.startsWith("bottom")&&(L[1]+=7),b[S+1]=L}return new pi(b)}const _=c.get("text-variable-anchor");if(_){let v;v=n._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[c.get("text-radial-offset").evaluate(t,{},r)*Ci,xf]:c.get("text-offset").evaluate(t,{},r).map((S=>S*Ci));const b=[];for(const S of _)b.push(S,Ag(S,v));return new pi(b)}return null}function bf(n){switch(n){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function k1(n,t,r,a,c,p,_,v,b,S,I,L){let F=p.textMaxSize.evaluate(t,{});F===void 0&&(F=_);const V=n.layers[0].layout,U=V.get("icon-offset").evaluate(t,{},I),W=Lg(r.horizontal),J=_/24,le=n.tilePixelRatio*J,Le=n.tilePixelRatio*F/24,ye=n.tilePixelRatio*v,Ce=n.tilePixelRatio*V.get("symbol-spacing"),Xe=V.get("text-padding")*n.tilePixelRatio,lt=(function(Gr,Ir,_r,hn=1){const Jn=Gr.get("icon-padding").evaluate(Ir,{},_r),_i=Jn&&Jn.values;return[_i[0]*hn,_i[1]*hn,_i[2]*hn,_i[3]*hn]})(V,t,I,n.tilePixelRatio),Pt=V.get("text-max-angle")/180*Math.PI,Xt=V.get("text-rotation-alignment")!=="viewport"&&V.get("symbol-placement")!=="point",Vt=V.get("icon-rotation-alignment")==="map"&&V.get("symbol-placement")!=="point",Gt=V.get("symbol-placement"),wr=Ce/2,$t=V.get("icon-text-fit");let Ht;a&&$t!=="none"&&(n.allowVerticalPlacement&&r.vertical&&(Ht=ng(a,r.vertical,$t,V.get("icon-text-fit-padding"),U,J)),W&&(a=ng(a,W,$t,V.get("icon-text-fit-padding"),U,J)));const gt=I?L.line.getGranularityForZoomLevel(I.z):1,jr=(Gr,Ir)=>{Ir.x<0||Ir.x>=oe||Ir.y<0||Ir.y>=oe||(function(_r,hn,Jn,_i,Vi,Ba,ua,Ri,Wn,Si,Bi,Fi,ra,Fa,Pi,ha,gi,Ii,Mi,ui,qn,no,oc,io,z1){const sc=_r.addToLineVertexArray(hn,Jn);let rl,lc,cc,uc,Fg=0,Og=0,Ng=0,jg=0,kf=-1,Af=-1;const $o={};let Vg=ms("");if(_r.allowVerticalPlacement&&_i.vertical){const Gi=Ri.layout.get("text-rotate").evaluate(qn,{},io)+90;cc=new Od(Wn,hn,Si,Bi,Fi,_i.vertical,ra,Fa,Pi,Gi),ua&&(uc=new Od(Wn,hn,Si,Bi,Fi,ua,gi,Ii,Pi,Gi))}if(Vi){const Gi=Ri.layout.get("icon-rotate").evaluate(qn,{}),Oa=Ri.layout.get("icon-text-fit")!=="none",nl=Mg(Vi,Gi,oc,Oa),oo=ua?Mg(ua,Gi,oc,Oa):void 0;lc=new Od(Wn,hn,Si,Bi,Fi,Vi,gi,Ii,!1,Gi),Fg=4*nl.length;const il=_r.iconSizeData;let wo=null;il.kind==="source"?(wo=[Uo*Ri.layout.get("icon-size").evaluate(qn,{})],wo[0]>vs&&Dt(`${_r.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):il.kind==="composite"&&(wo=[Uo*no.compositeIconSizes[0].evaluate(qn,{},io),Uo*no.compositeIconSizes[1].evaluate(qn,{},io)],(wo[0]>vs||wo[1]>vs)&&Dt(`${_r.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),_r.addSymbols(_r.icon,nl,wo,ui,Mi,qn,T.ao.none,hn,sc.lineStartIndex,sc.lineLength,-1,io),kf=_r.icon.placedSymbolArray.length-1,oo&&(Og=4*oo.length,_r.addSymbols(_r.icon,oo,wo,ui,Mi,qn,T.ao.vertical,hn,sc.lineStartIndex,sc.lineLength,-1,io),Af=_r.icon.placedSymbolArray.length-1)}const qg=Object.keys(_i.horizontal);for(const Gi of qg){const Oa=_i.horizontal[Gi];if(!rl){Vg=ms(Oa.text);const oo=Ri.layout.get("text-rotate").evaluate(qn,{},io);rl=new Od(Wn,hn,Si,Bi,Fi,Oa,ra,Fa,Pi,oo)}const nl=Oa.positionedLines.length===1;if(Ng+=zg(_r,hn,Oa,Ba,Ri,Pi,qn,ha,sc,_i.vertical?T.ao.horizontal:T.ao.horizontalOnly,nl?qg:[Gi],$o,kf,no,io),nl)break}_i.vertical&&(jg+=zg(_r,hn,_i.vertical,Ba,Ri,Pi,qn,ha,sc,T.ao.vertical,["vertical"],$o,Af,no,io));const L1=rl?rl.boxStartIndex:_r.collisionBoxArray.length,D1=rl?rl.boxEndIndex:_r.collisionBoxArray.length,R1=cc?cc.boxStartIndex:_r.collisionBoxArray.length,B1=cc?cc.boxEndIndex:_r.collisionBoxArray.length,F1=lc?lc.boxStartIndex:_r.collisionBoxArray.length,O1=lc?lc.boxEndIndex:_r.collisionBoxArray.length,N1=uc?uc.boxStartIndex:_r.collisionBoxArray.length,j1=uc?uc.boxEndIndex:_r.collisionBoxArray.length;let ao=-1;const jd=(Gi,Oa)=>Gi&&Gi.circleDiameter?Math.max(Gi.circleDiameter,Oa):Oa;ao=jd(rl,ao),ao=jd(cc,ao),ao=jd(lc,ao),ao=jd(uc,ao);const Zg=ao>-1?1:0;Zg&&(ao*=z1/Ci),_r.glyphOffsetArray.length>=nc.MAX_GLYPHS&&Dt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),qn.sortKey!==void 0&&_r.addToSortKeyRanges(_r.symbolInstances.length,qn.sortKey);const V1=Eg(Ri,qn,io),[q1,Z1]=(function(Gi,Oa){const nl=Gi.length,oo=Oa==null?void 0:Oa.values;if((oo==null?void 0:oo.length)>0)for(let il=0;il=0?$o.right:-1,$o.center>=0?$o.center:-1,$o.left>=0?$o.left:-1,$o.vertical||-1,kf,Af,Vg,L1,D1,R1,B1,F1,O1,N1,j1,Si,Ng,jg,Fg,Og,Zg,0,ra,ao,q1,Z1)})(n,Ir,Gr,r,a,c,Ht,n.layers[0],n.collisionBoxArray,t.index,t.sourceLayerIndex,n.index,le,[Xe,Xe,Xe,Xe],Xt,b,ye,lt,Vt,U,t,p,S,I,_)};if(Gt==="line")for(const Gr of wg(t.geometry,0,0,oe,oe)){const Ir=el(Gr,gt),_r=S1(Ir,Ce,Pt,r.vertical||W,a,24,Le,n.overscaling,oe);for(const hn of _r)W&&A1(n,W.text,wr,hn)||jr(Ir,hn)}else if(Gt==="line-center"){for(const Gr of t.geometry)if(Gr.length>1){const Ir=el(Gr,gt),_r=C1(Ir,Pt,r.vertical||W,a,24,Le);_r&&jr(Ir,_r)}}else if(t.type==="Polygon")for(const Gr of Fs(t.geometry,0)){const Ir=I1(Gr,16);jr(el(Gr[0],gt,!0),new xs(Ir.x,Ir.y,0))}else if(t.type==="LineString")for(const Gr of t.geometry){const Ir=el(Gr,gt);jr(Ir,new xs(Ir[0].x,Ir[0].y,0))}else if(t.type==="Point")for(const Gr of t.geometry)for(const Ir of Gr)jr([Ir],new xs(Ir.x,Ir.y,0))}function zg(n,t,r,a,c,p,_,v,b,S,I,L,F,V,U){const W=(function(Le,ye,Ce,Xe,lt,Pt,Xt,Vt){const Gt=Xe.layout.get("text-rotate").evaluate(Pt,{})*Math.PI/180,wr=[];for(const $t of ye.positionedLines)for(const Ht of $t.positionedGlyphs){if(!Ht.rect)continue;const gt=Ht.rect||{};let jr=4,Gr=!0,Ir=1,_r=0;const hn=(lt||Vt)&&Ht.vertical,Jn=Ht.metrics.advance*Ht.scale/2;if(Vt&&ye.verticalizable&&(_r=$t.lineOffset/2-(Ht.imageName?-(Ci-Ht.metrics.width*Ht.scale)/2:(Ht.scale-1)*Ci)),Ht.imageName){const Ii=Xt[Ht.imageName];Gr=Ii.sdf,Ir=Ii.pixelRatio,jr=1/Ir}const _i=lt?[Ht.x+Jn,Ht.y]:[0,0];let Vi=lt?[0,0]:[Ht.x+Jn+Ce[0],Ht.y+Ce[1]-_r],Ba=[0,0];hn&&(Ba=Vi,Vi=[0,0]);const ua=Ht.metrics.isDoubleResolution?2:1,Ri=(Ht.metrics.left-jr)*Ht.scale-Jn+Vi[0],Wn=(-Ht.metrics.top-jr)*Ht.scale+Vi[1],Si=Ri+gt.w/ua*Ht.scale/Ir,Bi=Wn+gt.h/ua*Ht.scale/Ir,Fi=new B(Ri,Wn),ra=new B(Si,Wn),Fa=new B(Ri,Bi),Pi=new B(Si,Bi);if(hn){const Ii=new B(-Jn,Jn- -17),Mi=-Math.PI/2,ui=12-Jn,qn=new B(22-ui,-(Ht.imageName?ui:0)),no=new B(...Ba);Fi._rotateAround(Mi,Ii)._add(qn)._add(no),ra._rotateAround(Mi,Ii)._add(qn)._add(no),Fa._rotateAround(Mi,Ii)._add(qn)._add(no),Pi._rotateAround(Mi,Ii)._add(qn)._add(no)}if(Gt){const Ii=Math.sin(Gt),Mi=Math.cos(Gt),ui=[Mi,-Ii,Ii,Mi];Fi._matMult(ui),ra._matMult(ui),Fa._matMult(ui),Pi._matMult(ui)}const ha=new B(0,0),gi=new B(0,0);wr.push({tl:Fi,tr:ra,bl:Fa,br:Pi,tex:gt,writingMode:ye.writingMode,glyphOffset:_i,sectionIndex:Ht.sectionIndex,isSDF:Gr,pixelOffsetTL:ha,pixelOffsetBR:gi,minFontScaleX:0,minFontScaleY:0})}return wr})(0,r,v,c,p,_,a,n.allowVerticalPlacement),J=n.textSizeData;let le=null;J.kind==="source"?(le=[Uo*c.layout.get("text-size").evaluate(_,{})],le[0]>vs&&Dt(`${n.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):J.kind==="composite"&&(le=[Uo*V.compositeTextSizes[0].evaluate(_,{},U),Uo*V.compositeTextSizes[1].evaluate(_,{},U)],(le[0]>vs||le[1]>vs)&&Dt(`${n.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),n.addSymbols(n.text,W,le,v,p,_,S,t,b.lineStartIndex,b.lineLength,F,U);for(const Le of I)L[Le]=n.text.placedSymbolArray.length-1;return 4*W.length}function Lg(n){for(const t in n)return n[t];return null}function A1(n,t,r,a){const c=n.compareText;if(t in c){const p=c[t];for(let _=p.length-1;_>=0;_--)if(a.dist(p[_])>4;if(c!==1)throw new Error(`Got v${c} data when expected v1.`);const p=Dg[15&a];if(!p)throw new Error("Unrecognized array type.");const[_]=new Uint16Array(t,2,1),[v]=new Uint32Array(t,4,1);return new wf(v,_,p,t)}constructor(t,r=64,a=Float64Array,c){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=a,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const p=Dg.indexOf(this.ArrayType),_=2*t*this.ArrayType.BYTES_PER_ELEMENT,v=t*this.IndexArrayType.BYTES_PER_ELEMENT,b=(8-v%8)%8;if(p<0)throw new Error(`Unexpected typed array class: ${a}.`);c&&c instanceof ArrayBuffer?(this.data=c,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+v+b,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+_+v+b),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+v+b,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]=r,new Uint32Array(this.data,4,1)[0]=t)}add(t,r){const a=this._pos>>1;return this.ids[a]=a,this.coords[this._pos++]=t,this.coords[this._pos++]=r,a}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return Tf(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,r,a,c){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:p,coords:_,nodeSize:v}=this,b=[0,p.length-1,0],S=[];for(;b.length;){const I=b.pop()||0,L=b.pop()||0,F=b.pop()||0;if(L-F<=v){for(let J=F;J<=L;J++){const le=_[2*J],Le=_[2*J+1];le>=t&&le<=a&&Le>=r&&Le<=c&&S.push(p[J])}continue}const V=F+L>>1,U=_[2*V],W=_[2*V+1];U>=t&&U<=a&&W>=r&&W<=c&&S.push(p[V]),(I===0?t<=U:r<=W)&&(b.push(F),b.push(V-1),b.push(1-I)),(I===0?a>=U:c>=W)&&(b.push(V+1),b.push(L),b.push(1-I))}return S}within(t,r,a){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:c,coords:p,nodeSize:_}=this,v=[0,c.length-1,0],b=[],S=a*a;for(;v.length;){const I=v.pop()||0,L=v.pop()||0,F=v.pop()||0;if(L-F<=_){for(let J=F;J<=L;J++)Bg(p[2*J],p[2*J+1],t,r)<=S&&b.push(c[J]);continue}const V=F+L>>1,U=p[2*V],W=p[2*V+1];Bg(U,W,t,r)<=S&&b.push(c[V]),(I===0?t-a<=U:r-a<=W)&&(v.push(F),v.push(V-1),v.push(1-I)),(I===0?t+a>=U:r+a>=W)&&(v.push(V+1),v.push(L),v.push(1-I))}return b}}function Tf(n,t,r,a,c,p){if(c-a<=r)return;const _=a+c>>1;Rg(n,t,_,a,c,p),Tf(n,t,r,a,_-1,1-p),Tf(n,t,r,_+1,c,1-p)}function Rg(n,t,r,a,c,p){for(;c>a;){if(c-a>600){const S=c-a+1,I=r-a+1,L=Math.log(S),F=.5*Math.exp(2*L/3),V=.5*Math.sqrt(L*F*(S-F)/S)*(I-S/2<0?-1:1);Rg(n,t,r,Math.max(a,Math.floor(r-I*F/S+V)),Math.min(c,Math.floor(r+(S-I)*F/S+V)),p)}const _=t[2*r+p];let v=a,b=c;for(Eu(n,t,a,r),t[2*c+p]>_&&Eu(n,t,a,c);v_;)b--}t[2*a+p]===_?Eu(n,t,a,b):(b++,Eu(n,t,b,c)),b<=r&&(a=b+1),r<=b&&(c=b-1)}}function Eu(n,t,r,a){Cf(n,r,a),Cf(t,2*r,2*a),Cf(t,2*r+1,2*a+1)}function Cf(n,t,r){const a=n[t];n[t]=n[r],n[r]=a}function Bg(n,t,r,a){const c=n-r,p=t-a;return c*c+p*p}var Sf;T.cx=void 0,(Sf=T.cx||(T.cx={})).create="create",Sf.load="load",Sf.fullLoad="fullLoad";let Nd=null,zu=[];const Pf=1e3/60,If="loadTime",Mf="fullLoadTime",E1={mark(n){performance.mark(n)},frame(n){const t=n;Nd!=null&&zu.push(t-Nd),Nd=t},clearMetrics(){Nd=null,zu=[],performance.clearMeasures(If),performance.clearMeasures(Mf);for(const n in T.cx)performance.clearMarks(T.cx[n])},getPerformanceMetrics(){performance.measure(If,T.cx.create,T.cx.load),performance.measure(Mf,T.cx.create,T.cx.fullLoad);const n=performance.getEntriesByName(If)[0].duration,t=performance.getEntriesByName(Mf)[0].duration,r=zu.length,a=1/(zu.reduce(((p,_)=>p+_),0)/r/1e3),c=zu.filter((p=>p>Pf)).reduce(((p,_)=>p+(_-Pf)/Pf),0);return{loadTime:n,fullLoadTime:t,fps:a,percentDroppedFrames:c/(r+c)*100,totalFrames:r}}};T.$=oe,T.A=ze,T.B=function([n,t,r]){return t+=90,t*=Math.PI/180,r*=Math.PI/180,{x:n*Math.cos(t)*Math.sin(r),y:n*Math.sin(t)*Math.sin(r),z:n*Math.cos(r)}},T.C=Za,T.D=yr,T.E=Mt,T.F=Un,T.G=Hs,T.H=function(n){if(tr==null){const t=n.navigator?n.navigator.userAgent:null;tr=!!n.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return tr},T.I=cf,T.J=class{constructor(n,t){this.target=n,this.mapId=t,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new b1((()=>this.process())),this.subscription=rr(this.target,"message",(r=>this.receive(r)),!1),this.globalScope=qt(self)?n:window}registerMessageHandler(n,t){this.messageHandlers[n]=t}sendAsync(n,t){return new Promise(((r,a)=>{const c=Math.round(1e18*Math.random()).toString(36).substring(0,10),p=t?rr(t.signal,"abort",(()=>{p==null||p.unsubscribe(),delete this.resolveRejects[c];const b={id:c,type:"",origin:location.origin,targetMapId:n.targetMapId,sourceMapId:this.mapId};this.target.postMessage(b)}),w1):null;this.resolveRejects[c]={resolve:b=>{p==null||p.unsubscribe(),r(b)},reject:b=>{p==null||p.unsubscribe(),a(b)}};const _=[],v=Object.assign(Object.assign({},n),{id:c,sourceMapId:this.mapId,origin:location.origin,data:cs(n.data,_)});this.target.postMessage(v,{transfer:_})}))}receive(n){const t=n.data,r=t.id;if(!(t.origin!=="file://"&&location.origin!=="file://"&&t.origin!=="resource://android"&&location.origin!=="resource://android"&&t.origin!==location.origin||t.targetMapId&&this.mapId!==t.targetMapId)){if(t.type===""){delete this.tasks[r];const a=this.abortControllers[r];return delete this.abortControllers[r],void(a&&a.abort())}if(qt(self)||t.mustQueue)return this.tasks[r]=t,this.taskQueue.push(r),void this.invoker.trigger();this.processTask(r,t)}}process(){if(this.taskQueue.length===0)return;const n=this.taskQueue.shift(),t=this.tasks[n];delete this.tasks[n],this.taskQueue.length>0&&this.invoker.trigger(),t&&this.processTask(n,t)}processTask(n,t){return s(this,void 0,void 0,(function*(){if(t.type===""){const c=this.resolveRejects[n];return delete this.resolveRejects[n],c?void(t.error?c.reject(No(t.error)):c.resolve(No(t.data))):void 0}if(!this.messageHandlers[t.type])return void this.completeTask(n,new Error(`Could not find a registered handler for ${t.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const r=No(t.data),a=new AbortController;this.abortControllers[n]=a;try{const c=yield this.messageHandlers[t.type](t.sourceMapId,r,a);this.completeTask(n,null,c)}catch(c){this.completeTask(n,c)}}))}completeTask(n,t,r){const a=[];delete this.abortControllers[n];const c={id:n,type:"",sourceMapId:this.mapId,origin:location.origin,error:t?cs(t):null,data:cs(r,a)};this.target.postMessage(c,{transfer:a})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},T.K=X,T.L=function(){var n=new ze(16);return ze!=Float32Array&&(n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0),n[0]=1,n[5]=1,n[10]=1,n[15]=1,n},T.M=function(n,t,r){var a,c,p,_,v,b,S,I,L,F,V,U,W=r[0],J=r[1],le=r[2];return t===n?(n[12]=t[0]*W+t[4]*J+t[8]*le+t[12],n[13]=t[1]*W+t[5]*J+t[9]*le+t[13],n[14]=t[2]*W+t[6]*J+t[10]*le+t[14],n[15]=t[3]*W+t[7]*J+t[11]*le+t[15]):(c=t[1],p=t[2],_=t[3],v=t[4],b=t[5],S=t[6],I=t[7],L=t[8],F=t[9],V=t[10],U=t[11],n[0]=a=t[0],n[1]=c,n[2]=p,n[3]=_,n[4]=v,n[5]=b,n[6]=S,n[7]=I,n[8]=L,n[9]=F,n[10]=V,n[11]=U,n[12]=a*W+v*J+L*le+t[12],n[13]=c*W+b*J+F*le+t[13],n[14]=p*W+S*J+V*le+t[14],n[15]=_*W+I*J+U*le+t[15]),n},T.N=function(n,t,r){var a=r[0],c=r[1],p=r[2];return n[0]=t[0]*a,n[1]=t[1]*a,n[2]=t[2]*a,n[3]=t[3]*a,n[4]=t[4]*c,n[5]=t[5]*c,n[6]=t[6]*c,n[7]=t[7]*c,n[8]=t[8]*p,n[9]=t[9]*p,n[10]=t[10]*p,n[11]=t[11]*p,n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},T.O=function(n,t,r){var a=t[0],c=t[1],p=t[2],_=t[3],v=t[4],b=t[5],S=t[6],I=t[7],L=t[8],F=t[9],V=t[10],U=t[11],W=t[12],J=t[13],le=t[14],Le=t[15],ye=r[0],Ce=r[1],Xe=r[2],lt=r[3];return n[0]=ye*a+Ce*v+Xe*L+lt*W,n[1]=ye*c+Ce*b+Xe*F+lt*J,n[2]=ye*p+Ce*S+Xe*V+lt*le,n[3]=ye*_+Ce*I+Xe*U+lt*Le,n[4]=(ye=r[4])*a+(Ce=r[5])*v+(Xe=r[6])*L+(lt=r[7])*W,n[5]=ye*c+Ce*b+Xe*F+lt*J,n[6]=ye*p+Ce*S+Xe*V+lt*le,n[7]=ye*_+Ce*I+Xe*U+lt*Le,n[8]=(ye=r[8])*a+(Ce=r[9])*v+(Xe=r[10])*L+(lt=r[11])*W,n[9]=ye*c+Ce*b+Xe*F+lt*J,n[10]=ye*p+Ce*S+Xe*V+lt*le,n[11]=ye*_+Ce*I+Xe*U+lt*Le,n[12]=(ye=r[12])*a+(Ce=r[13])*v+(Xe=r[14])*L+(lt=r[15])*W,n[13]=ye*c+Ce*b+Xe*F+lt*J,n[14]=ye*p+Ce*S+Xe*V+lt*le,n[15]=ye*_+Ce*I+Xe*U+lt*Le,n},T.P=B,T.Q=function(n,t){const r={};for(let a=0;a[S.id,S])));_.add=Array.from(b.values())}if(t.update){const v=new Map((r=_.update)===null||r===void 0?void 0:r.map((b=>[b.id,b])));for(const b of t.update){const S=(a=v.get(b.id))!==null&&a!==void 0?a:{id:b.id};b.newGeometry&&(S.newGeometry=b.newGeometry),b.addOrUpdateProperties&&(S.addOrUpdateProperties=((c=S.addOrUpdateProperties)!==null&&c!==void 0?c:[]).concat(b.addOrUpdateProperties)),b.removeProperties&&(S.removeProperties=((p=S.removeProperties)!==null&&p!==void 0?p:[]).concat(b.removeProperties)),b.removeAllProperties&&(S.removeAllProperties=!0),v.set(b.id,S)}_.update=Array.from(v.values())}return _},T.a1=ku,T.a2=tl,T.a3=25,T.a4=yf,T.a5=n=>{const t=window.document.createElement("video");return t.muted=!0,new Promise((r=>{t.onloadstart=()=>{r(t)};for(const a of n){const c=window.document.createElement("source");Ie(a)||(t.crossOrigin="Anonymous"),c.src=a,t.appendChild(c)}}))},T.a6=ht,T.a7=function(){return vt++},T.a8=D,T.a9=nc,T.aA=function(n){let t=1/0,r=1/0,a=-1/0,c=-1/0;for(const p of n)t=Math.min(t,p.x),r=Math.min(r,p.y),a=Math.max(a,p.x),c=Math.max(c,p.y);return[t,r,a,c]},T.aB=Ci,T.aC=Ae,T.aD=function(n,t,r,a,c=!1){if(!r[0]&&!r[1])return[0,0];const p=c?a==="map"?-n.bearingInRadians:0:a==="viewport"?n.bearingInRadians:0;if(p){const _=Math.sin(p),v=Math.cos(p);r=[r[0]*v-r[1]*_,r[0]*_+r[1]*v]}return[c?r[0]:Ae(t,r[0],n.zoom),c?r[1]:Ae(t,r[1],n.zoom)]},T.aF=df,T.aG=bf,T.aH=hf,T.aI=wf,T.aJ=ti,T.aK=kd,T.aL=pe,T.aM=Kr,T.aN=Bn,T.aO=at,T.aP=or,T.aQ=mg,T.aR=De,T.aS=et,T.aT=function(n){var t=new ze(3);return t[0]=n[0],t[1]=n[1],t[2]=n[2],t},T.aU=function(n,t,r){return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],n},T.aV=function(n,t){var r=t[0],a=t[1],c=t[2],p=r*r+a*a+c*c;return p>0&&(p=1/Math.sqrt(p)),n[0]=t[0]*p,n[1]=t[1]*p,n[2]=t[2]*p,n},T.aW=tt,T.aX=function(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]},T.aY=function(n,t,r){return n[0]=t[0]*r[0],n[1]=t[1]*r[1],n[2]=t[2]*r[2],n[3]=t[3]*r[3],n},T.aZ=qe,T.a_=function(n,t,r){const a=t[0]*r[0]+t[1]*r[1]+t[2]*r[2];return a===0?null:(-(n[0]*r[0]+n[1]*r[1]+n[2]*r[2])-r[3])/a},T.aa=Bo,T.ab=ro,T.ac=yg,T.ad=function(n){const t={};if(n.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((r,a,c,p)=>{const _=c||p;return t[a]=!_||_.toLowerCase(),""})),t["max-age"]){const r=parseInt(t["max-age"],10);isNaN(r)?delete t["max-age"]:t["max-age"]=r}return t},T.ae=Kt,T.af=function(n){return Math.pow(2,n)},T.ag=Ke,T.ah=Bt,T.ai=85.051129,T.aj=fg,T.ak=function(n){return Math.log(n)/Math.LN2},T.al=function(n){var t=n[0],r=n[1];return t*t+r*r},T.am=function(n,t){const r=[];for(const a in n)a in t||r.push(a);return r},T.an=function(n,t){let r=0,a=0;if(n.kind==="constant")a=n.layoutSize;else if(n.kind!=="source"){const{interpolationType:c,minZoom:p,maxZoom:_}=n,v=c?Bt(Di.interpolationFactor(c,t,p,_),0,1):0;n.kind==="camera"?a=Za.number(n.minSize,n.maxSize,v):r=v}return{uSizeT:r,uSize:a}},T.ap=function(n,{uSize:t,uSizeT:r},{lowerSize:a,upperSize:c}){return n.kind==="source"?a/Uo:n.kind==="composite"?Za.number(a/Uo,c/Uo,r):t},T.aq=function(n,t){var r=t[0],a=t[1],c=t[2],p=t[3],_=t[4],v=t[5],b=t[6],S=t[7],I=t[8],L=t[9],F=t[10],V=t[11],U=t[12],W=t[13],J=t[14],le=t[15],Le=r*v-a*_,ye=r*b-c*_,Ce=r*S-p*_,Xe=a*b-c*v,lt=a*S-p*v,Pt=c*S-p*b,Xt=I*W-L*U,Vt=I*J-F*U,Gt=I*le-V*U,wr=L*J-F*W,$t=L*le-V*W,Ht=F*le-V*J,gt=Le*Ht-ye*$t+Ce*wr+Xe*Gt-lt*Vt+Pt*Xt;return gt?(n[0]=(v*Ht-b*$t+S*wr)*(gt=1/gt),n[1]=(c*$t-a*Ht-p*wr)*gt,n[2]=(W*Pt-J*lt+le*Xe)*gt,n[3]=(F*lt-L*Pt-V*Xe)*gt,n[4]=(b*Gt-_*Ht-S*Vt)*gt,n[5]=(r*Ht-c*Gt+p*Vt)*gt,n[6]=(J*Ce-U*Pt-le*ye)*gt,n[7]=(I*Pt-F*Ce+V*ye)*gt,n[8]=(_*$t-v*Gt+S*Xt)*gt,n[9]=(a*Gt-r*$t-p*Xt)*gt,n[10]=(U*lt-W*Ce+le*Le)*gt,n[11]=(L*Ce-I*lt-V*Le)*gt,n[12]=(v*Vt-_*wr-b*Xt)*gt,n[13]=(r*wr-a*Vt+c*Xt)*gt,n[14]=(W*ye-U*Xe-J*Le)*gt,n[15]=(I*Xe-L*ye+F*Le)*gt,n):null},T.ar=re,T.as=function(n){return Math.hypot(n[0],n[1])},T.at=function(n){return n[0]=0,n[1]=0,n},T.au=function(n,t,r){return n[0]=t[0]*r,n[1]=t[1]*r,n},T.av=pf,T.aw=ke,T.ax=function(n,t,r,a){const c=t.y-n.y,p=t.x-n.x,_=a.y-r.y,v=a.x-r.x,b=_*p-v*c;if(b===0)return null;const S=(v*(n.y-r.y)-_*(n.x-r.x))/b;return new B(n.x+S*p,n.y+S*c)},T.ay=wg,T.az=h_,T.b=Qt,T.b$=class extends h{},T.b0=function(n,t,r){return n[0]=t[0]*r,n[1]=t[1]*r,n[2]=t[2]*r,n[3]=t[3]*r,n},T.b1=function(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]},T.b2=gg,T.b3=ic,T.b4=function(n,t,r,a,c){var p,_=1/Math.tan(t/2);return n[0]=_/r,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=_,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[11]=-1,n[12]=0,n[13]=0,n[15]=0,c!=null&&c!==1/0?(n[10]=(c+a)*(p=1/(a-c)),n[14]=2*c*a*p):(n[10]=-1,n[14]=-2*a),n},T.b5=function(n){var t=new ze(16);return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t},T.b6=function(n,t,r){var a=Math.sin(r),c=Math.cos(r),p=t[0],_=t[1],v=t[2],b=t[3],S=t[4],I=t[5],L=t[6],F=t[7];return t!==n&&(n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15]),n[0]=p*c+S*a,n[1]=_*c+I*a,n[2]=v*c+L*a,n[3]=b*c+F*a,n[4]=S*c-p*a,n[5]=I*c-_*a,n[6]=L*c-v*a,n[7]=F*c-b*a,n},T.b7=function(n,t,r){var a=Math.sin(r),c=Math.cos(r),p=t[4],_=t[5],v=t[6],b=t[7],S=t[8],I=t[9],L=t[10],F=t[11];return t!==n&&(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15]),n[4]=p*c+S*a,n[5]=_*c+I*a,n[6]=v*c+L*a,n[7]=b*c+F*a,n[8]=S*c-p*a,n[9]=I*c-_*a,n[10]=L*c-v*a,n[11]=F*c-b*a,n},T.b8=function(){const n=new Float32Array(16);return Ke(n),n},T.b9=function(){const n=new Float64Array(16);return Ke(n),n},T.bA=function(n,t){const r=Ne(n,360),a=Ne(t,360),c=a-r,p=a>r?c-360:c+360;return Math.abs(c)0?_:-_},T.bD=function(n,t){const r=Ne(n,2*Math.PI),a=Ne(t,2*Math.PI);return Math.min(Math.abs(r-a),Math.abs(r-a+2*Math.PI),Math.abs(r-a-2*Math.PI))},T.bE=function(){const n={},t=xe.$version;for(const r in xe.$root){const a=xe.$root[r];if(a.required){let c=null;c=r==="version"?t:a.type==="array"?[]:{},c!=null&&(n[r]=c)}}return n},T.bF=Nl,T.bG=de,T.bH=function n(t,r){if(Array.isArray(t)){if(!Array.isArray(r)||t.length!==r.length)return!1;for(let a=0;a{"source"in _&&a[_.source]?r.push({command:"removeLayer",args:[_.id]}):p.push(_)})),r=r.concat(c),(function(_,v,b){v=v||[];const S=(_=_||[]).map(Et),I=v.map(Et),L=_.reduce(hr,{}),F=v.reduce(hr,{}),V=S.slice(),U=Object.create(null);let W,J,le,Le,ye;for(let Ce=0,Xe=0;CeRe?(c=Math.acos(p),_=Math.sin(c),v=Math.sin((1-a)*c)/_,b=Math.sin(a*c)/_):(v=1-a,b=a),n[0]=v*S+b*V,n[1]=v*I+b*U,n[2]=v*L+b*W,n[3]=v*F+b*J,n},T.bd=function(n){const t=new Float64Array(9);var r,a,c,p,_,v,b,S,I,L,F,V,U,W,J,le,Le,ye;L=(c=(a=n)[0])*(b=c+c),F=(p=a[1])*b,U=(_=a[2])*b,W=_*(S=p+p),le=(v=a[3])*b,Le=v*S,ye=v*(I=_+_),(r=t)[0]=1-(V=p*S)-(J=_*I),r[3]=F-ye,r[6]=U+Le,r[1]=F+ye,r[4]=1-L-J,r[7]=W-le,r[2]=U-Le,r[5]=W+le,r[8]=1-L-V;const Ce=or(-Math.asin(Bt(t[2],-1,1)));let Xe,lt;return Math.hypot(t[5],t[8])<.001?(Xe=0,lt=-or(Math.atan2(t[3],t[4]))):(Xe=or(t[5]===0&&t[8]===0?0:Math.atan2(t[5],t[8])),lt=or(t[1]===0&&t[0]===0?0:Math.atan2(t[1],t[0]))),{roll:Xe,pitch:Ce+90,bearing:lt}},T.be=function(n,t){return n.roll==t.roll&&n.pitch==t.pitch&&n.bearing==t.bearing},T.bf=Pr,T.bg=yo,T.bh=Ql,T.bi=Tu,T.bj=Jl,T.bk=pt,T.bl=ot,T.bm=jn,T.bn=function(n,t,r,a,c){return pt(a,c,Bt((n-t)/(r-t),0,1))},T.bo=Ne,T.bp=function(){return new Float64Array(3)},T.bq=function(n,t,r,a){return n[0]=t[0]+r[0]*a,n[1]=t[1]+r[1]*a,n[2]=t[2]+r[2]*a,n},T.br=te,T.bs=function(n,t,r){var a=r[0],c=r[1],p=r[2],_=t[0],v=t[1],b=t[2],S=c*b-p*v,I=p*_-a*b,L=a*v-c*_,F=c*L-p*I,V=p*S-a*L,U=a*I-c*S,W=2*r[3];return I*=W,L*=W,V*=2,U*=2,n[0]=_+(S*=W)+(F*=2),n[1]=v+I+V,n[2]=b+L+U,n},T.bt=function(n,t,r){const a=(c=[n[0],n[1],n[2],t[0],t[1],t[2],r[0],r[1],r[2]])[0]*((I=c[8])*(_=c[4])-(v=c[5])*(S=c[7]))+c[1]*(-I*(p=c[3])+v*(b=c[6]))+c[2]*(S*p-_*b);var c,p,_,v,b,S,I;if(a===0)return null;const L=tt([],[t[0],t[1],t[2]],[r[0],r[1],r[2]]),F=tt([],[r[0],r[1],r[2]],[n[0],n[1],n[2]]),V=tt([],[n[0],n[1],n[2]],[t[0],t[1],t[2]]),U=De([],L,-n[3]);return et(U,U,De([],F,-t[3])),et(U,U,De([],V,-r[3])),De(U,U,1/a),U},T.bu=gf,T.bv=function(){return new Float64Array(4)},T.bw=function(n,t,r,a){var c=[],p=[];return c[0]=t[0]-r[0],c[1]=t[1]-r[1],c[2]=t[2]-r[2],p[0]=c[0]*Math.cos(a)-c[1]*Math.sin(a),p[1]=c[0]*Math.sin(a)+c[1]*Math.cos(a),p[2]=c[2],n[0]=p[0]+r[0],n[1]=p[1]+r[1],n[2]=p[2]+r[2],n},T.bx=function(n,t,r,a){var c=[],p=[];return c[0]=t[0]-r[0],c[1]=t[1]-r[1],c[2]=t[2]-r[2],p[0]=c[0],p[1]=c[1]*Math.cos(a)-c[2]*Math.sin(a),p[2]=c[1]*Math.sin(a)+c[2]*Math.cos(a),n[0]=p[0]+r[0],n[1]=p[1]+r[1],n[2]=p[2]+r[2],n},T.by=function(n,t,r,a){var c=[],p=[];return c[0]=t[0]-r[0],c[1]=t[1]-r[1],c[2]=t[2]-r[2],p[0]=c[2]*Math.sin(a)+c[0]*Math.cos(a),p[1]=c[1],p[2]=c[2]*Math.cos(a)-c[0]*Math.sin(a),n[0]=p[0]+r[0],n[1]=p[1]+r[1],n[2]=p[2]+r[2],n},T.bz=function(n,t,r){var a=Math.sin(r),c=Math.cos(r),p=t[0],_=t[1],v=t[2],b=t[3],S=t[8],I=t[9],L=t[10],F=t[11];return t!==n&&(n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15]),n[0]=p*c-S*a,n[1]=_*c-I*a,n[2]=v*c-L*a,n[3]=b*c-F*a,n[8]=p*a+S*c,n[9]=_*a+I*c,n[10]=v*a+L*c,n[11]=b*a+F*c,n},T.c=se,T.c0=$y,T.c1=class extends i{},T.c2=Yp,T.c3=function(n){return n<=1?1:Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))},T.c4=b_,T.c5=function(n,t,r){var a=t[0],c=t[1],p=t[2],_=r[3]*a+r[7]*c+r[11]*p+r[15];return n[0]=(r[0]*a+r[4]*c+r[8]*p+r[12])/(_=_||1),n[1]=(r[1]*a+r[5]*c+r[9]*p+r[13])/_,n[2]=(r[2]*a+r[6]*c+r[10]*p+r[14])/_,n},T.c6=class extends du{},T.c7=class extends P{},T.c8=function(n,t){return n[0]===t[0]&&n[1]===t[1]&&n[2]===t[2]&&n[3]===t[3]&&n[4]===t[4]&&n[5]===t[5]&&n[6]===t[6]&&n[7]===t[7]&&n[8]===t[8]&&n[9]===t[9]&&n[10]===t[10]&&n[11]===t[11]&&n[12]===t[12]&&n[13]===t[13]&&n[14]===t[14]&&n[15]===t[15]},T.c9=function(n,t){var r=n[0],a=n[1],c=n[2],p=n[3],_=n[4],v=n[5],b=n[6],S=n[7],I=n[8],L=n[9],F=n[10],V=n[11],U=n[12],W=n[13],J=n[14],le=n[15],Le=t[0],ye=t[1],Ce=t[2],Xe=t[3],lt=t[4],Pt=t[5],Xt=t[6],Vt=t[7],Gt=t[8],wr=t[9],$t=t[10],Ht=t[11],gt=t[12],jr=t[13],Gr=t[14],Ir=t[15];return Math.abs(r-Le)<=Re*Math.max(1,Math.abs(r),Math.abs(Le))&&Math.abs(a-ye)<=Re*Math.max(1,Math.abs(a),Math.abs(ye))&&Math.abs(c-Ce)<=Re*Math.max(1,Math.abs(c),Math.abs(Ce))&&Math.abs(p-Xe)<=Re*Math.max(1,Math.abs(p),Math.abs(Xe))&&Math.abs(_-lt)<=Re*Math.max(1,Math.abs(_),Math.abs(lt))&&Math.abs(v-Pt)<=Re*Math.max(1,Math.abs(v),Math.abs(Pt))&&Math.abs(b-Xt)<=Re*Math.max(1,Math.abs(b),Math.abs(Xt))&&Math.abs(S-Vt)<=Re*Math.max(1,Math.abs(S),Math.abs(Vt))&&Math.abs(I-Gt)<=Re*Math.max(1,Math.abs(I),Math.abs(Gt))&&Math.abs(L-wr)<=Re*Math.max(1,Math.abs(L),Math.abs(wr))&&Math.abs(F-$t)<=Re*Math.max(1,Math.abs(F),Math.abs($t))&&Math.abs(V-Ht)<=Re*Math.max(1,Math.abs(V),Math.abs(Ht))&&Math.abs(U-gt)<=Re*Math.max(1,Math.abs(U),Math.abs(gt))&&Math.abs(W-jr)<=Re*Math.max(1,Math.abs(W),Math.abs(jr))&&Math.abs(J-Gr)<=Re*Math.max(1,Math.abs(J),Math.abs(Gr))&&Math.abs(le-Ir)<=Re*Math.max(1,Math.abs(le),Math.abs(Ir))},T.cA=function(n,t){j.REGISTERED_PROTOCOLS[n]=t},T.cB=function(n){delete j.REGISTERED_PROTOCOLS[n]},T.cC=function(n,t){const r={};for(let c=0;cHt*Ci))}let Vt=_?"center":r.get("text-justify").evaluate(S,{},n.canonical);const Gt=r.get("symbol-placement")==="point"?r.get("text-max-width").evaluate(S,{},n.canonical)*Ci:1/0,wr=()=>{n.bucket.allowVerticalPlacement&&jl(Ce)&&(U.vertical=Ed(W,n.glyphMap,n.glyphPositions,n.imagePositions,I,Gt,p,Pt,"left",lt,le,T.ao.vertical,!0,F,L))};if(!_&&Xt){const $t=new Set;if(Vt==="auto")for(let gt=0;gt0||((c=v.addOrUpdateProperties)===null||c===void 0?void 0:c.length)>0);if((v.newGeometry||v.removeAllProperties||S)&&(b=Object.assign({},b),n.set(v.id,b),S&&(b.properties=Object.assign({},b.properties))),v.newGeometry&&(b.geometry=v.newGeometry),v.removeAllProperties)b.properties={};else if(((p=v.removeProperties)===null||p===void 0?void 0:p.length)>0)for(const I of v.removeProperties)Object.prototype.hasOwnProperty.call(b.properties,I)&&delete b.properties[I];if(((_=v.addOrUpdateProperties)===null||_===void 0?void 0:_.length)>0)for(const{key:I,value:L}of v.addOrUpdateProperties)b.properties[I]=L}},T.cX=Ea,T.ca=function(n,t){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},T.cb=n=>n.type==="symbol",T.cc=n=>n.type==="circle",T.cd=n=>n.type==="heatmap",T.ce=n=>n.type==="line",T.cf=n=>n.type==="fill",T.cg=n=>n.type==="fill-extrusion",T.ch=n=>n.type==="hillshade",T.ci=n=>n.type==="color-relief",T.cj=n=>n.type==="raster",T.ck=n=>n.type==="background",T.cl=n=>n.type==="custom",T.cm=ut,T.cn=function(n,t,r){const a=ge(t.x-r.x,t.y-r.y),c=ge(n.x-r.x,n.y-r.y);var p,_;return or(Math.atan2(a[0]*c[1]-a[1]*c[0],(p=a)[0]*(_=c)[0]+p[1]*_[1]))},T.co=St,T.cp=function(n,t){return Dr[t]&&(n instanceof MouseEvent||n instanceof WheelEvent)},T.cq=function(n,t){return Sr[t]&&"touches"in n},T.cr=function(n){return Sr[n]||Dr[n]},T.cs=function(n,t,r){var a=t[0],c=t[1];return n[0]=r[0]*a+r[4]*c+r[12],n[1]=r[1]*a+r[5]*c+r[13],n},T.ct=function(n,t){const{x:r,y:a}=ku.fromLngLat(t);return!(n<0||n>25||a<0||a>=1||r<0||r>=1)},T.cu=function(n,t){return n[0]=t[0],n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=t[1],n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=t[2],n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n},T.cv=class extends ds{},T.cw=E1,T.cy=function(n){return n.message===Zr},T.cz=ae,T.d=Ie,T.e=dt,T.f=n=>s(void 0,void 0,void 0,(function*(){if(n.byteLength===0)return createImageBitmap(new ImageData(1,1));const t=new Blob([new Uint8Array(n)],{type:"image/png"});try{return createImageBitmap(t)}catch(r){throw new Error(`Could not load image because of ${r.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}})),T.g=Z,T.h=n=>new Promise(((t,r)=>{const a=new Image;a.onload=()=>{t(a),URL.revokeObjectURL(a.src),a.onload=null,window.requestAnimationFrame((()=>{a.src=Ot}))},a.onerror=()=>r(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 c=new Blob([new Uint8Array(n)],{type:"image/png"});a.src=n.byteLength?URL.createObjectURL(c):Ot})),T.i=qt,T.j=(n,t)=>Se(dt(n,{type:"json"}),t),T.k=$e,T.l=st,T.m=Se,T.n=(n,t)=>Se(dt(n,{type:"arrayBuffer"}),t),T.o=function(n){return new lf(n).readFields(r1,[])},T.p=X_,T.q=vu,T.r=Zi,T.s=rr,T.t=xd,T.u=un,T.v=xe,T.w=Dt,T.x=Np,T.y=Ws,T.z=ls})),M("worker",["./shared"],(function(T){class s{constructor(j){this.keyCache={},j&&this.replace(j)}replace(j){this._layerConfigs={},this._layers={},this.update(j,[])}update(j,Z){for(const ae of j){this._layerConfigs[ae.id]=ae;const de=this._layers[ae.id]=T.bJ(ae);de._featureFilter=T.aa(de.filter),this.keyCache[ae.id]&&delete this.keyCache[ae.id]}for(const ae of Z)delete this.keyCache[ae],delete this._layerConfigs[ae],delete this._layers[ae];this.familiesBySource={};const X=T.cC(Object.values(this._layerConfigs),this.keyCache);for(const ae of X){const de=ae.map(($e=>this._layers[$e.id])),Se=de[0];if(Se.visibility==="none")continue;const Ie=Se.source||"";let be=this.familiesBySource[Ie];be||(be=this.familiesBySource[Ie]={});const Oe=Se.sourceLayer||"_geojsonTileLayer";let st=be[Oe];st||(st=be[Oe]=[]),st.push(de)}}}class B{constructor(j){const Z={},X=[];for(const Ie in j){const be=j[Ie],Oe=Z[Ie]={};for(const st in be){const $e=be[+st];if(!$e||$e.bitmap.width===0||$e.bitmap.height===0)continue;const Mt={x:0,y:0,w:$e.bitmap.width+2,h:$e.bitmap.height+2};X.push(Mt),Oe[st]={rect:Mt,metrics:$e.metrics}}}const{w:ae,h:de}=T.p(X),Se=new T.q({width:ae||1,height:de||1});for(const Ie in j){const be=j[Ie];for(const Oe in be){const st=be[+Oe];if(!st||st.bitmap.width===0||st.bitmap.height===0)continue;const $e=Z[Ie][Oe].rect;T.q.copy(st.bitmap,Se,{x:0,y:0},{x:$e.x+1,y:$e.y+1},st.bitmap)}}this.image=Se,this.positions=Z}}T.cD("GlyphAtlas",B);class N{constructor(j){this.tileID=new T.Z(j.tileID.overscaledZ,j.tileID.wrap,j.tileID.canonical.z,j.tileID.canonical.x,j.tileID.canonical.y),this.uid=j.uid,this.zoom=j.zoom,this.pixelRatio=j.pixelRatio,this.tileSize=j.tileSize,this.source=j.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=j.showCollisionBoxes,this.collectResourceTiming=!!j.collectResourceTiming,this.returnDependencies=!!j.returnDependencies,this.promoteId=j.promoteId,this.inFlightDependencies=[],this.globalState=j.globalState}parse(j,Z,X,ae,de){return T._(this,void 0,void 0,(function*(){this.status="parsing",this.data=j,this.collisionBoxArray=new T.a8;const Se=new T.cE(Object.keys(j.layers).sort()),Ie=new T.cF(this.tileID,this.promoteId);Ie.bucketLayerIDs=[];const be={},Oe={featureIndex:Ie,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:X,subdivisionGranularity:de},st=Z.familiesBySource[this.source];for(const jt in st){const Et=j.layers[jt];if(!Et)continue;Et.version===1&&T.w(`Vector tile source "${this.source}" layer "${jt}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const hr=Se.encode(jt),ht=[];for(let Hr=0;Hr=Yr.maxzoom||Yr.visibility!=="none"&&(Y(Hr,this.zoom,X),(be[Yr.id]=Yr.createBucket({index:Ie.bucketLayerIDs.length,layers:Hr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:hr,sourceID:this.source,globalState:this.globalState})).populate(ht,Oe,this.tileID.canonical),Ie.bucketLayerIDs.push(Hr.map((qr=>qr.id))))}}const $e=T.bN(Oe.glyphDependencies,(jt=>Object.keys(jt).map(Number)));this.inFlightDependencies.forEach((jt=>jt==null?void 0:jt.abort())),this.inFlightDependencies=[];let Mt=Promise.resolve({});if(Object.keys($e).length){const jt=new AbortController;this.inFlightDependencies.push(jt),Mt=ae.sendAsync({type:"GG",data:{stacks:$e,source:this.source,tileID:this.tileID,type:"glyphs"}},jt)}const xe=Object.keys(Oe.iconDependencies);let Ft=Promise.resolve({});if(xe.length){const jt=new AbortController;this.inFlightDependencies.push(jt),Ft=ae.sendAsync({type:"GI",data:{icons:xe,source:this.source,tileID:this.tileID,type:"icons"}},jt)}const cr=Object.keys(Oe.patternDependencies);let Jt=Promise.resolve({});if(cr.length){const jt=new AbortController;this.inFlightDependencies.push(jt),Jt=ae.sendAsync({type:"GI",data:{icons:cr,source:this.source,tileID:this.tileID,type:"patterns"}},jt)}const[Tr,Xr,dn]=yield Promise.all([Mt,Ft,Jt]),xn=new B(Tr),mn=new T.cG(Xr,dn);for(const jt in be){const Et=be[jt];Et instanceof T.a9?(Y(Et.layers,this.zoom,X),T.cH({bucket:Et,glyphMap:Tr,glyphPositions:xn.positions,imageMap:Xr,imagePositions:mn.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:Oe.subdivisionGranularity})):Et.hasPattern&&(Et instanceof T.cI||Et instanceof T.cJ||Et instanceof T.cK)&&(Y(Et.layers,this.zoom,X),Et.addFeatures(Oe,this.tileID.canonical,mn.patternPositions))}return this.status="done",{buckets:Object.values(be).filter((jt=>!jt.isEmpty())),featureIndex:Ie,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:xn.image,imageAtlas:mn,glyphMap:this.returnDependencies?Tr:null,iconMap:this.returnDependencies?Xr:null,glyphPositions:this.returnDependencies?xn.positions:null}}))}}function Y(se,j,Z){const X=new T.F(j);for(const ae of se)ae.recalculate(X,Z)}class K{constructor(j,Z,X){this.actor=j,this.layerIndex=Z,this.availableImages=X,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(j,Z){return T._(this,void 0,void 0,(function*(){const X=yield T.n(j.request,Z);try{return{vectorTile:new T.cL(new T.cM(X.data)),rawData:X.data,cacheControl:X.cacheControl,expires:X.expires}}catch(ae){const de=new Uint8Array(X.data);let Se=`Unable to parse the tile at ${j.request.url}, `;throw Se+=de[0]===31&&de[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${ae.message}`,new Error(Se)}}))}loadTile(j){return T._(this,void 0,void 0,(function*(){const Z=j.uid,X=!!(j&&j.request&&j.request.collectResourceTiming)&&new T.cN(j.request),ae=new N(j);this.loading[Z]=ae;const de=new AbortController;ae.abort=de;try{const Se=yield this.loadVectorTile(j,de);if(delete this.loading[Z],!Se)return null;const Ie=Se.rawData,be={};Se.expires&&(be.expires=Se.expires),Se.cacheControl&&(be.cacheControl=Se.cacheControl);const Oe={};if(X){const $e=X.finish();$e&&(Oe.resourceTiming=JSON.parse(JSON.stringify($e)))}ae.vectorTile=Se.vectorTile;const st=ae.parse(Se.vectorTile,this.layerIndex,this.availableImages,this.actor,j.subdivisionGranularity);this.loaded[Z]=ae,this.fetching[Z]={rawTileData:Ie,cacheControl:be,resourceTiming:Oe};try{const $e=yield st;return T.e({rawTileData:Ie.slice(0)},$e,be,Oe)}finally{delete this.fetching[Z]}}catch(Se){throw delete this.loading[Z],ae.status="done",this.loaded[Z]=ae,Se}}))}reloadTile(j){return T._(this,void 0,void 0,(function*(){const Z=j.uid;if(!this.loaded||!this.loaded[Z])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const X=this.loaded[Z];if(X.showCollisionBoxes=j.showCollisionBoxes,X.globalState=j.globalState,X.status==="parsing"){const ae=yield X.parse(X.vectorTile,this.layerIndex,this.availableImages,this.actor,j.subdivisionGranularity);let de;if(this.fetching[Z]){const{rawTileData:Se,cacheControl:Ie,resourceTiming:be}=this.fetching[Z];delete this.fetching[Z],de=T.e({rawTileData:Se.slice(0)},ae,Ie,be)}else de=ae;return de}if(X.status==="done"&&X.vectorTile)return X.parse(X.vectorTile,this.layerIndex,this.availableImages,this.actor,j.subdivisionGranularity)}))}abortTile(j){return T._(this,void 0,void 0,(function*(){const Z=this.loading,X=j.uid;Z&&Z[X]&&Z[X].abort&&(Z[X].abort.abort(),delete Z[X])}))}removeTile(j){return T._(this,void 0,void 0,(function*(){this.loaded&&this.loaded[j.uid]&&delete this.loaded[j.uid]}))}}class ie{constructor(){this.loaded={}}loadTile(j){return T._(this,void 0,void 0,(function*(){const{uid:Z,encoding:X,rawImageData:ae,redFactor:de,greenFactor:Se,blueFactor:Ie,baseShift:be}=j,Oe=ae.width+2,st=ae.height+2,$e=T.b(ae)?new T.R({width:Oe,height:st},yield T.cO(ae,-1,-1,Oe,st)):ae,Mt=new T.cP(Z,$e,X,de,Se,Ie,be);return this.loaded=this.loaded||{},this.loaded[Z]=Mt,Mt}))}removeTile(j){const Z=this.loaded,X=j.uid;Z&&Z[X]&&delete Z[X]}}var H,me,ve=(function(){if(me)return H;function se(Z,X){if(Z.length!==0){j(Z[0],X);for(var ae=1;ae=Math.abs(Oe)?ae-st+Oe:Oe-st+ae,ae=st}ae+de>=0!=!!X&&Z.reverse()}return me=1,H=function Z(X,ae){var de,Se=X&&X.type;if(Se==="FeatureCollection")for(de=0;de>31}function He(se,j){const Z=se.loadGeometry(),X=se.type;let ae=0,de=0;for(const Se of Z){let Ie=1;X===1&&(Ie=Se.length),j.writeVarint(rt(1,Ie));const be=X===3?Se.length-1:Se.length;for(let Oe=0;Oese},tt=Math.fround||(nt=new Float32Array(1),se=>(nt[0]=+se,nt[0]));var nt;class Ze{constructor(j){this.options=Object.assign(Object.create(De),j),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(j){const{log:Z,minZoom:X,maxZoom:ae}=this.options;Z&&console.time("total time");const de=`prepare ${j.length} points`;Z&&console.time(de),this.points=j;const Se=[];for(let be=0;be=X;be--){const Oe=+Date.now();Ie=this.trees[be]=this._createTree(this._cluster(Ie,be)),Z&&console.log("z%d: %d clusters in %dms",be,Ie.numItems,+Date.now()-Oe)}return Z&&console.timeEnd("total time"),this}getClusters(j,Z){let X=((j[0]+180)%360+360)%360-180;const ae=Math.max(-90,Math.min(90,j[1]));let de=j[2]===180?180:((j[2]+180)%360+360)%360-180;const Se=Math.max(-90,Math.min(90,j[3]));if(j[2]-j[0]>=360)X=-180,de=180;else if(X>de){const $e=this.getClusters([X,ae,180,Se],Z),Mt=this.getClusters([-180,ae,de,Se],Z);return $e.concat(Mt)}const Ie=this.trees[this._limitZoom(Z)],be=Ie.range(te(X),re(Se),te(de),re(ae)),Oe=Ie.data,st=[];for(const $e of be){const Mt=this.stride*$e;st.push(Oe[Mt+5]>1?ke(Oe,Mt,this.clusterProps):this.points[Oe[Mt+3]])}return st}getChildren(j){const Z=this._getOriginId(j),X=this._getOriginZoom(j),ae="No cluster with the specified id.",de=this.trees[X];if(!de)throw new Error(ae);const Se=de.data;if(Z*this.stride>=Se.length)throw new Error(ae);const Ie=this.options.radius/(this.options.extent*Math.pow(2,X-1)),be=de.within(Se[Z*this.stride],Se[Z*this.stride+1],Ie),Oe=[];for(const st of be){const $e=st*this.stride;Se[$e+4]===j&&Oe.push(Se[$e+5]>1?ke(Se,$e,this.clusterProps):this.points[Se[$e+3]])}if(Oe.length===0)throw new Error(ae);return Oe}getLeaves(j,Z,X){const ae=[];return this._appendLeaves(ae,j,Z=Z||10,X=X||0,0),ae}getTile(j,Z,X){const ae=this.trees[this._limitZoom(j)],de=Math.pow(2,j),{extent:Se,radius:Ie}=this.options,be=Ie/Se,Oe=(X-be)/de,st=(X+1+be)/de,$e={features:[]};return this._addTileFeatures(ae.range((Z-be)/de,Oe,(Z+1+be)/de,st),ae.data,Z,X,de,$e),Z===0&&this._addTileFeatures(ae.range(1-be/de,Oe,1,st),ae.data,de,X,de,$e),Z===de-1&&this._addTileFeatures(ae.range(0,Oe,be/de,st),ae.data,-1,X,de,$e),$e.features.length?$e:null}getClusterExpansionZoom(j){let Z=this._getOriginZoom(j)-1;for(;Z<=this.options.maxZoom;){const X=this.getChildren(j);if(Z++,X.length!==1)break;j=X[0].properties.cluster_id}return Z}_appendLeaves(j,Z,X,ae,de){const Se=this.getChildren(Z);for(const Ie of Se){const be=Ie.properties;if(be&&be.cluster?de+be.point_count<=ae?de+=be.point_count:de=this._appendLeaves(j,be.cluster_id,X,ae,de):de1;let st,$e,Mt;if(Oe)st=bt(Z,be,this.clusterProps),$e=Z[be],Mt=Z[be+1];else{const cr=this.points[Z[be+3]];st=cr.properties;const[Jt,Tr]=cr.geometry.coordinates;$e=te(Jt),Mt=re(Tr)}const xe={type:1,geometry:[[Math.round(this.options.extent*($e*de-X)),Math.round(this.options.extent*(Mt*de-ae))]],tags:st};let Ft;Ft=Oe||this.options.generateId?Z[be+3]:this.points[Z[be+3]].id,Ft!==void 0&&(xe.id=Ft),Se.features.push(xe)}}_limitZoom(j){return Math.max(this.options.minZoom,Math.min(Math.floor(+j),this.options.maxZoom+1))}_cluster(j,Z){const{radius:X,extent:ae,reduce:de,minPoints:Se}=this.options,Ie=X/(ae*Math.pow(2,Z)),be=j.data,Oe=[],st=this.stride;for(let $e=0;$eZ&&(Jt+=be[Xr+5])}if(Jt>cr&&Jt>=Se){let Tr,Xr=Mt*cr,dn=xe*cr,xn=-1;const mn=($e/st<<5)+(Z+1)+this.points.length;for(const jt of Ft){const Et=jt*st;if(be[Et+2]<=Z)continue;be[Et+2]=Z;const hr=be[Et+5];Xr+=be[Et]*hr,dn+=be[Et+1]*hr,be[Et+4]=mn,de&&(Tr||(Tr=this._map(be,$e,!0),xn=this.clusterProps.length,this.clusterProps.push(Tr)),de(Tr,this._map(be,Et)))}be[$e+4]=mn,Oe.push(Xr/Jt,dn/Jt,1/0,mn,-1,Jt),de&&Oe.push(xn)}else{for(let Tr=0;Tr1)for(const Tr of Ft){const Xr=Tr*st;if(!(be[Xr+2]<=Z)){be[Xr+2]=Z;for(let dn=0;dn>5}_getOriginZoom(j){return(j-this.points.length)%32}_map(j,Z,X){if(j[Z+5]>1){const Se=this.clusterProps[j[Z+6]];return X?Object.assign({},Se):Se}const ae=this.points[j[Z+3]].properties,de=this.options.map(ae);return X&&de===ae?Object.assign({},de):de}}function ke(se,j,Z){return{type:"Feature",id:se[j+3],properties:bt(se,j,Z),geometry:{type:"Point",coordinates:[(X=se[j],360*(X-.5)),ge(se[j+1])]}};var X}function bt(se,j,Z){const X=se[j+5],ae=X>=1e4?`${Math.round(X/1e3)}k`:X>=1e3?Math.round(X/100)/10+"k":X,de=se[j+6],Se=de===-1?{}:Object.assign({},Z[de]);return Object.assign(Se,{cluster:!0,cluster_id:se[j+3],point_count:X,point_count_abbreviated:ae})}function te(se){return se/360+.5}function re(se){const j=Math.sin(se*Math.PI/180),Z=.5-.25*Math.log((1+j)/(1-j))/Math.PI;return Z<0?0:Z>1?1:Z}function ge(se){const j=(180-360*se)*Math.PI/180;return 360*Math.atan(Math.exp(j))/Math.PI-90}function oe(se,j,Z,X){let ae=X;const de=j+(Z-j>>1);let Se,Ie=Z-j;const be=se[j],Oe=se[j+1],st=se[Z],$e=se[Z+1];for(let Mt=j+3;Mtae)Se=Mt,ae=xe;else if(xe===ae){const Ft=Math.abs(Mt-de);FtX&&(Se-j>3&&oe(se,j,Se,X),se[Se+2]=ae,Z-Se>3&&oe(se,Se,Z,X))}function Ae(se,j,Z,X,ae,de){let Se=ae-Z,Ie=de-X;if(Se!==0||Ie!==0){const be=((se-Z)*Se+(j-X)*Ie)/(Se*Se+Ie*Ie);be>1?(Z=ae,X=de):be>0&&(Z+=Se*be,X+=Ie*be)}return Se=se-Z,Ie=j-X,Se*Se+Ie*Ie}function Ne(se,j,Z,X){const ae={id:se??null,type:j,geometry:Z,tags:X,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(j==="Point"||j==="MultiPoint"||j==="LineString")pt(ae,Z);else if(j==="Polygon")pt(ae,Z[0]);else if(j==="MultiLineString")for(const de of Z)pt(ae,de);else if(j==="MultiPolygon")for(const de of Z)pt(ae,de[0]);return ae}function pt(se,j){for(let Z=0;Z0&&(Se+=X?(ae*st-Oe*de)/2:Math.sqrt(Math.pow(Oe-ae,2)+Math.pow(st-de,2))),ae=Oe,de=st}const Ie=j.length-3;j[2]=1,oe(j,0,Ie,Z),j[Ie+2]=1,j.size=Math.abs(Se),j.start=0,j.end=j.size}function Bt(se,j,Z,X){for(let ae=0;ae1?1:Z}function vt(se,j,Z,X,ae,de,Se,Ie){if(X/=j,de>=(Z/=j)&&Se=X)return null;const be=[];for(const Oe of se){const st=Oe.geometry;let $e=Oe.type;const Mt=ae===0?Oe.minX:Oe.minY,xe=ae===0?Oe.maxX:Oe.maxY;if(Mt>=Z&&xe=X)continue;let Ft=[];if($e==="Point"||$e==="MultiPoint")yt(st,Ft,Z,X,ae);else if($e==="LineString")It(st,Ft,Z,X,ae,!1,Ie.lineMetrics);else if($e==="MultiLineString")mt(st,Ft,Z,X,ae,!1);else if($e==="Polygon")mt(st,Ft,Z,X,ae,!0);else if($e==="MultiPolygon")for(const cr of st){const Jt=[];mt(cr,Jt,Z,X,ae,!0),Jt.length&&Ft.push(Jt)}if(Ft.length){if(Ie.lineMetrics&&$e==="LineString"){for(const cr of Ft)be.push(Ne(Oe.id,$e,cr,Oe.tags));continue}$e!=="LineString"&&$e!=="MultiLineString"||(Ft.length===1?($e="LineString",Ft=Ft[0]):$e="MultiLineString"),$e!=="Point"&&$e!=="MultiPoint"||($e=Ft.length===3?"Point":"MultiPoint"),be.push(Ne(Oe.id,$e,Ft,Oe.tags))}}return be.length?be:null}function yt(se,j,Z,X,ae){for(let de=0;de=Z&&Se<=X&&Dt(j,se[de],se[de+1],se[de+2])}}function It(se,j,Z,X,ae,de,Se){let Ie=wt(se);const be=ae===0?zt:qt;let Oe,st,$e=se.start;for(let Jt=0;JtZ&&(st=be(Ie,Tr,Xr,xn,mn,Z),Se&&(Ie.start=$e+Oe*st)):jt>X?Et=Z&&(st=be(Ie,Tr,Xr,xn,mn,Z),hr=!0),Et>X&&jt<=X&&(st=be(Ie,Tr,Xr,xn,mn,X),hr=!0),!de&&hr&&(Se&&(Ie.end=$e+Oe*st),j.push(Ie),Ie=wt(se)),Se&&($e+=Oe)}let Mt=se.length-3;const xe=se[Mt],Ft=se[Mt+1],cr=ae===0?xe:Ft;cr>=Z&&cr<=X&&Dt(Ie,xe,Ft,se[Mt+2]),Mt=Ie.length-3,de&&Mt>=3&&(Ie[Mt]!==Ie[0]||Ie[Mt+1]!==Ie[1])&&Dt(Ie,Ie[0],Ie[1],Ie[2]),Ie.length&&j.push(Ie)}function wt(se){const j=[];return j.size=se.size,j.start=se.start,j.end=se.end,j}function mt(se,j,Z,X,ae,de){for(const Se of se)It(Se,j,Z,X,ae,de,!1)}function Dt(se,j,Z,X){se.push(j,Z,X)}function zt(se,j,Z,X,ae,de){const Se=(de-j)/(X-j);return Dt(se,de,Z+(ae-Z)*Se,1),Se}function qt(se,j,Z,X,ae,de){const Se=(de-Z)/(ae-Z);return Dt(se,j+(X-j)*Se,de,1),Se}function tr(se,j){const Z=[];for(let X=0;X0&&j.size<(ae?Se:X))return void(Z.numPoints+=j.length/3);const Ie=[];for(let be=0;beSe)&&(Z.numSimplified++,Ie.push(j[be],j[be+1])),Z.numPoints++;ae&&(function(be,Oe){let st=0;for(let $e=0,Mt=be.length,xe=Mt-2;$e0===Oe)for(let $e=0,Mt=be.length;$e24)throw new Error("maxZoom should be in the 0-24 range");if(Z.promoteId&&Z.generateId)throw new Error("promoteId and generateId cannot be used together.");let ae=(function(de,Se){const Ie=[];if(de.type==="FeatureCollection")for(let be=0;be1&&console.time("creation"),xe=this.tiles[Mt]=kr(j,Z,X,ae,Oe),this.tileCoords.push({z:Z,x:X,y:ae}),st)){st>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Z,X,ae,xe.numFeatures,xe.numPoints,xe.numSimplified),console.timeEnd("creation"));const hr=`z${Z}`;this.stats[hr]=(this.stats[hr]||0)+1,this.total++}if(xe.source=j,de==null){if(Z===Oe.indexMaxZoom||xe.numPoints<=Oe.indexMaxPoints)continue}else{if(Z===Oe.maxZoom||Z===de)continue;if(de!=null){const hr=de-Z;if(X!==Se>>hr||ae!==Ie>>hr)continue}}if(xe.source=null,j.length===0)continue;st>1&&console.time("clipping");const Ft=.5*Oe.buffer/Oe.extent,cr=.5-Ft,Jt=.5+Ft,Tr=1+Ft;let Xr=null,dn=null,xn=null,mn=null,jt=vt(j,$e,X-Ft,X+Jt,0,xe.minX,xe.maxX,Oe),Et=vt(j,$e,X+cr,X+Tr,0,xe.minX,xe.maxX,Oe);j=null,jt&&(Xr=vt(jt,$e,ae-Ft,ae+Jt,1,xe.minY,xe.maxY,Oe),dn=vt(jt,$e,ae+cr,ae+Tr,1,xe.minY,xe.maxY,Oe),jt=null),Et&&(xn=vt(Et,$e,ae-Ft,ae+Jt,1,xe.minY,xe.maxY,Oe),mn=vt(Et,$e,ae+cr,ae+Tr,1,xe.minY,xe.maxY,Oe),Et=null),st>1&&console.timeEnd("clipping"),be.push(Xr||[],Z+1,2*X,2*ae),be.push(dn||[],Z+1,2*X,2*ae+1),be.push(xn||[],Z+1,2*X+1,2*ae),be.push(mn||[],Z+1,2*X+1,2*ae+1)}}getTile(j,Z,X){j=+j,Z=+Z,X=+X;const ae=this.options,{extent:de,debug:Se}=ae;if(j<0||j>24)return null;const Ie=1<1&&console.log("drilling down to z%d-%d-%d",j,Z,X);let Oe,st=j,$e=Z,Mt=X;for(;!Oe&&st>0;)st--,$e>>=1,Mt>>=1,Oe=this.tiles[Sr(st,$e,Mt)];return Oe&&Oe.source?(Se>1&&(console.log("found parent tile z%d-%d-%d",st,$e,Mt),console.time("drilling down")),this.splitTile(Oe.source,st,$e,Mt,j,Z,X),Se>1&&console.timeEnd("drilling down"),this.tiles[be]?Ot(this.tiles[be],de):null):null}}function Sr(se,j,Z){return 32*((1<{$e.properties=xe;const Ft={};for(const cr of Mt)Ft[cr]=be[cr].evaluate(st,$e);return Ft},Se.reduce=(xe,Ft)=>{$e.properties=Ft;for(const cr of Mt)st.accumulated=xe[cr],xe[cr]=Oe[cr].evaluate(st,$e)},Se})(j)).load(ae.features):(function(Se,Ie){return new or(Se,Ie)})(ae,j.geojsonVtOptions),this.loaded={};const de={data:ae};if(X){const Se=X.finish();Se&&(de.resourceTiming={},de.resourceTiming[j.source]=JSON.parse(JSON.stringify(Se)))}return de}catch(ae){if(delete this._pendingRequest,T.cy(ae))return{abandoned:!0};throw ae}}))}getData(){return T._(this,void 0,void 0,(function*(){return this._pendingData}))}reloadTile(j){const Z=this.loaded;return Z&&Z[j.uid]?super.reloadTile(j):this.loadTile(j)}loadAndProcessGeoJSON(j,Z){return T._(this,void 0,void 0,(function*(){let X=yield this.loadGeoJSON(j,Z);if(delete this._pendingRequest,typeof X!="object")throw new Error(`Input data given to '${j.source}' is not a valid GeoJSON object.`);if(Me(X,!0),j.filter){const ae=T.cT(j.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(ae.result==="error")throw new Error(ae.value.map((Se=>`${Se.key}: ${Se.message}`)).join(", "));X={type:"FeatureCollection",features:X.features.filter((Se=>ae.value.evaluate({zoom:0},Se)))}}return X}))}loadGeoJSON(j,Z){return T._(this,void 0,void 0,(function*(){const{promoteId:X}=j;if(j.request){const ae=yield T.j(j.request,Z);return this._dataUpdateable=T.cV(ae.data,X)?T.cU(ae.data,X):void 0,ae.data}if(typeof j.data=="string")try{const ae=JSON.parse(j.data);return this._dataUpdateable=T.cV(ae,X)?T.cU(ae,X):void 0,ae}catch{throw new Error(`Input data given to '${j.source}' is not a valid GeoJSON object.`)}if(!j.dataDiff)throw new Error(`Input data given to '${j.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${j.source}`);return T.cW(this._dataUpdateable,j.dataDiff,X),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}}))}removeSource(j){return T._(this,void 0,void 0,(function*(){this._pendingRequest&&this._pendingRequest.abort()}))}getClusterExpansionZoom(j){return this._geoJSONIndex.getClusterExpansionZoom(j.clusterId)}getClusterChildren(j){return this._geoJSONIndex.getChildren(j.clusterId)}getClusterLeaves(j){return this._geoJSONIndex.getLeaves(j.clusterId,j.limit,j.offset)}}class Zr{constructor(j){this.self=j,this.actor=new T.J(j),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Z,X)=>{if(this.externalWorkerSourceTypes[Z])throw new Error(`Worker source with name "${Z}" already registered.`);this.externalWorkerSourceTypes[Z]=X},this.self.addProtocol=T.cA,this.self.removeProtocol=T.cB,this.self.registerRTLTextPlugin=Z=>{T.cX.setMethods(Z)},this.actor.registerMessageHandler("LDT",((Z,X)=>this._getDEMWorkerSource(Z,X.source).loadTile(X))),this.actor.registerMessageHandler("RDT",((Z,X)=>T._(this,void 0,void 0,(function*(){this._getDEMWorkerSource(Z,X.source).removeTile(X)})))),this.actor.registerMessageHandler("GCEZ",((Z,X)=>T._(this,void 0,void 0,(function*(){return this._getWorkerSource(Z,X.type,X.source).getClusterExpansionZoom(X)})))),this.actor.registerMessageHandler("GCC",((Z,X)=>T._(this,void 0,void 0,(function*(){return this._getWorkerSource(Z,X.type,X.source).getClusterChildren(X)})))),this.actor.registerMessageHandler("GCL",((Z,X)=>T._(this,void 0,void 0,(function*(){return this._getWorkerSource(Z,X.type,X.source).getClusterLeaves(X)})))),this.actor.registerMessageHandler("LD",((Z,X)=>this._getWorkerSource(Z,X.type,X.source).loadData(X))),this.actor.registerMessageHandler("GD",((Z,X)=>this._getWorkerSource(Z,X.type,X.source).getData())),this.actor.registerMessageHandler("LT",((Z,X)=>this._getWorkerSource(Z,X.type,X.source).loadTile(X))),this.actor.registerMessageHandler("RT",((Z,X)=>this._getWorkerSource(Z,X.type,X.source).reloadTile(X))),this.actor.registerMessageHandler("AT",((Z,X)=>this._getWorkerSource(Z,X.type,X.source).abortTile(X))),this.actor.registerMessageHandler("RMT",((Z,X)=>this._getWorkerSource(Z,X.type,X.source).removeTile(X))),this.actor.registerMessageHandler("RS",((Z,X)=>T._(this,void 0,void 0,(function*(){if(!this.workerSources[Z]||!this.workerSources[Z][X.type]||!this.workerSources[Z][X.type][X.source])return;const ae=this.workerSources[Z][X.type][X.source];delete this.workerSources[Z][X.type][X.source],ae.removeSource!==void 0&&ae.removeSource(X)})))),this.actor.registerMessageHandler("RM",(Z=>T._(this,void 0,void 0,(function*(){delete this.layerIndexes[Z],delete this.availableImages[Z],delete this.workerSources[Z],delete this.demWorkerSources[Z]})))),this.actor.registerMessageHandler("SR",((Z,X)=>T._(this,void 0,void 0,(function*(){this.referrer=X})))),this.actor.registerMessageHandler("SRPS",((Z,X)=>this._syncRTLPluginState(Z,X))),this.actor.registerMessageHandler("IS",((Z,X)=>T._(this,void 0,void 0,(function*(){this.self.importScripts(X)})))),this.actor.registerMessageHandler("SI",((Z,X)=>this._setImages(Z,X))),this.actor.registerMessageHandler("UL",((Z,X)=>T._(this,void 0,void 0,(function*(){this._getLayerIndex(Z).update(X.layers,X.removedIds)})))),this.actor.registerMessageHandler("SL",((Z,X)=>T._(this,void 0,void 0,(function*(){this._getLayerIndex(Z).replace(X)}))))}_setImages(j,Z){return T._(this,void 0,void 0,(function*(){this.availableImages[j]=Z;for(const X in this.workerSources[j]){const ae=this.workerSources[j][X];for(const de in ae)ae[de].availableImages=Z}}))}_syncRTLPluginState(j,Z){return T._(this,void 0,void 0,(function*(){return yield T.cX.syncState(Z,this.self.importScripts)}))}_getAvailableImages(j){let Z=this.availableImages[j];return Z||(Z=[]),Z}_getLayerIndex(j){let Z=this.layerIndexes[j];return Z||(Z=this.layerIndexes[j]=new s),Z}_getWorkerSource(j,Z,X){if(this.workerSources[j]||(this.workerSources[j]={}),this.workerSources[j][Z]||(this.workerSources[j][Z]={}),!this.workerSources[j][Z][X]){const ae={sendAsync:(de,Se)=>(de.targetMapId=j,this.actor.sendAsync(de,Se))};switch(Z){case"vector":this.workerSources[j][Z][X]=new K(ae,this._getLayerIndex(j),this._getAvailableImages(j));break;case"geojson":this.workerSources[j][Z][X]=new Dr(ae,this._getLayerIndex(j),this._getAvailableImages(j));break;default:this.workerSources[j][Z][X]=new this.externalWorkerSourceTypes[Z](ae,this._getLayerIndex(j),this._getAvailableImages(j))}}return this.workerSources[j][Z][X]}_getDEMWorkerSource(j,Z){return this.demWorkerSources[j]||(this.demWorkerSources[j]={}),this.demWorkerSources[j][Z]||(this.demWorkerSources[j][Z]=new ie),this.demWorkerSources[j][Z]}}return T.i(self)&&(self.worker=new Zr(self)),Zr})),M("index",["exports","./shared"],(function(T,s){var B="5.6.2";function N(){var h=new s.A(4);return s.A!=Float32Array&&(h[1]=0,h[2]=0),h[0]=1,h[3]=1,h}let Y,K;const ie={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frame(h,e,i){const l=requestAnimationFrame((d=>{u(),e(d)})),{unsubscribe:u}=s.s(h.signal,"abort",(()=>{u(),cancelAnimationFrame(l),i(s.c())}),!1)},frameAsync(h){return new Promise(((e,i)=>{this.frame(h,e,i)}))},getImageData(h,e=0){return this.getImageCanvasContext(h).getImageData(-e,-e,h.width+2*e,h.height+2*e)},getImageCanvasContext(h){const e=window.document.createElement("canvas"),i=e.getContext("2d",{willReadFrequently:!0});if(!i)throw new Error("failed to create canvas 2d context");return e.width=h.width,e.height=h.height,i.drawImage(h,0,0,h.width,h.height),i},resolveURL:h=>(Y||(Y=document.createElement("a")),Y.href=h,Y.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(K==null&&(K=matchMedia("(prefers-reduced-motion: reduce)")),K.matches)}};class H{static testProp(e){if(!H.docStyle)return e[0];for(let i=0;i{window.removeEventListener("click",H.suppressClickInternal,!0)}),0)}static getScale(e){const i=e.getBoundingClientRect();return{x:i.width/e.offsetWidth||1,y:i.height/e.offsetHeight||1,boundingClientRect:i}}static getPoint(e,i,l){const u=i.boundingClientRect;return new s.P((l.clientX-u.left)/i.x-e.clientLeft,(l.clientY-u.top)/i.y-e.clientTop)}static mousePos(e,i){const l=H.getScale(e);return H.getPoint(e,l,i)}static touchPos(e,i){const l=[],u=H.getScale(e);for(let d=0;d{ve&&ze(ve),ve=null,Re=!0},Me.onerror=()=>{Ee=!0,ve=null},Me.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),(function(h){let e,i,l,u;h.resetRequestQueue=()=>{e=[],i=0,l=0,u={}},h.addThrottleControl=C=>{const P=l++;return u[P]=C,P},h.removeThrottleControl=C=>{delete u[C],g()},h.getImage=(C,P,A=!0)=>new Promise(((R,D)=>{me.supported&&(C.headers||(C.headers={}),C.headers.accept="image/webp,*/*"),s.e(C,{type:"image"}),e.push({abortController:P,requestParameters:C,supportImageRefresh:A,state:"queued",onError:O=>{D(O)},onSuccess:O=>{R(O)}}),g()}));const d=C=>s._(this,void 0,void 0,(function*(){C.state="running";const{requestParameters:P,supportImageRefresh:A,onError:R,onSuccess:D,abortController:O}=C,$=A===!1&&!s.i(self)&&!s.g(P.url)&&(!P.headers||Object.keys(P.headers).reduce(((ne,ue)=>ne&&ue==="accept"),!0));i++;const ee=$?w(P,O):s.m(P,O);try{const ne=yield ee;delete C.abortController,C.state="completed",ne.data instanceof HTMLImageElement||s.b(ne.data)?D(ne):ne.data&&D({data:yield(Q=ne.data,typeof createImageBitmap=="function"?s.f(Q):s.h(Q)),cacheControl:ne.cacheControl,expires:ne.expires})}catch(ne){delete C.abortController,R(ne)}finally{i--,g()}var Q})),g=()=>{const C=(()=>{for(const P of Object.keys(u))if(u[P]())return!0;return!1})()?s.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:s.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let P=i;P0;P++){const A=e.shift();A.abortController.signal.aborted?P--:d(A)}},w=(C,P)=>new Promise(((A,R)=>{const D=new Image,O=C.url,$=C.credentials;$&&$==="include"?D.crossOrigin="use-credentials":($&&$==="same-origin"||!s.d(O))&&(D.crossOrigin="anonymous"),P.signal.addEventListener("abort",(()=>{D.src="",R(s.c())})),D.fetchPriority="high",D.onload=()=>{D.onerror=D.onload=null,A({data:D})},D.onerror=()=>{D.onerror=D.onload=null,P.signal.aborted||R(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."))},D.src=O}))})(Fe||(Fe={})),Fe.resetRequestQueue();class Ke{constructor(e){this._transformRequestFn=e??null}transformRequest(e,i){return this._transformRequestFn&&this._transformRequestFn(e,i)||{url:e}}setTransformRequest(e){this._transformRequestFn=e}}function rt(h){const e=[];if(typeof h=="string")e.push({id:"default",url:h});else if(h&&h.length>0){const i=[];for(const{id:l,url:u}of h){const d=`${l}${u}`;i.indexOf(d)===-1&&(i.push(d),e.push({id:l,url:u}))}}return e}function qe(h,e,i){try{const l=new URL(h);return l.pathname+=`${e}${i}`,l.toString()}catch{throw new Error(`Invalid sprite URL "${h}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function He(h){const{userImage:e}=h;return!!(e&&e.render&&e.render())&&(h.data.replace(new Uint8Array(e.data.buffer)),!0)}class et extends s.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new s.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(const{ids:i,promiseResolve:l}of this.requestors)l(this._getImagesForIds(i));this.requestors=[]}}getImage(e){const i=this.images[e];if(i&&!i.data&&i.spriteData){const l=i.spriteData;i.data=new s.R({width:l.width,height:l.height},l.context.getImageData(l.x,l.y,l.width,l.height).data),i.spriteData=null}return i}addImage(e,i){if(this.images[e])throw new Error(`Image id ${e} already exist, use updateImage instead`);this._validate(e,i)&&(this.images[e]=i)}_validate(e,i){let l=!0;const u=i.data||i.spriteData;return this._validateStretch(i.stretchX,u&&u.width)||(this.fire(new s.k(new Error(`Image "${e}" has invalid "stretchX" value`))),l=!1),this._validateStretch(i.stretchY,u&&u.height)||(this.fire(new s.k(new Error(`Image "${e}" has invalid "stretchY" value`))),l=!1),this._validateContent(i.content,i)||(this.fire(new s.k(new Error(`Image "${e}" has invalid "content" value`))),l=!1),l}_validateStretch(e,i){if(!e)return!0;let l=0;for(const u of e){if(u[0]{let u=!0;if(!this.isLoaded())for(const d of e)this.images[d]||(u=!1);this.isLoaded()||u?i(this._getImagesForIds(e)):this.requestors.push({ids:e,promiseResolve:i})}))}_getImagesForIds(e){const i={};for(const l of e){let u=this.getImage(l);u||(this.fire(new s.l("styleimagemissing",{id:l})),u=this.getImage(l)),u?i[l]={data:u.data.clone(),pixelRatio:u.pixelRatio,sdf:u.sdf,version:u.version,stretchX:u.stretchX,stretchY:u.stretchY,content:u.content,textFitWidth:u.textFitWidth,textFitHeight:u.textFitHeight,hasRenderCallback:!!(u.userImage&&u.userImage.render)}:s.w(`Image "${l}" 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 i}getPixelSize(){const{width:e,height:i}=this.atlasImage;return{width:e,height:i}}getPattern(e){const i=this.patterns[e],l=this.getImage(e);if(!l)return null;if(i&&i.position.version===l.version)return i.position;if(i)i.position.version=l.version;else{const u={w:l.data.width+2,h:l.data.height+2,x:0,y:0},d=new s.I(u,l);this.patterns[e]={bin:u,position:d}}return this._updatePatternAtlas(),this.patterns[e].position}bind(e){const i=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new s.T(e,this.atlasImage,i.RGBA),this.atlasTexture.bind(i.LINEAR,i.CLAMP_TO_EDGE)}_updatePatternAtlas(){const e=[];for(const d in this.patterns)e.push(this.patterns[d].bin);const{w:i,h:l}=s.p(e),u=this.atlasImage;u.resize({width:i||1,height:l||1});for(const d in this.patterns){const{bin:g}=this.patterns[d],w=g.x+1,C=g.y+1,P=this.getImage(d).data,A=P.width,R=P.height;s.R.copy(P,u,{x:0,y:0},{x:w,y:C},{width:A,height:R}),s.R.copy(P,u,{x:0,y:R-1},{x:w,y:C-1},{width:A,height:1}),s.R.copy(P,u,{x:0,y:0},{x:w,y:C+R},{width:A,height:1}),s.R.copy(P,u,{x:A-1,y:0},{x:w-1,y:C},{width:1,height:R}),s.R.copy(P,u,{x:0,y:0},{x:w+A,y:C},{width:1,height:R})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(e){for(const i of e){if(this.callbackDispatchedThisFrame[i])continue;this.callbackDispatchedThisFrame[i]=!0;const l=this.getImage(i);l||s.w(`Image with ID: "${i}" was not found`),He(l)&&this.updateImage(i,l)}}}const De=1e20;function tt(h,e,i,l,u,d,g,w,C){for(let P=e;P-1);C++,d[C]=w,g[C]=P,g[C+1]=De}for(let w=0,C=0;w65535)throw new Error("glyphs > 65535 not supported");if(l.ranges[d])return{stack:e,id:i,glyph:u};if(!this.url)throw new Error("glyphsUrl is not set");if(!l.requests[d]){const w=Ze.loadGlyphRange(e,d,this.url,this.requestManager);l.requests[d]=w}const g=yield l.requests[d];for(const w in g)this._doesCharSupportLocalGlyph(+w)||(l.glyphs[+w]=g[+w]);return l.ranges[d]=!0,{stack:e,id:i,glyph:g[i]||null}}))}_doesCharSupportLocalGlyph(e){return!!this.localIdeographFontFamily&&(new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(e))||s.u["CJK Unified Ideographs"](e)||s.u["Hangul Syllables"](e)||s.u.Hiragana(e)||s.u.Katakana(e)||s.u["CJK Symbols and Punctuation"](e)||s.u["Halfwidth and Fullwidth Forms"](e))}_tinySDF(e,i,l){const u=this.localIdeographFontFamily;if(!u||!this._doesCharSupportLocalGlyph(l))return;let d=e.tinySDF;if(!d){let w="400";/bold/i.test(i)?w="900":/medium/i.test(i)?w="500":/light/i.test(i)&&(w="200"),d=e.tinySDF=new Ze.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:u,fontWeight:w})}const g=d.draw(String.fromCharCode(l));return{id:l,bitmap:new s.q({width:g.width||60,height:g.height||60},g.data),metrics:{width:g.glyphWidth/2||24,height:g.glyphHeight/2||24,left:g.glyphLeft/2+.5||0,top:g.glyphTop/2-27.5||-8,advance:g.glyphAdvance/2||24,isDoubleResolution:!0}}}}Ze.loadGlyphRange=function(h,e,i,l){return s._(this,void 0,void 0,(function*(){const u=256*e,d=u+255,g=l.transformRequest(i.replace("{fontstack}",h).replace("{range}",`${u}-${d}`),"Glyphs"),w=yield s.n(g,new AbortController);if(!w||!w.data)throw new Error(`Could not load glyph range. range: ${e}, ${u}-${d}`);const C={};for(const P of s.o(w.data))C[P.id]=P;return C}))},Ze.TinySDF=class{constructor({fontSize:h=24,buffer:e=3,radius:i=8,cutoff:l=.25,fontFamily:u="sans-serif",fontWeight:d="normal",fontStyle:g="normal",lang:w=null}={}){this.buffer=e,this.cutoff=l,this.radius=i,this.lang=w;const C=this.size=h+4*e,P=this._createCanvas(C),A=this.ctx=P.getContext("2d",{willReadFrequently:!0});A.font=`${g} ${d} ${h}px ${u}`,A.textBaseline="alphabetic",A.textAlign="left",A.fillStyle="black",this.gridOuter=new Float64Array(C*C),this.gridInner=new Float64Array(C*C),this.f=new Float64Array(C),this.z=new Float64Array(C+1),this.v=new Uint16Array(C)}_createCanvas(h){const e=document.createElement("canvas");return e.width=e.height=h,e}draw(h){const{width:e,actualBoundingBoxAscent:i,actualBoundingBoxDescent:l,actualBoundingBoxLeft:u,actualBoundingBoxRight:d}=this.ctx.measureText(h),g=Math.ceil(i),w=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(d-u))),C=Math.min(this.size-this.buffer,g+Math.ceil(l)),P=w+2*this.buffer,A=C+2*this.buffer,R=Math.max(P*A,0),D=new Uint8ClampedArray(R),O={data:D,width:P,height:A,glyphWidth:w,glyphHeight:C,glyphTop:g,glyphLeft:0,glyphAdvance:e};if(w===0||C===0)return O;const{ctx:$,buffer:ee,gridInner:Q,gridOuter:ne}=this;this.lang&&($.lang=this.lang),$.clearRect(ee,ee,w,C),$.fillText(h,ee,ee+g);const ue=$.getImageData(ee,ee,w,C);ne.fill(De,0,R),Q.fill(0,0,R);for(let _e=0;_e0?pe*pe:0,Q[Pe]=pe<0?pe*pe:0}}tt(ne,0,0,P,A,P,this.f,this.v,this.z),tt(Q,ee,ee,w,C,P,this.f,this.v,this.z);for(let _e=0;_e1&&(C=e[++w]);const A=Math.abs(P-C.left),R=Math.abs(P-C.right),D=Math.min(A,R);let O;const $=d/l*(u+1);if(C.isDash){const ee=u-Math.abs($);O=Math.sqrt(D*D+ee*ee)}else O=u-Math.sqrt(D*D+$*$);this.data[g+P]=Math.max(0,Math.min(255,O+128))}}}addRegularDash(e){for(let w=e.length-1;w>=0;--w){const C=e[w],P=e[w+1];C.zeroLength?e.splice(w,1):P&&P.isDash===C.isDash&&(P.left=C.left,e.splice(w,1))}const i=e[0],l=e[e.length-1];i.isDash===l.isDash&&(i.left=l.left-this.width,l.right=i.right+this.width);const u=this.width*this.nextRow;let d=0,g=e[d];for(let w=0;w1&&(g=e[++d]);const C=Math.abs(w-g.left),P=Math.abs(w-g.right),A=Math.min(C,P);this.data[u+w]=Math.max(0,Math.min(255,(g.isDash?A:-A)+128))}}addDash(e,i){const l=i?7:0,u=2*l+1;if(this.nextRow+u>this.height)return s.w("LineAtlas out of space"),null;let d=0;for(let w=0;w{i.terminate()})),this.workers=null)}isPreloaded(){return!!this.active[Ae]}numActive(){return Object.keys(this.active).length}}const pt=Math.floor(ie.hardwareConcurrency/2);let ot,ut;function St(){return ot||(ot=new Ne),ot}Ne.workerCount=s.H(globalThis)?Math.max(Math.min(pt,3),1):1;class Bt{constructor(e,i){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=i;const l=this.workerPool.acquire(i);for(let u=0;u{i.remove()})),this.actors=[],e&&this.workerPool.release(this.id)}registerMessageHandler(e,i){for(const l of this.actors)l.registerMessageHandler(e,i)}}function at(){return ut||(ut=new Bt(St(),s.K),ut.registerMessageHandler("GR",((h,e,i)=>s.m(e,i)))),ut}function dt(h,e){const i=s.L();return s.M(i,i,[1,1,0]),s.N(i,i,[.5*h.width,.5*h.height,1]),h.calculatePosMatrix?s.O(i,i,h.calculatePosMatrix(e.toUnwrapped())):i}function vt(h,e,i,l,u,d,g){var w;const C=(function(D,O,$){if(D)for(const ee of D){const Q=O[ee];if(Q&&Q.source===$&&Q.type==="fill-extrusion")return!0}else for(const ee in O){const Q=O[ee];if(Q.source===$&&Q.type==="fill-extrusion")return!0}return!1})((w=u==null?void 0:u.layers)!==null&&w!==void 0?w:null,e,h.id),P=d.maxPitchScaleFactor(),A=h.tilesIn(l,P,C);A.sort(yt);const R=[];for(const D of A)R.push({wrappedTileID:D.tileID.wrapped().key,queryResults:D.tile.queryRenderedFeatures(e,i,h._state,D.queryGeometry,D.cameraQueryGeometry,D.scale,u,d,P,dt(h.transform,D.tileID),g?(O,$)=>g(D.tileID,O,$):void 0)});return(function(D,O){for(const $ in D)for(const ee of D[$])It(ee,O);return D})((function(D){const O={},$={};for(const ee of D){const Q=ee.queryResults,ne=ee.wrappedTileID,ue=$[ne]=$[ne]||{};for(const _e in Q){const he=Q[_e],we=ue[_e]=ue[_e]||{},Pe=O[_e]=O[_e]||[];for(const pe of he)we[pe.featureIndex]||(we[pe.featureIndex]=!0,Pe.push(pe))}}return O})(R),h)}function yt(h,e){const i=h.tileID,l=e.tileID;return i.overscaledZ-l.overscaledZ||i.canonical.y-l.canonical.y||i.wrap-l.wrap||i.canonical.x-l.canonical.x}function It(h,e){const i=h.feature,l=e.getFeatureState(i.layer["source-layer"],i.id);i.source=i.layer.source,i.layer["source-layer"]&&(i.sourceLayer=i.layer["source-layer"]),i.state=l}function wt(h,e,i){return s._(this,void 0,void 0,(function*(){let l=h;if(h.url?l=(yield s.j(e.transformRequest(h.url,"Source"),i)).data:yield ie.frameAsync(i),!l)return null;const u=s.Q(s.e(l,h),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in l&&l.vector_layers&&(u.vectorLayerIds=l.vector_layers.map((d=>d.id))),u}))}class mt{constructor(e,i){e&&(i?this.setSouthWest(e).setNorthEast(i):Array.isArray(e)&&(e.length===4?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1])))}setNorthEast(e){return this._ne=e instanceof s.S?new s.S(e.lng,e.lat):s.S.convert(e),this}setSouthWest(e){return this._sw=e instanceof s.S?new s.S(e.lng,e.lat):s.S.convert(e),this}extend(e){const i=this._sw,l=this._ne;let u,d;if(e instanceof s.S)u=e,d=e;else{if(!(e instanceof mt))return Array.isArray(e)?e.length===4||e.every(Array.isArray)?this.extend(mt.convert(e)):this.extend(s.S.convert(e)):e&&("lng"in e||"lon"in e)&&"lat"in e?this.extend(s.S.convert(e)):this;if(u=e._sw,d=e._ne,!u||!d)return this}return i||l?(i.lng=Math.min(u.lng,i.lng),i.lat=Math.min(u.lat,i.lat),l.lng=Math.max(d.lng,l.lng),l.lat=Math.max(d.lat,l.lat)):(this._sw=new s.S(u.lng,u.lat),this._ne=new s.S(d.lng,d.lat)),this}getCenter(){return new s.S((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 s.S(this.getWest(),this.getNorth())}getSouthEast(){return new s.S(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(e){const{lng:i,lat:l}=s.S.convert(e);let u=this._sw.lng<=i&&i<=this._ne.lng;return this._sw.lng>this._ne.lng&&(u=this._sw.lng>=i&&i>=this._ne.lng),this._sw.lat<=l&&l<=this._ne.lat&&u}static convert(e){return e instanceof mt?e:e&&new mt(e)}static fromLngLat(e,i=0){const l=360*i/40075017,u=l/Math.cos(Math.PI/180*e.lat);return new mt(new s.S(e.lng-u,e.lat-l),new s.S(e.lng+u,e.lat+l))}adjustAntiMeridian(){const e=new s.S(this._sw.lng,this._sw.lat),i=new s.S(this._ne.lng,this._ne.lat);return new mt(e,e.lng>i.lng?new s.S(i.lng+360,i.lat):i)}}class Dt{constructor(e,i,l){this.bounds=mt.convert(this.validateBounds(e)),this.minzoom=i||0,this.maxzoom=l||24}validateBounds(e){return Array.isArray(e)&&e.length===4?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]}contains(e){const i=Math.pow(2,e.z),l=Math.floor(s.V(this.bounds.getWest())*i),u=Math.floor(s.U(this.bounds.getNorth())*i),d=Math.ceil(s.V(this.bounds.getEast())*i),g=Math.ceil(s.U(this.bounds.getSouth())*i);return e.x>=l&&e.x=u&&e.y{this._options.tiles=e})),this}setUrl(e){return this.setSourceProperty((()=>{this.url=e,this._options.url=e})),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return s.e({},this._options)}loadTile(e){return s._(this,void 0,void 0,(function*(){const i=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),l={request:this.map._requestManager.transformRequest(i,"Tile"),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.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,globalState:this.map.getGlobalState()};l.request.collectResourceTiming=this._collectResourceTiming;let u="RT";if(e.actor&&e.state!=="expired"){if(e.state==="loading")return new Promise(((d,g)=>{e.reloadPromise={resolve:d,reject:g}}))}else e.actor=this.dispatcher.getActor(),u="LT";e.abortController=new AbortController;try{const d=yield e.actor.sendAsync({type:u,data:l},e.abortController);if(delete e.abortController,e.aborted)return;this._afterTileLoadWorkerResponse(e,d)}catch(d){if(delete e.abortController,e.aborted)return;if(d&&d.status!==404)throw d;this._afterTileLoadWorkerResponse(e,null)}}))}_afterTileLoadWorkerResponse(e,i){if(i&&i.resourceTiming&&(e.resourceTiming=i.resourceTiming),i&&this.map._refreshExpiredTiles&&e.setExpiryData(i),e.loadVectorData(i,this.map.painter),e.reloadPromise){const l=e.reloadPromise;e.reloadPromise=null,this.loadTile(e).then(l.resolve).catch(l.reject)}}abortTile(e){return s._(this,void 0,void 0,(function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.actor&&(yield e.actor.sendAsync({type:"AT",data:{uid:e.uid,type:this.type,source:this.id}}))}))}unloadTile(e){return s._(this,void 0,void 0,(function*(){e.unloadVectorData(),e.actor&&(yield e.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}}))}))}hasTransition(){return!1}}class qt extends s.E{constructor(e,i,l,u){super(),this.id=e,this.dispatcher=l,this.setEventedParent(u),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=s.e({type:"raster"},i),s.e(this,s.Q(i,["url","scheme","tileSize"]))}load(){return s._(this,arguments,void 0,(function*(e=!1){this._loaded=!1,this.fire(new s.l("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const i=yield wt(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,i&&(s.e(this,i),i.bounds&&(this.tileBounds=new Dt(i.bounds,this.minzoom,this.maxzoom)),this.fire(new s.l("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new s.l("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:e})))}catch(i){this._tileJSONRequest=null,this.fire(new s.k(i))}}))}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(e){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),e(),this.load(!0)}setTiles(e){return this.setSourceProperty((()=>{this._options.tiles=e})),this}setUrl(e){return this.setSourceProperty((()=>{this.url=e,this._options.url=e})),this}serialize(){return s.e({},this._options)}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(e){return s._(this,void 0,void 0,(function*(){const i=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.abortController=new AbortController;try{const l=yield Fe.getImage(this.map._requestManager.transformRequest(i,"Tile"),e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(l&&l.data){this.map._refreshExpiredTiles&&(l.cacheControl||l.expires)&&e.setExpiryData({cacheControl:l.cacheControl,expires:l.expires});const u=this.map.painter.context,d=u.gl,g=l.data;e.texture=this.map.painter.getTileTexture(g.width),e.texture?e.texture.update(g,{useMipmap:!0}):(e.texture=new s.T(u,g,d.RGBA,{useMipmap:!0}),e.texture.bind(d.LINEAR,d.CLAMP_TO_EDGE,d.LINEAR_MIPMAP_NEAREST)),e.state="loaded"}}catch(l){if(delete e.abortController,e.aborted)e.state="unloaded";else if(l)throw e.state="errored",l}}))}abortTile(e){return s._(this,void 0,void 0,(function*(){e.abortController&&(e.abortController.abort(),delete e.abortController)}))}unloadTile(e){return s._(this,void 0,void 0,(function*(){e.texture&&this.map.painter.saveTileTexture(e.texture)}))}hasTransition(){return!1}}class tr extends qt{constructor(e,i,l,u){super(e,i,l,u),this.type="raster-dem",this.maxzoom=22,this._options=s.e({type:"raster-dem"},i),this.encoding=i.encoding||"mapbox",this.redFactor=i.redFactor,this.greenFactor=i.greenFactor,this.blueFactor=i.blueFactor,this.baseShift=i.baseShift}loadTile(e){return s._(this,void 0,void 0,(function*(){const i=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),l=this.map._requestManager.transformRequest(i,"Tile");e.neighboringTiles=this._getNeighboringTiles(e.tileID),e.abortController=new AbortController;try{const u=yield Fe.getImage(l,e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(u&&u.data){const d=u.data;this.map._refreshExpiredTiles&&(u.cacheControl||u.expires)&&e.setExpiryData({cacheControl:u.cacheControl,expires:u.expires});const g=s.b(d)&&s.W()?d:yield this.readImageNow(d),w={type:this.type,uid:e.uid,source:this.id,rawImageData:g,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!e.actor||e.state==="expired"){e.actor=this.dispatcher.getActor();const C=yield e.actor.sendAsync({type:"LDT",data:w});e.dem=C,e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.state="loaded"}}}catch(u){if(delete e.abortController,e.aborted)e.state="unloaded";else if(u)throw e.state="errored",u}}))}readImageNow(e){return s._(this,void 0,void 0,(function*(){if(typeof VideoFrame<"u"&&s.X()){const i=e.width+2,l=e.height+2;try{return new s.R({width:i,height:l},yield s.Y(e,-1,-1,i,l))}catch{}}return ie.getImageData(e,1)}))}_getNeighboringTiles(e){const i=e.canonical,l=Math.pow(2,i.z),u=(i.x-1+l)%l,d=i.x===0?e.wrap-1:e.wrap,g=(i.x+1+l)%l,w=i.x+1===l?e.wrap+1:e.wrap,C={};return C[new s.Z(e.overscaledZ,d,i.z,u,i.y).key]={backfilled:!1},C[new s.Z(e.overscaledZ,w,i.z,g,i.y).key]={backfilled:!1},i.y>0&&(C[new s.Z(e.overscaledZ,d,i.z,u,i.y-1).key]={backfilled:!1},C[new s.Z(e.overscaledZ,e.wrap,i.z,i.x,i.y-1).key]={backfilled:!1},C[new s.Z(e.overscaledZ,w,i.z,g,i.y-1).key]={backfilled:!1}),i.y+1i.coordinates)).flat(1/0):e.coordinates.flat(1/0)}getBounds(){return s._(this,void 0,void 0,(function*(){const e=new mt,i=yield this.getData();let l;switch(i.type){case"FeatureCollection":l=i.features.map((u=>this.getCoordinatesFromGeometry(u.geometry))).flat(1/0);break;case"Feature":l=this.getCoordinatesFromGeometry(i.geometry);break;default:l=this.getCoordinatesFromGeometry(i)}if(l.length==0)return e;for(let u=0;u0&&s.e(g,{resourceTiming:d}),this.fire(new s.l("data",Object.assign(Object.assign({},g),{sourceDataType:"metadata"}))),this.fire(new s.l("data",Object.assign(Object.assign({},g),{sourceDataType:"content"})))}catch(u){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new s.l("dataabort",{dataType:"source"}));this.fire(new s.k(u))}finally{(this._pendingWorkerUpdate.data||this._pendingWorkerUpdate.diff)&&this._updateWorkerData()}}))}loaded(){return!this._isUpdatingWorker&&this._pendingWorkerUpdate.data===void 0&&this._pendingWorkerUpdate.diff===void 0}loadTile(e){return s._(this,void 0,void 0,(function*(){const i=e.actor?"RT":"LT";e.actor=this.actor;const l={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.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,globalState:this.map.getGlobalState()};e.abortController=new AbortController;const u=yield this.actor.sendAsync({type:i,data:l},e.abortController);delete e.abortController,e.unloadVectorData(),e.aborted||e.loadVectorData(u,this.map.painter,i==="RT")}))}abortTile(e){return s._(this,void 0,void 0,(function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.aborted=!0}))}unloadTile(e){return s._(this,void 0,void 0,(function*(){e.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}})}))}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return s.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}class Ot extends s.E{constructor(e,i,l,u){super(),this.flippedWindingOrder=!1,this.id=e,this.dispatcher=l,this.coordinates=i.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(u),this.options=i}load(e){return s._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new s.l("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const i=yield Fe.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,i&&i.data&&(this.image=i.data,e&&(this.coordinates=e),this._finishLoading())}catch(i){this._request=null,this._loaded=!0,this.fire(new s.k(i))}}))}loaded(){return this._loaded}updateImage(e){return e.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=e.url,this.load(e.coordinates).finally((()=>{this.texture=null})),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new s.l("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(e){this.coordinates=e;const i=e.map(s.a1.fromLngLat);var l;return this.tileID=(function(u){const d=s.a2.fromPoints(u),g=d.width(),w=d.height(),C=Math.max(g,w),P=Math.max(0,Math.floor(-Math.log(C)/Math.LN2)),A=Math.pow(2,P);return new s.a4(P,Math.floor((d.minX+d.maxX)/2*A),Math.floor((d.minY+d.maxY)/2*A))})(i),this.terrainTileRanges=this._getOverlappingTileRanges(i),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=i.map((u=>this.tileID.getTilePoint(u)._round())),this.flippedWindingOrder=((l=this.tileCoords)[1].x-l[0].x)*(l[2].y-l[0].y)-(l[1].y-l[0].y)*(l[2].x-l[0].x)<0,this.fire(new s.l("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const e=this.map.painter.context,i=e.gl;this.texture||(this.texture=new s.T(e,this.image,i.RGBA),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE));let l=!1;for(const u in this.tiles){const d=this.tiles[u];d.state!=="loaded"&&(d.state="loaded",d.texture=this.texture,l=!0)}l&&this.fire(new s.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(e){return s._(this,void 0,void 0,(function*(){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={}):e.state="errored"}))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(e){const{minX:i,minY:l,maxX:u,maxY:d}=s.a2.fromPoints(e),g={};for(let w=0;w<=s.a3;w++){const C=Math.pow(2,w),P=Math.floor(i*C),A=Math.floor(l*C),R=Math.floor(u*C),D=Math.floor(d*C);g[w]={minTileX:P,minTileY:A,maxTileX:R,maxTileY:D}}return g}}class fr extends Ot{constructor(e,i,l,u){super(e,i,l,u),this.roundZoom=!0,this.type="video",this.options=i}load(){return s._(this,void 0,void 0,(function*(){this._loaded=!1;const e=this.options;this.urls=[];for(const i of e.urls)this.urls.push(this.map._requestManager.transformRequest(i,"Source").url);try{const i=yield s.a5(this.urls);if(this._loaded=!0,!i)return;this.video=i,this.video.loop=!0,this.video.addEventListener("playing",(()=>{this.map.triggerRepaint()})),this.map&&this.video.play(),this._finishLoading()}catch(i){this.fire(new s.k(i))}}))}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){const i=this.video.seekable;ei.end(0)?this.fire(new s.k(new s.a6(`sources.${this.id}`,null,`Playback for this video can be set only between the ${i.start(0)} and ${i.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;const e=this.map.painter.context,i=e.gl;this.texture?this.video.paused||(this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE),i.texSubImage2D(i.TEXTURE_2D,0,0,0,i.RGBA,i.UNSIGNED_BYTE,this.video)):(this.texture=new s.T(e,this.video,i.RGBA),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE));let l=!1;for(const u in this.tiles){const d=this.tiles[u];d.state!=="loaded"&&(d.state="loaded",d.texture=this.texture,l=!0)}l&&this.fire(new s.l("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 kr extends Ot{constructor(e,i,l,u){super(e,i,l,u),i.coordinates?Array.isArray(i.coordinates)&&i.coordinates.length===4&&!i.coordinates.some((d=>!Array.isArray(d)||d.length!==2||d.some((g=>typeof g!="number"))))||this.fire(new s.k(new s.a6(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new s.k(new s.a6(`sources.${e}`,null,'missing required property "coordinates"'))),i.animate&&typeof i.animate!="boolean"&&this.fire(new s.k(new s.a6(`sources.${e}`,null,'optional "animate" property must be a boolean value'))),i.canvas?typeof i.canvas=="string"||i.canvas instanceof HTMLCanvasElement||this.fire(new s.k(new s.a6(`sources.${e}`,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 s.k(new s.a6(`sources.${e}`,null,'missing required property "canvas"'))),this.options=i,this.animate=i.animate===void 0||i.animate}load(){return s._(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 s.k(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(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const i=this.map.painter.context,l=i.gl;this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new s.T(i,this.canvas,l.RGBA,{premultiply:!0});let u=!1;for(const d in this.tiles){const g=this.tiles[d];g.state!=="loaded"&&(g.state="loaded",g.texture=this.texture,u=!0)}u&&this.fire(new s.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}}const Ar={},rr=h=>{switch(h){case"geojson":return Qt;case"image":return Ot;case"raster":return qt;case"raster-dem":return tr;case"vector":return zt;case"video":return fr;case"canvas":return kr}return Ar[h]},Kt="RTLPluginLoaded";class or extends s.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=at()}_syncState(e){return this.status=e,this.dispatcher.broadcast("SRPS",{pluginStatus:e,pluginURL:this.url}).catch((i=>{throw this.status="error",i}))}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(e){return s._(this,arguments,void 0,(function*(i,l=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=ie.resolveURL(i),!this.url)throw new Error(`requested url ${i} is invalid`);if(this.status==="unavailable"){if(!l)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()}))}_requestImport(){return s._(this,void 0,void 0,(function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new s.l(Kt))}))}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Sr=null;function Dr(){return Sr||(Sr=new or),Sr}class Zr{constructor(e,i){this.timeAdded=0,this.fadeEndTime=0,this.tileID=e,this.uid=s.a7(),this.uses=0,this.tileSize=i,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(e){const i=e+this.timeAdded;id.getLayer(P))).filter(Boolean);if(C.length!==0){w.layers=C,w.stateDependentLayerIds&&(w.stateDependentLayers=w.stateDependentLayerIds.map((P=>C.filter((A=>A.id===P))[0])));for(const P of C)g[P.id]=w}}return g})(e.buckets,i==null?void 0:i.style),this.hasSymbolBuckets=!1;for(const u in this.buckets){const d=this.buckets[u];if(d instanceof s.a9){if(this.hasSymbolBuckets=!0,!l)break;d.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const u in this.buckets){const d=this.buckets[u];if(d instanceof s.a9&&d.hasRTLText){this.hasRTLText=!0,Dr().lazyLoad();break}}this.queryPadding=0;for(const u in this.buckets){const d=this.buckets[u];this.queryPadding=Math.max(this.queryPadding,i.style.getLayer(u).queryRadius(d))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage)}else this.collisionBoxArray=new s.a8}unloadVectorData(){for(const e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(e){return this.buckets[e.id]}upload(e){for(const l in this.buckets){const u=this.buckets[l];u.uploadPending()&&u.upload(e)}const i=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new s.T(e,this.imageAtlas.image,i.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new s.T(e,this.glyphAtlasImage,i.ALPHA),this.glyphAtlasImage=null)}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,i,l,u,d,g,w,C,P,A,R){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:u,cameraQueryGeometry:d,scale:g,tileSize:this.tileSize,pixelPosMatrix:A,transform:C,params:w,queryPadding:this.queryPadding*P,getElevation:R},e,i,l):{}}querySourceFeatures(e,i){const l=this.latestFeatureIndex;if(!l||!l.rawTileData)return;const u=l.loadVTLayers(),d=i&&i.sourceLayer?i.sourceLayer:"",g=u._geojsonTileLayer||u[d];if(!g)return;const w=s.aa(i&&i.filter),{z:C,x:P,y:A}=this.tileID.canonical,R={z:C,x:P,y:A};for(let D=0;Dl)u=!1;else if(i)if(this.expirationTime{this.remove(e,d)}),l)),this.data[u].push(d),this.order.push(u),this.order.length>this.max){const g=this._getAndRemoveByKey(this.order[0]);g&&this.onRemove(g)}return this}has(e){return e.wrapped().key in this.data}getAndRemove(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null}_getAndRemoveByKey(e){const i=this.data[e].shift();return i.timeout&&clearTimeout(i.timeout),this.data[e].length===0&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),i.value}getByKey(e){const i=this.data[e];return i?i[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,i){if(!this.has(e))return this;const l=e.wrapped().key,u=i===void 0?0:this.data[l].indexOf(i),d=this.data[l][u];return this.data[l].splice(u,1),d.timeout&&clearTimeout(d.timeout),this.data[l].length===0&&delete this.data[l],this.onRemove(d.value),this.order.splice(this.order.indexOf(l),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){const i=this._getAndRemoveByKey(this.order[0]);i&&this.onRemove(i)}return this}filter(e){const i=[];for(const l in this.data)for(const u of this.data[l])e(u.value)||i.push(u);for(const l of i)this.remove(l.value.tileID,l)}}class j{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(e,i,l){const u=String(i);if(this.stateChanges[e]=this.stateChanges[e]||{},this.stateChanges[e][u]=this.stateChanges[e][u]||{},s.e(this.stateChanges[e][u],l),this.deletedStates[e]===null){this.deletedStates[e]={};for(const d in this.state[e])d!==u&&(this.deletedStates[e][d]=null)}else if(this.deletedStates[e]&&this.deletedStates[e][u]===null){this.deletedStates[e][u]={};for(const d in this.state[e][u])l[d]||(this.deletedStates[e][u][d]=null)}else for(const d in l)this.deletedStates[e]&&this.deletedStates[e][u]&&this.deletedStates[e][u][d]===null&&delete this.deletedStates[e][u][d]}removeFeatureState(e,i,l){if(this.deletedStates[e]===null)return;const u=String(i);if(this.deletedStates[e]=this.deletedStates[e]||{},l&&i!==void 0)this.deletedStates[e][u]!==null&&(this.deletedStates[e][u]=this.deletedStates[e][u]||{},this.deletedStates[e][u][l]=null);else if(i!==void 0)if(this.stateChanges[e]&&this.stateChanges[e][u])for(l in this.deletedStates[e][u]={},this.stateChanges[e][u])this.deletedStates[e][u][l]=null;else this.deletedStates[e][u]=null;else this.deletedStates[e]=null}getState(e,i){const l=String(i),u=s.e({},(this.state[e]||{})[l],(this.stateChanges[e]||{})[l]);if(this.deletedStates[e]===null)return{};if(this.deletedStates[e]){const d=this.deletedStates[e][i];if(d===null)return{};for(const g in d)delete u[g]}return u}initializeTileState(e,i){e.setFeatureState(this.state,i)}coalesceChanges(e,i){const l={};for(const u in this.stateChanges){this.state[u]=this.state[u]||{};const d={};for(const g in this.stateChanges[u])this.state[u][g]||(this.state[u][g]={}),s.e(this.state[u][g],this.stateChanges[u][g]),d[g]=this.state[u][g];l[u]=d}for(const u in this.deletedStates){this.state[u]=this.state[u]||{};const d={};if(this.deletedStates[u]===null)for(const g in this.state[u])d[g]={},this.state[u][g]={};else for(const g in this.deletedStates[u]){if(this.deletedStates[u][g]===null)this.state[u][g]={};else for(const w of Object.keys(this.deletedStates[u][g]))delete this.state[u][g][w];d[g]=this.state[u][g]}l[u]=l[u]||{},s.e(l[u],d)}if(this.stateChanges={},this.deletedStates={},Object.keys(l).length!==0)for(const u in e)e[u].setFeatureState(l,i)}}const Z=89.25;function X(h,e){const i=s.ah(e.lat,-s.ai,s.ai);return new s.P(s.V(e.lng)*h,s.U(i)*h)}function ae(h,e){return new s.a1(e.x/h,e.y/h).toLngLat()}function de(h){return h.cameraToCenterDistance*Math.min(.85*Math.tan(s.ae(90-h.pitch)),Math.tan(s.ae(Z-h.pitch)))}function Se(h,e){const i=h.canonical,l=e/s.af(i.z),u=i.x+Math.pow(2,i.z)*h.wrap,d=s.ag(new Float64Array(16));return s.M(d,d,[u*l,i.y*l,0]),s.N(d,d,[l/s.$,l/s.$,1]),d}function Ie(h,e,i,l,u){const d=s.a1.fromLngLat(h,e),g=u*s.aj(1,h.lat),w=g*Math.cos(s.ae(i)),C=Math.sqrt(g*g-w*w),P=C*Math.sin(s.ae(-l)),A=C*Math.cos(s.ae(-l));return new s.a1(d.x+P,d.y+A,d.z+w)}function be(h,e,i){const l=e.intersectsFrustum(h);if(!i||l===0)return l;const u=e.intersectsPlane(i);return u===0?0:l===2&&u===2?2:1}function Oe(h,e,i){let l=0;const u=(i-e)/10;for(let d=0;d<10;d++)l+=u*Math.pow(Math.cos(e+(d+.5)/10*(i-e)),h);return l}function st(h,e){return function(i,l,u,d,g){const w=2*((h-1)/s.ak(Math.cos(s.ae(Z-g))/Math.cos(s.ae(Z)))-1),C=Math.acos(u/d),P=2*Oe(w-1,0,s.ae(g/2)),A=Math.min(s.ae(Z),C+s.ae(g/2)),R=Oe(w-1,Math.min(A,C-s.ae(g/2)),A),D=Math.atan(l/u),O=Math.hypot(l,u);let $=i;return $+=s.ak(d/O/Math.max(.5,Math.cos(s.ae(g/2)))),$+=w*s.ak(Math.cos(D))/2,$-=s.ak(Math.max(1,R/P/e))/2,$}}const $e=st(9.314,3);function Mt(h,e){const i=(e.roundZoom?Math.round:Math.floor)(h.zoom+s.ak(h.tileSize/e.tileSize));return Math.max(0,i)}function xe(h,e){const i=h.getCameraFrustum(),l=h.getClippingPlane(),u=h.screenPointToMercatorCoordinate(h.getCameraPoint()),d=s.a1.fromLngLat(h.center,h.elevation);u.z=d.z+Math.cos(h.pitchInRadians)*h.cameraToCenterDistance/h.worldSize;const g=h.getCoveringTilesDetailsProvider(),w=g.allowVariableZoom(h,e),C=Mt(h,e),P=e.minzoom||0,A=e.maxzoom!==void 0?e.maxzoom:h.maxZoom,R=Math.min(Math.max(0,C),A),D=Math.pow(2,R),O=[D*u.x,D*u.y,0],$=[D*d.x,D*d.y,0],ee=Math.hypot(d.x-u.x,d.y-u.y),Q=Math.abs(d.z-u.z),ne=Math.hypot(ee,Q),ue=we=>({zoom:0,x:0,y:0,wrap:we,fullyVisible:!1}),_e=[],he=[];if(h.renderWorldCopies&&g.allowWorldCopies())for(let we=1;we<=3;we++)_e.push(ue(-we)),_e.push(ue(we));for(_e.push(ue(0));_e.length>0;){const we=_e.pop(),Pe=we.x,pe=we.y;let Be=we.fullyVisible;const Qe={x:Pe,y:pe,z:we.zoom},Ue=g.getTileBoundingVolume(Qe,we.wrap,h.elevation,e);if(!Be){const Zt=be(i,Ue,l);if(Zt===0)continue;Be=Zt===2}const We=g.distanceToTile2d(u.x,u.y,Qe,Ue);let Je=C;w&&(Je=(e.calculateTileZoom||$e)(h.zoom+s.ak(h.tileSize/e.tileSize),We,Q,ne,h.fov)),Je=(e.roundZoom?Math.round:Math.floor)(Je),Je=Math.max(0,Je);const Nt=Math.min(Je,A);if(we.wrap=g.getWrap(d,Qe,we.wrap),we.zoom>=Nt){if(we.zoom>1),wrap:we.wrap,fullyVisible:Be})}return he.sort(((we,Pe)=>we.distanceSq-Pe.distanceSq)).map((we=>we.tileID))}const Ft=s.a2.fromPoints([new s.P(0,0),new s.P(s.$,s.$)]);class cr extends s.E{constructor(e,i,l){super(),this.id=e,this.dispatcher=l,this.on("data",(u=>this._dataHandler(u))),this.on("dataloading",(()=>{this._sourceErrored=!1})),this.on("error",(()=>{this._sourceErrored=this._source.loaded()})),this._source=((u,d,g,w)=>{const C=new(rr(d.type))(u,d,g,w);if(C.id!==u)throw new Error(`Expected Source id to be ${u} instead of ${C.id}`);return C})(e,i,l,this),this._tiles={},this._cache=new se(0,(u=>this._unloadTile(u))),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new j,this._didEmitContent=!1,this._updated=!1}onAdd(e){this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._maxTileCacheZoomLevels=e?e._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(e)}onRemove(e){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(e)}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 e in this._tiles){const i=this._tiles[e];if(i.state!=="loaded"&&i.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(e,i,l){return s._(this,void 0,void 0,(function*(){try{yield this._source.loadTile(e),this._tileLoaded(e,i,l)}catch(u){e.state="errored",u.status!==404?this._source.fire(new s.k(u,{tile:e})):this.update(this.transform,this.terrain)}}))}_unloadTile(e){this._source.unloadTile&&this._source.unloadTile(e)}_abortTile(e){this._source.abortTile&&this._source.abortTile(e),this._source.fire(new s.l("dataabort",{tile:e,coord:e.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(e){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const i in this._tiles){const l=this._tiles[i];l.upload(e),l.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map((e=>e.tileID)).sort(Jt).map((e=>e.key))}getRenderableIds(e){const i=[];for(const l in this._tiles)this._isIdRenderable(l,e)&&i.push(this._tiles[l]);return e?i.sort(((l,u)=>{const d=l.tileID,g=u.tileID,w=new s.P(d.canonical.x,d.canonical.y)._rotate(-this.transform.bearingInRadians),C=new s.P(g.canonical.x,g.canonical.y)._rotate(-this.transform.bearingInRadians);return d.overscaledZ-g.overscaledZ||C.y-w.y||C.x-w.x})).map((l=>l.tileID.key)):i.map((l=>l.tileID)).sort(Jt).map((l=>l.key))}hasRenderableParent(e){const i=this.findLoadedParent(e,0);return!!i&&this._isIdRenderable(i.tileID.key)}_isIdRenderable(e,i){return this._tiles[e]&&this._tiles[e].hasData()&&!this._coveredTiles[e]&&(i||!this._tiles[e].holdingForFade())}reload(e){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const i in this._tiles)e?this._reloadTile(i,"expired"):this._tiles[i].state!=="errored"&&this._reloadTile(i,"reloading")}}_reloadTile(e,i){return s._(this,void 0,void 0,(function*(){const l=this._tiles[e];l&&(l.state!=="loading"&&(l.state=i),yield this._loadTile(l,e,i))}))}_tileLoaded(e,i,l){e.timeAdded=ie.now(),l==="expired"&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(i,e),this.getSource().type==="raster-dem"&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),e.aborted||this._source.fire(new s.l("data",{dataType:"source",tile:e,coord:e.tileID}))}_backfillDEM(e){const i=this.getRenderableIds();for(let u=0;u1||(Math.abs(g)>1&&(Math.abs(g+C)===1?g+=C:Math.abs(g-C)===1&&(g-=C)),d.dem&&u.dem&&(u.dem.backfillBorder(d.dem,g,w),u.neighboringTiles&&u.neighboringTiles[P]&&(u.neighboringTiles[P].backfilled=!0)))}}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._tiles[e]}_retainLoadedChildren(e,i,l,u){for(const d in this._tiles){let g=this._tiles[d];if(u[d]||!g.hasData()||g.tileID.overscaledZ<=i||g.tileID.overscaledZ>l)continue;let w=g.tileID;for(;g&&g.tileID.overscaledZ>i+1;){const P=g.tileID.scaledTo(g.tileID.overscaledZ-1);g=this._tiles[P.key],g&&g.hasData()&&(w=P)}let C=w;for(;C.overscaledZ>i;)if(C=C.scaledTo(C.overscaledZ-1),e[C.key]||e[C.canonical.key]){u[w.key]=w;break}}}findLoadedParent(e,i){if(e.key in this._loadedParentTiles){const l=this._loadedParentTiles[e.key];return l&&l.tileID.overscaledZ>=i?l:null}for(let l=e.overscaledZ-1;l>=i;l--){const u=e.scaledTo(l),d=this._getLoadedTile(u);if(d)return d}}findLoadedSibling(e){return this._getLoadedTile(e)}_getLoadedTile(e){const i=this._tiles[e.key];return i&&i.hasData()?i:this._cache.getByKey(e.wrapped().key)}updateCacheSize(e){const i=Math.ceil(e.width/this._source.tileSize)+1,l=Math.ceil(e.height/this._source.tileSize)+1,u=Math.floor(i*l*(this._maxTileCacheZoomLevels===null?s.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),d=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,u):u;this._cache.setMaxSize(d)}handleWrapJump(e){const i=Math.round((e-(this._prevLng===void 0?e:this._prevLng))/360);if(this._prevLng=e,i){const l={};for(const u in this._tiles){const d=this._tiles[u];d.tileID=d.tileID.unwrapTo(d.tileID.wrap+i),l[d.tileID.key]=d}this._tiles=l;for(const u in this._timers)clearTimeout(this._timers[u]),delete this._timers[u];for(const u in this._tiles)this._setTileReloadTimer(u,this._tiles[u])}}_updateCoveredAndRetainedTiles(e,i,l,u,d,g){const w={},C={},P=Object.keys(e),A=ie.now();for(const R of P){const D=e[R],O=this._tiles[R];if(!O||O.fadeEndTime!==0&&O.fadeEndTime<=A)continue;const $=this.findLoadedParent(D,i),ee=this.findLoadedSibling(D),Q=$||ee||null;Q&&(this._addTile(Q.tileID),w[Q.tileID.key]=Q.tileID),C[R]=D}this._retainLoadedChildren(C,u,l,e);for(const R in w)e[R]||(this._coveredTiles[R]=!0,e[R]=w[R]);if(g){const R={},D={};for(const O of d)this._tiles[O.key].hasData()?R[O.key]=O:D[O.key]=O;for(const O in D){const $=D[O].children(this._source.maxzoom);this._tiles[$[0].key]&&this._tiles[$[1].key]&&this._tiles[$[2].key]&&this._tiles[$[3].key]&&(R[$[0].key]=e[$[0].key]=$[0],R[$[1].key]=e[$[1].key]=$[1],R[$[2].key]=e[$[2].key]=$[2],R[$[3].key]=e[$[3].key]=$[3],delete D[O])}for(const O in D){const $=D[O],ee=this.findLoadedParent($,this._source.minzoom),Q=this.findLoadedSibling($),ne=ee||Q||null;if(ne){R[ne.tileID.key]=e[ne.tileID.key]=ne.tileID;for(const ue in R)R[ue].isChildOf(ne.tileID)&&delete R[ue]}}for(const O in this._tiles)R[O]||(this._coveredTiles[O]=!0)}}update(e,i){if(!this._sourceLoaded||this._paused)return;let l;this.transform=e,this.terrain=i,this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?l=e.getVisibleUnwrappedCoordinates(this._source.tileID).map((A=>new s.Z(A.canonical.z,A.wrap,A.canonical.z,A.canonical.x,A.canonical.y))):(l=xe(e,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:i,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(l=l.filter((A=>this._source.hasTile(A))))):l=[];const u=Mt(e,this._source),d=Math.max(u-cr.maxOverzooming,this._source.minzoom),g=Math.max(u+cr.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const A={};for(const R of l)if(R.canonical.z>this._source.minzoom){const D=R.scaledTo(R.canonical.z-1);A[D.key]=D;const O=R.scaledTo(Math.max(this._source.minzoom,Math.min(R.canonical.z,5)));A[O.key]=O}l=l.concat(Object.values(A))}const w=l.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,w&&this.fire(new s.l("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const C=this._updateRetainedTiles(l,u);Tr(this._source.type)&&this._updateCoveredAndRetainedTiles(C,d,g,u,l,i);for(const A in C)this._tiles[A].clearFadeHold();const P=s.am(this._tiles,C);for(const A of P){const R=this._tiles[A];R.hasSymbolBuckets&&!R.holdingForFade()?R.setHoldDuration(this.map._fadeDuration):R.hasSymbolBuckets&&!R.symbolFadeFinished()||this._removeTile(A)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(const e in this._tiles)this._tiles[e].holdingForFade()&&this._removeTile(e)}_updateRetainedTiles(e,i){var l;const u={},d={},g=Math.max(i-cr.maxOverzooming,this._source.minzoom),w=Math.max(i+cr.maxUnderzooming,this._source.minzoom),C={};for(const P of e){const A=this._addTile(P);u[P.key]=P,A.hasData()||ithis._source.maxzoom){const D=P.children(this._source.maxzoom)[0],O=this.getTile(D);if(O&&O.hasData()){u[D.key]=D;continue}}else{const D=P.children(this._source.maxzoom);if(u[D[0].key]&&u[D[1].key]&&u[D[2].key]&&u[D[3].key])continue}let R=A.wasRequested();for(let D=P.overscaledZ-1;D>=g;--D){const O=P.scaledTo(D);if(d[O.key])break;if(d[O.key]=!0,A=this.getTile(O),!A&&R&&(A=this._addTile(O)),A){const $=A.hasData();if(($||!(!((l=this.map)===null||l===void 0)&&l.cancelPendingTileRequestsWhileZooming)||R)&&(u[O.key]=O),R=A.wasRequested(),$)break}}}return u}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const e in this._tiles){const i=[];let l,u=this._tiles[e].tileID;for(;u.overscaledZ>0;){if(u.key in this._loadedParentTiles){l=this._loadedParentTiles[u.key];break}i.push(u.key);const d=u.scaledTo(u.overscaledZ-1);if(l=this._getLoadedTile(d),l)break;u=d}for(const d of i)this._loadedParentTiles[d]=l}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(const e in this._tiles){const i=this._tiles[e].tileID,l=this._getLoadedTile(i);this._loadedSiblingTiles[i.key]=l}}_addTile(e){let i=this._tiles[e.key];if(i)return i;i=this._cache.getAndRemove(e),i&&(this._setTileReloadTimer(e.key,i),i.tileID=e,this._state.initializeTileState(i,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,i)));const l=i;return i||(i=new Zr(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(i,e.key,i.state)),i.uses++,this._tiles[e.key]=i,l||this._source.fire(new s.l("dataloading",{tile:i,coord:i.tileID,dataType:"source"})),i}_setTileReloadTimer(e,i){e in this._timers&&(clearTimeout(this._timers[e]),delete this._timers[e]);const l=i.getExpiryTimeout();l&&(this._timers[e]=setTimeout((()=>{this._reloadTile(e,"expired"),delete this._timers[e]}),l))}refreshTiles(e){for(const i in this._tiles)(this._isIdRenderable(i)||this._tiles[i].state=="errored")&&e.some((l=>l.equals(this._tiles[i].tileID.canonical)))&&this._reloadTile(i,"expired")}_removeTile(e){const i=this._tiles[e];i&&(i.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),delete this._timers[e]),i.uses>0||(i.hasData()&&i.state!=="reloading"?this._cache.add(i.tileID,i,i.getExpiryTimeout()):(i.aborted=!0,this._abortTile(i),this._unloadTile(i))))}_dataHandler(e){const i=e.sourceDataType;e.dataType==="source"&&i==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&e.dataType==="source"&&i==="content"&&(this.reload(e.sourceDataChanged),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const e in this._tiles)this._removeTile(e);this._cache.reset()}tilesIn(e,i,l){const u=[],d=this.transform;if(!d)return u;const g=d.getCoveringTilesDetailsProvider().allowWorldCopies(),w=l?d.getCameraQueryGeometry(e):e,C=O=>d.screenPointToMercatorCoordinate(O,this.terrain),P=this.transformBbox(e,C,!g),A=this.transformBbox(w,C,!g),R=this.getIds(),D=s.a2.fromPoints(A);for(let O=0;Oue.getTilePoint(new s.a1(he.x,he.y))));if(_e.expandBy(ne),_e.intersects(Ft)){const he=P.map((Pe=>ue.getTilePoint(Pe))),we=A.map((Pe=>ue.getTilePoint(Pe)));u.push({tile:$,tileID:g?ue:ue.unwrapTo(0),queryGeometry:he,cameraQueryGeometry:we,scale:Q})}}}return u}transformBbox(e,i,l){let u=e.map(i);if(l){const d=s.a2.fromPoints(e);d.shrinkBy(.001*Math.min(d.width(),d.height()));const g=d.map(i);s.a2.fromPoints(u).covers(g)||(u=u.map((w=>w.x>.5?new s.a1(w.x-1,w.y,w.z):w)))}return u}getVisibleCoordinates(e){const i=this.getRenderableIds(e).map((l=>this._tiles[l].tileID));return this.transform&&this.transform.populateCache(i),i}hasTransition(){if(this._source.hasTransition())return!0;if(Tr(this._source.type)){const e=ie.now();for(const i in this._tiles)if(this._tiles[i].fadeEndTime>=e)return!0}return!1}setFeatureState(e,i,l){this._state.updateState(e=e||"_geojsonTileLayer",i,l)}removeFeatureState(e,i,l){this._state.removeFeatureState(e=e||"_geojsonTileLayer",i,l)}getFeatureState(e,i){return this._state.getState(e=e||"_geojsonTileLayer",i)}setDependencies(e,i,l){const u=this._tiles[e];u&&u.setDependencies(i,l)}reloadTilesForDependencies(e,i){for(const l in this._tiles)this._tiles[l].hasDependency(e,i)&&this._reloadTile(l,"reloading");this._cache.filter((l=>!l.hasDependency(e,i)))}}function Jt(h,e){const i=Math.abs(2*h.wrap)-+(h.wrap<0),l=Math.abs(2*e.wrap)-+(e.wrap<0);return h.overscaledZ-e.overscaledZ||l-i||e.canonical.y-h.canonical.y||e.canonical.x-h.canonical.x}function Tr(h){return h==="raster"||h==="image"||h==="video"}cr.maxOverzooming=10,cr.maxUnderzooming=3;class Xr{constructor(e,i){this.reset(e,i)}reset(e,i){this.points=e||[],this._distances=[0];for(let l=1;l0?(u-g)/w:0;return this.points[d].mult(1-C).add(this.points[i].mult(C))}}function dn(h,e){let i=!0;return h==="always"||h!=="never"&&e!=="never"||(i=!1),i}class xn{constructor(e,i,l){const u=this.boxCells=[],d=this.circleCells=[];this.xCellCount=Math.ceil(e/l),this.yCellCount=Math.ceil(i/l);for(let g=0;gthis.width||u<0||i>this.height)return[];const C=[];if(e<=0&&i<=0&&this.width<=l&&this.height<=u){if(d)return[{key:null,x1:e,y1:i,x2:l,y2:u}];for(let P=0;P0}hitTestCircle(e,i,l,u,d){const g=e-l,w=e+l,C=i-l,P=i+l;if(w<0||g>this.width||P<0||C>this.height)return!1;const A=[];return this._forEachCell(g,C,w,P,this._queryCellCircle,A,{hitTest:!0,overlapMode:u,circle:{x:e,y:i,radius:l},seenUids:{box:{},circle:{}}},d),A.length>0}_queryCell(e,i,l,u,d,g,w,C){const{seenUids:P,hitTest:A,overlapMode:R}=w,D=this.boxCells[d];if(D!==null){const $=this.bboxes;for(const ee of D)if(!P.box[ee]){P.box[ee]=!0;const Q=4*ee,ne=this.boxKeys[ee];if(e<=$[Q+2]&&i<=$[Q+3]&&l>=$[Q+0]&&u>=$[Q+1]&&(!C||C(ne))&&(!A||!dn(R,ne.overlapMode))&&(g.push({key:ne,x1:$[Q],y1:$[Q+1],x2:$[Q+2],y2:$[Q+3]}),A))return!0}}const O=this.circleCells[d];if(O!==null){const $=this.circles;for(const ee of O)if(!P.circle[ee]){P.circle[ee]=!0;const Q=3*ee,ne=this.circleKeys[ee];if(this._circleAndRectCollide($[Q],$[Q+1],$[Q+2],e,i,l,u)&&(!C||C(ne))&&(!A||!dn(R,ne.overlapMode))){const ue=$[Q],_e=$[Q+1],he=$[Q+2];if(g.push({key:ne,x1:ue-he,y1:_e-he,x2:ue+he,y2:_e+he}),A)return!0}}}return!1}_queryCellCircle(e,i,l,u,d,g,w,C){const{circle:P,seenUids:A,overlapMode:R}=w,D=this.boxCells[d];if(D!==null){const $=this.bboxes;for(const ee of D)if(!A.box[ee]){A.box[ee]=!0;const Q=4*ee,ne=this.boxKeys[ee];if(this._circleAndRectCollide(P.x,P.y,P.radius,$[Q+0],$[Q+1],$[Q+2],$[Q+3])&&(!C||C(ne))&&!dn(R,ne.overlapMode))return g.push(!0),!0}}const O=this.circleCells[d];if(O!==null){const $=this.circles;for(const ee of O)if(!A.circle[ee]){A.circle[ee]=!0;const Q=3*ee,ne=this.circleKeys[ee];if(this._circlesCollide($[Q],$[Q+1],$[Q+2],P.x,P.y,P.radius)&&(!C||C(ne))&&!dn(R,ne.overlapMode))return g.push(!0),!0}}}_forEachCell(e,i,l,u,d,g,w,C){const P=this._convertToXCellCoord(e),A=this._convertToYCellCoord(i),R=this._convertToXCellCoord(l),D=this._convertToYCellCoord(u);for(let O=P;O<=R;O++)for(let $=A;$<=D;$++)if(d.call(this,e,i,l,u,this.xCellCount*$+O,g,w,C))return}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,i,l,u,d,g){const w=u-e,C=d-i,P=l+g;return P*P>w*w+C*C}_circleAndRectCollide(e,i,l,u,d,g,w){const C=(g-u)/2,P=Math.abs(e-(u+C));if(P>C+l)return!1;const A=(w-d)/2,R=Math.abs(i-(d+A));if(R>A+l)return!1;if(P<=C||R<=A)return!0;const D=P-C,O=R-A;return D*D+O*O<=l*l}}function mn(h,e,i){const l=s.L();if(!h){const{vecSouth:R,vecEast:D}=Et(e),O=N();O[0]=D[0],O[1]=D[1],O[2]=R[0],O[3]=R[1],u=O,(A=(g=(d=O)[0])*(P=d[3])-(C=d[2])*(w=d[1]))&&(u[0]=P*(A=1/A),u[1]=-w*A,u[2]=-C*A,u[3]=g*A),l[0]=O[0],l[1]=O[1],l[4]=O[2],l[5]=O[3]}var u,d,g,w,C,P,A;return s.N(l,l,[1/i,1/i,1]),l}function jt(h,e,i,l){if(h){const u=s.L();if(!e){const{vecSouth:d,vecEast:g}=Et(i);u[0]=g[0],u[1]=g[1],u[4]=d[0],u[5]=d[1]}return s.N(u,u,[l,l,1]),u}return i.pixelsToClipSpaceMatrix}function Et(h){const e=Math.cos(h.rollInRadians),i=Math.sin(h.rollInRadians),l=Math.cos(h.pitchInRadians),u=Math.cos(h.bearingInRadians),d=Math.sin(h.bearingInRadians),g=s.ar();g[0]=-u*l*i-d*e,g[1]=-d*l*i+u*e;const w=s.as(g);w<1e-9?s.at(g):s.au(g,g,1/w);const C=s.ar();C[0]=u*l*e-d*i,C[1]=d*l*e+u*i;const P=s.as(C);return P<1e-9?s.at(C):s.au(C,C,1/P),{vecEast:C,vecSouth:g}}function hr(h,e,i,l){let u;l?(u=[h,e,l(h,e),1],s.aw(u,u,i)):(u=[h,e,0,1],En(u,u,i));const d=u[3];return{point:new s.P(u[0]/d,u[1]/d),signedDistanceFromCamera:d,isOccluded:!1}}function ht(h,e){return .5+h/e*.5}function Hr(h,e){return h.x>=-e[0]&&h.x<=e[0]&&h.y>=-e[1]&&h.y<=e[1]}function Yr(h,e,i,l,u,d,g,w,C,P,A,R,D){const O=i?h.textSizeData:h.iconSizeData,$=s.an(O,e.transform.zoom),ee=[256/e.width*2+1,256/e.height*2+1],Q=i?h.text.dynamicLayoutVertexArray:h.icon.dynamicLayoutVertexArray;Q.clear();const ne=h.lineVertexArray,ue=i?h.text.placedSymbolArray:h.icon.placedSymbolArray,_e=e.transform.width/e.transform.height;let he=!1;for(let we=0;weMath.abs(i.x-e.x)*l?{useVertical:!0}:(h===s.ao.vertical?e.yi.x)?{needsFlipping:!0}:null}function Ge(h){const{projectionContext:e,pitchedLabelPlaneMatrixInverse:i,symbol:l,fontSize:u,flip:d,keepUpright:g,glyphOffsetArray:w,dynamicLayoutVertexArray:C,aspectRatio:P,rotateToLine:A}=h,R=u/24,D=l.lineOffsetX*R,O=l.lineOffsetY*R;let $;if(l.numGlyphs>1){const ee=l.glyphStartIndex+l.numGlyphs,Q=l.lineStartIndex,ne=l.lineStartIndex+l.lineLength,ue=qr(R,w,D,O,d,l,A,e);if(!ue)return{notEnoughRoom:!0};const _e=br(ue.first.point.x,ue.first.point.y,e,i),he=br(ue.last.point.x,ue.last.point.y,e,i);if(g&&!d){const we=_t(l.writingMode,_e,he,P);if(we)return we}$=[ue.first];for(let we=l.glyphStartIndex+1;we0?_e.point:At(e.tileAnchorPoint,ue,Q,1,e),we=br(Q.x,Q.y,e,i),Pe=br(he.x,he.y,e,i),pe=_t(l.writingMode,we,Pe,P);if(pe)return pe}const ee=pn(R*w.getoffsetX(l.glyphStartIndex),D,O,d,l.segment,l.lineStartIndex,l.lineStartIndex+l.lineLength,e,A);if(!ee||e.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};$=[ee]}for(const ee of $)s.av(C,ee.point,ee.angle);return{}}function At(h,e,i,l,u){const d=h.add(h.sub(e)._unit()),g=Yt(d.x,d.y,u).point,w=i.sub(g);return i.add(w._mult(l/w.mag()))}function Rt(h,e,i){const l=e.projectionCache;if(l.projections[h])return l.projections[h];const u=new s.P(e.lineVertexArray.getx(h),e.lineVertexArray.gety(h)),d=Yt(u.x,u.y,e);if(d.signedDistanceFromCamera>0)return l.projections[h]=d.point,l.anyProjectionOccluded=l.anyProjectionOccluded||d.isOccluded,d.point;const g=h-i.direction;return At(i.distanceFromAnchor===0?e.tileAnchorPoint:new s.P(e.lineVertexArray.getx(g),e.lineVertexArray.gety(g)),u,i.previousVertex,i.absOffsetX-i.distanceFromAnchor+1,e)}function Yt(h,e,i){const l=h+i.translation[0],u=e+i.translation[1];let d;return i.pitchWithMap?(d=hr(l,u,i.pitchedLabelPlaneMatrix,i.getElevation),d.isOccluded=!1):(d=i.transform.projectTileCoordinates(l,u,i.unwrappedTileID,i.getElevation),d.point.x=(.5*d.point.x+.5)*i.width,d.point.y=(.5*-d.point.y+.5)*i.height),d}function br(h,e,i,l){if(i.pitchWithMap){const u=[h,e,0,1];return s.aw(u,u,l),i.transform.projectTileCoordinates(u[0]/u[3],u[1]/u[3],i.unwrappedTileID,i.getElevation).point}return{x:h/i.width*2-1,y:1-e/i.height*2}}function Er(h,e,i){return i.transform.projectTileCoordinates(h,e,i.unwrappedTileID,i.getElevation)}function ur(h,e,i){return h._unit()._perp()._mult(e*i)}function rn(h,e,i,l,u,d,g,w,C){if(w.projectionCache.offsets[h])return w.projectionCache.offsets[h];const P=i.add(e);if(h+C.direction=u)return w.projectionCache.offsets[h]=P,P;const A=Rt(h+C.direction,w,C),R=ur(A.sub(i),g,C.direction),D=i.add(R),O=A.add(R);return w.projectionCache.offsets[h]=s.ax(d,P,D,O)||P,w.projectionCache.offsets[h]}function pn(h,e,i,l,u,d,g,w,C){const P=l?h-e:h+e;let A=P>0?1:-1,R=0;l&&(A*=-1,R=Math.PI),A<0&&(R+=Math.PI);let D,O=A>0?d+u:d+u+1;w.projectionCache.cachedAnchorPoint?D=w.projectionCache.cachedAnchorPoint:(D=Yt(w.tileAnchorPoint.x,w.tileAnchorPoint.y,w).point,w.projectionCache.cachedAnchorPoint=D);let $,ee,Q=D,ne=D,ue=0,_e=0;const he=Math.abs(P),we=[];let Pe;for(;ue+_e<=he;){if(O+=A,O=g)return null;ue+=_e,ne=Q,ee=$;const Qe={absOffsetX:he,direction:A,distanceFromAnchor:ue,previousVertex:ne};if(Q=Rt(O,w,Qe),i===0)we.push(ne),Pe=Q.sub(ne);else{let Ue;const We=Q.sub(ne);Ue=We.mag()===0?ur(Rt(O+A,w,Qe).sub(Q),i,A):ur(We,i,A),ee||(ee=ne.add(Ue)),$=rn(O,Ue,Q,d,g,ee,i,w,Qe),we.push(ee),Pe=$.sub(ee)}_e=Pe.mag()}const pe=Pe._mult((he-ue)/_e)._add(ee||ne),Be=R+Math.atan2(Q.y-ne.y,Q.x-ne.x);return we.push(pe),{point:pe,angle:C?Be:0,path:we}}const _n=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function sn(h,e){for(let i=0;i=1;Jr--)Zt.push(Je.path[Jr]);for(let Jr=1;JrAn.signedDistanceFromCamera<=0))?[]:Jr.map((An=>An.point))}let mr=[];if(Zt.length>0){const Jr=Zt[0].clone(),An=Zt[0].clone();for(let Bn=1;Bn=Qe.x&&An.x<=Ue.x&&Jr.y>=Qe.y&&An.y<=Ue.y?[Zt]:An.xUe.x||An.yUe.y?[]:s.ay([Zt],Qe.x,Qe.y,Ue.x,Ue.y)}for(const Jr of mr){We.reset(Jr,.25*Be);let An=0;An=We.length<=.5*Be?1:Math.ceil(We.paddedLength/Tt)+1;for(let Bn=0;Bn{const C=hr(w.x,w.y,g,d.getElevation),P=d.transform.projectTileCoordinates(C.point.x,C.point.y,d.unwrappedTileID,d.getElevation);return P.point.x=(.5*P.point.x+.5)*d.width,P.point.y=(.5*-P.point.y+.5)*d.height,P}))})(e,i);return(function(u){let d=0,g=0,w=0,C=0;for(let P=0;Pg&&(g=C,d=w));return u.slice(d,d+g)})(l)}queryRenderedSymbols(e){if(e.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const i=[],l=new s.a2;for(const R of e){const D=new s.P(R.x+dr,R.y+dr);l.extend(D),i.push(D)}const{minX:u,minY:d,maxX:g,maxY:w}=l,C=this.grid.query(u,d,g,w).concat(this.ignoredGrid.query(u,d,g,w)),P={},A={};for(const R of C){const D=R.key;if(P[D.bucketInstanceId]===void 0&&(P[D.bucketInstanceId]={}),P[D.bucketInstanceId][D.featureIndex])continue;const O=[new s.P(R.x1,R.y1),new s.P(R.x2,R.y1),new s.P(R.x2,R.y2),new s.P(R.x1,R.y2)];s.az(i,O)&&(P[D.bucketInstanceId][D.featureIndex]=!0,A[D.bucketInstanceId]===void 0&&(A[D.bucketInstanceId]=[]),A[D.bucketInstanceId].push(D.featureIndex))}return A}insertCollisionBox(e,i,l,u,d,g){(l?this.ignoredGrid:this.grid).insert({bucketInstanceId:u,featureIndex:d,collisionGroupID:g,overlapMode:i},e[0],e[1],e[2],e[3])}insertCollisionCircles(e,i,l,u,d,g){const w=l?this.ignoredGrid:this.grid,C={bucketInstanceId:u,featureIndex:d,collisionGroupID:g,overlapMode:i};for(let P=0;P=this.screenRightBoundary||uthis.screenBottomBoundary}isInsideGrid(e,i,l,u){return l>=0&&e=0&&ithis.projectAndGetPerspectiveRatio(Tt.x,Tt.y,u,P,R)));Nt=Zt.some((Tt=>!Tt.isOccluded)),Je=Zt.map((Tt=>new s.P(Tt.x,Tt.y)))}else Nt=!0;return{box:s.aA(Je),allPointsOccluded:!Nt}}}class tn{constructor(e,i,l,u){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?i:-i))):u&&l?1:0,this.placed=l}isHidden(){return this.opacity===0&&!this.placed}}class Qr{constructor(e,i,l,u,d){this.text=new tn(e?e.text:null,i,l,d),this.icon=new tn(e?e.icon:null,i,u,d)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class ma{constructor(e,i,l){this.text=e,this.icon=i,this.skipFade=l}}class di{constructor(e,i,l,u,d){this.bucketInstanceId=e,this.featureIndex=i,this.sourceLayerIndex=l,this.bucketIndex=u,this.tileID=d}}class Xi{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){const i=++this.maxGroupID;this.collisionGroups[e]={ID:i,predicate:l=>l.collisionGroupID===i}}return this.collisionGroups[e]}}function Zn(h,e,i,l,u){const{horizontalAlign:d,verticalAlign:g}=s.aH(h);return new s.P(-(d-.5)*e+l[0]*u,-(g-.5)*i+l[1]*u)}class ni{constructor(e,i,l,u,d){this.transform=e.clone(),this.terrain=i,this.collisionIndex=new In(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=l,this.retainedQueryData={},this.collisionGroups=new Xi(u),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=d,d&&(d.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(e){const i=this.terrain;return i?(l,u)=>i.getElevation(e,l,u):null}getBucketParts(e,i,l,u){const d=l.getBucket(i),g=l.latestFeatureIndex;if(!d||!g||i.id!==d.layerIds[0])return;const w=l.collisionBoxArray,C=d.layers[0].layout,P=d.layers[0].paint,A=Math.pow(2,this.transform.zoom-l.tileID.overscaledZ),R=l.tileSize/s.$,D=l.tileID.toUnwrapped(),O=C.get("text-rotation-alignment")==="map",$=s.aC(l,1,this.transform.zoom),ee=s.aD(this.collisionIndex.transform,l,P.get("text-translate"),P.get("text-translate-anchor")),Q=s.aD(this.collisionIndex.transform,l,P.get("icon-translate"),P.get("icon-translate-anchor")),ne=mn(O,this.transform,$);this.retainedQueryData[d.bucketInstanceId]=new di(d.bucketInstanceId,g,d.sourceLayerIndex,d.index,l.tileID);const ue={bucket:d,layout:C,translationText:ee,translationIcon:Q,unwrappedTileID:D,pitchedLabelPlaneMatrix:ne,scale:A,textPixelRatio:R,holdingForFade:l.holdingForFade(),collisionBoxArray:w,partiallyEvaluatedTextSize:s.an(d.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(d.sourceID)};if(u)for(const _e of d.sortKeyRanges){const{sortKey:he,symbolInstanceStart:we,symbolInstanceEnd:Pe}=_e;e.push({sortKey:he,symbolInstanceStart:we,symbolInstanceEnd:Pe,parameters:ue})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:d.symbolInstances.length,parameters:ue})}attemptAnchorPlacement(e,i,l,u,d,g,w,C,P,A,R,D,O,$,ee,Q,ne,ue,_e,he){const we=s.aE[e.textAnchor],Pe=[e.textOffset0,e.textOffset1],pe=Zn(we,l,u,Pe,d),Be=this.collisionIndex.placeCollisionBox(i,D,C,P,A,w,g,Q,R.predicate,_e,pe,he);if((!ue||this.collisionIndex.placeCollisionBox(ue,D,C,P,A,w,g,ne,R.predicate,_e,pe,he).placeable)&&Be.placeable){let Qe;if(this.prevPlacement&&this.prevPlacement.variableOffsets[O.crossTileID]&&this.prevPlacement.placements[O.crossTileID]&&this.prevPlacement.placements[O.crossTileID].text&&(Qe=this.prevPlacement.variableOffsets[O.crossTileID].anchor),O.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[O.crossTileID]={textOffset:Pe,width:l,height:u,anchor:we,textBoxScale:d,prevAnchor:Qe},this.markUsedJustification($,we,O,ee),$.allowVerticalPlacement&&(this.markUsedOrientation($,ee,O),this.placedOrientations[O.crossTileID]=ee),{shift:pe,placedGlyphBoxes:Be}}}placeLayerBucketPart(e,i,l){const{bucket:u,layout:d,translationText:g,translationIcon:w,unwrappedTileID:C,pitchedLabelPlaneMatrix:P,textPixelRatio:A,holdingForFade:R,collisionBoxArray:D,partiallyEvaluatedTextSize:O,collisionGroup:$}=e.parameters,ee=d.get("text-optional"),Q=d.get("icon-optional"),ne=s.aF(d,"text-overlap","text-allow-overlap"),ue=ne==="always",_e=s.aF(d,"icon-overlap","icon-allow-overlap"),he=_e==="always",we=d.get("text-rotation-alignment")==="map",Pe=d.get("text-pitch-alignment")==="map",pe=d.get("icon-text-fit")!=="none",Be=d.get("symbol-z-order")==="viewport-y",Qe=ue&&(he||!u.hasIconData()||Q),Ue=he&&(ue||!u.hasTextData()||ee);!u.collisionArrays&&D&&u.deserializeCollisionBoxes(D);const We=this.retainedQueryData[u.bucketInstanceId].tileID,Je=this._getTerrainElevationFunc(We),Nt=this.transform.getFastPathSimpleProjectionMatrix(We),Zt=(Tt,mr,Jr)=>{var An,Bn;if(i[Tt.crossTileID])return;if(R)return void(this.placements[Tt.crossTileID]=new ma(!1,!1,!1));let Ln=!1,Hn=!1,Kn=!0,Kr=null,Fn={box:null,placeable:!1,offscreen:null,occluded:!1},si={placeable:!1},fi=null,Ti=null,Ui=null,za=0,go=0,vo=0;mr.textFeatureIndex?za=mr.textFeatureIndex:Tt.useRuntimeCollisionCircles&&(za=Tt.featureIndex),mr.verticalTextFeatureIndex&&(go=mr.verticalTextFeatureIndex);const fs=mr.textBox;if(fs){const ta=li=>{let mi=s.ao.horizontal;if(u.allowVerticalPlacement&&!li&&this.prevPlacement){const ba=this.prevPlacement.placedOrientations[Tt.crossTileID];ba&&(this.placedOrientations[Tt.crossTileID]=ba,mi=ba,this.markUsedOrientation(u,mi,Tt))}return mi},La=(li,mi)=>{if(u.allowVerticalPlacement&&Tt.numVerticalGlyphVertices>0&&mr.verticalTextBox){for(const ba of u.writingModes)if(ba===s.ao.vertical?(Fn=mi(),si=Fn):Fn=li(),Fn&&Fn.placeable)break}else Fn=li()},$i=Tt.textAnchorOffsetStartIndex,yo=Tt.textAnchorOffsetEndIndex;if(yo===$i){const li=(mi,ba)=>{const ci=this.collisionIndex.placeCollisionBox(mi,ne,A,We,C,Pe,we,g,$.predicate,Je,void 0,Nt);return ci&&ci.placeable&&(this.markUsedOrientation(u,ba,Tt),this.placedOrientations[Tt.crossTileID]=ba),ci};La((()=>li(fs,s.ao.horizontal)),(()=>{const mi=mr.verticalTextBox;return u.allowVerticalPlacement&&Tt.numVerticalGlyphVertices>0&&mi?li(mi,s.ao.vertical):{box:null,offscreen:null}})),ta(Fn&&Fn.placeable)}else{let li=s.aE[(Bn=(An=this.prevPlacement)===null||An===void 0?void 0:An.variableOffsets[Tt.crossTileID])===null||Bn===void 0?void 0:Bn.anchor];const mi=(ci,Js,_s)=>{const to=ci.x2-ci.x1,Da=ci.y2-ci.y1,xo=Tt.textBoxScale,Td=pe&&_e==="never"?Js:null;let la=null,Cd=ne==="never"?1:2,_u="never";li&&Cd++;for(let Wl=0;Wlmi(fs,mr.iconBox,s.ao.horizontal)),(()=>{const ci=mr.verticalTextBox;return u.allowVerticalPlacement&&(!Fn||!Fn.placeable)&&Tt.numVerticalGlyphVertices>0&&ci?mi(ci,mr.verticalIconBox,s.ao.vertical):{box:null,occluded:!0,offscreen:null}})),Fn&&(Ln=Fn.placeable,Kn=Fn.offscreen);const ba=ta(Fn&&Fn.placeable);if(!Ln&&this.prevPlacement){const ci=this.prevPlacement.variableOffsets[Tt.crossTileID];ci&&(this.variableOffsets[Tt.crossTileID]=ci,this.markUsedJustification(u,ci.anchor,Tt,ba))}}}if(fi=Fn,Ln=fi&&fi.placeable,Kn=fi&&fi.offscreen,Tt.useRuntimeCollisionCircles){const ta=u.text.placedSymbolArray.get(Tt.centerJustifiedTextSymbolIndex),La=s.ap(u.textSizeData,O,ta),$i=d.get("text-padding");Ti=this.collisionIndex.placeCollisionCircles(ne,ta,u.lineVertexArray,u.glyphOffsetArray,La,C,P,l,Pe,$.predicate,Tt.collisionCircleDiameter,$i,g,Je),Ti.circles.length&&Ti.collisionDetected&&!l&&s.w("Collisions detected, but collision boxes are not shown"),Ln=ue||Ti.circles.length>0&&!Ti.collisionDetected,Kn=Kn&&Ti.offscreen}if(mr.iconFeatureIndex&&(vo=mr.iconFeatureIndex),mr.iconBox){const ta=La=>this.collisionIndex.placeCollisionBox(La,_e,A,We,C,Pe,we,w,$.predicate,Je,pe&&Kr?Kr:void 0,Nt);si&&si.placeable&&mr.verticalIconBox?(Ui=ta(mr.verticalIconBox),Hn=Ui.placeable):(Ui=ta(mr.iconBox),Hn=Ui.placeable),Kn=Kn&&Ui.offscreen}const ms=ee||Tt.numHorizontalGlyphVertices===0&&Tt.numVerticalGlyphVertices===0,qo=Q||Tt.numIconVertices===0;ms||qo?qo?ms||(Hn=Hn&&Ln):Ln=Hn&&Ln:Hn=Ln=Hn&&Ln;const Zo=Hn&&Ui.placeable;if(Ln&&fi.placeable&&this.collisionIndex.insertCollisionBox(fi.box,ne,d.get("text-ignore-placement"),u.bucketInstanceId,si&&si.placeable&&go?go:za,$.ID),Zo&&this.collisionIndex.insertCollisionBox(Ui.box,_e,d.get("icon-ignore-placement"),u.bucketInstanceId,vo,$.ID),Ti&&Ln&&this.collisionIndex.insertCollisionCircles(Ti.circles,ne,d.get("text-ignore-placement"),u.bucketInstanceId,za,$.ID),l&&this.storeCollisionData(u.bucketInstanceId,Jr,mr,fi,Ui,Ti),Tt.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(u.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[Tt.crossTileID]=new ma((Ln||Qe)&&!(fi!=null&&fi.occluded),(Hn||Ue)&&!(Ui!=null&&Ui.occluded),Kn||u.justReloaded),i[Tt.crossTileID]=!0};if(Be){if(e.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const Tt=u.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let mr=Tt.length-1;mr>=0;--mr){const Jr=Tt[mr];Zt(u.symbolInstances.get(Jr),u.collisionArrays[Jr],Jr)}}else for(let Tt=e.symbolInstanceStart;Tt=0&&(e.text.placedSymbolArray.get(w).crossTileID=d>=0&&w!==d?0:l.crossTileID)}markUsedOrientation(e,i,l){const u=i===s.ao.horizontal||i===s.ao.horizontalOnly?i:0,d=i===s.ao.vertical?i:0,g=[l.leftJustifiedTextSymbolIndex,l.centerJustifiedTextSymbolIndex,l.rightJustifiedTextSymbolIndex];for(const w of g)e.text.placedSymbolArray.get(w).placedOrientation=u;l.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(l.verticalPlacedTextSymbolIndex).placedOrientation=d)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;const i=this.prevPlacement;let l=!1;this.prevZoomAdjustment=i?i.zoomAdjustment(this.transform.zoom):0;const u=i?i.symbolFadeChange(e):1,d=i?i.opacities:{},g=i?i.variableOffsets:{},w=i?i.placedOrientations:{};for(const C in this.placements){const P=this.placements[C],A=d[C];A?(this.opacities[C]=new Qr(A,u,P.text,P.icon),l=l||P.text!==A.text.placed||P.icon!==A.icon.placed):(this.opacities[C]=new Qr(null,u,P.text,P.icon,P.skipFade),l=l||P.text||P.icon)}for(const C in d){const P=d[C];if(!this.opacities[C]){const A=new Qr(P,u,!1,!1);A.isHidden()||(this.opacities[C]=A,l=l||P.text.placed||P.icon.placed)}}for(const C in g)this.variableOffsets[C]||!this.opacities[C]||this.opacities[C].isHidden()||(this.variableOffsets[C]=g[C]);for(const C in w)this.placedOrientations[C]||!this.opacities[C]||this.opacities[C].isHidden()||(this.placedOrientations[C]=w[C]);if(i&&i.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");l?this.lastPlacementChangeTime=e:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=i?i.lastPlacementChangeTime:e)}updateLayerOpacities(e,i){const l={};for(const u of i){const d=u.getBucket(e);d&&u.latestFeatureIndex&&e.id===d.layerIds[0]&&this.updateBucketOpacities(d,u.tileID,l,u.collisionBoxArray)}}updateBucketOpacities(e,i,l,u){e.hasTextData()&&(e.text.opacityVertexArray.clear(),e.text.hasVisibleVertices=!1),e.hasIconData()&&(e.icon.opacityVertexArray.clear(),e.icon.hasVisibleVertices=!1),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();const d=e.layers[0],g=d.layout,w=new Qr(null,0,!1,!1,!0),C=g.get("text-allow-overlap"),P=g.get("icon-allow-overlap"),A=d._unevaluatedLayout.hasValue("text-variable-anchor")||d._unevaluatedLayout.hasValue("text-variable-anchor-offset"),R=g.get("text-rotation-alignment")==="map",D=g.get("text-pitch-alignment")==="map",O=g.get("icon-text-fit")!=="none",$=new Qr(null,0,C&&(P||!e.hasIconData()||g.get("icon-optional")),P&&(C||!e.hasTextData()||g.get("text-optional")),!0);!e.collisionArrays&&u&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(u);const ee=(ne,ue,_e)=>{for(let he=0;he0,Be=this.placedOrientations[ue.crossTileID],Qe=Be===s.ao.vertical,Ue=Be===s.ao.horizontal||Be===s.ao.horizontalOnly;if(_e>0||he>0){const Je=Wt(Pe.text);ee(e.text,_e,Qe?Rr:Je),ee(e.text,he,Ue?Rr:Je);const Nt=Pe.text.isHidden();[ue.rightJustifiedTextSymbolIndex,ue.centerJustifiedTextSymbolIndex,ue.leftJustifiedTextSymbolIndex].forEach((mr=>{mr>=0&&(e.text.placedSymbolArray.get(mr).hidden=Nt||Qe?1:0)})),ue.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(ue.verticalPlacedTextSymbolIndex).hidden=Nt||Ue?1:0);const Zt=this.variableOffsets[ue.crossTileID];Zt&&this.markUsedJustification(e,Zt.anchor,ue,Be);const Tt=this.placedOrientations[ue.crossTileID];Tt&&(this.markUsedJustification(e,"left",ue,Tt),this.markUsedOrientation(e,Tt,ue))}if(pe){const Je=Wt(Pe.icon),Nt=!(O&&ue.verticalPlacedIconSymbolIndex&&Qe);ue.placedIconSymbolIndex>=0&&(ee(e.icon,ue.numIconVertices,Nt?Je:Rr),e.icon.placedSymbolArray.get(ue.placedIconSymbolIndex).hidden=Pe.icon.isHidden()),ue.verticalPlacedIconSymbolIndex>=0&&(ee(e.icon,ue.numVerticalIconVertices,Nt?Rr:Je),e.icon.placedSymbolArray.get(ue.verticalPlacedIconSymbolIndex).hidden=Pe.icon.isHidden())}const We=Q&&Q.has(ne)?Q.get(ne):{text:null,icon:null};if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){const Je=e.collisionArrays[ne];if(Je){let Nt=new s.P(0,0);if(Je.textBox||Je.verticalTextBox){let Zt=!0;if(A){const Tt=this.variableOffsets[we];Tt?(Nt=Zn(Tt.anchor,Tt.width,Tt.height,Tt.textOffset,Tt.textBoxScale),R&&Nt._rotate(D?-this.transform.bearingInRadians:this.transform.bearingInRadians)):Zt=!1}if(Je.textBox||Je.verticalTextBox){let Tt;Je.textBox&&(Tt=Qe),Je.verticalTextBox&&(Tt=Ue),qi(e.textCollisionBox.collisionVertexArray,Pe.text.placed,!Zt||Tt,We.text,Nt.x,Nt.y)}}if(Je.iconBox||Je.verticalIconBox){const Zt=!!(!Ue&&Je.verticalIconBox);let Tt;Je.iconBox&&(Tt=Zt),Je.verticalIconBox&&(Tt=!Zt),qi(e.iconCollisionBox.collisionVertexArray,Pe.icon.placed,Tt,We.icon,O?Nt.x:0,O?Nt.y:0)}}}}if(e.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.text.opacityVertexArray.length!==e.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`);if(e.icon.opacityVertexArray.length!==e.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`);e.bucketInstanceId in this.collisionCircleArrays&&(e.collisionCircleArray=this.collisionCircleArrays[e.bucketInstanceId],delete this.collisionCircleArrays[e.bucketInstanceId])}symbolFadeChange(e){return this.fadeDuration===0?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTimee}setStale(){this.stale=!0}}function qi(h,e,i,l,u,d){l&&l.length!==0||(l=[0,0,0,0]);const g=l[0]-dr,w=l[1]-dr,C=l[2]-dr,P=l[3]-dr;h.emplaceBack(e?1:0,i?1:0,u||0,d||0,g,w),h.emplaceBack(e?1:0,i?1:0,u||0,d||0,C,w),h.emplaceBack(e?1:0,i?1:0,u||0,d||0,C,P),h.emplaceBack(e?1:0,i?1:0,u||0,d||0,g,P)}const Yi=Math.pow(2,25),Ei=Math.pow(2,24),zi=Math.pow(2,17),Ki=Math.pow(2,16),oa=Math.pow(2,9),Ta=Math.pow(2,8),xt=Math.pow(2,1);function Wt(h){if(h.opacity===0&&!h.placed)return 0;if(h.opacity===1&&h.placed)return 4294967295;const e=h.placed?1:0,i=Math.floor(127*h.opacity);return i*Yi+e*Ei+i*zi+e*Ki+i*oa+e*Ta+i*xt+e}const Rr=0;class yn{constructor(e){this._sortAcrossTiles=e.layout.get("symbol-z-order")!=="viewport-y"&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,i,l,u,d){const g=this._bucketParts;for(;this._currentTileIndexw.sortKey-C.sortKey)));this._currentPartIndex!this._forceFullPlacement&&ie.now()-u>2;for(;this._currentPlacementIndex>=0;){const g=i[e[this._currentPlacementIndex]],w=this.placement.collisionIndex.transform.zoom;if(g.type==="symbol"&&(!g.minzoom||g.minzoom<=w)&&(!g.maxzoom||g.maxzoom>w)){if(this._inProgressLayer||(this._inProgressLayer=new yn(g)),this._inProgressLayer.continuePlacement(l[g.source],this.placement,this._showCollisionBoxes,g,d))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}const Xn=512/s.$/2;class Vn{constructor(e,i,l){this.tileID=e,this.bucketInstanceId=l,this._symbolsByKey={};const u=new Map;for(let d=0;d({x:Math.floor(C.anchorX*Xn),y:Math.floor(C.anchorY*Xn)}))),crossTileIDs:g.map((C=>C.crossTileID))};if(w.positions.length>128){const C=new s.aI(w.positions.length,16,Uint16Array);for(const{x:P,y:A}of w.positions)C.add(P,A);C.finish(),delete w.positions,w.index=C}this._symbolsByKey[d]=w}}getScaledCoordinates(e,i){const{x:l,y:u,z:d}=this.tileID.canonical,{x:g,y:w,z:C}=i.canonical,P=Xn/Math.pow(2,C-d),A=(w*s.$+e.anchorY)*P,R=u*s.$*Xn;return{x:Math.floor((g*s.$+e.anchorX)*P-l*s.$*Xn),y:Math.floor(A-R)}}findMatches(e,i,l){const u=this.tileID.canonical.ze))}}class wn{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Ji{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){const i=Math.round((e-this.lng)/360);if(i!==0)for(const l in this.indexes){const u=this.indexes[l],d={};for(const g in u){const w=u[g];w.tileID=w.tileID.unwrapTo(w.tileID.wrap+i),d[w.tileID.key]=w}this.indexes[l]=d}this.lng=e}addBucket(e,i,l){if(this.indexes[e.overscaledZ]&&this.indexes[e.overscaledZ][e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===i.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let d=0;de.overscaledZ)for(const w in g){const C=g[w];C.tileID.isChildOf(e)&&C.findMatches(i.symbolInstances,e,u)}else{const w=g[e.scaledTo(Number(d)).key];w&&w.findMatches(i.symbolInstances,e,u)}}for(let d=0;d{i[l]=!0}));for(const l in this.layerIndexes)i[l]||delete this.layerIndexes[l]}}var Ut="void main() {fragColor=vec4(1.0);}";const Ur={prelude:lr(`#ifdef GL_ES -precision mediump float; -#else -#if !defined(lowp) -#define lowp -#endif -#if !defined(mediump) -#define mediump -#endif -#if !defined(highp) -#define highp -#endif -#endif -out highp vec4 fragColor;`,`#ifdef GL_ES -precision highp float; -#else -#if !defined(lowp) -#define lowp -#endif -#if !defined(mediump) -#define mediump -#endif -#if !defined(highp) -#define highp -#endif -#endif -vec2 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 -);}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);return (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 -);} -#ifdef TERRAIN3D -uniform 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; -#endif -const 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) { -#ifdef TERRAIN3D -highp 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)); -#else -return 1.0; -#endif -}float calculate_visibility(vec4 pos) { -#ifdef TERRAIN3D -vec3 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; -#else -return 1.0; -#endif -}float ele(vec2 pos) { -#ifdef TERRAIN3D -vec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; -#else -return 0.0; -#endif -}float get_elevation(vec2 pos) { -#ifdef TERRAIN3D -#ifdef GLOBE -if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;} -#endif -vec2 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; -#else -return 0.0; -#endif -}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`),projectionMercator:lr("","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:lr("",`#define GLOBE_RADIUS 6371008.8 -uniform 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 -);}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); -if (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 -);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:lr(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:lr(`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;uniform 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; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`,"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:lr(`in vec3 v_data;in float v_visibility; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define mediump float radius -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define highp vec4 stroke_color -#pragma mapbox: define mediump float stroke_width -#pragma mapbox: define lowp float stroke_opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize mediump float radius -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize highp vec4 stroke_color -#pragma mapbox: initialize mediump float stroke_width -#pragma mapbox: initialize lowp float stroke_opacity -vec2 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;} -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`,`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; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define mediump float radius -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define highp vec4 stroke_color -#pragma mapbox: define mediump float stroke_width -#pragma mapbox: define lowp float stroke_opacity -void main(void) { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize mediump float radius -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize highp vec4 stroke_color -#pragma mapbox: initialize mediump float stroke_width -#pragma mapbox: initialize lowp float stroke_opacity -vec2 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) { -#ifdef GLOBE -vec3 center_vector=projectToSphere(circle_center); -#endif -float 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 { -#ifdef GLOBE -vec4 projected_center=interpolateProjection(circle_center,center_vector,ele); -#else -vec4 projected_center=projectTileWithElevation(circle_center,ele); -#endif -corner_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);} -#ifdef GLOBE -vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele); -#else -gl_Position=projectTileWithElevation(corner_position,ele); -#endif -} 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:lr(Ut,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:lr(`uniform highp float u_intensity;in vec2 v_extrude; -#pragma mapbox: define highp float weight -#define GAUSS_COEF 0.3989422804014327 -void main() { -#pragma mapbox: initialize highp float weight -float 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); -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`,`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; -#pragma mapbox: define highp float weight -#pragma mapbox: define mediump float radius -const highp float ZERO=1.0/255.0/16.0; -#define GAUSS_COEF 0.3989422804014327 -void main(void) { -#pragma mapbox: initialize highp float weight -#pragma mapbox: initialize mediump float radius -vec2 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); -#ifdef GLOBE -vec2 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); -#else -gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center)); -#endif -}`),heatmapTexture:lr(`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; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(0.0); -#endif -}`,"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:lr("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:lr("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:lr(`#ifdef GL_ES -precision highp float; -#endif -uniform 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 -{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)); -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`,"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:lr("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:lr(Ut,`in vec2 a_pos;void main() { -#ifdef GLOBE -gl_Position=projectTileFor3D(a_pos,0.0); -#else -gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0); -#endif -}`),fill:lr(`#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float opacity -fragColor=color*opacity; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`,`uniform vec2 u_fill_translate;in vec2 a_pos; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float opacity -gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:lr(`in vec2 v_pos; -#ifdef GLOBE -in float v_depth; -#endif -#pragma mapbox: define highp vec4 outline_color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 outline_color -#pragma mapbox: initialize lowp float opacity -float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity); -#ifdef GLOBE -if (v_depth > 1.0) {discard;} -#endif -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`,`uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos; -#ifdef GLOBE -out float v_depth; -#endif -#pragma mapbox: define highp vec4 outline_color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 outline_color -#pragma mapbox: initialize lowp float opacity -gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; -#ifdef GLOBE -v_depth=gl_Position.z/gl_Position.w; -#endif -}`),fillOutlinePattern:lr(`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; -#ifdef GLOBE -in float v_depth; -#endif -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -vec2 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; -#ifdef GLOBE -if (v_depth > 1.0) {discard;} -#endif -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`,`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; -#ifdef GLOBE -out float v_depth; -#endif -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 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; -#ifdef GLOBE -v_depth=gl_Position.z/gl_Position.w; -#endif -}`),fillPattern:lr(`#ifdef GL_ES -precision highp float; -#endif -uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b; -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -vec2 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; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`,`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; -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 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;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:lr(`in vec4 v_color;void main() {fragColor=v_color; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`,`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; -#ifdef TERRAIN3D -in vec2 a_centroid; -#endif -out vec4 v_color; -#pragma mapbox: define highp float base -#pragma mapbox: define highp float height -#pragma mapbox: define highp vec4 color -void main() { -#pragma mapbox: initialize highp float base -#pragma mapbox: initialize highp float height -#pragma mapbox: initialize highp vec4 color -vec3 normal=a_normal_ed.xyz; -#ifdef TERRAIN3D -float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); -#else -float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; -#endif -base=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; -#ifdef GLOBE -vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); -#else -gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); -#endif -float 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); -#ifdef GLOBE -mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition); -#endif -directional=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:lr(`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; -#pragma mapbox: define lowp float base -#pragma mapbox: define lowp float height -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float base -#pragma mapbox: initialize lowp float height -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 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; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`,`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; -#ifdef TERRAIN3D -in vec2 a_centroid; -#endif -#ifdef GLOBE -out vec3 v_sphere_pos; -#endif -out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting; -#pragma mapbox: define lowp float base -#pragma mapbox: define lowp float height -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float base -#pragma mapbox: initialize lowp float height -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 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; -#ifdef TERRAIN3D -float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); -#else -float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; -#endif -base=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; -#ifdef GLOBE -vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); -#else -gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); -#endif -vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 -? a_pos -: 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:lr(`#ifdef GL_ES -precision highp float; -#endif -uniform 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/pow(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); -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`,"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:lr(`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]; -#define PI 3.141592653589793 -#define STANDARD 0 -#define COMBINED 1 -#define IGOR 2 -#define MULTIDIRECTIONAL 3 -#define BASIC 4 -float 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 -{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 -{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);} -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`,"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:lr(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale; -#ifdef GLOBE -in float v_depth; -#endif -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -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);fragColor=color*(alpha*opacity); -#ifdef GLOBE -if (v_depth > 1.0) {discard;} -#endif -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`,` -#define scale 0.015873016 -in 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; -#ifdef GLOBE -out float v_depth; -#endif -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float width -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float width -float 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);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; -#ifdef GLOBE -v_depth=gl_Position.z/gl_Position.w; -#endif -#ifdef TERRAIN3D -v_gamma_scale=1.0; -#else -float 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; -#endif -v_width2=vec2(outset,inset);}`),lineGradient:lr(`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; -#ifdef GLOBE -in float v_depth; -#endif -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -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);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity); -#ifdef GLOBE -if (v_depth > 1.0) {discard;} -#endif -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`,` -#define scale 0.015873016 -in 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; -#ifdef GLOBE -out float v_depth; -#endif -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float width -void main() { -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float width -float 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; -#ifdef GLOBE -v_depth=gl_Position.z/gl_Position.w; -#endif -#ifdef TERRAIN3D -v_gamma_scale=1.0; -#else -float 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; -#endif -v_width2=vec2(outset,inset);}`),linePattern:lr(`#ifdef GL_ES -precision highp float; -#endif -uniform 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; -#ifdef GLOBE -in float v_depth; -#endif -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -vec2 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; -#ifdef GLOBE -if (v_depth > 1.0) {discard;} -#endif -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`,` -#define scale 0.015873016 -#define LINE_DISTANCE_SCALE 2.0 -in 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; -#ifdef GLOBE -out float v_depth; -#endif -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define mediump float width -#pragma mapbox: define lowp float floorwidth -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize mediump float width -#pragma mapbox: initialize lowp float floorwidth -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -float 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; -#ifdef GLOBE -v_depth=gl_Position.z/gl_Position.w; -#endif -#ifdef TERRAIN3D -v_gamma_scale=1.0; -#else -float 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; -#endif -v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:lr(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;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; -#ifdef GLOBE -in float v_depth; -#endif -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float width -#pragma mapbox: define lowp float floorwidth -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float width -#pragma mapbox: initialize lowp float floorwidth -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 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);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity); -#ifdef GLOBE -if (v_depth > 1.0) {discard;} -#endif -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`,` -#define scale 0.015873016 -#define LINE_DISTANCE_SCALE 2.0 -in 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_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale; -#ifdef GLOBE -out float v_depth; -#endif -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float width -#pragma mapbox: define lowp float floorwidth -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float width -#pragma mapbox: initialize lowp float floorwidth -float 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; -#ifdef GLOBE -v_depth=gl_Position.z/gl_Position.w; -#endif -#ifdef TERRAIN3D -v_gamma_scale=1.0; -#else -float 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; -#endif -v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:lr(`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); -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`,`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; -#ifdef GLOBE -if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;} -#endif -v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`),symbolIcon:lr(`uniform sampler2D u_texture;in vec2 v_tex;in float v_fade_opacity; -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize lowp float opacity -lowp float alpha=opacity*v_fade_opacity;fragColor=texture(u_texture,v_tex)*alpha; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`,`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_fade_opacity; -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize lowp float opacity -vec2 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);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? -camera_to_anchor_distance/u_camera_to_center_distance : -u_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; -#ifdef GLOBE -if(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);} -#endif -vec4 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;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_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:lr(`#define SDF_PX 8.0 -uniform bool u_is_halo;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; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -float 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 fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}fragColor=color*(alpha*opacity*fade_opacity); -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`,`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; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -vec2 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;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);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? -camera_to_anchor_distance/u_camera_to_center_distance : -u_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; -#ifdef GLOBE -if(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);} -#endif -vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*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;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));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:lr(`#define SDF_PX 8.0 -#define SDF 1.0 -#define ICON 0.0 -uniform bool u_is_halo;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; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;fragColor=texture(u_texture_icon,tex_icon)*alpha; -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -return;}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;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);fragColor=color*(alpha*opacity*fade_opacity); -#ifdef OVERDRAW_INSPECTOR -fragColor=vec4(1.0); -#endif -}`,`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; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -vec2 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);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? -camera_to_anchor_distance/u_camera_to_center_distance : -u_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; -#ifdef GLOBE -if(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);} -#endif -vec4 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;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));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:lr("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 && 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);float 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,get_elevation(a_pos3d.xy)-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:lr("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:lr("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:lr("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:lr(`in 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 -);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:lr("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);}")};function lr(h,e){const i=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,l=e.match(/in ([\w]+) ([\w]+)/g),u=h.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),d=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),g=d?d.concat(u):u,w={};return{fragmentSource:h=h.replace(i,((C,P,A,R,D)=>(w[D]=!0,P==="define"?` -#ifndef HAS_UNIFORM_u_${D} -in ${A} ${R} ${D}; -#else -uniform ${A} ${R} u_${D}; -#endif -`:` -#ifdef HAS_UNIFORM_u_${D} - ${A} ${R} ${D} = u_${D}; -#endif -`))),vertexSource:e=e.replace(i,((C,P,A,R,D)=>{const O=R==="float"?"vec2":"vec4",$=D.match(/color/)?"color":O;return w[D]?P==="define"?` -#ifndef HAS_UNIFORM_u_${D} -uniform lowp float u_${D}_t; -in ${A} ${O} a_${D}; -out ${A} ${R} ${D}; -#else -uniform ${A} ${R} u_${D}; -#endif -`:$==="vec4"?` -#ifndef HAS_UNIFORM_u_${D} - ${D} = a_${D}; -#else - ${A} ${R} ${D} = u_${D}; -#endif -`:` -#ifndef HAS_UNIFORM_u_${D} - ${D} = unpack_mix_${$}(a_${D}, u_${D}_t); -#else - ${A} ${R} ${D} = u_${D}; -#endif -`:P==="define"?` -#ifndef HAS_UNIFORM_u_${D} -uniform lowp float u_${D}_t; -in ${A} ${O} a_${D}; -#else -uniform ${A} ${R} u_${D}; -#endif -`:$==="vec4"?` -#ifndef HAS_UNIFORM_u_${D} - ${A} ${R} ${D} = a_${D}; -#else - ${A} ${R} ${D} = u_${D}; -#endif -`:` -#ifndef HAS_UNIFORM_u_${D} - ${A} ${R} ${D} = unpack_mix_${$}(a_${D}, u_${D}_t); -#else - ${A} ${R} ${D} = u_${D}; -#endif -`})),staticAttributes:l,staticUniforms:g}}class Tn{constructor(e,i,l){this.vertexBuffer=e,this.indexBuffer=i,this.segments=l}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var nn=s.aJ([{name:"a_pos",type:"Int16",components:2}]);const Cn="#define PROJECTION_MERCATOR",$n="mercator";class Pr{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return $n}get shaderDefine(){return Cn}get shaderPreludeCode(){return Ur.projectionMercator}get vertexShaderPreludeCode(){return Ur.projectionMercator.vertexSource}get subdivisionGranularity(){return s.aK.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(e){}getMeshFromTileID(e,i,l,u,d){if(this._cachedMesh)return this._cachedMesh;const g=new s.aL;g.emplaceBack(0,0),g.emplaceBack(s.$,0),g.emplaceBack(0,s.$),g.emplaceBack(s.$,s.$);const w=e.createVertexBuffer(g,nn.members),C=s.aM.simpleSegment(0,0,4,2),P=new s.aN;P.emplaceBack(1,0,2),P.emplaceBack(1,2,3);const A=e.createIndexBuffer(P);return this._cachedMesh=new Tn(w,A,C),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(e){}}class Mn{constructor(e=0,i=0,l=0,u=0){if(isNaN(e)||e<0||isNaN(i)||i<0||isNaN(l)||l<0||isNaN(u)||u<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=i,this.left=l,this.right=u}interpolate(e,i,l){return i.top!=null&&e.top!=null&&(this.top=s.C.number(e.top,i.top,l)),i.bottom!=null&&e.bottom!=null&&(this.bottom=s.C.number(e.bottom,i.bottom,l)),i.left!=null&&e.left!=null&&(this.left=s.C.number(e.left,i.left,l)),i.right!=null&&e.right!=null&&(this.right=s.C.number(e.right,i.right,l)),this}getCenter(e,i){const l=s.ah((this.left+e-this.right)/2,0,e),u=s.ah((this.top+i-this.bottom)/2,0,i);return new s.P(l,u)}equals(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right}clone(){return new Mn(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function bn(h,e){if(!h.renderWorldCopies||h.lngRange)return;const i=e.lng-h.center.lng;e.lng+=i>180?-360:i<-180?360:0}function ln(h){return Math.max(0,Math.floor(h))}class Sn{constructor(e,i,l,u,d,g){this._callbacks=e,this._tileSize=512,this._renderWorldCopies=g===void 0||!!g,this._minZoom=i||0,this._maxZoom=l||22,this._minPitch=u??0,this._maxPitch=d??60,this.setMaxBounds(),this._width=0,this._height=0,this._center=new s.S(0,0),this._elevation=0,this._zoom=0,this._tileZoom=ln(this._zoom),this._scale=s.af(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new Mn,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(e,i,l){this._latRange=e.latRange,this._lngRange=e.lngRange,this._width=e.width,this._height=e.height,this._center=e.center,this._elevation=e.elevation,this._minElevationForCurrentTile=e.minElevationForCurrentTile,this._zoom=e.zoom,this._tileZoom=ln(this._zoom),this._scale=s.af(this._zoom),this._bearingInRadians=e.bearingInRadians,this._fovInRadians=e.fovInRadians,this._pitchInRadians=e.pitchInRadians,this._rollInRadians=e.rollInRadians,this._unmodified=e.unmodified,this._edgeInsets=new Mn(e.padding.top,e.padding.bottom,e.padding.left,e.padding.right),this._minZoom=e.minZoom,this._maxZoom=e.maxZoom,this._minPitch=e.minPitch,this._maxPitch=e.maxPitch,this._renderWorldCopies=e.renderWorldCopies,this._cameraToCenterDistance=e.cameraToCenterDistance,this._nearZ=e.nearZ,this._farZ=e.farZ,this._autoCalculateNearFarZ=!l&&e.autoCalculateNearFarZ,i&&this._constrain(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(e){this._minElevationForCurrentTile=e}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(e){this._minZoom!==e&&(this._minZoom=e,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(e){this._minPitch!==e&&(this._minPitch=e,this.setPitch(Math.max(this.pitch,e)))}get maxPitch(){return this._maxPitch}setMaxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.setPitch(Math.min(this.pitch,e)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(e){e===void 0?e=!0:e===null&&(e=!1),this._renderWorldCopies=e}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new s.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(e){const i=s.aO(e,-180,180)*Math.PI/180;var l,u,d,g,w,C,P,A,R;this._bearingInRadians!==i&&(this._unmodified=!1,this._bearingInRadians=i,this._calcMatrices(),this._rotationMatrix=N(),l=this._rotationMatrix,d=-this._bearingInRadians,g=(u=this._rotationMatrix)[0],w=u[1],C=u[2],P=u[3],A=Math.sin(d),R=Math.cos(d),l[0]=g*R+C*A,l[1]=w*R+P*A,l[2]=g*-A+C*R,l[3]=w*-A+P*R)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(e){const i=s.ah(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==i&&(this._unmodified=!1,this._pitchInRadians=i,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(e){const i=e/180*Math.PI;this._rollInRadians!==i&&(this._unmodified=!1,this._rollInRadians=i,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return s.aP(this._fovInRadians)}setFov(e){e=s.ah(e,.1,150),this.fov!==e&&(this._unmodified=!1,this._fovInRadians=s.ae(e),this._calcMatrices())}get zoom(){return this._zoom}setZoom(e){const i=this.getConstrained(this._center,e).zoom;this._zoom!==i&&(this._unmodified=!1,this._zoom=i,this._tileZoom=Math.max(0,Math.floor(i)),this._scale=s.af(i),this._constrain(),this._calcMatrices())}get center(){return this._center}setCenter(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(e){e!==this._elevation&&(this._elevation=e,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,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(e,i){this._autoCalculateNearFarZ=!1,this._nearZ=e,this._farZ=i,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,i,l){this._unmodified=!1,this._edgeInsets.interpolate(e,i,l),this._constrain(),this._calcMatrices()}resize(e,i,l=!0){this._width=e,this._height=i,l&&this._constrain(),this._calcMatrices()}getMaxBounds(){return this._latRange&&this._latRange.length===2&&this._lngRange&&this._lngRange.length===2?new mt([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]]):null}setMaxBounds(e){e?(this._lngRange=[e.getWest(),e.getEast()],this._latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this._lngRange=null,this._latRange=[-s.ai,s.ai])}getConstrained(e,i){return this._callbacks.getConstrained(e,i)}getCameraQueryGeometry(e,i){if(i.length===1)return[i[0],e];{const{minX:l,minY:u,maxX:d,maxY:g}=s.a2.fromPoints(i).extend(e);return[new s.P(l,u),new s.P(d,u),new s.P(d,g),new s.P(l,g),new s.P(l,u)]}}_constrain(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;const e=this._unmodified,{center:i,zoom:l}=this.getConstrained(this.center,this.zoom);this.setCenter(i),this.setZoom(l),this._unmodified=e,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let e=s.ag(new Float64Array(16));s.N(e,e,[this._width/2,-this._height/2,1]),s.M(e,e,[1,-1,0]),this._clipSpaceToPixelsMatrix=e,e=s.ag(new Float64Array(16)),s.N(e,e,[1,-1,1]),s.M(e,e,[-1,-1,0]),s.N(e,e,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=e,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(e,i,l,u){const d=l!==void 0?l:this.bearing,g=u=u!==void 0?u:this.pitch,w=s.a1.fromLngLat(e,i),C=-Math.cos(s.ae(g)),P=Math.sin(s.ae(g)),A=P*Math.sin(s.ae(d)),R=-P*Math.cos(s.ae(d));let D=this.elevation;const O=i-D;let $;C*O>=0||Math.abs(C)<.1?($=1e4,D=i+$*C):$=-O/C;let ee,Q,ne=s.aQ(1,w.y),ue=0;do{if(ue+=1,ue>10)break;Q=$/ne,ee=new s.a1(w.x+A*Q,w.y+R*Q),ne=1/ee.meterInMercatorCoordinateUnits()}while(Math.abs($-Q*ne)>1e-12);return{center:ee.toLngLat(),elevation:D,zoom:s.ak(this.height/2/Math.tan(this.fovInRadians/2)/Q/this.tileSize)}}recalculateZoomAndCenter(e){if(this.elevation-e==0)return;const i=s.aj(1,this.center.lat)*this.worldSize,l=this.cameraToCenterDistance/i,u=s.a1.fromLngLat(this.center,this.elevation),d=Ie(this.center,this.elevation,this.pitch,this.bearing,l);this._elevation=e;const g=this.calculateCenterFromCameraLngLatAlt(d.toLngLat(),s.aQ(d.z,u.y),this.bearing,this.pitch);this._elevation=g.elevation,this._center=g.center,this.setZoom(g.zoom)}getCameraPoint(){const e=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new s.P(e*Math.sin(this.rollInRadians),e*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){const e=s.aj(1,this.center.lat)*this.worldSize;return Ie(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/e).toLngLat()}getMercatorTileCoordinates(e){if(!e)return[0,0,1,1];const i=e.canonical.z>=0?1<this.max[0]||e.aabb.min[1]>this.max[1]||e.aabb.min[2]>this.max[2]||e.aabb.max[0]0?(i+=e[u]*this.min[u],l+=e[u]*this.max[u]):(l+=e[u]*this.min[u],i+=e[u]*this.max[u]);return i>=0?2:l<0?0:1}}class gn{distanceToTile2d(e,i,l,u){const d=u.distanceX([e,i]),g=u.distanceY([e,i]);return Math.hypot(d,g)}getWrap(e,i,l){return l}getTileBoundingVolume(e,i,l,u){var d,g;let w=0,C=0;if(u!=null&&u.terrain){const A=new s.Z(e.z,i,e.z,e.x,e.y),R=u.terrain.getMinMaxElevation(A);w=(d=R.minElevation)!==null&&d!==void 0?d:Math.min(0,l),C=(g=R.maxElevation)!==null&&g!==void 0?g:Math.max(0,l)}const P=1<u}allowWorldCopies(){return!0}prepareNextFrame(){}}class fn{constructor(e,i,l){this.points=e,this.planes=i,this.aabb=l}static fromInvProjectionMatrix(e,i=1,l=0,u,d){const g=d?[[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]],w=Math.pow(2,l),C=[[-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((D=>(function(O,$,ee,Q){const ne=s.aw([],O,$),ue=1/ne[3]/ee*Q;return s.aY(ne,ne,[ue,ue,1/ne[3],ue])})(D,e,i,w)));u&&(function(D,O,$,ee){const Q=ee?4:0,ne=ee?0:4;let ue=0;const _e=[],he=[];for(let pe=0;pe<4;pe++){const Be=s.aU([],D[pe+ne],D[pe+Q]),Qe=s.aZ(Be);s.aR(Be,Be,1/Qe),_e.push(Qe),he.push(Be)}for(let pe=0;pe<4;pe++){const Be=s.a_(D[pe+Q],he[pe],$);ue=Be!==null&&Be>=0?Math.max(ue,Be):Math.max(ue,_e[pe])}const we=(function(pe,Be){const Qe=s.aU([],pe[Be[0]],pe[Be[1]]),Ue=s.aU([],pe[Be[2]],pe[Be[1]]),We=[0,0,0,0];return s.aV(We,s.aW([],Qe,Ue)),We[3]=-s.aX(We,pe[Be[0]]),We})(D,O),Pe=(function(pe,Be){const Qe=s.a$(pe),Ue=s.b0([],pe,1/Qe),We=s.aU([],Be,s.aR([],Ue,s.aX(Be,Ue))),Je=s.a$(We);if(Je>0){const Nt=Math.sqrt(1-Ue[3]*Ue[3]),Zt=s.aR([],Ue,-Ue[3]),Tt=s.aS([],Zt,s.aR([],We,Nt/Je));return s.b1(Be,Tt)}return null})($,we);if(Pe!==null){const pe=Pe/s.aX(he[0],we);ue=Math.min(ue,pe)}for(let pe=0;pe<4;pe++){const Be=Math.min(ue,_e[pe]);D[pe+ne]=[D[pe+Q][0]+he[pe][0]*Be,D[pe+Q][1]+he[pe][1]*Be,D[pe+Q][2]+he[pe][2]*Be,1]}})(C,g[0],u,d);const P=g.map((D=>{const O=s.aU([],C[D[0]],C[D[1]]),$=s.aU([],C[D[2]],C[D[1]]),ee=s.aV([],s.aW([],O,$)),Q=-s.aX(ee,C[D[1]]);return ee.concat(Q)})),A=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],R=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(const D of C)for(let O=0;O<3;O++)A[O]=Math.min(A[O],D[O]),R[O]=Math.max(R[O],D[O]);return new fn(C,P,new kn(A,R))}}class an{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(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,i,l){return this._helper.interpolatePadding(e,i,l)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,i,l=!0){this._helper.resize(e,i,l)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}overrideNearFarZ(e,i){this._helper.overrideNearFarZ(e,i)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}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 nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(e,i){}constructor(e,i,l,u,d){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this._helper=new Sn({calcMatrices:()=>{this._calcMatrices()},getConstrained:(g,w)=>this.getConstrained(g,w)},e,i,l,u,d),this._coveringTilesDetailsProvider=new gn}clone(){const e=new an;return e.apply(this),e}apply(e,i,l){this._helper.apply(e,i,l)}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(e){const i=[new s.b2(0,e)];if(this._helper._renderWorldCopies){const l=this.screenPointToMercatorCoordinate(new s.P(0,0)),u=this.screenPointToMercatorCoordinate(new s.P(this._helper._width,0)),d=this.screenPointToMercatorCoordinate(new s.P(this._helper._width,this._helper._height)),g=this.screenPointToMercatorCoordinate(new s.P(0,this._helper._height)),w=Math.floor(Math.min(l.x,u.x,d.x,g.x)),C=Math.floor(Math.max(l.x,u.x,d.x,g.x)),P=1;for(let A=w-P;A<=C+P;A++)A!==0&&i.push(new s.b2(A,e))}return i}getCameraFrustum(){return fn.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){const i=this.screenPointToLocation(this.centerPoint,e),l=e?e.getElevationForLngLatZoom(i,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(l)}setLocationAtPoint(e,i){const l=s.aj(this.elevation,this.center.lat),u=this.screenPointToMercatorCoordinateAtZ(i,l),d=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,l),g=s.a1.fromLngLat(e),w=new s.a1(g.x-(u.x-d.x),g.y-(u.y-d.y));this.setCenter(w==null?void 0:w.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(e,i){return i?this.coordinatePoint(s.a1.fromLngLat(e),i.getElevationForLngLatZoom(e,this._helper._tileZoom),this._pixelMatrix3D):this.coordinatePoint(s.a1.fromLngLat(e))}screenPointToLocation(e,i){var l;return(l=this.screenPointToMercatorCoordinate(e,i))===null||l===void 0?void 0:l.toLngLat()}screenPointToMercatorCoordinate(e,i){if(i){const l=i.pointCoordinate(e);if(l!=null)return l}return this.screenPointToMercatorCoordinateAtZ(e)}screenPointToMercatorCoordinateAtZ(e,i){const l=i||0,u=[e.x,e.y,0,1],d=[e.x,e.y,1,1];s.aw(u,u,this._pixelMatrixInverse),s.aw(d,d,this._pixelMatrixInverse);const g=u[3],w=d[3],C=u[1]/g,P=d[1]/w,A=u[2]/g,R=d[2]/w,D=A===R?0:(l-A)/(R-A);return new s.a1(s.C.number(u[0]/g,d[0]/w,D)/this.worldSize,s.C.number(C,P,D)/this.worldSize,l)}coordinatePoint(e,i=0,l=this._pixelMatrix){const u=[e.x*this.worldSize,e.y*this.worldSize,i,1];return s.aw(u,u,l),new s.P(u[0]/u[3],u[1]/u[3])}getBounds(){const e=Math.max(0,this._helper._height/2-de(this));return new mt().extend(this.screenPointToLocation(new s.P(0,e))).extend(this.screenPointToLocation(new s.P(this._helper._width,e))).extend(this.screenPointToLocation(new s.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new s.P(0,this._helper._height)))}isPointOnMapSurface(e,i){return i?i.pointCoordinate(e)!=null:e.y>this.height/2-de(this)}calculatePosMatrix(e,i=!1,l){var u;const d=(u=e.key)!==null&&u!==void 0?u:s.b3(e.wrap,e.canonical.z,e.canonical.z,e.canonical.x,e.canonical.y),g=i?this._alignedPosMatrixCache:this._posMatrixCache;if(g.has(d)){const P=g.get(d);return l?P.f32:P.f64}const w=Se(e,this.worldSize);s.O(w,i?this._alignedProjMatrix:this._viewProjMatrix,w);const C={f64:w,f32:new Float32Array(w)};return g.set(d,C),l?C.f32:C.f64}calculateFogMatrix(e){const i=e.key,l=this._fogMatrixCacheF32;if(l.has(i))return l.get(i);const u=Se(e,this.worldSize);return s.O(u,this._fogMatrix,u),l.set(i,new Float32Array(u)),l.get(i)}getConstrained(e,i){i=s.ah(+i,this.minZoom,this.maxZoom);const l={center:new s.S(e.lng,e.lat),zoom:i};let u=this._helper._lngRange;if(!this._helper._renderWorldCopies&&u===null){const _e=179.9999999999;u=[-_e,_e]}const d=this.tileSize*s.af(l.zoom);let g=0,w=d,C=0,P=d,A=0,R=0;const{x:D,y:O}=this.size;if(this._helper._latRange){const _e=this._helper._latRange;g=s.U(_e[1])*d,w=s.U(_e[0])*d,w-gw&&(ne=w-_e)}if(u){const _e=(C+P)/2;let he=$;this._helper._renderWorldCopies&&(he=s.aO($,_e-d/2,_e+d/2));const we=D/2;he-weP&&(Q=P-we)}if(Q!==void 0||ne!==void 0){const _e=new s.P(Q??$,ne??ee);l.center=ae(d,_e).wrap()}return l}calculateCenterFromCameraLngLatAlt(e,i,l,u){return this._helper.calculateCenterFromCameraLngLatAlt(e,i,l,u)}_calculateNearFarZIfNeeded(e,i,l){if(!this._helper.autoCalculateNearFarZ)return;const u=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),d=e-u*this._helper._pixelPerMeter/Math.cos(i),g=u<0?d:e,w=Math.PI/2+this.pitchInRadians,C=s.ae(this.fov)*(Math.abs(Math.cos(s.ae(this.roll)))*this.height+Math.abs(Math.sin(s.ae(this.roll)))*this.width)/this.height*(.5+l.y/this.height),P=Math.sin(C)*g/Math.sin(s.ah(Math.PI-w-C,.01,Math.PI-.01)),A=de(this),R=Math.atan(A/this._helper.cameraToCenterDistance),D=s.ae(.75),O=R>D?2*R*(.5+l.y/(2*A)):D,$=Math.sin(O)*g/Math.sin(s.ah(Math.PI-w-O,.01,Math.PI-.01)),ee=Math.min(P,$);this._helper._farZ=1.01*(Math.cos(Math.PI/2-i)*ee+g),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;const e=this.centerOffset,i=X(this.worldSize,this.center),l=i.x,u=i.y;this._helper._pixelPerMeter=s.aj(1,this.center.lat)*this.worldSize;const d=s.ae(Math.min(this.pitch,Z)),g=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(d));let w;this._calculateNearFarZIfNeeded(g,d,e),w=new Float64Array(16),s.b4(w,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),s.aq(this._invProjMatrix,w),w[8]=2*-e.x/this._helper._width,w[9]=2*e.y/this._helper._height,this._projectionMatrix=s.b5(w),s.N(w,w,[1,-1,1]),s.M(w,w,[0,0,-this._helper.cameraToCenterDistance]),s.b6(w,w,-this.rollInRadians),s.b7(w,w,this.pitchInRadians),s.b6(w,w,-this.bearingInRadians),s.M(w,w,[-l,-u,0]),this._mercatorMatrix=s.N([],w,[this.worldSize,this.worldSize,this.worldSize]),s.N(w,w,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=s.O(new Float64Array(16),this.clipSpaceToPixelsMatrix,w),s.M(w,w,[0,0,-this.elevation]),this._viewProjMatrix=w,this._invViewProjMatrix=s.aq([],w);const C=[0,0,-1,1];s.aw(C,C,this._invViewProjMatrix),this._cameraPosition=[C[0]/C[3],C[1]/C[3],C[2]/C[3]],this._fogMatrix=new Float64Array(16),s.b4(this._fogMatrix,this.fovInRadians,this.width/this.height,g,this._helper._farZ),this._fogMatrix[8]=2*-e.x/this.width,this._fogMatrix[9]=2*e.y/this.height,s.N(this._fogMatrix,this._fogMatrix,[1,-1,1]),s.M(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),s.b6(this._fogMatrix,this._fogMatrix,-this.rollInRadians),s.b7(this._fogMatrix,this._fogMatrix,this.pitchInRadians),s.b6(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),s.M(this._fogMatrix,this._fogMatrix,[-l,-u,0]),s.N(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),s.M(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=s.O(new Float64Array(16),this.clipSpaceToPixelsMatrix,w);const P=this._helper._width%2/2,A=this._helper._height%2/2,R=Math.cos(this.bearingInRadians),D=Math.sin(-this.bearingInRadians),O=l-Math.round(l)+R*P+D*A,$=u-Math.round(u)+R*A+D*P,ee=new Float64Array(w);if(s.M(ee,ee,[O>.5?O-1:O,$>.5?$-1:$,0]),this._alignedProjMatrix=ee,w=s.aq(new Float64Array(16),this._pixelMatrix),!w)throw new Error("failed to invert matrix");this._pixelMatrixInverse=w,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;const e=this.screenPointToMercatorCoordinate(new s.P(0,0)),i=[e.x*this.worldSize,e.y*this.worldSize,0,1];return s.aw(i,i,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){const e=s.aj(1,this.center.lat)*this.worldSize;return Ie(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/e).toLngLat()}lngLatToCameraDepth(e,i){const l=s.a1.fromLngLat(e),u=[l.x*this.worldSize,l.y*this.worldSize,i,1];return s.aw(u,u,this._viewProjMatrix),u[2]/u[3]}getProjectionData(e){const{overscaledTileID:i,aligned:l,applyTerrainMatrix:u}=e,d=this._helper.getMercatorTileCoordinates(i),g=i?this.calculatePosMatrix(i,l,!0):null;let w;return w=i&&i.terrainRttPosMatrix32f&&u?i.terrainRttPosMatrix32f:g||s.b8(),{mainMatrix:w,tileMercatorCoords:d,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:w}}isLocationOccluded(e){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(e,i,l){return 1}transformLightDirection(e){return s.aT(e)}getRayDirectionFromPixel(e){throw new Error("Not implemented.")}projectTileCoordinates(e,i,l,u){const d=this.calculatePosMatrix(l);let g;u?(g=[e,i,u(e,i),1],s.aw(g,g,d)):(g=[e,i,0,1],En(g,g,d));const w=g[3];return{point:new s.P(g[0]/w,g[1]/w),signedDistanceFromCamera:w,isOccluded:!1}}populateCache(e){for(const i of e)this.calculatePosMatrix(i)}getMatrixForModel(e,i){const l=s.a1.fromLngLat(e,i),u=l.meterInMercatorCoordinateUnits(),d=s.b9();return s.M(d,d,[l.x,l.y,l.z]),s.b6(d,d,Math.PI),s.b7(d,d,Math.PI/2),s.N(d,d,[-u,u,u]),d}getProjectionDataForCustomLayer(e=!0){const i=new s.Z(0,0,0,0,0),l=this.getProjectionData({overscaledTileID:i,applyGlobeMatrix:e}),u=Se(i,this.worldSize);s.O(u,this._viewProjMatrix,u),l.tileMercatorCoords=[0,0,1,1];const d=[s.$,s.$,this.worldSize/this._helper.pixelsPerMeter],g=s.ba();return s.N(g,u,d),l.fallbackMatrix=g,l.mainMatrix=g,l}getFastPathSimpleProjectionMatrix(e){return this.calculatePosMatrix(e)}}function po(){s.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function pi(h){if(h.useSlerp)if(h.k<1){const e=s.bb(h.startEulerAngles.roll,h.startEulerAngles.pitch,h.startEulerAngles.bearing),i=s.bb(h.endEulerAngles.roll,h.endEulerAngles.pitch,h.endEulerAngles.bearing),l=new Float64Array(4);s.bc(l,e,i,h.k);const u=s.bd(l);h.tr.setRoll(u.roll),h.tr.setPitch(u.pitch),h.tr.setBearing(u.bearing)}else h.tr.setRoll(h.endEulerAngles.roll),h.tr.setPitch(h.endEulerAngles.pitch),h.tr.setBearing(h.endEulerAngles.bearing);else h.tr.setRoll(s.C.number(h.startEulerAngles.roll,h.endEulerAngles.roll,h.k)),h.tr.setPitch(s.C.number(h.startEulerAngles.pitch,h.endEulerAngles.pitch,h.k)),h.tr.setBearing(s.C.number(h.startEulerAngles.bearing,h.endEulerAngles.bearing,h.k))}function Gn(h,e,i,l,u){const d=u.padding,g=X(u.worldSize,i.getNorthWest()),w=X(u.worldSize,i.getNorthEast()),C=X(u.worldSize,i.getSouthEast()),P=X(u.worldSize,i.getSouthWest()),A=s.ae(-l),R=g.rotate(A),D=w.rotate(A),O=C.rotate(A),$=P.rotate(A),ee=new s.P(Math.max(R.x,D.x,$.x,O.x),Math.max(R.y,D.y,$.y,O.y)),Q=new s.P(Math.min(R.x,D.x,$.x,O.x),Math.min(R.y,D.y,$.y,O.y)),ne=ee.sub(Q),ue=(u.width-(d.left+d.right+e.left+e.right))/ne.x,_e=(u.height-(d.top+d.bottom+e.top+e.bottom))/ne.y;if(_e<0||ue<0)return void po();const he=Math.min(s.ak(u.scale*Math.min(ue,_e)),h.maxZoom),we=s.P.convert(h.offset),Pe=new s.P((e.left-e.right)/2,(e.top-e.bottom)/2).rotate(s.ae(l)),pe=we.add(Pe).mult(u.scale/s.af(he));return{center:ae(u.worldSize,g.add(C).div(2).sub(pe)),zoom:he,bearing:l}}class jn{get useGlobeControls(){return!1}handlePanInertia(e,i){return{easingOffset:e,easingCenter:i.center}}handleMapControlsRollPitchBearingZoom(e,i){e.bearingDelta&&i.setBearing(i.bearing+e.bearingDelta),e.pitchDelta&&i.setPitch(i.pitch+e.pitchDelta),e.rollDelta&&i.setRoll(i.roll+e.rollDelta),e.zoomDelta&&i.setZoom(i.zoom+e.zoomDelta)}handleMapControlsPan(e,i,l){e.around.distSqr(i.centerPoint)<.01||i.setLocationAtPoint(l,e.around)}cameraForBoxAndBearing(e,i,l,u,d){return Gn(e,i,l,u,d)}handleJumpToCenterZoom(e,i){e.zoom!==(i.zoom!==void 0?+i.zoom:e.zoom)&&e.setZoom(+i.zoom),i.center!==void 0&&e.setCenter(s.S.convert(i.center))}handleEaseTo(e,i){const l=e.zoom,u=e.padding,d={roll:e.roll,pitch:e.pitch,bearing:e.bearing},g={roll:i.roll===void 0?e.roll:i.roll,pitch:i.pitch===void 0?e.pitch:i.pitch,bearing:i.bearing===void 0?e.bearing:i.bearing},w=i.zoom!==void 0,C=!e.isPaddingEqual(i.padding);let P=!1;const A=w?+i.zoom:e.zoom;let R=e.centerPoint.add(i.offsetAsPoint);const D=e.screenPointToLocation(R),{center:O,zoom:$}=e.getConstrained(s.S.convert(i.center||D),A??l);bn(e,O);const ee=X(e.worldSize,D),Q=X(e.worldSize,O).sub(ee),ne=s.af($-l);return P=$!==l,{easeFunc:ue=>{if(P&&e.setZoom(s.C.number(l,$,ue)),s.be(d,g)||pi({startEulerAngles:d,endEulerAngles:g,tr:e,k:ue,useSlerp:d.roll!=g.roll}),C&&(e.interpolatePadding(u,i.padding,ue),R=e.centerPoint.add(i.offsetAsPoint)),i.around)e.setLocationAtPoint(i.around,i.aroundPoint);else{const _e=s.af(e.zoom-l),he=$>l?Math.min(2,ne):Math.max(.5,ne),we=Math.pow(he,1-ue),Pe=ae(e.worldSize,ee.add(Q.mult(ue*we)).mult(_e));e.setLocationAtPoint(e.renderWorldCopies?Pe.wrap():Pe,R)}},isZooming:P,elevationCenter:O}}handleFlyTo(e,i){const l=i.zoom!==void 0,u=e.zoom,d=e.getConstrained(s.S.convert(i.center||i.locationAtOffset),l?+i.zoom:u),g=d.center,w=d.zoom;bn(e,g);const C=X(e.worldSize,i.locationAtOffset),P=X(e.worldSize,g).sub(C),A=P.mag(),R=s.af(w-u);let D;if(i.minZoom!==void 0){const O=Math.min(+i.minZoom,u,w),$=e.getConstrained(g,O).zoom;D=s.af($-u)}return{easeFunc:(O,$,ee,Q)=>{e.setZoom(O===1?w:u+s.ak($));const ne=O===1?g:ae(e.worldSize,C.add(P.mult(ee)).mult($));e.setLocationAtPoint(e.renderWorldCopies?ne.wrap():ne,Q)},scaleOfZoom:R,targetCenter:g,scaleOfMinZoom:D,pixelPathLength:A}}}class zn{constructor(e,i,l){this.blendFunction=e,this.blendColor=i,this.mask=l}}zn.Replace=[1,0],zn.disabled=new zn(zn.Replace,s.bf.transparent,[!1,!1,!1,!1]),zn.unblended=new zn(zn.Replace,s.bf.transparent,[!0,!0,!0,!0]),zn.alphaBlended=new zn([1,771],s.bf.transparent,[!0,!0,!0,!0]);const qa=2305;class Lr{constructor(e,i,l){this.enable=e,this.mode=i,this.frontFace=l}}Lr.disabled=new Lr(!1,1029,qa),Lr.backCCW=new Lr(!0,1029,qa),Lr.frontCCW=new Lr(!0,1028,qa);class $r{constructor(e,i,l){this.func=e,this.mask=i,this.range=l}}$r.ReadOnly=!1,$r.ReadWrite=!0,$r.disabled=new $r(519,$r.ReadOnly,[0,1]);const _a=7680;class cn{constructor(e,i,l,u,d,g){this.test=e,this.ref=i,this.mask=l,this.fail=u,this.depthFail=d,this.pass=g}}cn.disabled=new cn({func:519,mask:0},0,0,_a,_a,_a);const Li=new WeakMap;function ga(h){var e;if(Li.has(h))return Li.get(h);{const i=(e=h.getParameter(h.VERSION))===null||e===void 0?void 0:e.startsWith("WebGL 2.0");return Li.set(h,i),i}}class sa{get awaitingQuery(){return!!this._readbackQueue}constructor(e){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=e;const i=e.context,l=i.gl;this._texFormat=l.RGBA,this._texType=l.UNSIGNED_BYTE;const u=new s.aL;u.emplaceBack(-1,-1),u.emplaceBack(2,-1),u.emplaceBack(-1,2);const d=new s.aN;d.emplaceBack(0,1,2),this._fullscreenTriangle=new Tn(i.createVertexBuffer(u,nn.members),i.createIndexBuffer(d),s.aM.simpleSegment(0,0,u.length,d.length)),this._resultBuffer=new Uint8Array(4),i.activeTexture.set(l.TEXTURE1);const g=l.createTexture();l.bindTexture(l.TEXTURE_2D,g),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,l.NEAREST),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,l.NEAREST),l.texImage2D(l.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=i.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(g),ga(l)&&(this._pbo=l.createBuffer(),l.bindBuffer(l.PIXEL_PACK_BUFFER,this._pbo),l.bufferData(l.PIXEL_PACK_BUFFER,4,l.STREAM_READ),l.bindBuffer(l.PIXEL_PACK_BUFFER,null))}destroy(){const e=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),e.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(e,i){const l=this._updateCount;return this._readbackQueue?l>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():l>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(e,i),this._updateCount++,this._measuredError}_bindFramebuffer(){const e=this._cachedRenderContext.context,i=e.gl;e.activeTexture.set(i.TEXTURE1),i.bindTexture(i.TEXTURE_2D,this._fbo.colorAttachment.get()),e.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(e,i){const l=this._cachedRenderContext.context,u=l.gl;if(this._bindFramebuffer(),l.viewport.set([0,0,this._texWidth,this._texHeight]),l.clear({color:s.bf.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(l,u.TRIANGLES,$r.disabled,cn.disabled,zn.unblended,Lr.disabled,((d,g)=>({u_input:d,u_output_expected:g}))(e,i),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&ga(u)){u.bindBuffer(u.PIXEL_PACK_BUFFER,this._pbo),u.readBuffer(u.COLOR_ATTACHMENT0),u.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),u.bindBuffer(u.PIXEL_PACK_BUFFER,null);const d=u.fenceSync(u.SYNC_GPU_COMMANDS_COMPLETE,0);u.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:d}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){const e=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&ga(e)){const i=e.clientWaitSync(this._readbackQueue.sync,0,0);if(i===e.WAIT_FAILED)return s.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(i===e.TIMEOUT_EXPIRED)return;e.bindBuffer(e.PIXEL_PACK_BUFFER,this._pbo),e.getBufferSubData(e.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),e.bindBuffer(e.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),e.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=sa._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(e){let i=0;return i+=e[0]/256,i+=e[1]/65536,i+=e[2]/16777216,e[3]<127&&(i=-i),i/128}}const Ka=s.$/128;function Is(h,e){const i=h.granularity!==void 0?Math.max(h.granularity,1):1,l=i+(h.generateBorders?2:0),u=i+(h.extendToNorthPole||h.generateBorders?1:0)+(h.extendToSouthPole||h.generateBorders?1:0),d=l+1,g=u+1,w=h.generateBorders?-1:0,C=h.generateBorders||h.extendToNorthPole?-1:0,P=i+(h.generateBorders?1:0),A=i+(h.generateBorders||h.extendToSouthPole?1:0),R=d*g,D=l*u*6,O=d*g>65536;if(O&&e==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");const $=O||e==="32bit",ee=new Int16Array(2*R);let Q=0;for(let _e=C;_e<=A;_e++)for(let he=w;he<=P;he++){let we=he/i*s.$;he===-1&&(we=-Ka),he===i+1&&(we=s.$+Ka);let Pe=_e/i*s.$;_e===-1&&(Pe=h.extendToNorthPole?s.bh:-Ka),_e===i+1&&(Pe=h.extendToSouthPole?s.bi:s.$+Ka),ee[Q++]=we,ee[Q++]=Pe}const ne=$?new Uint32Array(D):new Uint16Array(D);let ue=0;for(let _e=0;_e0}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(e){this._mercatorProjection.updateGPUdependent(e),this._verticalPerspectiveProjection.updateGPUdependent(e)}getMeshFromTileID(e,i,l,u,d){return this.currentProjection.getMeshFromTileID(e,i,l,u,d)}setProjection(e){this._transitionable.setValue("type",(e==null?void 0:e.type)||"mercator")}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}setErrorQueryLatitudeDegrees(e){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(e),this._mercatorProjection.setErrorQueryLatitudeDegrees(e)}}function vl(h){const e=Qo(h.worldSize,h.center.lat);return 2*Math.PI*e}function Sa(h,e,i,l,u){const d=1/(1<1e-6){const l=h[0]/i,u=Math.acos(h[2]/i),d=(l>0?u:-u)/Math.PI*180;return new s.S(s.aO(d,-180,180),e)}return new s.S(0,e)}function ko(h){return Math.cos(h*Math.PI/180)}function ei(h,e){const i=ko(h),l=ko(e);return s.ak(l/i)}function Bh(h,e){const i=h.rotate(e.bearingInRadians),l=e.zoom+ei(e.center.lat,0),u=s.bk(1/ko(e.center.lat),1/ko(Math.min(Math.abs(e.center.lat),60)),s.bn(l,7,3,0,1)),d=360/vl({worldSize:e.worldSize,center:{lat:e.center.lat}});return new s.S(e.center.lng-i.x*d*u,s.ah(e.center.lat+i.y*d,-s.ai,s.ai))}function ks(h){const e=.5*h,i=Math.sin(e),l=Math.cos(e);return Math.log(i+l)-Math.log(l-i)}function Ec(h,e,i,l){const u=h.lat+i*l;if(Math.abs(i)>1){const d=(Math.sign(h.lat+i)!==Math.sign(h.lat)?-Math.abs(h.lat):Math.abs(h.lat))*Math.PI/180,g=Math.abs(h.lat+i)*Math.PI/180,w=ks(d+l*(g-d)),C=ks(d),P=ks(g);return new s.S(h.lng+e*((w-C)/(P-C)),u)}return new s.S(h.lng+e*l,u)}class xp{constructor(e){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=e}swapBuffers(){if(!this._hadAnyChanges)return;const e=this._cachePrevious;this._cachePrevious=this._cache,this._cache=e,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(e,i,l,u){const d=`${e.z}_${e.x}_${e.y}_${u!=null&&u.terrain?"t":""}`,g=this._cache.get(d);if(g)return g;const w=this._cachePrevious.get(d);if(w)return this._cache.set(d,w),w;const C=this._boundingVolumeFactory(e,i,l,u);return this._cache.set(d,C),this._hadAnyChanges=!0,C}}class es{constructor(e,i,l,u){this.min=l,this.max=u,this.points=e,this.planes=i}static fromAabb(e,i){const l=[];for(let u=0;u<8;u++)l.push([1&~u?e[0]:i[0],(u>>1&1)==1?i[1]:e[1],(u>>2&1)==1?i[2]:e[2]]);return new es(l,[[-1,0,0,i[0]],[1,0,0,-e[0]],[0,-1,0,i[1]],[0,1,0,-e[1]],[0,0,-1,i[2]],[0,0,1,-e[2]]],e,i)}static fromCenterSizeAngles(e,i,l){const u=s.br([],l[0],l[1],l[2]),d=s.bs([],[i[0],0,0],u),g=s.bs([],[0,i[1],0],u),w=s.bs([],[0,0,i[2]],u),C=[...e],P=[...e];for(let R=0;R<8;R++)for(let D=0;D<3;D++){const O=e[D]+d[D]*(1&~R?-1:1)+g[D]*((R>>1&1)==1?1:-1)+w[D]*((R>>2&1)==1?1:-1);C[D]=Math.min(C[D],O),P[D]=Math.max(P[D],O)}const A=[];for(let R=0;R<8;R++){const D=[...e];s.aS(D,D,s.aR([],d,1&~R?-1:1)),s.aS(D,D,s.aR([],g,(R>>1&1)==1?1:-1)),s.aS(D,D,s.aR([],w,(R>>2&1)==1?1:-1)),A.push(D)}return new es(A,[[...d,-s.aX(d,A[0])],[...g,-s.aX(g,A[0])],[...w,-s.aX(w,A[0])],[-d[0],-d[1],-d[2],-s.aX(d,A[7])],[-g[0],-g[1],-g[2],-s.aX(g,A[7])],[-w[0],-w[1],-w[2],-s.aX(w,A[7])]],C,P)}intersectsFrustum(e){let i=!0;const l=this.points.length,u=this.planes.length,d=e.planes.length,g=e.points.length;for(let w=0;w=0&&P++}if(P===0)return 0;P=0&&P++}if(P===0)return 0}return 1}intersectsPlane(e){const i=this.points.length;let l=0;for(let u=0;u=0&&l++}return l===i?2:l===0?0:1}}function Di(h,e,i){const l=h-e;return l<0?-l:Math.max(0,l-i)}function As(h,e,i,l,u){const d=h-i;let g;return g=d<0?Math.min(-d,1+d-u):d>1?Math.min(Math.max(d-u,0),1-d):0,Math.max(g,Di(e,l,u))}class Za{constructor(){this._boundingVolumeCache=new xp(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(e,i,l,u){const d=1<4}allowWorldCopies(){return!1}getTileBoundingVolume(e,i,l,u){return this._boundingVolumeCache.getTileBoundingVolume(e,i,l,u)}_computeTileBoundingVolume(e,i,l,u){var d,g;let w=0,C=0;if(u!=null&&u.terrain){const P=new s.Z(e.z,i,e.z,e.x,e.y),A=u.terrain.getMinMaxElevation(P);w=(d=A.minElevation)!==null&&d!==void 0?d:Math.min(0,l),C=(g=A.maxElevation)!==null&&g!==void 0?g:Math.max(0,l)}if(w/=s.bu,C/=s.bu,w+=1,C+=1,e.z<=0)return es.fromAabb([-C,-C,-C],[C,C,C]);if(e.z===1)return es.fromAabb([e.x===0?-C:0,e.y===0?0:-C,-C],[e.x===0?0:C,e.y===0?C:0,C]);{const P=[Sa(0,0,e.x,e.y,e.z),Sa(s.$,0,e.x,e.y,e.z),Sa(s.$,s.$,e.x,e.y,e.z),Sa(0,s.$,e.x,e.y,e.z)],A=[];for(const We of P)A.push(s.aR([],We,C));if(C!==w)for(const We of P)A.push(s.aR([],We,w));e.y===0&&A.push([0,1,0]),e.y===(1<=(1<{this._calcMatrices()},getConstrained:(e,i)=>this.getConstrained(e,i)}),this._coveringTilesDetailsProvider=new Za}clone(){const e=new zs;return e.apply(this),e}apply(e,i){this._globeLatitudeErrorCorrectionRadians=i||0,this._helper.apply(e)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){const e=s.bp();return e[0]=this._cameraPosition[0],e[1]=this._cameraPosition[1],e[2]=this._cameraPosition[2],e}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(e){const{overscaledTileID:i,applyGlobeMatrix:l}=e,u=this._helper.getMercatorTileCoordinates(i);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:u,clippingPlane:this._cachedClippingPlane,projectionTransition:l?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(e){const i=this.pitchInRadians,l=this.cameraToCenterDistance/e,u=Math.sin(i)*l,d=Math.cos(i)*l+1,g=1/Math.sqrt(u*u+d*d)*1;let w=-u,C=d;const P=Math.sqrt(w*w+C*C);w/=P,C/=P;const A=[0,w,C];s.bw(A,A,[0,0,0],-this.bearingInRadians),s.bx(A,A,[0,0,0],-1*this.center.lat*Math.PI/180),s.by(A,A,[0,0,0],this.center.lng*Math.PI/180);const R=1/s.aZ(A);return s.aR(A,A,R),[...A,-g*R]}isLocationOccluded(e){return!this.isSurfacePointVisible(wi(e))}transformLightDirection(e){const i=this._helper._center.lng*Math.PI/180,l=this._helper._center.lat*Math.PI/180,u=Math.cos(l),d=[Math.sin(i)*u,Math.sin(l),Math.cos(i)*u],g=[d[2],0,-d[0]],w=[0,0,0];s.aW(w,g,d),s.aV(g,g),s.aV(w,w);const C=[0,0,0];return s.aV(C,[g[0]*e[0]+w[0]*e[1]+d[0]*e[2],g[1]*e[0]+w[1]*e[1]+d[1]*e[2],g[2]*e[0]+w[2]*e[1]+d[2]*e[2]]),C}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(e,i,l){const u=(function(w,C,P){const A=1/(1<d&&(d=D),Ow&&(w=O)}const A=[P.lng+g,P.lat+C,P.lng+d,P.lat+w];return this.isSurfacePointOnScreen([0,1,0])&&(A[3]=90,A[0]=-180,A[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(A[1]=-90,A[0]=-180,A[2]=180),new mt(A)}getConstrained(e,i){const l=s.ah(e.lat,-s.ai,s.ai),u=s.ah(+i,this.minZoom+ei(0,l),this.maxZoom);return{center:new s.S(e.lng,l),zoom:u}}calculateCenterFromCameraLngLatAlt(e,i,l,u){return this._helper.calculateCenterFromCameraLngLatAlt(e,i,l,u)}setLocationAtPoint(e,i){const l=wi(this.unprojectScreenPoint(i)),u=wi(e),d=s.bp();s.bB(d);const g=s.bp();s.by(g,l,d,-this.center.lng*Math.PI/180),s.bx(g,g,d,this.center.lat*Math.PI/180);const w=u[0]*u[0]+u[2]*u[2],C=g[0]*g[0];if(w=-ne&&$<=ne,_e=Q>=-ne&&Q<=ne;let he,we;if(ue&&_e){const Qe=this.center.lng*Math.PI/180,Ue=this.center.lat*Math.PI/180;s.bD(R,Qe)+s.bD($,Ue)=0}isSurfacePointOnScreen(e){if(!this.isSurfacePointVisible(e))return!1;const i=s.bv();return s.aw(i,[...e,1],this._globeViewProjMatrixNoCorrection),i[0]/=i[3],i[1]/=i[3],i[2]/=i[3],i[0]>-1&&i[0]<1&&i[1]>-1&&i[1]<1&&i[2]>-1&&i[2]<1}rayPlanetIntersection(e,i){const l=s.aX(e,i),u=s.bp(),d=s.bp();s.aR(d,i,l),s.aU(u,e,d);const g=1-s.aX(u,u);if(g<0)return null;const w=s.aX(e,e)-1,C=-l+(l<0?1:-1)*Math.sqrt(g),P=w/C,A=C;return{tMin:Math.min(P,A),tMax:Math.max(P,A)}}unprojectScreenPoint(e){const i=this._cameraPosition,l=this.getRayDirectionFromPixel(e),u=this.rayPlanetIntersection(i,l);if(u){const A=s.bp();s.aS(A,i,[l[0]*u.tMin,l[1]*u.tMin,l[2]*u.tMin]);const R=s.bp();return s.aV(R,A),Ms(R)}const d=this._cachedClippingPlane,g=d[0]*l[0]+d[1]*l[1]+d[2]*l[2],w=-s.b1(d,i)/g,C=s.bp();if(w>0)s.aS(C,i,[l[0]*w,l[1]*w,l[2]*w]);else{const A=s.bp();s.aS(A,i,[2*l[0],2*l[1],2*l[2]]);const R=s.b1(this._cachedClippingPlane,A);s.aU(C,A,[this._cachedClippingPlane[0]*R,this._cachedClippingPlane[1]*R,this._cachedClippingPlane[2]*R])}const P=(function(A){const R=s.bp();return R[0]=A[0]*-A[3],R[1]=A[1]*-A[3],R[2]=A[2]*-A[3],{center:R,radius:Math.sqrt(1-A[3]*A[3])}})(d);return Ms((function(A,R,D){const O=s.bp();s.aU(O,D,A);const $=s.bp();return s.bq($,A,O,R/s.a$(O)),$})(P.center,P.radius,C))}getMatrixForModel(e,i){const l=s.S.convert(e),u=1/s.bu,d=s.b9();return s.bz(d,d,l.lng/180*Math.PI),s.b7(d,d,-l.lat/180*Math.PI),s.M(d,d,[0,0,1+i/s.bu]),s.b7(d,d,.5*Math.PI),s.N(d,d,[u,u,u]),d}getProjectionDataForCustomLayer(e=!0){const i=this.getProjectionData({overscaledTileID:new s.Z(0,0,0,0,0),applyGlobeMatrix:e});return i.tileMercatorCoords=[0,0,1,1],i}getFastPathSimpleProjectionMatrix(e){}}class Ls{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(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,i,l){return this._helper.interpolatePadding(e,i,l)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,i,l=!0){this._helper.resize(e,i,l)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}overrideNearFarZ(e,i){this._helper.overrideNearFarZ(e,i)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}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 nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(e,i){this._globeness=e,this._globeLatitudeErrorCorrectionRadians=i,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this._helper=new Sn({calcMatrices:()=>{this._calcMatrices()},getConstrained:(e,i)=>this.getConstrained(e,i)}),this._globeness=1,this._mercatorTransform=new an,this._verticalPerspectiveTransform=new zs}clone(){const e=new Ls;return e._globeness=this._globeness,e._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,e.apply(this),e}apply(e){this._helper.apply(e),this._mercatorTransform.apply(this),this._verticalPerspectiveTransform.apply(this,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(e){const i=this._mercatorTransform.getProjectionData(e),l=this._verticalPerspectiveTransform.getProjectionData(e);return{mainMatrix:this.isGlobeRendering?l.mainMatrix:i.mainMatrix,clippingPlane:l.clippingPlane,tileMercatorCoords:l.tileMercatorCoords,projectionTransition:e.applyGlobeMatrix?this._globeness:0,fallbackMatrix:i.fallbackMatrix}}isLocationOccluded(e){return this.currentTransform.isLocationOccluded(e)}transformLightDirection(e){return this.currentTransform.transformLightDirection(e)}getPixelScale(){return s.bk(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return s.bk(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(e,i,l){const u=this._mercatorTransform.getPitchedTextCorrection(e,i,l),d=this._verticalPerspectiveTransform.getPitchedTextCorrection(e,i,l);return s.bk(u,d,this._globeness)}projectTileCoordinates(e,i,l,u){return this.currentTransform.projectTileCoordinates(e,i,l,u)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,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(e){return this.currentTransform.calculateFogMatrix(e)}getVisibleUnwrappedCoordinates(e){return this.currentTransform.getVisibleUnwrappedCoordinates(e)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(e){this._mercatorTransform.recalculateZoomAndCenter(e),this._verticalPerspectiveTransform.recalculateZoomAndCenter(e)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(e,i){return this.currentTransform.lngLatToCameraDepth(e,i)}populateCache(e){this._mercatorTransform.populateCache(e),this._verticalPerspectiveTransform.populateCache(e)}getBounds(){return this.currentTransform.getBounds()}getConstrained(e,i){return this.currentTransform.getConstrained(e,i)}calculateCenterFromCameraLngLatAlt(e,i,l,u){return this._helper.calculateCenterFromCameraLngLatAlt(e,i,l,u)}setLocationAtPoint(e,i){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(e,i),void this.apply(this._mercatorTransform);this._verticalPerspectiveTransform.setLocationAtPoint(e,i),this.apply(this._verticalPerspectiveTransform)}locationToScreenPoint(e,i){return this.currentTransform.locationToScreenPoint(e,i)}screenPointToMercatorCoordinate(e,i){return this.currentTransform.screenPointToMercatorCoordinate(e,i)}screenPointToLocation(e,i){return this.currentTransform.screenPointToLocation(e,i)}isPointOnMapSurface(e,i){return this.currentTransform.isPointOnMapSurface(e,i)}getRayDirectionFromPixel(e){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(e)}getMatrixForModel(e,i){return this.currentTransform.getMatrixForModel(e,i)}getProjectionDataForCustomLayer(e=!0){const i=this._mercatorTransform.getProjectionDataForCustomLayer(e);if(!this.isGlobeRendering)return i;const l=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(e);return l.fallbackMatrix=i.mainMatrix,l}getFastPathSimpleProjectionMatrix(e){return this.currentTransform.getFastPathSimpleProjectionMatrix(e)}}class Ni{get useGlobeControls(){return!0}handlePanInertia(e,i){const l=Bh(e,i);return Math.abs(l.lng-i.center.lng)>180&&(l.lng=i.center.lng+179.5*Math.sign(l.lng-i.center.lng)),{easingCenter:l,easingOffset:new s.P(0,0)}}handleMapControlsRollPitchBearingZoom(e,i){const l=e.around,u=i.screenPointToLocation(l);e.bearingDelta&&i.setBearing(i.bearing+e.bearingDelta),e.pitchDelta&&i.setPitch(i.pitch+e.pitchDelta),e.rollDelta&&i.setRoll(i.roll+e.rollDelta);const d=i.zoom;e.zoomDelta&&i.setZoom(i.zoom+e.zoomDelta);const g=i.zoom-d;if(g===0)return;const w=s.bA(i.center.lng,u.lng),C=w/(Math.abs(w/180)+1),P=s.bA(i.center.lat,u.lat),A=i.getRayDirectionFromPixel(l),R=i.cameraPosition,D=-1*s.aX(R,A),O=s.bp();s.aS(O,R,[A[0]*D,A[1]*D,A[2]*D]);const $=s.aZ(O)-1,ee=Math.exp(.5*-Math.max($-.3,0)),Q=Qo(i.worldSize,i.center.lat)/Math.min(i.width,i.height),ne=s.bn(Q,.9,.5,1,.25),ue=(1-s.af(-g))*Math.min(ee,ne),_e=i.center.lat,he=i.zoom,we=new s.S(i.center.lng+C*ue,s.ah(i.center.lat+P*ue,-s.ai,s.ai));i.setLocationAtPoint(u,l);const Pe=i.center,pe=s.bn(Math.abs(w),45,85,0,1),Be=s.bn(Q,.75,.35,0,1),Qe=Math.pow(Math.max(pe,Be),.25),Ue=s.bA(Pe.lng,we.lng),We=s.bA(Pe.lat,we.lat);i.setCenter(new s.S(Pe.lng+Ue*Qe,Pe.lat+We*Qe).wrap()),i.setZoom(he+ei(_e,i.center.lat))}handleMapControlsPan(e,i,l){if(!e.panDelta)return;const u=i.center.lat,d=i.zoom;i.setCenter(Bh(e.panDelta,i).wrap()),i.setZoom(d+ei(u,i.center.lat))}cameraForBoxAndBearing(e,i,l,u,d){const g=Gn(e,i,l,u,d),w=i.left/d.width*2-1,C=(d.width-i.right)/d.width*2-1,P=i.top/d.height*-2+1,A=(d.height-i.bottom)/d.height*-2+1,R=s.bA(l.getWest(),l.getEast())<0,D=R?l.getEast():l.getWest(),O=R?l.getWest():l.getEast(),$=Math.max(l.getNorth(),l.getSouth()),ee=Math.min(l.getNorth(),l.getSouth()),Q=D+.5*s.bA(D,O),ne=$+.5*s.bA($,ee),ue=d.clone();ue.setCenter(g.center),ue.setBearing(g.bearing),ue.setPitch(0),ue.setRoll(0),ue.setZoom(g.zoom);const _e=ue.modelViewProjectionMatrix,he=[wi(l.getNorthWest()),wi(l.getNorthEast()),wi(l.getSouthWest()),wi(l.getSouthEast()),wi(new s.S(O,ne)),wi(new s.S(D,ne)),wi(new s.S(Q,$)),wi(new s.S(Q,ee))],we=wi(g.center);let Pe=Number.POSITIVE_INFINITY;for(const pe of he)w<0&&(Pe=Ni.getLesserNonNegativeNonNull(Pe,Ni.solveVectorScale(pe,we,_e,"x",w))),C>0&&(Pe=Ni.getLesserNonNegativeNonNull(Pe,Ni.solveVectorScale(pe,we,_e,"x",C))),P>0&&(Pe=Ni.getLesserNonNegativeNonNull(Pe,Ni.solveVectorScale(pe,we,_e,"y",P))),A<0&&(Pe=Ni.getLesserNonNegativeNonNull(Pe,Ni.solveVectorScale(pe,we,_e,"y",A)));if(Number.isFinite(Pe)&&Pe!==0)return g.zoom=ue.zoom+s.ak(Pe),g;po()}handleJumpToCenterZoom(e,i){const l=e.center.lat,u=e.getConstrained(i.center?s.S.convert(i.center):e.center,e.zoom).center;e.setCenter(u.wrap());const d=i.zoom!==void 0?+i.zoom:e.zoom+ei(l,u.lat);e.zoom!==d&&e.setZoom(d)}handleEaseTo(e,i){const l=e.zoom,u=e.center,d=e.padding,g={roll:e.roll,pitch:e.pitch,bearing:e.bearing},w={roll:i.roll===void 0?e.roll:i.roll,pitch:i.pitch===void 0?e.pitch:i.pitch,bearing:i.bearing===void 0?e.bearing:i.bearing},C=i.zoom!==void 0,P=!e.isPaddingEqual(i.padding);let A=!1;const R=i.center?s.S.convert(i.center):u,D=e.getConstrained(R,l).center;bn(e,D);const O=e.clone();O.setCenter(D),O.setZoom(C?+i.zoom:l+ei(u.lat,R.lat)),O.setBearing(i.bearing);const $=new s.P(s.ah(e.centerPoint.x+i.offsetAsPoint.x,0,e.width),s.ah(e.centerPoint.y+i.offsetAsPoint.y,0,e.height));O.setLocationAtPoint(D,$);const ee=(i.offset&&i.offsetAsPoint.mag())>0?O.center:D,Q=C?+i.zoom:l+ei(u.lat,ee.lat),ne=l+ei(u.lat,0),ue=Q+ei(ee.lat,0),_e=s.bA(u.lng,ee.lng),he=s.bA(u.lat,ee.lat),we=s.af(ue-ne);return A=Q!==l,{easeFunc:Pe=>{if(s.be(g,w)||pi({startEulerAngles:g,endEulerAngles:w,tr:e,k:Pe,useSlerp:g.roll!=w.roll}),P&&e.interpolatePadding(d,i.padding,Pe),i.around)s.w("Easing around a point is not supported under globe projection."),e.setLocationAtPoint(i.around,i.aroundPoint);else{const pe=ue>ne?Math.min(2,we):Math.max(.5,we),Be=Math.pow(pe,1-Pe),Qe=Ec(u,_e,he,Pe*Be);e.setCenter(Qe.wrap())}if(A){const pe=s.C.number(ne,ue,Pe)+ei(0,e.center.lat);e.setZoom(pe)}},isZooming:A,elevationCenter:ee}}handleFlyTo(e,i){const l=i.zoom!==void 0,u=e.center,d=e.zoom,g=e.padding,w=!e.isPaddingEqual(i.padding),C=e.getConstrained(s.S.convert(i.center||i.locationAtOffset),d).center,P=l?+i.zoom:e.zoom+ei(e.center.lat,C.lat),A=e.clone();A.setCenter(C),A.setZoom(P),A.setBearing(i.bearing);const R=new s.P(s.ah(e.centerPoint.x+i.offsetAsPoint.x,0,e.width),s.ah(e.centerPoint.y+i.offsetAsPoint.y,0,e.height));A.setLocationAtPoint(C,R);const D=A.center;bn(e,D);const O=(function(he,we,Pe){const pe=wi(we),Be=wi(Pe),Qe=s.aX(pe,Be),Ue=Math.acos(Qe),We=vl(he);return Ue/(2*Math.PI)*We})(e,u,D),$=d+ei(u.lat,0),ee=P+ei(D.lat,0),Q=s.af(ee-$);let ne;if(typeof i.minZoom=="number"){const he=+i.minZoom+ei(D.lat,0),we=Math.min(he,$,ee)+ei(0,D.lat),Pe=e.getConstrained(D,we).zoom+ei(D.lat,0);ne=s.af(Pe-$)}const ue=s.bA(u.lng,D.lng),_e=s.bA(u.lat,D.lat);return{easeFunc:(he,we,Pe,pe)=>{const Be=Ec(u,ue,_e,Pe);w&&e.interpolatePadding(g,i.padding,he);const Qe=he===1?D:Be;e.setCenter(Qe.wrap());const Ue=$+s.ak(we);e.setZoom(he===1?P:Ue+ei(0,Qe.lat))},scaleOfZoom:Q,targetCenter:D,scaleOfMinZoom:ne,pixelPathLength:O}}static solveVectorScale(e,i,l,u,d){const g=u==="x"?[l[0],l[4],l[8],l[12]]:[l[1],l[5],l[9],l[13]],w=[l[3],l[7],l[11],l[15]],C=e[0]*g[0]+e[1]*g[1]+e[2]*g[2],P=e[0]*w[0]+e[1]*w[1]+e[2]*w[2],A=i[0]*g[0]+i[1]*g[1]+i[2]*g[2],R=i[0]*w[0]+i[1]*w[1]+i[2]*w[2];return A+d*P===C+d*R||w[3]*(C-A)+g[3]*(R-P)+C*R==A*P?null:(A+g[3]-d*R-d*w[3])/(A-C-d*R+d*P)}static getLesserNonNegativeNonNull(e,i){return i!==null&&i>=0&&is.y(h,e&&e.filter((i=>i.identifier!=="source.canvas"))),bp=s.bE();class zc extends s.E{constructor(e,i={}){super(),this._rtlPluginLoaded=()=>{for(const l in this.sourceCaches){const u=this.sourceCaches[l].getSource().type;u!=="vector"&&u!=="geojson"||this.sourceCaches[l].reload()}},this.map=e,this.dispatcher=new Bt(St(),e._getMapId()),this.dispatcher.registerMessageHandler("GG",((l,u)=>this.getGlyphs(l,u))),this.dispatcher.registerMessageHandler("GI",((l,u)=>this.getImages(l,u))),this.imageManager=new et,this.imageManager.setEventedParent(this),this.glyphManager=new Ze(e._requestManager,i.localIdeographFontFamily),this.lineAtlas=new oe(256,512),this.crossTileSymbolIndex=new sr,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new s.bF,this._loaded=!1,this._availableImages=[],this._globalState={},this._resetUpdates(),this.dispatcher.broadcast("SR",s.bG()),Dr().on(Kt,this._rtlPluginLoaded),this.on("data",(l=>{if(l.dataType!=="source"||l.sourceDataType!=="metadata")return;const u=this.sourceCaches[l.sourceId];if(!u)return;const d=u.getSource();if(d&&d.vectorLayerIds)for(const g in this._layers){const w=this._layers[g];w.source===d.id&&this._validateLayer(w)}}))}setGlobalStateProperty(e,i){var l,u,d;this._checkLoaded();const g=i===null?(d=(u=(l=this.stylesheet.state)===null||l===void 0?void 0:l[e])===null||u===void 0?void 0:u.default)!==null&&d!==void 0?d:null:i;if(s.bH(g,this._globalState[e]))return this;this._globalState[e]=g;const w=this._findGlobalStateAffectedSources([e]);for(const C in this.sourceCaches)w.has(C)&&(this._reloadSource(C),this._changed=!0)}getGlobalState(){return this._globalState}setGlobalState(e){this._checkLoaded();const i=[];for(const u in e)!s.bH(this._globalState[u],e[u].default)&&(i.push(u),this._globalState[u]=e[u].default);const l=this._findGlobalStateAffectedSources(i);for(const u in this.sourceCaches)l.has(u)&&(this._reloadSource(u),this._changed=!0)}_findGlobalStateAffectedSources(e){if(e.length===0)return new Set;const i=new Set;for(const l in this._layers){const u=this._layers[l],d=u.getLayoutAffectingGlobalStateRefs();for(const g of e)d.has(g)&&i.add(u.source)}return i}loadURL(e,i={},l){this.fire(new s.l("dataloading",{dataType:"style"})),i.validate=typeof i.validate!="boolean"||i.validate;const u=this.map._requestManager.transformRequest(e,"Style");this._loadStyleRequest=new AbortController;const d=this._loadStyleRequest;s.j(u,this._loadStyleRequest).then((g=>{this._loadStyleRequest=null,this._load(g.data,i,l)})).catch((g=>{this._loadStyleRequest=null,g&&!d.signal.aborted&&this.fire(new s.k(g))}))}loadJSON(e,i={},l){this.fire(new s.l("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,ie.frameAsync(this._frameRequest).then((()=>{this._frameRequest=null,i.validate=i.validate!==!1,this._load(e,i,l)})).catch((()=>{}))}loadEmpty(){this.fire(new s.l("dataloading",{dataType:"style"})),this._load(bp,{validate:!1})}_load(e,i,l){var u,d,g;const w=i.transformStyle?i.transformStyle(l,e):e;if(!i.validate||!yl(this,s.z(w))){this._loaded=!0,this.stylesheet=w;for(const C in w.sources)this.addSource(C,w.sources[C],{validate:!1});w.sprite?this._loadSprite(w.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(w.glyphs),this._createLayers(),this.light=new te(this.stylesheet.light),this._setProjectionInternal(((u=this.stylesheet.projection)===null||u===void 0?void 0:u.type)||"mercator"),this.sky=new ge(this.stylesheet.sky),this.map.setTerrain((d=this.stylesheet.terrain)!==null&&d!==void 0?d:null),this.setGlobalState((g=this.stylesheet.state)!==null&&g!==void 0?g:null),this.fire(new s.l("data",{dataType:"style"})),this.fire(new s.l("style.load"))}}_createLayers(){const e=s.bI(this.stylesheet.layers);this.dispatcher.broadcast("SL",e),this._order=e.map((i=>i.id)),this._layers={},this._serializedLayers=null;for(const i of e){const l=s.bJ(i);l.setEventedParent(this,{layer:{id:i.id}}),this._layers[i.id]=l}}_loadSprite(e,i=!1,l=void 0){let u;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,(function(d,g,w,C){return s._(this,void 0,void 0,(function*(){const P=rt(d),A=w>1?"@2x":"",R={},D={};for(const{id:O,url:$}of P){const ee=g.transformRequest(qe($,A,".json"),"SpriteJSON");R[O]=s.j(ee,C);const Q=g.transformRequest(qe($,A,".png"),"SpriteImage");D[O]=Fe.getImage(Q,C)}return yield Promise.all([...Object.values(R),...Object.values(D)]),(function(O,$){return s._(this,void 0,void 0,(function*(){const ee={};for(const Q in O){ee[Q]={};const ne=ie.getImageCanvasContext((yield $[Q]).data),ue=(yield O[Q]).data;for(const _e in ue){const{width:he,height:we,x:Pe,y:pe,sdf:Be,pixelRatio:Qe,stretchX:Ue,stretchY:We,content:Je,textFitWidth:Nt,textFitHeight:Zt}=ue[_e];ee[Q][_e]={data:null,pixelRatio:Qe,sdf:Be,stretchX:Ue,stretchY:We,content:Je,textFitWidth:Nt,textFitHeight:Zt,spriteData:{width:he,height:we,x:Pe,y:pe,context:ne}}}}return ee}))})(R,D)}))})(e,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then((d=>{if(this._spriteRequest=null,d)for(const g in d){this._spritesImagesIds[g]=[];const w=this._spritesImagesIds[g]?this._spritesImagesIds[g].filter((C=>!(C in d))):[];for(const C of w)this.imageManager.removeImage(C),this._changedImages[C]=!0;for(const C in d[g]){const P=g==="default"?C:`${g}:${C}`;this._spritesImagesIds[g].push(P),P in this.imageManager.images?this.imageManager.updateImage(P,d[g][C],!1):this.imageManager.addImage(P,d[g][C]),i&&(this._changedImages[P]=!0)}}})).catch((d=>{this._spriteRequest=null,u=d,this.fire(new s.k(u))})).finally((()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),i&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new s.l("data",{dataType:"style"})),l&&l(u)}))}_unloadSprite(){for(const e of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(e),this._changedImages[e]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new s.l("data",{dataType:"style"}))}_validateLayer(e){const i=this.sourceCaches[e.source];if(!i)return;const l=e.sourceLayer;if(!l)return;const u=i.getSource();(u.type==="geojson"||u.vectorLayerIds&&u.vectorLayerIds.indexOf(l)===-1)&&this.fire(new s.k(new Error(`Source layer "${l}" does not exist on source "${u.id}" as specified by style layer "${e.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const e in this.sourceCaches)if(!this.sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(e,i=!1){const l=this._serializedAllLayers();if(!e||e.length===0)return Object.values(i?s.bK(l):l);const u=[];for(const d of e)if(l[d]){const g=i?s.bK(l[d]):l[d];u.push(g)}return u}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;e=this._serializedLayers={};const i=Object.keys(this._layers);for(const l of i){const u=this._layers[l];u.type!=="custom"&&(e[l]=u.serialize())}return e}hasTransitions(){var e,i,l;if(!((e=this.light)===null||e===void 0)&&e.hasTransition()||!((i=this.sky)===null||i===void 0)&&i.hasTransition()||!((l=this.projection)===null||l===void 0)&&l.hasTransition())return!0;for(const u in this.sourceCaches)if(this.sourceCaches[u].hasTransition())return!0;for(const u in this._layers)if(this._layers[u].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(e){if(!this._loaded)return;const i=this._changed;if(i){const u=Object.keys(this._updatedLayers),d=Object.keys(this._removedLayers);(u.length||d.length)&&this._updateWorkerLayers(u,d);for(const g in this._updatedSources){const w=this._updatedSources[g];if(w==="reload")this._reloadSource(g);else{if(w!=="clear")throw new Error(`Invalid action ${w}`);this._clearSource(g)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const g in this._updatedPaintProps)this._layers[g].updateTransitions(e);this.light.updateTransitions(e),this.sky.updateTransitions(e),this._resetUpdates()}const l={};for(const u in this.sourceCaches){const d=this.sourceCaches[u];l[u]=d.used,d.used=!1}for(const u of this._order){const d=this._layers[u];d.recalculate(e,this._availableImages),!d.isHidden(e.zoom)&&d.source&&(this.sourceCaches[d.source].used=!0)}for(const u in l){const d=this.sourceCaches[u];!!l[u]!=!!d.used&&d.fire(new s.l("data",{sourceDataType:"visibility",dataType:"source",sourceId:u}))}this.light.recalculate(e),this.sky.recalculate(e),this.projection.recalculate(e),this.z=e.zoom,i&&this.fire(new s.l("data",{dataType:"style"}))}_updateTilesForChangedImages(){const e=Object.keys(this._changedImages);if(e.length){for(const i in this.sourceCaches)this.sourceCaches[i].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const e in this.sourceCaches)this.sourceCaches[e].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(e,i){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(e,!1),removedIds:i})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(e,i={}){var l;this._checkLoaded();const u=this.serialize();if(e=i.transformStyle?i.transformStyle(u,e):e,((l=i.validate)===null||l===void 0||l)&&yl(this,s.z(e)))return!1;(e=s.bK(e)).layers=s.bI(e.layers);const d=s.bL(u,e),g=this._getOperationsToPerform(d);if(g.unimplemented.length>0)throw new Error(`Unimplemented: ${g.unimplemented.join(", ")}.`);if(g.operations.length===0)return!1;for(const w of g.operations)w();return this.stylesheet=e,this._serializedLayers=null,!0}_getOperationsToPerform(e){const i=[],l=[];for(const u of e)switch(u.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":i.push((()=>this.addLayer.apply(this,u.args)));break;case"removeLayer":i.push((()=>this.removeLayer.apply(this,u.args)));break;case"setPaintProperty":i.push((()=>this.setPaintProperty.apply(this,u.args)));break;case"setLayoutProperty":i.push((()=>this.setLayoutProperty.apply(this,u.args)));break;case"setFilter":i.push((()=>this.setFilter.apply(this,u.args)));break;case"addSource":i.push((()=>this.addSource.apply(this,u.args)));break;case"removeSource":i.push((()=>this.removeSource.apply(this,u.args)));break;case"setLayerZoomRange":i.push((()=>this.setLayerZoomRange.apply(this,u.args)));break;case"setLight":i.push((()=>this.setLight.apply(this,u.args)));break;case"setGeoJSONSourceData":i.push((()=>this.setGeoJSONSourceData.apply(this,u.args)));break;case"setGlyphs":i.push((()=>this.setGlyphs.apply(this,u.args)));break;case"setSprite":i.push((()=>this.setSprite.apply(this,u.args)));break;case"setTerrain":i.push((()=>this.map.setTerrain.apply(this,u.args)));break;case"setSky":i.push((()=>this.setSky.apply(this,u.args)));break;case"setProjection":this.setProjection.apply(this,u.args);break;case"setGlobalState":i.push((()=>this.setGlobalState.apply(this,u.args)));break;case"setTransition":i.push((()=>{}));break;default:l.push(u.command)}return{operations:i,unimplemented:l}}addImage(e,i){if(this.getImage(e))return this.fire(new s.k(new Error(`An image named "${e}" already exists.`)));this.imageManager.addImage(e,i),this._afterImageUpdated(e)}updateImage(e,i){this.imageManager.updateImage(e,i)}getImage(e){return this.imageManager.getImage(e)}removeImage(e){if(!this.getImage(e))return this.fire(new s.k(new Error(`An image named "${e}" does not exist.`)));this.imageManager.removeImage(e),this._afterImageUpdated(e)}_afterImageUpdated(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new s.l("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,i,l={}){if(this._checkLoaded(),this.sourceCaches[e]!==void 0)throw new Error(`Source "${e}" already exists.`);if(!i.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(i).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(i.type)>=0&&this._validate(s.z.source,`sources.${e}`,i,null,l))return;this.map&&this.map._collectResourceTiming&&(i.collectResourceTiming=!0);const u=this.sourceCaches[e]=new cr(e,i,this.dispatcher);u.style=this,u.setEventedParent(this,(()=>({isSourceLoaded:u.loaded(),source:u.serialize(),sourceId:e}))),u.onAdd(this.map),this._changed=!0}removeSource(e){if(this._checkLoaded(),this.sourceCaches[e]===void 0)throw new Error("There is no source with this ID");for(const l in this._layers)if(this._layers[l].source===e)return this.fire(new s.k(new Error(`Source "${e}" cannot be removed while layer "${l}" is using it.`)));const i=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],i.fire(new s.l("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),i.setEventedParent(null),i.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,i){if(this._checkLoaded(),this.sourceCaches[e]===void 0)throw new Error(`There is no source with this ID=${e}`);const l=this.sourceCaches[e].getSource();if(l.type!=="geojson")throw new Error(`geojsonSource.type is ${l.type}, which is !== 'geojson`);l.setData(i),this._changed=!0}getSource(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()}addLayer(e,i,l={}){this._checkLoaded();const u=e.id;if(this.getLayer(u))return void this.fire(new s.k(new Error(`Layer "${u}" already exists on this map.`)));let d;if(e.type==="custom"){if(yl(this,s.bM(e)))return;d=s.bJ(e)}else{if("source"in e&&typeof e.source=="object"&&(this.addSource(u,e.source),e=s.bK(e),e=s.e(e,{source:u})),this._validate(s.z.layer,`layers.${u}`,e,{arrayIndex:-1},l))return;d=s.bJ(e),this._validateLayer(d),d.setEventedParent(this,{layer:{id:u}})}const g=i?this._order.indexOf(i):this._order.length;if(i&&g===-1)this.fire(new s.k(new Error(`Cannot add layer "${u}" before non-existing layer "${i}".`)));else{if(this._order.splice(g,0,u),this._layerOrderChanged=!0,this._layers[u]=d,this._removedLayers[u]&&d.source&&d.type!=="custom"){const w=this._removedLayers[u];delete this._removedLayers[u],w.type!==d.type?this._updatedSources[d.source]="clear":(this._updatedSources[d.source]="reload",this.sourceCaches[d.source].pause())}this._updateLayer(d),d.onAdd&&d.onAdd(this.map)}}moveLayer(e,i){if(this._checkLoaded(),this._changed=!0,!this._layers[e])return void this.fire(new s.k(new Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));if(e===i)return;const l=this._order.indexOf(e);this._order.splice(l,1);const u=i?this._order.indexOf(i):this._order.length;i&&u===-1?this.fire(new s.k(new Error(`Cannot move layer "${e}" before non-existing layer "${i}".`))):(this._order.splice(u,0,e),this._layerOrderChanged=!0)}removeLayer(e){this._checkLoaded();const i=this._layers[e];if(!i)return void this.fire(new s.k(new Error(`Cannot remove non-existing layer "${e}".`)));i.setEventedParent(null);const l=this._order.indexOf(e);this._order.splice(l,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=i,delete this._layers[e],this._serializedLayers&&delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],i.onRemove&&i.onRemove(this.map)}getLayer(e){return this._layers[e]}getLayersOrder(){return[...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(e,i,l){this._checkLoaded();const u=this.getLayer(e);u?u.minzoom===i&&u.maxzoom===l||(i!=null&&(u.minzoom=i),l!=null&&(u.maxzoom=l),this._updateLayer(u)):this.fire(new s.k(new Error(`Cannot set the zoom range of non-existing layer "${e}".`)))}setFilter(e,i,l={}){this._checkLoaded();const u=this.getLayer(e);if(u){if(!s.bH(u.filter,i))return i==null?(u.setFilter(void 0),void this._updateLayer(u)):void(this._validate(s.z.filter,`layers.${u.id}.filter`,i,null,l)||(u.setFilter(s.bK(i)),this._updateLayer(u)))}else this.fire(new s.k(new Error(`Cannot filter non-existing layer "${e}".`)))}getFilter(e){return s.bK(this.getLayer(e).filter)}setLayoutProperty(e,i,l,u={}){this._checkLoaded();const d=this.getLayer(e);d?s.bH(d.getLayoutProperty(i),l)||(d.setLayoutProperty(i,l,u),this._updateLayer(d)):this.fire(new s.k(new Error(`Cannot style non-existing layer "${e}".`)))}getLayoutProperty(e,i){const l=this.getLayer(e);if(l)return l.getLayoutProperty(i);this.fire(new s.k(new Error(`Cannot get style of non-existing layer "${e}".`)))}setPaintProperty(e,i,l,u={}){this._checkLoaded();const d=this.getLayer(e);d?s.bH(d.getPaintProperty(i),l)||(d.setPaintProperty(i,l,u)&&this._updateLayer(d),this._changed=!0,this._updatedPaintProps[e]=!0,this._serializedLayers=null):this.fire(new s.k(new Error(`Cannot style non-existing layer "${e}".`)))}getPaintProperty(e,i){return this.getLayer(e).getPaintProperty(i)}setFeatureState(e,i){this._checkLoaded();const l=e.source,u=e.sourceLayer,d=this.sourceCaches[l];if(d===void 0)return void this.fire(new s.k(new Error(`The source '${l}' does not exist in the map's style.`)));const g=d.getSource().type;g==="geojson"&&u?this.fire(new s.k(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):g!=="vector"||u?(e.id===void 0&&this.fire(new s.k(new Error("The feature id parameter must be provided."))),d.setFeatureState(u,e.id,i)):this.fire(new s.k(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(e,i){this._checkLoaded();const l=e.source,u=this.sourceCaches[l];if(u===void 0)return void this.fire(new s.k(new Error(`The source '${l}' does not exist in the map's style.`)));const d=u.getSource().type,g=d==="vector"?e.sourceLayer:void 0;d!=="vector"||g?i&&typeof e.id!="string"&&typeof e.id!="number"?this.fire(new s.k(new Error("A feature id is required to remove its specific state property."))):u.removeFeatureState(g,e.id,i):this.fire(new s.k(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(e){this._checkLoaded();const i=e.source,l=e.sourceLayer,u=this.sourceCaches[i];if(u!==void 0)return u.getSource().type!=="vector"||l?(e.id===void 0&&this.fire(new s.k(new Error("The feature id parameter must be provided."))),u.getFeatureState(l,e.id)):void this.fire(new s.k(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new s.k(new Error(`The source '${i}' does not exist in the map's style.`)))}getTransition(){return s.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const e=s.bN(this.sourceCaches,(d=>d.serialize())),i=this._serializeByIds(this._order,!0),l=this.map.getTerrain()||void 0,u=this.stylesheet;return s.bO({version:u.version,name:u.name,metadata:u.metadata,light:u.light,sky:u.sky,center:u.center,zoom:u.zoom,bearing:u.bearing,pitch:u.pitch,sprite:u.sprite,glyphs:u.glyphs,transition:u.transition,projection:u.projection,sources:e,layers:i,terrain:l},(d=>d!==void 0))}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&this.sourceCaches[e.source].getSource().type!=="raster"&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(e){const i=g=>this._layers[g].type==="fill-extrusion",l={},u=[];for(let g=this._order.length-1;g>=0;g--){const w=this._order[g];if(i(w)){l[w]=g;for(const C of e){const P=C[w];if(P)for(const A of P)u.push(A)}}}u.sort(((g,w)=>w.intersectionZ-g.intersectionZ));const d=[];for(let g=this._order.length-1;g>=0;g--){const w=this._order[g];if(i(w))for(let C=u.length-1;C>=0;C--){const P=u[C].feature;if(l[P.layer.id]this.map.terrain.getElevation(A,R,D):void 0));return this.placement&&d.push((function(P,A,R,D,O,$,ee){const Q={},ne=$.queryRenderedSymbols(D),ue=[];for(const _e of Object.keys(ne).map(Number))ue.push(ee[_e]);ue.sort(yt);for(const _e of ue){const he=_e.featureIndex.lookupSymbolFeatures(ne[_e.bucketInstanceId],A,_e.bucketIndex,_e.sourceLayerIndex,O.filter,O.layers,O.availableImages,P);for(const we in he){const Pe=Q[we]=Q[we]||[],pe=he[we];pe.sort(((Be,Qe)=>{const Ue=_e.featureSortOrder;if(Ue){const We=Ue.indexOf(Be.featureIndex);return Ue.indexOf(Qe.featureIndex)-We}return Qe.featureIndex-Be.featureIndex}));for(const Be of pe)Pe.push(Be)}}return(function(_e,he,we){for(const Pe in _e)for(const pe of _e[Pe])It(pe,we[he[Pe].source]);return _e})(Q,P,R)})(this._layers,g,this.sourceCaches,e,C,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(d)}querySourceFeatures(e,i){i&&i.filter&&this._validate(s.z.filter,"querySourceFeatures.filter",i.filter,null,i);const l=this.sourceCaches[e];return l?(function(u,d){const g=u.getRenderableIds().map((P=>u.getTileByID(P))),w=[],C={};for(let P=0;PD.getTileByID(O))).sort(((O,$)=>$.tileID.overscaledZ-O.tileID.overscaledZ||(O.tileID.isLessThan($.tileID)?-1:1)))}const R=this.crossTileSymbolIndex.addLayer(A,C[A.source],e.center.lng);g=g||R}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((d=d||this._layerOrderChanged||l===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(ie.now(),e.zoom))&&(this.pauseablePlacement=new On(e,this.map.terrain,this._order,d,i,l,u,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,C),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(ie.now()),w=!0),g&&this.pauseablePlacement.placement.setStale()),w||g)for(const P of this._order){const A=this._layers[P];A.type==="symbol"&&this.placement.updateLayerOpacities(A,C[A.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(ie.now())}_releaseSymbolFadeTiles(){for(const e in this.sourceCaches)this.sourceCaches[e].releaseSymbolFadeTiles()}getImages(e,i){return s._(this,void 0,void 0,(function*(){const l=yield this.imageManager.getImages(i.icons);this._updateTilesForChangedImages();const u=this.sourceCaches[i.source];return u&&u.setDependencies(i.tileID.key,i.type,i.icons),l}))}getGlyphs(e,i){return s._(this,void 0,void 0,(function*(){const l=yield this.glyphManager.getGlyphs(i.stacks),u=this.sourceCaches[i.source];return u&&u.setDependencies(i.tileID.key,i.type,[""]),l}))}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(e,i={}){this._checkLoaded(),e&&this._validate(s.z.glyphs,"glyphs",e,null,i)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=e,this.glyphManager.entries={},this.glyphManager.setURL(e))}addSprite(e,i,l={},u){this._checkLoaded();const d=[{id:e,url:i}],g=[...rt(this.stylesheet.sprite),...d];this._validate(s.z.sprite,"sprite",g,null,l)||(this.stylesheet.sprite=g,this._loadSprite(d,!0,u))}removeSprite(e){this._checkLoaded();const i=rt(this.stylesheet.sprite);if(i.find((l=>l.id===e))){if(this._spritesImagesIds[e])for(const l of this._spritesImagesIds[e])this.imageManager.removeImage(l),this._changedImages[l]=!0;i.splice(i.findIndex((l=>l.id===e)),1),this.stylesheet.sprite=i.length>0?i:void 0,delete this._spritesImagesIds[e],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new s.l("data",{dataType:"style"}))}else this.fire(new s.k(new Error(`Sprite "${e}" doesn't exists on this map.`)))}getSprite(){return rt(this.stylesheet.sprite)}setSprite(e,i={},l){this._checkLoaded(),e&&this._validate(s.z.sprite,"sprite",e,null,i)||(this.stylesheet.sprite=e,e?this._loadSprite(e,!0,l):(this._unloadSprite(),l&&l(null)))}}var wp=s.aJ([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Tp{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,i,l,u,d,g,w,C,P){this.context=e;let A=this.boundPaintVertexBuffers.length!==u.length;for(let R=0;!A&&R({u_texture:0,u_ele_delta:h,u_fog_matrix:e,u_fog_color:i?i.properties.get("fog-color"):s.bf.white,u_fog_ground_blend:i?i.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:u?0:i?i.calculateFogBlendOpacity(l):0,u_horizon_color:i?i.properties.get("horizon-color"):s.bf.white,u_horizon_fog_blend:i?i.properties.get("horizon-fog-blend"):1,u_is_globe_mode:u?1:0}),Lc={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 Ao(h){const e=[];for(let i=0;i({u_depth:new s.bP(Ue,We.u_depth),u_terrain:new s.bP(Ue,We.u_terrain),u_terrain_dim:new s.bg(Ue,We.u_terrain_dim),u_terrain_matrix:new s.bR(Ue,We.u_terrain_matrix),u_terrain_unpack:new s.bS(Ue,We.u_terrain_unpack),u_terrain_exaggeration:new s.bg(Ue,We.u_terrain_exaggeration)}))(e,Qe),this.projectionUniforms=((Ue,We)=>({u_projection_matrix:new s.bR(Ue,We.u_projection_matrix),u_projection_tile_mercator_coords:new s.bS(Ue,We.u_projection_tile_mercator_coords),u_projection_clipping_plane:new s.bS(Ue,We.u_projection_clipping_plane),u_projection_transition:new s.bg(Ue,We.u_projection_transition),u_projection_fallback_matrix:new s.bR(Ue,We.u_projection_fallback_matrix)}))(e,Qe),this.binderUniforms=l?l.getUniforms(e,Qe):[]}draw(e,i,l,u,d,g,w,C,P,A,R,D,O,$,ee,Q,ne,ue,_e){const he=e.gl;if(this.failedToCreate)return;if(e.program.set(this.program),e.setDepthMode(l),e.setStencilMode(u),e.setColorMode(d),e.setCullFace(g),C){e.activeTexture.set(he.TEXTURE2),he.bindTexture(he.TEXTURE_2D,C.depthTexture),e.activeTexture.set(he.TEXTURE3),he.bindTexture(he.TEXTURE_2D,C.texture);for(const Pe in this.terrainUniforms)this.terrainUniforms[Pe].set(C[Pe])}if(P)for(const Pe in P)this.projectionUniforms[Lc[Pe]].set(P[Pe]);if(w)for(const Pe in this.fixedUniforms)this.fixedUniforms[Pe].set(w[Pe]);Q&&Q.setUniforms(e,this.binderUniforms,$,{zoom:ee});let we=0;switch(i){case he.LINES:we=2;break;case he.TRIANGLES:we=3;break;case he.LINE_STRIP:we=1}for(const Pe of O.get()){const pe=Pe.vaos||(Pe.vaos={});(pe[A]||(pe[A]=new Tp)).bind(e,this,R,Q?Q.getPaintVertexBuffers():[],D,Pe.vertexOffset,ne,ue,_e),he.drawElements(i,Pe.primitiveLength*we,he.UNSIGNED_SHORT,Pe.primitiveOffset*we*2)}}}function bl(h,e,i){const l=1/s.aC(i,1,e.transform.tileZoom),u=Math.pow(2,i.tileID.overscaledZ),d=i.tileSize*Math.pow(2,e.transform.tileZoom)/u,g=d*(i.tileID.canonical.x+i.tileID.wrap*u),w=d*i.tileID.canonical.y;return{u_image:0,u_texsize:i.imageAtlasTexture.size,u_scale:[l,h.fromScale,h.toScale],u_fade:h.t,u_pixel_coord_upper:[g>>16,w>>16],u_pixel_coord_lower:[65535&g,65535&w]}}const Pa=(h,e,i,l)=>{const u=h.style.light,d=u.properties.get("position"),g=[d.x,d.y,d.z],w=s.bV();u.properties.get("anchor")==="viewport"&&s.bW(w,h.transform.bearingInRadians),s.bX(g,g,w);const C=h.transform.transformLightDirection(g),P=u.properties.get("color");return{u_lightpos:g,u_lightpos_globe:C,u_lightintensity:u.properties.get("intensity"),u_lightcolor:[P.r,P.g,P.b],u_vertical_gradient:+e,u_opacity:i,u_fill_translate:l}},Cp=(h,e,i,l,u,d,g)=>s.e(Pa(h,e,i,l),bl(d,h,g),{u_height_factor:-Math.pow(2,u.overscaledZ)/g.tileSize/8}),wl=(h,e,i,l)=>s.e(bl(e,h,i),{u_fill_translate:l}),Ds=(h,e)=>({u_world:h,u_fill_translate:e}),Rs=(h,e,i,l,u)=>s.e(wl(h,e,i,u),{u_world:l}),Sp=(h,e,i,l,u)=>{const d=h.transform;let g,w,C=0;if(i.paint.get("circle-pitch-alignment")==="map"){const P=s.aC(e,1,d.zoom);g=!0,w=[P,P],C=P/(s.$*Math.pow(2,e.tileID.overscaledZ))*2*Math.PI*u}else g=!1,w=d.pixelsToGLUnits;return{u_camera_to_center_distance:d.cameraToCenterDistance,u_scale_with_map:+(i.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+g,u_device_pixel_ratio:h.pixelRatio,u_extrude_scale:w,u_globe_extrude_scale:C,u_translate:l}},Tl=h=>({u_pixel_extrude_scale:[1/h.width,1/h.height]}),Pp=h=>({u_viewport_size:[h.width,h.height]}),Eo=(h,e=1)=>({u_color:h,u_overlay:0,u_overlay_scale:e}),Oh=(h,e,i,l)=>{const u=s.aC(h,1,e)/(s.$*Math.pow(2,h.tileID.overscaledZ))*2*Math.PI*l;return{u_extrude_scale:s.aC(h,1,e),u_intensity:i,u_globe_extrude_scale:u}},Rc=(h,e,i,l)=>{const u=s.L();s.bY(u,0,h.width,h.height,0,0,1);const d=h.context.gl;return{u_matrix:u,u_world:[d.drawingBufferWidth,d.drawingBufferHeight],u_image:i,u_color_ramp:l,u_opacity:e.paint.get("heatmap-opacity")}},Ip=(h,e,i)=>{const l=i.paint.get("hillshade-accent-color");let u;switch(i.paint.get("hillshade-method")){case"basic":u=4;break;case"combined":u=1;break;case"igor":u=2;break;case"multidirectional":u=3;break;default:u=0}const d=i.getIlluminationProperties();for(let g=0;g{const i=e.stride,l=s.L();return s.bY(l,0,s.$,-s.$,0,0,1),s.M(l,l,[0,-s.$,0]),{u_matrix:l,u_image:1,u_dimension:[i,i],u_zoom:h.overscaledZ,u_unpack:e.getUnpackVector()}};function Bc(h,e){const i=Math.pow(2,e.canonical.z),l=e.canonical.y;return[new s.a1(0,l/i).toLngLat().lat,new s.a1(0,(l+1)/i).toLngLat().lat]}const jh=(h,e,i=0)=>({u_image:0,u_unpack:e.getUnpackVector(),u_dimension:[e.stride,e.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:i,u_opacity:h.paint.get("color-relief-opacity")}),Cl=(h,e,i,l)=>{const u=h.transform;return{u_translation:Oc(h,e,i),u_ratio:l/s.aC(e,1,u.zoom),u_device_pixel_ratio:h.pixelRatio,u_units_to_pixels:[1/u.pixelsToGLUnits[0],1/u.pixelsToGLUnits[1]]}},Vh=(h,e,i,l,u)=>s.e(Cl(h,e,i,l),{u_image:0,u_image_height:u}),qh=(h,e,i,l,u)=>{const d=h.transform,g=Fc(e,d);return{u_translation:Oc(h,e,i),u_texsize:e.imageAtlasTexture.size,u_ratio:l/s.aC(e,1,d.zoom),u_device_pixel_ratio:h.pixelRatio,u_image:0,u_scale:[g,u.fromScale,u.toScale],u_fade:u.t,u_units_to_pixels:[1/d.pixelsToGLUnits[0],1/d.pixelsToGLUnits[1]]}},zo=(h,e,i,l,u,d)=>{const g=h.lineAtlas,w=Fc(e,h.transform),C=i.layout.get("line-cap")==="round",P=g.getDash(u.from,C),A=g.getDash(u.to,C),R=P.width*d.fromScale,D=A.width*d.toScale;return s.e(Cl(h,e,i,l),{u_patternscale_a:[w/R,-P.height/2],u_patternscale_b:[w/D,-A.height/2],u_sdfgamma:g.width/(256*Math.min(R,D)*h.pixelRatio)/2,u_image:0,u_tex_y_a:P.y,u_tex_y_b:A.y,u_mix:d.t})};function Fc(h,e){return 1/s.aC(h,1,e.tileZoom)}function Oc(h,e,i){return s.aD(h.transform,e,i.paint.get("line-translate"),i.paint.get("line-translate-anchor"))}const Bs=(h,e,i,l,u)=>{return{u_tl_parent:h,u_scale_parent:e,u_buffer_scale:1,u_fade_t:i.mix,u_opacity:i.opacity*l.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:l.paint.get("raster-brightness-min"),u_brightness_high:l.paint.get("raster-brightness-max"),u_saturation_factor:(g=l.paint.get("raster-saturation"),g>0?1-1/(1.001-g):-g),u_contrast_factor:(d=l.paint.get("raster-contrast"),d>0?1/(1-d):1+d),u_spin_weights:Mp(l.paint.get("raster-hue-rotate")),u_coords_top:[u[0].x,u[0].y,u[1].x,u[1].y],u_coords_bottom:[u[3].x,u[3].y,u[2].x,u[2].y]};var d,g};function Mp(h){h*=Math.PI/180;const e=Math.sin(h),i=Math.cos(h);return[(2*i+1)/3,(-Math.sqrt(3)*e-i+1)/3,(Math.sqrt(3)*e-i+1)/3]}const Fs=(h,e,i,l,u,d,g,w,C,P,A,R,D)=>{const O=g.transform;return{u_is_size_zoom_constant:+(h==="constant"||h==="source"),u_is_size_feature_constant:+(h==="constant"||h==="camera"),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:O.cameraToCenterDistance,u_pitch:O.pitch/360*2*Math.PI,u_rotate_symbol:+i,u_aspect_ratio:O.width/O.height,u_fade_change:g.options.fadeDuration?g.symbolFadeChange:1,u_label_plane_matrix:w,u_coord_matrix:C,u_is_text:+A,u_pitch_with_map:+l,u_is_along_line:u,u_is_variable_anchor:d,u_texsize:R,u_texture:0,u_translation:P,u_pitched_scale:D}},Zh=(h,e,i,l,u,d,g,w,C,P,A,R,D,O)=>{const $=g.transform;return s.e(Fs(h,e,i,l,u,d,g,w,C,P,A,R,O),{u_gamma_scale:l?Math.cos($.pitch*Math.PI/180)*$.cameraToCenterDistance:1,u_device_pixel_ratio:g.pixelRatio,u_is_halo:1})},kp=(h,e,i,l,u,d,g,w,C,P,A,R,D)=>s.e(Zh(h,e,i,l,u,d,g,w,C,P,!0,A,0,D),{u_texsize_icon:R,u_texture_icon:1}),Uh=(h,e)=>({u_opacity:h,u_color:e}),$h=(h,e,i,l,u)=>s.e((function(d,g,w,C){const P=w.imageManager.getPattern(d.from.toString()),A=w.imageManager.getPattern(d.to.toString()),{width:R,height:D}=w.imageManager.getPixelSize(),O=Math.pow(2,C.tileID.overscaledZ),$=C.tileSize*Math.pow(2,w.transform.tileZoom)/O,ee=$*(C.tileID.canonical.x+C.tileID.wrap*O),Q=$*C.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:P.tl,u_pattern_br_a:P.br,u_pattern_tl_b:A.tl,u_pattern_br_b:A.br,u_texsize:[R,D],u_mix:g.t,u_pattern_size_a:P.displaySize,u_pattern_size_b:A.displaySize,u_scale_a:g.fromScale,u_scale_b:g.toScale,u_tile_units_to_pixels:1/s.aC(C,1,w.transform.tileZoom),u_pixel_coord_upper:[ee>>16,Q>>16],u_pixel_coord_lower:[65535&ee,65535&Q]}})(i,u,e,l),{u_opacity:h}),Nc=(h,e)=>{},jc={fillExtrusion:(h,e)=>({u_lightpos:new s.bT(h,e.u_lightpos),u_lightpos_globe:new s.bT(h,e.u_lightpos_globe),u_lightintensity:new s.bg(h,e.u_lightintensity),u_lightcolor:new s.bT(h,e.u_lightcolor),u_vertical_gradient:new s.bg(h,e.u_vertical_gradient),u_opacity:new s.bg(h,e.u_opacity),u_fill_translate:new s.bU(h,e.u_fill_translate)}),fillExtrusionPattern:(h,e)=>({u_lightpos:new s.bT(h,e.u_lightpos),u_lightpos_globe:new s.bT(h,e.u_lightpos_globe),u_lightintensity:new s.bg(h,e.u_lightintensity),u_lightcolor:new s.bT(h,e.u_lightcolor),u_vertical_gradient:new s.bg(h,e.u_vertical_gradient),u_height_factor:new s.bg(h,e.u_height_factor),u_opacity:new s.bg(h,e.u_opacity),u_fill_translate:new s.bU(h,e.u_fill_translate),u_image:new s.bP(h,e.u_image),u_texsize:new s.bU(h,e.u_texsize),u_pixel_coord_upper:new s.bU(h,e.u_pixel_coord_upper),u_pixel_coord_lower:new s.bU(h,e.u_pixel_coord_lower),u_scale:new s.bT(h,e.u_scale),u_fade:new s.bg(h,e.u_fade)}),fill:(h,e)=>({u_fill_translate:new s.bU(h,e.u_fill_translate)}),fillPattern:(h,e)=>({u_image:new s.bP(h,e.u_image),u_texsize:new s.bU(h,e.u_texsize),u_pixel_coord_upper:new s.bU(h,e.u_pixel_coord_upper),u_pixel_coord_lower:new s.bU(h,e.u_pixel_coord_lower),u_scale:new s.bT(h,e.u_scale),u_fade:new s.bg(h,e.u_fade),u_fill_translate:new s.bU(h,e.u_fill_translate)}),fillOutline:(h,e)=>({u_world:new s.bU(h,e.u_world),u_fill_translate:new s.bU(h,e.u_fill_translate)}),fillOutlinePattern:(h,e)=>({u_world:new s.bU(h,e.u_world),u_image:new s.bP(h,e.u_image),u_texsize:new s.bU(h,e.u_texsize),u_pixel_coord_upper:new s.bU(h,e.u_pixel_coord_upper),u_pixel_coord_lower:new s.bU(h,e.u_pixel_coord_lower),u_scale:new s.bT(h,e.u_scale),u_fade:new s.bg(h,e.u_fade),u_fill_translate:new s.bU(h,e.u_fill_translate)}),circle:(h,e)=>({u_camera_to_center_distance:new s.bg(h,e.u_camera_to_center_distance),u_scale_with_map:new s.bP(h,e.u_scale_with_map),u_pitch_with_map:new s.bP(h,e.u_pitch_with_map),u_extrude_scale:new s.bU(h,e.u_extrude_scale),u_device_pixel_ratio:new s.bg(h,e.u_device_pixel_ratio),u_globe_extrude_scale:new s.bg(h,e.u_globe_extrude_scale),u_translate:new s.bU(h,e.u_translate)}),collisionBox:(h,e)=>({u_pixel_extrude_scale:new s.bU(h,e.u_pixel_extrude_scale)}),collisionCircle:(h,e)=>({u_viewport_size:new s.bU(h,e.u_viewport_size)}),debug:(h,e)=>({u_color:new s.bQ(h,e.u_color),u_overlay:new s.bP(h,e.u_overlay),u_overlay_scale:new s.bg(h,e.u_overlay_scale)}),depth:Nc,clippingMask:Nc,heatmap:(h,e)=>({u_extrude_scale:new s.bg(h,e.u_extrude_scale),u_intensity:new s.bg(h,e.u_intensity),u_globe_extrude_scale:new s.bg(h,e.u_globe_extrude_scale)}),heatmapTexture:(h,e)=>({u_matrix:new s.bR(h,e.u_matrix),u_world:new s.bU(h,e.u_world),u_image:new s.bP(h,e.u_image),u_color_ramp:new s.bP(h,e.u_color_ramp),u_opacity:new s.bg(h,e.u_opacity)}),hillshade:(h,e)=>({u_image:new s.bP(h,e.u_image),u_latrange:new s.bU(h,e.u_latrange),u_exaggeration:new s.bg(h,e.u_exaggeration),u_altitudes:new s.b_(h,e.u_altitudes),u_azimuths:new s.b_(h,e.u_azimuths),u_accent:new s.bQ(h,e.u_accent),u_method:new s.bP(h,e.u_method),u_shadows:new s.bZ(h,e.u_shadows),u_highlights:new s.bZ(h,e.u_highlights)}),hillshadePrepare:(h,e)=>({u_matrix:new s.bR(h,e.u_matrix),u_image:new s.bP(h,e.u_image),u_dimension:new s.bU(h,e.u_dimension),u_zoom:new s.bg(h,e.u_zoom),u_unpack:new s.bS(h,e.u_unpack)}),colorRelief:(h,e)=>({u_image:new s.bP(h,e.u_image),u_unpack:new s.bS(h,e.u_unpack),u_dimension:new s.bU(h,e.u_dimension),u_elevation_stops:new s.bP(h,e.u_elevation_stops),u_color_stops:new s.bP(h,e.u_color_stops),u_color_ramp_size:new s.bP(h,e.u_color_ramp_size),u_opacity:new s.bg(h,e.u_opacity)}),line:(h,e)=>({u_translation:new s.bU(h,e.u_translation),u_ratio:new s.bg(h,e.u_ratio),u_device_pixel_ratio:new s.bg(h,e.u_device_pixel_ratio),u_units_to_pixels:new s.bU(h,e.u_units_to_pixels)}),lineGradient:(h,e)=>({u_translation:new s.bU(h,e.u_translation),u_ratio:new s.bg(h,e.u_ratio),u_device_pixel_ratio:new s.bg(h,e.u_device_pixel_ratio),u_units_to_pixels:new s.bU(h,e.u_units_to_pixels),u_image:new s.bP(h,e.u_image),u_image_height:new s.bg(h,e.u_image_height)}),linePattern:(h,e)=>({u_translation:new s.bU(h,e.u_translation),u_texsize:new s.bU(h,e.u_texsize),u_ratio:new s.bg(h,e.u_ratio),u_device_pixel_ratio:new s.bg(h,e.u_device_pixel_ratio),u_image:new s.bP(h,e.u_image),u_units_to_pixels:new s.bU(h,e.u_units_to_pixels),u_scale:new s.bT(h,e.u_scale),u_fade:new s.bg(h,e.u_fade)}),lineSDF:(h,e)=>({u_translation:new s.bU(h,e.u_translation),u_ratio:new s.bg(h,e.u_ratio),u_device_pixel_ratio:new s.bg(h,e.u_device_pixel_ratio),u_units_to_pixels:new s.bU(h,e.u_units_to_pixels),u_patternscale_a:new s.bU(h,e.u_patternscale_a),u_patternscale_b:new s.bU(h,e.u_patternscale_b),u_sdfgamma:new s.bg(h,e.u_sdfgamma),u_image:new s.bP(h,e.u_image),u_tex_y_a:new s.bg(h,e.u_tex_y_a),u_tex_y_b:new s.bg(h,e.u_tex_y_b),u_mix:new s.bg(h,e.u_mix)}),raster:(h,e)=>({u_tl_parent:new s.bU(h,e.u_tl_parent),u_scale_parent:new s.bg(h,e.u_scale_parent),u_buffer_scale:new s.bg(h,e.u_buffer_scale),u_fade_t:new s.bg(h,e.u_fade_t),u_opacity:new s.bg(h,e.u_opacity),u_image0:new s.bP(h,e.u_image0),u_image1:new s.bP(h,e.u_image1),u_brightness_low:new s.bg(h,e.u_brightness_low),u_brightness_high:new s.bg(h,e.u_brightness_high),u_saturation_factor:new s.bg(h,e.u_saturation_factor),u_contrast_factor:new s.bg(h,e.u_contrast_factor),u_spin_weights:new s.bT(h,e.u_spin_weights),u_coords_top:new s.bS(h,e.u_coords_top),u_coords_bottom:new s.bS(h,e.u_coords_bottom)}),symbolIcon:(h,e)=>({u_is_size_zoom_constant:new s.bP(h,e.u_is_size_zoom_constant),u_is_size_feature_constant:new s.bP(h,e.u_is_size_feature_constant),u_size_t:new s.bg(h,e.u_size_t),u_size:new s.bg(h,e.u_size),u_camera_to_center_distance:new s.bg(h,e.u_camera_to_center_distance),u_pitch:new s.bg(h,e.u_pitch),u_rotate_symbol:new s.bP(h,e.u_rotate_symbol),u_aspect_ratio:new s.bg(h,e.u_aspect_ratio),u_fade_change:new s.bg(h,e.u_fade_change),u_label_plane_matrix:new s.bR(h,e.u_label_plane_matrix),u_coord_matrix:new s.bR(h,e.u_coord_matrix),u_is_text:new s.bP(h,e.u_is_text),u_pitch_with_map:new s.bP(h,e.u_pitch_with_map),u_is_along_line:new s.bP(h,e.u_is_along_line),u_is_variable_anchor:new s.bP(h,e.u_is_variable_anchor),u_texsize:new s.bU(h,e.u_texsize),u_texture:new s.bP(h,e.u_texture),u_translation:new s.bU(h,e.u_translation),u_pitched_scale:new s.bg(h,e.u_pitched_scale)}),symbolSDF:(h,e)=>({u_is_size_zoom_constant:new s.bP(h,e.u_is_size_zoom_constant),u_is_size_feature_constant:new s.bP(h,e.u_is_size_feature_constant),u_size_t:new s.bg(h,e.u_size_t),u_size:new s.bg(h,e.u_size),u_camera_to_center_distance:new s.bg(h,e.u_camera_to_center_distance),u_pitch:new s.bg(h,e.u_pitch),u_rotate_symbol:new s.bP(h,e.u_rotate_symbol),u_aspect_ratio:new s.bg(h,e.u_aspect_ratio),u_fade_change:new s.bg(h,e.u_fade_change),u_label_plane_matrix:new s.bR(h,e.u_label_plane_matrix),u_coord_matrix:new s.bR(h,e.u_coord_matrix),u_is_text:new s.bP(h,e.u_is_text),u_pitch_with_map:new s.bP(h,e.u_pitch_with_map),u_is_along_line:new s.bP(h,e.u_is_along_line),u_is_variable_anchor:new s.bP(h,e.u_is_variable_anchor),u_texsize:new s.bU(h,e.u_texsize),u_texture:new s.bP(h,e.u_texture),u_gamma_scale:new s.bg(h,e.u_gamma_scale),u_device_pixel_ratio:new s.bg(h,e.u_device_pixel_ratio),u_is_halo:new s.bP(h,e.u_is_halo),u_translation:new s.bU(h,e.u_translation),u_pitched_scale:new s.bg(h,e.u_pitched_scale)}),symbolTextAndIcon:(h,e)=>({u_is_size_zoom_constant:new s.bP(h,e.u_is_size_zoom_constant),u_is_size_feature_constant:new s.bP(h,e.u_is_size_feature_constant),u_size_t:new s.bg(h,e.u_size_t),u_size:new s.bg(h,e.u_size),u_camera_to_center_distance:new s.bg(h,e.u_camera_to_center_distance),u_pitch:new s.bg(h,e.u_pitch),u_rotate_symbol:new s.bP(h,e.u_rotate_symbol),u_aspect_ratio:new s.bg(h,e.u_aspect_ratio),u_fade_change:new s.bg(h,e.u_fade_change),u_label_plane_matrix:new s.bR(h,e.u_label_plane_matrix),u_coord_matrix:new s.bR(h,e.u_coord_matrix),u_is_text:new s.bP(h,e.u_is_text),u_pitch_with_map:new s.bP(h,e.u_pitch_with_map),u_is_along_line:new s.bP(h,e.u_is_along_line),u_is_variable_anchor:new s.bP(h,e.u_is_variable_anchor),u_texsize:new s.bU(h,e.u_texsize),u_texsize_icon:new s.bU(h,e.u_texsize_icon),u_texture:new s.bP(h,e.u_texture),u_texture_icon:new s.bP(h,e.u_texture_icon),u_gamma_scale:new s.bg(h,e.u_gamma_scale),u_device_pixel_ratio:new s.bg(h,e.u_device_pixel_ratio),u_is_halo:new s.bP(h,e.u_is_halo),u_translation:new s.bU(h,e.u_translation),u_pitched_scale:new s.bg(h,e.u_pitched_scale)}),background:(h,e)=>({u_opacity:new s.bg(h,e.u_opacity),u_color:new s.bQ(h,e.u_color)}),backgroundPattern:(h,e)=>({u_opacity:new s.bg(h,e.u_opacity),u_image:new s.bP(h,e.u_image),u_pattern_tl_a:new s.bU(h,e.u_pattern_tl_a),u_pattern_br_a:new s.bU(h,e.u_pattern_br_a),u_pattern_tl_b:new s.bU(h,e.u_pattern_tl_b),u_pattern_br_b:new s.bU(h,e.u_pattern_br_b),u_texsize:new s.bU(h,e.u_texsize),u_mix:new s.bg(h,e.u_mix),u_pattern_size_a:new s.bU(h,e.u_pattern_size_a),u_pattern_size_b:new s.bU(h,e.u_pattern_size_b),u_scale_a:new s.bg(h,e.u_scale_a),u_scale_b:new s.bg(h,e.u_scale_b),u_pixel_coord_upper:new s.bU(h,e.u_pixel_coord_upper),u_pixel_coord_lower:new s.bU(h,e.u_pixel_coord_lower),u_tile_units_to_pixels:new s.bg(h,e.u_tile_units_to_pixels)}),terrain:(h,e)=>({u_texture:new s.bP(h,e.u_texture),u_ele_delta:new s.bg(h,e.u_ele_delta),u_fog_matrix:new s.bR(h,e.u_fog_matrix),u_fog_color:new s.bQ(h,e.u_fog_color),u_fog_ground_blend:new s.bg(h,e.u_fog_ground_blend),u_fog_ground_blend_opacity:new s.bg(h,e.u_fog_ground_blend_opacity),u_horizon_color:new s.bQ(h,e.u_horizon_color),u_horizon_fog_blend:new s.bg(h,e.u_horizon_fog_blend),u_is_globe_mode:new s.bg(h,e.u_is_globe_mode)}),terrainDepth:(h,e)=>({u_ele_delta:new s.bg(h,e.u_ele_delta)}),terrainCoords:(h,e)=>({u_texture:new s.bP(h,e.u_texture),u_terrain_coords_id:new s.bg(h,e.u_terrain_coords_id),u_ele_delta:new s.bg(h,e.u_ele_delta)}),projectionErrorMeasurement:(h,e)=>({u_input:new s.bg(h,e.u_input),u_output_expected:new s.bg(h,e.u_output_expected)}),atmosphere:(h,e)=>({u_sun_pos:new s.bT(h,e.u_sun_pos),u_atmosphere_blend:new s.bg(h,e.u_atmosphere_blend),u_globe_position:new s.bT(h,e.u_globe_position),u_globe_radius:new s.bg(h,e.u_globe_radius),u_inv_proj_matrix:new s.bR(h,e.u_inv_proj_matrix)}),sky:(h,e)=>({u_sky_color:new s.bQ(h,e.u_sky_color),u_horizon_color:new s.bQ(h,e.u_horizon_color),u_horizon:new s.bU(h,e.u_horizon),u_horizon_normal:new s.bU(h,e.u_horizon_normal),u_sky_horizon_blend:new s.bg(h,e.u_sky_horizon_blend),u_sky_blend:new s.bg(h,e.u_sky_blend)})};class Gh{constructor(e,i,l){this.context=e;const u=e.gl;this.buffer=u.createBuffer(),this.dynamicDraw=!!l,this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),u.bufferData(u.ELEMENT_ARRAY_BUFFER,i.arrayBuffer,this.dynamicDraw?u.DYNAMIC_DRAW:u.STATIC_DRAW),this.dynamicDraw||delete i.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){const i=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),i.bufferSubData(i.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Sl={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Qa{constructor(e,i,l,u){this.length=i.length,this.attributes=l,this.itemSize=i.bytesPerElement,this.dynamicDraw=u,this.context=e;const d=e.gl;this.buffer=d.createBuffer(),e.bindVertexBuffer.set(this.buffer),d.bufferData(d.ARRAY_BUFFER,i.arrayBuffer,this.dynamicDraw?d.DYNAMIC_DRAW:d.STATIC_DRAW),this.dynamicDraw||delete i.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(e){if(e.length!==this.length)throw new Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`);const i=this.context.gl;this.bind(),i.bufferSubData(i.ARRAY_BUFFER,0,e.arrayBuffer)}enableAttributes(e,i){for(let l=0;l0&&(P.push({circleArray:we,circleOffset:R,coord:ue}),A+=we.length/4,R=A),he&&C.draw(d,w.LINES,$r.disabled,cn.disabled,h.colorModeForRenderPass(),Lr.disabled,Tl(h.transform),h.style.map.terrain&&h.style.map.terrain.getTerrainData(ue),g.getProjectionData({overscaledTileID:ue,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),i.id,he.layoutVertexBuffer,he.indexBuffer,he.segments,null,h.transform.zoom,null,null,he.collisionVertexBuffer)}if(!u||!P.length)return;const D=h.useProgram("collisionCircle"),O=new s.b$;O.resize(4*A),O._trim();let $=0;for(const ne of P)for(let ue=0;ue=0&&(ee[ne.associatedIconIndex]={shiftedAnchor:Tt,angle:mr})}else sn(ne.numGlyphs,O)}if(C){$.clear();const Q=h.icon.placedSymbolArray;for(let ne=0;neh.style.map.terrain.getElevation(Ue,ba,ci):null,mi=i.layout.get("text-rotation-alignment")==="map";Yr(Je,h,u,Ui,za,ne,P,mi,Ue.toUnwrapped(),ee.width,ee.height,vo,li)}const Zo=u&&pe||qo,ta=ue||Zo?Bp:ne?Ui:h.transform.clipSpaceToPixelsMatrix,La=Tt&&i.paint.get(u?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let $i;$i=Tt?Je.iconsInText?kp(mr.kind,Bn,_e,ne,ue,Zo,h,ta,go,vo,Hn,si,Qe):Zh(mr.kind,Bn,_e,ne,ue,Zo,h,ta,go,vo,u,Hn,0,Qe):Fs(mr.kind,Bn,_e,ne,ue,Zo,h,ta,go,vo,u,Hn,Qe);const yo={program:An,buffers:Nt,uniformValues:$i,projectionData:fs,atlasTexture:Kn,atlasTextureIcon:fi,atlasInterpolation:Kr,atlasInterpolationIcon:Fn,isSDF:Tt,hasHalo:La};if(he&&Je.canOverlap){we=!0;const li=Nt.segments.get();for(const mi of li)Be.push({segments:new s.aM([mi]),sortKey:mi.sortKey,state:yo,terrainData:Ln})}else Be.push({segments:Nt.segments,sortKey:0,state:yo,terrainData:Ln})}we&&Be.sort(((Ue,We)=>Ue.sortKey-We.sortKey));for(const Ue of Be){const We=Ue.state;if(O.activeTexture.set($.TEXTURE0),We.atlasTexture.bind(We.atlasInterpolation,$.CLAMP_TO_EDGE),We.atlasTextureIcon&&(O.activeTexture.set($.TEXTURE1),We.atlasTextureIcon&&We.atlasTextureIcon.bind(We.atlasInterpolationIcon,$.CLAMP_TO_EDGE)),We.isSDF){const Je=We.uniformValues;We.hasHalo&&(Je.u_is_halo=1,qs(We.buffers,Ue.segments,i,h,We.program,Pe,A,R,Je,We.projectionData,Ue.terrainData)),Je.u_is_halo=0}qs(We.buffers,Ue.segments,i,h,We.program,Pe,A,R,We.uniformValues,We.projectionData,Ue.terrainData)}}function qs(h,e,i,l,u,d,g,w,C,P,A){const R=l.context;u.draw(R,R.gl.TRIANGLES,d,g,w,Lr.backCCW,C,A,P,i.id,h.layoutVertexBuffer,h.indexBuffer,e,i.paint,l.transform.zoom,h.programConfigurations.get(i.id),h.dynamicLayoutVertexBuffer,h.opacityVertexBuffer)}function Xc(h,e,i,l,u){const d=h.context,g=d.gl,w=cn.disabled,C=new zn([g.ONE,g.ONE],s.bf.transparent,[!0,!0,!0,!0]),P=e.getBucket(i);if(!P)return;const A=l.key;let R=i.heatmapFbos.get(A);R||(R=Zs(d,e.tileSize,e.tileSize),i.heatmapFbos.set(A,R)),d.bindFramebuffer.set(R.framebuffer),d.viewport.set([0,0,e.tileSize,e.tileSize]),d.clear({color:s.bf.transparent});const D=P.programConfigurations.get(i.id),O=h.useProgram("heatmap",D,!u),$=h.transform.getProjectionData({overscaledTileID:e.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),ee=h.style.map.terrain.getTerrainData(l);O.draw(d,g.TRIANGLES,$r.disabled,w,C,Lr.disabled,Oh(e,h.transform.zoom,i.paint.get("heatmap-intensity"),1),ee,$,i.id,P.layoutVertexBuffer,P.indexBuffer,P.segments,i.paint,h.transform.zoom,D)}function nd(h,e,i,l,u){const d=h.context,g=d.gl,w=h.transform;d.setColorMode(h.colorModeForRenderPass());const C=Us(d,e),P=i.key,A=e.heatmapFbos.get(P);if(!A)return;d.activeTexture.set(g.TEXTURE0),g.bindTexture(g.TEXTURE_2D,A.colorAttachment.get()),d.activeTexture.set(g.TEXTURE1),C.bind(g.LINEAR,g.CLAMP_TO_EDGE);const R=w.getProjectionData({overscaledTileID:i,applyTerrainMatrix:u,applyGlobeMatrix:!l});h.useProgram("heatmapTexture").draw(d,g.TRIANGLES,$r.disabled,cn.disabled,h.colorModeForRenderPass(),Lr.disabled,Rc(h,e,0,1),null,R,e.id,h.rasterBoundsBuffer,h.quadTriangleIndexBuffer,h.rasterBoundsSegments,e.paint,w.zoom),A.destroy(),e.heatmapFbos.delete(P)}function Zs(h,e,i){var l,u;const d=h.gl,g=d.createTexture();d.bindTexture(d.TEXTURE_2D,g),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR);const w=(l=h.HALF_FLOAT)!==null&&l!==void 0?l:d.UNSIGNED_BYTE,C=(u=h.RGBA16F)!==null&&u!==void 0?u:d.RGBA;d.texImage2D(d.TEXTURE_2D,0,C,e,i,0,d.RGBA,w,null);const P=h.createFramebuffer(e,i,!1,!1);return P.colorAttachment.set(g),P}function Us(h,e){return e.colorRampTexture||(e.colorRampTexture=new s.T(h,e.colorRamp,h.gl.RGBA)),e.colorRampTexture}function $s(h,e,i,l,u){if(!i||!l||!l.imageAtlas)return;const d=l.imageAtlas.patternPositions;let g=d[i.to.toString()],w=d[i.from.toString()];if(!g&&w&&(g=w),!w&&g&&(w=g),!g||!w){const C=u.getPaintProperty(e);g=d[C],w=d[C]}g&&w&&h.setConstantPatternPositions(g,w)}function Ll(h,e,i,l,u,d,g,w){const C=h.context.gl,P="fill-pattern",A=i.paint.get(P),R=A&&A.constantOr(1),D=i.getCrossfadeParameters();let O,$,ee,Q,ne;const ue=h.transform,_e=i.paint.get("fill-translate"),he=i.paint.get("fill-translate-anchor");g?($=R&&!i.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",O=C.LINES):($=R?"fillPattern":"fill",O=C.TRIANGLES);const we=A.constantOr(null);for(const Pe of l){const pe=e.getTile(Pe);if(R&&!pe.patternsLoaded())continue;const Be=pe.getBucket(i);if(!Be)continue;const Qe=Be.programConfigurations.get(i.id),Ue=h.useProgram($,Qe),We=h.style.map.terrain&&h.style.map.terrain.getTerrainData(Pe);R&&(h.context.activeTexture.set(C.TEXTURE0),pe.imageAtlasTexture.bind(C.LINEAR,C.CLAMP_TO_EDGE),Qe.updatePaintBuffers(D)),$s(Qe,P,we,pe,i);const Je=ue.getProjectionData({overscaledTileID:Pe,applyGlobeMatrix:!w,applyTerrainMatrix:!0}),Nt=s.aD(ue,pe,_e,he);if(g){Q=Be.indexBuffer2,ne=Be.segments2;const Tt=[C.drawingBufferWidth,C.drawingBufferHeight];ee=$==="fillOutlinePattern"&&R?Rs(h,D,pe,Tt,Nt):Ds(Tt,Nt)}else Q=Be.indexBuffer,ne=Be.segments,ee=R?wl(h,D,pe,Nt):{u_fill_translate:Nt};const Zt=h.stencilModeForClipping(Pe);Ue.draw(h.context,O,u,Zt,d,Lr.backCCW,ee,We,Je,i.id,Be.layoutVertexBuffer,Q,ne,i.paint,h.transform.zoom,Qe)}}function Yc(h,e,i,l,u,d,g,w){const C=h.context,P=C.gl,A="fill-extrusion-pattern",R=i.paint.get(A),D=R.constantOr(1),O=i.getCrossfadeParameters(),$=i.paint.get("fill-extrusion-opacity"),ee=R.constantOr(null),Q=h.transform;for(const ne of l){const ue=e.getTile(ne),_e=ue.getBucket(i);if(!_e)continue;const he=h.style.map.terrain&&h.style.map.terrain.getTerrainData(ne),we=_e.programConfigurations.get(i.id),Pe=h.useProgram(D?"fillExtrusionPattern":"fillExtrusion",we);D&&(h.context.activeTexture.set(P.TEXTURE0),ue.imageAtlasTexture.bind(P.LINEAR,P.CLAMP_TO_EDGE),we.updatePaintBuffers(O));const pe=Q.getProjectionData({overscaledTileID:ne,applyGlobeMatrix:!w,applyTerrainMatrix:!0});$s(we,A,ee,ue,i);const Be=s.aD(Q,ue,i.paint.get("fill-extrusion-translate"),i.paint.get("fill-extrusion-translate-anchor")),Qe=i.paint.get("fill-extrusion-vertical-gradient"),Ue=D?Cp(h,Qe,$,Be,ne,O,ue):Pa(h,Qe,$,Be);Pe.draw(C,C.gl.TRIANGLES,u,d,g,Lr.backCCW,Ue,he,pe,i.id,_e.layoutVertexBuffer,_e.indexBuffer,_e.segments,i.paint,h.transform.zoom,we,h.style.map.terrain&&_e.centroidVertexBuffer)}}function Bo(h,e,i,l,u,d,g,w,C){var P;const A=h.style.projection,R=h.context,D=h.transform,O=R.gl,$=[`#define NUM_ILLUMINATION_SOURCES ${i.paint.get("hillshade-highlight-color").values.length}`],ee=h.useProgram("hillshade",null,!1,$),Q=!h.options.moving;for(const ne of l){const ue=e.getTile(ne),_e=ue.fbo;if(!_e)continue;const he=A.getMeshFromTileID(R,ne.canonical,w,!0,"raster"),we=(P=h.style.map.terrain)===null||P===void 0?void 0:P.getTerrainData(ne);R.activeTexture.set(O.TEXTURE0),O.bindTexture(O.TEXTURE_2D,_e.colorAttachment.get());const Pe=D.getProjectionData({overscaledTileID:ne,aligned:Q,applyGlobeMatrix:!C,applyTerrainMatrix:!0});ee.draw(R,O.TRIANGLES,d,u[ne.overscaledZ],g,Lr.backCCW,Ip(h,ue,i),we,Pe,i.id,he.vertexBuffer,he.indexBuffer,he.segments)}}function Kc(h,e,i,l,u,d,g,w,C){var P;const A=h.style.projection,R=h.context,D=h.transform,O=R.gl,$=h.useProgram("colorRelief"),ee=!h.options.moving;let Q=!0,ne=0;for(const ue of l){const _e=e.getTile(ue),he=_e.dem;if(Q){const Ue=O.getParameter(O.MAX_TEXTURE_SIZE),{elevationTexture:We,colorTexture:Je}=i.getColorRampTextures(R,Ue,he.getUnpackVector());R.activeTexture.set(O.TEXTURE1),We.bind(O.NEAREST,O.CLAMP_TO_EDGE),R.activeTexture.set(O.TEXTURE4),Je.bind(O.LINEAR,O.CLAMP_TO_EDGE),Q=!1,ne=We.size[0]}if(!he||!he.data)continue;const we=he.stride,Pe=he.getPixels();if(R.activeTexture.set(O.TEXTURE0),R.pixelStoreUnpackPremultiplyAlpha.set(!1),_e.demTexture=_e.demTexture||h.getTileTexture(we),_e.demTexture){const Ue=_e.demTexture;Ue.update(Pe,{premultiply:!1}),Ue.bind(O.LINEAR,O.CLAMP_TO_EDGE)}else _e.demTexture=new s.T(R,Pe,O.RGBA,{premultiply:!1}),_e.demTexture.bind(O.LINEAR,O.CLAMP_TO_EDGE);const pe=A.getMeshFromTileID(R,ue.canonical,w,!0,"raster"),Be=(P=h.style.map.terrain)===null||P===void 0?void 0:P.getTerrainData(ue),Qe=D.getProjectionData({overscaledTileID:ue,aligned:ee,applyGlobeMatrix:!C,applyTerrainMatrix:!0});$.draw(R,O.TRIANGLES,d,u[ue.overscaledZ],g,Lr.backCCW,jh(i,_e.dem,ne),Be,Qe,i.id,pe.vertexBuffer,pe.indexBuffer,pe.segments)}}const Dl=[new s.P(0,0),new s.P(s.$,0),new s.P(s.$,s.$),new s.P(0,s.$)];function Fo(h,e,i,l,u,d,g,w,C=!1,P=!1){const A=l[l.length-1].overscaledZ,R=h.context,D=R.gl,O=h.useProgram("raster"),$=h.transform,ee=h.style.projection,Q=h.colorModeForRenderPass(),ne=!h.options.moving;for(const ue of l){const _e=h.getDepthModeForSublayer(ue.overscaledZ-A,i.paint.get("raster-opacity")===1?$r.ReadWrite:$r.ReadOnly,D.LESS),he=e.getTile(ue);he.registerFadeDuration(i.paint.get("raster-fade-duration"));const we=e.findLoadedParent(ue,0),Pe=e.findLoadedSibling(ue),pe=Jc(he,we||Pe||null,e,i,h.transform,h.style.map.terrain);let Be,Qe;const Ue=i.paint.get("raster-resampling")==="nearest"?D.NEAREST:D.LINEAR;R.activeTexture.set(D.TEXTURE0),he.texture.bind(Ue,D.CLAMP_TO_EDGE,D.LINEAR_MIPMAP_NEAREST),R.activeTexture.set(D.TEXTURE1),we?(we.texture.bind(Ue,D.CLAMP_TO_EDGE,D.LINEAR_MIPMAP_NEAREST),Be=Math.pow(2,we.tileID.overscaledZ-he.tileID.overscaledZ),Qe=[he.tileID.canonical.x*Be%1,he.tileID.canonical.y*Be%1]):he.texture.bind(Ue,D.CLAMP_TO_EDGE,D.LINEAR_MIPMAP_NEAREST),he.texture.useMipmap&&R.extTextureFilterAnisotropic&&h.transform.pitch>20&&D.texParameterf(D.TEXTURE_2D,R.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,R.extTextureFilterAnisotropicMax);const We=h.style.map.terrain&&h.style.map.terrain.getTerrainData(ue),Je=$.getProjectionData({overscaledTileID:ue,aligned:ne,applyGlobeMatrix:!P,applyTerrainMatrix:!0}),Nt=Bs(Qe||[0,0],Be||1,pe,i,w),Zt=ee.getMeshFromTileID(R,ue.canonical,d,g,"raster");O.draw(R,D.TRIANGLES,_e,u?u[ue.overscaledZ]:cn.disabled,Q,C?Lr.frontCCW:Lr.backCCW,Nt,We,Je,i.id,Zt.vertexBuffer,Zt.indexBuffer,Zt.segments)}}function Jc(h,e,i,l,u,d){const g=l.paint.get("raster-fade-duration");if(!d&&g>0){const w=ie.now(),C=(w-h.timeAdded)/g,P=e?(w-e.timeAdded)/g:-1,A=i.getSource(),R=Mt(u,{tileSize:A.tileSize,roundZoom:A.roundZoom}),D=!e||Math.abs(e.tileID.overscaledZ-R)>Math.abs(h.tileID.overscaledZ-R),O=D&&h.refreshedUponExpiration?1:s.ah(D?C:1-P,0,1);return h.refreshedUponExpiration&&C>=1&&(h.refreshedUponExpiration=!1),e?{opacity:1,mix:1-O}:{opacity:O,mix:0}}return{opacity:1,mix:0}}const id=new s.bf(1,0,0,1),ad=new s.bf(0,1,0,1),Rl=new s.bf(0,0,1,1),Qc=new s.bf(1,0,1,1),Op=new s.bf(0,1,1,1);function eu(h,e,i,l){Ua(h,0,e+i/2,h.transform.width,i,l)}function Yn(h,e,i,l){Ua(h,e-i/2,0,i,h.transform.height,l)}function Ua(h,e,i,l,u,d){const g=h.context,w=g.gl;w.enable(w.SCISSOR_TEST),w.scissor(e*h.pixelRatio,i*h.pixelRatio,l*h.pixelRatio,u*h.pixelRatio),g.clear({color:d}),w.disable(w.SCISSOR_TEST)}function ya(h,e,i){const l=h.context,u=l.gl,d=h.useProgram("debug"),g=$r.disabled,w=cn.disabled,C=h.colorModeForRenderPass(),P="$debug",A=h.style.map.terrain&&h.style.map.terrain.getTerrainData(i);l.activeTexture.set(u.TEXTURE0);const R=e.getTileByID(i.key).latestRawTileData,D=Math.floor((R&&R.byteLength||0)/1024),O=e.getTile(i).tileSize,$=512/Math.min(O,512)*(i.overscaledZ/h.transform.zoom)*.5;let ee=i.canonical.toString();i.overscaledZ!==i.canonical.z&&(ee+=` => ${i.overscaledZ}`),(function(ne,ue){ne.initDebugOverlayCanvas();const _e=ne.debugOverlayCanvas,he=ne.context.gl,we=ne.debugOverlayCanvas.getContext("2d");we.clearRect(0,0,_e.width,_e.height),we.shadowColor="white",we.shadowBlur=2,we.lineWidth=1.5,we.strokeStyle="white",we.textBaseline="top",we.font="bold 36px Open Sans, sans-serif",we.fillText(ue,5,5),we.strokeText(ue,5,5),ne.debugOverlayTexture.update(_e),ne.debugOverlayTexture.bind(he.LINEAR,he.CLAMP_TO_EDGE)})(h,`${ee} ${D}kB`);const Q=h.transform.getProjectionData({overscaledTileID:i,applyGlobeMatrix:!0,applyTerrainMatrix:!0});d.draw(l,u.TRIANGLES,g,w,zn.alphaBlended,Lr.disabled,Eo(s.bf.transparent,$),null,Q,P,h.debugBuffer,h.quadTriangleIndexBuffer,h.debugSegments),d.draw(l,u.LINE_STRIP,g,w,C,Lr.disabled,Eo(s.bf.red),A,Q,P,h.debugBuffer,h.tileBorderIndexBuffer,h.debugSegments)}function Bl(h,e,i,l){const{isRenderingGlobe:u}=l,d=h.context,g=d.gl,w=h.transform,C=h.colorModeForRenderPass(),P=h.getDepthModeFor3D(),A=h.useProgram("terrain");d.bindFramebuffer.set(null),d.viewport.set([0,0,h.width,h.height]);for(const R of i){const D=e.getTerrainMesh(R.tileID),O=h.renderToTexture.getTexture(R),$=e.getTerrainData(R.tileID);d.activeTexture.set(g.TEXTURE0),g.bindTexture(g.TEXTURE_2D,O.texture);const ee=e.getMeshFrameDelta(w.zoom),Q=w.calculateFogMatrix(R.tileID.toUnwrapped()),ne=xl(ee,Q,h.style.sky,w.pitch,u),ue=w.getProjectionData({overscaledTileID:R.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});A.draw(d,g.TRIANGLES,P,cn.disabled,C,Lr.backCCW,ne,$,ue,"terrain",D.vertexBuffer,D.indexBuffer,D.segments)}}function Gs(h,e){if(!e.mesh){const i=new s.aL;i.emplaceBack(-1,-1),i.emplaceBack(1,-1),i.emplaceBack(1,1),i.emplaceBack(-1,1);const l=new s.aN;l.emplaceBack(0,1,2),l.emplaceBack(0,2,3),e.mesh=new Tn(h.createVertexBuffer(i,nn.members),h.createIndexBuffer(l),s.aM.simpleSegment(0,0,i.length,l.length))}return e.mesh}class od{constructor(e,i){this.context=new ed(e),this.transform=i,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:s.ag(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=cr.maxUnderzooming+cr.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new sr}resize(e,i,l){if(this.width=Math.floor(e*l),this.height=Math.floor(i*l),this.pixelRatio=l,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const u of this.style._order)this.style._layers[u].resize()}setup(){const e=this.context,i=new s.aL;i.emplaceBack(0,0),i.emplaceBack(s.$,0),i.emplaceBack(0,s.$),i.emplaceBack(s.$,s.$),this.tileExtentBuffer=e.createVertexBuffer(i,nn.members),this.tileExtentSegments=s.aM.simpleSegment(0,0,4,2);const l=new s.aL;l.emplaceBack(0,0),l.emplaceBack(s.$,0),l.emplaceBack(0,s.$),l.emplaceBack(s.$,s.$),this.debugBuffer=e.createVertexBuffer(l,nn.members),this.debugSegments=s.aM.simpleSegment(0,0,4,5);const u=new s.c6;u.emplaceBack(0,0,0,0),u.emplaceBack(s.$,0,s.$,0),u.emplaceBack(0,s.$,0,s.$),u.emplaceBack(s.$,s.$,s.$,s.$),this.rasterBoundsBuffer=e.createVertexBuffer(u,wp.members),this.rasterBoundsSegments=s.aM.simpleSegment(0,0,4,2);const d=new s.aL;d.emplaceBack(0,0),d.emplaceBack(s.$,0),d.emplaceBack(0,s.$),d.emplaceBack(s.$,s.$),this.rasterBoundsBufferPosOnly=e.createVertexBuffer(d,nn.members),this.rasterBoundsSegmentsPosOnly=s.aM.simpleSegment(0,0,4,5);const g=new s.aL;g.emplaceBack(0,0),g.emplaceBack(1,0),g.emplaceBack(0,1),g.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(g,nn.members),this.viewportSegments=s.aM.simpleSegment(0,0,4,2);const w=new s.c7;w.emplaceBack(0),w.emplaceBack(1),w.emplaceBack(3),w.emplaceBack(2),w.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(w);const C=new s.aN;C.emplaceBack(1,0,2),C.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(C);const P=this.context.gl;this.stencilClearMode=new cn({func:P.ALWAYS,mask:0},0,255,P.ZERO,P.ZERO,P.ZERO),this.tileExtentMesh=new Tn(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){const e=this.context,i=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const l=s.L();s.bY(l,0,this.width,this.height,0,0,1),s.N(l,l,[i.drawingBufferWidth,i.drawingBufferHeight,0]);const u={mainMatrix:l,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:l};this.useProgram("clippingMask",null,!0).draw(e,i.TRIANGLES,$r.disabled,this.stencilClearMode,zn.disabled,Lr.disabled,null,null,u,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(e,i,l){if(this.currentStencilSource===e.source||!e.isTileClipped()||!i||!i.length)return;this.currentStencilSource=e.source,this.nextStencilID+i.length>256&&this.clearStencil();const u=this.context;u.setColorMode(zn.disabled),u.setDepthMode($r.disabled);const d={};for(const g of i)d[g.key]=this.nextStencilID++;this._renderTileMasks(d,i,l,!0),this._renderTileMasks(d,i,l,!1),this._tileClippingMaskIDs=d}_renderTileMasks(e,i,l,u){const d=this.context,g=d.gl,w=this.style.projection,C=this.transform,P=this.useProgram("clippingMask");for(const A of i){const R=e[A.key],D=this.style.map.terrain&&this.style.map.terrain.getTerrainData(A),O=w.getMeshFromTileID(this.context,A.canonical,u,!0,"stencil"),$=C.getProjectionData({overscaledTileID:A,applyGlobeMatrix:!l,applyTerrainMatrix:!0});P.draw(d,g.TRIANGLES,$r.disabled,new cn({func:g.ALWAYS,mask:0},R,255,g.KEEP,g.KEEP,g.REPLACE),zn.disabled,l?Lr.disabled:Lr.backCCW,null,D,$,"$clipping",O.vertexBuffer,O.indexBuffer,O.segments)}}_renderTilesDepthBuffer(){const e=this.context,i=e.gl,l=this.style.projection,u=this.transform,d=this.useProgram("depth"),g=this.getDepthModeFor3D(),w=xe(u,{tileSize:u.tileSize});for(const C of w){const P=this.style.map.terrain&&this.style.map.terrain.getTerrainData(C),A=l.getMeshFromTileID(this.context,C.canonical,!0,!0,"raster"),R=u.getProjectionData({overscaledTileID:C,applyGlobeMatrix:!0,applyTerrainMatrix:!0});d.draw(e,i.TRIANGLES,g,cn.disabled,zn.disabled,Lr.backCCW,null,P,R,"$clipping",A.vertexBuffer,A.indexBuffer,A.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const e=this.nextStencilID++,i=this.context.gl;return new cn({func:i.NOTEQUAL,mask:255},e,255,i.KEEP,i.KEEP,i.REPLACE)}stencilModeForClipping(e){const i=this.context.gl;return new cn({func:i.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,i.KEEP,i.KEEP,i.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(e){const i=this.context.gl,l=e.sort(((g,w)=>w.overscaledZ-g.overscaledZ)),u=l[l.length-1].overscaledZ,d=l[0].overscaledZ-u+1;if(d>1){this.currentStencilSource=void 0,this.nextStencilID+d>256&&this.clearStencil();const g={};for(let w=0;ww.overscaledZ-g.overscaledZ)),u=l[l.length-1].overscaledZ,d=l[0].overscaledZ-u+1;if(this.clearStencil(),d>1){const g={},w={};for(let C=0;C0};for(const D in g){const O=g[D];O.used&&O.prepare(this.context),w[D]=O.getVisibleCoordinates(!1),C[D]=w[D].slice().reverse(),P[D]=O.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let D=0;Dthis.useProgram(D)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:i.showOverdrawInspector?s.bf.black:s.bf.transparent,depth:1}),this.clearStencil(),this.style.sky&&(function(D,O){const $=D.context,ee=$.gl,Q=((Pe,pe,Be)=>{const Qe=Math.cos(pe.rollInRadians),Ue=Math.sin(pe.rollInRadians),We=de(pe),Je=pe.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:Pe.properties.get("sky-color"),u_horizon_color:Pe.properties.get("horizon-color"),u_horizon:[(pe.width/2-We*Ue)*Be,(pe.height/2+We*Qe)*Be],u_horizon_normal:[-Ue,Qe],u_sky_horizon_blend:Pe.properties.get("sky-horizon-blend")*pe.height/2*Be,u_sky_blend:Je}})(O,D.style.map.transform,D.pixelRatio),ne=new $r(ee.LEQUAL,$r.ReadWrite,[0,1]),ue=cn.disabled,_e=D.colorModeForRenderPass(),he=D.useProgram("sky"),we=Gs($,O);he.draw($,ee.TRIANGLES,ne,ue,_e,Lr.disabled,Q,null,void 0,"sky",we.vertexBuffer,we.indexBuffer,we.segments)})(this,this.style.sky),this._showOverdrawInspector=i.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=d.length-1;this.currentLayer>=0;this.currentLayer--){const D=this.style._layers[d[this.currentLayer]],O=g[D.source],$=w[D.source];this._renderTileClippingMasks(D,$,!1),this.renderLayer(this,O,D,$,A)}this.renderPass="translucent";let R=!1;for(this.currentLayer=0;this.currentLayer({u_sun_pos:Je,u_atmosphere_blend:Nt,u_globe_position:Zt,u_globe_radius:Tt,u_inv_proj_matrix:mr}))(he,Pe,[Qe[0],Qe[1],Qe[2]],pe,Be),We=Gs(ee,O);ne.draw(ee,Q.TRIANGLES,ue,cn.disabled,zn.alphaBlended,Lr.disabled,Ue,null,null,"atmosphere",We.vertexBuffer,We.indexBuffer,We.segments)})(this,this.style.sky,this.style.light),this.options.showTileBoundaries){const D=(function(O,$){let ee=null;const Q=Object.values(O._layers).flatMap((he=>he.source&&!he.isHidden($)?[O.sourceCaches[he.source]]:[])),ne=Q.filter((he=>he.getSource().type==="vector")),ue=Q.filter((he=>he.getSource().type!=="vector")),_e=he=>{(!ee||ee.getSource().maxzoom_e(he))),ee||ue.forEach((he=>_e(he))),ee})(this.style,this.transform.zoom);D&&(function(O,$,ee){for(let Q=0;QQe.getElevation(Je,Hn,Kn):null;Wc(Zt,Ue,We,pe,Be,Jr,Bn,Tt,An,s.aD(Be,Nt,we,Pe),Je.toUnwrapped(),Ln)}}})(P,g,C,w,C.layout.get("text-rotation-alignment"),C.layout.get("text-pitch-alignment"),C.paint.get("text-translate"),C.paint.get("text-translate-anchor"),A),C.paint.get("icon-opacity").constantOr(1)!==0&&Vs(g,w,C,P,!1,C.paint.get("icon-translate"),C.paint.get("icon-translate-anchor"),C.layout.get("icon-rotation-alignment"),C.layout.get("icon-pitch-alignment"),C.layout.get("icon-keep-upright"),O,$,D),C.paint.get("text-opacity").constantOr(1)!==0&&Vs(g,w,C,P,!0,C.paint.get("text-translate"),C.paint.get("text-translate-anchor"),C.layout.get("text-rotation-alignment"),C.layout.get("text-pitch-alignment"),C.layout.get("text-keep-upright"),O,$,D),w.map.showCollisionBoxes&&(td(g,w,C,P,!0),td(g,w,C,P,!1))})(e,i,l,u,this.style.placement.variableOffsets,d):s.cc(l)?(function(g,w,C,P,A){if(g.renderPass!=="translucent")return;const{isRenderingToTexture:R}=A,D=C.paint.get("circle-opacity"),O=C.paint.get("circle-stroke-width"),$=C.paint.get("circle-stroke-opacity"),ee=!C.layout.get("circle-sort-key").isConstant();if(D.constantOr(1)===0&&(O.constantOr(1)===0||$.constantOr(1)===0))return;const Q=g.context,ne=Q.gl,ue=g.transform,_e=g.getDepthModeForSublayer(0,$r.ReadOnly),he=cn.disabled,we=g.colorModeForRenderPass(),Pe=[],pe=ue.getCircleRadiusCorrection();for(let Be=0;BeBe.sortKey-Qe.sortKey));for(const Be of Pe){const{programConfiguration:Qe,program:Ue,layoutVertexBuffer:We,indexBuffer:Je,uniformValues:Nt,terrainData:Zt,projectionData:Tt}=Be.state;Ue.draw(Q,ne.TRIANGLES,_e,he,we,Lr.backCCW,Nt,Zt,Tt,C.id,We,Je,Be.segments,C.paint,g.transform.zoom,Qe)}})(e,i,l,u,d):s.cd(l)?(function(g,w,C,P,A){if(C.paint.get("heatmap-opacity")===0)return;const R=g.context,{isRenderingToTexture:D,isRenderingGlobe:O}=A;if(g.style.map.terrain){for(const $ of P){const ee=w.getTile($);w.hasRenderableParent($)||(g.renderPass==="offscreen"?Xc(g,ee,C,$,O):g.renderPass==="translucent"&&nd(g,C,$,D,O))}R.viewport.set([0,0,g.width,g.height])}else g.renderPass==="offscreen"?(function($,ee,Q,ne){const ue=$.context,_e=ue.gl,he=$.transform,we=cn.disabled,Pe=new zn([_e.ONE,_e.ONE],s.bf.transparent,[!0,!0,!0,!0]);(function(pe,Be,Qe){const Ue=pe.gl;pe.activeTexture.set(Ue.TEXTURE1),pe.viewport.set([0,0,Be.width/4,Be.height/4]);let We=Qe.heatmapFbos.get(s.c2);We?(Ue.bindTexture(Ue.TEXTURE_2D,We.colorAttachment.get()),pe.bindFramebuffer.set(We.framebuffer)):(We=Zs(pe,Be.width/4,Be.height/4),Qe.heatmapFbos.set(s.c2,We))})(ue,$,Q),ue.clear({color:s.bf.transparent});for(let pe=0;pe0?i.pop():null}isPatternMissing(e){if(!e)return!1;if(!e.from||!e.to)return!0;const i=this.imageManager.getPattern(e.from.toString()),l=this.imageManager.getPattern(e.to.toString());return!i||!l}useProgram(e,i,l=!1,u=[]){this.cache=this.cache||{};const d=!!this.style.map.terrain,g=this.style.projection,w=l?Ur.projectionMercator:g.shaderPreludeCode,C=l?Cn:g.shaderDefine,P=e+(i?i.cacheKey:"")+`/${l?$n:g.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(d?"/terrain":"")+(u?`/${u.join("/")}`:"");return this.cache[P]||(this.cache[P]=new Dc(this.context,Ur[e],i,jc[e],this._showOverdrawInspector,d,w,C,u)),this.cache[P]}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 e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new s.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:e,drawingBufferHeight:i}=this.context.gl;return this.width!==e||this.height!==i}}function Oo(h,e){let i,l=!1,u=null,d=null;const g=()=>{u=null,l&&(h.apply(d,i),u=setTimeout(g,e),l=!1)};return(...w)=>(l=!0,d=this,i=w,u||g(),u)}class Fl{constructor(e){this._getCurrentHash=()=>{const i=window.location.hash.replace("#","");if(this._hashName){let l;return i.split("&").map((u=>u.split("="))).forEach((u=>{u[0]===this._hashName&&(l=u)})),(l&&l[1]||"").split("/")}return i.split("/")},this._onHashChange=()=>{const i=this._getCurrentHash();if(!this._isValidHash(i))return!1;const l=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(i[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+i[2],+i[1]],zoom:+i[0],bearing:l,pitch:+(i[4]||0)}),!0},this._updateHashUnthrottled=()=>{const i=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,i)},this._removeHash=()=>{const i=this._getCurrentHash();if(i.length===0)return;const l=i.join("/");let u=l;u.split("&").length>0&&(u=u.split("&")[0]),this._hashName&&(u=`${this._hashName}=${l}`);let d=window.location.hash.replace(u,"");d.startsWith("#&")?d=d.slice(0,1)+d.slice(2):d==="#"&&(d="");let g=window.location.href.replace(/(#.+)?$/,d);g=g.replace("&&","&"),window.history.replaceState(window.history.state,null,g)},this._updateHash=Oo(this._updateHashUnthrottled,300),this._hashName=e&&encodeURIComponent(e)}addTo(e){return this._map=e,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(e){const i=this._map.getCenter(),l=Math.round(100*this._map.getZoom())/100,u=Math.ceil((l*Math.LN2+Math.log(512/360/.5))/Math.LN10),d=Math.pow(10,u),g=Math.round(i.lng*d)/d,w=Math.round(i.lat*d)/d,C=this._map.getBearing(),P=this._map.getPitch();let A="";if(A+=e?`/${g}/${w}/${l}`:`${l}/${w}/${g}`,(C||P)&&(A+="/"+Math.round(10*C)/10),P&&(A+=`/${Math.round(P)}`),this._hashName){const R=this._hashName;let D=!1;const O=window.location.hash.slice(1).split("&").map(($=>{const ee=$.split("=")[0];return ee===R?(D=!0,`${ee}=${A}`):$})).filter(($=>$));return D||O.push(`${R}=${A}`),`#${O.join("&")}`}return`#${A}`}_isValidHash(e){if(e.length<3||e.some(isNaN))return!1;try{new s.S(+e[2],+e[1])}catch{return!1}const i=+e[0],l=+(e[3]||0),u=+(e[4]||0);return i>=this._map.getMinZoom()&&i<=this._map.getMaxZoom()&&l>=-180&&l<=180&&u>=this._map.getMinPitch()&&u<=this._map.getMaxPitch()}}const eo={linearity:.3,easing:s.cm(0,0,.3,1)},tu=s.e({deceleration:2500,maxSpeed:1400},eo),sd=s.e({deceleration:20,maxSpeed:1400},eo),ld=s.e({deceleration:1e3,maxSpeed:360},eo),cd=s.e({deceleration:1e3,maxSpeed:90},eo),ud=s.e({deceleration:1e3,maxSpeed:360},eo);class hd{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:ie.now(),settings:e})}_drainInertiaBuffer(){const e=this._inertiaBuffer,i=ie.now();for(;e.length>0&&i-e[0].time>160;)e.shift()}_onMoveEnd(e){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const i={zoom:0,bearing:0,pitch:0,roll:0,pan:new s.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:d}of this._inertiaBuffer)i.zoom+=d.zoomDelta||0,i.bearing+=d.bearingDelta||0,i.pitch+=d.pitchDelta||0,i.roll+=d.rollDelta||0,d.panDelta&&i.pan._add(d.panDelta),d.around&&(i.around=d.around),d.pinchAround&&(i.pinchAround=d.pinchAround);const l=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,u={};if(i.pan.mag()){const d=ns(i.pan.mag(),l,s.e({},tu,e||{})),g=i.pan.mult(d.amount/i.pan.mag()),w=this._map.cameraHelper.handlePanInertia(g,this._map.transform);u.center=w.easingCenter,u.offset=w.easingOffset,Ia(u,d)}if(i.zoom){const d=ns(i.zoom,l,sd);u.zoom=this._map.transform.zoom+d.amount,Ia(u,d)}if(i.bearing){const d=ns(i.bearing,l,ld);u.bearing=this._map.transform.bearing+s.ah(d.amount,-179,179),Ia(u,d)}if(i.pitch){const d=ns(i.pitch,l,cd);u.pitch=this._map.transform.pitch+d.amount,Ia(u,d)}if(i.roll){const d=ns(i.roll,l,ud);u.roll=this._map.transform.roll+s.ah(d.amount,-179,179),Ia(u,d)}if(u.zoom||u.bearing){const d=i.pinchAround===void 0?i.around:i.pinchAround;u.around=d?this._map.unproject(d):this._map.getCenter()}return this.clear(),s.e(u,{noMoveStart:!0})}}function Ia(h,e){(!h.duration||h.durationi.unproject(C))),w=d.reduce(((C,P,A,R)=>C.add(P.div(R.length))),new s.P(0,0));super(e,{points:d,point:w,lngLats:g,lngLat:i.unproject(w),originalEvent:l}),this._defaultPrevented=!1}}class ru extends s.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,i,l){super(e,{originalEvent:l}),this._defaultPrevented=!1}}class dd{constructor(e,i){this._map=e,this._clickTolerance=i.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new ru(e.type,this._map,e))}mousedown(e,i){return this._mousedownPos=i,this._firePreventable(new Qi(e.type,this._map,e))}mouseup(e){this._map.fire(new Qi(e.type,this._map,e))}click(e,i){this._mousedownPos&&this._mousedownPos.dist(i)>=this._clickTolerance||this._map.fire(new Qi(e.type,this._map,e))}dblclick(e){return this._firePreventable(new Qi(e.type,this._map,e))}mouseover(e){this._map.fire(new Qi(e.type,this._map,e))}mouseout(e){this._map.fire(new Qi(e.type,this._map,e))}touchstart(e){return this._firePreventable(new is(e.type,this._map,e))}touchmove(e){this._map.fire(new is(e.type,this._map,e))}touchend(e){this._map.fire(new is(e.type,this._map,e))}touchcancel(e){this._map.fire(new is(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class pd{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(e){this._map.fire(new Qi(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Qi("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new Qi(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class as{constructor(e){this._map=e}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(e){return this.transform.screenPointToLocation(s.P.convert(e),this._map.terrain)}}class nu{constructor(e,i){this._map=e,this._tr=new as(e),this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=i.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,i){this.isEnabled()&&e.shiftKey&&e.button===0&&(H.disableDrag(),this._startPos=this._lastPos=i,this._active=!0)}mousemoveWindow(e,i){if(!this._active)return;const l=i;if(this._lastPos.equals(l)||!this._box&&l.dist(this._startPos)d.fitScreenCoordinates(l,u,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",e)}keydown(e){this._active&&e.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(H.remove(this._box),this._box=null),H.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(e,i){return this._map.fire(new s.l(e,{originalEvent:i}))}}function os(h,e){if(h.length!==e.length)throw new Error(`The number of touches and points are not equal - touches ${h.length}, points ${e.length}`);const i={};for(let l=0;lthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=e.timeStamp),l.length===this.numTouches&&(this.centroid=(function(u){const d=new s.P(0,0);for(const g of u)d._add(g);return d.div(u.length)})(i),this.touches=os(l,i)))}touchmove(e,i,l){if(this.aborted||!this.centroid)return;const u=os(l,i);for(const d in this.touches){const g=u[d];(!g||g.dist(this.touches[d])>30)&&(this.aborted=!0)}}touchend(e,i,l){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),l.length===0){const u=!this.aborted&&this.centroid;if(this.reset(),u)return u}}}class ea{constructor(e){this.singleTap=new fd(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,i,l){this.singleTap.touchstart(e,i,l)}touchmove(e,i,l){this.singleTap.touchmove(e,i,l)}touchend(e,i,l){const u=this.singleTap.touchend(e,i,l);if(u){const d=e.timeStamp-this.lastTime<500,g=!this.lastTap||this.lastTap.dist(u)<30;if(d&&g||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=u,this.count===this.numTaps)return this.reset(),u}}}class Ma{constructor(e){this._tr=new as(e),this._zoomIn=new ea({numTouches:1,numTaps:2}),this._zoomOut=new ea({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,i,l){this._zoomIn.touchstart(e,i,l),this._zoomOut.touchstart(e,i,l)}touchmove(e,i,l){this._zoomIn.touchmove(e,i,l),this._zoomOut.touchmove(e,i,l)}touchend(e,i,l){const u=this._zoomIn.touchend(e,i,l),d=this._zoomOut.touchend(e,i,l),g=this._tr;return u?(this._active=!0,e.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:w=>w.easeTo({duration:300,zoom:g.zoom+1,around:g.unproject(u)},{originalEvent:e})}):d?(this._active=!0,e.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:w=>w.easeTo({duration:300,zoom:g.zoom-1,around:g.unproject(d)},{originalEvent:e})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ss{constructor(e){this._enabled=!!e.enable,this._moveStateManager=e.moveStateManager,this._clickTolerance=e.clickTolerance||1,this._moveFunction=e.move,this._activateOnStart=!!e.activateOnStart,e.assignEvents(this),this.reset()}reset(e){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(e)}_move(...e){const i=this._moveFunction(...e);if(i.bearingDelta||i.pitchDelta||i.rollDelta||i.around||i.panDelta)return this._active=!0,i}dragStart(e,i){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(e)&&(this._moveStateManager.startMove(e),this._lastPoint=Array.isArray(i)?i[0]:i,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(e,i){if(!this.isEnabled())return;const l=this._lastPoint;if(!l)return;if(e.preventDefault(),!this._moveStateManager.isValidMoveEvent(e))return void this.reset(e);const u=Array.isArray(i)?i[0]:i;return!this._moved&&u.dist(l)!0}),i=new jp){this.mouseMoveStateManager=e,this.oneFingerTouchMoveStateManager=i}_executeRelevantHandler(e,i,l){return e instanceof MouseEvent?i(e):typeof TouchEvent<"u"&&e instanceof TouchEvent?l(e):void 0}startMove(e){this._executeRelevantHandler(e,(i=>this.mouseMoveStateManager.startMove(i)),(i=>this.oneFingerTouchMoveStateManager.startMove(i)))}endMove(e){this._executeRelevantHandler(e,(i=>this.mouseMoveStateManager.endMove(i)),(i=>this.oneFingerTouchMoveStateManager.endMove(i)))}isValidStartEvent(e){return this._executeRelevantHandler(e,(i=>this.mouseMoveStateManager.isValidStartEvent(i)),(i=>this.oneFingerTouchMoveStateManager.isValidStartEvent(i)))}isValidMoveEvent(e){return this._executeRelevantHandler(e,(i=>this.mouseMoveStateManager.isValidMoveEvent(i)),(i=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(i)))}isValidEndEvent(e){return this._executeRelevantHandler(e,(i=>this.mouseMoveStateManager.isValidEndEvent(i)),(i=>this.oneFingerTouchMoveStateManager.isValidEndEvent(i)))}}const Ws=h=>{h.mousedown=h.dragStart,h.mousemoveWindow=h.dragMove,h.mouseup=h.dragEnd,h.contextmenu=e=>{e.preventDefault()}};class Xs{constructor(e,i){this._clickTolerance=e.clickTolerance||1,this._map=i,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new s.P(0,0)}_shouldBePrevented(e){return e<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(e,i,l){return this._calculateTransform(e,i,l)}touchmove(e,i,l){if(this._active){if(!this._shouldBePrevented(l.length))return e.preventDefault(),this._calculateTransform(e,i,l);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",e)}}touchend(e,i,l){this._calculateTransform(e,i,l),this._active&&this._shouldBePrevented(l.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,i,l){l.length>0&&(this._active=!0);const u=os(l,i),d=new s.P(0,0),g=new s.P(0,0);let w=0;for(const P in u){const A=u[P],R=this._touches[P];R&&(d._add(A),g._add(A.sub(R)),w++,u[P]=A)}if(this._touches=u,this._shouldBePrevented(w)||!g.mag())return;const C=g.div(w);return this._sum._add(C),this._sum.mag()Math.abs(h.x)}class Nl extends Aa{constructor(e){super(),this._currentTouchCount=0,this._map=e}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(e,i,l){super.touchstart(e,i,l),this._currentTouchCount=l.length}_start(e){this._lastPoints=e,No(e[0].sub(e[1]))&&(this._valid=!1)}_move(e,i,l){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const u=e[0].sub(this._lastPoints[0]),d=e[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(u,d,l.timeStamp),this._valid?(this._lastPoints=e,this._active=!0,{pitchDelta:(u.y+d.y)/2*-.5}):void 0}gestureBeginsVertically(e,i,l){if(this._valid!==void 0)return this._valid;const u=e.mag()>=2,d=i.mag()>=2;if(!u&&!d)return;if(!u||!d)return this._firstMove===void 0&&(this._firstMove=l),l-this._firstMove<100&&void 0;const g=e.y>0==i.y>0;return No(e)&&No(i)&&g}}const un={panStep:100,bearingStep:15,pitchStep:10};class jl{constructor(e){this._tr=new as(e);const i=un;this._panStep=i.panStep,this._bearingStep=i.bearingStep,this._pitchStep=i.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let i=0,l=0,u=0,d=0,g=0;switch(e.keyCode){case 61:case 107:case 171:case 187:i=1;break;case 189:case 109:case 173:i=-1;break;case 37:e.shiftKey?l=-1:(e.preventDefault(),d=-1);break;case 39:e.shiftKey?l=1:(e.preventDefault(),d=1);break;case 38:e.shiftKey?u=1:(e.preventDefault(),g=-1);break;case 40:e.shiftKey?u=-1:(e.preventDefault(),g=1);break;default:return}return this._rotationDisabled&&(l=0,u=0),{cameraAnimation:w=>{const C=this._tr;w.easeTo({duration:300,easeId:"keyboardHandler",easing:qp,zoom:i?Math.round(C.zoom)+i*(e.shiftKey?2:1):C.zoom,bearing:C.bearing+l*this._bearingStep,pitch:C.pitch+u*this._pitchStep,offset:[-d*this._panStep,-g*this._panStep],center:C.center},{originalEvent:e})}}}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 qp(h){return h*(2-h)}const Vl=4.000244140625,Zp=1/450;class md{constructor(e,i){this._onTimeout=l=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(l)},this._map=e,this._tr=new as(e),this._triggerRenderFrame=i,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=Zp}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&e.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(e){return!!this._map.cooperativeGestures.isEnabled()&&!(e.ctrlKey||this._map.cooperativeGestures.isBypassed(e))}wheel(e){if(!this.isEnabled())return;if(this._shouldBePrevented(e))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",e);let i=e.deltaMode===WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY;const l=ie.now(),u=l-(this._lastWheelEventTime||0);this._lastWheelEventTime=l,i!==0&&i%Vl==0?this._type="wheel":i!==0&&Math.abs(i)<4?this._type="trackpad":u>400?(this._type=null,this._lastValue=i,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(u*i)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,i+=this._lastValue)),e.shiftKey&&i&&(i/=4),this._type&&(this._lastWheelEvent=e,this._delta-=i,this._active||this._start(e)),e.preventDefault()}_start(e){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const i=H.mousePos(this._map.getCanvas(),e),l=this._tr;this._aroundPoint=this._aroundCenter?l.transform.locationToScreenPoint(s.S.convert(l.center)):i,this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const e=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){const w=e.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=w),typeof this._targetZoom=="number"&&(this._targetZoom+=w)}if(this._delta!==0){const w=this._type==="wheel"&&Math.abs(this._delta)>Vl?this._wheelZoomRate:this._defaultZoomRate;let C=2/(1+Math.exp(-Math.abs(this._delta*w)));this._delta<0&&C!==0&&(C=1/C);const P=typeof this._targetZoom!="number"?e.scale:s.af(this._targetZoom);this._targetZoom=e.getConstrained(e.getCameraLngLat(),s.ak(P*C)).zoom,this._type==="wheel"&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const i=typeof this._targetZoom!="number"?e.zoom:this._targetZoom,l=this._startZoom,u=this._easing;let d,g=!1;if(this._type==="wheel"&&l&&u){const w=ie.now()-this._lastWheelEventTime,C=Math.min((w+5)/200,1),P=u(C);d=s.C.number(l,i,P),C<1?this._frameId||(this._frameId=!0):g=!0}else d=i,g=!0;return this._active=!0,g&&(this._active=!1,this._finishTimeout=setTimeout((()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout}),200)),this._lastExpectedZoom=d,{noInertia:!0,needsRenderFrame:!g,zoomDelta:d-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let i=s.co;if(this._prevEase){const l=this._prevEase,u=(ie.now()-l.start)/l.duration,d=l.easing(u+.01)-l.easing(u),g=.27/Math.sqrt(d*d+1e-4)*.01,w=Math.sqrt(.0729-g*g);i=s.cm(g,w,.25,1)}return this._prevEase={start:ie.now(),duration:e,easing:i},i}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class ou{constructor(e,i){this._clickZoom=e,this._tapZoom=i}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 su{constructor(e){this._tr=new as(e),this.reset()}reset(){this._active=!1}dblclick(e,i){return e.preventDefault(),{cameraAnimation:l=>{l.easeTo({duration:300,zoom:this._tr.zoom+(e.shiftKey?-1:1),around:this._tr.unproject(i)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class _d{constructor(){this._tap=new ea({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(e,i,l){if(!this._swipePoint)if(this._tapTime){const u=i[0],d=e.timeStamp-this._tapTime<500,g=this._tapPoint.dist(u)<30;d&&g?l.length>0&&(this._swipePoint=u,this._swipeTouch=l[0].identifier):this.reset()}else this._tap.touchstart(e,i,l)}touchmove(e,i,l){if(this._tapTime){if(this._swipePoint){if(l[0].identifier!==this._swipeTouch)return;const u=i[0],d=u.y-this._swipePoint.y;return this._swipePoint=u,e.preventDefault(),this._active=!0,{zoomDelta:d/128}}}else this._tap.touchmove(e,i,l)}touchend(e,i,l){if(this._tapTime)this._swipePoint&&l.length===0&&this.reset();else{const u=this._tap.touchend(e,i,l);u&&(this._tapTime=e.timeStamp,this._tapPoint=u)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class gd{constructor(e,i,l){this._el=e,this._mousePan=i,this._touchPan=l}enable(e){this._inertiaOptions=e||{},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 lu{constructor(e,i,l,u){this._pitchWithRotate=e.pitchWithRotate,this._rollEnabled=e.rollEnabled,this._mouseRotate=i,this._mousePitch=l,this._mouseRoll=u}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 vd{constructor(e,i,l,u){this._el=e,this._touchZoom=i,this._touchRotate=l,this._tapDragZoom=u,this._rotationDisabled=!1,this._enabled=!0}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),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()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class yd{constructor(e,i){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=e,this._options=i,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const e=this._map.getCanvasContainer();e.classList.add("maplibregl-cooperative-gestures"),this._container=H.create("div","maplibregl-cooperative-gesture-screen",e);let i=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(i=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const l=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),u=document.createElement("div");u.className="maplibregl-desktop-message",u.textContent=i,this._container.appendChild(u);const d=document.createElement("div");d.className="maplibregl-mobile-message",d.textContent=l,this._container.appendChild(d),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(H.remove(this._container),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(e){return e[this._bypassKey]}notifyGestureBlocked(e,i){this._enabled&&(this._map.fire(new s.l("cooperativegestureprevented",{gestureType:e,originalEvent:i})),this._container.classList.add("maplibregl-show"),setTimeout((()=>{this._container.classList.remove("maplibregl-show")}),100))}}const Ea=h=>h.zoom||h.drag||h.roll||h.pitch||h.rotate;class Un extends s.l{}function us(h){return h.panDelta&&h.panDelta.mag()||h.zoomDelta||h.bearingDelta||h.pitchDelta||h.rollDelta}class cu{constructor(e,i){this.handleWindowEvent=u=>{this.handleEvent(u,`${u.type}Window`)},this.handleEvent=(u,d)=>{if(u.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const g=u.type==="renderFrame"?void 0:u,w={needsRenderFrame:!1},C={},P={};for(const{handlerName:D,handler:O,allowed:$}of this._handlers){if(!O.isEnabled())continue;let ee;if(this._blockedByActive(P,$,D))O.reset();else if(O[d||u.type]){if(s.cp(u,d||u.type)){const Q=H.mousePos(this._map.getCanvas(),u);ee=O[d||u.type](u,Q)}else if(s.cq(u,d||u.type)){const Q=this._getMapTouches(u.touches),ne=H.touchPos(this._map.getCanvas(),Q);ee=O[d||u.type](u,ne,Q)}else s.cr(d||u.type)||(ee=O[d||u.type](u));this.mergeHandlerResult(w,C,ee,D,g),ee&&ee.needsRenderFrame&&this._triggerRenderFrame()}(ee||O.isActive())&&(P[D]=O)}const A={};for(const D in this._previousActiveHandlers)P[D]||(A[D]=g);this._previousActiveHandlers=P,(Object.keys(A).length||us(w))&&(this._changes.push([w,C,A]),this._triggerRenderFrame()),(Object.keys(P).length||us(w))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:R}=w;R&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],R(this._map))},this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new hd(e),this._bearingSnap=i.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(i);const l=this._el;this._listeners=[[l,"touchstart",{passive:!0}],[l,"touchmove",{passive:!1}],[l,"touchend",void 0],[l,"touchcancel",void 0],[l,"mousedown",void 0],[l,"mousemove",void 0],[l,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[l,"mouseover",void 0],[l,"mouseout",void 0],[l,"dblclick",void 0],[l,"click",void 0],[l,"keydown",{capture:!1}],[l,"keyup",void 0],[l,"wheel",{passive:!1}],[l,"contextmenu",void 0],[window,"blur",void 0]];for(const[u,d,g]of this._listeners)H.addEventListener(u,d,u===document?this.handleWindowEvent:this.handleEvent,g)}destroy(){for(const[e,i,l]of this._listeners)H.removeEventListener(e,i,e===document?this.handleWindowEvent:this.handleEvent,l)}_addDefaultHandlers(e){const i=this._map,l=i.getCanvasContainer();this._add("mapEvent",new dd(i,e));const u=i.boxZoom=new nu(i,e);this._add("boxZoom",u),e.interactive&&e.boxZoom&&u.enable();const d=i.cooperativeGestures=new yd(i,e.cooperativeGestures);this._add("cooperativeGestures",d),e.cooperativeGestures&&d.enable();const g=new Ma(i),w=new su(i);i.doubleClickZoom=new ou(w,g),this._add("tapZoom",g),this._add("clickZoom",w),e.interactive&&e.doubleClickZoom&&i.doubleClickZoom.enable();const C=new _d;this._add("tapDragZoom",C);const P=i.touchPitch=new Nl(i);this._add("touchPitch",P),e.interactive&&e.touchPitch&&i.touchPitch.enable(e.touchPitch);const A=()=>i.project(i.getCenter()),R=(function({enable:he,clickTolerance:we,aroundCenter:Pe=!0,minPixelCenterThreshold:pe=100,rotateDegreesPerPixelMoved:Be=.8},Qe){const Ue=new Hs({checkCorrectEvent:We=>H.mouseButton(We)===0&&We.ctrlKey||H.mouseButton(We)===2&&!We.ctrlKey});return new ss({clickTolerance:we,move:(We,Je)=>{const Nt=Qe();if(Pe&&Math.abs(Nt.y-We.y)>pe)return{bearingDelta:s.cn(new s.P(We.x,Je.y),Je,Nt)};let Zt=(Je.x-We.x)*Be;return Pe&&Je.yH.mouseButton(Be)===0&&Be.ctrlKey||H.mouseButton(Be)===2});return new ss({clickTolerance:we,move:(Be,Qe)=>({pitchDelta:(Qe.y-Be.y)*Pe}),moveStateManager:pe,enable:he,assignEvents:Ws})})(e),O=(function({enable:he,clickTolerance:we,rollDegreesPerPixelMoved:Pe=.3},pe){const Be=new Hs({checkCorrectEvent:Qe=>H.mouseButton(Qe)===2&&Qe.ctrlKey});return new ss({clickTolerance:we,move:(Qe,Ue)=>{const We=pe();let Je=(Ue.x-Qe.x)*Pe;return Ue.yH.mouseButton(pe)===0&&!pe.ctrlKey});return new ss({clickTolerance:we,move:(pe,Be)=>({around:Be,panDelta:Be.sub(pe)}),activateOnStart:!0,moveStateManager:Pe,enable:he,assignEvents:Ws})})(e),ee=new Xs(e,i);i.dragPan=new gd(l,$,ee),this._add("mousePan",$),this._add("touchPan",ee,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&i.dragPan.enable(e.dragPan);const Q=new cs,ne=new Ol;i.touchZoomRotate=new vd(l,ne,Q,C),this._add("touchRotate",Q,["touchPan","touchZoom"]),this._add("touchZoom",ne,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&i.touchZoomRotate.enable(e.touchZoomRotate);const ue=i.scrollZoom=new md(i,(()=>this._triggerRenderFrame()));this._add("scrollZoom",ue,["mousePan"]),e.interactive&&e.scrollZoom&&i.scrollZoom.enable(e.scrollZoom);const _e=i.keyboard=new jl(i);this._add("keyboard",_e),e.interactive&&e.keyboard&&i.keyboard.enable(),this._add("blockableMapEvent",new pd(i))}_add(e,i,l){this._handlers.push({handlerName:e,handler:i,allowed:l}),this._handlersById[e]=i}stop(e){if(!this._updatingCamera){for(const{handler:i}of this._handlers)i.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[]}}isActive(){for(const{handler:e}of this._handlers)if(e.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Ea(this._eventsInProgress)||this.isZooming()}_blockedByActive(e,i,l){for(const u in e)if(u!==l&&(!i||i.indexOf(u)<0))return!0;return!1}_getMapTouches(e){const i=[];for(const l of e)this._el.contains(l.target)&&i.push(l);return i}mergeHandlerResult(e,i,l,u,d){if(!l)return;s.e(e,l);const g={handlerName:u,originalEvent:l.originalEvent||d};l.zoomDelta!==void 0&&(i.zoom=g),l.panDelta!==void 0&&(i.drag=g),l.rollDelta!==void 0&&(i.roll=g),l.pitchDelta!==void 0&&(i.pitch=g),l.bearingDelta!==void 0&&(i.rotate=g)}_applyChanges(){const e={},i={},l={};for(const[u,d,g]of this._changes)u.panDelta&&(e.panDelta=(e.panDelta||new s.P(0,0))._add(u.panDelta)),u.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+u.zoomDelta),u.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+u.bearingDelta),u.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+u.pitchDelta),u.rollDelta&&(e.rollDelta=(e.rollDelta||0)+u.rollDelta),u.around!==void 0&&(e.around=u.around),u.pinchAround!==void 0&&(e.pinchAround=u.pinchAround),u.noInertia&&(e.noInertia=u.noInertia),s.e(i,d),s.e(l,g);this._updateMapTransform(e,i,l),this._changes=[]}_updateMapTransform(e,i,l){const u=this._map,d=u._getTransformForUpdate(),g=u.terrain;if(!(us(e)||g&&this._terrainMovement))return this._fireEvents(i,l,!0);u._stop(!0);let{panDelta:w,zoomDelta:C,bearingDelta:P,pitchDelta:A,rollDelta:R,around:D,pinchAround:O}=e;O!==void 0&&(D=O),D=D||u.transform.centerPoint,g&&!d.isPointOnMapSurface(D)&&(D=d.centerPoint);const $={panDelta:w,zoomDelta:C,rollDelta:R,pitchDelta:A,bearingDelta:P,around:D};this._map.cameraHelper.useGlobeControls&&!d.isPointOnMapSurface(D)&&(D=d.centerPoint);const ee=D.distSqr(d.centerPoint)<.01?d.center:d.screenPointToLocation(w?D.sub(w):D);g?(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom($,d),this._terrainMovement||!i.drag&&!i.zoom?i.drag&&this._terrainMovement?d.setCenter(d.screenPointToLocation(d.centerPoint.sub(w))):this._map.cameraHelper.handleMapControlsPan($,d,ee):(this._terrainMovement=!0,this._map._elevationFreeze=!0,this._map.cameraHelper.handleMapControlsPan($,d,ee))):(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom($,d),this._map.cameraHelper.handleMapControlsPan($,d,ee)),u._applyUpdatedTransform(d),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(i,l,!0)}_fireEvents(e,i,l){const u=Ea(this._eventsInProgress),d=Ea(e),g={};for(const R in e){const{originalEvent:D}=e[R];this._eventsInProgress[R]||(g[`${R}start`]=D),this._eventsInProgress[R]=e[R]}!u&&d&&this._fireEvent("movestart",d.originalEvent);for(const R in g)this._fireEvent(R,g[R]);d&&this._fireEvent("move",d.originalEvent);for(const R in e){const{originalEvent:D}=e[R];this._fireEvent(R,D)}const w={};let C;for(const R in this._eventsInProgress){const{handlerName:D,originalEvent:O}=this._eventsInProgress[R];this._handlersById[D].isActive()||(delete this._eventsInProgress[R],C=i[D]||O,w[`${R}end`]=C)}for(const R in w)this._fireEvent(R,w[R]);const P=Ea(this._eventsInProgress),A=(u||d)&&!P;if(A&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const R=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&R.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(R)}if(l&&A){this._updatingCamera=!0;const R=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),D=O=>O!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Un("renderFrame",{timeStamp:e})),this._applyChanges()}))}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class xd extends s.E{constructor(e,i,l){super(),this._renderFrameCallback=()=>{const u=Math.min((ie.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(u)),u<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=e,this._bearingSnap=l.bearingSnap,this.cameraHelper=i,this.on("moveend",(()=>{delete this._requestedCameraState}))}migrateProjection(e,i){e.apply(this.transform),this.transform=e,this.cameraHelper=i}getCenter(){return new s.S(this.transform.center.lng,this.transform.center.lat)}setCenter(e,i){return this.jumpTo({center:e},i)}getCenterElevation(){return this.transform.elevation}setCenterElevation(e,i){return this.jumpTo({elevation:e},i),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(e){this._centerClampedToGround=e}panBy(e,i,l){return e=s.P.convert(e).mult(-1),this.panTo(this.transform.center,s.e({offset:e},i),l)}panTo(e,i,l){return this.easeTo(s.e({center:e},i),l)}getZoom(){return this.transform.zoom}setZoom(e,i){return this.jumpTo({zoom:e},i),this}zoomTo(e,i,l){return this.easeTo(s.e({zoom:e},i),l)}zoomIn(e,i){return this.zoomTo(this.getZoom()+1,e,i),this}zoomOut(e,i){return this.zoomTo(this.getZoom()-1,e,i),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(e,i){return e!=this.transform.fov&&(this.transform.setFov(e),this.fire(new s.l("movestart",i)).fire(new s.l("move",i)).fire(new s.l("moveend",i))),this}getBearing(){return this.transform.bearing}setBearing(e,i){return this.jumpTo({bearing:e},i),this}getPadding(){return this.transform.padding}setPadding(e,i){return this.jumpTo({padding:e},i),this}rotateTo(e,i,l){return this.easeTo(s.e({bearing:e},i),l)}resetNorth(e,i){return this.rotateTo(0,s.e({duration:1e3},e),i),this}resetNorthPitch(e,i){return this.easeTo(s.e({bearing:0,pitch:0,roll:0,duration:1e3},e),i),this}snapToNorth(e,i){return Math.abs(this.getBearing()){ee.easeFunc(Q),this.terrain&&!e.freezeElevation&&this._updateElevation(Q),this._applyUpdatedTransform(l),this._fireMoveEvents(i)}),(Q=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(i,Q)}),e),this}_prepareEase(e,i,l={}){this._moving=!0,i||l.moving||this.fire(new s.l("movestart",e)),this._zooming&&!l.zooming&&this.fire(new s.l("zoomstart",e)),this._rotating&&!l.rotating&&this.fire(new s.l("rotatestart",e)),this._pitching&&!l.pitching&&this.fire(new s.l("pitchstart",e)),this._rolling&&!l.rolling&&this.fire(new s.l("rollstart",e))}_prepareElevation(e){this._elevationCenter=e,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(e,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(e){this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));const i=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(e<1&&i!==this._elevationTarget){const l=this._elevationTarget-this._elevationStart;this._elevationStart+=e*(l-(i-(l*e+this._elevationStart))/(1-e)),this._elevationTarget=i}this.transform.setElevation(s.C.number(this._elevationStart,this._elevationTarget,e))}_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(e){if(!this.terrain&&e.elevation>=0&&e.pitch<=90)return{};const i=e.getCameraLngLat(),l=e.getCameraAltitude(),u=this.terrain?this.terrain.getElevationForLngLatZoom(i,e.zoom):0;if(lthis._elevateCameraIfInsideTerrain(u))),this.transformCameraUpdate&&i.push((u=>this.transformCameraUpdate(u))),!i.length)return;const l=e.clone();for(const u of i){const d=l.clone(),{center:g,zoom:w,roll:C,pitch:P,bearing:A,elevation:R}=u(d);g&&d.setCenter(g),R!==void 0&&d.setElevation(R),w!==void 0&&d.setZoom(w),C!==void 0&&d.setRoll(C),P!==void 0&&d.setPitch(P),A!==void 0&&d.setBearing(A),l.apply(d)}this.transform.apply(l)}_fireMoveEvents(e){this.fire(new s.l("move",e)),this._zooming&&this.fire(new s.l("zoom",e)),this._rotating&&this.fire(new s.l("rotate",e)),this._pitching&&this.fire(new s.l("pitch",e)),this._rolling&&this.fire(new s.l("roll",e))}_afterEase(e,i){if(this._easeId&&i&&this._easeId===i)return;delete this._easeId;const l=this._zooming,u=this._rotating,d=this._pitching,g=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,l&&this.fire(new s.l("zoomend",e)),u&&this.fire(new s.l("rotateend",e)),d&&this.fire(new s.l("pitchend",e)),g&&this.fire(new s.l("rollend",e)),this.fire(new s.l("moveend",e))}flyTo(e,i){if(!e.essential&&ie.prefersReducedMotion){const Je=s.Q(e,["center","zoom","bearing","pitch","roll","elevation"]);return this.jumpTo(Je,i)}this.stop(),e=s.e({offset:[0,0],speed:1.2,curve:1.42,easing:s.co},e);const l=this._getTransformForUpdate(),u=l.bearing,d=l.pitch,g=l.roll,w=l.padding,C="bearing"in e?this._normalizeBearing(e.bearing,u):u,P="pitch"in e?+e.pitch:d,A="roll"in e?this._normalizeBearing(e.roll,g):g,R="padding"in e?e.padding:l.padding,D=s.P.convert(e.offset);let O=l.centerPoint.add(D);const $=l.screenPointToLocation(O),ee=this.cameraHelper.handleFlyTo(l,{bearing:C,pitch:P,roll:A,padding:R,locationAtOffset:$,offsetAsPoint:D,center:e.center,minZoom:e.minZoom,zoom:e.zoom});let Q=e.curve;const ne=Math.max(l.width,l.height),ue=ne/ee.scaleOfZoom,_e=ee.pixelPathLength;typeof ee.scaleOfMinZoom=="number"&&(Q=Math.sqrt(ne/ee.scaleOfMinZoom/_e*2));const he=Q*Q;function we(Je){const Nt=(ue*ue-ne*ne+(Je?-1:1)*he*he*_e*_e)/(2*(Je?ue:ne)*he*_e);return Math.log(Math.sqrt(Nt*Nt+1)-Nt)}function Pe(Je){return(Math.exp(Je)-Math.exp(-Je))/2}function pe(Je){return(Math.exp(Je)+Math.exp(-Je))/2}const Be=we(!1);let Qe=function(Je){return pe(Be)/pe(Be+Q*Je)},Ue=function(Je){return ne*((pe(Be)*(Pe(Nt=Be+Q*Je)/pe(Nt))-Pe(Be))/he)/_e;var Nt},We=(we(!0)-Be)/Q;if(Math.abs(_e)<2e-6||!isFinite(We)){if(Math.abs(ne-ue)<1e-6)return this.easeTo(e,i);const Je=ue0,Qe=Nt=>Math.exp(Je*Q*Nt)}return e.duration="duration"in e?+e.duration:1e3*We/("screenSpeed"in e?+e.screenSpeed/Q:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=u!==C,this._pitching=P!==d,this._rolling=A!==g,this._padding=!l.isPaddingEqual(R),this._prepareEase(i,!1),this.terrain&&this._prepareElevation(ee.targetCenter),this._ease((Je=>{const Nt=Je*We,Zt=1/Qe(Nt),Tt=Ue(Nt);this._rotating&&l.setBearing(s.C.number(u,C,Je)),this._pitching&&l.setPitch(s.C.number(d,P,Je)),this._rolling&&l.setRoll(s.C.number(g,A,Je)),this._padding&&(l.interpolatePadding(w,R,Je),O=l.centerPoint.add(D)),ee.easeFunc(Je,Zt,Tt,O),this.terrain&&!e.freezeElevation&&this._updateElevation(Je),this._applyUpdatedTransform(l),this._fireMoveEvents(i)}),(()=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(i)}),e),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(e,i){var l;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const u=this._onEaseEnd;delete this._onEaseEnd,u.call(this,i)}return e||(l=this.handlers)===null||l===void 0||l.stop(!1),this}_ease(e,i,l){l.animate===!1||l.duration===0?(e(1),i()):(this._easeStart=ie.now(),this._easeOptions=l,this._onEaseFrame=e,this._onEaseEnd=i,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(e,i){e=s.aO(e,-180,180);const l=Math.abs(e-i);return Math.abs(e-360-i)MapLibre'};class hu{constructor(e=uu){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=i=>{!i||i.sourceDataType!=="metadata"&&i.sourceDataType!=="visibility"&&i.dataType!=="style"&&i.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=e}getDefaultPosition(){return"bottom-right"}onAdd(e){return this._map=e,this._compact=this.options.compact,this._container=H.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=H.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=H.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(){H.remove(this._container),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(e,i){const l=this._map._getUIString(`AttributionControl.${i}`);e.title=l,e.setAttribute("aria-label",l)}_updateAttributions(){if(!this._map.style)return;let e=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map((u=>typeof u!="string"?"":u))):typeof this.options.customAttribution=="string"&&e.push(this.options.customAttribution)),this._map.style.stylesheet){const u=this._map.style.stylesheet;this.styleOwner=u.owner,this.styleId=u.id}const i=this._map.style.sourceCaches;for(const u in i){const d=i[u];if(d.used||d.usedForTerrain){const g=d.getSource();g.attribution&&e.indexOf(g.attribution)<0&&e.push(g.attribution)}}e=e.filter((u=>String(u).trim())),e.sort(((u,d)=>u.length-d.length)),e=e.filter(((u,d)=>{for(let g=d+1;g=0)return!1;return!0}));const l=e.join(" | ");l!==this._attribHTML&&(this._attribHTML=l,e.length?(this._innerContainer.innerHTML=H.sanitize(l),this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class bd{constructor(e={}){this._updateCompact=()=>{const i=this._container.children;if(i.length){const l=i[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&l.classList.add("maplibregl-compact"):l.classList.remove("maplibregl-compact")}},this.options=e}getDefaultPosition(){return"bottom-left"}onAdd(e){this._map=e,this._compact=this.options&&this.options.compact,this._container=H.create("div","maplibregl-ctrl");const i=H.create("a","maplibregl-ctrl-logo");return i.target="_blank",i.rel="noopener nofollow",i.href="https://maplibre.org/",i.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),i.setAttribute("rel","noopener nofollow"),this._container.appendChild(i),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){H.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class $a{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){const i=++this._id;return this._queue.push({callback:e,id:i,cancelled:!1}),i}remove(e){const i=this._currentlyRunning,l=i?this._queue.concat(i):this._queue;for(const u of l)if(u.id===e)return void(u.cancelled=!0)}run(e=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const i=this._currentlyRunning=this._queue;this._queue=[];for(const l of i)if(!l.cancelled&&(l.callback(e),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var ql=s.aJ([{name:"a_pos3d",type:"Int16",components:3}]);class yr extends s.E{constructor(e){super(),this._lastTilesetChange=ie.now(),this.sourceCache=e,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=e._source.tileSize*2**this.deltaZoom,e.usedForTerrain=!0,e.tileSize=this.tileSize}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(e,i){this.sourceCache.update(e,i),this._renderableTilesKeys=[];const l={};for(const u of xe(e,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:i,calculateTileZoom:this.sourceCache._source.calculateTileZoom}))l[u.key]=!0,this._renderableTilesKeys.push(u.key),this._tiles[u.key]||(u.terrainRttPosMatrix32f=new Float64Array(16),s.bY(u.terrainRttPosMatrix32f,0,s.$,s.$,0,0,1),this._tiles[u.key]=new Zr(u,this.tileSize),this._lastTilesetChange=ie.now());for(const u in this._tiles)l[u]||delete this._tiles[u]}freeRtt(e){for(const i in this._tiles){const l=this._tiles[i];(!e||l.tileID.equals(e)||l.tileID.isChildOf(e)||e.isChildOf(l.tileID))&&(l.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map((e=>this.getTileByID(e)))}getTileByID(e){return this._tiles[e]}getTerrainCoords(e,i){return i?this._getTerrainCoordsForTileRanges(e,i):this._getTerrainCoordsForRegularTile(e)}_getTerrainCoordsForRegularTile(e){const i={};for(const l of this._renderableTilesKeys){const u=this._tiles[l].tileID,d=e.clone(),g=s.ba();if(u.canonical.equals(e.canonical))s.bY(g,0,s.$,s.$,0,0,1);else if(u.canonical.isChildOf(e.canonical)){const w=u.canonical.z-e.canonical.z,C=u.canonical.x-(u.canonical.x>>w<>w<>w;s.bY(g,0,A,A,0,0,1),s.M(g,g,[-C*A,-P*A,0])}else{if(!e.canonical.isChildOf(u.canonical))continue;{const w=e.canonical.z-u.canonical.z,C=e.canonical.x-(e.canonical.x>>w<>w<>w;s.bY(g,0,s.$,s.$,0,0,1),s.M(g,g,[C*A,P*A,0]),s.N(g,g,[1/2**w,1/2**w,0])}}d.terrainRttPosMatrix32f=new Float32Array(g),i[l]=d}return i}_getTerrainCoordsForTileRanges(e,i){const l={};for(const u of this._renderableTilesKeys){const d=this._tiles[u].tileID;if(!this._isWithinTileRanges(d,i))continue;const g=e.clone(),w=s.ba();if(d.canonical.z===e.canonical.z){const C=e.canonical.x-d.canonical.x,P=e.canonical.y-d.canonical.y;s.bY(w,0,s.$,s.$,0,0,1),s.M(w,w,[C*s.$,P*s.$,0])}else if(d.canonical.z>e.canonical.z){const C=d.canonical.z-e.canonical.z,P=d.canonical.x-(d.canonical.x>>C<>C<>C),D=e.canonical.y-(d.canonical.y>>C),O=s.$>>C;s.bY(w,0,O,O,0,0,1),s.M(w,w,[-P*O+R*s.$,-A*O+D*s.$,0])}else{const C=e.canonical.z-d.canonical.z,P=e.canonical.x-(e.canonical.x>>C<>C<>C)-d.canonical.x,D=(e.canonical.y>>C)-d.canonical.y,O=s.$<l.maxzoom&&(u=l.maxzoom),u=l.minzoom&&(!d||!d.dem);)d=this.sourceCache.getTileByID(e.scaledTo(u--).key);return d}anyTilesAfterTime(e=Date.now()){return this._lastTilesetChange>=e}_isWithinTileRanges(e,i){return i[e.canonical.z]&&e.canonical.x>=i[e.canonical.z].minTileX&&e.canonical.x<=i[e.canonical.z].maxTileX&&e.canonical.y>=i[e.canonical.z].minTileY&&e.canonical.y<=i[e.canonical.z].maxTileY}}class Or{constructor(e,i,l){this._meshCache={},this.painter=e,this.sourceCache=new yr(i),this.options=l,this.exaggeration=typeof l.exaggeration=="number"?l.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(e,i,l,u=s.$){var d;if(!(i>=0&&i=0&&le.canonical.z&&(e.canonical.z>=u?d=e.canonical.z-u:s.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const g=e.canonical.x-(e.canonical.x>>d<>d<>8<<4|d>>8,i[g+3]=0;const l=new s.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(i.buffer)),u=new s.T(e,l,e.gl.RGBA,{premultiply:!1});return u.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._coordsTexture=u,u}pointCoordinate(e){this.painter.maybeDrawDepthAndCoords(!0);const i=new Uint8Array(4),l=this.painter.context,u=l.gl,d=Math.round(e.x*this.painter.pixelRatio/devicePixelRatio),g=Math.round(e.y*this.painter.pixelRatio/devicePixelRatio),w=Math.round(this.painter.height/devicePixelRatio);l.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),u.readPixels(d,w-g-1,1,1,u.RGBA,u.UNSIGNED_BYTE,i),l.bindFramebuffer.set(null);const C=i[0]+(i[2]>>4<<8),P=i[1]+((15&i[2])<<8),A=this.coordsIndex[255-i[3]],R=A&&this.sourceCache.getTileByID(A);if(!R)return null;const D=this._coordsTextureSize,O=(1<0,u=l&&e.canonical.y===0,d=l&&e.canonical.y===(1<e.id!==i)),this._recentlyUsed.push(e.id)}stampObject(e){e.stamp=++this._stamp}getOrCreateFreeObject(){for(const i of this._recentlyUsed)if(!this._objects[i].inUse)return this._objects[i];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const e=this._createObject(this._objects.length);return this._objects.push(e),e}freeObject(e){e.inUse=!1}freeAllObjects(){for(const e of this._objects)this.freeObject(e)}isFull(){return!(this._objects.length!e.inUse))===!1}}const _o={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class Ul{constructor(e,i){this.painter=e,this.terrain=i,this.pool=new Zl(e.context,30,i.sourceCache.tileSize*i.qualityFactor)}destruct(){this.pool.destruct()}getTexture(e){return this.pool.getObjectForId(e.rtt[this._stacks.length-1].id).texture}prepareForRender(e,i){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=e._order.filter((l=>!e._layers[l].isHidden(i))),this._coordsAscending={};for(const l in e.sourceCaches){this._coordsAscending[l]={};const u=e.sourceCaches[l].getVisibleCoordinates(),d=e.sourceCaches[l].getSource(),g=d instanceof Ot?d.terrainTileRanges:null;for(const w of u){const C=this.terrain.sourceCache.getTerrainCoords(w,g);for(const P in C)this._coordsAscending[l][P]||(this._coordsAscending[l][P]=[]),this._coordsAscending[l][P].push(C[P])}}this._coordsAscendingStr={};for(const l of e._order){const u=e._layers[l],d=u.source;if(_o[u.type]&&!this._coordsAscendingStr[d]){this._coordsAscendingStr[d]={};for(const g in this._coordsAscending[d])this._coordsAscendingStr[d][g]=this._coordsAscending[d][g].map((w=>w.key)).sort().join()}}for(const l of this._renderableTiles)for(const u in this._coordsAscendingStr){const d=this._coordsAscendingStr[u][l.tileID.key];d&&d!==l.rttCoords[u]&&(l.rtt=[])}}renderLayer(e,i){if(e.isHidden(this.painter.transform.zoom))return!1;const l=Object.assign(Object.assign({},i),{isRenderingToTexture:!0}),u=e.type,d=this.painter,g=this._renderableLayerIds[this._renderableLayerIds.length-1]===e.id;if(_o[u]&&(this._prevType&&_o[this._prevType]||this._stacks.push([]),this._prevType=u,this._stacks[this._stacks.length-1].push(e.id),!g))return!0;if(_o[this._prevType]||_o[u]&&g){this._prevType=u;const w=this._stacks.length-1,C=this._stacks[w]||[];for(const P of this._renderableTiles){if(this.pool.isFull()&&(Bl(this.painter,this.terrain,this._rttTiles,l),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(P),P.rtt[w]){const R=this.pool.getObjectForId(P.rtt[w].id);if(R.stamp===P.rtt[w].stamp){this.pool.useObject(R);continue}}const A=this.pool.getOrCreateFreeObject();this.pool.useObject(A),this.pool.stampObject(A),P.rtt[w]={id:A.id,stamp:A.stamp},d.context.bindFramebuffer.set(A.fbo.framebuffer),d.context.clear({color:s.bf.transparent,stencil:0}),d.currentStencilSource=void 0;for(let R=0;R{this.startMove(d,H.mousePos(this.element,d)),H.addEventListener(window,"mousemove",this.mousemove),H.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=d=>{this.move(d,H.mousePos(this.element,d))},this.mouseup=d=>{this._rotatePitchHandler.dragEnd(d),this.offTemp()},this.touchstart=d=>{d.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=H.touchPos(this.element,d.targetTouches)[0],this.startMove(d,this._startPos),H.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),H.addEventListener(window,"touchend",this.touchend))},this.touchmove=d=>{d.targetTouches.length!==1?this.reset():(this._lastPos=H.touchPos(this.element,d.targetTouches)[0],this.move(d,this._lastPos))},this.touchend=d=>{d.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this._rotatePitchHandler.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=i;const u=new Vp;this._rotatePitchHandler=new ss({clickTolerance:3,move:(d,g)=>{const w=i.getBoundingClientRect(),C=new s.P((w.bottom-w.top)/2,(w.right-w.left)/2);return{bearingDelta:s.cn(new s.P(d.x,g.y),g,C),pitchDelta:l?-.5*(g.y-d.y):void 0}},moveStateManager:u,enable:!0,assignEvents:()=>{}}),this.map=e,H.addEventListener(i,"mousedown",this.mousedown),H.addEventListener(i,"touchstart",this.touchstart,{passive:!1}),H.addEventListener(i,"touchcancel",this.reset)}startMove(e,i){this._rotatePitchHandler.dragStart(e,i),H.disableDrag()}move(e,i){const l=this.map,{bearingDelta:u,pitchDelta:d}=this._rotatePitchHandler.dragMove(e,i)||{};u&&l.setBearing(l.getBearing()+u),d&&l.setPitch(l.getPitch()+d)}off(){const e=this.element;H.removeEventListener(e,"mousedown",this.mousedown),H.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),H.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),H.removeEventListener(window,"touchend",this.touchend),H.removeEventListener(e,"touchcancel",this.reset),this.offTemp()}offTemp(){H.enableDrag(),H.removeEventListener(window,"mousemove",this.mousemove),H.removeEventListener(window,"mouseup",this.mouseup),H.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),H.removeEventListener(window,"touchend",this.touchend)}}let Rn;function ti(h,e,i,l=!1){if(l||!i.getCoveringTilesDetailsProvider().allowWorldCopies())return h==null?void 0:h.wrap();const u=new s.S(h.lng,h.lat);if(h=new s.S(h.lng,h.lat),e){const d=new s.S(h.lng-360,h.lat),g=new s.S(h.lng+360,h.lat),w=i.locationToScreenPoint(h).distSqr(e);i.locationToScreenPoint(d).distSqr(e)180;){const d=i.locationToScreenPoint(h);if(d.x>=0&&d.y>=0&&d.x<=i.width&&d.y<=i.height)break;h.lng>i.center.lng?h.lng-=360:h.lng+=360}return h.lng!==u.lng&&i.isPointOnMapSurface(i.locationToScreenPoint(h))?h:u}const $l={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 hs(h,e,i){const l=h.classList;for(const u in $l)l.remove(`maplibregl-${i}-anchor-${u}`);l.add(`maplibregl-${i}-anchor-${e}`)}class ds extends s.E{constructor(e){if(super(),this._onKeyPress=i=>{const l=i.code,u=i.charCode||i.keyCode;l!=="Space"&&l!=="Enter"&&u!==32&&u!==13||this.togglePopup()},this._onMapClick=i=>{const l=i.originalEvent.target,u=this._element;this._popup&&(l===u||u.contains(l))&&this.togglePopup()},this._update=i=>{if(!this._map)return;const l=this._map.loaded()&&!this._map.isMoving();((i==null?void 0:i.type)==="terrain"||(i==null?void 0:i.type)==="render"&&!l)&&this._map.once("render",this._update),this._lngLat=ti(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 u="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?u=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(u=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let d="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?d="rotateX(0deg)":this._pitchAlignment==="map"&&(d=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||i&&i.type!=="moveend"||(this._pos=this._pos.round()),H.setTransform(this._element,`${$l[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${d} ${u}`),ie.frameAsync(new AbortController).then((()=>{this._updateOpacity(i&&i.type==="moveend")})).catch((()=>{}))},this._onMove=i=>{if(!this._isDragging){const l=this._clickTolerance||this._map._clickTolerance;this._isDragging=i.point.dist(this._pointerdownPos)>=l}this._isDragging&&(this._pos=i.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 s.l("dragstart"))),this.fire(new s.l("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 s.l("dragend")),this._state="inactive"},this._addDragHandler=i=>{this._element.contains(i.originalEvent.target)&&(i.preventDefault(),this._positionDelta=i.point.sub(this._pos).add(this._offset),this._pointerdownPos=i.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=e&&e.anchor||"center",this._color=e&&e.color||"#3FB1CE",this._scale=e&&e.scale||1,this._draggable=e&&e.draggable||!1,this._clickTolerance=e&&e.clickTolerance||0,this._subpixelPositioning=e&&e.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=e&&e.rotation||0,this._rotationAlignment=e&&e.rotationAlignment||"auto",this._pitchAlignment=e&&e.pitchAlignment&&e.pitchAlignment!=="auto"?e.pitchAlignment:this._rotationAlignment,this.setOpacity(e==null?void 0:e.opacity,e==null?void 0:e.opacityWhenCovered),e&&e.element)this._element=e.element,this._offset=s.P.convert(e&&e.offset||[0,0]);else{this._defaultMarker=!0,this._element=H.create("div");const i=H.createNS("http://www.w3.org/2000/svg","svg"),l=41,u=27;i.setAttributeNS(null,"display","block"),i.setAttributeNS(null,"height",`${l}px`),i.setAttributeNS(null,"width",`${u}px`),i.setAttributeNS(null,"viewBox",`0 0 ${u} ${l}`);const d=H.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,"stroke","none"),d.setAttributeNS(null,"stroke-width","1"),d.setAttributeNS(null,"fill","none"),d.setAttributeNS(null,"fill-rule","evenodd");const g=H.createNS("http://www.w3.org/2000/svg","g");g.setAttributeNS(null,"fill-rule","nonzero");const w=H.createNS("http://www.w3.org/2000/svg","g");w.setAttributeNS(null,"transform","translate(3.0, 29.0)"),w.setAttributeNS(null,"fill","#000000");const C=[{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 ne of C){const ue=H.createNS("http://www.w3.org/2000/svg","ellipse");ue.setAttributeNS(null,"opacity","0.04"),ue.setAttributeNS(null,"cx","10.5"),ue.setAttributeNS(null,"cy","5.80029008"),ue.setAttributeNS(null,"rx",ne.rx),ue.setAttributeNS(null,"ry",ne.ry),w.appendChild(ue)}const P=H.createNS("http://www.w3.org/2000/svg","g");P.setAttributeNS(null,"fill",this._color);const A=H.createNS("http://www.w3.org/2000/svg","path");A.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"),P.appendChild(A);const R=H.createNS("http://www.w3.org/2000/svg","g");R.setAttributeNS(null,"opacity","0.25"),R.setAttributeNS(null,"fill","#000000");const D=H.createNS("http://www.w3.org/2000/svg","path");D.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"),R.appendChild(D);const O=H.createNS("http://www.w3.org/2000/svg","g");O.setAttributeNS(null,"transform","translate(6.0, 7.0)"),O.setAttributeNS(null,"fill","#FFFFFF");const $=H.createNS("http://www.w3.org/2000/svg","g");$.setAttributeNS(null,"transform","translate(8.0, 8.0)");const ee=H.createNS("http://www.w3.org/2000/svg","circle");ee.setAttributeNS(null,"fill","#000000"),ee.setAttributeNS(null,"opacity","0.25"),ee.setAttributeNS(null,"cx","5.5"),ee.setAttributeNS(null,"cy","5.5"),ee.setAttributeNS(null,"r","5.4999962");const Q=H.createNS("http://www.w3.org/2000/svg","circle");Q.setAttributeNS(null,"fill","#FFFFFF"),Q.setAttributeNS(null,"cx","5.5"),Q.setAttributeNS(null,"cy","5.5"),Q.setAttributeNS(null,"r","5.4999962"),$.appendChild(ee),$.appendChild(Q),g.appendChild(w),g.appendChild(P),g.appendChild(R),g.appendChild(O),g.appendChild($),i.appendChild(g),i.setAttributeNS(null,"height",l*this._scale+"px"),i.setAttributeNS(null,"width",u*this._scale+"px"),this._element.appendChild(i),this._offset=s.P.convert(e&&e.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",(i=>{i.preventDefault()})),this._element.addEventListener("mousedown",(i=>{i.preventDefault()})),hs(this._element,this._anchor,"marker"),e&&e.className)for(const i of e.className.split(" "))this._element.classList.add(i);this._popup=null}addTo(e){return this.remove(),this._map=e,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",e._getUIString("Marker.Title")),e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),e.on("terrain",this._update),e.on("projectiontransition",this._update),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),H.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=s.S.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),e){if(!("offset"in e.options)){const u=Math.abs(13.5)/Math.SQRT2;e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[u,-1*(38.1-13.5+u)],"bottom-right":[-u,-1*(38.1-13.5+u)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=e,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(e){return this._subpixelPositioning=e,this}getPopup(){return this._popup}togglePopup(){const e=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:e?(e.isOpen()?e.remove():(e.setLngLat(this._lngLat),e.addTo(this._map)),this):this}_updateOpacity(e=!1){var i,l;const u=(i=this._map)===null||i===void 0?void 0:i.terrain,d=this._map.transform.isLocationOccluded(this._lngLat);if(!u||d){const O=d?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==O&&(this._element.style.opacity=O))}if(e)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout((()=>{this._opacityTimeout=null}),100)}const g=this._map,w=g.terrain.depthAtPoint(this._pos),C=g.terrain.getElevationForLngLatZoom(this._lngLat,g.transform.tileZoom);if(g.transform.lngLatToCameraDepth(this._lngLat,C)-w<.006)return void(this._element.style.opacity=this._opacity);const P=-this._offset.y/g.transform.pixelsPerMeter,A=Math.sin(g.getPitch()*Math.PI/180)*P,R=g.terrain.depthAtPoint(new s.P(this._pos.x,this._pos.y-this._offset.y)),D=g.transform.lngLatToCameraDepth(this._lngLat,C+A)-R>.006;!((l=this._popup)===null||l===void 0)&&l.isOpen()&&D&&this._popup.remove(),this._element.style.opacity=D?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(e){return this._offset=s.P.convert(e),this._update(),this}addClassName(e){this._element.classList.add(e)}removeClassName(e){this._element.classList.remove(e)}toggleClassName(e){return this._element.classList.toggle(e)}setDraggable(e){return this._draggable=!!e,this._map&&(e?(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(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&e!=="auto"?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(e,i){return(this._opacity===void 0||e===void 0&&i===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),e!==void 0&&(this._opacity=e),i!==void 0&&(this._opacityWhenCovered=i),this._map&&this._updateOpacity(!0),this}}const du={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let ps=0,jo=!1;const Ks={maxWidth:100,unit:"metric"};function Gl(h,e,i){const l=i&&i.maxWidth||100,u=h._container.clientHeight/2,d=h._container.clientWidth/2,g=h.unproject([d-l/2,u]),w=h.unproject([d+l/2,u]),C=Math.round(h.project(w).x-h.project(g).x),P=Math.min(l,C,h._container.clientWidth),A=g.distanceTo(w);if(i&&i.unit==="imperial"){const R=3.2808*A;R>5280?Vo(e,P,R/5280,h._getUIString("ScaleControl.Miles")):Vo(e,P,R,h._getUIString("ScaleControl.Feet"))}else i&&i.unit==="nautical"?Vo(e,P,A/1852,h._getUIString("ScaleControl.NauticalMiles")):A>=1e3?Vo(e,P,A/1e3,h._getUIString("ScaleControl.Kilometers")):Vo(e,P,A,h._getUIString("ScaleControl.Meters"))}function Vo(h,e,i,l){const u=(function(d){const g=Math.pow(10,`${Math.floor(d)}`.length-1);let w=d/g;return w=w>=10?10:w>=5?5:w>=3?3:w>=2?2:w>=1?1:(function(C){const P=Math.pow(10,Math.ceil(-Math.log(C)/Math.LN10));return Math.round(C*P)/P})(w),g*w})(i);h.style.width=e*(u/i)+"px",h.innerHTML=`${u} ${l}`}const pu={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0},fu=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Hl(h){if(h){if(typeof h=="number"){const e=Math.round(Math.abs(h)/Math.SQRT2);return{center:new s.P(0,0),top:new s.P(0,h),"top-left":new s.P(e,e),"top-right":new s.P(-e,e),bottom:new s.P(0,-h),"bottom-left":new s.P(e,-e),"bottom-right":new s.P(-e,-e),left:new s.P(h,0),right:new s.P(-h,0)}}if(h instanceof s.P||Array.isArray(h)){const e=s.P.convert(h);return{center:e,top:e,"top-left":e,"top-right":e,bottom:e,"bottom-left":e,"bottom-right":e,left:e,right:e}}return{center:s.P.convert(h.center||[0,0]),top:s.P.convert(h.top||[0,0]),"top-left":s.P.convert(h["top-left"]||[0,0]),"top-right":s.P.convert(h["top-right"]||[0,0]),bottom:s.P.convert(h.bottom||[0,0]),"bottom-left":s.P.convert(h["bottom-left"]||[0,0]),"bottom-right":s.P.convert(h["bottom-right"]||[0,0]),left:s.P.convert(h.left||[0,0]),right:s.P.convert(h.right||[0,0])}}return Hl(new s.P(0,0))}const mu=B;T.AJAXError=s.cz,T.Event=s.l,T.Evented=s.E,T.LngLat=s.S,T.MercatorCoordinate=s.a1,T.Point=s.P,T.addProtocol=s.cA,T.config=s.a,T.removeProtocol=s.cB,T.AttributionControl=hu,T.BoxZoomHandler=nu,T.CanvasSource=kr,T.CooperativeGesturesHandler=yd,T.DoubleClickZoomHandler=ou,T.DragPanHandler=gd,T.DragRotateHandler=lu,T.EdgeInsets=Mn,T.FullscreenControl=class extends s.E{constructor(h={}){super(),this._onFullscreenChange=()=>{var e;let i=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((e=i==null?void 0:i.shadowRoot)===null||e===void 0)&&e.fullscreenElement;)i=i.shadowRoot.fullscreenElement;i===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,h&&h.container&&(h.container instanceof HTMLElement?this._container=h.container:s.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(h){return this._map=h,this._container||(this._container=this._map.getContainer()),this._controlContainer=H.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){H.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const h=this._fullscreenButton=H.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);H.create("span","maplibregl-ctrl-icon",h).setAttribute("aria-hidden","true"),h.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const h=this._getTitle();this._fullscreenButton.setAttribute("aria-label",h),this._fullscreenButton.title=h}_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 s.l("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new s.l("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},T.GeoJSONSource=Qt,T.GeolocateControl=class extends s.E{constructor(h){super(),this._onSuccess=e=>{if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new s.l("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":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(e),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new s.l("geolocate",e)),this._finish()}},this._updateCamera=e=>{const i=new s.S(e.coords.longitude,e.coords.latitude),l=e.coords.accuracy,u=this._map.getBearing(),d=s.e({bearing:u},this.options.fitBoundsOptions),g=mt.fromLngLat(i,l);this._map.fitBounds(g,d,{geolocateSource:!0})},this._updateMarker=e=>{if(e){const i=new s.S(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(i).addTo(this._map),this._userLocationDotMarker.setLngLat(i).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=e=>{if(this._map){if(e.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 i=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(e.code===3&&jo)return;this.options.trackUserLocation&&this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new s.l("error",e)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",(e=>e.preventDefault())),this._geolocateButton=H.create("button","maplibregl-ctrl-geolocate",this._container),H.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=e=>{if(this._map){if(e===!1){s.w("Geolocation support is not available so the GeolocateControl will be disabled.");const i=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i)}else{const i=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=H.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new ds({element:this._dotElement}),this._circleElement=H.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new ds({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",(()=>this.trigger())),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(i=>{const l=(i==null?void 0:i[0])instanceof ResizeObserverEntry;i.geolocateSource||this._watchState!=="ACTIVE_LOCK"||l||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 s.l("trackuserlocationend")),this.fire(new s.l("userlocationlostfocus")))}))}},this.options=s.e({},du,h)}onAdd(h){return this._map=h,this._container=H.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return s._(this,arguments,void 0,(function*(e=!1){if(Rn!==void 0&&!e)return Rn;if(window.navigator.permissions===void 0)return Rn=!!window.navigator.geolocation,Rn;try{Rn=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Rn=!!window.navigator.geolocation}return Rn}))})().then((e=>this._finishSetupUI(e))),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(),H.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,ps=0,jo=!1}_isOutOfMapMaxBounds(h){const e=this._map.getMaxBounds(),i=h.coords;return e&&(i.longitudee.getEast()||i.latitudee.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",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":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const h=this._map.getBounds(),e=h.getSouthEast(),i=h.getNorthEast(),l=e.distanceTo(i),u=Math.ceil(this._accuracy/(l/this._map._container.clientHeight)*2);this._circleElement.style.width=`${u}px`,this._circleElement.style.height=`${u}px`}trigger(){if(!this._setup)return s.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 s.l("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":ps--,jo=!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 s.l("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 s.l("trackuserlocationstart")),this.fire(new s.l("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 h;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),ps++,ps>1?(h={maximumAge:6e5,timeout:0},jo=!0):(h=this.options.positionOptions,jo=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,h)}}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)}},T.GlobeControl=class{constructor(){this._toggleProjection=()=>{var h;const e=(h=this._map.getProjection())===null||h===void 0?void 0:h.type;this._map.setProjection(e!=="mercator"&&e?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var h;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((h=this._map.getProjection())===null||h===void 0?void 0:h.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(h){return this._map=h,this._container=H.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=H.create("button","maplibregl-ctrl-globe",this._container),H.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._container}onRemove(){H.remove(this._container),this._map.off("styledata",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},T.Hash=Fl,T.ImageSource=Ot,T.KeyboardHandler=jl,T.LngLatBounds=mt,T.LogoControl=bd,T.Map=class extends xd{constructor(h){var e,i;s.cw.mark(s.cx.create);const l=Object.assign(Object.assign(Object.assign({},xa),h),{canvasContextAttributes:Object.assign(Object.assign({},xa.canvasContextAttributes),h.canvasContextAttributes)});if(l.minZoom!=null&&l.maxZoom!=null&&l.minZoom>l.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(l.minPitch!=null&&l.maxPitch!=null&&l.minPitch>l.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(l.minPitch!=null&&l.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(l.maxPitch!=null&&l.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");const u=new an,d=new jn;if(l.minZoom!==void 0&&u.setMinZoom(l.minZoom),l.maxZoom!==void 0&&u.setMaxZoom(l.maxZoom),l.minPitch!==void 0&&u.setMinPitch(l.minPitch),l.maxPitch!==void 0&&u.setMaxPitch(l.maxPitch),l.renderWorldCopies!==void 0&&u.setRenderWorldCopies(l.renderWorldCopies),super(u,d,{bearingSnap:l.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new $a,this._controls=[],this._mapId=s.a7(),this._contextLost=w=>{w.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new s.l("webglcontextlost",{originalEvent:w}))},this._contextRestored=w=>{this._setupPainter(),this.resize(),this._update(),this.fire(new s.l("webglcontextrestored",{originalEvent:w}))},this._onMapScroll=w=>{if(w.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=l.interactive,this._maxTileCacheSize=l.maxTileCacheSize,this._maxTileCacheZoomLevels=l.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},l.canvasContextAttributes),this._trackResize=l.trackResize===!0,this._bearingSnap=l.bearingSnap,this._centerClampedToGround=l.centerClampedToGround,this._refreshExpiredTiles=l.refreshExpiredTiles===!0,this._fadeDuration=l.fadeDuration,this._crossSourceCollisions=l.crossSourceCollisions===!0,this._collectResourceTiming=l.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Zi),l.locale),this._clickTolerance=l.clickTolerance,this._overridePixelRatio=l.pixelRatio,this._maxCanvasSize=l.maxCanvasSize,this.transformCameraUpdate=l.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=l.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=Fe.addThrottleControl((()=>this.isMoving())),this._requestManager=new Ke(l.transformRequest),typeof l.container=="string"){if(this._container=document.getElementById(l.container),!this._container)throw new Error(`Container '${l.container}' not found.`)}else{if(!(l.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=l.container}if(l.maxBounds&&this.setMaxBounds(l.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.dirty=!0,this._update(!0)})),this.once("idle",(()=>{this._idleTriggered=!0})),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let w=!1;const C=Oo((P=>{this._trackResize&&!this._removed&&(this.resize(P),this.redraw())}),50);this._resizeObserver=new ResizeObserver((P=>{w?C(P):w=!0})),this._resizeObserver.observe(this._container)}this.handlers=new cu(this,l),this._hash=l.hash&&new Fl(typeof l.hash=="string"&&l.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:l.center,elevation:l.elevation,zoom:l.zoom,bearing:l.bearing,pitch:l.pitch,roll:l.roll}),l.bounds&&(this.resize(),this.fitBounds(l.bounds,s.e({},l.fitBoundsOptions,{duration:0}))));const g=typeof l.style=="string"||((i=(e=l.style)===null||e===void 0?void 0:e.projection)===null||i===void 0?void 0:i.type)!=="globe";this.resize(null,g),this._localIdeographFontFamily=l.localIdeographFontFamily,this._validateStyle=l.validateStyle,l.style&&this.setStyle(l.style,{localIdeographFontFamily:l.localIdeographFontFamily}),l.attributionControl&&this.addControl(new hu(typeof l.attributionControl=="boolean"?void 0:l.attributionControl)),l.maplibreLogo&&this.addControl(new bd,l.logoPosition),this.on("style.load",(()=>{if(g||this._resizeTransform(),this.transform.unmodified){const w=s.Q(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(w)}})),this.on("data",(w=>{this._update(w.dataType==="style"),this.fire(new s.l(`${w.dataType}data`,w))})),this.on("dataloading",(w=>{this.fire(new s.l(`${w.dataType}dataloading`,w))})),this.on("dataabort",(w=>{this.fire(new s.l("sourcedataabort",w))}))}_getMapId(){return this._mapId}setGlobalStateProperty(h,e){return this.style.setGlobalStateProperty(h,e),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(h,e){if(e===void 0&&(e=h.getDefaultPosition?h.getDefaultPosition():"top-right"),!h||!h.onAdd)return this.fire(new s.k(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const i=h.onAdd(this);this._controls.push(h);const l=this._controlPositions[e];return e.indexOf("bottom")!==-1?l.insertBefore(i,l.firstChild):l.appendChild(i),this}removeControl(h){if(!h||!h.onRemove)return this.fire(new s.k(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const e=this._controls.indexOf(h);return e>-1&&this._controls.splice(e,1),h.onRemove(this),this}hasControl(h){return this._controls.indexOf(h)>-1}calculateCameraOptionsFromTo(h,e,i,l){return l==null&&this.terrain&&(l=this.terrain.getElevationForLngLatZoom(i,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(h,e,i,l)}resize(h,e=!0){const[i,l]=this._containerDimensions(),u=this._getClampedPixelRatio(i,l);if(this._resizeCanvas(i,l,u),this.painter.resize(i,l,u),this.painter.overLimit()){const g=this.painter.context.gl;this._maxCanvasSize=[g.drawingBufferWidth,g.drawingBufferHeight];const w=this._getClampedPixelRatio(i,l);this._resizeCanvas(i,l,w),this.painter.resize(i,l,w)}this._resizeTransform(e);const d=!this._moving;return d&&(this.stop(),this.fire(new s.l("movestart",h)).fire(new s.l("move",h))),this.fire(new s.l("resize",h)),d&&this.fire(new s.l("moveend",h)),this}_resizeTransform(h=!0){var e;const[i,l]=this._containerDimensions();this.transform.resize(i,l,h),(e=this._requestedCameraState)===null||e===void 0||e.resize(i,l,h)}_getClampedPixelRatio(h,e){const{0:i,1:l}=this._maxCanvasSize,u=this.getPixelRatio(),d=h*u,g=e*u;return Math.min(d>i?i/d:1,g>l?l/g:1)*u}getPixelRatio(){var h;return(h=this._overridePixelRatio)!==null&&h!==void 0?h:devicePixelRatio}setPixelRatio(h){this._overridePixelRatio=h,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(h){return this.transform.setMaxBounds(mt.convert(h)),this._update()}setMinZoom(h){if((h=h??-2)>=-2&&h<=this.transform.maxZoom)return this.transform.setMinZoom(h),this._update(),this.getZoom()=this.transform.minZoom)return this.transform.setMaxZoom(h),this._update(),this.getZoom()>h&&this.setZoom(h),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(h){if((h=h??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(h>=0&&h<=this.transform.maxPitch)return this.transform.setMinPitch(h),this._update(),this.getPitch()180)throw new Error("maxPitch must be less than or equal to 180");if(h>=this.transform.minPitch)return this.transform.setMaxPitch(h),this._update(),this.getPitch()>h&&this.setPitch(h),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(h){return this.transform.setRenderWorldCopies(h),this._update()}project(h){return this.transform.locationToScreenPoint(s.S.convert(h),this.style&&this.terrain)}unproject(h){return this.transform.screenPointToLocation(s.P.convert(h),this.terrain)}isMoving(){var h;return this._moving||((h=this.handlers)===null||h===void 0?void 0:h.isMoving())}isZooming(){var h;return this._zooming||((h=this.handlers)===null||h===void 0?void 0:h.isZooming())}isRotating(){var h;return this._rotating||((h=this.handlers)===null||h===void 0?void 0:h.isRotating())}_createDelegatedListener(h,e,i){if(h==="mouseenter"||h==="mouseover"){let l=!1;return{layers:e,listener:i,delegates:{mousemove:d=>{const g=e.filter((C=>this.getLayer(C))),w=g.length!==0?this.queryRenderedFeatures(d.point,{layers:g}):[];w.length?l||(l=!0,i.call(this,new Qi(h,this,d.originalEvent,{features:w}))):l=!1},mouseout:()=>{l=!1}}}}if(h==="mouseleave"||h==="mouseout"){let l=!1;return{layers:e,listener:i,delegates:{mousemove:g=>{const w=e.filter((C=>this.getLayer(C)));(w.length!==0?this.queryRenderedFeatures(g.point,{layers:w}):[]).length?l=!0:l&&(l=!1,i.call(this,new Qi(h,this,g.originalEvent)))},mouseout:g=>{l&&(l=!1,i.call(this,new Qi(h,this,g.originalEvent)))}}}}{const l=u=>{const d=e.filter((w=>this.getLayer(w))),g=d.length!==0?this.queryRenderedFeatures(u.point,{layers:d}):[];g.length&&(u.features=g,i.call(this,u),delete u.features)};return{layers:e,listener:i,delegates:{[h]:l}}}}_saveDelegatedListener(h,e){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[h]=this._delegatedListeners[h]||[],this._delegatedListeners[h].push(e)}_removeDelegatedListener(h,e,i){if(!this._delegatedListeners||!this._delegatedListeners[h])return;const l=this._delegatedListeners[h];for(let u=0;ue.includes(g)))){for(const g in d.delegates)this.off(g,d.delegates[g]);return void l.splice(u,1)}}}on(h,e,i){if(i===void 0)return super.on(h,e);const l=typeof e=="string"?[e]:e,u=this._createDelegatedListener(h,l,i);this._saveDelegatedListener(h,u);for(const d in u.delegates)this.on(d,u.delegates[d]);return{unsubscribe:()=>{this._removeDelegatedListener(h,l,i)}}}once(h,e,i){if(i===void 0)return super.once(h,e);const l=typeof e=="string"?[e]:e,u=this._createDelegatedListener(h,l,i);for(const d in u.delegates){const g=u.delegates[d];u.delegates[d]=(...w)=>{this._removeDelegatedListener(h,l,i),g(...w)}}this._saveDelegatedListener(h,u);for(const d in u.delegates)this.once(d,u.delegates[d]);return this}off(h,e,i){return i===void 0?super.off(h,e):(this._removeDelegatedListener(h,typeof e=="string"?[e]:e,i),this)}queryRenderedFeatures(h,e){if(!this.style)return[];let i;const l=h instanceof s.P||Array.isArray(h),u=l?h:[[0,0],[this.transform.width,this.transform.height]];if(e=e||(l?{}:h)||{},u instanceof s.P||typeof u[0]=="number")i=[s.P.convert(u)];else{const d=s.P.convert(u[0]),g=s.P.convert(u[1]);i=[d,new s.P(g.x,d.y),g,new s.P(d.x,g.y),d]}return this.style.queryRenderedFeatures(i,e,this.transform)}querySourceFeatures(h,e){return this.style.querySourceFeatures(h,e)}setStyle(h,e){return(e=s.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},e)).diff!==!1&&e.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&h?(this._diffStyle(h,e),this):(this._localIdeographFontFamily=e.localIdeographFontFamily,this._updateStyle(h,e))}setTransformRequest(h){return this._requestManager.setTransformRequest(h),this}_getUIString(h){const e=this._locale[h];if(e==null)throw new Error(`Missing UI string '${h}'`);return e}_updateStyle(h,e){var i,l;if(e.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",(()=>this._updateStyle(h,e)));const u=this.style&&e.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!h)),h?(this.style=new zc(this,e||{}),this.style.setEventedParent(this,{style:this.style}),typeof h=="string"?this.style.loadURL(h,e,u):this.style.loadJSON(h,e,u),this):((l=(i=this.style)===null||i===void 0?void 0:i.projection)===null||l===void 0||l.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new zc(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(h,e){if(typeof h=="string"){const i=this._requestManager.transformRequest(h,"Style");s.j(i,new AbortController).then((l=>{this._updateDiff(l.data,e)})).catch((l=>{l&&this.fire(new s.k(l))}))}else typeof h=="object"&&this._updateDiff(h,e)}_updateDiff(h,e){try{this.style.setState(h,e)&&this._update(!0)}catch(i){s.w(`Unable to perform style diff: ${i.message||i.error||i}. Rebuilding the style from scratch.`),this._updateStyle(h,e)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():s.w("There is no style added to the map.")}addSource(h,e){return this._lazyInitEmptyStyle(),this.style.addSource(h,e),this._update(!0)}isSourceLoaded(h){const e=this.style&&this.style.sourceCaches[h];if(e!==void 0)return e.loaded();this.fire(new s.k(new Error(`There is no source with ID '${h}'`)))}setTerrain(h){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),h){const e=this.style.sourceCaches[h.source];if(!e)throw new Error(`cannot load terrain, because there exists no source with ID: ${h.source}`);this.terrain===null&&e.reload();for(const i in this.style._layers){const l=this.style._layers[i];l.type==="hillshade"&&l.source===h.source&&s.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."),l.type==="color-relief"&&l.source===h.source&&s.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 Or(this.painter,e,h),this.painter.renderToTexture=new Ul(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=i=>{var l;i.dataType==="style"?this.terrain.sourceCache.freeRtt():i.dataType==="source"&&i.tile&&(i.sourceId!==h.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))),((l=i.source)===null||l===void 0?void 0:l.type)==="image"?this.terrain.sourceCache.freeRtt():this.terrain.sourceCache.freeRtt(i.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new s.l("terrain",{terrain:h})),this}getTerrain(){var h,e;return(e=(h=this.terrain)===null||h===void 0?void 0:h.options)!==null&&e!==void 0?e:null}areTilesLoaded(){const h=this.style&&this.style.sourceCaches;for(const e in h){const i=h[e]._tiles;for(const l in i){const u=i[l];if(u.state!=="loaded"&&u.state!=="errored")return!1}}return!0}removeSource(h){return this.style.removeSource(h),this._update(!0)}getSource(h){return this.style.getSource(h)}setSourceTileLodParams(h,e,i){if(i){const l=this.getSource(i);if(!l)throw new Error(`There is no source with ID "${i}", cannot set LOD parameters`);l.calculateTileZoom=st(Math.max(1,h),Math.max(1,e))}else for(const l in this.style.sourceCaches)this.style.sourceCaches[l].getSource().calculateTileZoom=st(Math.max(1,h),Math.max(1,e));return this._update(!0),this}refreshTiles(h,e){const i=this.style.sourceCaches[h];if(!i)throw new Error(`There is no source cache with ID "${h}", cannot refresh tile`);e===void 0?i.reload(!0):i.refreshTiles(e.map((l=>new s.a4(l.z,l.x,l.y))))}addImage(h,e,i={}){const{pixelRatio:l=1,sdf:u=!1,stretchX:d,stretchY:g,content:w,textFitWidth:C,textFitHeight:P}=i;if(this._lazyInitEmptyStyle(),!(e instanceof HTMLImageElement||s.b(e))){if(e.width===void 0||e.height===void 0)return this.fire(new s.k(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:A,height:R,data:D}=e,O=e;return this.style.addImage(h,{data:new s.R({width:A,height:R},new Uint8Array(D)),pixelRatio:l,stretchX:d,stretchY:g,content:w,textFitWidth:C,textFitHeight:P,sdf:u,version:0,userImage:O}),O.onAdd&&O.onAdd(this,h),this}}{const{width:A,height:R,data:D}=ie.getImageData(e);this.style.addImage(h,{data:new s.R({width:A,height:R},D),pixelRatio:l,stretchX:d,stretchY:g,content:w,textFitWidth:C,textFitHeight:P,sdf:u,version:0})}}updateImage(h,e){const i=this.style.getImage(h);if(!i)return this.fire(new s.k(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const l=e instanceof HTMLImageElement||s.b(e)?ie.getImageData(e):e,{width:u,height:d,data:g}=l;if(u===void 0||d===void 0)return this.fire(new s.k(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(u!==i.data.width||d!==i.data.height)return this.fire(new s.k(new Error("The width and height of the updated image must be that same as the previous version of the image")));const w=!(e instanceof HTMLImageElement||s.b(e));return i.data.replace(g,w),this.style.updateImage(h,i),this}getImage(h){return this.style.getImage(h)}hasImage(h){return h?!!this.style.getImage(h):(this.fire(new s.k(new Error("Missing required image id"))),!1)}removeImage(h){this.style.removeImage(h)}loadImage(h){return Fe.getImage(this._requestManager.transformRequest(h,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(h,e){return this._lazyInitEmptyStyle(),this.style.addLayer(h,e),this._update(!0)}moveLayer(h,e){return this.style.moveLayer(h,e),this._update(!0)}removeLayer(h){return this.style.removeLayer(h),this._update(!0)}getLayer(h){return this.style.getLayer(h)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(h,e,i){return this.style.setLayerZoomRange(h,e,i),this._update(!0)}setFilter(h,e,i={}){return this.style.setFilter(h,e,i),this._update(!0)}getFilter(h){return this.style.getFilter(h)}setPaintProperty(h,e,i,l={}){return this.style.setPaintProperty(h,e,i,l),this._update(!0)}getPaintProperty(h,e){return this.style.getPaintProperty(h,e)}setLayoutProperty(h,e,i,l={}){return this.style.setLayoutProperty(h,e,i,l),this._update(!0)}getLayoutProperty(h,e){return this.style.getLayoutProperty(h,e)}setGlyphs(h,e={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(h,e),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(h,e,i={}){return this._lazyInitEmptyStyle(),this.style.addSprite(h,e,i,(l=>{l||this._update(!0)})),this}removeSprite(h){return this._lazyInitEmptyStyle(),this.style.removeSprite(h),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(h,e={}){return this._lazyInitEmptyStyle(),this.style.setSprite(h,e,(i=>{i||this._update(!0)})),this}setLight(h,e={}){return this._lazyInitEmptyStyle(),this.style.setLight(h,e),this._update(!0)}getLight(){return this.style.getLight()}setSky(h,e={}){return this._lazyInitEmptyStyle(),this.style.setSky(h,e),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(h,e){return this.style.setFeatureState(h,e),this._update()}removeFeatureState(h,e){return this.style.removeFeatureState(h,e),this._update()}getFeatureState(h){return this.style.getFeatureState(h)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let h=0,e=0;return this._container&&(h=this._container.clientWidth||400,e=this._container.clientHeight||300),[h,e]}_setupContainer(){const h=this._container;h.classList.add("maplibregl-map");const e=this._canvasContainer=H.create("div","maplibregl-canvas-container",h);this._interactive&&e.classList.add("maplibregl-interactive"),this._canvas=H.create("canvas","maplibregl-canvas",e),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 i=this._containerDimensions(),l=this._getClampedPixelRatio(i[0],i[1]);this._resizeCanvas(i[0],i[1],l);const u=this._controlContainer=H.create("div","maplibregl-control-container",h),d=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((g=>{d[g]=H.create("div",`maplibregl-ctrl-${g} `,u)})),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(h,e,i){this._canvas.width=Math.floor(i*h),this._canvas.height=Math.floor(i*e),this._canvas.style.width=`${h}px`,this._canvas.style.height=`${e}px`}_setupPainter(){const h=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0});let e=null;this._canvas.addEventListener("webglcontextcreationerror",(l=>{e={requestedAttributes:h},l&&(e.statusMessage=l.statusMessage,e.type=l.type)}),{once:!0});let i=null;if(i=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,h):this._canvas.getContext("webgl2",h)||this._canvas.getContext("webgl",h),!i){const l="Failed to initialize WebGL";throw e?(e.message=l,new Error(JSON.stringify(e))):new Error(l)}this.painter=new od(i,this.transform),me.testSupport(i)}migrateProjection(h,e){super.migrateProjection(h,e),this.painter.transform=h,this.fire(new s.l("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(h){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||h,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(h){return this._update(),this._renderTaskQueue.add(h)}_cancelRenderFrame(h){this._renderTaskQueue.remove(h)}_render(h){var e,i,l,u,d;const g=this._idleTriggered?this._fadeDuration:0,w=((e=this.style.projection)===null||e===void 0?void 0:e.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(h),this._removed)return;let C=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const R=this.transform.zoom,D=ie.now();this.style.zoomHistory.update(R,D);const O=new s.F(R,{now:D,fadeDuration:g,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition(),globalState:this.style.getGlobalState()}),$=O.crossFadingFactor();$===1&&$===this._crossFadingFactor||(C=!0,this._crossFadingFactor=$),this.style.update(O)}const P=((i=this.style.projection)===null||i===void 0?void 0:i.transitionState)>0!==w;(l=this.style.projection)===null||l===void 0||l.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((u=this.style.projection)===null||u===void 0?void 0:u.transitionState,(d=this.style.projection)===null||d===void 0?void 0:d.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||P)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.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._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=this.style&&this.style._updatePlacement(this.transform,this.showCollisionBoxes,g,this._crossSourceCollisions,P),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:g,showPadding:this.showPadding}),this.fire(new s.l("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,s.cw.mark(s.cx.load),this.fire(new s.l("load"))),this.style&&(this.style.hasTransitions()||C)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const A=this._sourcesDirty||this._styleDirty||this._placementDirty;return A||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new s.l("idle")),!this._loaded||this._fullyLoaded||A||(this._fullyLoaded=!0,s.cw.mark(s.cx.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var h;this._hash&&this._hash.remove();for(const i of this._controls)i.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),Fe.removeThrottleControl(this._imageQueueHandle),(h=this._resizeObserver)===null||h===void 0||h.disconnect();const e=this.painter.context.gl.getExtension("WEBGL_lose_context");e!=null&&e.loseContext&&e.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),H.remove(this._canvasContainer),H.remove(this._controlContainer),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),s.cw.clearMetrics(),this._removed=!0,this.fire(new s.l("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,ie.frame(this._frameRequest,(h=>{s.cw.frame(h),this._frameRequest=null;try{this._render(h)}catch(e){if(!s.cy(e)&&!(function(i){return i.message===js})(e))throw e}}),(()=>{})))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(h){this._showTileBoundaries!==h&&(this._showTileBoundaries=h,this._update())}get showPadding(){return!!this._showPadding}set showPadding(h){this._showPadding!==h&&(this._showPadding=h,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(h){this._showCollisionBoxes!==h&&(this._showCollisionBoxes=h,h?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(h){this._showOverdrawInspector!==h&&(this._showOverdrawInspector=h,this._update())}get repaint(){return!!this._repaint}set repaint(h){this._repaint!==h&&(this._repaint=h,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(h){this._vertices=h,this._update()}get version(){return wd}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(h){return this._lazyInitEmptyStyle(),this.style.setProjection(h),this._update(!0)}},T.MapMouseEvent=Qi,T.MapTouchEvent=is,T.MapWheelEvent=ru,T.Marker=ds,T.NavigationControl=class{constructor(h){this._updateZoomButtons=()=>{const e=this._map.getZoom(),i=e===this._map.getMaxZoom(),l=e===this._map.getMinZoom();this._zoomInButton.disabled=i,this._zoomOutButton.disabled=l,this._zoomInButton.setAttribute("aria-disabled",i.toString()),this._zoomOutButton.setAttribute("aria-disabled",l.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=(e,i)=>{const l=this._map._getUIString(`NavigationControl.${i}`);e.title=l,e.setAttribute("aria-label",l)},this.options=s.e({},Up,h),this._container=H.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",(e=>e.preventDefault())),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",(e=>this._map.zoomIn({},{originalEvent:e}))),H.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",(e=>this._map.zoomOut({},{originalEvent:e}))),H.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",(e=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:e}):this._map.resetNorth({},{originalEvent:e})})),this._compassIcon=H.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(h){return this._map=h,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 Ys(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){H.remove(this._container),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(h,e){const i=H.create("button",h,this._container);return i.type="button",i.addEventListener("click",e),i}},T.Popup=class extends s.E{constructor(h){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&&H.remove(this._content),this._container&&(H.remove(this._container),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("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new s.l("close"))),this),this._onMouseUp=e=>{this._update(e.point)},this._onMouseMove=e=>{this._update(e.point)},this._onDrag=e=>{this._update(e.point)},this._update=e=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=H.create("div","maplibregl-popup",this._map.getContainer()),this._tip=H.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const g of this.options.className.split(" "))this._container.classList.add(g);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=ti(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),this._trackPointer&&!e)return;const i=this._flatPos=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&e?e:this._map.transform.locationToScreenPoint(this._lngLat));let l=this.options.anchor;const u=Hl(this.options.offset);if(!l){const g=this._container.offsetWidth,w=this._container.offsetHeight;let C;C=i.y+u.bottom.ythis._map.transform.height-w?["bottom"]:[],i.xthis._map.transform.width-g/2&&C.push("right"),l=C.length===0?"bottom":C.join("-")}let d=i.add(u[l]);this.options.subpixelPositioning||(d=d.round()),H.setTransform(this._container,`${$l[l]} translate(${d.x}px,${d.y}px)`),hs(this._container,l,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=s.e(Object.create(pu),h)}addTo(h){return this._map&&this.remove(),this._map=h,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._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),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 s.l("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(h){return this._lngLat=s.S.convert(h),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),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._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(h){return this.setDOMContent(document.createTextNode(h))}setHTML(h){const e=document.createDocumentFragment(),i=document.createElement("body");let l;for(i.innerHTML=h;l=i.firstChild,l;)e.appendChild(l);return this.setDOMContent(e)}getMaxWidth(){var h;return(h=this._container)===null||h===void 0?void 0:h.style.maxWidth}setMaxWidth(h){return this.options.maxWidth=h,this._update(),this}setDOMContent(h){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=H.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(h),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(h){return this._container&&this._container.classList.add(h),this}removeClassName(h){return this._container&&this._container.classList.remove(h),this}setOffset(h){return this.options.offset=h,this._update(),this}toggleClassName(h){if(this._container)return this._container.classList.toggle(h)}setSubpixelPositioning(h){this.options.subpixelPositioning=h}_createCloseButton(){this.options.closeButton&&(this._closeButton=H.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const h=this._container.querySelector(fu);h&&h.focus()}},T.RasterDEMTileSource=tr,T.RasterTileSource=qt,T.ScaleControl=class{constructor(h){this._onMove=()=>{Gl(this._map,this._container,this.options)},this.setUnit=e=>{this.options.unit=e,Gl(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Ks),h)}getDefaultPosition(){return"bottom-left"}onAdd(h){return this._map=h,this._container=H.create("div","maplibregl-ctrl maplibregl-ctrl-scale",h.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){H.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},T.ScrollZoomHandler=md,T.Style=zc,T.TerrainControl=class{constructor(h){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=h}onAdd(h){return this._map=h,this._container=H.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=H.create("button","maplibregl-ctrl-terrain",this._container),H.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(){H.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},T.TwoFingersTouchPitchHandler=Nl,T.TwoFingersTouchRotateHandler=cs,T.TwoFingersTouchZoomHandler=Ol,T.TwoFingersTouchZoomRotateHandler=vd,T.VectorTileSource=zt,T.VideoSource=fr,T.addSourceType=(h,e)=>s._(void 0,void 0,void 0,(function*(){if(rr(h))throw new Error(`A source type called "${h}" already exists.`);((i,l)=>{Ar[i]=l})(h,e)})),T.clearPrewarmedResources=function(){const h=ot;h&&(h.isPreloaded()&&h.numActive()===1?(h.release(Ae),ot=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()"))},T.createTileMesh=Is,T.getMaxParallelImageRequests=function(){return s.a.MAX_PARALLEL_IMAGE_REQUESTS},T.getRTLTextPluginStatus=function(){return Dr().getRTLTextPluginStatus()},T.getVersion=function(){return mu},T.getWorkerCount=function(){return Ne.workerCount},T.getWorkerUrl=function(){return s.a.WORKER_URL},T.importScriptInWorkers=function(h){return at().broadcast("IS",h)},T.prewarm=function(){St().acquire(Ae)},T.setMaxParallelImageRequests=function(h){s.a.MAX_PARALLEL_IMAGE_REQUESTS=h},T.setRTLTextPlugin=function(h,e){return Dr().setRTLTextPlugin(h,e)},T.setWorkerCount=function(h){Ne.workerCount=h},T.setWorkerUrl=function(h){s.a.WORKER_URL=h}}));var z=f;return z}))})(Wd)),Wd.exports}var zI=EI();const Vd=qm(zI);class ev{constructor(o){gr(this,"gm");gr(this,"markers",new Map);gr(this,"canvases",new Map);gr(this,"canvasSize");gr(this,"canvasOpacity",.8);this.input=o,this.gm=new fl(this.input.tileSize);const f=r0(o.img);this.canvasSize=Math.ceil(2e3/f)}place([o,f]){const y=this.gm.latLonToPixelsFloor(o,f,this.input.zoom),M=this.getMarkerId(y),z=this.gm.latLonToPixelBoundsLatLon(o,f,this.input.zoom),T=this.input.map;if(this.input.markerFn&&!this.markers.has(M)){const K=this.input.markerFn();K.setLngLat({lat:z.min[0],lng:(z.max[1]+z.min[1])/2}).addTo(T),this.markers.set(M,K)}const{key:s,pos:B,innerPos:N}=this.getCanvasPos(y);let Y=this.canvases.get(s);if(!Y){const K=this.canvasSize,ie=B.x*K,H=B.y*K,me=ie+K-1,ve=H+K-1,Me=this.gm.pixelsToLatLon(ie,ve+1,this.input.zoom),Ee=this.gm.pixelsToLatLon(me+1,H,this.input.zoom);Y=new LI({id:`${this.input.id}-${s}`,img:this.input.img,canvasSize:this.canvasSize,coordinates:jm({min:Me,max:Ee}),layerPaint:{"raster-resampling":"nearest","raster-opacity":this.canvasOpacity}}),Y.addTo(this.input.map),this.canvases.set(s,Y)}Y.place(N.x,N.y)}clear(){const o=this.input.map;for(const f of this.canvases.values())f.removeFrom(o),f.removeDOM();this.canvases.clear();for(const f of this.markers.values())f.remove();this.markers.clear()}clearAndPlace(o){this.clear(),this.place(o)}remove([o,f]){let y=!1;const M=this.gm.latLonToPixelsFloor(o,f,this.input.zoom),{key:z,innerPos:T}=this.getCanvasPos(M),s=this.canvases.get(z);s&&(y=s.remove(T.x,T.y),s.annotationsCount()===0&&(this.canvases.delete(z),s.removeFrom(this.input.map),s.removeDOM()));const B=this.getMarkerId(M),N=this.markers.get(B);return N==null||N.remove(),this.markers.delete(B),y}setCanvasOpacity(o){this.canvasOpacity=o;for(const f of this.canvases.values())f.setOpacity(o)}getMarkerId([o,f]){return`${this.input.id}:${o},${f}`}getCanvasPos([o,f]){const y={x:Math.floor(o/this.canvasSize),y:Math.floor(f/this.canvasSize)},M={x:o%this.canvasSize,y:f%this.canvasSize},z=`${y.x},${y.y}`;return{pos:y,innerPos:M,key:z}}}class LI{constructor(o){gr(this,"annotations",new Set);gr(this,"canvas");gr(this,"imgSize");gr(this,"maps",new Set);this.input=o,this.imgSize=r0(o.img),this.canvas=document.createElement("canvas"),this.canvas.width=this.input.canvasSize*this.imgSize,this.canvas.height=this.input.canvasSize*this.imgSize}place(o,f){const y=this.getPixelKey(o,f);if(this.annotations.has(y))return!1;const M=this.canvas.getContext("2d");if(M){const z=o*this.imgSize,T=f*this.imgSize;M.drawImage(this.input.img,z,T)}return this.annotations.add(y),!0}remove(o,f){const y=this.getPixelKey(o,f);if(!this.annotations.has(y))return!1;const M=this.canvas.getContext("2d");if(M){const z=o*this.imgSize,T=f*this.imgSize;M.clearRect(z,T,this.imgSize,this.imgSize)}return this.annotations.delete(y),!0}addTo(o){const f=this.input.id;o.getSource(f)||o.addSource(f,{type:"canvas",canvas:this.canvas,coordinates:this.input.coordinates}),o.getLayer(f)||o.addLayer({id:f,type:"raster",source:f,paint:this.input.layerPaint}),this.maps.add(o)}removeFrom(o){const{id:f}=this.input;o.getLayer(f)&&o.removeLayer(f),o.getSource(f)&&o.removeSource(f),this.maps.delete(o)}removeDOM(){this.canvas.remove()}annotationsCount(){return this.annotations.size}setOpacity(o){for(const f of this.maps.values())f.setPaintProperty(this.input.id,"raster-opacity",o)}getPixelKey(o,f){return`${o},${f}`}}function r0(m){return Math.max(m.naturalWidth,m.naturalHeight)}function DI(){return window.matchMedia("(display-mode: standalone)").matches||"standalone"in window.navigator&&window.navigator.standalone===!0}function xc(m,o){return o.includes(m)}function RI(m){const o={opaque:!0},f=m.searchParams.get("lat"),y=m.searchParams.get("lng");f&&y&&(o.pos={lat:parseFloat(f),lng:parseFloat(y)});const M=m.searchParams.get("zoom");M&&(o.zoom=parseFloat(M));const z=m.searchParams.get("season");z&&(o.season=parseInt(z));const T=m.searchParams.get("opaque");return T&&(o.opaque=T!=="0"),m.searchParams.get("select")&&(o.select=!0),o.newUser=!!m.searchParams.get("new-user"),o.discordLinked=!!m.searchParams.get("discord-linked"),o.alliance=!!m.searchParams.get("alliance"),o}function BI(m,o){return m=new URL(m),o.pos!==void 0&&(m.searchParams.set("lat",o.pos.lat.toString()),m.searchParams.set("lng",o.pos.lng.toString())),o.zoom!==void 0&&m.searchParams.set("zoom",o.zoom.toString()),o.season!==void 0&&m.searchParams.set("season",o.season.toString()),o.opaque!==void 0&&m.searchParams.set("opaque",o.opaque?"1":"0"),o.newUser!==void 0&&m.searchParams.set("new-user",o.newUser?"1":"0"),o.alliance!==void 0&&m.searchParams.set("alliance",o.alliance?"1":"0"),o.select&&m.searchParams.set("alliance","1"),m}const Xd=xi({shouldReload:!0});var FI=(m,o)=>{var f;(f=o())==null||f.close()},OI=Te(' ');function NI(m,o){Br(o,!0);let f=Lt(o,"ref",15),y=ct(!1),M=ct(xi(o.description)),z=ct(void 0);Dn(()=>{const Re=ze=>{var Fe;ze.key==="Escape"&&((Fe=f())==null||Fe.close())};return document.addEventListener("keydown",Re),()=>document.removeEventListener("keydown",Re)});var T=OI(),s=E(T),B=E(s),N=E(B,!0);k(B);var Y=q(B,2),K=E(Y),ie=E(K);{let Re=ft(()=>Gv());gx(ie,{class:"h-24 rounded-lg",get placeholder(){return x(Re)},max:512,get value(){return x(M)},set value(ze){ce(M,ze,!0)},get validate(){return x(z)},set validate(ze){ce(z,ze,!0)}})}k(K);var H=q(K,2),me=E(H);me.__click=[FI,f];var ve=E(me,!0);k(me);var Me=q(me,2),Ee=E(Me,!0);k(Me),k(H),k(Y),k(s),vn(2),k(T),Po(T,Re=>f(Re),()=>f()),Ye((Re,ze,Fe)=>{fe(N,Re),me.disabled=x(y),fe(ve,ze),Me.disabled=x(y),fe(Ee,Fe)},[()=>yx(),()=>up(),()=>NT()]),Ai("submit",Y,async()=>{var Re,ze,Fe;try{if(!((Re=x(z))!=null&&Re()))return;ce(y,!0),o.description!==x(M)&&await en.updateAllianceDescription(x(M)),await((ze=o.onsuccess)==null?void 0:ze.call(o,x(M))),(Fe=f())==null||Fe.close()}catch(Ke){Nr.error(Ke.message)}finally{ce(y,!1)}}),G(m,T),Fr()}Qn(["click"]);var jI=(m,o,f)=>{navigator.clipboard.writeText(x(o).toString()),ce(f,!0),setTimeout(()=>{ce(f,!1)},1e3)},VI=Te(''),qI=Te(' ');function ZI(m,o){Br(o,!0);let f=Lt(o,"open",15),y=ct(""),M=ct(!1);const z=ft(()=>vi.url.origin+`/join?id=${x(y)}`);Wr(()=>{f()&&en.getAllianceInvites().then(rt=>{ce(y,rt[0],!0)}).catch(rt=>{Nr.error(rt.message)})}),Dn(()=>{const rt=qe=>{qe.key==="Escape"&&f(!1)};return document.addEventListener("keydown",rt),()=>document.removeEventListener("keydown",rt)});var T=qI(),s=E(T),B=q(E(s),2),N=E(B,!0);k(B);var Y=q(B,2),K=E(Y,!0);k(Y);var ie=q(Y,2),H=E(ie);let me;var ve=E(H);uo(ve);var Me=q(ve,2),Ee=E(Me);let Re;Ee.__click=[jI,z,M];var ze=E(Ee,!0);k(Ee),k(Me),k(H);var Fe=q(H,2);{var Ke=rt=>{var qe=VI();G(rt,qe)};je(Fe,rt=>{x(y)||rt(Ke)})}k(ie),k(s),vn(2),k(T),Wi(T,()=>rt=>{Wr(()=>{f()?rt.show():rt.close()})}),Ye((rt,qe,He,et,De,tt)=>{fe(N,rt),fe(K,qe),me=zr(H,1,"border-base-content/20 rounded-field relative flex w-full items-center gap-1 border-2 py-1.5 pl-4 pr-2.5",null,me,He),Av(ve,et),Re=zr(Ee,1,"btn btn-primary",null,Re,De),fe(ze,tt)},[()=>j3(),()=>Z3(),()=>({invisible:!x(y)}),()=>x(z).toString(),()=>({"btn-success":x(M)}),()=>x(M)?Bm():Hf()]),Ai("close",T,()=>f(!1)),G(m,T),Fr()}Qn(["click"]);var UI=Cr('');function Kf(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=UI();ar(y,()=>({viewBox:"0 0 256 199",width:"256",height:"199",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid",...f})),G(m,y)}var $I=Te('(Verified)'),GI=Te(''),HI=async(m,o)=>{await navigator.clipboard.writeText(o.username),Nr.info(GC())},WI=Te(""),XI=Te('
                    ');function Ah(m,o){Br(o,!0);const f=!!o.id;var y=XI(),M=E(y),z=E(M),T=E(z);k(z);var s=q(z,2);{var B=ie=>{var H=$I();G(ie,H)};je(s,ie=>{f&&ie(B)})}k(M);var N=q(M,2);{var Y=ie=>{var H=GI(),me=E(H);Kf(me,{class:"size-4 opacity-70"}),k(H),Ye(ve=>xr(H,"href",ve),[()=>`https://discord.com/users/${encodeURIComponent(o.id)}`]),G(ie,H)},K=ie=>{var H=WI();H.__click=[HI,o];var me=E(H);Kf(me,{class:"size-4 opacity-70"}),k(H),G(ie,H)};je(N,ie=>{f?ie(Y):ie(K,!1)})}k(y),Ye(()=>fe(T,`Discord: ${o.username??""}`)),G(m,y),Fr()}Qn(["click"]);var YI=Te(''),KI=Te('
                    ');function Zm(m,o){Br(o,!0);const f=[];let y=Lt(o,"value",15,"today"),M=[{value:"today",label:gp()},{value:"week",label:nT()},{value:"month",label:oT()},{value:"all-time",label:cT()}];var z=KI();hi(z,21,()=>M,T=>T.value,(T,s)=>{var B=YI();uo(B);var N;Ye(()=>{xr(B,"aria-label",x(s).label),N!==(N=x(s).value)&&(B.value=(B.__value=x(s).value)??"")}),Em(f,[],B,()=>(x(s).value,y()),y),G(T,B)}),k(z),G(m,z),Fr()}const JI=typeof window<"u"?window:void 0;function QI(m){let o=m.activeElement;for(;o!=null&&o.shadowRoot;){const f=o.shadowRoot.activeElement;if(f===o)break;o=f}return o}var bc,Xu,Pv;let e4=(Pv=class{constructor(o={}){Mr(this,bc);Mr(this,Xu);const{window:f=JI,document:y=f==null?void 0:f.document}=o;f!==void 0&&(na(this,bc,y),na(this,Xu,Ev(M=>{const z=Nu(f,"focusin",M),T=Nu(f,"focusout",M);return()=>{z(),T()}})))}get current(){var o;return(o=it(this,Xu))==null||o.call(this),it(this,bc)?QI(it(this,bc)):null}},bc=new WeakMap,Xu=new WeakMap,Pv);new e4;function t4(m,o){switch(m){case"post":Wr(o);break;case"pre":Pm(o);break}}function n0(m,o,f,y={}){const{lazy:M=!1}=y;let z=!M,T=Array.isArray(m)?[]:void 0;t4(o,()=>{const s=Array.isArray(m)?m.map(N=>N()):m();if(!z){z=!0,T=s;return}const B=ul(()=>f(s,T));return T=s,B})}function dl(m,o,f){n0(m,"post",o,f)}function r4(m,o,f){n0(m,"pre",o,f)}dl.pre=r4;var n4=Te(''),i4=Te('
                    '),a4=Te(' '),o4=(m,o,f)=>{o.onlastpixelclick({lat:x(f).lastLatitude??0,lng:x(f).lastLongitude??0})},s4=Te(""),l4=Te('
                    '),c4=Te('
                    '),u4=Te('
                    ');function h4(m,o){Br(o,!0);let f=Lt(o,"reload",15),y=ct(!0),M=ct([]),z=ct(0),T=ct("today"),s={};f(B);function B(){const ve=x(T);en.allianceLeaderboard(ve).then(Me=>{ce(M,Me),s={[ve]:Me},ce(y,!1)}).catch(Me=>{Nr.error(Me.message)})}dl(()=>[x(T)],()=>{const ve=x(T),Me=s[ve];if(Me){ce(M,Me),ce(y,!1);return}ce(y,!0),en.allianceLeaderboard(ve).then(Ee=>{ce(M,Ee),s[ve]=Ee,ce(y,!1)}).catch(Ee=>{Nr.error(Ee.message)})});var N=u4(),Y=E(N);Zm(Y,{get value(){return x(T)},set value(ve){ce(T,ve,!0)}});var K=q(Y,2),ie=E(K);{var H=ve=>{var Me=n4();G(ve,Me)},me=ve=>{var Me=er(),Ee=Ct(Me);{var Re=Fe=>{var Ke=i4(),rt=E(Ke),qe=q(rt);{var He=De=>{var tt=bi();Ye(nt=>fe(tt,nt),[()=>gp().toLowerCase()]),G(De,tt)},et=De=>{var tt=er(),nt=Ct(tt);{var Ze=bt=>{var te=bi();Ye(re=>fe(te,re),[()=>Om()]),G(bt,te)},ke=bt=>{var te=er(),re=Ct(te);{var ge=oe=>{var Ae=bi();Ye(Ne=>fe(Ae,Ne),[()=>Nm()]),G(oe,Ae)};je(re,oe=>{x(T)==="month"&&oe(ge)},!0)}G(bt,te)};je(nt,bt=>{x(T)==="week"?bt(Ze):bt(ke,!1)},!0)}G(De,tt)};je(qe,De=>{x(T)==="today"?De(He):De(et,!1)})}k(Ke),Ye(De=>fe(rt,`${De??""} `),[()=>Fm()]),G(Fe,Ke)},ze=Fe=>{var Ke=c4(),rt=E(Ke),qe=E(rt),He=q(E(qe)),et=E(He,!0);k(He);var De=q(He),tt=E(De,!0);k(De),k(qe),k(rt);var nt=q(rt);hi(nt,31,()=>x(M),Ze=>Ze.userId,(Ze,ke,bt)=>{const te=ft(()=>{var qt;return((qt=kt.data)==null?void 0:qt.id)===x(ke).userId});var re=l4();let ge;var oe=E(re),Ae=E(oe,!0);k(oe);var Ne=q(oe),pt=E(Ne),ot=E(pt);lo(ot,{class:"size-10 border",get userId(){return x(ke).userId},get pictureUrl(){return x(ke).picture}});var ut=q(ot,2),St=E(ut),Bt=q(St),at=E(Bt);k(Bt),k(ut);var dt=q(ut,2);{var vt=qt=>{const tr=ft(()=>So(x(ke).equippedFlag));var Qt=a4(),Ot=E(Qt,!0);k(Qt),Ye(()=>{xr(Qt,"data-tip",x(tr).name),fe(Ot,x(tr).flag)}),G(qt,Qt)};je(dt,qt=>{x(ke).equippedFlag&&qt(vt)})}var yt=q(dt,2);{var It=qt=>{Ah(qt,{get username(){return x(ke).discord},get id(){return x(ke).discordId}})};je(yt,qt=>{x(ke).discord&&qt(It)})}k(pt),k(Ne);var wt=q(Ne),mt=E(wt),Dt=q(mt);{var zt=qt=>{var tr=s4();let Qt;tr.__click=[o4,o,ke];var Ot=E(tr);km(Ot,{class:"size-4"}),k(tr),Ye((fr,kr)=>{Qt=zr(tr,1,"btn btn-sm btn-ghost absolute -right-2 top-1/2 !-translate-y-1/2 sm:right-4",null,Qt,fr),xr(tr,"data-tip",kr)},[()=>({tooltip:x(z)>640}),()=>Px()]),G(qt,tr)};je(Dt,qt=>{x(ke).lastLatitude&&x(ke).lastLongitude&&qt(zt)})}k(wt),k(re),Ye((qt,tr,Qt)=>{var Ot;ge=zr(re,1,"",null,ge,qt),fe(Ae,x(bt)+1),zr(ut,1,`font-semibold ${tr??""} flex gap-1`),fe(St,`${(x(te)?((Ot=kt.data)==null?void 0:Ot.name)??x(ke).name:x(ke).name)??""} `),fe(at,`#${x(ke).userId??""}`),fe(mt,`${Qt??""} `)},[()=>({"bg-base-200":x(te)}),()=>Oi(x(ke).userId),()=>x(ke).pixelsPainted.toLocaleString("en-US")]),sl(re,()=>ll,()=>({duration:200})),G(Ze,re)}),k(nt),k(Ke),Ye((Ze,ke)=>{fe(et,Ze),fe(tt,ke)},[()=>Lm(),()=>Am()]),G(Fe,Ke)};je(Ee,Fe=>{x(M).length===0?Fe(Re):Fe(ze,!1)},!0)}G(ve,Me)};je(ie,ve=>{x(y)?ve(H):ve(me,!1)})}k(K),k(N),fp("innerWidth",ve=>ce(z,ve,!0)),G(m,N),Fr()}Qn(["click"]);var d4=Cr('');function Um(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=d4();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var p4=(m,o)=>o.onclickback(),f4=Te('
                    ADMIN
                    '),m4=async(m,o)=>{try{x(o).loading=!0,await en.giveAllianceAdmin(x(o).id),x(o).role="admin"}catch{Nr.error(_S())}finally{x(o).loading=!1}},_4=async(m,o,f)=>{try{x(o).loading=!0,await en.banAllianceUser(x(o).id),f.data=f.data.filter(y=>y.id!==x(o).id)}catch{Nr.error(qT())}finally{x(o).loading=!1}},g4=Te('
                  • ',1),v4=Te('
                  • '),y4=Te('
                    '),x4=Te('
                    '),b4=(m,o,f)=>{en.unbanAllianceUser(x(o).id).then(()=>{f.data=f.data.filter(y=>y.id!==x(o).id)}).catch(y=>Nr.error(y.message)).finally(()=>{x(o).loading=!1})},w4=Te('
                    '),T4=Te('
                    '),C4=Te('
                    '),S4=Te('

                    ');function P4(m,o){Br(o,!0);let f=xi({data:[],page:0,hasNextPage:!0,loading:!1}),y=xi({data:[],page:0,hasNextPage:!0,loading:!1});var M=S4(),z=E(M),T=E(z);T.__click=[p4,o];var s=E(T);zx(s,{class:"size-5"}),k(T);var B=q(T,2),N=E(B,!0);k(B),k(z);var Y=q(z,2),K=E(Y);uo(K);var ie=q(K,2),H=E(ie),me=E(H);hi(me,21,()=>f.data,et=>et.id,(et,De,tt)=>{const nt=ft(()=>{var vt;return((vt=kt.data)==null?void 0:vt.id)===x(De).id});var Ze=y4(),ke=E(Ze),bt=E(ke),te=E(bt);lo(te,{class:"size-10 border",get userId(){return x(De).id},get pictureUrl(){return x(De).picture}});var re=q(te,2),ge=E(re);k(re);var oe=q(re,2);{var Ae=vt=>{var yt=f4();G(vt,yt)};je(oe,vt=>{x(De).role==="admin"&&vt(Ae)})}k(bt),k(ke);var Ne=q(ke),pt=E(Ne),ot=E(pt),ut=E(ot);Um(ut,{class:"size-4"}),k(ot);var St=q(ot,2),Bt=E(St);{var at=vt=>{var yt=g4(),It=Ct(yt),wt=E(It);wt.__click=[m4,De];var mt=E(wt,!0);k(wt),k(It);var Dt=q(It,2),zt=E(Dt);zt.__click=[_4,De,f];var qt=E(zt,!0);k(zt),k(Dt),Ye((tr,Qt)=>{wt.disabled=x(De).loading,fe(mt,tr),zt.disabled=x(De).loading,fe(qt,Qt)},[()=>ST(),()=>Hv()]),G(vt,yt)},dt=vt=>{var yt=v4(),It=E(yt);It.disabled=!0;var wt=E(It,!0);k(It),k(yt),Ye(mt=>fe(wt,mt),[()=>AT()]),G(vt,yt)};je(Bt,vt=>{x(De).role==="member"?vt(at):vt(dt,!1)})}k(St),k(pt),k(Ne),k(Ze),Ye(vt=>{var yt;zr(re,1,`font-semibold ${vt??""}`),fe(ge,`${(x(nt)?((yt=kt.data)==null?void 0:yt.name)??x(De).name:x(De).name)??""} #${x(De).id??""}`)},[()=>Oi(x(De).id)]),G(et,Ze)}),k(me),k(H);var ve=q(H,2);{var Me=et=>{var De=er(),tt=Ct(De);ju(tt,()=>f.page,nt=>{var Ze=x4();Wi(Ze,()=>ke=>{const bt=new IntersectionObserver(te=>{te[0].isIntersecting&&!f.loading&&(f.loading=!0,en.getAllianceMembers(f.page).then(re=>{f.data=[...f.data,...re.data],f.hasNextPage=re.hasNext,f.page++}).catch(re=>{Nr.error(re.message)}).finally(()=>{f.loading=!1}))});return bt.observe(ke),()=>{bt.disconnect()}}),G(nt,Ze)}),G(et,De)};je(ve,et=>{f.hasNextPage&&et(Me)})}k(ie);var Ee=q(ie,2),Re=q(Ee,2),ze=E(Re),Fe=E(ze);hi(Fe,21,()=>y.data,et=>et.id,(et,De,tt)=>{var nt=w4(),Ze=E(nt),ke=E(Ze),bt=E(ke);lo(bt,{class:"size-10 border",get userId(){return x(De).id},get pictureUrl(){return x(De).picture}});var te=q(bt,2),re=E(te);k(te),k(ke),k(Ze);var ge=q(Ze),oe=E(ge);oe.__click=[b4,De,y];var Ae=E(oe,!0);k(oe),k(ge),k(nt),Ye((Ne,pt)=>{zr(te,1,`font-semibold ${Ne??""}`),fe(re,`${x(De).name??""} #${x(De).id??""}`),oe.disabled=x(De).loading,fe(Ae,pt)},[()=>Oi(x(De).id),()=>LT()]),G(et,nt)}),k(Fe),k(ze);var Ke=q(ze,2);{var rt=et=>{var De=T4(),tt=E(De,!0);k(De),Ye(nt=>fe(tt,nt),[()=>BT()]),G(et,De)};je(Ke,et=>{!y.hasNextPage&&y.data.length===0&&et(rt)})}var qe=q(Ke,2);{var He=et=>{var De=er(),tt=Ct(De);ju(tt,()=>y.page,nt=>{var Ze=C4();Wi(Ze,()=>ke=>{const bt=new IntersectionObserver(te=>{te[0].isIntersecting&&!y.loading&&(y.loading=!0,en.getAllianceBannedMembers(y.page).then(re=>{y.data=[...y.data,...re.data],y.hasNextPage=re.hasNext,y.page++}).catch(re=>{Nr.error(re.message)}).finally(()=>{y.loading=!1}))});return bt.observe(ke),()=>{bt.disconnect()}}),G(nt,Ze)}),G(et,De)};je(qe,et=>{y.hasNextPage&&et(He)})}k(Re),k(Y),k(M),Ye((et,De,tt)=>{fe(N,et),xr(K,"aria-label",De),xr(Ee,"aria-label",tt)},[()=>Dv(),()=>$T(),()=>Wv()]),G(m,M),Fr()}Qn(["click"]);var I4=Te(' '),M4=Te(''),k4=Te('

                    '),A4=Te('
                    ');function Jf(m,o){Br(o,!0);let f=Lt(o,"value",15),y=Lt(o,"validate",15),M=ct("");const z=ft(()=>{var Ee;return((Ee=f())==null?void 0:Ee.length)??0});y(T);function T(){return o.min!==void 0&&x(z)o.max?(ce(M,`Max. characters: ${o.max}`),!1):!0}Wr(()=>{var Ee;o.max!==void 0&&x(z)>o.max&&f((Ee=f())==null?void 0:Ee.substring(0,o.max))});var s=A4(),B=E(s);let N;var Y=E(B);{var K=Ee=>{var Re=I4(),ze=E(Re,!0);k(Re),Ye(()=>fe(ze,o.label)),G(Ee,Re)};je(Y,Ee=>{o.label&&Ee(K)})}var ie=q(Y,2);uo(ie);var H=q(ie,2);{var me=Ee=>{var Re=M4(),ze=E(Re,!0);k(Re),Ye(()=>fe(ze,o.max-x(z))),G(Ee,Re)};je(H,Ee=>{o.max!==void 0&&Ee(me)})}k(B);var ve=q(B,2);{var Me=Ee=>{var Re=k4(),ze=E(Re,!0);k(Re),Ye(()=>fe(ze,x(M))),G(Ee,Re)};je(ve,Ee=>{x(M)&&Ee(Me)})}k(s),Ye(Ee=>{N=zr(B,1,"input w-full",null,N,Ee),xr(ie,"placeholder",o.placeholder),xr(ie,"maxlength",o.max)},[()=>({"input-error":!!x(M)})]),zm(ie,f),G(m,s),Fr()}var E4=(m,o)=>{var f;(f=o())==null||f.close()},z4=Te(' ');function L4(m,o){Br(o,!0);let f=Lt(o,"ref",15),y=ct(!1),M=ct(""),z=ct(void 0);Dn(()=>{const Re=ze=>{var Fe;ze.key==="Escape"&&((Fe=f())==null||Fe.close())};return document.addEventListener("keydown",Re),()=>document.removeEventListener("keydown",Re)});var T=z4(),s=E(T),B=E(s),N=E(B,!0);k(B);var Y=q(B,2),K=E(Y),ie=E(K);{let Re=ft(()=>Xf()),ze=ft(()=>yT());Jf(ie,{get label(){return x(Re)},get placeholder(){return x(ze)},min:1,max:16,get value(){return x(M)},set value(Fe){ce(M,Fe,!0)},get validate(){return x(z)},set validate(Fe){ce(z,Fe,!0)}})}k(K);var H=q(K,2),me=E(H);me.__click=[E4,f];var ve=E(me,!0);k(me);var Me=q(me,2),Ee=E(Me,!0);k(Me),k(H),k(Y),k(s),vn(2),k(T),Po(T,Re=>f(Re),()=>f()),Ye((Re,ze,Fe)=>{fe(N,Re),me.disabled=x(y),fe(ve,ze),Me.disabled=x(y),fe(Ee,Fe)},[()=>_T(),()=>up(),()=>wT()]),Ai("submit",Y,async()=>{var Re,ze;try{if(!((Re=x(z))!=null&&Re()))return;ce(y,!0);const{id:Fe}=await en.createAlliance(x(M));await o.onsuccess(Fe),(ze=f())==null||ze.close()}catch(Fe){Nr.error(Fe.message)}finally{ce(y,!1)}}),G(m,T),Fr()}Qn(["click"]);var D4=Cr('');function Eh(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=D4();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var R4=Cr(''),B4=Cr('');function Qf(m,o){let f=ir(o,["$$slots","$$events","$$legacy","filled"]);var y=er(),M=Ct(y);{var z=s=>{var B=R4();ar(B,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(s,B)},T=s=>{var B=B4();ar(B,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(s,B)};je(M,s=>{o.filled?s(z):s(T,!1)})}G(m,y)}var F4=Cr('');function O4(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=F4();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var N4=Cr('');function j4(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=N4();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var V4=Cr('');function q4(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=V4();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var Z4=Cr('');function vp(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=Z4();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}function U4(m,o="_blank"){return m.replaceAll(/https?:\/\/[^\s]+/g,f=>`${f}`)}var $4=Te('
                    '),G4=async(m,o,f,y)=>{try{ce(o,!0),await en.leaveAlliance(),ce(f,!0),await y()}catch(M){Nr.error(M.message)}finally{ce(o,!1)}},H4=(m,o)=>{ce(o,!0)},W4=Te('
                    '),X4=(m,o)=>{var f;(f=x(o))==null||f.show()},Y4=Te(''),K4=Te(''),J4=Te(' '),Q4=(m,o)=>ce(o,!0),eM=Te(''),tM=(m,o,f)=>{var y;(y=x(o))!=null&&y.hq?f.onhqclick({lat:x(o).hq.latitude,lng:x(o).hq.longitude}):f.onhqchange()},rM=Te(' '),nM=Te(' '),iM=Te(''),aM=Te('
                    '),oM=Te('

                    ',1),sM=(m,o)=>{var f;(f=x(o))==null||f.show()},lM=Te('
                    ',1),cM=Te('
                    ');function uM(m,o){Br(o,!0);let f=ct(void 0),y=ct(!0),M=ct(void 0),z=ct(!1),T=ct(void 0),s=ct(!1),B=ct(!1),N=ct(()=>{});dl(()=>o.open,()=>{o.open&&Xd.shouldReload&&Y()}),Dn(()=>{const ve=setInterval(()=>{Xd.shouldReload=!0},1e4);return()=>{clearTimeout(ve)}});async function Y(){try{ce(f,await en.getAlliance(),!0),x(f)&&x(N)(),ce(y,!1),Xd.shouldReload=!1}catch(ve){Nr.error(ve.message)}}var K=cM(),ie=E(K);{var H=ve=>{var Me=$4();G(ve,Me)},me=ve=>{var Me=er(),Ee=Ct(Me);{var Re=Fe=>{P4(Fe,{onclickback:()=>ce(B,!1)})},ze=Fe=>{var Ke=er(),rt=Ct(Ke);{var qe=et=>{var De=oM(),tt=Ct(De),nt=E(tt),Ze=E(nt,!0);k(nt);var ke=q(nt,2),bt=E(ke),te=E(bt),re=E(te);Um(re,{class:"size-4"}),k(te);var ge=q(te,2),oe=E(ge),Ae=E(oe);Ae.__click=[G4,z,y,Y];var Ne=E(Ae,!0);k(Ae),k(oe),k(ge),k(bt);var pt=q(bt,2);{var ot=se=>{var j=W4(),Z=E(j);Z.__click=[H4,s];var X=E(Z);q4(X,{class:"size-4"}),k(Z),k(j),Ye(ae=>xr(j,"data-tip",ae),[()=>Y3()]),G(se,j)};je(pt,se=>{x(f).role=="admin"&&se(ot)})}k(ke),k(tt);var ut=q(tt,2);{var St=se=>{var j=K4(),Z=E(j);Mm(Z,()=>U4(x(f).description||Gv()));var X=q(Z,2);{var ae=de=>{var Se=Y4();Se.__click=[X4,T];var Ie=E(Se);Qf(Ie,{class:"size-4"}),k(Se),G(de,Se)};je(X,de=>{x(f).role==="admin"&&de(ae)})}k(j),G(se,j)};je(ut,se=>{(x(f).description||x(f).role==="admin")&&se(St)})}var Bt=q(ut,2),at=E(Bt),dt=E(at);Eh(dt,{class:"inline size-4"});var vt=q(dt,2),yt=E(vt),It=q(yt),wt=E(It,!0);k(It),k(vt),k(at);var mt=q(at,2),Dt=E(mt);vp(Dt,{class:"inline size-4"});var zt=q(Dt,2),qt=E(zt),tr=q(qt);{var Qt=se=>{var j=J4(),Z=E(j,!0);k(j),Ye(X=>fe(Z,X),[()=>x(f).members.toLocaleString("en-US")]),G(se,j)},Ot=se=>{var j=eM();j.__click=[Q4,B];var Z=E(j,!0);k(j),Ye(X=>fe(Z,X),[()=>x(f).members.toLocaleString("en-US")]),G(se,j)};je(tr,se=>{x(f).role==="member"?se(Qt):se(Ot,!1)})}k(zt),k(mt);var fr=q(mt,2);{var kr=se=>{var j=aM(),Z=E(j);O4(Z,{class:"inline size-4"});var X=q(Z,2),ae=E(X),de=q(ae);de.__click=[tM,f,o];var Se=E(de);{var Ie=$e=>{var Mt=rM(),xe=E(Mt);k(Mt),Ye((Ft,cr)=>fe(xe,`${Ft??""}, ${cr??""}`),[()=>x(f).hq.latitude.toFixed(3),()=>x(f).hq.longitude.toFixed(3)]),G($e,Mt)},be=$e=>{var Mt=nM(),xe=E(Mt,!0);k(Mt),Ye(Ft=>fe(xe,Ft),[()=>S3()]),G($e,Mt)};je(Se,$e=>{x(f).hq?$e(Ie):$e(be,!1)})}k(de),k(X);var Oe=q(X,2);{var st=$e=>{var Mt=iM();Mt.__click=function(...Ft){var cr;(cr=o.onhqchange)==null||cr.apply(this,Ft)};var xe=E(Mt);Qf(xe,{class:"text-base-content/50 size-4"}),k(Mt),G($e,Mt)};je(Oe,$e=>{x(f).role==="admin"&&$e(st)})}k(j),Ye($e=>fe(ae,`${$e??""}: `),[()=>w3()]),G(se,j)};je(fr,se=>{(x(f).hq||x(f).role==="admin")&&se(kr)})}k(Bt);var Ar=q(Bt,2),rr=E(Ar),Kt=E(rr,!0);k(rr);var or=q(rr,2),Sr=E(or);h4(Sr,{get allianceId(){return x(f).id},get onlastpixelclick(){return o.onlastpixelclick},get reload(){return x(N)},set reload(se){ce(N,se,!0)}}),k(or),k(Ar);var Dr=q(Ar,2);NI(Dr,{get description(){return x(f).description},onsuccess:async se=>{x(f)&&(x(f).description=se)},get ref(){return x(T)},set ref(se){ce(T,se,!0)}});var Zr=q(Dr,2);ZI(Zr,{get open(){return x(s)},set open(se){ce(s,se,!0)}}),Ye((se,j,Z,X,ae)=>{fe(Ze,x(f).name),Ae.disabled=x(z),fe(Ne,se),fe(yt,`${j??""}: `),fe(wt,Z),fe(qt,`${X??""}: `),fe(Kt,ae)},[()=>y3(),()=>Am(),()=>x(f).pixelsPainted.toLocaleString("en-US"),()=>Dv(),()=>Rm()]),G(et,De)},He=et=>{var De=lM(),tt=Ct(De),nt=E(tt),Ze=E(nt);k(nt);var ke=q(nt,2),bt=E(ke);j4(bt,{class:"size-5"});var te=q(bt,1,!0);k(ke);var re=q(ke,2),ge=E(re),oe=E(ge,!0);k(ge),k(re);var Ae=q(re,2);Ae.__click=[sM,M];var Ne=E(Ae);Rv(Ne,{class:"size-6"});var pt=q(Ne);k(Ae),k(tt);var ot=q(tt,2);L4(ot,{onsuccess:Y,get ref(){return x(M)},set ref(ut){ce(M,ut,!0)}}),Ye((ut,St,Bt,at)=>{fe(Ze,`${ut??""}:`),fe(te,St),fe(oe,Bt),fe(pt,` ${at??""}`)},[()=>M3(),()=>E3(),()=>D3(),()=>F3()]),G(et,De)};je(rt,et=>{x(f)?et(qe):et(He,!1)},!0)}G(Fe,Ke)};je(Ee,Fe=>{x(B)?Fe(Re):Fe(ze,!1)},!0)}G(ve,Me)};je(ie,ve=>{x(y)?ve(H):ve(me,!1)})}k(K),G(m,K),Fr()}Qn(["click"]);var hM=Cr('');function yp(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=hM();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var dM=Te(' ');function pM(m,o){Br(o,!0);let f=Lt(o,"open",15);Dn(()=>{const K=ie=>{ie.key==="Escape"&&f(!1)};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)});var y=dM(),M=E(y),z=q(E(M),2),T=E(z);yp(T,{class:"size-5 max-sm:size-6"});var s=q(T,2),B=E(s,!0);k(s),k(z);var N=q(z,2),Y=E(N);uM(Y,{get open(){return f()},get onhqchange(){return o.onhqchange},get onhqclick(){return o.onhqclick},get onlastpixelclick(){return o.onlastpixelclick}}),k(N),k(M),vn(2),k(y),Wi(y,()=>K=>{Wr(()=>{f()?(K.show(),vi.url.searchParams.get("alliance")&&(vi.url.searchParams.delete("alliance"),Im(vi.url.toString()))):K.close()})}),Ye(K=>fe(B,K),[()=>mp()]),Ai("close",y,()=>f(!1)),ki(2,N,()=>ia,()=>({duration:300})),G(m,y),Fr()}function fM(m,o,f){return new Promise((y,M)=>{m.once("render",()=>{const z=m.getCanvas().toDataURL(),T=document.createElement("img");T.src=z,T.onload=()=>{const s=document.createElement("canvas");s.width=T.width,s.height=T.height;const B=s.getContext("2d");if(B){B.drawImage(T,0,0);const[N,Y,K,ie]=B.getImageData(o,f,1,1).data;y([N,Y,K,ie])}else M(new Error("Could not get 2d context from canvas"));T.remove(),s.remove()}}),m.triggerRepaint()})}function i0(m,o){return new Promise((f,y)=>{m.once("render",()=>{const M=m.getCanvas();let z=M;if(o!=null&&o.maxWidth||o!=null&&o.maxHeight){const T=M.width,s=M.height,B=(o==null?void 0:o.maxWidth)??T,N=(o==null?void 0:o.maxHeight)??s;z=document.createElement("canvas");const Y=Math.min(B/T,N/s);z.width=Math.floor(T*Y),z.height=Math.floor(s*Y);const K=z.getContext("2d");K&&K.drawImage(M,0,0,z.width,z.height)}try{z.toBlob(T=>{T&&f(T)},(o==null?void 0:o.type)??"image/png",(o==null?void 0:o.quality)??1)}catch(T){y(T)}finally{z!==M&&z.remove()}})})}var mM=Cr('');function _M(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=mM();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...f})),G(m,y)}var gM=Cr('');function a0(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=gM();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}const gc={hour:3600*1e3,min:60*1e3,sec:1e3};function tp(m){const o=Math.floor(m/gc.hour);m-=o*gc.hour;const f=Math.floor(m/gc.min);m-=f*gc.min;const M=Math.floor(m/gc.sec).toString().padStart(2,"0");return o>0?`${o}:${f.toString().padStart(2,"0")}:${M}`:`${f}:${M}`}function vM(m){const o=new Date,f=o.getFullYear(),y=String(o.getMonth()+1).padStart(2,"0"),M=String(o.getDate()).padStart(2,"0"),z=String(o.getHours()).padStart(2,"0"),T=String(o.getMinutes()).padStart(2,"0"),s=String(o.getSeconds()).padStart(2,"0");return`${f}-${y}-${M} ${z}:${T}:${s}`}var yM=(m,o,f)=>{navigator.clipboard.writeText(o.url.toString()),ce(f,!0),setTimeout(()=>{ce(f,!1)},1e3)},xM=Te('Screenshot'),bM=Te('
                    '),wM=async(m,o)=>{x(o)&&(await navigator.clipboard.write([new ClipboardItem({"image/png":x(o)})]),Nr.info(wP()))},TM=Te(''),CM=Te(' ');function SM(m,o){Br(o,!0);let f=Lt(o,"open",15),y=ct(!1);Dn(()=>{const ze=Fe=>{Fe.key==="Escape"&&f(!1)};return document.addEventListener("keydown",ze),()=>document.removeEventListener("keydown",ze)});let M=ct(null),z=ct("");Wr(()=>{f()?(o.hideHover(),setTimeout(async()=>{i0(o.map).then(ze=>{ce(M,ze,!0),ce(z,URL.createObjectURL(x(M)),!0)}).finally(()=>{o.showHover()})},500)):x(z)&&(URL.revokeObjectURL(x(z)),ce(M,null),ce(z,""))});var T=CM(),s=E(T),B=q(E(s),2),N=E(B);a0(N,{class:"size-5"});var Y=q(N);k(B);var K=q(B,2),ie=E(K);uo(ie);var H=q(ie,2),me=E(H);let ve;me.__click=[yM,o,y];var Me=E(me,!0);k(me),k(H),k(K);var Ee=q(K,2);{var Re=ze=>{const Fe=ft(()=>{var oe;return(oe=o.map)==null?void 0:oe.getCanvas()});var Ke=TM(),rt=E(Ke),qe=E(rt);_M(qe,{class:"inline size-5"});var He=q(qe);k(rt);var et=q(rt,2);{var De=oe=>{var Ae=xM();Ye(()=>{xr(Ae,"src",x(z)),xr(Ae,"width",x(Fe).width),xr(Ae,"height",x(Fe).height)}),G(oe,Ae)},tt=oe=>{var Ae=bM();Ye(()=>kc(Ae,`aspect-ratio: ${x(Fe).width/x(Fe).height}`)),G(oe,Ae)};je(et,oe=>{x(z)?oe(De):oe(tt,!1)})}var nt=q(et,2),Ze=E(nt);Ze.__click=[wM,M];var ke=E(Ze);Dm(ke,{class:"size-5"});var bt=q(ke);k(Ze);var te=q(Ze,2),re=E(te);zv(re,{class:"size-5"});var ge=q(re);k(te),k(nt),k(Ke),Ye((oe,Ae,Ne,pt)=>{fe(He,` ${oe??""}`),fe(bt,` ${Ae??""}`),xr(te,"href",x(z)),xr(te,"download",`wplace_${Ne??""}.png`),fe(ge,` ${pt??""}`)},[()=>_P(),()=>Hf(),()=>vM().replaceAll(" ","_").replaceAll(":","-"),()=>yP()]),ki(2,Ke,()=>ia,()=>({duration:300})),G(ze,Ke)};je(Ee,ze=>{f()&&ze(Re)})}k(s),vn(2),k(T),Wi(T,()=>ze=>{Wr(()=>{f()?ze.show():ze.close()})}),Ye((ze,Fe,Ke,rt)=>{fe(Y,` ${ze??""}`),Av(ie,Fe),ve=zr(me,1,"btn btn-primary",null,ve,Ke),fe(Me,rt)},[()=>EC(),()=>o.url.toString(),()=>({"btn-success":x(y)}),()=>x(y)?Bm():Hf()]),Ai("close",T,()=>f(!1)),G(m,T),Fr()}Qn(["click"]);var PM=Cr('');function IM(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=PM();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var MM=Te('
                  • '),kM=Te('

                      ');function $m(m,o){Br(o,!1);const f=[Qw(),Yw(),r5(),a5(),l5(),h5(),f5()];Nv();var y=kM(),M=E(y),z=E(M);IM(z,{class:"size-5"});var T=q(z,2),s=E(T),B=q(s),N=E(B,!0);k(B),k(T),k(M);var Y=q(M,2),K=E(Y);hi(K,5,()=>f,hp,(me,ve)=>{var Me=MM(),Ee=E(Me,!0);k(Me),Ye(()=>fe(Ee,x(ve))),G(me,Me)}),k(K);var ie=q(K,2),H=E(ie,!0);k(ie),k(Y),k(y),Ye((me,ve,Me)=>{fe(s,`${me??""} `),fe(N,ve),fe(H,Me)},[()=>Uw(),()=>Hw(),()=>g5()]),G(m,y),Fr()}var AM=(m,o)=>{o(!1)},EM=Te(' ');function zM(m,o){Br(o,!0);let f=Lt(o,"open",15);Dn(()=>{const N=Y=>{Y.key==="Escape"&&f(!1)};return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)});var y=EM(),M=E(y),z=q(E(M),2),T=q(E(z),2),s=E(T);$m(s,{}),k(T);var B=q(T,2);B.__click=[AM,f],k(z),k(M),vn(2),k(y),Wi(y,()=>N=>{Wr(()=>{f()?N.show():N.close()})}),Ai("close",y,()=>f(!1)),G(m,y),Fr()}Qn(["click"]);var LM=()=>{vi.url.searchParams.delete("new-user"),Im(vi.url.toString())},DM=Te('');function RM(m,o){Br(o,!0);let f=Lt(o,"open",15);Dn(()=>{const ve=Me=>{Me.key==="Escape"&&f(!1)};return document.addEventListener("keydown",ve),()=>document.removeEventListener("keydown",ve)});var y=DM(),M=E(y),z=E(M),T=E(z),s=E(T),B=E(s,!0);k(s);var N=q(s,2);jv(N,{hasText:!0,size:"medium"}),k(T),k(z);var Y=q(z,2),K=E(Y);$m(K,{}),k(Y);var ie=q(Y,2),H=E(ie);H.__click=[LM];var me=E(H,!0);k(H),k(ie),k(M),k(y),Wi(y,()=>ve=>{Wr(()=>{f()?ve.show():ve.close()})}),Ye((ve,Me)=>{fe(B,ve),fe(me,Me)},[()=>Vw(),()=>x5()]),Ai("close",y,()=>f(!1)),G(m,y),Fr()}Qn(["click"]);function BM(){const m=navigator.userAgent,o=navigator.vendor;return/Chrome/.test(m)&&/Google Inc/.test(o)?"Chrome":/Safari/.test(m)&&/Apple Computer/.test(o)?"Safari":/Firefox/.test(m)?"Firefox":/Edge/.test(m)?"Edge":/Opera|OPR/.test(m)?"Opera":"Unknown"}var FM=Cr('');function OM(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=FM();ar(y,()=>({viewBox:"0 0 512 512",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...f})),G(m,y)}var NM=Cr('');function em(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=NM();ar(y,()=>({viewBox:"0 0 256 199",width:"256",height:"199",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid",fill:"currentColor",...f})),G(m,y)}var jM=Cr('');function VM(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=jM();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid",viewBox:"0 0 260 260",...f})),G(m,y)}var qM=Cr('');function rp(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=qM();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var ZM=Cr(``);function UM(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=ZM();ar(y,()=>({viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-label":"Tiktok",...f})),G(m,y)}var $M=Cr(``);function GM(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=$M();ar(y,()=>({viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-label":"YouTube",...f})),G(m,y)}var HM=Te(' link',1),WM=Te('chrome://settings/system.',1),XM=Te('edge://settings/system/manageSystem.',1),YM=Te(' ',1),KM=Te(''),JM=Te(' ');function QM(m,o){Br(o,!0);let f=Lt(o,"open",15);Dn(()=>{const K=ie=>{ie.key==="Escape"&&f(!1)};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)});const y=BM();var M=JM(),z=E(M),T=q(E(z),2);{var s=K=>{var ie=KM(),H=E(ie),me=E(H);jv(me,{hasText:!0,size:"medium"});var ve=q(me,2),Me=E(ve),Ee=q(Me,4);vn(),k(ve);var Re=q(ve,2),ze=E(Re),Fe=E(ze),Ke=E(Fe,!0);k(Fe);var rt=q(Fe,4),qe=E(rt);em(qe,{class:"text-base-content mr-0.5 inline size-4"}),vn(2),k(rt);var He=q(rt,4),et=E(He);OM(et,{class:"size-4.5 mr-0.5 inline"}),vn(2),k(He);var De=q(He,4),tt=E(De);VM(tt,{class:"mr-0.5 inline size-3.5"}),vn(2),k(De);var nt=q(De,4),Ze=E(nt);GM(Ze,{class:"mr-0.5 inline size-3.5"}),vn(2),k(nt);var ke=q(nt,4),bt=E(ke);UM(bt,{class:"mr-0.5 inline size-3.5"}),vn(2),k(ke),k(ze),k(Re),k(H);var te=q(H,2),re=E(te),ge=E(re,!0);k(re);var oe=q(re,2);k(te);var Ae=q(te,2),Ne=E(Ae),pt=E(Ne,!0);k(Ne);var ot=q(Ne,2),ut=E(ot),St=q(ut),Bt=E(St);rp(Bt,{class:"size-5"}),k(St);var at=q(St);k(ot);var dt=q(ot,2),vt=E(dt),yt=q(vt),It=E(yt,!0);k(yt);var wt=q(yt);k(dt),k(Ae);var mt=q(Ae,2),Dt=E(mt),zt=E(Dt,!0);k(Dt);var qt=q(Dt,2),tr=E(qt);{var Qt=se=>{var j=HM(),Z=Ct(j);vn(),Ye(X=>fe(Z,`${X??""}: `),[()=>FP()]),G(se,j)},Ot=se=>{var j=YM(),Z=Ct(j),X=q(Z),ae=E(X,!0);k(X);var de=q(X),Se=q(de);{var Ie=Oe=>{var st=WM();vn(),G(Oe,st)},be=Oe=>{var st=er(),$e=Ct(st);{var Mt=xe=>{var Ft=XM();vn(),G(xe,Ft)};je($e,xe=>{y==="Edge"&&xe(Mt)},!0)}G(Oe,st)};je(Se,Oe=>{y==="Chrome"?Oe(Ie):Oe(be,!1)})}Ye((Oe,st,$e)=>{fe(Z,`${Oe??""} `),fe(ae,st),fe(de,` ${$e??""} `)},[()=>MP(),()=>EP(),()=>DP()]),G(se,j)};je(tr,se=>{y!=="Chrome"&&y!=="Edge"?se(Qt):se(Ot,!1)})}k(qt),k(mt);var fr=q(mt,2),kr=E(fr);$m(kr,{}),k(fr);var Ar=q(fr,4),rr=q(E(Ar),2),Kt=E(rr,!0);k(rr);var or=q(rr,2),Sr=E(or,!0);k(or);var Dr=q(or,2),Zr=E(Dr,!0);k(Dr),k(Ar),k(ie),Ye((se,j,Z,X,ae,de,Se,Ie,be,Oe,st,$e,Mt,xe,Ft)=>{fe(Me,`${se??""} `),fe(Ee,` © - ${j??""} `),fe(Ke,Z),fe(ge,X),xr(oe,"src",ai.language==="pt"?"https://www.youtube.com/embed/AcE85QM4iPQ?si=wbeZD8vxOzvlB_Z9":"https://www.youtube.com/embed/xOXtd-WzRxA?si=fHz8Z6ecXGYrDhkN"),fe(pt,ae),fe(ut,`${de??""} `),fe(at,` ${Se??""}`),fe(vt,`${Ie??""} `),fe(It,be),fe(wt,` ${Oe??""}`),fe(zt,st),xr(rr,"href",`${vi.url.origin??""}/terms/terms-of-service`),fe(Kt,$e),xr(or,"href",`${vi.url.origin??""}/terms/privacy`),fe(Sr,Mt),xr(Dr,"href",xe),fe(Zr,Ft)},[()=>Ob(),()=>Vb(),()=>Ub(),()=>Hb(),()=>Yb(),()=>Qb(),()=>r2(),()=>a2(),()=>l2(),()=>h2(),()=>SP(),()=>ZP(),()=>GP(),()=>Bv(vi.url.origin),()=>Kv()]),ki(2,ie,()=>ia,()=>({duration:300})),G(K,ie)};je(T,K=>{f()&&K(s)})}k(z);var B=q(z,2),N=E(B),Y=E(N,!0);k(N),k(B),k(M),Wi(M,()=>K=>{Wr(()=>{f()?K.show():K.close()})}),Ye(K=>fe(Y,K),[()=>cl()]),Ai("close",M,()=>f(!1)),G(m,M),Fr()}function e6(m){return typeof m=="function"}function zh(m){return m!==null&&typeof m=="object"}const t6=["string","number","bigint","boolean"];function tm(m){return m==null||t6.includes(typeof m)?!0:Array.isArray(m)?m.every(o=>tm(o)):typeof m=="object"?Object.getPrototypeOf(m)===Object.prototype:!1}const Vu=Symbol("box"),Gm=Symbol("is-writable");function r6(m){return zh(m)&&Vu in m}function n6(m){return vr.isBox(m)&&Gm in m}function vr(m){let o=ct(xi(m));return{[Vu]:!0,[Gm]:!0,get current(){return x(o)},set current(f){ce(o,f,!0)}}}function i6(m,o){const f=ft(m);return o?{[Vu]:!0,[Gm]:!0,get current(){return x(f)},set current(y){o(y)}}:{[Vu]:!0,get current(){return m()}}}function a6(m){return vr.isBox(m)?m:e6(m)?vr.with(m):vr(m)}function o6(m){return Object.entries(m).reduce((o,[f,y])=>vr.isBox(y)?(vr.isWritableBox(y)?Object.defineProperty(o,f,{get(){return y.current},set(M){y.current=M}}):Object.defineProperty(o,f,{get(){return y.current}}),o):Object.assign(o,{[f]:y}),{})}function s6(m){return vr.isWritableBox(m)?{[Vu]:!0,get current(){return m.current}}:m}vr.from=a6;vr.with=i6;vr.flatten=o6;vr.readonly=s6;vr.isBox=r6;vr.isWritableBox=n6;function l6(...m){return function(o){var f;for(const y of m)if(y){if(o.defaultPrevented)return;typeof y=="function"?y.call(this,o):(f=y.current)==null||f.call(this,o)}}}var hc={},Df,tv;function c6(){if(tv)return Df;tv=1;var m=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,o=/\n/g,f=/^\s*/,y=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,M=/^:\s*/,z=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,T=/^[;\s]*/,s=/^\s+|\s+$/g,B=` -`,N="/",Y="*",K="",ie="comment",H="declaration";Df=function(ve,Me){if(typeof ve!="string")throw new TypeError("First argument must be a string");if(!ve)return[];Me=Me||{};var Ee=1,Re=1;function ze(Ze){var ke=Ze.match(o);ke&&(Ee+=ke.length);var bt=Ze.lastIndexOf(B);Re=~bt?Ze.length-bt:Re+Ze.length}function Fe(){var Ze={line:Ee,column:Re};return function(ke){return ke.position=new Ke(Ze),He(),ke}}function Ke(Ze){this.start=Ze,this.end={line:Ee,column:Re},this.source=Me.source}Ke.prototype.content=ve;function rt(Ze){var ke=new Error(Me.source+":"+Ee+":"+Re+": "+Ze);if(ke.reason=Ze,ke.filename=Me.source,ke.line=Ee,ke.column=Re,ke.source=ve,!Me.silent)throw ke}function qe(Ze){var ke=Ze.exec(ve);if(ke){var bt=ke[0];return ze(bt),ve=ve.slice(bt.length),ke}}function He(){qe(f)}function et(Ze){var ke;for(Ze=Ze||[];ke=De();)ke!==!1&&Ze.push(ke);return Ze}function De(){var Ze=Fe();if(!(N!=ve.charAt(0)||Y!=ve.charAt(1))){for(var ke=2;K!=ve.charAt(ke)&&(Y!=ve.charAt(ke)||N!=ve.charAt(ke+1));)++ke;if(ke+=2,K===ve.charAt(ke-1))return rt("End of comment missing");var bt=ve.slice(2,ke-2);return Re+=2,ze(bt),ve=ve.slice(ke),Re+=2,Ze({type:ie,comment:bt})}}function tt(){var Ze=Fe(),ke=qe(y);if(ke){if(De(),!qe(M))return rt("property missing ':'");var bt=qe(z),te=Ze({type:H,property:me(ke[0].replace(m,K)),value:bt?me(bt[0].replace(m,K)):K});return qe(T),te}}function nt(){var Ze=[];et(Ze);for(var ke;ke=tt();)ke!==!1&&(Ze.push(ke),et(Ze));return Ze}return He(),nt()};function me(ve){return ve?ve.replace(s,K):K}return Df}var rv;function u6(){if(rv)return hc;rv=1;var m=hc&&hc.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(hc,"__esModule",{value:!0}),hc.default=f;var o=m(c6());function f(y,M){var z=null;if(!y||typeof y!="string")return z;var T=(0,o.default)(y),s=typeof M=="function";return T.forEach(function(B){if(B.type==="declaration"){var N=B.property,Y=B.value;s?M(N,Y,B):Y&&(z=z||{},z[N]=Y)}}),z}return hc}var h6=u6();const nv=qm(h6),d6=nv.default||nv,p6=/\d/,f6=["-","_","/","."];function m6(m=""){if(!p6.test(m))return m!==m.toLowerCase()}function _6(m){const o=[];let f="",y,M;for(const z of m){const T=f6.includes(z);if(T===!0){o.push(f),f="",y=void 0;continue}const s=m6(z);if(M===!1){if(y===!1&&s===!0){o.push(f),f=z,y=s;continue}if(y===!0&&s===!1&&f.length>1){const B=f.at(-1);o.push(f.slice(0,Math.max(0,f.length-1))),f=B+z,y=s;continue}}f+=z,y=s,M=T}return o.push(f),o}function o0(m){return m?_6(m).map(o=>v6(o)).join(""):""}function g6(m){return y6(o0(m||""))}function v6(m){return m?m[0].toUpperCase()+m.slice(1):""}function y6(m){return m?m[0].toLowerCase()+m.slice(1):""}function qd(m){if(!m)return{};const o={};function f(y,M){if(y.startsWith("-moz-")||y.startsWith("-webkit-")||y.startsWith("-ms-")||y.startsWith("-o-")){o[o0(y)]=M;return}if(y.startsWith("--")){o[y]=M;return}o[g6(y)]=M}return d6(m,f),o}function x6(...m){return(...o)=>{for(const f of m)typeof f=="function"&&f(...o)}}function b6(m,o){const f=RegExp(m,"g");return y=>{if(typeof y!="string")throw new TypeError(`expected an argument of type string, but got ${typeof y}`);return y.match(f)?y.replace(f,o):y}}const w6=b6(/[A-Z]/,m=>`-${m.toLowerCase()}`);function T6(m){if(!m||typeof m!="object"||Array.isArray(m))throw new TypeError(`expected an argument of type object, but got ${typeof m}`);return Object.keys(m).map(o=>`${w6(o)}: ${m[o]};`).join(` -`)}function s0(m={}){return T6(m).replace(` -`," ")}const l0={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"};s0(l0);const C6=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel"],S6=new Set(C6);function P6(m){return S6.has(m)}function Va(...m){const o={...m[0]};for(let f=1;f{const z=Nu(f,"focusin",M),T=Nu(f,"focusout",M);return()=>{z(),T()}})))}get current(){var o;return(o=it(this,Yu))==null||o.call(this),it(this,wc)?M6(it(this,wc)):null}}wc=new WeakMap,Yu=new WeakMap;new k6;var Ku,Wo;class Hm{constructor(o){Mr(this,Ku);Mr(this,Wo);na(this,Ku,o),na(this,Wo,Symbol(o))}get key(){return it(this,Wo)}exists(){return Q1(it(this,Wo))}get(){const o=$g(it(this,Wo));if(o===void 0)throw new Error(`Context "${it(this,Ku)}" not found`);return o}getOr(o){const f=$g(it(this,Wo));return f===void 0?o:f}set(o){return ex(it(this,Wo),o)}}Ku=new WeakMap,Wo=new WeakMap;function A6(m,o){switch(m){case"post":Wr(o);break;case"pre":Pm(o);break}}function c0(m,o,f,y={}){const{lazy:M=!1}=y;let z=!M,T=Array.isArray(m)?[]:void 0;A6(o,()=>{const s=Array.isArray(m)?m.map(N=>N()):m();if(!z){z=!0,T=s;return}const B=ul(()=>f(s,T));return T=s,B})}function Ss(m,o,f){c0(m,"post",o,f)}function E6(m,o,f){c0(m,"pre",o,f)}Ss.pre=E6;var Tc;class z6{constructor(o,f){Mr(this,Tc,ct(void 0));f!==void 0&&ce(it(this,Tc),f,!0),Ss(()=>o(),(y,M)=>{ce(it(this,Tc),M,!0)})}get current(){return x(it(this,Tc))}}Tc=new WeakMap;function L6(m,o){return setTimeout(o,m)}function dc(m){Iv().then(m)}const D6=1,R6=9,B6=11;function F6(m){return zh(m)&&m.nodeType===D6&&typeof m.nodeName=="string"}function u0(m){return zh(m)&&m.nodeType===R6}function O6(m){var o;return zh(m)&&((o=m.constructor)==null?void 0:o.name)==="VisualViewport"}function N6(m){return zh(m)&&m.nodeType!==void 0}function j6(m){return N6(m)&&m.nodeType===B6&&"host"in m}function V6(m){return u0(m)?m:O6(m)?m.document:(m==null?void 0:m.ownerDocument)??document}function h0(m){var o;return j6(m)?h0(m.host):u0(m)?m.defaultView??window:F6(m)?((o=m.ownerDocument)==null?void 0:o.defaultView)??window:window}function q6(m){let o=m.activeElement;for(;o!=null&&o.shadowRoot;){const f=o.shadowRoot.activeElement;if(f===o)break;o=f}return o}var Ju;class Z6{constructor(o){gr(this,"element");Mr(this,Ju,ft(()=>this.element.current?this.element.current.getRootNode()??document:document));gr(this,"getDocument",()=>V6(this.root));gr(this,"getWindow",()=>this.getDocument().defaultView??window);gr(this,"getActiveElement",()=>q6(this.root));gr(this,"isActiveElement",o=>o===this.getActiveElement());gr(this,"querySelector",o=>this.root?this.root.querySelector(o):null);gr(this,"querySelectorAll",o=>this.root?this.root.querySelectorAll(o):[]);gr(this,"setTimeout",(o,f)=>this.getWindow().setTimeout(o,f));gr(this,"clearTimeout",o=>this.getWindow().clearTimeout(o));typeof o=="function"?this.element=vr.with(o):this.element=o}get root(){return x(it(this,Ju))}set root(o){ce(it(this,Ju),o)}getElementById(o){return this.root.getElementById(o)}}Ju=new WeakMap;function Xa(m,o){return{[Hx()]:f=>vr.isBox(m)?(m.current=f,ul(()=>o==null?void 0:o(f)),()=>{"isConnected"in f&&f.isConnected||(m.current=null,o==null||o(null))}):(m(f),ul(()=>o==null?void 0:o(f)),()=>{"isConnected"in f&&f.isConnected||(m(null),o==null||o(null))})}}function U6(m){return m?"true":"false"}function $6(m){return m?"true":"false"}function G6(m){return m?"":void 0}function H6(m){return m?"true":"false"}function W6(m){return m?"":void 0}function X6(m){return m?!0:void 0}var Cc,Qu;class Y6{constructor(o){Mr(this,Cc);Mr(this,Qu);gr(this,"attrs");na(this,Cc,o.getVariant?o.getVariant():null),na(this,Qu,it(this,Cc)?`data-${it(this,Cc)}-`:`data-${o.component}-`),this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(o.parts.map(f=>[f,this.getAttr(f)]))}getAttr(o,f){return f?`data-${f}-${o}`:`${it(this,Qu)}${o}`}selector(o,f){return`[${this.getAttr(o,f)}]`}}Cc=new WeakMap,Qu=new WeakMap;function d0(m){const o=new Y6(m);return{...o.attrs,selector:o.selector,getAttr:o.getAttr}}const K6="ArrowDown",J6="ArrowLeft",Q6="ArrowRight",ek="ArrowUp",tk="End",rk="Enter",nk="Home",ik="p",ak="n",ok="j",sk="k",lk="h",ck="l";function qu(){}function Ya(m,o){return`bits-${m}`}function uk(m){if(!m)return null;for(const o of m.childNodes)if(o.nodeType!==Node.COMMENT_NODE)return o;return null}globalThis.bitsIdCounter??(globalThis.bitsIdCounter={current:0});function hk(m="bits"){return globalThis.bitsIdCounter.current++,`${m}-${globalThis.bitsIdCounter.current}`}function dk(m,o){let f=m.nextElementSibling;for(;f;){if(f.matches(o))return f;f=f.nextElementSibling}}function pk(m,o){let f=m.previousElementSibling;for(;f;){if(f.matches(o))return f;f=f.previousElementSibling}}function p0(m){if(typeof CSS<"u"&&typeof CSS.escape=="function")return CSS.escape(m);const o=m.length;let f=-1,y,M="";const z=m.charCodeAt(0);if(o===1&&z===45)return"\\"+m;for(;++f=1&&y<=31||y===127||f===0&&y>=48&&y<=57||f===1&&y>=48&&y<=57&&z===45){M+="\\"+y.toString(16)+" ";continue}if(y>=128||y===45||y===95||y>=48&&y<=57||y>=65&&y<=90||y>=97&&y<=122){M+=m.charAt(f);continue}M+="\\"+m.charAt(f)}return M}const ol="data-value",wa=d0({component:"command",parts:["root","list","input","separator","loading","empty","group","group-items","group-heading","item","viewport","input-label"]}),pc=wa.selector("group"),Rf=wa.selector("group-items"),iv=wa.selector("group-heading"),f0=wa.selector("item"),Bf=`${wa.selector("item")}:not([aria-disabled="true"])`,ml=new Hm("Command.Root"),fk=new Hm("Command.List"),Zu=new Hm("Command.Group"),av={search:"",value:"",filtered:{count:0,items:new Map,groups:new Set}};var Sc,eh,th,rh,nh,ih,ah,oh,pr,m0,Yd,nm,Kd,Jd,Qd,ws,_0,g0,im,Du,am,om,v0,Ru,sm,lm,y0,Bu,Fu,sh;const Qm=class Qm{constructor(o){Mr(this,pr);gr(this,"opts");gr(this,"attachment");Mr(this,Sc,!1);Mr(this,eh,!0);gr(this,"sortAfterTick",!1);gr(this,"sortAndFilterAfterTick",!1);gr(this,"allItems",new Set);gr(this,"allGroups",new Map);gr(this,"allIds",new Map);Mr(this,th,ct(0));Mr(this,rh,ct(null));Mr(this,nh,ct(null));Mr(this,ih,ct(null));Mr(this,ah,ct(av));Mr(this,oh,ct(xi(av)));Mr(this,sh,ft(()=>({id:this.opts.id.current,role:"application",[wa.root]:"",tabindex:-1,onkeydown:this.onkeydown,...this.attachment})));this.opts=o,this.attachment=Xa(this.opts.ref);const f={...this._commandState,value:this.opts.value.current??""};this._commandState=f,this.commandState=f,this.onkeydown=this.onkeydown.bind(this)}static create(o){return ml.set(new Qm(o))}get key(){return x(it(this,th))}set key(o){ce(it(this,th),o,!0)}get viewportNode(){return x(it(this,rh))}set viewportNode(o){ce(it(this,rh),o,!0)}get inputNode(){return x(it(this,nh))}set inputNode(o){ce(it(this,nh),o,!0)}get labelNode(){return x(it(this,ih))}set labelNode(o){ce(it(this,ih),o,!0)}get commandState(){return x(it(this,ah))}set commandState(o){ce(it(this,ah),o)}get _commandState(){return x(it(this,oh))}set _commandState(o){ce(it(this,oh),o,!0)}setState(o,f,y){Object.is(this._commandState[o],f)||(this._commandState[o]=f,o==="search"?(Vr(this,pr,Qd).call(this),Vr(this,pr,Kd).call(this)):o==="value"&&(y||Vr(this,pr,_0).call(this)),Vr(this,pr,Yd).call(this))}setValue(o,f){o!==this.opts.value.current&&o===""&&dc(()=>{this.key++}),this.setState("value",o,f),this.opts.value.current=o}getValidItems(){const o=this.opts.ref.current;return o?Array.from(o.querySelectorAll(Bf)).filter(y=>!!y):[]}getVisibleItems(){const o=this.opts.ref.current;return o?Array.from(o.querySelectorAll(f0)).filter(y=>!!y):[]}get itemsGrid(){var s,B,N,Y;if(!this.isGrid)return[];const o=this.opts.columns.current??1,f=this.getVisibleItems(),y=[[]];let M=(s=f[0])==null?void 0:s.getAttribute("data-group"),z=0,T=0;for(let K=0;Ko&&(T++,z=1,y.push([])),(Y=y[T])==null||Y.push({index:K,firstRowOfGroup:((N=(B=y[T])==null?void 0:B[0])==null?void 0:N.firstRowOfGroup)??K===0,ref:ie}))}return y}updateSelectedToIndex(o){const f=this.getValidItems()[o];f&&this.setValue(f.getAttribute(ol)??"")}updateSelectedByItem(o){const f=Vr(this,pr,ws).call(this),y=this.getValidItems(),M=y.findIndex(T=>T===f);let z=y[M+o];this.opts.loop.current&&(z=M+o<0?y[y.length-1]:M+o===y.length?y[0]:y[M+o]),z&&this.setValue(z.getAttribute(ol)??"")}updateSelectedByGroup(o){const f=Vr(this,pr,ws).call(this);let y=f==null?void 0:f.closest(pc),M;for(;y&&!M;)y=o>0?dk(y,pc):pk(y,pc),M=y==null?void 0:y.querySelector(Bf);M?this.setValue(M.getAttribute(ol)??""):this.updateSelectedByItem(o)}registerValue(o,f){var y;return o&&o===((y=this.allIds.get(o))==null?void 0:y.value)||this.allIds.set(o,{value:o,keywords:f}),this._commandState.filtered.items.set(o,Vr(this,pr,nm).call(this,o,f)),this.sortAfterTick||(this.sortAfterTick=!0,dc(()=>{Vr(this,pr,Kd).call(this),this.sortAfterTick=!1})),()=>{this.allIds.delete(o)}}registerItem(o,f){return this.allItems.add(o),f&&(this.allGroups.has(f)?this.allGroups.get(f).add(o):this.allGroups.set(f,new Set([o]))),this.sortAndFilterAfterTick||(this.sortAndFilterAfterTick=!0,dc(()=>{Vr(this,pr,Qd).call(this),Vr(this,pr,Kd).call(this),this.sortAndFilterAfterTick=!1})),Vr(this,pr,Yd).call(this),()=>{const y=Vr(this,pr,ws).call(this);this.allIds.delete(o),this.allItems.delete(o),this.commandState.filtered.items.delete(o),Vr(this,pr,Qd).call(this),(y==null?void 0:y.getAttribute("id"))===o&&Vr(this,pr,Jd).call(this),Vr(this,pr,Yd).call(this)}}registerGroup(o){return this.allGroups.has(o)||this.allGroups.set(o,new Set),()=>{this.allIds.delete(o),this.allGroups.delete(o)}}get isGrid(){return this.opts.columns.current!==null}onkeydown(o){const f=this.opts.vimBindings.current&&o.ctrlKey;switch(o.key){case ak:case ok:{f&&(this.isGrid?Vr(this,pr,am).call(this,o):Vr(this,pr,Du).call(this,o));break}case ck:{f&&this.isGrid&&Vr(this,pr,Du).call(this,o);break}case K6:this.isGrid?Vr(this,pr,am).call(this,o):Vr(this,pr,Du).call(this,o);break;case Q6:if(!this.isGrid)break;Vr(this,pr,Du).call(this,o);break;case ik:case sk:{f&&(this.isGrid?Vr(this,pr,lm).call(this,o):Vr(this,pr,Fu).call(this,o));break}case lk:{f&&this.isGrid&&Vr(this,pr,Fu).call(this,o);break}case ek:this.isGrid?Vr(this,pr,lm).call(this,o):Vr(this,pr,Fu).call(this,o);break;case J6:if(!this.isGrid)break;Vr(this,pr,Fu).call(this,o);break;case nk:o.preventDefault(),this.updateSelectedToIndex(0);break;case tk:o.preventDefault(),Vr(this,pr,im).call(this);break;case rk:if(!o.isComposing&&o.keyCode!==229){o.preventDefault();const y=Vr(this,pr,ws).call(this);y&&(y==null||y.click())}}}get props(){return x(it(this,sh))}set props(o){ce(it(this,sh),o)}};Sc=new WeakMap,eh=new WeakMap,th=new WeakMap,rh=new WeakMap,nh=new WeakMap,ih=new WeakMap,ah=new WeakMap,oh=new WeakMap,pr=new WeakSet,m0=function(){return Gx(this._commandState)},Yd=function(){it(this,Sc)||(na(this,Sc,!0),dc(()=>{var y,M;na(this,Sc,!1);const o=Vr(this,pr,m0).call(this);!Object.is(this.commandState,o)&&(this.commandState=o,(M=(y=this.opts.onStateChange)==null?void 0:y.current)==null||M.call(y,o))}))},nm=function(o,f){const y=this.opts.filter.current??w0;return o?y(o,this._commandState.search,f):0},Kd=function(){var T;if(!this._commandState.search||this.opts.shouldFilter.current===!1){Vr(this,pr,Jd).call(this);return}const o=this._commandState.filtered.items,f=[];for(const s of this._commandState.filtered.groups){const B=this.allGroups.get(s);let N=0;if(!B){f.push([s,N]);continue}for(const Y of B){const K=o.get(Y);N=Math.max(K??0,N)}f.push([s,N])}const y=this.viewportNode,M=this.getValidItems().sort((s,B)=>{const N=s.getAttribute("data-value"),Y=B.getAttribute("data-value"),K=o.get(N)??0;return(o.get(Y)??0)-K});for(const s of M){const B=s.closest(Rf);if(B){const N=s.parentElement===B?s:s.closest(`${Rf} > *`);N&&B.appendChild(N)}else{const N=s.parentElement===y?s:s.closest(`${Rf} > *`);N&&(y==null||y.appendChild(N))}}const z=f.sort((s,B)=>B[1]-s[1]);for(const s of z){const B=y==null?void 0:y.querySelector(`${pc}[${ol}="${p0(s[0])}"]`);(T=B==null?void 0:B.parentElement)==null||T.appendChild(B)}Vr(this,pr,Jd).call(this)},Jd=function(){dc(()=>{const o=this.getValidItems().find(M=>M.getAttribute("aria-disabled")!=="true"),f=o==null?void 0:o.getAttribute(ol),y=it(this,eh)&&this.opts.disableInitialScroll.current;this.setValue(f??"",y),na(this,eh,!1)})},Qd=function(){var f,y;if(!this._commandState.search||this.opts.shouldFilter.current===!1){this._commandState.filtered.count=this.allItems.size;return}this._commandState.filtered.groups=new Set;let o=0;for(const M of this.allItems){const z=((f=this.allIds.get(M))==null?void 0:f.value)??"",T=((y=this.allIds.get(M))==null?void 0:y.keywords)??[],s=Vr(this,pr,nm).call(this,z,T);this._commandState.filtered.items.set(M,s),s>0&&o++}for(const[M,z]of this.allGroups)for(const T of z){const s=this._commandState.filtered.items.get(T);if(s&&s>0){this._commandState.filtered.groups.add(M);break}}this._commandState.filtered.count=o},ws=function(){const o=this.opts.ref.current;if(!o)return;const f=o.querySelector(`${Bf}[data-selected]`);if(f)return f},_0=function(){dc(()=>{var y,M,z,T,s;const o=Vr(this,pr,ws).call(this);if(!o)return;const f=(y=o.parentElement)==null?void 0:y.parentElement;if(f){if(this.isGrid){const B=Vr(this,pr,g0).call(this,o);if(o.scrollIntoView({block:"nearest"}),B){const N=(M=o==null?void 0:o.closest(pc))==null?void 0:M.querySelector(iv);N==null||N.scrollIntoView({block:"nearest"});return}}else{const B=uk(f);if(B&&((z=B.dataset)==null?void 0:z.value)===((T=o.dataset)==null?void 0:T.value)){const N=(s=o==null?void 0:o.closest(pc))==null?void 0:s.querySelector(iv);N==null||N.scrollIntoView({block:"nearest"});return}}o.scrollIntoView({block:"nearest"})}})},g0=function(o){const f=this.itemsGrid;if(f.length===0)return!1;for(let y=0;y=0;N--){const Y=B[B.length-1];if(!(Y===void 0||Zd(Y.ref))){z=Y.ref;break}}break}return z},sm=function(o,f){if(f===null)return 0;const y=this.getValidItems(),M=y.findIndex(T=>T===o);return y.findIndex(T=>T===f)-M},lm=function(o){this.opts.columns.current!==null&&(o.preventDefault(),o.metaKey?this.updateSelectedByGroup(-1):this.updateSelectedByItem(Vr(this,pr,y0).call(this,o)))},y0=function(o){const f=this.itemsGrid,y=Vr(this,pr,ws).call(this);if(y===void 0)return 0;const M=Vr(this,pr,om).call(this,y,f);if(M===null)return 0;let z=null;const T=o.altKey?1:0;if(o.altKey&&M.rowIndex===1&&this.opts.loop.current===!1)z=Vr(this,pr,Bu).call(this,{start:0,end:0,expectedColumnIndex:M.columnIndex,grid:f});else if(M.rowIndex===0){if(this.opts.loop.current===!1)return 0;z=Vr(this,pr,Bu).call(this,{start:f.length-1-T,end:M.rowIndex+1,expectedColumnIndex:M.columnIndex,grid:f})}else z=Vr(this,pr,Bu).call(this,{start:M.rowIndex-1-T,end:0,expectedColumnIndex:M.columnIndex,grid:f}),z===null&&this.opts.loop.current&&(z=Vr(this,pr,Bu).call(this,{start:f.length-1,end:M.rowIndex+1,expectedColumnIndex:M.columnIndex,grid:f}));return Vr(this,pr,sm).call(this,y,z)},Bu=function({start:o,end:f,grid:y,expectedColumnIndex:M}){var T;let z=null;for(let s=o;s>=f;s--){const B=y[s];if(B!==void 0){if(z=((T=B[M])==null?void 0:T.ref)??null,z!==null&&Zd(z)){z=null;continue}if(z===null)for(let N=B.length-1;N>=0;N--){const Y=B[B.length-1];if(!(Y===void 0||Zd(Y.ref))){z=Y.ref;break}}break}}return z},Fu=function(o){o.preventDefault(),o.metaKey?this.updateSelectedToIndex(0):o.altKey?this.updateSelectedByGroup(-1):this.updateSelectedByItem(-1)},sh=new WeakMap;let rm=Qm;function Zd(m){return m.getAttribute("aria-disabled")==="true"}var lh,ch,uh;const e_=class e_{constructor(o,f){gr(this,"opts");gr(this,"root");gr(this,"attachment");Mr(this,lh,ft(()=>this.root._commandState.filtered.count===0&&it(this,ch)===!1||this.opts.forceMount.current));Mr(this,ch,!0);Mr(this,uh,ft(()=>({id:this.opts.id.current,role:"presentation",[wa.empty]:"",...this.attachment})));this.opts=o,this.root=f,this.attachment=Xa(this.opts.ref),Pm(()=>{na(this,ch,!1)})}static create(o){return new e_(o,ml.get())}get shouldRender(){return x(it(this,lh))}set shouldRender(o){ce(it(this,lh),o)}get props(){return x(it(this,uh))}set props(o){ce(it(this,uh),o)}};lh=new WeakMap,ch=new WeakMap,uh=new WeakMap;let cm=e_;var hh,dh,ph,fh;const t_=class t_{constructor(o,f){gr(this,"opts");gr(this,"root");gr(this,"attachment");Mr(this,hh,ft(()=>this.opts.forceMount.current||this.root.opts.shouldFilter.current===!1||!this.root.commandState.search?!0:this.root._commandState.filtered.groups.has(this.trueValue)));Mr(this,dh,ct(null));Mr(this,ph,ct(""));Mr(this,fh,ft(()=>({id:this.opts.id.current,role:"presentation",hidden:this.shouldRender?void 0:!0,"data-value":this.trueValue,[wa.group]:"",...this.attachment})));this.opts=o,this.root=f,this.attachment=Xa(this.opts.ref),this.trueValue=o.value.current??o.id.current,Ss(()=>this.trueValue,()=>this.root.registerGroup(this.trueValue)),Wr(()=>this.opts.value.current?(this.trueValue=this.opts.value.current,this.root.registerValue(this.opts.value.current)):this.headingNode&&this.headingNode.textContent?(this.trueValue=this.headingNode.textContent.trim().toLowerCase(),this.root.registerValue(this.trueValue)):(this.trueValue=`-----${this.opts.id.current}`,this.root.registerValue(this.trueValue)))}static create(o){return Zu.set(new t_(o,ml.get()))}get shouldRender(){return x(it(this,hh))}set shouldRender(o){ce(it(this,hh),o)}get headingNode(){return x(it(this,dh))}set headingNode(o){ce(it(this,dh),o,!0)}get trueValue(){return x(it(this,ph))}set trueValue(o){ce(it(this,ph),o,!0)}get props(){return x(it(this,fh))}set props(o){ce(it(this,fh),o)}};hh=new WeakMap,dh=new WeakMap,ph=new WeakMap,fh=new WeakMap;let um=t_;var mh;const r_=class r_{constructor(o,f){gr(this,"opts");gr(this,"group");gr(this,"attachment");Mr(this,mh,ft(()=>({id:this.opts.id.current,[wa["group-heading"]]:"",...this.attachment})));this.opts=o,this.group=f,this.attachment=Xa(this.opts.ref,y=>this.group.headingNode=y)}static create(o){return new r_(o,Zu.get())}get props(){return x(it(this,mh))}set props(o){ce(it(this,mh),o)}};mh=new WeakMap;let hm=r_;var _h;const n_=class n_{constructor(o,f){gr(this,"opts");gr(this,"group");gr(this,"attachment");Mr(this,_h,ft(()=>{var o;return{id:this.opts.id.current,role:"group",[wa["group-items"]]:"","aria-labelledby":((o=this.group.headingNode)==null?void 0:o.id)??void 0,...this.attachment}}));this.opts=o,this.group=f,this.attachment=Xa(this.opts.ref)}static create(o){return new n_(o,Zu.get())}get props(){return x(it(this,_h))}set props(o){ce(it(this,_h),o)}};_h=new WeakMap;let dm=n_;var ip,gh;const i_=class i_{constructor(o,f){gr(this,"opts");gr(this,"root");gr(this,"attachment");Mr(this,ip,ft(()=>{var f;const o=(f=this.root.viewportNode)==null?void 0:f.querySelector(`${f0}[${ol}="${p0(this.root.opts.value.current)}"]`);if(o!=null)return o.getAttribute("id")??void 0}));Mr(this,gh,ft(()=>{var o,f;return{id:this.opts.id.current,type:"text",[wa.input]:"",autocomplete:"off",autocorrect:"off",spellcheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":$6(!0),"aria-controls":((o=this.root.viewportNode)==null?void 0:o.id)??void 0,"aria-labelledby":((f=this.root.labelNode)==null?void 0:f.id)??void 0,"aria-activedescendant":x(it(this,ip)),...this.attachment}}));this.opts=o,this.root=f,this.attachment=Xa(this.opts.ref,y=>this.root.inputNode=y),Ss(()=>this.opts.ref.current,()=>{const y=this.opts.ref.current;y&&this.opts.autofocus.current&&L6(10,()=>y.focus())}),Ss(()=>this.opts.value.current,()=>{this.root.commandState.search!==this.opts.value.current&&this.root.setState("search",this.opts.value.current)})}static create(o){return new i_(o,ml.get())}get props(){return x(it(this,gh))}set props(o){ce(it(this,gh),o)}};ip=new WeakMap,gh=new WeakMap;let pm=i_;var Ts,ap,vh,yh,xh,pl,x0,mm,bh;const a_=class a_{constructor(o,f){Mr(this,pl);gr(this,"opts");gr(this,"root");gr(this,"attachment");Mr(this,Ts,null);Mr(this,ap,ft(()=>{var o;return this.opts.forceMount.current||((o=it(this,Ts))==null?void 0:o.opts.forceMount.current)===!0}));Mr(this,vh,ft(()=>{if(this.opts.ref.current,x(it(this,ap))||this.root.opts.shouldFilter.current===!1||!this.root.commandState.search)return!0;const o=this.root.commandState.filtered.items.get(this.trueValue);return o===void 0?!1:o>0}));Mr(this,yh,ft(()=>this.root.opts.value.current===this.trueValue&&this.trueValue!==""));Mr(this,xh,ct(""));Mr(this,bh,ft(()=>{var o;return{id:this.opts.id.current,"aria-disabled":U6(this.opts.disabled.current),"aria-selected":H6(this.isSelected),"data-disabled":G6(this.opts.disabled.current),"data-selected":W6(this.isSelected),"data-value":this.trueValue,"data-group":(o=it(this,Ts))==null?void 0:o.trueValue,[wa.item]:"",role:"option",onpointermove:this.onpointermove,onclick:this.onclick,...this.attachment}}));this.opts=o,this.root=f,na(this,Ts,Zu.getOr(null)),this.trueValue=o.value.current,this.attachment=Xa(this.opts.ref),Ss([()=>this.trueValue,()=>{var y;return(y=it(this,Ts))==null?void 0:y.trueValue},()=>this.opts.forceMount.current],()=>{var y;if(!this.opts.forceMount.current)return this.root.registerItem(this.trueValue,(y=it(this,Ts))==null?void 0:y.trueValue)}),Ss([()=>this.opts.value.current,()=>this.opts.ref.current],()=>{var y,M;!this.opts.value.current&&((y=this.opts.ref.current)!=null&&y.textContent)&&(this.trueValue=this.opts.ref.current.textContent.trim()),this.root.registerValue(this.trueValue,o.keywords.current.map(z=>z.trim())),(M=this.opts.ref.current)==null||M.setAttribute(ol,this.trueValue)}),this.onclick=this.onclick.bind(this),this.onpointermove=this.onpointermove.bind(this)}static create(o){const f=Zu.getOr(null);return new a_({...o,group:f},ml.get())}get shouldRender(){return x(it(this,vh))}set shouldRender(o){ce(it(this,vh),o)}get isSelected(){return x(it(this,yh))}set isSelected(o){ce(it(this,yh),o)}get trueValue(){return x(it(this,xh))}set trueValue(o){ce(it(this,xh),o,!0)}onpointermove(o){this.opts.disabled.current||this.root.opts.disablePointerSelection.current||Vr(this,pl,mm).call(this)}onclick(o){this.opts.disabled.current||Vr(this,pl,x0).call(this)}get props(){return x(it(this,bh))}set props(o){ce(it(this,bh),o)}};Ts=new WeakMap,ap=new WeakMap,vh=new WeakMap,yh=new WeakMap,xh=new WeakMap,pl=new WeakSet,x0=function(){var o;this.opts.disabled.current||(Vr(this,pl,mm).call(this),(o=this.opts.onSelect)==null||o.current())},mm=function(){this.opts.disabled.current||this.root.setValue(this.trueValue,!0)},bh=new WeakMap;let fm=a_;var wh;const o_=class o_{constructor(o,f){gr(this,"opts");gr(this,"root");gr(this,"attachment");Mr(this,wh,ft(()=>({id:this.opts.id.current,role:"listbox","aria-label":this.opts.ariaLabel.current,[wa.list]:"",...this.attachment})));this.opts=o,this.root=f,this.attachment=Xa(this.opts.ref)}static create(o){return fk.set(new o_(o,ml.get()))}get props(){return x(it(this,wh))}set props(o){ce(it(this,wh),o)}};wh=new WeakMap;let _m=o_;var Th;const s_=class s_{constructor(o,f){gr(this,"opts");gr(this,"root");gr(this,"attachment");Mr(this,Th,ft(()=>{var o;return{id:this.opts.id.current,[wa["input-label"]]:"",for:(o=this.opts.for)==null?void 0:o.current,style:l0,...this.attachment}}));this.opts=o,this.root=f,this.attachment=Xa(this.opts.ref,y=>this.root.labelNode=y)}static create(o){return new s_(o,ml.get())}get props(){return x(it(this,Th))}set props(o){ce(it(this,Th),o)}};Th=new WeakMap;let gm=s_;var mk=Te("");function _k(m,o){const f=co();Br(o,!0);let y=Lt(o,"id",19,()=>Ya(f)),M=Lt(o,"ref",15,null),z=ir(o,["$$slots","$$events","$$legacy","id","ref","children"]);const T=gm.create({id:vr.with(()=>y()),ref:vr.with(()=>M(),Y=>M(Y))}),s=ft(()=>Va(z,T.props));var B=mk();ar(B,()=>({...x(s)}));var N=E(B);oi(N,()=>o.children??pa),k(B),G(m,B),Fr()}var gk=Te(" ",1),vk=Te("
                      ");function yk(m,o){const f=co();Br(o,!0);const y=nt=>{_k(nt,{children:(Ze,ke)=>{vn();var bt=bi();Ye(()=>fe(bt,ie())),G(Ze,bt)},$$slots:{default:!0}})};let M=Lt(o,"id",19,()=>Ya(f)),z=Lt(o,"ref",15,null),T=Lt(o,"value",15,""),s=Lt(o,"onValueChange",3,qu),B=Lt(o,"onStateChange",3,qu),N=Lt(o,"loop",3,!1),Y=Lt(o,"shouldFilter",3,!0),K=Lt(o,"filter",3,w0),ie=Lt(o,"label",3,""),H=Lt(o,"vimBindings",3,!0),me=Lt(o,"disablePointerSelection",3,!1),ve=Lt(o,"disableInitialScroll",3,!1),Me=Lt(o,"columns",3,null),Ee=ir(o,["$$slots","$$events","$$legacy","id","ref","value","onValueChange","onStateChange","loop","shouldFilter","filter","label","vimBindings","disablePointerSelection","disableInitialScroll","columns","children","child"]);const Re=rm.create({id:vr.with(()=>M()),ref:vr.with(()=>z(),nt=>z(nt)),filter:vr.with(()=>K()),shouldFilter:vr.with(()=>Y()),loop:vr.with(()=>N()),value:vr.with(()=>T(),nt=>{T()!==nt&&(T(nt),s()(nt))}),vimBindings:vr.with(()=>H()),disablePointerSelection:vr.with(()=>me()),disableInitialScroll:vr.with(()=>ve()),onStateChange:vr.with(()=>B()),columns:vr.with(()=>Me())}),ze=nt=>Re.updateSelectedToIndex(nt),Fe=nt=>Re.updateSelectedByGroup(nt),Ke=nt=>Re.updateSelectedByItem(nt),rt=()=>Re.getValidItems(),qe=ft(()=>Va(Ee,Re.props));var He=er(),et=Ct(He);{var De=nt=>{var Ze=gk(),ke=Ct(Ze);y(ke);var bt=q(ke,2);oi(bt,()=>o.child,()=>({props:x(qe)})),G(nt,Ze)},tt=nt=>{var Ze=vk();ar(Ze,()=>({...x(qe)}));var ke=E(Ze);y(ke);var bt=q(ke,2);oi(bt,()=>o.children??pa),k(Ze),G(nt,Ze)};je(et,nt=>{o.child?nt(De):nt(tt,!1)})}return G(m,He),Fr({updateSelectedToIndex:ze,updateSelectedByGroup:Fe,updateSelectedByItem:Ke,getValidItems:rt})}var xk=Te("
                      ");function bk(m,o){const f=co();Br(o,!0);let y=Lt(o,"id",19,()=>Ya(f)),M=Lt(o,"ref",15,null),z=Lt(o,"forceMount",3,!1),T=ir(o,["$$slots","$$events","$$legacy","id","ref","children","child","forceMount"]);const s=cm.create({id:vr.with(()=>y()),ref:vr.with(()=>M(),ie=>M(ie)),forceMount:vr.with(()=>z())}),B=ft(()=>Va(s.props,T));var N=er(),Y=Ct(N);{var K=ie=>{var H=er(),me=Ct(H);{var ve=Ee=>{var Re=er(),ze=Ct(Re);oi(ze,()=>o.child,()=>({props:x(B)})),G(Ee,Re)},Me=Ee=>{var Re=xk();ar(Re,()=>({...x(B)}));var ze=E(Re);oi(ze,()=>o.children??pa),k(Re),G(Ee,Re)};je(me,Ee=>{o.child?Ee(ve):Ee(Me,!1)})}G(ie,H)};je(Y,ie=>{s.shouldRender&&ie(K)})}G(m,N),Fr()}var wk=Te("
                      ");function Tk(m,o){const f=co();Br(o,!0);let y=Lt(o,"id",19,()=>Ya(f)),M=Lt(o,"ref",15,null),z=Lt(o,"value",3,""),T=Lt(o,"forceMount",3,!1),s=ir(o,["$$slots","$$events","$$legacy","id","ref","value","forceMount","children","child"]);const B=um.create({id:vr.with(()=>y()),ref:vr.with(()=>M(),me=>M(me)),forceMount:vr.with(()=>T()),value:vr.with(()=>z())}),N=ft(()=>Va(s,B.props));var Y=er(),K=Ct(Y);{var ie=me=>{var ve=er(),Me=Ct(ve);oi(Me,()=>o.child,()=>({props:x(N)})),G(me,ve)},H=me=>{var ve=wk();ar(ve,()=>({...x(N)}));var Me=E(ve);oi(Me,()=>o.children??pa),k(ve),G(me,ve)};je(K,me=>{o.child?me(ie):me(H,!1)})}G(m,Y),Fr()}var Ck=Te("
                      ");function Sk(m,o){const f=co();Br(o,!0);let y=Lt(o,"id",19,()=>Ya(f)),M=Lt(o,"ref",15,null),z=ir(o,["$$slots","$$events","$$legacy","id","ref","children","child"]);const T=hm.create({id:vr.with(()=>y()),ref:vr.with(()=>M(),ie=>M(ie))}),s=ft(()=>Va(z,T.props));var B=er(),N=Ct(B);{var Y=ie=>{var H=er(),me=Ct(H);oi(me,()=>o.child,()=>({props:x(s)})),G(ie,H)},K=ie=>{var H=Ck();ar(H,()=>({...x(s)}));var me=E(H);oi(me,()=>o.children??pa),k(H),G(ie,H)};je(N,ie=>{o.child?ie(Y):ie(K,!1)})}G(m,B),Fr()}var Pk=Te("
                      "),Ik=Te('
                      ');function Mk(m,o){const f=co();Br(o,!0);let y=Lt(o,"id",19,()=>Ya(f)),M=Lt(o,"ref",15,null),z=ir(o,["$$slots","$$events","$$legacy","id","ref","children","child"]);const T=dm.create({id:vr.with(()=>y()),ref:vr.with(()=>M(),ie=>M(ie))}),s=ft(()=>Va(z,T.props));var B=Ik(),N=E(B);{var Y=ie=>{var H=er(),me=Ct(H);oi(me,()=>o.child,()=>({props:x(s)})),G(ie,H)},K=ie=>{var H=Pk();ar(H,()=>({...x(s)}));var me=E(H);oi(me,()=>o.children??pa),k(H),G(ie,H)};je(N,ie=>{o.child?ie(Y):ie(K,!1)})}k(B),G(m,B),Fr()}var kk=Te("");function Ak(m,o){const f=co();Br(o,!0);let y=Lt(o,"value",15,""),M=Lt(o,"autofocus",3,!1),z=Lt(o,"id",19,()=>Ya(f)),T=Lt(o,"ref",15,null),s=ir(o,["$$slots","$$events","$$legacy","value","autofocus","id","ref","child"]);const B=pm.create({id:vr.with(()=>z()),ref:vr.with(()=>T(),me=>T(me)),value:vr.with(()=>y(),me=>{y(me)}),autofocus:vr.with(()=>M()??!1)}),N=ft(()=>Va(s,B.props));var Y=er(),K=Ct(Y);{var ie=me=>{var ve=er(),Me=Ct(ve);oi(Me,()=>o.child,()=>({props:x(N)})),G(me,ve)},H=me=>{var ve=kk();uo(ve),ar(ve,()=>({...x(N)})),zm(ve,y),G(me,ve)};je(K,me=>{o.child?me(ie):me(H,!1)})}G(m,Y),Fr()}var Ek=Te("
                      "),zk=Te('
                      ');function Lk(m,o){const f=co();Br(o,!0);let y=Lt(o,"id",19,()=>Ya(f)),M=Lt(o,"ref",15,null),z=Lt(o,"value",3,""),T=Lt(o,"disabled",3,!1),s=Lt(o,"onSelect",3,qu),B=Lt(o,"forceMount",3,!1),N=Lt(o,"keywords",19,()=>[]),Y=ir(o,["$$slots","$$events","$$legacy","id","ref","value","disabled","children","child","onSelect","forceMount","keywords"]);const K=fm.create({id:vr.with(()=>y()),ref:vr.with(()=>M(),ve=>M(ve)),value:vr.with(()=>z()),disabled:vr.with(()=>T()),onSelect:vr.with(()=>s()),forceMount:vr.with(()=>B()),keywords:vr.with(()=>N())}),ie=ft(()=>Va(Y,K.props));var H=er(),me=Ct(H);ju(me,()=>K.root.key,ve=>{var Me=zk(),Ee=E(Me);{var Re=ze=>{var Fe=er(),Ke=Ct(Fe);{var rt=He=>{var et=er(),De=Ct(et);oi(De,()=>o.child,()=>({props:x(ie)})),G(He,et)},qe=He=>{var et=Ek();ar(et,()=>({...x(ie)}));var De=E(et);oi(De,()=>o.children??pa),k(et),G(He,et)};je(Ke,He=>{o.child?He(rt):He(qe,!1)})}G(ze,Fe)};je(Ee,ze=>{K.shouldRender&&ze(Re)})}k(Me),Ye(()=>xr(Me,"data-value",K.trueValue)),G(ve,Me)}),G(m,H),Fr()}var Dk=Te("
                      ");function Rk(m,o){const f=co();Br(o,!0);let y=Lt(o,"id",19,()=>Ya(f)),M=Lt(o,"ref",15,null),z=ir(o,["$$slots","$$events","$$legacy","id","ref","child","children","aria-label"]);const T=_m.create({id:vr.with(()=>y()),ref:vr.with(()=>M(),Y=>M(Y)),ariaLabel:vr.with(()=>o["aria-label"]??"Suggestions...")}),s=ft(()=>Va(z,T.props));var B=er(),N=Ct(B);ju(N,()=>T.root._commandState.search==="",Y=>{var K=er(),ie=Ct(K);{var H=ve=>{var Me=er(),Ee=Ct(Me);oi(Ee,()=>o.child,()=>({props:x(s)})),G(ve,Me)},me=ve=>{var Me=Dk();ar(Me,()=>({...x(s)}));var Ee=E(Me);oi(Ee,()=>o.children??pa),k(Me),G(ve,Me)};je(ie,ve=>{o.child?ve(H):ve(me,!1)})}G(Y,K)}),G(m,B),Fr()}const ov=1,Bk=.9,Fk=.8,Ok=.17,Ff=.1,Of=.999,Nk=.9999,jk=.99,Vk=/[\\/_+.#"@[({&]/,qk=/[\\/_+.#"@[({&]/g,Zk=/[\s-]/,b0=/[\s-]/g;function vm(m,o,f,y,M,z,T){if(z===o.length)return M===m.length?ov:jk;const s=`${M},${z}`;if(T[s]!==void 0)return T[s];const B=y.charAt(z);let N=f.indexOf(B,M),Y=0,K,ie,H,me;for(;N>=0;)K=vm(m,o,f,y,N+1,z+1,T),K>Y&&(N===M?K*=ov:Vk.test(m.charAt(N-1))?(K*=Fk,H=m.slice(M,N-1).match(qk),H&&M>0&&(K*=Of**H.length)):Zk.test(m.charAt(N-1))?(K*=Bk,me=m.slice(M,N-1).match(b0),me&&M>0&&(K*=Of**me.length)):(K*=Ok,M>0&&(K*=Of**(N-M))),m.charAt(N)!==o.charAt(z)&&(K*=Nk)),(KK&&(K=ie*Ff)),K>Y&&(Y=K),N=f.indexOf(B,N+1);return T[s]=Y,Y}function sv(m){return m.toLowerCase().replace(b0," ")}function w0(m,o,f){return m=f&&f.length>0?`${`${m} ${f==null?void 0:f.join(" ")}`}`:m,vm(m,o,sv(m),sv(o),0,0,{})}const Uk=18,T0=40,$k=`${T0}px`,Gk=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function Hk({containerRef:m,inputRef:o,pushPasswordManagerStrategy:f,isFocused:y,domContext:M}){let z=ct(!1),T=ct(!1),s=ct(!1);function B(){const Y=f.current;return Y==="none"?!1:Y==="increase-width"&&x(z)&&x(T)}function N(){const Y=m.current,K=o.current;if(!Y||!K||x(s)||f.current==="none")return;const ie=Y,H=ie.getBoundingClientRect().left+ie.offsetWidth,me=ie.getBoundingClientRect().top+ie.offsetHeight/2,ve=H-Uk,Me=me;M.querySelectorAll(Gk).length===0&&M.getDocument().elementFromPoint(ve,Me)===Y||(ce(z,!0),ce(s,!0))}return Wr(()=>{const Y=m.current;if(!Y||f.current==="none")return;function K(){const me=h0(Y).innerWidth-Y.getBoundingClientRect().right;ce(T,me>=T0)}K();const ie=setInterval(K,1e3);return()=>{clearInterval(ie)}}),Wr(()=>{const Y=y.current||M.getActiveElement()===o.current;if(f.current==="none"||!Y)return;const K=setTimeout(N,0),ie=setTimeout(N,2e3),H=setTimeout(N,5e3),me=setTimeout(()=>{ce(s,!0)},6e3);return()=>{clearTimeout(K),clearTimeout(ie),clearTimeout(H),clearTimeout(me)}}),{get hasPwmBadge(){return x(z)},get willPushPwmBadge(){return B()},PWM_BADGE_SPACE_WIDTH:$k}}const C0=d0({component:"pin-input",parts:["root","cell"]}),Wk=["Backspace","Delete","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","Escape","Enter","Tab","Shift","Control","Meta"];var Ha,Pc,Xo,ja,Wa,Ic,To,Yo,Cs,Mc,op,Ch,Sh,sp,lp,S0,Ph,Ih,cp,Mh;const l_=class l_{constructor(o){Mr(this,lp);gr(this,"opts");gr(this,"attachment");Mr(this,Ha,vr(null));Mr(this,Pc,ct(!1));gr(this,"inputAttachment",Xa(it(this,Ha)));Mr(this,Xo,vr(!1));Mr(this,ja,ct(null));Mr(this,Wa,ct(null));Mr(this,Ic,new z6(()=>this.opts.value.current??""));Mr(this,To,ft(()=>typeof this.opts.pattern.current=="string"?new RegExp(this.opts.pattern.current):this.opts.pattern.current));Mr(this,Yo,ct(xi({prev:[null,null,"none"],willSyntheticBlur:!1})));Mr(this,Cs);Mr(this,Mc);gr(this,"domContext");gr(this,"onkeydown",o=>{const f=o.key;Wk.includes(f)||o.ctrlKey||o.metaKey||f&&x(it(this,To))&&!x(it(this,To)).test(f)&&o.preventDefault()});Mr(this,op,ft(()=>({position:"relative",cursor:this.opts.disabled.current?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"})));Mr(this,Ch,ft(()=>({id:this.opts.id.current,[C0.root]:"",style:x(it(this,op)),...this.attachment})));Mr(this,Sh,ft(()=>({style:{position:"absolute",inset:0,pointerEvents:"none"}})));Mr(this,sp,ft(()=>({position:"absolute",inset:0,width:it(this,Cs).willPushPwmBadge?`calc(100% + ${it(this,Cs).PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:it(this,Cs).willPushPwmBadge?`inset(0 ${it(this,Cs).PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:this.opts.textAlign.current,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--bits-pin-input-root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"})));Mr(this,Ph,()=>{var ve;const o=it(this,Ha).current,f=this.opts.ref.current;if(!o||!f)return;if(this.domContext.getActiveElement()!==o){ce(it(this,ja),null),ce(it(this,Wa),null);return}const y=o.selectionStart,M=o.selectionEnd,z=o.selectionDirection??"none",T=o.maxLength,s=o.value,B=x(it(this,Yo)).prev;let N=-1,Y=-1,K;if(s.length!==0&&y!==null&&M!==null){const Me=y===M,Ee=y===s.length&&s.length1&&s.length>1){let ze=0;if(B[0]!==null&&B[1]!==null){K=Re{const f=o.currentTarget.value.slice(0,this.opts.maxLength.current);if(f.length>0&&x(it(this,To))&&!x(it(this,To)).test(f)){o.preventDefault();return}typeof it(this,Ic).current=="string"&&f.length{const f=it(this,Ha).current;if(f){const y=Math.min(f.value.length,this.opts.maxLength.current-1),M=f.value.length;f.setSelectionRange(y,M),ce(it(this,ja),y,!0),ce(it(this,Wa),M,!0)}it(this,Xo).current=!0});gr(this,"onpaste",o=>{var Y,K,ie,H;const f=it(this,Ha).current;if(!f)return;const y=me=>{const ve=f.selectionStart===null?void 0:f.selectionStart,Me=f.selectionEnd===null?void 0:f.selectionEnd,Ee=ve!==Me,Re=this.opts.value.current;return(Ee?Re.slice(0,ve)+me+Re.slice(Me):Re.slice(0,ve)+me+Re.slice(ve)).slice(0,this.opts.maxLength.current)},M=me=>me.length>0&&x(it(this,To))&&!x(it(this,To)).test(me);if(!((Y=this.opts.pasteTransformer)!=null&&Y.current)&&(!it(this,Mc).isIOS||!o.clipboardData||!f)){const me=y((K=o.clipboardData)==null?void 0:K.getData("text/plain"));M(me)&&o.preventDefault();return}const z=((ie=o.clipboardData)==null?void 0:ie.getData("text/plain"))??"",T=(H=this.opts.pasteTransformer)!=null&&H.current?this.opts.pasteTransformer.current(z):z;o.preventDefault();const s=y(T);if(M(s))return;f.value=s,this.opts.value.current=s;const B=Math.min(s.length,this.opts.maxLength.current-1),N=s.length;f.setSelectionRange(B,N),ce(it(this,ja),B,!0),ce(it(this,Wa),N,!0)});gr(this,"onmouseover",o=>{ce(it(this,Pc),!0)});gr(this,"onmouseleave",o=>{ce(it(this,Pc),!1)});gr(this,"onblur",o=>{if(x(it(this,Yo)).willSyntheticBlur){x(it(this,Yo)).willSyntheticBlur=!1;return}it(this,Xo).current=!1});Mr(this,Ih,ft(()=>{var o;return{id:this.opts.inputId.current,style:x(it(this,sp)),autocomplete:this.opts.autocomplete.current||"one-time-code","data-pin-input-input":"","data-pin-input-input-mss":x(it(this,ja)),"data-pin-input-input-mse":x(it(this,Wa)),inputmode:this.opts.inputmode.current,pattern:(o=x(it(this,To)))==null?void 0:o.source,maxlength:this.opts.maxLength.current,value:this.opts.value.current,disabled:X6(this.opts.disabled.current),onpaste:this.onpaste,oninput:this.oninput,onkeydown:this.onkeydown,onmouseover:this.onmouseover,onmouseleave:this.onmouseleave,onfocus:this.onfocus,onblur:this.onblur,...this.inputAttachment}}));Mr(this,cp,ft(()=>Array.from({length:this.opts.maxLength.current}).map((o,f)=>{const y=it(this,Xo).current&&x(it(this,ja))!==null&&x(it(this,Wa))!==null&&(x(it(this,ja))===x(it(this,Wa))&&f===x(it(this,ja))||f>=x(it(this,ja))&&f({cells:x(it(this,cp)),isFocused:it(this,Xo).current,isHovering:x(it(this,Pc))})));var f;this.opts=o,this.attachment=Xa(this.opts.ref),this.domContext=new Z6(o.ref),na(this,Mc,{value:this.opts.value,isIOS:typeof window<"u"&&((f=window==null?void 0:window.CSS)==null?void 0:f.supports("-webkit-touch-callout","none"))}),na(this,Cs,Hk({containerRef:this.opts.ref,inputRef:it(this,Ha),isFocused:it(this,Xo),pushPasswordManagerStrategy:this.opts.pushPasswordManagerStrategy,domContext:this.domContext})),Dn(()=>{const y=it(this,Ha).current,M=this.opts.ref.current;if(!y||!M)return;it(this,Mc).value.current!==y.value&&(this.opts.value.current=y.value),x(it(this,Yo)).prev=[y.selectionStart,y.selectionEnd,y.selectionDirection??"none"];const z=Nu(this.domContext.getDocument(),"selectionchange",it(this,Ph),{capture:!0});it(this,Ph).call(this),this.domContext.getActiveElement()===y&&(it(this,Xo).current=!0),this.domContext.getElementById("pin-input-style")||Vr(this,lp,S0).call(this);const T=()=>{M&&M.style.setProperty("--bits-pin-input-root-height",`${y.clientHeight}px`)};T();const s=new ResizeObserver(T);return s.observe(y),()=>{z(),s.disconnect()}}),Ss([()=>this.opts.value.current,()=>it(this,Ha).current],()=>{Xk(()=>{const y=it(this,Ha).current;if(!y)return;y.dispatchEvent(new Event("input"));const M=y.selectionStart,z=y.selectionEnd,T=y.selectionDirection??"none";M!==null&&z!==null&&(ce(it(this,ja),M,!0),ce(it(this,Wa),z,!0),x(it(this,Yo)).prev=[M,z,T])},this.domContext)}),Wr(()=>{const y=this.opts.value.current,M=it(this,Ic).current,z=this.opts.maxLength.current,T=this.opts.onComplete.current;M!==void 0&&y!==M&&M.length({id:this.opts.id.current,[C0.cell]:"","data-active":this.opts.cell.current.isActive?"":void 0,"data-inactive":this.opts.cell.current.isActive?void 0:"",...this.attachment})));this.opts=o,this.attachment=Xa(this.opts.ref)}static create(o){return new c_(o)}get props(){return x(it(this,kh))}set props(o){ce(it(this,kh),o)}};kh=new WeakMap;let xm=c_;function Xk(m,o){const f=o.setTimeout(m,0),y=o.setTimeout(m,10),M=o.setTimeout(m,50);return[f,y,M]}function Lu(m,o){try{m.insertRule(o)}catch{console.error("pin input could not insert CSS rule:",o)}}var Yk=Te("
                      ");function Kk(m,o){const f=co();Br(o,!0);let y=Lt(o,"id",19,()=>Ya(f)),M=Lt(o,"inputId",19,()=>`${Ya(f)}-input`),z=Lt(o,"ref",15,null),T=Lt(o,"maxlength",3,6),s=Lt(o,"textalign",3,"left"),B=Lt(o,"inputmode",3,"numeric"),N=Lt(o,"onComplete",3,qu),Y=Lt(o,"pushPasswordManagerStrategy",3,"increase-width"),K=Lt(o,"class",3,""),ie=Lt(o,"autocomplete",3,"one-time-code"),H=Lt(o,"disabled",3,!1),me=Lt(o,"value",15,""),ve=Lt(o,"onValueChange",3,qu),Me=ir(o,["$$slots","$$events","$$legacy","id","inputId","ref","maxlength","textalign","pattern","inputmode","onComplete","pushPasswordManagerStrategy","class","children","autocomplete","disabled","value","onValueChange","pasteTransformer"]);const Ee=ym.create({id:vr.with(()=>y()),ref:vr.with(()=>z(),et=>z(et)),inputId:vr.with(()=>M()),autocomplete:vr.with(()=>ie()),maxLength:vr.with(()=>T()),textAlign:vr.with(()=>s()),disabled:vr.with(()=>H()),inputmode:vr.with(()=>B()),pattern:vr.with(()=>o.pattern),onComplete:vr.with(()=>N()),value:vr.with(()=>me(),et=>{me(et),ve()(et)}),pushPasswordManagerStrategy:vr.with(()=>Y()),pasteTransformer:vr.with(()=>o.pasteTransformer)}),Re=ft(()=>Va(Me,Ee.inputProps)),ze=ft(()=>Va(Ee.rootProps,{class:K()})),Fe=ft(()=>Va(Ee.inputWrapperProps,{}));var Ke=Yk();ar(Ke,()=>({...x(ze)}));var rt=E(Ke);oi(rt,()=>o.children??pa,()=>Ee.snippetProps);var qe=q(rt,2);ar(qe,()=>({...x(Fe)}));var He=E(qe);uo(He),ar(He,()=>({...x(Re)})),k(qe),k(Ke),G(m,Ke),Fr()}var Jk=Te("
                      ");function Qk(m,o){const f=co();Br(o,!0);let y=Lt(o,"id",19,()=>Ya(f)),M=Lt(o,"ref",15,null),z=ir(o,["$$slots","$$events","$$legacy","id","ref","cell","child","children"]);const T=xm.create({id:vr.with(()=>y()),ref:vr.with(()=>M(),ie=>M(ie)),cell:vr.with(()=>o.cell)}),s=ft(()=>Va(z,T.props));var B=er(),N=Ct(B);{var Y=ie=>{var H=er(),me=Ct(H);oi(me,()=>o.child,()=>({props:x(s)})),G(ie,H)},K=ie=>{var H=Jk();ar(H,()=>({...x(s)}));var me=E(H);oi(me,()=>o.children??pa),k(H),G(ie,H)};je(N,ie=>{o.child?ie(Y):ie(K,!1)})}G(m,B),Fr()}function Ac(...m){return Lv(Ou(m))}function eA(m,o){Br(o,!0);let f=Lt(o,"ref",15,null),y=Lt(o,"value",15,""),M=ir(o,["$$slots","$$events","$$legacy","ref","value","class"]);var z=er(),T=Ct(z);{let s=ft(()=>Ac("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",o.class));yi(T,()=>yk,(B,N)=>{N(B,Ps({"data-slot":"command",get class(){return x(s)}},()=>M,{get value(){return y()},set value(Y){y(Y)},get ref(){return f()},set ref(Y){f(Y)}}))})}G(m,z),Fr()}var tA=Cr('');function _l(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=tA();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}function rA(m,o){Br(o,!0);let f=Lt(o,"ref",15,null),y=ir(o,["$$slots","$$events","$$legacy","ref","class"]);var M=er(),z=Ct(M);{let T=ft(()=>Ac("py-6 text-center text-sm",o.class));yi(z,()=>bk,(s,B)=>{B(s,Ps({"data-slot":"command-empty",get class(){return x(T)}},()=>y,{get ref(){return f()},set ref(N){f(N)}}))})}G(m,M),Fr()}var nA=Te(" ",1);function iA(m,o){Br(o,!0);let f=Lt(o,"ref",15,null),y=ir(o,["$$slots","$$events","$$legacy","ref","class","children","heading","value"]);var M=er(),z=Ct(M);{let T=ft(()=>Ac("text-foreground overflow-hidden p-1",o.class)),s=ft(()=>o.value??o.heading??`----${hk()}`);yi(z,()=>Tk,(B,N)=>{N(B,Ps({"data-slot":"command-group",get class(){return x(T)},get value(){return x(s)}},()=>y,{get ref(){return f()},set ref(Y){f(Y)},children:(Y,K)=>{var ie=nA(),H=Ct(ie);{var me=Me=>{var Ee=er(),Re=Ct(Ee);yi(Re,()=>Sk,(ze,Fe)=>{Fe(ze,{class:"text-muted-foreground px-2 py-1.5 text-xs font-medium",children:(Ke,rt)=>{vn();var qe=bi();Ye(()=>fe(qe,o.heading)),G(Ke,qe)},$$slots:{default:!0}})}),G(Me,Ee)};je(H,Me=>{o.heading&&Me(me)})}var ve=q(H,2);yi(ve,()=>Mk,(Me,Ee)=>{Ee(Me,{get children(){return o.children}})}),G(Y,ie)},$$slots:{default:!0}}))})}G(m,M),Fr()}function aA(m,o){Br(o,!0);let f=Lt(o,"ref",15,null),y=ir(o,["$$slots","$$events","$$legacy","ref","class"]);var M=er(),z=Ct(M);{let T=ft(()=>Ac("aria-selected:bg-base-300 aria-selected:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",o.class));yi(z,()=>Lk,(s,B)=>{B(s,Ps({"data-slot":"command-item",get class(){return x(T)}},()=>y,{get ref(){return f()},set ref(N){f(N)}}))})}G(m,M),Fr()}var oA=Cr('');function sA(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=oA();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var lA=Te('
                      ');function cA(m,o){Br(o,!0);let f=Lt(o,"ref",15,null),y=Lt(o,"value",15,""),M=ir(o,["$$slots","$$events","$$legacy","ref","class","value"]);var z=lA(),T=E(z);sA(T,{class:"size-5 opacity-50"});var s=q(T,2);{let B=ft(()=>Ac("placeholder:text-muted-foreground outline-hidden flex h-10 w-full rounded-md bg-transparent py-3 text-sm disabled:cursor-not-allowed disabled:opacity-50",o.class));yi(s,()=>Ak,(N,Y)=>{Y(N,Ps({"data-slot":"command-input",get class(){return x(B)}},()=>M,{get ref(){return f()},set ref(K){f(K)},get value(){return y()},set value(K){y(K)}}))})}k(z),G(m,z),Fr()}function uA(m,o){Br(o,!0);let f=Lt(o,"ref",15,null),y=ir(o,["$$slots","$$events","$$legacy","ref","class"]);var M=er(),z=Ct(M);{let T=ft(()=>Ac("max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden",o.class));yi(z,()=>Rk,(s,B)=>{B(s,Ps({"data-slot":"command-list",get class(){return x(T)}},()=>y,{get ref(){return f()},set ref(N){f(N)}}))})}G(m,M),Fr()}var hA=Cr('');function dA(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=hA();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var pA=Te(" ",1),fA=Te(' ',1),mA=Te(' '),_A=Te(" ",1),gA=Te(" ",1),vA=(m,o)=>{o(0)},yA=Te(''),xA=Te('
                      ');function lv(m,o){Br(o,!0);let f=Lt(o,"countryId",15,0),y=Lt(o,"dropdownDirection",3,"right"),M=ct(null),z=ct(null),T=ct("");function s(){Iv().then(()=>{var ze;(ze=document.activeElement)==null||ze.blur(),ce(T,"")})}var B=xA(),N=E(B),Y=E(N),K=E(Y);{var ie=ze=>{var Fe=pA(),Ke=Ct(Fe),rt=E(Ke,!0);k(Ke);var qe=q(Ke,2);dA(qe,{class:"size-3.5"}),Ye(He=>fe(rt,He),[()=>Zv()]),G(ze,Fe)},H=ze=>{const Fe=ft(()=>So(f()));var Ke=fA(),rt=Ct(Ke),qe=E(rt,!0);k(rt);var He=q(rt);Ye(()=>{fe(qe,x(Fe).flag),fe(He,` ${x(Fe).name??""}`)}),G(ze,Ke)};je(K,ze=>{f()===0?ze(ie):ze(H,!1)})}k(Y);var me=q(Y,2);let ve;var Me=E(me);yi(Me,()=>eA,(ze,Fe)=>{Fe(ze,{children:(Ke,rt)=>{var qe=gA(),He=Ct(qe);yi(He,()=>cA,(De,tt)=>{tt(De,{placeholder:"Country",get ref(){return x(M)},set ref(nt){ce(M,nt)},get value(){return x(T)},set value(nt){ce(T,nt,!0)}})});var et=q(He,2);yi(et,()=>uA,(De,tt)=>{tt(De,{children:(nt,Ze)=>{var ke=_A(),bt=Ct(ke);yi(bt,()=>rA,(re,ge)=>{ge(re,{children:(oe,Ae)=>{vn();var Ne=bi();Ye(pt=>fe(Ne,pt),[()=>Ow()]),G(oe,Ne)},$$slots:{default:!0}})});var te=q(bt,2);yi(te,()=>iA,(re,ge)=>{ge(re,{children:(oe,Ae)=>{var Ne=er(),pt=Ct(Ne);hi(pt,17,()=>Hi.countries,ot=>ot.id,(ot,ut)=>{var St=er(),Bt=Ct(St);yi(Bt,()=>aA,(at,dt)=>{dt(at,{get value(){return x(ut).name},onSelect:()=>{f(x(ut).id),s()},children:(vt,yt)=>{var It=mA(),wt=E(It),mt=E(wt,!0);k(wt);var Dt=q(wt);k(It),Ye(()=>{fe(mt,x(ut).flag),fe(Dt,` ${x(ut).name??""}`)}),G(vt,It)},$$slots:{default:!0}})}),G(ot,St)}),G(oe,Ne)},$$slots:{default:!0}})}),G(nt,ke)},$$slots:{default:!0}})}),G(Ke,qe)},$$slots:{default:!0}})}),k(me),k(N);var Ee=q(N,2);{var Re=ze=>{var Fe=yA();Fe.__click=[vA,f];var Ke=E(Fe);_l(Ke,{class:"size-3.5"}),k(Fe),G(ze,Fe)};je(Ee,ze=>{f()!=0&&ze(Re)})}k(B),Po(B,ze=>ce(z,ze),()=>x(z)),Ye(ze=>ve=zr(me,1,"dropdown-content menu bg-base-100 rounded-box z-1 border-base-content/10 w-52 rounded-lg border py-1 shadow-sm",null,ve,ze),[()=>({"right-1":y()==="left"})]),Ai("focus",Y,()=>{x(M).focus()}),G(m,B),Fr()}Qn(["click"]);var bA=Cr('');function wA(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=bA();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var TA=Cr(''),CA=Cr('');function Uu(m,o){let f=ir(o,["$$slots","$$events","$$legacy","filled"]);var y=er(),M=Ct(y);{var z=s=>{var B=TA();ar(B,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(s,B)},T=s=>{var B=CA();ar(B,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(s,B)};je(M,s=>{o.filled?s(z):s(T,!1)})}G(m,y)}var SA=Te(''),PA=Te('
                      '),IA=Te('
                      '),MA=(m,o,f)=>{o.onvisitclick({lat:x(f).lastLatitude,lng:x(f).lastLongitude})},kA=Te(' '),AA=Te('

                      '),EA=Te(' '),zA=Te('

                      '),LA=Te(' '),DA=Te(" "),RA=Te('
                      '),BA=Te('

                      '),FA=Te(' '),OA=Te('

                      '),NA=Te('
                      '),jA=Te('
                      ',1);function VA(m,o){Br(o,!0);const f=[];let y=ct(1e3);const M=ft(()=>x(y)<=640);let z=ct("today"),T={regions:{label:YT(),icon:km},countries:{label:QT(),icon:wA},players:{label:Xv(),icon:vp},alliances:{label:Yv(),icon:yp}},s=ct("regions"),B=ct(0),N=xi({players:{},alliances:{},regions:{},countries:{}}),Y=ft(()=>{var qe,He,et;return x(s)==="regions"?(He=(qe=N[x(s)][x(B)])==null?void 0:qe[x(z)])==null?void 0:He.entries:(et=N[x(s)][x(z)])==null?void 0:et.entries});const K=5*1e3;Wr(()=>{var De;if(!o.open)return;const qe=x(z),He=x(s),et=x(B);He==="players"&&(!N[He][qe]||Date.now()-N[He][qe].time>K)?en.leaderboardPlayers(qe).then(tt=>{N[He][qe]={time:Date.now(),entries:tt}}).catch(tt=>Nr.error(tt.message)):He==="alliances"&&(!N[He][qe]||Date.now()-N[He][qe].time>K)?en.leaderboardAlliances(qe).then(tt=>{N[He][qe]={time:Date.now(),entries:tt}}).catch(tt=>Nr.error(tt.message)):He==="countries"&&(!N[He][qe]||Date.now()-N[He][qe].time>K)?en.leaderboardCountries(qe).then(tt=>{N[He][qe]={time:Date.now(),entries:tt}}).catch(tt=>Nr.error(tt.message)):He==="regions"&&(!((De=N[He][et])!=null&&De[qe])||Date.now()-N[He][et][qe].time>K)&&en.leaderboardRegions(qe,et).then(tt=>{N[He][et]||(N[He][et]={}),N[He][et][qe]={time:Date.now(),entries:tt}}).catch(tt=>Nr.error(tt.message))});var ie=jA(),H=Ct(ie);hi(H,21,()=>Object.entries(T),([qe,{label:He,icon:et}])=>qe,(qe,He)=>{var et=ft(()=>Mv(x(He),2));let De=()=>x(et)[0],tt=()=>x(et)[1].label,nt=()=>x(et)[1].icon;const Ze=ft(nt);var ke=SA(),bt=E(ke);uo(bt);var te,re=q(bt,2);yi(re,()=>x(Ze),(oe,Ae)=>{Ae(oe,{get this(){return nt()},class:"mr-1 size-5 max-sm:hidden"})});var ge=q(re);k(ke),Ye(()=>{xr(bt,"aria-label",tt()),te!==(te=De())&&(bt.value=(bt.__value=De())??""),fe(ge,` ${tt()??""}`)}),Em(f,[],bt,()=>(De(),x(s)),oe=>ce(s,oe)),G(qe,ke)}),k(H);var me=q(H,2),ve=E(me);Zm(ve,{get value(){return x(z)},set value(qe){ce(z,qe,!0)}});var Me=q(ve,2);{var Ee=qe=>{lv(qe,{dropdownDirection:"left",get countryId(){return x(B)},set countryId(He){ce(B,He,!0)}})};je(Me,qe=>{x(s)==="regions"&&!x(M)&&qe(Ee)})}k(me);var Re=q(me,2);{var ze=qe=>{var He=PA(),et=E(He);lv(et,{get countryId(){return x(B)},set countryId(De){ce(B,De,!0)}}),k(He),G(qe,He)};je(Re,qe=>{x(s)==="regions"&&x(M)&&qe(ze)})}var Fe=q(Re,2);{var Ke=qe=>{var He=IA(),et=E(He),De=q(et);{var tt=Ze=>{var ke=bi();Ye(bt=>fe(ke,bt),[()=>gp().toLowerCase()]),G(Ze,ke)},nt=Ze=>{var ke=er(),bt=Ct(ke);{var te=ge=>{var oe=bi();Ye(Ae=>fe(oe,Ae),[()=>Om()]),G(ge,oe)},re=ge=>{var oe=er(),Ae=Ct(oe);{var Ne=pt=>{var ot=bi();Ye(ut=>fe(ot,ut),[()=>Nm()]),G(pt,ot)};je(Ae,pt=>{x(z)==="month"&&pt(Ne)},!0)}G(ge,oe)};je(bt,ge=>{x(z)==="week"?ge(te):ge(re,!1)},!0)}G(Ze,ke)};je(De,Ze=>{x(z)==="today"?Ze(tt):Ze(nt,!1)})}k(He),Ye(Ze=>fe(et,`${Ze??""} `),[()=>Fm()]),G(qe,He)},rt=qe=>{var He=er(),et=Ct(He);{var De=nt=>{var Ze=er(),ke=Ct(Ze);{var bt=re=>{const ge=ft(()=>x(Y));var oe=AA(),Ae=E(oe),Ne=E(Ae),pt=q(E(Ne)),ot=E(pt,!0);k(pt);var ut=q(pt),St=E(ut),Bt=q(St,2),at=q(Bt),dt=E(at);Uu(dt,{class:"text-base-content/50 mb-0.5 ml-1 inline size-4"}),k(at),k(ut),vn(),k(Ne),k(Ae);var vt=q(Ae);hi(vt,31,()=>x(ge),yt=>yt.id,(yt,It,wt)=>{const mt=ft(()=>So(x(It).countryId));var Dt=kA(),zt=E(Dt),qt=E(zt,!0);k(zt);var tr=q(zt),Qt=E(tr),Ot=E(Qt,!0);k(Qt);var fr=q(Qt,2),kr=E(fr),Ar=q(kr),rr=E(Ar);k(Ar),k(fr),k(tr);var Kt=q(tr),or=E(Kt,!0);k(Kt);var Sr=q(Kt),Dr=E(Sr);Dr.__click=[MA,o,It];var Zr=E(Dr,!0);k(Dr),k(Sr),k(Dt),Ye((se,j,Z)=>{fe(qt,x(wt)+1),xr(Qt,"data-tip",x(mt).name),fe(Ot,x(mt).flag),zr(fr,1,`font-semibold ${se??""}`),fe(kr,`${x(It).name??""} `),fe(rr,`#${x(It).number??""}`),fe(or,j),fe(Zr,Z)},[()=>Oi(x(It).cityId),()=>x(It).pixelsPainted.toLocaleString("en-US"),()=>Ix()]),sl(Dt,()=>ll,()=>({duration:200})),G(yt,Dt)}),k(vt),k(oe),Ye((yt,It,wt,mt)=>{fe(ot,yt),fe(St,`${It??""} `),fe(Bt,`${wt??""} `),xr(at,"data-tip",mt)},[()=>oC(),()=>vc(),()=>yc().toLowerCase(),()=>pC()]),G(re,oe)},te=re=>{var ge=er(),oe=Ct(ge);{var Ae=pt=>{var ot=zA(),ut=E(ot),St=E(ut),Bt=q(E(St)),at=E(Bt,!0);k(Bt);var dt=q(Bt),vt=E(dt),yt=q(vt,2),It=q(yt),wt=E(It);Uu(wt,{class:"text-base-content/50 mb-0.5 ml-1 inline size-4"}),k(It),k(dt),k(St),k(ut);var mt=q(ut);hi(mt,31,()=>x(Y),Dt=>Dt.id,(Dt,zt,qt)=>{const tr=ft(()=>So(x(zt).id));var Qt=EA(),Ot=E(Qt),fr=E(Ot,!0);k(Ot);var kr=q(Ot),Ar=E(kr),rr=E(Ar,!0);k(Ar);var Kt=q(Ar,2),or=E(Kt,!0);k(Kt),k(kr);var Sr=q(kr),Dr=E(Sr,!0);k(Sr),k(Qt),Ye((Zr,se)=>{fe(fr,x(qt)+1),xr(Ar,"data-tip",x(tr).name),fe(rr,x(tr).flag),zr(Kt,1,`font-semibold ${Zr??""}`),fe(or,x(tr).name),fe(Dr,se)},[()=>Oi(x(zt).id),()=>x(zt).pixelsPainted.toLocaleString("en-US")]),sl(Qt,()=>ll,()=>({duration:200})),G(Dt,Qt)}),k(mt),k(ot),Ye((Dt,zt,qt,tr)=>{fe(at,Dt),fe(vt,`${zt??""} `),fe(yt,`${qt??""} `),xr(It,"data-tip",tr)},[()=>Zv(),()=>vc(),()=>yc().toLowerCase(),()=>ZC()]),G(pt,ot)},Ne=pt=>{var ot=er(),ut=Ct(ot);{var St=at=>{const dt=ft(()=>x(Y));var vt=BA(),yt=E(vt),It=E(yt),wt=q(E(It)),mt=E(wt,!0);k(wt);var Dt=q(wt),zt=E(Dt),qt=q(zt,2,!0);k(Dt),k(It),k(yt);var tr=q(yt);hi(tr,31,()=>x(dt),Qt=>Qt.id,(Qt,Ot,fr)=>{const kr=ft(()=>{var xe;return((xe=kt.data)==null?void 0:xe.id)===x(Ot).id});var Ar=RA();let rr;var Kt=E(Ar),or=E(Kt,!0);k(Kt);var Sr=q(Kt),Dr=E(Sr),Zr=E(Dr);lo(Zr,{class:"size-8 border sm:size-10",get userId(){return x(Ot).id},get pictureUrl(){return x(Ot).picture}});var se=q(Zr,2),j=E(se),Z=E(j),X=q(Z),ae=E(X);k(X),k(j);var de=q(j,2);{var Se=xe=>{const Ft=ft(()=>So(x(Ot).equippedFlag));var cr=LA(),Jt=E(cr,!0);k(cr),Ye(()=>{xr(cr,"data-tip",x(Ft).name),fe(Jt,x(Ft).flag)}),G(xe,cr)};je(de,xe=>{x(Ot).equippedFlag&&xe(Se)})}var Ie=q(de,2);{var be=xe=>{Ah(xe,{get username(){return x(Ot).discord},get id(){return x(Ot).discordId}})};je(Ie,xe=>{x(Ot).discord&&xe(be)})}var Oe=q(Ie,2);{var st=xe=>{var Ft=DA(),cr=E(Ft,!0);k(Ft),Ye((Jt,Tr)=>{zr(Ft,1,`badge badge-sm ml-0.5 border-0 ${Jt??""} ${Tr??""}`),fe(cr,x(Ot).allianceName)},[()=>dp(x(Ot).allianceId),()=>Oi(x(Ot).allianceId)]),G(xe,Ft)};je(Oe,xe=>{"allianceName"in x(Ot)&&x(Ot).allianceName&&xe(st)})}k(se),k(Dr),k(Sr);var $e=q(Sr),Mt=E($e,!0);k($e),k(Ar),Ye((xe,Ft,cr)=>{rr=zr(Ar,1,"",null,rr,xe),fe(or,x(fr)+1),zr(j,1,`font-semibold max-sm:ml-2 ${Ft??""} flex gap-1`),fe(Z,`${x(Ot).name??""} `),fe(ae,`#${x(Ot).id??""}`),fe(Mt,cr)},[()=>({"bg-base-200":x(kr)}),()=>Oi(x(Ot).id),()=>x(Ot).pixelsPainted.toLocaleString("en-US")]),sl(Ar,()=>ll,()=>({duration:200})),G(Qt,Ar)}),k(tr),k(vt),Ye((Qt,Ot,fr)=>{fe(mt,Qt),fe(zt,`${Ot??""} `),fe(qt,fr)},[()=>Lm(),()=>vc(),()=>yc().toLowerCase()]),G(at,vt)},Bt=at=>{var dt=er(),vt=Ct(dt);{var yt=It=>{var wt=OA(),mt=E(wt),Dt=E(mt),zt=q(E(Dt)),qt=E(zt,!0);k(zt);var tr=q(zt),Qt=E(tr),Ot=q(Qt,2,!0);k(tr),k(Dt),k(mt);var fr=q(mt);hi(fr,31,()=>x(Y),kr=>kr.id,(kr,Ar,rr)=>{const Kt=ft(()=>{var de;return((de=kt.data)==null?void 0:de.allianceId)===x(Ar).id});var or=FA();let Sr;var Dr=E(or),Zr=E(Dr,!0);k(Dr);var se=q(Dr),j=E(se),Z=E(j,!0);k(j),k(se);var X=q(se),ae=E(X,!0);k(X),k(or),Ye((de,Se,Ie)=>{Sr=zr(or,1,"",null,Sr,de),fe(Zr,x(rr)+1),zr(j,1,`font-semibold ${Se??""}`),fe(Z,x(Ar).name),fe(ae,Ie)},[()=>({"bg-base-200":x(Kt)}),()=>Oi(x(Ar).id),()=>x(Ar).pixelsPainted.toLocaleString("en-US")]),sl(or,()=>ll,()=>({duration:200})),G(kr,or)}),k(fr),k(wt),Ye((kr,Ar,rr)=>{fe(qt,kr),fe(Qt,`${Ar??""} `),fe(Ot,rr)},[()=>mp(),()=>vc(),()=>yc().toLowerCase()]),G(It,wt)};je(vt,It=>{x(s)==="alliances"&&It(yt)},!0)}G(at,dt)};je(ut,at=>{x(s)==="players"?at(St):at(Bt,!1)},!0)}G(pt,ot)};je(oe,pt=>{x(s)==="countries"?pt(Ae):pt(Ne,!1)},!0)}G(re,ge)};je(ke,re=>{x(s)==="regions"?re(bt):re(te,!1)})}G(nt,Ze)},tt=nt=>{var Ze=NA();G(nt,Ze)};je(et,nt=>{x(Y)?nt(De):nt(tt,!1)},!0)}G(qe,He)};je(Fe,qe=>{x(Y)&&x(Y).length===0?qe(Ke):qe(rt,!1)})}fp("innerWidth",qe=>ce(y,qe,!0)),G(m,ie),Fr()}Qn(["click"]);var qA=Cr('');function P0(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=qA();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var ZA=Te(' ');function UA(m,o){Br(o,!0);let f=Lt(o,"open",15);Dn(()=>{const K=ie=>{ie.key==="Escape"&&f(!1)};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)});var y=ZA(),M=E(y),z=q(E(M),2),T=E(z);P0(T,{class:"size-6"});var s=q(T,2),B=E(s,!0);k(s),k(z);var N=q(z,2),Y=E(N);VA(Y,{get onvisitclick(){return o.onvisitclick},get open(){return f()}}),k(N),k(M),vn(2),k(y),Wi(y,()=>K=>{Wr(()=>{f()?K.show():K.close()})}),Ye(K=>fe(B,K),[()=>Rm()]),Ai("close",y,()=>f(!1)),G(m,y),Fr()}var $A=Te("
                      "),GA=Te(' ');function HA(m,o){Br(o,!0);let f=Lt(o,"open",15);Dn(()=>{const s=B=>{B.key==="Escape"&&f(!1)};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)});var y=GA(),M=E(y),z=q(E(M),2);{var T=s=>{var B=$A(),N=E(B);Ox(N,{}),k(B),ki(2,B,()=>ia,()=>({duration:300})),G(s,B)};je(z,s=>{f()&&s(T)})}k(M),vn(2),k(y),Wi(y,()=>s=>{Wr(()=>{f()?s.show():s.close()})}),Ai("close",y,()=>f(!1)),G(m,y),Fr()}var WA=(m,o,f)=>{localStorage.setItem(x(o),"true"),ce(f,!1)},XA=Te('new'),YA=Te("
                      ");function Nf(m,o){Br(o,!0);let f=ct(!1);const y=ft(()=>"showed:"+o.key);Dn(()=>{ce(f,!localStorage.getItem(x(y)))});var M=YA();M.__click=[WA,y,f];var z=E(M);{var T=B=>{var N=XA();ki(3,N,()=>ia,()=>({duration:200})),G(B,N)};je(z,B=>{x(f)&&B(T)})}var s=q(z,2);oi(s,()=>o.children),k(M),Ye(()=>zr(M,1,`indicator ${o.class??""}`)),G(m,M),Fr()}Qn(["click"]);var KA=Te("

                      You don't have charges to paint.

                      ");function JA(m,o){Br(o,!1),Nv();var f=KA(),y=q(E(f),2);k(f),Ye(M=>fe(y,` Next charge in ${M??""}`),[()=>tp(kt.cooldown??0)]),G(m,f),Fr()}var QA=Te("");function I0(m,o){Br(o,!0);let f=Lt(o,"width",15,0),y=ir(o,["$$slots","$$events","$$legacy","value","fontSize","color","weight","mono","width"]),M=ft(()=>Math.ceil(o.fontSize)),z=ct(null);const T=window.devicePixelRatio??1,s='"Geist", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',B='"Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace';Wr(()=>{const Y=x(z).getContext("2d");Y.textBaseline="top",Y.font=`${o.weight??"normal"} ${o.fontSize}px ${o.mono?B:s}`,Y.fillStyle=o.color??"#394e6a",Y.setTransform(T,0,0,T,0,0),Y.clearRect(0,0,f(),x(M)),Y.fillText(o.value,0,0);const K=Y.measureText(o.value);f(Math.ceil(K.actualBoundingBoxRight)),ce(M,K.actualBoundingBoxDescent)});var N=QA();ar(N,()=>({width:f()*T,height:x(M)*T,style:`width: ${f()??""}px; height: ${x(M)??""}px`,...y})),Po(N,Y=>ce(z,Y),()=>x(z)),G(m,N),Fr()}var eE=Te(' '),tE=Te(' '),rE=Te(''),nE=Te('');function M0(m,o){Br(o,!0);let f=ir(o,["$$slots","$$events","$$legacy","loading","charges"]),y=ct(0);var M=nE();ar(M,()=>({...f,class:`btn btn-primary btn-lg sm:btn-xl relative ${o.class??""}`}));var z=E(M);Eh(z,{class:"size-6"});var T=q(z,2),s=E(T),B=q(s);{var N=ie=>{const H=ft(()=>`${Math.floor(o.charges)}/${kt.data.charges.max}`);var me=tE(),ve=E(me),Me=E(ve);{let ze=ft(()=>o.disabled?"#394e6a33":"#ffffff");I0(Me,{weight:600,fontSize:16,get value(){return x(H)},get color(){return x(ze)},get width(){return x(y)},set width(Fe){ce(y,Fe,!0)}})}k(ve);var Ee=q(ve,2);{var Re=ze=>{var Fe=eE(),Ke=E(Fe);k(Fe),Ye(rt=>fe(Ke,`(${rt??""})`),[()=>tp(kt.cooldown)]),G(ze,Fe)};je(Ee,ze=>{o.chargeskc(ve,`width: ${ze??""}px`),[()=>(Math.floor(x(y)/5)+1)*5]),G(ie,me)};je(B,ie=>{o.charges!==void 0&&kt.data&&ie(N)})}k(T);var Y=q(T,2);{var K=ie=>{var H=rE();G(ie,H)};je(Y,ie=>{o.loading&&ie(K)})}k(M),Ye(ie=>fe(s,`${ie??""} `),[()=>$v()]),G(m,M),Fr()}const iE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAABVQTFRFAAAASkKEenHEta7xWmmLi5y0v8vc+SuCVQAAAAF0Uk5TAEDm2GYAAAA/SURBVHjaXcjBDcAwDMNAUW28/8hF0MCIzN9RV7aVfuxp+IGPe+AdPQRpFaRrgcNrn/Bb4LAE4W5aNb3TXUofoSgBYpzN5I4AAAAASUVORK5CYII=",aE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAFxJREFUeNq107EJACAMRFEHyxSu4jbuZ+0IyhUS4ZDogYEr3++Svp+ZDUzGrRTMIwKmiIApImCKiBgbOXOEcRxQsQcW7rVKeA9gj5gD2D3mgC/GcQSLMEdO+/qtE+/GV5duYCOPAAAAAElFTkSuQmCC",oE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAAXNSR0IArs4c6QAAAAJ0Uk5TAAB2k804AAAAKklEQVR42mOAAhsbCA3n//9vQ74ApqE2QIAgwIqBykFaICwMAQwt9HEpAIf2Me1Ro5Q9AAAAAElFTkSuQmCC",sE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAAXNSR0IArs4c6QAAABVJREFUeNpjYGA48x8DYwoB1Q0RlQDDCVmniJ241gAAAABJRU5ErkJggg==";class lE{constructor(o){gr(this,"gm");gr(this,"opacity",1);gr(this,"id",`paint-preview-${Math.random()}`);gr(this,"tiles",new Map);this.input=o,this.gm=new fl(this.input.tileSize)}place([o,f],y){const{tile:M,pixel:z}=this.gm.latLonToTileAndPixel(o,f,this.input.tileZoom),T=this.getTileKey(M[0],M[1]);let s=this.tiles.get(T);if(!s){const B=this.gm.tileBoundsLatLon(M[0],M[1],this.input.tileZoom),N=jm(B,!0),Y=new cE({coordinates:N,id:`${this.id}-${T}`,layerPaint:{"raster-opacity":this.opacity,"raster-resampling":"nearest"},tileSize:this.input.tileSize,beforeLayerId:this.input.beforeLayerId});Y.addTo(this.input.map),this.tiles.set(T,Y),s=Y}s.place(z[0],this.input.tileSize-z[1]-1,y)}clear(){const o=this.input.map;for(const f of this.tiles.values())f.removeFrom(o),f.removeDOM();this.tiles.clear()}clearAndPlace(o,f){this.clear(),this.place(o,f)}remove([o,f]){const{tile:y,pixel:M}=this.gm.latLonToTileAndPixel(o,f,this.input.tileZoom),z=this.getTileKey(y[0],y[1]),T=this.tiles.get(z);T&&T.remove(M[0],this.input.tileSize-M[1]-1)}setCanvasOpacity(o){this.opacity=o;for(const f of this.tiles.values())f.setOpacity(o)}getTileKey(o,f){return`${o},${f}`}}class cE{constructor(o){gr(this,"canvas");gr(this,"maps",new Set);this.input=o;const f=this.input.tileSize;this.canvas=document.createElement("canvas"),this.canvas.width=f,this.canvas.height=f}place(o,f,y){var T;const M=((T=Hi.colors)==null?void 0:T[y])??Hi.colors[0],z=this.canvas.getContext("2d");if(z){const s=z.createImageData(1,1),[B,N,Y]=M.rgb,K=y===0?0:255;s.data[0]=B,s.data[1]=N,s.data[2]=Y,s.data[3]=K,z.putImageData(s,o,f)}}remove(o,f){const y=this.canvas.getContext("2d");y&&y.clearRect(o,f,1,1)}addTo(o){const f=this.input.id;o.getSource(f)||o.addSource(f,{type:"canvas",canvas:this.canvas,coordinates:this.input.coordinates}),o.getLayer(f)||(o.addLayer({id:f,type:"raster",source:f,paint:this.input.layerPaint}),this.input.beforeLayerId&&o.moveLayer(f,this.input.beforeLayerId)),this.maps.add(o)}removeFrom(o){const{id:f}=this.input;o.getLayer(f)&&o.removeLayer(f),o.getSource(f)&&o.removeSource(f),this.maps.delete(o)}removeDOM(){this.canvas.remove()}setOpacity(o){for(const f of this.maps.values())f.setPaintProperty(this.input.id,"raster-opacity",o)}}var uE=Cr('');function hE(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=uE();ar(y,()=>({viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...f})),G(m,y)}var dE=Cr('');function pE(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=dE();ar(y,()=>({viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...f})),G(m,y)}var fE=Te("
                      ");function al(m,o){Br(o,!0);var f=fE(),y=E(f);oi(y,()=>o.children??pa),k(f),Ye(()=>zr(f,1,`bg-base-100/60 border-base-content/20 -top-15 pointer-events-none absolute left-1/2 line-clamp-1 flex w-max -translate-x-1/2 select-none items-center gap-1 rounded-full border-2 px-3 py-1.5 ${o.class??""}`)),G(m,f),Fr()}var mE=Te('
                      '),_E=Te("
                      ");function Wm(m,o){Br(o,!0);const f=Lt(o,"size",3,10),y=Lt(o,"x",19,()=>[-.5,.5]),M=Lt(o,"y",19,()=>[.25,1]),z=Lt(o,"duration",3,2e3),T=Lt(o,"infinite",3,!1),s=Lt(o,"delay",19,()=>[0,50]),B=Lt(o,"colorRange",19,()=>[0,360]),N=Lt(o,"colorArray",19,()=>[]),Y=Lt(o,"amount",3,50),K=Lt(o,"iterationCount",3,1),ie=Lt(o,"fallDistance",3,"100px"),H=Lt(o,"rounded",3,!1),me=Lt(o,"cone",3,!1),ve=Lt(o,"noGravity",3,!1),Me=Lt(o,"xSpread",3,.15),Ee=Lt(o,"destroyOnComplete",3,!0),Re=Lt(o,"disableForReducedMotion",3,!1);let ze=ct(!1);Dn(()=>{!Ee()||T()||typeof K()=="string"||setTimeout(()=>ce(ze,!0),(z()+s()[1])*K())});function Fe(et,De){return Math.random()*(De-et)+et}function Ke(){return N().length?N()[Math.round(Math.random()*(N().length-1))]:`hsl(${Math.round(Fe(B()[0],B()[1]))}, 75%, 50%)`}var rt=er(),qe=Ct(rt);{var He=et=>{var De=_E();let tt;hi(De,21,()=>({length:Y()}),hp,(nt,Ze)=>{var ke=mE();Ye((bt,te,re,ge,oe,Ae,Ne,pt,ot,ut,St)=>kc(ke,` - --color: ${bt??""}; - --skew: ${te??""}deg,${re??""}deg; - --rotation-xyz: ${ge??""}, ${oe??""}, ${Ae??""}; - --rotation-deg: ${Ne??""}deg; - --translate-y-multiplier: ${pt??""}; - --translate-x-multiplier: ${ot??""}; - --scale: ${ut??""}; - --transition-delay: ${St??""}ms; - --transition-duration: ${T()?`calc(${z()}ms * var(--scale))`:`${z()}ms`};`),[Ke,()=>Fe(-45,45),()=>Fe(-45,45),()=>Fe(-10,10),()=>Fe(-10,10),()=>Fe(-10,10),()=>Fe(0,360),()=>Fe(M()[0],M()[1]),()=>Fe(y()[0],y()[1]),()=>.1*Fe(2,10),()=>Fe(s()[0],s()[1])]),G(nt,ke)}),k(De),Ye(nt=>{tt=zr(De,1,"confetti-holder svelte-15ksp55",null,tt,nt),kc(De,` - --fall-distance: ${ie()??""}; - --size: ${f()??""}px; - --x-spread: ${1-Me()}; - --transition-iteration-count: ${(T()?"infinite":K())??""};`)},[()=>({rounded:H(),cone:me(),"no-gravity":ve(),"reduced-motion":Re()})]),G(et,De)};je(qe,et=>{x(ze)||et(He)})}G(m,rt),Fr()}var gE=async(m,o,f,y)=>{try{ce(o,!0),await en.purchase({id:f,amount:1,variant:y.colorIdx}),await kt.refresh(),aa.notification1.play()}catch(M){Nr.error(M.message)}finally{ce(o,!1)}},vE=Te(''),yE=Te(' Droplets',1),xE=Te(' Unlocked ',1),bE=(m,o)=>o(!1),wE=Te('

                      Unlock

                      Permanently unlock the color

                      '),TE=Te(' ');function CE(m,o){Br(o,!0);let f=Lt(o,"open",15);const y=ft(()=>Hi.colors[o.colorIdx]),M=ft(()=>{var H;return((H=kt.data)==null?void 0:H.droplets)??0});let z=ct(!1);const T=ft(()=>(x(z),kt.hasColor(o.colorIdx)));Dn(()=>{const H=me=>{me.key==="Escape"&&f(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)});const s=100,B=Hi.products[s];var N=TE(),Y=E(N),K=q(E(Y),2);{var ie=H=>{var me=wE(),ve=E(me),Me=E(ve),Ee=E(Me);rp(Ee,{class:"size-6"});var Re=q(Ee,4),ze=E(Re);Fv(ze,{get value(){return x(M)}}),k(Re),k(Me),vn(2),k(ve);var Fe=q(ve,2),Ke=E(Fe),rt=E(Ke);k(Ke);var qe=q(Ke,2),He=E(qe,!0);k(qe);var et=q(qe,2),De=E(et);let tt;var nt=E(De);nt.__click=[gE,z,s,o];var Ze=E(nt);{var ke=oe=>{var Ae=vE();G(oe,Ae)};je(Ze,oe=>{x(z)&&oe(ke)})}var bt=q(Ze,2);{var te=oe=>{var Ae=yE(),Ne=Ct(Ae);pp(Ne,{class:"size-5"});var pt=q(Ne);vn(),Ye(ot=>fe(pt,` ${ot??""} `),[()=>B.price.toLocaleString("en-US")]),G(oe,Ae)},re=oe=>{var Ae=xE(),Ne=Ct(Ae);rp(Ne,{class:"size-5"});var pt=q(Ne,2),ot=E(pt);Wm(ot,{}),k(pt),G(oe,Ae)};je(bt,oe=>{x(T)?oe(re,!1):oe(te)})}k(nt),k(De);var ge=q(De,2);ge.__click=[bE,f],k(et),k(Fe),k(me),Ye((oe,Ae)=>{kc(rt,`background: rgb(${x(y).rgb[0]} ${x(y).rgb[1]} ${x(y).rgb[2]})`),xr(rt,"aria-label",x(y).name),fe(He,x(y).name),xr(De,"data-tip",oe),tt=zr(De,1,"",null,tt,Ae),nt.disabled=x(M)_p(),()=>({tooltip:!x(T)&&x(M){kt.data&&H(ie)})}k(Y),vn(2),k(N),Wi(N,()=>H=>{Wr(()=>{f()?H.show():H.close()})}),Ai("close",N,()=>f(!1)),G(m,N),Fr()}Qn(["click"]);var bm=function(){return bm=Object.assign||function(o){for(var f,y=1,M=arguments.length;y0&&z[z.length-1])&&(N[0]===6||N[0]===2)){f=0;continue}if(N[0]===3&&(!z||N[1]>z[0]&&N[1]=M+f?(M=T,[4,SE()]):[3,3]):[3,4];case 2:s.sent(),s.label=3;case 3:return++z,[3,1];case 4:return[2,y]}})})}function $u(m){return m.then(void 0,function(){}),m}function IE(m,o){for(var f=0,y=m.length;f=1)return Math.round(m/o)*o;var f=1/o;return Math.round(m*f)/f}function kE(m){for(var o,f,y="Unexpected syntax '".concat(m,"'"),M=/^\s*([a-z-]*)(.*)$/i.exec(m),z=M[1]||void 0,T={},s=/([.:#][\w-]+|\[.+?\])/gi,B=function(ie,H){T[ie]=T[ie]||[],T[ie].push(H)};;){var N=s.exec(M[2]);if(!N)break;var Y=N[0];switch(Y[0]){case".":B("class",Y.slice(1));break;case"#":B("id",Y.slice(1));break;case"[":{var K=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(Y);if(K)B(K[1],(f=(o=K[4])!==null&&o!==void 0?o:K[5])!==null&&f!==void 0?f:"");else throw new Error(y);break}default:throw new Error(y)}}return[z,T]}function AE(m){for(var o=new Uint8Array(m.length),f=0;f127)return new TextEncoder().encode(m);o[f]=y}return o}function bs(m,o){var f=m[0]>>>16,y=m[0]&65535,M=m[1]>>>16,z=m[1]&65535,T=o[0]>>>16,s=o[0]&65535,B=o[1]>>>16,N=o[1]&65535,Y=0,K=0,ie=0,H=0;H+=z+N,ie+=H>>>16,H&=65535,ie+=M+B,K+=ie>>>16,ie&=65535,K+=y+s,Y+=K>>>16,K&=65535,Y+=f+T,Y&=65535,m[0]=Y<<16|K,m[1]=ie<<16|H}function Ga(m,o){var f=m[0]>>>16,y=m[0]&65535,M=m[1]>>>16,z=m[1]&65535,T=o[0]>>>16,s=o[0]&65535,B=o[1]>>>16,N=o[1]&65535,Y=0,K=0,ie=0,H=0;H+=z*N,ie+=H>>>16,H&=65535,ie+=M*N,K+=ie>>>16,ie&=65535,ie+=z*B,K+=ie>>>16,ie&=65535,K+=y*N,Y+=K>>>16,K&=65535,K+=M*B,Y+=K>>>16,K&=65535,K+=z*s,Y+=K>>>16,K&=65535,Y+=f*N+y*B+M*s+z*T,Y&=65535,m[0]=Y<<16|K,m[1]=ie<<16|H}function fc(m,o){var f=m[0];o%=64,o===32?(m[0]=m[1],m[1]=f):o<32?(m[0]=f<>>32-o,m[1]=m[1]<>>32-o):(o-=32,m[0]=m[1]<>>32-o,m[1]=f<>>32-o)}function Na(m,o){o%=64,o!==0&&(o<32?(m[0]=m[1]>>>32-o,m[1]=m[1]<>>1];ri(m,o),Ga(m,EE),o[1]=m[0]>>>1,ri(m,o),Ga(m,zE),o[1]=m[0]>>>1,ri(m,o)}var Ud=[2277735313,289559509],$d=[1291169091,658871167],dv=[0,5],LE=[0,1390208809],DE=[0,944331445];function RE(m,o){var f=AE(m);o=o||0;var y=[0,f.length],M=y[1]%16,z=y[1]-M,T=[0,o],s=[0,o],B=[0,0],N=[0,0],Y;for(Y=0;Y>>0).toString(16)).slice(-8)+("00000000"+(T[1]>>>0).toString(16)).slice(-8)+("00000000"+(s[0]>>>0).toString(16)).slice(-8)+("00000000"+(s[1]>>>0).toString(16)).slice(-8)}function BE(m){var o;return bm({name:m.name,message:m.message,stack:(o=m.stack)===null||o===void 0?void 0:o.split(` -`)},m)}function FE(m){return/^function\s.*?\{\s*\[native code]\s*}$/.test(String(m))}function OE(m){return typeof m!="function"}function NE(m,o){var f=$u(new Promise(function(y){var M=Date.now();cv(m.bind(null,o),function(){for(var z=[],T=0;T=4}function VE(){var m=window,o=navigator;return fa(["msWriteProfilerMark"in m,"MSStream"in m,"msLaunchUri"in o,"msSaveBlob"in o])>=3&&!L0()}function Lh(){var m=window,o=navigator;return fa(["webkitPersistentStorage"in o,"webkitTemporaryStorage"in o,(o.vendor||"").indexOf("Google")===0,"webkitResolveLocalFileSystemURL"in m,"BatteryManager"in m,"webkitMediaStream"in m,"webkitSpeechGrammar"in m])>=5}function ho(){var m=window,o=navigator;return fa(["ApplePayError"in m,"CSSPrimitiveValue"in m,"Counter"in m,o.vendor.indexOf("Apple")===0,"RGBColor"in m,"WebKitMediaKeys"in m])>=4}function Ym(){var m=window,o=m.HTMLElement,f=m.Document;return fa(["safari"in m,!("ongestureend"in m),!("TouchEvent"in m),!("orientation"in m),o&&!("autocapitalize"in o.prototype),f&&"pointerLockElement"in f.prototype])>=4}function Dh(){var m=window;return FE(m.print)&&String(m.browser)==="[object WebPageNamespace]"}function D0(){var m,o,f=window;return fa(["buildID"in navigator,"MozAppearance"in((o=(m=document.documentElement)===null||m===void 0?void 0:m.style)!==null&&o!==void 0?o:{}),"onmozfullscreenchange"in f,"mozInnerScreenX"in f,"CSSMozDocumentRule"in f,"CanvasCaptureMediaStream"in f])>=4}function qE(){var m=window;return fa([!("MediaSettingsRange"in m),"RTCEncodedAudioFrame"in m,""+m.Intl=="[object Intl]",""+m.Reflect=="[object Reflect]"])>=3}function ZE(){var m=window,o=m.URLPattern;return fa(["union"in Set.prototype,"Iterator"in m,o&&"hasRegExpGroups"in o.prototype,"RGB8"in WebGLRenderingContext.prototype])>=3}function UE(){var m=window;return fa(["DOMRectList"in m,"RTCPeerConnectionIceEvent"in m,"SVGGeometryElement"in m,"ontransitioncancel"in m])>=3}function Rh(){var m=window,o=navigator,f=m.CSS,y=m.HTMLButtonElement;return fa([!("getStorageUpdates"in o),y&&"popover"in y.prototype,"CSSCounterStyleRule"in m,f.supports("font-size-adjust: ex-height 0.5"),f.supports("text-transform: full-width")])>=4}function $E(){if(navigator.platform==="iPad")return!0;var m=screen,o=m.width/m.height;return fa(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,o>.65&&o<1.53])>=2}function GE(){var m=document;return m.fullscreenElement||m.msFullscreenElement||m.mozFullScreenElement||m.webkitFullscreenElement||null}function HE(){var m=document;return(m.exitFullscreen||m.msExitFullscreen||m.mozCancelFullScreen||m.webkitExitFullscreen).call(m)}function Km(){var m=Lh(),o=D0(),f=window,y=navigator,M="connection";return m?fa([!("SharedWorker"in f),y[M]&&"ontypechange"in y[M],!("sinkId"in new Audio)])>=2:o?fa(["onorientationchange"in f,"orientation"in f,/android/i.test(y.appVersion)])>=2:!1}function WE(){var m=navigator,o=window,f=Audio.prototype,y=o.visualViewport;return fa(["srLatency"in f,"srChannelCount"in f,"devicePosture"in m,y&&"segments"in y,"getTextInformation"in Image.prototype])>=3}function XE(){return JE()?-4:YE()}function YE(){var m=window,o=m.OfflineAudioContext||m.webkitOfflineAudioContext;if(!o)return-2;if(KE())return-1;var f=4500,y=5e3,M=new o(1,y,44100),z=M.createOscillator();z.type="triangle",z.frequency.value=1e4;var T=M.createDynamicsCompressor();T.threshold.value=-50,T.knee.value=40,T.ratio.value=12,T.attack.value=0,T.release.value=.25,z.connect(T),T.connect(M.destination),z.start(0);var s=QE(M),B=s[0],N=s[1],Y=$u(B.then(function(K){return e8(K.getChannelData(0).subarray(f))},function(K){if(K.name==="timeout"||K.name==="suspended")return-3;throw K}));return function(){return N(),Y}}function KE(){return ho()&&!Ym()&&!UE()}function JE(){return ho()&&Rh()&&Dh()||Lh()&&WE()&&ZE()}function QE(m){var o=3,f=500,y=500,M=5e3,z=function(){},T=new Promise(function(s,B){var N=!1,Y=0,K=0;m.oncomplete=function(me){return s(me.renderedBuffer)};var ie=function(){setTimeout(function(){return B(pv("timeout"))},Math.min(y,K+M-Date.now()))},H=function(){try{var me=m.startRendering();switch(E0(me)&&$u(me),m.state){case"running":K=Date.now(),N&&ie();break;case"suspended":document.hidden||Y++,N&&Y>=o?B(pv("suspended")):setTimeout(H,f);break}}catch(ve){B(ve)}};H(),z=function(){N||(N=!0,K>0&&ie())}});return[T,z]}function e8(m){for(var o=0,f=0;f=0?"+":"").concat(y)}function E8(){var m=new Date().getFullYear();return Math.max(so(new Date(m,0,1).getTimezoneOffset()),so(new Date(m,6,1).getTimezoneOffset()))}function z8(){try{return!!window.sessionStorage}catch{return!0}}function L8(){try{return!!window.localStorage}catch{return!0}}function D8(){if(!(L0()||VE()))try{return!!window.indexedDB}catch{return!0}}function R8(){return!!window.openDatabase}function B8(){return navigator.cpuClass}function F8(){var m=navigator.platform;return m==="MacIntel"&&ho()&&!Ym()?$E()?"iPad":"iPhone":m}function O8(){return navigator.vendor||""}function N8(){for(var m=[],o=0,f=["chrome","safari","__crWeb","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice"];oK.length*.6}),s.sort(),[2,s]}})})}function Z8(){return ho()||Km()}function U8(m){var o;return Io(this,void 0,void 0,function(){var f,y,M,z,B,T,s,B;return Mo(this,function(N){switch(N.label){case 0:for(f=document,y=f.createElement("div"),M=new Array(m.length),z={},mv(y),B=0;B')}function az(){return navigator.pdfViewerEnabled}function oz(){var m=new Float32Array(1),o=new Uint8Array(m.buffer);return m[0]=1/0,m[0]=m[0]-m[0],o[3]}function sz(){var m=window.ApplePaySession;if(typeof(m==null?void 0:m.canMakePayments)!="function")return-1;if(lz())return-3;try{return m.canMakePayments()?1:0}catch(o){return cz(o)}}var lz=n8;function cz(m){if(m instanceof Error&&m.name==="InvalidAccessError"&&/\bfrom\b.*\binsecure\b/i.test(m.message))return-2;throw m}function uz(){var m,o=document.createElement("a"),f=(m=o.attributionSourceId)!==null&&m!==void 0?m:o.attributionsourceid;return f===void 0?void 0:String(f)}var B0=-1,F0=-2,hz=new Set([10752,2849,2884,2885,2886,2928,2929,2930,2931,2932,2960,2961,2962,2963,2964,2965,2966,2967,2968,2978,3024,3042,3088,3089,3106,3107,32773,32777,32777,32823,32824,32936,32937,32938,32939,32968,32969,32970,32971,3317,33170,3333,3379,3386,33901,33902,34016,34024,34076,3408,3410,3411,3412,3413,3414,3415,34467,34816,34817,34818,34819,34877,34921,34930,35660,35661,35724,35738,35739,36003,36004,36005,36347,36348,36349,37440,37441,37443,7936,7937,7938]),dz=new Set([34047,35723,36063,34852,34853,34854,34229,36392,36795,38449]),pz=["FRAGMENT_SHADER","VERTEX_SHADER"],fz=["LOW_FLOAT","MEDIUM_FLOAT","HIGH_FLOAT","LOW_INT","MEDIUM_INT","HIGH_INT"],O0="WEBGL_debug_renderer_info",mz="WEBGL_polygon_mode";function _z(m){var o,f,y,M,z,T,s=m.cache,B=N0(s);if(!B)return B0;if(!V0(B))return F0;var N=j0()?null:B.getExtension(O0);return{version:((o=B.getParameter(B.VERSION))===null||o===void 0?void 0:o.toString())||"",vendor:((f=B.getParameter(B.VENDOR))===null||f===void 0?void 0:f.toString())||"",vendorUnmasked:N?(y=B.getParameter(N.UNMASKED_VENDOR_WEBGL))===null||y===void 0?void 0:y.toString():"",renderer:((M=B.getParameter(B.RENDERER))===null||M===void 0?void 0:M.toString())||"",rendererUnmasked:N?(z=B.getParameter(N.UNMASKED_RENDERER_WEBGL))===null||z===void 0?void 0:z.toString():"",shadingLanguageVersion:((T=B.getParameter(B.SHADING_LANGUAGE_VERSION))===null||T===void 0?void 0:T.toString())||""}}function gz(m){var o=m.cache,f=N0(o);if(!f)return B0;if(!V0(f))return F0;var y=f.getSupportedExtensions(),M=f.getContextAttributes(),z=[],T=[],s=[],B=[],N=[];if(M)for(var Y=0,K=Object.keys(M);Y=.001))try{var m=new XMLHttpRequest;m.open("get","https://m1.openfpcdn.io/fingerprintjs/v".concat(A0,"/npm-monitoring"),!0),m.send()}catch(o){console.error(o)}}function Dz(m){var o;return m===void 0&&(m={}),Io(this,void 0,void 0,function(){var f,y,M;return Mo(this,function(z){switch(z.label){case 0:return(!((o=m.monitoring)!==null&&o!==void 0)||o)&&Lz(),f=m.delayFallback,y=m.debug,[4,Ez(f)];case 1:return z.sent(),M=Cz({cache:{},debug:y}),[2,zz(M,y)]}})})}var Rz={load:Dz,hashComponents:Z0,componentsToDebugString:q0};let Zf=null;async function Bz(){return Zf||(Zf=Rz.load()),Zf}async function Fz(){return(await(await Bz()).get()).visitorId}var Oz=Cr('');function Gu(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=Oz();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var Nz=Cr('');function wv(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=Nz();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var jz=Cr('');function U0(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=jz();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var Vz=Cr(''),qz=Cr('');function $0(m,o){let f=ir(o,["$$slots","$$events","$$legacy","filled"]);var y=er(),M=Ct(y);{var z=s=>{var B=Vz();ar(B,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(s,B)},T=s=>{var B=qz();ar(B,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(s,B)};je(M,s=>{o.filled?s(z):s(T,!1)})}G(m,y)}var Zz=Cr('');function Cm(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=Zz();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var Uz=Cr('');function G0(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=Uz();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var $z=Cr('');function Gz(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=$z();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var Hz=Cr('');function Wz(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=Hz();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var Xz=Te(" ",1),Yz=Te(" ",1),Kz=Te(" ",1),Jz=Te(' ',1),Qz=Te(" ",1),eL=Te(" ",1),tL=(m,o)=>ce(o,!x(o)),rL=(m,o)=>{ce(o,"colorpicker")},nL=(m,o)=>{o(!o())},iL=(m,o)=>{ce(o,"cleararea")},aL=Te('
                      C
                      '),oL=(m,o)=>{aa.smallPlop.play(),o()},sL=(m,o,f)=>{o(x(f).idx)},lL=Te(' ',1),cL=Te("
                      "),uL=(m,o)=>{ce(o,!x(o))},hL=(m,o)=>{ce(o,x(o)==="eraser"?"pencil":"eraser",!0)},dL=Te('

                      I
                      E
                      ',1);function pL(m,o){Br(o,!0);let f=Lt(o,"screenLocked",15),y=Lt(o,"opaquePixelArt",15);const M=ft(()=>new fl(o.tileSize));let z=ct(1),T=ct("pencil");const s=new Map,B=new Map;let N=ct(0),Y=ct(!1),K=ct(!0),ie=ft(()=>kt.charges??0),H=ft(()=>x(ie)-x(N)),me=ct(!1),ve=!1,Me=ct(!1),Ee=ct(xi([]));const Re=ft(()=>x(T)==="pencil"),ze=ft(()=>x(T)==="eraser"),Fe=ft(()=>x(T)==="colorpicker"),Ke=ft(()=>x(T)==="cleararea"),rt=ft(()=>{var _t,Ge;return xc((Ge=(_t=kt)==null?void 0:_t.data)==null?void 0:Ge.role,["admin","global_moderator"])});let qe=ct(!1),He=ct(0),et=ct(void 0),De=ct(void 0);const tt=[1,2,3,32,4,5,6,33,7,34,35,8,9,10,11,37,38,39,40,41,42,12,13,14,15,16,17,43,20,44,18,19,45,46,21,22,47,48,49,23,24,25,26,27,28,53,54,55,29,30,50,56,57,36,51,31,52,61,62,63,58,59,60,0].map(_t=>({...Hi.colors[_t],idx:_t})),nt=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,0].map(_t=>({...Hi.colors[_t],idx:_t}));let Ze=ct(!1);const ke=ft(()=>x(Ze)?tt:nt),bt="show-all-colors";Dn(()=>{ce(Ze,localStorage.getItem(bt)==="true")}),Wr(()=>{localStorage.setItem(bt,x(Ze)?"true":"false")});const te="selected-color";Dn(()=>{const _t=Number(localStorage.getItem(te));!isNaN(_t)&&_t0&&ce(z,_t,!0)}),Wr(()=>{localStorage.setItem(te,x(z).toString())});const re=new lE({map:o.map,tileSize:o.tileSize,tileZoom:o.tileZoom,beforeLayerId:o.hoverLayerId});Wr(()=>{const _t=y()?1:0;re.setCanvasOpacity(_t)}),Wr(()=>{y()?Gf():ut([...s.values()])});let ge=!1;Dn(()=>{Co(o.map.getCenter(),o.map.getZoom());const _t=o.map.on("click",dr=>{var tn;o.zoom=2)){const[Qr,ma]=x(Ee),[di,Xi]=x(M).latLonToPixelsFloor(Qr[0],Qr[1],o.tileZoom),[Zn,ni]=x(M).latLonToPixelsFloor(ma[0],ma[1],o.tileZoom),qi=Math.min(di,Zn),Yi=Math.max(di,Zn),Ei=Math.min(Xi,ni),zi=Math.max(Xi,ni),Ki=[];for(let oa=Ei;oa<=zi;oa++){const Ta=x(M).pixelsToLatLon(qi+.5,oa+.5,o.tileZoom),xt=x(M).pixelsToLatLon(Yi+.5,oa+.5,o.tileZoom),Wt=Ge({lat:Ta[0],lng:Ta[1]},{lat:xt[0],lng:xt[1]}).slice(0,x(H)-Ki.length);if(Ki.push(...Wt),Ki.length>=x(H))break}Ae(Ki,0),ce(Ee,[],!0),ce(T,"pencil")}ce(me,!0)});function Ge(dr,In){const tn=x(M).latLonToPixels(dr.lat,dr.lng,o.tileZoom),Qr=In?x(M).latLonToPixels(In.lat,In.lng,o.tileZoom):tn;return Lx(tn,Qr).map(di=>x(M).pixelsToLatLon(di[0]+.5,di[1]+.5,o.tileZoom))}function At(dr,In){const tn=Ge(dr,In);x(Re)?Ae(tn,x(z)):x(ze)&&Ne(tn),ce(me,!0)}let Rt;function Yt(dr){const In=o.map.unproject([dr.clientX,dr.clientY]);if(x(Me)){const tn=Ge(In,Rt);Ne(tn)}(ge||ve)&&At(In,Rt),Rt=In}window.addEventListener("mousemove",Yt);let br=!1;const Er=o.map.on("touchstart",dr=>{if(dr.points.length==2){f(!1),dt(),br=!0,setTimeout(()=>br=!1,150);return}f()&&setTimeout(()=>{!br&&At(dr.lngLat)},150),Rt=dr.lngLat}),ur=o.map.on("touchmove",dr=>{f()&&At(dr.lngLat,Rt),Rt=dr.lngLat}),rn=dr=>{dr.code==="Space"&&(ge||Rt&&At(Rt),ge=!0,dr.preventDefault())};document.addEventListener("keydown",rn);const pn=dr=>{dr.code==="Space"&&(ge=!1,oe=!1,x(N)===0&&x(ze)&&ce(T,"pencil"))};document.addEventListener("keyup",pn);function _n(dr){if(dr.button===2){ce(Me,!0);const tn=o.map.unproject([dr.clientX,dr.clientY]);Ne([[tn.lat,tn.lng]])}}document.addEventListener("mousedown",_n);function sn(dr){dr.button===2&&ce(Me,!1)}document.addEventListener("mouseup",sn);const En=dr=>{switch(dr.code){case"KeyE":x(N)>0&&(x(ze)?ce(T,"pencil"):ce(T,"eraser"));return;case"KeyI":ce(T,"colorpicker");return;case"KeyC":x(rt)&&ce(T,"cleararea");return}};return document.addEventListener("keypress",En),()=>{ur.unsubscribe(),Er.unsubscribe(),_t.unsubscribe(),document.removeEventListener("mousemove",Yt),document.removeEventListener("keydown",rn),document.removeEventListener("keyup",pn),document.removeEventListener("keypress",En),document.removeEventListener("mousedown",_n),document.removeEventListener("mouseup",sn),St()}});let oe=!1;function Ae(_t,Ge){let At=!1;const Rt=Ge===0;for(let Yt of _t){const[br,Er]=Yt,ur=kx(Ge),{tile:rn,pixel:pn}=x(M).latLonToTileAndPixel(br,Er,o.tileZoom),_n={color:ur,tile:rn,pixel:pn,season:o.season,colorIdx:Ge},sn=Lf(_n),En=s.get(sn),dr=x(ie)-s.size;if(!En&&dr<1){if(oe&&(ge||f()))continue;oe=!0,Nr.info(XC());continue}En&&En.colorIdx===Ge||(aa.plop.play(),At||o.hidePixelHover(),s.set(sn,_n),re.place(Yt,Ge),o.crosshair.place(Yt),At=!0,Rt&&B.set(sn,_n))}ce(N,s.size,!0),At&&!y()?ut([...s.values()]):At&&y()&&Rt&&ut([...B.values()])}function Ne(_t){let Ge=!1,At=!1;for(let Rt of _t){const[Yt,br]=Rt,{tile:Er,pixel:ur}=x(M).latLonToTileAndPixel(Yt,br,o.tileZoom),rn=Lf({tile:Er,pixel:ur,season:o.season}),pn=s.get(rn);pn&&(aa.plop.play(),o.hidePixelHover(),s.delete(rn),B.delete(rn),re.remove([Yt,br]),o.crosshair.remove(Rt),Ge=!0,pn.colorIdx===0&&(At=!0)),s.size===0&&!(ge||ve||f())&&ce(T,"pencil")}ce(N,s.size,!0),Ge&&!y()?ut([...s.values()]):Ge&&y()&&At&&ut([...B.values()])}function pt(_t,Ge){const{tile:At,pixel:Rt}=x(M).latLonToTileAndPixel(_t[0],_t[1],o.tileZoom),Yt=Lf({tile:At,pixel:Rt,season:o.season}),br=s.get(Yt);if(br){vt(br.colorIdx),requestAnimationFrame(()=>{var pn;(pn=document.getElementById(`color-${br.colorIdx}`))==null||pn.focus()});return}const Er=window.devicePixelRatio,ur=Math.floor(Ge.x*Er),rn=Math.floor(Ge.y*Er);o.hidePixelHover(),fM(o.map,ur,rn).then(([pn,_n,sn])=>{const En=Ax({r:pn,g:_n,b:sn});vt(En),requestAnimationFrame(()=>{var dr;(dr=document.getElementById(`color-${En}`))==null||dr.focus()})})}dl(()=>x(z),()=>{o.clickedLatLon&&!x(me)&&(x(z)===void 0&&ce(z,1),Ae([o.clickedLatLon],x(z)))}),Wr(()=>{const _t=x(K)?.8:0;o.crosshair.setCanvasOpacity(_t)});let ot=ct(16.5);Wr(()=>{if(x(et)&&x(De)&&o.clickedLatLon){const _t=o.map.getZoom();if(_t11?[0,-Er]:[0,0]})}ce(ot,o.tileZoom,!0)}}),Dn(()=>{const _t=()=>{!document.hidden&&(console.log("Tab visible again"),y()?ut([...B.values()]):ut([...s.values()]))};return document.addEventListener("visibilitychange",_t),()=>document.removeEventListener("visibilitychange",_t)}),Wr(()=>{switch(x(T)){case"pencil":o.map.getCanvas().style.cursor=`url('${oE}') 8 8, default`,o.map.setPaintProperty(o.hoverLayerId,"raster-opacity",.4);return;case"colorpicker":o.map.getCanvas().style.cursor=`url('${iE}') 0 16, default`,o.map.setPaintProperty(o.hoverLayerId,"raster-opacity",0);return;case"eraser":o.map.getCanvas().style.cursor=`url('${aE}') 2 14, default`,o.map.setPaintProperty(o.hoverLayerId,"raster-opacity",.4);return}}),Wr(()=>{f()?at():dt()});async function ut(_t){await mx(_t),o.refreshPixelArt()}async function St(){await Gf(),re.clear(),o.refreshPixelArt(),o.crosshair.clear()}async function Bt(){await St(),dt(),o.map.getCanvas().style.cursor="default",o.map.setPaintProperty(o.hoverLayerId,"raster-opacity",.4),o.onclose()}function at(){o.map.dragPan.disable(),o.map.touchZoomRotate.disable(),document.body.style.overscrollBehavior="none"}function dt(){o.map.dragPan.enable(),o.map.touchZoomRotate.enable(),document.body.style.overscrollBehavior=""}function vt(_t){return _t>=32&&ce(Ze,!0),kt.hasColor(_t)?(aa.smallDropplet.play(),ce(z,_t,!0),ce(T,"pencil"),!0):(aa.smallDropplet.play(),ce(qe,!0),ce(He,_t,!0),!1)}nx(_t=>{_t.type==="leave"&&x(N)>0&&_t.cancel()});const yt="show-paint-more-than-one-pixel-msg";let It=ct(!1);Dn(()=>{var _t;ce(It,!localStorage.getItem(yt)&&(((_t=kt.data)==null?void 0:_t.pixelsPainted)??0)<100,!0)}),Wr(()=>{x(N)>1&&(ce(It,!1),localStorage.setItem(yt,"false"))});const wt="lp";Dn(()=>{var Ge;const _t=localStorage.getItem(wt);if(_t)try{const At=JSON.parse(atob(_t)),Rt=(At==null?void 0:At.time)??0,Yt=60*1e3;(At==null?void 0:At.userId)!==((Ge=kt.data)==null?void 0:Ge.id)&&Date.now()-Rt<30*Yt&&!Wx&&(Nr.error(JC()),Bt())}catch(At){console.error(At)}});function mt(){var Ge;const _t=btoa(JSON.stringify({userId:(Ge=kt.data)==null?void 0:Ge.id,time:Date.now()}));localStorage.setItem(wt,_t)}var Dt=dL(),zt=Ct(Dt),qt=E(zt);{var tr=_t=>{al(_t,{children:(Ge,At)=>{var Rt=Xz(),Yt=Ct(Rt);U0(Yt,{class:"inline size-5"});var br=q(Yt);Ye(Er=>fe(br,` ${Er??""}`),[()=>I5()]),G(Ge,Rt)},$$slots:{default:!0}})},Qt=_t=>{var Ge=er(),At=Ct(Ge);{var Rt=br=>{al(br,{class:"not-touchscreen:hidden",children:(Er,ur)=>{var rn=Yz(),pn=Ct(rn);Hg(pn,{class:"inline size-5"});var _n=q(pn);Ye(sn=>fe(_n,` ${sn??""}`),[()=>A5()]),G(Er,rn)},$$slots:{default:!0}})},Yt=br=>{var Er=er(),ur=Ct(Er);{var rn=_n=>{al(_n,{class:"not-touchscreen:hidden",children:(sn,En)=>{var dr=Kz(),In=Ct(dr);wv(In,{class:"inline size-5"});var tn=q(In,1,!0);Ye(Qr=>fe(tn,Qr),[()=>L5()]),G(sn,dr)},$$slots:{default:!0}})},pn=_n=>{var sn=er(),En=Ct(sn);{var dr=tn=>{al(tn,{class:"touchscreen:hidden",children:(Qr,ma)=>{var di=Jz(),Xi=Ct(di);G0(Xi,{class:"inline size-5"});var Zn=q(Xi),ni=E(Zn,!0);k(Zn);var qi=q(Zn,2),Yi=E(qi),Ei=q(Yi),zi=E(Ei,!0);k(Ei),k(qi);var Ki=q(qi);Ye((oa,Ta,xt,Wt)=>{fe(ni,oa),fe(Yi,`${Ta??""} `),fe(zi,xt),fe(Ki,` ${Wt??""}`)},[()=>B5(),()=>q5(),()=>N5(),()=>$5()]),G(Qr,di)},$$slots:{default:!0}})},In=tn=>{var Qr=er(),ma=Ct(Qr);{var di=Zn=>{al(Zn,{class:"bg-warning text-warning-content animate-bounce",children:(ni,qi)=>{var Yi=Qz(),Ei=Ct(Yi);Eh(Ei,{class:"inline size-5"});var zi=q(Ei);Ye(Ki=>fe(zi,` ${Ki??""}`),[()=>W5()]),G(ni,Yi)},$$slots:{default:!0}})},Xi=Zn=>{var ni=er(),qi=Ct(ni);{var Yi=Ei=>{al(Ei,{class:"bg-warning text-warning-content animate-bounce",children:(zi,Ki)=>{var oa=eL(),Ta=Ct(oa);Gu(Ta,{class:"inline size-5"});var xt=q(Ta,2);{var Wt=yn=>{var On=bi();Ye(Xn=>fe(On,Xn),[()=>Jv()]),G(yn,On)},Rr=yn=>{var On=er(),Xn=Ct(On);{var Vn=wn=>{var Ji=bi();Ye(sr=>fe(Ji,sr),[()=>Qv()]),G(wn,Ji)};je(Xn,wn=>{x(Ee).length===1&&wn(Vn)},!0)}G(yn,On)};je(xt,yn=>{x(Ee).length===0?yn(Wt):yn(Rr,!1)})}G(zi,oa)},$$slots:{default:!0}})};je(qi,Ei=>{x(Ke)&&Ei(Yi)},!0)}G(Zn,ni)};je(ma,Zn=>{x(It)?Zn(di):Zn(Xi,!1)},!0)}G(tn,Qr)};je(En,tn=>{x(Re)&&x(N)===0?tn(dr):tn(In,!1)},!0)}G(_n,sn)};je(ur,_n=>{x(Fe)?_n(rn):_n(pn,!1)},!0)}G(br,Er)};je(At,br=>{x(ze)?br(Rt):br(Yt,!1)},!0)}G(_t,Ge)};je(qt,_t=>{x(ze)&&x(N)===0?_t(tr):_t(Qt,!1)})}var Ot=q(qt,2),fr=E(Ot);fr.__click=[tL,K];var kr=E(fr);{var Ar=_t=>{hE(_t,{class:"size-4"})},rr=_t=>{pE(_t,{class:"size-4"})};je(kr,_t=>{x(K)?_t(Ar):_t(rr,!1)})}k(fr);var Kt=q(fr,2),or=E(Kt),Sr=E(or),Dr=q(Sr);I0(Dr,{class:"inline",fontSize:14,get value(){return`(${x(N)??""})`},mono:!0}),k(or);var Zr=q(or,2),se=E(Zr),j=E(se);vn(),k(se);var Z=q(se,2);Z.__click=[rL,T];var X=E(Z);wv(X,{class:"size-4.5"}),k(Z),k(Zr);var ae=q(Zr,2),de=E(ae);let Se;de.__click=[nL,y];var Ie=E(de);{let _t=ft(()=>!y());$0(Ie,{class:"size-4.5",get filled(){return x(_t)}})}k(de),k(ae);var be=q(ae,2);{var Oe=_t=>{var Ge=aL(),At=E(Ge),Rt=E(At);vn(),k(At);var Yt=q(At,2);Yt.__click=[iL,T];var br=E(Yt);Gu(br,{class:"size-4.5"}),k(Yt),k(Ge),Ye(Er=>{fe(Rt,`${Er??""} `),zr(Yt,1,Ko({"btn btn-circle btn-sm":!0,"btn-ghost":!x(Ke),"btn-primary":x(Ke)}))},[()=>KP()]),G(_t,Ge)};je(be,_t=>{x(rt)&&_t(Oe)})}k(Kt);var st=q(Kt,2);st.__click=[oL,Bt];var $e=E(st);_l($e,{class:"size-4"}),k(st),k(Ot);var Mt=q(Ot,2),xe=E(Mt);hi(xe,23,()=>x(ke),_t=>_t.idx,(_t,Ge,At)=>{const Rt=ft(()=>{const[sn,En,dr]=x(Ge).rgb;return{r:sn,g:En,b:dr}}),Yt=ft(()=>x(z)===x(Ge).idx&&x(Re)),br=ft(()=>x(Ge).idx===0),Er=ft(()=>kt.hasColor(x(Ge).idx));var ur=cL(),rn=E(ur);rn.__click=[sL,vt,Ge];var pn=E(rn);{var _n=sn=>{var En=lL(),dr=Ct(En);Cm(dr,{class:"center-absolute absolute size-4 opacity-30 sm:hidden sm:size-6"});var In=q(dr,2),tn=E(In);Cm(tn,{class:"text-base-content/80 size-4"}),k(In),G(sn,En)};je(pn,sn=>{x(Er)||sn(_n)})}k(rn),k(ur),Ye(()=>{zr(ur,1,Ko({tooltip:!0,"max-sm:h-6":x(Ze),"max-sm:before:translate-x-1/4":x(At)%8===0&&x(Ge).name.length>7,"max-sm:before:-translate-x-1/4":(x(At)-7)%8===0&&x(Ge).name.length>7,"max-xl:before:translate-x-1/4":x(At)%16===0&&x(Ge).name.length>7,"max-xl:before:-translate-x-1/4":(x(At)-15)%16===0&&x(Ge).name.length>7,"xl:before:translate-x-1/4":x(Ze)&&x(At)%32===0&&x(Ge).name.length>7,"xl:before:-translate-x-1/4":x(Ze)&&(x(At)-31)%32===0&&x(Ge).name.length>7})),xr(ur,"data-tip",x(Ge).name),zr(rn,1,Ko({"btn relative aspect-square w-full rounded-xl":!0,"border-primary ring-primary ring-2":x(Yt),"border-base-300":!x(Yt)&&x(br),"border-base-content/20":!x(Yt)&&!x(br),"max-sm:h-6 max-sm:rounded-md":x(Ze)})),kc(rn,x(br)?`background-image: url(${sE}); background-size: cover; image-rendering: pixelated;`:`background: rgb(${x(Rt).r} ${x(Rt).g} ${x(Rt).b})`),xr(rn,"aria-label",x(Ge).name),xr(rn,"id",`color-${x(Ge).idx??""}`)}),Ai("focus",rn,()=>{x(Er)&&(ce(z,x(Ge).idx,!0),ce(T,"pencil"))}),G(_t,ur)}),k(xe),k(Mt);var Ft=q(Mt,2),cr=E(Ft);cr.__click=[uL,Ze];var Jt=E(cr);{var Tr=_t=>{Gz(_t,{class:"size-5"})},Xr=_t=>{Wz(_t,{class:"size-5"})};je(Jt,_t=>{x(Ze)?_t(Tr):_t(Xr,!1)})}k(cr);var dn=q(cr,2),xn=E(dn);{let _t=ft(()=>x(N)>100?"animate-pulse":""),Ge=ft(()=>x(N)===0||x(Y)||x(H)<0||!ai.captcha),At=ft(()=>x(Y)||!ai.captcha);M0(xn,{get class(){return x(_t)},get charges(){return x(H)},get disabled(){return x(Ge)},get loading(){return x(At)},onclick:async()=>{var br;const Rt=(br=ai.captcha)==null?void 0:br.token;if(!Rt)return;aa.droppletAndPlop.play();const Yt=[...s.values()];ce(Y,!0);try{const Er=await Fz();await en.paint(Yt,Rt,Er),await _x(Yt),mt(),kt.refresh(),Xd.shouldReload=!0,await Bt()}catch(Er){Nr.error(`${Er.message}`,{duration:7e3})}finally{ce(Y,!1),ai.captcha=void 0}}})}k(dn);var mn=q(dn,2),jt=E(mn),Et=E(jt),hr=E(Et);vn(),k(Et);var ht=q(Et,2);let Hr;ht.__click=[hL,T];var Yr=E(ht);Hg(Yr,{class:"size-5",get filled(){return x(ze)}}),k(ht),k(jt),k(mn),k(Ft),k(zt),Po(zt,_t=>ce(De,_t),()=>x(De));var qr=q(zt,2);CE(qr,{get colorIdx(){return x(He)},get open(){return x(qe)},set open(_t){ce(qe,_t,!0)}}),Ye((_t,Ge,At,Rt,Yt,br)=>{fe(Sr,`${_t??""} `),fe(j,`${Ge??""} `),zr(Z,1,Ko({"btn btn-circle btn-sm":!0,"btn-ghost":!x(Fe),"btn-primary":x(Fe)})),xr(ae,"data-tip",At),Se=zr(de,1,"btn btn-sm btn-circle btn-ghost text-base-content/80",null,Se,Rt),zr(xe,1,Ko({"md:grid-cols-16 min-[100rem]:grid-cols-32 grid grid-cols-8":!0,"xl:grid-cols-32 sm:grid-cols-16 gap-0.5 sm:gap-1":x(Ze),"gap-1":!x(Ze)})),fe(hr,`${Yt??""} `),Hr=zr(ht,1,"btn btn-lg btn-square sm:btn-xl shadow-md",null,Hr,br),ht.disabled=x(N)===0},[()=>K5(),()=>e3(),()=>Uv(),()=>({"text-primary":!y()}),()=>Dx(),()=>({"btn-primary":x(ze)})]),fp("innerHeight",_t=>ce(et,_t,!0)),G(m,Dt),Fr()}Qn(["click"]);function Jm(...m){return Lv(Ou(m))}var fL=Te("
                      ");function mL(m,o){Br(o,!0);let f=Lt(o,"ref",15,null),y=ir(o,["$$slots","$$events","$$legacy","ref","class","children"]);var M=fL();ar(M,T=>({class:T,...y}),[()=>Jm("flex items-center",o.class)]);var z=E(M);oi(z,()=>o.children??pa),k(M),Po(M,T=>f(T),()=>f()),G(m,M),Fr()}var _L=Te('
                      '),gL=Te(" ",1);function vL(m,o){Br(o,!0);let f=Lt(o,"ref",15,null),y=ir(o,["$$slots","$$events","$$legacy","ref","cell","class"]);var M=er(),z=Ct(M);{let T=ft(()=>Jm("border-input relative flex size-12 items-center justify-center border-y border-r text-xl transition-all first:rounded-l-md first:border-l last:rounded-r-md",o.cell.isActive&&"ring-base-content/40 z-10 ring-2",o.class));yi(z,()=>Qk,(s,B)=>{B(s,Ps({get cell(){return o.cell},get class(){return x(T)}},()=>y,{get ref(){return f()},set ref(N){f(N)},children:(N,Y)=>{vn();var K=gL(),ie=Ct(K),H=q(ie);{var me=ve=>{var Me=_L();G(ve,Me)};je(H,ve=>{o.cell.hasFakeCaret&&ve(me)})}Ye(()=>fe(ie,`${o.cell.char??""} `)),G(N,K)},$$slots:{default:!0}}))})}G(m,M),Fr()}function yL(m,o){Br(o,!0);let f=Lt(o,"ref",15,null),y=Lt(o,"value",15,""),M=ir(o,["$$slots","$$events","$$legacy","ref","class","value"]);var z=er(),T=Ct(z);{let s=ft(()=>Jm("flex items-center gap-2 has-[:disabled]:opacity-50 [&_input]:disabled:cursor-not-allowed",o.class));yi(T,()=>Kk,(B,N)=>{N(B,Ps({get class(){return x(s)}},()=>M,{get ref(){return f()},set ref(Y){f(Y)},get value(){return y()},set value(Y){y(Y)}}))})}G(m,z),Fr()}var Uf={exports:{}},Tv;function xL(){return Tv||(Tv=1,(function(m){(function(o){m.exports?m.exports=o():window.intlTelInput=o()})(()=>{var o=(()=>{var f=Object.defineProperty,y=Object.getOwnPropertyDescriptor,M=Object.getOwnPropertyNames,z=Object.prototype.hasOwnProperty,T=(te,re)=>{for(var ge in re)f(te,ge,{get:re[ge],enumerable:!0})},s=(te,re,ge,oe)=>{if(re&&typeof re=="object"||typeof re=="function")for(let Ae of M(re))!z.call(te,Ae)&&Ae!==ge&&f(te,Ae,{get:()=>re[Ae],enumerable:!(oe=y(re,Ae))||oe.enumerable});return te},B=te=>s(f({},"__esModule",{value:!0}),te),N={};T(N,{Iti:()=>nt,default:()=>bt});var Y=[["af","93"],["ax","358",1],["al","355"],["dz","213"],["as","1",5,["684"]],["ad","376"],["ao","244"],["ai","1",6,["264"]],["ag","1",7,["268"]],["ar","54"],["am","374"],["aw","297"],["ac","247"],["au","61",0,null,"0"],["at","43"],["az","994"],["bs","1",8,["242"]],["bh","973"],["bd","880"],["bb","1",9,["246"]],["by","375"],["be","32"],["bz","501"],["bj","229"],["bm","1",10,["441"]],["bt","975"],["bo","591"],["ba","387"],["bw","267"],["br","55"],["io","246"],["vg","1",11,["284"]],["bn","673"],["bg","359"],["bf","226"],["bi","257"],["kh","855"],["cm","237"],["ca","1",1,["204","226","236","249","250","263","289","306","343","354","365","367","368","382","387","403","416","418","428","431","437","438","450","584","468","474","506","514","519","548","579","581","584","587","604","613","639","647","672","683","705","709","742","753","778","780","782","807","819","825","867","873","879","902","905"]],["cv","238"],["bq","599",1,["3","4","7"]],["ky","1",12,["345"]],["cf","236"],["td","235"],["cl","56"],["cn","86"],["cx","61",2,["89164"],"0"],["cc","61",1,["89162"],"0"],["co","57"],["km","269"],["cg","242"],["cd","243"],["ck","682"],["cr","506"],["ci","225"],["hr","385"],["cu","53"],["cw","599",0],["cy","357"],["cz","420"],["dk","45"],["dj","253"],["dm","1",13,["767"]],["do","1",2,["809","829","849"]],["ec","593"],["eg","20"],["sv","503"],["gq","240"],["er","291"],["ee","372"],["sz","268"],["et","251"],["fk","500"],["fo","298"],["fj","679"],["fi","358",0],["fr","33"],["gf","594"],["pf","689"],["ga","241"],["gm","220"],["ge","995"],["de","49"],["gh","233"],["gi","350"],["gr","30"],["gl","299"],["gd","1",14,["473"]],["gp","590",0],["gu","1",15,["671"]],["gt","502"],["gg","44",1,["1481","7781","7839","7911"],"0"],["gn","224"],["gw","245"],["gy","592"],["ht","509"],["hn","504"],["hk","852"],["hu","36"],["is","354"],["in","91"],["id","62"],["ir","98"],["iq","964"],["ie","353"],["im","44",2,["1624","74576","7524","7924","7624"],"0"],["il","972"],["it","39",0],["jm","1",4,["876","658"]],["jp","81"],["je","44",3,["1534","7509","7700","7797","7829","7937"],"0"],["jo","962"],["kz","7",1,["33","7"],"8"],["ke","254"],["ki","686"],["xk","383"],["kw","965"],["kg","996"],["la","856"],["lv","371"],["lb","961"],["ls","266"],["lr","231"],["ly","218"],["li","423"],["lt","370"],["lu","352"],["mo","853"],["mg","261"],["mw","265"],["my","60"],["mv","960"],["ml","223"],["mt","356"],["mh","692"],["mq","596"],["mr","222"],["mu","230"],["yt","262",1,["269","639"],"0"],["mx","52"],["fm","691"],["md","373"],["mc","377"],["mn","976"],["me","382"],["ms","1",16,["664"]],["ma","212",0,null,"0"],["mz","258"],["mm","95"],["na","264"],["nr","674"],["np","977"],["nl","31"],["nc","687"],["nz","64"],["ni","505"],["ne","227"],["ng","234"],["nu","683"],["nf","672"],["kp","850"],["mk","389"],["mp","1",17,["670"]],["no","47",0],["om","968"],["pk","92"],["pw","680"],["ps","970"],["pa","507"],["pg","675"],["py","595"],["pe","51"],["ph","63"],["pl","48"],["pt","351"],["pr","1",3,["787","939"]],["qa","974"],["re","262",0,null,"0"],["ro","40"],["ru","7",0,null,"8"],["rw","250"],["ws","685"],["sm","378"],["st","239"],["sa","966"],["sn","221"],["rs","381"],["sc","248"],["sl","232"],["sg","65"],["sx","1",21,["721"]],["sk","421"],["si","386"],["sb","677"],["so","252"],["za","27"],["kr","82"],["ss","211"],["es","34"],["lk","94"],["bl","590",1],["sh","290"],["kn","1",18,["869"]],["lc","1",19,["758"]],["mf","590",2],["pm","508"],["vc","1",20,["784"]],["sd","249"],["sr","597"],["sj","47",1,["79"]],["se","46"],["ch","41"],["sy","963"],["tw","886"],["tj","992"],["tz","255"],["th","66"],["tl","670"],["tg","228"],["tk","690"],["to","676"],["tt","1",22,["868"]],["tn","216"],["tr","90"],["tm","993"],["tc","1",23,["649"]],["tv","688"],["ug","256"],["ua","380"],["ae","971"],["gb","44",0,null,"0"],["us","1",0],["uy","598"],["vi","1",24,["340"]],["uz","998"],["vu","678"],["va","39",1,["06698"]],["ve","58"],["vn","84"],["wf","681"],["eh","212",1,["5288","5289"],"0"],["ye","967"],["zm","260"],["zw","263"]],K=[];for(let te=0;tete.replace(/\D/g,""),qe=(te="")=>te.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),He=te=>{const re=rt(te);if(re.charAt(0)==="1"){const ge=re.substr(1,3);return Ke.includes(ge)}return!1},et=(te,re,ge,oe)=>{if(ge===0&&!oe)return 0;let Ae=0;for(let Ne=0;Ne{const oe=document.createElement(te);return re&&Object.entries(re).forEach(([Ae,Ne])=>oe.setAttribute(Ae,Ne)),ge&&ge.appendChild(oe),oe},tt=(te,...re)=>{const{instances:ge}=ke;Object.values(ge).forEach(oe=>oe[te](...re))},nt=class{constructor(te,re={}){this.id=ze++,this.telInput=te,this.highlightedItem=null,this.options=Object.assign({},Fe,re),this.hadInitialPlaceholder=!!te.getAttribute("placeholder")}_init(){this.options.useFullscreenPopup&&(this.options.fixDropdownWidth=!1),this.options.onlyCountries.length===1&&(this.options.initialCountry=this.options.onlyCountries[0]),this.options.separateDialCode&&(this.options.nationalMode=!1),this.options.allowDropdown&&!this.options.showFlags&&!this.options.separateDialCode&&(this.options.nationalMode=!1),this.options.useFullscreenPopup&&!this.options.dropdownContainer&&(this.options.dropdownContainer=document.body),this.isAndroid=typeof navigator<"u"?/Android/i.test(navigator.userAgent):!1,this.isRTL=!!this.telInput.closest("[dir=rtl]");const te=this.options.allowDropdown||this.options.separateDialCode;this.showSelectedCountryOnLeft=this.isRTL?!te:te,this.options.separateDialCode&&(this.isRTL?this.originalPaddingRight=this.telInput.style.paddingRight:this.originalPaddingLeft=this.telInput.style.paddingLeft),this.options.i18n={...Re,...this.options.i18n};const re=new Promise((oe,Ae)=>{this.resolveAutoCountryPromise=oe,this.rejectAutoCountryPromise=Ae}),ge=new Promise((oe,Ae)=>{this.resolveUtilsScriptPromise=oe,this.rejectUtilsScriptPromise=Ae});this.promise=Promise.all([re,ge]),this.selectedCountryData={},this._processCountryData(),this._generateMarkup(),this._setInitialState(),this._initListeners(),this._initRequests()}_processCountryData(){this._processAllCountries(),this._processDialCodes(),this._translateCountryNames(),this._sortCountries()}_sortCountries(){this.options.countryOrder&&(this.options.countryOrder=this.options.countryOrder.map(te=>te.toLowerCase())),this.countries.sort((te,re)=>{const{countryOrder:ge}=this.options;if(ge){const oe=ge.indexOf(te.iso2),Ae=ge.indexOf(re.iso2),Ne=oe>-1,pt=Ae>-1;if(Ne||pt)return Ne&&pt?oe-Ae:Ne?-1:1}return te.name.localeCompare(re.name)})}_addToDialCodeMap(te,re,ge){re.length>this.dialCodeMaxLen&&(this.dialCodeMaxLen=re.length),this.dialCodeToIso2Map.hasOwnProperty(re)||(this.dialCodeToIso2Map[re]=[]);for(let Ae=0;Aeoe.toLowerCase());this.countries=ie.filter(oe=>ge.includes(oe.iso2))}else if(re.length){const ge=re.map(oe=>oe.toLowerCase());this.countries=ie.filter(oe=>!ge.includes(oe.iso2))}else this.countries=ie}_translateCountryNames(){for(let te=0;te`),Ae+=`${re.name}`,Ae+=`+${re.dialCode}`,oe.insertAdjacentHTML("beforeend",Ae)}}_setInitialState(te=!1){const re=this.telInput.getAttribute("value"),ge=this.telInput.value,Ae=re&&re.charAt(0)==="+"&&(!ge||ge.charAt(0)!=="+")?re:ge,Ne=this._getDialCode(Ae),pt=He(Ae),{initialCountry:ot,geoIpLookup:ut}=this.options,St=ot==="auto"&&ut;if(Ne&&!pt)this._updateCountryFromNumber(Ae);else if(!St||te){const Bt=ot?ot.toLowerCase():"";Bt&&this._getCountryData(Bt,!0)?this._setCountry(Bt):Ne&&pt?this._setCountry("us"):this._setCountry()}Ae&&this._updateValFromNumber(Ae)}_initListeners(){this._initTelInputListeners(),this.options.allowDropdown&&this._initDropdownListeners(),(this.hiddenInput||this.hiddenInputCountry)&&this.telInput.form&&this._initHiddenInputListener()}_initHiddenInputListener(){var te;this._handleHiddenInputSubmit=()=>{this.hiddenInput&&(this.hiddenInput.value=this.getNumber()),this.hiddenInputCountry&&(this.hiddenInputCountry.value=this.getSelectedCountryData().iso2||"")},(te=this.telInput.form)==null||te.addEventListener("submit",this._handleHiddenInputSubmit)}_initDropdownListeners(){this._handleLabelClick=re=>{this.dropdownContent.classList.contains("iti__hide")?this.telInput.focus():re.preventDefault()};const te=this.telInput.closest("label");te&&te.addEventListener("click",this._handleLabelClick),this._handleClickSelectedCountry=()=>{this.dropdownContent.classList.contains("iti__hide")&&!this.telInput.disabled&&!this.telInput.readOnly&&this._openDropdown()},this.selectedCountry.addEventListener("click",this._handleClickSelectedCountry),this._handleCountryContainerKeydown=re=>{this.dropdownContent.classList.contains("iti__hide")&&["ArrowUp","ArrowDown"," ","Enter"].includes(re.key)&&(re.preventDefault(),re.stopPropagation(),this._openDropdown()),re.key==="Tab"&&this._closeDropdown()},this.countryContainer.addEventListener("keydown",this._handleCountryContainerKeydown)}_initRequests(){let{loadUtils:te,initialCountry:re,geoIpLookup:ge}=this.options;te&&!ke.utils?(this._handlePageLoad=()=>{var Ae;window.removeEventListener("load",this._handlePageLoad),(Ae=ke.attachUtils(te))==null||Ae.catch(()=>{})},ke.documentReady()?this._handlePageLoad():window.addEventListener("load",this._handlePageLoad)):this.resolveUtilsScriptPromise(),re==="auto"&&ge&&!this.selectedCountryData.iso2?this._loadAutoCountry():this.resolveAutoCountryPromise()}_loadAutoCountry(){ke.autoCountry?this.handleAutoCountry():ke.startedLoadingAutoCountry||(ke.startedLoadingAutoCountry=!0,typeof this.options.geoIpLookup=="function"&&this.options.geoIpLookup((te="")=>{const re=te.toLowerCase();re&&this._getCountryData(re,!0)?(ke.autoCountry=re,setTimeout(()=>tt("handleAutoCountry"))):(this._setInitialState(!0),tt("rejectAutoCountryPromise"))},()=>{this._setInitialState(!0),tt("rejectAutoCountryPromise")}))}_openDropdownWithPlus(){this._openDropdown(),this.searchInput.value="+",this._filterCountries("",!0)}_initTelInputListeners(){const{strictMode:te,formatAsYouType:re,separateDialCode:ge,formatOnDisplay:oe,allowDropdown:Ae,countrySearch:Ne}=this.options;let pt=!1;new RegExp("\\p{L}","u").test(this.telInput.value)&&(pt=!0),this._handleInputEvent=ot=>{if(this.isAndroid&&(ot==null?void 0:ot.data)==="+"&&ge&&Ae&&Ne){const at=this.telInput.selectionStart||0,dt=this.telInput.value.substring(0,at-1),vt=this.telInput.value.substring(at);this.telInput.value=dt+vt,this._openDropdownWithPlus();return}this._updateCountryFromNumber(this.telInput.value)&&this._triggerCountryChange();const ut=(ot==null?void 0:ot.data)&&/[^+0-9]/.test(ot.data),St=(ot==null?void 0:ot.inputType)==="insertFromPaste"&&this.telInput.value;ut||St&&!te?pt=!0:/[^+0-9]/.test(this.telInput.value)||(pt=!1);const Bt=(ot==null?void 0:ot.detail)&&ot.detail.isSetNumber&&!oe;if(re&&!pt&&!Bt){const at=this.telInput.selectionStart||0,vt=this.telInput.value.substring(0,at).replace(/[^+0-9]/g,"").length,yt=(ot==null?void 0:ot.inputType)==="deleteContentForward",It=this._formatNumberAsYouType(),wt=et(vt,It,at,yt);this.telInput.value=It,this.telInput.setSelectionRange(wt,wt)}},this.telInput.addEventListener("input",this._handleInputEvent),(te||ge)&&(this._handleKeydownEvent=ot=>{if(ot.key&&ot.key.length===1&&!ot.altKey&&!ot.ctrlKey&&!ot.metaKey){if(ge&&Ae&&Ne&&ot.key==="+"){ot.preventDefault(),this._openDropdownWithPlus();return}if(te){const ut=this.telInput.value,St=ut.charAt(0)==="+",Bt=!St&&this.telInput.selectionStart===0&&ot.key==="+",at=/^[0-9]$/.test(ot.key),dt=ge?at:Bt||at,vt=ut.slice(0,this.telInput.selectionStart)+ot.key+ut.slice(this.telInput.selectionEnd),yt=this._getFullNumber(vt),It=ke.utils.getCoreNumber(yt,this.selectedCountryData.iso2),wt=this.maxCoreNumberLength&&It.length>this.maxCoreNumberLength;let mt=!1;if(St){const Dt=this.selectedCountryData.iso2;mt=this._getCountryFromNumber(yt)!==Dt}(!dt||wt&&!mt&&!Bt)&&ot.preventDefault()}}},this.telInput.addEventListener("keydown",this._handleKeydownEvent))}_cap(te){const re=parseInt(this.telInput.getAttribute("maxlength")||"",10);return re&&te.length>re?te.substr(0,re):te}_trigger(te,re={}){const ge=new CustomEvent(te,{bubbles:!0,cancelable:!0,detail:re});this.telInput.dispatchEvent(ge)}_openDropdown(){const{fixDropdownWidth:te,countrySearch:re}=this.options;if(te&&(this.dropdownContent.style.width=`${this.telInput.offsetWidth}px`),this.dropdownContent.classList.remove("iti__hide"),this.selectedCountry.setAttribute("aria-expanded","true"),this._setDropdownPosition(),re){const ge=this.countryList.firstElementChild;ge&&(this._highlightListItem(ge,!1),this.countryList.scrollTop=0),this.searchInput.focus()}this._bindDropdownListeners(),this.dropdownArrow.classList.add("iti__arrow--up"),this._trigger("open:countrydropdown")}_setDropdownPosition(){if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.dropdown),!this.options.useFullscreenPopup){const te=this.telInput.getBoundingClientRect(),re=this.telInput.offsetHeight;this.options.dropdownContainer&&(this.dropdown.style.top=`${te.top+re}px`,this.dropdown.style.left=`${te.left}px`,this._handleWindowScroll=()=>this._closeDropdown(),window.addEventListener("scroll",this._handleWindowScroll))}}_bindDropdownListeners(){this._handleMouseoverCountryList=oe=>{var Ne;const Ae=(Ne=oe.target)==null?void 0:Ne.closest(".iti__country");Ae&&this._highlightListItem(Ae,!1)},this.countryList.addEventListener("mouseover",this._handleMouseoverCountryList),this._handleClickCountryList=oe=>{var Ne;const Ae=(Ne=oe.target)==null?void 0:Ne.closest(".iti__country");Ae&&this._selectListItem(Ae)},this.countryList.addEventListener("click",this._handleClickCountryList);let te=!0;this._handleClickOffToClose=()=>{te||this._closeDropdown(),te=!1},document.documentElement.addEventListener("click",this._handleClickOffToClose);let re="",ge=null;if(this._handleKeydownOnDropdown=oe=>{["ArrowUp","ArrowDown","Enter","Escape"].includes(oe.key)&&(oe.preventDefault(),oe.stopPropagation(),oe.key==="ArrowUp"||oe.key==="ArrowDown"?this._handleUpDownKey(oe.key):oe.key==="Enter"?this._handleEnterKey():oe.key==="Escape"&&this._closeDropdown()),!this.options.countrySearch&&/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(oe.key)&&(oe.stopPropagation(),ge&&clearTimeout(ge),re+=oe.key.toLowerCase(),this._searchForCountry(re),ge=setTimeout(()=>{re=""},1e3))},document.addEventListener("keydown",this._handleKeydownOnDropdown),this.options.countrySearch){const oe=()=>{const Ne=this.searchInput.value.trim();Ne?this._filterCountries(Ne):this._filterCountries("",!0)};let Ae=null;this._handleSearchChange=()=>{Ae&&clearTimeout(Ae),Ae=setTimeout(()=>{oe(),Ae=null},100)},this.searchInput.addEventListener("input",this._handleSearchChange),this.searchInput.addEventListener("click",Ne=>Ne.stopPropagation())}}_searchForCountry(te){for(let re=0;reSt[0]).join("").toLowerCase(),ut=`+${Ne.dialCode}`;if(re||pt.includes(oe)||ut.includes(oe)||Ne.iso2.includes(oe)||ot.includes(oe)){const St=Ne.nodeById[this.id];St&&this.countryList.appendChild(St),ge&&(this._highlightListItem(St,!1),ge=!1)}}ge&&this._highlightListItem(null,!1),this.countryList.scrollTop=0,this._updateSearchResultsText()}_updateSearchResultsText(){const{i18n:te}=this.options,re=this.countryList.childElementCount;let ge;re===0?ge=te.zeroSearchResults:re===1?ge=te.oneSearchResult:ge=te.multipleSearchResults.replace("${count}",re.toString()),this.searchResultsA11yText.textContent=ge}_handleUpDownKey(te){var ge,oe;let re=te==="ArrowUp"?(ge=this.highlightedItem)==null?void 0:ge.previousElementSibling:(oe=this.highlightedItem)==null?void 0:oe.nextElementSibling;!re&&this.countryList.childElementCount>1&&(re=te==="ArrowUp"?this.countryList.lastElementChild:this.countryList.firstElementChild),re&&(this._scrollTo(re),this._highlightListItem(re,!1))}_handleEnterKey(){this.highlightedItem&&this._selectListItem(this.highlightedItem)}_updateValFromNumber(te){let re=te;if(this.options.formatOnDisplay&&ke.utils&&this.selectedCountryData){const ge=this.options.nationalMode||re.charAt(0)!=="+"&&!this.options.separateDialCode,{NATIONAL:oe,INTERNATIONAL:Ae}=ke.utils.numberFormat,Ne=ge?oe:Ae;re=ke.utils.formatNumber(re,this.selectedCountryData.iso2,Ne)}re=this._beforeSetNumber(re),this.telInput.value=re}_updateCountryFromNumber(te){const re=this._getCountryFromNumber(te);return re!==null?this._setCountry(re):!1}_ensureHasDialCode(te){const{dialCode:re,nationalPrefix:ge}=this.selectedCountryData;if(te.charAt(0)==="+"||!re)return te;const Ne=ge&&te.charAt(0)===ge&&!this.options.separateDialCode?te.substring(1):te;return`+${re}${Ne}`}_getCountryFromNumber(te){const re=te.indexOf("+");let ge=re?te.substring(re):te;const oe=this.selectedCountryData.iso2,Ae=this.selectedCountryData.dialCode;ge=this._ensureHasDialCode(ge);const Ne=this._getDialCode(ge,!0),pt=rt(ge);if(Ne){const ot=rt(Ne),ut=this.dialCodeToIso2Map[ot];if(!oe&&this.defaultCountry&&ut.includes(this.defaultCountry))return this.defaultCountry;const St=oe&&ut.includes(oe)&&(pt.length===ot.length||!this.selectedCountryData.areaCodes);if(!(Ae==="1"&&He(pt))&&!St){for(let at=0;atNe){const Bt=oe-pt;re.scrollTop=St-Bt}}_updateDialCode(te){const re=this.telInput.value,ge=`+${te}`;let oe;if(re.charAt(0)==="+"){const Ae=this._getDialCode(re);Ae?oe=re.replace(Ae,ge):oe=ge,this.telInput.value=oe}}_getDialCode(te,re){let ge="";if(te.charAt(0)==="+"){let oe="";for(let Ae=0;Ae-1){const ge=te.substring(0,re),oe=this._utilsIsPossibleNumber(ge),Ae=this._utilsIsPossibleNumber(te);return oe&&Ae}return this._utilsIsPossibleNumber(te)}_utilsIsPossibleNumber(te){return ke.utils?ke.utils.isPossibleNumber(te,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}isValidNumberPrecise(){if(!this.selectedCountryData.iso2)return!1;const te=this._getFullNumber(),re=te.search(new RegExp("\\p{L}","u"));if(re>-1){const ge=te.substring(0,re),oe=this._utilsIsValidNumber(ge),Ae=this._utilsIsValidNumber(te);return oe&&Ae}return this._utilsIsValidNumber(te)}_utilsIsValidNumber(te){return ke.utils?ke.utils.isValidNumber(te,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}setCountry(te){const re=te==null?void 0:te.toLowerCase(),ge=this.selectedCountryData.iso2;(te&&re!==ge||!te&&ge)&&(this._setCountry(re),this._updateDialCode(this.selectedCountryData.dialCode),this._triggerCountryChange())}setNumber(te){const re=this._updateCountryFromNumber(te);this._updateValFromNumber(te),re&&this._triggerCountryChange(),this._trigger("input",{isSetNumber:!0})}setPlaceholderNumberType(te){this.options.placeholderNumberType=te,this._updatePlaceholder()}setDisabled(te){this.telInput.disabled=te,te?this.selectedCountry.setAttribute("disabled","true"):this.selectedCountry.removeAttribute("disabled")}},Ze=te=>{if(!ke.utils&&!ke.startedLoadingUtilsScript){let re;if(typeof te=="function")try{re=Promise.resolve(te())}catch(ge){return Promise.reject(ge)}else return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof te}`));return ke.startedLoadingUtilsScript=!0,re.then(ge=>{const oe=ge==null?void 0:ge.default;if(!oe||typeof oe!="object")throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return ke.utils=oe,tt("handleUtils"),!0}).catch(ge=>{throw tt("rejectUtilsScriptPromise",ge),ge})}return null},ke=Object.assign((te,re)=>{const ge=new nt(te,re);return ge._init(),te.setAttribute("data-intl-tel-input-id",ge.id.toString()),ke.instances[ge.id]=ge,ge},{defaults:Fe,documentReady:()=>document.readyState==="complete",getCountryData:()=>ie,getInstance:te=>{const re=te.getAttribute("data-intl-tel-input-id");return re?ke.instances[re]:null},instances:{},attachUtils:Ze,startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"25.3.2"}),bt=ke;return B(N)})();return o.default})})(Uf)),Uf.exports}var bL=xL();const wL=qm(bL);var TL=Te('
                      '),CL=Te(' '),SL=Te('

                      ',1),PL=async(m,o,f)=>{await o(x(f))},IL=Te(' '),ML=(m,o)=>{ce(o,"")},kL=Te('

                      ',1),AL=Te('
                      ');function EL(m,o){Br(o,!0);let f=ct(!0),y=ct(""),M=ct(0),z=ct(!1);const T=ft(()=>x(M)>0||x(z));let s=ct(!1),B=ct(""),N=ct(void 0);const Y=ft(()=>{var Me;return`phone:${(Me=kt.data)==null?void 0:Me.id}`});Wr(()=>{const Me=localStorage.getItem(x(Y));Me&&ce(y,Me,!0)}),Dn(()=>{en.getOtpCooldown().then(Re=>{ce(M,Re.cooldownMs,!0)}).catch(Re=>{Nr.error(Re.message)}).finally(()=>{ce(f,!1)});const Me=1e3,Ee=setInterval(()=>{ce(M,Math.max(0,x(M)-Me),!0)},Me);return()=>{clearInterval(Ee)}});async function K(Me){try{ce(z,!0);const Ee=await en.sendOtp(Me);Nr.info(`${tS()} ${Ee.phone}`),ce(y,Ee.phone,!0),ce(M,Ee.cooldownMs,!0),localStorage.setItem(x(Y),x(y))}catch(Ee){Nr.error(Ee.message)}finally{ce(z,!1)}}Wr(()=>{x(B).length===6&&(ce(s,!0),(async()=>{try{await en.verifyOtp(x(B)),await kt.refresh(),Nr.success(iS()),localStorage.removeItem(x(Y)),o.onsuccess(x(y))}catch(Me){Nr.error(Me.message)}finally{ce(B,""),ce(s,!1)}})())});var ie=AL(),H=E(ie);{var me=Me=>{var Ee=TL();G(Me,Ee)},ve=Me=>{var Ee=er(),Re=Ct(Ee);{var ze=Ke=>{var rt=SL(),qe=Ct(rt),He=E(qe),et=E(He,!0);k(He);var De=q(He,2),tt=E(De,!0);k(De),k(qe);var nt=q(qe,2),Ze=E(nt);Wi(Ze,()=>ge=>(ce(N,wL(ge,{strictMode:!0,initialCountry:"br",loadUtils:()=>jx(()=>import("../chunks/DwuERyDq.js"),[],import.meta.url),containerClass:"w-full",dropdownContainer:document.body})),()=>{var oe;(oe=x(N))==null||oe.destroy()}));var ke=q(Ze,2),bt=E(ke),te=q(bt);{var re=ge=>{var oe=CL(),Ae=E(oe);k(oe),Ye(Ne=>fe(Ae,`(${Ne??""})`),[()=>tp(x(M))]),G(ge,oe)};je(te,ge=>{x(M)>0&&ge(re)})}k(ke),k(nt),Ye((ge,oe,Ae)=>{fe(et,ge),fe(tt,oe),ke.disabled=x(T),fe(bt,`${Ae??""} `)},[()=>GS(),()=>XS(),()=>JS()]),Ai("submit",nt,async()=>{var oe;if(x(T))return;if(!((oe=x(N))!=null&&oe.isValidNumber())){Nr.error(sS());return}const ge=x(N).getNumber();await K(ge)}),G(Ke,rt)},Fe=Ke=>{var rt=kL(),qe=Ct(rt),He=E(qe),et=E(He,!0);k(He);var De=q(He,2),tt=E(De);k(De),k(qe);var nt=q(qe,2),Ze=E(nt);{const Ne=(pt,ot)=>{let ut=()=>ot==null?void 0:ot().cells;var St=er(),Bt=Ct(St);yi(Bt,()=>mL,(at,dt)=>{dt(at,{class:"border-primary",children:(vt,yt)=>{var It=er(),wt=Ct(It);hi(wt,16,ut,mt=>mt,(mt,Dt)=>{var zt=er(),qt=Ct(zt);yi(qt,()=>vL,(tr,Qt)=>{Qt(tr,{get cell(){return Dt},class:"border-base-content/20 size-11 sm:size-12"})}),G(mt,zt)}),G(vt,It)},$$slots:{default:!0}})}),G(pt,St)};yi(Ze,()=>yL,(pt,ot)=>{ot(pt,{maxlength:6,class:"mx-auto w-max",get disabled(){return x(s)},get value(){return x(B)},set value(ut){ce(B,ut,!0)},children:Ne,$$slots:{default:!0}})})}k(nt);var ke=q(nt,2),bt=E(ke);bt.__click=[PL,K,y];var te=E(bt),re=q(te);{var ge=Ne=>{var pt=IL(),ot=E(pt);k(pt),Ye(ut=>fe(ot,`(${ut??""})`),[()=>tp(x(M))]),G(Ne,pt)};je(re,Ne=>{x(M)>0&&Ne(ge)})}k(bt);var oe=q(bt,2);oe.__click=[ML,y];var Ae=E(oe,!0);k(oe),k(ke),Ye((Ne,pt,ot,ut)=>{fe(et,Ne),fe(tt,`${pt??""} ${x(y)??""}`),bt.disabled=x(T),fe(te,`${ot??""} `),fe(Ae,ut)},[()=>tP(),()=>iP(),()=>sP(),()=>uP()]),G(Ke,rt)};je(Re,Ke=>{x(y)?Ke(Fe,!1):Ke(ze)},!0)}G(Me,Ee)};je(H,Me=>{x(f)?Me(me):Me(ve,!1)})}k(ie),G(m,ie),Fr()}Qn(["click"]);var zL=Te('');function LL(m,o){Br(o,!0);let f=Lt(o,"open",15);var y=zL(),M=E(y),z=q(E(M),2);{var T=s=>{EL(s,{onsuccess:()=>f(!1)})};je(z,s=>{f()&&s(T)})}k(M),k(y),Wi(y,()=>s=>{Wr(()=>{f()?s.show():s.close()})}),Ai("close",y,()=>f(!1)),G(m,y),Fr()}var DL=(m,o)=>{o()},RL=Te(''),BL=Te(''),FL=(m,o,f)=>{o(x(f).id)},OL=Te(''),NL=Te(''),jL=Te('
                      '),VL=Te(' '),qL=async(m,o,f)=>{try{ce(o,!0),await en.unlinkDiscord(),kt.refresh(),Nr.success(SS()),ce(f,!1)}catch(y){Nr.error(y.message,{duration:5e3})}finally{ce(o,!1)}},ZL=Te(''),UL=(m,o)=>{var f;(f=x(o))==null||f.show()},$L=(m,o)=>{o(!1)},GL=(m,o)=>{var f;(f=x(o))==null||f.close()},HL=async(m,o)=>{try{ce(o,!0),await en.deleteMe(),Nr.warning(DS()),await kt.logout()}catch(f){Nr.error(f.message)}finally{ce(o,!1)}},WL=Te(' ',1);function XL(m,o){Br(o,!0);let f=Lt(o,"open",15),y=ct(xi(o.userData.name)),M=ct(xi(o.userData.discord)),z=ct(xi(o.userData.showLastPixel)),T=ct(!1),s=ct(void 0),B=ct(void 0);const N=ix("2025-09_discord_linking");let Y=ct(!!o.userData.discordId);Dn(()=>{const rr=Kt=>{Kt.key==="Escape"&&f(!1)};return document.addEventListener("keydown",rr),()=>document.removeEventListener("keydown",rr)});let K=ct(void 0),ie=ct(void 0);Wr(()=>{ce(y,o.userData.name,!0),ce(z,o.userData.showLastPixel,!0)}),Wr(()=>{f()&&!x(B)&&en.getMyProfilePictures().then(rr=>{ce(B,rr,!0)}).catch(rr=>{Nr.error(rr.message)})});let H=ct(!1);async function me(rr){try{ce(H,!0),await en.changeProfilePicture(rr),await kt.refresh()}finally{ce(H,!1)}}var ve=WL(),Me=Ct(ve),Ee=E(Me),Re=q(E(Ee),2),ze=E(Re,!0);k(Re);var Fe=q(Re,2),Ke=E(Fe),rt=E(Ke),qe=E(rt),He=E(qe);lo(He,{class:"size-30",get userId(){return o.userData.id},get pictureUrl(){return o.userData.picture}});var et=q(He,2),De=E(et);Rv(De,{class:"size-5"}),k(et),k(qe);var tt=q(qe,2);{var nt=rr=>{var Kt=jL(),or=E(Kt),Sr=E(or,!0);k(or);var Dr=q(or,2),Zr=E(Dr);{var se=Z=>{var X=BL();X.__click=[DL,me];var ae=E(X);lo(ae,{class:"size-10 border",get userId(){return o.userData.id}});var de=q(ae,2);{var Se=Ie=>{var be=RL();G(Ie,be)};je(de,Ie=>{x(H)&&Ie(Se)})}k(X),Ye(()=>X.disabled=x(H)),G(Z,X)};je(Zr,Z=>{o.userData.picture&&Z(se)})}var j=q(Zr,2);hi(j,17,()=>x(B),Z=>Z.id,(Z,X)=>{var ae=er(),de=Ct(ae);{var Se=Ie=>{var be=NL();be.__click=[FL,me,X];var Oe=E(be);lo(Oe,{class:"size-10 border",get userId(){return o.userData.id},get pictureUrl(){return x(X).url}});var st=q(Oe,2);{var $e=Mt=>{var xe=OL();G(Mt,xe)};je(st,Mt=>{x(H)&&Mt($e)})}k(be),Ye(()=>be.disabled=x(H)),G(Ie,be)};je(de,Ie=>{o.userData.picture!==x(X).url&&Ie(Se)})}G(Z,ae)}),k(Dr),k(Kt),Ye(Z=>fe(Sr,Z),[()=>sw()]),G(rr,Kt)};je(tt,rr=>{var Kt;(Kt=x(B))!=null&&Kt.length&&rr(nt)})}k(rt);var Ze=q(rt,2),ke=E(Ze);{let rr=ft(()=>Xf()),Kt=ft(()=>Xf());Jf(ke,{get label(){return x(rr)},get placeholder(){return x(Kt)},min:1,max:16,get value(){return x(y)},set value(or){ce(y,or,!0)},get validate(){return x(K)},set validate(or){ce(K,or,!0)}})}var bt=q(ke,2);{var te=rr=>{var Kt=er(),or=Ct(Kt);{var Sr=Zr=>{var se=VL(),j=E(se);em(j,{class:"size-4.5"});var Z=q(j);k(se),Ye((X,ae)=>{xr(se,"href",X),fe(Z,` ${ae??""}`)},[()=>ax("/discord/authorize"),()=>MS()]),G(Zr,se)},Dr=Zr=>{var se=ZL();se.__click=[qL,T,Y];var j=E(se);em(j,{class:"size-4.5"});var Z=q(j);k(se),Ye(X=>{se.disabled=x(T),fe(Z,` ${X??""}`)},[()=>{var X;return ES({username:((X=o.userData)==null?void 0:X.discord)??""})}]),G(Zr,se)};je(or,Zr=>{x(Y)?Zr(Dr,!1):Zr(Sr)})}G(rr,Kt)},re=rr=>{{let Kt=ft(()=>l3());Jf(rr,{label:"Discord",get placeholder(){return x(Kt)},max:32,get value(){return x(M)},set value(or){ce(M,or,!0)},get validate(){return x(ie)},set validate(or){ce(ie,or,!0)}})}};je(bt,rr=>{N?rr(te):rr(re,!1)})}var ge=q(bt,2),oe=E(ge);uo(oe);var Ae=q(oe);k(ge),k(Ze),k(Ke);var Ne=q(Ke,2),pt=E(Ne);pt.__click=[UL,s];var ot=E(pt,!0);k(pt);var ut=q(pt,2),St=E(ut);St.__click=[$L,f];var Bt=E(St,!0);k(St);var at=q(St,2),dt=E(at,!0);k(at),k(ut),k(Ne),k(Fe),k(Ee),k(Me),Wi(Me,()=>rr=>{Wr(()=>{f()?rr.show():rr.close()})});var vt=q(Me,2),yt=E(vt),It=q(E(yt),2),wt=E(It,!0);k(It);var mt=q(It,2),Dt=E(mt,!0);k(mt);var zt=q(mt,2),qt=E(zt);qt.__click=[GL,s];var tr=E(qt,!0);k(qt);var Qt=q(qt,2);Qt.__click=[HL,T];var Ot=E(Qt,!0);k(Qt),k(zt),k(yt);var fr=q(yt,2),kr=E(fr),Ar=E(kr,!0);k(kr),k(fr),k(vt),Po(vt,rr=>ce(s,rr),()=>x(s)),Ye((rr,Kt,or,Sr,Dr,Zr,se,j,Z,X,ae)=>{fe(ze,rr),xr(et,"data-tip",Kt),fe(Ae,` ${or??""}`),fe(ot,Sr),St.disabled=x(T),fe(Bt,Dr),at.disabled=x(T),fe(dt,Zr),fe(wt,se),fe(Dt,j),fe(tr,Z),Qt.disabled=x(T),fe(Ot,X),fe(Ar,ae)},[()=>pP(),()=>Rx(),()=>uw(),()=>Yg(),()=>cl(),()=>Mx(),()=>mw(),()=>vw(),()=>up(),()=>Yg(),()=>cl()]),Ai("close",Me,()=>f(!1)),Ai("submit",Fe,async()=>{var rr,Kt;try{if(!((rr=x(K))!=null&&rr())||!((Kt=x(ie))!=null&&Kt()))return;ce(T,!0),await en.updateMe({name:x(y),showLastPixel:x(z),discord:x(M)}),kt.refresh(),Nr.success(yS()),f(!1)}catch(or){Nr.error(or.message,{duration:5e3})}finally{ce(T,!1)}}),Sx(oe,()=>x(z),rr=>ce(z,rr)),G(m,ve),Fr()}Qn(["click"]);var YL=Cr('');function KL(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=YL();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var JL=Cr('');function QL(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=JL();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var eD=Cr('');function tD(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=eD();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var rD=Cr('');function H0(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=rD();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var nD=Cr('');function iD(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=nD();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var aD=Cr('');function oD(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=aD();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 216 216",...f}),void 0,void 0,"svelte-1977t4s"),G(m,y)}var sD=Cr('');function W0(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=sD();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var lD=Cr('');function Cv(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=lD();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var cD=Cr('');function uD(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=cD();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...f})),G(m,y)}var hD=Cr('');function dD(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=hD();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var pD=Cr('');function fD(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=pD();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var mD=(m,o)=>{ce(o,!0)},_D=Te(' '),gD=Te('
                      '),vD=Te('

                      '),yD=Te('

                      '),xD=Te('
                      '),bD=(m,o,f)=>{localStorage.setItem(vx,x(o).key),ce(f,x(o).key,!0),location.reload()},wD=Te(''),TD=Te("
                    • "),CD=Te('
                      '),SD=async(m,o)=>{var f;try{const y=await((f=x(o))==null?void 0:f.prompt());(y==null?void 0:y.outcome)==="accepted"&&ce(o,void 0)}catch(y){Nr.error(G2({error:y.message}))}},PD=Te(''),ID=Te(' '),MD=Te(' '),kD=Te('
                      ',1),AD=async(m,o,f,y)=>{var M;try{ce(o,!0),await f.user.logout(),y(),Nr.warning(FS(),{icon:H0}),(M=f.onlogout)==null||M.call(f)}catch{Nr.error(jS())}finally{ce(o,!1)}},ED=Te(' ',1);function zD(m,o){Br(o,!0);let f=ct(!1),y=ct(!1);function M(){var ie;(ie=document.activeElement)==null||ie.blur()}const z=[{label:"🇺🇸 English",key:"en"},{label:"🇧🇷 Português",key:"pt"}];let T=ct(""),s=ct(void 0);const B=ft(()=>{var ie;return!!((ie=o.user.data)!=null&&ie.banned)||!!o.user.timeoutUntil});var N=er(),Y=Ct(N);{var K=ie=>{var H=ED(),me=Ct(H),ve=E(me);let Me;var Ee=E(ve);Ov(Ee,{get userId(){return o.user.data.id},get level(){return o.user.data.level},get pictureUrl(){return o.user.data.picture}}),k(ve);var Re=q(ve,2),ze=E(Re);ze.__click=M;var Fe=E(ze);_l(Fe,{class:"size-5"}),k(ze);var Ke=q(ze,2),rt=E(Ke),qe=E(rt);lo(qe,{get userId(){return o.user.data.id},get pictureUrl(){return o.user.data.picture},get isSuspended(){return x(B)}});var He=q(qe,2);He.__click=[mD,f];var et=E(He);Qf(et,{class:"size-4"}),k(He),k(rt);var De=q(rt,2),tt=E(De),nt=E(tt),Ze=E(nt,!0);k(nt);var ke=q(nt,2),bt=E(ke);k(ke);var te=q(ke,2);{var re=jt=>{const Et=ft(()=>So(o.user.data.equippedFlag));var hr=_D(),ht=E(hr,!0);k(hr),Ye(()=>{xr(hr,"data-tip",x(Et).name),fe(ht,x(Et).flag)}),G(jt,hr)};je(te,jt=>{o.user.data.equippedFlag&&jt(re)})}var ge=q(te,2);{var oe=jt=>{var Et=gD(),hr=E(Et);Ah(hr,{get username(){return o.user.data.discord},get id(){return o.user.data.discordId}}),k(Et),G(jt,Et)};je(ge,jt=>{o.user.data.discord&&jt(oe)})}k(tt);var Ae=q(tt,2),Ne=E(Ae);Eh(Ne,{class:"inline size-4"});var pt=q(Ne,2),ot=E(pt),ut=q(ot),St=E(ut,!0);k(ut),k(pt),k(Ae);var Bt=q(Ae,2),at=E(Bt);KL(at,{class:"inline size-4"});var dt=q(at,2),vt=E(dt),yt=E(vt);k(vt);var It=q(vt),wt=q(It),mt=E(wt);Uu(mt,{class:"mb-0.5 inline size-4 opacity-50"}),k(wt),k(dt),k(Bt),k(De),k(Ke);var Dt=q(Ke,2),zt=E(Dt);{var qt=jt=>{var Et=xD(),hr=E(Et);W0(hr,{class:"size-6 text-red-500"});var ht=q(hr,2);{var Hr=qr=>{var _t=vD(),Ge=E(_t),At=q(Ge);{var Rt=Yt=>{var br=bi();Ye(Er=>fe(br,`(${Er??""})`),[()=>sI({reason:cx()})]),G(Yt,br)};je(At,Yt=>{o.user.data.suspensionReason==="bot"&&Yt(Rt)})}k(_t),Ye(Yt=>fe(Ge,`${Yt??""} `),[()=>sx()]),G(qr,_t)},Yr=qr=>{var _t=er(),Ge=Ct(_t);{var At=Rt=>{var Yt=yD(),br=E(Yt);Mm(br,()=>lx({until:`${o.user.timeoutUntil.toLocaleString()}`})),k(Yt),G(Rt,Yt)};je(Ge,Rt=>{o.user.timeoutUntil&&Rt(At)},!0)}G(qr,_t)};je(ht,qr=>{var _t;(_t=o.user.data)!=null&&_t.banned?qr(Hr):qr(Yr,!1)})}k(Et),G(jt,Et)};je(zt,jt=>{x(B)&&jt(qt)})}var tr=q(zt,2),Qt=E(tr),Ot=E(Qt,!0);k(Qt);var fr=q(Qt,2),kr=E(fr),Ar=E(kr),rr=E(Ar);uD(rr,{class:"size-4"}),k(Ar);var Kt=q(Ar,2);hi(Kt,21,()=>z,hp,(jt,Et)=>{const hr=ft(()=>x(T)===x(Et).key);var ht=TD(),Hr=E(ht);let Yr;Hr.__click=[bD,Et,T];var qr=E(Hr);{var _t=At=>{var Rt=wD();G(At,Rt)};je(qr,At=>{x(hr)&&At(_t)})}var Ge=q(qr);k(Hr),k(ht),Ye(At=>{Yr=zr(Hr,1,"font-flag relative font-medium",null,Yr,At),fe(Ge,` ${x(Et).label??""}`)},[()=>({"bg-base-200":x(hr)})]),G(jt,ht)}),k(Kt),k(kr);var or=q(kr,2),Sr=E(or);Sr.__click=()=>{ai.muted=!ai.muted};var Dr=E(Sr);{var Zr=jt=>{dD(jt,{class:"size-4"})},se=jt=>{fD(jt,{class:"size-4"})};je(Dr,jt=>{ai.muted?jt(Zr):jt(se,!1)})}k(Sr),k(or);var j=q(or,2);{var Z=jt=>{var Et=CD(),hr=E(Et);hr.__click=()=>{ai.theme=ai.theme==="dark"?"custom-winter":"dark"};var ht=E(hr);{var Hr=qr=>{tD(qr,{class:"size-4"})},Yr=qr=>{QL(qr,{class:"size-4"})};je(ht,qr=>{ai.theme==="dark"?qr(Hr):qr(Yr,!1)})}k(hr),k(Et),Ye(qr=>xr(Et,"data-tip",qr),[()=>ai.theme==="dark"?wI():yI()]),G(jt,Et)};je(j,jt=>{var Et,hr;xc((hr=(Et=o.user)==null?void 0:Et.data)==null?void 0:hr.role,["admin","moderator","global_moderator"])&&jt(Z)})}k(fr),k(tr);var X=q(tr,2);{var ae=jt=>{var Et=PD();Et.__click=[SD,s];var hr=E(Et);zv(hr,{class:"size-5"});var ht=q(hr);k(Et),Ye(Hr=>fe(ht,` ${Hr??""}`),[()=>X2()]),G(jt,Et)};je(X,jt=>{x(s)&&jt(ae)})}var de=q(X,2);{var Se=jt=>{var Et=ID(),hr=E(Et);Cv(hr,{class:"size-5"});var ht=q(hr);k(Et),Ye(Hr=>{xr(Et,"href",`${vi.url.origin??""}/admin/dashboard`),fe(ht,` ${Hr??""}`)},[()=>iI()]),G(jt,Et)};je(de,jt=>{var Et;((Et=o.user.data)==null?void 0:Et.role)==="admin"&&jt(Se)})}var Ie=q(de,2);{var be=jt=>{var Et=MD(),hr=E(Et);Cv(hr,{class:"size-5"});var ht=q(hr);k(Et),Ye(Hr=>{xr(Et,"href",`${vi.url.origin??""}/admin`),fe(ht,` ${Hr??""}`)},[()=>jP()]),G(jt,Et)};je(Ie,jt=>{var Et;(Et=o.user.data)!=null&&Et.role&&o.user.data.role!=="user"&&jt(be)})}var Oe=q(Ie,2),st=E(Oe);Vv(st,{class:"size-5"});var $e=q(st);k(Oe);var Mt=q(Oe,2),xe=E(Mt);Kf(xe,{class:"size-5"}),vn(),k(Mt);var Ft=q(Mt,2),cr=E(Ft);oD(cr,{class:"size-5"}),vn(),k(Ft);var Jt=q(Ft,2);{var Tr=jt=>{var Et=kD(),hr=Ct(Et),ht=E(hr),Hr=E(ht);iD(Hr,{class:"size-5"});var Yr=q(Hr);k(ht),k(hr);var qr=q(hr,2),_t=E(qr);Uu(_t,{class:"size-5"});var Ge=q(_t);k(qr),Ye((At,Rt,Yt)=>{xr(hr,"action",`${ox}/payment/create-portal-session`),fe(Yr,` ${At??""}`),xr(qr,"href",Rt),fe(Ge,` ${Yt??""}`)},[()=>xx(),()=>Bv(vi.url.origin),()=>Kv()]),G(jt,Et)};je(Jt,jt=>{var Et;(Et=o.user.data)!=null&&Et.isCustomer&&jt(Tr)})}var Xr=q(Jt,2);Xr.__click=[AD,y,o,M];var dn=E(Xr);H0(dn,{class:"size-5"});var xn=q(dn);k(Xr),k(Dt),k(Re),k(me);var mn=q(me,2);XL(mn,{get userData(){return o.user.data},get open(){return x(f)},set open(jt){ce(f,jt,!0)}}),Ye((jt,Et,hr,ht,Hr,Yr,qr,_t,Ge,At,Rt,Yt)=>{Me=zr(ve,1,"btn size-12 p-0 shadow-md",null,Me,jt),xr(ve,"title",Et),xr(nt,"title",o.user.data.name),fe(Ze,o.user.data.name),zr(ke,1,hr),fe(bt,`#${o.user.data.id??""}`),fe(ot,`${ht??""}: `),fe(St,Hr),fe(yt,`Level ${Yr??""}`),fe(It,` (${qr??""}%) `),xr(wt,"data-tip",_t),fe(Ot,Ge),xr(or,"data-tip",At),fe($e,` ${Rt??""}`),Xr.disabled=x(y),fe(xn,` ${Yt??""}`)},[()=>({"bg-red-500":x(B)}),()=>j2(),()=>Ko(Oi(o.user.data.id)),()=>Am(),()=>o.user.data.pixelsPainted.toLocaleString("en-US"),()=>Math.floor(o.user.data.level),()=>Math.floor(o.user.data.level%1*100),()=>n3(),()=>Z2(),()=>ai.muted?FC():DC(),()=>J2(),()=>tw()]),Ai("focus",ve,()=>{ce(s,window.pwaInstallPrompt,!0)}),G(ie,H)};je(Y,ie=>{o.user.data&&o.user.charges!==void 0&&ie(K)})}G(m,N),Fr()}Qn(["click"]);var LD=Cr('');function DD(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=LD();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...f})),G(m,y)}var RD=Cr('');function BD(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=RD();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var FD=async(m,o,f,y,M,z)=>{if(x(o)){f.map.easeTo(x(o)),ce(o,void 0);return}ce(y,!0);try{Co(f.map.getCenter(),f.map.getZoom());const T=new fl(x(M)),{tile:s,pixel:B}=await en.getRandomTile(f.season),N=s.x*x(M)+B.x,Y=s.y*x(M)+B.y,[K,ie]=T.pixelsToLatLon(N,Y,x(z)),H={lat:K,lng:ie},me=x(z)+2;ce(o,{zoom:me,center:H},!0),f.map.flyTo(x(o)),hl.isEmpty()&&hl.push({pos:f.map.getCenter(),zoom:f.map.getZoom()}),setTimeout(()=>{ce(o,void 0)},2500),hl.push({pos:H,zoom:me})}catch(T){Nr.error(T.message)}finally{ce(y,!1)}},OD=Te('');function ND(m,o){Br(o,!0);const f=ft(()=>Hi.seasons[o.season].tileSize),y=ft(()=>Hi.seasons[o.season].zoom);let M=ct(!1),z=ct(void 0);var T=OD();T.__click=[FD,z,o,M,f,y];var s=E(T);{var B=Y=>{BD(Y,{class:"size-5"})},N=Y=>{DD(Y,{class:"size-5"})};je(s,Y=>{x(z)?Y(N,!1):Y(B)})}k(T),Ye(Y=>{xr(T,"title",Y),T.disabled=x(M)},[()=>f2()]),G(m,T),Fr()}Qn(["click"]);var jD=Te(''),VD=Te('
                      '),qD=Te(' '),ZD=Te(" "),UD=Te('
                      '),$D=Te('

                      '),GD=Te(' '),HD=Te('

                      '),WD=Te('
                      '),XD=Te('
                      ',1);function YD(m,o){Br(o,!0);const f=[];let y=ct("today"),M={players:{label:Xv(),icon:vp},alliances:{label:Yv(),icon:yp}},z=ct("players"),T=xi({players:{},alliances:{}});const s=ft(()=>T[x(z)][x(y)]);Wr(()=>{if(x(s))return;const ve=x(y),Me=x(z);Me==="players"?en.leaderboardRegionPlayers(o.regionId,ve).then(Ee=>{T[Me][ve]=Ee}).catch(Ee=>{Nr.error(Ee.message)}):Me==="alliances"&&en.leaderboardRegionAlliances(o.regionId,ve).then(Ee=>{T[Me][ve]=Ee}).catch(Ee=>{Nr.error(Ee.message)})});var B=XD(),N=Ct(B);hi(N,21,()=>Object.entries(M),([ve,{label:Me,icon:Ee}])=>ve,(ve,Me)=>{var Ee=ft(()=>Mv(x(Me),2));let Re=()=>x(Ee)[0],ze=()=>x(Ee)[1].label,Fe=()=>x(Ee)[1].icon;const Ke=ft(Fe);var rt=jD(),qe=E(rt);uo(qe);var He,et=q(qe,2);yi(et,()=>x(Ke),(tt,nt)=>{nt(tt,{get this(){return Fe()},class:"mr-1 size-5 max-sm:hidden"})});var De=q(et);k(rt),Ye(()=>{xr(qe,"aria-label",ze()),He!==(He=Re())&&(qe.value=(qe.__value=Re())??""),fe(De,` ${ze()??""}`)}),Em(f,[],qe,()=>(Re(),x(z)),tt=>ce(z,tt)),G(ve,rt)}),k(N);var Y=q(N,2),K=E(Y);Zm(K,{get value(){return x(y)},set value(ve){ce(y,ve,!0)}}),k(Y);var ie=q(Y,2);{var H=ve=>{var Me=VD(),Ee=E(Me),Re=q(Ee);{var ze=Ke=>{var rt=bi();Ye(qe=>fe(rt,qe),[()=>gp().toLowerCase()]),G(Ke,rt)},Fe=Ke=>{var rt=er(),qe=Ct(rt);{var He=De=>{var tt=bi();Ye(nt=>fe(tt,nt),[()=>Om()]),G(De,tt)},et=De=>{var tt=er(),nt=Ct(tt);{var Ze=ke=>{var bt=bi();Ye(te=>fe(bt,te),[()=>Nm()]),G(ke,bt)};je(nt,ke=>{x(y)==="month"&&ke(Ze)},!0)}G(De,tt)};je(qe,De=>{x(y)==="week"?De(He):De(et,!1)},!0)}G(Ke,rt)};je(Re,Ke=>{x(y)==="today"?Ke(ze):Ke(Fe,!1)})}k(Me),Ye(Ke=>fe(Ee,`${Ke??""} `),[()=>Fm()]),G(ve,Me)},me=ve=>{var Me=er(),Ee=Ct(Me);{var Re=Fe=>{var Ke=er(),rt=Ct(Ke);{var qe=et=>{const De=ft(()=>x(s));var tt=$D(),nt=E(tt),Ze=E(nt),ke=q(E(Ze)),bt=E(ke,!0);k(ke);var te=q(ke),re=E(te),ge=q(re,2,!0);k(te),k(Ze),k(nt);var oe=q(nt);hi(oe,31,()=>x(De),Ae=>Ae.id,(Ae,Ne,pt)=>{const ot=ft(()=>{var Kt;return((Kt=kt.data)==null?void 0:Kt.id)===x(Ne).id});var ut=UD();let St;var Bt=E(ut),at=E(Bt,!0);k(Bt);var dt=q(Bt),vt=E(dt),yt=E(vt);lo(yt,{class:"size-10 border",get userId(){return x(Ne).id},get pictureUrl(){return x(Ne).picture}});var It=q(yt,2),wt=E(It),mt=E(wt),Dt=q(mt),zt=E(Dt);k(Dt),k(wt);var qt=q(wt,2);{var tr=Kt=>{const or=ft(()=>So(x(Ne).equippedFlag));var Sr=qD(),Dr=E(Sr,!0);k(Sr),Ye(()=>{xr(Sr,"data-tip",x(or).name),fe(Dr,x(or).flag)}),G(Kt,Sr)};je(qt,Kt=>{"equippedFlag"in x(Ne)&&x(Ne).equippedFlag&&Kt(tr)})}var Qt=q(qt,2);{var Ot=Kt=>{Ah(Kt,{get username(){return x(Ne).discord},get id(){return x(Ne).discordId}})};je(Qt,Kt=>{x(Ne).discord&&Kt(Ot)})}var fr=q(Qt,2);{var kr=Kt=>{var or=ZD(),Sr=E(or,!0);k(or),Ye((Dr,Zr)=>{zr(or,1,`badge badge-sm ml-0.5 border-0 ${Dr??""} ${Zr??""}`),fe(Sr,x(Ne).allianceName)},[()=>dp(x(Ne).allianceId),()=>Oi(x(Ne).allianceId)]),G(Kt,or)};je(fr,Kt=>{"allianceName"in x(Ne)&&x(Ne).allianceName&&Kt(kr)})}k(It),k(vt),k(dt);var Ar=q(dt),rr=E(Ar,!0);k(Ar),k(ut),Ye((Kt,or,Sr)=>{St=zr(ut,1,"",null,St,Kt),fe(at,x(pt)+1),zr(wt,1,`font-semibold max-sm:ml-2 ${or??""} flex gap-1`),fe(mt,`${x(Ne).name??""} `),fe(zt,`#${x(Ne).id??""}`),fe(rr,Sr)},[()=>({"bg-base-200":x(ot)}),()=>Oi(x(Ne).id),()=>x(Ne).pixelsPainted.toLocaleString("en-US")]),sl(ut,()=>ll,()=>({duration:200})),G(Ae,ut)}),k(oe),k(tt),Ye((Ae,Ne,pt)=>{fe(bt,Ae),fe(re,`${Ne??""} `),fe(ge,pt)},[()=>Lm(),()=>vc(),()=>yc().toLowerCase()]),G(et,tt)},He=et=>{var De=er(),tt=Ct(De);{var nt=Ze=>{var ke=HD(),bt=E(ke),te=E(bt),re=q(E(te)),ge=E(re,!0);k(re);var oe=q(re),Ae=E(oe),Ne=q(Ae,2,!0);k(oe),k(te),k(bt);var pt=q(bt);hi(pt,31,()=>x(s),ot=>ot.id,(ot,ut,St)=>{const Bt=ft(()=>{var qt;return((qt=kt.data)==null?void 0:qt.allianceId)===x(ut).id});var at=GD();let dt;var vt=E(at),yt=E(vt,!0);k(vt);var It=q(vt),wt=E(It),mt=E(wt,!0);k(wt),k(It);var Dt=q(It),zt=E(Dt,!0);k(Dt),k(at),Ye((qt,tr,Qt)=>{dt=zr(at,1,"",null,dt,qt),fe(yt,x(St)+1),zr(wt,1,`font-semibold ${tr??""}`),fe(mt,x(ut).name),fe(zt,Qt)},[()=>({"bg-base-200":x(Bt)}),()=>Oi(x(ut).id),()=>x(ut).pixelsPainted.toLocaleString("en-US")]),sl(at,()=>ll,()=>({duration:200})),G(ot,at)}),k(pt),k(ke),Ye((ot,ut,St)=>{fe(ge,ot),fe(Ae,`${ut??""} `),fe(Ne,St)},[()=>mp(),()=>vc(),()=>yc().toLowerCase()]),G(Ze,ke)};je(tt,Ze=>{x(z)==="alliances"&&Ze(nt)},!0)}G(et,De)};je(rt,et=>{x(z)==="players"?et(qe):et(He,!1)})}G(Fe,Ke)},ze=Fe=>{var Ke=WD();G(Fe,Ke)};je(Ee,Fe=>{x(s)?Fe(Re):Fe(ze,!1)},!0)}G(ve,Me)};je(ie,ve=>{x(s)&&x(s).length===0?ve(H):ve(me,!1)})}G(m,B),Fr()}var KD=Te('
                      '),JD=Te(' ');function QD(m,o){Br(o,!0);let f=Lt(o,"open",15);const y=ft(()=>So(o.region.countryId));Dn(()=>{const ve=Me=>{Me.key==="Escape"&&f(!1)};return document.addEventListener("keydown",ve),()=>document.removeEventListener("keydown",ve)});var M=JD(),z=E(M),T=q(E(z),2),s=E(T),B=E(s,!0);k(s);var N=q(s,2),Y=E(N,!0);k(N);var K=q(N,2),ie=E(K);k(K),k(T);var H=q(T,2);{var me=ve=>{var Me=KD(),Ee=E(Me);YD(Ee,{get regionId(){return o.region.id}}),k(Me),ki(2,Me,()=>ia,()=>({duration:300})),G(ve,Me)};je(H,ve=>{f()&&ve(me)})}k(z),vn(2),k(M),Wi(M,()=>ve=>{Wr(()=>{f()?ve.show():ve.close()})}),Ye(ve=>{zr(T,1,`flex gap-2 text-xl font-bold sm:text-2xl ${ve??""}`),xr(s,"data-tip",x(y).name),fe(B,x(y).flag),fe(Y,o.region.name),fe(ie,`#${o.region.number??""}`)},[()=>Oi(o.region.cityId)]),Ai("close",M,()=>f(!1)),G(m,M),Fr()}var eR=Cr('');function tR(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=eR();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...f})),G(m,y)}var rR=Cr(''),nR=Cr('');function iR(m,o){let f=ir(o,["$$slots","$$events","$$legacy","filled"]);var y=er(),M=Ct(y);{var z=s=>{var B=rR();ar(B,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(s,B)},T=s=>{var B=nR();ar(B,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(s,B)};je(M,s=>{o.filled?s(z):s(T,!1)})}G(m,y)}var aR=(m,o,f,y,M)=>{if(x(o)&&x(f)){const z=x(o)-x(f).clientHeight,T=x(o)/2-z/2;y.map.flyTo({center:{lat:x(M).center[0],lng:x(M).center[1]},zoom:17.5,offset:[0,-T]})}},oR=(m,o,f)=>o.onclickregion(x(f)),sR=Te(''),lR=Te('
                      '),cR=Te('
                      '),uR=Te(' '),hR=(m,o)=>{navigator.clipboard.writeText(x(o).allianceId.toString()),Nr.success(Bm())},dR=Te(""),pR=Te(" ",1),fR=Te(''),mR=Te(''),_R=(m,o)=>{o("report-user")},gR=Te("
                    • "),vR=(m,o)=>{o("timeout")},yR=Te("
                    • "),xR=(m,o)=>{o("ban")},bR=Te("
                    • "),wR=async(m,o,f,y,M,z)=>{ce(o,!0);try{await en.banAllianceUser(x(f).id),await y({...x(M),season:z.season})}catch(T){Nr.error(T.message)}finally{ce(o,!1)}},TR=Te('
                    • '),CR=Te(''),SR=Te('
                      '),PR=(m,o)=>o.onclickpaint(o.latLon),IR=async(m,o,f,y)=>{try{ce(o,!0),x(f)?(await en.deleteFavoriteLocation(x(f).id),Nr.warning(uS())):(await en.favoriteLocation(x(y).center),Nr.success(pS())),aa.smallPlop.play(),kt.refresh()}catch(M){Nr.error(M.message)}finally{ce(o,!1)}},MR=Te(""),kR=(m,o,f)=>o.onclickshare(BI(vi.url,{pos:{lat:x(f).center[0],lng:x(f).center[1]},zoom:o.zoom})),AR=Te('

                      ');function ER(m,o){Br(o,!0);let f=ct(void 0);const y=ft(()=>new fl(o.tileSize));let M=ct(void 0),z=ct(void 0),T=ct(!1),s=ct(!1);const B=ft(()=>{var at,dt,vt;return!!((dt=(at=x(f))==null?void 0:at.paintedBy)!=null&&dt.id)&&((vt=kt.data)==null?void 0:vt.id)===x(f).paintedBy.id}),N=ft(()=>{const[at,dt]=o.latLon??[0,0],vt=x(y).latLonToPixelBoundsLatLon(at,dt,o.pixelArtZoom),yt=Vm(vt),{tile:It,pixel:wt}=x(y).latLonToTileAndPixel(at,dt,o.pixelArtZoom),mt=x(y).latLonToRegionAndPixel(at,dt,o.pixelArtZoom);return{bounds:vt,center:yt,tile:It,pixel:wt,regionPixel:mt.pixel}});Wr(()=>{aa.plop.play(),o.crosshair.clearAndPlace(o.latLon)});let Y=0;const K=({pixel:at,tile:dt,season:vt})=>`s${vt}:p(${at[0]},${at[1]}):t(${dt[0]},${dt[1]})`;let ie;dl(()=>[x(N),o.season],()=>{const at={...x(N),season:o.season},dt=K(at);if(ce(f,o.pixelInfoCache.get(dt),!0),x(f)!==void 0)return;o.pixelInfoCache.size===0&&(Y=0),Y++,Y>6?(clearTimeout(ie),ie=setTimeout(async()=>H(at),500)):H(at)});async function H(at){var yt;const dt=await en.getPixelInfo({...at,isModerator:xc((yt=kt.data)==null?void 0:yt.role,["admin","global_moderator","moderator"])});if(dt.paintedBy!==void 0){const It=K(at);o.pixelInfoCache.set(It,dt)}const vt=K({...x(N),season:o.season});return ce(f,o.pixelInfoCache.get(vt),!0),dt}function me(){o.crosshair.clear(),aa.smallPlop.play(),o.onclose()}Dn(()=>{const at=dt=>{dt.key==="Escape"&&me()};return document.addEventListener("keydown",at),()=>document.removeEventListener("keydown",at)});const ve=ft(()=>{var yt,It,wt,mt,Dt;const at=[],dt=(It=(yt=kt)==null?void 0:yt.data)==null?void 0:It.role;xc(dt,["admin"])&&!x(B)&&at.push("ban-user"),xc(dt,["admin","global_moderator","moderator"])&&!x(B)&&at.push("timeout-user"),!x(B)&&kt.data&&at.push("report-user");const vt=(wt=x(f))==null?void 0:wt.paintedBy;return(vt==null?void 0:vt.allianceId)===((mt=kt.data)==null?void 0:mt.allianceId)&&((Dt=kt.data)==null?void 0:Dt.allianceRole)==="admin"&&kt.data.id!==(vt==null?void 0:vt.id)&&!x(B)&&at.push("ban-alliance"),at});function Me(at){const dt=(async()=>await i0(o.map,{maxHeight:1080,maxWidth:1080,quality:.8,type:"image/jpeg"}))();o.onclickmodaction(x(f),dt,o.latLon,at)}var Ee=AR(),Re=E(Ee),ze=E(Re),Fe=E(ze);Fe.__click=[aR,M,z,o,N];var Ke=E(Fe);km(Ke,{class:"fill-primary size-5"}),k(Fe);var rt=q(Fe,2),qe=E(rt),He=E(qe);k(qe);var et=q(qe,2);{var De=at=>{const dt=ft(()=>x(f).region),vt=ft(()=>So(x(dt).countryId));var yt=sR();yt.__click=[oR,o,dt];var It=E(yt),wt=E(It,!0);k(It);var mt=q(It,2),Dt=E(mt,!0);k(mt);var zt=q(mt,2),qt=E(zt);k(zt),k(yt),Ye(tr=>{zr(yt,1,`btn btn-xs flex gap-1 py-3 text-sm max-sm:max-w-32 ${tr??""}`),xr(It,"data-tip",x(vt).name),fe(wt,x(vt).flag),fe(Dt,x(dt).name),fe(qt,`#${x(dt).number??""}`)},[()=>Oi(x(dt).cityId)]),G(at,yt)},tt=at=>{var dt=lR();G(at,dt)};je(et,at=>{var dt;(dt=x(f))!=null&&dt.region?at(De):at(tt,!1)})}k(rt),k(ze);var nt=q(ze,2);nt.__click=me;var Ze=E(nt);_l(Ze,{class:"size-4"}),k(nt),k(Re);var ke=q(Re,2),bt=E(ke);{var te=at=>{var dt=cR();G(at,dt)},re=at=>{var dt=er(),vt=Ct(dt);{var yt=wt=>{var mt=bi();Ye(Dt=>fe(mt,Dt),[()=>_C()]),G(wt,mt)},It=wt=>{const mt=ft(()=>x(f).paintedBy);var Dt=SR(),zt=E(Dt),qt=E(zt);k(zt);var tr=q(zt,2),Qt=E(tr);lo(Qt,{class:"size-5 border-0",get userId(){return x(mt).id},get pictureUrl(){return x(mt).picture}}),k(tr);var Ot=q(tr,2),fr=E(Ot),kr=E(fr),Ar=E(kr,!0);k(kr);var rr=q(kr,2),Kt=E(rr);k(rr),k(fr);var or=q(fr,2);{var Sr=Ie=>{const be=ft(()=>So(x(mt).equippedFlag));var Oe=uR(),st=E(Oe,!0);k(Oe),Ye(()=>{xr(Oe,"data-tip",x(be).name),fe(st,x(be).flag)}),G(Ie,Oe)};je(or,Ie=>{x(mt).equippedFlag&&Ie(Sr)})}var Dr=q(or,2);{var Zr=Ie=>{Ah(Ie,{get username(){return x(mt).discord},get id(){return x(mt).discordId}})};je(Dr,Ie=>{x(mt).discord&&Ie(Zr)})}var se=q(Dr,2);{var j=Ie=>{var be=pR(),Oe=Ct(be),st=E(Oe,!0);k(Oe);var $e=q(Oe,2);{var Mt=xe=>{var Ft=dR();Ft.__click=[hR,mt];var cr=E(Ft);Dm(cr,{class:"size-3"}),k(Ft),Ye((Jt,Tr)=>{zr(Ft,1,Jt),xr(Ft,"title",Tr)},[()=>Ko(Oi(x(mt).allianceId)),()=>Fx({allianceId:x(mt).allianceId})]),G(xe,Ft)};je($e,xe=>{var Ft,cr,Jt;(((Ft=kt.data)==null?void 0:Ft.role)==="admin"||((cr=kt.data)==null?void 0:cr.role)==="moderator"||((Jt=kt.data)==null?void 0:Jt.role)==="global_moderator")&&xe(Mt)})}Ye((xe,Ft)=>{zr(Oe,1,`badge badge-sm ml-0.5 border-0 ${xe??""} ${Ft??""}`),fe(st,x(mt).allianceName)},[()=>dp(x(mt).allianceId),()=>Oi(x(mt).allianceId)]),G(Ie,be)};je(se,Ie=>{x(mt).allianceId&&Ie(j)})}var Z=q(se,2);{var X=Ie=>{var be=fR(),Oe=E(be);Wg(Oe,{class:"text-error size-4"}),k(be),Ye(st=>xr(be,"data-tip",st),[()=>Wv()]),G(Ie,be)},ae=Ie=>{var be=er(),Oe=Ct(be);{var st=$e=>{var Mt=mR(),xe=E(Mt);Wf(xe,{class:"text-error size-4"}),k(Mt),Ye(Ft=>xr(Mt,"data-tip",Ft),[()=>Ex()]),G($e,Mt)};je(Oe,$e=>{x(f).paintedBy.timedOut&&$e(st)},!0)}G(Ie,be)};je(Z,Ie=>{x(f).paintedBy.banned?Ie(X):Ie(ae,!1)})}k(Ot);var de=q(Ot,2);{var Se=Ie=>{var be=CR(),Oe=E(be),st=E(Oe);Um(st,{class:"size-4"}),k(Oe);var $e=q(Oe,2);hi($e,21,()=>x(ve),hp,(Mt,xe)=>{var Ft=er(),cr=Ct(Ft);{var Jt=Xr=>{var dn=gR(),xn=E(dn);let mn;xn.__click=[_R,Me];var jt=E(xn);W0(jt,{class:"size-5"});var Et=q(jt);k(xn),k(dn),Ye((hr,ht)=>{mn=zr(xn,1,"text-error py-2 font-medium",null,mn,hr),fe(Et,` ${ht??""}`)},[()=>({"cursor-not-allowed":x(B)}),()=>bx()]),G(Xr,dn)},Tr=Xr=>{var dn=er(),xn=Ct(dn);{var mn=Et=>{var hr=yR(),ht=E(hr);let Hr;ht.__click=[vR,Me];var Yr=E(ht);Wf(Yr,{class:"size-5"});var qr=q(Yr);k(ht),k(hr),Ye((_t,Ge)=>{Hr=zr(ht,1,"text-error font-medium",null,Hr,_t),fe(qr,` ${Ge??""}`)},[()=>({"cursor-not-allowed":x(B)}),()=>wx()]),G(Et,hr)},jt=Et=>{var hr=er(),ht=Ct(hr);{var Hr=qr=>{var _t=bR(),Ge=E(_t);let At;Ge.__click=[xR,Me];var Rt=E(Ge);Wg(Rt,{class:"size-5"});var Yt=q(Rt);k(Ge),k(_t),Ye((br,Er)=>{At=zr(Ge,1,"text-error font-medium",null,At,br),fe(Yt,` ${Er??""}`)},[()=>({"cursor-not-allowed":x(B)}),()=>Tx()]),G(qr,_t)},Yr=qr=>{var _t=er(),Ge=Ct(_t);{var At=Rt=>{var Yt=TR(),br=E(Yt);br.__click=[wR,s,mt,H,N,o];var Er=E(br);tR(Er,{class:"size-5"});var ur=q(Er);k(br),k(Yt),Ye(rn=>fe(ur,` ${rn??""}`),[()=>Hv()]),G(Rt,Yt)};je(Ge,Rt=>{x(xe)==="ban-alliance"&&Rt(At)},!0)}G(qr,_t)};je(ht,qr=>{x(xe)==="ban-user"?qr(Hr):qr(Yr,!1)},!0)}G(Et,hr)};je(xn,Et=>{x(xe)==="timeout-user"?Et(mn):Et(jt,!1)},!0)}G(Xr,dn)};je(cr,Xr=>{x(xe)==="report-user"?Xr(Jt):Xr(Tr,!1)})}G(Mt,Ft)}),k($e),k(be),G(Ie,be)};je(de,Ie=>{x(ve).length>0&&Ie(Se)})}k(Dt),Ye((Ie,be)=>{var Oe;fe(qt,`${Ie??""}:`),zr(fr,1,`font-medium ${be??""} flex gap-1.5`),fe(Ar,((Oe=kt.data)==null?void 0:Oe.id)===x(mt).id?kt.data.name:x(mt).name),fe(Kt,`#${x(mt).id??""}`)},[()=>yC(),()=>Oi(x(mt).id)]),G(wt,Dt)};je(vt,wt=>{x(f).paintedBy.id===0?wt(yt):wt(It,!1)},!0)}G(at,dt)};je(bt,at=>{x(f)===void 0?at(te):at(re,!1)})}k(ke);var ge=q(ke,2),oe=E(ge);oe.__click=[PR,o];var Ae=E(oe);Eh(Ae,{class:"size-4.5"});var Ne=q(Ae);k(oe);var pt=q(oe,2);{var ot=at=>{const dt=ft(()=>kt.data.favoriteLocations.find(Dt=>Math.abs(Dt.latitude-x(N).center[0])<5e-5&&Math.abs(Dt.longitude-x(N).center[1])<5e-5)),vt=ft(()=>!x(dt)&&kt.data.favoriteLocations.length>=kt.data.maxFavoriteLocations);var yt=MR();let It;yt.__click=[IR,T,dt,N];var wt=E(yt);{let Dt=ft(()=>!!x(dt));iR(wt,{class:"size-4.5",get filled(){return x(Dt)}})}var mt=q(wt);k(yt),Ye((Dt,zt)=>{It=zr(yt,1,"btn btn-primary btn-soft",null,It,Dt),yt.disabled=x(T)||x(vt),fe(mt,` ${zt??""}`)},[()=>({"text-yellow-400":!!x(dt)}),()=>x(vt)?wC():SC()]),G(at,yt)};je(pt,at=>{kt.data&&at(ot)})}var ut=q(pt,2);ut.__click=[kR,o,N];var St=E(ut);a0(St,{class:"size-4.5"});var Bt=q(St);k(ut),k(ge),k(Ee),Po(Ee,at=>ce(z,at),()=>x(z)),Ye((at,dt)=>{fe(He,`Pixel: ${x(N).regionPixel[0]??""}, ${x(N).regionPixel[1]??""}`),oe.disabled=kt.loading,fe(Ne,` ${at??""}`),fe(Bt,` ${dt??""}`)},[()=>$v(),()=>MC()]),fp("innerHeight",at=>ce(M,at,!0)),G(m,Ee),Fr()}Qn(["click"]);var zR=Te(" ",1),LR=(m,o,f)=>{o(x(f))},DR=Te('
                      '),RR=Te('

                      No one has painted in this area yet.

                      '),BR=(m,o)=>{navigator.clipboard.writeText(x(o).map(f=>f.id).join(", ")),Nr.success("Player IDs copied to clipboard")},FR=(m,o,f,y,M)=>{o.crosshair.clear(),f(x(y).painted),ce(M,x(y).id,!0)},OR=Te(" "),NR=Te('
                      '),jR=Te('
                      Player Pixels Painted
                      '),VR=Te('

                      Selected area

                      ');function qR(m,o){Br(o,!0);let f=xi([]),y=ct(xi([])),M=ct(!1),z=ct(void 0);Dn(()=>{const H=o.map.on("click",async me=>{if(f.length>=2){o.onclose();return}if(f.push(me.lngLat),o.crosshair.place([me.lngLat.lat,me.lngLat.lng]),aa.plop.play(),f.length===2)try{ce(M,!0),ce(y,await T(f[0],f[1]),!0),s(x(y))}finally{ce(M,!1)}});return()=>{H.unsubscribe(),o.crosshair.clear()}});async function T(H,me){const ve=new fl(o.tileSize),[Me,Ee]=ve.latLonToPixelsFloor(H.lat,H.lng,o.pixelArtZoom),[Re,ze]=ve.latLonToPixelsFloor(me.lat,me.lng,o.pixelArtZoom),[Fe,Ke]=[Math.min(Me,Re),Math.min(Ee,ze)],[rt,qe]=[Math.max(Me,Re),Math.max(Ee,ze)],He=rt-Fe,et=qe-Ke;if(He*et>1e6)return Nr.error("The selected area is too big. Please select an area smaller than 1,000,000 pixels."),[];const tt=Math.floor(Fe/o.tileSize),nt=Math.floor(Ke/o.tileSize),Ze=Math.floor(rt/o.tileSize),ke=Math.floor(qe/o.tileSize),bt=Ze-tt+1,te=ke-nt+1,re=new Array(te).fill(0).flatMap((ot,ut)=>new Array(bt).fill(0).map(async(St,Bt)=>{const at=tt+Bt,dt=nt+ut;let vt=0,yt=0,It=o.tileSize-1,wt=o.tileSize-1;dt===nt&&(yt=Ke%o.tileSize),at===tt&&(vt=Fe%o.tileSize),dt===ke&&(wt=qe%o.tileSize),at===Ze&&(It=rt%o.tileSize);const tr=[at,dt],Qt=[vt,yt],Ot=[It,wt];return{response:await en.getPixelAreaInfo({season:o.season,tile:tr,p0:Qt,p1:Ot}),tile:tr,p0:Qt,p1:Ot}})),ge=await Promise.all(re),oe=new Map;for(const{response:ot,p0:ut,p1:St,tile:Bt}of ge){const[at,dt]=Bt,[vt,yt]=ut,[It,wt]=St,mt=It-vt+1,Dt=wt-yt+1;for(let zt=0;ztot.id),pt=[...oe.entries()].map(([ot,ut])=>({...Ne[ot]??{id:ot,name:"Player"},painted:ut}));return pt.sort((ot,ut)=>ut.painted.latitudes.length-ot.painted.latitudes.length),pt}function s(H){for(const me of H)B(me.painted);ce(z,void 0)}function B(H){for(let me=0;me{al(H,{class:"bg-warning",children:(me,ve)=>{var Me=zR(),Ee=Ct(Me);Gu(Ee,{class:"inline size-5"});var Re=q(Ee,2);{var ze=Ke=>{var rt=bi();Ye(qe=>fe(rt,qe),[()=>Jv()]),G(Ke,rt)},Fe=Ke=>{var rt=er(),qe=Ct(rt);{var He=et=>{var De=bi();Ye(tt=>fe(De,tt),[()=>Qv()]),G(et,De)};je(qe,et=>{f.length===1&&et(He)},!0)}G(Ke,rt)};je(Re,Ke=>{f.length===0?Ke(ze):Ke(Fe,!1)})}G(me,Me)},$$slots:{default:!0}})},ie=H=>{const me=ft(()=>x(y).filter(Ze=>Ze.id!==0));var ve=VR(),Me=E(ve),Ee=E(Me),Re=E(Ee),ze=E(Re);ze.__click=[LR,s,y];var Fe=E(ze);Gu(Fe,{class:"size-4"}),k(ze);var Ke=q(ze,4),rt=E(Ke);k(Ke),k(Re);var qe=q(Re,2);qe.__click=function(...Ze){var ke;(ke=o.onclose)==null||ke.apply(this,Ze)};var He=E(qe);_l(He,{class:"size-4"}),k(qe),k(Ee);var et=q(Ee,2),De=E(et);{var tt=Ze=>{var ke=DR();G(Ze,ke)},nt=Ze=>{var ke=er(),bt=Ct(ke);{var te=ge=>{var oe=RR();G(ge,oe)},re=ge=>{var oe=jR(),Ae=E(oe),Ne=E(Ae),pt=E(Ne),ot=q(E(pt)),ut=q(E(ot));ut.__click=[BR,me];var St=E(ut);Dm(St,{class:"size-3"}),k(ut),k(ot),vn(),k(pt),k(Ne);var Bt=q(Ne);hi(Bt,23,()=>x(me),at=>at.id,(at,dt,vt)=>{var yt=NR();let It;yt.__click=[FR,o,B,dt,z];var wt=E(yt),mt=E(wt,!0);k(wt);var Dt=q(wt),zt=E(Dt);lo(zt,{class:"size-5 border-0",get userId(){return x(dt).id},get pictureUrl(){return x(dt).picture}});var qt=q(zt,2),tr=E(qt),Qt=E(tr),Ot=E(Qt,!0);k(Qt);var fr=q(Qt,2),kr=E(fr);k(fr),k(tr);var Ar=q(tr,2);{var rr=Sr=>{var Dr=OR(),Zr=E(Dr,!0);k(Dr),Ye((se,j)=>{zr(Dr,1,`badge badge-sm ml-0.5 border-0 ${se??""} ${j??""}`),fe(Zr,x(dt).allianceName)},[()=>dp(x(dt).allianceId),()=>Oi(x(dt).allianceId)]),G(Sr,Dr)};je(Ar,Sr=>{x(dt).allianceId&&Sr(rr)})}k(qt),k(Dt);var Kt=q(Dt),or=E(Kt,!0);k(Kt),k(yt),Ye((Sr,Dr,Zr)=>{It=zr(yt,1,"hover:bg-base-200 cursor-pointer",null,It,Sr),fe(mt,x(vt)+1),zr(tr,1,`font-medium ${Dr??""} flex gap-1.5`),fe(Ot,x(dt).name),fe(kr,`#${x(dt).id??""}`),fe(or,Zr)},[()=>({"!bg-base-300":x(dt).id===x(z)}),()=>Oi(x(dt).id),()=>x(dt).painted.latitudes.length.toLocaleString()]),G(at,yt)}),k(Bt),k(Ae),k(oe),G(ge,oe)};je(bt,ge=>{x(me).length===0?ge(te):ge(re,!1)},!0)}G(Ze,ke)};je(De,Ze=>{x(M)?Ze(tt):Ze(nt,!1)})}k(et),k(Me),k(ve),Ye(Ze=>fe(rt,`(Pixels: ${Ze??""})`),[()=>x(y).reduce((Ze,ke)=>Ze+ke.painted.latitudes.length,0)]),ki(3,ve,()=>Gd,()=>({duration:100})),G(H,ve)};je(Y,H=>{f.length<2?H(K):H(ie,!1)})}G(m,N),Fr()}Qn(["click"]);function ZR(m){var y;const o=document.createElement("div");(y=m.parentElement)==null||y.insertBefore(o,m.nextSibling);const f=new IntersectionObserver(M=>{M[0].isIntersecting?m.classList.remove("stuck"):m.classList.add("stuck")},{threshold:0,rootMargin:"0px"});return f.observe(o),()=>{o.remove(),f.disconnect()}}var Sm;(m=>{function o(){let f,y;return{promise:new Promise((z,T)=>{f=z,y=T}),resolve:f,reject:y}}m.withResolvers=o})(Sm||(Sm={}));var UR=Cr(''),$R=Cr('');function GR(m,o){let f=ir(o,["$$slots","$$events","$$legacy","filled"]);var y=er(),M=Ct(y);{var z=s=>{var B=UR();ar(B,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(s,B)},T=s=>{var B=$R();ar(B,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(s,B)};je(M,s=>{o.filled?s(z):s(T,!1)})}G(m,y)}var HR=Te("

                      "),WR=Te(''),XR=Te(''),YR=Te(''),KR=Te(' ',1),JR=Te(' '),QR=Te(''),e7=Te('

                      '),t7=(m,o)=>{ce(o,!x(o))},r7=Te('

                      Flags

                      ');function n7(m,o){Br(o,!0);const f=(Fe,Ke=pa,rt=pa)=>{const qe=ft(()=>{var ut;return(((ut=kt.data)==null?void 0:ut.droplets)??0)>=s.price}),He=ft(()=>x(N)===Ke().id),et=ft(()=>y.has(Ke().id));var De=e7(),tt=E(De),nt=E(tt,!0);k(tt);var Ze=q(tt,2),ke=E(Ze),bt=q(ke);{var te=ut=>{var St=HR(),Bt=E(St);Uu(Bt,{class:"text-base-content/60 size-4.5 inline pb-0.5"}),k(St),Ye(at=>{zr(St,1,Ko({"tooltip inline":!0,"lg:before:-translate-x-1/3":(rt()+1)%4===0,"lg:before:translate-x-1/3":rt()%4===0,"before:-translate-x-1/3":(rt()+1)%2===0,"before:translate-x-1/3":rt()%2===0})),xr(St,"data-tip",at)},[()=>uI()]),G(ut,St)};je(bt,ut=>{x(et)&&ut(te)})}k(Ze);var re=q(Ze,2);{var ge=ut=>{Wm(ut,{})};je(re,ut=>{Ke().id===x(Y)&&ut(ge)})}var oe=q(re,2);let Ae;var Ne=E(oe);{var pt=ut=>{var St=XR();St.__click=async()=>{if(!(x(et)&&!await o.promptUserConfirmation(Ke().name)))try{const yt=Ke().id;ce(N,yt,!0),await en.purchase({id:T,amount:1,variant:yt}),kt.refresh(),aa.notification1.play();const It=z.find(wt=>wt.id===yt);It&&(It.owned=!0),ce(Y,yt,!0)}catch(yt){Nr.error(yt.message)}finally{ce(N,void 0)}};var Bt=E(St);{var at=yt=>{var It=WR();G(yt,It)};je(Bt,yt=>{x(He)&&yt(at)})}var dt=q(Bt,2);pp(dt,{class:"size-4"});var vt=q(dt);vn(),k(St),Ye(yt=>{St.disabled=!x(qe)||x(He),fe(vt,` ${yt??""} `)},[()=>s.price.toLocaleString("en-US")]),G(ut,St)},ot=ut=>{const St=ft(()=>{var zt;return((zt=kt.data)==null?void 0:zt.equippedFlag)===Ke().id});var Bt=QR();let at;Bt.__click=async()=>{try{ce(N,Ke().id,!0);const zt=x(St)?0:Ke().id;await en.equipFlag(zt),kt.data&&(kt.data.equippedFlag=zt),kt.refresh()}catch(zt){Nr.error(zt.message)}finally{ce(N,void 0)}};var dt=E(Bt),vt=E(dt,!0);k(dt);var yt=q(dt,2);{var It=zt=>{var qt=YR();G(zt,qt)};je(yt,zt=>{x(He)&&zt(It)})}var wt=q(yt,2);{var mt=zt=>{var qt=KR(),tr=Ct(qt);_l(tr,{class:"size-4"});var Qt=q(tr,2),Ot=E(Qt,!0);k(Qt),Ye(fr=>fe(Ot,fr),[()=>Aw()]),G(zt,qt)},Dt=zt=>{var qt=JR(),tr=E(qt,!0);k(qt),Ye(Qt=>fe(tr,Qt),[()=>Lw()]),G(zt,qt)};je(wt,zt=>{x(St)?zt(mt):zt(Dt,!1)})}k(Bt),Ye((zt,qt)=>{at=zr(Bt,1,"btn btn-lg sm:btn-md tooltip tooltip-bottom relative h-10",null,at,zt),Bt.disabled=x(He),fe(vt,qt)},[()=>({"btn-warning":x(St)}),()=>Iw()]),G(ut,Bt)};je(Ne,ut=>{Ke().owned?ut(ot,!1):ut(pt)})}k(oe),k(De),Ye((ut,St)=>{fe(nt,Ke().flag),fe(ke,`${Ke().name??""} `),Ae=zr(oe,1,"mt-3",null,Ae,ut),xr(oe,"data-tip",St)},[()=>({tooltip:!x(qe)}),()=>_p()]),G(Fe,De)},y=new Set([8,30,32,84,96,125,143,146,150,192,200,236,240,251]),M=Hi.countries.map(Fe=>({...Fe,owned:kt.flagsBitmap.get(Fe.id)}));M.sort((Fe,Ke)=>Number(Ke.owned)-Number(Fe.owned));const z=xi(M),T=110,s=Hi.products[T];let B=ct(!1),N=ct(void 0),Y=ct(void 0);var K=r7(),ie=E(K),H=E(ie);GR(H,{class:"size-5.5",filled:!0}),vn(2),k(ie);var me=q(ie,2),ve=E(me,!0);k(me);var Me=q(me,2);hi(Me,23,()=>z,Fe=>Fe.id,(Fe,Ke,rt)=>{var qe=er(),He=Ct(qe);{var et=De=>{f(De,()=>x(Ke),()=>x(rt))};je(He,De=>{(x(rt)<8||x(B))&&De(et)})}G(Fe,qe)}),k(Me);var Ee=q(Me,2),Re=E(Ee);Re.__click=[t7,B];var ze=E(Re,!0);k(Re),k(Ee),k(K),Ye(Fe=>{fe(ve,Fe),fe(ze,x(B)?"Show less":"Show more")},[()=>Cw()]),G(m,K),Fr()}Qn(["click"]);var i7=Te('

                      '),a7=(m,o)=>{kv(o,-1)},o7=(m,o)=>{kv(o)},s7=(m,o,f)=>{o(x(f))},l7=Te(''),c7=async(m,o,f,y)=>{try{ce(o,!0),await en.purchase({id:f.productId,amount:y()}),aa.notification1.play(),f.onpurchasecompleted(y())}catch(M){Nr.error(M.message)}finally{ce(o,!1)}},u7=Te(''),h7=Te('

                      ');function Sv(m,o){Br(o,!0);let f=Lt(o,"amount",15,1);const y=ft(()=>f()*o.unitPrice),M=ft(()=>Math.floor(o.userDroplets/o.unitPrice));let z=ct(!1);Wr(()=>{f()<0&&f(0)});var T=h7(),s=E(T),B=E(s);oi(B,()=>o.icon??pa),k(s);var N=q(s,2),Y=E(N,!0);k(N);var K=q(N,2);{var ie=De=>{var tt=i7(),nt=E(tt,!0);k(tt),Ye(()=>fe(nt,o.subtitle)),G(De,tt)};je(K,De=>{o.subtitle&&De(ie)})}var H=q(K,2),me=E(H);me.__click=[a7,f];var ve=q(me,2);uo(ve);var Me=q(ve,2);Me.__click=[o7,f];var Ee=q(Me,2);{var Re=De=>{var tt=l7();tt.__click=[s7,f,M],G(De,tt)};je(Ee,De=>{f(){var tt=u7();G(De,tt)};je(rt,De=>{x(z)&&De(qe)})}var He=q(rt,2);pp(He,{class:"size-4"});var et=q(He);vn(),k(Ke),k(ze),k(T),Ye((De,tt,nt,Ze)=>{fe(Y,De),Me.disabled=f()>=x(M),xr(ze,"data-tip",tt),Fe=zr(ze,1,"",null,Fe,nt),Ke.disabled=o.userDropletso.title(f()),()=>_p(),()=>({tooltip:o.userDropletsx(y).toLocaleString("en-US")]),zm(ve,f),G(m,T),Fr()}Qn(["click"]);var d7=Cr('');function p7(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=d7();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var f7=Cr('');function X0(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=f7();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var m7=Cr('');function _7(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=m7();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var g7=Cr('');function v7(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=g7();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var y7=Te(''),x7=Te(''),b7=(m,o,f)=>{var y;(y=x(o))==null||y.resolve(!1),x(f).close()},w7=(m,o,f)=>{var y;(y=x(o))==null||y.resolve(!0),x(f).close()},T7=Te(' ',1);function C7(m,o){Br(o,!0);let f=Lt(o,"open",15),y=ct(null),M=ct(xi({name:Kg(),prev:1e3,new:1e5}));Dn(()=>{const Ot=fr=>{fr.key==="Escape"&&f(!1)};return document.addEventListener("keydown",Ot),()=>document.removeEventListener("keydown",Ot)});const z={id:70,product:Hi.products[70]},T={id:80,product:Hi.products[80]},s={product:Hi.products[120]};let B=ct(null),N=ct(null),Y=ct("");async function K(Ot){return x(B).showModal(),ce(N,Sm.withResolvers(),!0),ce(Y,Ot,!0),x(N).promise}var ie=T7(),H=Ct(ie),me=E(H),ve=E(me);{var Me=Ot=>{var fr=y7(),kr=E(fr),Ar=E(kr),rr=E(Ar);X0(rr,{class:"size-8"});var Kt=q(rr,2),or=E(Kt,!0);k(Kt);var Sr=q(Kt,2),Dr=E(Sr);{let Yt=ft(()=>{var br;return((br=kt.data)==null?void 0:br.droplets)??0});Fv(Dr,{get value(){return x(Yt)}})}k(Sr),vn(2),k(Ar),k(kr),Wi(kr,()=>ZR);var Zr=q(kr,2),se=E(Zr),j=E(se),Z=E(j);p7(Z,{class:"size-5.5",filled:!0});var X=q(Z,2),ae=E(X,!0);k(X),k(j);var de=q(j,2),Se=E(de,!0);k(de);var Ie=q(de,2),be=E(Ie);{const Yt=Er=>{v7(Er,{class:"text-primary size-26"})};let br=ft(()=>k2());Sv(be,{get productId(){return z.id},title:Er=>P2({amount:z.product.items[0].amount*Er}),get subtitle(){return x(br)},get unitPrice(){return z.product.price},get userDroplets(){return kt.data.droplets},onpurchasecompleted:async Er=>{var pn,_n,sn,En;const ur=(_n=(pn=kt.data)==null?void 0:pn.charges)==null?void 0:_n.max;await kt.refresh();const rn=(En=(sn=kt.data)==null?void 0:sn.charges)==null?void 0:En.max;ur!==void 0&&rn!==void 0&&(ce(M,{name:Kg(),prev:ur,new:rn},!0),x(y).show())},icon:Yt,$$slots:{icon:!0}})}var Oe=q(be,2);{const Yt=Er=>{U0(Er,{class:"text-primary my-3 size-20"})};let br=ft(()=>g2());Sv(Oe,{get productId(){return T.id},title:Er=>_3({amount:T.product.items[0].amount*Er}),get subtitle(){return x(br)},get unitPrice(){return T.product.price},get userDroplets(){return kt.data.droplets},onpurchasecompleted:async Er=>{var rn,pn,_n;const ur=(pn=(rn=kt.data)==null?void 0:rn.charges)==null?void 0:pn.count;await kt.refresh(),ur!==void 0&&(ce(M,{name:p3(),prev:Math.floor(ur),new:Math.floor(ur+T.product.items[0].amount*Er)},!0),(_n=x(y))==null||_n.show())},icon:Yt,$$slots:{icon:!0}})}k(Ie),k(se);var st=q(se,2),$e=E(st),Mt=E($e);vp(Mt,{class:"size-5.5",filled:!0});var xe=q(Mt,2),Ft=E(xe,!0);k(xe),k($e);var cr=q($e,2),Jt=E(cr),Tr=E(Jt),Xr=E(Tr),dn=E(Xr),xn=E(dn);Ov(xn,{get userId(){return kt.data.id},get level(){return kt.data.level},get pictureUrl(){return kt.data.picture}}),k(dn),k(Xr),k(Tr);var mn=q(Tr,2),jt=E(mn,!0);k(mn);var Et=q(mn,2),hr=E(Et,!0);k(Et);var ht=q(Et,2);let Hr;var Yr=E(ht),qr=E(Yr),_t=E(qr);pp(_t,{class:"size-4"});var Ge=q(_t);vn(),k(qr),k(Yr),k(ht),k(Jt),k(cr),k(st);var At=q(st,2),Rt=E(At);n7(Rt,{promptUserConfirmation:K}),k(At),k(Zr),k(fr),Ye((Yt,br,Er,ur,rn,pn,_n,sn,En)=>{fe(or,Yt),fe(ae,br),fe(Se,Er),fe(Ft,ur),fe(jt,rn),fe(hr,pn),xr(ht,"data-tip",_n),Hr=zr(ht,1,"",null,Hr,sn),qr.disabled=kt.data.dropletsqv(),()=>x2(),()=>T2(),()=>bw(),()=>z2(),()=>R2(),()=>_p(),()=>({tooltip:kt.data.dropletss.product.price.toLocaleString("en-US")]),ki(2,fr,()=>ia),G(Ot,fr)};je(ve,Ot=>{kt.data&&f()&&Ot(Me)})}k(me);var Ee=q(me,2),Re=E(Ee),ze=E(Re,!0);k(Re),k(Ee),k(H),Wi(H,()=>Ot=>{Wr(()=>{f()?Ot.show():Ot.close()})});var Fe=q(H,2),Ke=E(Fe),rt=E(Ke),qe=E(rt),He=E(qe,!0);k(qe);var et=q(qe,2),De=E(et),tt=E(De),nt=q(tt),Ze=E(nt);k(nt),k(De);var ke=q(De,2),bt=E(ke);_7(bt,{class:"size-5"}),k(ke);var te=q(ke,2),re=E(te,!0);k(te),k(et);var ge=q(et,2),oe=E(ge),Ae=E(oe),Ne=q(Ae);ju(Ne,()=>x(M).new,Ot=>{var fr=x7(),kr=E(fr);Wm(kr,{}),k(fr),G(Ot,fr)}),k(oe),k(ge),k(rt),k(Ke);var pt=q(Ke,2),ot=E(pt),ut=E(ot,!0);k(ot),k(pt),k(Fe),Po(Fe,Ot=>ce(y,Ot),()=>x(y));var St=q(Fe,2),Bt=E(St),at=E(Bt),dt=E(at,!0);k(at);var vt=q(at,2),yt=E(vt);Mm(yt,()=>_I({country:x(Y)})),k(vt);var It=q(vt,2),wt=E(It);wt.__click=[b7,N,B];var mt=E(wt,!0);k(wt);var Dt=q(wt,2);Dt.__click=[w7,N,B];var zt=E(Dt,!0);k(Dt),k(It),k(Bt);var qt=q(Bt,2),tr=E(qt),Qt=E(tr,!0);k(tr),k(qt),k(St),Po(St,Ot=>ce(B,Ot),()=>x(B)),Ye((Ot,fr,kr,Ar,rr,Kt,or)=>{fe(ze,Ot),fe(He,x(M).name),fe(tt,`${x(M).prev??""} `),fe(Ze,`(+${x(M).new-x(M).prev})`),fe(re,x(M).new),fe(Ae,`${fr??""} `),fe(ut,kr),fe(dt,Ar),fe(mt,rr),fe(zt,Kt),fe(Qt,or)},[()=>cl(),()=>cl(),()=>cl(),()=>pI(),()=>up(),()=>Vx(),()=>cl()]),Ai("close",H,()=>f(!1)),G(m,ie),Fr()}Qn(["click"]);var S7=Cr('');function P7(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=S7();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var I7=Cr('');function M7(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=I7();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var k7=Cr('');function A7(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=k7();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var E7=Cr('');function z7(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=E7();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var L7=Cr('');function D7(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=L7();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var R7=Cr('');function B7(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=R7();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}var F7=Cr('');function O7(m,o){let f=ir(o,["$$slots","$$events","$$legacy"]);var y=F7();ar(y,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960",fill:"currentColor",...f})),G(m,y)}function $f(m){const o=document.createElement("img");return o.src=m,new Promise((f,y)=>{o.addEventListener("load",()=>{f(o)}),o.addEventListener("error",M=>{y(M)})})}function N7(m){const o=document.createElement("canvas");o.width=m.naturalWidth,o.height=m.naturalHeight;const f=o.getContext("2d");return f==null||f.drawImage(m,0,0),o}function j7(m,o,f){return mf?f:m}function V7(m,o){const f=10**o;return Math.round(m*f)/f}var q7=Te(' ',1),Z7=(m,o)=>{ce(o,!x(o))},U7=Te(""),$7=async(m,o,f,y)=>{var M;x(o)||ce(o,await new Promise((z,T)=>{navigator.geolocation.getCurrentPosition(s=>{z(s)},s=>{T(s)})})),x(o)&&(Co({lat:x(o).coords.latitude,lng:x(o).coords.longitude},x(f)),(M=x(y))==null||M.flyTo({center:{lat:x(o).coords.latitude,lng:x(o).coords.longitude},zoom:16.5}))},G7=Te('
                      ?
                      '),H7=Te(''),W7=(m,o,f,y)=>{var M;ce(o,!0),x(f)&&Co((M=x(f))==null?void 0:M.getCenter(),x(y))},X7=Te(''),Y7=Te(''),K7=Te('
                      '),J7=(m,o,f,y)=>{var z;ce(o,!0);const M=(z=x(f))==null?void 0:z.getCenter();M&&Co(M,x(y))},Q7=Te(''),e9=(m,o)=>{ce(o,!0)},t9=Te(''),r9=(m,o)=>{ce(o,!0)},n9=Te(''),i9=Te('
                      '),a9=(m,o)=>{ce(o,!x(o))},o9=Te('
                      '),s9=Te('
                      '),l9=(m,o)=>{ce(o,!0)},c9=Te(''),u9=(m,o)=>{var f;(f=x(o))==null||f.zoomIn()},h9=(m,o)=>{var f;(f=x(o))==null||f.zoomOut()},d9=(m,o)=>{ce(o,{name:"getPixelAreaInfo"},!0)},p9=Te(''),f9=Te(''),m9=()=>{window.location.replace(vi.url.origin)},_9=Te(''),g9=(m,o)=>{x(o)&&hl.goToPrev(x(o))},v9=Te(''),y9=Te('
                      '),x9=(m,o,f)=>{var y;(y=x(o))==null||y.flyTo({center:x(o).getCenter(),zoom:f})},b9=Te(''),w9=Te(""),T9=Te('
                      '),C9=Te('
                      '),S9=Te('
                      '),P9=(m,o)=>{ce(o,{name:"mainMenu"},!0)},I9=Te('
                      '),M9=Te('
                      ',1);function _B(m,o){Br(o,!0);const f=zf,y=hx,M=new fl(y),z=f-.4,T=RI(vi.url),s=T.season??Gg,B=new Map;let N=ct(void 0),Y=ct(14.5),K=ct(!1);const ie=ft(()=>{var xt;return((xt=kt.data)==null?void 0:xt.id)===401});let H=ct(!1),me=ct(xi(T.select&&T.pos?{name:"pixelSelected",latLon:[T.pos.lat,T.pos.lng]}:{name:"mainMenu"}));Dn(()=>{Re().then(Rr=>ce(N,Rr));let xt=[0,0];function Wt(Rr){var yn;if(x(N)&&x(Y)>f+1){const{lat:On,lng:Xn}=x(N).unproject([Rr.clientX,Rr.clientY]),Vn=M.latLonToPixels(On,Xn,f),wn=Math.floor(Vn[0]),Ji=Math.floor(Vn[1]);if(xt[0]!==wn||xt[1]!==Ji){const sr=M.latLonToPixelBoundsLatLon(On,Xn,f),Ut=jm(sr,!0);(yn=x(N).getSource(Ke))==null||yn.setCoordinates(Ut),xt=[wn,Ji]}}}return window.addEventListener("mousemove",Wt),()=>{var Rr;(Rr=x(N))==null||Rr.remove(),window.removeEventListener("mousemove",Wt),Ee&&clearInterval(Ee),Gf()}}),dl(()=>[ai.theme],()=>{if(x(N)){Me=!1;const xt=ve(ai.theme);x(N).setStyle(xt)}});function ve(xt){return`https://maps.wplace.live/styles/${xt==="custom-winter"?"liberty":"fiord"}`}let Me=!1,Ee;async function Re(){const xt=T.pos?{...T.pos,zoom:x(Y)}:await SI();T.zoom!==void 0&&(xt.zoom=T.zoom);const Wt=await new Promise(Vn=>{const wn=new Vd.Map({style:ve(ai.theme),center:xt,zoom:xt.zoom,container:"map",dragRotate:!1,doubleClickZoom:!1,pitch:0,maxPitch:0,attributionControl:!1});wn.touchZoomRotate.disableRotation(),wn.on("styledata",Ji=>{Me||(ai.theme==="custom-winter"&&(wn.setLayoutProperty("poi_transit","visibility","none"),wn.setLayoutProperty("poi_r20","visibility","none"),wn.setLayoutProperty("poi_r7","visibility","none"),wn.setLayoutProperty("poi_r1","visibility","none"),wn.setLayoutProperty("building","visibility","none"),wn.setLayoutProperty("building-3d","visibility","none"),wn.setLayoutProperty("landuse_pitch","visibility","none"),wn.setLayoutProperty("landuse_hospital","visibility","none"),wn.setLayoutProperty("landuse_school","visibility","none"),wn.setLayoutProperty("landuse_residential","visibility","none"),wn.setLayoutProperty("waterway_tunnel","visibility","none"),wn.setFilter("water",["all",["!=","brunnel","tunnel"],["!=","class","swimming_pool"]])),Fe(wn),et(),Me=!0)}),wn.on("style.load",()=>{Vn(wn)})}),Rr=Hi.refreshIntervalMs;function yn(){let Vn=x(Y)>f+1.5?Rr:2.5*Rr;try{document.visibilityState==="visible"&&Fe(Wt)}finally{setTimeout(yn,Vn)}}Ee=setTimeout(yn,Rr),Wt.on("load",()=>{T.discordLinked&&(Nr.success(wS()),vi.url.searchParams.delete("discord-linked"),Im(vi.url.toString()))});let On=x(Y);Wt.on("zoom",()=>{ce(Y,Wt.getZoom(),!0);const Vn=V7(x(Y),1);Vn!=On&&(x(te)&&x(te).setOpacity(re(On)),On=Vn)});let Xn="default";return Wt.on("dragstart",()=>{const Vn=Wt.getCanvas();Xn=Vn.style.cursor,Vn.style.cursor="move"}),Wt.on("dragend",()=>{Wt.getCanvas().style.cursor=Xn}),Wt.on("mouseout",()=>{De()}),Wt.on("click",async Vn=>{var Ur;const wn=Vn.lngLat.lat,Ji=Vn.lngLat.lng,sr=[wn,Ji];if(x(me).name==="paintingPixel"||x(me).name==="getPixelAreaInfo")return;if(x(me).name==="selectHq"){x(me).hq=sr,(Ur=x(ge))==null||Ur.clearAndPlace(sr);return}const Ut=Wt.getZoom();if(Ut640?550:400}),xt.getLayer(ze)||xt.addLayer({id:ze,type:"raster",source:ze,paint:{"raster-resampling":"nearest","raster-opacity":x(nt)}})}const Ke="pixel-hover",rt=1e-5,qe=[[0,0],[rt,0],[rt,-rt],[0,-rt]],He=.4;async function et(){var xt,Wt,Rr,yn;if(!((xt=x(N))!=null&&xt.getSource(Ke))){const On=N7(await $f(TI));(Wt=x(N))==null||Wt.addSource(Ke,{type:"canvas",canvas:On,coordinates:qe})}(Rr=x(N))!=null&&Rr.getLayer(Ke)||(yn=x(N))==null||yn.addLayer({id:Ke,type:"raster",source:Ke,paint:{"raster-resampling":"nearest","raster-opacity":He}})}function De(){var xt,Wt;(Wt=(xt=x(N))==null?void 0:xt.getSource(Ke))==null||Wt.setCoordinates(qe)}let tt=ct(xi(T.opaque??!0)),nt=ft(()=>x(tt)?1:.1);Wr(()=>{var xt;(xt=x(N))!=null&&xt.getLayer(ze)&&x(N).setPaintProperty(ze,"raster-opacity",x(nt))});let Ze=ct(void 0),ke=ct(void 0),bt=ct(void 0);Dn(()=>(navigator.permissions.query({name:"geolocation"}).then(xt=>{xt.state==="granted"&&ce(bt,navigator.geolocation.watchPosition(Wt=>{ce(Ze,Wt)},Wt=>{ce(ke,Wt)},{enableHighAccuracy:!1,maximumAge:1e3,timeout:6e3}),!0)}),()=>{x(bt)&&navigator.geolocation.clearWatch(x(bt))}));let te=ct(void 0);dl(()=>[x(Ze),x(N)],()=>{var xt,Wt;if(x(Ze)&&x(N)){const Rr={lat:x(Ze).coords.latitude,lng:x(Ze).coords.longitude},yn=re(x(Y));if(!x(te)){const On=document.createElement("div");On.classList.add("maplibregl-user-location-dot"),On.classList.add("cursor-auto"),ce(te,new Vd.Marker({element:On,opacity:yn}).setLngLat(Rr).addTo(x(N)))}(Wt=(xt=x(te))==null?void 0:xt.setLngLat(Rr))==null||Wt.setOpacity(yn)}});function re(xt){return xt{var xt;x(N)&&((xt=ul(()=>x(ge)))==null||xt.clear(),$f(Jg).then(Wt=>{ce(ge,new ev({id:"select-crosshair",map:x(N),tileSize:y,zoom:f,img:Wt,markerFn:()=>{const Rr=new Vd.Marker({color:"#0069ff"});return Rr.addClassName("z-20"),Rr}}))}))});let oe=ct(void 0);Wr(()=>{var xt;x(N)&&((xt=ul(()=>x(ge)))==null||xt.clear(),$f(Jg).then(Wt=>{ce(oe,new ev({id:"paint-crosshair",map:x(N),tileSize:y,zoom:f,img:Wt}))}))});let Ae=ct(!1),Ne=ct(!1),pt=ct(!1),ot=ct(!!T.newUser),ut=ct(!1),St=ct(!!T.alliance),Bt=ct(!1);const at="void-message-2";let dt=ct(!1);Wr(()=>{const xt=localStorage.getItem(at);kt.data&&!xt&&(ce(dt,!0),localStorage.setItem(at,"true"))});let vt=ct(!1),yt=ct(xi(vi.url)),It=ct(xi({cityId:0,countryId:1,id:0,name:"None",number:1})),wt=ct(!1);const mt="view-rules";let Dt=!1;Wr(()=>{kt.data&&(!Dt&&kt.data.pixelsPainted>1&&(localStorage.getItem(mt)||(ce(wt,!0),localStorage.setItem(mt,"true"))),Dt=!0)});let zt=ct(!1);Wr(()=>{var xt;ce(zt,!!((xt=kt.data)!=null&&xt.needsPhoneVerification))});let qt=ct([]),tr=ft(()=>x(Y){var Wt;const xt=(Wt=kt.data)==null?void 0:Wt.favoriteLocations;if(xt&&x(N)){for(const Rr of ul(()=>x(qt)))Rr.remove();ce(qt,xt.map(Rr=>{const yn=document.createElement("div");yn.classList.add("text-yellow-400"),yn.classList.add("cursor-pointer"),yn.classList.add("z-10"),yn.innerHTML=` - - - `;const On={lat:Rr.latitude,lng:Rr.longitude};return yn.addEventListener("click",Vn=>{Vn.stopPropagation(),Qt([Rr.latitude,Rr.longitude])}),new Vd.Marker({element:yn,opacity:x(tr)}).setLngLat(On).addTo(x(N))}))}});function Qt(xt){var Rr;const Wt={lat:xt[0],lng:xt[1]};(Rr=x(N))==null||Rr.flyTo({center:Wt,zoom:Math.max(x(Y),15)}),Co(Wt,x(Y)),ce(me,{name:"pixelSelected",latLon:[Wt.lat,Wt.lng]},!0)}Wr(()=>{if(x(me).name==="paintingPixel")for(const xt of x(qt))xt.addClassName("hidden");else for(const xt of x(qt))xt.removeClassName("hidden"),xt.setOpacity(x(tr))});let Ot=Number.MAX_VALUE;Wr(()=>{if(kt.charges!==void 0&&kt.data){const xt=kt.data.charges.max,Wt=kt.charges;Ot=xt&&aa.notification1.play(),Ot=kt.charges}});let fr=ct(!1),kr=Date.now();Dn(()=>{const xt=DI(),Wt=()=>{var yn;if(!document.hidden&&Date.now()-kr>30*gc.min){if(xt){const Xn=(yn=x(N))==null?void 0:yn.getCenter();Xn&&Co(Xn,x(Y)),window.location.replace(vi.url.origin)}else kt.refresh();kr=Date.now()}};return document.addEventListener("visibilitychange",Wt),()=>document.removeEventListener("visibilitychange",Wt)}),Dn(()=>{function xt(){en.online=!0}window.addEventListener("online",xt);function Wt(){en.online=!1}return window.addEventListener("offline",Wt),()=>{window.removeEventListener("online",xt),window.removeEventListener("offline",Wt)}}),Wr(()=>{if(!en.online){const xt=setInterval(()=>{en.health().then(()=>{en.online=!0,!kt.data&&!kt.loading&&kt.refresh()})},5e3);return()=>{clearInterval(xt)}}}),Dn(()=>{function xt(Wt){Wt.data.type&&x(N)&&Fe(x(N))}return navigator.serviceWorker.addEventListener("message",xt),()=>{navigator.serviceWorker.removeEventListener("message",xt)}});let Ar=ct(!1),rr=ct("report-user"),Kt=ct(void 0),or=ct(void 0),Sr=ct(void 0),Dr=ct(0);var Zr=M9();rx(xt=>{var Wt=q7();tx.title="Wplace - Paint the world",vn(6),G(xt,Wt)});var se=Ct(Zr);{const xt=sr=>{var Ut=U7();Ut.__click=[Z7,tt];var Ur=E(Ut);{let lr=ft(()=>!x(tt));$0(Ur,{class:"size-5",get filled(){return x(lr)}})}k(Ut),Ye(lr=>{xr(Ut,"title",lr),zr(Ut,1,Ko({"btn btn-lg btn-square sm:btn-xl z-30 shadow-md":!0,"text-base-content/80":x(tt),"btn-primary btn-soft":!x(tt)}))},[()=>Uv()]),G(sr,Ut)},Wt=sr=>{var Ut=H7();Ut.__click=[$7,Ze,Y,N];var Ur=E(Ut);{var lr=nn=>{z7(nn,{class:"size-5.5 fill-blue-800"})},Tn=nn=>{var Cn=G7(),$n=E(Cn);A7($n,{class:"size-5.5 fill-red-400"}),vn(2),k(Cn),G(nn,Cn)};je(Ur,nn=>{x(Ze)?nn(lr):nn(Tn,!1)})}k(Ut),Ye(nn=>xr(Ut,"title",nn),[()=>zb()]),G(sr,Ut)};var j=q(E(se),2);let Rr;var Z=E(j);let yn;var X=E(Z);{var ae=sr=>{var Ut=X7();Ut.__click=[W7,Ae,N,Y];var Ur=E(Ut,!0);k(Ut),Ye(lr=>fe(Ur,lr),[()=>Kx()]),G(sr,Ut)},de=sr=>{var Ut=er(),Ur=Ct(Ut);{var lr=Tn=>{var nn=K7(),Cn=E(nn);{var $n=Mn=>{var bn=Y7(),ln=E(bn);{var Sn=gn=>{var fn=bi("MOD");G(gn,fn)},kn=gn=>{var fn=er(),an=Ct(fn);{var po=Gn=>{var jn=bi("GM");G(Gn,jn)},pi=Gn=>{var jn=bi("ADMIN");G(Gn,jn)};je(an,Gn=>{var jn;((jn=kt.data)==null?void 0:jn.role)==="global_moderator"?Gn(po):Gn(pi,!1)},!0)}G(gn,fn)};je(ln,gn=>{var fn;((fn=kt.data)==null?void 0:fn.role)==="moderator"?gn(Sn):gn(kn,!1)})}k(bn),Ye(()=>{var gn;return xr(bn,"href",((gn=kt.data)==null?void 0:gn.role)==="admin"?`${vi.url.origin}/admin/dashboard`:`${vi.url.origin}/admin`)}),G(Mn,bn)};je(Cn,Mn=>{var bn;xc((bn=kt.data)==null?void 0:bn.role,["admin","moderator","global_moderator"])&&Mn($n)})}var Pr=q(Cn,2);zD(Pr,{get user(){return kt},onlogout:()=>{ce(me,{name:"mainMenu"},!0)}}),k(nn),ki(3,nn,()=>ia,()=>({duration:150})),G(Tn,nn)};je(Ur,Tn=>{kt.data&&x(N)&&x(me).name!=="paintingPixel"&&Tn(lr)},!0)}G(sr,Ut)};je(X,sr=>{!kt.loading&&!kt.data?sr(ae):sr(de,!1)})}var Se=q(X,2);{var Ie=sr=>{var Ut=i9(),Ur=E(Ut);{var lr=Pr=>{Nf(Pr,{key:"shop-profile-picture",children:(Mn,bn)=>{var ln=Q7();ln.__click=[J7,Ne,N,Y];var Sn=E(ln);X0(Sn,{class:"size-5"}),k(ln),Ye(kn=>xr(ln,"title",kn),[()=>qv()]),G(Mn,ln)},$$slots:{default:!0}})};je(Ur,Pr=>{kt.data&&Pr(lr)})}var Tn=q(Ur,2);{var nn=Pr=>{var Mn=t9();Mn.__click=[e9,St];var bn=E(Mn);yp(bn,{class:"size-5"}),k(Mn),Ye(ln=>xr(Mn,"title",ln),[()=>mp()]),G(Pr,Mn)};je(Tn,Pr=>{kt.data&&Pr(nn)})}var Cn=q(Tn,2);ND(Cn,{get map(){return x(N)},get season(){return s}});var $n=q(Cn,2);Nf($n,{key:"region-leaderboard",children:(Pr,Mn)=>{var bn=n9();bn.__click=[r9,pt];var ln=E(bn);P0(ln,{class:"size-5"}),k(bn),Ye(Sn=>xr(bn,"title",Sn),[()=>Rm()]),G(Pr,bn)},$$slots:{default:!0}}),k(Ut),ki(3,Ut,()=>ia,()=>({duration:150})),G(sr,Ut)},be=sr=>{var Ut=er(),Ur=Ct(Ut);{var lr=Tn=>{var nn=o9(),Cn=E(nn);let $n;Cn.__click=[a9,K];var Pr=E(Cn);{var Mn=ln=>{Cm(ln,{class:"size-5"})},bn=ln=>{rp(ln,{class:"size-5"})};je(Pr,ln=>{x(K)?ln(Mn):ln(bn,!1)})}k(Cn),k(nn),Ye((ln,Sn)=>{xr(Cn,"title",ln),$n=zr(Cn,1,"btn btn-square not-touchscreen:hidden shadow-md",null,$n,Sn)},[()=>x(K)?ob():cb(),()=>({"btn-primary":x(K)})]),ki(1,nn,()=>ia,()=>({delay:150,duration:150})),G(Tn,nn)};je(Ur,Tn=>{x(N)&&x(me).name==="paintingPixel"&&Tn(lr)},!0)}G(sr,Ut)};je(Se,sr=>{x(N)&&x(me).name!=="paintingPixel"?sr(Ie):sr(be,!1)})}k(Z),k(j);var Oe=q(j,2);{var st=sr=>{var Ut=s9(),Ur=E(Ut);{let lr=ft(()=>fx.trim());Nx(Ur,{get siteKey(){return x(lr)},refreshExpired:"auto",appearance:"interaction-only",callback:Tn=>{ai.captcha={token:Tn,time:Date.now()}}})}k(Ut),ki(2,Ut,()=>ia,()=>({duration:300})),G(sr,Ut)};je(Oe,sr=>{px&&(!ai.captcha||ai.now-ai.captcha.time>180*1e3)&&sr(st)})}var $e=q(Oe,2);let On;var Mt=E($e);{var xe=sr=>{Nf(sr,{key:"info",children:(Ut,Ur)=>{var lr=c9();lr.__click=[l9,ut];var Tn=E(lr);M7(Tn,{class:"size-3.5"}),k(lr),Ye(nn=>xr(lr,"title",nn),[()=>db()]),G(Ut,lr)},$$slots:{default:!0}})};je(Mt,sr=>{x(me).name!=="paintingPixel"&&sr(xe)})}var Ft=q(Mt,2),cr=E(Ft);cr.__click=[u9,N];var Jt=q(cr,2);Jt.__click=[h9,N],k(Ft);var Tr=q(Ft,2),Xr=E(Tr),dn=E(Xr);Vv(dn,{class:"size-4"}),k(Xr),k(Tr);var xn=q(Tr,2);{var mn=sr=>{var Ut=p9();Ut.__click=[d9,me];var Ur=E(Ut);Gu(Ur,{class:"size-4"}),k(Ut),G(sr,Ut)};je(xn,sr=>{var Ut,Ur;x(me).name!=="paintingPixel"&&(((Ut=kt.data)==null?void 0:Ut.role)==="admin"||((Ur=kt.data)==null?void 0:Ur.role)==="global_moderator")&&sr(mn)})}var jt=q(xn,2);{var Et=sr=>{var Ut=f9(),Ur=E(Ut);O7(Ur,{class:"size-4",onclick:()=>{ce(H,!x(H))}}),k(Ut),Ye(lr=>xr(Ut,"title",lr),[()=>iw()]),G(sr,Ut)};je(jt,sr=>{x(ie)&&sr(Et)})}var hr=q(jt,2);{var ht=sr=>{var Ut=_9();Ut.__click=[m9];var Ur=E(Ut);qx(Ur,{class:"size-3"}),k(Ut),Ye(lr=>xr(Ut,"title",lr),[()=>Ux()]),G(sr,Ut)};je(hr,sr=>{x(me).name!=="paintingPixel"&&sr(ht)})}var Hr=q(hr,2);{var Yr=sr=>{var Ut=v9();Ut.__click=[g9,N];var Ur=E(Ut);B7(Ur,{class:"size-3"}),k(Ut),Ye((lr,Tn)=>{xr(Ut,"title",lr),Ut.disabled=Tn},[()=>bb(),()=>!hl.hasPrev()]),ki(1,Ut,()=>ia,()=>({delay:1e3,duration:300})),ki(2,Ut,()=>ia,()=>({duration:300})),G(sr,Ut)};je(Hr,sr=>{hl.hasPrev()&&x(me).name!=="paintingPixel"&&sr(Yr)})}k($e);var qr=q($e,2);let Xn;var _t=E(qr);{var Ge=sr=>{var Ut=y9(),Ur=E(Ut);Zx(Ur,{class:"size-5"});var lr=q(Ur);k(Ut),Ye(Tn=>fe(lr,` ${Tn??""}`),[()=>Cb()]),ki(1,Ut,()=>ia,()=>({duration:1e3})),ki(2,Ut,()=>ia),G(sr,Ut)};je(_t,sr=>{en.online||sr(Ge)})}var At=q(_t,2);{var Rt=sr=>{var Ut=b9();Ut.__click=[x9,N,f];var Ur=E(Ut);D7(Ur,{class:"size-5"});var lr=q(Ur);k(Ut),Ye(Tn=>fe(lr,` ${Tn??""}`),[()=>Ib()]),ki(3,Ut,()=>ia,()=>({duration:300})),G(sr,Ut)};je(At,sr=>{x(Y){M0(sr,{class:"z-30",onclick:()=>{var Ut;(Ut=kt.data)!=null&&Ut.needsPhoneVerification?(ce(zt,!0),Nr.warning(Xg())):kt.charges!==void 0&&kt.charges<1?Nr.warning(JA,{icon:Wf}):x(N)&&kt.data?(aa.smallDropplet.play(),ce(me,{name:"paintingPixel"},!0)):(ce(Ae,!0),x(N)&&Co(x(N).getCenter(),x(Y)))},get disabled(){return kt.loading},get loading(){return kt.loading},get charges(){return kt.charges}})},pn=sr=>{var Ut=w9();G(sr,Ut)};je(ur,sr=>{x(me).name==="mainMenu"?sr(rn):sr(pn,!1)})}k(Er);var _n=q(Er,2);let Ji;var sn=E(_n);Wt(sn),k(_n);var En=q(_n,2);{var dr=sr=>{var Ut=er(),Ur=Ct(Ut);{var lr=nn=>{var Cn=T9(),$n=E(Cn),Pr=E($n);ER(Pr,{get latLon(){return x(me).latLon},get map(){return x(N)},get crosshair(){return x(ge)},get pixelInfoCache(){return B},get season(){return s},get tileSize(){return y},get pixelArtZoom(){return f},get zoom(){return x(Y)},get opaquePixelArt(){return x(tt)},onclose:()=>ce(me,{name:"mainMenu"},!0),onclickshare:Mn=>{ce(yt,Mn,!0),ce(vt,!0)},onclickpaint:([Mn,bn])=>{var Sn,kn,gn;if(!kt.data){ce(Ae,!0);return}if((Sn=kt.data)!=null&&Sn.needsPhoneVerification){ce(zt,!0),Nr.warning(Xg());return}if(kt.charges!==void 0&&kt.charges<1){Nr.warning(Rb());return}const ln=Vm(M.latLonToPixelBoundsLatLon(Mn,bn,f));(kn=x(N))==null||kn.flyTo({center:{lat:ln[0],lon:ln[1]}}),ce(me,{name:"paintingPixel",clickedLatLon:[Mn,bn]},!0),(gn=x(ge))==null||gn.clear()},onclickregion:Mn=>{ce(It,Mn,!0),ce(Bt,!0)},onclickmodaction:(Mn,bn,ln,Sn)=>{var gn,fn,an;(gn=x(N))==null||gn.setZoom(Math.max(x(Y),f+3.5));const kn=M.latLonToPixelBoundsLatLon(ln[0],ln[1],f);(fn=x(N))==null||fn.setCenter({lat:kn.min[0],lng:(kn.max[1]+kn.min[1])/2}),ce(Kt,bn,!0),ce(or,Mn,!0),ce(Sr,ln,!0),ce(Dr,((an=x(N))==null?void 0:an.getZoom())??0,!0),ce(rr,Sn,!0),ce(Ar,!0)}}),k($n),k(Cn),ki(3,$n,()=>Gd,()=>({duration:100})),G(nn,Cn)},Tn=nn=>{var Cn=er(),$n=Ct(Cn);{var Pr=bn=>{var ln=C9(),Sn=E(ln),kn=E(Sn);pL(kn,{get map(){return x(N)},get clickedLatLon(){return x(me).clickedLatLon},get tileSize(){return y},get tileZoom(){return f},get season(){return s},get zoom(){return x(Y)},get crosshair(){return x(oe)},refreshPixelArt:()=>x(N)&&Fe(x(N)),hidePixelHover:De,hoverLayerId:Ke,onclose:()=>{ce(me,{name:"mainMenu"},!0),De()},get screenLocked(){return x(K)},set screenLocked(gn){ce(K,gn,!0)},get opaquePixelArt(){return x(tt)},set opaquePixelArt(gn){ce(tt,gn,!0)}}),k(Sn),k(ln),ki(3,Sn,()=>Gd,()=>({duration:100})),G(bn,ln)},Mn=bn=>{var ln=er(),Sn=Ct(ln);{var kn=fn=>{var an=S9(),po=E(an);qR(po,{get map(){return x(N)},get tileSize(){return y},get pixelArtZoom(){return zf},get season(){return s},get crosshair(){return x(oe)},onclose:()=>{ce(me,{name:"mainMenu"},!0),De()}}),k(an),G(fn,an)},gn=fn=>{var an=er(),po=Ct(an);{var pi=Gn=>{var jn=I9(),zn=E(jn),qa=E(zn),Lr=E(qa),$r=E(Lr),_a=E($r);G0(_a,{class:"inline size-4"});var cn=q(_a);k($r);var Li=q($r,2);Li.__click=[P9,me];var ga=E(Li);_l(ga,{class:"size-4"}),k(Li),k(Lr);var sa=q(Lr,2),Ka=E(sa);Ka.__click=async()=>{var Ca;if(x(me).name==="selectHq"){const Ja=x(me).hq;if(Ja)try{ce(fr,!0),await en.updateAllianceHeadquarters(Ja[0],Ja[1]),(Ca=x(ge))==null||Ca.clear(),ce(St,!0),ce(me,{name:"mainMenu"},!0)}catch(Jo){Nr.error(Jo.message)}finally{ce(fr,!1)}}};var Is=E(Ka);P7(Is,{class:"size-6"}),k(Ka),k(sa),k(qa),k(zn),k(jn),Ye(Ca=>{fe(cn,` ${Ca??""}`),Ka.disabled=x(me).hq===void 0||x(fr)},[()=>jC()]),ki(3,zn,()=>Gd,()=>({duration:100})),G(Gn,jn)};je(po,Gn=>{x(me).name==="selectHq"&&Gn(pi)},!0)}G(fn,an)};je(Sn,fn=>{x(me).name==="getPixelAreaInfo"?fn(kn):fn(gn,!1)},!0)}G(bn,ln)};je($n,bn=>{x(me).name==="paintingPixel"&&x(oe)?bn(Pr):bn(Mn,!1)},!0)}G(nn,Cn)};je(Ur,nn=>{x(me).name==="pixelSelected"&&x(ge)?nn(lr):nn(Tn,!1)})}G(sr,Ut)};je(En,sr=>{x(N)&&sr(dr)})}k(se),Ye((sr,Ut,Ur,lr,Tn,nn,Cn,$n,Pr)=>{Rr=zr(j,1,"absolute right-2 top-2 z-30",null,Rr,sr),yn=zr(Z,1,"flex flex-col gap-4",null,yn,Ut),On=zr($e,1,"absolute left-2 top-2 z-30 flex flex-col gap-3",null,On,Ur),xr(cr,"title",lr),xr(Jt,"title",Tn),Xn=zr(qr,1,"absolute left-1/2 top-2 z-30 flex -translate-x-1/2 flex-col items-center justify-center gap-2",null,Xn,nn),Vn=zr(Yt,1,"absolute bottom-3 left-3 z-30",null,Vn,Cn),wn=zr(Er,1,"absolute bottom-3 left-1/2 z-30 -translate-x-1/2",null,wn,$n),Ji=zr(_n,1,"absolute bottom-3 right-3 z-30",null,Ji,Pr)},[()=>({hidden:x(H)}),()=>({"items-end":!kt.data,"items-center":kt.data}),()=>({hidden:x(H)}),()=>mb(),()=>vb(),()=>({hidden:x(H)}),()=>({hidden:x(H)}),()=>({hidden:x(H)}),()=>({hidden:x(H)})])}var In=q(se,2);HA(In,{get open(){return x(Ae)},set open(xt){ce(Ae,xt,!0)}});var tn=q(In,2);C7(tn,{get open(){return x(Ne)},set open(xt){ce(Ne,xt,!0)}});var Qr=q(tn,2);RM(Qr,{get open(){return x(ot)},set open(xt){ce(ot,xt,!0)}});var ma=q(Qr,2);QM(ma,{get open(){return x(ut)},set open(xt){ce(ut,xt,!0)}});var di=q(ma,2);zM(di,{get open(){return x(wt)},set open(xt){ce(wt,xt,!0)}});var Xi=q(di,2);UA(Xi,{onvisitclick:xt=>{var Wt;(Wt=x(N))==null||Wt.flyTo({center:xt,zoom:zf+1}),Co(xt,x(Y)),hl.push({pos:xt,zoom:x(Y)}),ce(pt,!1)},get open(){return x(pt)},set open(xt){ce(pt,xt,!0)}});var Zn=q(Xi,2);QD(Zn,{get region(){return x(It)},get open(){return x(Bt)},set open(xt){ce(Bt,xt,!0)}});var ni=q(Zn,2);Bx(ni,{get open(){return ai.dropletsDialogOpen},set open(xt){ai.dropletsDialogOpen=xt}});var qi=q(ni,2);{var Yi=xt=>{pM(xt,{onhqchange:()=>{ce(me,{name:"selectHq"},!0),ce(St,!1)},onhqclick:Wt=>{var Rr;(Rr=x(N))==null||Rr.flyTo({center:Wt,zoom:Math.max(x(Y),15)}),ce(me,{name:"pixelSelected",latLon:[Wt.lat,Wt.lng]},!0),ce(St,!1)},onlastpixelclick:Wt=>{var Rr;(Rr=x(N))==null||Rr.flyTo({center:Wt,zoom:Math.max(x(Y),15)}),ce(me,{name:"pixelSelected",latLon:[Wt.lat,Wt.lng]},!0),ce(St,!1)},get open(){return x(St)},set open(Wt){ce(St,Wt,!0)}})};je(qi,xt=>{x(N)&&xt(Yi)})}var Ei=q(qi,2);LL(Ei,{get open(){return x(zt)},set open(xt){ce(zt,xt,!0)}});var zi=q(Ei,2);{var Ki=xt=>{SM(xt,{get url(){return x(yt)},get map(){return x(N)},hideHover:()=>{var Wt,Rr;(Wt=x(N))==null||Wt.setPaintProperty(Ke,"raster-opacity",0),(Rr=x(ge))==null||Rr.setCanvasOpacity(0)},showHover:()=>{var Wt,Rr;(Wt=x(N))==null||Wt.setPaintProperty(Ke,"raster-opacity",He),(Rr=x(ge))==null||Rr.setCanvasOpacity(1)},get open(){return x(vt)},set open(Wt){ce(vt,Wt,!0)}})};je(zi,xt=>{x(N)&&xt(Ki)})}var oa=q(zi,2);{var Ta=xt=>{Cx(xt,{get image(){return x(Kt)},get paintedBy(){return x(or).paintedBy},get latLon(){return x(Sr)},get zoom(){return x(Dr)},get action(){return x(rr)},get open(){return x(Ar)},set open(Wt){ce(Ar,Wt,!0)}})};je(oa,xt=>{x(or)&&x(Kt)&&x(Sr)&&xt(Ta)})}G(m,Zr),Fr()}Qn(["click"]);export{_B as component}; diff --git a/frontend-backup/_app/immutable/nodes/5.cZCL4YVE.js b/frontend-backup/_app/immutable/nodes/5.cZCL4YVE.js new file mode 100644 index 0000000..5cc164f --- /dev/null +++ b/frontend-backup/_app/immutable/nodes/5.cZCL4YVE.js @@ -0,0 +1,49 @@ +import "../chunks/Ch2Ub8FX.js"; +import "../chunks/BOREeBzQ.js"; +import { f, b as i, d, r as a, n as r } from "../chunks/CMvZtFtm.js"; +import { L as s } from "../chunks/D3yDgRbd.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + t = new e.Error().stack; + t && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[t] = "dd4bfa84-6a4f-4083-bc94-ea0b0e129dfb"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-dd4bfa84-6a4f-4083-bc94-ea0b0e129dfb")); + })(); +} catch {} +var l = f( + '

                      Not found

                      Go to map
                      ' +); +function g(e) { + var t = l(), + n = d(t), + o = d(n); + s(o, { size: "lg", hasText: !0 }), a(n), r(4), a(t), i(e, t); +} +export { g as component }; diff --git a/frontend-backup/_app/immutable/nodes/5.lvNarnfM.js b/frontend-backup/_app/immutable/nodes/5.lvNarnfM.js deleted file mode 100644 index 837033b..0000000 --- a/frontend-backup/_app/immutable/nodes/5.lvNarnfM.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/B2cHk4HI.js";import"../chunks/cUtKXcx3.js";import{f as d,b as i,d as a,r as o,n as r}from"../chunks/BDALf20I.js";import{L as s}from"../chunks/CYItkO2S.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="dd4bfa84-6a4f-4083-bc94-ea0b0e129dfb",e._sentryDebugIdIdentifier="sentry-dbid-dd4bfa84-6a4f-4083-bc94-ea0b0e129dfb")})()}catch{}var l=d('

                      Not found

                      Go to map
                      ');function g(e){var t=l(),n=a(t),f=a(n);s(f,{size:"lg",hasText:!0}),o(n),r(4),o(t),i(e,t)}export{g as component}; diff --git a/frontend-backup/_app/immutable/nodes/6.DyKsgUf2.js b/frontend-backup/_app/immutable/nodes/6.DyKsgUf2.js deleted file mode 100644 index 4bcbdac..0000000 --- a/frontend-backup/_app/immutable/nodes/6.DyKsgUf2.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/B2cHk4HI.js";import"../chunks/cUtKXcx3.js";import{o as i}from"../chunks/4WsUhDWi.js";import{p as c,f,t as l,b,c as p,$ as m,s as u,d as s,r}from"../chunks/BDALf20I.js";import{s as h}from"../chunks/4k6DpCgf.js";import{h as g}from"../chunks/BUhRjcOt.js";import{i as y}from"../chunks/BuTItAOu.js";import{g as _}from"../chunks/DklPLC_x.js";import{g as w}from"../chunks/B4HM4TqG.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="72a55a37-b288-4457-b985-9193a3894d7c",e._sentryDebugIdIdentifier="sentry-dbid-72a55a37-b288-4457-b985-9193a3894d7c")})()}catch{}const x=()=>"Admin dashboard content",v=()=>"Conteúdo do painel de administração",D=(e={},o={})=>(o.locale??_())==="en"?x():v();var E=f('

                      Dashboard

                      ');function M(e,o){c(o,!1),i(()=>{w("/admin/dashboard")}),y();var t=E();g(n=>{m.title="Wplace - Admin Dashboard"});var a=u(s(t),2),d=s(a,!0);r(a),r(t),l(n=>h(d,n),[()=>D()]),b(e,t),p()}export{M as component}; diff --git a/frontend-backup/_app/immutable/nodes/6.WPRvZASS.js b/frontend-backup/_app/immutable/nodes/6.WPRvZASS.js new file mode 100644 index 0000000..660107b --- /dev/null +++ b/frontend-backup/_app/immutable/nodes/6.WPRvZASS.js @@ -0,0 +1,75 @@ +import "../chunks/Ch2Ub8FX.js"; +import "../chunks/BOREeBzQ.js"; +import { o as i } from "../chunks/DoL3ojdE.js"; +import { + p as c, + f, + t as l, + b, + c as p, + $ as m, + s as u, + d as s, + r as d, +} from "../chunks/CMvZtFtm.js"; +import { s as h } from "../chunks/DVA6u9-7.js"; +import { h as g } from "../chunks/P77cUGnY.js"; +import { i as y } from "../chunks/Z_72d8Vp.js"; +import { g as _ } from "../chunks/CV9xcpLq.js"; +import { g as w } from "../chunks/CyB--sFG.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + o = new e.Error().stack; + o && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[o] = "72a55a37-b288-4457-b985-9193a3894d7c"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-72a55a37-b288-4457-b985-9193a3894d7c")); + })(); +} catch {} +const x = () => "Admin dashboard content", + v = () => "Conteúdo do painel de administração", + D = (e = {}, o = {}) => ((o.locale ?? _()) === "en" ? x() : v()); +var E = f( + '

                      Dashboard

                      ' +); +function M(e, o) { + c(o, !1), + i(() => { + w("/admin/dashboard"); + }), + y(); + var t = E(); + g((n) => { + m.title = "FurryPlace - Admin Dashboard"; + }); + var a = u(s(t), 2), + r = s(a, !0); + d(a), d(t), l((n) => h(r, n), [() => D()]), b(e, t), p(); +} +export { M as component }; diff --git a/frontend-backup/_app/immutable/nodes/7.ACRjrnuj.js b/frontend-backup/_app/immutable/nodes/7.ACRjrnuj.js new file mode 100644 index 0000000..7fd54a9 --- /dev/null +++ b/frontend-backup/_app/immutable/nodes/7.ACRjrnuj.js @@ -0,0 +1,1250 @@ +import "../chunks/Ch2Ub8FX.js"; +import { + at as Ga, + p as Ja, + au as S, + av as Ka, + y as Ht, + g as e, + aw as s, + f as L, + d as a, + s as l, + t as C, + ax as Va, + b as x, + c as Xa, + $ as Za, + r as t, + ay as fe, + a as ie, + u as $e, +} from "../chunks/CMvZtFtm.js"; +import { s as c } from "../chunks/DVA6u9-7.js"; +import { i as U } from "../chunks/BF50aS-j.js"; +import { k as er, t as Ot } from "../chunks/BBgyHb-Z.js"; +import { e as it } from "../chunks/CXkjfmFU.js"; +import { h as tr } from "../chunks/P77cUGnY.js"; +import { s as Qt, r as ct, d as ar, a as ce } from "../chunks/C5yqZvKC.js"; +import { b as dt } from "../chunks/Dpga8uG-.js"; +import { g as Wt } from "../chunks/CyB--sFG.js"; +import { p as vt } from "../chunks/B6ZK_HZO.js"; +import { + a as G, + t as D, + i as rr, + h as nr, + f as or, + j as lr, + k as sr, +} from "../chunks/BRM3t761.js"; +import { + o as ir, + L as cr, + s as Yt, + g as dr, + a as vr, +} from "../chunks/CgCA7Awo.js"; +import { P as Gt } from "../chunks/D3yaN7Zl.js"; +import { p as _t, L as Jt, d as _r } from "../chunks/BKioTOWR.js"; +import { R as ur } from "../chunks/m3o6lEf1.js"; +import { g as F } from "../chunks/CV9xcpLq.js"; +import { r as br } from "../chunks/C3E1P42D.js"; +import { c as ut } from "../chunks/CHGjpGz-.js"; +import { c as mr } from "../chunks/C4yB2Gnm.js"; +import { + s as Kt, + v as Vt, + m as fr, + p as pr, + l as xr, +} from "../chunks/BsOIMr0T.js"; +import { c as gr } from "../chunks/CVa8RI1g.js"; +import { l as Xt } from "../chunks/BHI5vujT.js"; +import { r as hr } from "../chunks/DouSnzU9.js"; +import { s as yr, l as wr } from "../chunks/BFFUopoM.js"; +import { g as Pe, a as kr } from "../chunks/lE0oaQc5.js"; +import { f as Zt } from "../chunks/wZ7b5CwQ.js"; +(function () { + try { + var d = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + d.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var d = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + r = new d.Error().stack; + r && + ((d._sentryDebugIds = d._sentryDebugIds || {}), + (d._sentryDebugIds[r] = "24d6febf-d6d7-4615-95c2-acc3b7ee0a01"), + (d._sentryDebugIdIdentifier = + "sentry-dbid-24d6febf-d6d7-4615-95c2-acc3b7ee0a01")); + })(); +} catch {} +const Ar = () => "Search alliance (name or ID)", + Ir = () => "Buscar aliança (nome ou ID)", + Lr = (d = {}, r = {}) => ((r.locale ?? F()) === "en" ? Ar() : Ir()), + Nr = () => "Partial name or numeric ID", + $r = () => "Nome parcial ou ID numérico", + Pr = (d = {}, r = {}) => ((r.locale ?? F()) === "en" ? Nr() : $r()), + Cr = () => "Results", + Sr = () => "Resultados", + Dr = (d = {}, r = {}) => ((r.locale ?? F()) === "en" ? Cr() : Sr()), + Rr = () => "No alliance found", + Mr = () => "Nenhuma aliança encontrada", + Fr = (d = {}, r = {}) => ((r.locale ?? F()) === "en" ? Rr() : Mr()), + Tr = () => "No alliance selected", + zr = () => "Nenhuma aliança selecionada", + jr = (d = {}, r = {}) => ((r.locale ?? F()) === "en" ? Tr() : zr()), + Er = () => "Change name", + Br = () => "Alterar nome", + qr = (d = {}, r = {}) => ((r.locale ?? F()) === "en" ? Er() : Br()), + Ur = () => "Change leader", + Hr = () => "Alterar líder", + ea = (d = {}, r = {}) => ((r.locale ?? F()) === "en" ? Ur() : Hr()), + Or = () => "Ban all members", + Qr = () => "Banir todos os membros", + ta = (d = {}, r = {}) => ((r.locale ?? F()) === "en" ? Or() : Qr()), + Wr = () => "Creator (leader)", + Yr = () => "Proprietário (líder)", + Gr = (d = {}, r = {}) => ((r.locale ?? F()) === "en" ? Wr() : Yr()), + Jr = () => "No coordinates", + Kr = () => "Sem coordenadas", + Vr = (d = {}, r = {}) => ((r.locale ?? F()) === "en" ? Jr() : Kr()), + Xr = () => "Actions", + Zr = () => "Ações", + en = (d = {}, r = {}) => ((r.locale ?? F()) === "en" ? Xr() : Zr()), + tn = () => "Remove", + an = () => "Remover", + rn = (d = {}, r = {}) => ((r.locale ?? F()) === "en" ? tn() : an()), + nn = () => "No members", + on = () => "Sem membros", + ln = (d = {}, r = {}) => ((r.locale ?? F()) === "en" ? nn() : on()), + sn = () => "Rename alliance", + cn = () => "Alterar nome da aliança", + dn = (d = {}, r = {}) => ((r.locale ?? F()) === "en" ? sn() : cn()), + vn = () => "Inform the ID of the new leader", + _n = () => "Informe o ID do novo líder", + un = (d = {}, r = {}) => ((r.locale ?? F()) === "en" ? vn() : _n()), + bn = () => + "Are you sure you want to ban all members of this alliance? This action cannot be undone.", + mn = () => + "Tem certeza que deseja banir todos os membros desta aliança? Esta ação não pode ser desfeita.", + fn = (d = {}, r = {}) => ((r.locale ?? F()) === "en" ? bn() : mn()); +function pn(d, r, _, R) { + e(r) && (s(_, e(r).name ?? "", !0), s(R, !0)); +} +function xn(d, r, _, R) { + e(r) && (s(_, e(r).ownerId ? String(e(r).ownerId) : "", !0), s(R, !0)); +} +function gn(d, r) { + s(r, !0); +} +async function hn(d, r, _, R, W, ee, b, K) { + if (e(r)) { + if (!e(_)) { + D.error(vr()); + return; + } + if (!(e(R) && !e(R)())) + try { + s(W, !0), + await G.banAllAllianceMembers(e(r).id, e(_), e(ee)), + D.success("Todos os membros banidos"), + await b(e(r).id, !0), + s(K, !1); + } catch (J) { + D.error((J == null ? void 0 : J.message) ?? "Falha ao banir membros"); + } finally { + s(W, !1); + } + } +} +var yn = (d, r, _, R) => { + s(r, ""), s(_, [], !0), s(R, null); + }, + wn = L( + '
                      ' + ), + kn = L('
                      '), + An = L('
                      '), + In = (d, r, _) => r(e(_).id, !0), + Ln = L( + '' + ), + Nn = L( + '
                      ' + ), + $n = L( + '
                      ' + ), + Pn = L('
                      '), + Cn = L('
                      '), + Sn = (d, r, _) => { + var R; + return ( + ((R = e(r)) == null ? void 0 : R.ownerId) !== void 0 && _(e(r).ownerId) + ); + }, + Dn = (d, r, _) => r(e(_)), + Rn = L( + '
                      ', + 1 + ), + Mn = L('
                      '), + Fn = (d, r, _) => e(r) && _(e(r).id, !0), + Tn = (d, r, _) => r(e(_).id), + zn = (d, r, _) => r(e(_)), + jn = (d, r, _) => r(e(_), "member"), + En = (d, r, _) => r(e(_), "admin"), + Bn = (d, r, _) => r(e(_)), + qn = L( + '
                      ' + ), + Un = L( + ' ' + ), + Hn = (d, r) => r(), + On = L( + '
                      ' + ), + Qn = L( + '
                      HQ

                      Total:
                      ' + ), + Wn = (d, r) => d.key === "Enter" && r(), + Yn = (d, r) => s(r, !1), + Gn = (d, r) => s(r, !1), + Jn = L( + '' + ), + Kn = (d, r) => d.key === "Enter" && r(), + Vn = (d, r) => s(r, !1), + Xn = (d, r) => s(r, !1), + Zn = L( + '' + ), + eo = L(""), + to = (d, r) => s(r, !1), + ao = (d, r) => s(r, !1), + ro = L( + '' + ), + no = L( + '
                      ' + ); +function Ro(d, r) { + Ja(r, !0); + let _ = S(""), + R = S(!1), + W = S(Ka([])), + ee = S(null), + b = S(!1), + K = S(null), + J = S(null), + i = S(null), + de = S(!1), + pe = S(""), + ve = S(!1), + xe = S(""), + re = S(!1), + ne = S(""), + ge = S(""), + Ce = S(null); + const aa = [ + { value: "inappropriate-content", label: rr() }, + { value: "hate-speech", label: nr() }, + { value: "doxxing", label: or() }, + { value: "bot", label: lr() }, + { value: "griefing", label: sr() }, + { value: "other", label: ir() }, + ]; + let he = S(0); + const ra = 50; + let na = $e(() => !!e(i) && e(i).members.length < e(i).membersCount); + Ht(() => { + e(re) || (s(ne, ""), s(ge, "")); + }), + Ht(() => { + const n = vt.url.searchParams.get("id"), + o = n ? Number(n) : null; + async function v() { + o !== e(J) && + (s(J, o, !0), + n && s(_, n, !0), + e(J) != null && !isNaN(e(J)) + ? await ye(e(J), !0) + : (s(i, null), s(K, null))); + } + v(); + }); + async function bt() { + try { + s(ee, null), s(R, !0); + const n = e(_).trim(); + if (!n) { + s(W, [], !0); + return; + } + const o = Number(n); + if (Number.isFinite(o)) + try { + const m = await G.getAllianceById(o); + if (m) { + s( + W, + [{ id: m.id, name: m.name, pixelsPainted: m.pixelsPainted ?? 0 }], + !0 + ); + return; + } + } catch {} + const v = await G.searchAlliances(n); + s(W, v, !0); + } catch (n) { + console.error(n), + s(ee, (n == null ? void 0 : n.message) ?? "Falha na busca", !0), + s(W, [], !0); + } finally { + s(R, !1); + } + } + async function ye(n, o = !1) { + try { + s(b, !0), s(K, null); + const v = await G.getAllianceFull(n); + if (!v) { + s(i, null), s(K, "Alliance not found"); + return; + } + s(i, v, !0), + o && (s(he, 0), oa() && (await mt(!0))), + Wt(`/admin/alliances?id=${n}`, { replaceState: !0 }); + } catch (v) { + console.error(v), + s( + K, + (v == null ? void 0 : v.message) ?? "Erro ao carregar aliança", + !0 + ), + s(i, null); + } finally { + s(b, !1); + } + } + function oa() { + return !!e(i) && e(i).members.length < e(i).membersCount; + } + async function mt(n = !1) { + if (e(i)) + try { + s(b, !0), n && s(he, 0); + const o = n ? 0 : e(he) + 1, + v = await G.getAdminAllianceMembers(e(i).id, { + page: o, + pageSize: ra, + }), + m = o === 0 ? v.members : [...e(i).members, ...v.members]; + s( + i, + { ...e(i), members: m, membersCount: v.total ?? e(i).membersCount }, + !0 + ), + s(he, o, !0); + } catch (o) { + console.error(o), + D.error( + (o == null ? void 0 : o.message) ?? "Falha ao carregar membros" + ); + } finally { + s(b, !1); + } + } + async function ft() { + if (!e(i)) return; + const n = e(pe).trim(); + if (!n) { + D.error("Informe um nome válido"); + return; + } + try { + s(b, !0), + await G.renameAlliance(e(i).id, n), + s(i, { ...e(i), name: n }, !0), + D.success("Nome alterado"), + s(de, !1); + } catch (o) { + D.error((o == null ? void 0 : o.message) ?? "Falha ao alterar nome"); + } finally { + s(b, !1); + } + } + async function pt() { + if (!e(i)) return; + const n = Number(e(xe)); + if (!Number.isFinite(n) || n <= 0) { + D.error("ID inválido"); + return; + } + try { + s(b, !0), await G.changeAllianceLeader(e(i).id, n); + const o = await G.getAllianceFull(e(i).id); + s(i, o, !0), D.success("Líder alterado"), s(ve, !1); + } catch (o) { + D.error((o == null ? void 0 : o.message) ?? "Falha ao alterar líder"); + } finally { + s(b, !1); + } + } + async function xt(n, o) { + if (e(i)) + try { + s(b, !0), + await G.setAllianceMemberRole(e(i).id, n.id, o), + s( + i, + { + ...e(i), + members: e(i).members.map((v) => + v.id === n.id ? { ...v, role: o } : v + ), + }, + !0 + ), + D.success("Cargo atualizado"); + } catch (v) { + D.error((v == null ? void 0 : v.message) ?? "Falha ao atualizar cargo"); + } finally { + s(b, !1); + } + } + async function la(n) { + if (e(i)) { + if (n.id == e(i).ownerId) { + D.error("Não é possível remover o líder da aliança"); + return; + } + try { + s(b, !0), + await G.removeAllianceMember(e(i).id, n.id), + s( + i, + { + ...e(i), + members: e(i).members.filter((o) => o.id !== n.id), + membersCount: Math.max(0, e(i).membersCount - 1), + }, + !0 + ), + D.success("Membro removido"); + } catch (o) { + D.error((o == null ? void 0 : o.message) ?? "Falha ao remover membro"); + } finally { + s(b, !1); + } + } + } + function sa(n) { + if (!n.lastPixelLatitude || !n.lastPixelLongitude) { + D.error("Sem registro de último pixel"); + return; + } + const o = `${vt.url.origin}/?lat=${n.lastPixelLatitude}&lng=${n.lastPixelLongitude}&select=true`; + window.open(o, "_blank"); + } + function ia(n) { + const { hqLatitude: o, hqLongitude: v } = n; + if (o == null || v == null) { + D.error("No coords for HQ"); + return; + } + const m = `${vt.url.origin}/?lat=${o}&lng=${v}&select=true`; + window.open(m, "_blank"); + } + function gt(n) { + Wt(`/admin/users?id=${n}`); + } + var Se = no(); + tr((n) => { + Za.title = "FurryPlace - Admin - Alliances"; + }); + var De = a(Se), + Re = a(De), + we = a(Re), + Me = a(we), + Fe = a(Me), + ca = a(Fe, !0); + t(Fe); + var Te = l(Fe, 2); + ct(Te), t(Me); + var ht = l(Me, 2), + _e = a(ht); + _e.__click = bt; + var da = a(_e, !0); + t(_e); + var ze = l(_e, 2); + ze.__click = [yn, _, W, ee]; + var va = a(ze, !0); + t(ze), t(ht), t(we); + var yt = l(we, 2), + je = a(yt), + _a = a(je, !0); + t(je); + var ua = l(je, 2); + { + var ba = (n) => { + var o = wn(), + v = l(a(o), 2), + m = a(v, !0); + t(v), t(o), C((T) => c(m, T), [() => Xt()]), x(n, o); + }, + ma = (n) => { + var o = fe(), + v = ie(o); + { + var m = (p) => { + var h = kn(), + N = a(h, !0); + t(h), C(() => c(N, e(ee))), x(p, h); + }, + T = (p) => { + var h = fe(), + N = ie(h); + { + var M = (f) => { + var g = An(), + y = a(g, !0); + t(g), C((k) => c(y, k), [() => Fr()]), x(f, g); + }, + q = (f) => { + var g = Nn(); + it( + g, + 21, + () => e(W), + (y) => y.id, + (y, k) => { + var $ = Ln(); + $.__click = [In, ye, k]; + var z = a($), + E = a(z), + j = a(E, !0); + t(E); + var V = l(E, 2), + Y = a(V); + t(V), t(z); + var oe = l(z, 2), + te = a(oe), + P = l(te), + H = a(P, !0); + t(P), + t(oe), + t($), + C( + (A, ae, O) => { + ce(E, 1, `font-semibold ${A ?? ""}`), + c(j, e(k).name), + c(Y, `#${e(k).id ?? ""}`), + c(te, `${ae ?? ""}: `), + c(H, O); + }, + [ + () => Pe(e(k).id), + () => _t(), + () => e(k).pixelsPainted.toLocaleString("en-US"), + ] + ), + x(y, $); + } + ), + t(g), + x(f, g); + }; + U( + N, + (f) => { + e(W).length === 0 ? f(M) : f(q, !1); + }, + !0 + ); + } + x(p, h); + }; + U( + v, + (p) => { + e(ee) ? p(m) : p(T, !1); + }, + !0 + ); + } + x(n, o); + }; + U(ua, (n) => { + e(R) ? n(ba) : n(ma, !1); + }); + } + t(yt), t(Re); + var wt = l(Re, 2), + fa = a(wt); + { + var pa = (n) => { + var o = $n(), + v = l(a(o), 2), + m = a(v, !0); + t(v), t(o), C((T) => c(m, T), [() => Xt()]), x(n, o); + }, + xa = (n) => { + var o = fe(), + v = ie(o); + { + var m = (p) => { + var h = Pn(), + N = a(h, !0); + t(h), C(() => c(N, e(K))), x(p, h); + }, + T = (p) => { + var h = fe(), + N = ie(h); + { + var M = (f) => { + var g = Cn(), + y = a(g, !0); + t(g), C((k) => c(y, k), [() => jr()]), x(f, g); + }, + q = (f) => { + var g = fe(), + y = ie(g); + er( + y, + () => e(i).id, + (k) => { + var $ = Qn(), + z = a($), + E = a(z), + j = a(E), + V = a(j, !0); + t(j); + var Y = l(j, 2), + oe = a(Y); + t(Y), t(E); + var te = l(E, 2), + P = a(te); + P.__click = [pn, i, pe, de]; + var H = a(P, !0); + t(P); + var A = l(P, 2); + A.__click = [xn, i, xe, ve]; + var ae = a(A, !0); + t(A); + var O = l(A, 2); + O.__click = [gn, re]; + var Ee = a(O, !0); + t(O), t(te), t(z); + var Be = l(z, 2), + qe = a(Be), + ka = a(qe, !0); + t(qe); + var It = l(qe, 2), + Aa = a(It, !0); + t(It), t(Be); + var Ue = l(Be, 2), + He = a(Ue), + Oe = a(He), + Ia = a(Oe, !0); + t(Oe); + var Lt = l(Oe, 2), + Nt = a(Lt); + Gt(Nt, { + class: "size-8 border", + get userId() { + return e(i).ownerId; + }, + pictureUrl: void 0, + }); + var Qe = l(Nt, 2); + Qe.__click = [Sn, i, gt]; + var La = a(Qe, !0); + t(Qe), t(Lt), t(He); + var We = l(He, 2), + $t = l(a(We), 2), + Na = a($t); + { + var $a = (w) => { + var u = Rn(), + I = ie(u), + B = a(I); + t(I); + var Q = l(I, 2); + Q.__click = [Dn, ia, i]; + var X = a(Q); + Jt(X, { class: "size-4" }); + var Z = l(X); + t(Q), + C( + (le) => { + c( + B, + `Lat: ${e(i).hqLatitude ?? ""}, Lng: ${ + e(i).hqLongitude ?? "" + }` + ), + c(Z, ` ${le ?? ""}`); + }, + [() => Vt()] + ), + x(w, u); + }, + Pa = (w) => { + var u = Mn(), + I = a(u, !0); + t(u), C((B) => c(I, B), [() => Vr()]), x(w, u); + }; + U(Na, (w) => { + e(i).hqLatitude != null && e(i).hqLongitude != null + ? w($a) + : w(Pa, !1); + }); + } + t($t), t(We); + var Pt = l(We, 2), + Ye = a(Pt), + Ca = a(Ye, !0); + t(Ye); + var Ct = l(Ye, 2), + Sa = a(Ct, !0); + t(Ct), t(Pt), t(Ue); + var St = l(Ue, 2), + Ge = a(St), + Je = a(Ge), + Ke = a(Je), + Da = a(Ke, !0); + t(Ke); + var Dt = l(Ke, 2), + Rt = l(a(Dt)), + Ra = a(Rt, !0); + t(Rt), t(Dt), t(Je); + var Mt = l(Je, 2), + ke = a(Mt); + ke.__click = [Fn, i, ye]; + var Ft = a(ke); + ur(Ft, { class: "size-4" }); + var Ma = l(Ft); + t(ke), t(Mt), t(Ge); + var Ve = l(Ge, 2), + Tt = a(Ve), + Xe = a(Tt), + zt = a(Xe), + Ze = l(a(zt)), + Fa = a(Ze, !0); + t(Ze); + var et = l(Ze), + Ta = a(et, !0); + t(et); + var tt = l(et), + za = a(tt, !0); + t(tt); + var at = l(tt), + ja = a(at, !0); + t(at); + var jt = l(at), + Ea = a(jt, !0); + t(jt), t(zt), t(Xe); + var Et = l(Xe), + Bt = a(Et); + it( + Bt, + 17, + () => e(i).members, + (w) => w.id, + (w, u) => { + var I = qn(), + B = a(I), + Q = a(B); + { + let st = $e(() => e(u).picture ?? void 0); + Gt(Q, { + class: "size-8 border", + get userId() { + return e(u).id; + }, + get pictureUrl() { + return e(st); + }, + }); + } + t(B); + var X = l(B), + Z = a(X); + Z.__click = [Tn, gt, u]; + var le = a(Z), + Ae = l(le), + rt = a(Ae); + t(Ae), t(Z), t(X); + var ue = l(X), + nt = a(ue, !0); + t(ue); + var be = l(ue), + se = a(be); + se.__click = [zn, sa, u]; + var Ie = a(se); + Jt(Ie, { class: "size-4" }); + var ot = l(Ie); + t(se), t(be); + var me = l(be), + qt = a(me), + Le = a(qt); + Le.__click = [jn, xt, u]; + var lt = l(Le, 2); + (lt.__click = [En, xt, u]), t(qt), t(me); + var Ut = l(me), + Ne = a(Ut); + Ne.__click = [Bn, la, u]; + var Oa = a(Ne, !0); + t(Ne), + t(Ut), + t(I), + C( + (st, Qa, Wa, Ya) => { + ce(Z, 1, `link font-semibold ${st ?? ""}`), + c(le, `${e(u).name ?? ""} `), + c(rt, `#${e(u).id ?? ""}`), + c(nt, Qa), + (se.disabled = + !e(u).lastPixelLatitude || + !e(u).lastPixelLongitude), + c(ot, ` ${Wa ?? ""}`), + ce( + Le, + 1, + `btn btn-xs join-item w-16 ${ + e(u).role === "member" + ? "btn-primary" + : "btn-outline" + }` + ), + (Le.disabled = + e(b) || e(u).role === "member"), + ce( + lt, + 1, + `btn btn-xs join-item w-16 ${ + e(u).role === "admin" + ? "btn-primary" + : "btn-outline" + }` + ), + (lt.disabled = + e(b) || e(u).role === "admin"), + (Ne.disabled = e(b)), + c(Oa, Ya); + }, + [ + () => Pe(e(u).id), + () => + e(u).pixelsPainted.toLocaleString("en-US"), + () => Vt(), + () => rn(), + ] + ), + x(w, I); + } + ); + var Ba = l(Bt); + { + var qa = (w) => { + var u = Un(), + I = a(u), + B = a(I, !0); + t(I), + t(u), + C((Q) => c(B, Q), [() => ln()]), + x(w, u); + }; + U(Ba, (w) => { + e(i).members.length === 0 && w(qa); + }); + } + t(Et), t(Tt), t(Ve); + var Ua = l(Ve, 2); + { + var Ha = (w) => { + var u = On(), + I = a(u); + I.__click = [Hn, mt]; + var B = a(I, !0); + t(I), + t(u), + C( + (Q) => { + (I.disabled = e(b)), c(B, Q); + }, + [() => wr()] + ), + x(w, u); + }; + U(Ua, (w) => { + e(na) && w(Ha); + }); + } + t(St), + t($), + C( + ( + w, + u, + I, + B, + Q, + X, + Z, + le, + Ae, + rt, + ue, + nt, + be, + se, + Ie, + ot, + me + ) => { + ce(j, 1, `text-lg font-semibold ${w ?? ""}`), + c(V, e(i).name), + ce( + Y, + 1, + `badge badge-sm ml-1 border-0 ${u ?? ""} ${ + I ?? "" + }` + ), + c(oe, `#${e(i).id ?? ""}`), + (P.disabled = e(b)), + c(H, B), + (A.disabled = e(b)), + c(ae, Q), + (O.disabled = e(b)), + c(Ee, X), + c(ka, Z), + c(Aa, e(i).description ?? "—"), + c(Ia, le), + c(La, e(i).ownerName ?? `#${e(i).ownerId}`), + c(Ca, Ae), + c(Sa, rt), + c(Da, ue), + c(Ra, e(i).membersCount), + (ke.disabled = e(b)), + c(Ma, ` ${nt ?? ""}`), + c(Fa, be), + c(Ta, se), + c(za, Ie), + c(ja, ot), + c(Ea, me); + }, + [ + () => Pe(e(i).id), + () => kr(e(i).id), + () => Pe(e(i).id), + () => qr(), + () => ea(), + () => ta(), + () => _r(), + () => Gr(), + () => _t(), + () => e(i).pixelsPainted.toLocaleString("en-US"), + () => fr(), + () => br(), + () => pr(), + () => _t(), + () => xr(), + () => hr(), + () => en(), + ] + ), + Ot( + 1, + $, + () => Zt, + () => ({ duration: 120 }) + ), + Ot( + 2, + $, + () => Zt, + () => ({ duration: 80 }) + ), + x(k, $); + } + ), + x(f, g); + }; + U( + N, + (f) => { + e(i) ? f(q, !1) : f(M); + }, + !0 + ); + } + x(p, h); + }; + U( + v, + (p) => { + e(K) ? p(m) : p(T, !1); + }, + !0 + ); + } + x(n, o); + }; + U(fa, (n) => { + e(b) && !e(i) ? n(pa) : n(xa, !1); + }); + } + t(wt), t(De); + var kt = l(De, 2); + { + var ga = (n) => { + var o = Jn(), + v = a(o), + m = a(v), + T = a(m, !0); + t(m); + var p = l(m, 2), + h = a(p); + ct(h), (h.__keydown = [Wn, ft]), t(p); + var N = l(p, 2), + M = a(N); + M.__click = [Yn, de]; + var q = a(M, !0); + t(M); + var f = l(M, 2); + f.__click = ft; + var g = a(f, !0); + t(f), t(N), t(v); + var y = l(v, 2); + (y.__click = [Gn, de]), + t(o), + C( + (k, $, z) => { + c(T, k), (M.disabled = e(b)), c(q, $), (f.disabled = e(b)), c(g, z); + }, + [() => dn(), () => ut(), () => Kt()] + ), + dt( + h, + () => e(pe), + (k) => s(pe, k) + ), + x(n, o); + }; + U(kt, (n) => { + e(de) && n(ga); + }); + } + var At = l(kt, 2); + { + var ha = (n) => { + var o = Zn(), + v = a(o), + m = a(v), + T = a(m, !0); + t(m); + var p = l(m, 2), + h = a(p, !0); + t(p); + var N = l(p, 2), + M = a(N); + ct(M), (M.__keydown = [Kn, pt]), t(N); + var q = l(N, 2), + f = a(q); + f.__click = [Vn, ve]; + var g = a(f, !0); + t(f); + var y = l(f, 2); + y.__click = pt; + var k = a(y, !0); + t(y), t(q), t(v); + var $ = l(v, 2); + ($.__click = [Xn, ve]), + t(o), + C( + (z, E, j, V) => { + c(T, z), + c(h, E), + (f.disabled = e(b)), + c(g, j), + (y.disabled = e(b)), + c(k, V); + }, + [() => ea(), () => un(), () => ut(), () => Kt()] + ), + dt( + M, + () => e(xe), + (z) => s(xe, z) + ), + x(n, o); + }; + U(At, (n) => { + e(ve) && n(ha); + }); + } + var ya = l(At, 2); + { + var wa = (n) => { + var o = ro(), + v = a(o), + m = a(v), + T = a(m, !0); + t(m); + var p = l(m, 2), + h = a(p, !0); + t(p); + var N = l(p, 2), + M = a(N), + q = a(M), + f = a(q, !0); + t(q); + var g = l(q, 2), + y = a(g); + y.value = y.__value = ""; + var k = l(y); + it( + k, + 17, + () => aa, + (P) => P.value, + (P, H) => { + var A = eo(), + ae = a(A, !0); + t(A); + var O = {}; + C(() => { + c(ae, e(H).label), + O !== (O = e(H).value) && + (A.value = (A.__value = e(H).value) ?? ""); + }), + x(P, A); + } + ), + t(g), + t(M), + t(N); + var $ = l(N, 2), + z = a($); + { + let P = $e(() => dr()), + H = $e(() => (e(ne) === "doxxing" ? 20 : 5)); + cr(z, { + class: "h-24 rounded-lg", + name: "notes", + get placeholder() { + return e(P); + }, + max: 2056, + get min() { + return e(H); + }, + get value() { + return e(ge); + }, + set value(A) { + s(ge, A, !0); + }, + get validate() { + return e(Ce); + }, + set validate(A) { + s(Ce, A, !0); + }, + }); + } + t($); + var E = l($, 2), + j = a(E); + j.__click = [to, re]; + var V = a(j, !0); + t(j); + var Y = l(j, 2); + Y.__click = [hn, i, ne, Ce, b, ge, ye, re]; + var oe = a(Y, !0); + t(Y), t(E), t(v); + var te = l(v, 2); + (te.__click = [ao, re]), + t(o), + C( + (P, H, A, ae, O, Ee) => { + c(T, P), + c(h, H), + c(f, A), + Qt(g, "aria-label", ae), + (j.disabled = e(b)), + c(V, O), + (Y.disabled = e(b) || !e(ne)), + c(oe, Ee); + }, + [ + () => ta(), + () => fn(), + () => Yt(), + () => Yt(), + () => ut(), + () => mr(), + ] + ), + ar( + g, + () => e(ne), + (P) => s(ne, P) + ), + x(n, o); + }; + U(ya, (n) => { + e(re) && n(wa); + }); + } + t(Se), + C( + (n, o, v, m, T) => { + c(ca, n), + Qt(Te, "placeholder", o), + (_e.disabled = e(R)), + c(da, v), + c(va, m), + c(_a, T); + }, + [() => Lr(), () => Pr(), () => yr(), () => gr(), () => Dr()] + ), + Va("submit", we, (n) => { + n.preventDefault(), bt(); + }), + dt( + Te, + () => e(_), + (n) => s(_, n) + ), + x(d, Se), + Xa(); +} +Ga(["click", "keydown"]); +export { Ro as component }; diff --git a/frontend-backup/_app/immutable/nodes/7.C4jrLY7T.js b/frontend-backup/_app/immutable/nodes/7.C4jrLY7T.js deleted file mode 100644 index eb9bd33..0000000 --- a/frontend-backup/_app/immutable/nodes/7.C4jrLY7T.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/B2cHk4HI.js";import{at as Ga,p as Ja,au as S,av as Ka,y as Ht,g as e,aw as s,f as L,d as a,s as l,t as C,ax as Va,b as x,c as Xa,$ as Za,r as t,ay as fe,a as ie,u as $e}from"../chunks/BDALf20I.js";import{s as c}from"../chunks/4k6DpCgf.js";import{i as U}from"../chunks/Bke_korE.js";import{k as er,t as Ot}from"../chunks/BCONGQnO.js";import{e as it}from"../chunks/CZW2bcQi.js";import{h as tr}from"../chunks/BUhRjcOt.js";import{s as Qt,r as ct,d as ar,a as ce}from"../chunks/BNZUboE0.js";import{b as dt}from"../chunks/DS58drb5.js";import{g as Wt}from"../chunks/B4HM4TqG.js";import{p as vt}from"../chunks/C-Y7nmnD.js";import{a as G,t as D,i as rr,h as nr,f as or,j as lr,k as sr}from"../chunks/DffDvEhl.js";import{o as ir,L as cr,s as Yt,g as dr,a as vr}from"../chunks/CAQlJ3np.js";import{P as Gt}from"../chunks/DCxPsWiR.js";import{p as _t,L as Jt,d as _r}from"../chunks/sZ1mzRzK.js";import{R as ur}from"../chunks/rLj4C5Bn.js";import{g as F}from"../chunks/DklPLC_x.js";import{r as br}from"../chunks/Drv8f_fG.js";import{c as ut}from"../chunks/CDZgL_Bh.js";import{c as mr}from"../chunks/EXYzlOI1.js";import{s as Kt,v as Vt,m as fr,p as pr,l as xr}from"../chunks/DhR_xAc4.js";import{c as gr}from"../chunks/hLPYzGnf.js";import{l as Xt}from"../chunks/BMfwGdZU.js";import{r as hr}from"../chunks/CmAc-jwz.js";import{s as yr,l as wr}from"../chunks/6TAPgKgc.js";import{g as Pe,a as kr}from"../chunks/ClOhzjRc.js";import{f as Zt}from"../chunks/DnhglgUZ.js";(function(){try{var d=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};d.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var d=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new d.Error().stack;r&&(d._sentryDebugIds=d._sentryDebugIds||{},d._sentryDebugIds[r]="ddaa37ad-f9e2-4e98-a8b5-4092902406f9",d._sentryDebugIdIdentifier="sentry-dbid-ddaa37ad-f9e2-4e98-a8b5-4092902406f9")})()}catch{}const Ar=()=>"Search alliance (name or ID)",Ir=()=>"Buscar aliança (nome ou ID)",Lr=(d={},r={})=>(r.locale??F())==="en"?Ar():Ir(),Nr=()=>"Partial name or numeric ID",$r=()=>"Nome parcial ou ID numérico",Pr=(d={},r={})=>(r.locale??F())==="en"?Nr():$r(),Cr=()=>"Results",Sr=()=>"Resultados",Dr=(d={},r={})=>(r.locale??F())==="en"?Cr():Sr(),Rr=()=>"No alliance found",Mr=()=>"Nenhuma aliança encontrada",Fr=(d={},r={})=>(r.locale??F())==="en"?Rr():Mr(),Tr=()=>"No alliance selected",zr=()=>"Nenhuma aliança selecionada",jr=(d={},r={})=>(r.locale??F())==="en"?Tr():zr(),Er=()=>"Change name",Br=()=>"Alterar nome",qr=(d={},r={})=>(r.locale??F())==="en"?Er():Br(),Ur=()=>"Change leader",Hr=()=>"Alterar líder",ea=(d={},r={})=>(r.locale??F())==="en"?Ur():Hr(),Or=()=>"Ban all members",Qr=()=>"Banir todos os membros",ta=(d={},r={})=>(r.locale??F())==="en"?Or():Qr(),Wr=()=>"Creator (leader)",Yr=()=>"Proprietário (líder)",Gr=(d={},r={})=>(r.locale??F())==="en"?Wr():Yr(),Jr=()=>"No coordinates",Kr=()=>"Sem coordenadas",Vr=(d={},r={})=>(r.locale??F())==="en"?Jr():Kr(),Xr=()=>"Actions",Zr=()=>"Ações",en=(d={},r={})=>(r.locale??F())==="en"?Xr():Zr(),tn=()=>"Remove",an=()=>"Remover",rn=(d={},r={})=>(r.locale??F())==="en"?tn():an(),nn=()=>"No members",on=()=>"Sem membros",ln=(d={},r={})=>(r.locale??F())==="en"?nn():on(),sn=()=>"Rename alliance",cn=()=>"Alterar nome da aliança",dn=(d={},r={})=>(r.locale??F())==="en"?sn():cn(),vn=()=>"Inform the ID of the new leader",_n=()=>"Informe o ID do novo líder",un=(d={},r={})=>(r.locale??F())==="en"?vn():_n(),bn=()=>"Are you sure you want to ban all members of this alliance? This action cannot be undone.",mn=()=>"Tem certeza que deseja banir todos os membros desta aliança? Esta ação não pode ser desfeita.",fn=(d={},r={})=>(r.locale??F())==="en"?bn():mn();function pn(d,r,_,R){e(r)&&(s(_,e(r).name??"",!0),s(R,!0))}function xn(d,r,_,R){e(r)&&(s(_,e(r).ownerId?String(e(r).ownerId):"",!0),s(R,!0))}function gn(d,r){s(r,!0)}async function hn(d,r,_,R,W,ee,b,K){if(e(r)){if(!e(_)){D.error(vr());return}if(!(e(R)&&!e(R)()))try{s(W,!0),await G.banAllAllianceMembers(e(r).id,e(_),e(ee)),D.success("Todos os membros banidos"),await b(e(r).id,!0),s(K,!1)}catch(J){D.error((J==null?void 0:J.message)??"Falha ao banir membros")}finally{s(W,!1)}}}var yn=(d,r,_,R)=>{s(r,""),s(_,[],!0),s(R,null)},wn=L('
                      '),kn=L('
                      '),An=L('
                      '),In=(d,r,_)=>r(e(_).id,!0),Ln=L(''),Nn=L('
                      '),$n=L('
                      '),Pn=L('
                      '),Cn=L('
                      '),Sn=(d,r,_)=>{var R;return((R=e(r))==null?void 0:R.ownerId)!==void 0&&_(e(r).ownerId)},Dn=(d,r,_)=>r(e(_)),Rn=L('
                      ',1),Mn=L('
                      '),Fn=(d,r,_)=>e(r)&&_(e(r).id,!0),Tn=(d,r,_)=>r(e(_).id),zn=(d,r,_)=>r(e(_)),jn=(d,r,_)=>r(e(_),"member"),En=(d,r,_)=>r(e(_),"admin"),Bn=(d,r,_)=>r(e(_)),qn=L('
                      '),Un=L(' '),Hn=(d,r)=>r(),On=L('
                      '),Qn=L('
                      HQ

                      Total:
                      '),Wn=(d,r)=>d.key==="Enter"&&r(),Yn=(d,r)=>s(r,!1),Gn=(d,r)=>s(r,!1),Jn=L(''),Kn=(d,r)=>d.key==="Enter"&&r(),Vn=(d,r)=>s(r,!1),Xn=(d,r)=>s(r,!1),Zn=L(''),eo=L(""),to=(d,r)=>s(r,!1),ao=(d,r)=>s(r,!1),ro=L(''),no=L('
                      ');function Ro(d,r){Ja(r,!0);let _=S(""),R=S(!1),W=S(Ka([])),ee=S(null),b=S(!1),K=S(null),J=S(null),i=S(null),de=S(!1),pe=S(""),ve=S(!1),xe=S(""),re=S(!1),ne=S(""),ge=S(""),Ce=S(null);const aa=[{value:"inappropriate-content",label:rr()},{value:"hate-speech",label:nr()},{value:"doxxing",label:or()},{value:"bot",label:lr()},{value:"griefing",label:sr()},{value:"other",label:ir()}];let he=S(0);const ra=50;let na=$e(()=>!!e(i)&&e(i).members.length{e(re)||(s(ne,""),s(ge,""))}),Ht(()=>{const n=vt.url.searchParams.get("id"),o=n?Number(n):null;async function v(){o!==e(J)&&(s(J,o,!0),n&&s(_,n,!0),e(J)!=null&&!isNaN(e(J))?await ye(e(J),!0):(s(i,null),s(K,null)))}v()});async function bt(){try{s(ee,null),s(R,!0);const n=e(_).trim();if(!n){s(W,[],!0);return}const o=Number(n);if(Number.isFinite(o))try{const m=await G.getAllianceById(o);if(m){s(W,[{id:m.id,name:m.name,pixelsPainted:m.pixelsPainted??0}],!0);return}}catch{}const v=await G.searchAlliances(n);s(W,v,!0)}catch(n){console.error(n),s(ee,(n==null?void 0:n.message)??"Falha na busca",!0),s(W,[],!0)}finally{s(R,!1)}}async function ye(n,o=!1){try{s(b,!0),s(K,null);const v=await G.getAllianceFull(n);if(!v){s(i,null),s(K,"Alliance not found");return}s(i,v,!0),o&&(s(he,0),oa()&&await mt(!0)),Wt(`/admin/alliances?id=${n}`,{replaceState:!0})}catch(v){console.error(v),s(K,(v==null?void 0:v.message)??"Erro ao carregar aliança",!0),s(i,null)}finally{s(b,!1)}}function oa(){return!!e(i)&&e(i).members.lengthv.id===n.id?{...v,role:o}:v)},!0),D.success("Cargo atualizado")}catch(v){D.error((v==null?void 0:v.message)??"Falha ao atualizar cargo")}finally{s(b,!1)}}async function la(n){if(e(i)){if(n.id==e(i).ownerId){D.error("Não é possível remover o líder da aliança");return}try{s(b,!0),await G.removeAllianceMember(e(i).id,n.id),s(i,{...e(i),members:e(i).members.filter(o=>o.id!==n.id),membersCount:Math.max(0,e(i).membersCount-1)},!0),D.success("Membro removido")}catch(o){D.error((o==null?void 0:o.message)??"Falha ao remover membro")}finally{s(b,!1)}}}function sa(n){if(!n.lastPixelLatitude||!n.lastPixelLongitude){D.error("Sem registro de último pixel");return}const o=`${vt.url.origin}/?lat=${n.lastPixelLatitude}&lng=${n.lastPixelLongitude}&select=true`;window.open(o,"_blank")}function ia(n){const{hqLatitude:o,hqLongitude:v}=n;if(o==null||v==null){D.error("No coords for HQ");return}const m=`${vt.url.origin}/?lat=${o}&lng=${v}&select=true`;window.open(m,"_blank")}function gt(n){Wt(`/admin/users?id=${n}`)}var Se=no();tr(n=>{Za.title="Wplace - Admin - Alliances"});var De=a(Se),Re=a(De),we=a(Re),Me=a(we),Fe=a(Me),ca=a(Fe,!0);t(Fe);var Te=l(Fe,2);ct(Te),t(Me);var ht=l(Me,2),_e=a(ht);_e.__click=bt;var da=a(_e,!0);t(_e);var ze=l(_e,2);ze.__click=[yn,_,W,ee];var va=a(ze,!0);t(ze),t(ht),t(we);var yt=l(we,2),je=a(yt),_a=a(je,!0);t(je);var ua=l(je,2);{var ba=n=>{var o=wn(),v=l(a(o),2),m=a(v,!0);t(v),t(o),C(T=>c(m,T),[()=>Xt()]),x(n,o)},ma=n=>{var o=fe(),v=ie(o);{var m=p=>{var h=kn(),N=a(h,!0);t(h),C(()=>c(N,e(ee))),x(p,h)},T=p=>{var h=fe(),N=ie(h);{var M=f=>{var g=An(),y=a(g,!0);t(g),C(k=>c(y,k),[()=>Fr()]),x(f,g)},q=f=>{var g=Nn();it(g,21,()=>e(W),y=>y.id,(y,k)=>{var $=Ln();$.__click=[In,ye,k];var z=a($),E=a(z),j=a(E,!0);t(E);var V=l(E,2),Y=a(V);t(V),t(z);var oe=l(z,2),te=a(oe),P=l(te),H=a(P,!0);t(P),t(oe),t($),C((A,ae,O)=>{ce(E,1,`font-semibold ${A??""}`),c(j,e(k).name),c(Y,`#${e(k).id??""}`),c(te,`${ae??""}: `),c(H,O)},[()=>Pe(e(k).id),()=>_t(),()=>e(k).pixelsPainted.toLocaleString("en-US")]),x(y,$)}),t(g),x(f,g)};U(N,f=>{e(W).length===0?f(M):f(q,!1)},!0)}x(p,h)};U(v,p=>{e(ee)?p(m):p(T,!1)},!0)}x(n,o)};U(ua,n=>{e(R)?n(ba):n(ma,!1)})}t(yt),t(Re);var wt=l(Re,2),fa=a(wt);{var pa=n=>{var o=$n(),v=l(a(o),2),m=a(v,!0);t(v),t(o),C(T=>c(m,T),[()=>Xt()]),x(n,o)},xa=n=>{var o=fe(),v=ie(o);{var m=p=>{var h=Pn(),N=a(h,!0);t(h),C(()=>c(N,e(K))),x(p,h)},T=p=>{var h=fe(),N=ie(h);{var M=f=>{var g=Cn(),y=a(g,!0);t(g),C(k=>c(y,k),[()=>jr()]),x(f,g)},q=f=>{var g=fe(),y=ie(g);er(y,()=>e(i).id,k=>{var $=Qn(),z=a($),E=a(z),j=a(E),V=a(j,!0);t(j);var Y=l(j,2),oe=a(Y);t(Y),t(E);var te=l(E,2),P=a(te);P.__click=[pn,i,pe,de];var H=a(P,!0);t(P);var A=l(P,2);A.__click=[xn,i,xe,ve];var ae=a(A,!0);t(A);var O=l(A,2);O.__click=[gn,re];var Ee=a(O,!0);t(O),t(te),t(z);var Be=l(z,2),qe=a(Be),ka=a(qe,!0);t(qe);var It=l(qe,2),Aa=a(It,!0);t(It),t(Be);var Ue=l(Be,2),He=a(Ue),Oe=a(He),Ia=a(Oe,!0);t(Oe);var Lt=l(Oe,2),Nt=a(Lt);Gt(Nt,{class:"size-8 border",get userId(){return e(i).ownerId},pictureUrl:void 0});var Qe=l(Nt,2);Qe.__click=[Sn,i,gt];var La=a(Qe,!0);t(Qe),t(Lt),t(He);var We=l(He,2),$t=l(a(We),2),Na=a($t);{var $a=w=>{var u=Rn(),I=ie(u),B=a(I);t(I);var Q=l(I,2);Q.__click=[Dn,ia,i];var X=a(Q);Jt(X,{class:"size-4"});var Z=l(X);t(Q),C(le=>{c(B,`Lat: ${e(i).hqLatitude??""}, Lng: ${e(i).hqLongitude??""}`),c(Z,` ${le??""}`)},[()=>Vt()]),x(w,u)},Pa=w=>{var u=Mn(),I=a(u,!0);t(u),C(B=>c(I,B),[()=>Vr()]),x(w,u)};U(Na,w=>{e(i).hqLatitude!=null&&e(i).hqLongitude!=null?w($a):w(Pa,!1)})}t($t),t(We);var Pt=l(We,2),Ye=a(Pt),Ca=a(Ye,!0);t(Ye);var Ct=l(Ye,2),Sa=a(Ct,!0);t(Ct),t(Pt),t(Ue);var St=l(Ue,2),Ge=a(St),Je=a(Ge),Ke=a(Je),Da=a(Ke,!0);t(Ke);var Dt=l(Ke,2),Rt=l(a(Dt)),Ra=a(Rt,!0);t(Rt),t(Dt),t(Je);var Mt=l(Je,2),ke=a(Mt);ke.__click=[Fn,i,ye];var Ft=a(ke);ur(Ft,{class:"size-4"});var Ma=l(Ft);t(ke),t(Mt),t(Ge);var Ve=l(Ge,2),Tt=a(Ve),Xe=a(Tt),zt=a(Xe),Ze=l(a(zt)),Fa=a(Ze,!0);t(Ze);var et=l(Ze),Ta=a(et,!0);t(et);var tt=l(et),za=a(tt,!0);t(tt);var at=l(tt),ja=a(at,!0);t(at);var jt=l(at),Ea=a(jt,!0);t(jt),t(zt),t(Xe);var Et=l(Xe),Bt=a(Et);it(Bt,17,()=>e(i).members,w=>w.id,(w,u)=>{var I=qn(),B=a(I),Q=a(B);{let st=$e(()=>e(u).picture??void 0);Gt(Q,{class:"size-8 border",get userId(){return e(u).id},get pictureUrl(){return e(st)}})}t(B);var X=l(B),Z=a(X);Z.__click=[Tn,gt,u];var le=a(Z),Ae=l(le),rt=a(Ae);t(Ae),t(Z),t(X);var ue=l(X),nt=a(ue,!0);t(ue);var be=l(ue),se=a(be);se.__click=[zn,sa,u];var Ie=a(se);Jt(Ie,{class:"size-4"});var ot=l(Ie);t(se),t(be);var me=l(be),qt=a(me),Le=a(qt);Le.__click=[jn,xt,u];var lt=l(Le,2);lt.__click=[En,xt,u],t(qt),t(me);var Ut=l(me),Ne=a(Ut);Ne.__click=[Bn,la,u];var Oa=a(Ne,!0);t(Ne),t(Ut),t(I),C((st,Qa,Wa,Ya)=>{ce(Z,1,`link font-semibold ${st??""}`),c(le,`${e(u).name??""} `),c(rt,`#${e(u).id??""}`),c(nt,Qa),se.disabled=!e(u).lastPixelLatitude||!e(u).lastPixelLongitude,c(ot,` ${Wa??""}`),ce(Le,1,`btn btn-xs join-item w-16 ${e(u).role==="member"?"btn-primary":"btn-outline"}`),Le.disabled=e(b)||e(u).role==="member",ce(lt,1,`btn btn-xs join-item w-16 ${e(u).role==="admin"?"btn-primary":"btn-outline"}`),lt.disabled=e(b)||e(u).role==="admin",Ne.disabled=e(b),c(Oa,Ya)},[()=>Pe(e(u).id),()=>e(u).pixelsPainted.toLocaleString("en-US"),()=>Vt(),()=>rn()]),x(w,I)});var Ba=l(Bt);{var qa=w=>{var u=Un(),I=a(u),B=a(I,!0);t(I),t(u),C(Q=>c(B,Q),[()=>ln()]),x(w,u)};U(Ba,w=>{e(i).members.length===0&&w(qa)})}t(Et),t(Tt),t(Ve);var Ua=l(Ve,2);{var Ha=w=>{var u=On(),I=a(u);I.__click=[Hn,mt];var B=a(I,!0);t(I),t(u),C(Q=>{I.disabled=e(b),c(B,Q)},[()=>wr()]),x(w,u)};U(Ua,w=>{e(na)&&w(Ha)})}t(St),t($),C((w,u,I,B,Q,X,Z,le,Ae,rt,ue,nt,be,se,Ie,ot,me)=>{ce(j,1,`text-lg font-semibold ${w??""}`),c(V,e(i).name),ce(Y,1,`badge badge-sm ml-1 border-0 ${u??""} ${I??""}`),c(oe,`#${e(i).id??""}`),P.disabled=e(b),c(H,B),A.disabled=e(b),c(ae,Q),O.disabled=e(b),c(Ee,X),c(ka,Z),c(Aa,e(i).description??"—"),c(Ia,le),c(La,e(i).ownerName??`#${e(i).ownerId}`),c(Ca,Ae),c(Sa,rt),c(Da,ue),c(Ra,e(i).membersCount),ke.disabled=e(b),c(Ma,` ${nt??""}`),c(Fa,be),c(Ta,se),c(za,Ie),c(ja,ot),c(Ea,me)},[()=>Pe(e(i).id),()=>kr(e(i).id),()=>Pe(e(i).id),()=>qr(),()=>ea(),()=>ta(),()=>_r(),()=>Gr(),()=>_t(),()=>e(i).pixelsPainted.toLocaleString("en-US"),()=>fr(),()=>br(),()=>pr(),()=>_t(),()=>xr(),()=>hr(),()=>en()]),Ot(1,$,()=>Zt,()=>({duration:120})),Ot(2,$,()=>Zt,()=>({duration:80})),x(k,$)}),x(f,g)};U(N,f=>{e(i)?f(q,!1):f(M)},!0)}x(p,h)};U(v,p=>{e(K)?p(m):p(T,!1)},!0)}x(n,o)};U(fa,n=>{e(b)&&!e(i)?n(pa):n(xa,!1)})}t(wt),t(De);var kt=l(De,2);{var ga=n=>{var o=Jn(),v=a(o),m=a(v),T=a(m,!0);t(m);var p=l(m,2),h=a(p);ct(h),h.__keydown=[Wn,ft],t(p);var N=l(p,2),M=a(N);M.__click=[Yn,de];var q=a(M,!0);t(M);var f=l(M,2);f.__click=ft;var g=a(f,!0);t(f),t(N),t(v);var y=l(v,2);y.__click=[Gn,de],t(o),C((k,$,z)=>{c(T,k),M.disabled=e(b),c(q,$),f.disabled=e(b),c(g,z)},[()=>dn(),()=>ut(),()=>Kt()]),dt(h,()=>e(pe),k=>s(pe,k)),x(n,o)};U(kt,n=>{e(de)&&n(ga)})}var At=l(kt,2);{var ha=n=>{var o=Zn(),v=a(o),m=a(v),T=a(m,!0);t(m);var p=l(m,2),h=a(p,!0);t(p);var N=l(p,2),M=a(N);ct(M),M.__keydown=[Kn,pt],t(N);var q=l(N,2),f=a(q);f.__click=[Vn,ve];var g=a(f,!0);t(f);var y=l(f,2);y.__click=pt;var k=a(y,!0);t(y),t(q),t(v);var $=l(v,2);$.__click=[Xn,ve],t(o),C((z,E,j,V)=>{c(T,z),c(h,E),f.disabled=e(b),c(g,j),y.disabled=e(b),c(k,V)},[()=>ea(),()=>un(),()=>ut(),()=>Kt()]),dt(M,()=>e(xe),z=>s(xe,z)),x(n,o)};U(At,n=>{e(ve)&&n(ha)})}var ya=l(At,2);{var wa=n=>{var o=ro(),v=a(o),m=a(v),T=a(m,!0);t(m);var p=l(m,2),h=a(p,!0);t(p);var N=l(p,2),M=a(N),q=a(M),f=a(q,!0);t(q);var g=l(q,2),y=a(g);y.value=y.__value="";var k=l(y);it(k,17,()=>aa,P=>P.value,(P,H)=>{var A=eo(),ae=a(A,!0);t(A);var O={};C(()=>{c(ae,e(H).label),O!==(O=e(H).value)&&(A.value=(A.__value=e(H).value)??"")}),x(P,A)}),t(g),t(M),t(N);var $=l(N,2),z=a($);{let P=$e(()=>dr()),H=$e(()=>e(ne)==="doxxing"?20:5);cr(z,{class:"h-24 rounded-lg",name:"notes",get placeholder(){return e(P)},max:2056,get min(){return e(H)},get value(){return e(ge)},set value(A){s(ge,A,!0)},get validate(){return e(Ce)},set validate(A){s(Ce,A,!0)}})}t($);var E=l($,2),j=a(E);j.__click=[to,re];var V=a(j,!0);t(j);var Y=l(j,2);Y.__click=[hn,i,ne,Ce,b,ge,ye,re];var oe=a(Y,!0);t(Y),t(E),t(v);var te=l(v,2);te.__click=[ao,re],t(o),C((P,H,A,ae,O,Ee)=>{c(T,P),c(h,H),c(f,A),Qt(g,"aria-label",ae),j.disabled=e(b),c(V,O),Y.disabled=e(b)||!e(ne),c(oe,Ee)},[()=>ta(),()=>fn(),()=>Yt(),()=>Yt(),()=>ut(),()=>mr()]),ar(g,()=>e(ne),P=>s(ne,P)),x(n,o)};U(ya,n=>{e(re)&&n(wa)})}t(Se),C((n,o,v,m,T)=>{c(ca,n),Qt(Te,"placeholder",o),_e.disabled=e(R),c(da,v),c(va,m),c(_a,T)},[()=>Lr(),()=>Pr(),()=>yr(),()=>gr(),()=>Dr()]),Va("submit",we,n=>{n.preventDefault(),bt()}),dt(Te,()=>e(_),n=>s(_,n)),x(d,Se),Xa()}Ga(["click","keydown"]);export{Ro as component}; diff --git a/frontend-backup/_app/immutable/nodes/8.BbOUPQlW.js b/frontend-backup/_app/immutable/nodes/8.BbOUPQlW.js new file mode 100644 index 0000000..bc04736 --- /dev/null +++ b/frontend-backup/_app/immutable/nodes/8.BbOUPQlW.js @@ -0,0 +1,433 @@ +import "../chunks/Ch2Ub8FX.js"; +import { o as Oe } from "../chunks/DoL3ojdE.js"; +import { + at as je, + p as Be, + av as Le, + y as be, + g as s, + au as B, + aw as y, + f as m, + d as t, + s as i, + t as u, + b as n, + c as ze, + $ as Me, + r as e, + ay as L, + a as z, +} from "../chunks/CMvZtFtm.js"; +import { s as l } from "../chunks/DVA6u9-7.js"; +import { i as k } from "../chunks/BF50aS-j.js"; +import { e as ne, i as de } from "../chunks/CXkjfmFU.js"; +import { h as Ge } from "../chunks/P77cUGnY.js"; +import { r as He } from "../chunks/C5yqZvKC.js"; +import { a as Ne } from "../chunks/Dpga8uG-.js"; +import { g as We } from "../chunks/CyB--sFG.js"; +import { a as ue } from "../chunks/BRM3t761.js"; +import { R as Ye } from "../chunks/m3o6lEf1.js"; +import { g as ge } from "../chunks/CV9xcpLq.js"; +import { o as qe } from "../chunks/BpoSU4rb.js"; +import { c as Ce } from "../chunks/CVa8RI1g.js"; +import { l as me } from "../chunks/BHI5vujT.js"; +import { n as xe } from "../chunks/Blc0Ir5M.js"; +import { e as Fe } from "../chunks/CmhsLcKe.js"; +(function () { + try { + var f = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + f.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var f = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + p = new f.Error().stack; + p && + ((f._sentryDebugIds = f._sentryDebugIds || {}), + (f._sentryDebugIds[p] = "e51441df-36bf-46a6-b46f-8e262c981114"), + (f._sentryDebugIdIdentifier = + "sentry-dbid-e51441df-36bf-46a6-b46f-8e262c981114")); + })(); +} catch {} +const Je = () => "Select all", + Ke = () => "Selecionar tudo", + Pe = (f = {}, p = {}) => ((p.locale ?? ge()) === "en" ? Je() : Ke()), + Qe = () => "Open reports", + Ue = () => "Reports abertos", + Ve = (f = {}, p = {}) => ((p.locale ?? ge()) === "en" ? Qe() : Ue()); +var Xe = (f, p) => p(!0), + Ze = (f, p) => p(!1), + $e = m( + '' + ), + et = m( + '
                      ' + ), + tt = m('

                      '), + at = m( + '
                      ' + ), + rt = m( + '
                      Total
                      ' + ), + st = m('

                      '), + ot = m( + '
                      ' + ), + lt = m('

                      '), + it = m( + '
                      ' + ), + nt = m( + '
                      Total
                      ' + ), + dt = m('

                      '), + vt = m( + '

                      ' + ); +function Et(f, p) { + Be(p, !0); + let w = B(!0), + A = B(null), + O = B(null), + M = B(null); + const j = [ + { key: "doxxing", label: "Doxxing" }, + { key: "inappropriate_content", label: "Inappropriate" }, + { key: "hate_speech", label: "Hate Speech" }, + { key: "bot", label: "Bot" }, + { key: "other", label: "Other" }, + { key: "griefing", label: "Griefing" }, + ]; + let T = Le({ + doxxing: !0, + inappropriate_content: !0, + hate_speech: !0, + bot: !0, + other: !0, + griefing: !0, + }), + J = B(0), + K = B(0); + be(() => { + const a = s(O); + if (!a) { + y(J, 0); + return; + } + let r = 0; + for (const o of j) T[o.key] && (r += a[o.key]); + y(J, r, !0); + }), + be(() => { + const a = s(M); + if (!a) { + y(K, 0); + return; + } + let r = 0; + for (const o of j) T[o.key] && (r += a[o.key]); + y(K, r, !0); + }); + async function ve() { + try { + y(w, !0), + y(A, null), + y(O, await ue.getOpenTicketsSummary(), !0), + y(M, await ue.getOpenReportsSummary(), !0); + } catch (a) { + a.status === 403 || a.status === 401 + ? We("/404") + : y(A, (a == null ? void 0 : a.message) ?? Fe(), !0), + y(O, null); + } finally { + y(w, !1); + } + } + Oe(ve); + function ce(a) { + for (const r of j) T[r.key] = a; + } + var P = vt(); + Ge((a) => { + Me.title = "FurryPlace - Admin Dashboard"; + }); + var Q = t(P), + U = t(Q), + ye = t(U, !0); + e(U); + var fe = i(U, 2), + q = t(fe); + q.__click = [Xe, ce]; + var he = t(q, !0); + e(q); + var C = i(q, 2); + C.__click = [Ze, ce]; + var ke = t(C, !0); + e(C); + var F = i(C, 2); + F.__click = ve; + var we = t(F); + Ye(we, { class: "size-4" }), e(F), e(fe), e(Q); + var V = i(Q, 2); + ne( + V, + 21, + () => j, + de, + (a, r) => { + var o = $e(), + _ = t(o); + He(_); + var h = i(_, 2), + d = t(h, !0); + e(h), + e(o), + u(() => l(d, s(r).label)), + Ne( + _, + () => T[s(r).key], + (v) => (T[s(r).key] = v) + ), + n(a, o); + } + ), + e(V); + var X = i(V, 2), + Te = t(X); + { + var Se = (a) => { + var r = et(), + o = i(t(r), 2), + _ = t(o, !0); + e(o), e(r), u((h) => l(_, h), [() => me()]), n(a, r); + }, + De = (a) => { + var r = L(), + o = z(r); + { + var _ = (d) => { + var v = tt(), + S = t(v, !0); + e(v), u(() => l(S, s(A))), n(d, v); + }, + h = (d) => { + var v = L(), + S = z(v); + { + var $ = (b) => { + var c = rt(), + x = t(c), + g = t(x), + G = i(t(g), 2), + te = t(G, !0); + e(G), e(g); + var H = i(g, 2), + ae = t(H); + e(H), e(x); + var N = i(x, 2); + ne( + N, + 21, + () => j, + de, + (re, D) => { + var W = L(), + se = z(W); + { + var oe = (I) => { + var R = at(), + E = t(R), + le = t(E, !0); + e(E); + var Y = i(E, 2), + ie = t(Y, !0); + e(Y), + e(R), + u(() => { + l(le, s(D).label), l(ie, s(O)[s(D).key]); + }), + n(I, R); + }; + k(se, (I) => { + T[s(D).key] && I(oe); + }); + } + n(re, W); + } + ), + e(N), + e(c), + u(() => { + l(te, s(J)), + l(ae, `Base: ${s(O).total_open_tickets ?? ""}`); + }), + n(b, c); + }, + ee = (b) => { + var c = st(), + x = t(c, !0); + e(c), u((g) => l(x, g), [() => xe()]), n(b, c); + }; + k( + S, + (b) => { + s(O) ? b($) : b(ee, !1); + }, + !0 + ); + } + n(d, v); + }; + k( + o, + (d) => { + s(A) ? d(_) : d(h, !1); + }, + !0 + ); + } + n(a, r); + }; + k(Te, (a) => { + s(w) ? a(Se) : a(De, !1); + }); + } + e(X); + var pe = i(X, 2), + Z = t(pe), + _e = t(Z), + Ie = t(_e, !0); + e(_e), e(Z); + var Re = i(Z, 2); + { + var Ee = (a) => { + var r = ot(), + o = i(t(r), 2), + _ = t(o, !0); + e(o), e(r), u((h) => l(_, h), [() => me()]), n(a, r); + }, + Ae = (a) => { + var r = L(), + o = z(r); + { + var _ = (d) => { + var v = lt(), + S = t(v, !0); + e(v), u(() => l(S, s(A))), n(d, v); + }, + h = (d) => { + var v = L(), + S = z(v); + { + var $ = (b) => { + var c = nt(), + x = t(c), + g = t(x), + G = i(t(g), 2), + te = t(G, !0); + e(G), e(g); + var H = i(g, 2), + ae = t(H); + e(H), e(x); + var N = i(x, 2); + ne( + N, + 21, + () => j, + de, + (re, D) => { + var W = L(), + se = z(W); + { + var oe = (I) => { + var R = it(), + E = t(R), + le = t(E, !0); + e(E); + var Y = i(E, 2), + ie = t(Y, !0); + e(Y), + e(R), + u(() => { + l(le, s(D).label), l(ie, s(M)[s(D).key]); + }), + n(I, R); + }; + k(se, (I) => { + T[s(D).key] && I(oe); + }); + } + n(re, W); + } + ), + e(N), + e(c), + u(() => { + l(te, s(K)), + l(ae, `Base: ${s(M).total_open_reports ?? ""}`); + }), + n(b, c); + }, + ee = (b) => { + var c = dt(), + x = t(c, !0); + e(c), u((g) => l(x, g), [() => xe()]), n(b, c); + }; + k( + S, + (b) => { + s(M) ? b($) : b(ee, !1); + }, + !0 + ); + } + n(d, v); + }; + k( + o, + (d) => { + s(A) ? d(_) : d(h, !1); + }, + !0 + ); + } + n(a, r); + }; + k(Re, (a) => { + s(w) ? a(Ee) : a(Ae, !1); + }); + } + e(pe), + e(P), + u( + (a, r, o, _) => { + l(ye, a), l(he, r), l(ke, o), (F.disabled = s(w)), l(Ie, _); + }, + [() => qe(), () => Pe(), () => Ce(), () => Ve()] + ), + n(f, P), + ze(); +} +je(["click"]); +export { Et as component }; diff --git a/frontend-backup/_app/immutable/nodes/8.DIMn846h.js b/frontend-backup/_app/immutable/nodes/8.DIMn846h.js deleted file mode 100644 index 406ae53..0000000 --- a/frontend-backup/_app/immutable/nodes/8.DIMn846h.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/B2cHk4HI.js";import{o as Oe}from"../chunks/4WsUhDWi.js";import{at as je,p as Be,av as Le,y as be,g as s,au as B,aw as y,f as m,d as t,s as i,t as u,b as n,c as ze,$ as Me,r as e,ay as L,a as z}from"../chunks/BDALf20I.js";import{s as l}from"../chunks/4k6DpCgf.js";import{i as k}from"../chunks/Bke_korE.js";import{e as ne,i as de}from"../chunks/CZW2bcQi.js";import{h as Ge}from"../chunks/BUhRjcOt.js";import{r as He}from"../chunks/BNZUboE0.js";import{a as Ne}from"../chunks/DS58drb5.js";import{g as We}from"../chunks/B4HM4TqG.js";import{a as ue}from"../chunks/DffDvEhl.js";import{R as Ye}from"../chunks/rLj4C5Bn.js";import{g as ge}from"../chunks/DklPLC_x.js";import{o as qe}from"../chunks/GVP1MJz5.js";import{c as Ce}from"../chunks/hLPYzGnf.js";import{l as me}from"../chunks/BMfwGdZU.js";import{n as xe}from"../chunks/DFzO1c4b.js";import{e as Fe}from"../chunks/ChoU6b3z.js";(function(){try{var p=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};p.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var p=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new p.Error().stack;f&&(p._sentryDebugIds=p._sentryDebugIds||{},p._sentryDebugIds[f]="80a014d2-358c-4d0f-a3b5-f111523645d8",p._sentryDebugIdIdentifier="sentry-dbid-80a014d2-358c-4d0f-a3b5-f111523645d8")})()}catch{}const Je=()=>"Select all",Ke=()=>"Selecionar tudo",Pe=(p={},f={})=>(f.locale??ge())==="en"?Je():Ke(),Qe=()=>"Open reports",Ue=()=>"Reports abertos",Ve=(p={},f={})=>(f.locale??ge())==="en"?Qe():Ue();var Xe=(p,f)=>f(!0),Ze=(p,f)=>f(!1),$e=m(''),et=m('
                      '),tt=m('

                      '),at=m('
                      '),rt=m('
                      Total
                      '),st=m('

                      '),ot=m('
                      '),lt=m('

                      '),it=m('
                      '),nt=m('
                      Total
                      '),dt=m('

                      '),vt=m('

                      ');function Et(p,f){Be(f,!0);let w=B(!0),A=B(null),O=B(null),M=B(null);const j=[{key:"doxxing",label:"Doxxing"},{key:"inappropriate_content",label:"Inappropriate"},{key:"hate_speech",label:"Hate Speech"},{key:"bot",label:"Bot"},{key:"other",label:"Other"},{key:"griefing",label:"Griefing"}];let T=Le({doxxing:!0,inappropriate_content:!0,hate_speech:!0,bot:!0,other:!0,griefing:!0}),J=B(0),K=B(0);be(()=>{const a=s(O);if(!a){y(J,0);return}let r=0;for(const o of j)T[o.key]&&(r+=a[o.key]);y(J,r,!0)}),be(()=>{const a=s(M);if(!a){y(K,0);return}let r=0;for(const o of j)T[o.key]&&(r+=a[o.key]);y(K,r,!0)});async function ve(){try{y(w,!0),y(A,null),y(O,await ue.getOpenTicketsSummary(),!0),y(M,await ue.getOpenReportsSummary(),!0)}catch(a){a.status===403||a.status===401?We("/404"):y(A,(a==null?void 0:a.message)??Fe(),!0),y(O,null)}finally{y(w,!1)}}Oe(ve);function ce(a){for(const r of j)T[r.key]=a}var P=vt();Ge(a=>{Me.title="Wplace - Admin Dashboard"});var Q=t(P),U=t(Q),ye=t(U,!0);e(U);var pe=i(U,2),q=t(pe);q.__click=[Xe,ce];var he=t(q,!0);e(q);var C=i(q,2);C.__click=[Ze,ce];var ke=t(C,!0);e(C);var F=i(C,2);F.__click=ve;var we=t(F);Ye(we,{class:"size-4"}),e(F),e(pe),e(Q);var V=i(Q,2);ne(V,21,()=>j,de,(a,r)=>{var o=$e(),_=t(o);He(_);var h=i(_,2),d=t(h,!0);e(h),e(o),u(()=>l(d,s(r).label)),Ne(_,()=>T[s(r).key],v=>T[s(r).key]=v),n(a,o)}),e(V);var X=i(V,2),Te=t(X);{var Se=a=>{var r=et(),o=i(t(r),2),_=t(o,!0);e(o),e(r),u(h=>l(_,h),[()=>me()]),n(a,r)},De=a=>{var r=L(),o=z(r);{var _=d=>{var v=tt(),S=t(v,!0);e(v),u(()=>l(S,s(A))),n(d,v)},h=d=>{var v=L(),S=z(v);{var $=b=>{var c=rt(),x=t(c),g=t(x),G=i(t(g),2),te=t(G,!0);e(G),e(g);var H=i(g,2),ae=t(H);e(H),e(x);var N=i(x,2);ne(N,21,()=>j,de,(re,D)=>{var W=L(),se=z(W);{var oe=I=>{var R=at(),E=t(R),le=t(E,!0);e(E);var Y=i(E,2),ie=t(Y,!0);e(Y),e(R),u(()=>{l(le,s(D).label),l(ie,s(O)[s(D).key])}),n(I,R)};k(se,I=>{T[s(D).key]&&I(oe)})}n(re,W)}),e(N),e(c),u(()=>{l(te,s(J)),l(ae,`Base: ${s(O).total_open_tickets??""}`)}),n(b,c)},ee=b=>{var c=st(),x=t(c,!0);e(c),u(g=>l(x,g),[()=>xe()]),n(b,c)};k(S,b=>{s(O)?b($):b(ee,!1)},!0)}n(d,v)};k(o,d=>{s(A)?d(_):d(h,!1)},!0)}n(a,r)};k(Te,a=>{s(w)?a(Se):a(De,!1)})}e(X);var fe=i(X,2),Z=t(fe),_e=t(Z),Ie=t(_e,!0);e(_e),e(Z);var Re=i(Z,2);{var Ee=a=>{var r=ot(),o=i(t(r),2),_=t(o,!0);e(o),e(r),u(h=>l(_,h),[()=>me()]),n(a,r)},Ae=a=>{var r=L(),o=z(r);{var _=d=>{var v=lt(),S=t(v,!0);e(v),u(()=>l(S,s(A))),n(d,v)},h=d=>{var v=L(),S=z(v);{var $=b=>{var c=nt(),x=t(c),g=t(x),G=i(t(g),2),te=t(G,!0);e(G),e(g);var H=i(g,2),ae=t(H);e(H),e(x);var N=i(x,2);ne(N,21,()=>j,de,(re,D)=>{var W=L(),se=z(W);{var oe=I=>{var R=it(),E=t(R),le=t(E,!0);e(E);var Y=i(E,2),ie=t(Y,!0);e(Y),e(R),u(()=>{l(le,s(D).label),l(ie,s(M)[s(D).key])}),n(I,R)};k(se,I=>{T[s(D).key]&&I(oe)})}n(re,W)}),e(N),e(c),u(()=>{l(te,s(K)),l(ae,`Base: ${s(M).total_open_reports??""}`)}),n(b,c)},ee=b=>{var c=dt(),x=t(c,!0);e(c),u(g=>l(x,g),[()=>xe()]),n(b,c)};k(S,b=>{s(M)?b($):b(ee,!1)},!0)}n(d,v)};k(o,d=>{s(A)?d(_):d(h,!1)},!0)}n(a,r)};k(Re,a=>{s(w)?a(Ee):a(Ae,!1)})}e(fe),e(P),u((a,r,o,_)=>{l(ye,a),l(he,r),l(ke,o),F.disabled=s(w),l(Ie,_)},[()=>qe(),()=>Pe(),()=>Ce(),()=>Ve()]),n(p,P),ze()}je(["click"]);export{Et as component}; diff --git a/frontend-backup/_app/immutable/nodes/9.BhPlDH9q.js b/frontend-backup/_app/immutable/nodes/9.BhPlDH9q.js deleted file mode 100644 index 4cce919..0000000 --- a/frontend-backup/_app/immutable/nodes/9.BhPlDH9q.js +++ /dev/null @@ -1 +0,0 @@ -import"../chunks/B2cHk4HI.js";import"../chunks/cUtKXcx3.js";import{$ as o}from"../chunks/BDALf20I.js";import{h as d}from"../chunks/BUhRjcOt.js";import"../chunks/DklPLC_x.js";import"../chunks/B4HM4TqG.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"35111e7039e8c68cc677344b7f7c6971567f6820"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="491631c0-f691-4b05-9eaf-88edf584d98a",e._sentryDebugIdIdentifier="sentry-dbid-491631c0-f691-4b05-9eaf-88edf584d98a")})()}catch{}function s(e){d(n=>{o.title="Wplace - Admin - Mods Dashboard"})}export{s as component}; diff --git a/frontend-backup/_app/immutable/nodes/9.Cn-noR6e.js b/frontend-backup/_app/immutable/nodes/9.Cn-noR6e.js new file mode 100644 index 0000000..57cc696 --- /dev/null +++ b/frontend-backup/_app/immutable/nodes/9.Cn-noR6e.js @@ -0,0 +1,47 @@ +import "../chunks/Ch2Ub8FX.js"; +import "../chunks/BOREeBzQ.js"; +import { $ as n } from "../chunks/CMvZtFtm.js"; +import { h as o } from "../chunks/P77cUGnY.js"; +import "../chunks/CV9xcpLq.js"; +import "../chunks/CyB--sFG.js"; +(function () { + try { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}; + e.SENTRY_RELEASE = { id: "9ccec90dcd6b8d85831cf2b37643f1564d033383" }; + } catch {} +})(); +try { + (function () { + var e = + typeof window < "u" + ? window + : typeof global < "u" + ? global + : typeof globalThis < "u" + ? globalThis + : typeof self < "u" + ? self + : {}, + d = new e.Error().stack; + d && + ((e._sentryDebugIds = e._sentryDebugIds || {}), + (e._sentryDebugIds[d] = "491631c0-f691-4b05-9eaf-88edf584d98a"), + (e._sentryDebugIdIdentifier = + "sentry-dbid-491631c0-f691-4b05-9eaf-88edf584d98a")); + })(); +} catch {} +function s(e) { + o((d) => { + n.title = "FurryPlace - Admin - Mods Dashboard"; + }); +} +export { s as component }; diff --git a/frontend-backup/_app/info.js b/frontend-backup/_app/info.js deleted file mode 100644 index 0d17423..0000000 --- a/frontend-backup/_app/info.js +++ /dev/null @@ -1,302 +0,0 @@ -// Modal content configuration -// This file fetches content from the backend API and patches modals dynamically -window.WPLACE_INFO = { - // Default fallback content (used if API fails) - modal: { - overview: { - title_en: "Overview", - title_zh: "概述", - videoUrl: "https://www.youtube.com/embed/xOXtd-WzRxA?si=fHz8Z6ecXGYrDhkN" - }, - paintFaster: { - title_en: "How to paint faster", - title_zh: "如何画得更快?", - mobile_en: "When painting, click on the button on the top right corner of the screen. This will lock the screen but it'll also enable painting by moving your finger over the map.", - mobile_zh: "在绘制时候按住按钮屏幕右上角。这将锁定屏幕,但也可以通过在地图上移动手指来绘画.", - desktop_en: "Hold SPACE and move your cursor over the map.", - desktop_zh: "按住空格并且移动鼠标." - }, - mapLagging: { - title_en: "My map is lagging", - title_zh: "地图卡顿", - text_en: "Follow the instructions to enable hardware acceleration:", - text_zh: "请按照说明启用硬件加速:", - link: "https://help.constructiononline.com/en/scheduling-webgl-and-hardware-acceleration" - }, - rules: { - title_en: "Rules", - title_zh: "规则", - badge_en: "Important", - badge_zh: "重要", - items: [ - { text_en: "📜 All users are responsible for the content they post. The platform reserves the right of final interpretation.", text_zh: "📜 所有用户对其发布的内容负责。平台保留最终解释权。" }, - { text_en: "🛑 Any violation may result in immediate removal of content and permanent ban of the account", text_zh: "🛑 任何违规行为可能导致内容立即删除和账户永久封禁" }, - { text_en: "😈 Do not paint over other artworks using random colors or patterns just to mess things up", text_zh: "😈 请勿使用随机颜色或图案覆盖其他作品" }, - { text_en: "🙅 Disclosing other's personal information is not allowed", text_zh: "🙅 不允许泄露他人个人信息" } - ], - footer_en: "Violations of these rules may result in suspension of your account.", - footer_zh: "违反会导致你被封禁。" - }, - footer: { - email: "contact@wplace.live", - discord: { url: "https://discord.gg/ZRC4DnP9Z2", text_en: "Feedback and bugs", text_zh: "反馈和错误报告" }, - github: { url: "https://github.com/openplaceteam", text_en: "Github", text_zh: "Github" }, - instagram: { url: "https://www.instagram.com/wplace.live/", text_en: "Instagram", text_zh: "Instagram" }, - terms: { url: "https://wplace.live/terms/terms-of-service", text_en: "Terms", text_zh: "条款" }, - privacy: { url: "https://wplace.live/terms/privacy", text_en: "Privacy", text_zh: "隐私" } - } - }, - - // Loaded content from API - loadedContent: {}, - contentLoaded: false -}; - -// Function to get current locale -function getCurrentLocale() { - return localStorage.getItem('locale') || 'en'; -} - -// Function to load content from API -async function loadContentFromAPI() { - try { - const locale = getCurrentLocale(); - const response = await fetch(`/api/site-content?locale=${locale}`); - - if (!response.ok) { - console.warn('[WPLACE_INFO] Failed to load content from API, using defaults'); - return false; - } - - const data = await response.json(); - window.WPLACE_INFO.loadedContent = data.content || {}; - window.WPLACE_INFO.contentLoaded = true; - - console.log('[WPLACE_INFO] Content loaded from API:', Object.keys(window.WPLACE_INFO.loadedContent).length, 'items'); - return true; - } catch (error) { - console.error('[WPLACE_INFO] Error loading content from API:', error); - return false; - } -} - -// Helper function to get value from API content or fallback -function getContent(key, locale = 'en') { - const apiKey = key; - - // Try to get from loaded API content first - if (window.WPLACE_INFO.contentLoaded && window.WPLACE_INFO.loadedContent[apiKey]) { - return window.WPLACE_INFO.loadedContent[apiKey]; - } - - // Fallback to hardcoded defaults - const keys = key.split('.'); - let obj = window.WPLACE_INFO.modal; - - for (let i = 1; i < keys.length; i++) { // Skip 'modal' prefix - obj = obj[keys[i]]; - if (!obj) return ''; - } - - // Try localized version first - const localizedKey = keys[keys.length - 1] + '_' + locale; - if (obj && obj[localizedKey]) return obj[localizedKey]; - - return obj || ''; -} - -// Function to parse rule items from API content -function getRuleItems(locale = 'en') { - const items = []; - let index = 0; - - while (true) { - const item = getContent(`modal.rules.item.${index}`, locale); - if (!item) break; - items.push(item); - index++; - } - - // Fallback to default if no items found - if (items.length === 0 && window.WPLACE_INFO.modal.rules.items) { - return window.WPLACE_INFO.modal.rules.items.map(i => i['text_' + locale] || i.text_en); - } - - return items; -} - -// Function to patch the info modal -function patchInfoModal(modal) { - const locale = getCurrentLocale(); - - // Find the modal content container - const modalBox = modal.querySelector('.modal-box.sm\\:max-w-5xl'); - if (!modalBox) return; - - // Check if this is the info/welcome modal - const hasLogo = modalBox.querySelector('img[alt*="logo" i]'); - const hasOverview = modalBox.textContent.includes('Overview') || modalBox.textContent.includes('概述'); - - if (!hasLogo && !hasOverview) return; - - console.log('[WPLACE_INFO] Patching info modal with custom content'); - - // Find all sections and update them - const sections = modalBox.querySelectorAll('section'); - - sections.forEach(section => { - // Patch "How to paint faster" section - const paintFasterTitle = section.querySelector('h3'); - if (paintFasterTitle && (paintFasterTitle.textContent.includes('paint faster') || paintFasterTitle.textContent.includes('画得更快'))) { - paintFasterTitle.textContent = getContent('modal.paintFaster.title', locale); - - const mobileText = section.querySelector('.not-touchscreen\\:hidden'); - if (mobileText) { - const textNodes = Array.from(mobileText.childNodes).filter(n => n.nodeType === 3); - textNodes.forEach(node => { - if (node.textContent.trim()) { - node.textContent = getContent('modal.paintFaster.mobile', locale); - } - }); - } - - const desktopText = section.querySelector('.touchscreen\\:hidden'); - if (desktopText) { - const textNodes = Array.from(desktopText.childNodes).filter(n => n.nodeType === 3); - textNodes.forEach(node => { - if (node.textContent.trim()) { - node.textContent = getContent('modal.paintFaster.desktop', locale); - } - }); - } - } - - // Patch "My map is lagging" section - const laggingTitle = section.querySelector('h3'); - if (laggingTitle && (laggingTitle.textContent.includes('lagging') || laggingTitle.textContent.includes('卡顿'))) { - laggingTitle.textContent = getContent('modal.mapLagging.title', locale); - - const text = section.querySelector('p'); - if (text) { - const link = text.querySelector('a'); - if (link) { - link.href = getContent('modal.mapLagging.link', locale); - text.childNodes.forEach(node => { - if (node.nodeType === 3 && node.textContent.trim()) { - node.textContent = getContent('modal.mapLagging.text', locale) + ' '; - } - }); - } - } - } - - // Patch Rules section - const rulesHeader = section.querySelector('h3'); - if (rulesHeader && (rulesHeader.textContent.includes('Rules') || rulesHeader.textContent.includes('规则'))) { - rulesHeader.textContent = getContent('modal.rules.title', locale); - - const badge = rulesHeader.querySelector('.badge'); - if (badge) badge.textContent = getContent('modal.rules.badge', locale); - - const rulesList = section.querySelector('ul'); - if (rulesList) { - const ruleItems = rulesList.querySelectorAll('li'); - const contentItems = getRuleItems(locale); - - ruleItems.forEach((item, index) => { - if (contentItems[index]) { - item.textContent = contentItems[index]; - } - }); - } - - const footer = section.querySelector('p.text-base-content\\/80'); - if (footer) { - footer.textContent = getContent('modal.rules.footer', locale); - } - } - }); - - // Patch footer links - const footerSection = modalBox.querySelector('section.text-center:last-of-type'); - if (footerSection) { - const emailLink = footerSection.querySelector('a[href^="mailto:"]'); - if (emailLink) { - const email = getContent('modal.footer.email', locale); - emailLink.href = 'mailto:' + email; - } - - const termsLink = footerSection.querySelector('a[href*="terms-of-service"], a[href*="terms"]'); - if (termsLink) { - termsLink.href = getContent('modal.footer.terms.url', locale); - const termsText = getContent('modal.footer.terms.text', locale); - if (termsText) termsLink.textContent = termsText; - } - - const privacyLink = footerSection.querySelector('a[href*="privacy"]'); - if (privacyLink) { - privacyLink.href = getContent('modal.footer.privacy.url', locale); - const privacyText = getContent('modal.footer.privacy.text', locale); - if (privacyText) privacyLink.textContent = privacyText; - } - - const discordLinks = footerSection.querySelectorAll('a[href*="discord"]'); - discordLinks.forEach(link => { - link.href = getContent('modal.footer.discord.url', locale); - }); - - const githubLink = footerSection.querySelector('a[href*="github"]'); - if (githubLink) { - githubLink.href = getContent('modal.footer.github.url', locale); - } - - const instagramLink = footerSection.querySelector('a[href*="instagram"]'); - if (instagramLink) { - instagramLink.href = getContent('modal.footer.instagram.url', locale); - } - } - - // Patch video URL - const iframe = modalBox.querySelector('iframe[src*="youtube"]'); - if (iframe) { - const videoUrl = getContent('modal.overview.videoUrl', locale); - if (videoUrl) iframe.src = videoUrl; - } -} - -// Use MutationObserver to watch for modal being added to DOM -const observer = new MutationObserver((mutations) => { - mutations.forEach((mutation) => { - mutation.addedNodes.forEach((node) => { - if (node.nodeType === 1) { - if (node.matches && node.matches('dialog.modal')) { - patchInfoModal(node); - } else if (node.querySelectorAll) { - const modals = node.querySelectorAll('dialog.modal'); - modals.forEach(modal => patchInfoModal(modal)); - } - } - }); - }); -}); - -// Initialize on page load -(async function() { - 'use strict'; - - // Load content from API - await loadContentFromAPI(); - - // Start observing when DOM is ready - if (document.readyState === 'loading') { - document.addEventListener('DOMContentLoaded', () => { - observer.observe(document.body, { childList: true, subtree: true }); - document.querySelectorAll('dialog.modal').forEach(modal => patchInfoModal(modal)); - }); - } else { - observer.observe(document.body, { childList: true, subtree: true }); - document.querySelectorAll('dialog.modal').forEach(modal => patchInfoModal(modal)); - } - - console.log('[WPLACE_INFO] Monkey patch initialized'); -})(); diff --git a/frontend-backup/_app/version.json b/frontend-backup/_app/version.json index 23c16ca..f87077c 100644 --- a/frontend-backup/_app/version.json +++ b/frontend-backup/_app/version.json @@ -1,3 +1,3 @@ { - "version": "1759175263375" -} \ No newline at end of file + "version": "1759353996237" +} diff --git a/frontend-backup/admin/index.html b/frontend-backup/admin.html similarity index 51% rename from frontend-backup/admin/index.html rename to frontend-backup/admin.html index 3cd2441..8d1b828 100644 --- a/frontend-backup/admin/index.html +++ b/frontend-backup/admin.html @@ -1,4 +1,3 @@ - @@ -6,60 +5,60 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - Wplace - Admin Dashboard + + + + + + + + + + + + + + + + + + + + + + + + + + + + FurryPlace - Admin Dashboard - + - + - + - - + + - + - - - + + -

                      Dashboard

                      Admin dashboard content

                      +

                      Dashboard

                      Admin dashboard content

                      - - diff --git a/frontend-backup/css2.css b/frontend-backup/css2.css deleted file mode 100644 index 9bbf474..0000000 --- a/frontend-backup/css2.css +++ /dev/null @@ -1,108 +0,0 @@ -/* cyrillic-ext */ -@font-face { - font-family: 'Roboto Mono'; - font-style: italic; - font-weight: 100 700; - font-display: swap; - src: url(https://fonts.gstatic.com/s/robotomono/v31/L0x7DF4xlVMF-BfR8bXMIjhOm3CWWpCBC10HFw.woff2) format('woff2'); - unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; -} -/* cyrillic */ -@font-face { - font-family: 'Roboto Mono'; - font-style: italic; - font-weight: 100 700; - font-display: swap; - src: url(https://fonts.gstatic.com/s/robotomono/v31/L0x7DF4xlVMF-BfR8bXMIjhOm3mWWpCBC10HFw.woff2) format('woff2'); - unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; -} -/* greek */ -@font-face { - font-family: 'Roboto Mono'; - font-style: italic; - font-weight: 100 700; - font-display: swap; - src: url(https://fonts.gstatic.com/s/robotomono/v31/L0x7DF4xlVMF-BfR8bXMIjhOm36WWpCBC10HFw.woff2) format('woff2'); - unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; -} -/* vietnamese */ -@font-face { - font-family: 'Roboto Mono'; - font-style: italic; - font-weight: 100 700; - font-display: swap; - src: url(https://fonts.gstatic.com/s/robotomono/v31/L0x7DF4xlVMF-BfR8bXMIjhOm3KWWpCBC10HFw.woff2) format('woff2'); - unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; -} -/* latin-ext */ -@font-face { - font-family: 'Roboto Mono'; - font-style: italic; - font-weight: 100 700; - font-display: swap; - src: url(https://fonts.gstatic.com/s/robotomono/v31/L0x7DF4xlVMF-BfR8bXMIjhOm3OWWpCBC10HFw.woff2) format('woff2'); - unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; -} -/* latin */ -@font-face { - font-family: 'Roboto Mono'; - font-style: italic; - font-weight: 100 700; - font-display: swap; - src: url(https://fonts.gstatic.com/s/robotomono/v31/L0x7DF4xlVMF-BfR8bXMIjhOm32WWpCBC10.woff2) format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} -/* cyrillic-ext */ -@font-face { - font-family: 'Roboto Mono'; - font-style: normal; - font-weight: 100 700; - font-display: swap; - src: url(https://fonts.gstatic.com/s/robotomono/v31/L0x5DF4xlVMF-BfR8bXMIjhGq3-cXbKDO1w.woff2) format('woff2'); - unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; -} -/* cyrillic */ -@font-face { - font-family: 'Roboto Mono'; - font-style: normal; - font-weight: 100 700; - font-display: swap; - src: url(https://fonts.gstatic.com/s/robotomono/v31/L0x5DF4xlVMF-BfR8bXMIjhPq3-cXbKDO1w.woff2) format('woff2'); - unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; -} -/* greek */ -@font-face { - font-family: 'Roboto Mono'; - font-style: normal; - font-weight: 100 700; - font-display: swap; - src: url(https://fonts.gstatic.com/s/robotomono/v31/L0x5DF4xlVMF-BfR8bXMIjhIq3-cXbKDO1w.woff2) format('woff2'); - unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; -} -/* vietnamese */ -@font-face { - font-family: 'Roboto Mono'; - font-style: normal; - font-weight: 100 700; - font-display: swap; - src: url(https://fonts.gstatic.com/s/robotomono/v31/L0x5DF4xlVMF-BfR8bXMIjhEq3-cXbKDO1w.woff2) format('woff2'); - unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; -} -/* latin-ext */ -@font-face { - font-family: 'Roboto Mono'; - font-style: normal; - font-weight: 100 700; - font-display: swap; - src: url(https://fonts.gstatic.com/s/robotomono/v31/L0x5DF4xlVMF-BfR8bXMIjhFq3-cXbKDO1w.woff2) format('woff2'); - unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; -} -/* latin */ -@font-face { - font-family: 'Roboto Mono'; - font-style: normal; - font-weight: 100 700; - font-display: swap; - src: url(https://fonts.gstatic.com/s/robotomono/v31/L0x5DF4xlVMF-BfR8bXMIjhLq3-cXbKD.woff2) format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} diff --git a/frontend-backup/download.png b/frontend-backup/download.png deleted file mode 100644 index 83d23f6..0000000 Binary files a/frontend-backup/download.png and /dev/null differ diff --git a/frontend-backup/download.svg b/frontend-backup/download.svg deleted file mode 100644 index 751b034..0000000 --- a/frontend-backup/download.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/frontend-backup/img/apple-touch-icon.png b/frontend-backup/img/apple-touch-icon.png new file mode 100644 index 0000000..de23d26 Binary files /dev/null and b/frontend-backup/img/apple-touch-icon.png differ diff --git a/frontend-backup/img/favicon-96x96.png b/frontend-backup/img/favicon-96x96.png new file mode 100644 index 0000000..6d63c57 Binary files /dev/null and b/frontend-backup/img/favicon-96x96.png differ diff --git a/frontend-backup/img/logo-512x512.png b/frontend-backup/img/logo-512x512.png new file mode 100644 index 0000000..b1b1431 Binary files /dev/null and b/frontend-backup/img/logo-512x512.png differ diff --git a/frontend-backup/img/logo.png b/frontend-backup/img/logo.png new file mode 100644 index 0000000..2c4cd52 Binary files /dev/null and b/frontend-backup/img/logo.png differ diff --git a/frontend-backup/img/og-image-mobile.png b/frontend-backup/img/og-image-mobile.png new file mode 100644 index 0000000..ebed6d6 Binary files /dev/null and b/frontend-backup/img/og-image-mobile.png differ diff --git a/frontend-backup/img/og-image.png b/frontend-backup/img/og-image.png index 02eb56e..9fdff0e 100644 Binary files a/frontend-backup/img/og-image.png and b/frontend-backup/img/og-image.png differ diff --git a/frontend-backup/img/pwa-country-leaderboard-mobile.png b/frontend-backup/img/pwa-country-leaderboard-mobile.png new file mode 100644 index 0000000..bb8faba Binary files /dev/null and b/frontend-backup/img/pwa-country-leaderboard-mobile.png differ diff --git a/frontend-backup/img/pwa-kiev-mobile.png b/frontend-backup/img/pwa-kiev-mobile.png new file mode 100644 index 0000000..0b07847 Binary files /dev/null and b/frontend-backup/img/pwa-kiev-mobile.png differ diff --git a/frontend-backup/img/pwa-paint-heart-mobile.png b/frontend-backup/img/pwa-paint-heart-mobile.png new file mode 100644 index 0000000..91f64eb Binary files /dev/null and b/frontend-backup/img/pwa-paint-heart-mobile.png differ diff --git a/frontend-backup/img/pwa-void-mobile.png b/frontend-backup/img/pwa-void-mobile.png new file mode 100644 index 0000000..865fa83 Binary files /dev/null and b/frontend-backup/img/pwa-void-mobile.png differ diff --git a/frontend-backup/img/web-app-manifest-192x192.png b/frontend-backup/img/web-app-manifest-192x192.png index a6fddf3..3ab466f 100644 Binary files a/frontend-backup/img/web-app-manifest-192x192.png and b/frontend-backup/img/web-app-manifest-192x192.png differ diff --git a/frontend-backup/img/web-app-manifest-512x512.png b/frontend-backup/img/web-app-manifest-512x512.png new file mode 100644 index 0000000..e2e7bfe Binary files /dev/null and b/frontend-backup/img/web-app-manifest-512x512.png differ diff --git a/frontend-backup/index.html b/frontend-backup/index.html index 2126343..a9700a3 100644 --- a/frontend-backup/index.html +++ b/frontend-backup/index.html @@ -1,103 +1,132 @@ - - - - + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - openplace - Paint the world + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + FurryPlace - Paint the world - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - + + + + + - + +
                      - - - + + diff --git a/frontend-backup/join.html b/frontend-backup/join.html new file mode 100644 index 0000000..44ed8fe --- /dev/null +++ b/frontend-backup/join.html @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + FurryPlace - Alliance invite + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      + + +
                      + + + + diff --git a/frontend-backup/login.html b/frontend-backup/login.html deleted file mode 100644 index bc7557e..0000000 --- a/frontend-backup/login.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - Login - openplace - - - - - - - - diff --git a/frontend-backup/maps/styles/fiord b/frontend-backup/maps/styles/fiord index 1b1762c..f0661bd 100644 --- a/frontend-backup/maps/styles/fiord +++ b/frontend-backup/maps/styles/fiord @@ -2198,7 +2198,7 @@ "city" ], [ - "\u003E", + ">", [ "get", "rank" @@ -2290,7 +2290,7 @@ [ "all", [ - "\u003C=", + "<=", [ "get", "rank" @@ -2573,7 +2573,7 @@ "country" ], [ - "\u003E=", + ">=", [ "get", "rank" @@ -2674,7 +2674,7 @@ false ], [ - "\u003C=", + "<=", [ "get", "rank" diff --git a/frontend-backup/moderation.html b/frontend-backup/moderation.html new file mode 100644 index 0000000..36cbac7 --- /dev/null +++ b/frontend-backup/moderation.html @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + FurryPlace - Moderation + + + + + + + + + + + + + + + + + + + + + + + + + + + +

                      Reported users

                      Open tickets:
                      Closed reports: 0
                      Ignored: 0
                      Timeouts: 0
                      Bans: 0
                      Closed tickets: 0
                      + + +
                      + + + + diff --git a/frontend-backup/moderation/index.html b/frontend-backup/moderation/index.html deleted file mode 100644 index 550285b..0000000 --- a/frontend-backup/moderation/index.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Wplace - Moderation - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

                      Reported users

                      Open tickets:
                      Closed reports: 0
                      Ignored: 0
                      Timeouts: 0
                      Bans: 0
                      Closed tickets: 0
                      - - -
                      - - - - diff --git a/frontend-backup/offline.html b/frontend-backup/offline.html new file mode 100644 index 0000000..252f75f --- /dev/null +++ b/frontend-backup/offline.html @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + FurryPlace - No internet connection + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      Wplace logo FurryPlace

                      No internet connection

                      + + +
                      + + + + diff --git a/frontend-backup/payment/success.html b/frontend-backup/payment/success.html new file mode 100644 index 0000000..c11fc87 --- /dev/null +++ b/frontend-backup/payment/success.html @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + FurryPlace - Payment succeeded + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      Wplace logo FurryPlace

                      Payment succeeded!

                      Thank you for your support!

                      Go to map
                      + + +
                      + + + + diff --git a/frontend-backup/profile-picture.html b/frontend-backup/profile-picture.html new file mode 100644 index 0000000..4fe10ee --- /dev/null +++ b/frontend-backup/profile-picture.html @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      + + +
                      + + + + diff --git a/frontend-backup/service-worker.js b/frontend-backup/service-worker.js index 21e1622..4a4c775 100644 --- a/frontend-backup/service-worker.js +++ b/frontend-backup/service-worker.js @@ -1,705 +1,695 @@ -const ae = "files", - a = location.pathname.split("/").slice(0, -1).join("/"), - ne = [a + "/_app/immutable/entry/app.iDaujbEI.js", a + "/_app/immutable/nodes/0.CnnlsrhC.js", a + "/_app/immutable/assets/0.CmqRY0au.css", a + "/_app/immutable/assets/Geist-cyrillic.CHSlOQsW.woff2", a + "/_app/immutable/assets/Geist-latin-ext.DMtmJ5ZE.woff2", a + "/_app/immutable/assets/Geist-latin.Dg_dQHbK.woff2", a + "/_app/immutable/assets/GeistMono-cyrillic.BZdD_g9V.woff2", a + "/_app/immutable/assets/GeistMono-latin-ext.b6lpi8_2.woff2", a + "/_app/immutable/assets/GeistMono-latin.Cjtb1TV-.woff2", a + "/_app/immutable/assets/PixelifySans-cyrillic.CPPz0Qvd.woff2", a + "/_app/immutable/assets/PixelifySans-latin.vdc2vUDH.woff2", a + "/_app/immutable/assets/NotoColorEmoji-flags.ClvgErYz.woff2", a + "/_app/immutable/assets/flags.a2kmUSbF.webp", a + "/_app/immutable/assets/flags@2x.gR6KPp3x.webp", a + "/_app/immutable/nodes/1.DpC5h7KA.js", a + "/_app/immutable/nodes/10.C07JyVXo.js", a + "/_app/immutable/nodes/11.BVmrEev1.js", a + "/_app/immutable/assets/9.BD1hRFPA.css", a + "/_app/immutable/nodes/2.BY7SdjrD.js", a + "/_app/immutable/assets/2.BtKF873c.css", a + "/_app/immutable/nodes/3.DVSEiJTt.js", a + "/_app/immutable/nodes/4.CeYpVeIo.js", a + "/_app/immutable/nodes/5.CXeQMqhf.js", a + "/_app/immutable/nodes/6.DD7Zmm97.js", a + "/_app/immutable/nodes/7.DDuBPi09.js", a + "/_app/immutable/nodes/8.B8sOtsfv.js", a + "/_app/immutable/nodes/9.BQE9fbrM.js", a + "/_app/immutable/chunks/07L1R_bo.js", a + "/_app/immutable/chunks/1lh-LSvX.js", a + "/_app/immutable/chunks/1mTheT_N.js", a + "/_app/immutable/chunks/2CRhGZHc.js", a + "/_app/immutable/chunks/5NasrULQ.js", a + "/_app/immutable/chunks/B1GmkH4o.js", a + "/_app/immutable/chunks/BMKgGW48.js", a + "/_app/immutable/chunks/BtP6pfnb.js", a + "/_app/immutable/chunks/ByKBPM-D.js", a + "/_app/immutable/chunks/Bzak7iHL.js", a + "/_app/immutable/chunks/C5GsJ62f.js", a + "/_app/immutable/chunks/CBqzI9hL.js", a + "/_app/immutable/assets/ProfileAvatarWithLevel.6dmPRSfx.css", a + "/_app/immutable/chunks/CMs8vKjq.js", a + "/_app/immutable/chunks/CQklNc9N.js", a + "/_app/immutable/assets/LoginForm.CxMG0irz.css", a + "/_app/immutable/chunks/CeLr1p76.js", a + "/_app/immutable/chunks/Cp3o644A.js", a + "/_app/immutable/chunks/D1ivTjwA.js", a + "/_app/immutable/chunks/D2m5UD3G.js", a + "/_app/immutable/assets/notification.CPyrWqU1.mp3", a + "/_app/immutable/chunks/D35KiPL1.js", a + "/_app/immutable/chunks/DUoKDNpf.js", a + "/_app/immutable/chunks/DkBFL3pa.js", a + "/_app/immutable/chunks/Dp1pzeXC.js", a + "/_app/immutable/chunks/DsJqb9ei.js", a + "/_app/immutable/chunks/F0pgzfyy.js", a + "/_app/immutable/chunks/KvV259my.js", a + "/_app/immutable/chunks/U908S-6f.js", a + "/_app/immutable/chunks/Y9es74tr.js", a + "/_app/immutable/chunks/g8c1BvYP.js", a + "/_app/immutable/entry/start.CJ_UwIBa.js", a + "/_app/immutable/chunks/1FgtjJRR.js"], - ie = [a + "/.well-known/security.txt", a + "/26/2025/08/12/horse.png", a + "/favicon.ico", a + "/img/apple-touch-icon.png", a + "/img/favicon-96x96.png", a + "/img/logo-512x512.png", a + "/img/logo.png", a + "/img/og-image-mobile.png", a + "/img/og-image.png", a + "/img/pwa-country-leaderboard-mobile.png", a + "/img/pwa-kiev-mobile.png", a + "/img/pwa-paint-heart-mobile.png", a + "/img/pwa-void-mobile.png", a + "/img/web-app-manifest-192x192.png", a + "/img/web-app-manifest-512x512.png", a + "/site.webmanifest"], - oe = "1756230503892"; -let r; -const J = typeof TextDecoder < "u" ? new TextDecoder("utf-8", { - ignoreBOM: !0, - fatal: !0 -}) : { - decode: () => { - throw Error("TextDecoder not available") - } -}; -typeof TextDecoder < "u" && J.decode(); -let S = null; - -function K() { - return (S === null || S.byteLength === 0) && (S = new Uint8Array(r.memory.buffer)), S +const ae = "/files", + e = location.pathname.split("/").slice(0, -1).join("/"), + ne = [ + e + "/_app/immutable/entry/app.DTM8GXam.js", + e + "/_app/immutable/nodes/0.D5b7oOw2.js", + e + "/_app/immutable/assets/0.0xfYb4uv.css", + e + "/_app/immutable/assets/pawtect_wasm_bg.BvxCe1S1.wasm", + e + "/_app/immutable/assets/Geist-cyrillic.CHSlOQsW.woff2", + e + "/_app/immutable/assets/Geist-latin-ext.DMtmJ5ZE.woff2", + e + "/_app/immutable/assets/Geist-latin.Dg_dQHbK.woff2", + e + "/_app/immutable/assets/GeistMono-cyrillic.BZdD_g9V.woff2", + e + "/_app/immutable/assets/GeistMono-latin-ext.b6lpi8_2.woff2", + e + "/_app/immutable/assets/GeistMono-latin.Cjtb1TV-.woff2", + e + "/_app/immutable/assets/PixelifySans-cyrillic.CPPz0Qvd.woff2", + e + "/_app/immutable/assets/PixelifySans-latin.vdc2vUDH.woff2", + e + "/_app/immutable/assets/NotoColorEmoji-flags.ClvgErYz.woff2", + e + "/_app/immutable/assets/flags.a2kmUSbF.webp", + e + "/_app/immutable/assets/flags@2x.gR6KPp3x.webp", + e + "/_app/immutable/nodes/1.BMc-PacL.js", + e + "/_app/immutable/nodes/10.DqbXhTAj.js", + e + "/_app/immutable/nodes/11.C3Fd3lks.js", + e + "/_app/immutable/nodes/12.B7-BJxmw.js", + e + "/_app/immutable/nodes/13.DbQSn9aq.js", + e + "/_app/immutable/nodes/14.ClqwdR4T.js", + e + "/_app/immutable/nodes/15.D6A8EYfF.js", + e + "/_app/immutable/nodes/16.DTKQOukW.js", + e + "/_app/immutable/nodes/17.CONNNOye.js", + e + "/_app/immutable/nodes/18.24JvCqRi.js", + e + "/_app/immutable/assets/18.BD1hRFPA.css", + e + "/_app/immutable/nodes/19.B2QYN1F_.js", + e + "/_app/immutable/nodes/2.-6emjql3.js", + e + "/_app/immutable/nodes/20.LCTNv26D.js", + e + "/_app/immutable/nodes/21.zScYLJw9.js", + e + "/_app/immutable/nodes/3.DOMAwJeg.js", + e + "/_app/immutable/nodes/4.CrDfIbdR.js", + e + "/_app/immutable/assets/4.BtKF873c.css", + e + "/_app/immutable/nodes/5.cZCL4YVE.js", + e + "/_app/immutable/nodes/6.WPRvZASS.js", + e + "/_app/immutable/nodes/7.ACRjrnuj.js", + e + "/_app/immutable/nodes/8.BbOUPQlW.js", + e + "/_app/immutable/nodes/9.Cn-noR6e.js", + e + "/_app/immutable/chunks/0wx1llIh.js", + e + "/_app/immutable/chunks/B6ZK_HZO.js", + e + "/_app/immutable/chunks/BA2Qx8r3.js", + e + "/_app/immutable/assets/ProfileAvatarWithLevel.6dmPRSfx.css", + e + "/_app/immutable/chunks/BBgyHb-Z.js", + e + "/_app/immutable/chunks/BF50aS-j.js", + e + "/_app/immutable/chunks/BFFUopoM.js", + e + "/_app/immutable/chunks/BHI5vujT.js", + e + "/_app/immutable/chunks/BI7eddl7.js", + e + "/_app/immutable/chunks/BKioTOWR.js", + e + "/_app/immutable/chunks/BOREeBzQ.js", + e + "/_app/immutable/chunks/BRM3t761.js", + e + "/_app/immutable/chunks/BSXXHLQ0.js", + e + "/_app/immutable/chunks/Blc0Ir5M.js", + e + "/_app/immutable/chunks/Bn0Xcwmn.js", + e + "/_app/immutable/assets/LoginForm.CxMG0irz.css", + e + "/_app/immutable/chunks/BpoSU4rb.js", + e + "/_app/immutable/chunks/BsOIMr0T.js", + e + "/_app/immutable/chunks/C0GlPMrk.js", + e + "/_app/immutable/assets/notification.CPyrWqU1.mp3", + e + "/_app/immutable/chunks/C3E1P42D.js", + e + "/_app/immutable/chunks/C4yB2Gnm.js", + e + "/_app/immutable/chunks/C5yqZvKC.js", + e + "/_app/immutable/chunks/CHGjpGz-.js", + e + "/_app/immutable/chunks/CMvZtFtm.js", + e + "/_app/immutable/chunks/CV9xcpLq.js", + e + "/_app/immutable/chunks/CVa8RI1g.js", + e + "/_app/immutable/chunks/CXkjfmFU.js", + e + "/_app/immutable/chunks/CZlv7MYe.js", + e + "/_app/immutable/chunks/CdTXrPIO.js", + e + "/_app/immutable/chunks/CgCA7Awo.js", + e + "/_app/immutable/chunks/Ch2Ub8FX.js", + e + "/_app/immutable/chunks/CmhsLcKe.js", + e + "/_app/immutable/chunks/Cqwd83E5.js", + e + "/_app/immutable/chunks/CyB--sFG.js", + e + "/_app/immutable/chunks/D3yDgRbd.js", + e + "/_app/immutable/chunks/D3yaN7Zl.js", + e + "/_app/immutable/chunks/DBSOMMI_.js", + e + "/_app/immutable/chunks/DCynssDD.js", + e + "/_app/immutable/chunks/DLfdYhzo.js", + e + "/_app/immutable/chunks/DTFgqBF9.js", + e + "/_app/immutable/chunks/DVA6u9-7.js", + e + "/_app/immutable/chunks/Dmqg20ho.js", + e + "/_app/immutable/chunks/DoL3ojdE.js", + e + "/_app/immutable/chunks/DouSnzU9.js", + e + "/_app/immutable/chunks/Dpga8uG-.js", + e + "/_app/immutable/chunks/Dt3xBOvm.js", + e + "/_app/immutable/chunks/DueIxFLX.js", + e + "/_app/immutable/chunks/LGRbXsL1.js", + e + "/_app/immutable/chunks/P77cUGnY.js", + e + "/_app/immutable/chunks/Z_72d8Vp.js", + e + "/_app/immutable/chunks/g9MKNE1A.js", + e + "/_app/immutable/chunks/lE0oaQc5.js", + e + "/_app/immutable/chunks/m3o6lEf1.js", + e + "/_app/immutable/chunks/wZ7b5CwQ.js", + e + "/_app/immutable/entry/start.cg9kNiPJ.js", + e + "/_app/immutable/chunks/yW7U80iv.js", + ], + ie = [ + e + "/.well-known/security.txt", + e + "/26/2025/08/12/horse.png", + e + "/favicon.ico", + e + "/img/apple-touch-icon.png", + e + "/img/favicon-96x96.png", + e + "/img/logo-512x512.png", + e + "/img/logo.png", + e + "/img/og-image-mobile.png", + e + "/img/og-image.png", + e + "/img/pwa-country-leaderboard-mobile.png", + e + "/img/pwa-kiev-mobile.png", + e + "/img/pwa-paint-heart-mobile.png", + e + "/img/pwa-void-mobile.png", + e + "/img/web-app-manifest-192x192.png", + e + "/img/web-app-manifest-512x512.png", + e + "/site.webmanifest", + ], + te = "1759353996237"; +let c; +const z = + typeof TextDecoder < "u" + ? new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }) + : { + decode: () => { + throw Error("TextDecoder not available"); + }, + }; +typeof TextDecoder < "u" && z.decode(); +let k = null; +function F() { + return ( + (k === null || k.byteLength === 0) && (k = new Uint8Array(c.memory.buffer)), + k + ); } - -function te(e, n) { - return e = e >>> 0, J.decode(K().subarray(e, e + n)) +function oe(a, n) { + return (a = a >>> 0), z.decode(F().subarray(a, a + n)); } let C = null; - function de() { - return (C === null || C.byteLength === 0) && (C = new Uint8ClampedArray(r.memory.buffer)), C + return ( + (C === null || C.byteLength === 0) && + (C = new Uint8ClampedArray(c.memory.buffer)), + C + ); } - -function le(e, n) { - return e = e >>> 0, de().subarray(e / 1, e / 1 + n) +function le(a, n) { + return (a = a >>> 0), de().subarray(a / 1, a / 1 + n); } const b = new Array(128).fill(void 0); b.push(void 0, null, !0, !1); -let D = b.length; - -function se(e) { - D === b.length && b.push(b.length + 1); - const n = D; - return D = b[n], b[n] = e, n +let M = b.length; +function se(a) { + M === b.length && b.push(b.length + 1); + const n = M; + return (M = b[n]), (b[n] = a), n; } let U = 0; - -function q(e, n) { - const i = n(e.length * 1, 1) >>> 0; - return K().set(e, i / 1), U = e.length, i +function q(a, n) { + const i = n(a.length * 1, 1) >>> 0; + return F().set(a, i / 1), (U = a.length), i; } -let M = null; - +let S = null; function H() { - return (M === null || M.byteLength === 0) && (M = new Int32Array(r.memory.buffer)), M + return ( + (S === null || S.byteLength === 0) && (S = new Int32Array(c.memory.buffer)), + S + ); } - -function ce(e, n) { - return e = e >>> 0, K().subarray(e / 1, e / 1 + n) +function me(a, n) { + return (a = a >>> 0), F().subarray(a / 1, a / 1 + n); } - -function re(e, n, i) { - try { - const m = r.__wbindgen_add_to_stack_pointer(-16), - y = q(e, r.__wbindgen_malloc), - t = U; - r.encode(m, y, t, n, i); - var l = H()[m / 4 + 0], - s = H()[m / 4 + 1], - u = ce(l, s).slice(); - return r.__wbindgen_free(l, s * 1, 1), u - } finally { - r.__wbindgen_add_to_stack_pointer(16) - } +function ce(a, n, i) { + try { + const r = c.__wbindgen_add_to_stack_pointer(-16), + w = q(a, c.__wbindgen_malloc), + o = U; + c.encode(r, w, o, n, i); + var l = H()[r / 4 + 0], + s = H()[r / 4 + 1], + u = me(l, s).slice(); + return c.__wbindgen_free(l, s * 1, 1), u; + } finally { + c.__wbindgen_add_to_stack_pointer(16); + } } - -function me(e) { - return b[e] +function re(a) { + return b[a]; } - -function ge(e) { - e < 132 || (b[e] = D, D = e) +function ge(a) { + a < 132 || ((b[a] = M), (M = a)); } - -function fe(e) { - const n = me(e); - return ge(e), n +function fe(a) { + const n = re(a); + return ge(a), n; } - -function ue(e) { - const n = q(e, r.__wbindgen_malloc), - i = U, - l = r.decode(n, i); - return fe(l) +function ue(a) { + const n = q(a, c.__wbindgen_malloc), + i = U, + l = c.decode(n, i); + return fe(l); } -async function pe(e, n) { - if (typeof Response == "function" && e instanceof Response) { - if (typeof WebAssembly.instantiateStreaming == "function") try { - return await WebAssembly.instantiateStreaming(e, n) - } catch (l) { - if (e.headers.get("Content-Type") != "application/wasm") console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", l); - else throw l - } - const i = await e.arrayBuffer(); - return await WebAssembly.instantiate(i, n) - } else { - const i = await WebAssembly.instantiate(e, n); - return i instanceof WebAssembly.Instance ? { - instance: i, - module: e - } : i - } +async function pe(a, n) { + if (typeof Response == "function" && a instanceof Response) { + if (typeof WebAssembly.instantiateStreaming == "function") + try { + return await WebAssembly.instantiateStreaming(a, n); + } catch (l) { + if (a.headers.get("Content-Type") != "application/wasm") + console.warn( + "`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", + l + ); + else throw l; + } + const i = await a.arrayBuffer(); + return await WebAssembly.instantiate(i, n); + } else { + const i = await WebAssembly.instantiate(a, n); + return i instanceof WebAssembly.Instance ? { instance: i, module: a } : i; + } } - function be() { - const e = {}; - return e.wbg = {}, e.wbg.__wbg_newwithownedu8clampedarrayandsh_91db5987993a08fb = function(n, i, l, s) { - var u = le(n, i).slice(); - r.__wbindgen_free(n, i * 1, 1); - const m = new ImageData(u, l >>> 0, s >>> 0); - return se(m) - }, e.wbg.__wbindgen_throw = function(n, i) { - throw new Error(te(n, i)) - }, e + const a = {}; + return ( + (a.wbg = {}), + (a.wbg.__wbg_newwithownedu8clampedarrayandsh_91db5987993a08fb = function ( + n, + i, + l, + s + ) { + var u = le(n, i).slice(); + c.__wbindgen_free(n, i * 1, 1); + const r = new ImageData(u, l >>> 0, s >>> 0); + return se(r); + }), + (a.wbg.__wbindgen_throw = function (n, i) { + throw new Error(oe(n, i)); + }), + a + ); } - -function he(e, n) { - return r = e.exports, F.__wbindgen_wasm_module = n, M = null, S = null, C = null, r +function he(a, n) { + return ( + (c = a.exports), + (K.__wbindgen_wasm_module = n), + (S = null), + (k = null), + (C = null), + c + ); } -async function F(e) { - if (r !== void 0) return r; - const n = be(); - (typeof e == "string" || typeof Request == "function" && e instanceof Request || typeof URL == "function" && e instanceof URL) && (e = fetch(e)); - const { - instance: i, - module: l - } = await pe(await e, n); - return he(i, l) +async function K(a) { + if (c !== void 0) return c; + const n = be(); + (typeof a == "string" || + (typeof Request == "function" && a instanceof Request) || + (typeof URL == "function" && a instanceof URL)) && + (a = fetch(a)); + const { instance: i, module: l } = await pe(await a, n); + return he(i, l); } -const we = globalThis.ServiceWorkerGlobalScope !== void 0, - ye = we && typeof self < "u" && globalThis.caches && globalThis.caches.default !== void 0, - _e = typeof process == "object" && process.release && process.release.name === "node"; -(ye || _e) && (globalThis.ImageData || (globalThis.ImageData = class { - constructor(n, i, l) { - this.data = n, this.width = i, this.height = l - } -}), typeof self < "u" && self.location === void 0 && (self.location = { - href: "" -})); -let j; -async function Se(e) { - return j || (j = F(e)), j +const _e = globalThis.ServiceWorkerGlobalScope !== void 0, + we = + _e && + typeof self < "u" && + globalThis.caches && + globalThis.caches.default !== void 0, + ye = + typeof process == "object" && + process.release && + process.release.name === "node"; +(we || ye) && + (globalThis.ImageData || + (globalThis.ImageData = class { + constructor(n, i, l) { + (this.data = n), (this.width = i), (this.height = l); + } + }), + typeof self < "u" && + self.location === void 0 && + (self.location = { href: "" })); +let R; +async function ke(a) { + return R || (R = K(a)), R; } -async function Ce(e) { - await Se(); - const n = await ue(new Uint8Array(e)); - if (!n) throw new Error("Encoding error."); - return n +async function Ce(a) { + await ke(); + const n = await ue(new Uint8Array(a)); + if (!n) throw new Error("Encoding error."); + return n; } let E; -async function Y(e) { - return E || (E = F(e)), E +async function Y(a) { + return E || (E = K(a)), E; } -async function V(e) { - await Y(); - const n = await re(e.data, e.width, e.height); - if (!n) throw new Error("Encoding error."); - return n.buffer +async function V(a) { + await Y(); + const n = await ce(a.data, a.width, a.height); + if (!n) throw new Error("Encoding error."); + return n.buffer; } -const Me = "" + new URL("_app/immutable/assets/squoosh_png_bg.BsfxGNEB.wasm", location.href).pathname; - -function z({ - pixel: e, - season: n, - tile: i -}) { - return `t=(${i[0]},${i[1]});p=(${e[0]},${e[1]});s=${n}` +const Se = + "" + + new URL("_app/immutable/assets/squoosh_png_bg.BsfxGNEB.wasm", location.href) + .pathname; +function Z({ pixel: a, season: n, tile: i }) { + return `t=(${i[0]},${i[1]});p=(${a[0]},${a[1]});s=${n}`; } -const De = [{ - tileSize: 1e3, - zoom: 11 - }], - ke = 4, - Te = 6e3, - Be = [{ - name: "Transparent", - rgb: [0, 0, 0] - }, { - name: "Black", - rgb: [0, 0, 0] - }, { - name: "Dark Gray", - rgb: [60, 60, 60] - }, { - name: "Gray", - rgb: [120, 120, 120] - }, { - name: "Light Gray", - rgb: [210, 210, 210] - }, { - name: "White", - rgb: [255, 255, 255] - }, { - name: "Deep Red", - rgb: [96, 0, 24] - }, { - name: "Red", - rgb: [237, 28, 36] - }, { - name: "Orange", - rgb: [255, 127, 39] - }, { - name: "Gold", - rgb: [246, 170, 9] - }, { - name: "Yellow", - rgb: [249, 221, 59] - }, { - name: "Light Yellow", - rgb: [255, 250, 188] - }, { - name: "Dark Green", - rgb: [14, 185, 104] - }, { - name: "Green", - rgb: [19, 230, 123] - }, { - name: "Light Green", - rgb: [135, 255, 94] - }, { - name: "Dark Teal", - rgb: [12, 129, 110] - }, { - name: "Teal", - rgb: [16, 174, 166] - }, { - name: "Light Teal", - rgb: [19, 225, 190] - }, { - name: "Dark Blue", - rgb: [40, 80, 158] - }, { - name: "Blue", - rgb: [64, 147, 228] - }, { - name: "Cyan", - rgb: [96, 247, 242] - }, { - name: "Indigo", - rgb: [107, 80, 246] - }, { - name: "Light Indigo", - rgb: [153, 177, 251] - }, { - name: "Dark Purple", - rgb: [120, 12, 153] - }, { - name: "Purple", - rgb: [170, 56, 185] - }, { - name: "Light Purple", - rgb: [224, 159, 249] - }, { - name: "Dark Pink", - rgb: [203, 0, 122] - }, { - name: "Pink", - rgb: [236, 31, 128] - }, { - name: "Light Pink", - rgb: [243, 141, 169] - }, { - name: "Dark Brown", - rgb: [104, 70, 52] - }, { - name: "Brown", - rgb: [149, 104, 42] - }, { - name: "Beige", - rgb: [248, 178, 119] - }, { - name: "Medium Gray", - rgb: [170, 170, 170] - }, { - name: "Dark Red", - rgb: [165, 14, 30] - }, { - name: "Light Red", - rgb: [250, 128, 114] - }, { - name: "Dark Orange", - rgb: [228, 92, 26] - }, { - name: "Light Tan", - rgb: [214, 181, 148] - }, { - name: "Dark Goldenrod", - rgb: [156, 132, 49] - }, { - name: "Goldenrod", - rgb: [197, 173, 49] - }, { - name: "Light Goldenrod", - rgb: [232, 212, 95] - }, { - name: "Dark Olive", - rgb: [74, 107, 58] - }, { - name: "Olive", - rgb: [90, 148, 74] - }, { - name: "Light Olive", - rgb: [132, 197, 115] - }, { - name: "Dark Cyan", - rgb: [15, 121, 159] - }, { - name: "Light Cyan", - rgb: [187, 250, 242] - }, { - name: "Light Blue", - rgb: [125, 199, 255] - }, { - name: "Dark Indigo", - rgb: [77, 49, 184] - }, { - name: "Dark Slate Blue", - rgb: [74, 66, 132] - }, { - name: "Slate Blue", - rgb: [122, 113, 196] - }, { - name: "Light Slate Blue", - rgb: [181, 174, 241] - }, { - name: "Light Brown", - rgb: [219, 164, 99] - }, { - name: "Dark Beige", - rgb: [209, 128, 81] - }, { - name: "Light Beige", - rgb: [255, 197, 165] - }, { - name: "Dark Peach", - rgb: [155, 82, 73] - }, { - name: "Peach", - rgb: [209, 128, 120] - }, { - name: "Light Peach", - rgb: [250, 182, 164] - }, { - name: "Dark Tan", - rgb: [123, 99, 82] - }, { - name: "Tan", - rgb: [156, 132, 107] - }, { - name: "Dark Slate", - rgb: [51, 57, 65] - }, { - name: "Slate", - rgb: [109, 117, 141] - }, { - name: "Light Slate", - rgb: [179, 185, 209] - }, { - name: "Dark Stone", - rgb: [109, 100, 63] - }, { - name: "Stone", - rgb: [148, 140, 107] - }, { - name: "Light Stone", - rgb: [205, 197, 158] - }], - Pe = { - needsPhoneVerification: "needs_phone_verification" - }, - Ie = { - Droplet: {}, - "Max. Charge": {}, - "Paint Charge": {}, - Color: {}, - Flag: {}, - "Profile Picture": {} - }, - Ge = { - 10: { - name: "25,000 Droplets", - price: 500, - isDollar: !0, - lookupKey: "droplets_5", - items: [{ - name: "Droplet", - amount: 25e3 - }] - }, - 20: { - name: "78,750 Droplets", - price: 1500, - isDollar: !0, - lookupKey: "droplets_15", - items: [{ - name: "Droplet", - amount: 76750 - }] - }, - 30: { - name: "165,000 Droplets", - price: 3e3, - isDollar: !0, - lookupKey: "droplets_30", - items: [{ - name: "Droplet", - amount: 165e3 - }] - }, - 40: { - name: "287,500 Droplets", - price: 5e3, - isDollar: !0, - lookupKey: "droplets_50", - items: [{ - name: "Droplet", - amount: 287500 - }] - }, - 50: { - name: "450,000 Droplets", - price: 7500, - isDollar: !0, - lookupKey: "droplets_75", - items: [{ - name: "Droplet", - amount: 45e4 - }] - }, - 60: { - name: "625,000 Droplets", - price: 1e4, - isDollar: !0, - lookupKey: "droplets_100", - items: [{ - name: "Droplet", - amount: 625e3 - }] - }, - 70: { - name: "+5 Max. Charges", - price: 500, - isDollar: !1, - items: [{ - name: "Max. Charge", - amount: 5 - }] - }, - 80: { - name: "+30 Paint Charges", - price: 500, - isDollar: !1, - items: [{ - name: "Paint Charge", - amount: 30 - }] - }, - 100: { - name: "Unlock Color", - price: 2e3, - isDollar: !1, - items: [{ - name: "Color", - amount: 1 - }] - }, - 110: { - name: "Flag", - price: 2e4, - isDollar: !1, - items: [{ - name: "Flag", - amount: 1 - }] - }, - 120: { - name: "Profile Picture", - price: 2e4, - isDollar: !1, - items: [{ - name: "Profile Picture", - amount: 1 - }] - } - }, - Le = JSON.parse(`[{"id":1,"name":"Afghanistan","code":"AF","flag":"🇦🇫"},{"id":2,"name":"Albania","code":"AL","flag":"🇦🇱"},{"id":3,"name":"Algeria","code":"DZ","flag":"🇩🇿"},{"id":4,"name":"American Samoa","code":"AS","flag":"🇦🇸"},{"id":5,"name":"Andorra","code":"AD","flag":"🇦🇩"},{"id":6,"name":"Angola","code":"AO","flag":"🇦🇴"},{"id":7,"name":"Anguilla","code":"AI","flag":"🇦🇮"},{"id":8,"name":"Antarctica","code":"AQ","flag":"🇦🇶"},{"id":9,"name":"Antigua and Barbuda","code":"AG","flag":"🇦🇬"},{"id":10,"name":"Argentina","code":"AR","flag":"🇦🇷"},{"id":11,"name":"Armenia","code":"AM","flag":"🇦🇲"},{"id":12,"name":"Aruba","code":"AW","flag":"🇦🇼"},{"id":13,"name":"Australia","code":"AU","flag":"🇦🇺"},{"id":14,"name":"Austria","code":"AT","flag":"🇦🇹"},{"id":15,"name":"Azerbaijan","code":"AZ","flag":"🇦🇿"},{"id":16,"name":"Bahamas","code":"BS","flag":"🇧🇸"},{"id":17,"name":"Bahrain","code":"BH","flag":"🇧🇭"},{"id":18,"name":"Bangladesh","code":"BD","flag":"🇧🇩"},{"id":19,"name":"Barbados","code":"BB","flag":"🇧🇧"},{"id":20,"name":"Belarus","code":"BY","flag":"🇧🇾"},{"id":21,"name":"Belgium","code":"BE","flag":"🇧🇪"},{"id":22,"name":"Belize","code":"BZ","flag":"🇧🇿"},{"id":23,"name":"Benin","code":"BJ","flag":"🇧🇯"},{"id":24,"name":"Bermuda","code":"BM","flag":"🇧🇲"},{"id":25,"name":"Bhutan","code":"BT","flag":"🇧🇹"},{"id":26,"name":"Bolivia","code":"BO","flag":"🇧🇴"},{"id":27,"name":"Bonaire","code":"BQ","flag":"🇧🇶"},{"id":28,"name":"Bosnia and Herzegovina","code":"BA","flag":"🇧🇦"},{"id":29,"name":"Botswana","code":"BW","flag":"🇧🇼"},{"id":30,"name":"Bouvet Island","code":"BV","flag":"🇧🇻"},{"id":31,"name":"Brazil","code":"BR","flag":"🇧🇷"},{"id":32,"name":"British Indian Ocean Territory","code":"IO","flag":"🇮🇴"},{"id":33,"name":"Brunei Darussalam","code":"BN","flag":"🇧🇳"},{"id":34,"name":"Bulgaria","code":"BG","flag":"🇧🇬"},{"id":35,"name":"Burkina Faso","code":"BF","flag":"🇧🇫"},{"id":36,"name":"Burundi","code":"BI","flag":"🇧🇮"},{"id":37,"name":"Cabo Verde","code":"CV","flag":"🇨🇻"},{"id":38,"name":"Cambodia","code":"KH","flag":"🇰🇭"},{"id":39,"name":"Cameroon","code":"CM","flag":"🇨🇲"},{"id":40,"name":"Canada","code":"CA","flag":"🇨🇦"},{"id":41,"name":"Cayman Islands","code":"KY","flag":"🇰🇾"},{"id":42,"name":"Central African Republic","code":"CF","flag":"🇨🇫"},{"id":43,"name":"Chad","code":"TD","flag":"🇹🇩"},{"id":44,"name":"Chile","code":"CL","flag":"🇨🇱"},{"id":45,"name":"China","code":"CN","flag":"🇨🇳"},{"id":46,"name":"Christmas Island","code":"CX","flag":"🇨🇽"},{"id":47,"name":"Cocos (Keeling) Islands","code":"CC","flag":"🇨🇨"},{"id":48,"name":"Colombia","code":"CO","flag":"🇨🇴"},{"id":49,"name":"Comoros","code":"KM","flag":"🇰🇲"},{"id":50,"name":"Congo","code":"CG","flag":"🇨🇬"},{"id":51,"name":"Cook Islands","code":"CK","flag":"🇨🇰"},{"id":52,"name":"Costa Rica","code":"CR","flag":"🇨🇷"},{"id":53,"name":"Croatia","code":"HR","flag":"🇭🇷"},{"id":54,"name":"Cuba","code":"CU","flag":"🇨🇺"},{"id":55,"name":"Curaçao","code":"CW","flag":"🇨🇼"},{"id":56,"name":"Cyprus","code":"CY","flag":"🇨🇾"},{"id":57,"name":"Czechia","code":"CZ","flag":"🇨🇿"},{"id":58,"name":"Côte d'Ivoire","code":"CI","flag":"🇨🇮"},{"id":59,"name":"Denmark","code":"DK","flag":"🇩🇰"},{"id":60,"name":"Djibouti","code":"DJ","flag":"🇩🇯"},{"id":61,"name":"Dominica","code":"DM","flag":"🇩🇲"},{"id":62,"name":"Dominican Republic","code":"DO","flag":"🇩🇴"},{"id":63,"name":"Ecuador","code":"EC","flag":"🇪🇨"},{"id":64,"name":"Egypt","code":"EG","flag":"🇪🇬"},{"id":65,"name":"El Salvador","code":"SV","flag":"🇸🇻"},{"id":66,"name":"Equatorial Guinea","code":"GQ","flag":"🇬🇶"},{"id":67,"name":"Eritrea","code":"ER","flag":"🇪🇷"},{"id":68,"name":"Estonia","code":"EE","flag":"🇪🇪"},{"id":69,"name":"Eswatini","code":"SZ","flag":"🇸🇿"},{"id":70,"name":"Ethiopia","code":"ET","flag":"🇪🇹"},{"id":71,"name":"Falkland Islands (Malvinas)","code":"FK","flag":"🇫🇰"},{"id":72,"name":"Faroe Islands","code":"FO","flag":"🇫🇴"},{"id":73,"name":"Fiji","code":"FJ","flag":"🇫🇯"},{"id":74,"name":"Finland","code":"FI","flag":"🇫🇮"},{"id":75,"name":"France","code":"FR","flag":"🇫🇷"},{"id":76,"name":"French Guiana","code":"GF","flag":"🇬🇫"},{"id":77,"name":"French Polynesia","code":"PF","flag":"🇵🇫"},{"id":78,"name":"French Southern Territories","code":"TF","flag":"🇹🇫"},{"id":79,"name":"Gabon","code":"GA","flag":"🇬🇦"},{"id":80,"name":"Gambia","code":"GM","flag":"🇬🇲"},{"id":81,"name":"Georgia","code":"GE","flag":"🇬🇪"},{"id":82,"name":"Germany","code":"DE","flag":"🇩🇪"},{"id":83,"name":"Ghana","code":"GH","flag":"🇬🇭"},{"id":84,"name":"Gibraltar","code":"GI","flag":"🇬🇮"},{"id":85,"name":"Greece","code":"GR","flag":"🇬🇷"},{"id":86,"name":"Greenland","code":"GL","flag":"🇬🇱"},{"id":87,"name":"Grenada","code":"GD","flag":"🇬🇩"},{"id":88,"name":"Guadeloupe","code":"GP","flag":"🇬🇵"},{"id":89,"name":"Guam","code":"GU","flag":"🇬🇺"},{"id":90,"name":"Guatemala","code":"GT","flag":"🇬🇹"},{"id":91,"name":"Guernsey","code":"GG","flag":"🇬🇬"},{"id":92,"name":"Guinea","code":"GN","flag":"🇬🇳"},{"id":93,"name":"Guinea-Bissau","code":"GW","flag":"🇬🇼"},{"id":94,"name":"Guyana","code":"GY","flag":"🇬🇾"},{"id":95,"name":"Haiti","code":"HT","flag":"🇭🇹"},{"id":96,"name":"Heard Island and McDonald Islands","code":"HM","flag":"🇭🇲"},{"id":97,"name":"Honduras","code":"HN","flag":"🇭🇳"},{"id":98,"name":"Hong Kong","code":"HK","flag":"🇭🇰"},{"id":99,"name":"Hungary","code":"HU","flag":"🇭🇺"},{"id":100,"name":"Iceland","code":"IS","flag":"🇮🇸"},{"id":101,"name":"India","code":"IN","flag":"🇮🇳"},{"id":102,"name":"Indonesia","code":"ID","flag":"🇮🇩"},{"id":103,"name":"Iran","code":"IR","flag":"🇮🇷"},{"id":104,"name":"Iraq","code":"IQ","flag":"🇮🇶"},{"id":105,"name":"Ireland","code":"IE","flag":"🇮🇪"},{"id":106,"name":"Isle of Man","code":"IM","flag":"🇮🇲"},{"id":107,"name":"Israel","code":"IL","flag":"🇮🇱"},{"id":108,"name":"Italy","code":"IT","flag":"🇮🇹"},{"id":109,"name":"Jamaica","code":"JM","flag":"🇯🇲"},{"id":110,"name":"Japan","code":"JP","flag":"🇯🇵"},{"id":111,"name":"Jersey","code":"JE","flag":"🇯🇪"},{"id":112,"name":"Jordan","code":"JO","flag":"🇯🇴"},{"id":113,"name":"Kazakhstan","code":"KZ","flag":"🇰🇿"},{"id":114,"name":"Kenya","code":"KE","flag":"🇰🇪"},{"id":115,"name":"Kiribati","code":"KI","flag":"🇰🇮"},{"id":116,"name":"Kosovo","code":"XK","flag":"🇽🇰"},{"id":117,"name":"Kuwait","code":"KW","flag":"🇰🇼"},{"id":118,"name":"Kyrgyzstan","code":"KG","flag":"🇰🇬"},{"id":119,"name":"Laos","code":"LA","flag":"🇱🇦"},{"id":120,"name":"Latvia","code":"LV","flag":"🇱🇻"},{"id":121,"name":"Lebanon","code":"LB","flag":"🇱🇧"},{"id":122,"name":"Lesotho","code":"LS","flag":"🇱🇸"},{"id":123,"name":"Liberia","code":"LR","flag":"🇱🇷"},{"id":124,"name":"Libya","code":"LY","flag":"🇱🇾"},{"id":125,"name":"Liechtenstein","code":"LI","flag":"🇱🇮"},{"id":126,"name":"Lithuania","code":"LT","flag":"🇱🇹"},{"id":127,"name":"Luxembourg","code":"LU","flag":"🇱🇺"},{"id":128,"name":"Macao","code":"MO","flag":"🇲🇴"},{"id":129,"name":"Madagascar","code":"MG","flag":"🇲🇬"},{"id":130,"name":"Malawi","code":"MW","flag":"🇲🇼"},{"id":131,"name":"Malaysia","code":"MY","flag":"🇲🇾"},{"id":132,"name":"Maldives","code":"MV","flag":"🇲🇻"},{"id":133,"name":"Mali","code":"ML","flag":"🇲🇱"},{"id":134,"name":"Malta","code":"MT","flag":"🇲🇹"},{"id":135,"name":"Marshall Islands","code":"MH","flag":"🇲🇭"},{"id":136,"name":"Martinique","code":"MQ","flag":"🇲🇶"},{"id":137,"name":"Mauritania","code":"MR","flag":"🇲🇷"},{"id":138,"name":"Mauritius","code":"MU","flag":"🇲🇺"},{"id":139,"name":"Mayotte","code":"YT","flag":"🇾🇹"},{"id":140,"name":"Mexico","code":"MX","flag":"🇲🇽"},{"id":141,"name":"Micronesia","code":"FM","flag":"🇫🇲"},{"id":142,"name":"Moldova","code":"MD","flag":"🇲🇩"},{"id":143,"name":"Monaco","code":"MC","flag":"🇲🇨"},{"id":144,"name":"Mongolia","code":"MN","flag":"🇲🇳"},{"id":145,"name":"Montenegro","code":"ME","flag":"🇲🇪"},{"id":146,"name":"Montserrat","code":"MS","flag":"🇲🇸"},{"id":147,"name":"Morocco","code":"MA","flag":"🇲🇦"},{"id":148,"name":"Mozambique","code":"MZ","flag":"🇲🇿"},{"id":149,"name":"Myanmar","code":"MM","flag":"🇲🇲"},{"id":150,"name":"Namibia","code":"NA","flag":"🇳🇦"},{"id":151,"name":"Nauru","code":"NR","flag":"🇳🇷"},{"id":152,"name":"Nepal","code":"NP","flag":"🇳🇵"},{"id":153,"name":"Netherlands","code":"NL","flag":"🇳🇱"},{"id":154,"name":"New Caledonia","code":"NC","flag":"🇳🇨"},{"id":155,"name":"New Zealand","code":"NZ","flag":"🇳🇿"},{"id":156,"name":"Nicaragua","code":"NI","flag":"🇳🇮"},{"id":157,"name":"Niger","code":"NE","flag":"🇳🇪"},{"id":158,"name":"Nigeria","code":"NG","flag":"🇳🇬"},{"id":159,"name":"Niue","code":"NU","flag":"🇳🇺"},{"id":160,"name":"Norfolk Island","code":"NF","flag":"🇳🇫"},{"id":161,"name":"North Korea","code":"KP","flag":"🇰🇵"},{"id":162,"name":"North Macedonia","code":"MK","flag":"🇲🇰"},{"id":163,"name":"Northern Mariana Islands","code":"MP","flag":"🇲🇵"},{"id":164,"name":"Norway","code":"NO","flag":"🇳🇴"},{"id":165,"name":"Oman","code":"OM","flag":"🇴🇲"},{"id":166,"name":"Pakistan","code":"PK","flag":"🇵🇰"},{"id":167,"name":"Palau","code":"PW","flag":"🇵🇼"},{"id":168,"name":"Palestine","code":"PS","flag":"🇵🇸"},{"id":169,"name":"Panama","code":"PA","flag":"🇵🇦"},{"id":170,"name":"Papua New Guinea","code":"PG","flag":"🇵🇬"},{"id":171,"name":"Paraguay","code":"PY","flag":"🇵🇾"},{"id":172,"name":"Peru","code":"PE","flag":"🇵🇪"},{"id":173,"name":"Philippines","code":"PH","flag":"🇵🇭"},{"id":174,"name":"Pitcairn","code":"PN","flag":"🇵🇳"},{"id":175,"name":"Poland","code":"PL","flag":"🇵🇱"},{"id":176,"name":"Portugal","code":"PT","flag":"🇵🇹"},{"id":177,"name":"Puerto Rico","code":"PR","flag":"🇵🇷"},{"id":178,"name":"Qatar","code":"QA","flag":"🇶🇦"},{"id":179,"name":"Republic of the Congo","code":"CD","flag":"🇨🇩"},{"id":180,"name":"Romania","code":"RO","flag":"🇷🇴"},{"id":181,"name":"Russia","code":"RU","flag":"🇷🇺"},{"id":182,"name":"Rwanda","code":"RW","flag":"🇷🇼"},{"id":183,"name":"Réunion","code":"RE","flag":"🇷🇪"},{"id":184,"name":"Saint Barthélemy","code":"BL","flag":"🇧🇱"},{"id":185,"name":"Saint Helena","code":"SH","flag":"🇸🇭"},{"id":186,"name":"Saint Kitts and Nevis","code":"KN","flag":"🇰🇳"},{"id":187,"name":"Saint Lucia","code":"LC","flag":"🇱🇨"},{"id":188,"name":"Saint Martin (French part)","code":"MF","flag":"🇲🇫"},{"id":189,"name":"Saint Pierre and Miquelon","code":"PM","flag":"🇵🇲"},{"id":190,"name":"Saint Vincent and the Grenadines","code":"VC","flag":"🇻🇨"},{"id":191,"name":"Samoa","code":"WS","flag":"🇼🇸"},{"id":192,"name":"San Marino","code":"SM","flag":"🇸🇲"},{"id":193,"name":"Sao Tome and Principe","code":"ST","flag":"🇸🇹"},{"id":194,"name":"Saudi Arabia","code":"SA","flag":"🇸🇦"},{"id":195,"name":"Senegal","code":"SN","flag":"🇸🇳"},{"id":196,"name":"Serbia","code":"RS","flag":"🇷🇸"},{"id":197,"name":"Seychelles","code":"SC","flag":"🇸🇨"},{"id":198,"name":"Sierra Leone","code":"SL","flag":"🇸🇱"},{"id":199,"name":"Singapore","code":"SG","flag":"🇸🇬"},{"id":200,"name":"Sint Maarten (Dutch part)","code":"SX","flag":"🇸🇽"},{"id":201,"name":"Slovakia","code":"SK","flag":"🇸🇰"},{"id":202,"name":"Slovenia","code":"SI","flag":"🇸🇮"},{"id":203,"name":"Solomon Islands","code":"SB","flag":"🇸🇧"},{"id":204,"name":"Somalia","code":"SO","flag":"🇸🇴"},{"id":205,"name":"South Africa","code":"ZA","flag":"🇿🇦"},{"id":206,"name":"South Georgia and the South Sandwich Islands","code":"GS","flag":"🇬🇸"},{"id":207,"name":"South Korea","code":"KR","flag":"🇰🇷"},{"id":208,"name":"South Sudan","code":"SS","flag":"🇸🇸"},{"id":209,"name":"Spain","code":"ES","flag":"🇪🇸"},{"id":210,"name":"Sri Lanka","code":"LK","flag":"🇱🇰"},{"id":211,"name":"Sudan","code":"SD","flag":"🇸🇩"},{"id":212,"name":"Suriname","code":"SR","flag":"🇸🇷"},{"id":213,"name":"Svalbard and Jan Mayen","code":"SJ","flag":"🇸🇯"},{"id":214,"name":"Sweden","code":"SE","flag":"🇸🇪"},{"id":215,"name":"Switzerland","code":"CH","flag":"🇨🇭"},{"id":216,"name":"Syrian Arab Republic","code":"SY","flag":"🇸🇾"},{"id":217,"name":"Taiwan Province of China","code":"TW","flag":"🇨🇳"},{"id":218,"name":"Tajikistan","code":"TJ","flag":"🇹🇯"},{"id":219,"name":"Tanzania","code":"TZ","flag":"🇹🇿"},{"id":220,"name":"Thailand","code":"TH","flag":"🇹🇭"},{"id":221,"name":"Timor-Leste","code":"TL","flag":"🇹🇱"},{"id":222,"name":"Togo","code":"TG","flag":"🇹🇬"},{"id":223,"name":"Tokelau","code":"TK","flag":"🇹🇰"},{"id":224,"name":"Tonga","code":"TO","flag":"🇹🇴"},{"id":225,"name":"Trinidad and Tobago","code":"TT","flag":"🇹🇹"},{"id":226,"name":"Tunisia","code":"TN","flag":"🇹🇳"},{"id":227,"name":"Turkmenistan","code":"TM","flag":"🇹🇲"},{"id":228,"name":"Turks and Caicos Islands","code":"TC","flag":"🇹🇨"},{"id":229,"name":"Tuvalu","code":"TV","flag":"🇹🇻"},{"id":230,"name":"Türkiye","code":"TR","flag":"🇹🇷"},{"id":231,"name":"Uganda","code":"UG","flag":"🇺🇬"},{"id":232,"name":"Ukraine","code":"UA","flag":"🇺🇦"},{"id":233,"name":"United Arab Emirates","code":"AE","flag":"🇦🇪"},{"id":234,"name":"United Kingdom","code":"GB","flag":"🇬🇧"},{"id":235,"name":"United States","code":"US","flag":"🇺🇸"},{"id":236,"name":"United States Minor Outlying Islands","code":"UM","flag":"🇺🇲"},{"id":237,"name":"Uruguay","code":"UY","flag":"🇺🇾"},{"id":238,"name":"Uzbekistan","code":"UZ","flag":"🇺🇿"},{"id":239,"name":"Vanuatu","code":"VU","flag":"🇻🇺"},{"id":240,"name":"Vatican City","code":"VA","flag":"🇻🇦"},{"id":241,"name":"Venezuela","code":"VE","flag":"🇻🇪"},{"id":242,"name":"Viet Nam","code":"VN","flag":"🇻🇳"},{"id":243,"name":"Virgin Islands","code":"VG","flag":"🇻🇬"},{"id":244,"name":"Virgin Islands","code":"VI","flag":"🇻🇮"},{"id":245,"name":"Wallis and Futuna","code":"WF","flag":"🇼🇫"},{"id":246,"name":"Western Sahara","code":"EH","flag":"🇪🇭"},{"id":247,"name":"Yemen","code":"YE","flag":"🇾🇪"},{"id":248,"name":"Zambia","code":"ZM","flag":"🇿🇲"},{"id":249,"name":"Zimbabwe","code":"ZW","flag":"🇿🇼"},{"id":250,"name":"Åland Islands","code":"AX","flag":"🇦🇽"},{"id":251,"name":"Canary Islands","code":"IC","flag":"🇮🇨"}]`), - I = { - seasons: De, - regionSize: ke, - refreshIntervalMs: Te, - colors: Be, - errors: Pe, - items: Ie, - products: Ge, - countries: Le - }, - B = I, - Z = I.seasons.length - 1; -I.seasons[Z].zoom; -I.seasons[Z].tileSize; -const Ae = Y(Me), - v = `cache-${oe}`, - Re = new Set([...ne, ...ie]), - k = self, - P = new Map; -let w = []; -self.addEventListener("install", event => { - event.waitUntil(Promise.resolve()); +const Me = [{ tileSize: 1e3, zoom: 11 }], + De = 4, + Be = 6e3, + je = [ + { name: "Transparent", rgb: [0, 0, 0] }, + { name: "Black", rgb: [0, 0, 0] }, + { name: "Dark Gray", rgb: [60, 60, 60] }, + { name: "Gray", rgb: [120, 120, 120] }, + { name: "Light Gray", rgb: [210, 210, 210] }, + { name: "White", rgb: [255, 255, 255] }, + { name: "Deep Red", rgb: [96, 0, 24] }, + { name: "Red", rgb: [237, 28, 36] }, + { name: "Orange", rgb: [255, 127, 39] }, + { name: "Gold", rgb: [246, 170, 9] }, + { name: "Yellow", rgb: [249, 221, 59] }, + { name: "Light Yellow", rgb: [255, 250, 188] }, + { name: "Dark Green", rgb: [14, 185, 104] }, + { name: "Green", rgb: [19, 230, 123] }, + { name: "Light Green", rgb: [135, 255, 94] }, + { name: "Dark Teal", rgb: [12, 129, 110] }, + { name: "Teal", rgb: [16, 174, 166] }, + { name: "Light Teal", rgb: [19, 225, 190] }, + { name: "Dark Blue", rgb: [40, 80, 158] }, + { name: "Blue", rgb: [64, 147, 228] }, + { name: "Cyan", rgb: [96, 247, 242] }, + { name: "Indigo", rgb: [107, 80, 246] }, + { name: "Light Indigo", rgb: [153, 177, 251] }, + { name: "Dark Purple", rgb: [120, 12, 153] }, + { name: "Purple", rgb: [170, 56, 185] }, + { name: "Light Purple", rgb: [224, 159, 249] }, + { name: "Dark Pink", rgb: [203, 0, 122] }, + { name: "Pink", rgb: [236, 31, 128] }, + { name: "Light Pink", rgb: [243, 141, 169] }, + { name: "Dark Brown", rgb: [104, 70, 52] }, + { name: "Brown", rgb: [149, 104, 42] }, + { name: "Beige", rgb: [248, 178, 119] }, + { name: "Medium Gray", rgb: [170, 170, 170] }, + { name: "Dark Red", rgb: [165, 14, 30] }, + { name: "Light Red", rgb: [250, 128, 114] }, + { name: "Dark Orange", rgb: [228, 92, 26] }, + { name: "Light Tan", rgb: [214, 181, 148] }, + { name: "Dark Goldenrod", rgb: [156, 132, 49] }, + { name: "Goldenrod", rgb: [197, 173, 49] }, + { name: "Light Goldenrod", rgb: [232, 212, 95] }, + { name: "Dark Olive", rgb: [74, 107, 58] }, + { name: "Olive", rgb: [90, 148, 74] }, + { name: "Light Olive", rgb: [132, 197, 115] }, + { name: "Dark Cyan", rgb: [15, 121, 159] }, + { name: "Light Cyan", rgb: [187, 250, 242] }, + { name: "Light Blue", rgb: [125, 199, 255] }, + { name: "Dark Indigo", rgb: [77, 49, 184] }, + { name: "Dark Slate Blue", rgb: [74, 66, 132] }, + { name: "Slate Blue", rgb: [122, 113, 196] }, + { name: "Light Slate Blue", rgb: [181, 174, 241] }, + { name: "Light Brown", rgb: [219, 164, 99] }, + { name: "Dark Beige", rgb: [209, 128, 81] }, + { name: "Light Beige", rgb: [255, 197, 165] }, + { name: "Dark Peach", rgb: [155, 82, 73] }, + { name: "Peach", rgb: [209, 128, 120] }, + { name: "Light Peach", rgb: [250, 182, 164] }, + { name: "Dark Tan", rgb: [123, 99, 82] }, + { name: "Tan", rgb: [156, 132, 107] }, + { name: "Dark Slate", rgb: [51, 57, 65] }, + { name: "Slate", rgb: [109, 117, 141] }, + { name: "Light Slate", rgb: [179, 185, 209] }, + { name: "Dark Stone", rgb: [109, 100, 63] }, + { name: "Stone", rgb: [148, 140, 107] }, + { name: "Light Stone", rgb: [205, 197, 158] }, + ], + Te = { needsPhoneVerification: "needs_phone_verification" }, + Ie = { + Droplet: {}, + "Max. Charge": {}, + "Paint Charge": {}, + Color: {}, + Flag: {}, + "Profile Picture": {}, + }, + Pe = { + 10: { + name: "25,000 Droplets", + price: 500, + isDollar: !0, + lookupKey: "droplets_5", + items: [{ name: "Droplet", amount: 25e3 }], + }, + 20: { + name: "78,750 Droplets", + price: 1500, + isDollar: !0, + lookupKey: "droplets_15", + items: [{ name: "Droplet", amount: 76750 }], + }, + 30: { + name: "165,000 Droplets", + price: 3e3, + isDollar: !0, + lookupKey: "droplets_30", + items: [{ name: "Droplet", amount: 165e3 }], + }, + 40: { + name: "287,500 Droplets", + price: 5e3, + isDollar: !0, + lookupKey: "droplets_50", + items: [{ name: "Droplet", amount: 287500 }], + }, + 50: { + name: "450,000 Droplets", + price: 7500, + isDollar: !0, + lookupKey: "droplets_75", + items: [{ name: "Droplet", amount: 45e4 }], + }, + 60: { + name: "625,000 Droplets", + price: 1e4, + isDollar: !0, + lookupKey: "droplets_100", + items: [{ name: "Droplet", amount: 625e3 }], + }, + 70: { + name: "+5 Max. Charges", + price: 500, + isDollar: !1, + items: [{ name: "Max. Charge", amount: 5 }], + }, + 80: { + name: "+30 Paint Charges", + price: 500, + isDollar: !1, + items: [{ name: "Paint Charge", amount: 30 }], + }, + 100: { + name: "Unlock Color", + price: 2e3, + isDollar: !1, + items: [{ name: "Color", amount: 1 }], + }, + 110: { + name: "Flag", + price: 2e4, + isDollar: !1, + items: [{ name: "Flag", amount: 1 }], + }, + 120: { + name: "Profile Picture", + price: 2e4, + isDollar: !1, + items: [{ name: "Profile Picture", amount: 1 }], + }, + }, + Ae = JSON.parse( + `[{"id":1,"name":"Afghanistan","code":"AF","flag":"🇦🇫"},{"id":2,"name":"Albania","code":"AL","flag":"🇦🇱"},{"id":3,"name":"Algeria","code":"DZ","flag":"🇩🇿"},{"id":4,"name":"American Samoa","code":"AS","flag":"🇦🇸"},{"id":5,"name":"Andorra","code":"AD","flag":"🇦🇩"},{"id":6,"name":"Angola","code":"AO","flag":"🇦🇴"},{"id":7,"name":"Anguilla","code":"AI","flag":"🇦🇮"},{"id":8,"name":"Antarctica","code":"AQ","flag":"🇦🇶"},{"id":9,"name":"Antigua and Barbuda","code":"AG","flag":"🇦🇬"},{"id":10,"name":"Argentina","code":"AR","flag":"🇦🇷"},{"id":11,"name":"Armenia","code":"AM","flag":"🇦🇲"},{"id":12,"name":"Aruba","code":"AW","flag":"🇦🇼"},{"id":13,"name":"Australia","code":"AU","flag":"🇦🇺"},{"id":14,"name":"Austria","code":"AT","flag":"🇦🇹"},{"id":15,"name":"Azerbaijan","code":"AZ","flag":"🇦🇿"},{"id":16,"name":"Bahamas","code":"BS","flag":"🇧🇸"},{"id":17,"name":"Bahrain","code":"BH","flag":"🇧🇭"},{"id":18,"name":"Bangladesh","code":"BD","flag":"🇧🇩"},{"id":19,"name":"Barbados","code":"BB","flag":"🇧🇧"},{"id":20,"name":"Belarus","code":"BY","flag":"🇧🇾"},{"id":21,"name":"Belgium","code":"BE","flag":"🇧🇪"},{"id":22,"name":"Belize","code":"BZ","flag":"🇧🇿"},{"id":23,"name":"Benin","code":"BJ","flag":"🇧🇯"},{"id":24,"name":"Bermuda","code":"BM","flag":"🇧🇲"},{"id":25,"name":"Bhutan","code":"BT","flag":"🇧🇹"},{"id":26,"name":"Bolivia","code":"BO","flag":"🇧🇴"},{"id":27,"name":"Bonaire","code":"BQ","flag":"🇧🇶"},{"id":28,"name":"Bosnia and Herzegovina","code":"BA","flag":"🇧🇦"},{"id":29,"name":"Botswana","code":"BW","flag":"🇧🇼"},{"id":30,"name":"Bouvet Island","code":"BV","flag":"🇧🇻"},{"id":31,"name":"Brazil","code":"BR","flag":"🇧🇷"},{"id":32,"name":"British Indian Ocean Territory","code":"IO","flag":"🇮🇴"},{"id":33,"name":"Brunei Darussalam","code":"BN","flag":"🇧🇳"},{"id":34,"name":"Bulgaria","code":"BG","flag":"🇧🇬"},{"id":35,"name":"Burkina Faso","code":"BF","flag":"🇧🇫"},{"id":36,"name":"Burundi","code":"BI","flag":"🇧🇮"},{"id":37,"name":"Cabo Verde","code":"CV","flag":"🇨🇻"},{"id":38,"name":"Cambodia","code":"KH","flag":"🇰🇭"},{"id":39,"name":"Cameroon","code":"CM","flag":"🇨🇲"},{"id":40,"name":"Canada","code":"CA","flag":"🇨🇦"},{"id":41,"name":"Cayman Islands","code":"KY","flag":"🇰🇾"},{"id":42,"name":"Central African Republic","code":"CF","flag":"🇨🇫"},{"id":43,"name":"Chad","code":"TD","flag":"🇹🇩"},{"id":44,"name":"Chile","code":"CL","flag":"🇨🇱"},{"id":45,"name":"China","code":"CN","flag":"🇨🇳"},{"id":46,"name":"Christmas Island","code":"CX","flag":"🇨🇽"},{"id":47,"name":"Cocos (Keeling) Islands","code":"CC","flag":"🇨🇨"},{"id":48,"name":"Colombia","code":"CO","flag":"🇨🇴"},{"id":49,"name":"Comoros","code":"KM","flag":"🇰🇲"},{"id":50,"name":"Congo","code":"CG","flag":"🇨🇬"},{"id":51,"name":"Cook Islands","code":"CK","flag":"🇨🇰"},{"id":52,"name":"Costa Rica","code":"CR","flag":"🇨🇷"},{"id":53,"name":"Croatia","code":"HR","flag":"🇭🇷"},{"id":54,"name":"Cuba","code":"CU","flag":"🇨🇺"},{"id":55,"name":"Curaçao","code":"CW","flag":"🇨🇼"},{"id":56,"name":"Cyprus","code":"CY","flag":"🇨🇾"},{"id":57,"name":"Czechia","code":"CZ","flag":"🇨🇿"},{"id":58,"name":"Côte d'Ivoire","code":"CI","flag":"🇨🇮"},{"id":59,"name":"Denmark","code":"DK","flag":"🇩🇰"},{"id":60,"name":"Djibouti","code":"DJ","flag":"🇩🇯"},{"id":61,"name":"Dominica","code":"DM","flag":"🇩🇲"},{"id":62,"name":"Dominican Republic","code":"DO","flag":"🇩🇴"},{"id":63,"name":"Ecuador","code":"EC","flag":"🇪🇨"},{"id":64,"name":"Egypt","code":"EG","flag":"🇪🇬"},{"id":65,"name":"El Salvador","code":"SV","flag":"🇸🇻"},{"id":66,"name":"Equatorial Guinea","code":"GQ","flag":"🇬🇶"},{"id":67,"name":"Eritrea","code":"ER","flag":"🇪🇷"},{"id":68,"name":"Estonia","code":"EE","flag":"🇪🇪"},{"id":69,"name":"Eswatini","code":"SZ","flag":"🇸🇿"},{"id":70,"name":"Ethiopia","code":"ET","flag":"🇪🇹"},{"id":71,"name":"Falkland Islands (Malvinas)","code":"FK","flag":"🇫🇰"},{"id":72,"name":"Faroe Islands","code":"FO","flag":"🇫🇴"},{"id":73,"name":"Fiji","code":"FJ","flag":"🇫🇯"},{"id":74,"name":"Finland","code":"FI","flag":"🇫🇮"},{"id":75,"name":"France","code":"FR","flag":"🇫🇷"},{"id":76,"name":"French Guiana","code":"GF","flag":"🇬🇫"},{"id":77,"name":"French Polynesia","code":"PF","flag":"🇵🇫"},{"id":78,"name":"French Southern Territories","code":"TF","flag":"🇹🇫"},{"id":79,"name":"Gabon","code":"GA","flag":"🇬🇦"},{"id":80,"name":"Gambia","code":"GM","flag":"🇬🇲"},{"id":81,"name":"Georgia","code":"GE","flag":"🇬🇪"},{"id":82,"name":"Germany","code":"DE","flag":"🇩🇪"},{"id":83,"name":"Ghana","code":"GH","flag":"🇬🇭"},{"id":84,"name":"Gibraltar","code":"GI","flag":"🇬🇮"},{"id":85,"name":"Greece","code":"GR","flag":"🇬🇷"},{"id":86,"name":"Greenland","code":"GL","flag":"🇬🇱"},{"id":87,"name":"Grenada","code":"GD","flag":"🇬🇩"},{"id":88,"name":"Guadeloupe","code":"GP","flag":"🇬🇵"},{"id":89,"name":"Guam","code":"GU","flag":"🇬🇺"},{"id":90,"name":"Guatemala","code":"GT","flag":"🇬🇹"},{"id":91,"name":"Guernsey","code":"GG","flag":"🇬🇬"},{"id":92,"name":"Guinea","code":"GN","flag":"🇬🇳"},{"id":93,"name":"Guinea-Bissau","code":"GW","flag":"🇬🇼"},{"id":94,"name":"Guyana","code":"GY","flag":"🇬🇾"},{"id":95,"name":"Haiti","code":"HT","flag":"🇭🇹"},{"id":96,"name":"Heard Island and McDonald Islands","code":"HM","flag":"🇭🇲"},{"id":97,"name":"Honduras","code":"HN","flag":"🇭🇳"},{"id":98,"name":"Hong Kong","code":"HK","flag":"🇭🇰"},{"id":99,"name":"Hungary","code":"HU","flag":"🇭🇺"},{"id":100,"name":"Iceland","code":"IS","flag":"🇮🇸"},{"id":101,"name":"India","code":"IN","flag":"🇮🇳"},{"id":102,"name":"Indonesia","code":"ID","flag":"🇮🇩"},{"id":103,"name":"Iran","code":"IR","flag":"🇮🇷"},{"id":104,"name":"Iraq","code":"IQ","flag":"🇮🇶"},{"id":105,"name":"Ireland","code":"IE","flag":"🇮🇪"},{"id":106,"name":"Isle of Man","code":"IM","flag":"🇮🇲"},{"id":107,"name":"Israel","code":"IL","flag":"🇮🇱"},{"id":108,"name":"Italy","code":"IT","flag":"🇮🇹"},{"id":109,"name":"Jamaica","code":"JM","flag":"🇯🇲"},{"id":110,"name":"Japan","code":"JP","flag":"🇯🇵"},{"id":111,"name":"Jersey","code":"JE","flag":"🇯🇪"},{"id":112,"name":"Jordan","code":"JO","flag":"🇯🇴"},{"id":113,"name":"Kazakhstan","code":"KZ","flag":"🇰🇿"},{"id":114,"name":"Kenya","code":"KE","flag":"🇰🇪"},{"id":115,"name":"Kiribati","code":"KI","flag":"🇰🇮"},{"id":116,"name":"Kosovo","code":"XK","flag":"🇽🇰"},{"id":117,"name":"Kuwait","code":"KW","flag":"🇰🇼"},{"id":118,"name":"Kyrgyzstan","code":"KG","flag":"🇰🇬"},{"id":119,"name":"Laos","code":"LA","flag":"🇱🇦"},{"id":120,"name":"Latvia","code":"LV","flag":"🇱🇻"},{"id":121,"name":"Lebanon","code":"LB","flag":"🇱🇧"},{"id":122,"name":"Lesotho","code":"LS","flag":"🇱🇸"},{"id":123,"name":"Liberia","code":"LR","flag":"🇱🇷"},{"id":124,"name":"Libya","code":"LY","flag":"🇱🇾"},{"id":125,"name":"Liechtenstein","code":"LI","flag":"🇱🇮"},{"id":126,"name":"Lithuania","code":"LT","flag":"🇱🇹"},{"id":127,"name":"Luxembourg","code":"LU","flag":"🇱🇺"},{"id":128,"name":"Macao","code":"MO","flag":"🇲🇴"},{"id":129,"name":"Madagascar","code":"MG","flag":"🇲🇬"},{"id":130,"name":"Malawi","code":"MW","flag":"🇲🇼"},{"id":131,"name":"Malaysia","code":"MY","flag":"🇲🇾"},{"id":132,"name":"Maldives","code":"MV","flag":"🇲🇻"},{"id":133,"name":"Mali","code":"ML","flag":"🇲🇱"},{"id":134,"name":"Malta","code":"MT","flag":"🇲🇹"},{"id":135,"name":"Marshall Islands","code":"MH","flag":"🇲🇭"},{"id":136,"name":"Martinique","code":"MQ","flag":"🇲🇶"},{"id":137,"name":"Mauritania","code":"MR","flag":"🇲🇷"},{"id":138,"name":"Mauritius","code":"MU","flag":"🇲🇺"},{"id":139,"name":"Mayotte","code":"YT","flag":"🇾🇹"},{"id":140,"name":"Mexico","code":"MX","flag":"🇲🇽"},{"id":141,"name":"Micronesia","code":"FM","flag":"🇫🇲"},{"id":142,"name":"Moldova","code":"MD","flag":"🇲🇩"},{"id":143,"name":"Monaco","code":"MC","flag":"🇲🇨"},{"id":144,"name":"Mongolia","code":"MN","flag":"🇲🇳"},{"id":145,"name":"Montenegro","code":"ME","flag":"🇲🇪"},{"id":146,"name":"Montserrat","code":"MS","flag":"🇲🇸"},{"id":147,"name":"Morocco","code":"MA","flag":"🇲🇦"},{"id":148,"name":"Mozambique","code":"MZ","flag":"🇲🇿"},{"id":149,"name":"Myanmar","code":"MM","flag":"🇲🇲"},{"id":150,"name":"Namibia","code":"NA","flag":"🇳🇦"},{"id":151,"name":"Nauru","code":"NR","flag":"🇳🇷"},{"id":152,"name":"Nepal","code":"NP","flag":"🇳🇵"},{"id":153,"name":"Netherlands","code":"NL","flag":"🇳🇱"},{"id":154,"name":"New Caledonia","code":"NC","flag":"🇳🇨"},{"id":155,"name":"New Zealand","code":"NZ","flag":"🇳🇿"},{"id":156,"name":"Nicaragua","code":"NI","flag":"🇳🇮"},{"id":157,"name":"Niger","code":"NE","flag":"🇳🇪"},{"id":158,"name":"Nigeria","code":"NG","flag":"🇳🇬"},{"id":159,"name":"Niue","code":"NU","flag":"🇳🇺"},{"id":160,"name":"Norfolk Island","code":"NF","flag":"🇳🇫"},{"id":161,"name":"North Korea","code":"KP","flag":"🇰🇵"},{"id":162,"name":"North Macedonia","code":"MK","flag":"🇲🇰"},{"id":163,"name":"Northern Mariana Islands","code":"MP","flag":"🇲🇵"},{"id":164,"name":"Norway","code":"NO","flag":"🇳🇴"},{"id":165,"name":"Oman","code":"OM","flag":"🇴🇲"},{"id":166,"name":"Pakistan","code":"PK","flag":"🇵🇰"},{"id":167,"name":"Palau","code":"PW","flag":"🇵🇼"},{"id":168,"name":"Palestine","code":"PS","flag":"🇵🇸"},{"id":169,"name":"Panama","code":"PA","flag":"🇵🇦"},{"id":170,"name":"Papua New Guinea","code":"PG","flag":"🇵🇬"},{"id":171,"name":"Paraguay","code":"PY","flag":"🇵🇾"},{"id":172,"name":"Peru","code":"PE","flag":"🇵🇪"},{"id":173,"name":"Philippines","code":"PH","flag":"🇵🇭"},{"id":174,"name":"Pitcairn","code":"PN","flag":"🇵🇳"},{"id":175,"name":"Poland","code":"PL","flag":"🇵🇱"},{"id":176,"name":"Portugal","code":"PT","flag":"🇵🇹"},{"id":177,"name":"Puerto Rico","code":"PR","flag":"🇵🇷"},{"id":178,"name":"Qatar","code":"QA","flag":"🇶🇦"},{"id":179,"name":"Republic of the Congo","code":"CD","flag":"🇨🇩"},{"id":180,"name":"Romania","code":"RO","flag":"🇷🇴"},{"id":181,"name":"Russia","code":"RU","flag":"🇷🇺"},{"id":182,"name":"Rwanda","code":"RW","flag":"🇷🇼"},{"id":183,"name":"Réunion","code":"RE","flag":"🇷🇪"},{"id":184,"name":"Saint Barthélemy","code":"BL","flag":"🇧🇱"},{"id":185,"name":"Saint Helena","code":"SH","flag":"🇸🇭"},{"id":186,"name":"Saint Kitts and Nevis","code":"KN","flag":"🇰🇳"},{"id":187,"name":"Saint Lucia","code":"LC","flag":"🇱🇨"},{"id":188,"name":"Saint Martin (French part)","code":"MF","flag":"🇲🇫"},{"id":189,"name":"Saint Pierre and Miquelon","code":"PM","flag":"🇵🇲"},{"id":190,"name":"Saint Vincent and the Grenadines","code":"VC","flag":"🇻🇨"},{"id":191,"name":"Samoa","code":"WS","flag":"🇼🇸"},{"id":192,"name":"San Marino","code":"SM","flag":"🇸🇲"},{"id":193,"name":"Sao Tome and Principe","code":"ST","flag":"🇸🇹"},{"id":194,"name":"Saudi Arabia","code":"SA","flag":"🇸🇦"},{"id":195,"name":"Senegal","code":"SN","flag":"🇸🇳"},{"id":196,"name":"Serbia","code":"RS","flag":"🇷🇸"},{"id":197,"name":"Seychelles","code":"SC","flag":"🇸🇨"},{"id":198,"name":"Sierra Leone","code":"SL","flag":"🇸🇱"},{"id":199,"name":"Singapore","code":"SG","flag":"🇸🇬"},{"id":200,"name":"Sint Maarten (Dutch part)","code":"SX","flag":"🇸🇽"},{"id":201,"name":"Slovakia","code":"SK","flag":"🇸🇰"},{"id":202,"name":"Slovenia","code":"SI","flag":"🇸🇮"},{"id":203,"name":"Solomon Islands","code":"SB","flag":"🇸🇧"},{"id":204,"name":"Somalia","code":"SO","flag":"🇸🇴"},{"id":205,"name":"South Africa","code":"ZA","flag":"🇿🇦"},{"id":206,"name":"South Georgia and the South Sandwich Islands","code":"GS","flag":"🇬🇸"},{"id":207,"name":"South Korea","code":"KR","flag":"🇰🇷"},{"id":208,"name":"South Sudan","code":"SS","flag":"🇸🇸"},{"id":209,"name":"Spain","code":"ES","flag":"🇪🇸"},{"id":210,"name":"Sri Lanka","code":"LK","flag":"🇱🇰"},{"id":211,"name":"Sudan","code":"SD","flag":"🇸🇩"},{"id":212,"name":"Suriname","code":"SR","flag":"🇸🇷"},{"id":213,"name":"Svalbard and Jan Mayen","code":"SJ","flag":"🇸🇯"},{"id":214,"name":"Sweden","code":"SE","flag":"🇸🇪"},{"id":215,"name":"Switzerland","code":"CH","flag":"🇨🇭"},{"id":216,"name":"Syrian Arab Republic","code":"SY","flag":"🇸🇾"},{"id":217,"name":"Taiwan","code":"TW","flag":"🇹🇼"},{"id":218,"name":"Tajikistan","code":"TJ","flag":"🇹🇯"},{"id":219,"name":"Tanzania","code":"TZ","flag":"🇹🇿"},{"id":220,"name":"Thailand","code":"TH","flag":"🇹🇭"},{"id":221,"name":"Timor-Leste","code":"TL","flag":"🇹🇱"},{"id":222,"name":"Togo","code":"TG","flag":"🇹🇬"},{"id":223,"name":"Tokelau","code":"TK","flag":"🇹🇰"},{"id":224,"name":"Tonga","code":"TO","flag":"🇹🇴"},{"id":225,"name":"Trinidad and Tobago","code":"TT","flag":"🇹🇹"},{"id":226,"name":"Tunisia","code":"TN","flag":"🇹🇳"},{"id":227,"name":"Turkmenistan","code":"TM","flag":"🇹🇲"},{"id":228,"name":"Turks and Caicos Islands","code":"TC","flag":"🇹🇨"},{"id":229,"name":"Tuvalu","code":"TV","flag":"🇹🇻"},{"id":230,"name":"Türkiye","code":"TR","flag":"🇹🇷"},{"id":231,"name":"Uganda","code":"UG","flag":"🇺🇬"},{"id":232,"name":"Ukraine","code":"UA","flag":"🇺🇦"},{"id":233,"name":"United Arab Emirates","code":"AE","flag":"🇦🇪"},{"id":234,"name":"United Kingdom","code":"GB","flag":"🇬🇧"},{"id":235,"name":"United States","code":"US","flag":"🇺🇸"},{"id":236,"name":"United States Minor Outlying Islands","code":"UM","flag":"🇺🇲"},{"id":237,"name":"Uruguay","code":"UY","flag":"🇺🇾"},{"id":238,"name":"Uzbekistan","code":"UZ","flag":"🇺🇿"},{"id":239,"name":"Vanuatu","code":"VU","flag":"🇻🇺"},{"id":240,"name":"Vatican City","code":"VA","flag":"🇻🇦"},{"id":241,"name":"Venezuela","code":"VE","flag":"🇻🇪"},{"id":242,"name":"Viet Nam","code":"VN","flag":"🇻🇳"},{"id":243,"name":"Virgin Islands","code":"VG","flag":"🇻🇬"},{"id":244,"name":"Virgin Islands","code":"VI","flag":"🇻🇮"},{"id":245,"name":"Wallis and Futuna","code":"WF","flag":"🇼🇫"},{"id":246,"name":"Western Sahara","code":"EH","flag":"🇪🇭"},{"id":247,"name":"Yemen","code":"YE","flag":"🇾🇪"},{"id":248,"name":"Zambia","code":"ZM","flag":"🇿🇲"},{"id":249,"name":"Zimbabwe","code":"ZW","flag":"🇿🇼"},{"id":250,"name":"Åland Islands","code":"AX","flag":"🇦🇽"},{"id":251,"name":"Canary Islands","code":"IC","flag":"🇮🇨"}]` + ), + I = { + seasons: Me, + regionSize: De, + refreshIntervalMs: Be, + colors: je, + errors: Te, + items: Ie, + products: Pe, + countries: Ae, + }, + j = I, + J = I.seasons.length - 1; +I.seasons[J].zoom; +I.seasons[J].tileSize; +const Ge = Y(Se), + O = `cache-${te}`, + Le = new Set([...ne, ...ie]), + D = self, + T = new Map(); +let _ = []; +D.addEventListener("install", (a) => { + async function n() { + await (await caches.open(O)).addAll([...Le, "/offline"]); + } + a.waitUntil(n()); }); -k.addEventListener("activate", e => { - async function n() { - for (const i of await caches.keys()) i !== v && await caches.delete(i) - } - e.waitUntil(n()) +D.addEventListener("activate", (a) => { + async function n() { + for (const i of await caches.keys()) i !== O && (await caches.delete(i)); + } + a.waitUntil(n()); }); -k.addEventListener("fetch", e => { - if (e.request.method !== "GET") return; - async function n() { - const l = new URL(e.request.url); - try { - return await i(l) - } catch (s) { - const m = await (await caches.open(v)).match(e.request); - if (m) return m; - throw s - } - } - async function i(l) { - var m, y; - const s = e.request.url.startsWith(ae) && l.pathname.match(/^.*\/s(\d+).*\/tiles\/(\d+)\/(\d+).png$/); - if (s) { - const t = P.get(e.clientId); - if (t || w.length) { - const _ = parseInt(s[1]), - G = parseInt(s[2]), - L = parseInt(s[3]), - W = Date.now(), - Q = 1.9 * B.refreshIntervalMs; - w = w.filter(o => W - o.time.getTime() < Q); - const $ = w.filter(({ - data: o - }) => G === o.tile[0] && L === o.tile[1] && o.season === _).map(({ - data: o - }) => ({ - ...o - })), - X = ((m = t == null ? void 0 : t.data) == null ? void 0 : m.filter(o => G === o.tile[0] && L === o.tile[1] && o.season === _)) ?? [], - x = $.concat(X); - if (x.length || t) { - await Ae; - let o, A; - const T = je(G, L, _), - f = await ((y = t == null ? void 0 : t.cachedTiles) == null ? void 0 : y.get(T)), - O = f && W - f.time.getTime() < B.refreshIntervalMs; - if (O) o = structuredClone(f.png), A = f.init; - else { - let g = f; - if (t) - if (f === void 0) { - t.cachedTiles.set(T, p()); - const c = await t.cachedTiles.get(T); - c && (g = c) - } else !O && !f.refreshing && (f.refreshing = !0, setTimeout(async () => { - try { - const c = await p(); - t.cachedTiles.set(T, new Promise(h => h(c))); - const d = await k.clients.get(e == null ? void 0 : e.clientId); - d == null || d.postMessage({ - type: "refreshPixelArt" - }) - } catch { - f.refreshing = !1 - } - })); - g || (g = await p()), o = structuredClone(g.png), A = g.init; - async function p() { - try { - const c = await fetch(e == null ? void 0 : e.request); - if (c && c.status !== 404) { - const d = await c.blob(); - return { - png: await Ce(await d.arrayBuffer()), - init: { - headers: c.headers, - status: c.status, - statusText: c.statusText - }, - time: new Date, - refreshing: !1 - } - } else { - console.warn("painting 404 tile"); - const d = B.seasons[_].tileSize; - return { - png: N(d, d), - init: { - headers: { - "Content-Type": "image/png" - }, - status: 200 - }, - time: new Date, - refreshing: !1 - } - } - } catch (c) { - if (console.error("Error while fetching in servicer worker: ", c), f) return f; - { - const d = B.seasons[_].tileSize; - return { - png: N(d, d), - init: { - headers: { - "Content-Type": "image/png" - }, - status: 200 - }, - time: new Date, - refreshing: !1 - } - } - } - } - } - const R = new Map; - for (const g of x) { - const [p, c] = g.pixel, d = p + c * o.width << 2, h = g.color; - R.get(d) || R.set(d, [o.data[d], o.data[d + 1], o.data[d + 2], o.data[d + 3]]), o.data[d] = h.r, o.data[d + 1] = h.g, o.data[d + 2] = h.b, o.data[d + 3] = h.a - } - const ee = await V(o); - for (const [g, p] of R.entries()) o.data[g] = p[0], o.data[g + 1] = p[1], o.data[g + 2] = p[2], o.data[g + 3] = p[3]; - return new Response(ee, A) - } - } - } - const u = await fetch(e == null ? void 0 : e.request); - if (s && u.status === 404) { - const t = await V(N(1, 1)); - return new Response(t, { - headers: { - "Content-Type": "image/png" - }, - status: 200 - }) - } - return u - } - e.respondWith(n()) +D.addEventListener("fetch", (a) => { + if (a.request.method !== "GET") return; + async function n() { + const l = new URL(a.request.url); + try { + return await i(l); + } catch (s) { + const r = await (await caches.open(O)).match(a.request); + if (r) return r; + throw s; + } + } + async function i(l) { + var r, w; + const s = + a.request.url.startsWith(ae) && + l.pathname.match(/^.*\/s(\d+).*\/tiles\/(\d+)\/(\d+).png$/); + if (s) { + const o = T.get(a.clientId); + if (o || _.length) { + const y = parseInt(s[1]), + P = parseInt(s[2]), + A = parseInt(s[3]), + x = Date.now(), + Q = 1.9 * j.refreshIntervalMs; + _ = _.filter((t) => x - t.time.getTime() < Q); + const X = _.filter( + ({ data: t }) => + P === t.tile[0] && A === t.tile[1] && t.season === y + ).map(({ data: t }) => ({ ...t })), + $ = + ((r = o == null ? void 0 : o.data) == null + ? void 0 + : r.filter( + (t) => P === t.tile[0] && A === t.tile[1] && t.season === y + )) ?? [], + v = X.concat($); + if (v.length || o) { + await Ge; + let t, G; + const B = Re(P, A, y), + f = await ((w = o == null ? void 0 : o.cachedTiles) == null + ? void 0 + : w.get(B)), + W = f && x - f.time.getTime() < j.refreshIntervalMs; + if (W) (t = structuredClone(f.png)), (G = f.init); + else { + let g = f; + if (o) + if (f === void 0) { + o.cachedTiles.set(B, p()); + const m = await o.cachedTiles.get(B); + m && (g = m); + } else + !W && + !f.refreshing && + ((f.refreshing = !0), + setTimeout(async () => { + try { + const m = await p(); + o.cachedTiles.set(B, new Promise((h) => h(m))); + const d = await D.clients.get( + a == null ? void 0 : a.clientId + ); + d == null || d.postMessage({ type: "refreshPixelArt" }); + } catch { + f.refreshing = !1; + } + })); + g || (g = await p()), (t = structuredClone(g.png)), (G = g.init); + async function p() { + try { + const m = await fetch(a == null ? void 0 : a.request); + if (m && m.status !== 404) { + const d = await m.blob(); + return { + png: await Ce(await d.arrayBuffer()), + init: { + headers: m.headers, + status: m.status, + statusText: m.statusText, + }, + time: new Date(), + refreshing: !1, + }; + } else { + console.warn("painting 404 tile"); + const d = j.seasons[y].tileSize; + return { + png: N(d, d), + init: { + headers: { "Content-Type": "image/png" }, + status: 200, + }, + time: new Date(), + refreshing: !1, + }; + } + } catch (m) { + if ( + (console.error( + "Error while fetching in servicer worker: ", + m + ), + f) + ) + return f; + { + const d = j.seasons[y].tileSize; + return { + png: N(d, d), + init: { + headers: { "Content-Type": "image/png" }, + status: 200, + }, + time: new Date(), + refreshing: !1, + }; + } + } + } + } + const L = new Map(); + for (const g of v) { + const [p, m] = g.pixel, + d = (p + m * t.width) << 2, + h = g.color; + L.get(d) || + L.set(d, [ + t.data[d], + t.data[d + 1], + t.data[d + 2], + t.data[d + 3], + ]), + (t.data[d] = h.r), + (t.data[d + 1] = h.g), + (t.data[d + 2] = h.b), + (t.data[d + 3] = h.a); + } + const ee = await V(t); + for (const [g, p] of L.entries()) + (t.data[g] = p[0]), + (t.data[g + 1] = p[1]), + (t.data[g + 2] = p[2]), + (t.data[g + 3] = p[3]); + return new Response(ee, G); + } + } + } + const u = await fetch(a == null ? void 0 : a.request); + if (s && u.status === 404) { + const o = await V(N(1, 1)); + return new Response(o, { + headers: { "Content-Type": "image/png" }, + status: 200, + }); + } + return u; + } + a.respondWith(n()); }); -k.addEventListener("message", e => { - var i, l; - const n = e.data; - try { - const s = ((i = e.source) == null ? void 0 : i.id) ?? "none"; - switch (n == null ? void 0 : n.type) { - case "previewPixels": - const u = n.data, - m = P.get(s); - m ? m.data = u : P.set(s, { - data: u, - cachedTiles: new Map - }); - break; - case "clearPixelPreview": - P.delete(s); - break; - case "paintPixels": - w.push(...n.data.map(t => ({ - data: t, - time: new Date - }))); - break; - case "unpaintPixels": - const y = new Set(n.data.map(t => z(t))); - w = w.filter(({ - data: t - }) => !y.has(z(t))); - break - } - } finally { - (l = e.source) == null || l.postMessage({ - id: n.id - }) - } +D.addEventListener("message", (a) => { + var i, l; + const n = a.data; + try { + const s = ((i = a.source) == null ? void 0 : i.id) ?? "none"; + switch (n == null ? void 0 : n.type) { + case "previewPixels": + const u = n.data, + r = T.get(s); + r ? (r.data = u) : T.set(s, { data: u, cachedTiles: new Map() }); + break; + case "clearPixelPreview": + T.delete(s); + break; + case "paintPixels": + _.push(...n.data.map((o) => ({ data: o, time: new Date() }))); + break; + case "unpaintPixels": + const w = new Set(n.data.map((o) => Z(o))); + _ = _.filter(({ data: o }) => !w.has(Z(o))); + break; + } + } finally { + (l = a.source) == null || l.postMessage({ id: n.id }); + } }); - -function je(e, n, i) { - return `t=(${e},${n});s=${i}` +function Re(a, n, i) { + return `t=(${a},${n});s=${i}`; +} +function N(a, n) { + return { + data: new Uint8ClampedArray(a * n * 4), + width: a, + height: n, + colorSpace: "srgb", + }; } - -function N(e, n) { - return { - data: new Uint8ClampedArray(e * n * 4), - width: e, - height: n, - colorSpace: "srgb" - } -} \ No newline at end of file diff --git a/frontend-backup/site.webmanifest b/frontend-backup/site.webmanifest index dad99be..b303156 100644 --- a/frontend-backup/site.webmanifest +++ b/frontend-backup/site.webmanifest @@ -1,7 +1,7 @@ { - "name": "Wplace", - "short_name": "Wplace", - "description": "Wplace is a collaborative, real-time pixel canvas layered over the world map, where anyone can paint and create art together.", + "name": "FurryPlace", + "short_name": "FurryPlace", + "description": "FurryPlace is a free unofficial open source backend for wplace.", "start_url": "/", "theme_color": "#f8f4f0", "background_color": "#ffffff", @@ -50,4 +50,4 @@ "form_factor": "wide" } ] -} \ No newline at end of file +} diff --git a/frontend-src/BUILD.md b/frontend-src/BUILD.md index b5baf3b..2973d6a 100644 --- a/frontend-src/BUILD.md +++ b/frontend-src/BUILD.md @@ -278,7 +278,7 @@ jobs: ## File Structure Reference ``` -openplace/ +FurryPlace/ ├── frontend/ # ← Build output (served by backend) │ ├── _app/ │ ├── index.html diff --git a/frontend-src/CONFIGURATION_SUMMARY.md b/frontend-src/CONFIGURATION_SUMMARY.md index 80268bf..eee81c6 100644 --- a/frontend-src/CONFIGURATION_SUMMARY.md +++ b/frontend-src/CONFIGURATION_SUMMARY.md @@ -109,7 +109,7 @@ app.use((req, res) => { ## File Structure ``` -openplace/ +FurryPlace/ ├── frontend/ # ← Built output (served by backend) │ ├── _app/ │ ├── index.html diff --git a/frontend-src/README.md b/frontend-src/README.md index d08ee9b..d58fed6 100644 --- a/frontend-src/README.md +++ b/frontend-src/README.md @@ -1,6 +1,6 @@ -# Openplace Frontend Source +# FurryPlace Frontend Source -Reconstructed SvelteKit frontend for Openplace, based on analysis of compiled production build. +Reconstructed SvelteKit frontend for FurryPlace, based on analysis of compiled production build. ## Quick Start diff --git a/frontend-src/package-lock.json b/frontend-src/package-lock.json index dfd28de..9bc66de 100644 --- a/frontend-src/package-lock.json +++ b/frontend-src/package-lock.json @@ -1,11 +1,11 @@ { - "name": "openplace-frontend", + "name": "FurryPlace-frontend", "version": "0.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "openplace-frontend", + "name": "FurryPlace-frontend", "version": "0.0.1", "dependencies": { "leaflet": "^1.9.4" diff --git a/frontend-src/package.json b/frontend-src/package.json index 634dbad..88be3a0 100644 --- a/frontend-src/package.json +++ b/frontend-src/package.json @@ -1,5 +1,5 @@ { - "name": "openplace-frontend", + "name": "FurryPlace-frontend", "version": "0.0.1", "private": true, "scripts": { diff --git a/frontend-src/src/app.html b/frontend-src/src/app.html index 4e3ceb9..3d4fafe 100644 --- a/frontend-src/src/app.html +++ b/frontend-src/src/app.html @@ -4,10 +4,10 @@ - openplace - Paint the world + FurryPlace - Paint the world - - + + diff --git a/frontend-src/src/routes/admin/+page.svelte b/frontend-src/src/routes/admin/+page.svelte index 29e8ca9..e1cf114 100644 --- a/frontend-src/src/routes/admin/+page.svelte +++ b/frontend-src/src/routes/admin/+page.svelte @@ -12,7 +12,7 @@ - Admin Dashboard - openplace + Admin Dashboard - FurryPlace
                      diff --git a/frontend-src/src/routes/join/+page.svelte b/frontend-src/src/routes/join/+page.svelte index 8616a50..f20f636 100644 --- a/frontend-src/src/routes/join/+page.svelte +++ b/frontend-src/src/routes/join/+page.svelte @@ -7,7 +7,7 @@ - Login - openplace + Login - FurryPlace
                      diff --git a/frontend-src/src/routes/moderation/+page.svelte b/frontend-src/src/routes/moderation/+page.svelte index 2cb0281..71c701f 100644 --- a/frontend-src/src/routes/moderation/+page.svelte +++ b/frontend-src/src/routes/moderation/+page.svelte @@ -11,7 +11,7 @@ - Moderation - openplace + Moderation - FurryPlace
                      diff --git a/frontend-src/static/_app/info.js b/frontend-src/static/_app/info.js index 0d17423..0fd6ed0 100644 --- a/frontend-src/static/_app/info.js +++ b/frontend-src/static/_app/info.js @@ -40,7 +40,7 @@ window.WPLACE_INFO = { footer: { email: "contact@wplace.live", discord: { url: "https://discord.gg/ZRC4DnP9Z2", text_en: "Feedback and bugs", text_zh: "反馈和错误报告" }, - github: { url: "https://github.com/openplaceteam", text_en: "Github", text_zh: "Github" }, + github: { url: "https://github.com/FurryPlaceteam", text_en: "Github", text_zh: "Github" }, instagram: { url: "https://www.instagram.com/wplace.live/", text_en: "Instagram", text_zh: "Instagram" }, terms: { url: "https://wplace.live/terms/terms-of-service", text_en: "Terms", text_zh: "条款" }, privacy: { url: "https://wplace.live/terms/privacy", text_en: "Privacy", text_zh: "隐私" } diff --git a/frontend/404.html b/frontend/404.html index 17e5659..cce3420 100644 --- a/frontend/404.html +++ b/frontend/404.html @@ -4,10 +4,10 @@ - openplace - Paint the world + FurryPlace - Paint the world - - + + diff --git a/frontend/_app/immutable/chunks/D8zjZoA1.js b/frontend/_app/immutable/chunks/D8zjZoA1.js index 991152a..d86fdbf 100644 --- a/frontend/_app/immutable/chunks/D8zjZoA1.js +++ b/frontend/_app/immutable/chunks/D8zjZoA1.js @@ -1 +1 @@ -import{w as n}from"./DgYqO0BT.js";const e="http://localhost:3000",l="https://maps.wplace.live/styles/liberty",o=!1,u=e,c=o;function s(){if(typeof navigator>"u")return"en";if(navigator.languages&&navigator.languages.length>0){const t=navigator.languages.find(a=>a.length===2);if(t)return t==="pt"?"pt":"en"}return(navigator.language||navigator.userLanguage||navigator.browserLanguage||"en").substring(0,2)==="pt"?"pt":"en"}const p=n(s()),f=n(void 0),g=n(Date.now());typeof window<"u"&&setInterval(()=>{g.set(Date.now())},500);const L=n(!0);export{u as A,c as E,l as M,f as c,p as l,g as n,L as o}; +import{w as n}from"./DgYqO0BT.js";const e="http://localhost:3000",l="/maps/styles/liberty",o=!1,u=e,c=o;function s(){if(typeof navigator>"u")return"en";if(navigator.languages&&navigator.languages.length>0){const t=navigator.languages.find(a=>a.length===2);if(t)return t==="pt"?"pt":"en"}return(navigator.language||navigator.userLanguage||navigator.browserLanguage||"en").substring(0,2)==="pt"?"pt":"en"}const p=n(s()),f=n(void 0),g=n(Date.now());typeof window<"u"&&setInterval(()=>{g.set(Date.now())},500);const L=n(!0);export{u as A,c as E,l as M,f as c,p as l,g as n,L as o}; diff --git a/frontend/_app/immutable/nodes/4.f2OwZgt0.js b/frontend/_app/immutable/nodes/4.f2OwZgt0.js index 1ccfbd3..a89402e 100644 --- a/frontend/_app/immutable/nodes/4.f2OwZgt0.js +++ b/frontend/_app/immutable/nodes/4.f2OwZgt0.js @@ -1 +1 @@ -import{S as c,i as d,s as m,n as i,d as r,b as l,r as b,u as p,h,e as f,w as x,k as u,j as v,l as g,y as _}from"../chunks/DfpL3vsM.js";import"../chunks/IHki7fMi.js";import{c as w}from"../chunks/C4PhwnwB.js";import"../chunks/CmyxTY1z.js";import{g as y}from"../chunks/BPIWuEio.js";function k(n){let t,e,s='

                      Dashboard

                      Admin dashboard content coming soon...

                      ';return{c(){t=u(),e=v("div"),e.innerHTML=s,this.h()},l(a){p("svelte-1l26xoh",document.head).forEach(r),t=h(a),e=f(a,"DIV",{class:!0,"data-svelte-h":!0}),x(e)!=="svelte-38hood"&&(e.innerHTML=s),this.h()},h(){document.title="Admin Dashboard - openplace",b(e,"class","bg-base-200 min-h-screen")},m(a,o){l(a,t,o),l(a,e,o)},p:i,i,o:i,d(a){a&&(r(t),r(e))}}}function A(n,t,e){let s;return g(n,w,a=>e(0,s=a)),_(()=>{(!s||s.allianceRole!=="admin")&&y("/")}),[]}class C extends c{constructor(t){super(),d(this,t,A,k,m,{})}}export{C as component}; +import{S as c,i as d,s as m,n as i,d as r,b as l,r as b,u as p,h,e as f,w as x,k as u,j as v,l as g,y as _}from"../chunks/DfpL3vsM.js";import"../chunks/IHki7fMi.js";import{c as w}from"../chunks/C4PhwnwB.js";import"../chunks/CmyxTY1z.js";import{g as y}from"../chunks/BPIWuEio.js";function k(n){let t,e,s='

                      Dashboard

                      Admin dashboard content coming soon...

                      ';return{c(){t=u(),e=v("div"),e.innerHTML=s,this.h()},l(a){p("svelte-1l26xoh",document.head).forEach(r),t=h(a),e=f(a,"DIV",{class:!0,"data-svelte-h":!0}),x(e)!=="svelte-38hood"&&(e.innerHTML=s),this.h()},h(){document.title="Admin Dashboard - FurryPlace",b(e,"class","bg-base-200 min-h-screen")},m(a,o){l(a,t,o),l(a,e,o)},p:i,i,o:i,d(a){a&&(r(t),r(e))}}}function A(n,t,e){let s;return g(n,w,a=>e(0,s=a)),_(()=>{(!s||s.allianceRole!=="admin")&&y("/")}),[]}class C extends c{constructor(t){super(),d(this,t,A,k,m,{})}}export{C as component}; diff --git a/frontend/_app/immutable/nodes/5.DDnyeRGE.js b/frontend/_app/immutable/nodes/5.DDnyeRGE.js index 0b8dea7..c730a8b 100644 --- a/frontend/_app/immutable/nodes/5.DDnyeRGE.js +++ b/frontend/_app/immutable/nodes/5.DDnyeRGE.js @@ -1 +1 @@ -import{S as be,i as xe,s as Ae,d as s,m as $e,o as me,p as pe,a as H,r as e,z as C,b as de,c as t,q as ze,e as x,f as c,v as Be,h as w,G as z,g as S,j as A,x as Ie,k as b,H as B,t as T,l as ve,u as Me}from"../chunks/DfpL3vsM.js";import"../chunks/IHki7fMi.js";import{E as Le,A as Ce,c as De}from"../chunks/D8zjZoA1.js";import{t as Pe}from"../chunks/CmyxTY1z.js";import{L as Ue}from"../chunks/DBKVvboF.js";import{p as ye}from"../chunks/DIeP6ySR.js";function He(r){let a,o,f,u,v,h,m,l,p,g,I,P,U,ae,k=r[3]("loginWith",{provider:"Google"})+"",J,le,_,$,y,D,F,O,se,R=r[3]("loginWith",{provider:"Twitch"})+"",K,oe,ne,E,W=r[3]("termsAgreement")+"",Q,ie,L,j=r[3]("termsOfService")+"",X,ce,G=r[3]("and")+"",Y,fe,V,q=r[3]("privacyPolicy")+"",Z,d;f=new Ue({props:{size:"lg",hasText:!0}});let ge=Le;return{c(){a=A("div"),o=A("div"),Ie(f.$$.fragment),u=b(),v=A("form"),h=b(),m=A("div"),l=A("a"),p=B("svg"),g=B("path"),I=B("path"),P=B("path"),U=B("path"),ae=b(),J=T(k),le=b(),_=A("a"),$=B("svg"),y=B("path"),D=B("g"),F=B("path"),O=B("path"),se=b(),K=T(R),oe=b(),ne=b(),E=A("p"),Q=T(W),ie=b(),L=A("a"),X=T(j),ce=b(),Y=T(G),fe=b(),V=A("a"),Z=T(q),this.h()},l(i){a=x(i,"DIV",{class:!0});var n=c(a);o=x(n,"DIV",{class:!0});var _e=c(o);Be(f.$$.fragment,_e),_e.forEach(s),u=w(n),v=x(n,"FORM",{class:!0});var Ve=c(v);Ve.forEach(s),h=w(n),m=x(n,"DIV",{class:!0});var ee=c(m);l=x(ee,"A",{href:!0,class:!0});var te=c(l);p=z(te,"svg",{class:!0,viewBox:!0,xmlns:!0});var N=c(p);g=z(N,"path",{d:!0,fill:!0}),c(g).forEach(s),I=z(N,"path",{d:!0,fill:!0}),c(I).forEach(s),P=z(N,"path",{d:!0,fill:!0}),c(P).forEach(s),U=z(N,"path",{d:!0,fill:!0}),c(U).forEach(s),N.forEach(s),ae=w(te),J=S(te,k),te.forEach(s),le=w(ee),_=x(ee,"A",{href:!0,class:!0});var re=c(_);$=z(re,"svg",{class:!0,xmlns:!0,"xml:space":!0,viewBox:!0});var he=c($);y=z(he,"path",{fill:!0,d:!0}),c(y).forEach(s),D=z(he,"g",{fill:!0});var ue=c(D);F=z(ue,"path",{d:!0}),c(F).forEach(s),O=z(ue,"path",{d:!0}),c(O).forEach(s),ue.forEach(s),he.forEach(s),se=w(re),K=S(re,R),re.forEach(s),ee.forEach(s),oe=w(n),ne=w(n),E=x(n,"P",{class:!0});var M=c(E);Q=S(M,W),ie=w(M),L=x(M,"A",{class:!0,href:!0,target:!0});var Ee=c(L);X=S(Ee,j),Ee.forEach(s),ce=w(M),Y=S(M,G),fe=w(M),V=x(M,"A",{class:!0,href:!0,target:!0});var we=c(V);Z=S(we,q),we.forEach(s),M.forEach(s),n.forEach(s),this.h()},h(){e(o,"class","flex justify-center mb-6"),e(v,"class","w-full"),e(g,"d","M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027"),e(g,"fill","#4285F4"),e(I,"d","M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1"),e(I,"fill","#34A853"),e(P,"d","M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782"),e(P,"fill","#FBBC05"),e(U,"d","M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251"),e(U,"fill","#EB4335"),e(p,"class","mr-1 size-5"),e(p,"viewBox","0 0 256 262"),e(p,"xmlns","http://www.w3.org/2000/svg"),e(l,"href",r[2]),e(l,"class","btn btn-lg bg-base-100 w-full text-base"),C(l,"opacity-50",r[0]),C(l,"pointer-events-none",r[0]),e(y,"fill","#fff"),e(y,"d","m2200 1300-400 400h-400l-350 350v-350H600V200h1600z"),e(F,"d","M500 0 0 500v1800h600v500l500-500h400l900-900V0H500zm1700 1300-400 400h-400l-350 350v-350H600V200h1600v1100z"),e(O,"d","M1700 550h200v600h-200zm-550 0h200v600h-200z"),e(D,"fill","#9146ff"),e($,"class","mr-1 size-5"),e($,"xmlns","http://www.w3.org/2000/svg"),e($,"xml:space","preserve"),e($,"viewBox","0 0 2400 2800"),e(_,"href",r[1]),e(_,"class","btn btn-lg bg-base-100 w-full text-base"),C(_,"opacity-50",r[0]),C(_,"pointer-events-none",r[0]),e(m,"class","mt-6 flex flex-col items-center gap-2 w-full"),e(L,"class","font-medium"),e(L,"href","/terms/terms-of-service"),e(L,"target","_blank"),e(V,"class","font-medium"),e(V,"href","/terms/privacy"),e(V,"target","_blank"),e(E,"class","text-base-content/60 mt-6 text-center text-sm"),e(a,"class","flex flex-col items-center max-w-md mx-auto p-6")},m(i,n){de(i,a,n),t(a,o),ze(f,o,null),t(a,u),t(a,v),t(a,h),t(a,m),t(m,l),t(l,p),t(p,g),t(p,I),t(p,P),t(p,U),t(l,ae),t(l,J),t(m,le),t(m,_),t(_,$),t($,y),t($,D),t(D,F),t(D,O),t(_,se),t(_,K),t(a,oe),t(a,ne),t(a,E),t(E,Q),t(E,ie),t(E,L),t(L,X),t(E,ce),t(E,Y),t(E,fe),t(E,V),t(V,Z),d=!0},p(i,[n]){(!d||n&8)&&k!==(k=i[3]("loginWith",{provider:"Google"})+"")&&H(J,k),(!d||n&4)&&e(l,"href",i[2]),(!d||n&1)&&C(l,"opacity-50",i[0]),(!d||n&1)&&C(l,"pointer-events-none",i[0]),(!d||n&8)&&R!==(R=i[3]("loginWith",{provider:"Twitch"})+"")&&H(K,R),(!d||n&2)&&e(_,"href",i[1]),(!d||n&1)&&C(_,"opacity-50",i[0]),(!d||n&1)&&C(_,"pointer-events-none",i[0]),(!d||n&8)&&W!==(W=i[3]("termsAgreement")+"")&&H(Q,W),(!d||n&8)&&j!==(j=i[3]("termsOfService")+"")&&H(X,j),(!d||n&8)&&G!==(G=i[3]("and")+"")&&H(Y,G),(!d||n&8)&&q!==(q=i[3]("privacyPolicy")+"")&&H(Z,q)},i(i){d||(pe(f.$$.fragment,i),pe(ge),d=!0)},o(i){me(f.$$.fragment,i),me(ge),d=!1},d(i){i&&s(a),$e(f)}}}function Se(r,a,o){let f,u,v,h,m;ve(r,De,g=>o(5,h=g)),ve(r,Pe,g=>o(3,m=g));let{redirect:l=void 0}=a;function p(g){let I=`${Ce}/auth/${g}`;return l&&(I+=`?r=${encodeURIComponent(l)}`),I}return r.$$set=g=>{"redirect"in g&&o(4,l=g.redirect)},r.$$.update=()=>{r.$$.dirty&32&&o(0,v=Le)},o(2,f=p("google")),o(1,u=p("twitch")),[v,u,f,m,l,h]}class Te extends be{constructor(a){super(),xe(this,a,Se,He,Ae,{redirect:4})}}function ke(r){let a,o,f,u,v;return u=new Te({props:{redirect:r[0]}}),{c(){a=b(),o=A("div"),f=A("div"),Ie(u.$$.fragment),this.h()},l(h){Me("svelte-8b4dsz",document.head).forEach(s),a=w(h),o=x(h,"DIV",{class:!0});var l=c(o);f=x(l,"DIV",{class:!0});var p=c(f);Be(u.$$.fragment,p),p.forEach(s),l.forEach(s),this.h()},h(){document.title="Login - openplace",e(f,"class","bg-base-100 rounded-box shadow-xl p-8 max-w-md w-full"),e(o,"class","min-h-screen bg-base-200 flex items-center justify-center p-4")},m(h,m){de(h,a,m),de(h,o,m),t(o,f),ze(u,f,null),v=!0},p(h,[m]){const l={};m&1&&(l.redirect=h[0]),u.$set(l)},i(h){v||(pe(u.$$.fragment,h),v=!0)},o(h){me(u.$$.fragment,h),v=!1},d(h){h&&(s(a),s(o)),$e(u)}}}function Fe(r,a,o){let f,u;return ve(r,ye,v=>o(1,u=v)),r.$$.update=()=>{r.$$.dirty&2&&o(0,f=u.url.searchParams.get("r")||void 0)},[f,u]}class Ne extends be{constructor(a){super(),xe(this,a,Fe,ke,Ae,{})}}export{Ne as component}; +import{S as be,i as xe,s as Ae,d as s,m as $e,o as me,p as pe,a as H,r as e,z as C,b as de,c as t,q as ze,e as x,f as c,v as Be,h as w,G as z,g as S,j as A,x as Ie,k as b,H as B,t as T,l as ve,u as Me}from"../chunks/DfpL3vsM.js";import"../chunks/IHki7fMi.js";import{E as Le,A as Ce,c as De}from"../chunks/D8zjZoA1.js";import{t as Pe}from"../chunks/CmyxTY1z.js";import{L as Ue}from"../chunks/DBKVvboF.js";import{p as ye}from"../chunks/DIeP6ySR.js";function He(r){let a,o,f,u,v,h,m,l,p,g,I,P,U,ae,k=r[3]("loginWith",{provider:"Google"})+"",J,le,_,$,y,D,F,O,se,R=r[3]("loginWith",{provider:"Twitch"})+"",K,oe,ne,E,W=r[3]("termsAgreement")+"",Q,ie,L,j=r[3]("termsOfService")+"",X,ce,G=r[3]("and")+"",Y,fe,V,q=r[3]("privacyPolicy")+"",Z,d;f=new Ue({props:{size:"lg",hasText:!0}});let ge=Le;return{c(){a=A("div"),o=A("div"),Ie(f.$$.fragment),u=b(),v=A("form"),h=b(),m=A("div"),l=A("a"),p=B("svg"),g=B("path"),I=B("path"),P=B("path"),U=B("path"),ae=b(),J=T(k),le=b(),_=A("a"),$=B("svg"),y=B("path"),D=B("g"),F=B("path"),O=B("path"),se=b(),K=T(R),oe=b(),ne=b(),E=A("p"),Q=T(W),ie=b(),L=A("a"),X=T(j),ce=b(),Y=T(G),fe=b(),V=A("a"),Z=T(q),this.h()},l(i){a=x(i,"DIV",{class:!0});var n=c(a);o=x(n,"DIV",{class:!0});var _e=c(o);Be(f.$$.fragment,_e),_e.forEach(s),u=w(n),v=x(n,"FORM",{class:!0});var Ve=c(v);Ve.forEach(s),h=w(n),m=x(n,"DIV",{class:!0});var ee=c(m);l=x(ee,"A",{href:!0,class:!0});var te=c(l);p=z(te,"svg",{class:!0,viewBox:!0,xmlns:!0});var N=c(p);g=z(N,"path",{d:!0,fill:!0}),c(g).forEach(s),I=z(N,"path",{d:!0,fill:!0}),c(I).forEach(s),P=z(N,"path",{d:!0,fill:!0}),c(P).forEach(s),U=z(N,"path",{d:!0,fill:!0}),c(U).forEach(s),N.forEach(s),ae=w(te),J=S(te,k),te.forEach(s),le=w(ee),_=x(ee,"A",{href:!0,class:!0});var re=c(_);$=z(re,"svg",{class:!0,xmlns:!0,"xml:space":!0,viewBox:!0});var he=c($);y=z(he,"path",{fill:!0,d:!0}),c(y).forEach(s),D=z(he,"g",{fill:!0});var ue=c(D);F=z(ue,"path",{d:!0}),c(F).forEach(s),O=z(ue,"path",{d:!0}),c(O).forEach(s),ue.forEach(s),he.forEach(s),se=w(re),K=S(re,R),re.forEach(s),ee.forEach(s),oe=w(n),ne=w(n),E=x(n,"P",{class:!0});var M=c(E);Q=S(M,W),ie=w(M),L=x(M,"A",{class:!0,href:!0,target:!0});var Ee=c(L);X=S(Ee,j),Ee.forEach(s),ce=w(M),Y=S(M,G),fe=w(M),V=x(M,"A",{class:!0,href:!0,target:!0});var we=c(V);Z=S(we,q),we.forEach(s),M.forEach(s),n.forEach(s),this.h()},h(){e(o,"class","flex justify-center mb-6"),e(v,"class","w-full"),e(g,"d","M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027"),e(g,"fill","#4285F4"),e(I,"d","M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1"),e(I,"fill","#34A853"),e(P,"d","M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782"),e(P,"fill","#FBBC05"),e(U,"d","M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251"),e(U,"fill","#EB4335"),e(p,"class","mr-1 size-5"),e(p,"viewBox","0 0 256 262"),e(p,"xmlns","http://www.w3.org/2000/svg"),e(l,"href",r[2]),e(l,"class","btn btn-lg bg-base-100 w-full text-base"),C(l,"opacity-50",r[0]),C(l,"pointer-events-none",r[0]),e(y,"fill","#fff"),e(y,"d","m2200 1300-400 400h-400l-350 350v-350H600V200h1600z"),e(F,"d","M500 0 0 500v1800h600v500l500-500h400l900-900V0H500zm1700 1300-400 400h-400l-350 350v-350H600V200h1600v1100z"),e(O,"d","M1700 550h200v600h-200zm-550 0h200v600h-200z"),e(D,"fill","#9146ff"),e($,"class","mr-1 size-5"),e($,"xmlns","http://www.w3.org/2000/svg"),e($,"xml:space","preserve"),e($,"viewBox","0 0 2400 2800"),e(_,"href",r[1]),e(_,"class","btn btn-lg bg-base-100 w-full text-base"),C(_,"opacity-50",r[0]),C(_,"pointer-events-none",r[0]),e(m,"class","mt-6 flex flex-col items-center gap-2 w-full"),e(L,"class","font-medium"),e(L,"href","/terms/terms-of-service"),e(L,"target","_blank"),e(V,"class","font-medium"),e(V,"href","/terms/privacy"),e(V,"target","_blank"),e(E,"class","text-base-content/60 mt-6 text-center text-sm"),e(a,"class","flex flex-col items-center max-w-md mx-auto p-6")},m(i,n){de(i,a,n),t(a,o),ze(f,o,null),t(a,u),t(a,v),t(a,h),t(a,m),t(m,l),t(l,p),t(p,g),t(p,I),t(p,P),t(p,U),t(l,ae),t(l,J),t(m,le),t(m,_),t(_,$),t($,y),t($,D),t(D,F),t(D,O),t(_,se),t(_,K),t(a,oe),t(a,ne),t(a,E),t(E,Q),t(E,ie),t(E,L),t(L,X),t(E,ce),t(E,Y),t(E,fe),t(E,V),t(V,Z),d=!0},p(i,[n]){(!d||n&8)&&k!==(k=i[3]("loginWith",{provider:"Google"})+"")&&H(J,k),(!d||n&4)&&e(l,"href",i[2]),(!d||n&1)&&C(l,"opacity-50",i[0]),(!d||n&1)&&C(l,"pointer-events-none",i[0]),(!d||n&8)&&R!==(R=i[3]("loginWith",{provider:"Twitch"})+"")&&H(K,R),(!d||n&2)&&e(_,"href",i[1]),(!d||n&1)&&C(_,"opacity-50",i[0]),(!d||n&1)&&C(_,"pointer-events-none",i[0]),(!d||n&8)&&W!==(W=i[3]("termsAgreement")+"")&&H(Q,W),(!d||n&8)&&j!==(j=i[3]("termsOfService")+"")&&H(X,j),(!d||n&8)&&G!==(G=i[3]("and")+"")&&H(Y,G),(!d||n&8)&&q!==(q=i[3]("privacyPolicy")+"")&&H(Z,q)},i(i){d||(pe(f.$$.fragment,i),pe(ge),d=!0)},o(i){me(f.$$.fragment,i),me(ge),d=!1},d(i){i&&s(a),$e(f)}}}function Se(r,a,o){let f,u,v,h,m;ve(r,De,g=>o(5,h=g)),ve(r,Pe,g=>o(3,m=g));let{redirect:l=void 0}=a;function p(g){let I=`${Ce}/auth/${g}`;return l&&(I+=`?r=${encodeURIComponent(l)}`),I}return r.$$set=g=>{"redirect"in g&&o(4,l=g.redirect)},r.$$.update=()=>{r.$$.dirty&32&&o(0,v=Le)},o(2,f=p("google")),o(1,u=p("twitch")),[v,u,f,m,l,h]}class Te extends be{constructor(a){super(),xe(this,a,Se,He,Ae,{redirect:4})}}function ke(r){let a,o,f,u,v;return u=new Te({props:{redirect:r[0]}}),{c(){a=b(),o=A("div"),f=A("div"),Ie(u.$$.fragment),this.h()},l(h){Me("svelte-8b4dsz",document.head).forEach(s),a=w(h),o=x(h,"DIV",{class:!0});var l=c(o);f=x(l,"DIV",{class:!0});var p=c(f);Be(u.$$.fragment,p),p.forEach(s),l.forEach(s),this.h()},h(){document.title="Login - FurryPlace",e(f,"class","bg-base-100 rounded-box shadow-xl p-8 max-w-md w-full"),e(o,"class","min-h-screen bg-base-200 flex items-center justify-center p-4")},m(h,m){de(h,a,m),de(h,o,m),t(o,f),ze(u,f,null),v=!0},p(h,[m]){const l={};m&1&&(l.redirect=h[0]),u.$set(l)},i(h){v||(pe(u.$$.fragment,h),v=!0)},o(h){me(u.$$.fragment,h),v=!1},d(h){h&&(s(a),s(o)),$e(u)}}}function Fe(r,a,o){let f,u;return ve(r,ye,v=>o(1,u=v)),r.$$.update=()=>{r.$$.dirty&2&&o(0,f=u.url.searchParams.get("r")||void 0)},[f,u]}class Ne extends be{constructor(a){super(),xe(this,a,Fe,ke,Ae,{})}}export{Ne as component}; diff --git a/frontend/_app/immutable/nodes/6.B67Jmz5Y.js b/frontend/_app/immutable/nodes/6.B67Jmz5Y.js index 7bbfd87..80a1656 100644 --- a/frontend/_app/immutable/nodes/6.B67Jmz5Y.js +++ b/frontend/_app/immutable/nodes/6.B67Jmz5Y.js @@ -1 +1 @@ -import{S as r,i as p,s as d,n as l,d as c,b as i,r as m,u as f,h,e as u,w as v,k as x,j as b,l as g,y as _}from"../chunks/DfpL3vsM.js";import"../chunks/IHki7fMi.js";import{c as w}from"../chunks/C4PhwnwB.js";import{g as y}from"../chunks/BPIWuEio.js";function k(o){let s,e,a='

                      Reported users

                      Open tickets: 0

                      No open tickets

                      Select a ticket to view details

                      ';return{c(){s=x(),e=b("div"),e.innerHTML=a,this.h()},l(t){f("svelte-h8o4mo",document.head).forEach(c),s=h(t),e=u(t,"DIV",{class:!0,"data-svelte-h":!0}),v(e)!=="svelte-1u2xloy"&&(e.innerHTML=a),this.h()},h(){document.title="Moderation - openplace",m(e,"class","bg-base-200 min-h-screen p-4")},m(t,n){i(t,s,n),i(t,e,n)},p:l,i:l,o:l,d(t){t&&(c(s),c(e))}}}function M(o,s,e){let a;return g(o,w,t=>e(0,a=t)),_(()=>{(!a||a.allianceRole==="member")&&y("/")}),[]}class $ extends r{constructor(s){super(),p(this,s,M,k,d,{})}}export{$ as component}; +import{S as r,i as p,s as d,n as l,d as c,b as i,r as m,u as f,h,e as u,w as v,k as x,j as b,l as g,y as _}from"../chunks/DfpL3vsM.js";import"../chunks/IHki7fMi.js";import{c as w}from"../chunks/C4PhwnwB.js";import{g as y}from"../chunks/BPIWuEio.js";function k(o){let s,e,a='

                      Reported users

                      Open tickets: 0

                      No open tickets

                      Select a ticket to view details

                      ';return{c(){s=x(),e=b("div"),e.innerHTML=a,this.h()},l(t){f("svelte-h8o4mo",document.head).forEach(c),s=h(t),e=u(t,"DIV",{class:!0,"data-svelte-h":!0}),v(e)!=="svelte-1u2xloy"&&(e.innerHTML=a),this.h()},h(){document.title="Moderation - FurryPlace",m(e,"class","bg-base-200 min-h-screen p-4")},m(t,n){i(t,s,n),i(t,e,n)},p:l,i:l,o:l,d(t){t&&(c(s),c(e))}}}function M(o,s,e){let a;return g(o,w,t=>e(0,a=t)),_(()=>{(!a||a.allianceRole==="member")&&y("/")}),[]}class $ extends r{constructor(s){super(),p(this,s,M,k,d,{})}}export{$ as component}; diff --git a/frontend/_app/info.js b/frontend/_app/info.js index 0d17423..0fd6ed0 100644 --- a/frontend/_app/info.js +++ b/frontend/_app/info.js @@ -40,7 +40,7 @@ window.WPLACE_INFO = { footer: { email: "contact@wplace.live", discord: { url: "https://discord.gg/ZRC4DnP9Z2", text_en: "Feedback and bugs", text_zh: "反馈和错误报告" }, - github: { url: "https://github.com/openplaceteam", text_en: "Github", text_zh: "Github" }, + github: { url: "https://github.com/FurryPlaceteam", text_en: "Github", text_zh: "Github" }, instagram: { url: "https://www.instagram.com/wplace.live/", text_en: "Instagram", text_zh: "Instagram" }, terms: { url: "https://wplace.live/terms/terms-of-service", text_en: "Terms", text_zh: "条款" }, privacy: { url: "https://wplace.live/terms/privacy", text_en: "Privacy", text_zh: "隐私" } diff --git a/frontend/admin.html b/frontend/admin.html index e12cd6e..001f5b3 100644 --- a/frontend/admin.html +++ b/frontend/admin.html @@ -4,10 +4,10 @@ - openplace - Paint the world + FurryPlace - Paint the world - - + + diff --git a/frontend/index.html b/frontend/index.html index e12cd6e..001f5b3 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -4,10 +4,10 @@ - openplace - Paint the world + FurryPlace - Paint the world - - + + diff --git a/frontend/join.html b/frontend/join.html index e12cd6e..001f5b3 100644 --- a/frontend/join.html +++ b/frontend/join.html @@ -4,10 +4,10 @@ - openplace - Paint the world + FurryPlace - Paint the world - - + + diff --git a/frontend/login.html b/frontend/login.html index ddeb24d..c8c3eaf 100644 --- a/frontend/login.html +++ b/frontend/login.html @@ -4,10 +4,10 @@ - openplace - Paint the world + FurryPlace - Paint the world - - + + diff --git a/frontend/moderation.html b/frontend/moderation.html index e12cd6e..001f5b3 100644 --- a/frontend/moderation.html +++ b/frontend/moderation.html @@ -4,10 +4,10 @@ - openplace - Paint the world + FurryPlace - Paint the world - - + + diff --git a/package-lock.json b/package-lock.json index f3820cd..85a7899 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "openplace", + "name": "FurryPlace", "version": "0.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "openplace", + "name": "FurryPlace", "version": "0.0.1", "dependencies": { "@napi-rs/canvas": "^0.1.80", @@ -13,16 +13,18 @@ "@tinyhttp/app": "^3.0.1", "@tinyhttp/cookie-parser": "^2.0.6", "@tinyhttp/cors": "^2.0.1", - "@types/bcryptjs": "^3.0.0", "@types/cookie-parser": "^1.4.9", "@types/jsonwebtoken": "^9.0.10", "@types/multer": "^2.0.0", - "@types/uuid": "^11.0.0", + "@types/passport": "^1.0.17", + "@types/passport-google-oauth20": "^2.0.16", "bcryptjs": "^3.0.2", "dotenv": "^17.2.2", "jsonwebtoken": "^9.0.2", "multer": "^2.0.2", "mysql2": "^3.15.1", + "passport": "^0.7.0", + "passport-google-oauth20": "^2.0.0", "prisma": "^6.16.2", "tsx": "^4.20.6", "uuid": "^13.0.0" @@ -34,8 +36,14 @@ "@types/supertest": "^6.0.3", "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", + "csv-parse": "^6.1.0", "eslint": "^8.57.1", "eslint-config-chariz": "^1.6.0", + "eslint-plugin-jsx-a11y": "^6.10.2", + "eslint-plugin-react": "^7.37.5", + "eslint-plugin-react-hooks": "^4.6.2", + "eslint-plugin-simple-import-sort": "^12.1.1", + "eslint-plugin-unicorn": "^47.0.0", "husky": "^9.1.7", "lint-staged": "^15.5.2", "supertest": "^7.1.4", @@ -855,9 +863,9 @@ } }, "node_modules/@prisma/client": { - "version": "6.16.2", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-6.16.2.tgz", - "integrity": "sha512-E00PxBcalMfYO/TWnXobBVUai6eW/g5OsifWQsQDzJYm7yaY+IRLo7ZLsaefi0QkTpxfuhFcQ/w180i6kX3iJw==", + "version": "6.16.3", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-6.16.3.tgz", + "integrity": "sha512-JfNfAtXG+/lIopsvoZlZiH2k5yNx87mcTS4t9/S5oufM1nKdXYxOvpDC1XoTCFBa5cQh7uXnbMPsmZrwZY80xw==", "hasInstallScript": true, "license": "Apache-2.0", "engines": { @@ -877,9 +885,9 @@ } }, "node_modules/@prisma/config": { - "version": "6.16.2", - "resolved": "https://registry.npmjs.org/@prisma/config/-/config-6.16.2.tgz", - "integrity": "sha512-mKXSUrcqXj0LXWPmJsK2s3p9PN+aoAbyMx7m5E1v1FufofR1ZpPoIArjjzOIm+bJRLLvYftoNYLx1tbHgF9/yg==", + "version": "6.16.3", + "resolved": "https://registry.npmjs.org/@prisma/config/-/config-6.16.3.tgz", + "integrity": "sha512-VlsLnG4oOuKGGMToEeVaRhoTBZu5H3q51jTQXb/diRags3WV0+BQK5MolJTtP6G7COlzoXmWeS11rNBtvg+qFQ==", "license": "Apache-2.0", "dependencies": { "c12": "3.1.0", @@ -889,48 +897,48 @@ } }, "node_modules/@prisma/debug": { - "version": "6.16.2", - "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-6.16.2.tgz", - "integrity": "sha512-bo4/gA/HVV6u8YK2uY6glhNsJ7r+k/i5iQ9ny/3q5bt9ijCj7WMPUwfTKPvtEgLP+/r26Z686ly11hhcLiQ8zA==", + "version": "6.16.3", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-6.16.3.tgz", + "integrity": "sha512-89DdqWtdKd7qoc9/qJCKLTazj3W3zPEiz0hc7HfZdpjzm21c7orOUB5oHWJsG+4KbV4cWU5pefq3CuDVYF9vgA==", "license": "Apache-2.0" }, "node_modules/@prisma/engines": { - "version": "6.16.2", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-6.16.2.tgz", - "integrity": "sha512-7yf3AjfPUgsg/l7JSu1iEhsmZZ/YE00yURPjTikqm2z4btM0bCl2coFtTGfeSOWbQMmq45Jab+53yGUIAT1sjA==", + "version": "6.16.3", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-6.16.3.tgz", + "integrity": "sha512-b+Rl4nzQDcoqe6RIpSHv8f5lLnwdDGvXhHjGDiokObguAAv/O1KaX1Oc69mBW/GFWKQpCkOraobLjU6s1h8HGg==", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@prisma/debug": "6.16.2", - "@prisma/engines-version": "6.16.0-7.1c57fdcd7e44b29b9313256c76699e91c3ac3c43", - "@prisma/fetch-engine": "6.16.2", - "@prisma/get-platform": "6.16.2" + "@prisma/debug": "6.16.3", + "@prisma/engines-version": "6.16.1-1.bb420e667c1820a8c05a38023385f6cc7ef8e83a", + "@prisma/fetch-engine": "6.16.3", + "@prisma/get-platform": "6.16.3" } }, "node_modules/@prisma/engines-version": { - "version": "6.16.0-7.1c57fdcd7e44b29b9313256c76699e91c3ac3c43", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-6.16.0-7.1c57fdcd7e44b29b9313256c76699e91c3ac3c43.tgz", - "integrity": "sha512-ThvlDaKIVrnrv97ujNFDYiQbeMQpLa0O86HFA2mNoip4mtFqM7U5GSz2ie1i2xByZtvPztJlNRgPsXGeM/kqAA==", + "version": "6.16.1-1.bb420e667c1820a8c05a38023385f6cc7ef8e83a", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-6.16.1-1.bb420e667c1820a8c05a38023385f6cc7ef8e83a.tgz", + "integrity": "sha512-fftRmosBex48Ph1v2ll1FrPpirwtPZpNkE5CDCY1Lw2SD2ctyrLlVlHiuxDAAlALwWBOkPbAll4+EaqdGuMhJw==", "license": "Apache-2.0" }, "node_modules/@prisma/fetch-engine": { - "version": "6.16.2", - "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-6.16.2.tgz", - "integrity": "sha512-wPnZ8DMRqpgzye758ZvfAMiNJRuYpz+rhgEBZi60ZqDIgOU2694oJxiuu3GKFeYeR/hXxso4/2oBC243t/whxQ==", + "version": "6.16.3", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-6.16.3.tgz", + "integrity": "sha512-bUoRIkVaI+CCaVGrSfcKev0/Mk4ateubqWqGZvQ9uCqFv2ENwWIR3OeNuGin96nZn5+SkebcD7RGgKr/+mJelw==", "license": "Apache-2.0", "dependencies": { - "@prisma/debug": "6.16.2", - "@prisma/engines-version": "6.16.0-7.1c57fdcd7e44b29b9313256c76699e91c3ac3c43", - "@prisma/get-platform": "6.16.2" + "@prisma/debug": "6.16.3", + "@prisma/engines-version": "6.16.1-1.bb420e667c1820a8c05a38023385f6cc7ef8e83a", + "@prisma/get-platform": "6.16.3" } }, "node_modules/@prisma/get-platform": { - "version": "6.16.2", - "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-6.16.2.tgz", - "integrity": "sha512-U/P36Uke5wS7r1+omtAgJpEB94tlT4SdlgaeTc6HVTTT93pXj7zZ+B/cZnmnvjcNPfWddgoDx8RLjmQwqGDYyA==", + "version": "6.16.3", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-6.16.3.tgz", + "integrity": "sha512-X1LxiFXinJ4iQehrodGp0f66Dv6cDL0GbRlcCoLtSu6f4Wi+hgo7eND/afIs5029GQLgNWKZ46vn8hjyXTsHLA==", "license": "Apache-2.0", "dependencies": { - "@prisma/debug": "6.16.2" + "@prisma/debug": "6.16.3" } }, "node_modules/@rollup/rollup-android-arm-eabi": { @@ -1505,16 +1513,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/bcryptjs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/bcryptjs/-/bcryptjs-3.0.0.tgz", - "integrity": "sha512-WRZOuCuaz8UcZZE4R5HXTco2goQSI2XxjGY3hbM/xDvwmqFWd4ivooImsMx65OKM6CtNKbnZ5YL+YwAwK7c1dg==", - "deprecated": "This is a stub types definition. bcryptjs provides its own type definitions, so you do not need this installed.", - "license": "MIT", - "dependencies": { - "bcryptjs": "*" - } - }, "node_modules/@types/body-parser": { "version": "1.19.6", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz", @@ -1632,9 +1630,9 @@ } }, "node_modules/@types/node": { - "version": "24.6.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.6.0.tgz", - "integrity": "sha512-F1CBxgqwOMc4GKJ7eY22hWhBVQuMYTtqI8L0FcszYcpYX0fzfDGpez22Xau8Mgm7O9fI+zA/TYIdq3tGWfweBA==", + "version": "24.6.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.6.2.tgz", + "integrity": "sha512-d2L25Y4j+W3ZlNAeMKcy7yDsK425ibcAOO2t7aPTz6gNMH0z2GThtwENCDc0d/Pw9wgyRqE5Px1wkV7naz8ang==", "license": "MIT", "dependencies": { "undici-types": "~7.13.0" @@ -1647,6 +1645,46 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/oauth": { + "version": "0.9.6", + "resolved": "https://registry.npmjs.org/@types/oauth/-/oauth-0.9.6.tgz", + "integrity": "sha512-H9TRCVKBNOhZZmyHLqFt9drPM9l+ShWiqqJijU1B8P3DX3ub84NjxDuy+Hjrz+fEca5Kwip3qPMKNyiLgNJtIA==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/passport": { + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/@types/passport/-/passport-1.0.17.tgz", + "integrity": "sha512-aciLyx+wDwT2t2/kJGJR2AEeBz0nJU4WuRX04Wu9Dqc5lSUtwu0WERPHYsLhF9PtseiAMPBGNUOtFjxZ56prsg==", + "license": "MIT", + "dependencies": { + "@types/express": "*" + } + }, + "node_modules/@types/passport-google-oauth20": { + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@types/passport-google-oauth20/-/passport-google-oauth20-2.0.16.tgz", + "integrity": "sha512-ayXK2CJ7uVieqhYOc6k/pIr5pcQxOLB6kBev+QUGS7oEZeTgIs1odDobXRqgfBPvXzl0wXCQHftV5220czZCPA==", + "license": "MIT", + "dependencies": { + "@types/express": "*", + "@types/passport": "*", + "@types/passport-oauth2": "*" + } + }, + "node_modules/@types/passport-oauth2": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@types/passport-oauth2/-/passport-oauth2-1.8.0.tgz", + "integrity": "sha512-6//z+4orIOy/g3zx17HyQ71GSRK4bs7Sb+zFasRoc2xzlv7ZCJ+vkDBYFci8U6HY+or6Zy7ajf4mz4rK7nsWJQ==", + "license": "MIT", + "dependencies": { + "@types/express": "*", + "@types/oauth": "*", + "@types/passport": "*" + } + }, "node_modules/@types/qs": { "version": "6.14.0", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.14.0.tgz", @@ -1711,16 +1749,6 @@ "@types/superagent": "^8.1.0" } }, - "node_modules/@types/uuid": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-11.0.0.tgz", - "integrity": "sha512-HVyk8nj2m+jcFRNazzqyVKiZezyhDKrGUA3jlEcg/nZ6Ms+qHwocba1Y/AaVaznJTAM9xpdFSh+ptbNrhOGvZA==", - "deprecated": "This is a stub types definition. uuid provides its own type definitions, so you do not need this installed.", - "license": "MIT", - "dependencies": { - "uuid": "*" - } - }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", @@ -2341,16 +2369,6 @@ "node": ">= 0.4" } }, - "node_modules/async-generator-function": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-generator-function/-/async-generator-function-1.0.0.tgz", - "integrity": "sha512-+NAXNqgCrB95ya4Sr66i1CL2hqLVckAk7xwRYWdcm39/ELQ6YNn1aw5r0bdQtqNZgQpEWzc5yc/igXc7aL5SLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -2410,6 +2428,15 @@ "dev": true, "license": "MIT" }, + "node_modules/base64url": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", + "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/bcryptjs": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-3.0.2.tgz", @@ -2853,6 +2880,13 @@ "node": ">= 8" } }, + "node_modules/csv-parse": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-6.1.0.tgz", + "integrity": "sha512-CEE+jwpgLn+MmtCpVcPtiCZpVtB6Z2OKPTr34pycYYoL7sxdOkXDdQ4lRiw6ioC0q6BLqhc6cKweCVvral8yhw==", + "dev": true, + "license": "MIT" + }, "node_modules/damerau-levenshtein": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", @@ -3481,6 +3515,16 @@ "typescript": "*" } }, + "node_modules/eslint-config-chariz/node_modules/eslint-plugin-simple-import-sort": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-10.0.0.tgz", + "integrity": "sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "eslint": ">=5.0.0" + } + }, "node_modules/eslint-plugin-jsx-a11y": { "version": "6.10.2", "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz", @@ -3581,9 +3625,9 @@ } }, "node_modules/eslint-plugin-simple-import-sort": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-10.0.0.tgz", - "integrity": "sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-12.1.1.tgz", + "integrity": "sha512-6nuzu4xwQtE3332Uz0to+TxDQYRLTKRESSc2hefVT48Zc8JthmN23Gx9lnYhu0FtkRSL1oxny3kJ2aveVhmOVA==", "dev": true, "license": "MIT", "peerDependencies": { @@ -4067,9 +4111,9 @@ } }, "node_modules/generator-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.0.tgz", - "integrity": "sha512-xPypGGincdfyl/AiSGa7GjXLkvld9V7GjZlowup9SHIJnQnHLFiLODCd/DqKOp0PBagbHJ68r1KJI9Mut7m4sA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz", + "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", "dev": true, "license": "MIT", "engines": { @@ -4100,20 +4144,17 @@ } }, "node_modules/get-intrinsic": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.1.tgz", - "integrity": "sha512-fk1ZVEeOX9hVZ6QzoBNEC55+Ucqg4sTVwrVuigZhuRPESVFpMyXnd3sbXvPOwp7Y9riVyANiqhEuRF0G1aVSeQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", "dev": true, "license": "MIT", "dependencies": { - "async-function": "^1.0.0", - "async-generator-function": "^1.0.0", "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", - "generator-function": "^2.0.0", "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", @@ -4749,14 +4790,15 @@ } }, "node_modules/is-generator-function": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", - "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz", + "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==", "dev": true, "license": "MIT", "dependencies": { - "call-bound": "^1.0.3", - "get-proto": "^1.0.0", + "call-bound": "^1.0.4", + "generator-function": "^2.0.0", + "get-proto": "^1.0.1", "has-tostringtag": "^1.0.2", "safe-regex-test": "^1.1.0" }, @@ -5040,9 +5082,9 @@ } }, "node_modules/jiti": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.0.tgz", - "integrity": "sha512-VXe6RjJkBPj0ohtqaO8vSWP3ZhAKo66fKrFNCll4BTcwljPLz03pCbaNKfzGP5MbrCYcbJ7v0nOYYwUzTEIdXQ==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz", + "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", "license": "MIT", "bin": { "jiti": "lib/jiti-cli.mjs" @@ -5951,6 +5993,12 @@ "node": "^14.16.0 || >=16.10.0" } }, + "node_modules/oauth": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.10.2.tgz", + "integrity": "sha512-JtFnB+8nxDEXgNyniwz573xxbKSOu3R8D40xQKqcjwJ2CDkYqUDI53o6IuzDJBx60Z8VKCm271+t8iFjakrl8Q==", + "license": "MIT" + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -6200,6 +6248,64 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/passport": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/passport/-/passport-0.7.0.tgz", + "integrity": "sha512-cPLl+qZpSc+ireUvt+IzqbED1cHHkDoVYMo30jbJIdOOjQ1MQYZBPiNvmi8UM6lJuOpTPXJGZQk0DtC4y61MYQ==", + "license": "MIT", + "dependencies": { + "passport-strategy": "1.x.x", + "pause": "0.0.1", + "utils-merge": "^1.0.1" + }, + "engines": { + "node": ">= 0.4.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jaredhanson" + } + }, + "node_modules/passport-google-oauth20": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/passport-google-oauth20/-/passport-google-oauth20-2.0.0.tgz", + "integrity": "sha512-KSk6IJ15RoxuGq7D1UKK/8qKhNfzbLeLrG3gkLZ7p4A6DBCcv7xpyQwuXtWdpyR0+E0mwkpjY1VfPOhxQrKzdQ==", + "license": "MIT", + "dependencies": { + "passport-oauth2": "1.x.x" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/passport-oauth2": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/passport-oauth2/-/passport-oauth2-1.8.0.tgz", + "integrity": "sha512-cjsQbOrXIDE4P8nNb3FQRCCmJJ/utnFKEz2NX209f7KOHPoX18gF7gBzBbLLsj2/je4KrgiwLLGjf0lm9rtTBA==", + "license": "MIT", + "dependencies": { + "base64url": "3.x.x", + "oauth": "0.10.x", + "passport-strategy": "1.x.x", + "uid2": "0.0.x", + "utils-merge": "1.x.x" + }, + "engines": { + "node": ">= 0.4.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jaredhanson" + } + }, + "node_modules/passport-strategy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/passport-strategy/-/passport-strategy-1.0.0.tgz", + "integrity": "sha512-CB97UUvDKJde2V0KDWWB3lyf6PC3FaZP7YxZ2G8OAtn9p4HI9j9JLP9qjOGZFvyl8uwNT8qM+hGnz/n16NI7oA==", + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -6263,6 +6369,11 @@ "node": "*" } }, + "node_modules/pause": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz", + "integrity": "sha512-KG8UEiEVkR3wGEb4m5yZkVCzigAD+cVEJck2CzYZO37ZGJfctvVptVO192MwrtPhzONn6go8ylnOdMhKqi4nfg==" + }, "node_modules/perfect-debounce": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-1.0.0.tgz", @@ -6408,14 +6519,14 @@ "license": "MIT" }, "node_modules/prisma": { - "version": "6.16.2", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-6.16.2.tgz", - "integrity": "sha512-aRvldGE5UUJTtVmFiH3WfNFNiqFlAtePUxcI0UEGlnXCX7DqhiMT5TRYwncHFeA/Reca5W6ToXXyCMTeFPdSXA==", + "version": "6.16.3", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-6.16.3.tgz", + "integrity": "sha512-4tJq3KB9WRshH5+QmzOLV54YMkNlKOtLKaSdvraI5kC/axF47HuOw6zDM8xrxJ6s9o2WodY654On4XKkrobQdQ==", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@prisma/config": "6.16.2", - "@prisma/engines": "6.16.2" + "@prisma/config": "6.16.3", + "@prisma/engines": "6.16.3" }, "bin": { "prisma": "build/index.js" @@ -7885,9 +7996,9 @@ "license": "MIT" }, "node_modules/typescript": { - "version": "5.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", - "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "devOptional": true, "license": "Apache-2.0", "bin": { @@ -7905,6 +8016,12 @@ "dev": true, "license": "MIT" }, + "node_modules/uid2": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/uid2/-/uid2-0.0.4.tgz", + "integrity": "sha512-IevTus0SbGwQzYh3+fRsAMTVVPOoIVufzacXcHPmdlle1jUpq7BRL+mw3dgeLanvGZdwwbWhRV6XrcFNdBmjWA==", + "license": "MIT" + }, "node_modules/unbox-primitive": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", @@ -7946,6 +8063,15 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "license": "MIT" }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/uuid": { "version": "13.0.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-13.0.0.tgz", diff --git a/package.json b/package.json index ebe215f..a5a5697 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "openplace", + "name": "FurryPlace", "version": "0.0.1", "private": true, "type": "module", @@ -14,7 +14,8 @@ "lint:fix": "pnpm -s lint --fix", "db:push": "prisma db push && prisma generate", "db:generate": "prisma generate", - "db:migrate": "prisma migrate dev" + "db:migrate": "prisma migrate dev", + "import:regions": "tsx scripts/import-regions.ts" }, "devDependencies": { "@tsconfig/node24": "^24.0.1", @@ -23,6 +24,7 @@ "@types/supertest": "^6.0.3", "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", + "csv-parse": "^6.1.0", "eslint": "^8.57.1", "eslint-config-chariz": "^1.6.0", "eslint-plugin-jsx-a11y": "^6.10.2", @@ -49,11 +51,15 @@ "@types/cookie-parser": "^1.4.9", "@types/jsonwebtoken": "^9.0.10", "@types/multer": "^2.0.0", + "@types/passport": "^1.0.17", + "@types/passport-google-oauth20": "^2.0.16", "bcryptjs": "^3.0.2", "dotenv": "^17.2.2", "jsonwebtoken": "^9.0.2", "multer": "^2.0.2", "mysql2": "^3.15.1", + "passport": "^0.7.0", + "passport-google-oauth20": "^2.0.0", "prisma": "^6.16.2", "tsx": "^4.20.6", "uuid": "^13.0.0" diff --git a/prisma/schema.prisma b/prisma/schema.prisma index cb273bc..358c031 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -13,7 +13,8 @@ model User { discord String? country String email String? @unique - passwordHash String + passwordHash String? + googleId String? @unique banned Boolean @default(false) timeoutUntil DateTime @default(now()) needsPhoneVerification Boolean @default(false) diff --git a/scripts/README.md b/scripts/README.md new file mode 100644 index 0000000..a71b8b3 --- /dev/null +++ b/scripts/README.md @@ -0,0 +1,175 @@ +# Region Data Scraping Guide + +This guide explains how to scrape region data from wplace.live and import it into your database. + +## Prerequisites + +- Python 3.7+ with `cloudscraper` library +- Node.js with `tsx` and `csv-parse` packages + +Install dependencies: +```bash +# Python - required to bypass Cloudflare and use SOCKS5 proxies +pip install cloudscraper pysocks + +# Node.js (already installed via npm) +npm install -D csv-parse tsx +``` + +## Steps + +### 1. Scrape Region Data + +Run the Python scraper to fetch region data from wplace.live: + +```bash +python scripts/scrape_regions.py +``` + +This will create two CSV files: +- `regions.csv` - Unique regions (id, name, cityId, countryId, etc.) +- `tile_region_mapping.csv` - Tile-to-region mappings + +**How it works:** +- Since regions are determined by tile coordinates (not individual pixels), the script samples ONE pixel per tile +- This is much faster than the old approach - only ~4 million requests instead of 42 million! +- Default: Samples all tiles (TILE_SAMPLE_STEP=1) + +**Configuration options** in `scrape_regions.py`: +- `TILE_SAMPLE_STEP` - Sample every Nth tile (1 = all tiles, 2 = every other tile, etc.) +- `TILE_X_MIN/MAX`, `TILE_Y_MIN/MAX` - Canvas bounds to scrape (default: 0-2047) + +⏱️ **Estimated time**: With default settings and 0.05s delay between requests, this will take approximately: +- ~4.2 million tiles × 0.05s = ~58 hours +- For faster testing: Set `TILE_SAMPLE_STEP = 10` (~6 hours) or `TILE_SAMPLE_STEP = 100` (~35 minutes) + +### 2. Import into Database + +Once you have the CSV files, import them: + +```bash +npm run import:regions +``` + +This will: +- Import all unique regions into the `Region` table +- Analyze tile coverage for each region +- Display which regions have the most tiles + +### 3. Create TileRegion Lookup Table + +Add this to your `prisma/schema.prisma`: + +```prisma +model TileRegion { + tileX Int + tileY Int + regionId Int + region Region @relation(fields: [regionId], references: [id]) + + @@unique([tileX, tileY]) + @@index([tileX, tileY]) +} +``` + +Then run: +```bash +npm run db:push +``` + +### 4. Import Tile Mappings + +Create a new script `scripts/import-tile-mappings.ts`: + +```typescript +#!/usr/bin/env tsx +import { PrismaClient } from "@prisma/client"; +import { readFileSync } from "fs"; +import { parse } from "csv-parse/sync"; + +const prisma = new PrismaClient(); + +interface TileRow { + tile_x: string; + tile_y: string; + region_id: string; + city_id: string; + region_name: string; + region_number: string; + country_id: string; + flag_id: string; +} + +async function main() { + const csvContent = readFileSync("tile_region_mapping.csv", "utf-8"); + const records = parse(csvContent, { + columns: true, + skip_empty_lines: true + }) as TileRow[]; + + console.log(`Importing ${records.length} tile mappings...`); + + // Batch insert for performance + const batchSize = 1000; + for (let i = 0; i < records.length; i += batchSize) { + const batch = records.slice(i, i + batchSize); + await prisma.tileRegion.createMany({ + data: batch.map(r => ({ + tileX: Number.parseInt(r.tile_x), + tileY: Number.parseInt(r.tile_y), + regionId: Number.parseInt(r.region_id) + })), + skipDuplicates: true + }); + console.log(`Imported ${Math.min(i + batchSize, records.length)} / ${records.length}`); + } + + console.log("✓ Import complete!"); + await prisma.$disconnect(); +} + +main(); +``` + +Run it: `tsx scripts/import-tile-mappings.ts` + +### 5. Update Region Lookup Function + +Update `src/config/regions.ts`: + +```typescript +import { prisma } from "./database.js"; + +export async function getRegionForCoordinates( + tileX: number, + tileY: number, + _x: number, + _y: number +): Promise { + const tileRegion = await prisma.tileRegion.findUnique({ + where: { tileX_tileY: { tileX, tileY } }, + include: { region: true } + }); + + if (!tileRegion) { + return null; + } + + return { + id: tileRegion.region.id, + cityId: tileRegion.region.cityId, + name: tileRegion.region.name, + number: tileRegion.region.number, + countryId: tileRegion.region.countryId, + flagId: tileRegion.countryId // Note: You might need to add flagId to Region model + }; +} +``` + +## Notes + +- The scraper includes a 0.05s delay between requests to be respectful to wplace.live's servers +- Each tile maps to exactly one region, making lookup very simple +- The TileRegion table will have ~4 million rows (one per tile on the canvas) +- Database lookups are fast thanks to the unique index on (tileX, tileY) +- The CSV files are plain text and can be inspected/edited before importing diff --git a/scripts/import-regions.ts b/scripts/import-regions.ts new file mode 100644 index 0000000..d93d1b9 --- /dev/null +++ b/scripts/import-regions.ts @@ -0,0 +1,172 @@ +#!/usr/bin/env tsx +/** + * Import region data from CSV files into the database. + * Run after generating CSVs with scrape_regions.py + * + * Usage: npm run import:regions + */ + +import { PrismaClient } from "@prisma/client"; +import { readFileSync } from "fs"; +import { parse } from "csv-parse/sync"; + +const prisma = new PrismaClient(); + +interface RegionRow { + id: string; + city_id: string; + name: string; + number: string; + country_id: string; + flag_id: string; +} + +interface TileRow { + tile_x: string; + tile_y: string; + region_id: string; + city_id: string; + region_name: string; + region_number: string; + country_id: string; + flag_id: string; +} + +async function importRegions() { + console.log("Importing regions from regions.csv..."); + + const csvContent = readFileSync("regions.csv", "utf-8"); + const records = parse(csvContent, { + columns: true, + skip_empty_lines: true + }) as RegionRow[]; + + console.log(`Found ${records.length} unique regions`); + + let imported = 0; + let skipped = 0; + + for (const record of records) { + try { + await prisma.region.upsert({ + where: { cityId: Number.parseInt(record.city_id) }, + create: { + id: Number.parseInt(record.id), + cityId: Number.parseInt(record.city_id), + name: record.name, + number: Number.parseInt(record.number), + countryId: Number.parseInt(record.country_id) + }, + update: { + name: record.name, + number: Number.parseInt(record.number), + countryId: Number.parseInt(record.country_id) + } + }); + imported++; + } catch (error) { + console.error(`Error importing region ${record.name}:`, error); + skipped++; + } + } + + console.log(`✓ Imported ${imported} regions (${skipped} skipped)`); +} + +async function analyzeTileMappings() { + console.log("\nAnalyzing tile mappings from tile_region_mapping.csv..."); + + const csvContent = readFileSync("tile_region_mapping.csv", "utf-8"); + const records = parse(csvContent, { + columns: true, + skip_empty_lines: true + }) as TileRow[]; + + console.log(`Found ${records.length} tile mappings`); + + // Build a map of region tile counts + const regionTileCounts = new Map(); + + for (const record of records) { + const regionId = Number.parseInt(record.region_id); + const tileX = Number.parseInt(record.tile_x); + const tileY = Number.parseInt(record.tile_y); + + const existing = regionTileCounts.get(regionId); + if (!existing) { + regionTileCounts.set(regionId, { + name: record.region_name, + tiles: 1, + minTileX: tileX, + maxTileX: tileX, + minTileY: tileY, + maxTileY: tileY + }); + } else { + existing.tiles++; + existing.minTileX = Math.min(existing.minTileX, tileX); + existing.maxTileX = Math.max(existing.maxTileX, tileX); + existing.minTileY = Math.min(existing.minTileY, tileY); + existing.maxTileY = Math.max(existing.maxTileY, tileY); + } + } + + console.log("\nRegion coverage analysis:"); + console.log("Region ID | Region Name | Tiles | Tile X Range | Tile Y Range"); + console.log("-".repeat(90)); + + // Sort by tile count descending + const sorted = [...regionTileCounts.entries()].sort((a, b) => b[1].tiles - a[1].tiles); + + for (const [regionId, coverage] of sorted.slice(0, 20)) { + const name = coverage.name.padEnd(24).substring(0, 24); + const xRange = `${coverage.minTileX}-${coverage.maxTileX}`.padStart(15); + const yRange = `${coverage.minTileY}-${coverage.maxTileY}`; + console.log(`${regionId.toString().padStart(9)} | ${name} | ${coverage.tiles.toString().padStart(5)} | ${xRange} | ${yRange}`); + } + + if (sorted.length > 20) { + console.log(`... and ${sorted.length - 20} more regions`); + } + + console.log("\n📊 This shows which tiles belong to which regions."); + console.log("💡 You can use this data to implement getRegionForCoordinates()."); +} + +async function main() { + try { + await importRegions(); + await analyzeTileMappings(); + + console.log("\n✅ Import complete!"); + console.log("\nNext steps:"); + console.log("1. Create a TileRegion lookup table in your database"); + console.log("2. Import the tile_region_mapping.csv data"); + console.log("3. Update getRegionForCoordinates() to query TileRegion table"); + console.log("\nExample Prisma schema addition:"); + console.log(` +model TileRegion { + tileX Int + tileY Int + regionId Int + region Region @relation(fields: [regionId], references: [id]) + + @@unique([tileX, tileY]) +} +`); + } catch (error) { + console.error("Error during import:", error); + process.exit(1); + } finally { + await prisma.$disconnect(); + } +} + +main(); diff --git a/scripts/regions.csv b/scripts/regions.csv new file mode 100644 index 0000000..d3c4d36 --- /dev/null +++ b/scripts/regions.csv @@ -0,0 +1,1025 @@ +id,city_id,name,number,country_id,flag_id +0,6919,Anchorage,1,235, +512,6919,Anchorage,56,235, +1024,6919,Anchorage,111,235, +1536,6919,Anchorage,166,235, +2048,6919,Anchorage,221,235, +2560,6919,Anchorage,276,235, +3072,6919,Anchorage,331,235, +3584,6919,Anchorage,386,235, +4096,6919,Anchorage,441,235, +4608,6919,Anchorage,496,235, +5120,6919,Anchorage,551,235, +5632,6919,Anchorage,606,235, +6144,6919,Anchorage,661,235, +6656,6919,Anchorage,716,235, +7168,6919,Anchorage,771,235, +7680,6919,Anchorage,826,235, +8192,6919,Anchorage,881,235, +8704,6919,Anchorage,936,235, +9216,6919,Anchorage,991,235, +9728,6919,Anchorage,1046,235, +10240,6919,Anchorage,1101,235, +10752,6919,Anchorage,1156,235, +11264,6919,Anchorage,1211,235, +11776,6919,Anchorage,1266,235, +12288,6919,Anchorage,1321,235, +12800,6919,Anchorage,1376,235, +13312,6919,Anchorage,1431,235, +13824,6919,Anchorage,1486,235, +14336,6919,Anchorage,1541,235, +14848,6919,Anchorage,1596,235, +15360,6919,Anchorage,1651,235, +15872,6919,Anchorage,1706,235, +16384,6919,Anchorage,1761,235, +16896,6919,Anchorage,1816,235, +17408,6919,Anchorage,1871,235, +17920,6919,Anchorage,1926,235, +18432,6919,Anchorage,1981,235, +18944,6919,Anchorage,2036,235, +19456,6919,Anchorage,2091,235, +19968,6919,Anchorage,2146,235, +20480,6919,Anchorage,2201,235, +20992,6919,Anchorage,2256,235, +21504,6919,Anchorage,2311,235, +22016,6919,Anchorage,2366,235, +22528,6919,Anchorage,2421,235, +23040,6919,Anchorage,2476,235, +23552,6919,Anchorage,2531,235, +24064,6919,Anchorage,2586,235, +24576,6919,Anchorage,2641,235, +25088,6919,Anchorage,2696,235, +25600,6919,Anchorage,2751,235, +26112,6919,Anchorage,2806,235, +26624,6919,Anchorage,2861,235, +27136,6919,Anchorage,2916,235, +27648,6919,Anchorage,2971,235, +28160,6919,Anchorage,3026,235, +28672,6919,Anchorage,3081,235, +29184,6919,Anchorage,3136,235, +29696,6919,Anchorage,3191,235, +30208,6919,Anchorage,3246,235, +30720,6919,Anchorage,3301,235, +31232,6919,Anchorage,3356,235, +31744,6919,Anchorage,3411,235, +32256,6919,Anchorage,3466,235, +32768,6919,Anchorage,3521,235, +33280,6919,Anchorage,3576,235, +33792,6919,Anchorage,3631,235, +34304,6919,Anchorage,3686,235, +34816,6919,Anchorage,3741,235, +35328,6919,Anchorage,3796,235, +35840,6919,Anchorage,3851,235, +36352,6919,Anchorage,3906,235, +36864,6919,Anchorage,3961,235, +37376,6919,Anchorage,4016,235, +37888,6919,Anchorage,4071,235, +38400,6919,Anchorage,4126,235, +38912,6919,Anchorage,4181,235, +39424,6919,Anchorage,4236,235, +39936,6919,Anchorage,4291,235, +40448,6919,Anchorage,4346,235, +40960,6919,Anchorage,4401,235, +41472,6919,Anchorage,4456,235, +41984,6919,Anchorage,4510,235, +42496,6919,Anchorage,4564,235, +43008,6919,Anchorage,4618,235, +43520,6919,Anchorage,4672,235, +44032,6919,Anchorage,4726,235, +44544,6919,Anchorage,4780,235, +45056,6919,Anchorage,4834,235, +45568,6919,Anchorage,4888,235, +46080,6919,Anchorage,4942,235, +46592,6919,Anchorage,4996,235, +47104,6919,Anchorage,5050,235, +47616,6919,Anchorage,5104,235, +48128,6919,Anchorage,5158,235, +48640,6919,Anchorage,5212,235, +49152,6919,Anchorage,5266,235, +49664,6919,Anchorage,5320,235, +50176,6919,Anchorage,5374,235, +50688,6919,Anchorage,5428,235, +51200,6919,Anchorage,5482,235, +51712,6919,Anchorage,5536,235, +52224,6919,Anchorage,5590,235, +52736,6919,Anchorage,5644,235, +53248,6919,Anchorage,5698,235, +53760,6919,Anchorage,5752,235, +54272,6919,Anchorage,5806,235, +54784,6919,Anchorage,5860,235, +55296,6919,Anchorage,5914,235, +55808,6919,Anchorage,5968,235, +56320,6919,Anchorage,6022,235, +56832,6919,Anchorage,6076,235, +57344,6919,Anchorage,6130,235, +57856,6919,Anchorage,6184,235, +58368,6919,Anchorage,6238,235, +58880,6919,Anchorage,6292,235, +59392,6919,Anchorage,6346,235, +59904,6919,Anchorage,6400,235, +60416,6919,Anchorage,6454,235, +60928,6919,Anchorage,6508,235, +61440,6919,Anchorage,6562,235, +61952,6919,Anchorage,6616,235, +62464,6919,Anchorage,6670,235, +62976,6919,Anchorage,6724,235, +63488,6919,Anchorage,6778,235, +64000,6919,Anchorage,6832,235, +64512,6919,Anchorage,6886,235, +65024,6919,Anchorage,6940,235, +65536,6919,Anchorage,6994,235, +66048,6919,Anchorage,7048,235, +66560,6919,Anchorage,7102,235, +67072,6919,Anchorage,7156,235, +67584,6919,Anchorage,7210,235, +68096,6919,Anchorage,7264,235, +68608,6919,Anchorage,7318,235, +69120,6919,Anchorage,7372,235, +69632,6919,Anchorage,7426,235, +70144,6919,Anchorage,7480,235, +70656,6919,Anchorage,7534,235, +71168,6919,Anchorage,7588,235, +71680,6919,Anchorage,7642,235, +72192,6919,Anchorage,7696,235, +72704,6919,Anchorage,7750,235, +73216,6919,Anchorage,7804,235, +73728,6919,Anchorage,7858,235, +74240,6919,Anchorage,7912,235, +74752,6919,Anchorage,7966,235, +75264,6919,Anchorage,8020,235, +75776,6919,Anchorage,8074,235, +76288,6919,Anchorage,8128,235, +76800,6919,Anchorage,8182,235, +77312,6919,Anchorage,8236,235, +77824,6919,Anchorage,8290,235, +78336,6919,Anchorage,8344,235, +78848,6919,Anchorage,8398,235, +79360,6919,Anchorage,8452,235, +79872,6919,Anchorage,8506,235, +80384,6919,Anchorage,8560,235, +80896,6919,Anchorage,8613,235, +81408,6919,Anchorage,8666,235, +81920,6919,Anchorage,8719,235, +82432,6919,Anchorage,8772,235, +82944,6919,Anchorage,8825,235, +83456,6919,Anchorage,8878,235, +83968,6919,Anchorage,8931,235, +84480,6919,Anchorage,8984,235, +84992,6919,Anchorage,9037,235, +85504,6919,Anchorage,9089,235, +86016,6919,Anchorage,9141,235, +86528,6919,Anchorage,9193,235, +87040,6919,Anchorage,9245,235, +87552,6919,Anchorage,9297,235, +88064,6919,Anchorage,9349,235, +88576,6919,Anchorage,9401,235, +89088,6919,Anchorage,9453,235, +89600,6919,Anchorage,9505,235, +90112,6919,Anchorage,9556,235, +90624,6919,Anchorage,9607,235, +91136,6919,Anchorage,9658,235, +91648,6919,Anchorage,9709,235, +92160,6919,Anchorage,9760,235, +92672,3471,Honolulu,1,235, +93184,3471,Honolulu,4,235, +93696,3471,Honolulu,11,235, +94208,3471,Honolulu,21,235, +94720,3471,Honolulu,35,235, +95232,3471,Honolulu,53,235, +95744,3471,Honolulu,74,235, +96256,3471,Honolulu,99,235, +96768,3471,Honolulu,128,235, +97280,3471,Honolulu,160,235, +97792,3471,Honolulu,196,235, +98304,3471,Honolulu,236,235, +98816,3471,Honolulu,280,235, +99328,3471,Honolulu,327,235, +99840,3471,Honolulu,377,235, +100352,3471,Honolulu,428,235, +100864,3471,Honolulu,479,235, +101376,3471,Honolulu,530,235, +101888,3471,Honolulu,582,235, +102400,3471,Honolulu,634,235, +102912,3471,Honolulu,687,235, +103424,3471,Honolulu,740,235, +103936,3471,Honolulu,793,235, +104448,3471,Honolulu,847,235, +104960,3471,Honolulu,901,235, +105472,3471,Honolulu,956,235, +105984,3471,Honolulu,1011,235, +106496,3471,Honolulu,1066,235, +107008,3471,Honolulu,1122,235, +107520,3471,Honolulu,1178,235, +108032,3471,Honolulu,1235,235, +108544,3471,Honolulu,1292,235, +109056,3471,Honolulu,1349,235, +109568,3471,Honolulu,1407,235, +110080,3471,Honolulu,1465,235, +110592,3471,Honolulu,1524,235, +111104,3471,Honolulu,1583,235, +111616,3471,Honolulu,1643,235, +112128,3471,Honolulu,1703,235, +112640,3471,Honolulu,1763,235, +113152,3471,Honolulu,1824,235, +113664,3471,Honolulu,1885,235, +114176,3471,Honolulu,1946,235, +114688,3471,Honolulu,2008,235, +115200,3471,Honolulu,2070,235, +115712,3471,Honolulu,2132,235, +116224,3471,Honolulu,2195,235, +116736,3471,Honolulu,2258,235, +117248,3471,Honolulu,2321,235, +117760,3471,Honolulu,2385,235, +118272,3471,Honolulu,2449,235, +118784,3471,Honolulu,2513,235, +119296,3471,Honolulu,2578,235, +119808,3471,Honolulu,2643,235, +120320,3471,Honolulu,2708,235, +120832,3471,Honolulu,2773,235, +121344,3208,Atafu Village,1,223, +121856,3208,Atafu Village,2,223, +122368,3208,Atafu Village,5,223, +122880,3208,Atafu Village,10,223, +123392,3208,Atafu Village,17,223, +123904,3208,Atafu Village,26,223, +124416,3208,Atafu Village,37,223, +124928,3208,Atafu Village,50,223, +125440,3208,Atafu Village,65,223, +125952,3208,Atafu Village,82,223, +126464,3208,Atafu Village,101,223, +126976,3208,Atafu Village,122,223, +127488,3208,Atafu Village,145,223, +128000,3208,Atafu Village,170,223, +128512,3208,Atafu Village,194,223, +129024,3208,Atafu Village,218,223, +129536,3208,Atafu Village,241,223, +130048,3208,Atafu Village,263,223, +130560,3208,Atafu Village,285,223, +131072,3208,Atafu Village,306,223, +131584,3208,Atafu Village,326,223, +132096,3208,Atafu Village,346,223, +132608,3208,Atafu Village,365,223, +133120,3208,Atafu Village,383,223, +133632,3208,Atafu Village,401,223, +134144,3208,Atafu Village,418,223, +134656,3208,Atafu Village,434,223, +135168,3208,Atafu Village,450,223, +135680,3610,Mata-Utu,1,245, +136192,3610,Mata-Utu,2,245, +136704,3610,Mata-Utu,5,245, +137216,3610,Mata-Utu,9,245, +137728,3610,Mata-Utu,14,245, +138240,3609,Leava,1,245, +138752,3609,Leava,2,245, +139264,3609,Leava,3,245, +139776,3609,Leava,5,245, +140288,3609,Leava,7,245, +140800,3609,Leava,10,245, +141312,3609,Leava,13,245, +141824,3609,Leava,16,245, +142336,3609,Leava,19,245, +142848,3609,Leava,21,245, +143360,3609,Leava,23,245, +143872,3609,Leava,25,245, +144384,3609,Leava,26,245, +144896,3253,Nuku‘alofa,4,224, +145408,3253,Nuku‘alofa,9,224, +145920,3253,Nuku‘alofa,16,224, +146432,3253,Nuku‘alofa,24,224, +146944,3253,Nuku‘alofa,32,224, +147456,3253,Nuku‘alofa,39,224, +147968,3253,Nuku‘alofa,45,224, +148480,3253,Nuku‘alofa,51,224, +148992,3253,Nuku‘alofa,56,224, +149504,3253,Nuku‘alofa,60,224, +150016,3253,Nuku‘alofa,63,224, +150528,3253,Nuku‘alofa,66,224, +151040,3253,Nuku‘alofa,68,224, +151552,3252,‘Ohonua,88,224, +152064,3252,‘Ohonua,104,224, +152576,3252,‘Ohonua,120,224, +153088,3252,‘Ohonua,137,224, +153600,3252,‘Ohonua,154,224, +154112,3252,‘Ohonua,172,224, +154624,3252,‘Ohonua,190,224, +155136,3252,‘Ohonua,208,224, +155648,3252,‘Ohonua,226,224, +156160,2317,Waitangi,1,155, +156672,2317,Waitangi,6,155, +157184,2317,Waitangi,23,155, +157696,2317,Waitangi,42,155, +158208,2317,Waitangi,62,155, +158720,2317,Waitangi,83,155, +159232,2317,Waitangi,105,155, +159744,2317,Waitangi,128,155, +160256,2317,Waitangi,152,155, +160768,2317,Waitangi,177,155, +161280,2317,Waitangi,203,155, +161792,2317,Waitangi,230,155, +162304,2317,Waitangi,258,155, +162816,2317,Waitangi,287,155, +163328,2317,Waitangi,318,155, +163840,2317,Waitangi,350,155, +164352,2317,Waitangi,383,155, +164864,2317,Waitangi,417,155, +165376,2317,Waitangi,452,155, +165888,2317,Waitangi,488,155, +166400,2317,Waitangi,525,155, +166912,2317,Waitangi,563,155, +167424,2317,Waitangi,602,155, +167936,2317,Waitangi,642,155, +168448,2317,Waitangi,682,155, +168960,2317,Waitangi,723,155, +169472,2317,Waitangi,765,155, +169984,2317,Waitangi,808,155, +170496,2317,Waitangi,852,155, +171008,2317,Waitangi,898,155, +171520,2317,Waitangi,944,155, +172032,2317,Waitangi,991,155, +172544,2317,Waitangi,1038,155, +173056,2317,Waitangi,1085,155, +173568,2317,Waitangi,1132,155, +174080,2317,Waitangi,1180,155, +174592,2317,Waitangi,1228,155, +175104,2317,Waitangi,1276,155, +175616,2317,Waitangi,1324,155, +176128,2317,Waitangi,1373,155, +176640,2317,Waitangi,1422,155, +177152,2317,Waitangi,1471,155, +177664,2317,Waitangi,1520,155, +178176,2317,Waitangi,1570,155, +178688,2317,Waitangi,1620,155, +179200,2317,Waitangi,1670,155, +179712,2317,Waitangi,1720,155, +180224,2317,Waitangi,1771,155, +180736,2317,Waitangi,1822,155, +181248,2317,Waitangi,1873,155, +181760,2317,Waitangi,1924,155, +182272,2317,Waitangi,1976,155, +182784,2317,Waitangi,2028,155, +183296,2317,Waitangi,2080,155, +183808,2317,Waitangi,2132,155, +184320,2317,Waitangi,2184,155, +184832,2317,Waitangi,2237,155, +185344,2317,Waitangi,2290,155, +185856,2317,Waitangi,2343,155, +186368,2317,Waitangi,2396,155, +186880,2317,Waitangi,2449,155, +187392,2317,Waitangi,2503,155, +187904,2317,Waitangi,2557,155, +188416,2317,Waitangi,2611,155, +188928,2317,Waitangi,2665,155, +189440,2317,Waitangi,2719,155, +189952,2317,Waitangi,2774,155, +190464,2317,Waitangi,2829,155, +190976,2317,Waitangi,2884,155, +191488,2317,Waitangi,2939,155, +192000,2317,Waitangi,2994,155, +192512,2317,Waitangi,3049,155, +193024,2317,Waitangi,3105,155, +193536,2317,Waitangi,3161,155, +194048,2317,Waitangi,3217,155, +194560,2317,Waitangi,3273,155, +195072,2317,Waitangi,3329,155, +195584,2317,Waitangi,3385,155, +196096,2317,Waitangi,3442,155, +196608,2317,Waitangi,3499,155, +197120,2317,Waitangi,3556,155, +197632,2317,Waitangi,3613,155, +198144,2317,Waitangi,3670,155, +198656,2317,Waitangi,3727,155, +199168,2317,Waitangi,3785,155, +199680,2317,Waitangi,3843,155, +200192,2317,Waitangi,3901,155, +200704,2317,Waitangi,3959,155, +201216,2317,Waitangi,4017,155, +201728,2317,Waitangi,4075,155, +202240,2317,Waitangi,4133,155, +202752,2317,Waitangi,4192,155, +203264,2317,Waitangi,4251,155, +203776,2317,Waitangi,4310,155, +204288,2317,Waitangi,4369,155, +204800,2317,Waitangi,4428,155, +205312,2317,Waitangi,4487,155, +205824,2317,Waitangi,4546,155, +206336,2317,Waitangi,4606,155, +206848,2317,Waitangi,4666,155, +207360,2317,Waitangi,4726,155, +207872,2317,Waitangi,4786,155, +208384,2317,Waitangi,4846,155, +208896,2317,Waitangi,4906,155, +209408,2317,Waitangi,4966,155, +209920,2317,Waitangi,5026,155, +210432,2317,Waitangi,5087,155, +210944,2317,Waitangi,5148,155, +211456,2317,Waitangi,5209,155, +211968,2317,Waitangi,5270,155, +212480,2317,Waitangi,5331,155, +212992,2317,Waitangi,5392,155, +213504,2317,Waitangi,5453,155, +214016,2317,Waitangi,5514,155, +214528,2317,Waitangi,5575,155, +215040,2317,Waitangi,5637,155, +215552,2317,Waitangi,5699,155, +216064,2317,Waitangi,5761,155, +216576,2317,Waitangi,5823,155, +217088,2317,Waitangi,5885,155, +217600,2317,Waitangi,5947,155, +218112,2317,Waitangi,6009,155, +218624,2317,Waitangi,6071,155, +219136,2317,Waitangi,6133,155, +219648,2317,Waitangi,6196,155, +220160,2317,Waitangi,6259,155, +220672,2317,Waitangi,6322,155, +221184,2317,Waitangi,6385,155, +221696,2317,Waitangi,6448,155, +222208,2317,Waitangi,6511,155, +222720,2317,Waitangi,6574,155, +223232,2317,Waitangi,6637,155, +223744,2317,Waitangi,6700,155, +224256,2317,Waitangi,6763,155, +224768,2317,Waitangi,6826,155, +225280,2317,Waitangi,6889,155, +225792,2317,Waitangi,6953,155, +226304,2317,Waitangi,7017,155, +226816,2317,Waitangi,7081,155, +227328,2317,Waitangi,7145,155, +227840,2317,Waitangi,7209,155, +228352,2317,Waitangi,7273,155, +228864,2317,Waitangi,7337,155, +229376,2317,Waitangi,7401,155, +229888,2317,Waitangi,7465,155, +230400,2317,Waitangi,7529,155, +230912,2317,Waitangi,7593,155, +231424,2317,Waitangi,7657,155, +231936,2317,Waitangi,7722,155, +232448,2317,Waitangi,7787,155, +232960,2317,Waitangi,7852,155, +233472,2317,Waitangi,7917,155, +233984,2317,Waitangi,7982,155, +234496,2317,Waitangi,8047,155, +235008,2317,Waitangi,8112,155, +235520,2317,Waitangi,8177,155, +236032,2317,Waitangi,8242,155, +236544,2317,Waitangi,8307,155, +237056,2317,Waitangi,8372,155, +237568,2317,Waitangi,8437,155, +238080,2317,Waitangi,8502,155, +238592,2317,Waitangi,8567,155, +239104,2317,Waitangi,8632,155, +239616,2317,Waitangi,8697,155, +240128,2317,Waitangi,8763,155, +240640,2317,Waitangi,8829,155, +241152,2317,Waitangi,8895,155, +241664,2317,Waitangi,8961,155, +242176,2317,Waitangi,9027,155, +242688,2317,Waitangi,9093,155, +243200,2317,Waitangi,9159,155, +243712,2317,Waitangi,9225,155, +244224,2317,Waitangi,9291,155, +244736,2317,Waitangi,9357,155, +245248,2317,Waitangi,9423,155, +245760,2317,Waitangi,9489,155, +246272,2317,Waitangi,9555,155, +246784,2317,Waitangi,9621,155, +247296,2317,Waitangi,9687,155, +247808,2317,Waitangi,9753,155, +248320,2317,Waitangi,9819,155, +248832,2317,Waitangi,9885,155, +249344,2317,Waitangi,9952,155, +249856,2317,Waitangi,10019,155, +250368,2317,Waitangi,10086,155, +250880,2317,Waitangi,10153,155, +251392,2317,Waitangi,10220,155, +251904,2317,Waitangi,10287,155, +252416,2317,Waitangi,10354,155, +252928,2317,Waitangi,10421,155, +253440,2317,Waitangi,10488,155, +253952,2317,Waitangi,10555,155, +254464,2317,Waitangi,10622,155, +254976,2317,Waitangi,10689,155, +255488,2317,Waitangi,10756,155, +256000,2317,Waitangi,10823,155, +256512,2317,Waitangi,10890,155, +257024,2317,Waitangi,10957,155, +257536,2317,Waitangi,11024,155, +258048,2317,Waitangi,11091,155, +258560,2317,Waitangi,11158,155, +259072,2317,Waitangi,11225,155, +259584,2317,Waitangi,11292,155, +260096,2317,Waitangi,11359,155, +260608,2317,Waitangi,11426,155, +261120,2317,Waitangi,11493,155, +261632,2317,Waitangi,11560,155, +1,6919,Anchorage,2,235, +513,6919,Anchorage,57,235, +1025,6919,Anchorage,112,235, +1537,6919,Anchorage,167,235, +2049,6919,Anchorage,222,235, +2561,6919,Anchorage,277,235, +3073,6919,Anchorage,332,235, +3585,6919,Anchorage,387,235, +4097,6919,Anchorage,442,235, +4609,6919,Anchorage,497,235, +5121,6919,Anchorage,552,235, +5633,6919,Anchorage,607,235, +6145,6919,Anchorage,662,235, +6657,6919,Anchorage,717,235, +7169,6919,Anchorage,772,235, +7681,6919,Anchorage,827,235, +8193,6919,Anchorage,882,235, +8705,6919,Anchorage,937,235, +9217,6919,Anchorage,992,235, +9729,6919,Anchorage,1047,235, +10241,6919,Anchorage,1102,235, +10753,6919,Anchorage,1157,235, +11265,6919,Anchorage,1212,235, +11777,6919,Anchorage,1267,235, +12289,6919,Anchorage,1322,235, +12801,6919,Anchorage,1377,235, +13313,6919,Anchorage,1432,235, +13825,6919,Anchorage,1487,235, +14337,6919,Anchorage,1542,235, +14849,6919,Anchorage,1597,235, +15361,6919,Anchorage,1652,235, +15873,6919,Anchorage,1707,235, +16385,6919,Anchorage,1762,235, +16897,6919,Anchorage,1817,235, +17409,6919,Anchorage,1872,235, +17921,6919,Anchorage,1927,235, +18433,6919,Anchorage,1982,235, +18945,6919,Anchorage,2037,235, +19457,6919,Anchorage,2092,235, +19969,6919,Anchorage,2147,235, +20481,6919,Anchorage,2202,235, +20993,6919,Anchorage,2257,235, +21505,6919,Anchorage,2312,235, +22017,6919,Anchorage,2367,235, +22529,6919,Anchorage,2422,235, +23041,6919,Anchorage,2477,235, +23553,6919,Anchorage,2532,235, +24065,6919,Anchorage,2587,235, +24577,6919,Anchorage,2642,235, +25089,6919,Anchorage,2697,235, +25601,6919,Anchorage,2752,235, +26113,6919,Anchorage,2807,235, +26625,6919,Anchorage,2862,235, +27137,6919,Anchorage,2917,235, +27649,6919,Anchorage,2972,235, +28161,6919,Anchorage,3027,235, +28673,6919,Anchorage,3082,235, +29185,6919,Anchorage,3137,235, +29697,6919,Anchorage,3192,235, +30209,6919,Anchorage,3247,235, +30721,6919,Anchorage,3302,235, +31233,6919,Anchorage,3357,235, +31745,6919,Anchorage,3412,235, +32257,6919,Anchorage,3467,235, +32769,6919,Anchorage,3522,235, +33281,6919,Anchorage,3577,235, +33793,6919,Anchorage,3632,235, +34305,6919,Anchorage,3687,235, +34817,6919,Anchorage,3742,235, +35329,6919,Anchorage,3797,235, +35841,6919,Anchorage,3852,235, +36353,6919,Anchorage,3907,235, +36865,6919,Anchorage,3962,235, +37377,6919,Anchorage,4017,235, +37889,6919,Anchorage,4072,235, +38401,6919,Anchorage,4127,235, +38913,6919,Anchorage,4182,235, +39425,6919,Anchorage,4237,235, +39937,6919,Anchorage,4292,235, +40449,6919,Anchorage,4347,235, +40961,6919,Anchorage,4402,235, +41473,6919,Anchorage,4457,235, +41985,6919,Anchorage,4511,235, +42497,6919,Anchorage,4565,235, +43009,6919,Anchorage,4619,235, +43521,6919,Anchorage,4673,235, +44033,6919,Anchorage,4727,235, +44545,6919,Anchorage,4781,235, +45057,6919,Anchorage,4835,235, +45569,6919,Anchorage,4889,235, +46081,6919,Anchorage,4943,235, +46593,6919,Anchorage,4997,235, +47105,6919,Anchorage,5051,235, +47617,6919,Anchorage,5105,235, +48129,6919,Anchorage,5159,235, +48641,6919,Anchorage,5213,235, +49153,6919,Anchorage,5267,235, +49665,6919,Anchorage,5321,235, +50177,6919,Anchorage,5375,235, +50689,6919,Anchorage,5429,235, +51201,6919,Anchorage,5483,235, +51713,6919,Anchorage,5537,235, +52225,6919,Anchorage,5591,235, +52737,6919,Anchorage,5645,235, +53249,6919,Anchorage,5699,235, +53761,6919,Anchorage,5753,235, +54273,6919,Anchorage,5807,235, +54785,6919,Anchorage,5861,235, +55297,6919,Anchorage,5915,235, +55809,6919,Anchorage,5969,235, +56321,6919,Anchorage,6023,235, +56833,6919,Anchorage,6077,235, +57345,6919,Anchorage,6131,235, +57857,6919,Anchorage,6185,235, +58369,6919,Anchorage,6239,235, +58881,6919,Anchorage,6293,235, +59393,6919,Anchorage,6347,235, +59905,6919,Anchorage,6401,235, +60417,6919,Anchorage,6455,235, +60929,6919,Anchorage,6509,235, +61441,6919,Anchorage,6563,235, +61953,6919,Anchorage,6617,235, +62465,6919,Anchorage,6671,235, +62977,6919,Anchorage,6725,235, +63489,6919,Anchorage,6779,235, +64001,6919,Anchorage,6833,235, +64513,6919,Anchorage,6887,235, +65025,6919,Anchorage,6941,235, +65537,6919,Anchorage,6995,235, +66049,6919,Anchorage,7049,235, +66561,6919,Anchorage,7103,235, +67073,6919,Anchorage,7157,235, +67585,6919,Anchorage,7211,235, +68097,6919,Anchorage,7265,235, +68609,6919,Anchorage,7319,235, +69121,6919,Anchorage,7373,235, +69633,6919,Anchorage,7427,235, +70145,6919,Anchorage,7481,235, +70657,6919,Anchorage,7535,235, +71169,6919,Anchorage,7589,235, +71681,6919,Anchorage,7643,235, +72193,6919,Anchorage,7697,235, +72705,6919,Anchorage,7751,235, +73217,6919,Anchorage,7805,235, +73729,6919,Anchorage,7859,235, +74241,6919,Anchorage,7913,235, +74753,6919,Anchorage,7967,235, +75265,6919,Anchorage,8021,235, +75777,6919,Anchorage,8075,235, +76289,6919,Anchorage,8129,235, +76801,6919,Anchorage,8183,235, +77313,6919,Anchorage,8237,235, +77825,6919,Anchorage,8291,235, +78337,6919,Anchorage,8345,235, +78849,6919,Anchorage,8399,235, +79361,6919,Anchorage,8453,235, +79873,6919,Anchorage,8507,235, +80385,6919,Anchorage,8561,235, +80897,6919,Anchorage,8614,235, +81409,6919,Anchorage,8667,235, +81921,6919,Anchorage,8720,235, +82433,6919,Anchorage,8773,235, +82945,6919,Anchorage,8826,235, +83457,6919,Anchorage,8879,235, +83969,6919,Anchorage,8932,235, +84481,6919,Anchorage,8985,235, +84993,6919,Anchorage,9038,235, +85505,6919,Anchorage,9090,235, +86017,6919,Anchorage,9142,235, +86529,6919,Anchorage,9194,235, +87041,6919,Anchorage,9246,235, +87553,6919,Anchorage,9298,235, +88065,6919,Anchorage,9350,235, +88577,6919,Anchorage,9402,235, +89089,6919,Anchorage,9454,235, +89601,6919,Anchorage,9506,235, +90113,6919,Anchorage,9557,235, +90625,6919,Anchorage,9608,235, +91137,6919,Anchorage,9659,235, +91649,6919,Anchorage,9710,235, +92161,6919,Anchorage,9761,235, +92673,3471,Honolulu,2,235, +93185,3471,Honolulu,5,235, +93697,3471,Honolulu,12,235, +94209,3471,Honolulu,22,235, +94721,3471,Honolulu,36,235, +95233,3471,Honolulu,54,235, +95745,3471,Honolulu,75,235, +96257,3471,Honolulu,100,235, +96769,3471,Honolulu,129,235, +97281,3471,Honolulu,161,235, +97793,3471,Honolulu,197,235, +98305,3471,Honolulu,237,235, +98817,3471,Honolulu,281,235, +99329,3471,Honolulu,328,235, +99841,3471,Honolulu,378,235, +100353,3471,Honolulu,429,235, +100865,3471,Honolulu,480,235, +101377,3471,Honolulu,531,235, +101889,3471,Honolulu,583,235, +102401,3471,Honolulu,635,235, +102913,3471,Honolulu,688,235, +103425,3471,Honolulu,741,235, +103937,3471,Honolulu,794,235, +104449,3471,Honolulu,848,235, +104961,3471,Honolulu,902,235, +105473,3471,Honolulu,957,235, +105985,3471,Honolulu,1012,235, +106497,3471,Honolulu,1067,235, +107009,3471,Honolulu,1123,235, +107521,3471,Honolulu,1179,235, +108033,3471,Honolulu,1236,235, +108545,3471,Honolulu,1293,235, +109057,3471,Honolulu,1350,235, +109569,3471,Honolulu,1408,235, +110081,3471,Honolulu,1466,235, +110593,3471,Honolulu,1525,235, +111105,3471,Honolulu,1584,235, +111617,3471,Honolulu,1644,235, +112129,3471,Honolulu,1704,235, +112641,3471,Honolulu,1764,235, +113153,3471,Honolulu,1825,235, +113665,3471,Honolulu,1886,235, +114177,3471,Honolulu,1947,235, +114689,3471,Honolulu,2009,235, +115201,3471,Honolulu,2071,235, +115713,3471,Honolulu,2133,235, +116225,3471,Honolulu,2196,235, +116737,3471,Honolulu,2259,235, +117249,3471,Honolulu,2322,235, +117761,3471,Honolulu,2386,235, +118273,3471,Honolulu,2450,235, +118785,3471,Honolulu,2514,235, +119297,3471,Honolulu,2579,235, +119809,3471,Honolulu,2644,235, +120321,3471,Honolulu,2709,235, +120833,3471,Honolulu,2774,235, +121345,3471,Honolulu,2836,235, +121857,3208,Atafu Village,3,223, +122369,3208,Atafu Village,6,223, +122881,3208,Atafu Village,11,223, +123393,3208,Atafu Village,18,223, +123905,3208,Atafu Village,27,223, +124417,3208,Atafu Village,38,223, +124929,3208,Atafu Village,51,223, +125441,3208,Atafu Village,66,223, +125953,3208,Atafu Village,83,223, +126465,3208,Atafu Village,102,223, +126977,3208,Atafu Village,123,223, +127489,3208,Atafu Village,146,223, +128001,3208,Atafu Village,171,223, +128513,3208,Atafu Village,195,223, +129025,3208,Atafu Village,219,223, +129537,3208,Atafu Village,242,223, +130049,3208,Atafu Village,264,223, +130561,3208,Atafu Village,286,223, +131073,3208,Atafu Village,307,223, +131585,3208,Atafu Village,327,223, +132097,3208,Atafu Village,347,223, +132609,3208,Atafu Village,366,223, +133121,3208,Atafu Village,384,223, +133633,3208,Atafu Village,402,223, +134145,3208,Atafu Village,419,223, +134657,3208,Atafu Village,435,223, +135169,3208,Atafu Village,451,223, +135681,3208,Atafu Village,465,223, +136193,3610,Mata-Utu,3,245, +136705,3610,Mata-Utu,6,245, +137217,3610,Mata-Utu,10,245, +137729,3610,Mata-Utu,15,245, +138241,3610,Mata-Utu,20,245, +138753,3610,Mata-Utu,27,245, +139265,3609,Leava,4,245, +139777,3609,Leava,6,245, +140289,3609,Leava,8,245, +140801,3609,Leava,11,245, +141313,3609,Leava,14,245, +141825,3609,Leava,17,245, +142337,3609,Leava,20,245, +142849,3609,Leava,22,245, +143361,3609,Leava,24,245, +143873,3611,Alo,10,245, +144385,3253,Nuku‘alofa,1,224, +144897,3253,Nuku‘alofa,5,224, +145409,3253,Nuku‘alofa,10,224, +145921,3253,Nuku‘alofa,17,224, +146433,3253,Nuku‘alofa,25,224, +146945,3253,Nuku‘alofa,33,224, +147457,3253,Nuku‘alofa,40,224, +147969,3253,Nuku‘alofa,46,224, +148481,3253,Nuku‘alofa,52,224, +148993,3253,Nuku‘alofa,57,224, +149505,3253,Nuku‘alofa,61,224, +150017,3253,Nuku‘alofa,64,224, +150529,3253,Nuku‘alofa,67,224, +151041,3252,‘Ohonua,73,224, +151553,3252,‘Ohonua,89,224, +152065,3252,‘Ohonua,105,224, +152577,3252,‘Ohonua,121,224, +153089,3252,‘Ohonua,138,224, +153601,3252,‘Ohonua,155,224, +154113,3252,‘Ohonua,173,224, +154625,3252,‘Ohonua,191,224, +155137,3252,‘Ohonua,209,224, +155649,3252,‘Ohonua,227,224, +156161,2317,Waitangi,2,155, +156673,2317,Waitangi,7,155, +157185,2317,Waitangi,24,155, +157697,2317,Waitangi,43,155, +158209,2317,Waitangi,63,155, +158721,2317,Waitangi,84,155, +159233,2317,Waitangi,106,155, +159745,2317,Waitangi,129,155, +160257,2317,Waitangi,153,155, +160769,2317,Waitangi,178,155, +161281,2317,Waitangi,204,155, +161793,2317,Waitangi,231,155, +162305,2317,Waitangi,259,155, +162817,2317,Waitangi,288,155, +163329,2317,Waitangi,319,155, +163841,2317,Waitangi,351,155, +164353,2317,Waitangi,384,155, +164865,2317,Waitangi,418,155, +165377,2317,Waitangi,453,155, +165889,2317,Waitangi,489,155, +166401,2317,Waitangi,526,155, +166913,2317,Waitangi,564,155, +167425,2317,Waitangi,603,155, +167937,2317,Waitangi,643,155, +168449,2317,Waitangi,683,155, +168961,2317,Waitangi,724,155, +169473,2317,Waitangi,766,155, +169985,2317,Waitangi,809,155, +170497,2317,Waitangi,853,155, +171009,2317,Waitangi,899,155, +171521,2317,Waitangi,945,155, +172033,2317,Waitangi,992,155, +172545,2317,Waitangi,1039,155, +173057,2317,Waitangi,1086,155, +173569,2317,Waitangi,1133,155, +174081,2317,Waitangi,1181,155, +174593,2317,Waitangi,1229,155, +175105,2317,Waitangi,1277,155, +175617,2317,Waitangi,1325,155, +176129,2317,Waitangi,1374,155, +176641,2317,Waitangi,1423,155, +177153,2317,Waitangi,1472,155, +177665,2317,Waitangi,1521,155, +178177,2317,Waitangi,1571,155, +178689,2317,Waitangi,1621,155, +179201,2317,Waitangi,1671,155, +179713,2317,Waitangi,1721,155, +180225,2317,Waitangi,1772,155, +180737,2317,Waitangi,1823,155, +181249,2317,Waitangi,1874,155, +181761,2317,Waitangi,1925,155, +182273,2317,Waitangi,1977,155, +182785,2317,Waitangi,2029,155, +183297,2317,Waitangi,2081,155, +183809,2317,Waitangi,2133,155, +184321,2317,Waitangi,2185,155, +184833,2317,Waitangi,2238,155, +185345,2317,Waitangi,2291,155, +185857,2317,Waitangi,2344,155, +186369,2317,Waitangi,2397,155, +186881,2317,Waitangi,2450,155, +187393,2317,Waitangi,2504,155, +187905,2317,Waitangi,2558,155, +188417,2317,Waitangi,2612,155, +188929,2317,Waitangi,2666,155, +189441,2317,Waitangi,2720,155, +189953,2317,Waitangi,2775,155, +190465,2317,Waitangi,2830,155, +190977,2317,Waitangi,2885,155, +191489,2317,Waitangi,2940,155, +192001,2317,Waitangi,2995,155, +192513,2317,Waitangi,3050,155, +193025,2317,Waitangi,3106,155, +193537,2317,Waitangi,3162,155, +194049,2317,Waitangi,3218,155, +194561,2317,Waitangi,3274,155, +195073,2317,Waitangi,3330,155, +195585,2317,Waitangi,3386,155, +196097,2317,Waitangi,3443,155, +196609,2317,Waitangi,3500,155, +197121,2317,Waitangi,3557,155, +197633,2317,Waitangi,3614,155, +198145,2317,Waitangi,3671,155, +198657,2317,Waitangi,3728,155, +199169,2317,Waitangi,3786,155, +199681,2317,Waitangi,3844,155, +200193,2317,Waitangi,3902,155, +200705,2317,Waitangi,3960,155, +201217,2317,Waitangi,4018,155, +201729,2317,Waitangi,4076,155, +202241,2317,Waitangi,4134,155, +202753,2317,Waitangi,4193,155, +203265,2317,Waitangi,4252,155, +203777,2317,Waitangi,4311,155, +204289,2317,Waitangi,4370,155, +204801,2317,Waitangi,4429,155, +205313,2317,Waitangi,4488,155, +205825,2317,Waitangi,4547,155, +206337,2317,Waitangi,4607,155, +206849,2317,Waitangi,4667,155, +207361,2317,Waitangi,4727,155, +207873,2317,Waitangi,4787,155, +208385,2317,Waitangi,4847,155, +208897,2317,Waitangi,4907,155, +209409,2317,Waitangi,4967,155, +209921,2317,Waitangi,5027,155, +210433,2317,Waitangi,5088,155, +210945,2317,Waitangi,5149,155, +211457,2317,Waitangi,5210,155, +211969,2317,Waitangi,5271,155, +212481,2317,Waitangi,5332,155, +212993,2317,Waitangi,5393,155, +213505,2317,Waitangi,5454,155, +214017,2317,Waitangi,5515,155, +214529,2317,Waitangi,5576,155, +215041,2317,Waitangi,5638,155, +215553,2317,Waitangi,5700,155, +216065,2317,Waitangi,5762,155, +216577,2317,Waitangi,5824,155, +217089,2317,Waitangi,5886,155, +217601,2317,Waitangi,5948,155, +218113,2317,Waitangi,6010,155, +218625,2317,Waitangi,6072,155, +219137,2317,Waitangi,6134,155, +219649,2317,Waitangi,6197,155, +220161,2317,Waitangi,6260,155, +220673,2317,Waitangi,6323,155, +221185,2317,Waitangi,6386,155, +221697,2317,Waitangi,6449,155, +222209,2317,Waitangi,6512,155, +222721,2317,Waitangi,6575,155, +223233,2317,Waitangi,6638,155, +223745,2317,Waitangi,6701,155, +224257,2317,Waitangi,6764,155, +224769,2317,Waitangi,6827,155, +225281,2317,Waitangi,6890,155, +225793,2317,Waitangi,6954,155, +226305,2317,Waitangi,7018,155, +226817,2317,Waitangi,7082,155, +227329,2317,Waitangi,7146,155, +227841,2317,Waitangi,7210,155, +228353,2317,Waitangi,7274,155, +228865,2317,Waitangi,7338,155, +229377,2317,Waitangi,7402,155, +229889,2317,Waitangi,7466,155, +230401,2317,Waitangi,7530,155, +230913,2317,Waitangi,7594,155, +231425,2317,Waitangi,7658,155, +231937,2317,Waitangi,7723,155, +232449,2317,Waitangi,7788,155, +232961,2317,Waitangi,7853,155, +233473,2317,Waitangi,7918,155, +233985,2317,Waitangi,7983,155, +234497,2317,Waitangi,8048,155, +235009,2317,Waitangi,8113,155, +235521,2317,Waitangi,8178,155, +236033,2317,Waitangi,8243,155, +236545,2317,Waitangi,8308,155, +237057,2317,Waitangi,8373,155, +237569,2317,Waitangi,8438,155, +238081,2317,Waitangi,8503,155, +238593,2317,Waitangi,8568,155, +239105,2317,Waitangi,8633,155, +239617,2317,Waitangi,8698,155, +240129,2317,Waitangi,8764,155, +240641,2317,Waitangi,8830,155, +241153,2317,Waitangi,8896,155, +241665,2317,Waitangi,8962,155, +242177,2317,Waitangi,9028,155, +242689,2317,Waitangi,9094,155, +243201,2317,Waitangi,9160,155, +243713,2317,Waitangi,9226,155, +244225,2317,Waitangi,9292,155, +244737,2317,Waitangi,9358,155, +245249,2317,Waitangi,9424,155, +245761,2317,Waitangi,9490,155, +246273,2317,Waitangi,9556,155, +246785,2317,Waitangi,9622,155, +247297,2317,Waitangi,9688,155, +247809,2317,Waitangi,9754,155, +248321,2317,Waitangi,9820,155, +248833,2317,Waitangi,9886,155, +249345,2317,Waitangi,9953,155, +249857,2317,Waitangi,10020,155, +250369,2317,Waitangi,10087,155, +250881,2317,Waitangi,10154,155, +251393,2317,Waitangi,10221,155, +251905,2317,Waitangi,10288,155, +252417,2317,Waitangi,10355,155, +252929,2317,Waitangi,10422,155, +253441,2317,Waitangi,10489,155, +253953,2317,Waitangi,10556,155, +254465,2317,Waitangi,10623,155, +254977,2317,Waitangi,10690,155, +255489,2317,Waitangi,10757,155, +256001,2317,Waitangi,10824,155, +256513,2317,Waitangi,10891,155, +257025,2317,Waitangi,10958,155, +257537,2317,Waitangi,11025,155, +258049,2317,Waitangi,11092,155, +258561,2317,Waitangi,11159,155, +259073,2317,Waitangi,11226,155, +259585,2317,Waitangi,11293,155, +260097,2317,Waitangi,11360,155, +260609,2317,Waitangi,11427,155, +261121,2317,Waitangi,11494,155, +261633,2317,Waitangi,11561,155, diff --git a/scripts/scrape_regions.py b/scripts/scrape_regions.py new file mode 100644 index 0000000..120ede1 --- /dev/null +++ b/scripts/scrape_regions.py @@ -0,0 +1,381 @@ +#!/usr/bin/env python3 +""" +Script to scrape region data from wplace.live API and generate a CSV mapping. + +This creates a tile-to-region mapping by sampling one pixel per tile. +The region is determined by tile coordinates, not individual pixels. +""" + +import csv +import time +import json +import os +from typing import Optional, Dict +import sys + +try: + import cloudscraper + print("✓ Using cloudscraper to bypass Cloudflare protection") +except ImportError: + print("⚠️ cloudscraper not found. Install it with: pip install cloudscraper") + print(" This is required to bypass Cloudflare protection on wplace.live") + sys.exit(1) + +try: + import socks + print("✓ SOCKS proxy support available") +except ImportError: + print("⚠️ PySocks not found. Install it with: pip install pysocks") + print(" This is required to use SOCKS5 proxies") + sys.exit(1) + +# Configuration +BASE_URL = "https://backend.wplace.live/s0/pixel" +OUTPUT_CSV = "tile_region_mapping.csv" +OUTPUT_REGIONS_CSV = "regions.csv" + +# Sample density - adjust based on how detailed you want the mapping +# 1 = sample all tiles, 2 = sample every other tile, etc. +TILE_SAMPLE_STEP = 1 # Sample every Nth tile + +# Tile range - adjust based on the canvas size +TILE_X_MIN, TILE_X_MAX = 0, 2047 +TILE_Y_MIN, TILE_Y_MAX = 0, 2047 + +# Proxy rotation - helps avoid rate limits and Cloudflare blocks +PROXIES = [ + "socks5://spmhmfozio:ze1sg%2BsP3n4apXhDV9@isp.decodo.com:10001", + "socks5://user-spcwoviqpj-sessionduration-1440:aw2igK7QDgscu~41Gl@gate.decodo.com:10001", + "socks5://spk2ihoy6o:ympO0wyr9X32%2BgXRfj@isp.decodo.com:10010" +] + +# Track current proxy index for rotation +current_proxy_index = 0 + +# Rate limit backoff settings +rate_limit_backoff_seconds = 0 # Exponential backoff for rate limits +consecutive_rate_limits = 0 # Track consecutive rate limit errors + +# Create a cloudscraper session that can bypass Cloudflare +scraper = cloudscraper.create_scraper( + browser={ + 'browser': 'chrome', + 'platform': 'windows', + 'mobile': False + } +) + +def get_next_proxy() -> Dict[str, str]: + """Get the next proxy in rotation.""" + global current_proxy_index + proxy_url = PROXIES[current_proxy_index] + current_proxy_index = (current_proxy_index + 1) % len(PROXIES) + return { + 'http': proxy_url, + 'https': proxy_url + } + +def detect_cloudflare_rate_limit(response) -> bool: + """Detect if response is a Cloudflare 1015 rate limit error.""" + # Check for 1015 error code in response + if response.status_code == 429: + return True + + # Check for Cloudflare rate limit page (error 1015) + if 'text/html' in response.headers.get('Content-Type', ''): + if b'error 1015' in response.content.lower() or b'rate limited' in response.content.lower(): + return True + + # Check for specific Cloudflare headers + cf_ray = response.headers.get('CF-RAY', '') + if cf_ray and response.status_code in [403, 429, 503]: + return True + + return False + +def handle_rate_limit_backoff(): + """Handle exponential backoff when rate limited.""" + global rate_limit_backoff_seconds, consecutive_rate_limits + + consecutive_rate_limits += 1 + + # Exponential backoff: 5s, 10s, 20s, 40s, 60s (max) + if consecutive_rate_limits == 1: + rate_limit_backoff_seconds = 5 + elif consecutive_rate_limits == 2: + rate_limit_backoff_seconds = 10 + elif consecutive_rate_limits == 3: + rate_limit_backoff_seconds = 20 + elif consecutive_rate_limits == 4: + rate_limit_backoff_seconds = 40 + else: + rate_limit_backoff_seconds = 60 + + print(f"\n🛑 CLOUDFLARE RATE LIMIT DETECTED (Error 1015)") + print(f" Consecutive rate limits: {consecutive_rate_limits}") + print(f" Backing off for {rate_limit_backoff_seconds} seconds...") + time.sleep(rate_limit_backoff_seconds) + +def reset_rate_limit_backoff(): + """Reset backoff when we get successful responses.""" + global rate_limit_backoff_seconds, consecutive_rate_limits + consecutive_rate_limits = 0 + rate_limit_backoff_seconds = 0 + +def fetch_tile_region(tile_x: int, tile_y: int) -> Optional[Dict]: + """Fetch region info for a tile from wplace.live API. + + Since region is determined by tile, we just need to check one pixel per tile. + We'll use coordinates (1, 1) as a sample point. + """ + url = f"{BASE_URL}/{tile_x}/{tile_y}?x=1&y=1" + proxies = get_next_proxy() + + try: + response = scraper.get(url, proxies=proxies, timeout=15) + + # Check for Cloudflare rate limiting (error 1015) + if detect_cloudflare_rate_limit(response): + handle_rate_limit_backoff() + # Retry with same proxy after backoff + response = scraper.get(url, proxies=proxies, timeout=15) + if detect_cloudflare_rate_limit(response): + print(f" Still rate limited after backoff. Skipping tile ({tile_x}, {tile_y})") + return None + + # Check if we got HTML (Cloudflare challenge) instead of JSON + content_type = response.headers.get('Content-Type', '') + if 'text/html' in content_type and not detect_cloudflare_rate_limit(response): + print(f"\n⚠️ Received HTML instead of JSON for tile ({tile_x}, {tile_y})") + print(f" This might be a Cloudflare challenge page. Waiting 5 seconds...") + time.sleep(5) + # Retry once + response = scraper.get(url, proxies=proxies, timeout=15) + content_type = response.headers.get('Content-Type', '') + if 'text/html' in content_type: + print(f" Still getting HTML. Skipping this tile.") + return None + + if response.status_code == 200: + # Success! Reset rate limit backoff + reset_rate_limit_backoff() + try: + data = response.json() + # Extract region if it exists + if 'region' in data: + return data['region'] + return None + except json.JSONDecodeError: + print(f"\n⚠️ Failed to parse JSON for tile ({tile_x}, {tile_y})") + return None + elif response.status_code == 404: + # No pixel painted at (1,1), try center of tile + url_center = f"{BASE_URL}/{tile_x}/{tile_y}?x=500&y=500" + response = scraper.get(url_center, proxies=proxies, timeout=15) + + # Check for rate limit on retry + if detect_cloudflare_rate_limit(response): + handle_rate_limit_backoff() + return None + + if response.status_code == 200: + try: + data = response.json() + if 'region' in data: + reset_rate_limit_backoff() + return data['region'] + except json.JSONDecodeError: + pass + return None + elif response.status_code == 403: + print(f"\n⚠️ Got 403 Forbidden for tile ({tile_x}, {tile_y})") + print(f" You may be rate limited. Consider increasing the delay.") + return None + elif response.status_code == 429: + print(f"\n⚠️ Got 429 Too Many Requests for tile ({tile_x}, {tile_y})") + handle_rate_limit_backoff() + return None + else: + print(f"\n⚠️ Got status {response.status_code} for tile ({tile_x}, {tile_y})") + return None + except Exception as e: + print(f"\n⚠️ Error fetching tile ({tile_x}, {tile_y}): {e}") + return None + +def load_already_scraped_tiles() -> set: + """Load tiles that have already been scraped from the CSV file.""" + scraped_tiles = set() + + if os.path.exists(OUTPUT_CSV): + print(f"📂 Found existing {OUTPUT_CSV}, loading already scraped tiles...") + try: + with open(OUTPUT_CSV, 'r', newline='', encoding='utf-8') as f: + reader = csv.DictReader(f) + for row in reader: + tile_x = int(row['tile_x']) + tile_y = int(row['tile_y']) + scraped_tiles.add((tile_x, tile_y)) + print(f" ✓ Loaded {len(scraped_tiles)} already scraped tiles") + except Exception as e: + print(f" ⚠️ Error reading existing CSV: {e}") + print(f" Starting fresh...") + scraped_tiles.clear() + + return scraped_tiles + +def load_unique_regions() -> dict: + """Load unique regions from the regions CSV file.""" + unique_regions = {} + + if os.path.exists(OUTPUT_REGIONS_CSV): + print(f"📂 Found existing {OUTPUT_REGIONS_CSV}, loading unique regions...") + try: + with open(OUTPUT_REGIONS_CSV, 'r', newline='', encoding='utf-8') as f: + reader = csv.DictReader(f) + for row in reader: + region_key = (int(row['id']), int(row['city_id'])) + unique_regions[region_key] = row + print(f" ✓ Loaded {len(unique_regions)} unique regions") + except Exception as e: + print(f" ⚠️ Error reading regions CSV: {e}") + + return unique_regions + +def append_tile_to_csv(tile_data: dict): + """Append a single tile to the CSV file.""" + file_exists = os.path.exists(OUTPUT_CSV) + + with open(OUTPUT_CSV, 'a', newline='', encoding='utf-8') as f: + fieldnames = ['tile_x', 'tile_y', 'region_id', 'city_id', + 'region_name', 'region_number', 'country_id', 'flag_id'] + writer = csv.DictWriter(f, fieldnames=fieldnames) + + # Write header if file is new + if not file_exists: + writer.writeheader() + + writer.writerow(tile_data) + +def update_regions_csv(unique_regions: dict): + """Update the regions CSV file with all unique regions.""" + with open(OUTPUT_REGIONS_CSV, 'w', newline='', encoding='utf-8') as f: + fieldnames = ['id', 'city_id', 'name', 'number', 'country_id', 'flag_id'] + writer = csv.DictWriter(f, fieldnames=fieldnames) + writer.writeheader() + writer.writerows(unique_regions.values()) + +def main(): + print("Starting wplace.live region data scraping...") + print(f"Using {len(PROXIES)} rotating proxies for requests") + print(f"Tile range: X({TILE_X_MIN}-{TILE_X_MAX}), Y({TILE_Y_MIN}-{TILE_Y_MAX})") + print(f"Sampling every {TILE_SAMPLE_STEP} tile(s)") + + tiles_x = (TILE_X_MAX - TILE_X_MIN + 1) // TILE_SAMPLE_STEP + tiles_y = (TILE_Y_MAX - TILE_Y_MIN + 1) // TILE_SAMPLE_STEP + total_to_sample = tiles_x * tiles_y + + print(f"Total tiles to sample: {total_to_sample}") + print() + + # Load already scraped tiles for resume support + already_scraped = load_already_scraped_tiles() + + # Load unique regions + unique_regions = load_unique_regions() + + total_tiles = 0 + successful_tiles = 0 + skipped_tiles = len(already_scraped) + last_success_time = time.time() + + # Sample across tiles (one sample per tile is enough since region is tile-based) + for tile_x in range(TILE_X_MIN, TILE_X_MAX + 1, TILE_SAMPLE_STEP): + for tile_y in range(TILE_Y_MIN, TILE_Y_MAX + 1, TILE_SAMPLE_STEP): + total_tiles += 1 + + # Skip if already scraped + if (tile_x, tile_y) in already_scraped: + continue + + print(f"Sampling tile ({tile_x}, {tile_y})... [{successful_tiles} new, {skipped_tiles} skipped/cached]", end="\r") + + region = fetch_tile_region(tile_x, tile_y) + + if region: + # Prepare tile data + tile_data = { + 'tile_x': tile_x, + 'tile_y': tile_y, + 'region_id': region.get('id'), + 'city_id': region.get('cityId'), + 'region_name': region.get('name'), + 'region_number': region.get('number'), + 'country_id': region.get('countryId'), + 'flag_id': region.get('flagId') + } + + # Immediately write to CSV (for resume support) + append_tile_to_csv(tile_data) + + # Store unique region + region_key = (region.get('id'), region.get('cityId')) + if region_key not in unique_regions: + unique_regions[region_key] = { + 'id': region.get('id'), + 'city_id': region.get('cityId'), + 'name': region.get('name'), + 'number': region.get('number'), + 'country_id': region.get('countryId'), + 'flag_id': region.get('flagId') + } + # Update regions CSV periodically + update_regions_csv(unique_regions) + + successful_tiles += 1 + last_success_time = time.time() + else: + skipped_tiles += 1 + + # If we've had too many failures in a row, warn the user + if time.time() - last_success_time > 60: + print(f"\n⚠️ No successful requests in the last 60 seconds.") + print(f" You may be blocked by Cloudflare. Consider:") + print(f" 1. Increasing TILE_SAMPLE_STEP to reduce request rate") + print(f" 2. Taking a break and trying again later") + print(f" 3. Using a VPN or different IP address") + print(f" Progress is saved! You can resume by running this script again.") + user_input = input("Continue? (y/n): ") + if user_input.lower() != 'y': + break + last_success_time = time.time() + + # Rate limiting - be nice to their server + # Add extra delay if we've been rate limited recently + base_delay = 0.1 + if consecutive_rate_limits > 0: + # Slow down if we've been rate limited + base_delay = 0.5 + time.sleep(base_delay) + + else: + continue + break + + print() + print(f"\n✅ Scanning complete!") + print(f"Total tiles processed: {total_tiles}") + print(f"New tiles scraped: {successful_tiles}") + print(f"Skipped/cached tiles: {skipped_tiles}") + print(f"Unique regions found: {len(unique_regions)}") + + # Final update of regions CSV + if unique_regions: + update_regions_csv(unique_regions) + print(f"✓ Final regions list saved to {OUTPUT_REGIONS_CSV}") + + print(f"✓ Tile-to-region mappings in {OUTPUT_CSV}") + print("\n💡 Tip: You can resume this script anytime - progress is automatically saved!") + print(" Done! You can now import this data into your database.") + +if __name__ == "__main__": + main() diff --git a/scripts/tile_region_mapping.csv b/scripts/tile_region_mapping.csv new file mode 100644 index 0000000..f2cfb93 --- /dev/null +++ b/scripts/tile_region_mapping.csv @@ -0,0 +1,12279 @@ +tile_x,tile_y,region_id,city_id,region_name,region_number,country_id,flag_id +0,0,0,6919,Anchorage,1,235, +0,1,0,6919,Anchorage,1,235, +0,2,0,6919,Anchorage,1,235, +0,3,0,6919,Anchorage,1,235, +0,4,512,6919,Anchorage,56,235, +0,5,512,6919,Anchorage,56,235, +0,6,512,6919,Anchorage,56,235, +0,7,512,6919,Anchorage,56,235, +0,8,1024,6919,Anchorage,111,235, +0,9,1024,6919,Anchorage,111,235, +0,10,1024,6919,Anchorage,111,235, +0,11,1024,6919,Anchorage,111,235, +0,12,1536,6919,Anchorage,166,235, +0,13,1536,6919,Anchorage,166,235, +0,14,1536,6919,Anchorage,166,235, +0,15,1536,6919,Anchorage,166,235, +0,16,2048,6919,Anchorage,221,235, +0,17,2048,6919,Anchorage,221,235, +0,18,2048,6919,Anchorage,221,235, +0,19,2048,6919,Anchorage,221,235, +0,20,2560,6919,Anchorage,276,235, +0,21,2560,6919,Anchorage,276,235, +0,22,2560,6919,Anchorage,276,235, +0,23,2560,6919,Anchorage,276,235, +0,24,3072,6919,Anchorage,331,235, +0,25,3072,6919,Anchorage,331,235, +0,26,3072,6919,Anchorage,331,235, +0,27,3072,6919,Anchorage,331,235, +0,28,3584,6919,Anchorage,386,235, +0,29,3584,6919,Anchorage,386,235, +0,30,3584,6919,Anchorage,386,235, +0,31,3584,6919,Anchorage,386,235, +0,32,4096,6919,Anchorage,441,235, +0,33,4096,6919,Anchorage,441,235, +0,34,4096,6919,Anchorage,441,235, +0,35,4096,6919,Anchorage,441,235, +0,36,4608,6919,Anchorage,496,235, +0,37,4608,6919,Anchorage,496,235, +0,38,4608,6919,Anchorage,496,235, +0,39,4608,6919,Anchorage,496,235, +0,40,5120,6919,Anchorage,551,235, +0,41,5120,6919,Anchorage,551,235, +0,42,5120,6919,Anchorage,551,235, +0,43,5120,6919,Anchorage,551,235, +0,44,5632,6919,Anchorage,606,235, +0,45,5632,6919,Anchorage,606,235, +0,46,5632,6919,Anchorage,606,235, +0,47,5632,6919,Anchorage,606,235, +0,48,6144,6919,Anchorage,661,235, +0,49,6144,6919,Anchorage,661,235, +0,50,6144,6919,Anchorage,661,235, +0,51,6144,6919,Anchorage,661,235, +0,52,6656,6919,Anchorage,716,235, +0,53,6656,6919,Anchorage,716,235, +0,54,6656,6919,Anchorage,716,235, +0,55,6656,6919,Anchorage,716,235, +0,56,7168,6919,Anchorage,771,235, +0,57,7168,6919,Anchorage,771,235, +0,58,7168,6919,Anchorage,771,235, +0,59,7168,6919,Anchorage,771,235, +0,60,7680,6919,Anchorage,826,235, +0,61,7680,6919,Anchorage,826,235, +0,62,7680,6919,Anchorage,826,235, +0,63,7680,6919,Anchorage,826,235, +0,64,8192,6919,Anchorage,881,235, +0,65,8192,6919,Anchorage,881,235, +0,66,8192,6919,Anchorage,881,235, +0,67,8192,6919,Anchorage,881,235, +0,68,8704,6919,Anchorage,936,235, +0,69,8704,6919,Anchorage,936,235, +0,70,8704,6919,Anchorage,936,235, +0,71,8704,6919,Anchorage,936,235, +0,72,9216,6919,Anchorage,991,235, +0,73,9216,6919,Anchorage,991,235, +0,74,9216,6919,Anchorage,991,235, +0,75,9216,6919,Anchorage,991,235, +0,76,9728,6919,Anchorage,1046,235, +0,77,9728,6919,Anchorage,1046,235, +0,78,9728,6919,Anchorage,1046,235, +0,79,9728,6919,Anchorage,1046,235, +0,80,10240,6919,Anchorage,1101,235, +0,81,10240,6919,Anchorage,1101,235, +0,82,10240,6919,Anchorage,1101,235, +0,83,10240,6919,Anchorage,1101,235, +0,84,10752,6919,Anchorage,1156,235, +0,85,10752,6919,Anchorage,1156,235, +0,86,10752,6919,Anchorage,1156,235, +0,87,10752,6919,Anchorage,1156,235, +0,88,11264,6919,Anchorage,1211,235, +0,89,11264,6919,Anchorage,1211,235, +0,90,11264,6919,Anchorage,1211,235, +0,91,11264,6919,Anchorage,1211,235, +0,92,11776,6919,Anchorage,1266,235, +0,93,11776,6919,Anchorage,1266,235, +0,94,11776,6919,Anchorage,1266,235, +0,95,11776,6919,Anchorage,1266,235, +0,96,12288,6919,Anchorage,1321,235, +0,97,12288,6919,Anchorage,1321,235, +0,98,12288,6919,Anchorage,1321,235, +0,99,12288,6919,Anchorage,1321,235, +0,100,12800,6919,Anchorage,1376,235, +0,101,12800,6919,Anchorage,1376,235, +0,102,12800,6919,Anchorage,1376,235, +0,103,12800,6919,Anchorage,1376,235, +0,104,13312,6919,Anchorage,1431,235, +0,105,13312,6919,Anchorage,1431,235, +0,106,13312,6919,Anchorage,1431,235, +0,107,13312,6919,Anchorage,1431,235, +0,108,13824,6919,Anchorage,1486,235, +0,109,13824,6919,Anchorage,1486,235, +0,110,13824,6919,Anchorage,1486,235, +0,111,13824,6919,Anchorage,1486,235, +0,112,14336,6919,Anchorage,1541,235, +0,113,14336,6919,Anchorage,1541,235, +0,114,14336,6919,Anchorage,1541,235, +0,115,14336,6919,Anchorage,1541,235, +0,116,14848,6919,Anchorage,1596,235, +0,117,14848,6919,Anchorage,1596,235, +0,118,14848,6919,Anchorage,1596,235, +0,119,14848,6919,Anchorage,1596,235, +0,120,15360,6919,Anchorage,1651,235, +0,121,15360,6919,Anchorage,1651,235, +0,122,15360,6919,Anchorage,1651,235, +0,123,15360,6919,Anchorage,1651,235, +0,124,15872,6919,Anchorage,1706,235, +0,125,15872,6919,Anchorage,1706,235, +0,126,15872,6919,Anchorage,1706,235, +0,127,15872,6919,Anchorage,1706,235, +0,128,16384,6919,Anchorage,1761,235, +0,129,16384,6919,Anchorage,1761,235, +0,130,16384,6919,Anchorage,1761,235, +0,131,16384,6919,Anchorage,1761,235, +0,132,16896,6919,Anchorage,1816,235, +0,133,16896,6919,Anchorage,1816,235, +0,134,16896,6919,Anchorage,1816,235, +0,135,16896,6919,Anchorage,1816,235, +0,136,17408,6919,Anchorage,1871,235, +0,137,17408,6919,Anchorage,1871,235, +0,138,17408,6919,Anchorage,1871,235, +0,139,17408,6919,Anchorage,1871,235, +0,140,17920,6919,Anchorage,1926,235, +0,141,17920,6919,Anchorage,1926,235, +0,142,17920,6919,Anchorage,1926,235, +0,143,17920,6919,Anchorage,1926,235, +0,144,18432,6919,Anchorage,1981,235, +0,145,18432,6919,Anchorage,1981,235, +0,146,18432,6919,Anchorage,1981,235, +0,147,18432,6919,Anchorage,1981,235, +0,148,18944,6919,Anchorage,2036,235, +0,149,18944,6919,Anchorage,2036,235, +0,150,18944,6919,Anchorage,2036,235, +0,151,18944,6919,Anchorage,2036,235, +0,152,19456,6919,Anchorage,2091,235, +0,153,19456,6919,Anchorage,2091,235, +0,154,19456,6919,Anchorage,2091,235, +0,155,19456,6919,Anchorage,2091,235, +0,156,19968,6919,Anchorage,2146,235, +0,157,19968,6919,Anchorage,2146,235, +0,158,19968,6919,Anchorage,2146,235, +0,159,19968,6919,Anchorage,2146,235, +0,160,20480,6919,Anchorage,2201,235, +0,161,20480,6919,Anchorage,2201,235, +0,162,20480,6919,Anchorage,2201,235, +0,163,20480,6919,Anchorage,2201,235, +0,164,20992,6919,Anchorage,2256,235, +0,165,20992,6919,Anchorage,2256,235, +0,166,20992,6919,Anchorage,2256,235, +0,167,20992,6919,Anchorage,2256,235, +0,168,21504,6919,Anchorage,2311,235, +0,169,21504,6919,Anchorage,2311,235, +0,170,21504,6919,Anchorage,2311,235, +0,171,21504,6919,Anchorage,2311,235, +0,172,22016,6919,Anchorage,2366,235, +0,173,22016,6919,Anchorage,2366,235, +0,174,22016,6919,Anchorage,2366,235, +0,175,22016,6919,Anchorage,2366,235, +0,176,22528,6919,Anchorage,2421,235, +0,177,22528,6919,Anchorage,2421,235, +0,178,22528,6919,Anchorage,2421,235, +0,179,22528,6919,Anchorage,2421,235, +0,180,23040,6919,Anchorage,2476,235, +0,181,23040,6919,Anchorage,2476,235, +0,182,23040,6919,Anchorage,2476,235, +0,183,23040,6919,Anchorage,2476,235, +0,184,23552,6919,Anchorage,2531,235, +0,185,23552,6919,Anchorage,2531,235, +0,186,23552,6919,Anchorage,2531,235, +0,187,23552,6919,Anchorage,2531,235, +0,188,24064,6919,Anchorage,2586,235, +0,189,24064,6919,Anchorage,2586,235, +0,190,24064,6919,Anchorage,2586,235, +0,191,24064,6919,Anchorage,2586,235, +0,192,24576,6919,Anchorage,2641,235, +0,193,24576,6919,Anchorage,2641,235, +0,194,24576,6919,Anchorage,2641,235, +0,195,24576,6919,Anchorage,2641,235, +0,196,25088,6919,Anchorage,2696,235, +0,197,25088,6919,Anchorage,2696,235, +0,198,25088,6919,Anchorage,2696,235, +0,199,25088,6919,Anchorage,2696,235, +0,200,25600,6919,Anchorage,2751,235, +0,201,25600,6919,Anchorage,2751,235, +0,202,25600,6919,Anchorage,2751,235, +0,203,25600,6919,Anchorage,2751,235, +0,204,26112,6919,Anchorage,2806,235, +0,205,26112,6919,Anchorage,2806,235, +0,206,26112,6919,Anchorage,2806,235, +0,207,26112,6919,Anchorage,2806,235, +0,208,26624,6919,Anchorage,2861,235, +0,209,26624,6919,Anchorage,2861,235, +0,210,26624,6919,Anchorage,2861,235, +0,211,26624,6919,Anchorage,2861,235, +0,212,27136,6919,Anchorage,2916,235, +0,213,27136,6919,Anchorage,2916,235, +0,214,27136,6919,Anchorage,2916,235, +0,215,27136,6919,Anchorage,2916,235, +0,216,27648,6919,Anchorage,2971,235, +0,217,27648,6919,Anchorage,2971,235, +0,218,27648,6919,Anchorage,2971,235, +0,219,27648,6919,Anchorage,2971,235, +0,220,28160,6919,Anchorage,3026,235, +0,221,28160,6919,Anchorage,3026,235, +0,222,28160,6919,Anchorage,3026,235, +0,223,28160,6919,Anchorage,3026,235, +0,224,28672,6919,Anchorage,3081,235, +0,225,28672,6919,Anchorage,3081,235, +0,226,28672,6919,Anchorage,3081,235, +0,227,28672,6919,Anchorage,3081,235, +0,228,29184,6919,Anchorage,3136,235, +0,229,29184,6919,Anchorage,3136,235, +0,230,29184,6919,Anchorage,3136,235, +0,231,29184,6919,Anchorage,3136,235, +0,232,29696,6919,Anchorage,3191,235, +0,233,29696,6919,Anchorage,3191,235, +0,234,29696,6919,Anchorage,3191,235, +0,235,29696,6919,Anchorage,3191,235, +0,236,30208,6919,Anchorage,3246,235, +0,237,30208,6919,Anchorage,3246,235, +0,238,30208,6919,Anchorage,3246,235, +0,239,30208,6919,Anchorage,3246,235, +0,240,30720,6919,Anchorage,3301,235, +0,241,30720,6919,Anchorage,3301,235, +0,242,30720,6919,Anchorage,3301,235, +0,243,30720,6919,Anchorage,3301,235, +0,244,31232,6919,Anchorage,3356,235, +0,245,31232,6919,Anchorage,3356,235, +0,246,31232,6919,Anchorage,3356,235, +0,247,31232,6919,Anchorage,3356,235, +0,248,31744,6919,Anchorage,3411,235, +0,249,31744,6919,Anchorage,3411,235, +0,250,31744,6919,Anchorage,3411,235, +0,251,31744,6919,Anchorage,3411,235, +0,252,32256,6919,Anchorage,3466,235, +0,253,32256,6919,Anchorage,3466,235, +0,254,32256,6919,Anchorage,3466,235, +0,255,32256,6919,Anchorage,3466,235, +0,256,32768,6919,Anchorage,3521,235, +0,257,32768,6919,Anchorage,3521,235, +0,258,32768,6919,Anchorage,3521,235, +0,259,32768,6919,Anchorage,3521,235, +0,260,33280,6919,Anchorage,3576,235, +0,261,33280,6919,Anchorage,3576,235, +0,262,33280,6919,Anchorage,3576,235, +0,263,33280,6919,Anchorage,3576,235, +0,264,33792,6919,Anchorage,3631,235, +0,265,33792,6919,Anchorage,3631,235, +0,266,33792,6919,Anchorage,3631,235, +0,267,33792,6919,Anchorage,3631,235, +0,268,34304,6919,Anchorage,3686,235, +0,269,34304,6919,Anchorage,3686,235, +0,270,34304,6919,Anchorage,3686,235, +0,271,34304,6919,Anchorage,3686,235, +0,272,34816,6919,Anchorage,3741,235, +0,273,34816,6919,Anchorage,3741,235, +0,274,34816,6919,Anchorage,3741,235, +0,275,34816,6919,Anchorage,3741,235, +0,276,35328,6919,Anchorage,3796,235, +0,277,35328,6919,Anchorage,3796,235, +0,278,35328,6919,Anchorage,3796,235, +0,279,35328,6919,Anchorage,3796,235, +0,280,35840,6919,Anchorage,3851,235, +0,281,35840,6919,Anchorage,3851,235, +0,282,35840,6919,Anchorage,3851,235, +0,283,35840,6919,Anchorage,3851,235, +0,284,36352,6919,Anchorage,3906,235, +0,285,36352,6919,Anchorage,3906,235, +0,286,36352,6919,Anchorage,3906,235, +0,287,36352,6919,Anchorage,3906,235, +0,288,36864,6919,Anchorage,3961,235, +0,289,36864,6919,Anchorage,3961,235, +0,290,36864,6919,Anchorage,3961,235, +0,291,36864,6919,Anchorage,3961,235, +0,292,37376,6919,Anchorage,4016,235, +0,293,37376,6919,Anchorage,4016,235, +0,294,37376,6919,Anchorage,4016,235, +0,295,37376,6919,Anchorage,4016,235, +0,296,37888,6919,Anchorage,4071,235, +0,297,37888,6919,Anchorage,4071,235, +0,298,37888,6919,Anchorage,4071,235, +0,299,37888,6919,Anchorage,4071,235, +0,300,38400,6919,Anchorage,4126,235, +0,301,38400,6919,Anchorage,4126,235, +0,302,38400,6919,Anchorage,4126,235, +0,303,38400,6919,Anchorage,4126,235, +0,304,38912,6919,Anchorage,4181,235, +0,305,38912,6919,Anchorage,4181,235, +0,306,38912,6919,Anchorage,4181,235, +0,307,38912,6919,Anchorage,4181,235, +0,308,39424,6919,Anchorage,4236,235, +0,309,39424,6919,Anchorage,4236,235, +0,310,39424,6919,Anchorage,4236,235, +0,311,39424,6919,Anchorage,4236,235, +0,312,39936,6919,Anchorage,4291,235, +0,313,39936,6919,Anchorage,4291,235, +0,314,39936,6919,Anchorage,4291,235, +0,315,39936,6919,Anchorage,4291,235, +0,316,40448,6919,Anchorage,4346,235, +0,317,40448,6919,Anchorage,4346,235, +0,318,40448,6919,Anchorage,4346,235, +0,319,40448,6919,Anchorage,4346,235, +0,320,40960,6919,Anchorage,4401,235, +0,321,40960,6919,Anchorage,4401,235, +0,322,40960,6919,Anchorage,4401,235, +0,323,40960,6919,Anchorage,4401,235, +0,324,41472,6919,Anchorage,4456,235, +0,325,41472,6919,Anchorage,4456,235, +0,326,41472,6919,Anchorage,4456,235, +0,327,41472,6919,Anchorage,4456,235, +0,328,41984,6919,Anchorage,4510,235, +0,329,41984,6919,Anchorage,4510,235, +0,330,41984,6919,Anchorage,4510,235, +0,331,41984,6919,Anchorage,4510,235, +0,332,42496,6919,Anchorage,4564,235, +0,333,42496,6919,Anchorage,4564,235, +0,334,42496,6919,Anchorage,4564,235, +0,335,42496,6919,Anchorage,4564,235, +0,336,43008,6919,Anchorage,4618,235, +0,337,43008,6919,Anchorage,4618,235, +0,338,43008,6919,Anchorage,4618,235, +0,339,43008,6919,Anchorage,4618,235, +0,340,43520,6919,Anchorage,4672,235, +0,341,43520,6919,Anchorage,4672,235, +0,342,43520,6919,Anchorage,4672,235, +0,343,43520,6919,Anchorage,4672,235, +0,344,44032,6919,Anchorage,4726,235, +0,345,44032,6919,Anchorage,4726,235, +0,346,44032,6919,Anchorage,4726,235, +0,347,44032,6919,Anchorage,4726,235, +0,348,44544,6919,Anchorage,4780,235, +0,349,44544,6919,Anchorage,4780,235, +0,350,44544,6919,Anchorage,4780,235, +0,351,44544,6919,Anchorage,4780,235, +0,352,45056,6919,Anchorage,4834,235, +0,353,45056,6919,Anchorage,4834,235, +0,354,45056,6919,Anchorage,4834,235, +0,355,45056,6919,Anchorage,4834,235, +0,356,45568,6919,Anchorage,4888,235, +0,357,45568,6919,Anchorage,4888,235, +0,358,45568,6919,Anchorage,4888,235, +0,359,45568,6919,Anchorage,4888,235, +0,360,46080,6919,Anchorage,4942,235, +0,361,46080,6919,Anchorage,4942,235, +0,362,46080,6919,Anchorage,4942,235, +0,363,46080,6919,Anchorage,4942,235, +0,364,46592,6919,Anchorage,4996,235, +0,365,46592,6919,Anchorage,4996,235, +0,366,46592,6919,Anchorage,4996,235, +0,367,46592,6919,Anchorage,4996,235, +0,368,47104,6919,Anchorage,5050,235, +0,369,47104,6919,Anchorage,5050,235, +0,370,47104,6919,Anchorage,5050,235, +0,371,47104,6919,Anchorage,5050,235, +0,372,47616,6919,Anchorage,5104,235, +0,373,47616,6919,Anchorage,5104,235, +0,374,47616,6919,Anchorage,5104,235, +0,375,47616,6919,Anchorage,5104,235, +0,376,48128,6919,Anchorage,5158,235, +0,377,48128,6919,Anchorage,5158,235, +0,378,48128,6919,Anchorage,5158,235, +0,379,48128,6919,Anchorage,5158,235, +0,380,48640,6919,Anchorage,5212,235, +0,381,48640,6919,Anchorage,5212,235, +0,382,48640,6919,Anchorage,5212,235, +0,383,48640,6919,Anchorage,5212,235, +0,384,49152,6919,Anchorage,5266,235, +0,385,49152,6919,Anchorage,5266,235, +0,386,49152,6919,Anchorage,5266,235, +0,387,49152,6919,Anchorage,5266,235, +0,388,49664,6919,Anchorage,5320,235, +0,389,49664,6919,Anchorage,5320,235, +0,390,49664,6919,Anchorage,5320,235, +0,391,49664,6919,Anchorage,5320,235, +0,392,50176,6919,Anchorage,5374,235, +0,393,50176,6919,Anchorage,5374,235, +0,394,50176,6919,Anchorage,5374,235, +0,395,50176,6919,Anchorage,5374,235, +0,396,50688,6919,Anchorage,5428,235, +0,397,50688,6919,Anchorage,5428,235, +0,398,50688,6919,Anchorage,5428,235, +0,399,50688,6919,Anchorage,5428,235, +0,400,51200,6919,Anchorage,5482,235, +0,401,51200,6919,Anchorage,5482,235, +0,402,51200,6919,Anchorage,5482,235, +0,403,51200,6919,Anchorage,5482,235, +0,404,51712,6919,Anchorage,5536,235, +0,405,51712,6919,Anchorage,5536,235, +0,406,51712,6919,Anchorage,5536,235, +0,407,51712,6919,Anchorage,5536,235, +0,408,52224,6919,Anchorage,5590,235, +0,409,52224,6919,Anchorage,5590,235, +0,410,52224,6919,Anchorage,5590,235, +0,411,52224,6919,Anchorage,5590,235, +0,412,52736,6919,Anchorage,5644,235, +0,413,52736,6919,Anchorage,5644,235, +0,414,52736,6919,Anchorage,5644,235, +0,415,52736,6919,Anchorage,5644,235, +0,416,53248,6919,Anchorage,5698,235, +0,417,53248,6919,Anchorage,5698,235, +0,418,53248,6919,Anchorage,5698,235, +0,419,53248,6919,Anchorage,5698,235, +0,420,53760,6919,Anchorage,5752,235, +0,421,53760,6919,Anchorage,5752,235, +0,422,53760,6919,Anchorage,5752,235, +0,423,53760,6919,Anchorage,5752,235, +0,424,54272,6919,Anchorage,5806,235, +0,425,54272,6919,Anchorage,5806,235, +0,426,54272,6919,Anchorage,5806,235, +0,427,54272,6919,Anchorage,5806,235, +0,428,54784,6919,Anchorage,5860,235, +0,429,54784,6919,Anchorage,5860,235, +0,430,54784,6919,Anchorage,5860,235, +0,431,54784,6919,Anchorage,5860,235, +0,432,55296,6919,Anchorage,5914,235, +0,433,55296,6919,Anchorage,5914,235, +0,434,55296,6919,Anchorage,5914,235, +0,435,55296,6919,Anchorage,5914,235, +0,436,55808,6919,Anchorage,5968,235, +0,437,55808,6919,Anchorage,5968,235, +0,438,55808,6919,Anchorage,5968,235, +0,439,55808,6919,Anchorage,5968,235, +0,440,56320,6919,Anchorage,6022,235, +0,441,56320,6919,Anchorage,6022,235, +0,442,56320,6919,Anchorage,6022,235, +0,443,56320,6919,Anchorage,6022,235, +0,444,56832,6919,Anchorage,6076,235, +0,445,56832,6919,Anchorage,6076,235, +0,446,56832,6919,Anchorage,6076,235, +0,447,56832,6919,Anchorage,6076,235, +0,448,57344,6919,Anchorage,6130,235, +0,449,57344,6919,Anchorage,6130,235, +0,450,57344,6919,Anchorage,6130,235, +0,451,57344,6919,Anchorage,6130,235, +0,452,57856,6919,Anchorage,6184,235, +0,453,57856,6919,Anchorage,6184,235, +0,454,57856,6919,Anchorage,6184,235, +0,455,57856,6919,Anchorage,6184,235, +0,456,58368,6919,Anchorage,6238,235, +0,457,58368,6919,Anchorage,6238,235, +0,458,58368,6919,Anchorage,6238,235, +0,459,58368,6919,Anchorage,6238,235, +0,460,58880,6919,Anchorage,6292,235, +0,461,58880,6919,Anchorage,6292,235, +0,462,58880,6919,Anchorage,6292,235, +0,463,58880,6919,Anchorage,6292,235, +0,464,59392,6919,Anchorage,6346,235, +0,465,59392,6919,Anchorage,6346,235, +0,466,59392,6919,Anchorage,6346,235, +0,467,59392,6919,Anchorage,6346,235, +0,468,59904,6919,Anchorage,6400,235, +0,469,59904,6919,Anchorage,6400,235, +0,470,59904,6919,Anchorage,6400,235, +0,471,59904,6919,Anchorage,6400,235, +0,472,60416,6919,Anchorage,6454,235, +0,473,60416,6919,Anchorage,6454,235, +0,474,60416,6919,Anchorage,6454,235, +0,475,60416,6919,Anchorage,6454,235, +0,476,60928,6919,Anchorage,6508,235, +0,477,60928,6919,Anchorage,6508,235, +0,478,60928,6919,Anchorage,6508,235, +0,479,60928,6919,Anchorage,6508,235, +0,480,61440,6919,Anchorage,6562,235, +0,481,61440,6919,Anchorage,6562,235, +0,482,61440,6919,Anchorage,6562,235, +0,483,61440,6919,Anchorage,6562,235, +0,484,61952,6919,Anchorage,6616,235, +0,485,61952,6919,Anchorage,6616,235, +0,486,61952,6919,Anchorage,6616,235, +0,487,61952,6919,Anchorage,6616,235, +0,488,62464,6919,Anchorage,6670,235, +0,489,62464,6919,Anchorage,6670,235, +0,490,62464,6919,Anchorage,6670,235, +0,491,62464,6919,Anchorage,6670,235, +0,492,62976,6919,Anchorage,6724,235, +0,493,62976,6919,Anchorage,6724,235, +0,494,62976,6919,Anchorage,6724,235, +0,495,62976,6919,Anchorage,6724,235, +0,496,63488,6919,Anchorage,6778,235, +0,497,63488,6919,Anchorage,6778,235, +0,498,63488,6919,Anchorage,6778,235, +0,499,63488,6919,Anchorage,6778,235, +0,500,64000,6919,Anchorage,6832,235, +0,501,64000,6919,Anchorage,6832,235, +0,502,64000,6919,Anchorage,6832,235, +0,503,64000,6919,Anchorage,6832,235, +0,504,64512,6919,Anchorage,6886,235, +0,505,64512,6919,Anchorage,6886,235, +0,506,64512,6919,Anchorage,6886,235, +0,507,64512,6919,Anchorage,6886,235, +0,508,65024,6919,Anchorage,6940,235, +0,509,65024,6919,Anchorage,6940,235, +0,510,65024,6919,Anchorage,6940,235, +0,511,65024,6919,Anchorage,6940,235, +0,512,65536,6919,Anchorage,6994,235, +0,513,65536,6919,Anchorage,6994,235, +0,514,65536,6919,Anchorage,6994,235, +0,515,65536,6919,Anchorage,6994,235, +0,516,66048,6919,Anchorage,7048,235, +0,517,66048,6919,Anchorage,7048,235, +0,518,66048,6919,Anchorage,7048,235, +0,519,66048,6919,Anchorage,7048,235, +0,520,66560,6919,Anchorage,7102,235, +0,521,66560,6919,Anchorage,7102,235, +0,522,66560,6919,Anchorage,7102,235, +0,523,66560,6919,Anchorage,7102,235, +0,524,67072,6919,Anchorage,7156,235, +0,525,67072,6919,Anchorage,7156,235, +0,526,67072,6919,Anchorage,7156,235, +0,527,67072,6919,Anchorage,7156,235, +0,528,67584,6919,Anchorage,7210,235, +0,529,67584,6919,Anchorage,7210,235, +0,530,67584,6919,Anchorage,7210,235, +0,531,67584,6919,Anchorage,7210,235, +0,532,68096,6919,Anchorage,7264,235, +0,533,68096,6919,Anchorage,7264,235, +0,534,68096,6919,Anchorage,7264,235, +0,535,68096,6919,Anchorage,7264,235, +0,536,68608,6919,Anchorage,7318,235, +0,537,68608,6919,Anchorage,7318,235, +0,538,68608,6919,Anchorage,7318,235, +0,539,68608,6919,Anchorage,7318,235, +0,540,69120,6919,Anchorage,7372,235, +0,541,69120,6919,Anchorage,7372,235, +0,542,69120,6919,Anchorage,7372,235, +0,543,69120,6919,Anchorage,7372,235, +0,544,69632,6919,Anchorage,7426,235, +0,545,69632,6919,Anchorage,7426,235, +0,546,69632,6919,Anchorage,7426,235, +0,547,69632,6919,Anchorage,7426,235, +0,548,70144,6919,Anchorage,7480,235, +0,549,70144,6919,Anchorage,7480,235, +0,550,70144,6919,Anchorage,7480,235, +0,551,70144,6919,Anchorage,7480,235, +0,552,70656,6919,Anchorage,7534,235, +0,553,70656,6919,Anchorage,7534,235, +0,554,70656,6919,Anchorage,7534,235, +0,555,70656,6919,Anchorage,7534,235, +0,556,71168,6919,Anchorage,7588,235, +0,557,71168,6919,Anchorage,7588,235, +0,558,71168,6919,Anchorage,7588,235, +0,559,71168,6919,Anchorage,7588,235, +0,560,71680,6919,Anchorage,7642,235, +0,561,71680,6919,Anchorage,7642,235, +0,562,71680,6919,Anchorage,7642,235, +0,563,71680,6919,Anchorage,7642,235, +0,564,72192,6919,Anchorage,7696,235, +0,565,72192,6919,Anchorage,7696,235, +0,566,72192,6919,Anchorage,7696,235, +0,567,72192,6919,Anchorage,7696,235, +0,568,72704,6919,Anchorage,7750,235, +0,569,72704,6919,Anchorage,7750,235, +0,570,72704,6919,Anchorage,7750,235, +0,571,72704,6919,Anchorage,7750,235, +0,572,73216,6919,Anchorage,7804,235, +0,573,73216,6919,Anchorage,7804,235, +0,574,73216,6919,Anchorage,7804,235, +0,575,73216,6919,Anchorage,7804,235, +0,576,73728,6919,Anchorage,7858,235, +0,577,73728,6919,Anchorage,7858,235, +0,578,73728,6919,Anchorage,7858,235, +0,579,73728,6919,Anchorage,7858,235, +0,580,74240,6919,Anchorage,7912,235, +0,581,74240,6919,Anchorage,7912,235, +0,582,74240,6919,Anchorage,7912,235, +0,583,74240,6919,Anchorage,7912,235, +0,584,74752,6919,Anchorage,7966,235, +0,585,74752,6919,Anchorage,7966,235, +0,586,74752,6919,Anchorage,7966,235, +0,587,74752,6919,Anchorage,7966,235, +0,588,75264,6919,Anchorage,8020,235, +0,589,75264,6919,Anchorage,8020,235, +0,590,75264,6919,Anchorage,8020,235, +0,591,75264,6919,Anchorage,8020,235, +0,592,75776,6919,Anchorage,8074,235, +0,593,75776,6919,Anchorage,8074,235, +0,594,75776,6919,Anchorage,8074,235, +0,595,75776,6919,Anchorage,8074,235, +0,596,76288,6919,Anchorage,8128,235, +0,597,76288,6919,Anchorage,8128,235, +0,598,76288,6919,Anchorage,8128,235, +0,599,76288,6919,Anchorage,8128,235, +0,600,76800,6919,Anchorage,8182,235, +0,601,76800,6919,Anchorage,8182,235, +0,602,76800,6919,Anchorage,8182,235, +0,603,76800,6919,Anchorage,8182,235, +0,604,77312,6919,Anchorage,8236,235, +0,605,77312,6919,Anchorage,8236,235, +0,606,77312,6919,Anchorage,8236,235, +0,607,77312,6919,Anchorage,8236,235, +0,608,77824,6919,Anchorage,8290,235, +0,609,77824,6919,Anchorage,8290,235, +0,610,77824,6919,Anchorage,8290,235, +0,611,77824,6919,Anchorage,8290,235, +0,612,78336,6919,Anchorage,8344,235, +0,613,78336,6919,Anchorage,8344,235, +0,614,78336,6919,Anchorage,8344,235, +0,615,78336,6919,Anchorage,8344,235, +0,616,78848,6919,Anchorage,8398,235, +0,617,78848,6919,Anchorage,8398,235, +0,618,78848,6919,Anchorage,8398,235, +0,619,78848,6919,Anchorage,8398,235, +0,620,79360,6919,Anchorage,8452,235, +0,621,79360,6919,Anchorage,8452,235, +0,622,79360,6919,Anchorage,8452,235, +0,623,79360,6919,Anchorage,8452,235, +0,624,79872,6919,Anchorage,8506,235, +0,625,79872,6919,Anchorage,8506,235, +0,626,79872,6919,Anchorage,8506,235, +0,627,79872,6919,Anchorage,8506,235, +0,628,80384,6919,Anchorage,8560,235, +0,629,80384,6919,Anchorage,8560,235, +0,630,80384,6919,Anchorage,8560,235, +0,631,80384,6919,Anchorage,8560,235, +0,632,80896,6919,Anchorage,8613,235, +0,633,80896,6919,Anchorage,8613,235, +0,634,80896,6919,Anchorage,8613,235, +0,635,80896,6919,Anchorage,8613,235, +0,636,81408,6919,Anchorage,8666,235, +0,637,81408,6919,Anchorage,8666,235, +0,638,81408,6919,Anchorage,8666,235, +0,639,81408,6919,Anchorage,8666,235, +0,640,81920,6919,Anchorage,8719,235, +0,641,81920,6919,Anchorage,8719,235, +0,642,81920,6919,Anchorage,8719,235, +0,643,81920,6919,Anchorage,8719,235, +0,644,82432,6919,Anchorage,8772,235, +0,645,82432,6919,Anchorage,8772,235, +0,646,82432,6919,Anchorage,8772,235, +0,647,82432,6919,Anchorage,8772,235, +0,648,82944,6919,Anchorage,8825,235, +0,649,82944,6919,Anchorage,8825,235, +0,650,82944,6919,Anchorage,8825,235, +0,651,82944,6919,Anchorage,8825,235, +0,652,83456,6919,Anchorage,8878,235, +0,653,83456,6919,Anchorage,8878,235, +0,654,83456,6919,Anchorage,8878,235, +0,655,83456,6919,Anchorage,8878,235, +0,656,83968,6919,Anchorage,8931,235, +0,657,83968,6919,Anchorage,8931,235, +0,658,83968,6919,Anchorage,8931,235, +0,659,83968,6919,Anchorage,8931,235, +0,660,84480,6919,Anchorage,8984,235, +0,661,84480,6919,Anchorage,8984,235, +0,662,84480,6919,Anchorage,8984,235, +0,663,84480,6919,Anchorage,8984,235, +0,664,84992,6919,Anchorage,9037,235, +0,665,84992,6919,Anchorage,9037,235, +0,666,84992,6919,Anchorage,9037,235, +0,667,84992,6919,Anchorage,9037,235, +0,668,85504,6919,Anchorage,9089,235, +0,669,85504,6919,Anchorage,9089,235, +0,670,85504,6919,Anchorage,9089,235, +0,671,85504,6919,Anchorage,9089,235, +0,672,86016,6919,Anchorage,9141,235, +0,673,86016,6919,Anchorage,9141,235, +0,674,86016,6919,Anchorage,9141,235, +0,675,86016,6919,Anchorage,9141,235, +0,676,86528,6919,Anchorage,9193,235, +0,677,86528,6919,Anchorage,9193,235, +0,678,86528,6919,Anchorage,9193,235, +0,679,86528,6919,Anchorage,9193,235, +0,680,87040,6919,Anchorage,9245,235, +0,681,87040,6919,Anchorage,9245,235, +0,682,87040,6919,Anchorage,9245,235, +0,683,87040,6919,Anchorage,9245,235, +0,684,87552,6919,Anchorage,9297,235, +0,685,87552,6919,Anchorage,9297,235, +0,686,87552,6919,Anchorage,9297,235, +0,687,87552,6919,Anchorage,9297,235, +0,688,88064,6919,Anchorage,9349,235, +0,689,88064,6919,Anchorage,9349,235, +0,690,88064,6919,Anchorage,9349,235, +0,691,88064,6919,Anchorage,9349,235, +0,692,88576,6919,Anchorage,9401,235, +0,693,88576,6919,Anchorage,9401,235, +0,694,88576,6919,Anchorage,9401,235, +0,695,88576,6919,Anchorage,9401,235, +0,696,89088,6919,Anchorage,9453,235, +0,697,89088,6919,Anchorage,9453,235, +0,698,89088,6919,Anchorage,9453,235, +0,699,89088,6919,Anchorage,9453,235, +0,700,89600,6919,Anchorage,9505,235, +0,701,89600,6919,Anchorage,9505,235, +0,702,89600,6919,Anchorage,9505,235, +0,703,89600,6919,Anchorage,9505,235, +0,704,90112,6919,Anchorage,9556,235, +0,705,90112,6919,Anchorage,9556,235, +0,706,90112,6919,Anchorage,9556,235, +0,707,90112,6919,Anchorage,9556,235, +0,708,90624,6919,Anchorage,9607,235, +0,709,90624,6919,Anchorage,9607,235, +0,710,90624,6919,Anchorage,9607,235, +0,711,90624,6919,Anchorage,9607,235, +0,712,91136,6919,Anchorage,9658,235, +0,713,91136,6919,Anchorage,9658,235, +0,714,91136,6919,Anchorage,9658,235, +0,715,91136,6919,Anchorage,9658,235, +0,716,91648,6919,Anchorage,9709,235, +0,717,91648,6919,Anchorage,9709,235, +0,718,91648,6919,Anchorage,9709,235, +0,719,91648,6919,Anchorage,9709,235, +0,720,92160,6919,Anchorage,9760,235, +0,721,92160,6919,Anchorage,9760,235, +0,722,92160,6919,Anchorage,9760,235, +0,723,92160,6919,Anchorage,9760,235, +0,724,92672,3471,Honolulu,1,235, +0,725,92672,3471,Honolulu,1,235, +0,726,92672,3471,Honolulu,1,235, +0,727,92672,3471,Honolulu,1,235, +0,728,93184,3471,Honolulu,4,235, +0,729,93184,3471,Honolulu,4,235, +0,730,93184,3471,Honolulu,4,235, +0,731,93184,3471,Honolulu,4,235, +0,732,93696,3471,Honolulu,11,235, +0,733,93696,3471,Honolulu,11,235, +0,734,93696,3471,Honolulu,11,235, +0,735,93696,3471,Honolulu,11,235, +0,736,94208,3471,Honolulu,21,235, +0,737,94208,3471,Honolulu,21,235, +0,738,94208,3471,Honolulu,21,235, +0,739,94208,3471,Honolulu,21,235, +0,740,94720,3471,Honolulu,35,235, +0,741,94720,3471,Honolulu,35,235, +0,742,94720,3471,Honolulu,35,235, +0,743,94720,3471,Honolulu,35,235, +0,744,95232,3471,Honolulu,53,235, +0,745,95232,3471,Honolulu,53,235, +0,746,95232,3471,Honolulu,53,235, +0,747,95232,3471,Honolulu,53,235, +0,748,95744,3471,Honolulu,74,235, +0,749,95744,3471,Honolulu,74,235, +0,750,95744,3471,Honolulu,74,235, +0,751,95744,3471,Honolulu,74,235, +0,752,96256,3471,Honolulu,99,235, +0,753,96256,3471,Honolulu,99,235, +0,754,96256,3471,Honolulu,99,235, +0,755,96256,3471,Honolulu,99,235, +0,756,96768,3471,Honolulu,128,235, +0,757,96768,3471,Honolulu,128,235, +0,758,96768,3471,Honolulu,128,235, +0,759,96768,3471,Honolulu,128,235, +0,760,97280,3471,Honolulu,160,235, +0,761,97280,3471,Honolulu,160,235, +0,762,97280,3471,Honolulu,160,235, +0,763,97280,3471,Honolulu,160,235, +0,764,97792,3471,Honolulu,196,235, +0,765,97792,3471,Honolulu,196,235, +0,766,97792,3471,Honolulu,196,235, +0,767,97792,3471,Honolulu,196,235, +0,768,98304,3471,Honolulu,236,235, +0,769,98304,3471,Honolulu,236,235, +0,770,98304,3471,Honolulu,236,235, +0,771,98304,3471,Honolulu,236,235, +0,772,98816,3471,Honolulu,280,235, +0,773,98816,3471,Honolulu,280,235, +0,774,98816,3471,Honolulu,280,235, +0,775,98816,3471,Honolulu,280,235, +0,776,99328,3471,Honolulu,327,235, +0,777,99328,3471,Honolulu,327,235, +0,778,99328,3471,Honolulu,327,235, +0,779,99328,3471,Honolulu,327,235, +0,780,99840,3471,Honolulu,377,235, +0,781,99840,3471,Honolulu,377,235, +0,782,99840,3471,Honolulu,377,235, +0,783,99840,3471,Honolulu,377,235, +0,784,100352,3471,Honolulu,428,235, +0,785,100352,3471,Honolulu,428,235, +0,786,100352,3471,Honolulu,428,235, +0,787,100352,3471,Honolulu,428,235, +0,788,100864,3471,Honolulu,479,235, +0,789,100864,3471,Honolulu,479,235, +0,790,100864,3471,Honolulu,479,235, +0,791,100864,3471,Honolulu,479,235, +0,792,101376,3471,Honolulu,530,235, +0,793,101376,3471,Honolulu,530,235, +0,794,101376,3471,Honolulu,530,235, +0,795,101376,3471,Honolulu,530,235, +0,796,101888,3471,Honolulu,582,235, +0,797,101888,3471,Honolulu,582,235, +0,798,101888,3471,Honolulu,582,235, +0,799,101888,3471,Honolulu,582,235, +0,800,102400,3471,Honolulu,634,235, +0,801,102400,3471,Honolulu,634,235, +0,802,102400,3471,Honolulu,634,235, +0,803,102400,3471,Honolulu,634,235, +0,804,102912,3471,Honolulu,687,235, +0,805,102912,3471,Honolulu,687,235, +0,806,102912,3471,Honolulu,687,235, +0,807,102912,3471,Honolulu,687,235, +0,808,103424,3471,Honolulu,740,235, +0,809,103424,3471,Honolulu,740,235, +0,810,103424,3471,Honolulu,740,235, +0,811,103424,3471,Honolulu,740,235, +0,812,103936,3471,Honolulu,793,235, +0,813,103936,3471,Honolulu,793,235, +0,814,103936,3471,Honolulu,793,235, +0,815,103936,3471,Honolulu,793,235, +0,816,104448,3471,Honolulu,847,235, +0,817,104448,3471,Honolulu,847,235, +0,818,104448,3471,Honolulu,847,235, +0,819,104448,3471,Honolulu,847,235, +0,820,104960,3471,Honolulu,901,235, +0,821,104960,3471,Honolulu,901,235, +0,822,104960,3471,Honolulu,901,235, +0,823,104960,3471,Honolulu,901,235, +0,824,105472,3471,Honolulu,956,235, +0,825,105472,3471,Honolulu,956,235, +0,826,105472,3471,Honolulu,956,235, +0,827,105472,3471,Honolulu,956,235, +0,828,105984,3471,Honolulu,1011,235, +0,829,105984,3471,Honolulu,1011,235, +0,830,105984,3471,Honolulu,1011,235, +0,831,105984,3471,Honolulu,1011,235, +0,832,106496,3471,Honolulu,1066,235, +0,833,106496,3471,Honolulu,1066,235, +0,834,106496,3471,Honolulu,1066,235, +0,835,106496,3471,Honolulu,1066,235, +0,836,107008,3471,Honolulu,1122,235, +0,837,107008,3471,Honolulu,1122,235, +0,838,107008,3471,Honolulu,1122,235, +0,839,107008,3471,Honolulu,1122,235, +0,840,107520,3471,Honolulu,1178,235, +0,841,107520,3471,Honolulu,1178,235, +0,842,107520,3471,Honolulu,1178,235, +0,843,107520,3471,Honolulu,1178,235, +0,844,108032,3471,Honolulu,1235,235, +0,845,108032,3471,Honolulu,1235,235, +0,846,108032,3471,Honolulu,1235,235, +0,847,108032,3471,Honolulu,1235,235, +0,848,108544,3471,Honolulu,1292,235, +0,849,108544,3471,Honolulu,1292,235, +0,850,108544,3471,Honolulu,1292,235, +0,851,108544,3471,Honolulu,1292,235, +0,852,109056,3471,Honolulu,1349,235, +0,853,109056,3471,Honolulu,1349,235, +0,854,109056,3471,Honolulu,1349,235, +0,855,109056,3471,Honolulu,1349,235, +0,856,109568,3471,Honolulu,1407,235, +0,857,109568,3471,Honolulu,1407,235, +0,858,109568,3471,Honolulu,1407,235, +0,859,109568,3471,Honolulu,1407,235, +0,860,110080,3471,Honolulu,1465,235, +0,861,110080,3471,Honolulu,1465,235, +0,862,110080,3471,Honolulu,1465,235, +0,863,110080,3471,Honolulu,1465,235, +0,864,110592,3471,Honolulu,1524,235, +0,865,110592,3471,Honolulu,1524,235, +0,866,110592,3471,Honolulu,1524,235, +0,867,110592,3471,Honolulu,1524,235, +0,868,111104,3471,Honolulu,1583,235, +0,869,111104,3471,Honolulu,1583,235, +0,870,111104,3471,Honolulu,1583,235, +0,871,111104,3471,Honolulu,1583,235, +0,872,111616,3471,Honolulu,1643,235, +0,873,111616,3471,Honolulu,1643,235, +0,874,111616,3471,Honolulu,1643,235, +0,875,111616,3471,Honolulu,1643,235, +0,876,112128,3471,Honolulu,1703,235, +0,877,112128,3471,Honolulu,1703,235, +0,878,112128,3471,Honolulu,1703,235, +0,879,112128,3471,Honolulu,1703,235, +0,880,112640,3471,Honolulu,1763,235, +0,881,112640,3471,Honolulu,1763,235, +0,882,112640,3471,Honolulu,1763,235, +0,883,112640,3471,Honolulu,1763,235, +0,884,113152,3471,Honolulu,1824,235, +0,885,113152,3471,Honolulu,1824,235, +0,886,113152,3471,Honolulu,1824,235, +0,887,113152,3471,Honolulu,1824,235, +0,888,113664,3471,Honolulu,1885,235, +0,889,113664,3471,Honolulu,1885,235, +0,890,113664,3471,Honolulu,1885,235, +0,891,113664,3471,Honolulu,1885,235, +0,892,114176,3471,Honolulu,1946,235, +0,893,114176,3471,Honolulu,1946,235, +0,894,114176,3471,Honolulu,1946,235, +0,895,114176,3471,Honolulu,1946,235, +0,896,114688,3471,Honolulu,2008,235, +0,897,114688,3471,Honolulu,2008,235, +0,898,114688,3471,Honolulu,2008,235, +0,899,114688,3471,Honolulu,2008,235, +0,900,115200,3471,Honolulu,2070,235, +0,901,115200,3471,Honolulu,2070,235, +0,902,115200,3471,Honolulu,2070,235, +0,903,115200,3471,Honolulu,2070,235, +0,904,115712,3471,Honolulu,2132,235, +0,905,115712,3471,Honolulu,2132,235, +0,906,115712,3471,Honolulu,2132,235, +0,907,115712,3471,Honolulu,2132,235, +0,908,116224,3471,Honolulu,2195,235, +0,909,116224,3471,Honolulu,2195,235, +0,910,116224,3471,Honolulu,2195,235, +0,911,116224,3471,Honolulu,2195,235, +0,912,116736,3471,Honolulu,2258,235, +0,913,116736,3471,Honolulu,2258,235, +0,914,116736,3471,Honolulu,2258,235, +0,915,116736,3471,Honolulu,2258,235, +0,916,117248,3471,Honolulu,2321,235, +0,917,117248,3471,Honolulu,2321,235, +0,918,117248,3471,Honolulu,2321,235, +0,919,117248,3471,Honolulu,2321,235, +0,920,117760,3471,Honolulu,2385,235, +0,921,117760,3471,Honolulu,2385,235, +0,922,117760,3471,Honolulu,2385,235, +0,923,117760,3471,Honolulu,2385,235, +0,924,118272,3471,Honolulu,2449,235, +0,925,118272,3471,Honolulu,2449,235, +0,926,118272,3471,Honolulu,2449,235, +0,927,118272,3471,Honolulu,2449,235, +0,928,118784,3471,Honolulu,2513,235, +0,929,118784,3471,Honolulu,2513,235, +0,930,118784,3471,Honolulu,2513,235, +0,931,118784,3471,Honolulu,2513,235, +0,932,119296,3471,Honolulu,2578,235, +0,933,119296,3471,Honolulu,2578,235, +0,934,119296,3471,Honolulu,2578,235, +0,935,119296,3471,Honolulu,2578,235, +0,936,119808,3471,Honolulu,2643,235, +0,937,119808,3471,Honolulu,2643,235, +0,938,119808,3471,Honolulu,2643,235, +0,939,119808,3471,Honolulu,2643,235, +0,940,120320,3471,Honolulu,2708,235, +0,941,120320,3471,Honolulu,2708,235, +0,942,120320,3471,Honolulu,2708,235, +0,943,120320,3471,Honolulu,2708,235, +0,944,120832,3471,Honolulu,2773,235, +0,945,120832,3471,Honolulu,2773,235, +0,946,120832,3471,Honolulu,2773,235, +0,947,120832,3471,Honolulu,2773,235, +0,948,121344,3208,Atafu Village,1,223, +0,949,121344,3208,Atafu Village,1,223, +0,950,121344,3208,Atafu Village,1,223, +0,951,121344,3208,Atafu Village,1,223, +0,952,121856,3208,Atafu Village,2,223, +0,953,121856,3208,Atafu Village,2,223, +0,954,121856,3208,Atafu Village,2,223, +0,955,121856,3208,Atafu Village,2,223, +0,956,122368,3208,Atafu Village,5,223, +0,957,122368,3208,Atafu Village,5,223, +0,958,122368,3208,Atafu Village,5,223, +0,959,122368,3208,Atafu Village,5,223, +0,960,122880,3208,Atafu Village,10,223, +0,961,122880,3208,Atafu Village,10,223, +0,962,122880,3208,Atafu Village,10,223, +0,963,122880,3208,Atafu Village,10,223, +0,964,123392,3208,Atafu Village,17,223, +0,965,123392,3208,Atafu Village,17,223, +0,966,123392,3208,Atafu Village,17,223, +0,967,123392,3208,Atafu Village,17,223, +0,968,123904,3208,Atafu Village,26,223, +0,969,123904,3208,Atafu Village,26,223, +0,970,123904,3208,Atafu Village,26,223, +0,971,123904,3208,Atafu Village,26,223, +0,972,124416,3208,Atafu Village,37,223, +0,973,124416,3208,Atafu Village,37,223, +0,974,124416,3208,Atafu Village,37,223, +0,975,124416,3208,Atafu Village,37,223, +0,976,124928,3208,Atafu Village,50,223, +0,977,124928,3208,Atafu Village,50,223, +0,978,124928,3208,Atafu Village,50,223, +0,979,124928,3208,Atafu Village,50,223, +0,980,125440,3208,Atafu Village,65,223, +0,981,125440,3208,Atafu Village,65,223, +0,982,125440,3208,Atafu Village,65,223, +0,983,125440,3208,Atafu Village,65,223, +0,984,125952,3208,Atafu Village,82,223, +0,985,125952,3208,Atafu Village,82,223, +0,986,125952,3208,Atafu Village,82,223, +0,987,125952,3208,Atafu Village,82,223, +0,988,126464,3208,Atafu Village,101,223, +0,989,126464,3208,Atafu Village,101,223, +0,990,126464,3208,Atafu Village,101,223, +0,991,126464,3208,Atafu Village,101,223, +0,992,126976,3208,Atafu Village,122,223, +0,993,126976,3208,Atafu Village,122,223, +0,994,126976,3208,Atafu Village,122,223, +0,995,126976,3208,Atafu Village,122,223, +0,996,127488,3208,Atafu Village,145,223, +0,997,127488,3208,Atafu Village,145,223, +0,998,127488,3208,Atafu Village,145,223, +0,999,127488,3208,Atafu Village,145,223, +0,1000,128000,3208,Atafu Village,170,223, +0,1001,128000,3208,Atafu Village,170,223, +0,1002,128000,3208,Atafu Village,170,223, +0,1003,128000,3208,Atafu Village,170,223, +0,1004,128512,3208,Atafu Village,194,223, +0,1005,128512,3208,Atafu Village,194,223, +0,1006,128512,3208,Atafu Village,194,223, +0,1007,128512,3208,Atafu Village,194,223, +0,1008,129024,3208,Atafu Village,218,223, +0,1009,129024,3208,Atafu Village,218,223, +0,1010,129024,3208,Atafu Village,218,223, +0,1011,129024,3208,Atafu Village,218,223, +0,1012,129536,3208,Atafu Village,241,223, +0,1013,129536,3208,Atafu Village,241,223, +0,1014,129536,3208,Atafu Village,241,223, +0,1015,129536,3208,Atafu Village,241,223, +0,1016,130048,3208,Atafu Village,263,223, +0,1017,130048,3208,Atafu Village,263,223, +0,1018,130048,3208,Atafu Village,263,223, +0,1019,130048,3208,Atafu Village,263,223, +0,1020,130560,3208,Atafu Village,285,223, +0,1021,130560,3208,Atafu Village,285,223, +0,1022,130560,3208,Atafu Village,285,223, +0,1023,130560,3208,Atafu Village,285,223, +0,1024,131072,3208,Atafu Village,306,223, +0,1025,131072,3208,Atafu Village,306,223, +0,1026,131072,3208,Atafu Village,306,223, +0,1027,131072,3208,Atafu Village,306,223, +0,1028,131584,3208,Atafu Village,326,223, +0,1029,131584,3208,Atafu Village,326,223, +0,1030,131584,3208,Atafu Village,326,223, +0,1031,131584,3208,Atafu Village,326,223, +0,1032,132096,3208,Atafu Village,346,223, +0,1033,132096,3208,Atafu Village,346,223, +0,1034,132096,3208,Atafu Village,346,223, +0,1035,132096,3208,Atafu Village,346,223, +0,1036,132608,3208,Atafu Village,365,223, +0,1037,132608,3208,Atafu Village,365,223, +0,1038,132608,3208,Atafu Village,365,223, +0,1039,132608,3208,Atafu Village,365,223, +0,1040,133120,3208,Atafu Village,383,223, +0,1041,133120,3208,Atafu Village,383,223, +0,1042,133120,3208,Atafu Village,383,223, +0,1043,133120,3208,Atafu Village,383,223, +0,1044,133632,3208,Atafu Village,401,223, +0,1045,133632,3208,Atafu Village,401,223, +0,1046,133632,3208,Atafu Village,401,223, +0,1047,133632,3208,Atafu Village,401,223, +0,1048,134144,3208,Atafu Village,418,223, +0,1049,134144,3208,Atafu Village,418,223, +0,1050,134144,3208,Atafu Village,418,223, +0,1051,134144,3208,Atafu Village,418,223, +0,1052,134656,3208,Atafu Village,434,223, +0,1053,134656,3208,Atafu Village,434,223, +0,1054,134656,3208,Atafu Village,434,223, +0,1055,134656,3208,Atafu Village,434,223, +0,1056,135168,3208,Atafu Village,450,223, +0,1057,135168,3208,Atafu Village,450,223, +0,1058,135168,3208,Atafu Village,450,223, +0,1059,135168,3208,Atafu Village,450,223, +0,1060,135680,3610,Mata-Utu,1,245, +0,1061,135680,3610,Mata-Utu,1,245, +0,1062,135680,3610,Mata-Utu,1,245, +0,1063,135680,3610,Mata-Utu,1,245, +0,1064,136192,3610,Mata-Utu,2,245, +0,1065,136192,3610,Mata-Utu,2,245, +0,1066,136192,3610,Mata-Utu,2,245, +0,1067,136192,3610,Mata-Utu,2,245, +0,1068,136704,3610,Mata-Utu,5,245, +0,1069,136704,3610,Mata-Utu,5,245, +0,1070,136704,3610,Mata-Utu,5,245, +0,1071,136704,3610,Mata-Utu,5,245, +0,1072,137216,3610,Mata-Utu,9,245, +0,1073,137216,3610,Mata-Utu,9,245, +0,1074,137216,3610,Mata-Utu,9,245, +0,1075,137216,3610,Mata-Utu,9,245, +0,1076,137728,3610,Mata-Utu,14,245, +0,1077,137728,3610,Mata-Utu,14,245, +0,1078,137728,3610,Mata-Utu,14,245, +0,1079,137728,3610,Mata-Utu,14,245, +0,1080,138240,3609,Leava,1,245, +0,1081,138240,3609,Leava,1,245, +0,1082,138240,3609,Leava,1,245, +0,1083,138240,3609,Leava,1,245, +0,1084,138752,3609,Leava,2,245, +0,1085,138752,3609,Leava,2,245, +0,1086,138752,3609,Leava,2,245, +0,1087,138752,3609,Leava,2,245, +0,1088,139264,3609,Leava,3,245, +0,1089,139264,3609,Leava,3,245, +0,1090,139264,3609,Leava,3,245, +0,1091,139264,3609,Leava,3,245, +0,1092,139776,3609,Leava,5,245, +0,1093,139776,3609,Leava,5,245, +0,1094,139776,3609,Leava,5,245, +0,1095,139776,3609,Leava,5,245, +0,1096,140288,3609,Leava,7,245, +0,1097,140288,3609,Leava,7,245, +0,1098,140288,3609,Leava,7,245, +0,1099,140288,3609,Leava,7,245, +0,1100,140800,3609,Leava,10,245, +0,1101,140800,3609,Leava,10,245, +0,1102,140800,3609,Leava,10,245, +0,1103,140800,3609,Leava,10,245, +0,1104,141312,3609,Leava,13,245, +0,1105,141312,3609,Leava,13,245, +0,1106,141312,3609,Leava,13,245, +0,1107,141312,3609,Leava,13,245, +0,1108,141824,3609,Leava,16,245, +0,1109,141824,3609,Leava,16,245, +0,1110,141824,3609,Leava,16,245, +0,1111,141824,3609,Leava,16,245, +0,1112,142336,3609,Leava,19,245, +0,1113,142336,3609,Leava,19,245, +0,1114,142336,3609,Leava,19,245, +0,1115,142336,3609,Leava,19,245, +0,1116,142848,3609,Leava,21,245, +0,1117,142848,3609,Leava,21,245, +0,1118,142848,3609,Leava,21,245, +0,1119,142848,3609,Leava,21,245, +0,1120,143360,3609,Leava,23,245, +0,1121,143360,3609,Leava,23,245, +0,1122,143360,3609,Leava,23,245, +0,1123,143360,3609,Leava,23,245, +0,1124,143872,3609,Leava,25,245, +0,1125,143872,3609,Leava,25,245, +0,1126,143872,3609,Leava,25,245, +0,1127,143872,3609,Leava,25,245, +0,1128,144384,3609,Leava,26,245, +0,1129,144384,3609,Leava,26,245, +0,1130,144384,3609,Leava,26,245, +0,1131,144384,3609,Leava,26,245, +0,1132,144896,3253,Nuku‘alofa,4,224, +0,1133,144896,3253,Nuku‘alofa,4,224, +0,1134,144896,3253,Nuku‘alofa,4,224, +0,1135,144896,3253,Nuku‘alofa,4,224, +0,1136,145408,3253,Nuku‘alofa,9,224, +0,1137,145408,3253,Nuku‘alofa,9,224, +0,1138,145408,3253,Nuku‘alofa,9,224, +0,1139,145408,3253,Nuku‘alofa,9,224, +0,1140,145920,3253,Nuku‘alofa,16,224, +0,1141,145920,3253,Nuku‘alofa,16,224, +0,1142,145920,3253,Nuku‘alofa,16,224, +0,1143,145920,3253,Nuku‘alofa,16,224, +0,1144,146432,3253,Nuku‘alofa,24,224, +0,1145,146432,3253,Nuku‘alofa,24,224, +0,1146,146432,3253,Nuku‘alofa,24,224, +0,1147,146432,3253,Nuku‘alofa,24,224, +0,1148,146944,3253,Nuku‘alofa,32,224, +0,1149,146944,3253,Nuku‘alofa,32,224, +0,1150,146944,3253,Nuku‘alofa,32,224, +0,1151,146944,3253,Nuku‘alofa,32,224, +0,1152,147456,3253,Nuku‘alofa,39,224, +0,1153,147456,3253,Nuku‘alofa,39,224, +0,1154,147456,3253,Nuku‘alofa,39,224, +0,1155,147456,3253,Nuku‘alofa,39,224, +0,1156,147968,3253,Nuku‘alofa,45,224, +0,1157,147968,3253,Nuku‘alofa,45,224, +0,1158,147968,3253,Nuku‘alofa,45,224, +0,1159,147968,3253,Nuku‘alofa,45,224, +0,1160,148480,3253,Nuku‘alofa,51,224, +0,1161,148480,3253,Nuku‘alofa,51,224, +0,1162,148480,3253,Nuku‘alofa,51,224, +0,1163,148480,3253,Nuku‘alofa,51,224, +0,1164,148992,3253,Nuku‘alofa,56,224, +0,1165,148992,3253,Nuku‘alofa,56,224, +0,1166,148992,3253,Nuku‘alofa,56,224, +0,1167,148992,3253,Nuku‘alofa,56,224, +0,1168,149504,3253,Nuku‘alofa,60,224, +0,1169,149504,3253,Nuku‘alofa,60,224, +0,1170,149504,3253,Nuku‘alofa,60,224, +0,1171,149504,3253,Nuku‘alofa,60,224, +0,1172,150016,3253,Nuku‘alofa,63,224, +0,1173,150016,3253,Nuku‘alofa,63,224, +0,1174,150016,3253,Nuku‘alofa,63,224, +0,1175,150016,3253,Nuku‘alofa,63,224, +0,1176,150528,3253,Nuku‘alofa,66,224, +0,1177,150528,3253,Nuku‘alofa,66,224, +0,1178,150528,3253,Nuku‘alofa,66,224, +0,1179,150528,3253,Nuku‘alofa,66,224, +0,1180,151040,3253,Nuku‘alofa,68,224, +0,1181,151040,3253,Nuku‘alofa,68,224, +0,1182,151040,3253,Nuku‘alofa,68,224, +0,1183,151040,3253,Nuku‘alofa,68,224, +0,1184,151552,3252,‘Ohonua,88,224, +0,1185,151552,3252,‘Ohonua,88,224, +0,1186,151552,3252,‘Ohonua,88,224, +0,1187,151552,3252,‘Ohonua,88,224, +0,1188,152064,3252,‘Ohonua,104,224, +0,1189,152064,3252,‘Ohonua,104,224, +0,1190,152064,3252,‘Ohonua,104,224, +0,1191,152064,3252,‘Ohonua,104,224, +0,1192,152576,3252,‘Ohonua,120,224, +0,1193,152576,3252,‘Ohonua,120,224, +0,1194,152576,3252,‘Ohonua,120,224, +0,1195,152576,3252,‘Ohonua,120,224, +0,1196,153088,3252,‘Ohonua,137,224, +0,1197,153088,3252,‘Ohonua,137,224, +0,1198,153088,3252,‘Ohonua,137,224, +0,1199,153088,3252,‘Ohonua,137,224, +0,1200,153600,3252,‘Ohonua,154,224, +0,1201,153600,3252,‘Ohonua,154,224, +0,1202,153600,3252,‘Ohonua,154,224, +0,1203,153600,3252,‘Ohonua,154,224, +0,1204,154112,3252,‘Ohonua,172,224, +0,1205,154112,3252,‘Ohonua,172,224, +0,1206,154112,3252,‘Ohonua,172,224, +0,1207,154112,3252,‘Ohonua,172,224, +0,1208,154624,3252,‘Ohonua,190,224, +0,1209,154624,3252,‘Ohonua,190,224, +0,1210,154624,3252,‘Ohonua,190,224, +0,1211,154624,3252,‘Ohonua,190,224, +0,1212,155136,3252,‘Ohonua,208,224, +0,1213,155136,3252,‘Ohonua,208,224, +0,1214,155136,3252,‘Ohonua,208,224, +0,1215,155136,3252,‘Ohonua,208,224, +0,1216,155648,3252,‘Ohonua,226,224, +0,1217,155648,3252,‘Ohonua,226,224, +0,1218,155648,3252,‘Ohonua,226,224, +0,1219,155648,3252,‘Ohonua,226,224, +0,1220,156160,2317,Waitangi,1,155, +0,1221,156160,2317,Waitangi,1,155, +0,1222,156160,2317,Waitangi,1,155, +0,1223,156160,2317,Waitangi,1,155, +0,1224,156672,2317,Waitangi,6,155, +0,1225,156672,2317,Waitangi,6,155, +0,1226,156672,2317,Waitangi,6,155, +0,1227,156672,2317,Waitangi,6,155, +0,1228,157184,2317,Waitangi,23,155, +0,1229,157184,2317,Waitangi,23,155, +0,1230,157184,2317,Waitangi,23,155, +0,1231,157184,2317,Waitangi,23,155, +0,1232,157696,2317,Waitangi,42,155, +0,1233,157696,2317,Waitangi,42,155, +0,1234,157696,2317,Waitangi,42,155, +0,1235,157696,2317,Waitangi,42,155, +0,1236,158208,2317,Waitangi,62,155, +0,1237,158208,2317,Waitangi,62,155, +0,1238,158208,2317,Waitangi,62,155, +0,1239,158208,2317,Waitangi,62,155, +0,1240,158720,2317,Waitangi,83,155, +0,1241,158720,2317,Waitangi,83,155, +0,1242,158720,2317,Waitangi,83,155, +0,1243,158720,2317,Waitangi,83,155, +0,1244,159232,2317,Waitangi,105,155, +0,1245,159232,2317,Waitangi,105,155, +0,1246,159232,2317,Waitangi,105,155, +0,1247,159232,2317,Waitangi,105,155, +0,1248,159744,2317,Waitangi,128,155, +0,1249,159744,2317,Waitangi,128,155, +0,1250,159744,2317,Waitangi,128,155, +0,1251,159744,2317,Waitangi,128,155, +0,1252,160256,2317,Waitangi,152,155, +0,1253,160256,2317,Waitangi,152,155, +0,1254,160256,2317,Waitangi,152,155, +0,1255,160256,2317,Waitangi,152,155, +0,1256,160768,2317,Waitangi,177,155, +0,1257,160768,2317,Waitangi,177,155, +0,1258,160768,2317,Waitangi,177,155, +0,1259,160768,2317,Waitangi,177,155, +0,1260,161280,2317,Waitangi,203,155, +0,1261,161280,2317,Waitangi,203,155, +0,1262,161280,2317,Waitangi,203,155, +0,1263,161280,2317,Waitangi,203,155, +0,1264,161792,2317,Waitangi,230,155, +0,1265,161792,2317,Waitangi,230,155, +0,1266,161792,2317,Waitangi,230,155, +0,1267,161792,2317,Waitangi,230,155, +0,1268,162304,2317,Waitangi,258,155, +0,1269,162304,2317,Waitangi,258,155, +0,1270,162304,2317,Waitangi,258,155, +0,1271,162304,2317,Waitangi,258,155, +0,1272,162816,2317,Waitangi,287,155, +0,1273,162816,2317,Waitangi,287,155, +0,1274,162816,2317,Waitangi,287,155, +0,1275,162816,2317,Waitangi,287,155, +0,1276,163328,2317,Waitangi,318,155, +0,1277,163328,2317,Waitangi,318,155, +0,1278,163328,2317,Waitangi,318,155, +0,1279,163328,2317,Waitangi,318,155, +0,1280,163840,2317,Waitangi,350,155, +0,1281,163840,2317,Waitangi,350,155, +0,1282,163840,2317,Waitangi,350,155, +0,1283,163840,2317,Waitangi,350,155, +0,1284,164352,2317,Waitangi,383,155, +0,1285,164352,2317,Waitangi,383,155, +0,1286,164352,2317,Waitangi,383,155, +0,1287,164352,2317,Waitangi,383,155, +0,1288,164864,2317,Waitangi,417,155, +0,1289,164864,2317,Waitangi,417,155, +0,1290,164864,2317,Waitangi,417,155, +0,1291,164864,2317,Waitangi,417,155, +0,1292,165376,2317,Waitangi,452,155, +0,1293,165376,2317,Waitangi,452,155, +0,1294,165376,2317,Waitangi,452,155, +0,1295,165376,2317,Waitangi,452,155, +0,1296,165888,2317,Waitangi,488,155, +0,1297,165888,2317,Waitangi,488,155, +0,1298,165888,2317,Waitangi,488,155, +0,1299,165888,2317,Waitangi,488,155, +0,1300,166400,2317,Waitangi,525,155, +0,1301,166400,2317,Waitangi,525,155, +0,1302,166400,2317,Waitangi,525,155, +0,1303,166400,2317,Waitangi,525,155, +0,1304,166912,2317,Waitangi,563,155, +0,1305,166912,2317,Waitangi,563,155, +0,1306,166912,2317,Waitangi,563,155, +0,1307,166912,2317,Waitangi,563,155, +0,1308,167424,2317,Waitangi,602,155, +0,1309,167424,2317,Waitangi,602,155, +0,1310,167424,2317,Waitangi,602,155, +0,1311,167424,2317,Waitangi,602,155, +0,1312,167936,2317,Waitangi,642,155, +0,1313,167936,2317,Waitangi,642,155, +0,1314,167936,2317,Waitangi,642,155, +0,1315,167936,2317,Waitangi,642,155, +0,1316,168448,2317,Waitangi,682,155, +0,1317,168448,2317,Waitangi,682,155, +0,1318,168448,2317,Waitangi,682,155, +0,1319,168448,2317,Waitangi,682,155, +0,1320,168960,2317,Waitangi,723,155, +0,1321,168960,2317,Waitangi,723,155, +0,1322,168960,2317,Waitangi,723,155, +0,1323,168960,2317,Waitangi,723,155, +0,1324,169472,2317,Waitangi,765,155, +0,1325,169472,2317,Waitangi,765,155, +0,1326,169472,2317,Waitangi,765,155, +0,1327,169472,2317,Waitangi,765,155, +0,1328,169984,2317,Waitangi,808,155, +0,1329,169984,2317,Waitangi,808,155, +0,1330,169984,2317,Waitangi,808,155, +0,1331,169984,2317,Waitangi,808,155, +0,1332,170496,2317,Waitangi,852,155, +0,1333,170496,2317,Waitangi,852,155, +0,1334,170496,2317,Waitangi,852,155, +0,1335,170496,2317,Waitangi,852,155, +0,1336,171008,2317,Waitangi,898,155, +0,1337,171008,2317,Waitangi,898,155, +0,1338,171008,2317,Waitangi,898,155, +0,1339,171008,2317,Waitangi,898,155, +0,1340,171520,2317,Waitangi,944,155, +0,1341,171520,2317,Waitangi,944,155, +0,1342,171520,2317,Waitangi,944,155, +0,1343,171520,2317,Waitangi,944,155, +0,1344,172032,2317,Waitangi,991,155, +0,1345,172032,2317,Waitangi,991,155, +0,1346,172032,2317,Waitangi,991,155, +0,1347,172032,2317,Waitangi,991,155, +0,1348,172544,2317,Waitangi,1038,155, +0,1349,172544,2317,Waitangi,1038,155, +0,1350,172544,2317,Waitangi,1038,155, +0,1351,172544,2317,Waitangi,1038,155, +0,1352,173056,2317,Waitangi,1085,155, +0,1353,173056,2317,Waitangi,1085,155, +0,1354,173056,2317,Waitangi,1085,155, +0,1355,173056,2317,Waitangi,1085,155, +0,1356,173568,2317,Waitangi,1132,155, +0,1357,173568,2317,Waitangi,1132,155, +0,1358,173568,2317,Waitangi,1132,155, +0,1359,173568,2317,Waitangi,1132,155, +0,1360,174080,2317,Waitangi,1180,155, +0,1361,174080,2317,Waitangi,1180,155, +0,1362,174080,2317,Waitangi,1180,155, +0,1363,174080,2317,Waitangi,1180,155, +0,1364,174592,2317,Waitangi,1228,155, +0,1365,174592,2317,Waitangi,1228,155, +0,1366,174592,2317,Waitangi,1228,155, +0,1367,174592,2317,Waitangi,1228,155, +0,1368,175104,2317,Waitangi,1276,155, +0,1369,175104,2317,Waitangi,1276,155, +0,1370,175104,2317,Waitangi,1276,155, +0,1371,175104,2317,Waitangi,1276,155, +0,1372,175616,2317,Waitangi,1324,155, +0,1373,175616,2317,Waitangi,1324,155, +0,1374,175616,2317,Waitangi,1324,155, +0,1375,175616,2317,Waitangi,1324,155, +0,1376,176128,2317,Waitangi,1373,155, +0,1377,176128,2317,Waitangi,1373,155, +0,1378,176128,2317,Waitangi,1373,155, +0,1379,176128,2317,Waitangi,1373,155, +0,1380,176640,2317,Waitangi,1422,155, +0,1381,176640,2317,Waitangi,1422,155, +0,1382,176640,2317,Waitangi,1422,155, +0,1383,176640,2317,Waitangi,1422,155, +0,1384,177152,2317,Waitangi,1471,155, +0,1385,177152,2317,Waitangi,1471,155, +0,1386,177152,2317,Waitangi,1471,155, +0,1387,177152,2317,Waitangi,1471,155, +0,1388,177664,2317,Waitangi,1520,155, +0,1389,177664,2317,Waitangi,1520,155, +0,1390,177664,2317,Waitangi,1520,155, +0,1391,177664,2317,Waitangi,1520,155, +0,1392,178176,2317,Waitangi,1570,155, +0,1393,178176,2317,Waitangi,1570,155, +0,1394,178176,2317,Waitangi,1570,155, +0,1395,178176,2317,Waitangi,1570,155, +0,1396,178688,2317,Waitangi,1620,155, +0,1397,178688,2317,Waitangi,1620,155, +0,1398,178688,2317,Waitangi,1620,155, +0,1399,178688,2317,Waitangi,1620,155, +0,1400,179200,2317,Waitangi,1670,155, +0,1401,179200,2317,Waitangi,1670,155, +0,1402,179200,2317,Waitangi,1670,155, +0,1403,179200,2317,Waitangi,1670,155, +0,1404,179712,2317,Waitangi,1720,155, +0,1405,179712,2317,Waitangi,1720,155, +0,1406,179712,2317,Waitangi,1720,155, +0,1407,179712,2317,Waitangi,1720,155, +0,1408,180224,2317,Waitangi,1771,155, +0,1409,180224,2317,Waitangi,1771,155, +0,1410,180224,2317,Waitangi,1771,155, +0,1411,180224,2317,Waitangi,1771,155, +0,1412,180736,2317,Waitangi,1822,155, +0,1413,180736,2317,Waitangi,1822,155, +0,1414,180736,2317,Waitangi,1822,155, +0,1415,180736,2317,Waitangi,1822,155, +0,1416,181248,2317,Waitangi,1873,155, +0,1417,181248,2317,Waitangi,1873,155, +0,1418,181248,2317,Waitangi,1873,155, +0,1419,181248,2317,Waitangi,1873,155, +0,1420,181760,2317,Waitangi,1924,155, +0,1421,181760,2317,Waitangi,1924,155, +0,1422,181760,2317,Waitangi,1924,155, +0,1423,181760,2317,Waitangi,1924,155, +0,1424,182272,2317,Waitangi,1976,155, +0,1425,182272,2317,Waitangi,1976,155, +0,1426,182272,2317,Waitangi,1976,155, +0,1427,182272,2317,Waitangi,1976,155, +0,1428,182784,2317,Waitangi,2028,155, +0,1429,182784,2317,Waitangi,2028,155, +0,1430,182784,2317,Waitangi,2028,155, +0,1431,182784,2317,Waitangi,2028,155, +0,1432,183296,2317,Waitangi,2080,155, +0,1433,183296,2317,Waitangi,2080,155, +0,1434,183296,2317,Waitangi,2080,155, +0,1435,183296,2317,Waitangi,2080,155, +0,1436,183808,2317,Waitangi,2132,155, +0,1437,183808,2317,Waitangi,2132,155, +0,1438,183808,2317,Waitangi,2132,155, +0,1439,183808,2317,Waitangi,2132,155, +0,1440,184320,2317,Waitangi,2184,155, +0,1441,184320,2317,Waitangi,2184,155, +0,1442,184320,2317,Waitangi,2184,155, +0,1443,184320,2317,Waitangi,2184,155, +0,1444,184832,2317,Waitangi,2237,155, +0,1445,184832,2317,Waitangi,2237,155, +0,1446,184832,2317,Waitangi,2237,155, +0,1447,184832,2317,Waitangi,2237,155, +0,1448,185344,2317,Waitangi,2290,155, +0,1449,185344,2317,Waitangi,2290,155, +0,1450,185344,2317,Waitangi,2290,155, +0,1451,185344,2317,Waitangi,2290,155, +0,1452,185856,2317,Waitangi,2343,155, +0,1453,185856,2317,Waitangi,2343,155, +0,1454,185856,2317,Waitangi,2343,155, +0,1455,185856,2317,Waitangi,2343,155, +0,1456,186368,2317,Waitangi,2396,155, +0,1457,186368,2317,Waitangi,2396,155, +0,1458,186368,2317,Waitangi,2396,155, +0,1459,186368,2317,Waitangi,2396,155, +0,1460,186880,2317,Waitangi,2449,155, +0,1461,186880,2317,Waitangi,2449,155, +0,1462,186880,2317,Waitangi,2449,155, +0,1463,186880,2317,Waitangi,2449,155, +0,1464,187392,2317,Waitangi,2503,155, +0,1465,187392,2317,Waitangi,2503,155, +0,1466,187392,2317,Waitangi,2503,155, +0,1467,187392,2317,Waitangi,2503,155, +0,1468,187904,2317,Waitangi,2557,155, +0,1469,187904,2317,Waitangi,2557,155, +0,1470,187904,2317,Waitangi,2557,155, +0,1471,187904,2317,Waitangi,2557,155, +0,1472,188416,2317,Waitangi,2611,155, +0,1473,188416,2317,Waitangi,2611,155, +0,1474,188416,2317,Waitangi,2611,155, +0,1475,188416,2317,Waitangi,2611,155, +0,1476,188928,2317,Waitangi,2665,155, +0,1477,188928,2317,Waitangi,2665,155, +0,1478,188928,2317,Waitangi,2665,155, +0,1479,188928,2317,Waitangi,2665,155, +0,1480,189440,2317,Waitangi,2719,155, +0,1481,189440,2317,Waitangi,2719,155, +0,1482,189440,2317,Waitangi,2719,155, +0,1483,189440,2317,Waitangi,2719,155, +0,1484,189952,2317,Waitangi,2774,155, +0,1485,189952,2317,Waitangi,2774,155, +0,1486,189952,2317,Waitangi,2774,155, +0,1487,189952,2317,Waitangi,2774,155, +0,1488,190464,2317,Waitangi,2829,155, +0,1489,190464,2317,Waitangi,2829,155, +0,1490,190464,2317,Waitangi,2829,155, +0,1491,190464,2317,Waitangi,2829,155, +0,1492,190976,2317,Waitangi,2884,155, +0,1493,190976,2317,Waitangi,2884,155, +0,1494,190976,2317,Waitangi,2884,155, +0,1495,190976,2317,Waitangi,2884,155, +0,1496,191488,2317,Waitangi,2939,155, +0,1497,191488,2317,Waitangi,2939,155, +0,1498,191488,2317,Waitangi,2939,155, +0,1499,191488,2317,Waitangi,2939,155, +0,1500,192000,2317,Waitangi,2994,155, +0,1501,192000,2317,Waitangi,2994,155, +0,1502,192000,2317,Waitangi,2994,155, +0,1503,192000,2317,Waitangi,2994,155, +0,1504,192512,2317,Waitangi,3049,155, +0,1505,192512,2317,Waitangi,3049,155, +0,1506,192512,2317,Waitangi,3049,155, +0,1507,192512,2317,Waitangi,3049,155, +0,1508,193024,2317,Waitangi,3105,155, +0,1509,193024,2317,Waitangi,3105,155, +0,1510,193024,2317,Waitangi,3105,155, +0,1511,193024,2317,Waitangi,3105,155, +0,1512,193536,2317,Waitangi,3161,155, +0,1513,193536,2317,Waitangi,3161,155, +0,1514,193536,2317,Waitangi,3161,155, +0,1515,193536,2317,Waitangi,3161,155, +0,1516,194048,2317,Waitangi,3217,155, +0,1517,194048,2317,Waitangi,3217,155, +0,1518,194048,2317,Waitangi,3217,155, +0,1519,194048,2317,Waitangi,3217,155, +0,1520,194560,2317,Waitangi,3273,155, +0,1521,194560,2317,Waitangi,3273,155, +0,1522,194560,2317,Waitangi,3273,155, +0,1523,194560,2317,Waitangi,3273,155, +0,1524,195072,2317,Waitangi,3329,155, +0,1525,195072,2317,Waitangi,3329,155, +0,1526,195072,2317,Waitangi,3329,155, +0,1527,195072,2317,Waitangi,3329,155, +0,1528,195584,2317,Waitangi,3385,155, +0,1529,195584,2317,Waitangi,3385,155, +0,1530,195584,2317,Waitangi,3385,155, +0,1531,195584,2317,Waitangi,3385,155, +0,1532,196096,2317,Waitangi,3442,155, +0,1533,196096,2317,Waitangi,3442,155, +0,1534,196096,2317,Waitangi,3442,155, +0,1535,196096,2317,Waitangi,3442,155, +0,1536,196608,2317,Waitangi,3499,155, +0,1537,196608,2317,Waitangi,3499,155, +0,1538,196608,2317,Waitangi,3499,155, +0,1539,196608,2317,Waitangi,3499,155, +0,1540,197120,2317,Waitangi,3556,155, +0,1541,197120,2317,Waitangi,3556,155, +0,1542,197120,2317,Waitangi,3556,155, +0,1543,197120,2317,Waitangi,3556,155, +0,1544,197632,2317,Waitangi,3613,155, +0,1545,197632,2317,Waitangi,3613,155, +0,1546,197632,2317,Waitangi,3613,155, +0,1547,197632,2317,Waitangi,3613,155, +0,1548,198144,2317,Waitangi,3670,155, +0,1549,198144,2317,Waitangi,3670,155, +0,1550,198144,2317,Waitangi,3670,155, +0,1551,198144,2317,Waitangi,3670,155, +0,1552,198656,2317,Waitangi,3727,155, +0,1553,198656,2317,Waitangi,3727,155, +0,1554,198656,2317,Waitangi,3727,155, +0,1555,198656,2317,Waitangi,3727,155, +0,1556,199168,2317,Waitangi,3785,155, +0,1557,199168,2317,Waitangi,3785,155, +0,1558,199168,2317,Waitangi,3785,155, +0,1559,199168,2317,Waitangi,3785,155, +0,1560,199680,2317,Waitangi,3843,155, +0,1561,199680,2317,Waitangi,3843,155, +0,1562,199680,2317,Waitangi,3843,155, +0,1563,199680,2317,Waitangi,3843,155, +0,1564,200192,2317,Waitangi,3901,155, +0,1565,200192,2317,Waitangi,3901,155, +0,1566,200192,2317,Waitangi,3901,155, +0,1567,200192,2317,Waitangi,3901,155, +0,1568,200704,2317,Waitangi,3959,155, +0,1569,200704,2317,Waitangi,3959,155, +0,1570,200704,2317,Waitangi,3959,155, +0,1571,200704,2317,Waitangi,3959,155, +0,1572,201216,2317,Waitangi,4017,155, +0,1573,201216,2317,Waitangi,4017,155, +0,1574,201216,2317,Waitangi,4017,155, +0,1575,201216,2317,Waitangi,4017,155, +0,1576,201728,2317,Waitangi,4075,155, +0,1577,201728,2317,Waitangi,4075,155, +0,1578,201728,2317,Waitangi,4075,155, +0,1579,201728,2317,Waitangi,4075,155, +0,1580,202240,2317,Waitangi,4133,155, +0,1581,202240,2317,Waitangi,4133,155, +0,1582,202240,2317,Waitangi,4133,155, +0,1583,202240,2317,Waitangi,4133,155, +0,1584,202752,2317,Waitangi,4192,155, +0,1585,202752,2317,Waitangi,4192,155, +0,1586,202752,2317,Waitangi,4192,155, +0,1587,202752,2317,Waitangi,4192,155, +0,1588,203264,2317,Waitangi,4251,155, +0,1589,203264,2317,Waitangi,4251,155, +0,1590,203264,2317,Waitangi,4251,155, +0,1591,203264,2317,Waitangi,4251,155, +0,1592,203776,2317,Waitangi,4310,155, +0,1593,203776,2317,Waitangi,4310,155, +0,1594,203776,2317,Waitangi,4310,155, +0,1595,203776,2317,Waitangi,4310,155, +0,1596,204288,2317,Waitangi,4369,155, +0,1597,204288,2317,Waitangi,4369,155, +0,1598,204288,2317,Waitangi,4369,155, +0,1599,204288,2317,Waitangi,4369,155, +0,1600,204800,2317,Waitangi,4428,155, +0,1601,204800,2317,Waitangi,4428,155, +0,1602,204800,2317,Waitangi,4428,155, +0,1603,204800,2317,Waitangi,4428,155, +0,1604,205312,2317,Waitangi,4487,155, +0,1605,205312,2317,Waitangi,4487,155, +0,1606,205312,2317,Waitangi,4487,155, +0,1607,205312,2317,Waitangi,4487,155, +0,1608,205824,2317,Waitangi,4546,155, +0,1609,205824,2317,Waitangi,4546,155, +0,1610,205824,2317,Waitangi,4546,155, +0,1611,205824,2317,Waitangi,4546,155, +0,1612,206336,2317,Waitangi,4606,155, +0,1613,206336,2317,Waitangi,4606,155, +0,1614,206336,2317,Waitangi,4606,155, +0,1615,206336,2317,Waitangi,4606,155, +0,1616,206848,2317,Waitangi,4666,155, +0,1617,206848,2317,Waitangi,4666,155, +0,1618,206848,2317,Waitangi,4666,155, +0,1619,206848,2317,Waitangi,4666,155, +0,1620,207360,2317,Waitangi,4726,155, +0,1621,207360,2317,Waitangi,4726,155, +0,1622,207360,2317,Waitangi,4726,155, +0,1623,207360,2317,Waitangi,4726,155, +0,1624,207872,2317,Waitangi,4786,155, +0,1625,207872,2317,Waitangi,4786,155, +0,1626,207872,2317,Waitangi,4786,155, +0,1627,207872,2317,Waitangi,4786,155, +0,1628,208384,2317,Waitangi,4846,155, +0,1629,208384,2317,Waitangi,4846,155, +0,1630,208384,2317,Waitangi,4846,155, +0,1631,208384,2317,Waitangi,4846,155, +0,1632,208896,2317,Waitangi,4906,155, +0,1633,208896,2317,Waitangi,4906,155, +0,1634,208896,2317,Waitangi,4906,155, +0,1635,208896,2317,Waitangi,4906,155, +0,1636,209408,2317,Waitangi,4966,155, +0,1637,209408,2317,Waitangi,4966,155, +0,1638,209408,2317,Waitangi,4966,155, +0,1639,209408,2317,Waitangi,4966,155, +0,1640,209920,2317,Waitangi,5026,155, +0,1641,209920,2317,Waitangi,5026,155, +0,1642,209920,2317,Waitangi,5026,155, +0,1643,209920,2317,Waitangi,5026,155, +0,1644,210432,2317,Waitangi,5087,155, +0,1645,210432,2317,Waitangi,5087,155, +0,1646,210432,2317,Waitangi,5087,155, +0,1647,210432,2317,Waitangi,5087,155, +0,1648,210944,2317,Waitangi,5148,155, +0,1649,210944,2317,Waitangi,5148,155, +0,1650,210944,2317,Waitangi,5148,155, +0,1651,210944,2317,Waitangi,5148,155, +0,1652,211456,2317,Waitangi,5209,155, +0,1653,211456,2317,Waitangi,5209,155, +0,1654,211456,2317,Waitangi,5209,155, +0,1655,211456,2317,Waitangi,5209,155, +0,1656,211968,2317,Waitangi,5270,155, +0,1657,211968,2317,Waitangi,5270,155, +0,1658,211968,2317,Waitangi,5270,155, +0,1659,211968,2317,Waitangi,5270,155, +0,1660,212480,2317,Waitangi,5331,155, +0,1661,212480,2317,Waitangi,5331,155, +0,1662,212480,2317,Waitangi,5331,155, +0,1663,212480,2317,Waitangi,5331,155, +0,1664,212992,2317,Waitangi,5392,155, +0,1665,212992,2317,Waitangi,5392,155, +0,1666,212992,2317,Waitangi,5392,155, +0,1667,212992,2317,Waitangi,5392,155, +0,1668,213504,2317,Waitangi,5453,155, +0,1669,213504,2317,Waitangi,5453,155, +0,1670,213504,2317,Waitangi,5453,155, +0,1671,213504,2317,Waitangi,5453,155, +0,1672,214016,2317,Waitangi,5514,155, +0,1673,214016,2317,Waitangi,5514,155, +0,1674,214016,2317,Waitangi,5514,155, +0,1675,214016,2317,Waitangi,5514,155, +0,1676,214528,2317,Waitangi,5575,155, +0,1677,214528,2317,Waitangi,5575,155, +0,1678,214528,2317,Waitangi,5575,155, +0,1679,214528,2317,Waitangi,5575,155, +0,1680,215040,2317,Waitangi,5637,155, +0,1681,215040,2317,Waitangi,5637,155, +0,1682,215040,2317,Waitangi,5637,155, +0,1683,215040,2317,Waitangi,5637,155, +0,1684,215552,2317,Waitangi,5699,155, +0,1685,215552,2317,Waitangi,5699,155, +0,1686,215552,2317,Waitangi,5699,155, +0,1687,215552,2317,Waitangi,5699,155, +0,1688,216064,2317,Waitangi,5761,155, +0,1689,216064,2317,Waitangi,5761,155, +0,1690,216064,2317,Waitangi,5761,155, +0,1691,216064,2317,Waitangi,5761,155, +0,1692,216576,2317,Waitangi,5823,155, +0,1693,216576,2317,Waitangi,5823,155, +0,1694,216576,2317,Waitangi,5823,155, +0,1695,216576,2317,Waitangi,5823,155, +0,1696,217088,2317,Waitangi,5885,155, +0,1697,217088,2317,Waitangi,5885,155, +0,1698,217088,2317,Waitangi,5885,155, +0,1699,217088,2317,Waitangi,5885,155, +0,1700,217600,2317,Waitangi,5947,155, +0,1701,217600,2317,Waitangi,5947,155, +0,1702,217600,2317,Waitangi,5947,155, +0,1703,217600,2317,Waitangi,5947,155, +0,1704,218112,2317,Waitangi,6009,155, +0,1705,218112,2317,Waitangi,6009,155, +0,1706,218112,2317,Waitangi,6009,155, +0,1707,218112,2317,Waitangi,6009,155, +0,1708,218624,2317,Waitangi,6071,155, +0,1709,218624,2317,Waitangi,6071,155, +0,1710,218624,2317,Waitangi,6071,155, +0,1711,218624,2317,Waitangi,6071,155, +0,1712,219136,2317,Waitangi,6133,155, +0,1713,219136,2317,Waitangi,6133,155, +0,1714,219136,2317,Waitangi,6133,155, +0,1715,219136,2317,Waitangi,6133,155, +0,1716,219648,2317,Waitangi,6196,155, +0,1717,219648,2317,Waitangi,6196,155, +0,1718,219648,2317,Waitangi,6196,155, +0,1719,219648,2317,Waitangi,6196,155, +0,1720,220160,2317,Waitangi,6259,155, +0,1721,220160,2317,Waitangi,6259,155, +0,1722,220160,2317,Waitangi,6259,155, +0,1723,220160,2317,Waitangi,6259,155, +0,1724,220672,2317,Waitangi,6322,155, +0,1725,220672,2317,Waitangi,6322,155, +0,1726,220672,2317,Waitangi,6322,155, +0,1727,220672,2317,Waitangi,6322,155, +0,1728,221184,2317,Waitangi,6385,155, +0,1729,221184,2317,Waitangi,6385,155, +0,1730,221184,2317,Waitangi,6385,155, +0,1731,221184,2317,Waitangi,6385,155, +0,1732,221696,2317,Waitangi,6448,155, +0,1733,221696,2317,Waitangi,6448,155, +0,1734,221696,2317,Waitangi,6448,155, +0,1735,221696,2317,Waitangi,6448,155, +0,1736,222208,2317,Waitangi,6511,155, +0,1737,222208,2317,Waitangi,6511,155, +0,1738,222208,2317,Waitangi,6511,155, +0,1739,222208,2317,Waitangi,6511,155, +0,1740,222720,2317,Waitangi,6574,155, +0,1741,222720,2317,Waitangi,6574,155, +0,1742,222720,2317,Waitangi,6574,155, +0,1743,222720,2317,Waitangi,6574,155, +0,1744,223232,2317,Waitangi,6637,155, +0,1745,223232,2317,Waitangi,6637,155, +0,1746,223232,2317,Waitangi,6637,155, +0,1747,223232,2317,Waitangi,6637,155, +0,1748,223744,2317,Waitangi,6700,155, +0,1749,223744,2317,Waitangi,6700,155, +0,1750,223744,2317,Waitangi,6700,155, +0,1751,223744,2317,Waitangi,6700,155, +0,1752,224256,2317,Waitangi,6763,155, +0,1753,224256,2317,Waitangi,6763,155, +0,1754,224256,2317,Waitangi,6763,155, +0,1755,224256,2317,Waitangi,6763,155, +0,1756,224768,2317,Waitangi,6826,155, +0,1757,224768,2317,Waitangi,6826,155, +0,1758,224768,2317,Waitangi,6826,155, +0,1759,224768,2317,Waitangi,6826,155, +0,1760,225280,2317,Waitangi,6889,155, +0,1761,225280,2317,Waitangi,6889,155, +0,1762,225280,2317,Waitangi,6889,155, +0,1763,225280,2317,Waitangi,6889,155, +0,1764,225792,2317,Waitangi,6953,155, +0,1765,225792,2317,Waitangi,6953,155, +0,1766,225792,2317,Waitangi,6953,155, +0,1767,225792,2317,Waitangi,6953,155, +0,1768,226304,2317,Waitangi,7017,155, +0,1769,226304,2317,Waitangi,7017,155, +0,1770,226304,2317,Waitangi,7017,155, +0,1771,226304,2317,Waitangi,7017,155, +0,1772,226816,2317,Waitangi,7081,155, +0,1773,226816,2317,Waitangi,7081,155, +0,1774,226816,2317,Waitangi,7081,155, +0,1775,226816,2317,Waitangi,7081,155, +0,1776,227328,2317,Waitangi,7145,155, +0,1777,227328,2317,Waitangi,7145,155, +0,1778,227328,2317,Waitangi,7145,155, +0,1779,227328,2317,Waitangi,7145,155, +0,1780,227840,2317,Waitangi,7209,155, +0,1781,227840,2317,Waitangi,7209,155, +0,1782,227840,2317,Waitangi,7209,155, +0,1783,227840,2317,Waitangi,7209,155, +0,1784,228352,2317,Waitangi,7273,155, +0,1785,228352,2317,Waitangi,7273,155, +0,1786,228352,2317,Waitangi,7273,155, +0,1787,228352,2317,Waitangi,7273,155, +0,1788,228864,2317,Waitangi,7337,155, +0,1789,228864,2317,Waitangi,7337,155, +0,1790,228864,2317,Waitangi,7337,155, +0,1791,228864,2317,Waitangi,7337,155, +0,1792,229376,2317,Waitangi,7401,155, +0,1793,229376,2317,Waitangi,7401,155, +0,1794,229376,2317,Waitangi,7401,155, +0,1795,229376,2317,Waitangi,7401,155, +0,1796,229888,2317,Waitangi,7465,155, +0,1797,229888,2317,Waitangi,7465,155, +0,1798,229888,2317,Waitangi,7465,155, +0,1799,229888,2317,Waitangi,7465,155, +0,1800,230400,2317,Waitangi,7529,155, +0,1801,230400,2317,Waitangi,7529,155, +0,1802,230400,2317,Waitangi,7529,155, +0,1803,230400,2317,Waitangi,7529,155, +0,1804,230912,2317,Waitangi,7593,155, +0,1805,230912,2317,Waitangi,7593,155, +0,1806,230912,2317,Waitangi,7593,155, +0,1807,230912,2317,Waitangi,7593,155, +0,1808,231424,2317,Waitangi,7657,155, +0,1809,231424,2317,Waitangi,7657,155, +0,1810,231424,2317,Waitangi,7657,155, +0,1811,231424,2317,Waitangi,7657,155, +0,1812,231936,2317,Waitangi,7722,155, +0,1813,231936,2317,Waitangi,7722,155, +0,1814,231936,2317,Waitangi,7722,155, +0,1815,231936,2317,Waitangi,7722,155, +0,1816,232448,2317,Waitangi,7787,155, +0,1817,232448,2317,Waitangi,7787,155, +0,1818,232448,2317,Waitangi,7787,155, +0,1819,232448,2317,Waitangi,7787,155, +0,1820,232960,2317,Waitangi,7852,155, +0,1821,232960,2317,Waitangi,7852,155, +0,1822,232960,2317,Waitangi,7852,155, +0,1823,232960,2317,Waitangi,7852,155, +0,1824,233472,2317,Waitangi,7917,155, +0,1825,233472,2317,Waitangi,7917,155, +0,1826,233472,2317,Waitangi,7917,155, +0,1827,233472,2317,Waitangi,7917,155, +0,1828,233984,2317,Waitangi,7982,155, +0,1829,233984,2317,Waitangi,7982,155, +0,1830,233984,2317,Waitangi,7982,155, +0,1831,233984,2317,Waitangi,7982,155, +0,1832,234496,2317,Waitangi,8047,155, +0,1833,234496,2317,Waitangi,8047,155, +0,1834,234496,2317,Waitangi,8047,155, +0,1835,234496,2317,Waitangi,8047,155, +0,1836,235008,2317,Waitangi,8112,155, +0,1837,235008,2317,Waitangi,8112,155, +0,1838,235008,2317,Waitangi,8112,155, +0,1839,235008,2317,Waitangi,8112,155, +0,1840,235520,2317,Waitangi,8177,155, +0,1841,235520,2317,Waitangi,8177,155, +0,1842,235520,2317,Waitangi,8177,155, +0,1843,235520,2317,Waitangi,8177,155, +0,1844,236032,2317,Waitangi,8242,155, +0,1845,236032,2317,Waitangi,8242,155, +0,1846,236032,2317,Waitangi,8242,155, +0,1847,236032,2317,Waitangi,8242,155, +0,1848,236544,2317,Waitangi,8307,155, +0,1849,236544,2317,Waitangi,8307,155, +0,1850,236544,2317,Waitangi,8307,155, +0,1851,236544,2317,Waitangi,8307,155, +0,1852,237056,2317,Waitangi,8372,155, +0,1853,237056,2317,Waitangi,8372,155, +0,1854,237056,2317,Waitangi,8372,155, +0,1855,237056,2317,Waitangi,8372,155, +0,1856,237568,2317,Waitangi,8437,155, +0,1857,237568,2317,Waitangi,8437,155, +0,1858,237568,2317,Waitangi,8437,155, +0,1859,237568,2317,Waitangi,8437,155, +0,1860,238080,2317,Waitangi,8502,155, +0,1861,238080,2317,Waitangi,8502,155, +0,1862,238080,2317,Waitangi,8502,155, +0,1863,238080,2317,Waitangi,8502,155, +0,1864,238592,2317,Waitangi,8567,155, +0,1865,238592,2317,Waitangi,8567,155, +0,1866,238592,2317,Waitangi,8567,155, +0,1867,238592,2317,Waitangi,8567,155, +0,1868,239104,2317,Waitangi,8632,155, +0,1869,239104,2317,Waitangi,8632,155, +0,1870,239104,2317,Waitangi,8632,155, +0,1871,239104,2317,Waitangi,8632,155, +0,1872,239616,2317,Waitangi,8697,155, +0,1873,239616,2317,Waitangi,8697,155, +0,1874,239616,2317,Waitangi,8697,155, +0,1875,239616,2317,Waitangi,8697,155, +0,1876,240128,2317,Waitangi,8763,155, +0,1877,240128,2317,Waitangi,8763,155, +0,1878,240128,2317,Waitangi,8763,155, +0,1879,240128,2317,Waitangi,8763,155, +0,1880,240640,2317,Waitangi,8829,155, +0,1881,240640,2317,Waitangi,8829,155, +0,1882,240640,2317,Waitangi,8829,155, +0,1883,240640,2317,Waitangi,8829,155, +0,1884,241152,2317,Waitangi,8895,155, +0,1885,241152,2317,Waitangi,8895,155, +0,1886,241152,2317,Waitangi,8895,155, +0,1887,241152,2317,Waitangi,8895,155, +0,1888,241664,2317,Waitangi,8961,155, +0,1889,241664,2317,Waitangi,8961,155, +0,1890,241664,2317,Waitangi,8961,155, +0,1891,241664,2317,Waitangi,8961,155, +0,1892,242176,2317,Waitangi,9027,155, +0,1893,242176,2317,Waitangi,9027,155, +0,1894,242176,2317,Waitangi,9027,155, +0,1895,242176,2317,Waitangi,9027,155, +0,1896,242688,2317,Waitangi,9093,155, +0,1897,242688,2317,Waitangi,9093,155, +0,1898,242688,2317,Waitangi,9093,155, +0,1899,242688,2317,Waitangi,9093,155, +0,1900,243200,2317,Waitangi,9159,155, +0,1901,243200,2317,Waitangi,9159,155, +0,1902,243200,2317,Waitangi,9159,155, +0,1903,243200,2317,Waitangi,9159,155, +0,1904,243712,2317,Waitangi,9225,155, +0,1905,243712,2317,Waitangi,9225,155, +0,1906,243712,2317,Waitangi,9225,155, +0,1907,243712,2317,Waitangi,9225,155, +0,1908,244224,2317,Waitangi,9291,155, +0,1909,244224,2317,Waitangi,9291,155, +0,1910,244224,2317,Waitangi,9291,155, +0,1911,244224,2317,Waitangi,9291,155, +0,1912,244736,2317,Waitangi,9357,155, +0,1913,244736,2317,Waitangi,9357,155, +0,1914,244736,2317,Waitangi,9357,155, +0,1915,244736,2317,Waitangi,9357,155, +0,1916,245248,2317,Waitangi,9423,155, +0,1917,245248,2317,Waitangi,9423,155, +0,1918,245248,2317,Waitangi,9423,155, +0,1919,245248,2317,Waitangi,9423,155, +0,1920,245760,2317,Waitangi,9489,155, +0,1921,245760,2317,Waitangi,9489,155, +0,1922,245760,2317,Waitangi,9489,155, +0,1923,245760,2317,Waitangi,9489,155, +0,1924,246272,2317,Waitangi,9555,155, +0,1925,246272,2317,Waitangi,9555,155, +0,1926,246272,2317,Waitangi,9555,155, +0,1927,246272,2317,Waitangi,9555,155, +0,1928,246784,2317,Waitangi,9621,155, +0,1929,246784,2317,Waitangi,9621,155, +0,1930,246784,2317,Waitangi,9621,155, +0,1931,246784,2317,Waitangi,9621,155, +0,1932,247296,2317,Waitangi,9687,155, +0,1933,247296,2317,Waitangi,9687,155, +0,1934,247296,2317,Waitangi,9687,155, +0,1935,247296,2317,Waitangi,9687,155, +0,1936,247808,2317,Waitangi,9753,155, +0,1937,247808,2317,Waitangi,9753,155, +0,1938,247808,2317,Waitangi,9753,155, +0,1939,247808,2317,Waitangi,9753,155, +0,1940,248320,2317,Waitangi,9819,155, +0,1941,248320,2317,Waitangi,9819,155, +0,1942,248320,2317,Waitangi,9819,155, +0,1943,248320,2317,Waitangi,9819,155, +0,1944,248832,2317,Waitangi,9885,155, +0,1945,248832,2317,Waitangi,9885,155, +0,1946,248832,2317,Waitangi,9885,155, +0,1947,248832,2317,Waitangi,9885,155, +0,1948,249344,2317,Waitangi,9952,155, +0,1949,249344,2317,Waitangi,9952,155, +0,1950,249344,2317,Waitangi,9952,155, +0,1951,249344,2317,Waitangi,9952,155, +0,1952,249856,2317,Waitangi,10019,155, +0,1953,249856,2317,Waitangi,10019,155, +0,1954,249856,2317,Waitangi,10019,155, +0,1955,249856,2317,Waitangi,10019,155, +0,1956,250368,2317,Waitangi,10086,155, +0,1957,250368,2317,Waitangi,10086,155, +0,1958,250368,2317,Waitangi,10086,155, +0,1959,250368,2317,Waitangi,10086,155, +0,1960,250880,2317,Waitangi,10153,155, +0,1961,250880,2317,Waitangi,10153,155, +0,1962,250880,2317,Waitangi,10153,155, +0,1963,250880,2317,Waitangi,10153,155, +0,1964,251392,2317,Waitangi,10220,155, +0,1965,251392,2317,Waitangi,10220,155, +0,1966,251392,2317,Waitangi,10220,155, +0,1967,251392,2317,Waitangi,10220,155, +0,1968,251904,2317,Waitangi,10287,155, +0,1969,251904,2317,Waitangi,10287,155, +0,1970,251904,2317,Waitangi,10287,155, +0,1971,251904,2317,Waitangi,10287,155, +0,1972,252416,2317,Waitangi,10354,155, +0,1973,252416,2317,Waitangi,10354,155, +0,1974,252416,2317,Waitangi,10354,155, +0,1975,252416,2317,Waitangi,10354,155, +0,1976,252928,2317,Waitangi,10421,155, +0,1977,252928,2317,Waitangi,10421,155, +0,1978,252928,2317,Waitangi,10421,155, +0,1979,252928,2317,Waitangi,10421,155, +0,1980,253440,2317,Waitangi,10488,155, +0,1981,253440,2317,Waitangi,10488,155, +0,1982,253440,2317,Waitangi,10488,155, +0,1983,253440,2317,Waitangi,10488,155, +0,1984,253952,2317,Waitangi,10555,155, +0,1985,253952,2317,Waitangi,10555,155, +0,1986,253952,2317,Waitangi,10555,155, +0,1987,253952,2317,Waitangi,10555,155, +0,1988,254464,2317,Waitangi,10622,155, +0,1989,254464,2317,Waitangi,10622,155, +0,1990,254464,2317,Waitangi,10622,155, +0,1991,254464,2317,Waitangi,10622,155, +0,1992,254976,2317,Waitangi,10689,155, +0,1993,254976,2317,Waitangi,10689,155, +0,1994,254976,2317,Waitangi,10689,155, +0,1995,254976,2317,Waitangi,10689,155, +0,1996,255488,2317,Waitangi,10756,155, +0,1997,255488,2317,Waitangi,10756,155, +0,1998,255488,2317,Waitangi,10756,155, +0,1999,255488,2317,Waitangi,10756,155, +0,2000,256000,2317,Waitangi,10823,155, +0,2001,256000,2317,Waitangi,10823,155, +0,2002,256000,2317,Waitangi,10823,155, +0,2003,256000,2317,Waitangi,10823,155, +0,2004,256512,2317,Waitangi,10890,155, +0,2005,256512,2317,Waitangi,10890,155, +0,2006,256512,2317,Waitangi,10890,155, +0,2007,256512,2317,Waitangi,10890,155, +0,2008,257024,2317,Waitangi,10957,155, +0,2009,257024,2317,Waitangi,10957,155, +0,2010,257024,2317,Waitangi,10957,155, +0,2011,257024,2317,Waitangi,10957,155, +0,2012,257536,2317,Waitangi,11024,155, +0,2013,257536,2317,Waitangi,11024,155, +0,2014,257536,2317,Waitangi,11024,155, +0,2015,257536,2317,Waitangi,11024,155, +0,2016,258048,2317,Waitangi,11091,155, +0,2017,258048,2317,Waitangi,11091,155, +0,2018,258048,2317,Waitangi,11091,155, +0,2019,258048,2317,Waitangi,11091,155, +0,2020,258560,2317,Waitangi,11158,155, +0,2021,258560,2317,Waitangi,11158,155, +0,2022,258560,2317,Waitangi,11158,155, +0,2023,258560,2317,Waitangi,11158,155, +0,2024,259072,2317,Waitangi,11225,155, +0,2025,259072,2317,Waitangi,11225,155, +0,2026,259072,2317,Waitangi,11225,155, +0,2027,259072,2317,Waitangi,11225,155, +0,2028,259584,2317,Waitangi,11292,155, +0,2029,259584,2317,Waitangi,11292,155, +0,2030,259584,2317,Waitangi,11292,155, +0,2031,259584,2317,Waitangi,11292,155, +0,2032,260096,2317,Waitangi,11359,155, +0,2033,260096,2317,Waitangi,11359,155, +0,2034,260096,2317,Waitangi,11359,155, +0,2035,260096,2317,Waitangi,11359,155, +0,2036,260608,2317,Waitangi,11426,155, +0,2037,260608,2317,Waitangi,11426,155, +0,2038,260608,2317,Waitangi,11426,155, +0,2039,260608,2317,Waitangi,11426,155, +0,2040,261120,2317,Waitangi,11493,155, +0,2041,261120,2317,Waitangi,11493,155, +0,2042,261120,2317,Waitangi,11493,155, +0,2043,261120,2317,Waitangi,11493,155, +0,2044,261632,2317,Waitangi,11560,155, +0,2045,261632,2317,Waitangi,11560,155, +0,2046,261632,2317,Waitangi,11560,155, +0,2047,261632,2317,Waitangi,11560,155, +1,0,0,6919,Anchorage,1,235, +1,1,0,6919,Anchorage,1,235, +1,2,0,6919,Anchorage,1,235, +1,3,0,6919,Anchorage,1,235, +1,4,512,6919,Anchorage,56,235, +1,5,512,6919,Anchorage,56,235, +1,6,512,6919,Anchorage,56,235, +1,7,512,6919,Anchorage,56,235, +1,8,1024,6919,Anchorage,111,235, +1,9,1024,6919,Anchorage,111,235, +1,10,1024,6919,Anchorage,111,235, +1,11,1024,6919,Anchorage,111,235, +1,12,1536,6919,Anchorage,166,235, +1,13,1536,6919,Anchorage,166,235, +1,14,1536,6919,Anchorage,166,235, +1,15,1536,6919,Anchorage,166,235, +1,16,2048,6919,Anchorage,221,235, +1,17,2048,6919,Anchorage,221,235, +1,18,2048,6919,Anchorage,221,235, +1,19,2048,6919,Anchorage,221,235, +1,20,2560,6919,Anchorage,276,235, +1,21,2560,6919,Anchorage,276,235, +1,22,2560,6919,Anchorage,276,235, +1,23,2560,6919,Anchorage,276,235, +1,24,3072,6919,Anchorage,331,235, +1,25,3072,6919,Anchorage,331,235, +1,26,3072,6919,Anchorage,331,235, +1,27,3072,6919,Anchorage,331,235, +1,28,3584,6919,Anchorage,386,235, +1,29,3584,6919,Anchorage,386,235, +1,30,3584,6919,Anchorage,386,235, +1,31,3584,6919,Anchorage,386,235, +1,32,4096,6919,Anchorage,441,235, +1,33,4096,6919,Anchorage,441,235, +1,34,4096,6919,Anchorage,441,235, +1,35,4096,6919,Anchorage,441,235, +1,36,4608,6919,Anchorage,496,235, +1,37,4608,6919,Anchorage,496,235, +1,38,4608,6919,Anchorage,496,235, +1,39,4608,6919,Anchorage,496,235, +1,40,5120,6919,Anchorage,551,235, +1,41,5120,6919,Anchorage,551,235, +1,42,5120,6919,Anchorage,551,235, +1,43,5120,6919,Anchorage,551,235, +1,44,5632,6919,Anchorage,606,235, +1,45,5632,6919,Anchorage,606,235, +1,46,5632,6919,Anchorage,606,235, +1,47,5632,6919,Anchorage,606,235, +1,48,6144,6919,Anchorage,661,235, +1,49,6144,6919,Anchorage,661,235, +1,50,6144,6919,Anchorage,661,235, +1,51,6144,6919,Anchorage,661,235, +1,52,6656,6919,Anchorage,716,235, +1,53,6656,6919,Anchorage,716,235, +1,54,6656,6919,Anchorage,716,235, +1,55,6656,6919,Anchorage,716,235, +1,56,7168,6919,Anchorage,771,235, +1,57,7168,6919,Anchorage,771,235, +1,58,7168,6919,Anchorage,771,235, +1,59,7168,6919,Anchorage,771,235, +1,60,7680,6919,Anchorage,826,235, +1,61,7680,6919,Anchorage,826,235, +1,62,7680,6919,Anchorage,826,235, +1,63,7680,6919,Anchorage,826,235, +1,64,8192,6919,Anchorage,881,235, +1,65,8192,6919,Anchorage,881,235, +1,66,8192,6919,Anchorage,881,235, +1,67,8192,6919,Anchorage,881,235, +1,68,8704,6919,Anchorage,936,235, +1,69,8704,6919,Anchorage,936,235, +1,70,8704,6919,Anchorage,936,235, +1,71,8704,6919,Anchorage,936,235, +1,72,9216,6919,Anchorage,991,235, +1,73,9216,6919,Anchorage,991,235, +1,74,9216,6919,Anchorage,991,235, +1,75,9216,6919,Anchorage,991,235, +1,76,9728,6919,Anchorage,1046,235, +1,77,9728,6919,Anchorage,1046,235, +1,78,9728,6919,Anchorage,1046,235, +1,79,9728,6919,Anchorage,1046,235, +1,80,10240,6919,Anchorage,1101,235, +1,81,10240,6919,Anchorage,1101,235, +1,82,10240,6919,Anchorage,1101,235, +1,83,10240,6919,Anchorage,1101,235, +1,84,10752,6919,Anchorage,1156,235, +1,85,10752,6919,Anchorage,1156,235, +1,86,10752,6919,Anchorage,1156,235, +1,87,10752,6919,Anchorage,1156,235, +1,88,11264,6919,Anchorage,1211,235, +1,89,11264,6919,Anchorage,1211,235, +1,90,11264,6919,Anchorage,1211,235, +1,91,11264,6919,Anchorage,1211,235, +1,92,11776,6919,Anchorage,1266,235, +1,93,11776,6919,Anchorage,1266,235, +1,94,11776,6919,Anchorage,1266,235, +1,95,11776,6919,Anchorage,1266,235, +1,96,12288,6919,Anchorage,1321,235, +1,97,12288,6919,Anchorage,1321,235, +1,98,12288,6919,Anchorage,1321,235, +1,99,12288,6919,Anchorage,1321,235, +1,100,12800,6919,Anchorage,1376,235, +1,101,12800,6919,Anchorage,1376,235, +1,102,12800,6919,Anchorage,1376,235, +1,103,12800,6919,Anchorage,1376,235, +1,104,13312,6919,Anchorage,1431,235, +1,105,13312,6919,Anchorage,1431,235, +1,106,13312,6919,Anchorage,1431,235, +1,107,13312,6919,Anchorage,1431,235, +1,108,13824,6919,Anchorage,1486,235, +1,109,13824,6919,Anchorage,1486,235, +1,110,13824,6919,Anchorage,1486,235, +1,111,13824,6919,Anchorage,1486,235, +1,112,14336,6919,Anchorage,1541,235, +1,113,14336,6919,Anchorage,1541,235, +1,114,14336,6919,Anchorage,1541,235, +1,115,14336,6919,Anchorage,1541,235, +1,116,14848,6919,Anchorage,1596,235, +1,117,14848,6919,Anchorage,1596,235, +1,118,14848,6919,Anchorage,1596,235, +1,119,14848,6919,Anchorage,1596,235, +1,120,15360,6919,Anchorage,1651,235, +1,121,15360,6919,Anchorage,1651,235, +1,122,15360,6919,Anchorage,1651,235, +1,123,15360,6919,Anchorage,1651,235, +1,124,15872,6919,Anchorage,1706,235, +1,125,15872,6919,Anchorage,1706,235, +1,126,15872,6919,Anchorage,1706,235, +1,127,15872,6919,Anchorage,1706,235, +1,128,16384,6919,Anchorage,1761,235, +1,129,16384,6919,Anchorage,1761,235, +1,130,16384,6919,Anchorage,1761,235, +1,131,16384,6919,Anchorage,1761,235, +1,132,16896,6919,Anchorage,1816,235, +1,133,16896,6919,Anchorage,1816,235, +1,134,16896,6919,Anchorage,1816,235, +1,135,16896,6919,Anchorage,1816,235, +1,136,17408,6919,Anchorage,1871,235, +1,137,17408,6919,Anchorage,1871,235, +1,138,17408,6919,Anchorage,1871,235, +1,139,17408,6919,Anchorage,1871,235, +1,140,17920,6919,Anchorage,1926,235, +1,141,17920,6919,Anchorage,1926,235, +1,142,17920,6919,Anchorage,1926,235, +1,143,17920,6919,Anchorage,1926,235, +1,144,18432,6919,Anchorage,1981,235, +1,145,18432,6919,Anchorage,1981,235, +1,146,18432,6919,Anchorage,1981,235, +1,147,18432,6919,Anchorage,1981,235, +1,148,18944,6919,Anchorage,2036,235, +1,149,18944,6919,Anchorage,2036,235, +1,150,18944,6919,Anchorage,2036,235, +1,151,18944,6919,Anchorage,2036,235, +1,152,19456,6919,Anchorage,2091,235, +1,153,19456,6919,Anchorage,2091,235, +1,154,19456,6919,Anchorage,2091,235, +1,155,19456,6919,Anchorage,2091,235, +1,156,19968,6919,Anchorage,2146,235, +1,157,19968,6919,Anchorage,2146,235, +1,158,19968,6919,Anchorage,2146,235, +1,159,19968,6919,Anchorage,2146,235, +1,160,20480,6919,Anchorage,2201,235, +1,161,20480,6919,Anchorage,2201,235, +1,162,20480,6919,Anchorage,2201,235, +1,163,20480,6919,Anchorage,2201,235, +1,164,20992,6919,Anchorage,2256,235, +1,165,20992,6919,Anchorage,2256,235, +1,166,20992,6919,Anchorage,2256,235, +1,167,20992,6919,Anchorage,2256,235, +1,168,21504,6919,Anchorage,2311,235, +1,169,21504,6919,Anchorage,2311,235, +1,170,21504,6919,Anchorage,2311,235, +1,171,21504,6919,Anchorage,2311,235, +1,172,22016,6919,Anchorage,2366,235, +1,173,22016,6919,Anchorage,2366,235, +1,174,22016,6919,Anchorage,2366,235, +1,175,22016,6919,Anchorage,2366,235, +1,176,22528,6919,Anchorage,2421,235, +1,177,22528,6919,Anchorage,2421,235, +1,178,22528,6919,Anchorage,2421,235, +1,179,22528,6919,Anchorage,2421,235, +1,180,23040,6919,Anchorage,2476,235, +1,181,23040,6919,Anchorage,2476,235, +1,182,23040,6919,Anchorage,2476,235, +1,183,23040,6919,Anchorage,2476,235, +1,184,23552,6919,Anchorage,2531,235, +1,185,23552,6919,Anchorage,2531,235, +1,186,23552,6919,Anchorage,2531,235, +1,187,23552,6919,Anchorage,2531,235, +1,188,24064,6919,Anchorage,2586,235, +1,189,24064,6919,Anchorage,2586,235, +1,190,24064,6919,Anchorage,2586,235, +1,191,24064,6919,Anchorage,2586,235, +1,192,24576,6919,Anchorage,2641,235, +1,193,24576,6919,Anchorage,2641,235, +1,194,24576,6919,Anchorage,2641,235, +1,195,24576,6919,Anchorage,2641,235, +1,196,25088,6919,Anchorage,2696,235, +1,197,25088,6919,Anchorage,2696,235, +1,198,25088,6919,Anchorage,2696,235, +1,199,25088,6919,Anchorage,2696,235, +1,200,25600,6919,Anchorage,2751,235, +1,201,25600,6919,Anchorage,2751,235, +1,202,25600,6919,Anchorage,2751,235, +1,203,25600,6919,Anchorage,2751,235, +1,204,26112,6919,Anchorage,2806,235, +1,205,26112,6919,Anchorage,2806,235, +1,206,26112,6919,Anchorage,2806,235, +1,207,26112,6919,Anchorage,2806,235, +1,208,26624,6919,Anchorage,2861,235, +1,209,26624,6919,Anchorage,2861,235, +1,210,26624,6919,Anchorage,2861,235, +1,211,26624,6919,Anchorage,2861,235, +1,212,27136,6919,Anchorage,2916,235, +1,213,27136,6919,Anchorage,2916,235, +1,214,27136,6919,Anchorage,2916,235, +1,215,27136,6919,Anchorage,2916,235, +1,216,27648,6919,Anchorage,2971,235, +1,217,27648,6919,Anchorage,2971,235, +1,218,27648,6919,Anchorage,2971,235, +1,219,27648,6919,Anchorage,2971,235, +1,220,28160,6919,Anchorage,3026,235, +1,221,28160,6919,Anchorage,3026,235, +1,222,28160,6919,Anchorage,3026,235, +1,223,28160,6919,Anchorage,3026,235, +1,224,28672,6919,Anchorage,3081,235, +1,225,28672,6919,Anchorage,3081,235, +1,226,28672,6919,Anchorage,3081,235, +1,227,28672,6919,Anchorage,3081,235, +1,228,29184,6919,Anchorage,3136,235, +1,229,29184,6919,Anchorage,3136,235, +1,230,29184,6919,Anchorage,3136,235, +1,231,29184,6919,Anchorage,3136,235, +1,232,29696,6919,Anchorage,3191,235, +1,233,29696,6919,Anchorage,3191,235, +1,234,29696,6919,Anchorage,3191,235, +1,235,29696,6919,Anchorage,3191,235, +1,236,30208,6919,Anchorage,3246,235, +1,237,30208,6919,Anchorage,3246,235, +1,238,30208,6919,Anchorage,3246,235, +1,239,30208,6919,Anchorage,3246,235, +1,240,30720,6919,Anchorage,3301,235, +1,241,30720,6919,Anchorage,3301,235, +1,242,30720,6919,Anchorage,3301,235, +1,243,30720,6919,Anchorage,3301,235, +1,244,31232,6919,Anchorage,3356,235, +1,245,31232,6919,Anchorage,3356,235, +1,246,31232,6919,Anchorage,3356,235, +1,247,31232,6919,Anchorage,3356,235, +1,248,31744,6919,Anchorage,3411,235, +1,249,31744,6919,Anchorage,3411,235, +1,250,31744,6919,Anchorage,3411,235, +1,251,31744,6919,Anchorage,3411,235, +1,252,32256,6919,Anchorage,3466,235, +1,253,32256,6919,Anchorage,3466,235, +1,254,32256,6919,Anchorage,3466,235, +1,255,32256,6919,Anchorage,3466,235, +1,256,32768,6919,Anchorage,3521,235, +1,257,32768,6919,Anchorage,3521,235, +1,258,32768,6919,Anchorage,3521,235, +1,259,32768,6919,Anchorage,3521,235, +1,260,33280,6919,Anchorage,3576,235, +1,261,33280,6919,Anchorage,3576,235, +1,262,33280,6919,Anchorage,3576,235, +1,263,33280,6919,Anchorage,3576,235, +1,264,33792,6919,Anchorage,3631,235, +1,265,33792,6919,Anchorage,3631,235, +1,266,33792,6919,Anchorage,3631,235, +1,267,33792,6919,Anchorage,3631,235, +1,268,34304,6919,Anchorage,3686,235, +1,269,34304,6919,Anchorage,3686,235, +1,270,34304,6919,Anchorage,3686,235, +1,271,34304,6919,Anchorage,3686,235, +1,272,34816,6919,Anchorage,3741,235, +1,273,34816,6919,Anchorage,3741,235, +1,274,34816,6919,Anchorage,3741,235, +1,275,34816,6919,Anchorage,3741,235, +1,276,35328,6919,Anchorage,3796,235, +1,277,35328,6919,Anchorage,3796,235, +1,278,35328,6919,Anchorage,3796,235, +1,279,35328,6919,Anchorage,3796,235, +1,280,35840,6919,Anchorage,3851,235, +1,281,35840,6919,Anchorage,3851,235, +1,282,35840,6919,Anchorage,3851,235, +1,283,35840,6919,Anchorage,3851,235, +1,284,36352,6919,Anchorage,3906,235, +1,285,36352,6919,Anchorage,3906,235, +1,286,36352,6919,Anchorage,3906,235, +1,287,36352,6919,Anchorage,3906,235, +1,288,36864,6919,Anchorage,3961,235, +1,289,36864,6919,Anchorage,3961,235, +1,290,36864,6919,Anchorage,3961,235, +1,291,36864,6919,Anchorage,3961,235, +1,292,37376,6919,Anchorage,4016,235, +1,293,37376,6919,Anchorage,4016,235, +1,294,37376,6919,Anchorage,4016,235, +1,295,37376,6919,Anchorage,4016,235, +1,296,37888,6919,Anchorage,4071,235, +1,297,37888,6919,Anchorage,4071,235, +1,298,37888,6919,Anchorage,4071,235, +1,299,37888,6919,Anchorage,4071,235, +1,300,38400,6919,Anchorage,4126,235, +1,301,38400,6919,Anchorage,4126,235, +1,302,38400,6919,Anchorage,4126,235, +1,303,38400,6919,Anchorage,4126,235, +1,304,38912,6919,Anchorage,4181,235, +1,305,38912,6919,Anchorage,4181,235, +1,306,38912,6919,Anchorage,4181,235, +1,307,38912,6919,Anchorage,4181,235, +1,308,39424,6919,Anchorage,4236,235, +1,309,39424,6919,Anchorage,4236,235, +1,310,39424,6919,Anchorage,4236,235, +1,311,39424,6919,Anchorage,4236,235, +1,312,39936,6919,Anchorage,4291,235, +1,313,39936,6919,Anchorage,4291,235, +1,314,39936,6919,Anchorage,4291,235, +1,315,39936,6919,Anchorage,4291,235, +1,316,40448,6919,Anchorage,4346,235, +1,317,40448,6919,Anchorage,4346,235, +1,318,40448,6919,Anchorage,4346,235, +1,319,40448,6919,Anchorage,4346,235, +1,320,40960,6919,Anchorage,4401,235, +1,321,40960,6919,Anchorage,4401,235, +1,322,40960,6919,Anchorage,4401,235, +1,323,40960,6919,Anchorage,4401,235, +1,324,41472,6919,Anchorage,4456,235, +1,325,41472,6919,Anchorage,4456,235, +1,326,41472,6919,Anchorage,4456,235, +1,327,41472,6919,Anchorage,4456,235, +1,328,41984,6919,Anchorage,4510,235, +1,329,41984,6919,Anchorage,4510,235, +1,330,41984,6919,Anchorage,4510,235, +1,331,41984,6919,Anchorage,4510,235, +1,332,42496,6919,Anchorage,4564,235, +1,333,42496,6919,Anchorage,4564,235, +1,334,42496,6919,Anchorage,4564,235, +1,335,42496,6919,Anchorage,4564,235, +1,336,43008,6919,Anchorage,4618,235, +1,337,43008,6919,Anchorage,4618,235, +1,338,43008,6919,Anchorage,4618,235, +1,339,43008,6919,Anchorage,4618,235, +1,340,43520,6919,Anchorage,4672,235, +1,341,43520,6919,Anchorage,4672,235, +1,342,43520,6919,Anchorage,4672,235, +1,343,43520,6919,Anchorage,4672,235, +1,344,44032,6919,Anchorage,4726,235, +1,345,44032,6919,Anchorage,4726,235, +1,346,44032,6919,Anchorage,4726,235, +1,347,44032,6919,Anchorage,4726,235, +1,348,44544,6919,Anchorage,4780,235, +1,349,44544,6919,Anchorage,4780,235, +1,350,44544,6919,Anchorage,4780,235, +1,351,44544,6919,Anchorage,4780,235, +1,352,45056,6919,Anchorage,4834,235, +1,353,45056,6919,Anchorage,4834,235, +1,354,45056,6919,Anchorage,4834,235, +1,355,45056,6919,Anchorage,4834,235, +1,356,45568,6919,Anchorage,4888,235, +1,357,45568,6919,Anchorage,4888,235, +1,358,45568,6919,Anchorage,4888,235, +1,359,45568,6919,Anchorage,4888,235, +1,360,46080,6919,Anchorage,4942,235, +1,361,46080,6919,Anchorage,4942,235, +1,362,46080,6919,Anchorage,4942,235, +1,363,46080,6919,Anchorage,4942,235, +1,364,46592,6919,Anchorage,4996,235, +1,365,46592,6919,Anchorage,4996,235, +1,366,46592,6919,Anchorage,4996,235, +1,367,46592,6919,Anchorage,4996,235, +1,368,47104,6919,Anchorage,5050,235, +1,369,47104,6919,Anchorage,5050,235, +1,370,47104,6919,Anchorage,5050,235, +1,371,47104,6919,Anchorage,5050,235, +1,372,47616,6919,Anchorage,5104,235, +1,373,47616,6919,Anchorage,5104,235, +1,374,47616,6919,Anchorage,5104,235, +1,375,47616,6919,Anchorage,5104,235, +1,376,48128,6919,Anchorage,5158,235, +1,377,48128,6919,Anchorage,5158,235, +1,378,48128,6919,Anchorage,5158,235, +1,379,48128,6919,Anchorage,5158,235, +1,380,48640,6919,Anchorage,5212,235, +1,381,48640,6919,Anchorage,5212,235, +1,382,48640,6919,Anchorage,5212,235, +1,383,48640,6919,Anchorage,5212,235, +1,384,49152,6919,Anchorage,5266,235, +1,385,49152,6919,Anchorage,5266,235, +1,386,49152,6919,Anchorage,5266,235, +1,387,49152,6919,Anchorage,5266,235, +1,388,49664,6919,Anchorage,5320,235, +1,389,49664,6919,Anchorage,5320,235, +1,390,49664,6919,Anchorage,5320,235, +1,391,49664,6919,Anchorage,5320,235, +1,392,50176,6919,Anchorage,5374,235, +1,393,50176,6919,Anchorage,5374,235, +1,394,50176,6919,Anchorage,5374,235, +1,395,50176,6919,Anchorage,5374,235, +1,396,50688,6919,Anchorage,5428,235, +1,397,50688,6919,Anchorage,5428,235, +1,398,50688,6919,Anchorage,5428,235, +1,399,50688,6919,Anchorage,5428,235, +1,400,51200,6919,Anchorage,5482,235, +1,401,51200,6919,Anchorage,5482,235, +1,402,51200,6919,Anchorage,5482,235, +1,403,51200,6919,Anchorage,5482,235, +1,404,51712,6919,Anchorage,5536,235, +1,405,51712,6919,Anchorage,5536,235, +1,406,51712,6919,Anchorage,5536,235, +1,407,51712,6919,Anchorage,5536,235, +1,408,52224,6919,Anchorage,5590,235, +1,409,52224,6919,Anchorage,5590,235, +1,410,52224,6919,Anchorage,5590,235, +1,411,52224,6919,Anchorage,5590,235, +1,412,52736,6919,Anchorage,5644,235, +1,413,52736,6919,Anchorage,5644,235, +1,414,52736,6919,Anchorage,5644,235, +1,415,52736,6919,Anchorage,5644,235, +1,416,53248,6919,Anchorage,5698,235, +1,417,53248,6919,Anchorage,5698,235, +1,418,53248,6919,Anchorage,5698,235, +1,419,53248,6919,Anchorage,5698,235, +1,420,53760,6919,Anchorage,5752,235, +1,421,53760,6919,Anchorage,5752,235, +1,422,53760,6919,Anchorage,5752,235, +1,423,53760,6919,Anchorage,5752,235, +1,424,54272,6919,Anchorage,5806,235, +1,425,54272,6919,Anchorage,5806,235, +1,426,54272,6919,Anchorage,5806,235, +1,427,54272,6919,Anchorage,5806,235, +1,428,54784,6919,Anchorage,5860,235, +1,429,54784,6919,Anchorage,5860,235, +1,430,54784,6919,Anchorage,5860,235, +1,431,54784,6919,Anchorage,5860,235, +1,432,55296,6919,Anchorage,5914,235, +1,433,55296,6919,Anchorage,5914,235, +1,434,55296,6919,Anchorage,5914,235, +1,435,55296,6919,Anchorage,5914,235, +1,436,55808,6919,Anchorage,5968,235, +1,437,55808,6919,Anchorage,5968,235, +1,438,55808,6919,Anchorage,5968,235, +1,439,55808,6919,Anchorage,5968,235, +1,440,56320,6919,Anchorage,6022,235, +1,441,56320,6919,Anchorage,6022,235, +1,442,56320,6919,Anchorage,6022,235, +1,443,56320,6919,Anchorage,6022,235, +1,444,56832,6919,Anchorage,6076,235, +1,445,56832,6919,Anchorage,6076,235, +1,446,56832,6919,Anchorage,6076,235, +1,447,56832,6919,Anchorage,6076,235, +1,448,57344,6919,Anchorage,6130,235, +1,449,57344,6919,Anchorage,6130,235, +1,450,57344,6919,Anchorage,6130,235, +1,451,57344,6919,Anchorage,6130,235, +1,452,57856,6919,Anchorage,6184,235, +1,453,57856,6919,Anchorage,6184,235, +1,454,57856,6919,Anchorage,6184,235, +1,455,57856,6919,Anchorage,6184,235, +1,456,58368,6919,Anchorage,6238,235, +1,457,58368,6919,Anchorage,6238,235, +1,458,58368,6919,Anchorage,6238,235, +1,459,58368,6919,Anchorage,6238,235, +1,460,58880,6919,Anchorage,6292,235, +1,461,58880,6919,Anchorage,6292,235, +1,462,58880,6919,Anchorage,6292,235, +1,463,58880,6919,Anchorage,6292,235, +1,464,59392,6919,Anchorage,6346,235, +1,465,59392,6919,Anchorage,6346,235, +1,466,59392,6919,Anchorage,6346,235, +1,467,59392,6919,Anchorage,6346,235, +1,468,59904,6919,Anchorage,6400,235, +1,469,59904,6919,Anchorage,6400,235, +1,470,59904,6919,Anchorage,6400,235, +1,471,59904,6919,Anchorage,6400,235, +1,472,60416,6919,Anchorage,6454,235, +1,473,60416,6919,Anchorage,6454,235, +1,474,60416,6919,Anchorage,6454,235, +1,475,60416,6919,Anchorage,6454,235, +1,476,60928,6919,Anchorage,6508,235, +1,477,60928,6919,Anchorage,6508,235, +1,478,60928,6919,Anchorage,6508,235, +1,479,60928,6919,Anchorage,6508,235, +1,480,61440,6919,Anchorage,6562,235, +1,481,61440,6919,Anchorage,6562,235, +1,482,61440,6919,Anchorage,6562,235, +1,483,61440,6919,Anchorage,6562,235, +1,484,61952,6919,Anchorage,6616,235, +1,485,61952,6919,Anchorage,6616,235, +1,486,61952,6919,Anchorage,6616,235, +1,487,61952,6919,Anchorage,6616,235, +1,488,62464,6919,Anchorage,6670,235, +1,489,62464,6919,Anchorage,6670,235, +1,490,62464,6919,Anchorage,6670,235, +1,491,62464,6919,Anchorage,6670,235, +1,492,62976,6919,Anchorage,6724,235, +1,493,62976,6919,Anchorage,6724,235, +1,494,62976,6919,Anchorage,6724,235, +1,495,62976,6919,Anchorage,6724,235, +1,496,63488,6919,Anchorage,6778,235, +1,497,63488,6919,Anchorage,6778,235, +1,498,63488,6919,Anchorage,6778,235, +1,499,63488,6919,Anchorage,6778,235, +1,500,64000,6919,Anchorage,6832,235, +1,501,64000,6919,Anchorage,6832,235, +1,502,64000,6919,Anchorage,6832,235, +1,503,64000,6919,Anchorage,6832,235, +1,504,64512,6919,Anchorage,6886,235, +1,505,64512,6919,Anchorage,6886,235, +1,506,64512,6919,Anchorage,6886,235, +1,507,64512,6919,Anchorage,6886,235, +1,508,65024,6919,Anchorage,6940,235, +1,509,65024,6919,Anchorage,6940,235, +1,510,65024,6919,Anchorage,6940,235, +1,511,65024,6919,Anchorage,6940,235, +1,512,65536,6919,Anchorage,6994,235, +1,513,65536,6919,Anchorage,6994,235, +1,514,65536,6919,Anchorage,6994,235, +1,515,65536,6919,Anchorage,6994,235, +1,516,66048,6919,Anchorage,7048,235, +1,517,66048,6919,Anchorage,7048,235, +1,518,66048,6919,Anchorage,7048,235, +1,519,66048,6919,Anchorage,7048,235, +1,520,66560,6919,Anchorage,7102,235, +1,521,66560,6919,Anchorage,7102,235, +1,522,66560,6919,Anchorage,7102,235, +1,523,66560,6919,Anchorage,7102,235, +1,524,67072,6919,Anchorage,7156,235, +1,525,67072,6919,Anchorage,7156,235, +1,526,67072,6919,Anchorage,7156,235, +1,527,67072,6919,Anchorage,7156,235, +1,528,67584,6919,Anchorage,7210,235, +1,529,67584,6919,Anchorage,7210,235, +1,530,67584,6919,Anchorage,7210,235, +1,531,67584,6919,Anchorage,7210,235, +1,532,68096,6919,Anchorage,7264,235, +1,533,68096,6919,Anchorage,7264,235, +1,534,68096,6919,Anchorage,7264,235, +1,535,68096,6919,Anchorage,7264,235, +1,536,68608,6919,Anchorage,7318,235, +1,537,68608,6919,Anchorage,7318,235, +1,538,68608,6919,Anchorage,7318,235, +1,539,68608,6919,Anchorage,7318,235, +1,540,69120,6919,Anchorage,7372,235, +1,541,69120,6919,Anchorage,7372,235, +1,542,69120,6919,Anchorage,7372,235, +1,543,69120,6919,Anchorage,7372,235, +1,544,69632,6919,Anchorage,7426,235, +1,545,69632,6919,Anchorage,7426,235, +1,546,69632,6919,Anchorage,7426,235, +1,547,69632,6919,Anchorage,7426,235, +1,548,70144,6919,Anchorage,7480,235, +1,549,70144,6919,Anchorage,7480,235, +1,550,70144,6919,Anchorage,7480,235, +1,551,70144,6919,Anchorage,7480,235, +1,552,70656,6919,Anchorage,7534,235, +1,553,70656,6919,Anchorage,7534,235, +1,554,70656,6919,Anchorage,7534,235, +1,555,70656,6919,Anchorage,7534,235, +1,556,71168,6919,Anchorage,7588,235, +1,557,71168,6919,Anchorage,7588,235, +1,558,71168,6919,Anchorage,7588,235, +1,559,71168,6919,Anchorage,7588,235, +1,560,71680,6919,Anchorage,7642,235, +1,561,71680,6919,Anchorage,7642,235, +1,562,71680,6919,Anchorage,7642,235, +1,563,71680,6919,Anchorage,7642,235, +1,564,72192,6919,Anchorage,7696,235, +1,565,72192,6919,Anchorage,7696,235, +1,566,72192,6919,Anchorage,7696,235, +1,567,72192,6919,Anchorage,7696,235, +1,568,72704,6919,Anchorage,7750,235, +1,569,72704,6919,Anchorage,7750,235, +1,570,72704,6919,Anchorage,7750,235, +1,571,72704,6919,Anchorage,7750,235, +1,572,73216,6919,Anchorage,7804,235, +1,573,73216,6919,Anchorage,7804,235, +1,574,73216,6919,Anchorage,7804,235, +1,575,73216,6919,Anchorage,7804,235, +1,576,73728,6919,Anchorage,7858,235, +1,577,73728,6919,Anchorage,7858,235, +1,578,73728,6919,Anchorage,7858,235, +1,579,73728,6919,Anchorage,7858,235, +1,580,74240,6919,Anchorage,7912,235, +1,581,74240,6919,Anchorage,7912,235, +1,582,74240,6919,Anchorage,7912,235, +1,583,74240,6919,Anchorage,7912,235, +1,584,74752,6919,Anchorage,7966,235, +1,585,74752,6919,Anchorage,7966,235, +1,586,74752,6919,Anchorage,7966,235, +1,587,74752,6919,Anchorage,7966,235, +1,588,75264,6919,Anchorage,8020,235, +1,589,75264,6919,Anchorage,8020,235, +1,590,75264,6919,Anchorage,8020,235, +1,591,75264,6919,Anchorage,8020,235, +1,592,75776,6919,Anchorage,8074,235, +1,593,75776,6919,Anchorage,8074,235, +1,594,75776,6919,Anchorage,8074,235, +1,595,75776,6919,Anchorage,8074,235, +1,596,76288,6919,Anchorage,8128,235, +1,597,76288,6919,Anchorage,8128,235, +1,598,76288,6919,Anchorage,8128,235, +1,599,76288,6919,Anchorage,8128,235, +1,600,76800,6919,Anchorage,8182,235, +1,601,76800,6919,Anchorage,8182,235, +1,602,76800,6919,Anchorage,8182,235, +1,603,76800,6919,Anchorage,8182,235, +1,604,77312,6919,Anchorage,8236,235, +1,605,77312,6919,Anchorage,8236,235, +1,606,77312,6919,Anchorage,8236,235, +1,607,77312,6919,Anchorage,8236,235, +1,608,77824,6919,Anchorage,8290,235, +1,609,77824,6919,Anchorage,8290,235, +1,610,77824,6919,Anchorage,8290,235, +1,611,77824,6919,Anchorage,8290,235, +1,612,78336,6919,Anchorage,8344,235, +1,613,78336,6919,Anchorage,8344,235, +1,614,78336,6919,Anchorage,8344,235, +1,615,78336,6919,Anchorage,8344,235, +1,616,78848,6919,Anchorage,8398,235, +1,617,78848,6919,Anchorage,8398,235, +1,618,78848,6919,Anchorage,8398,235, +1,619,78848,6919,Anchorage,8398,235, +1,620,79360,6919,Anchorage,8452,235, +1,621,79360,6919,Anchorage,8452,235, +1,622,79360,6919,Anchorage,8452,235, +1,623,79360,6919,Anchorage,8452,235, +1,624,79872,6919,Anchorage,8506,235, +1,625,79872,6919,Anchorage,8506,235, +1,626,79872,6919,Anchorage,8506,235, +1,627,79872,6919,Anchorage,8506,235, +1,628,80384,6919,Anchorage,8560,235, +1,629,80384,6919,Anchorage,8560,235, +1,630,80384,6919,Anchorage,8560,235, +1,631,80384,6919,Anchorage,8560,235, +1,632,80896,6919,Anchorage,8613,235, +1,633,80896,6919,Anchorage,8613,235, +1,634,80896,6919,Anchorage,8613,235, +1,635,80896,6919,Anchorage,8613,235, +1,636,81408,6919,Anchorage,8666,235, +1,637,81408,6919,Anchorage,8666,235, +1,638,81408,6919,Anchorage,8666,235, +1,639,81408,6919,Anchorage,8666,235, +1,640,81920,6919,Anchorage,8719,235, +1,641,81920,6919,Anchorage,8719,235, +1,642,81920,6919,Anchorage,8719,235, +1,643,81920,6919,Anchorage,8719,235, +1,644,82432,6919,Anchorage,8772,235, +1,645,82432,6919,Anchorage,8772,235, +1,646,82432,6919,Anchorage,8772,235, +1,647,82432,6919,Anchorage,8772,235, +1,648,82944,6919,Anchorage,8825,235, +1,649,82944,6919,Anchorage,8825,235, +1,650,82944,6919,Anchorage,8825,235, +1,651,82944,6919,Anchorage,8825,235, +1,652,83456,6919,Anchorage,8878,235, +1,653,83456,6919,Anchorage,8878,235, +1,654,83456,6919,Anchorage,8878,235, +1,655,83456,6919,Anchorage,8878,235, +1,656,83968,6919,Anchorage,8931,235, +1,657,83968,6919,Anchorage,8931,235, +1,658,83968,6919,Anchorage,8931,235, +1,659,83968,6919,Anchorage,8931,235, +1,660,84480,6919,Anchorage,8984,235, +1,661,84480,6919,Anchorage,8984,235, +1,662,84480,6919,Anchorage,8984,235, +1,663,84480,6919,Anchorage,8984,235, +1,664,84992,6919,Anchorage,9037,235, +1,665,84992,6919,Anchorage,9037,235, +1,666,84992,6919,Anchorage,9037,235, +1,667,84992,6919,Anchorage,9037,235, +1,668,85504,6919,Anchorage,9089,235, +1,669,85504,6919,Anchorage,9089,235, +1,670,85504,6919,Anchorage,9089,235, +1,671,85504,6919,Anchorage,9089,235, +1,672,86016,6919,Anchorage,9141,235, +1,673,86016,6919,Anchorage,9141,235, +1,674,86016,6919,Anchorage,9141,235, +1,675,86016,6919,Anchorage,9141,235, +1,676,86528,6919,Anchorage,9193,235, +1,677,86528,6919,Anchorage,9193,235, +1,678,86528,6919,Anchorage,9193,235, +1,679,86528,6919,Anchorage,9193,235, +1,680,87040,6919,Anchorage,9245,235, +1,681,87040,6919,Anchorage,9245,235, +1,682,87040,6919,Anchorage,9245,235, +1,683,87040,6919,Anchorage,9245,235, +1,684,87552,6919,Anchorage,9297,235, +1,685,87552,6919,Anchorage,9297,235, +1,686,87552,6919,Anchorage,9297,235, +1,687,87552,6919,Anchorage,9297,235, +1,688,88064,6919,Anchorage,9349,235, +1,689,88064,6919,Anchorage,9349,235, +1,690,88064,6919,Anchorage,9349,235, +1,691,88064,6919,Anchorage,9349,235, +1,692,88576,6919,Anchorage,9401,235, +1,693,88576,6919,Anchorage,9401,235, +1,694,88576,6919,Anchorage,9401,235, +1,695,88576,6919,Anchorage,9401,235, +1,696,89088,6919,Anchorage,9453,235, +1,697,89088,6919,Anchorage,9453,235, +1,698,89088,6919,Anchorage,9453,235, +1,699,89088,6919,Anchorage,9453,235, +1,700,89600,6919,Anchorage,9505,235, +1,701,89600,6919,Anchorage,9505,235, +1,702,89600,6919,Anchorage,9505,235, +1,703,89600,6919,Anchorage,9505,235, +1,704,90112,6919,Anchorage,9556,235, +1,705,90112,6919,Anchorage,9556,235, +1,706,90112,6919,Anchorage,9556,235, +1,707,90112,6919,Anchorage,9556,235, +1,708,90624,6919,Anchorage,9607,235, +1,709,90624,6919,Anchorage,9607,235, +1,710,90624,6919,Anchorage,9607,235, +1,711,90624,6919,Anchorage,9607,235, +1,712,91136,6919,Anchorage,9658,235, +1,713,91136,6919,Anchorage,9658,235, +1,714,91136,6919,Anchorage,9658,235, +1,715,91136,6919,Anchorage,9658,235, +1,716,91648,6919,Anchorage,9709,235, +1,717,91648,6919,Anchorage,9709,235, +1,718,91648,6919,Anchorage,9709,235, +1,719,91648,6919,Anchorage,9709,235, +1,720,92160,6919,Anchorage,9760,235, +1,721,92160,6919,Anchorage,9760,235, +1,722,92160,6919,Anchorage,9760,235, +1,723,92160,6919,Anchorage,9760,235, +1,724,92672,3471,Honolulu,1,235, +1,725,92672,3471,Honolulu,1,235, +1,726,92672,3471,Honolulu,1,235, +1,727,92672,3471,Honolulu,1,235, +1,728,93184,3471,Honolulu,4,235, +1,729,93184,3471,Honolulu,4,235, +1,730,93184,3471,Honolulu,4,235, +1,731,93184,3471,Honolulu,4,235, +1,732,93696,3471,Honolulu,11,235, +1,733,93696,3471,Honolulu,11,235, +1,734,93696,3471,Honolulu,11,235, +1,735,93696,3471,Honolulu,11,235, +1,736,94208,3471,Honolulu,21,235, +1,737,94208,3471,Honolulu,21,235, +1,738,94208,3471,Honolulu,21,235, +1,739,94208,3471,Honolulu,21,235, +1,740,94720,3471,Honolulu,35,235, +1,741,94720,3471,Honolulu,35,235, +1,742,94720,3471,Honolulu,35,235, +1,743,94720,3471,Honolulu,35,235, +1,744,95232,3471,Honolulu,53,235, +1,745,95232,3471,Honolulu,53,235, +1,746,95232,3471,Honolulu,53,235, +1,747,95232,3471,Honolulu,53,235, +1,748,95744,3471,Honolulu,74,235, +1,749,95744,3471,Honolulu,74,235, +1,750,95744,3471,Honolulu,74,235, +1,751,95744,3471,Honolulu,74,235, +1,752,96256,3471,Honolulu,99,235, +1,753,96256,3471,Honolulu,99,235, +1,754,96256,3471,Honolulu,99,235, +1,755,96256,3471,Honolulu,99,235, +1,756,96768,3471,Honolulu,128,235, +1,757,96768,3471,Honolulu,128,235, +1,758,96768,3471,Honolulu,128,235, +1,759,96768,3471,Honolulu,128,235, +1,760,97280,3471,Honolulu,160,235, +1,761,97280,3471,Honolulu,160,235, +1,762,97280,3471,Honolulu,160,235, +1,763,97280,3471,Honolulu,160,235, +1,764,97792,3471,Honolulu,196,235, +1,765,97792,3471,Honolulu,196,235, +1,766,97792,3471,Honolulu,196,235, +1,767,97792,3471,Honolulu,196,235, +1,768,98304,3471,Honolulu,236,235, +1,769,98304,3471,Honolulu,236,235, +1,770,98304,3471,Honolulu,236,235, +1,771,98304,3471,Honolulu,236,235, +1,772,98816,3471,Honolulu,280,235, +1,773,98816,3471,Honolulu,280,235, +1,774,98816,3471,Honolulu,280,235, +1,775,98816,3471,Honolulu,280,235, +1,776,99328,3471,Honolulu,327,235, +1,777,99328,3471,Honolulu,327,235, +1,778,99328,3471,Honolulu,327,235, +1,779,99328,3471,Honolulu,327,235, +1,780,99840,3471,Honolulu,377,235, +1,781,99840,3471,Honolulu,377,235, +1,782,99840,3471,Honolulu,377,235, +1,783,99840,3471,Honolulu,377,235, +1,784,100352,3471,Honolulu,428,235, +1,785,100352,3471,Honolulu,428,235, +1,786,100352,3471,Honolulu,428,235, +1,787,100352,3471,Honolulu,428,235, +1,788,100864,3471,Honolulu,479,235, +1,789,100864,3471,Honolulu,479,235, +1,790,100864,3471,Honolulu,479,235, +1,791,100864,3471,Honolulu,479,235, +1,792,101376,3471,Honolulu,530,235, +1,793,101376,3471,Honolulu,530,235, +1,794,101376,3471,Honolulu,530,235, +1,795,101376,3471,Honolulu,530,235, +1,796,101888,3471,Honolulu,582,235, +1,797,101888,3471,Honolulu,582,235, +1,798,101888,3471,Honolulu,582,235, +1,799,101888,3471,Honolulu,582,235, +1,800,102400,3471,Honolulu,634,235, +1,801,102400,3471,Honolulu,634,235, +1,802,102400,3471,Honolulu,634,235, +1,803,102400,3471,Honolulu,634,235, +1,804,102912,3471,Honolulu,687,235, +1,805,102912,3471,Honolulu,687,235, +1,806,102912,3471,Honolulu,687,235, +1,807,102912,3471,Honolulu,687,235, +1,808,103424,3471,Honolulu,740,235, +1,809,103424,3471,Honolulu,740,235, +1,810,103424,3471,Honolulu,740,235, +1,811,103424,3471,Honolulu,740,235, +1,812,103936,3471,Honolulu,793,235, +1,813,103936,3471,Honolulu,793,235, +1,814,103936,3471,Honolulu,793,235, +1,815,103936,3471,Honolulu,793,235, +1,816,104448,3471,Honolulu,847,235, +1,817,104448,3471,Honolulu,847,235, +1,818,104448,3471,Honolulu,847,235, +1,819,104448,3471,Honolulu,847,235, +1,820,104960,3471,Honolulu,901,235, +1,821,104960,3471,Honolulu,901,235, +1,822,104960,3471,Honolulu,901,235, +1,823,104960,3471,Honolulu,901,235, +1,824,105472,3471,Honolulu,956,235, +1,825,105472,3471,Honolulu,956,235, +1,826,105472,3471,Honolulu,956,235, +1,827,105472,3471,Honolulu,956,235, +1,828,105984,3471,Honolulu,1011,235, +1,829,105984,3471,Honolulu,1011,235, +1,830,105984,3471,Honolulu,1011,235, +1,831,105984,3471,Honolulu,1011,235, +1,832,106496,3471,Honolulu,1066,235, +1,833,106496,3471,Honolulu,1066,235, +1,834,106496,3471,Honolulu,1066,235, +1,835,106496,3471,Honolulu,1066,235, +1,836,107008,3471,Honolulu,1122,235, +1,837,107008,3471,Honolulu,1122,235, +1,838,107008,3471,Honolulu,1122,235, +1,839,107008,3471,Honolulu,1122,235, +1,840,107520,3471,Honolulu,1178,235, +1,841,107520,3471,Honolulu,1178,235, +1,842,107520,3471,Honolulu,1178,235, +1,843,107520,3471,Honolulu,1178,235, +1,844,108032,3471,Honolulu,1235,235, +1,845,108032,3471,Honolulu,1235,235, +1,846,108032,3471,Honolulu,1235,235, +1,847,108032,3471,Honolulu,1235,235, +1,848,108544,3471,Honolulu,1292,235, +1,849,108544,3471,Honolulu,1292,235, +1,850,108544,3471,Honolulu,1292,235, +1,851,108544,3471,Honolulu,1292,235, +1,852,109056,3471,Honolulu,1349,235, +1,853,109056,3471,Honolulu,1349,235, +1,854,109056,3471,Honolulu,1349,235, +1,855,109056,3471,Honolulu,1349,235, +1,856,109568,3471,Honolulu,1407,235, +1,857,109568,3471,Honolulu,1407,235, +1,858,109568,3471,Honolulu,1407,235, +1,859,109568,3471,Honolulu,1407,235, +1,860,110080,3471,Honolulu,1465,235, +1,861,110080,3471,Honolulu,1465,235, +1,862,110080,3471,Honolulu,1465,235, +1,863,110080,3471,Honolulu,1465,235, +1,864,110592,3471,Honolulu,1524,235, +1,865,110592,3471,Honolulu,1524,235, +1,866,110592,3471,Honolulu,1524,235, +1,867,110592,3471,Honolulu,1524,235, +1,868,111104,3471,Honolulu,1583,235, +1,869,111104,3471,Honolulu,1583,235, +1,870,111104,3471,Honolulu,1583,235, +1,871,111104,3471,Honolulu,1583,235, +1,872,111616,3471,Honolulu,1643,235, +1,873,111616,3471,Honolulu,1643,235, +1,874,111616,3471,Honolulu,1643,235, +1,875,111616,3471,Honolulu,1643,235, +1,876,112128,3471,Honolulu,1703,235, +1,877,112128,3471,Honolulu,1703,235, +1,878,112128,3471,Honolulu,1703,235, +1,879,112128,3471,Honolulu,1703,235, +1,880,112640,3471,Honolulu,1763,235, +1,881,112640,3471,Honolulu,1763,235, +1,882,112640,3471,Honolulu,1763,235, +1,883,112640,3471,Honolulu,1763,235, +1,884,113152,3471,Honolulu,1824,235, +1,885,113152,3471,Honolulu,1824,235, +1,886,113152,3471,Honolulu,1824,235, +1,887,113152,3471,Honolulu,1824,235, +1,888,113664,3471,Honolulu,1885,235, +1,889,113664,3471,Honolulu,1885,235, +1,890,113664,3471,Honolulu,1885,235, +1,891,113664,3471,Honolulu,1885,235, +1,892,114176,3471,Honolulu,1946,235, +1,893,114176,3471,Honolulu,1946,235, +1,894,114176,3471,Honolulu,1946,235, +1,895,114176,3471,Honolulu,1946,235, +1,896,114688,3471,Honolulu,2008,235, +1,897,114688,3471,Honolulu,2008,235, +1,898,114688,3471,Honolulu,2008,235, +1,899,114688,3471,Honolulu,2008,235, +1,900,115200,3471,Honolulu,2070,235, +1,901,115200,3471,Honolulu,2070,235, +1,902,115200,3471,Honolulu,2070,235, +1,903,115200,3471,Honolulu,2070,235, +1,904,115712,3471,Honolulu,2132,235, +1,905,115712,3471,Honolulu,2132,235, +1,906,115712,3471,Honolulu,2132,235, +1,907,115712,3471,Honolulu,2132,235, +1,908,116224,3471,Honolulu,2195,235, +1,909,116224,3471,Honolulu,2195,235, +1,910,116224,3471,Honolulu,2195,235, +1,911,116224,3471,Honolulu,2195,235, +1,912,116736,3471,Honolulu,2258,235, +1,913,116736,3471,Honolulu,2258,235, +1,914,116736,3471,Honolulu,2258,235, +1,915,116736,3471,Honolulu,2258,235, +1,916,117248,3471,Honolulu,2321,235, +1,917,117248,3471,Honolulu,2321,235, +1,918,117248,3471,Honolulu,2321,235, +1,919,117248,3471,Honolulu,2321,235, +1,920,117760,3471,Honolulu,2385,235, +1,921,117760,3471,Honolulu,2385,235, +1,922,117760,3471,Honolulu,2385,235, +1,923,117760,3471,Honolulu,2385,235, +1,924,118272,3471,Honolulu,2449,235, +1,925,118272,3471,Honolulu,2449,235, +1,926,118272,3471,Honolulu,2449,235, +1,927,118272,3471,Honolulu,2449,235, +1,928,118784,3471,Honolulu,2513,235, +1,929,118784,3471,Honolulu,2513,235, +1,930,118784,3471,Honolulu,2513,235, +1,931,118784,3471,Honolulu,2513,235, +1,932,119296,3471,Honolulu,2578,235, +1,933,119296,3471,Honolulu,2578,235, +1,934,119296,3471,Honolulu,2578,235, +1,935,119296,3471,Honolulu,2578,235, +1,936,119808,3471,Honolulu,2643,235, +1,937,119808,3471,Honolulu,2643,235, +1,938,119808,3471,Honolulu,2643,235, +1,939,119808,3471,Honolulu,2643,235, +1,940,120320,3471,Honolulu,2708,235, +1,941,120320,3471,Honolulu,2708,235, +1,942,120320,3471,Honolulu,2708,235, +1,943,120320,3471,Honolulu,2708,235, +1,944,120832,3471,Honolulu,2773,235, +1,945,120832,3471,Honolulu,2773,235, +1,946,120832,3471,Honolulu,2773,235, +1,947,120832,3471,Honolulu,2773,235, +1,948,121344,3208,Atafu Village,1,223, +1,949,121344,3208,Atafu Village,1,223, +1,950,121344,3208,Atafu Village,1,223, +1,951,121344,3208,Atafu Village,1,223, +1,952,121856,3208,Atafu Village,2,223, +1,953,121856,3208,Atafu Village,2,223, +1,954,121856,3208,Atafu Village,2,223, +1,955,121856,3208,Atafu Village,2,223, +1,956,122368,3208,Atafu Village,5,223, +1,957,122368,3208,Atafu Village,5,223, +1,958,122368,3208,Atafu Village,5,223, +1,959,122368,3208,Atafu Village,5,223, +1,960,122880,3208,Atafu Village,10,223, +1,961,122880,3208,Atafu Village,10,223, +1,962,122880,3208,Atafu Village,10,223, +1,963,122880,3208,Atafu Village,10,223, +1,964,123392,3208,Atafu Village,17,223, +1,965,123392,3208,Atafu Village,17,223, +1,966,123392,3208,Atafu Village,17,223, +1,967,123392,3208,Atafu Village,17,223, +1,968,123904,3208,Atafu Village,26,223, +1,969,123904,3208,Atafu Village,26,223, +1,970,123904,3208,Atafu Village,26,223, +1,971,123904,3208,Atafu Village,26,223, +1,972,124416,3208,Atafu Village,37,223, +1,973,124416,3208,Atafu Village,37,223, +1,974,124416,3208,Atafu Village,37,223, +1,975,124416,3208,Atafu Village,37,223, +1,976,124928,3208,Atafu Village,50,223, +1,977,124928,3208,Atafu Village,50,223, +1,978,124928,3208,Atafu Village,50,223, +1,979,124928,3208,Atafu Village,50,223, +1,980,125440,3208,Atafu Village,65,223, +1,981,125440,3208,Atafu Village,65,223, +1,982,125440,3208,Atafu Village,65,223, +1,983,125440,3208,Atafu Village,65,223, +1,984,125952,3208,Atafu Village,82,223, +1,985,125952,3208,Atafu Village,82,223, +1,986,125952,3208,Atafu Village,82,223, +1,987,125952,3208,Atafu Village,82,223, +1,988,126464,3208,Atafu Village,101,223, +1,989,126464,3208,Atafu Village,101,223, +1,990,126464,3208,Atafu Village,101,223, +1,991,126464,3208,Atafu Village,101,223, +1,992,126976,3208,Atafu Village,122,223, +1,993,126976,3208,Atafu Village,122,223, +1,994,126976,3208,Atafu Village,122,223, +1,995,126976,3208,Atafu Village,122,223, +1,996,127488,3208,Atafu Village,145,223, +1,997,127488,3208,Atafu Village,145,223, +1,998,127488,3208,Atafu Village,145,223, +1,999,127488,3208,Atafu Village,145,223, +1,1000,128000,3208,Atafu Village,170,223, +1,1001,128000,3208,Atafu Village,170,223, +1,1002,128000,3208,Atafu Village,170,223, +1,1003,128000,3208,Atafu Village,170,223, +1,1004,128512,3208,Atafu Village,194,223, +1,1005,128512,3208,Atafu Village,194,223, +1,1006,128512,3208,Atafu Village,194,223, +1,1007,128512,3208,Atafu Village,194,223, +1,1008,129024,3208,Atafu Village,218,223, +1,1009,129024,3208,Atafu Village,218,223, +1,1010,129024,3208,Atafu Village,218,223, +1,1011,129024,3208,Atafu Village,218,223, +1,1012,129536,3208,Atafu Village,241,223, +1,1013,129536,3208,Atafu Village,241,223, +1,1014,129536,3208,Atafu Village,241,223, +1,1015,129536,3208,Atafu Village,241,223, +1,1016,130048,3208,Atafu Village,263,223, +1,1017,130048,3208,Atafu Village,263,223, +1,1018,130048,3208,Atafu Village,263,223, +1,1019,130048,3208,Atafu Village,263,223, +1,1020,130560,3208,Atafu Village,285,223, +1,1021,130560,3208,Atafu Village,285,223, +1,1022,130560,3208,Atafu Village,285,223, +1,1023,130560,3208,Atafu Village,285,223, +1,1024,131072,3208,Atafu Village,306,223, +1,1025,131072,3208,Atafu Village,306,223, +1,1026,131072,3208,Atafu Village,306,223, +1,1027,131072,3208,Atafu Village,306,223, +1,1028,131584,3208,Atafu Village,326,223, +1,1029,131584,3208,Atafu Village,326,223, +1,1030,131584,3208,Atafu Village,326,223, +1,1031,131584,3208,Atafu Village,326,223, +1,1032,132096,3208,Atafu Village,346,223, +1,1033,132096,3208,Atafu Village,346,223, +1,1034,132096,3208,Atafu Village,346,223, +1,1035,132096,3208,Atafu Village,346,223, +1,1036,132608,3208,Atafu Village,365,223, +1,1037,132608,3208,Atafu Village,365,223, +1,1038,132608,3208,Atafu Village,365,223, +1,1039,132608,3208,Atafu Village,365,223, +1,1040,133120,3208,Atafu Village,383,223, +1,1041,133120,3208,Atafu Village,383,223, +1,1042,133120,3208,Atafu Village,383,223, +1,1043,133120,3208,Atafu Village,383,223, +1,1044,133632,3208,Atafu Village,401,223, +1,1045,133632,3208,Atafu Village,401,223, +1,1046,133632,3208,Atafu Village,401,223, +1,1047,133632,3208,Atafu Village,401,223, +1,1048,134144,3208,Atafu Village,418,223, +1,1049,134144,3208,Atafu Village,418,223, +1,1050,134144,3208,Atafu Village,418,223, +1,1051,134144,3208,Atafu Village,418,223, +1,1052,134656,3208,Atafu Village,434,223, +1,1053,134656,3208,Atafu Village,434,223, +1,1054,134656,3208,Atafu Village,434,223, +1,1055,134656,3208,Atafu Village,434,223, +1,1056,135168,3208,Atafu Village,450,223, +1,1057,135168,3208,Atafu Village,450,223, +1,1058,135168,3208,Atafu Village,450,223, +1,1059,135168,3208,Atafu Village,450,223, +1,1060,135680,3610,Mata-Utu,1,245, +1,1061,135680,3610,Mata-Utu,1,245, +1,1062,135680,3610,Mata-Utu,1,245, +1,1063,135680,3610,Mata-Utu,1,245, +1,1064,136192,3610,Mata-Utu,2,245, +1,1065,136192,3610,Mata-Utu,2,245, +1,1066,136192,3610,Mata-Utu,2,245, +1,1067,136192,3610,Mata-Utu,2,245, +1,1068,136704,3610,Mata-Utu,5,245, +1,1069,136704,3610,Mata-Utu,5,245, +1,1070,136704,3610,Mata-Utu,5,245, +1,1071,136704,3610,Mata-Utu,5,245, +1,1072,137216,3610,Mata-Utu,9,245, +1,1073,137216,3610,Mata-Utu,9,245, +1,1074,137216,3610,Mata-Utu,9,245, +1,1075,137216,3610,Mata-Utu,9,245, +1,1076,137728,3610,Mata-Utu,14,245, +1,1077,137728,3610,Mata-Utu,14,245, +1,1078,137728,3610,Mata-Utu,14,245, +1,1079,137728,3610,Mata-Utu,14,245, +1,1080,138240,3609,Leava,1,245, +1,1081,138240,3609,Leava,1,245, +1,1082,138240,3609,Leava,1,245, +1,1083,138240,3609,Leava,1,245, +1,1084,138752,3609,Leava,2,245, +1,1085,138752,3609,Leava,2,245, +1,1086,138752,3609,Leava,2,245, +1,1087,138752,3609,Leava,2,245, +1,1088,139264,3609,Leava,3,245, +1,1089,139264,3609,Leava,3,245, +1,1090,139264,3609,Leava,3,245, +1,1091,139264,3609,Leava,3,245, +1,1092,139776,3609,Leava,5,245, +1,1093,139776,3609,Leava,5,245, +1,1094,139776,3609,Leava,5,245, +1,1095,139776,3609,Leava,5,245, +1,1096,140288,3609,Leava,7,245, +1,1097,140288,3609,Leava,7,245, +1,1098,140288,3609,Leava,7,245, +1,1099,140288,3609,Leava,7,245, +1,1100,140800,3609,Leava,10,245, +1,1101,140800,3609,Leava,10,245, +1,1102,140800,3609,Leava,10,245, +1,1103,140800,3609,Leava,10,245, +1,1104,141312,3609,Leava,13,245, +1,1105,141312,3609,Leava,13,245, +1,1106,141312,3609,Leava,13,245, +1,1107,141312,3609,Leava,13,245, +1,1108,141824,3609,Leava,16,245, +1,1109,141824,3609,Leava,16,245, +1,1110,141824,3609,Leava,16,245, +1,1111,141824,3609,Leava,16,245, +1,1112,142336,3609,Leava,19,245, +1,1113,142336,3609,Leava,19,245, +1,1114,142336,3609,Leava,19,245, +1,1115,142336,3609,Leava,19,245, +1,1116,142848,3609,Leava,21,245, +1,1117,142848,3609,Leava,21,245, +1,1118,142848,3609,Leava,21,245, +1,1119,142848,3609,Leava,21,245, +1,1120,143360,3609,Leava,23,245, +1,1121,143360,3609,Leava,23,245, +1,1122,143360,3609,Leava,23,245, +1,1123,143360,3609,Leava,23,245, +1,1124,143872,3609,Leava,25,245, +1,1125,143872,3609,Leava,25,245, +1,1126,143872,3609,Leava,25,245, +1,1127,143872,3609,Leava,25,245, +1,1128,144384,3609,Leava,26,245, +1,1129,144384,3609,Leava,26,245, +1,1130,144384,3609,Leava,26,245, +1,1131,144384,3609,Leava,26,245, +1,1132,144896,3253,Nuku‘alofa,4,224, +1,1133,144896,3253,Nuku‘alofa,4,224, +1,1134,144896,3253,Nuku‘alofa,4,224, +1,1135,144896,3253,Nuku‘alofa,4,224, +1,1136,145408,3253,Nuku‘alofa,9,224, +1,1137,145408,3253,Nuku‘alofa,9,224, +1,1138,145408,3253,Nuku‘alofa,9,224, +1,1139,145408,3253,Nuku‘alofa,9,224, +1,1140,145920,3253,Nuku‘alofa,16,224, +1,1141,145920,3253,Nuku‘alofa,16,224, +1,1142,145920,3253,Nuku‘alofa,16,224, +1,1143,145920,3253,Nuku‘alofa,16,224, +1,1144,146432,3253,Nuku‘alofa,24,224, +1,1145,146432,3253,Nuku‘alofa,24,224, +1,1146,146432,3253,Nuku‘alofa,24,224, +1,1147,146432,3253,Nuku‘alofa,24,224, +1,1148,146944,3253,Nuku‘alofa,32,224, +1,1149,146944,3253,Nuku‘alofa,32,224, +1,1150,146944,3253,Nuku‘alofa,32,224, +1,1151,146944,3253,Nuku‘alofa,32,224, +1,1152,147456,3253,Nuku‘alofa,39,224, +1,1153,147456,3253,Nuku‘alofa,39,224, +1,1154,147456,3253,Nuku‘alofa,39,224, +1,1155,147456,3253,Nuku‘alofa,39,224, +1,1156,147968,3253,Nuku‘alofa,45,224, +1,1157,147968,3253,Nuku‘alofa,45,224, +1,1158,147968,3253,Nuku‘alofa,45,224, +1,1159,147968,3253,Nuku‘alofa,45,224, +1,1160,148480,3253,Nuku‘alofa,51,224, +1,1161,148480,3253,Nuku‘alofa,51,224, +1,1162,148480,3253,Nuku‘alofa,51,224, +1,1163,148480,3253,Nuku‘alofa,51,224, +1,1164,148992,3253,Nuku‘alofa,56,224, +1,1165,148992,3253,Nuku‘alofa,56,224, +1,1166,148992,3253,Nuku‘alofa,56,224, +1,1167,148992,3253,Nuku‘alofa,56,224, +1,1168,149504,3253,Nuku‘alofa,60,224, +1,1169,149504,3253,Nuku‘alofa,60,224, +1,1170,149504,3253,Nuku‘alofa,60,224, +1,1171,149504,3253,Nuku‘alofa,60,224, +1,1172,150016,3253,Nuku‘alofa,63,224, +1,1173,150016,3253,Nuku‘alofa,63,224, +1,1174,150016,3253,Nuku‘alofa,63,224, +1,1175,150016,3253,Nuku‘alofa,63,224, +1,1176,150528,3253,Nuku‘alofa,66,224, +1,1177,150528,3253,Nuku‘alofa,66,224, +1,1178,150528,3253,Nuku‘alofa,66,224, +1,1179,150528,3253,Nuku‘alofa,66,224, +1,1180,151040,3253,Nuku‘alofa,68,224, +1,1181,151040,3253,Nuku‘alofa,68,224, +1,1182,151040,3253,Nuku‘alofa,68,224, +1,1183,151040,3253,Nuku‘alofa,68,224, +1,1184,151552,3252,‘Ohonua,88,224, +1,1185,151552,3252,‘Ohonua,88,224, +1,1186,151552,3252,‘Ohonua,88,224, +1,1187,151552,3252,‘Ohonua,88,224, +1,1188,152064,3252,‘Ohonua,104,224, +1,1189,152064,3252,‘Ohonua,104,224, +1,1190,152064,3252,‘Ohonua,104,224, +1,1191,152064,3252,‘Ohonua,104,224, +1,1192,152576,3252,‘Ohonua,120,224, +1,1193,152576,3252,‘Ohonua,120,224, +1,1194,152576,3252,‘Ohonua,120,224, +1,1195,152576,3252,‘Ohonua,120,224, +1,1196,153088,3252,‘Ohonua,137,224, +1,1197,153088,3252,‘Ohonua,137,224, +1,1198,153088,3252,‘Ohonua,137,224, +1,1199,153088,3252,‘Ohonua,137,224, +1,1200,153600,3252,‘Ohonua,154,224, +1,1201,153600,3252,‘Ohonua,154,224, +1,1202,153600,3252,‘Ohonua,154,224, +1,1203,153600,3252,‘Ohonua,154,224, +1,1204,154112,3252,‘Ohonua,172,224, +1,1205,154112,3252,‘Ohonua,172,224, +1,1206,154112,3252,‘Ohonua,172,224, +1,1207,154112,3252,‘Ohonua,172,224, +1,1208,154624,3252,‘Ohonua,190,224, +1,1209,154624,3252,‘Ohonua,190,224, +1,1210,154624,3252,‘Ohonua,190,224, +1,1211,154624,3252,‘Ohonua,190,224, +1,1212,155136,3252,‘Ohonua,208,224, +1,1213,155136,3252,‘Ohonua,208,224, +1,1214,155136,3252,‘Ohonua,208,224, +1,1215,155136,3252,‘Ohonua,208,224, +1,1216,155648,3252,‘Ohonua,226,224, +1,1217,155648,3252,‘Ohonua,226,224, +1,1218,155648,3252,‘Ohonua,226,224, +1,1219,155648,3252,‘Ohonua,226,224, +1,1220,156160,2317,Waitangi,1,155, +1,1221,156160,2317,Waitangi,1,155, +1,1222,156160,2317,Waitangi,1,155, +1,1223,156160,2317,Waitangi,1,155, +1,1224,156672,2317,Waitangi,6,155, +1,1225,156672,2317,Waitangi,6,155, +1,1226,156672,2317,Waitangi,6,155, +1,1227,156672,2317,Waitangi,6,155, +1,1228,157184,2317,Waitangi,23,155, +1,1229,157184,2317,Waitangi,23,155, +1,1230,157184,2317,Waitangi,23,155, +1,1231,157184,2317,Waitangi,23,155, +1,1232,157696,2317,Waitangi,42,155, +1,1233,157696,2317,Waitangi,42,155, +1,1234,157696,2317,Waitangi,42,155, +1,1235,157696,2317,Waitangi,42,155, +1,1236,158208,2317,Waitangi,62,155, +1,1237,158208,2317,Waitangi,62,155, +1,1238,158208,2317,Waitangi,62,155, +1,1239,158208,2317,Waitangi,62,155, +1,1240,158720,2317,Waitangi,83,155, +1,1241,158720,2317,Waitangi,83,155, +1,1242,158720,2317,Waitangi,83,155, +1,1243,158720,2317,Waitangi,83,155, +1,1244,159232,2317,Waitangi,105,155, +1,1245,159232,2317,Waitangi,105,155, +1,1246,159232,2317,Waitangi,105,155, +1,1247,159232,2317,Waitangi,105,155, +1,1248,159744,2317,Waitangi,128,155, +1,1249,159744,2317,Waitangi,128,155, +1,1250,159744,2317,Waitangi,128,155, +1,1251,159744,2317,Waitangi,128,155, +1,1252,160256,2317,Waitangi,152,155, +1,1253,160256,2317,Waitangi,152,155, +1,1254,160256,2317,Waitangi,152,155, +1,1255,160256,2317,Waitangi,152,155, +1,1256,160768,2317,Waitangi,177,155, +1,1257,160768,2317,Waitangi,177,155, +1,1258,160768,2317,Waitangi,177,155, +1,1259,160768,2317,Waitangi,177,155, +1,1260,161280,2317,Waitangi,203,155, +1,1261,161280,2317,Waitangi,203,155, +1,1262,161280,2317,Waitangi,203,155, +1,1263,161280,2317,Waitangi,203,155, +1,1264,161792,2317,Waitangi,230,155, +1,1265,161792,2317,Waitangi,230,155, +1,1266,161792,2317,Waitangi,230,155, +1,1267,161792,2317,Waitangi,230,155, +1,1268,162304,2317,Waitangi,258,155, +1,1269,162304,2317,Waitangi,258,155, +1,1270,162304,2317,Waitangi,258,155, +1,1271,162304,2317,Waitangi,258,155, +1,1272,162816,2317,Waitangi,287,155, +1,1273,162816,2317,Waitangi,287,155, +1,1274,162816,2317,Waitangi,287,155, +1,1275,162816,2317,Waitangi,287,155, +1,1276,163328,2317,Waitangi,318,155, +1,1277,163328,2317,Waitangi,318,155, +1,1278,163328,2317,Waitangi,318,155, +1,1279,163328,2317,Waitangi,318,155, +1,1280,163840,2317,Waitangi,350,155, +1,1281,163840,2317,Waitangi,350,155, +1,1282,163840,2317,Waitangi,350,155, +1,1283,163840,2317,Waitangi,350,155, +1,1284,164352,2317,Waitangi,383,155, +1,1285,164352,2317,Waitangi,383,155, +1,1286,164352,2317,Waitangi,383,155, +1,1287,164352,2317,Waitangi,383,155, +1,1288,164864,2317,Waitangi,417,155, +1,1289,164864,2317,Waitangi,417,155, +1,1290,164864,2317,Waitangi,417,155, +1,1291,164864,2317,Waitangi,417,155, +1,1292,165376,2317,Waitangi,452,155, +1,1293,165376,2317,Waitangi,452,155, +1,1294,165376,2317,Waitangi,452,155, +1,1295,165376,2317,Waitangi,452,155, +1,1296,165888,2317,Waitangi,488,155, +1,1297,165888,2317,Waitangi,488,155, +1,1298,165888,2317,Waitangi,488,155, +1,1299,165888,2317,Waitangi,488,155, +1,1300,166400,2317,Waitangi,525,155, +1,1301,166400,2317,Waitangi,525,155, +1,1302,166400,2317,Waitangi,525,155, +1,1303,166400,2317,Waitangi,525,155, +1,1304,166912,2317,Waitangi,563,155, +1,1305,166912,2317,Waitangi,563,155, +1,1306,166912,2317,Waitangi,563,155, +1,1307,166912,2317,Waitangi,563,155, +1,1308,167424,2317,Waitangi,602,155, +1,1309,167424,2317,Waitangi,602,155, +1,1310,167424,2317,Waitangi,602,155, +1,1311,167424,2317,Waitangi,602,155, +1,1312,167936,2317,Waitangi,642,155, +1,1313,167936,2317,Waitangi,642,155, +1,1314,167936,2317,Waitangi,642,155, +1,1315,167936,2317,Waitangi,642,155, +1,1316,168448,2317,Waitangi,682,155, +1,1317,168448,2317,Waitangi,682,155, +1,1318,168448,2317,Waitangi,682,155, +1,1319,168448,2317,Waitangi,682,155, +1,1320,168960,2317,Waitangi,723,155, +1,1321,168960,2317,Waitangi,723,155, +1,1322,168960,2317,Waitangi,723,155, +1,1323,168960,2317,Waitangi,723,155, +1,1324,169472,2317,Waitangi,765,155, +1,1325,169472,2317,Waitangi,765,155, +1,1326,169472,2317,Waitangi,765,155, +1,1327,169472,2317,Waitangi,765,155, +1,1328,169984,2317,Waitangi,808,155, +1,1329,169984,2317,Waitangi,808,155, +1,1330,169984,2317,Waitangi,808,155, +1,1331,169984,2317,Waitangi,808,155, +1,1332,170496,2317,Waitangi,852,155, +1,1333,170496,2317,Waitangi,852,155, +1,1334,170496,2317,Waitangi,852,155, +1,1335,170496,2317,Waitangi,852,155, +1,1336,171008,2317,Waitangi,898,155, +1,1337,171008,2317,Waitangi,898,155, +1,1338,171008,2317,Waitangi,898,155, +1,1339,171008,2317,Waitangi,898,155, +1,1340,171520,2317,Waitangi,944,155, +1,1341,171520,2317,Waitangi,944,155, +1,1342,171520,2317,Waitangi,944,155, +1,1343,171520,2317,Waitangi,944,155, +1,1344,172032,2317,Waitangi,991,155, +1,1345,172032,2317,Waitangi,991,155, +1,1346,172032,2317,Waitangi,991,155, +1,1347,172032,2317,Waitangi,991,155, +1,1348,172544,2317,Waitangi,1038,155, +1,1349,172544,2317,Waitangi,1038,155, +1,1350,172544,2317,Waitangi,1038,155, +1,1351,172544,2317,Waitangi,1038,155, +1,1352,173056,2317,Waitangi,1085,155, +1,1353,173056,2317,Waitangi,1085,155, +1,1354,173056,2317,Waitangi,1085,155, +1,1355,173056,2317,Waitangi,1085,155, +1,1356,173568,2317,Waitangi,1132,155, +1,1357,173568,2317,Waitangi,1132,155, +1,1358,173568,2317,Waitangi,1132,155, +1,1359,173568,2317,Waitangi,1132,155, +1,1360,174080,2317,Waitangi,1180,155, +1,1361,174080,2317,Waitangi,1180,155, +1,1362,174080,2317,Waitangi,1180,155, +1,1363,174080,2317,Waitangi,1180,155, +1,1364,174592,2317,Waitangi,1228,155, +1,1365,174592,2317,Waitangi,1228,155, +1,1366,174592,2317,Waitangi,1228,155, +1,1367,174592,2317,Waitangi,1228,155, +1,1368,175104,2317,Waitangi,1276,155, +1,1369,175104,2317,Waitangi,1276,155, +1,1370,175104,2317,Waitangi,1276,155, +1,1371,175104,2317,Waitangi,1276,155, +1,1372,175616,2317,Waitangi,1324,155, +1,1373,175616,2317,Waitangi,1324,155, +1,1374,175616,2317,Waitangi,1324,155, +1,1375,175616,2317,Waitangi,1324,155, +1,1376,176128,2317,Waitangi,1373,155, +1,1377,176128,2317,Waitangi,1373,155, +1,1378,176128,2317,Waitangi,1373,155, +1,1379,176128,2317,Waitangi,1373,155, +1,1380,176640,2317,Waitangi,1422,155, +1,1381,176640,2317,Waitangi,1422,155, +1,1382,176640,2317,Waitangi,1422,155, +1,1383,176640,2317,Waitangi,1422,155, +1,1384,177152,2317,Waitangi,1471,155, +1,1385,177152,2317,Waitangi,1471,155, +1,1386,177152,2317,Waitangi,1471,155, +1,1387,177152,2317,Waitangi,1471,155, +1,1388,177664,2317,Waitangi,1520,155, +1,1389,177664,2317,Waitangi,1520,155, +1,1390,177664,2317,Waitangi,1520,155, +1,1391,177664,2317,Waitangi,1520,155, +1,1392,178176,2317,Waitangi,1570,155, +1,1393,178176,2317,Waitangi,1570,155, +1,1394,178176,2317,Waitangi,1570,155, +1,1395,178176,2317,Waitangi,1570,155, +1,1396,178688,2317,Waitangi,1620,155, +1,1397,178688,2317,Waitangi,1620,155, +1,1398,178688,2317,Waitangi,1620,155, +1,1399,178688,2317,Waitangi,1620,155, +1,1400,179200,2317,Waitangi,1670,155, +1,1401,179200,2317,Waitangi,1670,155, +1,1402,179200,2317,Waitangi,1670,155, +1,1403,179200,2317,Waitangi,1670,155, +1,1404,179712,2317,Waitangi,1720,155, +1,1405,179712,2317,Waitangi,1720,155, +1,1406,179712,2317,Waitangi,1720,155, +1,1407,179712,2317,Waitangi,1720,155, +1,1408,180224,2317,Waitangi,1771,155, +1,1409,180224,2317,Waitangi,1771,155, +1,1410,180224,2317,Waitangi,1771,155, +1,1411,180224,2317,Waitangi,1771,155, +1,1412,180736,2317,Waitangi,1822,155, +1,1413,180736,2317,Waitangi,1822,155, +1,1414,180736,2317,Waitangi,1822,155, +1,1415,180736,2317,Waitangi,1822,155, +1,1416,181248,2317,Waitangi,1873,155, +1,1417,181248,2317,Waitangi,1873,155, +1,1418,181248,2317,Waitangi,1873,155, +1,1419,181248,2317,Waitangi,1873,155, +1,1420,181760,2317,Waitangi,1924,155, +1,1421,181760,2317,Waitangi,1924,155, +1,1422,181760,2317,Waitangi,1924,155, +1,1423,181760,2317,Waitangi,1924,155, +1,1424,182272,2317,Waitangi,1976,155, +1,1425,182272,2317,Waitangi,1976,155, +1,1426,182272,2317,Waitangi,1976,155, +1,1427,182272,2317,Waitangi,1976,155, +1,1428,182784,2317,Waitangi,2028,155, +1,1429,182784,2317,Waitangi,2028,155, +1,1430,182784,2317,Waitangi,2028,155, +1,1431,182784,2317,Waitangi,2028,155, +1,1432,183296,2317,Waitangi,2080,155, +1,1433,183296,2317,Waitangi,2080,155, +1,1434,183296,2317,Waitangi,2080,155, +1,1435,183296,2317,Waitangi,2080,155, +1,1436,183808,2317,Waitangi,2132,155, +1,1437,183808,2317,Waitangi,2132,155, +1,1438,183808,2317,Waitangi,2132,155, +1,1439,183808,2317,Waitangi,2132,155, +1,1440,184320,2317,Waitangi,2184,155, +1,1441,184320,2317,Waitangi,2184,155, +1,1442,184320,2317,Waitangi,2184,155, +1,1443,184320,2317,Waitangi,2184,155, +1,1444,184832,2317,Waitangi,2237,155, +1,1445,184832,2317,Waitangi,2237,155, +1,1446,184832,2317,Waitangi,2237,155, +1,1447,184832,2317,Waitangi,2237,155, +1,1448,185344,2317,Waitangi,2290,155, +1,1449,185344,2317,Waitangi,2290,155, +1,1450,185344,2317,Waitangi,2290,155, +1,1451,185344,2317,Waitangi,2290,155, +1,1452,185856,2317,Waitangi,2343,155, +1,1453,185856,2317,Waitangi,2343,155, +1,1454,185856,2317,Waitangi,2343,155, +1,1455,185856,2317,Waitangi,2343,155, +1,1456,186368,2317,Waitangi,2396,155, +1,1457,186368,2317,Waitangi,2396,155, +1,1458,186368,2317,Waitangi,2396,155, +1,1459,186368,2317,Waitangi,2396,155, +1,1460,186880,2317,Waitangi,2449,155, +1,1461,186880,2317,Waitangi,2449,155, +1,1462,186880,2317,Waitangi,2449,155, +1,1463,186880,2317,Waitangi,2449,155, +1,1464,187392,2317,Waitangi,2503,155, +1,1465,187392,2317,Waitangi,2503,155, +1,1466,187392,2317,Waitangi,2503,155, +1,1467,187392,2317,Waitangi,2503,155, +1,1468,187904,2317,Waitangi,2557,155, +1,1469,187904,2317,Waitangi,2557,155, +1,1470,187904,2317,Waitangi,2557,155, +1,1471,187904,2317,Waitangi,2557,155, +1,1472,188416,2317,Waitangi,2611,155, +1,1473,188416,2317,Waitangi,2611,155, +1,1474,188416,2317,Waitangi,2611,155, +1,1475,188416,2317,Waitangi,2611,155, +1,1476,188928,2317,Waitangi,2665,155, +1,1477,188928,2317,Waitangi,2665,155, +1,1478,188928,2317,Waitangi,2665,155, +1,1479,188928,2317,Waitangi,2665,155, +1,1480,189440,2317,Waitangi,2719,155, +1,1481,189440,2317,Waitangi,2719,155, +1,1482,189440,2317,Waitangi,2719,155, +1,1483,189440,2317,Waitangi,2719,155, +1,1484,189952,2317,Waitangi,2774,155, +1,1485,189952,2317,Waitangi,2774,155, +1,1486,189952,2317,Waitangi,2774,155, +1,1487,189952,2317,Waitangi,2774,155, +1,1488,190464,2317,Waitangi,2829,155, +1,1489,190464,2317,Waitangi,2829,155, +1,1490,190464,2317,Waitangi,2829,155, +1,1491,190464,2317,Waitangi,2829,155, +1,1492,190976,2317,Waitangi,2884,155, +1,1493,190976,2317,Waitangi,2884,155, +1,1494,190976,2317,Waitangi,2884,155, +1,1495,190976,2317,Waitangi,2884,155, +1,1496,191488,2317,Waitangi,2939,155, +1,1497,191488,2317,Waitangi,2939,155, +1,1498,191488,2317,Waitangi,2939,155, +1,1499,191488,2317,Waitangi,2939,155, +1,1500,192000,2317,Waitangi,2994,155, +1,1501,192000,2317,Waitangi,2994,155, +1,1502,192000,2317,Waitangi,2994,155, +1,1503,192000,2317,Waitangi,2994,155, +1,1504,192512,2317,Waitangi,3049,155, +1,1505,192512,2317,Waitangi,3049,155, +1,1506,192512,2317,Waitangi,3049,155, +1,1507,192512,2317,Waitangi,3049,155, +1,1508,193024,2317,Waitangi,3105,155, +1,1509,193024,2317,Waitangi,3105,155, +1,1510,193024,2317,Waitangi,3105,155, +1,1511,193024,2317,Waitangi,3105,155, +1,1512,193536,2317,Waitangi,3161,155, +1,1513,193536,2317,Waitangi,3161,155, +1,1514,193536,2317,Waitangi,3161,155, +1,1515,193536,2317,Waitangi,3161,155, +1,1516,194048,2317,Waitangi,3217,155, +1,1517,194048,2317,Waitangi,3217,155, +1,1518,194048,2317,Waitangi,3217,155, +1,1519,194048,2317,Waitangi,3217,155, +1,1520,194560,2317,Waitangi,3273,155, +1,1521,194560,2317,Waitangi,3273,155, +1,1522,194560,2317,Waitangi,3273,155, +1,1523,194560,2317,Waitangi,3273,155, +1,1524,195072,2317,Waitangi,3329,155, +1,1525,195072,2317,Waitangi,3329,155, +1,1526,195072,2317,Waitangi,3329,155, +1,1527,195072,2317,Waitangi,3329,155, +1,1528,195584,2317,Waitangi,3385,155, +1,1529,195584,2317,Waitangi,3385,155, +1,1530,195584,2317,Waitangi,3385,155, +1,1531,195584,2317,Waitangi,3385,155, +1,1532,196096,2317,Waitangi,3442,155, +1,1533,196096,2317,Waitangi,3442,155, +1,1534,196096,2317,Waitangi,3442,155, +1,1535,196096,2317,Waitangi,3442,155, +1,1536,196608,2317,Waitangi,3499,155, +1,1537,196608,2317,Waitangi,3499,155, +1,1538,196608,2317,Waitangi,3499,155, +1,1539,196608,2317,Waitangi,3499,155, +1,1540,197120,2317,Waitangi,3556,155, +1,1541,197120,2317,Waitangi,3556,155, +1,1542,197120,2317,Waitangi,3556,155, +1,1543,197120,2317,Waitangi,3556,155, +1,1544,197632,2317,Waitangi,3613,155, +1,1545,197632,2317,Waitangi,3613,155, +1,1546,197632,2317,Waitangi,3613,155, +1,1547,197632,2317,Waitangi,3613,155, +1,1548,198144,2317,Waitangi,3670,155, +1,1549,198144,2317,Waitangi,3670,155, +1,1550,198144,2317,Waitangi,3670,155, +1,1551,198144,2317,Waitangi,3670,155, +1,1552,198656,2317,Waitangi,3727,155, +1,1553,198656,2317,Waitangi,3727,155, +1,1554,198656,2317,Waitangi,3727,155, +1,1555,198656,2317,Waitangi,3727,155, +1,1556,199168,2317,Waitangi,3785,155, +1,1557,199168,2317,Waitangi,3785,155, +1,1558,199168,2317,Waitangi,3785,155, +1,1559,199168,2317,Waitangi,3785,155, +1,1560,199680,2317,Waitangi,3843,155, +1,1561,199680,2317,Waitangi,3843,155, +1,1562,199680,2317,Waitangi,3843,155, +1,1563,199680,2317,Waitangi,3843,155, +1,1564,200192,2317,Waitangi,3901,155, +1,1565,200192,2317,Waitangi,3901,155, +1,1566,200192,2317,Waitangi,3901,155, +1,1567,200192,2317,Waitangi,3901,155, +1,1568,200704,2317,Waitangi,3959,155, +1,1569,200704,2317,Waitangi,3959,155, +1,1570,200704,2317,Waitangi,3959,155, +1,1571,200704,2317,Waitangi,3959,155, +1,1572,201216,2317,Waitangi,4017,155, +1,1573,201216,2317,Waitangi,4017,155, +1,1574,201216,2317,Waitangi,4017,155, +1,1575,201216,2317,Waitangi,4017,155, +1,1576,201728,2317,Waitangi,4075,155, +1,1577,201728,2317,Waitangi,4075,155, +1,1578,201728,2317,Waitangi,4075,155, +1,1579,201728,2317,Waitangi,4075,155, +1,1580,202240,2317,Waitangi,4133,155, +1,1581,202240,2317,Waitangi,4133,155, +1,1582,202240,2317,Waitangi,4133,155, +1,1583,202240,2317,Waitangi,4133,155, +1,1584,202752,2317,Waitangi,4192,155, +1,1585,202752,2317,Waitangi,4192,155, +1,1586,202752,2317,Waitangi,4192,155, +1,1587,202752,2317,Waitangi,4192,155, +1,1588,203264,2317,Waitangi,4251,155, +1,1589,203264,2317,Waitangi,4251,155, +1,1590,203264,2317,Waitangi,4251,155, +1,1591,203264,2317,Waitangi,4251,155, +1,1592,203776,2317,Waitangi,4310,155, +1,1593,203776,2317,Waitangi,4310,155, +1,1594,203776,2317,Waitangi,4310,155, +1,1595,203776,2317,Waitangi,4310,155, +1,1596,204288,2317,Waitangi,4369,155, +1,1597,204288,2317,Waitangi,4369,155, +1,1598,204288,2317,Waitangi,4369,155, +1,1599,204288,2317,Waitangi,4369,155, +1,1600,204800,2317,Waitangi,4428,155, +1,1601,204800,2317,Waitangi,4428,155, +1,1602,204800,2317,Waitangi,4428,155, +1,1603,204800,2317,Waitangi,4428,155, +1,1604,205312,2317,Waitangi,4487,155, +1,1605,205312,2317,Waitangi,4487,155, +1,1606,205312,2317,Waitangi,4487,155, +1,1607,205312,2317,Waitangi,4487,155, +1,1608,205824,2317,Waitangi,4546,155, +1,1609,205824,2317,Waitangi,4546,155, +1,1610,205824,2317,Waitangi,4546,155, +1,1611,205824,2317,Waitangi,4546,155, +1,1612,206336,2317,Waitangi,4606,155, +1,1613,206336,2317,Waitangi,4606,155, +1,1614,206336,2317,Waitangi,4606,155, +1,1615,206336,2317,Waitangi,4606,155, +1,1616,206848,2317,Waitangi,4666,155, +1,1617,206848,2317,Waitangi,4666,155, +1,1618,206848,2317,Waitangi,4666,155, +1,1619,206848,2317,Waitangi,4666,155, +1,1620,207360,2317,Waitangi,4726,155, +1,1621,207360,2317,Waitangi,4726,155, +1,1622,207360,2317,Waitangi,4726,155, +1,1623,207360,2317,Waitangi,4726,155, +1,1624,207872,2317,Waitangi,4786,155, +1,1625,207872,2317,Waitangi,4786,155, +1,1626,207872,2317,Waitangi,4786,155, +1,1627,207872,2317,Waitangi,4786,155, +1,1628,208384,2317,Waitangi,4846,155, +1,1629,208384,2317,Waitangi,4846,155, +1,1630,208384,2317,Waitangi,4846,155, +1,1631,208384,2317,Waitangi,4846,155, +1,1632,208896,2317,Waitangi,4906,155, +1,1633,208896,2317,Waitangi,4906,155, +1,1634,208896,2317,Waitangi,4906,155, +1,1635,208896,2317,Waitangi,4906,155, +1,1636,209408,2317,Waitangi,4966,155, +1,1637,209408,2317,Waitangi,4966,155, +1,1638,209408,2317,Waitangi,4966,155, +1,1639,209408,2317,Waitangi,4966,155, +1,1640,209920,2317,Waitangi,5026,155, +1,1641,209920,2317,Waitangi,5026,155, +1,1642,209920,2317,Waitangi,5026,155, +1,1643,209920,2317,Waitangi,5026,155, +1,1644,210432,2317,Waitangi,5087,155, +1,1645,210432,2317,Waitangi,5087,155, +1,1646,210432,2317,Waitangi,5087,155, +1,1647,210432,2317,Waitangi,5087,155, +1,1648,210944,2317,Waitangi,5148,155, +1,1649,210944,2317,Waitangi,5148,155, +1,1650,210944,2317,Waitangi,5148,155, +1,1651,210944,2317,Waitangi,5148,155, +1,1652,211456,2317,Waitangi,5209,155, +1,1653,211456,2317,Waitangi,5209,155, +1,1654,211456,2317,Waitangi,5209,155, +1,1655,211456,2317,Waitangi,5209,155, +1,1656,211968,2317,Waitangi,5270,155, +1,1657,211968,2317,Waitangi,5270,155, +1,1658,211968,2317,Waitangi,5270,155, +1,1659,211968,2317,Waitangi,5270,155, +1,1660,212480,2317,Waitangi,5331,155, +1,1661,212480,2317,Waitangi,5331,155, +1,1662,212480,2317,Waitangi,5331,155, +1,1663,212480,2317,Waitangi,5331,155, +1,1664,212992,2317,Waitangi,5392,155, +1,1665,212992,2317,Waitangi,5392,155, +1,1666,212992,2317,Waitangi,5392,155, +1,1667,212992,2317,Waitangi,5392,155, +1,1668,213504,2317,Waitangi,5453,155, +1,1669,213504,2317,Waitangi,5453,155, +1,1670,213504,2317,Waitangi,5453,155, +1,1671,213504,2317,Waitangi,5453,155, +1,1672,214016,2317,Waitangi,5514,155, +1,1673,214016,2317,Waitangi,5514,155, +1,1674,214016,2317,Waitangi,5514,155, +1,1675,214016,2317,Waitangi,5514,155, +1,1676,214528,2317,Waitangi,5575,155, +1,1677,214528,2317,Waitangi,5575,155, +1,1678,214528,2317,Waitangi,5575,155, +1,1679,214528,2317,Waitangi,5575,155, +1,1680,215040,2317,Waitangi,5637,155, +1,1681,215040,2317,Waitangi,5637,155, +1,1682,215040,2317,Waitangi,5637,155, +1,1683,215040,2317,Waitangi,5637,155, +1,1684,215552,2317,Waitangi,5699,155, +1,1685,215552,2317,Waitangi,5699,155, +1,1686,215552,2317,Waitangi,5699,155, +1,1687,215552,2317,Waitangi,5699,155, +1,1688,216064,2317,Waitangi,5761,155, +1,1689,216064,2317,Waitangi,5761,155, +1,1690,216064,2317,Waitangi,5761,155, +1,1691,216064,2317,Waitangi,5761,155, +1,1692,216576,2317,Waitangi,5823,155, +1,1693,216576,2317,Waitangi,5823,155, +1,1694,216576,2317,Waitangi,5823,155, +1,1695,216576,2317,Waitangi,5823,155, +1,1696,217088,2317,Waitangi,5885,155, +1,1697,217088,2317,Waitangi,5885,155, +1,1698,217088,2317,Waitangi,5885,155, +1,1699,217088,2317,Waitangi,5885,155, +1,1700,217600,2317,Waitangi,5947,155, +1,1701,217600,2317,Waitangi,5947,155, +1,1702,217600,2317,Waitangi,5947,155, +1,1703,217600,2317,Waitangi,5947,155, +1,1704,218112,2317,Waitangi,6009,155, +1,1705,218112,2317,Waitangi,6009,155, +1,1706,218112,2317,Waitangi,6009,155, +1,1707,218112,2317,Waitangi,6009,155, +1,1708,218624,2317,Waitangi,6071,155, +1,1709,218624,2317,Waitangi,6071,155, +1,1710,218624,2317,Waitangi,6071,155, +1,1711,218624,2317,Waitangi,6071,155, +1,1712,219136,2317,Waitangi,6133,155, +1,1713,219136,2317,Waitangi,6133,155, +1,1714,219136,2317,Waitangi,6133,155, +1,1715,219136,2317,Waitangi,6133,155, +1,1716,219648,2317,Waitangi,6196,155, +1,1717,219648,2317,Waitangi,6196,155, +1,1718,219648,2317,Waitangi,6196,155, +1,1719,219648,2317,Waitangi,6196,155, +1,1720,220160,2317,Waitangi,6259,155, +1,1721,220160,2317,Waitangi,6259,155, +1,1722,220160,2317,Waitangi,6259,155, +1,1723,220160,2317,Waitangi,6259,155, +1,1724,220672,2317,Waitangi,6322,155, +1,1725,220672,2317,Waitangi,6322,155, +1,1726,220672,2317,Waitangi,6322,155, +1,1727,220672,2317,Waitangi,6322,155, +1,1728,221184,2317,Waitangi,6385,155, +1,1729,221184,2317,Waitangi,6385,155, +1,1730,221184,2317,Waitangi,6385,155, +1,1731,221184,2317,Waitangi,6385,155, +1,1732,221696,2317,Waitangi,6448,155, +1,1733,221696,2317,Waitangi,6448,155, +1,1734,221696,2317,Waitangi,6448,155, +1,1735,221696,2317,Waitangi,6448,155, +1,1736,222208,2317,Waitangi,6511,155, +1,1737,222208,2317,Waitangi,6511,155, +1,1738,222208,2317,Waitangi,6511,155, +1,1739,222208,2317,Waitangi,6511,155, +1,1740,222720,2317,Waitangi,6574,155, +1,1741,222720,2317,Waitangi,6574,155, +1,1742,222720,2317,Waitangi,6574,155, +1,1743,222720,2317,Waitangi,6574,155, +1,1744,223232,2317,Waitangi,6637,155, +1,1745,223232,2317,Waitangi,6637,155, +1,1746,223232,2317,Waitangi,6637,155, +1,1747,223232,2317,Waitangi,6637,155, +1,1748,223744,2317,Waitangi,6700,155, +1,1749,223744,2317,Waitangi,6700,155, +1,1750,223744,2317,Waitangi,6700,155, +1,1751,223744,2317,Waitangi,6700,155, +1,1752,224256,2317,Waitangi,6763,155, +1,1753,224256,2317,Waitangi,6763,155, +1,1754,224256,2317,Waitangi,6763,155, +1,1755,224256,2317,Waitangi,6763,155, +1,1756,224768,2317,Waitangi,6826,155, +1,1757,224768,2317,Waitangi,6826,155, +1,1758,224768,2317,Waitangi,6826,155, +1,1759,224768,2317,Waitangi,6826,155, +1,1760,225280,2317,Waitangi,6889,155, +1,1761,225280,2317,Waitangi,6889,155, +1,1762,225280,2317,Waitangi,6889,155, +1,1763,225280,2317,Waitangi,6889,155, +1,1764,225792,2317,Waitangi,6953,155, +1,1765,225792,2317,Waitangi,6953,155, +1,1766,225792,2317,Waitangi,6953,155, +1,1767,225792,2317,Waitangi,6953,155, +1,1768,226304,2317,Waitangi,7017,155, +1,1769,226304,2317,Waitangi,7017,155, +1,1770,226304,2317,Waitangi,7017,155, +1,1771,226304,2317,Waitangi,7017,155, +1,1772,226816,2317,Waitangi,7081,155, +1,1773,226816,2317,Waitangi,7081,155, +1,1774,226816,2317,Waitangi,7081,155, +1,1775,226816,2317,Waitangi,7081,155, +1,1776,227328,2317,Waitangi,7145,155, +1,1777,227328,2317,Waitangi,7145,155, +1,1778,227328,2317,Waitangi,7145,155, +1,1779,227328,2317,Waitangi,7145,155, +1,1780,227840,2317,Waitangi,7209,155, +1,1781,227840,2317,Waitangi,7209,155, +1,1782,227840,2317,Waitangi,7209,155, +1,1783,227840,2317,Waitangi,7209,155, +1,1784,228352,2317,Waitangi,7273,155, +1,1785,228352,2317,Waitangi,7273,155, +1,1786,228352,2317,Waitangi,7273,155, +1,1787,228352,2317,Waitangi,7273,155, +1,1788,228864,2317,Waitangi,7337,155, +1,1789,228864,2317,Waitangi,7337,155, +1,1790,228864,2317,Waitangi,7337,155, +1,1791,228864,2317,Waitangi,7337,155, +1,1792,229376,2317,Waitangi,7401,155, +1,1793,229376,2317,Waitangi,7401,155, +1,1794,229376,2317,Waitangi,7401,155, +1,1795,229376,2317,Waitangi,7401,155, +1,1796,229888,2317,Waitangi,7465,155, +1,1797,229888,2317,Waitangi,7465,155, +1,1798,229888,2317,Waitangi,7465,155, +1,1799,229888,2317,Waitangi,7465,155, +1,1800,230400,2317,Waitangi,7529,155, +1,1801,230400,2317,Waitangi,7529,155, +1,1802,230400,2317,Waitangi,7529,155, +1,1803,230400,2317,Waitangi,7529,155, +1,1804,230912,2317,Waitangi,7593,155, +1,1805,230912,2317,Waitangi,7593,155, +1,1806,230912,2317,Waitangi,7593,155, +1,1807,230912,2317,Waitangi,7593,155, +1,1808,231424,2317,Waitangi,7657,155, +1,1809,231424,2317,Waitangi,7657,155, +1,1810,231424,2317,Waitangi,7657,155, +1,1811,231424,2317,Waitangi,7657,155, +1,1812,231936,2317,Waitangi,7722,155, +1,1813,231936,2317,Waitangi,7722,155, +1,1814,231936,2317,Waitangi,7722,155, +1,1815,231936,2317,Waitangi,7722,155, +1,1816,232448,2317,Waitangi,7787,155, +1,1817,232448,2317,Waitangi,7787,155, +1,1818,232448,2317,Waitangi,7787,155, +1,1819,232448,2317,Waitangi,7787,155, +1,1820,232960,2317,Waitangi,7852,155, +1,1821,232960,2317,Waitangi,7852,155, +1,1822,232960,2317,Waitangi,7852,155, +1,1823,232960,2317,Waitangi,7852,155, +1,1824,233472,2317,Waitangi,7917,155, +1,1825,233472,2317,Waitangi,7917,155, +1,1826,233472,2317,Waitangi,7917,155, +1,1827,233472,2317,Waitangi,7917,155, +1,1828,233984,2317,Waitangi,7982,155, +1,1829,233984,2317,Waitangi,7982,155, +1,1830,233984,2317,Waitangi,7982,155, +1,1831,233984,2317,Waitangi,7982,155, +1,1832,234496,2317,Waitangi,8047,155, +1,1833,234496,2317,Waitangi,8047,155, +1,1834,234496,2317,Waitangi,8047,155, +1,1835,234496,2317,Waitangi,8047,155, +1,1836,235008,2317,Waitangi,8112,155, +1,1837,235008,2317,Waitangi,8112,155, +1,1838,235008,2317,Waitangi,8112,155, +1,1839,235008,2317,Waitangi,8112,155, +1,1840,235520,2317,Waitangi,8177,155, +1,1841,235520,2317,Waitangi,8177,155, +1,1842,235520,2317,Waitangi,8177,155, +1,1843,235520,2317,Waitangi,8177,155, +1,1844,236032,2317,Waitangi,8242,155, +1,1845,236032,2317,Waitangi,8242,155, +1,1846,236032,2317,Waitangi,8242,155, +1,1847,236032,2317,Waitangi,8242,155, +1,1848,236544,2317,Waitangi,8307,155, +1,1849,236544,2317,Waitangi,8307,155, +1,1850,236544,2317,Waitangi,8307,155, +1,1851,236544,2317,Waitangi,8307,155, +1,1852,237056,2317,Waitangi,8372,155, +1,1853,237056,2317,Waitangi,8372,155, +1,1854,237056,2317,Waitangi,8372,155, +1,1855,237056,2317,Waitangi,8372,155, +1,1856,237568,2317,Waitangi,8437,155, +1,1857,237568,2317,Waitangi,8437,155, +1,1858,237568,2317,Waitangi,8437,155, +1,1859,237568,2317,Waitangi,8437,155, +1,1860,238080,2317,Waitangi,8502,155, +1,1861,238080,2317,Waitangi,8502,155, +1,1862,238080,2317,Waitangi,8502,155, +1,1863,238080,2317,Waitangi,8502,155, +1,1864,238592,2317,Waitangi,8567,155, +1,1865,238592,2317,Waitangi,8567,155, +1,1866,238592,2317,Waitangi,8567,155, +1,1867,238592,2317,Waitangi,8567,155, +1,1868,239104,2317,Waitangi,8632,155, +1,1869,239104,2317,Waitangi,8632,155, +1,1870,239104,2317,Waitangi,8632,155, +1,1871,239104,2317,Waitangi,8632,155, +1,1872,239616,2317,Waitangi,8697,155, +1,1873,239616,2317,Waitangi,8697,155, +1,1874,239616,2317,Waitangi,8697,155, +1,1875,239616,2317,Waitangi,8697,155, +1,1876,240128,2317,Waitangi,8763,155, +1,1877,240128,2317,Waitangi,8763,155, +1,1878,240128,2317,Waitangi,8763,155, +1,1879,240128,2317,Waitangi,8763,155, +1,1880,240640,2317,Waitangi,8829,155, +1,1881,240640,2317,Waitangi,8829,155, +1,1882,240640,2317,Waitangi,8829,155, +1,1883,240640,2317,Waitangi,8829,155, +1,1884,241152,2317,Waitangi,8895,155, +1,1885,241152,2317,Waitangi,8895,155, +1,1886,241152,2317,Waitangi,8895,155, +1,1887,241152,2317,Waitangi,8895,155, +1,1888,241664,2317,Waitangi,8961,155, +1,1889,241664,2317,Waitangi,8961,155, +1,1890,241664,2317,Waitangi,8961,155, +1,1891,241664,2317,Waitangi,8961,155, +1,1892,242176,2317,Waitangi,9027,155, +1,1893,242176,2317,Waitangi,9027,155, +1,1894,242176,2317,Waitangi,9027,155, +1,1895,242176,2317,Waitangi,9027,155, +1,1896,242688,2317,Waitangi,9093,155, +1,1897,242688,2317,Waitangi,9093,155, +1,1898,242688,2317,Waitangi,9093,155, +1,1899,242688,2317,Waitangi,9093,155, +1,1900,243200,2317,Waitangi,9159,155, +1,1901,243200,2317,Waitangi,9159,155, +1,1902,243200,2317,Waitangi,9159,155, +1,1903,243200,2317,Waitangi,9159,155, +1,1904,243712,2317,Waitangi,9225,155, +1,1905,243712,2317,Waitangi,9225,155, +1,1906,243712,2317,Waitangi,9225,155, +1,1907,243712,2317,Waitangi,9225,155, +1,1908,244224,2317,Waitangi,9291,155, +1,1909,244224,2317,Waitangi,9291,155, +1,1910,244224,2317,Waitangi,9291,155, +1,1911,244224,2317,Waitangi,9291,155, +1,1912,244736,2317,Waitangi,9357,155, +1,1913,244736,2317,Waitangi,9357,155, +1,1914,244736,2317,Waitangi,9357,155, +1,1915,244736,2317,Waitangi,9357,155, +1,1916,245248,2317,Waitangi,9423,155, +1,1917,245248,2317,Waitangi,9423,155, +1,1918,245248,2317,Waitangi,9423,155, +1,1919,245248,2317,Waitangi,9423,155, +1,1920,245760,2317,Waitangi,9489,155, +1,1921,245760,2317,Waitangi,9489,155, +1,1922,245760,2317,Waitangi,9489,155, +1,1923,245760,2317,Waitangi,9489,155, +1,1924,246272,2317,Waitangi,9555,155, +1,1925,246272,2317,Waitangi,9555,155, +1,1926,246272,2317,Waitangi,9555,155, +1,1927,246272,2317,Waitangi,9555,155, +1,1928,246784,2317,Waitangi,9621,155, +1,1929,246784,2317,Waitangi,9621,155, +1,1930,246784,2317,Waitangi,9621,155, +1,1931,246784,2317,Waitangi,9621,155, +1,1932,247296,2317,Waitangi,9687,155, +1,1933,247296,2317,Waitangi,9687,155, +1,1934,247296,2317,Waitangi,9687,155, +1,1935,247296,2317,Waitangi,9687,155, +1,1936,247808,2317,Waitangi,9753,155, +1,1937,247808,2317,Waitangi,9753,155, +1,1938,247808,2317,Waitangi,9753,155, +1,1939,247808,2317,Waitangi,9753,155, +1,1940,248320,2317,Waitangi,9819,155, +1,1941,248320,2317,Waitangi,9819,155, +1,1942,248320,2317,Waitangi,9819,155, +1,1943,248320,2317,Waitangi,9819,155, +1,1944,248832,2317,Waitangi,9885,155, +1,1945,248832,2317,Waitangi,9885,155, +1,1946,248832,2317,Waitangi,9885,155, +1,1947,248832,2317,Waitangi,9885,155, +1,1948,249344,2317,Waitangi,9952,155, +1,1949,249344,2317,Waitangi,9952,155, +1,1950,249344,2317,Waitangi,9952,155, +1,1951,249344,2317,Waitangi,9952,155, +1,1952,249856,2317,Waitangi,10019,155, +1,1953,249856,2317,Waitangi,10019,155, +1,1954,249856,2317,Waitangi,10019,155, +1,1955,249856,2317,Waitangi,10019,155, +1,1956,250368,2317,Waitangi,10086,155, +1,1957,250368,2317,Waitangi,10086,155, +1,1958,250368,2317,Waitangi,10086,155, +1,1959,250368,2317,Waitangi,10086,155, +1,1960,250880,2317,Waitangi,10153,155, +1,1961,250880,2317,Waitangi,10153,155, +1,1962,250880,2317,Waitangi,10153,155, +1,1963,250880,2317,Waitangi,10153,155, +1,1964,251392,2317,Waitangi,10220,155, +1,1965,251392,2317,Waitangi,10220,155, +1,1966,251392,2317,Waitangi,10220,155, +1,1967,251392,2317,Waitangi,10220,155, +1,1968,251904,2317,Waitangi,10287,155, +1,1969,251904,2317,Waitangi,10287,155, +1,1970,251904,2317,Waitangi,10287,155, +1,1971,251904,2317,Waitangi,10287,155, +1,1972,252416,2317,Waitangi,10354,155, +1,1973,252416,2317,Waitangi,10354,155, +1,1974,252416,2317,Waitangi,10354,155, +1,1975,252416,2317,Waitangi,10354,155, +1,1976,252928,2317,Waitangi,10421,155, +1,1977,252928,2317,Waitangi,10421,155, +1,1978,252928,2317,Waitangi,10421,155, +1,1979,252928,2317,Waitangi,10421,155, +1,1980,253440,2317,Waitangi,10488,155, +1,1981,253440,2317,Waitangi,10488,155, +1,1982,253440,2317,Waitangi,10488,155, +1,1983,253440,2317,Waitangi,10488,155, +1,1984,253952,2317,Waitangi,10555,155, +1,1985,253952,2317,Waitangi,10555,155, +1,1986,253952,2317,Waitangi,10555,155, +1,1987,253952,2317,Waitangi,10555,155, +1,1988,254464,2317,Waitangi,10622,155, +1,1989,254464,2317,Waitangi,10622,155, +1,1990,254464,2317,Waitangi,10622,155, +1,1991,254464,2317,Waitangi,10622,155, +1,1992,254976,2317,Waitangi,10689,155, +1,1993,254976,2317,Waitangi,10689,155, +1,1994,254976,2317,Waitangi,10689,155, +1,1995,254976,2317,Waitangi,10689,155, +1,1996,255488,2317,Waitangi,10756,155, +1,1997,255488,2317,Waitangi,10756,155, +1,1998,255488,2317,Waitangi,10756,155, +1,1999,255488,2317,Waitangi,10756,155, +1,2000,256000,2317,Waitangi,10823,155, +1,2001,256000,2317,Waitangi,10823,155, +1,2002,256000,2317,Waitangi,10823,155, +1,2003,256000,2317,Waitangi,10823,155, +1,2004,256512,2317,Waitangi,10890,155, +1,2005,256512,2317,Waitangi,10890,155, +1,2006,256512,2317,Waitangi,10890,155, +1,2007,256512,2317,Waitangi,10890,155, +1,2008,257024,2317,Waitangi,10957,155, +1,2009,257024,2317,Waitangi,10957,155, +1,2010,257024,2317,Waitangi,10957,155, +1,2011,257024,2317,Waitangi,10957,155, +1,2012,257536,2317,Waitangi,11024,155, +1,2013,257536,2317,Waitangi,11024,155, +1,2014,257536,2317,Waitangi,11024,155, +1,2015,257536,2317,Waitangi,11024,155, +1,2016,258048,2317,Waitangi,11091,155, +1,2017,258048,2317,Waitangi,11091,155, +1,2018,258048,2317,Waitangi,11091,155, +1,2019,258048,2317,Waitangi,11091,155, +1,2020,258560,2317,Waitangi,11158,155, +1,2021,258560,2317,Waitangi,11158,155, +1,2022,258560,2317,Waitangi,11158,155, +1,2023,258560,2317,Waitangi,11158,155, +1,2024,259072,2317,Waitangi,11225,155, +1,2025,259072,2317,Waitangi,11225,155, +1,2026,259072,2317,Waitangi,11225,155, +1,2027,259072,2317,Waitangi,11225,155, +1,2028,259584,2317,Waitangi,11292,155, +1,2029,259584,2317,Waitangi,11292,155, +1,2030,259584,2317,Waitangi,11292,155, +1,2031,259584,2317,Waitangi,11292,155, +1,2032,260096,2317,Waitangi,11359,155, +1,2033,260096,2317,Waitangi,11359,155, +1,2034,260096,2317,Waitangi,11359,155, +1,2035,260096,2317,Waitangi,11359,155, +1,2036,260608,2317,Waitangi,11426,155, +1,2037,260608,2317,Waitangi,11426,155, +1,2038,260608,2317,Waitangi,11426,155, +1,2039,260608,2317,Waitangi,11426,155, +1,2040,261120,2317,Waitangi,11493,155, +1,2041,261120,2317,Waitangi,11493,155, +1,2042,261120,2317,Waitangi,11493,155, +1,2043,261120,2317,Waitangi,11493,155, +1,2044,261632,2317,Waitangi,11560,155, +1,2045,261632,2317,Waitangi,11560,155, +1,2046,261632,2317,Waitangi,11560,155, +1,2047,261632,2317,Waitangi,11560,155, +2,0,0,6919,Anchorage,1,235, +2,1,0,6919,Anchorage,1,235, +2,2,0,6919,Anchorage,1,235, +2,3,0,6919,Anchorage,1,235, +2,4,512,6919,Anchorage,56,235, +2,5,512,6919,Anchorage,56,235, +2,6,512,6919,Anchorage,56,235, +2,7,512,6919,Anchorage,56,235, +2,8,1024,6919,Anchorage,111,235, +2,9,1024,6919,Anchorage,111,235, +2,10,1024,6919,Anchorage,111,235, +2,11,1024,6919,Anchorage,111,235, +2,12,1536,6919,Anchorage,166,235, +2,13,1536,6919,Anchorage,166,235, +2,14,1536,6919,Anchorage,166,235, +2,15,1536,6919,Anchorage,166,235, +2,16,2048,6919,Anchorage,221,235, +2,17,2048,6919,Anchorage,221,235, +2,18,2048,6919,Anchorage,221,235, +2,19,2048,6919,Anchorage,221,235, +2,20,2560,6919,Anchorage,276,235, +2,21,2560,6919,Anchorage,276,235, +2,22,2560,6919,Anchorage,276,235, +2,23,2560,6919,Anchorage,276,235, +2,24,3072,6919,Anchorage,331,235, +2,25,3072,6919,Anchorage,331,235, +2,26,3072,6919,Anchorage,331,235, +2,27,3072,6919,Anchorage,331,235, +2,28,3584,6919,Anchorage,386,235, +2,29,3584,6919,Anchorage,386,235, +2,30,3584,6919,Anchorage,386,235, +2,31,3584,6919,Anchorage,386,235, +2,32,4096,6919,Anchorage,441,235, +2,33,4096,6919,Anchorage,441,235, +2,34,4096,6919,Anchorage,441,235, +2,35,4096,6919,Anchorage,441,235, +2,36,4608,6919,Anchorage,496,235, +2,37,4608,6919,Anchorage,496,235, +2,38,4608,6919,Anchorage,496,235, +2,39,4608,6919,Anchorage,496,235, +2,40,5120,6919,Anchorage,551,235, +2,41,5120,6919,Anchorage,551,235, +2,42,5120,6919,Anchorage,551,235, +2,43,5120,6919,Anchorage,551,235, +2,44,5632,6919,Anchorage,606,235, +2,45,5632,6919,Anchorage,606,235, +2,46,5632,6919,Anchorage,606,235, +2,47,5632,6919,Anchorage,606,235, +2,48,6144,6919,Anchorage,661,235, +2,49,6144,6919,Anchorage,661,235, +2,50,6144,6919,Anchorage,661,235, +2,51,6144,6919,Anchorage,661,235, +2,52,6656,6919,Anchorage,716,235, +2,53,6656,6919,Anchorage,716,235, +2,54,6656,6919,Anchorage,716,235, +2,55,6656,6919,Anchorage,716,235, +2,56,7168,6919,Anchorage,771,235, +2,57,7168,6919,Anchorage,771,235, +2,58,7168,6919,Anchorage,771,235, +2,59,7168,6919,Anchorage,771,235, +2,60,7680,6919,Anchorage,826,235, +2,61,7680,6919,Anchorage,826,235, +2,62,7680,6919,Anchorage,826,235, +2,63,7680,6919,Anchorage,826,235, +2,64,8192,6919,Anchorage,881,235, +2,65,8192,6919,Anchorage,881,235, +2,66,8192,6919,Anchorage,881,235, +2,67,8192,6919,Anchorage,881,235, +2,68,8704,6919,Anchorage,936,235, +2,69,8704,6919,Anchorage,936,235, +2,70,8704,6919,Anchorage,936,235, +2,71,8704,6919,Anchorage,936,235, +2,72,9216,6919,Anchorage,991,235, +2,73,9216,6919,Anchorage,991,235, +2,74,9216,6919,Anchorage,991,235, +2,75,9216,6919,Anchorage,991,235, +2,76,9728,6919,Anchorage,1046,235, +2,77,9728,6919,Anchorage,1046,235, +2,78,9728,6919,Anchorage,1046,235, +2,79,9728,6919,Anchorage,1046,235, +2,80,10240,6919,Anchorage,1101,235, +2,81,10240,6919,Anchorage,1101,235, +2,82,10240,6919,Anchorage,1101,235, +2,83,10240,6919,Anchorage,1101,235, +2,84,10752,6919,Anchorage,1156,235, +2,85,10752,6919,Anchorage,1156,235, +2,86,10752,6919,Anchorage,1156,235, +2,87,10752,6919,Anchorage,1156,235, +2,88,11264,6919,Anchorage,1211,235, +2,89,11264,6919,Anchorage,1211,235, +2,90,11264,6919,Anchorage,1211,235, +2,91,11264,6919,Anchorage,1211,235, +2,92,11776,6919,Anchorage,1266,235, +2,93,11776,6919,Anchorage,1266,235, +2,94,11776,6919,Anchorage,1266,235, +2,95,11776,6919,Anchorage,1266,235, +2,96,12288,6919,Anchorage,1321,235, +2,97,12288,6919,Anchorage,1321,235, +2,98,12288,6919,Anchorage,1321,235, +2,99,12288,6919,Anchorage,1321,235, +2,100,12800,6919,Anchorage,1376,235, +2,101,12800,6919,Anchorage,1376,235, +2,102,12800,6919,Anchorage,1376,235, +2,103,12800,6919,Anchorage,1376,235, +2,104,13312,6919,Anchorage,1431,235, +2,105,13312,6919,Anchorage,1431,235, +2,106,13312,6919,Anchorage,1431,235, +2,107,13312,6919,Anchorage,1431,235, +2,108,13824,6919,Anchorage,1486,235, +2,109,13824,6919,Anchorage,1486,235, +2,110,13824,6919,Anchorage,1486,235, +2,111,13824,6919,Anchorage,1486,235, +2,112,14336,6919,Anchorage,1541,235, +2,113,14336,6919,Anchorage,1541,235, +2,114,14336,6919,Anchorage,1541,235, +2,115,14336,6919,Anchorage,1541,235, +2,116,14848,6919,Anchorage,1596,235, +2,117,14848,6919,Anchorage,1596,235, +2,118,14848,6919,Anchorage,1596,235, +2,119,14848,6919,Anchorage,1596,235, +2,120,15360,6919,Anchorage,1651,235, +2,121,15360,6919,Anchorage,1651,235, +2,122,15360,6919,Anchorage,1651,235, +2,123,15360,6919,Anchorage,1651,235, +2,124,15872,6919,Anchorage,1706,235, +2,125,15872,6919,Anchorage,1706,235, +2,126,15872,6919,Anchorage,1706,235, +2,127,15872,6919,Anchorage,1706,235, +2,128,16384,6919,Anchorage,1761,235, +2,129,16384,6919,Anchorage,1761,235, +2,130,16384,6919,Anchorage,1761,235, +2,131,16384,6919,Anchorage,1761,235, +2,132,16896,6919,Anchorage,1816,235, +2,133,16896,6919,Anchorage,1816,235, +2,134,16896,6919,Anchorage,1816,235, +2,135,16896,6919,Anchorage,1816,235, +2,136,17408,6919,Anchorage,1871,235, +2,137,17408,6919,Anchorage,1871,235, +2,138,17408,6919,Anchorage,1871,235, +2,139,17408,6919,Anchorage,1871,235, +2,140,17920,6919,Anchorage,1926,235, +2,141,17920,6919,Anchorage,1926,235, +2,142,17920,6919,Anchorage,1926,235, +2,143,17920,6919,Anchorage,1926,235, +2,144,18432,6919,Anchorage,1981,235, +2,145,18432,6919,Anchorage,1981,235, +2,146,18432,6919,Anchorage,1981,235, +2,147,18432,6919,Anchorage,1981,235, +2,148,18944,6919,Anchorage,2036,235, +2,149,18944,6919,Anchorage,2036,235, +2,150,18944,6919,Anchorage,2036,235, +2,151,18944,6919,Anchorage,2036,235, +2,152,19456,6919,Anchorage,2091,235, +2,153,19456,6919,Anchorage,2091,235, +2,154,19456,6919,Anchorage,2091,235, +2,155,19456,6919,Anchorage,2091,235, +2,156,19968,6919,Anchorage,2146,235, +2,157,19968,6919,Anchorage,2146,235, +2,158,19968,6919,Anchorage,2146,235, +2,159,19968,6919,Anchorage,2146,235, +2,160,20480,6919,Anchorage,2201,235, +2,161,20480,6919,Anchorage,2201,235, +2,162,20480,6919,Anchorage,2201,235, +2,163,20480,6919,Anchorage,2201,235, +2,164,20992,6919,Anchorage,2256,235, +2,165,20992,6919,Anchorage,2256,235, +2,166,20992,6919,Anchorage,2256,235, +2,167,20992,6919,Anchorage,2256,235, +2,168,21504,6919,Anchorage,2311,235, +2,169,21504,6919,Anchorage,2311,235, +2,170,21504,6919,Anchorage,2311,235, +2,171,21504,6919,Anchorage,2311,235, +2,172,22016,6919,Anchorage,2366,235, +2,173,22016,6919,Anchorage,2366,235, +2,174,22016,6919,Anchorage,2366,235, +2,175,22016,6919,Anchorage,2366,235, +2,176,22528,6919,Anchorage,2421,235, +2,177,22528,6919,Anchorage,2421,235, +2,178,22528,6919,Anchorage,2421,235, +2,179,22528,6919,Anchorage,2421,235, +2,180,23040,6919,Anchorage,2476,235, +2,181,23040,6919,Anchorage,2476,235, +2,182,23040,6919,Anchorage,2476,235, +2,183,23040,6919,Anchorage,2476,235, +2,184,23552,6919,Anchorage,2531,235, +2,185,23552,6919,Anchorage,2531,235, +2,186,23552,6919,Anchorage,2531,235, +2,187,23552,6919,Anchorage,2531,235, +2,188,24064,6919,Anchorage,2586,235, +2,189,24064,6919,Anchorage,2586,235, +2,190,24064,6919,Anchorage,2586,235, +2,191,24064,6919,Anchorage,2586,235, +2,192,24576,6919,Anchorage,2641,235, +2,193,24576,6919,Anchorage,2641,235, +2,194,24576,6919,Anchorage,2641,235, +2,195,24576,6919,Anchorage,2641,235, +2,196,25088,6919,Anchorage,2696,235, +2,197,25088,6919,Anchorage,2696,235, +2,198,25088,6919,Anchorage,2696,235, +2,199,25088,6919,Anchorage,2696,235, +2,200,25600,6919,Anchorage,2751,235, +2,201,25600,6919,Anchorage,2751,235, +2,202,25600,6919,Anchorage,2751,235, +2,203,25600,6919,Anchorage,2751,235, +2,204,26112,6919,Anchorage,2806,235, +2,205,26112,6919,Anchorage,2806,235, +2,206,26112,6919,Anchorage,2806,235, +2,207,26112,6919,Anchorage,2806,235, +2,208,26624,6919,Anchorage,2861,235, +2,209,26624,6919,Anchorage,2861,235, +2,210,26624,6919,Anchorage,2861,235, +2,211,26624,6919,Anchorage,2861,235, +2,212,27136,6919,Anchorage,2916,235, +2,213,27136,6919,Anchorage,2916,235, +2,214,27136,6919,Anchorage,2916,235, +2,215,27136,6919,Anchorage,2916,235, +2,216,27648,6919,Anchorage,2971,235, +2,217,27648,6919,Anchorage,2971,235, +2,218,27648,6919,Anchorage,2971,235, +2,219,27648,6919,Anchorage,2971,235, +2,220,28160,6919,Anchorage,3026,235, +2,221,28160,6919,Anchorage,3026,235, +2,222,28160,6919,Anchorage,3026,235, +2,223,28160,6919,Anchorage,3026,235, +2,224,28672,6919,Anchorage,3081,235, +2,225,28672,6919,Anchorage,3081,235, +2,226,28672,6919,Anchorage,3081,235, +2,227,28672,6919,Anchorage,3081,235, +2,228,29184,6919,Anchorage,3136,235, +2,229,29184,6919,Anchorage,3136,235, +2,230,29184,6919,Anchorage,3136,235, +2,231,29184,6919,Anchorage,3136,235, +2,232,29696,6919,Anchorage,3191,235, +2,233,29696,6919,Anchorage,3191,235, +2,234,29696,6919,Anchorage,3191,235, +2,235,29696,6919,Anchorage,3191,235, +2,236,30208,6919,Anchorage,3246,235, +2,237,30208,6919,Anchorage,3246,235, +2,238,30208,6919,Anchorage,3246,235, +2,239,30208,6919,Anchorage,3246,235, +2,240,30720,6919,Anchorage,3301,235, +2,241,30720,6919,Anchorage,3301,235, +2,242,30720,6919,Anchorage,3301,235, +2,243,30720,6919,Anchorage,3301,235, +2,244,31232,6919,Anchorage,3356,235, +2,245,31232,6919,Anchorage,3356,235, +2,246,31232,6919,Anchorage,3356,235, +2,247,31232,6919,Anchorage,3356,235, +2,248,31744,6919,Anchorage,3411,235, +2,249,31744,6919,Anchorage,3411,235, +2,250,31744,6919,Anchorage,3411,235, +2,251,31744,6919,Anchorage,3411,235, +2,252,32256,6919,Anchorage,3466,235, +2,253,32256,6919,Anchorage,3466,235, +2,254,32256,6919,Anchorage,3466,235, +2,255,32256,6919,Anchorage,3466,235, +2,256,32768,6919,Anchorage,3521,235, +2,257,32768,6919,Anchorage,3521,235, +2,258,32768,6919,Anchorage,3521,235, +2,259,32768,6919,Anchorage,3521,235, +2,260,33280,6919,Anchorage,3576,235, +2,261,33280,6919,Anchorage,3576,235, +2,262,33280,6919,Anchorage,3576,235, +2,263,33280,6919,Anchorage,3576,235, +2,264,33792,6919,Anchorage,3631,235, +2,265,33792,6919,Anchorage,3631,235, +2,266,33792,6919,Anchorage,3631,235, +2,267,33792,6919,Anchorage,3631,235, +2,268,34304,6919,Anchorage,3686,235, +2,269,34304,6919,Anchorage,3686,235, +2,270,34304,6919,Anchorage,3686,235, +2,271,34304,6919,Anchorage,3686,235, +2,272,34816,6919,Anchorage,3741,235, +2,273,34816,6919,Anchorage,3741,235, +2,274,34816,6919,Anchorage,3741,235, +2,275,34816,6919,Anchorage,3741,235, +2,276,35328,6919,Anchorage,3796,235, +2,277,35328,6919,Anchorage,3796,235, +2,278,35328,6919,Anchorage,3796,235, +2,279,35328,6919,Anchorage,3796,235, +2,280,35840,6919,Anchorage,3851,235, +2,281,35840,6919,Anchorage,3851,235, +2,282,35840,6919,Anchorage,3851,235, +2,283,35840,6919,Anchorage,3851,235, +2,284,36352,6919,Anchorage,3906,235, +2,285,36352,6919,Anchorage,3906,235, +2,286,36352,6919,Anchorage,3906,235, +2,287,36352,6919,Anchorage,3906,235, +2,288,36864,6919,Anchorage,3961,235, +2,289,36864,6919,Anchorage,3961,235, +2,290,36864,6919,Anchorage,3961,235, +2,291,36864,6919,Anchorage,3961,235, +2,292,37376,6919,Anchorage,4016,235, +2,293,37376,6919,Anchorage,4016,235, +2,294,37376,6919,Anchorage,4016,235, +2,295,37376,6919,Anchorage,4016,235, +2,296,37888,6919,Anchorage,4071,235, +2,297,37888,6919,Anchorage,4071,235, +2,298,37888,6919,Anchorage,4071,235, +2,299,37888,6919,Anchorage,4071,235, +2,300,38400,6919,Anchorage,4126,235, +2,301,38400,6919,Anchorage,4126,235, +2,302,38400,6919,Anchorage,4126,235, +2,303,38400,6919,Anchorage,4126,235, +2,304,38912,6919,Anchorage,4181,235, +2,305,38912,6919,Anchorage,4181,235, +2,306,38912,6919,Anchorage,4181,235, +2,307,38912,6919,Anchorage,4181,235, +2,308,39424,6919,Anchorage,4236,235, +2,309,39424,6919,Anchorage,4236,235, +2,310,39424,6919,Anchorage,4236,235, +2,311,39424,6919,Anchorage,4236,235, +2,312,39936,6919,Anchorage,4291,235, +2,313,39936,6919,Anchorage,4291,235, +2,314,39936,6919,Anchorage,4291,235, +2,315,39936,6919,Anchorage,4291,235, +2,316,40448,6919,Anchorage,4346,235, +2,317,40448,6919,Anchorage,4346,235, +2,318,40448,6919,Anchorage,4346,235, +2,319,40448,6919,Anchorage,4346,235, +2,320,40960,6919,Anchorage,4401,235, +2,321,40960,6919,Anchorage,4401,235, +2,322,40960,6919,Anchorage,4401,235, +2,323,40960,6919,Anchorage,4401,235, +2,324,41472,6919,Anchorage,4456,235, +2,325,41472,6919,Anchorage,4456,235, +2,326,41472,6919,Anchorage,4456,235, +2,327,41472,6919,Anchorage,4456,235, +2,328,41984,6919,Anchorage,4510,235, +2,329,41984,6919,Anchorage,4510,235, +2,330,41984,6919,Anchorage,4510,235, +2,331,41984,6919,Anchorage,4510,235, +2,332,42496,6919,Anchorage,4564,235, +2,333,42496,6919,Anchorage,4564,235, +2,334,42496,6919,Anchorage,4564,235, +2,335,42496,6919,Anchorage,4564,235, +2,336,43008,6919,Anchorage,4618,235, +2,337,43008,6919,Anchorage,4618,235, +2,338,43008,6919,Anchorage,4618,235, +2,339,43008,6919,Anchorage,4618,235, +2,340,43520,6919,Anchorage,4672,235, +2,341,43520,6919,Anchorage,4672,235, +2,342,43520,6919,Anchorage,4672,235, +2,343,43520,6919,Anchorage,4672,235, +2,344,44032,6919,Anchorage,4726,235, +2,345,44032,6919,Anchorage,4726,235, +2,346,44032,6919,Anchorage,4726,235, +2,347,44032,6919,Anchorage,4726,235, +2,348,44544,6919,Anchorage,4780,235, +2,349,44544,6919,Anchorage,4780,235, +2,350,44544,6919,Anchorage,4780,235, +2,351,44544,6919,Anchorage,4780,235, +2,352,45056,6919,Anchorage,4834,235, +2,353,45056,6919,Anchorage,4834,235, +2,354,45056,6919,Anchorage,4834,235, +2,355,45056,6919,Anchorage,4834,235, +2,356,45568,6919,Anchorage,4888,235, +2,357,45568,6919,Anchorage,4888,235, +2,358,45568,6919,Anchorage,4888,235, +2,359,45568,6919,Anchorage,4888,235, +2,360,46080,6919,Anchorage,4942,235, +2,361,46080,6919,Anchorage,4942,235, +2,362,46080,6919,Anchorage,4942,235, +2,363,46080,6919,Anchorage,4942,235, +2,364,46592,6919,Anchorage,4996,235, +2,365,46592,6919,Anchorage,4996,235, +2,366,46592,6919,Anchorage,4996,235, +2,367,46592,6919,Anchorage,4996,235, +2,368,47104,6919,Anchorage,5050,235, +2,369,47104,6919,Anchorage,5050,235, +2,370,47104,6919,Anchorage,5050,235, +2,371,47104,6919,Anchorage,5050,235, +2,372,47616,6919,Anchorage,5104,235, +2,373,47616,6919,Anchorage,5104,235, +2,374,47616,6919,Anchorage,5104,235, +2,375,47616,6919,Anchorage,5104,235, +2,376,48128,6919,Anchorage,5158,235, +2,377,48128,6919,Anchorage,5158,235, +2,378,48128,6919,Anchorage,5158,235, +2,379,48128,6919,Anchorage,5158,235, +2,380,48640,6919,Anchorage,5212,235, +2,381,48640,6919,Anchorage,5212,235, +2,382,48640,6919,Anchorage,5212,235, +2,383,48640,6919,Anchorage,5212,235, +2,384,49152,6919,Anchorage,5266,235, +2,385,49152,6919,Anchorage,5266,235, +2,386,49152,6919,Anchorage,5266,235, +2,387,49152,6919,Anchorage,5266,235, +2,388,49664,6919,Anchorage,5320,235, +2,389,49664,6919,Anchorage,5320,235, +2,390,49664,6919,Anchorage,5320,235, +2,391,49664,6919,Anchorage,5320,235, +2,392,50176,6919,Anchorage,5374,235, +2,393,50176,6919,Anchorage,5374,235, +2,394,50176,6919,Anchorage,5374,235, +2,395,50176,6919,Anchorage,5374,235, +2,396,50688,6919,Anchorage,5428,235, +2,397,50688,6919,Anchorage,5428,235, +2,398,50688,6919,Anchorage,5428,235, +2,399,50688,6919,Anchorage,5428,235, +2,400,51200,6919,Anchorage,5482,235, +2,401,51200,6919,Anchorage,5482,235, +2,402,51200,6919,Anchorage,5482,235, +2,403,51200,6919,Anchorage,5482,235, +2,404,51712,6919,Anchorage,5536,235, +2,405,51712,6919,Anchorage,5536,235, +2,406,51712,6919,Anchorage,5536,235, +2,407,51712,6919,Anchorage,5536,235, +2,408,52224,6919,Anchorage,5590,235, +2,409,52224,6919,Anchorage,5590,235, +2,410,52224,6919,Anchorage,5590,235, +2,411,52224,6919,Anchorage,5590,235, +2,412,52736,6919,Anchorage,5644,235, +2,413,52736,6919,Anchorage,5644,235, +2,414,52736,6919,Anchorage,5644,235, +2,415,52736,6919,Anchorage,5644,235, +2,416,53248,6919,Anchorage,5698,235, +2,417,53248,6919,Anchorage,5698,235, +2,418,53248,6919,Anchorage,5698,235, +2,419,53248,6919,Anchorage,5698,235, +2,420,53760,6919,Anchorage,5752,235, +2,421,53760,6919,Anchorage,5752,235, +2,422,53760,6919,Anchorage,5752,235, +2,423,53760,6919,Anchorage,5752,235, +2,424,54272,6919,Anchorage,5806,235, +2,425,54272,6919,Anchorage,5806,235, +2,426,54272,6919,Anchorage,5806,235, +2,427,54272,6919,Anchorage,5806,235, +2,428,54784,6919,Anchorage,5860,235, +2,429,54784,6919,Anchorage,5860,235, +2,430,54784,6919,Anchorage,5860,235, +2,431,54784,6919,Anchorage,5860,235, +2,432,55296,6919,Anchorage,5914,235, +2,433,55296,6919,Anchorage,5914,235, +2,434,55296,6919,Anchorage,5914,235, +2,435,55296,6919,Anchorage,5914,235, +2,436,55808,6919,Anchorage,5968,235, +2,437,55808,6919,Anchorage,5968,235, +2,438,55808,6919,Anchorage,5968,235, +2,439,55808,6919,Anchorage,5968,235, +2,440,56320,6919,Anchorage,6022,235, +2,441,56320,6919,Anchorage,6022,235, +2,442,56320,6919,Anchorage,6022,235, +2,443,56320,6919,Anchorage,6022,235, +2,444,56832,6919,Anchorage,6076,235, +2,445,56832,6919,Anchorage,6076,235, +2,446,56832,6919,Anchorage,6076,235, +2,447,56832,6919,Anchorage,6076,235, +2,448,57344,6919,Anchorage,6130,235, +2,449,57344,6919,Anchorage,6130,235, +2,450,57344,6919,Anchorage,6130,235, +2,451,57344,6919,Anchorage,6130,235, +2,452,57856,6919,Anchorage,6184,235, +2,453,57856,6919,Anchorage,6184,235, +2,454,57856,6919,Anchorage,6184,235, +2,455,57856,6919,Anchorage,6184,235, +2,456,58368,6919,Anchorage,6238,235, +2,457,58368,6919,Anchorage,6238,235, +2,458,58368,6919,Anchorage,6238,235, +2,459,58368,6919,Anchorage,6238,235, +2,460,58880,6919,Anchorage,6292,235, +2,461,58880,6919,Anchorage,6292,235, +2,462,58880,6919,Anchorage,6292,235, +2,463,58880,6919,Anchorage,6292,235, +2,464,59392,6919,Anchorage,6346,235, +2,465,59392,6919,Anchorage,6346,235, +2,466,59392,6919,Anchorage,6346,235, +2,467,59392,6919,Anchorage,6346,235, +2,468,59904,6919,Anchorage,6400,235, +2,469,59904,6919,Anchorage,6400,235, +2,470,59904,6919,Anchorage,6400,235, +2,471,59904,6919,Anchorage,6400,235, +2,472,60416,6919,Anchorage,6454,235, +2,473,60416,6919,Anchorage,6454,235, +2,474,60416,6919,Anchorage,6454,235, +2,475,60416,6919,Anchorage,6454,235, +2,476,60928,6919,Anchorage,6508,235, +2,477,60928,6919,Anchorage,6508,235, +2,478,60928,6919,Anchorage,6508,235, +2,479,60928,6919,Anchorage,6508,235, +2,480,61440,6919,Anchorage,6562,235, +2,481,61440,6919,Anchorage,6562,235, +2,482,61440,6919,Anchorage,6562,235, +2,483,61440,6919,Anchorage,6562,235, +2,484,61952,6919,Anchorage,6616,235, +2,485,61952,6919,Anchorage,6616,235, +2,486,61952,6919,Anchorage,6616,235, +2,487,61952,6919,Anchorage,6616,235, +2,488,62464,6919,Anchorage,6670,235, +2,489,62464,6919,Anchorage,6670,235, +2,490,62464,6919,Anchorage,6670,235, +2,491,62464,6919,Anchorage,6670,235, +2,492,62976,6919,Anchorage,6724,235, +2,493,62976,6919,Anchorage,6724,235, +2,494,62976,6919,Anchorage,6724,235, +2,495,62976,6919,Anchorage,6724,235, +2,496,63488,6919,Anchorage,6778,235, +2,497,63488,6919,Anchorage,6778,235, +2,498,63488,6919,Anchorage,6778,235, +2,499,63488,6919,Anchorage,6778,235, +2,500,64000,6919,Anchorage,6832,235, +2,501,64000,6919,Anchorage,6832,235, +2,502,64000,6919,Anchorage,6832,235, +2,503,64000,6919,Anchorage,6832,235, +2,504,64512,6919,Anchorage,6886,235, +2,505,64512,6919,Anchorage,6886,235, +2,506,64512,6919,Anchorage,6886,235, +2,507,64512,6919,Anchorage,6886,235, +2,508,65024,6919,Anchorage,6940,235, +2,509,65024,6919,Anchorage,6940,235, +2,510,65024,6919,Anchorage,6940,235, +2,511,65024,6919,Anchorage,6940,235, +2,512,65536,6919,Anchorage,6994,235, +2,513,65536,6919,Anchorage,6994,235, +2,514,65536,6919,Anchorage,6994,235, +2,515,65536,6919,Anchorage,6994,235, +2,516,66048,6919,Anchorage,7048,235, +2,517,66048,6919,Anchorage,7048,235, +2,518,66048,6919,Anchorage,7048,235, +2,519,66048,6919,Anchorage,7048,235, +2,520,66560,6919,Anchorage,7102,235, +2,521,66560,6919,Anchorage,7102,235, +2,522,66560,6919,Anchorage,7102,235, +2,523,66560,6919,Anchorage,7102,235, +2,524,67072,6919,Anchorage,7156,235, +2,525,67072,6919,Anchorage,7156,235, +2,526,67072,6919,Anchorage,7156,235, +2,527,67072,6919,Anchorage,7156,235, +2,528,67584,6919,Anchorage,7210,235, +2,529,67584,6919,Anchorage,7210,235, +2,530,67584,6919,Anchorage,7210,235, +2,531,67584,6919,Anchorage,7210,235, +2,532,68096,6919,Anchorage,7264,235, +2,533,68096,6919,Anchorage,7264,235, +2,534,68096,6919,Anchorage,7264,235, +2,535,68096,6919,Anchorage,7264,235, +2,536,68608,6919,Anchorage,7318,235, +2,537,68608,6919,Anchorage,7318,235, +2,538,68608,6919,Anchorage,7318,235, +2,539,68608,6919,Anchorage,7318,235, +2,540,69120,6919,Anchorage,7372,235, +2,541,69120,6919,Anchorage,7372,235, +2,542,69120,6919,Anchorage,7372,235, +2,543,69120,6919,Anchorage,7372,235, +2,544,69632,6919,Anchorage,7426,235, +2,545,69632,6919,Anchorage,7426,235, +2,546,69632,6919,Anchorage,7426,235, +2,547,69632,6919,Anchorage,7426,235, +2,548,70144,6919,Anchorage,7480,235, +2,549,70144,6919,Anchorage,7480,235, +2,550,70144,6919,Anchorage,7480,235, +2,551,70144,6919,Anchorage,7480,235, +2,552,70656,6919,Anchorage,7534,235, +2,553,70656,6919,Anchorage,7534,235, +2,554,70656,6919,Anchorage,7534,235, +2,555,70656,6919,Anchorage,7534,235, +2,556,71168,6919,Anchorage,7588,235, +2,557,71168,6919,Anchorage,7588,235, +2,558,71168,6919,Anchorage,7588,235, +2,559,71168,6919,Anchorage,7588,235, +2,560,71680,6919,Anchorage,7642,235, +2,561,71680,6919,Anchorage,7642,235, +2,562,71680,6919,Anchorage,7642,235, +2,563,71680,6919,Anchorage,7642,235, +2,564,72192,6919,Anchorage,7696,235, +2,565,72192,6919,Anchorage,7696,235, +2,566,72192,6919,Anchorage,7696,235, +2,567,72192,6919,Anchorage,7696,235, +2,568,72704,6919,Anchorage,7750,235, +2,569,72704,6919,Anchorage,7750,235, +2,570,72704,6919,Anchorage,7750,235, +2,571,72704,6919,Anchorage,7750,235, +2,572,73216,6919,Anchorage,7804,235, +2,573,73216,6919,Anchorage,7804,235, +2,574,73216,6919,Anchorage,7804,235, +2,575,73216,6919,Anchorage,7804,235, +2,576,73728,6919,Anchorage,7858,235, +2,577,73728,6919,Anchorage,7858,235, +2,578,73728,6919,Anchorage,7858,235, +2,579,73728,6919,Anchorage,7858,235, +2,580,74240,6919,Anchorage,7912,235, +2,581,74240,6919,Anchorage,7912,235, +2,582,74240,6919,Anchorage,7912,235, +2,583,74240,6919,Anchorage,7912,235, +2,584,74752,6919,Anchorage,7966,235, +2,585,74752,6919,Anchorage,7966,235, +2,586,74752,6919,Anchorage,7966,235, +2,587,74752,6919,Anchorage,7966,235, +2,588,75264,6919,Anchorage,8020,235, +2,589,75264,6919,Anchorage,8020,235, +2,590,75264,6919,Anchorage,8020,235, +2,591,75264,6919,Anchorage,8020,235, +2,592,75776,6919,Anchorage,8074,235, +2,593,75776,6919,Anchorage,8074,235, +2,594,75776,6919,Anchorage,8074,235, +2,595,75776,6919,Anchorage,8074,235, +2,596,76288,6919,Anchorage,8128,235, +2,597,76288,6919,Anchorage,8128,235, +2,598,76288,6919,Anchorage,8128,235, +2,599,76288,6919,Anchorage,8128,235, +2,600,76800,6919,Anchorage,8182,235, +2,601,76800,6919,Anchorage,8182,235, +2,602,76800,6919,Anchorage,8182,235, +2,603,76800,6919,Anchorage,8182,235, +2,604,77312,6919,Anchorage,8236,235, +2,605,77312,6919,Anchorage,8236,235, +2,606,77312,6919,Anchorage,8236,235, +2,607,77312,6919,Anchorage,8236,235, +2,608,77824,6919,Anchorage,8290,235, +2,609,77824,6919,Anchorage,8290,235, +2,610,77824,6919,Anchorage,8290,235, +2,611,77824,6919,Anchorage,8290,235, +2,612,78336,6919,Anchorage,8344,235, +2,613,78336,6919,Anchorage,8344,235, +2,614,78336,6919,Anchorage,8344,235, +2,615,78336,6919,Anchorage,8344,235, +2,616,78848,6919,Anchorage,8398,235, +2,617,78848,6919,Anchorage,8398,235, +2,618,78848,6919,Anchorage,8398,235, +2,619,78848,6919,Anchorage,8398,235, +2,620,79360,6919,Anchorage,8452,235, +2,621,79360,6919,Anchorage,8452,235, +2,622,79360,6919,Anchorage,8452,235, +2,623,79360,6919,Anchorage,8452,235, +2,624,79872,6919,Anchorage,8506,235, +2,625,79872,6919,Anchorage,8506,235, +2,626,79872,6919,Anchorage,8506,235, +2,627,79872,6919,Anchorage,8506,235, +2,628,80384,6919,Anchorage,8560,235, +2,629,80384,6919,Anchorage,8560,235, +2,630,80384,6919,Anchorage,8560,235, +2,631,80384,6919,Anchorage,8560,235, +2,632,80896,6919,Anchorage,8613,235, +2,633,80896,6919,Anchorage,8613,235, +2,634,80896,6919,Anchorage,8613,235, +2,635,80896,6919,Anchorage,8613,235, +2,636,81408,6919,Anchorage,8666,235, +2,637,81408,6919,Anchorage,8666,235, +2,638,81408,6919,Anchorage,8666,235, +2,639,81408,6919,Anchorage,8666,235, +2,640,81920,6919,Anchorage,8719,235, +2,641,81920,6919,Anchorage,8719,235, +2,642,81920,6919,Anchorage,8719,235, +2,643,81920,6919,Anchorage,8719,235, +2,644,82432,6919,Anchorage,8772,235, +2,645,82432,6919,Anchorage,8772,235, +2,646,82432,6919,Anchorage,8772,235, +2,647,82432,6919,Anchorage,8772,235, +2,648,82944,6919,Anchorage,8825,235, +2,649,82944,6919,Anchorage,8825,235, +2,650,82944,6919,Anchorage,8825,235, +2,651,82944,6919,Anchorage,8825,235, +2,652,83456,6919,Anchorage,8878,235, +2,653,83456,6919,Anchorage,8878,235, +2,654,83456,6919,Anchorage,8878,235, +2,655,83456,6919,Anchorage,8878,235, +2,656,83968,6919,Anchorage,8931,235, +2,657,83968,6919,Anchorage,8931,235, +2,658,83968,6919,Anchorage,8931,235, +2,659,83968,6919,Anchorage,8931,235, +2,660,84480,6919,Anchorage,8984,235, +2,661,84480,6919,Anchorage,8984,235, +2,662,84480,6919,Anchorage,8984,235, +2,663,84480,6919,Anchorage,8984,235, +2,664,84992,6919,Anchorage,9037,235, +2,665,84992,6919,Anchorage,9037,235, +2,666,84992,6919,Anchorage,9037,235, +2,667,84992,6919,Anchorage,9037,235, +2,668,85504,6919,Anchorage,9089,235, +2,669,85504,6919,Anchorage,9089,235, +2,670,85504,6919,Anchorage,9089,235, +2,671,85504,6919,Anchorage,9089,235, +2,672,86016,6919,Anchorage,9141,235, +2,673,86016,6919,Anchorage,9141,235, +2,674,86016,6919,Anchorage,9141,235, +2,675,86016,6919,Anchorage,9141,235, +2,676,86528,6919,Anchorage,9193,235, +2,677,86528,6919,Anchorage,9193,235, +2,678,86528,6919,Anchorage,9193,235, +2,679,86528,6919,Anchorage,9193,235, +2,680,87040,6919,Anchorage,9245,235, +2,681,87040,6919,Anchorage,9245,235, +2,682,87040,6919,Anchorage,9245,235, +2,683,87040,6919,Anchorage,9245,235, +2,684,87552,6919,Anchorage,9297,235, +2,685,87552,6919,Anchorage,9297,235, +2,686,87552,6919,Anchorage,9297,235, +2,687,87552,6919,Anchorage,9297,235, +2,688,88064,6919,Anchorage,9349,235, +2,689,88064,6919,Anchorage,9349,235, +2,690,88064,6919,Anchorage,9349,235, +2,691,88064,6919,Anchorage,9349,235, +2,692,88576,6919,Anchorage,9401,235, +2,693,88576,6919,Anchorage,9401,235, +2,694,88576,6919,Anchorage,9401,235, +2,695,88576,6919,Anchorage,9401,235, +2,696,89088,6919,Anchorage,9453,235, +2,697,89088,6919,Anchorage,9453,235, +2,698,89088,6919,Anchorage,9453,235, +2,699,89088,6919,Anchorage,9453,235, +2,700,89600,6919,Anchorage,9505,235, +2,701,89600,6919,Anchorage,9505,235, +2,702,89600,6919,Anchorage,9505,235, +2,703,89600,6919,Anchorage,9505,235, +2,704,90112,6919,Anchorage,9556,235, +2,705,90112,6919,Anchorage,9556,235, +2,706,90112,6919,Anchorage,9556,235, +2,707,90112,6919,Anchorage,9556,235, +2,708,90624,6919,Anchorage,9607,235, +2,709,90624,6919,Anchorage,9607,235, +2,710,90624,6919,Anchorage,9607,235, +2,711,90624,6919,Anchorage,9607,235, +2,712,91136,6919,Anchorage,9658,235, +2,713,91136,6919,Anchorage,9658,235, +2,714,91136,6919,Anchorage,9658,235, +2,715,91136,6919,Anchorage,9658,235, +2,716,91648,6919,Anchorage,9709,235, +2,717,91648,6919,Anchorage,9709,235, +2,718,91648,6919,Anchorage,9709,235, +2,719,91648,6919,Anchorage,9709,235, +2,720,92160,6919,Anchorage,9760,235, +2,721,92160,6919,Anchorage,9760,235, +2,722,92160,6919,Anchorage,9760,235, +2,723,92160,6919,Anchorage,9760,235, +2,724,92672,3471,Honolulu,1,235, +2,725,92672,3471,Honolulu,1,235, +2,726,92672,3471,Honolulu,1,235, +2,727,92672,3471,Honolulu,1,235, +2,728,93184,3471,Honolulu,4,235, +2,729,93184,3471,Honolulu,4,235, +2,730,93184,3471,Honolulu,4,235, +2,731,93184,3471,Honolulu,4,235, +2,732,93696,3471,Honolulu,11,235, +2,733,93696,3471,Honolulu,11,235, +2,734,93696,3471,Honolulu,11,235, +2,735,93696,3471,Honolulu,11,235, +2,736,94208,3471,Honolulu,21,235, +2,737,94208,3471,Honolulu,21,235, +2,738,94208,3471,Honolulu,21,235, +2,739,94208,3471,Honolulu,21,235, +2,740,94720,3471,Honolulu,35,235, +2,741,94720,3471,Honolulu,35,235, +2,742,94720,3471,Honolulu,35,235, +2,743,94720,3471,Honolulu,35,235, +2,744,95232,3471,Honolulu,53,235, +2,745,95232,3471,Honolulu,53,235, +2,746,95232,3471,Honolulu,53,235, +2,747,95232,3471,Honolulu,53,235, +2,748,95744,3471,Honolulu,74,235, +2,749,95744,3471,Honolulu,74,235, +2,750,95744,3471,Honolulu,74,235, +2,751,95744,3471,Honolulu,74,235, +2,752,96256,3471,Honolulu,99,235, +2,753,96256,3471,Honolulu,99,235, +2,754,96256,3471,Honolulu,99,235, +2,755,96256,3471,Honolulu,99,235, +2,756,96768,3471,Honolulu,128,235, +2,757,96768,3471,Honolulu,128,235, +2,758,96768,3471,Honolulu,128,235, +2,759,96768,3471,Honolulu,128,235, +2,760,97280,3471,Honolulu,160,235, +2,761,97280,3471,Honolulu,160,235, +2,762,97280,3471,Honolulu,160,235, +2,763,97280,3471,Honolulu,160,235, +2,764,97792,3471,Honolulu,196,235, +2,765,97792,3471,Honolulu,196,235, +2,766,97792,3471,Honolulu,196,235, +2,767,97792,3471,Honolulu,196,235, +2,768,98304,3471,Honolulu,236,235, +2,769,98304,3471,Honolulu,236,235, +2,770,98304,3471,Honolulu,236,235, +2,771,98304,3471,Honolulu,236,235, +2,772,98816,3471,Honolulu,280,235, +2,773,98816,3471,Honolulu,280,235, +2,774,98816,3471,Honolulu,280,235, +2,775,98816,3471,Honolulu,280,235, +2,776,99328,3471,Honolulu,327,235, +2,777,99328,3471,Honolulu,327,235, +2,778,99328,3471,Honolulu,327,235, +2,779,99328,3471,Honolulu,327,235, +2,780,99840,3471,Honolulu,377,235, +2,781,99840,3471,Honolulu,377,235, +2,782,99840,3471,Honolulu,377,235, +2,783,99840,3471,Honolulu,377,235, +2,784,100352,3471,Honolulu,428,235, +2,785,100352,3471,Honolulu,428,235, +2,786,100352,3471,Honolulu,428,235, +2,787,100352,3471,Honolulu,428,235, +2,788,100864,3471,Honolulu,479,235, +2,789,100864,3471,Honolulu,479,235, +2,790,100864,3471,Honolulu,479,235, +2,791,100864,3471,Honolulu,479,235, +2,792,101376,3471,Honolulu,530,235, +2,793,101376,3471,Honolulu,530,235, +2,794,101376,3471,Honolulu,530,235, +2,795,101376,3471,Honolulu,530,235, +2,796,101888,3471,Honolulu,582,235, +2,797,101888,3471,Honolulu,582,235, +2,798,101888,3471,Honolulu,582,235, +2,799,101888,3471,Honolulu,582,235, +2,800,102400,3471,Honolulu,634,235, +2,801,102400,3471,Honolulu,634,235, +2,802,102400,3471,Honolulu,634,235, +2,803,102400,3471,Honolulu,634,235, +2,804,102912,3471,Honolulu,687,235, +2,805,102912,3471,Honolulu,687,235, +2,806,102912,3471,Honolulu,687,235, +2,807,102912,3471,Honolulu,687,235, +2,808,103424,3471,Honolulu,740,235, +2,809,103424,3471,Honolulu,740,235, +2,810,103424,3471,Honolulu,740,235, +2,811,103424,3471,Honolulu,740,235, +2,812,103936,3471,Honolulu,793,235, +2,813,103936,3471,Honolulu,793,235, +2,814,103936,3471,Honolulu,793,235, +2,815,103936,3471,Honolulu,793,235, +2,816,104448,3471,Honolulu,847,235, +2,817,104448,3471,Honolulu,847,235, +2,818,104448,3471,Honolulu,847,235, +2,819,104448,3471,Honolulu,847,235, +2,820,104960,3471,Honolulu,901,235, +2,821,104960,3471,Honolulu,901,235, +2,822,104960,3471,Honolulu,901,235, +2,823,104960,3471,Honolulu,901,235, +2,824,105472,3471,Honolulu,956,235, +2,825,105472,3471,Honolulu,956,235, +2,826,105472,3471,Honolulu,956,235, +2,827,105472,3471,Honolulu,956,235, +2,828,105984,3471,Honolulu,1011,235, +2,829,105984,3471,Honolulu,1011,235, +2,830,105984,3471,Honolulu,1011,235, +2,831,105984,3471,Honolulu,1011,235, +2,832,106496,3471,Honolulu,1066,235, +2,833,106496,3471,Honolulu,1066,235, +2,834,106496,3471,Honolulu,1066,235, +2,835,106496,3471,Honolulu,1066,235, +2,836,107008,3471,Honolulu,1122,235, +2,837,107008,3471,Honolulu,1122,235, +2,838,107008,3471,Honolulu,1122,235, +2,839,107008,3471,Honolulu,1122,235, +2,840,107520,3471,Honolulu,1178,235, +2,841,107520,3471,Honolulu,1178,235, +2,842,107520,3471,Honolulu,1178,235, +2,843,107520,3471,Honolulu,1178,235, +2,844,108032,3471,Honolulu,1235,235, +2,845,108032,3471,Honolulu,1235,235, +2,846,108032,3471,Honolulu,1235,235, +2,847,108032,3471,Honolulu,1235,235, +2,848,108544,3471,Honolulu,1292,235, +2,849,108544,3471,Honolulu,1292,235, +2,850,108544,3471,Honolulu,1292,235, +2,851,108544,3471,Honolulu,1292,235, +2,852,109056,3471,Honolulu,1349,235, +2,853,109056,3471,Honolulu,1349,235, +2,854,109056,3471,Honolulu,1349,235, +2,855,109056,3471,Honolulu,1349,235, +2,856,109568,3471,Honolulu,1407,235, +2,857,109568,3471,Honolulu,1407,235, +2,858,109568,3471,Honolulu,1407,235, +2,859,109568,3471,Honolulu,1407,235, +2,860,110080,3471,Honolulu,1465,235, +2,861,110080,3471,Honolulu,1465,235, +2,862,110080,3471,Honolulu,1465,235, +2,863,110080,3471,Honolulu,1465,235, +2,864,110592,3471,Honolulu,1524,235, +2,865,110592,3471,Honolulu,1524,235, +2,866,110592,3471,Honolulu,1524,235, +2,867,110592,3471,Honolulu,1524,235, +2,868,111104,3471,Honolulu,1583,235, +2,869,111104,3471,Honolulu,1583,235, +2,870,111104,3471,Honolulu,1583,235, +2,871,111104,3471,Honolulu,1583,235, +2,872,111616,3471,Honolulu,1643,235, +2,873,111616,3471,Honolulu,1643,235, +2,874,111616,3471,Honolulu,1643,235, +2,875,111616,3471,Honolulu,1643,235, +2,876,112128,3471,Honolulu,1703,235, +2,877,112128,3471,Honolulu,1703,235, +2,878,112128,3471,Honolulu,1703,235, +2,879,112128,3471,Honolulu,1703,235, +2,880,112640,3471,Honolulu,1763,235, +2,881,112640,3471,Honolulu,1763,235, +2,882,112640,3471,Honolulu,1763,235, +2,883,112640,3471,Honolulu,1763,235, +2,884,113152,3471,Honolulu,1824,235, +2,885,113152,3471,Honolulu,1824,235, +2,886,113152,3471,Honolulu,1824,235, +2,887,113152,3471,Honolulu,1824,235, +2,888,113664,3471,Honolulu,1885,235, +2,889,113664,3471,Honolulu,1885,235, +2,890,113664,3471,Honolulu,1885,235, +2,891,113664,3471,Honolulu,1885,235, +2,892,114176,3471,Honolulu,1946,235, +2,893,114176,3471,Honolulu,1946,235, +2,894,114176,3471,Honolulu,1946,235, +2,895,114176,3471,Honolulu,1946,235, +2,896,114688,3471,Honolulu,2008,235, +2,897,114688,3471,Honolulu,2008,235, +2,898,114688,3471,Honolulu,2008,235, +2,899,114688,3471,Honolulu,2008,235, +2,900,115200,3471,Honolulu,2070,235, +2,901,115200,3471,Honolulu,2070,235, +2,902,115200,3471,Honolulu,2070,235, +2,903,115200,3471,Honolulu,2070,235, +2,904,115712,3471,Honolulu,2132,235, +2,905,115712,3471,Honolulu,2132,235, +2,906,115712,3471,Honolulu,2132,235, +2,907,115712,3471,Honolulu,2132,235, +2,908,116224,3471,Honolulu,2195,235, +2,909,116224,3471,Honolulu,2195,235, +2,910,116224,3471,Honolulu,2195,235, +2,911,116224,3471,Honolulu,2195,235, +2,912,116736,3471,Honolulu,2258,235, +2,913,116736,3471,Honolulu,2258,235, +2,914,116736,3471,Honolulu,2258,235, +2,915,116736,3471,Honolulu,2258,235, +2,916,117248,3471,Honolulu,2321,235, +2,917,117248,3471,Honolulu,2321,235, +2,918,117248,3471,Honolulu,2321,235, +2,919,117248,3471,Honolulu,2321,235, +2,920,117760,3471,Honolulu,2385,235, +2,921,117760,3471,Honolulu,2385,235, +2,922,117760,3471,Honolulu,2385,235, +2,923,117760,3471,Honolulu,2385,235, +2,924,118272,3471,Honolulu,2449,235, +2,925,118272,3471,Honolulu,2449,235, +2,926,118272,3471,Honolulu,2449,235, +2,927,118272,3471,Honolulu,2449,235, +2,928,118784,3471,Honolulu,2513,235, +2,929,118784,3471,Honolulu,2513,235, +2,930,118784,3471,Honolulu,2513,235, +2,931,118784,3471,Honolulu,2513,235, +2,932,119296,3471,Honolulu,2578,235, +2,933,119296,3471,Honolulu,2578,235, +2,934,119296,3471,Honolulu,2578,235, +2,935,119296,3471,Honolulu,2578,235, +2,936,119808,3471,Honolulu,2643,235, +2,937,119808,3471,Honolulu,2643,235, +2,938,119808,3471,Honolulu,2643,235, +2,939,119808,3471,Honolulu,2643,235, +2,940,120320,3471,Honolulu,2708,235, +2,941,120320,3471,Honolulu,2708,235, +2,942,120320,3471,Honolulu,2708,235, +2,943,120320,3471,Honolulu,2708,235, +2,944,120832,3471,Honolulu,2773,235, +2,945,120832,3471,Honolulu,2773,235, +2,946,120832,3471,Honolulu,2773,235, +2,947,120832,3471,Honolulu,2773,235, +2,948,121344,3208,Atafu Village,1,223, +2,949,121344,3208,Atafu Village,1,223, +2,950,121344,3208,Atafu Village,1,223, +2,951,121344,3208,Atafu Village,1,223, +2,952,121856,3208,Atafu Village,2,223, +2,953,121856,3208,Atafu Village,2,223, +2,954,121856,3208,Atafu Village,2,223, +2,955,121856,3208,Atafu Village,2,223, +2,956,122368,3208,Atafu Village,5,223, +2,957,122368,3208,Atafu Village,5,223, +2,958,122368,3208,Atafu Village,5,223, +2,959,122368,3208,Atafu Village,5,223, +2,960,122880,3208,Atafu Village,10,223, +2,961,122880,3208,Atafu Village,10,223, +2,962,122880,3208,Atafu Village,10,223, +2,963,122880,3208,Atafu Village,10,223, +2,964,123392,3208,Atafu Village,17,223, +2,965,123392,3208,Atafu Village,17,223, +2,966,123392,3208,Atafu Village,17,223, +2,967,123392,3208,Atafu Village,17,223, +2,968,123904,3208,Atafu Village,26,223, +2,969,123904,3208,Atafu Village,26,223, +2,970,123904,3208,Atafu Village,26,223, +2,971,123904,3208,Atafu Village,26,223, +2,972,124416,3208,Atafu Village,37,223, +2,973,124416,3208,Atafu Village,37,223, +2,974,124416,3208,Atafu Village,37,223, +2,975,124416,3208,Atafu Village,37,223, +2,976,124928,3208,Atafu Village,50,223, +2,977,124928,3208,Atafu Village,50,223, +2,978,124928,3208,Atafu Village,50,223, +2,979,124928,3208,Atafu Village,50,223, +2,980,125440,3208,Atafu Village,65,223, +2,981,125440,3208,Atafu Village,65,223, +2,982,125440,3208,Atafu Village,65,223, +2,983,125440,3208,Atafu Village,65,223, +2,984,125952,3208,Atafu Village,82,223, +2,985,125952,3208,Atafu Village,82,223, +2,986,125952,3208,Atafu Village,82,223, +2,987,125952,3208,Atafu Village,82,223, +2,988,126464,3208,Atafu Village,101,223, +2,989,126464,3208,Atafu Village,101,223, +2,990,126464,3208,Atafu Village,101,223, +2,991,126464,3208,Atafu Village,101,223, +2,992,126976,3208,Atafu Village,122,223, +2,993,126976,3208,Atafu Village,122,223, +2,994,126976,3208,Atafu Village,122,223, +2,995,126976,3208,Atafu Village,122,223, +2,996,127488,3208,Atafu Village,145,223, +2,997,127488,3208,Atafu Village,145,223, +2,998,127488,3208,Atafu Village,145,223, +2,999,127488,3208,Atafu Village,145,223, +2,1000,128000,3208,Atafu Village,170,223, +2,1001,128000,3208,Atafu Village,170,223, +2,1002,128000,3208,Atafu Village,170,223, +2,1003,128000,3208,Atafu Village,170,223, +2,1004,128512,3208,Atafu Village,194,223, +2,1005,128512,3208,Atafu Village,194,223, +2,1006,128512,3208,Atafu Village,194,223, +2,1007,128512,3208,Atafu Village,194,223, +2,1008,129024,3208,Atafu Village,218,223, +2,1009,129024,3208,Atafu Village,218,223, +2,1010,129024,3208,Atafu Village,218,223, +2,1011,129024,3208,Atafu Village,218,223, +2,1012,129536,3208,Atafu Village,241,223, +2,1013,129536,3208,Atafu Village,241,223, +2,1014,129536,3208,Atafu Village,241,223, +2,1015,129536,3208,Atafu Village,241,223, +2,1016,130048,3208,Atafu Village,263,223, +2,1017,130048,3208,Atafu Village,263,223, +2,1018,130048,3208,Atafu Village,263,223, +2,1019,130048,3208,Atafu Village,263,223, +2,1020,130560,3208,Atafu Village,285,223, +2,1021,130560,3208,Atafu Village,285,223, +2,1022,130560,3208,Atafu Village,285,223, +2,1023,130560,3208,Atafu Village,285,223, +2,1024,131072,3208,Atafu Village,306,223, +2,1025,131072,3208,Atafu Village,306,223, +2,1026,131072,3208,Atafu Village,306,223, +2,1027,131072,3208,Atafu Village,306,223, +2,1028,131584,3208,Atafu Village,326,223, +2,1029,131584,3208,Atafu Village,326,223, +2,1030,131584,3208,Atafu Village,326,223, +2,1031,131584,3208,Atafu Village,326,223, +2,1032,132096,3208,Atafu Village,346,223, +2,1033,132096,3208,Atafu Village,346,223, +2,1034,132096,3208,Atafu Village,346,223, +2,1035,132096,3208,Atafu Village,346,223, +2,1036,132608,3208,Atafu Village,365,223, +2,1037,132608,3208,Atafu Village,365,223, +2,1038,132608,3208,Atafu Village,365,223, +2,1039,132608,3208,Atafu Village,365,223, +2,1040,133120,3208,Atafu Village,383,223, +2,1041,133120,3208,Atafu Village,383,223, +2,1042,133120,3208,Atafu Village,383,223, +2,1043,133120,3208,Atafu Village,383,223, +2,1044,133632,3208,Atafu Village,401,223, +2,1045,133632,3208,Atafu Village,401,223, +2,1046,133632,3208,Atafu Village,401,223, +2,1047,133632,3208,Atafu Village,401,223, +2,1048,134144,3208,Atafu Village,418,223, +2,1049,134144,3208,Atafu Village,418,223, +2,1050,134144,3208,Atafu Village,418,223, +2,1051,134144,3208,Atafu Village,418,223, +2,1052,134656,3208,Atafu Village,434,223, +2,1053,134656,3208,Atafu Village,434,223, +2,1054,134656,3208,Atafu Village,434,223, +2,1055,134656,3208,Atafu Village,434,223, +2,1056,135168,3208,Atafu Village,450,223, +2,1057,135168,3208,Atafu Village,450,223, +2,1058,135168,3208,Atafu Village,450,223, +2,1059,135168,3208,Atafu Village,450,223, +2,1060,135680,3610,Mata-Utu,1,245, +2,1061,135680,3610,Mata-Utu,1,245, +2,1062,135680,3610,Mata-Utu,1,245, +2,1063,135680,3610,Mata-Utu,1,245, +2,1064,136192,3610,Mata-Utu,2,245, +2,1065,136192,3610,Mata-Utu,2,245, +2,1066,136192,3610,Mata-Utu,2,245, +2,1067,136192,3610,Mata-Utu,2,245, +2,1068,136704,3610,Mata-Utu,5,245, +2,1069,136704,3610,Mata-Utu,5,245, +2,1070,136704,3610,Mata-Utu,5,245, +2,1071,136704,3610,Mata-Utu,5,245, +2,1072,137216,3610,Mata-Utu,9,245, +2,1073,137216,3610,Mata-Utu,9,245, +2,1074,137216,3610,Mata-Utu,9,245, +2,1075,137216,3610,Mata-Utu,9,245, +2,1076,137728,3610,Mata-Utu,14,245, +2,1077,137728,3610,Mata-Utu,14,245, +2,1078,137728,3610,Mata-Utu,14,245, +2,1079,137728,3610,Mata-Utu,14,245, +2,1080,138240,3609,Leava,1,245, +2,1081,138240,3609,Leava,1,245, +2,1082,138240,3609,Leava,1,245, +2,1083,138240,3609,Leava,1,245, +2,1084,138752,3609,Leava,2,245, +2,1085,138752,3609,Leava,2,245, +2,1086,138752,3609,Leava,2,245, +2,1087,138752,3609,Leava,2,245, +2,1088,139264,3609,Leava,3,245, +2,1089,139264,3609,Leava,3,245, +2,1090,139264,3609,Leava,3,245, +2,1091,139264,3609,Leava,3,245, +2,1092,139776,3609,Leava,5,245, +2,1093,139776,3609,Leava,5,245, +2,1094,139776,3609,Leava,5,245, +2,1095,139776,3609,Leava,5,245, +2,1096,140288,3609,Leava,7,245, +2,1097,140288,3609,Leava,7,245, +2,1098,140288,3609,Leava,7,245, +2,1099,140288,3609,Leava,7,245, +2,1100,140800,3609,Leava,10,245, +2,1101,140800,3609,Leava,10,245, +2,1102,140800,3609,Leava,10,245, +2,1103,140800,3609,Leava,10,245, +2,1104,141312,3609,Leava,13,245, +2,1105,141312,3609,Leava,13,245, +2,1106,141312,3609,Leava,13,245, +2,1107,141312,3609,Leava,13,245, +2,1108,141824,3609,Leava,16,245, +2,1109,141824,3609,Leava,16,245, +2,1110,141824,3609,Leava,16,245, +2,1111,141824,3609,Leava,16,245, +2,1112,142336,3609,Leava,19,245, +2,1113,142336,3609,Leava,19,245, +2,1114,142336,3609,Leava,19,245, +2,1115,142336,3609,Leava,19,245, +2,1116,142848,3609,Leava,21,245, +2,1117,142848,3609,Leava,21,245, +2,1118,142848,3609,Leava,21,245, +2,1119,142848,3609,Leava,21,245, +2,1120,143360,3609,Leava,23,245, +2,1121,143360,3609,Leava,23,245, +2,1122,143360,3609,Leava,23,245, +2,1123,143360,3609,Leava,23,245, +2,1124,143872,3609,Leava,25,245, +2,1125,143872,3609,Leava,25,245, +2,1126,143872,3609,Leava,25,245, +2,1127,143872,3609,Leava,25,245, +2,1128,144384,3609,Leava,26,245, +2,1129,144384,3609,Leava,26,245, +2,1130,144384,3609,Leava,26,245, +2,1131,144384,3609,Leava,26,245, +2,1132,144896,3253,Nuku‘alofa,4,224, +2,1133,144896,3253,Nuku‘alofa,4,224, +2,1134,144896,3253,Nuku‘alofa,4,224, +2,1135,144896,3253,Nuku‘alofa,4,224, +2,1136,145408,3253,Nuku‘alofa,9,224, +2,1137,145408,3253,Nuku‘alofa,9,224, +2,1138,145408,3253,Nuku‘alofa,9,224, +2,1139,145408,3253,Nuku‘alofa,9,224, +2,1140,145920,3253,Nuku‘alofa,16,224, +2,1141,145920,3253,Nuku‘alofa,16,224, +2,1142,145920,3253,Nuku‘alofa,16,224, +2,1143,145920,3253,Nuku‘alofa,16,224, +2,1144,146432,3253,Nuku‘alofa,24,224, +2,1145,146432,3253,Nuku‘alofa,24,224, +2,1146,146432,3253,Nuku‘alofa,24,224, +2,1147,146432,3253,Nuku‘alofa,24,224, +2,1148,146944,3253,Nuku‘alofa,32,224, +2,1149,146944,3253,Nuku‘alofa,32,224, +2,1150,146944,3253,Nuku‘alofa,32,224, +2,1151,146944,3253,Nuku‘alofa,32,224, +2,1152,147456,3253,Nuku‘alofa,39,224, +2,1153,147456,3253,Nuku‘alofa,39,224, +2,1154,147456,3253,Nuku‘alofa,39,224, +2,1155,147456,3253,Nuku‘alofa,39,224, +2,1156,147968,3253,Nuku‘alofa,45,224, +2,1157,147968,3253,Nuku‘alofa,45,224, +2,1158,147968,3253,Nuku‘alofa,45,224, +2,1159,147968,3253,Nuku‘alofa,45,224, +2,1160,148480,3253,Nuku‘alofa,51,224, +2,1161,148480,3253,Nuku‘alofa,51,224, +2,1162,148480,3253,Nuku‘alofa,51,224, +2,1163,148480,3253,Nuku‘alofa,51,224, +2,1164,148992,3253,Nuku‘alofa,56,224, +2,1165,148992,3253,Nuku‘alofa,56,224, +2,1166,148992,3253,Nuku‘alofa,56,224, +2,1167,148992,3253,Nuku‘alofa,56,224, +2,1168,149504,3253,Nuku‘alofa,60,224, +2,1169,149504,3253,Nuku‘alofa,60,224, +2,1170,149504,3253,Nuku‘alofa,60,224, +2,1171,149504,3253,Nuku‘alofa,60,224, +2,1172,150016,3253,Nuku‘alofa,63,224, +2,1173,150016,3253,Nuku‘alofa,63,224, +2,1174,150016,3253,Nuku‘alofa,63,224, +2,1175,150016,3253,Nuku‘alofa,63,224, +2,1176,150528,3253,Nuku‘alofa,66,224, +2,1177,150528,3253,Nuku‘alofa,66,224, +2,1178,150528,3253,Nuku‘alofa,66,224, +2,1179,150528,3253,Nuku‘alofa,66,224, +2,1180,151040,3253,Nuku‘alofa,68,224, +2,1181,151040,3253,Nuku‘alofa,68,224, +2,1182,151040,3253,Nuku‘alofa,68,224, +2,1183,151040,3253,Nuku‘alofa,68,224, +2,1184,151552,3252,‘Ohonua,88,224, +2,1185,151552,3252,‘Ohonua,88,224, +2,1186,151552,3252,‘Ohonua,88,224, +2,1187,151552,3252,‘Ohonua,88,224, +2,1188,152064,3252,‘Ohonua,104,224, +2,1189,152064,3252,‘Ohonua,104,224, +2,1190,152064,3252,‘Ohonua,104,224, +2,1191,152064,3252,‘Ohonua,104,224, +2,1192,152576,3252,‘Ohonua,120,224, +2,1193,152576,3252,‘Ohonua,120,224, +2,1194,152576,3252,‘Ohonua,120,224, +2,1195,152576,3252,‘Ohonua,120,224, +2,1196,153088,3252,‘Ohonua,137,224, +2,1197,153088,3252,‘Ohonua,137,224, +2,1198,153088,3252,‘Ohonua,137,224, +2,1199,153088,3252,‘Ohonua,137,224, +2,1200,153600,3252,‘Ohonua,154,224, +2,1201,153600,3252,‘Ohonua,154,224, +2,1202,153600,3252,‘Ohonua,154,224, +2,1203,153600,3252,‘Ohonua,154,224, +2,1204,154112,3252,‘Ohonua,172,224, +2,1205,154112,3252,‘Ohonua,172,224, +2,1206,154112,3252,‘Ohonua,172,224, +2,1207,154112,3252,‘Ohonua,172,224, +2,1208,154624,3252,‘Ohonua,190,224, +2,1209,154624,3252,‘Ohonua,190,224, +2,1210,154624,3252,‘Ohonua,190,224, +2,1211,154624,3252,‘Ohonua,190,224, +2,1212,155136,3252,‘Ohonua,208,224, +2,1213,155136,3252,‘Ohonua,208,224, +2,1214,155136,3252,‘Ohonua,208,224, +2,1215,155136,3252,‘Ohonua,208,224, +2,1216,155648,3252,‘Ohonua,226,224, +2,1217,155648,3252,‘Ohonua,226,224, +2,1218,155648,3252,‘Ohonua,226,224, +2,1219,155648,3252,‘Ohonua,226,224, +2,1220,156160,2317,Waitangi,1,155, +2,1221,156160,2317,Waitangi,1,155, +2,1222,156160,2317,Waitangi,1,155, +2,1223,156160,2317,Waitangi,1,155, +2,1224,156672,2317,Waitangi,6,155, +2,1225,156672,2317,Waitangi,6,155, +2,1226,156672,2317,Waitangi,6,155, +2,1227,156672,2317,Waitangi,6,155, +2,1228,157184,2317,Waitangi,23,155, +2,1229,157184,2317,Waitangi,23,155, +2,1230,157184,2317,Waitangi,23,155, +2,1231,157184,2317,Waitangi,23,155, +2,1232,157696,2317,Waitangi,42,155, +2,1233,157696,2317,Waitangi,42,155, +2,1234,157696,2317,Waitangi,42,155, +2,1235,157696,2317,Waitangi,42,155, +2,1236,158208,2317,Waitangi,62,155, +2,1237,158208,2317,Waitangi,62,155, +2,1238,158208,2317,Waitangi,62,155, +2,1239,158208,2317,Waitangi,62,155, +2,1240,158720,2317,Waitangi,83,155, +2,1241,158720,2317,Waitangi,83,155, +2,1242,158720,2317,Waitangi,83,155, +2,1243,158720,2317,Waitangi,83,155, +2,1244,159232,2317,Waitangi,105,155, +2,1245,159232,2317,Waitangi,105,155, +2,1246,159232,2317,Waitangi,105,155, +2,1247,159232,2317,Waitangi,105,155, +2,1248,159744,2317,Waitangi,128,155, +2,1249,159744,2317,Waitangi,128,155, +2,1250,159744,2317,Waitangi,128,155, +2,1251,159744,2317,Waitangi,128,155, +2,1252,160256,2317,Waitangi,152,155, +2,1253,160256,2317,Waitangi,152,155, +2,1254,160256,2317,Waitangi,152,155, +2,1255,160256,2317,Waitangi,152,155, +2,1256,160768,2317,Waitangi,177,155, +2,1257,160768,2317,Waitangi,177,155, +2,1258,160768,2317,Waitangi,177,155, +2,1259,160768,2317,Waitangi,177,155, +2,1260,161280,2317,Waitangi,203,155, +2,1261,161280,2317,Waitangi,203,155, +2,1262,161280,2317,Waitangi,203,155, +2,1263,161280,2317,Waitangi,203,155, +2,1264,161792,2317,Waitangi,230,155, +2,1265,161792,2317,Waitangi,230,155, +2,1266,161792,2317,Waitangi,230,155, +2,1267,161792,2317,Waitangi,230,155, +2,1268,162304,2317,Waitangi,258,155, +2,1269,162304,2317,Waitangi,258,155, +2,1270,162304,2317,Waitangi,258,155, +2,1271,162304,2317,Waitangi,258,155, +2,1272,162816,2317,Waitangi,287,155, +2,1273,162816,2317,Waitangi,287,155, +2,1274,162816,2317,Waitangi,287,155, +2,1275,162816,2317,Waitangi,287,155, +2,1276,163328,2317,Waitangi,318,155, +2,1277,163328,2317,Waitangi,318,155, +2,1278,163328,2317,Waitangi,318,155, +2,1279,163328,2317,Waitangi,318,155, +2,1280,163840,2317,Waitangi,350,155, +2,1281,163840,2317,Waitangi,350,155, +2,1282,163840,2317,Waitangi,350,155, +2,1283,163840,2317,Waitangi,350,155, +2,1284,164352,2317,Waitangi,383,155, +2,1285,164352,2317,Waitangi,383,155, +2,1286,164352,2317,Waitangi,383,155, +2,1287,164352,2317,Waitangi,383,155, +2,1288,164864,2317,Waitangi,417,155, +2,1289,164864,2317,Waitangi,417,155, +2,1290,164864,2317,Waitangi,417,155, +2,1291,164864,2317,Waitangi,417,155, +2,1292,165376,2317,Waitangi,452,155, +2,1293,165376,2317,Waitangi,452,155, +2,1294,165376,2317,Waitangi,452,155, +2,1295,165376,2317,Waitangi,452,155, +2,1296,165888,2317,Waitangi,488,155, +2,1297,165888,2317,Waitangi,488,155, +2,1298,165888,2317,Waitangi,488,155, +2,1299,165888,2317,Waitangi,488,155, +2,1300,166400,2317,Waitangi,525,155, +2,1301,166400,2317,Waitangi,525,155, +2,1302,166400,2317,Waitangi,525,155, +2,1303,166400,2317,Waitangi,525,155, +2,1304,166912,2317,Waitangi,563,155, +2,1305,166912,2317,Waitangi,563,155, +2,1306,166912,2317,Waitangi,563,155, +2,1307,166912,2317,Waitangi,563,155, +2,1308,167424,2317,Waitangi,602,155, +2,1309,167424,2317,Waitangi,602,155, +2,1310,167424,2317,Waitangi,602,155, +2,1311,167424,2317,Waitangi,602,155, +2,1312,167936,2317,Waitangi,642,155, +2,1313,167936,2317,Waitangi,642,155, +2,1314,167936,2317,Waitangi,642,155, +2,1315,167936,2317,Waitangi,642,155, +2,1316,168448,2317,Waitangi,682,155, +2,1317,168448,2317,Waitangi,682,155, +2,1318,168448,2317,Waitangi,682,155, +2,1319,168448,2317,Waitangi,682,155, +2,1320,168960,2317,Waitangi,723,155, +2,1321,168960,2317,Waitangi,723,155, +2,1322,168960,2317,Waitangi,723,155, +2,1323,168960,2317,Waitangi,723,155, +2,1324,169472,2317,Waitangi,765,155, +2,1325,169472,2317,Waitangi,765,155, +2,1326,169472,2317,Waitangi,765,155, +2,1327,169472,2317,Waitangi,765,155, +2,1328,169984,2317,Waitangi,808,155, +2,1329,169984,2317,Waitangi,808,155, +2,1330,169984,2317,Waitangi,808,155, +2,1331,169984,2317,Waitangi,808,155, +2,1332,170496,2317,Waitangi,852,155, +2,1333,170496,2317,Waitangi,852,155, +2,1334,170496,2317,Waitangi,852,155, +2,1335,170496,2317,Waitangi,852,155, +2,1336,171008,2317,Waitangi,898,155, +2,1337,171008,2317,Waitangi,898,155, +2,1338,171008,2317,Waitangi,898,155, +2,1339,171008,2317,Waitangi,898,155, +2,1340,171520,2317,Waitangi,944,155, +2,1341,171520,2317,Waitangi,944,155, +2,1342,171520,2317,Waitangi,944,155, +2,1343,171520,2317,Waitangi,944,155, +2,1344,172032,2317,Waitangi,991,155, +2,1345,172032,2317,Waitangi,991,155, +2,1346,172032,2317,Waitangi,991,155, +2,1347,172032,2317,Waitangi,991,155, +2,1348,172544,2317,Waitangi,1038,155, +2,1349,172544,2317,Waitangi,1038,155, +2,1350,172544,2317,Waitangi,1038,155, +2,1351,172544,2317,Waitangi,1038,155, +2,1352,173056,2317,Waitangi,1085,155, +2,1353,173056,2317,Waitangi,1085,155, +2,1354,173056,2317,Waitangi,1085,155, +2,1355,173056,2317,Waitangi,1085,155, +2,1356,173568,2317,Waitangi,1132,155, +2,1357,173568,2317,Waitangi,1132,155, +2,1358,173568,2317,Waitangi,1132,155, +2,1359,173568,2317,Waitangi,1132,155, +2,1360,174080,2317,Waitangi,1180,155, +2,1361,174080,2317,Waitangi,1180,155, +2,1362,174080,2317,Waitangi,1180,155, +2,1363,174080,2317,Waitangi,1180,155, +2,1364,174592,2317,Waitangi,1228,155, +2,1365,174592,2317,Waitangi,1228,155, +2,1366,174592,2317,Waitangi,1228,155, +2,1367,174592,2317,Waitangi,1228,155, +2,1368,175104,2317,Waitangi,1276,155, +2,1369,175104,2317,Waitangi,1276,155, +2,1370,175104,2317,Waitangi,1276,155, +2,1371,175104,2317,Waitangi,1276,155, +2,1372,175616,2317,Waitangi,1324,155, +2,1373,175616,2317,Waitangi,1324,155, +2,1374,175616,2317,Waitangi,1324,155, +2,1375,175616,2317,Waitangi,1324,155, +2,1376,176128,2317,Waitangi,1373,155, +2,1377,176128,2317,Waitangi,1373,155, +2,1378,176128,2317,Waitangi,1373,155, +2,1379,176128,2317,Waitangi,1373,155, +2,1380,176640,2317,Waitangi,1422,155, +2,1381,176640,2317,Waitangi,1422,155, +2,1382,176640,2317,Waitangi,1422,155, +2,1383,176640,2317,Waitangi,1422,155, +2,1384,177152,2317,Waitangi,1471,155, +2,1385,177152,2317,Waitangi,1471,155, +2,1386,177152,2317,Waitangi,1471,155, +2,1387,177152,2317,Waitangi,1471,155, +2,1388,177664,2317,Waitangi,1520,155, +2,1389,177664,2317,Waitangi,1520,155, +2,1390,177664,2317,Waitangi,1520,155, +2,1391,177664,2317,Waitangi,1520,155, +2,1392,178176,2317,Waitangi,1570,155, +2,1393,178176,2317,Waitangi,1570,155, +2,1394,178176,2317,Waitangi,1570,155, +2,1395,178176,2317,Waitangi,1570,155, +2,1396,178688,2317,Waitangi,1620,155, +2,1397,178688,2317,Waitangi,1620,155, +2,1398,178688,2317,Waitangi,1620,155, +2,1399,178688,2317,Waitangi,1620,155, +2,1400,179200,2317,Waitangi,1670,155, +2,1401,179200,2317,Waitangi,1670,155, +2,1402,179200,2317,Waitangi,1670,155, +2,1403,179200,2317,Waitangi,1670,155, +2,1404,179712,2317,Waitangi,1720,155, +2,1405,179712,2317,Waitangi,1720,155, +2,1406,179712,2317,Waitangi,1720,155, +2,1407,179712,2317,Waitangi,1720,155, +2,1408,180224,2317,Waitangi,1771,155, +2,1409,180224,2317,Waitangi,1771,155, +2,1410,180224,2317,Waitangi,1771,155, +2,1411,180224,2317,Waitangi,1771,155, +2,1412,180736,2317,Waitangi,1822,155, +2,1413,180736,2317,Waitangi,1822,155, +2,1414,180736,2317,Waitangi,1822,155, +2,1415,180736,2317,Waitangi,1822,155, +2,1416,181248,2317,Waitangi,1873,155, +2,1417,181248,2317,Waitangi,1873,155, +2,1418,181248,2317,Waitangi,1873,155, +2,1419,181248,2317,Waitangi,1873,155, +2,1420,181760,2317,Waitangi,1924,155, +2,1421,181760,2317,Waitangi,1924,155, +2,1422,181760,2317,Waitangi,1924,155, +2,1423,181760,2317,Waitangi,1924,155, +2,1424,182272,2317,Waitangi,1976,155, +2,1425,182272,2317,Waitangi,1976,155, +2,1426,182272,2317,Waitangi,1976,155, +2,1427,182272,2317,Waitangi,1976,155, +2,1428,182784,2317,Waitangi,2028,155, +2,1429,182784,2317,Waitangi,2028,155, +2,1430,182784,2317,Waitangi,2028,155, +2,1431,182784,2317,Waitangi,2028,155, +2,1432,183296,2317,Waitangi,2080,155, +2,1433,183296,2317,Waitangi,2080,155, +2,1434,183296,2317,Waitangi,2080,155, +2,1435,183296,2317,Waitangi,2080,155, +2,1436,183808,2317,Waitangi,2132,155, +2,1437,183808,2317,Waitangi,2132,155, +2,1438,183808,2317,Waitangi,2132,155, +2,1439,183808,2317,Waitangi,2132,155, +2,1440,184320,2317,Waitangi,2184,155, +2,1441,184320,2317,Waitangi,2184,155, +2,1442,184320,2317,Waitangi,2184,155, +2,1443,184320,2317,Waitangi,2184,155, +2,1444,184832,2317,Waitangi,2237,155, +2,1445,184832,2317,Waitangi,2237,155, +2,1446,184832,2317,Waitangi,2237,155, +2,1447,184832,2317,Waitangi,2237,155, +2,1448,185344,2317,Waitangi,2290,155, +2,1449,185344,2317,Waitangi,2290,155, +2,1450,185344,2317,Waitangi,2290,155, +2,1451,185344,2317,Waitangi,2290,155, +2,1452,185856,2317,Waitangi,2343,155, +2,1453,185856,2317,Waitangi,2343,155, +2,1454,185856,2317,Waitangi,2343,155, +2,1455,185856,2317,Waitangi,2343,155, +2,1456,186368,2317,Waitangi,2396,155, +2,1457,186368,2317,Waitangi,2396,155, +2,1458,186368,2317,Waitangi,2396,155, +2,1459,186368,2317,Waitangi,2396,155, +2,1460,186880,2317,Waitangi,2449,155, +2,1461,186880,2317,Waitangi,2449,155, +2,1462,186880,2317,Waitangi,2449,155, +2,1463,186880,2317,Waitangi,2449,155, +2,1464,187392,2317,Waitangi,2503,155, +2,1465,187392,2317,Waitangi,2503,155, +2,1466,187392,2317,Waitangi,2503,155, +2,1467,187392,2317,Waitangi,2503,155, +2,1468,187904,2317,Waitangi,2557,155, +2,1469,187904,2317,Waitangi,2557,155, +2,1470,187904,2317,Waitangi,2557,155, +2,1471,187904,2317,Waitangi,2557,155, +2,1472,188416,2317,Waitangi,2611,155, +2,1473,188416,2317,Waitangi,2611,155, +2,1474,188416,2317,Waitangi,2611,155, +2,1475,188416,2317,Waitangi,2611,155, +2,1476,188928,2317,Waitangi,2665,155, +2,1477,188928,2317,Waitangi,2665,155, +2,1478,188928,2317,Waitangi,2665,155, +2,1479,188928,2317,Waitangi,2665,155, +2,1480,189440,2317,Waitangi,2719,155, +2,1481,189440,2317,Waitangi,2719,155, +2,1482,189440,2317,Waitangi,2719,155, +2,1483,189440,2317,Waitangi,2719,155, +2,1484,189952,2317,Waitangi,2774,155, +2,1485,189952,2317,Waitangi,2774,155, +2,1486,189952,2317,Waitangi,2774,155, +2,1487,189952,2317,Waitangi,2774,155, +2,1488,190464,2317,Waitangi,2829,155, +2,1489,190464,2317,Waitangi,2829,155, +2,1490,190464,2317,Waitangi,2829,155, +2,1491,190464,2317,Waitangi,2829,155, +2,1492,190976,2317,Waitangi,2884,155, +2,1493,190976,2317,Waitangi,2884,155, +2,1494,190976,2317,Waitangi,2884,155, +2,1495,190976,2317,Waitangi,2884,155, +2,1496,191488,2317,Waitangi,2939,155, +2,1497,191488,2317,Waitangi,2939,155, +2,1498,191488,2317,Waitangi,2939,155, +2,1499,191488,2317,Waitangi,2939,155, +2,1500,192000,2317,Waitangi,2994,155, +2,1501,192000,2317,Waitangi,2994,155, +2,1502,192000,2317,Waitangi,2994,155, +2,1503,192000,2317,Waitangi,2994,155, +2,1504,192512,2317,Waitangi,3049,155, +2,1505,192512,2317,Waitangi,3049,155, +2,1506,192512,2317,Waitangi,3049,155, +2,1507,192512,2317,Waitangi,3049,155, +2,1508,193024,2317,Waitangi,3105,155, +2,1509,193024,2317,Waitangi,3105,155, +2,1510,193024,2317,Waitangi,3105,155, +2,1511,193024,2317,Waitangi,3105,155, +2,1512,193536,2317,Waitangi,3161,155, +2,1513,193536,2317,Waitangi,3161,155, +2,1514,193536,2317,Waitangi,3161,155, +2,1515,193536,2317,Waitangi,3161,155, +2,1516,194048,2317,Waitangi,3217,155, +2,1517,194048,2317,Waitangi,3217,155, +2,1518,194048,2317,Waitangi,3217,155, +2,1519,194048,2317,Waitangi,3217,155, +2,1520,194560,2317,Waitangi,3273,155, +2,1521,194560,2317,Waitangi,3273,155, +2,1522,194560,2317,Waitangi,3273,155, +2,1523,194560,2317,Waitangi,3273,155, +2,1524,195072,2317,Waitangi,3329,155, +2,1525,195072,2317,Waitangi,3329,155, +2,1526,195072,2317,Waitangi,3329,155, +2,1527,195072,2317,Waitangi,3329,155, +2,1528,195584,2317,Waitangi,3385,155, +2,1529,195584,2317,Waitangi,3385,155, +2,1530,195584,2317,Waitangi,3385,155, +2,1531,195584,2317,Waitangi,3385,155, +2,1532,196096,2317,Waitangi,3442,155, +2,1533,196096,2317,Waitangi,3442,155, +2,1534,196096,2317,Waitangi,3442,155, +2,1535,196096,2317,Waitangi,3442,155, +2,1536,196608,2317,Waitangi,3499,155, +2,1537,196608,2317,Waitangi,3499,155, +2,1538,196608,2317,Waitangi,3499,155, +2,1539,196608,2317,Waitangi,3499,155, +2,1540,197120,2317,Waitangi,3556,155, +2,1541,197120,2317,Waitangi,3556,155, +2,1542,197120,2317,Waitangi,3556,155, +2,1543,197120,2317,Waitangi,3556,155, +2,1544,197632,2317,Waitangi,3613,155, +2,1545,197632,2317,Waitangi,3613,155, +2,1546,197632,2317,Waitangi,3613,155, +2,1547,197632,2317,Waitangi,3613,155, +2,1548,198144,2317,Waitangi,3670,155, +2,1549,198144,2317,Waitangi,3670,155, +2,1550,198144,2317,Waitangi,3670,155, +2,1551,198144,2317,Waitangi,3670,155, +2,1552,198656,2317,Waitangi,3727,155, +2,1553,198656,2317,Waitangi,3727,155, +2,1554,198656,2317,Waitangi,3727,155, +2,1555,198656,2317,Waitangi,3727,155, +2,1556,199168,2317,Waitangi,3785,155, +2,1557,199168,2317,Waitangi,3785,155, +2,1558,199168,2317,Waitangi,3785,155, +2,1559,199168,2317,Waitangi,3785,155, +2,1560,199680,2317,Waitangi,3843,155, +2,1561,199680,2317,Waitangi,3843,155, +2,1562,199680,2317,Waitangi,3843,155, +2,1563,199680,2317,Waitangi,3843,155, +2,1564,200192,2317,Waitangi,3901,155, +2,1565,200192,2317,Waitangi,3901,155, +2,1566,200192,2317,Waitangi,3901,155, +2,1567,200192,2317,Waitangi,3901,155, +2,1568,200704,2317,Waitangi,3959,155, +2,1569,200704,2317,Waitangi,3959,155, +2,1570,200704,2317,Waitangi,3959,155, +2,1571,200704,2317,Waitangi,3959,155, +2,1572,201216,2317,Waitangi,4017,155, +2,1573,201216,2317,Waitangi,4017,155, +2,1574,201216,2317,Waitangi,4017,155, +2,1575,201216,2317,Waitangi,4017,155, +2,1576,201728,2317,Waitangi,4075,155, +2,1577,201728,2317,Waitangi,4075,155, +2,1578,201728,2317,Waitangi,4075,155, +2,1579,201728,2317,Waitangi,4075,155, +2,1580,202240,2317,Waitangi,4133,155, +2,1581,202240,2317,Waitangi,4133,155, +2,1582,202240,2317,Waitangi,4133,155, +2,1583,202240,2317,Waitangi,4133,155, +2,1584,202752,2317,Waitangi,4192,155, +2,1585,202752,2317,Waitangi,4192,155, +2,1586,202752,2317,Waitangi,4192,155, +2,1587,202752,2317,Waitangi,4192,155, +2,1588,203264,2317,Waitangi,4251,155, +2,1589,203264,2317,Waitangi,4251,155, +2,1590,203264,2317,Waitangi,4251,155, +2,1591,203264,2317,Waitangi,4251,155, +2,1592,203776,2317,Waitangi,4310,155, +2,1593,203776,2317,Waitangi,4310,155, +2,1594,203776,2317,Waitangi,4310,155, +2,1595,203776,2317,Waitangi,4310,155, +2,1596,204288,2317,Waitangi,4369,155, +2,1597,204288,2317,Waitangi,4369,155, +2,1598,204288,2317,Waitangi,4369,155, +2,1599,204288,2317,Waitangi,4369,155, +2,1600,204800,2317,Waitangi,4428,155, +2,1601,204800,2317,Waitangi,4428,155, +2,1602,204800,2317,Waitangi,4428,155, +2,1603,204800,2317,Waitangi,4428,155, +2,1604,205312,2317,Waitangi,4487,155, +2,1605,205312,2317,Waitangi,4487,155, +2,1606,205312,2317,Waitangi,4487,155, +2,1607,205312,2317,Waitangi,4487,155, +2,1608,205824,2317,Waitangi,4546,155, +2,1609,205824,2317,Waitangi,4546,155, +2,1610,205824,2317,Waitangi,4546,155, +2,1611,205824,2317,Waitangi,4546,155, +2,1612,206336,2317,Waitangi,4606,155, +2,1613,206336,2317,Waitangi,4606,155, +2,1614,206336,2317,Waitangi,4606,155, +2,1615,206336,2317,Waitangi,4606,155, +2,1616,206848,2317,Waitangi,4666,155, +2,1617,206848,2317,Waitangi,4666,155, +2,1618,206848,2317,Waitangi,4666,155, +2,1619,206848,2317,Waitangi,4666,155, +2,1620,207360,2317,Waitangi,4726,155, +2,1621,207360,2317,Waitangi,4726,155, +2,1622,207360,2317,Waitangi,4726,155, +2,1623,207360,2317,Waitangi,4726,155, +2,1624,207872,2317,Waitangi,4786,155, +2,1625,207872,2317,Waitangi,4786,155, +2,1626,207872,2317,Waitangi,4786,155, +2,1627,207872,2317,Waitangi,4786,155, +2,1628,208384,2317,Waitangi,4846,155, +2,1629,208384,2317,Waitangi,4846,155, +2,1630,208384,2317,Waitangi,4846,155, +2,1631,208384,2317,Waitangi,4846,155, +2,1632,208896,2317,Waitangi,4906,155, +2,1633,208896,2317,Waitangi,4906,155, +2,1634,208896,2317,Waitangi,4906,155, +2,1635,208896,2317,Waitangi,4906,155, +2,1636,209408,2317,Waitangi,4966,155, +2,1637,209408,2317,Waitangi,4966,155, +2,1638,209408,2317,Waitangi,4966,155, +2,1639,209408,2317,Waitangi,4966,155, +2,1640,209920,2317,Waitangi,5026,155, +2,1641,209920,2317,Waitangi,5026,155, +2,1642,209920,2317,Waitangi,5026,155, +2,1643,209920,2317,Waitangi,5026,155, +2,1644,210432,2317,Waitangi,5087,155, +2,1645,210432,2317,Waitangi,5087,155, +2,1646,210432,2317,Waitangi,5087,155, +2,1647,210432,2317,Waitangi,5087,155, +2,1648,210944,2317,Waitangi,5148,155, +2,1649,210944,2317,Waitangi,5148,155, +2,1650,210944,2317,Waitangi,5148,155, +2,1651,210944,2317,Waitangi,5148,155, +2,1652,211456,2317,Waitangi,5209,155, +2,1653,211456,2317,Waitangi,5209,155, +2,1654,211456,2317,Waitangi,5209,155, +2,1655,211456,2317,Waitangi,5209,155, +2,1656,211968,2317,Waitangi,5270,155, +2,1657,211968,2317,Waitangi,5270,155, +2,1658,211968,2317,Waitangi,5270,155, +2,1659,211968,2317,Waitangi,5270,155, +2,1660,212480,2317,Waitangi,5331,155, +2,1661,212480,2317,Waitangi,5331,155, +2,1662,212480,2317,Waitangi,5331,155, +2,1663,212480,2317,Waitangi,5331,155, +2,1664,212992,2317,Waitangi,5392,155, +2,1665,212992,2317,Waitangi,5392,155, +2,1666,212992,2317,Waitangi,5392,155, +2,1667,212992,2317,Waitangi,5392,155, +2,1668,213504,2317,Waitangi,5453,155, +2,1669,213504,2317,Waitangi,5453,155, +2,1670,213504,2317,Waitangi,5453,155, +2,1671,213504,2317,Waitangi,5453,155, +2,1672,214016,2317,Waitangi,5514,155, +2,1673,214016,2317,Waitangi,5514,155, +2,1674,214016,2317,Waitangi,5514,155, +2,1675,214016,2317,Waitangi,5514,155, +2,1676,214528,2317,Waitangi,5575,155, +2,1677,214528,2317,Waitangi,5575,155, +2,1678,214528,2317,Waitangi,5575,155, +2,1679,214528,2317,Waitangi,5575,155, +2,1680,215040,2317,Waitangi,5637,155, +2,1681,215040,2317,Waitangi,5637,155, +2,1682,215040,2317,Waitangi,5637,155, +2,1683,215040,2317,Waitangi,5637,155, +2,1684,215552,2317,Waitangi,5699,155, +2,1685,215552,2317,Waitangi,5699,155, +2,1686,215552,2317,Waitangi,5699,155, +2,1687,215552,2317,Waitangi,5699,155, +2,1688,216064,2317,Waitangi,5761,155, +2,1689,216064,2317,Waitangi,5761,155, +2,1690,216064,2317,Waitangi,5761,155, +2,1691,216064,2317,Waitangi,5761,155, +2,1692,216576,2317,Waitangi,5823,155, +2,1693,216576,2317,Waitangi,5823,155, +2,1694,216576,2317,Waitangi,5823,155, +2,1695,216576,2317,Waitangi,5823,155, +2,1696,217088,2317,Waitangi,5885,155, +2,1697,217088,2317,Waitangi,5885,155, +2,1698,217088,2317,Waitangi,5885,155, +2,1699,217088,2317,Waitangi,5885,155, +2,1700,217600,2317,Waitangi,5947,155, +2,1701,217600,2317,Waitangi,5947,155, +2,1702,217600,2317,Waitangi,5947,155, +2,1703,217600,2317,Waitangi,5947,155, +2,1704,218112,2317,Waitangi,6009,155, +2,1705,218112,2317,Waitangi,6009,155, +2,1706,218112,2317,Waitangi,6009,155, +2,1707,218112,2317,Waitangi,6009,155, +2,1708,218624,2317,Waitangi,6071,155, +2,1709,218624,2317,Waitangi,6071,155, +2,1710,218624,2317,Waitangi,6071,155, +2,1711,218624,2317,Waitangi,6071,155, +2,1712,219136,2317,Waitangi,6133,155, +2,1713,219136,2317,Waitangi,6133,155, +2,1714,219136,2317,Waitangi,6133,155, +2,1715,219136,2317,Waitangi,6133,155, +2,1716,219648,2317,Waitangi,6196,155, +2,1717,219648,2317,Waitangi,6196,155, +2,1718,219648,2317,Waitangi,6196,155, +2,1719,219648,2317,Waitangi,6196,155, +2,1720,220160,2317,Waitangi,6259,155, +2,1721,220160,2317,Waitangi,6259,155, +2,1722,220160,2317,Waitangi,6259,155, +2,1723,220160,2317,Waitangi,6259,155, +2,1724,220672,2317,Waitangi,6322,155, +2,1725,220672,2317,Waitangi,6322,155, +2,1726,220672,2317,Waitangi,6322,155, +2,1727,220672,2317,Waitangi,6322,155, +2,1728,221184,2317,Waitangi,6385,155, +2,1729,221184,2317,Waitangi,6385,155, +2,1730,221184,2317,Waitangi,6385,155, +2,1731,221184,2317,Waitangi,6385,155, +2,1732,221696,2317,Waitangi,6448,155, +2,1733,221696,2317,Waitangi,6448,155, +2,1734,221696,2317,Waitangi,6448,155, +2,1735,221696,2317,Waitangi,6448,155, +2,1736,222208,2317,Waitangi,6511,155, +2,1737,222208,2317,Waitangi,6511,155, +2,1738,222208,2317,Waitangi,6511,155, +2,1739,222208,2317,Waitangi,6511,155, +2,1740,222720,2317,Waitangi,6574,155, +2,1741,222720,2317,Waitangi,6574,155, +2,1742,222720,2317,Waitangi,6574,155, +2,1743,222720,2317,Waitangi,6574,155, +2,1744,223232,2317,Waitangi,6637,155, +2,1745,223232,2317,Waitangi,6637,155, +2,1746,223232,2317,Waitangi,6637,155, +2,1747,223232,2317,Waitangi,6637,155, +2,1748,223744,2317,Waitangi,6700,155, +2,1749,223744,2317,Waitangi,6700,155, +2,1750,223744,2317,Waitangi,6700,155, +2,1751,223744,2317,Waitangi,6700,155, +2,1752,224256,2317,Waitangi,6763,155, +2,1753,224256,2317,Waitangi,6763,155, +2,1754,224256,2317,Waitangi,6763,155, +2,1755,224256,2317,Waitangi,6763,155, +2,1756,224768,2317,Waitangi,6826,155, +2,1757,224768,2317,Waitangi,6826,155, +2,1758,224768,2317,Waitangi,6826,155, +2,1759,224768,2317,Waitangi,6826,155, +2,1760,225280,2317,Waitangi,6889,155, +2,1761,225280,2317,Waitangi,6889,155, +2,1762,225280,2317,Waitangi,6889,155, +2,1763,225280,2317,Waitangi,6889,155, +2,1764,225792,2317,Waitangi,6953,155, +2,1765,225792,2317,Waitangi,6953,155, +2,1766,225792,2317,Waitangi,6953,155, +2,1767,225792,2317,Waitangi,6953,155, +2,1768,226304,2317,Waitangi,7017,155, +2,1769,226304,2317,Waitangi,7017,155, +2,1770,226304,2317,Waitangi,7017,155, +2,1771,226304,2317,Waitangi,7017,155, +2,1772,226816,2317,Waitangi,7081,155, +2,1773,226816,2317,Waitangi,7081,155, +2,1774,226816,2317,Waitangi,7081,155, +2,1775,226816,2317,Waitangi,7081,155, +2,1776,227328,2317,Waitangi,7145,155, +2,1777,227328,2317,Waitangi,7145,155, +2,1778,227328,2317,Waitangi,7145,155, +2,1779,227328,2317,Waitangi,7145,155, +2,1780,227840,2317,Waitangi,7209,155, +2,1781,227840,2317,Waitangi,7209,155, +2,1782,227840,2317,Waitangi,7209,155, +2,1783,227840,2317,Waitangi,7209,155, +2,1784,228352,2317,Waitangi,7273,155, +2,1785,228352,2317,Waitangi,7273,155, +2,1786,228352,2317,Waitangi,7273,155, +2,1787,228352,2317,Waitangi,7273,155, +2,1788,228864,2317,Waitangi,7337,155, +2,1789,228864,2317,Waitangi,7337,155, +2,1790,228864,2317,Waitangi,7337,155, +2,1791,228864,2317,Waitangi,7337,155, +2,1792,229376,2317,Waitangi,7401,155, +2,1793,229376,2317,Waitangi,7401,155, +2,1794,229376,2317,Waitangi,7401,155, +2,1795,229376,2317,Waitangi,7401,155, +2,1796,229888,2317,Waitangi,7465,155, +2,1797,229888,2317,Waitangi,7465,155, +2,1798,229888,2317,Waitangi,7465,155, +2,1799,229888,2317,Waitangi,7465,155, +2,1800,230400,2317,Waitangi,7529,155, +2,1801,230400,2317,Waitangi,7529,155, +2,1802,230400,2317,Waitangi,7529,155, +2,1803,230400,2317,Waitangi,7529,155, +2,1804,230912,2317,Waitangi,7593,155, +2,1805,230912,2317,Waitangi,7593,155, +2,1806,230912,2317,Waitangi,7593,155, +2,1807,230912,2317,Waitangi,7593,155, +2,1808,231424,2317,Waitangi,7657,155, +2,1809,231424,2317,Waitangi,7657,155, +2,1810,231424,2317,Waitangi,7657,155, +2,1811,231424,2317,Waitangi,7657,155, +2,1812,231936,2317,Waitangi,7722,155, +2,1813,231936,2317,Waitangi,7722,155, +2,1814,231936,2317,Waitangi,7722,155, +2,1815,231936,2317,Waitangi,7722,155, +2,1816,232448,2317,Waitangi,7787,155, +2,1817,232448,2317,Waitangi,7787,155, +2,1818,232448,2317,Waitangi,7787,155, +2,1819,232448,2317,Waitangi,7787,155, +2,1820,232960,2317,Waitangi,7852,155, +2,1821,232960,2317,Waitangi,7852,155, +2,1822,232960,2317,Waitangi,7852,155, +2,1823,232960,2317,Waitangi,7852,155, +2,1824,233472,2317,Waitangi,7917,155, +2,1825,233472,2317,Waitangi,7917,155, +2,1826,233472,2317,Waitangi,7917,155, +2,1827,233472,2317,Waitangi,7917,155, +2,1828,233984,2317,Waitangi,7982,155, +2,1829,233984,2317,Waitangi,7982,155, +2,1830,233984,2317,Waitangi,7982,155, +2,1831,233984,2317,Waitangi,7982,155, +2,1832,234496,2317,Waitangi,8047,155, +2,1833,234496,2317,Waitangi,8047,155, +2,1834,234496,2317,Waitangi,8047,155, +2,1835,234496,2317,Waitangi,8047,155, +2,1836,235008,2317,Waitangi,8112,155, +2,1837,235008,2317,Waitangi,8112,155, +2,1838,235008,2317,Waitangi,8112,155, +2,1839,235008,2317,Waitangi,8112,155, +2,1840,235520,2317,Waitangi,8177,155, +2,1841,235520,2317,Waitangi,8177,155, +2,1842,235520,2317,Waitangi,8177,155, +2,1843,235520,2317,Waitangi,8177,155, +2,1844,236032,2317,Waitangi,8242,155, +2,1845,236032,2317,Waitangi,8242,155, +2,1846,236032,2317,Waitangi,8242,155, +2,1847,236032,2317,Waitangi,8242,155, +2,1848,236544,2317,Waitangi,8307,155, +2,1849,236544,2317,Waitangi,8307,155, +2,1850,236544,2317,Waitangi,8307,155, +2,1851,236544,2317,Waitangi,8307,155, +2,1852,237056,2317,Waitangi,8372,155, +2,1853,237056,2317,Waitangi,8372,155, +2,1854,237056,2317,Waitangi,8372,155, +2,1855,237056,2317,Waitangi,8372,155, +2,1856,237568,2317,Waitangi,8437,155, +2,1857,237568,2317,Waitangi,8437,155, +2,1858,237568,2317,Waitangi,8437,155, +2,1859,237568,2317,Waitangi,8437,155, +2,1860,238080,2317,Waitangi,8502,155, +2,1861,238080,2317,Waitangi,8502,155, +2,1862,238080,2317,Waitangi,8502,155, +2,1863,238080,2317,Waitangi,8502,155, +2,1864,238592,2317,Waitangi,8567,155, +2,1865,238592,2317,Waitangi,8567,155, +2,1866,238592,2317,Waitangi,8567,155, +2,1867,238592,2317,Waitangi,8567,155, +2,1868,239104,2317,Waitangi,8632,155, +2,1869,239104,2317,Waitangi,8632,155, +2,1870,239104,2317,Waitangi,8632,155, +2,1871,239104,2317,Waitangi,8632,155, +2,1872,239616,2317,Waitangi,8697,155, +2,1873,239616,2317,Waitangi,8697,155, +2,1874,239616,2317,Waitangi,8697,155, +2,1875,239616,2317,Waitangi,8697,155, +2,1876,240128,2317,Waitangi,8763,155, +2,1877,240128,2317,Waitangi,8763,155, +2,1878,240128,2317,Waitangi,8763,155, +2,1879,240128,2317,Waitangi,8763,155, +2,1880,240640,2317,Waitangi,8829,155, +2,1881,240640,2317,Waitangi,8829,155, +2,1882,240640,2317,Waitangi,8829,155, +2,1883,240640,2317,Waitangi,8829,155, +2,1884,241152,2317,Waitangi,8895,155, +2,1885,241152,2317,Waitangi,8895,155, +2,1886,241152,2317,Waitangi,8895,155, +2,1887,241152,2317,Waitangi,8895,155, +2,1888,241664,2317,Waitangi,8961,155, +2,1889,241664,2317,Waitangi,8961,155, +2,1890,241664,2317,Waitangi,8961,155, +2,1891,241664,2317,Waitangi,8961,155, +2,1892,242176,2317,Waitangi,9027,155, +2,1893,242176,2317,Waitangi,9027,155, +2,1894,242176,2317,Waitangi,9027,155, +2,1895,242176,2317,Waitangi,9027,155, +2,1896,242688,2317,Waitangi,9093,155, +2,1897,242688,2317,Waitangi,9093,155, +2,1898,242688,2317,Waitangi,9093,155, +2,1899,242688,2317,Waitangi,9093,155, +2,1900,243200,2317,Waitangi,9159,155, +2,1901,243200,2317,Waitangi,9159,155, +2,1902,243200,2317,Waitangi,9159,155, +2,1903,243200,2317,Waitangi,9159,155, +2,1904,243712,2317,Waitangi,9225,155, +2,1905,243712,2317,Waitangi,9225,155, +2,1906,243712,2317,Waitangi,9225,155, +2,1907,243712,2317,Waitangi,9225,155, +2,1908,244224,2317,Waitangi,9291,155, +2,1909,244224,2317,Waitangi,9291,155, +2,1910,244224,2317,Waitangi,9291,155, +2,1911,244224,2317,Waitangi,9291,155, +2,1912,244736,2317,Waitangi,9357,155, +2,1913,244736,2317,Waitangi,9357,155, +2,1914,244736,2317,Waitangi,9357,155, +2,1915,244736,2317,Waitangi,9357,155, +2,1916,245248,2317,Waitangi,9423,155, +2,1917,245248,2317,Waitangi,9423,155, +2,1918,245248,2317,Waitangi,9423,155, +2,1919,245248,2317,Waitangi,9423,155, +2,1920,245760,2317,Waitangi,9489,155, +2,1921,245760,2317,Waitangi,9489,155, +2,1922,245760,2317,Waitangi,9489,155, +2,1923,245760,2317,Waitangi,9489,155, +2,1924,246272,2317,Waitangi,9555,155, +2,1925,246272,2317,Waitangi,9555,155, +2,1926,246272,2317,Waitangi,9555,155, +2,1927,246272,2317,Waitangi,9555,155, +2,1928,246784,2317,Waitangi,9621,155, +2,1929,246784,2317,Waitangi,9621,155, +2,1930,246784,2317,Waitangi,9621,155, +2,1931,246784,2317,Waitangi,9621,155, +2,1932,247296,2317,Waitangi,9687,155, +2,1933,247296,2317,Waitangi,9687,155, +2,1934,247296,2317,Waitangi,9687,155, +2,1935,247296,2317,Waitangi,9687,155, +2,1936,247808,2317,Waitangi,9753,155, +2,1937,247808,2317,Waitangi,9753,155, +2,1938,247808,2317,Waitangi,9753,155, +2,1939,247808,2317,Waitangi,9753,155, +2,1940,248320,2317,Waitangi,9819,155, +2,1941,248320,2317,Waitangi,9819,155, +2,1942,248320,2317,Waitangi,9819,155, +2,1943,248320,2317,Waitangi,9819,155, +2,1944,248832,2317,Waitangi,9885,155, +2,1945,248832,2317,Waitangi,9885,155, +2,1946,248832,2317,Waitangi,9885,155, +2,1947,248832,2317,Waitangi,9885,155, +2,1948,249344,2317,Waitangi,9952,155, +2,1949,249344,2317,Waitangi,9952,155, +2,1950,249344,2317,Waitangi,9952,155, +2,1951,249344,2317,Waitangi,9952,155, +2,1952,249856,2317,Waitangi,10019,155, +2,1953,249856,2317,Waitangi,10019,155, +2,1954,249856,2317,Waitangi,10019,155, +2,1955,249856,2317,Waitangi,10019,155, +2,1956,250368,2317,Waitangi,10086,155, +2,1957,250368,2317,Waitangi,10086,155, +2,1958,250368,2317,Waitangi,10086,155, +2,1959,250368,2317,Waitangi,10086,155, +2,1960,250880,2317,Waitangi,10153,155, +2,1961,250880,2317,Waitangi,10153,155, +2,1962,250880,2317,Waitangi,10153,155, +2,1963,250880,2317,Waitangi,10153,155, +2,1964,251392,2317,Waitangi,10220,155, +2,1965,251392,2317,Waitangi,10220,155, +2,1966,251392,2317,Waitangi,10220,155, +2,1967,251392,2317,Waitangi,10220,155, +2,1968,251904,2317,Waitangi,10287,155, +2,1969,251904,2317,Waitangi,10287,155, +2,1970,251904,2317,Waitangi,10287,155, +2,1971,251904,2317,Waitangi,10287,155, +2,1972,252416,2317,Waitangi,10354,155, +2,1973,252416,2317,Waitangi,10354,155, +2,1974,252416,2317,Waitangi,10354,155, +2,1975,252416,2317,Waitangi,10354,155, +2,1976,252928,2317,Waitangi,10421,155, +2,1977,252928,2317,Waitangi,10421,155, +2,1978,252928,2317,Waitangi,10421,155, +2,1979,252928,2317,Waitangi,10421,155, +2,1980,253440,2317,Waitangi,10488,155, +2,1981,253440,2317,Waitangi,10488,155, +2,1982,253440,2317,Waitangi,10488,155, +2,1983,253440,2317,Waitangi,10488,155, +2,1984,253952,2317,Waitangi,10555,155, +2,1985,253952,2317,Waitangi,10555,155, +2,1986,253952,2317,Waitangi,10555,155, +2,1987,253952,2317,Waitangi,10555,155, +2,1988,254464,2317,Waitangi,10622,155, +2,1989,254464,2317,Waitangi,10622,155, +2,1990,254464,2317,Waitangi,10622,155, +2,1991,254464,2317,Waitangi,10622,155, +2,1992,254976,2317,Waitangi,10689,155, +2,1993,254976,2317,Waitangi,10689,155, +2,1994,254976,2317,Waitangi,10689,155, +2,1995,254976,2317,Waitangi,10689,155, +2,1996,255488,2317,Waitangi,10756,155, +2,1997,255488,2317,Waitangi,10756,155, +2,1998,255488,2317,Waitangi,10756,155, +2,1999,255488,2317,Waitangi,10756,155, +2,2000,256000,2317,Waitangi,10823,155, +2,2001,256000,2317,Waitangi,10823,155, +2,2002,256000,2317,Waitangi,10823,155, +2,2003,256000,2317,Waitangi,10823,155, +2,2004,256512,2317,Waitangi,10890,155, +2,2005,256512,2317,Waitangi,10890,155, +2,2006,256512,2317,Waitangi,10890,155, +2,2007,256512,2317,Waitangi,10890,155, +2,2008,257024,2317,Waitangi,10957,155, +2,2009,257024,2317,Waitangi,10957,155, +2,2010,257024,2317,Waitangi,10957,155, +2,2011,257024,2317,Waitangi,10957,155, +2,2012,257536,2317,Waitangi,11024,155, +2,2013,257536,2317,Waitangi,11024,155, +2,2014,257536,2317,Waitangi,11024,155, +2,2015,257536,2317,Waitangi,11024,155, +2,2016,258048,2317,Waitangi,11091,155, +2,2017,258048,2317,Waitangi,11091,155, +2,2018,258048,2317,Waitangi,11091,155, +2,2019,258048,2317,Waitangi,11091,155, +2,2020,258560,2317,Waitangi,11158,155, +2,2021,258560,2317,Waitangi,11158,155, +2,2022,258560,2317,Waitangi,11158,155, +2,2023,258560,2317,Waitangi,11158,155, +2,2024,259072,2317,Waitangi,11225,155, +2,2025,259072,2317,Waitangi,11225,155, +2,2026,259072,2317,Waitangi,11225,155, +2,2027,259072,2317,Waitangi,11225,155, +2,2028,259584,2317,Waitangi,11292,155, +2,2029,259584,2317,Waitangi,11292,155, +2,2030,259584,2317,Waitangi,11292,155, +2,2031,259584,2317,Waitangi,11292,155, +2,2032,260096,2317,Waitangi,11359,155, +2,2033,260096,2317,Waitangi,11359,155, +2,2034,260096,2317,Waitangi,11359,155, +2,2035,260096,2317,Waitangi,11359,155, +2,2036,260608,2317,Waitangi,11426,155, +2,2037,260608,2317,Waitangi,11426,155, +2,2038,260608,2317,Waitangi,11426,155, +2,2039,260608,2317,Waitangi,11426,155, +2,2040,261120,2317,Waitangi,11493,155, +2,2041,261120,2317,Waitangi,11493,155, +2,2042,261120,2317,Waitangi,11493,155, +2,2043,261120,2317,Waitangi,11493,155, +2,2044,261632,2317,Waitangi,11560,155, +2,2045,261632,2317,Waitangi,11560,155, +2,2046,261632,2317,Waitangi,11560,155, +2,2047,261632,2317,Waitangi,11560,155, +3,0,0,6919,Anchorage,1,235, +3,1,0,6919,Anchorage,1,235, +3,2,0,6919,Anchorage,1,235, +3,3,0,6919,Anchorage,1,235, +3,4,512,6919,Anchorage,56,235, +3,5,512,6919,Anchorage,56,235, +3,6,512,6919,Anchorage,56,235, +3,7,512,6919,Anchorage,56,235, +3,8,1024,6919,Anchorage,111,235, +3,9,1024,6919,Anchorage,111,235, +3,10,1024,6919,Anchorage,111,235, +3,11,1024,6919,Anchorage,111,235, +3,12,1536,6919,Anchorage,166,235, +3,13,1536,6919,Anchorage,166,235, +3,14,1536,6919,Anchorage,166,235, +3,15,1536,6919,Anchorage,166,235, +3,16,2048,6919,Anchorage,221,235, +3,17,2048,6919,Anchorage,221,235, +3,18,2048,6919,Anchorage,221,235, +3,19,2048,6919,Anchorage,221,235, +3,20,2560,6919,Anchorage,276,235, +3,21,2560,6919,Anchorage,276,235, +3,22,2560,6919,Anchorage,276,235, +3,23,2560,6919,Anchorage,276,235, +3,24,3072,6919,Anchorage,331,235, +3,25,3072,6919,Anchorage,331,235, +3,26,3072,6919,Anchorage,331,235, +3,27,3072,6919,Anchorage,331,235, +3,28,3584,6919,Anchorage,386,235, +3,29,3584,6919,Anchorage,386,235, +3,30,3584,6919,Anchorage,386,235, +3,31,3584,6919,Anchorage,386,235, +3,32,4096,6919,Anchorage,441,235, +3,33,4096,6919,Anchorage,441,235, +3,34,4096,6919,Anchorage,441,235, +3,35,4096,6919,Anchorage,441,235, +3,36,4608,6919,Anchorage,496,235, +3,37,4608,6919,Anchorage,496,235, +3,38,4608,6919,Anchorage,496,235, +3,39,4608,6919,Anchorage,496,235, +3,40,5120,6919,Anchorage,551,235, +3,41,5120,6919,Anchorage,551,235, +3,42,5120,6919,Anchorage,551,235, +3,43,5120,6919,Anchorage,551,235, +3,44,5632,6919,Anchorage,606,235, +3,45,5632,6919,Anchorage,606,235, +3,46,5632,6919,Anchorage,606,235, +3,47,5632,6919,Anchorage,606,235, +3,48,6144,6919,Anchorage,661,235, +3,49,6144,6919,Anchorage,661,235, +3,50,6144,6919,Anchorage,661,235, +3,51,6144,6919,Anchorage,661,235, +3,52,6656,6919,Anchorage,716,235, +3,53,6656,6919,Anchorage,716,235, +3,54,6656,6919,Anchorage,716,235, +3,55,6656,6919,Anchorage,716,235, +3,56,7168,6919,Anchorage,771,235, +3,57,7168,6919,Anchorage,771,235, +3,58,7168,6919,Anchorage,771,235, +3,59,7168,6919,Anchorage,771,235, +3,60,7680,6919,Anchorage,826,235, +3,61,7680,6919,Anchorage,826,235, +3,62,7680,6919,Anchorage,826,235, +3,63,7680,6919,Anchorage,826,235, +3,64,8192,6919,Anchorage,881,235, +3,65,8192,6919,Anchorage,881,235, +3,66,8192,6919,Anchorage,881,235, +3,67,8192,6919,Anchorage,881,235, +3,68,8704,6919,Anchorage,936,235, +3,69,8704,6919,Anchorage,936,235, +3,70,8704,6919,Anchorage,936,235, +3,71,8704,6919,Anchorage,936,235, +3,72,9216,6919,Anchorage,991,235, +3,73,9216,6919,Anchorage,991,235, +3,74,9216,6919,Anchorage,991,235, +3,75,9216,6919,Anchorage,991,235, +3,76,9728,6919,Anchorage,1046,235, +3,77,9728,6919,Anchorage,1046,235, +3,78,9728,6919,Anchorage,1046,235, +3,79,9728,6919,Anchorage,1046,235, +3,80,10240,6919,Anchorage,1101,235, +3,81,10240,6919,Anchorage,1101,235, +3,82,10240,6919,Anchorage,1101,235, +3,83,10240,6919,Anchorage,1101,235, +3,84,10752,6919,Anchorage,1156,235, +3,85,10752,6919,Anchorage,1156,235, +3,86,10752,6919,Anchorage,1156,235, +3,87,10752,6919,Anchorage,1156,235, +3,88,11264,6919,Anchorage,1211,235, +3,89,11264,6919,Anchorage,1211,235, +3,90,11264,6919,Anchorage,1211,235, +3,91,11264,6919,Anchorage,1211,235, +3,92,11776,6919,Anchorage,1266,235, +3,93,11776,6919,Anchorage,1266,235, +3,94,11776,6919,Anchorage,1266,235, +3,95,11776,6919,Anchorage,1266,235, +3,96,12288,6919,Anchorage,1321,235, +3,97,12288,6919,Anchorage,1321,235, +3,98,12288,6919,Anchorage,1321,235, +3,99,12288,6919,Anchorage,1321,235, +3,100,12800,6919,Anchorage,1376,235, +3,101,12800,6919,Anchorage,1376,235, +3,102,12800,6919,Anchorage,1376,235, +3,103,12800,6919,Anchorage,1376,235, +3,104,13312,6919,Anchorage,1431,235, +3,105,13312,6919,Anchorage,1431,235, +3,106,13312,6919,Anchorage,1431,235, +3,107,13312,6919,Anchorage,1431,235, +3,108,13824,6919,Anchorage,1486,235, +3,109,13824,6919,Anchorage,1486,235, +3,110,13824,6919,Anchorage,1486,235, +3,111,13824,6919,Anchorage,1486,235, +3,112,14336,6919,Anchorage,1541,235, +3,113,14336,6919,Anchorage,1541,235, +3,114,14336,6919,Anchorage,1541,235, +3,115,14336,6919,Anchorage,1541,235, +3,116,14848,6919,Anchorage,1596,235, +3,117,14848,6919,Anchorage,1596,235, +3,118,14848,6919,Anchorage,1596,235, +3,119,14848,6919,Anchorage,1596,235, +3,120,15360,6919,Anchorage,1651,235, +3,121,15360,6919,Anchorage,1651,235, +3,122,15360,6919,Anchorage,1651,235, +3,123,15360,6919,Anchorage,1651,235, +3,124,15872,6919,Anchorage,1706,235, +3,125,15872,6919,Anchorage,1706,235, +3,126,15872,6919,Anchorage,1706,235, +3,127,15872,6919,Anchorage,1706,235, +3,128,16384,6919,Anchorage,1761,235, +3,129,16384,6919,Anchorage,1761,235, +3,130,16384,6919,Anchorage,1761,235, +3,131,16384,6919,Anchorage,1761,235, +3,132,16896,6919,Anchorage,1816,235, +3,133,16896,6919,Anchorage,1816,235, +3,134,16896,6919,Anchorage,1816,235, +3,135,16896,6919,Anchorage,1816,235, +3,136,17408,6919,Anchorage,1871,235, +3,137,17408,6919,Anchorage,1871,235, +3,138,17408,6919,Anchorage,1871,235, +3,139,17408,6919,Anchorage,1871,235, +3,140,17920,6919,Anchorage,1926,235, +3,141,17920,6919,Anchorage,1926,235, +3,142,17920,6919,Anchorage,1926,235, +3,143,17920,6919,Anchorage,1926,235, +3,144,18432,6919,Anchorage,1981,235, +3,145,18432,6919,Anchorage,1981,235, +3,146,18432,6919,Anchorage,1981,235, +3,147,18432,6919,Anchorage,1981,235, +3,148,18944,6919,Anchorage,2036,235, +3,149,18944,6919,Anchorage,2036,235, +3,150,18944,6919,Anchorage,2036,235, +3,151,18944,6919,Anchorage,2036,235, +3,152,19456,6919,Anchorage,2091,235, +3,153,19456,6919,Anchorage,2091,235, +3,154,19456,6919,Anchorage,2091,235, +3,155,19456,6919,Anchorage,2091,235, +3,156,19968,6919,Anchorage,2146,235, +3,157,19968,6919,Anchorage,2146,235, +3,158,19968,6919,Anchorage,2146,235, +3,159,19968,6919,Anchorage,2146,235, +3,160,20480,6919,Anchorage,2201,235, +3,161,20480,6919,Anchorage,2201,235, +3,162,20480,6919,Anchorage,2201,235, +3,163,20480,6919,Anchorage,2201,235, +3,164,20992,6919,Anchorage,2256,235, +3,165,20992,6919,Anchorage,2256,235, +3,166,20992,6919,Anchorage,2256,235, +3,167,20992,6919,Anchorage,2256,235, +3,168,21504,6919,Anchorage,2311,235, +3,169,21504,6919,Anchorage,2311,235, +3,170,21504,6919,Anchorage,2311,235, +3,171,21504,6919,Anchorage,2311,235, +3,172,22016,6919,Anchorage,2366,235, +3,173,22016,6919,Anchorage,2366,235, +3,174,22016,6919,Anchorage,2366,235, +3,175,22016,6919,Anchorage,2366,235, +3,176,22528,6919,Anchorage,2421,235, +3,177,22528,6919,Anchorage,2421,235, +3,178,22528,6919,Anchorage,2421,235, +3,179,22528,6919,Anchorage,2421,235, +3,180,23040,6919,Anchorage,2476,235, +3,181,23040,6919,Anchorage,2476,235, +3,182,23040,6919,Anchorage,2476,235, +3,183,23040,6919,Anchorage,2476,235, +3,184,23552,6919,Anchorage,2531,235, +3,185,23552,6919,Anchorage,2531,235, +3,186,23552,6919,Anchorage,2531,235, +3,187,23552,6919,Anchorage,2531,235, +3,188,24064,6919,Anchorage,2586,235, +3,189,24064,6919,Anchorage,2586,235, +3,190,24064,6919,Anchorage,2586,235, +3,191,24064,6919,Anchorage,2586,235, +3,192,24576,6919,Anchorage,2641,235, +3,193,24576,6919,Anchorage,2641,235, +3,194,24576,6919,Anchorage,2641,235, +3,195,24576,6919,Anchorage,2641,235, +3,196,25088,6919,Anchorage,2696,235, +3,197,25088,6919,Anchorage,2696,235, +3,198,25088,6919,Anchorage,2696,235, +3,199,25088,6919,Anchorage,2696,235, +3,200,25600,6919,Anchorage,2751,235, +3,201,25600,6919,Anchorage,2751,235, +3,202,25600,6919,Anchorage,2751,235, +3,203,25600,6919,Anchorage,2751,235, +3,204,26112,6919,Anchorage,2806,235, +3,205,26112,6919,Anchorage,2806,235, +3,206,26112,6919,Anchorage,2806,235, +3,207,26112,6919,Anchorage,2806,235, +3,208,26624,6919,Anchorage,2861,235, +3,209,26624,6919,Anchorage,2861,235, +3,210,26624,6919,Anchorage,2861,235, +3,211,26624,6919,Anchorage,2861,235, +3,212,27136,6919,Anchorage,2916,235, +3,213,27136,6919,Anchorage,2916,235, +3,214,27136,6919,Anchorage,2916,235, +3,215,27136,6919,Anchorage,2916,235, +3,216,27648,6919,Anchorage,2971,235, +3,217,27648,6919,Anchorage,2971,235, +3,218,27648,6919,Anchorage,2971,235, +3,219,27648,6919,Anchorage,2971,235, +3,220,28160,6919,Anchorage,3026,235, +3,221,28160,6919,Anchorage,3026,235, +3,222,28160,6919,Anchorage,3026,235, +3,223,28160,6919,Anchorage,3026,235, +3,224,28672,6919,Anchorage,3081,235, +3,225,28672,6919,Anchorage,3081,235, +3,226,28672,6919,Anchorage,3081,235, +3,227,28672,6919,Anchorage,3081,235, +3,228,29184,6919,Anchorage,3136,235, +3,229,29184,6919,Anchorage,3136,235, +3,230,29184,6919,Anchorage,3136,235, +3,231,29184,6919,Anchorage,3136,235, +3,232,29696,6919,Anchorage,3191,235, +3,233,29696,6919,Anchorage,3191,235, +3,234,29696,6919,Anchorage,3191,235, +3,235,29696,6919,Anchorage,3191,235, +3,236,30208,6919,Anchorage,3246,235, +3,237,30208,6919,Anchorage,3246,235, +3,238,30208,6919,Anchorage,3246,235, +3,239,30208,6919,Anchorage,3246,235, +3,240,30720,6919,Anchorage,3301,235, +3,241,30720,6919,Anchorage,3301,235, +3,242,30720,6919,Anchorage,3301,235, +3,243,30720,6919,Anchorage,3301,235, +3,244,31232,6919,Anchorage,3356,235, +3,245,31232,6919,Anchorage,3356,235, +3,246,31232,6919,Anchorage,3356,235, +3,247,31232,6919,Anchorage,3356,235, +3,248,31744,6919,Anchorage,3411,235, +3,249,31744,6919,Anchorage,3411,235, +3,250,31744,6919,Anchorage,3411,235, +3,251,31744,6919,Anchorage,3411,235, +3,252,32256,6919,Anchorage,3466,235, +3,253,32256,6919,Anchorage,3466,235, +3,254,32256,6919,Anchorage,3466,235, +3,255,32256,6919,Anchorage,3466,235, +3,256,32768,6919,Anchorage,3521,235, +3,257,32768,6919,Anchorage,3521,235, +3,258,32768,6919,Anchorage,3521,235, +3,259,32768,6919,Anchorage,3521,235, +3,260,33280,6919,Anchorage,3576,235, +3,261,33280,6919,Anchorage,3576,235, +3,262,33280,6919,Anchorage,3576,235, +3,263,33280,6919,Anchorage,3576,235, +3,264,33792,6919,Anchorage,3631,235, +3,265,33792,6919,Anchorage,3631,235, +3,266,33792,6919,Anchorage,3631,235, +3,267,33792,6919,Anchorage,3631,235, +3,268,34304,6919,Anchorage,3686,235, +3,269,34304,6919,Anchorage,3686,235, +3,270,34304,6919,Anchorage,3686,235, +3,271,34304,6919,Anchorage,3686,235, +3,272,34816,6919,Anchorage,3741,235, +3,273,34816,6919,Anchorage,3741,235, +3,274,34816,6919,Anchorage,3741,235, +3,275,34816,6919,Anchorage,3741,235, +3,276,35328,6919,Anchorage,3796,235, +3,277,35328,6919,Anchorage,3796,235, +3,278,35328,6919,Anchorage,3796,235, +3,279,35328,6919,Anchorage,3796,235, +3,280,35840,6919,Anchorage,3851,235, +3,281,35840,6919,Anchorage,3851,235, +3,282,35840,6919,Anchorage,3851,235, +3,283,35840,6919,Anchorage,3851,235, +3,284,36352,6919,Anchorage,3906,235, +3,285,36352,6919,Anchorage,3906,235, +3,286,36352,6919,Anchorage,3906,235, +3,287,36352,6919,Anchorage,3906,235, +3,288,36864,6919,Anchorage,3961,235, +3,289,36864,6919,Anchorage,3961,235, +3,290,36864,6919,Anchorage,3961,235, +3,291,36864,6919,Anchorage,3961,235, +3,292,37376,6919,Anchorage,4016,235, +3,293,37376,6919,Anchorage,4016,235, +3,294,37376,6919,Anchorage,4016,235, +3,295,37376,6919,Anchorage,4016,235, +3,296,37888,6919,Anchorage,4071,235, +3,297,37888,6919,Anchorage,4071,235, +3,298,37888,6919,Anchorage,4071,235, +3,299,37888,6919,Anchorage,4071,235, +3,300,38400,6919,Anchorage,4126,235, +3,301,38400,6919,Anchorage,4126,235, +3,302,38400,6919,Anchorage,4126,235, +3,303,38400,6919,Anchorage,4126,235, +3,304,38912,6919,Anchorage,4181,235, +3,305,38912,6919,Anchorage,4181,235, +3,306,38912,6919,Anchorage,4181,235, +3,307,38912,6919,Anchorage,4181,235, +3,308,39424,6919,Anchorage,4236,235, +3,309,39424,6919,Anchorage,4236,235, +3,310,39424,6919,Anchorage,4236,235, +3,311,39424,6919,Anchorage,4236,235, +3,312,39936,6919,Anchorage,4291,235, +3,313,39936,6919,Anchorage,4291,235, +3,314,39936,6919,Anchorage,4291,235, +3,315,39936,6919,Anchorage,4291,235, +3,316,40448,6919,Anchorage,4346,235, +3,317,40448,6919,Anchorage,4346,235, +3,318,40448,6919,Anchorage,4346,235, +3,319,40448,6919,Anchorage,4346,235, +3,320,40960,6919,Anchorage,4401,235, +3,321,40960,6919,Anchorage,4401,235, +3,322,40960,6919,Anchorage,4401,235, +3,323,40960,6919,Anchorage,4401,235, +3,324,41472,6919,Anchorage,4456,235, +3,325,41472,6919,Anchorage,4456,235, +3,326,41472,6919,Anchorage,4456,235, +3,327,41472,6919,Anchorage,4456,235, +3,328,41984,6919,Anchorage,4510,235, +3,329,41984,6919,Anchorage,4510,235, +3,330,41984,6919,Anchorage,4510,235, +3,331,41984,6919,Anchorage,4510,235, +3,332,42496,6919,Anchorage,4564,235, +3,333,42496,6919,Anchorage,4564,235, +3,334,42496,6919,Anchorage,4564,235, +3,335,42496,6919,Anchorage,4564,235, +3,336,43008,6919,Anchorage,4618,235, +3,337,43008,6919,Anchorage,4618,235, +3,338,43008,6919,Anchorage,4618,235, +3,339,43008,6919,Anchorage,4618,235, +3,340,43520,6919,Anchorage,4672,235, +3,341,43520,6919,Anchorage,4672,235, +3,342,43520,6919,Anchorage,4672,235, +3,343,43520,6919,Anchorage,4672,235, +3,344,44032,6919,Anchorage,4726,235, +3,345,44032,6919,Anchorage,4726,235, +3,346,44032,6919,Anchorage,4726,235, +3,347,44032,6919,Anchorage,4726,235, +3,348,44544,6919,Anchorage,4780,235, +3,349,44544,6919,Anchorage,4780,235, +3,350,44544,6919,Anchorage,4780,235, +3,351,44544,6919,Anchorage,4780,235, +3,352,45056,6919,Anchorage,4834,235, +3,353,45056,6919,Anchorage,4834,235, +3,354,45056,6919,Anchorage,4834,235, +3,355,45056,6919,Anchorage,4834,235, +3,356,45568,6919,Anchorage,4888,235, +3,357,45568,6919,Anchorage,4888,235, +3,358,45568,6919,Anchorage,4888,235, +3,359,45568,6919,Anchorage,4888,235, +3,360,46080,6919,Anchorage,4942,235, +3,361,46080,6919,Anchorage,4942,235, +3,362,46080,6919,Anchorage,4942,235, +3,363,46080,6919,Anchorage,4942,235, +3,364,46592,6919,Anchorage,4996,235, +3,365,46592,6919,Anchorage,4996,235, +3,366,46592,6919,Anchorage,4996,235, +3,367,46592,6919,Anchorage,4996,235, +3,368,47104,6919,Anchorage,5050,235, +3,369,47104,6919,Anchorage,5050,235, +3,370,47104,6919,Anchorage,5050,235, +3,371,47104,6919,Anchorage,5050,235, +3,372,47616,6919,Anchorage,5104,235, +3,373,47616,6919,Anchorage,5104,235, +3,374,47616,6919,Anchorage,5104,235, +3,375,47616,6919,Anchorage,5104,235, +3,376,48128,6919,Anchorage,5158,235, +3,377,48128,6919,Anchorage,5158,235, +3,378,48128,6919,Anchorage,5158,235, +3,379,48128,6919,Anchorage,5158,235, +3,380,48640,6919,Anchorage,5212,235, +3,381,48640,6919,Anchorage,5212,235, +3,382,48640,6919,Anchorage,5212,235, +3,383,48640,6919,Anchorage,5212,235, +3,384,49152,6919,Anchorage,5266,235, +3,385,49152,6919,Anchorage,5266,235, +3,386,49152,6919,Anchorage,5266,235, +3,387,49152,6919,Anchorage,5266,235, +3,388,49664,6919,Anchorage,5320,235, +3,389,49664,6919,Anchorage,5320,235, +3,390,49664,6919,Anchorage,5320,235, +3,391,49664,6919,Anchorage,5320,235, +3,392,50176,6919,Anchorage,5374,235, +3,393,50176,6919,Anchorage,5374,235, +3,394,50176,6919,Anchorage,5374,235, +3,395,50176,6919,Anchorage,5374,235, +3,396,50688,6919,Anchorage,5428,235, +3,397,50688,6919,Anchorage,5428,235, +3,398,50688,6919,Anchorage,5428,235, +3,399,50688,6919,Anchorage,5428,235, +3,400,51200,6919,Anchorage,5482,235, +3,401,51200,6919,Anchorage,5482,235, +3,402,51200,6919,Anchorage,5482,235, +3,403,51200,6919,Anchorage,5482,235, +3,404,51712,6919,Anchorage,5536,235, +3,405,51712,6919,Anchorage,5536,235, +3,406,51712,6919,Anchorage,5536,235, +3,407,51712,6919,Anchorage,5536,235, +3,408,52224,6919,Anchorage,5590,235, +3,409,52224,6919,Anchorage,5590,235, +3,410,52224,6919,Anchorage,5590,235, +3,411,52224,6919,Anchorage,5590,235, +3,412,52736,6919,Anchorage,5644,235, +3,413,52736,6919,Anchorage,5644,235, +3,414,52736,6919,Anchorage,5644,235, +3,415,52736,6919,Anchorage,5644,235, +3,416,53248,6919,Anchorage,5698,235, +3,417,53248,6919,Anchorage,5698,235, +3,418,53248,6919,Anchorage,5698,235, +3,419,53248,6919,Anchorage,5698,235, +3,420,53760,6919,Anchorage,5752,235, +3,421,53760,6919,Anchorage,5752,235, +3,422,53760,6919,Anchorage,5752,235, +3,423,53760,6919,Anchorage,5752,235, +3,424,54272,6919,Anchorage,5806,235, +3,425,54272,6919,Anchorage,5806,235, +3,426,54272,6919,Anchorage,5806,235, +3,427,54272,6919,Anchorage,5806,235, +3,428,54784,6919,Anchorage,5860,235, +3,429,54784,6919,Anchorage,5860,235, +3,430,54784,6919,Anchorage,5860,235, +3,431,54784,6919,Anchorage,5860,235, +3,432,55296,6919,Anchorage,5914,235, +3,433,55296,6919,Anchorage,5914,235, +3,434,55296,6919,Anchorage,5914,235, +3,435,55296,6919,Anchorage,5914,235, +3,436,55808,6919,Anchorage,5968,235, +3,437,55808,6919,Anchorage,5968,235, +3,438,55808,6919,Anchorage,5968,235, +3,439,55808,6919,Anchorage,5968,235, +3,440,56320,6919,Anchorage,6022,235, +3,441,56320,6919,Anchorage,6022,235, +3,442,56320,6919,Anchorage,6022,235, +3,443,56320,6919,Anchorage,6022,235, +3,444,56832,6919,Anchorage,6076,235, +3,445,56832,6919,Anchorage,6076,235, +3,446,56832,6919,Anchorage,6076,235, +3,447,56832,6919,Anchorage,6076,235, +3,448,57344,6919,Anchorage,6130,235, +3,449,57344,6919,Anchorage,6130,235, +3,450,57344,6919,Anchorage,6130,235, +3,451,57344,6919,Anchorage,6130,235, +3,452,57856,6919,Anchorage,6184,235, +3,453,57856,6919,Anchorage,6184,235, +3,454,57856,6919,Anchorage,6184,235, +3,455,57856,6919,Anchorage,6184,235, +3,456,58368,6919,Anchorage,6238,235, +3,457,58368,6919,Anchorage,6238,235, +3,458,58368,6919,Anchorage,6238,235, +3,459,58368,6919,Anchorage,6238,235, +3,460,58880,6919,Anchorage,6292,235, +3,461,58880,6919,Anchorage,6292,235, +3,462,58880,6919,Anchorage,6292,235, +3,463,58880,6919,Anchorage,6292,235, +3,464,59392,6919,Anchorage,6346,235, +3,465,59392,6919,Anchorage,6346,235, +3,466,59392,6919,Anchorage,6346,235, +3,467,59392,6919,Anchorage,6346,235, +3,468,59904,6919,Anchorage,6400,235, +3,469,59904,6919,Anchorage,6400,235, +3,470,59904,6919,Anchorage,6400,235, +3,471,59904,6919,Anchorage,6400,235, +3,472,60416,6919,Anchorage,6454,235, +3,473,60416,6919,Anchorage,6454,235, +3,474,60416,6919,Anchorage,6454,235, +3,475,60416,6919,Anchorage,6454,235, +3,476,60928,6919,Anchorage,6508,235, +3,477,60928,6919,Anchorage,6508,235, +3,478,60928,6919,Anchorage,6508,235, +3,479,60928,6919,Anchorage,6508,235, +3,480,61440,6919,Anchorage,6562,235, +3,481,61440,6919,Anchorage,6562,235, +3,482,61440,6919,Anchorage,6562,235, +3,483,61440,6919,Anchorage,6562,235, +3,484,61952,6919,Anchorage,6616,235, +3,485,61952,6919,Anchorage,6616,235, +3,486,61952,6919,Anchorage,6616,235, +3,487,61952,6919,Anchorage,6616,235, +3,488,62464,6919,Anchorage,6670,235, +3,489,62464,6919,Anchorage,6670,235, +3,490,62464,6919,Anchorage,6670,235, +3,491,62464,6919,Anchorage,6670,235, +3,492,62976,6919,Anchorage,6724,235, +3,493,62976,6919,Anchorage,6724,235, +3,494,62976,6919,Anchorage,6724,235, +3,495,62976,6919,Anchorage,6724,235, +3,496,63488,6919,Anchorage,6778,235, +3,497,63488,6919,Anchorage,6778,235, +3,498,63488,6919,Anchorage,6778,235, +3,499,63488,6919,Anchorage,6778,235, +3,500,64000,6919,Anchorage,6832,235, +3,501,64000,6919,Anchorage,6832,235, +3,502,64000,6919,Anchorage,6832,235, +3,503,64000,6919,Anchorage,6832,235, +3,504,64512,6919,Anchorage,6886,235, +3,505,64512,6919,Anchorage,6886,235, +3,506,64512,6919,Anchorage,6886,235, +3,507,64512,6919,Anchorage,6886,235, +3,508,65024,6919,Anchorage,6940,235, +3,509,65024,6919,Anchorage,6940,235, +3,510,65024,6919,Anchorage,6940,235, +3,511,65024,6919,Anchorage,6940,235, +3,512,65536,6919,Anchorage,6994,235, +3,513,65536,6919,Anchorage,6994,235, +3,514,65536,6919,Anchorage,6994,235, +3,515,65536,6919,Anchorage,6994,235, +3,516,66048,6919,Anchorage,7048,235, +3,517,66048,6919,Anchorage,7048,235, +3,518,66048,6919,Anchorage,7048,235, +3,519,66048,6919,Anchorage,7048,235, +3,520,66560,6919,Anchorage,7102,235, +3,521,66560,6919,Anchorage,7102,235, +3,522,66560,6919,Anchorage,7102,235, +3,523,66560,6919,Anchorage,7102,235, +3,524,67072,6919,Anchorage,7156,235, +3,525,67072,6919,Anchorage,7156,235, +3,526,67072,6919,Anchorage,7156,235, +3,527,67072,6919,Anchorage,7156,235, +3,528,67584,6919,Anchorage,7210,235, +3,529,67584,6919,Anchorage,7210,235, +3,530,67584,6919,Anchorage,7210,235, +3,531,67584,6919,Anchorage,7210,235, +3,532,68096,6919,Anchorage,7264,235, +3,533,68096,6919,Anchorage,7264,235, +3,534,68096,6919,Anchorage,7264,235, +3,535,68096,6919,Anchorage,7264,235, +3,536,68608,6919,Anchorage,7318,235, +3,537,68608,6919,Anchorage,7318,235, +3,538,68608,6919,Anchorage,7318,235, +3,539,68608,6919,Anchorage,7318,235, +3,540,69120,6919,Anchorage,7372,235, +3,541,69120,6919,Anchorage,7372,235, +3,542,69120,6919,Anchorage,7372,235, +3,543,69120,6919,Anchorage,7372,235, +3,544,69632,6919,Anchorage,7426,235, +3,545,69632,6919,Anchorage,7426,235, +3,546,69632,6919,Anchorage,7426,235, +3,547,69632,6919,Anchorage,7426,235, +3,548,70144,6919,Anchorage,7480,235, +3,549,70144,6919,Anchorage,7480,235, +3,550,70144,6919,Anchorage,7480,235, +3,551,70144,6919,Anchorage,7480,235, +3,552,70656,6919,Anchorage,7534,235, +3,553,70656,6919,Anchorage,7534,235, +3,554,70656,6919,Anchorage,7534,235, +3,555,70656,6919,Anchorage,7534,235, +3,556,71168,6919,Anchorage,7588,235, +3,557,71168,6919,Anchorage,7588,235, +3,558,71168,6919,Anchorage,7588,235, +3,559,71168,6919,Anchorage,7588,235, +3,560,71680,6919,Anchorage,7642,235, +3,561,71680,6919,Anchorage,7642,235, +3,562,71680,6919,Anchorage,7642,235, +3,563,71680,6919,Anchorage,7642,235, +3,564,72192,6919,Anchorage,7696,235, +3,565,72192,6919,Anchorage,7696,235, +3,566,72192,6919,Anchorage,7696,235, +3,567,72192,6919,Anchorage,7696,235, +3,568,72704,6919,Anchorage,7750,235, +3,569,72704,6919,Anchorage,7750,235, +3,570,72704,6919,Anchorage,7750,235, +3,571,72704,6919,Anchorage,7750,235, +3,572,73216,6919,Anchorage,7804,235, +3,573,73216,6919,Anchorage,7804,235, +3,574,73216,6919,Anchorage,7804,235, +3,575,73216,6919,Anchorage,7804,235, +3,576,73728,6919,Anchorage,7858,235, +3,577,73728,6919,Anchorage,7858,235, +3,578,73728,6919,Anchorage,7858,235, +3,579,73728,6919,Anchorage,7858,235, +3,580,74240,6919,Anchorage,7912,235, +3,581,74240,6919,Anchorage,7912,235, +3,582,74240,6919,Anchorage,7912,235, +3,583,74240,6919,Anchorage,7912,235, +3,584,74752,6919,Anchorage,7966,235, +3,585,74752,6919,Anchorage,7966,235, +3,586,74752,6919,Anchorage,7966,235, +3,587,74752,6919,Anchorage,7966,235, +3,588,75264,6919,Anchorage,8020,235, +3,589,75264,6919,Anchorage,8020,235, +3,590,75264,6919,Anchorage,8020,235, +3,591,75264,6919,Anchorage,8020,235, +3,592,75776,6919,Anchorage,8074,235, +3,593,75776,6919,Anchorage,8074,235, +3,594,75776,6919,Anchorage,8074,235, +3,595,75776,6919,Anchorage,8074,235, +3,596,76288,6919,Anchorage,8128,235, +3,597,76288,6919,Anchorage,8128,235, +3,598,76288,6919,Anchorage,8128,235, +3,599,76288,6919,Anchorage,8128,235, +3,600,76800,6919,Anchorage,8182,235, +3,601,76800,6919,Anchorage,8182,235, +3,602,76800,6919,Anchorage,8182,235, +3,603,76800,6919,Anchorage,8182,235, +3,604,77312,6919,Anchorage,8236,235, +3,605,77312,6919,Anchorage,8236,235, +3,606,77312,6919,Anchorage,8236,235, +3,607,77312,6919,Anchorage,8236,235, +3,608,77824,6919,Anchorage,8290,235, +3,609,77824,6919,Anchorage,8290,235, +3,610,77824,6919,Anchorage,8290,235, +3,611,77824,6919,Anchorage,8290,235, +3,612,78336,6919,Anchorage,8344,235, +3,613,78336,6919,Anchorage,8344,235, +3,614,78336,6919,Anchorage,8344,235, +3,615,78336,6919,Anchorage,8344,235, +3,616,78848,6919,Anchorage,8398,235, +3,617,78848,6919,Anchorage,8398,235, +3,618,78848,6919,Anchorage,8398,235, +3,619,78848,6919,Anchorage,8398,235, +3,620,79360,6919,Anchorage,8452,235, +3,621,79360,6919,Anchorage,8452,235, +3,622,79360,6919,Anchorage,8452,235, +3,623,79360,6919,Anchorage,8452,235, +3,624,79872,6919,Anchorage,8506,235, +3,625,79872,6919,Anchorage,8506,235, +3,626,79872,6919,Anchorage,8506,235, +3,627,79872,6919,Anchorage,8506,235, +3,628,80384,6919,Anchorage,8560,235, +3,629,80384,6919,Anchorage,8560,235, +3,630,80384,6919,Anchorage,8560,235, +3,631,80384,6919,Anchorage,8560,235, +3,632,80896,6919,Anchorage,8613,235, +3,633,80896,6919,Anchorage,8613,235, +3,634,80896,6919,Anchorage,8613,235, +3,635,80896,6919,Anchorage,8613,235, +3,636,81408,6919,Anchorage,8666,235, +3,637,81408,6919,Anchorage,8666,235, +3,638,81408,6919,Anchorage,8666,235, +3,639,81408,6919,Anchorage,8666,235, +3,640,81920,6919,Anchorage,8719,235, +3,641,81920,6919,Anchorage,8719,235, +3,642,81920,6919,Anchorage,8719,235, +3,643,81920,6919,Anchorage,8719,235, +3,644,82432,6919,Anchorage,8772,235, +3,645,82432,6919,Anchorage,8772,235, +3,646,82432,6919,Anchorage,8772,235, +3,647,82432,6919,Anchorage,8772,235, +3,648,82944,6919,Anchorage,8825,235, +3,649,82944,6919,Anchorage,8825,235, +3,650,82944,6919,Anchorage,8825,235, +3,651,82944,6919,Anchorage,8825,235, +3,652,83456,6919,Anchorage,8878,235, +3,653,83456,6919,Anchorage,8878,235, +3,654,83456,6919,Anchorage,8878,235, +3,655,83456,6919,Anchorage,8878,235, +3,656,83968,6919,Anchorage,8931,235, +3,657,83968,6919,Anchorage,8931,235, +3,658,83968,6919,Anchorage,8931,235, +3,659,83968,6919,Anchorage,8931,235, +3,660,84480,6919,Anchorage,8984,235, +3,661,84480,6919,Anchorage,8984,235, +3,662,84480,6919,Anchorage,8984,235, +3,663,84480,6919,Anchorage,8984,235, +3,664,84992,6919,Anchorage,9037,235, +3,665,84992,6919,Anchorage,9037,235, +3,666,84992,6919,Anchorage,9037,235, +3,667,84992,6919,Anchorage,9037,235, +3,668,85504,6919,Anchorage,9089,235, +3,669,85504,6919,Anchorage,9089,235, +3,670,85504,6919,Anchorage,9089,235, +3,671,85504,6919,Anchorage,9089,235, +3,672,86016,6919,Anchorage,9141,235, +3,673,86016,6919,Anchorage,9141,235, +3,674,86016,6919,Anchorage,9141,235, +3,675,86016,6919,Anchorage,9141,235, +3,676,86528,6919,Anchorage,9193,235, +3,677,86528,6919,Anchorage,9193,235, +3,678,86528,6919,Anchorage,9193,235, +3,679,86528,6919,Anchorage,9193,235, +3,680,87040,6919,Anchorage,9245,235, +3,681,87040,6919,Anchorage,9245,235, +3,682,87040,6919,Anchorage,9245,235, +3,683,87040,6919,Anchorage,9245,235, +3,684,87552,6919,Anchorage,9297,235, +3,685,87552,6919,Anchorage,9297,235, +3,686,87552,6919,Anchorage,9297,235, +3,687,87552,6919,Anchorage,9297,235, +3,688,88064,6919,Anchorage,9349,235, +3,689,88064,6919,Anchorage,9349,235, +3,690,88064,6919,Anchorage,9349,235, +3,691,88064,6919,Anchorage,9349,235, +3,692,88576,6919,Anchorage,9401,235, +3,693,88576,6919,Anchorage,9401,235, +3,694,88576,6919,Anchorage,9401,235, +3,695,88576,6919,Anchorage,9401,235, +3,696,89088,6919,Anchorage,9453,235, +3,697,89088,6919,Anchorage,9453,235, +3,698,89088,6919,Anchorage,9453,235, +3,699,89088,6919,Anchorage,9453,235, +3,700,89600,6919,Anchorage,9505,235, +3,701,89600,6919,Anchorage,9505,235, +3,702,89600,6919,Anchorage,9505,235, +3,703,89600,6919,Anchorage,9505,235, +3,704,90112,6919,Anchorage,9556,235, +3,705,90112,6919,Anchorage,9556,235, +3,706,90112,6919,Anchorage,9556,235, +3,707,90112,6919,Anchorage,9556,235, +3,708,90624,6919,Anchorage,9607,235, +3,709,90624,6919,Anchorage,9607,235, +3,710,90624,6919,Anchorage,9607,235, +3,711,90624,6919,Anchorage,9607,235, +3,712,91136,6919,Anchorage,9658,235, +3,713,91136,6919,Anchorage,9658,235, +3,714,91136,6919,Anchorage,9658,235, +3,715,91136,6919,Anchorage,9658,235, +3,716,91648,6919,Anchorage,9709,235, +3,717,91648,6919,Anchorage,9709,235, +3,718,91648,6919,Anchorage,9709,235, +3,719,91648,6919,Anchorage,9709,235, +3,720,92160,6919,Anchorage,9760,235, +3,721,92160,6919,Anchorage,9760,235, +3,722,92160,6919,Anchorage,9760,235, +3,723,92160,6919,Anchorage,9760,235, +3,724,92672,3471,Honolulu,1,235, +3,725,92672,3471,Honolulu,1,235, +3,726,92672,3471,Honolulu,1,235, +3,727,92672,3471,Honolulu,1,235, +3,728,93184,3471,Honolulu,4,235, +3,729,93184,3471,Honolulu,4,235, +3,730,93184,3471,Honolulu,4,235, +3,731,93184,3471,Honolulu,4,235, +3,732,93696,3471,Honolulu,11,235, +3,733,93696,3471,Honolulu,11,235, +3,734,93696,3471,Honolulu,11,235, +3,735,93696,3471,Honolulu,11,235, +3,736,94208,3471,Honolulu,21,235, +3,737,94208,3471,Honolulu,21,235, +3,738,94208,3471,Honolulu,21,235, +3,739,94208,3471,Honolulu,21,235, +3,740,94720,3471,Honolulu,35,235, +3,741,94720,3471,Honolulu,35,235, +3,742,94720,3471,Honolulu,35,235, +3,743,94720,3471,Honolulu,35,235, +3,744,95232,3471,Honolulu,53,235, +3,745,95232,3471,Honolulu,53,235, +3,746,95232,3471,Honolulu,53,235, +3,747,95232,3471,Honolulu,53,235, +3,748,95744,3471,Honolulu,74,235, +3,749,95744,3471,Honolulu,74,235, +3,750,95744,3471,Honolulu,74,235, +3,751,95744,3471,Honolulu,74,235, +3,752,96256,3471,Honolulu,99,235, +3,753,96256,3471,Honolulu,99,235, +3,754,96256,3471,Honolulu,99,235, +3,755,96256,3471,Honolulu,99,235, +3,756,96768,3471,Honolulu,128,235, +3,757,96768,3471,Honolulu,128,235, +3,758,96768,3471,Honolulu,128,235, +3,759,96768,3471,Honolulu,128,235, +3,760,97280,3471,Honolulu,160,235, +3,761,97280,3471,Honolulu,160,235, +3,762,97280,3471,Honolulu,160,235, +3,763,97280,3471,Honolulu,160,235, +3,764,97792,3471,Honolulu,196,235, +3,765,97792,3471,Honolulu,196,235, +3,766,97792,3471,Honolulu,196,235, +3,767,97792,3471,Honolulu,196,235, +3,768,98304,3471,Honolulu,236,235, +3,769,98304,3471,Honolulu,236,235, +3,770,98304,3471,Honolulu,236,235, +3,771,98304,3471,Honolulu,236,235, +3,772,98816,3471,Honolulu,280,235, +3,773,98816,3471,Honolulu,280,235, +3,774,98816,3471,Honolulu,280,235, +3,775,98816,3471,Honolulu,280,235, +3,776,99328,3471,Honolulu,327,235, +3,777,99328,3471,Honolulu,327,235, +3,778,99328,3471,Honolulu,327,235, +3,779,99328,3471,Honolulu,327,235, +3,780,99840,3471,Honolulu,377,235, +3,781,99840,3471,Honolulu,377,235, +3,782,99840,3471,Honolulu,377,235, +3,783,99840,3471,Honolulu,377,235, +3,784,100352,3471,Honolulu,428,235, +3,785,100352,3471,Honolulu,428,235, +3,786,100352,3471,Honolulu,428,235, +3,787,100352,3471,Honolulu,428,235, +3,788,100864,3471,Honolulu,479,235, +3,789,100864,3471,Honolulu,479,235, +3,790,100864,3471,Honolulu,479,235, +3,791,100864,3471,Honolulu,479,235, +3,792,101376,3471,Honolulu,530,235, +3,793,101376,3471,Honolulu,530,235, +3,794,101376,3471,Honolulu,530,235, +3,795,101376,3471,Honolulu,530,235, +3,796,101888,3471,Honolulu,582,235, +3,797,101888,3471,Honolulu,582,235, +3,798,101888,3471,Honolulu,582,235, +3,799,101888,3471,Honolulu,582,235, +3,800,102400,3471,Honolulu,634,235, +3,801,102400,3471,Honolulu,634,235, +3,802,102400,3471,Honolulu,634,235, +3,803,102400,3471,Honolulu,634,235, +3,804,102912,3471,Honolulu,687,235, +3,805,102912,3471,Honolulu,687,235, +3,806,102912,3471,Honolulu,687,235, +3,807,102912,3471,Honolulu,687,235, +3,808,103424,3471,Honolulu,740,235, +3,809,103424,3471,Honolulu,740,235, +3,810,103424,3471,Honolulu,740,235, +3,811,103424,3471,Honolulu,740,235, +3,812,103936,3471,Honolulu,793,235, +3,813,103936,3471,Honolulu,793,235, +3,814,103936,3471,Honolulu,793,235, +3,815,103936,3471,Honolulu,793,235, +3,816,104448,3471,Honolulu,847,235, +3,817,104448,3471,Honolulu,847,235, +3,818,104448,3471,Honolulu,847,235, +3,819,104448,3471,Honolulu,847,235, +3,820,104960,3471,Honolulu,901,235, +3,821,104960,3471,Honolulu,901,235, +3,822,104960,3471,Honolulu,901,235, +3,823,104960,3471,Honolulu,901,235, +3,824,105472,3471,Honolulu,956,235, +3,825,105472,3471,Honolulu,956,235, +3,826,105472,3471,Honolulu,956,235, +3,827,105472,3471,Honolulu,956,235, +3,828,105984,3471,Honolulu,1011,235, +3,829,105984,3471,Honolulu,1011,235, +3,830,105984,3471,Honolulu,1011,235, +3,831,105984,3471,Honolulu,1011,235, +3,832,106496,3471,Honolulu,1066,235, +3,833,106496,3471,Honolulu,1066,235, +3,834,106496,3471,Honolulu,1066,235, +3,835,106496,3471,Honolulu,1066,235, +3,836,107008,3471,Honolulu,1122,235, +3,837,107008,3471,Honolulu,1122,235, +3,838,107008,3471,Honolulu,1122,235, +3,839,107008,3471,Honolulu,1122,235, +3,840,107520,3471,Honolulu,1178,235, +3,841,107520,3471,Honolulu,1178,235, +3,842,107520,3471,Honolulu,1178,235, +3,843,107520,3471,Honolulu,1178,235, +3,844,108032,3471,Honolulu,1235,235, +3,845,108032,3471,Honolulu,1235,235, +3,846,108032,3471,Honolulu,1235,235, +3,847,108032,3471,Honolulu,1235,235, +3,848,108544,3471,Honolulu,1292,235, +3,849,108544,3471,Honolulu,1292,235, +3,850,108544,3471,Honolulu,1292,235, +3,851,108544,3471,Honolulu,1292,235, +3,852,109056,3471,Honolulu,1349,235, +3,853,109056,3471,Honolulu,1349,235, +3,854,109056,3471,Honolulu,1349,235, +3,855,109056,3471,Honolulu,1349,235, +3,856,109568,3471,Honolulu,1407,235, +3,857,109568,3471,Honolulu,1407,235, +3,858,109568,3471,Honolulu,1407,235, +3,859,109568,3471,Honolulu,1407,235, +3,860,110080,3471,Honolulu,1465,235, +3,861,110080,3471,Honolulu,1465,235, +3,862,110080,3471,Honolulu,1465,235, +3,863,110080,3471,Honolulu,1465,235, +3,864,110592,3471,Honolulu,1524,235, +3,865,110592,3471,Honolulu,1524,235, +3,866,110592,3471,Honolulu,1524,235, +3,867,110592,3471,Honolulu,1524,235, +3,868,111104,3471,Honolulu,1583,235, +3,869,111104,3471,Honolulu,1583,235, +3,870,111104,3471,Honolulu,1583,235, +3,871,111104,3471,Honolulu,1583,235, +3,872,111616,3471,Honolulu,1643,235, +3,873,111616,3471,Honolulu,1643,235, +3,874,111616,3471,Honolulu,1643,235, +3,875,111616,3471,Honolulu,1643,235, +3,876,112128,3471,Honolulu,1703,235, +3,877,112128,3471,Honolulu,1703,235, +3,878,112128,3471,Honolulu,1703,235, +3,879,112128,3471,Honolulu,1703,235, +3,880,112640,3471,Honolulu,1763,235, +3,881,112640,3471,Honolulu,1763,235, +3,882,112640,3471,Honolulu,1763,235, +3,883,112640,3471,Honolulu,1763,235, +3,884,113152,3471,Honolulu,1824,235, +3,885,113152,3471,Honolulu,1824,235, +3,886,113152,3471,Honolulu,1824,235, +3,887,113152,3471,Honolulu,1824,235, +3,888,113664,3471,Honolulu,1885,235, +3,889,113664,3471,Honolulu,1885,235, +3,890,113664,3471,Honolulu,1885,235, +3,891,113664,3471,Honolulu,1885,235, +3,892,114176,3471,Honolulu,1946,235, +3,893,114176,3471,Honolulu,1946,235, +3,894,114176,3471,Honolulu,1946,235, +3,895,114176,3471,Honolulu,1946,235, +3,896,114688,3471,Honolulu,2008,235, +3,897,114688,3471,Honolulu,2008,235, +3,898,114688,3471,Honolulu,2008,235, +3,899,114688,3471,Honolulu,2008,235, +3,900,115200,3471,Honolulu,2070,235, +3,901,115200,3471,Honolulu,2070,235, +3,902,115200,3471,Honolulu,2070,235, +3,903,115200,3471,Honolulu,2070,235, +3,904,115712,3471,Honolulu,2132,235, +3,905,115712,3471,Honolulu,2132,235, +3,906,115712,3471,Honolulu,2132,235, +3,907,115712,3471,Honolulu,2132,235, +3,908,116224,3471,Honolulu,2195,235, +3,909,116224,3471,Honolulu,2195,235, +3,910,116224,3471,Honolulu,2195,235, +3,911,116224,3471,Honolulu,2195,235, +3,912,116736,3471,Honolulu,2258,235, +3,913,116736,3471,Honolulu,2258,235, +3,914,116736,3471,Honolulu,2258,235, +3,915,116736,3471,Honolulu,2258,235, +3,916,117248,3471,Honolulu,2321,235, +3,917,117248,3471,Honolulu,2321,235, +3,918,117248,3471,Honolulu,2321,235, +3,919,117248,3471,Honolulu,2321,235, +3,920,117760,3471,Honolulu,2385,235, +3,921,117760,3471,Honolulu,2385,235, +3,922,117760,3471,Honolulu,2385,235, +3,923,117760,3471,Honolulu,2385,235, +3,924,118272,3471,Honolulu,2449,235, +3,925,118272,3471,Honolulu,2449,235, +3,926,118272,3471,Honolulu,2449,235, +3,927,118272,3471,Honolulu,2449,235, +3,928,118784,3471,Honolulu,2513,235, +3,929,118784,3471,Honolulu,2513,235, +3,930,118784,3471,Honolulu,2513,235, +3,931,118784,3471,Honolulu,2513,235, +3,932,119296,3471,Honolulu,2578,235, +3,933,119296,3471,Honolulu,2578,235, +3,934,119296,3471,Honolulu,2578,235, +3,935,119296,3471,Honolulu,2578,235, +3,936,119808,3471,Honolulu,2643,235, +3,937,119808,3471,Honolulu,2643,235, +3,938,119808,3471,Honolulu,2643,235, +3,939,119808,3471,Honolulu,2643,235, +3,940,120320,3471,Honolulu,2708,235, +3,941,120320,3471,Honolulu,2708,235, +3,942,120320,3471,Honolulu,2708,235, +3,943,120320,3471,Honolulu,2708,235, +3,944,120832,3471,Honolulu,2773,235, +3,945,120832,3471,Honolulu,2773,235, +3,946,120832,3471,Honolulu,2773,235, +3,947,120832,3471,Honolulu,2773,235, +3,948,121344,3208,Atafu Village,1,223, +3,949,121344,3208,Atafu Village,1,223, +3,950,121344,3208,Atafu Village,1,223, +3,951,121344,3208,Atafu Village,1,223, +3,952,121856,3208,Atafu Village,2,223, +3,953,121856,3208,Atafu Village,2,223, +3,954,121856,3208,Atafu Village,2,223, +3,955,121856,3208,Atafu Village,2,223, +3,956,122368,3208,Atafu Village,5,223, +3,957,122368,3208,Atafu Village,5,223, +3,958,122368,3208,Atafu Village,5,223, +3,959,122368,3208,Atafu Village,5,223, +3,960,122880,3208,Atafu Village,10,223, +3,961,122880,3208,Atafu Village,10,223, +3,962,122880,3208,Atafu Village,10,223, +3,963,122880,3208,Atafu Village,10,223, +3,964,123392,3208,Atafu Village,17,223, +3,965,123392,3208,Atafu Village,17,223, +3,966,123392,3208,Atafu Village,17,223, +3,967,123392,3208,Atafu Village,17,223, +3,968,123904,3208,Atafu Village,26,223, +3,969,123904,3208,Atafu Village,26,223, +3,970,123904,3208,Atafu Village,26,223, +3,971,123904,3208,Atafu Village,26,223, +3,972,124416,3208,Atafu Village,37,223, +3,973,124416,3208,Atafu Village,37,223, +3,974,124416,3208,Atafu Village,37,223, +3,975,124416,3208,Atafu Village,37,223, +3,976,124928,3208,Atafu Village,50,223, +3,977,124928,3208,Atafu Village,50,223, +3,978,124928,3208,Atafu Village,50,223, +3,979,124928,3208,Atafu Village,50,223, +3,980,125440,3208,Atafu Village,65,223, +3,981,125440,3208,Atafu Village,65,223, +3,982,125440,3208,Atafu Village,65,223, +3,983,125440,3208,Atafu Village,65,223, +3,984,125952,3208,Atafu Village,82,223, +3,985,125952,3208,Atafu Village,82,223, +3,986,125952,3208,Atafu Village,82,223, +3,987,125952,3208,Atafu Village,82,223, +3,988,126464,3208,Atafu Village,101,223, +3,989,126464,3208,Atafu Village,101,223, +3,990,126464,3208,Atafu Village,101,223, +3,991,126464,3208,Atafu Village,101,223, +3,992,126976,3208,Atafu Village,122,223, +3,993,126976,3208,Atafu Village,122,223, +3,994,126976,3208,Atafu Village,122,223, +3,995,126976,3208,Atafu Village,122,223, +3,996,127488,3208,Atafu Village,145,223, +3,997,127488,3208,Atafu Village,145,223, +3,998,127488,3208,Atafu Village,145,223, +3,999,127488,3208,Atafu Village,145,223, +3,1000,128000,3208,Atafu Village,170,223, +3,1001,128000,3208,Atafu Village,170,223, +3,1002,128000,3208,Atafu Village,170,223, +3,1003,128000,3208,Atafu Village,170,223, +3,1004,128512,3208,Atafu Village,194,223, +3,1005,128512,3208,Atafu Village,194,223, +3,1006,128512,3208,Atafu Village,194,223, +3,1007,128512,3208,Atafu Village,194,223, +3,1008,129024,3208,Atafu Village,218,223, +3,1009,129024,3208,Atafu Village,218,223, +3,1010,129024,3208,Atafu Village,218,223, +3,1011,129024,3208,Atafu Village,218,223, +3,1012,129536,3208,Atafu Village,241,223, +3,1013,129536,3208,Atafu Village,241,223, +3,1014,129536,3208,Atafu Village,241,223, +3,1015,129536,3208,Atafu Village,241,223, +3,1016,130048,3208,Atafu Village,263,223, +3,1017,130048,3208,Atafu Village,263,223, +3,1018,130048,3208,Atafu Village,263,223, +3,1019,130048,3208,Atafu Village,263,223, +3,1020,130560,3208,Atafu Village,285,223, +3,1021,130560,3208,Atafu Village,285,223, +3,1022,130560,3208,Atafu Village,285,223, +3,1023,130560,3208,Atafu Village,285,223, +3,1024,131072,3208,Atafu Village,306,223, +3,1025,131072,3208,Atafu Village,306,223, +3,1026,131072,3208,Atafu Village,306,223, +3,1027,131072,3208,Atafu Village,306,223, +3,1028,131584,3208,Atafu Village,326,223, +3,1029,131584,3208,Atafu Village,326,223, +3,1030,131584,3208,Atafu Village,326,223, +3,1031,131584,3208,Atafu Village,326,223, +3,1032,132096,3208,Atafu Village,346,223, +3,1033,132096,3208,Atafu Village,346,223, +3,1034,132096,3208,Atafu Village,346,223, +3,1035,132096,3208,Atafu Village,346,223, +3,1036,132608,3208,Atafu Village,365,223, +3,1037,132608,3208,Atafu Village,365,223, +3,1038,132608,3208,Atafu Village,365,223, +3,1039,132608,3208,Atafu Village,365,223, +3,1040,133120,3208,Atafu Village,383,223, +3,1041,133120,3208,Atafu Village,383,223, +3,1042,133120,3208,Atafu Village,383,223, +3,1043,133120,3208,Atafu Village,383,223, +3,1044,133632,3208,Atafu Village,401,223, +3,1045,133632,3208,Atafu Village,401,223, +3,1046,133632,3208,Atafu Village,401,223, +3,1047,133632,3208,Atafu Village,401,223, +3,1048,134144,3208,Atafu Village,418,223, +3,1049,134144,3208,Atafu Village,418,223, +3,1050,134144,3208,Atafu Village,418,223, +3,1051,134144,3208,Atafu Village,418,223, +3,1052,134656,3208,Atafu Village,434,223, +3,1053,134656,3208,Atafu Village,434,223, +3,1054,134656,3208,Atafu Village,434,223, +3,1055,134656,3208,Atafu Village,434,223, +3,1056,135168,3208,Atafu Village,450,223, +3,1057,135168,3208,Atafu Village,450,223, +3,1058,135168,3208,Atafu Village,450,223, +3,1059,135168,3208,Atafu Village,450,223, +3,1060,135680,3610,Mata-Utu,1,245, +3,1061,135680,3610,Mata-Utu,1,245, +3,1062,135680,3610,Mata-Utu,1,245, +3,1063,135680,3610,Mata-Utu,1,245, +3,1064,136192,3610,Mata-Utu,2,245, +3,1065,136192,3610,Mata-Utu,2,245, +3,1066,136192,3610,Mata-Utu,2,245, +3,1067,136192,3610,Mata-Utu,2,245, +3,1068,136704,3610,Mata-Utu,5,245, +3,1069,136704,3610,Mata-Utu,5,245, +3,1070,136704,3610,Mata-Utu,5,245, +3,1071,136704,3610,Mata-Utu,5,245, +3,1072,137216,3610,Mata-Utu,9,245, +3,1073,137216,3610,Mata-Utu,9,245, +3,1074,137216,3610,Mata-Utu,9,245, +3,1075,137216,3610,Mata-Utu,9,245, +3,1076,137728,3610,Mata-Utu,14,245, +3,1077,137728,3610,Mata-Utu,14,245, +3,1078,137728,3610,Mata-Utu,14,245, +3,1079,137728,3610,Mata-Utu,14,245, +3,1080,138240,3609,Leava,1,245, +3,1081,138240,3609,Leava,1,245, +3,1082,138240,3609,Leava,1,245, +3,1083,138240,3609,Leava,1,245, +3,1084,138752,3609,Leava,2,245, +3,1085,138752,3609,Leava,2,245, +3,1086,138752,3609,Leava,2,245, +3,1087,138752,3609,Leava,2,245, +3,1088,139264,3609,Leava,3,245, +3,1089,139264,3609,Leava,3,245, +3,1090,139264,3609,Leava,3,245, +3,1091,139264,3609,Leava,3,245, +3,1092,139776,3609,Leava,5,245, +3,1093,139776,3609,Leava,5,245, +3,1094,139776,3609,Leava,5,245, +3,1095,139776,3609,Leava,5,245, +3,1096,140288,3609,Leava,7,245, +3,1097,140288,3609,Leava,7,245, +3,1098,140288,3609,Leava,7,245, +3,1099,140288,3609,Leava,7,245, +3,1100,140800,3609,Leava,10,245, +3,1101,140800,3609,Leava,10,245, +3,1102,140800,3609,Leava,10,245, +3,1103,140800,3609,Leava,10,245, +3,1104,141312,3609,Leava,13,245, +3,1105,141312,3609,Leava,13,245, +3,1106,141312,3609,Leava,13,245, +3,1107,141312,3609,Leava,13,245, +3,1108,141824,3609,Leava,16,245, +3,1109,141824,3609,Leava,16,245, +3,1110,141824,3609,Leava,16,245, +3,1111,141824,3609,Leava,16,245, +3,1112,142336,3609,Leava,19,245, +3,1113,142336,3609,Leava,19,245, +3,1114,142336,3609,Leava,19,245, +3,1115,142336,3609,Leava,19,245, +3,1116,142848,3609,Leava,21,245, +3,1117,142848,3609,Leava,21,245, +3,1118,142848,3609,Leava,21,245, +3,1119,142848,3609,Leava,21,245, +3,1120,143360,3609,Leava,23,245, +3,1121,143360,3609,Leava,23,245, +3,1122,143360,3609,Leava,23,245, +3,1123,143360,3609,Leava,23,245, +3,1124,143872,3609,Leava,25,245, +3,1125,143872,3609,Leava,25,245, +3,1126,143872,3609,Leava,25,245, +3,1127,143872,3609,Leava,25,245, +3,1128,144384,3609,Leava,26,245, +3,1129,144384,3609,Leava,26,245, +3,1130,144384,3609,Leava,26,245, +3,1131,144384,3609,Leava,26,245, +3,1132,144896,3253,Nuku‘alofa,4,224, +3,1133,144896,3253,Nuku‘alofa,4,224, +3,1134,144896,3253,Nuku‘alofa,4,224, +3,1135,144896,3253,Nuku‘alofa,4,224, +3,1136,145408,3253,Nuku‘alofa,9,224, +3,1137,145408,3253,Nuku‘alofa,9,224, +3,1138,145408,3253,Nuku‘alofa,9,224, +3,1139,145408,3253,Nuku‘alofa,9,224, +3,1140,145920,3253,Nuku‘alofa,16,224, +3,1141,145920,3253,Nuku‘alofa,16,224, +3,1142,145920,3253,Nuku‘alofa,16,224, +3,1143,145920,3253,Nuku‘alofa,16,224, +3,1144,146432,3253,Nuku‘alofa,24,224, +3,1145,146432,3253,Nuku‘alofa,24,224, +3,1146,146432,3253,Nuku‘alofa,24,224, +3,1147,146432,3253,Nuku‘alofa,24,224, +3,1148,146944,3253,Nuku‘alofa,32,224, +3,1149,146944,3253,Nuku‘alofa,32,224, +3,1150,146944,3253,Nuku‘alofa,32,224, +3,1151,146944,3253,Nuku‘alofa,32,224, +3,1152,147456,3253,Nuku‘alofa,39,224, +3,1153,147456,3253,Nuku‘alofa,39,224, +3,1154,147456,3253,Nuku‘alofa,39,224, +3,1155,147456,3253,Nuku‘alofa,39,224, +3,1156,147968,3253,Nuku‘alofa,45,224, +3,1157,147968,3253,Nuku‘alofa,45,224, +3,1158,147968,3253,Nuku‘alofa,45,224, +3,1159,147968,3253,Nuku‘alofa,45,224, +3,1160,148480,3253,Nuku‘alofa,51,224, +3,1161,148480,3253,Nuku‘alofa,51,224, +3,1162,148480,3253,Nuku‘alofa,51,224, +3,1163,148480,3253,Nuku‘alofa,51,224, +3,1164,148992,3253,Nuku‘alofa,56,224, +3,1165,148992,3253,Nuku‘alofa,56,224, +3,1166,148992,3253,Nuku‘alofa,56,224, +3,1167,148992,3253,Nuku‘alofa,56,224, +3,1168,149504,3253,Nuku‘alofa,60,224, +3,1169,149504,3253,Nuku‘alofa,60,224, +3,1170,149504,3253,Nuku‘alofa,60,224, +3,1171,149504,3253,Nuku‘alofa,60,224, +3,1172,150016,3253,Nuku‘alofa,63,224, +3,1173,150016,3253,Nuku‘alofa,63,224, +3,1174,150016,3253,Nuku‘alofa,63,224, +3,1175,150016,3253,Nuku‘alofa,63,224, +3,1176,150528,3253,Nuku‘alofa,66,224, +3,1177,150528,3253,Nuku‘alofa,66,224, +3,1178,150528,3253,Nuku‘alofa,66,224, +3,1179,150528,3253,Nuku‘alofa,66,224, +3,1180,151040,3253,Nuku‘alofa,68,224, +3,1181,151040,3253,Nuku‘alofa,68,224, +3,1182,151040,3253,Nuku‘alofa,68,224, +3,1183,151040,3253,Nuku‘alofa,68,224, +3,1184,151552,3252,‘Ohonua,88,224, +3,1185,151552,3252,‘Ohonua,88,224, +3,1186,151552,3252,‘Ohonua,88,224, +3,1187,151552,3252,‘Ohonua,88,224, +3,1188,152064,3252,‘Ohonua,104,224, +3,1189,152064,3252,‘Ohonua,104,224, +3,1190,152064,3252,‘Ohonua,104,224, +3,1191,152064,3252,‘Ohonua,104,224, +3,1192,152576,3252,‘Ohonua,120,224, +3,1193,152576,3252,‘Ohonua,120,224, +3,1194,152576,3252,‘Ohonua,120,224, +3,1195,152576,3252,‘Ohonua,120,224, +3,1196,153088,3252,‘Ohonua,137,224, +3,1197,153088,3252,‘Ohonua,137,224, +3,1198,153088,3252,‘Ohonua,137,224, +3,1199,153088,3252,‘Ohonua,137,224, +3,1200,153600,3252,‘Ohonua,154,224, +3,1201,153600,3252,‘Ohonua,154,224, +3,1202,153600,3252,‘Ohonua,154,224, +3,1203,153600,3252,‘Ohonua,154,224, +3,1204,154112,3252,‘Ohonua,172,224, +3,1205,154112,3252,‘Ohonua,172,224, +3,1206,154112,3252,‘Ohonua,172,224, +3,1207,154112,3252,‘Ohonua,172,224, +3,1208,154624,3252,‘Ohonua,190,224, +3,1209,154624,3252,‘Ohonua,190,224, +3,1210,154624,3252,‘Ohonua,190,224, +3,1211,154624,3252,‘Ohonua,190,224, +3,1212,155136,3252,‘Ohonua,208,224, +3,1213,155136,3252,‘Ohonua,208,224, +3,1214,155136,3252,‘Ohonua,208,224, +3,1215,155136,3252,‘Ohonua,208,224, +3,1216,155648,3252,‘Ohonua,226,224, +3,1217,155648,3252,‘Ohonua,226,224, +3,1218,155648,3252,‘Ohonua,226,224, +3,1219,155648,3252,‘Ohonua,226,224, +3,1220,156160,2317,Waitangi,1,155, +3,1221,156160,2317,Waitangi,1,155, +3,1222,156160,2317,Waitangi,1,155, +3,1223,156160,2317,Waitangi,1,155, +3,1224,156672,2317,Waitangi,6,155, +3,1225,156672,2317,Waitangi,6,155, +3,1226,156672,2317,Waitangi,6,155, +3,1227,156672,2317,Waitangi,6,155, +3,1228,157184,2317,Waitangi,23,155, +3,1229,157184,2317,Waitangi,23,155, +3,1230,157184,2317,Waitangi,23,155, +3,1231,157184,2317,Waitangi,23,155, +3,1232,157696,2317,Waitangi,42,155, +3,1233,157696,2317,Waitangi,42,155, +3,1234,157696,2317,Waitangi,42,155, +3,1235,157696,2317,Waitangi,42,155, +3,1236,158208,2317,Waitangi,62,155, +3,1237,158208,2317,Waitangi,62,155, +3,1238,158208,2317,Waitangi,62,155, +3,1239,158208,2317,Waitangi,62,155, +3,1240,158720,2317,Waitangi,83,155, +3,1241,158720,2317,Waitangi,83,155, +3,1242,158720,2317,Waitangi,83,155, +3,1243,158720,2317,Waitangi,83,155, +3,1244,159232,2317,Waitangi,105,155, +3,1245,159232,2317,Waitangi,105,155, +3,1246,159232,2317,Waitangi,105,155, +3,1247,159232,2317,Waitangi,105,155, +3,1248,159744,2317,Waitangi,128,155, +3,1249,159744,2317,Waitangi,128,155, +3,1250,159744,2317,Waitangi,128,155, +3,1251,159744,2317,Waitangi,128,155, +3,1252,160256,2317,Waitangi,152,155, +3,1253,160256,2317,Waitangi,152,155, +3,1254,160256,2317,Waitangi,152,155, +3,1255,160256,2317,Waitangi,152,155, +3,1256,160768,2317,Waitangi,177,155, +3,1257,160768,2317,Waitangi,177,155, +3,1258,160768,2317,Waitangi,177,155, +3,1259,160768,2317,Waitangi,177,155, +3,1260,161280,2317,Waitangi,203,155, +3,1261,161280,2317,Waitangi,203,155, +3,1262,161280,2317,Waitangi,203,155, +3,1263,161280,2317,Waitangi,203,155, +3,1264,161792,2317,Waitangi,230,155, +3,1265,161792,2317,Waitangi,230,155, +3,1266,161792,2317,Waitangi,230,155, +3,1267,161792,2317,Waitangi,230,155, +3,1268,162304,2317,Waitangi,258,155, +3,1269,162304,2317,Waitangi,258,155, +3,1270,162304,2317,Waitangi,258,155, +3,1271,162304,2317,Waitangi,258,155, +3,1272,162816,2317,Waitangi,287,155, +3,1273,162816,2317,Waitangi,287,155, +3,1274,162816,2317,Waitangi,287,155, +3,1275,162816,2317,Waitangi,287,155, +3,1276,163328,2317,Waitangi,318,155, +3,1277,163328,2317,Waitangi,318,155, +3,1278,163328,2317,Waitangi,318,155, +3,1279,163328,2317,Waitangi,318,155, +3,1280,163840,2317,Waitangi,350,155, +3,1281,163840,2317,Waitangi,350,155, +3,1282,163840,2317,Waitangi,350,155, +3,1283,163840,2317,Waitangi,350,155, +3,1284,164352,2317,Waitangi,383,155, +3,1285,164352,2317,Waitangi,383,155, +3,1286,164352,2317,Waitangi,383,155, +3,1287,164352,2317,Waitangi,383,155, +3,1288,164864,2317,Waitangi,417,155, +3,1289,164864,2317,Waitangi,417,155, +3,1290,164864,2317,Waitangi,417,155, +3,1291,164864,2317,Waitangi,417,155, +3,1292,165376,2317,Waitangi,452,155, +3,1293,165376,2317,Waitangi,452,155, +3,1294,165376,2317,Waitangi,452,155, +3,1295,165376,2317,Waitangi,452,155, +3,1296,165888,2317,Waitangi,488,155, +3,1297,165888,2317,Waitangi,488,155, +3,1298,165888,2317,Waitangi,488,155, +3,1299,165888,2317,Waitangi,488,155, +3,1300,166400,2317,Waitangi,525,155, +3,1301,166400,2317,Waitangi,525,155, +3,1302,166400,2317,Waitangi,525,155, +3,1303,166400,2317,Waitangi,525,155, +3,1304,166912,2317,Waitangi,563,155, +3,1305,166912,2317,Waitangi,563,155, +3,1306,166912,2317,Waitangi,563,155, +3,1307,166912,2317,Waitangi,563,155, +3,1308,167424,2317,Waitangi,602,155, +3,1309,167424,2317,Waitangi,602,155, +3,1310,167424,2317,Waitangi,602,155, +3,1311,167424,2317,Waitangi,602,155, +3,1312,167936,2317,Waitangi,642,155, +3,1313,167936,2317,Waitangi,642,155, +3,1314,167936,2317,Waitangi,642,155, +3,1315,167936,2317,Waitangi,642,155, +3,1316,168448,2317,Waitangi,682,155, +3,1317,168448,2317,Waitangi,682,155, +3,1318,168448,2317,Waitangi,682,155, +3,1319,168448,2317,Waitangi,682,155, +3,1320,168960,2317,Waitangi,723,155, +3,1321,168960,2317,Waitangi,723,155, +3,1322,168960,2317,Waitangi,723,155, +3,1323,168960,2317,Waitangi,723,155, +3,1324,169472,2317,Waitangi,765,155, +3,1325,169472,2317,Waitangi,765,155, +3,1326,169472,2317,Waitangi,765,155, +3,1327,169472,2317,Waitangi,765,155, +3,1328,169984,2317,Waitangi,808,155, +3,1329,169984,2317,Waitangi,808,155, +3,1330,169984,2317,Waitangi,808,155, +3,1331,169984,2317,Waitangi,808,155, +3,1332,170496,2317,Waitangi,852,155, +3,1333,170496,2317,Waitangi,852,155, +3,1334,170496,2317,Waitangi,852,155, +3,1335,170496,2317,Waitangi,852,155, +3,1336,171008,2317,Waitangi,898,155, +3,1337,171008,2317,Waitangi,898,155, +3,1338,171008,2317,Waitangi,898,155, +3,1339,171008,2317,Waitangi,898,155, +3,1340,171520,2317,Waitangi,944,155, +3,1341,171520,2317,Waitangi,944,155, +3,1342,171520,2317,Waitangi,944,155, +3,1343,171520,2317,Waitangi,944,155, +3,1344,172032,2317,Waitangi,991,155, +3,1345,172032,2317,Waitangi,991,155, +3,1346,172032,2317,Waitangi,991,155, +3,1347,172032,2317,Waitangi,991,155, +3,1348,172544,2317,Waitangi,1038,155, +3,1349,172544,2317,Waitangi,1038,155, +3,1350,172544,2317,Waitangi,1038,155, +3,1351,172544,2317,Waitangi,1038,155, +3,1352,173056,2317,Waitangi,1085,155, +3,1353,173056,2317,Waitangi,1085,155, +3,1354,173056,2317,Waitangi,1085,155, +3,1355,173056,2317,Waitangi,1085,155, +3,1356,173568,2317,Waitangi,1132,155, +3,1357,173568,2317,Waitangi,1132,155, +3,1358,173568,2317,Waitangi,1132,155, +3,1359,173568,2317,Waitangi,1132,155, +3,1360,174080,2317,Waitangi,1180,155, +3,1361,174080,2317,Waitangi,1180,155, +3,1362,174080,2317,Waitangi,1180,155, +3,1363,174080,2317,Waitangi,1180,155, +3,1364,174592,2317,Waitangi,1228,155, +3,1365,174592,2317,Waitangi,1228,155, +3,1366,174592,2317,Waitangi,1228,155, +3,1367,174592,2317,Waitangi,1228,155, +3,1368,175104,2317,Waitangi,1276,155, +3,1369,175104,2317,Waitangi,1276,155, +3,1370,175104,2317,Waitangi,1276,155, +3,1371,175104,2317,Waitangi,1276,155, +3,1372,175616,2317,Waitangi,1324,155, +3,1373,175616,2317,Waitangi,1324,155, +3,1374,175616,2317,Waitangi,1324,155, +3,1375,175616,2317,Waitangi,1324,155, +3,1376,176128,2317,Waitangi,1373,155, +3,1377,176128,2317,Waitangi,1373,155, +3,1378,176128,2317,Waitangi,1373,155, +3,1379,176128,2317,Waitangi,1373,155, +3,1380,176640,2317,Waitangi,1422,155, +3,1381,176640,2317,Waitangi,1422,155, +3,1382,176640,2317,Waitangi,1422,155, +3,1383,176640,2317,Waitangi,1422,155, +3,1384,177152,2317,Waitangi,1471,155, +3,1385,177152,2317,Waitangi,1471,155, +3,1386,177152,2317,Waitangi,1471,155, +3,1387,177152,2317,Waitangi,1471,155, +3,1388,177664,2317,Waitangi,1520,155, +3,1389,177664,2317,Waitangi,1520,155, +3,1390,177664,2317,Waitangi,1520,155, +3,1391,177664,2317,Waitangi,1520,155, +3,1392,178176,2317,Waitangi,1570,155, +3,1393,178176,2317,Waitangi,1570,155, +3,1394,178176,2317,Waitangi,1570,155, +3,1395,178176,2317,Waitangi,1570,155, +3,1396,178688,2317,Waitangi,1620,155, +3,1397,178688,2317,Waitangi,1620,155, +3,1398,178688,2317,Waitangi,1620,155, +3,1399,178688,2317,Waitangi,1620,155, +3,1400,179200,2317,Waitangi,1670,155, +3,1401,179200,2317,Waitangi,1670,155, +3,1402,179200,2317,Waitangi,1670,155, +3,1403,179200,2317,Waitangi,1670,155, +3,1404,179712,2317,Waitangi,1720,155, +3,1405,179712,2317,Waitangi,1720,155, +3,1406,179712,2317,Waitangi,1720,155, +3,1407,179712,2317,Waitangi,1720,155, +3,1408,180224,2317,Waitangi,1771,155, +3,1409,180224,2317,Waitangi,1771,155, +3,1410,180224,2317,Waitangi,1771,155, +3,1411,180224,2317,Waitangi,1771,155, +3,1412,180736,2317,Waitangi,1822,155, +3,1413,180736,2317,Waitangi,1822,155, +3,1414,180736,2317,Waitangi,1822,155, +3,1415,180736,2317,Waitangi,1822,155, +3,1416,181248,2317,Waitangi,1873,155, +3,1417,181248,2317,Waitangi,1873,155, +3,1418,181248,2317,Waitangi,1873,155, +3,1419,181248,2317,Waitangi,1873,155, +3,1420,181760,2317,Waitangi,1924,155, +3,1421,181760,2317,Waitangi,1924,155, +3,1422,181760,2317,Waitangi,1924,155, +3,1423,181760,2317,Waitangi,1924,155, +3,1424,182272,2317,Waitangi,1976,155, +3,1425,182272,2317,Waitangi,1976,155, +3,1426,182272,2317,Waitangi,1976,155, +3,1427,182272,2317,Waitangi,1976,155, +3,1428,182784,2317,Waitangi,2028,155, +3,1429,182784,2317,Waitangi,2028,155, +3,1430,182784,2317,Waitangi,2028,155, +3,1431,182784,2317,Waitangi,2028,155, +3,1432,183296,2317,Waitangi,2080,155, +3,1433,183296,2317,Waitangi,2080,155, +3,1434,183296,2317,Waitangi,2080,155, +3,1435,183296,2317,Waitangi,2080,155, +3,1436,183808,2317,Waitangi,2132,155, +3,1437,183808,2317,Waitangi,2132,155, +3,1438,183808,2317,Waitangi,2132,155, +3,1439,183808,2317,Waitangi,2132,155, +3,1440,184320,2317,Waitangi,2184,155, +3,1441,184320,2317,Waitangi,2184,155, +3,1442,184320,2317,Waitangi,2184,155, +3,1443,184320,2317,Waitangi,2184,155, +3,1444,184832,2317,Waitangi,2237,155, +3,1445,184832,2317,Waitangi,2237,155, +3,1446,184832,2317,Waitangi,2237,155, +3,1447,184832,2317,Waitangi,2237,155, +3,1448,185344,2317,Waitangi,2290,155, +3,1449,185344,2317,Waitangi,2290,155, +3,1450,185344,2317,Waitangi,2290,155, +3,1451,185344,2317,Waitangi,2290,155, +3,1452,185856,2317,Waitangi,2343,155, +3,1453,185856,2317,Waitangi,2343,155, +3,1454,185856,2317,Waitangi,2343,155, +3,1455,185856,2317,Waitangi,2343,155, +3,1456,186368,2317,Waitangi,2396,155, +3,1457,186368,2317,Waitangi,2396,155, +3,1458,186368,2317,Waitangi,2396,155, +3,1459,186368,2317,Waitangi,2396,155, +3,1460,186880,2317,Waitangi,2449,155, +3,1461,186880,2317,Waitangi,2449,155, +3,1462,186880,2317,Waitangi,2449,155, +3,1463,186880,2317,Waitangi,2449,155, +3,1464,187392,2317,Waitangi,2503,155, +3,1465,187392,2317,Waitangi,2503,155, +3,1466,187392,2317,Waitangi,2503,155, +3,1467,187392,2317,Waitangi,2503,155, +3,1468,187904,2317,Waitangi,2557,155, +3,1469,187904,2317,Waitangi,2557,155, +3,1470,187904,2317,Waitangi,2557,155, +3,1471,187904,2317,Waitangi,2557,155, +3,1472,188416,2317,Waitangi,2611,155, +3,1473,188416,2317,Waitangi,2611,155, +3,1474,188416,2317,Waitangi,2611,155, +3,1475,188416,2317,Waitangi,2611,155, +3,1476,188928,2317,Waitangi,2665,155, +3,1477,188928,2317,Waitangi,2665,155, +3,1478,188928,2317,Waitangi,2665,155, +3,1479,188928,2317,Waitangi,2665,155, +3,1480,189440,2317,Waitangi,2719,155, +3,1481,189440,2317,Waitangi,2719,155, +3,1482,189440,2317,Waitangi,2719,155, +3,1483,189440,2317,Waitangi,2719,155, +3,1484,189952,2317,Waitangi,2774,155, +3,1485,189952,2317,Waitangi,2774,155, +3,1486,189952,2317,Waitangi,2774,155, +3,1487,189952,2317,Waitangi,2774,155, +3,1488,190464,2317,Waitangi,2829,155, +3,1489,190464,2317,Waitangi,2829,155, +3,1490,190464,2317,Waitangi,2829,155, +3,1491,190464,2317,Waitangi,2829,155, +3,1492,190976,2317,Waitangi,2884,155, +3,1493,190976,2317,Waitangi,2884,155, +3,1494,190976,2317,Waitangi,2884,155, +3,1495,190976,2317,Waitangi,2884,155, +3,1496,191488,2317,Waitangi,2939,155, +3,1497,191488,2317,Waitangi,2939,155, +3,1498,191488,2317,Waitangi,2939,155, +3,1499,191488,2317,Waitangi,2939,155, +3,1500,192000,2317,Waitangi,2994,155, +3,1501,192000,2317,Waitangi,2994,155, +3,1502,192000,2317,Waitangi,2994,155, +3,1503,192000,2317,Waitangi,2994,155, +3,1504,192512,2317,Waitangi,3049,155, +3,1505,192512,2317,Waitangi,3049,155, +3,1506,192512,2317,Waitangi,3049,155, +3,1507,192512,2317,Waitangi,3049,155, +3,1508,193024,2317,Waitangi,3105,155, +3,1509,193024,2317,Waitangi,3105,155, +3,1510,193024,2317,Waitangi,3105,155, +3,1511,193024,2317,Waitangi,3105,155, +3,1512,193536,2317,Waitangi,3161,155, +3,1513,193536,2317,Waitangi,3161,155, +3,1514,193536,2317,Waitangi,3161,155, +3,1515,193536,2317,Waitangi,3161,155, +3,1516,194048,2317,Waitangi,3217,155, +3,1517,194048,2317,Waitangi,3217,155, +3,1518,194048,2317,Waitangi,3217,155, +3,1519,194048,2317,Waitangi,3217,155, +3,1520,194560,2317,Waitangi,3273,155, +3,1521,194560,2317,Waitangi,3273,155, +3,1522,194560,2317,Waitangi,3273,155, +3,1523,194560,2317,Waitangi,3273,155, +3,1524,195072,2317,Waitangi,3329,155, +3,1525,195072,2317,Waitangi,3329,155, +3,1526,195072,2317,Waitangi,3329,155, +3,1527,195072,2317,Waitangi,3329,155, +3,1528,195584,2317,Waitangi,3385,155, +3,1529,195584,2317,Waitangi,3385,155, +3,1530,195584,2317,Waitangi,3385,155, +3,1531,195584,2317,Waitangi,3385,155, +3,1532,196096,2317,Waitangi,3442,155, +3,1533,196096,2317,Waitangi,3442,155, +3,1534,196096,2317,Waitangi,3442,155, +3,1535,196096,2317,Waitangi,3442,155, +3,1536,196608,2317,Waitangi,3499,155, +3,1537,196608,2317,Waitangi,3499,155, +3,1538,196608,2317,Waitangi,3499,155, +3,1539,196608,2317,Waitangi,3499,155, +3,1540,197120,2317,Waitangi,3556,155, +3,1541,197120,2317,Waitangi,3556,155, +3,1542,197120,2317,Waitangi,3556,155, +3,1543,197120,2317,Waitangi,3556,155, +3,1544,197632,2317,Waitangi,3613,155, +3,1545,197632,2317,Waitangi,3613,155, +3,1546,197632,2317,Waitangi,3613,155, +3,1547,197632,2317,Waitangi,3613,155, +3,1548,198144,2317,Waitangi,3670,155, +3,1549,198144,2317,Waitangi,3670,155, +3,1550,198144,2317,Waitangi,3670,155, +3,1551,198144,2317,Waitangi,3670,155, +3,1552,198656,2317,Waitangi,3727,155, +3,1553,198656,2317,Waitangi,3727,155, +3,1554,198656,2317,Waitangi,3727,155, +3,1555,198656,2317,Waitangi,3727,155, +3,1556,199168,2317,Waitangi,3785,155, +3,1557,199168,2317,Waitangi,3785,155, +3,1558,199168,2317,Waitangi,3785,155, +3,1559,199168,2317,Waitangi,3785,155, +3,1560,199680,2317,Waitangi,3843,155, +3,1561,199680,2317,Waitangi,3843,155, +3,1562,199680,2317,Waitangi,3843,155, +3,1563,199680,2317,Waitangi,3843,155, +3,1564,200192,2317,Waitangi,3901,155, +3,1565,200192,2317,Waitangi,3901,155, +3,1566,200192,2317,Waitangi,3901,155, +3,1567,200192,2317,Waitangi,3901,155, +3,1568,200704,2317,Waitangi,3959,155, +3,1569,200704,2317,Waitangi,3959,155, +3,1570,200704,2317,Waitangi,3959,155, +3,1571,200704,2317,Waitangi,3959,155, +3,1572,201216,2317,Waitangi,4017,155, +3,1573,201216,2317,Waitangi,4017,155, +3,1574,201216,2317,Waitangi,4017,155, +3,1575,201216,2317,Waitangi,4017,155, +3,1576,201728,2317,Waitangi,4075,155, +3,1577,201728,2317,Waitangi,4075,155, +3,1578,201728,2317,Waitangi,4075,155, +3,1579,201728,2317,Waitangi,4075,155, +3,1580,202240,2317,Waitangi,4133,155, +3,1581,202240,2317,Waitangi,4133,155, +3,1582,202240,2317,Waitangi,4133,155, +3,1583,202240,2317,Waitangi,4133,155, +3,1584,202752,2317,Waitangi,4192,155, +3,1585,202752,2317,Waitangi,4192,155, +3,1586,202752,2317,Waitangi,4192,155, +3,1587,202752,2317,Waitangi,4192,155, +3,1588,203264,2317,Waitangi,4251,155, +3,1589,203264,2317,Waitangi,4251,155, +3,1590,203264,2317,Waitangi,4251,155, +3,1591,203264,2317,Waitangi,4251,155, +3,1592,203776,2317,Waitangi,4310,155, +3,1593,203776,2317,Waitangi,4310,155, +3,1594,203776,2317,Waitangi,4310,155, +3,1595,203776,2317,Waitangi,4310,155, +3,1596,204288,2317,Waitangi,4369,155, +3,1597,204288,2317,Waitangi,4369,155, +3,1598,204288,2317,Waitangi,4369,155, +3,1599,204288,2317,Waitangi,4369,155, +3,1600,204800,2317,Waitangi,4428,155, +3,1601,204800,2317,Waitangi,4428,155, +3,1602,204800,2317,Waitangi,4428,155, +3,1603,204800,2317,Waitangi,4428,155, +3,1604,205312,2317,Waitangi,4487,155, +3,1605,205312,2317,Waitangi,4487,155, +3,1606,205312,2317,Waitangi,4487,155, +3,1607,205312,2317,Waitangi,4487,155, +3,1608,205824,2317,Waitangi,4546,155, +3,1609,205824,2317,Waitangi,4546,155, +3,1610,205824,2317,Waitangi,4546,155, +3,1611,205824,2317,Waitangi,4546,155, +3,1612,206336,2317,Waitangi,4606,155, +3,1613,206336,2317,Waitangi,4606,155, +3,1614,206336,2317,Waitangi,4606,155, +3,1615,206336,2317,Waitangi,4606,155, +3,1616,206848,2317,Waitangi,4666,155, +3,1617,206848,2317,Waitangi,4666,155, +3,1618,206848,2317,Waitangi,4666,155, +3,1619,206848,2317,Waitangi,4666,155, +3,1620,207360,2317,Waitangi,4726,155, +3,1621,207360,2317,Waitangi,4726,155, +3,1622,207360,2317,Waitangi,4726,155, +3,1623,207360,2317,Waitangi,4726,155, +3,1624,207872,2317,Waitangi,4786,155, +3,1625,207872,2317,Waitangi,4786,155, +3,1626,207872,2317,Waitangi,4786,155, +3,1627,207872,2317,Waitangi,4786,155, +3,1628,208384,2317,Waitangi,4846,155, +3,1629,208384,2317,Waitangi,4846,155, +3,1630,208384,2317,Waitangi,4846,155, +3,1631,208384,2317,Waitangi,4846,155, +3,1632,208896,2317,Waitangi,4906,155, +3,1633,208896,2317,Waitangi,4906,155, +3,1634,208896,2317,Waitangi,4906,155, +3,1635,208896,2317,Waitangi,4906,155, +3,1636,209408,2317,Waitangi,4966,155, +3,1637,209408,2317,Waitangi,4966,155, +3,1638,209408,2317,Waitangi,4966,155, +3,1639,209408,2317,Waitangi,4966,155, +3,1640,209920,2317,Waitangi,5026,155, +3,1641,209920,2317,Waitangi,5026,155, +3,1642,209920,2317,Waitangi,5026,155, +3,1643,209920,2317,Waitangi,5026,155, +3,1644,210432,2317,Waitangi,5087,155, +3,1645,210432,2317,Waitangi,5087,155, +3,1646,210432,2317,Waitangi,5087,155, +3,1647,210432,2317,Waitangi,5087,155, +3,1648,210944,2317,Waitangi,5148,155, +3,1649,210944,2317,Waitangi,5148,155, +3,1650,210944,2317,Waitangi,5148,155, +3,1651,210944,2317,Waitangi,5148,155, +3,1652,211456,2317,Waitangi,5209,155, +3,1653,211456,2317,Waitangi,5209,155, +3,1654,211456,2317,Waitangi,5209,155, +3,1655,211456,2317,Waitangi,5209,155, +3,1656,211968,2317,Waitangi,5270,155, +3,1657,211968,2317,Waitangi,5270,155, +3,1658,211968,2317,Waitangi,5270,155, +3,1659,211968,2317,Waitangi,5270,155, +3,1660,212480,2317,Waitangi,5331,155, +3,1661,212480,2317,Waitangi,5331,155, +3,1662,212480,2317,Waitangi,5331,155, +3,1663,212480,2317,Waitangi,5331,155, +3,1664,212992,2317,Waitangi,5392,155, +3,1665,212992,2317,Waitangi,5392,155, +3,1666,212992,2317,Waitangi,5392,155, +3,1667,212992,2317,Waitangi,5392,155, +3,1668,213504,2317,Waitangi,5453,155, +3,1669,213504,2317,Waitangi,5453,155, +3,1670,213504,2317,Waitangi,5453,155, +3,1671,213504,2317,Waitangi,5453,155, +3,1672,214016,2317,Waitangi,5514,155, +3,1673,214016,2317,Waitangi,5514,155, +3,1674,214016,2317,Waitangi,5514,155, +3,1675,214016,2317,Waitangi,5514,155, +3,1676,214528,2317,Waitangi,5575,155, +3,1677,214528,2317,Waitangi,5575,155, +3,1678,214528,2317,Waitangi,5575,155, +3,1679,214528,2317,Waitangi,5575,155, +3,1680,215040,2317,Waitangi,5637,155, +3,1681,215040,2317,Waitangi,5637,155, +3,1682,215040,2317,Waitangi,5637,155, +3,1683,215040,2317,Waitangi,5637,155, +3,1684,215552,2317,Waitangi,5699,155, +3,1685,215552,2317,Waitangi,5699,155, +3,1686,215552,2317,Waitangi,5699,155, +3,1687,215552,2317,Waitangi,5699,155, +3,1688,216064,2317,Waitangi,5761,155, +3,1689,216064,2317,Waitangi,5761,155, +3,1690,216064,2317,Waitangi,5761,155, +3,1691,216064,2317,Waitangi,5761,155, +3,1692,216576,2317,Waitangi,5823,155, +3,1693,216576,2317,Waitangi,5823,155, +3,1694,216576,2317,Waitangi,5823,155, +3,1695,216576,2317,Waitangi,5823,155, +3,1696,217088,2317,Waitangi,5885,155, +3,1697,217088,2317,Waitangi,5885,155, +3,1698,217088,2317,Waitangi,5885,155, +3,1699,217088,2317,Waitangi,5885,155, +3,1700,217600,2317,Waitangi,5947,155, +3,1701,217600,2317,Waitangi,5947,155, +3,1702,217600,2317,Waitangi,5947,155, +3,1703,217600,2317,Waitangi,5947,155, +3,1704,218112,2317,Waitangi,6009,155, +3,1705,218112,2317,Waitangi,6009,155, +3,1706,218112,2317,Waitangi,6009,155, +3,1707,218112,2317,Waitangi,6009,155, +3,1708,218624,2317,Waitangi,6071,155, +3,1709,218624,2317,Waitangi,6071,155, +3,1710,218624,2317,Waitangi,6071,155, +3,1711,218624,2317,Waitangi,6071,155, +3,1712,219136,2317,Waitangi,6133,155, +3,1713,219136,2317,Waitangi,6133,155, +3,1714,219136,2317,Waitangi,6133,155, +3,1715,219136,2317,Waitangi,6133,155, +3,1716,219648,2317,Waitangi,6196,155, +3,1717,219648,2317,Waitangi,6196,155, +3,1718,219648,2317,Waitangi,6196,155, +3,1719,219648,2317,Waitangi,6196,155, +3,1720,220160,2317,Waitangi,6259,155, +3,1721,220160,2317,Waitangi,6259,155, +3,1722,220160,2317,Waitangi,6259,155, +3,1723,220160,2317,Waitangi,6259,155, +3,1724,220672,2317,Waitangi,6322,155, +3,1725,220672,2317,Waitangi,6322,155, +3,1726,220672,2317,Waitangi,6322,155, +3,1727,220672,2317,Waitangi,6322,155, +3,1728,221184,2317,Waitangi,6385,155, +3,1729,221184,2317,Waitangi,6385,155, +3,1730,221184,2317,Waitangi,6385,155, +3,1731,221184,2317,Waitangi,6385,155, +3,1732,221696,2317,Waitangi,6448,155, +3,1733,221696,2317,Waitangi,6448,155, +3,1734,221696,2317,Waitangi,6448,155, +3,1735,221696,2317,Waitangi,6448,155, +3,1736,222208,2317,Waitangi,6511,155, +3,1737,222208,2317,Waitangi,6511,155, +3,1738,222208,2317,Waitangi,6511,155, +3,1739,222208,2317,Waitangi,6511,155, +3,1740,222720,2317,Waitangi,6574,155, +3,1741,222720,2317,Waitangi,6574,155, +3,1742,222720,2317,Waitangi,6574,155, +3,1743,222720,2317,Waitangi,6574,155, +3,1744,223232,2317,Waitangi,6637,155, +3,1745,223232,2317,Waitangi,6637,155, +3,1746,223232,2317,Waitangi,6637,155, +3,1747,223232,2317,Waitangi,6637,155, +3,1748,223744,2317,Waitangi,6700,155, +3,1749,223744,2317,Waitangi,6700,155, +3,1750,223744,2317,Waitangi,6700,155, +3,1751,223744,2317,Waitangi,6700,155, +3,1752,224256,2317,Waitangi,6763,155, +3,1753,224256,2317,Waitangi,6763,155, +3,1754,224256,2317,Waitangi,6763,155, +3,1755,224256,2317,Waitangi,6763,155, +3,1756,224768,2317,Waitangi,6826,155, +3,1757,224768,2317,Waitangi,6826,155, +3,1758,224768,2317,Waitangi,6826,155, +3,1759,224768,2317,Waitangi,6826,155, +3,1760,225280,2317,Waitangi,6889,155, +3,1761,225280,2317,Waitangi,6889,155, +3,1762,225280,2317,Waitangi,6889,155, +3,1763,225280,2317,Waitangi,6889,155, +3,1764,225792,2317,Waitangi,6953,155, +3,1765,225792,2317,Waitangi,6953,155, +3,1766,225792,2317,Waitangi,6953,155, +3,1767,225792,2317,Waitangi,6953,155, +3,1768,226304,2317,Waitangi,7017,155, +3,1769,226304,2317,Waitangi,7017,155, +3,1770,226304,2317,Waitangi,7017,155, +3,1771,226304,2317,Waitangi,7017,155, +3,1772,226816,2317,Waitangi,7081,155, +3,1773,226816,2317,Waitangi,7081,155, +3,1774,226816,2317,Waitangi,7081,155, +3,1775,226816,2317,Waitangi,7081,155, +3,1776,227328,2317,Waitangi,7145,155, +3,1777,227328,2317,Waitangi,7145,155, +3,1778,227328,2317,Waitangi,7145,155, +3,1779,227328,2317,Waitangi,7145,155, +3,1780,227840,2317,Waitangi,7209,155, +3,1781,227840,2317,Waitangi,7209,155, +3,1782,227840,2317,Waitangi,7209,155, +3,1783,227840,2317,Waitangi,7209,155, +3,1784,228352,2317,Waitangi,7273,155, +3,1785,228352,2317,Waitangi,7273,155, +3,1786,228352,2317,Waitangi,7273,155, +3,1787,228352,2317,Waitangi,7273,155, +3,1788,228864,2317,Waitangi,7337,155, +3,1789,228864,2317,Waitangi,7337,155, +3,1790,228864,2317,Waitangi,7337,155, +3,1791,228864,2317,Waitangi,7337,155, +3,1792,229376,2317,Waitangi,7401,155, +3,1793,229376,2317,Waitangi,7401,155, +3,1794,229376,2317,Waitangi,7401,155, +3,1795,229376,2317,Waitangi,7401,155, +3,1796,229888,2317,Waitangi,7465,155, +3,1797,229888,2317,Waitangi,7465,155, +3,1798,229888,2317,Waitangi,7465,155, +3,1799,229888,2317,Waitangi,7465,155, +3,1800,230400,2317,Waitangi,7529,155, +3,1801,230400,2317,Waitangi,7529,155, +3,1802,230400,2317,Waitangi,7529,155, +3,1803,230400,2317,Waitangi,7529,155, +3,1804,230912,2317,Waitangi,7593,155, +3,1805,230912,2317,Waitangi,7593,155, +3,1806,230912,2317,Waitangi,7593,155, +3,1807,230912,2317,Waitangi,7593,155, +3,1808,231424,2317,Waitangi,7657,155, +3,1809,231424,2317,Waitangi,7657,155, +3,1810,231424,2317,Waitangi,7657,155, +3,1811,231424,2317,Waitangi,7657,155, +3,1812,231936,2317,Waitangi,7722,155, +3,1813,231936,2317,Waitangi,7722,155, +3,1814,231936,2317,Waitangi,7722,155, +3,1815,231936,2317,Waitangi,7722,155, +3,1816,232448,2317,Waitangi,7787,155, +3,1817,232448,2317,Waitangi,7787,155, +3,1818,232448,2317,Waitangi,7787,155, +3,1819,232448,2317,Waitangi,7787,155, +3,1820,232960,2317,Waitangi,7852,155, +3,1821,232960,2317,Waitangi,7852,155, +3,1822,232960,2317,Waitangi,7852,155, +3,1823,232960,2317,Waitangi,7852,155, +3,1824,233472,2317,Waitangi,7917,155, +3,1825,233472,2317,Waitangi,7917,155, +3,1826,233472,2317,Waitangi,7917,155, +3,1827,233472,2317,Waitangi,7917,155, +3,1828,233984,2317,Waitangi,7982,155, +3,1829,233984,2317,Waitangi,7982,155, +3,1830,233984,2317,Waitangi,7982,155, +3,1831,233984,2317,Waitangi,7982,155, +3,1832,234496,2317,Waitangi,8047,155, +3,1833,234496,2317,Waitangi,8047,155, +3,1834,234496,2317,Waitangi,8047,155, +3,1835,234496,2317,Waitangi,8047,155, +3,1836,235008,2317,Waitangi,8112,155, +3,1837,235008,2317,Waitangi,8112,155, +3,1838,235008,2317,Waitangi,8112,155, +3,1839,235008,2317,Waitangi,8112,155, +3,1840,235520,2317,Waitangi,8177,155, +3,1841,235520,2317,Waitangi,8177,155, +3,1842,235520,2317,Waitangi,8177,155, +3,1843,235520,2317,Waitangi,8177,155, +3,1844,236032,2317,Waitangi,8242,155, +3,1845,236032,2317,Waitangi,8242,155, +3,1846,236032,2317,Waitangi,8242,155, +3,1847,236032,2317,Waitangi,8242,155, +3,1848,236544,2317,Waitangi,8307,155, +3,1849,236544,2317,Waitangi,8307,155, +3,1850,236544,2317,Waitangi,8307,155, +3,1851,236544,2317,Waitangi,8307,155, +3,1852,237056,2317,Waitangi,8372,155, +3,1853,237056,2317,Waitangi,8372,155, +3,1854,237056,2317,Waitangi,8372,155, +3,1855,237056,2317,Waitangi,8372,155, +3,1856,237568,2317,Waitangi,8437,155, +3,1857,237568,2317,Waitangi,8437,155, +3,1858,237568,2317,Waitangi,8437,155, +3,1859,237568,2317,Waitangi,8437,155, +3,1860,238080,2317,Waitangi,8502,155, +3,1861,238080,2317,Waitangi,8502,155, +3,1862,238080,2317,Waitangi,8502,155, +3,1863,238080,2317,Waitangi,8502,155, +3,1864,238592,2317,Waitangi,8567,155, +3,1865,238592,2317,Waitangi,8567,155, +3,1866,238592,2317,Waitangi,8567,155, +3,1867,238592,2317,Waitangi,8567,155, +3,1868,239104,2317,Waitangi,8632,155, +3,1869,239104,2317,Waitangi,8632,155, +3,1870,239104,2317,Waitangi,8632,155, +3,1871,239104,2317,Waitangi,8632,155, +3,1872,239616,2317,Waitangi,8697,155, +3,1873,239616,2317,Waitangi,8697,155, +3,1874,239616,2317,Waitangi,8697,155, +3,1875,239616,2317,Waitangi,8697,155, +3,1876,240128,2317,Waitangi,8763,155, +3,1877,240128,2317,Waitangi,8763,155, +3,1878,240128,2317,Waitangi,8763,155, +3,1879,240128,2317,Waitangi,8763,155, +3,1880,240640,2317,Waitangi,8829,155, +3,1881,240640,2317,Waitangi,8829,155, +3,1882,240640,2317,Waitangi,8829,155, +3,1883,240640,2317,Waitangi,8829,155, +3,1884,241152,2317,Waitangi,8895,155, +3,1885,241152,2317,Waitangi,8895,155, +3,1886,241152,2317,Waitangi,8895,155, +3,1887,241152,2317,Waitangi,8895,155, +3,1888,241664,2317,Waitangi,8961,155, +3,1889,241664,2317,Waitangi,8961,155, +3,1890,241664,2317,Waitangi,8961,155, +3,1891,241664,2317,Waitangi,8961,155, +3,1892,242176,2317,Waitangi,9027,155, +3,1893,242176,2317,Waitangi,9027,155, +3,1894,242176,2317,Waitangi,9027,155, +3,1895,242176,2317,Waitangi,9027,155, +3,1896,242688,2317,Waitangi,9093,155, +3,1897,242688,2317,Waitangi,9093,155, +3,1898,242688,2317,Waitangi,9093,155, +3,1899,242688,2317,Waitangi,9093,155, +3,1900,243200,2317,Waitangi,9159,155, +3,1901,243200,2317,Waitangi,9159,155, +3,1902,243200,2317,Waitangi,9159,155, +3,1903,243200,2317,Waitangi,9159,155, +3,1904,243712,2317,Waitangi,9225,155, +3,1905,243712,2317,Waitangi,9225,155, +3,1906,243712,2317,Waitangi,9225,155, +3,1907,243712,2317,Waitangi,9225,155, +3,1908,244224,2317,Waitangi,9291,155, +3,1909,244224,2317,Waitangi,9291,155, +3,1910,244224,2317,Waitangi,9291,155, +3,1911,244224,2317,Waitangi,9291,155, +3,1912,244736,2317,Waitangi,9357,155, +3,1913,244736,2317,Waitangi,9357,155, +3,1914,244736,2317,Waitangi,9357,155, +3,1915,244736,2317,Waitangi,9357,155, +3,1916,245248,2317,Waitangi,9423,155, +3,1917,245248,2317,Waitangi,9423,155, +3,1918,245248,2317,Waitangi,9423,155, +3,1919,245248,2317,Waitangi,9423,155, +3,1920,245760,2317,Waitangi,9489,155, +3,1921,245760,2317,Waitangi,9489,155, +3,1922,245760,2317,Waitangi,9489,155, +3,1923,245760,2317,Waitangi,9489,155, +3,1924,246272,2317,Waitangi,9555,155, +3,1925,246272,2317,Waitangi,9555,155, +3,1926,246272,2317,Waitangi,9555,155, +3,1927,246272,2317,Waitangi,9555,155, +3,1928,246784,2317,Waitangi,9621,155, +3,1929,246784,2317,Waitangi,9621,155, +3,1930,246784,2317,Waitangi,9621,155, +3,1931,246784,2317,Waitangi,9621,155, +3,1932,247296,2317,Waitangi,9687,155, +3,1933,247296,2317,Waitangi,9687,155, +3,1934,247296,2317,Waitangi,9687,155, +3,1935,247296,2317,Waitangi,9687,155, +3,1936,247808,2317,Waitangi,9753,155, +3,1937,247808,2317,Waitangi,9753,155, +3,1938,247808,2317,Waitangi,9753,155, +3,1939,247808,2317,Waitangi,9753,155, +3,1940,248320,2317,Waitangi,9819,155, +3,1941,248320,2317,Waitangi,9819,155, +3,1942,248320,2317,Waitangi,9819,155, +3,1943,248320,2317,Waitangi,9819,155, +3,1944,248832,2317,Waitangi,9885,155, +3,1945,248832,2317,Waitangi,9885,155, +3,1946,248832,2317,Waitangi,9885,155, +3,1947,248832,2317,Waitangi,9885,155, +3,1948,249344,2317,Waitangi,9952,155, +3,1949,249344,2317,Waitangi,9952,155, +3,1950,249344,2317,Waitangi,9952,155, +3,1951,249344,2317,Waitangi,9952,155, +3,1952,249856,2317,Waitangi,10019,155, +3,1953,249856,2317,Waitangi,10019,155, +3,1954,249856,2317,Waitangi,10019,155, +3,1955,249856,2317,Waitangi,10019,155, +3,1956,250368,2317,Waitangi,10086,155, +3,1957,250368,2317,Waitangi,10086,155, +3,1958,250368,2317,Waitangi,10086,155, +3,1959,250368,2317,Waitangi,10086,155, +3,1960,250880,2317,Waitangi,10153,155, +3,1961,250880,2317,Waitangi,10153,155, +3,1962,250880,2317,Waitangi,10153,155, +3,1963,250880,2317,Waitangi,10153,155, +3,1964,251392,2317,Waitangi,10220,155, +3,1965,251392,2317,Waitangi,10220,155, +3,1966,251392,2317,Waitangi,10220,155, +3,1967,251392,2317,Waitangi,10220,155, +3,1968,251904,2317,Waitangi,10287,155, +3,1969,251904,2317,Waitangi,10287,155, +3,1970,251904,2317,Waitangi,10287,155, +3,1971,251904,2317,Waitangi,10287,155, +3,1972,252416,2317,Waitangi,10354,155, +3,1973,252416,2317,Waitangi,10354,155, +3,1974,252416,2317,Waitangi,10354,155, +3,1975,252416,2317,Waitangi,10354,155, +3,1976,252928,2317,Waitangi,10421,155, +3,1977,252928,2317,Waitangi,10421,155, +3,1978,252928,2317,Waitangi,10421,155, +3,1979,252928,2317,Waitangi,10421,155, +3,1980,253440,2317,Waitangi,10488,155, +3,1981,253440,2317,Waitangi,10488,155, +3,1982,253440,2317,Waitangi,10488,155, +3,1983,253440,2317,Waitangi,10488,155, +3,1984,253952,2317,Waitangi,10555,155, +3,1985,253952,2317,Waitangi,10555,155, +3,1986,253952,2317,Waitangi,10555,155, +3,1987,253952,2317,Waitangi,10555,155, +3,1988,254464,2317,Waitangi,10622,155, +3,1989,254464,2317,Waitangi,10622,155, +3,1990,254464,2317,Waitangi,10622,155, +3,1991,254464,2317,Waitangi,10622,155, +3,1992,254976,2317,Waitangi,10689,155, +3,1993,254976,2317,Waitangi,10689,155, +3,1994,254976,2317,Waitangi,10689,155, +3,1995,254976,2317,Waitangi,10689,155, +3,1996,255488,2317,Waitangi,10756,155, +3,1997,255488,2317,Waitangi,10756,155, +3,1998,255488,2317,Waitangi,10756,155, +3,1999,255488,2317,Waitangi,10756,155, +3,2000,256000,2317,Waitangi,10823,155, +3,2001,256000,2317,Waitangi,10823,155, +3,2002,256000,2317,Waitangi,10823,155, +3,2003,256000,2317,Waitangi,10823,155, +3,2004,256512,2317,Waitangi,10890,155, +3,2005,256512,2317,Waitangi,10890,155, +3,2006,256512,2317,Waitangi,10890,155, +3,2007,256512,2317,Waitangi,10890,155, +3,2008,257024,2317,Waitangi,10957,155, +3,2009,257024,2317,Waitangi,10957,155, +3,2010,257024,2317,Waitangi,10957,155, +3,2011,257024,2317,Waitangi,10957,155, +3,2012,257536,2317,Waitangi,11024,155, +3,2013,257536,2317,Waitangi,11024,155, +3,2014,257536,2317,Waitangi,11024,155, +3,2015,257536,2317,Waitangi,11024,155, +3,2016,258048,2317,Waitangi,11091,155, +3,2017,258048,2317,Waitangi,11091,155, +3,2018,258048,2317,Waitangi,11091,155, +3,2019,258048,2317,Waitangi,11091,155, +3,2020,258560,2317,Waitangi,11158,155, +3,2021,258560,2317,Waitangi,11158,155, +3,2022,258560,2317,Waitangi,11158,155, +3,2023,258560,2317,Waitangi,11158,155, +3,2024,259072,2317,Waitangi,11225,155, +3,2025,259072,2317,Waitangi,11225,155, +3,2026,259072,2317,Waitangi,11225,155, +3,2027,259072,2317,Waitangi,11225,155, +3,2028,259584,2317,Waitangi,11292,155, +3,2029,259584,2317,Waitangi,11292,155, +3,2030,259584,2317,Waitangi,11292,155, +3,2031,259584,2317,Waitangi,11292,155, +3,2032,260096,2317,Waitangi,11359,155, +3,2033,260096,2317,Waitangi,11359,155, +3,2034,260096,2317,Waitangi,11359,155, +3,2035,260096,2317,Waitangi,11359,155, +3,2036,260608,2317,Waitangi,11426,155, +3,2037,260608,2317,Waitangi,11426,155, +3,2038,260608,2317,Waitangi,11426,155, +3,2039,260608,2317,Waitangi,11426,155, +3,2040,261120,2317,Waitangi,11493,155, +3,2041,261120,2317,Waitangi,11493,155, +3,2042,261120,2317,Waitangi,11493,155, +3,2043,261120,2317,Waitangi,11493,155, +3,2044,261632,2317,Waitangi,11560,155, +3,2045,261632,2317,Waitangi,11560,155, +3,2046,261632,2317,Waitangi,11560,155, +3,2047,261632,2317,Waitangi,11560,155, +4,0,1,6919,Anchorage,2,235, +4,1,1,6919,Anchorage,2,235, +4,2,1,6919,Anchorage,2,235, +4,3,1,6919,Anchorage,2,235, +4,4,513,6919,Anchorage,57,235, +4,5,513,6919,Anchorage,57,235, +4,6,513,6919,Anchorage,57,235, +4,7,513,6919,Anchorage,57,235, +4,8,1025,6919,Anchorage,112,235, +4,9,1025,6919,Anchorage,112,235, +4,10,1025,6919,Anchorage,112,235, +4,11,1025,6919,Anchorage,112,235, +4,12,1537,6919,Anchorage,167,235, +4,13,1537,6919,Anchorage,167,235, +4,14,1537,6919,Anchorage,167,235, +4,15,1537,6919,Anchorage,167,235, +4,16,2049,6919,Anchorage,222,235, +4,17,2049,6919,Anchorage,222,235, +4,18,2049,6919,Anchorage,222,235, +4,19,2049,6919,Anchorage,222,235, +4,20,2561,6919,Anchorage,277,235, +4,21,2561,6919,Anchorage,277,235, +4,22,2561,6919,Anchorage,277,235, +4,23,2561,6919,Anchorage,277,235, +4,24,3073,6919,Anchorage,332,235, +4,25,3073,6919,Anchorage,332,235, +4,26,3073,6919,Anchorage,332,235, +4,27,3073,6919,Anchorage,332,235, +4,28,3585,6919,Anchorage,387,235, +4,29,3585,6919,Anchorage,387,235, +4,30,3585,6919,Anchorage,387,235, +4,31,3585,6919,Anchorage,387,235, +4,32,4097,6919,Anchorage,442,235, +4,33,4097,6919,Anchorage,442,235, +4,34,4097,6919,Anchorage,442,235, +4,35,4097,6919,Anchorage,442,235, +4,36,4609,6919,Anchorage,497,235, +4,37,4609,6919,Anchorage,497,235, +4,38,4609,6919,Anchorage,497,235, +4,39,4609,6919,Anchorage,497,235, +4,40,5121,6919,Anchorage,552,235, +4,41,5121,6919,Anchorage,552,235, +4,42,5121,6919,Anchorage,552,235, +4,43,5121,6919,Anchorage,552,235, +4,44,5633,6919,Anchorage,607,235, +4,45,5633,6919,Anchorage,607,235, +4,46,5633,6919,Anchorage,607,235, +4,47,5633,6919,Anchorage,607,235, +4,48,6145,6919,Anchorage,662,235, +4,49,6145,6919,Anchorage,662,235, +4,50,6145,6919,Anchorage,662,235, +4,51,6145,6919,Anchorage,662,235, +4,52,6657,6919,Anchorage,717,235, +4,53,6657,6919,Anchorage,717,235, +4,54,6657,6919,Anchorage,717,235, +4,55,6657,6919,Anchorage,717,235, +4,56,7169,6919,Anchorage,772,235, +4,57,7169,6919,Anchorage,772,235, +4,58,7169,6919,Anchorage,772,235, +4,59,7169,6919,Anchorage,772,235, +4,60,7681,6919,Anchorage,827,235, +4,61,7681,6919,Anchorage,827,235, +4,62,7681,6919,Anchorage,827,235, +4,63,7681,6919,Anchorage,827,235, +4,64,8193,6919,Anchorage,882,235, +4,65,8193,6919,Anchorage,882,235, +4,66,8193,6919,Anchorage,882,235, +4,67,8193,6919,Anchorage,882,235, +4,68,8705,6919,Anchorage,937,235, +4,69,8705,6919,Anchorage,937,235, +4,70,8705,6919,Anchorage,937,235, +4,71,8705,6919,Anchorage,937,235, +4,72,9217,6919,Anchorage,992,235, +4,73,9217,6919,Anchorage,992,235, +4,74,9217,6919,Anchorage,992,235, +4,75,9217,6919,Anchorage,992,235, +4,76,9729,6919,Anchorage,1047,235, +4,77,9729,6919,Anchorage,1047,235, +4,78,9729,6919,Anchorage,1047,235, +4,79,9729,6919,Anchorage,1047,235, +4,80,10241,6919,Anchorage,1102,235, +4,81,10241,6919,Anchorage,1102,235, +4,82,10241,6919,Anchorage,1102,235, +4,83,10241,6919,Anchorage,1102,235, +4,84,10753,6919,Anchorage,1157,235, +4,85,10753,6919,Anchorage,1157,235, +4,86,10753,6919,Anchorage,1157,235, +4,87,10753,6919,Anchorage,1157,235, +4,88,11265,6919,Anchorage,1212,235, +4,89,11265,6919,Anchorage,1212,235, +4,90,11265,6919,Anchorage,1212,235, +4,91,11265,6919,Anchorage,1212,235, +4,92,11777,6919,Anchorage,1267,235, +4,93,11777,6919,Anchorage,1267,235, +4,94,11777,6919,Anchorage,1267,235, +4,95,11777,6919,Anchorage,1267,235, +4,96,12289,6919,Anchorage,1322,235, +4,97,12289,6919,Anchorage,1322,235, +4,98,12289,6919,Anchorage,1322,235, +4,99,12289,6919,Anchorage,1322,235, +4,100,12801,6919,Anchorage,1377,235, +4,101,12801,6919,Anchorage,1377,235, +4,102,12801,6919,Anchorage,1377,235, +4,103,12801,6919,Anchorage,1377,235, +4,104,13313,6919,Anchorage,1432,235, +4,105,13313,6919,Anchorage,1432,235, +4,106,13313,6919,Anchorage,1432,235, +4,107,13313,6919,Anchorage,1432,235, +4,108,13825,6919,Anchorage,1487,235, +4,109,13825,6919,Anchorage,1487,235, +4,110,13825,6919,Anchorage,1487,235, +4,111,13825,6919,Anchorage,1487,235, +4,112,14337,6919,Anchorage,1542,235, +4,113,14337,6919,Anchorage,1542,235, +4,114,14337,6919,Anchorage,1542,235, +4,115,14337,6919,Anchorage,1542,235, +4,116,14849,6919,Anchorage,1597,235, +4,117,14849,6919,Anchorage,1597,235, +4,118,14849,6919,Anchorage,1597,235, +4,119,14849,6919,Anchorage,1597,235, +4,120,15361,6919,Anchorage,1652,235, +4,121,15361,6919,Anchorage,1652,235, +4,122,15361,6919,Anchorage,1652,235, +4,123,15361,6919,Anchorage,1652,235, +4,124,15873,6919,Anchorage,1707,235, +4,125,15873,6919,Anchorage,1707,235, +4,126,15873,6919,Anchorage,1707,235, +4,127,15873,6919,Anchorage,1707,235, +4,128,16385,6919,Anchorage,1762,235, +4,129,16385,6919,Anchorage,1762,235, +4,130,16385,6919,Anchorage,1762,235, +4,131,16385,6919,Anchorage,1762,235, +4,132,16897,6919,Anchorage,1817,235, +4,133,16897,6919,Anchorage,1817,235, +4,134,16897,6919,Anchorage,1817,235, +4,135,16897,6919,Anchorage,1817,235, +4,136,17409,6919,Anchorage,1872,235, +4,137,17409,6919,Anchorage,1872,235, +4,138,17409,6919,Anchorage,1872,235, +4,139,17409,6919,Anchorage,1872,235, +4,140,17921,6919,Anchorage,1927,235, +4,141,17921,6919,Anchorage,1927,235, +4,142,17921,6919,Anchorage,1927,235, +4,143,17921,6919,Anchorage,1927,235, +4,144,18433,6919,Anchorage,1982,235, +4,145,18433,6919,Anchorage,1982,235, +4,146,18433,6919,Anchorage,1982,235, +4,147,18433,6919,Anchorage,1982,235, +4,148,18945,6919,Anchorage,2037,235, +4,149,18945,6919,Anchorage,2037,235, +4,150,18945,6919,Anchorage,2037,235, +4,151,18945,6919,Anchorage,2037,235, +4,152,19457,6919,Anchorage,2092,235, +4,153,19457,6919,Anchorage,2092,235, +4,154,19457,6919,Anchorage,2092,235, +4,155,19457,6919,Anchorage,2092,235, +4,156,19969,6919,Anchorage,2147,235, +4,157,19969,6919,Anchorage,2147,235, +4,158,19969,6919,Anchorage,2147,235, +4,159,19969,6919,Anchorage,2147,235, +4,160,20481,6919,Anchorage,2202,235, +4,161,20481,6919,Anchorage,2202,235, +4,162,20481,6919,Anchorage,2202,235, +4,163,20481,6919,Anchorage,2202,235, +4,164,20993,6919,Anchorage,2257,235, +4,165,20993,6919,Anchorage,2257,235, +4,166,20993,6919,Anchorage,2257,235, +4,167,20993,6919,Anchorage,2257,235, +4,168,21505,6919,Anchorage,2312,235, +4,169,21505,6919,Anchorage,2312,235, +4,170,21505,6919,Anchorage,2312,235, +4,171,21505,6919,Anchorage,2312,235, +4,172,22017,6919,Anchorage,2367,235, +4,173,22017,6919,Anchorage,2367,235, +4,174,22017,6919,Anchorage,2367,235, +4,175,22017,6919,Anchorage,2367,235, +4,176,22529,6919,Anchorage,2422,235, +4,177,22529,6919,Anchorage,2422,235, +4,178,22529,6919,Anchorage,2422,235, +4,179,22529,6919,Anchorage,2422,235, +4,180,23041,6919,Anchorage,2477,235, +4,181,23041,6919,Anchorage,2477,235, +4,182,23041,6919,Anchorage,2477,235, +4,183,23041,6919,Anchorage,2477,235, +4,184,23553,6919,Anchorage,2532,235, +4,185,23553,6919,Anchorage,2532,235, +4,186,23553,6919,Anchorage,2532,235, +4,187,23553,6919,Anchorage,2532,235, +4,188,24065,6919,Anchorage,2587,235, +4,189,24065,6919,Anchorage,2587,235, +4,190,24065,6919,Anchorage,2587,235, +4,191,24065,6919,Anchorage,2587,235, +4,192,24577,6919,Anchorage,2642,235, +4,193,24577,6919,Anchorage,2642,235, +4,194,24577,6919,Anchorage,2642,235, +4,195,24577,6919,Anchorage,2642,235, +4,196,25089,6919,Anchorage,2697,235, +4,197,25089,6919,Anchorage,2697,235, +4,198,25089,6919,Anchorage,2697,235, +4,199,25089,6919,Anchorage,2697,235, +4,200,25601,6919,Anchorage,2752,235, +4,201,25601,6919,Anchorage,2752,235, +4,202,25601,6919,Anchorage,2752,235, +4,203,25601,6919,Anchorage,2752,235, +4,204,26113,6919,Anchorage,2807,235, +4,205,26113,6919,Anchorage,2807,235, +4,206,26113,6919,Anchorage,2807,235, +4,207,26113,6919,Anchorage,2807,235, +4,208,26625,6919,Anchorage,2862,235, +4,209,26625,6919,Anchorage,2862,235, +4,210,26625,6919,Anchorage,2862,235, +4,211,26625,6919,Anchorage,2862,235, +4,212,27137,6919,Anchorage,2917,235, +4,213,27137,6919,Anchorage,2917,235, +4,214,27137,6919,Anchorage,2917,235, +4,215,27137,6919,Anchorage,2917,235, +4,216,27649,6919,Anchorage,2972,235, +4,217,27649,6919,Anchorage,2972,235, +4,218,27649,6919,Anchorage,2972,235, +4,219,27649,6919,Anchorage,2972,235, +4,220,28161,6919,Anchorage,3027,235, +4,221,28161,6919,Anchorage,3027,235, +4,222,28161,6919,Anchorage,3027,235, +4,223,28161,6919,Anchorage,3027,235, +4,224,28673,6919,Anchorage,3082,235, +4,225,28673,6919,Anchorage,3082,235, +4,226,28673,6919,Anchorage,3082,235, +4,227,28673,6919,Anchorage,3082,235, +4,228,29185,6919,Anchorage,3137,235, +4,229,29185,6919,Anchorage,3137,235, +4,230,29185,6919,Anchorage,3137,235, +4,231,29185,6919,Anchorage,3137,235, +4,232,29697,6919,Anchorage,3192,235, +4,233,29697,6919,Anchorage,3192,235, +4,234,29697,6919,Anchorage,3192,235, +4,235,29697,6919,Anchorage,3192,235, +4,236,30209,6919,Anchorage,3247,235, +4,237,30209,6919,Anchorage,3247,235, +4,238,30209,6919,Anchorage,3247,235, +4,239,30209,6919,Anchorage,3247,235, +4,240,30721,6919,Anchorage,3302,235, +4,241,30721,6919,Anchorage,3302,235, +4,242,30721,6919,Anchorage,3302,235, +4,243,30721,6919,Anchorage,3302,235, +4,244,31233,6919,Anchorage,3357,235, +4,245,31233,6919,Anchorage,3357,235, +4,246,31233,6919,Anchorage,3357,235, +4,247,31233,6919,Anchorage,3357,235, +4,248,31745,6919,Anchorage,3412,235, +4,249,31745,6919,Anchorage,3412,235, +4,250,31745,6919,Anchorage,3412,235, +4,251,31745,6919,Anchorage,3412,235, +4,252,32257,6919,Anchorage,3467,235, +4,253,32257,6919,Anchorage,3467,235, +4,254,32257,6919,Anchorage,3467,235, +4,255,32257,6919,Anchorage,3467,235, +4,256,32769,6919,Anchorage,3522,235, +4,257,32769,6919,Anchorage,3522,235, +4,258,32769,6919,Anchorage,3522,235, +4,259,32769,6919,Anchorage,3522,235, +4,260,33281,6919,Anchorage,3577,235, +4,261,33281,6919,Anchorage,3577,235, +4,262,33281,6919,Anchorage,3577,235, +4,263,33281,6919,Anchorage,3577,235, +4,264,33793,6919,Anchorage,3632,235, +4,265,33793,6919,Anchorage,3632,235, +4,266,33793,6919,Anchorage,3632,235, +4,267,33793,6919,Anchorage,3632,235, +4,268,34305,6919,Anchorage,3687,235, +4,269,34305,6919,Anchorage,3687,235, +4,270,34305,6919,Anchorage,3687,235, +4,271,34305,6919,Anchorage,3687,235, +4,272,34817,6919,Anchorage,3742,235, +4,273,34817,6919,Anchorage,3742,235, +4,274,34817,6919,Anchorage,3742,235, +4,275,34817,6919,Anchorage,3742,235, +4,276,35329,6919,Anchorage,3797,235, +4,277,35329,6919,Anchorage,3797,235, +4,278,35329,6919,Anchorage,3797,235, +4,279,35329,6919,Anchorage,3797,235, +4,280,35841,6919,Anchorage,3852,235, +4,281,35841,6919,Anchorage,3852,235, +4,282,35841,6919,Anchorage,3852,235, +4,283,35841,6919,Anchorage,3852,235, +4,284,36353,6919,Anchorage,3907,235, +4,285,36353,6919,Anchorage,3907,235, +4,286,36353,6919,Anchorage,3907,235, +4,287,36353,6919,Anchorage,3907,235, +4,288,36865,6919,Anchorage,3962,235, +4,289,36865,6919,Anchorage,3962,235, +4,290,36865,6919,Anchorage,3962,235, +4,291,36865,6919,Anchorage,3962,235, +4,292,37377,6919,Anchorage,4017,235, +4,293,37377,6919,Anchorage,4017,235, +4,294,37377,6919,Anchorage,4017,235, +4,295,37377,6919,Anchorage,4017,235, +4,296,37889,6919,Anchorage,4072,235, +4,297,37889,6919,Anchorage,4072,235, +4,298,37889,6919,Anchorage,4072,235, +4,299,37889,6919,Anchorage,4072,235, +4,300,38401,6919,Anchorage,4127,235, +4,301,38401,6919,Anchorage,4127,235, +4,302,38401,6919,Anchorage,4127,235, +4,303,38401,6919,Anchorage,4127,235, +4,304,38913,6919,Anchorage,4182,235, +4,305,38913,6919,Anchorage,4182,235, +4,306,38913,6919,Anchorage,4182,235, +4,307,38913,6919,Anchorage,4182,235, +4,308,39425,6919,Anchorage,4237,235, +4,309,39425,6919,Anchorage,4237,235, +4,310,39425,6919,Anchorage,4237,235, +4,311,39425,6919,Anchorage,4237,235, +4,312,39937,6919,Anchorage,4292,235, +4,313,39937,6919,Anchorage,4292,235, +4,314,39937,6919,Anchorage,4292,235, +4,315,39937,6919,Anchorage,4292,235, +4,316,40449,6919,Anchorage,4347,235, +4,317,40449,6919,Anchorage,4347,235, +4,318,40449,6919,Anchorage,4347,235, +4,319,40449,6919,Anchorage,4347,235, +4,320,40961,6919,Anchorage,4402,235, +4,321,40961,6919,Anchorage,4402,235, +4,322,40961,6919,Anchorage,4402,235, +4,323,40961,6919,Anchorage,4402,235, +4,324,41473,6919,Anchorage,4457,235, +4,325,41473,6919,Anchorage,4457,235, +4,326,41473,6919,Anchorage,4457,235, +4,327,41473,6919,Anchorage,4457,235, +4,328,41985,6919,Anchorage,4511,235, +4,329,41985,6919,Anchorage,4511,235, +4,330,41985,6919,Anchorage,4511,235, +4,331,41985,6919,Anchorage,4511,235, +4,332,42497,6919,Anchorage,4565,235, +4,333,42497,6919,Anchorage,4565,235, +4,334,42497,6919,Anchorage,4565,235, +4,335,42497,6919,Anchorage,4565,235, +4,336,43009,6919,Anchorage,4619,235, +4,337,43009,6919,Anchorage,4619,235, +4,338,43009,6919,Anchorage,4619,235, +4,339,43009,6919,Anchorage,4619,235, +4,340,43521,6919,Anchorage,4673,235, +4,341,43521,6919,Anchorage,4673,235, +4,342,43521,6919,Anchorage,4673,235, +4,343,43521,6919,Anchorage,4673,235, +4,344,44033,6919,Anchorage,4727,235, +4,345,44033,6919,Anchorage,4727,235, +4,346,44033,6919,Anchorage,4727,235, +4,347,44033,6919,Anchorage,4727,235, +4,348,44545,6919,Anchorage,4781,235, +4,349,44545,6919,Anchorage,4781,235, +4,350,44545,6919,Anchorage,4781,235, +4,351,44545,6919,Anchorage,4781,235, +4,352,45057,6919,Anchorage,4835,235, +4,353,45057,6919,Anchorage,4835,235, +4,354,45057,6919,Anchorage,4835,235, +4,355,45057,6919,Anchorage,4835,235, +4,356,45569,6919,Anchorage,4889,235, +4,357,45569,6919,Anchorage,4889,235, +4,358,45569,6919,Anchorage,4889,235, +4,359,45569,6919,Anchorage,4889,235, +4,360,46081,6919,Anchorage,4943,235, +4,361,46081,6919,Anchorage,4943,235, +4,362,46081,6919,Anchorage,4943,235, +4,363,46081,6919,Anchorage,4943,235, +4,364,46593,6919,Anchorage,4997,235, +4,365,46593,6919,Anchorage,4997,235, +4,366,46593,6919,Anchorage,4997,235, +4,367,46593,6919,Anchorage,4997,235, +4,368,47105,6919,Anchorage,5051,235, +4,369,47105,6919,Anchorage,5051,235, +4,370,47105,6919,Anchorage,5051,235, +4,371,47105,6919,Anchorage,5051,235, +4,372,47617,6919,Anchorage,5105,235, +4,373,47617,6919,Anchorage,5105,235, +4,374,47617,6919,Anchorage,5105,235, +4,375,47617,6919,Anchorage,5105,235, +4,376,48129,6919,Anchorage,5159,235, +4,377,48129,6919,Anchorage,5159,235, +4,378,48129,6919,Anchorage,5159,235, +4,379,48129,6919,Anchorage,5159,235, +4,380,48641,6919,Anchorage,5213,235, +4,381,48641,6919,Anchorage,5213,235, +4,382,48641,6919,Anchorage,5213,235, +4,383,48641,6919,Anchorage,5213,235, +4,384,49153,6919,Anchorage,5267,235, +4,385,49153,6919,Anchorage,5267,235, +4,386,49153,6919,Anchorage,5267,235, +4,387,49153,6919,Anchorage,5267,235, +4,388,49665,6919,Anchorage,5321,235, +4,389,49665,6919,Anchorage,5321,235, +4,390,49665,6919,Anchorage,5321,235, +4,391,49665,6919,Anchorage,5321,235, +4,392,50177,6919,Anchorage,5375,235, +4,393,50177,6919,Anchorage,5375,235, +4,394,50177,6919,Anchorage,5375,235, +4,395,50177,6919,Anchorage,5375,235, +4,396,50689,6919,Anchorage,5429,235, +4,397,50689,6919,Anchorage,5429,235, +4,398,50689,6919,Anchorage,5429,235, +4,399,50689,6919,Anchorage,5429,235, +4,400,51201,6919,Anchorage,5483,235, +4,401,51201,6919,Anchorage,5483,235, +4,402,51201,6919,Anchorage,5483,235, +4,403,51201,6919,Anchorage,5483,235, +4,404,51713,6919,Anchorage,5537,235, +4,405,51713,6919,Anchorage,5537,235, +4,406,51713,6919,Anchorage,5537,235, +4,407,51713,6919,Anchorage,5537,235, +4,408,52225,6919,Anchorage,5591,235, +4,409,52225,6919,Anchorage,5591,235, +4,410,52225,6919,Anchorage,5591,235, +4,411,52225,6919,Anchorage,5591,235, +4,412,52737,6919,Anchorage,5645,235, +4,413,52737,6919,Anchorage,5645,235, +4,414,52737,6919,Anchorage,5645,235, +4,415,52737,6919,Anchorage,5645,235, +4,416,53249,6919,Anchorage,5699,235, +4,417,53249,6919,Anchorage,5699,235, +4,418,53249,6919,Anchorage,5699,235, +4,419,53249,6919,Anchorage,5699,235, +4,420,53761,6919,Anchorage,5753,235, +4,421,53761,6919,Anchorage,5753,235, +4,422,53761,6919,Anchorage,5753,235, +4,423,53761,6919,Anchorage,5753,235, +4,424,54273,6919,Anchorage,5807,235, +4,425,54273,6919,Anchorage,5807,235, +4,426,54273,6919,Anchorage,5807,235, +4,427,54273,6919,Anchorage,5807,235, +4,428,54785,6919,Anchorage,5861,235, +4,429,54785,6919,Anchorage,5861,235, +4,430,54785,6919,Anchorage,5861,235, +4,431,54785,6919,Anchorage,5861,235, +4,432,55297,6919,Anchorage,5915,235, +4,433,55297,6919,Anchorage,5915,235, +4,434,55297,6919,Anchorage,5915,235, +4,435,55297,6919,Anchorage,5915,235, +4,436,55809,6919,Anchorage,5969,235, +4,437,55809,6919,Anchorage,5969,235, +4,438,55809,6919,Anchorage,5969,235, +4,439,55809,6919,Anchorage,5969,235, +4,440,56321,6919,Anchorage,6023,235, +4,441,56321,6919,Anchorage,6023,235, +4,442,56321,6919,Anchorage,6023,235, +4,443,56321,6919,Anchorage,6023,235, +4,444,56833,6919,Anchorage,6077,235, +4,445,56833,6919,Anchorage,6077,235, +4,446,56833,6919,Anchorage,6077,235, +4,447,56833,6919,Anchorage,6077,235, +4,448,57345,6919,Anchorage,6131,235, +4,449,57345,6919,Anchorage,6131,235, +4,450,57345,6919,Anchorage,6131,235, +4,451,57345,6919,Anchorage,6131,235, +4,452,57857,6919,Anchorage,6185,235, +4,453,57857,6919,Anchorage,6185,235, +4,454,57857,6919,Anchorage,6185,235, +4,455,57857,6919,Anchorage,6185,235, +4,456,58369,6919,Anchorage,6239,235, +4,457,58369,6919,Anchorage,6239,235, +4,458,58369,6919,Anchorage,6239,235, +4,459,58369,6919,Anchorage,6239,235, +4,460,58881,6919,Anchorage,6293,235, +4,461,58881,6919,Anchorage,6293,235, +4,462,58881,6919,Anchorage,6293,235, +4,463,58881,6919,Anchorage,6293,235, +4,464,59393,6919,Anchorage,6347,235, +4,465,59393,6919,Anchorage,6347,235, +4,466,59393,6919,Anchorage,6347,235, +4,467,59393,6919,Anchorage,6347,235, +4,468,59905,6919,Anchorage,6401,235, +4,469,59905,6919,Anchorage,6401,235, +4,470,59905,6919,Anchorage,6401,235, +4,471,59905,6919,Anchorage,6401,235, +4,472,60417,6919,Anchorage,6455,235, +4,473,60417,6919,Anchorage,6455,235, +4,474,60417,6919,Anchorage,6455,235, +4,475,60417,6919,Anchorage,6455,235, +4,476,60929,6919,Anchorage,6509,235, +4,477,60929,6919,Anchorage,6509,235, +4,478,60929,6919,Anchorage,6509,235, +4,479,60929,6919,Anchorage,6509,235, +4,480,61441,6919,Anchorage,6563,235, +4,481,61441,6919,Anchorage,6563,235, +4,482,61441,6919,Anchorage,6563,235, +4,483,61441,6919,Anchorage,6563,235, +4,484,61953,6919,Anchorage,6617,235, +4,485,61953,6919,Anchorage,6617,235, +4,486,61953,6919,Anchorage,6617,235, +4,487,61953,6919,Anchorage,6617,235, +4,488,62465,6919,Anchorage,6671,235, +4,489,62465,6919,Anchorage,6671,235, +4,490,62465,6919,Anchorage,6671,235, +4,491,62465,6919,Anchorage,6671,235, +4,492,62977,6919,Anchorage,6725,235, +4,493,62977,6919,Anchorage,6725,235, +4,494,62977,6919,Anchorage,6725,235, +4,495,62977,6919,Anchorage,6725,235, +4,496,63489,6919,Anchorage,6779,235, +4,497,63489,6919,Anchorage,6779,235, +4,498,63489,6919,Anchorage,6779,235, +4,499,63489,6919,Anchorage,6779,235, +4,500,64001,6919,Anchorage,6833,235, +4,501,64001,6919,Anchorage,6833,235, +4,502,64001,6919,Anchorage,6833,235, +4,503,64001,6919,Anchorage,6833,235, +4,504,64513,6919,Anchorage,6887,235, +4,505,64513,6919,Anchorage,6887,235, +4,506,64513,6919,Anchorage,6887,235, +4,507,64513,6919,Anchorage,6887,235, +4,508,65025,6919,Anchorage,6941,235, +4,509,65025,6919,Anchorage,6941,235, +4,510,65025,6919,Anchorage,6941,235, +4,511,65025,6919,Anchorage,6941,235, +4,512,65537,6919,Anchorage,6995,235, +4,513,65537,6919,Anchorage,6995,235, +4,514,65537,6919,Anchorage,6995,235, +4,515,65537,6919,Anchorage,6995,235, +4,516,66049,6919,Anchorage,7049,235, +4,517,66049,6919,Anchorage,7049,235, +4,518,66049,6919,Anchorage,7049,235, +4,519,66049,6919,Anchorage,7049,235, +4,520,66561,6919,Anchorage,7103,235, +4,521,66561,6919,Anchorage,7103,235, +4,522,66561,6919,Anchorage,7103,235, +4,523,66561,6919,Anchorage,7103,235, +4,524,67073,6919,Anchorage,7157,235, +4,525,67073,6919,Anchorage,7157,235, +4,526,67073,6919,Anchorage,7157,235, +4,527,67073,6919,Anchorage,7157,235, +4,528,67585,6919,Anchorage,7211,235, +4,529,67585,6919,Anchorage,7211,235, +4,530,67585,6919,Anchorage,7211,235, +4,531,67585,6919,Anchorage,7211,235, +4,532,68097,6919,Anchorage,7265,235, +4,533,68097,6919,Anchorage,7265,235, +4,534,68097,6919,Anchorage,7265,235, +4,535,68097,6919,Anchorage,7265,235, +4,536,68609,6919,Anchorage,7319,235, +4,537,68609,6919,Anchorage,7319,235, +4,538,68609,6919,Anchorage,7319,235, +4,539,68609,6919,Anchorage,7319,235, +4,540,69121,6919,Anchorage,7373,235, +4,541,69121,6919,Anchorage,7373,235, +4,542,69121,6919,Anchorage,7373,235, +4,543,69121,6919,Anchorage,7373,235, +4,544,69633,6919,Anchorage,7427,235, +4,545,69633,6919,Anchorage,7427,235, +4,546,69633,6919,Anchorage,7427,235, +4,547,69633,6919,Anchorage,7427,235, +4,548,70145,6919,Anchorage,7481,235, +4,549,70145,6919,Anchorage,7481,235, +4,550,70145,6919,Anchorage,7481,235, +4,551,70145,6919,Anchorage,7481,235, +4,552,70657,6919,Anchorage,7535,235, +4,553,70657,6919,Anchorage,7535,235, +4,554,70657,6919,Anchorage,7535,235, +4,555,70657,6919,Anchorage,7535,235, +4,556,71169,6919,Anchorage,7589,235, +4,557,71169,6919,Anchorage,7589,235, +4,558,71169,6919,Anchorage,7589,235, +4,559,71169,6919,Anchorage,7589,235, +4,560,71681,6919,Anchorage,7643,235, +4,561,71681,6919,Anchorage,7643,235, +4,562,71681,6919,Anchorage,7643,235, +4,563,71681,6919,Anchorage,7643,235, +4,564,72193,6919,Anchorage,7697,235, +4,565,72193,6919,Anchorage,7697,235, +4,566,72193,6919,Anchorage,7697,235, +4,567,72193,6919,Anchorage,7697,235, +4,568,72705,6919,Anchorage,7751,235, +4,569,72705,6919,Anchorage,7751,235, +4,570,72705,6919,Anchorage,7751,235, +4,571,72705,6919,Anchorage,7751,235, +4,572,73217,6919,Anchorage,7805,235, +4,573,73217,6919,Anchorage,7805,235, +4,574,73217,6919,Anchorage,7805,235, +4,575,73217,6919,Anchorage,7805,235, +4,576,73729,6919,Anchorage,7859,235, +4,577,73729,6919,Anchorage,7859,235, +4,578,73729,6919,Anchorage,7859,235, +4,579,73729,6919,Anchorage,7859,235, +4,580,74241,6919,Anchorage,7913,235, +4,581,74241,6919,Anchorage,7913,235, +4,582,74241,6919,Anchorage,7913,235, +4,583,74241,6919,Anchorage,7913,235, +4,584,74753,6919,Anchorage,7967,235, +4,585,74753,6919,Anchorage,7967,235, +4,586,74753,6919,Anchorage,7967,235, +4,587,74753,6919,Anchorage,7967,235, +4,588,75265,6919,Anchorage,8021,235, +4,589,75265,6919,Anchorage,8021,235, +4,590,75265,6919,Anchorage,8021,235, +4,591,75265,6919,Anchorage,8021,235, +4,592,75777,6919,Anchorage,8075,235, +4,593,75777,6919,Anchorage,8075,235, +4,594,75777,6919,Anchorage,8075,235, +4,595,75777,6919,Anchorage,8075,235, +4,596,76289,6919,Anchorage,8129,235, +4,597,76289,6919,Anchorage,8129,235, +4,598,76289,6919,Anchorage,8129,235, +4,599,76289,6919,Anchorage,8129,235, +4,600,76801,6919,Anchorage,8183,235, +4,601,76801,6919,Anchorage,8183,235, +4,602,76801,6919,Anchorage,8183,235, +4,603,76801,6919,Anchorage,8183,235, +4,604,77313,6919,Anchorage,8237,235, +4,605,77313,6919,Anchorage,8237,235, +4,606,77313,6919,Anchorage,8237,235, +4,607,77313,6919,Anchorage,8237,235, +4,608,77825,6919,Anchorage,8291,235, +4,609,77825,6919,Anchorage,8291,235, +4,610,77825,6919,Anchorage,8291,235, +4,611,77825,6919,Anchorage,8291,235, +4,612,78337,6919,Anchorage,8345,235, +4,613,78337,6919,Anchorage,8345,235, +4,614,78337,6919,Anchorage,8345,235, +4,615,78337,6919,Anchorage,8345,235, +4,616,78849,6919,Anchorage,8399,235, +4,617,78849,6919,Anchorage,8399,235, +4,618,78849,6919,Anchorage,8399,235, +4,619,78849,6919,Anchorage,8399,235, +4,620,79361,6919,Anchorage,8453,235, +4,621,79361,6919,Anchorage,8453,235, +4,622,79361,6919,Anchorage,8453,235, +4,623,79361,6919,Anchorage,8453,235, +4,624,79873,6919,Anchorage,8507,235, +4,625,79873,6919,Anchorage,8507,235, +4,626,79873,6919,Anchorage,8507,235, +4,627,79873,6919,Anchorage,8507,235, +4,628,80385,6919,Anchorage,8561,235, +4,629,80385,6919,Anchorage,8561,235, +4,630,80385,6919,Anchorage,8561,235, +4,631,80385,6919,Anchorage,8561,235, +4,632,80897,6919,Anchorage,8614,235, +4,633,80897,6919,Anchorage,8614,235, +4,634,80897,6919,Anchorage,8614,235, +4,635,80897,6919,Anchorage,8614,235, +4,636,81409,6919,Anchorage,8667,235, +4,637,81409,6919,Anchorage,8667,235, +4,638,81409,6919,Anchorage,8667,235, +4,639,81409,6919,Anchorage,8667,235, +4,640,81921,6919,Anchorage,8720,235, +4,641,81921,6919,Anchorage,8720,235, +4,642,81921,6919,Anchorage,8720,235, +4,643,81921,6919,Anchorage,8720,235, +4,644,82433,6919,Anchorage,8773,235, +4,645,82433,6919,Anchorage,8773,235, +4,646,82433,6919,Anchorage,8773,235, +4,647,82433,6919,Anchorage,8773,235, +4,648,82945,6919,Anchorage,8826,235, +4,649,82945,6919,Anchorage,8826,235, +4,650,82945,6919,Anchorage,8826,235, +4,651,82945,6919,Anchorage,8826,235, +4,652,83457,6919,Anchorage,8879,235, +4,653,83457,6919,Anchorage,8879,235, +4,654,83457,6919,Anchorage,8879,235, +4,655,83457,6919,Anchorage,8879,235, +4,656,83969,6919,Anchorage,8932,235, +4,657,83969,6919,Anchorage,8932,235, +4,658,83969,6919,Anchorage,8932,235, +4,659,83969,6919,Anchorage,8932,235, +4,660,84481,6919,Anchorage,8985,235, +4,661,84481,6919,Anchorage,8985,235, +4,662,84481,6919,Anchorage,8985,235, +4,663,84481,6919,Anchorage,8985,235, +4,664,84993,6919,Anchorage,9038,235, +4,665,84993,6919,Anchorage,9038,235, +4,666,84993,6919,Anchorage,9038,235, +4,667,84993,6919,Anchorage,9038,235, +4,668,85505,6919,Anchorage,9090,235, +4,669,85505,6919,Anchorage,9090,235, +4,670,85505,6919,Anchorage,9090,235, +4,671,85505,6919,Anchorage,9090,235, +4,672,86017,6919,Anchorage,9142,235, +4,673,86017,6919,Anchorage,9142,235, +4,674,86017,6919,Anchorage,9142,235, +4,675,86017,6919,Anchorage,9142,235, +4,676,86529,6919,Anchorage,9194,235, +4,677,86529,6919,Anchorage,9194,235, +4,678,86529,6919,Anchorage,9194,235, +4,679,86529,6919,Anchorage,9194,235, +4,680,87041,6919,Anchorage,9246,235, +4,681,87041,6919,Anchorage,9246,235, +4,682,87041,6919,Anchorage,9246,235, +4,683,87041,6919,Anchorage,9246,235, +4,684,87553,6919,Anchorage,9298,235, +4,685,87553,6919,Anchorage,9298,235, +4,686,87553,6919,Anchorage,9298,235, +4,687,87553,6919,Anchorage,9298,235, +4,688,88065,6919,Anchorage,9350,235, +4,689,88065,6919,Anchorage,9350,235, +4,690,88065,6919,Anchorage,9350,235, +4,691,88065,6919,Anchorage,9350,235, +4,692,88577,6919,Anchorage,9402,235, +4,693,88577,6919,Anchorage,9402,235, +4,694,88577,6919,Anchorage,9402,235, +4,695,88577,6919,Anchorage,9402,235, +4,696,89089,6919,Anchorage,9454,235, +4,697,89089,6919,Anchorage,9454,235, +4,698,89089,6919,Anchorage,9454,235, +4,699,89089,6919,Anchorage,9454,235, +4,700,89601,6919,Anchorage,9506,235, +4,701,89601,6919,Anchorage,9506,235, +4,702,89601,6919,Anchorage,9506,235, +4,703,89601,6919,Anchorage,9506,235, +4,704,90113,6919,Anchorage,9557,235, +4,705,90113,6919,Anchorage,9557,235, +4,706,90113,6919,Anchorage,9557,235, +4,707,90113,6919,Anchorage,9557,235, +4,708,90625,6919,Anchorage,9608,235, +4,709,90625,6919,Anchorage,9608,235, +4,710,90625,6919,Anchorage,9608,235, +4,711,90625,6919,Anchorage,9608,235, +4,712,91137,6919,Anchorage,9659,235, +4,713,91137,6919,Anchorage,9659,235, +4,714,91137,6919,Anchorage,9659,235, +4,715,91137,6919,Anchorage,9659,235, +4,716,91649,6919,Anchorage,9710,235, +4,717,91649,6919,Anchorage,9710,235, +4,718,91649,6919,Anchorage,9710,235, +4,719,91649,6919,Anchorage,9710,235, +4,720,92161,6919,Anchorage,9761,235, +4,721,92161,6919,Anchorage,9761,235, +4,722,92161,6919,Anchorage,9761,235, +4,723,92161,6919,Anchorage,9761,235, +4,724,92673,3471,Honolulu,2,235, +4,725,92673,3471,Honolulu,2,235, +4,726,92673,3471,Honolulu,2,235, +4,727,92673,3471,Honolulu,2,235, +4,728,93185,3471,Honolulu,5,235, +4,729,93185,3471,Honolulu,5,235, +4,730,93185,3471,Honolulu,5,235, +4,731,93185,3471,Honolulu,5,235, +4,732,93697,3471,Honolulu,12,235, +4,733,93697,3471,Honolulu,12,235, +4,734,93697,3471,Honolulu,12,235, +4,735,93697,3471,Honolulu,12,235, +4,736,94209,3471,Honolulu,22,235, +4,737,94209,3471,Honolulu,22,235, +4,738,94209,3471,Honolulu,22,235, +4,739,94209,3471,Honolulu,22,235, +4,740,94721,3471,Honolulu,36,235, +4,741,94721,3471,Honolulu,36,235, +4,742,94721,3471,Honolulu,36,235, +4,743,94721,3471,Honolulu,36,235, +4,744,95233,3471,Honolulu,54,235, +4,745,95233,3471,Honolulu,54,235, +4,746,95233,3471,Honolulu,54,235, +4,747,95233,3471,Honolulu,54,235, +4,748,95745,3471,Honolulu,75,235, +4,749,95745,3471,Honolulu,75,235, +4,750,95745,3471,Honolulu,75,235, +4,751,95745,3471,Honolulu,75,235, +4,752,96257,3471,Honolulu,100,235, +4,753,96257,3471,Honolulu,100,235, +4,754,96257,3471,Honolulu,100,235, +4,755,96257,3471,Honolulu,100,235, +4,756,96769,3471,Honolulu,129,235, +4,757,96769,3471,Honolulu,129,235, +4,758,96769,3471,Honolulu,129,235, +4,759,96769,3471,Honolulu,129,235, +4,760,97281,3471,Honolulu,161,235, +4,761,97281,3471,Honolulu,161,235, +4,762,97281,3471,Honolulu,161,235, +4,763,97281,3471,Honolulu,161,235, +4,764,97793,3471,Honolulu,197,235, +4,765,97793,3471,Honolulu,197,235, +4,766,97793,3471,Honolulu,197,235, +4,767,97793,3471,Honolulu,197,235, +4,768,98305,3471,Honolulu,237,235, +4,769,98305,3471,Honolulu,237,235, +4,770,98305,3471,Honolulu,237,235, +4,771,98305,3471,Honolulu,237,235, +4,772,98817,3471,Honolulu,281,235, +4,773,98817,3471,Honolulu,281,235, +4,774,98817,3471,Honolulu,281,235, +4,775,98817,3471,Honolulu,281,235, +4,776,99329,3471,Honolulu,328,235, +4,777,99329,3471,Honolulu,328,235, +4,778,99329,3471,Honolulu,328,235, +4,779,99329,3471,Honolulu,328,235, +4,780,99841,3471,Honolulu,378,235, +4,781,99841,3471,Honolulu,378,235, +4,782,99841,3471,Honolulu,378,235, +4,783,99841,3471,Honolulu,378,235, +4,784,100353,3471,Honolulu,429,235, +4,785,100353,3471,Honolulu,429,235, +4,786,100353,3471,Honolulu,429,235, +4,787,100353,3471,Honolulu,429,235, +4,788,100865,3471,Honolulu,480,235, +4,789,100865,3471,Honolulu,480,235, +4,790,100865,3471,Honolulu,480,235, +4,791,100865,3471,Honolulu,480,235, +4,792,101377,3471,Honolulu,531,235, +4,793,101377,3471,Honolulu,531,235, +4,794,101377,3471,Honolulu,531,235, +4,795,101377,3471,Honolulu,531,235, +4,796,101889,3471,Honolulu,583,235, +4,797,101889,3471,Honolulu,583,235, +4,798,101889,3471,Honolulu,583,235, +4,799,101889,3471,Honolulu,583,235, +4,800,102401,3471,Honolulu,635,235, +4,801,102401,3471,Honolulu,635,235, +4,802,102401,3471,Honolulu,635,235, +4,803,102401,3471,Honolulu,635,235, +4,804,102913,3471,Honolulu,688,235, +4,805,102913,3471,Honolulu,688,235, +4,806,102913,3471,Honolulu,688,235, +4,807,102913,3471,Honolulu,688,235, +4,808,103425,3471,Honolulu,741,235, +4,809,103425,3471,Honolulu,741,235, +4,810,103425,3471,Honolulu,741,235, +4,811,103425,3471,Honolulu,741,235, +4,812,103937,3471,Honolulu,794,235, +4,813,103937,3471,Honolulu,794,235, +4,814,103937,3471,Honolulu,794,235, +4,815,103937,3471,Honolulu,794,235, +4,816,104449,3471,Honolulu,848,235, +4,817,104449,3471,Honolulu,848,235, +4,818,104449,3471,Honolulu,848,235, +4,819,104449,3471,Honolulu,848,235, +4,820,104961,3471,Honolulu,902,235, +4,821,104961,3471,Honolulu,902,235, +4,822,104961,3471,Honolulu,902,235, +4,823,104961,3471,Honolulu,902,235, +4,824,105473,3471,Honolulu,957,235, +4,825,105473,3471,Honolulu,957,235, +4,826,105473,3471,Honolulu,957,235, +4,827,105473,3471,Honolulu,957,235, +4,828,105985,3471,Honolulu,1012,235, +4,829,105985,3471,Honolulu,1012,235, +4,830,105985,3471,Honolulu,1012,235, +4,831,105985,3471,Honolulu,1012,235, +4,832,106497,3471,Honolulu,1067,235, +4,833,106497,3471,Honolulu,1067,235, +4,834,106497,3471,Honolulu,1067,235, +4,835,106497,3471,Honolulu,1067,235, +4,836,107009,3471,Honolulu,1123,235, +4,837,107009,3471,Honolulu,1123,235, +4,838,107009,3471,Honolulu,1123,235, +4,839,107009,3471,Honolulu,1123,235, +4,840,107521,3471,Honolulu,1179,235, +4,841,107521,3471,Honolulu,1179,235, +4,842,107521,3471,Honolulu,1179,235, +4,843,107521,3471,Honolulu,1179,235, +4,844,108033,3471,Honolulu,1236,235, +4,845,108033,3471,Honolulu,1236,235, +4,846,108033,3471,Honolulu,1236,235, +4,847,108033,3471,Honolulu,1236,235, +4,848,108545,3471,Honolulu,1293,235, +4,849,108545,3471,Honolulu,1293,235, +4,850,108545,3471,Honolulu,1293,235, +4,851,108545,3471,Honolulu,1293,235, +4,852,109057,3471,Honolulu,1350,235, +4,853,109057,3471,Honolulu,1350,235, +4,854,109057,3471,Honolulu,1350,235, +4,855,109057,3471,Honolulu,1350,235, +4,856,109569,3471,Honolulu,1408,235, +4,857,109569,3471,Honolulu,1408,235, +4,858,109569,3471,Honolulu,1408,235, +4,859,109569,3471,Honolulu,1408,235, +4,860,110081,3471,Honolulu,1466,235, +4,861,110081,3471,Honolulu,1466,235, +4,862,110081,3471,Honolulu,1466,235, +4,863,110081,3471,Honolulu,1466,235, +4,864,110593,3471,Honolulu,1525,235, +4,865,110593,3471,Honolulu,1525,235, +4,866,110593,3471,Honolulu,1525,235, +4,867,110593,3471,Honolulu,1525,235, +4,868,111105,3471,Honolulu,1584,235, +4,869,111105,3471,Honolulu,1584,235, +4,870,111105,3471,Honolulu,1584,235, +4,871,111105,3471,Honolulu,1584,235, +4,872,111617,3471,Honolulu,1644,235, +4,873,111617,3471,Honolulu,1644,235, +4,874,111617,3471,Honolulu,1644,235, +4,875,111617,3471,Honolulu,1644,235, +4,876,112129,3471,Honolulu,1704,235, +4,877,112129,3471,Honolulu,1704,235, +4,878,112129,3471,Honolulu,1704,235, +4,879,112129,3471,Honolulu,1704,235, +4,880,112641,3471,Honolulu,1764,235, +4,881,112641,3471,Honolulu,1764,235, +4,882,112641,3471,Honolulu,1764,235, +4,883,112641,3471,Honolulu,1764,235, +4,884,113153,3471,Honolulu,1825,235, +4,885,113153,3471,Honolulu,1825,235, +4,886,113153,3471,Honolulu,1825,235, +4,887,113153,3471,Honolulu,1825,235, +4,888,113665,3471,Honolulu,1886,235, +4,889,113665,3471,Honolulu,1886,235, +4,890,113665,3471,Honolulu,1886,235, +4,891,113665,3471,Honolulu,1886,235, +4,892,114177,3471,Honolulu,1947,235, +4,893,114177,3471,Honolulu,1947,235, +4,894,114177,3471,Honolulu,1947,235, +4,895,114177,3471,Honolulu,1947,235, +4,896,114689,3471,Honolulu,2009,235, +4,897,114689,3471,Honolulu,2009,235, +4,898,114689,3471,Honolulu,2009,235, +4,899,114689,3471,Honolulu,2009,235, +4,900,115201,3471,Honolulu,2071,235, +4,901,115201,3471,Honolulu,2071,235, +4,902,115201,3471,Honolulu,2071,235, +4,903,115201,3471,Honolulu,2071,235, +4,904,115713,3471,Honolulu,2133,235, +4,905,115713,3471,Honolulu,2133,235, +4,906,115713,3471,Honolulu,2133,235, +4,907,115713,3471,Honolulu,2133,235, +4,908,116225,3471,Honolulu,2196,235, +4,909,116225,3471,Honolulu,2196,235, +4,910,116225,3471,Honolulu,2196,235, +4,911,116225,3471,Honolulu,2196,235, +4,912,116737,3471,Honolulu,2259,235, +4,913,116737,3471,Honolulu,2259,235, +4,914,116737,3471,Honolulu,2259,235, +4,915,116737,3471,Honolulu,2259,235, +4,916,117249,3471,Honolulu,2322,235, +4,917,117249,3471,Honolulu,2322,235, +4,918,117249,3471,Honolulu,2322,235, +4,919,117249,3471,Honolulu,2322,235, +4,920,117761,3471,Honolulu,2386,235, +4,921,117761,3471,Honolulu,2386,235, +4,922,117761,3471,Honolulu,2386,235, +4,923,117761,3471,Honolulu,2386,235, +4,924,118273,3471,Honolulu,2450,235, +4,925,118273,3471,Honolulu,2450,235, +4,926,118273,3471,Honolulu,2450,235, +4,927,118273,3471,Honolulu,2450,235, +4,928,118785,3471,Honolulu,2514,235, +4,929,118785,3471,Honolulu,2514,235, +4,930,118785,3471,Honolulu,2514,235, +4,931,118785,3471,Honolulu,2514,235, +4,932,119297,3471,Honolulu,2579,235, +4,933,119297,3471,Honolulu,2579,235, +4,934,119297,3471,Honolulu,2579,235, +4,935,119297,3471,Honolulu,2579,235, +4,936,119809,3471,Honolulu,2644,235, +4,937,119809,3471,Honolulu,2644,235, +4,938,119809,3471,Honolulu,2644,235, +4,939,119809,3471,Honolulu,2644,235, +4,940,120321,3471,Honolulu,2709,235, +4,941,120321,3471,Honolulu,2709,235, +4,942,120321,3471,Honolulu,2709,235, +4,943,120321,3471,Honolulu,2709,235, +4,944,120833,3471,Honolulu,2774,235, +4,945,120833,3471,Honolulu,2774,235, +4,946,120833,3471,Honolulu,2774,235, +4,947,120833,3471,Honolulu,2774,235, +4,948,121345,3471,Honolulu,2836,235, +4,949,121345,3471,Honolulu,2836,235, +4,950,121345,3471,Honolulu,2836,235, +4,951,121345,3471,Honolulu,2836,235, +4,952,121857,3208,Atafu Village,3,223, +4,953,121857,3208,Atafu Village,3,223, +4,954,121857,3208,Atafu Village,3,223, +4,955,121857,3208,Atafu Village,3,223, +4,956,122369,3208,Atafu Village,6,223, +4,957,122369,3208,Atafu Village,6,223, +4,958,122369,3208,Atafu Village,6,223, +4,959,122369,3208,Atafu Village,6,223, +4,960,122881,3208,Atafu Village,11,223, +4,961,122881,3208,Atafu Village,11,223, +4,962,122881,3208,Atafu Village,11,223, +4,963,122881,3208,Atafu Village,11,223, +4,964,123393,3208,Atafu Village,18,223, +4,965,123393,3208,Atafu Village,18,223, +4,966,123393,3208,Atafu Village,18,223, +4,967,123393,3208,Atafu Village,18,223, +4,968,123905,3208,Atafu Village,27,223, +4,969,123905,3208,Atafu Village,27,223, +4,970,123905,3208,Atafu Village,27,223, +4,971,123905,3208,Atafu Village,27,223, +4,972,124417,3208,Atafu Village,38,223, +4,973,124417,3208,Atafu Village,38,223, +4,974,124417,3208,Atafu Village,38,223, +4,975,124417,3208,Atafu Village,38,223, +4,976,124929,3208,Atafu Village,51,223, +4,977,124929,3208,Atafu Village,51,223, +4,978,124929,3208,Atafu Village,51,223, +4,979,124929,3208,Atafu Village,51,223, +4,980,125441,3208,Atafu Village,66,223, +4,981,125441,3208,Atafu Village,66,223, +4,982,125441,3208,Atafu Village,66,223, +4,983,125441,3208,Atafu Village,66,223, +4,984,125953,3208,Atafu Village,83,223, +4,985,125953,3208,Atafu Village,83,223, +4,986,125953,3208,Atafu Village,83,223, +4,987,125953,3208,Atafu Village,83,223, +4,988,126465,3208,Atafu Village,102,223, +4,989,126465,3208,Atafu Village,102,223, +4,990,126465,3208,Atafu Village,102,223, +4,991,126465,3208,Atafu Village,102,223, +4,992,126977,3208,Atafu Village,123,223, +4,993,126977,3208,Atafu Village,123,223, +4,994,126977,3208,Atafu Village,123,223, +4,995,126977,3208,Atafu Village,123,223, +4,996,127489,3208,Atafu Village,146,223, +4,997,127489,3208,Atafu Village,146,223, +4,998,127489,3208,Atafu Village,146,223, +4,999,127489,3208,Atafu Village,146,223, +4,1000,128001,3208,Atafu Village,171,223, +4,1001,128001,3208,Atafu Village,171,223, +4,1002,128001,3208,Atafu Village,171,223, +4,1003,128001,3208,Atafu Village,171,223, +4,1004,128513,3208,Atafu Village,195,223, +4,1005,128513,3208,Atafu Village,195,223, +4,1006,128513,3208,Atafu Village,195,223, +4,1007,128513,3208,Atafu Village,195,223, +4,1008,129025,3208,Atafu Village,219,223, +4,1009,129025,3208,Atafu Village,219,223, +4,1010,129025,3208,Atafu Village,219,223, +4,1011,129025,3208,Atafu Village,219,223, +4,1012,129537,3208,Atafu Village,242,223, +4,1013,129537,3208,Atafu Village,242,223, +4,1014,129537,3208,Atafu Village,242,223, +4,1015,129537,3208,Atafu Village,242,223, +4,1016,130049,3208,Atafu Village,264,223, +4,1017,130049,3208,Atafu Village,264,223, +4,1018,130049,3208,Atafu Village,264,223, +4,1019,130049,3208,Atafu Village,264,223, +4,1020,130561,3208,Atafu Village,286,223, +4,1021,130561,3208,Atafu Village,286,223, +4,1022,130561,3208,Atafu Village,286,223, +4,1023,130561,3208,Atafu Village,286,223, +4,1024,131073,3208,Atafu Village,307,223, +4,1025,131073,3208,Atafu Village,307,223, +4,1026,131073,3208,Atafu Village,307,223, +4,1027,131073,3208,Atafu Village,307,223, +4,1028,131585,3208,Atafu Village,327,223, +4,1029,131585,3208,Atafu Village,327,223, +4,1030,131585,3208,Atafu Village,327,223, +4,1031,131585,3208,Atafu Village,327,223, +4,1032,132097,3208,Atafu Village,347,223, +4,1033,132097,3208,Atafu Village,347,223, +4,1034,132097,3208,Atafu Village,347,223, +4,1035,132097,3208,Atafu Village,347,223, +4,1036,132609,3208,Atafu Village,366,223, +4,1037,132609,3208,Atafu Village,366,223, +4,1038,132609,3208,Atafu Village,366,223, +4,1039,132609,3208,Atafu Village,366,223, +4,1040,133121,3208,Atafu Village,384,223, +4,1041,133121,3208,Atafu Village,384,223, +4,1042,133121,3208,Atafu Village,384,223, +4,1043,133121,3208,Atafu Village,384,223, +4,1044,133633,3208,Atafu Village,402,223, +4,1045,133633,3208,Atafu Village,402,223, +4,1046,133633,3208,Atafu Village,402,223, +4,1047,133633,3208,Atafu Village,402,223, +4,1048,134145,3208,Atafu Village,419,223, +4,1049,134145,3208,Atafu Village,419,223, +4,1050,134145,3208,Atafu Village,419,223, +4,1051,134145,3208,Atafu Village,419,223, +4,1052,134657,3208,Atafu Village,435,223, +4,1053,134657,3208,Atafu Village,435,223, +4,1054,134657,3208,Atafu Village,435,223, +4,1055,134657,3208,Atafu Village,435,223, +4,1056,135169,3208,Atafu Village,451,223, +4,1057,135169,3208,Atafu Village,451,223, +4,1058,135169,3208,Atafu Village,451,223, +4,1059,135169,3208,Atafu Village,451,223, +4,1060,135681,3208,Atafu Village,465,223, +4,1061,135681,3208,Atafu Village,465,223, +4,1062,135681,3208,Atafu Village,465,223, +4,1063,135681,3208,Atafu Village,465,223, +4,1064,136193,3610,Mata-Utu,3,245, +4,1065,136193,3610,Mata-Utu,3,245, +4,1066,136193,3610,Mata-Utu,3,245, +4,1067,136193,3610,Mata-Utu,3,245, +4,1068,136705,3610,Mata-Utu,6,245, +4,1069,136705,3610,Mata-Utu,6,245, +4,1070,136705,3610,Mata-Utu,6,245, +4,1071,136705,3610,Mata-Utu,6,245, +4,1072,137217,3610,Mata-Utu,10,245, +4,1073,137217,3610,Mata-Utu,10,245, +4,1074,137217,3610,Mata-Utu,10,245, +4,1075,137217,3610,Mata-Utu,10,245, +4,1076,137729,3610,Mata-Utu,15,245, +4,1077,137729,3610,Mata-Utu,15,245, +4,1078,137729,3610,Mata-Utu,15,245, +4,1079,137729,3610,Mata-Utu,15,245, +4,1080,138241,3610,Mata-Utu,20,245, +4,1081,138241,3610,Mata-Utu,20,245, +4,1082,138241,3610,Mata-Utu,20,245, +4,1083,138241,3610,Mata-Utu,20,245, +4,1084,138753,3610,Mata-Utu,27,245, +4,1085,138753,3610,Mata-Utu,27,245, +4,1086,138753,3610,Mata-Utu,27,245, +4,1087,138753,3610,Mata-Utu,27,245, +4,1088,139265,3609,Leava,4,245, +4,1089,139265,3609,Leava,4,245, +4,1090,139265,3609,Leava,4,245, +4,1091,139265,3609,Leava,4,245, +4,1092,139777,3609,Leava,6,245, +4,1093,139777,3609,Leava,6,245, +4,1094,139777,3609,Leava,6,245, +4,1095,139777,3609,Leava,6,245, +4,1096,140289,3609,Leava,8,245, +4,1097,140289,3609,Leava,8,245, +4,1098,140289,3609,Leava,8,245, +4,1099,140289,3609,Leava,8,245, +4,1100,140801,3609,Leava,11,245, +4,1101,140801,3609,Leava,11,245, +4,1102,140801,3609,Leava,11,245, +4,1103,140801,3609,Leava,11,245, +4,1104,141313,3609,Leava,14,245, +4,1105,141313,3609,Leava,14,245, +4,1106,141313,3609,Leava,14,245, +4,1107,141313,3609,Leava,14,245, +4,1108,141825,3609,Leava,17,245, +4,1109,141825,3609,Leava,17,245, +4,1110,141825,3609,Leava,17,245, +4,1111,141825,3609,Leava,17,245, +4,1112,142337,3609,Leava,20,245, +4,1113,142337,3609,Leava,20,245, +4,1114,142337,3609,Leava,20,245, +4,1115,142337,3609,Leava,20,245, +4,1116,142849,3609,Leava,22,245, +4,1117,142849,3609,Leava,22,245, +4,1118,142849,3609,Leava,22,245, +4,1119,142849,3609,Leava,22,245, +4,1120,143361,3609,Leava,24,245, +4,1121,143361,3609,Leava,24,245, +4,1122,143361,3609,Leava,24,245, +4,1123,143361,3609,Leava,24,245, +4,1124,143873,3611,Alo,10,245, +4,1125,143873,3611,Alo,10,245, +4,1126,143873,3611,Alo,10,245, +4,1127,143873,3611,Alo,10,245, +4,1128,144385,3253,Nuku‘alofa,1,224, +4,1129,144385,3253,Nuku‘alofa,1,224, +4,1130,144385,3253,Nuku‘alofa,1,224, +4,1131,144385,3253,Nuku‘alofa,1,224, +4,1132,144897,3253,Nuku‘alofa,5,224, +4,1133,144897,3253,Nuku‘alofa,5,224, +4,1134,144897,3253,Nuku‘alofa,5,224, +4,1135,144897,3253,Nuku‘alofa,5,224, +4,1136,145409,3253,Nuku‘alofa,10,224, +4,1137,145409,3253,Nuku‘alofa,10,224, +4,1138,145409,3253,Nuku‘alofa,10,224, +4,1139,145409,3253,Nuku‘alofa,10,224, +4,1140,145921,3253,Nuku‘alofa,17,224, +4,1141,145921,3253,Nuku‘alofa,17,224, +4,1142,145921,3253,Nuku‘alofa,17,224, +4,1143,145921,3253,Nuku‘alofa,17,224, +4,1144,146433,3253,Nuku‘alofa,25,224, +4,1145,146433,3253,Nuku‘alofa,25,224, +4,1146,146433,3253,Nuku‘alofa,25,224, +4,1147,146433,3253,Nuku‘alofa,25,224, +4,1148,146945,3253,Nuku‘alofa,33,224, +4,1149,146945,3253,Nuku‘alofa,33,224, +4,1150,146945,3253,Nuku‘alofa,33,224, +4,1151,146945,3253,Nuku‘alofa,33,224, +4,1152,147457,3253,Nuku‘alofa,40,224, +4,1153,147457,3253,Nuku‘alofa,40,224, +4,1154,147457,3253,Nuku‘alofa,40,224, +4,1155,147457,3253,Nuku‘alofa,40,224, +4,1156,147969,3253,Nuku‘alofa,46,224, +4,1157,147969,3253,Nuku‘alofa,46,224, +4,1158,147969,3253,Nuku‘alofa,46,224, +4,1159,147969,3253,Nuku‘alofa,46,224, +4,1160,148481,3253,Nuku‘alofa,52,224, +4,1161,148481,3253,Nuku‘alofa,52,224, +4,1162,148481,3253,Nuku‘alofa,52,224, +4,1163,148481,3253,Nuku‘alofa,52,224, +4,1164,148993,3253,Nuku‘alofa,57,224, +4,1165,148993,3253,Nuku‘alofa,57,224, +4,1166,148993,3253,Nuku‘alofa,57,224, +4,1167,148993,3253,Nuku‘alofa,57,224, +4,1168,149505,3253,Nuku‘alofa,61,224, +4,1169,149505,3253,Nuku‘alofa,61,224, +4,1170,149505,3253,Nuku‘alofa,61,224, +4,1171,149505,3253,Nuku‘alofa,61,224, +4,1172,150017,3253,Nuku‘alofa,64,224, +4,1173,150017,3253,Nuku‘alofa,64,224, +4,1174,150017,3253,Nuku‘alofa,64,224, +4,1175,150017,3253,Nuku‘alofa,64,224, +4,1176,150529,3253,Nuku‘alofa,67,224, +4,1177,150529,3253,Nuku‘alofa,67,224, +4,1178,150529,3253,Nuku‘alofa,67,224, +4,1179,150529,3253,Nuku‘alofa,67,224, +4,1180,151041,3252,‘Ohonua,73,224, +4,1181,151041,3252,‘Ohonua,73,224, +4,1182,151041,3252,‘Ohonua,73,224, +4,1183,151041,3252,‘Ohonua,73,224, +4,1184,151553,3252,‘Ohonua,89,224, +4,1185,151553,3252,‘Ohonua,89,224, +4,1186,151553,3252,‘Ohonua,89,224, +4,1187,151553,3252,‘Ohonua,89,224, +4,1188,152065,3252,‘Ohonua,105,224, +4,1189,152065,3252,‘Ohonua,105,224, +4,1190,152065,3252,‘Ohonua,105,224, +4,1191,152065,3252,‘Ohonua,105,224, +4,1192,152577,3252,‘Ohonua,121,224, +4,1193,152577,3252,‘Ohonua,121,224, +4,1194,152577,3252,‘Ohonua,121,224, +4,1195,152577,3252,‘Ohonua,121,224, +4,1196,153089,3252,‘Ohonua,138,224, +4,1197,153089,3252,‘Ohonua,138,224, +4,1198,153089,3252,‘Ohonua,138,224, +4,1199,153089,3252,‘Ohonua,138,224, +4,1200,153601,3252,‘Ohonua,155,224, +4,1201,153601,3252,‘Ohonua,155,224, +4,1202,153601,3252,‘Ohonua,155,224, +4,1203,153601,3252,‘Ohonua,155,224, +4,1204,154113,3252,‘Ohonua,173,224, +4,1205,154113,3252,‘Ohonua,173,224, +4,1206,154113,3252,‘Ohonua,173,224, +4,1207,154113,3252,‘Ohonua,173,224, +4,1208,154625,3252,‘Ohonua,191,224, +4,1209,154625,3252,‘Ohonua,191,224, +4,1210,154625,3252,‘Ohonua,191,224, +4,1211,154625,3252,‘Ohonua,191,224, +4,1212,155137,3252,‘Ohonua,209,224, +4,1213,155137,3252,‘Ohonua,209,224, +4,1214,155137,3252,‘Ohonua,209,224, +4,1215,155137,3252,‘Ohonua,209,224, +4,1216,155649,3252,‘Ohonua,227,224, +4,1217,155649,3252,‘Ohonua,227,224, +4,1218,155649,3252,‘Ohonua,227,224, +4,1219,155649,3252,‘Ohonua,227,224, +4,1220,156161,2317,Waitangi,2,155, +4,1221,156161,2317,Waitangi,2,155, +4,1222,156161,2317,Waitangi,2,155, +4,1223,156161,2317,Waitangi,2,155, +4,1224,156673,2317,Waitangi,7,155, +4,1225,156673,2317,Waitangi,7,155, +4,1226,156673,2317,Waitangi,7,155, +4,1227,156673,2317,Waitangi,7,155, +4,1228,157185,2317,Waitangi,24,155, +4,1229,157185,2317,Waitangi,24,155, +4,1230,157185,2317,Waitangi,24,155, +4,1231,157185,2317,Waitangi,24,155, +4,1232,157697,2317,Waitangi,43,155, +4,1233,157697,2317,Waitangi,43,155, +4,1234,157697,2317,Waitangi,43,155, +4,1235,157697,2317,Waitangi,43,155, +4,1236,158209,2317,Waitangi,63,155, +4,1237,158209,2317,Waitangi,63,155, +4,1238,158209,2317,Waitangi,63,155, +4,1239,158209,2317,Waitangi,63,155, +4,1240,158721,2317,Waitangi,84,155, +4,1241,158721,2317,Waitangi,84,155, +4,1242,158721,2317,Waitangi,84,155, +4,1243,158721,2317,Waitangi,84,155, +4,1244,159233,2317,Waitangi,106,155, +4,1245,159233,2317,Waitangi,106,155, +4,1246,159233,2317,Waitangi,106,155, +4,1247,159233,2317,Waitangi,106,155, +4,1248,159745,2317,Waitangi,129,155, +4,1249,159745,2317,Waitangi,129,155, +4,1250,159745,2317,Waitangi,129,155, +4,1251,159745,2317,Waitangi,129,155, +4,1252,160257,2317,Waitangi,153,155, +4,1253,160257,2317,Waitangi,153,155, +4,1254,160257,2317,Waitangi,153,155, +4,1255,160257,2317,Waitangi,153,155, +4,1256,160769,2317,Waitangi,178,155, +4,1257,160769,2317,Waitangi,178,155, +4,1258,160769,2317,Waitangi,178,155, +4,1259,160769,2317,Waitangi,178,155, +4,1260,161281,2317,Waitangi,204,155, +4,1261,161281,2317,Waitangi,204,155, +4,1262,161281,2317,Waitangi,204,155, +4,1263,161281,2317,Waitangi,204,155, +4,1264,161793,2317,Waitangi,231,155, +4,1265,161793,2317,Waitangi,231,155, +4,1266,161793,2317,Waitangi,231,155, +4,1267,161793,2317,Waitangi,231,155, +4,1268,162305,2317,Waitangi,259,155, +4,1269,162305,2317,Waitangi,259,155, +4,1270,162305,2317,Waitangi,259,155, +4,1271,162305,2317,Waitangi,259,155, +4,1272,162817,2317,Waitangi,288,155, +4,1273,162817,2317,Waitangi,288,155, +4,1274,162817,2317,Waitangi,288,155, +4,1275,162817,2317,Waitangi,288,155, +4,1276,163329,2317,Waitangi,319,155, +4,1277,163329,2317,Waitangi,319,155, +4,1278,163329,2317,Waitangi,319,155, +4,1279,163329,2317,Waitangi,319,155, +4,1280,163841,2317,Waitangi,351,155, +4,1281,163841,2317,Waitangi,351,155, +4,1282,163841,2317,Waitangi,351,155, +4,1283,163841,2317,Waitangi,351,155, +4,1284,164353,2317,Waitangi,384,155, +4,1285,164353,2317,Waitangi,384,155, +4,1286,164353,2317,Waitangi,384,155, +4,1287,164353,2317,Waitangi,384,155, +4,1288,164865,2317,Waitangi,418,155, +4,1289,164865,2317,Waitangi,418,155, +4,1290,164865,2317,Waitangi,418,155, +4,1291,164865,2317,Waitangi,418,155, +4,1292,165377,2317,Waitangi,453,155, +4,1293,165377,2317,Waitangi,453,155, +4,1294,165377,2317,Waitangi,453,155, +4,1295,165377,2317,Waitangi,453,155, +4,1296,165889,2317,Waitangi,489,155, +4,1297,165889,2317,Waitangi,489,155, +4,1298,165889,2317,Waitangi,489,155, +4,1299,165889,2317,Waitangi,489,155, +4,1300,166401,2317,Waitangi,526,155, +4,1301,166401,2317,Waitangi,526,155, +4,1302,166401,2317,Waitangi,526,155, +4,1303,166401,2317,Waitangi,526,155, +4,1304,166913,2317,Waitangi,564,155, +4,1305,166913,2317,Waitangi,564,155, +4,1306,166913,2317,Waitangi,564,155, +4,1307,166913,2317,Waitangi,564,155, +4,1308,167425,2317,Waitangi,603,155, +4,1309,167425,2317,Waitangi,603,155, +4,1310,167425,2317,Waitangi,603,155, +4,1311,167425,2317,Waitangi,603,155, +4,1312,167937,2317,Waitangi,643,155, +4,1313,167937,2317,Waitangi,643,155, +4,1314,167937,2317,Waitangi,643,155, +4,1315,167937,2317,Waitangi,643,155, +4,1316,168449,2317,Waitangi,683,155, +4,1317,168449,2317,Waitangi,683,155, +4,1318,168449,2317,Waitangi,683,155, +4,1319,168449,2317,Waitangi,683,155, +4,1320,168961,2317,Waitangi,724,155, +4,1321,168961,2317,Waitangi,724,155, +4,1322,168961,2317,Waitangi,724,155, +4,1323,168961,2317,Waitangi,724,155, +4,1324,169473,2317,Waitangi,766,155, +4,1325,169473,2317,Waitangi,766,155, +4,1326,169473,2317,Waitangi,766,155, +4,1327,169473,2317,Waitangi,766,155, +4,1328,169985,2317,Waitangi,809,155, +4,1329,169985,2317,Waitangi,809,155, +4,1330,169985,2317,Waitangi,809,155, +4,1331,169985,2317,Waitangi,809,155, +4,1332,170497,2317,Waitangi,853,155, +4,1333,170497,2317,Waitangi,853,155, +4,1334,170497,2317,Waitangi,853,155, +4,1335,170497,2317,Waitangi,853,155, +4,1336,171009,2317,Waitangi,899,155, +4,1337,171009,2317,Waitangi,899,155, +4,1338,171009,2317,Waitangi,899,155, +4,1339,171009,2317,Waitangi,899,155, +4,1340,171521,2317,Waitangi,945,155, +4,1341,171521,2317,Waitangi,945,155, +4,1342,171521,2317,Waitangi,945,155, +4,1343,171521,2317,Waitangi,945,155, +4,1344,172033,2317,Waitangi,992,155, +4,1345,172033,2317,Waitangi,992,155, +4,1346,172033,2317,Waitangi,992,155, +4,1347,172033,2317,Waitangi,992,155, +4,1348,172545,2317,Waitangi,1039,155, +4,1349,172545,2317,Waitangi,1039,155, +4,1350,172545,2317,Waitangi,1039,155, +4,1351,172545,2317,Waitangi,1039,155, +4,1352,173057,2317,Waitangi,1086,155, +4,1353,173057,2317,Waitangi,1086,155, +4,1354,173057,2317,Waitangi,1086,155, +4,1355,173057,2317,Waitangi,1086,155, +4,1356,173569,2317,Waitangi,1133,155, +4,1357,173569,2317,Waitangi,1133,155, +4,1358,173569,2317,Waitangi,1133,155, +4,1359,173569,2317,Waitangi,1133,155, +4,1360,174081,2317,Waitangi,1181,155, +4,1361,174081,2317,Waitangi,1181,155, +4,1362,174081,2317,Waitangi,1181,155, +4,1363,174081,2317,Waitangi,1181,155, +4,1364,174593,2317,Waitangi,1229,155, +4,1365,174593,2317,Waitangi,1229,155, +4,1366,174593,2317,Waitangi,1229,155, +4,1367,174593,2317,Waitangi,1229,155, +4,1368,175105,2317,Waitangi,1277,155, +4,1369,175105,2317,Waitangi,1277,155, +4,1370,175105,2317,Waitangi,1277,155, +4,1371,175105,2317,Waitangi,1277,155, +4,1372,175617,2317,Waitangi,1325,155, +4,1373,175617,2317,Waitangi,1325,155, +4,1374,175617,2317,Waitangi,1325,155, +4,1375,175617,2317,Waitangi,1325,155, +4,1376,176129,2317,Waitangi,1374,155, +4,1377,176129,2317,Waitangi,1374,155, +4,1378,176129,2317,Waitangi,1374,155, +4,1379,176129,2317,Waitangi,1374,155, +4,1380,176641,2317,Waitangi,1423,155, +4,1381,176641,2317,Waitangi,1423,155, +4,1382,176641,2317,Waitangi,1423,155, +4,1383,176641,2317,Waitangi,1423,155, +4,1384,177153,2317,Waitangi,1472,155, +4,1385,177153,2317,Waitangi,1472,155, +4,1386,177153,2317,Waitangi,1472,155, +4,1387,177153,2317,Waitangi,1472,155, +4,1388,177665,2317,Waitangi,1521,155, +4,1389,177665,2317,Waitangi,1521,155, +4,1390,177665,2317,Waitangi,1521,155, +4,1391,177665,2317,Waitangi,1521,155, +4,1392,178177,2317,Waitangi,1571,155, +4,1393,178177,2317,Waitangi,1571,155, +4,1394,178177,2317,Waitangi,1571,155, +4,1395,178177,2317,Waitangi,1571,155, +4,1396,178689,2317,Waitangi,1621,155, +4,1397,178689,2317,Waitangi,1621,155, +4,1398,178689,2317,Waitangi,1621,155, +4,1399,178689,2317,Waitangi,1621,155, +4,1400,179201,2317,Waitangi,1671,155, +4,1401,179201,2317,Waitangi,1671,155, +4,1402,179201,2317,Waitangi,1671,155, +4,1403,179201,2317,Waitangi,1671,155, +4,1404,179713,2317,Waitangi,1721,155, +4,1405,179713,2317,Waitangi,1721,155, +4,1406,179713,2317,Waitangi,1721,155, +4,1407,179713,2317,Waitangi,1721,155, +4,1408,180225,2317,Waitangi,1772,155, +4,1409,180225,2317,Waitangi,1772,155, +4,1410,180225,2317,Waitangi,1772,155, +4,1411,180225,2317,Waitangi,1772,155, +4,1412,180737,2317,Waitangi,1823,155, +4,1413,180737,2317,Waitangi,1823,155, +4,1414,180737,2317,Waitangi,1823,155, +4,1415,180737,2317,Waitangi,1823,155, +4,1416,181249,2317,Waitangi,1874,155, +4,1417,181249,2317,Waitangi,1874,155, +4,1418,181249,2317,Waitangi,1874,155, +4,1419,181249,2317,Waitangi,1874,155, +4,1420,181761,2317,Waitangi,1925,155, +4,1421,181761,2317,Waitangi,1925,155, +4,1422,181761,2317,Waitangi,1925,155, +4,1423,181761,2317,Waitangi,1925,155, +4,1424,182273,2317,Waitangi,1977,155, +4,1425,182273,2317,Waitangi,1977,155, +4,1426,182273,2317,Waitangi,1977,155, +4,1427,182273,2317,Waitangi,1977,155, +4,1428,182785,2317,Waitangi,2029,155, +4,1429,182785,2317,Waitangi,2029,155, +4,1430,182785,2317,Waitangi,2029,155, +4,1431,182785,2317,Waitangi,2029,155, +4,1432,183297,2317,Waitangi,2081,155, +4,1433,183297,2317,Waitangi,2081,155, +4,1434,183297,2317,Waitangi,2081,155, +4,1435,183297,2317,Waitangi,2081,155, +4,1436,183809,2317,Waitangi,2133,155, +4,1437,183809,2317,Waitangi,2133,155, +4,1438,183809,2317,Waitangi,2133,155, +4,1439,183809,2317,Waitangi,2133,155, +4,1440,184321,2317,Waitangi,2185,155, +4,1441,184321,2317,Waitangi,2185,155, +4,1442,184321,2317,Waitangi,2185,155, +4,1443,184321,2317,Waitangi,2185,155, +4,1444,184833,2317,Waitangi,2238,155, +4,1445,184833,2317,Waitangi,2238,155, +4,1446,184833,2317,Waitangi,2238,155, +4,1447,184833,2317,Waitangi,2238,155, +4,1448,185345,2317,Waitangi,2291,155, +4,1449,185345,2317,Waitangi,2291,155, +4,1450,185345,2317,Waitangi,2291,155, +4,1451,185345,2317,Waitangi,2291,155, +4,1452,185857,2317,Waitangi,2344,155, +4,1453,185857,2317,Waitangi,2344,155, +4,1454,185857,2317,Waitangi,2344,155, +4,1455,185857,2317,Waitangi,2344,155, +4,1456,186369,2317,Waitangi,2397,155, +4,1457,186369,2317,Waitangi,2397,155, +4,1458,186369,2317,Waitangi,2397,155, +4,1459,186369,2317,Waitangi,2397,155, +4,1460,186881,2317,Waitangi,2450,155, +4,1461,186881,2317,Waitangi,2450,155, +4,1462,186881,2317,Waitangi,2450,155, +4,1463,186881,2317,Waitangi,2450,155, +4,1464,187393,2317,Waitangi,2504,155, +4,1465,187393,2317,Waitangi,2504,155, +4,1466,187393,2317,Waitangi,2504,155, +4,1467,187393,2317,Waitangi,2504,155, +4,1468,187905,2317,Waitangi,2558,155, +4,1469,187905,2317,Waitangi,2558,155, +4,1470,187905,2317,Waitangi,2558,155, +4,1471,187905,2317,Waitangi,2558,155, +4,1472,188417,2317,Waitangi,2612,155, +4,1473,188417,2317,Waitangi,2612,155, +4,1474,188417,2317,Waitangi,2612,155, +4,1475,188417,2317,Waitangi,2612,155, +4,1476,188929,2317,Waitangi,2666,155, +4,1477,188929,2317,Waitangi,2666,155, +4,1478,188929,2317,Waitangi,2666,155, +4,1479,188929,2317,Waitangi,2666,155, +4,1480,189441,2317,Waitangi,2720,155, +4,1481,189441,2317,Waitangi,2720,155, +4,1482,189441,2317,Waitangi,2720,155, +4,1483,189441,2317,Waitangi,2720,155, +4,1484,189953,2317,Waitangi,2775,155, +4,1485,189953,2317,Waitangi,2775,155, +4,1486,189953,2317,Waitangi,2775,155, +4,1487,189953,2317,Waitangi,2775,155, +4,1488,190465,2317,Waitangi,2830,155, +4,1489,190465,2317,Waitangi,2830,155, +4,1490,190465,2317,Waitangi,2830,155, +4,1491,190465,2317,Waitangi,2830,155, +4,1492,190977,2317,Waitangi,2885,155, +4,1493,190977,2317,Waitangi,2885,155, +4,1494,190977,2317,Waitangi,2885,155, +4,1495,190977,2317,Waitangi,2885,155, +4,1496,191489,2317,Waitangi,2940,155, +4,1497,191489,2317,Waitangi,2940,155, +4,1498,191489,2317,Waitangi,2940,155, +4,1499,191489,2317,Waitangi,2940,155, +4,1500,192001,2317,Waitangi,2995,155, +4,1501,192001,2317,Waitangi,2995,155, +4,1502,192001,2317,Waitangi,2995,155, +4,1503,192001,2317,Waitangi,2995,155, +4,1504,192513,2317,Waitangi,3050,155, +4,1505,192513,2317,Waitangi,3050,155, +4,1506,192513,2317,Waitangi,3050,155, +4,1507,192513,2317,Waitangi,3050,155, +4,1508,193025,2317,Waitangi,3106,155, +4,1509,193025,2317,Waitangi,3106,155, +4,1510,193025,2317,Waitangi,3106,155, +4,1511,193025,2317,Waitangi,3106,155, +4,1512,193537,2317,Waitangi,3162,155, +4,1513,193537,2317,Waitangi,3162,155, +4,1514,193537,2317,Waitangi,3162,155, +4,1515,193537,2317,Waitangi,3162,155, +4,1516,194049,2317,Waitangi,3218,155, +4,1517,194049,2317,Waitangi,3218,155, +4,1518,194049,2317,Waitangi,3218,155, +4,1519,194049,2317,Waitangi,3218,155, +4,1520,194561,2317,Waitangi,3274,155, +4,1521,194561,2317,Waitangi,3274,155, +4,1522,194561,2317,Waitangi,3274,155, +4,1523,194561,2317,Waitangi,3274,155, +4,1524,195073,2317,Waitangi,3330,155, +4,1525,195073,2317,Waitangi,3330,155, +4,1526,195073,2317,Waitangi,3330,155, +4,1527,195073,2317,Waitangi,3330,155, +4,1528,195585,2317,Waitangi,3386,155, +4,1529,195585,2317,Waitangi,3386,155, +4,1530,195585,2317,Waitangi,3386,155, +4,1531,195585,2317,Waitangi,3386,155, +4,1532,196097,2317,Waitangi,3443,155, +4,1533,196097,2317,Waitangi,3443,155, +4,1534,196097,2317,Waitangi,3443,155, +4,1535,196097,2317,Waitangi,3443,155, +4,1536,196609,2317,Waitangi,3500,155, +4,1537,196609,2317,Waitangi,3500,155, +4,1538,196609,2317,Waitangi,3500,155, +4,1539,196609,2317,Waitangi,3500,155, +4,1540,197121,2317,Waitangi,3557,155, +4,1541,197121,2317,Waitangi,3557,155, +4,1542,197121,2317,Waitangi,3557,155, +4,1543,197121,2317,Waitangi,3557,155, +4,1544,197633,2317,Waitangi,3614,155, +4,1545,197633,2317,Waitangi,3614,155, +4,1546,197633,2317,Waitangi,3614,155, +4,1547,197633,2317,Waitangi,3614,155, +4,1548,198145,2317,Waitangi,3671,155, +4,1549,198145,2317,Waitangi,3671,155, +4,1550,198145,2317,Waitangi,3671,155, +4,1551,198145,2317,Waitangi,3671,155, +4,1552,198657,2317,Waitangi,3728,155, +4,1553,198657,2317,Waitangi,3728,155, +4,1554,198657,2317,Waitangi,3728,155, +4,1555,198657,2317,Waitangi,3728,155, +4,1556,199169,2317,Waitangi,3786,155, +4,1557,199169,2317,Waitangi,3786,155, +4,1558,199169,2317,Waitangi,3786,155, +4,1559,199169,2317,Waitangi,3786,155, +4,1560,199681,2317,Waitangi,3844,155, +4,1561,199681,2317,Waitangi,3844,155, +4,1562,199681,2317,Waitangi,3844,155, +4,1563,199681,2317,Waitangi,3844,155, +4,1564,200193,2317,Waitangi,3902,155, +4,1565,200193,2317,Waitangi,3902,155, +4,1566,200193,2317,Waitangi,3902,155, +4,1567,200193,2317,Waitangi,3902,155, +4,1568,200705,2317,Waitangi,3960,155, +4,1569,200705,2317,Waitangi,3960,155, +4,1570,200705,2317,Waitangi,3960,155, +4,1571,200705,2317,Waitangi,3960,155, +4,1572,201217,2317,Waitangi,4018,155, +4,1573,201217,2317,Waitangi,4018,155, +4,1574,201217,2317,Waitangi,4018,155, +4,1575,201217,2317,Waitangi,4018,155, +4,1576,201729,2317,Waitangi,4076,155, +4,1577,201729,2317,Waitangi,4076,155, +4,1578,201729,2317,Waitangi,4076,155, +4,1579,201729,2317,Waitangi,4076,155, +4,1580,202241,2317,Waitangi,4134,155, +4,1581,202241,2317,Waitangi,4134,155, +4,1582,202241,2317,Waitangi,4134,155, +4,1583,202241,2317,Waitangi,4134,155, +4,1584,202753,2317,Waitangi,4193,155, +4,1585,202753,2317,Waitangi,4193,155, +4,1586,202753,2317,Waitangi,4193,155, +4,1587,202753,2317,Waitangi,4193,155, +4,1588,203265,2317,Waitangi,4252,155, +4,1589,203265,2317,Waitangi,4252,155, +4,1590,203265,2317,Waitangi,4252,155, +4,1591,203265,2317,Waitangi,4252,155, +4,1592,203777,2317,Waitangi,4311,155, +4,1593,203777,2317,Waitangi,4311,155, +4,1594,203777,2317,Waitangi,4311,155, +4,1595,203777,2317,Waitangi,4311,155, +4,1596,204289,2317,Waitangi,4370,155, +4,1597,204289,2317,Waitangi,4370,155, +4,1598,204289,2317,Waitangi,4370,155, +4,1599,204289,2317,Waitangi,4370,155, +4,1600,204801,2317,Waitangi,4429,155, +4,1601,204801,2317,Waitangi,4429,155, +4,1602,204801,2317,Waitangi,4429,155, +4,1603,204801,2317,Waitangi,4429,155, +4,1604,205313,2317,Waitangi,4488,155, +4,1605,205313,2317,Waitangi,4488,155, +4,1606,205313,2317,Waitangi,4488,155, +4,1607,205313,2317,Waitangi,4488,155, +4,1608,205825,2317,Waitangi,4547,155, +4,1609,205825,2317,Waitangi,4547,155, +4,1610,205825,2317,Waitangi,4547,155, +4,1611,205825,2317,Waitangi,4547,155, +4,1612,206337,2317,Waitangi,4607,155, +4,1613,206337,2317,Waitangi,4607,155, +4,1614,206337,2317,Waitangi,4607,155, +4,1615,206337,2317,Waitangi,4607,155, +4,1616,206849,2317,Waitangi,4667,155, +4,1617,206849,2317,Waitangi,4667,155, +4,1618,206849,2317,Waitangi,4667,155, +4,1619,206849,2317,Waitangi,4667,155, +4,1620,207361,2317,Waitangi,4727,155, +4,1621,207361,2317,Waitangi,4727,155, +4,1622,207361,2317,Waitangi,4727,155, +4,1623,207361,2317,Waitangi,4727,155, +4,1624,207873,2317,Waitangi,4787,155, +4,1625,207873,2317,Waitangi,4787,155, +4,1626,207873,2317,Waitangi,4787,155, +4,1627,207873,2317,Waitangi,4787,155, +4,1628,208385,2317,Waitangi,4847,155, +4,1629,208385,2317,Waitangi,4847,155, +4,1630,208385,2317,Waitangi,4847,155, +4,1631,208385,2317,Waitangi,4847,155, +4,1632,208897,2317,Waitangi,4907,155, +4,1633,208897,2317,Waitangi,4907,155, +4,1634,208897,2317,Waitangi,4907,155, +4,1635,208897,2317,Waitangi,4907,155, +4,1636,209409,2317,Waitangi,4967,155, +4,1637,209409,2317,Waitangi,4967,155, +4,1638,209409,2317,Waitangi,4967,155, +4,1639,209409,2317,Waitangi,4967,155, +4,1640,209921,2317,Waitangi,5027,155, +4,1641,209921,2317,Waitangi,5027,155, +4,1642,209921,2317,Waitangi,5027,155, +4,1643,209921,2317,Waitangi,5027,155, +4,1644,210433,2317,Waitangi,5088,155, +4,1645,210433,2317,Waitangi,5088,155, +4,1646,210433,2317,Waitangi,5088,155, +4,1647,210433,2317,Waitangi,5088,155, +4,1648,210945,2317,Waitangi,5149,155, +4,1649,210945,2317,Waitangi,5149,155, +4,1650,210945,2317,Waitangi,5149,155, +4,1651,210945,2317,Waitangi,5149,155, +4,1652,211457,2317,Waitangi,5210,155, +4,1653,211457,2317,Waitangi,5210,155, +4,1654,211457,2317,Waitangi,5210,155, +4,1655,211457,2317,Waitangi,5210,155, +4,1656,211969,2317,Waitangi,5271,155, +4,1657,211969,2317,Waitangi,5271,155, +4,1658,211969,2317,Waitangi,5271,155, +4,1659,211969,2317,Waitangi,5271,155, +4,1660,212481,2317,Waitangi,5332,155, +4,1661,212481,2317,Waitangi,5332,155, +4,1662,212481,2317,Waitangi,5332,155, +4,1663,212481,2317,Waitangi,5332,155, +4,1664,212993,2317,Waitangi,5393,155, +4,1665,212993,2317,Waitangi,5393,155, +4,1666,212993,2317,Waitangi,5393,155, +4,1667,212993,2317,Waitangi,5393,155, +4,1668,213505,2317,Waitangi,5454,155, +4,1669,213505,2317,Waitangi,5454,155, +4,1670,213505,2317,Waitangi,5454,155, +4,1671,213505,2317,Waitangi,5454,155, +4,1672,214017,2317,Waitangi,5515,155, +4,1673,214017,2317,Waitangi,5515,155, +4,1674,214017,2317,Waitangi,5515,155, +4,1675,214017,2317,Waitangi,5515,155, +4,1676,214529,2317,Waitangi,5576,155, +4,1677,214529,2317,Waitangi,5576,155, +4,1678,214529,2317,Waitangi,5576,155, +4,1679,214529,2317,Waitangi,5576,155, +4,1680,215041,2317,Waitangi,5638,155, +4,1681,215041,2317,Waitangi,5638,155, +4,1682,215041,2317,Waitangi,5638,155, +4,1683,215041,2317,Waitangi,5638,155, +4,1684,215553,2317,Waitangi,5700,155, +4,1685,215553,2317,Waitangi,5700,155, +4,1686,215553,2317,Waitangi,5700,155, +4,1687,215553,2317,Waitangi,5700,155, +4,1688,216065,2317,Waitangi,5762,155, +4,1689,216065,2317,Waitangi,5762,155, +4,1690,216065,2317,Waitangi,5762,155, +4,1691,216065,2317,Waitangi,5762,155, +4,1692,216577,2317,Waitangi,5824,155, +4,1693,216577,2317,Waitangi,5824,155, +4,1694,216577,2317,Waitangi,5824,155, +4,1695,216577,2317,Waitangi,5824,155, +4,1696,217089,2317,Waitangi,5886,155, +4,1697,217089,2317,Waitangi,5886,155, +4,1698,217089,2317,Waitangi,5886,155, +4,1699,217089,2317,Waitangi,5886,155, +4,1700,217601,2317,Waitangi,5948,155, +4,1701,217601,2317,Waitangi,5948,155, +4,1702,217601,2317,Waitangi,5948,155, +4,1703,217601,2317,Waitangi,5948,155, +4,1704,218113,2317,Waitangi,6010,155, +4,1705,218113,2317,Waitangi,6010,155, +4,1706,218113,2317,Waitangi,6010,155, +4,1707,218113,2317,Waitangi,6010,155, +4,1708,218625,2317,Waitangi,6072,155, +4,1709,218625,2317,Waitangi,6072,155, +4,1710,218625,2317,Waitangi,6072,155, +4,1711,218625,2317,Waitangi,6072,155, +4,1712,219137,2317,Waitangi,6134,155, +4,1713,219137,2317,Waitangi,6134,155, +4,1714,219137,2317,Waitangi,6134,155, +4,1715,219137,2317,Waitangi,6134,155, +4,1716,219649,2317,Waitangi,6197,155, +4,1717,219649,2317,Waitangi,6197,155, +4,1718,219649,2317,Waitangi,6197,155, +4,1719,219649,2317,Waitangi,6197,155, +4,1720,220161,2317,Waitangi,6260,155, +4,1721,220161,2317,Waitangi,6260,155, +4,1722,220161,2317,Waitangi,6260,155, +4,1723,220161,2317,Waitangi,6260,155, +4,1724,220673,2317,Waitangi,6323,155, +4,1725,220673,2317,Waitangi,6323,155, +4,1726,220673,2317,Waitangi,6323,155, +4,1727,220673,2317,Waitangi,6323,155, +4,1728,221185,2317,Waitangi,6386,155, +4,1729,221185,2317,Waitangi,6386,155, +4,1730,221185,2317,Waitangi,6386,155, +4,1731,221185,2317,Waitangi,6386,155, +4,1732,221697,2317,Waitangi,6449,155, +4,1733,221697,2317,Waitangi,6449,155, +4,1734,221697,2317,Waitangi,6449,155, +4,1735,221697,2317,Waitangi,6449,155, +4,1736,222209,2317,Waitangi,6512,155, +4,1737,222209,2317,Waitangi,6512,155, +4,1738,222209,2317,Waitangi,6512,155, +4,1739,222209,2317,Waitangi,6512,155, +4,1740,222721,2317,Waitangi,6575,155, +4,1741,222721,2317,Waitangi,6575,155, +4,1742,222721,2317,Waitangi,6575,155, +4,1743,222721,2317,Waitangi,6575,155, +4,1744,223233,2317,Waitangi,6638,155, +4,1745,223233,2317,Waitangi,6638,155, +4,1746,223233,2317,Waitangi,6638,155, +4,1747,223233,2317,Waitangi,6638,155, +4,1748,223745,2317,Waitangi,6701,155, +4,1749,223745,2317,Waitangi,6701,155, +4,1750,223745,2317,Waitangi,6701,155, +4,1751,223745,2317,Waitangi,6701,155, +4,1752,224257,2317,Waitangi,6764,155, +4,1753,224257,2317,Waitangi,6764,155, +4,1754,224257,2317,Waitangi,6764,155, +4,1755,224257,2317,Waitangi,6764,155, +4,1756,224769,2317,Waitangi,6827,155, +4,1757,224769,2317,Waitangi,6827,155, +4,1758,224769,2317,Waitangi,6827,155, +4,1759,224769,2317,Waitangi,6827,155, +4,1760,225281,2317,Waitangi,6890,155, +4,1761,225281,2317,Waitangi,6890,155, +4,1762,225281,2317,Waitangi,6890,155, +4,1763,225281,2317,Waitangi,6890,155, +4,1764,225793,2317,Waitangi,6954,155, +4,1765,225793,2317,Waitangi,6954,155, +4,1766,225793,2317,Waitangi,6954,155, +4,1767,225793,2317,Waitangi,6954,155, +4,1768,226305,2317,Waitangi,7018,155, +4,1769,226305,2317,Waitangi,7018,155, +4,1770,226305,2317,Waitangi,7018,155, +4,1771,226305,2317,Waitangi,7018,155, +4,1772,226817,2317,Waitangi,7082,155, +4,1773,226817,2317,Waitangi,7082,155, +4,1774,226817,2317,Waitangi,7082,155, +4,1775,226817,2317,Waitangi,7082,155, +4,1776,227329,2317,Waitangi,7146,155, +4,1777,227329,2317,Waitangi,7146,155, +4,1778,227329,2317,Waitangi,7146,155, +4,1779,227329,2317,Waitangi,7146,155, +4,1780,227841,2317,Waitangi,7210,155, +4,1781,227841,2317,Waitangi,7210,155, +4,1782,227841,2317,Waitangi,7210,155, +4,1783,227841,2317,Waitangi,7210,155, +4,1784,228353,2317,Waitangi,7274,155, +4,1785,228353,2317,Waitangi,7274,155, +4,1786,228353,2317,Waitangi,7274,155, +4,1787,228353,2317,Waitangi,7274,155, +4,1788,228865,2317,Waitangi,7338,155, +4,1789,228865,2317,Waitangi,7338,155, +4,1790,228865,2317,Waitangi,7338,155, +4,1791,228865,2317,Waitangi,7338,155, +4,1792,229377,2317,Waitangi,7402,155, +4,1793,229377,2317,Waitangi,7402,155, +4,1794,229377,2317,Waitangi,7402,155, +4,1795,229377,2317,Waitangi,7402,155, +4,1796,229889,2317,Waitangi,7466,155, +4,1797,229889,2317,Waitangi,7466,155, +4,1798,229889,2317,Waitangi,7466,155, +4,1799,229889,2317,Waitangi,7466,155, +4,1800,230401,2317,Waitangi,7530,155, +4,1801,230401,2317,Waitangi,7530,155, +4,1802,230401,2317,Waitangi,7530,155, +4,1803,230401,2317,Waitangi,7530,155, +4,1804,230913,2317,Waitangi,7594,155, +4,1805,230913,2317,Waitangi,7594,155, +4,1806,230913,2317,Waitangi,7594,155, +4,1807,230913,2317,Waitangi,7594,155, +4,1808,231425,2317,Waitangi,7658,155, +4,1809,231425,2317,Waitangi,7658,155, +4,1810,231425,2317,Waitangi,7658,155, +4,1811,231425,2317,Waitangi,7658,155, +4,1812,231937,2317,Waitangi,7723,155, +4,1813,231937,2317,Waitangi,7723,155, +4,1814,231937,2317,Waitangi,7723,155, +4,1815,231937,2317,Waitangi,7723,155, +4,1816,232449,2317,Waitangi,7788,155, +4,1817,232449,2317,Waitangi,7788,155, +4,1818,232449,2317,Waitangi,7788,155, +4,1819,232449,2317,Waitangi,7788,155, +4,1820,232961,2317,Waitangi,7853,155, +4,1821,232961,2317,Waitangi,7853,155, +4,1822,232961,2317,Waitangi,7853,155, +4,1823,232961,2317,Waitangi,7853,155, +4,1824,233473,2317,Waitangi,7918,155, +4,1825,233473,2317,Waitangi,7918,155, +4,1826,233473,2317,Waitangi,7918,155, +4,1827,233473,2317,Waitangi,7918,155, +4,1828,233985,2317,Waitangi,7983,155, +4,1829,233985,2317,Waitangi,7983,155, +4,1830,233985,2317,Waitangi,7983,155, +4,1831,233985,2317,Waitangi,7983,155, +4,1832,234497,2317,Waitangi,8048,155, +4,1833,234497,2317,Waitangi,8048,155, +4,1834,234497,2317,Waitangi,8048,155, +4,1835,234497,2317,Waitangi,8048,155, +4,1836,235009,2317,Waitangi,8113,155, +4,1837,235009,2317,Waitangi,8113,155, +4,1838,235009,2317,Waitangi,8113,155, +4,1839,235009,2317,Waitangi,8113,155, +4,1840,235521,2317,Waitangi,8178,155, +4,1841,235521,2317,Waitangi,8178,155, +4,1842,235521,2317,Waitangi,8178,155, +4,1843,235521,2317,Waitangi,8178,155, +4,1844,236033,2317,Waitangi,8243,155, +4,1845,236033,2317,Waitangi,8243,155, +4,1846,236033,2317,Waitangi,8243,155, +4,1847,236033,2317,Waitangi,8243,155, +4,1848,236545,2317,Waitangi,8308,155, +4,1849,236545,2317,Waitangi,8308,155, +4,1850,236545,2317,Waitangi,8308,155, +4,1851,236545,2317,Waitangi,8308,155, +4,1852,237057,2317,Waitangi,8373,155, +4,1853,237057,2317,Waitangi,8373,155, +4,1854,237057,2317,Waitangi,8373,155, +4,1855,237057,2317,Waitangi,8373,155, +4,1856,237569,2317,Waitangi,8438,155, +4,1857,237569,2317,Waitangi,8438,155, +4,1858,237569,2317,Waitangi,8438,155, +4,1859,237569,2317,Waitangi,8438,155, +4,1860,238081,2317,Waitangi,8503,155, +4,1861,238081,2317,Waitangi,8503,155, +4,1862,238081,2317,Waitangi,8503,155, +4,1863,238081,2317,Waitangi,8503,155, +4,1864,238593,2317,Waitangi,8568,155, +4,1865,238593,2317,Waitangi,8568,155, +4,1866,238593,2317,Waitangi,8568,155, +4,1867,238593,2317,Waitangi,8568,155, +4,1868,239105,2317,Waitangi,8633,155, +4,1869,239105,2317,Waitangi,8633,155, +4,1870,239105,2317,Waitangi,8633,155, +4,1871,239105,2317,Waitangi,8633,155, +4,1872,239617,2317,Waitangi,8698,155, +4,1873,239617,2317,Waitangi,8698,155, +4,1874,239617,2317,Waitangi,8698,155, +4,1875,239617,2317,Waitangi,8698,155, +4,1876,240129,2317,Waitangi,8764,155, +4,1877,240129,2317,Waitangi,8764,155, +4,1878,240129,2317,Waitangi,8764,155, +4,1879,240129,2317,Waitangi,8764,155, +4,1880,240641,2317,Waitangi,8830,155, +4,1881,240641,2317,Waitangi,8830,155, +4,1882,240641,2317,Waitangi,8830,155, +4,1883,240641,2317,Waitangi,8830,155, +4,1884,241153,2317,Waitangi,8896,155, +4,1885,241153,2317,Waitangi,8896,155, +4,1886,241153,2317,Waitangi,8896,155, +4,1887,241153,2317,Waitangi,8896,155, +4,1888,241665,2317,Waitangi,8962,155, +4,1889,241665,2317,Waitangi,8962,155, +4,1890,241665,2317,Waitangi,8962,155, +4,1891,241665,2317,Waitangi,8962,155, +4,1892,242177,2317,Waitangi,9028,155, +4,1893,242177,2317,Waitangi,9028,155, +4,1894,242177,2317,Waitangi,9028,155, +4,1895,242177,2317,Waitangi,9028,155, +4,1896,242689,2317,Waitangi,9094,155, +4,1897,242689,2317,Waitangi,9094,155, +4,1898,242689,2317,Waitangi,9094,155, +4,1899,242689,2317,Waitangi,9094,155, +4,1900,243201,2317,Waitangi,9160,155, +4,1901,243201,2317,Waitangi,9160,155, +4,1902,243201,2317,Waitangi,9160,155, +4,1903,243201,2317,Waitangi,9160,155, +4,1904,243713,2317,Waitangi,9226,155, +4,1905,243713,2317,Waitangi,9226,155, +4,1906,243713,2317,Waitangi,9226,155, +4,1907,243713,2317,Waitangi,9226,155, +4,1908,244225,2317,Waitangi,9292,155, +4,1909,244225,2317,Waitangi,9292,155, +4,1910,244225,2317,Waitangi,9292,155, +4,1911,244225,2317,Waitangi,9292,155, +4,1912,244737,2317,Waitangi,9358,155, +4,1913,244737,2317,Waitangi,9358,155, +4,1914,244737,2317,Waitangi,9358,155, +4,1915,244737,2317,Waitangi,9358,155, +4,1916,245249,2317,Waitangi,9424,155, +4,1917,245249,2317,Waitangi,9424,155, +4,1918,245249,2317,Waitangi,9424,155, +4,1919,245249,2317,Waitangi,9424,155, +4,1920,245761,2317,Waitangi,9490,155, +4,1921,245761,2317,Waitangi,9490,155, +4,1922,245761,2317,Waitangi,9490,155, +4,1923,245761,2317,Waitangi,9490,155, +4,1924,246273,2317,Waitangi,9556,155, +4,1925,246273,2317,Waitangi,9556,155, +4,1926,246273,2317,Waitangi,9556,155, +4,1927,246273,2317,Waitangi,9556,155, +4,1928,246785,2317,Waitangi,9622,155, +4,1929,246785,2317,Waitangi,9622,155, +4,1930,246785,2317,Waitangi,9622,155, +4,1931,246785,2317,Waitangi,9622,155, +4,1932,247297,2317,Waitangi,9688,155, +4,1933,247297,2317,Waitangi,9688,155, +4,1934,247297,2317,Waitangi,9688,155, +4,1935,247297,2317,Waitangi,9688,155, +4,1936,247809,2317,Waitangi,9754,155, +4,1937,247809,2317,Waitangi,9754,155, +4,1938,247809,2317,Waitangi,9754,155, +4,1939,247809,2317,Waitangi,9754,155, +4,1940,248321,2317,Waitangi,9820,155, +4,1941,248321,2317,Waitangi,9820,155, +4,1942,248321,2317,Waitangi,9820,155, +4,1943,248321,2317,Waitangi,9820,155, +4,1944,248833,2317,Waitangi,9886,155, +4,1945,248833,2317,Waitangi,9886,155, +4,1946,248833,2317,Waitangi,9886,155, +4,1947,248833,2317,Waitangi,9886,155, +4,1948,249345,2317,Waitangi,9953,155, +4,1949,249345,2317,Waitangi,9953,155, +4,1950,249345,2317,Waitangi,9953,155, +4,1951,249345,2317,Waitangi,9953,155, +4,1952,249857,2317,Waitangi,10020,155, +4,1953,249857,2317,Waitangi,10020,155, +4,1954,249857,2317,Waitangi,10020,155, +4,1955,249857,2317,Waitangi,10020,155, +4,1956,250369,2317,Waitangi,10087,155, +4,1957,250369,2317,Waitangi,10087,155, +4,1958,250369,2317,Waitangi,10087,155, +4,1959,250369,2317,Waitangi,10087,155, +4,1960,250881,2317,Waitangi,10154,155, +4,1961,250881,2317,Waitangi,10154,155, +4,1962,250881,2317,Waitangi,10154,155, +4,1963,250881,2317,Waitangi,10154,155, +4,1964,251393,2317,Waitangi,10221,155, +4,1965,251393,2317,Waitangi,10221,155, +4,1966,251393,2317,Waitangi,10221,155, +4,1967,251393,2317,Waitangi,10221,155, +4,1968,251905,2317,Waitangi,10288,155, +4,1969,251905,2317,Waitangi,10288,155, +4,1970,251905,2317,Waitangi,10288,155, +4,1971,251905,2317,Waitangi,10288,155, +4,1972,252417,2317,Waitangi,10355,155, +4,1973,252417,2317,Waitangi,10355,155, +4,1974,252417,2317,Waitangi,10355,155, +4,1975,252417,2317,Waitangi,10355,155, +4,1976,252929,2317,Waitangi,10422,155, +4,1977,252929,2317,Waitangi,10422,155, +4,1978,252929,2317,Waitangi,10422,155, +4,1979,252929,2317,Waitangi,10422,155, +4,1980,253441,2317,Waitangi,10489,155, +4,1981,253441,2317,Waitangi,10489,155, +4,1982,253441,2317,Waitangi,10489,155, +4,1983,253441,2317,Waitangi,10489,155, +4,1984,253953,2317,Waitangi,10556,155, +4,1985,253953,2317,Waitangi,10556,155, +4,1986,253953,2317,Waitangi,10556,155, +4,1987,253953,2317,Waitangi,10556,155, +4,1988,254465,2317,Waitangi,10623,155, +4,1989,254465,2317,Waitangi,10623,155, +4,1990,254465,2317,Waitangi,10623,155, +4,1991,254465,2317,Waitangi,10623,155, +4,1992,254977,2317,Waitangi,10690,155, +4,1993,254977,2317,Waitangi,10690,155, +4,1994,254977,2317,Waitangi,10690,155, +4,1995,254977,2317,Waitangi,10690,155, +4,1996,255489,2317,Waitangi,10757,155, +4,1997,255489,2317,Waitangi,10757,155, +4,1998,255489,2317,Waitangi,10757,155, +4,1999,255489,2317,Waitangi,10757,155, +4,2000,256001,2317,Waitangi,10824,155, +4,2001,256001,2317,Waitangi,10824,155, +4,2002,256001,2317,Waitangi,10824,155, +4,2003,256001,2317,Waitangi,10824,155, +4,2004,256513,2317,Waitangi,10891,155, +4,2005,256513,2317,Waitangi,10891,155, +4,2006,256513,2317,Waitangi,10891,155, +4,2007,256513,2317,Waitangi,10891,155, +4,2008,257025,2317,Waitangi,10958,155, +4,2009,257025,2317,Waitangi,10958,155, +4,2010,257025,2317,Waitangi,10958,155, +4,2011,257025,2317,Waitangi,10958,155, +4,2012,257537,2317,Waitangi,11025,155, +4,2013,257537,2317,Waitangi,11025,155, +4,2014,257537,2317,Waitangi,11025,155, +4,2015,257537,2317,Waitangi,11025,155, +4,2016,258049,2317,Waitangi,11092,155, +4,2017,258049,2317,Waitangi,11092,155, +4,2018,258049,2317,Waitangi,11092,155, +4,2019,258049,2317,Waitangi,11092,155, +4,2020,258561,2317,Waitangi,11159,155, +4,2021,258561,2317,Waitangi,11159,155, +4,2022,258561,2317,Waitangi,11159,155, +4,2023,258561,2317,Waitangi,11159,155, +4,2024,259073,2317,Waitangi,11226,155, +4,2025,259073,2317,Waitangi,11226,155, +4,2026,259073,2317,Waitangi,11226,155, +4,2027,259073,2317,Waitangi,11226,155, +4,2028,259585,2317,Waitangi,11293,155, +4,2029,259585,2317,Waitangi,11293,155, +4,2030,259585,2317,Waitangi,11293,155, +4,2031,259585,2317,Waitangi,11293,155, +4,2032,260097,2317,Waitangi,11360,155, +4,2033,260097,2317,Waitangi,11360,155, +4,2034,260097,2317,Waitangi,11360,155, +4,2035,260097,2317,Waitangi,11360,155, +4,2036,260609,2317,Waitangi,11427,155, +4,2037,260609,2317,Waitangi,11427,155, +4,2038,260609,2317,Waitangi,11427,155, +4,2039,260609,2317,Waitangi,11427,155, +4,2040,261121,2317,Waitangi,11494,155, +4,2041,261121,2317,Waitangi,11494,155, +4,2042,261121,2317,Waitangi,11494,155, +4,2043,261121,2317,Waitangi,11494,155, +4,2044,261633,2317,Waitangi,11561,155, +4,2045,261633,2317,Waitangi,11561,155, +4,2046,261633,2317,Waitangi,11561,155, +4,2047,261633,2317,Waitangi,11561,155, +5,0,1,6919,Anchorage,2,235, +5,1,1,6919,Anchorage,2,235, +5,2,1,6919,Anchorage,2,235, +5,3,1,6919,Anchorage,2,235, +5,4,513,6919,Anchorage,57,235, +5,5,513,6919,Anchorage,57,235, +5,6,513,6919,Anchorage,57,235, +5,7,513,6919,Anchorage,57,235, +5,8,1025,6919,Anchorage,112,235, +5,9,1025,6919,Anchorage,112,235, +5,10,1025,6919,Anchorage,112,235, +5,11,1025,6919,Anchorage,112,235, +5,12,1537,6919,Anchorage,167,235, +5,13,1537,6919,Anchorage,167,235, +5,14,1537,6919,Anchorage,167,235, +5,15,1537,6919,Anchorage,167,235, +5,16,2049,6919,Anchorage,222,235, +5,17,2049,6919,Anchorage,222,235, +5,18,2049,6919,Anchorage,222,235, +5,19,2049,6919,Anchorage,222,235, +5,20,2561,6919,Anchorage,277,235, +5,21,2561,6919,Anchorage,277,235, +5,22,2561,6919,Anchorage,277,235, +5,23,2561,6919,Anchorage,277,235, +5,24,3073,6919,Anchorage,332,235, +5,25,3073,6919,Anchorage,332,235, +5,26,3073,6919,Anchorage,332,235, +5,27,3073,6919,Anchorage,332,235, +5,28,3585,6919,Anchorage,387,235, +5,29,3585,6919,Anchorage,387,235, +5,30,3585,6919,Anchorage,387,235, +5,31,3585,6919,Anchorage,387,235, +5,32,4097,6919,Anchorage,442,235, +5,33,4097,6919,Anchorage,442,235, +5,34,4097,6919,Anchorage,442,235, +5,35,4097,6919,Anchorage,442,235, +5,36,4609,6919,Anchorage,497,235, +5,37,4609,6919,Anchorage,497,235, +5,38,4609,6919,Anchorage,497,235, +5,39,4609,6919,Anchorage,497,235, +5,40,5121,6919,Anchorage,552,235, +5,41,5121,6919,Anchorage,552,235, +5,42,5121,6919,Anchorage,552,235, +5,43,5121,6919,Anchorage,552,235, +5,44,5633,6919,Anchorage,607,235, +5,45,5633,6919,Anchorage,607,235, +5,46,5633,6919,Anchorage,607,235, +5,47,5633,6919,Anchorage,607,235, +5,48,6145,6919,Anchorage,662,235, +5,49,6145,6919,Anchorage,662,235, +5,50,6145,6919,Anchorage,662,235, +5,51,6145,6919,Anchorage,662,235, +5,52,6657,6919,Anchorage,717,235, +5,53,6657,6919,Anchorage,717,235, +5,54,6657,6919,Anchorage,717,235, +5,55,6657,6919,Anchorage,717,235, +5,56,7169,6919,Anchorage,772,235, +5,57,7169,6919,Anchorage,772,235, +5,58,7169,6919,Anchorage,772,235, +5,59,7169,6919,Anchorage,772,235, +5,60,7681,6919,Anchorage,827,235, +5,61,7681,6919,Anchorage,827,235, +5,62,7681,6919,Anchorage,827,235, +5,63,7681,6919,Anchorage,827,235, +5,64,8193,6919,Anchorage,882,235, +5,65,8193,6919,Anchorage,882,235, +5,66,8193,6919,Anchorage,882,235, +5,67,8193,6919,Anchorage,882,235, +5,68,8705,6919,Anchorage,937,235, +5,69,8705,6919,Anchorage,937,235, +5,70,8705,6919,Anchorage,937,235, +5,71,8705,6919,Anchorage,937,235, +5,72,9217,6919,Anchorage,992,235, +5,73,9217,6919,Anchorage,992,235, +5,74,9217,6919,Anchorage,992,235, +5,75,9217,6919,Anchorage,992,235, +5,76,9729,6919,Anchorage,1047,235, +5,77,9729,6919,Anchorage,1047,235, +5,78,9729,6919,Anchorage,1047,235, +5,79,9729,6919,Anchorage,1047,235, +5,80,10241,6919,Anchorage,1102,235, +5,81,10241,6919,Anchorage,1102,235, +5,82,10241,6919,Anchorage,1102,235, +5,83,10241,6919,Anchorage,1102,235, +5,84,10753,6919,Anchorage,1157,235, +5,85,10753,6919,Anchorage,1157,235, +5,86,10753,6919,Anchorage,1157,235, +5,87,10753,6919,Anchorage,1157,235, +5,88,11265,6919,Anchorage,1212,235, +5,89,11265,6919,Anchorage,1212,235, +5,90,11265,6919,Anchorage,1212,235, +5,91,11265,6919,Anchorage,1212,235, +5,92,11777,6919,Anchorage,1267,235, +5,93,11777,6919,Anchorage,1267,235, +5,94,11777,6919,Anchorage,1267,235, +5,95,11777,6919,Anchorage,1267,235, +5,96,12289,6919,Anchorage,1322,235, +5,97,12289,6919,Anchorage,1322,235, +5,98,12289,6919,Anchorage,1322,235, +5,99,12289,6919,Anchorage,1322,235, +5,100,12801,6919,Anchorage,1377,235, +5,101,12801,6919,Anchorage,1377,235, +5,102,12801,6919,Anchorage,1377,235, +5,103,12801,6919,Anchorage,1377,235, +5,104,13313,6919,Anchorage,1432,235, +5,105,13313,6919,Anchorage,1432,235, +5,106,13313,6919,Anchorage,1432,235, +5,107,13313,6919,Anchorage,1432,235, +5,108,13825,6919,Anchorage,1487,235, +5,109,13825,6919,Anchorage,1487,235, +5,110,13825,6919,Anchorage,1487,235, +5,111,13825,6919,Anchorage,1487,235, +5,112,14337,6919,Anchorage,1542,235, +5,113,14337,6919,Anchorage,1542,235, +5,114,14337,6919,Anchorage,1542,235, +5,115,14337,6919,Anchorage,1542,235, +5,116,14849,6919,Anchorage,1597,235, +5,117,14849,6919,Anchorage,1597,235, +5,118,14849,6919,Anchorage,1597,235, +5,119,14849,6919,Anchorage,1597,235, +5,120,15361,6919,Anchorage,1652,235, +5,121,15361,6919,Anchorage,1652,235, +5,122,15361,6919,Anchorage,1652,235, +5,123,15361,6919,Anchorage,1652,235, +5,124,15873,6919,Anchorage,1707,235, +5,125,15873,6919,Anchorage,1707,235, +5,126,15873,6919,Anchorage,1707,235, +5,127,15873,6919,Anchorage,1707,235, +5,128,16385,6919,Anchorage,1762,235, +5,129,16385,6919,Anchorage,1762,235, +5,130,16385,6919,Anchorage,1762,235, +5,131,16385,6919,Anchorage,1762,235, +5,132,16897,6919,Anchorage,1817,235, +5,133,16897,6919,Anchorage,1817,235, +5,134,16897,6919,Anchorage,1817,235, +5,135,16897,6919,Anchorage,1817,235, +5,136,17409,6919,Anchorage,1872,235, +5,137,17409,6919,Anchorage,1872,235, +5,138,17409,6919,Anchorage,1872,235, +5,139,17409,6919,Anchorage,1872,235, +5,140,17921,6919,Anchorage,1927,235, +5,141,17921,6919,Anchorage,1927,235, +5,142,17921,6919,Anchorage,1927,235, +5,143,17921,6919,Anchorage,1927,235, +5,144,18433,6919,Anchorage,1982,235, +5,145,18433,6919,Anchorage,1982,235, +5,146,18433,6919,Anchorage,1982,235, +5,147,18433,6919,Anchorage,1982,235, +5,148,18945,6919,Anchorage,2037,235, +5,149,18945,6919,Anchorage,2037,235, +5,150,18945,6919,Anchorage,2037,235, +5,151,18945,6919,Anchorage,2037,235, +5,152,19457,6919,Anchorage,2092,235, +5,153,19457,6919,Anchorage,2092,235, +5,154,19457,6919,Anchorage,2092,235, +5,155,19457,6919,Anchorage,2092,235, +5,156,19969,6919,Anchorage,2147,235, +5,157,19969,6919,Anchorage,2147,235, +5,158,19969,6919,Anchorage,2147,235, +5,159,19969,6919,Anchorage,2147,235, +5,160,20481,6919,Anchorage,2202,235, +5,161,20481,6919,Anchorage,2202,235, +5,162,20481,6919,Anchorage,2202,235, +5,163,20481,6919,Anchorage,2202,235, +5,164,20993,6919,Anchorage,2257,235, +5,165,20993,6919,Anchorage,2257,235, +5,166,20993,6919,Anchorage,2257,235, +5,167,20993,6919,Anchorage,2257,235, +5,168,21505,6919,Anchorage,2312,235, +5,169,21505,6919,Anchorage,2312,235, +5,170,21505,6919,Anchorage,2312,235, +5,171,21505,6919,Anchorage,2312,235, +5,172,22017,6919,Anchorage,2367,235, +5,173,22017,6919,Anchorage,2367,235, +5,174,22017,6919,Anchorage,2367,235, +5,175,22017,6919,Anchorage,2367,235, +5,176,22529,6919,Anchorage,2422,235, +5,177,22529,6919,Anchorage,2422,235, +5,178,22529,6919,Anchorage,2422,235, +5,179,22529,6919,Anchorage,2422,235, +5,180,23041,6919,Anchorage,2477,235, +5,181,23041,6919,Anchorage,2477,235, +5,182,23041,6919,Anchorage,2477,235, +5,183,23041,6919,Anchorage,2477,235, +5,184,23553,6919,Anchorage,2532,235, +5,185,23553,6919,Anchorage,2532,235, +5,186,23553,6919,Anchorage,2532,235, +5,187,23553,6919,Anchorage,2532,235, +5,188,24065,6919,Anchorage,2587,235, +5,189,24065,6919,Anchorage,2587,235, +5,190,24065,6919,Anchorage,2587,235, +5,191,24065,6919,Anchorage,2587,235, +5,192,24577,6919,Anchorage,2642,235, +5,193,24577,6919,Anchorage,2642,235, +5,194,24577,6919,Anchorage,2642,235, +5,195,24577,6919,Anchorage,2642,235, +5,196,25089,6919,Anchorage,2697,235, +5,197,25089,6919,Anchorage,2697,235, +5,198,25089,6919,Anchorage,2697,235, +5,199,25089,6919,Anchorage,2697,235, +5,200,25601,6919,Anchorage,2752,235, +5,201,25601,6919,Anchorage,2752,235, +5,202,25601,6919,Anchorage,2752,235, +5,203,25601,6919,Anchorage,2752,235, +5,204,26113,6919,Anchorage,2807,235, +5,205,26113,6919,Anchorage,2807,235, +5,206,26113,6919,Anchorage,2807,235, +5,207,26113,6919,Anchorage,2807,235, +5,208,26625,6919,Anchorage,2862,235, +5,209,26625,6919,Anchorage,2862,235, +5,210,26625,6919,Anchorage,2862,235, +5,211,26625,6919,Anchorage,2862,235, +5,212,27137,6919,Anchorage,2917,235, +5,213,27137,6919,Anchorage,2917,235, +5,214,27137,6919,Anchorage,2917,235, +5,215,27137,6919,Anchorage,2917,235, +5,216,27649,6919,Anchorage,2972,235, +5,217,27649,6919,Anchorage,2972,235, +5,218,27649,6919,Anchorage,2972,235, +5,219,27649,6919,Anchorage,2972,235, +5,220,28161,6919,Anchorage,3027,235, +5,221,28161,6919,Anchorage,3027,235, +5,222,28161,6919,Anchorage,3027,235, +5,223,28161,6919,Anchorage,3027,235, +5,224,28673,6919,Anchorage,3082,235, +5,225,28673,6919,Anchorage,3082,235, +5,226,28673,6919,Anchorage,3082,235, +5,227,28673,6919,Anchorage,3082,235, +5,228,29185,6919,Anchorage,3137,235, +5,229,29185,6919,Anchorage,3137,235, +5,230,29185,6919,Anchorage,3137,235, +5,231,29185,6919,Anchorage,3137,235, +5,232,29697,6919,Anchorage,3192,235, +5,233,29697,6919,Anchorage,3192,235, +5,234,29697,6919,Anchorage,3192,235, +5,235,29697,6919,Anchorage,3192,235, +5,236,30209,6919,Anchorage,3247,235, +5,237,30209,6919,Anchorage,3247,235, +5,238,30209,6919,Anchorage,3247,235, +5,239,30209,6919,Anchorage,3247,235, +5,240,30721,6919,Anchorage,3302,235, +5,241,30721,6919,Anchorage,3302,235, +5,242,30721,6919,Anchorage,3302,235, +5,243,30721,6919,Anchorage,3302,235, +5,244,31233,6919,Anchorage,3357,235, +5,245,31233,6919,Anchorage,3357,235, +5,246,31233,6919,Anchorage,3357,235, +5,247,31233,6919,Anchorage,3357,235, +5,248,31745,6919,Anchorage,3412,235, +5,249,31745,6919,Anchorage,3412,235, +5,250,31745,6919,Anchorage,3412,235, +5,251,31745,6919,Anchorage,3412,235, +5,252,32257,6919,Anchorage,3467,235, +5,253,32257,6919,Anchorage,3467,235, +5,254,32257,6919,Anchorage,3467,235, +5,255,32257,6919,Anchorage,3467,235, +5,256,32769,6919,Anchorage,3522,235, +5,257,32769,6919,Anchorage,3522,235, +5,258,32769,6919,Anchorage,3522,235, +5,259,32769,6919,Anchorage,3522,235, +5,260,33281,6919,Anchorage,3577,235, +5,261,33281,6919,Anchorage,3577,235, +5,262,33281,6919,Anchorage,3577,235, +5,263,33281,6919,Anchorage,3577,235, +5,264,33793,6919,Anchorage,3632,235, +5,265,33793,6919,Anchorage,3632,235, +5,266,33793,6919,Anchorage,3632,235, +5,267,33793,6919,Anchorage,3632,235, +5,268,34305,6919,Anchorage,3687,235, +5,269,34305,6919,Anchorage,3687,235, +5,270,34305,6919,Anchorage,3687,235, +5,271,34305,6919,Anchorage,3687,235, +5,272,34817,6919,Anchorage,3742,235, +5,273,34817,6919,Anchorage,3742,235, +5,274,34817,6919,Anchorage,3742,235, +5,275,34817,6919,Anchorage,3742,235, +5,276,35329,6919,Anchorage,3797,235, +5,277,35329,6919,Anchorage,3797,235, +5,278,35329,6919,Anchorage,3797,235, +5,279,35329,6919,Anchorage,3797,235, +5,280,35841,6919,Anchorage,3852,235, +5,281,35841,6919,Anchorage,3852,235, +5,282,35841,6919,Anchorage,3852,235, +5,283,35841,6919,Anchorage,3852,235, +5,284,36353,6919,Anchorage,3907,235, +5,285,36353,6919,Anchorage,3907,235, +5,286,36353,6919,Anchorage,3907,235, +5,287,36353,6919,Anchorage,3907,235, +5,288,36865,6919,Anchorage,3962,235, +5,289,36865,6919,Anchorage,3962,235, +5,290,36865,6919,Anchorage,3962,235, +5,291,36865,6919,Anchorage,3962,235, +5,292,37377,6919,Anchorage,4017,235, +5,293,37377,6919,Anchorage,4017,235, +5,294,37377,6919,Anchorage,4017,235, +5,295,37377,6919,Anchorage,4017,235, +5,296,37889,6919,Anchorage,4072,235, +5,297,37889,6919,Anchorage,4072,235, +5,298,37889,6919,Anchorage,4072,235, +5,299,37889,6919,Anchorage,4072,235, +5,300,38401,6919,Anchorage,4127,235, +5,301,38401,6919,Anchorage,4127,235, +5,302,38401,6919,Anchorage,4127,235, +5,303,38401,6919,Anchorage,4127,235, +5,304,38913,6919,Anchorage,4182,235, +5,305,38913,6919,Anchorage,4182,235, +5,306,38913,6919,Anchorage,4182,235, +5,307,38913,6919,Anchorage,4182,235, +5,308,39425,6919,Anchorage,4237,235, +5,309,39425,6919,Anchorage,4237,235, +5,310,39425,6919,Anchorage,4237,235, +5,311,39425,6919,Anchorage,4237,235, +5,312,39937,6919,Anchorage,4292,235, +5,313,39937,6919,Anchorage,4292,235, +5,314,39937,6919,Anchorage,4292,235, +5,315,39937,6919,Anchorage,4292,235, +5,316,40449,6919,Anchorage,4347,235, +5,317,40449,6919,Anchorage,4347,235, +5,318,40449,6919,Anchorage,4347,235, +5,319,40449,6919,Anchorage,4347,235, +5,320,40961,6919,Anchorage,4402,235, +5,321,40961,6919,Anchorage,4402,235, +5,322,40961,6919,Anchorage,4402,235, +5,323,40961,6919,Anchorage,4402,235, +5,324,41473,6919,Anchorage,4457,235, +5,325,41473,6919,Anchorage,4457,235, +5,326,41473,6919,Anchorage,4457,235, +5,327,41473,6919,Anchorage,4457,235, +5,328,41985,6919,Anchorage,4511,235, +5,329,41985,6919,Anchorage,4511,235, +5,330,41985,6919,Anchorage,4511,235, +5,331,41985,6919,Anchorage,4511,235, +5,332,42497,6919,Anchorage,4565,235, +5,333,42497,6919,Anchorage,4565,235, +5,334,42497,6919,Anchorage,4565,235, +5,335,42497,6919,Anchorage,4565,235, +5,336,43009,6919,Anchorage,4619,235, +5,337,43009,6919,Anchorage,4619,235, +5,338,43009,6919,Anchorage,4619,235, +5,339,43009,6919,Anchorage,4619,235, +5,340,43521,6919,Anchorage,4673,235, +5,341,43521,6919,Anchorage,4673,235, +5,342,43521,6919,Anchorage,4673,235, +5,343,43521,6919,Anchorage,4673,235, +5,344,44033,6919,Anchorage,4727,235, +5,345,44033,6919,Anchorage,4727,235, +5,346,44033,6919,Anchorage,4727,235, +5,347,44033,6919,Anchorage,4727,235, +5,348,44545,6919,Anchorage,4781,235, +5,349,44545,6919,Anchorage,4781,235, +5,350,44545,6919,Anchorage,4781,235, +5,351,44545,6919,Anchorage,4781,235, +5,352,45057,6919,Anchorage,4835,235, +5,353,45057,6919,Anchorage,4835,235, +5,354,45057,6919,Anchorage,4835,235, +5,355,45057,6919,Anchorage,4835,235, +5,356,45569,6919,Anchorage,4889,235, +5,357,45569,6919,Anchorage,4889,235, +5,358,45569,6919,Anchorage,4889,235, +5,359,45569,6919,Anchorage,4889,235, +5,360,46081,6919,Anchorage,4943,235, +5,361,46081,6919,Anchorage,4943,235, +5,362,46081,6919,Anchorage,4943,235, +5,363,46081,6919,Anchorage,4943,235, +5,364,46593,6919,Anchorage,4997,235, +5,365,46593,6919,Anchorage,4997,235, +5,366,46593,6919,Anchorage,4997,235, +5,367,46593,6919,Anchorage,4997,235, +5,368,47105,6919,Anchorage,5051,235, +5,369,47105,6919,Anchorage,5051,235, +5,370,47105,6919,Anchorage,5051,235, +5,371,47105,6919,Anchorage,5051,235, +5,372,47617,6919,Anchorage,5105,235, +5,373,47617,6919,Anchorage,5105,235, +5,374,47617,6919,Anchorage,5105,235, +5,375,47617,6919,Anchorage,5105,235, +5,376,48129,6919,Anchorage,5159,235, +5,377,48129,6919,Anchorage,5159,235, +5,378,48129,6919,Anchorage,5159,235, +5,379,48129,6919,Anchorage,5159,235, +5,380,48641,6919,Anchorage,5213,235, +5,381,48641,6919,Anchorage,5213,235, +5,382,48641,6919,Anchorage,5213,235, +5,383,48641,6919,Anchorage,5213,235, +5,384,49153,6919,Anchorage,5267,235, +5,385,49153,6919,Anchorage,5267,235, +5,386,49153,6919,Anchorage,5267,235, +5,387,49153,6919,Anchorage,5267,235, +5,388,49665,6919,Anchorage,5321,235, +5,389,49665,6919,Anchorage,5321,235, +5,390,49665,6919,Anchorage,5321,235, +5,391,49665,6919,Anchorage,5321,235, +5,392,50177,6919,Anchorage,5375,235, +5,393,50177,6919,Anchorage,5375,235, +5,394,50177,6919,Anchorage,5375,235, +5,395,50177,6919,Anchorage,5375,235, +5,396,50689,6919,Anchorage,5429,235, +5,397,50689,6919,Anchorage,5429,235, +5,398,50689,6919,Anchorage,5429,235, +5,399,50689,6919,Anchorage,5429,235, +5,400,51201,6919,Anchorage,5483,235, +5,401,51201,6919,Anchorage,5483,235, +5,402,51201,6919,Anchorage,5483,235, +5,403,51201,6919,Anchorage,5483,235, +5,404,51713,6919,Anchorage,5537,235, +5,405,51713,6919,Anchorage,5537,235, +5,406,51713,6919,Anchorage,5537,235, +5,407,51713,6919,Anchorage,5537,235, +5,408,52225,6919,Anchorage,5591,235, +5,409,52225,6919,Anchorage,5591,235, +5,410,52225,6919,Anchorage,5591,235, +5,411,52225,6919,Anchorage,5591,235, +5,412,52737,6919,Anchorage,5645,235, +5,413,52737,6919,Anchorage,5645,235, +5,414,52737,6919,Anchorage,5645,235, +5,415,52737,6919,Anchorage,5645,235, +5,416,53249,6919,Anchorage,5699,235, +5,417,53249,6919,Anchorage,5699,235, +5,418,53249,6919,Anchorage,5699,235, +5,419,53249,6919,Anchorage,5699,235, +5,420,53761,6919,Anchorage,5753,235, +5,421,53761,6919,Anchorage,5753,235, +5,422,53761,6919,Anchorage,5753,235, +5,423,53761,6919,Anchorage,5753,235, +5,424,54273,6919,Anchorage,5807,235, +5,425,54273,6919,Anchorage,5807,235, +5,426,54273,6919,Anchorage,5807,235, +5,427,54273,6919,Anchorage,5807,235, +5,428,54785,6919,Anchorage,5861,235, +5,429,54785,6919,Anchorage,5861,235, +5,430,54785,6919,Anchorage,5861,235, +5,431,54785,6919,Anchorage,5861,235, +5,432,55297,6919,Anchorage,5915,235, +5,433,55297,6919,Anchorage,5915,235, +5,434,55297,6919,Anchorage,5915,235, +5,435,55297,6919,Anchorage,5915,235, +5,436,55809,6919,Anchorage,5969,235, +5,437,55809,6919,Anchorage,5969,235, +5,438,55809,6919,Anchorage,5969,235, +5,439,55809,6919,Anchorage,5969,235, +5,440,56321,6919,Anchorage,6023,235, +5,441,56321,6919,Anchorage,6023,235, +5,442,56321,6919,Anchorage,6023,235, +5,443,56321,6919,Anchorage,6023,235, +5,444,56833,6919,Anchorage,6077,235, +5,445,56833,6919,Anchorage,6077,235, +5,446,56833,6919,Anchorage,6077,235, +5,447,56833,6919,Anchorage,6077,235, +5,448,57345,6919,Anchorage,6131,235, +5,449,57345,6919,Anchorage,6131,235, +5,450,57345,6919,Anchorage,6131,235, +5,451,57345,6919,Anchorage,6131,235, +5,452,57857,6919,Anchorage,6185,235, +5,453,57857,6919,Anchorage,6185,235, +5,454,57857,6919,Anchorage,6185,235, +5,455,57857,6919,Anchorage,6185,235, +5,456,58369,6919,Anchorage,6239,235, +5,457,58369,6919,Anchorage,6239,235, +5,458,58369,6919,Anchorage,6239,235, +5,459,58369,6919,Anchorage,6239,235, +5,460,58881,6919,Anchorage,6293,235, +5,461,58881,6919,Anchorage,6293,235, +5,462,58881,6919,Anchorage,6293,235, +5,463,58881,6919,Anchorage,6293,235, +5,464,59393,6919,Anchorage,6347,235, +5,465,59393,6919,Anchorage,6347,235, +5,466,59393,6919,Anchorage,6347,235, +5,467,59393,6919,Anchorage,6347,235, +5,468,59905,6919,Anchorage,6401,235, +5,469,59905,6919,Anchorage,6401,235, +5,470,59905,6919,Anchorage,6401,235, +5,471,59905,6919,Anchorage,6401,235, +5,472,60417,6919,Anchorage,6455,235, +5,473,60417,6919,Anchorage,6455,235, +5,474,60417,6919,Anchorage,6455,235, +5,475,60417,6919,Anchorage,6455,235, +5,476,60929,6919,Anchorage,6509,235, +5,477,60929,6919,Anchorage,6509,235, +5,478,60929,6919,Anchorage,6509,235, +5,479,60929,6919,Anchorage,6509,235, +5,480,61441,6919,Anchorage,6563,235, +5,481,61441,6919,Anchorage,6563,235, +5,482,61441,6919,Anchorage,6563,235, +5,483,61441,6919,Anchorage,6563,235, +5,484,61953,6919,Anchorage,6617,235, +5,485,61953,6919,Anchorage,6617,235, +5,486,61953,6919,Anchorage,6617,235, +5,487,61953,6919,Anchorage,6617,235, +5,488,62465,6919,Anchorage,6671,235, +5,489,62465,6919,Anchorage,6671,235, +5,490,62465,6919,Anchorage,6671,235, +5,491,62465,6919,Anchorage,6671,235, +5,492,62977,6919,Anchorage,6725,235, +5,493,62977,6919,Anchorage,6725,235, +5,494,62977,6919,Anchorage,6725,235, +5,495,62977,6919,Anchorage,6725,235, +5,496,63489,6919,Anchorage,6779,235, +5,497,63489,6919,Anchorage,6779,235, +5,498,63489,6919,Anchorage,6779,235, +5,499,63489,6919,Anchorage,6779,235, +5,500,64001,6919,Anchorage,6833,235, +5,501,64001,6919,Anchorage,6833,235, +5,502,64001,6919,Anchorage,6833,235, +5,503,64001,6919,Anchorage,6833,235, +5,504,64513,6919,Anchorage,6887,235, +5,505,64513,6919,Anchorage,6887,235, +5,506,64513,6919,Anchorage,6887,235, +5,507,64513,6919,Anchorage,6887,235, +5,508,65025,6919,Anchorage,6941,235, +5,509,65025,6919,Anchorage,6941,235, +5,510,65025,6919,Anchorage,6941,235, +5,511,65025,6919,Anchorage,6941,235, +5,512,65537,6919,Anchorage,6995,235, +5,513,65537,6919,Anchorage,6995,235, +5,514,65537,6919,Anchorage,6995,235, +5,515,65537,6919,Anchorage,6995,235, +5,516,66049,6919,Anchorage,7049,235, +5,517,66049,6919,Anchorage,7049,235, +5,518,66049,6919,Anchorage,7049,235, +5,519,66049,6919,Anchorage,7049,235, +5,520,66561,6919,Anchorage,7103,235, +5,521,66561,6919,Anchorage,7103,235, +5,522,66561,6919,Anchorage,7103,235, +5,523,66561,6919,Anchorage,7103,235, +5,524,67073,6919,Anchorage,7157,235, +5,525,67073,6919,Anchorage,7157,235, +5,526,67073,6919,Anchorage,7157,235, +5,527,67073,6919,Anchorage,7157,235, +5,528,67585,6919,Anchorage,7211,235, +5,529,67585,6919,Anchorage,7211,235, +5,530,67585,6919,Anchorage,7211,235, +5,531,67585,6919,Anchorage,7211,235, +5,532,68097,6919,Anchorage,7265,235, +5,533,68097,6919,Anchorage,7265,235, +5,534,68097,6919,Anchorage,7265,235, +5,535,68097,6919,Anchorage,7265,235, +5,536,68609,6919,Anchorage,7319,235, +5,537,68609,6919,Anchorage,7319,235, +5,538,68609,6919,Anchorage,7319,235, +5,539,68609,6919,Anchorage,7319,235, +5,540,69121,6919,Anchorage,7373,235, +5,541,69121,6919,Anchorage,7373,235, +5,542,69121,6919,Anchorage,7373,235, +5,543,69121,6919,Anchorage,7373,235, +5,544,69633,6919,Anchorage,7427,235, +5,545,69633,6919,Anchorage,7427,235, +5,546,69633,6919,Anchorage,7427,235, +5,547,69633,6919,Anchorage,7427,235, +5,548,70145,6919,Anchorage,7481,235, +5,549,70145,6919,Anchorage,7481,235, +5,550,70145,6919,Anchorage,7481,235, +5,551,70145,6919,Anchorage,7481,235, +5,552,70657,6919,Anchorage,7535,235, +5,553,70657,6919,Anchorage,7535,235, +5,554,70657,6919,Anchorage,7535,235, +5,555,70657,6919,Anchorage,7535,235, +5,556,71169,6919,Anchorage,7589,235, +5,557,71169,6919,Anchorage,7589,235, +5,558,71169,6919,Anchorage,7589,235, +5,559,71169,6919,Anchorage,7589,235, +5,560,71681,6919,Anchorage,7643,235, +5,561,71681,6919,Anchorage,7643,235, +5,562,71681,6919,Anchorage,7643,235, +5,563,71681,6919,Anchorage,7643,235, +5,564,72193,6919,Anchorage,7697,235, +5,565,72193,6919,Anchorage,7697,235, +5,566,72193,6919,Anchorage,7697,235, +5,567,72193,6919,Anchorage,7697,235, +5,568,72705,6919,Anchorage,7751,235, +5,569,72705,6919,Anchorage,7751,235, +5,570,72705,6919,Anchorage,7751,235, +5,571,72705,6919,Anchorage,7751,235, +5,572,73217,6919,Anchorage,7805,235, +5,573,73217,6919,Anchorage,7805,235, +5,574,73217,6919,Anchorage,7805,235, +5,575,73217,6919,Anchorage,7805,235, +5,576,73729,6919,Anchorage,7859,235, +5,577,73729,6919,Anchorage,7859,235, +5,578,73729,6919,Anchorage,7859,235, +5,579,73729,6919,Anchorage,7859,235, +5,580,74241,6919,Anchorage,7913,235, +5,581,74241,6919,Anchorage,7913,235, +5,582,74241,6919,Anchorage,7913,235, +5,583,74241,6919,Anchorage,7913,235, +5,584,74753,6919,Anchorage,7967,235, +5,585,74753,6919,Anchorage,7967,235, +5,586,74753,6919,Anchorage,7967,235, +5,587,74753,6919,Anchorage,7967,235, +5,588,75265,6919,Anchorage,8021,235, +5,589,75265,6919,Anchorage,8021,235, +5,590,75265,6919,Anchorage,8021,235, +5,591,75265,6919,Anchorage,8021,235, +5,592,75777,6919,Anchorage,8075,235, +5,593,75777,6919,Anchorage,8075,235, +5,594,75777,6919,Anchorage,8075,235, +5,595,75777,6919,Anchorage,8075,235, +5,596,76289,6919,Anchorage,8129,235, +5,597,76289,6919,Anchorage,8129,235, +5,598,76289,6919,Anchorage,8129,235, +5,599,76289,6919,Anchorage,8129,235, +5,600,76801,6919,Anchorage,8183,235, +5,601,76801,6919,Anchorage,8183,235, +5,602,76801,6919,Anchorage,8183,235, +5,603,76801,6919,Anchorage,8183,235, +5,604,77313,6919,Anchorage,8237,235, +5,605,77313,6919,Anchorage,8237,235, +5,606,77313,6919,Anchorage,8237,235, +5,607,77313,6919,Anchorage,8237,235, +5,608,77825,6919,Anchorage,8291,235, +5,609,77825,6919,Anchorage,8291,235, +5,610,77825,6919,Anchorage,8291,235, +5,611,77825,6919,Anchorage,8291,235, +5,612,78337,6919,Anchorage,8345,235, +5,613,78337,6919,Anchorage,8345,235, +5,614,78337,6919,Anchorage,8345,235, +5,615,78337,6919,Anchorage,8345,235, +5,616,78849,6919,Anchorage,8399,235, +5,617,78849,6919,Anchorage,8399,235, +5,618,78849,6919,Anchorage,8399,235, +5,619,78849,6919,Anchorage,8399,235, +5,620,79361,6919,Anchorage,8453,235, +5,621,79361,6919,Anchorage,8453,235, +5,622,79361,6919,Anchorage,8453,235, +5,623,79361,6919,Anchorage,8453,235, +5,624,79873,6919,Anchorage,8507,235, +5,625,79873,6919,Anchorage,8507,235, +5,626,79873,6919,Anchorage,8507,235, +5,627,79873,6919,Anchorage,8507,235, +5,628,80385,6919,Anchorage,8561,235, +5,629,80385,6919,Anchorage,8561,235, +5,630,80385,6919,Anchorage,8561,235, +5,631,80385,6919,Anchorage,8561,235, +5,632,80897,6919,Anchorage,8614,235, +5,633,80897,6919,Anchorage,8614,235, +5,634,80897,6919,Anchorage,8614,235, +5,635,80897,6919,Anchorage,8614,235, +5,636,81409,6919,Anchorage,8667,235, +5,637,81409,6919,Anchorage,8667,235, +5,638,81409,6919,Anchorage,8667,235, +5,639,81409,6919,Anchorage,8667,235, +5,640,81921,6919,Anchorage,8720,235, +5,641,81921,6919,Anchorage,8720,235, +5,642,81921,6919,Anchorage,8720,235, +5,643,81921,6919,Anchorage,8720,235, +5,644,82433,6919,Anchorage,8773,235, +5,645,82433,6919,Anchorage,8773,235, +5,646,82433,6919,Anchorage,8773,235, +5,647,82433,6919,Anchorage,8773,235, +5,648,82945,6919,Anchorage,8826,235, +5,649,82945,6919,Anchorage,8826,235, +5,650,82945,6919,Anchorage,8826,235, +5,651,82945,6919,Anchorage,8826,235, +5,652,83457,6919,Anchorage,8879,235, +5,653,83457,6919,Anchorage,8879,235, +5,654,83457,6919,Anchorage,8879,235, +5,655,83457,6919,Anchorage,8879,235, +5,656,83969,6919,Anchorage,8932,235, +5,657,83969,6919,Anchorage,8932,235, +5,658,83969,6919,Anchorage,8932,235, +5,659,83969,6919,Anchorage,8932,235, +5,660,84481,6919,Anchorage,8985,235, +5,661,84481,6919,Anchorage,8985,235, +5,662,84481,6919,Anchorage,8985,235, +5,663,84481,6919,Anchorage,8985,235, +5,664,84993,6919,Anchorage,9038,235, +5,665,84993,6919,Anchorage,9038,235, +5,666,84993,6919,Anchorage,9038,235, +5,667,84993,6919,Anchorage,9038,235, +5,668,85505,6919,Anchorage,9090,235, +5,669,85505,6919,Anchorage,9090,235, +5,670,85505,6919,Anchorage,9090,235, +5,671,85505,6919,Anchorage,9090,235, +5,672,86017,6919,Anchorage,9142,235, +5,673,86017,6919,Anchorage,9142,235, +5,674,86017,6919,Anchorage,9142,235, +5,675,86017,6919,Anchorage,9142,235, +5,676,86529,6919,Anchorage,9194,235, +5,677,86529,6919,Anchorage,9194,235, +5,678,86529,6919,Anchorage,9194,235, +5,679,86529,6919,Anchorage,9194,235, +5,680,87041,6919,Anchorage,9246,235, +5,681,87041,6919,Anchorage,9246,235, +5,682,87041,6919,Anchorage,9246,235, +5,683,87041,6919,Anchorage,9246,235, +5,684,87553,6919,Anchorage,9298,235, +5,685,87553,6919,Anchorage,9298,235, +5,686,87553,6919,Anchorage,9298,235, +5,687,87553,6919,Anchorage,9298,235, +5,688,88065,6919,Anchorage,9350,235, +5,689,88065,6919,Anchorage,9350,235, +5,690,88065,6919,Anchorage,9350,235, +5,691,88065,6919,Anchorage,9350,235, +5,692,88577,6919,Anchorage,9402,235, +5,693,88577,6919,Anchorage,9402,235, +5,694,88577,6919,Anchorage,9402,235, +5,695,88577,6919,Anchorage,9402,235, +5,696,89089,6919,Anchorage,9454,235, +5,697,89089,6919,Anchorage,9454,235, +5,698,89089,6919,Anchorage,9454,235, +5,699,89089,6919,Anchorage,9454,235, +5,700,89601,6919,Anchorage,9506,235, +5,701,89601,6919,Anchorage,9506,235, +5,702,89601,6919,Anchorage,9506,235, +5,703,89601,6919,Anchorage,9506,235, +5,704,90113,6919,Anchorage,9557,235, +5,705,90113,6919,Anchorage,9557,235, +5,706,90113,6919,Anchorage,9557,235, +5,707,90113,6919,Anchorage,9557,235, +5,708,90625,6919,Anchorage,9608,235, +5,709,90625,6919,Anchorage,9608,235, +5,710,90625,6919,Anchorage,9608,235, +5,711,90625,6919,Anchorage,9608,235, +5,712,91137,6919,Anchorage,9659,235, +5,713,91137,6919,Anchorage,9659,235, +5,714,91137,6919,Anchorage,9659,235, +5,715,91137,6919,Anchorage,9659,235, +5,716,91649,6919,Anchorage,9710,235, +5,717,91649,6919,Anchorage,9710,235, +5,718,91649,6919,Anchorage,9710,235, +5,719,91649,6919,Anchorage,9710,235, +5,720,92161,6919,Anchorage,9761,235, +5,721,92161,6919,Anchorage,9761,235, +5,722,92161,6919,Anchorage,9761,235, +5,723,92161,6919,Anchorage,9761,235, +5,724,92673,3471,Honolulu,2,235, +5,725,92673,3471,Honolulu,2,235, +5,726,92673,3471,Honolulu,2,235, +5,727,92673,3471,Honolulu,2,235, +5,728,93185,3471,Honolulu,5,235, +5,729,93185,3471,Honolulu,5,235, +5,730,93185,3471,Honolulu,5,235, +5,731,93185,3471,Honolulu,5,235, +5,732,93697,3471,Honolulu,12,235, +5,733,93697,3471,Honolulu,12,235, +5,734,93697,3471,Honolulu,12,235, +5,735,93697,3471,Honolulu,12,235, +5,736,94209,3471,Honolulu,22,235, +5,737,94209,3471,Honolulu,22,235, +5,738,94209,3471,Honolulu,22,235, +5,739,94209,3471,Honolulu,22,235, +5,740,94721,3471,Honolulu,36,235, +5,741,94721,3471,Honolulu,36,235, +5,742,94721,3471,Honolulu,36,235, +5,743,94721,3471,Honolulu,36,235, +5,744,95233,3471,Honolulu,54,235, +5,745,95233,3471,Honolulu,54,235, +5,746,95233,3471,Honolulu,54,235, +5,747,95233,3471,Honolulu,54,235, +5,748,95745,3471,Honolulu,75,235, +5,749,95745,3471,Honolulu,75,235, +5,750,95745,3471,Honolulu,75,235, +5,751,95745,3471,Honolulu,75,235, +5,752,96257,3471,Honolulu,100,235, +5,753,96257,3471,Honolulu,100,235, +5,754,96257,3471,Honolulu,100,235, +5,755,96257,3471,Honolulu,100,235, +5,756,96769,3471,Honolulu,129,235, +5,757,96769,3471,Honolulu,129,235, +5,758,96769,3471,Honolulu,129,235, +5,759,96769,3471,Honolulu,129,235, +5,760,97281,3471,Honolulu,161,235, +5,761,97281,3471,Honolulu,161,235, +5,762,97281,3471,Honolulu,161,235, +5,763,97281,3471,Honolulu,161,235, +5,764,97793,3471,Honolulu,197,235, +5,765,97793,3471,Honolulu,197,235, +5,766,97793,3471,Honolulu,197,235, +5,767,97793,3471,Honolulu,197,235, +5,768,98305,3471,Honolulu,237,235, +5,769,98305,3471,Honolulu,237,235, +5,770,98305,3471,Honolulu,237,235, +5,771,98305,3471,Honolulu,237,235, +5,772,98817,3471,Honolulu,281,235, +5,773,98817,3471,Honolulu,281,235, +5,774,98817,3471,Honolulu,281,235, +5,775,98817,3471,Honolulu,281,235, +5,776,99329,3471,Honolulu,328,235, +5,777,99329,3471,Honolulu,328,235, +5,778,99329,3471,Honolulu,328,235, +5,779,99329,3471,Honolulu,328,235, +5,780,99841,3471,Honolulu,378,235, +5,781,99841,3471,Honolulu,378,235, +5,782,99841,3471,Honolulu,378,235, +5,783,99841,3471,Honolulu,378,235, +5,784,100353,3471,Honolulu,429,235, +5,785,100353,3471,Honolulu,429,235, +5,786,100353,3471,Honolulu,429,235, +5,787,100353,3471,Honolulu,429,235, +5,788,100865,3471,Honolulu,480,235, +5,789,100865,3471,Honolulu,480,235, +5,790,100865,3471,Honolulu,480,235, +5,791,100865,3471,Honolulu,480,235, +5,792,101377,3471,Honolulu,531,235, +5,793,101377,3471,Honolulu,531,235, +5,794,101377,3471,Honolulu,531,235, +5,795,101377,3471,Honolulu,531,235, +5,796,101889,3471,Honolulu,583,235, +5,797,101889,3471,Honolulu,583,235, +5,798,101889,3471,Honolulu,583,235, +5,799,101889,3471,Honolulu,583,235, +5,800,102401,3471,Honolulu,635,235, +5,801,102401,3471,Honolulu,635,235, +5,802,102401,3471,Honolulu,635,235, +5,803,102401,3471,Honolulu,635,235, +5,804,102913,3471,Honolulu,688,235, +5,805,102913,3471,Honolulu,688,235, +5,806,102913,3471,Honolulu,688,235, +5,807,102913,3471,Honolulu,688,235, +5,808,103425,3471,Honolulu,741,235, +5,809,103425,3471,Honolulu,741,235, +5,810,103425,3471,Honolulu,741,235, +5,811,103425,3471,Honolulu,741,235, +5,812,103937,3471,Honolulu,794,235, +5,813,103937,3471,Honolulu,794,235, +5,814,103937,3471,Honolulu,794,235, +5,815,103937,3471,Honolulu,794,235, +5,816,104449,3471,Honolulu,848,235, +5,817,104449,3471,Honolulu,848,235, +5,818,104449,3471,Honolulu,848,235, +5,819,104449,3471,Honolulu,848,235, +5,820,104961,3471,Honolulu,902,235, +5,821,104961,3471,Honolulu,902,235, +5,822,104961,3471,Honolulu,902,235, +5,823,104961,3471,Honolulu,902,235, +5,824,105473,3471,Honolulu,957,235, +5,825,105473,3471,Honolulu,957,235, +5,826,105473,3471,Honolulu,957,235, +5,827,105473,3471,Honolulu,957,235, +5,828,105985,3471,Honolulu,1012,235, +5,829,105985,3471,Honolulu,1012,235, +5,830,105985,3471,Honolulu,1012,235, +5,831,105985,3471,Honolulu,1012,235, +5,832,106497,3471,Honolulu,1067,235, +5,833,106497,3471,Honolulu,1067,235, +5,834,106497,3471,Honolulu,1067,235, +5,835,106497,3471,Honolulu,1067,235, +5,836,107009,3471,Honolulu,1123,235, +5,837,107009,3471,Honolulu,1123,235, +5,838,107009,3471,Honolulu,1123,235, +5,839,107009,3471,Honolulu,1123,235, +5,840,107521,3471,Honolulu,1179,235, +5,841,107521,3471,Honolulu,1179,235, +5,842,107521,3471,Honolulu,1179,235, +5,843,107521,3471,Honolulu,1179,235, +5,844,108033,3471,Honolulu,1236,235, +5,845,108033,3471,Honolulu,1236,235, +5,846,108033,3471,Honolulu,1236,235, +5,847,108033,3471,Honolulu,1236,235, +5,848,108545,3471,Honolulu,1293,235, +5,849,108545,3471,Honolulu,1293,235, +5,850,108545,3471,Honolulu,1293,235, +5,851,108545,3471,Honolulu,1293,235, +5,852,109057,3471,Honolulu,1350,235, +5,853,109057,3471,Honolulu,1350,235, +5,854,109057,3471,Honolulu,1350,235, +5,855,109057,3471,Honolulu,1350,235, +5,856,109569,3471,Honolulu,1408,235, +5,857,109569,3471,Honolulu,1408,235, +5,858,109569,3471,Honolulu,1408,235, +5,859,109569,3471,Honolulu,1408,235, +5,860,110081,3471,Honolulu,1466,235, +5,861,110081,3471,Honolulu,1466,235, +5,862,110081,3471,Honolulu,1466,235, +5,863,110081,3471,Honolulu,1466,235, +5,864,110593,3471,Honolulu,1525,235, +5,865,110593,3471,Honolulu,1525,235, +5,866,110593,3471,Honolulu,1525,235, +5,867,110593,3471,Honolulu,1525,235, +5,868,111105,3471,Honolulu,1584,235, +5,869,111105,3471,Honolulu,1584,235, +5,870,111105,3471,Honolulu,1584,235, +5,871,111105,3471,Honolulu,1584,235, +5,872,111617,3471,Honolulu,1644,235, +5,873,111617,3471,Honolulu,1644,235, +5,874,111617,3471,Honolulu,1644,235, +5,875,111617,3471,Honolulu,1644,235, +5,876,112129,3471,Honolulu,1704,235, +5,877,112129,3471,Honolulu,1704,235, +5,878,112129,3471,Honolulu,1704,235, +5,879,112129,3471,Honolulu,1704,235, +5,880,112641,3471,Honolulu,1764,235, +5,881,112641,3471,Honolulu,1764,235, +5,882,112641,3471,Honolulu,1764,235, +5,883,112641,3471,Honolulu,1764,235, +5,884,113153,3471,Honolulu,1825,235, +5,885,113153,3471,Honolulu,1825,235, +5,886,113153,3471,Honolulu,1825,235, +5,887,113153,3471,Honolulu,1825,235, +5,888,113665,3471,Honolulu,1886,235, +5,889,113665,3471,Honolulu,1886,235, +5,890,113665,3471,Honolulu,1886,235, +5,891,113665,3471,Honolulu,1886,235, +5,892,114177,3471,Honolulu,1947,235, +5,893,114177,3471,Honolulu,1947,235, +5,894,114177,3471,Honolulu,1947,235, +5,895,114177,3471,Honolulu,1947,235, +5,896,114689,3471,Honolulu,2009,235, +5,897,114689,3471,Honolulu,2009,235, +5,898,114689,3471,Honolulu,2009,235, +5,899,114689,3471,Honolulu,2009,235, +5,900,115201,3471,Honolulu,2071,235, +5,901,115201,3471,Honolulu,2071,235, +5,902,115201,3471,Honolulu,2071,235, +5,903,115201,3471,Honolulu,2071,235, +5,904,115713,3471,Honolulu,2133,235, +5,905,115713,3471,Honolulu,2133,235, +5,906,115713,3471,Honolulu,2133,235, +5,907,115713,3471,Honolulu,2133,235, +5,908,116225,3471,Honolulu,2196,235, +5,909,116225,3471,Honolulu,2196,235, +5,910,116225,3471,Honolulu,2196,235, +5,911,116225,3471,Honolulu,2196,235, +5,912,116737,3471,Honolulu,2259,235, +5,913,116737,3471,Honolulu,2259,235, +5,914,116737,3471,Honolulu,2259,235, +5,915,116737,3471,Honolulu,2259,235, +5,916,117249,3471,Honolulu,2322,235, +5,917,117249,3471,Honolulu,2322,235, +5,918,117249,3471,Honolulu,2322,235, +5,919,117249,3471,Honolulu,2322,235, +5,920,117761,3471,Honolulu,2386,235, +5,921,117761,3471,Honolulu,2386,235, +5,922,117761,3471,Honolulu,2386,235, +5,923,117761,3471,Honolulu,2386,235, +5,924,118273,3471,Honolulu,2450,235, +5,925,118273,3471,Honolulu,2450,235, +5,926,118273,3471,Honolulu,2450,235, +5,927,118273,3471,Honolulu,2450,235, +5,928,118785,3471,Honolulu,2514,235, +5,929,118785,3471,Honolulu,2514,235, +5,930,118785,3471,Honolulu,2514,235, +5,931,118785,3471,Honolulu,2514,235, +5,932,119297,3471,Honolulu,2579,235, +5,933,119297,3471,Honolulu,2579,235, +5,934,119297,3471,Honolulu,2579,235, +5,935,119297,3471,Honolulu,2579,235, +5,936,119809,3471,Honolulu,2644,235, +5,937,119809,3471,Honolulu,2644,235, +5,938,119809,3471,Honolulu,2644,235, +5,939,119809,3471,Honolulu,2644,235, +5,940,120321,3471,Honolulu,2709,235, +5,941,120321,3471,Honolulu,2709,235, +5,942,120321,3471,Honolulu,2709,235, +5,943,120321,3471,Honolulu,2709,235, +5,944,120833,3471,Honolulu,2774,235, +5,945,120833,3471,Honolulu,2774,235, +5,946,120833,3471,Honolulu,2774,235, +5,947,120833,3471,Honolulu,2774,235, +5,948,121345,3471,Honolulu,2836,235, +5,949,121345,3471,Honolulu,2836,235, +5,950,121345,3471,Honolulu,2836,235, +5,951,121345,3471,Honolulu,2836,235, +5,952,121857,3208,Atafu Village,3,223, +5,953,121857,3208,Atafu Village,3,223, +5,954,121857,3208,Atafu Village,3,223, +5,955,121857,3208,Atafu Village,3,223, +5,956,122369,3208,Atafu Village,6,223, +5,957,122369,3208,Atafu Village,6,223, +5,958,122369,3208,Atafu Village,6,223, +5,959,122369,3208,Atafu Village,6,223, +5,960,122881,3208,Atafu Village,11,223, +5,961,122881,3208,Atafu Village,11,223, +5,962,122881,3208,Atafu Village,11,223, +5,963,122881,3208,Atafu Village,11,223, +5,964,123393,3208,Atafu Village,18,223, +5,965,123393,3208,Atafu Village,18,223, +5,966,123393,3208,Atafu Village,18,223, +5,967,123393,3208,Atafu Village,18,223, +5,968,123905,3208,Atafu Village,27,223, +5,969,123905,3208,Atafu Village,27,223, +5,970,123905,3208,Atafu Village,27,223, +5,971,123905,3208,Atafu Village,27,223, +5,972,124417,3208,Atafu Village,38,223, +5,973,124417,3208,Atafu Village,38,223, +5,974,124417,3208,Atafu Village,38,223, +5,975,124417,3208,Atafu Village,38,223, +5,976,124929,3208,Atafu Village,51,223, +5,977,124929,3208,Atafu Village,51,223, +5,978,124929,3208,Atafu Village,51,223, +5,979,124929,3208,Atafu Village,51,223, +5,980,125441,3208,Atafu Village,66,223, +5,981,125441,3208,Atafu Village,66,223, +5,982,125441,3208,Atafu Village,66,223, +5,983,125441,3208,Atafu Village,66,223, +5,984,125953,3208,Atafu Village,83,223, +5,985,125953,3208,Atafu Village,83,223, +5,986,125953,3208,Atafu Village,83,223, +5,987,125953,3208,Atafu Village,83,223, +5,988,126465,3208,Atafu Village,102,223, +5,989,126465,3208,Atafu Village,102,223, +5,990,126465,3208,Atafu Village,102,223, +5,991,126465,3208,Atafu Village,102,223, +5,992,126977,3208,Atafu Village,123,223, +5,993,126977,3208,Atafu Village,123,223, +5,994,126977,3208,Atafu Village,123,223, +5,995,126977,3208,Atafu Village,123,223, +5,996,127489,3208,Atafu Village,146,223, +5,997,127489,3208,Atafu Village,146,223, +5,998,127489,3208,Atafu Village,146,223, +5,999,127489,3208,Atafu Village,146,223, +5,1000,128001,3208,Atafu Village,171,223, +5,1001,128001,3208,Atafu Village,171,223, +5,1002,128001,3208,Atafu Village,171,223, +5,1003,128001,3208,Atafu Village,171,223, +5,1004,128513,3208,Atafu Village,195,223, +5,1005,128513,3208,Atafu Village,195,223, +5,1006,128513,3208,Atafu Village,195,223, +5,1007,128513,3208,Atafu Village,195,223, +5,1008,129025,3208,Atafu Village,219,223, +5,1009,129025,3208,Atafu Village,219,223, +5,1010,129025,3208,Atafu Village,219,223, +5,1011,129025,3208,Atafu Village,219,223, +5,1012,129537,3208,Atafu Village,242,223, +5,1013,129537,3208,Atafu Village,242,223, +5,1014,129537,3208,Atafu Village,242,223, +5,1015,129537,3208,Atafu Village,242,223, +5,1016,130049,3208,Atafu Village,264,223, +5,1017,130049,3208,Atafu Village,264,223, +5,1018,130049,3208,Atafu Village,264,223, +5,1019,130049,3208,Atafu Village,264,223, +5,1020,130561,3208,Atafu Village,286,223, +5,1021,130561,3208,Atafu Village,286,223, +5,1022,130561,3208,Atafu Village,286,223, +5,1023,130561,3208,Atafu Village,286,223, +5,1024,131073,3208,Atafu Village,307,223, +5,1025,131073,3208,Atafu Village,307,223, +5,1026,131073,3208,Atafu Village,307,223, +5,1027,131073,3208,Atafu Village,307,223, +5,1028,131585,3208,Atafu Village,327,223, +5,1029,131585,3208,Atafu Village,327,223, +5,1030,131585,3208,Atafu Village,327,223, +5,1031,131585,3208,Atafu Village,327,223, +5,1032,132097,3208,Atafu Village,347,223, +5,1033,132097,3208,Atafu Village,347,223, +5,1034,132097,3208,Atafu Village,347,223, +5,1035,132097,3208,Atafu Village,347,223, +5,1036,132609,3208,Atafu Village,366,223, +5,1037,132609,3208,Atafu Village,366,223, +5,1038,132609,3208,Atafu Village,366,223, +5,1039,132609,3208,Atafu Village,366,223, +5,1040,133121,3208,Atafu Village,384,223, +5,1041,133121,3208,Atafu Village,384,223, +5,1042,133121,3208,Atafu Village,384,223, +5,1043,133121,3208,Atafu Village,384,223, +5,1044,133633,3208,Atafu Village,402,223, +5,1045,133633,3208,Atafu Village,402,223, +5,1046,133633,3208,Atafu Village,402,223, +5,1047,133633,3208,Atafu Village,402,223, +5,1048,134145,3208,Atafu Village,419,223, +5,1049,134145,3208,Atafu Village,419,223, +5,1050,134145,3208,Atafu Village,419,223, +5,1051,134145,3208,Atafu Village,419,223, +5,1052,134657,3208,Atafu Village,435,223, +5,1053,134657,3208,Atafu Village,435,223, +5,1054,134657,3208,Atafu Village,435,223, +5,1055,134657,3208,Atafu Village,435,223, +5,1056,135169,3208,Atafu Village,451,223, +5,1057,135169,3208,Atafu Village,451,223, +5,1058,135169,3208,Atafu Village,451,223, +5,1059,135169,3208,Atafu Village,451,223, +5,1060,135681,3208,Atafu Village,465,223, +5,1061,135681,3208,Atafu Village,465,223, +5,1062,135681,3208,Atafu Village,465,223, +5,1063,135681,3208,Atafu Village,465,223, +5,1064,136193,3610,Mata-Utu,3,245, +5,1065,136193,3610,Mata-Utu,3,245, +5,1066,136193,3610,Mata-Utu,3,245, +5,1067,136193,3610,Mata-Utu,3,245, +5,1068,136705,3610,Mata-Utu,6,245, +5,1069,136705,3610,Mata-Utu,6,245, +5,1070,136705,3610,Mata-Utu,6,245, +5,1071,136705,3610,Mata-Utu,6,245, +5,1072,137217,3610,Mata-Utu,10,245, +5,1073,137217,3610,Mata-Utu,10,245, +5,1074,137217,3610,Mata-Utu,10,245, +5,1075,137217,3610,Mata-Utu,10,245, +5,1076,137729,3610,Mata-Utu,15,245, +5,1077,137729,3610,Mata-Utu,15,245, +5,1078,137729,3610,Mata-Utu,15,245, +5,1079,137729,3610,Mata-Utu,15,245, +5,1080,138241,3610,Mata-Utu,20,245, +5,1081,138241,3610,Mata-Utu,20,245, +5,1082,138241,3610,Mata-Utu,20,245, +5,1083,138241,3610,Mata-Utu,20,245, +5,1084,138753,3610,Mata-Utu,27,245, +5,1085,138753,3610,Mata-Utu,27,245, +5,1086,138753,3610,Mata-Utu,27,245, +5,1087,138753,3610,Mata-Utu,27,245, +5,1088,139265,3609,Leava,4,245, +5,1089,139265,3609,Leava,4,245, +5,1090,139265,3609,Leava,4,245, +5,1091,139265,3609,Leava,4,245, +5,1092,139777,3609,Leava,6,245, +5,1093,139777,3609,Leava,6,245, +5,1094,139777,3609,Leava,6,245, +5,1095,139777,3609,Leava,6,245, +5,1096,140289,3609,Leava,8,245, +5,1097,140289,3609,Leava,8,245, +5,1098,140289,3609,Leava,8,245, +5,1099,140289,3609,Leava,8,245, +5,1100,140801,3609,Leava,11,245, +5,1101,140801,3609,Leava,11,245, +5,1102,140801,3609,Leava,11,245, +5,1103,140801,3609,Leava,11,245, +5,1104,141313,3609,Leava,14,245, +5,1105,141313,3609,Leava,14,245, +5,1106,141313,3609,Leava,14,245, +5,1107,141313,3609,Leava,14,245, +5,1108,141825,3609,Leava,17,245, +5,1109,141825,3609,Leava,17,245, +5,1110,141825,3609,Leava,17,245, +5,1111,141825,3609,Leava,17,245, +5,1112,142337,3609,Leava,20,245, +5,1113,142337,3609,Leava,20,245, +5,1114,142337,3609,Leava,20,245, +5,1115,142337,3609,Leava,20,245, +5,1116,142849,3609,Leava,22,245, +5,1117,142849,3609,Leava,22,245, +5,1118,142849,3609,Leava,22,245, +5,1119,142849,3609,Leava,22,245, +5,1120,143361,3609,Leava,24,245, +5,1121,143361,3609,Leava,24,245, +5,1122,143361,3609,Leava,24,245, +5,1123,143361,3609,Leava,24,245, +5,1124,143873,3611,Alo,10,245, +5,1125,143873,3611,Alo,10,245, +5,1126,143873,3611,Alo,10,245, +5,1127,143873,3611,Alo,10,245, +5,1128,144385,3253,Nuku‘alofa,1,224, +5,1129,144385,3253,Nuku‘alofa,1,224, +5,1130,144385,3253,Nuku‘alofa,1,224, +5,1131,144385,3253,Nuku‘alofa,1,224, +5,1132,144897,3253,Nuku‘alofa,5,224, +5,1133,144897,3253,Nuku‘alofa,5,224, +5,1134,144897,3253,Nuku‘alofa,5,224, +5,1135,144897,3253,Nuku‘alofa,5,224, +5,1136,145409,3253,Nuku‘alofa,10,224, +5,1137,145409,3253,Nuku‘alofa,10,224, +5,1138,145409,3253,Nuku‘alofa,10,224, +5,1139,145409,3253,Nuku‘alofa,10,224, +5,1140,145921,3253,Nuku‘alofa,17,224, +5,1141,145921,3253,Nuku‘alofa,17,224, +5,1142,145921,3253,Nuku‘alofa,17,224, +5,1143,145921,3253,Nuku‘alofa,17,224, +5,1144,146433,3253,Nuku‘alofa,25,224, +5,1145,146433,3253,Nuku‘alofa,25,224, +5,1146,146433,3253,Nuku‘alofa,25,224, +5,1147,146433,3253,Nuku‘alofa,25,224, +5,1148,146945,3253,Nuku‘alofa,33,224, +5,1149,146945,3253,Nuku‘alofa,33,224, +5,1150,146945,3253,Nuku‘alofa,33,224, +5,1151,146945,3253,Nuku‘alofa,33,224, +5,1152,147457,3253,Nuku‘alofa,40,224, +5,1153,147457,3253,Nuku‘alofa,40,224, +5,1154,147457,3253,Nuku‘alofa,40,224, +5,1155,147457,3253,Nuku‘alofa,40,224, +5,1156,147969,3253,Nuku‘alofa,46,224, +5,1157,147969,3253,Nuku‘alofa,46,224, +5,1158,147969,3253,Nuku‘alofa,46,224, +5,1159,147969,3253,Nuku‘alofa,46,224, +5,1160,148481,3253,Nuku‘alofa,52,224, +5,1161,148481,3253,Nuku‘alofa,52,224, +5,1162,148481,3253,Nuku‘alofa,52,224, +5,1163,148481,3253,Nuku‘alofa,52,224, +5,1164,148993,3253,Nuku‘alofa,57,224, +5,1165,148993,3253,Nuku‘alofa,57,224, +5,1166,148993,3253,Nuku‘alofa,57,224, +5,1167,148993,3253,Nuku‘alofa,57,224, +5,1168,149505,3253,Nuku‘alofa,61,224, +5,1169,149505,3253,Nuku‘alofa,61,224, +5,1170,149505,3253,Nuku‘alofa,61,224, +5,1171,149505,3253,Nuku‘alofa,61,224, +5,1172,150017,3253,Nuku‘alofa,64,224, +5,1173,150017,3253,Nuku‘alofa,64,224, +5,1174,150017,3253,Nuku‘alofa,64,224, +5,1175,150017,3253,Nuku‘alofa,64,224, +5,1176,150529,3253,Nuku‘alofa,67,224, +5,1177,150529,3253,Nuku‘alofa,67,224, +5,1178,150529,3253,Nuku‘alofa,67,224, +5,1179,150529,3253,Nuku‘alofa,67,224, +5,1180,151041,3252,‘Ohonua,73,224, +5,1181,151041,3252,‘Ohonua,73,224, +5,1182,151041,3252,‘Ohonua,73,224, +5,1183,151041,3252,‘Ohonua,73,224, +5,1184,151553,3252,‘Ohonua,89,224, +5,1185,151553,3252,‘Ohonua,89,224, +5,1186,151553,3252,‘Ohonua,89,224, +5,1187,151553,3252,‘Ohonua,89,224, +5,1188,152065,3252,‘Ohonua,105,224, +5,1189,152065,3252,‘Ohonua,105,224, +5,1190,152065,3252,‘Ohonua,105,224, +5,1191,152065,3252,‘Ohonua,105,224, +5,1192,152577,3252,‘Ohonua,121,224, +5,1193,152577,3252,‘Ohonua,121,224, +5,1194,152577,3252,‘Ohonua,121,224, +5,1195,152577,3252,‘Ohonua,121,224, +5,1196,153089,3252,‘Ohonua,138,224, +5,1197,153089,3252,‘Ohonua,138,224, +5,1198,153089,3252,‘Ohonua,138,224, +5,1199,153089,3252,‘Ohonua,138,224, +5,1200,153601,3252,‘Ohonua,155,224, +5,1201,153601,3252,‘Ohonua,155,224, +5,1202,153601,3252,‘Ohonua,155,224, +5,1203,153601,3252,‘Ohonua,155,224, +5,1204,154113,3252,‘Ohonua,173,224, +5,1205,154113,3252,‘Ohonua,173,224, +5,1206,154113,3252,‘Ohonua,173,224, +5,1207,154113,3252,‘Ohonua,173,224, +5,1208,154625,3252,‘Ohonua,191,224, +5,1209,154625,3252,‘Ohonua,191,224, +5,1210,154625,3252,‘Ohonua,191,224, +5,1211,154625,3252,‘Ohonua,191,224, +5,1212,155137,3252,‘Ohonua,209,224, +5,1213,155137,3252,‘Ohonua,209,224, +5,1214,155137,3252,‘Ohonua,209,224, +5,1215,155137,3252,‘Ohonua,209,224, +5,1216,155649,3252,‘Ohonua,227,224, +5,1217,155649,3252,‘Ohonua,227,224, +5,1218,155649,3252,‘Ohonua,227,224, +5,1219,155649,3252,‘Ohonua,227,224, +5,1220,156161,2317,Waitangi,2,155, +5,1221,156161,2317,Waitangi,2,155, +5,1222,156161,2317,Waitangi,2,155, +5,1223,156161,2317,Waitangi,2,155, +5,1224,156673,2317,Waitangi,7,155, +5,1225,156673,2317,Waitangi,7,155, +5,1226,156673,2317,Waitangi,7,155, +5,1227,156673,2317,Waitangi,7,155, +5,1228,157185,2317,Waitangi,24,155, +5,1229,157185,2317,Waitangi,24,155, +5,1230,157185,2317,Waitangi,24,155, +5,1231,157185,2317,Waitangi,24,155, +5,1232,157697,2317,Waitangi,43,155, +5,1233,157697,2317,Waitangi,43,155, +5,1234,157697,2317,Waitangi,43,155, +5,1235,157697,2317,Waitangi,43,155, +5,1236,158209,2317,Waitangi,63,155, +5,1237,158209,2317,Waitangi,63,155, +5,1238,158209,2317,Waitangi,63,155, +5,1239,158209,2317,Waitangi,63,155, +5,1240,158721,2317,Waitangi,84,155, +5,1241,158721,2317,Waitangi,84,155, +5,1242,158721,2317,Waitangi,84,155, +5,1243,158721,2317,Waitangi,84,155, +5,1244,159233,2317,Waitangi,106,155, +5,1245,159233,2317,Waitangi,106,155, +5,1246,159233,2317,Waitangi,106,155, +5,1247,159233,2317,Waitangi,106,155, +5,1248,159745,2317,Waitangi,129,155, +5,1249,159745,2317,Waitangi,129,155, +5,1250,159745,2317,Waitangi,129,155, +5,1251,159745,2317,Waitangi,129,155, +5,1252,160257,2317,Waitangi,153,155, +5,1253,160257,2317,Waitangi,153,155, +5,1254,160257,2317,Waitangi,153,155, +5,1255,160257,2317,Waitangi,153,155, +5,1256,160769,2317,Waitangi,178,155, +5,1257,160769,2317,Waitangi,178,155, +5,1258,160769,2317,Waitangi,178,155, +5,1259,160769,2317,Waitangi,178,155, +5,1260,161281,2317,Waitangi,204,155, +5,1261,161281,2317,Waitangi,204,155, +5,1262,161281,2317,Waitangi,204,155, +5,1263,161281,2317,Waitangi,204,155, +5,1264,161793,2317,Waitangi,231,155, +5,1265,161793,2317,Waitangi,231,155, +5,1266,161793,2317,Waitangi,231,155, +5,1267,161793,2317,Waitangi,231,155, +5,1268,162305,2317,Waitangi,259,155, +5,1269,162305,2317,Waitangi,259,155, +5,1270,162305,2317,Waitangi,259,155, +5,1271,162305,2317,Waitangi,259,155, +5,1272,162817,2317,Waitangi,288,155, +5,1273,162817,2317,Waitangi,288,155, +5,1274,162817,2317,Waitangi,288,155, +5,1275,162817,2317,Waitangi,288,155, +5,1276,163329,2317,Waitangi,319,155, +5,1277,163329,2317,Waitangi,319,155, +5,1278,163329,2317,Waitangi,319,155, +5,1279,163329,2317,Waitangi,319,155, +5,1280,163841,2317,Waitangi,351,155, +5,1281,163841,2317,Waitangi,351,155, +5,1282,163841,2317,Waitangi,351,155, +5,1283,163841,2317,Waitangi,351,155, +5,1284,164353,2317,Waitangi,384,155, +5,1285,164353,2317,Waitangi,384,155, +5,1286,164353,2317,Waitangi,384,155, +5,1287,164353,2317,Waitangi,384,155, +5,1288,164865,2317,Waitangi,418,155, +5,1289,164865,2317,Waitangi,418,155, +5,1290,164865,2317,Waitangi,418,155, +5,1291,164865,2317,Waitangi,418,155, +5,1292,165377,2317,Waitangi,453,155, +5,1293,165377,2317,Waitangi,453,155, +5,1294,165377,2317,Waitangi,453,155, +5,1295,165377,2317,Waitangi,453,155, +5,1296,165889,2317,Waitangi,489,155, +5,1297,165889,2317,Waitangi,489,155, +5,1298,165889,2317,Waitangi,489,155, +5,1299,165889,2317,Waitangi,489,155, +5,1300,166401,2317,Waitangi,526,155, +5,1301,166401,2317,Waitangi,526,155, +5,1302,166401,2317,Waitangi,526,155, +5,1303,166401,2317,Waitangi,526,155, +5,1304,166913,2317,Waitangi,564,155, +5,1305,166913,2317,Waitangi,564,155, +5,1306,166913,2317,Waitangi,564,155, +5,1307,166913,2317,Waitangi,564,155, +5,1308,167425,2317,Waitangi,603,155, +5,1309,167425,2317,Waitangi,603,155, +5,1310,167425,2317,Waitangi,603,155, +5,1311,167425,2317,Waitangi,603,155, +5,1312,167937,2317,Waitangi,643,155, +5,1313,167937,2317,Waitangi,643,155, +5,1314,167937,2317,Waitangi,643,155, +5,1315,167937,2317,Waitangi,643,155, +5,1316,168449,2317,Waitangi,683,155, +5,1317,168449,2317,Waitangi,683,155, +5,1318,168449,2317,Waitangi,683,155, +5,1319,168449,2317,Waitangi,683,155, +5,1320,168961,2317,Waitangi,724,155, +5,1321,168961,2317,Waitangi,724,155, +5,1322,168961,2317,Waitangi,724,155, +5,1323,168961,2317,Waitangi,724,155, +5,1324,169473,2317,Waitangi,766,155, +5,1325,169473,2317,Waitangi,766,155, +5,1326,169473,2317,Waitangi,766,155, +5,1327,169473,2317,Waitangi,766,155, +5,1328,169985,2317,Waitangi,809,155, +5,1329,169985,2317,Waitangi,809,155, +5,1330,169985,2317,Waitangi,809,155, +5,1331,169985,2317,Waitangi,809,155, +5,1332,170497,2317,Waitangi,853,155, +5,1333,170497,2317,Waitangi,853,155, +5,1334,170497,2317,Waitangi,853,155, +5,1335,170497,2317,Waitangi,853,155, +5,1336,171009,2317,Waitangi,899,155, +5,1337,171009,2317,Waitangi,899,155, +5,1338,171009,2317,Waitangi,899,155, +5,1339,171009,2317,Waitangi,899,155, +5,1340,171521,2317,Waitangi,945,155, +5,1341,171521,2317,Waitangi,945,155, +5,1342,171521,2317,Waitangi,945,155, +5,1343,171521,2317,Waitangi,945,155, +5,1344,172033,2317,Waitangi,992,155, +5,1345,172033,2317,Waitangi,992,155, +5,1346,172033,2317,Waitangi,992,155, +5,1347,172033,2317,Waitangi,992,155, +5,1348,172545,2317,Waitangi,1039,155, +5,1349,172545,2317,Waitangi,1039,155, +5,1350,172545,2317,Waitangi,1039,155, +5,1351,172545,2317,Waitangi,1039,155, +5,1352,173057,2317,Waitangi,1086,155, +5,1353,173057,2317,Waitangi,1086,155, +5,1354,173057,2317,Waitangi,1086,155, +5,1355,173057,2317,Waitangi,1086,155, +5,1356,173569,2317,Waitangi,1133,155, +5,1357,173569,2317,Waitangi,1133,155, +5,1358,173569,2317,Waitangi,1133,155, +5,1359,173569,2317,Waitangi,1133,155, +5,1360,174081,2317,Waitangi,1181,155, +5,1361,174081,2317,Waitangi,1181,155, +5,1362,174081,2317,Waitangi,1181,155, +5,1363,174081,2317,Waitangi,1181,155, +5,1364,174593,2317,Waitangi,1229,155, +5,1365,174593,2317,Waitangi,1229,155, +5,1366,174593,2317,Waitangi,1229,155, +5,1367,174593,2317,Waitangi,1229,155, +5,1368,175105,2317,Waitangi,1277,155, +5,1369,175105,2317,Waitangi,1277,155, +5,1370,175105,2317,Waitangi,1277,155, +5,1371,175105,2317,Waitangi,1277,155, +5,1372,175617,2317,Waitangi,1325,155, +5,1373,175617,2317,Waitangi,1325,155, +5,1374,175617,2317,Waitangi,1325,155, +5,1375,175617,2317,Waitangi,1325,155, +5,1376,176129,2317,Waitangi,1374,155, +5,1377,176129,2317,Waitangi,1374,155, +5,1378,176129,2317,Waitangi,1374,155, +5,1379,176129,2317,Waitangi,1374,155, +5,1380,176641,2317,Waitangi,1423,155, +5,1381,176641,2317,Waitangi,1423,155, +5,1382,176641,2317,Waitangi,1423,155, +5,1383,176641,2317,Waitangi,1423,155, +5,1384,177153,2317,Waitangi,1472,155, +5,1385,177153,2317,Waitangi,1472,155, +5,1386,177153,2317,Waitangi,1472,155, +5,1387,177153,2317,Waitangi,1472,155, +5,1388,177665,2317,Waitangi,1521,155, +5,1389,177665,2317,Waitangi,1521,155, +5,1390,177665,2317,Waitangi,1521,155, +5,1391,177665,2317,Waitangi,1521,155, +5,1392,178177,2317,Waitangi,1571,155, +5,1393,178177,2317,Waitangi,1571,155, +5,1394,178177,2317,Waitangi,1571,155, +5,1395,178177,2317,Waitangi,1571,155, +5,1396,178689,2317,Waitangi,1621,155, +5,1397,178689,2317,Waitangi,1621,155, +5,1398,178689,2317,Waitangi,1621,155, +5,1399,178689,2317,Waitangi,1621,155, +5,1400,179201,2317,Waitangi,1671,155, +5,1401,179201,2317,Waitangi,1671,155, +5,1402,179201,2317,Waitangi,1671,155, +5,1403,179201,2317,Waitangi,1671,155, +5,1404,179713,2317,Waitangi,1721,155, +5,1405,179713,2317,Waitangi,1721,155, +5,1406,179713,2317,Waitangi,1721,155, +5,1407,179713,2317,Waitangi,1721,155, +5,1408,180225,2317,Waitangi,1772,155, +5,1409,180225,2317,Waitangi,1772,155, +5,1410,180225,2317,Waitangi,1772,155, +5,1411,180225,2317,Waitangi,1772,155, +5,1412,180737,2317,Waitangi,1823,155, +5,1413,180737,2317,Waitangi,1823,155, +5,1414,180737,2317,Waitangi,1823,155, +5,1415,180737,2317,Waitangi,1823,155, +5,1416,181249,2317,Waitangi,1874,155, +5,1417,181249,2317,Waitangi,1874,155, +5,1418,181249,2317,Waitangi,1874,155, +5,1419,181249,2317,Waitangi,1874,155, +5,1420,181761,2317,Waitangi,1925,155, +5,1421,181761,2317,Waitangi,1925,155, +5,1422,181761,2317,Waitangi,1925,155, +5,1423,181761,2317,Waitangi,1925,155, +5,1424,182273,2317,Waitangi,1977,155, +5,1425,182273,2317,Waitangi,1977,155, +5,1426,182273,2317,Waitangi,1977,155, +5,1427,182273,2317,Waitangi,1977,155, +5,1428,182785,2317,Waitangi,2029,155, +5,1429,182785,2317,Waitangi,2029,155, +5,1430,182785,2317,Waitangi,2029,155, +5,1431,182785,2317,Waitangi,2029,155, +5,1432,183297,2317,Waitangi,2081,155, +5,1433,183297,2317,Waitangi,2081,155, +5,1434,183297,2317,Waitangi,2081,155, +5,1435,183297,2317,Waitangi,2081,155, +5,1436,183809,2317,Waitangi,2133,155, +5,1437,183809,2317,Waitangi,2133,155, +5,1438,183809,2317,Waitangi,2133,155, +5,1439,183809,2317,Waitangi,2133,155, +5,1440,184321,2317,Waitangi,2185,155, +5,1441,184321,2317,Waitangi,2185,155, +5,1442,184321,2317,Waitangi,2185,155, +5,1443,184321,2317,Waitangi,2185,155, +5,1444,184833,2317,Waitangi,2238,155, +5,1445,184833,2317,Waitangi,2238,155, +5,1446,184833,2317,Waitangi,2238,155, +5,1447,184833,2317,Waitangi,2238,155, +5,1448,185345,2317,Waitangi,2291,155, +5,1449,185345,2317,Waitangi,2291,155, +5,1450,185345,2317,Waitangi,2291,155, +5,1451,185345,2317,Waitangi,2291,155, +5,1452,185857,2317,Waitangi,2344,155, +5,1453,185857,2317,Waitangi,2344,155, +5,1454,185857,2317,Waitangi,2344,155, +5,1455,185857,2317,Waitangi,2344,155, +5,1456,186369,2317,Waitangi,2397,155, +5,1457,186369,2317,Waitangi,2397,155, +5,1458,186369,2317,Waitangi,2397,155, +5,1459,186369,2317,Waitangi,2397,155, +5,1460,186881,2317,Waitangi,2450,155, +5,1461,186881,2317,Waitangi,2450,155, +5,1462,186881,2317,Waitangi,2450,155, +5,1463,186881,2317,Waitangi,2450,155, +5,1464,187393,2317,Waitangi,2504,155, +5,1465,187393,2317,Waitangi,2504,155, +5,1466,187393,2317,Waitangi,2504,155, +5,1467,187393,2317,Waitangi,2504,155, +5,1468,187905,2317,Waitangi,2558,155, +5,1469,187905,2317,Waitangi,2558,155, +5,1470,187905,2317,Waitangi,2558,155, +5,1471,187905,2317,Waitangi,2558,155, +5,1472,188417,2317,Waitangi,2612,155, +5,1473,188417,2317,Waitangi,2612,155, +5,1474,188417,2317,Waitangi,2612,155, +5,1475,188417,2317,Waitangi,2612,155, +5,1476,188929,2317,Waitangi,2666,155, +5,1477,188929,2317,Waitangi,2666,155, +5,1478,188929,2317,Waitangi,2666,155, +5,1479,188929,2317,Waitangi,2666,155, +5,1480,189441,2317,Waitangi,2720,155, +5,1481,189441,2317,Waitangi,2720,155, +5,1482,189441,2317,Waitangi,2720,155, +5,1483,189441,2317,Waitangi,2720,155, +5,1484,189953,2317,Waitangi,2775,155, +5,1485,189953,2317,Waitangi,2775,155, +5,1486,189953,2317,Waitangi,2775,155, +5,1487,189953,2317,Waitangi,2775,155, +5,1488,190465,2317,Waitangi,2830,155, +5,1489,190465,2317,Waitangi,2830,155, +5,1490,190465,2317,Waitangi,2830,155, +5,1491,190465,2317,Waitangi,2830,155, +5,1492,190977,2317,Waitangi,2885,155, +5,1493,190977,2317,Waitangi,2885,155, +5,1494,190977,2317,Waitangi,2885,155, +5,1495,190977,2317,Waitangi,2885,155, +5,1496,191489,2317,Waitangi,2940,155, +5,1497,191489,2317,Waitangi,2940,155, +5,1498,191489,2317,Waitangi,2940,155, +5,1499,191489,2317,Waitangi,2940,155, +5,1500,192001,2317,Waitangi,2995,155, +5,1501,192001,2317,Waitangi,2995,155, +5,1502,192001,2317,Waitangi,2995,155, +5,1503,192001,2317,Waitangi,2995,155, +5,1504,192513,2317,Waitangi,3050,155, +5,1505,192513,2317,Waitangi,3050,155, +5,1506,192513,2317,Waitangi,3050,155, +5,1507,192513,2317,Waitangi,3050,155, +5,1508,193025,2317,Waitangi,3106,155, +5,1509,193025,2317,Waitangi,3106,155, +5,1510,193025,2317,Waitangi,3106,155, +5,1511,193025,2317,Waitangi,3106,155, +5,1512,193537,2317,Waitangi,3162,155, +5,1513,193537,2317,Waitangi,3162,155, +5,1514,193537,2317,Waitangi,3162,155, +5,1515,193537,2317,Waitangi,3162,155, +5,1516,194049,2317,Waitangi,3218,155, +5,1517,194049,2317,Waitangi,3218,155, +5,1518,194049,2317,Waitangi,3218,155, +5,1519,194049,2317,Waitangi,3218,155, +5,1520,194561,2317,Waitangi,3274,155, +5,1521,194561,2317,Waitangi,3274,155, +5,1522,194561,2317,Waitangi,3274,155, +5,1523,194561,2317,Waitangi,3274,155, +5,1524,195073,2317,Waitangi,3330,155, +5,1525,195073,2317,Waitangi,3330,155, +5,1526,195073,2317,Waitangi,3330,155, +5,1527,195073,2317,Waitangi,3330,155, +5,1528,195585,2317,Waitangi,3386,155, +5,1529,195585,2317,Waitangi,3386,155, +5,1530,195585,2317,Waitangi,3386,155, +5,1531,195585,2317,Waitangi,3386,155, +5,1532,196097,2317,Waitangi,3443,155, +5,1533,196097,2317,Waitangi,3443,155, +5,1534,196097,2317,Waitangi,3443,155, +5,1535,196097,2317,Waitangi,3443,155, +5,1536,196609,2317,Waitangi,3500,155, +5,1537,196609,2317,Waitangi,3500,155, +5,1538,196609,2317,Waitangi,3500,155, +5,1539,196609,2317,Waitangi,3500,155, +5,1540,197121,2317,Waitangi,3557,155, +5,1541,197121,2317,Waitangi,3557,155, +5,1542,197121,2317,Waitangi,3557,155, +5,1543,197121,2317,Waitangi,3557,155, +5,1544,197633,2317,Waitangi,3614,155, +5,1545,197633,2317,Waitangi,3614,155, +5,1546,197633,2317,Waitangi,3614,155, +5,1547,197633,2317,Waitangi,3614,155, +5,1548,198145,2317,Waitangi,3671,155, +5,1549,198145,2317,Waitangi,3671,155, +5,1550,198145,2317,Waitangi,3671,155, +5,1551,198145,2317,Waitangi,3671,155, +5,1552,198657,2317,Waitangi,3728,155, +5,1553,198657,2317,Waitangi,3728,155, +5,1554,198657,2317,Waitangi,3728,155, +5,1555,198657,2317,Waitangi,3728,155, +5,1556,199169,2317,Waitangi,3786,155, +5,1557,199169,2317,Waitangi,3786,155, +5,1558,199169,2317,Waitangi,3786,155, +5,1559,199169,2317,Waitangi,3786,155, +5,1560,199681,2317,Waitangi,3844,155, +5,1561,199681,2317,Waitangi,3844,155, +5,1562,199681,2317,Waitangi,3844,155, +5,1563,199681,2317,Waitangi,3844,155, +5,1564,200193,2317,Waitangi,3902,155, +5,1565,200193,2317,Waitangi,3902,155, +5,1566,200193,2317,Waitangi,3902,155, +5,1567,200193,2317,Waitangi,3902,155, +5,1568,200705,2317,Waitangi,3960,155, +5,1569,200705,2317,Waitangi,3960,155, +5,1570,200705,2317,Waitangi,3960,155, +5,1571,200705,2317,Waitangi,3960,155, +5,1572,201217,2317,Waitangi,4018,155, +5,1573,201217,2317,Waitangi,4018,155, +5,1574,201217,2317,Waitangi,4018,155, +5,1575,201217,2317,Waitangi,4018,155, +5,1576,201729,2317,Waitangi,4076,155, +5,1577,201729,2317,Waitangi,4076,155, +5,1578,201729,2317,Waitangi,4076,155, +5,1579,201729,2317,Waitangi,4076,155, +5,1580,202241,2317,Waitangi,4134,155, +5,1581,202241,2317,Waitangi,4134,155, +5,1582,202241,2317,Waitangi,4134,155, +5,1583,202241,2317,Waitangi,4134,155, +5,1584,202753,2317,Waitangi,4193,155, +5,1585,202753,2317,Waitangi,4193,155, +5,1586,202753,2317,Waitangi,4193,155, +5,1587,202753,2317,Waitangi,4193,155, +5,1588,203265,2317,Waitangi,4252,155, +5,1589,203265,2317,Waitangi,4252,155, +5,1590,203265,2317,Waitangi,4252,155, +5,1591,203265,2317,Waitangi,4252,155, +5,1592,203777,2317,Waitangi,4311,155, +5,1593,203777,2317,Waitangi,4311,155, +5,1594,203777,2317,Waitangi,4311,155, +5,1595,203777,2317,Waitangi,4311,155, +5,1596,204289,2317,Waitangi,4370,155, +5,1597,204289,2317,Waitangi,4370,155, +5,1598,204289,2317,Waitangi,4370,155, +5,1599,204289,2317,Waitangi,4370,155, +5,1600,204801,2317,Waitangi,4429,155, +5,1601,204801,2317,Waitangi,4429,155, +5,1602,204801,2317,Waitangi,4429,155, +5,1603,204801,2317,Waitangi,4429,155, +5,1604,205313,2317,Waitangi,4488,155, +5,1605,205313,2317,Waitangi,4488,155, +5,1606,205313,2317,Waitangi,4488,155, +5,1607,205313,2317,Waitangi,4488,155, +5,1608,205825,2317,Waitangi,4547,155, +5,1609,205825,2317,Waitangi,4547,155, +5,1610,205825,2317,Waitangi,4547,155, +5,1611,205825,2317,Waitangi,4547,155, +5,1612,206337,2317,Waitangi,4607,155, +5,1613,206337,2317,Waitangi,4607,155, +5,1614,206337,2317,Waitangi,4607,155, +5,1615,206337,2317,Waitangi,4607,155, +5,1616,206849,2317,Waitangi,4667,155, +5,1617,206849,2317,Waitangi,4667,155, +5,1618,206849,2317,Waitangi,4667,155, +5,1619,206849,2317,Waitangi,4667,155, +5,1620,207361,2317,Waitangi,4727,155, +5,1621,207361,2317,Waitangi,4727,155, +5,1622,207361,2317,Waitangi,4727,155, +5,1623,207361,2317,Waitangi,4727,155, +5,1624,207873,2317,Waitangi,4787,155, +5,1625,207873,2317,Waitangi,4787,155, +5,1626,207873,2317,Waitangi,4787,155, +5,1627,207873,2317,Waitangi,4787,155, +5,1628,208385,2317,Waitangi,4847,155, +5,1629,208385,2317,Waitangi,4847,155, +5,1630,208385,2317,Waitangi,4847,155, +5,1631,208385,2317,Waitangi,4847,155, +5,1632,208897,2317,Waitangi,4907,155, +5,1633,208897,2317,Waitangi,4907,155, +5,1634,208897,2317,Waitangi,4907,155, +5,1635,208897,2317,Waitangi,4907,155, +5,1636,209409,2317,Waitangi,4967,155, +5,1637,209409,2317,Waitangi,4967,155, +5,1638,209409,2317,Waitangi,4967,155, +5,1639,209409,2317,Waitangi,4967,155, +5,1640,209921,2317,Waitangi,5027,155, +5,1641,209921,2317,Waitangi,5027,155, +5,1642,209921,2317,Waitangi,5027,155, +5,1643,209921,2317,Waitangi,5027,155, +5,1644,210433,2317,Waitangi,5088,155, +5,1645,210433,2317,Waitangi,5088,155, +5,1646,210433,2317,Waitangi,5088,155, +5,1647,210433,2317,Waitangi,5088,155, +5,1648,210945,2317,Waitangi,5149,155, +5,1649,210945,2317,Waitangi,5149,155, +5,1650,210945,2317,Waitangi,5149,155, +5,1651,210945,2317,Waitangi,5149,155, +5,1652,211457,2317,Waitangi,5210,155, +5,1653,211457,2317,Waitangi,5210,155, +5,1654,211457,2317,Waitangi,5210,155, +5,1655,211457,2317,Waitangi,5210,155, +5,1656,211969,2317,Waitangi,5271,155, +5,1657,211969,2317,Waitangi,5271,155, +5,1658,211969,2317,Waitangi,5271,155, +5,1659,211969,2317,Waitangi,5271,155, +5,1660,212481,2317,Waitangi,5332,155, +5,1661,212481,2317,Waitangi,5332,155, +5,1662,212481,2317,Waitangi,5332,155, +5,1663,212481,2317,Waitangi,5332,155, +5,1664,212993,2317,Waitangi,5393,155, +5,1665,212993,2317,Waitangi,5393,155, +5,1666,212993,2317,Waitangi,5393,155, +5,1667,212993,2317,Waitangi,5393,155, +5,1668,213505,2317,Waitangi,5454,155, +5,1669,213505,2317,Waitangi,5454,155, +5,1670,213505,2317,Waitangi,5454,155, +5,1671,213505,2317,Waitangi,5454,155, +5,1672,214017,2317,Waitangi,5515,155, +5,1673,214017,2317,Waitangi,5515,155, +5,1674,214017,2317,Waitangi,5515,155, +5,1675,214017,2317,Waitangi,5515,155, +5,1676,214529,2317,Waitangi,5576,155, +5,1677,214529,2317,Waitangi,5576,155, +5,1678,214529,2317,Waitangi,5576,155, +5,1679,214529,2317,Waitangi,5576,155, +5,1680,215041,2317,Waitangi,5638,155, +5,1681,215041,2317,Waitangi,5638,155, +5,1682,215041,2317,Waitangi,5638,155, +5,1683,215041,2317,Waitangi,5638,155, +5,1684,215553,2317,Waitangi,5700,155, +5,1685,215553,2317,Waitangi,5700,155, +5,1686,215553,2317,Waitangi,5700,155, +5,1687,215553,2317,Waitangi,5700,155, +5,1688,216065,2317,Waitangi,5762,155, +5,1689,216065,2317,Waitangi,5762,155, +5,1690,216065,2317,Waitangi,5762,155, +5,1691,216065,2317,Waitangi,5762,155, +5,1692,216577,2317,Waitangi,5824,155, +5,1693,216577,2317,Waitangi,5824,155, +5,1694,216577,2317,Waitangi,5824,155, +5,1695,216577,2317,Waitangi,5824,155, +5,1696,217089,2317,Waitangi,5886,155, +5,1697,217089,2317,Waitangi,5886,155, +5,1698,217089,2317,Waitangi,5886,155, +5,1699,217089,2317,Waitangi,5886,155, +5,1700,217601,2317,Waitangi,5948,155, +5,1701,217601,2317,Waitangi,5948,155, +5,1702,217601,2317,Waitangi,5948,155, +5,1703,217601,2317,Waitangi,5948,155, +5,1704,218113,2317,Waitangi,6010,155, +5,1705,218113,2317,Waitangi,6010,155, +5,1706,218113,2317,Waitangi,6010,155, +5,1707,218113,2317,Waitangi,6010,155, +5,1708,218625,2317,Waitangi,6072,155, +5,1709,218625,2317,Waitangi,6072,155, +5,1710,218625,2317,Waitangi,6072,155, +5,1711,218625,2317,Waitangi,6072,155, +5,1712,219137,2317,Waitangi,6134,155, +5,1713,219137,2317,Waitangi,6134,155, +5,1714,219137,2317,Waitangi,6134,155, +5,1715,219137,2317,Waitangi,6134,155, +5,1716,219649,2317,Waitangi,6197,155, +5,1717,219649,2317,Waitangi,6197,155, +5,1718,219649,2317,Waitangi,6197,155, +5,1719,219649,2317,Waitangi,6197,155, +5,1720,220161,2317,Waitangi,6260,155, +5,1721,220161,2317,Waitangi,6260,155, +5,1722,220161,2317,Waitangi,6260,155, +5,1723,220161,2317,Waitangi,6260,155, +5,1724,220673,2317,Waitangi,6323,155, +5,1725,220673,2317,Waitangi,6323,155, +5,1726,220673,2317,Waitangi,6323,155, +5,1727,220673,2317,Waitangi,6323,155, +5,1728,221185,2317,Waitangi,6386,155, +5,1729,221185,2317,Waitangi,6386,155, +5,1730,221185,2317,Waitangi,6386,155, +5,1731,221185,2317,Waitangi,6386,155, +5,1732,221697,2317,Waitangi,6449,155, +5,1733,221697,2317,Waitangi,6449,155, +5,1734,221697,2317,Waitangi,6449,155, +5,1735,221697,2317,Waitangi,6449,155, +5,1736,222209,2317,Waitangi,6512,155, +5,1737,222209,2317,Waitangi,6512,155, +5,1738,222209,2317,Waitangi,6512,155, +5,1739,222209,2317,Waitangi,6512,155, +5,1740,222721,2317,Waitangi,6575,155, +5,1741,222721,2317,Waitangi,6575,155, +5,1742,222721,2317,Waitangi,6575,155, +5,1743,222721,2317,Waitangi,6575,155, +5,1744,223233,2317,Waitangi,6638,155, +5,1745,223233,2317,Waitangi,6638,155, +5,1746,223233,2317,Waitangi,6638,155, +5,1747,223233,2317,Waitangi,6638,155, +5,1748,223745,2317,Waitangi,6701,155, +5,1749,223745,2317,Waitangi,6701,155, +5,1750,223745,2317,Waitangi,6701,155, +5,1751,223745,2317,Waitangi,6701,155, +5,1752,224257,2317,Waitangi,6764,155, +5,1753,224257,2317,Waitangi,6764,155, +5,1754,224257,2317,Waitangi,6764,155, +5,1755,224257,2317,Waitangi,6764,155, +5,1756,224769,2317,Waitangi,6827,155, +5,1757,224769,2317,Waitangi,6827,155, +5,1758,224769,2317,Waitangi,6827,155, +5,1759,224769,2317,Waitangi,6827,155, +5,1760,225281,2317,Waitangi,6890,155, +5,1761,225281,2317,Waitangi,6890,155, +5,1762,225281,2317,Waitangi,6890,155, +5,1763,225281,2317,Waitangi,6890,155, +5,1764,225793,2317,Waitangi,6954,155, +5,1765,225793,2317,Waitangi,6954,155, +5,1766,225793,2317,Waitangi,6954,155, +5,1767,225793,2317,Waitangi,6954,155, +5,1768,226305,2317,Waitangi,7018,155, +5,1769,226305,2317,Waitangi,7018,155, +5,1770,226305,2317,Waitangi,7018,155, +5,1771,226305,2317,Waitangi,7018,155, +5,1772,226817,2317,Waitangi,7082,155, +5,1773,226817,2317,Waitangi,7082,155, +5,1774,226817,2317,Waitangi,7082,155, +5,1775,226817,2317,Waitangi,7082,155, +5,1776,227329,2317,Waitangi,7146,155, +5,1777,227329,2317,Waitangi,7146,155, +5,1778,227329,2317,Waitangi,7146,155, +5,1779,227329,2317,Waitangi,7146,155, +5,1780,227841,2317,Waitangi,7210,155, +5,1781,227841,2317,Waitangi,7210,155, +5,1782,227841,2317,Waitangi,7210,155, +5,1783,227841,2317,Waitangi,7210,155, +5,1784,228353,2317,Waitangi,7274,155, +5,1785,228353,2317,Waitangi,7274,155, +5,1786,228353,2317,Waitangi,7274,155, +5,1787,228353,2317,Waitangi,7274,155, +5,1788,228865,2317,Waitangi,7338,155, +5,1789,228865,2317,Waitangi,7338,155, +5,1790,228865,2317,Waitangi,7338,155, +5,1791,228865,2317,Waitangi,7338,155, +5,1792,229377,2317,Waitangi,7402,155, +5,1793,229377,2317,Waitangi,7402,155, +5,1794,229377,2317,Waitangi,7402,155, +5,1795,229377,2317,Waitangi,7402,155, +5,1796,229889,2317,Waitangi,7466,155, +5,1797,229889,2317,Waitangi,7466,155, +5,1798,229889,2317,Waitangi,7466,155, +5,1799,229889,2317,Waitangi,7466,155, +5,1800,230401,2317,Waitangi,7530,155, +5,1801,230401,2317,Waitangi,7530,155, +5,1802,230401,2317,Waitangi,7530,155, +5,1803,230401,2317,Waitangi,7530,155, +5,1804,230913,2317,Waitangi,7594,155, +5,1805,230913,2317,Waitangi,7594,155, +5,1806,230913,2317,Waitangi,7594,155, +5,1807,230913,2317,Waitangi,7594,155, +5,1808,231425,2317,Waitangi,7658,155, +5,1809,231425,2317,Waitangi,7658,155, +5,1810,231425,2317,Waitangi,7658,155, +5,1811,231425,2317,Waitangi,7658,155, +5,1812,231937,2317,Waitangi,7723,155, +5,1813,231937,2317,Waitangi,7723,155, +5,1814,231937,2317,Waitangi,7723,155, +5,1815,231937,2317,Waitangi,7723,155, +5,1816,232449,2317,Waitangi,7788,155, +5,1817,232449,2317,Waitangi,7788,155, +5,1818,232449,2317,Waitangi,7788,155, +5,1819,232449,2317,Waitangi,7788,155, +5,1820,232961,2317,Waitangi,7853,155, +5,1821,232961,2317,Waitangi,7853,155, +5,1822,232961,2317,Waitangi,7853,155, +5,1823,232961,2317,Waitangi,7853,155, +5,1824,233473,2317,Waitangi,7918,155, +5,1825,233473,2317,Waitangi,7918,155, +5,1826,233473,2317,Waitangi,7918,155, +5,1827,233473,2317,Waitangi,7918,155, +5,1828,233985,2317,Waitangi,7983,155, +5,1829,233985,2317,Waitangi,7983,155, +5,1830,233985,2317,Waitangi,7983,155, +5,1831,233985,2317,Waitangi,7983,155, +5,1832,234497,2317,Waitangi,8048,155, +5,1833,234497,2317,Waitangi,8048,155, +5,1834,234497,2317,Waitangi,8048,155, +5,1835,234497,2317,Waitangi,8048,155, +5,1836,235009,2317,Waitangi,8113,155, +5,1837,235009,2317,Waitangi,8113,155, +5,1838,235009,2317,Waitangi,8113,155, +5,1839,235009,2317,Waitangi,8113,155, +5,1840,235521,2317,Waitangi,8178,155, +5,1841,235521,2317,Waitangi,8178,155, +5,1842,235521,2317,Waitangi,8178,155, +5,1843,235521,2317,Waitangi,8178,155, +5,1844,236033,2317,Waitangi,8243,155, +5,1845,236033,2317,Waitangi,8243,155, +5,1846,236033,2317,Waitangi,8243,155, +5,1847,236033,2317,Waitangi,8243,155, +5,1848,236545,2317,Waitangi,8308,155, +5,1849,236545,2317,Waitangi,8308,155, +5,1850,236545,2317,Waitangi,8308,155, +5,1851,236545,2317,Waitangi,8308,155, +5,1852,237057,2317,Waitangi,8373,155, +5,1853,237057,2317,Waitangi,8373,155, +5,1854,237057,2317,Waitangi,8373,155, +5,1855,237057,2317,Waitangi,8373,155, +5,1856,237569,2317,Waitangi,8438,155, +5,1857,237569,2317,Waitangi,8438,155, +5,1858,237569,2317,Waitangi,8438,155, +5,1859,237569,2317,Waitangi,8438,155, +5,1860,238081,2317,Waitangi,8503,155, +5,1861,238081,2317,Waitangi,8503,155, +5,1862,238081,2317,Waitangi,8503,155, +5,1863,238081,2317,Waitangi,8503,155, +5,1864,238593,2317,Waitangi,8568,155, +5,1865,238593,2317,Waitangi,8568,155, +5,1866,238593,2317,Waitangi,8568,155, +5,1867,238593,2317,Waitangi,8568,155, +5,1868,239105,2317,Waitangi,8633,155, +5,1869,239105,2317,Waitangi,8633,155, +5,1870,239105,2317,Waitangi,8633,155, +5,1871,239105,2317,Waitangi,8633,155, +5,1872,239617,2317,Waitangi,8698,155, +5,1873,239617,2317,Waitangi,8698,155, +5,1874,239617,2317,Waitangi,8698,155, +5,1875,239617,2317,Waitangi,8698,155, +5,1876,240129,2317,Waitangi,8764,155, +5,1877,240129,2317,Waitangi,8764,155, +5,1878,240129,2317,Waitangi,8764,155, +5,1879,240129,2317,Waitangi,8764,155, +5,1880,240641,2317,Waitangi,8830,155, +5,1881,240641,2317,Waitangi,8830,155, +5,1882,240641,2317,Waitangi,8830,155, +5,1883,240641,2317,Waitangi,8830,155, +5,1884,241153,2317,Waitangi,8896,155, +5,1885,241153,2317,Waitangi,8896,155, +5,1886,241153,2317,Waitangi,8896,155, +5,1887,241153,2317,Waitangi,8896,155, +5,1888,241665,2317,Waitangi,8962,155, +5,1889,241665,2317,Waitangi,8962,155, +5,1890,241665,2317,Waitangi,8962,155, +5,1891,241665,2317,Waitangi,8962,155, +5,1892,242177,2317,Waitangi,9028,155, +5,1893,242177,2317,Waitangi,9028,155, +5,1894,242177,2317,Waitangi,9028,155, +5,1895,242177,2317,Waitangi,9028,155, +5,1896,242689,2317,Waitangi,9094,155, +5,1897,242689,2317,Waitangi,9094,155, +5,1898,242689,2317,Waitangi,9094,155, +5,1899,242689,2317,Waitangi,9094,155, +5,1900,243201,2317,Waitangi,9160,155, +5,1901,243201,2317,Waitangi,9160,155, +5,1902,243201,2317,Waitangi,9160,155, +5,1903,243201,2317,Waitangi,9160,155, +5,1904,243713,2317,Waitangi,9226,155, +5,1905,243713,2317,Waitangi,9226,155, +5,1906,243713,2317,Waitangi,9226,155, +5,1907,243713,2317,Waitangi,9226,155, +5,1908,244225,2317,Waitangi,9292,155, +5,1909,244225,2317,Waitangi,9292,155, +5,1910,244225,2317,Waitangi,9292,155, +5,1911,244225,2317,Waitangi,9292,155, +5,1912,244737,2317,Waitangi,9358,155, +5,1913,244737,2317,Waitangi,9358,155, +5,1914,244737,2317,Waitangi,9358,155, +5,1915,244737,2317,Waitangi,9358,155, +5,1916,245249,2317,Waitangi,9424,155, +5,1917,245249,2317,Waitangi,9424,155, +5,1918,245249,2317,Waitangi,9424,155, +5,1919,245249,2317,Waitangi,9424,155, +5,1920,245761,2317,Waitangi,9490,155, +5,1921,245761,2317,Waitangi,9490,155, +5,1922,245761,2317,Waitangi,9490,155, +5,1923,245761,2317,Waitangi,9490,155, +5,1924,246273,2317,Waitangi,9556,155, +5,1925,246273,2317,Waitangi,9556,155, +5,1926,246273,2317,Waitangi,9556,155, +5,1927,246273,2317,Waitangi,9556,155, +5,1928,246785,2317,Waitangi,9622,155, +5,1929,246785,2317,Waitangi,9622,155, +5,1930,246785,2317,Waitangi,9622,155, +5,1931,246785,2317,Waitangi,9622,155, +5,1932,247297,2317,Waitangi,9688,155, +5,1933,247297,2317,Waitangi,9688,155, +5,1934,247297,2317,Waitangi,9688,155, +5,1935,247297,2317,Waitangi,9688,155, +5,1936,247809,2317,Waitangi,9754,155, +5,1937,247809,2317,Waitangi,9754,155, +5,1938,247809,2317,Waitangi,9754,155, +5,1939,247809,2317,Waitangi,9754,155, +5,1940,248321,2317,Waitangi,9820,155, +5,1941,248321,2317,Waitangi,9820,155, +5,1942,248321,2317,Waitangi,9820,155, +5,1943,248321,2317,Waitangi,9820,155, +5,1944,248833,2317,Waitangi,9886,155, +5,1945,248833,2317,Waitangi,9886,155, +5,1946,248833,2317,Waitangi,9886,155, +5,1947,248833,2317,Waitangi,9886,155, +5,1948,249345,2317,Waitangi,9953,155, +5,1949,249345,2317,Waitangi,9953,155, +5,1950,249345,2317,Waitangi,9953,155, +5,1951,249345,2317,Waitangi,9953,155, +5,1952,249857,2317,Waitangi,10020,155, +5,1953,249857,2317,Waitangi,10020,155, +5,1954,249857,2317,Waitangi,10020,155, +5,1955,249857,2317,Waitangi,10020,155, +5,1956,250369,2317,Waitangi,10087,155, +5,1957,250369,2317,Waitangi,10087,155, +5,1958,250369,2317,Waitangi,10087,155, +5,1959,250369,2317,Waitangi,10087,155, +5,1960,250881,2317,Waitangi,10154,155, +5,1961,250881,2317,Waitangi,10154,155, +5,1962,250881,2317,Waitangi,10154,155, +5,1963,250881,2317,Waitangi,10154,155, +5,1964,251393,2317,Waitangi,10221,155, +5,1965,251393,2317,Waitangi,10221,155, +5,1966,251393,2317,Waitangi,10221,155, +5,1967,251393,2317,Waitangi,10221,155, +5,1968,251905,2317,Waitangi,10288,155, +5,1969,251905,2317,Waitangi,10288,155, +5,1970,251905,2317,Waitangi,10288,155, +5,1971,251905,2317,Waitangi,10288,155, +5,1972,252417,2317,Waitangi,10355,155, +5,1973,252417,2317,Waitangi,10355,155, +5,1974,252417,2317,Waitangi,10355,155, +5,1975,252417,2317,Waitangi,10355,155, +5,1976,252929,2317,Waitangi,10422,155, +5,1977,252929,2317,Waitangi,10422,155, +5,1978,252929,2317,Waitangi,10422,155, +5,1979,252929,2317,Waitangi,10422,155, +5,1980,253441,2317,Waitangi,10489,155, +5,1981,253441,2317,Waitangi,10489,155, +5,1982,253441,2317,Waitangi,10489,155, +5,1983,253441,2317,Waitangi,10489,155, +5,1984,253953,2317,Waitangi,10556,155, +5,1985,253953,2317,Waitangi,10556,155, +5,1986,253953,2317,Waitangi,10556,155, +5,1987,253953,2317,Waitangi,10556,155, +5,1988,254465,2317,Waitangi,10623,155, +5,1989,254465,2317,Waitangi,10623,155, +5,1990,254465,2317,Waitangi,10623,155, +5,1991,254465,2317,Waitangi,10623,155, +5,1992,254977,2317,Waitangi,10690,155, +5,1993,254977,2317,Waitangi,10690,155, +5,1994,254977,2317,Waitangi,10690,155, +5,1995,254977,2317,Waitangi,10690,155, +5,1996,255489,2317,Waitangi,10757,155, +5,1997,255489,2317,Waitangi,10757,155, +5,1998,255489,2317,Waitangi,10757,155, +5,1999,255489,2317,Waitangi,10757,155, +5,2000,256001,2317,Waitangi,10824,155, +5,2001,256001,2317,Waitangi,10824,155, +5,2002,256001,2317,Waitangi,10824,155, +5,2003,256001,2317,Waitangi,10824,155, +5,2004,256513,2317,Waitangi,10891,155, +5,2005,256513,2317,Waitangi,10891,155, +5,2006,256513,2317,Waitangi,10891,155, +5,2007,256513,2317,Waitangi,10891,155, +5,2008,257025,2317,Waitangi,10958,155, +5,2009,257025,2317,Waitangi,10958,155, +5,2010,257025,2317,Waitangi,10958,155, +5,2011,257025,2317,Waitangi,10958,155, +5,2012,257537,2317,Waitangi,11025,155, +5,2013,257537,2317,Waitangi,11025,155, +5,2014,257537,2317,Waitangi,11025,155, +5,2015,257537,2317,Waitangi,11025,155, +5,2016,258049,2317,Waitangi,11092,155, +5,2017,258049,2317,Waitangi,11092,155, +5,2018,258049,2317,Waitangi,11092,155, +5,2019,258049,2317,Waitangi,11092,155, +5,2020,258561,2317,Waitangi,11159,155, +5,2021,258561,2317,Waitangi,11159,155, +5,2022,258561,2317,Waitangi,11159,155, +5,2023,258561,2317,Waitangi,11159,155, +5,2024,259073,2317,Waitangi,11226,155, +5,2025,259073,2317,Waitangi,11226,155, +5,2026,259073,2317,Waitangi,11226,155, +5,2027,259073,2317,Waitangi,11226,155, +5,2028,259585,2317,Waitangi,11293,155, +5,2029,259585,2317,Waitangi,11293,155, +5,2030,259585,2317,Waitangi,11293,155, +5,2031,259585,2317,Waitangi,11293,155, +5,2032,260097,2317,Waitangi,11360,155, +5,2033,260097,2317,Waitangi,11360,155, +5,2034,260097,2317,Waitangi,11360,155, +5,2035,260097,2317,Waitangi,11360,155, +5,2036,260609,2317,Waitangi,11427,155, +5,2037,260609,2317,Waitangi,11427,155, diff --git a/src/config/regions.ts b/src/config/regions.ts index 2475e8a..75f053c 100644 --- a/src/config/regions.ts +++ b/src/config/regions.ts @@ -7,16 +7,15 @@ export interface Region { flagId: number; } -export function getRegionForCoordinates(_tileX: number, _tileY: number, _x: number, _y: number): Region { - // TODO: implement region lookup using these coordinates: +export function getRegionForCoordinates(_tileX: number, _tileY: number, _x: number, _y: number): Region | null { + // TODO: implement region lookup using coordinate data + // After running the scraper (scripts/scrape_regions.py) and importing the data, + // you can implement a proper lookup using the Region table or a spatial index. + // // const globalX = tileX * 1000 + x; // const globalY = tileY * 1000 + y; - return { - id: 114_594, - cityId: 4263, - name: "Cupertino", - number: 2, - countryId: 235, - flagId: 235 - }; + // + // For now, return null to avoid showing incorrect region data. + // See scripts/README.md for instructions on scraping and importing region data. + return null; } diff --git a/src/index.ts b/src/index.ts index f353051..533e6c1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,6 +6,7 @@ import { inspect } from "util"; import admin from "./routes/admin.js"; import alliance from "./routes/alliance.js"; import auth from "./routes/auth.js"; +import experiments from "./routes/experiments.js"; import favoriteLocation from "./routes/favorite-location.js"; import leaderboard from "./routes/leaderboard.js"; import me from "./routes/me.js"; @@ -77,8 +78,20 @@ const __dirname = path.dirname(__filename); const frontendPath = path.join(__dirname, "..", "frontend"); app.use(async (req, res, next) => { - // Skip API routes - if (req.url?.startsWith("/api") || req.url?.startsWith("/auth")) { + // Skip API routes and backend routes + if (req.url?.startsWith("/api") + || req.url?.startsWith("/auth") + || req.url?.startsWith("/s0") + || req.url?.startsWith("/me") + || req.url?.startsWith("/alliance") + || req.url?.startsWith("/leaderboard") + || req.url?.startsWith("/favorite-location") + || req.url?.startsWith("/purchase") + || req.url?.startsWith("/flag") + || req.url?.startsWith("/report-user") + || req.url?.startsWith("/experiments") + || req.url?.startsWith("/moderator") + || req.url?.startsWith("/admin")) { return next?.(); } @@ -122,9 +135,31 @@ app.use(async (req, res, next) => { return next?.(); }); +// Serve admin and moderation HTML pages +app.get("/admin", async (_req, res) => { + try { + const html = await fs.readFile(path.join(frontendPath, "admin.html"), "utf-8"); + return res.setHeader("Content-Type", "text/html").send(html); + } catch (error) { + console.error("Error serving admin.html:", error); + return res.status(404).send("Page not found"); + } +}); + +app.get("/moderation", async (_req, res) => { + try { + const html = await fs.readFile(path.join(frontendPath, "moderation.html"), "utf-8"); + return res.setHeader("Content-Type", "text/html").send(html); + } catch (error) { + console.error("Error serving moderation.html:", error); + return res.status(404).send("Page not found"); + } +}); + admin(app); alliance(app); auth(app); +experiments(app); favoriteLocation(app); leaderboard(app); me(app); diff --git a/src/public/login.html b/src/public/login.html index bc7557e..2199858 100644 --- a/src/public/login.html +++ b/src/public/login.html @@ -3,7 +3,7 @@ - Login - openplace + Login - FurryPlace